Curl_altsvc_init:
  325|  3.73k|{
  326|  3.73k|  struct altsvcinfo *asi = curlx_calloc(1, sizeof(struct altsvcinfo));
  ------------------
  |  | 1473|  3.73k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  327|  3.73k|  if(!asi)
  ------------------
  |  Branch (327:6): [True: 0, False: 3.73k]
  ------------------
  328|      0|    return NULL;
  329|  3.73k|  Curl_llist_init(&asi->list, NULL);
  330|       |
  331|       |  /* set default behavior */
  332|  3.73k|  asi->flags = CURLALTSVC_H1
  ------------------
  |  | 1045|  3.73k|#define CURLALTSVC_H1           (1L << 3)
  ------------------
  333|  3.73k|#ifdef USE_HTTP2
  334|  3.73k|    | CURLALTSVC_H2
  ------------------
  |  | 1046|  3.73k|#define CURLALTSVC_H2           (1L << 4)
  ------------------
  335|  3.73k|#endif
  336|       |#ifdef USE_HTTP3
  337|       |    | CURLALTSVC_H3
  338|       |#endif
  339|  3.73k|    ;
  340|  3.73k|  return asi;
  341|  3.73k|}
Curl_altsvc_load:
  347|  3.73k|{
  348|  3.73k|  DEBUGASSERT(asi);
  ------------------
  |  | 1075|  3.73k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (348:3): [True: 0, False: 3.73k]
  |  Branch (348:3): [True: 3.73k, False: 0]
  ------------------
  349|  3.73k|  return altsvc_load(asi, file);
  350|  3.73k|}
Curl_altsvc_ctrl:
  356|    297|{
  357|    297|  DEBUGASSERT(data);
  ------------------
  |  | 1075|    297|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (357:3): [True: 0, False: 297]
  |  Branch (357:3): [True: 297, False: 0]
  ------------------
  358|    297|  if(!ctrl)
  ------------------
  |  Branch (358:6): [True: 94, False: 203]
  ------------------
  359|     94|    return CURLE_BAD_FUNCTION_ARGUMENT;
  360|       |
  361|    203|  if(!data->asi) {
  ------------------
  |  Branch (361:6): [True: 0, False: 203]
  ------------------
  362|      0|    data->asi = Curl_altsvc_init();
  363|      0|    if(!data->asi)
  ------------------
  |  Branch (363:8): [True: 0, False: 0]
  ------------------
  364|      0|      return CURLE_OUT_OF_MEMORY;
  365|      0|  }
  366|    203|  data->asi->flags = ctrl;
  367|    203|  return CURLE_OK;
  368|    203|}
Curl_altsvc_cleanup:
  375|  7.46k|{
  376|  7.46k|  if(*asi) {
  ------------------
  |  Branch (376:6): [True: 3.73k, False: 3.73k]
  ------------------
  377|  3.73k|    struct Curl_llist_node *e;
  378|  3.73k|    struct Curl_llist_node *n;
  379|  3.73k|    struct altsvcinfo *altsvc = *asi;
  380|  3.73k|    for(e = Curl_llist_head(&altsvc->list); e; e = n) {
  ------------------
  |  Branch (380:45): [True: 0, False: 3.73k]
  ------------------
  381|      0|      struct altsvc *as = Curl_node_elem(e);
  382|      0|      n = Curl_node_next(e);
  383|      0|      altsvc_free(as);
  ------------------
  |  |   87|      0|#define altsvc_free(x) curlx_free(x)
  |  |  ------------------
  |  |  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
  384|      0|    }
  385|  3.73k|    curlx_free(altsvc->filename);
  ------------------
  |  | 1476|  3.73k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  386|  3.73k|    curlx_free(altsvc);
  ------------------
  |  | 1476|  3.73k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  387|       |    *asi = NULL; /* clear the pointer */
  388|  3.73k|  }
  389|  7.46k|}
Curl_altsvc_save:
  396|  7.46k|{
  397|  7.46k|  CURLcode result = CURLE_OK;
  398|  7.46k|  FILE *out;
  399|  7.46k|  char *tempstore = NULL;
  400|       |
  401|  7.46k|  if(!asi)
  ------------------
  |  Branch (401:6): [True: 3.73k, False: 3.73k]
  ------------------
  402|       |    /* no cache activated */
  403|  3.73k|    return CURLE_OK;
  404|       |
  405|       |  /* if not new name is given, use the one we stored from the load */
  406|  3.73k|  if(!file && asi->filename)
  ------------------
  |  Branch (406:6): [True: 0, False: 3.73k]
  |  Branch (406:15): [True: 0, False: 0]
  ------------------
  407|      0|    file = asi->filename;
  408|       |
  409|  3.73k|  if((asi->flags & CURLALTSVC_READONLYFILE) || !file || !file[0])
  ------------------
  |  | 1044|  3.73k|#define CURLALTSVC_READONLYFILE (1L << 2)
  ------------------
  |  Branch (409:6): [True: 48, False: 3.68k]
  |  Branch (409:48): [True: 0, False: 3.68k]
  |  Branch (409:57): [True: 0, False: 3.68k]
  ------------------
  410|       |    /* marked as read-only, no file or zero length filename */
  411|     48|    return CURLE_OK;
  412|       |
  413|  3.68k|  result = Curl_fopen(data, file, &out, &tempstore);
  414|  3.68k|  if(!result) {
  ------------------
  |  Branch (414:6): [True: 3.68k, False: 0]
  ------------------
  415|  3.68k|    struct Curl_llist_node *e;
  416|  3.68k|    struct Curl_llist_node *n;
  417|  3.68k|    fputs("# Your alt-svc cache. https://curl.se/docs/alt-svc.html\n"
  418|  3.68k|          "# This file was generated by libcurl! Edit at your own risk.\n",
  419|  3.68k|          out);
  420|  3.68k|    for(e = Curl_llist_head(&asi->list); e; e = n) {
  ------------------
  |  Branch (420:42): [True: 0, False: 3.68k]
  ------------------
  421|      0|      struct altsvc *as = Curl_node_elem(e);
  422|      0|      n = Curl_node_next(e);
  423|      0|      result = altsvc_out(as, out);
  424|      0|      if(result)
  ------------------
  |  Branch (424:10): [True: 0, False: 0]
  ------------------
  425|      0|        break;
  426|      0|    }
  427|  3.68k|    curlx_fclose(out);
  ------------------
  |  |   81|  3.68k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  428|  3.68k|    if(!result && tempstore && curlx_rename(tempstore, file))
  ------------------
  |  |   72|      0|#define curlx_rename            rename
  ------------------
  |  Branch (428:8): [True: 3.68k, False: 0]
  |  Branch (428:19): [True: 0, False: 3.68k]
  |  Branch (428:32): [True: 0, False: 0]
  ------------------
  429|      0|      result = CURLE_WRITE_ERROR;
  430|       |
  431|  3.68k|    if(result && tempstore)
  ------------------
  |  Branch (431:8): [True: 0, False: 3.68k]
  |  Branch (431:18): [True: 0, False: 0]
  ------------------
  432|      0|      unlink(tempstore);
  433|  3.68k|  }
  434|  3.68k|  curlx_free(tempstore);
  ------------------
  |  | 1476|  3.68k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  435|  3.68k|  return result;
  436|  3.73k|}
altsvc.c:altsvc_load:
  238|  3.73k|{
  239|  3.73k|  CURLcode result = CURLE_OK;
  240|  3.73k|  FILE *fp;
  241|       |
  242|       |  /* we need a private copy of the filename so that the altsvc cache file
  243|       |     name survives an easy handle reset */
  244|  3.73k|  curlx_free(asi->filename);
  ------------------
  |  | 1476|  3.73k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  245|  3.73k|  asi->filename = curlx_strdup(file);
  ------------------
  |  | 1470|  3.73k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  246|  3.73k|  if(!asi->filename)
  ------------------
  |  Branch (246:6): [True: 0, False: 3.73k]
  ------------------
  247|      0|    return CURLE_OUT_OF_MEMORY;
  248|       |
  249|  3.73k|  fp = curlx_fopen(file, FOPEN_READTEXT);
  ------------------
  |  |   76|  3.73k|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
  250|  3.73k|  if(fp) {
  ------------------
  |  Branch (250:6): [True: 3.73k, False: 0]
  ------------------
  251|  3.73k|    curlx_struct_stat stat;
  ------------------
  |  |   65|  3.73k|#define curlx_struct_stat       struct stat
  ------------------
  252|  3.73k|    if((curlx_fstat(fileno(fp), &stat) == -1) || !S_ISDIR(stat.st_mode)) {
  ------------------
  |  |   64|  3.73k|#define curlx_fstat             fstat
  ------------------
  |  Branch (252:8): [True: 0, False: 3.73k]
  |  Branch (252:50): [True: 3.73k, False: 0]
  ------------------
  253|  3.73k|      bool eof = FALSE;
  ------------------
  |  | 1048|  3.73k|#define FALSE false
  ------------------
  254|  3.73k|      struct dynbuf buf;
  255|  3.73k|      curlx_dyn_init(&buf, MAX_ALTSVC_LINE);
  ------------------
  |  |   41|  3.73k|#define MAX_ALTSVC_LINE    4095
  ------------------
  256|  3.73k|      do {
  257|  3.73k|        result = Curl_get_line(&buf, fp, &eof);
  258|  3.73k|        if(!result) {
  ------------------
  |  Branch (258:12): [True: 3.73k, False: 0]
  ------------------
  259|  3.73k|          const char *lineptr = curlx_dyn_ptr(&buf);
  260|  3.73k|          curlx_str_passblanks(&lineptr);
  261|  3.73k|          if(curlx_str_single(&lineptr, '#'))
  ------------------
  |  Branch (261:14): [True: 3.73k, False: 0]
  ------------------
  262|  3.73k|            altsvc_add(asi, lineptr);
  263|  3.73k|        }
  264|  3.73k|      } while(!result && !eof);
  ------------------
  |  Branch (264:15): [True: 3.73k, False: 0]
  |  Branch (264:26): [True: 0, False: 3.73k]
  ------------------
  265|  3.73k|      curlx_dyn_free(&buf); /* free the line buffer */
  266|  3.73k|    }
  267|  3.73k|    curlx_fclose(fp);
  ------------------
  |  |   81|  3.73k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  268|  3.73k|  }
  269|  3.73k|  return result;
  270|  3.73k|}
altsvc.c:altsvc_add:
  169|  3.73k|{
  170|       |  /* Example line:
  171|       |     h2 example.com 443 h3 shiny.example.com 8443 "20191231 10:00:00" 1
  172|       |   */
  173|  3.73k|  struct Curl_str srchost;
  174|  3.73k|  struct Curl_str dsthost;
  175|  3.73k|  struct Curl_str srcalpn;
  176|  3.73k|  struct Curl_str dstalpn;
  177|  3.73k|  struct Curl_str date;
  178|  3.73k|  curl_off_t srcport;
  179|  3.73k|  curl_off_t dstport;
  180|  3.73k|  curl_off_t persist;
  181|  3.73k|  curl_off_t prio;
  182|       |
  183|  3.73k|  if(curlx_str_word(&line, &srcalpn, MAX_ALTSVC_ALPNLEN) ||
  ------------------
  |  |   44|  3.73k|#define MAX_ALTSVC_ALPNLEN 10
  ------------------
  |  Branch (183:6): [True: 0, False: 3.73k]
  ------------------
  184|  3.73k|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (184:6): [True: 3.73k, False: 0]
  ------------------
  185|      0|     curlx_str_word(&line, &srchost, 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, &srcport, 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_word(&line, &dstalpn, MAX_ALTSVC_ALPNLEN) ||
  ------------------
  |  |   44|      0|#define MAX_ALTSVC_ALPNLEN 10
  ------------------
  |  Branch (189:6): [True: 0, False: 0]
  ------------------
  190|      0|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (190:6): [True: 0, False: 0]
  ------------------
  191|      0|     curlx_str_word(&line, &dsthost, MAX_ALTSVC_HOSTLEN) ||
  ------------------
  |  |   43|      0|#define MAX_ALTSVC_HOSTLEN 2048
  ------------------
  |  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, &dstport, 65535) ||
  ------------------
  |  Branch (193:6): [True: 0, False: 0]
  ------------------
  194|      0|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (194:6): [True: 0, False: 0]
  ------------------
  195|      0|     curlx_str_quotedword(&line, &date, MAX_ALTSVC_DATELEN) ||
  ------------------
  |  |   42|      0|#define MAX_ALTSVC_DATELEN 17
  ------------------
  |  Branch (195:6): [True: 0, False: 0]
  ------------------
  196|      0|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (196:6): [True: 0, False: 0]
  ------------------
  197|      0|     curlx_str_number(&line, &persist, 1) ||
  ------------------
  |  Branch (197:6): [True: 0, False: 0]
  ------------------
  198|      0|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (198:6): [True: 0, False: 0]
  ------------------
  199|      0|     curlx_str_number(&line, &prio, 0) ||
  ------------------
  |  Branch (199:6): [True: 0, False: 0]
  ------------------
  200|      0|     curlx_str_newline(&line))
  ------------------
  |  Branch (200:6): [True: 0, False: 0]
  ------------------
  201|  3.73k|    ;
  202|      0|  else {
  203|      0|    char dbuf[MAX_ALTSVC_DATELEN + 1];
  204|      0|    time_t expires = 0;
  205|      0|    time_t now = time(NULL);
  ------------------
  |  |   63|      0|#define time(x) altsvc_debugtime(x)
  ------------------
  206|       |
  207|       |    /* The date parser works on a null-terminated string. The maximum length
  208|       |       is upheld by curlx_str_quotedword(). */
  209|      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)
  ------------------
  210|      0|    dbuf[curlx_strlen(&date)] = 0;
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  211|      0|    Curl_getdate_capped(dbuf, &expires);
  212|       |
  213|      0|    if(now < expires) {
  ------------------
  |  Branch (213:8): [True: 0, False: 0]
  ------------------
  214|      0|      struct altsvc *as = altsvc_create(&srchost, &dsthost, &srcalpn, &dstalpn,
  215|      0|                                        (size_t)srcport, (size_t)dstport);
  216|      0|      if(as) {
  ------------------
  |  Branch (216:10): [True: 0, False: 0]
  ------------------
  217|      0|        as->expires = expires;
  218|      0|        as->persist = persist ? 1 : 0;
  ------------------
  |  Branch (218:23): [True: 0, False: 0]
  ------------------
  219|      0|        altsvc_append(asi, as);
  220|      0|      }
  221|      0|      else
  222|      0|        return CURLE_OUT_OF_MEMORY;
  223|      0|    }
  224|      0|  }
  225|       |
  226|  3.73k|  return CURLE_OK;
  227|  3.73k|}

Curl_eapi_enter:
  184|   160k|{
  185|   160k|  struct Curl_easy *data = curl;
  186|   160k|  const struct Curl_eapi_fn_props *fn_props;
  187|   160k|  CURLcode result = CURLE_OK;
  188|       |
  189|   160k|  guard->depth = 0;
  190|       |
  191|       |  /* Verify that we got an easy handle we can work with. */
  192|   160k|  if(!GOOD_EASY_HANDLE(data)) {
  ------------------
  |  |   34|   160k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |   28|   160k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1045|   160k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (34:5): [True: 160k, False: 0]
  |  |  |  Branch (34:12): [True: 160k, False: 0]
  |  |  ------------------
  |  |   35|   160k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (192:6): [True: 0, False: 160k]
  |  Branch (192:7): [True: 0, False: 0]
  |  Branch (192:7): [True: 0, False: 0]
  ------------------
  193|      0|    result = CURLE_BAD_FUNCTION_ARGUMENT;
  194|      0|    goto out;
  195|      0|  }
  196|       |  /* verify that is either not added to a multi handle OR has a
  197|       |   * GOOD multi handle that knows `data` for `data->mid`. */
  198|   160k|  if(data->mid != UINT32_MAX) {
  ------------------
  |  Branch (198:6): [True: 29.4k, False: 131k]
  ------------------
  199|  29.4k|    if(GOOD_MULTI_HANDLE(data->multi)) {
  ------------------
  |  |   48|  29.4k|  (((x) && (x)->magic == CURLMULTI_MAGIC_NUMBER) ? TRUE : \
  |  |  ------------------
  |  |  |  |   41|  29.4k|#define CURLMULTI_MAGIC_NUMBER 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURLMULTI_MAGIC_NUMBER) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1045|  29.4k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (48:3): [True: 29.4k, False: 0]
  |  |  |  Branch (48:5): [True: 29.4k, False: 0]
  |  |  |  Branch (48:12): [True: 29.4k, False: 0]
  |  |  ------------------
  |  |   49|  29.4k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (199:8): [True: 0, False: 0]
  |  Branch (199:8): [True: 0, False: 0]
  ------------------
  200|  29.4k|      if(!Curl_multi_knows_easy(data->multi, data)) {
  ------------------
  |  Branch (200:10): [True: 0, False: 29.4k]
  ------------------
  201|       |        /* But multi does not know it, something is fishy, better deny call */
  202|      0|        DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (202:9): [Folded, False: 0]
  |  Branch (202:9): [Folded, False: 0]
  ------------------
  203|      0|        result = CURLE_BAD_FUNCTION_ARGUMENT;
  204|      0|        goto out;
  205|      0|      }
  206|  29.4k|    }
  207|      0|    else {
  208|      0|      DEBUGASSERT(0); /* data needs to have a GOOD multi handle */
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (208:7): [Folded, False: 0]
  |  Branch (208:7): [Folded, False: 0]
  ------------------
  209|      0|      result = CURLE_BAD_FUNCTION_ARGUMENT;
  210|      0|      goto out;
  211|      0|    }
  212|  29.4k|  }
  213|   131k|  else if(data->multi) {
  ------------------
  |  Branch (213:11): [True: 0, False: 131k]
  ------------------
  214|      0|    DEBUGASSERT(0); /* data should not have a multi handle */
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (214:5): [Folded, False: 0]
  |  Branch (214:5): [Folded, False: 0]
  ------------------
  215|      0|    result = CURLE_BAD_FUNCTION_ARGUMENT;
  216|      0|    goto out;
  217|      0|  }
  218|       |  /* verify that the call `fn` we're about to enter is known
  219|       |   * and check call properties to be admitting. */
  220|   160k|  if(fn >= CURL_EAPI_FN_LAST) {
  ------------------
  |  Branch (220:6): [True: 0, False: 160k]
  ------------------
  221|      0|    result = CURLE_BAD_FUNCTION_ARGUMENT;
  222|      0|    goto out;
  223|      0|  }
  224|   160k|  fn_props = &eapi_fn_props[fn];
  225|   160k|  DEBUGASSERT(fn_props->fn == fn);
  ------------------
  |  | 1075|   160k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (225:3): [True: 0, False: 160k]
  |  Branch (225:3): [True: 160k, False: 0]
  ------------------
  226|   160k|  if(!fn_props->recurse) {
  ------------------
  |  Branch (226:6): [True: 3.73k, False: 156k]
  ------------------
  227|  3.73k|    if(data->callstack.count) {
  ------------------
  |  Branch (227:8): [True: 0, False: 3.73k]
  ------------------
  228|      0|#ifdef CURLVERBOSE
  229|      0|      DEBUGF(curl_mfprintf(stderr,
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  ------------------
  230|      0|        "EAPI guard: calling %hu with call to %u ongoing\n", (uint16_t)fn,
  231|      0|        data->callstack.calls[data->callstack.count-1]));
  232|      0|#endif
  233|      0|      result = CURLE_RECURSIVE_API_CALL;
  234|      0|      goto out;
  235|      0|    }
  236|  3.73k|    if(data->multi && data->multi->callstack.count) {
  ------------------
  |  Branch (236:8): [True: 0, False: 3.73k]
  |  Branch (236:23): [True: 0, False: 0]
  ------------------
  237|      0|#ifdef CURLVERBOSE
  238|       |
  239|      0|      DEBUGF(curl_mfprintf(stderr,
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  ------------------
  240|      0|        "EAPI guard: calling %hu with multi call to %u ongoing\n",
  241|      0|        (uint16_t)fn,
  242|      0|        data->multi->callstack.calls[data->multi->callstack.count-1]));
  243|      0|#endif
  244|      0|      result = CURLE_RECURSIVE_API_CALL;
  245|      0|      goto out;
  246|      0|    }
  247|  3.73k|  }
  248|       |
  249|   160k|  if(fn_props->no_event_cb && eapi_in_event_cb(data)) {
  ------------------
  |  Branch (249:6): [True: 0, False: 160k]
  |  Branch (249:31): [True: 0, False: 0]
  ------------------
  250|       |    /* Not allowed to be invoked while an event cb is ongoing */
  251|      0|#ifdef CURLVERBOSE
  252|      0|      DEBUGF(curl_mfprintf(stderr,
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  ------------------
  253|      0|        "EAPI guard: calling %hu while event callback ongoing\n",
  254|      0|        (uint16_t)fn));
  255|      0|#endif
  256|      0|    result = CURLE_RECURSIVE_API_CALL;
  257|      0|    goto out;
  258|      0|  }
  259|       |
  260|   160k|#if defined(USE_SSL) && defined(USE_MUTEX)
  261|   160k|  if(fn_props->no_scache_lock &&
  ------------------
  |  Branch (261:6): [True: 0, False: 160k]
  ------------------
  262|      0|     Curl_ssl_scache_is_locked_by_current_thread(data)) {
  ------------------
  |  Branch (262:6): [True: 0, False: 0]
  ------------------
  263|      0|#ifdef CURLVERBOSE
  264|      0|      DEBUGF(curl_mfprintf(stderr,
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  ------------------
  265|      0|        "EAPI guard: calling %hu while vtls_scache is locked by "
  266|      0|        "current thread\n", (uint16_t)fn));
  267|      0|#endif
  268|      0|    result = CURLE_RECURSIVE_API_CALL;
  269|      0|    goto out;
  270|      0|  }
  271|   160k|#endif
  272|       |
  273|       |  /* all fine, add to data's callstack */
  274|   160k|  if(data->callstack.count >= CURL_EAPI_MAX_RECURSION) {
  ------------------
  |  |  139|   160k|#define CURL_EAPI_MAX_RECURSION       7
  ------------------
  |  Branch (274:6): [True: 0, False: 160k]
  ------------------
  275|      0|    result = CURLE_RECURSIVE_API_CALL;
  276|      0|    goto out;
  277|      0|  }
  278|   160k|  data->callstack.calls[data->callstack.count] = (uint16_t)fn;
  279|   160k|  ++data->callstack.count;
  280|   160k|  guard->depth = data->callstack.count;
  281|   160k|  guard->data = fn_props->data_is_killed ? NULL : data;
  ------------------
  |  Branch (281:17): [True: 3.73k, False: 156k]
  ------------------
  282|       |
  283|   160k|out:
  284|   160k|  if(presult)
  ------------------
  |  Branch (284:6): [True: 156k, False: 3.73k]
  ------------------
  285|   156k|    *presult = result;
  286|   160k|  return guard->depth > 0;
  287|   160k|}
Curl_eapi_leave:
  290|   160k|{
  291|   160k|  if(guard->depth) {
  ------------------
  |  Branch (291:6): [True: 160k, False: 0]
  ------------------
  292|       |    /* guard->data is set when handle is supposed to stay alive during call */
  293|   160k|    if(guard->data && GOOD_EASY_HANDLE(guard->data)) {
  ------------------
  |  |   34|   156k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |   28|   156k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1045|   156k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (34:3): [True: 156k, False: 0]
  |  |  |  Branch (34:5): [True: 156k, False: 0]
  |  |  |  Branch (34:12): [True: 156k, False: 0]
  |  |  ------------------
  |  |   35|   156k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (293:8): [True: 156k, False: 3.73k]
  |  Branch (293:23): [True: 0, False: 0]
  |  Branch (293:23): [True: 0, False: 0]
  ------------------
  294|   156k|      if(guard->depth > guard->data->callstack.count) {
  ------------------
  |  Branch (294:10): [True: 0, False: 156k]
  ------------------
  295|      0|        DEBUGASSERT(0); /* something very wrong */
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (295:9): [Folded, False: 0]
  |  Branch (295:9): [Folded, False: 0]
  ------------------
  296|      0|      }
  297|   156k|      else {
  298|   156k|        if(guard->depth < guard->data->callstack.count) {
  ------------------
  |  Branch (298:12): [True: 0, False: 156k]
  ------------------
  299|      0|          DEBUGASSERT(0); /* someone forgot to clean up */
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (299:11): [Folded, False: 0]
  |  Branch (299:11): [Folded, False: 0]
  ------------------
  300|      0|        }
  301|       |        /* reset to depth the guard was entered in */
  302|   156k|        guard->data->callstack.count = (uint16_t)(guard->depth - 1);
  303|   156k|      }
  304|   156k|    }
  305|   160k|  }
  306|   160k|}
Curl_mapi_enter:
  330|  29.6k|{
  331|  29.6k|  struct Curl_multi *multi = m;
  332|  29.6k|  const struct Curl_mapi_fn_props *fn_props;
  333|  29.6k|  CURLMcode mresult = CURLM_OK;
  334|       |
  335|  29.6k|  guard->depth = 0;
  336|       |
  337|       |  /* Verify that we got an easy handle we can work with. */
  338|  29.6k|  if(!GOOD_MULTI_HANDLE(multi)) {
  ------------------
  |  |   48|  29.6k|  (((x) && (x)->magic == CURLMULTI_MAGIC_NUMBER) ? TRUE : \
  |  |  ------------------
  |  |  |  |   41|  29.6k|#define CURLMULTI_MAGIC_NUMBER 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURLMULTI_MAGIC_NUMBER) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1045|  29.6k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (48:5): [True: 29.6k, False: 0]
  |  |  |  Branch (48:12): [True: 29.6k, False: 0]
  |  |  ------------------
  |  |   49|  29.6k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (338:6): [True: 0, False: 29.6k]
  |  Branch (338:7): [True: 0, False: 0]
  |  Branch (338:7): [True: 0, False: 0]
  ------------------
  339|      0|    mresult = CURLM_BAD_HANDLE;
  340|      0|    goto out;
  341|      0|  }
  342|  29.6k|  if(fn >= CURL_MAPI_FN_LAST) {
  ------------------
  |  Branch (342:6): [True: 0, False: 29.6k]
  ------------------
  343|      0|    mresult = CURLM_BAD_FUNCTION_ARGUMENT;
  344|      0|    goto out;
  345|      0|  }
  346|  29.6k|  fn_props = &mapi_fn_props[fn];
  347|  29.6k|  DEBUGASSERT(fn_props->fn == fn);
  ------------------
  |  | 1075|  29.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (347:3): [True: 0, False: 29.6k]
  |  Branch (347:3): [True: 29.6k, False: 0]
  ------------------
  348|  29.6k|  if(fn_props->allow_ntfy_cb && mapi_in_ntfy_cb(multi)) {
  ------------------
  |  Branch (348:6): [True: 14.9k, False: 14.7k]
  |  Branch (348:33): [True: 0, False: 14.9k]
  ------------------
  349|       |    /* explicitly allowed, even though normal recursion may not */
  350|      0|  }
  351|  29.6k|  else if(!fn_props->recurse && multi->callstack.count) {
  ------------------
  |  Branch (351:11): [True: 22.2k, False: 7.46k]
  |  Branch (351:33): [True: 0, False: 22.2k]
  ------------------
  352|      0|#ifdef CURLVERBOSE
  353|      0|      DEBUGF(curl_mfprintf(stderr,
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  ------------------
  354|      0|        "MAPI guard: calling %hu with call to %u ongoing\n", (uint16_t)fn,
  355|      0|        multi->callstack.calls[multi->callstack.count-1]));
  356|      0|#endif
  357|      0|    mresult = CURLM_RECURSIVE_API_CALL;
  358|      0|    goto out;
  359|      0|  }
  360|       |
  361|  29.6k|#if defined(USE_SSL) && defined(USE_MUTEX)
  362|  29.6k|  if(fn_props->no_scache_lock && multi->ssl_scache &&
  ------------------
  |  Branch (362:6): [True: 14.7k, False: 14.9k]
  |  Branch (362:34): [True: 14.7k, False: 0]
  ------------------
  363|  14.7k|     Curl_ssl_scache_is_locked_by_current_thread(multi->admin)) {
  ------------------
  |  Branch (363:6): [True: 0, False: 14.7k]
  ------------------
  364|      0|#ifdef CURLVERBOSE
  365|      0|      DEBUGF(curl_mfprintf(stderr,
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  ------------------
  366|      0|        "MAPI guard: calling %hu while its vtls_scache is locked by "
  367|      0|        "current thread\n", (uint16_t)fn));
  368|      0|#endif
  369|      0|    mresult = CURLM_RECURSIVE_API_CALL;
  370|      0|    goto out;
  371|      0|  }
  372|  29.6k|#endif
  373|       |
  374|       |  /* all fine, add to data's callstack */
  375|  29.6k|  if(multi->callstack.count >= CURL_MAPI_MAX_RECURSION) {
  ------------------
  |  |  169|  29.6k|#define CURL_MAPI_MAX_RECURSION       15
  ------------------
  |  Branch (375:6): [True: 0, False: 29.6k]
  ------------------
  376|      0|    mresult = CURLM_RECURSIVE_API_CALL;
  377|      0|    goto out;
  378|      0|  }
  379|  29.6k|  multi->callstack.calls[multi->callstack.count] = (uint16_t)fn;
  380|  29.6k|  ++multi->callstack.count;
  381|  29.6k|  guard->depth = multi->callstack.count;
  382|  29.6k|  guard->multi = fn_props->multi_is_killed ? NULL : multi;
  ------------------
  |  Branch (382:18): [True: 3.73k, False: 25.9k]
  ------------------
  383|       |
  384|  29.6k|out:
  385|  29.6k|  if(pmresult)
  ------------------
  |  Branch (385:6): [True: 22.2k, False: 7.46k]
  ------------------
  386|  22.2k|    *pmresult = mresult;
  387|  29.6k|  return guard->depth > 0;
  388|  29.6k|}
Curl_mapi_leave:
  391|  37.1k|{
  392|  37.1k|  if(guard->depth) {
  ------------------
  |  Branch (392:6): [True: 37.1k, False: 0]
  ------------------
  393|       |    /* guard->data is set when handle is supposed to stay alive during call */
  394|  37.1k|    if(guard->multi && GOOD_MULTI_HANDLE(guard->multi)) {
  ------------------
  |  |   48|  33.4k|  (((x) && (x)->magic == CURLMULTI_MAGIC_NUMBER) ? TRUE : \
  |  |  ------------------
  |  |  |  |   41|  33.4k|#define CURLMULTI_MAGIC_NUMBER 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURLMULTI_MAGIC_NUMBER) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1045|  33.4k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (48:3): [True: 33.4k, False: 0]
  |  |  |  Branch (48:5): [True: 33.4k, False: 0]
  |  |  |  Branch (48:12): [True: 33.4k, False: 0]
  |  |  ------------------
  |  |   49|  33.4k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (394:8): [True: 33.4k, False: 3.73k]
  |  Branch (394:24): [True: 0, False: 0]
  |  Branch (394:24): [True: 0, False: 0]
  ------------------
  395|  33.4k|      if(guard->depth > guard->multi->callstack.count) {
  ------------------
  |  Branch (395:10): [True: 0, False: 33.4k]
  ------------------
  396|      0|        DEBUGASSERT(0); /* something very wrong */
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (396:9): [Folded, False: 0]
  |  Branch (396:9): [Folded, False: 0]
  ------------------
  397|      0|      }
  398|  33.4k|      else {
  399|  33.4k|        if(guard->depth < guard->multi->callstack.count) {
  ------------------
  |  Branch (399:12): [True: 0, False: 33.4k]
  ------------------
  400|      0|          DEBUGASSERT(0); /* someone forgot to clean up */
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (400:11): [Folded, False: 0]
  |  Branch (400:11): [Folded, False: 0]
  ------------------
  401|      0|        }
  402|       |        /* reset to depth the guard was entered in */
  403|  33.4k|        guard->multi->callstack.count = (uint16_t)(guard->depth - 1);
  404|  33.4k|      }
  405|  33.4k|    }
  406|  37.1k|  }
  407|  37.1k|}
Curl_cbapi_enter:
  413|  7.47k|{
  414|  7.47k|  guard->depth = 0;
  415|       |
  416|  7.47k|  if(!multi)
  ------------------
  |  Branch (416:6): [True: 7.47k, False: 0]
  ------------------
  417|  7.47k|    multi = data ? data->multi : NULL;
  ------------------
  |  Branch (417:13): [True: 7.47k, False: 0]
  ------------------
  418|       |  /* if not multi is involved here, just leave */
  419|  7.47k|  if(!multi)
  ------------------
  |  Branch (419:6): [True: 0, False: 7.47k]
  ------------------
  420|      0|    return;
  421|       |  /* invalid callback specifier? */
  422|  7.47k|  if((fn >= CURL_CBAPI_FN_LAST) || (fn < CURL_CBAPI_FN_START)) {
  ------------------
  |  |  102|  7.47k|#define CURL_CBAPI_FN_START        (16 * 1024)
  ------------------
  |  Branch (422:6): [True: 0, False: 7.47k]
  |  Branch (422:36): [True: 0, False: 7.47k]
  ------------------
  423|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (423:5): [Folded, False: 0]
  |  Branch (423:5): [Folded, False: 0]
  ------------------
  424|      0|    return;
  425|      0|  }
  426|  7.47k|  DEBUGASSERT(cbapi_fn_props[fn - CURL_CBAPI_FN_START].fn == fn);
  ------------------
  |  | 1075|  7.47k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (426:3): [True: 0, False: 7.47k]
  |  Branch (426:3): [True: 7.47k, False: 0]
  ------------------
  427|  7.47k|  if(multi->callstack.count) {
  ------------------
  |  Branch (427:6): [True: 7.47k, False: 0]
  ------------------
  428|  7.47k|    size_t i;
  429|  14.9k|    for(i = multi->callstack.count; i; --i) {
  ------------------
  |  Branch (429:37): [True: 7.47k, False: 7.47k]
  ------------------
  430|  7.47k|      if(multi->callstack.calls[i - 1] == fn) {
  ------------------
  |  Branch (430:10): [True: 0, False: 7.47k]
  ------------------
  431|       |        /* recursive invocation of the same callback */
  432|      0|        DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (432:9): [Folded, False: 0]
  |  Branch (432:9): [Folded, False: 0]
  ------------------
  433|      0|        return;
  434|      0|      }
  435|  7.47k|    }
  436|  7.47k|  }
  437|       |
  438|       |  /* all fine, add to data's callstack */
  439|       |  /* if multi callstack already at max depth, leave */
  440|  7.47k|  if(multi->callstack.count >= CURL_MAPI_MAX_RECURSION)
  ------------------
  |  |  169|  7.47k|#define CURL_MAPI_MAX_RECURSION       15
  ------------------
  |  Branch (440:6): [True: 0, False: 7.47k]
  ------------------
  441|      0|    return;
  442|  7.47k|  multi->callstack.calls[multi->callstack.count] = (uint16_t)fn;
  443|  7.47k|  ++multi->callstack.count;
  444|  7.47k|  guard->depth = multi->callstack.count;
  445|  7.47k|  guard->multi = multi;
  446|  7.47k|}
Curl_cbapi_leave:
  449|  7.47k|{
  450|  7.47k|  Curl_mapi_leave(guard);
  451|  7.47k|}
api.c:mapi_in_ntfy_cb:
  149|  14.9k|{
  150|  14.9k|  if(multi && multi->callstack.count) {
  ------------------
  |  Branch (150:6): [True: 14.9k, False: 0]
  |  Branch (150:15): [True: 0, False: 14.9k]
  ------------------
  151|      0|    size_t i;
  152|      0|    for(i = 0; i < multi->callstack.count; ++i) {
  ------------------
  |  Branch (152:16): [True: 0, False: 0]
  ------------------
  153|      0|      if(multi->callstack.calls[i] == CURL_CBAPI_FN_multi_ntfy_cb)
  ------------------
  |  Branch (153:10): [True: 0, False: 0]
  ------------------
  154|      0|        return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  155|      0|    }
  156|      0|  }
  157|  14.9k|  return FALSE;
  ------------------
  |  | 1048|  14.9k|#define FALSE false
  ------------------
  158|  14.9k|}

Curl_bufcp_init:
  148|      2|{
  149|      2|  DEBUGASSERT(chunk_size > 0);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (149:3): [True: 0, False: 2]
  |  Branch (149:3): [True: 2, False: 0]
  ------------------
  150|      2|  DEBUGASSERT(spare_max > 0);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (150:3): [True: 0, False: 2]
  |  Branch (150:3): [True: 2, False: 0]
  ------------------
  151|      2|  memset(pool, 0, sizeof(*pool));
  152|      2|  pool->chunk_size = chunk_size;
  153|      2|  pool->spare_max = spare_max;
  154|      2|}
Curl_bufcp_free:
  201|      2|{
  202|      2|  chunk_list_free(&pool->spare);
  203|      2|  pool->spare_count = 0;
  204|      2|}
Curl_bufq_init2:
  220|  7.98k|{
  221|       |  bufq_init(q, NULL, chunk_size, max_chunks, opts);
  222|  7.98k|}
Curl_bufq_initp:
  231|      6|{
  232|      6|  bufq_init(q, pool, pool->chunk_size, max_chunks, opts);
  233|      6|}
Curl_bufq_free:
  236|  7.98k|{
  237|  7.98k|  chunk_list_free(&q->head);
  238|  7.98k|  chunk_list_free(&q->spare);
  239|       |  q->tail = NULL;
  240|  7.98k|  q->chunk_count = 0;
  241|  7.98k|}
Curl_bufq_reset:
  244|    136|{
  245|    136|  struct buf_chunk *chunk;
  246|    204|  while(q->head) {
  ------------------
  |  Branch (246:9): [True: 68, False: 136]
  ------------------
  247|     68|    chunk = q->head;
  248|     68|    q->head = chunk->next;
  249|     68|    chunk->next = q->spare;
  250|     68|    q->spare = chunk;
  251|     68|  }
  252|       |  q->tail = NULL;
  253|    136|}
Curl_bufq_len:
  256|    544|{
  257|    544|  const struct buf_chunk *chunk = q->head;
  258|    544|  size_t len = 0;
  259|  1.08k|  while(chunk) {
  ------------------
  |  Branch (259:9): [True: 544, False: 544]
  ------------------
  260|    544|    len += chunk_len(chunk);
  261|    544|    chunk = chunk->next;
  262|    544|  }
  263|    544|  return len;
  264|    544|}
Curl_bufq_is_empty:
  267|  19.8k|{
  268|  19.8k|  return !q->head || chunk_is_empty(q->head);
  ------------------
  |  Branch (268:10): [True: 18.2k, False: 1.53k]
  |  Branch (268:22): [True: 206, False: 1.33k]
  ------------------
  269|  19.8k|}
Curl_bufq_is_full:
  272|    777|{
  273|    777|  if(!q->tail || q->spare)
  ------------------
  |  Branch (273:6): [True: 119, False: 658]
  |  Branch (273:18): [True: 0, False: 658]
  ------------------
  274|    119|    return FALSE;
  ------------------
  |  | 1048|    119|#define FALSE false
  ------------------
  275|    658|  if(q->chunk_count < q->max_chunks)
  ------------------
  |  Branch (275:6): [True: 0, False: 658]
  ------------------
  276|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  277|    658|  if(q->chunk_count > q->max_chunks)
  ------------------
  |  Branch (277:6): [True: 0, False: 658]
  ------------------
  278|      0|    return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  279|       |  /* we have no spares and cannot make more, is the tail full? */
  280|    658|  return chunk_is_full(q->tail);
  281|    658|}
Curl_bufq_write:
  370|    727|{
  371|    727|  struct buf_chunk *tail;
  372|    727|  size_t n;
  373|       |
  374|    727|  DEBUGASSERT(q->max_chunks > 0);
  ------------------
  |  | 1075|    727|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (374:3): [True: 0, False: 727]
  |  Branch (374:3): [True: 727, False: 0]
  ------------------
  375|    727|  *pnwritten = 0;
  376|  1.45k|  while(len) {
  ------------------
  |  Branch (376:9): [True: 725, False: 727]
  ------------------
  377|    725|    tail = get_non_full_tail(q);
  378|    725|    if(!tail) {
  ------------------
  |  Branch (378:8): [True: 0, False: 725]
  ------------------
  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|    725|    n = chunk_append(tail, buf, len);
  385|    725|    if(!n)
  ------------------
  |  Branch (385:8): [True: 0, False: 725]
  ------------------
  386|      0|      break;
  387|    725|    *pnwritten += n;
  388|    725|    buf += n;
  389|    725|    len -= n;
  390|    725|  }
  391|    727|  return (!*pnwritten && len) ? CURLE_AGAIN : CURLE_OK;
  ------------------
  |  Branch (391:11): [True: 2, False: 725]
  |  Branch (391:26): [True: 0, False: 2]
  ------------------
  392|    727|}
Curl_bufq_cwrite:
  397|    710|{
  398|    710|  return Curl_bufq_write(q, (const uint8_t *)buf, len, pnwritten);
  399|    710|}
Curl_bufq_read:
  403|     24|{
  404|     24|  *pnread = 0;
  405|     48|  while(len && q->head) {
  ------------------
  |  Branch (405:9): [True: 48, False: 0]
  |  Branch (405:16): [True: 24, False: 24]
  ------------------
  406|     24|    size_t n = chunk_read(q->head, buf, len);
  407|     24|    if(n) {
  ------------------
  |  Branch (407:8): [True: 24, False: 0]
  ------------------
  408|     24|      *pnread += n;
  409|     24|      buf += n;
  410|     24|      len -= n;
  411|     24|    }
  412|     24|    prune_head(q);
  413|     24|  }
  414|     24|  return (!*pnread) ? CURLE_AGAIN : CURLE_OK;
  ------------------
  |  Branch (414:10): [True: 0, False: 24]
  ------------------
  415|     24|}
Curl_bufq_cread:
  419|     24|{
  420|     24|  return Curl_bufq_read(q, (uint8_t *)buf, len, pnread);
  421|     24|}
Curl_bufq_peek:
  425|  1.33k|{
  426|  1.33k|  if(q->head && chunk_is_empty(q->head)) {
  ------------------
  |  Branch (426:6): [True: 666, False: 665]
  |  Branch (426:17): [True: 0, False: 666]
  ------------------
  427|      0|    prune_head(q);
  428|      0|  }
  429|  1.33k|  if(q->head && !chunk_is_empty(q->head)) {
  ------------------
  |  Branch (429:6): [True: 666, False: 665]
  |  Branch (429:17): [True: 666, False: 0]
  ------------------
  430|    666|    chunk_peek(q->head, pbuf, plen);
  431|    666|    return TRUE;
  ------------------
  |  | 1045|    666|#define TRUE true
  ------------------
  432|    666|  }
  433|    665|  *pbuf = NULL;
  434|    665|  *plen = 0;
  435|       |  return FALSE;
  ------------------
  |  | 1048|    665|#define FALSE false
  ------------------
  436|  1.33k|}
Curl_bufq_skip:
  462|    666|{
  463|    666|  size_t n;
  464|       |
  465|  1.33k|  while(amount && q->head) {
  ------------------
  |  Branch (465:9): [True: 666, False: 666]
  |  Branch (465:19): [True: 666, False: 0]
  ------------------
  466|    666|    n = chunk_skip(q->head, amount);
  467|    666|    amount -= n;
  468|    666|    prune_head(q);
  469|    666|  }
  470|    666|}
Curl_bufq_pass:
  474|      7|{
  475|      7|  const uint8_t *buf;
  476|      7|  size_t blen;
  477|      7|  CURLcode result = CURLE_OK;
  478|       |
  479|      7|  *pwritten = 0;
  480|     14|  while(Curl_bufq_peek(q, &buf, &blen)) {
  ------------------
  |  Branch (480:9): [True: 7, False: 7]
  ------------------
  481|      7|    size_t chunk_written;
  482|       |
  483|      7|    result = writer(writer_ctx, buf, blen, &chunk_written);
  484|      7|    if(result) {
  ------------------
  |  Branch (484:8): [True: 0, False: 7]
  ------------------
  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|      7|    if(!chunk_written) {
  ------------------
  |  Branch (491:8): [True: 0, False: 7]
  ------------------
  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|      7|    *pwritten += chunk_written;
  499|      7|    Curl_bufq_skip(q, chunk_written);
  500|      7|  }
  501|      7|  return result;
  502|      7|}
Curl_bufq_write_pass:
  508|      9|{
  509|      9|  CURLcode result = CURLE_OK;
  510|      9|  size_t n;
  511|       |
  512|      9|  *pwritten = 0;
  513|     18|  while(len) {
  ------------------
  |  Branch (513:9): [True: 9, False: 9]
  ------------------
  514|      9|    if(Curl_bufq_is_full(q)) {
  ------------------
  |  Branch (514:8): [True: 0, False: 9]
  ------------------
  515|       |      /* try to make room in case we are full */
  516|      0|      result = Curl_bufq_pass(q, writer, writer_ctx, &n);
  517|      0|      if(result) {
  ------------------
  |  Branch (517:10): [True: 0, False: 0]
  ------------------
  518|      0|        if(result != CURLE_AGAIN) {
  ------------------
  |  Branch (518:12): [True: 0, False: 0]
  ------------------
  519|       |          /* real error, fail */
  520|      0|          return result;
  521|      0|        }
  522|       |        /* would block, bufq is full, give up */
  523|      0|        break;
  524|      0|      }
  525|      0|    }
  526|       |
  527|       |    /* Add to bufq as much as there is room for */
  528|      9|    result = Curl_bufq_write(q, buf, len, &n);
  529|      9|    if(result) {
  ------------------
  |  Branch (529:8): [True: 0, False: 9]
  ------------------
  530|      0|      if(result != CURLE_AGAIN)
  ------------------
  |  Branch (530:10): [True: 0, False: 0]
  ------------------
  531|       |        /* real error, fail */
  532|      0|        return result;
  533|       |      /* result == CURLE_AGAIN */
  534|      0|      if(*pwritten)
  ------------------
  |  Branch (534:10): [True: 0, False: 0]
  ------------------
  535|       |        /* we did write successfully before */
  536|      0|        result = CURLE_OK;
  537|      0|      return result;
  538|      0|    }
  539|      9|    else if(n == 0)
  ------------------
  |  Branch (539:13): [True: 0, False: 9]
  ------------------
  540|       |      /* edge case of writer returning 0 (and len is >0)
  541|       |       * break or we might enter an infinite loop here */
  542|      0|      break;
  543|       |
  544|       |    /* Track what we added to bufq */
  545|      9|    buf += n;
  546|      9|    len -= n;
  547|      9|    *pwritten += n;
  548|      9|  }
  549|       |
  550|      9|  return (!*pwritten && len) ? CURLE_AGAIN : CURLE_OK;
  ------------------
  |  Branch (550:11): [True: 0, False: 9]
  |  Branch (550:25): [True: 0, False: 0]
  ------------------
  551|      9|}
Curl_bufq_sipn:
  556|    773|{
  557|    773|  struct buf_chunk *tail = NULL;
  558|       |
  559|    773|  *pnread = 0;
  560|    773|  tail = get_non_full_tail(q);
  561|    773|  if(!tail) {
  ------------------
  |  Branch (561:6): [True: 0, False: 773]
  ------------------
  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|    773|  return chunk_slurpn(tail, max_len, reader, reader_ctx, pnread);
  569|    773|}
bufq.c:chunk_list_free:
  137|  15.9k|{
  138|  15.9k|  struct buf_chunk *chunk;
  139|  16.6k|  while(*anchor) {
  ------------------
  |  Branch (139:9): [True: 678, False: 15.9k]
  ------------------
  140|    678|    chunk = *anchor;
  141|    678|    *anchor = chunk->next;
  142|    678|    curlx_free(chunk);
  ------------------
  |  | 1476|    678|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  143|    678|  }
  144|  15.9k|}
bufq.c:bufq_init:
  208|  7.98k|{
  209|  7.98k|  DEBUGASSERT(chunk_size > 0);
  ------------------
  |  | 1075|  7.98k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (209:3): [True: 0, False: 7.98k]
  |  Branch (209:3): [True: 7.98k, False: 0]
  ------------------
  210|  7.98k|  DEBUGASSERT(max_chunks > 0);
  ------------------
  |  | 1075|  7.98k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (210:3): [True: 0, False: 7.98k]
  |  Branch (210:3): [True: 7.98k, False: 0]
  ------------------
  211|  7.98k|  memset(q, 0, sizeof(*q));
  212|  7.98k|  q->chunk_size = chunk_size;
  213|  7.98k|  q->max_chunks = max_chunks;
  214|  7.98k|  q->pool = pool;
  215|  7.98k|  q->opts = opts;
  216|  7.98k|}
bufq.c:chunk_len:
   39|    544|{
   40|    544|  return chunk->w_offset - chunk->r_offset;
   41|    544|}
bufq.c:chunk_is_empty:
   29|  3.55k|{
   30|  3.55k|  return chunk->r_offset >= chunk->w_offset;
   31|  3.55k|}
bufq.c:chunk_is_full:
   34|  1.35k|{
   35|  1.35k|  return chunk->w_offset >= chunk->dlen;
   36|  1.35k|}
bufq.c:get_non_full_tail:
  347|  1.49k|{
  348|  1.49k|  struct buf_chunk *chunk;
  349|       |
  350|  1.49k|  if(q->tail && !chunk_is_full(q->tail))
  ------------------
  |  Branch (350:6): [True: 696, False: 802]
  |  Branch (350:17): [True: 696, False: 0]
  ------------------
  351|    696|    return q->tail;
  352|    802|  chunk = get_spare(q);
  353|    802|  if(chunk) {
  ------------------
  |  Branch (353:6): [True: 802, False: 0]
  ------------------
  354|       |    /* new tail, and possibly new head */
  355|    802|    if(q->tail) {
  ------------------
  |  Branch (355:8): [True: 0, False: 802]
  ------------------
  356|      0|      q->tail->next = chunk;
  357|      0|      q->tail = chunk;
  358|      0|    }
  359|    802|    else {
  360|    802|      DEBUGASSERT(!q->head);
  ------------------
  |  | 1075|    802|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (360:7): [True: 0, False: 802]
  |  Branch (360:7): [True: 802, False: 0]
  ------------------
  361|    802|      q->head = q->tail = chunk;
  362|    802|    }
  363|    802|  }
  364|    802|  return chunk;
  365|    802|}
bufq.c:get_spare:
  284|    802|{
  285|    802|  struct buf_chunk *chunk = NULL;
  286|       |
  287|    802|  if(q->spare) {
  ------------------
  |  Branch (287:6): [True: 118, False: 684]
  ------------------
  288|    118|    chunk = q->spare;
  289|    118|    q->spare = chunk->next;
  290|    118|    chunk_reset(chunk);
  291|    118|    return chunk;
  292|    118|  }
  293|       |
  294|    684|  if(q->chunk_count >= q->max_chunks && (!(q->opts & BUFQ_OPT_SOFT_LIMIT)))
  ------------------
  |  |  111|      0|#define BUFQ_OPT_SOFT_LIMIT  (1 << 0)
  ------------------
  |  Branch (294:6): [True: 0, False: 684]
  |  Branch (294:41): [True: 0, False: 0]
  ------------------
  295|      0|    return NULL;
  296|       |
  297|    684|  if(q->pool) {
  ------------------
  |  Branch (297:6): [True: 10, False: 674]
  ------------------
  298|     10|    if(bufcp_take(q->pool, &chunk))
  ------------------
  |  Branch (298:8): [True: 0, False: 10]
  ------------------
  299|      0|      return NULL;
  300|     10|    ++q->chunk_count;
  301|     10|    return chunk;
  302|     10|  }
  303|    674|  else {
  304|       |    /* Check for integer overflow before allocation */
  305|    674|    if(q->chunk_size > SIZE_MAX - sizeof(*chunk)) {
  ------------------
  |  Branch (305:8): [True: 0, False: 674]
  ------------------
  306|      0|      return NULL;
  307|      0|    }
  308|       |
  309|    674|    chunk = curlx_calloc(1, sizeof(*chunk) + q->chunk_size);
  ------------------
  |  | 1473|    674|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  310|    674|    if(!chunk)
  ------------------
  |  Branch (310:8): [True: 0, False: 674]
  ------------------
  311|      0|      return NULL;
  312|    674|    chunk->dlen = q->chunk_size;
  313|    674|    ++q->chunk_count;
  314|    674|    return chunk;
  315|    674|  }
  316|    684|}
bufq.c:chunk_reset:
   44|    132|{
   45|       |  chunk->next = NULL;
   46|    132|  chunk->r_offset = chunk->w_offset = 0;
   47|    132|}
bufq.c:bufcp_take:
  158|     10|{
  159|     10|  struct buf_chunk *chunk = NULL;
  160|       |
  161|     10|  if(pool->spare) {
  ------------------
  |  Branch (161:6): [True: 6, False: 4]
  ------------------
  162|      6|    chunk = pool->spare;
  163|      6|    pool->spare = chunk->next;
  164|      6|    --pool->spare_count;
  165|      6|    chunk_reset(chunk);
  166|      6|    *pchunk = chunk;
  167|      6|    return CURLE_OK;
  168|      6|  }
  169|       |
  170|       |  /* Check for integer overflow before allocation */
  171|      4|  if(pool->chunk_size > SIZE_MAX - sizeof(*chunk)) {
  ------------------
  |  Branch (171:6): [True: 0, False: 4]
  ------------------
  172|      0|    *pchunk = NULL;
  173|      0|    return CURLE_OUT_OF_MEMORY;
  174|      0|  }
  175|       |
  176|      4|  chunk = curlx_calloc(1, sizeof(*chunk) + pool->chunk_size);
  ------------------
  |  | 1473|      4|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  177|      4|  if(!chunk) {
  ------------------
  |  Branch (177:6): [True: 0, False: 4]
  ------------------
  178|      0|    *pchunk = NULL;
  179|      0|    return CURLE_OUT_OF_MEMORY;
  180|      0|  }
  181|      4|  chunk->dlen = pool->chunk_size;
  182|      4|  *pchunk = chunk;
  183|      4|  return CURLE_OK;
  184|      4|}
bufq.c:chunk_append:
   51|    725|{
   52|    725|  uint8_t *p = &chunk->x.data[chunk->w_offset];
   53|    725|  size_t n = chunk->dlen - chunk->w_offset;
   54|    725|  DEBUGASSERT(chunk->dlen >= chunk->w_offset);
  ------------------
  |  | 1075|    725|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (54:3): [True: 0, False: 725]
  |  Branch (54:3): [True: 725, False: 0]
  ------------------
   55|    725|  if(n) {
  ------------------
  |  Branch (55:6): [True: 725, False: 0]
  ------------------
   56|    725|    n = CURLMIN(n, len);
  ------------------
  |  | 1288|    725|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1288:24): [True: 0, False: 725]
  |  |  ------------------
  ------------------
   57|    725|    memcpy(p, buf, n);
   58|    725|    chunk->w_offset += n;
   59|    725|  }
   60|    725|  return n;
   61|    725|}
bufq.c:chunk_read:
   65|     24|{
   66|     24|  uint8_t *p = &chunk->x.data[chunk->r_offset];
   67|     24|  size_t n = chunk->w_offset - chunk->r_offset;
   68|     24|  DEBUGASSERT(chunk->w_offset >= chunk->r_offset);
  ------------------
  |  | 1075|     24|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (68:3): [True: 0, False: 24]
  |  Branch (68:3): [True: 24, False: 0]
  ------------------
   69|     24|  if(!n) {
  ------------------
  |  Branch (69:6): [True: 0, False: 24]
  ------------------
   70|      0|    return 0;
   71|      0|  }
   72|     24|  else if(n <= len) {
  ------------------
  |  Branch (72:11): [True: 24, False: 0]
  ------------------
   73|     24|    memcpy(buf, p, n);
   74|     24|    chunk->r_offset = chunk->w_offset = 0;
   75|     24|    return n;
   76|     24|  }
   77|      0|  else {
   78|      0|    memcpy(buf, p, len);
   79|      0|    chunk->r_offset += len;
   80|      0|    return len;
   81|      0|  }
   82|     24|}
bufq.c:prune_head:
  319|    690|{
  320|    690|  struct buf_chunk *chunk;
  321|       |
  322|  1.38k|  while(q->head && chunk_is_empty(q->head)) {
  ------------------
  |  Branch (322:9): [True: 690, False: 690]
  |  Branch (322:20): [True: 690, False: 0]
  ------------------
  323|    690|    chunk = q->head;
  324|    690|    q->head = chunk->next;
  325|    690|    if(q->tail == chunk)
  ------------------
  |  Branch (325:8): [True: 690, False: 0]
  ------------------
  326|    690|      q->tail = q->head;
  327|    690|    if(q->pool) {
  ------------------
  |  Branch (327:8): [True: 8, False: 682]
  ------------------
  328|      8|      bufcp_put(q->pool, chunk);
  329|      8|      --q->chunk_count;
  330|      8|    }
  331|    682|    else if((q->chunk_count > q->max_chunks) ||
  ------------------
  |  Branch (331:13): [True: 0, False: 682]
  ------------------
  332|    682|            (q->opts & BUFQ_OPT_NO_SPARES)) {
  ------------------
  |  |  115|    682|#define BUFQ_OPT_NO_SPARES   (1 << 1)
  ------------------
  |  Branch (332:13): [True: 0, False: 682]
  ------------------
  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|      0|      curlx_free(chunk);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  337|      0|      --q->chunk_count;
  338|      0|    }
  339|    682|    else {
  340|    682|      chunk->next = q->spare;
  341|    682|      q->spare = chunk;
  342|    682|    }
  343|    690|  }
  344|    690|}
bufq.c:bufcp_put:
  188|      8|{
  189|      8|  if(pool->spare_count >= pool->spare_max) {
  ------------------
  |  Branch (189:6): [True: 0, False: 8]
  ------------------
  190|      0|    curlx_free(chunk);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  191|      0|  }
  192|      8|  else {
  193|      8|    chunk_reset(chunk);
  194|      8|    chunk->next = pool->spare;
  195|      8|    pool->spare = chunk;
  196|      8|    ++pool->spare_count;
  197|      8|  }
  198|      8|}
bufq.c:chunk_peek:
  108|    666|{
  109|    666|  DEBUGASSERT(chunk->w_offset >= chunk->r_offset);
  ------------------
  |  | 1075|    666|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (109:3): [True: 0, False: 666]
  |  Branch (109:3): [True: 666, False: 0]
  ------------------
  110|    666|  *pbuf = &chunk->x.data[chunk->r_offset];
  111|    666|  *plen = chunk->w_offset - chunk->r_offset;
  112|    666|}
bufq.c:chunk_skip:
  124|    666|{
  125|    666|  size_t n = chunk->w_offset - chunk->r_offset;
  126|    666|  DEBUGASSERT(chunk->w_offset >= chunk->r_offset);
  ------------------
  |  | 1075|    666|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (126:3): [True: 0, False: 666]
  |  Branch (126:3): [True: 666, False: 0]
  ------------------
  127|    666|  if(n) {
  ------------------
  |  Branch (127:6): [True: 666, False: 0]
  ------------------
  128|    666|    n = CURLMIN(n, amount);
  ------------------
  |  | 1288|    666|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1288:24): [True: 0, False: 666]
  |  |  ------------------
  ------------------
  129|    666|    chunk->r_offset += n;
  130|    666|    if(chunk->r_offset == chunk->w_offset)
  ------------------
  |  Branch (130:8): [True: 666, False: 0]
  ------------------
  131|    666|      chunk->r_offset = chunk->w_offset = 0;
  132|    666|  }
  133|    666|  return n;
  134|    666|}
bufq.c:chunk_slurpn:
   87|    773|{
   88|    773|  uint8_t *p = &chunk->x.data[chunk->w_offset];
   89|    773|  size_t n = chunk->dlen - chunk->w_offset; /* free amount */
   90|    773|  CURLcode result;
   91|       |
   92|    773|  *pnread = 0;
   93|    773|  DEBUGASSERT(chunk->dlen >= chunk->w_offset);
  ------------------
  |  | 1075|    773|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (93:3): [True: 0, False: 773]
  |  Branch (93:3): [True: 773, False: 0]
  ------------------
   94|    773|  if(!n)
  ------------------
  |  Branch (94:6): [True: 0, False: 773]
  ------------------
   95|      0|    return CURLE_AGAIN;
   96|    773|  if(max_len && n > max_len)
  ------------------
  |  Branch (96:6): [True: 0, False: 773]
  |  Branch (96:17): [True: 0, False: 0]
  ------------------
   97|      0|    n = max_len;
   98|    773|  result = reader(reader_ctx, p, n, pnread);
   99|    773|  if(!result) {
  ------------------
  |  Branch (99:6): [True: 759, False: 14]
  ------------------
  100|    759|    DEBUGASSERT(*pnread <= n);
  ------------------
  |  | 1075|    759|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (100:5): [True: 0, False: 759]
  |  Branch (100:5): [True: 759, False: 0]
  ------------------
  101|    759|    chunk->w_offset += *pnread;
  102|    759|  }
  103|    773|  return result;
  104|    773|}

Curl_bufref_init:
   38|  14.9k|{
   39|  14.9k|  DEBUGASSERT(br);
  ------------------
  |  | 1075|  14.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (39:3): [True: 0, False: 14.9k]
  |  Branch (39:3): [True: 14.9k, False: 0]
  ------------------
   40|  14.9k|  br->dtor = NULL;
   41|  14.9k|  br->ptr = NULL;
   42|  14.9k|  br->len = 0;
   43|       |
   44|  14.9k|#ifdef DEBUGBUILD
   45|  14.9k|  br->signature = SIGNATURE;
  ------------------
  |  |   31|  14.9k|#define SIGNATURE 0x5c48e9b2    /* Random pattern. */
  ------------------
   46|  14.9k|#endif
   47|  14.9k|}
Curl_bufref_free:
   55|  37.2k|{
   56|  37.2k|  DEBUGASSERT(br);
  ------------------
  |  | 1075|  37.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (56:3): [True: 0, False: 37.2k]
  |  Branch (56:3): [True: 37.2k, False: 0]
  ------------------
   57|  37.2k|  DEBUGASSERT(br->signature == SIGNATURE);
  ------------------
  |  | 1075|  37.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (57:3): [True: 0, False: 37.2k]
  |  Branch (57:3): [True: 37.2k, False: 0]
  ------------------
   58|  37.2k|  DEBUGASSERT(br->ptr || !br->len);
  ------------------
  |  | 1075|  37.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (58:3): [True: 37.2k, False: 0]
  |  Branch (58:3): [True: 0, False: 0]
  |  Branch (58:3): [True: 11.1k, False: 26.1k]
  |  Branch (58:3): [True: 26.1k, False: 0]
  ------------------
   59|       |
   60|  37.2k|  if(br->ptr && br->dtor)
  ------------------
  |  Branch (60:6): [True: 11.1k, False: 26.1k]
  |  Branch (60:17): [True: 3.62k, False: 7.51k]
  ------------------
   61|  3.62k|    br->dtor(CURL_UNCONST(br->ptr));
  ------------------
  |  |  856|  3.62k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   62|       |
   63|  37.2k|  br->dtor = NULL;
   64|       |  br->ptr = NULL;
   65|  37.2k|  br->len = 0;
   66|  37.2k|}
Curl_bufref_set:
   74|  11.1k|{
   75|  11.1k|  DEBUGASSERT(ptr || !len);
  ------------------
  |  | 1075|  11.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (75:3): [True: 11.1k, False: 0]
  |  Branch (75:3): [True: 0, False: 0]
  |  Branch (75:3): [True: 11.1k, False: 0]
  |  Branch (75:3): [True: 0, False: 0]
  ------------------
   76|  11.1k|  DEBUGASSERT(len <= CURL_MAX_INPUT_LENGTH);
  ------------------
  |  | 1075|  11.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (76:3): [True: 0, False: 11.1k]
  |  Branch (76:3): [True: 11.1k, False: 0]
  ------------------
   77|       |
   78|  11.1k|  Curl_bufref_free(br);
   79|  11.1k|  br->ptr = (const unsigned char *)ptr;
   80|  11.1k|  br->len = len;
   81|  11.1k|  br->dtor = dtor;
   82|  11.1k|}
Curl_bufref_ptr:
  100|  14.7k|{
  101|  14.7k|  DEBUGASSERT(br);
  ------------------
  |  | 1075|  14.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (101:3): [True: 0, False: 14.7k]
  |  Branch (101:3): [True: 14.7k, False: 0]
  ------------------
  102|  14.7k|  DEBUGASSERT(br->signature == SIGNATURE);
  ------------------
  |  | 1075|  14.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (102:3): [True: 0, False: 14.7k]
  |  Branch (102:3): [True: 14.7k, False: 0]
  ------------------
  103|  14.7k|  DEBUGASSERT(br->ptr || !br->len);
  ------------------
  |  | 1075|  14.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (103:3): [True: 14.7k, False: 0]
  |  Branch (103:3): [True: 0, False: 0]
  |  Branch (103:3): [True: 11.1k, False: 3.56k]
  |  Branch (103:3): [True: 3.56k, False: 0]
  ------------------
  104|       |
  105|  14.7k|  return (const char *)br->ptr;
  106|  14.7k|}

Curl_cf_https_setup:
  797|  3.62k|{
  798|  3.62k|  CURLcode result = CURLE_OK;
  799|       |
  800|  3.62k|  DEBUGASSERT(conn->scheme->protocol == CURLPROTO_HTTPS);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (800:3): [True: 0, False: 3.62k]
  |  Branch (800:3): [True: 3.62k, False: 0]
  ------------------
  801|       |
  802|       |  /* This filter is intended for HTTPS using ALPN and does
  803|       |   * not support HTTPS Eyeballing to a proxy. */
  804|  3.62k|  if((conn->scheme->protocol != CURLPROTO_HTTPS) ||
  ------------------
  |  | 1089|  3.62k|#define CURLPROTO_HTTPS   (1L << 1)
  ------------------
  |  Branch (804:6): [True: 0, False: 3.62k]
  ------------------
  805|  3.62k|#ifndef CURL_DISABLE_PROXY
  806|  3.62k|     conn->bits.origin_is_proxy ||
  ------------------
  |  Branch (806:6): [True: 0, False: 3.62k]
  ------------------
  807|  3.62k|#endif
  808|  3.62k|     !conn->bits.tls_enable_alpn)
  ------------------
  |  Branch (808:6): [True: 0, False: 3.62k]
  ------------------
  809|      0|    goto out;
  810|       |
  811|  3.62k|  result = cf_hc_add(data, destination, conn, sockindex,
  812|  3.62k|                     conn->transport_wanted);
  813|       |
  814|  3.62k|out:
  815|  3.62k|  return result;
  816|  3.62k|}
cf-https-connect.c:cf_hc_destroy:
  716|  3.62k|{
  717|  3.62k|  struct cf_hc_ctx *ctx = cf->ctx;
  718|       |
  719|  3.62k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  720|  3.62k|  cf_hc_ctx_destroy(data, ctx);
  721|  3.62k|}
cf-https-connect.c:cf_hc_ctx_destroy:
  129|  7.25k|{
  130|  7.25k|  if(ctx) {
  ------------------
  |  Branch (130:6): [True: 3.62k, False: 3.62k]
  ------------------
  131|  3.62k|    size_t i;
  132|  7.25k|    for(i = 0; i < ctx->baller_count; ++i)
  ------------------
  |  Branch (132:16): [True: 3.62k, False: 3.62k]
  ------------------
  133|  3.62k|      cf_hc_baller_discard(&ctx->ballers[i], data);
  134|  3.62k|    Curl_peer_unlink(&ctx->destination);
  135|  3.62k|    curlx_free(ctx);
  ------------------
  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  136|  3.62k|  }
  137|  7.25k|}
cf-https-connect.c:cf_hc_baller_discard:
   64|  3.62k|{
   65|  3.62k|  if(b->cf) {
  ------------------
  |  Branch (65:6): [True: 0, False: 3.62k]
  ------------------
   66|      0|    Curl_conn_cf_discard_chain(&b->cf, data);
   67|       |    b->cf = NULL;
   68|      0|  }
   69|  3.62k|}
cf-https-connect.c:cf_hc_connect:
  479|  7.25k|{
  480|  7.25k|  struct cf_hc_ctx *ctx = cf->ctx;
  481|  7.25k|  CURLcode result = CURLE_OK;
  482|       |
  483|  7.25k|  if(cf->connected) {
  ------------------
  |  Branch (483:6): [True: 0, False: 7.25k]
  ------------------
  484|      0|    *done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  485|      0|    return CURLE_OK;
  486|      0|  }
  487|       |
  488|  7.25k|  *done = FALSE;
  ------------------
  |  | 1048|  7.25k|#define FALSE false
  ------------------
  489|       |
  490|  7.25k|  if(!ctx->httpsrr_resolved) {
  ------------------
  |  Branch (490:6): [True: 3.62k, False: 3.62k]
  ------------------
  491|  3.62k|    ctx->httpsrr_resolved = Curl_conn_dns_resolved_https(
  ------------------
  |  |   66|  3.62k|#define Curl_conn_dns_resolved_https(a, b, c)   TRUE
  |  |  ------------------
  |  |  |  | 1045|  3.62k|#define TRUE true
  |  |  ------------------
  ------------------
  492|  3.62k|      data, cf->sockindex, ctx->destination);
  493|  3.62k|#ifdef DEBUGBUILD
  494|  3.62k|    if(!ctx->httpsrr_resolved && getenv("CURL_DBG_AWAIT_HTTPSRR")) {
  ------------------
  |  Branch (494:8): [True: 0, False: 3.62k]
  |  Branch (494:34): [True: 0, False: 0]
  ------------------
  495|      0|      CURL_TRC_CF(data, cf, "awaiting HTTPS-RR");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  496|      0|      return CURLE_OK;
  497|      0|    }
  498|  3.62k|#endif
  499|  3.62k|  }
  500|       |
  501|  7.25k|  switch(ctx->state) {
  ------------------
  |  Branch (501:10): [True: 7.25k, False: 0]
  ------------------
  502|  3.62k|  case CF_HC_RESOLV:
  ------------------
  |  Branch (502:3): [True: 3.62k, False: 3.62k]
  ------------------
  503|  3.62k|    ctx->state = CF_HC_INIT;
  504|  3.62k|    FALLTHROUGH();
  ------------------
  |  |  815|  3.62k|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  505|       |
  506|  3.62k|  case CF_HC_INIT:
  ------------------
  |  Branch (506:3): [True: 0, False: 7.25k]
  ------------------
  507|  3.62k|    DEBUGASSERT(!cf->next);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (507:5): [True: 0, False: 3.62k]
  |  Branch (507:5): [True: 3.62k, False: 0]
  ------------------
  508|  3.62k|    CURL_TRC_CF(data, cf, "connect, init");
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  509|  3.62k|    result = cf_hc_set_baller1(cf, data);
  510|  3.62k|    if(result) {
  ------------------
  |  Branch (510:8): [True: 0, False: 3.62k]
  ------------------
  511|      0|      ctx->result = result;
  512|      0|      ctx->state = CF_HC_FAILURE;
  513|      0|      goto out;
  514|      0|    }
  515|  3.62k|    cf_hc_set_baller2(cf, data);
  516|  3.62k|    ctx->started = *Curl_pgrs_now(data);
  517|  3.62k|    cf_hc_baller_init(&ctx->ballers[0], cf, data);
  518|  3.62k|    if((ctx->baller_count > 1) || !ctx->ballers_complete) {
  ------------------
  |  Branch (518:8): [True: 0, False: 3.62k]
  |  Branch (518:35): [True: 0, False: 3.62k]
  ------------------
  519|      0|      Curl_expire(data, ctx->soft_eyeballs_timeout_ms, EXPIRE_ALPN_EYEBALLS);
  520|      0|    }
  521|  3.62k|    ctx->state = CF_HC_CONNECT;
  522|  3.62k|    FALLTHROUGH();
  ------------------
  |  |  815|  3.62k|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  523|       |
  524|  7.25k|  case CF_HC_CONNECT:
  ------------------
  |  Branch (524:3): [True: 3.62k, False: 3.62k]
  ------------------
  525|  7.25k|    if(!ctx->ballers_complete)
  ------------------
  |  Branch (525:8): [True: 0, False: 7.25k]
  ------------------
  526|      0|      cf_hc_set_baller2(cf, data);
  527|       |
  528|  7.25k|    if(cf_hc_baller_is_connecting(&ctx->ballers[0])) {
  ------------------
  |  Branch (528:8): [True: 7.25k, False: 0]
  ------------------
  529|  7.25k|      result = cf_hc_baller_connect(&ctx->ballers[0], cf, data, done);
  530|  7.25k|      if(!result && *done) {
  ------------------
  |  Branch (530:10): [True: 7.25k, False: 0]
  |  Branch (530:21): [True: 3.62k, False: 3.62k]
  ------------------
  531|  3.62k|        result = baller_connected(cf, data, &ctx->ballers[0]);
  532|  3.62k|        goto out;
  533|  3.62k|      }
  534|  7.25k|    }
  535|       |
  536|  3.62k|    if(time_to_start_baller2(cf, data)) {
  ------------------
  |  Branch (536:8): [True: 0, False: 3.62k]
  ------------------
  537|      0|      cf_hc_baller_init(&ctx->ballers[1], cf, data);
  538|      0|    }
  539|       |
  540|  3.62k|    if(cf_hc_baller_is_connecting(&ctx->ballers[1])) {
  ------------------
  |  Branch (540:8): [True: 0, False: 3.62k]
  ------------------
  541|      0|      result = cf_hc_baller_connect(&ctx->ballers[1], cf, data, done);
  542|      0|      if(!result && *done) {
  ------------------
  |  Branch (542:10): [True: 0, False: 0]
  |  Branch (542:21): [True: 0, False: 0]
  ------------------
  543|      0|        result = baller_connected(cf, data, &ctx->ballers[1]);
  544|      0|        goto out;
  545|      0|      }
  546|      0|    }
  547|       |
  548|  3.62k|    if(ctx->ballers[0].result &&
  ------------------
  |  Branch (548:8): [True: 0, False: 3.62k]
  ------------------
  549|      0|       (ctx->ballers[1].result ||
  ------------------
  |  Branch (549:9): [True: 0, False: 0]
  ------------------
  550|      0|        (ctx->ballers_complete && (ctx->baller_count < 2)))) {
  ------------------
  |  Branch (550:10): [True: 0, False: 0]
  |  Branch (550:35): [True: 0, False: 0]
  ------------------
  551|       |      /* all have failed. we give up */
  552|      0|      CURL_TRC_CF(data, cf, "connect, all attempts failed");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  553|      0|      ctx->result = result = ctx->ballers[0].result;
  554|      0|      ctx->state = CF_HC_FAILURE;
  555|      0|      goto out;
  556|      0|    }
  557|  3.62k|    result = CURLE_OK;
  558|  3.62k|    *done = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  559|  3.62k|    break;
  560|       |
  561|      0|  case CF_HC_FAILURE:
  ------------------
  |  Branch (561:3): [True: 0, False: 7.25k]
  ------------------
  562|      0|    result = ctx->result;
  563|      0|    cf->connected = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  564|      0|    *done = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  565|      0|    break;
  566|       |
  567|      0|  case CF_HC_SUCCESS:
  ------------------
  |  Branch (567:3): [True: 0, False: 7.25k]
  ------------------
  568|      0|    result = CURLE_OK;
  569|      0|    cf->connected = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  570|      0|    *done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  571|      0|    break;
  572|  7.25k|  }
  573|       |
  574|  7.25k|out:
  575|  7.25k|  CURL_TRC_CF(data, cf, "connect -> %d, done=%d", (int)result, *done);
  ------------------
  |  |  153|  7.25k|  do {                                          \
  |  |  154|  7.25k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  7.25k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  14.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 7.25k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 7.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  14.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  7.25k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  7.25k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  576|  7.25k|  return result;
  577|  7.25k|}
cf-https-connect.c:cf_hc_set_baller1:
  389|  3.62k|{
  390|  3.62k|  struct cf_hc_ctx *ctx = cf->ctx;
  391|  3.62k|  enum alpnid alpn1 = ALPN_none;
  392|  3.62k|  VERBOSE(const char *source = "HTTPS-RR");
  ------------------
  |  | 1611|  3.62k|#define VERBOSE(x) x
  ------------------
  393|       |
  394|  3.62k|  DEBUGASSERT(cf->conn->bits.tls_enable_alpn);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (394:3): [True: 0, False: 3.62k]
  |  Branch (394:3): [True: 3.62k, False: 0]
  ------------------
  395|       |
  396|  3.62k|  alpn1 = cf_hc_get_httpsrr_alpn(cf, data, ALPN_none);
  397|  3.62k|  if(alpn1 == ALPN_none) {
  ------------------
  |  Branch (397:6): [True: 3.62k, False: 0]
  ------------------
  398|       |    /* preference is configured and allowed, can we use it? */
  399|  3.62k|    VERBOSE(source = "preferred version");
  ------------------
  |  | 1611|  3.62k|#define VERBOSE(x) x
  ------------------
  400|  3.62k|    alpn1 = cf_hc_get_pref_alpn(cf, data, ALPN_none);
  401|  3.62k|  }
  402|  3.62k|  if(alpn1 == ALPN_none) {
  ------------------
  |  Branch (402:6): [True: 3.62k, False: 0]
  ------------------
  403|  3.62k|    VERBOSE(source = "wanted versions");
  ------------------
  |  | 1611|  3.62k|#define VERBOSE(x) x
  ------------------
  404|  3.62k|    alpn1 = cf_hc_get_first_alpn(cf, data,
  405|  3.62k|                                 data->state.http_neg.wanted,
  406|  3.62k|                                 ALPN_none);
  407|  3.62k|  }
  408|  3.62k|  if(alpn1 == ALPN_none) {
  ------------------
  |  Branch (408:6): [True: 0, False: 3.62k]
  ------------------
  409|      0|    VERBOSE(source = "allowed versions");
  ------------------
  |  | 1611|      0|#define VERBOSE(x) x
  ------------------
  410|      0|    alpn1 = cf_hc_get_first_alpn(cf, data,
  411|      0|                                 data->state.http_neg.allowed,
  412|      0|                                 ALPN_none);
  413|      0|  }
  414|       |
  415|  3.62k|  if(alpn1 == ALPN_none) {
  ------------------
  |  Branch (415:6): [True: 0, False: 3.62k]
  ------------------
  416|       |    /* None of the wanted/allowed HTTP versions could be chosen */
  417|      0|    if(ctx->check_h3_result) {
  ------------------
  |  Branch (417:8): [True: 0, False: 0]
  ------------------
  418|      0|      CURL_TRC_CF(data, cf, "unable to use HTTP/3");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  419|      0|      return ctx->check_h3_result;
  420|      0|    }
  421|      0|    CURL_TRC_CF(data, cf, "unable to select HTTP version");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  422|      0|    return CURLE_FAILED_INIT;
  423|      0|  }
  424|       |
  425|  3.62k|  cf_hc_baller_assign(&ctx->ballers[0], alpn1, ctx->def_transport);
  426|  3.62k|  ctx->baller_count = 1;
  427|  3.62k|  CURL_TRC_CF(data, cf, "1st attempt uses %s from %s",
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  428|  3.62k|              ctx->ballers[0].name, source);
  429|       |
  430|  3.62k|  switch(alpn1) {
  431|     38|  case ALPN_h1:
  ------------------
  |  Branch (431:3): [True: 38, False: 3.59k]
  ------------------
  432|       |    /* We really want h1, switch off h2 to make it disappear in ALPN */
  433|     38|    data->state.http_neg.wanted &= (uint8_t)~CURL_HTTP_V2x;
  ------------------
  |  |   41|     38|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  434|     38|    break;
  435|  3.59k|  default:
  ------------------
  |  Branch (435:3): [True: 3.59k, False: 38]
  ------------------
  436|  3.59k|    break;
  437|  3.62k|  }
  438|       |
  439|  3.62k|  return CURLE_OK;
  440|  3.62k|}
cf-https-connect.c:cf_hc_get_httpsrr_alpn:
  290|  7.25k|{
  291|       |#ifdef USE_HTTPSRR
  292|       |  struct cf_hc_ctx *ctx = cf->ctx;
  293|       |  /* Is there an HTTPSRR use its ALPNs here.
  294|       |   * We are here after having selected a connection to a host+port and
  295|       |   * can no longer change that. Any HTTPSRR advice for other hosts and ports
  296|       |   * we need to ignore. */
  297|       |  const struct Curl_https_rrinfo *rr;
  298|       |  size_t i;
  299|       |
  300|       |  /* Do we have HTTPS-RR information? */
  301|       |  rr = Curl_conn_dns_get_https(data, cf->sockindex, ctx->destination);
  302|       |
  303|       |  CURL_TRC_CF(data, cf, "HTTPS-RR %savailable", rr ? "" : "not ");
  304|       |  /* We do not support `rr->no_def_alpn`. */
  305|       |  if(Curl_httpsrr_applicable(data, rr) && !rr->no_def_alpn) {
  306|       |    for(i = 0; i < CURL_ARRAYSIZE(rr->alpns); ++i) {
  307|       |      enum alpnid alpn_rr = (enum alpnid)rr->alpns[i];
  308|       |      if(alpn_rr == not_this_one) /* do not want this one */
  309|       |        continue;
  310|       |      switch(alpn_rr) {
  311|       |      case ALPN_h3:
  312|       |        if((data->state.http_neg.allowed & CURL_HTTP_V3x) &&
  313|       |           cf_hc_may_h3(cf, data)) {
  314|       |          return alpn_rr;
  315|       |        }
  316|       |        break;
  317|       |      case ALPN_h2:
  318|       |        if(data->state.http_neg.allowed & CURL_HTTP_V2x) {
  319|       |          return alpn_rr;
  320|       |        }
  321|       |        break;
  322|       |      case ALPN_h1:
  323|       |        if(data->state.http_neg.allowed & CURL_HTTP_V1x) {
  324|       |          return alpn_rr;
  325|       |        }
  326|       |        break;
  327|       |      default: /* ignore */
  328|       |        break;
  329|       |      }
  330|       |    }
  331|       |  }
  332|       |#else
  333|  7.25k|  (void)cf;
  334|  7.25k|  (void)data;
  335|  7.25k|  (void)not_this_one;
  336|  7.25k|#endif
  337|  7.25k|  return ALPN_none;
  338|  7.25k|}
cf-https-connect.c:cf_hc_get_pref_alpn:
  343|  7.25k|{
  344|  7.25k|  if((data->state.http_neg.preferred & data->state.http_neg.allowed)) {
  ------------------
  |  Branch (344:6): [True: 0, False: 7.25k]
  ------------------
  345|      0|    switch(data->state.http_neg.preferred) {
  346|      0|    case CURL_HTTP_V3x:
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  |  Branch (346:5): [True: 0, False: 0]
  ------------------
  347|      0|      if(cf_hc_may_h3(cf, data) && (ALPN_h3 != not_this_one))
  ------------------
  |  Branch (347:10): [True: 0, False: 0]
  |  Branch (347:36): [True: 0, False: 0]
  ------------------
  348|      0|        return ALPN_h3;
  349|      0|      break;
  350|      0|    case CURL_HTTP_V2x:
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (350:5): [True: 0, False: 0]
  ------------------
  351|      0|      if(ALPN_h2 != not_this_one)
  ------------------
  |  Branch (351:10): [True: 0, False: 0]
  ------------------
  352|      0|        return ALPN_h2;
  353|      0|      break;
  354|      0|    case CURL_HTTP_V1x:
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (354:5): [True: 0, False: 0]
  ------------------
  355|       |      /* If we are trying h2 already, h1 is already used as fallback */
  356|      0|      if((ALPN_h1 != not_this_one) && (ALPN_h2 != not_this_one))
  ------------------
  |  Branch (356:10): [True: 0, False: 0]
  |  Branch (356:39): [True: 0, False: 0]
  ------------------
  357|      0|        return ALPN_h1;
  358|      0|      break;
  359|      0|    default:
  ------------------
  |  Branch (359:5): [True: 0, False: 0]
  ------------------
  360|      0|      break;
  361|      0|    }
  362|      0|  }
  363|  7.25k|  return ALPN_none;
  364|  7.25k|}
cf-https-connect.c:cf_hc_get_first_alpn:
  370|  7.25k|{
  371|       |  /* When told to not try h2, we also do not try h1 and vice versa */
  372|  7.25k|  bool allow_h1_or_h2 = (not_this_one != ALPN_h1) &&
  ------------------
  |  Branch (372:25): [True: 7.22k, False: 38]
  ------------------
  373|  7.22k|                        (not_this_one != ALPN_h2);
  ------------------
  |  Branch (373:25): [True: 3.62k, False: 3.59k]
  ------------------
  374|  7.25k|  if((ALPN_h3 != not_this_one) && (choices & CURL_HTTP_V3x) &&
  ------------------
  |  |   42|  7.25k|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  |  Branch (374:6): [True: 7.25k, False: 0]
  |  Branch (374:35): [True: 0, False: 7.25k]
  ------------------
  375|      0|     cf_hc_may_h3(cf, data)) {
  ------------------
  |  Branch (375:6): [True: 0, False: 0]
  ------------------
  376|      0|    return ALPN_h3;
  377|      0|  }
  378|  7.25k|  if(allow_h1_or_h2 && (choices & CURL_HTTP_V2x)) {
  ------------------
  |  |   41|  3.62k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (378:6): [True: 3.62k, False: 3.62k]
  |  Branch (378:24): [True: 3.59k, False: 38]
  ------------------
  379|  3.59k|    return ALPN_h2;
  380|  3.59k|  }
  381|  3.66k|  if(allow_h1_or_h2 && (choices & CURL_HTTP_V1x)) {
  ------------------
  |  |   40|     38|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (381:6): [True: 38, False: 3.62k]
  |  Branch (381:24): [True: 38, False: 0]
  ------------------
  382|     38|    return ALPN_h1;
  383|     38|  }
  384|  3.62k|  return ALPN_none;
  385|  3.66k|}
cf-https-connect.c:cf_hc_baller_assign:
  142|  3.62k|{
  143|  3.62k|  b->alpn_id = alpn_id;
  144|  3.62k|  b->transport = def_transport;
  145|  3.62k|  b->cf = NULL;
  146|  3.62k|  b->result = CURLE_OK;
  147|  3.62k|  b->reply_ms = -1;
  148|  3.62k|  b->shutdown = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  149|  3.62k|  switch(b->alpn_id) {
  150|      0|  case ALPN_h3:
  ------------------
  |  Branch (150:3): [True: 0, False: 3.62k]
  ------------------
  151|      0|    b->name = "h3";
  152|      0|    b->transport = TRNSPRT_QUIC;
  ------------------
  |  |  240|      0|#define TRNSPRT_QUIC 5
  ------------------
  153|      0|    break;
  154|  3.59k|  case ALPN_h2:
  ------------------
  |  Branch (154:3): [True: 3.59k, False: 38]
  ------------------
  155|  3.59k|    b->name = "h2";
  156|  3.59k|    break;
  157|     38|  case ALPN_h1:
  ------------------
  |  Branch (157:3): [True: 38, False: 3.59k]
  ------------------
  158|     38|    b->name = "h1";
  159|     38|    break;
  160|      0|  case ALPN_none:
  ------------------
  |  Branch (160:3): [True: 0, False: 3.62k]
  ------------------
  161|      0|    b->name = "no-alpn";
  162|      0|    break;
  163|      0|  default:
  ------------------
  |  Branch (163:3): [True: 0, False: 3.62k]
  ------------------
  164|      0|    b->result = CURLE_FAILED_INIT;
  165|      0|    break;
  166|  3.62k|  }
  167|  3.62k|}
cf-https-connect.c:cf_hc_set_baller2:
  444|  3.62k|{
  445|  3.62k|  struct cf_hc_ctx *ctx = cf->ctx;
  446|  3.62k|  enum alpnid alpn2 = ALPN_none, alpn1 = ctx->ballers[0].alpn_id;
  447|  3.62k|  VERBOSE(const char *source = "HTTPS-RR");
  ------------------
  |  | 1611|  3.62k|#define VERBOSE(x) x
  ------------------
  448|       |
  449|  3.62k|  if(ctx->ballers_complete)
  ------------------
  |  Branch (449:6): [True: 0, False: 3.62k]
  ------------------
  450|      0|    return; /* already done */
  451|  3.62k|  if(!ctx->httpsrr_resolved)
  ------------------
  |  Branch (451:6): [True: 0, False: 3.62k]
  ------------------
  452|      0|    return; /* HTTPS-RR pending */
  453|       |
  454|  3.62k|  alpn2 = cf_hc_get_httpsrr_alpn(cf, data, alpn1);
  455|  3.62k|  if(alpn2 == ALPN_none) {
  ------------------
  |  Branch (455:6): [True: 3.62k, False: 0]
  ------------------
  456|       |    /* preference is configured and allowed, can we use it? */
  457|  3.62k|    VERBOSE(source = "preferred version");
  ------------------
  |  | 1611|  3.62k|#define VERBOSE(x) x
  ------------------
  458|  3.62k|    alpn2 = cf_hc_get_pref_alpn(cf, data, alpn1);
  459|  3.62k|  }
  460|  3.62k|  if(alpn2 == ALPN_none) {
  ------------------
  |  Branch (460:6): [True: 3.62k, False: 0]
  ------------------
  461|  3.62k|    VERBOSE(source = "wanted versions");
  ------------------
  |  | 1611|  3.62k|#define VERBOSE(x) x
  ------------------
  462|  3.62k|    alpn2 = cf_hc_get_first_alpn(cf, data,
  463|  3.62k|                                 data->state.http_neg.wanted,
  464|  3.62k|                                 alpn1);
  465|  3.62k|  }
  466|       |
  467|  3.62k|  if(alpn2 != ALPN_none) {
  ------------------
  |  Branch (467:6): [True: 0, False: 3.62k]
  ------------------
  468|      0|    cf_hc_baller_assign(&ctx->ballers[1], alpn2, ctx->def_transport);
  469|      0|    ctx->baller_count = 2;
  470|      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))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  471|      0|                ctx->ballers[1].name, source);
  472|      0|  }
  473|       |  ctx->ballers_complete = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  474|  3.62k|}
cf-https-connect.c:cf_hc_baller_init:
  172|  3.62k|{
  173|  3.62k|  struct Curl_cfilter *save = cf->next;
  174|       |
  175|  3.62k|  cf->next = NULL;
  176|  3.62k|  b->started = *Curl_pgrs_now(data);
  177|  3.62k|  b->result = Curl_cf_setup_insert_after(cf, data, b->transport,
  178|  3.62k|                                         CURL_CF_SSL_ENABLE);
  ------------------
  |  |  366|  3.62k|#define CURL_CF_SSL_ENABLE   1
  ------------------
  179|  3.62k|  b->cf = cf->next;
  180|  3.62k|  cf->next = save;
  181|  3.62k|}
cf-https-connect.c:cf_hc_baller_is_connecting:
   72|  10.8k|{
   73|  10.8k|  return b->cf && !b->result;
  ------------------
  |  Branch (73:10): [True: 7.25k, False: 3.62k]
  |  Branch (73:19): [True: 7.25k, False: 0]
  ------------------
   74|  10.8k|}
cf-https-connect.c:cf_hc_baller_connect:
  187|  7.25k|{
  188|  7.25k|  struct Curl_cfilter *save = cf->next;
  189|       |
  190|  7.25k|  cf->next = b->cf;
  191|  7.25k|  b->result = Curl_conn_cf_connect(cf->next, data, done);
  192|  7.25k|  b->cf = cf->next; /* it might mutate */
  193|  7.25k|  cf->next = save;
  194|  7.25k|  return b->result;
  195|  7.25k|}
cf-https-connect.c:baller_connected:
  200|  3.62k|{
  201|  3.62k|  struct cf_hc_ctx *ctx = cf->ctx;
  202|       |
  203|       |  /* Make the winner's connection filter out own sub-filter, check, move,
  204|       |   * close all remaining. */
  205|  3.62k|  if(cf->next) {
  ------------------
  |  Branch (205:6): [True: 0, False: 3.62k]
  ------------------
  206|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (206:5): [Folded, False: 0]
  |  Branch (206:5): [Folded, False: 0]
  ------------------
  207|      0|    return CURLE_FAILED_INIT;
  208|      0|  }
  209|  3.62k|  if(!winner->cf) {
  ------------------
  |  Branch (209:6): [True: 0, False: 3.62k]
  ------------------
  210|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (210:5): [Folded, False: 0]
  |  Branch (210:5): [Folded, False: 0]
  ------------------
  211|      0|    return CURLE_FAILED_INIT;
  212|      0|  }
  213|       |
  214|  3.62k|  cf->next = winner->cf;
  215|  3.62k|  winner->cf = NULL;
  216|  3.62k|  ctx->state = CF_HC_SUCCESS;
  217|  3.62k|  cf->connected = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  218|       |
  219|       |  /* ballers may have failf()'d, the winner resets it, so our
  220|       |   * errorbuf is clean again. */
  221|  3.62k|  Curl_reset_fail(data);
  222|       |
  223|  3.62k|#ifdef USE_NGHTTP2
  224|  3.62k|  {
  225|       |    /* For a negotiated HTTP/2 connection insert the h2 filter. */
  226|  3.62k|    const char *alpn = Curl_conn_cf_get_alpn_negotiated(cf->next, data);
  227|  3.62k|    if(alpn && !strcmp("h2", alpn)) {
  ------------------
  |  Branch (227:8): [True: 3.62k, False: 2]
  |  Branch (227:16): [True: 0, False: 3.62k]
  ------------------
  228|      0|      CURLcode result = Curl_http2_switch_at(cf, data);
  229|      0|      if(result) {
  ------------------
  |  Branch (229:10): [True: 0, False: 0]
  ------------------
  230|      0|        ctx->state = CF_HC_FAILURE;
  231|      0|        ctx->result = result;
  232|      0|        return result;
  233|      0|      }
  234|      0|    }
  235|  3.62k|  }
  236|  3.62k|#endif
  237|  3.62k|  return CURLE_OK;
  238|  3.62k|}
cf-https-connect.c:time_to_start_baller2:
  242|  3.62k|{
  243|  3.62k|  struct cf_hc_ctx *ctx = cf->ctx;
  244|  3.62k|  timediff_t elapsed_ms;
  245|       |
  246|  3.62k|  if(ctx->baller_count < 2)
  ------------------
  |  Branch (246:6): [True: 3.62k, False: 0]
  ------------------
  247|  3.62k|    return FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  248|      0|  else if(cf_hc_baller_has_started(&ctx->ballers[1]))
  ------------------
  |  Branch (248:11): [True: 0, False: 0]
  ------------------
  249|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  250|      0|  else if(ctx->ballers[0].result) {
  ------------------
  |  Branch (250:11): [True: 0, False: 0]
  ------------------
  251|      0|    CURL_TRC_CF(data, cf, "%s baller failed, starting %s",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  252|      0|                ctx->ballers[0].name, ctx->ballers[1].name);
  253|      0|    return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  254|      0|  }
  255|       |
  256|      0|  elapsed_ms = curlx_ptimediff_ms(Curl_pgrs_now(data), &ctx->started);
  257|      0|  if(elapsed_ms >= ctx->hard_eyeballs_timeout_ms) {
  ------------------
  |  Branch (257:6): [True: 0, False: 0]
  ------------------
  258|      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))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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|                "starting %s", ctx->ballers[0].name,
  260|      0|                ctx->hard_eyeballs_timeout_ms, ctx->ballers[1].name);
  261|      0|    return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  262|      0|  }
  263|      0|  else if(elapsed_ms >= ctx->soft_eyeballs_timeout_ms) {
  ------------------
  |  Branch (263:11): [True: 0, False: 0]
  ------------------
  264|      0|    if(cf_hc_baller_reply_ms(&ctx->ballers[0], data) < 0) {
  ------------------
  |  Branch (264:8): [True: 0, False: 0]
  ------------------
  265|      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))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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|                  FMT_TIMEDIFF_T "ms, starting %s",
  267|      0|                  ctx->ballers[0].name, ctx->soft_eyeballs_timeout_ms,
  268|      0|                  ctx->ballers[1].name);
  269|      0|      return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  270|      0|    }
  271|      0|  }
  272|      0|  return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  273|      0|}
cf-https-connect.c:cf_hc_cntrl:
  684|  7.25k|{
  685|  7.25k|  struct cf_hc_ctx *ctx = cf->ctx;
  686|  7.25k|  CURLcode result = CURLE_OK;
  687|  7.25k|  size_t i;
  688|       |
  689|  7.25k|  if(!cf->connected) {
  ------------------
  |  Branch (689:6): [True: 0, False: 7.25k]
  ------------------
  690|      0|    switch(event) {
  691|      0|    case CF_CTRL_REPORT_STATS:
  ------------------
  |  |  124|      0|#define CF_CTRL_REPORT_STATS     (256 + 3) /* 0          NULL     ignored */
  ------------------
  |  Branch (691:5): [True: 0, False: 0]
  ------------------
  692|      0|      for(i = 0; i < ctx->baller_count; i++) {
  ------------------
  |  Branch (692:18): [True: 0, False: 0]
  ------------------
  693|       |        /* Make the first baller that connected at network level report */
  694|      0|        if(Curl_conn_cf_is_ip_connected(ctx->ballers[i].cf, data)) {
  ------------------
  |  Branch (694:12): [True: 0, False: 0]
  ------------------
  695|      0|          Curl_conn_cf_cntrl(ctx->ballers[i].cf, data, TRUE,
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  696|      0|                             event, arg1, arg2);
  697|      0|          break;
  698|      0|        }
  699|      0|      }
  700|      0|      break;
  701|      0|    default:
  ------------------
  |  Branch (701:5): [True: 0, False: 0]
  ------------------
  702|      0|      for(i = 0; i < ctx->baller_count; i++) {
  ------------------
  |  Branch (702:18): [True: 0, False: 0]
  ------------------
  703|      0|        result = cf_hc_baller_cntrl(&ctx->ballers[i], data, event, arg1, arg2);
  704|      0|        if(result && (result != CURLE_AGAIN))
  ------------------
  |  Branch (704:12): [True: 0, False: 0]
  |  Branch (704:22): [True: 0, False: 0]
  ------------------
  705|      0|          goto out;
  706|      0|      }
  707|      0|      result = CURLE_OK;
  708|      0|      break;
  709|      0|    }
  710|      0|  }
  711|  7.25k|out:
  712|  7.25k|  return result;
  713|  7.25k|}
cf-https-connect.c:cf_hc_query:
  658|  7.25k|{
  659|  7.25k|  struct cf_hc_ctx *ctx = cf->ctx;
  660|  7.25k|  size_t i;
  661|       |
  662|  7.25k|  if(!cf->connected) {
  ------------------
  |  Branch (662:6): [True: 7.25k, False: 0]
  ------------------
  663|  7.25k|    switch(query) {
  664|  7.25k|    case CF_QUERY_NEED_FLUSH: {
  ------------------
  |  |  172|  7.25k|#define CF_QUERY_NEED_FLUSH         7  /* TRUE/FALSE - */
  ------------------
  |  Branch (664:5): [True: 7.25k, False: 0]
  ------------------
  665|  10.8k|      for(i = 0; i < ctx->baller_count; i++)
  ------------------
  |  Branch (665:18): [True: 3.62k, False: 7.25k]
  ------------------
  666|  3.62k|        if(cf_hc_baller_needs_flush(&ctx->ballers[i], data)) {
  ------------------
  |  Branch (666:12): [True: 0, False: 3.62k]
  ------------------
  667|      0|          *pres1 = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  668|      0|          return CURLE_OK;
  669|      0|        }
  670|  7.25k|      break;
  671|  7.25k|    }
  672|  7.25k|    default:
  ------------------
  |  Branch (672:5): [True: 0, False: 7.25k]
  ------------------
  673|      0|      break;
  674|  7.25k|    }
  675|  7.25k|  }
  676|  7.25k|  return cf->next ?
  ------------------
  |  Branch (676:10): [True: 0, False: 7.25k]
  ------------------
  677|      0|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
  678|  7.25k|    CURLE_UNKNOWN_OPTION;
  679|  7.25k|}
cf-https-connect.c:cf_hc_baller_needs_flush:
   98|  3.62k|{
   99|  3.62k|  return b->cf && !b->result && Curl_conn_cf_needs_flush(b->cf, data);
  ------------------
  |  Branch (99:10): [True: 3.62k, False: 0]
  |  Branch (99:19): [True: 3.62k, False: 0]
  |  Branch (99:33): [True: 0, False: 3.62k]
  ------------------
  100|  3.62k|}
cf-https-connect.c:cf_hc_add:
  775|  3.62k|{
  776|  3.62k|  struct Curl_cfilter *cf;
  777|  3.62k|  CURLcode result = CURLE_OK;
  778|       |
  779|  3.62k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (779:3): [True: 0, False: 3.62k]
  |  Branch (779:3): [True: 3.62k, False: 0]
  ------------------
  780|  3.62k|  result = cf_hc_create(&cf, data, destination, def_transport);
  781|  3.62k|  if(result)
  ------------------
  |  Branch (781:6): [True: 0, False: 3.62k]
  ------------------
  782|      0|    goto out;
  783|  3.62k|  Curl_conn_cf_add(data, conn, sockindex, cf);
  784|       |
  785|       |#ifdef USE_HTTPSRR
  786|       |  result = Curl_conn_dns_add_https_resolve(data, cf->conn, cf->sockindex,
  787|       |                                           destination);
  788|       |#endif
  789|  3.62k|out:
  790|  3.62k|  return result;
  791|  3.62k|}
cf-https-connect.c:cf_hc_create:
  744|  3.62k|{
  745|  3.62k|  struct Curl_cfilter *cf = NULL;
  746|  3.62k|  struct cf_hc_ctx *ctx;
  747|  3.62k|  CURLcode result = CURLE_OK;
  748|       |
  749|  3.62k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1473|  3.62k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  750|  3.62k|  if(!ctx) {
  ------------------
  |  Branch (750:6): [True: 0, False: 3.62k]
  ------------------
  751|      0|    result = CURLE_OUT_OF_MEMORY;
  752|      0|    goto out;
  753|      0|  }
  754|  3.62k|  Curl_peer_link(&ctx->destination, destination);
  755|  3.62k|  ctx->def_transport = def_transport;
  756|  3.62k|  ctx->hard_eyeballs_timeout_ms = data->set.happy_eyeballs_timeout;
  757|  3.62k|  ctx->soft_eyeballs_timeout_ms = data->set.happy_eyeballs_timeout / 2;
  758|       |
  759|  3.62k|  result = Curl_cf_create(&cf, &Curl_cft_http_connect, ctx);
  760|  3.62k|  if(result)
  ------------------
  |  Branch (760:6): [True: 0, False: 3.62k]
  ------------------
  761|      0|    goto out;
  762|  3.62k|  ctx = NULL;
  763|       |
  764|  3.62k|out:
  765|  3.62k|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (765:10): [True: 0, False: 3.62k]
  ------------------
  766|  3.62k|  cf_hc_ctx_destroy(data, ctx);
  767|  3.62k|  return result;
  768|  3.62k|}

Curl_cf_ip_happy_insert_after:
 1009|  3.62k|{
 1010|  3.62k|  struct Curl_cfilter *cf;
 1011|  3.62k|  CURLcode result;
 1012|       |
 1013|       |  /* Need to be first */
 1014|  3.62k|  DEBUGASSERT(cf_at);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1014:3): [True: 0, False: 3.62k]
  |  Branch (1014:3): [True: 3.62k, False: 0]
  ------------------
 1015|  3.62k|  result = cf_ip_happy_create(&cf, data, origin, peer, transport_peer,
 1016|  3.62k|                              cf_at->conn, tunnel_peer, tunnel_transport);
 1017|  3.62k|  if(result)
  ------------------
  |  Branch (1017:6): [True: 0, False: 3.62k]
  ------------------
 1018|      0|    return result;
 1019|       |
 1020|  3.62k|  Curl_conn_cf_insert_after(cf_at, cf);
 1021|  3.62k|  return CURLE_OK;
 1022|  3.62k|}
cf-ip-happy.c:cf_ip_happy_destroy:
  937|  3.62k|{
  938|  3.62k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  939|       |
  940|  3.62k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  941|  3.62k|  if(ctx) {
  ------------------
  |  Branch (941:6): [True: 3.62k, False: 0]
  ------------------
  942|  3.62k|    cf_ip_happy_ctx_clear(ctx, data);
  943|  3.62k|    cf_ip_happy_ctx_destroy(ctx, data);
  944|  3.62k|  }
  945|  3.62k|}
cf-ip-happy.c:cf_ip_happy_ctx_clear:
  772|  10.8k|{
  773|  10.8k|  DEBUGASSERT(ctx);
  ------------------
  |  | 1075|  10.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (773:3): [True: 0, False: 10.8k]
  |  Branch (773:3): [True: 10.8k, False: 0]
  ------------------
  774|  10.8k|  if(ctx)
  ------------------
  |  Branch (774:6): [True: 10.8k, False: 0]
  ------------------
  775|  10.8k|    cf_ip_ballers_clear(data, &ctx->ballers);
  776|  10.8k|}
cf-ip-happy.c:cf_ip_ballers_clear:
  321|  10.8k|{
  322|  10.8k|  while(bs->running) {
  ------------------
  |  Branch (322:9): [True: 0, False: 10.8k]
  ------------------
  323|      0|    struct cf_ip_attempt *a = bs->running;
  324|      0|    bs->running = a->next;
  325|      0|    cf_ip_attempt_free(a, data);
  326|      0|  }
  327|  10.8k|  cf_ip_attempt_free(bs->winner, data);
  328|       |  bs->winner = NULL;
  329|  10.8k|  Curl_peer_unlink(&bs->origin);
  330|  10.8k|  Curl_peer_unlink(&bs->peer);
  331|  10.8k|  Curl_peer_unlink(&bs->tunnel_peer);
  332|  10.8k|}
cf-ip-happy.c:cf_ip_attempt_free:
  182|  10.8k|{
  183|  10.8k|  if(a) {
  ------------------
  |  Branch (183:6): [True: 3.62k, False: 7.25k]
  ------------------
  184|  3.62k|    if(a->cf)
  ------------------
  |  Branch (184:8): [True: 0, False: 3.62k]
  ------------------
  185|      0|      Curl_conn_cf_discard_chain(&a->cf, data);
  186|  3.62k|    Curl_peer_unlink(&a->origin);
  187|  3.62k|    Curl_peer_unlink(&a->peer);
  188|  3.62k|    Curl_peer_unlink(&a->tunnel_peer);
  189|  3.62k|    curlx_free(a);
  ------------------
  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  190|  3.62k|  }
  191|  10.8k|}
cf-ip-happy.c:cf_ip_happy_ctx_destroy:
  780|  3.62k|{
  781|  3.62k|  if(ctx) {
  ------------------
  |  Branch (781:6): [True: 3.62k, False: 0]
  ------------------
  782|  3.62k|    cf_ip_happy_ctx_clear(ctx, data);
  783|  3.62k|    curlx_free(ctx);
  ------------------
  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  784|  3.62k|  }
  785|  3.62k|}
cf-ip-happy.c:cf_ip_happy_connect:
  823|  3.62k|{
  824|  3.62k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  825|  3.62k|  CURLcode result = CURLE_OK;
  826|       |
  827|       |  /* -Werror=null-dereference finds false positives suddenly. */
  828|  3.62k|  if(!data)
  ------------------
  |  Branch (828:6): [True: 0, False: 3.62k]
  ------------------
  829|      0|    return CURLE_FAILED_INIT;
  830|       |
  831|  3.62k|  if(cf->connected) {
  ------------------
  |  Branch (831:6): [True: 0, False: 3.62k]
  ------------------
  832|      0|    *done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  833|      0|    return CURLE_OK;
  834|      0|  }
  835|       |
  836|  3.62k|  DEBUGASSERT(ctx);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (836:3): [True: 0, False: 3.62k]
  |  Branch (836:3): [True: 3.62k, False: 0]
  ------------------
  837|  3.62k|  *done = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  838|       |
  839|  3.62k|  if(!ctx->dns_resolved) {
  ------------------
  |  Branch (839:6): [True: 3.62k, False: 0]
  ------------------
  840|  3.62k|    result = Curl_conn_dns_addr_result(cf->conn, cf->sockindex,
  841|  3.62k|                                       ctx->ballers.peer);
  842|  3.62k|    if(!result)
  ------------------
  |  Branch (842:8): [True: 3.62k, False: 0]
  ------------------
  843|  3.62k|      ctx->dns_resolved = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  844|      0|    else if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (844:13): [True: 0, False: 0]
  ------------------
  845|      0|      result = CURLE_OK;
  846|      0|    }
  847|      0|    else /* real error */
  848|      0|      goto out;
  849|  3.62k|  }
  850|       |
  851|  3.62k|  switch(ctx->state) {
  ------------------
  |  Branch (851:10): [True: 3.62k, False: 0]
  ------------------
  852|  3.62k|  case SCFST_INIT:
  ------------------
  |  Branch (852:3): [True: 3.62k, False: 0]
  ------------------
  853|  3.62k|    DEBUGASSERT(CURL_SOCKET_BAD == Curl_conn_cf_get_socket(cf, data));
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (853:5): [True: 0, False: 3.62k]
  |  Branch (853:5): [True: 3.62k, False: 0]
  ------------------
  854|  3.62k|    DEBUGASSERT(!cf->connected);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (854:5): [True: 0, False: 3.62k]
  |  Branch (854:5): [True: 3.62k, False: 0]
  ------------------
  855|  3.62k|    result = cf_ip_happy_init(cf, data);
  856|  3.62k|    if(result)
  ------------------
  |  Branch (856:8): [True: 0, False: 3.62k]
  ------------------
  857|      0|      goto out;
  858|  3.62k|    ctx->state = SCFST_WAITING;
  859|  3.62k|    FALLTHROUGH();
  ------------------
  |  |  815|  3.62k|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  860|  3.62k|  case SCFST_WAITING:
  ------------------
  |  Branch (860:3): [True: 0, False: 3.62k]
  ------------------
  861|  3.62k|    result = is_connected(cf, data, done);
  862|  3.62k|    if(!result && *done) {
  ------------------
  |  Branch (862:8): [True: 3.62k, False: 0]
  |  Branch (862:19): [True: 3.62k, False: 0]
  ------------------
  863|  3.62k|      DEBUGASSERT(ctx->ballers.winner);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (863:7): [True: 0, False: 3.62k]
  |  Branch (863:7): [True: 3.62k, False: 0]
  ------------------
  864|  3.62k|      DEBUGASSERT(ctx->ballers.winner->cf);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (864:7): [True: 0, False: 3.62k]
  |  Branch (864:7): [True: 3.62k, False: 0]
  ------------------
  865|  3.62k|      DEBUGASSERT(ctx->ballers.winner->cf->connected);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (865:7): [True: 0, False: 3.62k]
  |  Branch (865:7): [True: 3.62k, False: 0]
  ------------------
  866|       |      /* we have a winner. Install and activate it.
  867|       |       * close/free all others. */
  868|  3.62k|      ctx->state = SCFST_DONE;
  869|  3.62k|      cf->connected = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  870|  3.62k|      cf->next = ctx->ballers.winner->cf;
  871|  3.62k|      ctx->ballers.winner->cf = NULL;
  872|       |
  873|  3.62k|      if(cf->conn->scheme->protocol & PROTO_FAMILY_SSH)
  ------------------
  |  |   90|  3.62k|#define PROTO_FAMILY_SSH  (CURLPROTO_SCP | CURLPROTO_SFTP)
  |  |  ------------------
  |  |  |  | 1092|  3.62k|#define CURLPROTO_SCP     (1L << 4)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_SSH  (CURLPROTO_SCP | CURLPROTO_SFTP)
  |  |  ------------------
  |  |  |  | 1093|  3.62k|#define CURLPROTO_SFTP    (1L << 5)
  |  |  ------------------
  ------------------
  |  Branch (873:10): [True: 0, False: 3.62k]
  ------------------
  874|      0|        Curl_pgrsTime(data, TIMER_APPCONNECT); /* we are connected already */
  875|  3.62k|#ifdef CURLVERBOSE
  876|  3.62k|      if(Curl_trc_cf_is_verbose(cf, data)) {
  ------------------
  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  ------------------
  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  ------------------
  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  877|      0|        struct ip_quadruple ipquad;
  878|      0|        bool is_ipv6;
  879|      0|        if(!Curl_conn_cf_get_ip_info(cf->next, data, &is_ipv6, &ipquad)) {
  ------------------
  |  Branch (879:12): [True: 0, False: 0]
  ------------------
  880|      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))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  881|      0|                      ctx->ballers.peer->hostname,
  882|      0|                      ipquad.remote_ip, ipquad.remote_port);
  883|      0|        }
  884|      0|      }
  885|  3.62k|#endif
  886|  3.62k|      cf_ip_happy_ctx_clear(ctx, data);
  887|  3.62k|      Curl_expire_clear(data, EXPIRE_HAPPY_EYEBALLS);
  888|       |      /* whatever errors were reported by ballers, clear our errorbuf */
  889|  3.62k|      Curl_reset_fail(data);
  890|  3.62k|      data->info.numconnects++; /* to track the # of connections made */
  891|  3.62k|    }
  892|  3.62k|    break;
  893|  3.62k|  case SCFST_DONE:
  ------------------
  |  Branch (893:3): [True: 0, False: 3.62k]
  ------------------
  894|      0|    *done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  895|      0|    break;
  896|  3.62k|  }
  897|  3.62k|out:
  898|  3.62k|  return result;
  899|  3.62k|}
cf-ip-happy.c:cf_ip_happy_init:
  741|  3.62k|{
  742|  3.62k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  743|       |
  744|  3.62k|  if(Curl_timeleft_ms(data) < 0) {
  ------------------
  |  Branch (744:6): [True: 0, False: 3.62k]
  ------------------
  745|       |    /* a precaution, no need to continue if time already is up */
  746|      0|    failf(data, "Connection time-out");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  747|      0|    return CURLE_OPERATION_TIMEDOUT;
  748|      0|  }
  749|       |
  750|  3.62k|  if(ctx->ballers.transport_peer == TRNSPRT_UNIX) {
  ------------------
  |  |  241|  3.62k|#define TRNSPRT_UNIX 6
  ------------------
  |  Branch (750:6): [True: 0, False: 3.62k]
  ------------------
  751|      0|#ifdef USE_UNIX_SOCKETS
  752|      0|    cf_ai_iter_init(&ctx->ballers.addr_iter, cf, ctx->ballers.peer, AF_UNIX);
  753|       |#else
  754|       |    return CURLE_UNSUPPORTED_PROTOCOL;
  755|       |#endif
  756|      0|  }
  757|  3.62k|  else { /* TCP/UDP/QUIC */
  758|  3.62k|#ifdef USE_IPV6
  759|  3.62k|    cf_ai_iter_init(&ctx->ballers.ipv6_iter, cf, ctx->ballers.peer, AF_INET6);
  760|  3.62k|#endif
  761|  3.62k|    cf_ai_iter_init(&ctx->ballers.addr_iter, cf, ctx->ballers.peer, AF_INET);
  762|  3.62k|  }
  763|       |
  764|  3.62k|  CURL_TRC_CF(data, cf, "init ip ballers for transport %u",
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  765|  3.62k|              ctx->ballers.transport_peer);
  766|  3.62k|  ctx->started = *Curl_pgrs_now(data);
  767|  3.62k|  return CURLE_OK;
  768|  3.62k|}
cf-ip-happy.c:cf_ai_iter_init:
  130|  7.25k|{
  131|  7.25k|  iter->cf = cf;
  132|  7.25k|  iter->peer = peer; /* not linked, ctx->ballers owns and has same lifetime */
  133|  7.25k|  iter->ai_family = ai_family;
  134|  7.25k|  iter->n = 0;
  135|  7.25k|}
cf-ip-happy.c:is_connected:
  681|  3.62k|{
  682|  3.62k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  683|  3.62k|  struct connectdata *conn = cf->conn;
  684|  3.62k|  CURLcode result;
  685|       |
  686|  3.62k|  result = cf_ip_ballers_run(&ctx->ballers, cf, data,
  687|  3.62k|                             (bool)ctx->dns_resolved, connected);
  688|       |
  689|  3.62k|  if(!result)
  ------------------
  |  Branch (689:6): [True: 3.62k, False: 0]
  ------------------
  690|  3.62k|    return CURLE_OK;
  691|      0|  else {
  692|      0|    struct Curl_peer *peer = NULL, *proxy_peer = NULL;
  693|      0|    char viamsg[160];
  694|       |
  695|      0|    peer = Curl_conn_get_first_peer(conn, cf->sockindex);
  696|      0|    if(!conn->origin || !peer)
  ------------------
  |  Branch (696:8): [True: 0, False: 0]
  |  Branch (696:25): [True: 0, False: 0]
  ------------------
  697|      0|      return CURLE_FAILED_INIT;
  698|       |
  699|      0|#ifndef CURL_DISABLE_PROXY
  700|      0|    if(conn->socks_proxy.peer)
  ------------------
  |  Branch (700:8): [True: 0, False: 0]
  ------------------
  701|      0|      proxy_peer = conn->socks_proxy.peer;
  702|      0|    else if(conn->http_proxy.peer)
  ------------------
  |  Branch (702:13): [True: 0, False: 0]
  ------------------
  703|      0|      proxy_peer = conn->http_proxy.peer;
  704|      0|#endif
  705|       |
  706|      0|    viamsg[0] = 0;
  707|      0|    if(!Curl_peer_equal(peer, conn->origin) &&
  ------------------
  |  Branch (707:8): [True: 0, False: 0]
  ------------------
  708|      0|       !Curl_peer_equal(peer, proxy_peer)) {
  ------------------
  |  Branch (708:8): [True: 0, False: 0]
  ------------------
  709|      0|#ifdef USE_UNIX_SOCKETS
  710|      0|      if(peer->unix_socket)
  ------------------
  |  Branch (710:10): [True: 0, False: 0]
  ------------------
  711|      0|        curl_msnprintf(viamsg, sizeof(viamsg), " over unix://%s",
  712|      0|                       peer->hostname);
  713|      0|      else
  714|      0|#endif
  715|      0|      curl_msnprintf(viamsg, sizeof(viamsg), " via %s:%u",
  716|      0|                     peer->hostname, peer->port);
  717|      0|    }
  718|       |
  719|      0|    failf(data, "Failed to connect to %s:%u%s %s%s%safter "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  720|      0|          "%" FMT_TIMEDIFF_T " ms: %s",
  721|      0|          conn->origin->hostname, conn->origin->port, viamsg,
  722|      0|          proxy_peer ? "over proxy " : "",
  ------------------
  |  Branch (722:11): [True: 0, False: 0]
  ------------------
  723|      0|          proxy_peer ? proxy_peer->hostname : "",
  ------------------
  |  Branch (723:11): [True: 0, False: 0]
  ------------------
  724|      0|          proxy_peer ? " " : "",
  ------------------
  |  Branch (724:11): [True: 0, False: 0]
  ------------------
  725|      0|          Curl_pgrs_since_ms(data, NULL, TIMER_STARTSINGLE),
  726|      0|          curl_easy_strerror(result));
  727|       |
  728|      0|#ifdef SOCKETIMEDOUT
  729|      0|    if(SOCKETIMEDOUT == data->state.os_errno)
  ------------------
  |  | 1129|      0|#define SOCKETIMEDOUT     ETIMEDOUT
  ------------------
  |  Branch (729:8): [True: 0, False: 0]
  ------------------
  730|      0|      result = CURLE_OPERATION_TIMEDOUT;
  731|      0|#endif
  732|       |
  733|      0|    return result;
  734|      0|  }
  735|  3.62k|}
cf-ip-happy.c:cf_ip_ballers_run:
  396|  3.62k|{
  397|  3.62k|  CURLcode result = CURLE_OK;
  398|  3.62k|  struct cf_ip_attempt *a = NULL, **panchor;
  399|  3.62k|  bool do_more;
  400|  3.62k|  timediff_t next_expire_ms;
  401|  3.62k|  uint32_t inconclusive, ongoing;
  402|  3.62k|  VERBOSE(int i);
  ------------------
  |  | 1611|  3.62k|#define VERBOSE(x) x
  ------------------
  403|       |
  404|  3.62k|  if(bs->winner)
  ------------------
  |  Branch (404:6): [True: 0, False: 3.62k]
  ------------------
  405|      0|    return CURLE_OK;
  406|       |
  407|  7.25k|evaluate:
  408|  7.25k|  ongoing = inconclusive = 0;
  409|       |
  410|       |  /* check if a running baller connects now */
  411|  7.25k|  VERBOSE(i = -1);
  ------------------
  |  | 1611|  7.25k|#define VERBOSE(x) x
  ------------------
  412|  7.25k|  for(panchor = &bs->running; *panchor; panchor = &(*panchor)->next) {
  ------------------
  |  Branch (412:31): [True: 3.62k, False: 3.62k]
  ------------------
  413|  3.62k|    VERBOSE(++i);
  ------------------
  |  | 1611|  3.62k|#define VERBOSE(x) x
  ------------------
  414|  3.62k|    a = *panchor;
  415|  3.62k|    a->result = cf_ip_attempt_connect(a, data, connected);
  416|  3.62k|    if(!a->result) {
  ------------------
  |  Branch (416:8): [True: 3.62k, False: 0]
  ------------------
  417|  3.62k|      if(*connected) {
  ------------------
  |  Branch (417:10): [True: 3.62k, False: 0]
  ------------------
  418|       |        /* connected, declare the winner, remove from running,
  419|       |         * clear remaining running list. */
  420|  3.62k|        CURL_TRC_CF(data, cf, "connect attempt #%d successful", i);
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  421|  3.62k|        bs->winner = a;
  422|  3.62k|        *panchor = a->next;
  423|  3.62k|        a->next = NULL;
  424|  3.62k|        while(bs->running) {
  ------------------
  |  Branch (424:15): [True: 0, False: 3.62k]
  ------------------
  425|      0|          a = bs->running;
  426|      0|          bs->running = a->next;
  427|      0|          cf_ip_attempt_free(a, data);
  428|      0|        }
  429|  3.62k|        return CURLE_OK;
  430|  3.62k|      }
  431|       |      /* still running */
  432|      0|      ++ongoing;
  433|      0|    }
  434|      0|    else if(a->inconclusive) /* failed, but inconclusive */
  ------------------
  |  Branch (434:13): [True: 0, False: 0]
  ------------------
  435|      0|      ++inconclusive;
  436|  3.62k|  }
  437|  3.62k|  if(bs->running)
  ------------------
  |  Branch (437:6): [True: 0, False: 3.62k]
  ------------------
  438|      0|    CURL_TRC_CF(data, cf, "checked connect attempts: "
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  439|  3.62k|                "%u ongoing, %u inconclusive", ongoing, inconclusive);
  440|       |
  441|       |  /* no attempt connected yet, start another one? */
  442|  3.62k|  if(!ongoing) {
  ------------------
  |  Branch (442:6): [True: 3.62k, False: 0]
  ------------------
  443|  3.62k|    if(!bs->started.tv_sec && !bs->started.tv_usec)
  ------------------
  |  Branch (443:8): [True: 3.62k, False: 0]
  |  Branch (443:31): [True: 3.62k, False: 0]
  ------------------
  444|  3.62k|      bs->started = *Curl_pgrs_now(data);
  445|  3.62k|    do_more = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  446|  3.62k|  }
  447|      0|  else {
  448|      0|    bool more_possible = cf_ai_iter_has_more(&bs->addr_iter, data);
  449|      0|#ifdef USE_IPV6
  450|      0|    if(!more_possible)
  ------------------
  |  Branch (450:8): [True: 0, False: 0]
  ------------------
  451|      0|      more_possible = cf_ai_iter_has_more(&bs->ipv6_iter, data);
  452|      0|#endif
  453|      0|    do_more = more_possible &&
  ------------------
  |  Branch (453:15): [True: 0, False: 0]
  ------------------
  454|      0|      (curlx_ptimediff_ms(Curl_pgrs_now(data), &bs->last_attempt_started) >=
  ------------------
  |  Branch (454:7): [True: 0, False: 0]
  ------------------
  455|      0|       bs->attempt_delay_ms);
  456|      0|    if(do_more)
  ------------------
  |  Branch (456:8): [True: 0, False: 0]
  ------------------
  457|      0|      CURL_TRC_CF(data, cf, "happy eyeballs timeout expired, "
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  458|      0|                  "start next attempt");
  459|      0|  }
  460|       |
  461|  3.62k|  if(do_more) {
  ------------------
  |  Branch (461:6): [True: 3.62k, False: 0]
  ------------------
  462|       |    /* start the next attempt if there is another ip address to try.
  463|       |     * Alternate between address families when possible. */
  464|  3.62k|    const struct Curl_addrinfo *ai = NULL;
  465|  3.62k|    int ai_family = 0;
  466|  3.62k|    CURL_TRC_CF(data, cf, "want to do more");
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  467|  3.62k|#ifdef USE_IPV6
  468|  3.62k|    if((bs->last_attempt_ai_family == AF_INET) ||
  ------------------
  |  Branch (468:8): [True: 3.62k, False: 0]
  ------------------
  469|  3.62k|       !cf_ai_iter_has_more(&bs->addr_iter, data)) {
  ------------------
  |  Branch (469:8): [True: 0, False: 0]
  ------------------
  470|  3.62k|      ai = cf_ai_iter_next(&bs->ipv6_iter, data);
  471|  3.62k|      ai_family = bs->ipv6_iter.ai_family;
  472|  3.62k|      CURL_TRC_CF(data, cf, "check for next AAAA address: %s",
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  473|  3.62k|                  ai ? "found" : "none");
  474|  3.62k|    }
  475|  3.62k|#endif
  476|  3.62k|    if(!ai) {
  ------------------
  |  Branch (476:8): [True: 3.62k, False: 0]
  ------------------
  477|  3.62k|      ai = cf_ai_iter_next(&bs->addr_iter, data);
  478|  3.62k|      ai_family = bs->addr_iter.ai_family;
  479|  3.62k|      CURL_TRC_CF(data, cf, "check for next A address: %s",
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  480|  3.62k|                  ai ? "found" : "none");
  481|  3.62k|    }
  482|       |    /* We are (re-)starting attempts. We are not interested in
  483|       |     * keeping old failure information. The new attempt will either
  484|       |     * succeed or persist new failure. */
  485|  3.62k|    Curl_reset_fail(data);
  486|       |
  487|  3.62k|    if(ai) {  /* try another address */
  ------------------
  |  Branch (487:8): [True: 3.62k, False: 0]
  ------------------
  488|  3.62k|      struct Curl_sockaddr_ex addr;
  489|       |
  490|       |      /* Discard oldest to make room for new attempt */
  491|  3.62k|      if(bs->max_concurrent)
  ------------------
  |  Branch (491:10): [True: 3.62k, False: 0]
  ------------------
  492|  3.62k|        cf_ip_ballers_prune(bs, cf, data, bs->max_concurrent - 1);
  493|       |
  494|  3.62k|      result = Curl_socket_addr_from_ai(&addr, ai, bs->transport_peer);
  495|  3.62k|      if(result)
  ------------------
  |  Branch (495:10): [True: 0, False: 3.62k]
  ------------------
  496|      0|        goto out;
  497|       |
  498|  3.62k|      result = cf_ip_attempt_new(&a, data, cf, bs->origin, bs->peer,
  499|  3.62k|                                 bs->transport_peer, &addr, ai_family,
  500|  3.62k|                                 bs->tunnel_peer, bs->tunnel_transport,
  501|  3.62k|                                 bs->cf_create);
  502|  3.62k|      CURL_TRC_CF(data, cf, "starting %s attempt for ipv%s -> %d",
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  503|  3.62k|                  bs->running ? "next" : "first",
  504|  3.62k|                  (ai_family == AF_INET) ? "4" : "6", (int)result);
  505|  3.62k|      if(result)
  ------------------
  |  Branch (505:10): [True: 0, False: 3.62k]
  ------------------
  506|      0|        goto out;
  507|  3.62k|      DEBUGASSERT(a);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (507:7): [True: 0, False: 3.62k]
  |  Branch (507:7): [True: 3.62k, False: 0]
  ------------------
  508|       |
  509|       |      /* append to running list */
  510|  3.62k|      panchor = &bs->running;
  511|  3.62k|      while(*panchor)
  ------------------
  |  Branch (511:13): [True: 0, False: 3.62k]
  ------------------
  512|      0|        panchor = &(*panchor)->next;
  513|  3.62k|      *panchor = a;
  514|  3.62k|      bs->last_attempt_started = *Curl_pgrs_now(data);
  515|  3.62k|      bs->last_attempt_ai_family = ai_family;
  516|       |      /* and run everything again */
  517|  3.62k|      goto evaluate;
  518|  3.62k|    }
  519|      0|    else if(inconclusive) {
  ------------------
  |  Branch (519:13): [True: 0, False: 0]
  ------------------
  520|       |      /* tried all addresses, no success but some where inconclusive.
  521|       |       * Let's restart the inconclusive ones. */
  522|      0|      timediff_t since_ms =
  523|      0|        curlx_ptimediff_ms(Curl_pgrs_now(data), &bs->last_attempt_started);
  524|      0|      timediff_t delay_ms = bs->attempt_delay_ms - since_ms;
  525|      0|      if(delay_ms <= 0) {
  ------------------
  |  Branch (525:10): [True: 0, False: 0]
  ------------------
  526|      0|        CURL_TRC_CF(data, cf, "all attempts inconclusive, restarting one");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  527|      0|        VERBOSE(i = -1);
  ------------------
  |  | 1611|      0|#define VERBOSE(x) x
  ------------------
  528|      0|        for(a = bs->running; a; a = a->next) {
  ------------------
  |  Branch (528:30): [True: 0, False: 0]
  ------------------
  529|      0|          VERBOSE(++i);
  ------------------
  |  | 1611|      0|#define VERBOSE(x) x
  ------------------
  530|      0|          if(!a->inconclusive)
  ------------------
  |  Branch (530:14): [True: 0, False: 0]
  ------------------
  531|      0|            continue;
  532|      0|          result = cf_ip_attempt_restart(a, cf, data);
  533|      0|          CURL_TRC_CF(data, cf, "restarted baller %d -> %d", i, (int)result);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  534|      0|          if(result) /* serious failure */
  ------------------
  |  Branch (534:14): [True: 0, False: 0]
  ------------------
  535|      0|            goto out;
  536|      0|          bs->last_attempt_started = *Curl_pgrs_now(data);
  537|      0|          goto evaluate;
  538|      0|        }
  539|      0|        DEBUGASSERT(0); /* should not come here */
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (539:9): [Folded, False: 0]
  |  Branch (539:9): [Folded, False: 0]
  ------------------
  540|      0|      }
  541|      0|      else {
  542|       |        /* let's wait some more before restarting */
  543|      0|        infof(data, "connect attempts inconclusive, retrying "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  544|      0|                    "in %" FMT_TIMEDIFF_T "ms", delay_ms);
  545|      0|        Curl_expire(data, delay_ms, EXPIRE_HAPPY_EYEBALLS);
  546|      0|      }
  547|       |      /* attempt timeout for restart has not expired yet */
  548|      0|      goto out;
  549|      0|    }
  550|      0|    else if(!ongoing && dns_resolved) {
  ------------------
  |  Branch (550:13): [True: 0, False: 0]
  |  Branch (550:25): [True: 0, False: 0]
  ------------------
  551|       |      /* no more addresses, no inconclusive attempts */
  552|      0|      CURL_TRC_CF(data, cf, "no more attempts to try");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  553|      0|      result = CURLE_COULDNT_CONNECT;
  554|      0|      VERBOSE(i = 0);
  ------------------
  |  | 1611|      0|#define VERBOSE(x) x
  ------------------
  555|      0|      for(a = bs->running; a; a = a->next) {
  ------------------
  |  Branch (555:28): [True: 0, False: 0]
  ------------------
  556|      0|        CURL_TRC_CF(data, cf, "baller %d: result=%d", i, (int)a->result);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  557|      0|        if(a->result)
  ------------------
  |  Branch (557:12): [True: 0, False: 0]
  ------------------
  558|      0|          result = a->result;
  559|      0|      }
  560|      0|    }
  561|  3.62k|  }
  562|       |
  563|      0|out:
  564|      0|  if(!result) {
  ------------------
  |  Branch (564:6): [True: 0, False: 0]
  ------------------
  565|      0|    bool more_possible;
  566|       |
  567|       |    /* when do we need to be called again? */
  568|      0|    next_expire_ms = Curl_timeleft_ms(data);
  569|      0|    if(next_expire_ms < 0) {
  ------------------
  |  Branch (569:8): [True: 0, False: 0]
  ------------------
  570|      0|      failf(data, "Connection timeout after %" FMT_OFF_T " ms",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  571|      0|            Curl_pgrs_since_ms(data, NULL, TIMER_STARTSINGLE));
  572|      0|      return CURLE_OPERATION_TIMEDOUT;
  573|      0|    }
  574|       |
  575|      0|    more_possible = cf_ai_iter_has_more(&bs->addr_iter, data);
  576|      0|#ifdef USE_IPV6
  577|      0|    if(!more_possible)
  ------------------
  |  Branch (577:8): [True: 0, False: 0]
  ------------------
  578|      0|      more_possible = cf_ai_iter_has_more(&bs->ipv6_iter, data);
  579|      0|#endif
  580|      0|    if(more_possible) {
  ------------------
  |  Branch (580:8): [True: 0, False: 0]
  ------------------
  581|      0|      timediff_t expire_ms, elapsed_ms;
  582|      0|      elapsed_ms =
  583|      0|        curlx_ptimediff_ms(Curl_pgrs_now(data), &bs->last_attempt_started);
  584|      0|      expire_ms = CURLMAX(bs->attempt_delay_ms - elapsed_ms, 0);
  ------------------
  |  | 1287|      0|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  585|      0|      next_expire_ms = CURLMIN(next_expire_ms, expire_ms);
  ------------------
  |  | 1288|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1288:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  586|      0|      if(next_expire_ms <= 0) {
  ------------------
  |  Branch (586:10): [True: 0, False: 0]
  ------------------
  587|      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))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  588|      0|        goto evaluate;
  589|      0|      }
  590|      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))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  591|      0|                  "ms", next_expire_ms);
  592|      0|      Curl_expire(data, next_expire_ms, EXPIRE_HAPPY_EYEBALLS);
  593|      0|    }
  594|      0|  }
  595|      0|  return result;
  596|      0|}
cf-ip-happy.c:cf_ip_attempt_connect:
  248|  3.62k|{
  249|  3.62k|  *connected = (bool)a->connected;
  250|  3.62k|  if(!a->result && !*connected) {
  ------------------
  |  Branch (250:6): [True: 3.62k, False: 0]
  |  Branch (250:20): [True: 3.62k, False: 0]
  ------------------
  251|       |    /* evaluate again */
  252|  3.62k|    a->result = Curl_conn_cf_connect(a->cf, data, connected);
  253|       |
  254|  3.62k|    if(!a->result) {
  ------------------
  |  Branch (254:8): [True: 3.62k, False: 0]
  ------------------
  255|  3.62k|      if(*connected) {
  ------------------
  |  Branch (255:10): [True: 3.62k, False: 0]
  ------------------
  256|  3.62k|        a->connected = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  257|  3.62k|      }
  258|  3.62k|    }
  259|      0|    else {
  260|      0|      if(a->result == CURLE_WEIRD_SERVER_REPLY)
  ------------------
  |  Branch (260:10): [True: 0, False: 0]
  ------------------
  261|      0|        a->inconclusive = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  262|      0|      if(a->cf)
  ------------------
  |  Branch (262:10): [True: 0, False: 0]
  ------------------
  263|      0|        Curl_conn_cf_discard_chain(&a->cf, data);
  264|      0|    }
  265|  3.62k|  }
  266|  3.62k|  return a->result;
  267|  3.62k|}
cf-ip-happy.c:cf_ai_iter_next:
  139|  7.25k|{
  140|  7.25k|  const struct Curl_addrinfo *addr;
  141|       |
  142|  7.25k|  if(!iter->cf)
  ------------------
  |  Branch (142:6): [True: 0, False: 7.25k]
  ------------------
  143|      0|    return NULL;
  144|       |
  145|  7.25k|  addr = Curl_conn_dns_get_ai(data, iter->peer, iter->cf->sockindex,
  146|  7.25k|                              iter->ai_family, iter->n);
  147|  7.25k|  if(addr)
  ------------------
  |  Branch (147:6): [True: 3.62k, False: 3.62k]
  ------------------
  148|  3.62k|    iter->n++;
  149|  7.25k|  return addr;
  150|  7.25k|}
cf-ip-happy.c:cf_ip_ballers_prune:
  366|  3.62k|{
  367|  3.62k|  struct cf_ip_attempt *a = NULL, **panchor;
  368|  3.62k|  uint32_t ongoing = 0;
  369|       |
  370|  3.62k|  for(a = bs->running; a; a = a->next) {
  ------------------
  |  Branch (370:24): [True: 0, False: 3.62k]
  ------------------
  371|      0|    if(!a->result && !a->connected)
  ------------------
  |  Branch (371:8): [True: 0, False: 0]
  |  Branch (371:22): [True: 0, False: 0]
  ------------------
  372|      0|      ++ongoing;
  373|      0|  }
  374|       |
  375|  3.62k|  panchor = &bs->running;
  376|  3.62k|  while(*panchor && (ongoing > max_concurrent)) {
  ------------------
  |  Branch (376:9): [True: 0, False: 3.62k]
  |  Branch (376:21): [True: 0, False: 0]
  ------------------
  377|      0|    a = *panchor;
  378|      0|    if(!a->result && !a->connected) {
  ------------------
  |  Branch (378:8): [True: 0, False: 0]
  |  Branch (378:22): [True: 0, False: 0]
  ------------------
  379|      0|      *panchor = a->next;
  380|      0|      a->next = NULL;
  381|      0|      cf_ip_attempt_free(a, data);
  382|      0|      --ongoing;
  383|      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))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  384|      0|    }
  385|      0|    else {
  386|      0|      panchor = &a->next;
  387|      0|    }
  388|      0|  }
  389|  3.62k|}
cf-ip-happy.c:cf_ip_attempt_new:
  204|  3.62k|{
  205|  3.62k|  struct Curl_cfilter *wcf;
  206|  3.62k|  struct cf_ip_attempt *a;
  207|  3.62k|  CURLcode result = CURLE_OK;
  208|       |
  209|  3.62k|  *pa = NULL;
  210|  3.62k|  a = curlx_calloc(1, sizeof(*a));
  ------------------
  |  | 1473|  3.62k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  211|  3.62k|  if(!a)
  ------------------
  |  Branch (211:6): [True: 0, False: 3.62k]
  ------------------
  212|      0|    return CURLE_OUT_OF_MEMORY;
  213|       |
  214|  3.62k|  Curl_peer_link(&a->origin, origin);
  215|  3.62k|  Curl_peer_link(&a->peer, peer);
  216|  3.62k|  a->transport_peer = transport_peer;
  217|  3.62k|  Curl_peer_link(&a->tunnel_peer, tunnel_peer);
  218|  3.62k|  a->tunnel_transport = tunnel_transport;
  219|  3.62k|  a->addr = *addr;
  220|  3.62k|  a->ai_family = ai_family;
  221|  3.62k|  a->result = CURLE_OK;
  222|  3.62k|  a->cf_create = cf_create;
  223|  3.62k|  *pa = a;
  224|       |
  225|  3.62k|  result = a->cf_create(&a->cf, data, a->origin, a->peer, a->transport_peer,
  226|  3.62k|                        cf->conn, &a->addr, a->tunnel_peer,
  227|  3.62k|                        a->tunnel_transport);
  228|  3.62k|  if(result)
  ------------------
  |  Branch (228:6): [True: 0, False: 3.62k]
  ------------------
  229|      0|    goto out;
  230|       |
  231|       |  /* the new filter might have sub-filters */
  232|  7.25k|  for(wcf = a->cf; wcf; wcf = wcf->next) {
  ------------------
  |  Branch (232:20): [True: 3.62k, False: 3.62k]
  ------------------
  233|  3.62k|    wcf->conn = cf->conn;
  234|  3.62k|    wcf->sockindex = cf->sockindex;
  235|  3.62k|  }
  236|       |
  237|  3.62k|out:
  238|  3.62k|  if(result) {
  ------------------
  |  Branch (238:6): [True: 0, False: 3.62k]
  ------------------
  239|      0|    cf_ip_attempt_free(a, data);
  240|       |    *pa = NULL;
  241|      0|  }
  242|  3.62k|  return result;
  243|  3.62k|}
cf-ip-happy.c:cf_ip_happy_query:
  915|  7.25k|{
  916|  7.25k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  917|       |
  918|  7.25k|  if(!cf->connected) {
  ------------------
  |  Branch (918:6): [True: 3.62k, False: 3.62k]
  ------------------
  919|  3.62k|    switch(query) {
  920|      0|    case CF_QUERY_CONNECT_REPLY_MS: {
  ------------------
  |  |  168|      0|#define CF_QUERY_CONNECT_REPLY_MS   2  /* number     -        */
  ------------------
  |  Branch (920:5): [True: 0, False: 3.62k]
  ------------------
  921|      0|      *pres1 = cf_ip_ballers_min_reply_ms(&ctx->ballers, data);
  922|      0|      CURL_TRC_CF(data, cf, "query connect reply: %dms", *pres1);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  923|      0|      return CURLE_OK;
  924|      0|    }
  925|  3.62k|    default:
  ------------------
  |  Branch (925:5): [True: 3.62k, False: 0]
  ------------------
  926|  3.62k|      break;
  927|  3.62k|    }
  928|  3.62k|  }
  929|       |
  930|  7.25k|  return cf->next ?
  ------------------
  |  Branch (930:10): [True: 3.62k, False: 3.62k]
  ------------------
  931|  3.62k|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
  932|  7.25k|    CURLE_UNKNOWN_OPTION;
  933|  7.25k|}
cf-ip-happy.c:cf_ip_happy_create:
  972|  3.62k|{
  973|  3.62k|  struct cf_ip_happy_ctx *ctx = NULL;
  974|  3.62k|  CURLcode result;
  975|       |
  976|  3.62k|  (void)data;
  977|  3.62k|  (void)conn;
  978|  3.62k|  *pcf = NULL;
  979|  3.62k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1473|  3.62k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  980|  3.62k|  if(!ctx) {
  ------------------
  |  Branch (980:6): [True: 0, False: 3.62k]
  ------------------
  981|      0|    result = CURLE_OUT_OF_MEMORY;
  982|      0|    goto out;
  983|      0|  }
  984|  3.62k|  result = cf_ip_ballers_init(&ctx->ballers, data,
  985|  3.62k|                              origin, peer, transport_peer,
  986|  3.62k|                              tunnel_peer, tunnel_transport,
  987|  3.62k|                              data->set.happy_eyeballs_timeout,
  988|  3.62k|                              IP_HE_MAX_CONCURRENT_ATTEMPTS);
  ------------------
  |  |  737|  3.62k|#define IP_HE_MAX_CONCURRENT_ATTEMPTS     6
  ------------------
  989|  3.62k|  if(result)
  ------------------
  |  Branch (989:6): [True: 0, False: 3.62k]
  ------------------
  990|      0|    goto out;
  991|       |
  992|  3.62k|  result = Curl_cf_create(pcf, &Curl_cft_ip_happy, ctx);
  993|       |
  994|  3.62k|out:
  995|  3.62k|  if(result) {
  ------------------
  |  Branch (995:6): [True: 0, False: 3.62k]
  ------------------
  996|       |    curlx_safefree(*pcf);
  ------------------
  |  | 1332|      0|  do {                      \
  |  | 1333|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|      0|    (ptr) = NULL;           \
  |  | 1335|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  997|      0|    cf_ip_happy_ctx_destroy(ctx, data);
  998|      0|  }
  999|  3.62k|  return result;
 1000|  3.62k|}
cf-ip-happy.c:cf_ip_ballers_init:
  343|  3.62k|{
  344|  3.62k|  memset(bs, 0, sizeof(*bs));
  345|  3.62k|  bs->cf_create = get_cf_create(transport_peer, !!tunnel_peer);
  346|  3.62k|  if(!bs->cf_create) {
  ------------------
  |  Branch (346:6): [True: 0, False: 3.62k]
  ------------------
  347|      0|    failf(data, "unsupported transport type %u%s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  348|      0|          transport_peer, tunnel_peer ? " to proxy" : "");
  ------------------
  |  Branch (348:27): [True: 0, False: 0]
  ------------------
  349|      0|    return CURLE_UNSUPPORTED_PROTOCOL;
  350|      0|  }
  351|  3.62k|  Curl_peer_link(&bs->origin, origin);
  352|  3.62k|  Curl_peer_link(&bs->peer, peer);
  353|  3.62k|  bs->transport_peer = transport_peer;
  354|  3.62k|  Curl_peer_link(&bs->tunnel_peer, tunnel_peer);
  355|  3.62k|  bs->tunnel_transport = tunnel_transport;
  356|  3.62k|  bs->attempt_delay_ms = attempt_delay_ms;
  357|  3.62k|  bs->max_concurrent = max_concurrent;
  358|       |  bs->last_attempt_ai_family = AF_INET; /* so AF_INET6 is next */
  359|  3.62k|  return CURLE_OK;
  360|  3.62k|}
cf-ip-happy.c:get_cf_create:
   93|  3.62k|{
   94|  3.62k|  size_t i;
   95|  3.62k|  for(i = 0; i < CURL_ARRAYSIZE(transport_providers); ++i) {
  ------------------
  |  | 1299|  3.62k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (95:14): [True: 3.62k, False: 0]
  ------------------
   96|  3.62k|    if((transport == transport_providers[i].transport) &&
  ------------------
  |  Branch (96:8): [True: 3.62k, False: 0]
  ------------------
   97|  3.62k|       (tunnel == transport_providers[i].tunnel))
  ------------------
  |  Branch (97:8): [True: 3.62k, False: 0]
  ------------------
   98|  3.62k|      return transport_providers[i].cf_create;
   99|  3.62k|  }
  100|      0|  return NULL;
  101|  3.62k|}

Curl_cf_setup_insert_after:
  468|  3.62k|{
  469|  3.62k|  struct Curl_cfilter *cf;
  470|  3.62k|  CURLcode result;
  471|       |
  472|  3.62k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (472:3): [True: 0, False: 3.62k]
  |  Branch (472:3): [True: 3.62k, False: 0]
  ------------------
  473|  3.62k|  result = cf_setup_create(&cf, data, transport, ssl_mode);
  474|  3.62k|  if(result)
  ------------------
  |  Branch (474:6): [True: 0, False: 3.62k]
  ------------------
  475|      0|    goto out;
  476|  3.62k|  Curl_conn_cf_insert_after(cf_at, cf);
  477|  3.62k|out:
  478|  3.62k|  return result;
  479|  3.62k|}
cf-setup.c:cf_setup_destroy:
  390|  3.62k|{
  391|  3.62k|  struct cf_setup_ctx *ctx = cf->ctx;
  392|       |
  393|  3.62k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  394|       |  curlx_safefree(ctx);
  ------------------
  |  | 1332|  3.62k|  do {                      \
  |  | 1333|  3.62k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.62k|    (ptr) = NULL;           \
  |  | 1335|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  395|  3.62k|}
cf-setup.c:cf_setup_connect:
  364|  7.25k|{
  365|  7.25k|  struct cf_setup_ctx *ctx = cf->ctx;
  366|  7.25k|  CURLcode result;
  367|       |
  368|       |  /* In some situations, a server/proxy may close the connection and
  369|       |   * we need to connect again (HTTP/1.x proxy auth, for example).
  370|       |   * We used to close the filters and reuse them for another attempt,
  371|       |   * however that complicates filter code and it is simpler to tear them
  372|       |   * all down and start over. */
  373|  7.25k|retry:
  374|  7.25k|  result = cf_setup_connect_steps(cf, data, done);
  375|       |
  376|  7.25k|  if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (376:6): [True: 0, False: 7.25k]
  ------------------
  377|      0|    ++ctx->retry_count;
  378|      0|    if(ctx->retry_count > 5) /* arbitrary limit, better just timeout? */
  ------------------
  |  Branch (378:8): [True: 0, False: 0]
  ------------------
  379|      0|      return CURLE_COULDNT_CONNECT;
  380|       |
  381|      0|    CURL_TRC_CF(data, cf, "retrying connect, %d. time", ctx->retry_count);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  382|      0|    Curl_conn_cf_discard_chain(&cf->next, data);
  383|      0|    ctx->state = CF_SETUP_INIT;
  384|      0|    goto retry;
  385|      0|  }
  386|  7.25k|  return result;
  387|  7.25k|}
cf-setup.c:cf_setup_connect_steps:
  302|  7.25k|{
  303|  7.25k|  struct cf_setup_ctx *ctx = cf->ctx;
  304|  7.25k|  CURLcode result = CURLE_OK;
  305|       |
  306|  7.25k|  if(cf->connected) {
  ------------------
  |  Branch (306:6): [True: 0, False: 7.25k]
  ------------------
  307|      0|    *done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  308|      0|    return CURLE_OK;
  309|      0|  }
  310|       |
  311|       |  /* connect current sub-chain */
  312|  14.5k|connect_sub_chain:
  313|  14.5k|  VERBOSE(Curl_conn_trc_filters(data, cf->sockindex, "cf_setup_connect"));
  ------------------
  |  | 1611|  14.5k|#define VERBOSE(x) x
  ------------------
  314|       |
  315|  14.5k|  if(cf->next && !cf->next->connected) {
  ------------------
  |  Branch (315:6): [True: 10.8k, False: 3.62k]
  |  Branch (315:18): [True: 10.8k, False: 0]
  ------------------
  316|  10.8k|    result = Curl_conn_cf_connect(cf->next, data, done);
  317|  10.8k|    if(result || !*done)
  ------------------
  |  Branch (317:8): [True: 0, False: 10.8k]
  |  Branch (317:18): [True: 3.62k, False: 7.25k]
  ------------------
  318|  3.62k|      return result;
  319|  10.8k|  }
  320|       |
  321|  10.8k|  result = cf_setup_add_ip_happy(cf, data);
  322|  10.8k|  if(result)
  ------------------
  |  Branch (322:6): [True: 0, False: 10.8k]
  ------------------
  323|      0|    return result;
  324|  10.8k|  if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (324:6): [True: 0, False: 10.8k]
  |  Branch (324:19): [True: 3.62k, False: 7.25k]
  ------------------
  325|  3.62k|    goto connect_sub_chain;
  326|       |
  327|  7.25k|#ifndef CURL_DISABLE_PROXY
  328|  7.25k|  result = cf_setup_add_socks(cf, data);
  329|  7.25k|  if(result)
  ------------------
  |  Branch (329:6): [True: 0, False: 7.25k]
  ------------------
  330|      0|    return result;
  331|  7.25k|  if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (331:6): [True: 0, False: 7.25k]
  |  Branch (331:19): [True: 0, False: 7.25k]
  ------------------
  332|      0|    goto connect_sub_chain;
  333|       |
  334|  7.25k|#ifndef CURL_DISABLE_HTTP
  335|  7.25k|  result = cf_setup_add_http_proxy(cf, data);
  336|  7.25k|  if(result)
  ------------------
  |  Branch (336:6): [True: 0, False: 7.25k]
  ------------------
  337|      0|    return result;
  338|  7.25k|  if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (338:6): [True: 0, False: 7.25k]
  |  Branch (338:19): [True: 0, False: 7.25k]
  ------------------
  339|      0|    goto connect_sub_chain;
  340|  7.25k|#endif /* !CURL_DISABLE_HTTP */
  341|       |
  342|  7.25k|  result = cf_setup_add_haproxy(cf, data);
  343|  7.25k|  if(result)
  ------------------
  |  Branch (343:6): [True: 0, False: 7.25k]
  ------------------
  344|      0|    return result;
  345|  7.25k|  if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (345:6): [True: 0, False: 7.25k]
  |  Branch (345:19): [True: 0, False: 7.25k]
  ------------------
  346|      0|    goto connect_sub_chain;
  347|  7.25k|#endif /* !CURL_DISABLE_PROXY */
  348|       |
  349|  7.25k|  result = cf_setup_add_origin_filters(cf, data);
  350|  7.25k|  if(result)
  ------------------
  |  Branch (350:6): [True: 0, False: 7.25k]
  ------------------
  351|      0|    return result;
  352|  7.25k|  if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (352:6): [True: 0, False: 7.25k]
  |  Branch (352:19): [True: 3.62k, False: 3.62k]
  ------------------
  353|  3.62k|    goto connect_sub_chain;
  354|       |
  355|  3.62k|  ctx->state = CF_SETUP_DONE;
  356|  3.62k|  cf->connected = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  357|       |  *done = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  358|  3.62k|  return CURLE_OK;
  359|  7.25k|}
cf-setup.c:cf_setup_add_ip_happy:
  175|  10.8k|{
  176|  10.8k|  struct cf_setup_ctx *ctx = cf->ctx;
  177|  10.8k|  CURLcode result = CURLE_OK;
  178|       |
  179|  10.8k|  if(ctx->state < CF_SETUP_CNNCT_EYEBALLS) {
  ------------------
  |  Branch (179:6): [True: 3.62k, False: 7.25k]
  ------------------
  180|       |    /* What is the first hop we directly connect to and what transport
  181|       |     * do we use for it? Only on the first hop we can do Happy Eyeballs.
  182|       |     * first_origin and first_peer differ on --connect-to. */
  183|  3.62k|    struct Curl_peer *first_origin =
  184|  3.62k|      conn_get_first_origin(cf->conn, cf->sockindex);
  185|  3.62k|    struct Curl_peer *first_peer =
  186|  3.62k|      Curl_conn_get_first_peer(cf->conn, cf->sockindex);
  187|  3.62k|    struct Curl_peer *tunnel_peer = NULL;
  188|  3.62k|    uint8_t first_transport = ctx->transport;
  189|       |
  190|  3.62k|    if(!first_peer)
  ------------------
  |  Branch (190:8): [True: 0, False: 3.62k]
  ------------------
  191|      0|      return CURLE_FAILED_INIT;
  192|       |
  193|  3.62k|#if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP)
  194|  3.62k|    if(cf->conn->http_proxy.peer && !cf->conn->bits.origin_is_proxy) {
  ------------------
  |  Branch (194:8): [True: 0, False: 3.62k]
  |  Branch (194:37): [True: 0, False: 0]
  ------------------
  195|      0|      first_transport =
  196|      0|        Curl_http_proxy_transport(cf->conn->http_proxy.proxytype);
  197|      0|      tunnel_peer = Curl_conn_get_destination(cf->conn, cf->sockindex);
  198|      0|      if((first_transport == TRNSPRT_QUIC) && cf->conn->socks_proxy.peer) {
  ------------------
  |  |  240|      0|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (198:10): [True: 0, False: 0]
  |  Branch (198:47): [True: 0, False: 0]
  ------------------
  199|      0|        failf(data, "HTTP/3 proxy not possible via SOCKS");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  200|      0|        return CURLE_UNSUPPORTED_PROTOCOL;
  201|      0|      }
  202|      0|    }
  203|  3.62k|#endif /* !CURL_DISABLE_PROXY && !CURL_DISABLE_HTTP */
  204|       |
  205|  3.62k|    result = Curl_cf_ip_happy_insert_after(cf, data, first_origin, first_peer,
  206|  3.62k|                                           first_transport,
  207|  3.62k|                                           tunnel_peer, ctx->transport);
  208|  3.62k|    if(result) {
  ------------------
  |  Branch (208:8): [True: 0, False: 3.62k]
  ------------------
  209|      0|      CURL_TRC_CF(data, cf, "adding happy eyeballs failed -> %d", (int)result);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  210|      0|      return result;
  211|      0|    }
  212|       |
  213|  3.62k|    if(tunnel_peer && (first_transport == TRNSPRT_QUIC)) {
  ------------------
  |  |  240|      0|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (213:8): [True: 0, False: 3.62k]
  |  Branch (213:23): [True: 0, False: 0]
  ------------------
  214|      0|      CURL_TRC_CF(data, cf, "happy eyeballing to HTTP/3 proxy %s:%u",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  215|      0|                  first_peer->hostname, first_peer->port);
  216|      0|      ctx->state = CF_SETUP_CNNCT_HTTP_PROXY;
  217|      0|    }
  218|  3.62k|    else {
  219|  3.62k|      CURL_TRC_CF(data, cf, "happy eyeballing to %s %s:%u",
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  220|  3.62k|                  tunnel_peer ? "proxy" : "origin",
  221|  3.62k|                  first_peer->hostname, first_peer->port);
  222|  3.62k|      ctx->state = CF_SETUP_CNNCT_EYEBALLS;
  223|  3.62k|    }
  224|  3.62k|  }
  225|  10.8k|  return result;
  226|  10.8k|}
cf-setup.c:conn_get_first_origin:
  163|  3.62k|{
  164|  3.62k|#ifndef CURL_DISABLE_PROXY
  165|  3.62k|  if(conn->socks_proxy.peer)
  ------------------
  |  Branch (165:6): [True: 0, False: 3.62k]
  ------------------
  166|      0|    return conn->socks_proxy.peer;
  167|  3.62k|  if(conn->http_proxy.peer)
  ------------------
  |  Branch (167:6): [True: 0, False: 3.62k]
  ------------------
  168|      0|    return conn->http_proxy.peer;
  169|  3.62k|#endif
  170|  3.62k|  return (sockindex == SECONDARYSOCKET) ? conn->origin2 : conn->origin;
  ------------------
  |  |  235|  3.62k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (170:10): [True: 0, False: 3.62k]
  ------------------
  171|  3.62k|}
cf-setup.c:cf_setup_add_socks:
   86|  7.25k|{
   87|  7.25k|  struct cf_setup_ctx *ctx = cf->ctx;
   88|  7.25k|  CURLcode result = CURLE_OK;
   89|  7.25k|  if(ctx->state < CF_SETUP_CNNCT_SOCKS && cf->conn->socks_proxy.peer) {
  ------------------
  |  Branch (89:6): [True: 3.62k, False: 3.62k]
  |  Branch (89:43): [True: 0, False: 3.62k]
  ------------------
   90|       |    /* Add a SOCKS proxy to go through `first_peer` to `second_peer`*/
   91|      0|    struct Curl_peer *second_peer;
   92|       |
   93|      0|    if(cf->conn->http_proxy.peer)
  ------------------
  |  Branch (93:8): [True: 0, False: 0]
  ------------------
   94|      0|      second_peer = cf->conn->http_proxy.peer;
   95|      0|    else
   96|      0|      second_peer = Curl_conn_get_destination(cf->conn, cf->sockindex);
   97|      0|    if(!second_peer)
  ------------------
  |  Branch (97:8): [True: 0, False: 0]
  ------------------
   98|      0|      return CURLE_FAILED_INIT;
   99|       |
  100|      0|    result = Curl_cf_socks_proxy_insert_after(
  101|      0|      cf, data, second_peer, cf->conn->ip_version,
  102|      0|      cf->conn->socks_proxy.proxytype,
  103|      0|      cf->conn->socks_proxy.creds);
  104|      0|    if(result) {
  ------------------
  |  Branch (104:8): [True: 0, False: 0]
  ------------------
  105|      0|      CURL_TRC_CF(data, cf, "adding SOCKS filter failed -> %d", (int)result);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  106|      0|      return result;
  107|      0|    }
  108|       |
  109|      0|    CURL_TRC_CF(data, cf, "added SOCKS filter to %s:%u",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  110|      0|                second_peer->hostname, second_peer->port);
  111|      0|    ctx->state = CF_SETUP_CNNCT_SOCKS;
  112|      0|  }
  113|  7.25k|  return result;
  114|  7.25k|}
cf-setup.c:cf_setup_add_http_proxy:
  119|  7.25k|{
  120|  7.25k|  struct cf_setup_ctx *ctx = cf->ctx;
  121|  7.25k|  CURLcode result = CURLE_OK;
  122|       |
  123|  7.25k|  if(ctx->state < CF_SETUP_CNNCT_HTTP_PROXY &&
  ------------------
  |  Branch (123:6): [True: 3.62k, False: 3.62k]
  ------------------
  124|  3.62k|     cf->conn->http_proxy.peer && !cf->conn->bits.origin_is_proxy) {
  ------------------
  |  Branch (124:6): [True: 0, False: 3.62k]
  |  Branch (124:35): [True: 0, False: 0]
  ------------------
  125|      0|    struct Curl_peer *peer = cf->conn->http_proxy.peer;
  126|      0|    struct Curl_peer *tunnel_peer =
  127|      0|      Curl_conn_get_destination(cf->conn, cf->sockindex);
  128|       |
  129|      0|#ifdef USE_SSL
  130|      0|    if(CURL_PROXY_IS_HTTPS(cf->conn->http_proxy.proxytype) &&
  ------------------
  |  |   42|      0|  (((t) == CURLPROXY_HTTPS) ||  \
  |  |  ------------------
  |  |  |  |  796|      0|#define CURLPROXY_HTTPS           2L /* HTTPS but stick to HTTP/1
  |  |  ------------------
  |  |  |  Branch (42:4): [True: 0, False: 0]
  |  |  ------------------
  |  |   43|      0|   ((t) == CURLPROXY_HTTPS2) || \
  |  |  ------------------
  |  |  |  |  798|      0|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  |  |  ------------------
  |  |  |  Branch (43:4): [True: 0, False: 0]
  |  |  ------------------
  |  |   44|      0|   ((t) == CURLPROXY_HTTPS3))
  |  |  ------------------
  |  |  |  |  807|      0|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  |  |  ------------------
  |  |  |  Branch (44:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  131|      0|       !Curl_conn_is_ssl(cf->conn, cf->sockindex)) {
  ------------------
  |  Branch (131:8): [True: 0, False: 0]
  ------------------
  132|      0|      result = Curl_cf_ssl_proxy_insert_after(
  133|      0|        cf, data, cf->conn->http_proxy.peer);
  134|      0|      if(result) {
  ------------------
  |  Branch (134:10): [True: 0, False: 0]
  ------------------
  135|      0|        CURL_TRC_CF(data, cf, "adding SSL filter for HTTP proxy failed -> %d",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  136|      0|                    (int)result);
  137|      0|        return result;
  138|      0|      }
  139|      0|      CURL_TRC_CF(data, cf, "added SSL filter for HTTP proxy");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  140|      0|    }
  141|      0|#endif /* USE_SSL */
  142|       |
  143|      0|    result = Curl_cf_http_proxy_insert_after(
  144|      0|      cf, data, peer, tunnel_peer,
  145|      0|      ctx->transport, cf->conn->http_proxy.proxytype);
  146|      0|    if(result) {
  ------------------
  |  Branch (146:8): [True: 0, False: 0]
  ------------------
  147|      0|      CURL_TRC_CF(data, cf, "adding HTTP proxy tunnel filter failed -> %d",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  148|      0|                  (int)result);
  149|      0|      return result;
  150|      0|    }
  151|      0|    CURL_TRC_CF(data, cf, "added HTTP proxy tunnel filter");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  152|      0|    ctx->state = CF_SETUP_CNNCT_HTTP_PROXY;
  153|      0|  }
  154|  7.25k|  return result;
  155|  7.25k|}
cf-setup.c:cf_setup_add_haproxy:
   61|  7.25k|{
   62|  7.25k|  struct cf_setup_ctx *ctx = cf->ctx;
   63|  7.25k|  CURLcode result = CURLE_OK;
   64|       |
   65|  7.25k|  if(ctx->state < CF_SETUP_CNNCT_HAPROXY) {
  ------------------
  |  Branch (65:6): [True: 3.62k, False: 3.62k]
  ------------------
   66|  3.62k|    if(data->set.haproxyprotocol) {
  ------------------
  |  Branch (66:8): [True: 0, False: 3.62k]
  ------------------
   67|      0|      if(ctx->transport == TRNSPRT_QUIC) {
  ------------------
  |  |  240|      0|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (67:10): [True: 0, False: 0]
  ------------------
   68|      0|        failf(data, "haproxy protocol does not support QUIC");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
   69|      0|        return CURLE_UNSUPPORTED_PROTOCOL;
   70|      0|      }
   71|      0|      result = Curl_cf_haproxy_insert_after(cf, data);
   72|      0|      if(result) {
  ------------------
  |  Branch (72:10): [True: 0, False: 0]
  ------------------
   73|      0|        CURL_TRC_CF(data, cf, "adding HAPROXY filter failed -> %d",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
   74|      0|                    (int)result);
   75|      0|        return result;
   76|      0|      }
   77|      0|      CURL_TRC_CF(data, cf, "added HAPROXY filter");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
   78|      0|    }
   79|  3.62k|    ctx->state = CF_SETUP_CNNCT_HAPROXY;
   80|  3.62k|  }
   81|  7.25k|  return result;
   82|  7.25k|}
cf-setup.c:cf_setup_add_origin_filters:
  230|  7.25k|{
  231|  7.25k|  struct cf_setup_ctx *ctx = cf->ctx;
  232|  7.25k|  CURLcode result = CURLE_OK;
  233|       |
  234|  7.25k|  (void)data; /* not used in all builds */
  235|  7.25k|  if(ctx->state < CF_SETUP_CNNCT_SSL) {
  ------------------
  |  Branch (235:6): [True: 3.62k, False: 3.62k]
  ------------------
  236|       |#if !defined(CURL_DISABLE_HTTP) && defined(USE_HTTP3) && \
  237|       |    !defined(CURL_DISABLE_PROXY)
  238|       |
  239|       |    /* Wanting QUIC with an HTTP tunneling filter, we now need to add
  240|       |     * the QUIC filter on top. Without tunneling, this has already
  241|       |     * happened in the Happy Eyeball filter. */
  242|       |    if(ctx->transport == TRNSPRT_QUIC &&
  243|       |       cf->conn->http_proxy.peer && !cf->conn->bits.origin_is_proxy) {
  244|       |      struct Curl_peer *origin = Curl_conn_get_origin(cf->conn, cf->sockindex);
  245|       |      struct Curl_peer *peer =
  246|       |        Curl_conn_get_destination(cf->conn, cf->sockindex);
  247|       |
  248|       |      result = Curl_cf_capsule_insert_after(cf, data);
  249|       |      if(result) {
  250|       |        CURL_TRC_CF(data, cf, "adding capsule filter failed -> %d",
  251|       |                    (int)result);
  252|       |        return result;
  253|       |      }
  254|       |      result = Curl_cf_quic_insert_after(cf, data, origin, peer);
  255|       |      if(result) {
  256|       |        CURL_TRC_CF(data, cf, "adding QUIC filter failed -> %d", (int)result);
  257|       |        return result;
  258|       |      }
  259|       |      CURL_TRC_CF(data, cf, "added QUIC filter for origin");
  260|       |    }
  261|       |    else
  262|       |#endif /* !CURL_DISABLE_HTTP && USE_HTTP3 && CURL_DISABLE_PROXY */
  263|  3.62k|#ifdef USE_SSL
  264|  3.62k|    if((ctx->ssl_mode == CURL_CF_SSL_ENABLE ||
  ------------------
  |  |  366|  7.25k|#define CURL_CF_SSL_ENABLE   1
  ------------------
  |  Branch (264:9): [True: 3.62k, False: 0]
  ------------------
  265|      0|        (ctx->ssl_mode != CURL_CF_SSL_DISABLE &&
  ------------------
  |  |  365|      0|#define CURL_CF_SSL_DISABLE  0
  ------------------
  |  Branch (265:10): [True: 0, False: 0]
  ------------------
  266|      0|         cf->conn->scheme->flags & PROTOPT_SSL)) && /* we want SSL */
  ------------------
  |  |  207|      0|#define PROTOPT_SSL (1 << 0)       /* uses SSL */
  ------------------
  |  Branch (266:10): [True: 0, False: 0]
  ------------------
  267|  3.62k|       !Curl_conn_is_ssl(cf->conn, cf->sockindex)) { /* it is missing */
  ------------------
  |  Branch (267:8): [True: 3.62k, False: 0]
  ------------------
  268|       |
  269|  3.62k|#ifndef CURL_DISABLE_PROXY
  270|  3.62k|      if(cf->conn->bits.origin_is_proxy) {
  ------------------
  |  Branch (270:10): [True: 0, False: 3.62k]
  ------------------
  271|      0|        result = Curl_cf_ssl_proxy_insert_after(cf, data, cf->conn->origin);
  272|      0|      }
  273|  3.62k|      else
  274|  3.62k|#endif
  275|  3.62k|      {
  276|       |        /* FTP is a bitch. Wherever we really connect to on the DATA
  277|       |         * (secondary) connection, many servers require TLS sessions reuse
  278|       |         * to prove they are talking to the same client.
  279|       |         * For the TLS session lookup to work, we need to instantiate
  280|       |         * the SSL filter with the same peers as FIRSTSOCKET. See #22225
  281|       |         * Meaning: cf->sockindex does not matter here. */
  282|  3.62k|        result = Curl_cf_ssl_insert_after(cf, data,
  283|  3.62k|          Curl_conn_get_origin(cf->conn, FIRSTSOCKET),
  ------------------
  |  |  234|  3.62k|#define FIRSTSOCKET     0
  ------------------
  284|  3.62k|          Curl_conn_get_destination(cf->conn, FIRSTSOCKET));
  ------------------
  |  |  234|  3.62k|#define FIRSTSOCKET     0
  ------------------
  285|  3.62k|      }
  286|  3.62k|      if(result) {
  ------------------
  |  Branch (286:10): [True: 0, False: 3.62k]
  ------------------
  287|      0|        CURL_TRC_CF(data, cf, "adding SSL filter for origin failed -> %d",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  288|      0|                    (int)result);
  289|      0|        return result;
  290|      0|      }
  291|  3.62k|      CURL_TRC_CF(data, cf, "added SSL filter for origin");
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  292|  3.62k|    }
  293|  3.62k|#endif /* USE_SSL */
  294|  3.62k|    ctx->state = CF_SETUP_CNNCT_SSL;
  295|  3.62k|  }
  296|  7.25k|  return result;
  297|  7.25k|}
cf-setup.c:cf_setup_create:
  418|  3.62k|{
  419|  3.62k|  struct Curl_cfilter *cf = NULL;
  420|  3.62k|  struct cf_setup_ctx *ctx;
  421|  3.62k|  CURLcode result = CURLE_OK;
  422|       |
  423|  3.62k|  (void)data;
  424|  3.62k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1473|  3.62k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  425|  3.62k|  if(!ctx) {
  ------------------
  |  Branch (425:6): [True: 0, False: 3.62k]
  ------------------
  426|      0|    result = CURLE_OUT_OF_MEMORY;
  427|      0|    goto out;
  428|      0|  }
  429|  3.62k|  ctx->state = CF_SETUP_INIT;
  430|  3.62k|  ctx->ssl_mode = ssl_mode;
  431|  3.62k|  ctx->transport = transport;
  432|       |
  433|  3.62k|  result = Curl_cf_create(&cf, &Curl_cft_setup, ctx);
  434|  3.62k|  if(result)
  ------------------
  |  Branch (434:6): [True: 0, False: 3.62k]
  ------------------
  435|      0|    goto out;
  436|  3.62k|  ctx = NULL;
  437|       |
  438|  3.62k|out:
  439|  3.62k|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (439:10): [True: 0, False: 3.62k]
  ------------------
  440|  3.62k|  if(ctx) {
  ------------------
  |  Branch (440:6): [True: 0, False: 3.62k]
  ------------------
  441|      0|    curlx_free(ctx);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  442|      0|  }
  443|  3.62k|  return result;
  444|  3.62k|}

sockaddr2string:
   98|  10.8k|{
   99|  10.8k|  CURLcode result;
  100|  10.8k|  struct sockaddr_in *si = NULL;
  101|  10.8k|#ifdef USE_IPV6
  102|  10.8k|  struct sockaddr_in6 *si6 = NULL;
  103|  10.8k|#endif
  104|  10.8k|#ifdef USE_UNIX_SOCKETS
  105|  10.8k|  struct sockaddr_un *su = NULL;
  106|       |#else
  107|       |  (void)salen;
  108|       |#endif
  109|       |
  110|  10.8k|  switch(sa->sa_family) {
  111|  3.62k|  case AF_INET:
  ------------------
  |  Branch (111:3): [True: 3.62k, False: 7.25k]
  ------------------
  112|  3.62k|    si = (struct sockaddr_in *)(void *)sa;
  113|  3.62k|    result = curlx_inet_ntop(sa->sa_family, &si->sin_addr, addr,
  114|  3.62k|                             MAX_IPADR_LEN);
  ------------------
  |  |   41|  3.62k|#define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")
  ------------------
  115|  3.62k|    if(!result) {
  ------------------
  |  Branch (115:8): [True: 3.62k, False: 0]
  ------------------
  116|  3.62k|      *port = ntohs(si->sin_port);
  117|  3.62k|      return result;
  118|  3.62k|    }
  119|      0|    break;
  120|      0|#ifdef USE_IPV6
  121|      0|  case AF_INET6:
  ------------------
  |  Branch (121:3): [True: 0, False: 10.8k]
  ------------------
  122|      0|    si6 = (struct sockaddr_in6 *)(void *)sa;
  123|      0|    result = curlx_inet_ntop(sa->sa_family, &si6->sin6_addr, addr,
  124|      0|                             MAX_IPADR_LEN);
  ------------------
  |  |   41|      0|#define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")
  ------------------
  125|      0|    if(!result) {
  ------------------
  |  Branch (125:8): [True: 0, False: 0]
  ------------------
  126|      0|      *port = ntohs(si6->sin6_port);
  127|      0|      return result;
  128|      0|    }
  129|      0|    break;
  130|      0|#endif
  131|      0|#ifdef USE_UNIX_SOCKETS
  132|  7.25k|  case AF_UNIX:
  ------------------
  |  Branch (132:3): [True: 7.25k, False: 3.62k]
  ------------------
  133|  7.25k|    if(salen > (curl_socklen_t)sizeof(CURL_SA_FAMILY_T)) {
  ------------------
  |  Branch (133:8): [True: 0, False: 7.25k]
  ------------------
  134|      0|      su = (struct sockaddr_un *)sa;
  135|      0|      curl_msnprintf(addr, MAX_IPADR_LEN, "%s", su->sun_path);
  ------------------
  |  |   41|      0|#define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")
  ------------------
  136|      0|    }
  137|  7.25k|    else
  138|  7.25k|      addr[0] = 0; /* socket with no name */
  139|  7.25k|    *port = 0;
  140|  7.25k|    return CURLE_OK;
  141|      0|#endif
  142|      0|  default:
  ------------------
  |  Branch (142:3): [True: 0, False: 10.8k]
  ------------------
  143|      0|    result = CURLE_UNSUPPORTED_PROTOCOL;
  144|      0|    break;
  145|  10.8k|  }
  146|       |
  147|      0|  addr[0] = '\0';
  148|      0|  *port = 0;
  149|      0|  return result;
  150|  10.8k|}
Curl_socket_addr_from_ai:
  347|  3.62k|{
  348|       |  /*
  349|       |   * The Curl_sockaddr_ex structure is libcurl's external API
  350|       |   * curl_sockaddr structure with enough space available to directly hold
  351|       |   * any protocol-specific address structures. The variable declared here
  352|       |   * will be used to pass / receive data to/from the fopensocket callback
  353|       |   * if this has been set, before that, it is initialized from parameters.
  354|       |   */
  355|  3.62k|  addr->family = ai->ai_family;
  356|  3.62k|  addr->socktype = Curl_socktype_for_transport(transport);
  357|  3.62k|  addr->protocol = Curl_protocol_for_transport(transport);
  358|  3.62k|  addr->addrlen = (unsigned int)ai->ai_addrlen;
  359|       |
  360|  3.62k|  DEBUGASSERT(addr->addrlen <= sizeof(addr->curl_sa_addrbuf));
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (360:3): [True: 0, False: 3.62k]
  |  Branch (360:3): [True: 3.62k, False: 0]
  ------------------
  361|  3.62k|  if(addr->addrlen > sizeof(addr->curl_sa_addrbuf))
  ------------------
  |  |   36|  3.62k|#define curl_sa_addrbuf addr.buf
  ------------------
  |  Branch (361:6): [True: 0, False: 3.62k]
  ------------------
  362|      0|    return CURLE_TOO_LARGE;
  363|       |
  364|  3.62k|  memcpy(&addr->curl_sa_addrbuf, ai->ai_addr, addr->addrlen);
  ------------------
  |  |   36|  3.62k|#define curl_sa_addrbuf addr.buf
  ------------------
  365|  3.62k|  return CURLE_OK;
  366|  3.62k|}
Curl_cf_tcp_create:
 1872|  3.62k|{
 1873|  3.62k|  struct cf_socket_ctx *ctx = NULL;
 1874|  3.62k|  struct Curl_cfilter *cf = NULL;
 1875|  3.62k|  CURLcode result;
 1876|       |
 1877|  3.62k|  (void)data;
 1878|  3.62k|  (void)origin;
 1879|  3.62k|  (void)conn;
 1880|  3.62k|  (void)tunnel_peer;
 1881|  3.62k|  (void)tunnel_transport;
 1882|  3.62k|  DEBUGASSERT(transport_peer == TRNSPRT_TCP);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1882:3): [True: 0, False: 3.62k]
  |  Branch (1882:3): [True: 3.62k, False: 0]
  ------------------
 1883|  3.62k|  if(!addr) {
  ------------------
  |  Branch (1883:6): [True: 0, False: 3.62k]
  ------------------
 1884|      0|    result = CURLE_BAD_FUNCTION_ARGUMENT;
 1885|      0|    goto out;
 1886|      0|  }
 1887|       |
 1888|  3.62k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1473|  3.62k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1889|  3.62k|  if(!ctx) {
  ------------------
  |  Branch (1889:6): [True: 0, False: 3.62k]
  ------------------
 1890|      0|    result = CURLE_OUT_OF_MEMORY;
 1891|      0|    goto out;
 1892|      0|  }
 1893|       |
 1894|  3.62k|  result = cf_socket_ctx_init(ctx, peer, addr, transport_peer);
 1895|  3.62k|  if(result)
  ------------------
  |  Branch (1895:6): [True: 0, False: 3.62k]
  ------------------
 1896|      0|    goto out;
 1897|       |
 1898|  3.62k|  result = Curl_cf_create(&cf, &Curl_cft_tcp, ctx);
 1899|       |
 1900|  3.62k|out:
 1901|  3.62k|  *pcf = (!result) ? cf : NULL;
  ------------------
  |  Branch (1901:10): [True: 3.62k, False: 0]
  ------------------
 1902|  3.62k|  if(result) {
  ------------------
  |  Branch (1902:6): [True: 0, False: 3.62k]
  ------------------
 1903|      0|    curlx_safefree(cf);
  ------------------
  |  | 1332|      0|  do {                      \
  |  | 1333|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|      0|    (ptr) = NULL;           \
  |  | 1335|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1904|      0|    cf_socket_ctx_free(ctx);
 1905|      0|  }
 1906|       |
 1907|  3.62k|  return result;
 1908|  3.62k|}
cf-socket.c:socket_open:
  423|  3.62k|{
  424|  3.62k|  char errbuf[STRERROR_LEN];
  425|       |
  426|  3.62k|#ifdef SOCK_CLOEXEC
  427|  3.62k|  addr->socktype |= SOCK_CLOEXEC;
  428|  3.62k|#endif
  429|       |
  430|  3.62k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (430:3): [True: 0, False: 3.62k]
  |  Branch (430:3): [True: 3.62k, False: 0]
  ------------------
  431|  3.62k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (431:3): [True: 0, False: 3.62k]
  |  Branch (431:3): [True: 3.62k, False: 0]
  ------------------
  432|  3.62k|  if(data->set.fopensocket) {
  ------------------
  |  Branch (432:6): [True: 3.62k, False: 0]
  ------------------
  433|       |    /*
  434|       |     * If the opensocket callback is set, all the destination address
  435|       |     * information is passed to the callback. Depending on this information the
  436|       |     * callback may opt to abort the connection, this is indicated returning
  437|       |     * CURL_SOCKET_BAD; otherwise it will return a not-connected socket. When
  438|       |     * the callback returns a valid socket the destination address information
  439|       |     * might have been changed and this 'new' address will actually be used
  440|       |     * here to connect.
  441|       |     */
  442|  3.62k|    struct Curl_mapi_guard guard;
  443|  3.62k|    CURL_CBAPI_START(&guard, data, easy_fopensocket);
  ------------------
  |  |  201|  3.62k|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
  444|  3.62k|    *sockfd = data->set.fopensocket(data->set.opensocket_client,
  445|  3.62k|                                    CURLSOCKTYPE_IPCXN,
  446|  3.62k|                                    (struct curl_sockaddr *)addr);
  447|  3.62k|    CURL_CBAPI_END(&guard);
  ------------------
  |  |  205|  3.62k|  Curl_cbapi_leave(g)
  ------------------
  448|  3.62k|  }
  449|      0|  else {
  450|       |    /* opensocket callback not set, so create the socket now */
  451|      0|#ifdef DEBUGBUILD
  452|      0|    if((addr->family == AF_INET6) && getenv("CURL_DBG_SOCK_FAIL_IPV6")) {
  ------------------
  |  Branch (452:8): [True: 0, False: 0]
  |  Branch (452:38): [True: 0, False: 0]
  ------------------
  453|      0|      failf(data, "CURL_DBG_SOCK_FAIL_IPV6: failed to open socket");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  454|      0|      return CURLE_COULDNT_CONNECT;
  455|      0|    }
  456|      0|#endif
  457|      0|    *sockfd = CURL_SOCKET(addr->family, addr->socktype, addr->protocol);
  ------------------
  |  | 1429|      0|  curl_dbg_socket((int)(domain), type, protocol, __LINE__, __FILE__)
  ------------------
  458|      0|    if((*sockfd == CURL_SOCKET_BAD) && (SOCKERRNO == SOCKENOMEM))
  ------------------
  |  |  147|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
                  if((*sockfd == CURL_SOCKET_BAD) && (SOCKERRNO == SOCKENOMEM))
  ------------------
  |  | 1089|      0|#define SOCKERRNO         errno
  ------------------
                  if((*sockfd == CURL_SOCKET_BAD) && (SOCKERRNO == SOCKENOMEM))
  ------------------
  |  | 1127|      0|#define SOCKENOMEM        ENOMEM
  ------------------
  |  Branch (458:8): [True: 0, False: 0]
  |  Branch (458:40): [True: 0, False: 0]
  ------------------
  459|      0|      return CURLE_OUT_OF_MEMORY;
  460|      0|  }
  461|       |
  462|  3.62k|  if(*sockfd == CURL_SOCKET_BAD) {
  ------------------
  |  |  147|  3.62k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (462:6): [True: 0, False: 3.62k]
  ------------------
  463|       |    /* no socket, no connection */
  464|      0|    failf(data, "failed to open socket: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  465|      0|          curlx_strerror(SOCKERRNO, errbuf, sizeof(errbuf)));
  ------------------
  |  | 1089|      0|#define SOCKERRNO         errno
  ------------------
  466|      0|    return CURLE_COULDNT_CONNECT;
  467|      0|  }
  468|       |
  469|       |#ifdef USE_SO_NOSIGPIPE
  470|       |  if(Curl_sock_nosigpipe(*sockfd) < 0) {
  471|       |    failf(data, "setsockopt enable SO_NOSIGPIPE: %s",
  472|       |          curlx_strerror(SOCKERRNO, errbuf, sizeof(errbuf)));
  473|       |    sclose(*sockfd);
  474|       |    *sockfd = CURL_SOCKET_BAD;
  475|       |    return CURLE_COULDNT_CONNECT;
  476|       |  }
  477|       |#endif /* USE_SO_NOSIGPIPE */
  478|       |
  479|       |#if defined(HAVE_FCNTL) && !defined(SOCK_CLOEXEC)
  480|       |  if(fcntl(*sockfd, F_SETFD, FD_CLOEXEC) < 0) {
  481|       |    failf(data, "fcntl set CLOEXEC: %s",
  482|       |          curlx_strerror(SOCKERRNO, errbuf, sizeof(errbuf)));
  483|       |    sclose(*sockfd);
  484|       |    *sockfd = CURL_SOCKET_BAD;
  485|       |    return CURLE_COULDNT_CONNECT;
  486|       |  }
  487|       |#endif
  488|       |
  489|  3.62k|#if defined(USE_IPV6) && defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
  490|  3.62k|  if(addr->family == AF_INET6) {
  ------------------
  |  Branch (490:6): [True: 0, False: 3.62k]
  ------------------
  491|      0|    struct sockaddr_in6 * const sa6 = (void *)&addr->curl_sa_addr;
  ------------------
  |  |   35|      0|#define curl_sa_addr    addr.sa
  ------------------
  492|      0|    sa6->sin6_scope_id = get_scope_id(data, sa6);
  493|      0|  }
  494|  3.62k|#endif
  495|  3.62k|  return CURLE_OK;
  496|  3.62k|}
cf-socket.c:socket_close:
  529|  3.62k|{
  530|  3.62k|  if(sock == CURL_SOCKET_BAD)
  ------------------
  |  |  147|  3.62k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (530:6): [True: 0, False: 3.62k]
  ------------------
  531|      0|    return 0;
  532|       |
  533|  3.62k|  if(use_callback && conn && conn->fclosesocket) {
  ------------------
  |  Branch (533:6): [True: 3.62k, False: 0]
  |  Branch (533:22): [True: 3.62k, False: 0]
  |  Branch (533:30): [True: 0, False: 3.62k]
  ------------------
  534|      0|    struct Curl_mapi_guard guard;
  535|      0|    int rc;
  536|      0|    Curl_multi_will_close(data, sock);
  537|      0|    CURL_CBAPI_START(&guard, data, easy_closesocket);
  ------------------
  |  |  201|      0|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
  538|      0|    rc = conn->fclosesocket(conn->closesocket_client, sock);
  539|      0|    CURL_CBAPI_END(&guard);
  ------------------
  |  |  205|      0|  Curl_cbapi_leave(g)
  ------------------
  540|      0|    return rc;
  541|      0|  }
  542|       |
  543|  3.62k|  if(conn)
  ------------------
  |  Branch (543:6): [True: 3.62k, False: 0]
  ------------------
  544|       |    /* tell the multi-socket code about this */
  545|  3.62k|    Curl_multi_will_close(data, sock);
  546|       |
  547|  3.62k|  sclose(sock);
  ------------------
  |  | 1421|  3.62k|#define sclose(sockfd) curl_dbg_sclose(sockfd, __LINE__, __FILE__)
  ------------------
  548|       |
  549|  3.62k|  return 0;
  550|  3.62k|}
cf-socket.c:cf_socket_destroy:
 1070|  3.62k|{
 1071|  3.62k|  struct cf_socket_ctx *ctx = cf->ctx;
 1072|       |
 1073|  3.62k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
 1074|  3.62k|  if(ctx) {
  ------------------
  |  Branch (1074:6): [True: 3.62k, False: 0]
  ------------------
 1075|  3.62k|    if(ctx->sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  147|  3.62k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1075:8): [True: 3.62k, False: 0]
  ------------------
 1076|  3.62k|      CURL_TRC_CF(data, cf, "cf_socket_close, fd=%" FMT_SOCKET_T, ctx->sock);
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
 1077|  3.62k|      if(ctx->sock == cf->conn->sock[cf->sockindex])
  ------------------
  |  Branch (1077:10): [True: 3.62k, False: 0]
  ------------------
 1078|  3.62k|        cf->conn->sock[cf->sockindex] = CURL_SOCKET_BAD;
  ------------------
  |  |  147|  3.62k|#define CURL_SOCKET_BAD (-1)
  ------------------
 1079|  3.62k|      socket_close(data, cf->conn, !ctx->accepted, ctx->sock);
 1080|  3.62k|    }
 1081|  3.62k|    cf_socket_ctx_free(ctx);
 1082|  3.62k|  }
 1083|  3.62k|}
cf-socket.c:cf_tcp_connect:
 1413|  3.62k|{
 1414|  3.62k|  struct cf_socket_ctx *ctx = cf->ctx;
 1415|  3.62k|  CURLcode result = CURLE_COULDNT_CONNECT;
 1416|  3.62k|  int rc = 0;
 1417|       |
 1418|  3.62k|  if(cf->connected) {
  ------------------
  |  Branch (1418:6): [True: 0, False: 3.62k]
  ------------------
 1419|      0|    *done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1420|      0|    return CURLE_OK;
 1421|      0|  }
 1422|       |
 1423|  3.62k|  *done = FALSE; /* a negative world view is best */
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
 1424|  3.62k|  if(ctx->sock == CURL_SOCKET_BAD) {
  ------------------
  |  |  147|  3.62k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1424:6): [True: 3.62k, False: 0]
  ------------------
 1425|  3.62k|    int sockerr;
 1426|       |
 1427|  3.62k|    result = cf_socket_open(cf, data);
 1428|  3.62k|    if(result)
  ------------------
  |  Branch (1428:8): [True: 0, False: 3.62k]
  ------------------
 1429|      0|      goto out;
 1430|       |
 1431|  3.62k|    if(cf->connected) {
  ------------------
  |  Branch (1431:8): [True: 3.62k, False: 0]
  ------------------
 1432|  3.62k|      *done = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
 1433|  3.62k|      return CURLE_OK;
 1434|  3.62k|    }
 1435|       |
 1436|       |    /* Connect TCP socket */
 1437|      0|    rc = do_connect(cf, data, (bool)cf->conn->bits.tcp_fastopen);
 1438|      0|    sockerr = SOCKERRNO;
  ------------------
  |  | 1089|      0|#define SOCKERRNO         errno
  ------------------
 1439|      0|    set_local_ip(cf, data);
 1440|      0|    CURL_TRC_CF(data, cf, "local address %s port %d...",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1441|      0|                ctx->ip.local_ip, ctx->ip.local_port);
 1442|      0|    if(rc == -1) {
  ------------------
  |  Branch (1442:8): [True: 0, False: 0]
  ------------------
 1443|      0|      ctx->sockerr = sockerr;
 1444|      0|      result = socket_connect_result(data, ctx->ip.remote_ip, sockerr);
 1445|      0|      goto out;
 1446|      0|    }
 1447|      0|  }
 1448|       |
 1449|       |#ifdef mpeix
 1450|       |  /* Call this function once now, and ignore the results. We do this to
 1451|       |     "clear" the error state on the socket so that we can later read it
 1452|       |     reliably. This is reported necessary on the MPE/iX operating
 1453|       |     system. */
 1454|       |  (void)verifyconnect(ctx->sock, NULL);
 1455|       |#endif
 1456|       |  /* check socket for connect */
 1457|      0|  rc = SOCKET_WRITABLE(ctx->sock, 0);
  ------------------
  |  |   79|      0|  Curl_socket_check(CURL_SOCKET_BAD, CURL_SOCKET_BAD, x, z)
  |  |  ------------------
  |  |  |  |  147|      0|#define CURL_SOCKET_BAD (-1)
  |  |  ------------------
  |  |                 Curl_socket_check(CURL_SOCKET_BAD, CURL_SOCKET_BAD, x, z)
  |  |  ------------------
  |  |  |  |  147|      0|#define CURL_SOCKET_BAD (-1)
  |  |  ------------------
  ------------------
 1458|       |
 1459|      0|  if(rc == 0) { /* no connection yet */
  ------------------
  |  Branch (1459:6): [True: 0, False: 0]
  ------------------
 1460|      0|    CURL_TRC_CF(data, cf, "not connected yet on fd=%" FMT_SOCKET_T, ctx->sock);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1461|      0|    return CURLE_OK;
 1462|      0|  }
 1463|      0|  else if(rc == CURL_CSELECT_OUT || cf->conn->bits.tcp_fastopen) {
  ------------------
  |  |  291|      0|#define CURL_CSELECT_OUT  0x02
  ------------------
  |  Branch (1463:11): [True: 0, False: 0]
  |  Branch (1463:37): [True: 0, False: 0]
  ------------------
 1464|      0|    if(verifyconnect(ctx->sock, &ctx->sockerr)) {
  ------------------
  |  Branch (1464:8): [True: 0, False: 0]
  ------------------
 1465|       |      /* we are connected with TCP, awesome! */
 1466|      0|      ctx->connected_at = *Curl_pgrs_now(data);
 1467|      0|      set_local_ip(cf, data);
 1468|      0|      *done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1469|      0|      cf->connected = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1470|      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))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1471|      0|      return CURLE_OK;
 1472|      0|    }
 1473|      0|  }
 1474|      0|  else if(rc & CURL_CSELECT_ERR) {
  ------------------
  |  |  292|      0|#define CURL_CSELECT_ERR  0x04
  ------------------
  |  Branch (1474:11): [True: 0, False: 0]
  ------------------
 1475|      0|    CURL_TRC_CF(data, cf, "poll/select error on fd=%" FMT_SOCKET_T, ctx->sock);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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|    (void)verifyconnect(ctx->sock, &ctx->sockerr);
 1477|      0|    result = CURLE_COULDNT_CONNECT;
 1478|      0|  }
 1479|       |
 1480|      0|out:
 1481|      0|  if(result) {
  ------------------
  |  Branch (1481:6): [True: 0, False: 0]
  ------------------
 1482|      0|    VERBOSE(char buffer[STRERROR_LEN]);
  ------------------
  |  | 1611|      0|#define VERBOSE(x) x
  ------------------
 1483|      0|    set_local_ip(cf, data);
 1484|      0|    if(ctx->sockerr) {
  ------------------
  |  Branch (1484:8): [True: 0, False: 0]
  ------------------
 1485|      0|      data->state.os_errno = ctx->sockerr;
 1486|      0|      SET_SOCKERRNO(ctx->sockerr);
  ------------------
  |  | 1090|      0|#define SET_SOCKERRNO(x)  (errno = (x))
  ------------------
 1487|      0|      VERBOSE(curlx_strerror(ctx->sockerr, buffer, sizeof(buffer)));
  ------------------
  |  | 1611|      0|#define VERBOSE(x) x
  ------------------
 1488|      0|    }
 1489|      0|    else {
 1490|      0|      VERBOSE(curlx_strcopy(buffer, sizeof(buffer), STRCONST("peer closed")));
  ------------------
  |  | 1611|      0|#define VERBOSE(x) x
  ------------------
 1491|      0|    }
 1492|      0|    if(ctx->sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  147|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1492:8): [True: 0, False: 0]
  ------------------
 1493|      0|      socket_close(data, cf->conn, TRUE, ctx->sock);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1494|      0|      ctx->sock = CURL_SOCKET_BAD;
  ------------------
  |  |  147|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
 1495|      0|    }
 1496|      0|    infof(data, "connect to %s port %u from %s port %d failed: %s",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1497|      0|          ctx->ip.remote_ip, ctx->ip.remote_port,
 1498|      0|          ctx->ip.local_ip, ctx->ip.local_port,
 1499|      0|          curlx_strerror(ctx->sockerr, buffer, sizeof(buffer)));
 1500|       |    *done = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1501|      0|  }
 1502|      0|  return result;
 1503|      0|}
cf-socket.c:cf_socket_open:
 1197|  3.62k|{
 1198|  3.62k|  struct cf_socket_ctx *ctx = cf->ctx;
 1199|  3.62k|  int error = 0;
 1200|  3.62k|  bool isconnected = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
 1201|  3.62k|  CURLcode result = CURLE_COULDNT_CONNECT;
 1202|  3.62k|  bool is_tcp;
 1203|       |
 1204|  3.62k|  DEBUGASSERT(ctx->sock == CURL_SOCKET_BAD);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1204:3): [True: 0, False: 3.62k]
  |  Branch (1204:3): [True: 3.62k, False: 0]
  ------------------
 1205|  3.62k|  ctx->started_at = *Curl_pgrs_now(data);
 1206|  3.62k|#ifdef CURL_USE_SOCK_NONBLOCK
 1207|       |  /* Do not tuck SOCK_NONBLOCK into socktype when opensocket callback is set
 1208|       |   * because we would not know how socktype is about to be used in the
 1209|       |   * callback, SOCK_NONBLOCK might get factored out before calling socket().
 1210|       |   */
 1211|  3.62k|  if(!data->set.fopensocket)
  ------------------
  |  Branch (1211:6): [True: 0, False: 3.62k]
  ------------------
 1212|      0|    ctx->addr.socktype |= SOCK_NONBLOCK;
 1213|  3.62k|#endif
 1214|  3.62k|  result = socket_open(data, &ctx->addr, &ctx->sock);
 1215|  3.62k|#ifdef CURL_USE_SOCK_NONBLOCK
 1216|       |  /* Restore the socktype after the socket is created. */
 1217|  3.62k|  if(!data->set.fopensocket)
  ------------------
  |  Branch (1217:6): [True: 0, False: 3.62k]
  ------------------
 1218|      0|    ctx->addr.socktype &= ~SOCK_NONBLOCK;
 1219|  3.62k|#endif
 1220|  3.62k|  if(result)
  ------------------
  |  Branch (1220:6): [True: 0, False: 3.62k]
  ------------------
 1221|      0|    goto out;
 1222|       |
 1223|  3.62k|  result = set_remote_ip(cf, data);
 1224|  3.62k|  if(result)
  ------------------
  |  Branch (1224:6): [True: 0, False: 3.62k]
  ------------------
 1225|      0|    goto out;
 1226|       |
 1227|  3.62k|#ifdef USE_IPV6
 1228|  3.62k|  if(ctx->addr.family == AF_INET6) {
  ------------------
  |  Branch (1228:6): [True: 0, False: 3.62k]
  ------------------
 1229|       |#ifdef USE_WINSOCK
 1230|       |    /* Turn on support for IPv4-mapped IPv6 addresses.
 1231|       |     * Linux kernel, NetBSD, FreeBSD, Darwin, lwIP: default is off;
 1232|       |     * Windows Vista and later: default is on;
 1233|       |     * DragonFly BSD: acts like off, and dummy setting;
 1234|       |     * OpenBSD and earlier Windows: unsupported.
 1235|       |     * Linux: controlled by /proc/sys/net/ipv6/bindv6only.
 1236|       |     */
 1237|       |    int on = 0;
 1238|       |    (void)setsockopt(ctx->sock, IPPROTO_IPV6, IPV6_V6ONLY,
 1239|       |                     (void *)&on, sizeof(on));
 1240|       |#endif
 1241|      0|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
 1242|      0|    {
 1243|      0|      struct sockaddr_in6 *sa6 = (void *)&ctx->addr.curl_sa_addr;
  ------------------
  |  |   35|      0|#define curl_sa_addr    addr.sa
  ------------------
 1244|      0|      if(sa6->sin6_scope_id)
  ------------------
  |  Branch (1244:10): [True: 0, False: 0]
  ------------------
 1245|      0|        infof(data, "  Trying [%s]:%d scope_id=%lu...",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1246|      0|              ctx->ip.remote_ip, ctx->ip.remote_port,
 1247|      0|              (unsigned long)sa6->sin6_scope_id);
 1248|      0|      else
 1249|      0|#endif
 1250|      0|        infof(data, "  Trying [%s]:%d...",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1251|      0|              ctx->ip.remote_ip, ctx->ip.remote_port);
 1252|      0|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
 1253|      0|    }
 1254|      0|#endif
 1255|      0|  }
 1256|  3.62k|  else
 1257|  3.62k|#endif
 1258|  3.62k|    infof(data, "  Trying %s:%d...", ctx->ip.remote_ip, ctx->ip.remote_port);
  ------------------
  |  |  143|  3.62k|  do {                               \
  |  |  144|  3.62k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  3.62k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  ------------------
  |  |  |  |  323|  3.62k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  3.62k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
 1259|       |
 1260|  3.62k|#ifdef USE_IPV6
 1261|  3.62k|  is_tcp = (ctx->addr.family == AF_INET ||
  ------------------
  |  Branch (1261:13): [True: 3.62k, False: 0]
  ------------------
 1262|      0|            ctx->addr.family == AF_INET6) &&
  ------------------
  |  Branch (1262:13): [True: 0, False: 0]
  ------------------
 1263|  3.62k|    cf_socktype(ctx->addr.socktype) == SOCK_STREAM;
  ------------------
  |  Branch (1263:5): [True: 3.62k, False: 0]
  ------------------
 1264|       |#else
 1265|       |  is_tcp = (ctx->addr.family == AF_INET) &&
 1266|       |    cf_socktype(ctx->addr.socktype) == SOCK_STREAM;
 1267|       |#endif
 1268|  3.62k|  if(is_tcp) {
  ------------------
  |  Branch (1268:6): [True: 3.62k, False: 0]
  ------------------
 1269|  3.62k|    if(data->set.tcp_nodelay)
  ------------------
  |  Branch (1269:8): [True: 3.62k, False: 0]
  ------------------
 1270|  3.62k|      tcpnodelay(cf, data, ctx->sock);
 1271|       |
 1272|  3.62k|    if(data->set.tcp_keepalive)
  ------------------
  |  Branch (1272:8): [True: 0, False: 3.62k]
  ------------------
 1273|      0|      tcpkeepalive(cf, data, ctx->sock);
 1274|       |
 1275|  3.62k|    tcplocalhost(cf, ctx->sock);
 1276|  3.62k|  }
 1277|       |
 1278|  3.62k|  if(data->set.fsockopt) {
  ------------------
  |  Branch (1278:6): [True: 3.62k, False: 0]
  ------------------
 1279|       |    /* activate callback for setting socket options */
 1280|  3.62k|    struct Curl_mapi_guard guard;
 1281|  3.62k|    CURL_CBAPI_START(&guard, data, easy_fsockopt);
  ------------------
  |  |  201|  3.62k|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
 1282|  3.62k|    error = data->set.fsockopt(data->set.sockopt_client,
 1283|  3.62k|                               ctx->sock,
 1284|  3.62k|                               CURLSOCKTYPE_IPCXN);
 1285|  3.62k|    CURL_CBAPI_END(&guard);
  ------------------
  |  |  205|  3.62k|  Curl_cbapi_leave(g)
  ------------------
 1286|       |
 1287|  3.62k|    if(error == CURL_SOCKOPT_ALREADY_CONNECTED)
  ------------------
  |  |  423|  3.62k|#define CURL_SOCKOPT_ALREADY_CONNECTED 2
  ------------------
  |  Branch (1287:8): [True: 3.62k, False: 0]
  ------------------
 1288|  3.62k|      isconnected = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
 1289|      0|    else if(error) {
  ------------------
  |  Branch (1289:13): [True: 0, False: 0]
  ------------------
 1290|      0|      result = CURLE_ABORTED_BY_CALLBACK;
 1291|      0|      goto out;
 1292|      0|    }
 1293|  3.62k|  }
 1294|       |
 1295|  3.62k|#ifndef CURL_DISABLE_BINDLOCAL
 1296|       |  /* possibly bind the local end to an IP, interface or port */
 1297|  3.62k|  if(ctx->addr.family == AF_INET
  ------------------
  |  Branch (1297:6): [True: 3.62k, False: 0]
  ------------------
 1298|      0|#ifdef USE_IPV6
 1299|      0|     || ctx->addr.family == AF_INET6
  ------------------
  |  Branch (1299:9): [True: 0, False: 0]
  ------------------
 1300|  3.62k|#endif
 1301|  3.62k|    ) {
 1302|  3.62k|    result = bindlocal(data, cf->conn, ctx->sock, ctx->addr.family,
 1303|  3.62k|                       Curl_ipv6_scope(&ctx->addr.curl_sa_addr),
  ------------------
  |  |   35|  3.62k|#define curl_sa_addr    addr.sa
  ------------------
 1304|  3.62k|                       ctx->transport);
 1305|  3.62k|    if(result) {
  ------------------
  |  Branch (1305:8): [True: 0, False: 3.62k]
  ------------------
 1306|      0|      if(result == CURLE_UNSUPPORTED_PROTOCOL) {
  ------------------
  |  Branch (1306:10): [True: 0, False: 0]
  ------------------
 1307|       |        /* The address family is not supported on this interface.
 1308|       |           We can continue trying addresses */
 1309|      0|        result = CURLE_COULDNT_CONNECT;
 1310|      0|      }
 1311|      0|      goto out;
 1312|      0|    }
 1313|  3.62k|  }
 1314|  3.62k|#endif
 1315|       |
 1316|       |#ifndef CURL_USE_SOCK_NONBLOCK
 1317|       |  /* Set socket non-blocking, must be a non-blocking socket for
 1318|       |   * a non-blocking connect. */
 1319|       |  error = curlx_nonblock(ctx->sock, TRUE);
 1320|       |  if(error < 0) {
 1321|       |    result = CURLE_UNSUPPORTED_PROTOCOL;
 1322|       |    ctx->sockerr = SOCKERRNO;
 1323|       |    goto out;
 1324|       |  }
 1325|       |#else
 1326|  3.62k|  if(data->set.fopensocket) {
  ------------------
  |  Branch (1326:6): [True: 3.62k, False: 0]
  ------------------
 1327|       |    /* Set socket non-blocking, must be a non-blocking socket for
 1328|       |     * a non-blocking connect. */
 1329|  3.62k|    error = curlx_nonblock(ctx->sock, TRUE);
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
 1330|  3.62k|    if(error < 0) {
  ------------------
  |  Branch (1330:8): [True: 0, False: 3.62k]
  ------------------
 1331|      0|      result = CURLE_UNSUPPORTED_PROTOCOL;
 1332|      0|      ctx->sockerr = SOCKERRNO;
  ------------------
  |  | 1089|      0|#define SOCKERRNO         errno
  ------------------
 1333|      0|      goto out;
 1334|      0|    }
 1335|  3.62k|  }
 1336|  3.62k|#endif
 1337|  3.62k|  ctx->sock_connected = (cf_socktype(ctx->addr.socktype) != SOCK_DGRAM);
 1338|  3.62k|out:
 1339|  3.62k|  if(result) {
  ------------------
  |  Branch (1339:6): [True: 0, False: 3.62k]
  ------------------
 1340|      0|    if(ctx->sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  147|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1340:8): [True: 0, False: 0]
  ------------------
 1341|      0|      socket_close(data, cf->conn, TRUE, ctx->sock);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1342|      0|      ctx->sock = CURL_SOCKET_BAD;
  ------------------
  |  |  147|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
 1343|      0|    }
 1344|      0|  }
 1345|  3.62k|  else if(isconnected) {
  ------------------
  |  Branch (1345:11): [True: 3.62k, False: 0]
  ------------------
 1346|  3.62k|    set_local_ip(cf, data);
 1347|  3.62k|    ctx->connected_at = *Curl_pgrs_now(data);
 1348|  3.62k|    cf->connected = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
 1349|  3.62k|  }
 1350|  3.62k|  CURL_TRC_CF(data, cf, "cf_socket_open() -> %d, fd=%" FMT_SOCKET_T,
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
 1351|  3.62k|              (int)result, ctx->sock);
 1352|  3.62k|  return result;
 1353|  3.62k|}
cf-socket.c:set_remote_ip:
 1120|  3.62k|{
 1121|  3.62k|  struct cf_socket_ctx *ctx = cf->ctx;
 1122|  3.62k|  CURLcode result;
 1123|       |
 1124|       |  /* store remote address and port used in this connection attempt */
 1125|  3.62k|  ctx->ip.transport = ctx->transport;
 1126|  3.62k|  result = sockaddr2string(&ctx->addr.curl_sa_addr,
  ------------------
  |  |   35|  3.62k|#define curl_sa_addr    addr.sa
  ------------------
 1127|  3.62k|                           (curl_socklen_t)ctx->addr.addrlen,
 1128|  3.62k|                           ctx->ip.remote_ip, &ctx->ip.remote_port);
 1129|  3.62k|  if(result) {
  ------------------
  |  Branch (1129:6): [True: 0, False: 3.62k]
  ------------------
 1130|      0|    ctx->sockerr = SOCKEAFNOSUPPORT;
  ------------------
  |  | 1118|      0|#define SOCKEAFNOSUPPORT  EAFNOSUPPORT
  ------------------
 1131|       |    /* malformed address or bug in inet_ntop, try next address */
 1132|      0|    failf(data, "curl_sa_addr inet_ntop() failed with %d", (int)result);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1133|      0|    return CURLE_FAILED_INIT;
 1134|      0|  }
 1135|  3.62k|  return CURLE_OK;
 1136|  3.62k|}
cf-socket.c:cf_socktype:
 1141|  7.25k|{
 1142|  7.25k|#ifdef SOCK_CLOEXEC
 1143|  7.25k|  x &= ~SOCK_CLOEXEC;
 1144|  7.25k|#endif
 1145|  7.25k|#ifdef CURL_USE_SOCK_NONBLOCK
 1146|       |  x &= ~SOCK_NONBLOCK;
 1147|  7.25k|#endif
 1148|  7.25k|  return x;
 1149|  7.25k|}
cf-socket.c:tcpnodelay:
  155|  3.62k|{
  156|  3.62k|#if defined(TCP_NODELAY) && defined(CURL_TCP_NODELAY_SUPPORTED)
  157|  3.62k|  curl_socklen_t onoff = (curl_socklen_t)1;
  158|  3.62k|  int level = IPPROTO_TCP;
  159|  3.62k|  VERBOSE(char buffer[STRERROR_LEN]);
  ------------------
  |  | 1611|  3.62k|#define VERBOSE(x) x
  ------------------
  160|       |
  161|  3.62k|  if(setsockopt(sockfd, level, TCP_NODELAY, (void *)&onoff, sizeof(onoff)) < 0)
  ------------------
  |  Branch (161:6): [True: 3.62k, False: 0]
  ------------------
  162|  3.62k|    CURL_TRC_CF(data, cf, "Could not set TCP_NODELAY: %s",
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  163|  3.62k|                curlx_strerror(SOCKERRNO, buffer, sizeof(buffer)));
  164|       |#else
  165|       |  (void)cf;
  166|       |  (void)data;
  167|       |  (void)sockfd;
  168|       |#endif
  169|  3.62k|}
cf-socket.c:bindlocal:
  647|  3.62k|{
  648|  3.62k|  struct Curl_sockaddr_storage sa;
  649|  3.62k|  struct sockaddr *sock = (struct sockaddr *)&sa;  /* bind to this address */
  650|  3.62k|  curl_socklen_t sizeof_sa = 0; /* size of the data sock points to */
  651|  3.62k|  struct sockaddr_in *si4 = (struct sockaddr_in *)&sa;
  652|  3.62k|#ifdef USE_IPV6
  653|  3.62k|  struct sockaddr_in6 *si6 = (struct sockaddr_in6 *)&sa;
  654|  3.62k|#endif
  655|       |
  656|  3.62k|  struct Curl_dns_entry *h = NULL;
  657|  3.62k|  unsigned short port = data->set.localport; /* use this port number, 0 for
  658|       |                                                "random" */
  659|       |  /* how many port numbers to try to bind to, increasing one at a time */
  660|  3.62k|  int portnum = data->set.localportrange;
  661|  3.62k|  const char *dev = CURL_EASY_STR(data, STRING_DEVICE);
  ------------------
  |  | 1228|  3.62k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
  662|  3.62k|  const char *iface_input = CURL_EASY_STR(data, STRING_INTERFACE);
  ------------------
  |  | 1228|  3.62k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
  663|  3.62k|  const char *host_input = CURL_EASY_STR(data, STRING_BINDHOST);
  ------------------
  |  | 1228|  3.62k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
  664|  3.62k|  const char *iface = iface_input ? iface_input : dev;
  ------------------
  |  Branch (664:23): [True: 0, False: 3.62k]
  ------------------
  665|  3.62k|  const char *host = host_input ? host_input : dev;
  ------------------
  |  Branch (665:22): [True: 0, False: 3.62k]
  ------------------
  666|  3.62k|  int sockerr;
  667|  3.62k|#ifdef IP_BIND_ADDRESS_NO_PORT
  668|  3.62k|  int on = 1;
  669|  3.62k|#endif
  670|       |#ifndef USE_IPV6
  671|       |  (void)scope;
  672|       |#endif
  673|       |
  674|       |  /*************************************************************
  675|       |   * Select device to bind socket to
  676|       |   *************************************************************/
  677|  3.62k|  if(!iface && !host && !port)
  ------------------
  |  Branch (677:6): [True: 3.62k, False: 0]
  |  Branch (677:16): [True: 3.62k, False: 0]
  |  Branch (677:25): [True: 3.62k, False: 0]
  ------------------
  678|       |    /* no local kind of binding was requested */
  679|  3.62k|    return CURLE_OK;
  680|      0|  else if(iface && (strlen(iface) >= 255))
  ------------------
  |  Branch (680:11): [True: 0, False: 0]
  |  Branch (680:20): [True: 0, False: 0]
  ------------------
  681|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  682|       |
  683|      0|  memset(&sa, 0, sizeof(struct Curl_sockaddr_storage));
  684|       |
  685|      0|  if(iface || host) {
  ------------------
  |  Branch (685:6): [True: 0, False: 0]
  |  Branch (685:15): [True: 0, False: 0]
  ------------------
  686|      0|    char myhost[256] = "";
  687|      0|    int done = 0; /* -1 for error, 1 for address found */
  688|      0|    if2ip_result_t if2ip_result = IF2IP_NOT_FOUND;
  689|       |
  690|      0|#ifdef SO_BINDTODEVICE
  691|      0|    if(iface) {
  ------------------
  |  Branch (691:8): [True: 0, False: 0]
  ------------------
  692|       |      /*
  693|       |       * This binds the local socket to a particular interface. This will
  694|       |       * force even requests to other local interfaces to go out the external
  695|       |       * interface. Only bind to the interface when specified as interface,
  696|       |       * not as a hostname or ip address.
  697|       |       *
  698|       |       * The interface might be a VRF, eg: vrf-blue, which means it cannot be
  699|       |       * converted to an IP address and would fail Curl_if2ip. Try to
  700|       |       * use it straight away.
  701|       |       */
  702|      0|      if(setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE,
  ------------------
  |  Branch (702:10): [True: 0, False: 0]
  ------------------
  703|      0|                    iface, (curl_socklen_t)strlen(iface) + 1) == 0) {
  704|       |        /* This is often "errno 1, error: Operation not permitted" if you are
  705|       |         * not running as root or another suitable privileged user. If it
  706|       |         * succeeds it means the parameter was a valid interface and not an IP
  707|       |         * address. Return immediately.
  708|       |         */
  709|      0|        if(!host_input) {
  ------------------
  |  Branch (709:12): [True: 0, False: 0]
  ------------------
  710|      0|          infof(data, "socket successfully bound to interface '%s'", iface);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  711|      0|          return CURLE_OK;
  712|      0|        }
  713|      0|      }
  714|      0|    }
  715|      0|#endif
  716|      0|    if(!host_input) {
  ------------------
  |  Branch (716:8): [True: 0, False: 0]
  ------------------
  717|       |      /* Discover IP from input device, then bind to it */
  718|      0|      if2ip_result = Curl_if2ip(af,
  719|      0|#ifdef USE_IPV6
  720|      0|                                scope, conn->scope_id,
  721|      0|#endif
  722|      0|                                iface, myhost, sizeof(myhost));
  723|      0|    }
  724|      0|    switch(if2ip_result) {
  ------------------
  |  Branch (724:12): [True: 0, False: 0]
  ------------------
  725|      0|    case IF2IP_NOT_FOUND:
  ------------------
  |  Branch (725:5): [True: 0, False: 0]
  ------------------
  726|      0|      if(iface_input && !host_input) {
  ------------------
  |  Branch (726:10): [True: 0, False: 0]
  |  Branch (726:25): [True: 0, False: 0]
  ------------------
  727|       |        /* Do not fall back to treating it as a hostname */
  728|      0|        char buffer[STRERROR_LEN];
  729|      0|        data->state.os_errno = sockerr = SOCKERRNO;
  ------------------
  |  | 1089|      0|#define SOCKERRNO         errno
  ------------------
  730|      0|        failf(data, "Could not bind to interface '%s' with errno %d: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  731|      0|              iface, sockerr, curlx_strerror(sockerr, buffer, sizeof(buffer)));
  732|      0|        return CURLE_INTERFACE_FAILED;
  733|      0|      }
  734|      0|      break;
  735|      0|    case IF2IP_AF_NOT_SUPPORTED:
  ------------------
  |  Branch (735:5): [True: 0, False: 0]
  ------------------
  736|       |      /* Signal the caller to try another address family if available */
  737|      0|      return CURLE_UNSUPPORTED_PROTOCOL;
  738|      0|    case IF2IP_FOUND:
  ------------------
  |  Branch (738:5): [True: 0, False: 0]
  ------------------
  739|       |      /*
  740|       |       * We now have the numerical IP address in the 'myhost' buffer
  741|       |       */
  742|      0|      host = myhost;
  743|      0|      infof(data, "Local Interface %s is ip %s using address family %d",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  744|      0|            iface, host, af);
  745|      0|      done = 1;
  746|      0|      break;
  747|      0|    }
  748|      0|    if(!iface_input || host_input) {
  ------------------
  |  Branch (748:8): [True: 0, False: 0]
  |  Branch (748:24): [True: 0, False: 0]
  ------------------
  749|       |      /*
  750|       |       * This was not an interface, resolve the name as a hostname
  751|       |       * or IP number
  752|       |       *
  753|       |       * Temporarily force name resolution to use only the address type
  754|       |       * of the connection. The resolve functions should really be changed
  755|       |       * to take a type parameter instead.
  756|       |       */
  757|      0|      uint8_t dns_queries = (af == AF_INET) ?
  ------------------
  |  Branch (757:29): [True: 0, False: 0]
  ------------------
  758|      0|                            CURL_DNSQ_A : (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                                          CURL_DNSQ_A : (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                                          CURL_DNSQ_A : (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  759|      0|#ifdef USE_IPV6
  760|      0|      if(af == AF_INET6)
  ------------------
  |  Branch (760:10): [True: 0, False: 0]
  ------------------
  761|      0|        dns_queries = CURL_DNSQ_AAAA;
  ------------------
  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  762|      0|#endif
  763|       |
  764|      0|      (void)Curl_resolv_blocking(data, dns_queries, host, 80, transport, &h);
  765|      0|      if(h) {
  ------------------
  |  Branch (765:10): [True: 0, False: 0]
  ------------------
  766|      0|        int h_af = h->addr->ai_family;
  767|       |        /* convert the resolved address, sizeof myhost >= INET_ADDRSTRLEN */
  768|      0|        Curl_printable_address(h->addr, myhost, sizeof(myhost));
  769|      0|        infof(data, "Name '%s' family %d resolved to '%s' family %d",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  770|      0|              host, af, myhost, h_af);
  771|      0|        Curl_dns_entry_unlink(data, &h); /* this will NULL, potential free h */
  772|      0|        if(af != h_af) {
  ------------------
  |  Branch (772:12): [True: 0, False: 0]
  ------------------
  773|       |          /* bad IP version combo, signal the caller to try another address
  774|       |             family if available */
  775|      0|          return CURLE_UNSUPPORTED_PROTOCOL;
  776|      0|        }
  777|      0|        done = 1;
  778|      0|      }
  779|      0|      else {
  780|       |        /*
  781|       |         * provided dev was no interface (or interfaces are not supported
  782|       |         * e.g. Solaris) no ip address and no domain we fail here
  783|       |         */
  784|      0|        done = -1;
  785|      0|      }
  786|      0|    }
  787|       |
  788|      0|    if(done > 0) {
  ------------------
  |  Branch (788:8): [True: 0, False: 0]
  ------------------
  789|      0|#ifdef USE_IPV6
  790|       |      /* IPv6 address */
  791|      0|      if(af == AF_INET6) {
  ------------------
  |  Branch (791:10): [True: 0, False: 0]
  ------------------
  792|      0|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
  793|      0|        char *scope_ptr = strchr(myhost, '%');
  794|      0|        if(scope_ptr)
  ------------------
  |  Branch (794:12): [True: 0, False: 0]
  ------------------
  795|      0|          *(scope_ptr++) = '\0';
  796|      0|#endif
  797|      0|        if(curlx_inet_pton(AF_INET6, myhost, &si6->sin6_addr) > 0) {
  ------------------
  |  Branch (797:12): [True: 0, False: 0]
  ------------------
  798|      0|          si6->sin6_family = AF_INET6;
  799|      0|          si6->sin6_port = htons(port);
  800|      0|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
  801|      0|          if(scope_ptr) {
  ------------------
  |  Branch (801:14): [True: 0, False: 0]
  ------------------
  802|       |            /* The "myhost" string either comes from Curl_if2ip or from
  803|       |               Curl_printable_address. The latter returns only numeric scope
  804|       |               IDs and the former returns none at all. Making the scope ID,
  805|       |               if present, known to be numeric */
  806|      0|            curl_off_t scope_id;
  807|      0|            if(curlx_str_number((const char **)CURL_UNCONST(&scope_ptr),
  ------------------
  |  |  856|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  |  Branch (807:16): [True: 0, False: 0]
  ------------------
  808|      0|                                &scope_id, UINT_MAX))
  809|      0|              return CURLE_UNSUPPORTED_PROTOCOL;
  810|      0|            si6->sin6_scope_id = (unsigned int)scope_id;
  811|      0|          }
  812|      0|#endif
  813|      0|        }
  814|      0|        sizeof_sa = sizeof(struct sockaddr_in6);
  815|      0|      }
  816|      0|      else
  817|      0|#endif
  818|       |      /* IPv4 address */
  819|      0|      if((af == AF_INET) &&
  ------------------
  |  Branch (819:10): [True: 0, False: 0]
  ------------------
  820|      0|         (curlx_inet_pton(AF_INET, myhost, &si4->sin_addr) > 0)) {
  ------------------
  |  Branch (820:10): [True: 0, False: 0]
  ------------------
  821|      0|        si4->sin_family = AF_INET;
  822|      0|        si4->sin_port = htons(port);
  823|      0|        sizeof_sa = sizeof(struct sockaddr_in);
  824|      0|      }
  825|      0|    }
  826|       |
  827|      0|    if(done < 1) {
  ------------------
  |  Branch (827:8): [True: 0, False: 0]
  ------------------
  828|       |      /* errorbuf is set false so failf will overwrite any message already in
  829|       |         the error buffer, so the user receives this error message instead of a
  830|       |         generic resolve error. */
  831|      0|      char buffer[STRERROR_LEN];
  832|      0|      data->state.errorbuf = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  833|      0|      data->state.os_errno = sockerr = SOCKERRNO;
  ------------------
  |  | 1089|      0|#define SOCKERRNO         errno
  ------------------
  834|      0|      failf(data, "Could not bind to '%s' with errno %d: %s", host,
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  835|      0|            sockerr, curlx_strerror(sockerr, buffer, sizeof(buffer)));
  836|      0|      return CURLE_INTERFACE_FAILED;
  837|      0|    }
  838|      0|  }
  839|      0|  else {
  840|       |    /* no device was given, prepare sa to match af's needs */
  841|      0|#ifdef USE_IPV6
  842|      0|    if(af == AF_INET6) {
  ------------------
  |  Branch (842:8): [True: 0, False: 0]
  ------------------
  843|      0|      si6->sin6_family = AF_INET6;
  844|      0|      si6->sin6_port = htons(port);
  845|      0|      sizeof_sa = sizeof(struct sockaddr_in6);
  846|      0|    }
  847|      0|    else
  848|      0|#endif
  849|      0|    if(af == AF_INET) {
  ------------------
  |  Branch (849:8): [True: 0, False: 0]
  ------------------
  850|      0|      si4->sin_family = AF_INET;
  851|      0|      si4->sin_port = htons(port);
  852|      0|      sizeof_sa = sizeof(struct sockaddr_in);
  853|      0|    }
  854|      0|  }
  855|      0|#ifdef IP_BIND_ADDRESS_NO_PORT
  856|      0|  (void)setsockopt(sockfd, SOL_IP, IP_BIND_ADDRESS_NO_PORT, &on, sizeof(on));
  857|      0|#endif
  858|      0|  for(;;) {
  859|      0|    if(bind(sockfd, sock, sizeof_sa) >= 0) {
  ------------------
  |  Branch (859:8): [True: 0, False: 0]
  ------------------
  860|       |      /* we succeeded to bind */
  861|      0|      infof(data, "Local port: %hu", port);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  862|      0|      conn->bits.bound = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  863|      0|      return CURLE_OK;
  864|      0|    }
  865|       |
  866|      0|    if(--portnum > 0) {
  ------------------
  |  Branch (866:8): [True: 0, False: 0]
  ------------------
  867|      0|      port++; /* try next port */
  868|      0|      if(port == 0)
  ------------------
  |  Branch (868:10): [True: 0, False: 0]
  ------------------
  869|      0|        break;
  870|      0|      infof(data, "Bind to local port %d failed, trying next", port - 1);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  871|       |      /* We reuse/clobber the port variable here below */
  872|      0|      if(sock->sa_family == AF_INET)
  ------------------
  |  Branch (872:10): [True: 0, False: 0]
  ------------------
  873|      0|        si4->sin_port = htons(port);
  874|      0|#ifdef USE_IPV6
  875|      0|      else
  876|      0|        si6->sin6_port = htons(port);
  877|      0|#endif
  878|      0|    }
  879|      0|    else
  880|      0|      break;
  881|      0|  }
  882|      0|  {
  883|      0|    char buffer[STRERROR_LEN];
  884|      0|    data->state.os_errno = sockerr = SOCKERRNO;
  ------------------
  |  | 1089|      0|#define SOCKERRNO         errno
  ------------------
  885|      0|    failf(data, "bind failed with errno %d: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  886|      0|          sockerr, curlx_strerror(sockerr, buffer, sizeof(buffer)));
  887|      0|  }
  888|       |
  889|      0|  return CURLE_INTERFACE_FAILED;
  890|      0|}
cf-socket.c:cf_socket_shutdown:
 1050|  3.01k|{
 1051|  3.01k|  if(cf->connected) {
  ------------------
  |  Branch (1051:6): [True: 3.01k, False: 0]
  ------------------
 1052|  3.01k|    struct cf_socket_ctx *ctx = cf->ctx;
 1053|       |
 1054|  3.01k|    CURL_TRC_CF(data, cf, "cf_socket_shutdown, fd=%" FMT_SOCKET_T, ctx->sock);
  ------------------
  |  |  153|  3.01k|  do {                                          \
  |  |  154|  3.01k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.01k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  6.02k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.01k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.01k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  6.02k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.01k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.01k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.01k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.01k]
  |  |  ------------------
  ------------------
 1055|       |    /* On TCP, and when the socket looks well and non-blocking mode
 1056|       |     * can be enabled, receive dangling bytes before close to avoid
 1057|       |     * entering RST states unnecessarily. */
 1058|  3.01k|    if(ctx->sock != CURL_SOCKET_BAD &&
  ------------------
  |  |  147|  6.02k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1058:8): [True: 3.01k, False: 0]
  ------------------
 1059|  3.01k|       ctx->transport == TRNSPRT_TCP &&
  ------------------
  |  |  238|  6.02k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (1059:8): [True: 3.01k, False: 0]
  ------------------
 1060|  3.01k|       (curlx_nonblock(ctx->sock, TRUE) >= 0)) {
  ------------------
  |  | 1045|  3.01k|#define TRUE true
  ------------------
  |  Branch (1060:8): [True: 3.01k, False: 0]
  ------------------
 1061|  3.01k|      unsigned char buf[1024];
 1062|  3.01k|      (void)sread(ctx->sock, buf, sizeof(buf));
  ------------------
  |  |  944|  3.01k|#define sread(x, y, z) (ssize_t)recv((RECV_TYPE_ARG1)(x), \
  |  |  945|  3.01k|                                     (RECV_TYPE_ARG2)(y), \
  |  |  946|  3.01k|                                     (RECV_TYPE_ARG3)(z), \
  |  |  947|  3.01k|                                     (RECV_TYPE_ARG4)(0))
  ------------------
 1063|  3.01k|    }
 1064|  3.01k|  }
 1065|       |  *done = TRUE;
  ------------------
  |  | 1045|  3.01k|#define TRUE true
  ------------------
 1066|  3.01k|  return CURLE_OK;
 1067|  3.01k|}
cf-socket.c:cf_socket_send:
 1567|  13.9k|{
 1568|  13.9k|  struct cf_socket_ctx *ctx = cf->ctx;
 1569|  13.9k|  curl_socket_t fdsave;
 1570|  13.9k|  ssize_t rv;
 1571|  13.9k|  CURLcode result = CURLE_OK;
 1572|  13.9k|  VERBOSE(size_t orig_len = len);
  ------------------
  |  | 1611|  13.9k|#define VERBOSE(x) x
  ------------------
 1573|       |
 1574|  13.9k|  (void)eos;
 1575|  13.9k|  *pnwritten = 0;
 1576|  13.9k|  fdsave = cf->conn->sock[cf->sockindex];
 1577|  13.9k|  cf->conn->sock[cf->sockindex] = ctx->sock;
 1578|       |
 1579|  13.9k|#ifdef DEBUGBUILD
 1580|       |  /* simulate network blocking/partial writes */
 1581|  13.9k|  if(ctx->wblock_percent > 0) {
  ------------------
  |  Branch (1581:6): [True: 0, False: 13.9k]
  ------------------
 1582|      0|    unsigned char c = 0;
 1583|      0|    Curl_rand_bytes(data, FALSE, &c, 1);
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1584|      0|    if(c >= ((100 - ctx->wblock_percent) * 256 / 100)) {
  ------------------
  |  Branch (1584:8): [True: 0, False: 0]
  ------------------
 1585|      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))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1586|      0|      cf->conn->sock[cf->sockindex] = fdsave;
 1587|      0|      return CURLE_AGAIN;
 1588|      0|    }
 1589|      0|  }
 1590|  13.9k|  if(cf->cft != &Curl_cft_udp && ctx->wpartial_percent > 0 && len > 8) {
  ------------------
  |  Branch (1590:6): [True: 13.9k, False: 0]
  |  Branch (1590:34): [True: 0, False: 13.9k]
  |  Branch (1590:63): [True: 0, False: 0]
  ------------------
 1591|      0|    len = len * ctx->wpartial_percent / 100;
 1592|      0|    if(!len)
  ------------------
  |  Branch (1592:8): [True: 0, False: 0]
  ------------------
 1593|      0|      len = 1;
 1594|      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))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1595|      0|                orig_len, len);
 1596|      0|  }
 1597|  13.9k|#endif
 1598|       |
 1599|       |#if defined(MSG_FASTOPEN) && !defined(TCP_FASTOPEN_CONNECT) /* Linux */
 1600|       |  if(cf->conn->bits.tcp_fastopen) {
 1601|       |    rv = sendto(ctx->sock, buf, len, MSG_FASTOPEN,
 1602|       |                &ctx->addr.curl_sa_addr, ctx->addr.addrlen);
 1603|       |    cf->conn->bits.tcp_fastopen = FALSE;
 1604|       |  }
 1605|       |  else
 1606|       |#endif
 1607|  13.9k|    rv = swrite(ctx->sock, buf, len);
  ------------------
  |  |  966|  13.9k|#define swrite(x, y, z) (ssize_t)send((SEND_TYPE_ARG1)(x), \
  |  |  967|  13.9k|                                      (const SEND_TYPE_ARG2)(y), \
  |  |  968|  13.9k|                                      (SEND_TYPE_ARG3)(z), \
  |  |  969|  13.9k|                                      (SEND_TYPE_ARG4)(SEND_4TH_ARG))
  |  |  ------------------
  |  |  |  |  909|  13.9k|#define SEND_4TH_ARG MSG_NOSIGNAL
  |  |  ------------------
  ------------------
 1608|       |
 1609|  13.9k|  if(!curlx_sztouz(rv, pnwritten)) {
  ------------------
  |  Branch (1609:6): [True: 0, False: 13.9k]
  ------------------
 1610|      0|    int sockerr = SOCKERRNO;
  ------------------
  |  | 1089|      0|#define SOCKERRNO         errno
  ------------------
 1611|      0|    if(SOCK_EAGAIN(sockerr)
  ------------------
  |  | 1140|      0|#define SOCK_EAGAIN(e) ((e) == SOCKEWOULDBLOCK)
  |  |  ------------------
  |  |  |  | 1131|      0|#define SOCKEWOULDBLOCK   EWOULDBLOCK
  |  |  ------------------
  |  |  |  Branch (1140:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1612|      0|#ifndef USE_WINSOCK
 1613|      0|       || (sockerr == SOCKEINTR) || (sockerr == SOCKEINPROGRESS)
  ------------------
  |  | 1123|      0|#define SOCKEINTR         EINTR
  ------------------
                     || (sockerr == SOCKEINTR) || (sockerr == SOCKEINPROGRESS)
  ------------------
  |  | 1122|      0|#define SOCKEINPROGRESS   EINPROGRESS
  ------------------
  |  Branch (1613:11): [True: 0, False: 0]
  |  Branch (1613:37): [True: 0, False: 0]
  ------------------
 1614|      0|#endif
 1615|      0|      ) {
 1616|      0|      result = CURLE_AGAIN;  /* EWOULDBLOCK */
 1617|      0|    }
 1618|      0|    else {
 1619|      0|      char buffer[STRERROR_LEN];
 1620|      0|      failf(data, "Send failure: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1621|      0|            curlx_strerror(sockerr, buffer, sizeof(buffer)));
 1622|      0|      data->state.os_errno = sockerr;
 1623|      0|      result = CURLE_SEND_ERROR;
 1624|      0|    }
 1625|      0|  }
 1626|       |
 1627|       |#ifdef USE_WINSOCK
 1628|       |  if(!result)
 1629|       |    win_update_sndbuf_size(data, ctx);
 1630|       |#endif
 1631|       |
 1632|  13.9k|  CURL_TRC_CF(data, cf, "send(len=%zu) -> %d, %zu",
  ------------------
  |  |  153|  13.9k|  do {                                          \
  |  |  154|  13.9k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  13.9k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  27.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 13.9k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 13.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  27.8k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  13.9k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  13.9k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  13.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 13.9k]
  |  |  ------------------
  ------------------
 1633|  13.9k|              orig_len, (int)result, *pnwritten);
 1634|  13.9k|  cf->conn->sock[cf->sockindex] = fdsave;
 1635|  13.9k|  return result;
 1636|  13.9k|}
cf-socket.c:cf_socket_recv:
 1640|  54.4k|{
 1641|  54.4k|  struct cf_socket_ctx *ctx = cf->ctx;
 1642|  54.4k|  CURLcode result = CURLE_OK;
 1643|  54.4k|  ssize_t rv;
 1644|       |
 1645|  54.4k|  *pnread = 0;
 1646|  54.4k|#ifdef DEBUGBUILD
 1647|       |  /* simulate network blocking/partial reads */
 1648|  54.4k|  if(cf->cft != &Curl_cft_udp && ctx->rblock_percent > 0) {
  ------------------
  |  Branch (1648:6): [True: 54.4k, False: 0]
  |  Branch (1648:34): [True: 0, False: 54.4k]
  ------------------
 1649|      0|    unsigned char c = 0;
 1650|      0|    Curl_rand(data, &c, 1);
  ------------------
  |  |   33|      0|#define Curl_rand(a, b, c) Curl_rand_bytes(a, TRUE, b, c)
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  ------------------
 1651|      0|    if(c >= ((100 - ctx->rblock_percent) * 256 / 100)) {
  ------------------
  |  Branch (1651:8): [True: 0, False: 0]
  ------------------
 1652|      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))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1653|      0|      return CURLE_AGAIN;
 1654|      0|    }
 1655|      0|  }
 1656|  54.4k|  if(cf->cft != &Curl_cft_udp && ctx->recv_max && ctx->recv_max < len) {
  ------------------
  |  Branch (1656:6): [True: 54.4k, False: 0]
  |  Branch (1656:34): [True: 0, False: 54.4k]
  |  Branch (1656:51): [True: 0, False: 0]
  ------------------
 1657|      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))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1658|      0|                len, ctx->recv_max);
 1659|      0|    len = ctx->recv_max;
 1660|      0|  }
 1661|  54.4k|#endif
 1662|       |
 1663|  54.4k|  rv = sread(ctx->sock, buf, len);
  ------------------
  |  |  944|  54.4k|#define sread(x, y, z) (ssize_t)recv((RECV_TYPE_ARG1)(x), \
  |  |  945|  54.4k|                                     (RECV_TYPE_ARG2)(y), \
  |  |  946|  54.4k|                                     (RECV_TYPE_ARG3)(z), \
  |  |  947|  54.4k|                                     (RECV_TYPE_ARG4)(0))
  ------------------
 1664|       |
 1665|  54.4k|  if(!curlx_sztouz(rv, pnread)) {
  ------------------
  |  Branch (1665:6): [True: 7.32k, False: 47.1k]
  ------------------
 1666|  7.32k|    int sockerr = SOCKERRNO;
  ------------------
  |  | 1089|  7.32k|#define SOCKERRNO         errno
  ------------------
 1667|  7.32k|    if(SOCK_EAGAIN(sockerr)
  ------------------
  |  | 1140|  14.6k|#define SOCK_EAGAIN(e) ((e) == SOCKEWOULDBLOCK)
  |  |  ------------------
  |  |  |  | 1131|  7.32k|#define SOCKEWOULDBLOCK   EWOULDBLOCK
  |  |  ------------------
  |  |  |  Branch (1140:24): [True: 7.32k, False: 0]
  |  |  ------------------
  ------------------
 1668|      0|#ifndef USE_WINSOCK
 1669|      0|       || (sockerr == SOCKEINTR)
  ------------------
  |  | 1123|      0|#define SOCKEINTR         EINTR
  ------------------
  |  Branch (1669:11): [True: 0, False: 0]
  ------------------
 1670|  7.32k|#endif
 1671|  7.32k|      ) {
 1672|  7.32k|      result = CURLE_AGAIN;  /* EWOULDBLOCK */
 1673|  7.32k|    }
 1674|      0|    else {
 1675|      0|      char buffer[STRERROR_LEN];
 1676|      0|      failf(data, "Recv failure: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1677|      0|            curlx_strerror(sockerr, buffer, sizeof(buffer)));
 1678|      0|      data->state.os_errno = sockerr;
 1679|      0|      result = CURLE_RECV_ERROR;
 1680|      0|    }
 1681|  7.32k|  }
 1682|       |
 1683|  54.4k|  CURL_TRC_CF(data, cf, "recv(len=%zu) -> %d, %zu", len, (int)result, *pnread);
  ------------------
  |  |  153|  54.4k|  do {                                          \
  |  |  154|  54.4k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  54.4k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|   108k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 54.4k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 54.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|   108k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  54.4k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  54.4k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  54.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 54.4k]
  |  |  ------------------
  ------------------
 1684|  54.4k|  if(!result && !ctx->got_first_byte) {
  ------------------
  |  Branch (1684:6): [True: 47.1k, False: 7.32k]
  |  Branch (1684:17): [True: 3.62k, False: 43.5k]
  ------------------
 1685|  3.62k|    ctx->first_byte_at = *Curl_pgrs_now(data);
 1686|       |    ctx->got_first_byte = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
 1687|  3.62k|  }
 1688|  54.4k|  return result;
 1689|  54.4k|}
cf-socket.c:cf_socket_cntrl:
 1718|  14.4k|{
 1719|  14.4k|  struct cf_socket_ctx *ctx = cf->ctx;
 1720|       |
 1721|  14.4k|  (void)arg1;
 1722|  14.4k|  (void)arg2;
 1723|  14.4k|  switch(event) {
  ------------------
  |  Branch (1723:10): [True: 7.25k, False: 7.18k]
  ------------------
 1724|  3.62k|  case CF_CTRL_CONN_INFO_UPDATE:
  ------------------
  |  |  121|  3.62k|#define CF_CTRL_CONN_INFO_UPDATE (256 + 0) /* 0          NULL     ignored */
  ------------------
  |  Branch (1724:3): [True: 3.62k, False: 10.8k]
  ------------------
 1725|  3.62k|    cf_socket_active(cf, data);
 1726|  3.62k|    cf_socket_update_data(cf, data);
 1727|  3.62k|    break;
 1728|      0|  case CF_CTRL_DATA_SETUP:
  ------------------
  |  |  115|      0|#define CF_CTRL_DATA_SETUP              4  /* 0          NULL     first fail */
  ------------------
  |  Branch (1728:3): [True: 0, False: 14.4k]
  ------------------
 1729|      0|    cf_socket_update_data(cf, data);
 1730|      0|    break;
 1731|      0|  case CF_CTRL_FORGET_SOCKET:
  ------------------
  |  |  122|      0|#define CF_CTRL_FORGET_SOCKET    (256 + 1) /* 0          NULL     ignored */
  ------------------
  |  Branch (1731:3): [True: 0, False: 14.4k]
  ------------------
 1732|      0|    ctx->sock = CURL_SOCKET_BAD;
  ------------------
  |  |  147|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
 1733|      0|    break;
 1734|  3.62k|  case CF_CTRL_REPORT_STATS:
  ------------------
  |  |  124|  3.62k|#define CF_CTRL_REPORT_STATS     (256 + 3) /* 0          NULL     ignored */
  ------------------
  |  Branch (1734:3): [True: 3.62k, False: 10.8k]
  ------------------
 1735|  3.62k|    if(cf->connected && !ctx->stats_reported) {
  ------------------
  |  Branch (1735:8): [True: 3.62k, False: 0]
  |  Branch (1735:25): [True: 3.62k, False: 0]
  ------------------
 1736|  3.62k|      struct curltime *ts = NULL;
 1737|  3.62k|      switch(ctx->transport) {
 1738|      0|      case TRNSPRT_UDP:
  ------------------
  |  |  239|      0|#define TRNSPRT_UDP  4
  ------------------
  |  Branch (1738:7): [True: 0, False: 3.62k]
  ------------------
 1739|      0|      case TRNSPRT_QUIC:
  ------------------
  |  |  240|      0|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (1739:7): [True: 0, False: 3.62k]
  ------------------
 1740|       |        /* Since UDP connected sockets work different from TCP, we use the
 1741|       |         * time of the first byte from the peer as the "connect" time. */
 1742|      0|        if(ctx->got_first_byte)
  ------------------
  |  Branch (1742:12): [True: 0, False: 0]
  ------------------
 1743|      0|          ts = &ctx->first_byte_at;
 1744|      0|        break;
 1745|  3.62k|      default:
  ------------------
  |  Branch (1745:7): [True: 3.62k, False: 0]
  ------------------
 1746|  3.62k|        ts = &ctx->connected_at;
 1747|  3.62k|        break;
 1748|  3.62k|      }
 1749|  3.62k|      if(ts) {
  ------------------
  |  Branch (1749:10): [True: 3.62k, False: 0]
  ------------------
 1750|  3.62k|        Curl_pgrsTimeWas(data, TIMER_CONNECT, *ts);
 1751|  3.62k|        ctx->stats_reported = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
 1752|  3.62k|      }
 1753|  3.62k|    }
 1754|  14.4k|  }
 1755|  14.4k|  return CURLE_OK;
 1756|  14.4k|}
cf-socket.c:cf_socket_active:
 1702|  3.62k|{
 1703|  3.62k|  struct cf_socket_ctx *ctx = cf->ctx;
 1704|       |
 1705|       |  /* use this socket from now on */
 1706|  3.62k|  cf->conn->sock[cf->sockindex] = ctx->sock;
 1707|  3.62k|  set_local_ip(cf, data);
 1708|  3.62k|#ifdef USE_IPV6
 1709|  3.62k|  if(cf->sockindex == FIRSTSOCKET)
  ------------------
  |  |  234|  3.62k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (1709:6): [True: 3.62k, False: 0]
  ------------------
 1710|  3.62k|    cf->conn->bits.ipv6 = (ctx->addr.family == AF_INET6);
 1711|  3.62k|#endif
 1712|       |  ctx->active = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
 1713|  3.62k|}
cf-socket.c:cf_socket_update_data:
 1693|  3.62k|{
 1694|       |  /* Update the IP info held in the transfer, if we have that. */
 1695|  3.62k|  if(cf->connected && (cf->sockindex == FIRSTSOCKET)) {
  ------------------
  |  |  234|  3.62k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (1695:6): [True: 3.62k, False: 0]
  |  Branch (1695:23): [True: 3.62k, False: 0]
  ------------------
 1696|  3.62k|    struct cf_socket_ctx *ctx = cf->ctx;
 1697|  3.62k|    data->info.primary = ctx->ip;
 1698|  3.62k|  }
 1699|  3.62k|}
cf-socket.c:cf_socket_conn_is_alive:
 1761|  3.01k|{
 1762|  3.01k|  struct cf_socket_ctx *ctx = cf->ctx;
 1763|  3.01k|  struct pollfd pfd[1];
 1764|  3.01k|  int r;
 1765|       |
 1766|  3.01k|  *input_pending = FALSE;
  ------------------
  |  | 1048|  3.01k|#define FALSE false
  ------------------
 1767|       |
 1768|  3.01k|  if(!ctx || ctx->sock == CURL_SOCKET_BAD)
  ------------------
  |  |  147|  3.01k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1768:6): [True: 0, False: 3.01k]
  |  Branch (1768:14): [True: 0, False: 3.01k]
  ------------------
 1769|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1770|       |
 1771|       |  /* Check with 0 timeout if there are any events pending on the socket */
 1772|  3.01k|  pfd[0].fd = ctx->sock;
 1773|  3.01k|  pfd[0].events = POLLRDNORM | POLLIN | POLLRDBAND | POLLPRI;
 1774|  3.01k|  pfd[0].revents = 0;
 1775|       |
 1776|  3.01k|  r = Curl_poll(pfd, 1, 0);
 1777|  3.01k|  if(r < 0) {
  ------------------
  |  Branch (1777:6): [True: 0, False: 3.01k]
  ------------------
 1778|      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))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1779|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1780|      0|  }
 1781|  3.01k|  else if(r == 0) {
  ------------------
  |  Branch (1781:11): [True: 0, False: 3.01k]
  ------------------
 1782|      0|    CURL_TRC_CF(data, cf, "is_alive: poll timeout, assume alive");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1783|      0|    return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1784|      0|  }
 1785|  3.01k|  else if(pfd[0].revents & (POLLERR | POLLHUP | POLLPRI | POLLNVAL)) {
  ------------------
  |  Branch (1785:11): [True: 0, False: 3.01k]
  ------------------
 1786|      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))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1787|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1788|      0|  }
 1789|       |
 1790|  3.01k|  CURL_TRC_CF(data, cf, "is_alive: valid events, looks alive");
  ------------------
  |  |  153|  3.01k|  do {                                          \
  |  |  154|  3.01k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.01k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  6.02k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.01k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.01k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  6.02k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.01k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.01k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.01k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.01k]
  |  |  ------------------
  ------------------
 1791|  3.01k|  *input_pending = TRUE;
  ------------------
  |  | 1045|  3.01k|#define TRUE true
  ------------------
 1792|       |  return TRUE;
  ------------------
  |  | 1045|  3.01k|#define TRUE true
  ------------------
 1793|  3.01k|}
cf-socket.c:cf_socket_query:
 1798|  10.3k|{
 1799|  10.3k|  struct cf_socket_ctx *ctx = cf->ctx;
 1800|       |
 1801|  10.3k|  switch(query) {
 1802|      0|  case CF_QUERY_SOCKET:
  ------------------
  |  |  169|      0|#define CF_QUERY_SOCKET             3  /* -          curl_socket_t */
  ------------------
  |  Branch (1802:3): [True: 0, False: 10.3k]
  ------------------
 1803|      0|    DEBUGASSERT(pres2);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1803:5): [True: 0, False: 0]
  |  Branch (1803:5): [True: 0, False: 0]
  ------------------
 1804|      0|    *((curl_socket_t *)pres2) = ctx->sock;
 1805|      0|    return CURLE_OK;
 1806|      0|  case CF_QUERY_TRANSPORT:
  ------------------
  |  |  181|      0|#define CF_QUERY_TRANSPORT         14  /* TRNSPRT_*  - * */
  ------------------
  |  Branch (1806:3): [True: 0, False: 10.3k]
  ------------------
 1807|      0|    DEBUGASSERT(pres1);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1807:5): [True: 0, False: 0]
  |  Branch (1807:5): [True: 0, False: 0]
  ------------------
 1808|      0|    *pres1 = ctx->transport;
 1809|      0|    return CURLE_OK;
 1810|      0|  case CF_QUERY_REMOTE_ADDR:
  ------------------
  |  |  177|      0|#define CF_QUERY_REMOTE_ADDR       10  /* -          `Curl_sockaddr_ex *` */
  ------------------
  |  Branch (1810:3): [True: 0, False: 10.3k]
  ------------------
 1811|      0|    DEBUGASSERT(pres2);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1811:5): [True: 0, False: 0]
  |  Branch (1811:5): [True: 0, False: 0]
  ------------------
 1812|      0|    *((const struct Curl_sockaddr_ex **)pres2) = cf->connected ?
  ------------------
  |  Branch (1812:50): [True: 0, False: 0]
  ------------------
 1813|      0|                                                 &ctx->addr : NULL;
 1814|      0|    return CURLE_OK;
 1815|      0|  case CF_QUERY_CONNECT_REPLY_MS:
  ------------------
  |  |  168|      0|#define CF_QUERY_CONNECT_REPLY_MS   2  /* number     -        */
  ------------------
  |  Branch (1815:3): [True: 0, False: 10.3k]
  ------------------
 1816|      0|    if(ctx->got_first_byte) {
  ------------------
  |  Branch (1816:8): [True: 0, False: 0]
  ------------------
 1817|      0|      timediff_t ms = curlx_ptimediff_ms(&ctx->first_byte_at,
 1818|      0|                                         &ctx->started_at);
 1819|      0|      *pres1 = (ms < INT_MAX) ? (int)ms : INT_MAX;
  ------------------
  |  Branch (1819:16): [True: 0, False: 0]
  ------------------
 1820|      0|    }
 1821|      0|    else
 1822|      0|      *pres1 = -1;
 1823|      0|    return CURLE_OK;
 1824|      0|  case CF_QUERY_IP_INFO:
  ------------------
  |  |  173|      0|#define CF_QUERY_IP_INFO            8  /* TRUE/FALSE struct ip_quadruple */
  ------------------
  |  Branch (1824:3): [True: 0, False: 10.3k]
  ------------------
 1825|      0|#ifdef USE_IPV6
 1826|      0|    *pres1 = (ctx->addr.family == AF_INET6);
 1827|       |#else
 1828|       |    *pres1 = FALSE;
 1829|       |#endif
 1830|      0|    *(struct ip_quadruple *)pres2 = ctx->ip;
 1831|      0|    return CURLE_OK;
 1832|      0|  case CF_QUERY_REALLY_CONNECTED:
  ------------------
  |  |  183|      0|#define CF_QUERY_REALLY_CONNECTED  16  /* TRUE/FALSE - */
  ------------------
  |  Branch (1832:3): [True: 0, False: 10.3k]
  ------------------
 1833|      0|    if(cf->cft != &Curl_cft_udp)
  ------------------
  |  Branch (1833:8): [True: 0, False: 0]
  ------------------
 1834|      0|      *pres1 = cf->connected;
 1835|      0|    else
 1836|      0|      *pres1 = ctx->got_first_byte;
 1837|      0|    return CURLE_OK;
 1838|  10.3k|  default:
  ------------------
  |  Branch (1838:3): [True: 10.3k, False: 0]
  ------------------
 1839|  10.3k|    break;
 1840|  10.3k|  }
 1841|  10.3k|  return cf->next ?
  ------------------
  |  Branch (1841:10): [True: 0, False: 10.3k]
  ------------------
 1842|      0|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
 1843|  10.3k|    CURLE_UNKNOWN_OPTION;
 1844|  10.3k|}
cf-socket.c:cf_socket_ctx_init:
 1000|  3.62k|{
 1001|  3.62k|  memset(ctx, 0, sizeof(*ctx));
 1002|  3.62k|  Curl_peer_link(&ctx->peer, peer);
 1003|  3.62k|  ctx->sock = CURL_SOCKET_BAD;
  ------------------
  |  |  147|  3.62k|#define CURL_SOCKET_BAD (-1)
  ------------------
 1004|  3.62k|  ctx->transport = transport;
 1005|  3.62k|  ctx->addr = *addr;
 1006|       |
 1007|  3.62k|#ifdef DEBUGBUILD
 1008|  3.62k|  {
 1009|  3.62k|    const char *p = getenv("CURL_DBG_SOCK_WBLOCK");
 1010|  3.62k|    if(p) {
  ------------------
  |  Branch (1010:8): [True: 0, False: 3.62k]
  ------------------
 1011|      0|      curl_off_t l;
 1012|      0|      if(!curlx_str_number(&p, &l, 100))
  ------------------
  |  Branch (1012:10): [True: 0, False: 0]
  ------------------
 1013|      0|        ctx->wblock_percent = (int)l;
 1014|      0|    }
 1015|  3.62k|    p = getenv("CURL_DBG_SOCK_WPARTIAL");
 1016|  3.62k|    if(p) {
  ------------------
  |  Branch (1016:8): [True: 0, False: 3.62k]
  ------------------
 1017|      0|      curl_off_t l;
 1018|      0|      if(!curlx_str_number(&p, &l, 100))
  ------------------
  |  Branch (1018:10): [True: 0, False: 0]
  ------------------
 1019|      0|        ctx->wpartial_percent = (int)l;
 1020|      0|    }
 1021|  3.62k|    p = getenv("CURL_DBG_SOCK_RBLOCK");
 1022|  3.62k|    if(p) {
  ------------------
  |  Branch (1022:8): [True: 0, False: 3.62k]
  ------------------
 1023|      0|      curl_off_t l;
 1024|      0|      if(!curlx_str_number(&p, &l, 100))
  ------------------
  |  Branch (1024:10): [True: 0, False: 0]
  ------------------
 1025|      0|        ctx->rblock_percent = (int)l;
 1026|      0|    }
 1027|  3.62k|    p = getenv("CURL_DBG_SOCK_RMAX");
 1028|  3.62k|    if(p) {
  ------------------
  |  Branch (1028:8): [True: 0, False: 3.62k]
  ------------------
 1029|      0|      curl_off_t l;
 1030|      0|      if(!curlx_str_number(&p, &l, CURL_OFF_T_MAX))
  ------------------
  |  |  588|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (1030:10): [True: 0, False: 0]
  ------------------
 1031|      0|        ctx->recv_max = (size_t)l;
 1032|      0|    }
 1033|  3.62k|  }
 1034|  3.62k|#endif
 1035|       |
 1036|  3.62k|  return CURLE_OK;
 1037|  3.62k|}
cf-socket.c:cf_socket_ctx_free:
 1040|  3.62k|{
 1041|  3.62k|  if(ctx) {
  ------------------
  |  Branch (1041:6): [True: 3.62k, False: 0]
  ------------------
 1042|  3.62k|    Curl_peer_unlink(&ctx->peer);
 1043|  3.62k|    curlx_free(ctx);
  ------------------
  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1044|  3.62k|  }
 1045|  3.62k|}
cf-socket.c:set_local_ip:
 1087|  7.25k|{
 1088|  7.25k|  struct cf_socket_ctx *ctx = cf->ctx;
 1089|  7.25k|  ctx->ip.local_ip[0] = 0;
 1090|  7.25k|  ctx->ip.local_port = 0;
 1091|       |
 1092|  7.25k|#ifdef HAVE_GETSOCKNAME
 1093|  7.25k|  if((ctx->sock != CURL_SOCKET_BAD) &&
  ------------------
  |  |  147|  7.25k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1093:6): [True: 7.25k, False: 0]
  ------------------
 1094|  7.25k|     !(data->conn->scheme->protocol & CURLPROTO_TFTP)) {
  ------------------
  |  | 1099|  7.25k|#define CURLPROTO_TFTP    (1L << 11)
  ------------------
  |  Branch (1094:6): [True: 7.25k, False: 0]
  ------------------
 1095|       |    /* TFTP does not connect, so it cannot get the IP like this */
 1096|  7.25k|    struct Curl_sockaddr_storage ssloc;
 1097|  7.25k|    curl_socklen_t slen = sizeof(struct Curl_sockaddr_storage);
 1098|       |
 1099|  7.25k|    memset(&ssloc, 0, sizeof(ssloc));
 1100|  7.25k|    if(getsockname(ctx->sock, (struct sockaddr *)&ssloc, &slen)) {
  ------------------
  |  Branch (1100:8): [True: 0, False: 7.25k]
  ------------------
 1101|      0|      VERBOSE(char buffer[STRERROR_LEN]);
  ------------------
  |  | 1611|      0|#define VERBOSE(x) x
  ------------------
 1102|      0|      VERBOSE(int sockerr = SOCKERRNO);
  ------------------
  |  | 1611|      0|#define VERBOSE(x) x
  ------------------
 1103|      0|      infof(data, "getsockname() failed with errno %d: %s",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1104|      0|            sockerr, curlx_strerror(sockerr, buffer, sizeof(buffer)));
 1105|      0|    }
 1106|  7.25k|    else {
 1107|  7.25k|      CURLcode result = sockaddr2string((struct sockaddr *)&ssloc, slen,
 1108|  7.25k|                                        ctx->ip.local_ip, &ctx->ip.local_port);
 1109|  7.25k|      if(result)
  ------------------
  |  Branch (1109:10): [True: 0, False: 7.25k]
  ------------------
 1110|      0|        infof(data, "ssloc inet_ntop() failed with %d", (int)result);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1111|  7.25k|    }
 1112|  7.25k|  }
 1113|       |#else
 1114|       |  (void)data;
 1115|       |#endif
 1116|  7.25k|}

Curl_cf_def_data_pending:
   79|  3.64k|{
   80|  3.64k|  return cf->next ?
  ------------------
  |  Branch (80:10): [True: 0, False: 3.64k]
  ------------------
   81|      0|    cf->next->cft->has_data_pending(cf->next, data) : FALSE;
  ------------------
  |  | 1048|  3.64k|#define FALSE false
  ------------------
   82|  3.64k|}
Curl_cf_def_send:
   87|  7.25k|{
   88|  7.25k|  if(cf->next)
  ------------------
  |  Branch (88:6): [True: 7.25k, False: 0]
  ------------------
   89|  7.25k|    return cf->next->cft->do_send(cf->next, data, buf, len, eos, pnwritten);
   90|      0|  *pnwritten = 0;
   91|      0|  return CURLE_RECV_ERROR;
   92|  7.25k|}
Curl_cf_def_recv:
   96|  47.1k|{
   97|  47.1k|  if(cf->next)
  ------------------
  |  Branch (97:6): [True: 47.1k, False: 0]
  ------------------
   98|  47.1k|    return cf->next->cft->do_recv(cf->next, data, buf, len, pnread);
   99|      0|  *pnread = 0;
  100|      0|  return CURLE_SEND_ERROR;
  101|  47.1k|}
Curl_cf_def_query:
  123|  14.5k|{
  124|  14.5k|  return cf->next ?
  ------------------
  |  Branch (124:10): [True: 14.5k, False: 0]
  ------------------
  125|  14.5k|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
  126|  14.5k|    CURLE_UNKNOWN_OPTION;
  127|  14.5k|}
Curl_conn_trc_filters:
  132|  21.7k|{
  133|  21.7k|  if(CURL_TRC_M_is_verbose(data) && data->conn) {
  ------------------
  |  |  135|  21.7k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  ------------------
  |  |  |  |  329|  43.5k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  43.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 21.7k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 21.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  43.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|  43.5k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (133:37): [True: 0, False: 0]
  ------------------
  134|      0|    struct Curl_cfilter *cf = data->conn->cfilter[sockindex];
  135|       |
  136|      0|    if(cf) {
  ------------------
  |  Branch (136:8): [True: 0, False: 0]
  ------------------
  137|      0|      char msg[256], *buf;
  138|      0|      int blen, n;
  139|       |
  140|      0|      buf = msg;
  141|      0|      blen = sizeof(msg) - 1;
  142|      0|      n = curl_msnprintf(buf, blen, "%s [%d]", info, sockindex);
  143|      0|      buf += n;
  144|      0|      blen -= n;
  145|      0|      for(; cf && blen; cf = cf->next) {
  ------------------
  |  Branch (145:13): [True: 0, False: 0]
  |  Branch (145:19): [True: 0, False: 0]
  ------------------
  146|      0|        n = curl_msnprintf(buf, blen, "[%s%s]",
  147|      0|                           cf->connected ? "" : "!", cf->cft->name);
  ------------------
  |  Branch (147:28): [True: 0, False: 0]
  ------------------
  148|      0|        buf += n;
  149|      0|        blen -= n;
  150|      0|      }
  151|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330: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]
  |  |  ------------------
  ------------------
  152|      0|    }
  153|      0|    else
  154|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  155|      0|  }
  156|  21.7k|}
Curl_conn_cf_discard_chain:
  161|  14.5k|{
  162|  14.5k|  struct Curl_cfilter *cfn, *cf = *pcf;
  163|       |
  164|  14.5k|  if(cf) {
  ------------------
  |  Branch (164:6): [True: 3.62k, False: 10.8k]
  ------------------
  165|  3.62k|    *pcf = NULL;
  166|  10.8k|    while(cf) {
  ------------------
  |  Branch (166:11): [True: 7.26k, False: 3.62k]
  ------------------
  167|  7.26k|      cfn = cf->next;
  168|       |      /* prevent destroying filter to mess with its sub-chain, since
  169|       |       * we have the reference now and will call destroy on it.
  170|       |       */
  171|  7.26k|      cf->next = NULL;
  172|  7.26k|      cf->cft->destroy(cf, data);
  173|  7.26k|      curlx_free(cf);
  ------------------
  |  | 1476|  7.26k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  174|  7.26k|      cf = cfn;
  175|  7.26k|    }
  176|  3.62k|  }
  177|  14.5k|}
Curl_conn_cf_discard_all:
  181|  14.5k|{
  182|  14.5k|  struct curltime *pt = &conn->shutdown.start[sockindex];
  183|  14.5k|  memset(pt, 0, sizeof(*pt));
  184|  14.5k|  Curl_conn_cf_discard_chain(&conn->cfilter[sockindex], data);
  185|  14.5k|}
Curl_conn_shutdown:
  189|  3.04k|{
  190|  3.04k|  struct Curl_cfilter *cf;
  191|  3.04k|  CURLcode result = CURLE_OK;
  192|  3.04k|  timediff_t timeout_ms;
  193|       |
  194|  3.04k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1075|  3.04k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (194:3): [True: 0, False: 3.04k]
  |  Branch (194:3): [True: 3.04k, False: 0]
  ------------------
  195|       |
  196|  3.04k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  311|  3.04k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (311:36): [True: 3.04k, False: 0]
  |  |  |  Branch (311:50): [True: 3.04k, False: 0]
  |  |  ------------------
  ------------------
  197|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  198|       |
  199|       |  /* Get the first connected filter that is not shut down already. */
  200|  3.04k|  cf = data->conn->cfilter[sockindex];
  201|  3.04k|  while(cf && (!cf->connected || cf->shutdown))
  ------------------
  |  Branch (201:9): [True: 3.04k, False: 0]
  |  Branch (201:16): [True: 0, False: 3.04k]
  |  Branch (201:34): [True: 0, False: 3.04k]
  ------------------
  202|      0|    cf = cf->next;
  203|       |
  204|  3.04k|  if(!cf) {
  ------------------
  |  Branch (204:6): [True: 0, False: 3.04k]
  ------------------
  205|      0|    *done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  206|      0|    return CURLE_OK;
  207|      0|  }
  208|       |
  209|  3.04k|  *done = FALSE;
  ------------------
  |  | 1048|  3.04k|#define FALSE false
  ------------------
  210|  3.04k|  if(!Curl_shutdown_started(data->conn, sockindex)) {
  ------------------
  |  Branch (210:6): [True: 0, False: 3.04k]
  ------------------
  211|      0|    Curl_shutdown_start(data, sockindex, 0);
  212|      0|  }
  213|  3.04k|  else {
  214|  3.04k|    timeout_ms = Curl_shutdown_timeleft(data, data->conn, sockindex);
  215|  3.04k|    if(timeout_ms < 0) {
  ------------------
  |  Branch (215:8): [True: 0, False: 3.04k]
  ------------------
  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))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324: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|  3.04k|  }
  221|       |
  222|  9.06k|  while(cf) {
  ------------------
  |  Branch (222:9): [True: 6.05k, False: 3.01k]
  ------------------
  223|  6.05k|    if(!cf->shutdown) {
  ------------------
  |  Branch (223:8): [True: 6.05k, False: 0]
  ------------------
  224|  6.05k|      bool cfdone = FALSE;
  ------------------
  |  | 1048|  6.05k|#define FALSE false
  ------------------
  225|  6.05k|      result = cf->cft->do_shutdown(cf, data, &cfdone);
  226|  6.05k|      if(result) {
  ------------------
  |  Branch (226:10): [True: 0, False: 6.05k]
  ------------------
  227|      0|        CURL_TRC_CF(data, cf, "shut down failed with %d", (int)result);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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|  6.05k|      else if(!cfdone) {
  ------------------
  |  Branch (230:15): [True: 30, False: 6.02k]
  ------------------
  231|     30|        CURL_TRC_CF(data, cf, "shut down not done yet");
  ------------------
  |  |  153|     30|  do {                                          \
  |  |  154|     30|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|     30|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     60|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 30, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 30]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     60|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|     30|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     30|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     30|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 30]
  |  |  ------------------
  ------------------
  232|     30|        return CURLE_OK;
  233|     30|      }
  234|  6.02k|      CURL_TRC_CF(data, cf, "shut down successfully");
  ------------------
  |  |  153|  6.02k|  do {                                          \
  |  |  154|  6.02k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  6.02k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  12.0k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 6.02k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 6.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  12.0k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  6.02k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  6.02k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  6.02k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 6.02k]
  |  |  ------------------
  ------------------
  235|  6.02k|      cf->shutdown = TRUE;
  ------------------
  |  | 1045|  6.02k|#define TRUE true
  ------------------
  236|  6.02k|    }
  237|  6.02k|    cf = cf->next;
  238|  6.02k|  }
  239|  3.01k|  *done = (!result);
  240|  3.01k|  return result;
  241|  3.04k|}
Curl_cf_recv:
  245|  7.24k|{
  246|  7.24k|  struct Curl_cfilter *cf;
  247|       |
  248|  7.24k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  7.24k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (248:3): [True: 0, False: 7.24k]
  |  Branch (248:3): [True: 7.24k, False: 0]
  ------------------
  249|  7.24k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1075|  7.24k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (249:3): [True: 0, False: 7.24k]
  |  Branch (249:3): [True: 7.24k, False: 0]
  ------------------
  250|  7.24k|  cf = data->conn->cfilter[sockindex];
  251|  7.24k|  while(cf && !cf->connected)
  ------------------
  |  Branch (251:9): [True: 7.24k, False: 0]
  |  Branch (251:15): [True: 0, False: 7.24k]
  ------------------
  252|      0|    cf = cf->next;
  253|  7.24k|  if(cf)
  ------------------
  |  Branch (253:6): [True: 7.24k, False: 0]
  ------------------
  254|  7.24k|    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);
  ------------------
  |  | 1075|      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|  3.60k|{
  265|  3.60k|  struct Curl_cfilter *cf;
  266|       |
  267|  3.60k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  3.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (267:3): [True: 0, False: 3.60k]
  |  Branch (267:3): [True: 3.60k, False: 0]
  ------------------
  268|  3.60k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1075|  3.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (268:3): [True: 0, False: 3.60k]
  |  Branch (268:3): [True: 3.60k, False: 0]
  ------------------
  269|  3.60k|  cf = data->conn->cfilter[sockindex];
  270|  3.60k|  while(cf && !cf->connected)
  ------------------
  |  Branch (270:9): [True: 3.60k, False: 0]
  |  Branch (270:15): [True: 0, False: 3.60k]
  ------------------
  271|      0|    cf = cf->next;
  272|  3.60k|  if(cf) {
  ------------------
  |  Branch (272:6): [True: 3.60k, False: 0]
  ------------------
  273|  3.60k|    return cf->cft->do_send(cf, data, buf, len, eos, pnwritten);
  274|  3.60k|  }
  275|      0|  failf(data, "send: no filter connected");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  276|      0|  DEBUGASSERT(0);
  ------------------
  |  | 1075|      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|      5|{
  300|      5|  struct cf_io_ctx io;
  301|       |
  302|      5|  if(!cf || !data) {
  ------------------
  |  Branch (302:6): [True: 0, False: 5]
  |  Branch (302:13): [True: 0, False: 5]
  ------------------
  303|      0|    *pnread = 0;
  304|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  305|      0|  }
  306|      5|  io.data = data;
  307|      5|  io.cf = cf;
  308|      5|  return Curl_bufq_sipn(bufq, maxlen, cf_bufq_reader, &io, pnread);
  309|      5|}
Curl_cf_send_bufq:
  324|     16|{
  325|     16|  struct cf_io_ctx io;
  326|       |
  327|     16|  if(!cf || !data) {
  ------------------
  |  Branch (327:6): [True: 0, False: 16]
  |  Branch (327:13): [True: 0, False: 16]
  ------------------
  328|      0|    *pnwritten = 0;
  329|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  330|      0|  }
  331|     16|  io.data = data;
  332|     16|  io.cf = cf;
  333|     16|  if(buf && blen)
  ------------------
  |  Branch (333:6): [True: 9, False: 7]
  |  Branch (333:13): [True: 9, False: 0]
  ------------------
  334|      9|    return Curl_bufq_write_pass(bufq, buf, blen, cf_bufq_writer, &io,
  335|      9|                                pnwritten);
  336|      7|  else
  337|      7|    return Curl_bufq_pass(bufq, cf_bufq_writer, &io, pnwritten);
  338|     16|}
Curl_cf_create:
  343|  21.7k|{
  344|  21.7k|  struct Curl_cfilter *cf;
  345|  21.7k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  346|       |
  347|  21.7k|  DEBUGASSERT(cft);
  ------------------
  |  | 1075|  21.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (347:3): [True: 0, False: 21.7k]
  |  Branch (347:3): [True: 21.7k, False: 0]
  ------------------
  348|  21.7k|  cf = curlx_calloc(1, sizeof(*cf));
  ------------------
  |  | 1473|  21.7k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  349|  21.7k|  if(!cf)
  ------------------
  |  Branch (349:6): [True: 0, False: 21.7k]
  ------------------
  350|      0|    goto out;
  351|       |
  352|  21.7k|  cf->cft = cft;
  353|  21.7k|  cf->ctx = ctx;
  354|  21.7k|  result = CURLE_OK;
  355|  21.7k|out:
  356|  21.7k|  *pcf = cf;
  357|  21.7k|  return result;
  358|  21.7k|}
Curl_conn_cf_add:
  364|  7.26k|{
  365|  7.26k|  DEBUGASSERT(conn);
  ------------------
  |  | 1075|  7.26k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (365:3): [True: 0, False: 7.26k]
  |  Branch (365:3): [True: 7.26k, False: 0]
  ------------------
  366|  7.26k|  DEBUGASSERT(!cf->conn);
  ------------------
  |  | 1075|  7.26k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (366:3): [True: 0, False: 7.26k]
  |  Branch (366:3): [True: 7.26k, False: 0]
  ------------------
  367|  7.26k|  DEBUGASSERT(!cf->next);
  ------------------
  |  | 1075|  7.26k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (367:3): [True: 0, False: 7.26k]
  |  Branch (367:3): [True: 7.26k, False: 0]
  ------------------
  368|       |
  369|  7.26k|  cf->next = conn->cfilter[sockindex];
  370|  7.26k|  cf->conn = conn;
  371|  7.26k|  cf->sockindex = sockindex;
  372|  7.26k|  conn->cfilter[sockindex] = cf;
  373|  7.26k|  CURL_TRC_CF(data, cf, "added");
  ------------------
  |  |  153|  7.26k|  do {                                          \
  |  |  154|  7.26k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  7.26k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  14.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 7.26k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 7.26k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  14.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  7.26k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  7.26k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  7.26k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 7.26k]
  |  |  ------------------
  ------------------
  374|  7.26k|}
Curl_conn_cf_insert_after:
  378|  10.8k|{
  379|  10.8k|  struct Curl_cfilter *tail, **pnext;
  380|       |
  381|  10.8k|  DEBUGASSERT(cf_at);
  ------------------
  |  | 1075|  10.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (381:3): [True: 0, False: 10.8k]
  |  Branch (381:3): [True: 10.8k, False: 0]
  ------------------
  382|  10.8k|  DEBUGASSERT(cf_new);
  ------------------
  |  | 1075|  10.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (382:3): [True: 0, False: 10.8k]
  |  Branch (382:3): [True: 10.8k, False: 0]
  ------------------
  383|  10.8k|  DEBUGASSERT(!cf_new->conn);
  ------------------
  |  | 1075|  10.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (383:3): [True: 0, False: 10.8k]
  |  Branch (383:3): [True: 10.8k, False: 0]
  ------------------
  384|       |
  385|  10.8k|  tail = cf_at->next;
  386|  10.8k|  cf_at->next = cf_new;
  387|  10.8k|  do {
  388|  10.8k|    cf_new->conn = cf_at->conn;
  389|  10.8k|    cf_new->sockindex = cf_at->sockindex;
  390|  10.8k|    pnext = &cf_new->next;
  391|  10.8k|    cf_new = cf_new->next;
  392|  10.8k|  } while(cf_new);
  ------------------
  |  Branch (392:11): [True: 0, False: 10.8k]
  ------------------
  393|  10.8k|  *pnext = tail;
  394|  10.8k|}
Curl_conn_cf_connect:
  423|  29.0k|{
  424|  29.0k|  if(cf)
  ------------------
  |  Branch (424:6): [True: 29.0k, False: 0]
  ------------------
  425|  29.0k|    return cf->cft->do_connect(cf, data, done);
  426|      0|  return CURLE_FAILED_INIT;
  427|  29.0k|}
Curl_conn_cf_send:
  432|  13.9k|{
  433|  13.9k|  if(cf)
  ------------------
  |  Branch (433:6): [True: 13.9k, False: 0]
  ------------------
  434|  13.9k|    return cf->cft->do_send(cf, data, buf, len, eos, pnwritten);
  435|      0|  *pnwritten = 0;
  436|      0|  return CURLE_SEND_ERROR;
  437|  13.9k|}
Curl_conn_cf_recv:
  441|  54.4k|{
  442|  54.4k|  if(cf)
  ------------------
  |  Branch (442:6): [True: 54.4k, False: 0]
  ------------------
  443|  54.4k|    return cf->cft->do_recv(cf, data, buf, len, pnread);
  444|      0|  *pnread = 0;
  445|      0|  return CURLE_RECV_ERROR;
  446|  54.4k|}
Curl_conn_cntrl_update_info:
  478|  3.62k|{
  479|  3.62k|  cf_cntrl_all(conn, data, TRUE, CF_CTRL_CONN_INFO_UPDATE, 0, NULL);
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
                cf_cntrl_all(conn, data, TRUE, CF_CTRL_CONN_INFO_UPDATE, 0, NULL);
  ------------------
  |  |  121|  3.62k|#define CF_CTRL_CONN_INFO_UPDATE (256 + 0) /* 0          NULL     ignored */
  ------------------
  480|  3.62k|}
Curl_conn_cntrl_report_stats:
  485|  3.62k|{
  486|  3.62k|  if((unsigned)sockindex < CURL_ARRAYSIZE(conn->cfilter))
  ------------------
  |  | 1299|  3.62k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (486:6): [True: 3.62k, False: 0]
  ------------------
  487|  3.62k|    (void)Curl_conn_cf_cntrl(conn->cfilter[sockindex], data, TRUE,
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  488|  3.62k|                             CF_CTRL_REPORT_STATS, 0, NULL);
  ------------------
  |  |  124|  3.62k|#define CF_CTRL_REPORT_STATS     (256 + 3) /* 0          NULL     ignored */
  ------------------
  489|  3.62k|}
Curl_conn_remove_setup_filters:
  493|  3.62k|{
  494|  3.62k|  struct Curl_cfilter **anchor = &data->conn->cfilter[sockindex];
  495|  25.4k|  while(*anchor) {
  ------------------
  |  Branch (495:9): [True: 21.7k, False: 3.62k]
  ------------------
  496|  21.7k|    struct Curl_cfilter *cf = *anchor;
  497|  21.7k|    if(cf->connected && (cf->cft->flags & CF_TYPE_SETUP)) {
  ------------------
  |  |  213|  21.7k|#define CF_TYPE_SETUP       (1 << 5)
  ------------------
  |  Branch (497:8): [True: 21.7k, False: 0]
  |  Branch (497:25): [True: 14.5k, False: 7.25k]
  ------------------
  498|  14.5k|      *anchor = cf->next;
  499|  14.5k|      cf->next = NULL;
  500|  14.5k|      CURL_TRC_CF(data, cf, "removing connected setup filter");
  ------------------
  |  |  153|  14.5k|  do {                                          \
  |  |  154|  14.5k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  14.5k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  29.0k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 14.5k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 14.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  29.0k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  14.5k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  14.5k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  14.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 14.5k]
  |  |  ------------------
  ------------------
  501|  14.5k|      cf->cft->destroy(cf, data);
  502|  14.5k|      curlx_free(cf);
  ------------------
  |  | 1476|  14.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  503|  14.5k|    }
  504|  7.25k|    else
  505|  7.25k|      anchor = &cf->next;
  506|  21.7k|  }
  507|  3.62k|}
Curl_conn_is_connected:
  517|  38.0k|{
  518|  38.0k|  struct Curl_cfilter *cf;
  519|       |
  520|  38.0k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  311|  38.0k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (311:36): [True: 38.0k, False: 0]
  |  |  |  Branch (311:50): [True: 38.0k, False: 0]
  |  |  ------------------
  ------------------
  521|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  522|  38.0k|  cf = conn->cfilter[sockindex];
  523|  38.0k|  if(cf)
  ------------------
  |  Branch (523:6): [True: 35.0k, False: 3.04k]
  ------------------
  524|  35.0k|    return (bool)cf->connected;
  525|  3.04k|  else if(conn->scheme->flags & PROTOPT_NONETWORK)
  ------------------
  |  |  214|  3.04k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (525:11): [True: 0, False: 3.04k]
  ------------------
  526|      0|    return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  527|  3.04k|  return FALSE;
  ------------------
  |  | 1048|  3.04k|#define FALSE false
  ------------------
  528|  38.0k|}
Curl_conn_is_ssl:
  586|  18.2k|{
  587|  18.2k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  311|  18.2k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (311:36): [True: 18.2k, False: 0]
  |  |  |  Branch (311:50): [True: 18.2k, False: 0]
  |  |  ------------------
  ------------------
  588|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  589|  18.2k|  return conn ? cf_is_ssl(conn->cfilter[sockindex]) : FALSE;
  ------------------
  |  | 1048|  18.2k|#define FALSE false
  ------------------
  |  Branch (589:10): [True: 18.0k, False: 150]
  ------------------
  590|  18.2k|}
Curl_conn_get_ssl_info:
  596|  7.36k|{
  597|  7.36k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  311|  7.36k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (311:36): [True: 7.36k, False: 0]
  |  |  |  Branch (311:50): [True: 7.36k, False: 0]
  |  |  ------------------
  ------------------
  598|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  599|  7.36k|  if(Curl_conn_is_ssl(conn, sockindex)) {
  ------------------
  |  Branch (599:6): [True: 3.58k, False: 3.77k]
  ------------------
  600|  3.58k|    struct Curl_cfilter *cf = conn->cfilter[sockindex];
  601|  3.58k|    CURLcode result = cf ?
  ------------------
  |  Branch (601:23): [True: 3.58k, False: 0]
  ------------------
  602|  3.58k|      cf->cft->query(cf, data, query, NULL, (void *)info) :
  603|  3.58k|      CURLE_UNKNOWN_OPTION;
  604|  3.58k|    return !result;
  605|  3.58k|  }
  606|  3.77k|  return FALSE;
  ------------------
  |  | 1048|  3.77k|#define FALSE false
  ------------------
  607|  7.36k|}
Curl_conn_is_multiplex:
  621|  15.0k|{
  622|  15.0k|  struct Curl_cfilter *cf;
  623|       |
  624|  15.0k|  if(!conn || !CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  311|  15.0k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (311:36): [True: 15.0k, False: 0]
  |  |  |  Branch (311:50): [True: 15.0k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (624:6): [True: 0, False: 15.0k]
  ------------------
  625|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  626|  15.0k|  for(cf = conn->cfilter[sockindex]; cf; cf = cf->next) {
  ------------------
  |  Branch (626:38): [True: 15.0k, False: 0]
  ------------------
  627|  15.0k|    if(cf->cft->flags & CF_TYPE_MULTIPLEX)
  ------------------
  |  |  210|  15.0k|#define CF_TYPE_MULTIPLEX   (1 << 2)
  ------------------
  |  Branch (627:8): [True: 6, False: 14.9k]
  ------------------
  628|      6|      return TRUE;
  ------------------
  |  | 1045|      6|#define TRUE true
  ------------------
  629|  14.9k|    if(cf->cft->flags & (CF_TYPE_IP_CONNECT | CF_TYPE_SSL))
  ------------------
  |  |  208|  14.9k|#define CF_TYPE_IP_CONNECT  (1 << 0)
  ------------------
                  if(cf->cft->flags & (CF_TYPE_IP_CONNECT | CF_TYPE_SSL))
  ------------------
  |  |  209|  14.9k|#define CF_TYPE_SSL         (1 << 1)
  ------------------
  |  Branch (629:8): [True: 14.9k, False: 0]
  ------------------
  630|  14.9k|      return FALSE;
  ------------------
  |  | 1048|  14.9k|#define FALSE false
  ------------------
  631|  14.9k|  }
  632|      0|  return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  633|  15.0k|}
Curl_socktype_for_transport:
  643|  3.62k|{
  644|  3.62k|  switch(transport) {
  645|  3.62k|  case TRNSPRT_TCP:
  ------------------
  |  |  238|  3.62k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (645:3): [True: 3.62k, False: 0]
  ------------------
  646|  3.62k|    return SOCK_STREAM;
  647|      0|  case TRNSPRT_UNIX:
  ------------------
  |  |  241|      0|#define TRNSPRT_UNIX 6
  ------------------
  |  Branch (647:3): [True: 0, False: 3.62k]
  ------------------
  648|      0|    return SOCK_STREAM;
  649|      0|  default: /* UDP and QUIC */
  ------------------
  |  Branch (649:3): [True: 0, False: 3.62k]
  ------------------
  650|       |    return SOCK_DGRAM;
  651|  3.62k|  }
  652|  3.62k|}
Curl_protocol_for_transport:
  655|  3.62k|{
  656|  3.62k|  switch(transport) {
  657|  3.62k|  case TRNSPRT_TCP:
  ------------------
  |  |  238|  3.62k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (657:3): [True: 3.62k, False: 0]
  ------------------
  658|  3.62k|    return IPPROTO_TCP;
  659|      0|  case TRNSPRT_UNIX:
  ------------------
  |  |  241|      0|#define TRNSPRT_UNIX 6
  ------------------
  |  Branch (659:3): [True: 0, False: 3.62k]
  ------------------
  660|      0|    return IPPROTO_IP;
  661|      0|  default: /* UDP and QUIC */
  ------------------
  |  Branch (661:3): [True: 0, False: 3.62k]
  ------------------
  662|       |    return IPPROTO_UDP;
  663|  3.62k|  }
  664|  3.62k|}
Curl_conn_get_alpn_negotiated:
  668|  3.61k|{
  669|  3.61k|  struct Curl_cfilter *cf = conn->cfilter[FIRSTSOCKET];
  ------------------
  |  |  234|  3.61k|#define FIRSTSOCKET     0
  ------------------
  670|  3.61k|  return Curl_conn_cf_get_alpn_negotiated(cf, data);
  671|  3.61k|}
Curl_conn_http_version:
  675|  7.21k|{
  676|  7.21k|  struct Curl_cfilter *cf;
  677|  7.21k|  CURLcode result = CURLE_UNKNOWN_OPTION;
  678|  7.21k|  unsigned char v = 0;
  679|       |
  680|  7.21k|  cf = conn->cfilter[FIRSTSOCKET];
  ------------------
  |  |  234|  7.21k|#define FIRSTSOCKET     0
  ------------------
  681|  7.21k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (681:9): [True: 7.21k, False: 0]
  ------------------
  682|  7.21k|    if(cf->cft->flags & CF_TYPE_HTTP) {
  ------------------
  |  |  212|  7.21k|#define CF_TYPE_HTTP        (1 << 4)
  ------------------
  |  Branch (682:8): [True: 2, False: 7.20k]
  ------------------
  683|      2|      int value = 0;
  684|      2|      result = cf->cft->query(cf, data, CF_QUERY_HTTP_VERSION, &value, NULL);
  ------------------
  |  |  174|      2|#define CF_QUERY_HTTP_VERSION       9  /* number (10/11/20/30)   - */
  ------------------
  685|      2|      if(!result && ((value < 0) || (value > 255)))
  ------------------
  |  Branch (685:10): [True: 2, False: 0]
  |  Branch (685:22): [True: 0, False: 2]
  |  Branch (685:37): [True: 0, False: 2]
  ------------------
  686|      0|        result = CURLE_FAILED_INIT;
  687|      2|      else
  688|      2|        v = (unsigned char)value;
  689|      2|      break;
  690|      2|    }
  691|  7.20k|    if(cf->cft->flags & (CF_TYPE_IP_CONNECT | CF_TYPE_SSL))
  ------------------
  |  |  208|  7.20k|#define CF_TYPE_IP_CONNECT  (1 << 0)
  ------------------
                  if(cf->cft->flags & (CF_TYPE_IP_CONNECT | CF_TYPE_SSL))
  ------------------
  |  |  209|  7.20k|#define CF_TYPE_SSL         (1 << 1)
  ------------------
  |  Branch (691:8): [True: 7.20k, False: 0]
  ------------------
  692|  7.20k|      break;
  693|  7.20k|  }
  694|  7.21k|  return (unsigned char)(result ? 0 : v);
  ------------------
  |  Branch (694:26): [True: 7.20k, False: 2]
  ------------------
  695|  7.21k|}
Curl_conn_data_pending:
  698|  3.64k|{
  699|  3.64k|  struct Curl_cfilter *cf;
  700|       |
  701|  3.64k|  (void)data;
  702|  3.64k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  3.64k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (702:3): [True: 0, False: 3.64k]
  |  Branch (702:3): [True: 3.64k, False: 0]
  ------------------
  703|  3.64k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1075|  3.64k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (703:3): [True: 0, False: 3.64k]
  |  Branch (703:3): [True: 3.64k, False: 0]
  ------------------
  704|  3.64k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  311|  3.64k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (311:36): [True: 3.64k, False: 0]
  |  |  |  Branch (311:50): [True: 3.64k, False: 0]
  |  |  ------------------
  ------------------
  705|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  706|       |
  707|  3.64k|  cf = data->conn->cfilter[sockindex];
  708|  3.64k|  while(cf && !cf->connected) {
  ------------------
  |  Branch (708:9): [True: 3.64k, False: 0]
  |  Branch (708:15): [True: 0, False: 3.64k]
  ------------------
  709|      0|    cf = cf->next;
  710|      0|  }
  711|  3.64k|  if(cf) {
  ------------------
  |  Branch (711:6): [True: 3.64k, False: 0]
  ------------------
  712|  3.64k|    return cf->cft->has_data_pending(cf, data);
  713|  3.64k|  }
  714|      0|  return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  715|  3.64k|}
Curl_conn_cf_needs_flush:
  719|  17.5k|{
  720|  17.5k|  CURLcode result;
  721|  17.5k|  int pending = 0;
  722|  17.5k|  result = cf ? cf->cft->query(cf, data, CF_QUERY_NEED_FLUSH,
  ------------------
  |  |  172|  17.5k|#define CF_QUERY_NEED_FLUSH         7  /* TRUE/FALSE - */
  ------------------
  |  Branch (722:12): [True: 17.5k, False: 0]
  ------------------
  723|  17.5k|                               &pending, NULL) : CURLE_UNKNOWN_OPTION;
  724|  17.5k|  return (result || !pending) ? FALSE : TRUE;
  ------------------
  |  | 1048|  17.5k|#define FALSE false
  ------------------
                return (result || !pending) ? FALSE : TRUE;
  ------------------
  |  | 1045|  17.5k|#define TRUE true
  ------------------
  |  Branch (724:11): [True: 17.5k, False: 0]
  |  Branch (724:21): [True: 0, False: 0]
  ------------------
  725|  17.5k|}
Curl_conn_needs_flush:
  728|  13.9k|{
  729|  13.9k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  311|  13.9k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (311:36): [True: 13.9k, False: 0]
  |  |  |  Branch (311:50): [True: 13.9k, False: 0]
  |  |  ------------------
  ------------------
  730|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  731|  13.9k|  return Curl_conn_cf_needs_flush(data->conn->cfilter[sockindex], data);
  732|  13.9k|}
Curl_conn_cf_cntrl:
  866|  32.5k|{
  867|  32.5k|  CURLcode result = CURLE_OK;
  868|       |
  869|  90.4k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (869:9): [True: 57.9k, False: 32.5k]
  ------------------
  870|  57.9k|    if(cf->cft->cntrl == Curl_cf_def_cntrl)
  ------------------
  |  Branch (870:8): [True: 14.5k, False: 43.4k]
  ------------------
  871|  14.5k|      continue;
  872|  43.4k|    result = cf->cft->cntrl(cf, data, event, arg1, arg2);
  873|  43.4k|    if(!ignore_result && result)
  ------------------
  |  Branch (873:8): [True: 0, False: 43.4k]
  |  Branch (873:26): [True: 0, False: 0]
  ------------------
  874|      0|      break;
  875|  43.4k|  }
  876|  32.5k|  return result;
  877|  32.5k|}
Curl_conn_cf_get_socket:
  881|  3.62k|{
  882|  3.62k|  curl_socket_t sock;
  883|  3.62k|  if(cf && !cf->cft->query(cf, data, CF_QUERY_SOCKET, NULL, &sock))
  ------------------
  |  |  169|  3.62k|#define CF_QUERY_SOCKET             3  /* -          curl_socket_t */
  ------------------
  |  Branch (883:6): [True: 3.62k, False: 0]
  |  Branch (883:12): [True: 0, False: 3.62k]
  ------------------
  884|      0|    return sock;
  885|  3.62k|  return CURL_SOCKET_BAD;
  ------------------
  |  |  147|  3.62k|#define CURL_SOCKET_BAD (-1)
  ------------------
  886|  3.62k|}
Curl_conn_cf_get_alpn_negotiated:
  899|  7.24k|{
  900|  7.24k|  const char *alpn = NULL;
  901|  7.24k|  CURL_TRC_CF(data, cf, "query ALPN");
  ------------------
  |  |  153|  7.24k|  do {                                          \
  |  |  154|  7.24k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  7.24k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  14.4k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 7.24k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 7.24k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  14.4k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  7.24k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  7.24k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  7.24k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 7.24k]
  |  |  ------------------
  ------------------
  902|  7.24k|  if(cf && !cf->cft->query(cf, data, CF_QUERY_ALPN_NEGOTIATED, NULL,
  ------------------
  |  |  182|  7.24k|#define CF_QUERY_ALPN_NEGOTIATED   15  /* -          const char * */
  ------------------
  |  Branch (902:6): [True: 7.24k, False: 0]
  |  Branch (902:12): [True: 7.24k, False: 0]
  ------------------
  903|  7.24k|                           CURL_UNCONST(&alpn)))
  ------------------
  |  |  856|  7.24k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  904|  7.24k|    return alpn;
  905|      0|  return NULL;
  906|  7.24k|}
Curl_conn_ev_data_setup:
  957|  3.62k|{
  958|  3.62k|  return cf_cntrl_all(data->conn, data, FALSE, CF_CTRL_DATA_SETUP, 0, NULL);
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
                return cf_cntrl_all(data->conn, data, FALSE, CF_CTRL_DATA_SETUP, 0, NULL);
  ------------------
  |  |  115|  3.62k|#define CF_CTRL_DATA_SETUP              4  /* 0          NULL     first fail */
  ------------------
  959|  3.62k|}
Curl_conn_ev_data_done_send:
  974|  3.55k|{
  975|  3.55k|  cf_cntrl_all(data->conn, data, TRUE, CF_CTRL_DATA_DONE_SEND, 0, NULL);
  ------------------
  |  | 1045|  3.55k|#define TRUE true
  ------------------
                cf_cntrl_all(data->conn, data, TRUE, CF_CTRL_DATA_DONE_SEND, 0, NULL);
  ------------------
  |  |  119|  3.55k|#define CF_CTRL_DATA_DONE_SEND          8  /* 0          NULL     ignored */
  ------------------
  976|  3.55k|}
Curl_conn_ev_data_done:
  983|  3.62k|{
  984|  3.62k|  cf_cntrl_all(data->conn, data, TRUE, CF_CTRL_DATA_DONE, premature, NULL);
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
                cf_cntrl_all(data->conn, data, TRUE, CF_CTRL_DATA_DONE, premature, NULL);
  ------------------
  |  |  118|  3.62k|#define CF_CTRL_DATA_DONE               7  /* premature  NULL     ignored */
  ------------------
  985|  3.62k|}
Curl_conn_get_max_concurrent:
 1018|     41|{
 1019|     41|  struct Curl_cfilter *cf;
 1020|     41|  CURLcode result;
 1021|     41|  int n = -1;
 1022|       |
 1023|     41|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  311|     41|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (311:36): [True: 41, False: 0]
  |  |  |  Branch (311:50): [True: 41, False: 0]
  |  |  ------------------
  ------------------
 1024|      0|    return 0;
 1025|       |
 1026|     41|  cf = conn->cfilter[sockindex];
 1027|     41|  result = cf ? cf->cft->query(cf, data, CF_QUERY_MAX_CONCURRENT,
  ------------------
  |  |  167|     41|#define CF_QUERY_MAX_CONCURRENT     1  /* number     -        */
  ------------------
  |  Branch (1027:12): [True: 41, False: 0]
  ------------------
 1028|     41|                               &n, NULL) : CURLE_UNKNOWN_OPTION;
 1029|       |  /* If no filter answered the query, the default is a non-multiplexed
 1030|       |   * connection with limit 1. Otherwise, the query may return 0
 1031|       |   * for connections that are in shutdown, e.g. server HTTP/2 GOAWAY. */
 1032|     41|  return (result || n < 0) ? 1 : (size_t)n;
  ------------------
  |  Branch (1032:11): [True: 41, False: 0]
  |  Branch (1032:21): [True: 0, False: 0]
  ------------------
 1033|     41|}
Curl_conn_recv:
 1062|  7.24k|{
 1063|  7.24k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  7.24k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1063:3): [True: 0, False: 7.24k]
  |  Branch (1063:3): [True: 7.24k, False: 0]
  ------------------
 1064|  7.24k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1075|  7.24k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1064:3): [True: 0, False: 7.24k]
  |  Branch (1064:3): [True: 7.24k, False: 0]
  ------------------
 1065|  7.24k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  311|  7.24k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (311:36): [True: 7.24k, False: 0]
  |  |  |  Branch (311:50): [True: 7.24k, False: 0]
  |  |  ------------------
  ------------------
 1066|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1067|  7.24k|  if(data && data->conn && data->conn->recv[sockindex])
  ------------------
  |  Branch (1067:6): [True: 7.24k, False: 0]
  |  Branch (1067:14): [True: 7.24k, False: 0]
  |  Branch (1067:28): [True: 7.24k, False: 0]
  ------------------
 1068|  7.24k|    return data->conn->recv[sockindex](data, sockindex, buf, len, pnread);
 1069|      0|  *pnread = 0;
 1070|      0|  return CURLE_FAILED_INIT;
 1071|  7.24k|}
Curl_conn_send:
 1076|  3.60k|{
 1077|  3.60k|  size_t write_len = len;
 1078|       |
 1079|  3.60k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  3.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1079:3): [True: 0, False: 3.60k]
  |  Branch (1079:3): [True: 3.60k, False: 0]
  ------------------
 1080|  3.60k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1075|  3.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1080:3): [True: 0, False: 3.60k]
  |  Branch (1080:3): [True: 3.60k, False: 0]
  ------------------
 1081|  3.60k|  DEBUGASSERT(CONN_SOCK_IDX_VALID(sockindex));
  ------------------
  |  | 1075|  3.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1081:3): [True: 0, False: 3.60k]
  |  Branch (1081:3): [True: 0, False: 0]
  |  Branch (1081:3): [True: 3.60k, False: 0]
  |  Branch (1081:3): [True: 3.60k, False: 0]
  ------------------
 1082|  3.60k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  311|  3.60k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (311:36): [True: 3.60k, False: 0]
  |  |  |  Branch (311:50): [True: 3.60k, False: 0]
  |  |  ------------------
  ------------------
 1083|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1084|  3.60k|#ifdef DEBUGBUILD
 1085|  3.60k|  if(write_len) {
  ------------------
  |  Branch (1085:6): [True: 3.60k, False: 0]
  ------------------
 1086|       |    /* Allow debug builds to override this logic to force short sends */
 1087|  3.60k|    const char *p = getenv("CURL_SMALLSENDS");
 1088|  3.60k|    if(p) {
  ------------------
  |  Branch (1088:8): [True: 0, False: 3.60k]
  ------------------
 1089|      0|      curl_off_t altsize;
 1090|      0|      if(!curlx_str_number(&p, &altsize, write_len)) {
  ------------------
  |  Branch (1090:10): [True: 0, False: 0]
  ------------------
 1091|      0|        write_len = (size_t)altsize;
 1092|      0|        if(write_len != len)
  ------------------
  |  Branch (1092:12): [True: 0, False: 0]
  ------------------
 1093|      0|          eos = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1094|      0|      }
 1095|      0|    }
 1096|  3.60k|  }
 1097|  3.60k|#endif
 1098|  3.60k|  if(data && data->conn && data->conn->send[sockindex])
  ------------------
  |  Branch (1098:6): [True: 3.60k, False: 0]
  |  Branch (1098:14): [True: 3.60k, False: 0]
  |  Branch (1098:28): [True: 3.60k, False: 0]
  ------------------
 1099|  3.60k|    return data->conn->send[sockindex](data, sockindex, buf, write_len, eos,
 1100|  3.60k|                                       pnwritten);
 1101|      0|  *pnwritten = 0;
 1102|      0|  return CURLE_FAILED_INIT;
 1103|  3.60k|}
cfilters.c:cf_bufq_reader:
  289|      5|{
  290|      5|  struct cf_io_ctx *io = writer_ctx;
  291|      5|  return Curl_conn_cf_recv(io->cf, io->data, (char *)buf, blen, pnread);
  292|      5|}
cfilters.c:cf_bufq_writer:
  314|      7|{
  315|      7|  struct cf_io_ctx *io = writer_ctx;
  316|       |  return Curl_conn_cf_send(io->cf, io->data, buf, buflen, FALSE, pnwritten);
  ------------------
  |  | 1048|      7|#define FALSE false
  ------------------
  317|      7|}
cfilters.c:cf_cntrl_all:
  452|  14.4k|{
  453|  14.4k|  CURLcode result = CURLE_OK;
  454|  14.4k|  int i;
  455|       |
  456|  43.3k|  for(i = 0; i < (int)CURL_ARRAYSIZE(conn->cfilter); ++i) {
  ------------------
  |  | 1299|  43.3k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (456:14): [True: 28.8k, False: 14.4k]
  ------------------
  457|  28.8k|    result = Curl_conn_cf_cntrl(conn->cfilter[i], data, ignore_result,
  458|  28.8k|                                event, arg1, arg2);
  459|  28.8k|    if(!ignore_result && result)
  ------------------
  |  Branch (459:8): [True: 7.25k, False: 21.6k]
  |  Branch (459:26): [True: 0, False: 7.25k]
  ------------------
  460|      0|      break;
  461|  28.8k|  }
  462|  14.4k|  return result;
  463|  14.4k|}
cfilters.c:cf_is_ssl:
  573|  18.0k|{
  574|  50.7k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (574:9): [True: 47.1k, False: 3.62k]
  ------------------
  575|       |    /* A tunneling proxy does not offer end2end encryption, even if
  576|       |     * it does SSL itself (e.g. QUIC H3 proxy) */
  577|  47.1k|    if((cf->cft->flags & CF_TYPE_SSL) && !(cf->cft->flags & CF_TYPE_PROXY))
  ------------------
  |  |  209|  47.1k|#define CF_TYPE_SSL         (1 << 1)
  ------------------
                  if((cf->cft->flags & CF_TYPE_SSL) && !(cf->cft->flags & CF_TYPE_PROXY))
  ------------------
  |  |  211|  10.8k|#define CF_TYPE_PROXY       (1 << 3)
  ------------------
  |  Branch (577:8): [True: 10.8k, False: 36.2k]
  |  Branch (577:42): [True: 10.8k, False: 0]
  ------------------
  578|  10.8k|      return TRUE;
  ------------------
  |  | 1045|  10.8k|#define TRUE true
  ------------------
  579|  36.2k|    if(cf->cft->flags & CF_TYPE_IP_CONNECT)
  ------------------
  |  |  208|  36.2k|#define CF_TYPE_IP_CONNECT  (1 << 0)
  ------------------
  |  Branch (579:8): [True: 3.62k, False: 32.6k]
  ------------------
  580|  3.62k|      return FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  581|  36.2k|  }
  582|  3.62k|  return FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  583|  18.0k|}

Curl_cpool_init:
  116|  3.73k|{
  117|  3.73k|  Curl_hash_init(&cpool->dest2bundle, size, Curl_hash_str,
  118|  3.73k|                 curlx_str_key_compare, cpool_bundle_free_entry);
  119|       |
  120|  3.73k|  cpool->share = share;
  121|       |  cpool->initialized = TRUE;
  ------------------
  |  | 1045|  3.73k|#define TRUE true
  ------------------
  122|  3.73k|}
Curl_cpool_destroy:
  232|  3.73k|{
  233|  3.73k|  if(cpool && cpool->initialized && admin) {
  ------------------
  |  Branch (233:6): [True: 3.73k, False: 0]
  |  Branch (233:15): [True: 3.73k, False: 0]
  |  Branch (233:37): [True: 3.73k, False: 0]
  ------------------
  234|  3.73k|    struct connectdata *conn;
  235|  3.73k|    struct Curl_sigpipe_ctx pipe_ctx;
  236|       |
  237|  3.73k|    CURL_TRC_M(admin, "%s[CPOOL] destroy, %zu connections",
  ------------------
  |  |  148|  3.73k|  do {                                   \
  |  |  149|  3.73k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  3.73k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.73k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.46k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.73k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.46k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.73k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  3.73k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|  3.73k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 3.73k]
  |  |  ------------------
  ------------------
  238|  3.73k|               cpool->share ? "[SHARE] " : "", cpool->num_conn);
  239|       |    /* Move all connections to the shutdown list */
  240|  3.73k|    sigpipe_init(&pipe_ctx);
  241|  3.73k|    CPOOL_LOCK(cpool, admin);
  ------------------
  |  |   42|  3.73k|  do {                                                                  \
  |  |   43|  3.73k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 3.73k, False: 0]
  |  |  ------------------
  |  |   44|  3.73k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  3.73k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 3.73k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  3.73k|        Curl_share_lock_share((c)->share, (d), CURL_LOCK_DATA_CONNECT,  \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  3.73k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1075|  3.73k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  3.73k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1045|  3.73k|#define TRUE true
  |  |  ------------------
  |  |   49|  3.73k|    }                                                                   \
  |  |   50|  3.73k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 3.73k]
  |  |  ------------------
  ------------------
  |  Branch (241:5): [True: 0, False: 3.73k]
  |  Branch (241:5): [True: 3.73k, False: 0]
  ------------------
  242|  3.73k|    conn = cpool_get_first(cpool);
  243|  3.73k|    if(conn)
  ------------------
  |  Branch (243:8): [True: 23, False: 3.71k]
  ------------------
  244|     23|      sigpipe_apply(admin, &pipe_ctx);
  245|  3.75k|    while(conn) {
  ------------------
  |  Branch (245:11): [True: 23, False: 3.73k]
  ------------------
  246|     23|      cpool_remove_conn(cpool, conn);
  247|     23|      cpool_discard_conn(cpool, admin, conn, FALSE);
  ------------------
  |  | 1048|     23|#define FALSE false
  ------------------
  248|     23|      conn = cpool_get_first(cpool);
  249|     23|    }
  250|  3.73k|    CPOOL_UNLOCK(cpool, admin);
  ------------------
  |  |   53|  3.73k|  do {                                                                  \
  |  |   54|  3.73k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 3.73k, False: 0]
  |  |  ------------------
  |  |   55|  3.73k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1075|  3.73k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  3.73k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1048|  3.73k|#define FALSE false
  |  |  ------------------
  |  |   57|  3.73k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  3.73k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 3.73k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  3.73k|        Curl_share_unlock_share((c)->share, (d), CURL_LOCK_DATA_CONNECT); \
  |  |   59|  3.73k|    }                                                                   \
  |  |   60|  3.73k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 3.73k]
  |  |  ------------------
  ------------------
  |  Branch (250:5): [True: 0, False: 3.73k]
  |  Branch (250:5): [True: 3.73k, False: 0]
  ------------------
  251|  3.73k|    sigpipe_restore(&pipe_ctx);
  252|  3.73k|    Curl_hash_destroy(&cpool->dest2bundle);
  253|  3.73k|  }
  254|  3.73k|}
Curl_cpool_get_instance:
  270|  3.57k|{
  271|  3.57k|  return cpool_get_instance(data);
  272|  3.57k|}
Curl_cpool_xfer_init:
  275|  3.73k|{
  276|  3.73k|  struct cpool *cpool = cpool_get_instance(data);
  277|       |
  278|  3.73k|  if(cpool) {
  ------------------
  |  Branch (278:6): [True: 3.73k, False: 0]
  ------------------
  279|  3.73k|    CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  3.73k|  do {                                                                  \
  |  |   43|  3.73k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 3.73k, False: 0]
  |  |  ------------------
  |  |   44|  3.73k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  3.73k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 3.73k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  3.73k|        Curl_share_lock_share((c)->share, (d), CURL_LOCK_DATA_CONNECT,  \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  3.73k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1075|  3.73k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  3.73k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1045|  3.73k|#define TRUE true
  |  |  ------------------
  |  |   49|  3.73k|    }                                                                   \
  |  |   50|  3.73k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 3.73k]
  |  |  ------------------
  ------------------
  |  Branch (279:5): [True: 0, False: 3.73k]
  |  Branch (279:5): [True: 3.73k, False: 0]
  ------------------
  280|       |    /* the identifier inside the connection cache */
  281|  3.73k|    data->id = cpool->next_easy_id++;
  282|  3.73k|    if(cpool->next_easy_id == CURL_OFF_T_MAX)
  ------------------
  |  |  588|  3.73k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (282:8): [True: 0, False: 3.73k]
  ------------------
  283|      0|      cpool->next_easy_id = 0;
  284|  3.73k|    data->state.lastconnect_id = -1;
  285|       |
  286|  3.73k|    CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  3.73k|  do {                                                                  \
  |  |   54|  3.73k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 3.73k, False: 0]
  |  |  ------------------
  |  |   55|  3.73k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1075|  3.73k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  3.73k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1048|  3.73k|#define FALSE false
  |  |  ------------------
  |  |   57|  3.73k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  3.73k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 3.73k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  3.73k|        Curl_share_unlock_share((c)->share, (d), CURL_LOCK_DATA_CONNECT); \
  |  |   59|  3.73k|    }                                                                   \
  |  |   60|  3.73k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 3.73k]
  |  |  ------------------
  ------------------
  |  Branch (286:5): [True: 0, False: 3.73k]
  |  Branch (286:5): [True: 3.73k, False: 0]
  ------------------
  287|  3.73k|  }
  288|      0|  else {
  289|       |    /* We should not get here, but in a non-debug build, do something */
  290|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (290:5): [Folded, False: 0]
  |  Branch (290:5): [Folded, False: 0]
  ------------------
  291|      0|    data->id = 0;
  292|      0|    data->state.lastconnect_id = -1;
  293|      0|  }
  294|  3.73k|}
Curl_conn_close:
  432|  3.60k|{
  433|  3.60k|  struct cpool *cpool = cpool_get_instance(data);
  434|  3.60k|  cpool_conn_close(cpool, data, conn, aborted);
  435|  3.60k|}
Curl_cpool_check_limits:
  456|  3.62k|{
  457|  3.62k|  struct cpool *cpool = cpool_get_instance(data);
  458|  3.62k|  struct cshutdn *cshutdn = Curl_cshutdn_get(data);
  459|  3.62k|  struct Curl_easy *admin;
  460|  3.62k|  struct cpool_bundle *bundle;
  461|  3.62k|  size_t dest_limit = 0;
  462|  3.62k|  size_t total_limit = 0;
  463|  3.62k|  size_t shutdowns;
  464|  3.62k|  int res = CPOOL_LIMIT_OK;
  ------------------
  |  |   92|  3.62k|#define CPOOL_LIMIT_OK     0
  ------------------
  465|       |
  466|  3.62k|  if(!cpool)
  ------------------
  |  Branch (466:6): [True: 0, False: 3.62k]
  ------------------
  467|      0|    return CPOOL_LIMIT_OK;
  ------------------
  |  |   92|      0|#define CPOOL_LIMIT_OK     0
  ------------------
  468|       |
  469|       |  /* multi determines the limits, no matter who owns the pool */
  470|  3.62k|  if(data->multi) {
  ------------------
  |  Branch (470:6): [True: 3.62k, False: 0]
  ------------------
  471|  3.62k|    dest_limit = data->multi->max_host_connections;
  472|  3.62k|    total_limit = data->multi->max_total_connections;
  473|  3.62k|  }
  474|       |
  475|  3.62k|  if(!dest_limit && !total_limit)
  ------------------
  |  Branch (475:6): [True: 3.62k, False: 0]
  |  Branch (475:21): [True: 3.62k, False: 0]
  ------------------
  476|  3.62k|    return CPOOL_LIMIT_OK;
  ------------------
  |  |   92|  3.62k|#define CPOOL_LIMIT_OK     0
  ------------------
  477|       |
  478|      0|  admin = Curl_get_admin(data);
  479|      0|  CPOOL_LOCK(cpool, admin);
  ------------------
  |  |   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_share((c)->share, (d), CURL_LOCK_DATA_CONNECT,  \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|      0|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|      0|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  |  |   49|      0|    }                                                                   \
  |  |   50|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (479:3): [True: 0, False: 0]
  |  Branch (479:3): [True: 0, False: 0]
  ------------------
  480|      0|  if(dest_limit) {
  ------------------
  |  Branch (480:6): [True: 0, False: 0]
  ------------------
  481|      0|    size_t live;
  482|       |
  483|      0|    bundle = cpool_find_bundle(cpool, conn);
  484|      0|    live = bundle ? Curl_llist_count(&bundle->conns) : 0;
  ------------------
  |  Branch (484:12): [True: 0, False: 0]
  ------------------
  485|      0|    shutdowns = Curl_cshutdn_dest_count(cshutdn, conn->destination);
  486|      0|    while((live + shutdowns) >= dest_limit) {
  ------------------
  |  Branch (486:11): [True: 0, False: 0]
  ------------------
  487|      0|      if(shutdowns) {
  ------------------
  |  Branch (487:10): [True: 0, False: 0]
  ------------------
  488|       |        /* close one connection in shutdown right away, if we can */
  489|      0|        if(!Curl_cshutdn_close_oldest(cshutdn, conn->destination))
  ------------------
  |  Branch (489:12): [True: 0, False: 0]
  ------------------
  490|      0|          break;
  491|      0|      }
  492|      0|      else if(!bundle)
  ------------------
  |  Branch (492:15): [True: 0, False: 0]
  ------------------
  493|      0|        break;
  494|      0|      else {
  495|      0|        struct connectdata *oldest_idle = NULL;
  496|       |        /* The bundle is full. Extract the oldest connection that may
  497|       |         * be removed now, if there is one. */
  498|      0|        oldest_idle = cpool_bundle_get_oldest_idle(bundle, pnow);
  499|      0|        if(!oldest_idle)
  ------------------
  |  Branch (499:12): [True: 0, False: 0]
  ------------------
  500|      0|          break;
  501|       |        /* disconnect the old conn and continue */
  502|      0|        CURL_TRC_M(admin, "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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  503|      0|                   " from %zu to reach destination limit of %zu",
  504|      0|                   oldest_idle->connection_id,
  505|      0|                   Curl_llist_count(&bundle->conns), dest_limit);
  506|      0|        cpool_evict_conn(cpool, admin, oldest_idle);
  507|       |
  508|       |        /* in case the bundle was destroyed in disconnect, look it up again */
  509|      0|        bundle = cpool_find_bundle(cpool, conn);
  510|      0|        live = bundle ? Curl_llist_count(&bundle->conns) : 0;
  ------------------
  |  Branch (510:16): [True: 0, False: 0]
  ------------------
  511|      0|      }
  512|      0|      shutdowns = Curl_cshutdn_dest_count(cshutdn, conn->destination);
  513|      0|    }
  514|      0|    if((live + shutdowns) >= dest_limit) {
  ------------------
  |  Branch (514:8): [True: 0, False: 0]
  ------------------
  515|      0|      res = CPOOL_LIMIT_DEST;
  ------------------
  |  |   93|      0|#define CPOOL_LIMIT_DEST   1
  ------------------
  516|      0|      goto out;
  517|      0|    }
  518|      0|  }
  519|       |
  520|      0|  if(total_limit) {
  ------------------
  |  Branch (520:6): [True: 0, False: 0]
  ------------------
  521|      0|    shutdowns = Curl_cshutdn_count(cshutdn);
  522|      0|    while((cpool->num_conn + shutdowns) >= total_limit) {
  ------------------
  |  Branch (522:11): [True: 0, False: 0]
  ------------------
  523|      0|      if(shutdowns) {
  ------------------
  |  Branch (523:10): [True: 0, False: 0]
  ------------------
  524|       |        /* close one connection in shutdown right away, if we can */
  525|      0|        if(!Curl_cshutdn_close_oldest(cshutdn, NULL))
  ------------------
  |  Branch (525:12): [True: 0, False: 0]
  ------------------
  526|      0|          break;
  527|      0|      }
  528|      0|      else {
  529|      0|        struct connectdata *oldest_idle =
  530|      0|          cpool_get_oldest_idle(cpool, pnow, 0);
  531|      0|        if(!oldest_idle)
  ------------------
  |  Branch (531:12): [True: 0, False: 0]
  ------------------
  532|      0|          break;
  533|       |        /* disconnect the old conn and continue */
  534|      0|        CURL_TRC_M(admin, "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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  535|      0|                   FMT_OFF_T " from %zu to reach total "
  536|      0|                   "limit of %zu",
  537|      0|                   oldest_idle->connection_id, cpool->num_conn, total_limit);
  538|      0|        cpool_evict_conn(cpool, admin, oldest_idle);
  539|      0|      }
  540|      0|      shutdowns = Curl_cshutdn_count(cshutdn);
  541|      0|    }
  542|      0|    if((cpool->num_conn + shutdowns) >= total_limit) {
  ------------------
  |  Branch (542:8): [True: 0, False: 0]
  ------------------
  543|      0|      res = CPOOL_LIMIT_TOTAL;
  ------------------
  |  |   94|      0|#define CPOOL_LIMIT_TOTAL  2
  ------------------
  544|      0|      goto out;
  545|      0|    }
  546|      0|  }
  547|       |
  548|      0|out:
  549|      0|  CPOOL_UNLOCK(cpool, admin);
  ------------------
  |  |   53|      0|  do {                                                                  \
  |  |   54|      0|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|      0|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1048|      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_share((c)->share, (d), CURL_LOCK_DATA_CONNECT); \
  |  |   59|      0|    }                                                                   \
  |  |   60|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (549:3): [True: 0, False: 0]
  |  Branch (549:3): [True: 0, False: 0]
  ------------------
  550|      0|  return res;
  551|      0|}
Curl_cpool_add:
  555|  3.62k|{
  556|  3.62k|  CURLcode result = CURLE_OK;
  557|  3.62k|  struct cpool_bundle *bundle = NULL;
  558|  3.62k|  struct cpool *cpool = cpool_get_instance(data);
  559|  3.62k|  DEBUGASSERT(conn);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (559:3): [True: 0, False: 3.62k]
  |  Branch (559:3): [True: 3.62k, False: 0]
  ------------------
  560|       |
  561|  3.62k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (561:3): [True: 0, False: 3.62k]
  |  Branch (561:3): [True: 3.62k, False: 0]
  ------------------
  562|  3.62k|  if(!cpool)
  ------------------
  |  Branch (562:6): [True: 0, False: 3.62k]
  ------------------
  563|      0|    return CURLE_FAILED_INIT;
  564|       |
  565|  3.62k|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  3.62k|  do {                                                                  \
  |  |   43|  3.62k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |   44|  3.62k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  3.62k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 3.62k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  3.62k|        Curl_share_lock_share((c)->share, (d), CURL_LOCK_DATA_CONNECT,  \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  3.62k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  3.62k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1045|  3.62k|#define TRUE true
  |  |  ------------------
  |  |   49|  3.62k|    }                                                                   \
  |  |   50|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  |  Branch (565:3): [True: 0, False: 3.62k]
  |  Branch (565:3): [True: 3.62k, False: 0]
  ------------------
  566|  3.62k|  bundle = cpool_find_bundle(cpool, conn);
  567|  3.62k|  if(!bundle) {
  ------------------
  |  Branch (567:6): [True: 3.62k, False: 0]
  ------------------
  568|  3.62k|    bundle = cpool_add_bundle(cpool, conn);
  569|  3.62k|    if(!bundle) {
  ------------------
  |  Branch (569:8): [True: 0, False: 3.62k]
  ------------------
  570|      0|      result = CURLE_OUT_OF_MEMORY;
  571|      0|      goto out;
  572|      0|    }
  573|  3.62k|  }
  574|       |
  575|  3.62k|  cpool_bundle_add(bundle, conn);
  576|  3.62k|  conn->connection_id = cpool->next_connection_id++;
  577|  3.62k|  cpool->num_conn++;
  578|  3.62k|  CURL_TRC_M(data, "[CPOOL] added connection %" FMT_OFF_T ". "
  ------------------
  |  |  148|  3.62k|  do {                                   \
  |  |  149|  3.62k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  3.62k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.62k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.62k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  3.62k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  579|  3.62k|             "The cache now contains %zu members",
  580|  3.62k|             conn->connection_id, cpool->num_conn);
  581|  3.62k|out:
  582|  3.62k|  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  3.62k|  do {                                                                  \
  |  |   54|  3.62k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |   55|  3.62k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  3.62k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1048|  3.62k|#define FALSE false
  |  |  ------------------
  |  |   57|  3.62k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  3.62k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 3.62k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  3.62k|        Curl_share_unlock_share((c)->share, (d), CURL_LOCK_DATA_CONNECT); \
  |  |   59|  3.62k|    }                                                                   \
  |  |   60|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  |  Branch (582:3): [True: 0, False: 3.62k]
  |  Branch (582:3): [True: 3.62k, False: 0]
  ------------------
  583|       |
  584|  3.62k|  return result;
  585|  3.62k|}
Curl_cpool_conn_now_idle:
  643|     41|{
  644|     41|  unsigned int maxconnects;
  645|     41|  struct connectdata *oldest_idle = NULL;
  646|     41|  struct cpool *cpool = cpool_get_instance(data);
  647|     41|  struct Curl_easy *admin;
  648|     41|  bool kept = TRUE;
  ------------------
  |  | 1045|     41|#define TRUE true
  ------------------
  649|     41|  timediff_t min_age_ms = 0;
  650|       |
  651|     41|  if(!data || !data->multi)
  ------------------
  |  Branch (651:6): [True: 0, False: 41]
  |  Branch (651:15): [True: 0, False: 41]
  ------------------
  652|      0|    return kept;
  653|       |
  654|     41|  if(!data->multi->maxconnects) {
  ------------------
  |  Branch (654:6): [True: 41, False: 0]
  ------------------
  655|       |    /* Attached transfers is a weak indicator of business. */
  656|     41|    uint32_t attached = Curl_multi_xfers_attached(data->multi);
  657|     41|    maxconnects = (attached <= UINT_MAX / 2) ? attached * 2 : UINT_MAX;
  ------------------
  |  Branch (657:19): [True: 41, False: 0]
  ------------------
  658|       |    /* We are guessing. So, only evict a "seemingly superfluous" connection
  659|       |     * when has not been used for this long, */
  660|     41|    min_age_ms = 1000;
  661|     41|  }
  662|      0|  else {
  663|      0|    maxconnects = data->multi->maxconnects;
  664|      0|  }
  665|       |
  666|       |  /* remember times, connection had been used just before */
  667|     41|  conn->lastchecked = conn->lastupkeep = conn->lastused = *Curl_pgrs_now(data);
  668|     41|  if(cpool && maxconnects) {
  ------------------
  |  Branch (668:6): [True: 41, False: 0]
  |  Branch (668:15): [True: 41, False: 0]
  ------------------
  669|       |    /* may be called form a callback already under lock */
  670|     41|    bool do_lock = !CPOOL_IS_LOCKED(cpool);
  ------------------
  |  |   39|     41|#define CPOOL_IS_LOCKED(c)    ((c) && (c)->locked)
  |  |  ------------------
  |  |  |  Branch (39:32): [True: 41, False: 0]
  |  |  |  Branch (39:39): [True: 41, False: 0]
  |  |  ------------------
  ------------------
  671|       |
  672|     41|    admin = Curl_get_admin(data);
  673|     41|    if(do_lock)
  ------------------
  |  Branch (673:8): [True: 0, False: 41]
  ------------------
  674|      0|      CPOOL_LOCK(cpool, admin);
  ------------------
  |  |   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_share((c)->share, (d), CURL_LOCK_DATA_CONNECT,  \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|      0|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|      0|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  |  |   49|      0|    }                                                                   \
  |  |   50|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (674:7): [True: 0, False: 0]
  |  Branch (674:7): [True: 0, False: 0]
  ------------------
  675|     41|    if(cpool->num_conn > maxconnects) {
  ------------------
  |  Branch (675:8): [True: 0, False: 41]
  ------------------
  676|      0|      infof(data, "Connection pool is full, closing the oldest of %zu/%u",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  677|      0|            cpool->num_conn, maxconnects);
  678|       |
  679|      0|      oldest_idle = cpool_get_oldest_idle(cpool, &conn->lastused, min_age_ms);
  680|      0|      kept = (oldest_idle != conn);
  681|      0|      if(oldest_idle) {
  ------------------
  |  Branch (681:10): [True: 0, False: 0]
  ------------------
  682|      0|        cpool_evict_conn(cpool, admin, oldest_idle);
  683|      0|      }
  684|      0|    }
  685|     41|    if(do_lock)
  ------------------
  |  Branch (685:8): [True: 0, False: 41]
  ------------------
  686|      0|      CPOOL_UNLOCK(cpool, admin);
  ------------------
  |  |   53|      0|  do {                                                                  \
  |  |   54|      0|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|      0|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1048|      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_share((c)->share, (d), CURL_LOCK_DATA_CONNECT); \
  |  |   59|      0|    }                                                                   \
  |  |   60|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (686:7): [True: 0, False: 0]
  |  Branch (686:7): [True: 0, False: 0]
  ------------------
  687|     41|  }
  688|       |
  689|     41|  return kept;
  690|     41|}
Curl_cpool_find:
  697|  3.57k|{
  698|  3.57k|  struct cpool *cpool = cpool_get_instance(data);
  699|  3.57k|  struct cpool_bundle *bundle;
  700|  3.57k|  bool found = FALSE;
  ------------------
  |  | 1048|  3.57k|#define FALSE false
  ------------------
  701|       |
  702|  3.57k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1075|  3.57k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (702:3): [True: 0, False: 3.57k]
  |  Branch (702:3): [True: 3.57k, False: 0]
  ------------------
  703|  3.57k|  DEBUGASSERT(conn_cb);
  ------------------
  |  | 1075|  3.57k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (703:3): [True: 0, False: 3.57k]
  |  Branch (703:3): [True: 3.57k, False: 0]
  ------------------
  704|  3.57k|  if(!cpool)
  ------------------
  |  Branch (704:6): [True: 0, False: 3.57k]
  ------------------
  705|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  706|       |
  707|  3.57k|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  3.57k|  do {                                                                  \
  |  |   43|  3.57k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 3.57k, False: 0]
  |  |  ------------------
  |  |   44|  3.57k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  3.57k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 3.57k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  3.57k|        Curl_share_lock_share((c)->share, (d), CURL_LOCK_DATA_CONNECT,  \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  3.57k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1075|  3.57k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  3.57k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1045|  3.57k|#define TRUE true
  |  |  ------------------
  |  |   49|  3.57k|    }                                                                   \
  |  |   50|  3.57k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 3.57k]
  |  |  ------------------
  ------------------
  |  Branch (707:3): [True: 0, False: 3.57k]
  |  Branch (707:3): [True: 3.57k, False: 0]
  ------------------
  708|  3.57k|  bundle = Curl_hash_pick(&cpool->dest2bundle,
  709|  3.57k|                          CURL_UNCONST(destination),
  ------------------
  |  |  856|  3.57k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  710|  3.57k|                          strlen(destination) + 1);
  711|  3.57k|  if(bundle) {
  ------------------
  |  Branch (711:6): [True: 0, False: 3.57k]
  ------------------
  712|      0|    struct Curl_llist_node *curr = Curl_llist_head(&bundle->conns);
  713|      0|    while(curr) {
  ------------------
  |  Branch (713:11): [True: 0, False: 0]
  ------------------
  714|      0|      struct connectdata *conn = Curl_node_elem(curr);
  715|       |      /* Get next node now. callback might discard current */
  716|      0|      curr = Curl_node_next(curr);
  717|       |
  718|      0|      if(conn_cb(conn, userdata)) {
  ------------------
  |  Branch (718:10): [True: 0, False: 0]
  ------------------
  719|      0|        found = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  720|      0|        break;
  721|      0|      }
  722|      0|    }
  723|      0|  }
  724|       |
  725|  3.57k|  if(done_cb) {
  ------------------
  |  Branch (725:6): [True: 3.57k, False: 0]
  ------------------
  726|  3.57k|    found = done_cb(userdata);
  727|  3.57k|  }
  728|  3.57k|  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  3.57k|  do {                                                                  \
  |  |   54|  3.57k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 3.57k, False: 0]
  |  |  ------------------
  |  |   55|  3.57k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1075|  3.57k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  3.57k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1048|  3.57k|#define FALSE false
  |  |  ------------------
  |  |   57|  3.57k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  3.57k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 3.57k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  3.57k|        Curl_share_unlock_share((c)->share, (d), CURL_LOCK_DATA_CONNECT); \
  |  |   59|  3.57k|    }                                                                   \
  |  |   60|  3.57k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 3.57k]
  |  |  ------------------
  ------------------
  |  Branch (728:3): [True: 0, False: 3.57k]
  |  Branch (728:3): [True: 3.57k, False: 0]
  ------------------
  729|  3.57k|  return found;
  730|  3.57k|}
Curl_cpool_prune_dead:
  764|  3.57k|{
  765|  3.57k|  struct Curl_easy *admin;
  766|  3.57k|  timediff_t elapsed;
  767|       |
  768|  3.57k|  if(!cpool)
  ------------------
  |  Branch (768:6): [True: 0, False: 3.57k]
  ------------------
  769|      0|    return;
  770|       |
  771|  3.57k|  admin = Curl_get_admin(data);
  772|  3.57k|  CPOOL_LOCK(cpool, admin);
  ------------------
  |  |   42|  3.57k|  do {                                                                  \
  |  |   43|  3.57k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 3.57k, False: 0]
  |  |  ------------------
  |  |   44|  3.57k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  3.57k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 3.57k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  3.57k|        Curl_share_lock_share((c)->share, (d), CURL_LOCK_DATA_CONNECT,  \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  3.57k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1075|  3.57k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  3.57k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1045|  3.57k|#define TRUE true
  |  |  ------------------
  |  |   49|  3.57k|    }                                                                   \
  |  |   50|  3.57k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 3.57k]
  |  |  ------------------
  ------------------
  |  Branch (772:3): [True: 0, False: 3.57k]
  |  Branch (772:3): [True: 3.57k, False: 0]
  ------------------
  773|  3.57k|  elapsed = curlx_ptimediff_ms(Curl_pgrs_now(admin), &cpool->last_cleanup);
  774|       |
  775|  3.57k|  if(elapsed >= 1000L) {
  ------------------
  |  Branch (775:6): [True: 3.57k, False: 0]
  ------------------
  776|  3.57k|    struct cpool_reaper_ctx reaper;
  777|       |
  778|  3.57k|    memset(&reaper, 0, sizeof(reaper));
  779|  3.57k|    reaper.now = *Curl_pgrs_now(admin);
  780|  3.57k|    while(cpool_foreach(admin, cpool, &reaper, cpool_reap_dead_cb))
  ------------------
  |  Branch (780:11): [True: 0, False: 3.57k]
  ------------------
  781|      0|      ;
  782|  3.57k|    cpool->last_cleanup = *Curl_pgrs_now(admin);
  783|  3.57k|  }
  784|       |  CPOOL_UNLOCK(cpool, admin);
  ------------------
  |  |   53|  3.57k|  do {                                                                  \
  |  |   54|  3.57k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 3.57k, False: 0]
  |  |  ------------------
  |  |   55|  3.57k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1075|  3.57k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  3.57k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1048|  3.57k|#define FALSE false
  |  |  ------------------
  |  |   57|  3.57k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  3.57k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 3.57k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  3.57k|        Curl_share_unlock_share((c)->share, (d), CURL_LOCK_DATA_CONNECT); \
  |  |   59|  3.57k|    }                                                                   \
  |  |   60|  3.57k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 3.57k]
  |  |  ------------------
  ------------------
  |  Branch (784:3): [True: 0, False: 3.57k]
  |  Branch (784:3): [True: 3.57k, False: 0]
  ------------------
  785|  3.57k|}
Curl_cpool_get_conn:
  849|  3.64k|{
  850|  3.64k|  struct cpool *cpool = cpool_get_instance(data);
  851|  3.64k|  struct cpool_find_ctx fctx;
  852|       |
  853|  3.64k|  if(!cpool)
  ------------------
  |  Branch (853:6): [True: 3.62k, False: 18]
  ------------------
  854|  3.62k|    return NULL;
  855|     18|  fctx.id = conn_id;
  856|     18|  fctx.conn = NULL;
  857|     18|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|     18|  do {                                                                  \
  |  |   43|     18|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 18, False: 0]
  |  |  ------------------
  |  |   44|     18|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|     18|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 18]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|     18|        Curl_share_lock_share((c)->share, (d), CURL_LOCK_DATA_CONNECT,  \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|     18|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1075|     18|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|     18|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1045|     18|#define TRUE true
  |  |  ------------------
  |  |   49|     18|    }                                                                   \
  |  |   50|     18|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 18]
  |  |  ------------------
  ------------------
  |  Branch (857:3): [True: 0, False: 18]
  |  Branch (857:3): [True: 18, False: 0]
  ------------------
  858|     18|  cpool_foreach(data, cpool, &fctx, cpool_find_conn);
  859|     18|  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|     18|  do {                                                                  \
  |  |   54|     18|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 18, False: 0]
  |  |  ------------------
  |  |   55|     18|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1075|     18|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|     18|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1048|     18|#define FALSE false
  |  |  ------------------
  |  |   57|     18|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|     18|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 18]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|     18|        Curl_share_unlock_share((c)->share, (d), CURL_LOCK_DATA_CONNECT); \
  |  |   59|     18|    }                                                                   \
  |  |   60|     18|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 18]
  |  |  ------------------
  ------------------
  |  Branch (859:3): [True: 0, False: 18]
  |  Branch (859:3): [True: 18, False: 0]
  ------------------
  860|     18|  return fctx.conn;
  861|     18|}
Curl_cpool_do_locked:
  866|  3.62k|{
  867|  3.62k|  struct cpool *cpool = cpool_get_instance(data);
  868|  3.62k|  if(cpool) {
  ------------------
  |  Branch (868:6): [True: 3.62k, False: 0]
  ------------------
  869|  3.62k|    CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  3.62k|  do {                                                                  \
  |  |   43|  3.62k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |   44|  3.62k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  3.62k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 3.62k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  3.62k|        Curl_share_lock_share((c)->share, (d), CURL_LOCK_DATA_CONNECT,  \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  3.62k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  3.62k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1045|  3.62k|#define TRUE true
  |  |  ------------------
  |  |   49|  3.62k|    }                                                                   \
  |  |   50|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  |  Branch (869:5): [True: 0, False: 3.62k]
  |  Branch (869:5): [True: 3.62k, False: 0]
  ------------------
  870|  3.62k|    cb(conn, data, cbdata);
  871|  3.62k|    CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  3.62k|  do {                                                                  \
  |  |   54|  3.62k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |   55|  3.62k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  3.62k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1048|  3.62k|#define FALSE false
  |  |  ------------------
  |  |   57|  3.62k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  3.62k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 3.62k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  3.62k|        Curl_share_unlock_share((c)->share, (d), CURL_LOCK_DATA_CONNECT); \
  |  |   59|  3.62k|    }                                                                   \
  |  |   60|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  |  Branch (871:5): [True: 0, False: 3.62k]
  |  Branch (871:5): [True: 3.62k, False: 0]
  ------------------
  872|  3.62k|  }
  873|      0|  else
  874|      0|    cb(conn, data, cbdata);
  875|  3.62k|}
conncache.c:cpool_bundle_free_entry:
  109|  3.62k|{
  110|  3.62k|  cpool_bundle_destroy((struct cpool_bundle *)freethis);
  111|  3.62k|}
conncache.c:cpool_bundle_destroy:
   84|  3.62k|{
   85|  3.62k|  DEBUGASSERT(!Curl_llist_count(&bundle->conns));
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (85:3): [True: 0, False: 3.62k]
  |  Branch (85:3): [True: 3.62k, False: 0]
  ------------------
   86|  3.62k|  curlx_free(bundle);
  ------------------
  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   87|  3.62k|}
conncache.c:cpool_get_first:
  126|  3.75k|{
  127|  3.75k|  struct Curl_hash_iterator iter;
  128|  3.75k|  struct Curl_hash_element *he;
  129|  3.75k|  struct cpool_bundle *bundle;
  130|  3.75k|  struct Curl_llist_node *conn_node;
  131|       |
  132|  3.75k|  Curl_hash_start_iterate(&cpool->dest2bundle, &iter);
  133|  3.75k|  for(he = Curl_hash_next_element(&iter); he;
  ------------------
  |  Branch (133:43): [True: 23, False: 3.73k]
  ------------------
  134|  3.75k|      he = Curl_hash_next_element(&iter)) {
  135|     23|    bundle = he->ptr;
  136|     23|    conn_node = Curl_llist_head(&bundle->conns);
  137|     23|    if(conn_node)
  ------------------
  |  Branch (137:8): [True: 23, False: 0]
  ------------------
  138|     23|      return Curl_node_elem(conn_node);
  139|     23|  }
  140|  3.73k|  return NULL;
  141|  3.75k|}
conncache.c:cpool_remove_conn:
  160|  3.62k|{
  161|  3.62k|  struct Curl_llist *list = Curl_node_llist(&conn->cpool_node);
  162|  3.62k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (162:3): [True: 0, False: 3.62k]
  |  Branch (162:3): [True: 3.62k, False: 0]
  ------------------
  163|  3.62k|  if(list) {
  ------------------
  |  Branch (163:6): [True: 3.62k, False: 0]
  ------------------
  164|       |    /* The connection is certainly in the pool, but where? */
  165|  3.62k|    struct cpool_bundle *bundle = cpool_find_bundle(cpool, conn);
  166|  3.62k|    if(bundle && (list == &bundle->conns)) {
  ------------------
  |  Branch (166:8): [True: 3.62k, False: 0]
  |  Branch (166:18): [True: 3.62k, False: 0]
  ------------------
  167|  3.62k|      cpool_bundle_remove(bundle, conn);
  168|  3.62k|      if(!Curl_llist_count(&bundle->conns))
  ------------------
  |  Branch (168:10): [True: 3.62k, False: 0]
  ------------------
  169|  3.62k|        cpool_remove_bundle(cpool, bundle);
  170|  3.62k|      conn->bits.in_cpool = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  171|  3.62k|      cpool->num_conn--;
  172|  3.62k|    }
  173|      0|    else {
  174|       |      /* Should have been in the bundle list */
  175|       |      DEBUGASSERT(NULL);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (175:7): [True: 0, False: 0]
  |  Branch (175:7): [True: 0, False: 0]
  ------------------
  176|      0|    }
  177|  3.62k|  }
  178|  3.62k|}
conncache.c:cpool_bundle_remove:
  101|  3.62k|{
  102|  3.62k|  (void)bundle;
  103|  3.62k|  DEBUGASSERT(Curl_node_llist(&conn->cpool_node) == &bundle->conns);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (103:3): [True: 0, False: 3.62k]
  |  Branch (103:3): [True: 3.62k, False: 0]
  ------------------
  104|  3.62k|  Curl_node_remove(&conn->cpool_node);
  105|       |  conn->bits.in_cpool = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  106|  3.62k|}
conncache.c:cpool_remove_bundle:
  152|  3.62k|{
  153|  3.62k|  if(!cpool)
  ------------------
  |  Branch (153:6): [True: 0, False: 3.62k]
  ------------------
  154|      0|    return;
  155|  3.62k|  Curl_hash_delete(&cpool->dest2bundle, bundle->dest, bundle->dest_len);
  156|  3.62k|}
conncache.c:cpool_discard_conn:
  184|  3.62k|{
  185|  3.62k|  struct cshutdn *cshutdn;
  186|  3.62k|  struct Curl_easy *admin;
  187|  3.62k|  bool done = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  188|       |
  189|  3.62k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (189:3): [True: 0, False: 3.62k]
  |  Branch (189:3): [True: 3.62k, False: 0]
  ------------------
  190|  3.62k|  DEBUGASSERT(!data->conn);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (190:3): [True: 0, False: 3.62k]
  |  Branch (190:3): [True: 3.62k, False: 0]
  ------------------
  191|  3.62k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (191:3): [True: 0, False: 3.62k]
  |  Branch (191:3): [True: 3.62k, False: 0]
  ------------------
  192|  3.62k|  DEBUGASSERT(!conn->bits.in_cpool);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (192:3): [True: 0, False: 3.62k]
  |  Branch (192:3): [True: 3.62k, False: 0]
  ------------------
  193|       |
  194|  3.62k|  admin = Curl_get_admin(data);
  195|       |  /*
  196|       |   * If this connection is not marked to force-close, leave it open if there
  197|       |   * are other users of it
  198|       |   */
  199|  3.62k|  if(CONN_INUSE(conn) && !aborted) {
  ------------------
  |  |  357|  7.25k|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  |  |  ------------------
  |  |  |  Branch (357:23): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  |  Branch (199:26): [True: 0, False: 0]
  ------------------
  200|      0|    CURL_TRC_M(admin, "[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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  201|      0|               " still in use by %u transfers", conn->connection_id,
  202|      0|               conn->attached_xfers);
  203|      0|    return;
  204|      0|  }
  205|       |
  206|       |  /* treat the connection as aborted in CONNECT_ONLY situations, we do
  207|       |   * not know what the APP did with it. */
  208|  3.62k|  if(conn->bits.connect_only)
  ------------------
  |  Branch (208:6): [True: 18, False: 3.61k]
  ------------------
  209|     18|    aborted = TRUE;
  ------------------
  |  | 1045|     18|#define TRUE true
  ------------------
  210|  3.62k|  conn->bits.aborted = aborted;
  211|       |
  212|       |  /* We do not shutdown dead connections. The term 'dead' can be misleading
  213|       |   * here, as we also mark errored connections/transfers as 'dead'.
  214|       |   * If we do a shutdown for an aborted transfer, the server might think
  215|       |   * it was successful otherwise (for example an ftps: upload). This is
  216|       |   * not what we want. */
  217|  3.62k|  if(aborted)
  ------------------
  |  Branch (217:6): [True: 602, False: 3.02k]
  ------------------
  218|    602|    done = TRUE;
  ------------------
  |  | 1045|    602|#define TRUE true
  ------------------
  219|  3.62k|  if(!done) {
  ------------------
  |  Branch (219:6): [True: 3.02k, False: 602]
  ------------------
  220|       |    /* Attempt to shutdown the connection right away. */
  221|  3.02k|    Curl_conn_shutdown_once(admin, conn, &done);
  222|  3.02k|  }
  223|       |
  224|  3.62k|  cshutdn = Curl_cshutdn_get(data);
  225|  3.62k|  if(done || !cshutdn)
  ------------------
  |  Branch (225:6): [True: 3.61k, False: 15]
  |  Branch (225:14): [True: 0, False: 15]
  ------------------
  226|  3.61k|    Curl_conn_terminate(admin, conn, FALSE);
  ------------------
  |  | 1048|  3.61k|#define FALSE false
  ------------------
  227|     15|  else
  228|     15|    Curl_cshutdn_add(cshutdn, conn, cpool->num_conn);
  229|  3.62k|}
conncache.c:cpool_get_instance:
  257|  29.0k|{
  258|       |  /* admin handles do not necessarily find the correct pool */
  259|  29.0k|  DEBUGASSERT(data->mid);
  ------------------
  |  | 1075|  29.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (259:3): [True: 0, False: 29.0k]
  |  Branch (259:3): [True: 29.0k, False: 0]
  ------------------
  260|  29.0k|  if(CURL_SHARE_KEEP_CONNECT(data->share))
  ------------------
  |  |   41|  29.0k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  ------------------
  |  |  |  Branch (41:4): [True: 0, False: 29.0k]
  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  261|      0|    return &data->share->cpool;
  262|  29.0k|  else if(data->multi_easy)
  ------------------
  |  Branch (262:11): [True: 0, False: 29.0k]
  ------------------
  263|      0|    return &data->multi_easy->cpool;
  264|  29.0k|  else if(data->multi)
  ------------------
  |  Branch (264:11): [True: 25.4k, False: 3.62k]
  ------------------
  265|  25.4k|    return &data->multi->cpool;
  266|  3.62k|  return NULL;
  267|  29.0k|}
conncache.c:cpool_conn_close:
  379|  3.60k|{
  380|  3.60k|  struct Curl_easy *admin;
  381|  3.60k|  bool do_lock;
  382|       |
  383|  3.60k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1075|  3.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (383:3): [True: 0, False: 3.60k]
  |  Branch (383:3): [True: 3.60k, False: 0]
  ------------------
  384|  3.60k|  DEBUGASSERT(data && !data->conn);
  ------------------
  |  | 1075|  3.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (384:3): [True: 0, False: 3.60k]
  |  Branch (384:3): [True: 0, False: 0]
  |  Branch (384:3): [True: 3.60k, False: 0]
  |  Branch (384:3): [True: 3.60k, False: 0]
  ------------------
  385|  3.60k|  if(!cpool)
  ------------------
  |  Branch (385:6): [True: 0, False: 3.60k]
  ------------------
  386|      0|    return;
  387|       |
  388|       |  /* If this connection is not marked to force-close, leave it open if there
  389|       |   * are other users of it */
  390|  3.60k|  if(CONN_INUSE(conn) && !aborted) {
  ------------------
  |  |  357|  7.21k|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  |  |  ------------------
  |  |  |  Branch (357:23): [True: 0, False: 3.60k]
  |  |  ------------------
  ------------------
  |  Branch (390:26): [True: 0, False: 0]
  ------------------
  391|      0|    DEBUGASSERT(0); /* does this ever happen? */
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (391:5): [Folded, False: 0]
  |  Branch (391:5): [Folded, False: 0]
  ------------------
  392|      0|    DEBUGF(infof(data, "conn terminate when inuse: %u", conn->attached_xfers));
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  393|      0|    return;
  394|      0|  }
  395|       |
  396|       |  /* This method may be called while we are under lock, e.g. from a
  397|       |   * user callback in find. */
  398|  3.60k|  admin = Curl_get_admin(data);
  399|  3.60k|  do_lock = !CPOOL_IS_LOCKED(cpool);
  ------------------
  |  |   39|  3.60k|#define CPOOL_IS_LOCKED(c)    ((c) && (c)->locked)
  |  |  ------------------
  |  |  |  Branch (39:32): [True: 3.60k, False: 0]
  |  |  |  Branch (39:39): [True: 3.58k, False: 18]
  |  |  ------------------
  ------------------
  400|  3.60k|  if(do_lock)
  ------------------
  |  Branch (400:6): [True: 18, False: 3.58k]
  ------------------
  401|     18|    CPOOL_LOCK(cpool, admin);
  ------------------
  |  |   42|     18|  do {                                                                  \
  |  |   43|     18|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 18, False: 0]
  |  |  ------------------
  |  |   44|     18|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|     18|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 18]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|     18|        Curl_share_lock_share((c)->share, (d), CURL_LOCK_DATA_CONNECT,  \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|     18|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1075|     18|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|     18|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1045|     18|#define TRUE true
  |  |  ------------------
  |  |   49|     18|    }                                                                   \
  |  |   50|     18|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 18]
  |  |  ------------------
  ------------------
  |  Branch (401:5): [True: 0, False: 18]
  |  Branch (401:5): [True: 18, False: 0]
  ------------------
  402|       |
  403|  3.60k|  if(conn->bits.in_cpool) {
  ------------------
  |  Branch (403:6): [True: 3.60k, False: 0]
  ------------------
  404|  3.60k|    cpool_remove_conn(cpool, conn);
  405|  3.60k|    DEBUGASSERT(!conn->bits.in_cpool);
  ------------------
  |  | 1075|  3.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (405:5): [True: 0, False: 3.60k]
  |  Branch (405:5): [True: 3.60k, False: 0]
  ------------------
  406|  3.60k|  }
  407|       |
  408|       |  /* treat the connection as aborted in CONNECT_ONLY situations,
  409|       |   * so no graceful shutdown is attempted. */
  410|  3.60k|  if(conn->bits.connect_only)
  ------------------
  |  Branch (410:6): [True: 18, False: 3.58k]
  ------------------
  411|     18|    aborted = TRUE;
  ------------------
  |  | 1045|     18|#define TRUE true
  ------------------
  412|       |
  413|  3.60k|  if(data->multi) {
  ------------------
  |  Branch (413:6): [True: 3.60k, False: 0]
  ------------------
  414|       |    /* Add it to the multi's cpool for shutdown handling */
  415|  3.60k|    infof(data, "%s connection #%" FMT_OFF_T,
  ------------------
  |  |  143|  3.60k|  do {                               \
  |  |  144|  3.60k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  3.60k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 3.60k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.60k]
  |  |  |  |  ------------------
  |  |  |  |  323|  3.60k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  3.60k|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|  3.60k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 3.60k]
  |  |  ------------------
  ------------------
  416|  3.60k|          aborted ? "closing" : "shutting down", conn->connection_id);
  417|  3.60k|    cpool_discard_conn(&data->multi->cpool, data, conn, aborted);
  418|  3.60k|  }
  419|      0|  else {
  420|       |    /* No multi available, terminate */
  421|      0|    infof(data, "closing connection #%" FMT_OFF_T, conn->connection_id);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  422|      0|    Curl_conn_terminate(admin, conn, !aborted);
  423|      0|  }
  424|       |
  425|  3.60k|  if(do_lock)
  ------------------
  |  Branch (425:6): [True: 18, False: 3.58k]
  ------------------
  426|       |    CPOOL_UNLOCK(cpool, admin);
  ------------------
  |  |   53|     18|  do {                                                                  \
  |  |   54|     18|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 18, False: 0]
  |  |  ------------------
  |  |   55|     18|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1075|     18|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|     18|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1048|     18|#define FALSE false
  |  |  ------------------
  |  |   57|     18|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|     18|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 18]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|     18|        Curl_share_unlock_share((c)->share, (d), CURL_LOCK_DATA_CONNECT); \
  |  |   59|     18|    }                                                                   \
  |  |   60|     18|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 18]
  |  |  ------------------
  ------------------
  |  Branch (426:5): [True: 0, False: 18]
  |  Branch (426:5): [True: 18, False: 0]
  ------------------
  427|  3.60k|}
conncache.c:cpool_find_bundle:
  145|  7.25k|{
  146|  7.25k|  return Curl_hash_pick(&cpool->dest2bundle,
  147|  7.25k|                        conn->destination, strlen(conn->destination) + 1);
  148|  7.25k|}
conncache.c:cpool_add_bundle:
  298|  3.62k|{
  299|  3.62k|  struct cpool_bundle *bundle;
  300|       |
  301|  3.62k|  bundle = cpool_bundle_create(conn->destination);
  302|  3.62k|  if(!bundle)
  ------------------
  |  Branch (302:6): [True: 0, False: 3.62k]
  ------------------
  303|      0|    return NULL;
  304|       |
  305|  3.62k|  if(!Curl_hash_add(&cpool->dest2bundle,
  ------------------
  |  Branch (305:6): [True: 0, False: 3.62k]
  ------------------
  306|  3.62k|                    bundle->dest, bundle->dest_len, bundle)) {
  307|      0|    cpool_bundle_destroy(bundle);
  308|      0|    return NULL;
  309|      0|  }
  310|  3.62k|  return bundle;
  311|  3.62k|}
conncache.c:cpool_bundle_create:
   70|  3.62k|{
   71|  3.62k|  struct cpool_bundle *bundle;
   72|  3.62k|  size_t dest_len = strlen(dest) + 1;
   73|       |
   74|  3.62k|  bundle = curlx_calloc(1, sizeof(*bundle) + dest_len - 1);
  ------------------
  |  | 1473|  3.62k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   75|  3.62k|  if(!bundle)
  ------------------
  |  Branch (75:6): [True: 0, False: 3.62k]
  ------------------
   76|      0|    return NULL;
   77|  3.62k|  Curl_llist_init(&bundle->conns, NULL);
   78|  3.62k|  bundle->dest_len = dest_len;
   79|  3.62k|  memcpy(bundle->dest, dest, bundle->dest_len);
   80|  3.62k|  return bundle;
   81|  3.62k|}
conncache.c:cpool_bundle_add:
   92|  3.62k|{
   93|  3.62k|  DEBUGASSERT(!Curl_node_llist(&conn->cpool_node));
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (93:3): [True: 0, False: 3.62k]
  |  Branch (93:3): [True: 3.62k, False: 0]
  ------------------
   94|  3.62k|  Curl_llist_append(&bundle->conns, conn, &conn->cpool_node);
   95|       |  conn->bits.in_cpool = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
   96|  3.62k|}
conncache.c:cpool_foreach:
  605|  3.59k|{
  606|  3.59k|  struct Curl_hash_iterator iter;
  607|  3.59k|  struct Curl_hash_element *he;
  608|       |
  609|  3.59k|  if(!cpool)
  ------------------
  |  Branch (609:6): [True: 0, False: 3.59k]
  ------------------
  610|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  611|       |
  612|  3.59k|  Curl_hash_start_iterate(&cpool->dest2bundle, &iter);
  613|       |
  614|  3.59k|  he = Curl_hash_next_element(&iter);
  615|  3.59k|  while(he) {
  ------------------
  |  Branch (615:9): [True: 18, False: 3.57k]
  ------------------
  616|     18|    struct Curl_llist_node *curr;
  617|     18|    struct cpool_bundle *bundle = he->ptr;
  618|     18|    he = Curl_hash_next_element(&iter);
  619|       |
  620|     18|    curr = Curl_llist_head(&bundle->conns);
  621|     18|    while(curr) {
  ------------------
  |  Branch (621:11): [True: 18, False: 0]
  ------------------
  622|       |      /* Yes, we need to update curr before calling func(), because func()
  623|       |         might decide to remove the connection */
  624|     18|      struct connectdata *conn = Curl_node_elem(curr);
  625|     18|      curr = Curl_node_next(curr);
  626|       |
  627|     18|      if(func(cpool, data, conn, param) == 1) {
  ------------------
  |  Branch (627:10): [True: 18, False: 0]
  ------------------
  628|     18|        return TRUE;
  ------------------
  |  | 1045|     18|#define TRUE true
  ------------------
  629|     18|      }
  630|     18|    }
  631|     18|  }
  632|  3.57k|  return FALSE;
  ------------------
  |  | 1048|  3.57k|#define FALSE false
  ------------------
  633|  3.59k|}
conncache.c:cpool_find_conn:
  836|     18|{
  837|     18|  struct cpool_find_ctx *fctx = param;
  838|     18|  (void)cpool;
  839|     18|  (void)data;
  840|     18|  if(conn->connection_id == fctx->id) {
  ------------------
  |  Branch (840:6): [True: 18, False: 0]
  ------------------
  841|     18|    fctx->conn = conn;
  842|     18|    return 1;
  843|     18|  }
  844|      0|  return 0;
  845|     18|}

timeleft_now_ms:
   74|  46.6k|{
   75|  46.6k|  timediff_t timeleft_ms = 0;
   76|  46.6k|  timediff_t ctimeleft_ms = 0;
   77|       |
   78|  46.6k|  if(data->conn && Curl_shutdown_started(data->conn, FIRSTSOCKET))
  ------------------
  |  |  234|  42.8k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (78:6): [True: 42.8k, False: 3.70k]
  |  Branch (78:20): [True: 0, False: 42.8k]
  ------------------
   79|      0|    return Curl_shutdown_timeleft(data, data->conn, FIRSTSOCKET);
  ------------------
  |  |  234|      0|#define FIRSTSOCKET     0
  ------------------
   80|  46.6k|  else if(Curl_is_connecting(data)) {
  ------------------
  |  Branch (80:11): [True: 25.4k, False: 21.1k]
  ------------------
   81|  25.4k|    timediff_t ctimeout_ms = (data->set.connecttimeout > 0) ?
  ------------------
  |  Branch (81:30): [True: 25.4k, False: 0]
  ------------------
   82|  25.4k|      data->set.connecttimeout : DEFAULT_CONNECT_TIMEOUT;
  ------------------
  |  |   42|      0|#define DEFAULT_CONNECT_TIMEOUT 300000 /* milliseconds == five minutes */
  ------------------
   83|  25.4k|    ctimeleft_ms = ctimeout_ms -
   84|  25.4k|      Curl_pgrs_since_ms(data, pnow, TIMER_STARTSINGLE);
   85|  25.4k|    if(!ctimeleft_ms)
  ------------------
  |  Branch (85:8): [True: 0, False: 25.4k]
  ------------------
   86|      0|      ctimeleft_ms = -1; /* 0 is "no limit", fake 1 ms expiry */
   87|  25.4k|  }
   88|  21.1k|  else if(!data->set.timeout || data->set.connect_only) {
  ------------------
  |  Branch (88:11): [True: 0, False: 21.1k]
  |  Branch (88:33): [True: 36, False: 21.0k]
  ------------------
   89|     36|    return 0; /* no timeout in place or checked, return "no limit" */
   90|     36|  }
   91|       |
   92|  46.5k|  if(data->set.timeout) {
  ------------------
  |  Branch (92:6): [True: 46.5k, False: 0]
  ------------------
   93|  46.5k|    timeleft_ms = data->set.timeout -
   94|  46.5k|                  Curl_pgrs_since_ms(data, pnow, TIMER_STARTOP);
   95|  46.5k|    if(!timeleft_ms)
  ------------------
  |  Branch (95:8): [True: 0, False: 46.5k]
  ------------------
   96|      0|      timeleft_ms = -1; /* 0 is "no limit", fake 1 ms expiry */
   97|  46.5k|  }
   98|       |
   99|  46.5k|  if(!ctimeleft_ms)
  ------------------
  |  Branch (99:6): [True: 21.0k, False: 25.4k]
  ------------------
  100|  21.0k|    return timeleft_ms;
  101|  25.4k|  else if(!timeleft_ms)
  ------------------
  |  Branch (101:11): [True: 0, False: 25.4k]
  ------------------
  102|      0|    return ctimeleft_ms;
  103|  25.4k|  return CURLMIN(ctimeleft_ms, timeleft_ms);
  ------------------
  |  | 1288|  25.4k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1288:24): [True: 0, False: 25.4k]
  |  |  ------------------
  ------------------
  104|  46.5k|}
Curl_timeleft_ms:
  107|  10.8k|{
  108|  10.8k|  return timeleft_now_ms(data, Curl_pgrs_now(data));
  109|  10.8k|}
Curl_timeleft_now_ms:
  113|  35.7k|{
  114|  35.7k|  return timeleft_now_ms(data, pnow);
  115|  35.7k|}
Curl_shutdown_start:
  119|  3.02k|{
  120|  3.02k|  struct connectdata *conn = data->conn;
  121|       |
  122|  3.02k|  DEBUGASSERT(conn);
  ------------------
  |  | 1075|  3.02k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (122:3): [True: 0, False: 3.02k]
  |  Branch (122:3): [True: 3.02k, False: 0]
  ------------------
  123|  3.02k|  conn->shutdown.start[sockindex] = *Curl_pgrs_now(data);
  124|  3.02k|  conn->shutdown.timeout_ms = (timeout_ms > 0) ?
  ------------------
  |  Branch (124:31): [True: 0, False: 3.02k]
  ------------------
  125|      0|    (timediff_t)timeout_ms :
  126|  3.02k|    ((data->set.shutdowntimeout > 0) ?
  ------------------
  |  Branch (126:6): [True: 0, False: 3.02k]
  ------------------
  127|  3.02k|     data->set.shutdowntimeout : DEFAULT_SHUTDOWN_TIMEOUT_MS);
  ------------------
  |  |   44|  3.02k|#define DEFAULT_SHUTDOWN_TIMEOUT_MS   (2 * 1000)
  ------------------
  128|       |  /* Set a timer, unless we operate on the admin handle */
  129|  3.02k|  if(data->mid)
  ------------------
  |  Branch (129:6): [True: 0, False: 3.02k]
  ------------------
  130|      0|    Curl_expire(data, conn->shutdown.timeout_ms, EXPIRE_SHUTDOWN);
  131|  3.02k|  CURL_TRC_M(data, "shutdown start on%s connection",
  ------------------
  |  |  148|  3.02k|  do {                                   \
  |  |  149|  3.02k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  3.02k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.02k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  6.05k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.02k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.02k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  6.05k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.02k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  3.02k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|  3.02k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 3.02k]
  |  |  ------------------
  ------------------
  132|  3.02k|             sockindex ? " secondary" : "");
  133|  3.02k|}
Curl_shutdown_timeleft:
  138|  3.05k|{
  139|  3.05k|  timediff_t left_ms;
  140|       |
  141|  3.05k|  if(!conn->shutdown.start[sockindex].tv_sec ||
  ------------------
  |  Branch (141:6): [True: 0, False: 3.05k]
  ------------------
  142|  3.05k|     (conn->shutdown.timeout_ms <= 0))
  ------------------
  |  Branch (142:6): [True: 0, False: 3.05k]
  ------------------
  143|      0|    return 0; /* not started or no limits */
  144|       |
  145|  3.05k|  left_ms = conn->shutdown.timeout_ms -
  146|  3.05k|            curlx_ptimediff_ms(Curl_pgrs_now(data),
  147|  3.05k|                               &conn->shutdown.start[sockindex]);
  148|  3.05k|  return left_ms ? left_ms : -1;
  ------------------
  |  Branch (148:10): [True: 3.05k, False: 0]
  ------------------
  149|  3.05k|}
Curl_conn_shutdown_timeleft:
  153|     15|{
  154|     15|  timediff_t left_ms = 0, ms;
  155|     15|  int8_t i;
  156|       |
  157|     45|  for(i = 0; conn->shutdown.timeout_ms && (i < 2); ++i) {
  ------------------
  |  Branch (157:14): [True: 45, False: 0]
  |  Branch (157:43): [True: 30, False: 15]
  ------------------
  158|     30|    if(!conn->shutdown.start[i].tv_sec)
  ------------------
  |  Branch (158:8): [True: 15, False: 15]
  ------------------
  159|     15|      continue;
  160|     15|    ms = Curl_shutdown_timeleft(data, conn, i);
  161|     15|    if(ms && (!left_ms || ms < left_ms))
  ------------------
  |  Branch (161:8): [True: 15, False: 0]
  |  Branch (161:15): [True: 15, False: 0]
  |  Branch (161:27): [True: 0, False: 0]
  ------------------
  162|     15|      left_ms = ms;
  163|     15|  }
  164|     15|  return left_ms;
  165|     15|}
Curl_shutdown_started:
  174|  56.2k|{
  175|  56.2k|  const struct curltime *pt = &conn->shutdown.start[sockindex];
  176|  56.2k|  return (pt->tv_sec > 0) || (pt->tv_usec > 0);
  ------------------
  |  Branch (176:10): [True: 3.05k, False: 53.1k]
  |  Branch (176:30): [True: 0, False: 53.1k]
  ------------------
  177|  56.2k|}
Curl_getconnectinfo:
  187|  3.75k|{
  188|  3.75k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  3.75k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (188:3): [True: 0, False: 3.75k]
  |  Branch (188:3): [True: 3.75k, False: 0]
  ------------------
  189|       |
  190|       |  /* this works for an easy handle:
  191|       |   * - that has been used for curl_easy_perform()
  192|       |   * - that is associated with a multi handle, and whose connection
  193|       |   *   was detached with CURLOPT_CONNECT_ONLY
  194|       |   */
  195|  3.75k|  if(data->state.lastconnect_id != -1) {
  ------------------
  |  Branch (195:6): [True: 3.64k, False: 107]
  ------------------
  196|  3.64k|    struct connectdata *conn;
  197|       |
  198|  3.64k|    conn = Curl_cpool_get_conn(data, data->state.lastconnect_id);
  199|  3.64k|    if(!conn) {
  ------------------
  |  Branch (199:8): [True: 3.62k, False: 18]
  ------------------
  200|  3.62k|      data->state.lastconnect_id = -1;
  201|  3.62k|      if(connp)
  ------------------
  |  Branch (201:10): [True: 0, False: 3.62k]
  ------------------
  202|      0|        *connp = NULL;
  203|  3.62k|      return CURL_SOCKET_BAD;
  ------------------
  |  |  147|  3.62k|#define CURL_SOCKET_BAD (-1)
  ------------------
  204|  3.62k|    }
  205|       |
  206|     18|    if(connp)
  ------------------
  |  Branch (206:8): [True: 18, False: 0]
  ------------------
  207|     18|      *connp = conn;
  208|     18|    return conn->sock[FIRSTSOCKET];
  ------------------
  |  |  234|     18|#define FIRSTSOCKET     0
  ------------------
  209|  3.64k|  }
  210|    107|  if(connp)
  ------------------
  |  Branch (210:6): [True: 2, False: 105]
  ------------------
  211|      2|    *connp = NULL;
  212|    107|  return CURL_SOCKET_BAD;
  ------------------
  |  |  147|    107|#define CURL_SOCKET_BAD (-1)
  ------------------
  213|  3.75k|}
Curl_conncontrol:
  216|  7.74k|{
  217|  7.74k|  if(!conn) {
  ------------------
  |  Branch (217:6): [True: 0, False: 7.74k]
  ------------------
  218|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (218:5): [Folded, False: 0]
  |  Branch (218:5): [Folded, False: 0]
  ------------------
  219|      0|    return;
  220|      0|  }
  221|  7.74k|  switch(ctrl) {
  222|      0|    case CONNCTRL_CONN_KEEP:
  ------------------
  |  |   83|      0|#define CONNCTRL_CONN_KEEP       0
  ------------------
  |  Branch (222:5): [True: 0, False: 7.74k]
  ------------------
  223|      0|      conn->bits.close = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  224|      0|      break;
  225|  3.62k|    case CONNCTRL_CONN_CLOSE:
  ------------------
  |  |   84|  3.62k|#define CONNCTRL_CONN_CLOSE      1
  ------------------
  |  Branch (225:5): [True: 3.62k, False: 4.12k]
  ------------------
  226|  3.62k|      conn->bits.close = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  227|  3.62k|      break;
  228|  4.12k|    case CONNCTRL_STREAM_CLOSE:
  ------------------
  |  |   85|  4.12k|#define CONNCTRL_STREAM_CLOSE    2
  ------------------
  |  Branch (228:5): [True: 4.12k, False: 3.62k]
  ------------------
  229|       |      /* stream close when multiplexing does not affect connection */
  230|  4.12k|      if(!Curl_conn_is_multiplex(conn, FIRSTSOCKET))
  ------------------
  |  |  234|  4.12k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (230:10): [True: 4.12k, False: 2]
  ------------------
  231|  4.12k|        conn->bits.close = TRUE;
  ------------------
  |  | 1045|  4.12k|#define TRUE true
  ------------------
  232|  4.12k|      break;
  233|      0|    default:
  ------------------
  |  Branch (233:5): [True: 0, False: 7.74k]
  ------------------
  234|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (234:7): [Folded, False: 0]
  |  Branch (234:7): [Folded, False: 0]
  ------------------
  235|      0|      break;
  236|  7.74k|  }
  237|  7.74k|}
Curl_conn_setup:
  243|  3.62k|{
  244|  3.62k|  struct Curl_peer *first_peer = Curl_conn_get_first_peer(conn, sockindex);
  245|  3.62k|  CURLcode result = CURLE_OK;
  246|  3.62k|  uint8_t dns_queries;
  247|       |
  248|  3.62k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (248:3): [True: 0, False: 3.62k]
  |  Branch (248:3): [True: 3.62k, False: 0]
  ------------------
  249|  3.62k|  DEBUGASSERT(conn->scheme);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (249:3): [True: 0, False: 3.62k]
  |  Branch (249:3): [True: 3.62k, False: 0]
  ------------------
  250|  3.62k|  DEBUGASSERT(!conn->cfilter[sockindex]);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (250:3): [True: 0, False: 3.62k]
  |  Branch (250:3): [True: 3.62k, False: 0]
  ------------------
  251|       |
  252|  3.62k|  if(!first_peer)
  ------------------
  |  Branch (252:6): [True: 0, False: 3.62k]
  ------------------
  253|      0|    return CURLE_FAILED_INIT;
  254|       |
  255|  3.62k|#ifndef CURL_DISABLE_HTTP
  256|  3.62k|  if(!conn->cfilter[sockindex] &&
  ------------------
  |  Branch (256:6): [True: 3.62k, False: 0]
  ------------------
  257|  3.62k|     conn->scheme->protocol == CURLPROTO_HTTPS) {
  ------------------
  |  | 1089|  3.62k|#define CURLPROTO_HTTPS   (1L << 1)
  ------------------
  |  Branch (257:6): [True: 3.62k, False: 0]
  ------------------
  258|  3.62k|    DEBUGASSERT(ssl_mode != CURL_CF_SSL_DISABLE);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (258:5): [True: 0, False: 3.62k]
  |  Branch (258:5): [True: 3.62k, False: 0]
  ------------------
  259|  3.62k|    result = Curl_cf_https_setup(
  260|  3.62k|      data, Curl_conn_get_destination(conn, sockindex), conn, sockindex);
  261|  3.62k|    if(result)
  ------------------
  |  Branch (261:8): [True: 0, False: 3.62k]
  ------------------
  262|      0|      goto out;
  263|  3.62k|  }
  264|  3.62k|#endif /* !CURL_DISABLE_HTTP */
  265|       |
  266|       |  /* Still no cfilter set, apply default. */
  267|  3.62k|  if(!conn->cfilter[sockindex]) {
  ------------------
  |  Branch (267:6): [True: 0, False: 3.62k]
  ------------------
  268|      0|    result = Curl_cf_setup_add(data, conn, sockindex,
  269|      0|                               conn->transport_wanted, ssl_mode);
  270|      0|    if(result)
  ------------------
  |  Branch (270:8): [True: 0, False: 0]
  ------------------
  271|      0|      goto out;
  272|      0|  }
  273|       |
  274|       |  /* Whatever the filter chain will be in the end, it will need the
  275|       |   * resolving of `first_peer`. Add that now so the resolve is started
  276|       |   * right away. */
  277|  3.62k|  dns_queries = Curl_resolv_dns_queries(data, conn->ip_version);
  278|  3.62k|  result = Curl_conn_dns_add_addr_resolve(data, conn, sockindex,
  279|  3.62k|                                          first_peer, dns_queries,
  280|  3.62k|                                          conn->transport_wanted);
  281|  3.62k|  if(result)
  ------------------
  |  Branch (281:6): [True: 0, False: 3.62k]
  ------------------
  282|      0|    goto out;
  283|       |
  284|  3.62k|  DEBUGASSERT(conn->cfilter[sockindex]);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (284:3): [True: 0, False: 3.62k]
  |  Branch (284:3): [True: 3.62k, False: 0]
  ------------------
  285|  3.62k|out:
  286|  3.62k|  return result;
  287|  3.62k|}
Curl_conn_connect:
  327|  7.25k|{
  328|  7.25k|#define CF_CONN_NUM_POLLS_ON_STACK 5
  329|  7.25k|  struct pollfd a_few_on_stack[CF_CONN_NUM_POLLS_ON_STACK];
  330|  7.25k|  struct easy_pollset ps;
  331|  7.25k|  struct curl_pollfds cpfds;
  332|  7.25k|  struct Curl_cfilter *cf;
  333|  7.25k|  CURLcode result = CURLE_OK;
  334|       |
  335|  7.25k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  7.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (335:3): [True: 0, False: 7.25k]
  |  Branch (335:3): [True: 7.25k, False: 0]
  ------------------
  336|  7.25k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1075|  7.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (336:3): [True: 0, False: 7.25k]
  |  Branch (336:3): [True: 7.25k, False: 0]
  ------------------
  337|  7.25k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  311|  7.25k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (311:36): [True: 7.25k, False: 0]
  |  |  |  Branch (311:50): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
  338|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  339|       |
  340|  7.25k|  if(data->conn->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  214|  7.25k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (340:6): [True: 0, False: 7.25k]
  ------------------
  341|      0|    *done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  342|      0|    return CURLE_OK;
  343|      0|  }
  344|       |
  345|  7.25k|  cf = data->conn->cfilter[sockindex];
  346|  7.25k|  if(!cf) {
  ------------------
  |  Branch (346:6): [True: 0, False: 7.25k]
  ------------------
  347|      0|    *done = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  348|      0|    return CURLE_FAILED_INIT;
  349|      0|  }
  350|       |
  351|  7.25k|  *done = (bool)cf->connected;
  352|  7.25k|  if(*done)
  ------------------
  |  Branch (352:6): [True: 0, False: 7.25k]
  ------------------
  353|      0|    return CURLE_OK;
  354|       |
  355|  7.25k|  Curl_pollset_init(&ps);
  356|  7.25k|  Curl_pollfds_init(&cpfds, a_few_on_stack, CF_CONN_NUM_POLLS_ON_STACK);
  ------------------
  |  |  328|  7.25k|#define CF_CONN_NUM_POLLS_ON_STACK 5
  ------------------
  357|  7.25k|  while(!*done) {
  ------------------
  |  Branch (357:9): [True: 7.25k, False: 0]
  ------------------
  358|  7.25k|    if(Curl_conn_needs_flush(data, sockindex)) {
  ------------------
  |  Branch (358:8): [True: 0, False: 7.25k]
  ------------------
  359|      0|      DEBUGF(infof(data, "Curl_conn_connect(index=%d), flush", sockindex));
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  360|      0|      result = Curl_conn_flush(data, sockindex);
  361|      0|      if(result && (result != CURLE_AGAIN))
  ------------------
  |  Branch (361:10): [True: 0, False: 0]
  |  Branch (361:20): [True: 0, False: 0]
  ------------------
  362|      0|        goto out;
  363|      0|    }
  364|       |
  365|  7.25k|    result = cf->cft->do_connect(cf, data, done);
  366|  7.25k|    CURL_TRC_CF(data, cf, "Curl_conn_connect(block=%d) -> %d, done=%d",
  ------------------
  |  |  153|  7.25k|  do {                                          \
  |  |  154|  7.25k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  7.25k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  14.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 7.25k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 7.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  14.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  7.25k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  7.25k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  367|  7.25k|                blocking, (int)result, *done);
  368|  7.25k|    if(!result && *done) {
  ------------------
  |  Branch (368:8): [True: 7.25k, False: 0]
  |  Branch (368:19): [True: 3.62k, False: 3.62k]
  ------------------
  369|       |      /* A final sanity check on connection security */
  370|  3.62k|      if((data->state.origin->scheme->flags & PROTOPT_SSL) &&
  ------------------
  |  |  207|  3.62k|#define PROTOPT_SSL (1 << 0)       /* uses SSL */
  ------------------
  |  Branch (370:10): [True: 3.62k, False: 0]
  ------------------
  371|  3.62k|         (sockindex == FIRSTSOCKET) &&
  ------------------
  |  |  234|  3.62k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (371:10): [True: 3.62k, False: 0]
  ------------------
  372|  3.62k|         !Curl_conn_is_ssl(data->conn, FIRSTSOCKET)) {
  ------------------
  |  |  234|  3.62k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (372:10): [True: 0, False: 3.62k]
  ------------------
  373|      0|        DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (373:9): [Folded, False: 0]
  |  Branch (373:9): [Folded, False: 0]
  ------------------
  374|      0|        failf(data, "transfer requires SSL, but not connected via SSL");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  375|      0|        result = CURLE_FAILED_INIT;
  376|      0|        goto out;
  377|      0|      }
  378|       |      /* Now that the complete filter chain is connected, let all filters
  379|       |       * persist information at the connection. E.g. cf-socket sets the
  380|       |       * socket and ip related information. */
  381|  3.62k|      Curl_conn_cntrl_update_info(data, data->conn);
  382|  3.62k|      conn_report_stats(data, sockindex);
  383|  3.62k|      data->conn->lastupkeep = *Curl_pgrs_now(data);
  384|  3.62k|      VERBOSE(result = conn_connect_trace(data, cf));
  ------------------
  |  | 1611|  3.62k|#define VERBOSE(x) x
  ------------------
  385|  3.62k|      VERBOSE(Curl_conn_trc_filters(data, sockindex, "connected"));
  ------------------
  |  | 1611|  3.62k|#define VERBOSE(x) x
  ------------------
  386|  3.62k|      Curl_conn_remove_setup_filters(data, sockindex);
  387|  3.62k|      VERBOSE(Curl_conn_trc_filters(data, sockindex, "reduced to"));
  ------------------
  |  | 1611|  3.62k|#define VERBOSE(x) x
  ------------------
  388|  3.62k|      goto out;
  389|  3.62k|    }
  390|  3.62k|    else if(result) {
  ------------------
  |  Branch (390:13): [True: 0, False: 3.62k]
  ------------------
  391|      0|      CURL_TRC_CF(data, cf, "Curl_conn_connect(), filter returned %d",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  392|      0|                  (int)result);
  393|      0|      VERBOSE(Curl_conn_trc_filters(data, sockindex, "failed to connect"));
  ------------------
  |  | 1611|      0|#define VERBOSE(x) x
  ------------------
  394|      0|      conn_report_stats(data, sockindex);
  395|      0|      goto out;
  396|      0|    }
  397|       |
  398|  3.62k|    if(!blocking)
  ------------------
  |  Branch (398:8): [True: 3.62k, False: 0]
  ------------------
  399|  3.62k|      goto out;
  400|      0|    else {
  401|       |      /* check allowed time left */
  402|      0|      const timediff_t timeout_ms = Curl_timeleft_ms(data);
  403|      0|      curl_socket_t sockfd = Curl_conn_cf_get_socket(cf, data);
  404|      0|      int rc;
  405|       |
  406|      0|      if(timeout_ms < 0) {
  ------------------
  |  Branch (406:10): [True: 0, False: 0]
  ------------------
  407|       |        /* no need to continue if time already is up */
  408|      0|        failf(data, "connect timeout");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  409|      0|        result = CURLE_OPERATION_TIMEDOUT;
  410|      0|        goto out;
  411|      0|      }
  412|       |
  413|      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))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  414|      0|      Curl_pollset_reset(&ps);
  415|      0|      Curl_pollfds_reset(&cpfds);
  416|       |      /* In general, we want to send after connect, wait on that. */
  417|      0|      if(sockfd != CURL_SOCKET_BAD)
  ------------------
  |  |  147|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (417:10): [True: 0, False: 0]
  ------------------
  418|      0|        result = Curl_pollset_set_out_only(data, &ps, sockfd);
  ------------------
  |  |  172|      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
  |  |  ------------------
  ------------------
  419|      0|      if(!result)
  ------------------
  |  Branch (419:10): [True: 0, False: 0]
  ------------------
  420|      0|        result = Curl_conn_adjust_pollset(data, data->conn, &ps);
  421|      0|      if(result)
  ------------------
  |  Branch (421:10): [True: 0, False: 0]
  ------------------
  422|      0|        goto out;
  423|      0|      result = Curl_pollfds_add_ps(&cpfds, &ps);
  424|      0|      if(result)
  ------------------
  |  Branch (424:10): [True: 0, False: 0]
  ------------------
  425|      0|        goto out;
  426|       |
  427|      0|      rc = Curl_poll(cpfds.pfds, cpfds.n,
  428|      0|                     CURLMIN(timeout_ms, (cpfds.n ? 1000 : 10)));
  ------------------
  |  | 1288|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1288:24): [True: 0, False: 0]
  |  |  |  Branch (1288:31): [True: 0, False: 0]
  |  |  |  Branch (1288:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  429|      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))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  430|      0|                  rc);
  431|      0|      if(rc < 0) {
  ------------------
  |  Branch (431:10): [True: 0, False: 0]
  ------------------
  432|      0|        result = CURLE_COULDNT_CONNECT;
  433|      0|        goto out;
  434|      0|      }
  435|       |      /* continue iterating */
  436|      0|    }
  437|  3.62k|  }
  438|       |
  439|  7.25k|out:
  440|  7.25k|  Curl_pollset_cleanup(&ps);
  441|  7.25k|  Curl_pollfds_cleanup(&cpfds);
  442|  7.25k|  return result;
  443|  7.25k|}
Curl_conn_set_multiplex:
  446|      2|{
  447|      2|  if(!conn->bits.multiplex) {
  ------------------
  |  Branch (447:6): [True: 2, False: 0]
  ------------------
  448|      2|    conn->bits.multiplex = TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
  449|      2|    if(conn->attached_multi) {
  ------------------
  |  Branch (449:8): [True: 2, False: 0]
  ------------------
  450|      2|      Curl_multi_connchanged(conn->attached_multi);
  451|      2|    }
  452|      2|  }
  453|      2|}
Curl_conn_get_origin:
  457|  3.62k|{
  458|  3.62k|  return (sockindex == SECONDARYSOCKET) ?
  ------------------
  |  |  235|  3.62k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (458:10): [True: 0, False: 3.62k]
  ------------------
  459|  3.62k|    conn->origin2 : conn->origin;
  460|  3.62k|}
Curl_conn_get_destination:
  464|  10.8k|{
  465|  10.8k|  return (sockindex == SECONDARYSOCKET) ?
  ------------------
  |  |  235|  10.8k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (465:10): [True: 0, False: 10.8k]
  ------------------
  466|      0|    (conn->via_peer2 ? conn->via_peer2 : conn->origin2) :
  ------------------
  |  Branch (466:6): [True: 0, False: 0]
  ------------------
  467|  10.8k|    (conn->via_peer ? conn->via_peer : conn->origin);
  ------------------
  |  Branch (467:6): [True: 10.8k, False: 0]
  ------------------
  468|  10.8k|}
Curl_conn_get_first_peer:
  472|  14.5k|{
  473|  14.5k|#ifndef CURL_DISABLE_PROXY
  474|  14.5k|  if(conn->socks_proxy.peer)
  ------------------
  |  Branch (474:6): [True: 0, False: 14.5k]
  ------------------
  475|      0|    return conn->socks_proxy.peer;
  476|  14.5k|  if(conn->http_proxy.peer)
  ------------------
  |  Branch (476:6): [True: 0, False: 14.5k]
  ------------------
  477|      0|    return conn->http_proxy.peer;
  478|  14.5k|#endif
  479|  14.5k|  return (sockindex == SECONDARYSOCKET) ?
  ------------------
  |  |  235|  14.5k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (479:10): [True: 0, False: 14.5k]
  ------------------
  480|      0|    (conn->via_peer2 ? conn->via_peer2 : conn->origin2) :
  ------------------
  |  Branch (480:6): [True: 0, False: 0]
  ------------------
  481|  14.5k|    (conn->via_peer ? conn->via_peer : conn->origin);
  ------------------
  |  Branch (481:6): [True: 14.5k, False: 0]
  ------------------
  482|  14.5k|}
connect.c:conn_report_stats:
  316|  3.62k|{
  317|       |  /* We do gather stats for the second socket...yet */
  318|  3.62k|  if(sockindex == FIRSTSOCKET) {
  ------------------
  |  |  234|  3.62k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (318:6): [True: 3.62k, False: 0]
  ------------------
  319|  3.62k|    Curl_conn_cntrl_report_stats(data, data->conn, sockindex);
  320|  3.62k|  }
  321|  3.62k|}
connect.c:conn_connect_trace:
  292|  3.62k|{
  293|  3.62k|  if(Curl_trc_is_verbose(data)) {
  ------------------
  |  |  322|  3.62k|  ((data) && (data)->set.verbose &&                        \
  |  |  ------------------
  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  ------------------
  |  |  323|  3.62k|   (!(data)->state.feat ||                                 \
  |  |  ------------------
  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  294|      0|    struct ip_quadruple ipquad;
  295|      0|    bool is_ipv6;
  296|      0|    CURLcode result;
  297|       |
  298|      0|    result = Curl_conn_cf_get_ip_info(cf, data, &is_ipv6, &ipquad);
  299|      0|    if(result)
  ------------------
  |  Branch (299:8): [True: 0, False: 0]
  ------------------
  300|      0|      return result;
  301|       |
  302|      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))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  303|      0|          (cf->sockindex == SECONDARYSOCKET) ? "2nd " : "",
  304|      0|          CURL_CONN_HOST_DISPNAME(data->conn),
  305|      0|          ipquad.remote_ip, ipquad.remote_port,
  306|      0|          ipquad.local_ip, ipquad.local_port);
  307|      0|  }
  308|  3.62k|  return CURLE_OK;
  309|  3.62k|}

Curl_get_content_encodings:
  659|    162|{
  660|    162|  struct dynbuf enc;
  661|    162|  const struct Curl_cwtype * const *cep;
  662|    162|  CURLcode result = CURLE_OK;
  663|    162|  curlx_dyn_init(&enc, 255);
  664|       |
  665|    972|  for(cep = general_unencoders; *cep && !result; cep++) {
  ------------------
  |  Branch (665:33): [True: 810, False: 162]
  |  Branch (665:41): [True: 810, False: 0]
  ------------------
  666|    810|    const struct Curl_cwtype *ce = *cep;
  667|    810|    if(!curl_strequal(ce->name, CONTENT_ENCODING_DEFAULT)) {
  ------------------
  |  |   54|    810|#define CONTENT_ENCODING_DEFAULT  "identity"
  ------------------
  |  Branch (667:8): [True: 648, False: 162]
  ------------------
  668|    648|      if(curlx_dyn_len(&enc))
  ------------------
  |  Branch (668:10): [True: 486, False: 162]
  ------------------
  669|    486|        result = curlx_dyn_addn(&enc, ", ", 2);
  670|    648|      if(!result)
  ------------------
  |  Branch (670:10): [True: 648, False: 0]
  ------------------
  671|    648|        result = curlx_dyn_add(&enc, ce->name);
  672|    648|    }
  673|    810|  }
  674|    162|  if(!result && !curlx_dyn_len(&enc))
  ------------------
  |  Branch (674:6): [True: 162, False: 0]
  |  Branch (674:17): [True: 0, False: 162]
  ------------------
  675|      0|    result = curlx_dyn_add(&enc, CONTENT_ENCODING_DEFAULT);
  ------------------
  |  |   54|      0|#define CONTENT_ENCODING_DEFAULT  "identity"
  ------------------
  676|       |
  677|    162|  if(!result)
  ------------------
  |  Branch (677:6): [True: 162, False: 0]
  ------------------
  678|    162|    return curlx_dyn_ptr(&enc);
  679|      0|  return NULL;
  680|    162|}
Curl_build_unencoding_stack:
  753|      7|{
  754|      7|  Curl_cwriter_phase phase = is_transfer ?
  ------------------
  |  Branch (754:30): [True: 4, False: 3]
  ------------------
  755|      4|    CURL_CW_TRANSFER_DECODE : CURL_CW_CONTENT_DECODE;
  756|      7|  CURLcode result;
  757|      7|  bool has_chunked = FALSE;
  ------------------
  |  | 1048|      7|#define FALSE false
  ------------------
  758|       |
  759|      7|  do {
  760|      7|    const char *name;
  761|      7|    size_t namelen;
  762|      7|    bool is_chunked = FALSE;
  ------------------
  |  | 1048|      7|#define FALSE false
  ------------------
  763|       |
  764|       |    /* Parse a single encoding name. */
  765|     14|    while(ISBLANK(*enclist) || *enclist == ',')
  ------------------
  |  |   43|     28|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 7, False: 7]
  |  |  |  Branch (43:38): [True: 0, False: 7]
  |  |  ------------------
  ------------------
  |  Branch (765:32): [True: 0, False: 7]
  ------------------
  766|      7|      enclist++;
  767|       |
  768|      7|    name = enclist;
  769|       |
  770|     61|    for(namelen = 0; *enclist && *enclist != ','; enclist++)
  ------------------
  |  Branch (770:22): [True: 54, False: 7]
  |  Branch (770:34): [True: 54, False: 0]
  ------------------
  771|     54|      if(*enclist > ' ')
  ------------------
  |  Branch (771:10): [True: 40, False: 14]
  ------------------
  772|     40|        namelen = enclist - name + 1;
  773|       |
  774|      7|    if(namelen) {
  ------------------
  |  Branch (774:8): [True: 7, False: 0]
  ------------------
  775|      7|      const struct Curl_cwtype *cwt;
  776|      7|      struct Curl_cwriter *writer;
  777|       |
  778|      7|      CURL_TRC_WRITE(data, "looking for %s decoder: %.*s",
  ------------------
  |  |  158|      7|  do {                                                     \
  |  |  159|      7|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|      7|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     14|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 7, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     14|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      7|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      7|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  ------------------
  |  |  |  Branch (160:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  161|      7|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 7]
  |  |  ------------------
  ------------------
  779|      7|                     is_transfer ? "transfer" : "content", (int)namelen, name);
  780|      7|      is_chunked = (is_transfer && (namelen == 7) &&
  ------------------
  |  Branch (780:21): [True: 4, False: 3]
  |  Branch (780:36): [True: 4, False: 0]
  ------------------
  781|      4|                    curl_strnequal(name, "chunked", 7));
  ------------------
  |  Branch (781:21): [True: 4, False: 0]
  ------------------
  782|       |      /* if we skip the decoding in this phase, do not look further.
  783|       |       * Exception is "chunked" transfer-encoding which always must happen */
  784|      7|      if((is_transfer && !data->set.http_transfer_encoding && !is_chunked) ||
  ------------------
  |  Branch (784:11): [True: 4, False: 3]
  |  Branch (784:26): [True: 4, False: 0]
  |  Branch (784:63): [True: 0, False: 4]
  ------------------
  785|      7|         (!is_transfer && data->set.http_ce_skip)) {
  ------------------
  |  Branch (785:11): [True: 3, False: 4]
  |  Branch (785:27): [True: 0, False: 3]
  ------------------
  786|      0|        bool is_identity = (namelen == 8) &&
  ------------------
  |  Branch (786:28): [True: 0, False: 0]
  ------------------
  787|      0|                           curl_strnequal(name, "identity", 8);
  ------------------
  |  Branch (787:28): [True: 0, False: 0]
  ------------------
  788|       |        /* not requested, ignore */
  789|      0|        CURL_TRC_WRITE(data, "decoder not requested, ignored: %.*s",
  ------------------
  |  |  158|      0|  do {                                                     \
  |  |  159|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      0|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  790|      0|                       (int)namelen, name);
  791|      0|        if(is_transfer && !data->set.http_te_skip) {
  ------------------
  |  Branch (791:12): [True: 0, False: 0]
  |  Branch (791:27): [True: 0, False: 0]
  ------------------
  792|      0|          if(has_chunked)
  ------------------
  |  Branch (792:14): [True: 0, False: 0]
  ------------------
  793|      0|            failf(data, "A Transfer-Encoding (%.*s) was listed after chunked",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  794|      0|                  (int)namelen, name);
  795|      0|          else if(is_identity)
  ------------------
  |  Branch (795:19): [True: 0, False: 0]
  ------------------
  796|      0|            continue;
  797|      0|          else
  798|      0|            failf(data, "Unsolicited Transfer-Encoding (%.*s) found",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  799|      0|                  (int)namelen, name);
  800|      0|          return CURLE_BAD_CONTENT_ENCODING;
  801|      0|        }
  802|      0|        return CURLE_OK;
  803|      0|      }
  804|       |
  805|      7|      if(Curl_cwriter_count(data, phase) >= MAX_ENCODE_STACK) {
  ------------------
  |  |   59|      7|#define MAX_ENCODE_STACK 5
  ------------------
  |  Branch (805:10): [True: 0, False: 7]
  ------------------
  806|      0|        failf(data, "Reject response exceeding limit of %d %s encodings",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  807|      0|              MAX_ENCODE_STACK,
  ------------------
  |  |   59|      0|#define MAX_ENCODE_STACK 5
  ------------------
  808|      0|              is_transfer ? "transfer" : "content");
  ------------------
  |  Branch (808:15): [True: 0, False: 0]
  ------------------
  809|      0|        return CURLE_BAD_CONTENT_ENCODING;
  810|      0|      }
  811|       |
  812|      7|      cwt = find_unencode_writer(name, namelen, phase);
  813|      7|      if(is_transfer && !is_chunked &&
  ------------------
  |  Branch (813:10): [True: 4, False: 3]
  |  Branch (813:25): [True: 0, False: 4]
  ------------------
  814|      0|         Curl_cwriter_get_by_name(data, "chunked")) {
  ------------------
  |  Branch (814:10): [True: 0, False: 0]
  ------------------
  815|       |        /* RFC 9112, ch. 6.1:
  816|       |         * "If any transfer coding other than chunked is applied to a
  817|       |         *  response's content, the sender MUST either apply chunked as the
  818|       |         *  final transfer coding or terminate the message by closing the
  819|       |         *  connection."
  820|       |         * "chunked" must be the last added to be the first in its phase,
  821|       |         *  reject this.
  822|       |         */
  823|      0|        failf(data, "Reject response due to 'chunked' not being the last "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  824|      0|              "Transfer-Encoding");
  825|      0|        return CURLE_BAD_CONTENT_ENCODING;
  826|      0|      }
  827|      7|      if(cwt && is_chunked && Curl_cwriter_get_by_type(data, cwt)) {
  ------------------
  |  Branch (827:10): [True: 7, False: 0]
  |  Branch (827:17): [True: 4, False: 3]
  |  Branch (827:31): [True: 0, False: 4]
  ------------------
  828|       |        /* A 'chunked' transfer encoding has already been added.
  829|       |         * Ignore duplicates. See #13451.
  830|       |         * Also RFC 9112, ch. 6.1:
  831|       |         * "A sender MUST NOT apply the chunked transfer coding more than
  832|       |         *  once to a message body."
  833|       |         */
  834|      0|        CURL_TRC_WRITE(data, "ignoring duplicate 'chunked' decoder");
  ------------------
  |  |  158|      0|  do {                                                     \
  |  |  159|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      0|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  835|      0|      }
  836|      7|      else {
  837|      7|        if(!cwt)
  ------------------
  |  Branch (837:12): [True: 0, False: 7]
  ------------------
  838|      0|          cwt = &error_writer; /* Defer error at use. */
  839|       |
  840|      7|        result = Curl_cwriter_create(&writer, data, cwt, phase);
  841|      7|        CURL_TRC_WRITE(data, "added %s decoder %s -> %d",
  ------------------
  |  |  158|      7|  do {                                                     \
  |  |  159|      7|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|      7|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     14|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 7, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     14|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      7|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      7|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  ------------------
  |  |  |  Branch (160:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  161|      7|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 7]
  |  |  ------------------
  ------------------
  842|      7|                       is_transfer ? "transfer" : "content", cwt->name,
  843|      7|                       (int)result);
  844|      7|        if(result)
  ------------------
  |  Branch (844:12): [True: 0, False: 7]
  ------------------
  845|      0|          return result;
  846|       |
  847|      7|        result = Curl_cwriter_add(data, writer);
  848|      7|        if(result) {
  ------------------
  |  Branch (848:12): [True: 0, False: 7]
  ------------------
  849|      0|          Curl_cwriter_free(data, writer);
  850|      0|          return result;
  851|      0|        }
  852|      7|      }
  853|      7|      if(is_chunked)
  ------------------
  |  Branch (853:10): [True: 4, False: 3]
  ------------------
  854|      4|        has_chunked = TRUE;
  ------------------
  |  | 1045|      4|#define TRUE true
  ------------------
  855|      7|    }
  856|      7|  } while(*enclist);
  ------------------
  |  Branch (856:11): [True: 0, False: 7]
  ------------------
  857|       |
  858|      7|  return CURLE_OK;
  859|      7|}
content_encoding.c:zalloc_cb:
   89|      3|{
   90|      3|  (void)opaque;
   91|       |  /* not a typo, keep it curlx_calloc() */
   92|      3|  return curlx_calloc(items, size);
  ------------------
  |  | 1473|      3|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   93|      3|}
content_encoding.c:zfree_cb:
   96|      3|{
   97|      3|  (void)opaque;
   98|      3|  curlx_free(ptr);
  ------------------
  |  | 1476|      3|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   99|      3|}
content_encoding.c:exit_zlib:
  114|      3|{
  115|      3|  if(*zlib_init != ZLIB_UNINIT) {
  ------------------
  |  Branch (115:6): [True: 3, False: 0]
  ------------------
  116|      3|    if(inflateEnd(z) != Z_OK && result == CURLE_OK)
  ------------------
  |  Branch (116:8): [True: 0, False: 3]
  |  Branch (116:33): [True: 0, False: 0]
  ------------------
  117|      0|      result = process_zlib_error(data, z);
  118|      3|    *zlib_init = ZLIB_UNINIT;
  119|      3|  }
  120|       |
  121|      3|  return result;
  122|      3|}
content_encoding.c:gzip_do_init:
  314|      3|{
  315|      3|  struct zlib_writer *zp = (struct zlib_writer *)writer;
  316|      3|  z_stream *z = &zp->z; /* zlib state structure */
  317|       |
  318|       |  /* Initialize zlib */
  319|      3|  z->zalloc = (alloc_func)zalloc_cb;
  320|      3|  z->zfree = (free_func)zfree_cb;
  321|       |
  322|      3|  if(inflateInit2(z, MAX_WBITS + 32) != Z_OK)
  ------------------
  |  Branch (322:6): [True: 0, False: 3]
  ------------------
  323|      0|    return process_zlib_error(data, z);
  324|       |
  325|      3|  zp->zlib_init = ZLIB_INIT_GZIP; /* Transparent gzip decompress state */
  326|      3|  return CURLE_OK;
  327|      3|}
content_encoding.c:gzip_do_write:
  332|      6|{
  333|      6|  struct zlib_writer *zp = (struct zlib_writer *)writer;
  334|      6|  z_stream *z = &zp->z; /* zlib state structure */
  335|       |
  336|      6|  if(!(type & CLIENTWRITE_BODY) || !nbytes)
  ------------------
  |  |   43|      6|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (336:6): [True: 6, False: 0]
  |  Branch (336:36): [True: 0, False: 0]
  ------------------
  337|      6|    return Curl_cwriter_write(data, writer->next, type, buf, nbytes);
  ------------------
  |  |  188|      6|  ((w) ? (w)->cwt->do_write((d), (w), (t), (b), (n)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (188:4): [True: 6, False: 0]
  |  |  ------------------
  ------------------
  338|       |
  339|      0|  if(zp->zlib_init == ZLIB_INIT_GZIP) {
  ------------------
  |  Branch (339:6): [True: 0, False: 0]
  ------------------
  340|       |    /* Let zlib handle the gzip decompression entirely */
  341|      0|    z->next_in = (z_const Bytef *)buf;
  342|      0|    z->avail_in = (uInt)nbytes;
  343|       |    /* Now uncompress the data */
  344|      0|    return inflate_stream(data, writer, type, ZLIB_INIT_GZIP);
  345|      0|  }
  346|       |
  347|       |  /* We are running with an old version: return error. */
  348|      0|  return exit_zlib(data, z, &zp->zlib_init, CURLE_WRITE_ERROR);
  349|      0|}
content_encoding.c:gzip_do_close:
  353|      3|{
  354|      3|  struct zlib_writer *zp = (struct zlib_writer *)writer;
  355|      3|  z_stream *z = &zp->z; /* zlib state structure */
  356|       |
  357|      3|  exit_zlib(data, z, &zp->zlib_init, CURLE_OK);
  358|      3|}
content_encoding.c:find_unencode_writer:
  727|      7|{
  728|      7|  const struct Curl_cwtype * const *cep;
  729|       |
  730|      7|  if(phase == CURL_CW_TRANSFER_DECODE) {
  ------------------
  |  Branch (730:6): [True: 4, False: 3]
  ------------------
  731|      4|    for(cep = transfer_unencoders; *cep; cep++) {
  ------------------
  |  Branch (731:36): [True: 4, False: 0]
  ------------------
  732|      4|      const struct Curl_cwtype *ce = *cep;
  733|      4|      if((curl_strnequal(name, ce->name, len) && !ce->name[len]) ||
  ------------------
  |  Branch (733:11): [True: 4, False: 0]
  |  Branch (733:50): [True: 4, False: 0]
  ------------------
  734|      0|         (ce->alias && curl_strnequal(name, ce->alias, len) &&
  ------------------
  |  Branch (734:11): [True: 0, False: 0]
  |  Branch (734:24): [True: 0, False: 0]
  ------------------
  735|      0|          !ce->alias[len]))
  ------------------
  |  Branch (735:11): [True: 0, False: 0]
  ------------------
  736|      4|        return ce;
  737|      4|    }
  738|      4|  }
  739|       |  /* look among the general decoders */
  740|      9|  for(cep = general_unencoders; *cep; cep++) {
  ------------------
  |  Branch (740:33): [True: 9, False: 0]
  ------------------
  741|      9|    const struct Curl_cwtype *ce = *cep;
  742|      9|    if((curl_strnequal(name, ce->name, len) && !ce->name[len]) ||
  ------------------
  |  Branch (742:9): [True: 3, False: 6]
  |  Branch (742:48): [True: 3, False: 0]
  ------------------
  743|      6|       (ce->alias && curl_strnequal(name, ce->alias, len) && !ce->alias[len]))
  ------------------
  |  Branch (743:9): [True: 3, False: 3]
  |  Branch (743:22): [True: 0, False: 3]
  |  Branch (743:62): [True: 0, False: 0]
  ------------------
  744|      3|      return ce;
  745|      9|  }
  746|      0|  return NULL;
  747|      3|}

Curl_cookie_add:
 1004|  6.80k|{
 1005|  6.80k|  struct Cookie comem;
 1006|  6.80k|  struct Cookie *co;
 1007|  6.80k|  size_t myhash;
 1008|  6.80k|  CURLcode result;
 1009|  6.80k|  bool replaces = FALSE;
  ------------------
  |  | 1048|  6.80k|#define FALSE false
  ------------------
 1010|  6.80k|  bool okay;
 1011|       |
 1012|  6.80k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  6.80k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1012:3): [True: 0, False: 6.80k]
  |  Branch (1012:3): [True: 6.80k, False: 0]
  ------------------
 1013|  6.80k|  DEBUGASSERT(MAX_SET_COOKIE_AMOUNT <= 255); /* counter is an unsigned char */
  ------------------
  |  | 1075|  6.80k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1013:3): [True: 0, Folded]
  |  Branch (1013:3): [True: 6.80k, Folded]
  ------------------
 1014|  6.80k|  if(data->req.setcookies >= MAX_SET_COOKIE_AMOUNT)
  ------------------
  |  |   90|  6.80k|#define MAX_SET_COOKIE_AMOUNT 50
  ------------------
  |  Branch (1014:6): [True: 0, False: 6.80k]
  ------------------
 1015|      0|    return CURLE_OK; /* silently ignore */
 1016|       |
 1017|  6.80k|  co = &comem;
 1018|  6.80k|  memset(co, 0, sizeof(comem));
 1019|       |
 1020|  6.80k|  if(flags & COOKIE_HTTPHEADER)
  ------------------
  |  |  114|  6.80k|#define COOKIE_HTTPHEADER (1<<0) /* if HTTP header-style line */
  ------------------
  |  Branch (1020:6): [True: 632, False: 6.16k]
  ------------------
 1021|    632|    result = parse_cookie_header(data, co, ci, &okay,
 1022|    632|                                 lineptr, domain, path, flags & COOKIE_SECURE);
  ------------------
  |  |  116|    632|#define COOKIE_SECURE     (1<<2) /* connection is over secure origin */
  ------------------
 1023|  6.16k|  else
 1024|  6.16k|    result = parse_netscape(co, ci, &okay, lineptr, flags & COOKIE_SECURE);
  ------------------
  |  |  116|  6.16k|#define COOKIE_SECURE     (1<<2) /* connection is over secure origin */
  ------------------
 1025|       |
 1026|  6.80k|  if(result || !okay)
  ------------------
  |  Branch (1026:6): [True: 0, False: 6.80k]
  |  Branch (1026:16): [True: 4.79k, False: 2.00k]
  ------------------
 1027|  4.79k|    goto fail;
 1028|       |
 1029|  2.00k|  if(co->prefix_secure && !co->secure)
  ------------------
  |  Branch (1029:6): [True: 30, False: 1.97k]
  |  Branch (1029:27): [True: 7, False: 23]
  ------------------
 1030|       |    /* The __Secure- prefix only requires that the cookie be set secure */
 1031|      7|    goto fail;
 1032|       |
 1033|  2.00k|  if(!(flags & COOKIE_NOPSL) && is_public_suffix(data, co, domain))
  ------------------
  |  |  117|  2.00k|#define COOKIE_NOPSL      (1<<3) /* skip PSL check */
  ------------------
  |  Branch (1033:6): [True: 4, False: 1.99k]
  |  Branch (1033:33): [True: 0, False: 4]
  ------------------
 1034|      0|    goto fail;
 1035|       |
 1036|  2.00k|  if(co->prefix_host) {
  ------------------
  |  Branch (1036:6): [True: 55, False: 1.94k]
  ------------------
 1037|       |    /*
 1038|       |     * The __Host- prefix requires the cookie to be secure, have a "/" path
 1039|       |     * and not have a domain set.
 1040|       |     */
 1041|     55|    if(co->secure && co->path && !strcmp(co->path, "/") && !co->tailmatch)
  ------------------
  |  Branch (1041:8): [True: 40, False: 15]
  |  Branch (1041:22): [True: 40, False: 0]
  |  Branch (1041:34): [True: 37, False: 3]
  |  Branch (1041:60): [True: 32, False: 5]
  ------------------
 1042|     32|      ;
 1043|     23|    else
 1044|     23|      goto fail;
 1045|     55|  }
 1046|       |
 1047|  1.97k|  if(!ci->running &&    /* read from a file */
  ------------------
  |  Branch (1047:6): [True: 1.89k, False: 81]
  ------------------
 1048|  1.89k|     ci->newsession &&  /* clean session cookies */
  ------------------
  |  Branch (1048:6): [True: 0, False: 1.89k]
  ------------------
 1049|      0|     !co->expires)      /* this is a session cookie */
  ------------------
  |  Branch (1049:6): [True: 0, False: 0]
  ------------------
 1050|      0|    goto fail;
 1051|       |
 1052|  1.97k|  co->livecookie = ci->running;
 1053|  1.97k|  co->creationtime = ++ci->lastct;
 1054|       |
 1055|  1.97k|  if(!(flags & COOKIE_NOEXPIRE))
  ------------------
  |  |  115|  1.97k|#define COOKIE_NOEXPIRE   (1<<1) /* skip remove_expired() */
  ------------------
  |  Branch (1055:6): [True: 1.97k, False: 0]
  ------------------
 1056|  1.97k|    remove_expired(ci);
 1057|       |
 1058|       |  /*
 1059|       |   * Now we have parsed the incoming line, we must now check if this supersedes
 1060|       |   * an already existing cookie, which it may if the previous have the same
 1061|       |   * domain and path as this.
 1062|       |   */
 1063|  1.97k|  if(!replace_existing(data, co, ci, flags & COOKIE_SECURE, &replaces))
  ------------------
  |  |  116|  1.97k|#define COOKIE_SECURE     (1<<2) /* connection is over secure origin */
  ------------------
  |  Branch (1063:6): [True: 0, False: 1.97k]
  ------------------
 1064|      0|    goto fail;
 1065|       |
 1066|       |  /* clone the stack struct into heap */
 1067|  1.97k|  co = curlx_memdup(&comem, sizeof(comem));
 1068|  1.97k|  if(!co) {
  ------------------
  |  Branch (1068:6): [True: 0, False: 1.97k]
  ------------------
 1069|      0|    co = &comem;
 1070|      0|    result = CURLE_OUT_OF_MEMORY;
 1071|      0|    goto fail; /* bail out if we are this low on memory */
 1072|      0|  }
 1073|       |
 1074|       |  /* add this cookie to the list */
 1075|  1.97k|  myhash = cookiehash(co->domain);
 1076|  1.97k|  Curl_llist_append(&ci->cookielist[myhash], co, &co->node);
 1077|       |
 1078|  1.97k|  if(ci->running)
  ------------------
  |  Branch (1078:6): [True: 81, False: 1.89k]
  ------------------
 1079|       |    /* Only show this when NOT reading the cookies from a file */
 1080|     81|    infof(data, "%s cookie %s=\"%s\" for domain %s, path %s, "
  ------------------
  |  |  143|     81|  do {                               \
  |  |  144|     81|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|     81|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 81, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 81]
  |  |  |  |  ------------------
  |  |  |  |  323|     81|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     81|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|     81|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 81]
  |  |  ------------------
  ------------------
 1081|  1.97k|          "expire %" FMT_OFF_T,
 1082|  1.97k|          replaces ? "Replaced" : "Added", co->name, co->value,
 1083|  1.97k|          co->domain, co->path, co->expires);
 1084|       |
 1085|  1.97k|  if(!replaces)
  ------------------
  |  Branch (1085:6): [True: 1.39k, False: 579]
  ------------------
 1086|  1.39k|    ci->numcookies++; /* one more cookie in the jar */
 1087|       |
 1088|       |  /*
 1089|       |   * Now that we have added a new cookie to the jar, update the expiration
 1090|       |   * tracker in case it is the next one to expire.
 1091|       |   */
 1092|  1.97k|  if(co->expires && (co->expires < ci->next_expiration))
  ------------------
  |  Branch (1092:6): [True: 899, False: 1.07k]
  |  Branch (1092:21): [True: 538, False: 361]
  ------------------
 1093|    538|    ci->next_expiration = co->expires;
 1094|       |
 1095|  1.97k|  if(flags & COOKIE_HTTPHEADER)
  ------------------
  |  |  114|  1.97k|#define COOKIE_HTTPHEADER (1<<0) /* if HTTP header-style line */
  ------------------
  |  Branch (1095:6): [True: 503, False: 1.47k]
  ------------------
 1096|    503|    data->req.setcookies++;
 1097|       |
 1098|  1.97k|  return result;
 1099|  4.82k|fail:
 1100|       |  freecookie(co, FALSE);
  ------------------
  |  | 1048|  4.82k|#define FALSE false
  ------------------
 1101|  4.82k|  return result;
 1102|  1.97k|}
Curl_cookie_init:
 1119|  3.73k|{
 1120|  3.73k|  int i;
 1121|  3.73k|  struct CookieInfo *ci = curlx_calloc(1, sizeof(struct CookieInfo));
  ------------------
  |  | 1473|  3.73k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1122|  3.73k|  if(!ci)
  ------------------
  |  Branch (1122:6): [True: 0, False: 3.73k]
  ------------------
 1123|      0|    return NULL;
 1124|       |
 1125|       |  /* This does not use the destructor callback since we want to add
 1126|       |     and remove to lists while keeping the cookie struct intact */
 1127|   238k|  for(i = 0; i < COOKIE_HASH_SIZE; i++)
  ------------------
  |  |   54|   238k|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (1127:14): [True: 235k, False: 3.73k]
  ------------------
 1128|   235k|    Curl_llist_init(&ci->cookielist[i], NULL);
 1129|       |  /*
 1130|       |   * Initialize the next_expiration time to signal that we do not have enough
 1131|       |   * information yet.
 1132|       |   */
 1133|  3.73k|  ci->next_expiration = CURL_OFF_T_MAX;
  ------------------
  |  |  588|  3.73k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
 1134|       |
 1135|  3.73k|  return ci;
 1136|  3.73k|}
Curl_cookie_loadfiles:
 1227|  3.76k|{
 1228|  3.76k|  CURLcode result = CURLE_OK;
 1229|  3.76k|  struct curl_slist *list = data->state.cookielist;
 1230|  3.76k|  if(list) {
  ------------------
  |  Branch (1230:6): [True: 3.76k, False: 0]
  ------------------
 1231|  3.76k|    Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 1232|  3.76k|    if(!data->cookies)
  ------------------
  |  Branch (1232:8): [True: 0, False: 3.76k]
  ------------------
 1233|      0|      data->cookies = Curl_cookie_init();
 1234|  3.76k|    if(!data->cookies)
  ------------------
  |  Branch (1234:8): [True: 0, False: 3.76k]
  ------------------
 1235|      0|      result = CURLE_OUT_OF_MEMORY;
 1236|  3.76k|    else {
 1237|  3.76k|      data->state.cookie_engine = TRUE;
  ------------------
  |  | 1045|  3.76k|#define TRUE true
  ------------------
 1238|  7.53k|      while(list) {
  ------------------
  |  Branch (1238:13): [True: 3.76k, False: 3.76k]
  ------------------
 1239|  3.76k|        result = cookie_load(data, list->data, data->cookies, flags);
 1240|  3.76k|        if(result)
  ------------------
  |  Branch (1240:12): [True: 0, False: 3.76k]
  ------------------
 1241|      0|          break;
 1242|  3.76k|        list = list->next;
 1243|  3.76k|      }
 1244|  3.76k|    }
 1245|  3.76k|    Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1246|  3.76k|  }
 1247|  3.76k|  return result;
 1248|  3.76k|}
Curl_secure_context:
 1303|  3.60k|{
 1304|  3.60k|  return Curl_xfer_is_secure(data) ||
  ------------------
  |  Branch (1304:10): [True: 3.60k, False: 0]
  ------------------
 1305|      0|    curl_strequal("localhost", host) ||
  ------------------
  |  Branch (1305:5): [True: 0, False: 0]
  ------------------
 1306|      0|    !strcmp(host, "127.0.0.1") ||
  ------------------
  |  Branch (1306:5): [True: 0, False: 0]
  ------------------
 1307|      0|    !strcmp(host, "::1");
  ------------------
  |  Branch (1307:5): [True: 0, False: 0]
  ------------------
 1308|  3.60k|}
Curl_cookie_getlist:
 1324|  3.59k|{
 1325|  3.59k|  size_t matches = 0;
 1326|  3.59k|  const bool is_ip = Curl_host_is_ipnum(host);
 1327|  3.59k|  const size_t myhash = cookiehash(host);
 1328|  3.59k|  struct Curl_llist_node *n;
 1329|  3.59k|  const bool secure = Curl_secure_context(data, host);
 1330|  3.59k|  struct CookieInfo *ci = data->cookies;
 1331|  3.59k|  const char *path = data->state.up.path;
 1332|  3.59k|  CURLcode result = CURLE_OK;
 1333|  3.59k|  *okay = FALSE;
  ------------------
  |  | 1048|  3.59k|#define FALSE false
  ------------------
 1334|       |
 1335|  3.59k|  Curl_llist_init(list, NULL);
 1336|       |
 1337|  3.59k|  if(!ci || !Curl_llist_count(&ci->cookielist[myhash]))
  ------------------
  |  Branch (1337:6): [True: 0, False: 3.59k]
  |  Branch (1337:13): [True: 3.59k, False: 0]
  ------------------
 1338|  3.59k|    return CURLE_OK; /* no cookie struct or no cookies in the struct */
 1339|       |
 1340|       |  /* at first, remove expired cookies */
 1341|      0|  remove_expired(ci);
 1342|       |
 1343|      0|  for(n = Curl_llist_head(&ci->cookielist[myhash]); n; n = Curl_node_next(n)) {
  ------------------
  |  Branch (1343:53): [True: 0, False: 0]
  ------------------
 1344|      0|    struct Cookie *co = Curl_node_elem(n);
 1345|       |
 1346|       |    /* if the cookie requires we are secure we must only continue if we are! */
 1347|      0|    if(co->secure ? secure : TRUE) {
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  |  Branch (1347:8): [True: 0, False: 0]
  |  Branch (1347:8): [True: 0, False: 0]
  ------------------
 1348|       |
 1349|       |      /* now check if the domain is correct */
 1350|      0|      if(!co->domain ||
  ------------------
  |  Branch (1350:10): [True: 0, False: 0]
  ------------------
 1351|      0|         (co->tailmatch && !is_ip &&
  ------------------
  |  Branch (1351:11): [True: 0, False: 0]
  |  Branch (1351:28): [True: 0, False: 0]
  ------------------
 1352|      0|          cookie_tailmatch(co->domain, strlen(co->domain), host)) ||
  ------------------
  |  Branch (1352:11): [True: 0, False: 0]
  ------------------
 1353|      0|         ((!co->tailmatch || is_ip) && curl_strequal(host, co->domain))) {
  ------------------
  |  Branch (1353:12): [True: 0, False: 0]
  |  Branch (1353:30): [True: 0, False: 0]
  |  Branch (1353:40): [True: 0, False: 0]
  ------------------
 1354|       |        /*
 1355|       |         * the right part of the host matches the domain stuff in the
 1356|       |         * cookie data
 1357|       |         */
 1358|       |
 1359|       |        /*
 1360|       |         * now check the left part of the path with the cookies path
 1361|       |         * requirement
 1362|       |         */
 1363|      0|        if(!co->path || pathmatch(co->path, path)) {
  ------------------
  |  Branch (1363:12): [True: 0, False: 0]
  |  Branch (1363:25): [True: 0, False: 0]
  ------------------
 1364|       |
 1365|       |          /*
 1366|       |           * This is a match and we add it to the return-linked-list
 1367|       |           */
 1368|      0|          Curl_llist_append(list, co, &co->getnode);
 1369|      0|          matches++;
 1370|      0|          if(matches >= MAX_COOKIE_SEND_AMOUNT) {
  ------------------
  |  |  102|      0|#define MAX_COOKIE_SEND_AMOUNT 150
  ------------------
  |  Branch (1370:14): [True: 0, False: 0]
  ------------------
 1371|      0|            infof(data, "Included max number of cookies (%zu) in request!",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1372|      0|                  matches);
 1373|      0|            break;
 1374|      0|          }
 1375|      0|        }
 1376|      0|      }
 1377|      0|    }
 1378|      0|  }
 1379|       |
 1380|      0|  if(matches) {
  ------------------
  |  Branch (1380:6): [True: 0, False: 0]
  ------------------
 1381|       |    /*
 1382|       |     * Now we need to make sure that if there is a name appearing more than
 1383|       |     * once, the longest specified path version comes first. To make this the
 1384|       |     * swiftest way, we sort them all based on path length.
 1385|       |     */
 1386|      0|    struct Cookie **array;
 1387|      0|    size_t i;
 1388|       |
 1389|       |    /* alloc an array and store all cookie pointers */
 1390|      0|    array = curlx_malloc(sizeof(struct Cookie *) * matches);
  ------------------
  |  | 1471|      0|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
 1391|      0|    if(!array) {
  ------------------
  |  Branch (1391:8): [True: 0, False: 0]
  ------------------
 1392|      0|      result = CURLE_OUT_OF_MEMORY;
 1393|      0|      goto fail;
 1394|      0|    }
 1395|       |
 1396|      0|    n = Curl_llist_head(list);
 1397|       |
 1398|      0|    for(i = 0; n; n = Curl_node_next(n))
  ------------------
  |  Branch (1398:16): [True: 0, False: 0]
  ------------------
 1399|      0|      array[i++] = Curl_node_elem(n);
 1400|       |
 1401|       |    /* now sort the cookie pointers in path length order */
 1402|      0|    qsort(array, matches, sizeof(struct Cookie *), cookie_sort);
 1403|       |
 1404|       |    /* remake the linked list order according to the new order */
 1405|      0|    Curl_llist_destroy(list, NULL);
 1406|       |
 1407|      0|    for(i = 0; i < matches; i++)
  ------------------
  |  Branch (1407:16): [True: 0, False: 0]
  ------------------
 1408|      0|      Curl_llist_append(list, array[i], &array[i]->getnode);
 1409|       |
 1410|      0|    curlx_free(array); /* remove the temporary data again */
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1411|      0|  }
 1412|       |
 1413|      0|  *okay = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1414|      0|  return CURLE_OK; /* success */
 1415|       |
 1416|      0|fail:
 1417|       |  /* failure, clear up the allocated chain and return NULL */
 1418|       |  Curl_llist_destroy(list, NULL);
 1419|      0|  return result; /* error */
 1420|      0|}
Curl_cookie_clearall:
 1428|  3.73k|{
 1429|  3.73k|  if(ci) {
  ------------------
  |  Branch (1429:6): [True: 3.73k, False: 0]
  ------------------
 1430|  3.73k|    unsigned int i;
 1431|   238k|    for(i = 0; i < COOKIE_HASH_SIZE; i++) {
  ------------------
  |  |   54|   238k|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (1431:16): [True: 235k, False: 3.73k]
  ------------------
 1432|   235k|      struct Curl_llist_node *n;
 1433|   236k|      for(n = Curl_llist_head(&ci->cookielist[i]); n;) {
  ------------------
  |  Branch (1433:52): [True: 1.10k, False: 235k]
  ------------------
 1434|  1.10k|        struct Cookie *c = Curl_node_elem(n);
 1435|  1.10k|        struct Curl_llist_node *e = Curl_node_next(n);
 1436|  1.10k|        Curl_node_remove(n);
 1437|       |        freecookie(c, TRUE);
  ------------------
  |  | 1045|  1.10k|#define TRUE true
  ------------------
 1438|  1.10k|        n = e;
 1439|  1.10k|      }
 1440|   235k|    }
 1441|  3.73k|    ci->numcookies = 0;
 1442|  3.73k|  }
 1443|  3.73k|}
Curl_cookie_clearsess:
 1451|     37|{
 1452|     37|  unsigned int i;
 1453|       |
 1454|     37|  if(!ci)
  ------------------
  |  Branch (1454:6): [True: 0, False: 37]
  ------------------
 1455|      0|    return;
 1456|       |
 1457|  2.36k|  for(i = 0; i < COOKIE_HASH_SIZE; i++) {
  ------------------
  |  |   54|  2.36k|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (1457:14): [True: 2.33k, False: 37]
  ------------------
 1458|  2.33k|    struct Curl_llist_node *n = Curl_llist_head(&ci->cookielist[i]);
 1459|  2.33k|    struct Curl_llist_node *e = NULL;
 1460|       |
 1461|  2.38k|    for(; n; n = e) {
  ------------------
  |  Branch (1461:11): [True: 50, False: 2.33k]
  ------------------
 1462|     50|      struct Cookie *curr = Curl_node_elem(n);
 1463|     50|      e = Curl_node_next(n); /* in case the node is removed, get it early */
 1464|     50|      if(!curr->expires) {
  ------------------
  |  Branch (1464:10): [True: 12, False: 38]
  ------------------
 1465|     12|        Curl_node_remove(n);
 1466|       |        freecookie(curr, TRUE);
  ------------------
  |  | 1045|     12|#define TRUE true
  ------------------
 1467|     12|        ci->numcookies--;
 1468|     12|      }
 1469|     50|    }
 1470|  2.33k|  }
 1471|     37|}
Curl_cookie_cleanup:
 1479|  3.73k|{
 1480|  3.73k|  if(ci) {
  ------------------
  |  Branch (1480:6): [True: 3.73k, False: 0]
  ------------------
 1481|  3.73k|    Curl_cookie_clearall(ci);
 1482|  3.73k|    curlx_free(ci); /* free the base struct as well */
  ------------------
  |  | 1476|  3.73k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1483|  3.73k|  }
 1484|  3.73k|}
Curl_flush_cookies:
 1672|  7.63k|{
 1673|  7.63k|  Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 1674|       |  /* only save the cookie file if a transfer was started (cookies->running is
 1675|       |     set), as otherwise the cookies were not completely initialized and there
 1676|       |     might be cookie files that were not loaded so saving the file is the
 1677|       |     wrong thing. */
 1678|  7.63k|  if(data->cookies) {
  ------------------
  |  Branch (1678:6): [True: 3.90k, False: 3.73k]
  ------------------
 1679|  3.90k|    const char *cookiejar = CURL_EASY_STR(data, STRING_COOKIEJAR);
  ------------------
  |  | 1228|  3.90k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
 1680|  3.90k|    if(cookiejar && data->cookies->running) {
  ------------------
  |  Branch (1680:8): [True: 3.90k, False: 0]
  |  Branch (1680:21): [True: 3.77k, False: 122]
  ------------------
 1681|       |      /* if we have a destination file for all the cookies to get dumped to */
 1682|  3.77k|      CURLcode result = cookie_output(data, data->cookies, cookiejar);
 1683|  3.77k|      if(result)
  ------------------
  |  Branch (1683:10): [True: 0, False: 3.77k]
  ------------------
 1684|      0|        infof(data, "WARNING: failed to save cookies in %s: %s",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1685|  3.77k|              cookiejar, curl_easy_strerror(result));
 1686|  3.77k|    }
 1687|       |
 1688|  3.90k|    if(cleanup && (!data->share || (data->cookies != data->share->cookies))) {
  ------------------
  |  Branch (1688:8): [True: 3.73k, False: 167]
  |  Branch (1688:20): [True: 3.73k, False: 0]
  |  Branch (1688:36): [True: 0, False: 0]
  ------------------
 1689|  3.73k|      Curl_cookie_cleanup(data->cookies);
 1690|       |      data->cookies = NULL;
 1691|  3.73k|    }
 1692|  3.90k|  }
 1693|  7.63k|  Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1694|  7.63k|}
Curl_cookie_run:
 1697|  3.66k|{
 1698|  3.66k|  Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 1699|  3.66k|  if(data->cookies)
  ------------------
  |  Branch (1699:6): [True: 3.66k, False: 0]
  ------------------
 1700|  3.66k|    data->cookies->running = TRUE;
  ------------------
  |  | 1045|  3.66k|#define TRUE true
  ------------------
 1701|  3.66k|  Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1702|  3.66k|}
cookie.c:parse_cookie_header:
  597|    632|{
  598|       |  /* This line was read off an HTTP-header */
  599|    632|  time_t now = 0;
  600|    632|  size_t linelength = strlen(ptr);
  601|    632|  CURLcode result = CURLE_OK;
  602|    632|  struct Curl_str cookie[COOKIE_PIECES];
  603|    632|  *okay = FALSE;
  ------------------
  |  | 1048|    632|#define FALSE false
  ------------------
  604|    632|  if(linelength > MAX_COOKIE_LINE)
  ------------------
  |  |   81|    632|#define MAX_COOKIE_LINE 5000
  ------------------
  |  Branch (604:6): [True: 0, False: 632]
  ------------------
  605|       |    /* discard overly long lines at once */
  606|      0|    return CURLE_OK;
  607|       |
  608|       |  /* memset instead of initializer because gcc 4.8.1 is silly */
  609|    632|  memset(cookie, 0, sizeof(cookie));
  610|  2.21k|  do {
  611|  2.21k|    struct Curl_str name;
  612|       |
  613|       |    /* we have a <name>=<value> pair or a stand-alone word here */
  614|  2.21k|    if(!curlx_str_cspn(&ptr, &name, ";\r\n=")) {
  ------------------
  |  Branch (614:8): [True: 1.99k, False: 216]
  ------------------
  615|  1.99k|      struct Curl_str val;
  616|  1.99k|      bool sep = FALSE;
  ------------------
  |  | 1048|  1.99k|#define FALSE false
  ------------------
  617|  1.99k|      curlx_str_trimblanks(&name);
  618|       |
  619|  1.99k|      if(invalid_octets(curlx_str(&name), curlx_strlen(&name))) {
  ------------------
  |  |   49|  1.99k|#define curlx_str(x)    ((x)->str)
  ------------------
                    if(invalid_octets(curlx_str(&name), curlx_strlen(&name))) {
  ------------------
  |  |   50|  1.99k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (619:10): [True: 15, False: 1.98k]
  ------------------
  620|     15|        infof(data, "invalid octets in name, cookie dropped");
  ------------------
  |  |  143|     15|  do {                               \
  |  |  144|     15|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|     15|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 15, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 15]
  |  |  |  |  ------------------
  |  |  |  |  323|     15|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     15|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     15|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 15]
  |  |  ------------------
  ------------------
  621|     15|        return CURLE_OK;
  622|     15|      }
  623|       |
  624|  1.98k|      if(!curlx_str_single(&ptr, '=')) {
  ------------------
  |  Branch (624:10): [True: 1.63k, False: 351]
  ------------------
  625|  1.63k|        sep = TRUE; /* a '=' was used */
  ------------------
  |  | 1045|  1.63k|#define TRUE true
  ------------------
  626|  1.63k|        if(!curlx_str_cspn(&ptr, &val, ";\r\n"))
  ------------------
  |  Branch (626:12): [True: 1.60k, False: 33]
  ------------------
  627|  1.60k|          curlx_str_trimblanks(&val);
  628|       |
  629|  1.63k|        if(invalid_octets(curlx_str(&val), curlx_strlen(&val))) {
  ------------------
  |  |   49|  1.63k|#define curlx_str(x)    ((x)->str)
  ------------------
                      if(invalid_octets(curlx_str(&val), curlx_strlen(&val))) {
  ------------------
  |  |   50|  1.63k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (629:12): [True: 19, False: 1.61k]
  ------------------
  630|     19|          infof(data, "invalid octets in value, cookie dropped");
  ------------------
  |  |  143|     19|  do {                               \
  |  |  144|     19|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|     19|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 19, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 19]
  |  |  |  |  ------------------
  |  |  |  |  323|     19|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     19|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     19|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 19]
  |  |  ------------------
  ------------------
  631|     19|          return CURLE_OK;
  632|     19|        }
  633|  1.63k|      }
  634|    351|      else
  635|    351|        curlx_str_init(&val);
  636|       |
  637|  1.96k|      if(!curlx_strlen(&cookie[COOKIE_NAME])) {
  ------------------
  |  |   50|  1.96k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (637:10): [True: 597, False: 1.36k]
  ------------------
  638|    597|        if(!parse_first_pair(data, co, cookie, &name, &val, sep))
  ------------------
  |  Branch (638:12): [True: 23, False: 574]
  ------------------
  639|     23|          return CURLE_OK;
  640|    597|      }
  641|  1.36k|      else if(!sep) {
  ------------------
  |  Branch (641:15): [True: 337, False: 1.03k]
  ------------------
  642|    337|        if(!parse_flag(data, co, ci, &name, secure_origin))
  ------------------
  |  Branch (642:12): [True: 0, False: 337]
  ------------------
  643|      0|          return CURLE_OK;
  644|    337|      }
  645|  1.03k|      else if(curlx_str_casecompare(&name, "path"))
  ------------------
  |  Branch (645:15): [True: 432, False: 599]
  ------------------
  646|    432|        cookie[COOKIE_PATH] = val;
  ------------------
  |  |  366|    432|#define COOKIE_PATH   3
  ------------------
  647|    599|      else if(curlx_str_casecompare(&name, "domain") && curlx_strlen(&val)) {
  ------------------
  |  |   50|    494|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 481, False: 13]
  |  |  ------------------
  ------------------
  |  Branch (647:15): [True: 494, False: 105]
  ------------------
  648|    481|        if(!parse_domain(data, co, &cookie[COOKIE_DOMAIN], &val, &domain))
  ------------------
  |  |  365|    481|#define COOKIE_DOMAIN 2
  ------------------
  |  Branch (648:12): [True: 46, False: 435]
  ------------------
  649|     46|          return CURLE_OK;
  650|    481|      }
  651|    118|      else if(curlx_str_casecompare(&name, "max-age") && curlx_strlen(&val))
  ------------------
  |  |   50|      2|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (651:15): [True: 2, False: 116]
  ------------------
  652|      2|        parse_maxage(co, &val, &now);
  653|    116|      else if(curlx_str_casecompare(&name, "expires") && curlx_strlen(&val))
  ------------------
  |  |   50|      1|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (653:15): [True: 1, False: 115]
  ------------------
  654|      1|        parse_expires(co, &val, &now);
  655|  1.96k|    }
  656|  2.21k|  } while(!curlx_str_single(&ptr, ';'));
  ------------------
  |  Branch (656:11): [True: 1.58k, False: 529]
  ------------------
  657|       |
  658|    529|  if(curlx_strlen(&cookie[COOKIE_NAME])) {
  ------------------
  |  |   50|    529|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 515, False: 14]
  |  |  ------------------
  ------------------
  659|       |    /* the header was fine, now store the data */
  660|    515|    result = storecookie(co, &cookie[0], path, domain);
  661|    515|    if(!result)
  ------------------
  |  Branch (661:8): [True: 515, False: 0]
  ------------------
  662|    515|      *okay = TRUE;
  ------------------
  |  | 1045|    515|#define TRUE true
  ------------------
  663|    515|  }
  664|    529|  return result;
  665|    632|}
cookie.c:invalid_octets:
  346|  6.66k|{
  347|  6.66k|  const unsigned char *p = (const unsigned char *)ptr;
  348|       |  /* Reject all bytes \x01 - \x1f + \x7f */
  349|  56.7k|  while(len && *p) {
  ------------------
  |  Branch (349:9): [True: 50.1k, False: 6.59k]
  |  Branch (349:16): [True: 50.1k, False: 0]
  ------------------
  350|  50.1k|    if((*p < 0x20) || (*p == 0x7f))
  ------------------
  |  Branch (350:8): [True: 55, False: 50.0k]
  |  Branch (350:23): [True: 10, False: 50.0k]
  ------------------
  351|     65|      return TRUE;
  ------------------
  |  | 1045|     65|#define TRUE true
  ------------------
  352|  50.0k|    p++;
  353|  50.0k|    len--;
  354|  50.0k|  }
  355|  6.59k|  return FALSE;
  ------------------
  |  | 1048|  6.59k|#define FALSE false
  ------------------
  356|  6.66k|}
cookie.c:parse_first_pair:
  423|    597|{
  424|       |  /* The first name/value pair is the actual cookie name */
  425|    597|  if(!sep || !curlx_strlen(name)) {
  ------------------
  |  |   50|    583|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (425:6): [True: 14, False: 583]
  |  Branch (425:14): [True: 9, False: 574]
  ------------------
  426|     23|    infof(data, "invalid cookie, dropped");
  ------------------
  |  |  143|     23|  do {                               \
  |  |  144|     23|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|     23|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 23, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 23]
  |  |  |  |  ------------------
  |  |  |  |  323|     23|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     23|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     23|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 23]
  |  |  ------------------
  ------------------
  427|     23|    return FALSE;
  ------------------
  |  | 1048|     23|#define FALSE false
  ------------------
  428|     23|  }
  429|       |
  430|       |  /*
  431|       |   * Check for too long individual name or contents. Chrome and Firefox
  432|       |   * support 4095 or 4096 bytes combo
  433|       |   */
  434|    574|  if((curlx_strlen(name) + curlx_strlen(val)) > MAX_NAME) {
  ------------------
  |  |   50|    574|#define curlx_strlen(x) ((x)->len)
  ------------------
                if((curlx_strlen(name) + curlx_strlen(val)) > MAX_NAME) {
  ------------------
  |  |   50|    574|#define curlx_strlen(x) ((x)->len)
  ------------------
                if((curlx_strlen(name) + curlx_strlen(val)) > MAX_NAME) {
  ------------------
  |  |   85|    574|#define MAX_NAME 4096
  ------------------
  |  Branch (434:6): [True: 0, False: 574]
  ------------------
  435|      0|    infof(data, "oversized cookie dropped, name/val %zu + %zu bytes",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  436|      0|          curlx_strlen(name), curlx_strlen(val));
  437|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  438|      0|  }
  439|       |
  440|       |  /* Check if we have a reserved prefix set. */
  441|    574|  if(!strncmp("__Secure-", curlx_str(name), 9))
  ------------------
  |  |   49|    574|#define curlx_str(x)    ((x)->str)
  ------------------
  |  Branch (441:6): [True: 8, False: 566]
  ------------------
  442|      8|    co->prefix_secure = TRUE;
  ------------------
  |  | 1045|      8|#define TRUE true
  ------------------
  443|    566|  else if(!strncmp("__Host-", curlx_str(name), 7))
  ------------------
  |  |   49|    566|#define curlx_str(x)    ((x)->str)
  ------------------
  |  Branch (443:11): [True: 6, False: 560]
  ------------------
  444|      6|    co->prefix_host = TRUE;
  ------------------
  |  | 1045|      6|#define TRUE true
  ------------------
  445|       |
  446|    574|  cookie[COOKIE_NAME] = *name;
  ------------------
  |  |  363|    574|#define COOKIE_NAME   0
  ------------------
  447|    574|  cookie[COOKIE_VALUE] = *val;
  ------------------
  |  |  364|    574|#define COOKIE_VALUE  1
  ------------------
  448|       |  return TRUE;
  ------------------
  |  | 1045|    574|#define TRUE true
  ------------------
  449|    574|}
cookie.c:parse_flag:
  454|    337|{
  455|       |  /*
  456|       |   * secure cookies are only allowed to be set when the connection is
  457|       |   * using a secure protocol, or when the cookie is being set by
  458|       |   * reading from file
  459|       |   */
  460|    337|  if(curlx_str_casecompare(name, "secure")) {
  ------------------
  |  Branch (460:6): [True: 2, False: 335]
  ------------------
  461|      2|    if(secure || !ci->running)
  ------------------
  |  Branch (461:8): [True: 2, False: 0]
  |  Branch (461:18): [True: 0, False: 0]
  ------------------
  462|      2|      co->secure = TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
  463|      0|    else {
  464|      0|      infof(data, "skipped cookie because not 'secure'");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  465|      0|      return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  466|      0|    }
  467|      2|  }
  468|    335|  else if(curlx_str_casecompare(name, "httponly"))
  ------------------
  |  Branch (468:11): [True: 1, False: 334]
  ------------------
  469|      1|    co->httponly = TRUE;
  ------------------
  |  | 1045|      1|#define TRUE true
  ------------------
  470|       |
  471|    337|  return TRUE;
  ------------------
  |  | 1045|    337|#define TRUE true
  ------------------
  472|    337|}
cookie.c:parse_domain:
  478|    481|{
  479|    481|  bool is_ip;
  480|    481|  const char *domain = *domainp;
  481|    481|  const char *v = curlx_str(val);
  ------------------
  |  |   49|    481|#define curlx_str(x)    ((x)->str)
  ------------------
  482|       |  /*
  483|       |   * Now, we make sure that our host is within the given domain, or
  484|       |   * the given domain is not valid and thus cannot be set.
  485|       |   */
  486|       |
  487|    481|  if('.' == *v)
  ------------------
  |  Branch (487:6): [True: 13, False: 468]
  ------------------
  488|     13|    curlx_str_nudge(val, 1);
  489|       |
  490|    481|#ifndef USE_LIBPSL
  491|       |  /*
  492|       |   * Without PSL we do not know when the incoming cookie is set on a
  493|       |   * TLD or otherwise "protected" suffix. To reduce risk, we require a
  494|       |   * dot OR the exact hostname being "localhost".
  495|       |   */
  496|    481|  if(bad_domain(curlx_str(val), curlx_strlen(val))) {
  ------------------
  |  |   49|    481|#define curlx_str(x)    ((x)->str)
  ------------------
                if(bad_domain(curlx_str(val), curlx_strlen(val))) {
  ------------------
  |  |   50|    481|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (496:6): [True: 42, False: 439]
  ------------------
  497|     42|    *domainp = ":";
  498|     42|    domain = ":";
  499|     42|  }
  500|    481|#endif
  501|       |
  502|    481|  is_ip = Curl_host_is_ipnum(domain ? domain : curlx_str(val));
  ------------------
  |  |   49|    435|#define curlx_str(x)    ((x)->str)
  ------------------
  |  Branch (502:30): [True: 46, False: 435]
  ------------------
  503|       |
  504|    481|  if(!domain ||
  ------------------
  |  Branch (504:6): [True: 435, False: 46]
  ------------------
  505|     46|     (is_ip &&
  ------------------
  |  Branch (505:7): [True: 0, False: 46]
  ------------------
  506|      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 (506:7): [True: 0, False: 0]
  ------------------
  507|      0|      (curlx_strlen(val) == strlen(domain))) ||
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (507:7): [True: 0, False: 0]
  ------------------
  508|     46|     (!is_ip && cookie_tailmatch(curlx_str(val),
  ------------------
  |  |   49|     46|#define curlx_str(x)    ((x)->str)
  ------------------
  |  Branch (508:7): [True: 46, False: 0]
  |  Branch (508:17): [True: 0, False: 46]
  ------------------
  509|    435|                                  curlx_strlen(val), domain))) {
  ------------------
  |  |   50|     46|#define curlx_strlen(x) ((x)->len)
  ------------------
  510|    435|    *cookie_domain = *val;
  511|    435|    if(!is_ip)
  ------------------
  |  Branch (511:8): [True: 435, False: 0]
  ------------------
  512|    435|      co->tailmatch = TRUE; /* we always do that if the domain name was
  ------------------
  |  | 1045|    435|#define TRUE true
  ------------------
  513|       |                               given */
  514|    435|  }
  515|     46|  else {
  516|       |    /*
  517|       |     * We did not get a tailmatch and then the attempted set domain is
  518|       |     * not a domain to which the current host belongs. Mark as bad.
  519|       |     */
  520|     46|    infof(data, "skipped cookie with bad tailmatch domain: %s",
  ------------------
  |  |  143|     46|  do {                               \
  |  |  144|     46|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|     46|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 46, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 46]
  |  |  |  |  ------------------
  |  |  |  |  323|     46|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     46|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     46|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 46]
  |  |  ------------------
  ------------------
  521|     46|          curlx_str(val));
  522|     46|    return FALSE;
  ------------------
  |  | 1048|     46|#define FALSE false
  ------------------
  523|     46|  }
  524|    435|  return TRUE;
  ------------------
  |  | 1045|    435|#define TRUE true
  ------------------
  525|    481|}
cookie.c:bad_domain:
  320|    481|{
  321|    481|  if((len == 9) && curl_strnequal(domain, "localhost", 9))
  ------------------
  |  Branch (321:6): [True: 27, False: 454]
  |  Branch (321:20): [True: 0, False: 27]
  ------------------
  322|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  323|    481|  else {
  324|       |    /* there must be a dot present, but that dot must not be a trailing dot */
  325|    481|    const char *dot = memchr(domain, '.', len);
  326|    481|    if(dot) {
  ------------------
  |  Branch (326:8): [True: 449, False: 32]
  ------------------
  327|    449|      size_t i = dot - domain;
  328|    449|      if((len - i) > 1)
  ------------------
  |  Branch (328:10): [True: 439, False: 10]
  ------------------
  329|       |        /* the dot is not the last byte */
  330|    439|        return FALSE;
  ------------------
  |  | 1048|    439|#define FALSE false
  ------------------
  331|    449|    }
  332|    481|  }
  333|     42|  return TRUE;
  ------------------
  |  | 1045|     42|#define TRUE true
  ------------------
  334|    481|}
cookie.c:parse_maxage:
  529|      2|{
  530|      2|  int rc;
  531|      2|  const char *maxage = curlx_str(val);
  ------------------
  |  |   49|      2|#define curlx_str(x)    ((x)->str)
  ------------------
  532|      2|  if(*maxage == '\"')
  ------------------
  |  Branch (532:6): [True: 0, False: 2]
  ------------------
  533|      0|    maxage++;
  534|      2|  rc = curlx_str_number(&maxage, &co->expires, CURL_OFF_T_MAX);
  ------------------
  |  |  588|      2|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  535|      2|  if(!*nowp)
  ------------------
  |  Branch (535:6): [True: 2, False: 0]
  ------------------
  536|      2|    *nowp = time(NULL);
  537|      2|  switch(rc) {
  538|      0|  case STRE_OVERFLOW:
  ------------------
  |  |   35|      0|#define STRE_OVERFLOW 7
  ------------------
  |  Branch (538:3): [True: 0, False: 2]
  ------------------
  539|       |    /* overflow, used max value */
  540|      0|    co->expires = CURL_OFF_T_MAX;
  ------------------
  |  |  588|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  541|      0|    break;
  542|      0|  default:
  ------------------
  |  Branch (542:3): [True: 0, False: 2]
  ------------------
  543|       |    /* negative or otherwise bad, expire */
  544|      0|    co->expires = 1;
  545|      0|    break;
  546|      2|  case STRE_OK:
  ------------------
  |  |   28|      2|#define STRE_OK       0
  ------------------
  |  Branch (546:3): [True: 2, False: 0]
  ------------------
  547|      2|    if(!co->expires)
  ------------------
  |  Branch (547:8): [True: 0, False: 2]
  ------------------
  548|      0|      co->expires = 1; /* expire now */
  549|      2|    else if(CURL_OFF_T_MAX - *nowp < co->expires)
  ------------------
  |  |  588|      2|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (549:13): [True: 0, False: 2]
  ------------------
  550|       |      /* would overflow */
  551|      0|      co->expires = CURL_OFF_T_MAX;
  ------------------
  |  |  588|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  552|      2|    else
  553|      2|      co->expires += *nowp;
  554|      2|    break;
  555|      2|  }
  556|      2|  cap_expires(*nowp, co);
  557|      2|}
cookie.c:cap_expires:
   53|      3|{
   54|      3|  if(co->expires && (TIME_T_MAX - COOKIES_MAXAGE - 30) > now) {
  ------------------
  |  |  608|      3|#  define TIME_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
                if(co->expires && (TIME_T_MAX - COOKIES_MAXAGE - 30) > now) {
  ------------------
  |  |   45|      3|#define COOKIES_MAXAGE (400 * 24 * 3600)
  ------------------
  |  Branch (54:6): [True: 3, False: 0]
  |  Branch (54:21): [True: 3, False: 0]
  ------------------
   55|      3|    timediff_t cap = now + COOKIES_MAXAGE;
  ------------------
  |  |   45|      3|#define COOKIES_MAXAGE (400 * 24 * 3600)
  ------------------
   56|      3|    if(co->expires > cap) {
  ------------------
  |  Branch (56:8): [True: 0, False: 3]
  ------------------
   57|      0|      cap += 30;
   58|      0|      co->expires = (cap / 60) * 60;
   59|      0|    }
   60|      3|  }
   61|      3|}
cookie.c:parse_expires:
  561|      1|{
  562|       |  /*
  563|       |   * Let max-age have priority.
  564|       |   *
  565|       |   * If the date cannot get parsed for whatever reason, the cookie
  566|       |   * will be treated as a session cookie
  567|       |   */
  568|      1|  if(!co->expires && (curlx_strlen(val) < MAX_DATE_LENGTH)) {
  ------------------
  |  |   50|      1|#define curlx_strlen(x) ((x)->len)
  ------------------
                if(!co->expires && (curlx_strlen(val) < MAX_DATE_LENGTH)) {
  ------------------
  |  |  361|      1|#define MAX_DATE_LENGTH 80
  ------------------
  |  Branch (568:6): [True: 1, False: 0]
  |  Branch (568:22): [True: 1, False: 0]
  ------------------
  569|      1|    char dbuf[MAX_DATE_LENGTH + 1];
  570|      1|    time_t date = 0;
  571|      1|    memcpy(dbuf, curlx_str(val), curlx_strlen(val));
  ------------------
  |  |   49|      1|#define curlx_str(x)    ((x)->str)
  ------------------
                  memcpy(dbuf, curlx_str(val), curlx_strlen(val));
  ------------------
  |  |   50|      1|#define curlx_strlen(x) ((x)->len)
  ------------------
  572|      1|    dbuf[curlx_strlen(val)] = 0;
  ------------------
  |  |   50|      1|#define curlx_strlen(x) ((x)->len)
  ------------------
  573|      1|    if(!Curl_getdate_capped(dbuf, &date)) {
  ------------------
  |  Branch (573:8): [True: 1, False: 0]
  ------------------
  574|      1|      if(!date)
  ------------------
  |  Branch (574:10): [True: 1, False: 0]
  ------------------
  575|      1|        date++;
  576|      1|      co->expires = (curl_off_t)date;
  577|      1|    }
  578|      0|    else
  579|      0|      co->expires = 0;
  580|      1|    if(!*nowp)
  ------------------
  |  Branch (580:8): [True: 1, False: 0]
  ------------------
  581|      1|      *nowp = time(NULL);
  582|      1|    cap_expires(*nowp, co);
  583|      1|  }
  584|      1|}
cookie.c:storecookie:
  372|    515|{
  373|    515|  CURLcode result;
  374|    515|  result = strstore(&co->name, curlx_str(&cp[COOKIE_NAME]),
  ------------------
  |  |   49|    515|#define curlx_str(x)    ((x)->str)
  ------------------
  375|    515|                    curlx_strlen(&cp[COOKIE_NAME]));
  ------------------
  |  |   50|    515|#define curlx_strlen(x) ((x)->len)
  ------------------
  376|    515|  if(!result)
  ------------------
  |  Branch (376:6): [True: 515, False: 0]
  ------------------
  377|    515|    result = strstore(&co->value, curlx_str(&cp[COOKIE_VALUE]),
  ------------------
  |  |   49|    515|#define curlx_str(x)    ((x)->str)
  ------------------
  378|    515|                      curlx_strlen(&cp[COOKIE_VALUE]));
  ------------------
  |  |   50|    515|#define curlx_strlen(x) ((x)->len)
  ------------------
  379|    515|  if(!result) {
  ------------------
  |  Branch (379:6): [True: 515, False: 0]
  ------------------
  380|    515|    size_t plen = 0;
  381|    515|    if(curlx_strlen(&cp[COOKIE_PATH])) {
  ------------------
  |  |   50|    515|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 256, False: 259]
  |  |  ------------------
  ------------------
  382|    256|      path = curlx_str(&cp[COOKIE_PATH]);
  ------------------
  |  |   49|    256|#define curlx_str(x)    ((x)->str)
  ------------------
  383|    256|      plen = curlx_strlen(&cp[COOKIE_PATH]);
  ------------------
  |  |   50|    256|#define curlx_strlen(x) ((x)->len)
  ------------------
  384|    256|    }
  385|    259|    else if(path) {
  ------------------
  |  Branch (385:13): [True: 0, False: 259]
  ------------------
  386|       |      /* No path was given in the header line, set the default */
  387|      0|      const char *endslash = strrchr(path, '/');
  388|      0|      if(endslash)
  ------------------
  |  Branch (388:10): [True: 0, False: 0]
  ------------------
  389|      0|        plen = endslash - path + 1; /* include end slash */
  390|      0|      else
  391|      0|        plen = strlen(path);
  392|      0|    }
  393|       |
  394|    515|    if(path) {
  ------------------
  |  Branch (394:8): [True: 256, False: 259]
  ------------------
  395|    256|      co->path = sanitize_cookie_path(path, plen);
  396|    256|      if(!co->path)
  ------------------
  |  Branch (396:10): [True: 0, False: 256]
  ------------------
  397|      0|        result = CURLE_OUT_OF_MEMORY;
  398|    256|    }
  399|    515|  }
  400|    515|  if(!result) {
  ------------------
  |  Branch (400:6): [True: 515, False: 0]
  ------------------
  401|    515|    if(curlx_strlen(&cp[COOKIE_DOMAIN]))
  ------------------
  |  |   50|    515|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 297, False: 218]
  |  |  ------------------
  ------------------
  402|    297|      result = strstore(&co->domain, curlx_str(&cp[COOKIE_DOMAIN]),
  ------------------
  |  |   49|    297|#define curlx_str(x)    ((x)->str)
  ------------------
  403|    297|                        curlx_strlen(&cp[COOKIE_DOMAIN]));
  ------------------
  |  |   50|    297|#define curlx_strlen(x) ((x)->len)
  ------------------
  404|    218|    else if(domain) {
  ------------------
  |  Branch (404:13): [True: 4, False: 214]
  ------------------
  405|       |      /* no domain was given in the header line, set the default */
  406|      4|      co->domain = curlx_strdup(domain);
  ------------------
  |  | 1470|      4|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  407|      4|      if(!co->domain)
  ------------------
  |  Branch (407:10): [True: 0, False: 4]
  ------------------
  408|      0|        result = CURLE_OUT_OF_MEMORY;
  409|      4|    }
  410|    515|  }
  411|    515|  return result;
  412|    515|}
cookie.c:strstore:
  256|  1.32k|{
  257|  1.32k|  DEBUGASSERT(str);
  ------------------
  |  | 1075|  1.32k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (257:3): [True: 0, False: 1.32k]
  |  Branch (257:3): [True: 1.32k, False: 0]
  ------------------
  258|  1.32k|  *str = curlx_memdup0(newstr, len);
  259|  1.32k|  if(!*str)
  ------------------
  |  Branch (259:6): [True: 0, False: 1.32k]
  ------------------
  260|      0|    return CURLE_OUT_OF_MEMORY;
  261|  1.32k|  return CURLE_OK;
  262|  1.32k|}
cookie.c:sanitize_cookie_path:
  227|  1.15k|{
  228|       |  /* some sites send path attribute within '"'. */
  229|  1.15k|  if(len && (cookie_path[0] == '\"')) {
  ------------------
  |  Branch (229:6): [True: 1.15k, False: 0]
  |  Branch (229:13): [True: 37, False: 1.12k]
  ------------------
  230|     37|    cookie_path++;
  231|     37|    len--;
  232|       |
  233|     37|    if(len && (cookie_path[len - 1] == '\"'))
  ------------------
  |  Branch (233:8): [True: 29, False: 8]
  |  Branch (233:15): [True: 16, False: 13]
  ------------------
  234|     16|      len--;
  235|     37|  }
  236|       |
  237|       |  /* RFC6265 5.2.4 The Path Attribute */
  238|  1.15k|  if(!len || (cookie_path[0] != '/'))
  ------------------
  |  Branch (238:6): [True: 8, False: 1.15k]
  |  Branch (238:14): [True: 212, False: 938]
  ------------------
  239|       |    /* Let cookie-path be the default-path. */
  240|    220|    return curlx_strdup("/");
  ------------------
  |  | 1470|    220|#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|    938|  if(len > 1 && cookie_path[len - 1] == '/')
  ------------------
  |  Branch (244:6): [True: 806, False: 132]
  |  Branch (244:17): [True: 18, False: 788]
  ------------------
  245|     18|    len--;
  246|       |
  247|    938|  return curlx_memdup0(cookie_path, len);
  248|  1.15k|}
cookie.c:parse_netscape:
  672|  6.16k|{
  673|       |  /*
  674|       |   * This line is NOT an HTTP header style line, we do offer support for
  675|       |   * reading the odd netscape cookies-file format here
  676|       |   */
  677|  6.16k|  const char *ptr, *next;
  678|  6.16k|  int fields;
  679|  6.16k|  size_t len;
  680|  6.16k|  *okay = FALSE;
  ------------------
  |  | 1048|  6.16k|#define FALSE false
  ------------------
  681|       |
  682|       |  /*
  683|       |   * In 2008, Internet Explorer introduced HTTP-only cookies to prevent XSS
  684|       |   * attacks. Cookies marked httpOnly are not accessible to JavaScript. In
  685|       |   * Firefox's cookie files, they are prefixed #HttpOnly_ and the rest
  686|       |   * remains as usual, so we skip 10 characters of the line.
  687|       |   */
  688|  6.16k|  if(!strncmp(lineptr, "#HttpOnly_", 10)) {
  ------------------
  |  Branch (688:6): [True: 9, False: 6.15k]
  ------------------
  689|      9|    lineptr += 10;
  690|      9|    co->httponly = TRUE;
  ------------------
  |  | 1045|      9|#define TRUE true
  ------------------
  691|      9|  }
  692|       |
  693|  6.16k|  if(lineptr[0] == '#')
  ------------------
  |  Branch (693:6): [True: 48, False: 6.12k]
  ------------------
  694|       |    /* do not even try the comments */
  695|     48|    return CURLE_OK;
  696|       |
  697|       |  /*
  698|       |   * Now loop through the fields and init the struct we already have
  699|       |   * allocated
  700|       |   */
  701|  6.12k|  fields = 0;
  702|  20.7k|  for(next = lineptr; next; fields++) {
  ------------------
  |  Branch (702:23): [True: 14.6k, False: 6.07k]
  ------------------
  703|  14.6k|    ptr = next;
  704|  14.6k|    len = strcspn(ptr, "\t\r\n");
  705|  14.6k|    next = (ptr[len] == '\t' ? &ptr[len + 1] : NULL);
  ------------------
  |  Branch (705:13): [True: 8.52k, False: 6.10k]
  ------------------
  706|  14.6k|    switch(fields) {
  ------------------
  |  Branch (706:12): [True: 14.3k, False: 297]
  ------------------
  707|  6.12k|    case 0:
  ------------------
  |  Branch (707:5): [True: 6.12k, False: 8.50k]
  ------------------
  708|  6.12k|      if(ptr[0] == '.') { /* skip preceding dots */
  ------------------
  |  Branch (708:10): [True: 692, False: 5.42k]
  ------------------
  709|    692|        ptr++;
  710|    692|        len--;
  711|    692|      }
  712|  6.12k|      co->domain = curlx_memdup0(ptr, len);
  713|  6.12k|      if(!co->domain)
  ------------------
  |  Branch (713:10): [True: 0, False: 6.12k]
  ------------------
  714|      0|        return CURLE_OUT_OF_MEMORY;
  715|  6.12k|      break;
  716|  6.12k|    case 1:
  ------------------
  |  Branch (716:5): [True: 1.67k, False: 12.9k]
  ------------------
  717|       |      /*
  718|       |       * flag: A TRUE/FALSE value indicating if all machines within a given
  719|       |       * domain can access the variable. Set TRUE when the cookie says
  720|       |       * .example.com and to false when the domain is complete www.example.com
  721|       |       */
  722|  1.67k|      co->tailmatch = !!curl_strnequal(ptr, "TRUE", len);
  723|  1.67k|      break;
  724|  1.67k|    case 2:
  ------------------
  |  Branch (724:5): [True: 1.67k, False: 12.9k]
  ------------------
  725|       |      /* The file format allows the path field to remain not filled in */
  726|  1.67k|      if(strncmp("TRUE", ptr, len) && strncmp("FALSE", ptr, len)) {
  ------------------
  |  Branch (726:10): [True: 1.11k, False: 559]
  |  Branch (726:39): [True: 902, False: 214]
  ------------------
  727|       |        /* only if the path does not look like a boolean option! */
  728|    902|        co->path = sanitize_cookie_path(ptr, len);
  729|    902|        if(!co->path)
  ------------------
  |  Branch (729:12): [True: 0, False: 902]
  ------------------
  730|      0|          return CURLE_OUT_OF_MEMORY;
  731|    902|        break;
  732|    902|      }
  733|    773|      else {
  734|       |        /* this does not look like a path, make one up! */
  735|    773|        co->path = curlx_strdup("/");
  ------------------
  |  | 1470|    773|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  736|    773|        if(!co->path)
  ------------------
  |  Branch (736:12): [True: 0, False: 773]
  ------------------
  737|      0|          return CURLE_OUT_OF_MEMORY;
  738|    773|      }
  739|    773|      fields++; /* add a field and fall down to secure */
  740|    773|      FALLTHROUGH();
  ------------------
  |  |  815|    773|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  741|  1.62k|    case 3:
  ------------------
  |  Branch (741:5): [True: 847, False: 13.7k]
  ------------------
  742|  1.62k|      co->secure = FALSE;
  ------------------
  |  | 1048|  1.62k|#define FALSE false
  ------------------
  743|  1.62k|      if(curl_strnequal(ptr, "TRUE", len)) {
  ------------------
  |  Branch (743:10): [True: 620, False: 1.00k]
  ------------------
  744|    620|        if(secure_origin || ci->running)
  ------------------
  |  Branch (744:12): [True: 620, False: 0]
  |  Branch (744:29): [True: 0, False: 0]
  ------------------
  745|    620|          co->secure = TRUE;
  ------------------
  |  | 1045|    620|#define TRUE true
  ------------------
  746|      0|        else
  747|      0|          return CURLE_OK;
  748|    620|      }
  749|  1.62k|      break;
  750|  1.62k|    case 4:
  ------------------
  |  Branch (750:5): [True: 1.59k, False: 13.0k]
  ------------------
  751|  1.59k|      if(curlx_str_number(&ptr, &co->expires, CURL_OFF_T_MAX))
  ------------------
  |  |  588|  1.59k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (751:10): [True: 48, False: 1.54k]
  ------------------
  752|     48|        return CURLE_OK;
  753|  1.54k|      break;
  754|  1.54k|    case 5:
  ------------------
  |  Branch (754:5): [True: 1.53k, False: 13.0k]
  ------------------
  755|  1.53k|      co->name = curlx_memdup0(ptr, len);
  756|  1.53k|      if(!co->name)
  ------------------
  |  Branch (756:10): [True: 0, False: 1.53k]
  ------------------
  757|      0|        return CURLE_OUT_OF_MEMORY;
  758|  1.53k|      else {
  759|       |        /* For Netscape file format cookies we check prefix on the name.
  760|       |           These prefixes are matched case sensitively, same as on the
  761|       |           header path and as the 6265bis document specifies. */
  762|  1.53k|        if(!strncmp("__Secure-", co->name, 9))
  ------------------
  |  Branch (762:12): [True: 23, False: 1.51k]
  ------------------
  763|     23|          co->prefix_secure = TRUE;
  ------------------
  |  | 1045|     23|#define TRUE true
  ------------------
  764|  1.51k|        else if(!strncmp("__Host-", co->name, 7))
  ------------------
  |  Branch (764:17): [True: 50, False: 1.46k]
  ------------------
  765|     50|          co->prefix_host = TRUE;
  ------------------
  |  | 1045|     50|#define TRUE true
  ------------------
  766|  1.53k|      }
  767|  1.53k|      break;
  768|  1.53k|    case 6:
  ------------------
  |  Branch (768:5): [True: 882, False: 13.7k]
  ------------------
  769|    882|      co->value = curlx_memdup0(ptr, len);
  770|    882|      if(!co->value)
  ------------------
  |  Branch (770:10): [True: 0, False: 882]
  ------------------
  771|      0|        return CURLE_OUT_OF_MEMORY;
  772|    882|      break;
  773|  14.6k|    }
  774|  14.6k|  }
  775|  6.07k|  if(fields == 6) {
  ------------------
  |  Branch (775:6): [True: 655, False: 5.41k]
  ------------------
  776|       |    /* we got a cookie with blank contents, fix it */
  777|    655|    co->value = curlx_strdup("");
  ------------------
  |  | 1470|    655|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  778|    655|    if(!co->value)
  ------------------
  |  Branch (778:8): [True: 0, False: 655]
  ------------------
  779|      0|      return CURLE_OUT_OF_MEMORY;
  780|    655|    else
  781|    655|      fields++;
  782|    655|  }
  783|       |
  784|  6.07k|  if(fields != 7)
  ------------------
  |  Branch (784:6): [True: 4.54k, False: 1.52k]
  ------------------
  785|       |    /* we did not find the sufficient number of fields */
  786|  4.54k|    return CURLE_OK;
  787|       |
  788|       |  /* Reject control octets in the name or value, matching the filtering done
  789|       |     for cookies set over HTTP. A cookie loaded from a file is later sent in
  790|       |     request headers, so the same bytes that make a server reject a request
  791|       |     must not slip in through the file. */
  792|  1.52k|  if(invalid_octets(co->name, strlen(co->name)) ||
  ------------------
  |  Branch (792:6): [True: 14, False: 1.50k]
  ------------------
  793|  1.50k|     invalid_octets(co->value, strlen(co->value)))
  ------------------
  |  Branch (793:6): [True: 17, False: 1.49k]
  ------------------
  794|     31|    return CURLE_OK;
  795|       |
  796|  1.49k|  *okay = TRUE;
  ------------------
  |  | 1045|  1.49k|#define TRUE true
  ------------------
  797|  1.49k|  return CURLE_OK;
  798|  1.52k|}
cookie.c:is_public_suffix:
  803|      4|{
  804|       |#ifdef USE_LIBPSL
  805|       |  /*
  806|       |   * Check if the domain is a Public Suffix and if yes, ignore the cookie.
  807|       |   * 'domain' is NULL when the cookie is loaded from file or
  808|       |   * CURLOPT_COOKIELIST.
  809|       |   */
  810|       |  DEBUGASSERT(data);
  811|       |  DEBUGASSERT(co);
  812|       |  DEBUGF(infof(data, "PSL check set-cookie '%s' for domain=%s in %s",
  813|       |               co->name, co->domain ? co->domain : "[blank]",
  814|       |               domain ? domain : "[file]"));
  815|       |  if(!co->domain || Curl_host_is_ipnum(co->domain))
  816|       |    return FALSE;
  817|       |
  818|       |  else {
  819|       |    bool acceptable = FALSE;
  820|       |    char lcase[256];
  821|       |    char lcookie[256];
  822|       |    size_t dlen = domain ? strlen(domain) : 0;
  823|       |    size_t clen = strlen(co->domain);
  824|       |
  825|       |    /* trim trailing dots */
  826|       |    if(dlen && (domain[dlen - 1] == '.'))
  827|       |      dlen--;
  828|       |    if(clen && (co->domain[clen - 1] == '.'))
  829|       |      clen--;
  830|       |
  831|       |    if((dlen < sizeof(lcase)) && (clen < sizeof(lcookie))) {
  832|       |      const psl_ctx_t *psl = Curl_psl_use(data);
  833|       |      if(psl) {
  834|       |        /* the PSL check requires lowercase domain name and pattern */
  835|       |        Curl_strntolower(lcookie, co->domain, clen);
  836|       |        lcookie[clen] = 0;
  837|       |        if(domain) {
  838|       |          Curl_strntolower(lcase, domain, dlen);
  839|       |          lcase[dlen] = 0;
  840|       |          acceptable = psl_is_cookie_domain_acceptable(psl, lcase, lcookie);
  841|       |
  842|       |          /* if the cookie is acceptable, but is set for a PSL domain, then it
  843|       |             cannot be tailmatching */
  844|       |          if(acceptable && co->tailmatch &&
  845|       |             curl_strequal(co->domain, domain) &&
  846|       |             psl_is_public_suffix(psl, lcookie))
  847|       |            co->tailmatch = FALSE;
  848|       |        }
  849|       |        else {
  850|       |          /* libpsl says localhost is a PSL, we think not */
  851|       |          acceptable =
  852|       |            curl_strequal(lcookie, "localhost") ||
  853|       |            /* note that this PSL function returns the opposite value than
  854|       |               psl_is_cookie_domain_acceptable() does */
  855|       |            !psl_is_public_suffix(psl, lcookie);
  856|       |        }
  857|       |        Curl_psl_release(data);
  858|       |      }
  859|       |      else
  860|       |        infof(data, "libpsl problem, rejecting cookie for safety");
  861|       |    }
  862|       |
  863|       |    if(!acceptable) {
  864|       |      infof(data, "cookie '%s' dropped, domain '%s' must not "
  865|       |            "set cookies for '%s'", co->name,
  866|       |            domain ? domain : "[file]", co->domain);
  867|       |      return TRUE;
  868|       |    }
  869|       |  }
  870|       |#else
  871|      4|  (void)data;
  872|      4|  (void)co;
  873|      4|  (void)domain;
  874|      4|  DEBUGF(infof(data, "NO PSL to check set-cookie '%s' for domain=%s in %s",
  ------------------
  |  | 1061|     28|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1061:19): [True: 4, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 4]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [Folded, False: 4]
  |  |  ------------------
  ------------------
  875|      4|               co->name, co->domain, domain ? domain : "[file]"));
  876|      4|#endif
  877|       |  return FALSE;
  ------------------
  |  | 1048|      4|#define FALSE false
  ------------------
  878|      4|}
cookie.c:remove_expired:
  274|  9.52k|{
  275|  9.52k|  struct Cookie *co;
  276|  9.52k|  curl_off_t now = (curl_off_t)time(NULL);
  277|  9.52k|  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|  9.52k|  if(now < ci->next_expiration &&
  ------------------
  |  Branch (287:6): [True: 9.24k, False: 285]
  ------------------
  288|  9.24k|     ci->next_expiration != CURL_OFF_T_MAX)
  ------------------
  |  |  588|  9.24k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (288:6): [True: 889, False: 8.35k]
  ------------------
  289|    889|    return;
  290|  8.63k|  else
  291|  8.63k|    ci->next_expiration = CURL_OFF_T_MAX;
  ------------------
  |  |  588|  8.63k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  292|       |
  293|   552k|  for(i = 0; i < COOKIE_HASH_SIZE; i++) {
  ------------------
  |  |   54|   552k|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (293:14): [True: 544k, False: 8.63k]
  ------------------
  294|   544k|    struct Curl_llist_node *n;
  295|   544k|    struct Curl_llist_node *e = NULL;
  296|       |
  297|   547k|    for(n = Curl_llist_head(&ci->cookielist[i]); n; n = e) {
  ------------------
  |  Branch (297:50): [True: 3.35k, False: 544k]
  ------------------
  298|  3.35k|      co = Curl_node_elem(n);
  299|  3.35k|      e = Curl_node_next(n);
  300|  3.35k|      if(co->expires) {
  ------------------
  |  Branch (300:10): [True: 508, False: 2.84k]
  ------------------
  301|    508|        if(co->expires < now) {
  ------------------
  |  Branch (301:12): [True: 285, False: 223]
  ------------------
  302|    285|          Curl_node_remove(n);
  303|    285|          freecookie(co, TRUE);
  ------------------
  |  | 1045|    285|#define TRUE true
  ------------------
  304|    285|          ci->numcookies--;
  305|    285|        }
  306|    223|        else if(co->expires < ci->next_expiration)
  ------------------
  |  Branch (306:17): [True: 140, False: 83]
  ------------------
  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|    140|          ci->next_expiration = co->expires;
  312|    508|      }
  313|  3.35k|    }
  314|   544k|  }
  315|  8.63k|}
cookie.c:replace_existing:
  886|  1.97k|{
  887|  1.97k|  bool replace_old = FALSE;
  ------------------
  |  | 1048|  1.97k|#define FALSE false
  ------------------
  888|  1.97k|  struct Curl_llist_node *replace_n = NULL;
  889|  1.97k|  struct Curl_llist_node *n;
  890|  1.97k|  size_t myhash = cookiehash(co->domain);
  891|  4.16k|  for(n = Curl_llist_head(&ci->cookielist[myhash]); n; n = Curl_node_next(n)) {
  ------------------
  |  Branch (891:53): [True: 2.19k, False: 1.97k]
  ------------------
  892|  2.19k|    struct Cookie *clist = Curl_node_elem(n);
  893|  2.19k|    if(!strcmp(clist->name, co->name)) {
  ------------------
  |  Branch (893:8): [True: 1.66k, False: 526]
  ------------------
  894|       |      /* the names are identical */
  895|  1.66k|      bool matching_domains = FALSE;
  ------------------
  |  | 1048|  1.66k|#define FALSE false
  ------------------
  896|       |
  897|  1.66k|      if(clist->domain && co->domain) {
  ------------------
  |  Branch (897:10): [True: 1.52k, False: 139]
  |  Branch (897:27): [True: 1.51k, False: 6]
  ------------------
  898|  1.51k|        if(cookie_tailmatch(clist->domain, strlen(clist->domain),
  ------------------
  |  Branch (898:12): [True: 931, False: 588]
  ------------------
  899|  1.51k|                            co->domain) ||
  900|    588|           cookie_tailmatch(co->domain, strlen(co->domain), clist->domain))
  ------------------
  |  Branch (900:12): [True: 67, False: 521]
  ------------------
  901|       |          /* The existing one is a tail of the new or vice versa */
  902|    998|          matching_domains = TRUE;
  ------------------
  |  | 1045|    998|#define TRUE true
  ------------------
  903|  1.51k|      }
  904|    145|      else if(!clist->domain && !co->domain)
  ------------------
  |  Branch (904:15): [True: 139, False: 6]
  |  Branch (904:33): [True: 129, False: 10]
  ------------------
  905|    129|        matching_domains = TRUE;
  ------------------
  |  | 1045|    129|#define TRUE true
  ------------------
  906|       |
  907|  1.66k|      if(matching_domains && /* the domains were identical */
  ------------------
  |  Branch (907:10): [True: 1.12k, False: 537]
  ------------------
  908|  1.12k|         clist->path && co->path && /* both have paths */
  ------------------
  |  Branch (908:10): [True: 1.00k, False: 123]
  |  Branch (908:25): [True: 950, False: 54]
  ------------------
  909|    950|         clist->secure && !co->secure && !secure) {
  ------------------
  |  Branch (909:10): [True: 272, False: 678]
  |  Branch (909:27): [True: 17, False: 255]
  |  Branch (909:42): [True: 0, False: 17]
  ------------------
  910|      0|        size_t cllen;
  911|      0|        const char *sep = NULL;
  912|       |
  913|       |        /*
  914|       |         * A non-secure cookie may not overlay an existing secure cookie.
  915|       |         * For an existing cookie "a" with path "/login", refuse a new
  916|       |         * cookie "a" with for example path "/login/en", while the path
  917|       |         * "/loginhelper" is ok.
  918|       |         */
  919|       |
  920|      0|        DEBUGASSERT(clist->path[0]);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (920:9): [True: 0, False: 0]
  |  Branch (920:9): [True: 0, False: 0]
  ------------------
  921|      0|        if(clist->path[0])
  ------------------
  |  Branch (921:12): [True: 0, False: 0]
  ------------------
  922|      0|          sep = strchr(clist->path + 1, '/');
  923|      0|        if(sep)
  ------------------
  |  Branch (923:12): [True: 0, False: 0]
  ------------------
  924|      0|          cllen = sep - clist->path;
  925|      0|        else
  926|      0|          cllen = strlen(clist->path);
  927|       |
  928|      0|        if(!strncmp(clist->path, co->path, cllen)) {
  ------------------
  |  Branch (928:12): [True: 0, False: 0]
  ------------------
  929|      0|          infof(data, "cookie '%s' for domain '%s' dropped, would "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  930|      0|                "overlay an existing cookie", co->name, co->domain);
  931|      0|          return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  932|      0|        }
  933|      0|      }
  934|  1.66k|    }
  935|       |
  936|  2.19k|    if(!replace_n && !strcmp(clist->name, co->name)) {
  ------------------
  |  Branch (936:8): [True: 2.00k, False: 184]
  |  Branch (936:22): [True: 1.53k, False: 471]
  ------------------
  937|       |      /* the names are identical */
  938|       |
  939|  1.53k|      if(clist->domain && co->domain) {
  ------------------
  |  Branch (939:10): [True: 1.40k, False: 135]
  |  Branch (939:27): [True: 1.39k, False: 6]
  ------------------
  940|  1.39k|        if(curl_strequal(clist->domain, co->domain) &&
  ------------------
  |  Branch (940:12): [True: 847, False: 547]
  ------------------
  941|    847|           (clist->tailmatch == co->tailmatch))
  ------------------
  |  Branch (941:12): [True: 789, False: 58]
  ------------------
  942|       |          /* The domains are identical */
  943|    789|          replace_old = TRUE;
  ------------------
  |  | 1045|    789|#define TRUE true
  ------------------
  944|  1.39k|      }
  945|    141|      else if(!clist->domain && !co->domain)
  ------------------
  |  Branch (945:15): [True: 135, False: 6]
  |  Branch (945:33): [True: 125, False: 10]
  ------------------
  946|    125|        replace_old = TRUE;
  ------------------
  |  | 1045|    125|#define TRUE true
  ------------------
  947|       |
  948|  1.53k|      if(replace_old) {
  ------------------
  |  Branch (948:10): [True: 914, False: 621]
  ------------------
  949|       |        /* the domains were identical */
  950|       |
  951|    914|        if(clist->path && co->path &&
  ------------------
  |  Branch (951:12): [True: 792, False: 122]
  |  Branch (951:27): [True: 742, False: 50]
  ------------------
  952|    742|           strcmp(clist->path, co->path))
  ------------------
  |  Branch (952:12): [True: 275, False: 467]
  ------------------
  953|    275|          replace_old = FALSE;
  ------------------
  |  | 1048|    275|#define FALSE false
  ------------------
  954|    639|        else if(!clist->path != !co->path)
  ------------------
  |  Branch (954:17): [True: 60, False: 579]
  ------------------
  955|     60|          replace_old = FALSE;
  ------------------
  |  | 1048|     60|#define FALSE false
  ------------------
  956|    914|      }
  957|       |
  958|  1.53k|      if(replace_old && !co->livecookie && clist->livecookie) {
  ------------------
  |  Branch (958:10): [True: 579, False: 956]
  |  Branch (958:25): [True: 549, False: 30]
  |  Branch (958:44): [True: 0, False: 549]
  ------------------
  959|       |        /*
  960|       |         * Both cookies matched fine, except that the already present cookie
  961|       |         * is "live", which means it was set from a header, while the new one
  962|       |         * was read from a file and thus is not "live". "live" cookies are
  963|       |         * preferred so the new cookie is freed.
  964|       |         */
  965|      0|        return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  966|      0|      }
  967|  1.53k|      if(replace_old)
  ------------------
  |  Branch (967:10): [True: 579, False: 956]
  ------------------
  968|    579|        replace_n = n;
  969|  1.53k|    }
  970|  2.19k|  }
  971|  1.97k|  if(replace_n) {
  ------------------
  |  Branch (971:6): [True: 579, False: 1.39k]
  ------------------
  972|    579|    struct Cookie *repl = Curl_node_elem(replace_n);
  973|       |
  974|       |    /* when replacing, creationtime is kept from old */
  975|    579|    co->creationtime = repl->creationtime;
  976|       |
  977|       |    /* unlink the old */
  978|    579|    Curl_node_remove(replace_n);
  979|       |
  980|       |    /* free the old cookie */
  981|    579|    freecookie(repl, TRUE);
  ------------------
  |  | 1045|    579|#define TRUE true
  ------------------
  982|    579|  }
  983|  1.97k|  *replacep = replace_old;
  984|       |  return TRUE;
  ------------------
  |  | 1045|  1.97k|#define TRUE true
  ------------------
  985|  1.97k|}
cookie.c:cookiehash:
  212|  7.55k|{
  213|  7.55k|  const char *top;
  214|  7.55k|  size_t len;
  215|       |
  216|  7.55k|  if(!domain || Curl_host_is_ipnum(domain))
  ------------------
  |  Branch (216:6): [True: 404, False: 7.14k]
  |  Branch (216:17): [True: 21, False: 7.12k]
  ------------------
  217|    425|    return 0;
  218|       |
  219|  7.12k|  top = get_top_domain(domain, &len);
  220|  7.12k|  return cookie_hash_domain(top, len);
  221|  7.55k|}
cookie.c:get_top_domain:
  162|  7.12k|{
  163|  7.12k|  size_t len = 0;
  164|  7.12k|  const char *first = NULL, *last;
  165|       |
  166|  7.12k|  if(domain) {
  ------------------
  |  Branch (166:6): [True: 7.12k, False: 0]
  ------------------
  167|  7.12k|    len = strlen(domain);
  168|  7.12k|    last = memrchr(domain, '.', len);
  169|  7.12k|    if(last) {
  ------------------
  |  Branch (169:8): [True: 5.82k, False: 1.30k]
  ------------------
  170|  5.82k|      first = memrchr(domain, '.', (last - domain));
  171|  5.82k|      if(first)
  ------------------
  |  Branch (171:10): [True: 528, False: 5.29k]
  ------------------
  172|    528|        len -= (++first - domain);
  173|  5.82k|    }
  174|  7.12k|  }
  175|       |
  176|  7.12k|  if(outlen)
  ------------------
  |  Branch (176:6): [True: 7.12k, False: 0]
  ------------------
  177|  7.12k|    *outlen = len;
  178|       |
  179|  7.12k|  return first ? first : domain;
  ------------------
  |  Branch (179:10): [True: 528, False: 6.59k]
  ------------------
  180|  7.12k|}
cookie.c:cookie_hash_domain:
  191|  7.12k|{
  192|  7.12k|  const char *end = domain + len;
  193|  7.12k|  size_t h = 5381;
  194|       |
  195|  62.5k|  while(domain < end) {
  ------------------
  |  Branch (195:9): [True: 55.4k, False: 7.12k]
  ------------------
  196|  55.4k|    size_t j = (size_t)Curl_raw_toupper(*domain++);
  197|  55.4k|    h += h << 5;
  198|  55.4k|    h ^= j;
  199|  55.4k|  }
  200|       |
  201|  7.12k|  return (h % COOKIE_HASH_SIZE);
  ------------------
  |  |   54|  7.12k|#define COOKIE_HASH_SIZE 63
  ------------------
  202|  7.12k|}
cookie.c:freecookie:
   64|  6.80k|{
   65|  6.80k|  curlx_free(co->domain);
  ------------------
  |  | 1476|  6.80k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   66|  6.80k|  curlx_free(co->path);
  ------------------
  |  | 1476|  6.80k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   67|  6.80k|  curlx_free(co->name);
  ------------------
  |  | 1476|  6.80k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   68|  6.80k|  curlx_free(co->value);
  ------------------
  |  | 1476|  6.80k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   69|  6.80k|  if(maintoo)
  ------------------
  |  Branch (69:6): [True: 1.97k, False: 4.82k]
  ------------------
   70|  1.97k|    curlx_free(co);
  ------------------
  |  | 1476|  1.97k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   71|  6.80k|}
cookie.c:cookie_load:
 1149|  3.76k|{
 1150|  3.76k|  FILE *handle = NULL;
 1151|  3.76k|  CURLcode result = CURLE_OK;
 1152|  3.76k|  FILE *fp = NULL;
 1153|  3.76k|  DEBUGASSERT(ci);
  ------------------
  |  | 1075|  3.76k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1153:3): [True: 0, False: 3.76k]
  |  Branch (1153:3): [True: 3.76k, False: 0]
  ------------------
 1154|  3.76k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  3.76k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1154:3): [True: 0, False: 3.76k]
  |  Branch (1154:3): [True: 3.76k, False: 0]
  ------------------
 1155|  3.76k|  DEBUGASSERT(file);
  ------------------
  |  | 1075|  3.76k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1155:3): [True: 0, False: 3.76k]
  |  Branch (1155:3): [True: 3.76k, False: 0]
  ------------------
 1156|       |
 1157|  3.76k|  ci->newsession = !!(flags & COOKIE_NOSESSION); /* new session? */
  ------------------
  |  |  118|  3.76k|#define COOKIE_NOSESSION  (1<<6) /* drop session cookies */
  ------------------
 1158|  3.76k|  ci->running = FALSE; /* this is not running, this is init */
  ------------------
  |  | 1048|  3.76k|#define FALSE false
  ------------------
 1159|       |
 1160|  3.76k|  if(file && *file) {
  ------------------
  |  Branch (1160:6): [True: 3.76k, False: 0]
  |  Branch (1160:14): [True: 3.76k, False: 0]
  ------------------
 1161|  3.76k|    if(!strcmp(file, "-"))
  ------------------
  |  Branch (1161:8): [True: 0, False: 3.76k]
  ------------------
 1162|      0|      fp = stdin;
 1163|  3.76k|    else {
 1164|  3.76k|      fp = curlx_fopen(file, "rb");
  ------------------
  |  |   76|  3.76k|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
 1165|  3.76k|      if(!fp)
  ------------------
  |  Branch (1165:10): [True: 0, False: 3.76k]
  ------------------
 1166|      0|        infof(data, "WARNING: failed to open cookie file \"%s\"", file);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1167|  3.76k|      else {
 1168|  3.76k|        curlx_struct_stat stat;
  ------------------
  |  |   65|  3.76k|#define curlx_struct_stat       struct stat
  ------------------
 1169|  3.76k|        if((curlx_fstat(fileno(fp), &stat) != -1) && S_ISDIR(stat.st_mode)) {
  ------------------
  |  |   64|  3.76k|#define curlx_fstat             fstat
  ------------------
  |  Branch (1169:12): [True: 3.76k, False: 0]
  |  Branch (1169:54): [True: 0, False: 3.76k]
  ------------------
 1170|      0|          curlx_fclose(fp);
  ------------------
  |  |   81|      0|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
 1171|      0|          fp = NULL;
 1172|      0|          infof(data, "WARNING: cookie filename points to a directory: \"%s\"",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1173|      0|                file);
 1174|      0|        }
 1175|  3.76k|        else
 1176|  3.76k|          handle = fp;
 1177|  3.76k|      }
 1178|  3.76k|    }
 1179|  3.76k|  }
 1180|       |
 1181|  3.76k|  if(fp) {
  ------------------
  |  Branch (1181:6): [True: 3.76k, False: 0]
  ------------------
 1182|  3.76k|    struct dynbuf buf;
 1183|  3.76k|    bool eof = FALSE;
  ------------------
  |  | 1048|  3.76k|#define FALSE false
  ------------------
 1184|  3.76k|    curlx_dyn_init(&buf, MAX_COOKIE_LINE);
  ------------------
  |  |   81|  3.76k|#define MAX_COOKIE_LINE 5000
  ------------------
 1185|  3.76k|    do {
 1186|  3.76k|      result = Curl_get_line(&buf, fp, &eof);
 1187|  3.76k|      if(!result) {
  ------------------
  |  Branch (1187:10): [True: 3.76k, False: 0]
  ------------------
 1188|  3.76k|        const char *lineptr = curlx_dyn_ptr(&buf);
 1189|  3.76k|        bool headerline = FALSE;
  ------------------
  |  | 1048|  3.76k|#define FALSE false
  ------------------
 1190|  3.76k|        if(checkprefix("Set-Cookie:", lineptr)) {
  ------------------
  |  |   49|  3.76k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|  3.76k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1292|  3.76k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (49:27): [True: 0, False: 3.76k]
  |  |  ------------------
  ------------------
 1191|       |          /* This is a cookie line, get it! */
 1192|      0|          lineptr += 11;
 1193|      0|          headerline = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1194|      0|          curlx_str_passblanks(&lineptr);
 1195|      0|        }
 1196|       |
 1197|  3.76k|        result = Curl_cookie_add(data, ci, lineptr, NULL, NULL,
 1198|  3.76k|                                 (headerline ? COOKIE_HTTPHEADER : 0) |
  ------------------
  |  |  114|      0|#define COOKIE_HTTPHEADER (1<<0) /* if HTTP header-style line */
  ------------------
  |  Branch (1198:35): [True: 0, False: 3.76k]
  ------------------
 1199|  3.76k|                                 COOKIE_NOEXPIRE | COOKIE_SECURE |
  ------------------
  |  |  115|  3.76k|#define COOKIE_NOEXPIRE   (1<<1) /* skip remove_expired() */
  ------------------
                                               COOKIE_NOEXPIRE | COOKIE_SECURE |
  ------------------
  |  |  116|  3.76k|#define COOKIE_SECURE     (1<<2) /* connection is over secure origin */
  ------------------
 1200|  3.76k|                                 (flags & COOKIE_NOPSL));
  ------------------
  |  |  117|  3.76k|#define COOKIE_NOPSL      (1<<3) /* skip PSL check */
  ------------------
 1201|       |        /* File reading cookie failures are not propagated back to the
 1202|       |           caller because there is no way to do that */
 1203|  3.76k|      }
 1204|  3.76k|    } while(!result && !eof);
  ------------------
  |  Branch (1204:13): [True: 3.76k, False: 0]
  |  Branch (1204:24): [True: 0, False: 3.76k]
  ------------------
 1205|  3.76k|    curlx_dyn_free(&buf); /* free the line buffer */
 1206|       |
 1207|       |    /*
 1208|       |     * Remove expired cookies from the hash. We must make sure to run this
 1209|       |     * after reading the file, and not on every cookie.
 1210|       |     */
 1211|  3.76k|    remove_expired(ci);
 1212|       |
 1213|  3.76k|    if(handle)
  ------------------
  |  Branch (1213:8): [True: 3.76k, False: 0]
  ------------------
 1214|  3.76k|      curlx_fclose(handle);
  ------------------
  |  |   81|  3.76k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
 1215|  3.76k|  }
 1216|  3.76k|  data->state.cookie_engine = TRUE;
  ------------------
  |  | 1045|  3.76k|#define TRUE true
  ------------------
 1217|  3.76k|  ci->running = TRUE; /* now, we are running */
  ------------------
  |  | 1045|  3.76k|#define TRUE true
  ------------------
 1218|       |
 1219|  3.76k|  return result;
 1220|  3.76k|}
cookie.c:cookie_tailmatch:
   76|  2.15k|{
   77|  2.15k|  size_t hostname_len = strlen(hostname);
   78|       |
   79|  2.15k|  if(hostname_len < cookie_domain_len)
  ------------------
  |  Branch (79:6): [True: 584, False: 1.56k]
  ------------------
   80|    584|    return FALSE;
  ------------------
  |  | 1048|    584|#define FALSE false
  ------------------
   81|       |
   82|  1.56k|  if(!curl_strnequal(cookie_domain,
  ------------------
  |  Branch (82:6): [True: 256, False: 1.31k]
  ------------------
   83|  1.56k|                     hostname + hostname_len - cookie_domain_len,
   84|  1.56k|                     cookie_domain_len))
   85|    256|    return FALSE;
  ------------------
  |  | 1048|    256|#define FALSE false
  ------------------
   86|       |
   87|       |  /*
   88|       |   * A lead char of cookie_domain is not '.'.
   89|       |   * RFC6265 4.1.2.3. The Domain Attribute says:
   90|       |   * For example, if the value of the Domain attribute is
   91|       |   * "example.com", the user agent will include the cookie in the Cookie
   92|       |   * header when making HTTP requests to example.com, www.example.com, and
   93|       |   * www.corp.example.com.
   94|       |   */
   95|  1.31k|  if(hostname_len == cookie_domain_len)
  ------------------
  |  Branch (95:6): [True: 882, False: 431]
  ------------------
   96|    882|    return TRUE;
  ------------------
  |  | 1045|    882|#define TRUE true
  ------------------
   97|    431|  if('.' == *(hostname + hostname_len - cookie_domain_len - 1))
  ------------------
  |  Branch (97:6): [True: 116, False: 315]
  ------------------
   98|    116|    return TRUE;
  ------------------
  |  | 1045|    116|#define TRUE true
  ------------------
   99|    315|  return FALSE;
  ------------------
  |  | 1048|    315|#define FALSE false
  ------------------
  100|    431|}
cookie.c:get_netscape_format:
 1494|  1.25k|{
 1495|  1.25k|  return curl_maprintf(
 1496|  1.25k|    "%s"               /* httponly preamble */
 1497|  1.25k|    "%s%s\t"           /* domain */
 1498|  1.25k|    "%s\t"             /* tailmatch */
 1499|  1.25k|    "%s\t"             /* path */
 1500|  1.25k|    "%s\t"             /* secure */
 1501|  1.25k|    "%" FMT_OFF_T "\t" /* expires */
 1502|  1.25k|    "%s\t"             /* name */
 1503|  1.25k|    "%s",              /* value */
 1504|  1.25k|    co->httponly ? "#HttpOnly_" : "",
  ------------------
  |  Branch (1504:5): [True: 1, False: 1.24k]
  ------------------
 1505|       |    /*
 1506|       |     * Make sure all domains are prefixed with a dot if they allow
 1507|       |     * tailmatching. This is Mozilla-style.
 1508|       |     */
 1509|  1.25k|    (co->tailmatch && co->domain && co->domain[0] != '.') ? "." : "",
  ------------------
  |  Branch (1509:6): [True: 611, False: 639]
  |  Branch (1509:23): [True: 611, False: 0]
  |  Branch (1509:37): [True: 609, False: 2]
  ------------------
 1510|  1.25k|    co->domain ? co->domain : "unknown",
  ------------------
  |  Branch (1510:5): [True: 1.25k, False: 0]
  ------------------
 1511|  1.25k|    co->tailmatch ? "TRUE" : "FALSE",
  ------------------
  |  Branch (1511:5): [True: 611, False: 639]
  ------------------
 1512|  1.25k|    co->path ? co->path : "/",
  ------------------
  |  Branch (1512:5): [True: 1.18k, False: 62]
  ------------------
 1513|  1.25k|    co->secure ? "TRUE" : "FALSE",
  ------------------
  |  Branch (1513:5): [True: 414, False: 836]
  ------------------
 1514|  1.25k|    co->expires,
 1515|  1.25k|    co->name,
 1516|  1.25k|    co->value ? co->value : "");
  ------------------
  |  Branch (1516:5): [True: 1.25k, False: 0]
  ------------------
 1517|  1.25k|}
cookie.c:cookie_output:
 1530|  3.77k|{
 1531|  3.77k|  FILE *out = NULL;
 1532|  3.77k|  bool use_stdout = FALSE;
  ------------------
  |  | 1048|  3.77k|#define FALSE false
  ------------------
 1533|  3.77k|  char *tempstore = NULL;
 1534|  3.77k|  CURLcode result = CURLE_OK;
 1535|       |
 1536|  3.77k|  if(!ci)
  ------------------
  |  Branch (1536:6): [True: 0, False: 3.77k]
  ------------------
 1537|       |    /* no cookie engine alive */
 1538|      0|    return CURLE_OK;
 1539|       |
 1540|       |  /* at first, remove expired cookies */
 1541|  3.77k|  remove_expired(ci);
 1542|       |
 1543|  3.77k|  if(!strcmp("-", filename)) {
  ------------------
  |  Branch (1543:6): [True: 0, False: 3.77k]
  ------------------
 1544|       |    /* use stdout */
 1545|      0|    out = stdout;
 1546|      0|    use_stdout = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1547|      0|  }
 1548|  3.77k|  else {
 1549|  3.77k|    result = Curl_fopen(data, filename, &out, &tempstore);
 1550|  3.77k|    if(result)
  ------------------
  |  Branch (1550:8): [True: 0, False: 3.77k]
  ------------------
 1551|      0|      goto error;
 1552|  3.77k|  }
 1553|       |
 1554|  3.77k|  fputs("# Netscape HTTP Cookie File\n"
 1555|  3.77k|        "# https://curl.se/docs/http-cookies.html\n"
 1556|  3.77k|        "# This file was generated by libcurl! Edit at your own risk.\n\n",
 1557|  3.77k|        out);
 1558|       |
 1559|  3.77k|  if(ci->numcookies) {
  ------------------
  |  Branch (1559:6): [True: 636, False: 3.14k]
  ------------------
 1560|    636|    unsigned int i;
 1561|    636|    size_t nvalid = 0;
 1562|    636|    struct Cookie **array;
 1563|    636|    struct Curl_llist_node *n;
 1564|       |
 1565|    636|    array = curlx_calloc(1, sizeof(struct Cookie *) * ci->numcookies);
  ------------------
  |  | 1473|    636|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1566|    636|    if(!array) {
  ------------------
  |  Branch (1566:8): [True: 0, False: 636]
  ------------------
 1567|      0|      result = CURLE_OUT_OF_MEMORY;
 1568|      0|      goto error;
 1569|      0|    }
 1570|       |
 1571|       |    /* only sort the cookies with a domain property */
 1572|  40.7k|    for(i = 0; i < COOKIE_HASH_SIZE; i++) {
  ------------------
  |  |   54|  40.7k|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (1572:16): [True: 40.0k, False: 636]
  ------------------
 1573|  41.4k|      for(n = Curl_llist_head(&ci->cookielist[i]); n; n = Curl_node_next(n)) {
  ------------------
  |  Branch (1573:52): [True: 1.39k, False: 40.0k]
  ------------------
 1574|  1.39k|        struct Cookie *co = Curl_node_elem(n);
 1575|  1.39k|        if(!co->domain)
  ------------------
  |  Branch (1575:12): [True: 147, False: 1.25k]
  ------------------
 1576|    147|          continue;
 1577|  1.25k|        array[nvalid++] = co;
 1578|  1.25k|      }
 1579|  40.0k|    }
 1580|       |
 1581|    636|    qsort(array, nvalid, sizeof(struct Cookie *), cookie_sort_ct);
 1582|       |
 1583|  1.88k|    for(i = 0; i < nvalid; i++) {
  ------------------
  |  Branch (1583:16): [True: 1.25k, False: 636]
  ------------------
 1584|  1.25k|      char *format_ptr = get_netscape_format(array[i]);
 1585|  1.25k|      if(!format_ptr) {
  ------------------
  |  Branch (1585:10): [True: 0, False: 1.25k]
  ------------------
 1586|      0|        curlx_free(array);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1587|      0|        result = CURLE_OUT_OF_MEMORY;
 1588|      0|        goto error;
 1589|      0|      }
 1590|  1.25k|      curl_mfprintf(out, "%s\n", format_ptr);
 1591|  1.25k|      curlx_free(format_ptr);
  ------------------
  |  | 1476|  1.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1592|  1.25k|    }
 1593|       |
 1594|    636|    curlx_free(array);
  ------------------
  |  | 1476|    636|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1595|    636|  }
 1596|       |
 1597|  3.77k|  if(!use_stdout) {
  ------------------
  |  Branch (1597:6): [True: 3.77k, False: 0]
  ------------------
 1598|  3.77k|    curlx_fclose(out);
  ------------------
  |  |   81|  3.77k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
 1599|  3.77k|    out = NULL;
 1600|  3.77k|    if(tempstore && curlx_rename(tempstore, filename)) {
  ------------------
  |  |   72|      0|#define curlx_rename            rename
  ------------------
  |  Branch (1600:8): [True: 0, False: 3.77k]
  |  Branch (1600:21): [True: 0, False: 0]
  ------------------
 1601|      0|      result = CURLE_WRITE_ERROR;
 1602|      0|      goto error;
 1603|      0|    }
 1604|  3.77k|  }
 1605|       |
 1606|       |  /*
 1607|       |   * If we reach here we have successfully written a cookie file so there is
 1608|       |   * no need to inspect the error, any error case should have jumped into the
 1609|       |   * error block below.
 1610|       |   */
 1611|  3.77k|  curlx_free(tempstore);
  ------------------
  |  | 1476|  3.77k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1612|  3.77k|  return CURLE_OK;
 1613|       |
 1614|      0|error:
 1615|      0|  if(out && !use_stdout)
  ------------------
  |  Branch (1615:6): [True: 0, False: 0]
  |  Branch (1615:13): [True: 0, False: 0]
  ------------------
 1616|      0|    curlx_fclose(out);
  ------------------
  |  |   81|      0|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
 1617|      0|  if(tempstore) {
  ------------------
  |  Branch (1617:6): [True: 0, False: 0]
  ------------------
 1618|      0|    unlink(tempstore);
 1619|      0|    curlx_free(tempstore);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1620|      0|  }
 1621|      0|  return result;
 1622|  3.77k|}
cookie.c:cookie_sort_ct:
 1295|  1.06k|{
 1296|  1.06k|  const struct Cookie *c1 = *(const struct Cookie * const *)p1;
 1297|  1.06k|  const struct Cookie *c2 = *(const struct Cookie * const *)p2;
 1298|       |
 1299|  1.06k|  return (c2->creationtime > c1->creationtime) ? 1 : -1;
  ------------------
  |  Branch (1299:10): [True: 807, False: 255]
  ------------------
 1300|  1.06k|}

Curl_creds_create:
   41|  3.83k|{
   42|  3.83k|  struct Curl_creds *creds = NULL;
   43|  3.83k|  size_t ulen = user ? strlen(user) : 0;
  ------------------
  |  Branch (43:17): [True: 324, False: 3.51k]
  ------------------
   44|  3.83k|  size_t plen = passwd ? strlen(passwd) : 0;
  ------------------
  |  Branch (44:17): [True: 267, False: 3.56k]
  ------------------
   45|  3.83k|  size_t olen = oauth_bearer ? strlen(oauth_bearer) : 0;
  ------------------
  |  Branch (45:17): [True: 240, False: 3.59k]
  ------------------
   46|  3.83k|  size_t salen = sasl_authzid ? strlen(sasl_authzid) : 0;
  ------------------
  |  Branch (46:18): [True: 182, False: 3.65k]
  ------------------
   47|  3.83k|  size_t sslen = sasl_service ? strlen(sasl_service) : 0;
  ------------------
  |  Branch (47:18): [True: 182, False: 3.65k]
  ------------------
   48|  3.83k|  char *s, *buf;
   49|  3.83k|  size_t bufsize;
   50|  3.83k|  CURLcode result = CURLE_OK;
   51|       |
   52|  3.83k|  Curl_creds_unlink(pcreds);
   53|       |
   54|       |  /* Everything empty/NULL, this is the NULL credential */
   55|  3.83k|  if(!user && !passwd && !olen && !salen && !sslen)
  ------------------
  |  Branch (55:6): [True: 3.51k, False: 324]
  |  Branch (55:15): [True: 3.45k, False: 58]
  |  Branch (55:26): [True: 3.43k, False: 19]
  |  Branch (55:35): [True: 3.43k, False: 0]
  |  Branch (55:45): [True: 3.43k, False: 0]
  ------------------
   56|  3.43k|    goto out;
   57|       |
   58|    401|  if((ulen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|    401|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (58:6): [True: 0, False: 401]
  ------------------
   59|    401|     (plen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|    401|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (59:6): [True: 0, False: 401]
  ------------------
   60|    401|     (olen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|    401|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (60:6): [True: 0, False: 401]
  ------------------
   61|    401|     (salen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|    401|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (61:6): [True: 0, False: 401]
  ------------------
   62|    401|     (sslen > CURL_MAX_INPUT_LENGTH)) {
  ------------------
  |  |   45|    401|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (62:6): [True: 0, False: 401]
  ------------------
   63|      0|    result = CURLE_BAD_FUNCTION_ARGUMENT;
   64|      0|    goto out;
   65|      0|  }
   66|       |
   67|       |  /* null-terminator for user already part of struct */
   68|    401|  bufsize = ulen + plen + 1 + olen + 1 + salen + 1 + sslen + 1;
   69|    401|  creds = curlx_calloc(1, sizeof(*creds) + bufsize);
  ------------------
  |  | 1473|    401|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   70|    401|  if(!creds) {
  ------------------
  |  Branch (70:6): [True: 0, False: 401]
  ------------------
   71|      0|    result = CURLE_OUT_OF_MEMORY;
   72|      0|    goto out;
   73|      0|  }
   74|       |
   75|    401|  creds->bufsize = bufsize;
   76|    401|  creds->refcount = 1;
   77|    401|  creds->source = source;
   78|       |  /* Some compilers try to be too smart about our dynamic struct size */
   79|    401|  buf = ((char *)creds) + offsetof(struct Curl_creds, buf);
   80|    401|  creds->user = s = buf;
   81|    401|  if(ulen)
  ------------------
  |  Branch (81:6): [True: 37, False: 364]
  ------------------
   82|     37|    memcpy(s, user, ulen + 1);
   83|    401|  creds->passwd = s = buf + ulen + 1;
   84|    401|  if(plen)
  ------------------
  |  Branch (84:6): [True: 46, False: 355]
  ------------------
   85|     46|    memcpy(s, passwd, plen + 1);
   86|    401|  creds->oauth_bearer = s = buf + ulen + 1 + plen + 1;
   87|    401|  if(olen)
  ------------------
  |  Branch (87:6): [True: 45, False: 356]
  ------------------
   88|     45|    memcpy(s, oauth_bearer, olen + 1);
   89|    401|  creds->sasl_authzid = s = buf + ulen + 1 + plen + 1 + olen + 1;
   90|    401|  if(salen)
  ------------------
  |  Branch (90:6): [True: 0, False: 401]
  ------------------
   91|      0|    memcpy(s, sasl_authzid, salen + 1);
   92|    401|  creds->sasl_service = s = buf + ulen + 1 + plen + 1 + olen + 1 + salen + 1;
   93|    401|  if(sslen)
  ------------------
  |  Branch (93:6): [True: 0, False: 401]
  ------------------
   94|      0|    memcpy(s, sasl_service, sslen + 1);
   95|       |
   96|  3.83k|out:
   97|  3.83k|  if(!result)
  ------------------
  |  Branch (97:6): [True: 3.83k, False: 0]
  ------------------
   98|  3.83k|    *pcreds = creds;
   99|      0|  else
  100|      0|    Curl_creds_unlink(&creds);
  101|  3.83k|  return result;
  102|    401|}
Curl_creds_merge:
  109|  3.59k|{
  110|  3.59k|  struct Curl_creds *creds_out = NULL;
  111|  3.59k|  CURLcode result;
  112|       |
  113|  3.59k|  if(!creds_in) {
  ------------------
  |  Branch (113:6): [True: 3.41k, False: 182]
  ------------------
  114|  3.41k|    result = Curl_creds_create(user, passwd, NULL, NULL, NULL,
  115|  3.41k|                               source, &creds_out);
  116|  3.41k|  }
  117|    182|  else {
  118|    182|    result = Curl_creds_create(user ? user : Curl_creds_user(creds_in),
  ------------------
  |  |   81|    182|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (81:43): [True: 182, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (118:32): [True: 0, False: 182]
  ------------------
  119|    182|                               passwd ? passwd : Curl_creds_passwd(creds_in),
  ------------------
  |  |   82|    182|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (82:43): [True: 182, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (119:32): [True: 0, False: 182]
  ------------------
  120|    182|                               Curl_creds_oauth_bearer(creds_in),
  ------------------
  |  |   83|    182|#define Curl_creds_oauth_bearer(c)       ((c) ? (c)->oauth_bearer : "")
  |  |  ------------------
  |  |  |  Branch (83:43): [True: 182, False: 0]
  |  |  ------------------
  ------------------
  121|    182|                               Curl_creds_sasl_authzid(creds_in),
  ------------------
  |  |   84|    182|#define Curl_creds_sasl_authzid(c)       ((c) ? (c)->sasl_authzid : "")
  |  |  ------------------
  |  |  |  Branch (84:43): [True: 182, False: 0]
  |  |  ------------------
  ------------------
  122|    182|                               Curl_creds_sasl_service(creds_in),
  ------------------
  |  |   85|    182|#define Curl_creds_sasl_service(c)       ((c) ? (c)->sasl_service : "")
  |  |  ------------------
  |  |  |  Branch (85:43): [True: 182, False: 0]
  |  |  ------------------
  ------------------
  123|    182|                               source, &creds_out);
  124|    182|  }
  125|  3.59k|  Curl_creds_link(pcreds_out, creds_out);
  126|  3.59k|  Curl_creds_unlink(&creds_out);
  127|  3.59k|  return result;
  128|  3.59k|}
Curl_creds_link:
  131|  3.81k|{
  132|  3.81k|  if(*pdest != src) {
  ------------------
  |  Branch (132:6): [True: 402, False: 3.41k]
  ------------------
  133|    402|    Curl_creds_unlink(pdest);
  134|    402|    *pdest = src;
  135|    402|    if(src) {
  ------------------
  |  Branch (135:8): [True: 402, False: 0]
  ------------------
  136|    402|      DEBUGASSERT(src->refcount < UINT32_MAX);
  ------------------
  |  | 1075|    402|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (136:7): [True: 0, False: 402]
  |  Branch (136:7): [True: 402, False: 0]
  ------------------
  137|    402|      src->refcount++;
  138|    402|    }
  139|    402|  }
  140|  3.81k|}
Curl_creds_unlink:
  143|  52.1k|{
  144|  52.1k|  if(*pcreds) {
  ------------------
  |  Branch (144:6): [True: 803, False: 51.3k]
  ------------------
  145|    803|    struct Curl_creds *creds = *pcreds;
  146|       |
  147|    803|    DEBUGASSERT(creds->refcount);
  ------------------
  |  | 1075|    803|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (147:5): [True: 0, False: 803]
  |  Branch (147:5): [True: 803, False: 0]
  ------------------
  148|    803|    *pcreds = NULL;
  149|    803|    if(creds->refcount)
  ------------------
  |  Branch (149:8): [True: 803, False: 0]
  ------------------
  150|    803|      creds->refcount--;
  151|    803|    if(!creds->refcount) {
  ------------------
  |  Branch (151:8): [True: 401, False: 402]
  ------------------
  152|    401|      curlx_memzero(creds, sizeof(*creds) + creds->bufsize);
  153|    401|      curlx_free(creds);
  ------------------
  |  | 1476|    401|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  154|    401|    }
  155|    803|  }
  156|  52.1k|}
Curl_creds_same:
  159|  3.62k|{
  160|  3.62k|  return (c1 == c2) ||
  ------------------
  |  Branch (160:10): [True: 3.41k, False: 219]
  ------------------
  161|    219|         (c1 && c2 &&
  ------------------
  |  Branch (161:11): [True: 0, False: 219]
  |  Branch (161:17): [True: 0, False: 0]
  ------------------
  162|      0|          !Curl_timestrcmp(c1->user, c2->user) &&
  ------------------
  |  Branch (162:11): [True: 0, False: 0]
  ------------------
  163|      0|          !Curl_timestrcmp(c1->passwd, c2->passwd) &&
  ------------------
  |  Branch (163:11): [True: 0, False: 0]
  ------------------
  164|      0|          !Curl_timestrcmp(c1->oauth_bearer, c2->oauth_bearer) &&
  ------------------
  |  Branch (164:11): [True: 0, False: 0]
  ------------------
  165|      0|          !Curl_timestrcmp(c1->sasl_authzid, c2->sasl_authzid) &&
  ------------------
  |  Branch (165:11): [True: 0, False: 0]
  ------------------
  166|      0|          !Curl_timestrcmp(c1->sasl_service, c2->sasl_service));
  ------------------
  |  Branch (166:11): [True: 0, False: 0]
  ------------------
  167|  3.62k|}
Curl_creds_equal:
  170|  3.62k|{
  171|  3.62k|  return Curl_creds_same(c1, c2) &&
  ------------------
  |  Branch (171:10): [True: 3.41k, False: 219]
  ------------------
  172|  3.41k|         ((c1 == c2) || (c1 && c2 && (c1->source == c2->source)));
  ------------------
  |  Branch (172:11): [True: 3.41k, False: 0]
  |  Branch (172:26): [True: 0, False: 0]
  |  Branch (172:32): [True: 0, False: 0]
  |  Branch (172:38): [True: 0, False: 0]
  ------------------
  173|  3.62k|}
Curl_creds_trace:
  178|  3.62k|{
  179|  3.62k|  if(creds) {
  ------------------
  |  Branch (179:6): [True: 0, False: 3.62k]
  ------------------
  180|      0|    CURL_TRC_M(data, "%s: user=%s, passwd=%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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330: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]
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  181|      0|               "sasl_authzid=%s, oauth_bearer=%s, source=%d",
  182|      0|               msg,
  183|      0|               Curl_creds_user(creds),
  184|      0|               Curl_creds_has_passwd(creds) ? "***" : "",
  185|      0|               Curl_creds_sasl_authzid(creds),
  186|      0|               Curl_creds_has_oauth_bearer(creds) ? "***" : "",
  187|      0|               creds->source);
  188|      0|  }
  189|  3.62k|  else
  190|  3.62k|    CURL_TRC_M(data, "%s: -", msg);
  ------------------
  |  |  148|  3.62k|  do {                                   \
  |  |  149|  3.62k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  3.62k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.62k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.62k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  3.62k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  191|  3.62k|}

Curl_cshutdn_get:
   42|  7.25k|{
   43|  7.25k|  if(data && data->multi)
  ------------------
  |  Branch (43:6): [True: 7.25k, False: 0]
  |  Branch (43:14): [True: 7.25k, False: 0]
  ------------------
   44|  7.25k|    return &data->multi->cshutdn;
   45|      0|  return NULL;
   46|  7.25k|}
Curl_conn_shutdown_once:
  120|  3.04k|{
  121|  3.04k|  DEBUGASSERT(!admin->conn);
  ------------------
  |  | 1075|  3.04k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (121:3): [True: 0, False: 3.04k]
  |  Branch (121:3): [True: 3.04k, False: 0]
  ------------------
  122|  3.04k|  DEBUGASSERT(!admin->mid);
  ------------------
  |  | 1075|  3.04k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (122:3): [True: 0, False: 3.04k]
  |  Branch (122:3): [True: 3.04k, False: 0]
  ------------------
  123|  3.04k|  Curl_attach_connection(admin, conn, FALSE);
  ------------------
  |  | 1048|  3.04k|#define FALSE false
  ------------------
  124|  3.04k|  cshutdn_run_once(admin, conn, done);
  125|  3.04k|  CURL_TRC_M(admin, "[SHUTDOWN] shutdown, done=%d", *done);
  ------------------
  |  |  148|  3.04k|  do {                                   \
  |  |  149|  3.04k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  3.04k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.04k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  6.08k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.04k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.04k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  6.08k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.04k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  3.04k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  3.04k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 3.04k]
  |  |  ------------------
  ------------------
  126|  3.04k|  Curl_detach_connection(admin);
  127|  3.04k|}
Curl_conn_terminate:
  132|  3.62k|{
  133|  3.62k|  bool done;
  134|       |
  135|       |  /* there must be a connection to close */
  136|  3.62k|  DEBUGASSERT(conn);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (136:3): [True: 0, False: 3.62k]
  |  Branch (136:3): [True: 3.62k, False: 0]
  ------------------
  137|       |  /* it must be removed from the connection pool */
  138|  3.62k|  DEBUGASSERT(!conn->bits.in_cpool);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (138:3): [True: 0, False: 3.62k]
  |  Branch (138:3): [True: 3.62k, False: 0]
  ------------------
  139|       |  /* the transfer must be detached from the connection */
  140|  3.62k|  DEBUGASSERT(admin && !admin->conn);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (140:3): [True: 0, False: 3.62k]
  |  Branch (140:3): [True: 0, False: 0]
  |  Branch (140:3): [True: 3.62k, False: 0]
  |  Branch (140:3): [True: 3.62k, False: 0]
  ------------------
  141|  3.62k|  DEBUGASSERT(!admin->mid);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (141:3): [True: 0, False: 3.62k]
  |  Branch (141:3): [True: 3.62k, False: 0]
  ------------------
  142|       |
  143|  3.62k|  Curl_attach_connection(admin, conn, FALSE);
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  144|       |
  145|  3.62k|  cshutdn_run_conn_handler(admin, conn);
  146|  3.62k|  if(do_shutdown) {
  ------------------
  |  Branch (146:6): [True: 0, False: 3.62k]
  ------------------
  147|       |    /* Make a last attempt to shutdown handlers and filters, if
  148|       |     * not done so already. */
  149|      0|    cshutdn_run_once(admin, conn, &done);
  150|      0|  }
  151|  3.62k|  CURL_TRC_M(admin, "[SHUTDOWN] %sclosing connection #%" FMT_OFF_T,
  ------------------
  |  |  148|  3.62k|  do {                                   \
  |  |  149|  3.62k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  3.62k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.62k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.62k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  3.62k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  152|  3.62k|             conn->bits.shutdown_filters ? "" : "force ",
  153|  3.62k|             conn->connection_id);
  154|  3.62k|  Curl_conn_cf_discard_all(admin, conn, SECONDARYSOCKET);
  ------------------
  |  |  235|  3.62k|#define SECONDARYSOCKET 1
  ------------------
  155|  3.62k|  Curl_conn_cf_discard_all(admin, conn, FIRSTSOCKET);
  ------------------
  |  |  234|  3.62k|#define FIRSTSOCKET     0
  ------------------
  156|  3.62k|  Curl_detach_connection(admin);
  157|       |
  158|  3.62k|  if(admin->multi)
  ------------------
  |  Branch (158:6): [True: 3.62k, False: 0]
  ------------------
  159|  3.62k|    Curl_multi_ev_conn_done(admin->multi, admin, conn);
  160|  3.62k|  Curl_conn_free(admin, conn);
  161|       |
  162|  3.62k|  if(admin->multi) {
  ------------------
  |  Branch (162:6): [True: 3.62k, False: 0]
  ------------------
  163|  3.62k|    CURL_TRC_M(admin, "[SHUTDOWN] trigger multi connchanged");
  ------------------
  |  |  148|  3.62k|  do {                                   \
  |  |  149|  3.62k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  3.62k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.62k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.62k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  3.62k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  164|  3.62k|    Curl_multi_connchanged(admin->multi);
  165|  3.62k|  }
  166|  3.62k|}
Curl_cshutdn_init:
  316|  3.73k|{
  317|  3.73k|  DEBUGASSERT(multi);
  ------------------
  |  | 1075|  3.73k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (317:3): [True: 0, False: 3.73k]
  |  Branch (317:3): [True: 3.73k, False: 0]
  ------------------
  318|  3.73k|  cshutdn->multi = multi;
  319|  3.73k|  Curl_llist_init(&cshutdn->list, NULL);
  320|       |  cshutdn->initialized = TRUE;
  ------------------
  |  | 1045|  3.73k|#define TRUE true
  ------------------
  321|  3.73k|  return 0; /* good */
  322|  3.73k|}
Curl_cshutdn_destroy:
  326|  3.73k|{
  327|  3.73k|  if(cshutdn->initialized && admin) {
  ------------------
  |  Branch (327:6): [True: 3.73k, False: 0]
  |  Branch (327:30): [True: 3.73k, False: 0]
  ------------------
  328|  3.73k|    int timeout_ms = 0;
  329|       |    /* for testing, run graceful shutdown */
  330|  3.73k|#ifdef DEBUGBUILD
  331|  3.73k|    DEBUGASSERT(!admin->mid);
  ------------------
  |  | 1075|  3.73k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (331:5): [True: 0, False: 3.73k]
  |  Branch (331:5): [True: 3.73k, False: 0]
  ------------------
  332|  3.73k|    {
  333|  3.73k|      const char *p = getenv("CURL_GRACEFUL_SHUTDOWN");
  334|  3.73k|      if(p) {
  ------------------
  |  Branch (334:10): [True: 0, False: 3.73k]
  ------------------
  335|      0|        curl_off_t l;
  336|      0|        if(!curlx_str_number(&p, &l, INT_MAX))
  ------------------
  |  Branch (336:12): [True: 0, False: 0]
  ------------------
  337|      0|          timeout_ms = (int)l;
  338|      0|      }
  339|  3.73k|    }
  340|  3.73k|#endif
  341|       |
  342|  3.73k|    CURL_TRC_M(admin, "[SHUTDOWN] destroy, %zu connections, timeout=%dms",
  ------------------
  |  |  148|  3.73k|  do {                                   \
  |  |  149|  3.73k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  3.73k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.73k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.46k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.73k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.46k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.73k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  3.73k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  3.73k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 3.73k]
  |  |  ------------------
  ------------------
  343|  3.73k|               Curl_llist_count(&cshutdn->list), timeout_ms);
  344|  3.73k|    cshutdn_terminate_all(cshutdn, timeout_ms);
  345|  3.73k|  }
  346|  3.73k|  cshutdn->multi = NULL;
  347|       |  cshutdn->initialized = FALSE;
  ------------------
  |  | 1048|  3.73k|#define FALSE false
  ------------------
  348|  3.73k|}
Curl_cshutdn_add:
  393|     15|{
  394|     15|  struct Curl_easy *admin = cshutdn->multi->admin;
  395|     15|  size_t max_total = cshutdn->multi->max_total_connections;
  396|       |
  397|       |  /* Add the connection to our shutdown list for non-blocking shutdown
  398|       |   * during multi processing. */
  399|     15|  if(max_total > 0 &&
  ------------------
  |  Branch (399:6): [True: 0, False: 15]
  ------------------
  400|      0|     (max_total <= (conns_in_pool + Curl_llist_count(&cshutdn->list)))) {
  ------------------
  |  Branch (400:6): [True: 0, False: 0]
  ------------------
  401|      0|    CURL_TRC_M(admin, "[SHUTDOWN] discarding oldest shutdown 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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  402|      0|               "due to connection limit of %zu", max_total);
  403|      0|    cshutdn_destroy_oldest(cshutdn, NULL);
  404|      0|  }
  405|       |
  406|     15|  if(cshutdn->multi->socket_cb) {
  ------------------
  |  Branch (406:6): [True: 0, False: 15]
  ------------------
  407|      0|    if(cshutdn_update_ev(cshutdn, conn)) {
  ------------------
  |  Branch (407:8): [True: 0, False: 0]
  ------------------
  408|      0|      CURL_TRC_M(admin, "[SHUTDOWN] update events failed, discarding #%"
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  409|      0|                 FMT_OFF_T, conn->connection_id);
  410|      0|      Curl_conn_terminate(admin, conn, FALSE);
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  411|      0|      return;
  412|      0|    }
  413|      0|  }
  414|       |
  415|     15|  Curl_llist_append(&cshutdn->list, conn, &conn->cshutdn_node);
  416|     15|  CURL_TRC_M(admin, "[SHUTDOWN] added #%" FMT_OFF_T
  ------------------
  |  |  148|     15|  do {                                   \
  |  |  149|     15|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|     15|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|     15|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|     30|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 15, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 15]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|     30|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|     15|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|     15|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|     15|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 15]
  |  |  ------------------
  ------------------
  417|     15|             " to shutdowns, now %zu conns in shutdown",
  418|     15|             conn->connection_id, Curl_llist_count(&cshutdn->list));
  419|     15|}
Curl_cshutdn_perform:
  423|  10.9k|{
  424|  10.9k|  cshutdn_perform(cshutdn, sigpipe_ctx);
  425|  10.9k|}
cshutdn.c:cshutdn_run_once:
   79|  3.04k|{
   80|  3.04k|  CURLcode r1, r2;
   81|  3.04k|  bool done1, done2;
   82|       |
   83|       |  /* We expect to be attached when called */
   84|  3.04k|  DEBUGASSERT(data->conn == conn);
  ------------------
  |  | 1075|  3.04k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (84:3): [True: 0, False: 3.04k]
  |  Branch (84:3): [True: 3.04k, False: 0]
  ------------------
   85|       |
   86|  3.04k|  if(!Curl_shutdown_started(conn, FIRSTSOCKET)) {
  ------------------
  |  |  234|  3.04k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (86:6): [True: 3.02k, False: 15]
  ------------------
   87|  3.02k|    Curl_shutdown_start(data, FIRSTSOCKET, 0);
  ------------------
  |  |  234|  3.02k|#define FIRSTSOCKET     0
  ------------------
   88|  3.02k|  }
   89|       |
   90|  3.04k|  cshutdn_run_conn_handler(data, conn);
   91|       |
   92|  3.04k|  if(conn->bits.shutdown_filters) {
  ------------------
  |  Branch (92:6): [True: 0, False: 3.04k]
  ------------------
   93|      0|    *done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
   94|      0|    return;
   95|      0|  }
   96|       |
   97|  3.04k|  if(!conn->bits.connect_only && Curl_conn_is_connected(conn, FIRSTSOCKET))
  ------------------
  |  |  234|  3.04k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (97:6): [True: 3.04k, False: 0]
  |  Branch (97:34): [True: 3.04k, False: 0]
  ------------------
   98|  3.04k|    r1 = Curl_conn_shutdown(data, FIRSTSOCKET, &done1);
  ------------------
  |  |  234|  3.04k|#define FIRSTSOCKET     0
  ------------------
   99|      0|  else {
  100|      0|    r1 = CURLE_OK;
  101|      0|    done1 = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  102|      0|  }
  103|       |
  104|  3.04k|  if(!conn->bits.connect_only && Curl_conn_is_connected(conn, SECONDARYSOCKET))
  ------------------
  |  |  235|  3.04k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (104:6): [True: 3.04k, False: 0]
  |  Branch (104:34): [True: 0, False: 3.04k]
  ------------------
  105|      0|    r2 = Curl_conn_shutdown(data, SECONDARYSOCKET, &done2);
  ------------------
  |  |  235|      0|#define SECONDARYSOCKET 1
  ------------------
  106|  3.04k|  else {
  107|  3.04k|    r2 = CURLE_OK;
  108|  3.04k|    done2 = TRUE;
  ------------------
  |  | 1045|  3.04k|#define TRUE true
  ------------------
  109|  3.04k|  }
  110|       |
  111|       |  /* we are done when any failed or both report success */
  112|  3.04k|  *done = (r1 || r2 || (done1 && done2));
  ------------------
  |  Branch (112:12): [True: 0, False: 3.04k]
  |  Branch (112:18): [True: 0, False: 3.04k]
  |  Branch (112:25): [True: 3.01k, False: 30]
  |  Branch (112:34): [True: 3.01k, False: 0]
  ------------------
  113|  3.04k|  if(*done)
  ------------------
  |  Branch (113:6): [True: 3.01k, False: 30]
  ------------------
  114|  3.01k|    conn->bits.shutdown_filters = TRUE;
  ------------------
  |  | 1045|  3.01k|#define TRUE true
  ------------------
  115|  3.04k|}
cshutdn.c:cshutdn_run_conn_handler:
   50|  6.67k|{
   51|  6.67k|  if(!conn->bits.shutdown_handler) {
  ------------------
  |  Branch (51:6): [True: 3.62k, False: 3.04k]
  ------------------
   52|       |
   53|  3.62k|    if(conn->scheme && conn->scheme->run->disconnect) {
  ------------------
  |  Branch (53:8): [True: 3.62k, False: 0]
  |  Branch (53:24): [True: 0, False: 3.62k]
  ------------------
   54|       |      /* Some disconnect handlers do a blocking wait on server responses.
   55|       |       * FTP/IMAP/SMTP and SFTP are among them. When using the internal
   56|       |       * handle, set an overall short timeout so we do not hang for the
   57|       |       * default 120 seconds. */
   58|      0|      if(data->state.internal) {
  ------------------
  |  Branch (58:10): [True: 0, False: 0]
  ------------------
   59|      0|        data->set.timeout = DEFAULT_SHUTDOWN_TIMEOUT_MS;
  ------------------
  |  |   44|      0|#define DEFAULT_SHUTDOWN_TIMEOUT_MS   (2 * 1000)
  ------------------
   60|      0|        Curl_pgrsTime(data, TIMER_STARTOP);
   61|      0|      }
   62|       |
   63|       |      /* This is set if protocol-specific cleanups should be made */
   64|      0|      DEBUGF(infof(data, "connection #%" FMT_OFF_T
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
   65|      0|                   ", shutdown protocol handler (aborted=%d)",
   66|      0|                   conn->connection_id, conn->bits.aborted));
   67|       |      /* There are protocol handlers that block on retrieving
   68|       |       * server responses here (FTP). Set a short timeout. */
   69|      0|      conn->scheme->run->disconnect(data, conn, (bool)conn->bits.aborted);
   70|      0|    }
   71|       |
   72|       |    conn->bits.shutdown_handler = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
   73|  3.62k|  }
   74|  6.67k|}
cshutdn.c:cshutdn_terminate_all:
  266|  3.73k|{
  267|  3.73k|  struct Curl_easy *admin = cshutdn->multi->admin;
  268|  3.73k|  struct curltime started = *Curl_pgrs_now(admin);
  269|  3.73k|  struct Curl_llist_node *e;
  270|  3.73k|  struct Curl_sigpipe_ctx sigpipe_ctx;
  271|       |
  272|  3.73k|  CURL_TRC_M(admin, "[SHUTDOWN] shutdown all");
  ------------------
  |  |  148|  3.73k|  do {                                   \
  |  |  149|  3.73k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  3.73k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.73k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.46k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.73k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.46k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.73k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  3.73k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  3.73k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 3.73k]
  |  |  ------------------
  ------------------
  273|  3.73k|  sigpipe_init(&sigpipe_ctx);
  274|       |
  275|  3.73k|  while(Curl_llist_head(&cshutdn->list)) {
  ------------------
  |  Branch (275:9): [True: 15, False: 3.71k]
  ------------------
  276|     15|    timediff_t spent_ms;
  277|     15|    int remain_ms;
  278|       |
  279|     15|    cshutdn_perform(cshutdn, &sigpipe_ctx);
  280|       |
  281|     15|    if(!Curl_llist_head(&cshutdn->list)) {
  ------------------
  |  Branch (281:8): [True: 0, False: 15]
  ------------------
  282|      0|      CURL_TRC_M(admin, "[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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  283|      0|      break;
  284|      0|    }
  285|       |
  286|       |    /* wait for activity, timeout or "nothing" */
  287|     15|    spent_ms = curlx_ptimediff_ms(Curl_pgrs_now(admin), &started);
  288|     15|    if(spent_ms >= (timediff_t)timeout_ms) {
  ------------------
  |  Branch (288:8): [True: 15, False: 0]
  ------------------
  289|     15|      CURL_TRC_M(admin, "[SHUTDOWN] shutdown finished, %s",
  ------------------
  |  |  148|     15|  do {                                   \
  |  |  149|     15|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|     15|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|     15|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|     30|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 15, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 15]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|     30|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|     15|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|     15|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|     15|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 15]
  |  |  ------------------
  ------------------
  290|     15|                 (timeout_ms > 0) ? "timeout" : "best effort done");
  291|     15|      break;
  292|     15|    }
  293|       |
  294|      0|    remain_ms = timeout_ms - (int)spent_ms;
  295|      0|    if(cshutdn_wait(cshutdn, remain_ms)) {
  ------------------
  |  Branch (295:8): [True: 0, False: 0]
  ------------------
  296|      0|      CURL_TRC_M(admin, "[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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  297|      0|      break;
  298|      0|    }
  299|      0|  }
  300|       |
  301|       |  /* Terminate any remaining. */
  302|  3.73k|  e = Curl_llist_head(&cshutdn->list);
  303|  3.74k|  while(e) {
  ------------------
  |  Branch (303:9): [True: 15, False: 3.73k]
  ------------------
  304|     15|    struct connectdata *conn = Curl_node_elem(e);
  305|     15|    Curl_node_remove(e);
  306|     15|    Curl_conn_terminate(admin, conn, FALSE);
  ------------------
  |  | 1048|     15|#define FALSE false
  ------------------
  307|     15|    e = Curl_llist_head(&cshutdn->list);
  308|     15|  }
  309|  3.73k|  DEBUGASSERT(!Curl_llist_count(&cshutdn->list));
  ------------------
  |  | 1075|  3.73k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (309:3): [True: 0, False: 3.73k]
  |  Branch (309:3): [True: 3.73k, False: 0]
  ------------------
  310|       |
  311|  3.73k|  sigpipe_restore(&sigpipe_ctx);
  312|  3.73k|}
cshutdn.c:cshutdn_perform:
  228|  11.0k|{
  229|  11.0k|  struct Curl_llist_node *e = Curl_llist_head(&cshutdn->list);
  230|  11.0k|  struct Curl_llist_node *enext;
  231|  11.0k|  struct Curl_easy *admin = cshutdn->multi->admin;
  232|  11.0k|  struct connectdata *conn;
  233|  11.0k|  timediff_t next_expire_ms = 0, ms;
  234|  11.0k|  bool done;
  235|       |
  236|  11.0k|  if(!e)
  ------------------
  |  Branch (236:6): [True: 10.9k, False: 15]
  ------------------
  237|  10.9k|    return;
  238|       |
  239|     15|  CURL_TRC_M(admin, "[SHUTDOWN] perform on %zu connections",
  ------------------
  |  |  148|     15|  do {                                   \
  |  |  149|     15|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|     15|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|     15|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|     30|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 15, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 15]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|     30|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|     15|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|     15|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|     15|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 15]
  |  |  ------------------
  ------------------
  240|     15|             Curl_llist_count(&cshutdn->list));
  241|     15|  sigpipe_apply(admin, sigpipe_ctx);
  242|     30|  while(e) {
  ------------------
  |  Branch (242:9): [True: 15, False: 15]
  ------------------
  243|     15|    enext = Curl_node_next(e);
  244|     15|    conn = Curl_node_elem(e);
  245|     15|    Curl_conn_shutdown_once(admin, conn, &done);
  246|     15|    if(done) {
  ------------------
  |  Branch (246:8): [True: 0, False: 15]
  ------------------
  247|      0|      Curl_node_remove(e);
  248|      0|      Curl_conn_terminate(admin, conn, FALSE);
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  249|      0|    }
  250|     15|    else {
  251|       |      /* idata has one timer list, but maybe more than one connection.
  252|       |       * Set EXPIRE_SHUTDOWN to the smallest time left for all. */
  253|     15|      ms = Curl_conn_shutdown_timeleft(admin, conn);
  254|     15|      if(ms && (!next_expire_ms || (ms < next_expire_ms)))
  ------------------
  |  Branch (254:10): [True: 15, False: 0]
  |  Branch (254:17): [True: 15, False: 0]
  |  Branch (254:36): [True: 0, False: 0]
  ------------------
  255|     15|        next_expire_ms = ms;
  256|     15|    }
  257|     15|    e = enext;
  258|     15|  }
  259|       |
  260|     15|  if(next_expire_ms)
  ------------------
  |  Branch (260:6): [True: 15, False: 0]
  ------------------
  261|     15|    Curl_expire(admin, next_expire_ms, EXPIRE_SHUTDOWN);
  262|     15|}

Curl_freeaddrinfo:
   72|  3.62k|{
   73|  3.62k|  struct Curl_addrinfo *vqualifier canext;
   74|  3.62k|  struct Curl_addrinfo *ca;
   75|       |
   76|  7.25k|  for(ca = cahead; ca; ca = canext) {
  ------------------
  |  Branch (76:20): [True: 3.62k, False: 3.62k]
  ------------------
   77|  3.62k|    canext = ca->ai_next;
   78|  3.62k|    curlx_free(ca);
  ------------------
  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   79|  3.62k|  }
   80|  3.62k|}
Curl_addrinfo_get:
   85|  7.25k|{
   86|  7.25k|  unsigned int i;
   87|  10.8k|  for(i = 0; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (87:14): [True: 7.25k, False: 3.62k]
  ------------------
   88|  7.25k|    if(ai->ai_family == ai_family) {
  ------------------
  |  Branch (88:8): [True: 3.62k, False: 3.62k]
  ------------------
   89|  3.62k|      if(i == n)
  ------------------
  |  Branch (89:10): [True: 3.62k, False: 0]
  ------------------
   90|  3.62k|        return ai;
   91|      0|      ++i;
   92|      0|    }
   93|  7.25k|  }
   94|  3.62k|  return NULL;
   95|  7.25k|}
Curl_str2addr:
  425|  3.62k|{
  426|  3.62k|  struct in_addr in;
  427|  3.62k|  if(curlx_inet_pton(AF_INET, dotted, &in) > 0)
  ------------------
  |  Branch (427:6): [True: 3.62k, False: 0]
  ------------------
  428|       |    /* This is a dotted IP address 123.123.123.123-style */
  429|  3.62k|    return ip2addr(addrp, AF_INET, &in, dotted, port);
  430|      0|#ifdef USE_IPV6
  431|      0|  {
  432|      0|    struct in6_addr in6;
  433|      0|    if(curlx_inet_pton(AF_INET6, dotted, &in6) > 0)
  ------------------
  |  Branch (433:8): [True: 0, False: 0]
  ------------------
  434|       |      /* This is a dotted IPv6 address ::1-style */
  435|      0|      return ip2addr(addrp, AF_INET6, &in6, dotted, port);
  436|      0|  }
  437|      0|#endif
  438|      0|  return CURLE_BAD_FUNCTION_ARGUMENT; /* bad input format */
  439|      0|}
Curl_is_ipv4addr:
  442|  7.25k|{
  443|  7.25k|  struct in_addr in;
  444|       |  return (curlx_inet_pton(AF_INET, address, &in) > 0);
  445|  7.25k|}
Curl_is_ipaddr:
  448|  3.62k|{
  449|  3.62k|  if(Curl_is_ipv4addr(address))
  ------------------
  |  Branch (449:6): [True: 3.62k, False: 0]
  ------------------
  450|  3.62k|    return TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  451|      0|#ifdef USE_IPV6
  452|      0|  {
  453|      0|    struct in6_addr in6;
  454|      0|    if(curlx_inet_pton(AF_INET6, address, &in6) > 0)
  ------------------
  |  Branch (454:8): [True: 0, False: 0]
  ------------------
  455|       |      /* This is a dotted IPv6 address ::1-style */
  456|      0|      return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  457|      0|  }
  458|      0|#endif
  459|      0|  return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  460|      0|}
curl_addrinfo.c:ip2addr:
  359|  3.62k|{
  360|  3.62k|  struct Curl_addrinfo *ai;
  361|  3.62k|  size_t addrsize;
  362|  3.62k|  size_t namelen;
  363|  3.62k|  struct sockaddr_in *addr;
  364|  3.62k|#ifdef USE_IPV6
  365|  3.62k|  struct sockaddr_in6 *addr6;
  366|  3.62k|#endif
  367|       |
  368|  3.62k|  DEBUGASSERT(inaddr && hostname);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (368:3): [True: 0, False: 3.62k]
  |  Branch (368:3): [True: 0, False: 0]
  |  Branch (368:3): [True: 3.62k, False: 0]
  |  Branch (368:3): [True: 3.62k, False: 0]
  ------------------
  369|       |
  370|  3.62k|  namelen = strlen(hostname) + 1;
  371|  3.62k|  *addrp = NULL;
  372|       |
  373|  3.62k|  if(af == AF_INET)
  ------------------
  |  Branch (373:6): [True: 3.62k, False: 0]
  ------------------
  374|  3.62k|    addrsize = sizeof(struct sockaddr_in);
  375|      0|#ifdef USE_IPV6
  376|      0|  else if(af == AF_INET6)
  ------------------
  |  Branch (376:11): [True: 0, False: 0]
  ------------------
  377|      0|    addrsize = sizeof(struct sockaddr_in6);
  378|      0|#endif
  379|      0|  else
  380|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  381|       |
  382|       |  /* allocate memory to hold the struct, the address and the name */
  383|  3.62k|  ai = curlx_calloc(1, sizeof(struct Curl_addrinfo) + addrsize + namelen);
  ------------------
  |  | 1473|  3.62k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  384|  3.62k|  if(!ai)
  ------------------
  |  Branch (384:6): [True: 0, False: 3.62k]
  ------------------
  385|      0|    return CURLE_OUT_OF_MEMORY;
  386|       |  /* put the address after the struct */
  387|  3.62k|  ai->ai_addr = (void *)((char *)ai + sizeof(struct Curl_addrinfo));
  388|       |  /* then put the name after the address */
  389|  3.62k|  ai->ai_canonname = (char *)ai->ai_addr + addrsize;
  390|  3.62k|  memcpy(ai->ai_canonname, hostname, namelen);
  391|  3.62k|  ai->ai_family = af;
  392|  3.62k|  ai->ai_socktype = SOCK_STREAM;
  393|  3.62k|  ai->ai_addrlen = (curl_socklen_t)addrsize;
  394|       |  /* leave the rest of the struct filled with zero */
  395|       |
  396|  3.62k|  switch(af) {
  ------------------
  |  Branch (396:10): [True: 3.62k, False: 0]
  ------------------
  397|  3.62k|  case AF_INET:
  ------------------
  |  Branch (397:3): [True: 3.62k, False: 0]
  ------------------
  398|  3.62k|    addr = (void *)ai->ai_addr; /* storage area for this info */
  399|       |
  400|  3.62k|    memcpy(&addr->sin_addr, inaddr, sizeof(struct in_addr));
  401|  3.62k|    addr->sin_family = (CURL_SA_FAMILY_T)af;
  402|  3.62k|    addr->sin_port = htons((unsigned short)port);
  403|  3.62k|    break;
  404|       |
  405|      0|#ifdef USE_IPV6
  406|      0|  case AF_INET6:
  ------------------
  |  Branch (406:3): [True: 0, False: 3.62k]
  ------------------
  407|      0|    addr6 = (void *)ai->ai_addr; /* storage area for this info */
  408|       |
  409|      0|    memcpy(&addr6->sin6_addr, inaddr, sizeof(struct in6_addr));
  410|      0|    addr6->sin6_family = (CURL_SA_FAMILY_T)af;
  411|      0|    addr6->sin6_port = htons((unsigned short)port);
  412|      0|    break;
  413|  3.62k|#endif
  414|  3.62k|  }
  415|  3.62k|  *addrp = ai;
  416|  3.62k|  return CURLE_OK;
  417|  3.62k|}

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

Curl_get_line:
   36|  11.1k|{
   37|  11.1k|  CURLcode result;
   38|  11.1k|  char buffer[128];
   39|  11.1k|  curlx_dyn_reset(buf);
   40|  11.1k|  while(1) {
  ------------------
  |  Branch (40:9): [True: 11.1k, Folded]
  ------------------
   41|  11.1k|    size_t rlen;
   42|  11.1k|    const char *b = fgets(buffer, sizeof(buffer), input);
   43|  11.1k|    if(!b && ferror(input))
  ------------------
  |  Branch (43:8): [True: 11.1k, False: 0]
  |  Branch (43:14): [True: 0, False: 11.1k]
  ------------------
   44|      0|      return CURLE_READ_ERROR;
   45|       |
   46|  11.1k|    *eof = feof(input);
   47|       |
   48|  11.1k|    rlen = b ? strlen(b) : 0;
  ------------------
  |  Branch (48:12): [True: 0, False: 11.1k]
  ------------------
   49|  11.1k|    if(rlen) {
  ------------------
  |  Branch (49:8): [True: 0, False: 11.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|  11.1k|    rlen = curlx_dyn_len(buf);
   57|  11.1k|    b = curlx_dyn_ptr(buf);
   58|  11.1k|    if(rlen && (b[rlen - 1] == '\n'))
  ------------------
  |  Branch (58:8): [True: 0, False: 11.1k]
  |  Branch (58:16): [True: 0, False: 0]
  ------------------
   59|       |      /* LF at end of the line */
   60|      0|      return CURLE_OK; /* all good */
   61|  11.1k|    if(*eof)
  ------------------
  |  Branch (61:8): [True: 11.1k, False: 0]
  ------------------
   62|       |      /* append a newline */
   63|  11.1k|      return curlx_dyn_addn(buf, "\n", 1);
   64|       |    /* otherwise get next line to append */
   65|  11.1k|  }
   66|       |  /* UNREACHABLE */
   67|  11.1k|}

Curl_share_lock_share:
  378|  25.3k|{
  379|  25.3k|  if(!share)
  ------------------
  |  Branch (379:6): [True: 25.3k, False: 0]
  ------------------
  380|  25.3k|    return CURLSHE_INVALID;
  381|       |
  382|      0|  if(share->specifier & (unsigned int)(1 << type)) {
  ------------------
  |  Branch (382:6): [True: 0, False: 0]
  ------------------
  383|      0|    if(share->lockfunc) /* only call this if set! */
  ------------------
  |  Branch (383:8): [True: 0, False: 0]
  ------------------
  384|      0|      share->lockfunc(data, type, accesstype, share->clientdata);
  385|      0|  }
  386|       |  /* else if we do not share this, pretend successful lock */
  387|       |
  388|      0|  return CURLSHE_OK;
  389|  25.3k|}
Curl_share_lock:
  393|  25.3k|{
  394|  25.3k|  return Curl_share_lock_share(data->share, data, type, accesstype);
  395|  25.3k|}
Curl_share_unlock_share:
  400|  25.3k|{
  401|  25.3k|  if(!share)
  ------------------
  |  Branch (401:6): [True: 25.3k, False: 0]
  ------------------
  402|  25.3k|    return CURLSHE_INVALID;
  403|       |
  404|      0|  if(share->specifier & (unsigned int)(1 << type)) {
  ------------------
  |  Branch (404:6): [True: 0, False: 0]
  ------------------
  405|      0|    if(share->unlockfunc) /* only call this if set! */
  ------------------
  |  Branch (405:8): [True: 0, False: 0]
  ------------------
  406|      0|      share->unlockfunc(data, type, share->clientdata);
  407|      0|  }
  408|       |
  409|      0|  return CURLSHE_OK;
  410|  25.3k|}
Curl_share_unlock:
  413|  25.3k|{
  414|  25.3k|  return Curl_share_unlock_share(data->share, data, type);
  415|  25.3k|}
Curl_share_easy_unlink:
  418|  7.46k|{
  419|  7.46k|  struct Curl_share *share = data->share;
  420|       |
  421|  7.46k|  if(share) {
  ------------------
  |  Branch (421:6): [True: 0, False: 7.46k]
  ------------------
  422|      0|    bool locked = share_lock_acquire(share, data);
  423|       |
  424|       |    /* If share caches connections, detach any existing connection and
  425|       |     * forget its identifier. */
  426|      0|    if((share->specifier & (1 << CURL_LOCK_DATA_CONNECT))) {
  ------------------
  |  Branch (426:8): [True: 0, False: 0]
  ------------------
  427|      0|      if(data->conn)
  ------------------
  |  Branch (427:10): [True: 0, False: 0]
  ------------------
  428|      0|        Curl_detach_connection(data);
  429|      0|      data->state.lastconnect_id = -1;
  430|      0|    }
  431|       |
  432|      0|#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
  433|      0|    if(share->cookies == data->cookies)
  ------------------
  |  Branch (433:8): [True: 0, False: 0]
  ------------------
  434|      0|      data->cookies = NULL;
  435|      0|#endif
  436|       |
  437|      0|#ifndef CURL_DISABLE_HSTS
  438|      0|    if(share->hsts == data->hsts)
  ------------------
  |  Branch (438:8): [True: 0, False: 0]
  ------------------
  439|      0|      data->hsts = NULL;
  440|      0|#endif
  441|       |#ifdef USE_LIBPSL
  442|       |    if(&share->psl == data->psl)
  443|       |      data->psl = data->multi ? &data->multi->psl : NULL;
  444|       |#endif
  445|       |
  446|      0|    share_unlink(&data->share, data, locked);
  447|      0|  }
  448|  7.46k|  return CURLE_OK;
  449|  7.46k|}

Curl_thread_get_current_id:
  223|  10.7k|{
  224|  10.7k|  return pthread_self();
  225|  10.7k|}

Curl_debug:
  128|  4.89k|{
  129|  4.89k|  if(data->set.verbose) {
  ------------------
  |  Branch (129:6): [True: 0, False: 4.89k]
  ------------------
  130|      0|    static const char s_infotype[CURLINFO_END][3] = {
  131|      0|      "* ", "< ", "> ", "{ ", "} ", "{ ", "} " };
  132|      0|    char buf[TRC_LINE_MAX];
  133|      0|    size_t len;
  134|      0|    if(data->set.fdebug) {
  ------------------
  |  Branch (134:8): [True: 0, False: 0]
  ------------------
  135|      0|      struct Curl_mapi_guard guard;
  136|      0|      if(CURL_TRC_IDS(data) && (size < TRC_LINE_MAX)) {
  ------------------
  |  |   90|      0|  (Curl_trc_is_verbose(data) && \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324: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 (136:32): [True: 0, False: 0]
  ------------------
  137|      0|        len = trc_print_ids(data, buf, TRC_LINE_MAX);
  ------------------
  |  |   78|      0|#define TRC_LINE_MAX 2048
  ------------------
  138|      0|        len += curl_msnprintf(buf + len, TRC_LINE_MAX - len, "%.*s",
  ------------------
  |  |   78|      0|#define TRC_LINE_MAX 2048
  ------------------
  139|      0|                              (int)size, ptr);
  140|      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);
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  141|      0|        CURL_CBAPI_START(&guard, data, easy_fdebug);
  ------------------
  |  |  201|      0|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
  142|      0|        (void)(*data->set.fdebug)(data, type, buf, len, data->set.debugdata);
  143|      0|        CURL_CBAPI_END(&guard);
  ------------------
  |  |  205|      0|  Curl_cbapi_leave(g)
  ------------------
  144|      0|      }
  145|      0|      else {
  146|      0|        CURL_CBAPI_START(&guard, data, easy_fdebug);
  ------------------
  |  |  201|      0|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
  147|      0|        (void)(*data->set.fdebug)(data, type, CURL_UNCONST(ptr),
  ------------------
  |  |  856|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  148|      0|                                  size, data->set.debugdata);
  149|      0|        CURL_CBAPI_END(&guard);
  ------------------
  |  |  205|      0|  Curl_cbapi_leave(g)
  ------------------
  150|      0|      }
  151|      0|    }
  152|      0|    else {
  153|      0|      switch(type) {
  154|      0|      case CURLINFO_TEXT:
  ------------------
  |  Branch (154:7): [True: 0, False: 0]
  ------------------
  155|      0|      case CURLINFO_HEADER_OUT:
  ------------------
  |  Branch (155:7): [True: 0, False: 0]
  ------------------
  156|      0|      case CURLINFO_HEADER_IN:
  ------------------
  |  Branch (156:7): [True: 0, False: 0]
  ------------------
  157|      0|#ifndef CURL_DISABLE_VERBOSE_STRINGS
  158|      0|        if(CURL_TRC_IDS(data)) {
  ------------------
  |  |   90|      0|  (Curl_trc_is_verbose(data) && \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  159|      0|          len = trc_print_ids(data, buf, TRC_LINE_MAX);
  ------------------
  |  |   78|      0|#define TRC_LINE_MAX 2048
  ------------------
  160|      0|          fwrite(buf, len, 1, data->set.err);
  161|      0|        }
  162|      0|#endif
  163|      0|        fwrite(s_infotype[type], 2, 1, data->set.err);
  164|      0|        fwrite(ptr, size, 1, data->set.err);
  165|      0|        break;
  166|      0|      default: /* nada */
  ------------------
  |  Branch (166:7): [True: 0, False: 0]
  ------------------
  167|      0|        break;
  168|      0|      }
  169|      0|    }
  170|      0|  }
  171|  4.89k|}
Curl_failf:
  177|  5.06k|{
  178|  5.06k|  DEBUGASSERT(!strchr(fmt, '\n'));
  ------------------
  |  | 1075|  5.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (178:3): [True: 0, False: 5.06k]
  |  Branch (178:3): [True: 5.06k, False: 0]
  ------------------
  179|  5.06k|  if(data->set.verbose || data->set.errorbuffer) {
  ------------------
  |  Branch (179:6): [True: 0, False: 5.06k]
  |  Branch (179:27): [True: 0, False: 5.06k]
  ------------------
  180|      0|    va_list ap;
  181|      0|    size_t len;
  182|      0|    char error[CURL_ERROR_SIZE + 2];
  183|      0|    va_start(ap, fmt);
  184|      0|    len = curl_mvsnprintf(error, CURL_ERROR_SIZE, fmt, ap);
  ------------------
  |  |  877|      0|#define CURL_ERROR_SIZE 256
  ------------------
  185|       |
  186|      0|    if(data->set.errorbuffer && !data->state.errorbuf) {
  ------------------
  |  Branch (186:8): [True: 0, False: 0]
  |  Branch (186:33): [True: 0, False: 0]
  ------------------
  187|      0|      curlx_strcopy(data->set.errorbuffer, CURL_ERROR_SIZE, error, len);
  ------------------
  |  |  877|      0|#define CURL_ERROR_SIZE 256
  ------------------
  188|      0|      data->state.errorbuf = TRUE; /* wrote error string */
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  189|      0|    }
  190|      0|    error[len++] = '\n';
  191|      0|    error[len] = '\0';
  192|      0|    trc_write(data, CURLINFO_TEXT, error, len);
  193|       |    va_end(ap);
  194|      0|  }
  195|  5.06k|}
Curl_reset_fail:
  198|  10.8k|{
  199|  10.8k|  if(data->set.errorbuffer)
  ------------------
  |  Branch (199:6): [True: 0, False: 10.8k]
  ------------------
  200|      0|    data->set.errorbuffer[0] = 0;
  201|       |  data->state.errorbuf = FALSE;
  ------------------
  |  | 1048|  10.8k|#define FALSE false
  ------------------
  202|  10.8k|}
Curl_trc_opt:
  670|      2|{
  671|      2|  CURLcode result = config ? trc_opt(config) : CURLE_OK;
  ------------------
  |  Branch (671:21): [True: 0, False: 2]
  ------------------
  672|      2|#ifdef DEBUGBUILD
  673|       |  /* CURL_DEBUG can override anything */
  674|      2|  if(!result) {
  ------------------
  |  Branch (674:6): [True: 2, False: 0]
  ------------------
  675|      2|    const char *dbg_config = getenv("CURL_DEBUG");
  676|      2|    if(dbg_config)
  ------------------
  |  Branch (676:8): [True: 0, False: 2]
  ------------------
  677|      0|      result = trc_opt(dbg_config);
  678|      2|  }
  679|      2|#endif /* DEBUGBUILD */
  680|      2|  return result;
  681|      2|}
Curl_trc_init:
  684|      2|{
  685|      2|#ifdef DEBUGBUILD
  686|      2|  return Curl_trc_opt(NULL);
  687|       |#else
  688|       |  return CURLE_OK;
  689|       |#endif
  690|      2|}

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

curlx_dyn_init:
   39|  61.6k|{
   40|  61.6k|  DEBUGASSERT(s);
  ------------------
  |  | 1075|  61.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (40:3): [True: 0, False: 61.6k]
  |  Branch (40:3): [True: 61.6k, False: 0]
  ------------------
   41|  61.6k|  DEBUGASSERT(toobig);
  ------------------
  |  | 1075|  61.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (41:3): [True: 0, False: 61.6k]
  |  Branch (41:3): [True: 61.6k, False: 0]
  ------------------
   42|  61.6k|  DEBUGASSERT(toobig <= MAX_DYNBUF_SIZE); /* catch crazy mistakes */
  ------------------
  |  | 1075|  61.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (42:3): [True: 0, False: 61.6k]
  |  Branch (42:3): [True: 61.6k, False: 0]
  ------------------
   43|  61.6k|  s->bufr = NULL;
   44|  61.6k|  s->leng = 0;
   45|  61.6k|  s->allc = 0;
   46|  61.6k|  s->toobig = toobig;
   47|  61.6k|#ifdef DEBUGBUILD
   48|  61.6k|  s->init = DYNINIT;
  ------------------
  |  |   32|  61.6k|#define DYNINIT 0xbee51da /* random pattern */
  ------------------
   49|  61.6k|#endif
   50|  61.6k|}
curlx_dyn_free:
   57|  40.7k|{
   58|  40.7k|  DEBUGASSERT(s);
  ------------------
  |  | 1075|  40.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (58:3): [True: 0, False: 40.7k]
  |  Branch (58:3): [True: 40.7k, False: 0]
  ------------------
   59|  40.7k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1075|  40.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (59:3): [True: 0, False: 40.7k]
  |  Branch (59:3): [True: 40.7k, False: 0]
  ------------------
   60|  40.7k|  curlx_safefree(s->bufr);
  ------------------
  |  | 1332|  40.7k|  do {                      \
  |  | 1333|  40.7k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  40.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  40.7k|    (ptr) = NULL;           \
  |  | 1335|  40.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 40.7k]
  |  |  ------------------
  ------------------
   61|  40.7k|  s->leng = s->allc = 0;
   62|  40.7k|}
curlx_dyn_reset:
  126|  18.6k|{
  127|  18.6k|  DEBUGASSERT(s);
  ------------------
  |  | 1075|  18.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (127:3): [True: 0, False: 18.6k]
  |  Branch (127:3): [True: 18.6k, False: 0]
  ------------------
  128|  18.6k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1075|  18.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (128:3): [True: 0, False: 18.6k]
  |  Branch (128:3): [True: 18.6k, False: 0]
  ------------------
  129|  18.6k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1075|  18.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (129:3): [True: 18.6k, False: 0]
  |  Branch (129:3): [True: 0, False: 0]
  |  Branch (129:3): [True: 17.8k, False: 746]
  |  Branch (129:3): [True: 746, False: 0]
  ------------------
  130|  18.6k|  if(s->leng)
  ------------------
  |  Branch (130:6): [True: 746, False: 17.8k]
  ------------------
  131|    746|    s->bufr[0] = 0;
  132|  18.6k|  s->leng = 0;
  133|  18.6k|}
curlx_dyn_addn:
  163|  2.42M|{
  164|  2.42M|  DEBUGASSERT(s);
  ------------------
  |  | 1075|  2.42M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (164:3): [True: 0, False: 2.42M]
  |  Branch (164:3): [True: 2.42M, False: 0]
  ------------------
  165|  2.42M|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1075|  2.42M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (165:3): [True: 0, False: 2.42M]
  |  Branch (165:3): [True: 2.42M, False: 0]
  ------------------
  166|  2.42M|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1075|  2.42M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (166:3): [True: 2.42M, False: 0]
  |  Branch (166:3): [True: 0, False: 0]
  |  Branch (166:3): [True: 49.1k, False: 2.37M]
  |  Branch (166:3): [True: 2.37M, False: 0]
  ------------------
  167|  2.42M|  return dyn_nappend(s, mem, len);
  168|  2.42M|}
curlx_dyn_add:
  174|  16.1k|{
  175|  16.1k|  size_t n;
  176|  16.1k|  DEBUGASSERT(str);
  ------------------
  |  | 1075|  16.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (176:3): [True: 0, False: 16.1k]
  |  Branch (176:3): [True: 16.1k, False: 0]
  ------------------
  177|  16.1k|  DEBUGASSERT(s);
  ------------------
  |  | 1075|  16.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (177:3): [True: 0, False: 16.1k]
  |  Branch (177:3): [True: 16.1k, False: 0]
  ------------------
  178|  16.1k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1075|  16.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (178:3): [True: 0, False: 16.1k]
  |  Branch (178:3): [True: 16.1k, False: 0]
  ------------------
  179|  16.1k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1075|  16.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 16.1k, False: 0]
  |  Branch (179:3): [True: 0, False: 0]
  |  Branch (179:3): [True: 324, False: 15.8k]
  |  Branch (179:3): [True: 15.8k, False: 0]
  ------------------
  180|  16.1k|  n = strlen(str);
  181|  16.1k|  return dyn_nappend(s, (const unsigned char *)str, n);
  182|  16.1k|}
curlx_dyn_vaddf:
  188|   147k|{
  189|   147k|#ifdef BUILDING_LIBCURL
  190|   147k|  int rc;
  191|   147k|  DEBUGASSERT(s);
  ------------------
  |  | 1075|   147k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (191:3): [True: 0, False: 147k]
  |  Branch (191:3): [True: 147k, False: 0]
  ------------------
  192|   147k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1075|   147k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (192:3): [True: 0, False: 147k]
  |  Branch (192:3): [True: 147k, False: 0]
  ------------------
  193|   147k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1075|   147k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (193:3): [True: 147k, False: 0]
  |  Branch (193:3): [True: 0, False: 0]
  |  Branch (193:3): [True: 7.22k, False: 140k]
  |  Branch (193:3): [True: 140k, False: 0]
  ------------------
  194|   147k|  DEBUGASSERT(fmt);
  ------------------
  |  | 1075|   147k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (194:3): [True: 0, False: 147k]
  |  Branch (194:3): [True: 147k, False: 0]
  ------------------
  195|   147k|  rc = curlx_dyn_vprintf(s, fmt, ap);
  196|       |
  197|   147k|  if(!rc)
  ------------------
  |  Branch (197:6): [True: 147k, False: 0]
  ------------------
  198|   147k|    return CURLE_OK;
  199|      0|  else if(rc == MERR_TOO_LARGE)
  ------------------
  |  |   29|      0|#define MERR_TOO_LARGE 2
  ------------------
  |  Branch (199:11): [True: 0, False: 0]
  ------------------
  200|      0|    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|   147k|}
curlx_dyn_addf:
  221|   147k|{
  222|   147k|  CURLcode result;
  223|   147k|  va_list ap;
  224|   147k|  DEBUGASSERT(s);
  ------------------
  |  | 1075|   147k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (224:3): [True: 0, False: 147k]
  |  Branch (224:3): [True: 147k, False: 0]
  ------------------
  225|   147k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1075|   147k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (225:3): [True: 0, False: 147k]
  |  Branch (225:3): [True: 147k, False: 0]
  ------------------
  226|   147k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1075|   147k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (226:3): [True: 147k, False: 0]
  |  Branch (226:3): [True: 0, False: 0]
  |  Branch (226:3): [True: 7.22k, False: 140k]
  |  Branch (226:3): [True: 140k, False: 0]
  ------------------
  227|   147k|  DEBUGASSERT(strcmp(fmt, "%s")); /* use curlx_dyn_add instead */
  ------------------
  |  | 1075|   147k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (227:3): [True: 0, False: 147k]
  |  Branch (227:3): [True: 147k, False: 0]
  ------------------
  228|   147k|  va_start(ap, fmt);
  229|   147k|  result = curlx_dyn_vaddf(s, fmt, ap);
  230|       |  va_end(ap);
  231|   147k|  return result;
  232|   147k|}
curlx_dyn_ptr:
  238|  67.6k|{
  239|  67.6k|  DEBUGASSERT(s);
  ------------------
  |  | 1075|  67.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (239:3): [True: 0, False: 67.6k]
  |  Branch (239:3): [True: 67.6k, False: 0]
  ------------------
  240|  67.6k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1075|  67.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (240:3): [True: 0, False: 67.6k]
  |  Branch (240:3): [True: 67.6k, False: 0]
  ------------------
  241|  67.6k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1075|  67.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (241:3): [True: 67.6k, False: 0]
  |  Branch (241:3): [True: 0, False: 0]
  |  Branch (241:3): [True: 11.2k, False: 56.4k]
  |  Branch (241:3): [True: 56.4k, False: 0]
  ------------------
  242|  67.6k|  return s->bufr;
  243|  67.6k|}
curlx_dyn_take:
  246|  7.23k|{
  247|  7.23k|  char *ptr = s->bufr;
  248|  7.23k|  DEBUGASSERT(s);
  ------------------
  |  | 1075|  7.23k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (248:3): [True: 0, False: 7.23k]
  |  Branch (248:3): [True: 7.23k, False: 0]
  ------------------
  249|  7.23k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1075|  7.23k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (249:3): [True: 0, False: 7.23k]
  |  Branch (249:3): [True: 7.23k, False: 0]
  ------------------
  250|  7.23k|  *plen = s->leng;
  251|       |  s->bufr = NULL;
  252|  7.23k|  s->leng = 0;
  253|  7.23k|  s->allc = 0;
  254|  7.23k|  return ptr;
  255|  7.23k|}
curlx_dyn_len:
  272|  51.2k|{
  273|  51.2k|  DEBUGASSERT(s);
  ------------------
  |  | 1075|  51.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (273:3): [True: 0, False: 51.2k]
  |  Branch (273:3): [True: 51.2k, False: 0]
  ------------------
  274|  51.2k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1075|  51.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (274:3): [True: 0, False: 51.2k]
  |  Branch (274:3): [True: 51.2k, False: 0]
  ------------------
  275|  51.2k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1075|  51.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (275:3): [True: 51.2k, False: 0]
  |  Branch (275:3): [True: 0, False: 0]
  |  Branch (275:3): [True: 14.4k, False: 36.8k]
  |  Branch (275:3): [True: 36.8k, False: 0]
  ------------------
  276|  51.2k|  return s->leng;
  277|  51.2k|}
curlx_dyn_setlen:
  283|  1.20k|{
  284|  1.20k|  DEBUGASSERT(s);
  ------------------
  |  | 1075|  1.20k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (284:3): [True: 0, False: 1.20k]
  |  Branch (284:3): [True: 1.20k, False: 0]
  ------------------
  285|  1.20k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1075|  1.20k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (285:3): [True: 0, False: 1.20k]
  |  Branch (285:3): [True: 1.20k, False: 0]
  ------------------
  286|  1.20k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1075|  1.20k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (286:3): [True: 1.20k, False: 0]
  |  Branch (286:3): [True: 0, False: 0]
  |  Branch (286:3): [True: 0, False: 1.20k]
  |  Branch (286:3): [True: 1.20k, False: 0]
  ------------------
  287|  1.20k|  if(set > s->leng)
  ------------------
  |  Branch (287:6): [True: 0, False: 1.20k]
  ------------------
  288|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  289|  1.20k|  s->leng = set;
  290|  1.20k|  s->bufr[s->leng] = 0;
  291|  1.20k|  return CURLE_OK;
  292|  1.20k|}
dynbuf.c:dyn_nappend:
   69|  2.44M|{
   70|  2.44M|  size_t idx = s->leng;
   71|  2.44M|  size_t a = s->allc;
   72|  2.44M|  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|  2.44M|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1075|  2.44M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (75:3): [True: 0, False: 2.44M]
  |  Branch (75:3): [True: 2.44M, False: 0]
  ------------------
   76|  2.44M|  DEBUGASSERT(s->toobig);
  ------------------
  |  | 1075|  2.44M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (76:3): [True: 0, False: 2.44M]
  |  Branch (76:3): [True: 2.44M, False: 0]
  ------------------
   77|  2.44M|  DEBUGASSERT(idx < s->toobig);
  ------------------
  |  | 1075|  2.44M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (77:3): [True: 0, False: 2.44M]
  |  Branch (77:3): [True: 2.44M, False: 0]
  ------------------
   78|  2.44M|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1075|  2.44M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (78:3): [True: 2.44M, False: 0]
  |  Branch (78:3): [True: 0, False: 0]
  |  Branch (78:3): [True: 49.4k, False: 2.39M]
  |  Branch (78:3): [True: 2.39M, False: 0]
  ------------------
   79|  2.44M|  DEBUGASSERT(a <= s->toobig);
  ------------------
  |  | 1075|  2.44M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (79:3): [True: 0, False: 2.44M]
  |  Branch (79:3): [True: 2.44M, False: 0]
  ------------------
   80|  2.44M|  DEBUGASSERT(!len || mem);
  ------------------
  |  | 1075|  2.44M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (80:3): [True: 2.44M, False: 0]
  |  Branch (80:3): [True: 0, False: 0]
  |  Branch (80:3): [True: 2.13k, False: 2.44M]
  |  Branch (80:3): [True: 2.44M, False: 0]
  ------------------
   81|       |
   82|  2.44M|  if(fit > s->toobig) {
  ------------------
  |  Branch (82:6): [True: 0, False: 2.44M]
  ------------------
   83|      0|    curlx_dyn_free(s);
   84|      0|    return CURLE_TOO_LARGE;
   85|      0|  }
   86|  2.44M|  else if(!a) {
  ------------------
  |  Branch (86:11): [True: 47.2k, False: 2.39M]
  ------------------
   87|  47.2k|    DEBUGASSERT(!idx);
  ------------------
  |  | 1075|  47.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (87:5): [True: 0, False: 47.2k]
  |  Branch (87:5): [True: 47.2k, False: 0]
  ------------------
   88|       |    /* first invoke */
   89|  47.2k|    if(MIN_FIRST_ALLOC > s->toobig)
  ------------------
  |  |   29|  47.2k|#define MIN_FIRST_ALLOC 32
  ------------------
  |  Branch (89:8): [True: 105, False: 47.1k]
  ------------------
   90|    105|      a = s->toobig;
   91|  47.1k|    else if(fit < MIN_FIRST_ALLOC)
  ------------------
  |  |   29|  47.1k|#define MIN_FIRST_ALLOC 32
  ------------------
  |  Branch (91:13): [True: 47.0k, False: 136]
  ------------------
   92|  47.0k|      a = MIN_FIRST_ALLOC;
  ------------------
  |  |   29|  47.0k|#define MIN_FIRST_ALLOC 32
  ------------------
   93|    136|    else
   94|    136|      a = fit;
   95|  47.2k|  }
   96|  2.39M|  else {
   97|  2.42M|    while(a < fit)
  ------------------
  |  Branch (97:11): [True: 27.0k, False: 2.39M]
  ------------------
   98|  27.0k|      a *= 2;
   99|  2.39M|    if(a > s->toobig)
  ------------------
  |  Branch (99:8): [True: 63, False: 2.39M]
  ------------------
  100|       |      /* no point in allocating a larger buffer than this is allowed to use */
  101|     63|      a = s->toobig;
  102|  2.39M|  }
  103|       |
  104|  2.44M|  if(a != s->allc) {
  ------------------
  |  Branch (104:6): [True: 73.7k, False: 2.36M]
  ------------------
  105|  73.7k|    void *p = curlx_realloc(s->bufr, a);
  ------------------
  |  | 1475|  73.7k|  curl_dbg_realloc(ptr, size, __LINE__, __FILE__)
  ------------------
  106|  73.7k|    if(!p) {
  ------------------
  |  Branch (106:8): [True: 0, False: 73.7k]
  ------------------
  107|      0|      curlx_dyn_free(s);
  108|      0|      return CURLE_OUT_OF_MEMORY;
  109|      0|    }
  110|  73.7k|    s->bufr = p;
  111|  73.7k|    s->allc = a;
  112|  73.7k|  }
  113|       |
  114|  2.44M|  if(len)
  ------------------
  |  Branch (114:6): [True: 2.44M, False: 2.13k]
  ------------------
  115|  2.44M|    memcpy(&s->bufr[idx], mem, len);
  116|  2.44M|  s->leng = idx + len;
  117|  2.44M|  s->bufr[s->leng] = 0;
  118|  2.44M|  return CURLE_OK;
  119|  2.44M|}

curlx_inet_ntop:
  190|  3.62k|{
  191|  3.62k|  switch(af) {
  192|  3.62k|  case AF_INET:
  ------------------
  |  Branch (192:3): [True: 3.62k, False: 0]
  ------------------
  193|  3.62k|    return inet_ntop4((const unsigned char *)src, buf, size);
  194|      0|  case AF_INET6:
  ------------------
  |  Branch (194:3): [True: 0, False: 3.62k]
  ------------------
  195|      0|    return inet_ntop6((const unsigned char *)src, buf, size);
  196|      0|  default:
  ------------------
  |  Branch (196:3): [True: 0, False: 3.62k]
  ------------------
  197|      0|    return CURLE_UNSUPPORTED_PROTOCOL;
  198|  3.62k|  }
  199|  3.62k|}
inet_ntop.c:inet_ntop4:
   57|  3.62k|{
   58|  3.62k|  char tmp[sizeof("255.255.255.255")];
   59|  3.62k|  size_t len;
   60|       |
   61|  3.62k|  DEBUGASSERT(size >= 16);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (61:3): [True: 0, False: 3.62k]
  |  Branch (61:3): [True: 3.62k, False: 0]
  ------------------
   62|       |
   63|       |  /* this snprintf() does not overflow the buffer. */
   64|  3.62k|  SNPRINTF(tmp, sizeof(tmp), "%d.%d.%d.%d",
  ------------------
  |  |   43|  3.62k|#define SNPRINTF curl_msnprintf
  ------------------
   65|  3.62k|           ((int)((unsigned char)src[0])) & 0xff,
   66|  3.62k|           ((int)((unsigned char)src[1])) & 0xff,
   67|  3.62k|           ((int)((unsigned char)src[2])) & 0xff,
   68|  3.62k|           ((int)((unsigned char)src[3])) & 0xff);
   69|       |
   70|  3.62k|  len = strlen(tmp);
   71|  3.62k|  if(len == 0 || len >= size)
  ------------------
  |  Branch (71:6): [True: 0, False: 3.62k]
  |  Branch (71:18): [True: 0, False: 3.62k]
  ------------------
   72|      0|    return CURLE_TOO_LARGE;
   73|  3.62k|  curlx_strcopy(dst, size, tmp, len);
   74|  3.62k|  return CURLE_OK;
   75|  3.62k|}

curlx_inet_pton:
  203|  40.5k|{
  204|  40.5k|  switch(af) {
  205|  25.7k|  case AF_INET:
  ------------------
  |  Branch (205:3): [True: 25.7k, False: 14.8k]
  ------------------
  206|  25.7k|    return inet_pton4(src, (unsigned char *)dst);
  207|  14.8k|  case AF_INET6:
  ------------------
  |  Branch (207:3): [True: 14.8k, False: 25.7k]
  ------------------
  208|  14.8k|    return inet_pton6(src, (unsigned char *)dst);
  209|      0|  default:
  ------------------
  |  Branch (209:3): [True: 0, False: 40.5k]
  ------------------
  210|      0|    return -1;
  211|  40.5k|  }
  212|       |  /* NOTREACHED */
  213|  40.5k|}
inet_pton.c:inet_pton4:
   63|  25.9k|{
   64|  25.9k|  int saw_digit, octets, ch;
   65|  25.9k|  unsigned char tmp[INADDRSZ], *tp;
   66|       |
   67|  25.9k|  saw_digit = 0;
   68|  25.9k|  octets = 0;
   69|  25.9k|  tp = tmp;
   70|  25.9k|  *tp = 0;
   71|   146k|  while((ch = (unsigned char)*src++) != '\0') {
  ------------------
  |  Branch (71:9): [True: 135k, False: 11.6k]
  ------------------
   72|   135k|    if(ISDIGIT(ch)) {
  ------------------
  |  |   42|   135k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 101k, False: 33.2k]
  |  |  |  Branch (42:38): [True: 88.2k, False: 13.7k]
  |  |  ------------------
  ------------------
   73|  88.2k|      unsigned int val = (*tp * 10) + (ch - '0');
   74|       |
   75|  88.2k|      if(saw_digit && *tp == 0)
  ------------------
  |  Branch (75:10): [True: 44.0k, False: 44.2k]
  |  Branch (75:23): [True: 122, False: 43.9k]
  ------------------
   76|    122|        return 0;
   77|  88.1k|      if(val > 255)
  ------------------
  |  Branch (77:10): [True: 90, False: 88.0k]
  ------------------
   78|     90|        return 0;
   79|  88.0k|      *tp = (unsigned char)val;
   80|  88.0k|      if(!saw_digit) {
  ------------------
  |  Branch (80:10): [True: 44.2k, False: 43.8k]
  ------------------
   81|  44.2k|        if(++octets > 4)
  ------------------
  |  Branch (81:12): [True: 0, False: 44.2k]
  ------------------
   82|      0|          return 0;
   83|  44.2k|        saw_digit = 1;
   84|  44.2k|      }
   85|  88.0k|    }
   86|  47.0k|    else if(ch == '.' && saw_digit) {
  ------------------
  |  Branch (86:13): [True: 33.0k, False: 13.9k]
  |  Branch (86:26): [True: 32.9k, False: 108]
  ------------------
   87|  32.9k|      if(octets == 4)
  ------------------
  |  Branch (87:10): [True: 0, False: 32.9k]
  ------------------
   88|      0|        return 0;
   89|  32.9k|      *++tp = 0;
   90|  32.9k|      saw_digit = 0;
   91|  32.9k|    }
   92|  14.0k|    else
   93|  14.0k|      return 0;
   94|   135k|  }
   95|  11.6k|  if(octets < 4)
  ------------------
  |  Branch (95:6): [True: 812, False: 10.8k]
  ------------------
   96|    812|    return 0;
   97|  10.8k|  memcpy(dst, tmp, INADDRSZ);
  ------------------
  |  |   36|  10.8k|#define INADDRSZ         4
  ------------------
   98|  10.8k|  return 1;
   99|  11.6k|}
inet_pton.c:inet_pton6:
  114|  14.8k|{
  115|  14.8k|  unsigned char tmp[IN6ADDRSZ], *tp, *endp, *colonp;
  116|  14.8k|  const char *curtok;
  117|  14.8k|  int ch, saw_xdigit;
  118|  14.8k|  size_t val;
  119|       |
  120|  14.8k|  memset((tp = tmp), 0, IN6ADDRSZ);
  ------------------
  |  |   35|  14.8k|#define IN6ADDRSZ       16
  ------------------
  121|  14.8k|  endp = tp + IN6ADDRSZ;
  ------------------
  |  |   35|  14.8k|#define IN6ADDRSZ       16
  ------------------
  122|  14.8k|  colonp = NULL;
  123|       |  /* Leading :: requires some special handling. */
  124|  14.8k|  if(*src == ':')
  ------------------
  |  Branch (124:6): [True: 76, False: 14.7k]
  ------------------
  125|     76|    if(*++src != ':')
  ------------------
  |  Branch (125:8): [True: 54, False: 22]
  ------------------
  126|     54|      return 0;
  127|  14.7k|  curtok = src;
  128|  14.7k|  saw_xdigit = 0;
  129|  14.7k|  val = 0;
  130|  15.8k|  while((ch = (unsigned char)*src++) != '\0') {
  ------------------
  |  Branch (130:9): [True: 14.9k, False: 880]
  ------------------
  131|  14.9k|    if(ISXDIGIT(ch)) {
  ------------------
  |  |   37|  14.9k|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   42|  29.8k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 14.5k, False: 397]
  |  |  |  |  |  Branch (42:38): [True: 717, False: 13.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  29.1k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 13.3k, False: 856]
  |  |  |  |  |  Branch (27:43): [True: 66, False: 13.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  14.1k|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 13.6k, False: 463]
  |  |  |  |  |  Branch (28:43): [True: 261, False: 13.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  132|  1.04k|      val <<= 4;
  133|  1.04k|      val |= curlx_hexval(ch);
  ------------------
  |  |  111|  1.04k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  134|  1.04k|      if(++saw_xdigit > 4)
  ------------------
  |  Branch (134:10): [True: 93, False: 951]
  ------------------
  135|     93|        return 0;
  136|    951|      continue;
  137|  1.04k|    }
  138|  13.8k|    if(ch == ':') {
  ------------------
  |  Branch (138:8): [True: 66, False: 13.8k]
  ------------------
  139|     66|      curtok = src;
  140|     66|      if(!saw_xdigit) {
  ------------------
  |  Branch (140:10): [True: 36, False: 30]
  ------------------
  141|     36|        if(colonp)
  ------------------
  |  Branch (141:12): [True: 6, False: 30]
  ------------------
  142|      6|          return 0;
  143|     30|        colonp = tp;
  144|     30|        continue;
  145|     36|      }
  146|     30|      if(tp + INT16SZ > endp)
  ------------------
  |  |   37|     30|#define INT16SZ          2
  ------------------
  |  Branch (146:10): [True: 0, False: 30]
  ------------------
  147|      0|        return 0;
  148|     30|      *tp++ = (unsigned char)((val >> 8) & 0xff);
  149|     30|      *tp++ = (unsigned char)(val & 0xff);
  150|     30|      saw_xdigit = 0;
  151|     30|      val = 0;
  152|     30|      continue;
  153|     30|    }
  154|  13.8k|    if(ch == '.' && ((tp + INADDRSZ) <= endp) &&
  ------------------
  |  |   36|    209|#define INADDRSZ         4
  ------------------
  |  Branch (154:8): [True: 209, False: 13.6k]
  |  Branch (154:21): [True: 209, False: 0]
  ------------------
  155|    209|       inet_pton4(curtok, tp) > 0) {
  ------------------
  |  Branch (155:8): [True: 0, False: 209]
  ------------------
  156|      0|      tp += INADDRSZ;
  ------------------
  |  |   36|      0|#define INADDRSZ         4
  ------------------
  157|      0|      saw_xdigit = 0;
  158|      0|      break;    /* '\0' was seen by inet_pton4(). */
  159|      0|    }
  160|  13.8k|    return 0;
  161|  13.8k|  }
  162|    880|  if(saw_xdigit) {
  ------------------
  |  Branch (162:6): [True: 106, False: 774]
  ------------------
  163|    106|    if(tp + INT16SZ > endp)
  ------------------
  |  |   37|    106|#define INT16SZ          2
  ------------------
  |  Branch (163:8): [True: 0, False: 106]
  ------------------
  164|      0|      return 0;
  165|    106|    *tp++ = (unsigned char)((val >> 8) & 0xff);
  166|    106|    *tp++ = (unsigned char)(val & 0xff);
  167|    106|  }
  168|    880|  if(colonp) {
  ------------------
  |  Branch (168:6): [True: 22, False: 858]
  ------------------
  169|       |    /*
  170|       |     * Since some memmove()'s erroneously fail to handle
  171|       |     * overlapping regions, we do the shift by hand.
  172|       |     */
  173|     22|    const ssize_t n = tp - colonp;
  174|     22|    ssize_t i;
  175|       |
  176|     22|    if(tp == endp)
  ------------------
  |  Branch (176:8): [True: 0, False: 22]
  ------------------
  177|      0|      return 0;
  178|     38|    for(i = 1; i <= n; i++) {
  ------------------
  |  Branch (178:16): [True: 16, False: 22]
  ------------------
  179|     16|      *(endp - i) = *(colonp + n - i);
  180|     16|      *(colonp + n - i) = 0;
  181|     16|    }
  182|     22|    tp = endp;
  183|     22|  }
  184|    880|  if(tp != endp)
  ------------------
  |  Branch (184:6): [True: 858, False: 22]
  ------------------
  185|    858|    return 0;
  186|     22|  memcpy(dst, tmp, IN6ADDRSZ);
  ------------------
  |  |   35|     22|#define IN6ADDRSZ       16
  ------------------
  187|     22|  return 1;
  188|    880|}

curlx_nonblock:
   47|  6.64k|{
   48|  6.64k|#ifdef HAVE_FCNTL_O_NONBLOCK
   49|       |  /* most recent Unix versions */
   50|  6.64k|  int flags;
   51|  6.64k|  flags = sfcntl(sockfd, F_GETFL, 0);
  ------------------
  |  |  998|  6.64k|#  define sfcntl  fcntl
  ------------------
   52|  6.64k|  if(flags < 0)
  ------------------
  |  Branch (52:6): [True: 0, False: 6.64k]
  ------------------
   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|  6.64k|  if(!!(flags & O_NONBLOCK) == !!nonblock)
  ------------------
  |  Branch (57:6): [True: 3.01k, False: 3.62k]
  ------------------
   58|  3.01k|    return 0;
   59|  3.62k|  if(nonblock)
  ------------------
  |  Branch (59:6): [True: 3.62k, False: 0]
  ------------------
   60|  3.62k|    flags |= O_NONBLOCK;
   61|      0|  else
   62|      0|    flags &= ~O_NONBLOCK;
   63|  3.62k|  return sfcntl(sockfd, F_SETFL, flags);
  ------------------
  |  |  998|  3.62k|#  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|  6.64k|}

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

curlx_memdup:
   65|  1.97k|{
   66|  1.97k|  void *buffer = curlx_malloc(length);
  ------------------
  |  | 1471|  1.97k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
   67|  1.97k|  if(!buffer)
  ------------------
  |  Branch (67:6): [True: 0, False: 1.97k]
  ------------------
   68|      0|    return NULL; /* fail */
   69|       |
   70|  1.97k|  memcpy(buffer, src, length);
   71|       |
   72|  1.97k|  return buffer;
   73|  1.97k|}
curlx_memdup0:
   86|  66.1k|{
   87|  66.1k|  char *buf = (length < SIZE_MAX) ? curlx_malloc(length + 1) : NULL;
  ------------------
  |  | 1471|  66.1k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  |  Branch (87:15): [True: 66.1k, False: 0]
  ------------------
   88|  66.1k|  if(!buf)
  ------------------
  |  Branch (88:6): [True: 0, False: 66.1k]
  ------------------
   89|      0|    return NULL;
   90|  66.1k|  if(length) {
  ------------------
  |  Branch (90:6): [True: 55.1k, False: 10.9k]
  ------------------
   91|  55.1k|    DEBUGASSERT(src); /* must never be NULL */
  ------------------
  |  | 1075|  55.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (91:5): [True: 0, False: 55.1k]
  |  Branch (91:5): [True: 55.1k, False: 0]
  ------------------
   92|  55.1k|    memcpy(buf, src, length);
   93|  55.1k|  }
   94|  66.1k|  buf[length] = 0;
   95|  66.1k|  return buf;
   96|  66.1k|}
curlx_memzero:
  113|  11.6k|{
  114|  11.6k|  if(buf)
  ------------------
  |  Branch (114:6): [True: 11.6k, False: 0]
  ------------------
  115|  11.6k|    curlx_memzero_low(buf, size);
  ------------------
  |  | 1650|  11.6k|#define curlx_memzero_low(buf, size)  explicit_bzero(buf, size)
  ------------------
  116|  11.6k|}
curlx_strzero:
  120|  15.0k|{
  121|  15.0k|  if(buf)
  ------------------
  |  Branch (121:6): [True: 151, False: 14.8k]
  ------------------
  122|    151|    curlx_memzero_low(buf, strlen(buf));
  ------------------
  |  | 1650|    151|#define curlx_memzero_low(buf, size)  explicit_bzero(buf, size)
  ------------------
  123|  15.0k|}

curlx_str_init:
   27|  6.50k|{
   28|       |  out->str = NULL;
   29|  6.50k|  out->len = 0;
   30|  6.50k|}
curlx_str_assign:
   33|  10.8k|{
   34|  10.8k|  out->str = str;
   35|  10.8k|  out->len = len;
   36|  10.8k|}
curlx_str_until:
   51|  5.74k|{
   52|  5.74k|  const char *s;
   53|  5.74k|  size_t len = 0;
   54|  5.74k|  DEBUGASSERT(linep);
  ------------------
  |  | 1075|  5.74k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (54:3): [True: 0, False: 5.74k]
  |  Branch (54:3): [True: 5.74k, False: 0]
  ------------------
   55|  5.74k|  DEBUGASSERT(*linep);
  ------------------
  |  | 1075|  5.74k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (55:3): [True: 0, False: 5.74k]
  |  Branch (55:3): [True: 5.74k, False: 0]
  ------------------
   56|  5.74k|  DEBUGASSERT(out);
  ------------------
  |  | 1075|  5.74k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (56:3): [True: 0, False: 5.74k]
  |  Branch (56:3): [True: 5.74k, False: 0]
  ------------------
   57|  5.74k|  DEBUGASSERT(delim);
  ------------------
  |  | 1075|  5.74k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (57:3): [True: 0, False: 5.74k]
  |  Branch (57:3): [True: 5.74k, False: 0]
  ------------------
   58|  5.74k|  s = *linep;
   59|       |
   60|  5.74k|  curlx_str_init(out);
   61|  62.1k|  while(*s && (*s != delim)) {
  ------------------
  |  Branch (61:9): [True: 56.6k, False: 5.52k]
  |  Branch (61:15): [True: 56.3k, False: 214]
  ------------------
   62|  56.3k|    s++;
   63|  56.3k|    if(++len > max) {
  ------------------
  |  Branch (63:8): [True: 0, False: 56.3k]
  ------------------
   64|      0|      return STRE_BIG;
  ------------------
  |  |   29|      0|#define STRE_BIG      1
  ------------------
   65|      0|    }
   66|  56.3k|  }
   67|  5.74k|  if(!len)
  ------------------
  |  Branch (67:6): [True: 430, False: 5.31k]
  ------------------
   68|    430|    return STRE_SHORT;
  ------------------
  |  |   30|    430|#define STRE_SHORT    2
  ------------------
   69|  5.31k|  out->str = *linep;
   70|  5.31k|  out->len = len;
   71|  5.31k|  *linep = s; /* point to the first byte after the word */
   72|  5.31k|  return STRE_OK;
  ------------------
  |  |   28|  5.31k|#define STRE_OK       0
  ------------------
   73|  5.74k|}
curlx_str_word:
   78|  3.73k|{
   79|  3.73k|  return curlx_str_until(linep, out, max, ' ');
   80|  3.73k|}
curlx_str_untilnl:
   86|    146|{
   87|    146|  const char *s = *linep;
   88|    146|  size_t len = 0;
   89|    146|  DEBUGASSERT(linep && *linep && out && max);
  ------------------
  |  | 1075|    146|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (89:3): [True: 0, False: 146]
  |  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: 146, False: 0]
  |  Branch (89:3): [True: 146, False: 0]
  |  Branch (89:3): [True: 146, False: 0]
  |  Branch (89:3): [True: 146, False: 0]
  ------------------
   90|       |
   91|    146|  curlx_str_init(out);
   92|  2.44k|  while(*s && !ISNEWLINE(*s)) {
  ------------------
  |  |   48|  2.32k|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (48:26): [True: 1, False: 2.32k]
  |  |  |  Branch (48:43): [True: 28, False: 2.29k]
  |  |  ------------------
  ------------------
  |  Branch (92:9): [True: 2.32k, False: 117]
  ------------------
   93|  2.29k|    s++;
   94|  2.29k|    if(++len > max)
  ------------------
  |  Branch (94:8): [True: 0, False: 2.29k]
  ------------------
   95|      0|      return STRE_BIG;
  ------------------
  |  |   29|      0|#define STRE_BIG      1
  ------------------
   96|  2.29k|  }
   97|    146|  if(!len)
  ------------------
  |  Branch (97:6): [True: 40, False: 106]
  ------------------
   98|     40|    return STRE_SHORT;
  ------------------
  |  |   30|     40|#define STRE_SHORT    2
  ------------------
   99|    106|  out->str = *linep;
  100|    106|  out->len = len;
  101|    106|  *linep = s; /* point to the first byte after the word */
  102|    106|  return STRE_OK;
  ------------------
  |  |   28|    106|#define STRE_OK       0
  ------------------
  103|    146|}
curlx_str_single:
  139|   126k|{
  140|   126k|  DEBUGASSERT(linep && *linep);
  ------------------
  |  | 1075|   126k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (140:3): [True: 0, False: 126k]
  |  Branch (140:3): [True: 0, False: 0]
  |  Branch (140:3): [True: 126k, False: 0]
  |  Branch (140:3): [True: 126k, False: 0]
  ------------------
  141|   126k|  if(**linep != byte)
  ------------------
  |  Branch (141:6): [True: 123k, False: 3.42k]
  ------------------
  142|   123k|    return STRE_BYTE;
  ------------------
  |  |   33|   123k|#define STRE_BYTE     5
  ------------------
  143|  3.42k|  (*linep)++; /* move over it */
  144|  3.42k|  return STRE_OK;
  ------------------
  |  |   28|  3.42k|#define STRE_OK       0
  ------------------
  145|   126k|}
curlx_str_singlespace:
  150|  3.73k|{
  151|  3.73k|  return curlx_str_single(linep, ' ');
  152|  3.73k|}
curlx_str_number:
  209|   297k|{
  210|   297k|  return str_num_base(linep, nump, max, 10);
  211|   297k|}
curlx_str_hex:
  216|      1|{
  217|      1|  return str_num_base(linep, nump, max, 16);
  218|      1|}
curlx_str_numblanks:
  232|     39|{
  233|     39|  curlx_str_passblanks(str);
  234|     39|  return curlx_str_number(str, num, CURL_OFF_T_MAX);
  ------------------
  |  |  588|     39|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  235|     39|}
curlx_str_newline:
  240|     36|{
  241|     36|  DEBUGASSERT(linep && *linep);
  ------------------
  |  | 1075|     36|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (241:3): [True: 0, False: 36]
  |  Branch (241:3): [True: 0, False: 0]
  |  Branch (241:3): [True: 36, False: 0]
  |  Branch (241:3): [True: 36, False: 0]
  ------------------
  242|     36|  if(ISNEWLINE(**linep)) {
  ------------------
  |  |   48|     36|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (48:26): [True: 0, False: 36]
  |  |  |  Branch (48:43): [True: 36, False: 0]
  |  |  ------------------
  ------------------
  243|     36|    (*linep)++;
  244|     36|    return STRE_OK; /* yessir */
  ------------------
  |  |   28|     36|#define STRE_OK       0
  ------------------
  245|     36|  }
  246|      0|  return STRE_NEWLINE;
  ------------------
  |  |   34|      0|#define STRE_NEWLINE  6
  ------------------
  247|     36|}
curlx_str_casecompare:
  253|  2.95k|{
  254|  2.95k|  size_t clen = check ? strlen(check) : 0;
  ------------------
  |  Branch (254:17): [True: 2.95k, False: 0]
  ------------------
  255|  2.95k|  return ((str->len == clen) && curl_strnequal(str->str, check, clen));
  ------------------
  |  Branch (255:11): [True: 1.10k, False: 1.84k]
  |  Branch (255:33): [True: 943, False: 165]
  ------------------
  256|  2.95k|}
curlx_str_cmp:
  261|      1|{
  262|      1|  if(check) {
  ------------------
  |  Branch (262:6): [True: 1, False: 0]
  ------------------
  263|      1|    size_t clen = strlen(check);
  264|      1|    return ((str->len == clen) && !strncmp(str->str, check, clen));
  ------------------
  |  Branch (264:13): [True: 1, False: 0]
  |  Branch (264:35): [True: 1, False: 0]
  ------------------
  265|      1|  }
  266|      0|  return !!str->len;
  267|      1|}
curlx_str_nudge:
  272|  2.02k|{
  273|  2.02k|  if(num <= str->len) {
  ------------------
  |  Branch (273:6): [True: 2.02k, False: 0]
  ------------------
  274|  2.02k|    str->str += num;
  275|  2.02k|    str->len -= num;
  276|  2.02k|    return STRE_OK;
  ------------------
  |  |   28|  2.02k|#define STRE_OK       0
  ------------------
  277|  2.02k|  }
  278|      0|  return STRE_OVERFLOW;
  ------------------
  |  |   35|      0|#define STRE_OVERFLOW 7
  ------------------
  279|  2.02k|}
curlx_str_cspn:
  285|  3.90k|{
  286|  3.90k|  const char *s = *linep;
  287|  3.90k|  size_t len;
  288|  3.90k|  DEBUGASSERT(linep && *linep);
  ------------------
  |  | 1075|  3.90k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (288:3): [True: 0, False: 3.90k]
  |  Branch (288:3): [True: 0, False: 0]
  |  Branch (288:3): [True: 3.90k, False: 0]
  |  Branch (288:3): [True: 3.90k, False: 0]
  ------------------
  289|       |
  290|  3.90k|  len = strcspn(s, reject);
  291|  3.90k|  if(len) {
  ------------------
  |  Branch (291:6): [True: 3.63k, False: 270]
  ------------------
  292|  3.63k|    out->str = s;
  293|  3.63k|    out->len = len;
  294|  3.63k|    *linep = &s[len];
  295|  3.63k|    return STRE_OK;
  ------------------
  |  |   28|  3.63k|#define STRE_OK       0
  ------------------
  296|  3.63k|  }
  297|    270|  curlx_str_init(out);
  298|    270|  return STRE_SHORT;
  ------------------
  |  |   30|    270|#define STRE_SHORT    2
  ------------------
  299|  3.90k|}
curlx_str_trimblanks:
  303|  3.86k|{
  304|  5.87k|  while(out->len && ISBLANK(*out->str))
  ------------------
  |  |   43|  5.78k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 2.01k, False: 3.77k]
  |  |  |  Branch (43:38): [True: 0, False: 3.77k]
  |  |  ------------------
  ------------------
  |  Branch (304:9): [True: 5.78k, False: 93]
  ------------------
  305|  2.01k|    curlx_str_nudge(out, 1);
  306|       |
  307|       |  /* trim trailing spaces and tabs */
  308|  3.91k|  while(out->len && ISBLANK(out->str[out->len - 1]))
  ------------------
  |  |   43|  3.82k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 26, False: 3.79k]
  |  |  |  Branch (43:38): [True: 25, False: 3.77k]
  |  |  ------------------
  ------------------
  |  Branch (308:9): [True: 3.82k, False: 93]
  ------------------
  309|     51|    out->len--;
  310|  3.86k|}
curlx_str_passblanks:
  314|  7.52k|{
  315|  7.58k|  while(ISBLANK(**linep))
  ------------------
  |  |   43|  7.58k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 65, False: 7.52k]
  |  |  |  Branch (43:38): [True: 0, False: 7.52k]
  |  |  ------------------
  ------------------
  316|     65|    (*linep)++; /* move over it */
  317|  7.52k|}
strparse.c:str_num_base:
  172|   297k|{
  173|   297k|  curl_off_t num = 0;
  174|   297k|  const char *p;
  175|   297k|  int m = (base == 10) ? '9' :   /* the largest digit possible */
  ------------------
  |  Branch (175:11): [True: 297k, False: 1]
  ------------------
  176|   297k|    (base == 16) ? 'f' : '7';
  ------------------
  |  Branch (176:5): [True: 1, False: 0]
  ------------------
  177|   297k|  DEBUGASSERT(linep && *linep && nump);
  ------------------
  |  | 1075|   297k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (177:3): [True: 0, False: 297k]
  |  Branch (177:3): [True: 0, False: 0]
  |  Branch (177:3): [True: 0, False: 0]
  |  Branch (177:3): [True: 297k, False: 0]
  |  Branch (177:3): [True: 297k, False: 0]
  |  Branch (177:3): [True: 297k, False: 0]
  ------------------
  178|   297k|  DEBUGASSERT((base == 8) || (base == 10) || (base == 16));
  ------------------
  |  | 1075|   297k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (178:3): [True: 297k, False: 0]
  |  Branch (178:3): [True: 0, False: 0]
  |  Branch (178:3): [True: 0, False: 0]
  |  Branch (178:3): [True: 0, False: 297k]
  |  Branch (178:3): [True: 297k, False: 1]
  |  Branch (178:3): [True: 1, False: 0]
  ------------------
  179|   297k|  DEBUGASSERT(max >= 0); /* mostly to catch SIZE_MAX, which is too large */
  ------------------
  |  | 1075|   297k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 0, False: 297k]
  |  Branch (179:3): [True: 297k, False: 0]
  ------------------
  180|   297k|  *nump = 0;
  181|   297k|  p = *linep;
  182|   297k|  if(!valid_digit(*p, m))
  ------------------
  |  |  156|   297k|  (((x) >= '0') && ((x) <= (m)) && curlx_hexasciitable[(x) - '0'])
  |  |  ------------------
  |  |  |  Branch (156:4): [True: 297k, False: 24]
  |  |  |  Branch (156:20): [True: 229k, False: 68.2k]
  |  |  |  Branch (156:36): [True: 229k, False: 0]
  |  |  ------------------
  ------------------
  183|  68.2k|    return STRE_NO_NUM;
  ------------------
  |  |   36|  68.2k|#define STRE_NO_NUM   8
  ------------------
  184|   229k|  if(max < base) {
  ------------------
  |  Branch (184:6): [True: 0, False: 229k]
  ------------------
  185|       |    /* special-case low max scenario because check needs to be different */
  186|      0|    do {
  187|      0|      int n = curlx_hexval(*p++);
  ------------------
  |  |  111|      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|   229k|  else {
  194|   464k|    do {
  195|   464k|      int n = curlx_hexval(*p++);
  ------------------
  |  |  111|   464k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  196|   464k|      if(num > ((max - n) / base))
  ------------------
  |  Branch (196:10): [True: 9, False: 464k]
  ------------------
  197|      9|        return STRE_OVERFLOW;
  ------------------
  |  |   35|      9|#define STRE_OVERFLOW 7
  ------------------
  198|   464k|      num = (num * base) + n;
  199|   464k|    } while(valid_digit(*p, m));
  ------------------
  |  |  156|   464k|  (((x) >= '0') && ((x) <= (m)) && curlx_hexasciitable[(x) - '0'])
  |  |  ------------------
  |  |  |  Branch (156:4): [True: 462k, False: 1.45k]
  |  |  |  Branch (156:20): [True: 234k, False: 227k]
  |  |  |  Branch (156:36): [True: 234k, False: 0]
  |  |  ------------------
  ------------------
  200|   229k|  }
  201|   229k|  *nump = num;
  202|   229k|  *linep = p;
  203|   229k|  return STRE_OK;
  ------------------
  |  |   28|   229k|#define STRE_OK       0
  ------------------
  204|   229k|}

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

curlx_uztosi:
   73|  34.7k|{
   74|       |#ifdef __INTEL_COMPILER
   75|       |#pragma warning(push)
   76|       |#pragma warning(disable:810) /* conversion may lose significant bits */
   77|       |#endif
   78|       |
   79|  34.7k|  DEBUGASSERT(uznum <= (size_t)CURL_MASK_SINT);
  ------------------
  |  | 1075|  34.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (79:3): [True: 0, False: 34.7k]
  |  Branch (79:3): [True: 34.7k, False: 0]
  ------------------
   80|  34.7k|  return (int)(uznum & (size_t)CURL_MASK_SINT);
  ------------------
  |  |   44|  34.7k|#define CURL_MASK_SINT    (CURL_MASK_UINT >> 1)
  |  |  ------------------
  |  |  |  |   43|  34.7k|#define CURL_MASK_UINT    ((unsigned int)~0)
  |  |  ------------------
  ------------------
   81|       |
   82|       |#ifdef __INTEL_COMPILER
   83|       |#pragma warning(pop)
   84|       |#endif
   85|  34.7k|}
curlx_uztoui:
  111|      5|{
  112|       |#ifdef __INTEL_COMPILER
  113|       |#pragma warning(push)
  114|       |#pragma warning(disable:810) /* conversion may lose significant bits */
  115|       |#endif
  116|       |
  117|      5|#if UINT_MAX < SIZE_MAX
  118|      5|  DEBUGASSERT(uznum <= (size_t)CURL_MASK_UINT);
  ------------------
  |  | 1075|      5|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (118:3): [True: 0, False: 5]
  |  Branch (118:3): [True: 5, False: 0]
  ------------------
  119|      5|#endif
  120|      5|  return (unsigned int)(uznum & (size_t)CURL_MASK_UINT);
  ------------------
  |  |   43|      5|#define CURL_MASK_UINT    ((unsigned int)~0)
  ------------------
  121|       |
  122|       |#ifdef __INTEL_COMPILER
  123|       |#pragma warning(pop)
  124|       |#endif
  125|      5|}
curlx_sotouz:
  210|  37.1k|{
  211|       |#ifdef __INTEL_COMPILER
  212|       |#pragma warning(push)
  213|       |#pragma warning(disable:810) /* conversion may lose significant bits */
  214|       |#endif
  215|       |
  216|  37.1k|  DEBUGASSERT(sonum >= 0);
  ------------------
  |  | 1075|  37.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (216:3): [True: 0, False: 37.1k]
  |  Branch (216:3): [True: 37.1k, False: 0]
  ------------------
  217|  37.1k|  return (size_t)(sonum & (curl_off_t)CURL_MASK_USIZE_T);
  ------------------
  |  |   48|  37.1k|#define CURL_MASK_USIZE_T ((size_t)~0)
  ------------------
  218|       |
  219|       |#ifdef __INTEL_COMPILER
  220|       |#pragma warning(pop)
  221|       |#endif
  222|  37.1k|}
curlx_uitouz:
  282|  10.8k|{
  283|  10.8k|  return (size_t)uinum;
  284|  10.8k|}
curlx_sotouz_range:
  287|     36|{
  288|     36|  if(sonum < 0)
  ------------------
  |  Branch (288:6): [True: 0, False: 36]
  ------------------
  289|      0|    return uzmin;
  290|       |#if SIZEOF_CURL_OFF_T > SIZEOF_SIZE_T
  291|       |  if(sonum > SIZE_MAX)
  292|       |    return uzmax;
  293|       |#endif
  294|     36|  return CURLMIN(CURLMAX((size_t)sonum, uzmin), uzmax);
  ------------------
  |  | 1288|     72|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1288:24): [True: 36, False: 0]
  |  |  |  Branch (1288:25): [True: 22, False: 14]
  |  |  |  Branch (1288:37): [True: 22, False: 14]
  |  |  ------------------
  ------------------
  295|     36|}
curlx_sztouz:
  298|  68.3k|{
  299|  68.3k|  if(sznum < 0) {
  ------------------
  |  Branch (299:6): [True: 7.32k, False: 61.0k]
  ------------------
  300|  7.32k|    *puznum = 0;
  301|  7.32k|    return FALSE;
  ------------------
  |  | 1048|  7.32k|#define FALSE false
  ------------------
  302|  7.32k|  }
  303|  61.0k|  *puznum = (size_t)sznum;
  304|       |  return TRUE;
  ------------------
  |  | 1045|  61.0k|#define TRUE true
  ------------------
  305|  68.3k|}

Curl_cw_out_done:
  491|  3.62k|{
  492|  3.62k|  struct Curl_cwriter *cw_out;
  493|  3.62k|  CURLcode result = CURLE_OK;
  494|       |
  495|  3.62k|  cw_out = Curl_cwriter_get_by_type(data, &Curl_cwt_out);
  496|  3.62k|  if(cw_out) {
  ------------------
  |  Branch (496:6): [True: 3.62k, False: 0]
  ------------------
  497|  3.62k|    CURL_TRC_WRITE(data, "[OUT] done");
  ------------------
  |  |  158|  3.62k|  do {                                                     \
  |  |  159|  3.62k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|  3.62k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|  3.62k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  3.62k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  498|  3.62k|    result = Curl_client_flush(data);
  499|  3.62k|    if(!result)
  ------------------
  |  Branch (499:8): [True: 3.62k, False: 0]
  ------------------
  500|  3.62k|      result = cw_out_do_flush(data, cw_out, TRUE);
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  501|  3.62k|  }
  502|  3.62k|  return result;
  503|  3.62k|}
cw-out.c:cw_out_init:
  105|  3.62k|{
  106|  3.62k|  struct cw_out_ctx *ctx = writer->ctx;
  107|  3.62k|  (void)data;
  108|       |  ctx->buf = NULL;
  109|  3.62k|  return CURLE_OK;
  110|  3.62k|}
cw-out.c:cw_out_write:
  427|    219|{
  428|    219|  struct cw_out_ctx *ctx = writer->ctx;
  429|    219|  CURLcode result;
  430|    219|  bool flush_all = !!(type & CLIENTWRITE_EOS);
  ------------------
  |  |   50|    219|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  431|       |
  432|    219|  if((type & CLIENTWRITE_BODY) ||
  ------------------
  |  |   43|    219|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (432:6): [True: 32, False: 187]
  ------------------
  433|    187|     ((type & CLIENTWRITE_HEADER) && data->set.include_header)) {
  ------------------
  |  |   45|    187|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
  |  Branch (433:7): [True: 187, False: 0]
  |  Branch (433:38): [True: 0, False: 187]
  ------------------
  434|     32|    cw_out_type otype = (!blen && (type & CLIENTWRITE_0LEN)) ?
  ------------------
  |  |   51|      9|#define CLIENTWRITE_0LEN    (1 << 8) /* write even 0-length buffers */
  ------------------
  |  Branch (434:26): [True: 9, False: 23]
  |  Branch (434:35): [True: 0, False: 9]
  ------------------
  435|     32|                        CW_OUT_BODY_0LEN : CW_OUT_BODY;
  436|     32|    result = cw_out_do_write(ctx, data, otype, flush_all, buf, blen);
  437|     32|    if(result)
  ------------------
  |  Branch (437:8): [True: 0, False: 32]
  ------------------
  438|      0|      return result;
  439|     32|  }
  440|       |
  441|    219|  if(type & (CLIENTWRITE_HEADER | CLIENTWRITE_INFO)) {
  ------------------
  |  |   45|    219|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
                if(type & (CLIENTWRITE_HEADER | CLIENTWRITE_INFO)) {
  ------------------
  |  |   44|    219|#define CLIENTWRITE_INFO    (1 << 1) /* meta information, not a HEADER */
  ------------------
  |  Branch (441:6): [True: 187, False: 32]
  ------------------
  442|    187|    result = cw_out_do_write(ctx, data, CW_OUT_HDS, flush_all, buf, blen);
  443|    187|    if(result)
  ------------------
  |  Branch (443:8): [True: 0, False: 187]
  ------------------
  444|      0|      return result;
  445|    187|  }
  446|       |
  447|    219|  return CURLE_OK;
  448|    219|}
cw-out.c:cw_out_do_write:
  377|    219|{
  378|    219|  CURLcode result = CURLE_OK;
  379|       |
  380|       |  /* if we have buffered data and it is a different type than what
  381|       |   * we are writing now, try to flush all */
  382|    219|  if(ctx->buf && ctx->buf->type != otype) {
  ------------------
  |  Branch (382:6): [True: 0, False: 219]
  |  Branch (382:18): [True: 0, False: 0]
  ------------------
  383|      0|    result = cw_out_flush_chain(ctx, data, &ctx->buf, TRUE);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  384|      0|    if(result)
  ------------------
  |  Branch (384:8): [True: 0, False: 0]
  ------------------
  385|      0|      goto out;
  386|      0|  }
  387|       |
  388|    219|  if(ctx->buf) {
  ------------------
  |  Branch (388:6): [True: 0, False: 219]
  ------------------
  389|       |    /* still have buffered data, append and flush */
  390|      0|    result = cw_out_append(ctx, data, otype, buf, blen);
  391|      0|    if(result)
  ------------------
  |  Branch (391:8): [True: 0, False: 0]
  ------------------
  392|      0|      goto out;
  393|      0|    result = cw_out_flush_chain(ctx, data, &ctx->buf, flush_all);
  394|      0|    if(result)
  ------------------
  |  Branch (394:8): [True: 0, False: 0]
  ------------------
  395|      0|      goto out;
  396|      0|  }
  397|    219|  else {
  398|       |    /* nothing buffered, try direct write */
  399|    219|    size_t consumed;
  400|    219|    result = cw_out_ptr_flush(ctx, data, otype, flush_all,
  401|    219|                              buf, blen, &consumed);
  402|    219|    if(result && (result != CURLE_AGAIN))
  ------------------
  |  Branch (402:8): [True: 0, False: 219]
  |  Branch (402:18): [True: 0, False: 0]
  ------------------
  403|      0|      return result;
  404|    219|    result = CURLE_OK;
  405|    219|    if(consumed < blen) {
  ------------------
  |  Branch (405:8): [True: 0, False: 219]
  ------------------
  406|       |      /* did not write all, append the rest */
  407|      0|      result = cw_out_append(ctx, data, otype,
  408|      0|                             buf + consumed, blen - consumed);
  409|      0|      if(result)
  ------------------
  |  Branch (409:10): [True: 0, False: 0]
  ------------------
  410|      0|        goto out;
  411|      0|    }
  412|    219|  }
  413|       |
  414|    219|out:
  415|    219|  if(result) {
  ------------------
  |  Branch (415:6): [True: 0, False: 219]
  ------------------
  416|       |    /* We do not want to invoke client callbacks a second time after
  417|       |     * encountering an error. See issue #13337 */
  418|       |    ctx->errored = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  419|      0|    cw_out_bufs_free(ctx);
  420|      0|  }
  421|    219|  return result;
  422|    219|}
cw-out.c:cw_out_ptr_flush:
  228|    219|{
  229|    219|  curl_write_callback wcb = NULL;
  230|    219|  void *wcb_data;
  231|    219|  size_t max_write, min_write;
  232|    219|  size_t wlen, nwritten = 0;
  233|    219|  CURLcode result = CURLE_OK;
  234|       |
  235|       |  /* If we errored once, we do not invoke the client callback again */
  236|    219|  if(ctx->errored)
  ------------------
  |  Branch (236:6): [True: 0, False: 219]
  ------------------
  237|      0|    return CURLE_WRITE_ERROR;
  238|       |
  239|       |  /* write callbacks may get NULLed by the client between calls. */
  240|    219|  cw_get_writefunc(data, otype, &wcb, &wcb_data, &max_write, &min_write);
  241|    219|  if(!wcb) {
  ------------------
  |  Branch (241:6): [True: 0, False: 219]
  ------------------
  242|      0|    *pconsumed = blen;
  243|      0|    return CURLE_OK;
  244|      0|  }
  245|       |
  246|    219|  *pconsumed = 0;
  247|    219|  if(otype == CW_OUT_BODY_0LEN) {
  ------------------
  |  Branch (247:6): [True: 0, False: 219]
  ------------------
  248|      0|    DEBUGASSERT(!blen);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (248:5): [True: 0, False: 0]
  |  Branch (248:5): [True: 0, False: 0]
  ------------------
  249|      0|    return cw_out_cb_write(data, wcb, wcb_data, otype,
  250|      0|                           buf, blen, &nwritten);
  251|      0|  }
  252|    219|  else {
  253|    429|    while(blen && !data->req.writer.paused) {
  ------------------
  |  Branch (253:11): [True: 210, False: 219]
  |  Branch (253:19): [True: 210, False: 0]
  ------------------
  254|    210|      if(!flush_all && blen < min_write)
  ------------------
  |  Branch (254:10): [True: 210, False: 0]
  |  Branch (254:24): [True: 0, False: 210]
  ------------------
  255|      0|        break;
  256|    210|      wlen = max_write ? CURLMIN(blen, max_write) : blen;
  ------------------
  |  | 1288|     23|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1288:24): [True: 23, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (256:14): [True: 23, False: 187]
  ------------------
  257|    210|      if(otype == CW_OUT_BODY)
  ------------------
  |  Branch (257:10): [True: 23, False: 187]
  ------------------
  258|     23|        result = Curl_pgrs_deliver_check(data, wlen);
  259|    210|      if(!result)
  ------------------
  |  Branch (259:10): [True: 210, False: 0]
  ------------------
  260|    210|        result = cw_out_cb_write(data, wcb, wcb_data, otype,
  261|    210|                                 buf, wlen, &nwritten);
  262|    210|      if(result)
  ------------------
  |  Branch (262:10): [True: 0, False: 210]
  ------------------
  263|      0|        return result;
  264|    210|      if(otype == CW_OUT_BODY)
  ------------------
  |  Branch (264:10): [True: 23, False: 187]
  ------------------
  265|     23|        Curl_pgrs_deliver_inc(data, nwritten);
  266|    210|      *pconsumed += nwritten;
  267|    210|      blen -= nwritten;
  268|    210|      buf += nwritten;
  269|    210|    }
  270|    219|  }
  271|    219|  return CURLE_OK;
  272|    219|}
cw-out.c:cw_get_writefunc:
  146|    219|{
  147|    219|  switch(otype) {
  148|     32|  case CW_OUT_BODY:
  ------------------
  |  Branch (148:3): [True: 32, False: 187]
  ------------------
  149|     32|  case CW_OUT_BODY_0LEN:
  ------------------
  |  Branch (149:3): [True: 0, False: 219]
  ------------------
  150|     32|    *pwcb = data->set.fwrite_func;
  151|     32|    *pwcb_data = data->set.out;
  152|     32|    *pmax_write = CURL_MAX_WRITE_SIZE;
  ------------------
  |  |  267|     32|#define CURL_MAX_WRITE_SIZE 16384
  ------------------
  153|       |    /* if we ever want buffering of BODY output, we can set `min_write`
  154|       |     * the preferred size. The default should always be to pass data
  155|       |     * to the client as it comes without delay */
  156|     32|    *pmin_write = 0;
  157|     32|    break;
  158|    187|  case CW_OUT_HDS:
  ------------------
  |  Branch (158:3): [True: 187, False: 32]
  ------------------
  159|    187|    *pwcb = data->set.fwrite_header ? data->set.fwrite_header :
  ------------------
  |  Branch (159:13): [True: 187, False: 0]
  ------------------
  160|    187|             (data->set.writeheader ? data->set.fwrite_func : NULL);
  ------------------
  |  Branch (160:15): [True: 0, False: 0]
  ------------------
  161|    187|    *pwcb_data = data->set.writeheader;
  162|    187|    *pmax_write = 0; /* do not chunk-write headers, write them as they are */
  163|    187|    *pmin_write = 0;
  164|    187|    break;
  165|      0|  default:
  ------------------
  |  Branch (165:3): [True: 0, False: 219]
  ------------------
  166|      0|    *pwcb = NULL;
  167|      0|    *pwcb_data = NULL;
  168|      0|    *pmax_write = CURL_MAX_WRITE_SIZE;
  ------------------
  |  |  267|      0|#define CURL_MAX_WRITE_SIZE 16384
  ------------------
  169|      0|    *pmin_write = 0;
  170|    219|  }
  171|    219|}
cw-out.c:cw_out_cb_write:
  179|    210|{
  180|    210|  size_t nwritten;
  181|    210|  CURLcode result;
  182|       |
  183|    210|  NOVERBOSE((void)otype);
  ------------------
  |  | 1612|    210|#define NOVERBOSE(x) Curl_nop_stmt
  |  |  ------------------
  |  |  |  | 1183|    210|#define Curl_nop_stmt do {} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1183:35): [Folded, False: 210]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  184|       |
  185|    210|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1075|    210|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (185:3): [True: 0, False: 210]
  |  Branch (185:3): [True: 210, False: 0]
  ------------------
  186|    210|  *pnwritten = 0;
  187|    210|  {
  188|    210|    struct Curl_mapi_guard guard;
  189|    210|    CURL_CBAPI_START(&guard, data, easy_cw_out_cb);
  ------------------
  |  |  201|    210|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
  190|    210|    nwritten = wcb((char *)CURL_UNCONST(buf), 1, blen, wcb_data);
  ------------------
  |  |  856|    210|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  191|    210|    CURL_CBAPI_END(&guard);
  ------------------
  |  |  205|    210|  Curl_cbapi_leave(g)
  ------------------
  192|    210|  }
  193|    210|  CURL_TRC_WRITE(data, "[OUT] wrote %zu %s bytes, type=%x -> %zu",
  ------------------
  |  |  158|    210|  do {                                                     \
  |  |  159|    210|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|    210|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|    420|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 210, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 210]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|    420|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|    210|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|    210|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  ------------------
  |  |  |  Branch (160:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  161|    210|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 210]
  |  |  ------------------
  ------------------
  194|    210|                 blen, (otype == CW_OUT_HDS) ? "header" : "body",
  195|    210|                 (unsigned int)otype, nwritten);
  196|    210|  if(nwritten == CURL_WRITEFUNC_PAUSE) {
  ------------------
  |  |  279|    210|#define CURL_WRITEFUNC_PAUSE 0x10000001
  ------------------
  |  Branch (196:6): [True: 0, False: 210]
  ------------------
  197|      0|    if(data->conn->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  214|      0|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (197:8): [True: 0, False: 0]
  ------------------
  198|       |      /* Protocols that work without network cannot be paused. This is
  199|       |         actually only file:// now, and it cannot pause since the transfer is
  200|       |         not done using the "normal" procedure. */
  201|      0|      failf(data, "Write callback asked for PAUSE when not supported");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  202|      0|      return CURLE_WRITE_ERROR;
  203|      0|    }
  204|      0|    data->req.writer.paused = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  205|      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)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      0|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  206|      0|    result = Curl_xfer_pause_recv(data, TRUE);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  207|      0|    return result ? result : CURLE_AGAIN;
  ------------------
  |  Branch (207:12): [True: 0, False: 0]
  ------------------
  208|      0|  }
  209|    210|  else if(nwritten == CURL_WRITEFUNC_ERROR) {
  ------------------
  |  |  283|    210|#define CURL_WRITEFUNC_ERROR 0xFFFFFFFF
  ------------------
  |  Branch (209:11): [True: 0, False: 210]
  ------------------
  210|      0|    failf(data, "client returned ERROR on write of %zu bytes", blen);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  211|      0|    return CURLE_WRITE_ERROR;
  212|      0|  }
  213|    210|  else if(nwritten != blen) {
  ------------------
  |  Branch (213:11): [True: 0, False: 210]
  ------------------
  214|      0|    failf(data, "Failure writing output to destination, "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  215|      0|          "passed %zu returned %zu", blen, nwritten);
  216|      0|    return CURLE_WRITE_ERROR;
  217|      0|  }
  218|    210|  *pnwritten = nwritten;
  219|    210|  return CURLE_OK;
  220|    210|}
cw-out.c:cw_out_bufs_free:
  113|  3.62k|{
  114|  3.62k|  while(ctx->buf) {
  ------------------
  |  Branch (114:9): [True: 0, False: 3.62k]
  ------------------
  115|      0|    struct cw_out_buf *next = ctx->buf->next;
  116|      0|    cw_out_buf_free(ctx->buf);
  117|      0|    ctx->buf = next;
  118|      0|  }
  119|  3.62k|}
cw-out.c:cw_out_flush:
  475|  3.62k|{
  476|       |  return cw_out_do_flush(data, writer, FALSE);
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  477|  3.62k|}
cw-out.c:cw_out_close:
  133|  3.62k|{
  134|  3.62k|  struct cw_out_ctx *ctx = writer->ctx;
  135|       |
  136|  3.62k|  (void)data;
  137|  3.62k|  cw_out_bufs_free(ctx);
  138|  3.62k|}
cw-out.c:cw_out_do_flush:
  453|  7.25k|{
  454|  7.25k|  struct cw_out_ctx *ctx = (struct cw_out_ctx *)cw_out;
  455|       |
  456|  7.25k|  if(ctx->errored)
  ------------------
  |  Branch (456:6): [True: 0, False: 7.25k]
  ------------------
  457|      0|    return CURLE_WRITE_ERROR;
  458|       |
  459|  7.25k|  if(!data->req.writer.paused && ctx->buf) {
  ------------------
  |  Branch (459:6): [True: 7.25k, False: 0]
  |  Branch (459:34): [True: 0, False: 7.25k]
  ------------------
  460|      0|    CURLcode result;
  461|       |
  462|      0|    CURL_TRC_WRITE(data, "[OUT] flush");
  ------------------
  |  |  158|      0|  do {                                                     \
  |  |  159|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      0|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  463|      0|    result = cw_out_flush_chain(ctx, data, &ctx->buf, flush_all);
  464|      0|    if(result) {
  ------------------
  |  Branch (464:8): [True: 0, False: 0]
  ------------------
  465|      0|      ctx->errored = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  466|      0|      cw_out_bufs_free(ctx);
  467|      0|      return result;
  468|      0|    }
  469|      0|  }
  470|  7.25k|  return CURLE_OK;
  471|  7.25k|}

cw-pause.c:cw_pause_init:
   75|      3|{
   76|      3|  struct cw_pause_ctx *ctx = writer->ctx;
   77|      3|  (void)data;
   78|       |  ctx->buf = NULL;
   79|      3|  return CURLE_OK;
   80|      3|}
cw-pause.c:cw_pause_write:
  149|      6|{
  150|      6|  struct cw_pause_ctx *ctx = writer->ctx;
  151|      6|  CURLcode result = CURLE_OK;
  152|      6|  size_t wlen = 0;
  153|       |
  154|      6|  if(ctx->buf && !Curl_cwriter_is_paused(data)) {
  ------------------
  |  |  194|      0|#define Curl_cwriter_is_paused(d)     ((bool)(d)->req.writer.paused)
  ------------------
  |  Branch (154:6): [True: 0, False: 6]
  |  Branch (154:18): [True: 0, False: 0]
  ------------------
  155|      0|    result = cw_pause_flush(data, writer);
  156|      0|    if(result)
  ------------------
  |  Branch (156:8): [True: 0, False: 0]
  ------------------
  157|      0|      return result;
  158|      0|  }
  159|       |
  160|      6|  while(!ctx->buf && !Curl_cwriter_is_paused(data)) {
  ------------------
  |  |  194|      6|#define Curl_cwriter_is_paused(d)     ((bool)(d)->req.writer.paused)
  ------------------
  |  Branch (160:9): [True: 6, False: 0]
  |  Branch (160:22): [True: 6, False: 0]
  ------------------
  161|      6|    int wtype = type;
  162|      6|    DEBUGASSERT(!ctx->buf);
  ------------------
  |  | 1075|      6|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (162:5): [True: 0, False: 6]
  |  Branch (162:5): [True: 6, False: 0]
  ------------------
  163|       |    /* content decoding might blow up size considerably, write smaller
  164|       |     * chunks to make pausing need buffer less. */
  165|      6|    wlen = (type & CLIENTWRITE_BODY) ?
  ------------------
  |  |   43|      6|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (165:12): [True: 0, False: 6]
  ------------------
  166|      6|           CURLMIN(blen, CW_PAUSE_DEC_WRITE_CHUNK) : blen;
  ------------------
  |  | 1288|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1288:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  167|      6|    if(wlen < blen)
  ------------------
  |  Branch (167:8): [True: 0, False: 6]
  ------------------
  168|      0|      wtype &= ~CLIENTWRITE_EOS;
  ------------------
  |  |   50|      0|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  169|      6|    result = Curl_cwriter_write(data, writer->next, wtype, buf, wlen);
  ------------------
  |  |  188|      6|  ((w) ? (w)->cwt->do_write((d), (w), (t), (b), (n)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (188:4): [True: 6, False: 0]
  |  |  ------------------
  ------------------
  170|      6|    if(result)
  ------------------
  |  Branch (170:8): [True: 0, False: 6]
  ------------------
  171|      0|      return result;
  172|      6|    buf += wlen;
  173|      6|    blen -= wlen;
  174|      6|    if(!blen)
  ------------------
  |  Branch (174:8): [True: 6, False: 0]
  ------------------
  175|      6|      return result;
  176|      6|  }
  177|       |
  178|      0|  do {
  179|      0|    size_t nwritten = 0;
  180|      0|    if(ctx->buf && (ctx->buf->type == type) && (type & CLIENTWRITE_BODY)) {
  ------------------
  |  |   43|      0|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (180:8): [True: 0, False: 0]
  |  Branch (180:20): [True: 0, False: 0]
  |  Branch (180:48): [True: 0, False: 0]
  ------------------
  181|       |      /* same type and body, append to current buffer which has a soft
  182|       |       * limit and should take everything up to OOM. */
  183|      0|      result = Curl_bufq_cwrite(&ctx->buf->b, buf, blen, &nwritten);
  184|      0|    }
  185|      0|    else {
  186|       |      /* Need a new buf, type changed */
  187|      0|      struct cw_pause_buf *cwbuf = cw_pause_buf_create(type, blen);
  188|      0|      if(!cwbuf)
  ------------------
  |  Branch (188:10): [True: 0, False: 0]
  ------------------
  189|      0|        return CURLE_OUT_OF_MEMORY;
  190|      0|      cwbuf->next = ctx->buf;
  191|      0|      ctx->buf = cwbuf;
  192|      0|      result = Curl_bufq_cwrite(&ctx->buf->b, buf, blen, &nwritten);
  193|      0|    }
  194|      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)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      0|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  195|      0|                   "total=%zu -> %d", nwritten, (unsigned int)type,
  196|      0|                   ctx->buf_total + wlen, (int)result);
  197|      0|    if(result)
  ------------------
  |  Branch (197:8): [True: 0, False: 0]
  ------------------
  198|      0|      return result;
  199|      0|    buf += nwritten;
  200|      0|    blen -= nwritten;
  201|      0|    ctx->buf_total += nwritten;
  202|      0|  } while(blen);
  ------------------
  |  Branch (202:11): [True: 0, False: 0]
  ------------------
  203|       |
  204|      0|  return result;
  205|      0|}
cw-pause.c:cw_pause_flush:
  101|      3|{
  102|      3|  struct cw_pause_ctx *ctx = (struct cw_pause_ctx *)cw_pause;
  103|      3|  CURLcode result = CURLE_OK;
  104|       |
  105|       |  /* write the end of the chain until it blocks or gets empty */
  106|      3|  while(ctx->buf && !Curl_cwriter_is_paused(data)) {
  ------------------
  |  |  194|      0|#define Curl_cwriter_is_paused(d)     ((bool)(d)->req.writer.paused)
  ------------------
  |  Branch (106:9): [True: 0, False: 3]
  |  Branch (106:21): [True: 0, False: 0]
  ------------------
  107|      0|    struct cw_pause_buf **plast = &ctx->buf;
  108|      0|    size_t blen, wlen = 0;
  109|      0|    const unsigned char *buf = NULL;
  110|       |
  111|      0|    while((*plast)->next) /* got to last in list */
  ------------------
  |  Branch (111:11): [True: 0, False: 0]
  ------------------
  112|      0|      plast = &(*plast)->next;
  113|      0|    if(Curl_bufq_peek(&(*plast)->b, &buf, &blen)) {
  ------------------
  |  Branch (113:8): [True: 0, False: 0]
  ------------------
  114|      0|      wlen = ((*plast)->type & CLIENTWRITE_BODY) ?
  ------------------
  |  |   43|      0|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (114:14): [True: 0, False: 0]
  ------------------
  115|      0|             CURLMIN(blen, CW_PAUSE_DEC_WRITE_CHUNK) : blen;
  ------------------
  |  | 1288|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1288:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  116|      0|      result = Curl_cwriter_write(data, cw_pause->next, (*plast)->type,
  ------------------
  |  |  188|      0|  ((w) ? (w)->cwt->do_write((d), (w), (t), (b), (n)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (188:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  117|      0|                                  (const char *)buf, wlen);
  118|      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)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      0|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  119|      0|                     wlen, ctx->buf_total, (unsigned int)(*plast)->type,
  120|      0|                     (int)result);
  121|      0|      Curl_bufq_skip(&(*plast)->b, wlen);
  122|      0|      DEBUGASSERT(ctx->buf_total >= wlen);
  ------------------
  |  | 1075|      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) {
  ------------------
  |  |   50|      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,
  ------------------
  |  |  188|      0|  ((w) ? (w)->cwt->do_write((d), (w), (t), (b), (n)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (188:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  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)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330: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, (unsigned int)(*plast)->type,
  132|      0|                     (int)result);
  133|      0|    }
  134|       |
  135|      0|    if(Curl_bufq_is_empty(&(*plast)->b)) {
  ------------------
  |  Branch (135:8): [True: 0, False: 0]
  ------------------
  136|      0|      cw_pause_buf_free(*plast);
  137|      0|      *plast = NULL;
  138|      0|    }
  139|      0|  }
  140|       |
  141|      3|  if(!result)
  ------------------
  |  Branch (141:6): [True: 3, False: 0]
  ------------------
  142|      3|    result = Curl_cwriter_flush(data, cw_pause->next);
  ------------------
  |  |  191|      3|  ((w) ? (w)->cwt->do_flush((d), (w)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (191:4): [True: 3, False: 0]
  |  |  ------------------
  ------------------
  143|      3|  return result;
  144|      3|}
cw-pause.c:cw_pause_close:
   92|      3|{
   93|      3|  struct cw_pause_ctx *ctx = writer->ctx;
   94|       |
   95|      3|  (void)data;
   96|      3|  cw_pause_bufs_free(ctx);
   97|      3|}
cw-pause.c:cw_pause_bufs_free:
   83|      3|{
   84|      3|  while(ctx->buf) {
  ------------------
  |  Branch (84:9): [True: 0, False: 3]
  ------------------
   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|      3|}

Curl_dynhds_init:
   59|      8|{
   60|      8|  DEBUGASSERT(dynhds);
  ------------------
  |  | 1075|      8|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (60:3): [True: 0, False: 8]
  |  Branch (60:3): [True: 8, False: 0]
  ------------------
   61|      8|  DEBUGASSERT(max_strs_size);
  ------------------
  |  | 1075|      8|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (61:3): [True: 0, False: 8]
  |  Branch (61:3): [True: 8, False: 0]
  ------------------
   62|      8|  dynhds->hds = NULL;
   63|      8|  dynhds->hds_len = dynhds->hds_allc = dynhds->strs_len = 0;
   64|      8|  dynhds->max_entries = max_entries;
   65|      8|  dynhds->max_strs_size = max_strs_size;
   66|      8|  dynhds->opts = 0;
   67|      8|}
Curl_dynhds_free:
   70|      8|{
   71|      8|  DEBUGASSERT(dynhds);
  ------------------
  |  | 1075|      8|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (71:3): [True: 0, False: 8]
  |  Branch (71:3): [True: 8, False: 0]
  ------------------
   72|      8|  if(dynhds->hds && dynhds->hds_len) {
  ------------------
  |  Branch (72:6): [True: 4, False: 4]
  |  Branch (72:21): [True: 4, False: 0]
  ------------------
   73|      4|    size_t i;
   74|      4|    DEBUGASSERT(dynhds->hds);
  ------------------
  |  | 1075|      4|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (74:5): [True: 0, False: 4]
  |  Branch (74:5): [True: 4, False: 0]
  ------------------
   75|     18|    for(i = 0; i < dynhds->hds_len; ++i) {
  ------------------
  |  Branch (75:16): [True: 14, False: 4]
  ------------------
   76|     14|      entry_free(dynhds->hds[i]);
   77|     14|    }
   78|      4|  }
   79|      8|  curlx_safefree(dynhds->hds);
  ------------------
  |  | 1332|      8|  do {                      \
  |  | 1333|      8|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|      8|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|      8|    (ptr) = NULL;           \
  |  | 1335|      8|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 8]
  |  |  ------------------
  ------------------
   80|      8|  dynhds->hds_len = dynhds->hds_allc = dynhds->strs_len = 0;
   81|      8|}
Curl_dynhds_reset:
   84|      2|{
   85|      2|  DEBUGASSERT(dynhds);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (85:3): [True: 0, False: 2]
  |  Branch (85:3): [True: 2, False: 0]
  ------------------
   86|      2|  if(dynhds->hds_len) {
  ------------------
  |  Branch (86:6): [True: 0, False: 2]
  ------------------
   87|      0|    size_t i;
   88|      0|    DEBUGASSERT(dynhds->hds);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (88:5): [True: 0, False: 0]
  |  Branch (88:5): [True: 0, False: 0]
  ------------------
   89|      0|    for(i = 0; i < dynhds->hds_len; ++i) {
  ------------------
  |  Branch (89:16): [True: 0, False: 0]
  ------------------
   90|      0|      entry_free(dynhds->hds[i]);
   91|      0|      dynhds->hds[i] = NULL;
   92|      0|    }
   93|      0|  }
   94|      2|  dynhds->hds_len = dynhds->strs_len = 0;
   95|      2|}
Curl_dynhds_count:
   98|      6|{
   99|      6|  return dynhds->hds_len;
  100|      6|}
Curl_dynhds_set_opts:
  103|      2|{
  104|      2|  dynhds->opts = opts;
  105|      2|}
Curl_dynhds_getn:
  108|      4|{
  109|      4|  DEBUGASSERT(dynhds);
  ------------------
  |  | 1075|      4|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (109:3): [True: 0, False: 4]
  |  Branch (109:3): [True: 4, False: 0]
  ------------------
  110|      4|  return (n < dynhds->hds_len) ? dynhds->hds[n] : NULL;
  ------------------
  |  Branch (110:10): [True: 4, False: 0]
  ------------------
  111|      4|}
Curl_dynhds_get:
  115|      2|{
  116|      2|  size_t i;
  117|      2|  for(i = 0; i < dynhds->hds_len; ++i) {
  ------------------
  |  Branch (117:14): [True: 2, False: 0]
  ------------------
  118|      2|    if(dynhds->hds[i]->namelen == namelen &&
  ------------------
  |  Branch (118:8): [True: 2, False: 0]
  ------------------
  119|      2|       curl_strnequal(dynhds->hds[i]->name, name, namelen)) {
  ------------------
  |  Branch (119:8): [True: 2, False: 0]
  ------------------
  120|      2|      return dynhds->hds[i];
  121|      2|    }
  122|      2|  }
  123|      0|  return NULL;
  124|      2|}
Curl_dynhds_add:
  134|     14|{
  135|     14|  struct dynhds_entry *entry = NULL;
  136|     14|  CURLcode result = CURLE_OUT_OF_MEMORY;
  137|       |
  138|     14|  DEBUGASSERT(dynhds);
  ------------------
  |  | 1075|     14|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (138:3): [True: 0, False: 14]
  |  Branch (138:3): [True: 14, False: 0]
  ------------------
  139|     14|  if(dynhds->max_entries && dynhds->hds_len >= dynhds->max_entries)
  ------------------
  |  Branch (139:6): [True: 0, False: 14]
  |  Branch (139:29): [True: 0, False: 0]
  ------------------
  140|      0|    return CURLE_OUT_OF_MEMORY;
  141|     14|  if(dynhds->strs_len + namelen + valuelen > dynhds->max_strs_size)
  ------------------
  |  Branch (141:6): [True: 0, False: 14]
  ------------------
  142|      0|    return CURLE_OUT_OF_MEMORY;
  143|       |
  144|     14|  entry = entry_new(name, namelen, value, valuelen, dynhds->opts);
  145|     14|  if(!entry)
  ------------------
  |  Branch (145:6): [True: 0, False: 14]
  ------------------
  146|      0|    goto out;
  147|       |
  148|     14|  if(dynhds->hds_len + 1 >= dynhds->hds_allc) {
  ------------------
  |  Branch (148:6): [True: 4, False: 10]
  ------------------
  149|      4|    size_t nallc = dynhds->hds_len + 16;
  150|      4|    struct dynhds_entry **nhds;
  151|       |
  152|      4|    if(dynhds->max_entries && nallc > dynhds->max_entries)
  ------------------
  |  Branch (152:8): [True: 0, False: 4]
  |  Branch (152:31): [True: 0, False: 0]
  ------------------
  153|      0|      nallc = dynhds->max_entries;
  154|       |
  155|      4|    nhds = curlx_calloc(nallc, sizeof(struct dynhds_entry *));
  ------------------
  |  | 1473|      4|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  156|      4|    if(!nhds)
  ------------------
  |  Branch (156:8): [True: 0, False: 4]
  ------------------
  157|      0|      goto out;
  158|      4|    if(dynhds->hds) {
  ------------------
  |  Branch (158:8): [True: 0, False: 4]
  ------------------
  159|      0|      memcpy(nhds, dynhds->hds,
  160|      0|             dynhds->hds_len * sizeof(struct dynhds_entry *));
  161|      0|      curlx_safefree(dynhds->hds);
  ------------------
  |  | 1332|      0|  do {                      \
  |  | 1333|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|      0|    (ptr) = NULL;           \
  |  | 1335|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  162|      0|    }
  163|      4|    dynhds->hds = nhds;
  164|      4|    dynhds->hds_allc = nallc;
  165|      4|  }
  166|     14|  dynhds->hds[dynhds->hds_len++] = entry;
  167|     14|  entry = NULL;
  168|     14|  dynhds->strs_len += namelen + valuelen;
  169|     14|  result = CURLE_OK;
  170|       |
  171|     14|out:
  172|     14|  if(entry)
  ------------------
  |  Branch (172:6): [True: 0, False: 14]
  ------------------
  173|      0|    entry_free(entry);
  174|     14|  return result;
  175|     14|}
Curl_dynhds_h1_add_line:
  185|      4|{
  186|      4|  const char *p;
  187|      4|  const char *name;
  188|      4|  size_t namelen;
  189|      4|  const char *value;
  190|      4|  size_t valuelen, i;
  191|       |
  192|      4|  if(!line || !line_len)
  ------------------
  |  Branch (192:6): [True: 0, False: 4]
  |  Branch (192:15): [True: 0, False: 4]
  ------------------
  193|      0|    return CURLE_OK;
  194|       |
  195|      4|  p = memchr(line, ':', line_len);
  196|      4|  if(!p)
  ------------------
  |  Branch (196:6): [True: 0, False: 4]
  ------------------
  197|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  198|      4|  name = line;
  199|      4|  namelen = p - line;
  200|      4|  p++; /* move past the colon */
  201|      8|  for(i = namelen + 1; i < line_len; ++i, ++p) {
  ------------------
  |  Branch (201:24): [True: 8, False: 0]
  ------------------
  202|      8|    if(!ISBLANK(*p))
  ------------------
  |  |   43|      8|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 4, False: 4]
  |  |  |  Branch (43:38): [True: 0, False: 4]
  |  |  ------------------
  ------------------
  203|      4|      break;
  204|      8|  }
  205|      4|  value = p;
  206|      4|  valuelen = line_len - i;
  207|       |
  208|      4|  p = memchr(value, '\r', valuelen);
  209|      4|  if(!p)
  ------------------
  |  Branch (209:6): [True: 4, False: 0]
  ------------------
  210|      4|    p = memchr(value, '\n', valuelen);
  211|      4|  if(p)
  ------------------
  |  Branch (211:6): [True: 0, False: 4]
  ------------------
  212|      0|    valuelen = (size_t)(p - value);
  213|       |
  214|      4|  return Curl_dynhds_add(dynhds, name, namelen, value, valuelen);
  215|      4|}
Curl_dynhds_to_nva:
  364|      2|{
  365|      2|  nghttp2_nv *nva = curlx_calloc(1, sizeof(nghttp2_nv) * dynhds->hds_len);
  ------------------
  |  | 1473|      2|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  366|      2|  size_t i;
  367|       |
  368|      2|  *pcount = 0;
  369|      2|  if(!nva)
  ------------------
  |  Branch (369:6): [True: 0, False: 2]
  ------------------
  370|      0|    return NULL;
  371|       |
  372|     12|  for(i = 0; i < dynhds->hds_len; ++i) {
  ------------------
  |  Branch (372:14): [True: 10, False: 2]
  ------------------
  373|     10|    struct dynhds_entry *e = dynhds->hds[i];
  374|     10|    DEBUGASSERT(e);
  ------------------
  |  | 1075|     10|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (374:5): [True: 0, False: 10]
  |  Branch (374:5): [True: 10, False: 0]
  ------------------
  375|     10|    nva[i].name = (unsigned char *)e->name;
  376|     10|    nva[i].namelen = e->namelen;
  377|     10|    nva[i].value = (unsigned char *)e->value;
  378|     10|    nva[i].valuelen = e->valuelen;
  379|     10|    nva[i].flags = NGHTTP2_NV_FLAG_NONE;
  380|     10|  }
  381|      2|  *pcount = dynhds->hds_len;
  382|      2|  return nva;
  383|      2|}
dynhds.c:entry_free:
   53|     14|{
   54|     14|  curlx_free(e);
  ------------------
  |  | 1476|     14|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   55|     14|}
dynhds.c:entry_new:
   32|     14|{
   33|     14|  struct dynhds_entry *e;
   34|     14|  char *p;
   35|       |
   36|     14|  DEBUGASSERT(name);
  ------------------
  |  | 1075|     14|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (36:3): [True: 0, False: 14]
  |  Branch (36:3): [True: 14, False: 0]
  ------------------
   37|     14|  DEBUGASSERT(value);
  ------------------
  |  | 1075|     14|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (37:3): [True: 0, False: 14]
  |  Branch (37:3): [True: 14, False: 0]
  ------------------
   38|     14|  e = curlx_calloc(1, sizeof(*e) + namelen + valuelen + 2);
  ------------------
  |  | 1473|     14|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   39|     14|  if(!e)
  ------------------
  |  Branch (39:6): [True: 0, False: 14]
  ------------------
   40|      0|    return NULL;
   41|     14|  e->name = p = (char *)e + sizeof(*e);
   42|     14|  memcpy(p, name, namelen);
   43|     14|  e->namelen = namelen;
   44|     14|  e->value = p += namelen + 1; /* leave a \0 at the end of name */
   45|     14|  memcpy(p, value, valuelen);
   46|     14|  e->valuelen = valuelen;
   47|     14|  if(opts & DYNHDS_OPT_LOWERCASE)
  ------------------
  |  |   54|     14|#define DYNHDS_OPT_LOWERCASE     (1 << 0)
  ------------------
  |  Branch (47:6): [True: 10, False: 4]
  ------------------
   48|     10|    Curl_strntolower(e->name, e->name, e->namelen);
   49|     14|  return e;
   50|     14|}

curl_global_init:
  205|      2|{
  206|      2|  CURLcode result;
  207|      2|  global_init_lock();
  ------------------
  |  |   90|      2|#define global_init_lock()   curl_simple_lock_lock(&s_lock)
  ------------------
  208|       |
  209|      2|  result = global_init(flags, TRUE);
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
  210|       |
  211|      2|  global_init_unlock();
  ------------------
  |  |   91|      2|#define global_init_unlock() curl_simple_lock_unlock(&s_lock)
  ------------------
  212|       |
  213|      2|  return result;
  214|      2|}
curl_easy_init:
  338|  7.46k|{
  339|  7.46k|  CURLcode result;
  340|  7.46k|  struct Curl_easy *data;
  341|       |
  342|       |  /* Make sure we inited the global SSL stuff */
  343|  7.46k|  global_init_lock();
  ------------------
  |  |   90|  7.46k|#define global_init_lock()   curl_simple_lock_lock(&s_lock)
  ------------------
  344|       |
  345|  7.46k|  if(!initialized) {
  ------------------
  |  Branch (345:6): [True: 0, False: 7.46k]
  ------------------
  346|      0|    result = global_init(CURL_GLOBAL_DEFAULT, TRUE);
  ------------------
  |  | 3048|      0|#define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL
  |  |  ------------------
  |  |  |  | 3046|      0|#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32)
  |  |  |  |  ------------------
  |  |  |  |  |  | 3044|      0|#define CURL_GLOBAL_SSL (1 << 0) /* no purpose since 7.57.0 */
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32)
  |  |  |  |  ------------------
  |  |  |  |  |  | 3045|      0|#define CURL_GLOBAL_WIN32 (1 << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  result = global_init(CURL_GLOBAL_DEFAULT, TRUE);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  347|      0|    if(result) {
  ------------------
  |  Branch (347:8): [True: 0, False: 0]
  ------------------
  348|       |      /* something in the global init failed, return nothing */
  349|      0|      DEBUGF(curl_mfprintf(stderr, "Error: curl_global_init failed\n"));
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  ------------------
  350|      0|      global_init_unlock();
  ------------------
  |  |   91|      0|#define global_init_unlock() curl_simple_lock_unlock(&s_lock)
  ------------------
  351|      0|      return NULL;
  352|      0|    }
  353|      0|  }
  354|  7.46k|  global_init_unlock();
  ------------------
  |  |   91|  7.46k|#define global_init_unlock() curl_simple_lock_unlock(&s_lock)
  ------------------
  355|       |
  356|       |  /* We use Curl_open() with undefined URL so far */
  357|  7.46k|  result = Curl_open(&data);
  358|  7.46k|  if(result) {
  ------------------
  |  Branch (358:6): [True: 0, False: 7.46k]
  ------------------
  359|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_open failed\n"));
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  ------------------
  360|      0|    return NULL;
  361|      0|  }
  362|       |
  363|  7.46k|  return data;
  364|  7.46k|}
curl_easy_cleanup:
  856|  3.73k|{
  857|  3.73k|  struct Curl_eapi_guard guard;
  858|       |
  859|  3.73k|  if(CURL_EAPI_ENTER(&guard, curl, easy_cleanup, NULL)) {
  ------------------
  |  |  163|  3.73k|  Curl_eapi_enter((g), (curl), CURL_EAPI_FN_##fn, (r)) && (curl)
  |  |  ------------------
  |  |  |  Branch (163:3): [True: 3.73k, False: 0]
  |  |  |  Branch (163:59): [True: 3.73k, False: 0]
  |  |  ------------------
  ------------------
  860|  3.73k|    struct Curl_easy *data = curl;
  861|  3.73k|    struct Curl_sigpipe_ctx sigpipe_ctx;
  862|  3.73k|    sigpipe_ignore(data, &sigpipe_ctx);
  863|  3.73k|    Curl_close(&data);
  864|  3.73k|    sigpipe_restore(&sigpipe_ctx);
  865|  3.73k|  }
  866|  3.73k|  CURL_EAPI_LEAVE(&guard);
  ------------------
  |  |  165|  3.73k|  Curl_eapi_leave(g)
  ------------------
  867|  3.73k|}
curl_easy_getinfo:
  875|  51.8k|{
  876|  51.8k|  struct Curl_eapi_guard guard;
  877|  51.8k|  CURLcode result;
  878|       |
  879|  51.8k|  if(CURL_EAPI_ENTER(&guard, curl, easy_getinfo, &result)) {
  ------------------
  |  |  163|  51.8k|  Curl_eapi_enter((g), (curl), CURL_EAPI_FN_##fn, (r)) && (curl)
  |  |  ------------------
  |  |  |  Branch (163:3): [True: 51.8k, False: 0]
  |  |  |  Branch (163:59): [True: 51.8k, False: 0]
  |  |  ------------------
  ------------------
  880|  51.8k|    struct Curl_easy *data = curl;
  881|  51.8k|    va_list arg;
  882|  51.8k|    void *paramp;
  883|       |
  884|  51.8k|    va_start(arg, info);
  885|  51.8k|    paramp = va_arg(arg, void *);
  886|       |
  887|  51.8k|    result = Curl_getinfo(data, info, paramp);
  888|       |
  889|  51.8k|    va_end(arg);
  890|  51.8k|  }
  891|  51.8k|  CURL_EAPI_LEAVE(&guard);
  ------------------
  |  |  165|  51.8k|  Curl_eapi_leave(g)
  ------------------
  892|  51.8k|  return result;
  893|  51.8k|}
Curl_meta_remove:
 1432|  3.73k|{
 1433|  3.73k|  Curl_hash_delete(&data->meta_hash, CURL_UNCONST(key), strlen(key) + 1);
  ------------------
  |  |  856|  3.73k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 1434|  3.73k|}
easy.c:global_init:
  128|      2|{
  129|      2|  if(initialized++)
  ------------------
  |  Branch (129:6): [True: 0, False: 2]
  ------------------
  130|      0|    return CURLE_OK;
  131|       |
  132|      2|  if(memoryfuncs) {
  ------------------
  |  Branch (132:6): [True: 2, False: 0]
  ------------------
  133|       |    /* Setup the default memory functions here (again) */
  134|      2|    Curl_cmalloc = (curl_malloc_callback)malloc;
  135|      2|    Curl_cfree = (curl_free_callback)free;
  136|      2|    Curl_crealloc = (curl_realloc_callback)realloc;
  137|      2|    Curl_cstrdup = (curl_strdup_callback)CURLX_STRDUP_LOW;
  ------------------
  |  | 1465|      2|#define CURLX_STRDUP_LOW strdup
  ------------------
  138|      2|    Curl_ccalloc = (curl_calloc_callback)calloc;
  139|      2|  }
  140|       |
  141|      2|  if(Curl_win32_init(flags)) {
  ------------------
  |  |   32|      2|#define Curl_win32_init(x) CURLE_OK
  |  |  ------------------
  |  |  |  Branch (32:28): [Folded, False: 2]
  |  |  ------------------
  ------------------
  142|      0|    DEBUGF(curl_mfprintf(stderr, "Error: win32_init failed\n"));
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  ------------------
  143|      0|    goto fail;
  144|      0|  }
  145|       |
  146|      2|  if(Curl_trc_init()) {
  ------------------
  |  Branch (146:6): [True: 0, False: 2]
  ------------------
  147|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_trc_init failed\n"));
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  ------------------
  148|      0|    goto fail;
  149|      0|  }
  150|       |
  151|      2|  if(!Curl_ssl_init()) {
  ------------------
  |  Branch (151:6): [True: 0, False: 2]
  ------------------
  152|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_ssl_init failed\n"));
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  ------------------
  153|      0|    goto fail;
  154|      0|  }
  155|       |
  156|      2|  if(!Curl_vquic_init()) {
  ------------------
  |  |   84|      2|#define Curl_vquic_init() 1
  ------------------
  |  Branch (156:6): [Folded, False: 2]
  ------------------
  157|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_vquic_init failed\n"));
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  ------------------
  158|      0|    goto fail;
  159|      0|  }
  160|       |
  161|      2|  if(Curl_amiga_init()) {
  ------------------
  |  |   36|      2|#define Curl_amiga_init()    CURLE_OK
  |  |  ------------------
  |  |  |  Branch (36:30): [Folded, False: 2]
  |  |  ------------------
  ------------------
  162|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_amiga_init failed\n"));
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  ------------------
  163|      0|    goto fail;
  164|      0|  }
  165|       |
  166|      2|  if(Curl_macos_init()) {
  ------------------
  |  |   31|      2|#define Curl_macos_init() CURLE_OK
  |  |  ------------------
  |  |  |  Branch (31:27): [Folded, False: 2]
  |  |  ------------------
  ------------------
  167|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_macos_init failed\n"));
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  ------------------
  168|      0|    goto fail;
  169|      0|  }
  170|       |
  171|      2|  if(Curl_async_global_init()) {
  ------------------
  |  Branch (171:6): [True: 0, False: 2]
  ------------------
  172|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_async_global_init failed\n"));
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  ------------------
  173|      0|    goto fail;
  174|      0|  }
  175|       |
  176|      2|  if(Curl_ssh_init()) {
  ------------------
  |  |  259|      2|#define Curl_ssh_init() 0
  |  |  ------------------
  |  |  |  Branch (259:25): [Folded, False: 2]
  |  |  ------------------
  ------------------
  177|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_ssh_init failed\n"));
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  ------------------
  178|      0|    goto fail;
  179|      0|  }
  180|       |
  181|       |#ifdef _WIN32
  182|       |  easy_init_flags = flags;
  183|       |#else
  184|      2|  (void)flags;
  185|      2|#endif
  186|       |
  187|      2|#ifdef DEBUGBUILD
  188|      2|  if(getenv("CURL_GLOBAL_INIT"))
  ------------------
  |  Branch (188:6): [True: 0, False: 2]
  ------------------
  189|       |    /* alloc data that will leak if *cleanup() is not called! */
  190|      0|    leakpointer = curlx_malloc(1);
  ------------------
  |  | 1471|      0|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  191|      2|#endif
  192|       |
  193|      2|  return CURLE_OK;
  194|       |
  195|      0|fail:
  196|      0|  initialized--; /* undo the increase */
  197|      0|  return CURLE_FAILED_INIT;
  198|      2|}

easy.c:curl_simple_lock_lock:
   64|  7.47k|{
   65|  7.47k|  for(;;) {
   66|  7.47k|    if(!atomic_exchange_explicit(lock, true, memory_order_acquire))
  ------------------
  |  Branch (66:8): [True: 7.47k, False: 0]
  ------------------
   67|  7.47k|      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|       |      /* NOLINTNEXTLINE(portability-no-assembler) */
   75|       |      __asm__ volatile("yield" ::: "memory");
   76|       |#elif defined(HAVE_SCHED_YIELD)
   77|       |      sched_yield();
   78|       |#endif
   79|      0|    }
   80|      0|  }
   81|  7.47k|}
easy.c:curl_simple_lock_unlock:
   84|  7.47k|{
   85|  7.47k|  atomic_store_explicit(lock, false, memory_order_release);
   86|  7.47k|}

curl_escape:
   37|      1|{
   38|       |  return curl_easy_escape(NULL, string, length);
   39|      1|}
curl_easy_escape:
   51|      1|{
   52|      1|  size_t len;
   53|      1|  struct dynbuf d;
   54|      1|  (void)curl;
   55|       |
   56|      1|  if(!string || (length < 0))
  ------------------
  |  Branch (56:6): [True: 0, False: 1]
  |  Branch (56:17): [True: 0, False: 1]
  ------------------
   57|      0|    return NULL;
   58|       |
   59|      1|  len = (length ? (size_t)length : strlen(string));
  ------------------
  |  Branch (59:10): [True: 0, False: 1]
  ------------------
   60|      1|  if(!len)
  ------------------
  |  Branch (60:6): [True: 0, False: 1]
  ------------------
   61|      0|    return curlx_strdup("");
  ------------------
  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
   62|       |
   63|      1|  if(len > SIZE_MAX / 16)
  ------------------
  |  Branch (63:6): [True: 0, False: 1]
  ------------------
   64|      0|    return NULL;
   65|       |
   66|      1|  curlx_dyn_init(&d, (len * 3) + 1);
   67|       |
   68|     12|  while(len--) {
  ------------------
  |  Branch (68:9): [True: 11, False: 1]
  ------------------
   69|       |    /* treat the characters unsigned */
   70|     11|    unsigned char in = (unsigned char)*string++;
   71|       |
   72|     11|    if(ISUNRESERVED(in)) {
  ------------------
  |  |   47|     11|#define ISUNRESERVED(x) (ISALNUM(x) || ISURLPUNTCS(x))
  |  |  ------------------
  |  |  |  |   39|     22|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |   42|     22|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (42:22): [True: 11, False: 0]
  |  |  |  |  |  |  |  Branch (42:38): [True: 0, False: 11]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |   41|     22|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (41:22): [True: 0, False: 11]
  |  |  |  |  |  |  |  Branch (41:38): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |   40|     11|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (40:22): [True: 11, False: 0]
  |  |  |  |  |  |  |  Branch (40:38): [True: 11, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISUNRESERVED(x) (ISALNUM(x) || ISURLPUNTCS(x))
  |  |  ------------------
  |  |  |  |   46|      0|  (((x) == '-') || ((x) == '.') || ((x) == '_') || ((x) == '~'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (46:20): [True: 0, False: 0]
  |  |  |  |  |  Branch (46:36): [True: 0, False: 0]
  |  |  |  |  |  Branch (46:52): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   73|       |      /* append this */
   74|     11|      if(curlx_dyn_addn(&d, &in, 1))
  ------------------
  |  Branch (74:10): [True: 0, False: 11]
  ------------------
   75|      0|        return NULL;
   76|     11|    }
   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|     11|  }
   85|       |
   86|      1|  return curlx_dyn_ptr(&d);
   87|      1|}
curl_free:
  191|  3.62k|{
  192|  3.62k|  curlx_free(p);
  ------------------
  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  193|  3.62k|}
Curl_hexencode:
  203|      2|{
  204|      2|  DEBUGASSERT(src && len && (olen >= 3));
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (204:3): [True: 0, False: 2]
  |  Branch (204:3): [True: 0, False: 0]
  |  Branch (204:3): [True: 0, False: 0]
  |  Branch (204:3): [True: 2, False: 0]
  |  Branch (204:3): [True: 2, False: 0]
  |  Branch (204:3): [True: 2, False: 0]
  ------------------
  205|      2|  if(src && len && (olen >= 3)) {
  ------------------
  |  Branch (205:6): [True: 2, False: 0]
  |  Branch (205:13): [True: 2, False: 0]
  |  Branch (205:20): [True: 2, False: 0]
  ------------------
  206|     66|    while(len-- && (olen >= 3)) {
  ------------------
  |  Branch (206:11): [True: 64, False: 2]
  |  Branch (206:20): [True: 64, False: 0]
  ------------------
  207|     64|      out[0] = Curl_ldigits[*src >> 4];
  208|     64|      out[1] = Curl_ldigits[*src & 0x0F];
  209|     64|      ++src;
  210|     64|      out += 2;
  211|     64|      olen -= 2;
  212|     64|    }
  213|      2|    *out = 0;
  214|      2|  }
  215|      0|  else if(olen)
  ------------------
  |  Branch (215:11): [True: 0, False: 0]
  ------------------
  216|      0|    *out = 0;
  217|      2|}
Curl_hexbyte:
  225|  54.5k|{
  226|  54.5k|  dest[0] = Curl_udigits[val >> 4];
  227|  54.5k|  dest[1] = Curl_udigits[val & 0x0F];
  228|  54.5k|}

Curl_wildcard_dtor:
  189|  11.2k|{
  190|  11.2k|  struct WildcardData *wc = *wcp;
  191|  11.2k|  if(!wc)
  ------------------
  |  Branch (191:6): [True: 11.2k, False: 0]
  ------------------
  192|  11.2k|    return;
  193|       |
  194|      0|  if(wc->dtor) {
  ------------------
  |  Branch (194:6): [True: 0, False: 0]
  ------------------
  195|      0|    wc->dtor(wc->ftpwc);
  196|      0|    wc->dtor = ZERO_NULL;
  ------------------
  |  | 1158|      0|#define ZERO_NULL 0
  ------------------
  197|      0|    wc->ftpwc = NULL;
  198|      0|  }
  199|      0|  DEBUGASSERT(!wc->ftpwc);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (199:3): [True: 0, False: 0]
  |  Branch (199:3): [True: 0, False: 0]
  ------------------
  200|       |
  201|      0|  Curl_llist_destroy(&wc->filelist, NULL);
  202|      0|  curlx_safefree(wc->path);
  ------------------
  |  | 1332|      0|  do {                      \
  |  | 1333|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|      0|    (ptr) = NULL;           \
  |  | 1335|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  203|      0|  curlx_safefree(wc->pattern);
  ------------------
  |  | 1332|      0|  do {                      \
  |  | 1333|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|      0|    (ptr) = NULL;           \
  |  | 1335|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  204|      0|  wc->state = CURLWC_INIT;
  205|      0|  curlx_free(wc);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  206|       |  *wcp = NULL;
  207|      0|}

curl_getenv:
   27|  7.25k|{
   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|  7.25k|  char *env = getenv(variable);
   67|  7.25k|  return (env && env[0]) ? curlx_strdup(env) : NULL;
  ------------------
  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  |  Branch (67:11): [True: 0, False: 7.25k]
  |  Branch (67:18): [True: 0, False: 0]
  ------------------
   68|  7.25k|#endif
   69|  7.25k|}

Curl_initinfo:
   42|  11.1k|{
   43|  11.1k|  struct Progress *pro = &data->progress;
   44|  11.1k|  struct PureInfo *info = &data->info;
   45|       |
   46|  11.1k|  memset(&pro->delta, 0, sizeof(pro->delta));
   47|  11.1k|  memset(&pro->total, 0, sizeof(pro->total));
   48|  11.1k|  pro->startransfer_added = FALSE;
  ------------------
  |  | 1048|  11.1k|#define FALSE false
  ------------------
   49|       |
   50|  11.1k|  info->httpcode = 0;
   51|  11.1k|  info->httpproxycode = 0;
   52|  11.1k|  info->httpversion = 0;
   53|  11.1k|  info->filetime = -1; /* -1 is an illegal time and thus means unknown */
   54|  11.1k|  info->timecond = FALSE;
  ------------------
  |  | 1048|  11.1k|#define FALSE false
  ------------------
   55|       |
   56|  11.1k|  info->header_size = 0;
   57|  11.1k|  info->request_size = 0;
   58|  11.1k|  info->proxyauthavail = 0;
   59|  11.1k|  info->httpauthavail = 0;
   60|  11.1k|  info->proxyauthpicked = 0;
   61|  11.1k|  info->httpauthpicked = 0;
   62|  11.1k|  info->numconnects = 0;
   63|       |
   64|  11.1k|  curlx_safefree(info->contenttype);
  ------------------
  |  | 1332|  11.1k|  do {                      \
  |  | 1333|  11.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  11.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.1k|    (ptr) = NULL;           \
  |  | 1335|  11.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.1k]
  |  |  ------------------
  ------------------
   65|  11.1k|  curlx_safefree(info->wouldredirect);
  ------------------
  |  | 1332|  11.1k|  do {                      \
  |  | 1333|  11.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  11.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.1k|    (ptr) = NULL;           \
  |  | 1335|  11.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.1k]
  |  |  ------------------
  ------------------
   66|       |
   67|  11.1k|  memset(&info->primary, 0, sizeof(info->primary));
   68|  11.1k|  info->retry_after = 0;
   69|       |
   70|  11.1k|  info->conn_scheme = 0;
   71|  11.1k|  info->conn_protocol = 0;
   72|  11.1k|  info->used_proxy = 0;
   73|       |
   74|  11.1k|#ifdef USE_SSL
   75|  11.1k|  Curl_ssl_free_certinfo(data);
   76|  11.1k|#endif
   77|  11.1k|}
Curl_getinfo:
  616|  51.8k|{
  617|  51.8k|  va_list arg;
  618|  51.8k|  long *param_longp = NULL;
  619|  51.8k|  double *param_doublep = NULL;
  620|  51.8k|  curl_off_t *param_offt = NULL;
  621|  51.8k|  const char **param_charp = NULL;
  622|  51.8k|  struct curl_slist **param_slistp = NULL;
  623|  51.8k|  curl_socket_t *param_socketp = NULL;
  624|  51.8k|  int type;
  625|  51.8k|  CURLcode result = CURLE_BAD_FUNCTION_ARGUMENT;
  626|       |
  627|  51.8k|  if(!data)
  ------------------
  |  Branch (627:6): [True: 0, False: 51.8k]
  ------------------
  628|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  629|       |
  630|  51.8k|  va_start(arg, info);
  631|       |
  632|  51.8k|  type = CURLINFO_TYPEMASK & (int)info;
  ------------------
  |  | 2927|  51.8k|#define CURLINFO_TYPEMASK 0xf00000
  ------------------
  633|  51.8k|  switch(type) {
  634|  3.73k|  case CURLINFO_STRING:
  ------------------
  |  | 2919|  3.73k|#define CURLINFO_STRING   0x100000
  ------------------
  |  Branch (634:3): [True: 3.73k, False: 48.1k]
  ------------------
  635|  3.73k|    param_charp = va_arg(arg, const char **);
  636|  3.73k|    if(param_charp)
  ------------------
  |  Branch (636:8): [True: 3.73k, False: 0]
  ------------------
  637|  3.73k|      result = getinfo_char(data, info, param_charp);
  638|  3.73k|    break;
  639|  11.0k|  case CURLINFO_LONG:
  ------------------
  |  | 2920|  11.0k|#define CURLINFO_LONG     0x200000
  ------------------
  |  Branch (639:3): [True: 11.0k, False: 40.7k]
  ------------------
  640|  11.0k|    param_longp = va_arg(arg, long *);
  641|  11.0k|    if(param_longp)
  ------------------
  |  Branch (641:8): [True: 11.0k, False: 0]
  ------------------
  642|  11.0k|      result = getinfo_long(data, info, param_longp);
  643|  11.0k|    break;
  644|  3.73k|  case CURLINFO_DOUBLE:
  ------------------
  |  | 2921|  3.73k|#define CURLINFO_DOUBLE   0x300000
  ------------------
  |  Branch (644:3): [True: 3.73k, False: 48.1k]
  ------------------
  645|  3.73k|    param_doublep = va_arg(arg, double *);
  646|  3.73k|    if(param_doublep)
  ------------------
  |  Branch (646:8): [True: 3.73k, False: 0]
  ------------------
  647|  3.73k|      result = getinfo_double(data, info, param_doublep);
  648|  3.73k|    break;
  649|  11.0k|  case CURLINFO_OFF_T:
  ------------------
  |  | 2925|  11.0k|#define CURLINFO_OFF_T    0x600000
  ------------------
  |  Branch (649:3): [True: 11.0k, False: 40.7k]
  ------------------
  650|  11.0k|    param_offt = va_arg(arg, curl_off_t *);
  651|  11.0k|    if(param_offt)
  ------------------
  |  Branch (651:8): [True: 11.0k, False: 0]
  ------------------
  652|  11.0k|      result = getinfo_offt(data, info, param_offt);
  653|  11.0k|    break;
  654|  18.4k|  case CURLINFO_SLIST:
  ------------------
  |  | 2922|  18.4k|#define CURLINFO_SLIST    0x400000
  ------------------
  |  Branch (654:3): [True: 18.4k, False: 33.3k]
  ------------------
  655|  18.4k|    param_slistp = va_arg(arg, struct curl_slist **);
  656|  18.4k|    if(param_slistp)
  ------------------
  |  Branch (656:8): [True: 18.4k, False: 0]
  ------------------
  657|  18.4k|      result = getinfo_slist(data, info, param_slistp);
  658|  18.4k|    break;
  659|  3.73k|  case CURLINFO_SOCKET:
  ------------------
  |  | 2924|  3.73k|#define CURLINFO_SOCKET   0x500000
  ------------------
  |  Branch (659:3): [True: 3.73k, False: 48.1k]
  ------------------
  660|  3.73k|    param_socketp = va_arg(arg, curl_socket_t *);
  661|  3.73k|    if(param_socketp)
  ------------------
  |  Branch (661:8): [True: 3.73k, False: 0]
  ------------------
  662|  3.73k|      result = getinfo_socket(data, info, param_socketp);
  663|  3.73k|    break;
  664|      0|  default:
  ------------------
  |  Branch (664:3): [True: 0, False: 51.8k]
  ------------------
  665|      0|    result = CURLE_UNKNOWN_OPTION;
  666|      0|    break;
  667|  51.8k|  }
  668|       |
  669|  51.8k|  va_end(arg);
  670|       |
  671|  51.8k|  return result;
  672|  51.8k|}
getinfo.c:getinfo_char:
   81|  3.73k|{
   82|  3.73k|  switch(info) {
   83|  3.73k|  case CURLINFO_EFFECTIVE_URL: {
  ------------------
  |  Branch (83:3): [True: 3.73k, False: 0]
  ------------------
   84|  3.73k|    const char *s = Curl_bufref_ptr(&data->state.url);
   85|  3.73k|    *param_charp = s ? s : "";
  ------------------
  |  Branch (85:20): [True: 3.73k, False: 0]
  ------------------
   86|  3.73k|  }
   87|  3.73k|    break;
   88|      0|  case CURLINFO_EFFECTIVE_METHOD: {
  ------------------
  |  Branch (88:3): [True: 0, False: 3.73k]
  ------------------
   89|      0|    const char *m = CURL_EASY_STR(data, STRING_CUSTOMREQUEST);
  ------------------
  |  | 1228|      0|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
   90|      0|    if(!m) {
  ------------------
  |  Branch (90:8): [True: 0, False: 0]
  ------------------
   91|      0|      if(data->set.opt_no_body)
  ------------------
  |  Branch (91:10): [True: 0, False: 0]
  ------------------
   92|      0|        m = "HEAD";
   93|      0|#ifndef CURL_DISABLE_HTTP
   94|      0|      else {
   95|      0|        switch(data->state.httpreq) {
   96|      0|        case HTTPREQ_POST:
  ------------------
  |  Branch (96:9): [True: 0, False: 0]
  ------------------
   97|      0|        case HTTPREQ_POST_FORM:
  ------------------
  |  Branch (97:9): [True: 0, False: 0]
  ------------------
   98|      0|        case HTTPREQ_POST_MIME:
  ------------------
  |  Branch (98:9): [True: 0, False: 0]
  ------------------
   99|      0|          m = "POST";
  100|      0|          break;
  101|      0|        case HTTPREQ_PUT:
  ------------------
  |  Branch (101:9): [True: 0, False: 0]
  ------------------
  102|      0|          m = "PUT";
  103|      0|          break;
  104|      0|        default: /* this should never happen */
  ------------------
  |  Branch (104:9): [True: 0, False: 0]
  ------------------
  105|      0|        case HTTPREQ_GET:
  ------------------
  |  Branch (105:9): [True: 0, False: 0]
  ------------------
  106|      0|          m = "GET";
  107|      0|          break;
  108|      0|        case HTTPREQ_HEAD:
  ------------------
  |  Branch (108:9): [True: 0, False: 0]
  ------------------
  109|      0|          m = "HEAD";
  110|      0|          break;
  111|      0|        }
  112|      0|      }
  113|      0|#endif
  114|      0|    }
  115|      0|    *param_charp = m;
  116|      0|  }
  117|      0|    break;
  118|      0|  case CURLINFO_CONTENT_TYPE:
  ------------------
  |  Branch (118:3): [True: 0, False: 3.73k]
  ------------------
  119|      0|    *param_charp = data->info.contenttype;
  120|      0|    break;
  121|      0|  case CURLINFO_PRIVATE:
  ------------------
  |  Branch (121:3): [True: 0, False: 3.73k]
  ------------------
  122|      0|    *param_charp = (const char *)data->set.private_data;
  123|      0|    break;
  124|      0|  case CURLINFO_FTP_ENTRY_PATH:
  ------------------
  |  Branch (124:3): [True: 0, False: 3.73k]
  ------------------
  125|       |    /* Return the entrypath string from the most recent connection.
  126|       |       This pointer was copied from the connectdata structure by FTP.
  127|       |       The actual string may be freed by subsequent libcurl calls so
  128|       |       it must be copied to a safer area before the next libcurl call.
  129|       |       Callers must never free it themselves. */
  130|      0|    *param_charp = data->state.most_recent_ftp_entrypath;
  131|      0|    break;
  132|      0|  case CURLINFO_REDIRECT_URL:
  ------------------
  |  Branch (132:3): [True: 0, False: 3.73k]
  ------------------
  133|       |    /* Return the URL this request would have been redirected to if that
  134|       |       option had been enabled! */
  135|      0|    *param_charp = data->info.wouldredirect;
  136|      0|    break;
  137|      0|  case CURLINFO_REFERER:
  ------------------
  |  Branch (137:3): [True: 0, False: 3.73k]
  ------------------
  138|       |    /* Return the referrer header for this request, or NULL if unset */
  139|      0|    *param_charp = Curl_bufref_ptr(&data->state.referer);
  140|      0|    break;
  141|      0|  case CURLINFO_PRIMARY_IP:
  ------------------
  |  Branch (141:3): [True: 0, False: 3.73k]
  ------------------
  142|       |    /* Return the ip address of the most recent (primary) connection */
  143|      0|    *param_charp = data->info.primary.remote_ip;
  144|      0|    break;
  145|      0|  case CURLINFO_LOCAL_IP:
  ------------------
  |  Branch (145:3): [True: 0, False: 3.73k]
  ------------------
  146|       |    /* Return the source/local ip address of the most recent (primary)
  147|       |       connection */
  148|      0|    *param_charp = data->info.primary.local_ip;
  149|      0|    break;
  150|      0|  case CURLINFO_RTSP_SESSION_ID:
  ------------------
  |  Branch (150:3): [True: 0, False: 3.73k]
  ------------------
  151|      0|#ifndef CURL_DISABLE_RTSP
  152|      0|    *param_charp = CURL_EASY_STR(data, STRING_RTSP_SESSION_ID);
  ------------------
  |  | 1228|      0|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
  153|       |#else
  154|       |    *param_charp = NULL;
  155|       |#endif
  156|      0|    break;
  157|      0|  case CURLINFO_SCHEME:
  ------------------
  |  Branch (157:3): [True: 0, False: 3.73k]
  ------------------
  158|      0|    *param_charp = data->info.conn_scheme;
  159|      0|    break;
  160|      0|  case CURLINFO_CAPATH:
  ------------------
  |  Branch (160:3): [True: 0, False: 3.73k]
  ------------------
  161|      0|#ifdef CURL_CA_PATH
  162|      0|    *param_charp = CURL_CA_PATH;
  ------------------
  |  |   32|      0|#define CURL_CA_PATH "/etc/ssl/certs"
  ------------------
  163|       |#else
  164|       |    *param_charp = NULL;
  165|       |#endif
  166|      0|    break;
  167|      0|  case CURLINFO_CAINFO:
  ------------------
  |  Branch (167:3): [True: 0, False: 3.73k]
  ------------------
  168|      0|#ifdef CURL_CA_BUNDLE
  169|      0|    *param_charp = CURL_CA_BUNDLE;
  ------------------
  |  |   26|      0|#define CURL_CA_BUNDLE "/etc/ssl/certs/ca-certificates.crt"
  ------------------
  170|       |#else
  171|       |    *param_charp = NULL;
  172|       |#endif
  173|      0|    break;
  174|      0|  default:
  ------------------
  |  Branch (174:3): [True: 0, False: 3.73k]
  ------------------
  175|      0|    return CURLE_UNKNOWN_OPTION;
  176|  3.73k|  }
  177|       |
  178|  3.73k|  return CURLE_OK;
  179|  3.73k|}
getinfo.c:getinfo_long:
  183|  11.0k|{
  184|  11.0k|  curl_socket_t sockfd;
  185|       |
  186|  11.0k|  union {
  187|  11.0k|    unsigned long *to_ulong;
  188|  11.0k|    long          *to_long;
  189|  11.0k|  } lptr;
  190|       |
  191|  11.0k|#ifdef DEBUGBUILD
  192|  11.0k|  const char *envstr;
  193|       |
  194|       |  /* use another variable for this to allow different values */
  195|  11.0k|  switch(info) {
  196|      0|  case CURLINFO_LOCAL_PORT:
  ------------------
  |  Branch (196:3): [True: 0, False: 11.0k]
  ------------------
  197|      0|    envstr = getenv("CURL_TIME");
  198|      0|    if(envstr) {
  ------------------
  |  Branch (198:8): [True: 0, False: 0]
  ------------------
  199|      0|      curl_off_t val;
  200|      0|      curlx_str_number(&envstr, &val, TIME_T_MAX);
  ------------------
  |  |  608|      0|#  define TIME_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  201|      0|      *param_longp = (long)val;
  202|      0|      return CURLE_OK;
  203|      0|    }
  204|      0|    break;
  205|      0|  case CURLINFO_HEADER_SIZE:
  ------------------
  |  Branch (205:3): [True: 0, False: 11.0k]
  ------------------
  206|      0|  case CURLINFO_REQUEST_SIZE:
  ------------------
  |  Branch (206:3): [True: 0, False: 11.0k]
  ------------------
  207|      0|    envstr = getenv("CURL_DEBUG_SIZE");
  208|      0|    if(envstr) {
  ------------------
  |  Branch (208:8): [True: 0, False: 0]
  ------------------
  209|      0|      curl_off_t val;
  210|      0|      curlx_str_number(&envstr, &val, LONG_MAX);
  211|      0|      *param_longp = (long)val;
  212|      0|      return CURLE_OK;
  213|      0|    }
  214|      0|    break;
  215|  11.0k|  default:
  ------------------
  |  Branch (215:3): [True: 11.0k, False: 0]
  ------------------
  216|  11.0k|    break;
  217|  11.0k|  }
  218|  11.0k|#endif
  219|       |
  220|  11.0k|  switch(info) {
  221|  3.73k|  case CURLINFO_RESPONSE_CODE:
  ------------------
  |  Branch (221:3): [True: 3.73k, False: 7.36k]
  ------------------
  222|  3.73k|    *param_longp = data->info.httpcode;
  223|  3.73k|    break;
  224|      0|  case CURLINFO_HTTP_CONNECTCODE:
  ------------------
  |  Branch (224:3): [True: 0, False: 11.0k]
  ------------------
  225|      0|    *param_longp = data->info.httpproxycode;
  226|      0|    break;
  227|      0|  case CURLINFO_FILETIME:
  ------------------
  |  Branch (227:3): [True: 0, False: 11.0k]
  ------------------
  228|      0|    if(data->info.filetime > LONG_MAX)
  ------------------
  |  Branch (228:8): [True: 0, False: 0]
  ------------------
  229|      0|      *param_longp = LONG_MAX;
  230|      0|#if !defined(MSDOS) && !defined(__AMIGA__)
  231|      0|    else if(data->info.filetime < LONG_MIN)
  ------------------
  |  Branch (231:13): [True: 0, False: 0]
  ------------------
  232|      0|      *param_longp = LONG_MIN;
  233|      0|#endif
  234|      0|    else
  235|      0|      *param_longp = (long)data->info.filetime;
  236|      0|    break;
  237|      0|  case CURLINFO_HEADER_SIZE:
  ------------------
  |  Branch (237:3): [True: 0, False: 11.0k]
  ------------------
  238|      0|    *param_longp = (long)data->info.header_size;
  239|      0|    break;
  240|      0|  case CURLINFO_REQUEST_SIZE:
  ------------------
  |  Branch (240:3): [True: 0, False: 11.0k]
  ------------------
  241|      0|    *param_longp = (long)data->info.request_size;
  242|      0|    break;
  243|  7.36k|  case CURLINFO_SSL_VERIFYRESULT:
  ------------------
  |  Branch (243:3): [True: 7.36k, False: 3.73k]
  ------------------
  244|  7.36k|    *param_longp = data->set.ssl.certverifyresult;
  245|  7.36k|    break;
  246|      0|  case CURLINFO_PROXY_SSL_VERIFYRESULT:
  ------------------
  |  Branch (246:3): [True: 0, False: 11.0k]
  ------------------
  247|      0|#ifndef CURL_DISABLE_PROXY
  248|      0|    *param_longp = data->set.proxy_ssl.certverifyresult;
  249|       |#else
  250|       |    *param_longp = 0;
  251|       |#endif
  252|      0|    break;
  253|      0|  case CURLINFO_REDIRECT_COUNT:
  ------------------
  |  Branch (253:3): [True: 0, False: 11.0k]
  ------------------
  254|      0|    *param_longp = data->state.followlocation;
  255|      0|    break;
  256|      0|  case CURLINFO_HTTPAUTH_AVAIL:
  ------------------
  |  Branch (256:3): [True: 0, False: 11.0k]
  ------------------
  257|      0|    lptr.to_long = param_longp;
  258|      0|    *lptr.to_ulong = data->info.httpauthavail;
  259|      0|    break;
  260|      0|  case CURLINFO_PROXYAUTH_AVAIL:
  ------------------
  |  Branch (260:3): [True: 0, False: 11.0k]
  ------------------
  261|      0|    lptr.to_long = param_longp;
  262|      0|    *lptr.to_ulong = data->info.proxyauthavail;
  263|      0|    break;
  264|      0|  case CURLINFO_HTTPAUTH_USED:
  ------------------
  |  Branch (264:3): [True: 0, False: 11.0k]
  ------------------
  265|      0|    lptr.to_long = param_longp;
  266|      0|    *lptr.to_ulong = data->info.httpauthpicked;
  267|      0|    break;
  268|      0|  case CURLINFO_PROXYAUTH_USED:
  ------------------
  |  Branch (268:3): [True: 0, False: 11.0k]
  ------------------
  269|      0|    lptr.to_long = param_longp;
  270|      0|    *lptr.to_ulong = data->info.proxyauthpicked;
  271|      0|    break;
  272|      0|  case CURLINFO_OS_ERRNO:
  ------------------
  |  Branch (272:3): [True: 0, False: 11.0k]
  ------------------
  273|      0|    *param_longp = data->state.os_errno;
  274|      0|    break;
  275|      0|  case CURLINFO_NUM_CONNECTS:
  ------------------
  |  Branch (275:3): [True: 0, False: 11.0k]
  ------------------
  276|       |#if SIZEOF_LONG < SIZEOF_CURL_OFF_T
  277|       |    if(data->info.numconnects > LONG_MAX)
  278|       |      *param_longp = LONG_MAX;
  279|       |    else
  280|       |#endif
  281|      0|      *param_longp = (long)data->info.numconnects;
  282|      0|    break;
  283|      0|  case CURLINFO_LASTSOCKET:
  ------------------
  |  Branch (283:3): [True: 0, False: 11.0k]
  ------------------
  284|      0|    sockfd = Curl_getconnectinfo(data, NULL);
  285|       |
  286|       |    /* note: this is not a good conversion for systems with 64-bit sockets and
  287|       |       32-bit longs */
  288|      0|    if(sockfd != CURL_SOCKET_BAD)
  ------------------
  |  |  147|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (288:8): [True: 0, False: 0]
  ------------------
  289|      0|      *param_longp = (long)sockfd;
  290|      0|    else
  291|       |      /* this interface is documented to return -1 in case of badness, which
  292|       |         may not be the same as the CURL_SOCKET_BAD value */
  293|      0|      *param_longp = -1;
  294|      0|    break;
  295|      0|  case CURLINFO_PRIMARY_PORT:
  ------------------
  |  Branch (295:3): [True: 0, False: 11.0k]
  ------------------
  296|       |    /* Return the (remote) port of the most recent (primary) connection */
  297|      0|    if(CUR_IP_QUAD_HAS_PORTS(&data->info.primary))
  ------------------
  |  |  254|      0|  (((x)->transport == TRNSPRT_TCP) || \
  |  |  ------------------
  |  |  |  |  238|      0|#define TRNSPRT_TCP  3
  |  |  ------------------
  |  |  |  Branch (254:4): [True: 0, False: 0]
  |  |  ------------------
  |  |  255|      0|   ((x)->transport == TRNSPRT_UDP) || \
  |  |  ------------------
  |  |  |  |  239|      0|#define TRNSPRT_UDP  4
  |  |  ------------------
  |  |  |  Branch (255:4): [True: 0, False: 0]
  |  |  ------------------
  |  |  256|      0|   ((x)->transport == TRNSPRT_QUIC))
  |  |  ------------------
  |  |  |  |  240|      0|#define TRNSPRT_QUIC 5
  |  |  ------------------
  |  |  |  Branch (256:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  298|      0|      *param_longp = data->info.primary.remote_port;
  299|      0|    else
  300|      0|      *param_longp = -1;
  301|      0|    break;
  302|      0|  case CURLINFO_LOCAL_PORT:
  ------------------
  |  Branch (302:3): [True: 0, False: 11.0k]
  ------------------
  303|       |    /* Return the local port of the most recent (primary) connection */
  304|      0|    if(CUR_IP_QUAD_HAS_PORTS(&data->info.primary))
  ------------------
  |  |  254|      0|  (((x)->transport == TRNSPRT_TCP) || \
  |  |  ------------------
  |  |  |  |  238|      0|#define TRNSPRT_TCP  3
  |  |  ------------------
  |  |  |  Branch (254:4): [True: 0, False: 0]
  |  |  ------------------
  |  |  255|      0|   ((x)->transport == TRNSPRT_UDP) || \
  |  |  ------------------
  |  |  |  |  239|      0|#define TRNSPRT_UDP  4
  |  |  ------------------
  |  |  |  Branch (255:4): [True: 0, False: 0]
  |  |  ------------------
  |  |  256|      0|   ((x)->transport == TRNSPRT_QUIC))
  |  |  ------------------
  |  |  |  |  240|      0|#define TRNSPRT_QUIC 5
  |  |  ------------------
  |  |  |  Branch (256:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  305|      0|      *param_longp = data->info.primary.local_port;
  306|      0|    else
  307|      0|      *param_longp = -1;
  308|      0|    break;
  309|      0|  case CURLINFO_PROXY_ERROR:
  ------------------
  |  Branch (309:3): [True: 0, False: 11.0k]
  ------------------
  310|      0|    *param_longp = (long)data->info.pxcode;
  311|      0|    break;
  312|      0|  case CURLINFO_CONDITION_UNMET:
  ------------------
  |  Branch (312:3): [True: 0, False: 11.0k]
  ------------------
  313|      0|    if(data->info.httpcode == 304)
  ------------------
  |  Branch (313:8): [True: 0, False: 0]
  ------------------
  314|      0|      *param_longp = 1L;
  315|      0|    else
  316|       |      /* return if the condition prevented the document to get transferred */
  317|      0|      *param_longp = data->info.timecond ? 1L : 0L;
  ------------------
  |  Branch (317:22): [True: 0, False: 0]
  ------------------
  318|      0|    break;
  319|      0|#ifndef CURL_DISABLE_RTSP
  320|      0|  case CURLINFO_RTSP_CLIENT_CSEQ:
  ------------------
  |  Branch (320:3): [True: 0, False: 11.0k]
  ------------------
  321|      0|    *param_longp = data->state.rtsp_next_client_CSeq;
  322|      0|    break;
  323|      0|  case CURLINFO_RTSP_SERVER_CSEQ:
  ------------------
  |  Branch (323:3): [True: 0, False: 11.0k]
  ------------------
  324|      0|    *param_longp = data->state.rtsp_next_server_CSeq;
  325|      0|    break;
  326|      0|  case CURLINFO_RTSP_CSEQ_RECV:
  ------------------
  |  Branch (326:3): [True: 0, False: 11.0k]
  ------------------
  327|      0|    *param_longp = data->state.rtsp_CSeq_recv;
  328|      0|    break;
  329|       |#else
  330|       |  case CURLINFO_RTSP_CLIENT_CSEQ:
  331|       |  case CURLINFO_RTSP_SERVER_CSEQ:
  332|       |  case CURLINFO_RTSP_CSEQ_RECV:
  333|       |    *param_longp = 0;
  334|       |    break;
  335|       |#endif
  336|      0|  case CURLINFO_HTTP_VERSION:
  ------------------
  |  Branch (336:3): [True: 0, False: 11.0k]
  ------------------
  337|      0|    switch(data->info.httpversion) {
  338|      0|    case 10:
  ------------------
  |  Branch (338:5): [True: 0, False: 0]
  ------------------
  339|      0|      *param_longp = CURL_HTTP_VERSION_1_0;
  ------------------
  |  | 2341|      0|#define CURL_HTTP_VERSION_1_0   1L /* please use HTTP 1.0 in the request */
  ------------------
  340|      0|      break;
  341|      0|    case 11:
  ------------------
  |  Branch (341:5): [True: 0, False: 0]
  ------------------
  342|      0|      *param_longp = CURL_HTTP_VERSION_1_1;
  ------------------
  |  | 2342|      0|#define CURL_HTTP_VERSION_1_1   2L /* please use HTTP 1.1 in the request */
  ------------------
  343|      0|      break;
  344|      0|    case 20:
  ------------------
  |  Branch (344:5): [True: 0, False: 0]
  ------------------
  345|      0|      *param_longp = CURL_HTTP_VERSION_2_0;
  ------------------
  |  | 2343|      0|#define CURL_HTTP_VERSION_2_0   3L /* please use HTTP 2 in the request */
  ------------------
  346|      0|      break;
  347|      0|    case 30:
  ------------------
  |  Branch (347:5): [True: 0, False: 0]
  ------------------
  348|      0|      *param_longp = CURL_HTTP_VERSION_3;
  ------------------
  |  | 2348|      0|#define CURL_HTTP_VERSION_3     30L /* Use HTTP/3, fallback to HTTP/2 or
  ------------------
  349|      0|      break;
  350|      0|    default:
  ------------------
  |  Branch (350:5): [True: 0, False: 0]
  ------------------
  351|      0|      *param_longp = CURL_HTTP_VERSION_NONE;
  ------------------
  |  | 2338|      0|#define CURL_HTTP_VERSION_NONE  0L /* setting this means we do not care, and
  ------------------
  352|      0|      break;
  353|      0|    }
  354|      0|    break;
  355|      0|  case CURLINFO_PROTOCOL:
  ------------------
  |  Branch (355:3): [True: 0, False: 11.0k]
  ------------------
  356|      0|    *param_longp = (long)data->info.conn_protocol;
  357|      0|    break;
  358|      0|  case CURLINFO_USED_PROXY:
  ------------------
  |  Branch (358:3): [True: 0, False: 11.0k]
  ------------------
  359|      0|    *param_longp =
  360|       |#ifdef CURL_DISABLE_PROXY
  361|       |      0
  362|       |#else
  363|      0|      data->info.used_proxy
  364|      0|#endif
  365|      0|      ;
  366|      0|    break;
  367|      0|  default:
  ------------------
  |  Branch (367:3): [True: 0, False: 11.0k]
  ------------------
  368|      0|    return CURLE_UNKNOWN_OPTION;
  369|  11.0k|  }
  370|       |
  371|  11.0k|  return CURLE_OK;
  372|  11.0k|}
getinfo.c:getinfo_double:
  480|  3.73k|{
  481|  3.73k|#ifdef DEBUGBUILD
  482|  3.73k|  const char *envstr;
  483|       |
  484|  3.73k|  switch(info) {
  485|  3.73k|  case CURLINFO_TOTAL_TIME:
  ------------------
  |  Branch (485:3): [True: 3.73k, False: 0]
  ------------------
  486|  3.73k|  case CURLINFO_NAMELOOKUP_TIME:
  ------------------
  |  Branch (486:3): [True: 0, False: 3.73k]
  ------------------
  487|  3.73k|  case CURLINFO_CONNECT_TIME:
  ------------------
  |  Branch (487:3): [True: 0, False: 3.73k]
  ------------------
  488|  3.73k|  case CURLINFO_APPCONNECT_TIME:
  ------------------
  |  Branch (488:3): [True: 0, False: 3.73k]
  ------------------
  489|  3.73k|  case CURLINFO_PRETRANSFER_TIME:
  ------------------
  |  Branch (489:3): [True: 0, False: 3.73k]
  ------------------
  490|  3.73k|  case CURLINFO_STARTTRANSFER_TIME:
  ------------------
  |  Branch (490:3): [True: 0, False: 3.73k]
  ------------------
  491|  3.73k|  case CURLINFO_REDIRECT_TIME:
  ------------------
  |  Branch (491:3): [True: 0, False: 3.73k]
  ------------------
  492|  3.73k|  case CURLINFO_SPEED_DOWNLOAD:
  ------------------
  |  Branch (492:3): [True: 0, False: 3.73k]
  ------------------
  493|  3.73k|  case CURLINFO_SPEED_UPLOAD:
  ------------------
  |  Branch (493:3): [True: 0, False: 3.73k]
  ------------------
  494|  3.73k|    envstr = getenv("CURL_TIME");
  495|  3.73k|    if(envstr) {
  ------------------
  |  Branch (495:8): [True: 0, False: 3.73k]
  ------------------
  496|      0|      curl_off_t val;
  497|      0|      curlx_str_number(&envstr, &val, CURL_OFF_T_MAX);
  ------------------
  |  |  588|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  498|      0|      *param_doublep = (double)val;
  499|      0|      return CURLE_OK;
  500|      0|    }
  501|  3.73k|    break;
  502|  3.73k|  default:
  ------------------
  |  Branch (502:3): [True: 0, False: 3.73k]
  ------------------
  503|      0|    break;
  504|  3.73k|  }
  505|  3.73k|#endif
  506|  3.73k|  switch(info) {
  507|  3.73k|  case CURLINFO_TOTAL_TIME:
  ------------------
  |  Branch (507:3): [True: 3.73k, False: 0]
  ------------------
  508|  3.73k|    *param_doublep = DOUBLE_SECS(data->progress.total.spent_us);
  ------------------
  |  |  374|  3.73k|#define DOUBLE_SECS(x) ((double)(x) / 1000000)
  ------------------
  509|  3.73k|    break;
  510|      0|  case CURLINFO_NAMELOOKUP_TIME:
  ------------------
  |  Branch (510:3): [True: 0, False: 3.73k]
  ------------------
  511|      0|    *param_doublep = DOUBLE_SECS(data->progress.total.nslookup_us);
  ------------------
  |  |  374|      0|#define DOUBLE_SECS(x) ((double)(x) / 1000000)
  ------------------
  512|      0|    break;
  513|      0|  case CURLINFO_CONNECT_TIME:
  ------------------
  |  Branch (513:3): [True: 0, False: 3.73k]
  ------------------
  514|      0|    *param_doublep = DOUBLE_SECS(data->progress.total.connect_us);
  ------------------
  |  |  374|      0|#define DOUBLE_SECS(x) ((double)(x) / 1000000)
  ------------------
  515|      0|    break;
  516|      0|  case CURLINFO_APPCONNECT_TIME:
  ------------------
  |  Branch (516:3): [True: 0, False: 3.73k]
  ------------------
  517|      0|    *param_doublep = DOUBLE_SECS(data->progress.total.appconnect_us);
  ------------------
  |  |  374|      0|#define DOUBLE_SECS(x) ((double)(x) / 1000000)
  ------------------
  518|      0|    break;
  519|      0|  case CURLINFO_PRETRANSFER_TIME:
  ------------------
  |  Branch (519:3): [True: 0, False: 3.73k]
  ------------------
  520|      0|    *param_doublep = DOUBLE_SECS(data->progress.total.pretransfer_us);
  ------------------
  |  |  374|      0|#define DOUBLE_SECS(x) ((double)(x) / 1000000)
  ------------------
  521|      0|    break;
  522|      0|  case CURLINFO_STARTTRANSFER_TIME:
  ------------------
  |  Branch (522:3): [True: 0, False: 3.73k]
  ------------------
  523|      0|    *param_doublep = DOUBLE_SECS(data->progress.total.starttransfer_us);
  ------------------
  |  |  374|      0|#define DOUBLE_SECS(x) ((double)(x) / 1000000)
  ------------------
  524|      0|    break;
  525|      0|  case CURLINFO_SIZE_UPLOAD:
  ------------------
  |  Branch (525:3): [True: 0, False: 3.73k]
  ------------------
  526|      0|    *param_doublep = (double)data->progress.ul.cur_size;
  527|      0|    break;
  528|      0|  case CURLINFO_SIZE_DOWNLOAD:
  ------------------
  |  Branch (528:3): [True: 0, False: 3.73k]
  ------------------
  529|      0|    *param_doublep = (double)data->progress.dl.cur_size;
  530|      0|    break;
  531|      0|  case CURLINFO_SPEED_DOWNLOAD:
  ------------------
  |  Branch (531:3): [True: 0, False: 3.73k]
  ------------------
  532|      0|    *param_doublep = (double)data->progress.dl.speed;
  533|      0|    break;
  534|      0|  case CURLINFO_SPEED_UPLOAD:
  ------------------
  |  Branch (534:3): [True: 0, False: 3.73k]
  ------------------
  535|      0|    *param_doublep = (double)data->progress.ul.speed;
  536|      0|    break;
  537|      0|  case CURLINFO_CONTENT_LENGTH_DOWNLOAD:
  ------------------
  |  Branch (537:3): [True: 0, False: 3.73k]
  ------------------
  538|      0|    *param_doublep = data->progress.dl_size_known ?
  ------------------
  |  Branch (538:22): [True: 0, False: 0]
  ------------------
  539|      0|      (double)data->progress.dl.total_size : -1;
  540|      0|    break;
  541|      0|  case CURLINFO_CONTENT_LENGTH_UPLOAD:
  ------------------
  |  Branch (541:3): [True: 0, False: 3.73k]
  ------------------
  542|      0|    *param_doublep = data->progress.ul_size_known ?
  ------------------
  |  Branch (542:22): [True: 0, False: 0]
  ------------------
  543|      0|      (double)data->progress.ul.total_size : -1;
  544|      0|    break;
  545|      0|  case CURLINFO_REDIRECT_TIME:
  ------------------
  |  Branch (545:3): [True: 0, False: 3.73k]
  ------------------
  546|      0|    *param_doublep = DOUBLE_SECS(data->progress.delta.startredirect_us);
  ------------------
  |  |  374|      0|#define DOUBLE_SECS(x) ((double)(x) / 1000000)
  ------------------
  547|      0|    break;
  548|       |
  549|      0|  default:
  ------------------
  |  Branch (549:3): [True: 0, False: 3.73k]
  ------------------
  550|      0|    return CURLE_UNKNOWN_OPTION;
  551|  3.73k|  }
  552|       |
  553|  3.73k|  return CURLE_OK;
  554|  3.73k|}
getinfo.c:getinfo_offt:
  378|  11.0k|{
  379|  11.0k|#ifdef DEBUGBUILD
  380|  11.0k|  const char *envstr;
  381|  11.0k|  switch(info) {
  382|      0|  case CURLINFO_TOTAL_TIME_T:
  ------------------
  |  Branch (382:3): [True: 0, False: 11.0k]
  ------------------
  383|      0|  case CURLINFO_NAMELOOKUP_TIME_T:
  ------------------
  |  Branch (383:3): [True: 0, False: 11.0k]
  ------------------
  384|      0|  case CURLINFO_CONNECT_TIME_T:
  ------------------
  |  Branch (384:3): [True: 0, False: 11.0k]
  ------------------
  385|  7.36k|  case CURLINFO_APPCONNECT_TIME_T:
  ------------------
  |  Branch (385:3): [True: 7.36k, False: 3.73k]
  ------------------
  386|  7.36k|  case CURLINFO_PRETRANSFER_TIME_T:
  ------------------
  |  Branch (386:3): [True: 0, False: 11.0k]
  ------------------
  387|  7.36k|  case CURLINFO_POSTTRANSFER_TIME_T:
  ------------------
  |  Branch (387:3): [True: 0, False: 11.0k]
  ------------------
  388|  7.36k|  case CURLINFO_QUEUE_TIME_T:
  ------------------
  |  Branch (388:3): [True: 0, False: 11.0k]
  ------------------
  389|  7.36k|  case CURLINFO_STARTTRANSFER_TIME_T:
  ------------------
  |  Branch (389:3): [True: 0, False: 11.0k]
  ------------------
  390|  7.36k|  case CURLINFO_REDIRECT_TIME_T:
  ------------------
  |  Branch (390:3): [True: 0, False: 11.0k]
  ------------------
  391|  7.36k|  case CURLINFO_SPEED_DOWNLOAD_T:
  ------------------
  |  Branch (391:3): [True: 0, False: 11.0k]
  ------------------
  392|  7.36k|  case CURLINFO_SPEED_UPLOAD_T:
  ------------------
  |  Branch (392:3): [True: 0, False: 11.0k]
  ------------------
  393|  7.36k|    envstr = getenv("CURL_TIME");
  394|  7.36k|    if(envstr) {
  ------------------
  |  Branch (394:8): [True: 0, False: 7.36k]
  ------------------
  395|      0|      curl_off_t val;
  396|      0|      curlx_str_number(&envstr, &val, CURL_OFF_T_MAX);
  ------------------
  |  |  588|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  397|      0|      *param_offt = (curl_off_t)val;
  398|      0|      return CURLE_OK;
  399|      0|    }
  400|  7.36k|    break;
  401|  7.36k|  default:
  ------------------
  |  Branch (401:3): [True: 3.73k, False: 7.36k]
  ------------------
  402|  3.73k|    break;
  403|  11.0k|  }
  404|  11.0k|#endif
  405|  11.0k|  switch(info) {
  406|      0|  case CURLINFO_FILETIME_T:
  ------------------
  |  Branch (406:3): [True: 0, False: 11.0k]
  ------------------
  407|      0|    *param_offt = (curl_off_t)data->info.filetime;
  408|      0|    break;
  409|      0|  case CURLINFO_SIZE_DELIVERED:
  ------------------
  |  Branch (409:3): [True: 0, False: 11.0k]
  ------------------
  410|      0|    *param_offt = data->progress.deliver;
  411|      0|    break;
  412|      0|  case CURLINFO_SIZE_UPLOAD_T:
  ------------------
  |  Branch (412:3): [True: 0, False: 11.0k]
  ------------------
  413|      0|    *param_offt = data->progress.ul.cur_size;
  414|      0|    break;
  415|  3.73k|  case CURLINFO_SIZE_DOWNLOAD_T:
  ------------------
  |  Branch (415:3): [True: 3.73k, False: 7.36k]
  ------------------
  416|  3.73k|    *param_offt = data->progress.dl.cur_size;
  417|  3.73k|    break;
  418|      0|  case CURLINFO_SPEED_DOWNLOAD_T:
  ------------------
  |  Branch (418:3): [True: 0, False: 11.0k]
  ------------------
  419|      0|    *param_offt = data->progress.dl.speed;
  420|      0|    break;
  421|      0|  case CURLINFO_SPEED_UPLOAD_T:
  ------------------
  |  Branch (421:3): [True: 0, False: 11.0k]
  ------------------
  422|      0|    *param_offt = data->progress.ul.speed;
  423|      0|    break;
  424|      0|  case CURLINFO_CONTENT_LENGTH_DOWNLOAD_T:
  ------------------
  |  Branch (424:3): [True: 0, False: 11.0k]
  ------------------
  425|      0|    *param_offt = data->progress.dl_size_known ?
  ------------------
  |  Branch (425:19): [True: 0, False: 0]
  ------------------
  426|      0|      data->progress.dl.total_size : -1;
  427|      0|    break;
  428|      0|  case CURLINFO_CONTENT_LENGTH_UPLOAD_T:
  ------------------
  |  Branch (428:3): [True: 0, False: 11.0k]
  ------------------
  429|      0|    *param_offt = data->progress.ul_size_known ?
  ------------------
  |  Branch (429:19): [True: 0, False: 0]
  ------------------
  430|      0|      data->progress.ul.total_size : -1;
  431|      0|    break;
  432|      0|   case CURLINFO_TOTAL_TIME_T:
  ------------------
  |  Branch (432:4): [True: 0, False: 11.0k]
  ------------------
  433|      0|    *param_offt = data->progress.total.spent_us;
  434|      0|    break;
  435|      0|  case CURLINFO_NAMELOOKUP_TIME_T:
  ------------------
  |  Branch (435:3): [True: 0, False: 11.0k]
  ------------------
  436|      0|    *param_offt = data->progress.total.nslookup_us;
  437|      0|    break;
  438|      0|  case CURLINFO_CONNECT_TIME_T:
  ------------------
  |  Branch (438:3): [True: 0, False: 11.0k]
  ------------------
  439|      0|    *param_offt = data->progress.total.connect_us;
  440|      0|    break;
  441|  7.36k|  case CURLINFO_APPCONNECT_TIME_T:
  ------------------
  |  Branch (441:3): [True: 7.36k, False: 3.73k]
  ------------------
  442|  7.36k|    *param_offt = data->progress.total.appconnect_us;
  443|  7.36k|    break;
  444|      0|  case CURLINFO_PRETRANSFER_TIME_T:
  ------------------
  |  Branch (444:3): [True: 0, False: 11.0k]
  ------------------
  445|      0|    *param_offt = data->progress.total.pretransfer_us;
  446|      0|    break;
  447|      0|  case CURLINFO_POSTTRANSFER_TIME_T:
  ------------------
  |  Branch (447:3): [True: 0, False: 11.0k]
  ------------------
  448|      0|    *param_offt = data->progress.total.posttransfer_us;
  449|      0|    break;
  450|      0|  case CURLINFO_STARTTRANSFER_TIME_T:
  ------------------
  |  Branch (450:3): [True: 0, False: 11.0k]
  ------------------
  451|      0|    *param_offt = data->progress.total.starttransfer_us;
  452|      0|    break;
  453|      0|  case CURLINFO_QUEUE_TIME_T:
  ------------------
  |  Branch (453:3): [True: 0, False: 11.0k]
  ------------------
  454|      0|    *param_offt = data->progress.total.queued_us;
  455|      0|    break;
  456|      0|  case CURLINFO_REDIRECT_TIME_T:
  ------------------
  |  Branch (456:3): [True: 0, False: 11.0k]
  ------------------
  457|      0|    *param_offt = data->progress.delta.startredirect_us;
  458|      0|    break;
  459|      0|  case CURLINFO_RETRY_AFTER:
  ------------------
  |  Branch (459:3): [True: 0, False: 11.0k]
  ------------------
  460|      0|    *param_offt = data->info.retry_after;
  461|      0|    break;
  462|      0|  case CURLINFO_XFER_ID:
  ------------------
  |  Branch (462:3): [True: 0, False: 11.0k]
  ------------------
  463|      0|    *param_offt = data->id;
  464|      0|    break;
  465|      0|  case CURLINFO_CONN_ID:
  ------------------
  |  Branch (465:3): [True: 0, False: 11.0k]
  ------------------
  466|      0|    *param_offt = data->state.lastconnect_id;
  467|      0|    break;
  468|      0|  case CURLINFO_EARLYDATA_SENT_T:
  ------------------
  |  Branch (468:3): [True: 0, False: 11.0k]
  ------------------
  469|      0|    *param_offt = data->progress.earlydata_sent;
  470|      0|    break;
  471|      0|  default:
  ------------------
  |  Branch (471:3): [True: 0, False: 11.0k]
  ------------------
  472|      0|    return CURLE_UNKNOWN_OPTION;
  473|  11.0k|  }
  474|       |
  475|  11.0k|  return CURLE_OK;
  476|  11.0k|}
getinfo.c:getinfo_slist:
  558|  18.4k|{
  559|  18.4k|  union {
  560|  18.4k|    struct curl_certinfo *to_certinfo;
  561|  18.4k|    struct curl_slist    *to_slist;
  562|  18.4k|  } ptr;
  563|       |
  564|  18.4k|  switch(info) {
  565|      0|  case CURLINFO_SSL_ENGINES:
  ------------------
  |  Branch (565:3): [True: 0, False: 18.4k]
  ------------------
  566|      0|    *param_slistp = Curl_ssl_engines_list(data);
  567|      0|    break;
  568|      0|  case CURLINFO_COOKIELIST:
  ------------------
  |  Branch (568:3): [True: 0, False: 18.4k]
  ------------------
  569|      0|    *param_slistp = Curl_cookie_list(data);
  570|      0|    break;
  571|  11.0k|  case CURLINFO_CERTINFO:
  ------------------
  |  Branch (571:3): [True: 11.0k, False: 7.36k]
  ------------------
  572|       |    /* Return the a pointer to the certinfo struct. Not really an slist
  573|       |       pointer but we can pretend it is here */
  574|  11.0k|    ptr.to_certinfo = &data->info.certs;
  575|  11.0k|    *param_slistp = ptr.to_slist;
  576|  11.0k|    break;
  577|      0|  case CURLINFO_TLS_SESSION:
  ------------------
  |  Branch (577:3): [True: 0, False: 18.4k]
  ------------------
  578|  7.36k|  case CURLINFO_TLS_SSL_PTR: {
  ------------------
  |  Branch (578:3): [True: 7.36k, False: 11.0k]
  ------------------
  579|  7.36k|    int query = (info == CURLINFO_TLS_SSL_PTR) ?
  ------------------
  |  Branch (579:17): [True: 7.36k, False: 0]
  ------------------
  580|  7.36k|      CF_QUERY_SSL_INFO : CF_QUERY_SSL_CTX_INFO;
  ------------------
  |  |  179|  7.36k|#define CF_QUERY_SSL_INFO          12  /* -    struct curl_tlssessioninfo * */
  ------------------
                    CF_QUERY_SSL_INFO : CF_QUERY_SSL_CTX_INFO;
  ------------------
  |  |  180|      0|#define CF_QUERY_SSL_CTX_INFO      13  /* -    struct curl_tlssessioninfo * */
  ------------------
  581|  7.36k|    struct curl_tlssessioninfo **tsip = (struct curl_tlssessioninfo **)
  582|  7.36k|      param_slistp;
  583|  7.36k|    struct curl_tlssessioninfo *tsi = &data->tsi;
  584|       |
  585|       |    /* we are exposing a pointer to internal memory with unknown
  586|       |     * lifetime here. */
  587|  7.36k|    *tsip = tsi;
  588|  7.36k|    if(!Curl_conn_get_ssl_info(data, data->conn, FIRSTSOCKET, query, tsi)) {
  ------------------
  |  |  234|  7.36k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (588:8): [True: 3.77k, False: 3.58k]
  ------------------
  589|  3.77k|      tsi->backend = Curl_ssl_backend();
  590|  3.77k|      tsi->internals = NULL;
  591|  3.77k|    }
  592|  7.36k|  }
  593|  7.36k|    break;
  594|      0|  default:
  ------------------
  |  Branch (594:3): [True: 0, False: 18.4k]
  ------------------
  595|      0|    return CURLE_UNKNOWN_OPTION;
  596|  18.4k|  }
  597|       |
  598|  18.4k|  return CURLE_OK;
  599|  18.4k|}
getinfo.c:getinfo_socket:
  603|  3.73k|{
  604|  3.73k|  switch(info) {
  605|  3.73k|  case CURLINFO_ACTIVESOCKET:
  ------------------
  |  Branch (605:3): [True: 3.73k, False: 0]
  ------------------
  606|  3.73k|    *param_socketp = Curl_getconnectinfo(data, NULL);
  607|  3.73k|    break;
  608|      0|  default:
  ------------------
  |  Branch (608:3): [True: 0, False: 3.73k]
  ------------------
  609|      0|    return CURLE_UNKNOWN_OPTION;
  610|  3.73k|  }
  611|       |
  612|  3.73k|  return CURLE_OK;
  613|  3.73k|}

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

curl_easy_header:
   61|  3.73k|{
   62|  3.73k|  struct Curl_eapi_guard guard;
   63|  3.73k|  CURLHcode hresult = CURLHE_OK;
   64|  3.73k|  CURLcode result;
   65|       |
   66|  3.73k|  if(CURL_EAPI_ENTER(&guard, curl, easy_header, &result)) {
  ------------------
  |  |  163|  3.73k|  Curl_eapi_enter((g), (curl), CURL_EAPI_FN_##fn, (r)) && (curl)
  |  |  ------------------
  |  |  |  Branch (163:3): [True: 3.73k, False: 0]
  |  |  |  Branch (163:59): [True: 3.73k, False: 0]
  |  |  ------------------
  ------------------
   67|  3.73k|    struct Curl_easy *data = curl;
   68|  3.73k|    struct Curl_llist_node *e;
   69|  3.73k|    struct Curl_llist_node *e_pick = NULL;
   70|  3.73k|    size_t match = 0;
   71|  3.73k|    size_t amount = 0;
   72|  3.73k|    struct Curl_header_store *hs = NULL;
   73|  3.73k|    struct Curl_header_store *pick = NULL;
   74|  3.73k|    if(!name || !hout || !data ||
  ------------------
  |  Branch (74:8): [True: 0, False: 3.73k]
  |  Branch (74:17): [True: 0, False: 3.73k]
  |  Branch (74:26): [True: 0, False: 3.73k]
  ------------------
   75|  3.73k|       (origin > (CURLH_HEADER | CURLH_TRAILER | CURLH_CONNECT | CURLH_1XX |
  ------------------
  |  |   41|  3.73k|#define CURLH_HEADER    (1 << 0) /* plain server header */
  ------------------
                     (origin > (CURLH_HEADER | CURLH_TRAILER | CURLH_CONNECT | CURLH_1XX |
  ------------------
  |  |   42|  3.73k|#define CURLH_TRAILER   (1 << 1) /* trailers */
  ------------------
                     (origin > (CURLH_HEADER | CURLH_TRAILER | CURLH_CONNECT | CURLH_1XX |
  ------------------
  |  |   43|  3.73k|#define CURLH_CONNECT   (1 << 2) /* CONNECT headers */
  ------------------
                     (origin > (CURLH_HEADER | CURLH_TRAILER | CURLH_CONNECT | CURLH_1XX |
  ------------------
  |  |   44|  3.73k|#define CURLH_1XX       (1 << 3) /* 1xx headers */
  ------------------
  |  Branch (75:8): [True: 0, False: 3.73k]
  ------------------
   76|  3.73k|                  CURLH_PSEUDO)) || !origin || (request < -1)) {
  ------------------
  |  |   45|  3.73k|#define CURLH_PSEUDO    (1 << 4) /* pseudo headers */
  ------------------
  |  Branch (76:37): [True: 0, False: 3.73k]
  |  Branch (76:48): [True: 0, False: 3.73k]
  ------------------
   77|      0|      hresult = CURLHE_BAD_ARGUMENT;
   78|      0|      goto out;
   79|      0|    }
   80|  3.73k|    if(!Curl_llist_count(&data->state.httphdrs)) {
  ------------------
  |  Branch (80:8): [True: 3.68k, False: 47]
  ------------------
   81|  3.68k|      hresult = CURLHE_NOHEADERS; /* no headers available */
   82|  3.68k|      goto out;
   83|  3.68k|    }
   84|     47|    if(request > data->state.requests) {
  ------------------
  |  Branch (84:8): [True: 0, False: 47]
  ------------------
   85|      0|      hresult = CURLHE_NOREQUEST;
   86|      0|      goto out;
   87|      0|    }
   88|     47|    if(request == -1)
  ------------------
  |  Branch (88:8): [True: 47, False: 0]
  ------------------
   89|     47|      request = data->state.requests;
   90|       |
   91|       |    /* we need a first round to count amount of this header */
   92|    143|    for(e = Curl_llist_head(&data->state.httphdrs); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (92:53): [True: 96, False: 47]
  ------------------
   93|     96|      hs = Curl_node_elem(e);
   94|     96|      if(curl_strequal(hs->name, name) &&
  ------------------
  |  Branch (94:10): [True: 1, False: 95]
  ------------------
   95|      1|         (hs->type & origin) &&
  ------------------
  |  Branch (95:10): [True: 1, False: 0]
  ------------------
   96|      1|         (hs->request == request)) {
  ------------------
  |  Branch (96:10): [True: 1, False: 0]
  ------------------
   97|      1|        amount++;
   98|      1|        pick = hs;
   99|      1|        e_pick = e;
  100|      1|      }
  101|     96|    }
  102|     47|    if(!amount)
  ------------------
  |  Branch (102:8): [True: 46, False: 1]
  ------------------
  103|     46|      hresult = CURLHE_MISSING;
  104|      1|    else if(nameindex >= amount)
  ------------------
  |  Branch (104:13): [True: 0, False: 1]
  ------------------
  105|      0|      hresult = CURLHE_BADINDEX;
  106|     47|    if(hresult)
  ------------------
  |  Branch (106:8): [True: 46, False: 1]
  ------------------
  107|     46|      goto out;
  108|       |
  109|      1|    if(nameindex == amount - 1)
  ------------------
  |  Branch (109:8): [True: 1, False: 0]
  ------------------
  110|       |      /* if the last or only occurrence is what's asked for, then we know it */
  111|      1|      hs = pick;
  112|      0|    else {
  113|      0|      for(e = Curl_llist_head(&data->state.httphdrs); e;
  ------------------
  |  Branch (113:55): [True: 0, False: 0]
  ------------------
  114|      0|          e = Curl_node_next(e)) {
  115|      0|        hs = Curl_node_elem(e);
  116|      0|        if(curl_strequal(hs->name, name) &&
  ------------------
  |  Branch (116:12): [True: 0, False: 0]
  ------------------
  117|      0|           (hs->type & origin) &&
  ------------------
  |  Branch (117:12): [True: 0, False: 0]
  ------------------
  118|      0|           (hs->request == request) &&
  ------------------
  |  Branch (118:12): [True: 0, False: 0]
  ------------------
  119|      0|           (match++ == nameindex)) {
  ------------------
  |  Branch (119:12): [True: 0, False: 0]
  ------------------
  120|      0|          e_pick = e;
  121|      0|          break;
  122|      0|        }
  123|      0|      }
  124|      0|      if(!e) { /* this should not happen */
  ------------------
  |  Branch (124:10): [True: 0, False: 0]
  ------------------
  125|      0|        hresult = CURLHE_MISSING;
  126|      0|        goto out;
  127|      0|      }
  128|      0|    }
  129|       |    /* this is the name we want */
  130|      1|    copy_header_external(hs, nameindex, amount, e_pick,
  131|      1|                         &data->state.headerout[0]);
  132|      1|    *hout = &data->state.headerout[0];
  133|      1|    hresult = CURLHE_OK;
  134|      1|  }
  135|  3.73k|out:
  136|  3.73k|  CURL_EAPI_LEAVE(&guard);
  ------------------
  |  |  165|  3.73k|  Curl_eapi_leave(g)
  ------------------
  137|  3.73k|  if(result)
  ------------------
  |  Branch (137:6): [True: 0, False: 3.73k]
  ------------------
  138|      0|    hresult = Curl_eapi_hcode(result);
  139|  3.73k|  return hresult;
  140|  3.73k|}
curl_easy_nextheader:
  147|  3.82k|{
  148|  3.82k|  struct Curl_eapi_guard guard;
  149|  3.82k|  struct curl_header *hd = NULL;
  150|  3.82k|  CURLcode result;
  151|       |
  152|  3.82k|  if(CURL_EAPI_ENTER(&guard, curl, easy_nextheader, &result)) {
  ------------------
  |  |  163|  3.82k|  Curl_eapi_enter((g), (curl), CURL_EAPI_FN_##fn, (r)) && (curl)
  |  |  ------------------
  |  |  |  Branch (163:3): [True: 3.82k, False: 0]
  |  |  |  Branch (163:59): [True: 3.82k, False: 0]
  |  |  ------------------
  ------------------
  153|  3.82k|    struct Curl_easy *data = curl;
  154|  3.82k|    struct Curl_llist_node *pick;
  155|  3.82k|    struct Curl_llist_node *e;
  156|  3.82k|    struct Curl_header_store *hs;
  157|  3.82k|    size_t amount = 0;
  158|  3.82k|    size_t index = 0;
  159|       |
  160|  3.82k|    if(request > data->state.requests)
  ------------------
  |  Branch (160:8): [True: 0, False: 3.82k]
  ------------------
  161|      0|      goto out;
  162|  3.82k|    if(request == -1)
  ------------------
  |  Branch (162:8): [True: 3.82k, False: 0]
  ------------------
  163|  3.82k|      request = data->state.requests;
  164|       |
  165|  3.82k|    if(prev) {
  ------------------
  |  Branch (165:8): [True: 93, False: 3.73k]
  ------------------
  166|     93|      pick = prev->anchor;
  167|     93|      if(!pick)
  ------------------
  |  Branch (167:10): [True: 0, False: 93]
  ------------------
  168|       |        /* something is wrong */
  169|      0|        goto out;
  170|     93|      pick = Curl_node_next(pick);
  171|     93|    }
  172|  3.73k|    else
  173|  3.73k|      pick = Curl_llist_head(&data->state.httphdrs);
  174|       |
  175|  3.82k|    if(pick) {
  ------------------
  |  Branch (175:8): [True: 94, False: 3.73k]
  ------------------
  176|       |      /* make sure it is the next header of the desired type */
  177|     96|      do {
  178|     96|        hs = Curl_node_elem(pick);
  179|     96|        if((hs->type & origin) && (hs->request == request))
  ------------------
  |  Branch (179:12): [True: 96, False: 0]
  |  Branch (179:35): [True: 93, False: 3]
  ------------------
  180|     93|          break;
  181|      3|        pick = Curl_node_next(pick);
  182|      3|      } while(pick);
  ------------------
  |  Branch (182:15): [True: 2, False: 1]
  ------------------
  183|     94|    }
  184|       |
  185|  3.82k|    if(!pick)
  ------------------
  |  Branch (185:8): [True: 3.73k, False: 93]
  ------------------
  186|       |      /* no more headers available */
  187|  3.73k|      goto out;
  188|       |
  189|     93|    hs = Curl_node_elem(pick);
  190|       |
  191|       |    /* count number of occurrences of this name within the mask and figure out
  192|       |       the index for the currently selected entry */
  193|    344|    for(e = Curl_llist_head(&data->state.httphdrs); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (193:53): [True: 251, False: 93]
  ------------------
  194|    251|      struct Curl_header_store *check = Curl_node_elem(e);
  195|    251|      if(curl_strequal(hs->name, check->name) &&
  ------------------
  |  Branch (195:10): [True: 107, False: 144]
  ------------------
  196|    107|         (check->request == request) &&
  ------------------
  |  Branch (196:10): [True: 107, False: 0]
  ------------------
  197|    107|         (check->type & origin))
  ------------------
  |  Branch (197:10): [True: 107, False: 0]
  ------------------
  198|    107|        amount++;
  199|    251|      if(e == pick)
  ------------------
  |  Branch (199:10): [True: 93, False: 158]
  ------------------
  200|     93|        index = amount - 1;
  201|    251|    }
  202|       |
  203|     93|    copy_header_external(hs, index, amount, pick,
  204|     93|                         &data->state.headerout[1]);
  205|     93|    hd = &data->state.headerout[1];
  206|     93|  }
  207|  3.82k|out:
  208|  3.82k|  CURL_EAPI_LEAVE(&guard);
  ------------------
  |  |  165|  3.82k|  Curl_eapi_leave(g)
  ------------------
  209|  3.82k|  return hd;
  210|  3.82k|}
Curl_headers_push:
  255|    693|{
  256|    693|  char *value = NULL;
  257|    693|  char *name = NULL;
  258|    693|  struct Curl_header_store *hs;
  259|    693|  CURLcode result = CURLE_OUT_OF_MEMORY;
  260|    693|  const size_t ilen = hlen;
  261|       |
  262|    693|  if((header[0] == '\r') || (header[0] == '\n'))
  ------------------
  |  Branch (262:6): [True: 41, False: 652]
  |  Branch (262:29): [True: 3, False: 649]
  ------------------
  263|       |    /* ignore the body separator */
  264|     44|    return CURLE_OK;
  265|       |
  266|       |  /* trim off newline characters */
  267|    649|  if(hlen && (header[hlen - 1] == '\n'))
  ------------------
  |  Branch (267:6): [True: 649, False: 0]
  |  Branch (267:14): [True: 105, False: 544]
  ------------------
  268|    105|    hlen--;
  269|    649|  if(hlen && (header[hlen - 1] == '\r'))
  ------------------
  |  Branch (269:6): [True: 649, False: 0]
  |  Branch (269:14): [True: 95, False: 554]
  ------------------
  270|     95|    hlen--;
  271|    649|  if(hlen == ilen)
  ------------------
  |  Branch (271:6): [True: 542, False: 107]
  ------------------
  272|       |    /* neither CR nor LF as terminator is not a valid header */
  273|    542|    return CURLE_WEIRD_SERVER_REPLY;
  274|       |
  275|    107|  if(ISBLANK(header[0])) {
  ------------------
  |  |   43|    107|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 0, False: 107]
  |  |  |  Branch (43:38): [True: 0, False: 107]
  |  |  ------------------
  ------------------
  276|       |    /* pass leading blanks */
  277|      0|    while(hlen && ISBLANK(*header)) {
  ------------------
  |  |   43|      0|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 0, False: 0]
  |  |  |  Branch (43:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (277:11): [True: 0, False: 0]
  ------------------
  278|      0|      header++;
  279|      0|      hlen--;
  280|      0|    }
  281|      0|    if(!hlen)
  ------------------
  |  Branch (281:8): [True: 0, False: 0]
  ------------------
  282|      0|      return CURLE_WEIRD_SERVER_REPLY;
  283|      0|  }
  284|    107|  if(Curl_llist_count(&data->state.httphdrs) >= MAX_HTTP_RESP_HEADER_COUNT) {
  ------------------
  |  |  162|    107|#define MAX_HTTP_RESP_HEADER_COUNT 5000
  ------------------
  |  Branch (284:6): [True: 0, False: 107]
  ------------------
  285|      0|    failf(data, "Too many response headers, %d is max",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  286|      0|          MAX_HTTP_RESP_HEADER_COUNT);
  ------------------
  |  |  162|      0|#define MAX_HTTP_RESP_HEADER_COUNT 5000
  ------------------
  287|      0|    return CURLE_TOO_LARGE;
  288|      0|  }
  289|       |
  290|    107|  hs = curlx_calloc(1, sizeof(*hs) + hlen);
  ------------------
  |  | 1473|    107|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  291|    107|  if(!hs)
  ------------------
  |  Branch (291:6): [True: 0, False: 107]
  ------------------
  292|      0|    return CURLE_OUT_OF_MEMORY;
  293|    107|  memcpy(hs->buffer, header, hlen);
  294|    107|  hs->buffer[hlen] = 0; /* null-terminate */
  295|       |
  296|    107|  result = namevalue(hs->buffer, hlen, type, &name, &value);
  297|    107|  if(!result) {
  ------------------
  |  Branch (297:6): [True: 96, False: 11]
  ------------------
  298|     96|    hs->name = name;
  299|     96|    hs->value = value;
  300|     96|    hs->type = type;
  301|     96|    hs->request = data->state.requests;
  302|       |
  303|       |    /* insert this node into the list of headers */
  304|     96|    Curl_llist_append(&data->state.httphdrs, hs, &hs->node);
  305|     96|  }
  306|     11|  else {
  307|     11|    failf(data, "Invalid response header");
  ------------------
  |  |   62|     11|#define failf Curl_failf
  ------------------
  308|     11|    curlx_free(hs);
  ------------------
  |  | 1476|     11|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  309|     11|  }
  310|    107|  return result;
  311|    107|}
Curl_headers_init:
  356|  7.24k|{
  357|  7.24k|  struct Curl_cwriter *writer;
  358|  7.24k|  CURLcode result;
  359|       |
  360|  7.24k|  if(data->conn && (data->conn->scheme->protocol & PROTO_FAMILY_HTTP)) {
  ------------------
  |  |   84|  7.24k|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1088|  7.24k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1089|  7.24k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|  7.24k|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|  7.24k|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|  7.24k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
  |  Branch (360:6): [True: 7.24k, False: 0]
  |  Branch (360:20): [True: 7.24k, False: 0]
  ------------------
  361|       |    /* avoid installing it twice */
  362|  7.24k|    if(Curl_cwriter_get_by_name(data, hds_cw_collect.name))
  ------------------
  |  Branch (362:8): [True: 3.61k, False: 3.62k]
  ------------------
  363|  3.61k|      return CURLE_OK;
  364|       |
  365|  3.62k|    result = Curl_cwriter_create(&writer, data, &hds_cw_collect,
  366|  3.62k|                                 CURL_CW_PROTOCOL);
  367|  3.62k|    if(result)
  ------------------
  |  Branch (367:8): [True: 0, False: 3.62k]
  ------------------
  368|      0|      return result;
  369|       |
  370|  3.62k|    result = Curl_cwriter_add(data, writer);
  371|  3.62k|    if(result) {
  ------------------
  |  Branch (371:8): [True: 0, False: 3.62k]
  ------------------
  372|      0|      Curl_cwriter_free(data, writer);
  373|      0|      return result;
  374|      0|    }
  375|  3.62k|  }
  376|  3.62k|  return CURLE_OK;
  377|  7.24k|}
Curl_headers_cleanup:
  383|  11.1k|{
  384|  11.1k|  struct Curl_llist_node *e;
  385|  11.1k|  struct Curl_llist_node *n;
  386|       |
  387|  11.2k|  for(e = Curl_llist_head(&data->state.httphdrs); e; e = n) {
  ------------------
  |  Branch (387:51): [True: 96, False: 11.1k]
  ------------------
  388|     96|    struct Curl_header_store *hs = Curl_node_elem(e);
  389|     96|    n = Curl_node_next(e);
  390|     96|    curlx_free(hs);
  ------------------
  |  | 1476|     96|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  391|     96|  }
  392|  11.1k|  headers_reset(data);
  393|  11.1k|  return CURLE_OK;
  394|  11.1k|}
headers.c:copy_header_external:
   40|     94|{
   41|     94|  struct curl_header *h = hout;
   42|     94|  h->name = hs->name;
   43|     94|  h->value = hs->value;
   44|     94|  h->amount = amount;
   45|     94|  h->index = index;
   46|       |  /* this will randomly OR a reserved bit for the sole purpose of making it
   47|       |     impossible for applications to do == comparisons, as that would otherwise
   48|       |     be tempting and then lead to the reserved bits not being reserved
   49|       |     anymore. */
   50|     94|  h->origin = (unsigned int)(hs->type | (1 << 27));
   51|     94|  h->anchor = e;
   52|     94|}
headers.c:namevalue:
  214|    107|{
  215|    107|  char *end = header + hlen - 1; /* point to the last byte */
  216|    107|  DEBUGASSERT(hlen);
  ------------------
  |  | 1075|    107|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (216:3): [True: 0, False: 107]
  |  Branch (216:3): [True: 107, False: 0]
  ------------------
  217|    107|  *name = header;
  218|       |
  219|    107|  if(type == CURLH_PSEUDO) {
  ------------------
  |  |   45|    107|#define CURLH_PSEUDO    (1 << 4) /* pseudo headers */
  ------------------
  |  Branch (219:6): [True: 1, False: 106]
  ------------------
  220|      1|    if(*header != ':')
  ------------------
  |  Branch (220:8): [True: 0, False: 1]
  ------------------
  221|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
  222|      1|    header++;
  223|      1|  }
  224|       |
  225|       |  /* Find the end of the header name */
  226|  3.58k|  while(*header && (*header != ':'))
  ------------------
  |  Branch (226:9): [True: 3.57k, False: 11]
  |  Branch (226:20): [True: 3.48k, False: 96]
  ------------------
  227|  3.48k|    ++header;
  228|       |
  229|    107|  if(*header)
  ------------------
  |  Branch (229:6): [True: 96, False: 11]
  ------------------
  230|       |    /* Skip over colon, null it */
  231|     96|    *header++ = 0;
  232|     11|  else
  233|     11|    return CURLE_BAD_FUNCTION_ARGUMENT;
  234|       |
  235|       |  /* skip all leading blank letters */
  236|    187|  while(ISBLANK(*header))
  ------------------
  |  |   43|    187|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 91, False: 96]
  |  |  |  Branch (43:38): [True: 0, False: 96]
  |  |  ------------------
  ------------------
  237|     91|    header++;
  238|       |
  239|     96|  *value = header;
  240|       |
  241|       |  /* skip all trailing space letters */
  242|     96|  while((end > header) && ISBLANK(*end))
  ------------------
  |  |   43|     60|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 0, False: 60]
  |  |  |  Branch (43:38): [True: 0, False: 60]
  |  |  ------------------
  ------------------
  |  Branch (242:9): [True: 60, False: 36]
  ------------------
  243|      0|    *end-- = 0; /* null-terminate */
  244|     96|  return CURLE_OK;
  245|    107|}
headers.c:hds_cw_collect_write:
  328|    787|{
  329|    787|  if((type & CLIENTWRITE_HEADER) && !(type & CLIENTWRITE_STATUS)) {
  ------------------
  |  |   45|    787|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
                if((type & CLIENTWRITE_HEADER) && !(type & CLIENTWRITE_STATUS)) {
  ------------------
  |  |   46|    740|#define CLIENTWRITE_STATUS  (1 << 3) /* a special status HEADER */
  ------------------
  |  Branch (329:6): [True: 740, False: 47]
  |  Branch (329:37): [True: 692, False: 48]
  ------------------
  330|    692|    unsigned char htype = (unsigned char)
  331|    692|      (type & CLIENTWRITE_CONNECT ? CURLH_CONNECT :
  ------------------
  |  |   47|    692|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
                    (type & CLIENTWRITE_CONNECT ? CURLH_CONNECT :
  ------------------
  |  |   43|      0|#define CURLH_CONNECT   (1 << 2) /* CONNECT headers */
  ------------------
  |  Branch (331:8): [True: 0, False: 692]
  ------------------
  332|    692|       (type & CLIENTWRITE_1XX ? CURLH_1XX :
  ------------------
  |  |   48|    692|#define CLIENTWRITE_1XX     (1 << 5) /* a 1xx response related HEADER */
  ------------------
                     (type & CLIENTWRITE_1XX ? CURLH_1XX :
  ------------------
  |  |   44|      5|#define CURLH_1XX       (1 << 3) /* 1xx headers */
  ------------------
  |  Branch (332:9): [True: 5, False: 687]
  ------------------
  333|    692|        (type & CLIENTWRITE_TRAILER ? CURLH_TRAILER :
  ------------------
  |  |   49|    687|#define CLIENTWRITE_TRAILER (1 << 6) /* a trailer HEADER */
  ------------------
                      (type & CLIENTWRITE_TRAILER ? CURLH_TRAILER :
  ------------------
  |  |   42|      0|#define CURLH_TRAILER   (1 << 1) /* trailers */
  ------------------
  |  Branch (333:10): [True: 0, False: 687]
  ------------------
  334|    687|         CURLH_HEADER)));
  ------------------
  |  |   41|    687|#define CURLH_HEADER    (1 << 0) /* plain server header */
  ------------------
  335|    692|    CURLcode result = Curl_headers_push(data, buf, blen, htype);
  336|    692|    CURL_TRC_WRITE(data, "header_collect pushed(type=%x, len=%zu) -> %d",
  ------------------
  |  |  158|    692|  do {                                                     \
  |  |  159|    692|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|    692|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  1.38k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 692, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 692]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  1.38k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|    692|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|    692|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|    692|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 692]
  |  |  ------------------
  ------------------
  337|    692|                   htype, blen, (int)result);
  338|    692|    if(result)
  ------------------
  |  Branch (338:8): [True: 553, False: 139]
  ------------------
  339|    553|      return result;
  340|    692|  }
  341|    234|  return Curl_cwriter_write(data, writer->next, type, buf, blen);
  ------------------
  |  |  188|    234|  ((w) ? (w)->cwt->do_write((d), (w), (t), (b), (n)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (188:4): [True: 234, False: 0]
  |  |  ------------------
  ------------------
  342|    787|}
headers.c:headers_reset:
  317|  11.1k|{
  318|       |  Curl_llist_init(&data->state.httphdrs, NULL);
  319|  11.1k|}

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

Curl_hsts_init:
   67|  3.73k|{
   68|  3.73k|  struct hsts *h = curlx_calloc(1, sizeof(struct hsts));
  ------------------
  |  | 1473|  3.73k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   69|  3.73k|  if(h) {
  ------------------
  |  Branch (69:6): [True: 3.73k, False: 0]
  ------------------
   70|       |    Curl_llist_init(&h->list, NULL);
   71|  3.73k|  }
   72|  3.73k|  return h;
   73|  3.73k|}
Curl_hsts_cleanup:
   78|  7.51k|{
   79|  7.51k|  struct hsts *h = *hp;
   80|  7.51k|  if(h) {
  ------------------
  |  Branch (80:6): [True: 3.73k, False: 3.77k]
  ------------------
   81|  3.73k|    struct Curl_llist_node *e;
   82|  3.73k|    struct Curl_llist_node *n;
   83|  3.73k|    for(e = Curl_llist_head(&h->list); e; e = n) {
  ------------------
  |  Branch (83:40): [True: 0, False: 3.73k]
  ------------------
   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)
  |  |  ------------------
  |  |  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
   87|      0|    }
   88|  3.73k|    curlx_free(h->filename);
  ------------------
  |  | 1476|  3.73k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   89|  3.73k|    curlx_free(h);
  ------------------
  |  | 1476|  3.73k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   90|       |    *hp = NULL;
   91|  3.73k|  }
   92|  7.51k|}
Curl_hsts_save:
  370|  7.46k|{
  371|  7.46k|  struct Curl_llist_node *e;
  372|  7.46k|  struct Curl_llist_node *n;
  373|  7.46k|  CURLcode result = CURLE_OK;
  374|  7.46k|  FILE *out;
  375|  7.46k|  char *tempstore = NULL;
  376|       |
  377|  7.46k|  if(!h)
  ------------------
  |  Branch (377:6): [True: 3.76k, False: 3.70k]
  ------------------
  378|       |    /* no cache activated */
  379|  3.76k|    return CURLE_OK;
  380|       |
  381|       |  /* if no new name is given, use the one we stored from the load */
  382|  3.70k|  if(!file && h->filename)
  ------------------
  |  Branch (382:6): [True: 0, False: 3.70k]
  |  Branch (382:15): [True: 0, False: 0]
  ------------------
  383|      0|    file = h->filename;
  384|       |
  385|  3.70k|  if((h->flags & CURLHSTS_READONLYFILE) || !file || !file[0])
  ------------------
  |  | 1084|  3.70k|#define CURLHSTS_READONLYFILE (1L << 1)
  ------------------
  |  Branch (385:6): [True: 0, False: 3.70k]
  |  Branch (385:44): [True: 0, False: 3.70k]
  |  Branch (385:53): [True: 0, False: 3.70k]
  ------------------
  386|       |    /* marked as read-only, no file or zero length filename */
  387|      0|    goto skipsave;
  388|       |
  389|  3.70k|  result = Curl_fopen(data, file, &out, &tempstore);
  390|  3.70k|  if(!result) {
  ------------------
  |  Branch (390:6): [True: 3.70k, False: 0]
  ------------------
  391|  3.70k|    fputs("# Your HSTS cache. https://curl.se/docs/hsts.html\n"
  392|  3.70k|          "# This file was generated by libcurl! Edit at your own risk.\n",
  393|  3.70k|          out);
  394|  3.70k|    for(e = Curl_llist_head(&h->list); e; e = n) {
  ------------------
  |  Branch (394:40): [True: 0, False: 3.70k]
  ------------------
  395|      0|      struct stsentry *sts = Curl_node_elem(e);
  396|      0|      n = Curl_node_next(e);
  397|      0|      result = hsts_out(sts, out);
  398|      0|      if(result)
  ------------------
  |  Branch (398:10): [True: 0, False: 0]
  ------------------
  399|      0|        break;
  400|      0|    }
  401|  3.70k|    curlx_fclose(out);
  ------------------
  |  |   81|  3.70k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  402|  3.70k|    if(!result && tempstore && curlx_rename(tempstore, file))
  ------------------
  |  |   72|      0|#define curlx_rename            rename
  ------------------
  |  Branch (402:8): [True: 3.70k, False: 0]
  |  Branch (402:19): [True: 0, False: 3.70k]
  |  Branch (402:32): [True: 0, False: 0]
  ------------------
  403|      0|      result = CURLE_WRITE_ERROR;
  404|       |
  405|  3.70k|    if(result && tempstore)
  ------------------
  |  Branch (405:8): [True: 0, False: 3.70k]
  |  Branch (405:18): [True: 0, False: 0]
  ------------------
  406|      0|      unlink(tempstore);
  407|  3.70k|  }
  408|  3.70k|  curlx_free(tempstore);
  ------------------
  |  | 1476|  3.70k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  409|  3.70k|skipsave:
  410|  3.70k|  if(data->set.hsts_write) {
  ------------------
  |  Branch (410:6): [True: 0, False: 3.70k]
  ------------------
  411|       |    /* if there is a write callback */
  412|      0|    struct curl_index i; /* count */
  413|      0|    i.total = Curl_llist_count(&h->list);
  414|      0|    i.index = 0;
  415|      0|    for(e = Curl_llist_head(&h->list); e; e = n) {
  ------------------
  |  Branch (415:40): [True: 0, False: 0]
  ------------------
  416|      0|      struct stsentry *sts = Curl_node_elem(e);
  417|      0|      bool stop;
  418|      0|      n = Curl_node_next(e);
  419|      0|      result = hsts_push(data, &i, sts, &stop);
  420|      0|      if(result || stop)
  ------------------
  |  Branch (420:10): [True: 0, False: 0]
  |  Branch (420:20): [True: 0, False: 0]
  ------------------
  421|      0|        break;
  422|      0|      i.index++;
  423|      0|    }
  424|      0|  }
  425|  3.70k|  return result;
  426|  3.70k|}
Curl_hsts_loadfile:
  605|  3.64k|{
  606|  3.64k|  DEBUGASSERT(h);
  ------------------
  |  | 1075|  3.64k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (606:3): [True: 0, False: 3.64k]
  |  Branch (606:3): [True: 3.64k, False: 0]
  ------------------
  607|  3.64k|  (void)data;
  608|  3.64k|  return hsts_load(h, file);
  609|  3.64k|}
Curl_hsts_loadcb:
  615|  3.66k|{
  616|  3.66k|  if(h)
  ------------------
  |  Branch (616:6): [True: 3.64k, False: 27]
  ------------------
  617|  3.64k|    return hsts_pull(data, h);
  618|     27|  return CURLE_OK;
  619|  3.66k|}
Curl_hsts_loadfiles:
  622|  3.66k|{
  623|  3.66k|  CURLcode result = CURLE_OK;
  624|  3.66k|  struct curl_slist *l = data->state.hstslist;
  625|  3.66k|  if(l) {
  ------------------
  |  Branch (625:6): [True: 3.64k, False: 29]
  ------------------
  626|  3.64k|    Curl_share_lock(data, CURL_LOCK_DATA_HSTS, CURL_LOCK_ACCESS_SINGLE);
  627|       |
  628|  7.28k|    while(l) {
  ------------------
  |  Branch (628:11): [True: 3.64k, False: 3.64k]
  ------------------
  629|  3.64k|      result = Curl_hsts_loadfile(data, data->hsts, l->data);
  630|  3.64k|      if(result)
  ------------------
  |  Branch (630:10): [True: 0, False: 3.64k]
  ------------------
  631|      0|        break;
  632|  3.64k|      l = l->next;
  633|  3.64k|    }
  634|  3.64k|    Curl_share_unlock(data, CURL_LOCK_DATA_HSTS);
  635|  3.64k|  }
  636|  3.66k|  return result;
  637|  3.66k|}
hsts.c:hsts_load:
  560|  3.64k|{
  561|  3.64k|  CURLcode result = CURLE_OK;
  562|  3.64k|  FILE *fp;
  563|       |
  564|       |  /* we need a private copy of the filename so that the hsts cache file
  565|       |     name survives an easy handle reset */
  566|  3.64k|  curlx_free(h->filename);
  ------------------
  |  | 1476|  3.64k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  567|  3.64k|  h->filename = curlx_strdup(file);
  ------------------
  |  | 1470|  3.64k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  568|  3.64k|  if(!h->filename)
  ------------------
  |  Branch (568:6): [True: 0, False: 3.64k]
  ------------------
  569|      0|    return CURLE_OUT_OF_MEMORY;
  570|       |
  571|  3.64k|  fp = curlx_fopen(file, FOPEN_READTEXT);
  ------------------
  |  |   76|  3.64k|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
  572|  3.64k|  if(fp) {
  ------------------
  |  Branch (572:6): [True: 3.64k, False: 0]
  ------------------
  573|  3.64k|    curlx_struct_stat stat;
  ------------------
  |  |   65|  3.64k|#define curlx_struct_stat       struct stat
  ------------------
  574|  3.64k|    if((curlx_fstat(fileno(fp), &stat) == -1) || !S_ISDIR(stat.st_mode)) {
  ------------------
  |  |   64|  3.64k|#define curlx_fstat             fstat
  ------------------
  |  Branch (574:8): [True: 0, False: 3.64k]
  |  Branch (574:50): [True: 3.64k, False: 0]
  ------------------
  575|  3.64k|      struct dynbuf buf;
  576|  3.64k|      bool eof = FALSE;
  ------------------
  |  | 1048|  3.64k|#define FALSE false
  ------------------
  577|  3.64k|      curlx_dyn_init(&buf, MAX_HSTS_LINE);
  ------------------
  |  |   41|  3.64k|#define MAX_HSTS_LINE    4095
  ------------------
  578|  3.64k|      do {
  579|  3.64k|        result = Curl_get_line(&buf, fp, &eof);
  580|  3.64k|        if(!result) {
  ------------------
  |  Branch (580:12): [True: 3.64k, False: 0]
  ------------------
  581|  3.64k|          const char *lineptr = curlx_dyn_ptr(&buf);
  582|  3.64k|          curlx_str_passblanks(&lineptr);
  583|       |
  584|       |          /* Skip empty or commented lines, since we know the line will have
  585|       |             a trailing newline from Curl_get_line we can treat length 1 as
  586|       |             empty. */
  587|  3.64k|          if((*lineptr == '#') || strlen(lineptr) <= 1)
  ------------------
  |  Branch (587:14): [True: 0, False: 3.64k]
  |  Branch (587:35): [True: 3.64k, False: 0]
  ------------------
  588|  3.64k|            continue;
  589|       |
  590|      0|          hsts_add(h, lineptr);
  591|      0|        }
  592|  3.64k|      } while(!result && !eof);
  ------------------
  |  Branch (592:15): [True: 3.64k, False: 0]
  |  Branch (592:26): [True: 0, False: 3.64k]
  ------------------
  593|  3.64k|      curlx_dyn_free(&buf); /* free the line buffer */
  594|  3.64k|    }
  595|  3.64k|    curlx_fclose(fp);
  ------------------
  |  |   81|  3.64k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  596|  3.64k|  }
  597|  3.64k|  return result;
  598|  3.64k|}
hsts.c:hsts_pull:
  512|  3.64k|{
  513|       |  /* if the HSTS read callback is set, use it */
  514|  3.64k|  if(data->set.hsts_read) {
  ------------------
  |  Branch (514:6): [True: 0, False: 3.64k]
  ------------------
  515|      0|    CURLSTScode sc;
  516|      0|    DEBUGASSERT(h);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (516:5): [True: 0, False: 0]
  |  Branch (516:5): [True: 0, False: 0]
  ------------------
  517|      0|    do {
  518|      0|      char buffer[MAX_HSTS_HOSTLEN + 1];
  519|      0|      struct curl_hstsentry e;
  520|      0|      e.name = buffer;
  521|      0|      e.namelen = sizeof(buffer) - 1;
  522|      0|      e.includeSubDomains = FALSE; /* default */
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  523|      0|      e.expire[0] = 0;
  524|      0|      e.expire[MAX_HSTS_DATELEN] = 0;
  ------------------
  |  |   43|      0|#define MAX_HSTS_DATELEN 17
  ------------------
  525|      0|      e.name[0] = 0; /* to make it clean */
  526|      0|      e.name[MAX_HSTS_HOSTLEN] = 0;
  ------------------
  |  |   42|      0|#define MAX_HSTS_HOSTLEN 2048
  ------------------
  527|      0|      sc = data->set.hsts_read(data, &e, data->set.hsts_read_userp);
  528|      0|      if(sc == CURLSTS_OK) {
  ------------------
  |  Branch (528:10): [True: 0, False: 0]
  ------------------
  529|      0|        CURLcode result;
  530|      0|        const char *date = e.expire;
  531|      0|        if(!e.name[0] || e.expire[MAX_HSTS_DATELEN] ||
  ------------------
  |  |   43|      0|#define MAX_HSTS_DATELEN 17
  ------------------
  |  Branch (531:12): [True: 0, False: 0]
  |  Branch (531:26): [True: 0, False: 0]
  ------------------
  532|      0|           e.name[MAX_HSTS_HOSTLEN])
  ------------------
  |  |   42|      0|#define MAX_HSTS_HOSTLEN 2048
  ------------------
  |  Branch (532:12): [True: 0, False: 0]
  ------------------
  533|       |          /* bail out if no name was stored or if a null-terminator is gone */
  534|      0|          return CURLE_BAD_FUNCTION_ARGUMENT;
  535|      0|        if(!date[0])
  ------------------
  |  Branch (535:12): [True: 0, False: 0]
  ------------------
  536|      0|          date = UNLIMITED;
  ------------------
  |  |   44|      0|#define UNLIMITED        "unlimited"
  ------------------
  537|      0|        result = hsts_add_host_expire(h, e.name, strlen(e.name),
  538|      0|                                      date, strlen(date),
  539|       |                                      /* bitfield to bool conversion: */
  540|      0|                                      e.includeSubDomains ? TRUE : FALSE);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
                                                    e.includeSubDomains ? TRUE : FALSE);
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  |  Branch (540:39): [True: 0, False: 0]
  ------------------
  541|      0|        if(result)
  ------------------
  |  Branch (541:12): [True: 0, False: 0]
  ------------------
  542|      0|          return result;
  543|      0|      }
  544|      0|      else if(sc == CURLSTS_FAIL)
  ------------------
  |  Branch (544:15): [True: 0, False: 0]
  ------------------
  545|      0|        return CURLE_ABORTED_BY_CALLBACK;
  546|      0|    } while(sc == CURLSTS_OK);
  ------------------
  |  Branch (546:13): [True: 0, False: 0]
  ------------------
  547|      0|  }
  548|  3.64k|  return CURLE_OK;
  549|  3.64k|}

Curl_http_neg_init:
   89|  3.66k|{
   90|  3.66k|  memset(neg, 0, sizeof(*neg));
   91|  3.66k|  neg->accept_09 = data->set.http09_allowed;
   92|  3.66k|  switch(data->set.httpwant) {
   93|     36|  case CURL_HTTP_VERSION_1_0:
  ------------------
  |  | 2341|     36|#define CURL_HTTP_VERSION_1_0   1L /* please use HTTP 1.0 in the request */
  ------------------
  |  Branch (93:3): [True: 36, False: 3.63k]
  ------------------
   94|     36|    neg->wanted = neg->allowed = (CURL_HTTP_V1x);
  ------------------
  |  |   40|     36|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
   95|     36|    neg->only_10 = TRUE;
  ------------------
  |  | 1045|     36|#define TRUE true
  ------------------
   96|     36|    break;
   97|      2|  case CURL_HTTP_VERSION_1_1:
  ------------------
  |  | 2342|      2|#define CURL_HTTP_VERSION_1_1   2L /* please use HTTP 1.1 in the request */
  ------------------
  |  Branch (97:3): [True: 2, False: 3.66k]
  ------------------
   98|      2|    neg->wanted = neg->allowed = (CURL_HTTP_V1x);
  ------------------
  |  |   40|      2|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
   99|      2|    break;
  100|      2|  case CURL_HTTP_VERSION_2_0:
  ------------------
  |  | 2343|      2|#define CURL_HTTP_VERSION_2_0   3L /* please use HTTP 2 in the request */
  ------------------
  |  Branch (100:3): [True: 2, False: 3.66k]
  ------------------
  101|      2|    neg->wanted = neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   40|      2|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->wanted = neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   41|      2|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  102|      2|    neg->h2_upgrade = TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
  103|      2|    break;
  104|      2|  case CURL_HTTP_VERSION_2TLS:
  ------------------
  |  | 2344|      2|#define CURL_HTTP_VERSION_2TLS  4L /* use version 2 for HTTPS, version 1.1 for
  ------------------
  |  Branch (104:3): [True: 2, False: 3.66k]
  ------------------
  105|      2|    neg->wanted = neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   40|      2|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->wanted = neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   41|      2|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  106|      2|    break;
  107|      2|  case CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE:
  ------------------
  |  | 2346|      2|#define CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE 5L /* please use HTTP 2 without
  ------------------
  |  Branch (107:3): [True: 2, False: 3.66k]
  ------------------
  108|      2|    neg->wanted = neg->allowed = (CURL_HTTP_V2x);
  ------------------
  |  |   41|      2|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  109|      2|    data->state.http_neg.h2_prior_knowledge = TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
  110|      2|    break;
  111|      0|  case CURL_HTTP_VERSION_3:
  ------------------
  |  | 2348|      0|#define CURL_HTTP_VERSION_3     30L /* Use HTTP/3, fallback to HTTP/2 or
  ------------------
  |  Branch (111:3): [True: 0, False: 3.66k]
  ------------------
  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:
  ------------------
  |  | 2352|      0|#define CURL_HTTP_VERSION_3ONLY 31L /* Use HTTP/3 without fallback. For
  ------------------
  |  Branch (115:3): [True: 0, False: 3.66k]
  ------------------
  116|      0|    neg->wanted = neg->allowed = (CURL_HTTP_V3x);
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  117|      0|    break;
  118|  3.62k|  case CURL_HTTP_VERSION_NONE:
  ------------------
  |  | 2338|  3.62k|#define CURL_HTTP_VERSION_NONE  0L /* setting this means we do not care, and
  ------------------
  |  Branch (118:3): [True: 3.62k, False: 44]
  ------------------
  119|  3.62k|  default:
  ------------------
  |  Branch (119:3): [True: 0, False: 3.66k]
  ------------------
  120|  3.62k|    neg->wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   40|  3.62k|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   41|  3.62k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  121|  3.62k|    neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   40|  3.62k|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   41|  3.62k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
                  neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   42|  3.62k|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  122|  3.62k|    break;
  123|  3.66k|  }
  124|  3.66k|}
Curl_http_setup_conn:
  128|  3.62k|{
  129|       |  /* allocate the HTTP-specific struct for the Curl_easy, only to survive
  130|       |     during this request */
  131|  3.62k|  if(data->state.http_neg.wanted == CURL_HTTP_V3x) {
  ------------------
  |  |   42|  3.62k|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  |  Branch (131:6): [True: 0, False: 3.62k]
  ------------------
  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|  3.62k|  return CURLE_OK;
  138|  3.62k|}
Curl_copy_header_value:
  228|     17|{
  229|     17|  struct Curl_str out;
  230|       |
  231|       |  /* find the end of the header name */
  232|     17|  if(!curlx_str_until(&header, &out, MAX_HTTP_RESP_HEADER_SIZE, ':') &&
  ------------------
  |  |  157|     17|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
  |  Branch (232:6): [True: 17, False: 0]
  ------------------
  233|     17|     !curlx_str_single(&header, ':')) {
  ------------------
  |  Branch (233:6): [True: 17, False: 0]
  ------------------
  234|     17|    curlx_str_untilnl(&header, &out, MAX_HTTP_RESP_HEADER_SIZE);
  ------------------
  |  |  157|     17|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
  235|     17|    curlx_str_trimblanks(&out);
  236|     17|    return curlx_memdup0(curlx_str(&out), curlx_strlen(&out));
  ------------------
  |  |   49|     17|#define curlx_str(x)    ((x)->str)
  ------------------
                  return curlx_memdup0(curlx_str(&out), curlx_strlen(&out));
  ------------------
  |  |   50|     17|#define curlx_strlen(x) ((x)->len)
  ------------------
  237|     17|  }
  238|       |  /* bad input, should never happen */
  239|      0|  DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (239:3): [Folded, False: 0]
  |  Branch (239:3): [Folded, False: 0]
  ------------------
  240|      0|  return NULL;
  241|      0|}
Curl_http_auth_act:
  556|     37|{
  557|     37|  struct connectdata *conn = data->conn;
  558|     37|  bool pickhost = FALSE;
  ------------------
  |  | 1048|     37|#define FALSE false
  ------------------
  559|     37|  bool pickproxy = FALSE;
  ------------------
  |  | 1048|     37|#define FALSE false
  ------------------
  560|     37|  CURLcode result = CURLE_OK;
  561|     37|  unsigned long authmask = ~0UL;
  562|       |
  563|     37|  if(!Curl_creds_has_oauth_bearer(data->state.creds))
  ------------------
  |  |   79|     37|#define Curl_creds_has_oauth_bearer(c)   ((c) && (c)->oauth_bearer[0])
  |  |  ------------------
  |  |  |  Branch (79:43): [True: 8, False: 29]
  |  |  |  Branch (79:50): [True: 1, False: 7]
  |  |  ------------------
  ------------------
  564|     36|    authmask &= (unsigned long)~CURLAUTH_BEARER;
  ------------------
  |  |  846|     36|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  565|       |
  566|     37|  if(100 <= data->req.httpcode && data->req.httpcode <= 199)
  ------------------
  |  Branch (566:6): [True: 37, False: 0]
  |  Branch (566:35): [True: 0, False: 37]
  ------------------
  567|       |    /* this is a transient response code, ignore */
  568|      0|    return CURLE_OK;
  569|       |
  570|     37|  if(data->state.authproblem)
  ------------------
  |  Branch (570:6): [True: 0, False: 37]
  ------------------
  571|      0|    return data->set.http_fail_on_error ? CURLE_HTTP_RETURNED_ERROR : CURLE_OK;
  ------------------
  |  Branch (571:12): [True: 0, False: 0]
  ------------------
  572|       |
  573|     37|  if(data->state.creds &&
  ------------------
  |  Branch (573:6): [True: 8, False: 29]
  ------------------
  574|      8|     ((data->req.httpcode == 401) ||
  ------------------
  |  Branch (574:7): [True: 1, False: 7]
  ------------------
  575|      7|      (data->req.authneg && data->req.httpcode < 300))) {
  ------------------
  |  Branch (575:8): [True: 0, False: 7]
  |  Branch (575:29): [True: 0, False: 0]
  ------------------
  576|      1|    pickhost = pickoneauth(&data->state.authhost, authmask, data->state.creds);
  577|      1|    if(!pickhost)
  ------------------
  |  Branch (577:8): [True: 1, False: 0]
  ------------------
  578|      1|      data->state.authproblem = TRUE;
  ------------------
  |  | 1045|      1|#define TRUE true
  ------------------
  579|      0|    else
  580|      0|      data->info.httpauthpicked = data->state.authhost.picked;
  581|      1|    if(data->state.authhost.picked == CURLAUTH_NTLM &&
  ------------------
  |  |  840|      2|#define CURLAUTH_NTLM         (((unsigned long)1) << 3)
  ------------------
  |  Branch (581:8): [True: 0, False: 1]
  ------------------
  582|      0|       (data->req.httpversion_sent > 11)) {
  ------------------
  |  Branch (582:8): [True: 0, False: 0]
  ------------------
  583|      0|      infof(data, "Forcing HTTP/1.1 for NTLM");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  584|      0|      connclose(conn);
  ------------------
  |  |   90|      0|#define connclose(x)   Curl_conncontrol((x), CONNCTRL_CONN_CLOSE)
  |  |  ------------------
  |  |  |  |   84|      0|#define CONNCTRL_CONN_CLOSE      1
  |  |  ------------------
  ------------------
  585|      0|      data->state.http_neg.wanted = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  586|      0|      data->state.http_neg.allowed = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  587|      0|    }
  588|      1|  }
  589|     37|#ifndef CURL_DISABLE_PROXY
  590|     37|  if(conn->http_proxy.creds &&
  ------------------
  |  Branch (590:6): [True: 0, False: 37]
  ------------------
  591|      0|     ((data->req.httpcode == 407) ||
  ------------------
  |  Branch (591:7): [True: 0, False: 0]
  ------------------
  592|      0|      (data->req.authneg && data->req.httpcode < 300))) {
  ------------------
  |  Branch (592:8): [True: 0, False: 0]
  |  Branch (592:29): [True: 0, False: 0]
  ------------------
  593|      0|    pickproxy = pickoneauth(&data->state.authproxy,
  594|      0|                            authmask & ~CURLAUTH_BEARER,
  ------------------
  |  |  846|      0|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  595|      0|                            conn->http_proxy.creds);
  596|      0|    if(!pickproxy)
  ------------------
  |  Branch (596:8): [True: 0, False: 0]
  ------------------
  597|      0|      data->state.authproblem = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  598|      0|    else
  599|      0|      data->info.proxyauthpicked = data->state.authproxy.picked;
  600|      0|  }
  601|     37|#endif
  602|       |
  603|     37|  if(pickhost || pickproxy) {
  ------------------
  |  Branch (603:6): [True: 0, False: 37]
  |  Branch (603:18): [True: 0, False: 37]
  ------------------
  604|      0|    result = http_perhapsrewind(data, conn);
  605|      0|    if(result)
  ------------------
  |  Branch (605:8): [True: 0, False: 0]
  ------------------
  606|      0|      return result;
  607|       |
  608|       |    /* In case this is GSS auth, the newurl field is already allocated so
  609|       |       we must make sure to free it before allocating a new one. As figured
  610|       |       out in bug #2284386 */
  611|      0|    curlx_free(data->req.newurl);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  612|       |    /* clone URL */
  613|      0|    data->req.newurl = Curl_bufref_dup(&data->state.url);
  ------------------
  |  |   49|      0|#define Curl_bufref_dup(x) curlx_strdup(Curl_bufref_ptr(x))
  |  |  ------------------
  |  |  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
  614|      0|    if(!data->req.newurl)
  ------------------
  |  Branch (614:8): [True: 0, False: 0]
  ------------------
  615|      0|      return CURLE_OUT_OF_MEMORY;
  616|      0|  }
  617|     37|  else if((data->req.httpcode < 300) &&
  ------------------
  |  Branch (617:11): [True: 21, False: 16]
  ------------------
  618|     21|          !data->state.authhost.done &&
  ------------------
  |  Branch (618:11): [True: 0, False: 21]
  ------------------
  619|      0|          data->req.authneg) {
  ------------------
  |  Branch (619:11): [True: 0, False: 0]
  ------------------
  620|       |    /* no (known) authentication available,
  621|       |       authentication is not "done" yet and
  622|       |       no authentication seems to be required and
  623|       |       we did not try HEAD or GET */
  624|      0|    if((data->state.httpreq != HTTPREQ_GET) &&
  ------------------
  |  Branch (624:8): [True: 0, False: 0]
  ------------------
  625|      0|       (data->state.httpreq != HTTPREQ_HEAD)) {
  ------------------
  |  Branch (625:8): [True: 0, False: 0]
  ------------------
  626|       |      /* clone URL */
  627|      0|      data->req.newurl = Curl_bufref_dup(&data->state.url);
  ------------------
  |  |   49|      0|#define Curl_bufref_dup(x) curlx_strdup(Curl_bufref_ptr(x))
  |  |  ------------------
  |  |  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
  628|      0|      if(!data->req.newurl)
  ------------------
  |  Branch (628:10): [True: 0, False: 0]
  ------------------
  629|      0|        return CURLE_OUT_OF_MEMORY;
  630|      0|      data->state.authhost.done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  631|      0|    }
  632|      0|  }
  633|     37|  if(http_should_fail(data, data->req.httpcode)) {
  ------------------
  |  Branch (633:6): [True: 0, False: 37]
  ------------------
  634|      0|    failf(data, "The requested URL returned error: %d",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  635|      0|          data->req.httpcode);
  636|      0|    result = CURLE_HTTP_RETURNED_ERROR;
  637|      0|  }
  638|       |
  639|     37|  return result;
  640|     37|}
Curl_http_output_auth:
  806|  3.61k|{
  807|  3.61k|  CURLcode result = CURLE_OK;
  808|  3.61k|  struct auth *authhost;
  809|  3.61k|  struct auth *authproxy;
  810|  3.61k|  const char *path_and_query = path;
  811|  3.61k|  char *tmp_str = NULL;
  812|       |
  813|  3.61k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  3.61k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (813:3): [True: 0, False: 3.61k]
  |  Branch (813:3): [True: 3.61k, False: 0]
  ------------------
  814|  3.61k|  authhost = &data->state.authhost;
  815|  3.61k|  authproxy = &data->state.authproxy;
  816|       |
  817|  3.61k|  if(
  818|  3.61k|#ifndef CURL_DISABLE_PROXY
  819|  3.61k|    (!conn->http_proxy.peer || !conn->http_proxy.creds) &&
  ------------------
  |  Branch (819:6): [True: 3.61k, False: 0]
  |  Branch (819:32): [True: 0, False: 0]
  ------------------
  820|  3.61k|#endif
  821|       |#ifdef USE_SPNEGO
  822|       |    !(authhost->want & CURLAUTH_NEGOTIATE) &&
  823|       |    !(authproxy->want & CURLAUTH_NEGOTIATE) &&
  824|       |#endif
  825|       |#ifndef CURL_DISABLE_HTTPSIG
  826|       |    !(authhost->want & CURLAUTH_HTTPSIG) &&
  827|       |#endif
  828|  3.61k|    !data->state.creds) {
  ------------------
  |  Branch (828:5): [True: 3.39k, False: 218]
  ------------------
  829|       |    /* no authentication with no user or password */
  830|  3.39k|    authhost->done = TRUE;
  ------------------
  |  | 1045|  3.39k|#define TRUE true
  ------------------
  831|  3.39k|    authproxy->done = TRUE;
  ------------------
  |  | 1045|  3.39k|#define TRUE true
  ------------------
  832|  3.39k|    result = CURLE_OK;
  833|  3.39k|    goto out;
  834|  3.39k|  }
  835|       |
  836|    218|  if(query) {
  ------------------
  |  Branch (836:6): [True: 11, False: 207]
  ------------------
  837|     11|    tmp_str = curl_maprintf("%s?%s", path, query);
  838|     11|    if(!tmp_str) {
  ------------------
  |  Branch (838:8): [True: 0, False: 11]
  ------------------
  839|      0|      result = CURLE_OUT_OF_MEMORY;
  840|      0|      goto out;
  841|      0|    }
  842|     11|    path_and_query = tmp_str;
  843|     11|  }
  844|       |
  845|    218|  if(authhost->want && !authhost->picked)
  ------------------
  |  Branch (845:6): [True: 210, False: 8]
  |  Branch (845:24): [True: 210, False: 0]
  ------------------
  846|       |    /* The app has selected one or more methods, but none has been picked
  847|       |       so far by a server round-trip. Then we set the picked one to the
  848|       |       want one, and if this is one single bit it will be used instantly. */
  849|    210|    authhost->picked = authhost->want;
  850|       |
  851|    218|  if(authproxy->want && !authproxy->picked)
  ------------------
  |  Branch (851:6): [True: 218, False: 0]
  |  Branch (851:25): [True: 218, False: 0]
  ------------------
  852|       |    /* The app has selected one or more methods, but none has been picked so
  853|       |       far by a proxy round-trip. Then we set the picked one to the want one,
  854|       |       and if this is one single bit it will be used instantly. */
  855|    218|    authproxy->picked = authproxy->want;
  856|       |
  857|    218|#ifndef CURL_DISABLE_PROXY
  858|       |  /* Send proxy authentication header if needed */
  859|    218|  if(conn->bits.origin_is_proxy || is_connect) {
  ------------------
  |  Branch (859:6): [True: 0, False: 218]
  |  Branch (859:36): [True: 0, False: 218]
  ------------------
  860|      0|    result = output_auth_headers(data, conn, authproxy, request,
  861|      0|                                 path_and_query, TRUE);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  862|      0|    if(result)
  ------------------
  |  Branch (862:8): [True: 0, False: 0]
  ------------------
  863|      0|      goto out;
  864|      0|  }
  865|    218|  else
  866|       |#else
  867|       |  (void)is_connect;
  868|       |#endif /* CURL_DISABLE_PROXY */
  869|       |    /* we have no proxy so let's pretend we are done authenticating
  870|       |       with it */
  871|    218|    authproxy->done = TRUE;
  ------------------
  |  | 1045|    218|#define TRUE true
  ------------------
  872|       |
  873|       |  /* Either we have credentials for the origin we talk to or
  874|       |     performing authentication is allowed here */
  875|    218|  if(data->state.creds || Curl_auth_allowed_to_host(data))
  ------------------
  |  Branch (875:6): [True: 218, False: 0]
  |  Branch (875:27): [True: 0, False: 0]
  ------------------
  876|    218|    result = output_auth_headers(data, conn, authhost, request,
  877|    218|                                 path_and_query, FALSE);
  ------------------
  |  | 1048|    218|#define FALSE false
  ------------------
  878|      0|  else
  879|      0|    authhost->done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  880|       |
  881|    218|  if(((authhost->multipass && !authhost->done) ||
  ------------------
  |  Branch (881:8): [True: 1, False: 217]
  |  Branch (881:31): [True: 1, False: 0]
  ------------------
  882|    217|      (authproxy->multipass && !authproxy->done)) &&
  ------------------
  |  Branch (882:8): [True: 0, False: 217]
  |  Branch (882:32): [True: 0, False: 0]
  ------------------
  883|      1|     (httpreq != HTTPREQ_GET) &&
  ------------------
  |  Branch (883:6): [True: 1, False: 0]
  ------------------
  884|      1|     (httpreq != HTTPREQ_HEAD)) {
  ------------------
  |  Branch (884:6): [True: 1, False: 0]
  ------------------
  885|       |    /* Auth is required and we are not authenticated yet. Make a PUT or POST
  886|       |       with content-length zero as a "probe". */
  887|      1|    data->req.authneg = TRUE;
  ------------------
  |  | 1045|      1|#define TRUE true
  ------------------
  888|      1|  }
  889|    217|  else
  890|    217|    data->req.authneg = FALSE;
  ------------------
  |  | 1048|    217|#define FALSE false
  ------------------
  891|       |
  892|  3.61k|out:
  893|  3.61k|  curlx_free(tmp_str);
  ------------------
  |  | 1476|  3.61k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  894|  3.61k|  return result;
  895|    218|}
Curl_http_input_auth:
 1070|      5|{
 1071|       |  /*
 1072|       |   * This resource requires authentication
 1073|       |   */
 1074|      5|#if defined(USE_SPNEGO) ||                      \
 1075|      5|  defined(USE_NTLM) ||                          \
 1076|      5|  !defined(CURL_DISABLE_DIGEST_AUTH) ||         \
 1077|      5|  !defined(CURL_DISABLE_BASIC_AUTH) ||          \
 1078|      5|  !defined(CURL_DISABLE_BEARER_AUTH)
 1079|       |
 1080|      5|  uint32_t *availp;
 1081|      5|  struct auth *authp;
 1082|      5|  CURLcode result = CURLE_OK;
 1083|      5|  DEBUGASSERT(auth);
  ------------------
  |  | 1075|      5|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1083:3): [True: 0, False: 5]
  |  Branch (1083:3): [True: 5, False: 0]
  ------------------
 1084|      5|  DEBUGASSERT(data);
  ------------------
  |  | 1075|      5|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1084:3): [True: 0, False: 5]
  |  Branch (1084:3): [True: 5, False: 0]
  ------------------
 1085|       |
 1086|      5|  if(proxy) {
  ------------------
  |  Branch (1086:6): [True: 0, False: 5]
  ------------------
 1087|      0|    availp = &data->info.proxyauthavail;
 1088|      0|    authp = &data->state.authproxy;
 1089|      0|  }
 1090|      5|  else {
 1091|      5|    availp = &data->info.httpauthavail;
 1092|      5|    authp = &data->state.authhost;
 1093|      5|  }
 1094|       |
 1095|       |  /*
 1096|       |   * Here we check if we want the specific single authentication (using ==) and
 1097|       |   * if we do, we initiate usage of it.
 1098|       |   *
 1099|       |   * If the provided authentication is wanted as one out of several accepted
 1100|       |   * types (using &), we OR this authentication type to the authavail
 1101|       |   * variable.
 1102|       |   *
 1103|       |   * Note:
 1104|       |   *
 1105|       |   * ->picked is first set to the 'want' value (one or more bits) before the
 1106|       |   * request is sent, and then it is again set _after_ all response 401/407
 1107|       |   * headers have been received but then only to a single preferred method
 1108|       |   * (bit).
 1109|       |   */
 1110|       |
 1111|     20|  while(*auth) {
  ------------------
  |  Branch (1111:9): [True: 20, False: 0]
  ------------------
 1112|       |#ifdef USE_SPNEGO
 1113|       |    if(authcmp("Negotiate", auth))
 1114|       |      result = auth_spnego(data, proxy, auth, authp, availp);
 1115|       |#endif
 1116|       |#ifdef USE_NTLM
 1117|       |    if(!result && authcmp("NTLM", auth))
 1118|       |      result = auth_ntlm(data, proxy, auth, authp, availp);
 1119|       |#endif
 1120|     20|#ifndef CURL_DISABLE_DIGEST_AUTH
 1121|     20|    if(!result && authcmp("Digest", auth))
  ------------------
  |  Branch (1121:8): [True: 20, False: 0]
  |  Branch (1121:19): [True: 5, False: 15]
  ------------------
 1122|      5|      result = auth_digest(data, proxy, auth, authp, availp);
 1123|     20|#endif
 1124|     20|#ifndef CURL_DISABLE_BASIC_AUTH
 1125|     20|    if(!result && authcmp("Basic", auth))
  ------------------
  |  Branch (1125:8): [True: 20, False: 0]
  |  Branch (1125:19): [True: 0, False: 20]
  ------------------
 1126|      0|      result = auth_basic(data, authp, availp);
 1127|     20|#endif
 1128|     20|#ifndef CURL_DISABLE_BEARER_AUTH
 1129|     20|    if(authcmp("Bearer", auth))
  ------------------
  |  Branch (1129:8): [True: 0, False: 20]
  ------------------
 1130|      0|      result = auth_bearer(data, authp, availp);
 1131|     20|#endif
 1132|       |
 1133|     20|    if(result)
  ------------------
  |  Branch (1133:8): [True: 0, False: 20]
  ------------------
 1134|      0|      break;
 1135|       |
 1136|       |    /* there may be multiple methods on one line, so keep reading */
 1137|     20|    auth = strchr(auth, ',');
 1138|     20|    if(auth) /* if we are on a comma, skip it */
  ------------------
  |  Branch (1138:8): [True: 15, False: 5]
  ------------------
 1139|     15|      auth++;
 1140|      5|    else
 1141|      5|      break;
 1142|     15|    curlx_str_passblanks(&auth);
 1143|     15|  }
 1144|      5|  return result;
 1145|       |#else
 1146|       |  (void)data;
 1147|       |  (void)proxy;
 1148|       |  (void)auth;
 1149|       |  /* nothing to do when disabled */
 1150|       |  return CURLE_OK;
 1151|       |#endif
 1152|      5|}
Curl_http_follow:
 1178|     11|{
 1179|     11|  bool disallowport = FALSE;
  ------------------
  |  | 1048|     11|#define FALSE false
  ------------------
 1180|     11|  bool reachedmax = FALSE;
  ------------------
  |  | 1048|     11|#define FALSE false
  ------------------
 1181|     11|  char *follow_url = NULL;
 1182|     11|  CURLUcode uc;
 1183|     11|  CURLcode rewind_result;
 1184|     11|  bool switch_to_get = FALSE;
  ------------------
  |  | 1048|     11|#define FALSE false
  ------------------
 1185|       |
 1186|     11|  DEBUGASSERT(type != FOLLOW_NONE);
  ------------------
  |  | 1075|     11|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1186:3): [True: 0, False: 11]
  |  Branch (1186:3): [True: 11, False: 0]
  ------------------
 1187|       |
 1188|     11|  if(type != FOLLOW_FAKE)
  ------------------
  |  Branch (1188:6): [True: 1, False: 10]
  ------------------
 1189|      1|    data->state.requests++; /* count all real follows */
 1190|     11|  if(type == FOLLOW_REDIR) {
  ------------------
  |  Branch (1190:6): [True: 1, False: 10]
  ------------------
 1191|      1|    if((data->set.maxredirs != -1) &&
  ------------------
  |  Branch (1191:8): [True: 1, False: 0]
  ------------------
 1192|      1|       (data->state.followlocation >= data->set.maxredirs)) {
  ------------------
  |  Branch (1192:8): [True: 1, False: 0]
  ------------------
 1193|      1|      reachedmax = TRUE;
  ------------------
  |  | 1045|      1|#define TRUE true
  ------------------
 1194|      1|      type = FOLLOW_FAKE; /* switch to fake to store the would-be-redirected
 1195|       |                             to URL */
 1196|      1|    }
 1197|      0|    else {
 1198|      0|      data->state.followlocation++; /* count redirect-followings, including
 1199|       |                                       auth reloads */
 1200|       |
 1201|      0|      if(data->set.http_auto_referer) {
  ------------------
  |  Branch (1201:10): [True: 0, False: 0]
  ------------------
 1202|      0|        CURLU *u;
 1203|      0|        char *referer = NULL;
 1204|       |
 1205|       |        /* We are asked to automatically set the previous URL as the referer
 1206|       |           when we get the next URL. We pick the ->url field, which may or may
 1207|       |           not be 100% correct */
 1208|      0|        Curl_bufref_free(&data->state.referer);
 1209|       |
 1210|       |        /* Make a copy of the URL without credentials and fragment */
 1211|      0|        u = curl_url();
 1212|      0|        if(!u)
  ------------------
  |  Branch (1212:12): [True: 0, False: 0]
  ------------------
 1213|      0|          return CURLE_OUT_OF_MEMORY;
 1214|       |
 1215|      0|        uc = curl_url_set(u, CURLUPART_URL,
 1216|      0|                          Curl_bufref_ptr(&data->state.url), 0);
 1217|      0|        if(!uc)
  ------------------
  |  Branch (1217:12): [True: 0, False: 0]
  ------------------
 1218|      0|          uc = curl_url_set(u, CURLUPART_FRAGMENT, NULL, 0);
 1219|      0|        if(!uc)
  ------------------
  |  Branch (1219:12): [True: 0, False: 0]
  ------------------
 1220|      0|          uc = curl_url_set(u, CURLUPART_USER, NULL, 0);
 1221|      0|        if(!uc)
  ------------------
  |  Branch (1221:12): [True: 0, False: 0]
  ------------------
 1222|      0|          uc = curl_url_set(u, CURLUPART_PASSWORD, NULL, 0);
 1223|      0|        if(!uc)
  ------------------
  |  Branch (1223:12): [True: 0, False: 0]
  ------------------
 1224|      0|          uc = curl_url_get(u, CURLUPART_URL, &referer, 0);
 1225|       |
 1226|      0|        curl_url_cleanup(u);
 1227|       |
 1228|      0|        if(uc || !referer)
  ------------------
  |  Branch (1228:12): [True: 0, False: 0]
  |  Branch (1228:18): [True: 0, False: 0]
  ------------------
 1229|      0|          return CURLE_OUT_OF_MEMORY;
 1230|       |
 1231|      0|        Curl_bufref_set(&data->state.referer, referer, 0, curl_free);
 1232|      0|      }
 1233|      0|    }
 1234|      1|  }
 1235|       |
 1236|     11|  if((type != FOLLOW_RETRY) &&
  ------------------
  |  Branch (1236:6): [True: 11, False: 0]
  ------------------
 1237|     11|     (data->req.httpcode != 401) && (data->req.httpcode != 407) &&
  ------------------
  |  Branch (1237:6): [True: 11, False: 0]
  |  Branch (1237:37): [True: 11, False: 0]
  ------------------
 1238|     11|     Curl_is_absolute_url(newurl, NULL, 0, FALSE)) {
  ------------------
  |  | 1048|     11|#define FALSE false
  ------------------
  |  Branch (1238:6): [True: 11, False: 0]
  ------------------
 1239|       |    /* If this is not redirect due to a 401 or 407 response and an absolute
 1240|       |       URL: do not allow a custom port number */
 1241|     11|    disallowport = TRUE;
  ------------------
  |  | 1045|     11|#define TRUE true
  ------------------
 1242|     11|  }
 1243|       |
 1244|     11|  DEBUGASSERT(data->state.uh);
  ------------------
  |  | 1075|     11|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1244:3): [True: 0, False: 11]
  |  Branch (1244:3): [True: 11, False: 0]
  ------------------
 1245|     11|  uc = curl_url_set(data->state.uh, CURLUPART_URL, newurl, (unsigned int)
 1246|     11|                    ((type == FOLLOW_FAKE) ? CURLU_NON_SUPPORT_SCHEME :
  ------------------
  |  |   91|     11|#define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
  ------------------
  |  Branch (1246:22): [True: 11, False: 0]
  ------------------
 1247|     11|                     ((type == FOLLOW_REDIR) ? CURLU_URLENCODE : 0) |
  ------------------
  |  |   95|      0|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1247:23): [True: 0, False: 0]
  ------------------
 1248|      0|                     CURLU_ALLOW_SPACE |
  ------------------
  |  |  100|      0|#define CURLU_ALLOW_SPACE (1 << 11)       /* Allow spaces in the URL */
  ------------------
 1249|      0|                     (data->set.path_as_is ? CURLU_PATH_AS_IS : 0)));
  ------------------
  |  |   92|      0|#define CURLU_PATH_AS_IS (1 << 4)         /* leave dot sequences */
  ------------------
  |  Branch (1249:23): [True: 0, False: 0]
  ------------------
 1250|     11|  if(uc) {
  ------------------
  |  Branch (1250:6): [True: 1, False: 10]
  ------------------
 1251|      1|    if((uc == CURLUE_OUT_OF_MEMORY) || (type != FOLLOW_FAKE)) {
  ------------------
  |  Branch (1251:8): [True: 0, False: 1]
  |  Branch (1251:40): [True: 0, False: 1]
  ------------------
 1252|      0|      failf(data, "The redirect target URL could not be parsed: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1253|      0|            curl_url_strerror(uc));
 1254|      0|      return Curl_uc_to_curlcode(uc);
 1255|      0|    }
 1256|       |
 1257|       |    /* the URL could not be parsed for some reason, but since this is FAKE
 1258|       |       mode, duplicate the field as-is */
 1259|      1|    follow_url = curlx_strdup(newurl);
  ------------------
  |  | 1470|      1|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1260|      1|    if(!follow_url)
  ------------------
  |  Branch (1260:8): [True: 0, False: 1]
  ------------------
 1261|      0|      return CURLE_OUT_OF_MEMORY;
 1262|      1|  }
 1263|     10|  else {
 1264|     10|    CURLU *u = curl_url();
 1265|     10|    if(!u)
  ------------------
  |  Branch (1265:8): [True: 0, False: 10]
  ------------------
 1266|      0|      return CURLE_OUT_OF_MEMORY;
 1267|     10|    uc = curl_url_set(u, CURLUPART_URL,
 1268|     10|                      Curl_bufref_ptr(&data->state.url),
 1269|     10|                      CURLU_URLENCODE | CURLU_ALLOW_SPACE);
  ------------------
  |  |   95|     10|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
                                    CURLU_URLENCODE | CURLU_ALLOW_SPACE);
  ------------------
  |  |  100|     10|#define CURLU_ALLOW_SPACE (1 << 11)       /* Allow spaces in the URL */
  ------------------
 1270|     10|    if(!uc)
  ------------------
  |  Branch (1270:8): [True: 10, False: 0]
  ------------------
 1271|     10|      uc = curl_url_get(data->state.uh, CURLUPART_URL, &follow_url, 0);
 1272|     10|    if(uc) {
  ------------------
  |  Branch (1272:8): [True: 0, False: 10]
  ------------------
 1273|      0|      curl_url_cleanup(u);
 1274|      0|      return Curl_uc_to_curlcode(uc);
 1275|      0|    }
 1276|       |
 1277|     10|#ifndef CURL_DISABLE_DIGEST_AUTH
 1278|     10|    {
 1279|     10|      bool same_origin = Curl_url_same_origin(u, data->state.uh);
 1280|     10|      curl_url_cleanup(u);
 1281|     10|      if(!same_origin)
  ------------------
  |  Branch (1281:10): [True: 10, False: 0]
  ------------------
 1282|     10|        Curl_auth_digest_cleanup(&data->state.digest);
 1283|     10|    }
 1284|       |#else
 1285|       |    curl_url_cleanup(u);
 1286|       |#endif
 1287|     10|  }
 1288|     11|  DEBUGASSERT(follow_url);
  ------------------
  |  | 1075|     11|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1288:3): [True: 0, False: 11]
  |  Branch (1288:3): [True: 11, False: 0]
  ------------------
 1289|       |
 1290|     11|  if(type == FOLLOW_FAKE) {
  ------------------
  |  Branch (1290:6): [True: 11, False: 0]
  ------------------
 1291|       |    /* we are only figuring out the new URL if we would have followed locations
 1292|       |       but now we are done so we can get out! */
 1293|     11|    data->info.wouldredirect = follow_url;
 1294|       |
 1295|     11|    if(reachedmax) {
  ------------------
  |  Branch (1295:8): [True: 1, False: 10]
  ------------------
 1296|      1|      failf(data, "Maximum (%d) redirects followed", data->set.maxredirs);
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 1297|      1|      return CURLE_TOO_MANY_REDIRECTS;
 1298|      1|    }
 1299|     10|    return CURLE_OK;
 1300|     11|  }
 1301|       |
 1302|      0|  if(disallowport)
  ------------------
  |  Branch (1302:6): [True: 0, False: 0]
  ------------------
 1303|      0|    data->state.allow_port = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1304|       |
 1305|      0|  Curl_bufref_set(&data->state.url, follow_url, 0, curl_free);
 1306|      0|  rewind_result = Curl_req_soft_reset(&data->req, data);
 1307|      0|  infof(data, "Issue another request to this URL: '%s'", follow_url);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1308|      0|  if((data->set.http_follow_mode == CURLFOLLOW_FIRSTONLY) &&
  ------------------
  |  |  188|      0|#define CURLFOLLOW_FIRSTONLY 3L
  ------------------
  |  Branch (1308:6): [True: 0, False: 0]
  ------------------
 1309|      0|     !data->state.http_ignorecustom &&
  ------------------
  |  Branch (1309:6): [True: 0, False: 0]
  ------------------
 1310|      0|     CURL_EASY_STR(data, STRING_CUSTOMREQUEST)) {
  ------------------
  |  | 1228|      0|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  |  |  ------------------
  |  |  |  Branch (1228:3): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1311|      0|    data->state.http_ignorecustom = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1312|      0|    infof(data, "Drop custom request method for next request");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1313|      0|  }
 1314|       |
 1315|       |  /*
 1316|       |   * We get here when the HTTP code is 300-399 (and 401). We need to perform
 1317|       |   * differently based on exactly what return code there was.
 1318|       |   *
 1319|       |   * News from 7.10.6: we can also get here on a 401 or 407, in case we act on
 1320|       |   * an HTTP (proxy-) authentication scheme other than Basic.
 1321|       |   */
 1322|      0|  switch(data->info.httpcode) {
 1323|       |    /* 401 - Act on a WWW-Authenticate, we keep on moving and do the
 1324|       |       Authorization: XXXX header in the HTTP request code snippet */
 1325|       |    /* 407 - Act on a Proxy-Authenticate, we keep on moving and do the
 1326|       |       Proxy-Authorization: XXXX header in the HTTP request code snippet */
 1327|       |    /* 300 - Multiple Choices */
 1328|       |    /* 306 - Not used */
 1329|       |    /* 307 - Temporary Redirect */
 1330|      0|  default: /* for all above (and the unknown ones) */
  ------------------
  |  Branch (1330:3): [True: 0, False: 0]
  ------------------
 1331|       |    /* Some codes are explicitly mentioned since I have checked RFC2616 and
 1332|       |     * they seem to be OK to POST to.
 1333|       |     */
 1334|      0|    break;
 1335|      0|  case 301: /* Moved Permanently */
  ------------------
  |  Branch (1335:3): [True: 0, False: 0]
  ------------------
 1336|       |    /* (quote from RFC7231, section 6.4.2)
 1337|       |     *
 1338|       |     * Note: For historical reasons, a user agent MAY change the request
 1339|       |     * method from POST to GET for the subsequent request. If this
 1340|       |     * behavior is undesired, the 307 (Temporary Redirect) status code
 1341|       |     * can be used instead.
 1342|       |     *
 1343|       |     * ----
 1344|       |     *
 1345|       |     * Many webservers expect this, so these servers often answers to a POST
 1346|       |     * request with an error page. To be sure that libcurl gets the page that
 1347|       |     * most user agents would get, libcurl has to force GET.
 1348|       |     *
 1349|       |     * This behavior is forbidden by RFC1945 and the obsolete RFC2616, and
 1350|       |     * can be overridden with CURLOPT_POSTREDIR.
 1351|       |     */
 1352|      0|    if(HTTPREQ_IS_POST(data) && !data->set.post301) {
  ------------------
  |  | 1172|      0|  ((data)->state.httpreq == HTTPREQ_POST ||      \
  |  |  ------------------
  |  |  |  Branch (1172:4): [True: 0, False: 0]
  |  |  ------------------
  |  | 1173|      0|   (data)->state.httpreq == HTTPREQ_POST_FORM || \
  |  |  ------------------
  |  |  |  Branch (1173:4): [True: 0, False: 0]
  |  |  ------------------
  |  | 1174|      0|   (data)->state.httpreq == HTTPREQ_POST_MIME)
  |  |  ------------------
  |  |  |  Branch (1174:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1352:33): [True: 0, False: 0]
  ------------------
 1353|      0|      http_switch_to_get(data, 301);
 1354|      0|      switch_to_get = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1355|      0|    }
 1356|      0|    break;
 1357|      0|  case 302: /* Found */
  ------------------
  |  Branch (1357:3): [True: 0, False: 0]
  ------------------
 1358|       |    /* (quote from RFC7231, section 6.4.3)
 1359|       |     *
 1360|       |     * Note: For historical reasons, a user agent MAY change the request
 1361|       |     * method from POST to GET for the subsequent request. If this
 1362|       |     * behavior is undesired, the 307 (Temporary Redirect) status code
 1363|       |     * can be used instead.
 1364|       |     *
 1365|       |     * ----
 1366|       |     *
 1367|       |     * Many webservers expect this, so these servers often answers to a POST
 1368|       |     * request with an error page. To be sure that libcurl gets the page that
 1369|       |     * most user agents would get, libcurl has to force GET.
 1370|       |     *
 1371|       |     * This behavior is forbidden by RFC1945 and the obsolete RFC2616, and
 1372|       |     * can be overridden with CURLOPT_POSTREDIR.
 1373|       |     */
 1374|      0|    if(HTTPREQ_IS_POST(data) && !data->set.post302) {
  ------------------
  |  | 1172|      0|  ((data)->state.httpreq == HTTPREQ_POST ||      \
  |  |  ------------------
  |  |  |  Branch (1172:4): [True: 0, False: 0]
  |  |  ------------------
  |  | 1173|      0|   (data)->state.httpreq == HTTPREQ_POST_FORM || \
  |  |  ------------------
  |  |  |  Branch (1173:4): [True: 0, False: 0]
  |  |  ------------------
  |  | 1174|      0|   (data)->state.httpreq == HTTPREQ_POST_MIME)
  |  |  ------------------
  |  |  |  Branch (1174:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1374:33): [True: 0, False: 0]
  ------------------
 1375|      0|      http_switch_to_get(data, 302);
 1376|      0|      switch_to_get = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1377|      0|    }
 1378|      0|    break;
 1379|       |
 1380|      0|  case 303: /* See Other */
  ------------------
  |  Branch (1380:3): [True: 0, False: 0]
  ------------------
 1381|       |    /* 'See Other' location is not the resource but a substitute for the
 1382|       |     * resource. In this case we switch the method to GET/HEAD, unless the
 1383|       |     * method is POST and the user specified to keep it as POST.
 1384|       |     */
 1385|      0|    if(!HTTPREQ_IS_POST(data) || !data->set.post303) {
  ------------------
  |  | 1172|      0|  ((data)->state.httpreq == HTTPREQ_POST ||      \
  |  |  ------------------
  |  |  |  Branch (1172:4): [True: 0, False: 0]
  |  |  ------------------
  |  | 1173|      0|   (data)->state.httpreq == HTTPREQ_POST_FORM || \
  |  |  ------------------
  |  |  |  Branch (1173:4): [True: 0, False: 0]
  |  |  ------------------
  |  | 1174|      0|   (data)->state.httpreq == HTTPREQ_POST_MIME)
  |  |  ------------------
  |  |  |  Branch (1174:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1385:34): [True: 0, False: 0]
  ------------------
 1386|      0|      http_switch_to_get(data, 303);
 1387|      0|      switch_to_get = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1388|      0|    }
 1389|      0|    break;
 1390|      0|  case 304: /* Not Modified */
  ------------------
  |  Branch (1390:3): [True: 0, False: 0]
  ------------------
 1391|       |    /* 304 means we did a conditional request and it was "Not modified".
 1392|       |     * We should not get any Location: header in this response!
 1393|       |     */
 1394|      0|    break;
 1395|      0|  case 305: /* Use Proxy */
  ------------------
  |  Branch (1395:3): [True: 0, False: 0]
  ------------------
 1396|       |    /* (quote from RFC2616, section 10.3.6):
 1397|       |     * "The requested resource MUST be accessed through the proxy given
 1398|       |     * by the Location field. The Location field gives the URI of the
 1399|       |     * proxy. The recipient is expected to repeat this single request
 1400|       |     * via the proxy. 305 responses MUST only be generated by origin
 1401|       |     * servers."
 1402|       |     */
 1403|      0|    break;
 1404|      0|  }
 1405|       |
 1406|       |  /* When rewind of upload data failed and we are not switching to GET,
 1407|       |   * we need to fail the follow, as we cannot send the data again. */
 1408|      0|  if(rewind_result && !switch_to_get)
  ------------------
  |  Branch (1408:6): [True: 0, False: 0]
  |  Branch (1408:23): [True: 0, False: 0]
  ------------------
 1409|      0|    return rewind_result;
 1410|       |
 1411|      0|  Curl_pgrsTime(data, TIMER_REDIRECT);
 1412|      0|  Curl_pgrsResetTransferSizes(data);
 1413|       |
 1414|      0|  return CURLE_OK;
 1415|      0|}
Curl_compareheader:
 1430|     43|{
 1431|       |  /* RFC2616, section 4.2 says: "Each header field consists of a name followed
 1432|       |   * by a colon (":") and the field value. Field names are case-insensitive.
 1433|       |   * The field value MAY be preceded by any amount of LWS, though a single SP
 1434|       |   * is preferred." */
 1435|       |
 1436|     43|  const char *p;
 1437|     43|  struct Curl_str val;
 1438|     43|  DEBUGASSERT(hlen);
  ------------------
  |  | 1075|     43|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1438:3): [True: 0, False: 43]
  |  Branch (1438:3): [True: 43, False: 0]
  ------------------
 1439|     43|  DEBUGASSERT(clen);
  ------------------
  |  | 1075|     43|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1439:3): [True: 0, False: 43]
  |  Branch (1439:3): [True: 43, False: 0]
  ------------------
 1440|     43|  DEBUGASSERT(header);
  ------------------
  |  | 1075|     43|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1440:3): [True: 0, False: 43]
  |  Branch (1440:3): [True: 43, False: 0]
  ------------------
 1441|     43|  DEBUGASSERT(content);
  ------------------
  |  | 1075|     43|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1441:3): [True: 0, False: 43]
  |  Branch (1441:3): [True: 43, False: 0]
  ------------------
 1442|       |
 1443|     43|  if(!curl_strnequal(headerline, header, hlen))
  ------------------
  |  Branch (1443:6): [True: 0, False: 43]
  ------------------
 1444|      0|    return FALSE; /* does not start with header */
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1445|       |
 1446|       |  /* pass the header */
 1447|     43|  p = &headerline[hlen];
 1448|       |
 1449|     43|  if(curlx_str_cspn(&p, &val, "\r\n"))
  ------------------
  |  Branch (1449:6): [True: 21, False: 22]
  ------------------
 1450|     21|    return FALSE;
  ------------------
  |  | 1048|     21|#define FALSE false
  ------------------
 1451|     22|  curlx_str_trimblanks(&val);
 1452|       |
 1453|       |  /* find the content string in the rest of the line */
 1454|     22|  if(curlx_strlen(&val) >= clen) {
  ------------------
  |  |   50|     22|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (1454:6): [True: 21, False: 1]
  ------------------
 1455|     21|    size_t len;
 1456|     21|    p = curlx_str(&val);
  ------------------
  |  |   49|     21|#define curlx_str(x)    ((x)->str)
  ------------------
 1457|     21|    for(len = curlx_strlen(&val); len >= clen;) {
  ------------------
  |  |   50|     21|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (1457:35): [True: 21, False: 0]
  ------------------
 1458|     21|      struct Curl_str next;
 1459|     21|      const char *o = p;
 1460|       |      /* after a match there must be a comma, space, newline or null byte */
 1461|     21|      if(curl_strnequal(p, content, clen) &&
  ------------------
  |  Branch (1461:10): [True: 21, False: 0]
  ------------------
 1462|     21|         ((p[clen] == ',') || ISBLANK(p[clen]) || ISNEWLINE(p[clen]) ||
  ------------------
  |  |   43|     42|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 0, False: 21]
  |  |  |  Branch (43:38): [True: 0, False: 21]
  |  |  ------------------
  ------------------
                       ((p[clen] == ',') || ISBLANK(p[clen]) || ISNEWLINE(p[clen]) ||
  ------------------
  |  |   48|     42|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (48:26): [True: 0, False: 21]
  |  |  |  Branch (48:43): [True: 14, False: 7]
  |  |  ------------------
  ------------------
  |  Branch (1462:11): [True: 0, False: 21]
  ------------------
 1463|      7|          !p[clen]))
  ------------------
  |  Branch (1463:11): [True: 7, False: 0]
  ------------------
 1464|     21|        return TRUE; /* match! */
  ------------------
  |  | 1045|     21|#define TRUE true
  ------------------
 1465|       |      /* advance to the next comma */
 1466|      0|      if(curlx_str_until(&p, &next, len, ',') ||
  ------------------
  |  Branch (1466:10): [True: 0, False: 0]
  ------------------
 1467|      0|         curlx_str_single(&p, ','))
  ------------------
  |  Branch (1467:10): [True: 0, False: 0]
  ------------------
 1468|      0|        break; /* no comma, get out */
 1469|       |
 1470|       |      /* if there are more dummy commas, move over them as well */
 1471|      0|      do
 1472|      0|        curlx_str_passblanks(&p);
 1473|      0|      while(!curlx_str_single(&p, ','));
  ------------------
  |  Branch (1473:13): [True: 0, False: 0]
  ------------------
 1474|       |      /* trailing blanks may move the parsing point past the value end,
 1475|       |         then there is nothing left to match */
 1476|      0|      if((size_t)(p - o) > len)
  ------------------
  |  Branch (1476:10): [True: 0, False: 0]
  ------------------
 1477|      0|        break;
 1478|      0|      len -= (p - o);
 1479|      0|    }
 1480|     21|  }
 1481|      1|  return FALSE; /* no match */
  ------------------
  |  | 1048|      1|#define FALSE false
  ------------------
 1482|     22|}
Curl_http_done:
 1684|  3.62k|{
 1685|  3.62k|  struct connectdata *conn = data->conn;
 1686|       |
 1687|       |  /* Clear multipass flag. If authentication is not done yet, then it will get
 1688|       |   * a chance to be set back to true when we output the next auth header */
 1689|  3.62k|  data->state.authhost.multipass = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
 1690|  3.62k|  data->state.authproxy.multipass = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
 1691|       |
 1692|  3.62k|  if(curlx_dyn_len(&data->state.headerb)) {
  ------------------
  |  Branch (1692:6): [True: 562, False: 3.06k]
  ------------------
 1693|    562|    (void)http_write_header(data, curlx_dyn_ptr(&data->state.headerb),
 1694|    562|                            curlx_dyn_len(&data->state.headerb));
 1695|    562|  }
 1696|  3.62k|  curlx_dyn_reset(&data->state.headerb);
 1697|       |
 1698|  3.62k|  if(status)
  ------------------
  |  Branch (1698:6): [True: 599, False: 3.03k]
  ------------------
 1699|    599|    return status;
 1700|       |
 1701|  3.03k|  if(!premature && /* this check is pointless when DONE is called before the
  ------------------
  |  Branch (1701:6): [True: 3.03k, False: 0]
  ------------------
 1702|       |                      entire operation is complete */
 1703|  3.03k|     !conn->bits.retry &&
  ------------------
  |  Branch (1703:6): [True: 3.03k, False: 0]
  ------------------
 1704|  3.03k|     !data->set.connect_only &&
  ------------------
  |  Branch (1704:6): [True: 3.01k, False: 18]
  ------------------
 1705|  3.01k|     (data->req.bytecount +
  ------------------
  |  Branch (1705:6): [True: 2.96k, False: 45]
  ------------------
 1706|  3.01k|      data->req.headerbytecount -
 1707|  3.01k|      data->req.deductheadercount) <= 0) {
 1708|       |    /* If this connection is not closed to be retried, AND nothing was
 1709|       |       read from the HTTP server (that counts), this cannot be right so we
 1710|       |       return an error here */
 1711|  2.96k|    failf(data, "Empty reply from server");
  ------------------
  |  |   62|  2.96k|#define failf Curl_failf
  ------------------
 1712|       |    /* Mark it as closed to avoid the "left intact" message */
 1713|  2.96k|    streamclose(conn);
  ------------------
  |  |   89|  2.96k|#define streamclose(x) Curl_conncontrol((x), CONNCTRL_STREAM_CLOSE)
  |  |  ------------------
  |  |  |  |   85|  2.96k|#define CONNCTRL_STREAM_CLOSE    2
  |  |  ------------------
  ------------------
 1714|  2.96k|    return CURLE_GOT_NOTHING;
 1715|  2.96k|  }
 1716|       |
 1717|     63|  return CURLE_OK;
 1718|  3.03k|}
Curl_add_custom_headers:
 1767|  3.59k|{
 1768|  3.59k|  struct curl_slist *h[2];
 1769|  3.59k|  struct curl_slist *headers;
 1770|  3.59k|  int numlists = 1; /* by default */
 1771|  3.59k|  int i;
 1772|       |
 1773|  3.59k|#ifndef CURL_DISABLE_PROXY
 1774|  3.59k|  enum Curl_proxy_use proxy;
 1775|       |
 1776|  3.59k|  if(is_connect)
  ------------------
  |  Branch (1776:6): [True: 0, False: 3.59k]
  ------------------
 1777|      0|    proxy = HEADER_CONNECT;
 1778|  3.59k|  else
 1779|  3.59k|    proxy = data->conn->bits.origin_is_proxy ? HEADER_PROXY : HEADER_SERVER;
  ------------------
  |  Branch (1779:13): [True: 0, False: 3.59k]
  ------------------
 1780|       |
 1781|  3.59k|  switch(proxy) {
  ------------------
  |  Branch (1781:10): [True: 3.59k, False: 0]
  ------------------
 1782|  3.59k|  case HEADER_SERVER:
  ------------------
  |  Branch (1782:3): [True: 3.59k, False: 0]
  ------------------
 1783|  3.59k|    h[0] = data->set.headers;
 1784|  3.59k|    break;
 1785|      0|  case HEADER_PROXY:
  ------------------
  |  Branch (1785:3): [True: 0, False: 3.59k]
  ------------------
 1786|      0|    h[0] = data->set.headers;
 1787|      0|    if(data->set.sep_headers) {
  ------------------
  |  Branch (1787:8): [True: 0, False: 0]
  ------------------
 1788|      0|      h[1] = data->set.proxyheaders;
 1789|      0|      numlists++;
 1790|      0|    }
 1791|      0|    break;
 1792|      0|  case HEADER_CONNECT:
  ------------------
  |  Branch (1792:3): [True: 0, False: 3.59k]
  ------------------
 1793|      0|    if(data->set.sep_headers)
  ------------------
  |  Branch (1793:8): [True: 0, False: 0]
  ------------------
 1794|      0|      h[0] = data->set.proxyheaders;
 1795|      0|    else
 1796|      0|      h[0] = data->set.headers;
 1797|      0|    break;
 1798|      0|  case HEADER_CONNECT_UDP:
  ------------------
  |  Branch (1798:3): [True: 0, False: 3.59k]
  ------------------
 1799|      0|    if(data->set.sep_headers)
  ------------------
  |  Branch (1799:8): [True: 0, False: 0]
  ------------------
 1800|      0|      h[0] = data->set.proxyheaders;
 1801|      0|    else
 1802|      0|      h[0] = data->set.headers;
 1803|      0|    break;
 1804|  3.59k|  }
 1805|       |#else
 1806|       |  (void)is_connect;
 1807|       |  h[0] = data->set.headers;
 1808|       |#endif
 1809|       |
 1810|       |  /* loop through one or two lists */
 1811|  7.19k|  for(i = 0; i < numlists; i++) {
  ------------------
  |  Branch (1811:14): [True: 3.59k, False: 3.59k]
  ------------------
 1812|  4.56k|    for(headers = h[i]; headers; headers = headers->next) {
  ------------------
  |  Branch (1812:25): [True: 967, False: 3.59k]
  ------------------
 1813|    967|      CURLcode result = CURLE_OK;
 1814|    967|      bool blankheader = FALSE;
  ------------------
  |  | 1048|    967|#define FALSE false
  ------------------
 1815|    967|      struct Curl_str name;
 1816|    967|      const char *p = headers->data;
 1817|    967|      const char *origp = p;
 1818|    967|      size_t hlen = strlen(origp);
 1819|       |
 1820|       |      /* explicitly asked to send header without content is done by a header
 1821|       |         that ends with a semicolon, but there must be no colon present in the
 1822|       |         name */
 1823|    967|      if(!curlx_str_until(&p, &name, hlen, ';') &&
  ------------------
  |  Branch (1823:10): [True: 749, False: 218]
  ------------------
 1824|    749|         !curlx_str_single(&p, ';') &&
  ------------------
  |  Branch (1824:10): [True: 26, False: 723]
  ------------------
 1825|     26|         !curlx_str_single(&p, '\0') &&
  ------------------
  |  Branch (1825:10): [True: 2, False: 24]
  ------------------
 1826|      2|         !memchr(curlx_str(&name), ':', curlx_strlen(&name)))
  ------------------
  |  |   49|      2|#define curlx_str(x)    ((x)->str)
  ------------------
                       !memchr(curlx_str(&name), ':', curlx_strlen(&name)))
  ------------------
  |  |   50|      2|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (1826:10): [True: 2, False: 0]
  ------------------
 1827|      2|        blankheader = TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
 1828|    965|      else {
 1829|    965|        p = origp;
 1830|    965|        if(!curlx_str_until(&p, &name, hlen, ':') &&
  ------------------
  |  Branch (1830:12): [True: 753, False: 212]
  ------------------
 1831|    753|           !curlx_str_single(&p, ':')) {
  ------------------
  |  Branch (1831:12): [True: 129, False: 624]
  ------------------
 1832|    129|          struct Curl_str val;
 1833|    129|          curlx_str_untilnl(&p, &val, hlen);
 1834|    129|          curlx_str_trimblanks(&val);
 1835|    129|          if(!curlx_strlen(&val))
  ------------------
  |  |   50|    129|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (1835:14): [True: 40, False: 89]
  ------------------
 1836|       |            /* no content, do not send this */
 1837|     40|            continue;
 1838|    129|        }
 1839|    836|        else
 1840|       |          /* no colon */
 1841|    836|          continue;
 1842|    965|      }
 1843|       |
 1844|       |      /* a field name is a token and carries no surrounding whitespace, so
 1845|       |         trim the parsed name before matching. Otherwise `Authorization :`
 1846|       |         (space before the colon) slips past the Authorization/Cookie check
 1847|       |         below and gets forwarded to another host on a redirect. */
 1848|     91|      curlx_str_trimblanks(&name);
 1849|       |
 1850|       |      /* only send this if the contents was non-blank or done special */
 1851|       |
 1852|     91|      if(data->state.http_host &&
  ------------------
  |  Branch (1852:10): [True: 91, False: 0]
  ------------------
 1853|       |         /* a Host: header was sent already, do not pass on any custom
 1854|       |            Host: header as that will produce *two* in the same
 1855|       |            request! */
 1856|     91|         curlx_str_casecompare(&name, "Host"))
  ------------------
  |  Branch (1856:10): [True: 2, False: 89]
  ------------------
 1857|      2|        ;
 1858|     89|      else if(data->state.httpreq == HTTPREQ_POST_FORM &&
  ------------------
  |  Branch (1858:15): [True: 0, False: 89]
  ------------------
 1859|       |              /* this header (extended by formdata.c) is sent later */
 1860|      0|              curlx_str_casecompare(&name, "Content-Type"))
  ------------------
  |  Branch (1860:15): [True: 0, False: 0]
  ------------------
 1861|      0|        ;
 1862|     89|      else if(data->state.httpreq == HTTPREQ_POST_MIME &&
  ------------------
  |  Branch (1862:15): [True: 58, False: 31]
  ------------------
 1863|       |              /* this header is sent later */
 1864|     58|              curlx_str_casecompare(&name, "Content-Type"))
  ------------------
  |  Branch (1864:15): [True: 0, False: 58]
  ------------------
 1865|      0|        ;
 1866|     89|      else if(data->req.authneg &&
  ------------------
  |  Branch (1866:15): [True: 1, False: 88]
  ------------------
 1867|       |              /* while doing auth neg, do not allow the custom length since
 1868|       |                 we will force length zero then */
 1869|      1|              curlx_str_casecompare(&name, "Content-Length"))
  ------------------
  |  Branch (1869:15): [True: 0, False: 1]
  ------------------
 1870|      0|        ;
 1871|     89|      else if(curlx_str_casecompare(&name, "Connection"))
  ------------------
  |  Branch (1871:15): [True: 2, False: 87]
  ------------------
 1872|       |        /* Connection headers are handled specially */
 1873|      2|        ;
 1874|     87|      else if((httpversion >= 20) &&
  ------------------
  |  Branch (1874:15): [True: 0, False: 87]
  ------------------
 1875|      0|              curlx_str_casecompare(&name, "Transfer-Encoding"))
  ------------------
  |  Branch (1875:15): [True: 0, False: 0]
  ------------------
 1876|       |        /* HTTP/2 does not support chunked requests */
 1877|      0|        ;
 1878|     87|      else if((curlx_str_casecompare(&name, "Authorization") ||
  ------------------
  |  Branch (1878:16): [True: 0, False: 87]
  ------------------
 1879|     87|               curlx_str_casecompare(&name, "Cookie")) &&
  ------------------
  |  Branch (1879:16): [True: 2, False: 85]
  ------------------
 1880|       |              /* be careful of sending this potentially sensitive header to
 1881|       |                 other hosts */
 1882|      2|              !Curl_auth_allowed_to_host(data))
  ------------------
  |  Branch (1882:15): [True: 0, False: 2]
  ------------------
 1883|      0|        ;
 1884|     87|      else if(blankheader) {
  ------------------
  |  Branch (1884:15): [True: 2, False: 85]
  ------------------
 1885|      2|        result = curlx_dyn_addn(req, curlx_str(&name), curlx_strlen(&name));
  ------------------
  |  |   49|      2|#define curlx_str(x)    ((x)->str)
  ------------------
                      result = curlx_dyn_addn(req, curlx_str(&name), curlx_strlen(&name));
  ------------------
  |  |   50|      2|#define curlx_strlen(x) ((x)->len)
  ------------------
 1886|      2|        if(!result)
  ------------------
  |  Branch (1886:12): [True: 2, False: 0]
  ------------------
 1887|      2|          result = curlx_dyn_addn(req, STRCONST(":\r\n"));
  ------------------
  |  | 1297|      2|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      2|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 1888|      2|      }
 1889|     85|      else
 1890|     85|        result = curlx_dyn_addf(req, "%s\r\n", origp);
 1891|       |
 1892|     91|      if(result)
  ------------------
  |  Branch (1892:10): [True: 0, False: 91]
  ------------------
 1893|      0|        return result;
 1894|     91|    }
 1895|  3.59k|  }
 1896|       |
 1897|  3.59k|  return CURLE_OK;
 1898|  3.59k|}
Curl_add_timecondition:
 1903|  3.59k|{
 1904|  3.59k|  const struct tm *tm;
 1905|  3.59k|  struct tm keeptime;
 1906|  3.59k|  CURLcode result;
 1907|  3.59k|  char datestr[80];
 1908|  3.59k|  const char *condp;
 1909|  3.59k|  size_t len;
 1910|       |
 1911|  3.59k|  if(data->set.timecondition == CURL_TIMECOND_NONE)
  ------------------
  |  | 2436|  3.59k|#define CURL_TIMECOND_NONE         0L
  ------------------
  |  Branch (1911:6): [True: 3.57k, False: 26]
  ------------------
 1912|       |    /* no condition was asked for */
 1913|  3.57k|    return CURLE_OK;
 1914|       |
 1915|     26|  result = curlx_gmtime(data->set.timevalue, &keeptime);
 1916|     26|  if(result) {
  ------------------
  |  Branch (1916:6): [True: 0, False: 26]
  ------------------
 1917|      0|    failf(data, "Invalid TIMEVALUE");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1918|      0|    return result;
 1919|      0|  }
 1920|     26|  tm = &keeptime;
 1921|       |
 1922|     26|  switch(data->set.timecondition) {
 1923|      0|  default:
  ------------------
  |  Branch (1923:3): [True: 0, False: 26]
  ------------------
 1924|      0|    DEBUGF(infof(data, "invalid time condition"));
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1925|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1926|       |
 1927|     24|  case CURL_TIMECOND_IFMODSINCE:
  ------------------
  |  | 2437|     24|#define CURL_TIMECOND_IFMODSINCE   1L
  ------------------
  |  Branch (1927:3): [True: 24, False: 2]
  ------------------
 1928|     24|    condp = "If-Modified-Since";
 1929|     24|    len = 17;
 1930|     24|    break;
 1931|      1|  case CURL_TIMECOND_IFUNMODSINCE:
  ------------------
  |  | 2438|      1|#define CURL_TIMECOND_IFUNMODSINCE 2L
  ------------------
  |  Branch (1931:3): [True: 1, False: 25]
  ------------------
 1932|      1|    condp = "If-Unmodified-Since";
 1933|      1|    len = 19;
 1934|      1|    break;
 1935|      1|  case CURL_TIMECOND_LASTMOD:
  ------------------
  |  | 2439|      1|#define CURL_TIMECOND_LASTMOD      3L
  ------------------
  |  Branch (1935:3): [True: 1, False: 25]
  ------------------
 1936|      1|    condp = "Last-Modified";
 1937|      1|    len = 13;
 1938|      1|    break;
 1939|     26|  }
 1940|       |
 1941|     26|  if(Curl_checkheaders(data, condp, len)) {
  ------------------
  |  Branch (1941:6): [True: 0, False: 26]
  ------------------
 1942|       |    /* A custom header was specified; it will be sent instead. */
 1943|      0|    return CURLE_OK;
 1944|      0|  }
 1945|       |
 1946|       |  /* The If-Modified-Since header family should have their times set in
 1947|       |   * GMT as RFC2616 defines: "All HTTP date/time stamps MUST be
 1948|       |   * represented in Greenwich Mean Time (GMT), without exception. For the
 1949|       |   * purposes of HTTP, GMT is exactly equal to UTC (Coordinated Universal
 1950|       |   * Time)." (see page 20 of RFC2616).
 1951|       |   */
 1952|       |
 1953|       |  /* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
 1954|     26|  curl_msnprintf(datestr, sizeof(datestr),
 1955|     26|                 "%s: %s, %02d %s %4d %02d:%02d:%02d GMT\r\n",
 1956|     26|                 condp,
 1957|     26|                 Curl_wkday[tm->tm_wday ? tm->tm_wday - 1 : 6],
  ------------------
  |  Branch (1957:29): [True: 26, False: 0]
  ------------------
 1958|     26|                 tm->tm_mday,
 1959|     26|                 Curl_month[tm->tm_mon],
 1960|     26|                 tm->tm_year + 1900,
 1961|     26|                 tm->tm_hour,
 1962|     26|                 tm->tm_min,
 1963|     26|                 tm->tm_sec);
 1964|       |
 1965|     26|  result = curlx_dyn_add(req, datestr);
 1966|     26|  return result;
 1967|     26|}
Curl_http_method:
 1981|  3.61k|{
 1982|  3.61k|  Curl_HttpReq httpreq = (Curl_HttpReq)data->state.httpreq;
 1983|  3.61k|  const char *request;
 1984|  3.61k|#ifndef CURL_DISABLE_WEBSOCKETS
 1985|  3.61k|  if(data->conn->scheme->protocol & (CURLPROTO_WS | CURLPROTO_WSS))
  ------------------
  |  |   63|  3.61k|#define CURLPROTO_WS     (1L << 30)
  ------------------
                if(data->conn->scheme->protocol & (CURLPROTO_WS | CURLPROTO_WSS))
  ------------------
  |  |   64|  3.61k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  ------------------
  |  Branch (1985:6): [True: 0, False: 3.61k]
  ------------------
 1986|      0|    httpreq = HTTPREQ_GET;
 1987|  3.61k|  else
 1988|  3.61k|#endif
 1989|  3.61k|  if((data->conn->scheme->protocol & (PROTO_FAMILY_HTTP | CURLPROTO_FTP)) &&
  ------------------
  |  |   84|  3.61k|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1088|  3.61k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1089|  3.61k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|  3.61k|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|  3.61k|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|  3.61k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
                if((data->conn->scheme->protocol & (PROTO_FAMILY_HTTP | CURLPROTO_FTP)) &&
  ------------------
  |  | 1090|  3.61k|#define CURLPROTO_FTP     (1L << 2)
  ------------------
  |  Branch (1989:6): [True: 3.61k, False: 0]
  ------------------
 1990|  3.61k|     data->state.upload)
  ------------------
  |  Branch (1990:6): [True: 13, False: 3.59k]
  ------------------
 1991|     13|    httpreq = HTTPREQ_PUT;
 1992|       |
 1993|       |  /* Now set the 'request' pointer to the proper request string */
 1994|  3.61k|  if(!data->state.http_ignorecustom &&
  ------------------
  |  Branch (1994:6): [True: 3.61k, False: 0]
  ------------------
 1995|  3.61k|     CURL_EASY_STR(data, STRING_CUSTOMREQUEST)) {
  ------------------
  |  | 1228|  3.61k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  |  |  ------------------
  |  |  |  Branch (1228:3): [True: 71, False: 3.54k]
  |  |  ------------------
  ------------------
 1996|     71|    request = CURL_EASY_STR(data, STRING_CUSTOMREQUEST);
  ------------------
  |  | 1228|     71|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
 1997|     71|  }
 1998|  3.54k|  else {
 1999|  3.54k|    if(data->req.no_body)
  ------------------
  |  Branch (1999:8): [True: 35, False: 3.50k]
  ------------------
 2000|     35|      request = "HEAD";
 2001|  3.50k|    else {
 2002|  3.50k|      DEBUGASSERT((httpreq >= HTTPREQ_GET) && (httpreq <= HTTPREQ_HEAD));
  ------------------
  |  | 1075|  3.50k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2002:7): [True: 0, False: 3.50k]
  |  Branch (2002:7): [True: 0, False: 0]
  |  Branch (2002:7): [True: 3.50k, False: 0]
  |  Branch (2002:7): [True: 3.50k, False: 0]
  ------------------
 2003|  3.50k|      switch(httpreq) {
 2004|     75|      case HTTPREQ_POST:
  ------------------
  |  Branch (2004:7): [True: 75, False: 3.43k]
  ------------------
 2005|     75|      case HTTPREQ_POST_FORM:
  ------------------
  |  Branch (2005:7): [True: 0, False: 3.50k]
  ------------------
 2006|    661|      case HTTPREQ_POST_MIME:
  ------------------
  |  Branch (2006:7): [True: 586, False: 2.92k]
  ------------------
 2007|    661|        request = "POST";
 2008|    661|        break;
 2009|     12|      case HTTPREQ_PUT:
  ------------------
  |  Branch (2009:7): [True: 12, False: 3.49k]
  ------------------
 2010|     12|        request = "PUT";
 2011|     12|        break;
 2012|      0|      default: /* this should never happen */
  ------------------
  |  Branch (2012:7): [True: 0, False: 3.50k]
  ------------------
 2013|  2.83k|      case HTTPREQ_GET:
  ------------------
  |  Branch (2013:7): [True: 2.83k, False: 673]
  ------------------
 2014|  2.83k|        request = "GET";
 2015|  2.83k|        break;
 2016|      0|      case HTTPREQ_HEAD:
  ------------------
  |  Branch (2016:7): [True: 0, False: 3.50k]
  ------------------
 2017|      0|        request = "HEAD";
 2018|      0|        break;
 2019|  3.50k|      }
 2020|  3.50k|    }
 2021|  3.54k|  }
 2022|  3.61k|  *method = request;
 2023|  3.61k|  *reqp = httpreq;
 2024|  3.61k|}
Curl_http:
 3066|  3.61k|{
 3067|  3.61k|  CURLcode result = CURLE_OK;
 3068|  3.61k|  Curl_HttpReq httpreq;
 3069|  3.61k|  const char *method;
 3070|  3.61k|  struct dynbuf req;
 3071|  3.61k|  unsigned char httpversion;
 3072|  3.61k|  size_t hd_id;
 3073|       |
 3074|       |  /* Always consider the DO phase done after this function call, even if there
 3075|       |     may be parts of the request that are not yet sent, since we can deal with
 3076|       |     the rest of the request in the PERFORM phase. */
 3077|  3.61k|  *done = TRUE;
  ------------------
  |  | 1045|  3.61k|#define TRUE true
  ------------------
 3078|       |  /* initialize a dynamic send-buffer */
 3079|  3.61k|  curlx_dyn_init(&req, DYN_HTTP_REQUEST);
  ------------------
  |  |   69|  3.61k|#define DYN_HTTP_REQUEST    (1024 * 1024)
  ------------------
 3080|       |  /* make sure the header buffer is reset - if there are leftovers from a
 3081|       |     previous transfer */
 3082|  3.61k|  curlx_dyn_reset(&data->state.headerb);
 3083|  3.61k|  data->state.maybe_folded = FALSE;
  ------------------
  |  | 1048|  3.61k|#define FALSE false
  ------------------
 3084|       |
 3085|  3.61k|  if(!data->conn->bits.reuse) {
  ------------------
  |  Branch (3085:6): [True: 3.61k, False: 0]
  ------------------
 3086|  3.61k|    result = http_check_new_conn(data);
 3087|  3.61k|    if(result)
  ------------------
  |  Branch (3087:8): [True: 0, False: 3.61k]
  ------------------
 3088|      0|      goto out;
 3089|  3.61k|  }
 3090|       |
 3091|       |  /* Add collecting of headers written to client. For a new connection,
 3092|       |   * we might have done that already, but reuse
 3093|       |   * or multiplex needs it here as well. */
 3094|  3.61k|  result = Curl_headers_init(data);
 3095|  3.61k|  if(result)
  ------------------
  |  Branch (3095:6): [True: 0, False: 3.61k]
  ------------------
 3096|      0|    goto out;
 3097|       |
 3098|  3.61k|  data->state.http_hd_te = FALSE;
  ------------------
  |  | 1048|  3.61k|#define FALSE false
  ------------------
 3099|  3.61k|  data->state.http_hd_upgrade = FALSE;
  ------------------
  |  | 1048|  3.61k|#define FALSE false
  ------------------
 3100|  3.61k|  data->state.http_hd_h2_settings = FALSE;
  ------------------
  |  | 1048|  3.61k|#define FALSE false
  ------------------
 3101|       |
 3102|       |  /* what kind of request do we need to send? */
 3103|  3.61k|  Curl_http_method(data, &method, &httpreq);
 3104|       |
 3105|       |  /* select host to send */
 3106|  3.61k|  result = http_set_aptr_host(data);
 3107|       |  /* setup the authentication headers, how that method and host are known */
 3108|  3.61k|  if(!result)
  ------------------
  |  Branch (3108:6): [True: 3.61k, False: 0]
  ------------------
 3109|  3.61k|    result = Curl_http_output_auth(data, data->conn, method, httpreq,
 3110|  3.61k|                                   data->state.up.path,
 3111|  3.61k|                                   data->state.up.query, FALSE);
  ------------------
  |  | 1048|  3.61k|#define FALSE false
  ------------------
 3112|       |  /* Setup input reader, resume information and ranges */
 3113|  3.61k|  if(!result)
  ------------------
  |  Branch (3113:6): [True: 3.59k, False: 13]
  ------------------
 3114|  3.59k|    result = set_reader(data, httpreq);
 3115|  3.61k|  if(!result)
  ------------------
  |  Branch (3115:6): [True: 3.59k, False: 13]
  ------------------
 3116|  3.59k|    result = http_resume(data, httpreq);
 3117|  3.61k|  if(!result)
  ------------------
  |  Branch (3117:6): [True: 3.59k, False: 13]
  ------------------
 3118|  3.59k|    result = http_range(data, httpreq);
 3119|  3.61k|  if(result)
  ------------------
  |  Branch (3119:6): [True: 13, False: 3.59k]
  ------------------
 3120|     13|    goto out;
 3121|       |
 3122|  3.59k|  httpversion = http_request_version(data);
 3123|       |  /* Add request line and all headers to `req` */
 3124|  75.5k|  for(hd_id = 0; hd_id <= H1_HD_LAST; ++hd_id) {
  ------------------
  |  Branch (3124:18): [True: 71.9k, False: 3.59k]
  ------------------
 3125|  71.9k|    result = http_add_hd(data, &req, (http_hd_t)hd_id,
 3126|  71.9k|                         httpversion, method, httpreq);
 3127|  71.9k|    if(result)
  ------------------
  |  Branch (3127:8): [True: 2, False: 71.9k]
  ------------------
 3128|      2|      goto out;
 3129|  71.9k|  }
 3130|       |
 3131|       |  /* setup variables for the upcoming transfer and send */
 3132|  3.59k|  Curl_xfer_setup_sendrecv(data, FIRSTSOCKET, -1);
  ------------------
  |  |  234|  3.59k|#define FIRSTSOCKET     0
  ------------------
 3133|  3.59k|  result = Curl_req_send(data, &req, httpversion);
 3134|       |
 3135|  3.59k|  if((httpversion >= 20) && data->req.upload_chunky)
  ------------------
  |  Branch (3135:6): [True: 2, False: 3.59k]
  |  Branch (3135:29): [True: 0, False: 2]
  ------------------
 3136|       |    /* upload_chunky was set above to set up the request in a chunky fashion,
 3137|       |       but is disabled here again to avoid that the chunked encoded version is
 3138|       |       actually used when sending the request body over h2 */
 3139|      0|    data->req.upload_chunky = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 3140|       |
 3141|  3.61k|out:
 3142|  3.61k|  if(result == CURLE_TOO_LARGE)
  ------------------
  |  Branch (3142:6): [True: 0, False: 3.61k]
  ------------------
 3143|      0|    failf(data, "HTTP request too large");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3144|       |
 3145|  3.61k|  curlx_dyn_free(&req);
 3146|  3.61k|  return result;
 3147|  3.59k|}
Curl_verify_header:
 3859|    143|{
 3860|    143|  struct SingleRequest *k = &data->req;
 3861|    143|  const char *ptr = memchr(hd, 0x00, hdlen);
 3862|    143|  if(ptr) {
  ------------------
  |  Branch (3862:6): [True: 2, False: 141]
  ------------------
 3863|       |    /* this is bad, bail out */
 3864|      2|    failf(data, "Nul byte in header");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
 3865|      2|    return CURLE_WEIRD_SERVER_REPLY;
 3866|      2|  }
 3867|    141|  if(hdlen > 2) {
  ------------------
  |  Branch (3867:6): [True: 141, False: 0]
  ------------------
 3868|    141|    ptr = memchr(hd, '\r', hdlen - 2);
 3869|    141|    if(ptr) {
  ------------------
  |  Branch (3869:8): [True: 1, False: 140]
  ------------------
 3870|       |      /* CR may only precede the LF, nothing else */
 3871|      1|      failf(data, "Carriage return found in header");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 3872|      1|      return CURLE_WEIRD_SERVER_REPLY;
 3873|      1|    }
 3874|    141|  }
 3875|    140|  if(k->headerline < 2)
  ------------------
  |  Branch (3875:6): [True: 48, False: 92]
  ------------------
 3876|       |    /* the first "header" is the status-line and it has no colon */
 3877|     48|    return CURLE_OK;
 3878|     92|  if(((hd[0] == ' ') || (hd[0] == '\t')) && k->headerline > 2)
  ------------------
  |  Branch (3878:7): [True: 0, False: 92]
  |  Branch (3878:25): [True: 0, False: 92]
  |  Branch (3878:45): [True: 0, False: 0]
  ------------------
 3879|       |    /* line folding, cannot happen on line 2 */
 3880|      0|    ;
 3881|     92|  else {
 3882|     92|    ptr = memchr(hd, ':', hdlen);
 3883|     92|    if(!ptr) {
  ------------------
  |  Branch (3883:8): [True: 0, False: 92]
  ------------------
 3884|       |      /* this is bad, bail out */
 3885|      0|      failf(data, "Header without colon");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3886|      0|      return CURLE_WEIRD_SERVER_REPLY;
 3887|      0|    }
 3888|     92|  }
 3889|     92|  return CURLE_OK;
 3890|     92|}
Curl_bump_headersize:
 3895|    187|{
 3896|    187|  size_t bad = 0;
 3897|    187|  unsigned int max = MAX_HTTP_RESP_HEADER_SIZE;
  ------------------
  |  |  157|    187|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
 3898|    187|  if(delta < MAX_HTTP_RESP_HEADER_SIZE) {
  ------------------
  |  |  157|    187|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
  |  Branch (3898:6): [True: 187, False: 0]
  ------------------
 3899|    187|    data->info.header_size += (unsigned int)delta;
 3900|    187|    data->req.allheadercount += (unsigned int)delta;
 3901|    187|    if(!connect_only)
  ------------------
  |  Branch (3901:8): [True: 187, False: 0]
  ------------------
 3902|    187|      data->req.headerbytecount += (unsigned int)delta;
 3903|    187|    if(data->req.allheadercount > max)
  ------------------
  |  Branch (3903:8): [True: 0, False: 187]
  ------------------
 3904|      0|      bad = data->req.allheadercount;
 3905|    187|    else if(data->info.header_size > (max * 20)) {
  ------------------
  |  Branch (3905:13): [True: 0, False: 187]
  ------------------
 3906|      0|      bad = data->info.header_size;
 3907|      0|      max *= 20;
 3908|      0|    }
 3909|    187|  }
 3910|      0|  else
 3911|      0|    bad = data->req.allheadercount + delta;
 3912|    187|  if(bad) {
  ------------------
  |  Branch (3912:6): [True: 0, False: 187]
  ------------------
 3913|      0|    failf(data, "Too large response headers: %zu > %u", bad, max);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3914|      0|    return CURLE_RECV_ERROR;
 3915|      0|  }
 3916|    187|  return CURLE_OK;
 3917|    187|}
Curl_http_write_resp_hd:
 4628|      1|{
 4629|      1|  CURLcode result;
 4630|      1|  size_t consumed;
 4631|      1|  char tmp = 0;
 4632|      1|  DEBUGASSERT(!hd[hdlen]); /* null-terminated */
  ------------------
  |  | 1075|      1|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4632:3): [True: 0, False: 1]
  |  Branch (4632:3): [True: 1, False: 0]
  ------------------
 4633|       |
 4634|      1|  result = http_rw_hd(data, hd, hdlen, &tmp, 0, &consumed);
 4635|      1|  if(!result && is_eos) {
  ------------------
  |  Branch (4635:6): [True: 1, False: 0]
  |  Branch (4635:17): [True: 0, False: 1]
  ------------------
 4636|      0|    result = Curl_client_write(data, (CLIENTWRITE_BODY | CLIENTWRITE_EOS),
  ------------------
  |  |   43|      0|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
                  result = Curl_client_write(data, (CLIENTWRITE_BODY | CLIENTWRITE_EOS),
  ------------------
  |  |   50|      0|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
 4637|      0|                               &tmp, 0);
 4638|      0|  }
 4639|      1|  return result;
 4640|      1|}
Curl_http_write_resp_hds:
 4649|  3.59k|{
 4650|  3.59k|  if(!data->req.header) {
  ------------------
  |  Branch (4650:6): [True: 16, False: 3.58k]
  ------------------
 4651|     16|    *pconsumed = 0;
 4652|     16|    return CURLE_OK;
 4653|     16|  }
 4654|  3.58k|  else {
 4655|  3.58k|    CURLcode result;
 4656|       |
 4657|  3.58k|    result = http_parse_headers(data, buf, blen, pconsumed);
 4658|  3.58k|    if(!result && !data->req.header) {
  ------------------
  |  Branch (4658:8): [True: 3.01k, False: 569]
  |  Branch (4658:19): [True: 46, False: 2.96k]
  ------------------
 4659|     46|      if(!data->req.no_body && curlx_dyn_len(&data->state.headerb)) {
  ------------------
  |  Branch (4659:10): [True: 45, False: 1]
  |  Branch (4659:32): [True: 9, False: 36]
  ------------------
 4660|       |        /* leftover from parsing something that turned out not
 4661|       |         * to be a header, only happens if we allow for
 4662|       |         * HTTP/0.9 like responses */
 4663|      9|        result = Curl_client_write(data, CLIENTWRITE_BODY,
  ------------------
  |  |   43|      9|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
 4664|      9|                                   curlx_dyn_ptr(&data->state.headerb),
 4665|      9|                                   curlx_dyn_len(&data->state.headerb));
 4666|      9|      }
 4667|     46|      curlx_dyn_free(&data->state.headerb);
 4668|     46|    }
 4669|  3.58k|    return result;
 4670|  3.58k|  }
 4671|  3.59k|}
Curl_http_write_resp:
 4676|  3.59k|{
 4677|  3.59k|  CURLcode result;
 4678|  3.59k|  size_t consumed;
 4679|  3.59k|  int flags;
 4680|       |
 4681|  3.59k|  result = Curl_http_write_resp_hds(data, buf, blen, &consumed);
 4682|  3.59k|  if(result || data->req.done)
  ------------------
  |  Branch (4682:6): [True: 569, False: 3.03k]
  |  Branch (4682:16): [True: 1, False: 3.02k]
  ------------------
 4683|    570|    goto out;
 4684|       |
 4685|  3.02k|  DEBUGASSERT(consumed <= blen);
  ------------------
  |  | 1075|  3.02k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4685:3): [True: 0, False: 3.02k]
  |  Branch (4685:3): [True: 3.02k, False: 0]
  ------------------
 4686|  3.02k|  blen -= consumed;
 4687|  3.02k|  buf += consumed;
 4688|       |  /* either all was consumed in header parsing, or we have data left
 4689|       |   * and are done with headers, e.g. it is BODY data */
 4690|  3.02k|  DEBUGASSERT(!blen || !data->req.header);
  ------------------
  |  | 1075|  3.02k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4690:3): [True: 3.02k, False: 0]
  |  Branch (4690:3): [True: 0, False: 0]
  |  Branch (4690:3): [True: 3.00k, False: 29]
  |  Branch (4690:3): [True: 29, False: 0]
  ------------------
 4691|  3.02k|  if(!data->req.header && (blen || is_eos)) {
  ------------------
  |  Branch (4691:6): [True: 61, False: 2.96k]
  |  Branch (4691:28): [True: 29, False: 32]
  |  Branch (4691:36): [True: 10, False: 22]
  ------------------
 4692|       |    /* BODY data after header been parsed, write and consume */
 4693|     39|    flags = CLIENTWRITE_BODY;
  ------------------
  |  |   43|     39|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
 4694|     39|    if(is_eos)
  ------------------
  |  Branch (4694:8): [True: 10, False: 29]
  ------------------
 4695|     10|      flags |= CLIENTWRITE_EOS;
  ------------------
  |  |   50|     10|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
 4696|     39|    result = Curl_client_write(data, flags, buf, blen);
 4697|     39|  }
 4698|  3.59k|out:
 4699|  3.59k|  return result;
 4700|  3.02k|}
Curl_http_decode_status:
 4704|      1|{
 4705|      1|  CURLcode result = CURLE_BAD_FUNCTION_ARGUMENT;
 4706|      1|  int status = 0;
 4707|      1|  int i;
 4708|       |
 4709|      1|  if(len != 3)
  ------------------
  |  Branch (4709:6): [True: 0, False: 1]
  ------------------
 4710|      0|    goto out;
 4711|       |
 4712|      4|  for(i = 0; i < 3; ++i) {
  ------------------
  |  Branch (4712:14): [True: 3, False: 1]
  ------------------
 4713|      3|    char c = s[i];
 4714|       |
 4715|      3|    if(c < '0' || c > '9')
  ------------------
  |  Branch (4715:8): [True: 0, False: 3]
  |  Branch (4715:19): [True: 0, False: 3]
  ------------------
 4716|      0|      goto out;
 4717|       |
 4718|      3|    status *= 10;
 4719|      3|    status += c - '0';
 4720|      3|  }
 4721|      1|  result = CURLE_OK;
 4722|      1|out:
 4723|      1|  *pstatus = result ? -1 : status;
  ------------------
  |  Branch (4723:14): [True: 0, False: 1]
  ------------------
 4724|      1|  return result;
 4725|      1|}
Curl_http_req_make:
 4732|      2|{
 4733|      2|  struct httpreq *req;
 4734|      2|  CURLcode result = CURLE_OUT_OF_MEMORY;
 4735|       |
 4736|      2|  DEBUGASSERT(method && m_len);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4736:3): [True: 0, False: 2]
  |  Branch (4736:3): [True: 0, False: 0]
  |  Branch (4736:3): [True: 2, False: 0]
  |  Branch (4736:3): [True: 2, False: 0]
  ------------------
 4737|       |
 4738|      2|  req = curlx_calloc(1, sizeof(*req) + m_len);
  ------------------
  |  | 1473|      2|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 4739|      2|  if(!req)
  ------------------
  |  Branch (4739:6): [True: 0, False: 2]
  ------------------
 4740|      0|    goto out;
 4741|       |#if defined(__GNUC__) && __GNUC__ >= 13
 4742|       |#pragma GCC diagnostic push
 4743|       |/* error: 'memcpy' offset [137, 142] from the object at 'req' is out of
 4744|       |   the bounds of referenced subobject 'method' with type 'char[1]' at
 4745|       |   offset 136 */
 4746|       |#pragma GCC diagnostic ignored "-Warray-bounds"
 4747|       |#endif
 4748|      2|  memcpy(req->method, method, m_len);
 4749|       |#if defined(__GNUC__) && __GNUC__ >= 13
 4750|       |#pragma GCC diagnostic pop
 4751|       |#endif
 4752|      2|  if(scheme) {
  ------------------
  |  Branch (4752:6): [True: 0, False: 2]
  ------------------
 4753|      0|    req->scheme = curlx_memdup0(scheme, s_len);
 4754|      0|    if(!req->scheme)
  ------------------
  |  Branch (4754:8): [True: 0, False: 0]
  ------------------
 4755|      0|      goto out;
 4756|      0|  }
 4757|      2|  if(authority) {
  ------------------
  |  Branch (4757:6): [True: 0, False: 2]
  ------------------
 4758|      0|    req->authority = curlx_memdup0(authority, a_len);
 4759|      0|    if(!req->authority)
  ------------------
  |  Branch (4759:8): [True: 0, False: 0]
  ------------------
 4760|      0|      goto out;
 4761|      0|  }
 4762|      2|  if(path) {
  ------------------
  |  Branch (4762:6): [True: 2, False: 0]
  ------------------
 4763|      2|    req->path = curlx_memdup0(path, p_len);
 4764|      2|    if(!req->path)
  ------------------
  |  Branch (4764:8): [True: 0, False: 2]
  ------------------
 4765|      0|      goto out;
 4766|      2|  }
 4767|      2|  Curl_dynhds_init(&req->headers, 0, DYN_HTTP_REQUEST);
  ------------------
  |  |   69|      2|#define DYN_HTTP_REQUEST    (1024 * 1024)
  ------------------
 4768|      2|  Curl_dynhds_init(&req->trailers, 0, DYN_HTTP_REQUEST);
  ------------------
  |  |   69|      2|#define DYN_HTTP_REQUEST    (1024 * 1024)
  ------------------
 4769|      2|  result = CURLE_OK;
 4770|       |
 4771|      2|out:
 4772|      2|  if(result && req)
  ------------------
  |  Branch (4772:6): [True: 0, False: 2]
  |  Branch (4772:16): [True: 0, False: 0]
  ------------------
 4773|      0|    Curl_http_req_free(req);
 4774|      2|  *preq = result ? NULL : req;
  ------------------
  |  Branch (4774:11): [True: 0, False: 2]
  ------------------
 4775|      2|  return result;
 4776|      2|}
Curl_http_req_free:
 4900|      4|{
 4901|      4|  if(req) {
  ------------------
  |  Branch (4901:6): [True: 2, False: 2]
  ------------------
 4902|      2|    curlx_free(req->scheme);
  ------------------
  |  | 1476|      2|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4903|      2|    curlx_free(req->authority);
  ------------------
  |  | 1476|      2|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4904|      2|    curlx_free(req->path);
  ------------------
  |  | 1476|      2|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4905|      2|    Curl_dynhds_free(&req->headers);
 4906|      2|    Curl_dynhds_free(&req->trailers);
 4907|      2|    curlx_free(req);
  ------------------
  |  | 1476|      2|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4908|      2|  }
 4909|      4|}
Curl_http_req_to_h2:
 4967|      2|{
 4968|      2|  const char *scheme = NULL, *authority = NULL;
 4969|      2|  struct dynhds_entry *e;
 4970|      2|  size_t i;
 4971|      2|  CURLcode result;
 4972|       |
 4973|      2|  DEBUGASSERT(req);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4973:3): [True: 0, False: 2]
  |  Branch (4973:3): [True: 2, False: 0]
  ------------------
 4974|      2|  DEBUGASSERT(h2_headers);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4974:3): [True: 0, False: 2]
  |  Branch (4974:3): [True: 2, False: 0]
  ------------------
 4975|       |
 4976|      2|  if(req->scheme) {
  ------------------
  |  Branch (4976:6): [True: 0, False: 2]
  ------------------
 4977|      0|    scheme = req->scheme;
 4978|      0|  }
 4979|      2|  else if(strcmp("CONNECT", req->method)) {
  ------------------
  |  Branch (4979:11): [True: 2, False: 0]
  ------------------
 4980|      2|    scheme = Curl_checkheaders(data, STRCONST(HTTP_PSEUDO_SCHEME));
  ------------------
  |  | 1297|      2|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      2|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 4981|      2|    if(scheme) {
  ------------------
  |  Branch (4981:8): [True: 0, False: 2]
  ------------------
 4982|      0|      scheme += sizeof(HTTP_PSEUDO_SCHEME);
  ------------------
  |  |  230|      0|#define HTTP_PSEUDO_SCHEME    ":scheme"
  ------------------
 4983|      0|      curlx_str_passblanks(&scheme);
 4984|      0|      infof(data, "set pseudo header %s to %s", HTTP_PSEUDO_SCHEME, scheme);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4985|      0|    }
 4986|      2|    else {
 4987|      2|      scheme = data->state.origin->scheme->name;
 4988|      2|    }
 4989|      2|  }
 4990|       |
 4991|      2|  if(req->authority) {
  ------------------
  |  Branch (4991:6): [True: 0, False: 2]
  ------------------
 4992|      0|    authority = req->authority;
 4993|      0|  }
 4994|      2|  else {
 4995|      2|    e = Curl_dynhds_get(&req->headers, STRCONST("Host"));
  ------------------
  |  | 1297|      2|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      2|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 4996|      2|    if(e)
  ------------------
  |  Branch (4996:8): [True: 2, False: 0]
  ------------------
 4997|      2|      authority = e->value;
 4998|      2|  }
 4999|       |
 5000|      2|  Curl_dynhds_reset(h2_headers);
 5001|      2|  Curl_dynhds_set_opts(h2_headers, DYNHDS_OPT_LOWERCASE);
  ------------------
  |  |   54|      2|#define DYNHDS_OPT_LOWERCASE     (1 << 0)
  ------------------
 5002|      2|  result = Curl_dynhds_add(h2_headers, STRCONST(HTTP_PSEUDO_METHOD),
  ------------------
  |  | 1297|      2|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      2|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 5003|      2|                           req->method, strlen(req->method));
 5004|      2|  if(!result && scheme) {
  ------------------
  |  Branch (5004:6): [True: 2, False: 0]
  |  Branch (5004:17): [True: 2, False: 0]
  ------------------
 5005|      2|    result = Curl_dynhds_add(h2_headers, STRCONST(HTTP_PSEUDO_SCHEME),
  ------------------
  |  | 1297|      2|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      2|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 5006|      2|                             scheme, strlen(scheme));
 5007|      2|  }
 5008|      2|  if(!result && authority) {
  ------------------
  |  Branch (5008:6): [True: 2, False: 0]
  |  Branch (5008:17): [True: 2, False: 0]
  ------------------
 5009|      2|    result = Curl_dynhds_add(h2_headers, STRCONST(HTTP_PSEUDO_AUTHORITY),
  ------------------
  |  | 1297|      2|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      2|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 5010|      2|                             authority, strlen(authority));
 5011|      2|  }
 5012|      2|  if(!result && req->path) {
  ------------------
  |  Branch (5012:6): [True: 2, False: 0]
  |  Branch (5012:17): [True: 2, False: 0]
  ------------------
 5013|      2|    result = Curl_dynhds_add(h2_headers, STRCONST(HTTP_PSEUDO_PATH),
  ------------------
  |  | 1297|      2|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      2|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 5014|      2|                             req->path, strlen(req->path));
 5015|      2|  }
 5016|      6|  for(i = 0; !result && i < Curl_dynhds_count(&req->headers); ++i) {
  ------------------
  |  Branch (5016:14): [True: 6, False: 0]
  |  Branch (5016:25): [True: 4, False: 2]
  ------------------
 5017|      4|    e = Curl_dynhds_getn(&req->headers, i);
 5018|       |    /* "TE" is special in that it is only permissible when it
 5019|       |     * has only value "trailers". RFC 9113 ch. 8.2.2 */
 5020|      4|    if(e->namelen == 2 && curl_strequal("TE", e->name)) {
  ------------------
  |  Branch (5020:8): [True: 0, False: 4]
  |  Branch (5020:27): [True: 0, False: 0]
  ------------------
 5021|      0|      if(http_TE_has_token(e->value, "trailers"))
  ------------------
  |  Branch (5021:10): [True: 0, False: 0]
  ------------------
 5022|      0|        result = Curl_dynhds_add(h2_headers, e->name, e->namelen,
 5023|      0|                                 "trailers", CURL_CSTRLEN("trailers"));
  ------------------
  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  ------------------
 5024|      0|    }
 5025|      4|    else if(h2_permissible_field(e)) {
  ------------------
  |  Branch (5025:13): [True: 2, False: 2]
  ------------------
 5026|      2|      result = Curl_dynhds_add(h2_headers, e->name, e->namelen,
 5027|      2|                               e->value, e->valuelen);
 5028|      2|    }
 5029|      4|  }
 5030|       |
 5031|      2|  return result;
 5032|      2|}
http.c:pickoneauth:
  351|      1|{
  352|      1|  bool have_user_pass = Curl_creds_has_user_or_pass(creds);
  ------------------
  |  |   78|      1|    ((c) && ((c)->user[0] || (c)->passwd[0]))
  |  |  ------------------
  |  |  |  Branch (78:6): [True: 1, False: 0]
  |  |  |  Branch (78:14): [True: 1, False: 0]
  |  |  |  Branch (78:30): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  353|      1|  bool picked;
  354|       |  /* only deal with authentication we want */
  355|      1|  unsigned long avail = pick->avail & pick->want & mask;
  356|      1|  picked = TRUE;
  ------------------
  |  | 1045|      1|#define TRUE true
  ------------------
  357|       |
  358|       |  /* The order of these checks is highly relevant, as this will be the order
  359|       |     of preference in case of the existence of multiple accepted types. */
  360|      1|  if(avail & CURLAUTH_NEGOTIATE)  /* available on empty creds */
  ------------------
  |  |  835|      1|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  ------------------
  |  Branch (360:6): [True: 0, False: 1]
  ------------------
  361|      0|    pick->picked = CURLAUTH_NEGOTIATE;
  ------------------
  |  |  835|      0|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  ------------------
  362|      1|#ifndef CURL_DISABLE_BEARER_AUTH
  363|      1|  else if((avail & CURLAUTH_BEARER) && Curl_creds_has_oauth_bearer(creds))
  ------------------
  |  |  846|      1|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
                else if((avail & CURLAUTH_BEARER) && Curl_creds_has_oauth_bearer(creds))
  ------------------
  |  |   79|      0|#define Curl_creds_has_oauth_bearer(c)   ((c) && (c)->oauth_bearer[0])
  |  |  ------------------
  |  |  |  Branch (79:43): [True: 0, False: 0]
  |  |  |  Branch (79:50): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (363:11): [True: 0, False: 1]
  ------------------
  364|      0|    pick->picked = CURLAUTH_BEARER;
  ------------------
  |  |  846|      0|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  365|      1|#endif
  366|      1|#ifndef CURL_DISABLE_DIGEST_AUTH
  367|      1|  else if((avail & CURLAUTH_DIGEST) && have_user_pass)
  ------------------
  |  |  834|      1|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  |  Branch (367:11): [True: 0, False: 1]
  |  Branch (367:40): [True: 0, False: 0]
  ------------------
  368|      0|    pick->picked = CURLAUTH_DIGEST;
  ------------------
  |  |  834|      0|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  369|      1|#endif
  370|      1|  else if(avail & CURLAUTH_NTLM)
  ------------------
  |  |  840|      1|#define CURLAUTH_NTLM         (((unsigned long)1) << 3)
  ------------------
  |  Branch (370:11): [True: 0, False: 1]
  ------------------
  371|      0|    pick->picked = CURLAUTH_NTLM;
  ------------------
  |  |  840|      0|#define CURLAUTH_NTLM         (((unsigned long)1) << 3)
  ------------------
  372|      1|#ifndef CURL_DISABLE_BASIC_AUTH
  373|      1|  else if((avail & CURLAUTH_BASIC) && have_user_pass)
  ------------------
  |  |  833|      1|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  |  Branch (373:11): [True: 0, False: 1]
  |  Branch (373:39): [True: 0, False: 0]
  ------------------
  374|      0|    pick->picked = CURLAUTH_BASIC;
  ------------------
  |  |  833|      0|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  375|      1|#endif
  376|      1|#ifndef CURL_DISABLE_AWS
  377|      1|  else if(avail & CURLAUTH_AWS_SIGV4)
  ------------------
  |  |  847|      1|#define CURLAUTH_AWS_SIGV4    (((unsigned long)1) << 7)
  ------------------
  |  Branch (377:11): [True: 0, False: 1]
  ------------------
  378|      0|    pick->picked = CURLAUTH_AWS_SIGV4;
  ------------------
  |  |  847|      0|#define CURLAUTH_AWS_SIGV4    (((unsigned long)1) << 7)
  ------------------
  379|      1|#endif
  380|       |#ifndef CURL_DISABLE_HTTPSIG
  381|       |  else if(avail & CURLAUTH_HTTPSIG)
  382|       |    pick->picked = CURLAUTH_HTTPSIG;
  383|       |#endif
  384|      1|  else {
  385|      1|    pick->picked = CURLAUTH_PICKNONE; /* we select to use nothing */
  ------------------
  |  |  128|      1|#define CURLAUTH_PICKNONE (1 << 30) /* do not use auth */
  ------------------
  386|      1|    picked = FALSE;
  ------------------
  |  | 1048|      1|#define FALSE false
  ------------------
  387|      1|  }
  388|      1|  pick->avail = CURLAUTH_NONE; /* clear it here */
  ------------------
  |  |  832|      1|#define CURLAUTH_NONE         ((unsigned long)0)
  ------------------
  389|       |
  390|      1|  return picked;
  391|      1|}
http.c:http_perhapsrewind:
  403|      1|{
  404|      1|  curl_off_t bytessent = data->req.writebytecount;
  405|      1|  curl_off_t expectsend = Curl_creader_total_length(data);
  406|      1|  curl_off_t upload_remain = (expectsend >= 0) ? (expectsend - bytessent) : -1;
  ------------------
  |  Branch (406:30): [True: 1, False: 0]
  ------------------
  407|      1|  bool little_upload_remains = (upload_remain >= 0 && upload_remain < 2000);
  ------------------
  |  Branch (407:33): [True: 1, False: 0]
  |  Branch (407:55): [True: 1, False: 0]
  ------------------
  408|      1|  bool needs_rewind = Curl_creader_needs_rewind(data);
  409|       |  /* By default, we would like to abort the transfer when little or unknown
  410|       |   * amount remains. This may be overridden by authentications further
  411|       |   * below! */
  412|      1|  bool abort_upload = (!data->req.upload_done && !little_upload_remains);
  ------------------
  |  Branch (412:24): [True: 0, False: 1]
  |  Branch (412:50): [True: 0, False: 0]
  ------------------
  413|      1|  VERBOSE(const char *ongoing_auth = NULL);
  ------------------
  |  | 1611|      1|#define VERBOSE(x) x
  ------------------
  414|       |
  415|       |  /* We need a rewind before uploading client read data again. The
  416|       |   * checks below influence of the upload is to be continued
  417|       |   * or aborted early.
  418|       |   * This depends on how much remains to be sent and in what state
  419|       |   * the authentication is. Some auth schemes such as NTLM do not work
  420|       |   * for a new connection. */
  421|      1|  if(needs_rewind) {
  ------------------
  |  Branch (421:6): [True: 1, False: 0]
  ------------------
  422|      1|    infof(data, "Need to rewind upload for next request");
  ------------------
  |  |  143|      1|  do {                               \
  |  |  144|      1|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      1|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 1, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  323|      1|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      1|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  423|      1|    Curl_creader_set_rewind(data, TRUE);
  ------------------
  |  | 1045|      1|#define TRUE true
  ------------------
  424|      1|  }
  425|       |
  426|      1|  if(conn->bits.close)
  ------------------
  |  Branch (426:6): [True: 0, False: 1]
  ------------------
  427|       |    /* If we already decided to close this connection, we cannot veto. */
  428|      0|    return CURLE_OK;
  429|       |
  430|      1|  if(abort_upload) {
  ------------------
  |  Branch (430:6): [True: 0, False: 1]
  ------------------
  431|       |    /* We would like to abort the upload - but should we? */
  432|       |#ifdef USE_NTLM
  433|       |    if((data->state.authproxy.picked == CURLAUTH_NTLM) ||
  434|       |       (data->state.authhost.picked == CURLAUTH_NTLM)) {
  435|       |      VERBOSE(ongoing_auth = "NTLM");
  436|       |      if((conn->http_ntlm_state != NTLMSTATE_NONE) ||
  437|       |         (conn->proxy_ntlm_state != NTLMSTATE_NONE)) {
  438|       |        /* The NTLM-negotiation has started, keep on sending.
  439|       |         * Need to do further work on same connection */
  440|       |        abort_upload = FALSE;
  441|       |      }
  442|       |    }
  443|       |#endif
  444|       |#ifdef USE_SPNEGO
  445|       |    /* There is still data left to send */
  446|       |    if((data->state.authproxy.picked == CURLAUTH_NEGOTIATE) ||
  447|       |       (data->state.authhost.picked == CURLAUTH_NEGOTIATE)) {
  448|       |      VERBOSE(ongoing_auth = "NEGOTIATE");
  449|       |      if((conn->http_negotiate_state != GSS_AUTHNONE) ||
  450|       |         (conn->proxy_negotiate_state != GSS_AUTHNONE)) {
  451|       |        /* The NEGOTIATE-negotiation has started, keep on sending.
  452|       |         * Need to do further work on same connection */
  453|       |        abort_upload = FALSE;
  454|       |      }
  455|       |    }
  456|       |#endif
  457|      0|  }
  458|       |
  459|      1|  if(abort_upload) {
  ------------------
  |  Branch (459:6): [True: 0, False: 1]
  ------------------
  460|      0|    if(upload_remain >= 0)
  ------------------
  |  Branch (460:8): [True: 0, False: 0]
  ------------------
  461|      0|      infof(data, "%s%sclose instead of sending %" FMT_OFF_T " more bytes",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324: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|            ongoing_auth ? ongoing_auth : "",
  463|      0|            ongoing_auth ? " send, " : "",
  464|      0|            upload_remain);
  465|      0|    else
  466|      0|      infof(data, "%s%sclose instead of sending unknown amount "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
  467|      0|            "of more bytes",
  468|      0|            ongoing_auth ? ongoing_auth : "",
  469|      0|            ongoing_auth ? " send, " : "");
  470|       |    /* We decided to abort the ongoing transfer */
  471|      0|    streamclose(conn);
  ------------------
  |  |   89|      0|#define streamclose(x) Curl_conncontrol((x), CONNCTRL_STREAM_CLOSE)
  |  |  ------------------
  |  |  |  |   85|      0|#define CONNCTRL_STREAM_CLOSE    2
  |  |  ------------------
  ------------------
  472|      0|    data->req.size = 0; /* do not download any more than 0 bytes */
  473|       |    data->req.http_bodyless = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  474|      0|  }
  475|      1|  return CURLE_OK;
  476|      1|}
http.c:http_should_fail:
  487|     74|{
  488|     74|  DEBUGASSERT(data);
  ------------------
  |  | 1075|     74|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (488:3): [True: 0, False: 74]
  |  Branch (488:3): [True: 74, False: 0]
  ------------------
  489|     74|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1075|     74|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (489:3): [True: 0, False: 74]
  |  Branch (489:3): [True: 74, False: 0]
  ------------------
  490|       |
  491|       |  /*
  492|       |   * If we have not been asked to fail on error,
  493|       |   * do not fail.
  494|       |   */
  495|     74|  if(!data->set.http_fail_on_error)
  ------------------
  |  Branch (495:6): [True: 74, False: 0]
  ------------------
  496|     74|    return FALSE;
  ------------------
  |  | 1048|     74|#define FALSE false
  ------------------
  497|       |
  498|       |  /*
  499|       |   * Any code < 400 is never terminal.
  500|       |   */
  501|      0|  if(httpcode < 400)
  ------------------
  |  Branch (501:6): [True: 0, False: 0]
  ------------------
  502|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  503|       |
  504|       |  /*
  505|       |   * A 416 response to a resume request is presumably because the file is
  506|       |   * already completely downloaded and thus not actually a fail.
  507|       |   */
  508|      0|  if(data->state.resume_from && data->state.httpreq == HTTPREQ_GET &&
  ------------------
  |  Branch (508:6): [True: 0, False: 0]
  |  Branch (508:33): [True: 0, False: 0]
  ------------------
  509|      0|     httpcode == 416)
  ------------------
  |  Branch (509:6): [True: 0, False: 0]
  ------------------
  510|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  511|       |
  512|       |  /*
  513|       |   * Any code >= 400 that is not 401 or 407 is always
  514|       |   * a terminal error
  515|       |   */
  516|      0|  if((httpcode != 401) && (httpcode != 407))
  ------------------
  |  Branch (516:6): [True: 0, False: 0]
  |  Branch (516:27): [True: 0, False: 0]
  ------------------
  517|      0|    return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  518|       |
  519|       |  /*
  520|       |   * All we have left to deal with is 401 and 407
  521|       |   */
  522|      0|  DEBUGASSERT((httpcode == 401) || (httpcode == 407));
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (522:3): [True: 0, False: 0]
  |  Branch (522:3): [True: 0, False: 0]
  |  Branch (522:3): [True: 0, False: 0]
  |  Branch (522:3): [True: 0, False: 0]
  ------------------
  523|       |
  524|       |  /*
  525|       |   * Examine the current authentication state to see if this is an error. The
  526|       |   * idea is for this function to get called after processing all the headers
  527|       |   * in a response message. If we have been asked to authenticate at
  528|       |   * a particular stage, and we have done it, we are OK. If we are already
  529|       |   * completely authenticated, it is not OK to get another 401 or 407.
  530|       |   *
  531|       |   * It is possible for authentication to go stale such that the client needs
  532|       |   * to reauthenticate. Once that info is available, use it here.
  533|       |   */
  534|       |
  535|       |  /*
  536|       |   * Either we are not authenticating, or we are supposed to be authenticating
  537|       |   * something else. This is an error.
  538|       |   */
  539|      0|  if((httpcode == 401) && !data->state.creds)
  ------------------
  |  Branch (539:6): [True: 0, False: 0]
  |  Branch (539:27): [True: 0, False: 0]
  ------------------
  540|      0|    return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  541|      0|#ifndef CURL_DISABLE_PROXY
  542|      0|  if((httpcode == 407) && !data->conn->http_proxy.creds)
  ------------------
  |  Branch (542:6): [True: 0, False: 0]
  |  Branch (542:27): [True: 0, False: 0]
  ------------------
  543|      0|    return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  544|      0|#endif
  545|       |
  546|      0|  return (bool)data->state.authproblem;
  547|      0|}
http.c:output_auth_headers:
  653|    218|{
  654|    218|  const char *auth = NULL;
  655|    218|  CURLcode result = CURLE_OK;
  656|    218|  (void)conn;
  657|       |
  658|       |#ifdef CURL_DISABLE_DIGEST_AUTH
  659|       |  (void)request;
  660|       |  (void)path;
  661|       |#endif
  662|    218|#ifndef CURL_DISABLE_AWS
  663|    218|  if((authstatus->picked == CURLAUTH_AWS_SIGV4) && !proxy) {
  ------------------
  |  |  847|    218|#define CURLAUTH_AWS_SIGV4    (((unsigned long)1) << 7)
  ------------------
  |  Branch (663:6): [True: 14, False: 204]
  |  Branch (663:52): [True: 14, False: 0]
  ------------------
  664|       |    /* this method is never for proxy */
  665|     14|    auth = "AWS_SIGV4";
  666|     14|    result = Curl_output_aws_sigv4(data);
  667|     14|    if(result)
  ------------------
  |  Branch (667:8): [True: 13, False: 1]
  ------------------
  668|     13|      return result;
  669|     14|  }
  670|    204|  else
  671|    204|#endif
  672|       |#ifndef CURL_DISABLE_HTTPSIG
  673|       |  if((authstatus->picked == CURLAUTH_HTTPSIG) && !proxy) {
  674|       |    /* HTTPSIG uses its own configured key material rather than
  675|       |       data->state.creds. Do not let unrelated credentials from a
  676|       |       redirected URL bypass the cross-host auth boundary. */
  677|       |    if(Curl_auth_allowed_to_host(data)) {
  678|       |      auth = "HTTPSIG";
  679|       |      result = Curl_output_httpsig(data);
  680|       |      if(result)
  681|       |        return result;
  682|       |    }
  683|       |    else
  684|       |      authstatus->done = TRUE;
  685|       |  }
  686|       |  else
  687|       |#endif
  688|       |#ifdef USE_SPNEGO
  689|       |  if(authstatus->picked == CURLAUTH_NEGOTIATE) {
  690|       |    if(
  691|       |#ifndef CURL_DISABLE_PROXY
  692|       |      (proxy && !Curl_checkProxyheaders(data, conn,
  693|       |                                        STRCONST("Proxy-authorization"))) ||
  694|       |#endif
  695|       |      (!proxy && !Curl_checkheaders(data, STRCONST("Authorization")))) {
  696|       |      auth = "Negotiate";
  697|       |      result = Curl_output_negotiate(data, conn, proxy);
  698|       |      if(result)
  699|       |        return result;
  700|       |    }
  701|       |    else
  702|       |      authstatus->done = TRUE;
  703|       |  }
  704|       |  else
  705|       |#endif
  706|       |#ifdef USE_NTLM
  707|       |  if(authstatus->picked == CURLAUTH_NTLM) {
  708|       |    auth = "NTLM";
  709|       |    result = Curl_output_ntlm(data, proxy);
  710|       |    if(result)
  711|       |      return result;
  712|       |  }
  713|       |  else
  714|       |#endif
  715|    204|#ifndef CURL_DISABLE_DIGEST_AUTH
  716|    204|  if(authstatus->picked == CURLAUTH_DIGEST) {
  ------------------
  |  |  834|    204|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  |  Branch (716:6): [True: 1, False: 203]
  ------------------
  717|      1|    auth = "Digest";
  718|      1|    result = Curl_output_digest(data,
  719|      1|                                proxy,
  720|      1|                                (const unsigned char *)request,
  721|      1|                                (const unsigned char *)path);
  722|      1|    if(result)
  ------------------
  |  Branch (722:8): [True: 0, False: 1]
  ------------------
  723|      0|      return result;
  724|      1|  }
  725|    203|  else
  726|    203|#endif
  727|    203|#ifndef CURL_DISABLE_BASIC_AUTH
  728|    203|  if(authstatus->picked == CURLAUTH_BASIC) {
  ------------------
  |  |  833|    203|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  |  Branch (728:6): [True: 192, False: 11]
  ------------------
  729|       |    /* Basic */
  730|    192|    if(
  731|    192|#ifndef CURL_DISABLE_PROXY
  732|    192|       (proxy && conn->http_proxy.creds &&
  ------------------
  |  Branch (732:9): [True: 0, False: 192]
  |  Branch (732:18): [True: 0, False: 0]
  ------------------
  733|      0|        Curl_creds_has_user_or_pass(conn->http_proxy.creds) &&
  ------------------
  |  |   78|    192|    ((c) && ((c)->user[0] || (c)->passwd[0]))
  |  |  ------------------
  |  |  |  Branch (78:6): [True: 0, False: 0]
  |  |  |  Branch (78:14): [True: 0, False: 0]
  |  |  |  Branch (78:30): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  734|      0|        !Curl_checkProxyheaders(data, conn,
  ------------------
  |  Branch (734:9): [True: 0, False: 0]
  ------------------
  735|      0|                                STRCONST("Proxy-authorization"))) ||
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  736|    192|#endif
  737|    192|       (!proxy && data->state.creds &&
  ------------------
  |  Branch (737:9): [True: 192, False: 0]
  |  Branch (737:19): [True: 192, False: 0]
  ------------------
  738|    192|        Curl_creds_has_user_or_pass(data->state.creds) &&
  ------------------
  |  |   78|    384|    ((c) && ((c)->user[0] || (c)->passwd[0]))
  |  |  ------------------
  |  |  |  Branch (78:6): [True: 192, False: 0]
  |  |  |  Branch (78:14): [True: 33, False: 159]
  |  |  |  Branch (78:30): [True: 19, False: 140]
  |  |  ------------------
  ------------------
  739|     52|        !Curl_checkheaders(data, STRCONST("Authorization")))) {
  ------------------
  |  | 1297|     52|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|     52|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (739:9): [True: 52, False: 0]
  ------------------
  740|     52|      auth = "Basic";
  741|     52|      result = http_output_basic(data, conn, proxy);
  742|     52|      if(result)
  ------------------
  |  Branch (742:10): [True: 0, False: 52]
  ------------------
  743|      0|        return result;
  744|     52|    }
  745|       |
  746|       |    /* NOTE: this function should set 'done' TRUE, as the other auth
  747|       |       functions work that way */
  748|    192|    authstatus->done = TRUE;
  ------------------
  |  | 1045|    192|#define TRUE true
  ------------------
  749|    192|  }
  750|    205|#endif
  751|    205|#ifndef CURL_DISABLE_BEARER_AUTH
  752|    205|  if(authstatus->picked == CURLAUTH_BEARER) {
  ------------------
  |  |  846|    205|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  |  Branch (752:6): [True: 0, False: 205]
  ------------------
  753|       |    /* Bearer */
  754|      0|    if(!proxy && Curl_creds_has_oauth_bearer(data->state.creds) &&
  ------------------
  |  |   79|      0|#define Curl_creds_has_oauth_bearer(c)   ((c) && (c)->oauth_bearer[0])
  |  |  ------------------
  |  |  |  Branch (79:43): [True: 0, False: 0]
  |  |  |  Branch (79:50): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (754:8): [True: 0, False: 0]
  ------------------
  755|      0|       !Curl_checkheaders(data, STRCONST("Authorization"))) {
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (755:8): [True: 0, False: 0]
  ------------------
  756|      0|      auth = "Bearer";
  757|      0|      result = http_output_bearer(data);
  758|      0|      if(result)
  ------------------
  |  Branch (758:10): [True: 0, False: 0]
  ------------------
  759|      0|        return result;
  760|      0|    }
  761|       |
  762|       |    /* NOTE: this function should set 'done' TRUE, as the other auth
  763|       |       functions work that way */
  764|      0|    authstatus->done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  765|      0|  }
  766|    205|#endif
  767|       |
  768|    205|  if(auth) {
  ------------------
  |  Branch (768:6): [True: 54, False: 151]
  ------------------
  769|     54|#ifndef CURL_DISABLE_PROXY
  770|     54|    if(proxy)
  ------------------
  |  Branch (770:8): [True: 0, False: 54]
  ------------------
  771|      0|      data->info.proxyauthpicked = authstatus->picked;
  772|     54|    else
  773|     54|      data->info.httpauthpicked = authstatus->picked;
  774|     54|    infof(data, "%s auth using %s with user '%s'",
  ------------------
  |  |  143|     54|  do {                               \
  |  |  144|     54|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|     54|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 54, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 54]
  |  |  |  |  ------------------
  |  |  |  |  323|     54|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     54|      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|     54|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 54]
  |  |  ------------------
  ------------------
  775|     54|          proxy ? "Proxy" : "Server", auth,
  776|     54|          proxy ? (conn->http_proxy.creds ?
  777|     54|                   conn->http_proxy.creds->user : "") :
  778|     54|          (data->state.creds ?
  779|     54|           data->state.creds->user : ""));
  780|       |#else
  781|       |    (void)proxy;
  782|       |    infof(data, "Server auth using %s with user '%s'",
  783|       |          auth, data->state.creds ?
  784|       |          data->state.creds->user : "");
  785|       |#endif
  786|     54|    authstatus->multipass = !authstatus->done;
  787|     54|  }
  788|    151|  else {
  789|    151|    authstatus->multipass = FALSE;
  ------------------
  |  | 1048|    151|#define FALSE false
  ------------------
  790|    151|    if(proxy)
  ------------------
  |  Branch (790:8): [True: 0, False: 151]
  ------------------
  791|      0|      data->info.proxyauthpicked = 0;
  792|    151|    else
  793|    151|      data->info.httpauthpicked = 0;
  794|    151|  }
  795|       |
  796|    205|  return result;
  797|    205|}
http.c:http_output_basic:
  254|     52|{
  255|     52|  size_t size = 0;
  256|     52|  char *authorization = NULL;
  257|     52|  char **p_hd;
  258|     52|  CURLcode result;
  259|     52|  struct Curl_creds *creds = NULL;
  260|     52|  char *out;
  261|       |
  262|       |  /* credentials are unique per transfer for HTTP, do not use the ones for the
  263|       |     connection */
  264|     52|  if(proxy) {
  ------------------
  |  Branch (264:6): [True: 0, False: 52]
  ------------------
  265|      0|#ifndef CURL_DISABLE_PROXY
  266|      0|    p_hd = &data->req.hd_proxy_auth;
  267|      0|    creds = conn->http_proxy.creds;
  268|       |#else
  269|       |    (void)conn;
  270|       |    return CURLE_NOT_BUILT_IN;
  271|       |#endif
  272|      0|  }
  273|     52|  else {
  274|     52|    p_hd = &data->req.hd_auth;
  275|     52|    creds = data->state.creds;
  276|     52|  }
  277|       |
  278|     52|  if(!creds) {
  ------------------
  |  Branch (278:6): [True: 0, False: 52]
  ------------------
  279|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (279:5): [Folded, False: 0]
  |  Branch (279:5): [Folded, False: 0]
  ------------------
  280|      0|    return CURLE_FAILED_INIT;
  281|      0|  }
  282|       |
  283|     52|  out = curl_maprintf("%s:%s", creds->user, creds->passwd);
  284|     52|  if(!out)
  ------------------
  |  Branch (284:6): [True: 0, False: 52]
  ------------------
  285|      0|    return CURLE_OUT_OF_MEMORY;
  286|       |
  287|     52|  result = curlx_base64_encode((uint8_t *)out, strlen(out),
  288|     52|                               &authorization, &size);
  289|     52|  if(result)
  ------------------
  |  Branch (289:6): [True: 0, False: 52]
  ------------------
  290|      0|    goto fail;
  291|       |
  292|     52|  if(!authorization) {
  ------------------
  |  Branch (292:6): [True: 0, False: 52]
  ------------------
  293|      0|    result = CURLE_REMOTE_ACCESS_DENIED;
  294|      0|    goto fail;
  295|      0|  }
  296|       |
  297|     52|  curlx_free(*p_hd);
  ------------------
  |  | 1476|     52|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  298|     52|  *p_hd = curl_maprintf("%sAuthorization: Basic %s\r\n",
  299|     52|                        proxy ? "Proxy-" : "",
  ------------------
  |  Branch (299:25): [True: 0, False: 52]
  ------------------
  300|     52|                        authorization);
  301|     52|  curlx_free(authorization);
  ------------------
  |  | 1476|     52|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  302|     52|  if(!*p_hd) {
  ------------------
  |  Branch (302:6): [True: 0, False: 52]
  ------------------
  303|      0|    result = CURLE_OUT_OF_MEMORY;
  304|      0|    goto fail;
  305|      0|  }
  306|       |
  307|     52|fail:
  308|     52|  curlx_free(out);
  ------------------
  |  | 1476|     52|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  309|     52|  return result;
  310|     52|}
http.c:authcmp:
  923|     60|{
  924|       |  /* the auth string must not have an alnum following */
  925|     60|  size_t n = strlen(auth);
  926|     60|  return curl_strnequal(auth, line, n) && !ISALNUM(line[n]);
  ------------------
  |  |   39|     65|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|     10|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 0, False: 5]
  |  |  |  |  |  Branch (42:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   41|     10|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:22): [True: 0, False: 5]
  |  |  |  |  |  Branch (41:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   40|      5|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (40:22): [True: 0, False: 5]
  |  |  |  |  |  Branch (40:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (926:10): [True: 5, False: 55]
  ------------------
  927|     60|}
http.c:auth_digest:
  998|      5|{
  999|      5|  if(authp->avail & CURLAUTH_DIGEST) {
  ------------------
  |  |  834|      5|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  |  Branch (999:6): [True: 0, False: 5]
  ------------------
 1000|      0|    *availp |= CURLAUTH_DIGEST;
  ------------------
  |  |  834|      0|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
 1001|      0|    infof(data, "Ignoring duplicate digest auth header.");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1002|      0|  }
 1003|      5|  else if(Curl_auth_is_digest_supported()) {
  ------------------
  |  Branch (1003:11): [True: 5, False: 0]
  ------------------
 1004|      5|    CURLcode result;
 1005|       |
 1006|      5|    *availp |= CURLAUTH_DIGEST;
  ------------------
  |  |  834|      5|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
 1007|      5|    authp->avail |= CURLAUTH_DIGEST;
  ------------------
  |  |  834|      5|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
 1008|       |
 1009|       |    /* We call this function on input Digest headers even if Digest
 1010|       |     * authentication is not activated yet, as we need to store the
 1011|       |     * incoming data from this header in case we are going to use
 1012|       |     * Digest */
 1013|      5|    result = Curl_input_digest(data, proxy, auth);
 1014|      5|    if(result) {
  ------------------
  |  Branch (1014:8): [True: 0, False: 5]
  ------------------
 1015|      0|      if(result == CURLE_OUT_OF_MEMORY)
  ------------------
  |  Branch (1015:10): [True: 0, False: 0]
  ------------------
 1016|      0|        return result;
 1017|      0|      infof(data, "Digest authentication problem, ignoring.");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1018|      0|      data->state.authproblem = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1019|      0|    }
 1020|      5|  }
 1021|      5|  return CURLE_OK;
 1022|      5|}
http.c:cr_exp100_read:
 1506|    196|{
 1507|    196|  struct cr_exp100_ctx *ctx = reader->ctx;
 1508|    196|  timediff_t ms;
 1509|       |
 1510|    196|  switch(ctx->state) {
 1511|    196|  case EXP100_SENDING_REQUEST:
  ------------------
  |  Branch (1511:3): [True: 196, False: 0]
  ------------------
 1512|    196|    if(!Curl_req_sendbuf_empty(data)) {
  ------------------
  |  Branch (1512:8): [True: 98, False: 98]
  ------------------
 1513|       |      /* The initial request data has not been fully sent yet. Do
 1514|       |       * not start the timer yet. */
 1515|     98|      DEBUGF(infof(data, "cr_exp100_read, request not full sent yet"));
  ------------------
  |  | 1061|    686|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1061:19): [True: 98, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 98]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [Folded, False: 98]
  |  |  ------------------
  ------------------
 1516|     98|      *nread = 0;
 1517|     98|      *eos = FALSE;
  ------------------
  |  | 1048|     98|#define FALSE false
  ------------------
 1518|     98|      return CURLE_OK;
 1519|     98|    }
 1520|       |    /* We are now waiting for a reply from the server or
 1521|       |     * a timeout on our side IFF the request has been fully sent. */
 1522|     98|    DEBUGF(infof(data, "cr_exp100_read, start AWAITING_CONTINUE, "
  ------------------
  |  | 1061|    686|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1061:19): [True: 98, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 98]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [Folded, False: 98]
  |  |  ------------------
  ------------------
 1523|     98|                 "timeout %dms", data->set.expect_100_timeout));
 1524|     98|    ctx->state = EXP100_AWAITING_CONTINUE;
 1525|     98|    ctx->start = *Curl_pgrs_now(data);
 1526|     98|    Curl_expire(data, data->set.expect_100_timeout, EXPIRE_100_TIMEOUT);
 1527|     98|    *nread = 0;
 1528|     98|    *eos = FALSE;
  ------------------
  |  | 1048|     98|#define FALSE false
  ------------------
 1529|     98|    return CURLE_OK;
 1530|      0|  case EXP100_FAILED:
  ------------------
  |  Branch (1530:3): [True: 0, False: 196]
  ------------------
 1531|      0|    DEBUGF(infof(data, "cr_exp100_read, expectation failed, error"));
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1532|      0|    *nread = 0;
 1533|      0|    *eos = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1534|      0|    return CURLE_READ_ERROR;
 1535|      0|  case EXP100_AWAITING_CONTINUE:
  ------------------
  |  Branch (1535:3): [True: 0, False: 196]
  ------------------
 1536|      0|    ms = curlx_ptimediff_ms(Curl_pgrs_now(data), &ctx->start);
 1537|      0|    if(ms < data->set.expect_100_timeout) {
  ------------------
  |  Branch (1537:8): [True: 0, False: 0]
  ------------------
 1538|      0|      DEBUGF(infof(data, "cr_exp100_read, AWAITING_CONTINUE, not expired"));
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1539|      0|      *nread = 0;
 1540|      0|      *eos = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1541|      0|      return CURLE_OK;
 1542|      0|    }
 1543|       |    /* we have waited long enough, continue anyway */
 1544|      0|    http_exp100_continue(data, reader);
 1545|      0|    infof(data, "Done waiting for 100-continue");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1546|      0|    FALLTHROUGH();
  ------------------
  |  |  815|      0|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1547|      0|  default:
  ------------------
  |  Branch (1547:3): [True: 0, False: 196]
  ------------------
 1548|      0|    DEBUGF(infof(data, "cr_exp100_read, pass through"));
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1549|      0|    return Curl_creader_read(data, reader->next, buf, blen, nread, eos);
 1550|    196|  }
 1551|    196|}
http.c:http_exp100_continue:
 1494|      1|{
 1495|      1|  struct cr_exp100_ctx *ctx = reader->ctx;
 1496|      1|  if(ctx->state > EXP100_SEND_DATA) {
  ------------------
  |  Branch (1496:6): [True: 1, False: 0]
  ------------------
 1497|      1|    ctx->state = EXP100_SEND_DATA;
 1498|      1|    Curl_expire_clear(data, EXPIRE_100_TIMEOUT);
 1499|      1|  }
 1500|      1|}
http.c:cr_exp100_done:
 1555|     68|{
 1556|     68|  struct cr_exp100_ctx *ctx = reader->ctx;
 1557|     68|  ctx->state = premature ? EXP100_FAILED : EXP100_SEND_DATA;
  ------------------
  |  Branch (1557:16): [True: 68, False: 0]
  ------------------
 1558|     68|  Curl_expire_clear(data, EXPIRE_100_TIMEOUT);
 1559|     68|}
http.c:http_write_header:
 1652|    603|{
 1653|    603|  CURLcode result;
 1654|    603|  int writetype;
 1655|       |
 1656|       |  /* now, only output this if the header AND body are requested:
 1657|       |   */
 1658|    603|  Curl_debug(data, CURLINFO_HEADER_IN, hd, hdlen);
 1659|       |
 1660|    603|  writetype = CLIENTWRITE_HEADER |
  ------------------
  |  |   45|    603|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
 1661|    603|    ((data->req.httpcode / 100 == 1) ? CLIENTWRITE_1XX : 0);
  ------------------
  |  |   48|      5|#define CLIENTWRITE_1XX     (1 << 5) /* a 1xx response related HEADER */
  ------------------
  |  Branch (1661:6): [True: 5, False: 598]
  ------------------
 1662|       |
 1663|    603|  result = Curl_client_write(data, writetype, hd, hdlen);
 1664|    603|  if(result)
  ------------------
  |  Branch (1664:6): [True: 553, False: 50]
  ------------------
 1665|    553|    return result;
 1666|       |
 1667|     50|  result = Curl_bump_headersize(data, hdlen, FALSE);
  ------------------
  |  | 1048|     50|#define FALSE false
  ------------------
 1668|     50|  if(result)
  ------------------
  |  Branch (1668:6): [True: 0, False: 50]
  ------------------
 1669|      0|    return result;
 1670|       |
 1671|     50|  data->req.deductheadercount = (100 <= data->req.httpcode &&
  ------------------
  |  Branch (1671:34): [True: 41, False: 9]
  ------------------
 1672|     41|                                 199 >= data->req.httpcode) ?
  ------------------
  |  Branch (1672:34): [True: 4, False: 37]
  ------------------
 1673|     46|    data->req.headerbytecount : 0;
 1674|     50|  return result;
 1675|     50|}
http.c:http_check_new_conn:
 2771|  3.61k|{
 2772|  3.61k|  struct connectdata *conn = data->conn;
 2773|  3.61k|  const char *info_version = NULL;
 2774|  3.61k|  const char *alpn;
 2775|  3.61k|  CURLcode result;
 2776|       |
 2777|  3.61k|  alpn = Curl_conn_get_alpn_negotiated(data, conn);
 2778|  3.61k|  if(alpn && !strcmp("h3", alpn)) {
  ------------------
  |  Branch (2778:6): [True: 3.60k, False: 2]
  |  Branch (2778:14): [True: 0, False: 3.60k]
  ------------------
 2779|      0|#ifndef CURL_DISABLE_PROXY
 2780|      0|    if(!conn->bits.origin_is_proxy)
  ------------------
  |  Branch (2780:8): [True: 0, False: 0]
  ------------------
 2781|      0|#endif
 2782|      0|      DEBUGASSERT(Curl_conn_http_version(data, conn) == 30);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2782:7): [True: 0, False: 0]
  |  Branch (2782:7): [True: 0, False: 0]
  ------------------
 2783|      0|    info_version = "HTTP/3";
 2784|      0|  }
 2785|  3.61k|  else if(alpn && !strcmp("h2", alpn)) {
  ------------------
  |  Branch (2785:11): [True: 3.60k, False: 2]
  |  Branch (2785:19): [True: 0, False: 3.60k]
  ------------------
 2786|      0|#ifndef CURL_DISABLE_PROXY
 2787|      0|    if((Curl_conn_http_version(data, conn) != 20) &&
  ------------------
  |  Branch (2787:8): [True: 0, False: 0]
  ------------------
 2788|      0|       conn->bits.origin_is_proxy) {
  ------------------
  |  Branch (2788:8): [True: 0, False: 0]
  ------------------
 2789|      0|      result = Curl_http2_switch(data);
 2790|      0|      if(result)
  ------------------
  |  Branch (2790:10): [True: 0, False: 0]
  ------------------
 2791|      0|        return result;
 2792|      0|    }
 2793|      0|    else
 2794|      0|#endif
 2795|      0|    DEBUGASSERT(Curl_conn_http_version(data, conn) == 20);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2795:5): [True: 0, False: 0]
  |  Branch (2795:5): [True: 0, False: 0]
  ------------------
 2796|      0|    info_version = "HTTP/2";
 2797|      0|  }
 2798|  3.61k|  else {
 2799|       |    /* Check if user wants to use HTTP/2 with clear TCP */
 2800|  3.61k|    if(Curl_http2_may_switch(data)) {
  ------------------
  |  Branch (2800:8): [True: 2, False: 3.60k]
  ------------------
 2801|      2|      DEBUGF(infof(data, "HTTP/2 over clean TCP"));
  ------------------
  |  | 1061|     14|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1061:19): [True: 2, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 2]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [Folded, False: 2]
  |  |  ------------------
  ------------------
 2802|      2|      result = Curl_http2_switch(data);
 2803|      2|      if(result)
  ------------------
  |  Branch (2803:10): [True: 0, False: 2]
  ------------------
 2804|      0|        return result;
 2805|      2|      info_version = "HTTP/2";
 2806|       |      /* There is no ALPN here, but the connection is now definitely h2 */
 2807|      2|      conn->httpversion_seen = 20;
 2808|      2|      Curl_conn_set_multiplex(conn);
 2809|      2|    }
 2810|  3.60k|    else
 2811|  3.60k|      info_version = "HTTP/1.x";
 2812|  3.61k|  }
 2813|       |
 2814|  3.61k|  if(info_version)
  ------------------
  |  Branch (2814:6): [True: 3.61k, False: 0]
  ------------------
 2815|  3.61k|    infof(data, "using %s", info_version);
  ------------------
  |  |  143|  3.61k|  do {                               \
  |  |  144|  3.61k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  3.61k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 3.61k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.61k]
  |  |  |  |  ------------------
  |  |  |  |  323|  3.61k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  3.61k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  3.61k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 3.61k]
  |  |  ------------------
  ------------------
 2816|  3.61k|  return CURLE_OK;
 2817|  3.61k|}
http.c:http_set_aptr_host:
 2027|  3.61k|{
 2028|  3.61k|  struct connectdata *conn = data->conn;
 2029|  3.61k|  const char *ptr = NULL;
 2030|       |
 2031|  3.61k|  curlx_safefree(data->state.http_host);
  ------------------
  |  | 1332|  3.61k|  do {                      \
  |  | 1333|  3.61k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.61k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.61k|    (ptr) = NULL;           \
  |  | 1335|  3.61k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.61k]
  |  |  ------------------
  ------------------
 2032|  3.61k|#ifndef CURL_DISABLE_COOKIES
 2033|  3.61k|  curlx_safefree(data->req.cookiehost);
  ------------------
  |  | 1332|  3.61k|  do {                      \
  |  | 1333|  3.61k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.61k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.61k|    (ptr) = NULL;           \
  |  | 1335|  3.61k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.61k]
  |  |  ------------------
  ------------------
 2034|  3.61k|#endif
 2035|       |
 2036|  3.61k|  if(Curl_peer_equal(data->state.initial_origin, data->state.origin))
  ------------------
  |  Branch (2036:6): [True: 3.61k, False: 0]
  ------------------
 2037|  3.61k|    ptr = Curl_checkheaders(data, STRCONST("Host"));
  ------------------
  |  | 1297|  3.61k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|  3.61k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 2038|       |
 2039|  3.61k|  if(ptr) {
  ------------------
  |  Branch (2039:6): [True: 2, False: 3.60k]
  ------------------
 2040|      2|#ifndef CURL_DISABLE_COOKIES
 2041|       |    /* If we have a given custom Host: header, we extract the hostname in
 2042|       |       order to possibly use it for cookie reasons later on. We only allow the
 2043|       |       custom Host: header if this is NOT a redirect, as setting Host: in the
 2044|       |       redirected request is being out on thin ice. Except if the hostname
 2045|       |       is the same as the first one! */
 2046|      2|    char *cookiehost;
 2047|      2|    CURLcode result = copy_custom_value(ptr, &cookiehost);
 2048|      2|    if(result)
  ------------------
  |  Branch (2048:8): [True: 0, False: 2]
  ------------------
 2049|      0|      return result;
 2050|      2|    if(!*cookiehost)
  ------------------
  |  Branch (2050:8): [True: 0, False: 2]
  ------------------
 2051|       |      /* ignore empty data */
 2052|      0|      curlx_free(cookiehost);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2053|      2|    else {
 2054|       |      /* If the host begins with '[', we start searching for the port after
 2055|       |         the bracket has been closed */
 2056|      2|      if(*cookiehost == '[') {
  ------------------
  |  Branch (2056:10): [True: 2, False: 0]
  ------------------
 2057|      2|        char *closingbracket;
 2058|       |        /* since the 'cookiehost' is an allocated memory area that will be
 2059|       |           freed later we cannot increment the pointer */
 2060|      2|        memmove(cookiehost, cookiehost + 1, strlen(cookiehost) - 1);
 2061|      2|        closingbracket = strchr(cookiehost, ']');
 2062|      2|        if(closingbracket)
  ------------------
  |  Branch (2062:12): [True: 2, False: 0]
  ------------------
 2063|      2|          *closingbracket = 0;
 2064|      2|      }
 2065|      0|      else {
 2066|      0|        int startsearch = 0;
 2067|      0|        char *colon = strchr(cookiehost + startsearch, ':');
 2068|      0|        if(colon)
  ------------------
  |  Branch (2068:12): [True: 0, False: 0]
  ------------------
 2069|      0|          *colon = 0; /* The host must not include an embedded port number */
 2070|      0|      }
 2071|      2|      data->req.cookiehost = cookiehost;
 2072|      2|    }
 2073|      2|#endif
 2074|       |
 2075|      2|    if(!curl_strequal("Host:", ptr)) {
  ------------------
  |  Branch (2075:8): [True: 2, False: 0]
  ------------------
 2076|      2|      data->state.http_host = curl_maprintf("Host:%s", &ptr[5]);
 2077|      2|      if(!data->state.http_host)
  ------------------
  |  Branch (2077:10): [True: 0, False: 2]
  ------------------
 2078|      0|        return CURLE_OUT_OF_MEMORY;
 2079|      2|    }
 2080|      2|  }
 2081|  3.60k|  else {
 2082|       |    /* This is the  HTTP Host: header, so we want
 2083|       |     * - for IPv6 origins: "[ipv6-address]" where the IPv6 address is
 2084|       |     *  found in origin->hostname, stripped of zoneid/scopeid.
 2085|       |     * - the (IDN converted) origin->hostname (DNS name or IPv4) otherwise.
 2086|       |     * Note: zoneid/scopeid  only applies to local routing and has no
 2087|       |     * meaning on the remote HTTP server (eg. would confuse it). */
 2088|  3.60k|    bool ipv6 = (bool)data->state.origin->ipv6;
 2089|  3.60k|    struct dynbuf tmp;
 2090|  3.60k|    size_t hlen;
 2091|  3.60k|    CURLcode result;
 2092|       |
 2093|  3.60k|    curlx_dyn_init(&tmp, DYN_HTTP_REQUEST);
  ------------------
  |  |   69|  3.60k|#define DYN_HTTP_REQUEST    (1024 * 1024)
  ------------------
 2094|  3.60k|    result = curlx_dyn_addn(&tmp, STRCONST("Host: "));
  ------------------
  |  | 1297|  3.60k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|  3.60k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 2095|  3.60k|    if(!result && ipv6)
  ------------------
  |  Branch (2095:8): [True: 3.60k, False: 0]
  |  Branch (2095:19): [True: 0, False: 3.60k]
  ------------------
 2096|      0|      result = curlx_dyn_addn(&tmp, STRCONST("["));
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 2097|  3.60k|    if(!result)
  ------------------
  |  Branch (2097:8): [True: 3.60k, False: 0]
  ------------------
 2098|  3.60k|      result = curlx_dyn_add(&tmp, data->state.origin->hostname);
 2099|  3.60k|    if(!result && ipv6)
  ------------------
  |  Branch (2099:8): [True: 3.60k, False: 0]
  |  Branch (2099:19): [True: 0, False: 3.60k]
  ------------------
 2100|      0|      result = curlx_dyn_addn(&tmp, STRCONST("]"));
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 2101|  3.60k|    if(!result &&
  ------------------
  |  Branch (2101:8): [True: 3.60k, False: 0]
  ------------------
 2102|  3.60k|       ((data->state.origin->port != data->state.origin->scheme->defport) ||
  ------------------
  |  Branch (2102:9): [True: 0, False: 3.60k]
  ------------------
 2103|  3.60k|       (data->state.origin->scheme->family != conn->scheme->family))) {
  ------------------
  |  Branch (2103:8): [True: 0, False: 3.60k]
  ------------------
 2104|      0|      result = curlx_dyn_addf(&tmp, ":%u", data->state.origin->port);
 2105|      0|    }
 2106|       |
 2107|  3.60k|    data->state.http_host = result ? NULL : curlx_dyn_take(&tmp, &hlen);
  ------------------
  |  Branch (2107:29): [True: 0, False: 3.60k]
  ------------------
 2108|  3.60k|    curlx_dyn_free(&tmp);
 2109|  3.60k|    return result;
 2110|  3.60k|  }
 2111|      2|  return CURLE_OK;
 2112|  3.61k|}
http.c:copy_custom_value:
  202|      4|{
  203|      4|  struct Curl_str out = { 0 };
  204|       |
  205|       |  /* find the end of the header name */
  206|      4|  if(header_has_value(&header, &out)) {
  ------------------
  |  Branch (206:6): [True: 4, False: 0]
  ------------------
  207|      4|    *valp = curlx_memdup0(curlx_str(&out), curlx_strlen(&out));
  ------------------
  |  |   49|      4|#define curlx_str(x)    ((x)->str)
  ------------------
                  *valp = curlx_memdup0(curlx_str(&out), curlx_strlen(&out));
  ------------------
  |  |   50|      4|#define curlx_strlen(x) ((x)->len)
  ------------------
  208|      4|    if(*valp)
  ------------------
  |  Branch (208:8): [True: 4, False: 0]
  ------------------
  209|      4|      return CURLE_OK;
  210|      0|    return CURLE_OUT_OF_MEMORY;
  211|      4|  }
  212|       |  /* bad input */
  213|      0|  *valp = NULL;
  214|      0|  return CURLE_BAD_FUNCTION_ARGUMENT;
  215|      4|}
http.c:header_has_value:
  172|      8|{
  173|      8|  bool value = !curlx_str_cspn(headerp, outp, ";:") &&
  ------------------
  |  Branch (173:16): [True: 8, False: 0]
  ------------------
  174|      8|    (!curlx_str_single(headerp, ':') || !curlx_str_single(headerp, ';'));
  ------------------
  |  Branch (174:6): [True: 8, False: 0]
  |  Branch (174:41): [True: 0, False: 0]
  ------------------
  175|       |
  176|      8|  if(value) {
  ------------------
  |  Branch (176:6): [True: 8, False: 0]
  ------------------
  177|      8|    curlx_str_cspn(headerp, outp, "\r\n");
  178|      8|    curlx_str_trimblanks(outp);
  179|      8|  }
  180|      8|  return value;
  181|      8|}
http.c:set_reader:
 2319|  3.59k|{
 2320|  3.59k|  CURLcode result = CURLE_OK;
 2321|  3.59k|  curl_off_t postsize = data->state.infilesize;
 2322|       |
 2323|  3.59k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1075|  3.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2323:3): [True: 0, False: 3.59k]
  |  Branch (2323:3): [True: 3.59k, False: 0]
  ------------------
 2324|       |
 2325|  3.59k|  if(data->req.authneg) {
  ------------------
  |  Branch (2325:6): [True: 1, False: 3.59k]
  ------------------
 2326|      1|    return Curl_creader_set_null(data);
 2327|      1|  }
 2328|       |
 2329|  3.59k|  switch(httpreq) {
 2330|     12|  case HTTPREQ_PUT: /* Let's PUT the data to the server! */
  ------------------
  |  Branch (2330:3): [True: 12, False: 3.58k]
  ------------------
 2331|     12|    return postsize ? Curl_creader_set_fread(data, postsize) :
  ------------------
  |  Branch (2331:12): [True: 12, False: 0]
  ------------------
 2332|     12|      Curl_creader_set_null(data);
 2333|       |
 2334|      0|#if !defined(CURL_DISABLE_MIME) || !defined(CURL_DISABLE_FORM_API)
 2335|      0|  case HTTPREQ_POST_FORM:
  ------------------
  |  Branch (2335:3): [True: 0, False: 3.59k]
  ------------------
 2336|    608|  case HTTPREQ_POST_MIME:
  ------------------
  |  Branch (2336:3): [True: 608, False: 2.98k]
  ------------------
 2337|    608|    return set_post_reader(data, httpreq);
 2338|      0|#endif
 2339|       |
 2340|     81|  case HTTPREQ_POST:
  ------------------
  |  Branch (2340:3): [True: 81, False: 3.51k]
  ------------------
 2341|       |    /* this is the simple POST, using x-www-form-urlencoded style */
 2342|       |    /* the size of the post body */
 2343|     81|    if(!postsize) {
  ------------------
  |  Branch (2343:8): [True: 45, False: 36]
  ------------------
 2344|     45|      result = Curl_creader_set_null(data);
 2345|     45|    }
 2346|     36|    else if(data->set.postfields) {
  ------------------
  |  Branch (2346:13): [True: 16, False: 20]
  ------------------
 2347|     16|      size_t plen = curlx_sotouz_range(postsize, 0, SIZE_MAX);
 2348|     16|      if(plen == SIZE_MAX)
  ------------------
  |  Branch (2348:10): [True: 0, False: 16]
  ------------------
 2349|      0|        return CURLE_OUT_OF_MEMORY;
 2350|     16|      else if(plen)
  ------------------
  |  Branch (2350:15): [True: 16, False: 0]
  ------------------
 2351|     16|        result = Curl_creader_set_buf(data, data->set.postfields, plen);
 2352|      0|      else
 2353|      0|        result = Curl_creader_set_null(data);
 2354|     16|    }
 2355|     20|    else {
 2356|       |      /* we read the bytes from the callback. In case "chunked" encoding
 2357|       |       * is forced by the application, we disregard `postsize`. This is
 2358|       |       * a backward compatibility decision to earlier versions where
 2359|       |       * chunking disregarded this. See issue #13229. */
 2360|     20|      bool chunked = FALSE;
  ------------------
  |  | 1048|     20|#define FALSE false
  ------------------
 2361|     20|      char *ptr = Curl_checkheaders(data, STRCONST("Transfer-Encoding"));
  ------------------
  |  | 1297|     20|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|     20|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 2362|     20|      if(ptr) {
  ------------------
  |  Branch (2362:10): [True: 0, False: 20]
  ------------------
 2363|       |        /* Some kind of TE is requested, check if 'chunked' is chosen */
 2364|      0|        chunked = Curl_compareheader(ptr, STRCONST("Transfer-Encoding:"),
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 2365|      0|                                     STRCONST("chunked"));
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 2366|      0|      }
 2367|     20|      result = Curl_creader_set_fread(data, chunked ? -1 : postsize);
  ------------------
  |  Branch (2367:45): [True: 0, False: 20]
  ------------------
 2368|     20|    }
 2369|     81|    return result;
 2370|       |
 2371|  2.89k|  default:
  ------------------
  |  Branch (2371:3): [True: 2.89k, False: 701]
  ------------------
 2372|       |    /* HTTP GET/HEAD download, has no body, needs no Content-Length */
 2373|  2.89k|    data->state.infilesize = 0;
 2374|  2.89k|    return Curl_creader_set_null(data);
 2375|  3.59k|  }
 2376|       |  /* not reached */
 2377|  3.59k|}
http.c:set_post_reader:
 2241|    608|{
 2242|    608|  CURLcode result;
 2243|       |
 2244|    608|  switch(httpreq) {
 2245|      0|#ifndef CURL_DISABLE_MIME
 2246|    608|  case HTTPREQ_POST_MIME:
  ------------------
  |  Branch (2246:3): [True: 608, False: 0]
  ------------------
 2247|    608|    data->state.mimepost = data->set.mimepostp;
 2248|    608|    break;
 2249|      0|#endif
 2250|      0|#ifndef CURL_DISABLE_FORM_API
 2251|      0|  case HTTPREQ_POST_FORM:
  ------------------
  |  Branch (2251:3): [True: 0, False: 608]
  ------------------
 2252|       |    /* Convert the form structure into a mime structure, then keep
 2253|       |       the conversion */
 2254|      0|    if(!data->state.formp) {
  ------------------
  |  Branch (2254:8): [True: 0, False: 0]
  ------------------
 2255|      0|      data->state.formp = curlx_calloc(1, sizeof(curl_mimepart));
  ------------------
  |  | 1473|      0|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 2256|      0|      if(!data->state.formp)
  ------------------
  |  Branch (2256:10): [True: 0, False: 0]
  ------------------
 2257|      0|        return CURLE_OUT_OF_MEMORY;
 2258|      0|      Curl_mime_cleanpart(data->state.formp);
 2259|      0|      result = Curl_getformdata(data, data->state.formp, data->set.httppost,
 2260|      0|                                data->state.fread_func);
 2261|      0|      if(result) {
  ------------------
  |  Branch (2261:10): [True: 0, False: 0]
  ------------------
 2262|      0|        curlx_safefree(data->state.formp);
  ------------------
  |  | 1332|      0|  do {                      \
  |  | 1333|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|      0|    (ptr) = NULL;           \
  |  | 1335|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2263|      0|        return result;
 2264|      0|      }
 2265|      0|      data->state.mimepost = data->state.formp;
 2266|      0|    }
 2267|      0|    break;
 2268|      0|#endif
 2269|      0|  default:
  ------------------
  |  Branch (2269:3): [True: 0, False: 608]
  ------------------
 2270|      0|    data->state.mimepost = NULL;
 2271|      0|    break;
 2272|    608|  }
 2273|       |
 2274|    608|  switch(httpreq) {
 2275|      0|  case HTTPREQ_POST_FORM:
  ------------------
  |  Branch (2275:3): [True: 0, False: 608]
  ------------------
 2276|    608|  case HTTPREQ_POST_MIME:
  ------------------
  |  Branch (2276:3): [True: 608, False: 0]
  ------------------
 2277|       |    /* This is form posting using mime data. */
 2278|    608|#ifndef CURL_DISABLE_MIME
 2279|    608|    if(data->state.mimepost) {
  ------------------
  |  Branch (2279:8): [True: 608, False: 0]
  ------------------
 2280|    608|      const char *cthdr = Curl_checkheaders(data, STRCONST("Content-Type"));
  ------------------
  |  | 1297|    608|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|    608|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 2281|       |
 2282|       |      /* Read and seek body only. */
 2283|    608|      data->state.mimepost->flags |= MIME_BODY_ONLY;
  ------------------
  |  |   35|    608|#define MIME_BODY_ONLY          (1 << 1)
  ------------------
 2284|       |
 2285|       |      /* Prepare the mime structure headers & set content type. */
 2286|       |
 2287|    608|      if(cthdr)
  ------------------
  |  Branch (2287:10): [True: 0, False: 608]
  ------------------
 2288|      0|        for(cthdr += 13; *cthdr == ' '; cthdr++)
  ------------------
  |  Branch (2288:26): [True: 0, False: 0]
  ------------------
 2289|      0|          ;
 2290|    608|      else if(data->state.mimepost->kind == MIMEKIND_MULTIPART)
  ------------------
  |  Branch (2290:15): [True: 608, False: 0]
  ------------------
 2291|    608|        cthdr = "multipart/form-data";
 2292|       |
 2293|    608|      curl_mime_headers(data->state.mimepost, data->set.headers, 0);
 2294|    608|      result = Curl_mime_prepare_headers(data, data->state.mimepost, cthdr,
 2295|    608|                                         NULL, MIMESTRATEGY_FORM);
 2296|    608|      if(result)
  ------------------
  |  Branch (2296:10): [True: 0, False: 608]
  ------------------
 2297|      0|        return result;
 2298|    608|      curl_mime_headers(data->state.mimepost, NULL, 0);
 2299|    608|      result = Curl_creader_set_mime(data, data->state.mimepost);
 2300|    608|      if(result)
  ------------------
  |  Branch (2300:10): [True: 0, False: 608]
  ------------------
 2301|      0|        return result;
 2302|    608|    }
 2303|      0|    else
 2304|      0|#endif
 2305|      0|    {
 2306|      0|      result = Curl_creader_set_null(data);
 2307|      0|    }
 2308|    608|    data->state.infilesize = Curl_creader_total_length(data);
 2309|    608|    return result;
 2310|       |
 2311|      0|  default:
  ------------------
  |  Branch (2311:3): [True: 0, False: 608]
  ------------------
 2312|      0|    return Curl_creader_set_null(data);
 2313|    608|  }
 2314|       |  /* never reached */
 2315|    608|}
http.c:http_resume:
 2380|  3.59k|{
 2381|  3.59k|  if((HTTPREQ_POST == httpreq || HTTPREQ_PUT == httpreq) &&
  ------------------
  |  Branch (2381:7): [True: 81, False: 3.51k]
  |  Branch (2381:34): [True: 13, False: 3.50k]
  ------------------
 2382|     94|     data->state.resume_from) {
  ------------------
  |  Branch (2382:6): [True: 0, False: 94]
  ------------------
 2383|       |    /**********************************************************************
 2384|       |     * Resuming upload in HTTP means that we PUT or POST and that we have
 2385|       |     * got a resume_from value set. The resume value has already created
 2386|       |     * a Range: header that will be passed along. We need to "fast forward"
 2387|       |     * the file the given number of bytes and decrease the assume upload
 2388|       |     * file size before we continue this venture in the dark lands of HTTP.
 2389|       |     * Resuming mime/form posting at an offset > 0 has no sense and is ignored.
 2390|       |     *********************************************************************/
 2391|       |
 2392|      0|    if(data->state.resume_from < 0) {
  ------------------
  |  Branch (2392:8): [True: 0, False: 0]
  ------------------
 2393|       |      /*
 2394|       |       * This is meant to get the size of the present remote-file by itself.
 2395|       |       * We do not support this now. Bail out!
 2396|       |       */
 2397|      0|      data->state.resume_from = 0;
 2398|      0|    }
 2399|       |
 2400|      0|    if(data->state.resume_from && !data->req.authneg) {
  ------------------
  |  Branch (2400:8): [True: 0, False: 0]
  |  Branch (2400:35): [True: 0, False: 0]
  ------------------
 2401|       |      /* only act on the first request */
 2402|      0|      CURLcode result;
 2403|      0|      result = Curl_creader_resume_from(data, data->state.resume_from);
 2404|      0|      if(result) {
  ------------------
  |  Branch (2404:10): [True: 0, False: 0]
  ------------------
 2405|      0|        failf(data, "Unable to resume from offset %" FMT_OFF_T,
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
                      failf(data, "Unable to resume from offset %" FMT_OFF_T,
  ------------------
  |  |  592|      0|#define FMT_OFF_T  CURL_FORMAT_CURL_OFF_T
  |  |  ------------------
  |  |  |  |  341|      0|#    define CURL_FORMAT_CURL_OFF_T     "ld"
  |  |  ------------------
  ------------------
 2406|      0|              data->state.resume_from);
 2407|      0|        return result;
 2408|      0|      }
 2409|      0|    }
 2410|      0|  }
 2411|  3.59k|  return CURLE_OK;
 2412|  3.59k|}
http.c:http_range:
 2651|  3.59k|{
 2652|  3.59k|  if(data->state.use_range) {
  ------------------
  |  Branch (2652:6): [True: 98, False: 3.50k]
  ------------------
 2653|       |    /*
 2654|       |     * A range is selected. We use different headers whether we are downloading
 2655|       |     * or uploading and we always let customized headers override our internal
 2656|       |     * ones if any such are specified.
 2657|       |     */
 2658|     98|    if(((httpreq == HTTPREQ_GET) || (httpreq == HTTPREQ_HEAD)) &&
  ------------------
  |  Branch (2658:9): [True: 65, False: 33]
  |  Branch (2658:37): [True: 8, False: 25]
  ------------------
 2659|     73|       !Curl_checkheaders(data, STRCONST("Range"))) {
  ------------------
  |  | 1297|     73|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|     73|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (2659:8): [True: 73, False: 0]
  ------------------
 2660|       |      /* if a line like this was already allocated, free the previous one */
 2661|     73|      curlx_free(data->state.rangeline);
  ------------------
  |  | 1476|     73|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2662|     73|      data->state.rangeline = curl_maprintf("Range: bytes=%s\r\n",
 2663|     73|                                                 data->state.range);
 2664|     73|      if(!data->state.rangeline)
  ------------------
  |  Branch (2664:10): [True: 0, False: 73]
  ------------------
 2665|      0|        return CURLE_OUT_OF_MEMORY;
 2666|     73|    }
 2667|     25|    else if((httpreq == HTTPREQ_POST || httpreq == HTTPREQ_PUT) &&
  ------------------
  |  Branch (2667:14): [True: 0, False: 25]
  |  Branch (2667:41): [True: 0, False: 25]
  ------------------
 2668|      0|            !Curl_checkheaders(data, STRCONST("Content-Range"))) {
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (2668:13): [True: 0, False: 0]
  ------------------
 2669|      0|      curl_off_t req_clen = Curl_creader_total_length(data);
 2670|       |      /* if a line like this was already allocated, free the previous one */
 2671|      0|      curlx_free(data->state.rangeline);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2672|       |
 2673|      0|      if(data->set.set_resume_from < 0) {
  ------------------
  |  Branch (2673:10): [True: 0, False: 0]
  ------------------
 2674|       |        /* Upload resume was asked for, but we do not know the size of the
 2675|       |           remote part so we tell the server (and act accordingly) that we
 2676|       |           upload the whole file (again) */
 2677|      0|        data->state.rangeline =
 2678|      0|          curl_maprintf("Content-Range: bytes 0-%" FMT_OFF_T "/"
 2679|      0|                        "%" FMT_OFF_T "\r\n", req_clen - 1, req_clen);
 2680|      0|      }
 2681|      0|      else if(data->state.resume_from) {
  ------------------
  |  Branch (2681:15): [True: 0, False: 0]
  ------------------
 2682|       |        /* This is because "resume" was selected */
 2683|       |        /* Not sure if we want to send this header during authentication
 2684|       |         * negotiation, but test1084 checks for it. In which case we have a
 2685|       |         * "null" client reader installed that gives an unexpected length. */
 2686|      0|        curl_off_t total_len = data->req.authneg ?
  ------------------
  |  Branch (2686:32): [True: 0, False: 0]
  ------------------
 2687|      0|                               data->state.infilesize :
 2688|      0|                               (data->state.resume_from + req_clen);
 2689|      0|        data->state.rangeline =
 2690|      0|          curl_maprintf("Content-Range: bytes %s%" FMT_OFF_T "/"
 2691|      0|                        "%" FMT_OFF_T "\r\n",
 2692|      0|                        data->state.range, total_len - 1, total_len);
 2693|      0|      }
 2694|      0|      else {
 2695|       |        /* Range was selected and then we pass the incoming range and append
 2696|       |           total size */
 2697|      0|        data->state.rangeline =
 2698|      0|          curl_maprintf("Content-Range: bytes %s/%" FMT_OFF_T "\r\n",
 2699|      0|                        data->state.range, req_clen);
 2700|      0|      }
 2701|      0|      if(!data->state.rangeline)
  ------------------
  |  Branch (2701:10): [True: 0, False: 0]
  ------------------
 2702|      0|        return CURLE_OUT_OF_MEMORY;
 2703|      0|    }
 2704|     98|  }
 2705|  3.59k|  return CURLE_OK;
 2706|  3.59k|}
http.c:http_request_version:
 1741|  3.59k|{
 1742|  3.59k|  unsigned char v = Curl_conn_http_version(data, data->conn);
 1743|  3.59k|  if(!v) {
  ------------------
  |  Branch (1743:6): [True: 3.59k, False: 2]
  ------------------
 1744|       |    /* No specific HTTP connection filter installed. */
 1745|  3.59k|    v = http_may_use_1_1(data) ? 11 : 10;
  ------------------
  |  Branch (1745:9): [True: 3.56k, False: 35]
  ------------------
 1746|  3.59k|  }
 1747|  3.59k|  return v;
 1748|  3.59k|}
http.c:http_may_use_1_1:
 1722|  3.59k|{
 1723|  3.59k|  const struct connectdata *conn = data->conn;
 1724|       |  /* We have seen a previous response for *this* transfer with 1.0,
 1725|       |   * on another connection or the same one. */
 1726|  3.59k|  if(data->state.http_neg.rcvd_min == 10)
  ------------------
  |  Branch (1726:6): [True: 0, False: 3.59k]
  ------------------
 1727|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1728|       |  /* We have seen a previous response on *this* connection with 1.0. */
 1729|  3.59k|  if(conn && conn->httpversion_seen == 10)
  ------------------
  |  Branch (1729:6): [True: 3.59k, False: 0]
  |  Branch (1729:14): [True: 0, False: 3.59k]
  ------------------
 1730|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1731|       |  /* We want 1.0 and have seen no previous response on *this* connection
 1732|       |     with a higher version (maybe no response at all yet). */
 1733|  3.59k|  if(data->state.http_neg.only_10 &&
  ------------------
  |  Branch (1733:6): [True: 35, False: 3.56k]
  ------------------
 1734|     35|     (!conn || conn->httpversion_seen <= 10))
  ------------------
  |  Branch (1734:7): [True: 0, False: 35]
  |  Branch (1734:16): [True: 0, False: 35]
  ------------------
 1735|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1736|       |  /* We are not restricted to use 1.0 only. */
 1737|  3.59k|  return !data->state.http_neg.only_10;
 1738|  3.59k|}
http.c:http_add_hd:
 2916|  71.9k|{
 2917|  71.9k|  CURLcode result = CURLE_OK;
 2918|  71.9k|#if !defined(CURL_DISABLE_ALTSVC) || \
 2919|  71.9k|  !defined(CURL_DISABLE_PROXY) || \
 2920|  71.9k|  !defined(CURL_DISABLE_WEBSOCKETS)
 2921|  71.9k|  struct connectdata *conn = data->conn;
 2922|  71.9k|#endif
 2923|  71.9k|  switch(id) {
  ------------------
  |  Branch (2923:10): [True: 71.9k, False: 0]
  ------------------
 2924|  3.59k|  case H1_HD_REQUEST:
  ------------------
  |  Branch (2924:3): [True: 3.59k, False: 68.3k]
  ------------------
 2925|       |    /* add the main request stuff */
 2926|       |    /* GET/HEAD/POST/PUT */
 2927|  3.59k|    result = curlx_dyn_addf(req, "%s ", method);
 2928|  3.59k|    if(!result)
  ------------------
  |  Branch (2928:8): [True: 3.59k, False: 0]
  ------------------
 2929|  3.59k|      result = http_target(data, req);
 2930|  3.59k|    if(!result)
  ------------------
  |  Branch (2930:8): [True: 3.59k, False: 0]
  ------------------
 2931|  3.59k|      result = curlx_dyn_addf(req, " HTTP/%s\r\n",
 2932|  3.59k|                              get_http_string(httpversion));
 2933|  3.59k|    break;
 2934|       |
 2935|  3.59k|  case H1_HD_HOST:
  ------------------
  |  Branch (2935:3): [True: 3.59k, False: 68.3k]
  ------------------
 2936|  3.59k|    if(data->state.http_host) {
  ------------------
  |  Branch (2936:8): [True: 3.59k, False: 0]
  ------------------
 2937|  3.59k|      result = curlx_dyn_add(req, data->state.http_host);
 2938|  3.59k|      if(!result)
  ------------------
  |  Branch (2938:10): [True: 3.59k, False: 0]
  ------------------
 2939|  3.59k|        result = curlx_dyn_addn(req, STRCONST("\r\n"));
  ------------------
  |  | 1297|  3.59k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|  3.59k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 2940|  3.59k|    }
 2941|  3.59k|    break;
 2942|       |
 2943|      0|#ifndef CURL_DISABLE_PROXY
 2944|  3.59k|  case H1_HD_PROXY_AUTH:
  ------------------
  |  Branch (2944:3): [True: 3.59k, False: 68.3k]
  ------------------
 2945|  3.59k|    if(data->req.hd_proxy_auth)
  ------------------
  |  Branch (2945:8): [True: 0, False: 3.59k]
  ------------------
 2946|      0|      result = curlx_dyn_add(req, data->req.hd_proxy_auth);
 2947|  3.59k|    break;
 2948|      0|#endif
 2949|       |
 2950|  3.59k|  case H1_HD_AUTH:
  ------------------
  |  Branch (2950:3): [True: 3.59k, False: 68.3k]
  ------------------
 2951|  3.59k|    if(data->req.hd_auth)
  ------------------
  |  Branch (2951:8): [True: 53, False: 3.54k]
  ------------------
 2952|     53|      result = curlx_dyn_add(req, data->req.hd_auth);
 2953|  3.59k|    break;
 2954|       |
 2955|  3.59k|  case H1_HD_RANGE:
  ------------------
  |  Branch (2955:3): [True: 3.59k, False: 68.3k]
  ------------------
 2956|  3.59k|    if(data->state.use_range && data->state.rangeline)
  ------------------
  |  Branch (2956:8): [True: 98, False: 3.50k]
  |  Branch (2956:33): [True: 73, False: 25]
  ------------------
 2957|     73|      result = curlx_dyn_add(req, data->state.rangeline);
 2958|  3.59k|    break;
 2959|       |
 2960|  3.59k|  case H1_HD_USER_AGENT: {
  ------------------
  |  Branch (2960:3): [True: 3.59k, False: 68.3k]
  ------------------
 2961|  3.59k|    const char *ua = CURL_EASY_STR(data, STRING_USERAGENT);
  ------------------
  |  | 1228|  3.59k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
 2962|  3.59k|    if(ua && *ua && !Curl_checkheaders(data, STRCONST("User-Agent")))
  ------------------
  |  | 1297|      7|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      7|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (2962:8): [True: 42, False: 3.55k]
  |  Branch (2962:14): [True: 7, False: 35]
  |  Branch (2962:21): [True: 7, False: 0]
  ------------------
 2963|      7|      result = curlx_dyn_addf(req, "User-Agent: %s\r\n", ua);
 2964|  3.59k|    break;
 2965|      0|  }
 2966|       |
 2967|  3.59k|  case H1_HD_ACCEPT:
  ------------------
  |  Branch (2967:3): [True: 3.59k, False: 68.3k]
  ------------------
 2968|  3.59k|    if(!Curl_checkheaders(data, STRCONST("Accept")))
  ------------------
  |  | 1297|  3.59k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|  3.59k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (2968:8): [True: 3.59k, False: 0]
  ------------------
 2969|  3.59k|      result = curlx_dyn_add(req, "Accept: */*\r\n");
 2970|  3.59k|    break;
 2971|       |
 2972|  3.59k|  case H1_HD_TE:
  ------------------
  |  Branch (2972:3): [True: 3.59k, False: 68.3k]
  ------------------
 2973|  3.59k|#ifdef HAVE_LIBZ
 2974|  3.59k|    if(!Curl_checkheaders(data, STRCONST("TE")) &&
  ------------------
  |  | 1297|  3.59k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|  3.59k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (2974:8): [True: 3.59k, False: 0]
  ------------------
 2975|  3.59k|       data->set.http_transfer_encoding) {
  ------------------
  |  Branch (2975:8): [True: 9, False: 3.58k]
  ------------------
 2976|      9|      data->state.http_hd_te = TRUE;
  ------------------
  |  | 1045|      9|#define TRUE true
  ------------------
 2977|      9|      result = curlx_dyn_add(req, "TE: gzip\r\n");
 2978|      9|    }
 2979|  3.59k|#endif
 2980|  3.59k|    break;
 2981|       |
 2982|  3.59k|  case H1_HD_ACCEPT_ENCODING: {
  ------------------
  |  Branch (2982:3): [True: 3.59k, False: 68.3k]
  ------------------
 2983|  3.59k|    const char *enc = CURL_EASY_STR(data, STRING_ENCODING);
  ------------------
  |  | 1228|  3.59k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
 2984|  3.59k|    if(enc && !Curl_checkheaders(data, STRCONST("Accept-Encoding")))
  ------------------
  |  | 1297|     82|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|     82|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (2984:8): [True: 82, False: 3.51k]
  |  Branch (2984:15): [True: 82, False: 0]
  ------------------
 2985|     82|      result = curlx_dyn_addf(req, "Accept-Encoding: %s\r\n", enc);
 2986|  3.59k|    break;
 2987|      0|  }
 2988|       |
 2989|  3.59k|  case H1_HD_REFERER:
  ------------------
  |  Branch (2989:3): [True: 3.59k, False: 68.3k]
  ------------------
 2990|  3.59k|    if(Curl_bufref_ptr(&data->state.referer) &&
  ------------------
  |  Branch (2990:8): [True: 36, False: 3.56k]
  ------------------
 2991|     36|       !Curl_checkheaders(data, STRCONST("Referer")))
  ------------------
  |  | 1297|     36|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|     36|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (2991:8): [True: 36, False: 0]
  ------------------
 2992|     36|      result = curlx_dyn_addf(req, "Referer: %s\r\n",
 2993|     36|                              Curl_bufref_ptr(&data->state.referer));
 2994|  3.59k|    break;
 2995|       |
 2996|      0|#ifndef CURL_DISABLE_PROXY
 2997|  3.59k|  case H1_HD_PROXY_CONNECTION:
  ------------------
  |  Branch (2997:3): [True: 3.59k, False: 68.3k]
  ------------------
 2998|  3.59k|    if(conn->bits.origin_is_proxy &&
  ------------------
  |  Branch (2998:8): [True: 0, False: 3.59k]
  ------------------
 2999|      0|       !Curl_checkheaders(data, STRCONST("Proxy-Connection")) &&
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (2999:8): [True: 0, False: 0]
  ------------------
 3000|      0|       !Curl_checkProxyheaders(data, data->conn, STRCONST("Proxy-Connection")))
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (3000:8): [True: 0, False: 0]
  ------------------
 3001|      0|      result = curlx_dyn_add(req, "Proxy-Connection: Keep-Alive\r\n");
 3002|  3.59k|    break;
 3003|      0|#endif
 3004|       |
 3005|  3.59k|  case H1_HD_TRANSFER_ENCODING:
  ------------------
  |  Branch (3005:3): [True: 3.59k, False: 68.3k]
  ------------------
 3006|  3.59k|    result = http_req_set_TE(data, req, httpversion);
 3007|  3.59k|    break;
 3008|       |
 3009|      0|#ifndef CURL_DISABLE_ALTSVC
 3010|  3.59k|  case H1_HD_ALT_USED:
  ------------------
  |  Branch (3010:3): [True: 3.59k, False: 68.3k]
  ------------------
 3011|  3.59k|    if(conn->bits.altused && conn->via_peer &&
  ------------------
  |  Branch (3011:8): [True: 0, False: 3.59k]
  |  Branch (3011:30): [True: 0, False: 0]
  ------------------
 3012|      0|       !Curl_checkheaders(data, STRCONST("Alt-Used")))
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (3012:8): [True: 0, False: 0]
  ------------------
 3013|      0|      result = curlx_dyn_addf(req, "Alt-Used: %s:%u\r\n",
 3014|      0|                              conn->via_peer->hostname, conn->via_peer->port);
 3015|  3.59k|    break;
 3016|      0|#endif
 3017|       |
 3018|  3.59k|  case H1_HD_UPGRADE:
  ------------------
  |  Branch (3018:3): [True: 3.59k, False: 68.3k]
  ------------------
 3019|  3.59k|    if(!Curl_conn_is_ssl(data->conn, FIRSTSOCKET) && (httpversion < 20) &&
  ------------------
  |  |  234|  3.59k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (3019:8): [True: 0, False: 3.59k]
  |  Branch (3019:54): [True: 0, False: 0]
  ------------------
 3020|      0|       (data->state.http_neg.wanted & CURL_HTTP_V2x) &&
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (3020:8): [True: 0, False: 0]
  ------------------
 3021|      0|       data->state.http_neg.h2_upgrade) {
  ------------------
  |  Branch (3021:8): [True: 0, False: 0]
  ------------------
 3022|       |      /* append HTTP2 upgrade magic stuff to the HTTP request if it is not done
 3023|       |         over SSL */
 3024|      0|      result = Curl_http2_request_upgrade(req, data);
 3025|      0|    }
 3026|  3.59k|#ifndef CURL_DISABLE_WEBSOCKETS
 3027|  3.59k|    if(!result && conn->scheme->protocol & (CURLPROTO_WS | CURLPROTO_WSS))
  ------------------
  |  |   63|  3.59k|#define CURLPROTO_WS     (1L << 30)
  ------------------
                  if(!result && conn->scheme->protocol & (CURLPROTO_WS | CURLPROTO_WSS))
  ------------------
  |  |   64|  3.59k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  ------------------
  |  Branch (3027:8): [True: 3.59k, False: 0]
  |  Branch (3027:19): [True: 0, False: 3.59k]
  ------------------
 3028|      0|      result = Curl_ws_request(data, req);
 3029|  3.59k|#endif
 3030|  3.59k|    break;
 3031|       |
 3032|  3.59k|  case H1_HD_COOKIES:
  ------------------
  |  Branch (3032:3): [True: 3.59k, False: 68.3k]
  ------------------
 3033|  3.59k|    result = http_cookies(data, req);
 3034|  3.59k|    break;
 3035|       |
 3036|  3.59k|  case H1_HD_CONDITIONALS:
  ------------------
  |  Branch (3036:3): [True: 3.59k, False: 68.3k]
  ------------------
 3037|  3.59k|    result = Curl_add_timecondition(data, req);
 3038|  3.59k|    break;
 3039|       |
 3040|  3.59k|  case H1_HD_CUSTOM:
  ------------------
  |  Branch (3040:3): [True: 3.59k, False: 68.3k]
  ------------------
 3041|  3.59k|    result = Curl_add_custom_headers(data, FALSE, httpversion, req);
  ------------------
  |  | 1048|  3.59k|#define FALSE false
  ------------------
 3042|  3.59k|    break;
 3043|       |
 3044|  3.59k|  case H1_HD_CONTENT:
  ------------------
  |  Branch (3044:3): [True: 3.59k, False: 68.3k]
  ------------------
 3045|  3.59k|    result = http_add_content_hds(data, req, httpversion, httpreq);
 3046|  3.59k|    break;
 3047|       |
 3048|  3.59k|  case H1_HD_CONNECTION: {
  ------------------
  |  Branch (3048:3): [True: 3.59k, False: 68.3k]
  ------------------
 3049|  3.59k|    result = http_add_connection_hd(data, req);
 3050|  3.59k|    break;
 3051|      0|  }
 3052|       |
 3053|  3.59k|  case H1_HD_LAST:
  ------------------
  |  Branch (3053:3): [True: 3.59k, False: 68.3k]
  ------------------
 3054|  3.59k|    result = curlx_dyn_addn(req, STRCONST("\r\n"));
  ------------------
  |  | 1297|  3.59k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|  3.59k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 3055|  3.59k|    break;
 3056|  71.9k|  }
 3057|  71.9k|  return result;
 3058|  71.9k|}
http.c:http_target:
 2119|  3.59k|{
 2120|  3.59k|  CURLcode result = CURLE_OK;
 2121|  3.59k|  const char *path = data->state.up.path;
 2122|  3.59k|  const char *query = data->state.up.query;
 2123|  3.59k|#ifndef CURL_DISABLE_PROXY
 2124|  3.59k|  struct connectdata *conn = data->conn;
 2125|  3.59k|#endif
 2126|       |
 2127|  3.59k|  if(CURL_EASY_STR(data, STRING_TARGET)) {
  ------------------
  |  | 1228|  3.59k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  |  |  ------------------
  |  |  |  Branch (1228:3): [True: 42, False: 3.55k]
  |  |  ------------------
  ------------------
 2128|     42|    path = CURL_EASY_STR(data, STRING_TARGET);
  ------------------
  |  | 1228|     42|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
 2129|     42|    query = NULL;
 2130|     42|  }
 2131|       |
 2132|  3.59k|#ifndef CURL_DISABLE_PROXY
 2133|  3.59k|  if(conn->bits.origin_is_proxy) {
  ------------------
  |  Branch (2133:6): [True: 0, False: 3.59k]
  ------------------
 2134|       |    /* Using a proxy but does not tunnel through it */
 2135|       |
 2136|       |    /* The path sent to the proxy is in fact the entire URL, but if the remote
 2137|       |       host is a IDN-name, we must make sure that the request we produce only
 2138|       |       uses the decoded hostname! */
 2139|       |
 2140|       |    /* and no fragment part */
 2141|      0|    CURLUcode uc;
 2142|      0|    char *url;
 2143|      0|    CURLU *h = curl_url_dup(data->state.uh);
 2144|      0|    if(!h)
  ------------------
  |  Branch (2144:8): [True: 0, False: 0]
  ------------------
 2145|      0|      return CURLE_OUT_OF_MEMORY;
 2146|       |
 2147|      0|    if(!data->state.origin->ipv6 &&
  ------------------
  |  Branch (2147:8): [True: 0, False: 0]
  ------------------
 2148|      0|       (data->state.origin->user_hostname != data->state.origin->hostname)) {
  ------------------
  |  Branch (2148:8): [True: 0, False: 0]
  ------------------
 2149|      0|      uc = curl_url_set(h, CURLUPART_HOST, data->state.origin->hostname, 0);
 2150|      0|      if(uc) {
  ------------------
  |  Branch (2150:10): [True: 0, False: 0]
  ------------------
 2151|      0|        curl_url_cleanup(h);
 2152|      0|        return CURLE_OUT_OF_MEMORY;
 2153|      0|      }
 2154|      0|    }
 2155|      0|    uc = curl_url_set(h, CURLUPART_FRAGMENT, NULL, 0);
 2156|      0|    if(uc) {
  ------------------
  |  Branch (2156:8): [True: 0, False: 0]
  ------------------
 2157|      0|      curl_url_cleanup(h);
 2158|      0|      return CURLE_OUT_OF_MEMORY;
 2159|      0|    }
 2160|       |
 2161|      0|    if(data->state.origin->scheme == &Curl_scheme_http) {
  ------------------
  |  Branch (2161:8): [True: 0, False: 0]
  ------------------
 2162|       |      /* when getting HTTP, we do not want the userinfo the URL */
 2163|      0|      uc = curl_url_set(h, CURLUPART_USER, NULL, 0);
 2164|      0|      if(uc) {
  ------------------
  |  Branch (2164:10): [True: 0, False: 0]
  ------------------
 2165|      0|        curl_url_cleanup(h);
 2166|      0|        return CURLE_OUT_OF_MEMORY;
 2167|      0|      }
 2168|      0|      uc = curl_url_set(h, CURLUPART_PASSWORD, NULL, 0);
 2169|      0|      if(uc) {
  ------------------
  |  Branch (2169:10): [True: 0, False: 0]
  ------------------
 2170|      0|        curl_url_cleanup(h);
 2171|      0|        return CURLE_OUT_OF_MEMORY;
 2172|      0|      }
 2173|      0|    }
 2174|      0|    else if(data->state.creds && (data->state.creds->source != CREDS_URL)) {
  ------------------
  |  |   30|      0|#define CREDS_URL    1 /* username/passwd from URL */
  ------------------
  |  Branch (2174:13): [True: 0, False: 0]
  |  Branch (2174:34): [True: 0, False: 0]
  ------------------
 2175|       |        /* credentials not from the URL need to be set */
 2176|      0|      uc = curl_url_set(h, CURLUPART_USER,
 2177|      0|                        data->state.creds->user, CURLU_URLENCODE);
  ------------------
  |  |   95|      0|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
 2178|      0|      if(!uc)
  ------------------
  |  Branch (2178:10): [True: 0, False: 0]
  ------------------
 2179|      0|        uc = curl_url_set(h, CURLUPART_PASSWORD,
 2180|      0|                          data->state.creds->passwd, CURLU_URLENCODE);
  ------------------
  |  |   95|      0|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
 2181|      0|      if(uc) {
  ------------------
  |  Branch (2181:10): [True: 0, False: 0]
  ------------------
 2182|      0|        curl_url_cleanup(h);
 2183|      0|        return Curl_uc_to_curlcode(uc);
 2184|      0|      }
 2185|      0|    }
 2186|       |
 2187|       |    /* Extract the URL to use in the request. */
 2188|      0|    uc = curl_url_get(h, CURLUPART_URL, &url, CURLU_NO_DEFAULT_PORT);
  ------------------
  |  |   86|      0|#define CURLU_NO_DEFAULT_PORT (1 << 1)    /* act as if no port number was set,
  ------------------
 2189|      0|    if(uc) {
  ------------------
  |  Branch (2189:8): [True: 0, False: 0]
  ------------------
 2190|      0|      curl_url_cleanup(h);
 2191|      0|      return CURLE_OUT_OF_MEMORY;
 2192|      0|    }
 2193|       |
 2194|      0|    curl_url_cleanup(h);
 2195|       |
 2196|       |    /* target or URL */
 2197|      0|    result = curlx_dyn_add(r, CURL_EASY_STR(data, STRING_TARGET) ?
  ------------------
  |  | 1228|      0|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  |  |  ------------------
  |  |  |  Branch (1228:3): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2198|      0|      CURL_EASY_STR(data, STRING_TARGET) : url);
  ------------------
  |  | 1228|      0|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
 2199|      0|    curlx_free(url);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2200|      0|    if(result)
  ------------------
  |  Branch (2200:8): [True: 0, False: 0]
  ------------------
 2201|      0|      return result;
 2202|       |
 2203|      0|    if((data->state.origin->scheme == &Curl_scheme_ftp) &&
  ------------------
  |  Branch (2203:8): [True: 0, False: 0]
  ------------------
 2204|      0|       data->set.proxy_transfer_mode) {
  ------------------
  |  Branch (2204:8): [True: 0, False: 0]
  ------------------
 2205|       |      /* when doing ftp, append ;type=<a|i> if not present */
 2206|      0|      size_t len = strlen(path);
 2207|      0|      bool type_present = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 2208|      0|      if((len >= 7) && !memcmp(&path[len - 7], ";type=", 6)) {
  ------------------
  |  Branch (2208:10): [True: 0, False: 0]
  |  Branch (2208:24): [True: 0, False: 0]
  ------------------
 2209|      0|        switch(Curl_raw_toupper(path[len - 1])) {
  ------------------
  |  Branch (2209:16): [True: 0, False: 0]
  ------------------
 2210|      0|        case 'A':
  ------------------
  |  Branch (2210:9): [True: 0, False: 0]
  ------------------
 2211|      0|        case 'D':
  ------------------
  |  Branch (2211:9): [True: 0, False: 0]
  ------------------
 2212|      0|        case 'I':
  ------------------
  |  Branch (2212:9): [True: 0, False: 0]
  ------------------
 2213|      0|          type_present = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2214|      0|          break;
 2215|      0|        }
 2216|      0|      }
 2217|      0|      if(!type_present) {
  ------------------
  |  Branch (2217:10): [True: 0, False: 0]
  ------------------
 2218|      0|        result = curlx_dyn_addf(r, ";type=%c",
 2219|      0|                                data->state.prefer_ascii ? 'a' : 'i');
  ------------------
  |  Branch (2219:33): [True: 0, False: 0]
  ------------------
 2220|      0|        if(result)
  ------------------
  |  Branch (2220:12): [True: 0, False: 0]
  ------------------
 2221|      0|          return result;
 2222|      0|      }
 2223|      0|    }
 2224|      0|  }
 2225|       |
 2226|  3.59k|  else
 2227|  3.59k|#endif
 2228|  3.59k|  {
 2229|  3.59k|    result = curlx_dyn_add(r, path);
 2230|  3.59k|    if(result)
  ------------------
  |  Branch (2230:8): [True: 0, False: 3.59k]
  ------------------
 2231|      0|      return result;
 2232|  3.59k|    if(query)
  ------------------
  |  Branch (2232:8): [True: 86, False: 3.51k]
  ------------------
 2233|     86|      result = curlx_dyn_addf(r, "?%s", query);
 2234|  3.59k|  }
 2235|       |
 2236|  3.59k|  return result;
 2237|  3.59k|}
http.c:get_http_string:
 1751|  3.59k|{
 1752|  3.59k|  switch(httpversion) {
 1753|      0|  case 30:
  ------------------
  |  Branch (1753:3): [True: 0, False: 3.59k]
  ------------------
 1754|      0|    return "3";
 1755|      2|  case 20:
  ------------------
  |  Branch (1755:3): [True: 2, False: 3.59k]
  ------------------
 1756|      2|    return "2";
 1757|  3.56k|  case 11:
  ------------------
  |  Branch (1757:3): [True: 3.56k, False: 37]
  ------------------
 1758|  3.56k|    return "1.1";
 1759|     35|  default:
  ------------------
  |  Branch (1759:3): [True: 35, False: 3.56k]
  ------------------
 1760|     35|    return "1.0";
 1761|  3.59k|  }
 1762|  3.59k|}
http.c:http_req_set_TE:
 2417|  3.59k|{
 2418|  3.59k|  CURLcode result = CURLE_OK;
 2419|  3.59k|  const char *ptr;
 2420|       |
 2421|  3.59k|  ptr = Curl_checkheaders(data, STRCONST("Transfer-Encoding"));
  ------------------
  |  | 1297|  3.59k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|  3.59k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 2422|  3.59k|  if(ptr) {
  ------------------
  |  Branch (2422:6): [True: 0, False: 3.59k]
  ------------------
 2423|       |    /* Some kind of TE is requested, check if 'chunked' is chosen */
 2424|      0|    data->req.upload_chunky =
 2425|      0|      Curl_compareheader(ptr,
 2426|      0|                         STRCONST("Transfer-Encoding:"), STRCONST("chunked"));
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
                                       STRCONST("Transfer-Encoding:"), STRCONST("chunked"));
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 2427|      0|    if(data->req.upload_chunky && (httpversion >= 20)) {
  ------------------
  |  Branch (2427:8): [True: 0, False: 0]
  |  Branch (2427:35): [True: 0, False: 0]
  ------------------
 2428|      0|      infof(data, "suppressing chunked transfer encoding on connection "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2429|      0|            "using HTTP version 2 or higher");
 2430|      0|      data->req.upload_chunky = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 2431|      0|    }
 2432|      0|  }
 2433|  3.59k|  else {
 2434|  3.59k|    curl_off_t req_clen = Curl_creader_total_length(data);
 2435|       |
 2436|  3.59k|    if(req_clen < 0) {
  ------------------
  |  Branch (2436:8): [True: 104, False: 3.49k]
  ------------------
 2437|       |      /* indeterminate request content length */
 2438|    104|      if(httpversion > 10) {
  ------------------
  |  Branch (2438:10): [True: 102, False: 2]
  ------------------
 2439|       |        /* On HTTP/1.1, enable chunked, on HTTP/2 and later we do not
 2440|       |         * need it */
 2441|    102|        data->req.upload_chunky = (httpversion < 20);
 2442|    102|      }
 2443|      2|      else {
 2444|      2|        failf(data, "Chunky upload is not supported by HTTP 1.0");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
 2445|      2|        return CURLE_UPLOAD_FAILED;
 2446|      2|      }
 2447|    104|    }
 2448|  3.49k|    else {
 2449|       |      /* else, no chunky upload */
 2450|  3.49k|      data->req.upload_chunky = FALSE;
  ------------------
  |  | 1048|  3.49k|#define FALSE false
  ------------------
 2451|  3.49k|    }
 2452|       |
 2453|  3.59k|    if(data->req.upload_chunky)
  ------------------
  |  Branch (2453:8): [True: 102, False: 3.49k]
  ------------------
 2454|    102|      result = curlx_dyn_add(req, "Transfer-Encoding: chunked\r\n");
 2455|  3.59k|  }
 2456|  3.59k|  return result;
 2457|  3.59k|}
http.c:http_cookies:
 2577|  3.59k|{
 2578|  3.59k|  CURLcode result = CURLE_OK;
 2579|  3.59k|  const char *addcookies = NULL;
 2580|  3.59k|  bool linecap = FALSE;
  ------------------
  |  | 1048|  3.59k|#define FALSE false
  ------------------
 2581|  3.59k|  if(CURL_EASY_STR(data, STRING_COOKIE) &&
  ------------------
  |  | 1228|  7.19k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  |  |  ------------------
  |  |  |  Branch (1228:3): [True: 49, False: 3.54k]
  |  |  ------------------
  ------------------
 2582|     49|     !Curl_checkheaders(data, STRCONST("Cookie")) &&
  ------------------
  |  | 1297|     49|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|     49|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (2582:6): [True: 49, False: 0]
  ------------------
 2583|     49|     Curl_auth_allowed_to_host(data))
  ------------------
  |  Branch (2583:6): [True: 49, False: 0]
  ------------------
 2584|     49|    addcookies = CURL_EASY_STR(data, STRING_COOKIE);
  ------------------
  |  | 1228|     49|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
 2585|       |
 2586|  3.59k|  if(data->cookies || addcookies) {
  ------------------
  |  Branch (2586:6): [True: 3.59k, False: 0]
  |  Branch (2586:23): [True: 0, False: 0]
  ------------------
 2587|  3.59k|    struct Curl_llist list;
 2588|  3.59k|    int count = 0;
 2589|       |
 2590|  3.59k|    if(data->cookies && data->state.cookie_engine) {
  ------------------
  |  Branch (2590:8): [True: 3.59k, False: 0]
  |  Branch (2590:25): [True: 3.59k, False: 0]
  ------------------
 2591|  3.59k|      bool okay;
 2592|  3.59k|      const char *host = data->req.cookiehost ?
  ------------------
  |  Branch (2592:26): [True: 2, False: 3.59k]
  ------------------
 2593|  3.59k|        data->req.cookiehost : data->state.origin->hostname;
 2594|  3.59k|      Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 2595|  3.59k|      result = Curl_cookie_getlist(data, &okay, host, &list);
 2596|  3.59k|      if(!result && okay) {
  ------------------
  |  Branch (2596:10): [True: 3.59k, False: 0]
  |  Branch (2596:21): [True: 0, False: 3.59k]
  ------------------
 2597|      0|        struct Curl_llist_node *n;
 2598|      0|        size_t clen = 8; /* hold the size of the generated Cookie: header */
 2599|       |
 2600|       |        /* loop through all cookies that matched */
 2601|      0|        for(n = Curl_llist_head(&list); n; n = Curl_node_next(n)) {
  ------------------
  |  Branch (2601:41): [True: 0, False: 0]
  ------------------
 2602|      0|          struct Cookie *co = Curl_node_elem(n);
 2603|      0|          if(co->value) {
  ------------------
  |  Branch (2603:14): [True: 0, False: 0]
  ------------------
 2604|      0|            size_t add;
 2605|      0|            if(!count) {
  ------------------
  |  Branch (2605:16): [True: 0, False: 0]
  ------------------
 2606|      0|              result = curlx_dyn_addn(r, STRCONST("Cookie: "));
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 2607|      0|              if(result)
  ------------------
  |  Branch (2607:18): [True: 0, False: 0]
  ------------------
 2608|      0|                break;
 2609|      0|            }
 2610|      0|            add = strlen(co->name) + strlen(co->value) + 1;
 2611|      0|            if(clen + add >= MAX_COOKIE_HEADER_LEN) {
  ------------------
  |  |   97|      0|#define MAX_COOKIE_HEADER_LEN 8190
  ------------------
  |  Branch (2611:16): [True: 0, False: 0]
  ------------------
 2612|      0|              infof(data, "Restricted outgoing cookies due to header size, "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2613|      0|                    "'%s' not sent", co->name);
 2614|      0|              linecap = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2615|      0|              break;
 2616|      0|            }
 2617|      0|            result = curlx_dyn_addf(r, "%s%s=%s", count ? "; " : "",
  ------------------
  |  Branch (2617:51): [True: 0, False: 0]
  ------------------
 2618|      0|                                    co->name, co->value);
 2619|      0|            if(result)
  ------------------
  |  Branch (2619:16): [True: 0, False: 0]
  ------------------
 2620|      0|              break;
 2621|      0|            clen += add + (count ? 2 : 0);
  ------------------
  |  Branch (2621:28): [True: 0, False: 0]
  ------------------
 2622|      0|            count++;
 2623|      0|          }
 2624|      0|        }
 2625|      0|        Curl_llist_destroy(&list, NULL);
 2626|      0|      }
 2627|  3.59k|      Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 2628|  3.59k|    }
 2629|  3.59k|    if(addcookies && !result && !linecap) {
  ------------------
  |  Branch (2629:8): [True: 49, False: 3.54k]
  |  Branch (2629:22): [True: 49, False: 0]
  |  Branch (2629:33): [True: 49, False: 0]
  ------------------
 2630|     49|      if(!count)
  ------------------
  |  Branch (2630:10): [True: 49, False: 0]
  ------------------
 2631|     49|        result = curlx_dyn_addn(r, STRCONST("Cookie: "));
  ------------------
  |  | 1297|     49|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|     49|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 2632|     49|      if(!result) {
  ------------------
  |  Branch (2632:10): [True: 49, False: 0]
  ------------------
 2633|     49|        result = curlx_dyn_addf(r, "%s%s", count ? "; " : "", addcookies);
  ------------------
  |  Branch (2633:44): [True: 0, False: 49]
  ------------------
 2634|     49|        count++;
 2635|     49|      }
 2636|     49|    }
 2637|  3.59k|    if(count && !result)
  ------------------
  |  Branch (2637:8): [True: 49, False: 3.54k]
  |  Branch (2637:17): [True: 49, False: 0]
  ------------------
 2638|     49|      result = curlx_dyn_addn(r, STRCONST("\r\n"));
  ------------------
  |  | 1297|     49|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|     49|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 2639|       |
 2640|  3.59k|    if(result)
  ------------------
  |  Branch (2640:8): [True: 0, False: 3.59k]
  ------------------
 2641|      0|      return result;
 2642|  3.59k|  }
 2643|  3.59k|  return result;
 2644|  3.59k|}
http.c:http_add_content_hds:
 2498|  3.59k|{
 2499|  3.59k|  CURLcode result = CURLE_OK;
 2500|  3.59k|  curl_off_t req_clen;
 2501|  3.59k|  bool announced_exp100 = FALSE;
  ------------------
  |  | 1048|  3.59k|#define FALSE false
  ------------------
 2502|       |
 2503|  3.59k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1075|  3.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2503:3): [True: 0, False: 3.59k]
  |  Branch (2503:3): [True: 3.59k, False: 0]
  ------------------
 2504|  3.59k|  if(data->req.upload_chunky) {
  ------------------
  |  Branch (2504:6): [True: 102, False: 3.49k]
  ------------------
 2505|    102|    result = Curl_httpchunk_add_reader(data);
 2506|    102|    if(result)
  ------------------
  |  Branch (2506:8): [True: 0, False: 102]
  ------------------
 2507|      0|      return result;
 2508|    102|  }
 2509|       |
 2510|       |  /* Get the request body length that has been set up */
 2511|  3.59k|  req_clen = Curl_creader_total_length(data);
 2512|  3.59k|  switch(httpreq) {
 2513|     12|  case HTTPREQ_PUT:
  ------------------
  |  Branch (2513:3): [True: 12, False: 3.58k]
  ------------------
 2514|     93|  case HTTPREQ_POST:
  ------------------
  |  Branch (2514:3): [True: 81, False: 3.51k]
  ------------------
 2515|     93|#if !defined(CURL_DISABLE_MIME) || !defined(CURL_DISABLE_FORM_API)
 2516|     93|  case HTTPREQ_POST_FORM:
  ------------------
  |  Branch (2516:3): [True: 0, False: 3.59k]
  ------------------
 2517|    700|  case HTTPREQ_POST_MIME:
  ------------------
  |  Branch (2517:3): [True: 607, False: 2.98k]
  ------------------
 2518|    700|#endif
 2519|       |    /* We only set Content-Length and allow a custom Content-Length if
 2520|       |       we do not upload data chunked, as RFC2616 forbids us to set both
 2521|       |       kinds of headers (Transfer-Encoding: chunked and Content-Length).
 2522|       |       We do not override a custom "Content-Length" header, but during
 2523|       |       authentication negotiation that header is suppressed.
 2524|       |     */
 2525|    700|    if(req_clen >= 0 && !data->req.upload_chunky &&
  ------------------
  |  Branch (2525:8): [True: 598, False: 102]
  |  Branch (2525:25): [True: 598, False: 0]
  ------------------
 2526|    598|       (data->req.authneg ||
  ------------------
  |  Branch (2526:9): [True: 1, False: 597]
  ------------------
 2527|    598|        !Curl_checkheaders(data, STRCONST("Content-Length")))) {
  ------------------
  |  | 1297|    597|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|    597|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (2527:9): [True: 597, False: 0]
  ------------------
 2528|       |      /* we allow replacing this header if not during auth negotiation,
 2529|       |         although it is not wise to actually set your own */
 2530|    598|      result = curlx_dyn_addf(r, "Content-Length: %" FMT_OFF_T "\r\n",
 2531|    598|                              req_clen);
 2532|    598|    }
 2533|    700|    if(result)
  ------------------
  |  Branch (2533:8): [True: 0, False: 700]
  ------------------
 2534|      0|      goto out;
 2535|       |
 2536|    700|#ifndef CURL_DISABLE_MIME
 2537|       |    /* Output mime-generated headers. */
 2538|    700|    if(data->state.mimepost &&
  ------------------
  |  Branch (2538:8): [True: 607, False: 93]
  ------------------
 2539|    607|       ((httpreq == HTTPREQ_POST_FORM) || (httpreq == HTTPREQ_POST_MIME))) {
  ------------------
  |  Branch (2539:9): [True: 0, False: 607]
  |  Branch (2539:43): [True: 607, False: 0]
  ------------------
 2540|    607|      struct curl_slist *hdr;
 2541|       |
 2542|  1.21k|      for(hdr = data->state.mimepost->curlheaders; hdr; hdr = hdr->next) {
  ------------------
  |  Branch (2542:52): [True: 607, False: 607]
  ------------------
 2543|    607|        result = curlx_dyn_addf(r, "%s\r\n", hdr->data);
 2544|    607|        if(result)
  ------------------
  |  Branch (2544:12): [True: 0, False: 607]
  ------------------
 2545|      0|          goto out;
 2546|    607|      }
 2547|    607|    }
 2548|    700|#endif
 2549|    700|    if(httpreq == HTTPREQ_POST) {
  ------------------
  |  Branch (2549:8): [True: 81, False: 619]
  ------------------
 2550|     81|      if(!Curl_checkheaders(data, STRCONST("Content-Type"))) {
  ------------------
  |  | 1297|     81|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|     81|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (2550:10): [True: 81, False: 0]
  ------------------
 2551|     81|        result = curlx_dyn_addn(r, STRCONST("Content-Type: application/"
  ------------------
  |  | 1297|     81|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|     81|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 2552|     81|                                            "x-www-form-urlencoded\r\n"));
 2553|     81|        if(result)
  ------------------
  |  Branch (2553:12): [True: 0, False: 81]
  ------------------
 2554|      0|          goto out;
 2555|     81|      }
 2556|     81|    }
 2557|    700|    result = addexpect(data, r, httpversion, &announced_exp100);
 2558|    700|    if(result)
  ------------------
  |  Branch (2558:8): [True: 0, False: 700]
  ------------------
 2559|      0|      goto out;
 2560|    700|    break;
 2561|  2.89k|  default:
  ------------------
  |  Branch (2561:3): [True: 2.89k, False: 700]
  ------------------
 2562|  2.89k|    break;
 2563|  3.59k|  }
 2564|       |
 2565|  3.59k|  Curl_pgrsSetUploadSize(data, req_clen);
 2566|  3.59k|  if(announced_exp100)
  ------------------
  |  Branch (2566:6): [True: 98, False: 3.49k]
  ------------------
 2567|     98|    result = http_exp100_add_reader(data);
 2568|       |
 2569|  3.59k|out:
 2570|  3.59k|  return result;
 2571|  3.59k|}
http.c:addexpect:
 2461|    700|{
 2462|    700|  CURLcode result;
 2463|    700|  char *ptr;
 2464|       |
 2465|    700|  *announced_exp100 = FALSE;
  ------------------
  |  | 1048|    700|#define FALSE false
  ------------------
 2466|       |  /* Avoid Expect: 100-continue if Upgrade: is used */
 2467|    700|  if(data->req.upgr101 != UPGR101_NONE)
  ------------------
  |  Branch (2467:6): [True: 0, False: 700]
  ------------------
 2468|      0|    return CURLE_OK;
 2469|       |
 2470|       |  /* For really small puts we do not use Expect: headers at all, and for
 2471|       |     the somewhat bigger ones we allow the app to disable it. Make
 2472|       |     sure that the expect100header is always set to the preferred value
 2473|       |     here. */
 2474|    700|  ptr = Curl_checkheaders(data, STRCONST("Expect"));
  ------------------
  |  | 1297|    700|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|    700|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 2475|    700|  if(ptr) {
  ------------------
  |  Branch (2475:6): [True: 29, False: 671]
  ------------------
 2476|     29|    *announced_exp100 =
 2477|     29|      Curl_compareheader(ptr, STRCONST("Expect:"), STRCONST("100-continue"));
  ------------------
  |  | 1297|     29|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|     29|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
                    Curl_compareheader(ptr, STRCONST("Expect:"), STRCONST("100-continue"));
  ------------------
  |  | 1297|     29|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|     29|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 2478|     29|  }
 2479|    671|  else if(!data->state.disableexpect && (httpversion == 11)) {
  ------------------
  |  Branch (2479:11): [True: 671, False: 0]
  |  Branch (2479:41): [True: 665, False: 6]
  ------------------
 2480|       |    /* if not doing HTTP 1.0 or version 2, or disabled explicitly, we add an
 2481|       |       Expect: 100-continue to the headers which actually speeds up post
 2482|       |       operations (as there is one packet coming back from the web server) */
 2483|    665|    curl_off_t client_len = Curl_creader_client_length(data);
 2484|    665|    if(client_len > EXPECT_100_THRESHOLD || client_len < 0) {
  ------------------
  |  |  151|  1.33k|#define EXPECT_100_THRESHOLD (1024 * 1024)
  ------------------
  |  Branch (2484:8): [True: 1, False: 664]
  |  Branch (2484:45): [True: 90, False: 574]
  ------------------
 2485|     91|      result = curlx_dyn_addn(r, STRCONST("Expect: 100-continue\r\n"));
  ------------------
  |  | 1297|     91|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|     91|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 2486|     91|      if(result)
  ------------------
  |  Branch (2486:10): [True: 0, False: 91]
  ------------------
 2487|      0|        return result;
 2488|     91|      *announced_exp100 = TRUE;
  ------------------
  |  | 1045|     91|#define TRUE true
  ------------------
 2489|     91|    }
 2490|    665|  }
 2491|    700|  return CURLE_OK;
 2492|    700|}
http.c:http_exp100_add_reader:
 1576|     98|{
 1577|     98|  struct Curl_creader *reader = NULL;
 1578|     98|  CURLcode result;
 1579|       |
 1580|     98|  result = Curl_creader_create(&reader, data, &cr_exp100, CURL_CR_PROTOCOL);
 1581|     98|  if(!result)
  ------------------
  |  Branch (1581:6): [True: 98, False: 0]
  ------------------
 1582|     98|    result = Curl_creader_add(data, reader);
 1583|     98|  if(!result) {
  ------------------
  |  Branch (1583:6): [True: 98, False: 0]
  ------------------
 1584|     98|    struct cr_exp100_ctx *ctx = reader->ctx;
 1585|     98|    ctx->state = EXP100_SENDING_REQUEST;
 1586|     98|  }
 1587|       |
 1588|     98|  if(result && reader)
  ------------------
  |  Branch (1588:6): [True: 0, False: 98]
  |  Branch (1588:16): [True: 0, False: 0]
  ------------------
 1589|      0|    Curl_creader_free(data, reader);
 1590|     98|  return result;
 1591|     98|}
http.c:http_add_connection_hd:
 2821|  3.59k|{
 2822|  3.59k|  struct curl_slist *head;
 2823|  3.59k|  const char *sep = "Connection: ";
 2824|  3.59k|  CURLcode result = CURLE_OK;
 2825|  3.59k|  size_t rlen = curlx_dyn_len(req);
 2826|  3.59k|  bool skip;
 2827|       |
 2828|       |  /* Add the 1st custom "Connection: " header, if there is one */
 2829|  4.55k|  for(head = data->set.headers; head; head = head->next) {
  ------------------
  |  Branch (2829:33): [True: 956, False: 3.59k]
  ------------------
 2830|    956|    if(curl_strnequal(head->data, "Connection", 10) &&
  ------------------
  |  Branch (2830:8): [True: 2, False: 954]
  ------------------
 2831|      2|       Curl_headersep(head->data[10]) &&
  ------------------
  |  |   26|    958|#define Curl_headersep(x) ((((x) == ':') || ((x) == ';')))
  |  |  ------------------
  |  |  |  Branch (26:29): [True: 2, False: 0]
  |  |  |  Branch (26:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2832|      2|       !http_header_is_empty(head->data)) {
  ------------------
  |  Branch (2832:8): [True: 2, False: 0]
  ------------------
 2833|      2|      char *value;
 2834|      2|      result = copy_custom_value(head->data, &value);
 2835|      2|      if(result)
  ------------------
  |  Branch (2835:10): [True: 0, False: 2]
  ------------------
 2836|      0|        return result;
 2837|      2|      result = curlx_dyn_addf(req, "%s%s", sep, value);
 2838|      2|      sep = ", ";
 2839|      2|      curlx_free(value);
  ------------------
  |  | 1476|      2|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2840|      2|      break; /* leave, having added 1st one */
 2841|      2|    }
 2842|    956|  }
 2843|       |
 2844|       |  /* add our internal Connection: header values, if we have any */
 2845|  3.59k|  if(!result && data->state.http_hd_te) {
  ------------------
  |  Branch (2845:6): [True: 3.59k, False: 0]
  |  Branch (2845:17): [True: 9, False: 3.58k]
  ------------------
 2846|      9|    result = curlx_dyn_addf(req, "%s%s", sep, "TE");
 2847|      9|    sep = ", ";
 2848|      9|  }
 2849|  3.59k|  if(!result && data->state.http_hd_upgrade) {
  ------------------
  |  Branch (2849:6): [True: 3.59k, False: 0]
  |  Branch (2849:17): [True: 0, False: 3.59k]
  ------------------
 2850|      0|    result = curlx_dyn_addf(req, "%s%s", sep, "Upgrade");
 2851|      0|    sep = ", ";
 2852|      0|  }
 2853|  3.59k|  if(!result && data->state.http_hd_h2_settings) {
  ------------------
  |  Branch (2853:6): [True: 3.59k, False: 0]
  |  Branch (2853:17): [True: 0, False: 3.59k]
  ------------------
 2854|      0|    result = curlx_dyn_addf(req, "%s%s", sep, "HTTP2-Settings");
 2855|      0|  }
 2856|  3.59k|  if(!result && (rlen < curlx_dyn_len(req)))
  ------------------
  |  Branch (2856:6): [True: 3.59k, False: 0]
  |  Branch (2856:17): [True: 11, False: 3.58k]
  ------------------
 2857|     11|    result = curlx_dyn_addn(req, STRCONST("\r\n"));
  ------------------
  |  | 1297|     11|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|     11|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 2858|  3.59k|  if(result)
  ------------------
  |  Branch (2858:6): [True: 0, False: 3.59k]
  ------------------
 2859|      0|    return result;
 2860|       |
 2861|       |  /* Add all user-defined Connection: headers after the first */
 2862|  3.59k|  skip = TRUE;
  ------------------
  |  | 1045|  3.59k|#define TRUE true
  ------------------
 2863|  4.56k|  for(head = data->set.headers; head; head = head->next) {
  ------------------
  |  Branch (2863:33): [True: 967, False: 3.59k]
  ------------------
 2864|    967|    if(curl_strnequal(head->data, "Connection", 10) &&
  ------------------
  |  Branch (2864:8): [True: 2, False: 965]
  ------------------
 2865|      2|       Curl_headersep(head->data[10]) &&
  ------------------
  |  |   26|    969|#define Curl_headersep(x) ((((x) == ':') || ((x) == ';')))
  |  |  ------------------
  |  |  |  Branch (26:29): [True: 2, False: 0]
  |  |  |  Branch (26:45): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2866|      2|       !http_header_is_empty(head->data)) {
  ------------------
  |  Branch (2866:8): [True: 2, False: 0]
  ------------------
 2867|      2|      if(skip) {
  ------------------
  |  Branch (2867:10): [True: 2, False: 0]
  ------------------
 2868|      2|        skip = FALSE;
  ------------------
  |  | 1048|      2|#define FALSE false
  ------------------
 2869|      2|        continue;
 2870|      2|      }
 2871|      0|      result = curlx_dyn_addf(req, "%s\r\n", head->data);
 2872|      0|      if(result)
  ------------------
  |  Branch (2872:10): [True: 0, False: 0]
  ------------------
 2873|      0|        return result;
 2874|      0|    }
 2875|    967|  }
 2876|       |
 2877|  3.59k|  return CURLE_OK;
 2878|  3.59k|}
http.c:http_header_is_empty:
  184|      4|{
  185|      4|  struct Curl_str out;
  186|       |
  187|      4|  if(header_has_value(&header, &out)) {
  ------------------
  |  Branch (187:6): [True: 4, False: 0]
  ------------------
  188|      4|    return curlx_strlen(&out) == 0;
  ------------------
  |  |   50|      4|#define curlx_strlen(x) ((x)->len)
  ------------------
  189|      4|  }
  190|      0|  return TRUE; /* invalid header format, treat as empty */
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  191|      4|}
http.c:http_rw_hd:
 4268|    185|{
 4269|    185|  CURLcode result = CURLE_OK;
 4270|    185|  struct SingleRequest *k = &data->req;
 4271|    185|  int writetype;
 4272|    185|  DEBUGASSERT(!hd[hdlen]); /* null-terminated */
  ------------------
  |  | 1075|    185|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4272:3): [True: 0, False: 185]
  |  Branch (4272:3): [True: 185, False: 0]
  ------------------
 4273|       |
 4274|    185|  *pconsumed = 0;
 4275|    185|  if((0x0a == *hd) || (0x0d == *hd)) {
  ------------------
  |  Branch (4275:6): [True: 0, False: 185]
  |  Branch (4275:23): [True: 41, False: 144]
  ------------------
 4276|       |    /* Empty header line means end of headers! */
 4277|     41|    struct dynbuf last_header;
 4278|     41|    size_t consumed;
 4279|       |
 4280|     41|    curlx_dyn_init(&last_header, hdlen + 1);
 4281|     41|    result = curlx_dyn_addn(&last_header, hd, hdlen);
 4282|     41|    if(result)
  ------------------
  |  Branch (4282:8): [True: 0, False: 41]
  ------------------
 4283|      0|      return result;
 4284|       |
 4285|       |    /* analyze the response to find out what to do. */
 4286|       |    /* Caveat: we clear anything in the header brigade, because a
 4287|       |     * response might switch HTTP version which may call use recursively.
 4288|       |     * Not nice, but that is currently the way of things. */
 4289|     41|    curlx_dyn_reset(&data->state.headerb);
 4290|     41|    result = http_on_response(data, curlx_dyn_ptr(&last_header),
 4291|     41|                              curlx_dyn_len(&last_header),
 4292|     41|                              buf_remain, blen, &consumed);
 4293|     41|    *pconsumed += consumed;
 4294|     41|    curlx_dyn_free(&last_header);
 4295|     41|    return result;
 4296|     41|  }
 4297|       |
 4298|       |  /*
 4299|       |   * Checks for special headers coming up.
 4300|       |   */
 4301|       |
 4302|    144|  writetype = CLIENTWRITE_HEADER;
  ------------------
  |  |   45|    144|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
 4303|    144|  if(!k->headerline++) {
  ------------------
  |  Branch (4303:6): [True: 49, False: 95]
  ------------------
 4304|       |    /* This is the first header, it MUST be the error code line
 4305|       |       or else we consider this to be the body right away! */
 4306|     49|    bool fine_statusline = FALSE;
  ------------------
  |  | 1048|     49|#define FALSE false
  ------------------
 4307|       |
 4308|     49|    k->httpversion = 0; /* Do not know yet */
 4309|     49|    if(data->conn->scheme->protocol & PROTO_FAMILY_HTTP) {
  ------------------
  |  |   84|     49|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1088|     49|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1089|     49|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|     49|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|     49|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|     49|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
  |  Branch (4309:8): [True: 49, False: 0]
  ------------------
 4310|       |      /*
 4311|       |       * https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2
 4312|       |       *
 4313|       |       * The response code is always a three-digit number in HTTP as the spec
 4314|       |       * says. We allow any three-digit number here, but we cannot make
 4315|       |       * guarantees on future behaviors since it is not within the protocol.
 4316|       |       */
 4317|     49|      const char *p = hd;
 4318|       |
 4319|     49|      curlx_str_passblanks(&p);
 4320|     49|      if(!strncmp(p, "HTTP/", 5)) {
  ------------------
  |  Branch (4320:10): [True: 49, False: 0]
  ------------------
 4321|     49|        p += 5;
 4322|     49|        switch(*p) {
 4323|     48|        case '1':
  ------------------
  |  Branch (4323:9): [True: 48, False: 1]
  ------------------
 4324|     48|          p++;
 4325|     48|          if((p[0] == '.') && (p[1] == '0' || p[1] == '1')) {
  ------------------
  |  Branch (4325:14): [True: 47, False: 1]
  |  Branch (4325:32): [True: 0, False: 47]
  |  Branch (4325:47): [True: 47, False: 0]
  ------------------
 4326|     47|            if(ISBLANK(p[2])) {
  ------------------
  |  |   43|     47|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 47, False: 0]
  |  |  |  Branch (43:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4327|     47|              k->httpversion = (unsigned char)(10 + (p[1] - '0'));
 4328|     47|              p += 3;
 4329|     47|              if(ISDIGIT(p[0]) && ISDIGIT(p[1]) && ISDIGIT(p[2])) {
  ------------------
  |  |   42|     94|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 47, False: 0]
  |  |  |  Branch (42:38): [True: 47, False: 0]
  |  |  ------------------
  ------------------
                            if(ISDIGIT(p[0]) && ISDIGIT(p[1]) && ISDIGIT(p[2])) {
  ------------------
  |  |   42|     94|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 47, False: 0]
  |  |  |  Branch (42:38): [True: 47, False: 0]
  |  |  ------------------
  ------------------
                            if(ISDIGIT(p[0]) && ISDIGIT(p[1]) && ISDIGIT(p[2])) {
  ------------------
  |  |   42|     47|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 47, False: 0]
  |  |  |  Branch (42:38): [True: 47, False: 0]
  |  |  ------------------
  ------------------
 4330|     47|                k->httpcode = ((p[0] - '0') * 100) + ((p[1] - '0') * 10) +
 4331|     47|                  (p[2] - '0');
 4332|       |                /* RFC 9112 requires a single space following the status code,
 4333|       |                   but the browsers do not so let's not insist */
 4334|     47|                fine_statusline = TRUE;
  ------------------
  |  | 1045|     47|#define TRUE true
  ------------------
 4335|     47|              }
 4336|     47|            }
 4337|     47|          }
 4338|     48|          if(!fine_statusline) {
  ------------------
  |  Branch (4338:14): [True: 1, False: 47]
  ------------------
 4339|      1|            failf(data, "Unsupported HTTP/1 subversion in response");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 4340|      1|            return CURLE_UNSUPPORTED_PROTOCOL;
 4341|      1|          }
 4342|     47|          break;
 4343|     47|        case '2':
  ------------------
  |  Branch (4343:9): [True: 1, False: 48]
  ------------------
 4344|      1|        case '3':
  ------------------
  |  Branch (4344:9): [True: 0, False: 49]
  ------------------
 4345|      1|          if(!ISBLANK(p[1]))
  ------------------
  |  |   43|      1|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 1, False: 0]
  |  |  |  Branch (43:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4346|      0|            break;
 4347|      1|          k->httpversion = (unsigned char)((*p - '0') * 10);
 4348|      1|          p += 2;
 4349|      1|          if(ISDIGIT(p[0]) && ISDIGIT(p[1]) && ISDIGIT(p[2])) {
  ------------------
  |  |   42|      2|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 1, False: 0]
  |  |  |  Branch (42:38): [True: 1, False: 0]
  |  |  ------------------
  ------------------
                        if(ISDIGIT(p[0]) && ISDIGIT(p[1]) && ISDIGIT(p[2])) {
  ------------------
  |  |   42|      2|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 1, False: 0]
  |  |  |  Branch (42:38): [True: 1, False: 0]
  |  |  ------------------
  ------------------
                        if(ISDIGIT(p[0]) && ISDIGIT(p[1]) && ISDIGIT(p[2])) {
  ------------------
  |  |   42|      1|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 1, False: 0]
  |  |  |  Branch (42:38): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 4350|      1|            k->httpcode = ((p[0] - '0') * 100) + ((p[1] - '0') * 10) +
 4351|      1|              (p[2] - '0');
 4352|      1|            p += 3;
 4353|      1|            if(!ISBLANK(*p))
  ------------------
  |  |   43|      1|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 1, False: 0]
  |  |  |  Branch (43:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4354|      0|              break;
 4355|      1|            fine_statusline = TRUE;
  ------------------
  |  | 1045|      1|#define TRUE true
  ------------------
 4356|      1|          }
 4357|      1|          break;
 4358|      1|        default: /* unsupported */
  ------------------
  |  Branch (4358:9): [True: 0, False: 49]
  ------------------
 4359|      0|          failf(data, "Unsupported HTTP version in response");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4360|      0|          return CURLE_UNSUPPORTED_PROTOCOL;
 4361|     49|        }
 4362|     49|      }
 4363|       |
 4364|     48|      if(!fine_statusline) {
  ------------------
  |  Branch (4364:10): [True: 0, False: 48]
  ------------------
 4365|       |        /* If user has set option HTTP200ALIASES,
 4366|       |           compare header line against list of aliases */
 4367|      0|        statusline check = checkhttpprefix(data, hd, hdlen);
 4368|      0|        if(check == STATUS_DONE) {
  ------------------
  |  Branch (4368:12): [True: 0, False: 0]
  ------------------
 4369|      0|          fine_statusline = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 4370|      0|          k->httpcode = 200;
 4371|      0|          k->httpversion = 10;
 4372|      0|        }
 4373|      0|      }
 4374|     48|    }
 4375|      0|    else if(data->conn->scheme->protocol & CURLPROTO_RTSP) {
  ------------------
  |  | 1106|      0|#define CURLPROTO_RTSP    (1L << 18)
  ------------------
  |  Branch (4375:13): [True: 0, False: 0]
  ------------------
 4376|      0|      const char *p = hd;
 4377|      0|      struct Curl_str ver;
 4378|      0|      curl_off_t status;
 4379|       |      /* we set the max string a little excessive to forgive some leading
 4380|       |         spaces */
 4381|      0|      if(!curlx_str_until(&p, &ver, 32, ' ') &&
  ------------------
  |  Branch (4381:10): [True: 0, False: 0]
  ------------------
 4382|      0|         !curlx_str_single(&p, ' ') &&
  ------------------
  |  Branch (4382:10): [True: 0, False: 0]
  ------------------
 4383|      0|         !curlx_str_number(&p, &status, 999)) {
  ------------------
  |  Branch (4383:10): [True: 0, False: 0]
  ------------------
 4384|      0|        curlx_str_trimblanks(&ver);
 4385|      0|        if(curlx_str_cmp(&ver, "RTSP/1.0")) {
  ------------------
  |  Branch (4385:12): [True: 0, False: 0]
  ------------------
 4386|      0|          k->httpcode = (int)status;
 4387|      0|          fine_statusline = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 4388|      0|          k->httpversion = 11; /* RTSP acts like HTTP 1.1 */
 4389|      0|        }
 4390|      0|      }
 4391|      0|      if(!fine_statusline)
  ------------------
  |  Branch (4391:10): [True: 0, False: 0]
  ------------------
 4392|      0|        return CURLE_WEIRD_SERVER_REPLY;
 4393|      0|    }
 4394|       |
 4395|     48|    if(fine_statusline) {
  ------------------
  |  Branch (4395:8): [True: 48, False: 0]
  ------------------
 4396|     48|      result = http_statusline(data, data->conn);
 4397|     48|      if(result)
  ------------------
  |  Branch (4397:10): [True: 0, False: 48]
  ------------------
 4398|      0|        return result;
 4399|     48|      writetype |= CLIENTWRITE_STATUS;
  ------------------
  |  |   46|     48|#define CLIENTWRITE_STATUS  (1 << 3) /* a special status HEADER */
  ------------------
 4400|     48|    }
 4401|      0|    else {
 4402|      0|      k->header = FALSE;   /* this is not a header line */
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 4403|      0|      return CURLE_WEIRD_SERVER_REPLY;
 4404|      0|    }
 4405|     48|  }
 4406|       |
 4407|    143|  result = Curl_verify_header(data, hd, hdlen);
 4408|    143|  if(result)
  ------------------
  |  Branch (4408:6): [True: 3, False: 140]
  ------------------
 4409|      3|    return result;
 4410|       |
 4411|    140|  result = http_header(data, hd, hdlen);
 4412|    140|  if(result)
  ------------------
  |  Branch (4412:6): [True: 3, False: 137]
  ------------------
 4413|      3|    return result;
 4414|       |
 4415|       |  /*
 4416|       |   * Taken in one (more) header. Write it to the client.
 4417|       |   */
 4418|    137|  Curl_debug(data, CURLINFO_HEADER_IN, hd, hdlen);
 4419|       |
 4420|    137|  if(k->httpcode / 100 == 1)
  ------------------
  |  Branch (4420:6): [True: 4, False: 133]
  ------------------
 4421|      4|    writetype |= CLIENTWRITE_1XX;
  ------------------
  |  |   48|      4|#define CLIENTWRITE_1XX     (1 << 5) /* a 1xx response related HEADER */
  ------------------
 4422|    137|  result = Curl_client_write(data, writetype, hd, hdlen);
 4423|    137|  if(result)
  ------------------
  |  Branch (4423:6): [True: 0, False: 137]
  ------------------
 4424|      0|    return result;
 4425|       |
 4426|    137|  result = Curl_bump_headersize(data, hdlen, FALSE);
  ------------------
  |  | 1048|    137|#define FALSE false
  ------------------
 4427|    137|  if(result)
  ------------------
  |  Branch (4427:6): [True: 0, False: 137]
  ------------------
 4428|      0|    return result;
 4429|       |
 4430|    137|  return CURLE_OK;
 4431|    137|}
http.c:http_on_response:
 4143|     41|{
 4144|     41|  struct connectdata *conn = data->conn;
 4145|     41|  CURLcode result = CURLE_OK;
 4146|     41|  struct SingleRequest *k = &data->req;
 4147|     41|  bool conn_changed = FALSE;
  ------------------
  |  | 1048|     41|#define FALSE false
  ------------------
 4148|       |
 4149|     41|  (void)buf; /* not used without HTTP2 enabled */
 4150|     41|  *pconsumed = 0;
 4151|       |
 4152|     41|  if(k->upgr101 == UPGR101_RECEIVED) {
  ------------------
  |  Branch (4152:6): [True: 0, False: 41]
  ------------------
 4153|       |    /* supposedly upgraded to http2 now */
 4154|      0|    if(data->req.httpversion != 20)
  ------------------
  |  Branch (4154:8): [True: 0, False: 0]
  ------------------
 4155|      0|      infof(data, "Lying server, not serving HTTP/2");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4156|      0|  }
 4157|       |
 4158|     41|  if(k->httpcode < 200 && last_hd) {
  ------------------
  |  Branch (4158:6): [True: 4, False: 37]
  |  Branch (4158:27): [True: 4, False: 0]
  ------------------
 4159|       |    /* Intermediate responses might trigger processing of more responses,
 4160|       |     * write the last header to the client before proceeding. */
 4161|      4|    result = http_write_header(data, last_hd, last_hd_len);
 4162|      4|    last_hd = NULL; /* handled it */
 4163|      4|    if(result)
  ------------------
  |  Branch (4163:8): [True: 0, False: 4]
  ------------------
 4164|      0|      goto out;
 4165|      4|  }
 4166|       |
 4167|     41|  if(k->httpcode < 100) {
  ------------------
  |  Branch (4167:6): [True: 0, False: 41]
  ------------------
 4168|      0|    failf(data, "Unsupported response code in HTTP response");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4169|      0|    result = CURLE_UNSUPPORTED_PROTOCOL;
 4170|      0|    goto out;
 4171|      0|  }
 4172|     41|  else if(k->httpcode < 200) {
  ------------------
  |  Branch (4172:11): [True: 4, False: 37]
  ------------------
 4173|      4|    result = http_on_1xx_response(data, buf, blen, pconsumed, &conn_changed);
 4174|      4|    goto out;
 4175|      4|  }
 4176|       |
 4177|       |  /* k->httpcode >= 200, final response */
 4178|     37|  k->header = FALSE;
  ------------------
  |  | 1048|     37|#define FALSE false
  ------------------
 4179|     37|  if(conn->bits.upgrade_in_progress) {
  ------------------
  |  Branch (4179:6): [True: 0, False: 37]
  ------------------
 4180|       |    /* Asked for protocol upgrade, but it was not selected */
 4181|      0|    conn->bits.upgrade_in_progress = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 4182|      0|    conn_changed = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 4183|      0|  }
 4184|       |
 4185|     37|  if((k->size == -1) && !k->chunk && !conn->bits.close &&
  ------------------
  |  Branch (4185:6): [True: 1, False: 36]
  |  Branch (4185:25): [True: 0, False: 1]
  |  Branch (4185:38): [True: 0, False: 0]
  ------------------
 4186|      0|     (k->httpversion == 11) &&
  ------------------
  |  Branch (4186:6): [True: 0, False: 0]
  ------------------
 4187|      0|     !(conn->scheme->protocol & CURLPROTO_RTSP) &&
  ------------------
  |  | 1106|      0|#define CURLPROTO_RTSP    (1L << 18)
  ------------------
  |  Branch (4187:6): [True: 0, False: 0]
  ------------------
 4188|      0|     data->state.httpreq != HTTPREQ_HEAD) {
  ------------------
  |  Branch (4188:6): [True: 0, False: 0]
  ------------------
 4189|       |    /* On HTTP 1.1, when connection is not to get closed, but no
 4190|       |       Content-Length nor Transfer-Encoding chunked have been received,
 4191|       |       according to RFC2616 section 4.4 point 5, we assume that the server
 4192|       |       will close the connection to signal the end of the document. */
 4193|      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))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4194|      0|    streamclose(conn);
  ------------------
  |  |   89|      0|#define streamclose(x) Curl_conncontrol((x), CONNCTRL_STREAM_CLOSE)
  |  |  ------------------
  |  |  |  |   85|      0|#define CONNCTRL_STREAM_CLOSE    2
  |  |  ------------------
  ------------------
 4195|      0|  }
 4196|       |
 4197|     37|  http_check_auth_closure(data, conn);
 4198|       |
 4199|     37|#ifndef CURL_DISABLE_WEBSOCKETS
 4200|       |  /* All >=200 HTTP status codes are errors when wanting ws */
 4201|     37|  if(data->req.upgr101 == UPGR101_WS) {
  ------------------
  |  Branch (4201:6): [True: 0, False: 37]
  ------------------
 4202|      0|    failf(data, "Refused WebSocket upgrade: %d", k->httpcode);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4203|      0|    result = CURLE_HTTP_RETURNED_ERROR;
 4204|      0|    goto out;
 4205|      0|  }
 4206|     37|#endif
 4207|       |
 4208|       |  /* Check if this response means the transfer errored. */
 4209|     37|  if(http_should_fail(data, data->req.httpcode)) {
  ------------------
  |  Branch (4209:6): [True: 0, False: 37]
  ------------------
 4210|      0|    failf(data, "The requested URL returned error: %d",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4211|      0|          k->httpcode);
 4212|      0|    result = CURLE_HTTP_RETURNED_ERROR;
 4213|      0|    goto out;
 4214|      0|  }
 4215|       |
 4216|       |  /* Curl_http_auth_act() checks what authentication methods that are
 4217|       |   * available and decides which one (if any) to use. It will set 'newurl' if
 4218|       |   * an auth method was picked. */
 4219|     37|  result = Curl_http_auth_act(data);
 4220|     37|  if(result)
  ------------------
  |  Branch (4220:6): [True: 0, False: 37]
  ------------------
 4221|      0|    goto out;
 4222|       |
 4223|     37|  if(k->httpcode >= 300) {
  ------------------
  |  Branch (4223:6): [True: 16, False: 21]
  ------------------
 4224|     16|    result = http_handle_send_error(data);
 4225|     16|    if(result)
  ------------------
  |  Branch (4225:8): [True: 0, False: 16]
  ------------------
 4226|      0|      goto out;
 4227|     16|  }
 4228|       |
 4229|       |  /* final response without error, prepare to receive the body */
 4230|     37|  result = http_firstwrite(data);
 4231|     37|  if(result)
  ------------------
  |  Branch (4231:6): [True: 0, False: 37]
  ------------------
 4232|      0|    goto out;
 4233|       |
 4234|       |  /* This is the last response that we get for the current request. Check on
 4235|       |   * the body size and determine if the response is complete. */
 4236|     37|  result = http_size(data);
 4237|     37|  if(result)
  ------------------
  |  Branch (4237:6): [True: 0, False: 37]
  ------------------
 4238|      0|    goto out;
 4239|       |
 4240|       |  /* If we requested a "no body", this is a good time to get
 4241|       |   * out and return home.
 4242|       |   */
 4243|     37|  if(data->req.no_body)
  ------------------
  |  Branch (4243:6): [True: 1, False: 36]
  ------------------
 4244|      1|    k->download_done = TRUE;
  ------------------
  |  | 1045|      1|#define TRUE true
  ------------------
 4245|       |
 4246|       |  /* If max download size is *zero* (nothing) we already have nothing and can
 4247|       |     safely return ok now! For HTTP/2, we would like to call
 4248|       |     http2_handle_stream_close to properly close a stream. In order to do
 4249|       |     this, we keep reading until we close the stream. */
 4250|     37|  if((k->maxdownload == 0) && (k->httpversion_sent < 20))
  ------------------
  |  Branch (4250:6): [True: 31, False: 6]
  |  Branch (4250:31): [True: 31, False: 0]
  ------------------
 4251|     31|    k->download_done = TRUE;
  ------------------
  |  | 1045|     31|#define TRUE true
  ------------------
 4252|       |
 4253|     41|out:
 4254|     41|  if(last_hd)
  ------------------
  |  Branch (4254:6): [True: 37, False: 4]
  ------------------
 4255|       |    /* if not written yet, write it now */
 4256|     37|    result = Curl_1st_fatal(result,
 4257|     37|                            http_write_header(data, last_hd, last_hd_len));
 4258|     41|  if(conn_changed)
  ------------------
  |  Branch (4258:6): [True: 0, False: 41]
  ------------------
 4259|       |    /* poke the multi handle to allow pending pipewait to retry */
 4260|      0|    Curl_multi_connchanged(data->multi);
 4261|     41|  return result;
 4262|     37|}
http.c:http_on_1xx_response:
 3990|      4|{
 3991|      4|  struct SingleRequest *k = &data->req;
 3992|       |
 3993|       |  /* "A user agent MAY ignore unexpected 1xx status responses."
 3994|       |   * By default, we expect to get more responses after this one. */
 3995|      4|  k->header = TRUE;
  ------------------
  |  | 1045|      4|#define TRUE true
  ------------------
 3996|      4|  k->headerline = 0; /* restart the header line counter */
 3997|       |
 3998|      4|  switch(k->httpcode) {
 3999|      4|  case 100:
  ------------------
  |  Branch (3999:3): [True: 4, False: 0]
  ------------------
 4000|       |    /* We have made an HTTP PUT or POST and this is 1.1-lingo that tells us
 4001|       |     * that the server is OK with this and ready to receive the data. */
 4002|      4|    http_exp100_got100(data);
 4003|      4|    break;
 4004|      0|  case 101:
  ------------------
  |  Branch (4004:3): [True: 0, False: 4]
  ------------------
 4005|      0|    return http_on_101_upgrade(data, buf, blen, pconsumed, conn_changed);
 4006|      0|  default:
  ------------------
  |  Branch (4006:3): [True: 0, False: 4]
  ------------------
 4007|       |    /* The server may send us other 1xx responses, like informative 103. This
 4008|       |     * has no influence on request processing and we expect to receive a
 4009|       |     * final response eventually. */
 4010|      0|    break;
 4011|      4|  }
 4012|      4|  return CURLE_OK;
 4013|      4|}
http.c:http_exp100_got100:
 1594|      4|{
 1595|      4|  struct Curl_creader *r = Curl_creader_get_by_type(data, &cr_exp100);
 1596|      4|  if(r)
  ------------------
  |  Branch (1596:6): [True: 1, False: 3]
  ------------------
 1597|      1|    http_exp100_continue(data, r);
 1598|      4|}
http.c:http_handle_send_error:
 4064|     16|{
 4065|     16|  struct connectdata *conn = data->conn;
 4066|     16|  struct SingleRequest *k = &data->req;
 4067|     16|  CURLcode result = CURLE_OK;
 4068|       |
 4069|     16|  if(!data->req.authneg && !conn->bits.close &&
  ------------------
  |  Branch (4069:6): [True: 16, False: 0]
  |  Branch (4069:28): [True: 4, False: 12]
  ------------------
 4070|      4|     !Curl_creader_will_rewind(data)) {
  ------------------
  |  Branch (4070:6): [True: 4, False: 0]
  ------------------
 4071|       |    /*
 4072|       |     * General treatment of errors when about to send data.
 4073|       |     * Including: "417 Expectation Failed", while waiting for
 4074|       |     * 100-continue.
 4075|       |     *
 4076|       |     * The check for close above is done because if something
 4077|       |     * else has already deemed the connection to get closed then
 4078|       |     * something else should have considered the big picture and
 4079|       |     * we avoid this check.
 4080|       |     */
 4081|       |
 4082|      4|    switch(data->state.httpreq) {
 4083|      1|    case HTTPREQ_PUT:
  ------------------
  |  Branch (4083:5): [True: 1, False: 3]
  ------------------
 4084|      1|    case HTTPREQ_POST:
  ------------------
  |  Branch (4084:5): [True: 0, False: 4]
  ------------------
 4085|      1|    case HTTPREQ_POST_FORM:
  ------------------
  |  Branch (4085:5): [True: 0, False: 4]
  ------------------
 4086|      3|    case HTTPREQ_POST_MIME:
  ------------------
  |  Branch (4086:5): [True: 2, False: 2]
  ------------------
 4087|       |      /* We got an error response. If this happened before the
 4088|       |       * whole request body has been sent we stop sending and
 4089|       |       * mark the connection for closure after we have read the
 4090|       |       * entire response. */
 4091|      3|      if(!Curl_req_done_sending(data)) {
  ------------------
  |  Branch (4091:10): [True: 0, False: 3]
  ------------------
 4092|      0|        if((k->httpcode == 417) && http_exp100_is_selected(data)) {
  ------------------
  |  Branch (4092:12): [True: 0, False: 0]
  |  Branch (4092:36): [True: 0, False: 0]
  ------------------
 4093|       |          /* 417 Expectation Failed - try again without the
 4094|       |             Expect header */
 4095|      0|          if(!k->writebytecount && http_exp100_is_waiting(data)) {
  ------------------
  |  Branch (4095:14): [True: 0, False: 0]
  |  Branch (4095:36): [True: 0, False: 0]
  ------------------
 4096|      0|            infof(data, "Got HTTP failure 417 while waiting for a 100");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4097|      0|          }
 4098|      0|          else {
 4099|      0|            infof(data, "Got HTTP failure 417 while sending data");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4100|      0|            streamclose(conn);
  ------------------
  |  |   89|      0|#define streamclose(x) Curl_conncontrol((x), CONNCTRL_STREAM_CLOSE)
  |  |  ------------------
  |  |  |  |   85|      0|#define CONNCTRL_STREAM_CLOSE    2
  |  |  ------------------
  ------------------
 4101|      0|            result = http_perhapsrewind(data, conn);
 4102|      0|            if(result)
  ------------------
  |  Branch (4102:16): [True: 0, False: 0]
  ------------------
 4103|      0|              return result;
 4104|      0|          }
 4105|      0|          data->state.disableexpect = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 4106|      0|          Curl_req_abort_sending(data);
 4107|      0|          DEBUGASSERT(!data->req.newurl);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4107:11): [True: 0, False: 0]
  |  Branch (4107:11): [True: 0, False: 0]
  ------------------
 4108|      0|          data->req.newurl = Curl_bufref_dup(&data->state.url);
  ------------------
  |  |   49|      0|#define Curl_bufref_dup(x) curlx_strdup(Curl_bufref_ptr(x))
  |  |  ------------------
  |  |  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
 4109|      0|          if(!data->req.newurl)
  ------------------
  |  Branch (4109:14): [True: 0, False: 0]
  ------------------
 4110|      0|            return CURLE_OUT_OF_MEMORY;
 4111|      0|        }
 4112|      0|        else if(data->set.http_keep_sending_on_error) {
  ------------------
  |  Branch (4112:17): [True: 0, False: 0]
  ------------------
 4113|      0|          infof(data, "HTTP error before end of send, keep sending");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4114|      0|          http_exp100_send_anyway(data);
 4115|      0|        }
 4116|      0|        else {
 4117|      0|          infof(data, "HTTP error before end of send, stop sending");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4118|      0|          streamclose(conn);
  ------------------
  |  |   89|      0|#define streamclose(x) Curl_conncontrol((x), CONNCTRL_STREAM_CLOSE)
  |  |  ------------------
  |  |  |  |   85|      0|#define CONNCTRL_STREAM_CLOSE    2
  |  |  ------------------
  ------------------
 4119|      0|          result = Curl_req_abort_sending(data);
 4120|      0|          if(result)
  ------------------
  |  Branch (4120:14): [True: 0, False: 0]
  ------------------
 4121|      0|            return result;
 4122|      0|        }
 4123|      0|      }
 4124|      3|      break;
 4125|       |
 4126|      3|    default: /* default label present to avoid compiler warnings */
  ------------------
  |  Branch (4126:5): [True: 1, False: 3]
  ------------------
 4127|      1|      break;
 4128|      4|    }
 4129|      4|  }
 4130|       |
 4131|     16|  if(Curl_creader_will_rewind(data) && !Curl_req_done_sending(data)) {
  ------------------
  |  Branch (4131:6): [True: 1, False: 15]
  |  Branch (4131:40): [True: 0, False: 1]
  ------------------
 4132|       |    /* We rewind before next send, continue sending now */
 4133|      0|    infof(data, "Keep sending data to get tossed away");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4134|      0|    CURL_REQ_SET_SEND(data);
  ------------------
  |  |   44|      0|#define CURL_REQ_SET_SEND(d)   ((d)->req.io_flags |= REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|      0|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  ------------------
 4135|      0|  }
 4136|     16|  return result;
 4137|     16|}
http.c:http_firstwrite:
 2709|     37|{
 2710|     37|  struct connectdata *conn = data->conn;
 2711|     37|  struct SingleRequest *k = &data->req;
 2712|       |
 2713|     37|  if(data->req.newurl) {
  ------------------
  |  Branch (2713:6): [True: 1, False: 36]
  ------------------
 2714|      1|    if(conn->bits.close) {
  ------------------
  |  Branch (2714:8): [True: 1, False: 0]
  ------------------
 2715|       |      /* Abort after the headers if "follow Location" is set
 2716|       |         and we are set to close anyway. */
 2717|      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 */
  |  |  ------------------
  ------------------
 2718|      1|      k->done = TRUE;
  ------------------
  |  | 1045|      1|#define TRUE true
  ------------------
 2719|      1|      return CURLE_OK;
 2720|      1|    }
 2721|       |    /* We have a new URL to load, but since we want to be able to reuse this
 2722|       |       connection properly, we read the full response in "ignore more" */
 2723|      0|    k->ignorebody = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2724|      0|    infof(data, "Ignoring the response-body");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2725|      0|  }
 2726|     36|  if(data->state.resume_from && !k->content_range &&
  ------------------
  |  Branch (2726:6): [True: 0, False: 36]
  |  Branch (2726:33): [True: 0, False: 0]
  ------------------
 2727|      0|     (data->state.httpreq == HTTPREQ_GET) &&
  ------------------
  |  Branch (2727:6): [True: 0, False: 0]
  ------------------
 2728|      0|     !k->ignorebody) {
  ------------------
  |  Branch (2728:6): [True: 0, False: 0]
  ------------------
 2729|       |
 2730|      0|    if(k->size == data->state.resume_from) {
  ------------------
  |  Branch (2730:8): [True: 0, False: 0]
  ------------------
 2731|       |      /* The resume point is at the end of file, consider this fine even if it
 2732|       |         does not allow resume from here. */
 2733|      0|      infof(data, "The entire document is already downloaded");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2734|      0|      streamclose(conn);
  ------------------
  |  |   89|      0|#define streamclose(x) Curl_conncontrol((x), CONNCTRL_STREAM_CLOSE)
  |  |  ------------------
  |  |  |  |   85|      0|#define CONNCTRL_STREAM_CLOSE    2
  |  |  ------------------
  ------------------
 2735|       |      /* Abort download */
 2736|      0|      CURL_REQ_CLEAR_RECV(data);
  ------------------
  |  |   49|      0|  ((d)->req.io_flags &= (uint8_t)~REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|      0|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  ------------------
 2737|      0|      k->done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2738|      0|      return CURLE_OK;
 2739|      0|    }
 2740|       |
 2741|       |    /* we wanted to resume a download, although the server does not seem to
 2742|       |     * support this and we did this with a GET (if it was not a GET we did a
 2743|       |     * POST or PUT resume) */
 2744|      0|    failf(data, "HTTP server does not seem to support "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2745|      0|          "byte ranges. Cannot resume.");
 2746|      0|    return CURLE_RANGE_ERROR;
 2747|      0|  }
 2748|       |
 2749|     36|  if(data->set.timecondition && !data->state.range) {
  ------------------
  |  Branch (2749:6): [True: 1, False: 35]
  |  Branch (2749:33): [True: 1, False: 0]
  ------------------
 2750|       |    /* A time condition has been set AND no ranges have been requested. This
 2751|       |       seems to be what chapter 13.3.4 of RFC 2616 defines to be the correct
 2752|       |       action for an HTTP/1.1 client */
 2753|       |
 2754|      1|    if(!Curl_meets_timecondition(data, k->timeofdoc)) {
  ------------------
  |  Branch (2754:8): [True: 0, False: 1]
  ------------------
 2755|      0|      k->done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2756|       |      /* We are simulating an HTTP 304 from server so we return
 2757|       |         what should have been returned from the server */
 2758|      0|      data->info.httpcode = 304;
 2759|      0|      infof(data, "Simulate an HTTP 304 response");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2760|       |      /* we abort the transfer before it is completed == we ruin the
 2761|       |         reuse ability. Close the connection */
 2762|      0|      streamclose(conn);
  ------------------
  |  |   89|      0|#define streamclose(x) Curl_conncontrol((x), CONNCTRL_STREAM_CLOSE)
  |  |  ------------------
  |  |  |  |   85|      0|#define CONNCTRL_STREAM_CLOSE    2
  |  |  ------------------
  ------------------
 2763|      0|      return CURLE_OK;
 2764|      0|    }
 2765|      1|  } /* we have a time condition */
 2766|       |
 2767|     36|  return CURLE_OK;
 2768|     36|}
http.c:http_size:
 3837|     37|{
 3838|     37|  struct SingleRequest *k = &data->req;
 3839|     37|  if(data->req.ignore_cl || k->chunk) {
  ------------------
  |  Branch (3839:6): [True: 0, False: 37]
  |  Branch (3839:29): [True: 1, False: 36]
  ------------------
 3840|      1|    k->size = k->maxdownload = -1;
 3841|      1|  }
 3842|     36|  else if(k->size != -1) {
  ------------------
  |  Branch (3842:11): [True: 36, False: 0]
  ------------------
 3843|     36|    if(data->set.max_filesize &&
  ------------------
  |  Branch (3843:8): [True: 2, False: 34]
  ------------------
 3844|      2|       !k->ignorebody &&
  ------------------
  |  Branch (3844:8): [True: 2, False: 0]
  ------------------
 3845|      2|       (k->size > data->set.max_filesize)) {
  ------------------
  |  Branch (3845:8): [True: 0, False: 2]
  ------------------
 3846|      0|      failf(data, "Maximum file size exceeded");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3847|      0|      return CURLE_FILESIZE_EXCEEDED;
 3848|      0|    }
 3849|     36|    if(k->ignorebody)
  ------------------
  |  Branch (3849:8): [True: 0, False: 36]
  ------------------
 3850|      0|      infof(data, "setting size while ignoring");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3851|     36|    Curl_pgrsSetDownloadSize(data, k->size);
 3852|     36|    k->maxdownload = k->size;
 3853|     36|  }
 3854|     37|  return CURLE_OK;
 3855|     37|}
http.c:checkhttpprefix:
 3169|    619|{
 3170|    619|  struct curl_slist *head = data->set.http200aliases;
 3171|    619|  statusline rc = STATUS_BAD;
 3172|    619|  statusline onmatch = len >= 5 ? STATUS_DONE : STATUS_UNKNOWN;
  ------------------
  |  Branch (3172:24): [True: 317, False: 302]
  ------------------
 3173|       |
 3174|    619|  while(head) {
  ------------------
  |  Branch (3174:9): [True: 0, False: 619]
  ------------------
 3175|      0|    if(checkprefixmax(head->data, s, len)) {
  ------------------
  |  Branch (3175:8): [True: 0, False: 0]
  ------------------
 3176|      0|      rc = onmatch;
 3177|      0|      break;
 3178|      0|    }
 3179|      0|    head = head->next;
 3180|      0|  }
 3181|       |
 3182|    619|  if((rc != STATUS_DONE) && checkprefixmax("HTTP/", s, len))
  ------------------
  |  Branch (3182:6): [True: 619, False: 0]
  |  Branch (3182:29): [True: 48, False: 571]
  ------------------
 3183|     48|    rc = onmatch;
 3184|       |
 3185|    619|  return rc;
 3186|    619|}
http.c:checkprefixmax:
 3157|    619|{
 3158|    619|  size_t ch = CURLMIN(strlen(prefix), len);
  ------------------
  |  | 1288|    619|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1288:24): [True: 290, False: 329]
  |  |  ------------------
  ------------------
 3159|    619|  return curl_strnequal(prefix, buffer, ch);
 3160|    619|}
http.c:http_statusline:
 3747|     48|{
 3748|     48|  struct SingleRequest *k = &data->req;
 3749|       |
 3750|     48|  switch(k->httpversion) {
 3751|      0|  case 10:
  ------------------
  |  Branch (3751:3): [True: 0, False: 48]
  ------------------
 3752|     47|  case 11:
  ------------------
  |  Branch (3752:3): [True: 47, False: 1]
  ------------------
 3753|     47|#ifdef USE_HTTP2
 3754|     48|  case 20:
  ------------------
  |  Branch (3754:3): [True: 1, False: 47]
  ------------------
 3755|     48|#endif
 3756|       |#ifdef USE_HTTP3
 3757|       |  case 30:
 3758|       |#endif
 3759|       |    /* no major version switch mid-connection */
 3760|     48|    if(k->httpversion_sent &&
  ------------------
  |  Branch (3760:8): [True: 48, False: 0]
  ------------------
 3761|     48|       (k->httpversion / 10 != k->httpversion_sent / 10)) {
  ------------------
  |  Branch (3761:8): [True: 0, False: 48]
  ------------------
 3762|      0|      failf(data, "Version mismatch (from HTTP/%d to HTTP/%d)",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3763|      0|            k->httpversion_sent / 10, k->httpversion / 10);
 3764|      0|      return CURLE_WEIRD_SERVER_REPLY;
 3765|      0|    }
 3766|     48|    break;
 3767|     48|  default:
  ------------------
  |  Branch (3767:3): [True: 0, False: 48]
  ------------------
 3768|      0|    failf(data, "Unsupported HTTP version (%d.%d) in response",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3769|      0|          k->httpversion / 10, k->httpversion % 10);
 3770|      0|    return CURLE_UNSUPPORTED_PROTOCOL;
 3771|     48|  }
 3772|       |
 3773|     48|  data->info.httpcode = k->httpcode;
 3774|     48|  data->info.httpversion = k->httpversion;
 3775|     48|  conn->httpversion_seen = k->httpversion;
 3776|       |
 3777|     48|  if(!data->state.http_neg.rcvd_min ||
  ------------------
  |  Branch (3777:6): [True: 46, False: 2]
  ------------------
 3778|      2|     data->state.http_neg.rcvd_min > k->httpversion)
  ------------------
  |  Branch (3778:6): [True: 0, False: 2]
  ------------------
 3779|       |    /* store the lowest server version we encounter */
 3780|     46|    data->state.http_neg.rcvd_min = k->httpversion;
 3781|       |
 3782|       |  /*
 3783|       |   * This code executes as part of processing the header. As a
 3784|       |   * result, it is not totally clear how to interpret the
 3785|       |   * response code yet as that depends on what other headers may
 3786|       |   * be present. 401 and 407 may be errors, but may be OK
 3787|       |   * depending on how authentication is working. Other codes
 3788|       |   * are definitely errors, so give up here.
 3789|       |   */
 3790|     48|  if(data->state.resume_from && data->state.httpreq == HTTPREQ_GET &&
  ------------------
  |  Branch (3790:6): [True: 1, False: 47]
  |  Branch (3790:33): [True: 1, False: 0]
  ------------------
 3791|      1|     k->httpcode == 416) {
  ------------------
  |  Branch (3791:6): [True: 0, False: 1]
  ------------------
 3792|       |    /* "Requested Range Not Satisfiable", proceed and pretend this is no
 3793|       |       error */
 3794|      0|    k->ignorebody = TRUE; /* Avoid appending error msg to good data. */
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 3795|      0|  }
 3796|       |
 3797|     48|  if(k->httpversion == 10) {
  ------------------
  |  Branch (3797:6): [True: 0, False: 48]
  ------------------
 3798|       |    /* Default action for HTTP/1.0 must be to close, unless
 3799|       |       we get one of those fancy headers that tell us the
 3800|       |       server keeps it open for us! */
 3801|      0|    infof(data, "HTTP 1.0, assume close after body");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3802|      0|    connclose(conn);
  ------------------
  |  |   90|      0|#define connclose(x)   Curl_conncontrol((x), CONNCTRL_CONN_CLOSE)
  |  |  ------------------
  |  |  |  |   84|      0|#define CONNCTRL_CONN_CLOSE      1
  |  |  ------------------
  ------------------
 3803|      0|  }
 3804|       |
 3805|     48|  k->http_bodyless = k->httpcode >= 100 && k->httpcode < 200;
  ------------------
  |  Branch (3805:22): [True: 48, False: 0]
  |  Branch (3805:44): [True: 4, False: 44]
  ------------------
 3806|     48|  switch(k->httpcode) {
 3807|      0|  case 304:
  ------------------
  |  Branch (3807:3): [True: 0, False: 48]
  ------------------
 3808|       |    /* (quote from RFC2616, section 10.3.5): The 304 response
 3809|       |     * MUST NOT contain a message-body, and thus is always
 3810|       |     * terminated by the first empty line after the header
 3811|       |     * fields. */
 3812|      0|    if(data->set.timecondition)
  ------------------
  |  Branch (3812:8): [True: 0, False: 0]
  ------------------
 3813|      0|      data->info.timecond = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 3814|      0|    FALLTHROUGH();
  ------------------
  |  |  815|      0|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 3815|      3|  case 204:
  ------------------
  |  Branch (3815:3): [True: 3, False: 45]
  ------------------
 3816|       |    /* (quote from RFC2616, section 10.2.5): The server has
 3817|       |     * fulfilled the request but does not need to return an
 3818|       |     * entity-body ... The 204 response MUST NOT include a
 3819|       |     * message-body, and thus is always terminated by the first
 3820|       |     * empty line after the header fields. */
 3821|      3|    k->size = 0;
 3822|      3|    k->maxdownload = 0;
 3823|      3|    k->http_bodyless = TRUE;
  ------------------
  |  | 1045|      3|#define TRUE true
  ------------------
 3824|      3|    break;
 3825|     45|  default:
  ------------------
  |  Branch (3825:3): [True: 45, False: 3]
  ------------------
 3826|     45|    break;
 3827|     48|  }
 3828|     48|  return CURLE_OK;
 3829|     48|}
http.c:http_header:
 3695|    140|{
 3696|    140|  CURLcode result = CURLE_OK;
 3697|       |
 3698|    140|  switch(hd[0]) {
  ------------------
  |  Branch (3698:10): [True: 92, False: 48]
  ------------------
 3699|      0|  case 'a':
  ------------------
  |  Branch (3699:3): [True: 0, False: 140]
  ------------------
 3700|      0|  case 'A':
  ------------------
  |  Branch (3700:3): [True: 0, False: 140]
  ------------------
 3701|      0|    result = http_header_a(data, hd, hdlen);
 3702|      0|    break;
 3703|      0|  case 'c':
  ------------------
  |  Branch (3703:3): [True: 0, False: 140]
  ------------------
 3704|     61|  case 'C':
  ------------------
  |  Branch (3704:3): [True: 61, False: 79]
  ------------------
 3705|     61|    result = http_header_c(data, hd, hdlen);
 3706|     61|    break;
 3707|      0|  case 'l':
  ------------------
  |  Branch (3707:3): [True: 0, False: 140]
  ------------------
 3708|     12|  case 'L':
  ------------------
  |  Branch (3708:3): [True: 12, False: 128]
  ------------------
 3709|     12|    result = http_header_l(data, hd, hdlen);
 3710|     12|    break;
 3711|      0|  case 'p':
  ------------------
  |  Branch (3711:3): [True: 0, False: 140]
  ------------------
 3712|      0|  case 'P':
  ------------------
  |  Branch (3712:3): [True: 0, False: 140]
  ------------------
 3713|      0|    result = http_header_p(data, hd, hdlen);
 3714|      0|    break;
 3715|      0|  case 'r':
  ------------------
  |  Branch (3715:3): [True: 0, False: 140]
  ------------------
 3716|      1|  case 'R':
  ------------------
  |  Branch (3716:3): [True: 1, False: 139]
  ------------------
 3717|      1|    result = http_header_r(data, hd, hdlen);
 3718|      1|    break;
 3719|      0|  case 's':
  ------------------
  |  Branch (3719:3): [True: 0, False: 140]
  ------------------
 3720|      9|  case 'S':
  ------------------
  |  Branch (3720:3): [True: 9, False: 131]
  ------------------
 3721|      9|    result = http_header_s(data, hd, hdlen);
 3722|      9|    break;
 3723|      0|  case 't':
  ------------------
  |  Branch (3723:3): [True: 0, False: 140]
  ------------------
 3724|      4|  case 'T':
  ------------------
  |  Branch (3724:3): [True: 4, False: 136]
  ------------------
 3725|      4|    result = http_header_t(data, hd, hdlen);
 3726|      4|    break;
 3727|      0|  case 'w':
  ------------------
  |  Branch (3727:3): [True: 0, False: 140]
  ------------------
 3728|      5|  case 'W':
  ------------------
  |  Branch (3728:3): [True: 5, False: 135]
  ------------------
 3729|      5|    result = http_header_w(data, hd, hdlen);
 3730|      5|    break;
 3731|    140|  }
 3732|       |
 3733|    140|  if(!result) {
  ------------------
  |  Branch (3733:6): [True: 137, False: 3]
  ------------------
 3734|    137|    struct connectdata *conn = data->conn;
 3735|    137|    if(conn->scheme->protocol & CURLPROTO_RTSP)
  ------------------
  |  | 1106|    137|#define CURLPROTO_RTSP    (1L << 18)
  ------------------
  |  Branch (3735:8): [True: 0, False: 137]
  ------------------
 3736|      0|      result = Curl_rtsp_parseheader(data, hd);
 3737|    137|  }
 3738|    140|  return result;
 3739|    140|}
http.c:http_header_c:
 3268|     61|{
 3269|     61|  struct connectdata *conn = data->conn;
 3270|     61|  struct SingleRequest *k = &data->req;
 3271|     61|  const char *v;
 3272|       |
 3273|       |  /* Check for Content-Length: header lines to get size. Browsers insist we
 3274|       |     should accept multiple Content-Length headers and that a comma separated
 3275|       |     list also is fine and then we should accept them all as long as they are
 3276|       |     the same value. Different values trigger error.
 3277|       |   */
 3278|     61|  v = (!k->http_bodyless && !data->set.ignorecl) ?
  ------------------
  |  Branch (3278:8): [True: 58, False: 3]
  |  Branch (3278:29): [True: 58, False: 0]
  ------------------
 3279|     61|    HD_VAL(hd, hdlen, "Content-Length:") : NULL;
  ------------------
  |  | 3221|     58|  ((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
  |  |  ------------------
  |  |  |  Branch (3221:5): [True: 58, False: 0]
  |  |  |  Branch (3221:37): [True: 58, False: 0]
  |  |  ------------------
  |  | 3222|     58|    curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
  |  |  ------------------
  |  |  |  Branch (3222:5): [True: 39, False: 19]
  |  |  ------------------
  ------------------
 3280|     61|  if(v) {
  ------------------
  |  Branch (3280:6): [True: 39, False: 22]
  ------------------
 3281|     39|    do {
 3282|     39|      curl_off_t contentlength;
 3283|     39|      int offt = curlx_str_numblanks(&v, &contentlength);
 3284|       |
 3285|     39|      if(offt == STRE_OVERFLOW) {
  ------------------
  |  |   35|     39|#define STRE_OVERFLOW 7
  ------------------
  |  Branch (3285:10): [True: 0, False: 39]
  ------------------
 3286|       |        /* out of range */
 3287|      0|        if(data->set.max_filesize) {
  ------------------
  |  Branch (3287:12): [True: 0, False: 0]
  ------------------
 3288|      0|          failf(data, "Maximum file size exceeded");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3289|      0|          return CURLE_FILESIZE_EXCEEDED;
 3290|      0|        }
 3291|      0|        streamclose(conn);
  ------------------
  |  |   89|      0|#define streamclose(x) Curl_conncontrol((x), CONNCTRL_STREAM_CLOSE)
  |  |  ------------------
  |  |  |  |   85|      0|#define CONNCTRL_STREAM_CLOSE    2
  |  |  ------------------
  ------------------
 3292|      0|        infof(data, "Overflow Content-Length: value");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3293|      0|        return CURLE_OK;
 3294|      0|      }
 3295|     39|      else {
 3296|     39|        if((offt == STRE_OK) &&
  ------------------
  |  |   28|     39|#define STRE_OK       0
  ------------------
  |  Branch (3296:12): [True: 39, False: 0]
  ------------------
 3297|     39|           ((k->size == -1) || /* not set to something before */
  ------------------
  |  Branch (3297:13): [True: 36, False: 3]
  ------------------
 3298|     36|            (k->size == contentlength))) { /* or the same value */
  ------------------
  |  Branch (3298:13): [True: 0, False: 3]
  ------------------
 3299|       |
 3300|     36|          k->size = contentlength;
 3301|     36|          curlx_str_passblanks(&v);
 3302|       |
 3303|       |          /* on a comma, loop and get the next instead */
 3304|     36|          if(!curlx_str_single(&v, ','))
  ------------------
  |  Branch (3304:14): [True: 0, False: 36]
  ------------------
 3305|      0|            continue;
 3306|       |
 3307|     36|          if(!curlx_str_newline(&v)) {
  ------------------
  |  Branch (3307:14): [True: 36, False: 0]
  ------------------
 3308|     36|            k->maxdownload = k->size;
 3309|     36|            return CURLE_OK;
 3310|     36|          }
 3311|     36|        }
 3312|       |        /* negative, different value or rubbish - bad HTTP */
 3313|      3|        failf(data, "Invalid Content-Length: value");
  ------------------
  |  |   62|      3|#define failf Curl_failf
  ------------------
 3314|      3|        return CURLE_WEIRD_SERVER_REPLY;
 3315|     39|      }
 3316|     39|    } while(1);
  ------------------
  |  Branch (3316:13): [True: 0, Folded]
  ------------------
 3317|     39|  }
 3318|     22|  v = (!k->http_bodyless && CURL_EASY_STR(data, STRING_ENCODING)) ?
  ------------------
  |  | 1228|     19|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  |  |  ------------------
  |  |  |  Branch (1228:3): [True: 4, False: 15]
  |  |  ------------------
  ------------------
  |  Branch (3318:8): [True: 19, False: 3]
  ------------------
 3319|     22|    HD_VAL(hd, hdlen, "Content-Encoding:") : NULL;
  ------------------
  |  | 3221|      4|  ((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
  |  |  ------------------
  |  |  |  Branch (3221:5): [True: 4, False: 0]
  |  |  |  Branch (3221:37): [True: 4, False: 0]
  |  |  ------------------
  |  | 3222|      4|    curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
  |  |  ------------------
  |  |  |  Branch (3222:5): [True: 3, False: 1]
  |  |  ------------------
  ------------------
 3320|     22|  if(v) {
  ------------------
  |  Branch (3320:6): [True: 3, False: 19]
  ------------------
 3321|       |    /*
 3322|       |     * Process Content-Encoding. Look for the values: identity, gzip, deflate,
 3323|       |     * compress, x-gzip and x-compress. x-gzip and x-compress are the same as
 3324|       |     * gzip and compress. (Sec 3.5 RFC 2616). zlib cannot handle compress.
 3325|       |     * Errors are handled further down when the response body is processed
 3326|       |     */
 3327|      3|    return Curl_build_unencoding_stack(data, v, FALSE);
  ------------------
  |  | 1048|      3|#define FALSE false
  ------------------
 3328|      3|  }
 3329|       |  /* check for Content-Type: header lines to get the MIME-type */
 3330|     19|  v = HD_VAL(hd, hdlen, "Content-Type:");
  ------------------
  |  | 3221|     19|  ((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
  |  |  ------------------
  |  |  |  Branch (3221:5): [True: 19, False: 0]
  |  |  |  Branch (3221:37): [True: 19, False: 0]
  |  |  ------------------
  |  | 3222|     19|    curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
  |  |  ------------------
  |  |  |  Branch (3222:5): [True: 1, False: 18]
  |  |  ------------------
  ------------------
 3331|     19|  if(v) {
  ------------------
  |  Branch (3331:6): [True: 1, False: 18]
  ------------------
 3332|      1|    char *contenttype = Curl_copy_header_value(hd);
 3333|      1|    if(!contenttype)
  ------------------
  |  Branch (3333:8): [True: 0, False: 1]
  ------------------
 3334|      0|      return CURLE_OUT_OF_MEMORY;
 3335|      1|    if(!*contenttype)
  ------------------
  |  Branch (3335:8): [True: 0, False: 1]
  ------------------
 3336|       |      /* ignore empty data */
 3337|      0|      curlx_free(contenttype);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 3338|      1|    else {
 3339|      1|      curlx_free(data->info.contenttype);
  ------------------
  |  | 1476|      1|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 3340|      1|      data->info.contenttype = contenttype;
 3341|      1|    }
 3342|      1|    return CURLE_OK;
 3343|      1|  }
 3344|     18|  if((k->httpversion < 20) &&
  ------------------
  |  Branch (3344:6): [True: 18, False: 0]
  ------------------
 3345|     18|     HD_IS_AND_SAYS(hd, hdlen, "Connection:", "close")) {
  ------------------
  |  | 3227|     18|  (HD_IS(hd, hdlen, n) && \
  |  |  ------------------
  |  |  |  | 3218|     36|  (((hdlen) >= (sizeof(n) - 1)) && curl_strnequal(n, hd, sizeof(n) - 1))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3218:4): [True: 18, False: 0]
  |  |  |  |  |  Branch (3218:36): [True: 14, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3228|     18|   ((hdlen) > ((sizeof(n) - 1) + (sizeof(v) - 1))) && \
  |  |  ------------------
  |  |  |  Branch (3228:4): [True: 14, False: 0]
  |  |  ------------------
  |  | 3229|     18|   Curl_compareheader(hd, STRCONST(n), STRCONST(v)))
  |  |  ------------------
  |  |  |  | 1297|     14|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1292|     14|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                  Curl_compareheader(hd, STRCONST(n), STRCONST(v)))
  |  |  ------------------
  |  |  |  | 1297|     14|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1292|     14|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3229:4): [True: 14, False: 0]
  |  |  ------------------
  ------------------
 3346|       |    /*
 3347|       |     * [RFC 2616, section 8.1.2.1]
 3348|       |     * "Connection: close" is HTTP/1.1 language and means that
 3349|       |     * the connection will close when this request has been
 3350|       |     * served.
 3351|       |     */
 3352|     14|    connclose(conn);
  ------------------
  |  |   90|     14|#define connclose(x)   Curl_conncontrol((x), CONNCTRL_CONN_CLOSE)
  |  |  ------------------
  |  |  |  |   84|     14|#define CONNCTRL_CONN_CLOSE      1
  |  |  ------------------
  ------------------
 3353|     14|    return CURLE_OK;
 3354|     14|  }
 3355|      4|  if((k->httpversion == 10) &&
  ------------------
  |  Branch (3355:6): [True: 0, False: 4]
  ------------------
 3356|      0|     HD_IS_AND_SAYS(hd, hdlen, "Connection:", "keep-alive")) {
  ------------------
  |  | 3227|      0|  (HD_IS(hd, hdlen, n) && \
  |  |  ------------------
  |  |  |  | 3218|      0|  (((hdlen) >= (sizeof(n) - 1)) && curl_strnequal(n, hd, sizeof(n) - 1))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3218:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (3218:36): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3228|      0|   ((hdlen) > ((sizeof(n) - 1) + (sizeof(v) - 1))) && \
  |  |  ------------------
  |  |  |  Branch (3228:4): [True: 0, False: 0]
  |  |  ------------------
  |  | 3229|      0|   Curl_compareheader(hd, STRCONST(n), STRCONST(v)))
  |  |  ------------------
  |  |  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                  Curl_compareheader(hd, STRCONST(n), STRCONST(v)))
  |  |  ------------------
  |  |  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3229:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3357|       |    /*
 3358|       |     * An HTTP/1.0 reply with the 'Connection: keep-alive' line
 3359|       |     * tells us the connection will be kept alive for our
 3360|       |     * pleasure. Default action for 1.0 is to close.
 3361|       |     *
 3362|       |     * [RFC2068, section 19.7.1] */
 3363|      0|    connkeep(conn);
  ------------------
  |  |   91|      0|#define connkeep(x)    Curl_conncontrol((x), CONNCTRL_CONN_KEEP)
  |  |  ------------------
  |  |  |  |   83|      0|#define CONNCTRL_CONN_KEEP       0
  |  |  ------------------
  ------------------
 3364|      0|    infof(data, "HTTP/1.0 connection set to keep alive");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3365|      0|    return CURLE_OK;
 3366|      0|  }
 3367|      4|  v = !k->http_bodyless ? HD_VAL(hd, hdlen, "Content-Range:") : NULL;
  ------------------
  |  | 3221|      1|  ((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
  |  |  ------------------
  |  |  |  Branch (3221:5): [True: 1, False: 0]
  |  |  |  Branch (3221:37): [True: 1, False: 0]
  |  |  ------------------
  |  | 3222|      1|    curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
  |  |  ------------------
  |  |  |  Branch (3222:5): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3367:7): [True: 1, False: 3]
  ------------------
 3368|      4|  if(v) {
  ------------------
  |  Branch (3368:6): [True: 1, False: 3]
  ------------------
 3369|       |    /* Content-Range: bytes [num]-
 3370|       |       Content-Range: bytes: [num]-
 3371|       |       Content-Range: [num]-
 3372|       |       Content-Range: [asterisk]/[total]
 3373|       |
 3374|       |       The second format was added since Sun's webserver
 3375|       |       JavaWebServer/1.1.1 obviously sends the header this way!
 3376|       |       The third added since some servers use that!
 3377|       |       The fourth means the requested range was unsatisfied.
 3378|       |     */
 3379|       |
 3380|      1|    const char *ptr = v;
 3381|       |
 3382|       |    /* Move forward until first digit or asterisk */
 3383|      8|    while(*ptr && !ISDIGIT(*ptr) && *ptr != '*')
  ------------------
  |  |   42|     16|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 6, False: 2]
  |  |  |  Branch (42:38): [True: 1, False: 5]
  |  |  ------------------
  ------------------
  |  Branch (3383:11): [True: 8, False: 0]
  |  Branch (3383:37): [True: 7, False: 0]
  ------------------
 3384|      7|      ptr++;
 3385|       |
 3386|       |    /* if it truly stopped on a digit */
 3387|      1|    if(ISDIGIT(*ptr)) {
  ------------------
  |  |   42|      1|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 1, False: 0]
  |  |  |  Branch (42:38): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 3388|      1|      if(!curlx_str_number(&ptr, &k->offset, CURL_OFF_T_MAX) &&
  ------------------
  |  |  588|      1|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (3388:10): [True: 1, False: 0]
  ------------------
 3389|      1|         (data->state.resume_from == k->offset))
  ------------------
  |  Branch (3389:10): [True: 0, False: 1]
  ------------------
 3390|       |        /* we asked for a resume and we got it */
 3391|      0|        k->content_range = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 3392|      1|    }
 3393|      0|    else if(k->httpcode < 300)
  ------------------
  |  Branch (3393:13): [True: 0, False: 0]
  ------------------
 3394|      0|      data->state.resume_from = 0; /* get everything */
 3395|      1|  }
 3396|      4|  return CURLE_OK;
 3397|      4|}
http.c:http_header_l:
 3404|     12|{
 3405|     12|  struct connectdata *conn = data->conn;
 3406|     12|  struct SingleRequest *k = &data->req;
 3407|     12|  const char *v = (!k->http_bodyless &&
  ------------------
  |  Branch (3407:20): [True: 12, False: 0]
  ------------------
 3408|     12|                   (data->set.timecondition || data->set.get_filetime)) ?
  ------------------
  |  Branch (3408:21): [True: 1, False: 11]
  |  Branch (3408:48): [True: 0, False: 11]
  ------------------
 3409|     12|    HD_VAL(hd, hdlen, "Last-Modified:") : NULL;
  ------------------
  |  | 3221|      1|  ((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
  |  |  ------------------
  |  |  |  Branch (3221:5): [True: 1, False: 0]
  |  |  |  Branch (3221:37): [True: 1, False: 0]
  |  |  ------------------
  |  | 3222|      1|    curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
  |  |  ------------------
  |  |  |  Branch (3222:5): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 3410|     12|  if(v) {
  ------------------
  |  Branch (3410:6): [True: 0, False: 12]
  ------------------
 3411|      0|    if(Curl_getdate_capped(v, &k->timeofdoc))
  ------------------
  |  Branch (3411:8): [True: 0, False: 0]
  ------------------
 3412|      0|      k->timeofdoc = 0;
 3413|      0|    if(data->set.get_filetime)
  ------------------
  |  Branch (3413:8): [True: 0, False: 0]
  ------------------
 3414|      0|      data->info.filetime = k->timeofdoc;
 3415|      0|    return CURLE_OK;
 3416|      0|  }
 3417|     12|  if(HD_IS(hd, hdlen, "Location:")) {
  ------------------
  |  | 3218|     12|  (((hdlen) >= (sizeof(n) - 1)) && curl_strnequal(n, hd, sizeof(n) - 1))
  |  |  ------------------
  |  |  |  Branch (3218:4): [True: 12, False: 0]
  |  |  |  Branch (3218:36): [True: 11, False: 1]
  |  |  ------------------
  ------------------
 3418|       |    /* this is the URL that the server advises us to use instead */
 3419|     11|    char *location = Curl_copy_header_value(hd);
 3420|     11|    if(!location)
  ------------------
  |  Branch (3420:8): [True: 0, False: 11]
  ------------------
 3421|      0|      return CURLE_OUT_OF_MEMORY;
 3422|     11|    if(!*location ||
  ------------------
  |  Branch (3422:8): [True: 0, False: 11]
  ------------------
 3423|     11|       (data->req.location && !strcmp(data->req.location, location))) {
  ------------------
  |  Branch (3423:9): [True: 0, False: 11]
  |  Branch (3423:31): [True: 0, False: 0]
  ------------------
 3424|       |      /* ignore empty header, or exact repeat of a previous one */
 3425|      0|      curlx_free(location);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 3426|      0|      return CURLE_OK;
 3427|      0|    }
 3428|     11|    else {
 3429|       |      /* has value and is not an exact repeat */
 3430|     11|      if(data->req.location) {
  ------------------
  |  Branch (3430:10): [True: 0, False: 11]
  ------------------
 3431|      0|        failf(data, "Multiple Location headers");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3432|      0|        curlx_free(location);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 3433|      0|        return CURLE_WEIRD_SERVER_REPLY;
 3434|      0|      }
 3435|     11|      data->req.location = location;
 3436|       |
 3437|     11|      if((k->httpcode >= 300 && k->httpcode < 400) &&
  ------------------
  |  Branch (3437:11): [True: 11, False: 0]
  |  Branch (3437:33): [True: 11, False: 0]
  ------------------
 3438|     11|         data->set.http_follow_mode) {
  ------------------
  |  Branch (3438:10): [True: 1, False: 10]
  ------------------
 3439|      1|        CURLcode result;
 3440|      1|        DEBUGASSERT(!data->req.newurl);
  ------------------
  |  | 1075|      1|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3440:9): [True: 0, False: 1]
  |  Branch (3440:9): [True: 1, False: 0]
  ------------------
 3441|      1|        data->req.newurl = curlx_strdup(data->req.location); /* clone */
  ------------------
  |  | 1470|      1|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 3442|      1|        if(!data->req.newurl)
  ------------------
  |  Branch (3442:12): [True: 0, False: 1]
  ------------------
 3443|      0|          return CURLE_OUT_OF_MEMORY;
 3444|       |
 3445|       |        /* some cases of POST and PUT etc needs to rewind the data
 3446|       |           stream at this point */
 3447|      1|        result = http_perhapsrewind(data, conn);
 3448|      1|        if(result)
  ------------------
  |  Branch (3448:12): [True: 0, False: 1]
  ------------------
 3449|      0|          return result;
 3450|       |
 3451|       |        /* mark the next request as a followed location: */
 3452|      1|        data->state.this_is_a_follow = TRUE;
  ------------------
  |  | 1045|      1|#define TRUE true
  ------------------
 3453|      1|      }
 3454|     11|    }
 3455|     11|  }
 3456|     12|  return CURLE_OK;
 3457|     12|}
http.c:http_header_r:
 3530|      1|{
 3531|      1|  const char *v = HD_VAL(hd, hdlen, "Retry-After:");
  ------------------
  |  | 3221|      1|  ((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
  |  |  ------------------
  |  |  |  Branch (3221:5): [True: 1, False: 0]
  |  |  |  Branch (3221:37): [True: 1, False: 0]
  |  |  ------------------
  |  | 3222|      1|    curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
  |  |  ------------------
  |  |  |  Branch (3222:5): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 3532|      1|  if(v) {
  ------------------
  |  Branch (3532:6): [True: 1, False: 0]
  ------------------
 3533|       |    /* Retry-After = HTTP-date / delay-seconds */
 3534|      1|    curl_off_t retry_after = 0; /* zero for unknown or "now" */
 3535|      1|    time_t date = 0;
 3536|      1|    curlx_str_passblanks(&v);
 3537|       |
 3538|       |    /* try it as a date first, because a date can otherwise start with and
 3539|       |       get treated as a number */
 3540|      1|    if(!Curl_getdate_capped(v, &date)) {
  ------------------
  |  Branch (3540:8): [True: 1, False: 0]
  ------------------
 3541|      1|      time_t current = time(NULL);
 3542|      1|      if(date >= current)
  ------------------
  |  Branch (3542:10): [True: 1, False: 0]
  ------------------
 3543|       |        /* convert date to number of seconds into the future */
 3544|      1|        retry_after = date - current;
 3545|      1|    }
 3546|      0|    else
 3547|       |      /* Try it as a decimal number, ignore errors */
 3548|      0|      (void)curlx_str_number(&v, &retry_after, CURL_OFF_T_MAX);
  ------------------
  |  |  588|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
 3549|       |    /* limit to 6 hours max. this is not documented so that it can be changed
 3550|       |       in the future if necessary. */
 3551|      1|    if(retry_after > 21600)
  ------------------
  |  Branch (3551:8): [True: 1, False: 0]
  ------------------
 3552|      1|      retry_after = 21600;
 3553|      1|    data->info.retry_after = retry_after;
 3554|      1|  }
 3555|      1|  return CURLE_OK;
 3556|      1|}
http.c:http_header_s:
 3563|      9|{
 3564|      9|#if !defined(CURL_DISABLE_COOKIES) || !defined(CURL_DISABLE_HSTS)
 3565|      9|  const char *v;
 3566|       |#else
 3567|       |  (void)data;
 3568|       |  (void)hd;
 3569|       |  (void)hdlen;
 3570|       |#endif
 3571|       |
 3572|      9|#ifndef CURL_DISABLE_COOKIES
 3573|      9|  v = (data->cookies && data->state.cookie_engine) ?
  ------------------
  |  Branch (3573:8): [True: 9, False: 0]
  |  Branch (3573:25): [True: 9, False: 0]
  ------------------
 3574|      9|    HD_VAL(hd, hdlen, "Set-Cookie:") : NULL;
  ------------------
  |  | 3221|      9|  ((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
  |  |  ------------------
  |  |  |  Branch (3221:5): [True: 9, False: 0]
  |  |  |  Branch (3221:37): [True: 9, False: 0]
  |  |  ------------------
  |  | 3222|      9|    curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
  |  |  ------------------
  |  |  |  Branch (3222:5): [True: 9, False: 0]
  |  |  ------------------
  ------------------
 3575|      9|  if(v) {
  ------------------
  |  Branch (3575:6): [True: 9, False: 0]
  ------------------
 3576|       |    /* If there is a custom-set Host: name, use it here, or else use
 3577|       |     * real peer hostname. */
 3578|      9|    const char *host = data->req.cookiehost ?
  ------------------
  |  Branch (3578:24): [True: 0, False: 9]
  ------------------
 3579|      9|      data->req.cookiehost : data->state.origin->hostname;
 3580|      9|    const unsigned char secure_context = Curl_secure_context(data, host) ?
  ------------------
  |  Branch (3580:42): [True: 9, False: 0]
  ------------------
 3581|      9|      COOKIE_SECURE : 0;
  ------------------
  |  |  116|      9|#define COOKIE_SECURE     (1<<2) /* connection is over secure origin */
  ------------------
 3582|      9|    CURLcode result;
 3583|      9|    Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 3584|      9|    result = Curl_cookie_add(data, data->cookies, v, host,
 3585|      9|                             data->state.up.path,
 3586|      9|                             COOKIE_HTTPHEADER | secure_context);
  ------------------
  |  |  114|      9|#define COOKIE_HTTPHEADER (1<<0) /* if HTTP header-style line */
  ------------------
 3587|      9|    Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 3588|      9|    return result;
 3589|      9|  }
 3590|      0|#endif
 3591|      0|#ifndef CURL_DISABLE_HSTS
 3592|       |  /* If enabled, the header is incoming and this is over HTTPS */
 3593|      0|  v = (data->hsts &&
  ------------------
  |  Branch (3593:8): [True: 0, False: 0]
  ------------------
 3594|      0|       (Curl_xfer_is_secure(data) ||
  ------------------
  |  Branch (3594:9): [True: 0, False: 0]
  ------------------
 3595|      0|#ifdef DEBUGBUILD
 3596|       |        /* allow debug builds to circumvent the HTTPS restriction */
 3597|      0|        getenv("CURL_HSTS_HTTP")
  ------------------
  |  Branch (3597:9): [True: 0, False: 0]
  ------------------
 3598|       |#else
 3599|       |        0
 3600|       |#endif
 3601|      0|         )
 3602|      0|    ) ? HD_VAL(hd, hdlen, "Strict-Transport-Security:") : NULL;
  ------------------
  |  | 3221|      0|  ((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
  |  |  ------------------
  |  |  |  Branch (3221:5): [True: 0, False: 0]
  |  |  |  Branch (3221:37): [True: 0, False: 0]
  |  |  ------------------
  |  | 3222|      0|    curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
  |  |  ------------------
  |  |  |  Branch (3222:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3603|      0|  if(v) {
  ------------------
  |  Branch (3603:6): [True: 0, False: 0]
  ------------------
 3604|      0|    CURLcode result = Curl_hsts_parse(
 3605|      0|      data->hsts, data->state.origin->hostname, v);
 3606|      0|    if(result) {
  ------------------
  |  Branch (3606:8): [True: 0, False: 0]
  ------------------
 3607|      0|      if(result == CURLE_OUT_OF_MEMORY)
  ------------------
  |  Branch (3607:10): [True: 0, False: 0]
  ------------------
 3608|      0|        return result;
 3609|      0|      infof(data, "Illegal STS header skipped");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3610|      0|    }
 3611|      0|#ifdef DEBUGBUILD
 3612|      0|    else
 3613|      0|      infof(data, "Parsed STS header fine (%zu entries)",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3614|      0|            Curl_llist_count(&data->hsts->list));
 3615|      0|#endif
 3616|      0|  }
 3617|      0|#endif
 3618|       |
 3619|      0|  return CURLE_OK;
 3620|      0|}
http.c:http_header_t:
 3627|      4|{
 3628|      4|  struct connectdata *conn = data->conn;
 3629|      4|  struct SingleRequest *k = &data->req;
 3630|       |
 3631|       |  /* RFC 9112, ch. 6.1
 3632|       |   * "Transfer-Encoding MAY be sent in a response to a HEAD request or
 3633|       |   *  in a 304 (Not Modified) response (Section 15.4.5 of [HTTP]) to a
 3634|       |   *  GET request, neither of which includes a message body, to indicate
 3635|       |   *  that the origin server would have applied a transfer coding to the
 3636|       |   *  message body if the request had been an unconditional GET."
 3637|       |   *
 3638|       |   * Read: in these cases the 'Transfer-Encoding' does not apply
 3639|       |   * to any data following the response headers. Do not add any decoders.
 3640|       |   */
 3641|      4|  const char *v = (!k->http_bodyless &&
  ------------------
  |  Branch (3641:20): [True: 4, False: 0]
  ------------------
 3642|      4|                   (data->state.httpreq != HTTPREQ_HEAD) &&
  ------------------
  |  Branch (3642:20): [True: 4, False: 0]
  ------------------
 3643|      4|                   (k->httpcode != 304)) ?
  ------------------
  |  Branch (3643:20): [True: 4, False: 0]
  ------------------
 3644|      4|    HD_VAL(hd, hdlen, "Transfer-Encoding:") : NULL;
  ------------------
  |  | 3221|      4|  ((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
  |  |  ------------------
  |  |  |  Branch (3221:5): [True: 4, False: 0]
  |  |  |  Branch (3221:37): [True: 4, False: 0]
  |  |  ------------------
  |  | 3222|      4|    curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
  |  |  ------------------
  |  |  |  Branch (3222:5): [True: 4, False: 0]
  |  |  ------------------
  ------------------
 3645|      4|  if(v) {
  ------------------
  |  Branch (3645:6): [True: 4, False: 0]
  ------------------
 3646|       |    /* One or more encodings. We check for chunked and/or a compression
 3647|       |       algorithm. */
 3648|      4|    CURLcode result = Curl_build_unencoding_stack(data, v, TRUE);
  ------------------
  |  | 1045|      4|#define TRUE true
  ------------------
 3649|      4|    if(result)
  ------------------
  |  Branch (3649:8): [True: 0, False: 4]
  ------------------
 3650|      0|      return result;
 3651|      4|    if(!k->chunk && data->set.http_transfer_encoding) {
  ------------------
  |  Branch (3651:8): [True: 0, False: 4]
  |  Branch (3651:21): [True: 0, False: 0]
  ------------------
 3652|       |      /* if this is not chunked, only close can signal the end of this
 3653|       |       * transfer as Content-Length is said not to be trusted for
 3654|       |       * transfer-encoding! */
 3655|      0|      CURL_TRC_M(data, "HTTP/1.1 transfer-encoding without chunks");
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3656|      0|      connclose(conn);
  ------------------
  |  |   90|      0|#define connclose(x)   Curl_conncontrol((x), CONNCTRL_CONN_CLOSE)
  |  |  ------------------
  |  |  |  |   84|      0|#define CONNCTRL_CONN_CLOSE      1
  |  |  ------------------
  ------------------
 3657|      0|      k->ignore_cl = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 3658|      0|    }
 3659|      4|    return CURLE_OK;
 3660|      4|  }
 3661|      0|  v = HD_VAL(hd, hdlen, "Trailer:");
  ------------------
  |  | 3221|      0|  ((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
  |  |  ------------------
  |  |  |  Branch (3221:5): [True: 0, False: 0]
  |  |  |  Branch (3221:37): [True: 0, False: 0]
  |  |  ------------------
  |  | 3222|      0|    curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
  |  |  ------------------
  |  |  |  Branch (3222:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3662|      0|  if(v) {
  ------------------
  |  Branch (3662:6): [True: 0, False: 0]
  ------------------
 3663|      0|    data->req.resp_trailer = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 3664|      0|    return CURLE_OK;
 3665|      0|  }
 3666|      0|  return CURLE_OK;
 3667|      0|}
http.c:http_header_w:
 3674|      5|{
 3675|      5|  struct SingleRequest *k = &data->req;
 3676|      5|  CURLcode result = CURLE_OK;
 3677|       |
 3678|      5|  if((401 == k->httpcode) && HD_IS(hd, hdlen, "WWW-Authenticate:")) {
  ------------------
  |  | 3218|      5|  (((hdlen) >= (sizeof(n) - 1)) && curl_strnequal(n, hd, sizeof(n) - 1))
  |  |  ------------------
  |  |  |  Branch (3218:4): [True: 5, False: 0]
  |  |  |  Branch (3218:36): [True: 5, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3678:6): [True: 5, False: 0]
  ------------------
 3679|      5|    char *auth = Curl_copy_header_value(hd);
 3680|      5|    if(!auth)
  ------------------
  |  Branch (3680:8): [True: 0, False: 5]
  ------------------
 3681|      0|      result = CURLE_OUT_OF_MEMORY;
 3682|      5|    else {
 3683|      5|      result = Curl_http_input_auth(data, FALSE, auth);
  ------------------
  |  | 1048|      5|#define FALSE false
  ------------------
 3684|      5|      curlx_free(auth);
  ------------------
  |  | 1476|      5|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 3685|      5|    }
 3686|      5|  }
 3687|      5|  return result;
 3688|      5|}
http.c:http_parse_headers:
 4459|  3.58k|{
 4460|  3.58k|  struct connectdata *conn = data->conn;
 4461|  3.58k|  CURLcode result = CURLE_OK;
 4462|  3.58k|  struct SingleRequest *k = &data->req;
 4463|  3.58k|  const char *end_ptr;
 4464|  3.58k|  bool leftover_body = FALSE;
  ------------------
  |  | 1048|  3.58k|#define FALSE false
  ------------------
 4465|       |
 4466|       |  /* we have bytes for the next header, make sure it is not a folded header
 4467|       |     before passing it on */
 4468|  3.58k|  if(data->state.maybe_folded && blen) {
  ------------------
  |  Branch (4468:6): [True: 0, False: 3.58k]
  |  Branch (4468:34): [True: 0, False: 0]
  ------------------
 4469|      0|    if(ISBLANK(buf[0])) {
  ------------------
  |  |   43|      0|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 0, False: 0]
  |  |  |  Branch (43:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4470|       |      /* folded, remove the trailing newlines and append the next header */
 4471|      0|      unfold_header(data);
 4472|      0|    }
 4473|      0|    else {
 4474|       |      /* the header data we hold is a complete header, pass it on */
 4475|      0|      size_t ignore_this;
 4476|      0|      result = http_rw_hd(data, curlx_dyn_ptr(&data->state.headerb),
 4477|      0|                          curlx_dyn_len(&data->state.headerb),
 4478|      0|                          NULL, 0, &ignore_this);
 4479|      0|      curlx_dyn_reset(&data->state.headerb);
 4480|      0|      if(result)
  ------------------
  |  Branch (4480:10): [True: 0, False: 0]
  ------------------
 4481|      0|        return result;
 4482|      0|    }
 4483|      0|    data->state.maybe_folded = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 4484|      0|  }
 4485|       |
 4486|       |  /* header line within buffer loop */
 4487|  3.58k|  *pconsumed = 0;
 4488|  3.76k|  while(blen && k->header) {
  ------------------
  |  Branch (4488:9): [True: 777, False: 2.98k]
  |  Branch (4488:17): [True: 755, False: 22]
  ------------------
 4489|    755|    size_t consumed;
 4490|    755|    size_t hlen;
 4491|    755|    const char *hd;
 4492|    755|    size_t unfold_len = 0;
 4493|       |
 4494|    755|    if(data->state.leading_unfold) {
  ------------------
  |  Branch (4494:8): [True: 0, False: 755]
  ------------------
 4495|       |      /* immediately after an unfold, keep only a single whitespace */
 4496|      0|      while(blen && ISBLANK(buf[0])) {
  ------------------
  |  |   43|      0|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 0, False: 0]
  |  |  |  Branch (43:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (4496:13): [True: 0, False: 0]
  ------------------
 4497|      0|        buf++;
 4498|      0|        blen--;
 4499|      0|        unfold_len++;
 4500|      0|      }
 4501|      0|      if(blen) {
  ------------------
  |  Branch (4501:10): [True: 0, False: 0]
  ------------------
 4502|       |        /* insert a single space */
 4503|      0|        result = curlx_dyn_addn(&data->state.headerb, " ", 1);
 4504|      0|        if(result)
  ------------------
  |  Branch (4504:12): [True: 0, False: 0]
  ------------------
 4505|      0|          return result;
 4506|      0|        data->state.leading_unfold = FALSE; /* done now */
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 4507|      0|      }
 4508|      0|    }
 4509|       |
 4510|    755|    end_ptr = memchr(buf, '\n', blen);
 4511|    755|    if(!end_ptr) {
  ------------------
  |  Branch (4511:8): [True: 550, False: 205]
  ------------------
 4512|       |      /* Not a complete header line within buffer, append the data to
 4513|       |         the end of the headerbuff. */
 4514|    550|      result = curlx_dyn_addn(&data->state.headerb, buf, blen);
 4515|    550|      if(result)
  ------------------
  |  Branch (4515:10): [True: 0, False: 550]
  ------------------
 4516|      0|        return result;
 4517|    550|      *pconsumed += blen + unfold_len;
 4518|       |
 4519|    550|      if(!k->headerline) {
  ------------------
  |  Branch (4519:10): [True: 550, False: 0]
  ------------------
 4520|       |        /* check if this looks like a protocol header */
 4521|    550|        statusline st =
 4522|    550|          checkprotoprefix(data, conn,
 4523|    550|                           curlx_dyn_ptr(&data->state.headerb),
 4524|    550|                           curlx_dyn_len(&data->state.headerb));
 4525|       |
 4526|    550|        if(st == STATUS_BAD) {
  ------------------
  |  Branch (4526:12): [True: 550, False: 0]
  ------------------
 4527|       |          /* this is not the beginning of a protocol first header line.
 4528|       |           * Cannot be 0.9 if version was detected or connection was reused. */
 4529|    550|          k->header = FALSE;
  ------------------
  |  | 1048|    550|#define FALSE false
  ------------------
 4530|    550|          streamclose(conn);
  ------------------
  |  |   89|    550|#define streamclose(x) Curl_conncontrol((x), CONNCTRL_STREAM_CLOSE)
  |  |  ------------------
  |  |  |  |   85|    550|#define CONNCTRL_STREAM_CLOSE    2
  |  |  ------------------
  ------------------
 4531|    550|          if((k->httpversion >= 10) || conn->bits.reuse) {
  ------------------
  |  Branch (4531:14): [True: 1, False: 549]
  |  Branch (4531:40): [True: 0, False: 549]
  ------------------
 4532|      1|            failf(data, "Invalid status line");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 4533|      1|            return CURLE_WEIRD_SERVER_REPLY;
 4534|      1|          }
 4535|    549|          if(!data->state.http_neg.accept_09) {
  ------------------
  |  Branch (4535:14): [True: 542, False: 7]
  ------------------
 4536|    542|            failf(data, "Received HTTP/0.9 when not allowed");
  ------------------
  |  |   62|    542|#define failf Curl_failf
  ------------------
 4537|    542|            return CURLE_UNSUPPORTED_PROTOCOL;
 4538|    542|          }
 4539|      7|          leftover_body = TRUE;
  ------------------
  |  | 1045|      7|#define TRUE true
  ------------------
 4540|      7|          goto out;
 4541|    549|        }
 4542|    550|      }
 4543|      0|      goto out; /* read more and try again */
 4544|    550|    }
 4545|       |
 4546|       |    /* the size of the remaining header line */
 4547|    205|    consumed = (end_ptr - buf) + 1;
 4548|       |
 4549|    205|    result = curlx_dyn_addn(&data->state.headerb, buf, consumed);
 4550|    205|    if(result)
  ------------------
  |  Branch (4550:8): [True: 0, False: 205]
  ------------------
 4551|      0|      return result;
 4552|    205|    blen -= consumed;
 4553|    205|    buf += consumed;
 4554|    205|    *pconsumed += consumed + unfold_len;
 4555|       |
 4556|       |    /****
 4557|       |     * We now have a FULL header line in 'headerb'.
 4558|       |     *****/
 4559|       |
 4560|    205|    hlen = curlx_dyn_len(&data->state.headerb);
 4561|    205|    hd = curlx_dyn_ptr(&data->state.headerb);
 4562|       |
 4563|    205|    if(!k->headerline) {
  ------------------
  |  Branch (4563:8): [True: 69, False: 136]
  ------------------
 4564|       |      /* the first read "header", the status line */
 4565|     69|      statusline st = checkprotoprefix(data, conn, hd, hlen);
 4566|     69|      if(st == STATUS_BAD) {
  ------------------
  |  Branch (4566:10): [True: 21, False: 48]
  ------------------
 4567|     21|        streamclose(conn);
  ------------------
  |  |   89|     21|#define streamclose(x) Curl_conncontrol((x), CONNCTRL_STREAM_CLOSE)
  |  |  ------------------
  |  |  |  |   85|     21|#define CONNCTRL_STREAM_CLOSE    2
  |  |  ------------------
  ------------------
 4568|       |        /* this is not the beginning of a protocol first header line.
 4569|       |         * Cannot be 0.9 if version was detected or connection was reused. */
 4570|     21|        if((k->httpversion >= 10) || conn->bits.reuse) {
  ------------------
  |  Branch (4570:12): [True: 0, False: 21]
  |  Branch (4570:38): [True: 0, False: 21]
  ------------------
 4571|      0|          failf(data, "Invalid status line");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4572|      0|          return CURLE_WEIRD_SERVER_REPLY;
 4573|      0|        }
 4574|     21|        if(!data->state.http_neg.accept_09) {
  ------------------
  |  Branch (4574:12): [True: 19, False: 2]
  ------------------
 4575|     19|          failf(data, "Received HTTP/0.9 when not allowed");
  ------------------
  |  |   62|     19|#define failf Curl_failf
  ------------------
 4576|     19|          return CURLE_UNSUPPORTED_PROTOCOL;
 4577|     19|        }
 4578|      2|        k->header = FALSE;
  ------------------
  |  | 1048|      2|#define FALSE false
  ------------------
 4579|      2|        leftover_body = TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
 4580|      2|        goto out;
 4581|     21|      }
 4582|     69|    }
 4583|    136|    else {
 4584|    136|      if(hlen && !ISNEWLINE(hd[0])) {
  ------------------
  |  |   48|    136|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (48:26): [True: 0, False: 136]
  |  |  |  Branch (48:43): [True: 41, False: 95]
  |  |  ------------------
  ------------------
  |  Branch (4584:10): [True: 136, False: 0]
  ------------------
 4585|       |        /* this is NOT the header separator */
 4586|       |
 4587|       |        /* if we have bytes for the next header, check for folding */
 4588|     95|        if(blen && ISBLANK(buf[0])) {
  ------------------
  |  |   43|     95|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 0, False: 95]
  |  |  |  Branch (43:38): [True: 0, False: 95]
  |  |  ------------------
  ------------------
  |  Branch (4588:12): [True: 95, False: 0]
  ------------------
 4589|       |          /* remove the trailing CRLF and append the next header */
 4590|      0|          unfold_header(data);
 4591|      0|          continue;
 4592|      0|        }
 4593|     95|        else if(!blen) {
  ------------------
  |  Branch (4593:17): [True: 0, False: 95]
  ------------------
 4594|       |          /* this might be a folded header so deal with it in next invoke */
 4595|      0|          data->state.maybe_folded = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 4596|      0|          break;
 4597|      0|        }
 4598|     95|      }
 4599|    136|    }
 4600|       |
 4601|    184|    result = http_rw_hd(data, hd, hlen, buf, blen, &consumed);
 4602|       |    /* We are done with this line. We reset because response
 4603|       |     * processing might switch to HTTP/2 and that might call us
 4604|       |     * directly again. */
 4605|    184|    curlx_dyn_reset(&data->state.headerb);
 4606|    184|    if(consumed) {
  ------------------
  |  Branch (4606:8): [True: 0, False: 184]
  ------------------
 4607|      0|      blen -= consumed;
 4608|      0|      buf += consumed;
 4609|      0|      *pconsumed += consumed;
 4610|      0|    }
 4611|    184|    if(result)
  ------------------
  |  Branch (4611:8): [True: 7, False: 177]
  ------------------
 4612|      7|      return result;
 4613|    184|  }
 4614|       |
 4615|       |  /* We might have reached the end of the header part here, but
 4616|       |     there might be a non-header part left in the end of the read
 4617|       |     buffer. */
 4618|  3.01k|out:
 4619|  3.01k|  if(!k->header && !leftover_body) {
  ------------------
  |  Branch (4619:6): [True: 46, False: 2.96k]
  |  Branch (4619:20): [True: 37, False: 9]
  ------------------
 4620|     37|    curlx_dyn_free(&data->state.headerb);
 4621|     37|  }
 4622|  3.01k|  return CURLE_OK;
 4623|  3.58k|}
http.c:checkprotoprefix:
 3205|    619|{
 3206|    619|#ifndef CURL_DISABLE_RTSP
 3207|    619|  if(conn->scheme->protocol & CURLPROTO_RTSP)
  ------------------
  |  | 1106|    619|#define CURLPROTO_RTSP    (1L << 18)
  ------------------
  |  Branch (3207:6): [True: 0, False: 619]
  ------------------
 3208|      0|    return checkrtspprefix(data, s, len);
 3209|       |#else
 3210|       |  (void)conn;
 3211|       |#endif /* CURL_DISABLE_RTSP */
 3212|       |
 3213|    619|  return checkhttpprefix(data, s, len);
 3214|    619|}
http.c:h2_permissible_field:
 4926|      4|{
 4927|      4|  size_t i;
 4928|     16|  for(i = 0; i < CURL_ARRAYSIZE(H2_NON_FIELD); ++i) {
  ------------------
  |  | 1299|     16|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (4928:14): [True: 14, False: 2]
  ------------------
 4929|     14|    if(e->namelen == H2_NON_FIELD[i].namelen &&
  ------------------
  |  Branch (4929:8): [True: 2, False: 12]
  ------------------
 4930|      2|       curl_strnequal(H2_NON_FIELD[i].name, e->name, e->namelen))
  ------------------
  |  Branch (4930:8): [True: 2, False: 0]
  ------------------
 4931|      2|      return FALSE;
  ------------------
  |  | 1048|      2|#define FALSE false
  ------------------
 4932|     14|  }
 4933|      2|  return TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
 4934|      4|}

Curl_h1_req_parse_init:
   37|      2|{
   38|      2|  memset(parser, 0, sizeof(*parser));
   39|      2|  parser->max_line_len = max_line_len;
   40|      2|  curlx_dyn_init(&parser->scratch, max_line_len);
   41|      2|}
Curl_h1_req_parse_free:
   44|      4|{
   45|      4|  if(parser) {
  ------------------
  |  Branch (45:6): [True: 4, False: 0]
  ------------------
   46|      4|    Curl_http_req_free(parser->req);
   47|      4|    curlx_dyn_free(&parser->scratch);
   48|      4|    parser->req = NULL;
   49|       |    parser->done = FALSE;
  ------------------
  |  | 1048|      4|#define FALSE false
  ------------------
   50|      4|  }
   51|      4|}
Curl_h1_req_parse_read:
  267|      2|{
  268|      2|  CURLcode result = CURLE_OK;
  269|      2|  size_t nread;
  270|       |
  271|      2|  *pnread = 0;
  272|       |
  273|      2|  DEBUGASSERT(buf);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (273:3): [True: 0, False: 2]
  |  Branch (273:3): [True: 2, False: 0]
  ------------------
  274|      2|  if(!buf)
  ------------------
  |  Branch (274:6): [True: 0, False: 2]
  ------------------
  275|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  276|       |
  277|     10|  while(!parser->done) {
  ------------------
  |  Branch (277:9): [True: 8, False: 2]
  ------------------
  278|      8|    result = next_line(parser, buf, buflen, options, &nread);
  279|      8|    if(result) {
  ------------------
  |  Branch (279:8): [True: 0, False: 8]
  ------------------
  280|      0|      if(result == CURLE_AGAIN)
  ------------------
  |  Branch (280:10): [True: 0, False: 0]
  ------------------
  281|      0|        result = CURLE_OK;
  282|      0|      goto out;
  283|      0|    }
  284|       |
  285|       |    /* Consume this line */
  286|      8|    *pnread += nread;
  287|      8|    buf += nread;
  288|      8|    buflen -= nread;
  289|       |
  290|      8|    if(!parser->line) {
  ------------------
  |  Branch (290:8): [True: 0, False: 8]
  ------------------
  291|       |      /* consumed bytes, but line not complete */
  292|      0|      if(!buflen)
  ------------------
  |  Branch (292:10): [True: 0, False: 0]
  ------------------
  293|      0|        goto out;
  294|      0|    }
  295|      8|    else if(!parser->req) {
  ------------------
  |  Branch (295:13): [True: 2, False: 6]
  ------------------
  296|      2|      result = start_req(parser, scheme_default, custom_method, options);
  297|      2|      if(result)
  ------------------
  |  Branch (297:10): [True: 0, False: 2]
  ------------------
  298|      0|        goto out;
  299|      2|    }
  300|      6|    else if(parser->line_len == 0) {
  ------------------
  |  Branch (300:13): [True: 2, False: 4]
  ------------------
  301|       |      /* last, empty line, we are finished */
  302|      2|      if(!parser->req) {
  ------------------
  |  Branch (302:10): [True: 0, False: 2]
  ------------------
  303|      0|        result = CURLE_URL_MALFORMAT;
  304|      0|        goto out;
  305|      0|      }
  306|      2|      parser->done = TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
  307|      2|      curlx_dyn_reset(&parser->scratch);
  308|       |      /* last chance adjustments */
  309|      2|    }
  310|      4|    else {
  311|      4|      result = Curl_dynhds_h1_add_line(&parser->req->headers,
  312|      4|                                       parser->line, parser->line_len);
  313|      4|      if(result)
  ------------------
  |  Branch (313:10): [True: 0, False: 4]
  ------------------
  314|      0|        goto out;
  315|      4|    }
  316|      8|  }
  317|       |
  318|      2|out:
  319|      2|  return result;
  320|      2|}
http1.c:next_line:
   97|      8|{
   98|      8|  CURLcode result;
   99|       |
  100|      8|  *pnread = 0;
  101|      8|  if(parser->line) {
  ------------------
  |  Branch (101:6): [True: 6, False: 2]
  ------------------
  102|      6|    parser->line = NULL;
  103|      6|    parser->line_len = 0;
  104|      6|    curlx_dyn_reset(&parser->scratch);
  105|      6|  }
  106|       |
  107|      8|  result = detect_line(parser, buf, buflen, pnread);
  108|      8|  if(!result) {
  ------------------
  |  Branch (108:6): [True: 8, False: 0]
  ------------------
  109|      8|    if(curlx_dyn_len(&parser->scratch)) {
  ------------------
  |  Branch (109:8): [True: 0, False: 8]
  ------------------
  110|       |      /* append detected line to scratch to have the complete line */
  111|      0|      result = curlx_dyn_addn(&parser->scratch, parser->line,
  112|      0|                              parser->line_len);
  113|      0|      if(result)
  ------------------
  |  Branch (113:10): [True: 0, False: 0]
  ------------------
  114|      0|        return result;
  115|      0|      parser->line = curlx_dyn_ptr(&parser->scratch);
  116|      0|      parser->line_len = curlx_dyn_len(&parser->scratch);
  117|      0|    }
  118|      8|    result = trim_line(parser, options);
  119|      8|    if(result)
  ------------------
  |  Branch (119:8): [True: 0, False: 8]
  ------------------
  120|      0|      return result;
  121|      8|  }
  122|      0|  else if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (122:11): [True: 0, False: 0]
  ------------------
  123|       |    /* no line end in `buf`, add it to our scratch */
  124|      0|    result = curlx_dyn_addn(&parser->scratch, (const unsigned char *)buf,
  125|      0|                            buflen);
  126|      0|    *pnread = buflen;
  127|      0|  }
  128|      8|  return result;
  129|      8|}
http1.c:detect_line:
   80|      8|{
   81|      8|  const char *line_end;
   82|       |
   83|      8|  DEBUGASSERT(!parser->line);
  ------------------
  |  | 1075|      8|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (83:3): [True: 0, False: 8]
  |  Branch (83:3): [True: 8, False: 0]
  ------------------
   84|      8|  *pnread = 0;
   85|      8|  line_end = memchr(buf, '\n', buflen);
   86|      8|  if(!line_end)
  ------------------
  |  Branch (86:6): [True: 0, False: 8]
  ------------------
   87|      0|    return CURLE_AGAIN;
   88|      8|  parser->line = (const char *)buf;
   89|      8|  parser->line_len = line_end - parser->line + 1;
   90|      8|  *pnread = parser->line_len;
   91|      8|  return CURLE_OK;
   92|      8|}
http1.c:trim_line:
   54|      8|{
   55|      8|  DEBUGASSERT(parser->line);
  ------------------
  |  | 1075|      8|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (55:3): [True: 0, False: 8]
  |  Branch (55:3): [True: 8, False: 0]
  ------------------
   56|      8|  if(parser->line_len) {
  ------------------
  |  Branch (56:6): [True: 8, False: 0]
  ------------------
   57|      8|    if(parser->line[parser->line_len - 1] == '\n')
  ------------------
  |  Branch (57:8): [True: 8, False: 0]
  ------------------
   58|      8|      --parser->line_len;
   59|      8|    if(parser->line_len) {
  ------------------
  |  Branch (59:8): [True: 8, False: 0]
  ------------------
   60|      8|      if(parser->line[parser->line_len - 1] == '\r')
  ------------------
  |  Branch (60:10): [True: 8, False: 0]
  ------------------
   61|      8|        --parser->line_len;
   62|      0|      else if(options & H1_PARSE_OPT_STRICT)
  ------------------
  |  |   33|      0|#define H1_PARSE_OPT_STRICT     (1 << 0)
  ------------------
  |  Branch (62:15): [True: 0, False: 0]
  ------------------
   63|      0|        return CURLE_URL_MALFORMAT;
   64|      8|    }
   65|      0|    else if(options & H1_PARSE_OPT_STRICT)
  ------------------
  |  |   33|      0|#define H1_PARSE_OPT_STRICT     (1 << 0)
  ------------------
  |  Branch (65:13): [True: 0, False: 0]
  ------------------
   66|      0|      return CURLE_URL_MALFORMAT;
   67|      8|  }
   68|      0|  else if(options & H1_PARSE_OPT_STRICT)
  ------------------
  |  |   33|      0|#define H1_PARSE_OPT_STRICT     (1 << 0)
  ------------------
  |  Branch (68:11): [True: 0, False: 0]
  ------------------
   69|      0|    return CURLE_URL_MALFORMAT;
   70|       |
   71|      8|  if(parser->line_len > parser->max_line_len) {
  ------------------
  |  Branch (71:6): [True: 0, False: 8]
  ------------------
   72|      0|    return CURLE_URL_MALFORMAT;
   73|      0|  }
   74|      8|  return CURLE_OK;
   75|      8|}
http1.c:start_req:
  135|      2|{
  136|      2|  const char *p, *m, *target, *hv, *scheme, *authority, *path;
  137|      2|  size_t m_len, target_len, hv_len, scheme_len, authority_len, path_len;
  138|      2|  size_t i;
  139|      2|  CURLU *url = NULL;
  140|      2|  CURLcode result = CURLE_URL_MALFORMAT; /* Use this as default fail */
  141|       |
  142|      2|  DEBUGASSERT(!parser->req);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (142:3): [True: 0, False: 2]
  |  Branch (142:3): [True: 2, False: 0]
  ------------------
  143|       |  /* line must match: "METHOD TARGET HTTP_VERSION" */
  144|      2|  if(custom_method && custom_method[0] &&
  ------------------
  |  Branch (144:6): [True: 0, False: 2]
  |  Branch (144:23): [True: 0, False: 0]
  ------------------
  145|      0|     !strncmp(custom_method, parser->line, strlen(custom_method))) {
  ------------------
  |  Branch (145:6): [True: 0, False: 0]
  ------------------
  146|      0|    p = parser->line + strlen(custom_method);
  147|      0|  }
  148|      2|  else {
  149|      2|    p = memchr(parser->line, ' ', parser->line_len);
  150|      2|    if(!p || p == parser->line)
  ------------------
  |  Branch (150:8): [True: 0, False: 2]
  |  Branch (150:14): [True: 0, False: 2]
  ------------------
  151|      0|      goto out;
  152|      2|  }
  153|       |
  154|      2|  m = parser->line;
  155|      2|  m_len = p - parser->line;
  156|      2|  target = p + 1;
  157|      2|  target_len = hv_len = 0;
  158|      2|  hv = NULL;
  159|       |
  160|       |  /* URL may contain spaces so scan backwards */
  161|     16|  for(i = parser->line_len; i > m_len; --i) {
  ------------------
  |  Branch (161:29): [True: 16, False: 0]
  ------------------
  162|     16|    if(parser->line[i] == ' ') {
  ------------------
  |  Branch (162:8): [True: 2, False: 14]
  ------------------
  163|      2|      hv = &parser->line[i + 1];
  164|      2|      hv_len = parser->line_len - i;
  165|      2|      target_len = (hv - target) - 1;
  166|      2|      break;
  167|      2|    }
  168|     16|  }
  169|       |  /* no SPACE found or empty TARGET or empty HTTP_VERSION */
  170|      2|  if(!target_len || !hv_len)
  ------------------
  |  Branch (170:6): [True: 0, False: 2]
  |  Branch (170:21): [True: 0, False: 2]
  ------------------
  171|      0|    goto out;
  172|       |
  173|      2|  (void)hv;
  174|       |
  175|       |  /* The TARGET can be (rfc 9112, ch. 3.2):
  176|       |   * origin-form:     path + optional query
  177|       |   * absolute-form:   absolute URI
  178|       |   * authority-form:  host+port for CONNECT
  179|       |   * asterisk-form:   '*' for OPTIONS
  180|       |   *
  181|       |   * from TARGET, we derive `scheme` `authority` `path`
  182|       |   * origin-form            --        --          TARGET
  183|       |   * absolute-form          URL*      URL*        URL*
  184|       |   * authority-form         --        TARGET      --
  185|       |   * asterisk-form          --        --          TARGET
  186|       |   */
  187|      2|  scheme = authority = path = NULL;
  188|      2|  scheme_len = authority_len = path_len = 0;
  189|       |
  190|      2|  if(target_len == 1 && target[0] == '*') {
  ------------------
  |  Branch (190:6): [True: 1, False: 1]
  |  Branch (190:25): [True: 0, False: 1]
  ------------------
  191|       |    /* asterisk-form */
  192|      0|    path = target;
  193|      0|    path_len = target_len;
  194|      0|  }
  195|      2|  else if(!strncmp("CONNECT", m, m_len)) {
  ------------------
  |  Branch (195:11): [True: 0, False: 2]
  ------------------
  196|       |    /* authority-form */
  197|      0|    authority = target;
  198|      0|    authority_len = target_len;
  199|      0|  }
  200|      2|  else if(target[0] == '/') {
  ------------------
  |  Branch (200:11): [True: 2, False: 0]
  ------------------
  201|       |    /* origin-form */
  202|      2|    path = target;
  203|      2|    path_len = target_len;
  204|      2|  }
  205|      0|  else {
  206|       |    /* origin-form OR absolute-form */
  207|      0|    CURLUcode uc;
  208|      0|    char tmp[H1_MAX_URL_LEN];
  209|       |
  210|       |    /* default, unless we see an absolute URL */
  211|      0|    path = target;
  212|      0|    path_len = target_len;
  213|       |
  214|       |    /* URL parser wants null-termination */
  215|      0|    if(target_len >= sizeof(tmp))
  ------------------
  |  Branch (215:8): [True: 0, False: 0]
  ------------------
  216|      0|      goto out;
  217|      0|    memcpy(tmp, target, target_len);
  218|      0|    tmp[target_len] = '\0';
  219|       |    /* See if treating TARGET as an absolute URL makes sense */
  220|      0|    if(Curl_is_absolute_url(tmp, NULL, 0, FALSE)) {
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  |  Branch (220:8): [True: 0, False: 0]
  ------------------
  221|      0|      unsigned int url_options;
  222|       |
  223|      0|      url = curl_url();
  224|      0|      if(!url) {
  ------------------
  |  Branch (224:10): [True: 0, False: 0]
  ------------------
  225|      0|        result = CURLE_OUT_OF_MEMORY;
  226|      0|        goto out;
  227|      0|      }
  228|      0|      url_options = (CURLU_NON_SUPPORT_SCHEME |
  ------------------
  |  |   91|      0|#define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
  ------------------
  229|      0|                     CURLU_PATH_AS_IS |
  ------------------
  |  |   92|      0|#define CURLU_PATH_AS_IS (1 << 4)         /* leave dot sequences */
  ------------------
  230|      0|                     CURLU_NO_DEFAULT_PORT);
  ------------------
  |  |   86|      0|#define CURLU_NO_DEFAULT_PORT (1 << 1)    /* act as if no port number was set,
  ------------------
  231|      0|      if(!(options & H1_PARSE_OPT_STRICT))
  ------------------
  |  |   33|      0|#define H1_PARSE_OPT_STRICT     (1 << 0)
  ------------------
  |  Branch (231:10): [True: 0, False: 0]
  ------------------
  232|      0|        url_options |= CURLU_ALLOW_SPACE;
  ------------------
  |  |  100|      0|#define CURLU_ALLOW_SPACE (1 << 11)       /* Allow spaces in the URL */
  ------------------
  233|      0|      uc = curl_url_set(url, CURLUPART_URL, tmp, url_options);
  234|      0|      if(uc) {
  ------------------
  |  Branch (234:10): [True: 0, False: 0]
  ------------------
  235|      0|        goto out;
  236|      0|      }
  237|      0|    }
  238|       |
  239|      0|    if(!url && (options & H1_PARSE_OPT_STRICT)) {
  ------------------
  |  |   33|      0|#define H1_PARSE_OPT_STRICT     (1 << 0)
  ------------------
  |  Branch (239:8): [True: 0, False: 0]
  |  Branch (239:16): [True: 0, False: 0]
  ------------------
  240|       |      /* we should have an absolute URL or have seen `/` earlier */
  241|      0|      goto out;
  242|      0|    }
  243|      0|  }
  244|       |
  245|      2|  if(url) {
  ------------------
  |  Branch (245:6): [True: 0, False: 2]
  ------------------
  246|      0|    result = Curl_http_req_make2(&parser->req, m, m_len, url, scheme_default);
  247|      0|  }
  248|      2|  else {
  249|      2|    if(!scheme && scheme_default) {
  ------------------
  |  Branch (249:8): [True: 2, False: 0]
  |  Branch (249:19): [True: 0, False: 2]
  ------------------
  250|      0|      scheme = scheme_default;
  251|      0|      scheme_len = strlen(scheme_default);
  252|      0|    }
  253|      2|    result = Curl_http_req_make(&parser->req, m, m_len, scheme, scheme_len,
  254|      2|                                authority, authority_len, path, path_len);
  255|      2|  }
  256|       |
  257|      2|out:
  258|      2|  curl_url_cleanup(url);
  259|      2|  return result;
  260|      2|}

Curl_http2_may_switch:
 2843|  3.61k|{
 2844|  3.61k|  if(Curl_conn_http_version(data, data->conn) < 20 &&
  ------------------
  |  Branch (2844:6): [True: 3.61k, False: 0]
  ------------------
 2845|  3.61k|     (data->state.http_neg.wanted & CURL_HTTP_V2x) &&
  ------------------
  |  |   41|  3.61k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (2845:6): [True: 3.57k, False: 37]
  ------------------
 2846|  3.57k|     data->state.http_neg.h2_prior_knowledge) {
  ------------------
  |  Branch (2846:6): [True: 2, False: 3.57k]
  ------------------
 2847|      2|#ifndef CURL_DISABLE_PROXY
 2848|      2|    if(data->conn->bits.origin_is_proxy) {
  ------------------
  |  Branch (2848:8): [True: 0, False: 2]
  ------------------
 2849|      0|      infof(data, "Ignoring HTTP/2 prior knowledge due to proxy");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2850|      0|      return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 2851|      0|    }
 2852|      2|#endif
 2853|      2|    return TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
 2854|      2|  }
 2855|  3.60k|  return FALSE;
  ------------------
  |  | 1048|  3.60k|#define FALSE false
  ------------------
 2856|  3.61k|}
Curl_http2_switch:
 2859|      2|{
 2860|      2|  struct Curl_cfilter *cf;
 2861|      2|  CURLcode result;
 2862|       |
 2863|      2|  DEBUGASSERT(Curl_conn_http_version(data, data->conn) < 20);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2863:3): [True: 0, False: 2]
  |  Branch (2863:3): [True: 2, False: 0]
  ------------------
 2864|       |
 2865|      2|  result = http2_cfilter_add(&cf, data, data->conn, FIRSTSOCKET, FALSE);
  ------------------
  |  |  234|      2|#define FIRSTSOCKET     0
  ------------------
                result = http2_cfilter_add(&cf, data, data->conn, FIRSTSOCKET, FALSE);
  ------------------
  |  | 1048|      2|#define FALSE false
  ------------------
 2866|      2|  if(result)
  ------------------
  |  Branch (2866:6): [True: 0, False: 2]
  ------------------
 2867|      0|    return result;
 2868|      2|  CURL_TRC_CF(data, cf, "switching connection to HTTP/2");
  ------------------
  |  |  153|      2|  do {                                          \
  |  |  154|      2|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      2|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      4|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 2, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      4|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      2|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 2869|       |
 2870|      2|  if(cf->next) {
  ------------------
  |  Branch (2870:6): [True: 2, False: 0]
  ------------------
 2871|      2|    bool done;
 2872|      2|    return Curl_conn_cf_connect(cf, data, &done);
 2873|      2|  }
 2874|      0|  return CURLE_OK;
 2875|      2|}
Curl_nghttp2_malloc:
 2962|     37|{
 2963|     37|  (void)user_data;
 2964|     37|  return Curl_cmalloc(size);
 2965|     37|}
Curl_nghttp2_free:
 2968|     79|{
 2969|     79|  (void)user_data;
 2970|     79|  Curl_cfree(ptr);
 2971|     79|}
Curl_nghttp2_calloc:
 2974|      4|{
 2975|      4|  (void)user_data;
 2976|      4|  return Curl_ccalloc(nmemb, size);
 2977|      4|}
Curl_nghttp2_realloc:
 2980|      2|{
 2981|      2|  (void)user_data;
 2982|      2|  return Curl_crealloc(ptr, size);
 2983|      2|}
http2.c:populate_settings:
  218|      2|{
  219|      2|  iv[0].settings_id = NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS;
  220|      2|  iv[0].value = Curl_multi_max_concurrent_streams(data->multi);
  221|       |
  222|      2|  iv[1].settings_id = NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE;
  223|      2|  iv[1].value = cf_h2_initial_win_size(data);
  224|      2|  if(ctx)
  ------------------
  |  Branch (224:6): [True: 2, False: 0]
  ------------------
  225|      2|    ctx->initial_win_size = iv[1].value;
  226|      2|  iv[2].settings_id = NGHTTP2_SETTINGS_ENABLE_PUSH;
  227|      2|  iv[2].value = !!data->multi->push_cb;
  228|       |
  229|      2|  return 3;
  230|      2|}
http2.c:cf_h2_initial_win_size:
  203|      4|{
  204|      4|#if NGHTTP2_HAS_SET_LOCAL_WINDOW_SIZE
  205|       |  /* If the transfer has a rate-limit lower than the default initial
  206|       |   * stream window size, use that. It needs to be at least 8k or servers
  207|       |   * may be unhappy. */
  208|      4|  curl_off_t rps = Curl_rlimit_per_step(&data->progress.dl.rlimit);
  209|      4|  if((rps > 0) && (rps < H2_STREAM_WINDOW_SIZE_INITIAL))
  ------------------
  |  |   71|      0|#define H2_STREAM_WINDOW_SIZE_INITIAL  (64 * 1024)
  ------------------
  |  Branch (209:6): [True: 0, False: 4]
  |  Branch (209:19): [True: 0, False: 0]
  ------------------
  210|      0|    return CURLMAX((uint32_t)rps, 8192);
  ------------------
  |  | 1287|      0|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  211|      4|#endif
  212|      4|  return H2_STREAM_WINDOW_SIZE_INITIAL;
  ------------------
  |  |   71|      4|#define H2_STREAM_WINDOW_SIZE_INITIAL  (64 * 1024)
  ------------------
  213|      4|}
http2.c:cf_h2_destroy:
 2553|      2|{
 2554|      2|  struct cf_h2_ctx *ctx = cf->ctx;
 2555|       |
 2556|      2|  (void)data;
 2557|      2|  if(ctx) {
  ------------------
  |  Branch (2557:6): [True: 2, False: 0]
  ------------------
 2558|      2|    cf_h2_ctx_free(ctx);
 2559|       |    cf->ctx = NULL;
 2560|      2|  }
 2561|      2|}
http2.c:cf_h2_ctx_free:
  188|      2|{
  189|      2|  if(ctx && ctx->initialized) {
  ------------------
  |  Branch (189:6): [True: 2, False: 0]
  |  Branch (189:13): [True: 2, False: 0]
  ------------------
  190|      2|    if(ctx->h2)
  ------------------
  |  Branch (190:8): [True: 2, False: 0]
  ------------------
  191|      2|      nghttp2_session_del(ctx->h2);
  192|      2|    Curl_bufq_free(&ctx->inbufq);
  193|      2|    Curl_bufq_free(&ctx->outbufq);
  194|      2|    Curl_bufcp_free(&ctx->stream_bufcp);
  195|      2|    curlx_dyn_free(&ctx->scratch);
  196|      2|    Curl_uint32_hash_destroy(&ctx->streams);
  197|      2|    memset(ctx, 0, sizeof(*ctx));
  198|      2|  }
  199|      2|  curlx_free(ctx);
  ------------------
  |  | 1476|      2|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  200|      2|}
http2.c:cf_h2_connect:
 2501|      2|{
 2502|      2|  struct cf_h2_ctx *ctx = cf->ctx;
 2503|      2|  CURLcode result = CURLE_OK;
 2504|      2|  struct cf_call_data save;
 2505|      2|  bool first_time = FALSE;
  ------------------
  |  | 1048|      2|#define FALSE false
  ------------------
 2506|       |
 2507|      2|  if(cf->connected) {
  ------------------
  |  Branch (2507:6): [True: 0, False: 2]
  ------------------
 2508|      0|    *done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2509|      0|    return CURLE_OK;
 2510|      0|  }
 2511|       |
 2512|       |  /* Connect the lower filters first */
 2513|      2|  if(!cf->next->connected) {
  ------------------
  |  Branch (2513:6): [True: 0, False: 2]
  ------------------
 2514|      0|    result = Curl_conn_cf_connect(cf->next, data, done);
 2515|      0|    if(result || !*done)
  ------------------
  |  Branch (2515:8): [True: 0, False: 0]
  |  Branch (2515:18): [True: 0, False: 0]
  ------------------
 2516|      0|      return result;
 2517|      0|  }
 2518|       |
 2519|      2|  *done = FALSE;
  ------------------
  |  | 1048|      2|#define FALSE false
  ------------------
 2520|       |
 2521|      2|  CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  669|      2|  do { \
  |  |  670|      2|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  118|      2|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  671|      2|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  672|      2|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  118|      2|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  673|      2|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  118|      2|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |                   CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  856|      2|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  674|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (674:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
  |  Branch (2521:3): [True: 2, False: 0]
  |  Branch (2521:3): [True: 0, False: 0]
  |  Branch (2521:3): [True: 2, False: 0]
  |  Branch (2521:3): [True: 0, False: 0]
  ------------------
 2522|      2|  DEBUGASSERT(ctx->initialized);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2522:3): [True: 0, False: 2]
  |  Branch (2522:3): [True: 2, False: 0]
  ------------------
 2523|      2|  if(!ctx->h2) {
  ------------------
  |  Branch (2523:6): [True: 2, False: 0]
  ------------------
 2524|      2|    result = cf_h2_ctx_open(cf, data);
 2525|      2|    if(result)
  ------------------
  |  Branch (2525:8): [True: 0, False: 2]
  ------------------
 2526|      0|      goto out;
 2527|      2|    first_time = TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
 2528|      2|  }
 2529|       |
 2530|      2|  if(!first_time) {
  ------------------
  |  Branch (2530:6): [True: 0, False: 2]
  ------------------
 2531|      0|    result = h2_progress_ingress(cf, data, 0);
 2532|      0|    if(result)
  ------------------
  |  Branch (2532:8): [True: 0, False: 0]
  ------------------
 2533|      0|      goto out;
 2534|      0|  }
 2535|       |
 2536|       |  /* Send out our SETTINGS and ACKs and such. If that blocks, we
 2537|       |   * have it buffered and can count this filter as being connected */
 2538|      2|  result = h2_progress_egress(cf, data);
 2539|      2|  if(result && (result != CURLE_AGAIN))
  ------------------
  |  Branch (2539:6): [True: 0, False: 2]
  |  Branch (2539:16): [True: 0, False: 0]
  ------------------
 2540|      0|    goto out;
 2541|       |
 2542|      2|  *done = TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
 2543|      2|  cf->connected = TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
 2544|      2|  result = CURLE_OK;
 2545|       |
 2546|      2|out:
 2547|      2|  CURL_TRC_CF(data, cf, "cf_connect() -> %d, %d, ", (int)result, *done);
  ------------------
  |  |  153|      2|  do {                                          \
  |  |  154|      2|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      2|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      4|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 2, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      4|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      2|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 2548|      2|  CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  677|      2|  do { \
  |  |  678|      2|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  679|      2|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  680|      2|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  118|      2|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  681|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (681:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
  |  Branch (2548:3): [True: 0, False: 2]
  |  Branch (2548:3): [True: 2, False: 0]
  |  Branch (2548:3): [True: 2, False: 0]
  |  Branch (2548:3): [True: 0, False: 0]
  |  Branch (2548:3): [True: 2, False: 0]
  |  Branch (2548:3): [True: 0, False: 0]
  ------------------
 2549|      2|  return result;
 2550|      2|}
http2.c:cf_h2_ctx_open:
 2379|      2|{
 2380|      2|  struct cf_h2_ctx *ctx = cf->ctx;
 2381|      2|  struct h2_stream_ctx *stream;
 2382|      2|  CURLcode result = CURLE_OUT_OF_MEMORY;
 2383|      2|  int rc;
 2384|      2|  nghttp2_session_callbacks *cbs = NULL;
 2385|       |
 2386|      2|  DEBUGASSERT(!ctx->h2);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2386:3): [True: 0, False: 2]
  |  Branch (2386:3): [True: 2, False: 0]
  ------------------
 2387|      2|  DEBUGASSERT(ctx->initialized);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2387:3): [True: 0, False: 2]
  |  Branch (2387:3): [True: 2, False: 0]
  ------------------
 2388|       |
 2389|      2|  rc = nghttp2_session_callbacks_new(&cbs);
 2390|      2|  if(rc) {
  ------------------
  |  Branch (2390:6): [True: 0, False: 2]
  ------------------
 2391|      0|    failf(data, "Could not initialize nghttp2 callbacks");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2392|      0|    goto out;
 2393|      0|  }
 2394|       |
 2395|      2|  nghttp2_session_callbacks_set_send_callback(cbs, send_callback);
 2396|      2|  nghttp2_session_callbacks_set_on_frame_recv_callback(cbs, on_frame_recv);
 2397|      2|  nghttp2_session_callbacks_set_on_invalid_frame_recv_callback(cbs,
 2398|      2|    cf_h2_on_invalid_frame_recv);
 2399|      2|#ifdef CURLVERBOSE
 2400|      2|  nghttp2_session_callbacks_set_on_frame_send_callback(cbs, on_frame_send);
 2401|      2|#endif
 2402|      2|  nghttp2_session_callbacks_set_on_data_chunk_recv_callback(
 2403|      2|    cbs, on_data_chunk_recv);
 2404|      2|  nghttp2_session_callbacks_set_on_stream_close_callback(cbs, on_stream_close);
 2405|      2|  nghttp2_session_callbacks_set_on_begin_headers_callback(
 2406|      2|    cbs, on_begin_headers);
 2407|      2|  nghttp2_session_callbacks_set_on_header_callback(cbs, on_header);
 2408|      2|#ifdef CURLVERBOSE
 2409|      2|  nghttp2_session_callbacks_set_error_callback(cbs, error_callback);
 2410|      2|#endif
 2411|       |
 2412|       |  /* The nghttp2 session is not yet setup, do it */
 2413|      2|  rc = h2_client_new(cf, cbs);
 2414|      2|  if(rc) {
  ------------------
  |  Branch (2414:6): [True: 0, False: 2]
  ------------------
 2415|      0|    failf(data, "Could not initialize nghttp2");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2416|      0|    goto out;
 2417|      0|  }
 2418|      2|  ctx->max_concurrent_streams = data->multi ?
  ------------------
  |  Branch (2418:33): [True: 2, False: 0]
  ------------------
 2419|      2|    Curl_multi_max_concurrent_streams(data->multi) :
 2420|      2|    DEFAULT_MAX_CONCURRENT_STREAMS;
  ------------------
  |  |   32|      2|#define DEFAULT_MAX_CONCURRENT_STREAMS 100
  ------------------
 2421|       |
 2422|      2|  if(ctx->via_h1_upgrade) {
  ------------------
  |  Branch (2422:6): [True: 0, False: 2]
  ------------------
 2423|       |    /* HTTP/1.1 Upgrade issued. H2 Settings have already been submitted
 2424|       |     * in the H1 request and we upgrade from there. This stream
 2425|       |     * is opened implicitly as #1. */
 2426|      0|    uint8_t binsettings[H2_BINSETTINGS_LEN];
 2427|      0|    ssize_t rclen;
 2428|      0|    size_t binlen; /* length of the binsettings data */
 2429|       |
 2430|      0|    rclen = populate_binsettings(binsettings, data);
 2431|       |
 2432|      0|    if(!curlx_sztouz(rclen, &binlen) || !binlen) {
  ------------------
  |  Branch (2432:8): [True: 0, False: 0]
  |  Branch (2432:41): [True: 0, False: 0]
  ------------------
 2433|      0|      failf(data, "nghttp2 unexpectedly failed on pack_settings_payload");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2434|      0|      result = CURLE_FAILED_INIT;
 2435|      0|      goto out;
 2436|      0|    }
 2437|       |
 2438|      0|    result = http2_data_setup(cf, data, &stream);
 2439|      0|    if(result)
  ------------------
  |  Branch (2439:8): [True: 0, False: 0]
  ------------------
 2440|      0|      goto out;
 2441|      0|    DEBUGASSERT(stream);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2441:5): [True: 0, False: 0]
  |  Branch (2441:5): [True: 0, False: 0]
  ------------------
 2442|      0|    stream->id = 1;
 2443|       |    /* queue SETTINGS frame (again) */
 2444|      0|    rc = nghttp2_session_upgrade2(ctx->h2, binsettings, binlen,
 2445|      0|                                  data->state.httpreq == HTTPREQ_HEAD,
 2446|      0|                                  NULL);
 2447|      0|    if(rc) {
  ------------------
  |  Branch (2447:8): [True: 0, False: 0]
  ------------------
 2448|      0|      failf(data, "nghttp2_session_upgrade2() failed: %s(%d)",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2449|      0|            nghttp2_strerror(rc), rc);
 2450|      0|      result = CURLE_HTTP2;
 2451|      0|      goto out;
 2452|      0|    }
 2453|       |
 2454|      0|    rc = nghttp2_session_set_stream_user_data(ctx->h2, stream->id,
 2455|      0|                                              data);
 2456|      0|    if(rc) {
  ------------------
  |  Branch (2456:8): [True: 0, False: 0]
  ------------------
 2457|      0|      infof(data, "http/2: failed to set user_data for stream %d",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2458|      0|            stream->id);
 2459|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2459:7): [Folded, False: 0]
  |  Branch (2459:7): [Folded, False: 0]
  ------------------
 2460|      0|    }
 2461|      0|    CURL_TRC_CF(data, cf, "created session via Upgrade");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 2462|      0|  }
 2463|      2|  else {
 2464|      2|    nghttp2_settings_entry iv[H2_SETTINGS_IV_LEN];
 2465|      2|    size_t ivlen;
 2466|       |
 2467|      2|    ivlen = populate_settings(iv, data, ctx);
 2468|      2|    rc = nghttp2_submit_settings(ctx->h2, NGHTTP2_FLAG_NONE,
 2469|      2|                                 iv, ivlen);
 2470|      2|    if(rc) {
  ------------------
  |  Branch (2470:8): [True: 0, False: 2]
  ------------------
 2471|      0|      failf(data, "nghttp2_submit_settings() failed: %s(%d)",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2472|      0|            nghttp2_strerror(rc), rc);
 2473|      0|      result = CURLE_HTTP2;
 2474|      0|      goto out;
 2475|      0|    }
 2476|      2|  }
 2477|       |
 2478|      2|  rc = nghttp2_session_set_local_window_size(ctx->h2, NGHTTP2_FLAG_NONE, 0,
 2479|      2|                                             HTTP2_HUGE_WINDOW_SIZE);
  ------------------
  |  |   85|      2|#define HTTP2_HUGE_WINDOW_SIZE (100 * H2_STREAM_WINDOW_SIZE_MAX)
  |  |  ------------------
  |  |  |  |   67|      2|#define H2_STREAM_WINDOW_SIZE_MAX   (10 * 1024 * 1024)
  |  |  ------------------
  ------------------
 2480|      2|  if(rc) {
  ------------------
  |  Branch (2480:6): [True: 0, False: 2]
  ------------------
 2481|      0|    failf(data, "nghttp2_session_set_local_window_size() failed: %s(%d)",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2482|      0|          nghttp2_strerror(rc), rc);
 2483|      0|    result = CURLE_HTTP2;
 2484|      0|    goto out;
 2485|      0|  }
 2486|       |
 2487|       |  /* all set, traffic will be send on connect */
 2488|      2|  result = CURLE_OK;
 2489|      2|  CURL_TRC_CF(data, cf, "[0] created h2 session%s",
  ------------------
  |  |  153|      2|  do {                                          \
  |  |  154|      2|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      2|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      4|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 2, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      4|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      2|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      2|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
 2490|      2|              ctx->via_h1_upgrade ? " (via h1 upgrade)" : "");
 2491|       |
 2492|      2|out:
 2493|      2|  if(cbs)
  ------------------
  |  Branch (2493:6): [True: 2, False: 0]
  ------------------
 2494|      2|    nghttp2_session_callbacks_del(cbs);
 2495|      2|  return result;
 2496|      2|}
http2.c:send_callback:
  608|     15|{
  609|     15|  struct Curl_cfilter *cf = userp;
  610|     15|  struct cf_h2_ctx *ctx = cf->ctx;
  611|     15|  struct Curl_easy *data = CF_DATA_CURRENT(cf);
  ------------------
  |  |  698|     15|#define CF_DATA_CURRENT(cf) ((cf) ? (CF_CTX_CALL_DATA(cf).data) : NULL)
  |  |  ------------------
  |  |  |  |  118|     15|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  |  Branch (698:30): [True: 15, False: 0]
  |  |  ------------------
  ------------------
  612|     15|  size_t nwritten;
  613|     15|  CURLcode result = CURLE_OK;
  614|       |
  615|     15|  (void)h2;
  616|     15|  (void)flags;
  617|     15|  DEBUGASSERT(data);
  ------------------
  |  | 1075|     15|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (617:3): [True: 0, False: 15]
  |  Branch (617:3): [True: 15, False: 0]
  ------------------
  618|       |
  619|     15|  if(!cf->connected)
  ------------------
  |  Branch (619:6): [True: 6, False: 9]
  ------------------
  620|      6|    result = Curl_bufq_write(&ctx->outbufq, buf, blen, &nwritten);
  621|      9|  else
  622|      9|    result = Curl_cf_send_bufq(cf->next, data, &ctx->outbufq, buf, blen,
  623|      9|                               &nwritten);
  624|       |
  625|     15|  if(result) {
  ------------------
  |  Branch (625:6): [True: 0, False: 15]
  ------------------
  626|      0|    if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (626:8): [True: 0, False: 0]
  ------------------
  627|      0|      ctx->nw_out_blocked = 1;
  628|      0|      return NGHTTP2_ERR_WOULDBLOCK;
  629|      0|    }
  630|      0|    failf(data, "Failed sending HTTP2 data");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  631|      0|    return NGHTTP2_ERR_CALLBACK_FAILURE;
  632|      0|  }
  633|       |
  634|     15|  if(!nwritten) {
  ------------------
  |  Branch (634:6): [True: 0, False: 15]
  ------------------
  635|      0|    ctx->nw_out_blocked = 1;
  636|      0|    return NGHTTP2_ERR_WOULDBLOCK;
  637|      0|  }
  638|     15|  return (nwritten > SSIZE_MAX) ?
  ------------------
  |  Branch (638:10): [True: 0, False: 15]
  ------------------
  639|     15|    NGHTTP2_ERR_CALLBACK_FAILURE : (ssize_t)nwritten;
  640|     15|}
http2.c:on_frame_recv:
 1156|      2|{
 1157|      2|  struct Curl_cfilter *cf = userp;
 1158|      2|  struct cf_h2_ctx *ctx = cf->ctx;
 1159|      2|  struct Curl_easy *data = CF_DATA_CURRENT(cf), *data_s;
  ------------------
  |  |  698|      2|#define CF_DATA_CURRENT(cf) ((cf) ? (CF_CTX_CALL_DATA(cf).data) : NULL)
  |  |  ------------------
  |  |  |  |  118|      2|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  |  Branch (698:30): [True: 2, False: 0]
  |  |  ------------------
  ------------------
 1160|      2|  int32_t stream_id = frame->hd.stream_id;
 1161|       |
 1162|      2|  DEBUGASSERT(data);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1162:3): [True: 0, False: 2]
  |  Branch (1162:3): [True: 2, False: 0]
  ------------------
 1163|      2|#ifdef CURLVERBOSE
 1164|      2|  if(Curl_trc_cf_is_verbose(cf, data)) {
  ------------------
  |  |  326|      2|  (Curl_trc_is_verbose(data) &&                       \
  |  |  ------------------
  |  |  |  |  322|      4|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 2, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  323|      4|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  327|      2|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1165|      0|    char buffer[256];
 1166|      0|    int len;
 1167|      0|    len = Curl_nghttp2_fr_print(frame, buffer, sizeof(buffer) - 1);
 1168|      0|    buffer[len] = 0;
 1169|      0|    CURL_TRC_CF(data, cf, "[%d] <- %s", frame->hd.stream_id, buffer);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1170|      0|  }
 1171|      2|#endif /* CURLVERBOSE */
 1172|       |
 1173|      2|  if(!stream_id) {
  ------------------
  |  Branch (1173:6): [True: 2, False: 0]
  ------------------
 1174|       |    /* stream ID zero is for connection-oriented stuff */
 1175|      2|    DEBUGASSERT(data);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1175:5): [True: 0, False: 2]
  |  Branch (1175:5): [True: 2, False: 0]
  ------------------
 1176|      2|    switch(frame->hd.type) {
 1177|      2|    case NGHTTP2_SETTINGS: {
  ------------------
  |  Branch (1177:5): [True: 2, False: 0]
  ------------------
 1178|      2|      if(!(frame->hd.flags & NGHTTP2_FLAG_ACK)) {
  ------------------
  |  Branch (1178:10): [True: 1, False: 1]
  ------------------
 1179|      1|        uint32_t max_conn = ctx->max_concurrent_streams;
 1180|      1|        ctx->max_concurrent_streams = nghttp2_session_get_remote_settings(
 1181|      1|          session, NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS);
 1182|      1|        ctx->enable_push = nghttp2_session_get_remote_settings(
 1183|      1|          session, NGHTTP2_SETTINGS_ENABLE_PUSH) != 0;
 1184|      1|        CURL_TRC_CF(data, cf, "[0] MAX_CONCURRENT_STREAMS: %u",
  ------------------
  |  |  153|      1|  do {                                          \
  |  |  154|      1|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      1|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      1|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1185|      1|                    ctx->max_concurrent_streams);
 1186|      1|        CURL_TRC_CF(data, cf, "[0] ENABLE_PUSH: %s",
  ------------------
  |  |  153|      1|  do {                                          \
  |  |  154|      1|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      1|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      1|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      1|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
 1187|      1|                    ctx->enable_push ? "TRUE" : "false");
 1188|      1|        if(data && max_conn != ctx->max_concurrent_streams) {
  ------------------
  |  Branch (1188:12): [True: 1, False: 0]
  |  Branch (1188:20): [True: 1, False: 0]
  ------------------
 1189|       |          /* only signal change if the value actually changed */
 1190|      1|          CURL_TRC_CF(data, cf, "[0] notify MAX_CONCURRENT_STREAMS: %u",
  ------------------
  |  |  153|      1|  do {                                          \
  |  |  154|      1|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      1|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      1|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1191|      1|                      ctx->max_concurrent_streams);
 1192|      1|          Curl_multi_connchanged(data->multi);
 1193|      1|        }
 1194|       |        /* Since the initial stream window is 64K, a request might be on HOLD,
 1195|       |         * due to exhaustion. The (initial) SETTINGS may announce a much larger
 1196|       |         * window and *assume* that we treat this like a WINDOW_UPDATE. Some
 1197|       |         * servers send an explicit WINDOW_UPDATE, but not all seem to do that.
 1198|       |         * To be safe, we UNHOLD a stream in order not to stall. */
 1199|      1|        if(CURL_REQ_WANT_SEND(data))
  ------------------
  |  |   39|      1|#define CURL_REQ_WANT_SEND(d)  ((d)->req.io_flags & REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|      1|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  |  |  |  Branch (39:32): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 1200|      0|          Curl_multi_mark_dirty(data);
 1201|      1|      }
 1202|      2|      break;
 1203|      0|    }
 1204|      0|    case NGHTTP2_GOAWAY:
  ------------------
  |  Branch (1204:5): [True: 0, False: 2]
  ------------------
 1205|      0|      ctx->rcvd_goaway = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1206|      0|      ctx->goaway_error = frame->goaway.error_code;
 1207|      0|      ctx->remote_max_sid = frame->goaway.last_stream_id;
 1208|      0|      if(data) {
  ------------------
  |  Branch (1208:10): [True: 0, False: 0]
  ------------------
 1209|      0|        infof(data, "received GOAWAY, error=%u, last_stream=%d",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1210|      0|              ctx->goaway_error, ctx->remote_max_sid);
 1211|      0|        Curl_multi_connchanged(data->multi);
 1212|      0|      }
 1213|      0|      break;
 1214|      0|    default:
  ------------------
  |  Branch (1214:5): [True: 0, False: 2]
  ------------------
 1215|      0|      break;
 1216|      2|    }
 1217|      2|    return 0;
 1218|      2|  }
 1219|       |
 1220|      0|  data_s = nghttp2_session_get_stream_user_data(session, stream_id);
 1221|      0|  if(!data_s) {
  ------------------
  |  Branch (1221:6): [True: 0, False: 0]
  ------------------
 1222|      0|    CURL_TRC_CF(data, cf, "[%d] No Curl_easy associated", stream_id);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1223|      0|    return 0;
 1224|      0|  }
 1225|       |
 1226|      0|  return on_stream_frame(cf, data_s, frame) ? NGHTTP2_ERR_CALLBACK_FAILURE : 0;
  ------------------
  |  Branch (1226:10): [True: 0, False: 0]
  ------------------
 1227|      0|}
http2.c:h2_xfer_write_resp_hd:
  899|      1|{
  900|       |  /* If we already encountered an error, skip further writes */
  901|      1|  if(!stream->xfer_result) {
  ------------------
  |  Branch (901:6): [True: 1, False: 0]
  ------------------
  902|      1|    stream->xfer_result = Curl_xfer_write_resp_hd(data, buf, blen, eos);
  903|      1|    if(!stream->xfer_result && !eos)
  ------------------
  |  Branch (903:8): [True: 1, False: 0]
  |  Branch (903:32): [True: 1, False: 0]
  ------------------
  904|      1|      stream->xfer_result = cf_h2_update_local_win(cf, data, stream);
  905|      1|    if(stream->xfer_result)
  ------------------
  |  Branch (905:8): [True: 0, False: 1]
  ------------------
  906|      0|      CURL_TRC_CF(data, cf, "[%d] error %d writing %zu bytes of headers",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  907|      1|                  stream->id, (int)stream->xfer_result, blen);
  908|      1|  }
  909|      1|}
http2.c:cf_h2_update_local_win:
  303|      9|{
  304|      9|  struct cf_h2_ctx *ctx = cf->ctx;
  305|      9|  int32_t dwsize;
  306|      9|  int rv;
  307|       |
  308|      9|  dwsize = (stream->write_paused || stream->xfer_result) ?
  ------------------
  |  Branch (308:13): [True: 0, False: 9]
  |  Branch (308:37): [True: 0, False: 9]
  ------------------
  309|      9|           0 : cf_h2_get_desired_local_win(cf, data);
  310|      9|  if(dwsize != stream->local_window_size) {
  ------------------
  |  Branch (310:6): [True: 2, False: 7]
  ------------------
  311|      2|    int32_t wsize = nghttp2_session_get_stream_effective_local_window_size(
  312|      2|                      ctx->h2, stream->id);
  313|      2|    if(dwsize > wsize) {
  ------------------
  |  Branch (313:8): [True: 2, False: 0]
  ------------------
  314|      2|      rv = nghttp2_session_set_local_window_size(ctx->h2, NGHTTP2_FLAG_NONE,
  315|      2|                                                 stream->id, dwsize);
  316|      2|      if(rv) {
  ------------------
  |  Branch (316:10): [True: 0, False: 2]
  ------------------
  317|      0|        failf(data, "[%d] nghttp2 set_local_window_size(%d) failed: "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  318|      0|              "%s(%d)", stream->id, dwsize, nghttp2_strerror(rv), rv);
  319|      0|        return CURLE_HTTP2;
  320|      0|      }
  321|      2|      rv = nghttp2_submit_window_update(ctx->h2, NGHTTP2_FLAG_NONE,
  322|      2|                                        stream->id, dwsize - wsize);
  323|      2|      if(rv) {
  ------------------
  |  Branch (323:10): [True: 0, False: 2]
  ------------------
  324|      0|        failf(data, "[%d] nghttp2_submit_window_update() failed: "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  325|      0|              "%s(%d)", stream->id, nghttp2_strerror(rv), rv);
  326|      0|        return CURLE_HTTP2;
  327|      0|      }
  328|      2|      stream->local_window_size = dwsize;
  329|      2|      CURL_TRC_CF(data, cf, "[%d] local window update by %d",
  ------------------
  |  |  153|      2|  do {                                          \
  |  |  154|      2|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      2|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      4|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 2, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      4|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      2|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  330|      2|                  stream->id, dwsize - wsize);
  331|      2|    }
  332|      0|    else {
  333|      0|      rv = nghttp2_session_set_local_window_size(ctx->h2, NGHTTP2_FLAG_NONE,
  334|      0|                                                 stream->id, dwsize);
  335|      0|      if(rv) {
  ------------------
  |  Branch (335:10): [True: 0, False: 0]
  ------------------
  336|      0|        failf(data, "[%d] nghttp2_session_set_local_window_size() failed: "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  337|      0|              "%s(%d)", stream->id, nghttp2_strerror(rv), rv);
  338|      0|        return CURLE_HTTP2;
  339|      0|      }
  340|      0|      stream->local_window_size = dwsize;
  341|      0|      CURL_TRC_CF(data, cf, "[%d] local window size now %d",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  342|      0|                  stream->id, dwsize);
  343|      0|    }
  344|      2|  }
  345|      9|  return CURLE_OK;
  346|      9|}
http2.c:cf_h2_get_desired_local_win:
  287|      9|{
  288|      9|  curl_off_t avail = Curl_rlimit_avail(&data->progress.dl.rlimit, NULL);
  289|       |
  290|      9|  (void)cf;
  291|      9|  if(avail < CURL_OFF_T_MAX) { /* limit in place */
  ------------------
  |  |  588|      9|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (291:6): [True: 0, False: 9]
  ------------------
  292|      0|    if(avail <= 0)
  ------------------
  |  Branch (292:8): [True: 0, False: 0]
  ------------------
  293|      0|      return 0;
  294|      0|    else if(avail < INT32_MAX)
  ------------------
  |  Branch (294:13): [True: 0, False: 0]
  ------------------
  295|      0|      return (int32_t)avail;
  296|      0|  }
  297|      9|  return H2_STREAM_WINDOW_SIZE_MAX;
  ------------------
  |  |   67|      9|#define H2_STREAM_WINDOW_SIZE_MAX   (10 * 1024 * 1024)
  ------------------
  298|      9|}
http2.c:http2_data_done:
  417|      2|{
  418|      2|  struct cf_h2_ctx *ctx = cf->ctx;
  419|      2|  struct h2_stream_ctx *stream = H2_STREAM_CTX(ctx, data);
  ------------------
  |  |  257|      2|  ((struct h2_stream_ctx *)(                                             \
  |  |  258|      2|    (data) ? Curl_uint32_hash_get(&(ctx)->streams, (data)->mid) : NULL))
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  420|       |
  421|      2|  DEBUGASSERT(ctx);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (421:3): [True: 0, False: 2]
  |  Branch (421:3): [True: 2, False: 0]
  ------------------
  422|      2|  if(!stream || !ctx->initialized)
  ------------------
  |  Branch (422:6): [True: 0, False: 2]
  |  Branch (422:17): [True: 0, False: 2]
  ------------------
  423|      0|    return;
  424|       |
  425|      2|  if(ctx->h2) {
  ------------------
  |  Branch (425:6): [True: 2, False: 0]
  ------------------
  426|      2|    bool flush_egress = FALSE;
  ------------------
  |  | 1048|      2|#define FALSE false
  ------------------
  427|       |    /* returns error if stream not known, which is fine here */
  428|      2|    (void)nghttp2_session_set_stream_user_data(ctx->h2, stream->id, NULL);
  429|       |
  430|      2|    if(!stream->closed && stream->id > 0) {
  ------------------
  |  Branch (430:8): [True: 2, False: 0]
  |  Branch (430:27): [True: 2, False: 0]
  ------------------
  431|       |      /* RST_STREAM */
  432|      2|      CURL_TRC_CF(data, cf, "[%d] premature DATA_DONE, RST stream",
  ------------------
  |  |  153|      2|  do {                                          \
  |  |  154|      2|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      2|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      4|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 2, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      4|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      2|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  433|      2|                  stream->id);
  434|      2|      stream->closed = TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
  435|      2|      stream->reset = TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
  436|      2|      nghttp2_submit_rst_stream(ctx->h2, NGHTTP2_FLAG_NONE,
  437|      2|                                stream->id, NGHTTP2_STREAM_CLOSED);
  438|      2|      flush_egress = TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
  439|      2|    }
  440|       |
  441|      2|    if(flush_egress) {
  ------------------
  |  Branch (441:8): [True: 2, False: 0]
  ------------------
  442|      2|      (void)nghttp2_session_send(ctx->h2);
  443|      2|      (void)nw_out_flush(cf, data);
  444|      2|    }
  445|      2|  }
  446|       |
  447|      2|  Curl_uint32_hash_remove(&ctx->streams, data->mid);
  448|      2|}
http2.c:nw_out_flush:
  395|      8|{
  396|      8|  struct cf_h2_ctx *ctx = cf->ctx;
  397|      8|  size_t nwritten;
  398|      8|  CURLcode result;
  399|       |
  400|      8|  if(Curl_bufq_is_empty(&ctx->outbufq))
  ------------------
  |  Branch (400:6): [True: 1, False: 7]
  ------------------
  401|      1|    return CURLE_OK;
  402|       |
  403|      7|  result = Curl_cf_send_bufq(cf->next, data, &ctx->outbufq, NULL, 0,
  404|      7|                             &nwritten);
  405|      7|  if(result) {
  ------------------
  |  Branch (405:6): [True: 0, False: 7]
  ------------------
  406|      0|    if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (406:8): [True: 0, False: 0]
  ------------------
  407|      0|      CURL_TRC_CF(data, cf, "flush nw send buffer(%zu) -> EAGAIN",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  408|      0|                  Curl_bufq_len(&ctx->outbufq));
  409|      0|      ctx->nw_out_blocked = 1;
  410|      0|    }
  411|      0|    return result;
  412|      0|  }
  413|      7|  return Curl_bufq_is_empty(&ctx->outbufq) ? CURLE_OK : CURLE_AGAIN;
  ------------------
  |  Branch (413:10): [True: 7, False: 0]
  ------------------
  414|      7|}
http2.c:free_push_headers:
  151|      2|{
  152|      2|  size_t i;
  153|      2|  for(i = 0; i < stream->push_headers_used; i++)
  ------------------
  |  Branch (153:14): [True: 0, False: 2]
  ------------------
  154|      0|    curlx_free(stream->push_headers[i]);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  155|       |  curlx_safefree(stream->push_headers);
  ------------------
  |  | 1332|      2|  do {                      \
  |  | 1333|      2|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|      2|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|      2|    (ptr) = NULL;           \
  |  | 1335|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
  156|      2|  stream->push_headers_used = 0;
  157|      2|}
http2.c:on_frame_send:
 1129|     13|{
 1130|     13|  struct Curl_cfilter *cf = userp;
 1131|     13|  struct cf_h2_ctx *ctx = cf->ctx;
 1132|     13|  struct Curl_easy *data = CF_DATA_CURRENT(cf);
  ------------------
  |  |  698|     13|#define CF_DATA_CURRENT(cf) ((cf) ? (CF_CTX_CALL_DATA(cf).data) : NULL)
  |  |  ------------------
  |  |  |  |  118|     13|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  |  Branch (698:30): [True: 13, False: 0]
  |  |  ------------------
  ------------------
 1133|       |
 1134|     13|  (void)session;
 1135|     13|  DEBUGASSERT(data);
  ------------------
  |  | 1075|     13|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1135:3): [True: 0, False: 13]
  |  Branch (1135:3): [True: 13, False: 0]
  ------------------
 1136|     13|  if(Curl_trc_cf_is_verbose(cf, data)) {
  ------------------
  |  |  326|     13|  (Curl_trc_is_verbose(data) &&                       \
  |  |  ------------------
  |  |  |  |  322|     26|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 13, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 13]
  |  |  |  |  ------------------
  |  |  |  |  323|     26|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  327|     13|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1137|      0|    char buffer[256];
 1138|      0|    int len;
 1139|      0|    len = Curl_nghttp2_fr_print(frame, buffer, sizeof(buffer) - 1);
 1140|      0|    buffer[len] = 0;
 1141|      0|    CURL_TRC_CF(data, cf, "[%d] -> %s", frame->hd.stream_id, buffer);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1142|      0|  }
 1143|     13|  if((frame->hd.type == NGHTTP2_GOAWAY) && !ctx->sent_goaway) {
  ------------------
  |  Branch (1143:6): [True: 0, False: 13]
  |  Branch (1143:44): [True: 0, False: 0]
  ------------------
 1144|       |    /* A GOAWAY not initiated by us, but by nghttp2 itself on detecting
 1145|       |     * a protocol error on the connection */
 1146|      0|    failf(data, "nghttp2 shuts down connection with error %u: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1147|      0|          frame->goaway.error_code,
 1148|      0|          nghttp2_http2_strerror(frame->goaway.error_code));
 1149|      0|  }
 1150|     13|  return 0;
 1151|     13|}
http2.c:on_stream_close:
 1300|      2|{
 1301|      2|  struct Curl_cfilter *cf = userp;
 1302|      2|  struct cf_h2_ctx *ctx = cf->ctx;
 1303|      2|  struct Curl_easy *data_s, *call_data = CF_DATA_CURRENT(cf);
  ------------------
  |  |  698|      2|#define CF_DATA_CURRENT(cf) ((cf) ? (CF_CTX_CALL_DATA(cf).data) : NULL)
  |  |  ------------------
  |  |  |  |  118|      2|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  |  Branch (698:30): [True: 2, False: 0]
  |  |  ------------------
  ------------------
 1304|      2|  struct h2_stream_ctx *stream;
 1305|      2|  int rv;
 1306|      2|  (void)session;
 1307|       |
 1308|      2|  DEBUGASSERT(call_data);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1308:3): [True: 0, False: 2]
  |  Branch (1308:3): [True: 2, False: 0]
  ------------------
 1309|       |  /* stream id 0 is the connection, do not look there for streams. */
 1310|      2|  data_s = stream_id ?
  ------------------
  |  Branch (1310:12): [True: 2, False: 0]
  ------------------
 1311|      2|    nghttp2_session_get_stream_user_data(session, stream_id) : NULL;
 1312|      2|  if(!data_s) {
  ------------------
  |  Branch (1312:6): [True: 2, False: 0]
  ------------------
 1313|      2|    CURL_TRC_CF(call_data, cf,
  ------------------
  |  |  153|      2|  do {                                          \
  |  |  154|      2|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      2|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      4|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 2, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      4|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      2|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1314|      2|                "[%d] on_stream_close, no easy set on stream", stream_id);
 1315|      2|    return 0;
 1316|      2|  }
 1317|      0|  if(!GOOD_EASY_HANDLE(data_s)) {
  ------------------
  |  |   34|      0|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |   28|      0|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (34:5): [True: 0, False: 0]
  |  |  |  Branch (34:12): [True: 0, False: 0]
  |  |  ------------------
  |  |   35|      0|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (1317:6): [True: 0, False: 0]
  |  Branch (1317:7): [True: 0, False: 0]
  |  Branch (1317:7): [True: 0, False: 0]
  ------------------
 1318|       |    /* nghttp2 still has an easy registered for the stream which has
 1319|       |     * been freed be libcurl. This points to a code path that does not
 1320|       |     * trigger DONE or DETACH events as it must. */
 1321|      0|    CURL_TRC_CF(call_data, cf,
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1322|      0|                "[%d] on_stream_close, not a GOOD easy on stream", stream_id);
 1323|      0|    (void)nghttp2_session_set_stream_user_data(session, stream_id, 0);
 1324|      0|    return NGHTTP2_ERR_CALLBACK_FAILURE;
 1325|      0|  }
 1326|      0|  stream = H2_STREAM_CTX(ctx, data_s);
  ------------------
  |  |  257|      0|  ((struct h2_stream_ctx *)(                                             \
  |  |  258|      0|    (data) ? Curl_uint32_hash_get(&(ctx)->streams, (data)->mid) : NULL))
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1327|      0|  if(!stream) {
  ------------------
  |  Branch (1327:6): [True: 0, False: 0]
  ------------------
 1328|      0|    CURL_TRC_CF(data_s, cf,
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1329|      0|                "[%d] on_stream_close, GOOD easy but no stream", stream_id);
 1330|      0|    return NGHTTP2_ERR_CALLBACK_FAILURE;
 1331|      0|  }
 1332|       |
 1333|      0|  stream->closed = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1334|      0|  stream->error = error_code;
 1335|      0|  if(stream->error)
  ------------------
  |  Branch (1335:6): [True: 0, False: 0]
  ------------------
 1336|      0|    stream->reset = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1337|       |
 1338|      0|  if(stream->error)
  ------------------
  |  Branch (1338:6): [True: 0, False: 0]
  ------------------
 1339|      0|    CURL_TRC_CF(data_s, cf, "[%d] RESET: %s (err %u)",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1340|      0|              stream_id, nghttp2_http2_strerror(error_code), error_code);
 1341|      0|  else
 1342|      0|    CURL_TRC_CF(data_s, cf, "[%d] CLOSED", stream_id);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1343|      0|  Curl_multi_mark_dirty(data_s);
 1344|       |
 1345|       |  /* remove `data_s` from the nghttp2 stream */
 1346|      0|  rv = nghttp2_session_set_stream_user_data(session, stream_id, 0);
 1347|      0|  if(rv) {
  ------------------
  |  Branch (1347:6): [True: 0, False: 0]
  ------------------
 1348|      0|    infof(data_s, "http/2: failed to clear user_data for stream %d",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1349|      0|          stream_id);
 1350|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1350:5): [Folded, False: 0]
  |  Branch (1350:5): [Folded, False: 0]
  ------------------
 1351|      0|  }
 1352|      0|  return 0;
 1353|      0|}
http2.c:on_begin_headers:
 1357|      1|{
 1358|      1|  struct Curl_cfilter *cf = userp;
 1359|      1|  struct cf_h2_ctx *ctx = cf->ctx;
 1360|      1|  struct h2_stream_ctx *stream;
 1361|      1|  struct Curl_easy *data_s = NULL;
 1362|       |
 1363|      1|  (void)cf;
 1364|      1|  data_s = nghttp2_session_get_stream_user_data(session, frame->hd.stream_id);
 1365|      1|  if(!data_s) {
  ------------------
  |  Branch (1365:6): [True: 0, False: 1]
  ------------------
 1366|      0|    return 0;
 1367|      0|  }
 1368|       |
 1369|      1|  if(frame->hd.type != NGHTTP2_HEADERS) {
  ------------------
  |  Branch (1369:6): [True: 0, False: 1]
  ------------------
 1370|      0|    return 0;
 1371|      0|  }
 1372|       |
 1373|      1|  stream = H2_STREAM_CTX(ctx, data_s);
  ------------------
  |  |  257|      1|  ((struct h2_stream_ctx *)(                                             \
  |  |  258|      1|    (data) ? Curl_uint32_hash_get(&(ctx)->streams, (data)->mid) : NULL))
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 1374|      1|  if(!stream || !stream->bodystarted) {
  ------------------
  |  Branch (1374:6): [True: 0, False: 1]
  |  Branch (1374:17): [True: 1, False: 0]
  ------------------
 1375|      1|    return 0;
 1376|      1|  }
 1377|       |
 1378|      0|  return 0;
 1379|      1|}
http2.c:on_header:
 1404|      1|{
 1405|      1|  struct Curl_cfilter *cf = userp;
 1406|      1|  struct cf_h2_ctx *ctx = cf->ctx;
 1407|      1|  struct h2_stream_ctx *stream;
 1408|      1|  struct Curl_easy *data;
 1409|      1|  int32_t stream_id = frame->hd.stream_id;
 1410|      1|  CURLcode result;
 1411|      1|  (void)flags;
 1412|       |
 1413|      1|  DEBUGASSERT(stream_id); /* should never be a zero stream ID here */
  ------------------
  |  | 1075|      1|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1413:3): [True: 0, False: 1]
  |  Branch (1413:3): [True: 1, False: 0]
  ------------------
 1414|       |
 1415|       |  /* get the stream from the hash based on Stream ID */
 1416|      1|  data = nghttp2_session_get_stream_user_data(session, stream_id);
 1417|      1|  if(!GOOD_EASY_HANDLE(data))
  ------------------
  |  |   34|      1|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |   28|      1|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1045|      1|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (34:5): [True: 1, False: 0]
  |  |  |  Branch (34:12): [True: 1, False: 0]
  |  |  ------------------
  |  |   35|      1|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (1417:6): [True: 0, False: 1]
  |  Branch (1417:7): [True: 0, False: 0]
  |  Branch (1417:7): [True: 0, False: 0]
  ------------------
 1418|       |    /* Receiving a Stream ID not in the hash should not happen, this is an
 1419|       |       internal error more than anything else! */
 1420|      0|    return NGHTTP2_ERR_CALLBACK_FAILURE;
 1421|       |
 1422|      1|  stream = H2_STREAM_CTX(ctx, data);
  ------------------
  |  |  257|      1|  ((struct h2_stream_ctx *)(                                             \
  |  |  258|      1|    (data) ? Curl_uint32_hash_get(&(ctx)->streams, (data)->mid) : NULL))
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 1423|      1|  if(!stream) {
  ------------------
  |  Branch (1423:6): [True: 0, False: 1]
  ------------------
 1424|      0|    failf(data, "Internal NULL stream");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1425|      0|    return NGHTTP2_ERR_CALLBACK_FAILURE;
 1426|      0|  }
 1427|       |
 1428|       |  /* Store received PUSH_PROMISE headers to be used when the subsequent
 1429|       |     PUSH_PROMISE callback comes */
 1430|      1|  if(frame->hd.type == NGHTTP2_PUSH_PROMISE) {
  ------------------
  |  Branch (1430:6): [True: 0, False: 1]
  ------------------
 1431|      0|    char *h;
 1432|       |
 1433|      0|    if((namelen == CURL_CSTRLEN(HTTP_PSEUDO_AUTHORITY)) &&
  ------------------
  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  ------------------
  |  Branch (1433:8): [True: 0, False: 0]
  ------------------
 1434|      0|       !strncmp(HTTP_PSEUDO_AUTHORITY, (const char *)name, namelen)) {
  ------------------
  |  |  231|      0|#define HTTP_PSEUDO_AUTHORITY ":authority"
  ------------------
  |  Branch (1434:8): [True: 0, False: 0]
  ------------------
 1435|       |      /* pseudo headers are lower case */
 1436|      0|      int rc = 0;
 1437|      0|      char *check = curl_maprintf("%s:%d", data->state.origin->hostname,
 1438|      0|                                  data->state.origin->port);
 1439|      0|      if(!check)
  ------------------
  |  Branch (1439:10): [True: 0, False: 0]
  ------------------
 1440|       |        /* no memory */
 1441|      0|        return NGHTTP2_ERR_CALLBACK_FAILURE;
 1442|      0|      if(!curl_strequal(check, (const char *)value) &&
  ------------------
  |  Branch (1442:10): [True: 0, False: 0]
  ------------------
 1443|      0|         ((data->state.origin->port != cf->conn->given->defport) ||
  ------------------
  |  Branch (1443:11): [True: 0, False: 0]
  ------------------
 1444|      0|          !curl_strequal(data->state.origin->hostname, (const char *)value))) {
  ------------------
  |  Branch (1444:11): [True: 0, False: 0]
  ------------------
 1445|       |        /* This is push is not for the same authority that was asked for in
 1446|       |         * the URL. RFC 7540 section 8.2 says: "A client MUST treat a
 1447|       |         * PUSH_PROMISE for which the server is not authoritative as a stream
 1448|       |         * error of type PROTOCOL_ERROR."
 1449|       |         */
 1450|      0|        (void)nghttp2_submit_rst_stream(session, NGHTTP2_FLAG_NONE,
 1451|      0|                                        stream_id, NGHTTP2_PROTOCOL_ERROR);
 1452|      0|        rc = NGHTTP2_ERR_CALLBACK_FAILURE;
 1453|      0|      }
 1454|      0|      curlx_free(check);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1455|      0|      if(rc)
  ------------------
  |  Branch (1455:10): [True: 0, False: 0]
  ------------------
 1456|      0|        return rc;
 1457|      0|    }
 1458|       |
 1459|      0|    if(!stream->push_headers) {
  ------------------
  |  Branch (1459:8): [True: 0, False: 0]
  ------------------
 1460|      0|      stream->push_headers_alloc = 10;
 1461|      0|      stream->push_headers = curlx_malloc(stream->push_headers_alloc *
  ------------------
  |  | 1471|      0|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
 1462|      0|                                          sizeof(char *));
 1463|      0|      if(!stream->push_headers)
  ------------------
  |  Branch (1463:10): [True: 0, False: 0]
  ------------------
 1464|      0|        return NGHTTP2_ERR_CALLBACK_FAILURE;
 1465|      0|      stream->push_headers_used = 0;
 1466|      0|    }
 1467|      0|    else if(stream->push_headers_used ==
  ------------------
  |  Branch (1467:13): [True: 0, False: 0]
  ------------------
 1468|      0|            stream->push_headers_alloc) {
 1469|      0|      char **headp;
 1470|      0|      if(stream->push_headers_alloc > 1000) {
  ------------------
  |  Branch (1470:10): [True: 0, False: 0]
  ------------------
 1471|       |        /* this is beyond crazy many headers, bail out */
 1472|      0|        failf(data, "Too many PUSH_PROMISE headers");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1473|      0|        free_push_headers(stream);
 1474|      0|        return NGHTTP2_ERR_CALLBACK_FAILURE;
 1475|      0|      }
 1476|      0|      stream->push_headers_alloc *= 2;
 1477|      0|      headp = curlx_realloc(stream->push_headers,
  ------------------
  |  | 1475|      0|  curl_dbg_realloc(ptr, size, __LINE__, __FILE__)
  ------------------
 1478|      0|                            stream->push_headers_alloc * sizeof(char *));
 1479|      0|      if(!headp) {
  ------------------
  |  Branch (1479:10): [True: 0, False: 0]
  ------------------
 1480|      0|        free_push_headers(stream);
 1481|      0|        return NGHTTP2_ERR_CALLBACK_FAILURE;
 1482|      0|      }
 1483|      0|      stream->push_headers = headp;
 1484|      0|    }
 1485|      0|    h = curl_maprintf("%s:%s", name, value);
 1486|      0|    if(!h) {
  ------------------
  |  Branch (1486:8): [True: 0, False: 0]
  ------------------
 1487|      0|      free_push_headers(stream);
 1488|      0|      return NGHTTP2_ERR_CALLBACK_FAILURE;
 1489|      0|    }
 1490|      0|    stream->push_headers[stream->push_headers_used++] = h;
 1491|      0|    return 0;
 1492|      0|  }
 1493|       |
 1494|      1|  if(stream->bodystarted) {
  ------------------
  |  Branch (1494:6): [True: 0, False: 1]
  ------------------
 1495|       |    /* This is a trailer */
 1496|      0|    CURL_TRC_CF(data, cf, "[%d] trailer: %.*s: %.*s",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1497|      0|                stream->id, (int)namelen, name, (int)valuelen, value);
 1498|      0|    result = Curl_dynhds_add(&stream->resp_trailers,
 1499|      0|                             (const char *)name, namelen,
 1500|      0|                             (const char *)value, valuelen);
 1501|      0|    if(result) {
  ------------------
  |  Branch (1501:8): [True: 0, False: 0]
  ------------------
 1502|      0|      cf_h2_header_error(cf, data, stream, result);
 1503|      0|      return NGHTTP2_ERR_CALLBACK_FAILURE;
 1504|      0|    }
 1505|       |
 1506|      0|    return 0;
 1507|      0|  }
 1508|       |
 1509|      1|  if(namelen == CURL_CSTRLEN(HTTP_PSEUDO_STATUS) &&
  ------------------
  |  | 1292|      2|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  ------------------
  |  Branch (1509:6): [True: 1, False: 0]
  ------------------
 1510|      1|     !memcmp(HTTP_PSEUDO_STATUS, name, namelen)) {
  ------------------
  |  |  233|      1|#define HTTP_PSEUDO_STATUS    ":status"
  ------------------
  |  Branch (1510:6): [True: 1, False: 0]
  ------------------
 1511|       |    /* nghttp2 guarantees :status is received first and only once. */
 1512|      1|    char buffer[32];
 1513|      1|    size_t hlen;
 1514|      1|    result = Curl_http_decode_status(&stream->status_code,
 1515|      1|                                     (const char *)value, valuelen);
 1516|      1|    if(result) {
  ------------------
  |  Branch (1516:8): [True: 0, False: 1]
  ------------------
 1517|      0|      cf_h2_header_error(cf, data, stream, result);
 1518|      0|      return NGHTTP2_ERR_CALLBACK_FAILURE;
 1519|      0|    }
 1520|      1|    hlen = curl_msnprintf(buffer, sizeof(buffer), HTTP_PSEUDO_STATUS ":%d\r",
  ------------------
  |  |  233|      1|#define HTTP_PSEUDO_STATUS    ":status"
  ------------------
 1521|      1|                          stream->status_code);
 1522|      1|    result = Curl_headers_push(data, buffer, hlen, CURLH_PSEUDO);
  ------------------
  |  |   45|      1|#define CURLH_PSEUDO    (1 << 4) /* pseudo headers */
  ------------------
 1523|      1|    if(result) {
  ------------------
  |  Branch (1523:8): [True: 0, False: 1]
  ------------------
 1524|      0|      cf_h2_header_error(cf, data, stream, result);
 1525|      0|      return NGHTTP2_ERR_CALLBACK_FAILURE;
 1526|      0|    }
 1527|      1|    curlx_dyn_reset(&ctx->scratch);
 1528|      1|    result = curlx_dyn_addn(&ctx->scratch, STRCONST("HTTP/2 "));
  ------------------
  |  | 1297|      1|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      1|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 1529|      1|    if(!result)
  ------------------
  |  Branch (1529:8): [True: 1, False: 0]
  ------------------
 1530|      1|      result = curlx_dyn_addn(&ctx->scratch, value, valuelen);
 1531|      1|    if(!result)
  ------------------
  |  Branch (1531:8): [True: 1, False: 0]
  ------------------
 1532|      1|      result = curlx_dyn_addn(&ctx->scratch, STRCONST(" \r\n"));
  ------------------
  |  | 1297|      1|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      1|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 1533|      1|    if(!result)
  ------------------
  |  Branch (1533:8): [True: 1, False: 0]
  ------------------
 1534|      1|      h2_xfer_write_resp_hd(cf, data, stream, curlx_dyn_ptr(&ctx->scratch),
 1535|      1|                            curlx_dyn_len(&ctx->scratch), FALSE);
  ------------------
  |  | 1048|      1|#define FALSE false
  ------------------
 1536|      1|    if(result) {
  ------------------
  |  Branch (1536:8): [True: 0, False: 1]
  ------------------
 1537|      0|      cf_h2_header_error(cf, data, stream, result);
 1538|      0|      return NGHTTP2_ERR_CALLBACK_FAILURE;
 1539|      0|    }
 1540|       |    /* if we receive data for another handle, wake that up */
 1541|      1|    if(CF_DATA_CURRENT(cf) != data)
  ------------------
  |  |  698|      1|#define CF_DATA_CURRENT(cf) ((cf) ? (CF_CTX_CALL_DATA(cf).data) : NULL)
  |  |  ------------------
  |  |  |  |  118|      1|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  |  Branch (698:30): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1541:8): [True: 0, False: 1]
  ------------------
 1542|      0|      Curl_multi_mark_dirty(data);
 1543|       |
 1544|      1|    CURL_TRC_CF(data, cf, "[%d] status: HTTP/2 %03d",
  ------------------
  |  |  153|      1|  do {                                          \
  |  |  154|      1|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      1|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      1|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1545|      1|                stream->id, stream->status_code);
 1546|      1|    return 0;
 1547|      1|  }
 1548|       |
 1549|       |  /* nghttp2 guarantees that namelen > 0, and :status was already
 1550|       |     received, and this is not pseudo-header field . */
 1551|       |  /* convert to an HTTP1-style header */
 1552|      0|  curlx_dyn_reset(&ctx->scratch);
 1553|      0|  result = curlx_dyn_addn(&ctx->scratch, (const char *)name, namelen);
 1554|      0|  if(!result)
  ------------------
  |  Branch (1554:6): [True: 0, False: 0]
  ------------------
 1555|      0|    result = curlx_dyn_addn(&ctx->scratch, STRCONST(": "));
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 1556|      0|  if(!result)
  ------------------
  |  Branch (1556:6): [True: 0, False: 0]
  ------------------
 1557|      0|    result = curlx_dyn_addn(&ctx->scratch, (const char *)value, valuelen);
 1558|      0|  if(!result)
  ------------------
  |  Branch (1558:6): [True: 0, False: 0]
  ------------------
 1559|      0|    result = curlx_dyn_addn(&ctx->scratch, STRCONST("\r\n"));
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 1560|      0|  if(!result)
  ------------------
  |  Branch (1560:6): [True: 0, False: 0]
  ------------------
 1561|      0|    h2_xfer_write_resp_hd(cf, data, stream, curlx_dyn_ptr(&ctx->scratch),
 1562|      0|                          curlx_dyn_len(&ctx->scratch), FALSE);
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1563|      0|  if(result) {
  ------------------
  |  Branch (1563:6): [True: 0, False: 0]
  ------------------
 1564|      0|    cf_h2_header_error(cf, data, stream, result);
 1565|      0|    return NGHTTP2_ERR_CALLBACK_FAILURE;
 1566|      0|  }
 1567|       |  /* if we receive data for another handle, wake that up */
 1568|      0|  if(CF_DATA_CURRENT(cf) != data)
  ------------------
  |  |  698|      0|#define CF_DATA_CURRENT(cf) ((cf) ? (CF_CTX_CALL_DATA(cf).data) : NULL)
  |  |  ------------------
  |  |  |  |  118|      0|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  |  Branch (698:30): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1568:6): [True: 0, False: 0]
  ------------------
 1569|      0|    Curl_multi_mark_dirty(data);
 1570|       |
 1571|      0|  CURL_TRC_CF(data, cf, "[%d] header: %.*s: %.*s",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1572|      0|              stream->id, (int)namelen, name, (int)valuelen, value);
 1573|       |
 1574|      0|  return 0; /* 0 is successful */
 1575|      0|}
http2.c:h2_client_new:
  452|      2|{
  453|      2|  struct cf_h2_ctx *ctx = cf->ctx;
  454|      2|  nghttp2_option *o;
  455|      2|  nghttp2_mem mem = { NULL, Curl_nghttp2_malloc, Curl_nghttp2_free,
  456|      2|                      Curl_nghttp2_calloc, Curl_nghttp2_realloc };
  457|       |
  458|      2|  int rc = nghttp2_option_new(&o);
  459|      2|  if(rc)
  ------------------
  |  Branch (459:6): [True: 0, False: 2]
  ------------------
  460|      0|    return rc;
  461|       |  /* We handle window updates ourself to enforce buffer limits */
  462|      2|  nghttp2_option_set_no_auto_window_update(o, 1);
  463|      2|#if NGHTTP2_VERSION_NUM >= 0x013200 /* with 1.50.0 */
  464|       |  /* turn off RFC 9113 leading and trailing white spaces validation against
  465|       |     HTTP field value. */
  466|      2|  nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation(o, 1);
  467|      2|#endif
  468|      2|  rc = nghttp2_session_client_new3(&ctx->h2, cbs, cf, o, &mem);
  469|      2|  nghttp2_option_del(o);
  470|      2|  return rc;
  471|      2|}
http2.c:http2_data_setup:
  364|      2|{
  365|      2|  struct cf_h2_ctx *ctx = cf->ctx;
  366|      2|  struct h2_stream_ctx *stream;
  367|       |
  368|      2|  (void)cf;
  369|      2|  DEBUGASSERT(data);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (369:3): [True: 0, False: 2]
  |  Branch (369:3): [True: 2, False: 0]
  ------------------
  370|       |
  371|      2|  if(!data)
  ------------------
  |  Branch (371:6): [True: 0, False: 2]
  ------------------
  372|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  373|       |
  374|      2|  stream = H2_STREAM_CTX(ctx, data);
  ------------------
  |  |  257|      2|  ((struct h2_stream_ctx *)(                                             \
  |  |  258|      2|    (data) ? Curl_uint32_hash_get(&(ctx)->streams, (data)->mid) : NULL))
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  375|      2|  if(stream) {
  ------------------
  |  Branch (375:6): [True: 0, False: 2]
  ------------------
  376|      0|    *pstream = stream;
  377|      0|    return CURLE_OK;
  378|      0|  }
  379|       |
  380|      2|  stream = h2_stream_ctx_create(ctx);
  381|      2|  if(!stream)
  ------------------
  |  Branch (381:6): [True: 0, False: 2]
  ------------------
  382|      0|    return CURLE_OUT_OF_MEMORY;
  383|       |
  384|      2|  if(!Curl_uint32_hash_set(&ctx->streams, data->mid, stream)) {
  ------------------
  |  Branch (384:6): [True: 0, False: 2]
  ------------------
  385|      0|    h2_stream_ctx_free(stream);
  386|      0|    return CURLE_OUT_OF_MEMORY;
  387|      0|  }
  388|       |
  389|      2|  *pstream = stream;
  390|      2|  return CURLE_OK;
  391|      2|}
http2.c:h2_stream_ctx_create:
  261|      2|{
  262|      2|  struct h2_stream_ctx *stream;
  263|       |
  264|      2|  (void)ctx;
  265|      2|  stream = curlx_calloc(1, sizeof(*stream));
  ------------------
  |  | 1473|      2|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  266|      2|  if(!stream)
  ------------------
  |  Branch (266:6): [True: 0, False: 2]
  ------------------
  267|      0|    return NULL;
  268|       |
  269|      2|  stream->id = -1;
  270|      2|  Curl_bufq_initp(&stream->sendbuf, &ctx->stream_bufcp,
  271|      2|                  H2_STREAM_SEND_CHUNKS, BUFQ_OPT_NONE);
  ------------------
  |  |   77|      2|#define H2_STREAM_SEND_CHUNKS   ((64 * 1024) / H2_CHUNK_SIZE)
  |  |  ------------------
  |  |  |  |   59|      2|#define H2_CHUNK_SIZE           (16 * 1024)
  |  |  ------------------
  ------------------
                                H2_STREAM_SEND_CHUNKS, BUFQ_OPT_NONE);
  ------------------
  |  |  106|      2|#define BUFQ_OPT_NONE        0
  ------------------
  272|      2|  Curl_h1_req_parse_init(&stream->h1, H1_PARSE_DEFAULT_MAX_LINE_LEN);
  ------------------
  |  |   35|      2|#define H1_PARSE_DEFAULT_MAX_LINE_LEN   DYN_HTTP_REQUEST
  |  |  ------------------
  |  |  |  |   69|      2|#define DYN_HTTP_REQUEST    (1024 * 1024)
  |  |  ------------------
  ------------------
  273|      2|  Curl_dynhds_init(&stream->resp_trailers, 0, DYN_HTTP_REQUEST);
  ------------------
  |  |   69|      2|#define DYN_HTTP_REQUEST    (1024 * 1024)
  ------------------
  274|      2|  stream->bodystarted = FALSE;
  ------------------
  |  | 1048|      2|#define FALSE false
  ------------------
  275|      2|  stream->status_code = -1;
  276|      2|  stream->closed = FALSE;
  ------------------
  |  | 1048|      2|#define FALSE false
  ------------------
  277|      2|  stream->close_handled = FALSE;
  ------------------
  |  | 1048|      2|#define FALSE false
  ------------------
  278|      2|  stream->error = NGHTTP2_NO_ERROR;
  279|      2|  stream->local_window_size = H2_STREAM_WINDOW_SIZE_INITIAL;
  ------------------
  |  |   71|      2|#define H2_STREAM_WINDOW_SIZE_INITIAL  (64 * 1024)
  ------------------
  280|      2|  stream->nrcvd_data = 0;
  281|      2|  return stream;
  282|      2|}
http2.c:h2_stream_ctx_free:
  160|      2|{
  161|      2|  Curl_bufq_free(&stream->sendbuf);
  162|      2|  Curl_h1_req_parse_free(&stream->h1);
  163|      2|  Curl_dynhds_free(&stream->resp_trailers);
  164|      2|  free_push_headers(stream);
  165|      2|  curlx_free(stream);
  ------------------
  |  | 1476|      2|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  166|      2|}
http2.c:h2_progress_ingress:
 1868|      4|{
 1869|      4|  struct cf_h2_ctx *ctx = cf->ctx;
 1870|      4|  struct h2_stream_ctx *stream;
 1871|      4|  CURLcode result = CURLE_OK;
 1872|      4|  size_t nread;
 1873|       |
 1874|      4|  if(should_close_session(ctx)) {
  ------------------
  |  Branch (1874:6): [True: 0, False: 4]
  ------------------
 1875|      0|    CURL_TRC_CF(data, cf, "[0] ingress: session is closed");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1876|      0|    return CURLE_HTTP2;
 1877|      0|  }
 1878|       |
 1879|       |  /* Process network input buffer first */
 1880|      4|  if(!Curl_bufq_is_empty(&ctx->inbufq)) {
  ------------------
  |  Branch (1880:6): [True: 0, False: 4]
  ------------------
 1881|      0|    CURL_TRC_CF(data, cf, "Process %zu bytes in connection buffer",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1882|      0|                Curl_bufq_len(&ctx->inbufq));
 1883|      0|    result = h2_process_pending_input(cf, data);
 1884|      0|    if(result)
  ------------------
  |  Branch (1884:8): [True: 0, False: 0]
  ------------------
 1885|      0|      return result;
 1886|      0|  }
 1887|       |
 1888|      4|  if(!data_max_bytes)
  ------------------
  |  Branch (1888:6): [True: 0, False: 4]
  ------------------
 1889|      0|    data_max_bytes = H2_CHUNK_SIZE;
  ------------------
  |  |   59|      0|#define H2_CHUNK_SIZE           (16 * 1024)
  ------------------
 1890|       |
 1891|       |  /* Receive data from the "lower" filters, e.g. network until
 1892|       |   * it is time to stop due to connection close or us not processing
 1893|       |   * all network input */
 1894|      5|  while(!ctx->conn_closed && Curl_bufq_is_empty(&ctx->inbufq)) {
  ------------------
  |  Branch (1894:9): [True: 5, False: 0]
  |  Branch (1894:30): [True: 5, False: 0]
  ------------------
 1895|      5|    stream = H2_STREAM_CTX(ctx, data);
  ------------------
  |  |  257|      5|  ((struct h2_stream_ctx *)(                                             \
  |  |  258|      5|    (data) ? Curl_uint32_hash_get(&(ctx)->streams, (data)->mid) : NULL))
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 5, False: 0]
  |  |  ------------------
  ------------------
 1896|      5|    if(stream && (stream->closed || !data_max_bytes)) {
  ------------------
  |  Branch (1896:8): [True: 5, False: 0]
  |  Branch (1896:19): [True: 0, False: 5]
  |  Branch (1896:37): [True: 0, False: 5]
  ------------------
 1897|       |      /* We would like to abort here and stop processing, so that the transfer
 1898|       |       * loop can handle the data/close here. This may leave data in
 1899|       |       * underlying buffers that will not be consumed. */
 1900|      0|      if(!cf->next || !cf->next->cft->has_data_pending(cf->next, data))
  ------------------
  |  Branch (1900:10): [True: 0, False: 0]
  |  Branch (1900:23): [True: 0, False: 0]
  ------------------
 1901|      0|        Curl_multi_mark_dirty(data);
 1902|      0|      break;
 1903|      0|    }
 1904|      5|    else if(!stream) {
  ------------------
  |  Branch (1904:13): [True: 0, False: 5]
  ------------------
 1905|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1905:7): [Folded, False: 0]
  |  Branch (1905:7): [Folded, False: 0]
  ------------------
 1906|      0|      break;
 1907|      0|    }
 1908|       |
 1909|      5|    result = Curl_cf_recv_bufq(cf->next, data, &ctx->inbufq, 0, &nread);
 1910|      5|    if(result) {
  ------------------
  |  Branch (1910:8): [True: 2, False: 3]
  ------------------
 1911|      2|      if(result != CURLE_AGAIN) {
  ------------------
  |  Branch (1911:10): [True: 0, False: 2]
  ------------------
 1912|      0|        failf(data, "Failed receiving HTTP2 data: %d(%s)", (int)result,
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1913|      0|              curl_easy_strerror(result));
 1914|      0|        return result;
 1915|      0|      }
 1916|      2|      break;
 1917|      2|    }
 1918|      3|    else if(nread == 0) {
  ------------------
  |  Branch (1918:13): [True: 2, False: 1]
  ------------------
 1919|      2|      CURL_TRC_CF(data, cf, "[0] ingress: connection closed");
  ------------------
  |  |  153|      2|  do {                                          \
  |  |  154|      2|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      2|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      4|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 2, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      4|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      2|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1920|      2|      ctx->conn_closed = TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
 1921|      2|      break;
 1922|      2|    }
 1923|      1|    else {
 1924|      1|      CURL_TRC_CF(data, cf, "[0] ingress: read %zu bytes", nread);
  ------------------
  |  |  153|      1|  do {                                          \
  |  |  154|      1|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      1|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      1|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1925|      1|      data_max_bytes = (data_max_bytes > nread) ? (data_max_bytes - nread) : 0;
  ------------------
  |  Branch (1925:24): [True: 1, False: 0]
  ------------------
 1926|      1|    }
 1927|       |
 1928|      1|    result = h2_process_pending_input(cf, data);
 1929|      1|    if(result)
  ------------------
  |  Branch (1929:8): [True: 0, False: 1]
  ------------------
 1930|      0|      return result;
 1931|      1|    CURL_TRC_CF(data, cf, "[0] ingress: nw-in buffered %zu",
  ------------------
  |  |  153|      1|  do {                                          \
  |  |  154|      1|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      1|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      1|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1932|      1|                Curl_bufq_len(&ctx->inbufq));
 1933|      1|  }
 1934|       |
 1935|      4|  if(ctx->conn_closed && Curl_bufq_is_empty(&ctx->inbufq)) {
  ------------------
  |  Branch (1935:6): [True: 2, False: 2]
  |  Branch (1935:26): [True: 2, False: 0]
  ------------------
 1936|      2|    CURL_TRC_CF(data, cf, "server closed %s",
  ------------------
  |  |  153|      2|  do {                                          \
  |  |  154|      2|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      2|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      4|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 2, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      4|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      2|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      2|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
 1937|      2|                ctx->rcvd_goaway ? "with GOAWAY" : "abruptly");
 1938|      2|    connclose(cf->conn);
  ------------------
  |  |   90|      2|#define connclose(x)   Curl_conncontrol((x), CONNCTRL_CONN_CLOSE)
  |  |  ------------------
  |  |  |  |   84|      2|#define CONNCTRL_CONN_CLOSE      1
  |  |  ------------------
  ------------------
 1939|      2|  }
 1940|       |
 1941|      4|  CURL_TRC_CF(data, cf, "[0] ingress: done");
  ------------------
  |  |  153|      4|  do {                                          \
  |  |  154|      4|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      4|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      8|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 4, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      8|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      4|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      4|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      4|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 4]
  |  |  ------------------
  ------------------
 1942|      4|  return CURLE_OK;
 1943|      4|}
http2.c:should_close_session:
  477|      6|{
  478|      6|  return ctx->drain_total == 0 && !nghttp2_session_want_read(ctx->h2) &&
  ------------------
  |  Branch (478:10): [True: 6, False: 0]
  |  Branch (478:35): [True: 0, False: 6]
  ------------------
  479|      0|    !nghttp2_session_want_write(ctx->h2);
  ------------------
  |  Branch (479:5): [True: 0, False: 0]
  ------------------
  480|      6|}
http2.c:h2_process_pending_input:
  489|      1|{
  490|      1|  struct cf_h2_ctx *ctx = cf->ctx;
  491|      1|  const unsigned char *buf;
  492|      1|  size_t blen, nread;
  493|      1|  ssize_t rv;
  494|       |
  495|      1|  while(Curl_bufq_peek(&ctx->inbufq, &buf, &blen)) {
  ------------------
  |  Branch (495:9): [True: 1, False: 0]
  ------------------
  496|      1|    rv = nghttp2_session_mem_recv(ctx->h2, (const uint8_t *)buf, blen);
  497|      1|    if(!curlx_sztouz(rv, &nread)) {
  ------------------
  |  Branch (497:8): [True: 0, False: 1]
  ------------------
  498|      0|      failf(data, "nghttp2 recv error %zd: %s", rv, nghttp2_strerror((int)rv));
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  499|      0|      return CURLE_HTTP2;
  500|      0|    }
  501|      1|    Curl_bufq_skip(&ctx->inbufq, nread);
  502|      1|    if(Curl_bufq_is_empty(&ctx->inbufq)) {
  ------------------
  |  Branch (502:8): [True: 1, False: 0]
  ------------------
  503|      1|      break;
  504|      1|    }
  505|      0|    else {
  506|      0|      CURL_TRC_CF(data, cf, "process_pending_input: %zu bytes left "
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  507|      0|                  "in connection buffer", Curl_bufq_len(&ctx->inbufq));
  508|      0|    }
  509|      1|  }
  510|       |
  511|      1|  if(nghttp2_session_check_request_allowed(ctx->h2) == 0) {
  ------------------
  |  Branch (511:6): [True: 0, False: 1]
  ------------------
  512|       |    /* No more requests are allowed in the current session, so
  513|       |       the connection may not be reused. This is set when a
  514|       |       GOAWAY frame has been received or when the limit of stream
  515|       |       identifiers has been reached. */
  516|      0|    CURL_TRC_M(data, "http/2: No new requests allowed");
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  517|      0|    connclose(cf->conn);
  ------------------
  |  |   90|      0|#define connclose(x)   Curl_conncontrol((x), CONNCTRL_CONN_CLOSE)
  |  |  ------------------
  |  |  |  |   84|      0|#define CONNCTRL_CONN_CLOSE      1
  |  |  ------------------
  ------------------
  518|      0|  }
  519|       |
  520|      1|  return CURLE_OK;
  521|      1|}
http2.c:h2_progress_egress:
 1793|      8|{
 1794|      8|  struct cf_h2_ctx *ctx = cf->ctx;
 1795|      8|  struct h2_stream_ctx *stream = H2_STREAM_CTX(ctx, data);
  ------------------
  |  |  257|      8|  ((struct h2_stream_ctx *)(                                             \
  |  |  258|      8|    (data) ? Curl_uint32_hash_get(&(ctx)->streams, (data)->mid) : NULL))
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 8, False: 0]
  |  |  ------------------
  ------------------
 1796|      8|  int rv = 0;
 1797|       |
 1798|      8|  if(stream && stream->id > 0 &&
  ------------------
  |  Branch (1798:6): [True: 6, False: 2]
  |  Branch (1798:16): [True: 6, False: 0]
  ------------------
 1799|      6|     (sweight_wanted(data) != sweight_in_effect(data))) {
  ------------------
  |  Branch (1799:6): [True: 0, False: 6]
  ------------------
 1800|       |    /* send new weight and/or dependency */
 1801|      0|    nghttp2_priority_spec pri_spec;
 1802|       |
 1803|      0|    h2_pri_spec(data, &pri_spec);
 1804|      0|    CURL_TRC_CF(data, cf, "[%d] Queuing PRIORITY", stream->id);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1805|      0|    DEBUGASSERT(stream->id != -1);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1805:5): [True: 0, False: 0]
  |  Branch (1805:5): [True: 0, False: 0]
  ------------------
 1806|      0|    rv = nghttp2_submit_priority(ctx->h2, NGHTTP2_FLAG_NONE,
 1807|      0|                                 stream->id, &pri_spec);
 1808|      0|    if(rv)
  ------------------
  |  Branch (1808:8): [True: 0, False: 0]
  ------------------
 1809|      0|      goto out;
 1810|      0|  }
 1811|       |
 1812|      8|  ctx->nw_out_blocked = 0;
 1813|     15|  while(!rv && !ctx->nw_out_blocked && nghttp2_session_want_write(ctx->h2))
  ------------------
  |  Branch (1813:9): [True: 15, False: 0]
  |  Branch (1813:16): [True: 15, False: 0]
  |  Branch (1813:40): [True: 7, False: 8]
  ------------------
 1814|      7|    rv = nghttp2_session_send(ctx->h2);
 1815|       |
 1816|      8|out:
 1817|      8|  if(nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (1817:6): [True: 0, False: 8]
  ------------------
 1818|      0|    CURL_TRC_CF(data, cf, "nghttp2_session_send error (%s)%d",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1819|      0|                nghttp2_strerror(rv), rv);
 1820|      0|    return CURLE_SEND_ERROR;
 1821|      0|  }
 1822|       |  /* Defer flushing during the connect phase so that the SETTINGS and
 1823|       |   * other initial frames are sent together with the first request.
 1824|       |   * Unless we are 'connect_only' where the request will never come. */
 1825|      8|  if(!cf->connected && !cf->conn->bits.connect_only)
  ------------------
  |  Branch (1825:6): [True: 2, False: 6]
  |  Branch (1825:24): [True: 2, False: 0]
  ------------------
 1826|      2|    return CURLE_OK;
 1827|      6|  return nw_out_flush(cf, data);
 1828|      8|}
http2.c:sweight_wanted:
 1758|      8|{
 1759|       |  /* 0 weight is not set by user and we take the nghttp2 default one */
 1760|      8|  return data->set.weight ?
  ------------------
  |  Branch (1760:10): [True: 0, False: 8]
  ------------------
 1761|      0|    data->set.weight : NGHTTP2_DEFAULT_WEIGHT;
 1762|      8|}
http2.c:sweight_in_effect:
 1765|      6|{
 1766|       |  /* 0 weight is not set by user and we take the nghttp2 default one */
 1767|      6|  return data->state.weight ?
  ------------------
  |  Branch (1767:10): [True: 0, False: 6]
  ------------------
 1768|      0|    data->state.weight : NGHTTP2_DEFAULT_WEIGHT;
 1769|      6|}
http2.c:h2_pri_spec:
 1779|      2|{
 1780|      2|  int prio = data->set.weight;
 1781|       |  nghttp2_priority_spec_init(pri_spec, 0, sweight_wanted(data), FALSE);
  ------------------
  |  | 1048|      2|#define FALSE false
  ------------------
 1782|      2|  data->state.weight = prio;
 1783|      2|}
http2.c:cf_h2_data_pending:
 2683|      2|{
 2684|      2|  struct cf_h2_ctx *ctx = cf->ctx;
 2685|       |
 2686|      2|  if(ctx && !Curl_bufq_is_empty(&ctx->inbufq))
  ------------------
  |  Branch (2686:6): [True: 2, False: 0]
  |  Branch (2686:13): [True: 0, False: 2]
  ------------------
 2687|      0|    return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2688|      2|  return cf->next ? cf->next->cft->has_data_pending(cf->next, data) : FALSE;
  ------------------
  |  | 1048|      2|#define FALSE false
  ------------------
  |  Branch (2688:10): [True: 2, False: 0]
  ------------------
 2689|      2|}
http2.c:cf_h2_send:
 2204|      2|{
 2205|      2|  struct cf_h2_ctx *ctx = cf->ctx;
 2206|      2|  struct h2_stream_ctx *stream = H2_STREAM_CTX(ctx, data);
  ------------------
  |  |  257|      2|  ((struct h2_stream_ctx *)(                                             \
  |  |  258|      2|    (data) ? Curl_uint32_hash_get(&(ctx)->streams, (data)->mid) : NULL))
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 2, False: 0]
  |  |  ------------------
  ------------------
 2207|      2|  struct cf_call_data save;
 2208|      2|  CURLcode result = CURLE_OK, r2;
 2209|       |
 2210|      2|  CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  669|      2|  do { \
  |  |  670|      2|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  118|      2|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  671|      2|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  672|      2|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  118|      2|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  673|      2|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  118|      2|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |                   CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  856|      2|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  674|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (674:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
  |  Branch (2210:3): [True: 2, False: 0]
  |  Branch (2210:3): [True: 0, False: 0]
  |  Branch (2210:3): [True: 2, False: 0]
  |  Branch (2210:3): [True: 0, False: 0]
  ------------------
 2211|      2|  *pnwritten = 0;
 2212|       |
 2213|      2|  if(!stream || stream->id == -1) {
  ------------------
  |  Branch (2213:6): [True: 2, False: 0]
  |  Branch (2213:17): [True: 0, False: 0]
  ------------------
 2214|      2|    result = h2_submit(&stream, cf, data, buf, len, eos, pnwritten);
 2215|      2|    if(result)
  ------------------
  |  Branch (2215:8): [True: 0, False: 2]
  ------------------
 2216|      0|      goto out;
 2217|      2|    DEBUGASSERT(stream);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2217:5): [True: 0, False: 2]
  |  Branch (2217:5): [True: 2, False: 0]
  ------------------
 2218|      2|  }
 2219|      0|  else if(stream->body_eos) {
  ------------------
  |  Branch (2219:11): [True: 0, False: 0]
  ------------------
 2220|       |    /* We already wrote this, but CURLE_AGAIN-ed the call due to not
 2221|       |     * being able to flush stream->sendbuf. Make a 0-length write
 2222|       |     * to trigger flushing again.
 2223|       |     * If this works, we report to have written `len` bytes. */
 2224|      0|    size_t n;
 2225|      0|    DEBUGASSERT(eos);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2225:5): [True: 0, False: 0]
  |  Branch (2225:5): [True: 0, False: 0]
  ------------------
 2226|      0|    result = cf_h2_body_send(cf, data, stream, buf, 0, eos, &n);
 2227|      0|    CURL_TRC_CF(data, cf, "[%d] cf_body_send last CHUNK -> %d, %zu, eos=%d",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 2228|      0|                stream->id, (int)result, n, eos);
 2229|      0|    if(result)
  ------------------
  |  Branch (2229:8): [True: 0, False: 0]
  ------------------
 2230|      0|      goto out;
 2231|      0|    *pnwritten = len;
 2232|      0|  }
 2233|      0|  else {
 2234|      0|    result = cf_h2_body_send(cf, data, stream, buf, len, eos, pnwritten);
 2235|      0|    CURL_TRC_CF(data, cf, "[%d] cf_body_send(len=%zu) -> %d, %zu, eos=%d",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 2236|      0|                stream->id, len, (int)result, *pnwritten, eos);
 2237|      0|  }
 2238|       |
 2239|       |  /* Call the nghttp2 send loop and flush to write ALL buffered data,
 2240|       |   * headers and/or request body completely out to the network */
 2241|      2|  r2 = h2_progress_egress(cf, data);
 2242|       |
 2243|       |  /* if the stream has been closed in egress handling (nghttp2 does that
 2244|       |   * when it does not like the headers, for example */
 2245|      2|  if(stream && stream->closed) {
  ------------------
  |  Branch (2245:6): [True: 2, False: 0]
  |  Branch (2245:16): [True: 0, False: 2]
  ------------------
 2246|      0|    infof(data, "stream %d closed", stream->id);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2247|      0|    result = CURLE_SEND_ERROR;
 2248|      0|    goto out;
 2249|      0|  }
 2250|      2|  else if(r2 && (r2 != CURLE_AGAIN)) {
  ------------------
  |  Branch (2250:11): [True: 0, False: 2]
  |  Branch (2250:17): [True: 0, False: 0]
  ------------------
 2251|      0|    result = r2;
 2252|      0|    goto out;
 2253|      0|  }
 2254|       |
 2255|      2|  if(should_close_session(ctx)) {
  ------------------
  |  Branch (2255:6): [True: 0, False: 2]
  ------------------
 2256|       |    /* nghttp2 thinks this session is done. If the stream has not been
 2257|       |     * closed, this is an error state for out transfer */
 2258|      0|    if(stream && stream->closed) {
  ------------------
  |  Branch (2258:8): [True: 0, False: 0]
  |  Branch (2258:18): [True: 0, False: 0]
  ------------------
 2259|      0|      result = http2_handle_stream_close(cf, data, stream, pnwritten);
 2260|      0|    }
 2261|      0|    else {
 2262|      0|      CURL_TRC_CF(data, cf, "send: nothing to do in this session");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 2263|      0|      result = CURLE_HTTP2;
 2264|      0|    }
 2265|      0|  }
 2266|       |
 2267|      2|out:
 2268|      2|  if(stream) {
  ------------------
  |  Branch (2268:6): [True: 2, False: 0]
  ------------------
 2269|      2|    CURL_TRC_CF(data, cf, "[%d] cf_send(len=%zu) -> %d, %zu, "
  ------------------
  |  |  153|      2|  do {                                          \
  |  |  154|      2|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      2|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      4|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 2, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      4|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      2|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 2270|      2|                "eos=%d, h2 windows %d-%d (stream-conn), "
 2271|      2|                "buffers %zu-%zu (stream-conn)",
 2272|      2|                stream->id, len, (int)result, *pnwritten,
 2273|      2|                stream->body_eos,
 2274|      2|                nghttp2_session_get_stream_remote_window_size(
 2275|      2|                  ctx->h2, stream->id),
 2276|      2|                nghttp2_session_get_remote_window_size(ctx->h2),
 2277|      2|                Curl_bufq_len(&stream->sendbuf),
 2278|      2|                Curl_bufq_len(&ctx->outbufq));
 2279|      2|  }
 2280|      0|  else {
 2281|      0|    CURL_TRC_CF(data, cf, "cf_send(len=%zu) -> %d, %zu, "
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 2282|      0|                "connection-window=%d, nw_send_buffer(%zu)",
 2283|      0|                len, (int)result, *pnwritten,
 2284|      0|                nghttp2_session_get_remote_window_size(ctx->h2),
 2285|      0|                Curl_bufq_len(&ctx->outbufq));
 2286|      0|  }
 2287|      2|  CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  677|      2|  do { \
  |  |  678|      2|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  679|      2|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  680|      2|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  118|      2|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  681|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (681:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
  |  Branch (2287:3): [True: 0, False: 2]
  |  Branch (2287:3): [True: 2, False: 0]
  |  Branch (2287:3): [True: 2, False: 0]
  |  Branch (2287:3): [True: 0, False: 0]
  |  Branch (2287:3): [True: 2, False: 0]
  |  Branch (2287:3): [True: 0, False: 0]
  ------------------
 2288|      2|  return result;
 2289|      2|}
http2.c:h2_submit:
 2070|      2|{
 2071|      2|  struct cf_h2_ctx *ctx = cf->ctx;
 2072|      2|  struct h2_stream_ctx *stream = NULL;
 2073|      2|  struct dynhds h2_headers;
 2074|      2|  nghttp2_nv *nva = NULL;
 2075|      2|  const void *body = NULL;
 2076|      2|  size_t nheader, bodylen;
 2077|      2|  nghttp2_data_provider data_prd;
 2078|      2|  int32_t stream_id;
 2079|      2|  nghttp2_priority_spec pri_spec;
 2080|      2|  size_t nwritten;
 2081|      2|  CURLcode result = CURLE_OK;
 2082|      2|  uint32_t initial_win_size;
 2083|       |
 2084|      2|  *pnwritten = 0;
 2085|      2|  Curl_dynhds_init(&h2_headers, 0, DYN_HTTP_REQUEST);
  ------------------
  |  |   69|      2|#define DYN_HTTP_REQUEST    (1024 * 1024)
  ------------------
 2086|       |
 2087|      2|  result = http2_data_setup(cf, data, &stream);
 2088|      2|  if(result)
  ------------------
  |  Branch (2088:6): [True: 0, False: 2]
  ------------------
 2089|      0|    goto out;
 2090|       |
 2091|      2|  result = Curl_h1_req_parse_read(
 2092|      2|    &stream->h1, buf, len, NULL,
 2093|      2|    !data->state.http_ignorecustom ?
  ------------------
  |  Branch (2093:5): [True: 2, False: 0]
  ------------------
 2094|      2|    CURL_EASY_STR(data, STRING_CUSTOMREQUEST) : NULL,
  ------------------
  |  | 1228|      2|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
 2095|      2|    0, &nwritten);
 2096|      2|  if(result)
  ------------------
  |  Branch (2096:6): [True: 0, False: 2]
  ------------------
 2097|      0|    goto out;
 2098|      2|  *pnwritten = nwritten;
 2099|      2|  if(!stream->h1.done) {
  ------------------
  |  Branch (2099:6): [True: 0, False: 2]
  ------------------
 2100|       |    /* need more data */
 2101|      0|    goto out;
 2102|      0|  }
 2103|      2|  DEBUGASSERT(stream->h1.req);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2103:3): [True: 0, False: 2]
  |  Branch (2103:3): [True: 2, False: 0]
  ------------------
 2104|       |
 2105|      2|  result = Curl_http_req_to_h2(&h2_headers, stream->h1.req, data);
 2106|      2|  if(result)
  ------------------
  |  Branch (2106:6): [True: 0, False: 2]
  ------------------
 2107|      0|    goto out;
 2108|       |  /* no longer needed */
 2109|      2|  Curl_h1_req_parse_free(&stream->h1);
 2110|       |
 2111|      2|  nva = Curl_dynhds_to_nva(&h2_headers, &nheader);
 2112|      2|  if(!nva) {
  ------------------
  |  Branch (2112:6): [True: 0, False: 2]
  ------------------
 2113|      0|    result = CURLE_OUT_OF_MEMORY;
 2114|      0|    goto out;
 2115|      0|  }
 2116|       |
 2117|      2|  h2_pri_spec(data, &pri_spec);
 2118|      2|  if(!nghttp2_session_check_request_allowed(ctx->h2))
  ------------------
  |  Branch (2118:6): [True: 0, False: 2]
  ------------------
 2119|      0|    CURL_TRC_CF(data, cf, "send request NOT allowed (via nghttp2)");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 2120|       |
 2121|       |  /* Check the initial windows size of the transfer (rate-limits?) and
 2122|       |   * send an updated settings on changes from previous value. */
 2123|      2|  initial_win_size = cf_h2_initial_win_size(data);
 2124|      2|  if(initial_win_size != ctx->initial_win_size) {
  ------------------
  |  Branch (2124:6): [True: 0, False: 2]
  ------------------
 2125|      0|    result = cf_h2_update_settings(ctx, initial_win_size);
 2126|      0|    if(result)
  ------------------
  |  Branch (2126:8): [True: 0, False: 0]
  ------------------
 2127|      0|      goto out;
 2128|      0|  }
 2129|       |
 2130|      2|  switch(data->state.httpreq) {
 2131|      0|  case HTTPREQ_POST:
  ------------------
  |  Branch (2131:3): [True: 0, False: 2]
  ------------------
 2132|      0|  case HTTPREQ_POST_FORM:
  ------------------
  |  Branch (2132:3): [True: 0, False: 2]
  ------------------
 2133|      0|  case HTTPREQ_POST_MIME:
  ------------------
  |  Branch (2133:3): [True: 0, False: 2]
  ------------------
 2134|      0|  case HTTPREQ_PUT:
  ------------------
  |  Branch (2134:3): [True: 0, False: 2]
  ------------------
 2135|      0|    data_prd.read_callback = req_body_read_callback;
 2136|      0|    data_prd.source.ptr = NULL;
 2137|      0|    stream_id = nghttp2_submit_request(ctx->h2, &pri_spec, nva, nheader,
 2138|      0|                                       &data_prd, data);
 2139|      0|    break;
 2140|      2|  default:
  ------------------
  |  Branch (2140:3): [True: 2, False: 0]
  ------------------
 2141|      2|    stream_id = nghttp2_submit_request(ctx->h2, &pri_spec, nva, nheader,
 2142|      2|                                       NULL, data);
 2143|      2|  }
 2144|       |
 2145|      2|  if(stream_id < 0) {
  ------------------
  |  Branch (2145:6): [True: 0, False: 2]
  ------------------
 2146|      0|    CURL_TRC_CF(data, cf, "send: nghttp2_submit_request error (%s)%d",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 2147|      0|                nghttp2_strerror(stream_id), stream_id);
 2148|      0|    result = CURLE_SEND_ERROR;
 2149|      0|    goto out;
 2150|      0|  }
 2151|       |
 2152|      2|#ifdef CURLVERBOSE
 2153|      2|#define MAX_ACC 60000  /* <64KB to account for some overhead */
 2154|      2|  if(Curl_trc_is_verbose(data)) {
  ------------------
  |  |  322|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  ------------------
  |  |  |  Branch (322:4): [True: 2, False: 0]
  |  |  |  Branch (322:14): [True: 0, False: 2]
  |  |  ------------------
  |  |  323|      2|   (!(data)->state.feat ||                                 \
  |  |  ------------------
  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2155|      0|    size_t acc = 0, i;
 2156|       |
 2157|      0|    infof(data, "[HTTP/2] [%d] OPENED stream for %s",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2158|      0|          stream_id, Curl_bufref_ptr(&data->state.url));
 2159|      0|    for(i = 0; i < nheader; ++i) {
  ------------------
  |  Branch (2159:16): [True: 0, False: 0]
  ------------------
 2160|      0|      acc += nva[i].namelen + nva[i].valuelen;
 2161|       |
 2162|      0|      infof(data, "[HTTP/2] [%d] [%.*s: %.*s]", stream_id,
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2163|      0|            (int)nva[i].namelen, nva[i].name,
 2164|      0|            (int)nva[i].valuelen, nva[i].value);
 2165|      0|    }
 2166|       |
 2167|      0|    if(acc > MAX_ACC) {
  ------------------
  |  | 2153|      0|#define MAX_ACC 60000  /* <64KB to account for some overhead */
  ------------------
  |  Branch (2167:8): [True: 0, False: 0]
  ------------------
 2168|      0|      infof(data, "[HTTP/2] Warning: The cumulative length of all "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2169|      0|            "headers exceeds %d bytes and that could cause the "
 2170|      0|            "stream to be rejected.", MAX_ACC);
 2171|      0|    }
 2172|      0|  }
 2173|      2|#endif
 2174|       |
 2175|      2|  stream->id = stream_id;
 2176|       |
 2177|      2|  body = (const char *)buf + *pnwritten;
 2178|      2|  bodylen = len - *pnwritten;
 2179|       |
 2180|      2|  if(bodylen || eos) {
  ------------------
  |  Branch (2180:6): [True: 0, False: 2]
  |  Branch (2180:17): [True: 2, False: 0]
  ------------------
 2181|      2|    size_t n;
 2182|      2|    result = cf_h2_body_send(cf, data, stream, body, bodylen, eos, &n);
 2183|      2|    if(!result)
  ------------------
  |  Branch (2183:8): [True: 2, False: 0]
  ------------------
 2184|      2|      *pnwritten += n;
 2185|      0|    else if(result == CURLE_AGAIN)
  ------------------
  |  Branch (2185:13): [True: 0, False: 0]
  ------------------
 2186|      0|      result = CURLE_OK;
 2187|      0|    else {
 2188|      0|      result = CURLE_SEND_ERROR;
 2189|      0|    }
 2190|      2|  }
 2191|       |
 2192|      2|out:
 2193|      2|  CURL_TRC_CF(data, cf, "[%d] submit -> %d, %zu",
  ------------------
  |  |  153|      2|  do {                                          \
  |  |  154|      2|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      2|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      4|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 2, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      4|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      2|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      2|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
 2194|      2|              stream ? stream->id : -1, (int)result, *pnwritten);
 2195|       |  curlx_safefree(nva);
  ------------------
  |  | 1332|      2|  do {                      \
  |  | 1333|      2|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|      2|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|      2|    (ptr) = NULL;           \
  |  | 1335|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
 2196|      2|  *pstream = stream;
 2197|      2|  Curl_dynhds_free(&h2_headers);
 2198|      2|  return result;
 2199|      2|}
http2.c:cf_h2_body_send:
 2025|      2|{
 2026|      2|  struct cf_h2_ctx *ctx = cf->ctx;
 2027|      2|  CURLcode result;
 2028|       |
 2029|      2|  *pnwritten = 0;
 2030|      2|  if(stream->closed) {
  ------------------
  |  Branch (2030:6): [True: 0, False: 2]
  ------------------
 2031|      0|    if(stream->resp_hds_complete) {
  ------------------
  |  Branch (2031:8): [True: 0, False: 0]
  ------------------
 2032|       |      /* Server decided to close the stream after having sent us a final
 2033|       |       * response. This is valid if it is not interested in the request
 2034|       |       * body. This happens on 30x or 40x responses.
 2035|       |       * We silently discard the data sent, since this is not a transport
 2036|       |       * error situation. */
 2037|      0|      CURL_TRC_CF(data, cf, "[%d] discarding data"
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 2038|      0|                  "on closed stream with response", stream->id);
 2039|      0|      if(eos)
  ------------------
  |  Branch (2039:10): [True: 0, False: 0]
  ------------------
 2040|      0|        stream->body_eos = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2041|      0|      *pnwritten = blen;
 2042|      0|      return CURLE_OK;
 2043|      0|    }
 2044|       |    /* Server closed before we got a response, this is an error */
 2045|      0|    infof(data, "stream %d closed", stream->id);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2046|      0|    return CURLE_SEND_ERROR;
 2047|      0|  }
 2048|       |
 2049|      2|  result = Curl_bufq_write(&stream->sendbuf, buf, blen, pnwritten);
 2050|      2|  if(result)
  ------------------
  |  Branch (2050:6): [True: 0, False: 2]
  ------------------
 2051|      0|    return result;
 2052|       |
 2053|      2|  if(eos && (blen == *pnwritten))
  ------------------
  |  Branch (2053:6): [True: 2, False: 0]
  |  Branch (2053:13): [True: 2, False: 0]
  ------------------
 2054|      2|    stream->body_eos = TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
 2055|       |
 2056|      2|  if(eos || !Curl_bufq_is_empty(&stream->sendbuf)) {
  ------------------
  |  Branch (2056:6): [True: 2, False: 0]
  |  Branch (2056:13): [True: 0, False: 0]
  ------------------
 2057|       |    /* resume the potentially suspended stream */
 2058|      2|    int rv = nghttp2_session_resume_data(ctx->h2, stream->id);
 2059|      2|    if(nghttp2_is_fatal(rv))
  ------------------
  |  Branch (2059:8): [True: 0, False: 2]
  ------------------
 2060|      0|      return CURLE_SEND_ERROR;
 2061|      2|  }
 2062|       |
 2063|      2|  return CURLE_OK;
 2064|      2|}
http2.c:cf_h2_recv:
 1947|      4|{
 1948|      4|  struct cf_h2_ctx *ctx = cf->ctx;
 1949|      4|  struct h2_stream_ctx *stream;
 1950|      4|  CURLcode result, r2;
 1951|      4|  struct cf_call_data save;
 1952|       |
 1953|      4|  if(!data)
  ------------------
  |  Branch (1953:6): [True: 0, False: 4]
  ------------------
 1954|      0|    return CURLE_HTTP2;
 1955|       |
 1956|      4|  stream = H2_STREAM_CTX(ctx, data);
  ------------------
  |  |  257|      4|  ((struct h2_stream_ctx *)(                                             \
  |  |  258|      4|    (data) ? Curl_uint32_hash_get(&(ctx)->streams, (data)->mid) : NULL))
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 4, False: 0]
  |  |  ------------------
  ------------------
 1957|       |
 1958|      4|  *pnread = 0;
 1959|      4|  if(!stream) {
  ------------------
  |  Branch (1959:6): [True: 0, False: 4]
  ------------------
 1960|       |    /* Abnormal call sequence: either this transfer has never opened a stream
 1961|       |     * (unlikely) or the transfer has been done, cleaned up its resources, but
 1962|       |     * a read() is called anyway. It is not clear what the calling sequence
 1963|       |     * is for such a case. */
 1964|      0|    failf(data, "http/2 recv on a transfer never opened "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1965|      0|          "or already cleared, mid=%u", data->mid);
 1966|      0|    return CURLE_HTTP2;
 1967|      0|  }
 1968|       |
 1969|      4|  CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  669|      4|  do { \
  |  |  670|      4|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  118|      4|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  671|      4|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1075|      4|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  672|      4|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  118|      4|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  673|      4|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  118|      4|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |                   CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  856|      4|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  674|      4|  } while(0)
  |  |  ------------------
  |  |  |  Branch (674:11): [Folded, False: 4]
  |  |  ------------------
  ------------------
  |  Branch (1969:3): [True: 4, False: 0]
  |  Branch (1969:3): [True: 0, False: 0]
  |  Branch (1969:3): [True: 4, False: 0]
  |  Branch (1969:3): [True: 0, False: 0]
  ------------------
 1970|       |
 1971|      4|  result = stream_recv(cf, data, stream, buf, len, pnread);
 1972|      4|  if(result && (result != CURLE_AGAIN))
  ------------------
  |  Branch (1972:6): [True: 4, False: 0]
  |  Branch (1972:16): [True: 0, False: 4]
  ------------------
 1973|      0|    goto out;
 1974|       |
 1975|      4|  if(result) {
  ------------------
  |  Branch (1975:6): [True: 4, False: 0]
  ------------------
 1976|      4|    result = h2_progress_ingress(cf, data, len);
 1977|      4|    if(result)
  ------------------
  |  Branch (1977:8): [True: 0, False: 4]
  ------------------
 1978|      0|      goto out;
 1979|       |
 1980|      4|    result = stream_recv(cf, data, stream, buf, len, pnread);
 1981|      4|  }
 1982|       |
 1983|      4|  if(*pnread > 0) {
  ------------------
  |  Branch (1983:6): [True: 0, False: 4]
  ------------------
 1984|       |    /* Now that we transferred this to the upper layer, we report
 1985|       |     * the actual amount of DATA consumed to the H2 session, so
 1986|       |     * that it adjusts stream flow control */
 1987|      0|    nghttp2_session_consume(ctx->h2, stream->id, *pnread);
 1988|      0|    if(stream->closed) {
  ------------------
  |  Branch (1988:8): [True: 0, False: 0]
  ------------------
 1989|      0|      CURL_TRC_CF(data, cf, "[%d] DRAIN closed stream", stream->id);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1990|      0|      Curl_multi_mark_dirty(data);
 1991|      0|    }
 1992|      0|  }
 1993|       |
 1994|      4|out:
 1995|      4|  r2 = h2_progress_egress(cf, data);
 1996|      4|  if(r2 == CURLE_AGAIN) {
  ------------------
  |  Branch (1996:6): [True: 0, False: 4]
  ------------------
 1997|       |    /* pending data to send, need to be called again. Ideally, we
 1998|       |     * monitor the socket for POLLOUT, but when not SENDING
 1999|       |     * any more, we force processing of the transfer. */
 2000|      0|    if(!CURL_REQ_WANT_SEND(data))
  ------------------
  |  |   39|      0|#define CURL_REQ_WANT_SEND(d)  ((d)->req.io_flags & REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|      0|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  ------------------
  |  Branch (2000:8): [True: 0, False: 0]
  ------------------
 2001|      0|      Curl_multi_mark_dirty(data);
 2002|      0|  }
 2003|      4|  else if(r2) {
  ------------------
  |  Branch (2003:11): [True: 0, False: 4]
  ------------------
 2004|      0|    result = r2;
 2005|      0|  }
 2006|      4|  CURL_TRC_CF(data, cf, "[%d] cf_recv(len=%zu) -> %d, %zu, "
  ------------------
  |  |  153|      4|  do {                                          \
  |  |  154|      4|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      4|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      8|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 4, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      8|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      4|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      4|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      4|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 4]
  |  |  ------------------
  ------------------
 2007|      4|              "window=%d/%d, connection %d/%d",
 2008|      4|              stream->id, len, (int)result, *pnread,
 2009|      4|              nghttp2_session_get_stream_effective_recv_data_length(
 2010|      4|                ctx->h2, stream->id),
 2011|      4|              nghttp2_session_get_stream_effective_local_window_size(
 2012|      4|                ctx->h2, stream->id),
 2013|      4|              nghttp2_session_get_local_window_size(ctx->h2),
 2014|      4|              HTTP2_HUGE_WINDOW_SIZE);
 2015|       |
 2016|      4|  CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  677|      4|  do { \
  |  |  678|      4|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1075|      4|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  679|      4|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1075|      4|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  680|      4|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  118|      4|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  681|      4|  } while(0)
  |  |  ------------------
  |  |  |  Branch (681:11): [Folded, False: 4]
  |  |  ------------------
  ------------------
  |  Branch (2016:3): [True: 0, False: 4]
  |  Branch (2016:3): [True: 4, False: 0]
  |  Branch (2016:3): [True: 4, False: 0]
  |  Branch (2016:3): [True: 0, False: 0]
  |  Branch (2016:3): [True: 4, False: 0]
  |  Branch (2016:3): [True: 0, False: 0]
  ------------------
 2017|      4|  return result;
 2018|      4|}
http2.c:stream_recv:
 1833|      8|{
 1834|      8|  struct cf_h2_ctx *ctx = cf->ctx;
 1835|      8|  CURLcode result = CURLE_AGAIN;
 1836|       |
 1837|      8|  (void)buf;
 1838|      8|  (void)len;
 1839|      8|  *pnread = 0;
 1840|       |
 1841|      8|  if(!stream->xfer_result)
  ------------------
  |  Branch (1841:6): [True: 8, False: 0]
  ------------------
 1842|      8|    stream->xfer_result = cf_h2_update_local_win(cf, data, stream);
 1843|       |
 1844|      8|  if(stream->xfer_result) {
  ------------------
  |  Branch (1844:6): [True: 0, False: 8]
  ------------------
 1845|      0|    CURL_TRC_CF(data, cf, "[%d] xfer write failed", stream->id);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1846|      0|    result = stream->xfer_result;
 1847|      0|  }
 1848|      8|  else if(stream->closed) {
  ------------------
  |  Branch (1848:11): [True: 0, False: 8]
  ------------------
 1849|      0|    CURL_TRC_CF(data, cf, "[%d] returning CLOSE", stream->id);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1850|      0|    result = http2_handle_stream_close(cf, data, stream, pnread);
 1851|      0|  }
 1852|      8|  else if(stream->reset ||
  ------------------
  |  Branch (1852:11): [True: 0, False: 8]
  ------------------
 1853|      8|          (ctx->conn_closed && Curl_bufq_is_empty(&ctx->inbufq)) ||
  ------------------
  |  Branch (1853:12): [True: 2, False: 6]
  |  Branch (1853:32): [True: 2, False: 0]
  ------------------
 1854|      6|          (ctx->rcvd_goaway && ctx->remote_max_sid < stream->id)) {
  ------------------
  |  Branch (1854:12): [True: 0, False: 6]
  |  Branch (1854:32): [True: 0, False: 0]
  ------------------
 1855|      2|    CURL_TRC_CF(data, cf, "[%d] returning ERR", stream->id);
  ------------------
  |  |  153|      2|  do {                                          \
  |  |  154|      2|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      2|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      4|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 2, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      4|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      2|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1856|      2|    result = data->req.bytecount ? CURLE_PARTIAL_FILE : CURLE_HTTP2;
  ------------------
  |  Branch (1856:14): [True: 0, False: 2]
  ------------------
 1857|      2|  }
 1858|       |
 1859|      8|  if(result && (result != CURLE_AGAIN))
  ------------------
  |  Branch (1859:6): [True: 8, False: 0]
  |  Branch (1859:16): [True: 2, False: 6]
  ------------------
 1860|      2|    CURL_TRC_CF(data, cf, "[%d] stream_recv(len=%zu) -> %d, %zu",
  ------------------
  |  |  153|      2|  do {                                          \
  |  |  154|      2|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      2|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      4|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 2, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      4|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      2|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1861|      8|                stream->id, len, (int)result, *pnread);
 1862|      8|  return result;
 1863|      8|}
http2.c:cf_h2_cntrl:
 2649|      4|{
 2650|      4|  CURLcode result = CURLE_OK;
 2651|      4|  struct cf_call_data save;
 2652|       |
 2653|      4|  (void)arg2;
 2654|       |
 2655|      4|  CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  669|      4|  do { \
  |  |  670|      4|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  118|      4|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  671|      4|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1075|      4|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  672|      4|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  118|      4|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  673|      4|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  118|      4|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |                   CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  856|      4|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  674|      4|  } while(0)
  |  |  ------------------
  |  |  |  Branch (674:11): [Folded, False: 4]
  |  |  ------------------
  ------------------
  |  Branch (2655:3): [True: 4, False: 0]
  |  Branch (2655:3): [True: 0, False: 0]
  |  Branch (2655:3): [True: 4, False: 0]
  |  Branch (2655:3): [True: 0, False: 0]
  ------------------
 2656|      4|  switch(event) {
 2657|      0|  case CF_CTRL_DATA_SETUP:
  ------------------
  |  |  115|      0|#define CF_CTRL_DATA_SETUP              4  /* 0          NULL     first fail */
  ------------------
  |  Branch (2657:3): [True: 0, False: 4]
  ------------------
 2658|      0|    break;
 2659|      0|  case CF_CTRL_DATA_PAUSE:
  ------------------
  |  |  117|      0|#define CF_CTRL_DATA_PAUSE              6  /* on/off     NULL     first fail */
  ------------------
  |  Branch (2659:3): [True: 0, False: 4]
  ------------------
 2660|      0|    result = http2_data_pause(cf, data, (arg1 != 0));
 2661|      0|    break;
 2662|      0|  case CF_CTRL_FLUSH:
  ------------------
  |  |  123|      0|#define CF_CTRL_FLUSH            (256 + 2) /* 0          NULL     first fail */
  ------------------
  |  Branch (2662:3): [True: 0, False: 4]
  ------------------
 2663|      0|    result = cf_h2_flush(cf, data);
 2664|      0|    break;
 2665|      2|  case CF_CTRL_DATA_DONE:
  ------------------
  |  |  118|      2|#define CF_CTRL_DATA_DONE               7  /* premature  NULL     ignored */
  ------------------
  |  Branch (2665:3): [True: 2, False: 2]
  ------------------
 2666|      2|    http2_data_done(cf, data);
 2667|      2|    break;
 2668|      0|  case CF_CTRL_CONN_INFO_UPDATE:
  ------------------
  |  |  121|      0|#define CF_CTRL_CONN_INFO_UPDATE (256 + 0) /* 0          NULL     ignored */
  ------------------
  |  Branch (2668:3): [True: 0, False: 4]
  ------------------
 2669|      0|    if(!cf->sockindex && cf->connected) {
  ------------------
  |  Branch (2669:8): [True: 0, False: 0]
  |  Branch (2669:26): [True: 0, False: 0]
  ------------------
 2670|      0|      cf->conn->httpversion_seen = 20;
 2671|      0|      Curl_conn_set_multiplex(cf->conn);
 2672|      0|    }
 2673|      0|    break;
 2674|      2|  default:
  ------------------
  |  Branch (2674:3): [True: 2, False: 2]
  ------------------
 2675|      2|    break;
 2676|      4|  }
 2677|      4|  CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  677|      4|  do { \
  |  |  678|      4|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1075|      4|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  679|      4|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1075|      4|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  680|      4|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  118|      4|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  681|      4|  } while(0)
  |  |  ------------------
  |  |  |  Branch (681:11): [Folded, False: 4]
  |  |  ------------------
  ------------------
  |  Branch (2677:3): [True: 0, False: 4]
  |  Branch (2677:3): [True: 4, False: 0]
  |  Branch (2677:3): [True: 4, False: 0]
  |  Branch (2677:3): [True: 0, False: 0]
  |  Branch (2677:3): [True: 4, False: 0]
  |  Branch (2677:3): [True: 0, False: 0]
  ------------------
 2678|      4|  return result;
 2679|      4|}
http2.c:cf_h2_query:
 2723|      6|{
 2724|      6|  struct cf_h2_ctx *ctx = cf->ctx;
 2725|      6|  struct cf_call_data save;
 2726|      6|  size_t effective_max;
 2727|       |
 2728|      6|  switch(query) {
 2729|      0|  case CF_QUERY_MAX_CONCURRENT:
  ------------------
  |  |  167|      0|#define CF_QUERY_MAX_CONCURRENT     1  /* number     -        */
  ------------------
  |  Branch (2729:3): [True: 0, False: 6]
  ------------------
 2730|      0|    DEBUGASSERT(pres1);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2730:5): [True: 0, False: 0]
  |  Branch (2730:5): [True: 0, False: 0]
  ------------------
 2731|       |
 2732|      0|    CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  669|      0|  do { \
  |  |  670|      0|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  118|      0|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  671|      0|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  672|      0|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  118|      0|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  673|      0|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  118|      0|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |                   CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  856|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  674|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (674:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2732:5): [True: 0, False: 0]
  |  Branch (2732:5): [True: 0, False: 0]
  |  Branch (2732:5): [True: 0, False: 0]
  |  Branch (2732:5): [True: 0, False: 0]
  ------------------
 2733|      0|    if(!ctx->h2 || !nghttp2_session_check_request_allowed(ctx->h2)) {
  ------------------
  |  Branch (2733:8): [True: 0, False: 0]
  |  Branch (2733:20): [True: 0, False: 0]
  ------------------
 2734|       |      /* the limit is what we have in use right now */
 2735|      0|      effective_max = cf->conn->attached_xfers;
 2736|      0|    }
 2737|      0|    else {
 2738|      0|      effective_max = ctx->max_concurrent_streams;
 2739|      0|    }
 2740|      0|    *pres1 = (effective_max > INT_MAX) ? INT_MAX : (int)effective_max;
  ------------------
  |  Branch (2740:14): [True: 0, False: 0]
  ------------------
 2741|      0|    CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  677|      0|  do { \
  |  |  678|      0|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  679|      0|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  680|      0|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  118|      0|#define CF_CTX_CALL_DATA(cf) ((struct cf_h2_ctx *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  681|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (681:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2741:5): [True: 0, False: 0]
  |  Branch (2741:5): [True: 0, False: 0]
  |  Branch (2741:5): [True: 0, False: 0]
  |  Branch (2741:5): [True: 0, False: 0]
  |  Branch (2741:5): [True: 0, False: 0]
  |  Branch (2741:5): [True: 0, False: 0]
  ------------------
 2742|      0|    return CURLE_OK;
 2743|      0|  case CF_QUERY_STREAM_ERROR: {
  ------------------
  |  |  171|      0|#define CF_QUERY_STREAM_ERROR       6  /* error code - */
  ------------------
  |  Branch (2743:3): [True: 0, False: 6]
  ------------------
 2744|      0|    struct h2_stream_ctx *stream = H2_STREAM_CTX(ctx, data);
  ------------------
  |  |  257|      0|  ((struct h2_stream_ctx *)(                                             \
  |  |  258|      0|    (data) ? Curl_uint32_hash_get(&(ctx)->streams, (data)->mid) : NULL))
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2745|      0|    *pres1 = stream ? (int)stream->error : 0;
  ------------------
  |  Branch (2745:14): [True: 0, False: 0]
  ------------------
 2746|      0|    return CURLE_OK;
 2747|      0|  }
 2748|      2|  case CF_QUERY_NEED_FLUSH: {
  ------------------
  |  |  172|      2|#define CF_QUERY_NEED_FLUSH         7  /* TRUE/FALSE - */
  ------------------
  |  Branch (2748:3): [True: 2, False: 4]
  ------------------
 2749|      2|    struct h2_stream_ctx *stream = H2_STREAM_CTX(ctx, data);
  ------------------
  |  |  257|      2|  ((struct h2_stream_ctx *)(                                             \
  |  |  258|      2|    (data) ? Curl_uint32_hash_get(&(ctx)->streams, (data)->mid) : NULL))
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 2, False: 0]
  |  |  ------------------
  ------------------
 2750|      2|    if(!Curl_bufq_is_empty(&ctx->outbufq) ||
  ------------------
  |  Branch (2750:8): [True: 0, False: 2]
  ------------------
 2751|      2|       (stream && !Curl_bufq_is_empty(&stream->sendbuf))) {
  ------------------
  |  Branch (2751:9): [True: 2, False: 0]
  |  Branch (2751:19): [True: 0, False: 2]
  ------------------
 2752|      0|      *pres1 = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2753|      0|      return CURLE_OK;
 2754|      0|    }
 2755|      2|    break;
 2756|      2|  }
 2757|      2|  case CF_QUERY_HTTP_VERSION:
  ------------------
  |  |  174|      2|#define CF_QUERY_HTTP_VERSION       9  /* number (10/11/20/30)   - */
  ------------------
  |  Branch (2757:3): [True: 2, False: 4]
  ------------------
 2758|      2|    *pres1 = 20;
 2759|      2|    return CURLE_OK;
 2760|      2|  default:
  ------------------
  |  Branch (2760:3): [True: 2, False: 4]
  ------------------
 2761|      2|    break;
 2762|      6|  }
 2763|      4|  return cf->next ?
  ------------------
  |  Branch (2763:10): [True: 4, False: 0]
  ------------------
 2764|      4|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
 2765|      4|    CURLE_UNKNOWN_OPTION;
 2766|      6|}
http2.c:http2_cfilter_add:
 2790|      2|{
 2791|      2|  struct Curl_cfilter *cf = NULL;
 2792|      2|  struct cf_h2_ctx *ctx;
 2793|      2|  CURLcode result = CURLE_OUT_OF_MEMORY;
 2794|       |
 2795|      2|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2795:3): [True: 0, False: 2]
  |  Branch (2795:3): [True: 2, False: 0]
  ------------------
 2796|      2|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1473|      2|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 2797|      2|  if(!ctx)
  ------------------
  |  Branch (2797:6): [True: 0, False: 2]
  ------------------
 2798|      0|    goto out;
 2799|      2|  cf_h2_ctx_init(ctx, via_h1_upgrade);
 2800|       |
 2801|      2|  result = Curl_cf_create(&cf, &Curl_cft_nghttp2, ctx);
 2802|      2|  if(result)
  ------------------
  |  Branch (2802:6): [True: 0, False: 2]
  ------------------
 2803|      0|    goto out;
 2804|       |
 2805|      2|  ctx = NULL;
 2806|      2|  Curl_conn_cf_add(data, conn, sockindex, cf);
 2807|       |
 2808|      2|out:
 2809|      2|  if(result)
  ------------------
  |  Branch (2809:6): [True: 0, False: 2]
  ------------------
 2810|      0|    cf_h2_ctx_free(ctx);
 2811|      2|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (2811:10): [True: 0, False: 2]
  ------------------
 2812|      2|  return result;
 2813|      2|}
http2.c:cf_h2_ctx_init:
  176|      2|{
  177|      2|  Curl_bufcp_init(&ctx->stream_bufcp, H2_CHUNK_SIZE, H2_STREAM_POOL_SPARES);
  ------------------
  |  |   59|      2|#define H2_CHUNK_SIZE           (16 * 1024)
  ------------------
                Curl_bufcp_init(&ctx->stream_bufcp, H2_CHUNK_SIZE, H2_STREAM_POOL_SPARES);
  ------------------
  |  |   79|      2|#define H2_STREAM_POOL_SPARES   (H2_CONN_WINDOW_SIZE / H2_CHUNK_SIZE)
  |  |  ------------------
  |  |  |  |   61|      2|#define H2_CONN_WINDOW_SIZE     (10 * 1024 * 1024)
  |  |  ------------------
  |  |               #define H2_STREAM_POOL_SPARES   (H2_CONN_WINDOW_SIZE / H2_CHUNK_SIZE)
  |  |  ------------------
  |  |  |  |   59|      2|#define H2_CHUNK_SIZE           (16 * 1024)
  |  |  ------------------
  ------------------
  178|      2|  Curl_bufq_initp(&ctx->inbufq, &ctx->stream_bufcp, H2_NW_RECV_CHUNKS, 0);
  ------------------
  |  |   63|      2|#define H2_NW_RECV_CHUNKS       (H2_CONN_WINDOW_SIZE / H2_CHUNK_SIZE)
  |  |  ------------------
  |  |  |  |   61|      2|#define H2_CONN_WINDOW_SIZE     (10 * 1024 * 1024)
  |  |  ------------------
  |  |               #define H2_NW_RECV_CHUNKS       (H2_CONN_WINDOW_SIZE / H2_CHUNK_SIZE)
  |  |  ------------------
  |  |  |  |   59|      2|#define H2_CHUNK_SIZE           (16 * 1024)
  |  |  ------------------
  ------------------
  179|      2|  Curl_bufq_initp(&ctx->outbufq, &ctx->stream_bufcp, H2_NW_SEND_CHUNKS, 0);
  ------------------
  |  |   65|      2|#define H2_NW_SEND_CHUNKS       1
  ------------------
  180|      2|  curlx_dyn_init(&ctx->scratch, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  274|      2|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  181|      2|  Curl_uint32_hash_init(&ctx->streams, 63, h2_stream_hash_free);
  182|      2|  ctx->remote_max_sid = 2147483647;
  183|      2|  ctx->via_h1_upgrade = via_h1_upgrade;
  184|       |  ctx->initialized = TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
  185|      2|}
http2.c:h2_stream_hash_free:
  169|      2|{
  170|      2|  (void)id;
  171|      2|  DEBUGASSERT(stream);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (171:3): [True: 0, False: 2]
  |  Branch (171:3): [True: 2, False: 0]
  ------------------
  172|      2|  h2_stream_ctx_free((struct h2_stream_ctx *)stream);
  173|      2|}

canon_path:
  680|      1|{
  681|      1|  CURLcode result = CURLE_OK;
  682|       |
  683|      1|  struct Curl_str original_path;
  684|       |
  685|      1|  curlx_str_assign(&original_path, q, len);
  686|       |
  687|       |  /* Normalized path will be either the same or shorter than the original
  688|       |   * path, plus trailing slash */
  689|       |
  690|      1|  if(do_uri_encode)
  ------------------
  |  Branch (690:6): [True: 0, False: 1]
  ------------------
  691|      0|    result = uri_encode_path(&original_path, new_path);
  692|      1|  else
  693|      1|    result = curlx_dyn_addn(new_path, q, len);
  694|       |
  695|      1|  if(!result) {
  ------------------
  |  Branch (695:6): [True: 1, False: 0]
  ------------------
  696|      1|    if(curlx_dyn_len(new_path) == 0)
  ------------------
  |  Branch (696:8): [True: 0, False: 1]
  ------------------
  697|      0|      result = curlx_dyn_add(new_path, "/");
  698|      1|  }
  699|       |
  700|      1|  return result;
  701|      1|}
canon_query:
  706|      1|{
  707|      1|  CURLcode result = CURLE_OK;
  708|       |
  709|      1|  struct dynbuf query_array[MAX_QUERY_COMPONENTS];
  710|      1|  struct pair encoded_query_array[MAX_QUERY_COMPONENTS];
  711|      1|  size_t num_query_components;
  712|      1|  size_t counted_query_components = 0;
  713|      1|  size_t index;
  714|       |
  715|      1|  if(!query)
  ------------------
  |  Branch (715:6): [True: 0, False: 1]
  ------------------
  716|      0|    return result;
  717|       |
  718|      1|  result = split_to_dyn_array(query, &query_array[0], &num_query_components);
  719|      1|  if(result) {
  ------------------
  |  Branch (719:6): [True: 0, False: 1]
  ------------------
  720|      0|    goto fail;
  721|      0|  }
  722|       |
  723|       |  /* Create list of pairs, each pair containing an encoded query
  724|       |   * component */
  725|       |
  726|      3|  for(index = 0; index < num_query_components; index++) {
  ------------------
  |  Branch (726:18): [True: 2, False: 1]
  ------------------
  727|      2|    const char *in_key;
  728|      2|    size_t in_key_len;
  729|      2|    const char *offset;
  730|      2|    size_t query_part_len = curlx_dyn_len(&query_array[index]);
  731|      2|    const char *query_part = curlx_dyn_ptr(&query_array[index]);
  732|       |
  733|      2|    in_key = query_part;
  734|       |
  735|      2|    offset = strchr(query_part, '=');
  736|       |    /* If there is no equals, this key has no value */
  737|      2|    if(!offset) {
  ------------------
  |  Branch (737:8): [True: 0, False: 2]
  ------------------
  738|      0|      in_key_len = strlen(in_key);
  739|      0|    }
  740|      2|    else {
  741|      2|      in_key_len = offset - in_key;
  742|      2|    }
  743|       |
  744|      2|    curlx_dyn_init(&encoded_query_array[index].key,
  745|      2|      (query_part_len * 3) + 1);
  746|      2|    curlx_dyn_init(&encoded_query_array[index].value,
  747|      2|      (query_part_len * 3) + 1);
  748|      2|    counted_query_components++;
  749|       |
  750|       |    /* Decode/encode the key */
  751|      2|    result = normalize_query(in_key, in_key_len,
  752|      2|                             &encoded_query_array[index].key);
  753|      2|    if(result) {
  ------------------
  |  Branch (753:8): [True: 0, False: 2]
  ------------------
  754|      0|      goto fail;
  755|      0|    }
  756|       |
  757|       |    /* Decode/encode the value if it exists */
  758|      2|    if(offset && offset != (query_part + query_part_len - 1)) {
  ------------------
  |  Branch (758:8): [True: 2, False: 0]
  |  Branch (758:18): [True: 2, False: 0]
  ------------------
  759|      2|      size_t in_value_len;
  760|      2|      const char *in_value = offset + 1;
  761|      2|      in_value_len = query_part + query_part_len - (offset + 1);
  762|      2|      result = normalize_query(in_value, in_value_len,
  763|      2|                               &encoded_query_array[index].value);
  764|      2|      if(result) {
  ------------------
  |  Branch (764:10): [True: 0, False: 2]
  ------------------
  765|      0|        goto fail;
  766|      0|      }
  767|      2|    }
  768|      0|    else {
  769|       |      /* If there is no value, the value is an empty string */
  770|      0|      curlx_dyn_init(&encoded_query_array[index].value, 2);
  771|      0|      result = curlx_dyn_addn(&encoded_query_array[index].value, "", 1);
  772|      0|    }
  773|       |
  774|      2|    if(result) {
  ------------------
  |  Branch (774:8): [True: 0, False: 2]
  ------------------
  775|      0|      goto fail;
  776|      0|    }
  777|      2|  }
  778|       |
  779|       |  /* Sort the encoded query components by key and value */
  780|      1|  qsort(&encoded_query_array, num_query_components,
  781|      1|        sizeof(struct pair), compare_func);
  782|       |
  783|       |  /* Append the query components together to make a full query string */
  784|      3|  for(index = 0; index < num_query_components; index++) {
  ------------------
  |  Branch (784:18): [True: 2, False: 1]
  ------------------
  785|       |
  786|      2|    if(index)
  ------------------
  |  Branch (786:8): [True: 1, False: 1]
  ------------------
  787|      1|      result = curlx_dyn_addn(dq, "&", 1);
  788|      2|    if(!result) {
  ------------------
  |  Branch (788:8): [True: 2, False: 0]
  ------------------
  789|      2|      const char *key_ptr = curlx_dyn_ptr(&encoded_query_array[index].key);
  790|      2|      const char *value_ptr = curlx_dyn_ptr(&encoded_query_array[index].value);
  791|      2|      size_t vlen = curlx_dyn_len(&encoded_query_array[index].value);
  792|      2|      if(value_ptr && vlen) {
  ------------------
  |  Branch (792:10): [True: 2, False: 0]
  |  Branch (792:23): [True: 2, False: 0]
  ------------------
  793|      2|        result = curlx_dyn_addf(dq, "%s=%s", key_ptr, value_ptr);
  794|      2|      }
  795|      0|      else {
  796|       |        /* Empty value is always encoded to key= */
  797|      0|        result = curlx_dyn_addf(dq, "%s=", key_ptr);
  798|      0|      }
  799|      2|    }
  800|      2|    if(result)
  ------------------
  |  Branch (800:8): [True: 0, False: 2]
  ------------------
  801|      0|      break;
  802|      2|  }
  803|       |
  804|      1|fail:
  805|      1|  if(counted_query_components)
  ------------------
  |  Branch (805:6): [True: 1, False: 0]
  ------------------
  806|       |    /* the encoded_query_array might not be initialized yet */
  807|      1|    pair_array_free(&encoded_query_array[0], counted_query_components);
  808|      1|  dyn_array_free(&query_array[0], num_query_components);
  809|      1|  return result;
  810|      1|}
Curl_output_aws_sigv4:
 1156|     14|{
 1157|     14|  CURLcode result = CURLE_OUT_OF_MEMORY;
 1158|     14|  struct Curl_str provider0 = { NULL, 0 };
 1159|     14|  struct Curl_str provider1 = { NULL, 0 };
 1160|     14|  struct Curl_str region = { NULL, 0 };
 1161|     14|  struct Curl_str service = { NULL, 0 };
 1162|     14|  const char *hostname = data->state.origin->hostname;
 1163|     14|  char timestamp[TIMESTAMP_SIZE];
 1164|     14|  char date[9];
 1165|     14|  struct dynbuf canonical_headers;
 1166|     14|  struct dynbuf signed_headers;
 1167|     14|  char *date_header = NULL;
 1168|     14|  Curl_HttpReq httpreq;
 1169|     14|  const char *method = NULL;
 1170|     14|  const char *payload_hash = NULL;
 1171|     14|  size_t payload_hash_len = 0;
 1172|     14|  unsigned char sha_hash[CURL_SHA256_DIGEST_LENGTH];
 1173|     14|  char sha_hex[SHA256_HEX_LENGTH];
 1174|     14|  char content_sha256_hdr[CONTENT_SHA256_HDR_LEN + 2] = ""; /* add \r\n */
 1175|     14|  char *canonical_request = NULL;
 1176|     14|  char *request_type = NULL;
 1177|     14|  char *credential_scope = NULL;
 1178|     14|  char *str_to_sign = NULL;
 1179|       |
 1180|     14|  if(data->set.path_as_is) {
  ------------------
  |  Branch (1180:6): [True: 0, False: 14]
  ------------------
 1181|      0|    failf(data, "Cannot use sigv4 authentication with path-as-is flag");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1182|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1183|      0|  }
 1184|       |
 1185|     14|  if(Curl_checkheaders(data, STRCONST("Authorization")))
  ------------------
  |  | 1297|     14|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|     14|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (1185:6): [True: 0, False: 14]
  ------------------
 1186|       |    /* Authorization already present, Bailing out */
 1187|      0|    return CURLE_OK;
 1188|       |
 1189|       |  /* we init those buffers here, so goto fail will free initialized dynbuf */
 1190|     14|  curlx_dyn_init(&canonical_headers, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  274|     14|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
 1191|     14|  curlx_dyn_init(&signed_headers, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  274|     14|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
 1192|       |
 1193|     14|  result = parse_sigv4_params(data, hostname, &provider0, &provider1,
 1194|     14|                              &region, &service);
 1195|     14|  if(!result) {
  ------------------
  |  Branch (1195:6): [True: 1, False: 13]
  ------------------
 1196|      1|    Curl_http_method(data, &method, &httpreq);
 1197|      1|    result = get_payload_hash(data, httpreq, &provider0, &provider1, &service,
 1198|      1|                              sha_hash, sha_hex, content_sha256_hdr,
 1199|      1|                              &payload_hash, &payload_hash_len);
 1200|      1|  }
 1201|       |
 1202|     14|  if(!result)
  ------------------
  |  Branch (1202:6): [True: 1, False: 13]
  ------------------
 1203|      1|    result = get_timestamp(timestamp, sizeof(timestamp));
 1204|       |
 1205|     14|  if(!result)
  ------------------
  |  Branch (1205:6): [True: 1, False: 13]
  ------------------
 1206|      1|    result = make_canonical_request(data, timestamp,
 1207|      1|                                    &provider1, &service,
 1208|      1|                                    method, payload_hash, payload_hash_len,
 1209|      1|                                    &date_header, content_sha256_hdr,
 1210|      1|                                    &canonical_headers, &signed_headers,
 1211|      1|                                    &canonical_request);
 1212|     14|  if(!result) {
  ------------------
  |  Branch (1212:6): [True: 1, False: 13]
  ------------------
 1213|       |    /* the timestamp might have been updated in make_canonical_request */
 1214|      1|    memcpy(date, timestamp, sizeof(date) - 1);
 1215|      1|    date[sizeof(date) - 1] = 0;
 1216|       |
 1217|      1|    result = make_string_to_sign(data, &provider0, &region, &service,
 1218|      1|                                 date, timestamp, canonical_request,
 1219|      1|                                 &request_type, &credential_scope,
 1220|      1|                                 &str_to_sign);
 1221|      1|  }
 1222|     14|  if(!result)
  ------------------
  |  Branch (1222:6): [True: 1, False: 13]
  ------------------
 1223|      1|    result = sign_and_set_auth_headers(data, &provider0, &region, &service,
 1224|      1|                                       request_type, credential_scope,
 1225|      1|                                       date, str_to_sign, date_header,
 1226|      1|                                       content_sha256_hdr, &signed_headers);
 1227|       |
 1228|     14|  curlx_dyn_free(&canonical_headers);
 1229|     14|  curlx_dyn_free(&signed_headers);
 1230|     14|  curlx_free(canonical_request);
  ------------------
  |  | 1476|     14|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1231|     14|  curlx_free(request_type);
  ------------------
  |  | 1476|     14|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1232|     14|  curlx_free(credential_scope);
  ------------------
  |  | 1476|     14|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1233|     14|  curlx_free(str_to_sign);
  ------------------
  |  | 1476|     14|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1234|     14|  curlx_free(date_header);
  ------------------
  |  | 1476|     14|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1235|     14|  return result;
 1236|     14|}
http_aws_sigv4.c:is_reserved_char:
  200|     26|{
  201|     26|  return (ISALNUM(c) || ISURLPUNTCS(c));
  ------------------
  |  |   39|     52|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|     52|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 26, False: 0]
  |  |  |  |  |  Branch (42:38): [True: 1, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   41|     51|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:22): [True: 23, False: 2]
  |  |  |  |  |  Branch (41:38): [True: 23, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   40|      2|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (40:22): [True: 2, False: 0]
  |  |  |  |  |  Branch (40:38): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                return (ISALNUM(c) || ISURLPUNTCS(c));
  ------------------
  |  |   46|      0|  (((x) == '-') || ((x) == '.') || ((x) == '_') || ((x) == '~'))
  |  |  ------------------
  |  |  |  Branch (46:4): [True: 0, False: 0]
  |  |  |  Branch (46:20): [True: 0, False: 0]
  |  |  |  Branch (46:36): [True: 0, False: 0]
  |  |  |  Branch (46:52): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  202|     26|}
http_aws_sigv4.c:split_to_dyn_array:
  153|      1|{
  154|      1|  CURLcode result = CURLE_OK;
  155|      1|  size_t len = strlen(source);
  156|      1|  size_t pos;         /* Position in result buffer */
  157|      1|  size_t start = 0;   /* Start of current segment */
  158|      1|  size_t segment_length = 0;
  159|      1|  size_t index = 0;
  160|      1|  size_t num_splits = 0;
  161|       |
  162|       |  /* Split source_ptr on SPLIT_BY and store the segment offsets and length in
  163|       |   * array */
  164|     30|  for(pos = 0; pos < len; pos++) {
  ------------------
  |  Branch (164:16): [True: 29, False: 1]
  ------------------
  165|     29|    if(source[pos] == SPLIT_BY) {
  ------------------
  |  |  148|     29|#define SPLIT_BY '&'
  ------------------
  |  Branch (165:8): [True: 1, False: 28]
  ------------------
  166|      1|      if(segment_length) {
  ------------------
  |  Branch (166:10): [True: 1, False: 0]
  ------------------
  167|      1|        curlx_dyn_init(&db[index], segment_length + 1);
  168|      1|        result = curlx_dyn_addn(&db[index], &source[start], segment_length);
  169|      1|        if(result)
  ------------------
  |  Branch (169:12): [True: 0, False: 1]
  ------------------
  170|      0|          goto fail;
  171|       |
  172|      1|        segment_length = 0;
  173|      1|        index++;
  174|      1|        if(++num_splits == MAX_QUERY_COMPONENTS) {
  ------------------
  |  |   58|      1|#define MAX_QUERY_COMPONENTS 128
  ------------------
  |  Branch (174:12): [True: 0, False: 1]
  ------------------
  175|      0|          result = CURLE_TOO_LARGE;
  176|      0|          goto fail;
  177|      0|        }
  178|      1|      }
  179|      1|      start = pos + 1;
  180|      1|    }
  181|     28|    else {
  182|     28|      segment_length++;
  183|     28|    }
  184|     29|  }
  185|       |
  186|      1|  if(segment_length) {
  ------------------
  |  Branch (186:6): [True: 1, False: 0]
  ------------------
  187|      1|    curlx_dyn_init(&db[index], segment_length + 1);
  188|      1|    result = curlx_dyn_addn(&db[index], &source[start], segment_length);
  189|      1|    if(!result) {
  ------------------
  |  Branch (189:8): [True: 1, False: 0]
  ------------------
  190|      1|      if(++num_splits == MAX_QUERY_COMPONENTS)
  ------------------
  |  |   58|      1|#define MAX_QUERY_COMPONENTS 128
  ------------------
  |  Branch (190:10): [True: 0, False: 1]
  ------------------
  191|      0|        result = CURLE_TOO_LARGE;
  192|      1|    }
  193|      1|  }
  194|      1|fail:
  195|      1|  *num_splits_out = num_splits;
  196|      1|  return result;
  197|      1|}
http_aws_sigv4.c:normalize_query:
  229|      4|{
  230|      4|  CURLcode result = CURLE_OK;
  231|       |
  232|     30|  while(len && !result) {
  ------------------
  |  Branch (232:9): [True: 26, False: 4]
  |  Branch (232:16): [True: 26, False: 0]
  ------------------
  233|     26|    unsigned char in = (unsigned char)*string;
  234|     26|    if(('%' == in) && (len > 2) &&
  ------------------
  |  Branch (234:8): [True: 0, False: 26]
  |  Branch (234:23): [True: 0, False: 0]
  ------------------
  235|      0|       ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
  ------------------
  |  |   37|     26|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   42|      0|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 0, False: 0]
  |  |  |  |  |  Branch (42: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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                     ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
  ------------------
  |  |   37|      0|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   42|      0|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 0, False: 0]
  |  |  |  |  |  Branch (42: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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  236|       |      /* this is two hexadecimal digits following a '%' */
  237|      0|      in = (unsigned char)((curlx_hexval(string[1]) << 4) |
  ------------------
  |  |  111|      0|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  238|      0|                           curlx_hexval(string[2]));
  ------------------
  |  |  111|      0|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  239|      0|      string += 3;
  240|      0|      len -= 3;
  241|      0|      if(in == '+') {
  ------------------
  |  Branch (241:10): [True: 0, False: 0]
  ------------------
  242|       |        /* decodes to plus, so leave this encoded */
  243|      0|        result = curlx_dyn_addn(db, "%2B", 3);
  244|      0|        continue;
  245|      0|      }
  246|      0|    }
  247|     26|    else {
  248|     26|      string++;
  249|     26|      len--;
  250|     26|    }
  251|       |
  252|     26|    if(is_reserved_char(in))
  ------------------
  |  Branch (252:8): [True: 26, False: 0]
  ------------------
  253|       |      /* Escape unreserved chars from RFC 3986 */
  254|     26|      result = curlx_dyn_addn(db, &in, 1);
  255|      0|    else if(in == '+')
  ------------------
  |  Branch (255:13): [True: 0, False: 0]
  ------------------
  256|       |      /* Encode '+' as space */
  257|      0|      result = curlx_dyn_add(db, "%20");
  258|      0|    else
  259|      0|      result = curlx_dyn_addf(db, "%%%02X", in);
  260|     26|  }
  261|       |
  262|      4|  return result;
  263|      4|}
http_aws_sigv4.c:compare_func:
  638|      1|{
  639|      1|  const struct pair *aa = a;
  640|      1|  const struct pair *bb = b;
  641|      1|  const size_t aa_key_len = curlx_dyn_len(&aa->key);
  642|      1|  const size_t bb_key_len = curlx_dyn_len(&bb->key);
  643|      1|  const size_t aa_value_len = curlx_dyn_len(&aa->value);
  644|      1|  const size_t bb_value_len = curlx_dyn_len(&bb->value);
  645|      1|  int compare;
  646|       |
  647|       |  /* If one element is empty, the other is always sorted higher */
  648|       |
  649|       |  /* Compare keys */
  650|      1|  if((aa_key_len == 0) && (bb_key_len == 0))
  ------------------
  |  Branch (650:6): [True: 0, False: 1]
  |  Branch (650:27): [True: 0, False: 0]
  ------------------
  651|      0|    return 0;
  652|      1|  if(aa_key_len == 0)
  ------------------
  |  Branch (652:6): [True: 0, False: 1]
  ------------------
  653|      0|    return -1;
  654|      1|  if(bb_key_len == 0)
  ------------------
  |  Branch (654:6): [True: 0, False: 1]
  ------------------
  655|      0|    return 1;
  656|      1|  compare = strcmp(curlx_dyn_ptr(&aa->key), curlx_dyn_ptr(&bb->key));
  657|      1|  if(compare) {
  ------------------
  |  Branch (657:6): [True: 1, False: 0]
  ------------------
  658|      1|    return compare;
  659|      1|  }
  660|       |
  661|       |  /* Compare values */
  662|      0|  if((aa_value_len == 0) && (bb_value_len == 0))
  ------------------
  |  Branch (662:6): [True: 0, False: 0]
  |  Branch (662:29): [True: 0, False: 0]
  ------------------
  663|      0|    return 0;
  664|      0|  if(aa_value_len == 0)
  ------------------
  |  Branch (664:6): [True: 0, False: 0]
  ------------------
  665|      0|    return -1;
  666|      0|  if(bb_value_len == 0)
  ------------------
  |  Branch (666:6): [True: 0, False: 0]
  ------------------
  667|      0|    return 1;
  668|      0|  compare = strcmp(curlx_dyn_ptr(&aa->value), curlx_dyn_ptr(&bb->value));
  669|       |
  670|      0|  return compare;
  671|      0|}
http_aws_sigv4.c:pair_array_free:
  122|      1|{
  123|      1|  size_t index;
  124|       |
  125|      3|  for(index = 0; index != num_elements; index++) {
  ------------------
  |  Branch (125:18): [True: 2, False: 1]
  ------------------
  126|      2|    curlx_dyn_free(&pair_array[index].key);
  127|      2|    curlx_dyn_free(&pair_array[index].value);
  128|      2|  }
  129|      1|}
http_aws_sigv4.c:dyn_array_free:
  135|      1|{
  136|      1|  size_t index;
  137|       |
  138|      3|  for(index = 0; index < num_elements; index++)
  ------------------
  |  Branch (138:18): [True: 2, False: 1]
  ------------------
  139|      2|    curlx_dyn_free((&db[index]));
  140|      1|}
http_aws_sigv4.c:parse_sigv4_params:
  818|     14|{
  819|     14|  const char *line = CURL_EASY_STR(data, STRING_AWS_SIGV4);
  ------------------
  |  | 1228|     14|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
  820|     14|  if(!line || !*line)
  ------------------
  |  Branch (820:6): [True: 0, False: 14]
  |  Branch (820:15): [True: 10, False: 4]
  ------------------
  821|     10|    line = "aws:amz";
  822|       |
  823|       |  /* provider0[:provider1[:region[:service]]]
  824|       |
  825|       |     No string can be longer than N bytes of non-whitespace */
  826|     14|  if(curlx_str_until(&line, provider0, MAX_SIGV4_LEN, ':')) {
  ------------------
  |  |  282|     14|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (826:6): [True: 0, False: 14]
  ------------------
  827|      0|    failf(data, "first aws-sigv4 provider cannot be empty");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  828|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  829|      0|  }
  830|     14|  if(curlx_str_single(&line, ':') ||
  ------------------
  |  Branch (830:6): [True: 3, False: 11]
  ------------------
  831|     11|     curlx_str_until(&line, provider1, MAX_SIGV4_LEN, ':')) {
  ------------------
  |  |  282|     11|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (831:6): [True: 0, False: 11]
  ------------------
  832|      3|    *provider1 = *provider0;
  833|      3|  }
  834|     11|  else if(curlx_str_single(&line, ':') ||
  ------------------
  |  Branch (834:11): [True: 10, False: 1]
  ------------------
  835|      1|          curlx_str_until(&line, region, MAX_SIGV4_LEN, ':') ||
  ------------------
  |  |  282|      1|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (835:11): [True: 0, False: 1]
  ------------------
  836|      1|          curlx_str_single(&line, ':') ||
  ------------------
  |  Branch (836:11): [True: 0, False: 1]
  ------------------
  837|     10|          curlx_str_until(&line, service, MAX_SIGV4_LEN, ':')) {
  ------------------
  |  |  282|      1|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (837:11): [True: 0, False: 1]
  ------------------
  838|       |    /* nothing to do */
  839|     10|  }
  840|       |
  841|     14|  if(!curlx_strlen(service)) {
  ------------------
  |  |   50|     14|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (841:6): [True: 13, False: 1]
  ------------------
  842|     13|    const char *p = hostname;
  843|     13|    if(curlx_str_until(&p, service, MAX_SIGV4_LEN, '.') ||
  ------------------
  |  |  282|     13|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (843:8): [True: 0, False: 13]
  ------------------
  844|     13|       curlx_str_single(&p, '.')) {
  ------------------
  |  Branch (844:8): [True: 0, False: 13]
  ------------------
  845|      0|      failf(data, "aws-sigv4: service missing in parameters and hostname");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  846|      0|      return CURLE_URL_MALFORMAT;
  847|      0|    }
  848|       |
  849|     13|    infof(data, "aws_sigv4: picked service %.*s from host",
  ------------------
  |  |  143|     13|  do {                               \
  |  |  144|     13|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|     13|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 13, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 13]
  |  |  |  |  ------------------
  |  |  |  |  323|     13|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     13|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     13|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 13]
  |  |  ------------------
  ------------------
  850|     13|          (int)curlx_strlen(service), curlx_str(service));
  851|       |
  852|     13|    if(!curlx_strlen(region)) {
  ------------------
  |  |   50|     13|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (852:8): [True: 13, False: 0]
  ------------------
  853|     13|      if(curlx_str_until(&p, region, MAX_SIGV4_LEN, '.') ||
  ------------------
  |  |  282|     13|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (853:10): [True: 0, False: 13]
  ------------------
  854|     13|         curlx_str_single(&p, '.')) {
  ------------------
  |  Branch (854:10): [True: 13, False: 0]
  ------------------
  855|     13|        failf(data, "aws-sigv4: region missing in parameters and hostname");
  ------------------
  |  |   62|     13|#define failf Curl_failf
  ------------------
  856|     13|        return CURLE_URL_MALFORMAT;
  857|     13|      }
  858|      0|      infof(data, "aws_sigv4: picked region %.*s from host",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  859|      0|            (int)curlx_strlen(region), curlx_str(region));
  860|      0|    }
  861|     13|  }
  862|       |
  863|      1|  return CURLE_OK;
  864|     14|}
http_aws_sigv4.c:get_payload_hash:
  876|      1|{
  877|      1|  *payload_hash_out =
  878|      1|    parse_content_sha_hdr(data, curlx_str(provider1),
  ------------------
  |  |   49|      1|#define curlx_str(x)    ((x)->str)
  ------------------
  879|      1|                          curlx_strlen(provider1), payload_hash_len_out);
  ------------------
  |  |   50|      1|#define curlx_strlen(x) ((x)->len)
  ------------------
  880|       |
  881|      1|  if(!*payload_hash_out) {
  ------------------
  |  Branch (881:6): [True: 0, False: 1]
  ------------------
  882|      0|    CURLcode result;
  883|       |    /* AWS S3 requires a x-amz-content-sha256 header, and supports special
  884|       |     * values like UNSIGNED-PAYLOAD */
  885|      0|    bool sign_as_s3 = curlx_str_casecompare(provider0, "aws") &&
  ------------------
  |  Branch (885:23): [True: 0, False: 0]
  ------------------
  886|      0|                      curlx_str_casecompare(service, "s3");
  ------------------
  |  Branch (886:23): [True: 0, False: 0]
  ------------------
  887|       |
  888|      0|    if(sign_as_s3)
  ------------------
  |  Branch (888:8): [True: 0, False: 0]
  ------------------
  889|      0|      result = calc_s3_payload_hash(data, httpreq, curlx_str(provider1),
  ------------------
  |  |   49|      0|#define curlx_str(x)    ((x)->str)
  ------------------
  890|      0|                                    curlx_strlen(provider1), sha_hash,
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  891|      0|                                    sha_hex, content_sha256_hdr);
  892|      0|    else
  893|      0|      result = calc_payload_hash(data, sha_hash, sha_hex);
  894|      0|    if(result)
  ------------------
  |  Branch (894:8): [True: 0, False: 0]
  ------------------
  895|      0|      return result;
  896|       |
  897|      0|    *payload_hash_out = sha_hex;
  898|       |    /* may be shorter than SHA256_HEX_LENGTH, like S3_UNSIGNED_PAYLOAD */
  899|      0|    *payload_hash_len_out = strlen(sha_hex);
  900|      0|  }
  901|      1|  return CURLE_OK;
  902|      1|}
http_aws_sigv4.c:parse_content_sha_hdr:
  550|      1|{
  551|      1|  char key[CONTENT_SHA256_KEY_LEN];
  552|      1|  size_t key_len;
  553|      1|  const char *value;
  554|      1|  size_t len;
  555|       |
  556|      1|  key_len = curl_msnprintf(key, sizeof(key), "x-%.*s-content-sha256",
  557|      1|                           (int)plen, provider1);
  558|       |
  559|      1|  value = Curl_checkheaders(data, key, key_len);
  560|      1|  if(!value)
  ------------------
  |  Branch (560:6): [True: 0, False: 1]
  ------------------
  561|      0|    return NULL;
  562|       |
  563|      1|  value = strchr(value, ':');
  564|      1|  if(!value)
  ------------------
  |  Branch (564:6): [True: 0, False: 1]
  ------------------
  565|      0|    return NULL;
  566|      1|  ++value;
  567|       |
  568|      1|  curlx_str_passblanks(&value);
  569|       |
  570|      1|  len = strlen(value);
  571|      1|  while(len > 0 && ISBLANK(value[len - 1]))
  ------------------
  |  |   43|      1|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 0, False: 1]
  |  |  |  Branch (43:38): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  |  Branch (571:9): [True: 1, False: 0]
  ------------------
  572|      0|    --len;
  573|       |
  574|      1|  *value_len = len;
  575|      1|  return value;
  576|      1|}
http_aws_sigv4.c:sha256_to_hex:
   66|      2|{
   67|      2|  Curl_hexencode(sha, CURL_SHA256_DIGEST_LENGTH,
  ------------------
  |  |   38|      2|#define CURL_SHA256_DIGEST_LENGTH 32 /* fixed size */
  ------------------
   68|      2|                 (unsigned char *)dst, SHA256_HEX_LENGTH);
  ------------------
  |  |   56|      2|#define SHA256_HEX_LENGTH ((2 * CURL_SHA256_DIGEST_LENGTH) + 1)
  |  |  ------------------
  |  |  |  |   38|      2|#define CURL_SHA256_DIGEST_LENGTH 32 /* fixed size */
  |  |  ------------------
  ------------------
   69|      2|}
http_aws_sigv4.c:get_timestamp:
  905|      1|{
  906|      1|  time_t clock;
  907|      1|  struct tm tm;
  908|      1|  CURLcode result;
  909|       |
  910|      1|#ifdef DEBUGBUILD
  911|      1|  {
  912|      1|    char *force_timestamp = getenv("CURL_FORCETIME");
  913|      1|    if(force_timestamp)
  ------------------
  |  Branch (913:8): [True: 0, False: 1]
  ------------------
  914|      0|      clock = 0;
  915|      1|    else
  916|      1|      clock = time(NULL);
  917|      1|  }
  918|       |#else
  919|       |  clock = time(NULL);
  920|       |#endif
  921|      1|  result = curlx_gmtime(clock, &tm);
  922|      1|  if(result)
  ------------------
  |  Branch (922:6): [True: 0, False: 1]
  ------------------
  923|      0|    return result;
  924|       |
  925|      1|  if(!strftime(timestamp, stampsize, "%Y%m%dT%H%M%SZ", &tm))
  ------------------
  |  Branch (925:6): [True: 0, False: 1]
  ------------------
  926|      0|    return CURLE_OUT_OF_MEMORY;
  927|       |
  928|      1|  return CURLE_OK;
  929|      1|}
http_aws_sigv4.c:make_canonical_request:
  943|      1|{
  944|      1|  struct dynbuf canonical_query;
  945|      1|  struct dynbuf canonical_path;
  946|      1|  CURLcode result;
  947|       |
  948|      1|  curlx_dyn_init(&canonical_query, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  274|      1|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  949|      1|  curlx_dyn_init(&canonical_path, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  274|      1|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  950|       |
  951|      1|  result = make_headers(data, timestamp,
  952|      1|                        curlx_str(provider1), curlx_strlen(provider1),
  ------------------
  |  |   49|      1|#define curlx_str(x)    ((x)->str)
  ------------------
                                      curlx_str(provider1), curlx_strlen(provider1),
  ------------------
  |  |   50|      1|#define curlx_strlen(x) ((x)->len)
  ------------------
  953|      1|                        date_header_out, content_sha256_hdr,
  954|      1|                        canonical_headers, signed_headers);
  955|      1|  if(result)
  ------------------
  |  Branch (955:6): [True: 0, False: 1]
  ------------------
  956|      0|    goto fail;
  957|       |
  958|      1|  result = canon_query(data->state.up.query, &canonical_query);
  959|      1|  if(result)
  ------------------
  |  Branch (959:6): [True: 0, False: 1]
  ------------------
  960|      0|    goto fail;
  961|       |
  962|      1|  result = canon_path(data->state.up.path, strlen(data->state.up.path),
  963|      1|                      &canonical_path,
  964|      1|                      should_urlencode(service));
  965|      1|  if(result)
  ------------------
  |  Branch (965:6): [True: 0, False: 1]
  ------------------
  966|      0|    goto fail;
  967|       |
  968|      1|  *canonical_request_out =
  969|      1|    curl_maprintf("%s\n" /* HTTPRequestMethod */
  970|      1|                  "%s\n" /* CanonicalURI */
  971|      1|                  "%s\n" /* CanonicalQueryString */
  972|      1|                  "%s\n" /* CanonicalHeaders */
  973|      1|                  "%s\n" /* SignedHeaders */
  974|      1|                  "%.*s",  /* HashedRequestPayload in hex */
  975|      1|                  method,
  976|      1|                  curlx_dyn_ptr(&canonical_path),
  977|      1|                  curlx_dyn_ptr(&canonical_query) ?
  ------------------
  |  Branch (977:19): [True: 1, False: 0]
  ------------------
  978|      1|                  curlx_dyn_ptr(&canonical_query) : "",
  979|      1|                  curlx_dyn_ptr(canonical_headers),
  980|      1|                  curlx_dyn_ptr(signed_headers),
  981|      1|                  (int)payload_hash_len, payload_hash);
  982|      1|  if(!*canonical_request_out) {
  ------------------
  |  Branch (982:6): [True: 0, False: 1]
  ------------------
  983|      0|    result = CURLE_OUT_OF_MEMORY;
  984|      0|    goto fail;
  985|      0|  }
  986|       |
  987|      1|  result = CURLE_OK;
  988|      1|fail:
  989|      1|  curlx_dyn_free(&canonical_query);
  990|      1|  curlx_dyn_free(&canonical_path);
  991|      1|  return result;
  992|      1|}
http_aws_sigv4.c:make_headers:
  379|      1|{
  380|      1|  char date_hdr_key[DATE_HDR_KEY_LEN];
  381|      1|  char date_full_hdr[DATE_FULL_HDR_LEN];
  382|      1|  struct curl_slist *head = NULL;
  383|      1|  struct curl_slist *tmp_head = NULL;
  384|      1|  CURLcode result = CURLE_OUT_OF_MEMORY;
  385|      1|  struct curl_slist *l;
  386|      1|  bool again = TRUE;
  ------------------
  |  | 1045|      1|#define TRUE true
  ------------------
  387|       |
  388|      1|  curl_msnprintf(date_hdr_key, DATE_HDR_KEY_LEN, "X-%.*s-Date",
  ------------------
  |  |  283|      1|#define DATE_HDR_KEY_LEN (MAX_SIGV4_LEN + sizeof("X--Date"))
  |  |  ------------------
  |  |  |  |  282|      1|#define MAX_SIGV4_LEN    64
  |  |  ------------------
  ------------------
  389|      1|                 (int)plen, provider1);
  390|       |  /* provider1 ucfirst */
  391|      1|  Curl_strntolower(&date_hdr_key[2], provider1, plen);
  392|      1|  date_hdr_key[2] = Curl_raw_toupper(provider1[0]);
  393|       |
  394|      1|  curl_msnprintf(date_full_hdr, DATE_FULL_HDR_LEN,
  ------------------
  |  |  286|      1|#define DATE_FULL_HDR_LEN (DATE_HDR_KEY_LEN + TIMESTAMP_SIZE + 1)
  |  |  ------------------
  |  |  |  |  283|      1|#define DATE_HDR_KEY_LEN (MAX_SIGV4_LEN + sizeof("X--Date"))
  |  |  |  |  ------------------
  |  |  |  |  |  |  282|      1|#define MAX_SIGV4_LEN    64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DATE_FULL_HDR_LEN (DATE_HDR_KEY_LEN + TIMESTAMP_SIZE + 1)
  |  |  ------------------
  |  |  |  |   53|      1|#define TIMESTAMP_SIZE 17
  |  |  ------------------
  ------------------
  395|      1|                 "x-%.*s-date:%s", (int)plen, provider1, timestamp);
  396|       |  /* provider1 lowercase */
  397|      1|  Curl_strntolower(&date_full_hdr[2], provider1, plen);
  398|       |
  399|      1|  if(!Curl_checkheaders(data, STRCONST("Host")) &&
  ------------------
  |  | 1297|      1|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      1|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (399:6): [True: 1, False: 0]
  ------------------
  400|      1|     data->state.http_host) {
  ------------------
  |  Branch (400:6): [True: 1, False: 0]
  ------------------
  401|       |    /* Host: [host]:[port] */
  402|      1|    char *fullhost = curlx_strdup(data->state.http_host);
  ------------------
  |  | 1470|      1|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  403|       |
  404|      1|    if(fullhost)
  ------------------
  |  Branch (404:8): [True: 1, False: 0]
  ------------------
  405|      1|      head = Curl_slist_append_nodup(NULL, fullhost);
  406|      1|    if(!head) {
  ------------------
  |  Branch (406:8): [True: 0, False: 1]
  ------------------
  407|      0|      curlx_free(fullhost);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  408|      0|      goto fail;
  409|      0|    }
  410|      1|  }
  411|       |
  412|      1|  if(*content_sha256_header) {
  ------------------
  |  Branch (412:6): [True: 0, False: 1]
  ------------------
  413|      0|    tmp_head = curl_slist_append(head, content_sha256_header);
  414|      0|    if(!tmp_head)
  ------------------
  |  Branch (414:8): [True: 0, False: 0]
  ------------------
  415|      0|      goto fail;
  416|      0|    head = tmp_head;
  417|      0|  }
  418|       |
  419|       |  /* copy user headers to our header list. the logic is based on how http.c
  420|       |     handles user headers.
  421|       |
  422|       |     user headers in format 'name:' with no value are used to signal that an
  423|       |     internal header of that name should be removed. those user headers are not
  424|       |     added to this list.
  425|       |
  426|       |     user headers in format 'name;' with no value are used to signal that a
  427|       |     header of that name with no value should be sent. those user headers are
  428|       |     added to this list but in the format that they will be sent, ie the
  429|       |     semi-colon is changed to a colon for format 'name:'.
  430|       |
  431|       |     user headers with a value of whitespace only, or without a colon or
  432|       |     semi-colon, are not added to this list.
  433|       |     */
  434|      3|  for(l = data->set.headers; l; l = l->next) {
  ------------------
  |  Branch (434:30): [True: 2, False: 1]
  ------------------
  435|      2|    char *dupdata;
  436|      2|    const char *ptr;
  437|      2|    const char *sep = strchr(l->data, ':');
  438|      2|    if(!sep)
  ------------------
  |  Branch (438:8): [True: 0, False: 2]
  ------------------
  439|      0|      sep = strchr(l->data, ';');
  440|      2|    if(!sep || (*sep == ':' && !*(sep + 1)))
  ------------------
  |  Branch (440:8): [True: 0, False: 2]
  |  Branch (440:17): [True: 2, False: 0]
  |  Branch (440:32): [True: 0, False: 2]
  ------------------
  441|      0|      continue;
  442|      4|    for(ptr = sep + 1; ISBLANK(*ptr); ++ptr)
  ------------------
  |  |   43|      4|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 2, False: 2]
  |  |  |  Branch (43:38): [True: 0, False: 2]
  |  |  ------------------
  ------------------
  443|      2|      ;
  444|      2|    if(!*ptr && ptr != sep + 1) /* a value of whitespace only */
  ------------------
  |  Branch (444:8): [True: 0, False: 2]
  |  Branch (444:17): [True: 0, False: 0]
  ------------------
  445|      0|      continue;
  446|      2|    dupdata = curlx_strdup(l->data);
  ------------------
  |  | 1470|      2|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  447|      2|    if(!dupdata)
  ------------------
  |  Branch (447:8): [True: 0, False: 2]
  ------------------
  448|      0|      goto fail;
  449|      2|    dupdata[sep - l->data] = ':';
  450|      2|    tmp_head = Curl_slist_append_nodup(head, dupdata);
  451|      2|    if(!tmp_head) {
  ------------------
  |  Branch (451:8): [True: 0, False: 2]
  ------------------
  452|      0|      curlx_free(dupdata);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  453|      0|      goto fail;
  454|      0|    }
  455|      2|    head = tmp_head;
  456|      2|  }
  457|       |
  458|      1|  trim_headers(head);
  459|       |
  460|      1|  *date_header = find_date_hdr(data, date_hdr_key);
  461|      1|  if(!*date_header) {
  ------------------
  |  Branch (461:6): [True: 0, False: 1]
  ------------------
  462|      0|    tmp_head = curl_slist_append(head, date_full_hdr);
  463|      0|    if(!tmp_head)
  ------------------
  |  Branch (463:8): [True: 0, False: 0]
  ------------------
  464|      0|      goto fail;
  465|      0|    head = tmp_head;
  466|      0|    *date_header = curl_maprintf("%s: %s\r\n", date_hdr_key, timestamp);
  467|      0|    if(!*date_header)
  ------------------
  |  Branch (467:8): [True: 0, False: 0]
  ------------------
  468|      0|      goto fail;
  469|      0|  }
  470|      1|  else {
  471|      1|    const char *value;
  472|      1|    const char *endp;
  473|      1|    value = strchr(*date_header, ':');
  474|      1|    if(!value) {
  ------------------
  |  Branch (474:8): [True: 0, False: 1]
  ------------------
  475|      0|      *date_header = NULL;
  476|      0|      goto fail;
  477|      0|    }
  478|      1|    ++value;
  479|      1|    curlx_str_passblanks(&value);
  480|      1|    endp = value;
  481|     17|    while(*endp && ISALNUM(*endp))
  ------------------
  |  |   39|     16|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|     32|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 16, False: 0]
  |  |  |  |  |  Branch (42:38): [True: 14, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   41|     18|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:22): [True: 0, False: 2]
  |  |  |  |  |  Branch (41:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   40|      2|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (40:22): [True: 2, False: 0]
  |  |  |  |  |  Branch (40:38): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (481:11): [True: 16, False: 1]
  ------------------
  482|     16|      ++endp;
  483|       |    /* 16 bytes => "19700101T000000Z" */
  484|      1|    if((endp - value) == TIMESTAMP_SIZE - 1) {
  ------------------
  |  |   53|      1|#define TIMESTAMP_SIZE 17
  ------------------
  |  Branch (484:8): [True: 1, False: 0]
  ------------------
  485|      1|      memcpy(timestamp, value, TIMESTAMP_SIZE - 1);
  ------------------
  |  |   53|      1|#define TIMESTAMP_SIZE 17
  ------------------
  486|      1|      timestamp[TIMESTAMP_SIZE - 1] = 0;
  ------------------
  |  |   53|      1|#define TIMESTAMP_SIZE 17
  ------------------
  487|      1|    }
  488|      0|    else
  489|       |      /* bad timestamp length */
  490|      0|      timestamp[0] = 0;
  491|      1|    *date_header = NULL;
  492|      1|  }
  493|       |
  494|       |  /* alpha-sort by header name in a case sensitive manner */
  495|      2|  do {
  496|      2|    again = FALSE;
  ------------------
  |  | 1048|      2|#define FALSE false
  ------------------
  497|      8|    for(l = head; l; l = l->next) {
  ------------------
  |  Branch (497:19): [True: 6, False: 2]
  ------------------
  498|      6|      struct curl_slist *next = l->next;
  499|       |
  500|      6|      if(next && compare_header_names(l->data, next->data) > 0) {
  ------------------
  |  Branch (500:10): [True: 4, False: 2]
  |  Branch (500:18): [True: 1, False: 3]
  ------------------
  501|      1|        char *tmp = l->data;
  502|       |
  503|      1|        l->data = next->data;
  504|      1|        next->data = tmp;
  505|      1|        again = TRUE;
  ------------------
  |  | 1045|      1|#define TRUE true
  ------------------
  506|      1|      }
  507|      6|    }
  508|      2|  } while(again);
  ------------------
  |  Branch (508:11): [True: 1, False: 1]
  ------------------
  509|       |
  510|      1|  result = merge_duplicate_headers(head);
  511|      1|  if(result)
  ------------------
  |  Branch (511:6): [True: 0, False: 1]
  ------------------
  512|      0|    goto fail;
  513|       |
  514|      4|  for(l = head; l; l = l->next) {
  ------------------
  |  Branch (514:17): [True: 3, False: 1]
  ------------------
  515|      3|    char *tmp;
  516|       |
  517|      3|    if(curlx_dyn_add(canonical_headers, l->data))
  ------------------
  |  Branch (517:8): [True: 0, False: 3]
  ------------------
  518|      0|      goto fail;
  519|      3|    if(curlx_dyn_add(canonical_headers, "\n"))
  ------------------
  |  Branch (519:8): [True: 0, False: 3]
  ------------------
  520|      0|      goto fail;
  521|       |
  522|      3|    tmp = strchr(l->data, ':');
  523|      3|    if(tmp)
  ------------------
  |  Branch (523:8): [True: 3, False: 0]
  ------------------
  524|      3|      *tmp = 0;
  525|       |
  526|      3|    if(l != head) {
  ------------------
  |  Branch (526:8): [True: 2, False: 1]
  ------------------
  527|      2|      if(curlx_dyn_add(signed_headers, ";"))
  ------------------
  |  Branch (527:10): [True: 0, False: 2]
  ------------------
  528|      0|        goto fail;
  529|      2|    }
  530|      3|    if(curlx_dyn_add(signed_headers, l->data))
  ------------------
  |  Branch (530:8): [True: 0, False: 3]
  ------------------
  531|      0|      goto fail;
  532|      3|  }
  533|       |
  534|      1|  result = CURLE_OK;
  535|      1|fail:
  536|      1|  curl_slist_free_all(head);
  537|       |
  538|      1|  return result;
  539|      1|}
http_aws_sigv4.c:trim_headers:
   82|      1|{
   83|      1|  struct curl_slist *l;
   84|      4|  for(l = head; l; l = l->next) {
  ------------------
  |  Branch (84:17): [True: 3, False: 1]
  ------------------
   85|      3|    const char *value; /* to read from */
   86|      3|    char *store;
   87|      3|    size_t colon = strcspn(l->data, ":");
   88|      3|    Curl_strntolower(l->data, l->data, colon);
   89|       |
   90|      3|    value = &l->data[colon];
   91|      3|    if(!*value)
  ------------------
  |  Branch (91:8): [True: 0, False: 3]
  ------------------
   92|      0|      continue;
   93|      3|    ++value;
   94|      3|    store = (char *)CURL_UNCONST(value);
  ------------------
  |  |  856|      3|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   95|       |
   96|       |    /* skip leading whitespace */
   97|      3|    curlx_str_passblanks(&value);
   98|       |
   99|     43|    while(*value) {
  ------------------
  |  Branch (99:11): [True: 40, False: 3]
  ------------------
  100|     40|      int space = 0;
  101|     40|      while(ISBLANK(*value)) {
  ------------------
  |  |   43|     40|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 0, False: 40]
  |  |  |  Branch (43:38): [True: 0, False: 40]
  |  |  ------------------
  ------------------
  102|      0|        value++;
  103|      0|        space++;
  104|      0|      }
  105|     40|      if(space) {
  ------------------
  |  Branch (105:10): [True: 0, False: 40]
  ------------------
  106|       |        /* replace any number of consecutive whitespace with a single space,
  107|       |           unless at the end of the string, then nothing */
  108|      0|        if(*value)
  ------------------
  |  Branch (108:12): [True: 0, False: 0]
  ------------------
  109|      0|          *store++ = ' ';
  110|      0|      }
  111|     40|      else
  112|     40|        *store++ = *value++;
  113|     40|    }
  114|      3|    *store = 0; /* null-terminate */
  115|      3|  }
  116|      1|}
http_aws_sigv4.c:find_date_hdr:
   72|      1|{
   73|      1|  char *tmp = Curl_checkheaders(data, sig_hdr, strlen(sig_hdr));
   74|       |
   75|      1|  if(tmp)
  ------------------
  |  Branch (75:6): [True: 1, False: 0]
  ------------------
   76|      1|    return tmp;
   77|      0|  return Curl_checkheaders(data, STRCONST("Date"));
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
   78|      1|}
http_aws_sigv4.c:compare_header_names:
  291|      6|{
  292|      6|  const char *colon_a;
  293|      6|  const char *colon_b;
  294|      6|  size_t len_a;
  295|      6|  size_t len_b;
  296|      6|  size_t min_len;
  297|      6|  int cmp;
  298|       |
  299|      6|  colon_a = strchr(a, ':');
  300|      6|  colon_b = strchr(b, ':');
  301|       |
  302|      6|  DEBUGASSERT(colon_a);
  ------------------
  |  | 1075|      6|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (302:3): [True: 0, False: 6]
  |  Branch (302:3): [True: 6, False: 0]
  ------------------
  303|      6|  DEBUGASSERT(colon_b);
  ------------------
  |  | 1075|      6|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (303:3): [True: 0, False: 6]
  |  Branch (303:3): [True: 6, False: 0]
  ------------------
  304|       |
  305|      6|  len_a = colon_a ? (size_t)(colon_a - a) : strlen(a);
  ------------------
  |  Branch (305:11): [True: 6, False: 0]
  ------------------
  306|      6|  len_b = colon_b ? (size_t)(colon_b - b) : strlen(b);
  ------------------
  |  Branch (306:11): [True: 6, False: 0]
  ------------------
  307|       |
  308|      6|  min_len = (len_a < len_b) ? len_a : len_b;
  ------------------
  |  Branch (308:13): [True: 4, False: 2]
  ------------------
  309|       |
  310|      6|  cmp = strncmp(a, b, min_len);
  311|       |
  312|       |  /* return the shorter of the two if one is shorter */
  313|      6|  if(!cmp)
  ------------------
  |  Branch (313:6): [True: 0, False: 6]
  ------------------
  314|      0|    return (int)(len_a - len_b);
  315|       |
  316|      6|  return cmp;
  317|      6|}
http_aws_sigv4.c:merge_duplicate_headers:
  323|      1|{
  324|      1|  struct curl_slist *curr = head;
  325|      1|  CURLcode result = CURLE_OK;
  326|       |
  327|      3|  while(curr) {
  ------------------
  |  Branch (327:9): [True: 3, False: 0]
  ------------------
  328|      3|    struct curl_slist *next = curr->next;
  329|      3|    if(!next)
  ------------------
  |  Branch (329:8): [True: 1, False: 2]
  ------------------
  330|      1|      break;
  331|       |
  332|      2|    if(compare_header_names(curr->data, next->data) == 0) {
  ------------------
  |  Branch (332:8): [True: 0, False: 2]
  ------------------
  333|      0|      struct dynbuf buf;
  334|      0|      const char *colon_next;
  335|      0|      const char *val_next;
  336|       |
  337|      0|      curlx_dyn_init(&buf, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  274|      0|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  338|       |
  339|      0|      result = curlx_dyn_add(&buf, curr->data);
  340|      0|      if(result)
  ------------------
  |  Branch (340:10): [True: 0, False: 0]
  ------------------
  341|      0|        return result;
  342|       |
  343|      0|      colon_next = strchr(next->data, ':');
  344|      0|      DEBUGASSERT(colon_next);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (344:7): [True: 0, False: 0]
  |  Branch (344:7): [True: 0, False: 0]
  ------------------
  345|      0|      val_next = colon_next + 1;
  346|       |
  347|      0|      result = curlx_dyn_addn(&buf, ",", 1);
  348|      0|      if(result)
  ------------------
  |  Branch (348:10): [True: 0, False: 0]
  ------------------
  349|      0|        return result;
  350|       |
  351|      0|      result = curlx_dyn_add(&buf, val_next);
  352|      0|      if(result)
  ------------------
  |  Branch (352:10): [True: 0, False: 0]
  ------------------
  353|      0|        return result;
  354|       |
  355|      0|      curlx_free(curr->data);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  356|      0|      curr->data = curlx_dyn_ptr(&buf);
  357|       |
  358|      0|      curr->next = next->next;
  359|      0|      curlx_free(next->data);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  360|      0|      curlx_free(next);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  361|      0|    }
  362|      2|    else {
  363|      2|      curr = curr->next;
  364|      2|    }
  365|      2|  }
  366|       |
  367|      1|  return CURLE_OK;
  368|      1|}
http_aws_sigv4.c:should_urlencode:
  266|      1|{
  267|       |  /*
  268|       |   * These services require unmodified (not additionally URL-encoded) URL
  269|       |   * paths.
  270|       |   * should_urlencode == true is equivalent to should_urlencode_uri_path
  271|       |   * from the AWS SDK. Urls are already normalized by the curl URL parser
  272|       |   */
  273|      1|  if(curlx_str_cmp(service_name, "s3") ||
  ------------------
  |  Branch (273:6): [True: 1, False: 0]
  ------------------
  274|      0|     curlx_str_cmp(service_name, "s3-express") ||
  ------------------
  |  Branch (274:6): [True: 0, False: 0]
  ------------------
  275|      1|     curlx_str_cmp(service_name, "s3-outposts")) {
  ------------------
  |  Branch (275:6): [True: 0, False: 0]
  ------------------
  276|      1|    return FALSE;
  ------------------
  |  | 1048|      1|#define FALSE false
  ------------------
  277|      1|  }
  278|      0|  return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  279|      1|}
http_aws_sigv4.c:make_string_to_sign:
 1004|      1|{
 1005|      1|  char *request_type;
 1006|      1|  char *credential_scope;
 1007|      1|  char *str_to_sign;
 1008|      1|  unsigned char sha_hash[CURL_SHA256_DIGEST_LENGTH];
 1009|      1|  char sha_hex[SHA256_HEX_LENGTH];
 1010|       |
 1011|      1|  request_type = curl_maprintf("%.*s4_request",
 1012|      1|                               (int)curlx_strlen(provider0),
  ------------------
  |  |   50|      1|#define curlx_strlen(x) ((x)->len)
  ------------------
 1013|      1|                               curlx_str(provider0));
  ------------------
  |  |   49|      1|#define curlx_str(x)    ((x)->str)
  ------------------
 1014|      1|  if(!request_type)
  ------------------
  |  Branch (1014:6): [True: 0, False: 1]
  ------------------
 1015|      0|    return CURLE_OUT_OF_MEMORY;
 1016|       |
 1017|       |  /* provider0 is lowercased *after* curl_maprintf() so that the buffer
 1018|       |     can be written to */
 1019|      1|  Curl_strntolower(request_type, request_type, curlx_strlen(provider0));
  ------------------
  |  |   50|      1|#define curlx_strlen(x) ((x)->len)
  ------------------
 1020|       |
 1021|      1|  credential_scope = curl_maprintf("%s/%.*s/%.*s/%s", date,
 1022|      1|                                   (int)curlx_strlen(region),
  ------------------
  |  |   50|      1|#define curlx_strlen(x) ((x)->len)
  ------------------
 1023|      1|                                   curlx_str(region),
  ------------------
  |  |   49|      1|#define curlx_str(x)    ((x)->str)
  ------------------
 1024|      1|                                   (int)curlx_strlen(service),
  ------------------
  |  |   50|      1|#define curlx_strlen(x) ((x)->len)
  ------------------
 1025|      1|                                   curlx_str(service),
  ------------------
  |  |   49|      1|#define curlx_str(x)    ((x)->str)
  ------------------
 1026|      1|                                   request_type);
 1027|      1|  if(!credential_scope) {
  ------------------
  |  Branch (1027:6): [True: 0, False: 1]
  ------------------
 1028|      0|    curlx_free(request_type);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1029|      0|    return CURLE_OUT_OF_MEMORY;
 1030|      0|  }
 1031|       |
 1032|      1|  if(Curl_sha256it(sha_hash, (const unsigned char *)canonical_request,
  ------------------
  |  Branch (1032:6): [True: 0, False: 1]
  ------------------
 1033|      1|                   strlen(canonical_request))) {
 1034|      0|    curlx_free(request_type);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1035|      0|    curlx_free(credential_scope);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1036|      0|    return CURLE_OUT_OF_MEMORY;
 1037|      0|  }
 1038|       |
 1039|      1|  sha256_to_hex(sha_hex, sha_hash);
 1040|       |
 1041|       |  /*
 1042|       |   * Google allows using RSA key instead of HMAC, so this code might change
 1043|       |   * in the future. For now we only support HMAC.
 1044|       |   */
 1045|      1|  str_to_sign = curl_maprintf("%.*s4-HMAC-SHA256\n" /* Algorithm */
 1046|      1|                              "%s\n" /* RequestDateTime */
 1047|      1|                              "%s\n" /* CredentialScope */
 1048|      1|                              "%s",  /* HashedCanonicalRequest in hex */
 1049|      1|                              (int)curlx_strlen(provider0),
  ------------------
  |  |   50|      1|#define curlx_strlen(x) ((x)->len)
  ------------------
 1050|      1|                              curlx_str(provider0),
  ------------------
  |  |   49|      1|#define curlx_str(x)    ((x)->str)
  ------------------
 1051|      1|                              timestamp,
 1052|      1|                              credential_scope,
 1053|      1|                              sha_hex);
 1054|      1|  if(!str_to_sign) {
  ------------------
  |  Branch (1054:6): [True: 0, False: 1]
  ------------------
 1055|      0|    curlx_free(request_type);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1056|      0|    curlx_free(credential_scope);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1057|      0|    return CURLE_OUT_OF_MEMORY;
 1058|      0|  }
 1059|       |
 1060|       |  /* make provider0 part done uppercase */
 1061|      1|  Curl_strntoupper(str_to_sign, curlx_str(provider0),
  ------------------
  |  |   49|      1|#define curlx_str(x)    ((x)->str)
  ------------------
 1062|      1|                   curlx_strlen(provider0));
  ------------------
  |  |   50|      1|#define curlx_strlen(x) ((x)->len)
  ------------------
 1063|       |
 1064|      1|  infof(data, "aws_sigv4: String to sign (enclosed in []) - [%s]",
  ------------------
  |  |  143|      1|  do {                               \
  |  |  144|      1|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      1|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 1, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  323|      1|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      1|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
 1065|      1|        str_to_sign);
 1066|       |
 1067|      1|  *request_type_out = request_type;
 1068|      1|  *credential_scope_out = credential_scope;
 1069|      1|  *str_to_sign_out = str_to_sign;
 1070|      1|  return CURLE_OK;
 1071|      1|}
http_aws_sigv4.c:sign_and_set_auth_headers:
 1084|      1|{
 1085|      1|  CURLcode result = CURLE_OUT_OF_MEMORY;
 1086|      1|  const char *passwd = Curl_creds_passwd(data->state.creds);
  ------------------
  |  |   82|      1|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (82:43): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 1087|      1|  char *secret = NULL;
 1088|      1|  unsigned char sign0[CURL_SHA256_DIGEST_LENGTH] = { 0 };
 1089|      1|  unsigned char sign1[CURL_SHA256_DIGEST_LENGTH] = { 0 };
 1090|      1|  char sha_hex[SHA256_HEX_LENGTH];
 1091|      1|  char *auth_headers = NULL;
 1092|      1|  char *user = curl_escape(Curl_creds_user(data->state.creds), 0);
  ------------------
  |  |   81|      1|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (81:43): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 1093|      1|  if(!user)
  ------------------
  |  Branch (1093:6): [True: 0, False: 1]
  ------------------
 1094|      0|    return CURLE_OUT_OF_MEMORY;
 1095|       |
 1096|      1|  secret = curl_maprintf("%.*s4%s", (int)curlx_strlen(provider0),
  ------------------
  |  |   50|      1|#define curlx_strlen(x) ((x)->len)
  ------------------
 1097|      1|                         curlx_str(provider0), passwd);
  ------------------
  |  |   49|      1|#define curlx_str(x)    ((x)->str)
  ------------------
 1098|      1|  if(!secret)
  ------------------
  |  Branch (1098:6): [True: 0, False: 1]
  ------------------
 1099|      0|    goto fail;
 1100|       |  /* make provider0 part done uppercase */
 1101|      1|  Curl_strntoupper(secret, curlx_str(provider0), curlx_strlen(provider0));
  ------------------
  |  |   49|      1|#define curlx_str(x)    ((x)->str)
  ------------------
                Curl_strntoupper(secret, curlx_str(provider0), curlx_strlen(provider0));
  ------------------
  |  |   50|      1|#define curlx_strlen(x) ((x)->len)
  ------------------
 1102|       |
 1103|      1|  HMAC_SHA256(secret, strlen(secret), date, strlen(date), sign0);
  ------------------
  |  |   42|      1|  do {                                               \
  |  |   43|      1|    result = Curl_hmacit(&Curl_HMAC_SHA256,          \
  |  |   44|      1|                         (const unsigned char *)(k), \
  |  |   45|      1|                         kl,                         \
  |  |   46|      1|                         (const unsigned char *)(d), \
  |  |   47|      1|                         dl, o);                     \
  |  |   48|      1|    if(result) {                                     \
  |  |  ------------------
  |  |  |  Branch (48:8): [True: 0, False: 1]
  |  |  ------------------
  |  |   49|      0|      goto fail;                                     \
  |  |   50|      0|    }                                                \
  |  |   51|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (51:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
 1104|      1|  HMAC_SHA256(sign0, sizeof(sign0),
  ------------------
  |  |   42|      1|  do {                                               \
  |  |   43|      1|    result = Curl_hmacit(&Curl_HMAC_SHA256,          \
  |  |   44|      1|                         (const unsigned char *)(k), \
  |  |   45|      1|                         kl,                         \
  |  |   46|      1|                         (const unsigned char *)(d), \
  |  |   47|      1|                         dl, o);                     \
  |  |   48|      1|    if(result) {                                     \
  |  |  ------------------
  |  |  |  Branch (48:8): [True: 0, False: 1]
  |  |  ------------------
  |  |   49|      0|      goto fail;                                     \
  |  |   50|      0|    }                                                \
  |  |   51|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (51:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
 1105|      1|              curlx_str(region), curlx_strlen(region), sign1);
 1106|      1|  HMAC_SHA256(sign1, sizeof(sign1),
  ------------------
  |  |   42|      1|  do {                                               \
  |  |   43|      1|    result = Curl_hmacit(&Curl_HMAC_SHA256,          \
  |  |   44|      1|                         (const unsigned char *)(k), \
  |  |   45|      1|                         kl,                         \
  |  |   46|      1|                         (const unsigned char *)(d), \
  |  |   47|      1|                         dl, o);                     \
  |  |   48|      1|    if(result) {                                     \
  |  |  ------------------
  |  |  |  Branch (48:8): [True: 0, False: 1]
  |  |  ------------------
  |  |   49|      0|      goto fail;                                     \
  |  |   50|      0|    }                                                \
  |  |   51|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (51:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
 1107|      1|              curlx_str(service), curlx_strlen(service), sign0);
 1108|      1|  HMAC_SHA256(sign0, sizeof(sign0),
  ------------------
  |  |   42|      1|  do {                                               \
  |  |   43|      1|    result = Curl_hmacit(&Curl_HMAC_SHA256,          \
  |  |   44|      1|                         (const unsigned char *)(k), \
  |  |   45|      1|                         kl,                         \
  |  |   46|      1|                         (const unsigned char *)(d), \
  |  |   47|      1|                         dl, o);                     \
  |  |   48|      1|    if(result) {                                     \
  |  |  ------------------
  |  |  |  Branch (48:8): [True: 0, False: 1]
  |  |  ------------------
  |  |   49|      0|      goto fail;                                     \
  |  |   50|      0|    }                                                \
  |  |   51|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (51:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
 1109|      1|              request_type, strlen(request_type), sign1);
 1110|      1|  HMAC_SHA256(sign1, sizeof(sign1),
  ------------------
  |  |   42|      1|  do {                                               \
  |  |   43|      1|    result = Curl_hmacit(&Curl_HMAC_SHA256,          \
  |  |   44|      1|                         (const unsigned char *)(k), \
  |  |   45|      1|                         kl,                         \
  |  |   46|      1|                         (const unsigned char *)(d), \
  |  |   47|      1|                         dl, o);                     \
  |  |   48|      1|    if(result) {                                     \
  |  |  ------------------
  |  |  |  Branch (48:8): [True: 0, False: 1]
  |  |  ------------------
  |  |   49|      0|      goto fail;                                     \
  |  |   50|      0|    }                                                \
  |  |   51|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (51:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
 1111|      1|              str_to_sign, strlen(str_to_sign), sign0);
 1112|       |
 1113|      1|  sha256_to_hex(sha_hex, sign0);
 1114|       |
 1115|      1|  infof(data, "aws_sigv4: Signature - %s", sha_hex);
  ------------------
  |  |  143|      1|  do {                               \
  |  |  144|      1|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      1|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 1, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  323|      1|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      1|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
 1116|       |
 1117|      1|  auth_headers = curl_maprintf("Authorization: %.*s4-HMAC-SHA256 "
 1118|      1|                               "Credential=%s/%s, "
 1119|      1|                               "SignedHeaders=%s, "
 1120|      1|                               "Signature=%s\r\n"
 1121|      1|                               "%s"
 1122|      1|                               "%s%s",
 1123|      1|                               (int)curlx_strlen(provider0),
  ------------------
  |  |   50|      1|#define curlx_strlen(x) ((x)->len)
  ------------------
 1124|      1|                               curlx_str(provider0),
  ------------------
  |  |   49|      1|#define curlx_str(x)    ((x)->str)
  ------------------
 1125|      1|                               user,
 1126|      1|                               credential_scope,
 1127|      1|                               curlx_dyn_ptr(signed_headers),
 1128|      1|                               sha_hex,
 1129|       |                               /*
 1130|       |                                * date_header is added here, only if it was not
 1131|       |                                * user-specified (using CURLOPT_HTTPHEADER).
 1132|       |                                * date_header includes \r\n
 1133|       |                                */
 1134|      1|                               date_header ? date_header : "",
  ------------------
  |  Branch (1134:32): [True: 0, False: 1]
  ------------------
 1135|      1|                               content_sha256_hdr,
 1136|      1|                               content_sha256_hdr[0] ? "\r\n": "");
  ------------------
  |  Branch (1136:32): [True: 0, False: 1]
  ------------------
 1137|      1|  if(!auth_headers)
  ------------------
  |  Branch (1137:6): [True: 0, False: 1]
  ------------------
 1138|      0|    goto fail;
 1139|       |
 1140|       |  /* provider 0 uppercase */
 1141|      1|  Curl_strntoupper(&auth_headers[CURL_CSTRLEN("Authorization: ")],
  ------------------
  |  | 1292|      1|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  ------------------
 1142|      1|                   curlx_str(provider0), curlx_strlen(provider0));
  ------------------
  |  |   49|      1|#define curlx_str(x)    ((x)->str)
  ------------------
                                 curlx_str(provider0), curlx_strlen(provider0));
  ------------------
  |  |   50|      1|#define curlx_strlen(x) ((x)->len)
  ------------------
 1143|       |
 1144|      1|  curlx_free(data->req.hd_auth);
  ------------------
  |  | 1476|      1|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1145|      1|  data->req.hd_auth = auth_headers;
 1146|      1|  data->state.authhost.done = TRUE;
  ------------------
  |  | 1045|      1|#define TRUE true
  ------------------
 1147|      1|  result = CURLE_OK;
 1148|       |
 1149|      1|fail:
 1150|      1|  curlx_free(user);
  ------------------
  |  | 1476|      1|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1151|      1|  curlx_free(secret);
  ------------------
  |  | 1476|      1|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1152|      1|  return result;
 1153|      1|}

Curl_httpchunk_init:
   75|      4|{
   76|      4|  (void)data;
   77|      4|  ch->hexindex = 0;      /* start at 0 */
   78|      4|  ch->state = CHUNK_HEX; /* we get hex first! */
   79|      4|  ch->last_code = CHUNKE_OK;
   80|      4|  curlx_dyn_init(&ch->trailer, DYN_H1_TRAILER);
  ------------------
  |  |   75|      4|#define DYN_H1_TRAILER      4096
  ------------------
   81|      4|  ch->ignore_body = ignore_body;
   82|      4|  ch->in_connect = in_connect;
   83|      4|}
Curl_httpchunk_free:
   97|      4|{
   98|      4|  (void)data;
   99|      4|  curlx_dyn_free(&ch->trailer);
  100|      4|}
Curl_httpchunk_add_reader:
  671|    102|{
  672|    102|  struct Curl_creader *reader = NULL;
  673|    102|  CURLcode result;
  674|       |
  675|    102|  result = Curl_creader_create(&reader, data, &Curl_httpchunk_encoder,
  676|    102|                               CURL_CR_TRANSFER_ENCODE);
  677|    102|  if(!result)
  ------------------
  |  Branch (677:6): [True: 102, False: 0]
  ------------------
  678|    102|    result = Curl_creader_add(data, reader);
  679|       |
  680|    102|  if(result && reader)
  ------------------
  |  Branch (680:6): [True: 0, False: 102]
  |  Branch (680:16): [True: 0, False: 0]
  ------------------
  681|      0|    Curl_creader_free(data, reader);
  682|    102|  return result;
  683|    102|}
http_chunks.c:httpchunk_readwrite:
  113|      2|{
  114|      2|  CURLcode result = CURLE_OK;
  115|      2|  size_t piece;
  116|       |
  117|      2|  *pconsumed = 0; /* nothing's written yet */
  118|       |  /* first check terminal states that will not progress anywhere */
  119|      2|  if(ch->state == CHUNK_DONE)
  ------------------
  |  Branch (119:6): [True: 0, False: 2]
  ------------------
  120|      0|    return CURLE_OK;
  121|      2|  if(ch->state == CHUNK_FAILED)
  ------------------
  |  Branch (121:6): [True: 0, False: 2]
  ------------------
  122|      0|    return CURLE_RECV_ERROR;
  123|       |
  124|       |  /* the original data is written to the client, but we go on with the
  125|       |     chunk read process, to properly calculate the content length */
  126|      2|  if(data->set.http_te_skip && !ch->ignore_body) {
  ------------------
  |  Branch (126:6): [True: 0, False: 2]
  |  Branch (126:32): [True: 0, False: 0]
  ------------------
  127|      0|    if(cw_next)
  ------------------
  |  Branch (127:8): [True: 0, False: 0]
  ------------------
  128|      0|      result = Curl_cwriter_write(data, cw_next, CLIENTWRITE_BODY, buf, blen);
  ------------------
  |  |  188|      0|  ((w) ? (w)->cwt->do_write((d), (w), (t), (b), (n)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (188:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  129|      0|    else
  130|      0|      result = Curl_client_write(data, CLIENTWRITE_BODY, buf, blen);
  ------------------
  |  |   43|      0|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  131|      0|    if(result) {
  ------------------
  |  Branch (131:8): [True: 0, False: 0]
  ------------------
  132|      0|      ch->state = CHUNK_FAILED;
  133|      0|      ch->last_code = CHUNKE_PASSTHRU_ERROR;
  134|      0|      return result;
  135|      0|    }
  136|      0|  }
  137|       |
  138|      7|  while(blen) {
  ------------------
  |  Branch (138:9): [True: 5, False: 2]
  ------------------
  139|      5|    switch(ch->state) {
  ------------------
  |  Branch (139:12): [True: 5, False: 0]
  ------------------
  140|      2|    case CHUNK_HEX:
  ------------------
  |  Branch (140:5): [True: 2, False: 3]
  ------------------
  141|      2|      if(ISXDIGIT(*buf)) {
  ------------------
  |  |   37|      2|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   42|      4|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 1, False: 1]
  |  |  |  |  |  Branch (42:38): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|      4|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 1, False: 1]
  |  |  |  |  |  Branch (27:43): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|      1|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 0, False: 1]
  |  |  |  |  |  Branch (28:43): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  142|      1|        if(ch->hexindex >= CHUNK_MAXNUM_LEN) {
  ------------------
  |  |   39|      1|#define CHUNK_MAXNUM_LEN (SIZEOF_CURL_OFF_T * 2)
  |  |  ------------------
  |  |  |  |  633|      1|#define SIZEOF_CURL_OFF_T 8
  |  |  ------------------
  ------------------
  |  Branch (142:12): [True: 0, False: 1]
  ------------------
  143|      0|          failf(data, "chunk hex-length longer than %d", CHUNK_MAXNUM_LEN);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
                        failf(data, "chunk hex-length longer than %d", CHUNK_MAXNUM_LEN);
  ------------------
  |  |   39|      0|#define CHUNK_MAXNUM_LEN (SIZEOF_CURL_OFF_T * 2)
  |  |  ------------------
  |  |  |  |  633|      0|#define SIZEOF_CURL_OFF_T 8
  |  |  ------------------
  ------------------
  144|      0|          ch->state = CHUNK_FAILED;
  145|      0|          ch->last_code = CHUNKE_TOO_LONG_HEX; /* longer than we support */
  146|      0|          return CURLE_RECV_ERROR;
  147|      0|        }
  148|      1|        ch->hexbuffer[ch->hexindex++] = *buf;
  149|      1|        buf++;
  150|      1|        blen--;
  151|      1|        (*pconsumed)++;
  152|      1|      }
  153|      1|      else {
  154|      1|        const char *p;
  155|      1|        if(ch->hexindex == 0) {
  ------------------
  |  Branch (155:12): [True: 0, False: 1]
  ------------------
  156|       |          /* This is illegal data, we received junk where we expected
  157|       |             a hexadecimal digit. */
  158|      0|          failf(data, "chunk hex-length char not a hex digit: 0x%x",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  159|      0|                (unsigned int)*buf);
  160|      0|          ch->state = CHUNK_FAILED;
  161|      0|          ch->last_code = CHUNKE_ILLEGAL_HEX;
  162|      0|          return CURLE_RECV_ERROR;
  163|      0|        }
  164|       |        /* blen and buf are unmodified */
  165|      1|        ch->hexbuffer[ch->hexindex] = 0;
  166|      1|        p = &ch->hexbuffer[0];
  167|      1|        if(curlx_str_hex(&p, &ch->datasize, CURL_OFF_T_MAX)) {
  ------------------
  |  |  588|      1|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (167:12): [True: 0, False: 1]
  ------------------
  168|      0|          failf(data, "invalid chunk size: '%s'", ch->hexbuffer);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  169|      0|          ch->state = CHUNK_FAILED;
  170|      0|          ch->last_code = CHUNKE_ILLEGAL_HEX;
  171|      0|          return CURLE_RECV_ERROR;
  172|      0|        }
  173|      1|        ch->state = CHUNK_LF; /* now wait for the CRLF */
  174|      1|      }
  175|      2|      break;
  176|       |
  177|      2|    case CHUNK_LF:
  ------------------
  |  Branch (177:5): [True: 2, False: 3]
  ------------------
  178|       |      /* waiting for the LF after a chunk size */
  179|      2|      if(*buf == 0x0a) {
  ------------------
  |  Branch (179:10): [True: 1, False: 1]
  ------------------
  180|       |        /* we are now expecting data to come, unless size was zero! */
  181|      1|        if(ch->datasize == 0) {
  ------------------
  |  Branch (181:12): [True: 0, False: 1]
  ------------------
  182|      0|          ch->state = CHUNK_TRAILER; /* now check for trailers */
  183|      0|        }
  184|      1|        else {
  185|      1|          ch->state = CHUNK_DATA;
  186|      1|          CURL_TRC_WRITE(data, "http_chunked, chunk start of %"
  ------------------
  |  |  158|      1|  do {                                                     \
  |  |  159|      1|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|      1|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      1|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      1|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  187|      1|                         FMT_OFF_T " bytes", ch->datasize);
  188|      1|        }
  189|      1|      }
  190|       |
  191|      2|      buf++;
  192|      2|      blen--;
  193|      2|      (*pconsumed)++;
  194|      2|      break;
  195|       |
  196|      1|    case CHUNK_DATA:
  ------------------
  |  Branch (196:5): [True: 1, False: 4]
  ------------------
  197|       |      /* We expect 'datasize' of data. We have 'blen' right now, it can be
  198|       |         more or less than 'datasize'. Get the smallest piece. */
  199|      1|      piece = blen;
  200|      1|      if(ch->datasize < (curl_off_t)blen)
  ------------------
  |  Branch (200:10): [True: 0, False: 1]
  ------------------
  201|      0|        piece = curlx_sotouz(ch->datasize);
  202|       |
  203|       |      /* Write the data portion available */
  204|      1|      if(!data->set.http_te_skip && !ch->ignore_body) {
  ------------------
  |  Branch (204:10): [True: 1, False: 0]
  |  Branch (204:37): [True: 1, False: 0]
  ------------------
  205|      1|        if(cw_next)
  ------------------
  |  Branch (205:12): [True: 1, False: 0]
  ------------------
  206|      1|          result = Curl_cwriter_write(data, cw_next, CLIENTWRITE_BODY,
  ------------------
  |  |  188|      1|  ((w) ? (w)->cwt->do_write((d), (w), (t), (b), (n)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (188:4): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  207|      1|                                      buf, piece);
  208|      0|        else
  209|      0|          result = Curl_client_write(data, CLIENTWRITE_BODY, buf, piece);
  ------------------
  |  |   43|      0|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  210|      1|        if(result) {
  ------------------
  |  Branch (210:12): [True: 0, False: 1]
  ------------------
  211|      0|          ch->state = CHUNK_FAILED;
  212|      0|          ch->last_code = CHUNKE_PASSTHRU_ERROR;
  213|      0|          return result;
  214|      0|        }
  215|      1|      }
  216|       |
  217|      1|      *pconsumed += piece;
  218|      1|      ch->datasize -= piece; /* decrease amount left to expect */
  219|      1|      buf += piece;    /* move read pointer forward */
  220|      1|      blen -= piece;   /* decrease space left in this round */
  221|      1|      CURL_TRC_WRITE(data, "http_chunked, write %zu body bytes, %"
  ------------------
  |  |  158|      1|  do {                                                     \
  |  |  159|      1|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|      1|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      1|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      1|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  222|      1|                     FMT_OFF_T " bytes in chunk remain",
  223|      1|                     piece, ch->datasize);
  224|       |
  225|      1|      if(ch->datasize == 0)
  ------------------
  |  Branch (225:10): [True: 0, False: 1]
  ------------------
  226|       |        /* end of data this round, we now expect a trailing CRLF */
  227|      0|        ch->state = CHUNK_POSTLF;
  228|      1|      break;
  229|       |
  230|      0|    case CHUNK_POSTLF:
  ------------------
  |  Branch (230:5): [True: 0, False: 5]
  ------------------
  231|      0|      if(*buf == 0x0a) {
  ------------------
  |  Branch (231:10): [True: 0, False: 0]
  ------------------
  232|       |        /* The last one before we go back to hex state and start all over. */
  233|      0|        Curl_httpchunk_reset(data, ch, (bool)ch->ignore_body);
  234|      0|      }
  235|      0|      else if(*buf != 0x0d) {
  ------------------
  |  Branch (235:15): [True: 0, False: 0]
  ------------------
  236|      0|        ch->state = CHUNK_FAILED;
  237|      0|        ch->last_code = CHUNKE_BAD_CHUNK;
  238|      0|        return CURLE_RECV_ERROR;
  239|      0|      }
  240|      0|      buf++;
  241|      0|      blen--;
  242|      0|      (*pconsumed)++;
  243|      0|      break;
  244|       |
  245|      0|    case CHUNK_TRAILER:
  ------------------
  |  Branch (245:5): [True: 0, False: 5]
  ------------------
  246|      0|      if((*buf == 0x0d) || (*buf == 0x0a)) {
  ------------------
  |  Branch (246:10): [True: 0, False: 0]
  |  Branch (246:28): [True: 0, False: 0]
  ------------------
  247|      0|        const char *tr = curlx_dyn_ptr(&ch->trailer);
  248|       |        /* this is the end of a trailer, but if the trailer was zero bytes
  249|       |           there was no trailer and we move on */
  250|       |
  251|      0|        if(tr) {
  ------------------
  |  Branch (251:12): [True: 0, False: 0]
  ------------------
  252|      0|          size_t trlen;
  253|      0|          result = curlx_dyn_addn(&ch->trailer, STRCONST("\x0d\x0a"));
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  254|      0|          if(result) {
  ------------------
  |  Branch (254:14): [True: 0, False: 0]
  ------------------
  255|      0|            ch->state = CHUNK_FAILED;
  256|      0|            ch->last_code = CHUNKE_OUT_OF_MEMORY;
  257|      0|            return result;
  258|      0|          }
  259|      0|          tr = curlx_dyn_ptr(&ch->trailer);
  260|      0|          trlen = curlx_dyn_len(&ch->trailer);
  261|       |
  262|       |          /* a trailer is delivered to the client as a header, so it must pass
  263|       |             the same checks as a regular response header */
  264|      0|          result = Curl_verify_header(data, tr, trlen);
  265|      0|          if(result) {
  ------------------
  |  Branch (265:14): [True: 0, False: 0]
  ------------------
  266|      0|            ch->state = CHUNK_FAILED;
  267|      0|            ch->last_code = CHUNKE_BAD_CHUNK;
  268|      0|            return result;
  269|      0|          }
  270|       |
  271|      0|          if(!data->set.http_te_skip) {
  ------------------
  |  Branch (271:14): [True: 0, False: 0]
  ------------------
  272|      0|            int hd_type = CLIENTWRITE_HEADER | CLIENTWRITE_TRAILER;
  ------------------
  |  |   45|      0|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
                          int hd_type = CLIENTWRITE_HEADER | CLIENTWRITE_TRAILER;
  ------------------
  |  |   49|      0|#define CLIENTWRITE_TRAILER (1 << 6) /* a trailer HEADER */
  ------------------
  273|      0|            if(ch->in_connect)
  ------------------
  |  Branch (273:16): [True: 0, False: 0]
  ------------------
  274|      0|              hd_type |= CLIENTWRITE_CONNECT;
  ------------------
  |  |   47|      0|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  275|      0|            if(cw_next)
  ------------------
  |  Branch (275:16): [True: 0, False: 0]
  ------------------
  276|      0|              result = Curl_cwriter_write(data, cw_next, hd_type, tr, trlen);
  ------------------
  |  |  188|      0|  ((w) ? (w)->cwt->do_write((d), (w), (t), (b), (n)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (188:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  277|      0|            else
  278|      0|              result = Curl_client_write(data, hd_type, tr, trlen);
  279|      0|            CURL_TRC_WRITE(data, "wrote trailer '%s'", tr);
  ------------------
  |  |  158|      0|  do {                                                     \
  |  |  159|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      0|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  280|      0|            if(result) {
  ------------------
  |  Branch (280:16): [True: 0, False: 0]
  ------------------
  281|      0|              ch->state = CHUNK_FAILED;
  282|      0|              ch->last_code = CHUNKE_PASSTHRU_ERROR;
  283|      0|              return result;
  284|      0|            }
  285|      0|          }
  286|      0|          curlx_dyn_reset(&ch->trailer);
  287|      0|          ch->state = CHUNK_TRAILER_CR;
  288|      0|          if(*buf == 0x0a)
  ------------------
  |  Branch (288:14): [True: 0, False: 0]
  ------------------
  289|       |            /* already on the LF */
  290|      0|            break;
  291|      0|        }
  292|      0|        else {
  293|       |          /* no trailer, we are on the final CRLF pair */
  294|      0|          ch->state = CHUNK_TRAILER_POSTCR;
  295|      0|          break; /* do not advance the pointer */
  296|      0|        }
  297|      0|      }
  298|      0|      else {
  299|      0|        result = curlx_dyn_addn(&ch->trailer, buf, 1);
  300|      0|        if(result) {
  ------------------
  |  Branch (300:12): [True: 0, False: 0]
  ------------------
  301|      0|          ch->state = CHUNK_FAILED;
  302|      0|          ch->last_code = CHUNKE_OUT_OF_MEMORY;
  303|      0|          return result;
  304|      0|        }
  305|      0|      }
  306|      0|      buf++;
  307|      0|      blen--;
  308|      0|      (*pconsumed)++;
  309|      0|      break;
  310|       |
  311|      0|    case CHUNK_TRAILER_CR:
  ------------------
  |  Branch (311:5): [True: 0, False: 5]
  ------------------
  312|      0|      if(*buf == 0x0a) {
  ------------------
  |  Branch (312:10): [True: 0, False: 0]
  ------------------
  313|      0|        ch->state = CHUNK_TRAILER_POSTCR;
  314|      0|        buf++;
  315|      0|        blen--;
  316|      0|        (*pconsumed)++;
  317|      0|      }
  318|      0|      else {
  319|      0|        ch->state = CHUNK_FAILED;
  320|      0|        ch->last_code = CHUNKE_BAD_CHUNK;
  321|      0|        return CURLE_RECV_ERROR;
  322|      0|      }
  323|      0|      break;
  324|       |
  325|      0|    case CHUNK_TRAILER_POSTCR:
  ------------------
  |  Branch (325:5): [True: 0, False: 5]
  ------------------
  326|       |      /* We enter this state when a CR should arrive so we expect to
  327|       |         have to first pass a CR before we wait for LF */
  328|      0|      if((*buf != 0x0d) && (*buf != 0x0a)) {
  ------------------
  |  Branch (328:10): [True: 0, False: 0]
  |  Branch (328:28): [True: 0, False: 0]
  ------------------
  329|       |        /* not a CR then it must be another header in the trailer */
  330|      0|        ch->state = CHUNK_TRAILER;
  331|      0|        break;
  332|      0|      }
  333|      0|      if(*buf == 0x0d) {
  ------------------
  |  Branch (333:10): [True: 0, False: 0]
  ------------------
  334|       |        /* skip if CR */
  335|      0|        buf++;
  336|      0|        blen--;
  337|      0|        (*pconsumed)++;
  338|      0|      }
  339|       |      /* now wait for the final LF */
  340|      0|      ch->state = CHUNK_STOP;
  341|      0|      break;
  342|       |
  343|      0|    case CHUNK_STOP:
  ------------------
  |  Branch (343:5): [True: 0, False: 5]
  ------------------
  344|      0|      if(*buf == 0x0a) {
  ------------------
  |  Branch (344:10): [True: 0, False: 0]
  ------------------
  345|      0|        blen--;
  346|      0|        (*pconsumed)++;
  347|       |        /* Record the length of any data left in the end of the buffer
  348|       |           even if there is no more chunks to read */
  349|      0|        ch->datasize = blen;
  350|      0|        ch->state = CHUNK_DONE;
  351|      0|        CURL_TRC_WRITE(data, "http_chunk, response complete");
  ------------------
  |  |  158|      0|  do {                                                     \
  |  |  159|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      0|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  352|      0|        return CURLE_OK;
  353|      0|      }
  354|      0|      else {
  355|      0|        ch->state = CHUNK_FAILED;
  356|      0|        ch->last_code = CHUNKE_BAD_CHUNK;
  357|      0|        CURL_TRC_WRITE(data, "http_chunk error, expected 0x0a, seeing 0x%ux",
  ------------------
  |  |  158|      0|  do {                                                     \
  |  |  159|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      0|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  358|      0|                       (unsigned int)*buf);
  359|      0|        return CURLE_RECV_ERROR;
  360|      0|      }
  361|      0|    case CHUNK_DONE:
  ------------------
  |  Branch (361:5): [True: 0, False: 5]
  ------------------
  362|      0|      return CURLE_OK;
  363|       |
  364|      0|    case CHUNK_FAILED:
  ------------------
  |  Branch (364:5): [True: 0, False: 5]
  ------------------
  365|      0|      return CURLE_RECV_ERROR;
  366|      5|    }
  367|      5|  }
  368|      2|  return CURLE_OK;
  369|      2|}
http_chunks.c:cw_chunked_init:
  406|      4|{
  407|      4|  struct chunked_writer *ctx = writer->ctx;
  408|       |
  409|      4|  data->req.chunk = TRUE;      /* chunks coming our way. */
  ------------------
  |  | 1045|      4|#define TRUE true
  ------------------
  410|      4|  Curl_httpchunk_init(data, &ctx->ch, FALSE, FALSE);
  ------------------
  |  | 1048|      4|#define FALSE false
  ------------------
                Curl_httpchunk_init(data, &ctx->ch, FALSE, FALSE);
  ------------------
  |  | 1048|      4|#define FALSE false
  ------------------
  411|      4|  return CURLE_OK;
  412|      4|}
http_chunks.c:cw_chunked_write:
  424|     13|{
  425|     13|  struct chunked_writer *ctx = writer->ctx;
  426|     13|  CURLcode result;
  427|     13|  size_t consumed;
  428|       |
  429|     13|  if(!(type & CLIENTWRITE_BODY))
  ------------------
  |  |   43|     13|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (429:6): [True: 11, False: 2]
  ------------------
  430|     11|    return Curl_cwriter_write(data, writer->next, type, buf, blen);
  ------------------
  |  |  188|     11|  ((w) ? (w)->cwt->do_write((d), (w), (t), (b), (n)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (188:4): [True: 11, False: 0]
  |  |  ------------------
  ------------------
  431|       |
  432|      2|  consumed = 0;
  433|      2|  result = httpchunk_readwrite(data, &ctx->ch, writer->next, buf, blen,
  434|      2|                               &consumed);
  435|       |
  436|      2|  if(result) {
  ------------------
  |  Branch (436:6): [True: 0, False: 2]
  ------------------
  437|      0|    if(CHUNKE_PASSTHRU_ERROR == ctx->ch.last_code) {
  ------------------
  |  Branch (437:8): [True: 0, False: 0]
  ------------------
  438|      0|      failf(data, "Failed reading the chunked-encoded stream");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  439|      0|    }
  440|      0|    else {
  441|      0|      failf(data, "%s in chunked-encoding",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  442|      0|            Curl_chunked_strerror(ctx->ch.last_code));
  443|      0|    }
  444|      0|    return result;
  445|      0|  }
  446|       |
  447|      2|  blen -= consumed;
  448|      2|  if(CHUNK_DONE == ctx->ch.state) {
  ------------------
  |  Branch (448:6): [True: 0, False: 2]
  ------------------
  449|       |    /* chunks read successfully, download is complete */
  450|      0|    data->req.download_done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  451|      0|    if(blen) {
  ------------------
  |  Branch (451:8): [True: 0, False: 0]
  ------------------
  452|      0|      infof(data, "Leftovers after chunking: %zu bytes", blen);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  453|      0|    }
  454|      0|  }
  455|      2|  else if((type & CLIENTWRITE_EOS) && !data->req.no_body) {
  ------------------
  |  |   50|      2|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  |  Branch (455:11): [True: 1, False: 1]
  |  Branch (455:39): [True: 1, False: 0]
  ------------------
  456|      1|    failf(data, "transfer closed with outstanding read data remaining");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  457|      1|    return CURLE_PARTIAL_FILE;
  458|      1|  }
  459|       |
  460|      1|  return CURLE_OK;
  461|      2|}
http_chunks.c:cw_chunked_close:
  416|      4|{
  417|      4|  struct chunked_writer *ctx = writer->ctx;
  418|      4|  Curl_httpchunk_free(data, &ctx->ch);
  419|      4|}
http_chunks.c:cr_chunked_init:
  488|    102|{
  489|    102|  struct chunked_reader *ctx = reader->ctx;
  490|    102|  (void)data;
  491|    102|  Curl_bufq_init2(&ctx->chunkbuf, CURL_CHUNKED_MAXLEN, 2, BUFQ_OPT_SOFT_LIMIT);
  ------------------
  |  |  477|    102|#define CURL_CHUNKED_MAXLEN   (64 * 1024)
  ------------------
                Curl_bufq_init2(&ctx->chunkbuf, CURL_CHUNKED_MAXLEN, 2, BUFQ_OPT_SOFT_LIMIT);
  ------------------
  |  |  111|    102|#define BUFQ_OPT_SOFT_LIMIT  (1 << 0)
  ------------------
  492|    102|  return CURLE_OK;
  493|    102|}
http_chunks.c:cr_chunked_read:
  616|    196|{
  617|    196|  struct chunked_reader *ctx = reader->ctx;
  618|    196|  CURLcode result = CURLE_READ_ERROR;
  619|       |
  620|    196|  *pnread = 0;
  621|    196|  *peos = (bool)ctx->eos;
  622|       |
  623|    196|  if(!ctx->eos) {
  ------------------
  |  Branch (623:6): [True: 196, False: 0]
  ------------------
  624|    196|    if(!ctx->read_eos && Curl_bufq_is_empty(&ctx->chunkbuf)) {
  ------------------
  |  Branch (624:8): [True: 196, False: 0]
  |  Branch (624:26): [True: 196, False: 0]
  ------------------
  625|       |      /* Still getting data form the next reader, buffer is empty */
  626|    196|      result = add_chunk(data, reader, buf, blen);
  627|    196|      if(result)
  ------------------
  |  Branch (627:10): [True: 0, False: 196]
  ------------------
  628|      0|        return result;
  629|    196|    }
  630|       |
  631|    196|    if(!Curl_bufq_is_empty(&ctx->chunkbuf)) {
  ------------------
  |  Branch (631:8): [True: 16, False: 180]
  ------------------
  632|     16|      result = Curl_bufq_cread(&ctx->chunkbuf, buf, blen, pnread);
  633|     16|      if(!result && ctx->read_eos && Curl_bufq_is_empty(&ctx->chunkbuf)) {
  ------------------
  |  Branch (633:10): [True: 16, False: 0]
  |  Branch (633:21): [True: 12, False: 4]
  |  Branch (633:38): [True: 12, False: 0]
  ------------------
  634|       |        /* no more data, read all, done. */
  635|     12|        ctx->eos = TRUE;
  ------------------
  |  | 1045|     12|#define TRUE true
  ------------------
  636|     12|        *peos = TRUE;
  ------------------
  |  | 1045|     12|#define TRUE true
  ------------------
  637|     12|      }
  638|     16|      return result;
  639|     16|    }
  640|    196|  }
  641|       |  /* We may get here, because we are done or because callbacks paused */
  642|    180|  DEBUGASSERT(ctx->eos || !ctx->read_eos);
  ------------------
  |  | 1075|    180|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (642:3): [True: 180, False: 0]
  |  Branch (642:3): [True: 0, False: 0]
  |  Branch (642:3): [True: 0, False: 180]
  |  Branch (642:3): [True: 180, False: 0]
  ------------------
  643|    180|  return CURLE_OK;
  644|    180|}
http_chunks.c:add_chunk:
  561|    196|{
  562|    196|  struct chunked_reader *ctx = reader->ctx;
  563|    196|  CURLcode result;
  564|    196|  char tmp[CURL_CHUNKED_MINLEN];
  565|    196|  size_t nread;
  566|    196|  bool eos;
  567|       |
  568|    196|  DEBUGASSERT(!ctx->read_eos);
  ------------------
  |  | 1075|    196|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (568:3): [True: 0, False: 196]
  |  Branch (568:3): [True: 196, False: 0]
  ------------------
  569|    196|  blen = CURLMIN(blen, CURL_CHUNKED_MAXLEN); /* respect our buffer pref */
  ------------------
  |  | 1288|    196|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1288:24): [True: 103, False: 93]
  |  |  ------------------
  ------------------
  570|    196|  if(blen < sizeof(tmp)) {
  ------------------
  |  Branch (570:6): [True: 0, False: 196]
  ------------------
  571|       |    /* small read, make a chunk of decent size */
  572|      0|    buf = tmp;
  573|      0|    blen = sizeof(tmp);
  574|      0|  }
  575|    196|  else {
  576|       |    /* larger read, make a chunk that will fit when read back */
  577|    196|    blen -= (8 + 2 + 2); /* deduct max overhead, 8 hex + 2*crlf */
  578|    196|  }
  579|       |
  580|    196|  result = Curl_creader_read(data, reader->next, buf, blen, &nread, &eos);
  581|    196|  if(result)
  ------------------
  |  Branch (581:6): [True: 0, False: 196]
  ------------------
  582|      0|    return result;
  583|    196|  if(eos)
  ------------------
  |  Branch (583:6): [True: 12, False: 184]
  ------------------
  584|     12|    ctx->read_eos = TRUE;
  ------------------
  |  | 1045|     12|#define TRUE true
  ------------------
  585|       |
  586|    196|  if(nread) {
  ------------------
  |  Branch (586:6): [True: 12, False: 184]
  ------------------
  587|       |    /* actually got bytes, wrap them into the chunkbuf */
  588|     12|    char hd[11] = "";
  589|     12|    int hdlen;
  590|     12|    size_t n;
  591|       |
  592|     12|    hdlen = curl_msnprintf(hd, sizeof(hd), "%zx\r\n", nread);
  593|     12|    if(hdlen <= 0)
  ------------------
  |  Branch (593:8): [True: 0, False: 12]
  ------------------
  594|      0|      return CURLE_READ_ERROR;
  595|       |    /* On a soft-limited bufq, we do not need to check that all was written */
  596|     12|    result = Curl_bufq_cwrite(&ctx->chunkbuf, hd, hdlen, &n);
  597|     12|    if(!result)
  ------------------
  |  Branch (597:8): [True: 12, False: 0]
  ------------------
  598|     12|      result = Curl_bufq_cwrite(&ctx->chunkbuf, buf, nread, &n);
  599|     12|    if(!result)
  ------------------
  |  Branch (599:8): [True: 12, False: 0]
  ------------------
  600|     12|      result = Curl_bufq_cwrite(&ctx->chunkbuf, "\r\n", 2, &n);
  601|     12|    CURL_TRC_READ(data, "http_chunk, made chunk of %zu bytes -> %d",
  ------------------
  |  |  163|     12|  do {                                                    \
  |  |  164|     12|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  329|     12|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     24|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 12, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     24|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|     12|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|     12|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|     12|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 12]
  |  |  ------------------
  ------------------
  602|     12|                  nread, (int)result);
  603|     12|    if(result)
  ------------------
  |  Branch (603:8): [True: 0, False: 12]
  ------------------
  604|      0|      return result;
  605|     12|  }
  606|       |
  607|    196|  if(ctx->read_eos)
  ------------------
  |  Branch (607:6): [True: 12, False: 184]
  ------------------
  608|     12|    return add_last_chunk(data, reader);
  609|    184|  return CURLE_OK;
  610|    196|}
http_chunks.c:add_last_chunk:
  505|     12|{
  506|     12|  struct chunked_reader *ctx = reader->ctx;
  507|     12|  struct curl_slist *trailers = NULL, *tr;
  508|     12|  CURLcode result;
  509|     12|  size_t n;
  510|     12|  int rc;
  511|       |
  512|     12|  if(!data->set.trailer_callback) {
  ------------------
  |  Branch (512:6): [True: 12, False: 0]
  ------------------
  513|     12|    CURL_TRC_READ(data, "http_chunk, added last, empty chunk");
  ------------------
  |  |  163|     12|  do {                                                    \
  |  |  164|     12|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  329|     12|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     24|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 12, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     24|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|     12|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|     12|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|     12|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 12]
  |  |  ------------------
  ------------------
  514|     12|    return Curl_bufq_cwrite(&ctx->chunkbuf, STRCONST("0\r\n\r\n"), &n);
  ------------------
  |  | 1297|     12|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|     12|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  515|     12|  }
  516|       |
  517|      0|  result = Curl_bufq_cwrite(&ctx->chunkbuf, STRCONST("0\r\n"), &n);
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  518|      0|  if(result)
  ------------------
  |  Branch (518:6): [True: 0, False: 0]
  ------------------
  519|      0|    goto out;
  520|       |
  521|      0|  {
  522|      0|    struct Curl_mapi_guard guard;
  523|      0|    CURL_CBAPI_START(&guard, data, easy_trailer_callback);
  ------------------
  |  |  201|      0|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
  524|      0|    rc = data->set.trailer_callback(&trailers, data->set.trailer_data);
  525|      0|    CURL_CBAPI_END(&guard);
  ------------------
  |  |  205|      0|  Curl_cbapi_leave(g)
  ------------------
  526|      0|  }
  527|       |
  528|      0|  if(rc != CURL_TRAILERFUNC_OK) {
  ------------------
  |  |  399|      0|#define CURL_TRAILERFUNC_OK 0
  ------------------
  |  Branch (528:6): [True: 0, False: 0]
  ------------------
  529|      0|    failf(data, "operation aborted by trailing headers callback");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  530|      0|    result = CURLE_ABORTED_BY_CALLBACK;
  531|      0|    goto out;
  532|      0|  }
  533|       |
  534|      0|  for(tr = trailers; tr; tr = tr->next) {
  ------------------
  |  Branch (534:22): [True: 0, False: 0]
  ------------------
  535|       |    /* only add correctly formatted trailers */
  536|      0|    const char *ptr = strchr(tr->data, ':');
  537|      0|    if(!ptr || *(ptr + 1) != ' ') {
  ------------------
  |  Branch (537:8): [True: 0, False: 0]
  |  Branch (537:16): [True: 0, False: 0]
  ------------------
  538|      0|      infof(data, "Malformatted trailing header, skipping trailer");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  539|      0|      continue;
  540|      0|    }
  541|       |
  542|      0|    result = Curl_bufq_cwrite(&ctx->chunkbuf, tr->data, strlen(tr->data), &n);
  543|      0|    if(!result)
  ------------------
  |  Branch (543:8): [True: 0, False: 0]
  ------------------
  544|      0|      result = Curl_bufq_cwrite(&ctx->chunkbuf, STRCONST("\r\n"), &n);
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  545|      0|    if(result)
  ------------------
  |  Branch (545:8): [True: 0, False: 0]
  ------------------
  546|      0|      goto out;
  547|      0|  }
  548|       |
  549|      0|  result = Curl_bufq_cwrite(&ctx->chunkbuf, STRCONST("\r\n"), &n);
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  550|       |
  551|      0|out:
  552|      0|  curl_slist_free_all(trailers);
  553|      0|  CURL_TRC_READ(data, "http_chunk, added last chunk with trailers "
  ------------------
  |  |  163|      0|  do {                                                    \
  |  |  164|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|      0|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  554|      0|                "from client -> %d", (int)result);
  555|      0|  return result;
  556|      0|}
http_chunks.c:cr_chunked_close:
  497|    102|{
  498|    102|  struct chunked_reader *ctx = reader->ctx;
  499|    102|  (void)data;
  500|    102|  Curl_bufq_free(&ctx->chunkbuf);
  501|    102|}
http_chunks.c:cr_chunked_total_length:
  648|    204|{
  649|       |  /* this reader changes length depending on input */
  650|    204|  (void)data;
  651|    204|  (void)reader;
  652|    204|  return -1;
  653|    204|}

Curl_input_digest:
   73|      5|{
   74|       |  /* Point to the correct struct with this */
   75|      5|  struct digestdata *digest;
   76|      5|  struct Curl_peer *origin = NULL;
   77|      5|  CURLcode result;
   78|       |
   79|      5|  if(proxy) {
  ------------------
  |  Branch (79:6): [True: 0, False: 5]
  ------------------
   80|      0|    digest = &data->state.proxydigest;
   81|       |#ifdef CURL_DISABLE_PROXY
   82|       |    Curl_auth_digest_cleanup(digest);
   83|       |    return CURLE_OK;  /* just ignore such a header without proxy support */
   84|       |#else
   85|      0|    origin = data->conn->http_proxy.peer;
   86|      0|#endif
   87|      0|  }
   88|      5|  else {
   89|      5|    digest = &data->state.digest;
   90|      5|    origin = data->state.origin;
   91|      5|  }
   92|       |
   93|      5|  if(!checkprefix("Digest", header) || !ISBLANK(header[6])) {
  ------------------
  |  |   49|     10|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1297|      5|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1292|      5|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                if(!checkprefix("Digest", header) || !ISBLANK(header[6])) {
  ------------------
  |  |   43|      5|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 5, False: 0]
  |  |  |  Branch (43:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (93:6): [True: 0, False: 5]
  ------------------
   94|      0|    Curl_auth_digest_cleanup(digest);
   95|      0|    return CURLE_AUTH_ERROR;
   96|      0|  }
   97|       |
   98|      5|  header += CURL_CSTRLEN("Digest");
  ------------------
  |  | 1292|      5|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  ------------------
   99|      5|  curlx_str_passblanks(&header);
  100|       |
  101|       |  /* This resets the digest struct before decoding */
  102|      5|  result = Curl_auth_decode_digest_http_message(header, digest);
  103|       |  /* Remember only the peer, the data we take in has no relation to creds
  104|       |   * at this time. We can use it even if creds change. */
  105|      5|  Curl_peer_link(&digest->origin, origin);
  106|      5|  return result;
  107|      5|}
Curl_output_digest:
  113|      1|{
  114|      1|  struct Curl_peer *origin = NULL;
  115|      1|  CURLcode result;
  116|      1|  char *response;
  117|      1|  size_t len;
  118|      1|  bool have_chlg;
  119|       |
  120|       |  /* Point to the address of the pointer that holds the string to send to the
  121|       |     server, which is for a plain host or for an HTTP proxy */
  122|      1|  char **allocuserpwd;
  123|       |
  124|       |  /* Point to the name and password for this */
  125|      1|  struct Curl_creds *creds = NULL;
  126|       |
  127|       |  /* Point to the correct struct with this */
  128|      1|  struct digestdata *digest;
  129|      1|  struct auth *authp;
  130|       |
  131|      1|  if(proxy) {
  ------------------
  |  Branch (131:6): [True: 0, False: 1]
  ------------------
  132|       |#ifdef CURL_DISABLE_PROXY
  133|       |    return CURLE_NOT_BUILT_IN;
  134|       |#else
  135|      0|    digest = &data->state.proxydigest;
  136|      0|    origin = data->conn->http_proxy.peer;
  137|      0|    creds = data->conn->http_proxy.creds;
  138|      0|    allocuserpwd = &data->req.hd_proxy_auth;
  139|      0|    authp = &data->state.authproxy;
  140|      0|#endif
  141|      0|  }
  142|      1|  else {
  143|      1|    DEBUGASSERT(data->state.origin);
  ------------------
  |  | 1075|      1|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (143:5): [True: 0, False: 1]
  |  Branch (143:5): [True: 1, False: 0]
  ------------------
  144|      1|    digest = &data->state.digest;
  145|      1|    origin = data->state.origin;
  146|      1|    creds = data->state.creds;
  147|      1|    allocuserpwd = &data->req.hd_auth;
  148|      1|    authp = &data->state.authhost;
  149|      1|  }
  150|       |
  151|      1|  digest_flush_stale(data, digest, origin, creds);
  152|      1|  curlx_safefree(*allocuserpwd);
  ------------------
  |  | 1332|      1|  do {                      \
  |  | 1333|      1|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|      1|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|      1|    (ptr) = NULL;           \
  |  | 1335|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  153|       |
  154|       |#ifdef USE_WINDOWS_SSPI
  155|       |  have_chlg = !!digest->input_token;
  156|       |#else
  157|      1|  have_chlg = !!digest->nonce;
  158|      1|#endif
  159|       |
  160|      1|  if(!have_chlg) {
  ------------------
  |  Branch (160:6): [True: 1, False: 0]
  ------------------
  161|      1|    authp->done = FALSE;
  ------------------
  |  | 1048|      1|#define FALSE false
  ------------------
  162|      1|    return CURLE_OK;
  163|      1|  }
  164|       |
  165|      0|  result = Curl_auth_create_digest_http_message(data, creds, request,
  166|      0|                                                uripath, digest,
  167|      0|                                                &response, &len);
  168|      0|  if(result)
  ------------------
  |  Branch (168:6): [True: 0, False: 0]
  ------------------
  169|      0|    return result;
  170|       |
  171|      0|  *allocuserpwd = curl_maprintf("%sAuthorization: Digest %s\r\n",
  172|      0|                                proxy ? "Proxy-" : "", response);
  ------------------
  |  Branch (172:33): [True: 0, False: 0]
  ------------------
  173|      0|  curlx_free(response);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  174|      0|  if(!*allocuserpwd)
  ------------------
  |  Branch (174:6): [True: 0, False: 0]
  ------------------
  175|      0|    return CURLE_OUT_OF_MEMORY;
  176|       |
  177|      0|  authp->done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  178|       |
  179|      0|  return CURLE_OK;
  180|      0|}
Curl_http_auth_cleanup_digest:
  183|  7.46k|{
  184|  7.46k|  Curl_auth_digest_cleanup(&data->state.digest);
  185|  7.46k|  Curl_auth_digest_cleanup(&data->state.proxydigest);
  186|  7.46k|}
http_digest.c:digest_flush_stale:
   42|      1|{
   43|      1|  bool flush = FALSE;
  ------------------
  |  | 1048|      1|#define FALSE false
  ------------------
   44|      1|  if(digest->origin && !Curl_peer_same_destination(peer, digest->origin)) {
  ------------------
  |  Branch (44:6): [True: 0, False: 1]
  |  Branch (44:24): [True: 0, False: 0]
  ------------------
   45|      0|    CURL_TRC_M(data, "http_digest, reset on peer change to %s:%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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
   46|      0|               peer->hostname, peer->port);
   47|      0|    flush = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
   48|      0|  }
   49|      1|  else if(digest->creds && !Curl_creds_same(creds, digest->creds)) {
  ------------------
  |  Branch (49:11): [True: 0, False: 1]
  |  Branch (49:28): [True: 0, False: 0]
  ------------------
   50|      0|    CURL_TRC_M(data, "http_digest, reset on creds change to %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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330: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]
  |  |  ------------------
  ------------------
   51|      0|               creds ? creds->user : "-");
   52|      0|    flush = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
   53|      0|  }
   54|       |
   55|      1|  if(flush) {
  ------------------
  |  Branch (55:6): [True: 0, False: 1]
  ------------------
   56|       |    /* flush Digest state */
   57|      0|    Curl_auth_digest_cleanup(digest);
   58|      0|  }
   59|       |
   60|      1|  Curl_peer_link(&digest->origin, peer);
   61|      1|  Curl_creds_link(&digest->creds, creds);
   62|      1|}

Curl_is_ASCII_str:
  238|  7.25k|{
  239|  7.25k|  if(s && s->len) {
  ------------------
  |  Branch (239:6): [True: 7.25k, False: 0]
  |  Branch (239:11): [True: 7.25k, False: 0]
  ------------------
  240|  7.25k|    const unsigned char *ch = (const unsigned char *)s->str;
  241|  7.25k|    size_t i;
  242|  76.2k|    for(i = 0; i < s->len; ++i) {
  ------------------
  |  Branch (242:16): [True: 68.9k, False: 7.25k]
  ------------------
  243|  68.9k|      if(ch[i] & 0x80)
  ------------------
  |  Branch (243:10): [True: 0, False: 68.9k]
  ------------------
  244|      0|        return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  245|  68.9k|    }
  246|  7.25k|  }
  247|  7.25k|  return TRUE;
  ------------------
  |  | 1045|  7.25k|#define TRUE true
  ------------------
  248|  7.25k|}

Curl_ipv6_scope:
   62|  3.62k|{
   63|  3.62k|  if(sa->sa_family == AF_INET6) {
  ------------------
  |  Branch (63:6): [True: 0, False: 3.62k]
  ------------------
   64|      0|    const struct sockaddr_in6 *sa6 =
   65|      0|      (const struct sockaddr_in6 *)(const void *)sa;
   66|      0|    const unsigned char *b = sa6->sin6_addr.s6_addr;
   67|      0|    unsigned short w = (unsigned short)((b[0] << 8) | b[1]);
   68|       |
   69|      0|    if((b[0] & 0xFE) == 0xFC) /* Handle ULAs */
  ------------------
  |  Branch (69:8): [True: 0, False: 0]
  ------------------
   70|      0|      return IPV6_SCOPE_UNIQUELOCAL;
  ------------------
  |  |   32|      0|#define IPV6_SCOPE_UNIQUELOCAL  3       /* Unique local */
  ------------------
   71|      0|    switch(w & 0xFFC0) {
   72|      0|    case 0xFE80:
  ------------------
  |  Branch (72:5): [True: 0, False: 0]
  ------------------
   73|      0|      return IPV6_SCOPE_LINKLOCAL;
  ------------------
  |  |   30|      0|#define IPV6_SCOPE_LINKLOCAL    1       /* Link-local scope. */
  ------------------
   74|      0|    case 0xFEC0:
  ------------------
  |  Branch (74:5): [True: 0, False: 0]
  ------------------
   75|      0|      return IPV6_SCOPE_SITELOCAL;
  ------------------
  |  |   31|      0|#define IPV6_SCOPE_SITELOCAL    2       /* Site-local scope (deprecated). */
  ------------------
   76|      0|    case 0x0000:
  ------------------
  |  Branch (76:5): [True: 0, False: 0]
  ------------------
   77|      0|      w = b[1] | b[2] | b[3] | b[4] | b[5] | b[6] | b[7] | b[8] | b[9] |
   78|      0|          b[10] | b[11] | b[12] | b[13] | b[14];
   79|      0|      if(w || b[15] != 0x01)
  ------------------
  |  Branch (79:10): [True: 0, False: 0]
  |  Branch (79:15): [True: 0, False: 0]
  ------------------
   80|      0|        break;
   81|      0|      return IPV6_SCOPE_NODELOCAL;
  ------------------
  |  |   33|      0|#define IPV6_SCOPE_NODELOCAL    4       /* Loopback. */
  ------------------
   82|      0|    default:
  ------------------
  |  Branch (82:5): [True: 0, False: 0]
  ------------------
   83|      0|      break;
   84|      0|    }
   85|      0|  }
   86|  3.62k|  return IPV6_SCOPE_GLOBAL;
  ------------------
  |  |   29|  3.62k|#define IPV6_SCOPE_GLOBAL       0       /* Global scope. */
  ------------------
   87|  3.62k|}

Curl_llist_init:
   46|   384k|{
   47|   384k|  l->_size = 0;
   48|   384k|  l->_dtor = dtor;
   49|   384k|  l->_head = NULL;
   50|   384k|  l->_tail = NULL;
   51|   384k|#ifdef DEBUGBUILD
   52|   384k|  l->_init = LLISTINIT;
  ------------------
  |  |   29|   384k|#define LLISTINIT 0x100cc001 /* random pattern */
  ------------------
   53|   384k|#endif
   54|   384k|}
Curl_llist_insert_next:
   71|  16.6k|{
   72|  16.6k|  DEBUGASSERT(list);
  ------------------
  |  | 1075|  16.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (72:3): [True: 0, False: 16.6k]
  |  Branch (72:3): [True: 16.6k, False: 0]
  ------------------
   73|  16.6k|  DEBUGASSERT(list->_init == LLISTINIT);
  ------------------
  |  | 1075|  16.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (73:3): [True: 0, False: 16.6k]
  |  Branch (73:3): [True: 16.6k, False: 0]
  ------------------
   74|  16.6k|  DEBUGASSERT(ne);
  ------------------
  |  | 1075|  16.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (74:3): [True: 0, False: 16.6k]
  |  Branch (74:3): [True: 16.6k, False: 0]
  ------------------
   75|       |
   76|  16.6k|#ifdef DEBUGBUILD
   77|  16.6k|  ne->_init = NODEINIT;
  ------------------
  |  |   30|  16.6k|#define NODEINIT  0x12344321 /* random pattern */
  ------------------
   78|  16.6k|#endif
   79|  16.6k|  ne->_ptr = CURL_UNCONST(p);
  ------------------
  |  |  856|  16.6k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   80|  16.6k|  ne->_list = list;
   81|  16.6k|  if(list->_size == 0) {
  ------------------
  |  Branch (81:6): [True: 12.1k, False: 4.43k]
  ------------------
   82|  12.1k|    list->_head = ne;
   83|  12.1k|    list->_head->_prev = NULL;
   84|  12.1k|    list->_head->_next = NULL;
   85|  12.1k|    list->_tail = ne;
   86|  12.1k|  }
   87|  4.43k|  else {
   88|       |    /* if 'e' is NULL here, we insert the new element first in the list */
   89|  4.43k|    ne->_next = e ? e->_next : list->_head;
  ------------------
  |  Branch (89:17): [True: 4.43k, False: 0]
  ------------------
   90|  4.43k|    ne->_prev = e;
   91|  4.43k|    if(!e) {
  ------------------
  |  Branch (91:8): [True: 0, False: 4.43k]
  ------------------
   92|      0|      list->_head->_prev = ne;
   93|      0|      list->_head = ne;
   94|      0|    }
   95|  4.43k|    else if(e->_next) {
  ------------------
  |  Branch (95:13): [True: 0, False: 4.43k]
  ------------------
   96|      0|      e->_next->_prev = ne;
   97|      0|    }
   98|  4.43k|    else {
   99|  4.43k|      list->_tail = ne;
  100|  4.43k|    }
  101|  4.43k|    if(e)
  ------------------
  |  Branch (101:8): [True: 4.43k, False: 0]
  ------------------
  102|  4.43k|      e->_next = ne;
  103|  4.43k|  }
  104|       |
  105|  16.6k|  ++list->_size;
  106|  16.6k|}
Curl_llist_append:
  119|  16.6k|{
  120|  16.6k|  DEBUGASSERT(list);
  ------------------
  |  | 1075|  16.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (120:3): [True: 0, False: 16.6k]
  |  Branch (120:3): [True: 16.6k, False: 0]
  ------------------
  121|  16.6k|  DEBUGASSERT(list->_init == LLISTINIT);
  ------------------
  |  | 1075|  16.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (121:3): [True: 0, False: 16.6k]
  |  Branch (121:3): [True: 16.6k, False: 0]
  ------------------
  122|  16.6k|  DEBUGASSERT(ne);
  ------------------
  |  | 1075|  16.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (122:3): [True: 0, False: 16.6k]
  |  Branch (122:3): [True: 16.6k, False: 0]
  ------------------
  123|  16.6k|  Curl_llist_insert_next(list, list->_tail, p, ne);
  124|  16.6k|}
Curl_node_take_elem:
  127|  16.5k|{
  128|  16.5k|  void *ptr;
  129|  16.5k|  struct Curl_llist *list;
  130|  16.5k|  if(!e)
  ------------------
  |  Branch (130:6): [True: 0, False: 16.5k]
  ------------------
  131|      0|    return NULL;
  132|       |
  133|  16.5k|  list = e->_list;
  134|  16.5k|  DEBUGASSERT(list);
  ------------------
  |  | 1075|  16.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (134:3): [True: 0, False: 16.5k]
  |  Branch (134:3): [True: 16.5k, False: 0]
  ------------------
  135|  16.5k|  DEBUGASSERT(list->_init == LLISTINIT);
  ------------------
  |  | 1075|  16.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (135:3): [True: 0, False: 16.5k]
  |  Branch (135:3): [True: 16.5k, False: 0]
  ------------------
  136|  16.5k|  DEBUGASSERT(list->_size);
  ------------------
  |  | 1075|  16.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (136:3): [True: 0, False: 16.5k]
  |  Branch (136:3): [True: 16.5k, False: 0]
  ------------------
  137|  16.5k|  DEBUGASSERT(e->_init == NODEINIT);
  ------------------
  |  | 1075|  16.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (137:3): [True: 0, False: 16.5k]
  |  Branch (137:3): [True: 16.5k, False: 0]
  ------------------
  138|  16.5k|  if(list) {
  ------------------
  |  Branch (138:6): [True: 16.5k, False: 0]
  ------------------
  139|  16.5k|    if(e == list->_head) {
  ------------------
  |  Branch (139:8): [True: 12.6k, False: 3.88k]
  ------------------
  140|  12.6k|      list->_head = e->_next;
  141|       |
  142|  12.6k|      if(!list->_head)
  ------------------
  |  Branch (142:10): [True: 12.1k, False: 497]
  ------------------
  143|  12.1k|        list->_tail = NULL;
  144|    497|      else
  145|    497|        e->_next->_prev = NULL;
  146|  12.6k|    }
  147|  3.88k|    else {
  148|  3.88k|      if(e->_prev)
  ------------------
  |  Branch (148:10): [True: 3.88k, False: 0]
  ------------------
  149|  3.88k|        e->_prev->_next = e->_next;
  150|       |
  151|  3.88k|      if(!e->_next)
  ------------------
  |  Branch (151:10): [True: 3.82k, False: 62]
  ------------------
  152|  3.82k|        list->_tail = e->_prev;
  153|     62|      else
  154|     62|        e->_next->_prev = e->_prev;
  155|  3.88k|    }
  156|  16.5k|    --list->_size;
  157|  16.5k|  }
  158|  16.5k|  ptr = e->_ptr;
  159|       |
  160|  16.5k|  e->_list = NULL;
  161|  16.5k|  e->_ptr  = NULL;
  162|  16.5k|  e->_prev = NULL;
  163|  16.5k|  e->_next = NULL;
  164|  16.5k|#ifdef DEBUGBUILD
  165|  16.5k|  e->_init = NODEREM; /* specific pattern on remove - not zero */
  ------------------
  |  |   31|  16.5k|#define NODEREM   0x54321012 /* random pattern */
  ------------------
  166|  16.5k|#endif
  167|       |
  168|  16.5k|  return ptr;
  169|  16.5k|}
Curl_node_remove:
  188|  9.35k|{
  189|       |  node_uremove(e, NULL);
  190|  9.35k|}
Curl_llist_destroy:
  193|   104k|{
  194|   104k|  if(list) {
  ------------------
  |  Branch (194:6): [True: 104k, False: 0]
  ------------------
  195|   104k|    DEBUGASSERT(list->_init == LLISTINIT);
  ------------------
  |  | 1075|   104k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (195:5): [True: 0, False: 104k]
  |  Branch (195:5): [True: 104k, False: 0]
  ------------------
  196|   111k|    while(list->_size > 0)
  ------------------
  |  Branch (196:11): [True: 7.16k, False: 104k]
  ------------------
  197|  7.16k|      node_uremove(list->_tail, user);
  198|   104k|  }
  199|   104k|}
Curl_llist_head:
  204|   912k|{
  205|   912k|  DEBUGASSERT(list);
  ------------------
  |  | 1075|   912k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (205:3): [True: 0, False: 912k]
  |  Branch (205:3): [True: 912k, False: 0]
  ------------------
  206|   912k|  DEBUGASSERT(list->_init == LLISTINIT);
  ------------------
  |  | 1075|   912k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (206:3): [True: 0, False: 912k]
  |  Branch (206:3): [True: 912k, False: 0]
  ------------------
  207|   912k|  return VERIFYNODE(list->_head);
  ------------------
  |  |   33|   912k|#define VERIFYNODE(x) verifynode(x)
  ------------------
  208|   912k|}
Curl_llist_count:
  226|  62.7k|{
  227|  62.7k|  DEBUGASSERT(list);
  ------------------
  |  | 1075|  62.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (227:3): [True: 0, False: 62.7k]
  |  Branch (227:3): [True: 62.7k, False: 0]
  ------------------
  228|  62.7k|  DEBUGASSERT(list->_init == LLISTINIT);
  ------------------
  |  | 1075|  62.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (228:3): [True: 0, False: 62.7k]
  |  Branch (228:3): [True: 62.7k, False: 0]
  ------------------
  229|  62.7k|  return list->_size;
  230|  62.7k|}
Curl_node_elem:
  234|  20.2k|{
  235|  20.2k|  DEBUGASSERT(n);
  ------------------
  |  | 1075|  20.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (235:3): [True: 0, False: 20.2k]
  |  Branch (235:3): [True: 20.2k, False: 0]
  ------------------
  236|  20.2k|  DEBUGASSERT(n->_init == NODEINIT);
  ------------------
  |  | 1075|  20.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (236:3): [True: 0, False: 20.2k]
  |  Branch (236:3): [True: 20.2k, False: 0]
  ------------------
  237|  20.2k|  return n->_ptr;
  238|  20.2k|}
Curl_node_next:
  243|  15.8k|{
  244|  15.8k|  DEBUGASSERT(n);
  ------------------
  |  | 1075|  15.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (244:3): [True: 0, False: 15.8k]
  |  Branch (244:3): [True: 15.8k, False: 0]
  ------------------
  245|  15.8k|  DEBUGASSERT(n->_init == NODEINIT);
  ------------------
  |  | 1075|  15.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (245:3): [True: 0, False: 15.8k]
  |  Branch (245:3): [True: 15.8k, False: 0]
  ------------------
  246|  15.8k|  return VERIFYNODE(n->_next);
  ------------------
  |  |   33|  15.8k|#define VERIFYNODE(x) verifynode(x)
  ------------------
  247|  15.8k|}
Curl_node_llist:
  266|  10.8k|{
  267|  10.8k|  DEBUGASSERT(n);
  ------------------
  |  | 1075|  10.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (267:3): [True: 0, False: 10.8k]
  |  Branch (267:3): [True: 10.8k, False: 0]
  ------------------
  268|  10.8k|  DEBUGASSERT(!n->_list || n->_init == NODEINIT);
  ------------------
  |  | 1075|  10.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (268:3): [True: 10.8k, False: 0]
  |  Branch (268:3): [True: 0, False: 0]
  |  Branch (268:3): [True: 3.62k, False: 7.25k]
  |  Branch (268:3): [True: 7.25k, False: 0]
  ------------------
  269|  10.8k|  return n->_list;
  270|  10.8k|}
llist.c:node_uremove:
  172|  16.5k|{
  173|  16.5k|  struct Curl_llist *list;
  174|  16.5k|  void *ptr;
  175|  16.5k|  if(!e)
  ------------------
  |  Branch (175:6): [True: 0, False: 16.5k]
  ------------------
  176|      0|    return;
  177|       |
  178|  16.5k|  list = e->_list;
  179|  16.5k|  DEBUGASSERT(list);
  ------------------
  |  | 1075|  16.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 0, False: 16.5k]
  |  Branch (179:3): [True: 16.5k, False: 0]
  ------------------
  180|  16.5k|  if(list) {
  ------------------
  |  Branch (180:6): [True: 16.5k, False: 0]
  ------------------
  181|  16.5k|    ptr = Curl_node_take_elem(e);
  182|  16.5k|    if(list->_dtor)
  ------------------
  |  Branch (182:8): [True: 7.16k, False: 9.35k]
  ------------------
  183|  7.16k|      list->_dtor(user, ptr);
  184|  16.5k|  }
  185|  16.5k|}
llist.c:verifynode:
   35|   928k|{
   36|   928k|  DEBUGASSERT(!n || (n->_init == NODEINIT));
  ------------------
  |  | 1075|   928k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (36:3): [True: 928k, False: 0]
  |  Branch (36:3): [True: 0, False: 0]
  |  Branch (36:3): [True: 908k, False: 19.6k]
  |  Branch (36:3): [True: 19.6k, False: 0]
  ------------------
   37|   928k|  return n;
   38|   928k|}

curl_dbg_malloc:
  212|   178k|{
  213|   178k|  struct memdebug *mem;
  214|   178k|  size_t size;
  215|       |
  216|   178k|  DEBUGASSERT(wantedsize != 0);
  ------------------
  |  | 1075|   178k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (216:3): [True: 0, False: 178k]
  |  Branch (216:3): [True: 178k, False: 0]
  ------------------
  217|       |
  218|   178k|  if(countcheck("malloc", line, source))
  ------------------
  |  Branch (218:6): [True: 0, False: 178k]
  ------------------
  219|      0|    return NULL;
  220|       |
  221|       |  /* alloc at least 64 bytes */
  222|   178k|  size = sizeof(struct memdebug) + wantedsize;
  223|       |
  224|   178k|  mem = Curl_cmalloc(size);
  225|   178k|  if(mem) {
  ------------------
  |  Branch (225:6): [True: 178k, False: 0]
  ------------------
  226|   178k|    mem->size = wantedsize;
  227|   178k|  }
  228|       |
  229|   178k|  if(source)
  ------------------
  |  Branch (229:6): [True: 121k, False: 57.4k]
  ------------------
  230|   121k|    curl_dbg_log("MEM %s:%d malloc(%zu) = %p\n",
  231|   121k|                 source, line, wantedsize,
  232|   121k|                 mem ? (void *)mem->mem : (void *)0);
  ------------------
  |  Branch (232:18): [True: 121k, False: 0]
  ------------------
  233|       |
  234|   178k|  return mem ? mem->mem : NULL;
  ------------------
  |  Branch (234:10): [True: 178k, False: 0]
  ------------------
  235|   178k|}
curl_dbg_calloc:
  240|   177k|{
  241|   177k|  struct memdebug *mem;
  242|   177k|  size_t size, user_size;
  243|       |
  244|   177k|  DEBUGASSERT(wanted_elements != 0);
  ------------------
  |  | 1075|   177k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (244:3): [True: 0, False: 177k]
  |  Branch (244:3): [True: 177k, False: 0]
  ------------------
  245|   177k|  DEBUGASSERT(wanted_size != 0);
  ------------------
  |  | 1075|   177k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (245:3): [True: 0, False: 177k]
  |  Branch (245:3): [True: 177k, False: 0]
  ------------------
  246|       |
  247|   177k|  if(countcheck("calloc", line, source))
  ------------------
  |  Branch (247:6): [True: 0, False: 177k]
  ------------------
  248|      0|    return NULL;
  249|       |
  250|       |  /* alloc at least 64 bytes */
  251|   177k|  user_size = wanted_size * wanted_elements;
  252|   177k|  size = sizeof(struct memdebug) + user_size;
  253|       |
  254|   177k|  mem = Curl_ccalloc(1, size);
  255|   177k|  if(mem)
  ------------------
  |  Branch (255:6): [True: 177k, False: 0]
  ------------------
  256|   177k|    mem->size = user_size;
  257|       |
  258|   177k|  if(source)
  ------------------
  |  Branch (258:6): [True: 177k, False: 0]
  ------------------
  259|   177k|    curl_dbg_log("MEM %s:%d calloc(%zu,%zu) = %p\n",
  260|   177k|                 source, line, wanted_elements, wanted_size,
  261|   177k|                 mem ? (void *)mem->mem : (void *)0);
  ------------------
  |  Branch (261:18): [True: 177k, False: 0]
  ------------------
  262|       |
  263|   177k|  return mem ? mem->mem : NULL;
  ------------------
  |  Branch (263:10): [True: 177k, False: 0]
  ------------------
  264|   177k|}
curl_dbg_strdup:
  268|  57.4k|{
  269|  57.4k|  char *mem;
  270|  57.4k|  size_t len;
  271|       |
  272|  57.4k|  DEBUGASSERT(str);
  ------------------
  |  | 1075|  57.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (272:3): [True: 0, False: 57.4k]
  |  Branch (272:3): [True: 57.4k, False: 0]
  ------------------
  273|       |
  274|  57.4k|  if(countcheck("strdup", line, source))
  ------------------
  |  Branch (274:6): [True: 0, False: 57.4k]
  ------------------
  275|      0|    return NULL;
  276|       |
  277|  57.4k|  len = strlen(str) + 1;
  278|       |
  279|  57.4k|  mem = curl_dbg_malloc(len, 0, NULL); /* NULL prevents logging */
  280|  57.4k|  if(mem)
  ------------------
  |  Branch (280:6): [True: 57.4k, False: 0]
  ------------------
  281|  57.4k|    memcpy(mem, str, len);
  282|       |
  283|  57.4k|  if(source)
  ------------------
  |  Branch (283:6): [True: 57.4k, False: 0]
  ------------------
  284|  57.4k|    curl_dbg_log("MEM %s:%d strdup(%p) (%zu) = %p\n",
  285|  57.4k|                 source, line, (const void *)str, len, (const void *)mem);
  286|       |
  287|  57.4k|  return mem;
  288|  57.4k|}
curl_dbg_realloc:
  321|  73.7k|{
  322|  73.7k|  struct memdebug *mem = NULL;
  323|  73.7k|  bool was_locked;
  324|       |
  325|  73.7k|  size_t size = sizeof(struct memdebug) + wantedsize;
  326|       |
  327|  73.7k|  DEBUGASSERT(wantedsize != 0);
  ------------------
  |  | 1075|  73.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (327:3): [True: 0, False: 73.7k]
  |  Branch (327:3): [True: 73.7k, False: 0]
  ------------------
  328|       |
  329|  73.7k|  if(countcheck("realloc", line, source))
  ------------------
  |  Branch (329:6): [True: 0, False: 73.7k]
  ------------------
  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|  73.7k|  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|  73.7k|  if(ptr)
  ------------------
  |  Branch (342:6): [True: 26.4k, False: 47.2k]
  ------------------
  343|  26.4k|    mem = (void *)((char *)ptr - offsetof(struct memdebug, mem));
  344|       |
  345|       |#ifdef __INTEL_COMPILER
  346|       |#  pragma warning(pop)
  347|       |#endif
  348|       |
  349|  73.7k|  mem = Curl_crealloc(mem, size);
  350|  73.7k|  if(source)
  ------------------
  |  Branch (350:6): [True: 73.7k, False: 0]
  ------------------
  351|  73.7k|    curl_dbg_log_locked("MEM %s:%d realloc(%p, %zu) = %p\n",
  352|  73.7k|                        source, line, (void *)ptr, wantedsize,
  353|  73.7k|                        mem ? (void *)mem->mem : (void *)0);
  ------------------
  |  Branch (353:25): [True: 73.7k, False: 0]
  ------------------
  354|       |
  355|  73.7k|  curl_dbg_unlock(was_locked);
  356|  73.7k|  if(mem) {
  ------------------
  |  Branch (356:6): [True: 73.7k, False: 0]
  ------------------
  357|  73.7k|    mem->size = wantedsize;
  358|  73.7k|    return mem->mem;
  359|  73.7k|  }
  360|       |
  361|      0|  return NULL;
  362|  73.7k|}
curl_dbg_free:
  365|  1.48M|{
  366|  1.48M|  if(ptr) {
  ------------------
  |  Branch (366:6): [True: 403k, False: 1.07M]
  ------------------
  367|   403k|    struct memdebug *mem;
  368|       |
  369|   403k|    if(source)
  ------------------
  |  Branch (369:8): [True: 403k, False: 0]
  ------------------
  370|   403k|      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|   403k|    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|   403k|    Curl_cfree(mem);
  386|   403k|  }
  387|  1.48M|}
curl_dbg_socket:
  391|  3.73k|{
  392|  3.73k|  curl_socket_t sockfd;
  393|       |
  394|  3.73k|  if(countcheck("socket", line, source))
  ------------------
  |  Branch (394:6): [True: 0, False: 3.73k]
  ------------------
  395|      0|    return CURL_SOCKET_BAD;
  ------------------
  |  |  147|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  396|       |
  397|       |  /* !checksrc! disable BANNEDFUNC 1 */
  398|  3.73k|  sockfd = socket(domain, type, protocol);
  399|       |
  400|  3.73k|  if(source && (sockfd != CURL_SOCKET_BAD))
  ------------------
  |  |  147|  3.73k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (400:6): [True: 3.73k, False: 0]
  |  Branch (400:16): [True: 3.73k, False: 0]
  ------------------
  401|  3.73k|    curl_dbg_log("FD %s:%d socket() = %" FMT_SOCKET_T "\n",
  402|  3.73k|                 source, line, sockfd);
  403|       |
  404|  3.73k|  return sockfd;
  405|  3.73k|}
curl_dbg_mark_sclose:
  461|  7.36k|{
  462|  7.36k|  if(source)
  ------------------
  |  Branch (462:6): [True: 7.36k, False: 0]
  ------------------
  463|  7.36k|    curl_dbg_log("FD %s:%d sclose(%" FMT_SOCKET_T ")\n",
  464|  7.36k|                 source, line, sockfd);
  465|  7.36k|}
curl_dbg_sclose:
  469|  7.36k|{
  470|  7.36k|  curl_dbg_mark_sclose(sockfd, line, source);
  471|  7.36k|  return CURL_SCLOSE(sockfd);
  ------------------
  |  |  989|  7.36k|#  define CURL_SCLOSE(x)  close(x)
  ------------------
  472|  7.36k|}
curl_dbg_fopen:
  477|  22.3k|{
  478|  22.3k|  FILE *res = CURLX_FOPEN_LOW(file, mode);
  ------------------
  |  |   66|  22.3k|#define CURLX_FOPEN_LOW         fopen
  ------------------
  479|  22.3k|  if(source)
  ------------------
  |  Branch (479:6): [True: 22.3k, False: 0]
  ------------------
  480|  22.3k|    curl_dbg_log("FILE %s:%d fopen(\"%s\",\"%s\") = %p\n",
  481|  22.3k|                 source, line, file, mode, (void *)res);
  482|       |
  483|  22.3k|  return res;
  484|  22.3k|}
curl_dbg_fclose:
  510|  22.3k|{
  511|  22.3k|  int res;
  512|       |
  513|  22.3k|  DEBUGASSERT(file);
  ------------------
  |  | 1075|  22.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (513:3): [True: 0, False: 22.3k]
  |  Branch (513:3): [True: 22.3k, False: 0]
  ------------------
  514|       |
  515|  22.3k|  if(source)
  ------------------
  |  Branch (515:6): [True: 22.3k, False: 0]
  ------------------
  516|  22.3k|    curl_dbg_log("FILE %s:%d fclose(%p)\n", source, line, (void *)file);
  517|       |
  518|       |  /* !checksrc! disable BANNEDFUNC 1 */
  519|  22.3k|  res = fclose(file);
  520|       |
  521|  22.3k|  return res;
  522|  22.3k|}
curl_dbg_log:
  565|   815k|{
  566|   815k|  bool was_locked;
  567|   815k|  va_list ap;
  568|       |
  569|   815k|  if(!curl_dbg_logfile)
  ------------------
  |  Branch (569:6): [True: 815k, False: 0]
  ------------------
  570|   815k|    return;
  571|       |
  572|      0|  was_locked = curl_dbg_lock();
  573|      0|  va_start(ap, format);
  574|      0|  curl_dbg_vlog(format, ap);
  575|       |  va_end(ap);
  576|      0|  curl_dbg_unlock(was_locked);
  577|      0|}
memdebug.c:countcheck:
  187|   491k|{
  188|       |  /* if source is NULL, then the call is made internally and this check
  189|       |     should not be made */
  190|   491k|  if(memlimit && source) {
  ------------------
  |  Branch (190:6): [True: 0, False: 491k]
  |  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! */
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  202|      0|    }
  203|      0|    else
  204|      0|      memsize--; /* countdown */
  205|      0|  }
  206|       |
  207|   491k|  return FALSE; /* allow this */
  ------------------
  |  | 1048|   491k|#define FALSE false
  ------------------
  208|   491k|}
memdebug.c:curl_dbg_lock:
   74|  73.7k|{
   75|  73.7k|#ifdef USE_MUTEX
   76|  73.7k|  if(dbg_mutex_init) {
  ------------------
  |  Branch (76:6): [True: 0, False: 73.7k]
  ------------------
   77|      0|    Curl_mutex_acquire(&dbg_mutex);
  ------------------
  |  |   51|      0|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
   78|      0|    return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
   79|      0|  }
   80|  73.7k|#endif
   81|  73.7k|  return FALSE;
  ------------------
  |  | 1048|  73.7k|#define FALSE false
  ------------------
   82|  73.7k|}
memdebug.c:curl_dbg_unlock:
   85|  73.7k|{
   86|  73.7k|#ifdef USE_MUTEX
   87|  73.7k|  if(was_locked)
  ------------------
  |  Branch (87:6): [True: 0, False: 73.7k]
  ------------------
   88|      0|    Curl_mutex_release(&dbg_mutex);
  ------------------
  |  |   52|      0|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
   89|       |#else
   90|       |  (void)was_locked;
   91|       |#endif
   92|  73.7k|}
memdebug.c:curl_dbg_log_locked:
  552|  73.7k|{
  553|  73.7k|  va_list ap;
  554|       |
  555|  73.7k|  if(!curl_dbg_logfile)
  ------------------
  |  Branch (555:6): [True: 73.7k, False: 0]
  ------------------
  556|  73.7k|    return;
  557|       |
  558|  73.7k|  va_start(ap, format);
  559|      0|  curl_dbg_vlog(format, ap);
  560|       |  va_end(ap);
  561|      0|}

Curl_mime_cleanpart:
 1099|  19.5k|{
 1100|  19.5k|  if(part) {
  ------------------
  |  Branch (1100:6): [True: 4.00k, False: 15.5k]
  ------------------
 1101|  4.00k|    cleanup_part_content(part);
 1102|  4.00k|    curl_slist_free_all(part->curlheaders);
 1103|  4.00k|    if(part->flags & MIME_USERHEADERS_OWNER)
  ------------------
  |  |   34|  4.00k|#define MIME_USERHEADERS_OWNER  (1 << 0)
  ------------------
  |  Branch (1103:8): [True: 1.24k, False: 2.75k]
  ------------------
 1104|  1.24k|      curl_slist_free_all(part->userheaders);
 1105|  4.00k|    curlx_safefree(part->mimetype);
  ------------------
  |  | 1332|  4.00k|  do {                      \
  |  | 1333|  4.00k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  4.00k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  4.00k|    (ptr) = NULL;           \
  |  | 1335|  4.00k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
 1106|  4.00k|    curlx_safefree(part->name);
  ------------------
  |  | 1332|  4.00k|  do {                      \
  |  | 1333|  4.00k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  4.00k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  4.00k|    (ptr) = NULL;           \
  |  | 1335|  4.00k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
 1107|       |    curlx_safefree(part->filename);
  ------------------
  |  | 1332|  4.00k|  do {                      \
  |  | 1333|  4.00k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  4.00k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  4.00k|    (ptr) = NULL;           \
  |  | 1335|  4.00k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 4.00k]
  |  |  ------------------
  ------------------
 1108|  4.00k|    Curl_mime_initpart(part);
 1109|  4.00k|  }
 1110|  19.5k|}
curl_mime_free:
 1114|  4.50k|{
 1115|  4.50k|  curl_mimepart *part;
 1116|       |
 1117|  4.50k|  if(mime) {
  ------------------
  |  Branch (1117:6): [True: 1.41k, False: 3.09k]
  ------------------
 1118|  1.41k|    mime_subparts_unbind(mime);  /* Be sure it is not referenced anymore. */
 1119|  4.77k|    while(mime->firstpart) {
  ------------------
  |  Branch (1119:11): [True: 3.36k, False: 1.41k]
  ------------------
 1120|  3.36k|      part = mime->firstpart;
 1121|  3.36k|      mime->firstpart = part->nextpart;
 1122|  3.36k|      Curl_mime_cleanpart(part);
 1123|  3.36k|      curlx_free(part);
  ------------------
  |  | 1476|  3.36k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1124|  3.36k|    }
 1125|  1.41k|    curlx_free(mime);
  ------------------
  |  | 1476|  1.41k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1126|  1.41k|  }
 1127|  4.50k|}
curl_mime_init:
 1213|  1.41k|{
 1214|  1.41k|  curl_mime *mime = curlx_malloc(sizeof(*mime));
  ------------------
  |  | 1471|  1.41k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
 1215|       |
 1216|  1.41k|  if(mime) {
  ------------------
  |  Branch (1216:6): [True: 1.41k, False: 0]
  ------------------
 1217|  1.41k|    mime->parent = NULL;
 1218|  1.41k|    mime->firstpart = NULL;
 1219|  1.41k|    mime->lastpart = NULL;
 1220|       |
 1221|  1.41k|    memset(mime->boundary, '-', MIME_BOUNDARY_DASHES);
  ------------------
  |  |   28|  1.41k|#define MIME_BOUNDARY_DASHES            24  /* leading boundary dashes */
  ------------------
 1222|  1.41k|    if(Curl_rand_alnum(easy,
  ------------------
  |  Branch (1222:8): [True: 0, False: 1.41k]
  ------------------
 1223|  1.41k|                       (unsigned char *)&mime->boundary[MIME_BOUNDARY_DASHES],
  ------------------
  |  |   28|  1.41k|#define MIME_BOUNDARY_DASHES            24  /* leading boundary dashes */
  ------------------
 1224|  1.41k|                       MIME_RAND_BOUNDARY_CHARS + 1)) {
  ------------------
  |  |   29|  1.41k|#define MIME_RAND_BOUNDARY_CHARS        22  /* Nb. of random boundary chars. */
  ------------------
 1225|       |      /* failed to get random separator, bail out */
 1226|      0|      curlx_free(mime);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1227|      0|      return NULL;
 1228|      0|    }
 1229|  1.41k|    mimesetstate(&mime->state, MIMESTATE_BEGIN, NULL);
 1230|  1.41k|  }
 1231|       |
 1232|  1.41k|  return mime;
 1233|  1.41k|}
Curl_mime_initpart:
 1237|  8.00k|{
 1238|  8.00k|  memset(part, 0, sizeof(*part));
 1239|  8.00k|  part->lastreadstatus = 1; /* Successful read status. */
 1240|       |  mimesetstate(&part->state, MIMESTATE_BEGIN, NULL);
 1241|  8.00k|}
curl_mime_addpart:
 1245|  3.36k|{
 1246|  3.36k|  curl_mimepart *part;
 1247|       |
 1248|  3.36k|  if(!mime)
  ------------------
  |  Branch (1248:6): [True: 0, False: 3.36k]
  ------------------
 1249|      0|    return NULL;
 1250|       |
 1251|  3.36k|  part = curlx_malloc(sizeof(*part));
  ------------------
  |  | 1471|  3.36k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
 1252|       |
 1253|  3.36k|  if(part) {
  ------------------
  |  Branch (1253:6): [True: 3.36k, False: 0]
  ------------------
 1254|  3.36k|    Curl_mime_initpart(part);
 1255|  3.36k|    part->parent = mime;
 1256|       |
 1257|  3.36k|    if(mime->lastpart)
  ------------------
  |  Branch (1257:8): [True: 2.27k, False: 1.09k]
  ------------------
 1258|  2.27k|      mime->lastpart->nextpart = part;
 1259|  1.09k|    else
 1260|  1.09k|      mime->firstpart = part;
 1261|       |
 1262|  3.36k|    mime->lastpart = part;
 1263|  3.36k|  }
 1264|       |
 1265|  3.36k|  return part;
 1266|  3.36k|}
curl_mime_name:
 1270|  1.19k|{
 1271|  1.19k|  if(!part)
  ------------------
  |  Branch (1271:6): [True: 0, False: 1.19k]
  ------------------
 1272|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1273|       |
 1274|  1.19k|  curlx_safefree(part->name);
  ------------------
  |  | 1332|  1.19k|  do {                      \
  |  | 1333|  1.19k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  1.19k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  1.19k|    (ptr) = NULL;           \
  |  | 1335|  1.19k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 1.19k]
  |  |  ------------------
  ------------------
 1275|       |
 1276|  1.19k|  if(name) {
  ------------------
  |  Branch (1276:6): [True: 1.19k, False: 0]
  ------------------
 1277|  1.19k|    part->name = curlx_strdup(name);
  ------------------
  |  | 1470|  1.19k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1278|  1.19k|    if(!part->name)
  ------------------
  |  Branch (1278:8): [True: 0, False: 1.19k]
  ------------------
 1279|      0|      return CURLE_OUT_OF_MEMORY;
 1280|  1.19k|  }
 1281|       |
 1282|  1.19k|  return CURLE_OK;
 1283|  1.19k|}
curl_mime_filename:
 1287|  1.06k|{
 1288|  1.06k|  if(!part)
  ------------------
  |  Branch (1288:6): [True: 0, False: 1.06k]
  ------------------
 1289|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1290|       |
 1291|  1.06k|  curlx_safefree(part->filename);
  ------------------
  |  | 1332|  1.06k|  do {                      \
  |  | 1333|  1.06k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  1.06k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  1.06k|    (ptr) = NULL;           \
  |  | 1335|  1.06k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 1.06k]
  |  |  ------------------
  ------------------
 1292|       |
 1293|  1.06k|  if(filename) {
  ------------------
  |  Branch (1293:6): [True: 1.06k, False: 0]
  ------------------
 1294|  1.06k|    part->filename = curlx_strdup(filename);
  ------------------
  |  | 1470|  1.06k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1295|  1.06k|    if(!part->filename)
  ------------------
  |  Branch (1295:8): [True: 0, False: 1.06k]
  ------------------
 1296|      0|      return CURLE_OUT_OF_MEMORY;
 1297|  1.06k|  }
 1298|       |
 1299|  1.06k|  return CURLE_OK;
 1300|  1.06k|}
curl_mime_data:
 1304|  1.99k|{
 1305|  1.99k|  if(!part)
  ------------------
  |  Branch (1305:6): [True: 0, False: 1.99k]
  ------------------
 1306|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1307|       |
 1308|  1.99k|  cleanup_part_content(part);
 1309|       |
 1310|  1.99k|  if(data) {
  ------------------
  |  Branch (1310:6): [True: 1.99k, False: 0]
  ------------------
 1311|  1.99k|    if(datasize == CURL_ZERO_TERMINATED)
  ------------------
  |  | 2449|  1.99k|#define CURL_ZERO_TERMINATED ((size_t)-1)
  ------------------
  |  Branch (1311:8): [True: 0, False: 1.99k]
  ------------------
 1312|      0|      datasize = strlen(data);
 1313|       |
 1314|  1.99k|    part->data = curlx_memdup0(data, datasize);
 1315|  1.99k|    if(!part->data)
  ------------------
  |  Branch (1315:8): [True: 0, False: 1.99k]
  ------------------
 1316|      0|      return CURLE_OUT_OF_MEMORY;
 1317|       |
 1318|  1.99k|    part->datasize = datasize;
 1319|  1.99k|    part->readfunc = mime_mem_read;
 1320|  1.99k|    part->seekfunc = mime_mem_seek;
 1321|  1.99k|    part->freefunc = mime_mem_free;
 1322|  1.99k|    part->flags |= MIME_FAST_READ;
  ------------------
  |  |   36|  1.99k|#define MIME_FAST_READ          (1 << 2)
  ------------------
 1323|  1.99k|    part->kind = MIMEKIND_DATA;
 1324|  1.99k|  }
 1325|       |
 1326|  1.99k|  return CURLE_OK;
 1327|  1.99k|}
curl_mime_type:
 1379|  1.17k|{
 1380|  1.17k|  if(!part)
  ------------------
  |  Branch (1380:6): [True: 0, False: 1.17k]
  ------------------
 1381|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1382|       |
 1383|  1.17k|  curlx_safefree(part->mimetype);
  ------------------
  |  | 1332|  1.17k|  do {                      \
  |  | 1333|  1.17k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  1.17k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  1.17k|    (ptr) = NULL;           \
  |  | 1335|  1.17k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 1.17k]
  |  |  ------------------
  ------------------
 1384|       |
 1385|  1.17k|  if(mimetype) {
  ------------------
  |  Branch (1385:6): [True: 1.17k, False: 0]
  ------------------
 1386|  1.17k|    part->mimetype = curlx_strdup(mimetype);
  ------------------
  |  | 1470|  1.17k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1387|  1.17k|    if(!part->mimetype)
  ------------------
  |  Branch (1387:8): [True: 0, False: 1.17k]
  ------------------
 1388|      0|      return CURLE_OUT_OF_MEMORY;
 1389|  1.17k|  }
 1390|       |
 1391|  1.17k|  return CURLE_OK;
 1392|  1.17k|}
curl_mime_encoder:
 1405|  1.40k|{
 1406|  1.40k|  CURLcode result = CURLE_BAD_FUNCTION_ARGUMENT;
 1407|  1.40k|  const struct mime_encoder *mep;
 1408|       |
 1409|  1.40k|  if(!part)
  ------------------
  |  Branch (1409:6): [True: 0, False: 1.40k]
  ------------------
 1410|      0|    return result;
 1411|       |
 1412|  1.40k|  part->encoder = NULL;
 1413|       |
 1414|  1.40k|  if(!encoding)
  ------------------
  |  Branch (1414:6): [True: 0, False: 1.40k]
  ------------------
 1415|      0|    return CURLE_OK;    /* Removing current encoder. */
 1416|       |
 1417|  8.45k|  for(mep = encoders; mep->name; mep++)
  ------------------
  |  Branch (1417:23): [True: 7.04k, False: 1.40k]
  ------------------
 1418|  7.04k|    if(curl_strequal(encoding, mep->name)) {
  ------------------
  |  Branch (1418:8): [True: 1.40k, False: 5.63k]
  ------------------
 1419|  1.40k|      part->encoder = mep;
 1420|  1.40k|      result = CURLE_OK;
 1421|  1.40k|    }
 1422|       |
 1423|  1.40k|  return result;
 1424|  1.40k|}
curl_mime_headers:
 1429|  2.46k|{
 1430|  2.46k|  if(!part)
  ------------------
  |  Branch (1430:6): [True: 0, False: 2.46k]
  ------------------
 1431|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1432|       |
 1433|  2.46k|  if(part->flags & MIME_USERHEADERS_OWNER) {
  ------------------
  |  |   34|  2.46k|#define MIME_USERHEADERS_OWNER  (1 << 0)
  ------------------
  |  Branch (1433:6): [True: 0, False: 2.46k]
  ------------------
 1434|      0|    if(part->userheaders != headers)  /* Allow setting twice the same list. */
  ------------------
  |  Branch (1434:8): [True: 0, False: 0]
  ------------------
 1435|      0|      curl_slist_free_all(part->userheaders);
 1436|      0|    part->flags &= ~(unsigned int)MIME_USERHEADERS_OWNER;
  ------------------
  |  |   34|      0|#define MIME_USERHEADERS_OWNER  (1 << 0)
  ------------------
 1437|      0|  }
 1438|  2.46k|  part->userheaders = headers;
 1439|  2.46k|  if(headers && take_ownership)
  ------------------
  |  Branch (1439:6): [True: 1.48k, False: 977]
  |  Branch (1439:17): [True: 1.24k, False: 239]
  ------------------
 1440|  1.24k|    part->flags |= MIME_USERHEADERS_OWNER;
  ------------------
  |  |   34|  1.24k|#define MIME_USERHEADERS_OWNER  (1 << 0)
  ------------------
 1441|  2.46k|  return CURLE_OK;
 1442|  2.46k|}
Curl_mime_set_subparts:
 1470|  2.04k|{
 1471|  2.04k|  curl_mime *root;
 1472|       |
 1473|  2.04k|  if(!part)
  ------------------
  |  Branch (1473:6): [True: 0, False: 2.04k]
  ------------------
 1474|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1475|       |
 1476|       |  /* Accept setting twice the same subparts. */
 1477|  2.04k|  if(part->kind == MIMEKIND_MULTIPART && part->arg == subparts)
  ------------------
  |  Branch (1477:6): [True: 638, False: 1.41k]
  |  Branch (1477:42): [True: 0, False: 638]
  ------------------
 1478|      0|    return CURLE_OK;
 1479|       |
 1480|  2.04k|  cleanup_part_content(part);
 1481|       |
 1482|  2.04k|  if(subparts) {
  ------------------
  |  Branch (1482:6): [True: 1.41k, False: 638]
  ------------------
 1483|       |    /* Should not have been attached already. */
 1484|  1.41k|    if(subparts->parent)
  ------------------
  |  Branch (1484:8): [True: 0, False: 1.41k]
  ------------------
 1485|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1486|       |
 1487|       |    /* Should not be the part's root. */
 1488|  1.41k|    root = part->parent;
 1489|  1.41k|    if(root) {
  ------------------
  |  Branch (1489:8): [True: 772, False: 638]
  ------------------
 1490|    772|      while(root->parent && root->parent->parent)
  ------------------
  |  Branch (1490:13): [True: 0, False: 772]
  |  Branch (1490:29): [True: 0, False: 0]
  ------------------
 1491|      0|        root = root->parent->parent;
 1492|    772|      if(subparts == root) {
  ------------------
  |  Branch (1492:10): [True: 0, False: 772]
  ------------------
 1493|       |        /* cannot add as a subpart of itself. */
 1494|      0|        return CURLE_BAD_FUNCTION_ARGUMENT;
 1495|      0|      }
 1496|    772|    }
 1497|       |
 1498|       |    /* If subparts have already been used as a top-level MIMEPOST,
 1499|       |       they might not be positioned at start. Rewind them now, as
 1500|       |       a future check while rewinding the parent may cause this
 1501|       |       content to be skipped. */
 1502|  1.41k|    if(mime_subparts_seek(subparts, (curl_off_t)0, SEEK_SET) !=
  ------------------
  |  Branch (1502:8): [True: 0, False: 1.41k]
  ------------------
 1503|  1.41k|       CURL_SEEKFUNC_OK)
  ------------------
  |  |  382|  1.41k|#define CURL_SEEKFUNC_OK       0
  ------------------
 1504|      0|      return CURLE_SEND_FAIL_REWIND;
 1505|       |
 1506|  1.41k|    subparts->parent = part;
 1507|       |    /* Subparts are processed internally: no read callback. */
 1508|  1.41k|    part->seekfunc = mime_subparts_seek;
 1509|  1.41k|    part->freefunc = take_ownership ? mime_subparts_free :
  ------------------
  |  Branch (1509:22): [True: 772, False: 638]
  ------------------
 1510|  1.41k|      mime_subparts_unbind;
 1511|  1.41k|    part->arg = subparts;
 1512|  1.41k|    part->datasize = -1;
 1513|  1.41k|    part->kind = MIMEKIND_MULTIPART;
 1514|  1.41k|  }
 1515|       |
 1516|  2.04k|  return CURLE_OK;
 1517|  2.04k|}
curl_mime_subparts:
 1520|    772|{
 1521|       |  return Curl_mime_set_subparts(part, subparts, TRUE);
  ------------------
  |  | 1045|    772|#define TRUE true
  ------------------
 1522|    772|}
Curl_mime_read:
 1527|    554|{
 1528|    554|  curl_mimepart *part = (curl_mimepart *)instream;
 1529|    554|  size_t ret;
 1530|    554|  bool hasread;
 1531|       |
 1532|    554|  (void)size;  /* Always 1 */
 1533|       |
 1534|       |  /* If `nitems` is <= 4, some encoders will return STOP_FILLING without
 1535|       |   * adding any data and this loops infinitely. */
 1536|    554|  do {
 1537|    554|    hasread = FALSE;
  ------------------
  |  | 1048|    554|#define FALSE false
  ------------------
 1538|    554|    ret = readback_part(part, buffer, nitems, &hasread, 0);
 1539|       |    /*
 1540|       |     * If this is not possible to get some data without calling more than
 1541|       |     * one read callback (probably because a content encoder is not able to
 1542|       |     * deliver a new bunch for the few data accumulated so far), force another
 1543|       |     * read until we get enough data or a special exit code.
 1544|       |     */
 1545|    554|  } while(ret == STOP_FILLING);
  ------------------
  |  |   50|    554|#define STOP_FILLING ((size_t)-2)
  ------------------
  |  Branch (1545:11): [True: 0, False: 554]
  ------------------
 1546|       |
 1547|    554|  return ret;
 1548|    554|}
Curl_mime_add_header:
 1620|  5.98k|{
 1621|  5.98k|  struct curl_slist *hdr = NULL;
 1622|  5.98k|  char *s = NULL;
 1623|  5.98k|  va_list ap;
 1624|       |
 1625|  5.98k|  va_start(ap, fmt);
 1626|  5.98k|  s = curl_mvaprintf(fmt, ap);
 1627|  5.98k|  va_end(ap);
 1628|       |
 1629|  5.98k|  if(s) {
  ------------------
  |  Branch (1629:6): [True: 5.98k, False: 0]
  ------------------
 1630|  5.98k|    hdr = Curl_slist_append_nodup(*slp, s);
 1631|  5.98k|    if(hdr)
  ------------------
  |  Branch (1631:8): [True: 5.98k, False: 0]
  ------------------
 1632|  5.98k|      *slp = hdr;
 1633|      0|    else
 1634|      0|      curlx_free(s);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1635|  5.98k|  }
 1636|       |
 1637|  5.98k|  return hdr ? CURLE_OK : CURLE_OUT_OF_MEMORY;
  ------------------
  |  Branch (1637:10): [True: 5.98k, False: 0]
  ------------------
 1638|  5.98k|}
Curl_mime_contenttype:
 1650|  1.66k|{
 1651|       |  /*
 1652|       |   * If no content type was specified, we scan through a few well-known
 1653|       |   * extensions and pick the first we match!
 1654|       |   */
 1655|  1.66k|  struct ContentType {
 1656|  1.66k|    const char *extension;
 1657|  1.66k|    const char *type;
 1658|  1.66k|  };
 1659|  1.66k|  static const struct ContentType ctts[] = {
 1660|  1.66k|    { ".gif",  "image/gif" },
 1661|  1.66k|    { ".jpg",  "image/jpeg" },
 1662|  1.66k|    { ".jpeg", "image/jpeg" },
 1663|  1.66k|    { ".png",  "image/png" },
 1664|  1.66k|    { ".svg",  "image/svg+xml" },
 1665|  1.66k|    { ".txt",  "text/plain" },
 1666|  1.66k|    { ".htm",  "text/html" },
 1667|  1.66k|    { ".html", "text/html" },
 1668|  1.66k|    { ".pdf",  "application/pdf" },
 1669|  1.66k|    { ".xml",  "application/xml" }
 1670|  1.66k|  };
 1671|       |
 1672|  1.66k|  if(filename) {
  ------------------
  |  Branch (1672:6): [True: 390, False: 1.27k]
  ------------------
 1673|    390|    size_t len1 = strlen(filename);
 1674|    390|    const char *nameend = filename + len1;
 1675|    390|    unsigned int i;
 1676|       |
 1677|  4.27k|    for(i = 0; i < CURL_ARRAYSIZE(ctts); i++) {
  ------------------
  |  | 1299|  4.27k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (1677:16): [True: 3.89k, False: 386]
  ------------------
 1678|  3.89k|      size_t len2 = strlen(ctts[i].extension);
 1679|       |
 1680|  3.89k|      if(len1 >= len2 && curl_strequal(nameend - len2, ctts[i].extension))
  ------------------
  |  Branch (1680:10): [True: 1.72k, False: 2.16k]
  |  Branch (1680:26): [True: 4, False: 1.72k]
  ------------------
 1681|      4|        return ctts[i].type;
 1682|  3.89k|    }
 1683|    390|  }
 1684|  1.65k|  return NULL;
 1685|  1.66k|}
Curl_mime_prepare_headers:
 1764|  3.89k|{
 1765|  3.89k|  curl_mime *mime = NULL;
 1766|  3.89k|  const char *boundary = NULL;
 1767|  3.89k|  char *customct;
 1768|  3.89k|  const char *cte = NULL;
 1769|  3.89k|  CURLcode result = CURLE_OK;
 1770|       |
 1771|       |  /* Get rid of previously prepared headers. */
 1772|  3.89k|  curl_slist_free_all(part->curlheaders);
 1773|  3.89k|  part->curlheaders = NULL;
 1774|       |
 1775|       |  /* Be sure we will not access old headers later. */
 1776|  3.89k|  if(part->state.state == MIMESTATE_CURLHEADERS)
  ------------------
  |  Branch (1776:6): [True: 0, False: 3.89k]
  ------------------
 1777|      0|    mimesetstate(&part->state, MIMESTATE_CURLHEADERS, NULL);
 1778|       |
 1779|       |  /* Check if content type is specified. */
 1780|  3.89k|  customct = part->mimetype;
 1781|  3.89k|  if(!customct)
  ------------------
  |  Branch (1781:6): [True: 2.76k, False: 1.13k]
  ------------------
 1782|  2.76k|    customct = search_header(part->userheaders, STRCONST("Content-Type"));
  ------------------
  |  | 1297|  2.76k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|  2.76k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 1783|  3.89k|  if(customct)
  ------------------
  |  Branch (1783:6): [True: 1.13k, False: 2.76k]
  ------------------
 1784|  1.13k|    contenttype = customct;
 1785|       |
 1786|       |  /* If content type is not specified, try to determine it. */
 1787|  3.89k|  if(!contenttype) {
  ------------------
  |  Branch (1787:6): [True: 2.15k, False: 1.73k]
  ------------------
 1788|  2.15k|    switch(part->kind) {
 1789|    495|    case MIMEKIND_MULTIPART:
  ------------------
  |  Branch (1789:5): [True: 495, False: 1.66k]
  ------------------
 1790|    495|      contenttype = MULTIPART_CONTENTTYPE_DEFAULT;
  ------------------
  |  |   39|    495|#define MULTIPART_CONTENTTYPE_DEFAULT   "multipart/mixed"
  ------------------
 1791|    495|      break;
 1792|      0|    case MIMEKIND_FILE:
  ------------------
  |  Branch (1792:5): [True: 0, False: 2.15k]
  ------------------
 1793|      0|      contenttype = Curl_mime_contenttype(part->filename);
 1794|      0|      if(!contenttype)
  ------------------
  |  Branch (1794:10): [True: 0, False: 0]
  ------------------
 1795|      0|        contenttype = Curl_mime_contenttype(part->data);
 1796|      0|      if(!contenttype && part->filename)
  ------------------
  |  Branch (1796:10): [True: 0, False: 0]
  |  Branch (1796:26): [True: 0, False: 0]
  ------------------
 1797|      0|        contenttype = FILE_CONTENTTYPE_DEFAULT;
  ------------------
  |  |   38|      0|#define FILE_CONTENTTYPE_DEFAULT        "application/octet-stream"
  ------------------
 1798|      0|      break;
 1799|  1.66k|    default:
  ------------------
  |  Branch (1799:5): [True: 1.66k, False: 495]
  ------------------
 1800|  1.66k|      contenttype = Curl_mime_contenttype(part->filename);
 1801|  1.66k|      break;
 1802|  2.15k|    }
 1803|  2.15k|  }
 1804|       |
 1805|  3.89k|  if(part->kind == MIMEKIND_MULTIPART) {
  ------------------
  |  Branch (1805:6): [True: 1.36k, False: 2.53k]
  ------------------
 1806|  1.36k|    mime = (curl_mime *)part->arg;
 1807|  1.36k|    if(mime)
  ------------------
  |  Branch (1807:8): [True: 1.36k, False: 0]
  ------------------
 1808|  1.36k|      boundary = mime->boundary;
 1809|  1.36k|  }
 1810|  2.53k|  else if(contenttype && !customct &&
  ------------------
  |  Branch (1810:11): [True: 874, False: 1.65k]
  |  Branch (1810:26): [True: 4, False: 870]
  ------------------
 1811|      4|          content_type_match(contenttype, STRCONST("text/plain")))
  ------------------
  |  | 1297|      4|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      4|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (1811:11): [True: 0, False: 4]
  ------------------
 1812|      0|    if(strategy == MIMESTRATEGY_MAIL || !part->filename)
  ------------------
  |  Branch (1812:8): [True: 0, False: 0]
  |  Branch (1812:41): [True: 0, False: 0]
  ------------------
 1813|      0|      contenttype = NULL;
 1814|       |
 1815|       |  /* Issue content-disposition header only if not already set by caller. */
 1816|  3.89k|  if(!search_header(part->userheaders, STRCONST("Content-Disposition"))) {
  ------------------
  |  | 1297|  3.89k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|  3.89k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (1816:6): [True: 3.84k, False: 53]
  ------------------
 1817|  3.84k|    result = add_content_disposition(data, part, disposition,
 1818|  3.84k|                                     contenttype, strategy);
 1819|  3.84k|    if(result)
  ------------------
  |  Branch (1819:8): [True: 0, False: 3.84k]
  ------------------
 1820|      0|      return result;
 1821|  3.84k|  }
 1822|       |
 1823|       |  /* Issue Content-Type header. */
 1824|  3.89k|  if(contenttype) {
  ------------------
  |  Branch (1824:6): [True: 2.23k, False: 1.65k]
  ------------------
 1825|  2.23k|    result = add_content_type(&part->curlheaders, contenttype, boundary);
 1826|  2.23k|    if(result)
  ------------------
  |  Branch (1826:8): [True: 0, False: 2.23k]
  ------------------
 1827|      0|      return result;
 1828|  2.23k|  }
 1829|       |
 1830|       |  /* Content-Transfer-Encoding header. */
 1831|  3.89k|  if(!search_header(part->userheaders,
  ------------------
  |  Branch (1831:6): [True: 3.89k, False: 0]
  ------------------
 1832|  3.89k|                    STRCONST("Content-Transfer-Encoding"))) {
  ------------------
  |  | 1297|  3.89k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|  3.89k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 1833|  3.89k|    if(part->encoder)
  ------------------
  |  Branch (1833:8): [True: 1.36k, False: 2.52k]
  ------------------
 1834|  1.36k|      cte = part->encoder->name;
 1835|  2.52k|    else if(contenttype && strategy == MIMESTRATEGY_MAIL &&
  ------------------
  |  Branch (1835:13): [True: 1.49k, False: 1.03k]
  |  Branch (1835:28): [True: 0, False: 1.49k]
  ------------------
 1836|      0|            part->kind != MIMEKIND_MULTIPART)
  ------------------
  |  Branch (1836:13): [True: 0, False: 0]
  ------------------
 1837|      0|      cte = "8bit";
 1838|  3.89k|    if(cte) {
  ------------------
  |  Branch (1838:8): [True: 1.36k, False: 2.52k]
  ------------------
 1839|  1.36k|      result = Curl_mime_add_header(&part->curlheaders,
 1840|  1.36k|                                    "Content-Transfer-Encoding: %s", cte);
 1841|  1.36k|      if(result)
  ------------------
  |  Branch (1841:10): [True: 0, False: 1.36k]
  ------------------
 1842|      0|        return result;
 1843|  1.36k|    }
 1844|  3.89k|  }
 1845|       |
 1846|       |  /* If we were reading curl-generated headers, restart with new ones (this
 1847|       |     should not occur). */
 1848|  3.89k|  if(part->state.state == MIMESTATE_CURLHEADERS)
  ------------------
  |  Branch (1848:6): [True: 0, False: 3.89k]
  ------------------
 1849|      0|    mimesetstate(&part->state, MIMESTATE_CURLHEADERS, part->curlheaders);
 1850|       |
 1851|       |  /* Process subparts. */
 1852|  3.89k|  if(part->kind == MIMEKIND_MULTIPART && mime) {
  ------------------
  |  Branch (1852:6): [True: 1.36k, False: 2.53k]
  |  Branch (1852:42): [True: 1.36k, False: 0]
  ------------------
 1853|  1.36k|    curl_mimepart *subpart;
 1854|       |
 1855|  1.36k|    disposition = NULL;
 1856|  1.36k|    if(content_type_match(contenttype, STRCONST("multipart/form-data")))
  ------------------
  |  | 1297|  1.36k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|  1.36k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (1856:8): [True: 608, False: 755]
  ------------------
 1857|    608|      disposition = "form-data";
 1858|  4.64k|    for(subpart = mime->firstpart; subpart; subpart = subpart->nextpart) {
  ------------------
  |  Branch (1858:36): [True: 3.28k, False: 1.36k]
  ------------------
 1859|  3.28k|      result = Curl_mime_prepare_headers(data, subpart, NULL,
 1860|  3.28k|                                         disposition, strategy);
 1861|  3.28k|      if(result)
  ------------------
  |  Branch (1861:10): [True: 0, False: 3.28k]
  ------------------
 1862|      0|        return result;
 1863|  3.28k|    }
 1864|  1.36k|  }
 1865|  3.89k|  return result;
 1866|  3.89k|}
Curl_creader_set_mime:
 2158|    608|{
 2159|    608|  struct Curl_creader *r;
 2160|    608|  struct cr_mime_ctx *ctx;
 2161|    608|  CURLcode result;
 2162|       |
 2163|    608|  result = Curl_creader_create(&r, data, &cr_mime, CURL_CR_CLIENT);
 2164|    608|  if(result)
  ------------------
  |  Branch (2164:6): [True: 0, False: 608]
  ------------------
 2165|      0|    return result;
 2166|    608|  ctx = r->ctx;
 2167|    608|  ctx->part = part;
 2168|       |  /* Make sure we will read the entire mime structure. */
 2169|    608|  result = mime_rewind(ctx->part);
 2170|    608|  if(result) {
  ------------------
  |  Branch (2170:6): [True: 0, False: 608]
  ------------------
 2171|      0|    Curl_creader_free(data, r);
 2172|      0|    return result;
 2173|      0|  }
 2174|    608|  ctx->total_len = mime_size(ctx->part);
 2175|       |
 2176|    608|  return Curl_creader_set(data, r);
 2177|    608|}
mime.c:cleanup_part_content:
 1057|  10.2k|{
 1058|  10.2k|  if(part->freefunc)
  ------------------
  |  Branch (1058:6): [True: 3.40k, False: 6.82k]
  ------------------
 1059|  3.40k|    part->freefunc(part->arg);
 1060|       |
 1061|  10.2k|  part->readfunc = NULL;
 1062|  10.2k|  part->seekfunc = NULL;
 1063|  10.2k|  part->freefunc = NULL;
 1064|  10.2k|  part->arg = (void *)part;           /* Defaults to part itself. */
 1065|  10.2k|  part->data = NULL;
 1066|  10.2k|  part->fp = NULL;
 1067|  10.2k|  part->datasize = (curl_off_t)0;     /* No size yet. */
 1068|  10.2k|  cleanup_encoder_state(&part->encstate);
 1069|  10.2k|  part->kind = MIMEKIND_NONE;
 1070|  10.2k|  part->flags &= ~(unsigned int)MIME_FAST_READ;
  ------------------
  |  |   36|  10.2k|#define MIME_FAST_READ          (1 << 2)
  ------------------
 1071|  10.2k|  part->lastreadstatus = 1; /* Successful read status. */
 1072|  10.2k|  part->state.state = MIMESTATE_BEGIN;
 1073|  10.2k|}
mime.c:cleanup_encoder_state:
  284|  13.5k|{
  285|  13.5k|  p->pos = 0;
  286|  13.5k|  p->bufbeg = 0;
  287|  13.5k|  p->bufend = 0;
  288|  13.5k|}
mime.c:mime_subparts_unbind:
 1088|  2.04k|{
 1089|  2.04k|  curl_mime *mime = (curl_mime *)ptr;
 1090|       |
 1091|  2.04k|  if(mime && mime->parent) {
  ------------------
  |  Branch (1091:6): [True: 2.04k, False: 0]
  |  Branch (1091:14): [True: 1.41k, False: 638]
  ------------------
 1092|  1.41k|    mime->parent->freefunc = NULL;  /* Be sure we will not be called again. */
 1093|  1.41k|    cleanup_part_content(mime->parent);  /* Avoid dangling pointer in part. */
 1094|       |    mime->parent = NULL;
 1095|  1.41k|  }
 1096|  2.04k|}
mime.c:mimesetstate:
  190|  39.2k|{
  191|  39.2k|  state->state = tok;
  192|  39.2k|  state->ptr = ptr;
  193|  39.2k|  state->offset = 0;
  194|  39.2k|}
mime.c:mime_mem_read:
  576|    366|{
  577|    366|  curl_mimepart *part = (curl_mimepart *)instream;
  578|    366|  size_t sz = curlx_sotouz(part->datasize - part->state.offset);
  579|    366|  (void)size;  /* Always 1 */
  580|       |
  581|    366|  if(!nitems)
  ------------------
  |  Branch (581:6): [True: 0, False: 366]
  ------------------
  582|      0|    return STOP_FILLING;
  ------------------
  |  |   50|      0|#define STOP_FILLING ((size_t)-2)
  ------------------
  583|       |
  584|    366|  if(sz > nitems)
  ------------------
  |  Branch (584:6): [True: 23, False: 343]
  ------------------
  585|     23|    sz = nitems;
  586|       |
  587|    366|  if(sz)
  ------------------
  |  Branch (587:6): [True: 366, False: 0]
  ------------------
  588|    366|    memcpy(buffer, part->data + curlx_sotouz(part->state.offset), sz);
  589|       |
  590|    366|  return sz;
  591|    366|}
mime.c:mime_mem_free:
  614|  1.99k|{
  615|       |  curlx_safefree(((curl_mimepart *)ptr)->data);
  ------------------
  |  | 1332|  1.99k|  do {                      \
  |  | 1333|  1.99k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  1.99k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  1.99k|    (ptr) = NULL;           \
  |  | 1335|  1.99k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 1.99k]
  |  |  ------------------
  ------------------
  616|  1.99k|}
mime.c:encoder_nop_read:
  293|    715|{
  294|    715|  struct mime_encoder_state *st = &part->encstate;
  295|    715|  size_t insize = st->bufend - st->bufbeg;
  296|       |
  297|    715|  (void)ateof;
  298|       |
  299|    715|  if(!size)
  ------------------
  |  Branch (299:6): [True: 2, False: 713]
  ------------------
  300|      2|    return STOP_FILLING;
  ------------------
  |  |   50|      2|#define STOP_FILLING ((size_t)-2)
  ------------------
  301|       |
  302|    713|  if(size > insize)
  ------------------
  |  Branch (302:6): [True: 711, False: 2]
  ------------------
  303|    711|    size = insize;
  304|       |
  305|    713|  if(size)
  ------------------
  |  Branch (305:6): [True: 345, False: 368]
  ------------------
  306|    345|    memcpy(buffer, st->buf + st->bufbeg, size);
  307|       |
  308|    713|  st->bufbeg += size;
  309|    713|  return size;
  310|    715|}
mime.c:encoder_nop_size:
  313|    727|{
  314|    727|  return part->datasize;
  315|    727|}
mime.c:encoder_7bit_read:
  320|    261|{
  321|    261|  struct mime_encoder_state *st = &part->encstate;
  322|    261|  size_t cursize = st->bufend - st->bufbeg;
  323|       |
  324|    261|  (void)ateof;
  325|       |
  326|    261|  if(!size)
  ------------------
  |  Branch (326:6): [True: 0, False: 261]
  ------------------
  327|      0|    return STOP_FILLING;
  ------------------
  |  |   50|      0|#define STOP_FILLING ((size_t)-2)
  ------------------
  328|       |
  329|    261|  if(size > cursize)
  ------------------
  |  Branch (329:6): [True: 261, False: 0]
  ------------------
  330|    261|    size = cursize;
  331|       |
  332|  5.05k|  for(cursize = 0; cursize < size; cursize++) {
  ------------------
  |  Branch (332:20): [True: 4.84k, False: 203]
  ------------------
  333|  4.84k|    *buffer = st->buf[st->bufbeg];
  334|  4.84k|    if(*buffer++ & 0x80)
  ------------------
  |  Branch (334:8): [True: 58, False: 4.78k]
  ------------------
  335|     58|      return cursize ? cursize : READ_ERROR;
  ------------------
  |  |   49|     48|#define READ_ERROR   ((size_t)-1)
  ------------------
  |  Branch (335:14): [True: 10, False: 48]
  ------------------
  336|  4.78k|    st->bufbeg++;
  337|  4.78k|  }
  338|       |
  339|    203|  return cursize;
  340|    261|}
mime.c:encoder_base64_read:
  345|    534|{
  346|    534|  struct mime_encoder_state *st = &part->encstate;
  347|    534|  size_t cursize = 0;
  348|    534|  int i;
  349|    534|  char *ptr = buffer;
  350|       |
  351|  6.89k|  while(st->bufbeg < st->bufend) {
  ------------------
  |  Branch (351:9): [True: 6.65k, False: 249]
  ------------------
  352|       |    /* Line full ? */
  353|  6.65k|    if(st->pos > MAX_ENCODED_LINE_LENGTH - 4) {
  ------------------
  |  |   30|  6.65k|#define MAX_ENCODED_LINE_LENGTH         76  /* Maximum encoded line length. */
  ------------------
  |  Branch (353:8): [True: 309, False: 6.34k]
  ------------------
  354|       |      /* Yes, we need 2 characters for CRLF. */
  355|    309|      if(size < 2) {
  ------------------
  |  Branch (355:10): [True: 2, False: 307]
  ------------------
  356|      2|        if(!cursize)
  ------------------
  |  Branch (356:12): [True: 1, False: 1]
  ------------------
  357|      1|          return STOP_FILLING;
  ------------------
  |  |   50|      1|#define STOP_FILLING ((size_t)-2)
  ------------------
  358|      1|        break;
  359|      2|      }
  360|    307|      *ptr++ = '\r';
  361|    307|      *ptr++ = '\n';
  362|    307|      st->pos = 0;
  363|    307|      cursize += 2;
  364|    307|      size -= 2;
  365|    307|    }
  366|       |
  367|       |    /* Be sure there is enough space and input data for a base64 group. */
  368|  6.64k|    if(size < 4) {
  ------------------
  |  Branch (368:8): [True: 22, False: 6.62k]
  ------------------
  369|     22|      if(!cursize)
  ------------------
  |  Branch (369:10): [True: 17, False: 5]
  ------------------
  370|     17|        return STOP_FILLING;
  ------------------
  |  |   50|     17|#define STOP_FILLING ((size_t)-2)
  ------------------
  371|      5|      break;
  372|     22|    }
  373|  6.62k|    if(st->bufend - st->bufbeg < 3)
  ------------------
  |  Branch (373:8): [True: 261, False: 6.36k]
  ------------------
  374|    261|      break;
  375|       |
  376|       |    /* Encode three bytes as four characters. */
  377|  6.36k|    i = st->buf[st->bufbeg++] & 0xFF;
  378|  6.36k|    i = (i << 8) | (st->buf[st->bufbeg++] & 0xFF);
  379|  6.36k|    i = (i << 8) | (st->buf[st->bufbeg++] & 0xFF);
  380|  6.36k|    *ptr++ = curlx_base64encdec[(i >> 18) & 0x3F];
  381|  6.36k|    *ptr++ = curlx_base64encdec[(i >> 12) & 0x3F];
  382|  6.36k|    *ptr++ = curlx_base64encdec[(i >> 6) & 0x3F];
  383|  6.36k|    *ptr++ = curlx_base64encdec[i & 0x3F];
  384|  6.36k|    cursize += 4;
  385|  6.36k|    st->pos += 4;
  386|  6.36k|    size -= 4;
  387|  6.36k|  }
  388|       |
  389|       |  /* If at eof, we have to flush the buffered data. */
  390|    516|  if(ateof) {
  ------------------
  |  Branch (390:6): [True: 294, False: 222]
  ------------------
  391|    294|    if(size < 4) {
  ------------------
  |  Branch (391:8): [True: 2, False: 292]
  ------------------
  392|      2|      if(!cursize)
  ------------------
  |  Branch (392:10): [True: 2, False: 0]
  ------------------
  393|      2|        return STOP_FILLING;
  ------------------
  |  |   50|      2|#define STOP_FILLING ((size_t)-2)
  ------------------
  394|      2|    }
  395|    292|    else {
  396|       |      /* Buffered data size can only be 0, 1 or 2. */
  397|    292|      ptr[2] = ptr[3] = '=';
  398|    292|      i = 0;
  399|       |
  400|       |      /* If there is buffered data */
  401|    292|      if(st->bufend != st->bufbeg) {
  ------------------
  |  Branch (401:10): [True: 51, False: 241]
  ------------------
  402|       |
  403|     51|        if(st->bufend - st->bufbeg == 2)
  ------------------
  |  Branch (403:12): [True: 14, False: 37]
  ------------------
  404|     14|          i = (st->buf[st->bufbeg + 1] & 0xFF) << 8;
  405|       |
  406|     51|        i |= (st->buf[st->bufbeg] & 0xFF) << 16;
  407|     51|        ptr[0] = curlx_base64encdec[(i >> 18) & 0x3F];
  408|     51|        ptr[1] = curlx_base64encdec[(i >> 12) & 0x3F];
  409|     51|        if(++st->bufbeg != st->bufend) {
  ------------------
  |  Branch (409:12): [True: 14, False: 37]
  ------------------
  410|     14|          ptr[2] = curlx_base64encdec[(i >> 6) & 0x3F];
  411|     14|          st->bufbeg++;
  412|     14|        }
  413|     51|        cursize += 4;
  414|     51|        st->pos += 4;
  415|     51|      }
  416|    292|    }
  417|    294|  }
  418|       |
  419|    514|  return cursize;
  420|    516|}
mime.c:encoder_base64_size:
  428|    235|{
  429|    235|  curl_off_t size = part->datasize;
  430|       |
  431|    235|  if(size <= 0)
  ------------------
  |  Branch (431:6): [True: 154, False: 81]
  ------------------
  432|    154|    return size;    /* Unknown size or no data. */
  433|       |
  434|       |  /* Prevent integer overflows */
  435|     81|  if(size > BASE64_MAX_INPUT_SIZE)
  ------------------
  |  |  424|     81|  (((CURL_OFF_T_MAX / (MAX_ENCODED_LINE_LENGTH + 2)) *                  \
  |  |  ------------------
  |  |  |  |  588|     81|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  |  |                 (((CURL_OFF_T_MAX / (MAX_ENCODED_LINE_LENGTH + 2)) *                  \
  |  |  ------------------
  |  |  |  |   30|     81|#define MAX_ENCODED_LINE_LENGTH         76  /* Maximum encoded line length. */
  |  |  ------------------
  |  |  425|     81|    MAX_ENCODED_LINE_LENGTH / 4) * 3 - 3)
  |  |  ------------------
  |  |  |  |   30|     81|#define MAX_ENCODED_LINE_LENGTH         76  /* Maximum encoded line length. */
  |  |  ------------------
  ------------------
  |  Branch (435:6): [True: 0, False: 81]
  ------------------
  436|      0|    return -1;
  437|       |
  438|       |  /* Compute base64 character count. */
  439|     81|  size = 4 * (1 + ((size - 1) / 3));
  440|       |
  441|       |  /* Effective character count must include CRLFs. */
  442|     81|  return size + (2 * ((size - 1) / MAX_ENCODED_LINE_LENGTH));
  ------------------
  |  |   30|     81|#define MAX_ENCODED_LINE_LENGTH         76  /* Maximum encoded line length. */
  ------------------
  443|     81|}
mime.c:encoder_qp_read:
  466|    156|{
  467|    156|  struct mime_encoder_state *st = &part->encstate;
  468|    156|  char *ptr = buffer;
  469|    156|  size_t cursize = 0;
  470|    156|  int softlinebreak;
  471|    156|  char buf[4];
  472|       |
  473|       |  /* On all platforms, input is supposed to be ASCII compatible: for this
  474|       |     reason, we use hexadecimal ASCII codes in this function rather than
  475|       |     character constants that can be interpreted as non-ASCII on some
  476|       |     platforms. Preserve ASCII encoding on output too. */
  477|    277|  while(st->bufbeg < st->bufend) {
  ------------------
  |  Branch (477:9): [True: 121, False: 156]
  ------------------
  478|    121|    size_t len = 1;
  479|    121|    size_t consumed = 1;
  480|    121|    int i = (unsigned char)st->buf[st->bufbeg];
  481|    121|    buf[0] = (char)i;
  482|    121|    buf[1] = aschex[(i >> 4) & 0xF];
  483|    121|    buf[2] = aschex[i & 0xF];
  484|       |
  485|    121|    switch(qp_class[st->buf[st->bufbeg] & 0xFF]) {
  486|    118|    case QP_OK:          /* Not a special character. */
  ------------------
  |  |   61|    118|#define QP_OK           1       /* Can be represented by itself. */
  ------------------
  |  Branch (486:5): [True: 118, False: 3]
  ------------------
  487|    118|      break;
  488|      0|    case QP_SP:          /* Space or tab. */
  ------------------
  |  |   62|      0|#define QP_SP           2       /* Space or tab. */
  ------------------
  |  Branch (488:5): [True: 0, False: 121]
  ------------------
  489|       |      /* Spacing must be escaped if followed by CRLF. */
  490|      0|      switch(qp_lookahead_eol(st, ateof, 1)) {
  491|      0|      case -1:          /* More input data needed. */
  ------------------
  |  Branch (491:7): [True: 0, False: 0]
  ------------------
  492|      0|        return cursize;
  493|      0|      case 0:           /* No encoding needed. */
  ------------------
  |  Branch (493:7): [True: 0, False: 0]
  ------------------
  494|      0|        break;
  495|      0|      default:          /* CRLF after space or tab. */
  ------------------
  |  Branch (495:7): [True: 0, False: 0]
  ------------------
  496|      0|        buf[0] = '\x3D';    /* '=' */
  497|      0|        len = 3;
  498|      0|        break;
  499|      0|      }
  500|      0|      break;
  501|      2|    case QP_CR:         /* Carriage return. */
  ------------------
  |  |   63|      2|#define QP_CR           3       /* Carriage return. */
  ------------------
  |  Branch (501:5): [True: 2, False: 119]
  ------------------
  502|       |      /* If followed by a line-feed, output the CRLF pair.
  503|       |         Else escape it. */
  504|      2|      switch(qp_lookahead_eol(st, ateof, 0)) {
  505|      0|      case -1:          /* Need more data. */
  ------------------
  |  Branch (505:7): [True: 0, False: 2]
  ------------------
  506|      0|        return cursize;
  507|      2|      case 1:           /* CRLF found. */
  ------------------
  |  Branch (507:7): [True: 2, False: 0]
  ------------------
  508|      2|        buf[len++] = '\x0A';    /* Append '\n'. */
  509|      2|        consumed = 2;
  510|      2|        break;
  511|      0|      default:          /* Not followed by LF: escape. */
  ------------------
  |  Branch (511:7): [True: 0, False: 2]
  ------------------
  512|      0|        buf[0] = '\x3D';    /* '=' */
  513|      0|        len = 3;
  514|      0|        break;
  515|      2|      }
  516|      2|      break;
  517|      2|    default:            /* Character must be escaped. */
  ------------------
  |  Branch (517:5): [True: 1, False: 120]
  ------------------
  518|      1|      buf[0] = '\x3D';    /* '=' */
  519|      1|      len = 3;
  520|      1|      break;
  521|    121|    }
  522|       |
  523|       |    /* Be sure the encoded character fits within maximum line length. */
  524|    121|    if(buf[len - 1] != '\x0A') {    /* '\n' */
  ------------------
  |  Branch (524:8): [True: 119, False: 2]
  ------------------
  525|    119|      softlinebreak = st->pos + len > MAX_ENCODED_LINE_LENGTH;
  ------------------
  |  |   30|    119|#define MAX_ENCODED_LINE_LENGTH         76  /* Maximum encoded line length. */
  ------------------
  526|    119|      if(!softlinebreak && st->pos + len == MAX_ENCODED_LINE_LENGTH) {
  ------------------
  |  |   30|    119|#define MAX_ENCODED_LINE_LENGTH         76  /* Maximum encoded line length. */
  ------------------
  |  Branch (526:10): [True: 119, False: 0]
  |  Branch (526:28): [True: 0, False: 119]
  ------------------
  527|       |        /* We may use the current line only if end of data or followed by
  528|       |           a CRLF. */
  529|      0|        switch(qp_lookahead_eol(st, ateof, consumed)) {
  ------------------
  |  Branch (529:16): [True: 0, False: 0]
  ------------------
  530|      0|        case -1:        /* Need more data. */
  ------------------
  |  Branch (530:9): [True: 0, False: 0]
  ------------------
  531|      0|          return cursize;
  532|      0|        case 0:         /* Not followed by a CRLF. */
  ------------------
  |  Branch (532:9): [True: 0, False: 0]
  ------------------
  533|      0|          softlinebreak = 1;
  534|      0|          break;
  535|      0|        }
  536|      0|      }
  537|    119|      if(softlinebreak) {
  ------------------
  |  Branch (537:10): [True: 0, False: 119]
  ------------------
  538|      0|        curlx_strcopy(buf, sizeof(buf), STRCONST("\x3D\x0D\x0A")); /* =\r\n */
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  539|      0|        len = 3;
  540|      0|        consumed = 0;
  541|      0|      }
  542|    119|    }
  543|       |
  544|       |    /* If the output buffer would overflow, do not store. */
  545|    121|    if(len > size) {
  ------------------
  |  Branch (545:8): [True: 0, False: 121]
  ------------------
  546|      0|      if(!cursize)
  ------------------
  |  Branch (546:10): [True: 0, False: 0]
  ------------------
  547|      0|        return STOP_FILLING;
  ------------------
  |  |   50|      0|#define STOP_FILLING ((size_t)-2)
  ------------------
  548|      0|      break;
  549|      0|    }
  550|       |
  551|       |    /* Append to output buffer. */
  552|    121|    memcpy(ptr, buf, len);
  553|    121|    cursize += len;
  554|    121|    ptr += len;
  555|    121|    size -= len;
  556|    121|    st->pos += len;
  557|    121|    if(buf[len - 1] == '\x0A')    /* '\n' */
  ------------------
  |  Branch (557:8): [True: 2, False: 119]
  ------------------
  558|      2|      st->pos = 0;
  559|    121|    st->bufbeg += consumed;
  560|    121|  }
  561|       |
  562|    156|  return cursize;
  563|    156|}
mime.c:qp_lookahead_eol:
  451|      2|{
  452|      2|  n += st->bufbeg;
  453|      2|  if(n >= st->bufend && ateof)
  ------------------
  |  Branch (453:6): [True: 0, False: 2]
  |  Branch (453:25): [True: 0, False: 0]
  ------------------
  454|      0|    return 1;
  455|      2|  if(n + 2 > st->bufend)
  ------------------
  |  Branch (455:6): [True: 0, False: 2]
  ------------------
  456|      0|    return ateof ? 0 : -1;
  ------------------
  |  Branch (456:12): [True: 0, False: 0]
  ------------------
  457|      2|  if(qp_class[st->buf[n] & 0xFF] == QP_CR &&
  ------------------
  |  |   63|      4|#define QP_CR           3       /* Carriage return. */
  ------------------
  |  Branch (457:6): [True: 2, False: 0]
  ------------------
  458|      2|     qp_class[st->buf[n + 1] & 0xFF] == QP_LF)
  ------------------
  |  |   64|      2|#define QP_LF           4       /* Line-feed. */
  ------------------
  |  Branch (458:6): [True: 2, False: 0]
  ------------------
  459|      2|    return 1;
  460|      0|  return 0;
  461|      2|}
mime.c:encoder_qp_size:
  566|    403|{
  567|       |  /* Determining the size can only be done by reading the data: unless the
  568|       |     data size is 0, we return it as unknown (-1). */
  569|    403|  return part->datasize ? -1 : 0;
  ------------------
  |  Branch (569:10): [True: 194, False: 209]
  ------------------
  570|    403|}
mime.c:mime_subparts_seek:
 1032|  1.41k|{
 1033|  1.41k|  curl_mime *mime = (curl_mime *)instream;
 1034|  1.41k|  curl_mimepart *part;
 1035|  1.41k|  int rc = CURL_SEEKFUNC_OK;
  ------------------
  |  |  382|  1.41k|#define CURL_SEEKFUNC_OK       0
  ------------------
 1036|       |
 1037|  1.41k|  if(whence != SEEK_SET || offset)
  ------------------
  |  Branch (1037:6): [True: 0, False: 1.41k]
  |  Branch (1037:28): [True: 0, False: 1.41k]
  ------------------
 1038|      0|    return CURL_SEEKFUNC_CANTSEEK;    /* Only support full rewind. */
  ------------------
  |  |  384|      0|#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking cannot be done, so
  ------------------
 1039|       |
 1040|  1.41k|  if(mime->state.state == MIMESTATE_BEGIN)
  ------------------
  |  Branch (1040:6): [True: 1.41k, False: 0]
  ------------------
 1041|  1.41k|    return CURL_SEEKFUNC_OK;           /* Already rewound. */
  ------------------
  |  |  382|  1.41k|#define CURL_SEEKFUNC_OK       0
  ------------------
 1042|       |
 1043|      0|  for(part = mime->firstpart; part; part = part->nextpart) {
  ------------------
  |  Branch (1043:31): [True: 0, False: 0]
  ------------------
 1044|      0|    int res = mime_part_rewind(part);
 1045|      0|    if(res != CURL_SEEKFUNC_OK)
  ------------------
  |  |  382|      0|#define CURL_SEEKFUNC_OK       0
  ------------------
  |  Branch (1045:8): [True: 0, False: 0]
  ------------------
 1046|      0|      rc = res;
 1047|      0|  }
 1048|       |
 1049|      0|  if(rc == CURL_SEEKFUNC_OK)
  ------------------
  |  |  382|      0|#define CURL_SEEKFUNC_OK       0
  ------------------
  |  Branch (1049:6): [True: 0, False: 0]
  ------------------
 1050|      0|    mimesetstate(&mime->state, MIMESTATE_BEGIN, NULL);
 1051|       |
 1052|      0|  return rc;
 1053|  1.41k|}
mime.c:mime_part_rewind:
  998|    608|{
  999|    608|  int res = CURL_SEEKFUNC_OK;
  ------------------
  |  |  382|    608|#define CURL_SEEKFUNC_OK       0
  ------------------
 1000|    608|  enum mimestate targetstate = MIMESTATE_BEGIN;
 1001|       |
 1002|    608|  if(part->flags & MIME_BODY_ONLY)
  ------------------
  |  |   35|    608|#define MIME_BODY_ONLY          (1 << 1)
  ------------------
  |  Branch (1002:6): [True: 608, False: 0]
  ------------------
 1003|    608|    targetstate = MIMESTATE_BODY;
 1004|    608|  cleanup_encoder_state(&part->encstate);
 1005|    608|  if(part->state.state > targetstate) {
  ------------------
  |  Branch (1005:6): [True: 0, False: 608]
  ------------------
 1006|      0|    res = CURL_SEEKFUNC_CANTSEEK;
  ------------------
  |  |  384|      0|#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking cannot be done, so
  ------------------
 1007|      0|    if(part->seekfunc) {
  ------------------
  |  Branch (1007:8): [True: 0, False: 0]
  ------------------
 1008|      0|      res = part->seekfunc(part->arg, (curl_off_t)0, SEEK_SET);
 1009|      0|      switch(res) {
 1010|      0|      case CURL_SEEKFUNC_OK:
  ------------------
  |  |  382|      0|#define CURL_SEEKFUNC_OK       0
  ------------------
  |  Branch (1010:7): [True: 0, False: 0]
  ------------------
 1011|      0|      case CURL_SEEKFUNC_FAIL:
  ------------------
  |  |  383|      0|#define CURL_SEEKFUNC_FAIL     1 /* fail the entire transfer */
  ------------------
  |  Branch (1011:7): [True: 0, False: 0]
  ------------------
 1012|      0|      case CURL_SEEKFUNC_CANTSEEK:
  ------------------
  |  |  384|      0|#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking cannot be done, so
  ------------------
  |  Branch (1012:7): [True: 0, False: 0]
  ------------------
 1013|      0|        break;
 1014|      0|      case -1:    /* For fseek() error. */
  ------------------
  |  Branch (1014:7): [True: 0, False: 0]
  ------------------
 1015|      0|        res = CURL_SEEKFUNC_CANTSEEK;
  ------------------
  |  |  384|      0|#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking cannot be done, so
  ------------------
 1016|      0|        break;
 1017|      0|      default:
  ------------------
  |  Branch (1017:7): [True: 0, False: 0]
  ------------------
 1018|      0|        res = CURL_SEEKFUNC_FAIL;
  ------------------
  |  |  383|      0|#define CURL_SEEKFUNC_FAIL     1 /* fail the entire transfer */
  ------------------
 1019|      0|        break;
 1020|      0|      }
 1021|      0|    }
 1022|      0|  }
 1023|       |
 1024|    608|  if(res == CURL_SEEKFUNC_OK)
  ------------------
  |  |  382|    608|#define CURL_SEEKFUNC_OK       0
  ------------------
  |  Branch (1024:6): [True: 608, False: 0]
  ------------------
 1025|    608|    mimesetstate(&part->state, targetstate, NULL);
 1026|       |
 1027|    608|  part->lastreadstatus = 1; /* Successful read status. */
 1028|    608|  return res;
 1029|    608|}
mime.c:mime_subparts_free:
 1076|    772|{
 1077|    772|  curl_mime *mime = (curl_mime *)ptr;
 1078|       |
 1079|    772|  if(mime && mime->parent) {
  ------------------
  |  Branch (1079:6): [True: 772, False: 0]
  |  Branch (1079:14): [True: 772, False: 0]
  ------------------
 1080|       |    mime->parent->freefunc = NULL;  /* Be sure we will not be called again. */
 1081|    772|    cleanup_part_content(mime->parent);  /* Avoid dangling pointer in part. */
 1082|    772|  }
 1083|    772|  curl_mime_free(mime);
 1084|    772|}
mime.c:readback_part:
  840|  5.27k|{
  841|  5.27k|  size_t cursize = 0;
  842|       |
  843|  5.27k|  if(++call_depth > MAX_MIME_LEVELS)
  ------------------
  |  |   47|  5.27k|#define MAX_MIME_LEVELS 40 /* avoid deep nesting */
  ------------------
  |  Branch (843:6): [True: 0, False: 5.27k]
  ------------------
  844|      0|    return READ_ERROR;
  ------------------
  |  |   49|      0|#define READ_ERROR   ((size_t)-1)
  ------------------
  845|       |
  846|       |  /* Readback from part. */
  847|  36.7k|  while(bufsize) {
  ------------------
  |  Branch (847:9): [True: 35.9k, False: 790]
  ------------------
  848|  35.9k|    size_t sz = 0;
  849|  35.9k|    struct curl_slist *hdr = (struct curl_slist *)part->state.ptr;
  850|  35.9k|    switch(part->state.state) {
  851|  2.21k|    case MIMESTATE_BEGIN:
  ------------------
  |  Branch (851:5): [True: 2.21k, False: 33.7k]
  ------------------
  852|  2.21k|      mimesetstate(&part->state,
  853|  2.21k|                   (part->flags & MIME_BODY_ONLY) ?
  ------------------
  |  |   35|  2.21k|#define MIME_BODY_ONLY          (1 << 1)
  ------------------
  |  Branch (853:20): [True: 0, False: 2.21k]
  ------------------
  854|  2.21k|                   MIMESTATE_BODY : MIMESTATE_CURLHEADERS,
  855|  2.21k|                   part->curlheaders);
  856|  2.21k|      break;
  857|  8.49k|    case MIMESTATE_USERHEADERS:
  ------------------
  |  Branch (857:5): [True: 8.49k, False: 27.4k]
  ------------------
  858|  8.49k|      if(!hdr) {
  ------------------
  |  Branch (858:10): [True: 2.21k, False: 6.27k]
  ------------------
  859|  2.21k|        mimesetstate(&part->state, MIMESTATE_EOH, NULL);
  860|  2.21k|        break;
  861|  2.21k|      }
  862|  6.27k|      if(match_header(hdr, "Content-Type", 12)) {
  ------------------
  |  Branch (862:10): [True: 0, False: 6.27k]
  ------------------
  863|      0|        mimesetstate(&part->state, MIMESTATE_USERHEADERS, hdr->next);
  864|      0|        break;
  865|      0|      }
  866|  6.27k|      FALLTHROUGH();
  ------------------
  |  |  815|  6.27k|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  867|  18.3k|    case MIMESTATE_CURLHEADERS:
  ------------------
  |  Branch (867:5): [True: 12.1k, False: 23.8k]
  ------------------
  868|  18.3k|      if(!hdr)
  ------------------
  |  Branch (868:10): [True: 2.21k, False: 16.1k]
  ------------------
  869|  2.21k|        mimesetstate(&part->state, MIMESTATE_USERHEADERS, part->userheaders);
  870|  16.1k|      else {
  871|  16.1k|        sz = readback_bytes(&part->state, buffer, bufsize,
  872|  16.1k|                            hdr->data, strlen(hdr->data), STRCONST("\r\n"));
  ------------------
  |  | 1297|  16.1k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|  16.1k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  873|  16.1k|        if(!sz)
  ------------------
  |  Branch (873:12): [True: 5.65k, False: 10.5k]
  ------------------
  874|  5.65k|          mimesetstate(&part->state, part->state.state, hdr->next);
  875|  16.1k|      }
  876|  18.3k|      break;
  877|  4.43k|    case MIMESTATE_EOH:
  ------------------
  |  Branch (877:5): [True: 4.43k, False: 31.4k]
  ------------------
  878|  4.43k|      sz = readback_bytes(&part->state, buffer, bufsize, STRCONST("\r\n"),
  ------------------
  |  | 1297|  4.43k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|  4.43k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  879|  4.43k|                          STRCONST(""));
  ------------------
  |  | 1297|  4.43k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|  4.43k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  880|  4.43k|      if(!sz)
  ------------------
  |  Branch (880:10): [True: 2.21k, False: 2.21k]
  ------------------
  881|  2.21k|        mimesetstate(&part->state, MIMESTATE_BODY, NULL);
  882|  4.43k|      break;
  883|  2.75k|    case MIMESTATE_BODY:
  ------------------
  |  Branch (883:5): [True: 2.75k, False: 33.1k]
  ------------------
  884|  2.75k|      cleanup_encoder_state(&part->encstate);
  885|  2.75k|      mimesetstate(&part->state, MIMESTATE_CONTENT, NULL);
  886|  2.75k|      break;
  887|  3.71k|    case MIMESTATE_CONTENT:
  ------------------
  |  Branch (887:5): [True: 3.71k, False: 32.2k]
  ------------------
  888|  3.71k|      if(part->encoder)
  ------------------
  |  Branch (888:10): [True: 995, False: 2.71k]
  ------------------
  889|    995|        sz = read_encoded_part_content(part, buffer, bufsize, hasread,
  890|    995|                                       call_depth);
  891|  2.71k|      else
  892|  2.71k|        sz = read_part_content(part, buffer, bufsize, hasread, call_depth);
  893|  3.71k|      switch(sz) {
  ------------------
  |  Branch (893:14): [True: 2.28k, False: 1.42k]
  ------------------
  894|  2.20k|      case 0:
  ------------------
  |  Branch (894:7): [True: 2.20k, False: 1.50k]
  ------------------
  895|  2.20k|        mimesetstate(&part->state, MIMESTATE_END, NULL);
  896|       |        /* Try sparing open file descriptors. */
  897|  2.20k|        if(part->kind == MIMEKIND_FILE && part->fp) {
  ------------------
  |  Branch (897:12): [True: 0, False: 2.20k]
  |  Branch (897:43): [True: 0, False: 0]
  ------------------
  898|      0|          curlx_fclose(part->fp);
  ------------------
  |  |   81|      0|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  899|      0|          part->fp = NULL;
  900|      0|        }
  901|  2.20k|        FALLTHROUGH();
  ------------------
  |  |  815|  2.20k|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  902|  2.20k|      case CURL_READFUNC_ABORT:
  ------------------
  |  |  392|  2.20k|#define CURL_READFUNC_ABORT 0x10000000
  ------------------
  |  Branch (902:7): [True: 0, False: 3.71k]
  ------------------
  903|  2.20k|      case CURL_READFUNC_PAUSE:
  ------------------
  |  |  395|  2.20k|#define CURL_READFUNC_PAUSE 0x10000001
  ------------------
  |  Branch (903:7): [True: 0, False: 3.71k]
  ------------------
  904|  2.27k|      case READ_ERROR:
  ------------------
  |  |   49|  2.27k|#define READ_ERROR   ((size_t)-1)
  ------------------
  |  Branch (904:7): [True: 68, False: 3.64k]
  ------------------
  905|  2.28k|      case STOP_FILLING:
  ------------------
  |  |   50|  2.28k|#define STOP_FILLING ((size_t)-2)
  ------------------
  |  Branch (905:7): [True: 14, False: 3.69k]
  ------------------
  906|  2.28k|        return cursize ? cursize : sz;
  ------------------
  |  Branch (906:16): [True: 2.23k, False: 49]
  ------------------
  907|  3.71k|      }
  908|  1.42k|      break;
  909|  2.20k|    case MIMESTATE_END:
  ------------------
  |  Branch (909:5): [True: 2.20k, False: 33.7k]
  ------------------
  910|  2.20k|      return cursize;
  911|      0|    default:
  ------------------
  |  Branch (911:5): [True: 0, False: 35.9k]
  ------------------
  912|      0|      break;    /* Other values not in part state. */
  913|  35.9k|    }
  914|       |
  915|       |    /* Bump buffer and counters according to read size. */
  916|  31.4k|    cursize += sz;
  917|  31.4k|    buffer += sz;
  918|  31.4k|    bufsize -= sz;
  919|  31.4k|  }
  920|       |
  921|    790|  return cursize;
  922|  5.27k|}
mime.c:match_header:
  246|  20.2k|{
  247|  20.2k|  char *value = NULL;
  248|       |
  249|  20.2k|  if(curl_strnequal(hdr->data, lbl, len) && hdr->data[len] == ':')
  ------------------
  |  Branch (249:6): [True: 53, False: 20.2k]
  |  Branch (249:45): [True: 53, False: 0]
  ------------------
  250|    106|    for(value = hdr->data + len + 1; *value == ' '; value++)
  ------------------
  |  Branch (250:38): [True: 53, False: 53]
  ------------------
  251|     53|      ;
  252|  20.2k|  return value;
  253|  20.2k|}
mime.c:readback_bytes:
  677|  36.4k|{
  678|  36.4k|  size_t sz;
  679|  36.4k|  size_t offset = curlx_sotouz(state->offset);
  680|       |
  681|  36.4k|  if(numbytes > offset) {
  ------------------
  |  Branch (681:6): [True: 13.6k, False: 22.7k]
  ------------------
  682|  13.6k|    sz = numbytes - offset;
  683|  13.6k|    bytes += offset;
  684|  13.6k|  }
  685|  22.7k|  else {
  686|  22.7k|    sz = offset - numbytes;
  687|  22.7k|    if(sz >= traillen)
  ------------------
  |  Branch (687:8): [True: 13.8k, False: 8.90k]
  ------------------
  688|  13.8k|      return 0;
  689|  8.90k|    bytes = trail + sz;
  690|  8.90k|    sz = traillen - sz;
  691|  8.90k|  }
  692|       |
  693|  22.5k|  if(sz > bufsize)
  ------------------
  |  Branch (693:6): [True: 274, False: 22.2k]
  ------------------
  694|    274|    sz = bufsize;
  695|       |
  696|  22.5k|  memcpy(buffer, bytes, sz);
  697|  22.5k|  state->offset += sz;
  698|  22.5k|  return sz;
  699|  36.4k|}
mime.c:read_encoded_part_content:
  776|    995|{
  777|    995|  struct mime_encoder_state *st = &part->encstate;
  778|    995|  size_t cursize = 0;
  779|    995|  size_t sz;
  780|    995|  bool ateof = FALSE;
  ------------------
  |  | 1048|    995|#define FALSE false
  ------------------
  781|       |
  782|    995|  if(++call_depth > MAX_MIME_LEVELS)
  ------------------
  |  |   47|    995|#define MAX_MIME_LEVELS 40 /* avoid deep nesting */
  ------------------
  |  Branch (782:6): [True: 0, False: 995]
  ------------------
  783|      0|    return READ_ERROR;
  ------------------
  |  |   49|      0|#define READ_ERROR   ((size_t)-1)
  ------------------
  784|       |
  785|  2.99k|  for(;;) {
  786|  2.99k|    if(st->bufbeg < st->bufend || ateof) {
  ------------------
  |  Branch (786:8): [True: 739, False: 2.25k]
  |  Branch (786:35): [True: 927, False: 1.33k]
  ------------------
  787|       |      /* Encode buffered data. */
  788|  1.66k|      sz = part->encoder->encodefunc(buffer, bufsize, ateof, part);
  789|  1.66k|      switch(sz) {
  790|  1.03k|      case 0:
  ------------------
  |  Branch (790:7): [True: 1.03k, False: 630]
  ------------------
  791|  1.03k|        if(ateof)
  ------------------
  |  Branch (791:12): [True: 925, False: 111]
  ------------------
  792|    925|          return cursize;
  793|    111|        break;
  794|    111|      case READ_ERROR:
  ------------------
  |  |   49|     48|#define READ_ERROR   ((size_t)-1)
  ------------------
  |  Branch (794:7): [True: 48, False: 1.61k]
  ------------------
  795|     70|      case STOP_FILLING:
  ------------------
  |  |   50|     70|#define STOP_FILLING ((size_t)-2)
  ------------------
  |  Branch (795:7): [True: 22, False: 1.64k]
  ------------------
  796|     70|        return cursize ? cursize : sz;
  ------------------
  |  Branch (796:16): [True: 18, False: 52]
  ------------------
  797|    560|      default:
  ------------------
  |  Branch (797:7): [True: 560, False: 1.10k]
  ------------------
  798|    560|        cursize += sz;
  799|    560|        buffer += sz;
  800|    560|        bufsize -= sz;
  801|    560|        continue;
  802|  1.66k|      }
  803|  1.66k|    }
  804|       |
  805|       |    /* We need more data in input buffer. */
  806|  1.44k|    if(st->bufbeg) {
  ------------------
  |  Branch (806:8): [True: 542, False: 901]
  ------------------
  807|    542|      size_t len = st->bufend - st->bufbeg;
  808|       |
  809|    542|      if(len)
  ------------------
  |  Branch (809:10): [True: 99, False: 443]
  ------------------
  810|     99|        memmove(st->buf, st->buf + st->bufbeg, len);
  811|    542|      st->bufbeg = 0;
  812|    542|      st->bufend = len;
  813|    542|    }
  814|  1.44k|    if(st->bufend >= sizeof(st->buf))
  ------------------
  |  Branch (814:8): [True: 0, False: 1.44k]
  ------------------
  815|      0|      return cursize ? cursize : READ_ERROR;    /* Buffer full. */
  ------------------
  |  |   49|      0|#define READ_ERROR   ((size_t)-1)
  ------------------
  |  Branch (815:14): [True: 0, False: 0]
  ------------------
  816|  1.44k|    sz = read_part_content(part, st->buf + st->bufend,
  817|  1.44k|                           sizeof(st->buf) - st->bufend, hasread, call_depth);
  818|  1.44k|    switch(sz) {
  819|    927|    case 0:
  ------------------
  |  Branch (819:5): [True: 927, False: 516]
  ------------------
  820|    927|      ateof = TRUE;
  ------------------
  |  | 1045|    927|#define TRUE true
  ------------------
  821|    927|      break;
  822|      0|    case CURL_READFUNC_ABORT:
  ------------------
  |  |  392|      0|#define CURL_READFUNC_ABORT 0x10000000
  ------------------
  |  Branch (822:5): [True: 0, False: 1.44k]
  ------------------
  823|      0|    case CURL_READFUNC_PAUSE:
  ------------------
  |  |  395|      0|#define CURL_READFUNC_PAUSE 0x10000001
  ------------------
  |  Branch (823:5): [True: 0, False: 1.44k]
  ------------------
  824|      0|    case READ_ERROR:
  ------------------
  |  |   49|      0|#define READ_ERROR   ((size_t)-1)
  ------------------
  |  Branch (824:5): [True: 0, False: 1.44k]
  ------------------
  825|      0|    case STOP_FILLING:
  ------------------
  |  |   50|      0|#define STOP_FILLING ((size_t)-2)
  ------------------
  |  Branch (825:5): [True: 0, False: 1.44k]
  ------------------
  826|      0|      return cursize ? cursize : sz;
  ------------------
  |  Branch (826:14): [True: 0, False: 0]
  ------------------
  827|    516|    default:
  ------------------
  |  Branch (827:5): [True: 516, False: 927]
  ------------------
  828|    516|      st->bufend += sz;
  829|    516|      break;
  830|  1.44k|    }
  831|  1.44k|  }
  832|       |
  833|       |  /* NOTREACHED */
  834|    995|}
mime.c:read_part_content:
  706|  4.15k|{
  707|  4.15k|  size_t sz = 0;
  708|       |
  709|  4.15k|  if(++call_depth > MAX_MIME_LEVELS)
  ------------------
  |  |   47|  4.15k|#define MAX_MIME_LEVELS 40 /* avoid deep nesting */
  ------------------
  |  Branch (709:6): [True: 0, False: 4.15k]
  ------------------
  710|      0|    return READ_ERROR;
  ------------------
  |  |   49|      0|#define READ_ERROR   ((size_t)-1)
  ------------------
  711|       |
  712|  4.15k|  switch(part->lastreadstatus) {
  713|    197|  case 0:
  ------------------
  |  Branch (713:3): [True: 197, False: 3.96k]
  ------------------
  714|    197|  case CURL_READFUNC_ABORT:
  ------------------
  |  |  392|    197|#define CURL_READFUNC_ABORT 0x10000000
  ------------------
  |  Branch (714:3): [True: 0, False: 4.15k]
  ------------------
  715|    197|  case CURL_READFUNC_PAUSE:
  ------------------
  |  |  395|    197|#define CURL_READFUNC_PAUSE 0x10000001
  ------------------
  |  Branch (715:3): [True: 0, False: 4.15k]
  ------------------
  716|    213|  case READ_ERROR:
  ------------------
  |  |   49|    213|#define READ_ERROR   ((size_t)-1)
  ------------------
  |  Branch (716:3): [True: 16, False: 4.14k]
  ------------------
  717|    213|    return part->lastreadstatus;
  718|  3.94k|  default:
  ------------------
  |  Branch (718:3): [True: 3.94k, False: 213]
  ------------------
  719|  3.94k|    break;
  720|  4.15k|  }
  721|       |
  722|       |  /* If we can determine we are at end of part data, spare a read. */
  723|  3.94k|  if(part->datasize != (curl_off_t)-1 &&
  ------------------
  |  Branch (723:6): [True: 3.93k, False: 8]
  ------------------
  724|  3.93k|     part->state.offset >= part->datasize) {
  ------------------
  |  Branch (724:6): [True: 2.19k, False: 1.73k]
  ------------------
  725|       |    /* sz is already zero. */
  726|  2.19k|  }
  727|  1.74k|  else {
  728|  1.74k|    switch(part->kind) {
  729|  1.38k|    case MIMEKIND_MULTIPART:
  ------------------
  |  Branch (729:5): [True: 1.38k, False: 366]
  ------------------
  730|       |      /*
  731|       |       * Cannot be processed as other kinds since read function requires
  732|       |       * an additional parameter and is highly recursive.
  733|       |       */
  734|  1.38k|      sz = mime_subparts_read(buffer, 1, bufsize, part->arg, hasread,
  735|  1.38k|                              call_depth);
  736|  1.38k|      break;
  737|      0|    case MIMEKIND_FILE:
  ------------------
  |  Branch (737:5): [True: 0, False: 1.74k]
  ------------------
  738|      0|      if(part->fp && feof(part->fp))
  ------------------
  |  Branch (738:10): [True: 0, False: 0]
  |  Branch (738:22): [True: 0, False: 0]
  ------------------
  739|      0|        break;  /* At EOF. */
  740|      0|      FALLTHROUGH();
  ------------------
  |  |  815|      0|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  741|    366|    default:
  ------------------
  |  Branch (741:5): [True: 366, False: 1.38k]
  ------------------
  742|    366|      if(part->readfunc) {
  ------------------
  |  Branch (742:10): [True: 366, False: 0]
  ------------------
  743|    366|        if(!(part->flags & MIME_FAST_READ)) {
  ------------------
  |  |   36|    366|#define MIME_FAST_READ          (1 << 2)
  ------------------
  |  Branch (743:12): [True: 0, False: 366]
  ------------------
  744|      0|          if(*hasread)
  ------------------
  |  Branch (744:14): [True: 0, False: 0]
  ------------------
  745|      0|            return STOP_FILLING;
  ------------------
  |  |   50|      0|#define STOP_FILLING ((size_t)-2)
  ------------------
  746|      0|          *hasread = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  747|      0|        }
  748|    366|        sz = part->readfunc(buffer, 1, bufsize, part->arg);
  749|    366|      }
  750|    366|      break;
  751|  1.74k|    }
  752|  1.74k|  }
  753|       |
  754|  3.94k|  switch(sz) {
  755|      0|  case STOP_FILLING:
  ------------------
  |  |   50|      0|#define STOP_FILLING ((size_t)-2)
  ------------------
  |  Branch (755:3): [True: 0, False: 3.94k]
  ------------------
  756|      0|    break;
  757|  2.20k|  case 0:
  ------------------
  |  Branch (757:3): [True: 2.20k, False: 1.74k]
  ------------------
  758|  2.20k|  case CURL_READFUNC_ABORT:
  ------------------
  |  |  392|  2.20k|#define CURL_READFUNC_ABORT 0x10000000
  ------------------
  |  Branch (758:3): [True: 0, False: 3.94k]
  ------------------
  759|  2.20k|  case CURL_READFUNC_PAUSE:
  ------------------
  |  |  395|  2.20k|#define CURL_READFUNC_PAUSE 0x10000001
  ------------------
  |  Branch (759:3): [True: 0, False: 3.94k]
  ------------------
  760|  2.21k|  case READ_ERROR:
  ------------------
  |  |   49|  2.21k|#define READ_ERROR   ((size_t)-1)
  ------------------
  |  Branch (760:3): [True: 14, False: 3.93k]
  ------------------
  761|  2.21k|    part->lastreadstatus = sz;
  762|  2.21k|    break;
  763|  1.72k|  default:
  ------------------
  |  Branch (763:3): [True: 1.72k, False: 2.21k]
  ------------------
  764|  1.72k|    part->state.offset += sz;
  765|  1.72k|    part->lastreadstatus = sz;
  766|  1.72k|    break;
  767|  3.94k|  }
  768|       |
  769|  3.94k|  return sz;
  770|  3.94k|}
mime.c:mime_subparts_read:
  928|  1.38k|{
  929|  1.38k|  curl_mime *mime = (curl_mime *)instream;
  930|  1.38k|  size_t cursize = 0;
  931|  1.38k|  (void)size;  /* Always 1 */
  932|       |
  933|  1.38k|  if(++call_depth > MAX_MIME_LEVELS)
  ------------------
  |  |   47|  1.38k|#define MAX_MIME_LEVELS 40 /* avoid deep nesting */
  ------------------
  |  Branch (933:6): [True: 0, False: 1.38k]
  ------------------
  934|      0|    return READ_ERROR;
  ------------------
  |  |   49|      0|#define READ_ERROR   ((size_t)-1)
  ------------------
  935|       |
  936|  23.4k|  while(nitems) {
  ------------------
  |  Branch (936:9): [True: 22.5k, False: 829]
  ------------------
  937|  22.5k|    size_t sz = 0;
  938|  22.5k|    curl_mimepart *part = mime->state.ptr;
  939|  22.5k|    switch(mime->state.state) {
  940|  1.05k|    case MIMESTATE_BEGIN:
  ------------------
  |  Branch (940:5): [True: 1.05k, False: 21.5k]
  ------------------
  941|  1.05k|    case MIMESTATE_BODY:
  ------------------
  |  Branch (941:5): [True: 0, False: 22.5k]
  ------------------
  942|  1.05k|      mimesetstate(&mime->state, MIMESTATE_BOUNDARY1, mime->firstpart);
  943|       |      /* The first boundary always follows the header termination empty line,
  944|       |         so is always preceded by a CRLF. We can then spare 2 characters
  945|       |         by skipping the leading CRLF in boundary. */
  946|  1.05k|      mime->state.offset += 2;
  947|  1.05k|      break;
  948|  6.51k|    case MIMESTATE_BOUNDARY1:
  ------------------
  |  Branch (948:5): [True: 6.51k, False: 16.0k]
  ------------------
  949|  6.51k|      sz = readback_bytes(&mime->state, buffer, nitems, STRCONST("\r\n--"),
  ------------------
  |  | 1297|  6.51k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|  6.51k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  950|  6.51k|                          STRCONST(""));
  ------------------
  |  | 1297|  6.51k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|  6.51k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  951|  6.51k|      if(!sz)
  ------------------
  |  Branch (951:10): [True: 3.25k, False: 3.25k]
  ------------------
  952|  3.25k|        mimesetstate(&mime->state, MIMESTATE_BOUNDARY2, part);
  953|  6.51k|      break;
  954|  9.27k|    case MIMESTATE_BOUNDARY2:
  ------------------
  |  Branch (954:5): [True: 9.27k, False: 13.3k]
  ------------------
  955|  9.27k|      if(part)
  ------------------
  |  Branch (955:10): [True: 6.67k, False: 2.59k]
  ------------------
  956|  6.67k|        sz = readback_bytes(&mime->state, buffer, nitems, mime->boundary,
  957|  6.67k|                            MIME_BOUNDARY_LEN, STRCONST("\r\n"));
  ------------------
  |  |   97|  6.67k|#define MIME_BOUNDARY_LEN (MIME_BOUNDARY_DASHES + MIME_RAND_BOUNDARY_CHARS)
  |  |  ------------------
  |  |  |  |   28|  6.67k|#define MIME_BOUNDARY_DASHES            24  /* leading boundary dashes */
  |  |  ------------------
  |  |               #define MIME_BOUNDARY_LEN (MIME_BOUNDARY_DASHES + MIME_RAND_BOUNDARY_CHARS)
  |  |  ------------------
  |  |  |  |   29|  6.67k|#define MIME_RAND_BOUNDARY_CHARS        22  /* Nb. of random boundary chars. */
  |  |  ------------------
  ------------------
                                          MIME_BOUNDARY_LEN, STRCONST("\r\n"));
  ------------------
  |  | 1297|  6.67k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|  6.67k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  958|  2.59k|      else
  959|  2.59k|        sz = readback_bytes(&mime->state, buffer, nitems, mime->boundary,
  960|  2.59k|                            MIME_BOUNDARY_LEN, STRCONST("--\r\n"));
  ------------------
  |  |   97|  2.59k|#define MIME_BOUNDARY_LEN (MIME_BOUNDARY_DASHES + MIME_RAND_BOUNDARY_CHARS)
  |  |  ------------------
  |  |  |  |   28|  2.59k|#define MIME_BOUNDARY_DASHES            24  /* leading boundary dashes */
  |  |  ------------------
  |  |               #define MIME_BOUNDARY_LEN (MIME_BOUNDARY_DASHES + MIME_RAND_BOUNDARY_CHARS)
  |  |  ------------------
  |  |  |  |   29|  2.59k|#define MIME_RAND_BOUNDARY_CHARS        22  /* Nb. of random boundary chars. */
  |  |  ------------------
  ------------------
                                          MIME_BOUNDARY_LEN, STRCONST("--\r\n"));
  ------------------
  |  | 1297|  2.59k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|  2.59k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  961|  9.27k|      if(!sz) {
  ------------------
  |  Branch (961:10): [True: 2.73k, False: 6.54k]
  ------------------
  962|  2.73k|        mimesetstate(&mime->state, MIMESTATE_CONTENT, part);
  963|  2.73k|      }
  964|  9.27k|      break;
  965|  5.23k|    case MIMESTATE_CONTENT:
  ------------------
  |  Branch (965:5): [True: 5.23k, False: 17.3k]
  ------------------
  966|  5.23k|      if(!part) {
  ------------------
  |  Branch (966:10): [True: 512, False: 4.72k]
  ------------------
  967|    512|        mimesetstate(&mime->state, MIMESTATE_END, NULL);
  968|    512|        break;
  969|    512|      }
  970|  4.72k|      sz = readback_part(part, buffer, nitems, hasread, call_depth);
  971|  4.72k|      switch(sz) {
  ------------------
  |  Branch (971:14): [True: 2.23k, False: 2.48k]
  ------------------
  972|      0|      case CURL_READFUNC_ABORT:
  ------------------
  |  |  392|      0|#define CURL_READFUNC_ABORT 0x10000000
  ------------------
  |  Branch (972:7): [True: 0, False: 4.72k]
  ------------------
  973|      0|      case CURL_READFUNC_PAUSE:
  ------------------
  |  |  395|      0|#define CURL_READFUNC_PAUSE 0x10000001
  ------------------
  |  Branch (973:7): [True: 0, False: 4.72k]
  ------------------
  974|     29|      case READ_ERROR:
  ------------------
  |  |   49|     29|#define READ_ERROR   ((size_t)-1)
  ------------------
  |  Branch (974:7): [True: 29, False: 4.69k]
  ------------------
  975|     36|      case STOP_FILLING:
  ------------------
  |  |   50|     36|#define STOP_FILLING ((size_t)-2)
  ------------------
  |  Branch (975:7): [True: 7, False: 4.71k]
  ------------------
  976|     36|        return cursize ? cursize : sz;
  ------------------
  |  Branch (976:16): [True: 22, False: 14]
  ------------------
  977|  2.19k|      case 0:
  ------------------
  |  Branch (977:7): [True: 2.19k, False: 2.52k]
  ------------------
  978|  2.19k|        mimesetstate(&mime->state, MIMESTATE_BOUNDARY1, part->nextpart);
  979|  2.19k|        break;
  980|  4.72k|      }
  981|  4.68k|      break;
  982|  4.68k|    case MIMESTATE_END:
  ------------------
  |  Branch (982:5): [True: 516, False: 22.0k]
  ------------------
  983|    516|      return cursize;
  984|      0|    default:
  ------------------
  |  Branch (984:5): [True: 0, False: 22.5k]
  ------------------
  985|      0|      break;    /* other values not used in mime state. */
  986|  22.5k|    }
  987|       |
  988|       |    /* Bump buffer and counters according to read size. */
  989|  22.0k|    cursize += sz;
  990|  22.0k|    buffer += sz;
  991|  22.0k|    nitems -= sz;
  992|  22.0k|  }
  993|       |
  994|    829|  return cursize;
  995|  1.38k|}
mime.c:search_header:
  258|  10.5k|{
  259|  10.5k|  char *value = NULL;
  260|       |
  261|  21.2k|  for(; !value && hdrlist; hdrlist = hdrlist->next)
  ------------------
  |  Branch (261:9): [True: 21.1k, False: 53]
  |  Branch (261:19): [True: 10.6k, False: 10.4k]
  ------------------
  262|  10.6k|    value = match_header(hdrlist, hdr, len);
  263|       |
  264|  10.5k|  return value;
  265|  10.5k|}
mime.c:content_type_match:
 1689|  1.36k|{
 1690|  1.36k|  if(contenttype && curl_strnequal(contenttype, target, len))
  ------------------
  |  Branch (1690:6): [True: 1.36k, False: 0]
  |  Branch (1690:21): [True: 608, False: 759]
  ------------------
 1691|    608|    switch(contenttype[len]) {
  ------------------
  |  Branch (1691:12): [True: 608, False: 0]
  ------------------
 1692|    608|    case '\0':
  ------------------
  |  Branch (1692:5): [True: 608, False: 0]
  ------------------
 1693|    608|    case '\t':
  ------------------
  |  Branch (1693:5): [True: 0, False: 608]
  ------------------
 1694|    608|    case '\r':
  ------------------
  |  Branch (1694:5): [True: 0, False: 608]
  ------------------
 1695|    608|    case '\n':
  ------------------
  |  Branch (1695:5): [True: 0, False: 608]
  ------------------
 1696|    608|    case ' ':
  ------------------
  |  Branch (1696:5): [True: 0, False: 608]
  ------------------
 1697|    608|    case ';':
  ------------------
  |  Branch (1697:5): [True: 0, False: 608]
  ------------------
 1698|    608|      return TRUE;
  ------------------
  |  | 1045|    608|#define TRUE true
  ------------------
 1699|    608|    }
 1700|    759|  return FALSE;
  ------------------
  |  | 1048|    759|#define FALSE false
  ------------------
 1701|  1.36k|}
mime.c:add_content_disposition:
 1708|  3.84k|{
 1709|  3.84k|  if(!disposition)
  ------------------
  |  Branch (1709:6): [True: 2.33k, False: 1.50k]
  ------------------
 1710|  2.33k|    if(part->filename || part->name ||
  ------------------
  |  Branch (1710:8): [True: 573, False: 1.76k]
  |  Branch (1710:26): [True: 308, False: 1.45k]
  ------------------
 1711|  1.45k|       (contenttype && !curl_strnequal(contenttype, "multipart/", 10)))
  ------------------
  |  Branch (1711:9): [True: 786, False: 670]
  |  Branch (1711:24): [True: 178, False: 608]
  ------------------
 1712|  1.05k|      disposition = DISPOSITION_DEFAULT;
  ------------------
  |  |   40|  1.05k|#define DISPOSITION_DEFAULT             "attachment"
  ------------------
 1713|  3.84k|  if(disposition && curl_strequal(disposition, "attachment") &&
  ------------------
  |  Branch (1713:6): [True: 2.56k, False: 1.27k]
  |  Branch (1713:21): [True: 1.05k, False: 1.50k]
  ------------------
 1714|  1.05k|     !part->name && !part->filename)
  ------------------
  |  Branch (1714:6): [True: 428, False: 631]
  |  Branch (1714:21): [True: 178, False: 250]
  ------------------
 1715|    178|    disposition = NULL;
 1716|  3.84k|  if(disposition) {
  ------------------
  |  Branch (1716:6): [True: 2.38k, False: 1.45k]
  ------------------
 1717|  2.38k|    CURLcode result = CURLE_OK;
 1718|  2.38k|    char *name = NULL;
 1719|  2.38k|    char *filename = NULL;
 1720|       |    /* The mail (and legacy mime_formescape) strategy quotes the name and
 1721|       |       filename with a backslash and has no in-band way to represent a CR or
 1722|       |       LF, so one embedded in the value would split the generated header. The
 1723|       |       form strategy percent-encodes CR/LF (see escape_string) and is safe. */
 1724|  2.38k|    bool backslash = (strategy == MIMESTRATEGY_MAIL) ||
  ------------------
  |  Branch (1724:22): [True: 0, False: 2.38k]
  ------------------
 1725|  2.38k|                     (data && data->set.mime_formescape);
  ------------------
  |  Branch (1725:23): [True: 2.38k, False: 0]
  |  Branch (1725:31): [True: 4, False: 2.38k]
  ------------------
 1726|  2.38k|    if(backslash &&
  ------------------
  |  Branch (1726:8): [True: 4, False: 2.38k]
  ------------------
 1727|      4|       ((part->name && part->name[strcspn(part->name, "\r\n")]) ||
  ------------------
  |  Branch (1727:10): [True: 2, False: 2]
  |  Branch (1727:24): [True: 0, False: 2]
  ------------------
 1728|      4|        (part->filename && part->filename[strcspn(part->filename, "\r\n")])))
  ------------------
  |  Branch (1728:10): [True: 1, False: 3]
  |  Branch (1728:28): [True: 0, False: 1]
  ------------------
 1729|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1730|       |
 1731|  2.38k|    if(part->name) {
  ------------------
  |  Branch (1731:8): [True: 1.11k, False: 1.26k]
  ------------------
 1732|  1.11k|      name = escape_string(data, part->name, strategy);
 1733|  1.11k|      if(!name)
  ------------------
  |  Branch (1733:10): [True: 0, False: 1.11k]
  ------------------
 1734|      0|        return CURLE_OUT_OF_MEMORY;
 1735|  1.11k|    }
 1736|  2.38k|    if(part->filename) {
  ------------------
  |  Branch (1736:8): [True: 992, False: 1.39k]
  ------------------
 1737|    992|      filename = escape_string(data, part->filename, strategy);
 1738|    992|      if(!filename)
  ------------------
  |  Branch (1738:10): [True: 0, False: 992]
  ------------------
 1739|      0|        result = CURLE_OUT_OF_MEMORY;
 1740|    992|    }
 1741|  2.38k|    if(!result)
  ------------------
  |  Branch (1741:8): [True: 2.38k, False: 0]
  ------------------
 1742|  2.38k|      result = Curl_mime_add_header(&part->curlheaders,
 1743|  2.38k|                                    "Content-Disposition: %s%s%s%s%s%s%s",
 1744|  2.38k|                                    disposition,
 1745|  2.38k|                                    name ? "; name=\"" : "",
  ------------------
  |  Branch (1745:37): [True: 1.11k, False: 1.26k]
  ------------------
 1746|  2.38k|                                    name ? name : "",
  ------------------
  |  Branch (1746:37): [True: 1.11k, False: 1.26k]
  ------------------
 1747|  2.38k|                                    name ? "\"" : "",
  ------------------
  |  Branch (1747:37): [True: 1.11k, False: 1.26k]
  ------------------
 1748|  2.38k|                                    filename ? "; filename=\"" : "",
  ------------------
  |  Branch (1748:37): [True: 992, False: 1.39k]
  ------------------
 1749|  2.38k|                                    filename ? filename : "",
  ------------------
  |  Branch (1749:37): [True: 992, False: 1.39k]
  ------------------
 1750|  2.38k|                                    filename ? "\"" : "");
  ------------------
  |  Branch (1750:37): [True: 992, False: 1.39k]
  ------------------
 1751|  2.38k|    curlx_safefree(name);
  ------------------
  |  | 1332|  2.38k|  do {                      \
  |  | 1333|  2.38k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  2.38k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  2.38k|    (ptr) = NULL;           \
  |  | 1335|  2.38k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 2.38k]
  |  |  ------------------
  ------------------
 1752|  2.38k|    curlx_safefree(filename);
  ------------------
  |  | 1332|  2.38k|  do {                      \
  |  | 1333|  2.38k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  2.38k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  2.38k|    (ptr) = NULL;           \
  |  | 1335|  2.38k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 2.38k]
  |  |  ------------------
  ------------------
 1753|  2.38k|    if(result)
  ------------------
  |  Branch (1753:8): [True: 0, False: 2.38k]
  ------------------
 1754|      0|      return result;
 1755|  2.38k|  }
 1756|  3.84k|  return CURLE_OK;
 1757|  3.84k|}
mime.c:escape_string:
  199|  2.10k|{
  200|  2.10k|  CURLcode result;
  201|  2.10k|  struct dynbuf db;
  202|  2.10k|  const char * const *table;
  203|  2.10k|  const char * const *p;
  204|       |  /* replace first character by rest of string. */
  205|  2.10k|  static const char * const mimetable[] = {
  206|  2.10k|    "\\\\\\",
  207|  2.10k|    "\"\\\"",
  208|  2.10k|    NULL
  209|  2.10k|  };
  210|       |  /* WHATWG HTML living standard 4.10.21.8 2 specifies:
  211|       |     For field names and filenames for file fields, the result of the
  212|       |     encoding in the previous bullet point must be escaped by replacing
  213|       |     any 0x0A (LF) bytes with the byte sequence `%0A`, 0x0D (CR) with `%0D`
  214|       |     and 0x22 (") with `%22`.
  215|       |     The user agent must not perform any other escapes. */
  216|  2.10k|  static const char * const formtable[] = {
  217|  2.10k|    "\"%22",
  218|  2.10k|    "\r%0D",
  219|  2.10k|    "\n%0A",
  220|  2.10k|    NULL
  221|  2.10k|  };
  222|       |
  223|  2.10k|  table = formtable;
  224|       |  /* data can be NULL when this function is called indirectly from
  225|       |     curl_formget(). */
  226|  2.10k|  if(strategy == MIMESTRATEGY_MAIL || (data && data->set.mime_formescape))
  ------------------
  |  Branch (226:6): [True: 0, False: 2.10k]
  |  Branch (226:40): [True: 2.10k, False: 0]
  |  Branch (226:48): [True: 3, False: 2.10k]
  ------------------
  227|      3|    table = mimetable;
  228|       |
  229|  2.10k|  curlx_dyn_init(&db, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|  2.10k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  230|       |
  231|   144k|  for(result = curlx_dyn_addn(&db, STRCONST("")); !result && *src; src++) {
  ------------------
  |  | 1297|  2.10k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|  2.10k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (231:51): [True: 144k, False: 0]
  |  Branch (231:62): [True: 142k, False: 2.10k]
  ------------------
  232|   569k|    for(p = table; *p && **p != *src; p++)
  ------------------
  |  Branch (232:20): [True: 427k, False: 142k]
  |  Branch (232:26): [True: 427k, False: 602]
  ------------------
  233|   427k|      ;
  234|       |
  235|   142k|    if(*p)
  ------------------
  |  Branch (235:8): [True: 602, False: 142k]
  ------------------
  236|    602|      result = curlx_dyn_add(&db, *p + 1);
  237|   142k|    else
  238|   142k|      result = curlx_dyn_addn(&db, src, 1);
  239|   142k|  }
  240|       |
  241|  2.10k|  return curlx_dyn_ptr(&db);
  242|  2.10k|}
mime.c:add_content_type:
 1643|  2.23k|{
 1644|  2.23k|  return Curl_mime_add_header(slp, "Content-Type: %s%s%s", type,
 1645|  2.23k|                              boundary ? "; boundary=" : "",
  ------------------
  |  Branch (1645:31): [True: 1.36k, False: 874]
  ------------------
 1646|  2.23k|                              boundary ? boundary : "");
  ------------------
  |  Branch (1646:31): [True: 1.36k, False: 874]
  ------------------
 1647|  2.23k|}
mime.c:cr_mime_init:
 1900|    608|{
 1901|    608|  struct cr_mime_ctx *ctx = reader->ctx;
 1902|    608|  (void)data;
 1903|    608|  ctx->total_len = -1;
 1904|    608|  ctx->read_len = 0;
 1905|    608|  Curl_bufq_init2(&ctx->tmpbuf, 1024, 1, BUFQ_OPT_NO_SPARES);
  ------------------
  |  |  115|    608|#define BUFQ_OPT_NO_SPARES   (1 << 1)
  ------------------
 1906|    608|  return CURLE_OK;
 1907|    608|}
mime.c:cr_mime_read:
 1922|    554|{
 1923|    554|  struct cr_mime_ctx *ctx = reader->ctx;
 1924|    554|  CURLcode result = CURLE_OK;
 1925|    554|  size_t nread;
 1926|    554|  char tmp[256];
 1927|       |
 1928|       |  /* Once we have errored, we will return the same error forever */
 1929|    554|  if(ctx->errored) {
  ------------------
  |  Branch (1929:6): [True: 0, False: 554]
  ------------------
 1930|      0|    CURL_TRC_READ(data, "cr_mime_read(len=%zu) is errored -> %d, eos=0",
  ------------------
  |  |  163|      0|  do {                                                    \
  |  |  164|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|      0|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1931|      0|                  blen, (int)ctx->error_result);
 1932|      0|    *pnread = 0;
 1933|      0|    *peos = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1934|      0|    return ctx->error_result;
 1935|      0|  }
 1936|    554|  if(ctx->seen_eos) {
  ------------------
  |  Branch (1936:6): [True: 0, False: 554]
  ------------------
 1937|      0|    CURL_TRC_READ(data, "cr_mime_read(len=%zu) seen eos -> 0, eos=1", blen);
  ------------------
  |  |  163|      0|  do {                                                    \
  |  |  164|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|      0|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1938|      0|    *pnread = 0;
 1939|      0|    *peos = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1940|      0|    return CURLE_OK;
 1941|      0|  }
 1942|       |  /* respect length limitations */
 1943|    554|  if(ctx->total_len >= 0) {
  ------------------
  |  Branch (1943:6): [True: 548, False: 6]
  ------------------
 1944|    548|    curl_off_t remain = ctx->total_len - ctx->read_len;
 1945|    548|    if(remain <= 0)
  ------------------
  |  Branch (1945:8): [True: 0, False: 548]
  ------------------
 1946|      0|      blen = 0;
 1947|    548|    else if(remain < (curl_off_t)blen)
  ------------------
  |  Branch (1947:13): [True: 548, False: 0]
  ------------------
 1948|    548|      blen = (size_t)remain;
 1949|    548|  }
 1950|       |
 1951|    554|  if(!Curl_bufq_is_empty(&ctx->tmpbuf)) {
  ------------------
  |  Branch (1951:6): [True: 0, False: 554]
  ------------------
 1952|      0|    result = Curl_bufq_read(&ctx->tmpbuf, (unsigned char *)buf, blen, &nread);
 1953|      0|    if(result) {
  ------------------
  |  Branch (1953:8): [True: 0, False: 0]
  ------------------
 1954|      0|      ctx->errored = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1955|      0|      ctx->error_result = result;
 1956|      0|      return result;
 1957|      0|    }
 1958|      0|  }
 1959|    554|  else if(blen <= 4) {
  ------------------
  |  Branch (1959:11): [True: 0, False: 554]
  ------------------
 1960|       |    /* Curl_mime_read() may go into an infinite loop when reading
 1961|       |     * via a base64 encoder, as it stalls when the read buffer is too small
 1962|       |     * to contain a complete 3-byte encoding. Read into a larger buffer
 1963|       |     * and use that until empty. */
 1964|      0|    CURL_TRC_READ(data, "cr_mime_read(len=%zu), small read, using tmp", blen);
  ------------------
  |  |  163|      0|  do {                                                    \
  |  |  164|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|      0|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1965|      0|    nread = Curl_mime_read(tmp, 1, sizeof(tmp), ctx->part);
 1966|      0|    if(nread <= sizeof(tmp)) {
  ------------------
  |  Branch (1966:8): [True: 0, False: 0]
  ------------------
 1967|      0|      size_t n;
 1968|      0|      result = Curl_bufq_write(&ctx->tmpbuf, (unsigned char *)tmp, nread, &n);
 1969|      0|      if(result) {
  ------------------
  |  Branch (1969:10): [True: 0, False: 0]
  ------------------
 1970|      0|        ctx->errored = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1971|      0|        ctx->error_result = result;
 1972|      0|        return result;
 1973|      0|      }
 1974|       |      /* stored it, read again */
 1975|      0|      result = Curl_bufq_cread(&ctx->tmpbuf, buf, blen, &nread);
 1976|      0|      if(result) {
  ------------------
  |  Branch (1976:10): [True: 0, False: 0]
  ------------------
 1977|      0|        ctx->errored = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1978|      0|        ctx->error_result = result;
 1979|      0|        return result;
 1980|      0|      }
 1981|      0|    }
 1982|      0|  }
 1983|    554|  else
 1984|    554|    nread = Curl_mime_read(buf, 1, blen, ctx->part);
 1985|       |
 1986|    554|  CURL_TRC_READ(data, "cr_mime_read(len=%zu), mime_read() -> %zu",
  ------------------
  |  |  163|    554|  do {                                                    \
  |  |  164|    554|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  329|    554|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  1.10k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 554, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 554]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  1.10k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|    554|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|    554|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|    554|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 554]
  |  |  ------------------
  ------------------
 1987|    554|                blen, nread);
 1988|       |
 1989|    554|  switch(nread) {
 1990|      3|  case 0:
  ------------------
  |  Branch (1990:3): [True: 3, False: 551]
  ------------------
 1991|      3|    if((ctx->total_len >= 0) && (ctx->read_len < ctx->total_len)) {
  ------------------
  |  Branch (1991:8): [True: 0, False: 3]
  |  Branch (1991:33): [True: 0, False: 0]
  ------------------
 1992|      0|      failf(data, "client mime read EOF fail, "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1993|      0|            "only %" FMT_OFF_T "/%" FMT_OFF_T
 1994|      0|            " of needed bytes read", ctx->read_len, ctx->total_len);
 1995|      0|      return CURLE_READ_ERROR;
 1996|      0|    }
 1997|      3|    *pnread = 0;
 1998|      3|    *peos = TRUE;
  ------------------
  |  | 1045|      3|#define TRUE true
  ------------------
 1999|      3|    ctx->seen_eos = TRUE;
  ------------------
  |  | 1045|      3|#define TRUE true
  ------------------
 2000|      3|    break;
 2001|       |
 2002|      0|  case CURL_READFUNC_ABORT:
  ------------------
  |  |  392|      0|#define CURL_READFUNC_ABORT 0x10000000
  ------------------
  |  Branch (2002:3): [True: 0, False: 554]
  ------------------
 2003|      0|    failf(data, "operation aborted by callback");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2004|      0|    *pnread = 0;
 2005|      0|    *peos = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 2006|      0|    ctx->errored = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2007|      0|    ctx->error_result = CURLE_ABORTED_BY_CALLBACK;
 2008|      0|    result = CURLE_ABORTED_BY_CALLBACK;
 2009|      0|    break;
 2010|       |
 2011|      0|  case CURL_READFUNC_PAUSE:
  ------------------
  |  |  395|      0|#define CURL_READFUNC_PAUSE 0x10000001
  ------------------
  |  Branch (2011:3): [True: 0, False: 554]
  ------------------
 2012|       |    /* CURL_READFUNC_PAUSE pauses read callbacks that feed socket writes */
 2013|      0|    CURL_TRC_READ(data, "cr_mime_read(len=%zu), paused by callback", blen);
  ------------------
  |  |  163|      0|  do {                                                    \
  |  |  164|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|      0|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2014|      0|    *pnread = 0;
 2015|      0|    *peos = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 2016|      0|    result = Curl_xfer_pause_send(data, TRUE);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2017|      0|    break; /* nothing was read */
 2018|       |
 2019|      0|  case STOP_FILLING:
  ------------------
  |  |   50|      0|#define STOP_FILLING ((size_t)-2)
  ------------------
  |  Branch (2019:3): [True: 0, False: 554]
  ------------------
 2020|     12|  case READ_ERROR:
  ------------------
  |  |   49|     12|#define READ_ERROR   ((size_t)-1)
  ------------------
  |  Branch (2020:3): [True: 12, False: 542]
  ------------------
 2021|     12|    failf(data, "read error getting mime data");
  ------------------
  |  |   62|     12|#define failf Curl_failf
  ------------------
 2022|     12|    *pnread = 0;
 2023|     12|    *peos = FALSE;
  ------------------
  |  | 1048|     12|#define FALSE false
  ------------------
 2024|     12|    ctx->errored = TRUE;
  ------------------
  |  | 1045|     12|#define TRUE true
  ------------------
 2025|     12|    ctx->error_result = CURLE_READ_ERROR;
 2026|     12|    result = CURLE_READ_ERROR;
 2027|     12|    break;
 2028|       |
 2029|    539|  default:
  ------------------
  |  Branch (2029:3): [True: 539, False: 15]
  ------------------
 2030|    539|    if(nread > blen) {
  ------------------
  |  Branch (2030:8): [True: 0, False: 539]
  ------------------
 2031|       |      /* the read function returned a too large value */
 2032|      0|      failf(data, "read function returned funny value");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2033|      0|      *pnread = 0;
 2034|      0|      *peos = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 2035|      0|      ctx->errored = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2036|      0|      ctx->error_result = CURLE_READ_ERROR;
 2037|      0|      return CURLE_READ_ERROR;
 2038|      0|    }
 2039|    539|    ctx->read_len += nread;
 2040|    539|    if(ctx->total_len >= 0)
  ------------------
  |  Branch (2040:8): [True: 536, False: 3]
  ------------------
 2041|    536|      ctx->seen_eos = (ctx->read_len >= ctx->total_len);
 2042|    539|    *pnread = nread;
 2043|    539|    *peos = (bool)ctx->seen_eos;
 2044|    539|    break;
 2045|    554|  }
 2046|       |
 2047|    554|  CURL_TRC_READ(data, "cr_mime_read(len=%zu, total=%" FMT_OFF_T
  ------------------
  |  |  163|    554|  do {                                                    \
  |  |  164|    554|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  329|    554|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  1.10k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 554, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 554]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  1.10k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|    554|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|    554|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|    554|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 554]
  |  |  ------------------
  ------------------
 2048|    554|                ", read=%" FMT_OFF_T ") -> %d, %zu, %d", blen,
 2049|    554|                ctx->total_len, ctx->read_len, (int)result, *pnread, *peos);
 2050|    554|  return result;
 2051|    554|}
mime.c:cr_mime_close:
 1911|    608|{
 1912|    608|  struct cr_mime_ctx *ctx = reader->ctx;
 1913|    608|  (void)data;
 1914|    608|  Curl_bufq_free(&ctx->tmpbuf);
 1915|    608|}
mime.c:cr_mime_needs_rewind:
 2055|      1|{
 2056|      1|  struct cr_mime_ctx *ctx = reader->ctx;
 2057|      1|  (void)data;
 2058|      1|  return ctx->read_len > 0;
 2059|      1|}
mime.c:cr_mime_total_length:
 2063|  3.44k|{
 2064|  3.44k|  struct cr_mime_ctx *ctx = reader->ctx;
 2065|  3.44k|  (void)data;
 2066|  3.44k|  return ctx->total_len;
 2067|  3.44k|}
mime.c:mime_rewind:
 1552|    608|{
 1553|    608|  return mime_part_rewind(part) == CURL_SEEKFUNC_OK ?
  ------------------
  |  |  382|    608|#define CURL_SEEKFUNC_OK       0
  ------------------
  |  Branch (1553:10): [True: 608, False: 0]
  ------------------
 1554|    608|         CURLE_OK : CURLE_SEND_FAIL_REWIND;
 1555|    608|}
mime.c:mime_size:
 1597|  3.89k|{
 1598|  3.89k|  curl_off_t size;
 1599|       |
 1600|  3.89k|  if(part->kind == MIMEKIND_MULTIPART)
  ------------------
  |  Branch (1600:6): [True: 1.36k, False: 2.53k]
  ------------------
 1601|  1.36k|    part->datasize = multipart_size(part->arg);
 1602|       |
 1603|  3.89k|  size = part->datasize;
 1604|       |
 1605|  3.89k|  if(part->encoder)
  ------------------
  |  Branch (1605:6): [True: 1.36k, False: 2.52k]
  ------------------
 1606|  1.36k|    size = part->encoder->sizefunc(part);
 1607|       |
 1608|  3.89k|  if(size >= 0 && !(part->flags & MIME_BODY_ONLY)) {
  ------------------
  |  |   35|  3.57k|#define MIME_BODY_ONLY          (1 << 1)
  ------------------
  |  Branch (1608:6): [True: 3.57k, False: 322]
  |  Branch (1608:19): [True: 3.02k, False: 544]
  ------------------
 1609|       |    /* Compute total part size. */
 1610|  3.02k|    size += slist_size(part->curlheaders, 2, NULL, 0);
 1611|  3.02k|    size += slist_size(part->userheaders, 2, STRCONST("Content-Type"));
  ------------------
  |  | 1297|  3.02k|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|  3.02k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 1612|  3.02k|    size += 2;    /* CRLF after headers. */
 1613|  3.02k|  }
 1614|  3.89k|  return size;
 1615|  3.89k|}
mime.c:multipart_size:
 1571|  1.36k|{
 1572|  1.36k|  curl_off_t size;
 1573|  1.36k|  curl_off_t boundarysize;
 1574|  1.36k|  curl_mimepart *part;
 1575|       |
 1576|  1.36k|  if(!mime)
  ------------------
  |  Branch (1576:6): [True: 0, False: 1.36k]
  ------------------
 1577|      0|    return 0;           /* Not present -> empty. */
 1578|       |
 1579|  1.36k|  boundarysize = 4 + MIME_BOUNDARY_LEN + 2;
  ------------------
  |  |   97|  1.36k|#define MIME_BOUNDARY_LEN (MIME_BOUNDARY_DASHES + MIME_RAND_BOUNDARY_CHARS)
  |  |  ------------------
  |  |  |  |   28|  1.36k|#define MIME_BOUNDARY_DASHES            24  /* leading boundary dashes */
  |  |  ------------------
  |  |               #define MIME_BOUNDARY_LEN (MIME_BOUNDARY_DASHES + MIME_RAND_BOUNDARY_CHARS)
  |  |  ------------------
  |  |  |  |   29|  1.36k|#define MIME_RAND_BOUNDARY_CHARS        22  /* Nb. of random boundary chars. */
  |  |  ------------------
  ------------------
 1580|  1.36k|  size = boundarysize;  /* Final boundary - CRLF after headers. */
 1581|       |
 1582|  4.64k|  for(part = mime->firstpart; part; part = part->nextpart) {
  ------------------
  |  Branch (1582:31): [True: 3.28k, False: 1.36k]
  ------------------
 1583|  3.28k|    curl_off_t sz = mime_size(part);
 1584|       |
 1585|  3.28k|    if(sz < 0)
  ------------------
  |  Branch (1585:8): [True: 258, False: 3.02k]
  ------------------
 1586|    258|      size = sz;
 1587|       |
 1588|  3.28k|    if(size >= 0)
  ------------------
  |  Branch (1588:8): [True: 2.77k, False: 509]
  ------------------
 1589|  2.77k|      size += boundarysize + sz;
 1590|  3.28k|  }
 1591|       |
 1592|  1.36k|  return size;
 1593|  1.36k|}
mime.c:slist_size:
 1560|  6.05k|{
 1561|  6.05k|  size_t size = 0;
 1562|       |
 1563|  14.0k|  for(; s; s = s->next)
  ------------------
  |  Branch (1563:9): [True: 8.00k, False: 6.05k]
  ------------------
 1564|  8.00k|    if(!skip || !match_header(s, skip, skiplen))
  ------------------
  |  Branch (1564:8): [True: 4.70k, False: 3.30k]
  |  Branch (1564:17): [True: 3.30k, False: 0]
  ------------------
 1565|  8.00k|      size += strlen(s->data) + overhead;
 1566|  6.05k|  return size;
 1567|  6.05k|}

curl_mvsnprintf:
 1113|  18.1k|{
 1114|  18.1k|  int retcode;
 1115|  18.1k|  struct nsprintf info;
 1116|       |
 1117|  18.1k|  info.buffer = buffer;
 1118|  18.1k|  info.length = 0;
 1119|  18.1k|  info.max = maxlength;
 1120|       |
 1121|  18.1k|  retcode = formatf(&info, addbyter, format, args);
 1122|  18.1k|  if(info.max) {
  ------------------
  |  Branch (1122:6): [True: 18.1k, False: 0]
  ------------------
 1123|       |    /* we terminate this with a zero byte */
 1124|  18.1k|    if(info.max == info.length) {
  ------------------
  |  Branch (1124:8): [True: 0, False: 18.1k]
  ------------------
 1125|       |      /* we are at maximum, scrap the last letter */
 1126|      0|      info.buffer[-1] = 0;
 1127|      0|      DEBUGASSERT(retcode);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1127:7): [True: 0, False: 0]
  |  Branch (1127:7): [True: 0, False: 0]
  ------------------
 1128|      0|      retcode--; /* do not count the nul byte */
 1129|      0|    }
 1130|  18.1k|    else
 1131|  18.1k|      info.buffer[0] = 0;
 1132|  18.1k|  }
 1133|  18.1k|  return retcode;
 1134|  18.1k|}
curl_msnprintf:
 1137|  18.1k|{
 1138|  18.1k|  int retcode;
 1139|  18.1k|  va_list args; /* argument pointer */
 1140|  18.1k|  va_start(args, format);
 1141|  18.1k|  retcode = curl_mvsnprintf(buffer, maxlength, format, args);
 1142|       |  va_end(args);
 1143|  18.1k|  return retcode;
 1144|  18.1k|}
curlx_dyn_vprintf:
 1160|   147k|{
 1161|   147k|  struct asprintf info;
 1162|   147k|  info.b = dyn;
 1163|   147k|  info.merr = MERR_OK;
  ------------------
  |  |   27|   147k|#define MERR_OK        0
  ------------------
 1164|       |
 1165|   147k|  (void)formatf(&info, alloc_addbyter, format, args);
 1166|   147k|  if(info.merr) {
  ------------------
  |  Branch (1166:6): [True: 0, False: 147k]
  ------------------
 1167|      0|    curlx_dyn_free(info.b);
 1168|      0|    return info.merr;
 1169|      0|  }
 1170|   147k|  return 0;
 1171|   147k|}
curl_mvaprintf:
 1174|  14.7k|{
 1175|  14.7k|  struct asprintf info;
 1176|  14.7k|  struct dynbuf dyn;
 1177|  14.7k|  info.b = &dyn;
 1178|  14.7k|  curlx_dyn_init(info.b, DYN_APRINTF);
  ------------------
  |  |   70|  14.7k|#define DYN_APRINTF         8000000
  ------------------
 1179|  14.7k|  info.merr = MERR_OK;
  ------------------
  |  |   27|  14.7k|#define MERR_OK        0
  ------------------
 1180|       |
 1181|  14.7k|  (void)formatf(&info, alloc_addbyter, format, args);
 1182|  14.7k|  if(info.merr) {
  ------------------
  |  Branch (1182:6): [True: 0, False: 14.7k]
  ------------------
 1183|      0|    curlx_dyn_free(info.b);
 1184|      0|    return NULL;
 1185|      0|  }
 1186|  14.7k|  if(curlx_dyn_len(info.b))
  ------------------
  |  Branch (1186:6): [True: 14.7k, False: 0]
  ------------------
 1187|  14.7k|    return curlx_dyn_ptr(info.b);
 1188|      0|  return curlx_strdup("");
  ------------------
  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1189|  14.7k|}
curl_maprintf:
 1192|  8.76k|{
 1193|  8.76k|  va_list args;
 1194|  8.76k|  char *s;
 1195|  8.76k|  va_start(args, format);
 1196|  8.76k|  s = curl_mvaprintf(format, args);
 1197|       |  va_end(args);
 1198|  8.76k|  return s;
 1199|  8.76k|}
curl_mfprintf:
 1239|  1.25k|{
 1240|  1.25k|  int retcode;
 1241|  1.25k|  va_list args; /* argument pointer */
 1242|  1.25k|  va_start(args, format);
 1243|  1.25k|  retcode = formatf(fd, fputc_wrapper, format, args);
 1244|       |  va_end(args);
 1245|  1.25k|  return retcode;
 1246|  1.25k|}
mprintf.c:formatf:
  982|   181k|{
  983|   181k|  int done = 0;   /* number of characters written */
  984|   181k|  int i;
  985|   181k|  int ocount = 0; /* number of output segments */
  986|   181k|  int icount = 0; /* number of input arguments */
  987|       |
  988|   181k|  struct outsegment output[MAX_SEGMENTS];
  989|   181k|  struct va_input input[MAX_PARAMETERS];
  990|   181k|  char work[BUFFSIZE + 2];
  991|       |
  992|       |  /* Parse the format string */
  993|   181k|  if(parsefmt(format, output, input, &ocount, &icount, ap_save))
  ------------------
  |  Branch (993:6): [True: 0, False: 181k]
  ------------------
  994|      0|    return 0;
  995|       |
  996|   493k|  for(i = 0; i < ocount; i++) {
  ------------------
  |  Branch (996:14): [True: 311k, False: 181k]
  ------------------
  997|   311k|    struct outsegment *optr = &output[i];
  998|   311k|    struct va_input *iptr = &input[optr->input];
  999|   311k|    struct mproperty p;
 1000|   311k|    size_t outlen = optr->outlen;
 1001|       |
 1002|   311k|    if(outlen) {
  ------------------
  |  Branch (1002:8): [True: 97.0k, False: 214k]
  ------------------
 1003|  97.0k|      const char *str = optr->start;
 1004|   397k|      for(; outlen && *str; outlen--) {
  ------------------
  |  Branch (1004:13): [True: 300k, False: 97.0k]
  |  Branch (1004:23): [True: 300k, False: 0]
  ------------------
 1005|   300k|        if(stream(*str++, userp))
  ------------------
  |  Branch (1005:12): [True: 0, False: 300k]
  ------------------
 1006|      0|          return done;
 1007|   300k|        done++;
 1008|   300k|      }
 1009|  97.0k|      if(optr->flags & FLAGS_SUBSTR)
  ------------------
  |  Branch (1009:10): [True: 20.9k, False: 76.1k]
  ------------------
 1010|       |        /* this is a substring */
 1011|  20.9k|        continue;
 1012|  97.0k|    }
 1013|       |
 1014|   291k|    p.flags = optr->flags;
 1015|       |
 1016|       |    /* pick up the specified width */
 1017|   291k|    if(p.flags & FLAGS_WIDTHPARAM) {
  ------------------
  |  Branch (1017:8): [True: 0, False: 291k]
  ------------------
 1018|      0|      p.width = (int)input[optr->width].val.nums;
 1019|      0|      if(p.width < 0) {
  ------------------
  |  Branch (1019:10): [True: 0, False: 0]
  ------------------
 1020|       |        /* "A negative field width is taken as a '-' flag followed by a
 1021|       |           positive field width." */
 1022|      0|        if(p.width == INT_MIN)
  ------------------
  |  Branch (1022:12): [True: 0, False: 0]
  ------------------
 1023|      0|          p.width = INT_MAX;
 1024|      0|        else
 1025|      0|          p.width = -p.width;
 1026|      0|        p.flags |= FLAGS_LEFT;
 1027|      0|        p.flags &= ~(unsigned int)FLAGS_PAD_NIL;
 1028|      0|      }
 1029|      0|    }
 1030|   291k|    else
 1031|   291k|      p.width = optr->width;
 1032|       |
 1033|       |    /* pick up the specified precision */
 1034|   291k|    if(p.flags & FLAGS_PRECPARAM) {
  ------------------
  |  Branch (1034:8): [True: 10, False: 290k]
  ------------------
 1035|     10|      p.prec = (int)input[optr->precision].val.nums;
 1036|     10|      if(p.prec < 0)
  ------------------
  |  Branch (1036:10): [True: 0, False: 10]
  ------------------
 1037|       |        /* "A negative precision is taken as if the precision were
 1038|       |           omitted." */
 1039|      0|        p.prec = -1;
 1040|     10|    }
 1041|   290k|    else if(p.flags & FLAGS_PREC)
  ------------------
  |  Branch (1041:13): [True: 0, False: 290k]
  ------------------
 1042|      0|      p.prec = optr->precision;
 1043|   290k|    else
 1044|   290k|      p.prec = -1;
 1045|       |
 1046|   291k|    switch(iptr->type) {
 1047|   128k|    case MTYPE_INTU:
  ------------------
  |  Branch (1047:5): [True: 128k, False: 162k]
  ------------------
 1048|   128k|    case MTYPE_LONGU:
  ------------------
  |  Branch (1048:5): [True: 12, False: 290k]
  ------------------
 1049|   128k|    case MTYPE_LONGLONGU:
  ------------------
  |  Branch (1049:5): [True: 0, False: 291k]
  ------------------
 1050|   128k|      p.flags |= FLAGS_UNSIGNED;
 1051|   128k|      if(out_number(userp, stream, &p, iptr->val.numu, 0, work, &done))
  ------------------
  |  Branch (1051:10): [True: 0, False: 128k]
  ------------------
 1052|      0|        return done;
 1053|   128k|      break;
 1054|       |
 1055|   128k|    case MTYPE_INT:
  ------------------
  |  Branch (1055:5): [True: 21.9k, False: 269k]
  ------------------
 1056|  23.8k|    case MTYPE_LONG:
  ------------------
  |  Branch (1056:5): [True: 1.90k, False: 289k]
  ------------------
 1057|  23.8k|    case MTYPE_LONGLONG:
  ------------------
  |  Branch (1057:5): [True: 0, False: 291k]
  ------------------
 1058|  23.8k|      if(out_number(userp, stream, &p, iptr->val.numu,
  ------------------
  |  Branch (1058:10): [True: 0, False: 23.8k]
  ------------------
 1059|  23.8k|                    iptr->val.nums, work, &done))
 1060|      0|        return done;
 1061|  23.8k|      break;
 1062|       |
 1063|   138k|    case MTYPE_STRING:
  ------------------
  |  Branch (1063:5): [True: 138k, False: 152k]
  ------------------
 1064|   138k|      if(out_string(userp, stream, &p, iptr->val.str, &done))
  ------------------
  |  Branch (1064:10): [True: 0, False: 138k]
  ------------------
 1065|      0|        return done;
 1066|   138k|      break;
 1067|       |
 1068|   138k|    case MTYPE_PTR:
  ------------------
  |  Branch (1068:5): [True: 0, False: 291k]
  ------------------
 1069|      0|      if(out_pointer(userp, stream, &p, iptr->val.ptr, work, &done))
  ------------------
  |  Branch (1069:10): [True: 0, False: 0]
  ------------------
 1070|      0|        return done;
 1071|      0|      break;
 1072|       |
 1073|      0|    case MTYPE_DOUBLE:
  ------------------
  |  Branch (1073:5): [True: 0, False: 291k]
  ------------------
 1074|      0|    case MTYPE_LONGDOUBLE:
  ------------------
  |  Branch (1074:5): [True: 0, False: 291k]
  ------------------
 1075|      0|      if(out_double(userp, stream, &p, iptr->val.dnum, work, &done))
  ------------------
  |  Branch (1075:10): [True: 0, False: 0]
  ------------------
 1076|      0|        return done;
 1077|      0|      break;
 1078|       |
 1079|      0|    case MTYPE_INTPTR:
  ------------------
  |  Branch (1079:5): [True: 0, False: 291k]
  ------------------
 1080|       |      /* Answer the count of characters written. */
 1081|      0|      if(p.flags & FLAGS_LONGLONG)
  ------------------
  |  Branch (1081:10): [True: 0, False: 0]
  ------------------
 1082|      0|        *(int64_t *)iptr->val.ptr = (int64_t)done;
 1083|      0|      else if(p.flags & FLAGS_LONG)
  ------------------
  |  Branch (1083:15): [True: 0, False: 0]
  ------------------
 1084|      0|        *(long *)iptr->val.ptr = (long)done;
 1085|      0|      else if(!(p.flags & FLAGS_SHORT))
  ------------------
  |  Branch (1085:15): [True: 0, False: 0]
  ------------------
 1086|      0|        *(int *)iptr->val.ptr = done;
 1087|      0|      else
 1088|      0|        *(short *)iptr->val.ptr = (short)done;
 1089|      0|      break;
 1090|       |
 1091|      0|    default:
  ------------------
  |  Branch (1091:5): [True: 0, False: 291k]
  ------------------
 1092|      0|      break;
 1093|   291k|    }
 1094|   291k|  }
 1095|   181k|  return done;
 1096|   181k|}
mprintf.c:parsefmt:
  435|   181k|{
  436|   181k|  const char *fmt = format;
  437|   181k|  int param_num = 0;
  438|   181k|  int max_param = -1;
  439|   181k|  int i;
  440|   181k|  int ocount = 0;
  441|   181k|  unsigned char usedinput[MAX_PARAMETERS / 8];
  442|   181k|  size_t outlen = 0;
  443|   181k|  struct outsegment *optr;
  444|   181k|  int use_dollar = DOLLAR_UNKNOWN;
  445|   181k|  const char *start = fmt;
  446|       |
  447|       |  /* clear, set a bit for each used input */
  448|   181k|  memset(usedinput, 0, sizeof(usedinput));
  449|       |
  450|   773k|  while(*fmt) {
  ------------------
  |  Branch (450:9): [True: 591k, False: 181k]
  ------------------
  451|   591k|    if(*fmt == '%') {
  ------------------
  |  Branch (451:8): [True: 291k, False: 300k]
  ------------------
  452|   291k|      struct va_input *iptr;
  453|   291k|      FormatType type;
  454|   291k|      unsigned int flags = 0;
  455|   291k|      int width = 0;
  456|   291k|      int precision = 0;
  457|   291k|      int param = -1;
  458|   291k|      int rc;
  459|   291k|      fmt++;
  460|   291k|      outlen = (size_t)(fmt - start - 1);
  461|   291k|      if(*fmt == '%') {
  ------------------
  |  Branch (461:10): [True: 0, False: 291k]
  ------------------
  462|       |        /* this means a %% that should be output only as %. Create an output
  463|       |           segment. */
  464|      0|        if(outlen) {
  ------------------
  |  Branch (464:12): [True: 0, False: 0]
  ------------------
  465|      0|          optr = &out[ocount++];
  466|      0|          if(ocount > MAX_SEGMENTS)
  ------------------
  |  |   34|      0|#define MAX_SEGMENTS   128 /* number of output segments */
  ------------------
  |  Branch (466:14): [True: 0, False: 0]
  ------------------
  467|      0|            return PFMT_MANYSEGS;
  ------------------
  |  |  170|      0|#define PFMT_MANYSEGS   11 /* maxed out output segments */
  ------------------
  468|      0|          optr->input = 0;
  469|      0|          optr->flags = FLAGS_SUBSTR;
  470|      0|          optr->start = start;
  471|      0|          optr->outlen = outlen;
  472|      0|        }
  473|      0|        start = fmt;
  474|      0|        fmt++;
  475|      0|        continue; /* while */
  476|      0|      }
  477|       |
  478|   291k|      if(use_dollar != DOLLAR_NOPE) {
  ------------------
  |  Branch (478:10): [True: 178k, False: 112k]
  ------------------
  479|   178k|        param = dollarstring(fmt, &fmt);
  480|   178k|        if(param < 0) {
  ------------------
  |  Branch (480:12): [True: 178k, False: 0]
  ------------------
  481|   178k|          if(use_dollar == DOLLAR_USE)
  ------------------
  |  Branch (481:14): [True: 0, False: 178k]
  ------------------
  482|       |            /* illegal combo */
  483|      0|            return PFMT_DOLLAR;
  ------------------
  |  |  160|      0|#define PFMT_DOLLAR      1 /* bad dollar for main param */
  ------------------
  484|       |
  485|       |          /* we got no positional, get the next arg */
  486|   178k|          param = -1;
  487|   178k|          use_dollar = DOLLAR_NOPE;
  488|   178k|        }
  489|      0|        else
  490|      0|          use_dollar = DOLLAR_USE;
  491|   178k|      }
  492|       |
  493|   291k|      rc = parse_flags(&fmt, &flags, use_dollar, &precision, &width);
  494|   291k|      if(rc)
  ------------------
  |  Branch (494:10): [True: 0, False: 291k]
  ------------------
  495|      0|        return rc;
  496|       |
  497|   291k|      if(parse_conversion(*fmt, &flags, &type))
  ------------------
  |  Branch (497:10): [True: 0, False: 291k]
  ------------------
  498|      0|        continue;
  499|       |
  500|   291k|      if(flags & FLAGS_WIDTHPARAM) {
  ------------------
  |  Branch (500:10): [True: 0, False: 291k]
  ------------------
  501|      0|        if(width < 0)
  ------------------
  |  Branch (501:12): [True: 0, False: 0]
  ------------------
  502|      0|          width = param_num++;
  503|      0|        else {
  504|       |          /* if this identifies a parameter already used, this is illegal */
  505|      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]
  |  |  ------------------
  ------------------
  506|      0|            return PFMT_WIDTHARG;
  ------------------
  |  |  168|      0|#define PFMT_WIDTHARG    9 /* attempted to use same arg twice, for width */
  ------------------
  507|      0|        }
  508|      0|        if(width >= MAX_PARAMETERS)
  ------------------
  |  |   33|      0|#define MAX_PARAMETERS 128 /* number of input arguments */
  ------------------
  |  Branch (508:12): [True: 0, False: 0]
  ------------------
  509|      0|          return PFMT_MANYARGS;
  ------------------
  |  |  163|      0|#define PFMT_MANYARGS    4 /* too many input arguments used */
  ------------------
  510|      0|        if(width >= max_param)
  ------------------
  |  Branch (510:12): [True: 0, False: 0]
  ------------------
  511|      0|          max_param = width;
  512|       |
  513|      0|        in[width].type = MTYPE_WIDTH;
  514|       |        /* mark as used */
  515|      0|        mark_arg_used(usedinput, width);
  ------------------
  |  |  149|      0|#define mark_arg_used(x, y) ((x)[(y) / 8] |= (unsigned char)(1 << ((y) & 7)))
  ------------------
  516|      0|      }
  517|       |
  518|   291k|      if(flags & FLAGS_PRECPARAM) {
  ------------------
  |  Branch (518:10): [True: 10, False: 290k]
  ------------------
  519|     10|        if(precision < 0)
  ------------------
  |  Branch (519:12): [True: 10, False: 0]
  ------------------
  520|     10|          precision = param_num++;
  521|      0|        else {
  522|       |          /* if this identifies a parameter already used, this is illegal */
  523|      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]
  |  |  ------------------
  ------------------
  524|      0|            return PFMT_PRECARG;
  ------------------
  |  |  169|      0|#define PFMT_PRECARG    10 /* attempted to use same arg twice, for prec */
  ------------------
  525|      0|        }
  526|     10|        if(precision >= MAX_PARAMETERS)
  ------------------
  |  |   33|     10|#define MAX_PARAMETERS 128 /* number of input arguments */
  ------------------
  |  Branch (526:12): [True: 0, False: 10]
  ------------------
  527|      0|          return PFMT_MANYARGS;
  ------------------
  |  |  163|      0|#define PFMT_MANYARGS    4 /* too many input arguments used */
  ------------------
  528|     10|        if(precision >= max_param)
  ------------------
  |  Branch (528:12): [True: 10, False: 0]
  ------------------
  529|     10|          max_param = precision;
  530|       |
  531|     10|        in[precision].type = MTYPE_PRECISION;
  532|     10|        mark_arg_used(usedinput, precision);
  ------------------
  |  |  149|     10|#define mark_arg_used(x, y) ((x)[(y) / 8] |= (unsigned char)(1 << ((y) & 7)))
  ------------------
  533|     10|      }
  534|       |
  535|       |      /* Handle the specifier */
  536|   291k|      if(param < 0)
  ------------------
  |  Branch (536:10): [True: 291k, False: 0]
  ------------------
  537|   291k|        param = param_num++;
  538|   291k|      if(param >= MAX_PARAMETERS)
  ------------------
  |  |   33|   291k|#define MAX_PARAMETERS 128 /* number of input arguments */
  ------------------
  |  Branch (538:10): [True: 0, False: 291k]
  ------------------
  539|      0|        return PFMT_MANYARGS;
  ------------------
  |  |  163|      0|#define PFMT_MANYARGS    4 /* too many input arguments used */
  ------------------
  540|   291k|      if(param >= max_param)
  ------------------
  |  Branch (540:10): [True: 291k, False: 0]
  ------------------
  541|   291k|        max_param = param;
  542|       |
  543|   291k|      iptr = &in[param];
  544|   291k|      iptr->type = type;
  545|       |
  546|       |      /* mark this input as used */
  547|   291k|      mark_arg_used(usedinput, param);
  ------------------
  |  |  149|   291k|#define mark_arg_used(x, y) ((x)[(y) / 8] |= (unsigned char)(1 << ((y) & 7)))
  ------------------
  548|       |
  549|   291k|      fmt++;
  550|   291k|      optr = &out[ocount++];
  551|   291k|      if(ocount > MAX_SEGMENTS)
  ------------------
  |  |   34|   291k|#define MAX_SEGMENTS   128 /* number of output segments */
  ------------------
  |  Branch (551:10): [True: 0, False: 291k]
  ------------------
  552|      0|        return PFMT_MANYSEGS;
  ------------------
  |  |  170|      0|#define PFMT_MANYSEGS   11 /* maxed out output segments */
  ------------------
  553|   291k|      optr->input = (unsigned int)param;
  554|   291k|      optr->flags = flags;
  555|   291k|      optr->width = width;
  556|   291k|      optr->precision = precision;
  557|   291k|      optr->start = start;
  558|   291k|      optr->outlen = outlen;
  559|   291k|      start = fmt;
  560|   291k|    }
  561|   300k|    else
  562|   300k|      fmt++;
  563|   591k|  }
  564|       |
  565|       |  /* is there a trailing piece */
  566|   181k|  outlen = (size_t)(fmt - start);
  567|   181k|  if(outlen) {
  ------------------
  |  Branch (567:6): [True: 20.9k, False: 161k]
  ------------------
  568|  20.9k|    optr = &out[ocount++];
  569|  20.9k|    if(ocount > MAX_SEGMENTS)
  ------------------
  |  |   34|  20.9k|#define MAX_SEGMENTS   128 /* number of output segments */
  ------------------
  |  Branch (569:8): [True: 0, False: 20.9k]
  ------------------
  570|      0|      return PFMT_MANYSEGS;
  ------------------
  |  |  170|      0|#define PFMT_MANYSEGS   11 /* maxed out output segments */
  ------------------
  571|  20.9k|    optr->input = 0;
  572|  20.9k|    optr->flags = FLAGS_SUBSTR;
  573|  20.9k|    optr->start = start;
  574|  20.9k|    optr->outlen = outlen;
  575|  20.9k|  }
  576|       |
  577|       |  /* Read the arg list parameters into our data list */
  578|   472k|  for(i = 0; i < max_param + 1; i++) {
  ------------------
  |  Branch (578:14): [True: 291k, False: 181k]
  ------------------
  579|   291k|    struct va_input *iptr = &in[i];
  580|   291k|    if(!is_arg_used(usedinput, i))
  ------------------
  |  |  148|   291k|#define is_arg_used(x, y)   ((x)[(y) / 8] & (1 << ((y) & 7)))
  ------------------
  |  Branch (580:8): [True: 0, False: 291k]
  ------------------
  581|       |      /* bad input */
  582|      0|      return PFMT_INPUTGAP;
  ------------------
  |  |  167|      0|#define PFMT_INPUTGAP    8 /* gap in arguments */
  ------------------
  583|       |
  584|       |    /* based on the type, read the correct argument */
  585|   291k|    switch(iptr->type) {
  586|   138k|    case MTYPE_STRING:
  ------------------
  |  Branch (586:5): [True: 138k, False: 152k]
  ------------------
  587|   138k|      iptr->val.str = va_arg(arglist, const char *);
  588|   138k|      break;
  589|       |
  590|      0|    case MTYPE_INTPTR:
  ------------------
  |  Branch (590:5): [True: 0, False: 291k]
  ------------------
  591|      0|    case MTYPE_PTR:
  ------------------
  |  Branch (591:5): [True: 0, False: 291k]
  ------------------
  592|      0|      iptr->val.ptr = va_arg(arglist, void *);
  593|      0|      break;
  594|       |
  595|      0|    case MTYPE_LONGLONGU:
  ------------------
  |  Branch (595:5): [True: 0, False: 291k]
  ------------------
  596|      0|      iptr->val.numu = va_arg(arglist, uint64_t);
  597|      0|      break;
  598|       |
  599|      0|    case MTYPE_LONGLONG:
  ------------------
  |  Branch (599:5): [True: 0, False: 291k]
  ------------------
  600|      0|      iptr->val.nums = va_arg(arglist, int64_t);
  601|      0|      break;
  602|       |
  603|     12|    case MTYPE_LONGU:
  ------------------
  |  Branch (603:5): [True: 12, False: 291k]
  ------------------
  604|     12|      iptr->val.numu = va_arg(arglist, unsigned long);
  605|     12|      break;
  606|       |
  607|  1.90k|    case MTYPE_LONG:
  ------------------
  |  Branch (607:5): [True: 1.90k, False: 289k]
  ------------------
  608|  1.90k|      iptr->val.nums = va_arg(arglist, long);
  609|  1.90k|      break;
  610|       |
  611|   128k|    case MTYPE_INTU:
  ------------------
  |  Branch (611:5): [True: 128k, False: 162k]
  ------------------
  612|   128k|      iptr->val.numu = va_arg(arglist, unsigned int);
  613|   128k|      break;
  614|       |
  615|  21.9k|    case MTYPE_INT:
  ------------------
  |  Branch (615:5): [True: 21.9k, False: 269k]
  ------------------
  616|  21.9k|    case MTYPE_WIDTH:
  ------------------
  |  Branch (616:5): [True: 0, False: 291k]
  ------------------
  617|  21.9k|    case MTYPE_PRECISION:
  ------------------
  |  Branch (617:5): [True: 10, False: 291k]
  ------------------
  618|  21.9k|      iptr->val.nums = va_arg(arglist, int);
  619|  21.9k|      break;
  620|       |
  621|      0|    case MTYPE_DOUBLE:
  ------------------
  |  Branch (621:5): [True: 0, False: 291k]
  ------------------
  622|      0|      iptr->val.dnum = va_arg(arglist, double);
  623|      0|      break;
  624|       |
  625|      0|    case MTYPE_LONGDOUBLE:
  ------------------
  |  Branch (625:5): [True: 0, False: 291k]
  ------------------
  626|      0|      iptr->val.dnum = (double)va_arg(arglist, long double);
  627|      0|      break;
  628|       |
  629|      0|    default:
  ------------------
  |  Branch (629:5): [True: 0, False: 291k]
  ------------------
  630|      0|      DEBUGASSERT(NULL); /* unexpected */
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (630:7): [True: 0, False: 0]
  |  Branch (630:7): [True: 0, False: 0]
  ------------------
  631|      0|      break;
  632|   291k|    }
  633|   291k|  }
  634|   181k|  *ipieces = max_param + 1;
  635|   181k|  *opieces = ocount;
  636|       |
  637|   181k|  return PFMT_OK;
  ------------------
  |  |  159|   181k|#define PFMT_OK          0
  ------------------
  638|   181k|}
mprintf.c:dollarstring:
  139|   178k|{
  140|   178k|  curl_off_t num;
  141|   178k|  if(curlx_str_number(&p, &num, MAX_PARAMETERS) ||
  ------------------
  |  |   33|   178k|#define MAX_PARAMETERS 128 /* number of input arguments */
  ------------------
  |  Branch (141:6): [True: 64.5k, False: 113k]
  ------------------
  142|   113k|     curlx_str_single(&p, '$') || !num)
  ------------------
  |  Branch (142:6): [True: 113k, False: 0]
  |  Branch (142:35): [True: 0, False: 0]
  ------------------
  143|   178k|    return -1;
  144|      0|  *end = p;
  145|      0|  return (int)num - 1;
  146|   178k|}
mprintf.c:parse_flags:
  174|   291k|{
  175|   291k|  const char *fmt = *fmtp;
  176|   291k|  bool loopit = TRUE;
  ------------------
  |  | 1045|   291k|#define TRUE true
  ------------------
  177|   291k|  unsigned int flags = 0;
  178|   291k|  int width = 0;
  179|   291k|  int precision = 0;
  180|       |
  181|       |  /* Handle the flags */
  182|   406k|  do {
  183|   406k|    switch(*fmt++) {
  184|      0|    case ' ':
  ------------------
  |  Branch (184:5): [True: 0, False: 406k]
  ------------------
  185|      0|      flags |= FLAGS_SPACE;
  186|      0|      break;
  187|      0|    case '+':
  ------------------
  |  Branch (187:5): [True: 0, False: 406k]
  ------------------
  188|      0|      flags |= FLAGS_SHOWSIGN;
  189|      0|      break;
  190|      0|    case '-':
  ------------------
  |  Branch (190:5): [True: 0, False: 406k]
  ------------------
  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: 406k]
  ------------------
  195|      0|      flags |= FLAGS_ALT;
  196|      0|      break;
  197|     10|    case '.':
  ------------------
  |  Branch (197:5): [True: 10, False: 406k]
  ------------------
  198|     10|      if('*' == *fmt) {
  ------------------
  |  Branch (198:10): [True: 10, False: 0]
  ------------------
  199|       |        /* The precision is picked from a specified parameter */
  200|     10|        flags |= FLAGS_PRECPARAM;
  201|     10|        fmt++;
  202|       |
  203|     10|        if(use_dollar == DOLLAR_USE) {
  ------------------
  |  Branch (203:12): [True: 0, False: 10]
  ------------------
  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|     10|        else
  210|       |          /* get it from the next argument */
  211|     10|          precision = -1;
  212|     10|      }
  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|     10|      if((flags & (FLAGS_PREC | FLAGS_PRECPARAM)) ==
  ------------------
  |  Branch (226:10): [True: 0, False: 10]
  ------------------
  227|     10|         (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|     10|      break;
  232|     10|    case 'h':
  ------------------
  |  Branch (232:5): [True: 0, False: 406k]
  ------------------
  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|  1.90k|    case 'l':
  ------------------
  |  Branch (255:5): [True: 1.90k, False: 404k]
  ------------------
  256|  1.90k|      if(flags & FLAGS_LONG)
  ------------------
  |  Branch (256:10): [True: 0, False: 1.90k]
  ------------------
  257|      0|        flags |= FLAGS_LONGLONG;
  258|  1.90k|      else
  259|  1.90k|        flags |= FLAGS_LONG;
  260|  1.90k|      break;
  261|      0|    case 'L':
  ------------------
  |  Branch (261:5): [True: 0, False: 406k]
  ------------------
  262|      0|      flags |= FLAGS_LONGDOUBLE;
  263|      0|      break;
  264|      0|    case 'q':
  ------------------
  |  Branch (264:5): [True: 0, False: 406k]
  ------------------
  265|      0|      flags |= FLAGS_LONGLONG;
  266|      0|      break;
  267|     12|    case 'z':
  ------------------
  |  Branch (267:5): [True: 12, False: 406k]
  ------------------
  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|     12|      flags |= FLAGS_LONG;
  274|     12|#endif
  275|     12|      break;
  276|      0|    case 'O':
  ------------------
  |  Branch (276:5): [True: 0, False: 406k]
  ------------------
  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|   113k|    case '0':
  ------------------
  |  Branch (283:5): [True: 113k, False: 292k]
  ------------------
  284|   113k|      if(!(flags & FLAGS_LEFT))
  ------------------
  |  Branch (284:10): [True: 113k, False: 0]
  ------------------
  285|   113k|        flags |= FLAGS_PAD_NIL;
  286|   113k|      FALLTHROUGH();
  ------------------
  |  |  815|   113k|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  287|   113k|    case '1':
  ------------------
  |  Branch (287:5): [True: 0, False: 406k]
  ------------------
  288|   113k|    case '2':
  ------------------
  |  Branch (288:5): [True: 0, False: 406k]
  ------------------
  289|   113k|    case '3':
  ------------------
  |  Branch (289:5): [True: 0, False: 406k]
  ------------------
  290|   113k|    case '4':
  ------------------
  |  Branch (290:5): [True: 26, False: 406k]
  ------------------
  291|   113k|    case '5':
  ------------------
  |  Branch (291:5): [True: 0, False: 406k]
  ------------------
  292|   113k|    case '6':
  ------------------
  |  Branch (292:5): [True: 0, False: 406k]
  ------------------
  293|   113k|    case '7':
  ------------------
  |  Branch (293:5): [True: 0, False: 406k]
  ------------------
  294|   113k|    case '8':
  ------------------
  |  Branch (294:5): [True: 0, False: 406k]
  ------------------
  295|   113k|    case '9': {
  ------------------
  |  Branch (295:5): [True: 0, False: 406k]
  ------------------
  296|   113k|      curl_off_t num;
  297|   113k|      flags |= FLAGS_WIDTH;
  298|   113k|      fmt--;
  299|   113k|      if(curlx_str_number(&fmt, &num, INT_MAX))
  ------------------
  |  Branch (299:10): [True: 0, False: 113k]
  ------------------
  300|      0|        return PFMT_WIDTH;
  ------------------
  |  |  166|      0|#define PFMT_WIDTH       7 /* width overflow */
  ------------------
  301|   113k|      width = (int)num;
  302|   113k|      break;
  303|   113k|    }
  304|      0|    case '*':  /* read width from argument list */
  ------------------
  |  Branch (304:5): [True: 0, False: 406k]
  ------------------
  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|   291k|    default:
  ------------------
  |  Branch (316:5): [True: 291k, False: 115k]
  ------------------
  317|   291k|      loopit = FALSE;
  ------------------
  |  | 1048|   291k|#define FALSE false
  ------------------
  318|   291k|      fmt--;
  319|   291k|      break;
  320|   406k|    } /* switch */
  321|   406k|  } while(loopit); /* do */
  ------------------
  |  Branch (321:11): [True: 115k, False: 291k]
  ------------------
  322|   291k|  *flagsp = flags;
  323|   291k|  *precp = precision;
  324|   291k|  *widthp = width;
  325|   291k|  *fmtp = fmt;
  326|   291k|  return PFMT_OK;
  ------------------
  |  |  159|   291k|#define PFMT_OK          0
  ------------------
  327|   291k|}
mprintf.c:parse_conversion:
  331|   291k|{
  332|   291k|  unsigned int flags = *flagp;
  333|   291k|  FormatType type;
  334|   291k|  switch(f) {
  335|      0|  case 'S':
  ------------------
  |  Branch (335:3): [True: 0, False: 291k]
  ------------------
  336|      0|    flags |= FLAGS_ALT;
  337|      0|    type = MTYPE_STRING;
  338|      0|    break;
  339|   138k|  case 's':
  ------------------
  |  Branch (339:3): [True: 138k, False: 152k]
  ------------------
  340|   138k|    type = MTYPE_STRING;
  341|   138k|    break;
  342|      0|  case 'n':
  ------------------
  |  Branch (342:3): [True: 0, False: 291k]
  ------------------
  343|      0|    type = MTYPE_INTPTR;
  344|      0|    break;
  345|      0|  case 'p':
  ------------------
  |  Branch (345:3): [True: 0, False: 291k]
  ------------------
  346|      0|    type = MTYPE_PTR;
  347|      0|    break;
  348|  23.8k|  case 'd':
  ------------------
  |  Branch (348:3): [True: 23.8k, False: 267k]
  ------------------
  349|  23.8k|  case 'i':
  ------------------
  |  Branch (349:3): [True: 0, False: 291k]
  ------------------
  350|  23.8k|    if(flags & FLAGS_LONGLONG)
  ------------------
  |  Branch (350:8): [True: 0, False: 23.8k]
  ------------------
  351|      0|      type = MTYPE_LONGLONG;
  352|  23.8k|    else if(flags & FLAGS_LONG)
  ------------------
  |  Branch (352:13): [True: 1.90k, False: 21.9k]
  ------------------
  353|  1.90k|      type = MTYPE_LONG;
  354|  21.9k|    else
  355|  21.9k|      type = MTYPE_INT;
  356|  23.8k|    break;
  357|  14.5k|  case 'u':
  ------------------
  |  Branch (357:3): [True: 14.5k, False: 276k]
  ------------------
  358|  14.5k|    if(flags & FLAGS_LONGLONG)
  ------------------
  |  Branch (358:8): [True: 0, False: 14.5k]
  ------------------
  359|      0|      type = MTYPE_LONGLONGU;
  360|  14.5k|    else if(flags & FLAGS_LONG)
  ------------------
  |  Branch (360:13): [True: 0, False: 14.5k]
  ------------------
  361|      0|      type = MTYPE_LONGU;
  362|  14.5k|    else
  363|  14.5k|      type = MTYPE_INTU;
  364|  14.5k|    flags |= FLAGS_UNSIGNED;
  365|  14.5k|    break;
  366|      0|  case 'o':
  ------------------
  |  Branch (366:3): [True: 0, False: 291k]
  ------------------
  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|   113k|  case 'x':
  ------------------
  |  Branch (375:3): [True: 113k, False: 177k]
  ------------------
  376|   113k|    if(flags & FLAGS_LONGLONG)
  ------------------
  |  Branch (376:8): [True: 0, False: 113k]
  ------------------
  377|      0|      type = MTYPE_LONGLONGU;
  378|   113k|    else if(flags & FLAGS_LONG)
  ------------------
  |  Branch (378:13): [True: 12, False: 113k]
  ------------------
  379|     12|      type = MTYPE_LONGU;
  380|   113k|    else
  381|   113k|      type = MTYPE_INTU;
  382|   113k|    flags |= FLAGS_HEX | FLAGS_UNSIGNED;
  383|   113k|    break;
  384|      0|  case 'X':
  ------------------
  |  Branch (384:3): [True: 0, False: 291k]
  ------------------
  385|      0|    if(flags & FLAGS_LONGLONG)
  ------------------
  |  Branch (385:8): [True: 0, False: 0]
  ------------------
  386|      0|      type = MTYPE_LONGLONGU;
  387|      0|    else if(flags & FLAGS_LONG)
  ------------------
  |  Branch (387:13): [True: 0, False: 0]
  ------------------
  388|      0|      type = MTYPE_LONGU;
  389|      0|    else
  390|      0|      type = MTYPE_INTU;
  391|      0|    flags |= FLAGS_HEX | FLAGS_UPPER | FLAGS_UNSIGNED;
  392|      0|    break;
  393|      0|  case 'c':
  ------------------
  |  Branch (393:3): [True: 0, False: 291k]
  ------------------
  394|      0|    type = MTYPE_INT;
  395|      0|    flags |= FLAGS_CHAR;
  396|      0|    break;
  397|      0|  case 'f':
  ------------------
  |  Branch (397:3): [True: 0, False: 291k]
  ------------------
  398|      0|    type = flags & FLAGS_LONGDOUBLE ? MTYPE_LONGDOUBLE : MTYPE_DOUBLE;
  ------------------
  |  Branch (398:12): [True: 0, False: 0]
  ------------------
  399|      0|    break;
  400|      0|  case 'F':
  ------------------
  |  Branch (400:3): [True: 0, False: 291k]
  ------------------
  401|      0|    type = flags & FLAGS_LONGDOUBLE ? MTYPE_LONGDOUBLE : MTYPE_DOUBLE;
  ------------------
  |  Branch (401:12): [True: 0, False: 0]
  ------------------
  402|      0|    flags |= FLAGS_UPPER;
  403|      0|    break;
  404|      0|  case 'e':
  ------------------
  |  Branch (404:3): [True: 0, False: 291k]
  ------------------
  405|      0|    type = flags & FLAGS_LONGDOUBLE ? MTYPE_LONGDOUBLE : MTYPE_DOUBLE;
  ------------------
  |  Branch (405:12): [True: 0, False: 0]
  ------------------
  406|      0|    flags |= FLAGS_FLOATE;
  407|      0|    break;
  408|      0|  case 'E':
  ------------------
  |  Branch (408:3): [True: 0, False: 291k]
  ------------------
  409|      0|    type = flags & FLAGS_LONGDOUBLE ? MTYPE_LONGDOUBLE : MTYPE_DOUBLE;
  ------------------
  |  Branch (409:12): [True: 0, False: 0]
  ------------------
  410|      0|    flags |= FLAGS_FLOATE | FLAGS_UPPER;
  411|      0|    break;
  412|      0|  case 'g':
  ------------------
  |  Branch (412:3): [True: 0, False: 291k]
  ------------------
  413|      0|    type = flags & FLAGS_LONGDOUBLE ? MTYPE_LONGDOUBLE : MTYPE_DOUBLE;
  ------------------
  |  Branch (413:12): [True: 0, False: 0]
  ------------------
  414|      0|    flags |= FLAGS_FLOATG;
  415|      0|    break;
  416|      0|  case 'G':
  ------------------
  |  Branch (416:3): [True: 0, False: 291k]
  ------------------
  417|      0|    type = flags & FLAGS_LONGDOUBLE ? MTYPE_LONGDOUBLE : MTYPE_DOUBLE;
  ------------------
  |  Branch (417:12): [True: 0, False: 0]
  ------------------
  418|      0|    flags |= FLAGS_FLOATG | FLAGS_UPPER;
  419|      0|    break;
  420|      0|  default:
  ------------------
  |  Branch (420:3): [True: 0, False: 291k]
  ------------------
  421|       |    /* invalid instruction, disregard and continue */
  422|      0|    return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  423|   291k|  } /* switch */
  424|       |
  425|   291k|  *flagp |= flags;
  426|   291k|  *typep = type;
  427|       |  return FALSE;
  ------------------
  |  | 1048|   291k|#define FALSE false
  ------------------
  428|   291k|}
mprintf.c:out_number:
  744|   152k|{
  745|   152k|  const unsigned char *digits = Curl_ldigits;
  746|   152k|  int flags = p->flags;
  747|   152k|  int width = p->width;
  748|   152k|  int prec = p->prec;
  749|   152k|  bool is_alt = flags & FLAGS_ALT;
  750|   152k|  bool is_neg = FALSE;
  ------------------
  |  | 1048|   152k|#define FALSE false
  ------------------
  751|   152k|  int base = 10;
  752|       |
  753|       |  /* 'workend' points to the final buffer byte position, but with an extra
  754|       |     byte as margin to avoid the (FALSE?) warning Coverity gives us
  755|       |     otherwise */
  756|   152k|  char *workend = &work[BUFFSIZE - 2];
  ------------------
  |  |   31|   152k|#define BUFFSIZE 326 /* buffer for long-to-str and float-to-str calcs, should
  ------------------
  757|   152k|  char *w;
  758|       |
  759|   152k|  if(flags & FLAGS_CHAR) {
  ------------------
  |  Branch (759:6): [True: 0, False: 152k]
  ------------------
  760|       |    /* Character. */
  761|      0|    if(!(flags & FLAGS_LEFT))
  ------------------
  |  Branch (761:8): [True: 0, False: 0]
  ------------------
  762|      0|      while(--width > 0)
  ------------------
  |  Branch (762:13): [True: 0, False: 0]
  ------------------
  763|      0|        OUTCHAR(' ');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  764|      0|    OUTCHAR((char)num);
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  765|      0|    if(flags & FLAGS_LEFT)
  ------------------
  |  Branch (765:8): [True: 0, False: 0]
  ------------------
  766|      0|      while(--width > 0)
  ------------------
  |  Branch (766:13): [True: 0, False: 0]
  ------------------
  767|      0|        OUTCHAR(' ');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  768|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  769|      0|  }
  770|   152k|  if(flags & FLAGS_OCTAL)
  ------------------
  |  Branch (770:6): [True: 0, False: 152k]
  ------------------
  771|       |    /* Octal unsigned integer */
  772|      0|    base = 8;
  773|       |
  774|   152k|  else if(flags & FLAGS_HEX) {
  ------------------
  |  Branch (774:11): [True: 113k, False: 38.3k]
  ------------------
  775|       |    /* Hexadecimal unsigned integer */
  776|   113k|    digits = (flags & FLAGS_UPPER) ? Curl_udigits : Curl_ldigits;
  ------------------
  |  Branch (776:14): [True: 0, False: 113k]
  ------------------
  777|   113k|    base = 16;
  778|   113k|  }
  779|  38.3k|  else if(flags & FLAGS_UNSIGNED)
  ------------------
  |  Branch (779:11): [True: 14.5k, False: 23.8k]
  ------------------
  780|       |    /* Decimal unsigned integer */
  781|  14.5k|    ;
  782|       |
  783|  23.8k|  else {
  784|       |    /* Decimal integer. */
  785|  23.8k|    is_neg = (nums < 0);
  786|  23.8k|    if(is_neg) {
  ------------------
  |  Branch (786:8): [True: 1, False: 23.8k]
  ------------------
  787|       |      /* signed_num might fail to hold absolute negative minimum by 1 */
  788|      1|      int64_t signed_num; /* Used to convert negative in positive. */
  789|      1|      signed_num = nums + (int64_t)1;
  790|      1|      signed_num = -signed_num;
  791|      1|      num = (uint64_t)signed_num;
  792|      1|      num += (uint64_t)1;
  793|      1|    }
  794|  23.8k|  }
  795|       |
  796|       |  /* Supply a default precision if none was given. */
  797|   152k|  if(prec == -1)
  ------------------
  |  Branch (797:6): [True: 152k, False: 0]
  ------------------
  798|   152k|    prec = 1;
  799|       |
  800|       |  /* Put the number in WORK. */
  801|   152k|  w = workend;
  802|   152k|  DEBUGASSERT(base <= 16);
  ------------------
  |  | 1075|   152k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (802:3): [True: 0, False: 152k]
  |  Branch (802:3): [True: 152k, False: 0]
  ------------------
  803|   152k|  switch(base) {
  804|  38.3k|  case 10:
  ------------------
  |  Branch (804:3): [True: 38.3k, False: 113k]
  ------------------
  805|   118k|    while(num > 0) {
  ------------------
  |  Branch (805:11): [True: 80.4k, False: 38.3k]
  ------------------
  806|  80.4k|      *w-- = (char)('0' + (num % 10));
  807|  80.4k|      num /= 10;
  808|  80.4k|    }
  809|  38.3k|    break;
  810|   113k|  default:
  ------------------
  |  Branch (810:3): [True: 113k, False: 38.3k]
  ------------------
  811|   334k|    while(num > 0) {
  ------------------
  |  Branch (811:11): [True: 220k, False: 113k]
  ------------------
  812|   220k|      *w-- = digits[num % base];
  813|   220k|      num /= base;
  814|   220k|    }
  815|   113k|    break;
  816|   152k|  }
  817|   152k|  width -= (int)(workend - w);
  818|   152k|  prec -= (int)(workend - w);
  819|       |
  820|   152k|  if(is_alt && base == 8 && prec <= 0) {
  ------------------
  |  Branch (820:6): [True: 0, False: 152k]
  |  Branch (820:16): [True: 0, False: 0]
  |  Branch (820:29): [True: 0, False: 0]
  ------------------
  821|      0|    *w-- = '0';
  822|      0|    --width;
  823|      0|  }
  824|       |
  825|   152k|  if(prec > 0) {
  ------------------
  |  Branch (825:6): [True: 8.14k, False: 143k]
  ------------------
  826|  8.14k|    width -= prec;
  827|  16.2k|    while(prec-- > 0 && w >= work)
  ------------------
  |  Branch (827:11): [True: 8.14k, False: 8.14k]
  |  Branch (827:25): [True: 8.14k, False: 0]
  ------------------
  828|  8.14k|      *w-- = '0';
  829|  8.14k|  }
  830|       |
  831|   152k|  if(is_alt && base == 16)
  ------------------
  |  Branch (831:6): [True: 0, False: 152k]
  |  Branch (831:16): [True: 0, False: 0]
  ------------------
  832|      0|    width -= 2;
  833|       |
  834|   152k|  if(is_neg || (flags & FLAGS_SHOWSIGN) || (flags & FLAGS_SPACE))
  ------------------
  |  Branch (834:6): [True: 1, False: 152k]
  |  Branch (834:16): [True: 0, False: 152k]
  |  Branch (834:44): [True: 0, False: 152k]
  ------------------
  835|      1|    --width;
  836|       |
  837|   152k|  if(!(flags & FLAGS_LEFT) && !(flags & FLAGS_PAD_NIL))
  ------------------
  |  Branch (837:6): [True: 152k, False: 0]
  |  Branch (837:31): [True: 38.3k, False: 113k]
  ------------------
  838|  38.3k|    while(width-- > 0)
  ------------------
  |  Branch (838:11): [True: 0, False: 38.3k]
  ------------------
  839|      0|      OUTCHAR(' ');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  840|       |
  841|   152k|  if(is_neg)
  ------------------
  |  Branch (841:6): [True: 1, False: 152k]
  ------------------
  842|      1|    OUTCHAR('-');
  ------------------
  |  |   43|      1|  do {                                    \
  |  |   44|      1|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 1]
  |  |  ------------------
  |  |   45|      1|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      1|    (*donep)++;                           \
  |  |   47|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  843|   152k|  else if(flags & FLAGS_SHOWSIGN)
  ------------------
  |  Branch (843:11): [True: 0, False: 152k]
  ------------------
  844|      0|    OUTCHAR('+');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  845|   152k|  else if(flags & FLAGS_SPACE)
  ------------------
  |  Branch (845:11): [True: 0, False: 152k]
  ------------------
  846|      0|    OUTCHAR(' ');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  847|       |
  848|   152k|  if(is_alt && base == 16) {
  ------------------
  |  Branch (848:6): [True: 0, False: 152k]
  |  Branch (848:16): [True: 0, False: 0]
  ------------------
  849|      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;                        \
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  850|      0|    if(flags & FLAGS_UPPER)
  ------------------
  |  Branch (850:8): [True: 0, False: 0]
  ------------------
  851|      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;                        \
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  852|      0|    else
  853|      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;                        \
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  854|      0|  }
  855|       |
  856|   152k|  if(!(flags & FLAGS_LEFT) && (flags & FLAGS_PAD_NIL))
  ------------------
  |  Branch (856:6): [True: 152k, False: 0]
  |  Branch (856:31): [True: 113k, False: 38.3k]
  ------------------
  857|   121k|    while(width-- > 0)
  ------------------
  |  Branch (857:11): [True: 7.21k, False: 113k]
  ------------------
  858|  7.21k|      OUTCHAR('0');
  ------------------
  |  |   43|  7.21k|  do {                                    \
  |  |   44|  7.21k|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 7.21k]
  |  |  ------------------
  |  |   45|  7.21k|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  |  |   46|  7.21k|    (*donep)++;                           \
  |  |   47|  7.21k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 7.21k]
  |  |  ------------------
  ------------------
  859|       |
  860|       |  /* Write the number. */
  861|   461k|  while(++w <= workend) {
  ------------------
  |  Branch (861:9): [True: 308k, False: 152k]
  ------------------
  862|   308k|    OUTCHAR(*w);
  ------------------
  |  |   43|   308k|  do {                                    \
  |  |   44|   308k|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 308k]
  |  |  ------------------
  |  |   45|   308k|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  |  |   46|   308k|    (*donep)++;                           \
  |  |   47|   308k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 308k]
  |  |  ------------------
  ------------------
  863|   308k|  }
  864|       |
  865|   152k|  if(flags & FLAGS_LEFT)
  ------------------
  |  Branch (865:6): [True: 0, False: 152k]
  ------------------
  866|      0|    while(width-- > 0)
  ------------------
  |  Branch (866:11): [True: 0, False: 0]
  ------------------
  867|      0|      OUTCHAR(' ');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  868|       |
  869|   152k|  return FALSE;
  ------------------
  |  | 1048|   152k|#define FALSE false
  ------------------
  870|   152k|}
mprintf.c:out_string:
  879|   138k|{
  880|   138k|  int flags = p->flags;
  881|   138k|  int width = p->width;
  882|   138k|  int prec = p->prec;
  883|   138k|  size_t len;
  884|       |
  885|   138k|  if(!str) {
  ------------------
  |  Branch (885:6): [True: 0, False: 138k]
  ------------------
  886|       |    /* Write null string if there is space. */
  887|      0|    if(prec == -1 || prec >= (int)CURL_CSTRLEN(nilstr)) {
  ------------------
  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  ------------------
  |  Branch (887:8): [True: 0, False: 0]
  |  Branch (887:22): [True: 0, False: 0]
  ------------------
  888|      0|      str = nilstr;
  889|      0|      len = CURL_CSTRLEN(nilstr);
  ------------------
  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  ------------------
  890|       |      /* Disable quotes around (nil) */
  891|      0|      flags &= ~(unsigned int)FLAGS_ALT;
  892|      0|    }
  893|      0|    else {
  894|      0|      str = "";
  895|      0|      len = 0;
  896|      0|    }
  897|      0|  }
  898|   138k|  else if(prec != -1)
  ------------------
  |  Branch (898:11): [True: 10, False: 138k]
  ------------------
  899|     10|    len = (size_t)prec;
  900|   138k|  else if(*str == '\0')
  ------------------
  |  Branch (900:11): [True: 56.1k, False: 82.6k]
  ------------------
  901|  56.1k|    len = 0;
  902|  82.6k|  else
  903|  82.6k|    len = strlen(str);
  904|       |
  905|   138k|  width -= (len > INT_MAX) ? INT_MAX : (int)len;
  ------------------
  |  Branch (905:12): [True: 0, False: 138k]
  ------------------
  906|       |
  907|   138k|  if(flags & FLAGS_ALT)
  ------------------
  |  Branch (907:6): [True: 0, False: 138k]
  ------------------
  908|      0|    OUTCHAR('"');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  909|       |
  910|   138k|  if(!(flags & FLAGS_LEFT))
  ------------------
  |  Branch (910:6): [True: 138k, False: 0]
  ------------------
  911|   138k|    while(width-- > 0)
  ------------------
  |  Branch (911:11): [True: 0, False: 138k]
  ------------------
  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;                        \
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  913|       |
  914|  1.56M|  for(; len && *str; len--)
  ------------------
  |  Branch (914:9): [True: 1.42M, False: 138k]
  |  Branch (914:16): [True: 1.42M, False: 0]
  ------------------
  915|  1.42M|    OUTCHAR(*str++);
  ------------------
  |  |   43|  1.56M|  do {                                    \
  |  |   44|  1.42M|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 1.42M]
  |  |  ------------------
  |  |   45|  1.42M|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  |  |   46|  1.42M|    (*donep)++;                           \
  |  |   47|  1.42M|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 1.42M]
  |  |  ------------------
  ------------------
  916|   138k|  if(flags & FLAGS_LEFT)
  ------------------
  |  Branch (916:6): [True: 0, False: 138k]
  ------------------
  917|      0|    while(width-- > 0)
  ------------------
  |  Branch (917:11): [True: 0, False: 0]
  ------------------
  918|      0|      OUTCHAR(' ');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  919|       |
  920|   138k|  if(flags & FLAGS_ALT)
  ------------------
  |  Branch (920:6): [True: 0, False: 138k]
  ------------------
  921|      0|    OUTCHAR('"');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  922|       |
  923|   138k|  return FALSE;
  ------------------
  |  | 1048|   138k|#define FALSE false
  ------------------
  924|   138k|}
mprintf.c:addbyter:
 1100|   146k|{
 1101|   146k|  struct nsprintf *infop = f;
 1102|   146k|  if(infop->length < infop->max) {
  ------------------
  |  Branch (1102:6): [True: 146k, False: 0]
  ------------------
 1103|       |    /* only do this if we have not reached max length yet */
 1104|   146k|    *infop->buffer++ = (char)outc; /* store */
 1105|   146k|    infop->length++; /* we are now one byte larger */
 1106|   146k|    return 0;     /* fputc() returns like this on success */
 1107|   146k|  }
 1108|      0|  return 1;
 1109|   146k|}
mprintf.c:alloc_addbyter:
 1148|  1.82M|{
 1149|  1.82M|  struct asprintf *infop = f;
 1150|  1.82M|  CURLcode result = curlx_dyn_addn(infop->b, &outc, 1);
 1151|  1.82M|  if(result) {
  ------------------
  |  Branch (1151:6): [True: 0, False: 1.82M]
  ------------------
 1152|      0|    infop->merr = result == CURLE_TOO_LARGE ? MERR_TOO_LARGE : MERR_MEM;
  ------------------
  |  |   29|      0|#define MERR_TOO_LARGE 2
  ------------------
                  infop->merr = result == CURLE_TOO_LARGE ? MERR_TOO_LARGE : MERR_MEM;
  ------------------
  |  |   28|      0|#define MERR_MEM       1
  ------------------
  |  Branch (1152:19): [True: 0, False: 0]
  ------------------
 1153|      0|    return 1; /* fail */
 1154|      0|  }
 1155|  1.82M|  return 0;
 1156|  1.82M|}
mprintf.c:fputc_wrapper:
 1221|  73.5k|{
 1222|  73.5k|  int out = outc;
 1223|  73.5k|  FILE *s = f;
 1224|  73.5k|  int rc = fputc(out, s);
 1225|       |  return rc == EOF;
 1226|  73.5k|}

Curl_multi_handle:
  230|  3.73k|{
  231|  3.73k|  struct Curl_multi *multi = curlx_calloc(1, sizeof(struct Curl_multi));
  ------------------
  |  | 1473|  3.73k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  232|       |
  233|  3.73k|  if(!multi)
  ------------------
  |  Branch (233:6): [True: 0, False: 3.73k]
  ------------------
  234|      0|    return NULL;
  235|       |
  236|  3.73k|  multi->magic = CURLMULTI_MAGIC_NUMBER;
  ------------------
  |  |   41|  3.73k|#define CURLMULTI_MAGIC_NUMBER 0x000bab1e
  ------------------
  237|       |
  238|       |  /* Initialisation order is important here!
  239|       |   * easy_init() does a lazy check on curl_global_init() which sets
  240|       |   * up platform specific things we need. For example calling curlx_pnow()
  241|       |   * before this is not safe. */
  242|  3.73k|  multi->admin = curl_easy_init();
  243|  3.73k|  if(!multi->admin) {
  ------------------
  |  Branch (243:6): [True: 0, False: 3.73k]
  ------------------
  244|      0|    curlx_free(multi);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  245|      0|    return NULL;
  246|      0|  }
  247|  3.73k|  multi->admin->multi = multi;
  248|  3.73k|  multi->admin->state.internal = TRUE;
  ------------------
  |  | 1045|  3.73k|#define TRUE true
  ------------------
  249|       |
  250|       |  /* Now we can use curlx_* things safely */
  251|  3.73k|  curlx_pnow(&multi->now);
  252|  3.73k|  Curl_timeouts_init(&multi->timeouts, &multi->now);
  253|  3.73k|  multi_timeouts_init(multi->admin);
  254|       |
  255|  3.73k|  Curl_dnscache_init(&multi->dnscache, dnssize);
  256|  3.73k|  Curl_mntfy_init(multi);
  257|  3.73k|  Curl_multi_ev_init(multi, ev_hashsize);
  258|  3.73k|  Curl_uint32_tbl_init(&multi->xfers, NULL);
  259|  3.73k|  Curl_uint32_bset_init(&multi->process);
  260|  3.73k|  Curl_uint32_bset_init(&multi->dirty);
  261|  3.73k|  Curl_uint32_bset_init(&multi->pending);
  262|  3.73k|  Curl_uint32_bset_init(&multi->msgsent);
  263|  3.73k|  Curl_hash_init(&multi->proto_hash, 23,
  264|  3.73k|                 Curl_hash_str, curlx_str_key_compare, ph_freeentry);
  265|  3.73k|  Curl_llist_init(&multi->msglist, NULL);
  266|       |
  267|  3.73k|  multi->multiplexing = TRUE;
  ------------------
  |  | 1045|  3.73k|#define TRUE true
  ------------------
  268|  3.73k|  multi->max_concurrent_streams = 100;
  269|  3.73k|  multi->last_timeout_ms = -1;
  270|  3.73k|#ifdef ENABLE_WAKEUP
  271|  3.73k|  multi->wakeup_pair[0] = CURL_SOCKET_BAD;
  ------------------
  |  |  147|  3.73k|#define CURL_SOCKET_BAD (-1)
  ------------------
  272|  3.73k|  multi->wakeup_pair[1] = CURL_SOCKET_BAD;
  ------------------
  |  |  147|  3.73k|#define CURL_SOCKET_BAD (-1)
  ------------------
  273|  3.73k|#endif
  274|  3.73k|#ifdef ENABLE_INTERNAL_WAKEUP
  275|  3.73k|  multi->wakeup_internal[0] = CURL_SOCKET_BAD;
  ------------------
  |  |  147|  3.73k|#define CURL_SOCKET_BAD (-1)
  ------------------
  276|  3.73k|  multi->wakeup_internal[1] = CURL_SOCKET_BAD;
  ------------------
  |  |  147|  3.73k|#define CURL_SOCKET_BAD (-1)
  ------------------
  277|  3.73k|#endif
  278|       |
  279|  3.73k|  if(Curl_mntfy_resize(multi) ||
  ------------------
  |  Branch (279:6): [True: 0, False: 3.73k]
  ------------------
  280|  3.73k|     Curl_uint32_bset_resize(&multi->process, xfer_table_size) ||
  ------------------
  |  Branch (280:6): [True: 0, False: 3.73k]
  ------------------
  281|  3.73k|     Curl_uint32_bset_resize(&multi->pending, xfer_table_size) ||
  ------------------
  |  Branch (281:6): [True: 0, False: 3.73k]
  ------------------
  282|  3.73k|     Curl_uint32_bset_resize(&multi->dirty, xfer_table_size) ||
  ------------------
  |  Branch (282:6): [True: 0, False: 3.73k]
  ------------------
  283|  3.73k|     Curl_uint32_bset_resize(&multi->msgsent, xfer_table_size) ||
  ------------------
  |  Branch (283:6): [True: 0, False: 3.73k]
  ------------------
  284|  3.73k|     Curl_uint32_tbl_resize(&multi->xfers, xfer_table_size))
  ------------------
  |  Branch (284:6): [True: 0, False: 3.73k]
  ------------------
  285|      0|    goto error;
  286|       |
  287|  3.73k|#ifdef DEBUGBUILD
  288|  3.73k|  if(getenv("CURL_DEBUG"))
  ------------------
  |  Branch (288:6): [True: 0, False: 3.73k]
  ------------------
  289|      0|    multi->admin->set.verbose = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  290|  3.73k|#endif
  291|  3.73k|  Curl_uint32_tbl_add(&multi->xfers, multi->admin, &multi->admin->mid);
  292|  3.73k|  Curl_uint32_bset_add(&multi->process, multi->admin->mid);
  293|       |
  294|  3.73k|  if(Curl_cshutdn_init(&multi->cshutdn, multi))
  ------------------
  |  Branch (294:6): [True: 0, False: 3.73k]
  ------------------
  295|      0|    goto error;
  296|       |
  297|  3.73k|  Curl_cpool_init(&multi->cpool, NULL, chashsize);
  298|       |
  299|  3.73k|#ifdef USE_SSL
  300|  3.73k|  if(Curl_ssl_scache_create(sesssize, 2, &multi->ssl_scache))
  ------------------
  |  Branch (300:6): [True: 0, False: 3.73k]
  ------------------
  301|      0|    goto error;
  302|       |#else
  303|       |  (void)sesssize;
  304|       |#endif
  305|       |
  306|       |#ifdef USE_WINSOCK
  307|       |  multi->wsa_event = WSACreateEvent();
  308|       |  if(multi->wsa_event == WSA_INVALID_EVENT)
  309|       |    goto error;
  310|       |#endif
  311|  3.73k|#ifdef ENABLE_WAKEUP
  312|       |  /* When enabled, rely on this to work. We ignore this in previous
  313|       |   * versions, but that seems an unnecessary complication. */
  314|  3.73k|  if(Curl_wakeup_init(multi->wakeup_pair, TRUE) < 0)
  ------------------
  |  | 1045|  3.73k|#define TRUE true
  ------------------
  |  Branch (314:6): [True: 0, False: 3.73k]
  ------------------
  315|      0|    goto error;
  316|  3.73k|#endif
  317|  3.73k|#ifdef ENABLE_INTERNAL_WAKEUP
  318|  3.73k|  if(Curl_wakeup_init(multi->wakeup_internal, TRUE) < 0)
  ------------------
  |  | 1045|  3.73k|#define TRUE true
  ------------------
  |  Branch (318:6): [True: 0, False: 3.73k]
  ------------------
  319|      0|    goto error;
  320|  3.73k|#endif
  321|       |
  322|  3.73k|  if(Curl_probeipv6(multi))
  ------------------
  |  Branch (322:6): [True: 0, False: 3.73k]
  ------------------
  323|      0|    goto error;
  324|       |
  325|  3.73k|#ifdef USE_RESOLV_THREADED
  326|  3.73k|  if(xfer_table_size < CURL_XFER_TABLE_SIZE) { /* easy multi */
  ------------------
  |  |   52|  3.73k|#define CURL_XFER_TABLE_SIZE 128
  ------------------
  |  Branch (326:6): [True: 0, False: 3.73k]
  ------------------
  327|      0|    if(Curl_async_thrdd_multi_init(multi, 0, 2, 10))
  ------------------
  |  Branch (327:8): [True: 0, False: 0]
  ------------------
  328|      0|      goto error;
  329|      0|  }
  330|  3.73k|  else { /* real multi handle */
  331|  3.73k|    if(Curl_async_thrdd_multi_init(multi, 0, 20, 2000))
  ------------------
  |  Branch (331:8): [True: 0, False: 3.73k]
  ------------------
  332|      0|      goto error;
  333|  3.73k|  }
  334|  3.73k|#endif
  335|       |
  336|  3.73k|  return multi;
  337|       |
  338|      0|error:
  339|       |
  340|      0|#ifdef USE_RESOLV_THREADED
  341|      0|  Curl_async_thrdd_multi_destroy(multi, TRUE);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  342|      0|#endif
  343|      0|  Curl_multi_ev_cleanup(multi);
  344|      0|  Curl_hash_destroy(&multi->proto_hash);
  345|      0|  Curl_dnscache_destroy(&multi->dnscache);
  346|      0|  Curl_cpool_destroy(&multi->cpool, multi->admin);
  347|      0|  Curl_cshutdn_destroy(&multi->cshutdn, multi->admin);
  348|      0|#ifdef USE_SSL
  349|      0|  Curl_ssl_scache_destroy(multi->ssl_scache);
  350|      0|#endif
  351|      0|  if(multi->admin) {
  ------------------
  |  Branch (351:6): [True: 0, False: 0]
  ------------------
  352|      0|    Curl_multi_ev_xfer_done(multi, multi->admin);
  353|      0|    multi->admin->multi = NULL;
  354|      0|    Curl_close(&multi->admin);
  355|      0|  }
  356|      0|  Curl_mntfy_cleanup(multi);
  357|       |
  358|      0|  Curl_uint32_bset_destroy(&multi->process);
  359|      0|  Curl_uint32_bset_destroy(&multi->dirty);
  360|      0|  Curl_uint32_bset_destroy(&multi->pending);
  361|      0|  Curl_uint32_bset_destroy(&multi->msgsent);
  362|      0|  Curl_uint32_tbl_destroy(&multi->xfers);
  363|      0|#ifdef ENABLE_WAKEUP
  364|      0|  Curl_wakeup_destroy(multi->wakeup_pair);
  365|      0|#endif
  366|      0|#ifdef ENABLE_INTERNAL_WAKEUP
  367|      0|  Curl_wakeup_destroy(multi->wakeup_internal);
  368|      0|#endif
  369|       |
  370|      0|  curlx_free(multi);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  371|       |  return NULL;
  372|  3.73k|}
curl_multi_init:
  375|  3.73k|{
  376|  3.73k|  return Curl_multi_handle(CURL_XFER_TABLE_SIZE,
  ------------------
  |  |   52|  3.73k|#define CURL_XFER_TABLE_SIZE 128
  ------------------
  377|  3.73k|                           CURL_SOCKET_HASH_TABLE_SIZE,
  ------------------
  |  |   58|  3.73k|#define CURL_SOCKET_HASH_TABLE_SIZE 911
  ------------------
  378|  3.73k|                           CURL_CONNECTION_HASH_SIZE,
  ------------------
  |  |   62|  3.73k|#define CURL_CONNECTION_HASH_SIZE 97
  ------------------
  379|  3.73k|                           CURL_DNS_HASH_SIZE,
  ------------------
  |  |   66|  3.73k|#define CURL_DNS_HASH_SIZE 71
  ------------------
  380|  3.73k|                           CURL_TLS_SESSION_SIZE);
  ------------------
  |  |   70|  3.73k|#define CURL_TLS_SESSION_SIZE 25
  ------------------
  381|  3.73k|}
Curl_is_connecting:
  398|  46.6k|{
  399|  46.6k|  return data->mstate < MSTATE_DO;
  400|  46.6k|}
Curl_multi_add_handle:
  469|  3.73k|{
  470|  3.73k|  CURLMcode mresult;
  471|       |
  472|       |  /* Prevent users from adding same easy handle more than once and prevent
  473|       |     adding to more than one multi stack */
  474|  3.73k|  if(data->multi)
  ------------------
  |  Branch (474:6): [True: 0, False: 3.73k]
  ------------------
  475|      0|    return CURLM_ADDED_ALREADY;
  476|       |
  477|  3.73k|  if(multi->dead) {
  ------------------
  |  Branch (477:6): [True: 0, False: 3.73k]
  ------------------
  478|       |    /* a "dead" handle cannot get added transfers while any existing easy
  479|       |       handles are still alive - but if there are none alive anymore, it is
  480|       |       fine to start over and unmark the "deadness" of this handle.
  481|       |       This means only the admin handle MUST be present. */
  482|      0|    if((Curl_uint32_tbl_count(&multi->xfers) != 1) ||
  ------------------
  |  Branch (482:8): [True: 0, False: 0]
  ------------------
  483|      0|       !Curl_uint32_tbl_contains(&multi->xfers, 0))
  ------------------
  |  Branch (483:8): [True: 0, False: 0]
  ------------------
  484|      0|      return CURLM_ABORTED_BY_CALLBACK;
  485|      0|    multi->dead = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  486|      0|    Curl_uint32_bset_clear(&multi->process);
  487|      0|    Curl_uint32_bset_clear(&multi->dirty);
  488|      0|    Curl_uint32_bset_clear(&multi->pending);
  489|      0|    Curl_uint32_bset_clear(&multi->msgsent);
  490|      0|  }
  491|       |
  492|  3.73k|  if(data->multi_easy) {
  ------------------
  |  Branch (492:6): [True: 0, False: 3.73k]
  ------------------
  493|       |    /* if this easy handle was previously used for curl_easy_perform(), there
  494|       |       is a private multi handle here that we can kill */
  495|      0|    curl_multi_cleanup(data->multi_easy);
  496|      0|    data->multi_easy = NULL;
  497|      0|  }
  498|       |
  499|       |  /* Insert the easy into the multi->xfers table, assigning it a `mid`. */
  500|  3.73k|  if(multi_xfers_add(multi, data))
  ------------------
  |  Branch (500:6): [True: 0, False: 3.73k]
  ------------------
  501|      0|    return CURLM_OUT_OF_MEMORY;
  502|       |
  503|       |  /* Initialize timeouts for this handle */
  504|  3.73k|  multi_timeouts_init(data);
  505|       |
  506|       |  /*
  507|       |   * No failure allowed in this function beyond this point. No modification
  508|       |   * of easy nor multi handle allowed before this except for potential
  509|       |   * multi's connection pool growing which will not be undone in this
  510|       |   * function no matter what.
  511|       |   */
  512|  3.73k|  if(data->set.errorbuffer)
  ------------------
  |  Branch (512:6): [True: 0, False: 3.73k]
  ------------------
  513|      0|    data->set.errorbuffer[0] = 0;
  514|       |
  515|  3.73k|  data->state.os_errno = 0;
  516|       |
  517|       |  /* make the Curl_easy refer back to this multi handle - before
  518|       |     Curl_expire() is called. */
  519|  3.73k|  data->multi = multi;
  520|       |
  521|       |  /* set the easy handle */
  522|  3.73k|  multistate(data, MSTATE_INIT);
  ------------------
  |  |  196|  3.73k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
  523|       |  /* not yet passed INIT state */
  524|  3.73k|  data->state.really_alive = FALSE;
  ------------------
  |  | 1048|  3.73k|#define FALSE false
  ------------------
  525|       |
  526|       |#ifdef USE_LIBPSL
  527|       |  /* Do the same for PSL. */
  528|       |  if(data->share && (data->share->specifier & (1 << CURL_LOCK_DATA_PSL)))
  529|       |    data->psl = &data->share->psl;
  530|       |  else
  531|       |    data->psl = &multi->psl;
  532|       |#endif
  533|       |
  534|       |  /* add the easy handle to the process set */
  535|  3.73k|  Curl_uint32_bset_add(&multi->process, data->mid);
  536|  3.73k|  ++multi->xfers_alive;
  537|  3.73k|  ++multi->xfers_total_ever;
  538|       |
  539|  3.73k|  Curl_cpool_xfer_init(data);
  540|  3.73k|  multi_warn_debug(multi, data);
  541|       |
  542|       |  /* Make sure the new handle will run */
  543|  3.73k|  Curl_multi_mark_dirty(data);
  544|       |
  545|       |  /* Necessary in event based processing, where dirty handles trigger
  546|       |   * a timeout callback invocation. */
  547|  3.73k|  mresult = Curl_update_timer(multi);
  548|  3.73k|  if(mresult) {
  ------------------
  |  Branch (548:6): [True: 0, False: 3.73k]
  ------------------
  549|      0|    data->multi = NULL; /* not anymore */
  550|      0|    Curl_uint32_tbl_remove(&multi->xfers, data->mid);
  551|      0|    data->mid = UINT32_MAX;
  552|      0|    return mresult;
  553|      0|  }
  554|       |
  555|       |  /* The admin handle only ever has default timeouts set. To improve the
  556|       |     state somewhat we clone the timeouts from each added handle so that the
  557|       |     admin handle always has the same timeouts as the most recently added
  558|       |     easy handle. */
  559|  3.73k|  multi->admin->set.timeout = data->set.timeout;
  560|  3.73k|  multi->admin->set.server_response_timeout =
  561|  3.73k|    data->set.server_response_timeout;
  562|  3.73k|  multi->admin->set.no_signal = data->set.no_signal;
  563|       |
  564|  3.73k|  CURL_TRC_M(data, "added to multi, mid=%u, running=%u, total=%u",
  ------------------
  |  |  148|  3.73k|  do {                                   \
  |  |  149|  3.73k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  3.73k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.73k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.46k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.73k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.46k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.73k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  3.73k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  3.73k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 3.73k]
  |  |  ------------------
  ------------------
  565|  3.73k|             data->mid, Curl_multi_xfers_running(multi),
  566|  3.73k|             Curl_uint32_tbl_count(&multi->xfers));
  567|  3.73k|  return CURLM_OK;
  568|  3.73k|}
curl_multi_add_handle:
  571|  3.73k|{
  572|  3.73k|  struct Curl_mapi_guard guard;
  573|  3.73k|  CURLMcode mresult;
  574|       |
  575|  3.73k|  if(CURL_MAPI_ENTER(&guard, m, multi_add_handle, &mresult)) {
  ------------------
  |  |  190|  3.73k|  Curl_mapi_enter((g), (m), CURL_MAPI_FN_##fn, (r)) && (m)
  |  |  ------------------
  |  |  |  Branch (190:3): [True: 3.73k, False: 0]
  |  |  |  Branch (190:56): [True: 3.73k, False: 0]
  |  |  ------------------
  ------------------
  576|  3.73k|    struct Curl_easy *data = curl;
  577|       |    /* Verify that we got a somewhat good easy handle too */
  578|  3.73k|    if(!GOOD_EASY_HANDLE(data))
  ------------------
  |  |   34|  3.73k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |   28|  3.73k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1045|  3.73k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (34:5): [True: 3.73k, False: 0]
  |  |  |  Branch (34:12): [True: 3.73k, False: 0]
  |  |  ------------------
  |  |   35|  3.73k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (578:8): [True: 0, False: 3.73k]
  |  Branch (578:9): [True: 0, False: 0]
  |  Branch (578:9): [True: 0, False: 0]
  ------------------
  579|      0|      mresult = CURLM_BAD_EASY_HANDLE;
  580|  3.73k|    else
  581|  3.73k|      mresult = Curl_multi_add_handle(m, data);
  582|  3.73k|  }
  583|  3.73k|  CURL_MAPI_LEAVE(&guard);
  ------------------
  |  |  192|  3.73k|  Curl_mapi_leave(g)
  ------------------
  584|  3.73k|  return mresult;
  585|  3.73k|}
Curl_multi_remove_handle:
  766|  3.73k|{
  767|  3.73k|  CURLMcode mresult;
  768|  3.73k|  bool premature;
  769|  3.73k|  struct Curl_llist_node *e;
  770|  3.73k|  uint32_t mid;
  771|       |
  772|       |  /* Prevent users from trying to remove same easy handle more than once */
  773|  3.73k|  if(!data->multi)
  ------------------
  |  Branch (773:6): [True: 0, False: 3.73k]
  ------------------
  774|      0|    return CURLM_OK; /* it is already removed so let's say it is fine! */
  775|       |
  776|       |  /* Prevent users from trying to remove an easy handle from the wrong multi */
  777|  3.73k|  if(data->multi != multi)
  ------------------
  |  Branch (777:6): [True: 0, False: 3.73k]
  ------------------
  778|      0|    return CURLM_BAD_EASY_HANDLE;
  779|       |
  780|  3.73k|  if(data->mid == UINT32_MAX) {
  ------------------
  |  Branch (780:6): [True: 0, False: 3.73k]
  ------------------
  781|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (781:5): [Folded, False: 0]
  |  Branch (781:5): [Folded, False: 0]
  ------------------
  782|      0|    return CURLM_INTERNAL_ERROR;
  783|      0|  }
  784|  3.73k|  if(Curl_uint32_tbl_get(&multi->xfers, data->mid) != data) {
  ------------------
  |  Branch (784:6): [True: 0, False: 3.73k]
  ------------------
  785|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (785:5): [Folded, False: 0]
  |  Branch (785:5): [Folded, False: 0]
  ------------------
  786|      0|    return CURLM_INTERNAL_ERROR;
  787|      0|  }
  788|       |
  789|  3.73k|  premature = (data->mstate < MSTATE_COMPLETED);
  790|       |
  791|  3.73k|  if(data->conn) {
  ------------------
  |  Branch (791:6): [True: 0, False: 3.73k]
  ------------------
  792|       |    /* If the 'state' is not INIT or COMPLETED, we might need to do something
  793|       |       nice to put the easy_handle in a good known state when this returns. */
  794|      0|    if(premature && (data->mstate > MSTATE_DO))
  ------------------
  |  Branch (794:8): [True: 0, False: 0]
  |  Branch (794:21): [True: 0, False: 0]
  ------------------
  795|      0|      streamclose(data->conn);
  ------------------
  |  |   89|      0|#define streamclose(x) Curl_conncontrol((x), CONNCTRL_STREAM_CLOSE)
  |  |  ------------------
  |  |  |  |   85|      0|#define CONNCTRL_STREAM_CLOSE    2
  |  |  ------------------
  ------------------
  796|       |
  797|       |    /* multi_done() clears the association between the easy handle and the
  798|       |       connection.
  799|       |       Note that this ignores the return code because there is
  800|       |       nothing really useful to do with it anyway! */
  801|      0|    (void)multi_done(data, data->result, premature);
  802|      0|  }
  803|       |
  804|       |  /* The timer must be shut down before data->multi is set to NULL, else
  805|       |     data's splaynode would remain in the splay tree after curl_easy_cleanup is
  806|       |     called. Do it after multi_done() in case that sets another time! */
  807|  3.73k|  Curl_expire_clear_all(data);
  808|       |
  809|       |  /* If in `msgsent`, it was deducted from `multi->xfers_alive` already. */
  810|  3.73k|  if(!Curl_uint32_bset_contains(&multi->msgsent, data->mid))
  ------------------
  |  Branch (810:6): [True: 0, False: 3.73k]
  ------------------
  811|      0|    --multi->xfers_alive;
  812|       |
  813|  3.73k|  if(data->state.really_alive) {
  ------------------
  |  Branch (813:6): [True: 0, False: 3.73k]
  ------------------
  814|      0|    data->state.really_alive = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  815|      0|    --multi->xfers_really_alive;
  816|      0|    if(!multi->xfers_really_alive)
  ------------------
  |  Branch (816:8): [True: 0, False: 0]
  ------------------
  817|      0|      (void)multi_assess_wakeup(multi);
  818|      0|  }
  819|       |
  820|  3.73k|  Curl_wildcard_dtor(&data->wildcard);
  821|       |
  822|  3.73k|  data->mstate = MSTATE_COMPLETED;
  823|       |
  824|       |  /* Remove the association between the connection and the handle */
  825|  3.73k|  Curl_detach_connection(data);
  826|       |
  827|       |  /* Tell event handling that this transfer is definitely going away */
  828|  3.73k|  Curl_multi_ev_xfer_done(multi, data);
  829|       |
  830|  3.73k|  if(data->set.connect_only) {
  ------------------
  |  Branch (830:6): [True: 20, False: 3.71k]
  ------------------
  831|     20|    if(data->multi_easy) {
  ------------------
  |  Branch (831:8): [True: 0, False: 20]
  ------------------
  832|      0|      if(data->state.lastconnect_id != -1) {
  ------------------
  |  Branch (832:10): [True: 0, False: 0]
  ------------------
  833|       |        /* Mark any connect-only connection for closure */
  834|      0|        struct connectdata *conn;
  835|      0|        (void)Curl_getconnectinfo(data, &conn);
  836|      0|        if(conn && conn->bits.connect_only)
  ------------------
  |  Branch (836:12): [True: 0, False: 0]
  |  Branch (836:20): [True: 0, False: 0]
  ------------------
  837|      0|          connclose(conn);
  ------------------
  |  |   90|      0|#define connclose(x)   Curl_conncontrol((x), CONNCTRL_CONN_CLOSE)
  |  |  ------------------
  |  |  |  |   84|      0|#define CONNCTRL_CONN_CLOSE      1
  |  |  ------------------
  ------------------
  838|      0|      }
  839|      0|    }
  840|     20|    else {
  841|       |      /* This removes a handle that was part the multi interface that used
  842|       |         CONNECT_ONLY, that connection is now left alive but since this handle
  843|       |         has bits.close set nothing can use that connection anymore and it is
  844|       |         forbidden from reuse. This easy handle cannot find the connection
  845|       |         anymore once removed from the multi handle
  846|       |
  847|       |         Better close the connection here, at once. */
  848|     20|      struct connectdata *conn;
  849|     20|      (void)Curl_getconnectinfo(data, &conn);
  850|     20|      if(conn)
  ------------------
  |  Branch (850:10): [True: 18, False: 2]
  ------------------
  851|     18|        Curl_conn_close(data, conn, TRUE);
  ------------------
  |  | 1045|     18|#define TRUE true
  ------------------
  852|     20|    }
  853|     20|  }
  854|       |
  855|       |#ifdef USE_LIBPSL
  856|       |  /* Remove the PSL association. */
  857|       |  if(data->psl == &multi->psl)
  858|       |    data->psl = NULL;
  859|       |#endif
  860|       |
  861|       |  /* make sure there is no pending message in the queue sent from this easy
  862|       |     handle */
  863|  3.73k|  for(e = Curl_llist_head(&multi->msglist); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (863:45): [True: 0, False: 3.73k]
  ------------------
  864|      0|    struct Curl_message *msg = Curl_node_elem(e);
  865|       |
  866|      0|    if(msg->extmsg.easy_handle == data) {
  ------------------
  |  Branch (866:8): [True: 0, False: 0]
  ------------------
  867|      0|      Curl_node_remove(e);
  868|       |      /* there can only be one from this specific handle */
  869|      0|      break;
  870|      0|    }
  871|      0|  }
  872|       |
  873|       |  /* clear the association to this multi handle */
  874|  3.73k|  mid = data->mid;
  875|  3.73k|  DEBUGASSERT(Curl_uint32_tbl_contains(&multi->xfers, mid));
  ------------------
  |  | 1075|  3.73k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (875:3): [True: 0, False: 3.73k]
  |  Branch (875:3): [True: 3.73k, False: 0]
  ------------------
  876|  3.73k|  Curl_uint32_tbl_remove(&multi->xfers, mid);
  877|  3.73k|  Curl_uint32_bset_remove(&multi->process, mid);
  878|  3.73k|  Curl_uint32_bset_remove(&multi->dirty, mid);
  879|  3.73k|  Curl_uint32_bset_remove(&multi->pending, mid);
  880|  3.73k|  Curl_uint32_bset_remove(&multi->msgsent, mid);
  881|  3.73k|  data->multi = NULL;
  882|  3.73k|  data->mid = UINT32_MAX;
  883|  3.73k|  data->master_mid = UINT32_MAX;
  884|       |
  885|       |  /* A pending transfer *might* be able to run now. */
  886|  3.73k|  multi_schedule_pending(multi);
  887|  3.73k|  mresult = Curl_update_timer(multi);
  888|  3.73k|  if(mresult)
  ------------------
  |  Branch (888:6): [True: 0, False: 3.73k]
  ------------------
  889|      0|    return mresult;
  890|       |
  891|  3.73k|  mresult = multi_assess_wakeup(multi);
  892|  3.73k|  if(mresult) {
  ------------------
  |  Branch (892:6): [True: 0, False: 3.73k]
  ------------------
  893|      0|    failf(data, "error enabling wakeup listening: %d", mresult);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  894|      0|    return mresult;
  895|      0|  }
  896|       |
  897|  3.73k|  CURL_TRC_M(data, "removed from multi, mid=%u, running=%u, total=%u",
  ------------------
  |  |  148|  3.73k|  do {                                   \
  |  |  149|  3.73k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  3.73k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.73k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.46k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.73k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.46k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.73k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  3.73k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  3.73k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 3.73k]
  |  |  ------------------
  ------------------
  898|  3.73k|             mid, Curl_multi_xfers_running(multi),
  899|  3.73k|             Curl_uint32_tbl_count(&multi->xfers));
  900|  3.73k|  return CURLM_OK;
  901|  3.73k|}
curl_multi_remove_handle:
  904|  3.73k|{
  905|  3.73k|  struct Curl_mapi_guard guard;
  906|  3.73k|  CURLMcode mresult;
  907|       |
  908|  3.73k|  if(CURL_MAPI_ENTER(&guard, m, multi_remove_handle, &mresult)) {
  ------------------
  |  |  190|  3.73k|  Curl_mapi_enter((g), (m), CURL_MAPI_FN_##fn, (r)) && (m)
  |  |  ------------------
  |  |  |  Branch (190:3): [True: 3.73k, False: 0]
  |  |  |  Branch (190:56): [True: 3.73k, False: 0]
  |  |  ------------------
  ------------------
  909|  3.73k|    struct Curl_easy *data = curl;
  910|  3.73k|    if(!GOOD_EASY_HANDLE(data))
  ------------------
  |  |   34|  3.73k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |   28|  3.73k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1045|  3.73k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (34:5): [True: 3.73k, False: 0]
  |  |  |  Branch (34:12): [True: 3.73k, False: 0]
  |  |  ------------------
  |  |   35|  3.73k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (910:8): [True: 0, False: 3.73k]
  |  Branch (910:9): [True: 0, False: 0]
  |  Branch (910:9): [True: 0, False: 0]
  ------------------
  911|      0|      mresult = CURLM_BAD_EASY_HANDLE;
  912|  3.73k|    else
  913|  3.73k|      mresult = Curl_multi_remove_handle(m, data);
  914|  3.73k|  }
  915|  3.73k|  CURL_MAPI_LEAVE(&guard);
  ------------------
  |  |  192|  3.73k|  Curl_mapi_leave(g)
  ------------------
  916|  3.73k|  return mresult;
  917|  3.73k|}
Curl_multiplex_wanted:
  921|  3.57k|{
  922|  3.57k|  return multi && multi->multiplexing;
  ------------------
  |  Branch (922:10): [True: 3.57k, False: 0]
  |  Branch (922:19): [True: 3.57k, False: 0]
  ------------------
  923|  3.57k|}
Curl_detach_connection:
  932|  25.2k|{
  933|  25.2k|  struct connectdata *conn = data->conn;
  934|  25.2k|  if(conn) {
  ------------------
  |  Branch (934:6): [True: 10.3k, False: 14.9k]
  ------------------
  935|       |    /* this should never happen, prevent underflow */
  936|  10.3k|    DEBUGASSERT(conn->attached_xfers);
  ------------------
  |  | 1075|  10.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (936:5): [True: 0, False: 10.3k]
  |  Branch (936:5): [True: 10.3k, False: 0]
  ------------------
  937|  10.3k|    if(conn->attached_xfers) {
  ------------------
  |  Branch (937:8): [True: 10.3k, False: 0]
  ------------------
  938|  10.3k|      conn->attached_xfers--;
  939|  10.3k|      if(!conn->attached_xfers)
  ------------------
  |  Branch (939:10): [True: 10.3k, False: 0]
  ------------------
  940|  10.3k|        conn->attached_multi = NULL;
  941|  10.3k|    }
  942|  10.3k|  }
  943|  25.2k|  data->conn = NULL;
  944|  25.2k|}
Curl_attach_connection:
  956|  10.3k|{
  957|  10.3k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  10.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (957:3): [True: 0, False: 10.3k]
  |  Branch (957:3): [True: 10.3k, False: 0]
  ------------------
  958|  10.3k|  DEBUGASSERT(!data->conn);
  ------------------
  |  | 1075|  10.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (958:3): [True: 0, False: 10.3k]
  |  Branch (958:3): [True: 10.3k, False: 0]
  ------------------
  959|  10.3k|  DEBUGASSERT(conn);
  ------------------
  |  | 1075|  10.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (959:3): [True: 0, False: 10.3k]
  |  Branch (959:3): [True: 10.3k, False: 0]
  ------------------
  960|  10.3k|  DEBUGASSERT(conn->attached_xfers < UINT32_MAX);
  ------------------
  |  | 1075|  10.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (960:3): [True: 0, False: 10.3k]
  |  Branch (960:3): [True: 10.3k, False: 0]
  ------------------
  961|  10.3k|  data->conn = conn;
  962|  10.3k|  if(matched)
  ------------------
  |  Branch (962:6): [True: 3.62k, False: 6.67k]
  ------------------
  963|  3.62k|    data->state.lastconnect_id = conn->connection_id;
  964|  6.67k|  else
  965|  10.3k|    DEBUGASSERT(!data->mid); /* admin handle */
  ------------------
  |  | 1075|  10.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (965:5): [True: 0, False: 6.67k]
  |  Branch (965:5): [True: 6.67k, False: 0]
  ------------------
  966|  10.3k|  conn->attached_xfers++;
  967|       |  /* all attached transfers must be from the same multi */
  968|  10.3k|  if(!conn->attached_multi)
  ------------------
  |  Branch (968:6): [True: 10.3k, False: 0]
  ------------------
  969|  10.3k|    conn->attached_multi = data->multi;
  970|  10.3k|  DEBUGASSERT(conn->attached_multi == data->multi);
  ------------------
  |  | 1075|  10.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (970:3): [True: 0, False: 10.3k]
  |  Branch (970:3): [True: 10.3k, False: 0]
  ------------------
  971|       |
  972|  10.3k|  if(conn->scheme && conn->scheme->run->attach)
  ------------------
  |  Branch (972:6): [True: 10.3k, False: 0]
  |  Branch (972:22): [True: 0, False: 10.3k]
  ------------------
  973|      0|    conn->scheme->run->attach(data, conn);
  974|  10.3k|}
Curl_multi_connchanged:
 1761|  3.63k|{
 1762|       |  multi->recheckstate = TRUE;
  ------------------
  |  | 1045|  3.63k|#define TRUE true
  ------------------
 1763|  3.63k|}
curl_multi_perform:
 2983|  10.9k|{
 2984|  10.9k|  struct Curl_mapi_guard guard;
 2985|  10.9k|  CURLMcode mresult;
 2986|       |
 2987|  10.9k|  if(CURL_MAPI_ENTER(&guard, m, multi_perform, &mresult)) {
  ------------------
  |  |  190|  10.9k|  Curl_mapi_enter((g), (m), CURL_MAPI_FN_##fn, (r)) && (m)
  |  |  ------------------
  |  |  |  Branch (190:3): [True: 10.9k, False: 0]
  |  |  |  Branch (190:56): [True: 10.9k, False: 0]
  |  |  ------------------
  ------------------
 2988|  10.9k|    mresult = multi_perform(m, running_handles);
 2989|  10.9k|  }
 2990|  10.9k|  CURL_MAPI_LEAVE(&guard);
  ------------------
  |  |  192|  10.9k|  Curl_mapi_leave(g)
  ------------------
 2991|  10.9k|  return mresult;
 2992|  10.9k|}
curl_multi_cleanup:
 2995|  3.73k|{
 2996|  3.73k|  struct Curl_mapi_guard guard;
 2997|  3.73k|  CURLMcode mresult;
 2998|       |
 2999|  3.73k|  if(CURL_MAPI_ENTER(&guard, m, multi_cleanup, &mresult)) {
  ------------------
  |  |  190|  3.73k|  Curl_mapi_enter((g), (m), CURL_MAPI_FN_##fn, (r)) && (m)
  |  |  ------------------
  |  |  |  Branch (190:3): [True: 3.73k, False: 0]
  |  |  |  Branch (190:56): [True: 3.73k, False: 0]
  |  |  ------------------
  ------------------
 3000|  3.73k|    struct Curl_multi *multi = m;
 3001|  3.73k|    void *entry;
 3002|  3.73k|    uint32_t mid;
 3003|       |
 3004|       |    /* First remove all remaining easy handles,
 3005|       |     * close internal ones. admin handle is special */
 3006|  3.73k|    if(Curl_uint32_tbl_first(&multi->xfers, &mid, &entry)) {
  ------------------
  |  Branch (3006:8): [True: 3.73k, False: 0]
  ------------------
 3007|  3.73k|      do {
 3008|  3.73k|        struct Curl_easy *data = entry;
 3009|  3.73k|        if(!GOOD_EASY_HANDLE(data)) {
  ------------------
  |  |   34|  3.73k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |   28|  3.73k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1045|  3.73k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (34:5): [True: 3.73k, False: 0]
  |  |  |  Branch (34:12): [True: 3.73k, False: 0]
  |  |  ------------------
  |  |   35|  3.73k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (3009:12): [True: 0, False: 3.73k]
  |  Branch (3009:13): [True: 0, False: 0]
  |  Branch (3009:13): [True: 0, False: 0]
  ------------------
 3010|      0|          mresult = CURLM_BAD_HANDLE;
 3011|      0|          goto out;
 3012|      0|        }
 3013|       |
 3014|  3.73k|#ifdef DEBUGBUILD
 3015|  3.73k|        if(mid != data->mid) {
  ------------------
  |  Branch (3015:12): [True: 0, False: 3.73k]
  ------------------
 3016|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3017|      0|                     "but unexpected data->mid=%u\n", mid, data->mid);
 3018|      0|          DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3018:11): [Folded, False: 0]
  |  Branch (3018:11): [Folded, False: 0]
  ------------------
 3019|      0|        }
 3020|  3.73k|#endif
 3021|       |
 3022|  3.73k|        if(data == multi->admin)
  ------------------
  |  Branch (3022:12): [True: 3.73k, False: 0]
  ------------------
 3023|  3.73k|          continue;
 3024|       |
 3025|      0|        if(!data->state.done && data->conn)
  ------------------
  |  Branch (3025:12): [True: 0, False: 0]
  |  Branch (3025:33): [True: 0, False: 0]
  ------------------
 3026|       |          /* if DONE was never called for this handle */
 3027|      0|          (void)multi_done(data, CURLE_OK, TRUE);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 3028|       |
 3029|      0|        data->multi = NULL; /* clear the association */
 3030|      0|        Curl_uint32_tbl_remove(&multi->xfers, mid);
 3031|      0|        data->mid = UINT32_MAX;
 3032|       |
 3033|       |#ifdef USE_LIBPSL
 3034|       |        if(data->psl == &multi->psl)
 3035|       |          data->psl = NULL;
 3036|       |#endif
 3037|      0|        if(data->state.internal)
  ------------------
  |  Branch (3037:12): [True: 0, False: 0]
  ------------------
 3038|      0|          Curl_close(&data);
 3039|  3.73k|      } while(Curl_uint32_tbl_next(&multi->xfers, mid, &mid, &entry));
  ------------------
  |  Branch (3039:15): [True: 0, False: 3.73k]
  ------------------
 3040|  3.73k|    }
 3041|       |
 3042|  3.73k|#ifdef USE_RESOLV_THREADED
 3043|  3.73k|    Curl_async_thrdd_multi_destroy(multi, !multi->quick_exit);
 3044|  3.73k|#endif
 3045|  3.73k|    Curl_cpool_destroy(&multi->cpool, multi->admin);
 3046|  3.73k|    Curl_cshutdn_destroy(&multi->cshutdn, multi->admin);
 3047|  3.73k|    if(multi->admin) {
  ------------------
  |  Branch (3047:8): [True: 3.73k, False: 0]
  ------------------
 3048|  3.73k|      CURL_TRC_M(multi->admin, "multi_cleanup, closing admin handle, done");
  ------------------
  |  |  148|  3.73k|  do {                                   \
  |  |  149|  3.73k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  3.73k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.73k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.46k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.73k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.46k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.73k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  3.73k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  3.73k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 3.73k]
  |  |  ------------------
  ------------------
 3049|  3.73k|      multi->admin->multi = NULL;
 3050|  3.73k|      Curl_uint32_tbl_remove(&multi->xfers, multi->admin->mid);
 3051|  3.73k|      Curl_close(&multi->admin);
 3052|  3.73k|    }
 3053|       |
 3054|  3.73k|    multi->magic = 0; /* not good anymore */
 3055|       |
 3056|  3.73k|    Curl_multi_ev_cleanup(multi);
 3057|  3.73k|    Curl_hash_destroy(&multi->proto_hash);
 3058|  3.73k|    Curl_dnscache_destroy(&multi->dnscache);
 3059|  3.73k|    Curl_psl_destroy(&multi->psl);
 3060|  3.73k|#ifdef USE_SSL
 3061|  3.73k|    Curl_ssl_scache_destroy(multi->ssl_scache);
 3062|  3.73k|#endif
 3063|       |
 3064|       |#ifdef USE_WINSOCK
 3065|       |    WSACloseEvent(multi->wsa_event);
 3066|       |#endif
 3067|  3.73k|#ifdef ENABLE_WAKEUP
 3068|  3.73k|  Curl_wakeup_destroy(multi->wakeup_pair);
 3069|  3.73k|#endif
 3070|  3.73k|#ifdef ENABLE_INTERNAL_WAKEUP
 3071|  3.73k|  Curl_wakeup_destroy(multi->wakeup_internal);
 3072|  3.73k|#endif
 3073|       |
 3074|  3.73k|    multi_xfer_bufs_free(multi);
 3075|  3.73k|    Curl_mntfy_cleanup(multi);
 3076|  3.73k|#ifdef DEBUGBUILD
 3077|  3.73k|    if(Curl_uint32_tbl_count(&multi->xfers)) {
  ------------------
  |  Branch (3077:8): [True: 0, False: 3.73k]
  ------------------
 3078|      0|      multi_xfer_tbl_dump(multi);
 3079|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3079:7): [Folded, False: 0]
  |  Branch (3079:7): [Folded, False: 0]
  ------------------
 3080|      0|    }
 3081|  3.73k|#endif
 3082|  3.73k|    Curl_uint32_bset_destroy(&multi->process);
 3083|  3.73k|    Curl_uint32_bset_destroy(&multi->dirty);
 3084|  3.73k|    Curl_uint32_bset_destroy(&multi->pending);
 3085|  3.73k|    Curl_uint32_bset_destroy(&multi->msgsent);
 3086|  3.73k|    Curl_uint32_tbl_destroy(&multi->xfers);
 3087|  3.73k|    curlx_memzero(multi, sizeof(*multi));
 3088|  3.73k|    curlx_free(multi);
  ------------------
  |  | 1476|  3.73k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 3089|       |
 3090|  3.73k|    mresult = CURLM_OK;
 3091|  3.73k|  }
 3092|  3.73k|out:
 3093|  3.73k|  CURL_MAPI_LEAVE(&guard);
  ------------------
  |  |  192|  3.73k|  Curl_mapi_leave(g)
  ------------------
 3094|  3.73k|  return mresult;
 3095|  3.73k|}
curl_multi_info_read:
 3108|  7.46k|{
 3109|  7.46k|  struct Curl_mapi_guard guard;
 3110|  7.46k|  CURLMsg *msg_result = NULL;
 3111|       |
 3112|  7.46k|  *msgs_in_queue = 0; /* default to none */
 3113|  7.46k|  if(CURL_MAPI_ENTER(&guard, m, multi_info_read, NULL)) {
  ------------------
  |  |  190|  7.46k|  Curl_mapi_enter((g), (m), CURL_MAPI_FN_##fn, (r)) && (m)
  |  |  ------------------
  |  |  |  Branch (190:3): [True: 7.46k, False: 0]
  |  |  |  Branch (190:56): [True: 7.46k, False: 0]
  |  |  ------------------
  ------------------
 3114|  7.46k|    struct Curl_multi *multi = m;
 3115|  7.46k|    if(Curl_llist_count(&multi->msglist)) {
  ------------------
  |  Branch (3115:8): [True: 3.73k, False: 3.73k]
  ------------------
 3116|       |      /* there is one or more messages in the list */
 3117|  3.73k|      struct Curl_llist_node *e;
 3118|  3.73k|      struct Curl_message *msg;
 3119|       |
 3120|       |      /* extract the head of the list to return */
 3121|  3.73k|      e = Curl_llist_head(&multi->msglist);
 3122|       |
 3123|  3.73k|      msg = Curl_node_elem(e);
 3124|       |
 3125|       |      /* remove the extracted entry */
 3126|  3.73k|      Curl_node_remove(e);
 3127|       |
 3128|  3.73k|      *msgs_in_queue = curlx_uztosi(Curl_llist_count(&multi->msglist));
 3129|       |
 3130|  3.73k|      msg_result = &msg->extmsg;
 3131|  3.73k|    }
 3132|  7.46k|  }
 3133|  7.46k|  CURL_MAPI_LEAVE(&guard);
  ------------------
  |  |  192|  7.46k|  Curl_mapi_leave(g)
  ------------------
 3134|  7.46k|  return msg_result;
 3135|  7.46k|}
Curl_multi_will_close:
 3138|  3.62k|{
 3139|  3.62k|  if(data) {
  ------------------
  |  Branch (3139:6): [True: 3.62k, False: 0]
  ------------------
 3140|  3.62k|    struct Curl_multi *multi = data->multi;
 3141|  3.62k|    if(multi) {
  ------------------
  |  Branch (3141:8): [True: 3.62k, False: 0]
  ------------------
 3142|  3.62k|      CURL_TRC_M(data, "Curl_multi_will_close fd=%" FMT_SOCKET_T, s);
  ------------------
  |  |  148|  3.62k|  do {                                   \
  |  |  149|  3.62k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  3.62k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.62k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.62k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  3.62k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
 3143|  3.62k|      Curl_multi_ev_socket_done(multi, data, s);
 3144|  3.62k|    }
 3145|  3.62k|  }
 3146|  3.62k|}
Curl_update_timer:
 3584|  18.4k|{
 3585|  18.4k|  timediff_t timeouts_offset_us = 0;
 3586|  18.4k|  int timeout_ms;
 3587|  18.4k|  int rc;
 3588|  18.4k|  bool set_value = FALSE;
  ------------------
  |  | 1048|  18.4k|#define FALSE false
  ------------------
 3589|       |
 3590|  18.4k|  if(!multi->timer_cb || multi->dead)
  ------------------
  |  Branch (3590:6): [True: 18.4k, False: 0]
  |  Branch (3590:26): [True: 0, False: 0]
  ------------------
 3591|  18.4k|    return CURLM_OK;
 3592|      0|  multi_timeout(multi, &timeouts_offset_us, &timeout_ms);
 3593|       |
 3594|      0|  if(timeout_ms < 0 && multi->last_timeout_ms < 0) {
  ------------------
  |  Branch (3594:6): [True: 0, False: 0]
  |  Branch (3594:24): [True: 0, False: 0]
  ------------------
 3595|       |    /* nothing to do */
 3596|      0|  }
 3597|      0|  else if(timeout_ms < 0) {
  ------------------
  |  Branch (3597:11): [True: 0, False: 0]
  ------------------
 3598|       |    /* there is no timeout now but there was one previously */
 3599|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3600|      0|    timeout_ms = -1; /* normalize */
 3601|      0|    set_value = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 3602|      0|  }
 3603|      0|  else if(multi->last_timeout_ms < 0) {
  ------------------
  |  Branch (3603:11): [True: 0, False: 0]
  ------------------
 3604|      0|    CURL_TRC_M(multi->admin, "[TIMER] set %dms, 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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3605|      0|    set_value = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 3606|      0|  }
 3607|      0|  else if(multi->last_expire_offset_us != timeouts_offset_us) {
  ------------------
  |  Branch (3607:11): [True: 0, False: 0]
  ------------------
 3608|       |    /* We had a timeout before and have one now, the absolute timestamp
 3609|       |     * differs. The relative timeout_ms may be the same, but the starting
 3610|       |     * point differs. Let the application restart its timer. */
 3611|      0|    CURL_TRC_M(multi->admin, "[TIMER] set %dms, 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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3612|      0|               timeout_ms);
 3613|      0|    set_value = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 3614|      0|  }
 3615|      0|  else {
 3616|       |    /* We have same expire time as previously. Our relative 'timeout_ms'
 3617|       |     * may be different now, but the application has the timer running
 3618|       |     * and we do not to tell it to start this again. */
 3619|      0|  }
 3620|       |
 3621|      0|  if(set_value) {
  ------------------
  |  Branch (3621:6): [True: 0, False: 0]
  ------------------
 3622|      0|    struct Curl_mapi_guard guard;
 3623|       |
 3624|      0|    multi->last_expire_offset_us = timeouts_offset_us;
 3625|      0|    multi->last_timeout_ms = timeout_ms;
 3626|      0|    CURL_CBAPI_MULTI_START(&guard, multi, multi_timer_cb);
  ------------------
  |  |  203|      0|  Curl_cbapi_enter((g), NULL, (m), CURL_CBAPI_FN_##fn)
  ------------------
 3627|      0|    rc = multi->timer_cb(multi, timeout_ms, multi->timer_userp);
 3628|      0|    CURL_CBAPI_MULTI_END(&guard);
  ------------------
  |  |  207|      0|  Curl_cbapi_leave(g)
  ------------------
 3629|      0|    if(rc == -1) {
  ------------------
  |  Branch (3629:8): [True: 0, False: 0]
  ------------------
 3630|      0|      multi->dead = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 3631|      0|      return CURLM_ABORTED_BY_CALLBACK;
 3632|      0|    }
 3633|      0|  }
 3634|      0|  return CURLM_OK;
 3635|      0|}
Curl_expire:
 3750|  7.45k|{
 3751|  7.45k|  struct Curl_multi *multi = data->multi;
 3752|  7.45k|  struct expire_timers *timeouts = &data->state.timeouts;
 3753|  7.45k|  uint8_t prev_id = timeouts->first;
 3754|  7.45k|  struct curltime set;
 3755|       |
 3756|       |  /* this is only interesting while there is still an associated multi struct
 3757|       |     remaining! */
 3758|  7.45k|  if(!multi)
  ------------------
  |  Branch (3758:6): [True: 0, False: 7.45k]
  ------------------
 3759|      0|    return;
 3760|  7.45k|  DEBUGASSERT(eid < EXPIRE_LAST);
  ------------------
  |  | 1075|  7.45k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3760:3): [True: 0, False: 7.45k]
  |  Branch (3760:3): [True: 7.45k, False: 0]
  ------------------
 3761|  7.45k|  if(milli > INT_MAX)
  ------------------
  |  Branch (3761:6): [True: 0, False: 7.45k]
  ------------------
 3762|       |    /* Cap ridiculous timeouts, 31-bit ms is still 3.5 weeks. When the time
 3763|       |       goes to the user, it must fit in this size. */
 3764|      0|    milli = INT_MAX;
 3765|       |
 3766|  7.45k|  set = *Curl_pgrs_now(data);
 3767|  7.45k|  set.tv_sec += (time_t)(milli / 1000); /* may be a 64 to 32-bit conversion */
 3768|  7.45k|  set.tv_usec += (int)(milli % 1000) * 1000;
 3769|  7.45k|  if(set.tv_usec >= 1000000) {
  ------------------
  |  Branch (3769:6): [True: 1.57k, False: 5.88k]
  ------------------
 3770|  1.57k|    set.tv_sec++;
 3771|  1.57k|    set.tv_usec -= 1000000;
 3772|  1.57k|  }
 3773|       |
 3774|       |  /* Add the timeout, will replace any previous value for this timer. */
 3775|  7.45k|  multi_set_timeout(data, &set, eid);
 3776|  7.45k|  DEBUGASSERT(timeouts->first < EXPIRE_LAST);
  ------------------
  |  | 1075|  7.45k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3776:3): [True: 0, False: 7.45k]
  |  Branch (3776:3): [True: 7.45k, False: 0]
  ------------------
 3777|       |
 3778|  7.45k|  if(Curl_timeouts_has(data)) {
  ------------------
  |  Branch (3778:6): [True: 3.76k, False: 3.68k]
  ------------------
 3779|       |    /* data has already a timeout registered. If the first timer
 3780|       |     * was NOT the one we just set AND is still the first one,
 3781|       |     * nothing changed from the timeouts point of view. The
 3782|       |     * set timer triggers after the one already registered. Leave. */
 3783|  3.76k|    if((prev_id != eid) && (prev_id == timeouts->first))
  ------------------
  |  Branch (3783:8): [True: 3.76k, False: 0]
  |  Branch (3783:28): [True: 3.76k, False: 3]
  ------------------
 3784|  3.76k|      return;
 3785|       |
 3786|       |    /* Since this is an updated time, we must remove data from
 3787|       |     * timeouts and then add it again. */
 3788|      3|    Curl_timeouts_remove(&multi->timeouts, data);
 3789|      3|  }
 3790|       |
 3791|       |  /* Insert the new timer expiry since it is our local minimum. */
 3792|  3.68k|  Curl_timeouts_add(&multi->timeouts, data,
 3793|  3.68k|                    timeouts->offset_us[timeouts->first]);
 3794|  3.68k|}
Curl_expire_clear:
 3800|  3.69k|{
 3801|       |  /* remove the timer, if there */
 3802|  3.69k|  multi_clear_timeout(data, eid);
 3803|  3.69k|  CURL_TRC_TIMER(data, eid, "cleared");
  ------------------
  |  |  173|  3.69k|  do {                                        \
  |  |  174|  3.69k|    if(CURL_TRC_TIMER_is_verbose(data))       \
  |  |  ------------------
  |  |  |  |  139|  3.69k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_timer)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.69k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.39k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.69k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.69k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.39k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.69k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  175|  3.69k|      Curl_trc_timer(data, tid, __VA_ARGS__); \
  |  |  176|  3.69k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (176:11): [Folded, False: 3.69k]
  |  |  ------------------
  ------------------
 3804|  3.69k|}
Curl_expire_clear_all:
 3810|  14.9k|{
 3811|  14.9k|  struct Curl_multi *multi = data->multi;
 3812|       |
 3813|       |  /* this is only interesting while there is still an associated multi struct
 3814|       |     remaining! */
 3815|  14.9k|  if(!multi)
  ------------------
  |  Branch (3815:6): [True: 7.46k, False: 7.46k]
  ------------------
 3816|  7.46k|    return;
 3817|       |
 3818|  7.46k|  if(Curl_timeouts_remove(&multi->timeouts, data)) {
  ------------------
  |  Branch (3818:6): [True: 3.66k, False: 3.79k]
  ------------------
 3819|       |    /* Since this is an cleared time, we must remove the previous entry from
 3820|       |       the splay tree */
 3821|  3.66k|    multi_timeouts_init(data);
 3822|       |
 3823|  3.66k|    if(data->id >= 0)
  ------------------
  |  Branch (3823:8): [True: 3.66k, False: 0]
  ------------------
 3824|  3.66k|      CURL_TRC_M(data, "[TIMEOUT] all cleared");
  ------------------
  |  |  148|  3.66k|  do {                                   \
  |  |  149|  3.66k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  3.66k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.66k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.33k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.66k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.66k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.33k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.66k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  3.66k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  3.66k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 3.66k]
  |  |  ------------------
  ------------------
 3825|  3.66k|  }
 3826|  7.46k|}
Curl_multi_max_concurrent_streams:
 3904|      4|{
 3905|      4|  DEBUGASSERT(multi);
  ------------------
  |  | 1075|      4|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3905:3): [True: 0, False: 4]
  |  Branch (3905:3): [True: 4, False: 0]
  ------------------
 3906|      4|  return multi->max_concurrent_streams;
 3907|      4|}
Curl_multi_xfer_buf_borrow:
 3990|  7.23k|{
 3991|  7.23k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  7.23k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3991:3): [True: 0, False: 7.23k]
  |  Branch (3991:3): [True: 7.23k, False: 0]
  ------------------
 3992|  7.23k|  DEBUGASSERT(data->multi);
  ------------------
  |  | 1075|  7.23k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3992:3): [True: 0, False: 7.23k]
  |  Branch (3992:3): [True: 7.23k, False: 0]
  ------------------
 3993|  7.23k|  *pbuf = NULL;
 3994|  7.23k|  *pbuflen = 0;
 3995|  7.23k|  if(!data->multi) {
  ------------------
  |  Branch (3995:6): [True: 0, False: 7.23k]
  ------------------
 3996|      0|    failf(data, "transfer has no multi handle");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3997|      0|    return CURLE_FAILED_INIT;
 3998|      0|  }
 3999|  7.23k|  if(!data->set.buffer_size) {
  ------------------
  |  Branch (3999:6): [True: 0, False: 7.23k]
  ------------------
 4000|      0|    failf(data, "transfer buffer size is 0");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4001|      0|    return CURLE_FAILED_INIT;
 4002|      0|  }
 4003|  7.23k|  if(data->multi->xfer_buf_borrowed) {
  ------------------
  |  Branch (4003:6): [True: 0, False: 7.23k]
  ------------------
 4004|      0|    failf(data, "attempt to borrow xfer_buf when already borrowed");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4005|      0|    return CURLE_AGAIN;
 4006|      0|  }
 4007|       |
 4008|  7.23k|  if(data->multi->xfer_buf &&
  ------------------
  |  Branch (4008:6): [True: 3.63k, False: 3.59k]
  ------------------
 4009|  3.63k|     data->set.buffer_size > data->multi->xfer_buf_len) {
  ------------------
  |  Branch (4009:6): [True: 0, False: 3.63k]
  ------------------
 4010|       |    /* not large enough, get a new one */
 4011|      0|    curlx_safefree(data->multi->xfer_buf);
  ------------------
  |  | 1332|      0|  do {                      \
  |  | 1333|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|      0|    (ptr) = NULL;           \
  |  | 1335|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4012|      0|    data->multi->xfer_buf_len = 0;
 4013|      0|  }
 4014|       |
 4015|  7.23k|  if(!data->multi->xfer_buf) {
  ------------------
  |  Branch (4015:6): [True: 3.59k, False: 3.63k]
  ------------------
 4016|  3.59k|    data->multi->xfer_buf = curlx_malloc(curlx_uitouz(data->set.buffer_size));
  ------------------
  |  | 1471|  3.59k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
 4017|  3.59k|    if(!data->multi->xfer_buf) {
  ------------------
  |  Branch (4017:8): [True: 0, False: 3.59k]
  ------------------
 4018|      0|      failf(data, "could not allocate xfer_buf of %u bytes",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4019|      0|            data->set.buffer_size);
 4020|      0|      return CURLE_OUT_OF_MEMORY;
 4021|      0|    }
 4022|  3.59k|    data->multi->xfer_buf_len = data->set.buffer_size;
 4023|  3.59k|  }
 4024|       |
 4025|  7.23k|  data->multi->xfer_buf_borrowed = TRUE;
  ------------------
  |  | 1045|  7.23k|#define TRUE true
  ------------------
 4026|  7.23k|  *pbuf = data->multi->xfer_buf;
 4027|  7.23k|  *pbuflen = data->multi->xfer_buf_len;
 4028|  7.23k|  return CURLE_OK;
 4029|  7.23k|}
Curl_multi_xfer_buf_release:
 4032|  7.23k|{
 4033|  7.23k|  (void)buf;
 4034|  7.23k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  7.23k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4034:3): [True: 0, False: 7.23k]
  |  Branch (4034:3): [True: 7.23k, False: 0]
  ------------------
 4035|  7.23k|  DEBUGASSERT(data->multi);
  ------------------
  |  | 1075|  7.23k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4035:3): [True: 0, False: 7.23k]
  |  Branch (4035:3): [True: 7.23k, False: 0]
  ------------------
 4036|  7.23k|  DEBUGASSERT(!buf || data->multi->xfer_buf == buf);
  ------------------
  |  | 1075|  7.23k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4036:3): [True: 7.23k, False: 0]
  |  Branch (4036:3): [True: 0, False: 0]
  |  Branch (4036:3): [True: 0, False: 7.23k]
  |  Branch (4036:3): [True: 7.23k, False: 0]
  ------------------
 4037|  7.23k|  data->multi->xfer_buf_borrowed = FALSE;
  ------------------
  |  | 1048|  7.23k|#define FALSE false
  ------------------
 4038|  7.23k|}
Curl_multi_get_easy:
 4159|  21.9k|{
 4160|  21.9k|  struct Curl_easy *data = Curl_uint32_tbl_get(&multi->xfers, mid);
 4161|  21.9k|  if(GOOD_EASY_HANDLE(data))
  ------------------
  |  |   34|  21.9k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |   28|  21.9k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1045|  21.9k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (34:3): [True: 21.9k, False: 0]
  |  |  |  Branch (34:5): [True: 21.9k, False: 0]
  |  |  |  Branch (34:12): [True: 21.9k, False: 0]
  |  |  ------------------
  |  |   35|  21.9k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (4161:6): [True: 0, False: 0]
  |  Branch (4161:6): [True: 0, False: 0]
  ------------------
 4162|  21.9k|    return data;
 4163|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4164|      0|             mid);
 4165|      0|  Curl_uint32_tbl_remove(&multi->xfers, mid);
 4166|       |  return NULL;
 4167|  21.9k|}
Curl_multi_knows_easy:
 4170|  29.4k|{
 4171|  29.4k|  return Curl_uint32_tbl_get(&multi->xfers, data->mid) == data;
 4172|  29.4k|}
Curl_multi_xfers_running:
 4175|  10.9k|{
 4176|  10.9k|  if(!multi) {
  ------------------
  |  Branch (4176:6): [True: 0, False: 10.9k]
  ------------------
 4177|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4177:5): [Folded, False: 0]
  |  Branch (4177:5): [Folded, False: 0]
  ------------------
 4178|      0|    return 0;
 4179|      0|  }
 4180|  10.9k|  return multi->xfers_alive;
 4181|  10.9k|}
Curl_multi_xfers_attached:
 4184|     41|{
 4185|     41|  if(!multi || !multi->admin) {
  ------------------
  |  Branch (4185:6): [True: 0, False: 41]
  |  Branch (4185:16): [True: 0, False: 41]
  ------------------
 4186|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4186:5): [Folded, False: 0]
  |  Branch (4186:5): [Folded, False: 0]
  ------------------
 4187|      0|    return 0;
 4188|      0|  }
 4189|       |  /* Discount the admin handle */
 4190|     41|  return Curl_uint32_tbl_count(&multi->xfers) - 1;
 4191|     41|}
Curl_multi_mark_dirty:
 4194|  3.73k|{
 4195|  3.73k|  if(data->multi && data->mid != UINT32_MAX)
  ------------------
  |  Branch (4195:6): [True: 3.73k, False: 0]
  |  Branch (4195:21): [True: 3.73k, False: 0]
  ------------------
 4196|  3.73k|    Curl_uint32_bset_add(&data->multi->dirty, data->mid);
 4197|  3.73k|}
multi.c:multi_xfers_add:
  415|  3.73k|{
  416|  3.73k|  uint32_t capacity = Curl_uint32_tbl_capacity(&multi->xfers);
  417|  3.73k|  uint32_t new_size = 0;
  418|       |  /* Prepare to make this into a CURLMOPT_MAX_TRANSFERS, because some
  419|       |   * applications may want to prevent a run-away of their memory use. */
  420|       |  /* UINT_MAX is our "invalid" id, do not let the table grow up to that. */
  421|  3.73k|  const uint32_t max_capacity = UINT_MAX - 1;
  422|       |
  423|  3.73k|  if(capacity < max_capacity) {
  ------------------
  |  Branch (423:6): [True: 3.73k, False: 0]
  ------------------
  424|       |    /* We want `multi->xfers` to have "sufficient" free rows, so that we do
  425|       |     * not have to reuse the `mid` from a removed easy right away.
  426|       |     * Check if an 8th of the capacity is still free */
  427|  3.73k|    uint32_t used = Curl_uint32_tbl_count(&multi->xfers);
  428|  3.73k|    uint32_t unused = capacity - used;
  429|  3.73k|    uint32_t min_unused = CURLMAX(capacity >> 3, 4);
  ------------------
  |  | 1287|  3.73k|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 3.73k, False: 0]
  |  |  ------------------
  ------------------
  430|  3.73k|    if(unused < min_unused) {
  ------------------
  |  Branch (430:8): [True: 0, False: 3.73k]
  ------------------
  431|       |      /* Grow by 50% of current capacity, in range of [128, 2048],
  432|       |       * which means the table grows max by 16kb on 64-bit arch. */
  433|      0|      uint32_t growth = CURLMIN(CURLMAX(capacity >> 1, 128), 2048);
  ------------------
  |  | 1288|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1288:24): [True: 0, False: 0]
  |  |  |  Branch (1288:25): [True: 0, False: 0]
  |  |  |  Branch (1288:37): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  434|       |      /* Make sure the uint arithmetic here works on the corner
  435|       |       * cases where we are close to max_capacity or UINT_MAX */
  436|      0|      if((max_capacity - growth) <= capacity)
  ------------------
  |  Branch (436:10): [True: 0, False: 0]
  ------------------
  437|      0|        new_size = max_capacity;
  438|      0|      else
  439|      0|        new_size = capacity + growth;
  440|      0|    }
  441|  3.73k|  }
  442|       |
  443|  3.73k|  if(new_size > capacity) {
  ------------------
  |  Branch (443:6): [True: 0, False: 3.73k]
  ------------------
  444|       |    /* Grow the bitsets first. Should one fail, we do not need
  445|       |     * to downsize the already resized ones. The sets continue
  446|       |     * to work properly when larger than the table, but not
  447|       |     * the other way around. */
  448|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  449|      0|    if(Curl_uint32_bset_resize(&multi->process, new_size) ||
  ------------------
  |  Branch (449:8): [True: 0, False: 0]
  ------------------
  450|      0|       Curl_uint32_bset_resize(&multi->dirty, new_size) ||
  ------------------
  |  Branch (450:8): [True: 0, False: 0]
  ------------------
  451|      0|       Curl_uint32_bset_resize(&multi->pending, new_size) ||
  ------------------
  |  Branch (451:8): [True: 0, False: 0]
  ------------------
  452|      0|       Curl_uint32_bset_resize(&multi->msgsent, new_size) ||
  ------------------
  |  Branch (452:8): [True: 0, False: 0]
  ------------------
  453|      0|       Curl_uint32_tbl_resize(&multi->xfers, new_size))
  ------------------
  |  Branch (453:8): [True: 0, False: 0]
  ------------------
  454|      0|      return CURLM_OUT_OF_MEMORY;
  455|      0|  }
  456|       |
  457|       |  /* Insert the easy into the table now */
  458|  3.73k|  if(!Curl_uint32_tbl_add(&multi->xfers, data, &data->mid)) {
  ------------------
  |  Branch (458:6): [True: 0, False: 3.73k]
  ------------------
  459|       |    /* MUST only happen when table is full */
  460|      0|    DEBUGASSERT(Curl_uint32_tbl_capacity(&multi->xfers) <=
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (460:5): [True: 0, False: 0]
  |  Branch (460:5): [True: 0, False: 0]
  ------------------
  461|      0|                Curl_uint32_tbl_count(&multi->xfers));
  462|      0|    return CURLM_OUT_OF_MEMORY;
  463|      0|  }
  464|  3.73k|  return CURLM_OK;
  465|  3.73k|}
multi.c:mstate:
  155|  39.6k|{
  156|  39.6k|  CURLMstate oldstate = data->mstate;
  157|  39.6k|  static const mstate_enter_func state_enter[MSTATE_LAST] = {
  158|  39.6k|    NULL,                      /* INIT */
  159|  39.6k|    NULL,                      /* PENDING */
  160|  39.6k|    NULL,                      /* SETUP */
  161|  39.6k|    mstate_enter_connect,      /* CONNECT */
  162|  39.6k|    NULL,                      /* CONNECTING */
  163|  39.6k|    NULL,                      /* PROTOCONNECT */
  164|  39.6k|    NULL,                      /* PROTOCONNECTING */
  165|  39.6k|    NULL,                      /* DO */
  166|  39.6k|    NULL,                      /* DOING */
  167|  39.6k|    NULL,                      /* DOING_MORE */
  168|  39.6k|    mstate_enter_did,          /* DID */
  169|  39.6k|    NULL,                      /* PERFORMING */
  170|  39.6k|    NULL,                      /* RATELIMITING */
  171|  39.6k|    mstate_enter_done,         /* DONE */
  172|  39.6k|    mstate_enter_completed,    /* COMPLETED */
  173|       |    NULL                       /* MSGSENT */
  174|  39.6k|  };
  175|       |
  176|  39.6k|  if(oldstate == state)
  ------------------
  |  Branch (176:6): [True: 3.73k, False: 35.9k]
  ------------------
  177|       |    /* do not bother when the new state is the same as the old state */
  178|  3.73k|    return;
  179|       |
  180|  35.9k|#ifdef DEBUGBUILD
  181|  35.9k|  NOVERBOSE((void)lineno);
  ------------------
  |  | 1612|  35.9k|#define NOVERBOSE(x) Curl_nop_stmt
  |  |  ------------------
  |  |  |  | 1183|  35.9k|#define Curl_nop_stmt do {} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1183:35): [Folded, False: 35.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  182|  35.9k|  CURL_TRC_M(data, "-> [%s] (line %d)", CURL_MSTATE_NAME(state), lineno);
  ------------------
  |  |  148|  35.9k|  do {                                   \
  |  |  149|  35.9k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  35.9k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  35.9k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  71.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 35.9k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 35.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  71.8k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  35.9k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  35.9k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  35.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 35.9k]
  |  |  ------------------
  ------------------
  183|       |#else
  184|       |  CURL_TRC_M(data, "-> [%s]", CURL_MSTATE_NAME(state));
  185|       |#endif
  186|       |
  187|       |  /* really switching state */
  188|  35.9k|  data->mstate = state;
  189|  35.9k|  if(state_enter[state])
  ------------------
  |  Branch (189:6): [True: 14.0k, False: 21.8k]
  ------------------
  190|  14.0k|    state_enter[state](data, oldstate);
  191|  35.9k|}
multi.c:mstate_enter_connect:
   99|  3.66k|{
  100|  3.66k|  (void)from_state;
  101|  3.66k|  Curl_init_CONNECT(data);
  102|  3.66k|}
multi.c:mstate_enter_did:
  106|  3.59k|{
  107|  3.59k|  (void)from_state;
  108|  3.59k|  data->req.chunk = FALSE;
  ------------------
  |  | 1048|  3.59k|#define FALSE false
  ------------------
  109|  3.59k|  Curl_pgrsTime(data, TIMER_PRETRANSFER);
  110|  3.59k|  if(!CURL_REQ_WANT_SEND(data))
  ------------------
  |  |   39|  3.59k|#define CURL_REQ_WANT_SEND(d)  ((d)->req.io_flags & REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|  3.59k|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  ------------------
  |  Branch (110:6): [True: 3.48k, False: 114]
  ------------------
  111|  3.48k|    Curl_pgrsTime(data, TIMER_POSTRANSFER);
  112|  3.59k|}
multi.c:mstate_enter_done:
  116|  3.02k|{
  117|  3.02k|  (void)from_state;
  118|  3.02k|  CURLM_NTFY(data, CURLMNOTIFY_EASY_DONE);
  ------------------
  |  |   51|  3.02k|  do {                                                \
  |  |   52|  3.02k|    if((d) && (d)->multi && (d)->multi->ntfy.ntfy_cb) \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 3.02k, False: 0]
  |  |  |  Branch (52:15): [True: 3.02k, False: 0]
  |  |  |  Branch (52:29): [True: 0, False: 3.02k]
  |  |  ------------------
  |  |   53|  3.02k|      Curl_mntfy_add((d), (t));                       \
  |  |   54|  3.02k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (54:11): [Folded, False: 3.02k]
  |  |  ------------------
  ------------------
  119|  3.02k|}
multi.c:mstate_enter_completed:
  123|  3.73k|{
  124|       |  /* we sometimes directly jump to COMPLETED, trigger things
  125|       |   * we then missed. */
  126|  3.73k|  if(from_state < MSTATE_DID) {
  ------------------
  |  Branch (126:6): [True: 120, False: 3.61k]
  ------------------
  127|    120|    Curl_pgrsTime(data, TIMER_PRETRANSFER);
  128|    120|    Curl_pgrsTime(data, TIMER_POSTRANSFER);
  129|    120|    Curl_pgrsTime(data, TIMER_STARTTRANSFER);
  130|    120|  }
  131|  3.73k|  Curl_pgrsCompleted(data);
  132|  3.73k|  if(from_state < MSTATE_DONE)
  ------------------
  |  Branch (132:6): [True: 705, False: 3.02k]
  ------------------
  133|    705|    CURLM_NTFY(data, CURLMNOTIFY_EASY_DONE);
  ------------------
  |  |   51|    705|  do {                                                \
  |  |   52|    705|    if((d) && (d)->multi && (d)->multi->ntfy.ntfy_cb) \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 705, False: 0]
  |  |  |  Branch (52:15): [True: 705, False: 0]
  |  |  |  Branch (52:29): [True: 0, False: 705]
  |  |  ------------------
  |  |   53|    705|      Curl_mntfy_add((d), (t));                       \
  |  |   54|    705|  } while(0)
  |  |  ------------------
  |  |  |  Branch (54:11): [Folded, False: 705]
  |  |  ------------------
  ------------------
  134|       |  /* changing to COMPLETED means it is in process and needs to go */
  135|  3.73k|  DEBUGASSERT(Curl_uint32_bset_contains(&data->multi->process, data->mid));
  ------------------
  |  | 1075|  3.73k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (135:3): [True: 0, False: 3.73k]
  |  Branch (135:3): [True: 3.73k, False: 0]
  ------------------
  136|  3.73k|  Curl_uint32_bset_remove(&data->multi->process, data->mid);
  137|  3.73k|  Curl_uint32_bset_remove(&data->multi->pending, data->mid); /* to be sure */
  138|       |
  139|  3.73k|  if(Curl_uint32_bset_empty(&data->multi->process)) {
  ------------------
  |  Branch (139:6): [True: 0, False: 3.73k]
  ------------------
  140|       |    /* free the transfer buffer when we have no more active transfers */
  141|      0|    multi_xfer_bufs_free(data->multi);
  142|      0|  }
  143|       |  /* Important: reset the conn pointer so that we do not point to memory
  144|       |     that could be freed anytime */
  145|  3.73k|  Curl_detach_connection(data);
  146|  3.73k|  Curl_expire_clear_all(data); /* stop all timers */
  147|  3.73k|}
multi.c:multi_warn_debug:
  385|  25.7k|{
  386|  25.7k|  if(!multi->warned) {
  ------------------
  |  Branch (386:6): [True: 3.73k, False: 21.9k]
  ------------------
  387|  3.73k|    infof(data, "!!! WARNING !!!");
  ------------------
  |  |  143|  3.73k|  do {                               \
  |  |  144|  3.73k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  3.73k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 3.73k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.73k]
  |  |  |  |  ------------------
  |  |  |  |  323|  3.73k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  3.73k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  3.73k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 3.73k]
  |  |  ------------------
  ------------------
  388|  3.73k|    infof(data, "This is a debug build of libcurl, "
  ------------------
  |  |  143|  3.73k|  do {                               \
  |  |  144|  3.73k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  3.73k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 3.73k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.73k]
  |  |  |  |  ------------------
  |  |  |  |  323|  3.73k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  3.73k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  3.73k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 3.73k]
  |  |  ------------------
  ------------------
  389|  3.73k|                "do not use in production.");
  390|       |    multi->warned = TRUE;
  ------------------
  |  | 1045|  3.73k|#define TRUE true
  ------------------
  391|  3.73k|  }
  392|  25.7k|}
multi.c:multi_done:
  688|  3.62k|{
  689|  3.62k|  CURLcode result;
  690|  3.62k|  struct connectdata *conn = data->conn;
  691|       |
  692|  3.62k|  CURL_TRC_M(data, "multi_done: status: %d prem: %d done: %d",
  ------------------
  |  |  148|  3.62k|  do {                                   \
  |  |  149|  3.62k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  3.62k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.62k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.62k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  3.62k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  693|  3.62k|             (int)status, (int)premature, data->state.done);
  694|       |
  695|  3.62k|  if(data->state.done)
  ------------------
  |  Branch (695:6): [True: 0, False: 3.62k]
  ------------------
  696|       |    /* Stop if multi_done() has already been called */
  697|      0|    return CURLE_OK;
  698|       |
  699|       |  /* Shut down any ongoing async resolver operation. */
  700|  3.62k|  Curl_resolv_shutdown_all(data);
  701|       |
  702|       |  /* Cleanup possible redirect junk */
  703|  3.62k|  curlx_safefree(data->req.newurl);
  ------------------
  |  | 1332|  3.62k|  do {                      \
  |  | 1333|  3.62k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.62k|    (ptr) = NULL;           \
  |  | 1335|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  704|  3.62k|  curlx_safefree(data->req.location);
  ------------------
  |  | 1332|  3.62k|  do {                      \
  |  | 1333|  3.62k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.62k|    (ptr) = NULL;           \
  |  | 1335|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  705|       |
  706|  3.62k|  switch(status) {
  707|      0|  case CURLE_ABORTED_BY_CALLBACK:
  ------------------
  |  Branch (707:3): [True: 0, False: 3.62k]
  ------------------
  708|     12|  case CURLE_READ_ERROR:
  ------------------
  |  Branch (708:3): [True: 12, False: 3.61k]
  ------------------
  709|     12|  case CURLE_WRITE_ERROR:
  ------------------
  |  Branch (709:3): [True: 0, False: 3.62k]
  ------------------
  710|       |    /* When we are aborted due to a callback return code it has to be counted
  711|       |       as premature as there is trouble ahead if we do not. We have many
  712|       |       callbacks and protocols work differently, we could potentially do this
  713|       |       more fine-grained in the future. */
  714|     12|    premature = TRUE;
  ------------------
  |  | 1045|     12|#define TRUE true
  ------------------
  715|     12|    FALLTHROUGH();
  ------------------
  |  |  815|     12|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  716|  3.62k|  default:
  ------------------
  |  Branch (716:3): [True: 3.61k, False: 12]
  ------------------
  717|  3.62k|    break;
  718|  3.62k|  }
  719|       |
  720|       |  /* this calls the protocol-specific function pointer previously set */
  721|  3.62k|  if(conn && conn->scheme->run->done && (data->mstate >= MSTATE_PROTOCONNECT))
  ------------------
  |  Branch (721:6): [True: 3.62k, False: 0]
  |  Branch (721:14): [True: 3.62k, False: 0]
  |  Branch (721:41): [True: 3.62k, False: 0]
  ------------------
  722|  3.62k|    result = conn->scheme->run->done(data, status, premature);
  723|      0|  else
  724|      0|    result = status;
  725|       |
  726|  3.62k|  if(data->mstate > MSTATE_CONNECTING &&
  ------------------
  |  Branch (726:6): [True: 3.62k, False: 0]
  ------------------
  727|  3.62k|     (result != CURLE_ABORTED_BY_CALLBACK)) {
  ------------------
  |  Branch (727:6): [True: 3.62k, False: 0]
  ------------------
  728|       |    /* avoid this if
  729|       |     * - the transfer has not connected
  730|       |     * - we already aborted by callback to avoid this calling another callback
  731|       |     */
  732|  3.62k|    int rc = Curl_pgrsDone(data);
  733|  3.62k|    if(!result && rc)
  ------------------
  |  Branch (733:8): [True: 63, False: 3.56k]
  |  Branch (733:19): [True: 0, False: 63]
  ------------------
  734|      0|      result = CURLE_ABORTED_BY_CALLBACK;
  735|  3.62k|  }
  736|       |
  737|       |  /* Make sure that transfer client writes are really done now. */
  738|  3.62k|  result = Curl_1st_fatal(result, Curl_xfer_write_done(data, premature));
  739|       |
  740|       |  /* Inform connection filters that this transfer is done */
  741|  3.62k|  if(conn)
  ------------------
  |  Branch (741:6): [True: 3.62k, False: 0]
  ------------------
  742|  3.62k|    Curl_conn_ev_data_done(data, premature);
  743|       |
  744|  3.62k|  multi_schedule_pending(data->multi); /* connection / multiplex */
  745|       |
  746|  3.62k|  if(!result)
  ------------------
  |  Branch (746:6): [True: 63, False: 3.56k]
  ------------------
  747|     63|    result = Curl_req_done(&data->req, data, premature);
  748|       |
  749|  3.62k|  if(conn) {
  ------------------
  |  Branch (749:6): [True: 3.62k, False: 0]
  ------------------
  750|       |    /* Under the potential connection pool's share lock, decide what to
  751|       |     * do with the transfer's connection. */
  752|  3.62k|    struct multi_done_ctx mdctx;
  753|       |
  754|  3.62k|    memset(&mdctx, 0, sizeof(mdctx));
  755|  3.62k|    mdctx.premature = premature;
  756|  3.62k|    Curl_cpool_do_locked(data, data->conn, multi_done_locked, &mdctx);
  757|  3.62k|  }
  758|       |
  759|       |  /* flush the netrc cache */
  760|  3.62k|  Curl_netrc_cleanup(&data->state.netrc);
  761|  3.62k|  return result;
  762|  3.62k|}
multi.c:multi_done_locked:
  635|  3.62k|{
  636|  3.62k|  struct multi_done_ctx *mdctx = userdata;
  637|       |
  638|  3.62k|  Curl_detach_connection(data);
  639|       |
  640|  3.62k|  CURL_TRC_M(data, "multi_done_locked, in use=%u", conn->attached_xfers);
  ------------------
  |  |  148|  3.62k|  do {                                   \
  |  |  149|  3.62k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  3.62k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.62k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.62k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  3.62k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  641|  3.62k|  if(CONN_INUSE(conn)) {
  ------------------
  |  |  357|  3.62k|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  |  |  ------------------
  |  |  |  Branch (357:23): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  642|       |    /* Stop if still used. */
  643|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  644|      0|               conn->attached_xfers);
  645|      0|    return;
  646|      0|  }
  647|       |
  648|  3.62k|  data->state.done = TRUE; /* called now! */
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  649|       |
  650|  3.62k|  Curl_dnscache_prune(data);
  651|       |
  652|  3.62k|  if(multi_conn_should_close(conn, data, (bool)mdctx->premature)) {
  ------------------
  |  Branch (652:6): [True: 3.58k, False: 41]
  ------------------
  653|  3.58k|    CURL_TRC_M(data, "multi_done, terminating conn #%" FMT_OFF_T " to %s:%u, "
  ------------------
  |  |  148|  3.58k|  do {                                   \
  |  |  149|  3.58k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  3.58k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.58k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.17k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.58k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.58k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.17k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.58k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  3.58k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  3.58k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 3.58k]
  |  |  ------------------
  ------------------
  654|  3.58k|               "forbid=%d, close=%d, premature=%d, conn_multiplex=%d",
  655|  3.58k|               conn->connection_id, conn->origin->user_hostname,
  656|  3.58k|               conn->origin->port,
  657|  3.58k|               data->set.reuse_forbid, conn->bits.close, mdctx->premature,
  658|  3.58k|               Curl_conn_is_multiplex(conn, FIRSTSOCKET));
  659|  3.58k|    connclose(conn);
  ------------------
  |  |   90|  3.58k|#define connclose(x)   Curl_conncontrol((x), CONNCTRL_CONN_CLOSE)
  |  |  ------------------
  |  |  |  |   84|  3.58k|#define CONNCTRL_CONN_CLOSE      1
  |  |  ------------------
  ------------------
  660|  3.58k|    Curl_conn_close(data, conn, (bool)mdctx->premature);
  661|  3.58k|  }
  662|     41|  else if(!Curl_conn_get_max_concurrent(data, conn, FIRSTSOCKET)) {
  ------------------
  |  |  234|     41|#define FIRSTSOCKET     0
  ------------------
  |  Branch (662:11): [True: 0, False: 41]
  ------------------
  663|      0|    CURL_TRC_M(data, "multi_done, conn #%" FMT_OFF_T " to %s:%u 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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  664|      0|               " by server, not reusing", conn->connection_id,
  665|      0|               conn->origin->user_hostname, conn->origin->port);
  666|      0|    connclose(conn);
  ------------------
  |  |   90|      0|#define connclose(x)   Curl_conncontrol((x), CONNCTRL_CONN_CLOSE)
  |  |  ------------------
  |  |  |  |   84|      0|#define CONNCTRL_CONN_CLOSE      1
  |  |  ------------------
  ------------------
  667|      0|    Curl_conn_close(data, conn, (bool)mdctx->premature);
  668|      0|  }
  669|     41|  else {
  670|       |    /* the connection is no longer in use by any transfer */
  671|     41|    if(Curl_cpool_conn_now_idle(data, conn)) {
  ------------------
  |  Branch (671:8): [True: 41, False: 0]
  ------------------
  672|       |      /* connection kept in the cpool */
  673|     41|      infof(data, "Connection #%" FMT_OFF_T " to host %s:%u left intact",
  ------------------
  |  |  143|     41|  do {                               \
  |  |  144|     41|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|     41|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 41, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 41]
  |  |  |  |  ------------------
  |  |  |  |  323|     41|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     41|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     41|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 41]
  |  |  ------------------
  ------------------
  674|     41|            conn->connection_id, conn->origin->user_hostname,
  675|     41|            conn->origin->port);
  676|     41|    }
  677|      0|    else {
  678|       |      /* connection was removed from the cpool and destroyed. */
  679|      0|      data->state.lastconnect_id = -1;
  680|      0|    }
  681|     41|  }
  682|  3.62k|}
multi.c:multi_conn_should_close:
  594|  3.62k|{
  595|       |  /* if conn->bits.close is TRUE, it means that the connection should be
  596|       |     closed in spite of everything else. */
  597|  3.62k|  if(conn->bits.close)
  ------------------
  |  Branch (597:6): [True: 3.58k, False: 43]
  ------------------
  598|  3.58k|    return TRUE;
  ------------------
  |  | 1045|  3.58k|#define TRUE true
  ------------------
  599|       |
  600|       |  /* if data->set.reuse_forbid is TRUE, it means the libcurl client has
  601|       |     forced us to close this connection. This is ignored for requests taking
  602|       |     place in a NTLM/NEGOTIATE authentication handshake. */
  603|     43|  if(data->set.reuse_forbid
  ------------------
  |  Branch (603:6): [True: 2, False: 41]
  ------------------
  604|       |#ifdef USE_NTLM
  605|       |     && !(conn->http_ntlm_state == NTLMSTATE_TYPE2 ||
  606|       |          conn->proxy_ntlm_state == NTLMSTATE_TYPE2)
  607|       |#endif
  608|       |#ifdef USE_SPNEGO
  609|       |     && !(conn->http_negotiate_state == GSS_AUTHRECV ||
  610|       |          conn->proxy_negotiate_state == GSS_AUTHRECV)
  611|       |#endif
  612|     43|    )
  613|      2|    return TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
  614|       |
  615|       |  /* Unless this connection is for a "connect-only" transfer, it
  616|       |   * needs to be closed if the protocol handler does not support reuse. */
  617|     41|  if(!data->set.connect_only && conn->scheme &&
  ------------------
  |  Branch (617:6): [True: 23, False: 18]
  |  Branch (617:33): [True: 23, False: 0]
  ------------------
  618|     23|     !(conn->scheme->flags & PROTOPT_CONN_REUSE))
  ------------------
  |  |  237|     23|#define PROTOPT_CONN_REUSE (1 << 16)  /* this protocol can reuse connections */
  ------------------
  |  Branch (618:6): [True: 0, False: 23]
  ------------------
  619|      0|    return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  620|       |
  621|       |  /* if premature is TRUE, it means this connection was said to be DONE before
  622|       |     the entire request operation is complete and thus we cannot know in what
  623|       |     state it is for reusing, so we are forced to close it. In a perfect world
  624|       |     we can add code that keep track of if we really must close it here or not,
  625|       |     but currently we have no such detail knowledge. */
  626|     41|  if(premature && !Curl_conn_is_multiplex(conn, FIRSTSOCKET))
  ------------------
  |  |  234|      0|#define FIRSTSOCKET     0
  ------------------
  |  Branch (626:6): [True: 0, False: 41]
  |  Branch (626:19): [True: 0, False: 0]
  ------------------
  627|      0|    return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  628|       |
  629|     41|  return FALSE;
  ------------------
  |  | 1048|     41|#define FALSE false
  ------------------
  630|     41|}
multi.c:multi_assess_wakeup:
  403|  14.9k|{
  404|  14.9k|#ifdef ENABLE_INTERNAL_WAKEUP
  405|  14.9k|  if(multi->socket_cb)
  ------------------
  |  Branch (405:6): [True: 0, False: 14.9k]
  ------------------
  406|      0|    return Curl_multi_ev_assess_xfer(multi, multi->admin);
  407|       |#else
  408|       |  (void)multi;
  409|       |#endif
  410|  14.9k|  return CURLM_OK;
  411|  14.9k|}
multi.c:multi_perform:
 2909|  10.9k|{
 2910|  10.9k|  CURLMcode returncode = CURLM_OK;
 2911|  10.9k|  struct curltime start = *multi_now(multi);
 2912|  10.9k|  uint32_t mid;
 2913|  10.9k|  struct Curl_sigpipe_ctx sigpipe_ctx;
 2914|       |
 2915|  10.9k|  sigpipe_init(&sigpipe_ctx);
 2916|       |
 2917|  10.9k|  if(Curl_uint32_bset_first(&multi->process, &mid)) {
  ------------------
  |  Branch (2917:6): [True: 10.9k, False: 0]
  ------------------
 2918|  10.9k|    CURL_TRC_M(multi->admin, "multi_perform(running=%u)",
  ------------------
  |  |  148|  10.9k|  do {                                   \
  |  |  149|  10.9k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  10.9k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  10.9k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  21.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 10.9k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 10.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  21.9k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  10.9k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  10.9k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  10.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 10.9k]
  |  |  ------------------
  ------------------
 2919|  10.9k|               Curl_multi_xfers_running(multi));
 2920|  21.9k|    do {
 2921|  21.9k|      struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 2922|  21.9k|      CURLMcode mresult;
 2923|  21.9k|      if(!data) {
  ------------------
  |  Branch (2923:10): [True: 0, False: 21.9k]
  ------------------
 2924|      0|        DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2924:9): [Folded, False: 0]
  |  Branch (2924:9): [Folded, False: 0]
  ------------------
 2925|      0|        Curl_uint32_bset_remove(&multi->process, mid);
 2926|      0|        Curl_uint32_bset_remove(&multi->dirty, mid);
 2927|      0|        continue;
 2928|      0|      }
 2929|  21.9k|      mresult = multi_runsingle(multi, data, &sigpipe_ctx);
 2930|  21.9k|      if(mresult)
  ------------------
  |  Branch (2930:10): [True: 0, False: 21.9k]
  ------------------
 2931|      0|        returncode = mresult;
 2932|  21.9k|    } while(Curl_uint32_bset_next(&multi->process, mid, &mid));
  ------------------
  |  Branch (2932:13): [True: 10.9k, False: 10.9k]
  ------------------
 2933|  10.9k|  }
 2934|  10.9k|  sigpipe_restore(&sigpipe_ctx);
 2935|       |
 2936|  10.9k|  if(multi_ischanged(multi, TRUE))
  ------------------
  |  | 1045|  10.9k|#define TRUE true
  ------------------
  |  Branch (2936:6): [True: 3.58k, False: 7.41k]
  ------------------
 2937|  3.58k|    multi_schedule_pending(multi);
 2938|       |
 2939|  10.9k|  if(!returncode && CURL_MNTFY_HAS_ENTRIES(multi))
  ------------------
  |  |   56|  10.9k|#define CURL_MNTFY_HAS_ENTRIES(m)       ((m)->ntfy.has_entries)
  |  |  ------------------
  |  |  |  Branch (56:41): [True: 0, False: 10.9k]
  |  |  ------------------
  ------------------
  |  Branch (2939:6): [True: 10.9k, False: 0]
  ------------------
 2940|      0|    returncode = Curl_mntfy_dispatch_all(multi);
 2941|       |
 2942|       |  /*
 2943|       |   * Remove all expired timers from the splay since handles are dealt
 2944|       |   * with unconditionally by this function and curl_multi_timeout() requires
 2945|       |   * that already passed/handled expire times are removed from the splay.
 2946|       |   *
 2947|       |   * It is important that the 'now' value is set at the entry of this function
 2948|       |   * and not for the current time as it may have ticked a little while since
 2949|       |   * then and then we risk this loop to remove timers that actually have not
 2950|       |   * been handled!
 2951|       |   */
 2952|  10.9k|  while(Curl_timeouts_remove_expired(&multi->timeouts, &start, &mid)) {
  ------------------
  |  Branch (2952:9): [True: 0, False: 10.9k]
  ------------------
 2953|       |    /* the removed may have another timeout in queue */
 2954|      0|    struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 2955|      0|    if(!data) {
  ------------------
  |  Branch (2955:8): [True: 0, False: 0]
  ------------------
 2956|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2956:7): [Folded, False: 0]
  |  Branch (2956:7): [Folded, False: 0]
  ------------------
 2957|      0|      continue;
 2958|      0|    }
 2959|      0|    (void)add_next_timeout(&start, multi, data);
 2960|      0|    if(data->mstate == MSTATE_PENDING) {
  ------------------
  |  Branch (2960:8): [True: 0, False: 0]
  ------------------
 2961|      0|      bool stream_unused;
 2962|      0|      CURLcode result_unused;
 2963|      0|      if(multi_handle_timeout(data, multi_now(multi),
  ------------------
  |  Branch (2963:10): [True: 0, False: 0]
  ------------------
 2964|      0|                              &stream_unused, &result_unused)) {
 2965|      0|        infof(data, "PENDING handle timeout");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2966|      0|        move_pending_to_connect(multi, data);
 2967|      0|      }
 2968|      0|    }
 2969|      0|  }
 2970|       |
 2971|  10.9k|  if(running_handles) {
  ------------------
  |  Branch (2971:6): [True: 10.9k, False: 0]
  ------------------
 2972|  10.9k|    uint32_t running = Curl_multi_xfers_running(multi);
 2973|  10.9k|    *running_handles = (running < INT_MAX) ? (int)running : INT_MAX;
  ------------------
  |  Branch (2973:24): [True: 10.9k, False: 0]
  ------------------
 2974|  10.9k|  }
 2975|       |
 2976|  10.9k|  if(CURLM_OK >= returncode)
  ------------------
  |  Branch (2976:6): [True: 10.9k, False: 0]
  ------------------
 2977|  10.9k|    returncode = Curl_update_timer(multi);
 2978|       |
 2979|  10.9k|  return returncode;
 2980|  10.9k|}
multi.c:multi_now:
   88|  10.9k|{
   89|  10.9k|  curlx_pnow(&multi->now);
   90|  10.9k|  return &multi->now;
   91|  10.9k|}
multi.c:multi_runsingle:
 2731|  21.9k|{
 2732|  21.9k|  CURLMcode mresult = CURLM_OK;
 2733|  21.9k|  CURLcode result = CURLE_OK;
 2734|  21.9k|  const struct curltime *pnow = NULL;
 2735|       |
 2736|  21.9k|  if(multi->dead) {
  ------------------
  |  Branch (2736:6): [True: 0, False: 21.9k]
  ------------------
 2737|       |    /* a multi-level callback returned error before, meaning every individual
 2738|       |     transfer now has failed */
 2739|      0|    result = CURLE_ABORTED_BY_CALLBACK;
 2740|      0|    multi_posttransfer(data);
 2741|      0|    multi_done(data, result, FALSE);
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 2742|      0|    multistate(data, MSTATE_COMPLETED);
  ------------------
  |  |  196|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2743|      0|  }
 2744|       |
 2745|  21.9k|  multi_warn_debug(multi, data);
 2746|       |
 2747|       |  /* transfer runs now, clear the dirty bit. This may be set
 2748|       |   * again during processing, triggering a re-run later. */
 2749|  21.9k|  Curl_uint32_bset_remove(&multi->dirty, data->mid);
 2750|       |
 2751|  21.9k|  if(data == multi->admin) {
  ------------------
  |  Branch (2751:6): [True: 10.9k, False: 10.9k]
  ------------------
 2752|  10.9k|#ifdef ENABLE_INTERNAL_WAKEUP
 2753|       |    /* Consume any pending wakeup signals before processing.
 2754|       |     * This is necessary for event based processing. See #21547 */
 2755|  10.9k|    (void)Curl_wakeup_consume(multi->wakeup_internal, TRUE);
  ------------------
  |  | 1045|  10.9k|#define TRUE true
  ------------------
 2756|  10.9k|#endif
 2757|  10.9k|#ifdef USE_RESOLV_THREADED
 2758|  10.9k|    Curl_async_thrdd_multi_process(multi);
 2759|  10.9k|#endif
 2760|  10.9k|    Curl_cshutdn_perform(&multi->cshutdn, sigpipe_ctx);
 2761|  10.9k|    goto out;
 2762|  10.9k|  }
 2763|       |
 2764|  10.9k|  sigpipe_apply(data, sigpipe_ctx);
 2765|  39.4k|  do {
 2766|       |    /* A "stream" here is a logical stream if the protocol can handle that
 2767|       |       (HTTP/2), or the full connection for older protocols */
 2768|  39.4k|    bool stream_error = FALSE;
  ------------------
  |  | 1048|  39.4k|#define FALSE false
  ------------------
 2769|  39.4k|    mresult = CURLM_OK;
 2770|  39.4k|    pnow = NULL;
 2771|       |
 2772|  39.4k|    if(multi_ischanged(multi, TRUE)) {
  ------------------
  |  | 1045|  39.4k|#define TRUE true
  ------------------
  |  Branch (2772:8): [True: 2, False: 39.4k]
  ------------------
 2773|      2|      CURL_TRC_M(data, "multi changed, check CONNECT_PEND queue");
  ------------------
  |  |  148|      2|  do {                                   \
  |  |  149|      2|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      2|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      2|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      4|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      4|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      2|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      2|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
 2774|      2|      multi_schedule_pending(multi); /* multiplexed */
 2775|      2|    }
 2776|       |
 2777|  39.4k|    if(data->mstate > MSTATE_CONNECT &&
  ------------------
  |  Branch (2777:8): [True: 28.3k, False: 11.0k]
  ------------------
 2778|  28.3k|       data->mstate < MSTATE_COMPLETED) {
  ------------------
  |  Branch (2778:8): [True: 28.3k, False: 0]
  ------------------
 2779|       |      /* Make sure we set the connection's current owner */
 2780|  28.3k|      DEBUGASSERT(data->conn);
  ------------------
  |  | 1075|  28.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2780:7): [True: 0, False: 28.3k]
  |  Branch (2780:7): [True: 28.3k, False: 0]
  ------------------
 2781|  28.3k|      if(!data->conn) {
  ------------------
  |  Branch (2781:10): [True: 0, False: 28.3k]
  ------------------
 2782|      0|        mresult = CURLM_INTERNAL_ERROR;
 2783|      0|        goto out;
 2784|      0|      }
 2785|  28.3k|    }
 2786|       |
 2787|       |    /* Wait for the connect state as only then is the start time stored, but
 2788|       |       we must not check already completed handles */
 2789|  39.4k|    if((data->mstate >= MSTATE_CONNECT) && (data->mstate < MSTATE_COMPLETED)) {
  ------------------
  |  Branch (2789:8): [True: 32.0k, False: 7.40k]
  |  Branch (2789:44): [True: 32.0k, False: 0]
  ------------------
 2790|  32.0k|      pnow = Curl_pgrs_now(data);
 2791|  32.0k|      if(multi_handle_timeout(data, pnow, &stream_error, &result))
  ------------------
  |  Branch (2791:10): [True: 0, False: 32.0k]
  ------------------
 2792|       |        /* Skip the statemachine and go directly to error handling section. */
 2793|      0|        goto statemachine_end;
 2794|  32.0k|      pnow = NULL;
 2795|  32.0k|    }
 2796|       |
 2797|  39.4k|    switch(data->mstate) {
 2798|  3.73k|    case MSTATE_INIT:
  ------------------
  |  Branch (2798:5): [True: 3.73k, False: 35.7k]
  ------------------
 2799|       |      /* Transitional state. init this transfer. A handle never comes back to
 2800|       |         this state. */
 2801|  3.73k|      mresult = multistate_init(data, &result);
 2802|  3.73k|      break;
 2803|       |
 2804|  3.66k|    case MSTATE_SETUP:
  ------------------
  |  Branch (2804:5): [True: 3.66k, False: 35.7k]
  ------------------
 2805|       |      /* Transitional state. Setup things for a new transfer. The handle
 2806|       |         can come back to this state on a redirect. */
 2807|  3.66k|      mresult = multistate_setup(data);
 2808|  3.66k|      break;
 2809|       |
 2810|  3.66k|    case MSTATE_CONNECT:
  ------------------
  |  Branch (2810:5): [True: 3.66k, False: 35.7k]
  ------------------
 2811|  3.66k|      mresult = multistate_connect(multi, data, &result);
 2812|  3.66k|      break;
 2813|       |
 2814|  7.25k|    case MSTATE_CONNECTING:
  ------------------
  |  Branch (2814:5): [True: 7.25k, False: 32.1k]
  ------------------
 2815|       |      /* awaiting a completion of an asynch TCP connect */
 2816|  7.25k|      mresult = multistate_connecting(data, &stream_error, &result);
 2817|  7.25k|      break;
 2818|       |
 2819|  3.62k|    case MSTATE_PROTOCONNECT:
  ------------------
  |  Branch (2819:5): [True: 3.62k, False: 35.8k]
  ------------------
 2820|  3.62k|      mresult = multistate_protoconnect(data, &stream_error, &result);
 2821|  3.62k|      break;
 2822|       |
 2823|      0|    case MSTATE_PROTOCONNECTING:
  ------------------
  |  Branch (2823:5): [True: 0, False: 39.4k]
  ------------------
 2824|       |      /* protocol-specific connect phase */
 2825|      0|      mresult = multistate_protoconnecting(data, &stream_error, &result);
 2826|      0|      break;
 2827|       |
 2828|  3.62k|    case MSTATE_DO:
  ------------------
  |  Branch (2828:5): [True: 3.62k, False: 35.8k]
  ------------------
 2829|  3.62k|      mresult = multistate_do(data, &stream_error, &result);
 2830|  3.62k|      break;
 2831|       |
 2832|      0|    case MSTATE_DOING:
  ------------------
  |  Branch (2832:5): [True: 0, False: 39.4k]
  ------------------
 2833|       |      /* we continue DOING until the DO phase is complete */
 2834|      0|      mresult = multistate_doing(data, &stream_error, &result);
 2835|      0|      break;
 2836|       |
 2837|      0|    case MSTATE_DOING_MORE:
  ------------------
  |  Branch (2837:5): [True: 0, False: 39.4k]
  ------------------
 2838|       |      /*
 2839|       |       * When we are connected, DOING MORE and then go DID
 2840|       |       */
 2841|      0|      mresult = multistate_doing_more(data, &stream_error, &result);
 2842|      0|      break;
 2843|       |
 2844|  3.59k|    case MSTATE_DID:
  ------------------
  |  Branch (2844:5): [True: 3.59k, False: 35.8k]
  ------------------
 2845|  3.59k|      mresult = multistate_did(multi, data);
 2846|  3.59k|      break;
 2847|       |
 2848|      0|    case MSTATE_RATELIMITING: /* limit-rate exceeded in either direction */
  ------------------
  |  Branch (2848:5): [True: 0, False: 39.4k]
  ------------------
 2849|      0|      mresult = multistate_ratelimiting(data, &result);
 2850|      0|      break;
 2851|       |
 2852|  7.23k|    case MSTATE_PERFORMING:
  ------------------
  |  Branch (2852:5): [True: 7.23k, False: 32.2k]
  ------------------
 2853|  7.23k|      mresult = multistate_performing(data, &stream_error, &result);
 2854|  7.23k|      break;
 2855|       |
 2856|  3.02k|    case MSTATE_DONE:
  ------------------
  |  Branch (2856:5): [True: 3.02k, False: 36.4k]
  ------------------
 2857|  3.02k|      mresult = multistate_done(data, &result);
 2858|  3.02k|      break;
 2859|       |
 2860|      0|    case MSTATE_COMPLETED:
  ------------------
  |  Branch (2860:5): [True: 0, False: 39.4k]
  ------------------
 2861|      0|      break;
 2862|       |
 2863|      0|    case MSTATE_PENDING:
  ------------------
  |  Branch (2863:5): [True: 0, False: 39.4k]
  ------------------
 2864|      0|    case MSTATE_MSGSENT:
  ------------------
  |  Branch (2864:5): [True: 0, False: 39.4k]
  ------------------
 2865|       |      /* handles in these states should NOT be in this list */
 2866|      0|      break;
 2867|       |
 2868|      0|    default:
  ------------------
  |  Branch (2868:5): [True: 0, False: 39.4k]
  ------------------
 2869|      0|      mresult = CURLM_INTERNAL_ERROR;
 2870|      0|      goto out;
 2871|  39.4k|    }
 2872|       |
 2873|  39.4k|    if(data->mstate >= MSTATE_CONNECT &&
  ------------------
  |  Branch (2873:8): [True: 35.7k, False: 3.73k]
  ------------------
 2874|  35.7k|       data->mstate < MSTATE_DO &&
  ------------------
  |  Branch (2874:8): [True: 14.5k, False: 21.1k]
  ------------------
 2875|  14.5k|       mresult != CURLM_CALL_MULTI_PERFORM &&
  ------------------
  |  Branch (2875:8): [True: 3.66k, False: 10.9k]
  ------------------
 2876|  3.66k|       !multi_ischanged(multi, FALSE)) {
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  |  Branch (2876:8): [True: 3.66k, False: 0]
  ------------------
 2877|       |      /* We now handle stream timeouts if and only if this will be the last
 2878|       |       * loop iteration. We only check this on the last iteration to ensure
 2879|       |       * that if we know we have additional work to do immediately
 2880|       |       * (i.e. CURLM_CALL_MULTI_PERFORM == TRUE) then we should do that before
 2881|       |       * declaring the connection timed out as we may almost have a completed
 2882|       |       * connection. */
 2883|  3.66k|      pnow = Curl_pgrs_now(data);
 2884|  3.66k|      multi_handle_timeout(data, pnow, &stream_error, &result);
 2885|  3.66k|    }
 2886|       |
 2887|  39.4k|statemachine_end:
 2888|  39.4k|    if(!pnow)
  ------------------
  |  Branch (2888:8): [True: 35.7k, False: 3.66k]
  ------------------
 2889|  35.7k|      pnow = Curl_pgrs_now(data);
 2890|  39.4k|    result = is_finished(multi, data, pnow, stream_error, result);
 2891|  39.4k|    if(result)
  ------------------
  |  Branch (2891:8): [True: 3.67k, False: 35.7k]
  ------------------
 2892|  3.67k|      mresult = CURLM_CALL_MULTI_PERFORM;
 2893|       |
 2894|  39.4k|    if(MSTATE_COMPLETED == data->mstate) {
  ------------------
  |  Branch (2894:8): [True: 3.73k, False: 35.7k]
  ------------------
 2895|  3.73k|      handle_completed(multi, data, result);
 2896|  3.73k|      mresult = CURLM_OK;
 2897|  3.73k|      goto out;
 2898|  3.73k|    }
 2899|  39.4k|  } while((mresult == CURLM_CALL_MULTI_PERFORM) ||
  ------------------
  |  Branch (2899:11): [True: 28.4k, False: 7.26k]
  ------------------
 2900|  7.26k|          multi_ischanged(multi, FALSE));
  ------------------
  |  | 1048|  7.26k|#define FALSE false
  ------------------
  |  Branch (2900:11): [True: 0, False: 7.26k]
  ------------------
 2901|       |
 2902|  21.9k|out:
 2903|  21.9k|  data->result = result;
 2904|  21.9k|  return mresult;
 2905|  10.9k|}
multi.c:multi_posttransfer:
 1953|  3.65k|{
 1954|       |#if defined(HAVE_SIGNAL) && defined(SIGPIPE) && !defined(MSG_NOSIGNAL)
 1955|       |  /* restore the signal handler for SIGPIPE before we get back */
 1956|       |  if(!data->set.no_signal)
 1957|       |    signal(SIGPIPE, data->state.prev_signal);
 1958|       |#else
 1959|  3.65k|  (void)data;
 1960|  3.65k|#endif
 1961|  3.65k|}
multi.c:multistate_init:
 2481|  3.73k|{
 2482|  3.73k|  if(!data->state.really_alive) {
  ------------------
  |  Branch (2482:6): [True: 3.73k, False: 0]
  ------------------
 2483|  3.73k|    data->state.really_alive = TRUE;
  ------------------
  |  | 1045|  3.73k|#define TRUE true
  ------------------
 2484|  3.73k|    ++data->multi->xfers_really_alive;
 2485|  3.73k|    if(data->multi->xfers_really_alive == 1) {
  ------------------
  |  Branch (2485:8): [True: 3.73k, False: 0]
  ------------------
 2486|  3.73k|      CURLMcode mresult = multi_assess_wakeup(data->multi);
 2487|  3.73k|      if(mresult) {
  ------------------
  |  Branch (2487:10): [True: 0, False: 3.73k]
  ------------------
 2488|      0|        failf(data, "error enabling wakeup listening: %d", mresult);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2489|      0|        return mresult;
 2490|      0|      }
 2491|  3.73k|    }
 2492|  3.73k|  }
 2493|       |
 2494|  3.73k|  *result = Curl_pretransfer(data);
 2495|  3.73k|  if(*result)
  ------------------
  |  Branch (2495:6): [True: 65, False: 3.66k]
  ------------------
 2496|     65|    return CURLM_OK;
 2497|       |
 2498|       |  /* after init, go SETUP */
 2499|  3.66k|  multistate(data, MSTATE_SETUP);
  ------------------
  |  |  196|  3.66k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2500|  3.66k|  Curl_pgrsTime(data, TIMER_STARTOP);
 2501|  3.66k|  return CURLM_CALL_MULTI_PERFORM;
 2502|  3.73k|}
multi.c:multistate_setup:
 2505|  3.66k|{
 2506|  3.66k|  Curl_pgrsTime(data, TIMER_STARTSINGLE);
 2507|  3.66k|  if(data->set.timeout)
  ------------------
  |  Branch (2507:6): [True: 3.66k, False: 0]
  ------------------
 2508|  3.66k|    Curl_expire(data, data->set.timeout, EXPIRE_TIMEOUT);
 2509|  3.66k|  if(data->set.connecttimeout)
  ------------------
  |  Branch (2509:6): [True: 3.66k, False: 0]
  ------------------
 2510|       |    /* Since a connection might go to pending and back to CONNECT several
 2511|       |       times before it actually takes off, we need to set the timeout once
 2512|       |       in SETUP before we enter CONNECT the first time. */
 2513|  3.66k|    Curl_expire(data, data->set.connecttimeout, EXPIRE_CONNECTTIMEOUT);
 2514|       |
 2515|  3.66k|  multistate(data, MSTATE_CONNECT);
  ------------------
  |  |  196|  3.66k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2516|  3.66k|  return CURLM_CALL_MULTI_PERFORM;
 2517|  3.66k|}
multi.c:multistate_connect:
 2332|  3.66k|{
 2333|       |  /* Connect. We want to get a connection identifier filled in. This state can
 2334|       |     be entered from SETUP and from PENDING. */
 2335|  3.66k|  bool connected;
 2336|  3.66k|  CURLMcode mresult = CURLM_OK;
 2337|  3.66k|  CURLcode result = Curl_connect(data, &connected);
 2338|  3.66k|  if(result == CURLE_NO_CONNECTION_AVAILABLE) {
  ------------------
  |  Branch (2338:6): [True: 0, False: 3.66k]
  ------------------
 2339|       |    /* There was no connection available. We will go to the pending state and
 2340|       |       wait for an available connection. */
 2341|      0|    multistate(data, MSTATE_PENDING);
  ------------------
  |  |  196|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2342|       |    /* move from process to pending set */
 2343|      0|    Curl_uint32_bset_remove(&multi->process, data->mid);
 2344|      0|    Curl_uint32_bset_remove(&multi->dirty, data->mid);
 2345|      0|    Curl_uint32_bset_add(&multi->pending, data->mid);
 2346|      0|    *resultp = CURLE_OK;
 2347|      0|    return mresult;
 2348|      0|  }
 2349|  3.66k|  else
 2350|  3.66k|    multi_schedule_pending(data->multi);
 2351|       |
 2352|  3.66k|  if(!result) {
  ------------------
  |  Branch (2352:6): [True: 3.62k, False: 40]
  ------------------
 2353|       |    /* after the connect has been sent off, go WAITCONNECT unless the
 2354|       |       protocol connect is already done and we can go directly to WAITDO or
 2355|       |       DO! */
 2356|  3.62k|    mresult = CURLM_CALL_MULTI_PERFORM;
 2357|       |
 2358|  3.62k|    if(connected) {
  ------------------
  |  Branch (2358:8): [True: 0, False: 3.62k]
  ------------------
 2359|      0|      if(!data->conn->bits.reuse &&
  ------------------
  |  Branch (2359:10): [True: 0, False: 0]
  ------------------
 2360|      0|         Curl_conn_is_multiplex(data->conn, FIRSTSOCKET)) {
  ------------------
  |  |  234|      0|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2360:10): [True: 0, False: 0]
  ------------------
 2361|       |        /* new connection, can multiplex, wake pending handles */
 2362|      0|        multi_schedule_pending(data->multi);
 2363|      0|      }
 2364|      0|      multistate(data, MSTATE_PROTOCONNECT);
  ------------------
  |  |  196|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2365|      0|    }
 2366|  3.62k|    else {
 2367|  3.62k|      multistate(data, MSTATE_CONNECTING);
  ------------------
  |  |  196|  3.62k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2368|  3.62k|    }
 2369|  3.62k|  }
 2370|  3.66k|  *resultp = result;
 2371|  3.66k|  return mresult;
 2372|  3.66k|}
multi.c:multistate_connecting:
 2522|  7.25k|{
 2523|  7.25k|  bool connected;
 2524|       |
 2525|  7.25k|  if(!data->conn) {
  ------------------
  |  Branch (2525:6): [True: 0, False: 7.25k]
  ------------------
 2526|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2526:5): [Folded, False: 0]
  |  Branch (2526:5): [Folded, False: 0]
  ------------------
 2527|      0|    *result = CURLE_FAILED_INIT;
 2528|      0|    return CURLM_OK;
 2529|      0|  }
 2530|  7.25k|  if(!Curl_xfer_recv_is_paused(data)) {
  ------------------
  |  Branch (2530:6): [True: 7.25k, False: 0]
  ------------------
 2531|  7.25k|    *result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &connected);
  ------------------
  |  |  234|  7.25k|#define FIRSTSOCKET     0
  ------------------
                  *result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &connected);
  ------------------
  |  | 1048|  7.25k|#define FALSE false
  ------------------
 2532|  7.25k|    if(connected && !*result) {
  ------------------
  |  Branch (2532:8): [True: 3.62k, False: 3.62k]
  |  Branch (2532:21): [True: 3.62k, False: 0]
  ------------------
 2533|  3.62k|      if(!data->conn->bits.reuse &&
  ------------------
  |  Branch (2533:10): [True: 3.62k, False: 0]
  ------------------
 2534|  3.62k|         Curl_conn_is_multiplex(data->conn, FIRSTSOCKET)) {
  ------------------
  |  |  234|  3.62k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2534:10): [True: 0, False: 3.62k]
  ------------------
 2535|       |        /* new connection, can multiplex, wake pending handles */
 2536|      0|        multi_schedule_pending(data->multi);
 2537|      0|      }
 2538|  3.62k|      multistate(data, MSTATE_PROTOCONNECT);
  ------------------
  |  |  196|  3.62k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2539|  3.62k|      return CURLM_CALL_MULTI_PERFORM;
 2540|  3.62k|    }
 2541|  3.62k|    else if(*result) {
  ------------------
  |  Branch (2541:13): [True: 0, False: 3.62k]
  ------------------
 2542|       |      /* failure detected */
 2543|      0|      CURL_TRC_M(data, "connect failed -> %d", (int)*result);
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2544|      0|      multi_posttransfer(data);
 2545|      0|      multi_done(data, *result, TRUE);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2546|      0|      *stream_error = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2547|      0|      return CURLM_OK;
 2548|      0|    }
 2549|  7.25k|  }
 2550|  3.62k|  return CURLM_OK;
 2551|  7.25k|}
multi.c:multistate_protoconnect:
 2556|  3.62k|{
 2557|  3.62k|  bool protocol_connected = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
 2558|       |
 2559|  3.62k|  if(!*result && data->conn->bits.reuse) {
  ------------------
  |  Branch (2559:6): [True: 3.62k, False: 0]
  |  Branch (2559:18): [True: 0, False: 3.62k]
  ------------------
 2560|       |    /* ftp seems to hang when protoconnect on reused connection since we
 2561|       |     * handle PROTOCONNECT in general inside the filters, it seems wrong to
 2562|       |     * restart this on a reused connection.
 2563|       |     */
 2564|      0|    multistate(data, MSTATE_DO);
  ------------------
  |  |  196|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2565|      0|    return CURLM_CALL_MULTI_PERFORM;
 2566|      0|  }
 2567|  3.62k|  if(!*result)
  ------------------
  |  Branch (2567:6): [True: 3.62k, False: 0]
  ------------------
 2568|  3.62k|    *result = protocol_connect(data, &protocol_connected);
 2569|  3.62k|  if(!*result && !protocol_connected) {
  ------------------
  |  Branch (2569:6): [True: 3.62k, False: 0]
  |  Branch (2569:18): [True: 0, False: 3.62k]
  ------------------
 2570|       |    /* switch to waiting state */
 2571|      0|    multistate(data, MSTATE_PROTOCONNECTING);
  ------------------
  |  |  196|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2572|      0|    return CURLM_CALL_MULTI_PERFORM;
 2573|      0|  }
 2574|  3.62k|  else if(!*result) {
  ------------------
  |  Branch (2574:11): [True: 3.62k, False: 0]
  ------------------
 2575|       |    /* protocol connect has completed, go WAITDO or DO */
 2576|  3.62k|    multistate(data, MSTATE_DO);
  ------------------
  |  |  196|  3.62k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2577|  3.62k|    return CURLM_CALL_MULTI_PERFORM;
 2578|  3.62k|  }
 2579|       |
 2580|       |  /* failure detected */
 2581|      0|  multi_posttransfer(data);
 2582|      0|  multi_done(data, *result, TRUE);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2583|       |  *stream_error = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2584|      0|  return CURLM_OK;
 2585|  3.62k|}
multi.c:protocol_connect:
 1923|  3.62k|{
 1924|  3.62k|  struct connectdata *conn = data->conn;
 1925|  3.62k|  CURLcode result = CURLE_OK;
 1926|       |
 1927|  3.62k|  DEBUGASSERT(conn);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1927:3): [True: 0, False: 3.62k]
  |  Branch (1927:3): [True: 3.62k, False: 0]
  ------------------
 1928|  3.62k|  DEBUGASSERT(protocol_done);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1928:3): [True: 0, False: 3.62k]
  |  Branch (1928:3): [True: 3.62k, False: 0]
  ------------------
 1929|  3.62k|  DEBUGASSERT(Curl_conn_is_connected(conn, FIRSTSOCKET));
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1929:3): [True: 0, False: 3.62k]
  |  Branch (1929:3): [True: 3.62k, False: 0]
  ------------------
 1930|       |
 1931|  3.62k|  *protocol_done = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
 1932|  3.62k|  if(!conn->bits.protoconnstart) {
  ------------------
  |  Branch (1932:6): [True: 3.62k, False: 0]
  ------------------
 1933|  3.62k|    if(conn->scheme->run->connect_it) {
  ------------------
  |  Branch (1933:8): [True: 0, False: 3.62k]
  ------------------
 1934|       |      /* Call the protocol-specific connect function */
 1935|      0|      result = conn->scheme->run->connect_it(data, protocol_done);
 1936|      0|      if(result)
  ------------------
  |  Branch (1936:10): [True: 0, False: 0]
  ------------------
 1937|      0|        return result;
 1938|      0|    }
 1939|  3.62k|    conn->bits.protoconnstart = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
 1940|  3.62k|  }
 1941|       |
 1942|       |  /* Unless this protocol does not have any protocol-connect callback, as
 1943|       |     then we know we are done. */
 1944|  3.62k|  if(!conn->scheme->run->connecting)
  ------------------
  |  Branch (1944:6): [True: 3.62k, False: 0]
  ------------------
 1945|  3.62k|    *protocol_done = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
 1946|  3.62k|  return CURLE_OK;
 1947|  3.62k|}
multi.c:multistate_do:
 2171|  3.62k|{
 2172|  3.62k|  CURLMcode mresult = CURLM_OK;
 2173|  3.62k|  CURLcode result = CURLE_OK;
 2174|  3.62k|  if(data->set.fprereq) {
  ------------------
  |  Branch (2174:6): [True: 0, False: 3.62k]
  ------------------
 2175|      0|    struct Curl_mapi_guard guard;
 2176|      0|    int prereq_rc;
 2177|       |
 2178|       |    /* call the prerequest callback function */
 2179|      0|    CURL_CBAPI_START(&guard, data, easy_fprereq);
  ------------------
  |  |  201|      0|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
 2180|      0|    prereq_rc = data->set.fprereq(data->set.prereq_userp,
 2181|      0|                                  data->info.primary.remote_ip,
 2182|      0|                                  data->info.primary.local_ip,
 2183|      0|                                  data->info.primary.remote_port,
 2184|      0|                                  data->info.primary.local_port);
 2185|      0|    CURL_CBAPI_END(&guard);
  ------------------
  |  |  205|      0|  Curl_cbapi_leave(g)
  ------------------
 2186|      0|    if(prereq_rc != CURL_PREREQFUNC_OK) {
  ------------------
  |  |  508|      0|#define CURL_PREREQFUNC_OK 0
  ------------------
  |  Branch (2186:8): [True: 0, False: 0]
  ------------------
 2187|      0|      failf(data, "operation aborted by pre-request callback");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2188|       |      /* failure in pre-request callback - do not do any other processing */
 2189|      0|      result = CURLE_ABORTED_BY_CALLBACK;
 2190|      0|      multi_posttransfer(data);
 2191|      0|      multi_done(data, result, FALSE);
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 2192|      0|      *stream_errorp = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2193|      0|      goto end;
 2194|      0|    }
 2195|      0|  }
 2196|       |
 2197|  3.62k|  if(data->set.connect_only && !data->set.connect_only_ws) {
  ------------------
  |  Branch (2197:6): [True: 18, False: 3.61k]
  |  Branch (2197:32): [True: 18, False: 0]
  ------------------
 2198|     18|    multistate(data, MSTATE_DONE);
  ------------------
  |  |  196|     18|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2199|     18|    mresult = CURLM_CALL_MULTI_PERFORM;
 2200|     18|  }
 2201|  3.61k|  else {
 2202|  3.61k|    bool dophase_done = FALSE;
  ------------------
  |  | 1048|  3.61k|#define FALSE false
  ------------------
 2203|       |    /* Perform the protocol's DO action */
 2204|  3.61k|    result = multi_do(data, &dophase_done);
 2205|       |
 2206|  3.61k|    if(!result) {
  ------------------
  |  Branch (2206:8): [True: 3.59k, False: 15]
  ------------------
 2207|  3.59k|      if(!dophase_done) {
  ------------------
  |  Branch (2207:10): [True: 0, False: 3.59k]
  ------------------
 2208|      0|#ifndef CURL_DISABLE_FTP
 2209|       |        /* some steps needed for wildcard matching */
 2210|      0|        if(data->state.wildcardmatch) {
  ------------------
  |  Branch (2210:12): [True: 0, False: 0]
  ------------------
 2211|      0|          struct WildcardData *wc = data->wildcard;
 2212|      0|          if(wc->state == CURLWC_DONE || wc->state == CURLWC_SKIP) {
  ------------------
  |  Branch (2212:14): [True: 0, False: 0]
  |  Branch (2212:42): [True: 0, False: 0]
  ------------------
 2213|       |            /* skip some states if it is important */
 2214|      0|            multi_done(data, CURLE_OK, FALSE);
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 2215|       |
 2216|       |            /* if there is no connection left, skip the DONE state */
 2217|      0|            multistate(data, data->conn ? MSTATE_DONE : MSTATE_COMPLETED);
  ------------------
  |  |  196|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  |  |  ------------------
  |  |  |  Branch (196:36): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2218|      0|            mresult = CURLM_CALL_MULTI_PERFORM;
 2219|      0|            goto end;
 2220|      0|          }
 2221|      0|        }
 2222|      0|#endif
 2223|       |        /* DO was not completed in one function call, we must continue
 2224|       |           DOING... */
 2225|      0|        multistate(data, MSTATE_DOING);
  ------------------
  |  |  196|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2226|      0|        mresult = CURLM_CALL_MULTI_PERFORM;
 2227|      0|      }
 2228|       |
 2229|       |      /* after DO, go DO_DONE... or DO_MORE */
 2230|  3.59k|      else if(data->conn->bits.do_more) {
  ------------------
  |  Branch (2230:15): [True: 0, False: 3.59k]
  ------------------
 2231|       |        /* we are supposed to do more, but we need to sit down, relax and wait
 2232|       |           a little while first */
 2233|      0|        multistate(data, MSTATE_DOING_MORE);
  ------------------
  |  |  196|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2234|      0|        mresult = CURLM_CALL_MULTI_PERFORM;
 2235|      0|      }
 2236|  3.59k|      else {
 2237|       |        /* we are done with the DO, now DID */
 2238|  3.59k|        multistate(data, MSTATE_DID);
  ------------------
  |  |  196|  3.59k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2239|  3.59k|        mresult = CURLM_CALL_MULTI_PERFORM;
 2240|  3.59k|      }
 2241|  3.59k|    }
 2242|     15|    else if((result == CURLE_SEND_ERROR) &&
  ------------------
  |  Branch (2242:13): [True: 0, False: 15]
  ------------------
 2243|      0|            data->conn->bits.reuse) {
  ------------------
  |  Branch (2243:13): [True: 0, False: 0]
  ------------------
 2244|       |      /*
 2245|       |       * In this situation, a connection that we were trying to use may have
 2246|       |       * unexpectedly died. If possible, send the connection back to the
 2247|       |       * CONNECT phase so we can try again.
 2248|       |       */
 2249|      0|      const struct Curl_scheme *handler = data->conn->scheme;
 2250|      0|      char *newurl = NULL;
 2251|      0|      followtype follow = FOLLOW_NONE;
 2252|      0|      CURLcode drc;
 2253|       |
 2254|      0|      drc = Curl_retry_request(data, &newurl);
 2255|      0|      if(drc) {
  ------------------
  |  Branch (2255:10): [True: 0, False: 0]
  ------------------
 2256|       |        /* a failure here pretty much implies an out of memory */
 2257|      0|        result = drc;
 2258|      0|        *stream_errorp = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2259|      0|      }
 2260|       |
 2261|      0|      multi_posttransfer(data);
 2262|      0|      drc = multi_done(data, result, FALSE);
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 2263|       |
 2264|       |      /* When set to retry the connection, we must go back to the CONNECT
 2265|       |       * state */
 2266|      0|      if(newurl) {
  ------------------
  |  Branch (2266:10): [True: 0, False: 0]
  ------------------
 2267|      0|        if(!drc || (drc == CURLE_SEND_ERROR)) {
  ------------------
  |  Branch (2267:12): [True: 0, False: 0]
  |  Branch (2267:20): [True: 0, False: 0]
  ------------------
 2268|      0|          follow = FOLLOW_RETRY;
 2269|      0|          drc = multi_follow(data, handler, newurl, follow);
 2270|      0|          if(!drc) {
  ------------------
  |  Branch (2270:14): [True: 0, False: 0]
  ------------------
 2271|      0|            multistate(data, MSTATE_SETUP);
  ------------------
  |  |  196|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2272|      0|            mresult = CURLM_CALL_MULTI_PERFORM;
 2273|      0|            result = CURLE_OK;
 2274|      0|          }
 2275|      0|          else {
 2276|       |            /* Follow failed */
 2277|      0|            result = drc;
 2278|      0|          }
 2279|      0|        }
 2280|      0|        else {
 2281|       |          /* done did not return OK or SEND_ERROR */
 2282|      0|          result = drc;
 2283|      0|        }
 2284|      0|      }
 2285|      0|      else {
 2286|       |        /* Have error handler disconnect conn if we cannot retry */
 2287|      0|        *stream_errorp = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2288|      0|      }
 2289|      0|      curlx_free(newurl);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2290|      0|    }
 2291|     15|    else {
 2292|       |      /* failure detected */
 2293|     15|      multi_posttransfer(data);
 2294|     15|      if(data->conn)
  ------------------
  |  Branch (2294:10): [True: 15, False: 0]
  ------------------
 2295|     15|        multi_done(data, result, FALSE);
  ------------------
  |  | 1048|     15|#define FALSE false
  ------------------
 2296|     15|      *stream_errorp = TRUE;
  ------------------
  |  | 1045|     15|#define TRUE true
  ------------------
 2297|     15|    }
 2298|  3.61k|  }
 2299|  3.62k|end:
 2300|  3.62k|  *resultp = result;
 2301|  3.62k|  return mresult;
 2302|  3.62k|}
multi.c:multi_do:
 1792|  3.61k|{
 1793|  3.61k|  CURLcode result = CURLE_OK;
 1794|  3.61k|  struct connectdata *conn = data->conn;
 1795|       |
 1796|  3.61k|  DEBUGASSERT(conn);
  ------------------
  |  | 1075|  3.61k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1796:3): [True: 0, False: 3.61k]
  |  Branch (1796:3): [True: 3.61k, False: 0]
  ------------------
 1797|  3.61k|  DEBUGASSERT(conn->scheme);
  ------------------
  |  | 1075|  3.61k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1797:3): [True: 0, False: 3.61k]
  |  Branch (1797:3): [True: 3.61k, False: 0]
  ------------------
 1798|       |
 1799|  3.61k|  if(conn->scheme->run->do_it)
  ------------------
  |  Branch (1799:6): [True: 3.61k, False: 0]
  ------------------
 1800|  3.61k|    result = conn->scheme->run->do_it(data, done);
 1801|       |
 1802|  3.61k|  return result;
 1803|  3.61k|}
multi.c:multi_follow:
 1973|     11|{
 1974|     11|  if(handler && handler->run->follow)
  ------------------
  |  Branch (1974:6): [True: 11, False: 0]
  |  Branch (1974:17): [True: 11, False: 0]
  ------------------
 1975|     11|    return handler->run->follow(data, newurl, type);
 1976|       |
 1977|      0|  if(type == FOLLOW_RETRY)
  ------------------
  |  Branch (1977:6): [True: 0, False: 0]
  ------------------
 1978|       |    /* Retries are generic and do not require protocol-specific redirect
 1979|       |       handling. */
 1980|      0|    return CURLE_OK;
 1981|       |
 1982|      0|  return CURLE_TOO_MANY_REDIRECTS;
 1983|      0|}
multi.c:multistate_did:
 2668|  3.59k|{
 2669|  3.59k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1075|  3.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2669:3): [True: 0, False: 3.59k]
  |  Branch (2669:3): [True: 3.59k, False: 0]
  ------------------
 2670|  3.59k|  if(data->conn->bits.multiplex)
  ------------------
  |  Branch (2670:6): [True: 2, False: 3.59k]
  ------------------
 2671|       |    /* Check if we can move pending requests to send pipe */
 2672|      2|    multi_schedule_pending(multi); /* multiplexed */
 2673|       |
 2674|       |  /* Only perform the transfer if there is a good socket to work with.
 2675|       |     Having both BAD is a signal to skip immediately to DONE */
 2676|  3.59k|  if(CONN_SOCK_IDX_VALID(data->conn->recv_idx) ||
  ------------------
  |  |  311|  7.19k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (311:36): [True: 3.59k, False: 0]
  |  |  |  Branch (311:50): [True: 3.59k, False: 0]
  |  |  ------------------
  ------------------
 2677|  3.59k|     CONN_SOCK_IDX_VALID(data->conn->send_idx)) {
  ------------------
  |  |  311|      0|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (311:36): [True: 0, False: 0]
  |  |  |  Branch (311:50): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2678|  3.59k|    multistate(data, MSTATE_PERFORMING);
  ------------------
  |  |  196|  3.59k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2679|       |    /* Do not return CURLM_CALL_MULTI_PERFORM to give other transfers
 2680|       |     * a chance to send off their requests.
 2681|       |     * Note: Some SFTP handlers do not seem to like this.
 2682|       |     *       Restrict it to HTTP families. */
 2683|  3.59k|    return ((multi->xfers_alive > 1) &&
  ------------------
  |  Branch (2683:13): [True: 0, False: 3.59k]
  ------------------
 2684|      0|            (data->conn->scheme->protocol & PROTO_FAMILY_HTTP)) ?
  ------------------
  |  |   84|      0|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1088|      0|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1089|      0|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|      0|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|      0|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|      0|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
  |  Branch (2684:13): [True: 0, False: 0]
  ------------------
 2685|  3.59k|           CURLM_OK : CURLM_CALL_MULTI_PERFORM;
 2686|  3.59k|  }
 2687|      0|  else {
 2688|      0|#ifndef CURL_DISABLE_FTP
 2689|      0|    if(data->state.wildcardmatch &&
  ------------------
  |  Branch (2689:8): [True: 0, False: 0]
  ------------------
 2690|      0|       ((data->conn->scheme->flags & PROTOPT_WILDCARD) == 0)) {
  ------------------
  |  |  230|      0|#define PROTOPT_WILDCARD (1 << 12)  /* protocol supports wildcard matching */
  ------------------
  |  Branch (2690:8): [True: 0, False: 0]
  ------------------
 2691|      0|      data->wildcard->state = CURLWC_DONE;
 2692|      0|    }
 2693|      0|#endif
 2694|      0|    multistate(data, MSTATE_DONE);
  ------------------
  |  |  196|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2695|      0|    return CURLM_CALL_MULTI_PERFORM;
 2696|      0|  }
 2697|  3.59k|}
multi.c:mspeed_check:
 1986|  10.8k|{
 1987|  10.8k|  if(Curl_rlimit_active(&data->progress.dl.rlimit) ||
  ------------------
  |  Branch (1987:6): [True: 0, False: 10.8k]
  ------------------
 1988|  10.8k|     Curl_rlimit_active(&data->progress.ul.rlimit)) {
  ------------------
  |  Branch (1988:6): [True: 0, False: 10.8k]
  ------------------
 1989|       |    /* check if our send/recv limits require idle waits */
 1990|      0|    const struct curltime *pnow = Curl_pgrs_now(data);
 1991|      0|    timediff_t recv_ms, send_ms;
 1992|       |
 1993|      0|    send_ms = Curl_rlimit_wait_ms(&data->progress.ul.rlimit, pnow);
 1994|      0|    recv_ms = Curl_rlimit_wait_ms(&data->progress.dl.rlimit, pnow);
 1995|       |
 1996|      0|    if(send_ms || recv_ms) {
  ------------------
  |  Branch (1996:8): [True: 0, False: 0]
  |  Branch (1996:19): [True: 0, False: 0]
  ------------------
 1997|      0|      if(data->mstate != MSTATE_RATELIMITING) {
  ------------------
  |  Branch (1997:10): [True: 0, False: 0]
  ------------------
 1998|      0|        multistate(data, MSTATE_RATELIMITING);
  ------------------
  |  |  196|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 1999|      0|      }
 2000|      0|      Curl_expire(data, CURLMAX(send_ms, recv_ms), EXPIRE_TOOFAST);
  ------------------
  |  | 1287|      0|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2001|      0|      Curl_multi_clear_dirty(data);
 2002|      0|      CURL_TRC_M(data, "[RLIMIT] waiting %" FMT_TIMEDIFF_T "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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330: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]
  |  |  ------------------
  ------------------
 2003|      0|                 CURLMAX(send_ms, recv_ms));
 2004|      0|      return CURLE_AGAIN;
 2005|      0|    }
 2006|      0|    else {
 2007|       |      /* when will the rate limits increase next? The transfer needs
 2008|       |       * to run again at that time or it may stall. */
 2009|      0|      send_ms = Curl_rlimit_next_step_ms(&data->progress.ul.rlimit, pnow);
 2010|      0|      recv_ms = Curl_rlimit_next_step_ms(&data->progress.dl.rlimit, pnow);
 2011|      0|      if(send_ms || recv_ms) {
  ------------------
  |  Branch (2011:10): [True: 0, False: 0]
  |  Branch (2011:21): [True: 0, False: 0]
  ------------------
 2012|      0|        timediff_t next_ms = CURLMIN(send_ms, recv_ms);
  ------------------
  |  | 1288|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1288:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2013|      0|        if(!next_ms)
  ------------------
  |  Branch (2013:12): [True: 0, False: 0]
  ------------------
 2014|      0|          next_ms = CURLMAX(send_ms, recv_ms);
  ------------------
  |  | 1287|      0|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2015|      0|        Curl_expire(data, next_ms, EXPIRE_TOOFAST);
 2016|      0|        CURL_TRC_M(data, "[RLIMIT] next token update in %" FMT_TIMEDIFF_T "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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2017|      0|                   next_ms);
 2018|      0|      }
 2019|      0|    }
 2020|      0|  }
 2021|       |
 2022|  10.8k|  if(data->mstate != MSTATE_PERFORMING) {
  ------------------
  |  Branch (2022:6): [True: 0, False: 10.8k]
  ------------------
 2023|      0|    CURL_TRC_M(data, "[RLIMIT] wait over, continue");
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2024|      0|    multistate(data, MSTATE_PERFORMING);
  ------------------
  |  |  196|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2025|      0|  }
 2026|  10.8k|  return CURLE_OK;
 2027|  10.8k|}
multi.c:multistate_performing:
 2032|  7.23k|{
 2033|  7.23k|  char *newurl = NULL;
 2034|  7.23k|  bool retry = FALSE;
  ------------------
  |  | 1048|  7.23k|#define FALSE false
  ------------------
 2035|  7.23k|  CURLMcode mresult = CURLM_OK;
 2036|  7.23k|  CURLcode result = *resultp = CURLE_OK;
 2037|  7.23k|  *stream_errorp = FALSE;
  ------------------
  |  | 1048|  7.23k|#define FALSE false
  ------------------
 2038|       |
 2039|  7.23k|  if(mspeed_check(data) == CURLE_AGAIN)
  ------------------
  |  Branch (2039:6): [True: 0, False: 7.23k]
  ------------------
 2040|      0|    return CURLM_OK;
 2041|       |
 2042|       |  /* read/write data if it is ready to do so */
 2043|  7.23k|  result = Curl_sendrecv(data);
 2044|       |
 2045|  7.23k|  if(data->req.done || (result == CURLE_RECV_ERROR)) {
  ------------------
  |  Branch (2045:6): [True: 3.01k, False: 4.21k]
  |  Branch (2045:24): [True: 0, False: 4.21k]
  ------------------
 2046|       |    /* If CURLE_RECV_ERROR happens early enough, we assume it was a race
 2047|       |     * condition and the server closed the reused connection exactly when we
 2048|       |     * wanted to use it, so figure out if that is indeed the case.
 2049|       |     */
 2050|  3.01k|    CURLcode ret = Curl_retry_request(data, &newurl);
 2051|  3.01k|    if(!ret)
  ------------------
  |  Branch (2051:8): [True: 3.01k, False: 0]
  ------------------
 2052|  3.01k|      retry = !!newurl;
 2053|      0|    else if(!result)
  ------------------
  |  Branch (2053:13): [True: 0, False: 0]
  ------------------
 2054|      0|      result = ret;
 2055|       |
 2056|  3.01k|    if(retry) {
  ------------------
  |  Branch (2056:8): [True: 0, False: 3.01k]
  ------------------
 2057|       |      /* if we are to retry, set the result to OK and consider the
 2058|       |         request as done */
 2059|      0|      result = CURLE_OK;
 2060|      0|      data->req.done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2061|      0|    }
 2062|  3.01k|  }
 2063|  4.21k|#ifndef CURL_DISABLE_HTTP
 2064|  4.21k|  else if((result == CURLE_HTTP2_STREAM) &&
  ------------------
  |  Branch (2064:11): [True: 0, False: 4.21k]
  ------------------
 2065|      0|          Curl_h2_http_1_1_error(data)) {
  ------------------
  |  Branch (2065:11): [True: 0, False: 0]
  ------------------
 2066|      0|    CURLcode ret = Curl_retry_request(data, &newurl);
 2067|       |
 2068|      0|    if(!ret) {
  ------------------
  |  Branch (2068:8): [True: 0, False: 0]
  ------------------
 2069|      0|      infof(data, "Downgrades to HTTP/1.1");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2070|      0|      streamclose(data->conn);
  ------------------
  |  |   89|      0|#define streamclose(x) Curl_conncontrol((x), CONNCTRL_STREAM_CLOSE)
  |  |  ------------------
  |  |  |  |   85|      0|#define CONNCTRL_STREAM_CLOSE    2
  |  |  ------------------
  ------------------
 2071|      0|      data->state.http_neg.wanted = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 2072|      0|      data->state.http_neg.allowed = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 2073|       |      /* clear the error message bit too as we ignore the one we got */
 2074|      0|      data->state.errorbuf = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 2075|      0|      if(!newurl)
  ------------------
  |  Branch (2075:10): [True: 0, False: 0]
  ------------------
 2076|       |        /* typically for HTTP_1_1_REQUIRED error on first flight */
 2077|      0|        newurl = Curl_bufref_dup(&data->state.url);
  ------------------
  |  |   49|      0|#define Curl_bufref_dup(x) curlx_strdup(Curl_bufref_ptr(x))
  |  |  ------------------
  |  |  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
 2078|      0|      if(!newurl) {
  ------------------
  |  Branch (2078:10): [True: 0, False: 0]
  ------------------
 2079|      0|        result = CURLE_OUT_OF_MEMORY;
 2080|      0|      }
 2081|      0|      else {
 2082|       |        /* if we are to retry, set the result to OK and consider the request
 2083|       |          as done */
 2084|      0|        retry = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2085|      0|        result = CURLE_OK;
 2086|      0|        data->req.done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2087|      0|      }
 2088|      0|    }
 2089|      0|    else
 2090|      0|      result = ret;
 2091|      0|  }
 2092|  7.23k|#endif
 2093|       |
 2094|  7.23k|  if(result) {
  ------------------
  |  Branch (2094:6): [True: 584, False: 6.64k]
  ------------------
 2095|       |    /*
 2096|       |     * The transfer phase returned error, we mark the connection to get closed
 2097|       |     * to prevent being reused. This is because we cannot possibly know if the
 2098|       |     * connection is in a good shape or not now. Unless it is a protocol which
 2099|       |     * uses two "channels" like FTP, as then the error happened in the data
 2100|       |     * connection.
 2101|       |     */
 2102|       |
 2103|    584|    if(!(data->conn->scheme->flags & PROTOPT_DUAL) &&
  ------------------
  |  |  208|    584|#define PROTOPT_DUAL (1 << 1)      /* this protocol uses two connections */
  ------------------
  |  Branch (2103:8): [True: 584, False: 0]
  ------------------
 2104|    584|       result != CURLE_HTTP2_STREAM)
  ------------------
  |  Branch (2104:8): [True: 584, False: 0]
  ------------------
 2105|    584|      streamclose(data->conn);
  ------------------
  |  |   89|    584|#define streamclose(x) Curl_conncontrol((x), CONNCTRL_STREAM_CLOSE)
  |  |  ------------------
  |  |  |  |   85|    584|#define CONNCTRL_STREAM_CLOSE    2
  |  |  ------------------
  ------------------
 2106|       |
 2107|    584|    multi_posttransfer(data);
 2108|    584|    multi_done(data, result, TRUE);
  ------------------
  |  | 1045|    584|#define TRUE true
  ------------------
 2109|    584|  }
 2110|  6.64k|  else if(data->req.done && !Curl_cwriter_is_paused(data)) {
  ------------------
  |  |  194|  3.01k|#define Curl_cwriter_is_paused(d)     ((bool)(d)->req.writer.paused)
  ------------------
  |  Branch (2110:11): [True: 3.01k, False: 3.63k]
  |  Branch (2110:29): [True: 3.01k, False: 0]
  ------------------
 2111|  3.01k|    const struct Curl_scheme *handler = data->conn->scheme;
 2112|       |
 2113|       |    /* call this even if the readwrite function returned error */
 2114|  3.01k|    multi_posttransfer(data);
 2115|       |
 2116|       |    /* When we follow redirects or is set to retry the connection, we must to
 2117|       |       go back to the CONNECT state */
 2118|  3.01k|    if(data->req.newurl || retry) {
  ------------------
  |  Branch (2118:8): [True: 1, False: 3.01k]
  |  Branch (2118:28): [True: 0, False: 3.01k]
  ------------------
 2119|      1|      followtype follow = FOLLOW_NONE;
 2120|      1|      if(!retry) {
  ------------------
  |  Branch (2120:10): [True: 1, False: 0]
  ------------------
 2121|       |        /* if the URL is a follow-location and not a retried request then
 2122|       |           figure out the URL here */
 2123|      1|        curlx_free(newurl);
  ------------------
  |  | 1476|      1|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2124|      1|        newurl = data->req.newurl;
 2125|      1|        data->req.newurl = NULL;
 2126|      1|        follow = FOLLOW_REDIR;
 2127|      1|      }
 2128|      0|      else
 2129|      0|        follow = FOLLOW_RETRY;
 2130|      1|      (void)multi_done(data, CURLE_OK, FALSE);
  ------------------
  |  | 1048|      1|#define FALSE false
  ------------------
 2131|       |      /* multi_done() might return CURLE_GOT_NOTHING */
 2132|      1|      result = multi_follow(data, handler, newurl, follow);
 2133|      1|      if(!result) {
  ------------------
  |  Branch (2133:10): [True: 0, False: 1]
  ------------------
 2134|      0|        multistate(data, MSTATE_SETUP);
  ------------------
  |  |  196|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2135|      0|        mresult = CURLM_CALL_MULTI_PERFORM;
 2136|      0|      }
 2137|      1|    }
 2138|  3.01k|    else {
 2139|       |      /* after the transfer is done, go DONE */
 2140|       |
 2141|       |      /* but first check to see if we got a location info even though we are
 2142|       |         not following redirects */
 2143|  3.01k|      if(data->req.location) {
  ------------------
  |  Branch (2143:10): [True: 10, False: 3.00k]
  ------------------
 2144|     10|        curlx_free(newurl);
  ------------------
  |  | 1476|     10|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2145|     10|        newurl = data->req.location;
 2146|     10|        data->req.location = NULL;
 2147|     10|        result = multi_follow(data, handler, newurl, FOLLOW_FAKE);
 2148|     10|        if(result) {
  ------------------
  |  Branch (2148:12): [True: 0, False: 10]
  ------------------
 2149|      0|          *stream_errorp = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2150|      0|          result = multi_done(data, result, TRUE);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2151|      0|        }
 2152|     10|      }
 2153|       |
 2154|  3.01k|      if(!result) {
  ------------------
  |  Branch (2154:10): [True: 3.01k, False: 0]
  ------------------
 2155|  3.01k|        multistate(data, MSTATE_DONE);
  ------------------
  |  |  196|  3.01k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2156|  3.01k|        mresult = CURLM_CALL_MULTI_PERFORM;
 2157|  3.01k|      }
 2158|  3.01k|    }
 2159|  3.01k|  }
 2160|  3.63k|  else { /* not errored, not done */
 2161|  3.63k|    mspeed_check(data);
 2162|  3.63k|  }
 2163|  7.23k|  curlx_free(newurl);
  ------------------
  |  | 1476|  7.23k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2164|  7.23k|  *resultp = result;
 2165|  7.23k|  return mresult;
 2166|  7.23k|}
multi.c:multistate_done:
 2700|  3.02k|{
 2701|  3.02k|  if(data->conn) {
  ------------------
  |  Branch (2701:6): [True: 3.02k, False: 0]
  ------------------
 2702|  3.02k|    CURLcode result;
 2703|       |
 2704|       |    /* post-transfer command */
 2705|  3.02k|    result = multi_done(data, *presult, FALSE);
  ------------------
  |  | 1048|  3.02k|#define FALSE false
  ------------------
 2706|       |
 2707|       |    /* allow a previously set error code take precedence */
 2708|  3.02k|    if(!(*presult))
  ------------------
  |  Branch (2708:8): [True: 3.02k, False: 0]
  ------------------
 2709|  3.02k|      *presult = result;
 2710|  3.02k|  }
 2711|       |
 2712|  3.02k|#ifndef CURL_DISABLE_FTP
 2713|  3.02k|  if(data->state.wildcardmatch) {
  ------------------
  |  Branch (2713:6): [True: 0, False: 3.02k]
  ------------------
 2714|      0|    if(data->wildcard->state != CURLWC_DONE) {
  ------------------
  |  Branch (2714:8): [True: 0, False: 0]
  ------------------
 2715|       |      /* if a wildcard is set and we are not ending -> lets start again
 2716|       |         with MSTATE_INIT */
 2717|      0|      multistate(data, MSTATE_INIT);
  ------------------
  |  |  196|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2718|      0|      return CURLM_CALL_MULTI_PERFORM;
 2719|      0|    }
 2720|      0|  }
 2721|  3.02k|#endif
 2722|       |  /* after we have DONE what we are supposed to do, go COMPLETED, and
 2723|       |     it does not matter what the multi_done() returned! */
 2724|  3.02k|  multistate(data, MSTATE_COMPLETED);
  ------------------
  |  |  196|  3.02k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2725|  3.02k|  return CURLM_CALL_MULTI_PERFORM;
 2726|  3.02k|}
multi.c:is_finished:
 2380|  39.4k|{
 2381|  39.4k|  if(data->mstate < MSTATE_COMPLETED) {
  ------------------
  |  Branch (2381:6): [True: 36.4k, False: 3.02k]
  ------------------
 2382|  36.4k|    if(result) {
  ------------------
  |  Branch (2382:8): [True: 705, False: 35.7k]
  ------------------
 2383|       |      /*
 2384|       |       * If an error was returned, and we are not in completed state now,
 2385|       |       * then we go to completed and consider this transfer aborted.
 2386|       |       */
 2387|       |
 2388|       |      /* No attempt to disconnect connections must be made before this -
 2389|       |         connection detach and termination happens only here */
 2390|       |
 2391|       |      /* Check if we can move pending requests to send pipe */
 2392|    705|      multi_schedule_pending(multi); /* connection */
 2393|       |
 2394|    705|      if(data->conn) {
  ------------------
  |  Branch (2394:10): [True: 0, False: 705]
  ------------------
 2395|      0|        if(stream_error) {
  ------------------
  |  Branch (2395:12): [True: 0, False: 0]
  ------------------
 2396|       |          /* Do not attempt to send data over a connection that timed out */
 2397|      0|          bool dead_connection = result == CURLE_OPERATION_TIMEDOUT;
 2398|      0|          struct connectdata *conn = data->conn;
 2399|       |
 2400|       |          /* This is where we make sure that the conn pointer is reset.
 2401|       |             We do not have to do this in every case block above where a
 2402|       |             failure is detected */
 2403|      0|          Curl_detach_connection(data);
 2404|      0|          Curl_conn_close(data, conn, dead_connection);
 2405|      0|        }
 2406|      0|      }
 2407|    705|      else if(data->mstate == MSTATE_CONNECT) {
  ------------------
  |  Branch (2407:15): [True: 40, False: 665]
  ------------------
 2408|       |        /* Curl_connect() failed */
 2409|     40|        multi_posttransfer(data);
 2410|     40|        Curl_pgrsUpdate_nometer(data);
 2411|     40|      }
 2412|       |
 2413|    705|      multistate(data, MSTATE_COMPLETED);
  ------------------
  |  |  196|    705|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2414|    705|      return result;
 2415|    705|    }
 2416|       |    /* if there is still a connection to use, call the progress function */
 2417|  35.7k|    else if(data->conn && Curl_conn_is_connected(data->conn, FIRSTSOCKET)) {
  ------------------
  |  |  234|  28.3k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2417:13): [True: 28.3k, False: 7.33k]
  |  Branch (2417:27): [True: 21.1k, False: 7.25k]
  ------------------
 2418|  21.1k|      result = Curl_pgrsUpdateX(data, pnow);
 2419|  21.1k|      if(result) {
  ------------------
  |  Branch (2419:10): [True: 0, False: 21.1k]
  ------------------
 2420|       |        /* aborted due to progress callback return code must close the
 2421|       |           connection */
 2422|      0|        streamclose(data->conn);
  ------------------
  |  |   89|      0|#define streamclose(x) Curl_conncontrol((x), CONNCTRL_STREAM_CLOSE)
  |  |  ------------------
  |  |  |  |   85|      0|#define CONNCTRL_STREAM_CLOSE    2
  |  |  ------------------
  ------------------
 2423|       |
 2424|       |        /* if not yet in DONE state, go there, otherwise COMPLETED */
 2425|      0|        multistate(data, (data->mstate < MSTATE_DONE) ?
  ------------------
  |  |  196|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  |  |  ------------------
  |  |  |  Branch (196:36): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2426|      0|                   MSTATE_DONE : MSTATE_COMPLETED);
 2427|      0|        return result;
 2428|      0|      }
 2429|  21.1k|    }
 2430|  36.4k|  }
 2431|  38.7k|  return result;
 2432|  39.4k|}
multi.c:handle_completed:
 2437|  3.73k|{
 2438|  3.73k|  if(data->master_mid != UINT32_MAX) {
  ------------------
  |  Branch (2438:6): [True: 0, False: 3.73k]
  ------------------
 2439|       |    /* A sub transfer, not for msgsent to application. Is anyone still
 2440|       |     * interested in processing its results? */
 2441|      0|    if(data->sub_xfer_done) {
  ------------------
  |  Branch (2441:8): [True: 0, False: 0]
  ------------------
 2442|      0|      struct Curl_easy *master = Curl_multi_get_easy(multi, data->master_mid);
 2443|       |
 2444|      0|      CURL_TRC_M(data, "sub xfer done for master %u", 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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2445|      0|      if(master)
  ------------------
  |  Branch (2445:10): [True: 0, False: 0]
  ------------------
 2446|      0|        data->sub_xfer_done(data, master, result);
 2447|      0|      else
 2448|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2449|      0|    }
 2450|      0|  }
 2451|  3.73k|  else {
 2452|       |    /* now fill in the Curl_message with this info */
 2453|  3.73k|    struct Curl_message *msg = &data->msg;
 2454|       |
 2455|  3.73k|    msg->extmsg.msg = CURLMSG_DONE;
 2456|  3.73k|    msg->extmsg.easy_handle = data;
 2457|  3.73k|    msg->extmsg.data.result = result;
 2458|       |
 2459|  3.73k|    multi_addmsg(multi, msg);
 2460|  3.73k|    DEBUGASSERT(!data->conn);
  ------------------
  |  | 1075|  3.73k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2460:5): [True: 0, False: 3.73k]
  |  Branch (2460:5): [True: 3.73k, False: 0]
  ------------------
 2461|  3.73k|  }
 2462|  3.73k|  multistate(data, MSTATE_MSGSENT);
  ------------------
  |  |  196|  3.73k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2463|       |
 2464|       |  /* remove from the other sets, add to msgsent */
 2465|  3.73k|  Curl_uint32_bset_remove(&multi->process, data->mid);
 2466|  3.73k|  Curl_uint32_bset_remove(&multi->dirty, data->mid);
 2467|  3.73k|  Curl_uint32_bset_remove(&multi->pending, data->mid);
 2468|  3.73k|  Curl_uint32_bset_add(&multi->msgsent, data->mid);
 2469|  3.73k|  if(data->state.really_alive) {
  ------------------
  |  Branch (2469:6): [True: 3.73k, False: 0]
  ------------------
 2470|  3.73k|    data->state.really_alive = FALSE;
  ------------------
  |  | 1048|  3.73k|#define FALSE false
  ------------------
 2471|  3.73k|    --multi->xfers_really_alive;
 2472|  3.73k|    if(!multi->xfers_really_alive)
  ------------------
  |  Branch (2472:8): [True: 3.73k, False: 0]
  ------------------
 2473|  3.73k|      (void)multi_assess_wakeup(multi);
 2474|  3.73k|  }
 2475|  3.73k|  --multi->xfers_alive;
 2476|  3.73k|  if(!multi->xfers_alive)
  ------------------
  |  Branch (2476:6): [True: 3.73k, False: 0]
  ------------------
 2477|  3.73k|    multi_assess_wakeup(multi);
 2478|  3.73k|}
multi.c:multi_addmsg:
  217|  3.73k|{
  218|  3.73k|  if(!Curl_llist_count(&multi->msglist))
  ------------------
  |  Branch (218:6): [True: 3.73k, False: 0]
  ------------------
  219|  3.73k|    CURLM_NTFY(multi->admin, CURLMNOTIFY_INFO_READ);
  ------------------
  |  |   51|  3.73k|  do {                                                \
  |  |   52|  3.73k|    if((d) && (d)->multi && (d)->multi->ntfy.ntfy_cb) \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 3.73k, False: 0]
  |  |  |  Branch (52:15): [True: 3.73k, False: 0]
  |  |  |  Branch (52:29): [True: 0, False: 3.73k]
  |  |  ------------------
  |  |   53|  3.73k|      Curl_mntfy_add((d), (t));                       \
  |  |   54|  3.73k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (54:11): [Folded, False: 3.73k]
  |  |  ------------------
  ------------------
  220|  3.73k|  Curl_llist_append(&multi->msglist, msg, &msg->list);
  221|  3.73k|}
multi.c:multi_ischanged:
 1742|  61.3k|{
 1743|  61.3k|  bool retval = FALSE;
  ------------------
  |  | 1048|  61.3k|#define FALSE false
  ------------------
 1744|  61.3k|  DEBUGASSERT(multi);
  ------------------
  |  | 1075|  61.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1744:3): [True: 0, False: 61.3k]
  |  Branch (1744:3): [True: 61.3k, False: 0]
  ------------------
 1745|  61.3k|  if(multi) {
  ------------------
  |  Branch (1745:6): [True: 61.3k, False: 0]
  ------------------
 1746|  61.3k|    retval = (bool)multi->recheckstate;
 1747|  61.3k|    if(clear)
  ------------------
  |  Branch (1747:8): [True: 50.4k, False: 10.9k]
  ------------------
 1748|  50.4k|      multi->recheckstate = FALSE;
  ------------------
  |  | 1048|  50.4k|#define FALSE false
  ------------------
 1749|  61.3k|  }
 1750|  61.3k|  return retval;
 1751|  61.3k|}
multi.c:multi_handle_timeout:
 1834|  35.7k|{
 1835|  35.7k|  timediff_t timeout_ms;
 1836|       |
 1837|  35.7k|  timeout_ms = Curl_timeleft_now_ms(data, pnow);
 1838|  35.7k|  if(timeout_ms < 0) {
  ------------------
  |  Branch (1838:6): [True: 0, False: 35.7k]
  ------------------
 1839|       |    /* Handle timed out */
 1840|      0|    timerid base_timer = Curl_is_connecting(data) ?
  ------------------
  |  Branch (1840:26): [True: 0, False: 0]
  ------------------
 1841|      0|                         TIMER_STARTSINGLE : TIMER_STARTOP;
 1842|      0|    timediff_t elapsed_ms = Curl_pgrs_since_ms(data, NULL, base_timer);
 1843|      0|    if(data->mstate == MSTATE_CONNECTING)
  ------------------
  |  Branch (1843:8): [True: 0, False: 0]
  ------------------
 1844|      0|      failf(data, "%s timed out after %" FMT_TIMEDIFF_T " milliseconds",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1845|      0|            data->conn->bits.dns_resolved ? "Connection" : "Resolving",
  ------------------
  |  Branch (1845:13): [True: 0, False: 0]
  ------------------
 1846|      0|            elapsed_ms);
 1847|      0|    else {
 1848|      0|      struct SingleRequest *k = &data->req;
 1849|      0|      if(k->size != -1) {
  ------------------
  |  Branch (1849:10): [True: 0, False: 0]
  ------------------
 1850|      0|        failf(data, "Operation timed out after %" FMT_TIMEDIFF_T
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1851|      0|              " milliseconds with %" FMT_OFF_T " out of %"
 1852|      0|              FMT_OFF_T " bytes received",
 1853|      0|              elapsed_ms, k->bytecount, k->size);
 1854|      0|      }
 1855|      0|      else {
 1856|      0|        failf(data, "Operation timed out after %" FMT_TIMEDIFF_T
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1857|      0|              " milliseconds with %" FMT_OFF_T " bytes received",
 1858|      0|              elapsed_ms, k->bytecount);
 1859|      0|      }
 1860|      0|    }
 1861|      0|    *result = CURLE_OPERATION_TIMEDOUT;
 1862|      0|    if(data->conn) {
  ------------------
  |  Branch (1862:8): [True: 0, False: 0]
  ------------------
 1863|       |      /* Force connection closed if the connection has indeed been used */
 1864|      0|      if(data->mstate > MSTATE_DO) {
  ------------------
  |  Branch (1864:10): [True: 0, False: 0]
  ------------------
 1865|      0|        streamclose(data->conn);
  ------------------
  |  |   89|      0|#define streamclose(x) Curl_conncontrol((x), CONNCTRL_STREAM_CLOSE)
  |  |  ------------------
  |  |  |  |   85|      0|#define CONNCTRL_STREAM_CLOSE    2
  |  |  ------------------
  ------------------
 1866|      0|        *stream_error = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1867|      0|      }
 1868|      0|      (void)multi_done(data, *result, TRUE);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1869|      0|    }
 1870|      0|    return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1871|      0|  }
 1872|       |
 1873|  35.7k|  return FALSE;
  ------------------
  |  | 1048|  35.7k|#define FALSE false
  ------------------
 1874|  35.7k|}
multi.c:multi_timeouts_init:
 3149|  11.1k|{
 3150|  11.1k|  data->state.timeouts.first = EXPIRE_LAST;
 3151|       |  data->state.timeouts.splaynode.registered = FALSE;
  ------------------
  |  | 1048|  11.1k|#define FALSE false
  ------------------
 3152|  11.1k|}
multi.c:multi_set_timeout:
 3711|  7.45k|{
 3712|  7.45k|  struct expire_timers *timeouts = &data->state.timeouts;
 3713|  7.45k|  uint8_t *anchor = &timeouts->first;
 3714|  7.45k|  uint8_t id = (uint8_t)eid;
 3715|       |
 3716|  7.45k|  if((unsigned)eid >= EXPIRE_LAST) {
  ------------------
  |  Branch (3716:6): [True: 0, False: 7.45k]
  ------------------
 3717|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3717:5): [Folded, False: 0]
  |  Branch (3717:5): [Folded, False: 0]
  ------------------
 3718|      0|    return CURLM_BAD_FUNCTION_ARGUMENT;
 3719|      0|  }
 3720|       |  /* remove from list, store time and re-insert */
 3721|  7.45k|  multi_clear_timeout(data, eid);
 3722|  7.45k|  timeouts->offset_us[id] =
 3723|  7.45k|    Curl_timeouts_offset_us(&data->multi->timeouts, stamp);
 3724|       |
 3725|  11.3k|  while(*anchor < EXPIRE_LAST) {
  ------------------
  |  Branch (3725:9): [True: 3.86k, False: 7.44k]
  ------------------
 3726|  3.86k|    if(timeouts->offset_us[*anchor] > timeouts->offset_us[id])
  ------------------
  |  Branch (3726:8): [True: 3, False: 3.85k]
  ------------------
 3727|      3|      break;
 3728|  3.85k|    anchor = &timeouts->next[*anchor];
 3729|  3.85k|  }
 3730|  7.45k|  timeouts->next[eid] = *anchor;
 3731|  7.45k|  timeouts->next[eid] = *anchor;
 3732|  7.45k|  *anchor = id;
 3733|  7.45k|  DEBUGASSERT(multi_timeouts_check(data));
  ------------------
  |  | 1075|  7.45k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3733:3): [True: 0, False: 7.45k]
  |  Branch (3733:3): [True: 7.45k, False: 0]
  ------------------
 3734|  7.45k|  CURL_TRC_TIMER(data, eid, "set for %" FMT_TIMEDIFF_T "us",
  ------------------
  |  |  173|  7.45k|  do {                                        \
  |  |  174|  7.45k|    if(CURL_TRC_TIMER_is_verbose(data))       \
  |  |  ------------------
  |  |  |  |  139|  7.45k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_timer)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  7.45k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  14.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 7.45k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 7.45k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  14.9k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  7.45k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  175|  7.45k|      Curl_trc_timer(data, tid, __VA_ARGS__); \
  |  |  176|  7.45k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (176:11): [Folded, False: 7.45k]
  |  |  ------------------
  ------------------
 3735|  7.45k|                 curlx_ptimediff_us(stamp, Curl_pgrs_now(data)));
 3736|  7.45k|  return CURLM_OK;
 3737|  7.45k|}
multi.c:multi_timeouts_check:
 3639|  18.6k|{
 3640|  18.6k|  struct expire_timers *timeouts = &data->state.timeouts;
 3641|  18.6k|  uint8_t id;
 3642|  18.6k|  int i = 0;
 3643|  41.1k|  for(id = timeouts->first; id < EXPIRE_LAST; id = timeouts->next[id]) {
  ------------------
  |  Branch (3643:29): [True: 22.5k, False: 18.6k]
  ------------------
 3644|  22.5k|    if(++i >= EXPIRE_LAST) {
  ------------------
  |  Branch (3644:8): [True: 0, False: 22.5k]
  ------------------
 3645|      0|      failf(data, "expire timeouts looped: %d iterations and no end", i);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3646|      0|      return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 3647|      0|    }
 3648|  22.5k|    if(id == timeouts->next[id]) {
  ------------------
  |  Branch (3648:8): [True: 0, False: 22.5k]
  ------------------
 3649|      0|      failf(data, "expire timeouts wrong: %d points to itself", (int)id);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3650|      0|      return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 3651|      0|    }
 3652|  22.5k|    if((timeouts->next[id] < EXPIRE_LAST) &&
  ------------------
  |  Branch (3652:8): [True: 7.66k, False: 14.9k]
  ------------------
 3653|  7.66k|       (timeouts->offset_us[id] > timeouts->offset_us[timeouts->next[id]])) {
  ------------------
  |  Branch (3653:8): [True: 0, False: 7.66k]
  ------------------
 3654|      0|      failf(data, "expire timeouts not sorted: %d happens after %d but "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3655|      0|            "is listed before", (int)id, (int)timeouts->next[id]);
 3656|      0|      return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 3657|      0|    }
 3658|  22.5k|  }
 3659|  18.6k|  return TRUE;
  ------------------
  |  | 1045|  18.6k|#define TRUE true
  ------------------
 3660|  18.6k|}
multi.c:multi_clear_timeout:
 3667|  11.1k|{
 3668|  11.1k|  struct expire_timers *timeouts = &data->state.timeouts;
 3669|  11.1k|  uint8_t orig_first = timeouts->first;
 3670|  11.1k|  uint8_t *anchor = &timeouts->first;
 3671|  11.1k|  uint8_t id = (uint8_t)eid;
 3672|       |
 3673|  11.1k|  if((unsigned)eid >= EXPIRE_LAST) {
  ------------------
  |  Branch (3673:6): [True: 0, False: 11.1k]
  ------------------
 3674|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3674:5): [Folded, False: 0]
  |  Branch (3674:5): [Folded, False: 0]
  ------------------
 3675|      0|    return;
 3676|      0|  }
 3677|       |
 3678|  22.4k|  while(*anchor < EXPIRE_LAST) {
  ------------------
  |  Branch (3678:9): [True: 11.3k, False: 11.0k]
  ------------------
 3679|  11.3k|    if(*anchor == id) {
  ------------------
  |  Branch (3679:8): [True: 69, False: 11.2k]
  ------------------
 3680|     69|      *anchor = timeouts->next[id];
 3681|     69|      break;
 3682|     69|    }
 3683|  11.2k|    anchor = &timeouts->next[*anchor];
 3684|  11.2k|  }
 3685|  11.1k|  DEBUGASSERT(multi_timeouts_check(data));
  ------------------
  |  | 1075|  11.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3685:3): [True: 0, False: 11.1k]
  |  Branch (3685:3): [True: 11.1k, False: 0]
  ------------------
 3686|  11.1k|  if(Curl_timeouts_has(data)) {
  ------------------
  |  Branch (3686:6): [True: 7.46k, False: 3.68k]
  ------------------
 3687|  7.46k|    struct Curl_multi *multi = data->multi;
 3688|       |
 3689|  7.46k|    if(!multi) {
  ------------------
  |  Branch (3689:8): [True: 0, False: 7.46k]
  ------------------
 3690|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3690:7): [Folded, False: 0]
  |  Branch (3690:7): [Folded, False: 0]
  ------------------
 3691|      0|      return;
 3692|      0|    }
 3693|  7.46k|    if((timeouts->first >= EXPIRE_LAST) || /* no more timeouts */
  ------------------
  |  Branch (3693:8): [True: 0, False: 7.46k]
  ------------------
 3694|  7.46k|       (timeouts->first != orig_first)) {  /* active timeout changed */
  ------------------
  |  Branch (3694:8): [True: 2, False: 7.46k]
  ------------------
 3695|      2|      Curl_timeouts_remove(&multi->timeouts, data);
 3696|      2|    }
 3697|  7.46k|    if((timeouts->first < EXPIRE_LAST) && !Curl_timeouts_has(data)) {
  ------------------
  |  Branch (3697:8): [True: 7.46k, False: 0]
  |  Branch (3697:43): [True: 2, False: 7.46k]
  ------------------
 3698|      2|      Curl_timeouts_add(&multi->timeouts, data,
 3699|      2|                        timeouts->offset_us[timeouts->first]);
 3700|      2|    }
 3701|  7.46k|  }
 3702|  11.1k|}
multi.c:multi_schedule_pending:
 3868|  15.3k|{
 3869|  15.3k|  uint32_t mid = multi->last_pending_mid;
 3870|       |
 3871|  15.3k|  if(mid) {
  ------------------
  |  Branch (3871:6): [True: 0, False: 15.3k]
  ------------------
 3872|      0|    while(Curl_uint32_bset_next(&multi->pending, mid, &mid)) {
  ------------------
  |  Branch (3872:11): [True: 0, False: 0]
  ------------------
 3873|      0|      struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 3874|      0|      if(data) {
  ------------------
  |  Branch (3874:10): [True: 0, False: 0]
  ------------------
 3875|      0|        move_pending_to_connect(multi, data);
 3876|      0|        multi->last_pending_mid = mid;
 3877|      0|        return;
 3878|      0|      }
 3879|       |      /* transfer no longer known, should not happen */
 3880|      0|      Curl_uint32_bset_remove(&multi->pending, mid);
 3881|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3881:7): [Folded, False: 0]
  |  Branch (3881:7): [Folded, False: 0]
  ------------------
 3882|      0|    }
 3883|       |    /* found no pending transfers with `mid` larger than `last_pending_mid`.
 3884|       |     * Start at the beginning of the pending set again. */
 3885|      0|    multi->last_pending_mid = 0;
 3886|      0|  }
 3887|       |
 3888|  15.3k|  if(Curl_uint32_bset_first(&multi->pending, &mid)) {
  ------------------
  |  Branch (3888:6): [True: 0, False: 15.3k]
  ------------------
 3889|      0|    do {
 3890|      0|      struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 3891|      0|      if(data) {
  ------------------
  |  Branch (3891:10): [True: 0, False: 0]
  ------------------
 3892|      0|        move_pending_to_connect(multi, data);
 3893|      0|        multi->last_pending_mid = mid;
 3894|      0|        return;
 3895|      0|      }
 3896|       |      /* transfer no longer known, should not happen */
 3897|      0|      Curl_uint32_bset_remove(&multi->pending, mid);
 3898|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3898:7): [Folded, False: 0]
  |  Branch (3898:7): [Folded, False: 0]
  ------------------
 3899|      0|    } while(Curl_uint32_bset_next(&multi->pending, mid, &mid));
  ------------------
  |  Branch (3899:13): [True: 0, False: 0]
  ------------------
 3900|      0|  }
 3901|  15.3k|}
multi.c:multi_xfer_bufs_free:
 4144|  3.73k|{
 4145|  3.73k|  DEBUGASSERT(multi);
  ------------------
  |  | 1075|  3.73k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4145:3): [True: 0, False: 3.73k]
  |  Branch (4145:3): [True: 3.73k, False: 0]
  ------------------
 4146|  3.73k|  curlx_safefree(multi->xfer_buf);
  ------------------
  |  | 1332|  3.73k|  do {                      \
  |  | 1333|  3.73k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.73k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.73k|    (ptr) = NULL;           \
  |  | 1335|  3.73k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.73k]
  |  |  ------------------
  ------------------
 4147|  3.73k|  multi->xfer_buf_len = 0;
 4148|  3.73k|  multi->xfer_buf_borrowed = FALSE;
  ------------------
  |  | 1048|  3.73k|#define FALSE false
  ------------------
 4149|  3.73k|  curlx_safefree(multi->xfer_ulbuf);
  ------------------
  |  | 1332|  3.73k|  do {                      \
  |  | 1333|  3.73k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.73k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.73k|    (ptr) = NULL;           \
  |  | 1335|  3.73k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.73k]
  |  |  ------------------
  ------------------
 4150|  3.73k|  multi->xfer_ulbuf_len = 0;
 4151|  3.73k|  multi->xfer_ulbuf_borrowed = FALSE;
  ------------------
  |  | 1048|  3.73k|#define FALSE false
  ------------------
 4152|  3.73k|  curlx_safefree(multi->xfer_sockbuf);
  ------------------
  |  | 1332|  3.73k|  do {                      \
  |  | 1333|  3.73k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.73k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.73k|    (ptr) = NULL;           \
  |  | 1335|  3.73k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.73k]
  |  |  ------------------
  ------------------
 4153|  3.73k|  multi->xfer_sockbuf_len = 0;
 4154|       |  multi->xfer_sockbuf_borrowed = FALSE;
  ------------------
  |  | 1048|  3.73k|#define FALSE false
  ------------------
 4155|  3.73k|}

Curl_multi_ev_socket_done:
  618|  3.62k|{
  619|  3.62k|  mev_forget_socket(multi, data, s, "socket done");
  620|  3.62k|}
Curl_multi_ev_xfer_done:
  624|  3.73k|{
  625|  3.73k|  DEBUGASSERT(!data->conn); /* transfer should have been detached */
  ------------------
  |  | 1075|  3.73k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (625:3): [True: 0, False: 3.73k]
  |  Branch (625:3): [True: 3.73k, False: 0]
  ------------------
  626|  3.73k|  (void)mev_assess(multi, data, NULL);
  627|  3.73k|  Curl_meta_remove(data, CURL_META_MEV_POLLSET);
  ------------------
  |  |   34|  3.73k|#define CURL_META_MEV_POLLSET   "meta:mev:ps"
  ------------------
  628|  3.73k|}
Curl_multi_ev_conn_done:
  633|  3.62k|{
  634|  3.62k|  (void)mev_assess(multi, data, conn);
  635|  3.62k|  Curl_conn_meta_remove(conn, CURL_META_MEV_POLLSET);
  ------------------
  |  |   34|  3.62k|#define CURL_META_MEV_POLLSET   "meta:mev:ps"
  ------------------
  636|  3.62k|}
Curl_multi_ev_init:
  639|  3.73k|{
  640|  3.73k|  Curl_hash_init(&multi->ev.sh_entries, hashsize, mev_sh_entry_hash,
  641|  3.73k|                 mev_sh_entry_compare, mev_sh_entry_dtor);
  642|  3.73k|}
Curl_multi_ev_cleanup:
  645|  3.73k|{
  646|  3.73k|  Curl_hash_destroy(&multi->ev.sh_entries);
  647|  3.73k|}
multi_ev.c:mev_assess:
  500|  7.36k|{
  501|  7.36k|  struct easy_pollset ps, *last_ps;
  502|  7.36k|  CURLMcode mresult = CURLM_OK;
  503|       |
  504|  7.36k|  if(!multi || !multi->socket_cb)
  ------------------
  |  Branch (504:6): [True: 0, False: 7.36k]
  |  Branch (504:16): [True: 7.36k, False: 0]
  ------------------
  505|  7.36k|    return CURLM_OK;
  506|       |
  507|      0|  Curl_pollset_init(&ps);
  508|      0|  if(conn) {
  ------------------
  |  Branch (508:6): [True: 0, False: 0]
  ------------------
  509|      0|    CURLcode result = Curl_conn_adjust_pollset(data, conn, &ps);
  510|      0|    if(result) {
  ------------------
  |  Branch (510:8): [True: 0, False: 0]
  ------------------
  511|      0|      mresult = (result == CURLE_OUT_OF_MEMORY) ?
  ------------------
  |  Branch (511:17): [True: 0, False: 0]
  ------------------
  512|      0|        CURLM_OUT_OF_MEMORY : CURLM_INTERNAL_ERROR;
  513|      0|      goto out;
  514|      0|    }
  515|      0|  }
  516|      0|  else
  517|      0|    Curl_multi_pollset(data, &ps);
  518|      0|  last_ps = mev_get_last_pollset(data, conn);
  519|       |
  520|      0|  if(!last_ps && ps.n) {
  ------------------
  |  Branch (520:6): [True: 0, False: 0]
  |  Branch (520:18): [True: 0, False: 0]
  ------------------
  521|      0|    if(conn)
  ------------------
  |  Branch (521:8): [True: 0, False: 0]
  ------------------
  522|      0|      last_ps = mev_add_new_conn_pollset(conn);
  523|      0|    else
  524|      0|      last_ps = mev_add_new_xfer_pollset(data);
  525|      0|    if(!last_ps) {
  ------------------
  |  Branch (525:8): [True: 0, False: 0]
  ------------------
  526|      0|      mresult = CURLM_OUT_OF_MEMORY;
  527|      0|      goto out;
  528|      0|    }
  529|      0|  }
  530|       |
  531|      0|  if(last_ps)
  ------------------
  |  Branch (531:6): [True: 0, False: 0]
  ------------------
  532|      0|    mresult = mev_pollset_diff(multi, data, conn, &ps, last_ps);
  533|      0|  else
  534|      0|    DEBUGASSERT(!ps.n);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (534:5): [True: 0, False: 0]
  |  Branch (534:5): [True: 0, False: 0]
  ------------------
  535|      0|out:
  536|      0|  Curl_pollset_cleanup(&ps);
  537|      0|  return mresult;
  538|      0|}
multi_ev.c:mev_sh_entry_get:
   88|  3.62k|{
   89|  3.62k|  if(s != CURL_SOCKET_BAD) {
  ------------------
  |  |  147|  3.62k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (89:6): [True: 3.62k, False: 0]
  ------------------
   90|       |    /* only look for proper sockets */
   91|  3.62k|    return Curl_hash_pick(sh, (char *)&s, sizeof(curl_socket_t));
   92|  3.62k|  }
   93|      0|  return NULL;
   94|  3.62k|}
multi_ev.c:mev_forget_socket:
  195|  3.62k|{
  196|  3.62k|  struct mev_sh_entry *entry = mev_sh_entry_get(&multi->ev.sh_entries, s);
  197|  3.62k|  int rc = 0;
  198|       |
  199|  3.62k|  if(!entry) /* we never knew or already forgot about this socket */
  ------------------
  |  Branch (199:6): [True: 3.62k, False: 0]
  ------------------
  200|  3.62k|    return CURLM_OK;
  201|       |
  202|       |  /* We managed this socket before, tell the socket callback to forget it. */
  203|      0|  if(entry->announced && multi->socket_cb) {
  ------------------
  |  Branch (203:6): [True: 0, False: 0]
  |  Branch (203:26): [True: 0, False: 0]
  ------------------
  204|      0|    struct Curl_mapi_guard guard;
  205|       |
  206|      0|    NOVERBOSE((void)cause);
  ------------------
  |  | 1612|      0|#define NOVERBOSE(x) Curl_nop_stmt
  |  |  ------------------
  |  |  |  | 1183|      0|#define Curl_nop_stmt do {} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1183:35): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  207|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  208|      0|    CURL_CBAPI_MULTI_START(&guard, multi, multi_socket_cb);
  ------------------
  |  |  203|      0|  Curl_cbapi_enter((g), NULL, (m), CURL_CBAPI_FN_##fn)
  ------------------
  209|      0|    rc = multi->socket_cb(data, s, CURL_POLL_REMOVE,
  ------------------
  |  |  286|      0|#define CURL_POLL_REMOVE 4
  ------------------
  210|      0|                          multi->socket_userp, entry->user_data);
  211|      0|    CURL_CBAPI_END(&guard);
  ------------------
  |  |  205|      0|  Curl_cbapi_leave(g)
  ------------------
  212|      0|    entry = mev_sh_entry_get(&multi->ev.sh_entries, s);
  213|      0|    if(entry)
  ------------------
  |  Branch (213:8): [True: 0, False: 0]
  ------------------
  214|      0|      entry->announced = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  215|      0|  }
  216|       |
  217|      0|  mev_sh_entry_kill(multi, s);
  218|      0|  if(rc == -1) {
  ------------------
  |  Branch (218:6): [True: 0, False: 0]
  ------------------
  219|      0|    multi->dead = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  220|      0|    return CURLM_ABORTED_BY_CALLBACK;
  221|      0|  }
  222|      0|  return CURLM_OK;
  223|      0|}

Curl_mntfy_init:
  125|  3.73k|{
  126|  3.73k|  memset(&multi->ntfy, 0, sizeof(multi->ntfy));
  127|  3.73k|  Curl_uint32_bset_init(&multi->ntfy.enabled);
  128|  3.73k|}
Curl_mntfy_resize:
  131|  3.73k|{
  132|  3.73k|  if(Curl_uint32_bset_resize(&multi->ntfy.enabled, CURLMNOTIFY_EASY_DONE + 1))
  ------------------
  |  |  540|  3.73k|#define CURLMNOTIFY_EASY_DONE    1
  ------------------
  |  Branch (132:6): [True: 0, False: 3.73k]
  ------------------
  133|      0|    return CURLM_OUT_OF_MEMORY;
  134|  3.73k|  return CURLM_OK;
  135|  3.73k|}
Curl_mntfy_cleanup:
  138|  3.73k|{
  139|  3.73k|  while(multi->ntfy.head) {
  ------------------
  |  Branch (139:9): [True: 0, False: 3.73k]
  ------------------
  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|  3.73k|  Curl_uint32_bset_destroy(&multi->ntfy.enabled);
  146|  3.73k|}

Curl_netrc_init:
  665|  7.46k|{
  666|  7.46k|  curlx_dyn_init(&store->filebuf, MAX_NETRC_FILE);
  ------------------
  |  |   77|  7.46k|#define MAX_NETRC_FILE  (128 * 1024)
  ------------------
  667|  7.46k|  store->loaded = FALSE;
  ------------------
  |  | 1048|  7.46k|#define FALSE false
  ------------------
  668|       |  store->filename = NULL;
  669|  7.46k|}
Curl_netrc_cleanup:
  671|  11.0k|{
  672|  11.0k|  curlx_dyn_free(&store->filebuf);
  673|  11.0k|  curlx_safefree(store->filename);
  ------------------
  |  | 1332|  11.0k|  do {                      \
  |  | 1333|  11.0k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  11.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.0k|    (ptr) = NULL;           \
  |  | 1335|  11.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.0k]
  |  |  ------------------
  ------------------
  674|       |  store->loaded = FALSE;
  ------------------
  |  | 1048|  11.0k|#define FALSE false
  ------------------
  675|  11.0k|}

Curl_getdate_capped:
  603|      2|{
  604|      2|  int rc = parsedate(p, tp);
  605|      2|  return (rc == PARSEDATE_FAIL);
  ------------------
  |  |   95|      2|#define PARSEDATE_FAIL   (-1)
  ------------------
  606|      2|}
parsedate.c:parsedate:
  540|      2|{
  541|      2|  curl_off_t seconds = 0;
  542|      2|  enum assume dignext = DATE_MDAY;
  543|      2|  const char *indate = date; /* save the original pointer */
  544|      2|  int part = 0; /* max 6 parts */
  545|      2|  int rc = 0;
  546|      2|  struct when w;
  547|      2|  initwhen(&w);
  548|       |
  549|     14|  while(*date && (part < 6)) {
  ------------------
  |  Branch (549:9): [True: 13, False: 1]
  |  Branch (549:18): [True: 12, False: 1]
  ------------------
  550|     12|    skip(&date);
  551|       |
  552|     12|    if(ISALPHA(*date))
  ------------------
  |  |   36|     12|#define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   41|     24|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:22): [True: 0, False: 12]
  |  |  |  |  |  Branch (41:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   40|     12|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (40:22): [True: 6, False: 6]
  |  |  |  |  |  Branch (40:38): [True: 6, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  553|      6|      rc = datestring(&date, &w);
  554|      6|    else if(ISDIGIT(*date))
  ------------------
  |  |   42|      6|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 6, False: 0]
  |  |  |  Branch (42:38): [True: 6, False: 0]
  |  |  ------------------
  ------------------
  555|      6|      rc = datenum(indate, &date, &w, &dignext);
  556|     12|    if(rc)
  ------------------
  |  Branch (556:8): [True: 0, False: 12]
  ------------------
  557|      0|      return rc;
  558|       |
  559|     12|    part++;
  560|     12|  }
  561|       |
  562|      2|  rc = datecheck(&w);
  563|      2|  if(rc)
  ------------------
  |  Branch (563:6): [True: 0, False: 2]
  ------------------
  564|      0|    return rc;
  565|       |
  566|      2|  seconds = time2epoch(&w); /* get number of seconds */
  567|      2|  tzadjust(&seconds, &w); /* handle the time zone offset */
  568|      2|  rc = mktimet(seconds, output); /* squeeze seconds into a time_t */
  569|       |
  570|      2|  return rc;
  571|      2|}
parsedate.c:initwhen:
  357|      2|{
  358|      2|  w->wday = w->mon = w->mday = w->hour = w->min = w->sec = w->year = w->tzoff =
  359|      2|    -1;
  360|      2|}
parsedate.c:skip:
  253|     12|{
  254|       |  /* skip everything that are not letters or digits */
  255|     24|  while(**date && !ISALNUM(**date))
  ------------------
  |  |   39|     24|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|     48|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 12, False: 12]
  |  |  |  |  |  Branch (42:38): [True: 6, False: 6]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   41|     42|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:22): [True: 0, False: 18]
  |  |  |  |  |  Branch (41:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   40|     18|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (40:22): [True: 6, False: 12]
  |  |  |  |  |  Branch (40:38): [True: 6, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (255:9): [True: 24, False: 0]
  ------------------
  256|     12|    (*date)++;
  257|     12|}
parsedate.c:datestring:
  363|      6|{
  364|       |  /* a name coming up */
  365|      6|  size_t len = 0;
  366|      6|  const char *p = *datep;
  367|      6|  bool found = FALSE;
  ------------------
  |  | 1048|      6|#define FALSE false
  ------------------
  368|     24|  while(ISALPHA(*p) && (len < NAME_LEN)) {
  ------------------
  |  |   36|     48|#define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   41|     48|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:22): [True: 8, False: 16]
  |  |  |  |  |  Branch (41:38): [True: 8, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   40|     16|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (40:22): [True: 10, False: 6]
  |  |  |  |  |  Branch (40:38): [True: 10, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                while(ISALPHA(*p) && (len < NAME_LEN)) {
  ------------------
  |  |  354|     18|#define NAME_LEN 12
  ------------------
  |  Branch (368:24): [True: 18, False: 0]
  ------------------
  369|     18|    p++;
  370|     18|    len++;
  371|     18|  }
  372|       |
  373|      6|  if(len != NAME_LEN) {
  ------------------
  |  |  354|      6|#define NAME_LEN 12
  ------------------
  |  Branch (373:6): [True: 6, False: 0]
  ------------------
  374|      6|    if(w->wday == -1) {
  ------------------
  |  Branch (374:8): [True: 2, False: 4]
  ------------------
  375|      2|      w->wday = checkday(*datep, len);
  376|      2|      if(w->wday != -1)
  ------------------
  |  Branch (376:10): [True: 2, False: 0]
  ------------------
  377|      2|        found = TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
  378|      2|    }
  379|      6|    if(!found && (w->mon == -1)) {
  ------------------
  |  Branch (379:8): [True: 4, False: 2]
  |  Branch (379:18): [True: 2, False: 2]
  ------------------
  380|      2|      w->mon = checkmonth(*datep, len);
  381|      2|      if(w->mon != -1)
  ------------------
  |  Branch (381:10): [True: 2, False: 0]
  ------------------
  382|      2|        found = TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
  383|      2|    }
  384|       |
  385|      6|    if(!found && (w->tzoff == -1)) {
  ------------------
  |  Branch (385:8): [True: 2, False: 4]
  |  Branch (385:18): [True: 2, False: 0]
  ------------------
  386|       |      /* this must be a time zone string */
  387|      2|      w->tzoff = checktz(*datep, len);
  388|      2|      if(w->tzoff != -1)
  ------------------
  |  Branch (388:10): [True: 2, False: 0]
  ------------------
  389|      2|        found = TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
  390|      2|    }
  391|      6|  }
  392|      6|  if(!found)
  ------------------
  |  Branch (392:6): [True: 0, False: 6]
  ------------------
  393|      0|    return PARSEDATE_FAIL; /* bad string */
  ------------------
  |  |   95|      0|#define PARSEDATE_FAIL   (-1)
  ------------------
  394|       |
  395|      6|  *datep += len;
  396|      6|  return PARSEDATE_OK;
  ------------------
  |  |   94|      6|#define PARSEDATE_OK     0
  ------------------
  397|      6|}
parsedate.c:checkday:
  196|      2|{
  197|      2|  int i;
  198|      2|  const char * const *what;
  199|      2|  if(len > 3)
  ------------------
  |  Branch (199:6): [True: 0, False: 2]
  ------------------
  200|      0|    what = &weekday[0];
  201|      2|  else if(len == 3)
  ------------------
  |  Branch (201:11): [True: 2, False: 0]
  ------------------
  202|      2|    what = &Curl_wkday[0];
  203|      0|  else
  204|      0|    return -1; /* too short */
  205|      7|  for(i = 0; i < 7; i++) {
  ------------------
  |  Branch (205:14): [True: 7, False: 0]
  ------------------
  206|      7|    size_t ilen = strlen(what[0]);
  207|      7|    if((ilen == len) &&
  ------------------
  |  Branch (207:8): [True: 7, False: 0]
  ------------------
  208|      7|       curl_strnequal(check, what[0], len))
  ------------------
  |  Branch (208:8): [True: 2, False: 5]
  ------------------
  209|      2|      return i;
  210|      5|    what++;
  211|      5|  }
  212|      0|  return -1;
  213|      2|}
parsedate.c:checkmonth:
  216|      2|{
  217|      2|  int i;
  218|      2|  const char * const *what = &Curl_month[0];
  219|      2|  if(len != 3)
  ------------------
  |  Branch (219:6): [True: 0, False: 2]
  ------------------
  220|      0|    return -1; /* not a month */
  221|       |
  222|      7|  for(i = 0; i < 12; i++) {
  ------------------
  |  Branch (222:14): [True: 7, False: 0]
  ------------------
  223|      7|    if(curl_strnequal(check, what[0], 3))
  ------------------
  |  Branch (223:8): [True: 2, False: 5]
  ------------------
  224|      2|      return i;
  225|      5|    what++;
  226|      5|  }
  227|      0|  return -1; /* return the offset or -1, no real offset is -1 */
  228|      2|}
parsedate.c:checktz:
  240|      2|{
  241|      2|  if(len <= 4) {
  ------------------
  |  Branch (241:6): [True: 2, False: 0]
  ------------------
  242|      2|    const struct tzinfo *what;
  243|      2|    struct tzinfo find;
  244|      2|    curlx_strcopy(find.name, sizeof(find.name), check, len);
  245|      2|    what = bsearch(&find, tz, CURL_ARRAYSIZE(tz), sizeof(tz[0]), tzcompare);
  ------------------
  |  | 1299|      2|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  246|      2|    if(what)
  ------------------
  |  Branch (246:8): [True: 2, False: 0]
  ------------------
  247|      2|      return what->offset * 60;
  248|      2|  }
  249|      0|  return -1;
  250|      2|}
parsedate.c:tzcompare:
  231|     10|{
  232|     10|  const struct tzinfo *tz1 = m1;
  233|     10|  const struct tzinfo *tz2 = m2;
  234|     10|  return strcmp(tz1->name, tz2->name);
  235|     10|}
parsedate.c:datenum:
  401|      6|{
  402|       |  /* a digit */
  403|      6|  unsigned int val;
  404|      6|  char *end;
  405|      6|  const char *date = *datep;
  406|      6|  enum assume dignext = *dignextp;
  407|       |
  408|      6|  if((w->sec == -1) && match_time(date, w, &end)) {
  ------------------
  |  Branch (408:6): [True: 6, False: 0]
  |  Branch (408:24): [True: 2, False: 4]
  ------------------
  409|       |    /* time stamp */
  410|      2|    date = end;
  411|      2|  }
  412|      4|  else {
  413|      4|    bool found = FALSE;
  ------------------
  |  | 1048|      4|#define FALSE false
  ------------------
  414|      4|    curl_off_t lval;
  415|      4|    int num_digits = 0;
  416|      4|    const char *p = *datep;
  417|      4|    if(curlx_str_number(&p, &lval, 99999999))
  ------------------
  |  Branch (417:8): [True: 0, False: 4]
  ------------------
  418|      0|      return PARSEDATE_FAIL;
  ------------------
  |  |   95|      0|#define PARSEDATE_FAIL   (-1)
  ------------------
  419|       |
  420|       |    /* we know num_digits cannot be larger than 8 */
  421|      4|    num_digits = (int)(p - *datep);
  422|      4|    val = (unsigned int)lval;
  423|       |
  424|      4|    if((w->tzoff == -1) &&
  ------------------
  |  Branch (424:8): [True: 4, False: 0]
  ------------------
  425|      4|       (num_digits == 4) &&
  ------------------
  |  Branch (425:8): [True: 2, False: 2]
  ------------------
  426|      2|       (val <= 1400) &&
  ------------------
  |  Branch (426:8): [True: 0, False: 2]
  ------------------
  427|      0|       (indate < date) &&
  ------------------
  |  Branch (427:8): [True: 0, False: 0]
  ------------------
  428|      0|       (date[-1] == '+' || date[-1] == '-')) {
  ------------------
  |  Branch (428:9): [True: 0, False: 0]
  |  Branch (428:28): [True: 0, False: 0]
  ------------------
  429|       |      /* four digits and a value less than or equal to 1400 (to take into
  430|       |         account all sorts of funny time zone diffs) and it is preceded
  431|       |         with a plus or minus. This is a time zone indication. 1400 is
  432|       |         picked since +1300 is frequently used and +1400 is mentioned as
  433|       |         an edge number in the document "ISO C 200X Proposal: Timezone
  434|       |         Functions" at http://david.tribble.com/text/c0xtimezone.html If
  435|       |         anyone has a more authoritative source for the exact maximum time
  436|       |         zone offsets, please speak up! */
  437|      0|      found = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  438|      0|      w->tzoff = ((val / 100 * 60) + (val % 100)) * 60;
  439|       |
  440|       |      /* the + and - prefix indicates the local time compared to GMT,
  441|       |         this we need their reversed math to get what we want */
  442|      0|      w->tzoff = date[-1] == '+' ? -w->tzoff : w->tzoff;
  ------------------
  |  Branch (442:18): [True: 0, False: 0]
  ------------------
  443|      0|    }
  444|       |
  445|      4|    else if((num_digits == 8) && (w->year == -1) &&
  ------------------
  |  Branch (445:13): [True: 0, False: 4]
  |  Branch (445:34): [True: 0, False: 0]
  ------------------
  446|      0|            (w->mon == -1) && (w->mday == -1)) {
  ------------------
  |  Branch (446:13): [True: 0, False: 0]
  |  Branch (446:31): [True: 0, False: 0]
  ------------------
  447|       |      /* 8 digits, no year, month or day yet. This is YYYYMMDD */
  448|      0|      found = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  449|      0|      w->year = val / 10000;
  450|      0|      w->mon = ((val % 10000) / 100) - 1; /* month is 0 - 11 */
  451|      0|      w->mday = val % 100;
  452|      0|    }
  453|       |
  454|      4|    if(!found && (dignext == DATE_MDAY) && (w->mday == -1)) {
  ------------------
  |  Branch (454:8): [True: 4, False: 0]
  |  Branch (454:18): [True: 2, False: 2]
  |  Branch (454:44): [True: 2, False: 0]
  ------------------
  455|      2|      if((val > 0) && (val < 32)) {
  ------------------
  |  Branch (455:10): [True: 2, False: 0]
  |  Branch (455:23): [True: 2, False: 0]
  ------------------
  456|      2|        w->mday = val;
  457|      2|        found = TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
  458|      2|      }
  459|      2|      dignext = DATE_YEAR;
  460|      2|    }
  461|       |
  462|      4|    if(!found && (dignext == DATE_YEAR) && (w->year == -1)) {
  ------------------
  |  Branch (462:8): [True: 2, False: 2]
  |  Branch (462:18): [True: 2, False: 0]
  |  Branch (462:44): [True: 2, False: 0]
  ------------------
  463|      2|      w->year = val;
  464|      2|      found = TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
  465|      2|      if(w->year < 100) {
  ------------------
  |  Branch (465:10): [True: 0, False: 2]
  ------------------
  466|      0|        if(w->year > 70)
  ------------------
  |  Branch (466:12): [True: 0, False: 0]
  ------------------
  467|      0|          w->year += 1900;
  468|      0|        else
  469|      0|          w->year += 2000;
  470|      0|      }
  471|      2|      if(w->mday == -1)
  ------------------
  |  Branch (471:10): [True: 0, False: 2]
  ------------------
  472|      0|        dignext = DATE_MDAY;
  473|      2|    }
  474|       |
  475|      4|    if(!found)
  ------------------
  |  Branch (475:8): [True: 0, False: 4]
  ------------------
  476|      0|      return PARSEDATE_FAIL;
  ------------------
  |  |   95|      0|#define PARSEDATE_FAIL   (-1)
  ------------------
  477|       |
  478|      4|    date = p;
  479|      4|  }
  480|      6|  *datep = date;
  481|      6|  *dignextp = dignext;
  482|      6|  return PARSEDATE_OK;
  ------------------
  |  |   94|      6|#define PARSEDATE_OK     0
  ------------------
  483|      6|}
parsedate.c:match_time:
  313|      6|{
  314|      6|  const char *p;
  315|      6|  int hh, mm, ss = 0;
  316|      6|  hh = oneortwodigit(date, &p);
  317|      6|  if((hh < 24) && (*p == ':') && ISDIGIT(p[1])) {
  ------------------
  |  |   42|      2|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 2, False: 0]
  |  |  |  Branch (42:38): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (317:6): [True: 6, False: 0]
  |  Branch (317:19): [True: 2, False: 4]
  ------------------
  318|      2|    mm = oneortwodigit(&p[1], &p);
  319|      2|    if(mm < 60) {
  ------------------
  |  Branch (319:8): [True: 2, False: 0]
  ------------------
  320|      2|      if((*p == ':') && ISDIGIT(p[1])) {
  ------------------
  |  |   42|      2|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 2, False: 0]
  |  |  |  Branch (42:38): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (320:10): [True: 2, False: 0]
  ------------------
  321|      2|        ss = oneortwodigit(&p[1], &p);
  322|      2|        if(ss <= 60) {
  ------------------
  |  Branch (322:12): [True: 2, False: 0]
  ------------------
  323|       |          /* valid HH:MM:SS */
  324|      2|          goto match;
  325|      2|        }
  326|      2|      }
  327|      0|      else {
  328|       |        /* valid HH:MM */
  329|      0|        goto match;
  330|      0|      }
  331|      2|    }
  332|      2|  }
  333|      4|  return FALSE; /* not a time string */
  ------------------
  |  | 1048|      4|#define FALSE false
  ------------------
  334|      2|match:
  335|      2|  w->hour = hh;
  336|      2|  w->min = mm;
  337|      2|  w->sec = ss;
  338|      2|  *endp = (char *)CURL_UNCONST(p);
  ------------------
  |  |  856|      2|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  339|       |  return TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
  340|      6|}
parsedate.c:oneortwodigit:
  301|     10|{
  302|     10|  int num = date[0] - '0';
  303|     10|  if(ISDIGIT(date[1])) {
  ------------------
  |  |   42|     10|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (42:22): [True: 10, False: 0]
  |  |  |  Branch (42:38): [True: 10, False: 0]
  |  |  ------------------
  ------------------
  304|     10|    *endp = &date[2];
  305|     10|    return (num * 10) + (date[1] - '0');
  306|     10|  }
  307|      0|  *endp = &date[1];
  308|      0|  return num;
  309|     10|}
parsedate.c:datecheck:
  486|      2|{
  487|      2|  if(w->sec == -1)
  ------------------
  |  Branch (487:6): [True: 0, False: 2]
  ------------------
  488|      0|    w->sec = w->min = w->hour = 0; /* no time, make it zero */
  489|       |
  490|      2|  if((w->mday == -1) || (w->mon == -1) || (w->year == -1))
  ------------------
  |  Branch (490:6): [True: 0, False: 2]
  |  Branch (490:25): [True: 0, False: 2]
  |  Branch (490:43): [True: 0, False: 2]
  ------------------
  491|       |    /* lacks vital info, fail */
  492|      0|    return PARSEDATE_FAIL;
  ------------------
  |  |   95|      0|#define PARSEDATE_FAIL   (-1)
  ------------------
  493|       |
  494|       |  /* The Gregorian calendar was introduced 1582 */
  495|      2|  else if(w->year < 1583)
  ------------------
  |  Branch (495:11): [True: 0, False: 2]
  ------------------
  496|      0|    return PARSEDATE_FAIL;
  ------------------
  |  |   95|      0|#define PARSEDATE_FAIL   (-1)
  ------------------
  497|       |
  498|      2|  else if((w->mday > 31) || (w->mon > 11) || (w->hour > 23) ||
  ------------------
  |  Branch (498:11): [True: 0, False: 2]
  |  Branch (498:29): [True: 0, False: 2]
  |  Branch (498:46): [True: 0, False: 2]
  ------------------
  499|      2|          (w->min > 59) || (w->sec > 60))
  ------------------
  |  Branch (499:11): [True: 0, False: 2]
  |  Branch (499:28): [True: 0, False: 2]
  ------------------
  500|      0|    return PARSEDATE_FAIL; /* clearly an illegal date */
  ------------------
  |  |   95|      0|#define PARSEDATE_FAIL   (-1)
  ------------------
  501|       |
  502|      2|  return PARSEDATE_OK;
  ------------------
  |  |   94|      2|#define PARSEDATE_OK     0
  ------------------
  503|      2|}
parsedate.c:time2epoch:
  285|      2|{
  286|      2|  static const int cumulative_days[12] = {
  287|      2|    0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334
  288|      2|  };
  289|      2|  int y = w->year - (w->mon <= 1);
  290|      2|  int leap_days = (y / 4) - (y / 100) + (y / 400) - LEAP_DAYS_BEFORE_1969;
  ------------------
  |  |  278|      2|#define LEAP_DAYS_BEFORE_1969 477
  ------------------
  291|      2|  curl_off_t days = (curl_off_t)(w->year - 1970) * 365 + leap_days +
  292|      2|    cumulative_days[w->mon] + w->mday - 1;
  293|       |
  294|      2|  return (((days * 24 + w->hour) * 60 + w->min) * 60) + w->sec;
  295|      2|}
parsedate.c:tzadjust:
  506|      2|{
  507|      2|  if(w->tzoff == -1) /* unknown tz means no offset */
  ------------------
  |  Branch (507:6): [True: 0, False: 2]
  ------------------
  508|      0|    w->tzoff = 0;
  509|       |
  510|       |  /* Add the time zone diff between local time zone and GMT. */
  511|      2|  if((w->tzoff > 0) && (*tp > (curl_off_t)(CURL_OFF_T_MAX - w->tzoff)))
  ------------------
  |  |  588|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (511:6): [True: 0, False: 2]
  |  Branch (511:24): [True: 0, False: 0]
  ------------------
  512|      0|    *tp = CURL_OFF_T_MAX;
  ------------------
  |  |  588|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  513|      2|  else
  514|      2|    *tp += w->tzoff;
  515|       |  /* this needs no minimum check since we require a year > 1582 */
  516|      2|}
parsedate.c:mktimet:
  519|      2|{
  520|       |#if SIZEOF_TIME_T < 5
  521|       |  if(seconds > TIME_T_MAX) {
  522|       |    *output = TIME_T_MAX;
  523|       |    return PARSEDATE_LATER;
  524|       |  }
  525|       |  else if(seconds < TIME_T_MIN) {
  526|       |    *output = TIME_T_MIN;
  527|       |    return PARSEDATE_SOONER;
  528|       |  }
  529|       |#elif defined(HAVE_TIME_T_UNSIGNED)
  530|       |  if(seconds < 0) {
  531|       |    *output = 0;
  532|       |    return PARSEDATE_SOONER;
  533|       |  }
  534|       |#endif
  535|      2|  *output = (time_t)seconds;
  536|      2|  return PARSEDATE_OK;
  ------------------
  |  |   94|      2|#define PARSEDATE_OK     0
  ------------------
  537|      2|}

Curl_peer_link:
  295|  47.1k|{
  296|  47.1k|  if(*pdest != src) {
  ------------------
  |  Branch (296:6): [True: 39.9k, False: 7.25k]
  ------------------
  297|  39.9k|    Curl_peer_unlink(pdest);
  298|  39.9k|    *pdest = src;
  299|  39.9k|    if(src) {
  ------------------
  |  Branch (299:8): [True: 39.9k, False: 0]
  ------------------
  300|  39.9k|      DEBUGASSERT(src->refcount < UINT32_MAX);
  ------------------
  |  | 1075|  39.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (300:7): [True: 0, False: 39.9k]
  |  Branch (300:7): [True: 39.9k, False: 0]
  ------------------
  301|  39.9k|      src->refcount++;
  302|  39.9k|    }
  303|  39.9k|  }
  304|  47.1k|}
Curl_peer_unlink:
  307|   178k|{
  308|   178k|  if(*ppeer) {
  ------------------
  |  Branch (308:6): [True: 47.1k, False: 131k]
  ------------------
  309|  47.1k|    struct Curl_peer *peer = *ppeer;
  310|       |
  311|  47.1k|    DEBUGASSERT(peer->refcount);
  ------------------
  |  | 1075|  47.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (311:5): [True: 0, False: 47.1k]
  |  Branch (311:5): [True: 47.1k, False: 0]
  ------------------
  312|  47.1k|    *ppeer = NULL;
  313|  47.1k|    if(peer->refcount)
  ------------------
  |  Branch (313:8): [True: 47.1k, False: 0]
  ------------------
  314|  47.1k|      peer->refcount--;
  315|  47.1k|    if(!peer->refcount) {
  ------------------
  |  Branch (315:8): [True: 7.25k, False: 39.9k]
  ------------------
  316|  7.25k|      curlx_free(peer);
  ------------------
  |  | 1476|  7.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  317|  7.25k|    }
  318|  47.1k|  }
  319|   178k|}
Curl_peer_equal:
  322|  18.4k|{
  323|  18.4k|  return (p1 == p2) ||
  ------------------
  |  Branch (323:10): [True: 14.7k, False: 3.70k]
  ------------------
  324|  3.70k|         (p1 && p2 &&
  ------------------
  |  Branch (324:11): [True: 3.70k, False: 0]
  |  Branch (324:17): [True: 3.70k, False: 0]
  ------------------
  325|  3.70k|          (p1->scheme == p2->scheme) &&
  ------------------
  |  Branch (325:11): [True: 3.70k, False: 0]
  ------------------
  326|  3.70k|          Curl_peer_same_destination(p1, p2));
  ------------------
  |  Branch (326:11): [True: 0, False: 3.70k]
  ------------------
  327|  18.4k|}
Curl_peer_same_destination:
  342|  14.5k|{
  343|  14.5k|  return (p1 == p2) ||
  ------------------
  |  Branch (343:10): [True: 10.8k, False: 3.70k]
  ------------------
  344|  3.70k|         (p1 && p2 &&
  ------------------
  |  Branch (344:11): [True: 3.70k, False: 0]
  |  Branch (344:17): [True: 3.70k, False: 0]
  ------------------
  345|  3.70k|          (p1->port == p2->port) &&
  ------------------
  |  Branch (345:11): [True: 3.70k, False: 0]
  ------------------
  346|  3.70k|          peer_same_hostname(p1, p2) &&
  ------------------
  |  Branch (346:11): [True: 0, False: 3.70k]
  ------------------
  347|      0|          (p1->scopeid == p2->scopeid) &&
  ------------------
  |  Branch (347:11): [True: 0, False: 0]
  ------------------
  348|      0|          (p1->scopeid || curl_strequal(p1->zoneid, p2->zoneid)));
  ------------------
  |  Branch (348:12): [True: 0, False: 0]
  |  Branch (348:27): [True: 0, False: 0]
  ------------------
  349|  14.5k|}
Curl_peer_from_url:
  355|  3.62k|{
  356|  3.62k|  struct peer_parse pp;
  357|  3.62k|  char *zoneid = NULL, *scheme = NULL, *hostname = NULL;
  358|  3.62k|  CURLUcode uc;
  359|  3.62k|  CURLcode result;
  360|       |
  361|  3.62k|  Curl_peer_unlink(ppeer);
  362|  3.62k|  memset(&pp, 0, sizeof(pp));
  363|       |
  364|  3.62k|  uc = curl_url_get(uh, CURLUPART_SCHEME, &scheme, 0);
  365|  3.62k|  if(uc)
  ------------------
  |  Branch (365:6): [True: 0, False: 3.62k]
  ------------------
  366|      0|    return Curl_uc_to_curlcode(uc);
  367|  3.62k|  pp.scheme = Curl_get_scheme(scheme);
  368|  3.62k|  if(!pp.scheme) {
  ------------------
  |  Branch (368:6): [True: 0, False: 3.62k]
  ------------------
  369|      0|    failf(data, "Protocol \"%s\" not supported%s", scheme,
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  370|      0|          data->state.this_is_a_follow ? " (in redirect)" : "");
  ------------------
  |  Branch (370:11): [True: 0, False: 0]
  ------------------
  371|      0|    result = CURLE_UNSUPPORTED_PROTOCOL;
  372|      0|    goto out;
  373|      0|  }
  374|       |
  375|  3.62k|  uc = curl_url_get(uh, CURLUPART_HOST, &hostname, 0);
  376|  3.62k|  if(uc) {
  ------------------
  |  Branch (376:6): [True: 0, False: 3.62k]
  ------------------
  377|      0|    if((uc == CURLUE_NO_HOST) && (pp.scheme->flags & PROTOPT_NONETWORK))
  ------------------
  |  |  214|      0|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (377:8): [True: 0, False: 0]
  |  Branch (377:34): [True: 0, False: 0]
  ------------------
  378|      0|      ; /* acceptable */
  379|      0|    else {
  380|      0|      result = CURLE_OUT_OF_MEMORY;
  381|      0|      goto out;
  382|      0|    }
  383|      0|  }
  384|  3.62k|  else if(strlen(hostname) > MAX_URL_LEN) {
  ------------------
  |  |   29|  3.62k|#define MAX_URL_LEN 0xffff
  ------------------
  |  Branch (384:11): [True: 0, False: 3.62k]
  ------------------
  385|      0|    failf(data, "Too long hostname (maximum is %d)", MAX_URL_LEN);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
                  failf(data, "Too long hostname (maximum is %d)", MAX_URL_LEN);
  ------------------
  |  |   29|      0|#define MAX_URL_LEN 0xffff
  ------------------
  386|      0|    result = CURLE_URL_MALFORMAT;
  387|      0|    goto out;
  388|      0|  }
  389|       |
  390|  3.62k|  pp.host_user.str = hostname ? hostname : "";
  ------------------
  |  Branch (390:22): [True: 3.62k, False: 0]
  ------------------
  391|  3.62k|  pp.host_user.len = strlen(pp.host_user.str);
  392|  3.62k|  if(pp.host_user.len) {
  ------------------
  |  Branch (392:6): [True: 3.62k, False: 0]
  ------------------
  393|  3.62k|    result = peer_parse_host(data, &pp, FALSE);
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  394|  3.62k|    if(result)
  ------------------
  |  Branch (394:8): [True: 0, False: 3.62k]
  ------------------
  395|      0|      goto out;
  396|  3.62k|  }
  397|      0|  else
  398|      0|    pp.host = pp.host_user;
  399|       |
  400|  3.62k|  if(port_override) {
  ------------------
  |  Branch (400:6): [True: 0, False: 3.62k]
  ------------------
  401|       |    /* if set, we use this instead of the port possibly given in the URL */
  402|      0|    char portbuf[16];
  403|      0|    curl_msnprintf(portbuf, sizeof(portbuf), "%d", port_override);
  404|      0|    uc = curl_url_set(uh, CURLUPART_PORT, portbuf, 0);
  405|      0|    if(uc) {
  ------------------
  |  Branch (405:8): [True: 0, False: 0]
  ------------------
  406|      0|      result = CURLE_OUT_OF_MEMORY;
  407|      0|      goto out;
  408|      0|    }
  409|      0|    else
  410|      0|      pp.port = port_override;
  411|      0|  }
  412|  3.62k|  else {
  413|  3.62k|    uc = Curl_url_get_port(uh, &pp.port);
  414|  3.62k|    if(uc) {
  ------------------
  |  Branch (414:8): [True: 0, False: 3.62k]
  ------------------
  415|      0|      if(uc == CURLUE_OUT_OF_MEMORY) {
  ------------------
  |  Branch (415:10): [True: 0, False: 0]
  ------------------
  416|      0|        result = CURLE_OUT_OF_MEMORY;
  417|      0|        goto out;
  418|      0|      }
  419|      0|      else if(!(pp.scheme->flags & PROTOPT_NONETWORK)) {
  ------------------
  |  |  214|      0|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (419:15): [True: 0, False: 0]
  ------------------
  420|      0|        result = CURLE_URL_MALFORMAT;
  421|      0|        goto out;
  422|      0|      }
  423|       |      /* no port ok when not a network scheme */
  424|      0|    }
  425|  3.62k|  }
  426|       |
  427|  3.62k|  if(scopeid_override)
  ------------------
  |  Branch (427:6): [True: 0, False: 3.62k]
  ------------------
  428|       |    /* Override any scope id from an URL zone. */
  429|      0|    pp.scopeid = scopeid_override;
  430|  3.62k|  else {
  431|  3.62k|    if(curl_url_get(uh, CURLUPART_ZONEID, &zoneid, 0) ==
  ------------------
  |  Branch (431:8): [True: 0, False: 3.62k]
  ------------------
  432|  3.62k|       CURLUE_OUT_OF_MEMORY) {
  433|      0|      result = CURLE_OUT_OF_MEMORY;
  434|      0|      goto out;
  435|      0|    }
  436|  3.62k|    if(zoneid) {
  ------------------
  |  Branch (436:8): [True: 0, False: 3.62k]
  ------------------
  437|      0|      pp.zoneid.str = zoneid;
  438|      0|      pp.zoneid.len = strlen(zoneid);
  439|      0|    }
  440|  3.62k|  }
  441|       |
  442|  3.62k|  result = peer_create(&pp, ppeer);
  443|  3.62k|  if(result)
  ------------------
  |  Branch (443:6): [True: 0, False: 3.62k]
  ------------------
  444|      0|    failf(data, "Error %d creating peer for %s:%u",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  445|      0|          (int)result, pp.host_user.str, pp.port);
  446|       |
  447|  3.62k|out:
  448|  3.62k|  peer_parse_clear(&pp);
  449|  3.62k|  curlx_free(scheme);
  ------------------
  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  450|  3.62k|  curlx_free(hostname);
  ------------------
  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  451|  3.62k|  curlx_free(zoneid);
  ------------------
  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  452|  3.62k|  return result;
  453|  3.62k|}
Curl_peer_from_connect_to:
  461|  3.62k|{
  462|  3.62k|  struct peer_parse pp;
  463|  3.62k|  const char *portstr = NULL;
  464|  3.62k|  CURLcode result;
  465|       |
  466|  3.62k|  Curl_peer_unlink(ppeer);
  467|  3.62k|  memset(&pp, 0, sizeof(pp));
  468|  3.62k|  if(!connect_to || !*connect_to)
  ------------------
  |  Branch (468:6): [True: 0, False: 3.62k]
  |  Branch (468:21): [True: 0, False: 3.62k]
  ------------------
  469|      0|    return CURLE_FAILED_INIT;
  470|       |
  471|  3.62k|  pp.scheme = dest->scheme;
  472|       |
  473|       |  /* detect and extract RFC6874-style IPv6-addresses */
  474|  3.62k|  if(connect_to[0] == '[') {
  ------------------
  |  Branch (474:6): [True: 0, False: 3.62k]
  ------------------
  475|      0|    const char *s = strchr(connect_to + 1, ']');
  476|      0|    if(!s) {
  ------------------
  |  Branch (476:8): [True: 0, False: 0]
  ------------------
  477|      0|      failf(data, "Invalid IPv6 address format in '%s'", connect_to);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  478|      0|      result = CURLE_SETOPT_OPTION_SYNTAX;
  479|      0|      goto out;
  480|      0|    }
  481|      0|    portstr = strchr(s, ':');
  482|      0|    pp.host_user.str = connect_to;
  483|      0|    pp.host_user.len = s - pp.host_user.str + 1;
  484|      0|    pp.ipv6 = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  485|      0|  }
  486|  3.62k|  else {
  487|  3.62k|    portstr = strchr(connect_to, ':');
  488|  3.62k|    pp.host_user.str = connect_to;
  489|  3.62k|    pp.host_user.len = portstr ?
  ------------------
  |  Branch (489:24): [True: 3.62k, False: 0]
  ------------------
  490|  3.62k|      (size_t)(portstr - connect_to) : strlen(connect_to);
  491|  3.62k|  }
  492|       |
  493|  3.62k|  if(!pp.host_user.len) { /* no hostname found, only port switch */
  ------------------
  |  Branch (493:6): [True: 0, False: 3.62k]
  ------------------
  494|      0|    pp.host_user.str = dest->user_hostname;
  495|      0|    pp.host_user.len = strlen(dest->user_hostname);
  496|      0|  }
  497|       |
  498|  3.62k|  result = peer_parse_host(data, &pp, FALSE);
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  499|  3.62k|  if(result)
  ------------------
  |  Branch (499:6): [True: 0, False: 3.62k]
  ------------------
  500|      0|    goto out;
  501|       |
  502|  3.62k|  if(portstr && portstr[1]) {
  ------------------
  |  Branch (502:6): [True: 3.62k, False: 0]
  |  Branch (502:17): [True: 0, False: 3.62k]
  ------------------
  503|      0|    const char *p = portstr + 1;
  504|      0|    curl_off_t portparse;
  505|      0|    if(curlx_str_number(&p, &portparse, 0xffff)) {
  ------------------
  |  Branch (505:8): [True: 0, False: 0]
  ------------------
  506|      0|      failf(data, "No valid port number in '%s'", connect_to);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  507|      0|      result = CURLE_SETOPT_OPTION_SYNTAX;
  508|      0|      goto out;
  509|      0|    }
  510|      0|    pp.port = (uint16_t)portparse; /* we know it will fit */
  511|      0|  }
  512|  3.62k|  else
  513|  3.62k|    pp.port = dest->port;
  514|       |
  515|       |#ifndef USE_IPV6
  516|       |  if(pp.ipv6) {
  517|       |    failf(data, "Use of IPv6 in *_CONNECT_TO without IPv6 support built-in");
  518|       |    result = CURLE_NOT_BUILT_IN;
  519|       |    goto out;
  520|       |  }
  521|       |#endif
  522|       |
  523|  3.62k|  result = peer_create(&pp, ppeer);
  524|  3.62k|  CURL_TRC_M(data, "connect-to peer_create2 -> %d", (int)result);
  ------------------
  |  |  148|  3.62k|  do {                                   \
  |  |  149|  3.62k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  3.62k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.62k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.62k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  3.62k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  525|       |
  526|  3.62k|out:
  527|  3.62k|  CURL_TRC_M(data, "parse connect_to peer: %s -> %d", connect_to, (int)result);
  ------------------
  |  |  148|  3.62k|  do {                                   \
  |  |  149|  3.62k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  3.62k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.62k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.62k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  3.62k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  528|  3.62k|  peer_parse_clear(&pp);
  529|  3.62k|  return result;
  530|  3.62k|}
peer.c:peer_parse_host:
  186|  7.25k|{
  187|  7.25k|  if(!pp || !pp->host_user.str || !pp->host_user.len)
  ------------------
  |  Branch (187:6): [True: 0, False: 7.25k]
  |  Branch (187:13): [True: 0, False: 7.25k]
  |  Branch (187:35): [True: 0, False: 7.25k]
  ------------------
  188|      0|    return CURLE_FAILED_INIT;
  189|       |
  190|  7.25k|  if(pp->host_user.str[0] == '[') {
  ------------------
  |  Branch (190:6): [True: 0, False: 7.25k]
  ------------------
  191|      0|    const char *s = pp->host_user.str + 1;
  192|      0|    struct Curl_str tmp;
  193|      0|    if(curlx_str_until(&s, &tmp, pp->host_user.len - 1, ']'))
  ------------------
  |  Branch (193:8): [True: 0, False: 0]
  ------------------
  194|      0|      return CURLE_URL_MALFORMAT;
  195|       |
  196|      0|    if(!Curl_looks_like_ipv6(tmp.str, tmp.len, TRUE,
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  |  Branch (196:8): [True: 0, False: 0]
  ------------------
  197|      0|                             &pp->host, &pp->zoneid)) {
  198|      0|      failf(data, "Invalid IPv6 address format in '%.*s'",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  199|      0|            (int)pp->host_user.len, pp->host_user.str);
  200|      0|      return CURLE_URL_MALFORMAT;
  201|      0|    }
  202|      0|    pp->ipv6 = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  203|      0|  }
  204|  7.25k|  else {
  205|  7.25k|#ifdef USE_IDN
  206|  7.25k|    if(!Curl_is_ASCII_str(&pp->host_user)) {
  ------------------
  |  Branch (206:8): [True: 0, False: 7.25k]
  ------------------
  207|      0|      CURLcode result;
  208|      0|      if(!pp->tmp_host_user) {
  ------------------
  |  Branch (208:10): [True: 0, False: 0]
  ------------------
  209|       |        /* need a null-terminated string for IDN */
  210|      0|        pp->tmp_host_user = curlx_memdup0(pp->host_user.str,
  211|      0|                                          pp->host_user.len);
  212|      0|        if(!pp->tmp_host_user)
  ------------------
  |  Branch (212:12): [True: 0, False: 0]
  ------------------
  213|      0|          return CURLE_OUT_OF_MEMORY;
  214|      0|      }
  215|      0|      result = Curl_idn_decode(pp->tmp_host_user, &pp->tmp_host);
  216|      0|      if(result)
  ------------------
  |  Branch (216:10): [True: 0, False: 0]
  ------------------
  217|      0|        return result;
  218|      0|      pp->host.str = pp->tmp_host;
  219|      0|      pp->host.len = strlen(pp->host.str);
  220|      0|    }
  221|  7.25k|    else
  222|  7.25k|#endif
  223|  7.25k|    if(scan_for_ipv6 &&
  ------------------
  |  Branch (223:8): [True: 0, False: 7.25k]
  ------------------
  224|      0|       Curl_looks_like_ipv6(pp->host_user.str, pp->host_user.len, TRUE,
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  |  Branch (224:8): [True: 0, False: 0]
  ------------------
  225|      0|                            &pp->host, &pp->zoneid)) {
  226|      0|      if(pp->host_user.len < MAX_IPADR_LEN) {
  ------------------
  |  |   41|      0|#define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")
  ------------------
  |  Branch (226:10): [True: 0, False: 0]
  ------------------
  227|      0|        char tmp[MAX_IPADR_LEN];
  228|      0|        memcpy(tmp, pp->host_user.str, pp->host_user.len);
  229|      0|        tmp[pp->host_user.len] = 0;
  230|      0|        pp->ipv6 = !Curl_is_ipv4addr(tmp);
  231|      0|      }
  232|      0|      else
  233|      0|        pp->ipv6 = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  234|      0|    }
  235|  7.25k|    else
  236|  7.25k|      pp->host = pp->host_user;
  237|  7.25k|  }
  238|  7.25k|  return CURLE_OK;
  239|  7.25k|}
peer.c:peer_create:
  105|  7.25k|{
  106|  7.25k|  struct Curl_peer *peer = NULL;
  107|  7.25k|  CURLcode result = CURLE_OK;
  108|  7.25k|  size_t zone_alen = 0, host_alen = 0;
  109|       |
  110|  7.25k|  if(!pp || !pp->scheme)
  ------------------
  |  Branch (110:6): [True: 0, False: 7.25k]
  |  Branch (110:13): [True: 0, False: 7.25k]
  ------------------
  111|      0|    return CURLE_FAILED_INIT;
  112|  7.25k|  if(!pp->host.len && !(pp->scheme->flags & PROTOPT_NONETWORK))
  ------------------
  |  |  214|      0|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (112:6): [True: 0, False: 7.25k]
  |  Branch (112:23): [True: 0, False: 0]
  ------------------
  113|      0|    return CURLE_FAILED_INIT;
  114|       |
  115|  7.25k|  if((pp->host.str != pp->host_user.str) ||
  ------------------
  |  Branch (115:6): [True: 0, False: 7.25k]
  ------------------
  116|  7.25k|     (pp->host.len != pp->host_user.len)) {
  ------------------
  |  Branch (116:6): [True: 0, False: 7.25k]
  ------------------
  117|      0|    host_alen = pp->host.len + 1;
  118|      0|  }
  119|  7.25k|  zone_alen = pp->zoneid.len ? (pp->zoneid.len + 1) : 0;
  ------------------
  |  Branch (119:15): [True: 0, False: 7.25k]
  ------------------
  120|       |
  121|       |  /* null-terminator already part of struct */
  122|  7.25k|  peer = curlx_calloc(1, sizeof(*peer) +
  ------------------
  |  | 1473|  7.25k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  123|  7.25k|                         pp->host_user.len + host_alen + zone_alen);
  124|  7.25k|  if(!peer) {
  ------------------
  |  Branch (124:6): [True: 0, False: 7.25k]
  ------------------
  125|      0|    result = CURLE_OUT_OF_MEMORY;
  126|      0|    goto out;
  127|      0|  }
  128|       |
  129|  7.25k|  peer->refcount = 1;
  130|  7.25k|  peer->scheme = pp->scheme;
  131|  7.25k|  peer->hostname = peer->user_hostname;
  132|  7.25k|  peer->port = pp->port;
  133|  7.25k|  peer->scopeid = pp->scopeid;
  134|  7.25k|  peer->ipv6 = pp->ipv6;
  135|  7.25k|  peer->unix_socket = pp->unix_socket;
  136|  7.25k|  peer->abstract_uds = pp->abstract_uds;
  137|       |
  138|  7.25k|  if(pp->host_user.len)
  ------------------
  |  Branch (138:6): [True: 7.25k, False: 0]
  ------------------
  139|  7.25k|    memcpy(peer->user_hostname, pp->host_user.str, pp->host_user.len);
  140|       |
  141|  7.25k|  if(host_alen) {
  ------------------
  |  Branch (141:6): [True: 0, False: 7.25k]
  ------------------
  142|      0|    peer->hostname = peer->user_hostname + pp->host_user.len + 1;
  143|      0|    memcpy(peer->hostname, pp->host.str, pp->host.len);
  144|      0|  }
  145|       |
  146|  7.25k|  if(zone_alen) {
  ------------------
  |  Branch (146:6): [True: 0, False: 7.25k]
  ------------------
  147|      0|    peer->zoneid = peer->user_hostname + pp->host_user.len + 1 + host_alen;
  148|      0|    memcpy(peer->zoneid, pp->zoneid.str, pp->zoneid.len);
  149|      0|#ifdef USE_IPV6
  150|       |    /* Determine scope_id if not already provided */
  151|      0|    if(!peer->scopeid) {
  ------------------
  |  Branch (151:8): [True: 0, False: 0]
  ------------------
  152|      0|      const char *p = peer->zoneid;
  153|      0|      curl_off_t scope;
  154|      0|      if(!curlx_str_number(&p, &scope, UINT_MAX)) {
  ------------------
  |  Branch (154:10): [True: 0, False: 0]
  ------------------
  155|       |        /* A plain number, use it directly as a scope id. */
  156|      0|        peer->scopeid = (uint32_t)scope;
  157|      0|      }
  158|      0|#ifdef HAVE_IF_NAMETOINDEX
  159|      0|      else {
  160|       |        /* Zone identifier is not numeric */
  161|      0|        unsigned int idx = 0;
  162|      0|        idx = if_nametoindex(peer->zoneid);
  163|      0|        if(idx) {
  ------------------
  |  Branch (163:12): [True: 0, False: 0]
  ------------------
  164|      0|          peer->scopeid = (uint32_t)idx;
  165|      0|        }
  166|      0|        else {
  167|       |          /* Do we want to return an error here? */
  168|      0|        }
  169|      0|      }
  170|      0|#endif /* HAVE_IF_NAMETOINDEX */
  171|      0|    }
  172|      0|#endif /* USE_IPV6 */
  173|      0|  }
  174|       |
  175|  7.25k|out:
  176|  7.25k|  if(!result)
  ------------------
  |  Branch (176:6): [True: 7.25k, False: 0]
  ------------------
  177|  7.25k|    *ppeer = peer;
  178|      0|  else
  179|      0|    Curl_peer_unlink(&peer);
  180|  7.25k|  return result;
  181|  7.25k|}
peer.c:peer_parse_clear:
   96|  7.25k|{
   97|  7.25k|  curlx_free(pp->tmp_host_user);
  ------------------
  |  | 1476|  7.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   98|  7.25k|  curlx_free(pp->tmp_host);
  ------------------
  |  | 1476|  7.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   99|  7.25k|  curlx_free(pp->tmp_zoneid);
  ------------------
  |  | 1476|  7.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  100|  7.25k|  memset(pp, 0, sizeof(*pp));
  101|  7.25k|}
peer.c:peer_same_hostname:
  330|  3.70k|{
  331|       |  /* UNIX domain socket paths must be compared case-sensitive,
  332|       |   * as many filesystem are like that. */
  333|  3.70k|  return (p1->unix_socket == p2->unix_socket) &&
  ------------------
  |  Branch (333:10): [True: 3.70k, False: 0]
  ------------------
  334|  3.70k|         (p1->abstract_uds == p2->abstract_uds) &&
  ------------------
  |  Branch (334:10): [True: 3.70k, False: 0]
  ------------------
  335|  3.70k|         (p1->ipv6 == p2->ipv6) &&
  ------------------
  |  Branch (335:10): [True: 3.70k, False: 0]
  ------------------
  336|  3.70k|         (p1->unix_socket ?
  ------------------
  |  Branch (336:10): [True: 0, False: 3.70k]
  |  Branch (336:11): [True: 0, False: 3.70k]
  ------------------
  337|      0|          !strcmp(p1->hostname, p2->hostname) :
  338|  3.70k|          curl_strequal(p1->hostname, p2->hostname));
  339|  3.70k|}

pgrs_speedcheck:
  134|  6.64k|{
  135|  6.64k|  if(!data->set.low_speed_time || !data->set.low_speed_limit ||
  ------------------
  |  Branch (135:6): [True: 6.64k, False: 0]
  |  Branch (135:35): [True: 0, False: 0]
  ------------------
  136|      0|     Curl_xfer_recv_is_paused(data) || Curl_xfer_send_is_paused(data))
  ------------------
  |  Branch (136:6): [True: 0, False: 0]
  |  Branch (136:40): [True: 0, False: 0]
  ------------------
  137|       |    /* A paused transfer is not qualified for speed checks */
  138|  6.64k|    return CURLE_OK;
  139|       |
  140|      0|  if(data->progress.current_speed >= 0) {
  ------------------
  |  Branch (140:6): [True: 0, False: 0]
  ------------------
  141|      0|    if(data->progress.current_speed < data->set.low_speed_limit) {
  ------------------
  |  Branch (141:8): [True: 0, False: 0]
  ------------------
  142|      0|      if(!data->state.keeps_speed.tv_sec)
  ------------------
  |  Branch (142:10): [True: 0, False: 0]
  ------------------
  143|       |        /* under the limit at this moment */
  144|      0|        data->state.keeps_speed = *pnow;
  145|      0|      else {
  146|       |        /* how long has it been under the limit */
  147|      0|        timediff_t howlong =
  148|      0|          curlx_ptimediff_ms(pnow, &data->state.keeps_speed);
  149|       |
  150|      0|        if(howlong >= data->set.low_speed_time * 1000) {
  ------------------
  |  Branch (150:12): [True: 0, False: 0]
  ------------------
  151|       |          /* too long */
  152|      0|          failf(data, "Operation too slow. Less than %" FMT_OFF_T
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  153|      0|                " bytes/sec transferred the last %u seconds",
  154|      0|                data->set.low_speed_limit, data->set.low_speed_time);
  155|      0|          return CURLE_OPERATION_TIMEDOUT;
  156|      0|        }
  157|      0|      }
  158|      0|    }
  159|      0|    else
  160|       |      /* faster right now */
  161|      0|      data->state.keeps_speed.tv_sec = 0;
  162|      0|  }
  163|       |
  164|       |  /* since low speed limit is enabled, set the expire timer to make this
  165|       |     connection's speed get checked again in a second */
  166|      0|  Curl_expire(data, 1000, EXPIRE_SPEEDCHECK);
  167|       |
  168|      0|  return CURLE_OK;
  169|      0|}
Curl_pgrs_now:
  172|   218k|{
  173|   218k|  curlx_pnow(&data->progress.now);
  174|   218k|  return &data->progress.now;
  175|   218k|}
Curl_pgrsDone:
  189|  3.62k|{
  190|  3.62k|  int rc;
  191|  3.62k|  data->progress.delta.lastshow_us = -1;
  192|  3.62k|  rc = Curl_pgrsUpdate(data); /* the final (forced) update */
  193|  3.62k|  if(rc)
  ------------------
  |  Branch (193:6): [True: 0, False: 3.62k]
  ------------------
  194|      0|    return rc;
  195|       |
  196|  3.62k|  if(!data->progress.hide && !data->progress.callback)
  ------------------
  |  Branch (196:6): [True: 0, False: 3.62k]
  |  Branch (196:30): [True: 0, False: 0]
  ------------------
  197|       |    /* only output if we do not use a progress callback and we are not
  198|       |     * hidden */
  199|      0|    curl_mfprintf(data->set.err, "\n");
  200|       |
  201|  3.62k|  return 0;
  202|  3.62k|}
Curl_pgrsReset:
  205|  3.62k|{
  206|  3.62k|  Curl_pgrsSetUploadCounter(data, 0);
  207|  3.62k|  data->progress.dl.cur_size = 0;
  208|  3.62k|  Curl_pgrsSetUploadSize(data, -1);
  209|  3.62k|  Curl_pgrsSetDownloadSize(data, -1);
  210|  3.62k|  data->progress.speeder_c = 0; /* reset speed records */
  211|  3.62k|  data->progress.deliver = 0;
  212|  3.62k|  pgrs_speedinit(data);
  213|  3.62k|}
Curl_pgrsResetTransferSizes:
  217|  3.66k|{
  218|  3.66k|  Curl_pgrsSetDownloadSize(data, -1);
  219|  3.66k|  Curl_pgrsSetUploadSize(data, -1);
  220|  3.66k|}
Curl_pgrsTimeWas:
  266|  29.4k|{
  267|  29.4k|  timediff_t *delta = NULL;
  268|       |
  269|  29.4k|  switch(timer) {
  270|      0|  default:
  ------------------
  |  Branch (270:3): [True: 0, False: 29.4k]
  ------------------
  271|      0|  case TIMER_NONE:
  ------------------
  |  Branch (271:3): [True: 0, False: 29.4k]
  ------------------
  272|       |    /* mistake filter */
  273|      0|    break;
  274|  3.66k|  case TIMER_STARTOP:
  ------------------
  |  Branch (274:3): [True: 3.66k, False: 25.7k]
  ------------------
  275|       |    /* This is set at the start of a transfer */
  276|  3.66k|    data->progress.delta.startop_us =
  277|  3.66k|      curlx_ptimediff_us(&timestamp, &data->progress.start);
  278|  3.66k|    data->progress.delta.startqueue_us = data->progress.delta.startop_us;
  279|  3.66k|    break;
  280|  3.66k|  case TIMER_STARTSINGLE:
  ------------------
  |  Branch (280:3): [True: 3.66k, False: 25.7k]
  ------------------
  281|       |    /* This is set at the start of each single transfer */
  282|  3.66k|    data->progress.delta.startsingle_us =
  283|  3.66k|      curlx_ptimediff_us(&timestamp, &data->progress.start);
  284|  3.66k|    data->progress.startransfer_added = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  285|  3.66k|    break;
  286|  3.62k|  case TIMER_POSTQUEUE:
  ------------------
  |  Branch (286:3): [True: 3.62k, False: 25.7k]
  ------------------
  287|       |    /* Queue time is accumulative from all involved redirects */
  288|  3.62k|    data->progress.total.queued_us +=
  289|  3.62k|      curlx_ptimediff_us(&timestamp, &data->progress.start) -
  290|  3.62k|      data->progress.delta.startqueue_us;
  291|  3.62k|    break;
  292|  3.62k|  case TIMER_NAMELOOKUP:
  ------------------
  |  Branch (292:3): [True: 3.62k, False: 25.7k]
  ------------------
  293|  3.62k|    delta = &data->progress.total.nslookup_us;
  294|  3.62k|    break;
  295|  3.62k|  case TIMER_CONNECT:
  ------------------
  |  Branch (295:3): [True: 3.62k, False: 25.7k]
  ------------------
  296|  3.62k|    delta = &data->progress.total.connect_us;
  297|  3.62k|    break;
  298|  3.62k|  case TIMER_APPCONNECT:
  ------------------
  |  Branch (298:3): [True: 3.62k, False: 25.7k]
  ------------------
  299|  3.62k|    delta = &data->progress.total.appconnect_us;
  300|  3.62k|    break;
  301|  3.71k|  case TIMER_PRETRANSFER:
  ------------------
  |  Branch (301:3): [True: 3.71k, False: 25.7k]
  ------------------
  302|  3.71k|    delta = &data->progress.total.pretransfer_us;
  303|  3.71k|    break;
  304|    184|  case TIMER_STARTTRANSFER:
  ------------------
  |  Branch (304:3): [True: 184, False: 29.2k]
  ------------------
  305|       |    /* prevent updating t_starttransfer unless:
  306|       |     *   1. this is the first time we are setting t_starttransfer
  307|       |     *   2. a redirect has occurred since the last time t_starttransfer was set
  308|       |     * This prevents repeated invocations of the function from incorrectly
  309|       |     * changing the t_starttransfer time.
  310|       |     */
  311|    184|    if(data->progress.startransfer_added) {
  ------------------
  |  Branch (311:8): [True: 0, False: 184]
  ------------------
  312|      0|      CURL_TRC_M(data, "[%s] ignored", pgrs_timer_name(timer));
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  313|      0|      return;
  314|      0|    }
  315|    184|    data->progress.startransfer_added = TRUE;
  ------------------
  |  | 1045|    184|#define TRUE true
  ------------------
  316|    184|    delta = &data->progress.total.starttransfer_us;
  317|    184|    break;
  318|  3.67k|  case TIMER_POSTRANSFER:
  ------------------
  |  Branch (318:3): [True: 3.67k, False: 25.7k]
  ------------------
  319|  3.67k|    delta = &data->progress.total.posttransfer_us;
  320|  3.67k|    break;
  321|      0|  case TIMER_REDIRECT:
  ------------------
  |  Branch (321:3): [True: 0, False: 29.4k]
  ------------------
  322|      0|    data->progress.delta.startredirect_us =
  323|      0|      curlx_ptimediff_us(&timestamp, &data->progress.start);
  324|       |    /* transfer starts queueing again */
  325|      0|    data->progress.delta.startqueue_us =
  326|      0|      data->progress.delta.startredirect_us;
  327|      0|    break;
  328|  29.4k|  }
  329|  29.4k|  if(delta) {
  ------------------
  |  Branch (329:6): [True: 18.4k, False: 10.9k]
  ------------------
  330|  18.4k|    timediff_t us = curlx_ptimediff_us(&timestamp, &data->progress.start) -
  331|  18.4k|                    data->progress.delta.startsingle_us;
  332|  18.4k|    if(us < 1)
  ------------------
  |  Branch (332:8): [True: 0, False: 18.4k]
  ------------------
  333|      0|      us = 1; /* make sure at least one microsecond passed */
  334|  18.4k|    *delta += us;
  335|  18.4k|    CURL_TRC_M(data, "[%s] added %" FMT_TIMEDIFF_T "us",
  ------------------
  |  |  148|  18.4k|  do {                                   \
  |  |  149|  18.4k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  18.4k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  18.4k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  36.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 18.4k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 18.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  36.9k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  18.4k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  18.4k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  18.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 18.4k]
  |  |  ------------------
  ------------------
  336|  18.4k|               pgrs_timer_name(timer), us);
  337|  18.4k|  }
  338|  10.9k|  else
  339|  10.9k|    CURL_TRC_M(data, "[%s] set", pgrs_timer_name(timer));
  ------------------
  |  |  148|  10.9k|  do {                                   \
  |  |  149|  10.9k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  10.9k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  10.9k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  21.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 10.9k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 10.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  21.9k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  10.9k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  10.9k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  10.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 10.9k]
  |  |  ------------------
  ------------------
  340|  29.4k|}
Curl_pgrsTime:
  349|  22.1k|{
  350|  22.1k|  Curl_pgrsTimeWas(data, timer, *Curl_pgrs_now(data));
  351|  22.1k|}
Curl_pgrsStart:
  354|  3.66k|{
  355|  3.66k|  struct Progress *p = &data->progress;
  356|       |
  357|  3.66k|  if(!pnow)
  ------------------
  |  Branch (357:6): [True: 3.66k, False: 0]
  ------------------
  358|  3.66k|    pnow = Curl_pgrs_now(data);
  359|  3.66k|  p->speeder_c = 0; /* reset the progress meter display */
  360|  3.66k|  p->start = *pnow;
  361|  3.66k|  memset(&p->delta, 0, sizeof(p->delta));
  362|  3.66k|  memset(&p->total, 0, sizeof(p->total));
  363|  3.66k|  p->startransfer_added = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  364|  3.66k|  p->dl.cur_size = 0;
  365|  3.66k|  p->ul.cur_size = 0;
  366|       |  /* the sizes are unknown at start */
  367|  3.66k|  p->dl_size_known = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  368|       |  p->ul_size_known = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  369|  3.66k|}
Curl_pgrs_deliver_check:
  374|     23|{
  375|     23|  if(data->set.max_filesize &&
  ------------------
  |  Branch (375:6): [True: 0, False: 23]
  ------------------
  376|      0|     ((curl_off_t)delta > data->set.max_filesize - data->progress.deliver)) {
  ------------------
  |  Branch (376:6): [True: 0, False: 0]
  ------------------
  377|      0|    failf(data, "Would have exceeded max file size");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  378|      0|    return CURLE_FILESIZE_EXCEEDED;
  379|      0|  }
  380|     23|  return CURLE_OK;
  381|     23|}
Curl_pgrs_deliver_inc:
  386|     23|{
  387|     23|  data->progress.deliver += delta;
  388|     23|}
Curl_pgrs_download_inc:
  391|     23|{
  392|     23|  if(delta) {
  ------------------
  |  Branch (392:6): [True: 23, False: 0]
  ------------------
  393|     23|    data->progress.dl.cur_size += delta;
  394|       |    Curl_rlimit_drain(&data->progress.dl.rlimit, delta, NULL);
  395|     23|  }
  396|     23|}
Curl_pgrs_upload_inc:
  399|    560|{
  400|    560|  if(delta) {
  ------------------
  |  Branch (400:6): [True: 560, False: 0]
  ------------------
  401|    560|    data->progress.ul.cur_size += delta;
  402|       |    Curl_rlimit_drain(&data->progress.ul.rlimit, delta, NULL);
  403|    560|  }
  404|    560|}
Curl_pgrsSetUploadCounter:
  410|  3.62k|{
  411|  3.62k|  data->progress.ul.cur_size = size;
  412|  3.62k|}
Curl_pgrsSetDownloadSize:
  415|  7.33k|{
  416|  7.33k|  if(size >= 0) {
  ------------------
  |  Branch (416:6): [True: 36, False: 7.29k]
  ------------------
  417|     36|    data->progress.dl.total_size = size;
  418|     36|    data->progress.dl_size_known = TRUE;
  ------------------
  |  | 1045|     36|#define TRUE true
  ------------------
  419|     36|  }
  420|  7.29k|  else {
  421|  7.29k|    data->progress.dl.total_size = 0;
  422|       |    data->progress.dl_size_known = FALSE;
  ------------------
  |  | 1048|  7.29k|#define FALSE false
  ------------------
  423|  7.29k|  }
  424|  7.33k|}
Curl_pgrsSetUploadSize:
  427|  10.8k|{
  428|  10.8k|  if(size >= 0) {
  ------------------
  |  Branch (428:6): [True: 3.49k, False: 7.40k]
  ------------------
  429|  3.49k|    data->progress.ul.total_size = size;
  430|  3.49k|    data->progress.ul_size_known = TRUE;
  ------------------
  |  | 1045|  3.49k|#define TRUE true
  ------------------
  431|  3.49k|  }
  432|  7.40k|  else {
  433|  7.40k|    data->progress.ul.total_size = 0;
  434|       |    data->progress.ul_size_known = FALSE;
  ------------------
  |  | 1048|  7.40k|#define FALSE false
  ------------------
  435|  7.40k|  }
  436|  10.8k|}
Curl_pgrsUpdate:
  714|  10.2k|{
  715|  10.2k|  return pgrs_update(data, Curl_pgrs_now(data));
  716|  10.2k|}
Curl_pgrsUpdateX:
  720|  21.1k|{
  721|  21.1k|  return pgrs_update(data, pnow);
  722|  21.1k|}
Curl_pgrsCheck:
  725|  6.64k|{
  726|  6.64k|  CURLcode result;
  727|       |
  728|  6.64k|  result = pgrs_update(data, Curl_pgrs_now(data));
  729|  6.64k|  if(!result && !data->req.done)
  ------------------
  |  Branch (729:6): [True: 6.64k, False: 0]
  |  Branch (729:17): [True: 6.64k, False: 0]
  ------------------
  730|  6.64k|    result = pgrs_speedcheck(data, Curl_pgrs_now(data));
  731|  6.64k|  return result;
  732|  6.64k|}
Curl_pgrsUpdate_nometer:
  738|     40|{
  739|     40|  (void)progress_calc(data, Curl_pgrs_now(data));
  740|     40|}
Curl_pgrsCompleted:
  743|  3.73k|{
  744|  3.73k|  struct Progress * const p = &data->progress;
  745|  3.73k|  p->total.spent_us = curlx_ptimediff_us(Curl_pgrs_now(data), &p->start);
  746|  3.73k|}
Curl_pgrs_since_ms:
  751|  72.0k|{
  752|  72.0k|  if(!pnow)
  ------------------
  |  Branch (752:6): [True: 0, False: 72.0k]
  ------------------
  753|      0|    pnow = Curl_pgrs_now(data);
  754|  72.0k|  switch(timer) {
  755|  46.5k|  case TIMER_STARTOP:
  ------------------
  |  Branch (755:3): [True: 46.5k, False: 25.4k]
  ------------------
  756|  46.5k|    return (curlx_ptimediff_us(pnow, &data->progress.start) -
  757|  46.5k|            data->progress.delta.startop_us) / 1000;
  758|  25.4k|  case TIMER_STARTSINGLE:
  ------------------
  |  Branch (758:3): [True: 25.4k, False: 46.5k]
  ------------------
  759|  25.4k|    return (curlx_ptimediff_us(pnow, &data->progress.start) -
  760|  25.4k|            data->progress.delta.startsingle_us) / 1000;
  761|      0|  default:
  ------------------
  |  Branch (761:3): [True: 0, False: 72.0k]
  ------------------
  762|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (762:5): [Folded, False: 0]
  |  Branch (762:5): [Folded, False: 0]
  ------------------
  763|      0|    return 0;
  764|  72.0k|  }
  765|  72.0k|}
progress.c:pgrs_speedinit:
  123|  3.62k|{
  124|  3.62k|  memset(&data->state.keeps_speed, 0, sizeof(struct curltime));
  125|  3.62k|}
progress.c:pgrs_update:
  708|  38.0k|{
  709|       |  bool showprogress = progress_calc(data, pnow);
  710|  38.0k|  return pgrsupdate(data, showprogress);
  711|  38.0k|}
progress.c:pgrsupdate:
  659|  38.0k|{
  660|  38.0k|  if(!data->progress.hide) {
  ------------------
  |  Branch (660:6): [True: 0, False: 38.0k]
  ------------------
  661|      0|    int rc;
  662|      0|    if(data->set.fxferinfo) {
  ------------------
  |  Branch (662:8): [True: 0, False: 0]
  ------------------
  663|       |      /* There is a callback set, call that */
  664|      0|      struct Curl_mapi_guard guard;
  665|      0|      CURL_CBAPI_START(&guard, data, easy_fxferinfo);
  ------------------
  |  |  201|      0|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
  666|      0|      rc = data->set.fxferinfo(data->set.progress_client,
  667|      0|                               data->progress.dl.total_size,
  668|      0|                               data->progress.dl.cur_size,
  669|      0|                               data->progress.ul.total_size,
  670|      0|                               data->progress.ul.cur_size);
  671|      0|      CURL_CBAPI_END(&guard);
  ------------------
  |  |  205|      0|  Curl_cbapi_leave(g)
  ------------------
  672|      0|      if(rc != CURL_PROGRESSFUNC_CONTINUE) {
  ------------------
  |  |  236|      0|#define CURL_PROGRESSFUNC_CONTINUE 0x10000001
  ------------------
  |  Branch (672:10): [True: 0, False: 0]
  ------------------
  673|      0|        if(rc) {
  ------------------
  |  Branch (673:12): [True: 0, False: 0]
  ------------------
  674|      0|          failf(data, "Callback aborted");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  675|      0|          return CURLE_ABORTED_BY_CALLBACK;
  676|      0|        }
  677|      0|        return CURLE_OK;
  678|      0|      }
  679|      0|    }
  680|      0|    else if(data->set.fprogress) {
  ------------------
  |  Branch (680:13): [True: 0, False: 0]
  ------------------
  681|       |      /* The older deprecated callback is set, call that */
  682|      0|      struct Curl_mapi_guard guard;
  683|      0|      CURL_CBAPI_START(&guard, data, easy_fprogress);
  ------------------
  |  |  201|      0|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
  684|      0|      rc = data->set.fprogress(data->set.progress_client,
  685|      0|                               (double)data->progress.dl.total_size,
  686|      0|                               (double)data->progress.dl.cur_size,
  687|      0|                               (double)data->progress.ul.total_size,
  688|      0|                               (double)data->progress.ul.cur_size);
  689|      0|      CURL_CBAPI_END(&guard);
  ------------------
  |  |  205|      0|  Curl_cbapi_leave(g)
  ------------------
  690|      0|      if(rc != CURL_PROGRESSFUNC_CONTINUE) {
  ------------------
  |  |  236|      0|#define CURL_PROGRESSFUNC_CONTINUE 0x10000001
  ------------------
  |  Branch (690:10): [True: 0, False: 0]
  ------------------
  691|      0|        if(rc) {
  ------------------
  |  Branch (691:12): [True: 0, False: 0]
  ------------------
  692|      0|          failf(data, "Callback aborted");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  693|      0|          return CURLE_ABORTED_BY_CALLBACK;
  694|      0|        }
  695|      0|        return CURLE_OK;
  696|      0|      }
  697|      0|    }
  698|       |
  699|      0|    if(showprogress)
  ------------------
  |  Branch (699:8): [True: 0, False: 0]
  ------------------
  700|      0|      progress_meter(data);
  701|      0|  }
  702|       |
  703|  38.0k|  return CURLE_OK;
  704|  38.0k|}
progress.c:progress_calc:
  460|  38.0k|{
  461|  38.0k|  struct Progress * const p = &data->progress;
  462|  38.0k|  int i_next, i_oldest, i_latest;
  463|  38.0k|  timediff_t duration_us, elapsed_us;
  464|  38.0k|  curl_off_t amount;
  465|       |
  466|       |  /* The time spent so far (from the start) in microseconds */
  467|  38.0k|  elapsed_us = curlx_ptimediff_us(pnow, &p->start);
  468|  38.0k|  p->total.spent_us = elapsed_us;
  469|  38.0k|  p->dl.speed = trspeed(p->dl.cur_size, p->total.spent_us);
  470|  38.0k|  p->ul.speed = trspeed(p->ul.cur_size, p->total.spent_us);
  471|       |
  472|  38.0k|  if(!p->speeder_c) { /* no previous record exists */
  ------------------
  |  Branch (472:6): [True: 3.66k, False: 34.4k]
  ------------------
  473|  3.66k|    p->speed_amount[0] = p->dl.cur_size + p->ul.cur_size;
  474|  3.66k|    p->speed_time[0] = elapsed_us;
  475|  3.66k|    p->speeder_c++;
  476|       |    /* use the overall average at the start */
  477|  3.66k|    p->current_speed = p->ul.speed + p->dl.speed;
  478|  3.66k|    p->delta.lastshow_us = elapsed_us;
  479|  3.66k|    return TRUE;
  ------------------
  |  | 1045|  3.66k|#define TRUE true
  ------------------
  480|  3.66k|  }
  481|       |  /* We have at least one record now. Where to put the next and
  482|       |   * where is the latest one? */
  483|  34.4k|  i_next = p->speeder_c % CURL_SPEED_RECORDS;
  ------------------
  |  |  464|  34.4k|#define CURL_SPEED_RECORDS (5 + 1) /* 6 entries for 5 seconds */
  ------------------
  484|  34.4k|  i_latest = (i_next > 0) ? (i_next - 1) : (CURL_SPEED_RECORDS - 1);
  ------------------
  |  |  464|      0|#define CURL_SPEED_RECORDS (5 + 1) /* 6 entries for 5 seconds */
  ------------------
  |  Branch (484:14): [True: 34.4k, False: 0]
  ------------------
  485|       |
  486|       |  /* Make a new record only when some time has passed.
  487|       |   * Too frequent calls otherwise ruin the history. */
  488|  34.4k|  if((elapsed_us - p->speed_time[i_latest]) >= (1000 * 1000)) {
  ------------------
  |  Branch (488:6): [True: 0, False: 34.4k]
  ------------------
  489|      0|    p->speeder_c++;
  490|      0|    i_latest = i_next;
  491|      0|    p->speed_amount[i_latest] = p->dl.cur_size + p->ul.cur_size;
  492|      0|    p->speed_time[i_latest] = elapsed_us;
  493|      0|  }
  494|  34.4k|  else if(data->req.done) {
  ------------------
  |  Branch (494:11): [True: 9.03k, False: 25.3k]
  ------------------
  495|       |    /* When a transfer is done, and we did not have a current speed
  496|       |     * already, update the last record. Otherwise, stay at the speed
  497|       |     * we have. The last chunk of data, when rate limiting, would increase
  498|       |     * reported speed since it no longer measures a full second. */
  499|  9.03k|    if(!p->current_speed) {
  ------------------
  |  Branch (499:8): [True: 9.03k, False: 0]
  ------------------
  500|  9.03k|      p->speed_amount[i_latest] = p->dl.cur_size + p->ul.cur_size;
  501|  9.03k|      p->speed_time[i_latest] = elapsed_us;
  502|  9.03k|    }
  503|  9.03k|  }
  504|  25.3k|  else {
  505|       |    /* transfer ongoing, wait for more time to pass. */
  506|  25.3k|    return FALSE;
  ------------------
  |  | 1048|  25.3k|#define FALSE false
  ------------------
  507|  25.3k|  }
  508|       |
  509|  9.03k|  i_oldest = (p->speeder_c < CURL_SPEED_RECORDS) ? 0 :
  ------------------
  |  |  464|  9.03k|#define CURL_SPEED_RECORDS (5 + 1) /* 6 entries for 5 seconds */
  ------------------
  |  Branch (509:14): [True: 9.03k, False: 0]
  ------------------
  510|  9.03k|             ((i_latest + 1) % CURL_SPEED_RECORDS);
  ------------------
  |  |  464|      0|#define CURL_SPEED_RECORDS (5 + 1) /* 6 entries for 5 seconds */
  ------------------
  511|       |
  512|       |  /* How much we transferred between oldest and current records */
  513|  9.03k|  amount = p->speed_amount[i_latest] - p->speed_amount[i_oldest];
  514|       |  /* How long this took */
  515|  9.03k|  duration_us = p->speed_time[i_latest] - p->speed_time[i_oldest];
  516|  9.03k|  if(duration_us <= 0)
  ------------------
  |  Branch (516:6): [True: 9.03k, False: 0]
  ------------------
  517|  9.03k|    duration_us = 1;
  518|       |
  519|  9.03k|  if(amount > (CURL_OFF_T_MAX / 1000000)) {
  ------------------
  |  |  588|  9.03k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (519:6): [True: 0, False: 9.03k]
  ------------------
  520|       |    /* the 'amount' value is bigger than would fit in 64 bits if
  521|       |       multiplied with 1000000, so we use the double math for this */
  522|      0|    p->current_speed =
  523|      0|      (curl_off_t)(((double)amount * 1000000.0) / (double)duration_us);
  524|      0|  }
  525|  9.03k|  else {
  526|  9.03k|    p->current_speed = amount * 1000000 / duration_us;
  527|  9.03k|  }
  528|       |
  529|  9.03k|  if((p->delta.lastshow_us >= 0) && !data->req.done &&
  ------------------
  |  Branch (529:6): [True: 6.02k, False: 3.01k]
  |  Branch (529:37): [True: 0, False: 6.02k]
  ------------------
  530|      0|     ((elapsed_us - p->delta.lastshow_us) < (1000 * 1000)))
  ------------------
  |  Branch (530:6): [True: 0, False: 0]
  ------------------
  531|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  532|  9.03k|  p->delta.lastshow_us = elapsed_us;
  533|       |  return TRUE;
  ------------------
  |  | 1045|  9.03k|#define TRUE true
  ------------------
  534|  9.03k|}
progress.c:trspeed:
  446|  76.1k|{
  447|  76.1k|  if(us < 1)
  ------------------
  |  Branch (447:6): [True: 0, False: 76.1k]
  ------------------
  448|      0|    return size * 1000000;
  449|  76.1k|  else if(size < CURL_OFF_T_MAX / 1000000)
  ------------------
  |  |  588|  76.1k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (449:11): [True: 76.1k, False: 0]
  ------------------
  450|  76.1k|    return (size * 1000000) / us;
  451|      0|  else if(us >= 1000000)
  ------------------
  |  Branch (451:11): [True: 0, False: 0]
  ------------------
  452|      0|    return size / (us / 1000000);
  453|      0|  else
  454|      0|    return CURL_OFF_T_MAX;
  ------------------
  |  |  588|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  455|  76.1k|}

Curl_getn_scheme:
  642|  44.4k|{
  643|  44.4k|  typedef const struct Curl_scheme *(*letterfunc)(const char *ptr);
  644|  44.4k|  static const letterfunc parse[] = {
  645|  44.4k|    two_letter_scheme,
  646|  44.4k|    three_letter_scheme,
  647|  44.4k|    four_letter_scheme,
  648|  44.4k|    five_letter_scheme,
  649|  44.4k|    six_letter_scheme,
  650|  44.4k|    seven_letter_scheme
  651|  44.4k|  };
  652|       |
  653|  44.4k|  if(len < 2 || len > 7)
  ------------------
  |  Branch (653:6): [True: 0, False: 44.4k]
  |  Branch (653:17): [True: 0, False: 44.4k]
  ------------------
  654|      0|    return NULL;
  655|       |
  656|  44.4k|  return parse[len - 2](scheme);
  657|  44.4k|}
Curl_get_scheme:
  660|  14.5k|{
  661|  14.5k|  return Curl_getn_scheme(scheme, strlen(scheme));
  662|  14.5k|}
protocol.c:two_letter_scheme:
  466|  7.46k|{
  467|  7.46k|  if((Curl_raw_tolower(scheme[0]) == 'w') &&
  ------------------
  |  Branch (467:6): [True: 7.46k, False: 0]
  ------------------
  468|  7.46k|     (Curl_raw_tolower(scheme[1]) == 's'))
  ------------------
  |  Branch (468:6): [True: 7.46k, False: 0]
  ------------------
  469|  7.46k|    return &Curl_scheme_ws;
  470|      0|  return NULL;
  471|  7.46k|}
protocol.c:three_letter_scheme:
  474|  7.46k|{
  475|  7.46k|  char s0 = Curl_raw_tolower(scheme[0]);
  476|  7.46k|  char s1 = Curl_raw_tolower(scheme[1]);
  477|  7.46k|  char s2 = Curl_raw_tolower(scheme[2]);
  478|  7.46k|  if(s0 == 'f') {
  ------------------
  |  Branch (478:6): [True: 0, False: 7.46k]
  ------------------
  479|      0|    if(s1 == 't' && s2 == 'p')
  ------------------
  |  Branch (479:8): [True: 0, False: 0]
  |  Branch (479:21): [True: 0, False: 0]
  ------------------
  480|      0|      return &Curl_scheme_ftp;
  481|      0|  }
  482|  7.46k|  else if(s0 == 'w') {
  ------------------
  |  Branch (482:11): [True: 7.46k, False: 0]
  ------------------
  483|  7.46k|    if(s1 == 's' && s2 == 's')
  ------------------
  |  Branch (483:8): [True: 7.46k, False: 0]
  |  Branch (483:21): [True: 7.46k, False: 0]
  ------------------
  484|  7.46k|      return &Curl_scheme_wss;
  485|  7.46k|  }
  486|      0|  else if(s0 == 's') {
  ------------------
  |  Branch (486:11): [True: 0, False: 0]
  ------------------
  487|      0|    if(s1 == 'c' && s2 == 'p')
  ------------------
  |  Branch (487:8): [True: 0, False: 0]
  |  Branch (487:21): [True: 0, False: 0]
  ------------------
  488|      0|      return &Curl_scheme_scp;
  489|      0|    if(s1 == 'm' && s2 == 'b')
  ------------------
  |  Branch (489:8): [True: 0, False: 0]
  |  Branch (489:21): [True: 0, False: 0]
  ------------------
  490|      0|      return &Curl_scheme_smb;
  491|      0|  }
  492|      0|  return NULL;
  493|  7.46k|}
protocol.c:four_letter_scheme:
  496|  7.48k|{
  497|  7.48k|  char s0 = Curl_raw_tolower(scheme[0]);
  498|  7.48k|  char s1 = Curl_raw_tolower(scheme[1]);
  499|  7.48k|  char s2 = Curl_raw_tolower(scheme[2]);
  500|  7.48k|  char s3 = Curl_raw_tolower(scheme[3]);
  501|  7.48k|  if(s3 == 'p') {
  ------------------
  |  Branch (501:6): [True: 7.48k, False: 0]
  ------------------
  502|  7.48k|    if(s0 == 'h') {
  ------------------
  |  Branch (502:8): [True: 7.48k, False: 0]
  ------------------
  503|  7.48k|      if(s1 == 't' && s2 == 't')
  ------------------
  |  Branch (503:10): [True: 7.48k, False: 0]
  |  Branch (503:23): [True: 7.48k, False: 0]
  ------------------
  504|  7.48k|        return &Curl_scheme_http;
  505|  7.48k|    }
  506|      0|    else if(s0 == 'i') {
  ------------------
  |  Branch (506:13): [True: 0, False: 0]
  ------------------
  507|      0|      if(s1 == 'm' && s2 == 'a')
  ------------------
  |  Branch (507:10): [True: 0, False: 0]
  |  Branch (507:23): [True: 0, False: 0]
  ------------------
  508|      0|        return &Curl_scheme_imap;
  509|      0|    }
  510|      0|    else if(s0 == 'l') {
  ------------------
  |  Branch (510:13): [True: 0, False: 0]
  ------------------
  511|      0|      if(s1 == 'd' && s2 == 'a')
  ------------------
  |  Branch (511:10): [True: 0, False: 0]
  |  Branch (511:23): [True: 0, False: 0]
  ------------------
  512|      0|        return &Curl_scheme_ldap;
  513|      0|    }
  514|      0|    else if(s0 == 'r') {
  ------------------
  |  Branch (514:13): [True: 0, False: 0]
  ------------------
  515|      0|      if(s1 == 't' && s2 == 's')
  ------------------
  |  Branch (515:10): [True: 0, False: 0]
  |  Branch (515:23): [True: 0, False: 0]
  ------------------
  516|      0|        return &Curl_scheme_rtsp;
  517|      0|    }
  518|      0|    else if(s0 == 't') {
  ------------------
  |  Branch (518:13): [True: 0, False: 0]
  ------------------
  519|      0|      if(s1 == 'f' && s2 == 't')
  ------------------
  |  Branch (519:10): [True: 0, False: 0]
  |  Branch (519:23): [True: 0, False: 0]
  ------------------
  520|      0|        return &Curl_scheme_tftp;
  521|      0|    }
  522|      0|    else if(s0 == 's') {
  ------------------
  |  Branch (522:13): [True: 0, False: 0]
  ------------------
  523|      0|      if(s1 == 'f' && s2 == 't')
  ------------------
  |  Branch (523:10): [True: 0, False: 0]
  |  Branch (523:23): [True: 0, False: 0]
  ------------------
  524|      0|        return &Curl_scheme_sftp;
  525|      0|      if(s1 == 'm' && s2 == 't')
  ------------------
  |  Branch (525:10): [True: 0, False: 0]
  |  Branch (525:23): [True: 0, False: 0]
  ------------------
  526|      0|        return &Curl_scheme_smtp;
  527|      0|    }
  528|  7.48k|  }
  529|      0|  else if(s0 == 'f') {
  ------------------
  |  Branch (529:11): [True: 0, False: 0]
  ------------------
  530|      0|    if(s1 == 't' && s2 == 'p' && s3 == 's')
  ------------------
  |  Branch (530:8): [True: 0, False: 0]
  |  Branch (530:21): [True: 0, False: 0]
  |  Branch (530:34): [True: 0, False: 0]
  ------------------
  531|      0|      return &Curl_scheme_ftps;
  532|      0|    if(s1 == 'i' && s2 == 'l' && s3 == 'e')
  ------------------
  |  Branch (532:8): [True: 0, False: 0]
  |  Branch (532:21): [True: 0, False: 0]
  |  Branch (532:34): [True: 0, False: 0]
  ------------------
  533|      0|      return &Curl_scheme_file;
  534|      0|  }
  535|      0|  else if(s0 == 'm') {
  ------------------
  |  Branch (535:11): [True: 0, False: 0]
  ------------------
  536|      0|    if(s1 == 'q' && s2 == 't' && s3 == 't')
  ------------------
  |  Branch (536:8): [True: 0, False: 0]
  |  Branch (536:21): [True: 0, False: 0]
  |  Branch (536:34): [True: 0, False: 0]
  ------------------
  537|      0|      return &Curl_scheme_mqtt;
  538|      0|  }
  539|      0|  else if(s0 == 'p') {
  ------------------
  |  Branch (539:11): [True: 0, False: 0]
  ------------------
  540|      0|    if(s1 == 'o' && s2 == 'p' && s3 == '3')
  ------------------
  |  Branch (540:8): [True: 0, False: 0]
  |  Branch (540:21): [True: 0, False: 0]
  |  Branch (540:34): [True: 0, False: 0]
  ------------------
  541|      0|      return &Curl_scheme_pop3;
  542|      0|  }
  543|      0|  else if(s0 == 'd') {
  ------------------
  |  Branch (543:11): [True: 0, False: 0]
  ------------------
  544|      0|    if(s1 == 'i' && s2 == 'c' && s3 == 't')
  ------------------
  |  Branch (544:8): [True: 0, False: 0]
  |  Branch (544:21): [True: 0, False: 0]
  |  Branch (544:34): [True: 0, False: 0]
  ------------------
  545|      0|      return &Curl_scheme_dict;
  546|      0|  }
  547|      0|  else if(s0 == 's') {
  ------------------
  |  Branch (547:11): [True: 0, False: 0]
  ------------------
  548|      0|    if(s1 == 'm' && s2 == 'b' && s3 == 's')
  ------------------
  |  Branch (548:8): [True: 0, False: 0]
  |  Branch (548:21): [True: 0, False: 0]
  |  Branch (548:34): [True: 0, False: 0]
  ------------------
  549|      0|      return &Curl_scheme_smbs;
  550|      0|  }
  551|      0|  return NULL;
  552|  7.48k|}
protocol.c:five_letter_scheme:
  555|  21.9k|{
  556|  21.9k|  char s4 = Curl_raw_tolower(scheme[4]);
  557|  21.9k|  if(s4 == 's') {
  ------------------
  |  Branch (557:6): [True: 21.9k, False: 0]
  ------------------
  558|  21.9k|    char s0 = Curl_raw_tolower(scheme[0]);
  559|  21.9k|    char s1 = Curl_raw_tolower(scheme[1]);
  560|  21.9k|    char s2 = Curl_raw_tolower(scheme[2]);
  561|  21.9k|    char s3 = Curl_raw_tolower(scheme[3]);
  562|  21.9k|    if(s3 == 'p') {
  ------------------
  |  Branch (562:8): [True: 21.9k, False: 0]
  ------------------
  563|  21.9k|      switch(s0) {
  564|  21.9k|      case 'h':
  ------------------
  |  Branch (564:7): [True: 21.9k, False: 0]
  ------------------
  565|  21.9k|        if(s1 == 't' && s2 == 't')
  ------------------
  |  Branch (565:12): [True: 21.9k, False: 0]
  |  Branch (565:25): [True: 21.9k, False: 0]
  ------------------
  566|  21.9k|          return &Curl_scheme_https;
  567|      0|        break;
  568|      0|      case 'l':
  ------------------
  |  Branch (568:7): [True: 0, False: 21.9k]
  ------------------
  569|      0|        if(s1 == 'd' && s2 == 'a')
  ------------------
  |  Branch (569:12): [True: 0, False: 0]
  |  Branch (569:25): [True: 0, False: 0]
  ------------------
  570|      0|          return &Curl_scheme_ldaps;
  571|      0|        break;
  572|      0|      case 'i':
  ------------------
  |  Branch (572:7): [True: 0, False: 21.9k]
  ------------------
  573|      0|        if(s1 == 'm' && s2 == 'a')
  ------------------
  |  Branch (573:12): [True: 0, False: 0]
  |  Branch (573:25): [True: 0, False: 0]
  ------------------
  574|      0|          return &Curl_scheme_imaps;
  575|      0|        break;
  576|      0|      case 's':
  ------------------
  |  Branch (576:7): [True: 0, False: 21.9k]
  ------------------
  577|      0|        if(s1 == 'm' && s2 == 't')
  ------------------
  |  Branch (577:12): [True: 0, False: 0]
  |  Branch (577:25): [True: 0, False: 0]
  ------------------
  578|      0|          return &Curl_scheme_smtps;
  579|      0|        break;
  580|      0|      default:
  ------------------
  |  Branch (580:7): [True: 0, False: 21.9k]
  ------------------
  581|      0|        break;
  582|  21.9k|      }
  583|  21.9k|    }
  584|      0|    else if(s0 == 'p') {
  ------------------
  |  Branch (584:13): [True: 0, False: 0]
  ------------------
  585|      0|      if(s1 == 'o' && s2 == 'p' && s3 == '3')
  ------------------
  |  Branch (585:10): [True: 0, False: 0]
  |  Branch (585:23): [True: 0, False: 0]
  |  Branch (585:36): [True: 0, False: 0]
  ------------------
  586|      0|        return &Curl_scheme_pop3s;
  587|      0|    }
  588|      0|    else if(s0 == 'm') {
  ------------------
  |  Branch (588:13): [True: 0, False: 0]
  ------------------
  589|      0|      if(s1 == 'q' && s2 == 't' && s3 == 't')
  ------------------
  |  Branch (589:10): [True: 0, False: 0]
  |  Branch (589:23): [True: 0, False: 0]
  |  Branch (589:36): [True: 0, False: 0]
  ------------------
  590|      0|        return &Curl_scheme_mqtts;
  591|      0|    }
  592|      0|    else if(s0 == 's') {
  ------------------
  |  Branch (592:13): [True: 0, False: 0]
  ------------------
  593|      0|      if(s1 == 'o' && s2 == 'c' && s3 == 'k')
  ------------------
  |  Branch (593:10): [True: 0, False: 0]
  |  Branch (593:23): [True: 0, False: 0]
  |  Branch (593:36): [True: 0, False: 0]
  ------------------
  594|      0|        return &Curl_scheme_socks;
  595|      0|    }
  596|  21.9k|  }
  597|      0|  return NULL;
  598|  21.9k|}

proxy_check_noproxy:
  199|  3.62k|{
  200|       |  /*
  201|       |   * If we do not have a hostname at all, like for example with a FILE
  202|       |   * transfer, we have nothing to interrogate the noproxy list with.
  203|       |   */
  204|  3.62k|  if(!name || name[0] == '\0')
  ------------------
  |  Branch (204:6): [True: 0, False: 3.62k]
  |  Branch (204:15): [True: 0, False: 3.62k]
  ------------------
  205|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  206|       |
  207|       |  /* no_proxy=domain1.dom,host.domain2.dom
  208|       |   *   (a comma-separated list of hosts which should
  209|       |   *   not be proxied, or an asterisk to override
  210|       |   *   all proxy variables)
  211|       |   */
  212|  3.62k|  if(no_proxy && no_proxy[0]) {
  ------------------
  |  Branch (212:6): [True: 0, False: 3.62k]
  |  Branch (212:18): [True: 0, False: 0]
  ------------------
  213|      0|    const char *p = no_proxy;
  214|      0|    size_t namelen;
  215|      0|    char address[16];
  216|      0|    enum nametype type = TYPE_HOST;
  217|      0|    if(!strcmp("*", no_proxy))
  ------------------
  |  Branch (217:8): [True: 0, False: 0]
  ------------------
  218|      0|      return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  219|       |
  220|       |    /* NO_PROXY was specified and it was not only an asterisk */
  221|       |
  222|       |    /* Check if name is an IP address; if not, assume it being a hostname. */
  223|      0|    namelen = strlen(name);
  224|      0|    if(curlx_inet_pton(AF_INET, name, &address) == 1)
  ------------------
  |  Branch (224:8): [True: 0, False: 0]
  ------------------
  225|      0|      type = TYPE_IPV4;
  226|      0|#ifdef USE_IPV6
  227|      0|    else if(curlx_inet_pton(AF_INET6, name, &address) == 1)
  ------------------
  |  Branch (227:13): [True: 0, False: 0]
  ------------------
  228|      0|      type = TYPE_IPV6;
  229|      0|#endif
  230|      0|    else {
  231|       |      /* ignore trailing dots in the hostname */
  232|      0|      if(name[namelen - 1] == '.')
  ------------------
  |  Branch (232:10): [True: 0, False: 0]
  ------------------
  233|      0|        namelen--;
  234|      0|    }
  235|       |
  236|      0|    while(*p) {
  ------------------
  |  Branch (236:11): [True: 0, False: 0]
  ------------------
  237|      0|      const char *token;
  238|      0|      size_t tokenlen = 0;
  239|       |
  240|       |      /* pass blanks */
  241|      0|      curlx_str_passblanks(&p);
  242|       |
  243|      0|      token = p;
  244|       |      /* pass over the pattern */
  245|      0|      while(*p && !ISBLANK(*p) && (*p != ',')) {
  ------------------
  |  |   43|      0|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 0, False: 0]
  |  |  |  Branch (43:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (245:13): [True: 0, False: 0]
  |  Branch (245:35): [True: 0, False: 0]
  ------------------
  246|      0|        p++;
  247|      0|        tokenlen++;
  248|      0|      }
  249|       |
  250|      0|      if(tokenlen) {
  ------------------
  |  Branch (250:10): [True: 0, False: 0]
  ------------------
  251|      0|        bool match = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  252|      0|        if(type == TYPE_HOST)
  ------------------
  |  Branch (252:12): [True: 0, False: 0]
  ------------------
  253|      0|          match = match_host(token, tokenlen, name, namelen);
  254|      0|        else
  255|      0|          match = match_ip(type, token, tokenlen, name);
  256|       |
  257|      0|        if(match)
  ------------------
  |  Branch (257:12): [True: 0, False: 0]
  ------------------
  258|      0|          return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  259|      0|      }
  260|       |
  261|       |      /* pass blanks after pattern */
  262|      0|      curlx_str_passblanks(&p);
  263|       |      /* if not a comma, this ends the loop */
  264|      0|      if(*p != ',')
  ------------------
  |  Branch (264:10): [True: 0, False: 0]
  ------------------
  265|      0|        break;
  266|       |      /* pass any number of commas */
  267|      0|      while(*p == ',')
  ------------------
  |  Branch (267:13): [True: 0, False: 0]
  ------------------
  268|      0|        p++;
  269|      0|    } /* while(*p) */
  270|      0|  } /* NO_PROXY was specified and it was not only an asterisk */
  271|       |
  272|  3.62k|  return FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  273|  3.62k|}
Curl_proxy_init_conn:
  521|  3.62k|{
  522|  3.62k|  char *proxy = NULL;
  523|  3.62k|  char *pre_proxy = NULL;
  524|  3.62k|  const char *str = NULL;
  525|  3.62k|  bool do_env_detect = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  526|  3.62k|  CURLcode result = CURLE_OK;
  527|       |
  528|       |  /* Enforce no proxy use unless we decide to use one */
  529|  3.62k|  conn->bits.origin_is_proxy = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  530|  3.62k|  DEBUGASSERT(!conn->socks_proxy.peer);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (530:3): [True: 0, False: 3.62k]
  |  Branch (530:3): [True: 3.62k, False: 0]
  ------------------
  531|  3.62k|  DEBUGASSERT(!conn->http_proxy.peer);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (531:3): [True: 0, False: 3.62k]
  |  Branch (531:3): [True: 3.62k, False: 0]
  ------------------
  532|       |
  533|  3.62k|  if(proxy_do_not_proxy(data))
  ------------------
  |  Branch (533:6): [True: 0, False: 3.62k]
  ------------------
  534|      0|    goto out;
  535|       |
  536|       |  /*************************************************************
  537|       |   * Detect what (if any) proxy to use
  538|       |   *************************************************************/
  539|       |  /* the empty config strings disable proxy use and env detects */
  540|  3.62k|  str = CURL_EASY_STR(data, STRING_PROXY);
  ------------------
  |  | 1228|  3.62k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
  541|  3.62k|  if(str) {
  ------------------
  |  Branch (541:6): [True: 3.62k, False: 0]
  ------------------
  542|  3.62k|    if(*str) {
  ------------------
  |  Branch (542:8): [True: 0, False: 3.62k]
  ------------------
  543|      0|      proxy = curlx_strdup(str);
  ------------------
  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  544|       |      /* if global proxy is set, this is it */
  545|      0|      if(!proxy) {
  ------------------
  |  Branch (545:10): [True: 0, False: 0]
  ------------------
  546|      0|        failf(data, "memory shortage");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  547|      0|        result = CURLE_OUT_OF_MEMORY;
  548|      0|        goto out;
  549|      0|      }
  550|      0|    }
  551|  3.62k|    else
  552|  3.62k|      do_env_detect = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  553|  3.62k|  }
  554|       |
  555|  3.62k|  str = CURL_EASY_STR(data, STRING_PRE_PROXY);
  ------------------
  |  | 1228|  3.62k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
  556|  3.62k|  if(str) {
  ------------------
  |  Branch (556:6): [True: 0, False: 3.62k]
  ------------------
  557|      0|    if(*str) {
  ------------------
  |  Branch (557:8): [True: 0, False: 0]
  ------------------
  558|      0|      pre_proxy = curlx_strdup(str);
  ------------------
  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  559|       |      /* if global socks proxy is set, this is it */
  560|      0|      if(!pre_proxy) {
  ------------------
  |  Branch (560:10): [True: 0, False: 0]
  ------------------
  561|      0|        failf(data, "memory shortage");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  562|      0|        result = CURLE_OUT_OF_MEMORY;
  563|      0|        goto out;
  564|      0|      }
  565|      0|    }
  566|      0|    else
  567|      0|      do_env_detect = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  568|      0|  }
  569|       |
  570|  3.62k|#ifndef CURL_DISABLE_HTTP
  571|       |  /* None configured, detect possible proxy from environment. */
  572|  3.62k|  if(!proxy && !pre_proxy && do_env_detect)
  ------------------
  |  Branch (572:6): [True: 3.62k, False: 0]
  |  Branch (572:16): [True: 3.62k, False: 0]
  |  Branch (572:30): [True: 0, False: 3.62k]
  ------------------
  573|      0|    proxy = proxy_detect_proxy(data, conn->scheme);
  574|       |#else
  575|       |  (void)do_env_detect;
  576|       |#endif /* CURL_DISABLE_HTTP */
  577|       |
  578|  3.62k|  if(!proxy && !pre_proxy)
  ------------------
  |  Branch (578:6): [True: 3.62k, False: 0]
  |  Branch (578:16): [True: 3.62k, False: 0]
  ------------------
  579|  3.62k|    goto out;
  580|       |
  581|      0|  if(pre_proxy) {
  ------------------
  |  Branch (581:6): [True: 0, False: 0]
  ------------------
  582|      0|    result = parse_proxy(data, pre_proxy, TRUE, &conn->socks_proxy);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  583|      0|    if(result)
  ------------------
  |  Branch (583:8): [True: 0, False: 0]
  ------------------
  584|      0|      goto out;
  585|      0|  }
  586|       |
  587|      0|  if(proxy) {
  ------------------
  |  Branch (587:6): [True: 0, False: 0]
  ------------------
  588|      0|    result = parse_proxy(data, proxy, FALSE, &conn->http_proxy);
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  589|      0|    if(result)
  ------------------
  |  Branch (589:8): [True: 0, False: 0]
  ------------------
  590|      0|      goto out;
  591|       |
  592|      0|    switch(conn->http_proxy.proxytype) {
  593|      0|    case CURLPROXY_SOCKS4:
  ------------------
  |  |  800|      0|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  |  Branch (593:5): [True: 0, False: 0]
  ------------------
  594|      0|    case CURLPROXY_SOCKS4A:
  ------------------
  |  |  803|      0|#define CURLPROXY_SOCKS4A         6L /* added in 7.18.0 */
  ------------------
  |  Branch (594:5): [True: 0, False: 0]
  ------------------
  595|      0|    case CURLPROXY_SOCKS5:
  ------------------
  |  |  802|      0|#define CURLPROXY_SOCKS5          5L /* added in 7.10 */
  ------------------
  |  Branch (595:5): [True: 0, False: 0]
  ------------------
  596|      0|    case CURLPROXY_SOCKS5_HOSTNAME:
  ------------------
  |  |  804|      0|#define CURLPROXY_SOCKS5_HOSTNAME 7L /* Use the SOCKS5 protocol but pass along
  ------------------
  |  Branch (596:5): [True: 0, False: 0]
  ------------------
  597|       |      /* Whoops, it is not an HTTP proxy */
  598|      0|      if(pre_proxy) {
  ------------------
  |  Branch (598:10): [True: 0, False: 0]
  ------------------
  599|       |        /* and we already have a SOCKS pre-proxy. Cannot have both */
  600|      0|        failf(data, "Having a SOCKS pre-proxy and proxy is not "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  601|      0|              "supported with \'%s\'", proxy);
  602|      0|        result = CURLE_COULDNT_RESOLVE_PROXY;
  603|      0|        goto out;
  604|      0|      }
  605|       |      /* switch */
  606|      0|      conn->socks_proxy = conn->http_proxy;
  607|      0|      memset(&conn->http_proxy, 0, sizeof(conn->http_proxy));
  608|      0|      break;
  609|      0|    default:
  ------------------
  |  Branch (609:5): [True: 0, False: 0]
  ------------------
  610|       |      /* all other types are HTTP */
  611|      0|      break;
  612|      0|    }
  613|      0|  }
  614|       |
  615|      0|  if(conn->socks_proxy.peer) {
  ------------------
  |  Branch (615:6): [True: 0, False: 0]
  ------------------
  616|      0|    DEBUGASSERT(!CURL_PROXY_IS_ANY_HTTP(conn->socks_proxy.proxytype));
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (616:5): [True: 0, False: 0]
  |  Branch (616:5): [True: 0, False: 0]
  |  Branch (616:5): [True: 0, False: 0]
  |  Branch (616:5): [True: 0, False: 0]
  |  Branch (616:5): [True: 0, False: 0]
  |  Branch (616:5): [True: 0, False: 0]
  |  Branch (616:5): [True: 0, False: 0]
  |  Branch (616:5): [True: 0, False: 0]
  |  Branch (616:5): [True: 0, False: 0]
  |  Branch (616:5): [True: 0, False: 0]
  ------------------
  617|      0|  }
  618|       |
  619|       |#ifdef CURL_DISABLE_HTTP
  620|       |  if(conn->http_proxy.peer) {
  621|       |    /* asking for an HTTP proxy is a bit funny when HTTP is disabled... */
  622|       |    result = CURLE_UNSUPPORTED_PROTOCOL;
  623|       |    goto out;
  624|       |  }
  625|       |
  626|       |#else /* CURL_DISABLE_HTTP */
  627|      0|  if(conn->http_proxy.peer) {
  ------------------
  |  Branch (627:6): [True: 0, False: 0]
  ------------------
  628|      0|    const struct Curl_scheme *scheme = data->state.origin->scheme;
  629|      0|    bool tunnel_proxy = (bool)data->set.tunnel_thru_httpproxy;
  630|      0|    DEBUGASSERT(CURL_PROXY_IS_ANY_HTTP(conn->http_proxy.proxytype));
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (630:5): [True: 0, False: 0]
  |  Branch (630:5): [True: 0, False: 0]
  |  Branch (630:5): [True: 0, False: 0]
  |  Branch (630:5): [True: 0, False: 0]
  |  Branch (630:5): [True: 0, False: 0]
  |  Branch (630:5): [True: 0, False: 0]
  |  Branch (630:5): [True: 0, False: 0]
  |  Branch (630:5): [True: 0, False: 0]
  |  Branch (630:5): [True: 0, False: 0]
  |  Branch (630:5): [True: 0, False: 0]
  ------------------
  631|       |
  632|      0|    if(!tunnel_proxy) {
  ------------------
  |  Branch (632:8): [True: 0, False: 0]
  ------------------
  633|       |      /* Decide if we tunnel through proxy automatically */
  634|      0|      if(conn->via_peer) {
  ------------------
  |  Branch (634:10): [True: 0, False: 0]
  ------------------
  635|       |        /* With connect-to, we always tunnel */
  636|      0|        tunnel_proxy = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  637|      0|      }
  638|      0|      else if(scheme->flags & PROTOPT_SSL) {
  ------------------
  |  |  207|      0|#define PROTOPT_SSL (1 << 0)       /* uses SSL */
  ------------------
  |  Branch (638:15): [True: 0, False: 0]
  ------------------
  639|       |        /* If the transfer is supposed to be secure, we tunnel */
  640|      0|        tunnel_proxy = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  641|      0|      }
  642|      0|      else if(scheme->flags & PROTOPT_HTTP_PROXY_TUNNEL) {
  ------------------
  |  |  239|      0|#define PROTOPT_HTTP_PROXY_TUNNEL (1 << 18) /* Using this protocol with a
  ------------------
  |  Branch (642:15): [True: 0, False: 0]
  ------------------
  643|       |        /* transfer scheme required tunneling */
  644|      0|        tunnel_proxy = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  645|      0|      }
  646|      0|      else if(!(scheme->protocol & PROTO_FAMILY_HTTP) &&
  ------------------
  |  |   84|      0|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1088|      0|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1089|      0|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|      0|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|      0|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|      0|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
  |  Branch (646:15): [True: 0, False: 0]
  ------------------
  647|      0|              !(scheme->flags & PROTOPT_PROXY_AS_HTTP)) {
  ------------------
  |  |  226|      0|#define PROTOPT_PROXY_AS_HTTP (1 << 11) /* allow this non-HTTP scheme over a
  ------------------
  |  Branch (647:15): [True: 0, False: 0]
  ------------------
  648|       |        /* Cannot delegate transfer URL to HTTP proxy */
  649|      0|        tunnel_proxy = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  650|      0|      }
  651|      0|    }
  652|       |
  653|      0|    if(!tunnel_proxy) {
  ------------------
  |  Branch (653:8): [True: 0, False: 0]
  ------------------
  654|       |      /* HTTP proxy used in forwarding mode. This means the connection
  655|       |       * is really to the proxy and NOT the origin of the transfer. */
  656|      0|      DEBUGASSERT(!conn->via_peer);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (656:7): [True: 0, False: 0]
  |  Branch (656:7): [True: 0, False: 0]
  ------------------
  657|      0|      Curl_peer_link(&conn->origin, conn->http_proxy.peer);
  658|      0|      conn->scheme = conn->http_proxy.peer->scheme;
  659|      0|      conn->bits.origin_is_proxy = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  660|      0|    }
  661|       |
  662|      0|#ifndef CURL_DISABLE_DIGEST_AUTH
  663|      0|    if(!Curl_safecmp(data->state.envproxy, proxy)) {
  ------------------
  |  Branch (663:8): [True: 0, False: 0]
  ------------------
  664|       |      /* proxy changed */
  665|      0|      Curl_auth_digest_cleanup(&data->state.proxydigest);
  666|      0|      curlx_free(data->state.envproxy);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  667|      0|      data->state.envproxy = curlx_strdup(proxy);
  ------------------
  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  668|      0|    }
  669|      0|#endif
  670|      0|  }
  671|      0|#endif /* !CURL_DISABLE_HTTP */
  672|       |
  673|  3.62k|out:
  674|  3.62k|  curlx_free(pre_proxy);
  ------------------
  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  675|  3.62k|  curlx_free(proxy);
  ------------------
  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  676|  3.62k|  return result;
  677|      0|}
proxy.c:proxy_do_not_proxy:
  492|  3.62k|{
  493|  3.62k|  const char *no_proxy;
  494|  3.62k|  char *env_no_proxy = NULL;
  495|  3.62k|  bool do_not_proxy;
  496|       |
  497|       |  /* no proxying if the transfer does not use the network */
  498|  3.62k|  if(data->state.origin->scheme->flags & PROTOPT_NONETWORK)
  ------------------
  |  |  214|  3.62k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (498:6): [True: 0, False: 3.62k]
  ------------------
  499|      0|    return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  500|       |
  501|  3.62k|  no_proxy = CURL_EASY_STR(data, STRING_NOPROXY);
  ------------------
  |  | 1228|  3.62k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
  502|  3.62k|  if(!no_proxy) {
  ------------------
  |  Branch (502:6): [True: 3.62k, False: 0]
  ------------------
  503|  3.62k|    const char *p = "no_proxy";
  504|  3.62k|    env_no_proxy = curl_getenv(p);
  505|  3.62k|    if(!env_no_proxy) {
  ------------------
  |  Branch (505:8): [True: 3.62k, False: 0]
  ------------------
  506|  3.62k|      p = "NO_PROXY";
  507|  3.62k|      env_no_proxy = curl_getenv(p);
  508|  3.62k|    }
  509|  3.62k|    if(env_no_proxy)
  ------------------
  |  Branch (509:8): [True: 0, False: 3.62k]
  ------------------
  510|      0|      infof(data, "Uses proxy env variable %s == '%s'", p, env_no_proxy);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  511|  3.62k|    no_proxy = env_no_proxy;
  512|  3.62k|  }
  513|       |
  514|  3.62k|  do_not_proxy = proxy_check_noproxy(data->state.origin->hostname, no_proxy);
  515|       |  curlx_safefree(env_no_proxy);
  ------------------
  |  | 1332|  3.62k|  do {                      \
  |  | 1333|  3.62k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.62k|    (ptr) = NULL;           \
  |  | 1335|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  516|  3.62k|  return do_not_proxy;
  517|  3.62k|}

Curl_rand_alnum:
  209|  1.41k|{
  210|  1.41k|  CURLcode result = CURLE_OK;
  211|  1.41k|  const unsigned int alnumspace = CURL_CSTRLEN(alnum);
  ------------------
  |  | 1292|  1.41k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  ------------------
  212|  1.41k|  unsigned int r;
  213|  1.41k|  DEBUGASSERT(num > 1);
  ------------------
  |  | 1075|  1.41k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (213:3): [True: 0, False: 1.41k]
  |  Branch (213:3): [True: 1.41k, False: 0]
  ------------------
  214|       |
  215|  1.41k|  num--; /* save one for null-termination */
  216|       |
  217|  32.4k|  while(num) {
  ------------------
  |  Branch (217:9): [True: 31.0k, False: 1.41k]
  ------------------
  218|  31.0k|    do {
  219|  31.0k|      result = randit(data, &r, TRUE);
  ------------------
  |  | 1045|  31.0k|#define TRUE true
  ------------------
  220|  31.0k|      if(result)
  ------------------
  |  Branch (220:10): [True: 0, False: 31.0k]
  ------------------
  221|      0|        return result;
  222|  31.0k|    } while(r >= (UINT_MAX - UINT_MAX % alnumspace));
  ------------------
  |  Branch (222:13): [True: 0, False: 31.0k]
  ------------------
  223|       |
  224|  31.0k|    *rnd++ = (unsigned char)alnum[r % alnumspace];
  225|  31.0k|    num--;
  226|  31.0k|  }
  227|  1.41k|  *rnd = 0;
  228|       |
  229|  1.41k|  return result;
  230|  1.41k|}
rand.c:randit:
   89|  31.0k|{
   90|  31.0k|#ifdef DEBUGBUILD
   91|  31.0k|  if(env_override) {
  ------------------
  |  Branch (91:6): [True: 31.0k, False: 0]
  ------------------
   92|  31.0k|    char *force_entropy = getenv("CURL_ENTROPY");
   93|  31.0k|    if(force_entropy) {
  ------------------
  |  Branch (93:8): [True: 0, False: 31.0k]
  ------------------
   94|      0|      static unsigned int randseed;
   95|      0|      static bool seeded = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
   96|       |
   97|      0|      if(!seeded) {
  ------------------
  |  Branch (97:10): [True: 0, False: 0]
  ------------------
   98|      0|        unsigned int seed = 0;
   99|      0|        size_t elen = strlen(force_entropy);
  100|      0|        size_t clen = sizeof(seed);
  101|      0|        size_t min = elen < clen ? elen : clen;
  ------------------
  |  Branch (101:22): [True: 0, False: 0]
  ------------------
  102|      0|        memcpy((char *)&seed, force_entropy, min);
  103|      0|        randseed = ntohl(seed);
  104|      0|        seeded = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  105|      0|      }
  106|      0|      else
  107|      0|        randseed++;
  108|      0|      *rnd = randseed;
  109|      0|      return CURLE_OK;
  110|      0|    }
  111|  31.0k|  }
  112|       |#else
  113|       |  (void)env_override;
  114|       |#endif
  115|       |
  116|       |  /* data may be NULL! */
  117|  31.0k|#ifdef USE_SSL
  118|  31.0k|  return Curl_ssl_random(data, (unsigned char *)rnd, sizeof(*rnd));
  119|       |#else
  120|       |  return weak_random(data, (unsigned char *)rnd, sizeof(*rnd));
  121|       |#endif
  122|  31.0k|}

Curl_rlimit_start:
  173|    684|{
  174|       |  /* A start always resets the values to initial defaults, then
  175|       |   * fine tunes the intervals for the total_tokens expected. */
  176|    684|  r->rate_per_step = r->rate_per_sec;
  177|    684|  r->burst_per_step = r->burst_per_sec;
  178|    684|  r->step_us = CURL_US_PER_SEC;
  ------------------
  |  |   29|    684|#define CURL_US_PER_SEC         1000000
  ------------------
  179|    684|  r->spare_us = 0;
  180|    684|  r->tokens = r->rate_per_step;
  181|    684|  r->ts = *pts;
  182|    684|  rlimit_tune_steps(r, total_tokens);
  183|    684|}
Curl_rlimit_per_step:
  186|      4|{
  187|      4|  return r->rate_per_step;
  188|      4|}
Curl_rlimit_active:
  191|  29.7k|{
  192|  29.7k|  return (r->rate_per_step > 0) || r->blocked;
  ------------------
  |  Branch (192:10): [True: 0, False: 29.7k]
  |  Branch (192:36): [True: 0, False: 29.7k]
  ------------------
  193|  29.7k|}
Curl_rlimit_is_blocked:
  196|  21.9k|{
  197|  21.9k|  return (bool)r->blocked;
  198|  21.9k|}
Curl_rlimit_avail:
  202|      9|{
  203|      9|  struct curltime ts;
  204|       |
  205|      9|  if(r->blocked)
  ------------------
  |  Branch (205:6): [True: 0, False: 9]
  ------------------
  206|      0|    return 0;
  207|      9|  else if(r->rate_per_step) {
  ------------------
  |  Branch (207:11): [True: 0, False: 9]
  ------------------
  208|      0|    if(!pts) {
  ------------------
  |  Branch (208:8): [True: 0, False: 0]
  ------------------
  209|      0|      curlx_pnow(&ts);
  210|      0|      pts = &ts;
  211|      0|    }
  212|      0|    rlimit_update(r, pts);
  213|      0|    return r->tokens;
  214|      0|  }
  215|      9|  else
  216|      9|    return INT64_MAX;
  217|      9|}
Curl_rlimit_drain:
  221|    583|{
  222|    583|  struct curltime ts;
  223|       |
  224|    583|  if(r->blocked || !r->rate_per_step)
  ------------------
  |  Branch (224:6): [True: 0, False: 583]
  |  Branch (224:20): [True: 583, False: 0]
  ------------------
  225|    583|    return;
  226|       |
  227|      0|  if(!pts) {
  ------------------
  |  Branch (227:6): [True: 0, False: 0]
  ------------------
  228|      0|    curlx_pnow(&ts);
  229|      0|    pts = &ts;
  230|      0|  }
  231|      0|  rlimit_update(r, pts);
  232|      0|#if 8 <= SIZEOF_SIZE_T
  233|      0|  if(tokens > INT64_MAX) {
  ------------------
  |  Branch (233:6): [True: 0, False: 0]
  ------------------
  234|      0|    r->tokens = INT64_MAX;
  235|      0|  }
  236|      0|  else
  237|      0|#endif
  238|      0|  {
  239|      0|    int64_t val = (int64_t)tokens;
  240|      0|    if((INT64_MIN + val) < r->tokens)
  ------------------
  |  Branch (240:8): [True: 0, False: 0]
  ------------------
  241|      0|      r->tokens -= val;
  242|      0|    else
  243|      0|      r->tokens = INT64_MIN;
  244|      0|  }
  245|      0|}
Curl_rlimit_block:
  292|  7.33k|{
  293|  7.33k|  if(!activate == !r->blocked)
  ------------------
  |  Branch (293:6): [True: 7.33k, False: 0]
  ------------------
  294|  7.33k|    return;
  295|       |
  296|      0|  r->ts = *pts;
  297|      0|  r->blocked = activate;
  298|      0|  if(!r->blocked) {
  ------------------
  |  Branch (298:6): [True: 0, False: 0]
  ------------------
  299|       |    /* Start rate limiting fresh. The amount of time this was blocked
  300|       |     * does not generate extra tokens. */
  301|      0|    Curl_rlimit_start(r, pts, -1);
  302|      0|  }
  303|      0|  else {
  304|      0|    r->tokens = 0;
  305|      0|  }
  306|      0|}
ratelimit.c:rlimit_tune_steps:
   79|    684|{
   80|    684|  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|    684|  if(!r->rate_per_step ||
  ------------------
  |  Branch (101:6): [True: 684, False: 0]
  ------------------
  102|      0|     (tokens_total <= 1) ||
  ------------------
  |  Branch (102:6): [True: 0, False: 0]
  ------------------
  103|      0|     (tokens_total > (INT64_MAX / 1000)))
  ------------------
  |  Branch (103:6): [True: 0, False: 0]
  ------------------
  104|    684|    return;
  105|       |
  106|       |  /* Calculate tokens for the last step and the ones before. */
  107|      0|  tokens_last = tokens_total / 100;
  108|      0|  if(!tokens_last) /* less than 100 total, use 1 */
  ------------------
  |  Branch (108:6): [True: 0, False: 0]
  ------------------
  109|      0|    tokens_last = 1;
  110|      0|  else if(tokens_last > CURL_RLIMIT_MIN_RATE)
  ------------------
  |  |   30|      0|#define CURL_RLIMIT_MIN_RATE    (4 * 1024)  /* minimum step rate */
  ------------------
  |  Branch (110:11): [True: 0, False: 0]
  ------------------
  111|      0|    tokens_last = CURL_RLIMIT_MIN_RATE;
  ------------------
  |  |   30|      0|#define CURL_RLIMIT_MIN_RATE    (4 * 1024)  /* minimum step rate */
  ------------------
  112|      0|  DEBUGASSERT(tokens_last);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (112:3): [True: 0, False: 0]
  |  Branch (112:3): [True: 0, False: 0]
  ------------------
  113|      0|  tokens_main = tokens_total - tokens_last;
  114|      0|  DEBUGASSERT(tokens_main);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (114:3): [True: 0, False: 0]
  |  Branch (114:3): [True: 0, False: 0]
  ------------------
  115|       |
  116|       |  /* how many milli-steps will it take to consume those, give the
  117|       |  * original rate limit per second? */
  118|      0|  DEBUGASSERT(r->step_us == CURL_US_PER_SEC);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (118:3): [True: 0, False: 0]
  |  Branch (118:3): [True: 0, False: 0]
  ------------------
  119|       |
  120|      0|  msteps = (tokens_main * 1000 / r->rate_per_step);
  121|      0|  if(msteps < CURL_RLIMIT_STEP_MIN_MS) {
  ------------------
  |  |   31|      0|#define CURL_RLIMIT_STEP_MIN_MS 2  /* minimum step duration */
  ------------------
  |  Branch (121:6): [True: 0, False: 0]
  ------------------
  122|       |    /* Steps this small will not work. Do not tune. */
  123|      0|    return;
  124|      0|  }
  125|      0|  else if(msteps < 1000) {
  ------------------
  |  Branch (125:11): [True: 0, False: 0]
  ------------------
  126|       |    /* It needs less than one step to provide the needed tokens.
  127|       |     * Make it exactly that long and with exactly those tokens. */
  128|      0|    r->step_us = (timediff_t)msteps * 1000;
  129|      0|    r->rate_per_step = tokens_main;
  130|      0|    r->tokens = r->rate_per_step;
  131|      0|  }
  132|      0|  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|      0|    curl_off_t ms_unaccounted = (msteps % 1000);
  137|      0|    curl_off_t mstep_inc = (ms_unaccounted / (msteps / 1000));
  138|      0|    if(mstep_inc) {
  ------------------
  |  Branch (138:8): [True: 0, False: 0]
  ------------------
  139|      0|      curl_off_t rate_inc = ((r->rate_per_step * mstep_inc) / 1000);
  140|      0|      if(rate_inc) {
  ------------------
  |  Branch (140:10): [True: 0, False: 0]
  ------------------
  141|      0|        r->step_us = CURL_US_PER_SEC + ((timediff_t)mstep_inc * 1000);
  ------------------
  |  |   29|      0|#define CURL_US_PER_SEC         1000000
  ------------------
  142|      0|        r->rate_per_step += rate_inc;
  143|      0|        r->tokens = r->rate_per_step;
  144|      0|        if(r->burst_per_step) {
  ------------------
  |  Branch (144:12): [True: 0, False: 0]
  ------------------
  145|      0|          curl_off_t burst_inc = ((r->burst_per_step * mstep_inc) / 1000);
  146|      0|          if(burst_inc)
  ------------------
  |  Branch (146:14): [True: 0, False: 0]
  ------------------
  147|      0|            r->burst_per_step += burst_inc;
  148|      0|        }
  149|      0|      }
  150|      0|    }
  151|      0|  }
  152|      0|}

Curl_req_init:
   38|  7.46k|{
   39|  7.46k|  memset(req, 0, sizeof(*req));
   40|  7.46k|}
Curl_req_soft_reset:
   44|  3.62k|{
   45|  3.62k|  CURLcode result;
   46|       |
   47|  3.62k|  req->done = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
   48|  3.62k|  req->upload_done = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
   49|  3.62k|  req->upload_aborted = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
   50|  3.62k|  req->download_done = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
   51|  3.62k|  req->eos_written = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
   52|  3.62k|  req->eos_read = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
   53|  3.62k|  req->eos_sent = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
   54|  3.62k|  req->ignorebody = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
   55|  3.62k|  req->shutdown = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
   56|  3.62k|  req->bytecount = 0;
   57|  3.62k|  req->writebytecount = 0;
   58|  3.62k|  req->header = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
   59|  3.62k|  req->headerline = 0;
   60|  3.62k|  req->headerbytecount = 0;
   61|  3.62k|  req->allheadercount = 0;
   62|  3.62k|  req->deductheadercount = 0;
   63|  3.62k|  req->httpversion_sent = 0;
   64|  3.62k|  req->httpversion = 0;
   65|  3.62k|  req->sendbuf_hds_len = 0;
   66|       |
   67|  3.62k|  curlx_safefree(req->hd_auth);
  ------------------
  |  | 1332|  3.62k|  do {                      \
  |  | 1333|  3.62k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.62k|    (ptr) = NULL;           \
  |  | 1335|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
   68|  3.62k|#ifndef CURL_DISABLE_PROXY
   69|  3.62k|  curlx_safefree(req->hd_proxy_auth);
  ------------------
  |  | 1332|  3.62k|  do {                      \
  |  | 1333|  3.62k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.62k|    (ptr) = NULL;           \
  |  | 1335|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
   70|  3.62k|#endif
   71|       |
   72|  3.62k|  result = Curl_client_start(data);
   73|  3.62k|  if(result)
  ------------------
  |  Branch (73:6): [True: 0, False: 3.62k]
  ------------------
   74|      0|    return result;
   75|       |
   76|  3.62k|  if(!req->sendbuf_init) {
  ------------------
  |  Branch (76:6): [True: 3.62k, False: 0]
  ------------------
   77|  3.62k|    Curl_bufq_init2(&req->sendbuf, data->set.upload_buffer_size, 1,
   78|  3.62k|                    BUFQ_OPT_SOFT_LIMIT);
  ------------------
  |  |  111|  3.62k|#define BUFQ_OPT_SOFT_LIMIT  (1 << 0)
  ------------------
   79|  3.62k|    req->sendbuf_init = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
   80|  3.62k|  }
   81|      0|  else {
   82|      0|    Curl_bufq_reset(&req->sendbuf);
   83|      0|    if(data->set.upload_buffer_size != req->sendbuf.chunk_size) {
  ------------------
  |  Branch (83:8): [True: 0, False: 0]
  ------------------
   84|      0|      Curl_bufq_free(&req->sendbuf);
   85|      0|      Curl_bufq_init2(&req->sendbuf, data->set.upload_buffer_size, 1,
   86|      0|                      BUFQ_OPT_SOFT_LIMIT);
  ------------------
  |  |  111|      0|#define BUFQ_OPT_SOFT_LIMIT  (1 << 0)
  ------------------
   87|      0|    }
   88|      0|  }
   89|       |
   90|  3.62k|  return CURLE_OK;
   91|  3.62k|}
Curl_req_start:
   95|  3.62k|{
   96|  3.62k|  req->start = *Curl_pgrs_now(data);
   97|  3.62k|  return Curl_req_soft_reset(req, data);
   98|  3.62k|}
Curl_req_done:
  104|     63|{
  105|     63|  (void)req;
  106|     63|  if(!aborted)
  ------------------
  |  Branch (106:6): [True: 63, False: 0]
  ------------------
  107|     63|    (void)req_flush(data);
  108|     63|  Curl_client_reset(data);
  109|     63|  return CURLE_OK;
  110|     63|}
Curl_req_hard_reset:
  113|  3.66k|{
  114|  3.66k|  struct curltime t0 = { 0, 0 };
  115|       |
  116|  3.66k|  curlx_safefree(req->newurl);
  ------------------
  |  | 1332|  3.66k|  do {                      \
  |  | 1333|  3.66k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.66k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.66k|    (ptr) = NULL;           \
  |  | 1335|  3.66k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.66k]
  |  |  ------------------
  ------------------
  117|  3.66k|  curlx_safefree(req->hd_auth);
  ------------------
  |  | 1332|  3.66k|  do {                      \
  |  | 1333|  3.66k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.66k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.66k|    (ptr) = NULL;           \
  |  | 1335|  3.66k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.66k]
  |  |  ------------------
  ------------------
  118|  3.66k|#ifndef CURL_DISABLE_PROXY
  119|  3.66k|  curlx_safefree(req->hd_proxy_auth);
  ------------------
  |  | 1332|  3.66k|  do {                      \
  |  | 1333|  3.66k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.66k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.66k|    (ptr) = NULL;           \
  |  | 1335|  3.66k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.66k]
  |  |  ------------------
  ------------------
  120|  3.66k|#endif
  121|  3.66k|#ifndef CURL_DISABLE_COOKIES
  122|  3.66k|  curlx_safefree(req->cookiehost);
  ------------------
  |  | 1332|  3.66k|  do {                      \
  |  | 1333|  3.66k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.66k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.66k|    (ptr) = NULL;           \
  |  | 1335|  3.66k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.66k]
  |  |  ------------------
  ------------------
  123|  3.66k|#endif
  124|  3.66k|  Curl_client_reset(data);
  125|  3.66k|  if(req->sendbuf_init)
  ------------------
  |  Branch (125:6): [True: 0, False: 3.66k]
  ------------------
  126|      0|    Curl_bufq_reset(&req->sendbuf);
  127|       |
  128|       |  /* clear any resolve data */
  129|  3.66k|  Curl_resolv_destroy_all(data);
  130|       |  /* Can no longer memset() this struct as we need to keep some state */
  131|  3.66k|  req->size = -1;
  132|  3.66k|  req->maxdownload = -1;
  133|  3.66k|  req->bytecount = 0;
  134|  3.66k|  req->writebytecount = 0;
  135|  3.66k|  req->start = t0;
  136|  3.66k|  req->headerbytecount = 0;
  137|  3.66k|  req->allheadercount = 0;
  138|  3.66k|  req->deductheadercount = 0;
  139|  3.66k|  req->headerline = 0;
  140|  3.66k|  req->offset = 0;
  141|  3.66k|  req->httpcode = 0;
  142|  3.66k|  req->io_flags = 0;
  143|  3.66k|  req->upgr101 = UPGR101_NONE;
  144|  3.66k|  req->sendbuf_hds_len = 0;
  145|  3.66k|  req->timeofdoc = 0;
  146|  3.66k|  req->location = NULL;
  147|  3.66k|  req->newurl = NULL;
  148|  3.66k|#ifndef CURL_DISABLE_COOKIES
  149|  3.66k|  req->setcookies = 0;
  150|  3.66k|#endif
  151|  3.66k|  req->header = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  152|  3.66k|  req->content_range = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  153|  3.66k|  req->download_done = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  154|  3.66k|  req->eos_written = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  155|  3.66k|  req->eos_read = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  156|  3.66k|  req->eos_sent = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  157|  3.66k|  req->rewind_read = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  158|  3.66k|  req->upload_done = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  159|  3.66k|  req->upload_aborted = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  160|  3.66k|  req->ignorebody = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  161|  3.66k|  req->http_bodyless = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  162|  3.66k|  req->chunk = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  163|  3.66k|  req->resp_trailer = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  164|  3.66k|  req->ignore_cl = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  165|  3.66k|  req->upload_chunky = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  166|  3.66k|  req->no_body = data->set.opt_no_body;
  167|  3.66k|  req->authneg = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  168|  3.66k|  req->shutdown = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  169|       |  /* Unpause all directions */
  170|  3.66k|  Curl_rlimit_block(&data->progress.dl.rlimit, FALSE, &t0);
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  171|       |  Curl_rlimit_block(&data->progress.ul.rlimit, FALSE, &t0);
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  172|  3.66k|}
Curl_req_free:
  175|  7.46k|{
  176|  7.46k|  curlx_safefree(req->newurl);
  ------------------
  |  | 1332|  7.46k|  do {                      \
  |  | 1333|  7.46k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.46k|    (ptr) = NULL;           \
  |  | 1335|  7.46k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.46k]
  |  |  ------------------
  ------------------
  177|  7.46k|  curlx_safefree(req->hd_auth);
  ------------------
  |  | 1332|  7.46k|  do {                      \
  |  | 1333|  7.46k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.46k|    (ptr) = NULL;           \
  |  | 1335|  7.46k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.46k]
  |  |  ------------------
  ------------------
  178|  7.46k|#ifndef CURL_DISABLE_PROXY
  179|  7.46k|  curlx_safefree(req->hd_proxy_auth);
  ------------------
  |  | 1332|  7.46k|  do {                      \
  |  | 1333|  7.46k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.46k|    (ptr) = NULL;           \
  |  | 1335|  7.46k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.46k]
  |  |  ------------------
  ------------------
  180|  7.46k|#endif
  181|  7.46k|  if(req->sendbuf_init)
  ------------------
  |  Branch (181:6): [True: 3.62k, False: 3.83k]
  ------------------
  182|  3.62k|    Curl_bufq_free(&req->sendbuf);
  183|  7.46k|  Curl_client_cleanup(data);
  184|  7.46k|}
Curl_req_send:
  382|  3.59k|{
  383|  3.59k|  CURLcode result;
  384|  3.59k|  const char *buf;
  385|  3.59k|  size_t blen, nwritten;
  386|       |
  387|  3.59k|  if(!data || !data->conn)
  ------------------
  |  Branch (387:6): [True: 0, False: 3.59k]
  |  Branch (387:15): [True: 0, False: 3.59k]
  ------------------
  388|      0|    return CURLE_FAILED_INIT;
  389|       |
  390|  3.59k|  data->req.httpversion_sent = httpversion;
  391|  3.59k|  buf = curlx_dyn_ptr(req);
  392|  3.59k|  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 than `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|  3.59k|  if(Curl_bufq_is_empty(&data->req.sendbuf) &&
  ------------------
  |  Branch (398:6): [True: 3.59k, False: 0]
  ------------------
  399|  3.59k|     !Curl_creader_total_length(data) &&
  ------------------
  |  Branch (399:6): [True: 2.94k, False: 654]
  ------------------
  400|  2.94k|     (blen <= data->req.sendbuf.chunk_size)) {
  ------------------
  |  Branch (400:6): [True: 2.94k, False: 0]
  ------------------
  401|  2.94k|    data->req.eos_read = TRUE;
  ------------------
  |  | 1045|  2.94k|#define TRUE true
  ------------------
  402|  2.94k|    result = xfer_send(data, buf, blen, blen, &nwritten);
  403|  2.94k|    if(result)
  ------------------
  |  Branch (403:8): [True: 0, False: 2.94k]
  ------------------
  404|      0|      return result;
  405|  2.94k|    buf += nwritten;
  406|  2.94k|    blen -= nwritten;
  407|  2.94k|    if(!blen) {
  ------------------
  |  Branch (407:8): [True: 2.94k, False: 0]
  ------------------
  408|  2.94k|      result = req_set_upload_done(data);
  409|  2.94k|      if(result)
  ------------------
  |  Branch (409:10): [True: 0, False: 2.94k]
  ------------------
  410|      0|        return result;
  411|  2.94k|    }
  412|  2.94k|  }
  413|       |
  414|  3.59k|  if(blen) {
  ------------------
  |  Branch (414:6): [True: 654, False: 2.94k]
  ------------------
  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|    654|    result = req_send_buffer_add(data, buf, blen, blen);
  419|    654|    if(result)
  ------------------
  |  Branch (419:8): [True: 0, False: 654]
  ------------------
  420|      0|      return result;
  421|       |
  422|    654|    return Curl_req_send_more(data);
  423|    654|  }
  424|  2.94k|  return CURLE_OK;
  425|  3.59k|}
Curl_req_sendbuf_empty:
  428|  6.74k|{
  429|  6.74k|  return !data->req.sendbuf_init || Curl_bufq_is_empty(&data->req.sendbuf);
  ------------------
  |  Branch (429:10): [True: 0, False: 6.74k]
  |  Branch (429:37): [True: 6.64k, False: 98]
  ------------------
  430|  6.74k|}
Curl_req_want_send:
  433|  6.66k|{
  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|  6.66k|  return !data->req.done &&
  ------------------
  |  Branch (438:10): [True: 6.66k, False: 0]
  ------------------
  439|  6.66k|         !Curl_rlimit_is_blocked(&data->progress.ul.rlimit) &&
  ------------------
  |  Branch (439:10): [True: 6.66k, False: 0]
  ------------------
  440|  6.66k|         (CURL_REQ_WANT_SEND(data) ||
  ------------------
  |  |   39|  13.3k|#define CURL_REQ_WANT_SEND(d)  ((d)->req.io_flags & REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|  6.66k|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  |  |  |  Branch (39:32): [True: 114, False: 6.54k]
  |  |  ------------------
  ------------------
  441|  6.54k|          !Curl_req_sendbuf_empty(data) ||
  ------------------
  |  Branch (441:11): [True: 0, False: 6.54k]
  ------------------
  442|  6.54k|          Curl_xfer_needs_flush(data));
  ------------------
  |  Branch (442:11): [True: 0, False: 6.54k]
  ------------------
  443|  6.66k|}
Curl_req_done_sending:
  454|    232|{
  455|    232|  return data->req.upload_done && !Curl_req_want_send(data);
  ------------------
  |  Branch (455:10): [True: 4, False: 228]
  |  Branch (455:35): [True: 4, False: 0]
  ------------------
  456|    232|}
Curl_req_send_more:
  459|    768|{
  460|    768|  CURLcode result;
  461|       |
  462|       |  /* Fill our send buffer if more from client can be read. */
  463|    768|  if(!data->req.upload_aborted &&
  ------------------
  |  Branch (463:6): [True: 768, False: 0]
  ------------------
  464|    768|     !data->req.eos_read &&
  ------------------
  |  Branch (464:6): [True: 768, False: 0]
  ------------------
  465|    768|     !Curl_xfer_send_is_paused(data) &&
  ------------------
  |  Branch (465:6): [True: 768, False: 0]
  ------------------
  466|    768|     !Curl_bufq_is_full(&data->req.sendbuf)) {
  ------------------
  |  Branch (466:6): [True: 768, False: 0]
  ------------------
  467|    768|    size_t nread;
  468|    768|    result = Curl_bufq_sipn(&data->req.sendbuf, 0,
  469|    768|                            add_from_client, data, &nread);
  470|    768|    if(result && result != CURLE_AGAIN)
  ------------------
  |  Branch (470:8): [True: 12, False: 756]
  |  Branch (470:18): [True: 12, False: 0]
  ------------------
  471|     12|      return result;
  472|    768|  }
  473|       |
  474|    756|  result = req_flush(data);
  475|    756|  if(result == CURLE_AGAIN)
  ------------------
  |  Branch (475:6): [True: 0, False: 756]
  ------------------
  476|      0|    result = CURLE_OK;
  477|       |
  478|    756|  return result;
  479|    768|}
Curl_req_abort_sending:
  482|     68|{
  483|     68|  if(!data->req.upload_done) {
  ------------------
  |  Branch (483:6): [True: 68, False: 0]
  ------------------
  484|     68|    Curl_bufq_reset(&data->req.sendbuf);
  485|     68|    data->req.upload_aborted = TRUE;
  ------------------
  |  | 1045|     68|#define TRUE true
  ------------------
  486|     68|    CURL_REQ_CLEAR_SEND(data);
  ------------------
  |  |   47|     68|  ((d)->req.io_flags &= (uint8_t)~REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|     68|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  ------------------
  487|     68|    return req_set_upload_done(data);
  488|     68|  }
  489|      0|  return CURLE_OK;
  490|     68|}
Curl_req_stop_send_recv:
  493|  2.97k|{
  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|  2.97k|  CURLcode result = CURLE_OK;
  498|  2.97k|  if(CURL_REQ_WANT_SEND(data))
  ------------------
  |  |   39|  2.97k|#define CURL_REQ_WANT_SEND(d)  ((d)->req.io_flags & REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|  2.97k|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  |  |  |  Branch (39:32): [True: 67, False: 2.91k]
  |  |  ------------------
  ------------------
  499|     67|    result = Curl_req_abort_sending(data);
  500|  2.97k|  CURL_REQ_CLEAR_IO(data);
  ------------------
  |  |   51|  2.97k|  ((d)->req.io_flags &= (uint8_t)~(REQ_IO_RECV | REQ_IO_SEND))
  |  |  ------------------
  |  |  |  |   35|  2.97k|#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|  2.97k|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  ------------------
  501|  2.97k|  return result;
  502|  2.97k|}
request.c:req_flush:
  299|    819|{
  300|    819|  CURLcode result;
  301|       |
  302|    819|  if(!data || !data->conn)
  ------------------
  |  Branch (302:6): [True: 0, False: 819]
  |  Branch (302:15): [True: 0, False: 819]
  ------------------
  303|      0|    return CURLE_FAILED_INIT;
  304|       |
  305|    819|  if(!Curl_bufq_is_empty(&data->req.sendbuf)) {
  ------------------
  |  Branch (305:6): [True: 658, False: 161]
  ------------------
  306|    658|    result = req_send_buffer_flush(data);
  307|    658|    if(result)
  ------------------
  |  Branch (307:8): [True: 0, False: 658]
  ------------------
  308|      0|      return result;
  309|    658|    if(!Curl_bufq_is_empty(&data->req.sendbuf)) {
  ------------------
  |  Branch (309:8): [True: 0, False: 658]
  ------------------
  310|      0|      DEBUGF(infof(data, "Curl_req_flush(len=%zu) -> EAGAIN",
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  311|      0|                   Curl_bufq_len(&data->req.sendbuf)));
  312|      0|      return CURLE_AGAIN;
  313|      0|    }
  314|    658|  }
  315|    161|  else if(Curl_xfer_needs_flush(data)) {
  ------------------
  |  Branch (315:11): [True: 0, False: 161]
  ------------------
  316|      0|    DEBUGF(infof(data, "Curl_req_flush(), xfer send_pending"));
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  317|      0|    return Curl_xfer_flush(data);
  318|      0|  }
  319|       |
  320|    819|  if(data->req.eos_read && !data->req.eos_sent) {
  ------------------
  |  Branch (320:6): [True: 588, False: 231]
  |  Branch (320:28): [True: 0, False: 588]
  ------------------
  321|      0|    char tmp = 0;
  322|      0|    size_t nwritten;
  323|      0|    result = xfer_send(data, &tmp, 0, 0, &nwritten);
  324|      0|    if(result)
  ------------------
  |  Branch (324:8): [True: 0, False: 0]
  ------------------
  325|      0|      return result;
  326|      0|    DEBUGASSERT(data->req.eos_sent);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (326:5): [True: 0, False: 0]
  |  Branch (326:5): [True: 0, False: 0]
  ------------------
  327|      0|  }
  328|       |
  329|    819|  if(!data->req.upload_done && data->req.eos_read && data->req.eos_sent) {
  ------------------
  |  Branch (329:6): [True: 774, False: 45]
  |  Branch (329:32): [True: 544, False: 230]
  |  Branch (329:54): [True: 544, False: 0]
  ------------------
  330|    544|    DEBUGASSERT(Curl_bufq_is_empty(&data->req.sendbuf));
  ------------------
  |  | 1075|    544|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (330:5): [True: 0, False: 544]
  |  Branch (330:5): [True: 544, False: 0]
  ------------------
  331|    544|    if(data->req.shutdown) {
  ------------------
  |  Branch (331:8): [True: 0, False: 544]
  ------------------
  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))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324: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.", (int)result);
  337|      0|        result = CURLE_OK;
  338|      0|        done = TRUE;
  ------------------
  |  | 1045|      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|    544|    return req_set_upload_done(data);
  347|    544|  }
  348|    275|  return CURLE_OK;
  349|    819|}
request.c:req_send_buffer_flush:
  244|    658|{
  245|    658|  CURLcode result = CURLE_OK;
  246|    658|  const unsigned char *buf;
  247|    658|  size_t blen;
  248|       |
  249|  1.31k|  while(Curl_bufq_peek(&data->req.sendbuf, &buf, &blen)) {
  ------------------
  |  Branch (249:9): [True: 658, False: 658]
  ------------------
  250|    658|    size_t nwritten, hds_len = CURLMIN(data->req.sendbuf_hds_len, blen);
  ------------------
  |  | 1288|    658|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1288:24): [True: 560, False: 98]
  |  |  ------------------
  ------------------
  251|    658|    result = xfer_send(data, (const char *)buf, blen, hds_len, &nwritten);
  252|    658|    if(result)
  ------------------
  |  Branch (252:8): [True: 0, False: 658]
  ------------------
  253|      0|      break;
  254|       |
  255|    658|    Curl_bufq_skip(&data->req.sendbuf, nwritten);
  256|    658|    if(hds_len) {
  ------------------
  |  Branch (256:8): [True: 654, False: 4]
  ------------------
  257|    654|      data->req.sendbuf_hds_len -= CURLMIN(hds_len, nwritten);
  ------------------
  |  | 1288|    654|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1288:24): [True: 556, False: 98]
  |  |  ------------------
  ------------------
  258|    654|    }
  259|       |    /* leave if we could not send all. Maybe network blocking or
  260|       |     * speed limits on transfer */
  261|    658|    if(nwritten < blen)
  ------------------
  |  Branch (261:8): [True: 0, False: 658]
  ------------------
  262|      0|      break;
  263|    658|  }
  264|    658|  return result;
  265|    658|}
request.c:xfer_send:
  189|  3.60k|{
  190|  3.60k|  CURLcode result = CURLE_OK;
  191|  3.60k|  bool eos = FALSE;
  ------------------
  |  | 1048|  3.60k|#define FALSE false
  ------------------
  192|       |
  193|  3.60k|  *pnwritten = 0;
  194|  3.60k|  DEBUGASSERT(hds_len <= blen);
  ------------------
  |  | 1075|  3.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (194:3): [True: 0, False: 3.60k]
  |  Branch (194:3): [True: 3.60k, False: 0]
  ------------------
  195|  3.60k|#ifdef DEBUGBUILD
  196|  3.60k|  {
  197|       |    /* Allow debug builds to override this logic to force short initial
  198|       |       sends */
  199|  3.60k|    size_t body_len = blen - hds_len;
  200|  3.60k|    if(body_len) {
  ------------------
  |  Branch (200:8): [True: 560, False: 3.04k]
  ------------------
  201|    560|      const char *p = getenv("CURL_SMALLREQSEND");
  202|    560|      if(p) {
  ------------------
  |  Branch (202:10): [True: 0, False: 560]
  ------------------
  203|      0|        curl_off_t body_small;
  204|      0|        if(!curlx_str_number(&p, &body_small, body_len))
  ------------------
  |  Branch (204:12): [True: 0, False: 0]
  ------------------
  205|      0|          blen = hds_len + (size_t)body_small;
  206|      0|      }
  207|    560|    }
  208|  3.60k|  }
  209|  3.60k|#endif
  210|       |  /* Make sure this does not send more body bytes than what the max send
  211|       |     speed says. The headers do not count to the max speed. */
  212|  3.60k|  if(data->set.max_send_speed) {
  ------------------
  |  Branch (212:6): [True: 0, False: 3.60k]
  ------------------
  213|      0|    size_t body_bytes = blen - hds_len;
  214|      0|    if((curl_off_t)body_bytes > data->set.max_send_speed)
  ------------------
  |  Branch (214:8): [True: 0, False: 0]
  ------------------
  215|      0|      blen = hds_len + (size_t)data->set.max_send_speed;
  216|      0|  }
  217|       |
  218|  3.60k|  if(data->req.eos_read &&
  ------------------
  |  Branch (218:6): [True: 3.48k, False: 114]
  ------------------
  219|  3.48k|    (Curl_bufq_is_empty(&data->req.sendbuf) ||
  ------------------
  |  Branch (219:6): [True: 2.94k, False: 544]
  ------------------
  220|  3.48k|     Curl_bufq_len(&data->req.sendbuf) == blen)) {
  ------------------
  |  Branch (220:6): [True: 544, False: 0]
  ------------------
  221|  3.48k|    DEBUGF(infof(data, "sending last upload chunk of %zu bytes", blen));
  ------------------
  |  | 1061|  24.4k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1061:19): [True: 3.48k, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 3.48k]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [Folded, False: 3.48k]
  |  |  ------------------
  ------------------
  222|  3.48k|    eos = TRUE;
  ------------------
  |  | 1045|  3.48k|#define TRUE true
  ------------------
  223|  3.48k|  }
  224|  3.60k|  result = Curl_xfer_send(data, buf, blen, eos, pnwritten);
  225|  3.60k|  if(!result) {
  ------------------
  |  Branch (225:6): [True: 3.60k, False: 0]
  ------------------
  226|  3.60k|    if(eos && (blen == *pnwritten))
  ------------------
  |  Branch (226:8): [True: 3.48k, False: 114]
  |  Branch (226:15): [True: 3.48k, False: 0]
  ------------------
  227|  3.48k|      data->req.eos_sent = TRUE;
  ------------------
  |  | 1045|  3.48k|#define TRUE true
  ------------------
  228|  3.60k|    if(*pnwritten) {
  ------------------
  |  Branch (228:8): [True: 3.60k, False: 0]
  ------------------
  229|  3.60k|      if(hds_len)
  ------------------
  |  Branch (229:10): [True: 3.59k, False: 4]
  ------------------
  230|  3.59k|        Curl_debug(data, CURLINFO_HEADER_OUT, buf,
  231|  3.59k|                   CURLMIN(hds_len, *pnwritten));
  ------------------
  |  | 1288|  3.59k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1288:24): [True: 556, False: 3.04k]
  |  |  ------------------
  ------------------
  232|  3.60k|      if(*pnwritten > hds_len) {
  ------------------
  |  Branch (232:10): [True: 560, False: 3.04k]
  ------------------
  233|    560|        size_t body_len = *pnwritten - hds_len;
  234|    560|        Curl_debug(data, CURLINFO_DATA_OUT, buf + hds_len, body_len);
  235|    560|        data->req.writebytecount += body_len;
  236|    560|        Curl_pgrs_upload_inc(data, body_len);
  237|    560|      }
  238|  3.60k|    }
  239|  3.60k|  }
  240|  3.60k|  return result;
  241|  3.60k|}
request.c:req_set_upload_done:
  268|  3.55k|{
  269|  3.55k|  DEBUGASSERT(!data->req.upload_done);
  ------------------
  |  | 1075|  3.55k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (269:3): [True: 0, False: 3.55k]
  |  Branch (269:3): [True: 3.55k, False: 0]
  ------------------
  270|  3.55k|  data->req.upload_done = TRUE;
  ------------------
  |  | 1045|  3.55k|#define TRUE true
  ------------------
  271|  3.55k|  CURL_REQ_CLEAR_SEND(data);
  ------------------
  |  |   47|  3.55k|  ((d)->req.io_flags &= (uint8_t)~REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|  3.55k|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  ------------------
  272|       |
  273|  3.55k|  if(data->mstate >= MSTATE_DID)
  ------------------
  |  Branch (273:6): [True: 72, False: 3.48k]
  ------------------
  274|     72|    Curl_pgrsTime(data, TIMER_POSTRANSFER);
  275|  3.55k|  Curl_creader_done(data, data->req.upload_aborted);
  276|       |
  277|  3.55k|  if(data->req.upload_aborted) {
  ------------------
  |  Branch (277:6): [True: 68, False: 3.48k]
  ------------------
  278|     68|    Curl_bufq_reset(&data->req.sendbuf);
  279|     68|    if(data->req.writebytecount)
  ------------------
  |  Branch (279:8): [True: 0, False: 68]
  ------------------
  280|      0|      infof(data, "abort upload after having sent %" FMT_OFF_T " bytes",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  281|     68|            data->req.writebytecount);
  282|     68|    else
  283|     68|      infof(data, "abort upload");
  ------------------
  |  |  143|     68|  do {                               \
  |  |  144|     68|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|     68|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 68, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 68]
  |  |  |  |  ------------------
  |  |  |  |  323|     68|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     68|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     68|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 68]
  |  |  ------------------
  ------------------
  284|     68|  }
  285|  3.48k|  else if(data->req.writebytecount)
  ------------------
  |  Branch (285:11): [True: 544, False: 2.94k]
  ------------------
  286|    544|    infof(data, "upload completely sent off: %" FMT_OFF_T " bytes",
  ------------------
  |  |  143|    544|  do {                               \
  |  |  144|    544|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|    544|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 544, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 544]
  |  |  |  |  ------------------
  |  |  |  |  323|    544|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    544|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    544|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 544]
  |  |  ------------------
  ------------------
  287|  3.48k|          data->req.writebytecount);
  288|  2.94k|  else if(!data->req.download_done) {
  ------------------
  |  Branch (288:11): [True: 2.94k, False: 0]
  ------------------
  289|  2.94k|    DEBUGASSERT(Curl_bufq_is_empty(&data->req.sendbuf));
  ------------------
  |  | 1075|  2.94k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (289:5): [True: 0, False: 2.94k]
  |  Branch (289:5): [True: 2.94k, False: 0]
  ------------------
  290|  2.94k|    infof(data, Curl_creader_total_length(data) ?
  ------------------
  |  |  143|  2.94k|  do {                               \
  |  |  144|  2.94k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  2.94k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 2.94k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 2.94k]
  |  |  |  |  ------------------
  |  |  |  |  323|  2.94k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  2.94k|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|  2.94k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2.94k]
  |  |  ------------------
  ------------------
  291|  2.94k|          "We are completely uploaded and fine" :
  292|  2.94k|          "Request completely sent off");
  293|  2.94k|  }
  294|       |
  295|  3.55k|  return Curl_xfer_send_close(data);
  296|  3.55k|}
request.c:req_send_buffer_add:
  368|    654|{
  369|    654|  CURLcode result = CURLE_OK;
  370|    654|  size_t n;
  371|    654|  result = Curl_bufq_cwrite(&data->req.sendbuf, buf, blen, &n);
  372|    654|  if(result)
  ------------------
  |  Branch (372:6): [True: 0, False: 654]
  ------------------
  373|      0|    return result;
  374|       |  /* We rely on a SOFTLIMIT on sendbuf, so it can take all data in */
  375|    654|  DEBUGASSERT(n == blen);
  ------------------
  |  | 1075|    654|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (375:3): [True: 0, False: 654]
  |  Branch (375:3): [True: 654, False: 0]
  ------------------
  376|    654|  data->req.sendbuf_hds_len += hds_len;
  377|    654|  return CURLE_OK;
  378|    654|}
request.c:add_from_client:
  354|    768|{
  355|    768|  struct Curl_easy *data = reader_ctx;
  356|    768|  CURLcode result;
  357|    768|  bool eos;
  358|       |
  359|    768|  result = Curl_client_read(data, (char *)buf, buflen, pnread, &eos);
  360|    768|  if(!result && eos)
  ------------------
  |  Branch (360:6): [True: 756, False: 12]
  |  Branch (360:17): [True: 544, False: 212]
  ------------------
  361|    544|    data->req.eos_read = TRUE;
  ------------------
  |  | 1045|    544|#define TRUE true
  ------------------
  362|    768|  return result;
  363|    768|}

Curl_poll:
  200|  3.01k|{
  201|  3.01k|#ifdef HAVE_POLL
  202|  3.01k|  int pending_ms;
  203|       |#else
  204|       |  fd_set fds_read;
  205|       |  fd_set fds_write;
  206|       |  fd_set fds_err;
  207|       |  curl_socket_t maxfd;
  208|       |#endif
  209|  3.01k|  bool fds_none = TRUE;
  ------------------
  |  | 1045|  3.01k|#define TRUE true
  ------------------
  210|  3.01k|  unsigned int i;
  211|  3.01k|  int r;
  212|       |
  213|  3.01k|  if(ufds) {
  ------------------
  |  Branch (213:6): [True: 3.01k, False: 0]
  ------------------
  214|  3.01k|    for(i = 0; i < nfds; i++) {
  ------------------
  |  Branch (214:16): [True: 3.01k, False: 0]
  ------------------
  215|  3.01k|      if(ufds[i].fd != CURL_SOCKET_BAD) {
  ------------------
  |  |  147|  3.01k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (215:10): [True: 3.01k, False: 0]
  ------------------
  216|  3.01k|        fds_none = FALSE;
  ------------------
  |  | 1048|  3.01k|#define FALSE false
  ------------------
  217|  3.01k|        break;
  218|  3.01k|      }
  219|  3.01k|    }
  220|  3.01k|  }
  221|  3.01k|  if(fds_none) {
  ------------------
  |  Branch (221:6): [True: 0, False: 3.01k]
  ------------------
  222|       |    /* no sockets, wait */
  223|      0|    return curlx_wait_ms(timeout_ms);
  224|      0|  }
  225|       |
  226|       |  /* Avoid initial timestamp, avoid curlx_now() call, when elapsed
  227|       |     time in this function does not need to be measured. This happens
  228|       |     when function is called with a zero timeout or a negative timeout
  229|       |     value indicating a blocking call should be performed. */
  230|       |
  231|  3.01k|#ifdef HAVE_POLL
  232|       |
  233|       |  /* prevent overflow, timeout_ms is typecast to int. */
  234|  3.01k|#if TIMEDIFF_T_MAX > INT_MAX
  235|  3.01k|  if(timeout_ms > INT_MAX)
  ------------------
  |  Branch (235:6): [True: 0, False: 3.01k]
  ------------------
  236|      0|    timeout_ms = INT_MAX;
  237|  3.01k|#endif
  238|  3.01k|  if(timeout_ms > 0)
  ------------------
  |  Branch (238:6): [True: 0, False: 3.01k]
  ------------------
  239|      0|    pending_ms = (int)timeout_ms;
  240|  3.01k|  else if(timeout_ms < 0)
  ------------------
  |  Branch (240:11): [True: 0, False: 3.01k]
  ------------------
  241|      0|    pending_ms = -1;
  242|  3.01k|  else
  243|  3.01k|    pending_ms = 0;
  244|  3.01k|  r = poll(ufds, nfds, pending_ms);
  245|  3.01k|  if(r <= 0) {
  ------------------
  |  Branch (245:6): [True: 0, False: 3.01k]
  ------------------
  246|      0|    if((r == -1) && (SOCKERRNO == SOCKEINTR))
  ------------------
  |  | 1089|      0|#define SOCKERRNO         errno
  ------------------
                  if((r == -1) && (SOCKERRNO == SOCKEINTR))
  ------------------
  |  | 1123|      0|#define SOCKEINTR         EINTR
  ------------------
  |  Branch (246:8): [True: 0, False: 0]
  |  Branch (246:21): [True: 0, False: 0]
  ------------------
  247|       |      /* make EINTR from select or poll not a "lethal" error */
  248|      0|      r = 0;
  249|      0|    return r;
  250|      0|  }
  251|       |
  252|  6.02k|  for(i = 0; i < nfds; i++) {
  ------------------
  |  Branch (252:14): [True: 3.01k, False: 3.01k]
  ------------------
  253|  3.01k|    if(ufds[i].fd == CURL_SOCKET_BAD)
  ------------------
  |  |  147|  3.01k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (253:8): [True: 0, False: 3.01k]
  ------------------
  254|      0|      continue;
  255|  3.01k|    if(ufds[i].revents & POLLHUP)
  ------------------
  |  Branch (255:8): [True: 0, False: 3.01k]
  ------------------
  256|      0|      ufds[i].revents |= POLLIN;
  257|  3.01k|    if(ufds[i].revents & POLLERR)
  ------------------
  |  Branch (257:8): [True: 0, False: 3.01k]
  ------------------
  258|      0|      ufds[i].revents |= POLLIN | POLLOUT;
  259|  3.01k|  }
  260|       |
  261|       |#else /* !HAVE_POLL */
  262|       |
  263|       |  FD_ZERO(&fds_read);
  264|       |  FD_ZERO(&fds_write);
  265|       |  FD_ZERO(&fds_err);
  266|       |  maxfd = (curl_socket_t)-1;
  267|       |
  268|       |  for(i = 0; i < nfds; i++) {
  269|       |    ufds[i].revents = 0;
  270|       |    if(ufds[i].fd == CURL_SOCKET_BAD)
  271|       |      continue;
  272|       |    VERIFY_SOCK(ufds[i].fd);
  273|       |    if(ufds[i].events & (POLLIN | POLLOUT | POLLPRI |
  274|       |                         POLLRDNORM | POLLWRNORM | POLLRDBAND)) {
  275|       |      if(ufds[i].fd > maxfd)
  276|       |        maxfd = ufds[i].fd;
  277|       |      if(ufds[i].events & (POLLRDNORM | POLLIN))
  278|       |        FD_SET(ufds[i].fd, &fds_read);
  279|       |      if(ufds[i].events & (POLLWRNORM | POLLOUT))
  280|       |        FD_SET(ufds[i].fd, &fds_write);
  281|       |      if(ufds[i].events & (POLLRDBAND | POLLPRI))
  282|       |        FD_SET(ufds[i].fd, &fds_err);
  283|       |    }
  284|       |  }
  285|       |
  286|       |  /* Note also that Winsock ignores the first argument, so we do not worry
  287|       |     about the fact that maxfd is computed incorrectly with Winsock (since
  288|       |     curl_socket_t is unsigned in such cases and thus -1 is the largest
  289|       |     value). */
  290|       |  r = our_select(maxfd, &fds_read, &fds_write, &fds_err, timeout_ms);
  291|       |  if(r <= 0) {
  292|       |    if((r == -1) && (SOCKERRNO == SOCKEINTR))
  293|       |      /* make EINTR from select or poll not a "lethal" error */
  294|       |      r = 0;
  295|       |    return r;
  296|       |  }
  297|       |
  298|       |  r = 0;
  299|       |  for(i = 0; i < nfds; i++) {
  300|       |    ufds[i].revents = 0;
  301|       |    if(ufds[i].fd == CURL_SOCKET_BAD)
  302|       |      continue;
  303|       |    if(FD_ISSET(ufds[i].fd, &fds_read)) {
  304|       |      if(ufds[i].events & POLLRDNORM)
  305|       |        ufds[i].revents |= POLLRDNORM;
  306|       |      if(ufds[i].events & POLLIN)
  307|       |        ufds[i].revents |= POLLIN;
  308|       |    }
  309|       |    if(FD_ISSET(ufds[i].fd, &fds_write)) {
  310|       |      if(ufds[i].events & POLLWRNORM)
  311|       |        ufds[i].revents |= POLLWRNORM;
  312|       |      if(ufds[i].events & POLLOUT)
  313|       |        ufds[i].revents |= POLLOUT;
  314|       |    }
  315|       |    if(FD_ISSET(ufds[i].fd, &fds_err)) {
  316|       |      if(ufds[i].events & POLLRDBAND)
  317|       |        ufds[i].revents |= POLLRDBAND;
  318|       |      if(ufds[i].events & POLLPRI)
  319|       |        ufds[i].revents |= POLLPRI;
  320|       |    }
  321|       |    if(ufds[i].revents)
  322|       |      r++;
  323|       |  }
  324|       |
  325|       |#endif /* HAVE_POLL */
  326|       |
  327|  3.01k|  return r;
  328|  3.01k|}
Curl_pollfds_init:
  333|  7.25k|{
  334|  7.25k|  DEBUGASSERT(cpfds);
  ------------------
  |  | 1075|  7.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (334:3): [True: 0, False: 7.25k]
  |  Branch (334:3): [True: 7.25k, False: 0]
  ------------------
  335|  7.25k|  memset(cpfds, 0, sizeof(*cpfds));
  336|  7.25k|  if(static_pfds && static_count) {
  ------------------
  |  Branch (336:6): [True: 7.25k, False: 0]
  |  Branch (336:21): [True: 7.25k, False: 0]
  ------------------
  337|  7.25k|    cpfds->pfds = static_pfds;
  338|  7.25k|    cpfds->count = static_count;
  339|  7.25k|  }
  340|  7.25k|}
Curl_pollfds_cleanup:
  348|  7.25k|{
  349|  7.25k|  DEBUGASSERT(cpfds);
  ------------------
  |  | 1075|  7.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (349:3): [True: 0, False: 7.25k]
  |  Branch (349:3): [True: 7.25k, False: 0]
  ------------------
  350|  7.25k|  if(cpfds->allocated_pfds) {
  ------------------
  |  Branch (350:6): [True: 0, False: 7.25k]
  ------------------
  351|      0|    curlx_free(cpfds->pfds);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  352|      0|  }
  353|  7.25k|  memset(cpfds, 0, sizeof(*cpfds));
  354|  7.25k|}
Curl_pollset_reset:
  482|  14.5k|{
  483|  14.5k|  unsigned int i;
  484|  14.5k|  ps->n = 0;
  485|  14.5k|#ifdef DEBUGBUILD
  486|  14.5k|  DEBUGASSERT(ps->init == CURL_EASY_POLLSET_MAGIC);
  ------------------
  |  | 1075|  14.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (486:3): [True: 0, False: 14.5k]
  |  Branch (486:3): [True: 14.5k, False: 0]
  ------------------
  487|  14.5k|#endif
  488|  14.5k|  DEBUGASSERT(ps->count);
  ------------------
  |  | 1075|  14.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (488:3): [True: 0, False: 14.5k]
  |  Branch (488:3): [True: 14.5k, False: 0]
  ------------------
  489|  43.5k|  for(i = 0; i < ps->count; i++)
  ------------------
  |  Branch (489:14): [True: 29.0k, False: 14.5k]
  ------------------
  490|  29.0k|    ps->sockets[i] = CURL_SOCKET_BAD;
  ------------------
  |  |  147|  43.5k|#define CURL_SOCKET_BAD (-1)
  ------------------
  491|  14.5k|  memset(ps->actions, 0, ps->count * sizeof(ps->actions[0]));
  492|  14.5k|}
Curl_pollset_init:
  495|  7.25k|{
  496|  7.25k|#ifdef DEBUGBUILD
  497|  7.25k|  ps->init = CURL_EASY_POLLSET_MAGIC;
  ------------------
  |  |  129|  7.25k|#define CURL_EASY_POLLSET_MAGIC  0x7a657370
  ------------------
  498|  7.25k|#endif
  499|  7.25k|  ps->sockets = ps->def_sockets;
  500|  7.25k|  ps->actions = ps->def_actions;
  501|  7.25k|  ps->count = CURL_ARRAYSIZE(ps->def_sockets);
  ------------------
  |  | 1299|  7.25k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  502|  7.25k|  ps->n = 0;
  503|  7.25k|  Curl_pollset_reset(ps);
  504|  7.25k|}
Curl_pollset_cleanup:
  515|  7.25k|{
  516|  7.25k|#ifdef DEBUGBUILD
  517|  7.25k|  DEBUGASSERT(ps->init == CURL_EASY_POLLSET_MAGIC);
  ------------------
  |  | 1075|  7.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (517:3): [True: 0, False: 7.25k]
  |  Branch (517:3): [True: 7.25k, False: 0]
  ------------------
  518|  7.25k|#endif
  519|  7.25k|  if(ps->sockets != ps->def_sockets) {
  ------------------
  |  Branch (519:6): [True: 0, False: 7.25k]
  ------------------
  520|      0|    curlx_free(ps->sockets);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  521|      0|    ps->sockets = ps->def_sockets;
  522|      0|  }
  523|  7.25k|  if(ps->actions != ps->def_actions) {
  ------------------
  |  Branch (523:6): [True: 0, False: 7.25k]
  ------------------
  524|      0|    curlx_free(ps->actions);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  525|      0|    ps->actions = ps->def_actions;
  526|      0|  }
  527|  7.25k|  ps->count = CURL_ARRAYSIZE(ps->def_sockets);
  ------------------
  |  | 1299|  7.25k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  528|  7.25k|  Curl_pollset_reset(ps);
  529|  7.25k|}

Curl_client_cleanup:
   72|  7.46k|{
   73|  7.46k|  cl_reset_reader(data);
   74|  7.46k|  cl_reset_writer(data);
   75|       |
   76|  7.46k|  data->req.bytecount = 0;
   77|  7.46k|  data->req.headerline = 0;
   78|  7.46k|}
Curl_client_reset:
   81|  3.73k|{
   82|  3.73k|  if(data->req.rewind_read) {
  ------------------
  |  Branch (82:6): [True: 1, False: 3.73k]
  ------------------
   83|       |    /* already requested */
   84|      1|    CURL_TRC_READ(data, "client_reset, will rewind reader");
  ------------------
  |  |  163|      1|  do {                                                    \
  |  |  164|      1|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  329|      1|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      1|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|      1|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
   85|      1|  }
   86|  3.73k|  else {
   87|  3.73k|    CURL_TRC_READ(data, "client_reset, clear readers");
  ------------------
  |  |  163|  3.73k|  do {                                                    \
  |  |  164|  3.73k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  329|  3.73k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.46k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.73k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.73k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.46k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|  3.73k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|  3.73k|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|  3.73k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 3.73k]
  |  |  ------------------
  ------------------
   88|  3.73k|    cl_reset_reader(data);
   89|  3.73k|  }
   90|  3.73k|  cl_reset_writer(data);
   91|       |
   92|  3.73k|  data->req.bytecount = 0;
   93|  3.73k|  data->req.headerline = 0;
   94|  3.73k|}
Curl_client_start:
   97|  3.62k|{
   98|  3.62k|  if(data->req.rewind_read) {
  ------------------
  |  Branch (98:6): [True: 0, False: 3.62k]
  ------------------
   99|      0|    struct Curl_creader *r = data->req.reader.stack;
  100|      0|    CURLcode result = CURLE_OK;
  101|       |
  102|      0|    CURL_TRC_READ(data, "client start, rewind readers");
  ------------------
  |  |  163|      0|  do {                                                    \
  |  |  164|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|      0|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  103|      0|    while(r) {
  ------------------
  |  Branch (103:11): [True: 0, False: 0]
  ------------------
  104|      0|      result = r->crt->cntrl(data, r, CURL_CRCNTRL_REWIND);
  105|      0|      if(result) {
  ------------------
  |  Branch (105:10): [True: 0, False: 0]
  ------------------
  106|      0|        failf(data, "rewind of client reader '%s' failed: %d",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  107|      0|              r->crt->name, (int)result);
  108|      0|        return result;
  109|      0|      }
  110|      0|      r = r->next;
  111|      0|    }
  112|      0|    data->req.rewind_read = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  113|      0|    cl_reset_reader(data);
  114|      0|  }
  115|  3.62k|  return CURLE_OK;
  116|  3.62k|}
Curl_creader_will_rewind:
  119|     20|{
  120|     20|  return (bool)data->req.rewind_read;
  121|     20|}
Curl_creader_set_rewind:
  124|      1|{
  125|      1|  data->req.rewind_read = !!enable;
  126|      1|}
Curl_cwriter_def_init:
  130|  10.8k|{
  131|  10.8k|  (void)data;
  132|  10.8k|  (void)writer;
  133|  10.8k|  return CURLE_OK;
  134|  10.8k|}
Curl_cwriter_def_flush:
  145|  10.8k|{
  146|  10.8k|  return Curl_cwriter_flush(data, writer->next);
  ------------------
  |  |  191|  10.8k|  ((w) ? (w)->cwt->do_flush((d), (w)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (191:4): [True: 10.8k, False: 0]
  |  |  ------------------
  ------------------
  147|  10.8k|}
Curl_cwriter_def_close:
  151|  10.8k|{
  152|  10.8k|  (void)data;
  153|  10.8k|  (void)writer;
  154|  10.8k|}
Curl_client_write:
  375|    788|{
  376|    788|  CURLcode result;
  377|       |
  378|       |  /* it is one of those, at least */
  379|    788|  DEBUGASSERT(type &
  ------------------
  |  | 1075|    788|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (379:3): [True: 0, False: 788]
  |  Branch (379:3): [True: 788, False: 0]
  ------------------
  380|    788|              (CLIENTWRITE_BODY | CLIENTWRITE_HEADER | CLIENTWRITE_INFO));
  381|       |  /* BODY is only BODY (with optional EOS) */
  382|    788|  DEBUGASSERT(!(type & CLIENTWRITE_BODY) ||
  ------------------
  |  | 1075|    788|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (382:3): [True: 788, False: 0]
  |  Branch (382:3): [True: 0, False: 0]
  |  Branch (382:3): [True: 740, False: 48]
  |  Branch (382:3): [True: 48, False: 0]
  ------------------
  383|    788|              ((type & ~(CLIENTWRITE_BODY | CLIENTWRITE_EOS)) == 0));
  384|       |  /* INFO is only INFO (with optional EOS) */
  385|    788|  DEBUGASSERT(!(type & CLIENTWRITE_INFO) ||
  ------------------
  |  | 1075|    788|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (385:3): [True: 788, False: 0]
  |  Branch (385:3): [True: 0, False: 0]
  |  Branch (385:3): [True: 788, False: 0]
  |  Branch (385:3): [True: 0, False: 0]
  ------------------
  386|    788|              ((type & ~(CLIENTWRITE_INFO | CLIENTWRITE_EOS)) == 0));
  387|       |
  388|    788|  if(!data->req.writer.stack) {
  ------------------
  |  Branch (388:6): [True: 0, False: 788]
  ------------------
  389|      0|    result = do_init_writer_stack(data);
  390|      0|    if(result)
  ------------------
  |  Branch (390:8): [True: 0, False: 0]
  ------------------
  391|      0|      return result;
  392|      0|    DEBUGASSERT(data->req.writer.stack);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (392:5): [True: 0, False: 0]
  |  Branch (392:5): [True: 0, False: 0]
  ------------------
  393|      0|  }
  394|       |
  395|    788|  result = Curl_cwriter_write(data, data->req.writer.stack, type, buf, len);
  ------------------
  |  |  188|    788|  ((w) ? (w)->cwt->do_write((d), (w), (t), (b), (n)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (188:4): [True: 788, False: 0]
  |  |  ------------------
  ------------------
  396|    788|  CURL_TRC_WRITE(data, "client_write(type=%x, len=%zu) -> %d",
  ------------------
  |  |  158|    788|  do {                                                     \
  |  |  159|    788|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|    788|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  1.57k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 788, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 788]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  1.57k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|    788|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|    788|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|    788|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 788]
  |  |  ------------------
  ------------------
  397|    788|                 (unsigned int)type, len, (int)result);
  398|    788|  return result;
  399|    788|}
Curl_client_flush:
  402|  3.62k|{
  403|  3.62k|  CURLcode result;
  404|       |
  405|  3.62k|  if(!data->req.writer.stack) {
  ------------------
  |  Branch (405:6): [True: 0, False: 3.62k]
  ------------------
  406|      0|    result = do_init_writer_stack(data);
  407|      0|    if(result)
  ------------------
  |  Branch (407:8): [True: 0, False: 0]
  ------------------
  408|      0|      return result;
  409|      0|    DEBUGASSERT(data->req.writer.stack);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (409:5): [True: 0, False: 0]
  |  Branch (409:5): [True: 0, False: 0]
  ------------------
  410|      0|  }
  411|       |
  412|  3.62k|  result = Curl_cwriter_flush(data, data->req.writer.stack);
  ------------------
  |  |  191|  3.62k|  ((w) ? (w)->cwt->do_flush((d), (w)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (191:4): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  413|  3.62k|  CURL_TRC_WRITE(data, "client_flush() -> %d", (int)result);
  ------------------
  |  |  158|  3.62k|  do {                                                     \
  |  |  159|  3.62k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|  3.62k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|  3.62k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  3.62k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  414|  3.62k|  return result;
  415|  3.62k|}
Curl_cwriter_create:
  422|  14.5k|{
  423|  14.5k|  struct Curl_cwriter *writer = NULL;
  424|  14.5k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  425|  14.5k|  void *p;
  426|       |
  427|  14.5k|  DEBUGASSERT(cwt->cwriter_size >= sizeof(struct Curl_cwriter));
  ------------------
  |  | 1075|  14.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (427:3): [True: 0, False: 14.5k]
  |  Branch (427:3): [True: 14.5k, False: 0]
  ------------------
  428|  14.5k|  p = curlx_calloc(1, cwt->cwriter_size);
  ------------------
  |  | 1473|  14.5k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  429|  14.5k|  if(!p)
  ------------------
  |  Branch (429:6): [True: 0, False: 14.5k]
  ------------------
  430|      0|    goto out;
  431|       |
  432|  14.5k|  writer = (struct Curl_cwriter *)p;
  433|  14.5k|  writer->cwt = cwt;
  434|  14.5k|  writer->ctx = p;
  435|  14.5k|  writer->phase = phase;
  436|  14.5k|  result = cwt->do_init(data, writer);
  437|       |
  438|  14.5k|out:
  439|  14.5k|  *pwriter = result ? NULL : writer;
  ------------------
  |  Branch (439:14): [True: 0, False: 14.5k]
  ------------------
  440|  14.5k|  if(result)
  ------------------
  |  Branch (440:6): [True: 0, False: 14.5k]
  ------------------
  441|      0|    curlx_free(writer);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  442|  14.5k|  return result;
  443|  14.5k|}
Curl_cwriter_count:
  455|      7|{
  456|      7|  struct Curl_cwriter *w;
  457|      7|  size_t n = 0;
  458|       |
  459|     38|  for(w = data->req.writer.stack; w; w = w->next) {
  ------------------
  |  Branch (459:35): [True: 31, False: 7]
  ------------------
  460|     31|    if(w->phase == phase)
  ------------------
  |  Branch (460:8): [True: 0, False: 31]
  ------------------
  461|      0|      ++n;
  462|     31|  }
  463|      7|  return n;
  464|      7|}
Curl_cwriter_add:
  483|  3.63k|{
  484|  3.63k|  CURLcode result;
  485|  3.63k|  struct Curl_cwriter **anchor = &data->req.writer.stack;
  486|       |
  487|  3.63k|  if(!*anchor) {
  ------------------
  |  Branch (487:6): [True: 3.62k, False: 7]
  ------------------
  488|  3.62k|    result = do_init_writer_stack(data);
  489|  3.62k|    if(result)
  ------------------
  |  Branch (489:8): [True: 0, False: 3.62k]
  ------------------
  490|      0|      return result;
  491|  3.62k|  }
  492|       |
  493|  3.63k|  if(writer->cwt->flags & CURL_CW_FLAG_BLOWUP) {
  ------------------
  |  |  114|  3.63k|#define CURL_CW_FLAG_BLOWUP     (1U << 0)
  ------------------
  |  Branch (493:6): [True: 3, False: 3.63k]
  ------------------
  494|       |    /* On adding a writer that may blow up write sizes, e.g. zip bombs,
  495|       |     * add the pause writer. Do this first as any failure will make the
  496|       |     * caller destroy the writer again. */
  497|      3|    result = cwriter_ensure_pause_writer(data);
  498|      3|    if(result)
  ------------------
  |  Branch (498:8): [True: 0, False: 3]
  ------------------
  499|      0|      return result;
  500|      3|  }
  501|       |
  502|  3.63k|  cwriter_add(data, writer);
  503|  3.63k|  return CURLE_OK;
  504|  3.63k|}
Curl_cwriter_get_by_name:
  508|  7.24k|{
  509|  7.24k|  struct Curl_cwriter *writer;
  510|  10.8k|  for(writer = data->req.writer.stack; writer; writer = writer->next) {
  ------------------
  |  Branch (510:40): [True: 7.22k, False: 3.62k]
  ------------------
  511|  7.22k|    if(!strcmp(name, writer->cwt->name))
  ------------------
  |  Branch (511:8): [True: 3.61k, False: 3.61k]
  ------------------
  512|  3.61k|      return writer;
  513|  7.22k|  }
  514|  3.62k|  return NULL;
  515|  7.24k|}
Curl_cwriter_get_by_type:
  519|  3.63k|{
  520|  3.63k|  struct Curl_cwriter *writer;
  521|  14.5k|  for(writer = data->req.writer.stack; writer; writer = writer->next) {
  ------------------
  |  Branch (521:40): [True: 14.5k, False: 7]
  ------------------
  522|  14.5k|    if(writer->cwt == cwt)
  ------------------
  |  Branch (522:8): [True: 3.62k, False: 10.9k]
  ------------------
  523|  3.62k|      return writer;
  524|  14.5k|  }
  525|      7|  return NULL;
  526|  3.63k|}
Curl_creader_read:
  537|    974|{
  538|    974|  *nread = 0;
  539|    974|  *eos = FALSE;
  ------------------
  |  | 1048|    974|#define FALSE false
  ------------------
  540|    974|  if(!reader)
  ------------------
  |  Branch (540:6): [True: 0, False: 974]
  ------------------
  541|      0|    return CURLE_READ_ERROR;
  542|    974|  return reader->crt->do_read(data, reader, buf, blen, nread, eos);
  543|    974|}
Curl_creader_def_init:
  556|  3.05k|{
  557|  3.05k|  (void)data;
  558|  3.05k|  (void)reader;
  559|  3.05k|  return CURLE_OK;
  560|  3.05k|}
Curl_creader_def_close:
  564|  3.08k|{
  565|  3.08k|  (void)data;
  566|  3.08k|  (void)reader;
  567|  3.08k|}
Curl_creader_def_total_length:
  594|      8|{
  595|      8|  return reader->next ?
  ------------------
  |  Branch (595:10): [True: 8, False: 0]
  ------------------
  596|      8|         reader->next->crt->total_length(data, reader->next) : -1;
  597|      8|}
Curl_creader_def_done:
  629|  3.64k|{
  630|  3.64k|  (void)data;
  631|  3.64k|  (void)reader;
  632|  3.64k|  (void)premature;
  633|  3.64k|}
Curl_creader_create:
  950|  3.81k|{
  951|  3.81k|  struct Curl_creader *reader = NULL;
  952|  3.81k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  953|  3.81k|  void *p;
  954|       |
  955|  3.81k|  DEBUGASSERT(crt->creader_size >= sizeof(struct Curl_creader));
  ------------------
  |  | 1075|  3.81k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (955:3): [True: 0, False: 3.81k]
  |  Branch (955:3): [True: 3.81k, False: 0]
  ------------------
  956|  3.81k|  p = curlx_calloc(1, crt->creader_size);
  ------------------
  |  | 1473|  3.81k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  957|  3.81k|  if(!p)
  ------------------
  |  Branch (957:6): [True: 0, False: 3.81k]
  ------------------
  958|      0|    goto out;
  959|       |
  960|  3.81k|  reader = (struct Curl_creader *)p;
  961|  3.81k|  reader->crt = crt;
  962|  3.81k|  reader->ctx = p;
  963|  3.81k|  reader->phase = phase;
  964|  3.81k|  result = crt->do_init(data, reader);
  965|       |
  966|  3.81k|out:
  967|  3.81k|  *preader = result ? NULL : reader;
  ------------------
  |  Branch (967:14): [True: 0, False: 3.81k]
  ------------------
  968|  3.81k|  if(result)
  ------------------
  |  Branch (968:6): [True: 0, False: 3.81k]
  ------------------
  969|      0|    curlx_free(reader);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  970|  3.81k|  return result;
  971|  3.81k|}
Curl_creader_set_fread:
 1153|     32|{
 1154|     32|  CURLcode result;
 1155|     32|  struct Curl_creader *r;
 1156|     32|  struct cr_in_ctx *ctx;
 1157|       |
 1158|     32|  result = Curl_creader_create(&r, data, &cr_in, CURL_CR_CLIENT);
 1159|     32|  if(result || !r)
  ------------------
  |  Branch (1159:6): [True: 0, False: 32]
  |  Branch (1159:16): [True: 0, False: 32]
  ------------------
 1160|      0|    goto out;
 1161|     32|  ctx = r->ctx;
 1162|     32|  ctx->total_len = len;
 1163|       |
 1164|     32|  cl_reset_reader(data);
 1165|     32|  result = do_init_reader_stack(data, r);
 1166|     32|out:
 1167|     32|  CURL_TRC_READ(data, "add fread reader, len=%" FMT_OFF_T " -> %d",
  ------------------
  |  |  163|     32|  do {                                                    \
  |  |  164|     32|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  329|     32|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     64|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 32, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 32]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     64|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|     32|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|     32|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|     32|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 32]
  |  |  ------------------
  ------------------
 1168|     32|                len, (int)result);
 1169|     32|  return result;
 1170|     32|}
Curl_creader_add:
 1174|    212|{
 1175|    212|  CURLcode result;
 1176|    212|  struct Curl_creader **anchor = &data->req.reader.stack;
 1177|       |
 1178|    212|  if(!*anchor) {
  ------------------
  |  Branch (1178:6): [True: 0, False: 212]
  ------------------
 1179|      0|    result = Curl_creader_set_fread(data, data->state.infilesize);
 1180|      0|    if(result)
  ------------------
  |  Branch (1180:8): [True: 0, False: 0]
  ------------------
 1181|      0|      return result;
 1182|      0|  }
 1183|       |
 1184|       |  /* Insert the writer as first in its phase.
 1185|       |   * Skip existing readers of lower phases. */
 1186|    302|  while(*anchor && (*anchor)->phase < reader->phase)
  ------------------
  |  Branch (1186:9): [True: 302, False: 0]
  |  Branch (1186:20): [True: 90, False: 212]
  ------------------
 1187|     90|    anchor = &(*anchor)->next;
 1188|    212|  reader->next = *anchor;
 1189|    212|  *anchor = reader;
 1190|    212|  return CURLE_OK;
 1191|    212|}
Curl_creader_set:
 1194|    608|{
 1195|    608|  CURLcode result;
 1196|       |
 1197|    608|  DEBUGASSERT(r);
  ------------------
  |  | 1075|    608|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1197:3): [True: 0, False: 608]
  |  Branch (1197:3): [True: 608, False: 0]
  ------------------
 1198|    608|  DEBUGASSERT(r->crt);
  ------------------
  |  | 1075|    608|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1198:3): [True: 0, False: 608]
  |  Branch (1198:3): [True: 608, False: 0]
  ------------------
 1199|    608|  DEBUGASSERT(r->phase == CURL_CR_CLIENT);
  ------------------
  |  | 1075|    608|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1199:3): [True: 0, False: 608]
  |  Branch (1199:3): [True: 608, False: 0]
  ------------------
 1200|       |
 1201|    608|  cl_reset_reader(data);
 1202|    608|  result = do_init_reader_stack(data, r);
 1203|    608|  if(result)
  ------------------
  |  Branch (1203:6): [True: 0, False: 608]
  ------------------
 1204|      0|    Curl_creader_free(data, r);
 1205|    608|  return result;
 1206|    608|}
Curl_client_read:
 1210|    768|{
 1211|    768|  CURLcode result;
 1212|       |
 1213|    768|  DEBUGASSERT(buf);
  ------------------
  |  | 1075|    768|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1213:3): [True: 0, False: 768]
  |  Branch (1213:3): [True: 768, False: 0]
  ------------------
 1214|    768|  DEBUGASSERT(blen);
  ------------------
  |  | 1075|    768|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1214:3): [True: 0, False: 768]
  |  Branch (1214:3): [True: 768, False: 0]
  ------------------
 1215|    768|  DEBUGASSERT(nread);
  ------------------
  |  | 1075|    768|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1215:3): [True: 0, False: 768]
  |  Branch (1215:3): [True: 768, False: 0]
  ------------------
 1216|    768|  DEBUGASSERT(eos);
  ------------------
  |  | 1075|    768|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1216:3): [True: 0, False: 768]
  |  Branch (1216:3): [True: 768, False: 0]
  ------------------
 1217|    768|  *nread = 0;
 1218|       |
 1219|    768|  if(!data->req.reader.stack) {
  ------------------
  |  Branch (1219:6): [True: 0, False: 768]
  ------------------
 1220|      0|    result = Curl_creader_set_fread(data, data->state.infilesize);
 1221|      0|    if(result)
  ------------------
  |  Branch (1221:8): [True: 0, False: 0]
  ------------------
 1222|      0|      return result;
 1223|      0|    DEBUGASSERT(data->req.reader.stack);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1223:5): [True: 0, False: 0]
  |  Branch (1223:5): [True: 0, False: 0]
  ------------------
 1224|      0|  }
 1225|    768|  if(!data->req.reader_started) {
  ------------------
  |  Branch (1225:6): [True: 654, False: 114]
  ------------------
 1226|    654|    Curl_rlimit_start(&data->progress.ul.rlimit, Curl_pgrs_now(data), -1);
 1227|    654|    data->req.reader_started = TRUE;
  ------------------
  |  | 1045|    654|#define TRUE true
  ------------------
 1228|    654|  }
 1229|       |
 1230|    768|  if(Curl_rlimit_active(&data->progress.ul.rlimit)) {
  ------------------
  |  Branch (1230:6): [True: 0, False: 768]
  ------------------
 1231|      0|    curl_off_t ul_avail = Curl_rlimit_avail(&data->progress.ul.rlimit, NULL);
 1232|      0|    if(ul_avail <= 0) {
  ------------------
  |  Branch (1232:8): [True: 0, False: 0]
  ------------------
 1233|      0|      result = CURLE_OK;
 1234|      0|      *eos = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1235|      0|      goto out;
 1236|      0|    }
 1237|      0|    if(ul_avail < (curl_off_t)blen)
  ------------------
  |  Branch (1237:8): [True: 0, False: 0]
  ------------------
 1238|      0|      blen = (size_t)ul_avail;
 1239|      0|  }
 1240|    768|  result = Curl_creader_read(data, data->req.reader.stack, buf, blen,
 1241|    768|                             nread, eos);
 1242|       |
 1243|    768|out:
 1244|    768|  CURL_TRC_READ(data, "client_read(len=%zu) -> %d, nread=%zu, eos=%d",
  ------------------
  |  |  163|    768|  do {                                                    \
  |  |  164|    768|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  329|    768|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  1.53k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 768, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 768]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  1.53k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|    768|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|    768|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|    768|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 768]
  |  |  ------------------
  ------------------
 1245|    768|                blen, (int)result, *nread, *eos);
 1246|    768|  return result;
 1247|    768|}
Curl_creader_needs_rewind:
 1250|      1|{
 1251|      1|  struct Curl_creader *reader = data->req.reader.stack;
 1252|      1|  while(reader) {
  ------------------
  |  Branch (1252:9): [True: 1, False: 0]
  ------------------
 1253|      1|    if(reader->crt->needs_rewind(data, reader)) {
  ------------------
  |  Branch (1253:8): [True: 1, False: 0]
  ------------------
 1254|      1|      CURL_TRC_READ(data, "client reader needs rewind before next request");
  ------------------
  |  |  163|      1|  do {                                                    \
  |  |  164|      1|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  329|      1|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      1|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|      1|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
 1255|      1|      return TRUE;
  ------------------
  |  | 1045|      1|#define TRUE true
  ------------------
 1256|      1|    }
 1257|      0|    reader = reader->next;
 1258|      0|  }
 1259|      0|  return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1260|      1|}
Curl_creader_set_null:
 1300|  2.94k|{
 1301|  2.94k|  struct Curl_creader *r;
 1302|  2.94k|  CURLcode result;
 1303|       |
 1304|  2.94k|  result = Curl_creader_create(&r, data, &cr_null, CURL_CR_CLIENT);
 1305|  2.94k|  if(result)
  ------------------
  |  Branch (1305:6): [True: 0, False: 2.94k]
  ------------------
 1306|      0|    return result;
 1307|       |
 1308|  2.94k|  cl_reset_reader(data);
 1309|  2.94k|  return do_init_reader_stack(data, r);
 1310|  2.94k|}
Curl_creader_set_buf:
 1415|     16|{
 1416|     16|  CURLcode result;
 1417|     16|  struct Curl_creader *r;
 1418|     16|  struct cr_buf_ctx *ctx;
 1419|       |
 1420|     16|  result = Curl_creader_create(&r, data, &cr_buf, CURL_CR_CLIENT);
 1421|     16|  if(result)
  ------------------
  |  Branch (1421:6): [True: 0, False: 16]
  ------------------
 1422|      0|    goto out;
 1423|     16|  ctx = r->ctx;
 1424|     16|  ctx->buf = buf;
 1425|     16|  ctx->blen = blen;
 1426|     16|  ctx->index = 0;
 1427|       |
 1428|     16|  cl_reset_reader(data);
 1429|     16|  result = do_init_reader_stack(data, r);
 1430|     16|out:
 1431|     16|  CURL_TRC_READ(data, "add buf reader, len=%zu -> %d", blen, (int)result);
  ------------------
  |  |  163|     16|  do {                                                    \
  |  |  164|     16|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  329|     16|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     32|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 16, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 16]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     32|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|     16|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|     16|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|     16|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 16]
  |  |  ------------------
  ------------------
 1432|     16|  return result;
 1433|     16|}
Curl_creader_total_length:
 1436|  11.3k|{
 1437|  11.3k|  struct Curl_creader *r = data->req.reader.stack;
 1438|  11.3k|  return r ? r->crt->total_length(data, r) : -1;
  ------------------
  |  Branch (1438:10): [True: 11.3k, False: 0]
  ------------------
 1439|  11.3k|}
Curl_creader_client_length:
 1442|    665|{
 1443|    665|  struct Curl_creader *r = data->req.reader.stack;
 1444|    765|  while(r && r->phase != CURL_CR_CLIENT)
  ------------------
  |  Branch (1444:9): [True: 765, False: 0]
  |  Branch (1444:14): [True: 100, False: 665]
  ------------------
 1445|    100|    r = r->next;
 1446|    665|  return r ? r->crt->total_length(data, r) : -1;
  ------------------
  |  Branch (1446:10): [True: 665, False: 0]
  ------------------
 1447|    665|}
Curl_creader_done:
 1485|  3.55k|{
 1486|  3.55k|  struct Curl_creader *reader = data->req.reader.stack;
 1487|  7.26k|  while(reader) {
  ------------------
  |  Branch (1487:9): [True: 3.70k, False: 3.55k]
  ------------------
 1488|  3.70k|    reader->crt->done(data, reader, premature);
 1489|  3.70k|    reader = reader->next;
 1490|  3.70k|  }
 1491|  3.55k|}
Curl_creader_get_by_type:
 1495|      4|{
 1496|      4|  struct Curl_creader *r;
 1497|     10|  for(r = data->req.reader.stack; r; r = r->next) {
  ------------------
  |  Branch (1497:35): [True: 7, False: 3]
  ------------------
 1498|      7|    if(r->crt == crt)
  ------------------
  |  Branch (1498:8): [True: 1, False: 6]
  ------------------
 1499|      1|      return r;
 1500|      7|  }
 1501|      3|  return NULL;
 1502|      4|}
sendf.c:cl_reset_reader:
   60|  14.7k|{
   61|  14.7k|  struct Curl_creader *reader = data->req.reader.stack;
   62|  14.7k|  data->req.reader_started = FALSE;
  ------------------
  |  | 1048|  14.7k|#define FALSE false
  ------------------
   63|  18.6k|  while(reader) {
  ------------------
  |  Branch (63:9): [True: 3.81k, False: 14.7k]
  ------------------
   64|  3.81k|    data->req.reader.stack = reader->next;
   65|  3.81k|    reader->crt->do_close(data, reader);
   66|  3.81k|    curlx_free(reader);
  ------------------
  |  | 1476|  3.81k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   67|  3.81k|    reader = data->req.reader.stack;
   68|  3.81k|  }
   69|  14.7k|}
sendf.c:cl_reset_writer:
   48|  11.2k|{
   49|  11.2k|  struct Curl_cwriter *writer = data->req.writer.stack;
   50|  25.7k|  while(writer) {
  ------------------
  |  Branch (50:9): [True: 14.5k, False: 11.2k]
  ------------------
   51|  14.5k|    data->req.writer.stack = writer->next;
   52|  14.5k|    writer->cwt->do_close(data, writer);
   53|  14.5k|    curlx_free(writer);
  ------------------
  |  | 1476|  14.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   54|  14.5k|    writer = data->req.writer.stack;
   55|  14.5k|  }
   56|       |  data->req.writer.paused = FALSE;
  ------------------
  |  | 1048|  11.2k|#define FALSE false
  ------------------
   57|  11.2k|}
sendf.c:do_init_writer_stack:
  345|  3.62k|{
  346|  3.62k|  struct Curl_cwriter *writer;
  347|  3.62k|  CURLcode result;
  348|       |
  349|  3.62k|  DEBUGASSERT(!data->req.writer.stack);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (349:3): [True: 0, False: 3.62k]
  |  Branch (349:3): [True: 3.62k, False: 0]
  ------------------
  350|  3.62k|  result = Curl_cwriter_create(&data->req.writer.stack,
  351|  3.62k|                               data, &Curl_cwt_out, CURL_CW_CLIENT);
  352|  3.62k|  if(result)
  ------------------
  |  Branch (352:6): [True: 0, False: 3.62k]
  ------------------
  353|      0|    return result;
  354|       |
  355|  3.62k|  result = Curl_cwriter_create(&writer, data, &cw_download, CURL_CW_PROTOCOL);
  356|  3.62k|  if(result)
  ------------------
  |  Branch (356:6): [True: 0, False: 3.62k]
  ------------------
  357|      0|    return result;
  358|  3.62k|  cwriter_add(data, writer);
  359|       |
  360|  3.62k|  result = Curl_cwriter_create(&writer, data, &cw_raw, CURL_CW_RAW);
  361|  3.62k|  if(result)
  ------------------
  |  Branch (361:6): [True: 0, False: 3.62k]
  ------------------
  362|      0|    return result;
  363|  3.62k|  cwriter_add(data, writer);
  364|       |
  365|  3.62k|  return result;
  366|  3.62k|}
sendf.c:cw_download_write:
  176|    234|{
  177|    234|  struct cw_download_ctx *ctx = writer->ctx;
  178|    234|  CURLcode result;
  179|    234|  size_t nwrite, excess_len = 0;
  180|    234|  bool is_connect = !!(type & CLIENTWRITE_CONNECT);
  ------------------
  |  |   47|    234|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  181|       |
  182|    234|  if(!ctx->started_response &&
  ------------------
  |  Branch (182:6): [True: 64, False: 170]
  ------------------
  183|     64|     !(type & CLIENTWRITE_CONNECT) &&
  ------------------
  |  |   47|     64|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  |  Branch (183:6): [True: 64, False: 0]
  ------------------
  184|     64|     (!(type & CLIENTWRITE_INFO) || data->req.upload_done)) {
  ------------------
  |  |   44|     64|#define CLIENTWRITE_INFO    (1 << 1) /* meta information, not a HEADER */
  ------------------
  |  Branch (184:7): [True: 64, False: 0]
  |  Branch (184:37): [True: 0, False: 0]
  ------------------
  185|     64|    Curl_pgrsTime(data, TIMER_STARTTRANSFER);
  186|     64|    ctx->started_response = TRUE;
  ------------------
  |  | 1045|     64|#define TRUE true
  ------------------
  187|     64|  }
  188|       |
  189|    234|  if(!(type & CLIENTWRITE_BODY)) {
  ------------------
  |  |   43|    234|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (189:6): [True: 187, False: 47]
  ------------------
  190|    187|    if(is_connect && data->set.suppress_connect_headers)
  ------------------
  |  Branch (190:8): [True: 0, False: 187]
  |  Branch (190:22): [True: 0, False: 0]
  ------------------
  191|      0|      return CURLE_OK;
  192|    187|#ifdef DEBUGBUILD
  193|    187|    if(is_connect && getenv("CURL_DBG_SUPPRESS_CONNECT_HDS"))
  ------------------
  |  Branch (193:8): [True: 0, False: 187]
  |  Branch (193:22): [True: 0, False: 0]
  ------------------
  194|      0|      return CURLE_OK;
  195|    187|#endif
  196|    187|    result = Curl_cwriter_write(data, writer->next, type, buf, nbytes);
  ------------------
  |  |  188|    187|  ((w) ? (w)->cwt->do_write((d), (w), (t), (b), (n)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (188:4): [True: 187, False: 0]
  |  |  ------------------
  ------------------
  197|    187|    CURL_TRC_WRITE(data, "download_write header(type=%x, blen=%zu) -> %d",
  ------------------
  |  |  158|    187|  do {                                                     \
  |  |  159|    187|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|    187|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|    374|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 187, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 187]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|    374|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|    187|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|    187|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|    187|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 187]
  |  |  ------------------
  ------------------
  198|    187|                   (unsigned int)type, nbytes, (int)result);
  199|    187|    return result;
  200|    187|  }
  201|       |
  202|     47|  if(!ctx->started_body &&
  ------------------
  |  Branch (202:6): [True: 30, False: 17]
  ------------------
  203|     30|     !(type & (CLIENTWRITE_INFO | CLIENTWRITE_CONNECT))) {
  ------------------
  |  |   44|     30|#define CLIENTWRITE_INFO    (1 << 1) /* meta information, not a HEADER */
  ------------------
                   !(type & (CLIENTWRITE_INFO | CLIENTWRITE_CONNECT))) {
  ------------------
  |  |   47|     30|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  |  Branch (203:6): [True: 30, False: 0]
  ------------------
  204|     30|    Curl_rlimit_start(&data->progress.dl.rlimit, Curl_pgrs_now(data),
  205|     30|                      data->req.size);
  206|     30|    ctx->started_body = TRUE;
  ------------------
  |  | 1045|     30|#define TRUE true
  ------------------
  207|     30|  }
  208|       |
  209|       |  /* Here, we deal with REAL BODY bytes. All filtering and transfer
  210|       |   * encodings have been applied and only the true content, e.g. BODY,
  211|       |   * bytes are passed here.
  212|       |   * This allows us to check sizes, update stats, etc. independent
  213|       |   * from the protocol in play. */
  214|       |
  215|     47|  if(data->req.no_body && nbytes > 0) {
  ------------------
  |  Branch (215:6): [True: 1, False: 46]
  |  Branch (215:27): [True: 1, False: 0]
  ------------------
  216|       |    /* BODY arrives although we want none, bail out */
  217|      1|    streamclose(data->conn);
  ------------------
  |  |   89|      1|#define streamclose(x) Curl_conncontrol((x), CONNCTRL_STREAM_CLOSE)
  |  |  ------------------
  |  |  |  |   85|      1|#define CONNCTRL_STREAM_CLOSE    2
  |  |  ------------------
  ------------------
  218|      1|    CURL_TRC_WRITE(data, "download_write body(type=%x, blen=%zu), "
  ------------------
  |  |  158|      1|  do {                                                     \
  |  |  159|      1|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|      1|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 1, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      1|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      1|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  219|      1|                   "did not want a BODY", (unsigned int)type, nbytes);
  220|      1|    data->req.download_done = TRUE;
  ------------------
  |  | 1045|      1|#define TRUE true
  ------------------
  221|      1|    if(data->info.header_size)
  ------------------
  |  Branch (221:8): [True: 1, False: 0]
  ------------------
  222|       |      /* if headers have been received, this is fine */
  223|      1|      return CURLE_OK;
  224|      0|    return CURLE_WEIRD_SERVER_REPLY;
  225|      1|  }
  226|       |
  227|       |  /* Determine if we see any bytes in excess to what is allowed.
  228|       |   * We write the allowed bytes and handle excess further below.
  229|       |   * This gives deterministic BODY writes on varying buffer receive
  230|       |   * lengths. */
  231|     46|  nwrite = nbytes;
  232|     46|  if(data->req.maxdownload != -1) {
  ------------------
  |  Branch (232:6): [True: 19, False: 27]
  ------------------
  233|     19|    size_t wmax = get_max_body_write_len(data, data->req.maxdownload);
  234|     19|    if(nwrite > wmax) {
  ------------------
  |  Branch (234:8): [True: 16, False: 3]
  ------------------
  235|     16|      excess_len = nbytes - wmax;
  236|     16|      nwrite = wmax;
  237|     16|    }
  238|       |
  239|     19|    if(nwrite == wmax) {
  ------------------
  |  Branch (239:8): [True: 19, False: 0]
  ------------------
  240|     19|      data->req.download_done = TRUE;
  ------------------
  |  | 1045|     19|#define TRUE true
  ------------------
  241|     19|    }
  242|       |
  243|     19|    if((type & CLIENTWRITE_EOS) && !data->req.no_body &&
  ------------------
  |  |   50|     19|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  |  Branch (243:8): [True: 0, False: 19]
  |  Branch (243:36): [True: 0, False: 0]
  ------------------
  244|      0|       (data->req.size > data->req.bytecount)) {
  ------------------
  |  Branch (244:8): [True: 0, False: 0]
  ------------------
  245|      0|      failf(data, "end of response with %" FMT_OFF_T " bytes missing",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  246|      0|            data->req.size - data->req.bytecount);
  247|      0|      return CURLE_PARTIAL_FILE;
  248|      0|    }
  249|     19|  }
  250|       |
  251|       |  /* Error on too large filesize is handled below, after writing
  252|       |   * the permitted bytes */
  253|     46|  if(data->set.max_filesize && !data->req.ignorebody) {
  ------------------
  |  Branch (253:6): [True: 1, False: 45]
  |  Branch (253:32): [True: 1, False: 0]
  ------------------
  254|      1|    size_t wmax = get_max_body_write_len(data, data->set.max_filesize);
  255|      1|    if(nwrite > wmax) {
  ------------------
  |  Branch (255:8): [True: 0, False: 1]
  ------------------
  256|      0|      nwrite = wmax;
  257|      0|    }
  258|      1|  }
  259|       |
  260|     46|  if(!data->req.ignorebody && (nwrite || (type & CLIENTWRITE_EOS))) {
  ------------------
  |  |   50|     23|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  |  Branch (260:6): [True: 46, False: 0]
  |  Branch (260:32): [True: 23, False: 23]
  |  Branch (260:42): [True: 9, False: 14]
  ------------------
  261|     32|    result = Curl_cwriter_write(data, writer->next, type, buf, nwrite);
  ------------------
  |  |  188|     32|  ((w) ? (w)->cwt->do_write((d), (w), (t), (b), (n)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (188:4): [True: 32, False: 0]
  |  |  ------------------
  ------------------
  262|     32|    CURL_TRC_WRITE(data, "download_write body(type=%x, blen=%zu) -> %d",
  ------------------
  |  |  158|     32|  do {                                                     \
  |  |  159|     32|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|     32|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     64|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 32, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 32]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     64|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|     32|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|     32|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|     32|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 32]
  |  |  ------------------
  ------------------
  263|     32|                   (unsigned int)type, nbytes, (int)result);
  264|     32|    if(result)
  ------------------
  |  Branch (264:8): [True: 0, False: 32]
  ------------------
  265|      0|      return result;
  266|     32|  }
  267|       |
  268|       |  /* Update stats, write and report progress */
  269|     46|  if(nwrite) {
  ------------------
  |  Branch (269:6): [True: 23, False: 23]
  ------------------
  270|     23|    data->req.bytecount += nwrite;
  271|     23|    Curl_pgrs_download_inc(data, nwrite);
  272|     23|  }
  273|       |
  274|     46|  if(excess_len) {
  ------------------
  |  Branch (274:6): [True: 16, False: 30]
  ------------------
  275|     16|    if(!data->req.ignorebody) {
  ------------------
  |  Branch (275:8): [True: 16, False: 0]
  ------------------
  276|     16|      infof(data,
  ------------------
  |  |  143|     16|  do {                               \
  |  |  144|     16|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|     16|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 16, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 16]
  |  |  |  |  ------------------
  |  |  |  |  323|     16|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     16|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     16|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 16]
  |  |  ------------------
  ------------------
  277|     16|            "Excess found writing body:"
  278|     16|            " excess = %zu"
  279|     16|            ", size = %" FMT_OFF_T
  280|     16|            ", maxdownload = %" FMT_OFF_T
  281|     16|            ", bytecount = %" FMT_OFF_T,
  282|     16|            excess_len, data->req.size, data->req.maxdownload,
  283|     16|            data->req.bytecount);
  284|     16|      connclose(data->conn);
  ------------------
  |  |   90|     16|#define connclose(x)   Curl_conncontrol((x), CONNCTRL_CONN_CLOSE)
  |  |  ------------------
  |  |  |  |   84|     16|#define CONNCTRL_CONN_CLOSE      1
  |  |  ------------------
  ------------------
  285|     16|    }
  286|     16|  }
  287|     30|  else if((nwrite < nbytes) && !data->req.ignorebody) {
  ------------------
  |  Branch (287:11): [True: 0, False: 30]
  |  Branch (287:32): [True: 0, False: 0]
  ------------------
  288|      0|    failf(data, "Exceeded the maximum allowed file size "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  289|      0|          "(%" FMT_OFF_T ") with %" FMT_OFF_T " bytes",
  290|      0|          data->set.max_filesize, data->req.bytecount);
  291|      0|    return CURLE_FILESIZE_EXCEEDED;
  292|      0|  }
  293|       |
  294|     46|  return CURLE_OK;
  295|     46|}
sendf.c:get_max_body_write_len:
  157|     20|{
  158|     20|  if(limit != -1) {
  ------------------
  |  Branch (158:6): [True: 20, False: 0]
  ------------------
  159|       |    /* How much more are we allowed to write? */
  160|     20|    return curlx_sotouz_range(limit - data->req.bytecount, 0, SIZE_MAX);
  161|     20|  }
  162|      0|  return SIZE_MAX;
  163|     20|}
sendf.c:cw_raw_write:
  313|    788|{
  314|    788|  if(type & CLIENTWRITE_BODY && data->set.verbose && !data->req.ignorebody) {
  ------------------
  |  |   43|  1.57k|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (314:6): [True: 48, False: 740]
  |  Branch (314:33): [True: 0, False: 48]
  |  Branch (314:54): [True: 0, False: 0]
  ------------------
  315|      0|    Curl_debug(data, CURLINFO_DATA_IN, buf, nbytes);
  316|      0|  }
  317|    788|  return Curl_cwriter_write(data, writer->next, type, buf, nbytes);
  ------------------
  |  |  188|    788|  ((w) ? (w)->cwt->do_write((d), (w), (t), (b), (n)) : CURLE_WRITE_ERROR)
  |  |  ------------------
  |  |  |  Branch (188:4): [True: 788, False: 0]
  |  |  ------------------
  ------------------
  318|    788|}
sendf.c:cwriter_ensure_pause_writer:
  467|      3|{
  468|      3|  struct Curl_cwriter *writer =
  469|      3|    Curl_cwriter_get_by_type(data, &Curl_cwt_pause);
  470|      3|  CURLcode result = CURLE_OK;
  471|       |
  472|      3|  if(!writer) {
  ------------------
  |  Branch (472:6): [True: 3, False: 0]
  ------------------
  473|      3|    result = Curl_cwriter_create(&writer, data, &Curl_cwt_pause,
  474|      3|                                 CURL_CW_BEFORE_DECODE);
  475|      3|    if(!result)
  ------------------
  |  Branch (475:8): [True: 3, False: 0]
  ------------------
  476|      3|      cwriter_add(data, writer);
  477|      3|  }
  478|      3|  return result;
  479|      3|}
sendf.c:cwriter_add:
  333|  10.8k|{
  334|  10.8k|  struct Curl_cwriter **anchor = &data->req.writer.stack;
  335|       |
  336|       |  /* Insert the writer as first in its phase.
  337|       |   * Skip existing writers of lower phases. */
  338|  14.5k|  while(*anchor && (*anchor)->phase < writer->phase)
  ------------------
  |  Branch (338:9): [True: 14.5k, False: 0]
  |  Branch (338:20): [True: 3.66k, False: 10.8k]
  ------------------
  339|  3.66k|    anchor = &(*anchor)->next;
  340|  10.8k|  writer->next = *anchor;
  341|  10.8k|  *anchor = writer;
  342|  10.8k|}
sendf.c:cr_in_init:
  649|     32|{
  650|     32|  struct cr_in_ctx *ctx = reader->ctx;
  651|     32|  ctx->read_cb = data->state.fread_func;
  652|     32|  ctx->cb_user_data = data->state.in;
  653|     32|  ctx->total_len = -1;
  654|     32|  ctx->read_len = 0;
  655|     32|  return CURLE_OK;
  656|     32|}
sendf.c:cr_in_read:
  663|      2|{
  664|      2|  struct cr_in_ctx *ctx = reader->ctx;
  665|      2|  CURLcode result = CURLE_OK;
  666|      2|  size_t nread;
  667|       |
  668|      2|  ctx->is_paused = FALSE;
  ------------------
  |  | 1048|      2|#define FALSE false
  ------------------
  669|       |
  670|       |  /* Once we have errored, we will return the same error forever */
  671|      2|  if(ctx->errored) {
  ------------------
  |  Branch (671:6): [True: 0, False: 2]
  ------------------
  672|      0|    *pnread = 0;
  673|      0|    *peos = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  674|      0|    return ctx->error_result;
  675|      0|  }
  676|      2|  if(ctx->seen_eos) {
  ------------------
  |  Branch (676:6): [True: 0, False: 2]
  ------------------
  677|      0|    *pnread = 0;
  678|      0|    *peos = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  679|      0|    return CURLE_OK;
  680|      0|  }
  681|       |  /* respect length limitations */
  682|      2|  if(ctx->total_len >= 0) {
  ------------------
  |  Branch (682:6): [True: 0, False: 2]
  ------------------
  683|      0|    blen = curlx_sotouz_range(ctx->total_len - ctx->read_len, 0, blen);
  684|      0|  }
  685|      2|  nread = 0;
  686|      2|  if(ctx->read_cb && blen) {
  ------------------
  |  Branch (686:6): [True: 2, False: 0]
  |  Branch (686:22): [True: 2, False: 0]
  ------------------
  687|      2|    struct Curl_mapi_guard guard;
  688|      2|    CURL_CBAPI_START(&guard, data, easy_cr_in_read);
  ------------------
  |  |  201|      2|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
  689|      2|    nread = ctx->read_cb(buf, 1, blen, ctx->cb_user_data);
  690|      2|    CURL_CBAPI_END(&guard);
  ------------------
  |  |  205|      2|  Curl_cbapi_leave(g)
  ------------------
  691|      2|    ctx->has_used_cb = TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
  692|      2|  }
  693|       |
  694|      2|  switch(nread) {
  695|      1|  case 0:
  ------------------
  |  Branch (695:3): [True: 1, False: 1]
  ------------------
  696|      1|    if((ctx->total_len >= 0) && (ctx->read_len < ctx->total_len)) {
  ------------------
  |  Branch (696:8): [True: 0, False: 1]
  |  Branch (696:33): [True: 0, False: 0]
  ------------------
  697|      0|      failf(data, "client read function EOF fail, "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  698|      0|            "only %" FMT_OFF_T "/%" FMT_OFF_T " of needed bytes read",
  699|      0|            ctx->read_len, ctx->total_len);
  700|      0|      result = CURLE_READ_ERROR;
  701|      0|      break;
  702|      0|    }
  703|      1|    *pnread = 0;
  704|      1|    *peos = TRUE;
  ------------------
  |  | 1045|      1|#define TRUE true
  ------------------
  705|      1|    ctx->seen_eos = TRUE;
  ------------------
  |  | 1045|      1|#define TRUE true
  ------------------
  706|      1|    break;
  707|       |
  708|      0|  case CURL_READFUNC_ABORT:
  ------------------
  |  |  392|      0|#define CURL_READFUNC_ABORT 0x10000000
  ------------------
  |  Branch (708:3): [True: 0, False: 2]
  ------------------
  709|      0|    failf(data, "operation aborted by callback");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  710|      0|    *pnread = 0;
  711|      0|    *peos = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  712|      0|    ctx->errored = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  713|      0|    ctx->error_result = CURLE_ABORTED_BY_CALLBACK;
  714|      0|    result = CURLE_ABORTED_BY_CALLBACK;
  715|      0|    break;
  716|       |
  717|      0|  case CURL_READFUNC_PAUSE:
  ------------------
  |  |  395|      0|#define CURL_READFUNC_PAUSE 0x10000001
  ------------------
  |  Branch (717:3): [True: 0, False: 2]
  ------------------
  718|      0|    if(data->conn->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  214|      0|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (718:8): [True: 0, False: 0]
  ------------------
  719|       |      /* protocols that work without network cannot be paused. This is
  720|       |         actually only file:// now, and it cannot pause since the transfer
  721|       |         is not done using the "normal" procedure. */
  722|      0|      failf(data, "Read callback asked for PAUSE when not supported");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  723|      0|      result = CURLE_READ_ERROR;
  724|      0|      break;
  725|      0|    }
  726|       |    /* CURL_READFUNC_PAUSE pauses read callbacks that feed socket writes */
  727|      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)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|      0|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  728|      0|    ctx->is_paused = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  729|      0|    *pnread = 0;
  730|      0|    *peos = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  731|      0|    result = Curl_xfer_pause_send(data, TRUE);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  732|      0|    break; /* nothing was read */
  733|       |
  734|      1|  default:
  ------------------
  |  Branch (734:3): [True: 1, False: 1]
  ------------------
  735|      1|    if(nread > blen) {
  ------------------
  |  Branch (735:8): [True: 0, False: 1]
  ------------------
  736|       |      /* the read function returned a too large value */
  737|      0|      failf(data, "read function returned funny value");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  738|      0|      *pnread = 0;
  739|      0|      *peos = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  740|      0|      ctx->errored = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  741|      0|      ctx->error_result = CURLE_READ_ERROR;
  742|      0|      result = CURLE_READ_ERROR;
  743|      0|      break;
  744|      0|    }
  745|      1|    ctx->read_len += nread;
  746|      1|    if(ctx->total_len >= 0)
  ------------------
  |  Branch (746:8): [True: 0, False: 1]
  ------------------
  747|      0|      ctx->seen_eos = (ctx->read_len >= ctx->total_len);
  748|      1|    *pnread = nread;
  749|      1|    *peos = (bool)ctx->seen_eos;
  750|      1|    break;
  751|      2|  }
  752|      2|  CURL_TRC_READ(data, "cr_in_read(len=%zu, total=%" FMT_OFF_T
  ------------------
  |  |  163|      2|  do {                                                    \
  |  |  164|      2|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  329|      2|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      4|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 2, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      4|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      2|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|      2|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
  753|      2|                ", read=%" FMT_OFF_T ") -> %d, nread=%zu, eos=%d",
  754|      2|                blen, ctx->total_len, ctx->read_len, (int)result,
  755|      2|                *pnread, *peos);
  756|      2|  return result;
  757|      2|}
sendf.c:cr_in_total_length:
  769|     95|{
  770|     95|  struct cr_in_ctx *ctx = reader->ctx;
  771|     95|  (void)data;
  772|     95|  return ctx->total_len;
  773|     95|}
sendf.c:do_init_reader_stack:
 1124|  3.59k|{
 1125|  3.59k|  CURLcode result = CURLE_OK;
 1126|  3.59k|  curl_off_t clen;
 1127|       |
 1128|  3.59k|  DEBUGASSERT(r);
  ------------------
  |  | 1075|  3.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1128:3): [True: 0, False: 3.59k]
  |  Branch (1128:3): [True: 3.59k, False: 0]
  ------------------
 1129|  3.59k|  DEBUGASSERT(r->crt);
  ------------------
  |  | 1075|  3.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1129:3): [True: 0, False: 3.59k]
  |  Branch (1129:3): [True: 3.59k, False: 0]
  ------------------
 1130|  3.59k|  DEBUGASSERT(r->phase == CURL_CR_CLIENT);
  ------------------
  |  | 1075|  3.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1130:3): [True: 0, False: 3.59k]
  |  Branch (1130:3): [True: 3.59k, False: 0]
  ------------------
 1131|  3.59k|  DEBUGASSERT(!data->req.reader.stack);
  ------------------
  |  | 1075|  3.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1131:3): [True: 0, False: 3.59k]
  |  Branch (1131:3): [True: 3.59k, False: 0]
  ------------------
 1132|       |
 1133|  3.59k|  data->req.reader.stack = r;
 1134|  3.59k|  clen = r->crt->total_length(data, r);
 1135|       |  /* if we do not have 0 length init, and CRLF conversion is wanted,
 1136|       |   * add the reader for it */
 1137|  3.59k|  if(clen &&
  ------------------
  |  Branch (1137:6): [True: 656, False: 2.94k]
  ------------------
 1138|    656|#ifdef CURL_PREFER_LF_LINEENDS
 1139|    656|    (data->set.crlf || data->state.prefer_ascii)
  ------------------
  |  Branch (1139:6): [True: 12, False: 644]
  |  Branch (1139:24): [True: 0, False: 644]
  ------------------
 1140|       |#else
 1141|       |    data->set.crlf
 1142|       |#endif
 1143|  3.59k|    ) {
 1144|     12|    result = cr_lc_add(data);
 1145|     12|    if(result)
  ------------------
  |  Branch (1145:8): [True: 0, False: 12]
  ------------------
 1146|      0|      return result;
 1147|     12|  }
 1148|       |
 1149|  3.59k|  return result;
 1150|  3.59k|}
sendf.c:cr_lc_add:
 1109|     12|{
 1110|     12|  struct Curl_creader *reader = NULL;
 1111|     12|  CURLcode result;
 1112|       |
 1113|     12|  result = Curl_creader_create(&reader, data, &cr_lc, CURL_CR_CONTENT_ENCODE);
 1114|     12|  if(!result)
  ------------------
  |  Branch (1114:6): [True: 12, False: 0]
  ------------------
 1115|     12|    result = Curl_creader_add(data, reader);
 1116|       |
 1117|     12|  if(result && reader)
  ------------------
  |  Branch (1117:6): [True: 0, False: 12]
  |  Branch (1117:16): [True: 0, False: 0]
  ------------------
 1118|      0|    Curl_creader_free(data, reader);
 1119|     12|  return result;
 1120|     12|}
sendf.c:cr_lc_init:
  990|     12|{
  991|     12|  struct cr_lc_ctx *ctx = reader->ctx;
  992|     12|  (void)data;
  993|     12|  Curl_bufq_init2(&ctx->buf, (16 * 1024), 1, BUFQ_OPT_SOFT_LIMIT);
  ------------------
  |  |  111|     12|#define BUFQ_OPT_SOFT_LIMIT  (1 << 0)
  ------------------
  994|     12|  return CURLE_OK;
  995|     12|}
sendf.c:cr_lc_read:
 1009|     10|{
 1010|     10|  struct cr_lc_ctx *ctx = reader->ctx;
 1011|     10|  CURLcode result;
 1012|     10|  size_t nread, i, start, n;
 1013|     10|  bool eos;
 1014|       |
 1015|     10|  if(ctx->eos) {
  ------------------
  |  Branch (1015:6): [True: 0, False: 10]
  ------------------
 1016|      0|    *pnread = 0;
 1017|      0|    *peos = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1018|      0|    return CURLE_OK;
 1019|      0|  }
 1020|       |
 1021|     10|  if(Curl_bufq_is_empty(&ctx->buf)) {
  ------------------
  |  Branch (1021:6): [True: 10, False: 0]
  ------------------
 1022|     10|    if(ctx->read_eos) {
  ------------------
  |  Branch (1022:8): [True: 0, False: 10]
  ------------------
 1023|      0|      ctx->eos = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1024|      0|      *pnread = 0;
 1025|      0|      *peos = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1026|      0|      return CURLE_OK;
 1027|      0|    }
 1028|       |    /* Still getting data form the next reader, ctx->buf is empty */
 1029|     10|    result = Curl_creader_read(data, reader->next, buf, blen, &nread, &eos);
 1030|     10|    if(result)
  ------------------
  |  Branch (1030:8): [True: 0, False: 10]
  ------------------
 1031|      0|      return result;
 1032|     10|    ctx->read_eos = eos;
 1033|       |
 1034|     10|    if(!nread || !memchr(buf, '\n', nread)) {
  ------------------
  |  Branch (1034:8): [True: 1, False: 9]
  |  Branch (1034:18): [True: 1, False: 8]
  ------------------
 1035|       |      /* nothing to convert, return this right away */
 1036|      2|      if(nread)
  ------------------
  |  Branch (1036:10): [True: 1, False: 1]
  ------------------
 1037|      1|        ctx->prev_cr = (buf[nread - 1] == '\r');
 1038|      2|      if(ctx->read_eos)
  ------------------
  |  Branch (1038:10): [True: 1, False: 1]
  ------------------
 1039|      1|        ctx->eos = TRUE;
  ------------------
  |  | 1045|      1|#define TRUE true
  ------------------
 1040|      2|      *pnread = nread;
 1041|      2|      *peos = (bool)ctx->eos;
 1042|      2|      goto out;
 1043|      2|    }
 1044|       |
 1045|       |    /* at least one \n might need conversion to '\r\n', place into ctx->buf */
 1046|    952|    for(i = start = 0; i < nread; ++i) {
  ------------------
  |  Branch (1046:24): [True: 944, False: 8]
  ------------------
 1047|       |      /* if this byte is not an LF character, or if the preceding character is
 1048|       |         a CR (meaning this already is a CRLF pair), go to next */
 1049|    944|      if((buf[i] != '\n') || ctx->prev_cr) {
  ------------------
  |  Branch (1049:10): [True: 920, False: 24]
  |  Branch (1049:30): [True: 24, False: 0]
  ------------------
 1050|    944|        ctx->prev_cr = (buf[i] == '\r');
 1051|    944|        continue;
 1052|    944|      }
 1053|      0|      ctx->prev_cr = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1054|       |      /* on a soft limit bufq, we do not need to check length */
 1055|      0|      result = Curl_bufq_cwrite(&ctx->buf, buf + start, i - start, &n);
 1056|      0|      if(!result)
  ------------------
  |  Branch (1056:10): [True: 0, False: 0]
  ------------------
 1057|      0|        result = Curl_bufq_cwrite(&ctx->buf, STRCONST("\r\n"), &n);
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
 1058|      0|      if(result)
  ------------------
  |  Branch (1058:10): [True: 0, False: 0]
  ------------------
 1059|      0|        return result;
 1060|      0|      start = i + 1;
 1061|      0|    }
 1062|       |
 1063|      8|    if(start < i) { /* leftover */
  ------------------
  |  Branch (1063:8): [True: 8, False: 0]
  ------------------
 1064|      8|      result = Curl_bufq_cwrite(&ctx->buf, buf + start, i - start, &n);
 1065|      8|      if(result)
  ------------------
  |  Branch (1065:10): [True: 0, False: 8]
  ------------------
 1066|      0|        return result;
 1067|      8|    }
 1068|      8|  }
 1069|       |
 1070|      8|  DEBUGASSERT(!Curl_bufq_is_empty(&ctx->buf));
  ------------------
  |  | 1075|      8|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1070:3): [True: 0, False: 8]
  |  Branch (1070:3): [True: 8, False: 0]
  ------------------
 1071|      8|  *peos = FALSE;
  ------------------
  |  | 1048|      8|#define FALSE false
  ------------------
 1072|      8|  result = Curl_bufq_cread(&ctx->buf, buf, blen, pnread);
 1073|      8|  if(!result && ctx->read_eos && Curl_bufq_is_empty(&ctx->buf)) {
  ------------------
  |  Branch (1073:6): [True: 8, False: 0]
  |  Branch (1073:17): [True: 8, False: 0]
  |  Branch (1073:34): [True: 8, False: 0]
  ------------------
 1074|       |    /* no more data, read all, done. */
 1075|      8|    ctx->eos = TRUE;
  ------------------
  |  | 1045|      8|#define TRUE true
  ------------------
 1076|      8|    *peos = TRUE;
  ------------------
  |  | 1045|      8|#define TRUE true
  ------------------
 1077|      8|  }
 1078|       |
 1079|     10|out:
 1080|     10|  CURL_TRC_READ(data, "cr_lc_read(len=%zu) -> %d, nread=%zu, eos=%d",
  ------------------
  |  |  163|     10|  do {                                                    \
  |  |  164|     10|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  329|     10|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     20|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 10, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     20|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|     10|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|     10|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|     10|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 10]
  |  |  ------------------
  ------------------
 1081|     10|                blen, (int)result, *pnread, *peos);
 1082|     10|  return result;
 1083|      8|}
sendf.c:cr_lc_close:
  998|     12|{
  999|     12|  struct cr_lc_ctx *ctx = reader->ctx;
 1000|     12|  (void)data;
 1001|     12|  Curl_bufq_free(&ctx->buf);
 1002|     12|}
sendf.c:cr_lc_total_length:
 1087|     23|{
 1088|       |  /* this reader changes length depending on input */
 1089|     23|  (void)data;
 1090|     23|  (void)reader;
 1091|     23|  return -1;
 1092|     23|}
sendf.c:cr_null_total_length:
 1278|  11.8k|{
 1279|       |  /* this reader changes length depending on input */
 1280|  11.8k|  (void)data;
 1281|  11.8k|  (void)reader;
 1282|  11.8k|  return 0;
 1283|  11.8k|}
sendf.c:cr_buf_read:
 1323|     16|{
 1324|     16|  struct cr_buf_ctx *ctx = reader->ctx;
 1325|     16|  size_t nread = ctx->blen - ctx->index;
 1326|       |
 1327|     16|  if(!nread || !ctx->buf) {
  ------------------
  |  Branch (1327:6): [True: 0, False: 16]
  |  Branch (1327:16): [True: 0, False: 16]
  ------------------
 1328|      0|    *pnread = 0;
 1329|      0|    *peos = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1330|      0|  }
 1331|     16|  else {
 1332|     16|    if(nread > blen)
  ------------------
  |  Branch (1332:8): [True: 0, False: 16]
  ------------------
 1333|      0|      nread = blen;
 1334|     16|    memcpy(buf, ctx->buf + ctx->index, nread);
 1335|     16|    *pnread = nread;
 1336|     16|    ctx->index += nread;
 1337|     16|    *peos = (ctx->index == ctx->blen);
 1338|     16|  }
 1339|     16|  CURL_TRC_READ(data, "cr_buf_read(len=%zu) -> 0, nread=%zu, eos=%d",
  ------------------
  |  |  163|     16|  do {                                                    \
  |  |  164|     16|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  329|     16|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     32|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 16, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 16]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     32|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|     16|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|     16|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|     16|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 16]
  |  |  ------------------
  ------------------
 1340|     16|                blen, *pnread, *peos);
 1341|     16|  return CURLE_OK;
 1342|     16|}
sendf.c:cr_buf_total_length:
 1370|     80|{
 1371|     80|  struct cr_buf_ctx *ctx = reader->ctx;
 1372|     80|  (void)data;
 1373|     80|  return (curl_off_t)ctx->blen;
 1374|     80|}

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

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

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

Curl_slist_append_nodup:
   56|  22.1k|{
   57|  22.1k|  struct curl_slist *last;
   58|  22.1k|  struct curl_slist *new_item;
   59|       |
   60|  22.1k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  22.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (60:3): [True: 0, False: 22.1k]
  |  Branch (60:3): [True: 22.1k, False: 0]
  ------------------
   61|       |
   62|  22.1k|  new_item = curlx_malloc(sizeof(struct curl_slist));
  ------------------
  |  | 1471|  22.1k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
   63|  22.1k|  if(!new_item)
  ------------------
  |  Branch (63:6): [True: 0, False: 22.1k]
  ------------------
   64|      0|    return NULL;
   65|       |
   66|  22.1k|  new_item->next = NULL;
   67|  22.1k|  new_item->data = CURL_UNCONST(data);
  ------------------
  |  |  856|  22.1k|#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|  22.1k|  if(!list)
  ------------------
  |  Branch (70:6): [True: 16.5k, False: 5.58k]
  ------------------
   71|  16.5k|    return new_item;
   72|       |
   73|  5.58k|  last = slist_get_last(list);
   74|  5.58k|  last->next = new_item;
   75|  5.58k|  return list;
   76|  22.1k|}
curl_slist_append:
   86|  15.9k|{
   87|  15.9k|  char *dupdata = curlx_strdup(data);
  ------------------
  |  | 1470|  15.9k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
   88|       |
   89|  15.9k|  if(!dupdata)
  ------------------
  |  Branch (89:6): [True: 0, False: 15.9k]
  ------------------
   90|      0|    return NULL;
   91|       |
   92|  15.9k|  list = Curl_slist_append_nodup(list, dupdata);
   93|  15.9k|  if(!list)
  ------------------
  |  Branch (93:6): [True: 0, False: 15.9k]
  ------------------
   94|      0|    curlx_free(dupdata);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   95|       |
   96|  15.9k|  return list;
   97|  15.9k|}
curl_slist_free_all:
  125|  35.3k|{
  126|  35.3k|  struct curl_slist *next;
  127|  35.3k|  struct curl_slist *item;
  128|       |
  129|  35.3k|  if(!list)
  ------------------
  |  Branch (129:6): [True: 18.8k, False: 16.5k]
  ------------------
  130|  18.8k|    return;
  131|       |
  132|  16.5k|  item = list;
  133|  22.1k|  do {
  134|  22.1k|    next = item->next;
  135|  22.1k|    curlx_safefree(item->data);
  ------------------
  |  | 1332|  22.1k|  do {                      \
  |  | 1333|  22.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  22.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  22.1k|    (ptr) = NULL;           \
  |  | 1335|  22.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 22.1k]
  |  |  ------------------
  ------------------
  136|  22.1k|    curlx_free(item);
  ------------------
  |  | 1476|  22.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  137|  22.1k|    item = next;
  138|  22.1k|  } while(next);
  ------------------
  |  Branch (138:11): [True: 5.58k, False: 16.5k]
  ------------------
  139|  16.5k|}
slist.c:slist_get_last:
   30|  5.58k|{
   31|  5.58k|  struct curl_slist *item;
   32|       |
   33|       |  /* if caller passed us a NULL, return now */
   34|  5.58k|  if(!list)
  ------------------
  |  Branch (34:6): [True: 0, False: 5.58k]
  ------------------
   35|      0|    return NULL;
   36|       |
   37|       |  /* loop through to find the last item */
   38|  5.58k|  item = list;
   39|  12.9k|  while(item->next) {
  ------------------
  |  Branch (39:9): [True: 7.39k, False: 5.58k]
  ------------------
   40|  7.39k|    item = item->next;
   41|  7.39k|  }
   42|  5.58k|  return item;
   43|  5.58k|}

Curl_wakeup_init:
  277|  7.46k|{
  278|  7.46k|#ifdef USE_EVENTFD
  279|  7.46k|  return wakeup_eventfd(socks, nonblocking);
  280|       |#elif defined(HAVE_PIPE)
  281|       |  return wakeup_pipe(socks, nonblocking);
  282|       |#elif defined(HAVE_SOCKETPAIR)
  283|       |  return wakeup_socketpair(socks, nonblocking);
  284|       |#else
  285|       |  return wakeup_inet(socks, nonblocking);
  286|       |#endif
  287|  7.46k|}
Curl_wakeup_consume:
  329|  10.9k|{
  330|  10.9k|  char buf[64];
  331|  10.9k|  ssize_t rc;
  332|  10.9k|  CURLcode result = CURLE_OK;
  333|       |
  334|  10.9k|  do {
  335|  10.9k|    rc = wakeup_read(socks[0], buf, sizeof(buf));
  ------------------
  |  |  292|  10.9k|#define wakeup_read         read
  ------------------
  336|  10.9k|    if(!rc)
  ------------------
  |  Branch (336:8): [True: 0, False: 10.9k]
  ------------------
  337|      0|      break;
  338|  10.9k|    else if(rc < 0) {
  ------------------
  |  Branch (338:13): [True: 10.9k, False: 0]
  ------------------
  339|  10.9k|      int sockerr = SOCKERRNO;
  ------------------
  |  | 1089|  10.9k|#define SOCKERRNO         errno
  ------------------
  340|  10.9k|#ifndef USE_WINSOCK
  341|  10.9k|      if(sockerr == SOCKEINTR)
  ------------------
  |  | 1123|  10.9k|#define SOCKEINTR         EINTR
  ------------------
  |  Branch (341:10): [True: 0, False: 10.9k]
  ------------------
  342|      0|        continue;
  343|  10.9k|#endif
  344|  10.9k|      if(SOCK_EAGAIN(sockerr))
  ------------------
  |  | 1140|  10.9k|#define SOCK_EAGAIN(e) ((e) == SOCKEWOULDBLOCK)
  |  |  ------------------
  |  |  |  | 1131|  10.9k|#define SOCKEWOULDBLOCK   EWOULDBLOCK
  |  |  ------------------
  |  |  |  Branch (1140:24): [True: 10.9k, False: 0]
  |  |  ------------------
  ------------------
  345|  10.9k|        break;
  346|      0|      result = CURLE_READ_ERROR;
  347|      0|      break;
  348|  10.9k|    }
  349|  10.9k|  } while(all);
  ------------------
  |  Branch (349:11): [True: 0, False: 0]
  ------------------
  350|  10.9k|  return result;
  351|  10.9k|}
Curl_wakeup_destroy:
  354|  7.46k|{
  355|       |#ifndef USE_EVENTFD
  356|       |  if(socks[1] != CURL_SOCKET_BAD)
  357|       |    wakeup_close(socks[1]);
  358|       |#endif
  359|  7.46k|  if(socks[0] != CURL_SOCKET_BAD)
  ------------------
  |  |  147|  7.46k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (359:6): [True: 7.46k, False: 0]
  ------------------
  360|  7.46k|    wakeup_close(socks[0]);
  ------------------
  |  |  293|  7.46k|#define wakeup_close        close
  ------------------
  361|  7.46k|  socks[0] = socks[1] = CURL_SOCKET_BAD;
  ------------------
  |  |  147|  7.46k|#define CURL_SOCKET_BAD (-1)
  ------------------
  362|  7.46k|}
socketpair.c:wakeup_eventfd:
   39|  7.46k|{
   40|  7.46k|  int efd = eventfd(0, nonblocking ? EFD_CLOEXEC | EFD_NONBLOCK : EFD_CLOEXEC);
  ------------------
  |  Branch (40:24): [True: 7.46k, False: 0]
  ------------------
   41|  7.46k|  if(efd == -1) {
  ------------------
  |  Branch (41:6): [True: 0, False: 7.46k]
  ------------------
   42|      0|    socks[0] = socks[1] = CURL_SOCKET_BAD;
  ------------------
  |  |  147|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
   43|      0|    return -1;
   44|      0|  }
   45|  7.46k|  socks[0] = socks[1] = efd;
   46|  7.46k|  return 0;
   47|  7.46k|}

Curl_timeouts_init:
   32|  3.73k|{
   33|  3.73k|  timeouts->tree = NULL;
   34|  3.73k|  timeouts->time_base = ptime_base ? *ptime_base : curlx_now();
  ------------------
  |  Branch (34:25): [True: 3.73k, False: 0]
  ------------------
   35|  3.73k|}
Curl_timeouts_has:
   38|  26.0k|{
   39|  26.0k|  struct Curl_tree *node = data ? &data->state.timeouts.splaynode : NULL;
  ------------------
  |  Branch (39:28): [True: 26.0k, False: 0]
  ------------------
   40|  26.0k|  return node && node->registered;
  ------------------
  |  Branch (40:10): [True: 26.0k, False: 0]
  |  Branch (40:18): [True: 18.6k, False: 7.37k]
  ------------------
   41|  26.0k|}
Curl_timeouts_offset_us:
   45|  14.7k|{
   46|  14.7k|  return curlx_ptimediff_us(pts, &timeouts->time_base);
   47|  14.7k|}
Curl_timeouts_remove_expired:
   82|  10.9k|{
   83|  10.9k|  if(timeouts->tree) {
  ------------------
  |  Branch (83:6): [True: 7.26k, False: 3.73k]
  ------------------
   84|  7.26k|    struct Curl_tree *t = NULL;
   85|  7.26k|    timediff_t elapsed_us = Curl_timeouts_offset_us(timeouts, ts);
   86|  7.26k|    timeouts->tree = Curl_splaygetbest(elapsed_us, timeouts->tree, &t);
   87|  7.26k|    if(t) {
  ------------------
  |  Branch (87:8): [True: 0, False: 7.26k]
  ------------------
   88|      0|      *pmid = t->id;
   89|      0|      return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
   90|      0|    }
   91|  7.26k|  }
   92|  10.9k|  *pmid = UINT32_MAX;
   93|       |  return FALSE;
  ------------------
  |  | 1048|  10.9k|#define FALSE false
  ------------------
   94|  10.9k|}
Curl_timeouts_add:
   99|  3.68k|{
  100|  3.68k|  struct Curl_tree *node = &data->state.timeouts.splaynode;
  101|  3.68k|  DEBUGASSERT(!node->registered);
  ------------------
  |  | 1075|  3.68k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (101:3): [True: 0, False: 3.68k]
  |  Branch (101:3): [True: 3.68k, False: 0]
  ------------------
  102|  3.68k|  timeouts->tree = Curl_splayinsert(offset_us, timeouts->tree,
  103|  3.68k|                                    node, data->mid);
  104|  3.68k|}
Curl_timeouts_remove:
  108|  7.47k|{
  109|  7.47k|  struct Curl_tree *node = &data->state.timeouts.splaynode;
  110|  7.47k|  if(node->registered) {
  ------------------
  |  Branch (110:6): [True: 3.67k, False: 3.79k]
  ------------------
  111|  3.67k|    int rc = Curl_splayremove(timeouts->tree, node, &timeouts->tree);
  112|  3.67k|#ifdef DEBUGBUILD
  113|  3.67k|    if(rc)
  ------------------
  |  Branch (113:8): [True: 0, False: 3.67k]
  ------------------
  114|      0|      curl_mfprintf(stderr, "Internal error removing splay node = %d\n", rc);
  115|       |#else
  116|       |    (void)rc;
  117|       |#endif
  118|  3.67k|    return TRUE;
  ------------------
  |  | 1045|  3.67k|#define TRUE true
  ------------------
  119|  3.67k|  }
  120|  3.79k|  return FALSE;
  ------------------
  |  | 1048|  3.79k|#define FALSE false
  ------------------
  121|  7.47k|}
Curl_splay:
  133|  10.9k|{
  134|  10.9k|  struct Curl_tree N, *l, *r, *y;
  135|       |
  136|  10.9k|  if(!root)
  ------------------
  |  Branch (136:6): [True: 0, False: 10.9k]
  ------------------
  137|      0|    return NULL;
  138|  10.9k|  N.smaller = N.larger = NULL;
  139|  10.9k|  l = r = &N;
  140|       |
  141|  10.9k|  for(;;) {
  142|  10.9k|    if(key < root->key) {
  ------------------
  |  Branch (142:8): [True: 7.26k, False: 3.67k]
  ------------------
  143|       |      /* key is somewhere in root->smaller branch */
  144|  7.26k|      if(!root->smaller)  /* which is empty, done */
  ------------------
  |  Branch (144:10): [True: 7.26k, False: 0]
  ------------------
  145|  7.26k|        break;
  146|      0|      if(key < root->smaller->key) {
  ------------------
  |  Branch (146:10): [True: 0, False: 0]
  ------------------
  147|       |        /* key is somewhere in root->smaller->smaller, make a "Zig step" */
  148|      0|        y = root->smaller;
  149|      0|        root->smaller = y->larger;
  150|      0|        y->larger = root;
  151|      0|        root = y;
  152|      0|        if(!root->smaller)
  ------------------
  |  Branch (152:12): [True: 0, False: 0]
  ------------------
  153|      0|          break;
  154|      0|      }
  155|       |      /* Making root->smaller the new root, the old root is no longer
  156|       |       * referenced. Remember it in the N tree's `r`ight/larger side.
  157|       |       * Everything in old root is smaller than what the right side
  158|       |       * of N already has, so it gets added to r->smaller. */
  159|      0|      r->smaller = root;
  160|      0|      r = root;
  161|      0|      root = root->smaller;
  162|      0|    }
  163|  3.67k|    else if(key > root->key) {
  ------------------
  |  Branch (163:13): [True: 0, False: 3.67k]
  ------------------
  164|       |      /* key is somewhere in root->larger branch */
  165|      0|      if(!root->larger)  /* which is empty, done */
  ------------------
  |  Branch (165:10): [True: 0, False: 0]
  ------------------
  166|      0|        break;
  167|      0|      if(key > root->larger->key) {
  ------------------
  |  Branch (167:10): [True: 0, False: 0]
  ------------------
  168|       |        /* key is somewhere in root->larger->larger, make a "Zig step" */
  169|      0|        y = root->larger;
  170|      0|        root->larger = y->smaller;
  171|      0|        y->smaller = root;
  172|      0|        root = y;
  173|      0|        if(!root->larger)
  ------------------
  |  Branch (173:12): [True: 0, False: 0]
  ------------------
  174|      0|          break;
  175|      0|      }
  176|       |      /* Making root->larger the new root, the old root is no longer
  177|       |       * referenced. Remember it in the N tree's `l`eft/smaller side.
  178|       |       * Everything in old root is larger than what the left side
  179|       |       * of N already has, so it gets added to l->larger. */
  180|      0|      l->larger = root;
  181|      0|      l = root;
  182|      0|      root = root->larger;
  183|      0|    }
  184|  3.67k|    else  /* exact match, root is key, done */
  185|  3.67k|      break;
  186|  10.9k|  }
  187|       |
  188|       |  /* Put it all together again.
  189|       |   * root->smaller has everything larger than current `l`.
  190|       |   * root->larger has everything smaller than current `r`. */
  191|  10.9k|  l->larger = root->smaller;
  192|  10.9k|  r->smaller = root->larger;
  193|  10.9k|  root->smaller = N.larger;
  194|  10.9k|  root->larger = N.smaller;
  195|       |
  196|  10.9k|  return root;
  197|  10.9k|}
Curl_splayinsert:
  208|  3.68k|{
  209|  3.68k|  DEBUGASSERT(node);
  ------------------
  |  | 1075|  3.68k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (209:3): [True: 0, False: 3.68k]
  |  Branch (209:3): [True: 3.68k, False: 0]
  ------------------
  210|       |
  211|  3.68k|  node->key = key;
  212|  3.68k|  node->id = id;
  213|  3.68k|  node->same = NULL;
  214|  3.68k|  node->registered = TRUE;
  ------------------
  |  | 1045|  3.68k|#define TRUE true
  ------------------
  215|  3.68k|  if(root) {
  ------------------
  |  Branch (215:6): [True: 0, False: 3.68k]
  ------------------
  216|      0|    root = Curl_splay(key, root);
  217|      0|    DEBUGASSERT(root);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (217:5): [True: 0, False: 0]
  |  Branch (217:5): [True: 0, False: 0]
  ------------------
  218|      0|    if(key == root->key) {
  ------------------
  |  Branch (218:8): [True: 0, False: 0]
  ------------------
  219|       |      /* There already exists a node in the tree with the same key.
  220|       |         Append the new node to the `same` list. */
  221|      0|      struct Curl_tree **panchor = &root->same;
  222|      0|      while(*panchor)
  ------------------
  |  Branch (222:13): [True: 0, False: 0]
  ------------------
  223|      0|        panchor = &(*panchor)->same;
  224|      0|      *panchor = node;
  225|      0|      return root; /* the root node always stays the same */
  226|      0|    }
  227|      0|  }
  228|       |
  229|       |  /* node becomes the new root. Insert old root as sub-branch. */
  230|  3.68k|  if(!root) {
  ------------------
  |  Branch (230:6): [True: 3.68k, False: 0]
  ------------------
  231|  3.68k|    node->smaller = node->larger = NULL;
  232|  3.68k|  }
  233|      0|  else if(key < root->key) {
  ------------------
  |  Branch (233:11): [True: 0, False: 0]
  ------------------
  234|      0|    node->smaller = root->smaller;
  235|      0|    node->larger = root;
  236|      0|    root->smaller = NULL;
  237|      0|  }
  238|      0|  else {
  239|      0|    node->larger = root->larger;
  240|      0|    node->smaller = root;
  241|      0|    root->larger = NULL;
  242|      0|  }
  243|       |
  244|  3.68k|  return node;
  245|  3.68k|}
Curl_splaygetbest:
  253|  7.26k|{
  254|  7.26k|  struct Curl_tree *x;
  255|       |
  256|  7.26k|  if(!root) {
  ------------------
  |  Branch (256:6): [True: 0, False: 7.26k]
  ------------------
  257|      0|    *removed = NULL; /* none removed since there was no root */
  258|      0|    return NULL;
  259|      0|  }
  260|       |
  261|       |  /* find smallest */
  262|  7.26k|  root = Curl_splay(TIMEDIFF_T_MIN, root);
  ------------------
  |  |   34|  7.26k|#define TIMEDIFF_T_MIN CURL_OFF_T_MIN
  |  |  ------------------
  |  |  |  |  590|  7.26k|#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  588|  7.26k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  263|  7.26k|  DEBUGASSERT(root);
  ------------------
  |  | 1075|  7.26k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (263:3): [True: 0, False: 7.26k]
  |  Branch (263:3): [True: 7.26k, False: 0]
  ------------------
  264|  7.26k|  if(key < root->key) {
  ------------------
  |  Branch (264:6): [True: 7.26k, False: 0]
  ------------------
  265|       |    /* even the smallest is too big */
  266|  7.26k|    *removed = NULL;
  267|  7.26k|    return root;
  268|  7.26k|  }
  269|       |
  270|       |  /* FIRST! Check if there is a list with identical keys */
  271|      0|  if(root->same) {
  ------------------
  |  Branch (271:6): [True: 0, False: 0]
  ------------------
  272|      0|    x = root->same;
  273|      0|    DEBUGASSERT(x->key == root->key);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (273:5): [True: 0, False: 0]
  |  Branch (273:5): [True: 0, False: 0]
  ------------------
  274|       |    /* 'x' becomes the new root node */
  275|      0|    x->larger = root->larger;
  276|      0|    x->smaller = root->smaller;
  277|      0|    root->same = NULL;
  278|      0|    root->registered = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  279|      0|    *removed = root;
  280|      0|    return x; /* new root */
  281|      0|  }
  282|       |
  283|       |  /* we splayed the tree to the smallest element, there is no smaller */
  284|      0|  x = root->larger;
  285|      0|  root->registered = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  286|      0|  *removed = root;
  287|       |
  288|      0|  return x;
  289|      0|}
Curl_splayremove:
  305|  3.67k|{
  306|  3.67k|  struct Curl_tree *x;
  307|       |
  308|  3.67k|  if(!root)
  ------------------
  |  Branch (308:6): [True: 0, False: 3.67k]
  ------------------
  309|      0|    return 1;
  310|       |
  311|  3.67k|  DEBUGASSERT(removenode);
  ------------------
  |  | 1075|  3.67k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (311:3): [True: 0, False: 3.67k]
  |  Branch (311:3): [True: 3.67k, False: 0]
  ------------------
  312|  3.67k|  if(!removenode->registered)
  ------------------
  |  Branch (312:6): [True: 0, False: 3.67k]
  ------------------
  313|      0|    return 2;
  314|       |
  315|  3.67k|  root = Curl_splay(removenode->key, root);
  316|  3.67k|  DEBUGASSERT(root);
  ------------------
  |  | 1075|  3.67k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (316:3): [True: 0, False: 3.67k]
  |  Branch (316:3): [True: 3.67k, False: 0]
  ------------------
  317|       |
  318|       |  /* First make sure that we got the same root key as the one we want
  319|       |     to remove, as otherwise we might be trying to remove a node that
  320|       |     is not actually in the tree. */
  321|  3.67k|  if(root->key != removenode->key) {
  ------------------
  |  Branch (321:6): [True: 0, False: 3.67k]
  ------------------
  322|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (322:5): [Folded, False: 0]
  |  Branch (322:5): [Folded, False: 0]
  ------------------
  323|      0|    return 2;
  324|      0|  }
  325|       |
  326|  3.67k|  if(root != removenode) {
  ------------------
  |  Branch (326:6): [True: 0, False: 3.67k]
  ------------------
  327|       |    /* Should be in the root->same list then */
  328|      0|    struct Curl_tree **panchor;
  329|      0|    for(panchor = &root->same; *panchor; panchor = &(*panchor)->same) {
  ------------------
  |  Branch (329:32): [True: 0, False: 0]
  ------------------
  330|      0|      if(*panchor == removenode) {
  ------------------
  |  Branch (330:10): [True: 0, False: 0]
  ------------------
  331|      0|        *panchor = removenode->same;
  332|      0|        removenode->same = NULL;
  333|      0|        removenode->registered = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  334|      0|        *newroot = root;
  335|      0|        return 0;
  336|      0|      }
  337|      0|    }
  338|       |    /* not found in same list, error */
  339|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (339:5): [Folded, False: 0]
  |  Branch (339:5): [Folded, False: 0]
  ------------------
  340|      0|    return 2;
  341|      0|  }
  342|       |  /* removing the root node */
  343|  3.67k|  if(root->same) {
  ------------------
  |  Branch (343:6): [True: 0, False: 3.67k]
  ------------------
  344|       |    /* 'x' is the new root node, we make it use the root node's
  345|       |       smaller/larger links */
  346|      0|    x = root->same;
  347|      0|    x->larger = root->larger;
  348|      0|    x->smaller = root->smaller;
  349|      0|    root->same = NULL;
  350|      0|  }
  351|  3.67k|  else {
  352|       |    /* Remove the root node */
  353|  3.67k|    if(!root->smaller)
  ------------------
  |  Branch (353:8): [True: 3.67k, False: 0]
  ------------------
  354|  3.67k|      x = root->larger;
  355|      0|    else {
  356|      0|      x = Curl_splay(removenode->key, root->smaller);
  357|      0|      DEBUGASSERT(x);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (357:7): [True: 0, False: 0]
  |  Branch (357:7): [True: 0, False: 0]
  ------------------
  358|      0|      x->larger = root->larger;
  359|      0|    }
  360|  3.67k|  }
  361|  3.67k|  removenode->registered = FALSE;
  ------------------
  |  | 1048|  3.67k|#define FALSE false
  ------------------
  362|  3.67k|  *newroot = x; /* return new root */
  363|  3.67k|  return 0;
  364|  3.67k|}

Curl_strntoupper:
   78|      3|{
   79|      3|  if(n < 1)
  ------------------
  |  Branch (79:6): [True: 0, False: 3]
  ------------------
   80|      0|    return;
   81|       |
   82|      9|  do {
   83|      9|    *dest++ = Curl_raw_toupper(*src);
   84|      9|  } while(*src++ && --n);
  ------------------
  |  Branch (84:11): [True: 9, False: 0]
  |  Branch (84:21): [True: 6, False: 3]
  ------------------
   85|      3|}
Curl_strntolower:
   93|  18.1k|{
   94|  18.1k|  if(n < 1)
  ------------------
  |  Branch (94:6): [True: 0, False: 18.1k]
  ------------------
   95|      0|    return;
   96|       |
   97|   181k|  do {
   98|   181k|    *dest++ = Curl_raw_tolower(*src);
   99|   181k|  } while(*src++ && --n);
  ------------------
  |  Branch (99:11): [True: 181k, False: 0]
  |  Branch (99:21): [True: 163k, False: 18.1k]
  ------------------
  100|  18.1k|}
Curl_safecmp:
  106|  3.58k|{
  107|  3.58k|  if(a && b)
  ------------------
  |  Branch (107:6): [True: 0, False: 3.58k]
  |  Branch (107:11): [True: 0, False: 0]
  ------------------
  108|      0|    return !strcmp(a, b);
  109|  3.58k|  return !a && !b;
  ------------------
  |  Branch (109:10): [True: 3.58k, False: 0]
  |  Branch (109:16): [True: 3.58k, False: 0]
  ------------------
  110|  3.58k|}
Curl_timestrcmp:
  117|  3.58k|{
  118|  3.58k|  int match = 0;
  119|  3.58k|  int i = 0;
  120|       |
  121|  3.58k|  if(a && b) {
  ------------------
  |  Branch (121:6): [True: 0, False: 3.58k]
  |  Branch (121:11): [True: 0, False: 0]
  ------------------
  122|      0|    while(1) {
  ------------------
  |  Branch (122:11): [True: 0, Folded]
  ------------------
  123|      0|      match |= a[i] ^ b[i];
  124|      0|      if(!a[i] || !b[i])
  ------------------
  |  Branch (124:10): [True: 0, False: 0]
  |  Branch (124:19): [True: 0, False: 0]
  ------------------
  125|      0|        break;
  126|      0|      i++;
  127|      0|    }
  128|      0|  }
  129|  3.58k|  else
  130|  3.58k|    return a || b;
  ------------------
  |  Branch (130:12): [True: 0, False: 3.58k]
  |  Branch (130:17): [True: 0, False: 3.58k]
  ------------------
  131|      0|  return match;
  132|  3.58k|}

protocol.c:Curl_raw_tolower:
   43|   177k|{
   44|   177k|  return (char)Curl_tolowermap[(unsigned char)in];
   45|   177k|}
strcase.c:Curl_raw_toupper:
   38|      9|{
   39|      9|  return (char)Curl_touppermap[(unsigned char)in];
   40|      9|}
strcase.c:Curl_raw_tolower:
   43|   181k|{
   44|   181k|  return (char)Curl_tolowermap[(unsigned char)in];
   45|   181k|}
strequal.c:Curl_raw_toupper:
   38|   520k|{
   39|   520k|  return (char)Curl_touppermap[(unsigned char)in];
   40|   520k|}
cookie.c:Curl_raw_toupper:
   38|  55.4k|{
   39|  55.4k|  return (char)Curl_touppermap[(unsigned char)in];
   40|  55.4k|}
http_aws_sigv4.c:Curl_raw_toupper:
   38|      1|{
   39|      1|  return (char)Curl_touppermap[(unsigned char)in];
   40|      1|}

curl_strequal:
   77|  49.1k|{
   78|  49.1k|  if(s1 && s2)
  ------------------
  |  Branch (78:6): [True: 49.1k, False: 0]
  |  Branch (78:12): [True: 49.1k, False: 0]
  ------------------
   79|       |    /* both pointers point to something then compare them */
   80|  49.1k|    return casecompare(s1, s2);
   81|       |
   82|       |  /* if both pointers are NULL then treat them as equal */
   83|      0|  return NULL == s1 && NULL == s2;
  ------------------
  |  Branch (83:10): [True: 0, False: 0]
  |  Branch (83:24): [True: 0, False: 0]
  ------------------
   84|  49.1k|}
curl_strnequal:
   88|  47.1k|{
   89|  47.1k|  if(s1 && s2)
  ------------------
  |  Branch (89:6): [True: 47.1k, False: 0]
  |  Branch (89:12): [True: 47.1k, False: 0]
  ------------------
   90|       |    /* both pointers point to something then compare them */
   91|  47.1k|    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|  47.1k|}
strequal.c:casecompare:
   36|  49.1k|{
   37|   114k|  while(*first) {
  ------------------
  |  Branch (37:9): [True: 108k, False: 6.19k]
  ------------------
   38|   108k|    if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second))
  ------------------
  |  Branch (38:8): [True: 42.9k, False: 65.2k]
  ------------------
   39|       |      /* get out of the loop as soon as they do not match */
   40|  42.9k|      return 0;
   41|  65.2k|    first++;
   42|  65.2k|    second++;
   43|  65.2k|  }
   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|  6.19k|  return !*first == !*second;
   49|  49.1k|}
strequal.c:ncasecompare:
   52|  47.1k|{
   53|   161k|  while(*first && max) {
  ------------------
  |  Branch (53:9): [True: 146k, False: 14.7k]
  |  Branch (53:19): [True: 143k, False: 3.70k]
  ------------------
   54|   143k|    if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second))
  ------------------
  |  Branch (54:8): [True: 28.7k, False: 114k]
  ------------------
   55|  28.7k|      return 0;
   56|   114k|    max--;
   57|   114k|    first++;
   58|   114k|    second++;
   59|   114k|  }
   60|  18.4k|  if(max == 0)
  ------------------
  |  Branch (60:6): [True: 9.45k, False: 8.97k]
  ------------------
   61|  9.45k|    return 1; /* they are equal this far */
   62|       |
   63|  8.97k|  return Curl_raw_toupper(*first) == Curl_raw_toupper(*second);
   64|  18.4k|}

curl_url_strerror:
  421|     40|{
  422|     40|#ifdef CURLVERBOSE
  423|     40|  switch(error) {
  ------------------
  |  Branch (423:10): [True: 40, False: 0]
  ------------------
  424|      0|  case CURLUE_OK:
  ------------------
  |  Branch (424:3): [True: 0, False: 40]
  ------------------
  425|      0|    return "No error";
  426|       |
  427|      0|  case CURLUE_BAD_HANDLE:
  ------------------
  |  Branch (427:3): [True: 0, False: 40]
  ------------------
  428|      0|    return "An invalid CURLU pointer was passed as argument";
  429|       |
  430|      0|  case CURLUE_BAD_PARTPOINTER:
  ------------------
  |  Branch (430:3): [True: 0, False: 40]
  ------------------
  431|      0|    return "An invalid 'part' argument was passed as argument";
  432|       |
  433|     40|  case CURLUE_MALFORMED_INPUT:
  ------------------
  |  Branch (433:3): [True: 40, False: 0]
  ------------------
  434|     40|    return "Malformed input to a URL function";
  435|       |
  436|      0|  case CURLUE_BAD_PORT_NUMBER:
  ------------------
  |  Branch (436:3): [True: 0, False: 40]
  ------------------
  437|      0|    return "Port number was not a decimal number between 0 and 65535";
  438|       |
  439|      0|  case CURLUE_UNSUPPORTED_SCHEME:
  ------------------
  |  Branch (439:3): [True: 0, False: 40]
  ------------------
  440|      0|    return "Unsupported URL scheme";
  441|       |
  442|      0|  case CURLUE_URLDECODE:
  ------------------
  |  Branch (442:3): [True: 0, False: 40]
  ------------------
  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: 40]
  ------------------
  446|      0|    return "A memory function failed";
  447|       |
  448|      0|  case CURLUE_USER_NOT_ALLOWED:
  ------------------
  |  Branch (448:3): [True: 0, False: 40]
  ------------------
  449|      0|    return "Credentials was passed in the URL when prohibited";
  450|       |
  451|      0|  case CURLUE_UNKNOWN_PART:
  ------------------
  |  Branch (451:3): [True: 0, False: 40]
  ------------------
  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: 40]
  ------------------
  455|      0|    return "No scheme present";
  456|       |
  457|      0|  case CURLUE_NO_USER:
  ------------------
  |  Branch (457:3): [True: 0, False: 40]
  ------------------
  458|      0|    return "No user present";
  459|       |
  460|      0|  case CURLUE_NO_PASSWORD:
  ------------------
  |  Branch (460:3): [True: 0, False: 40]
  ------------------
  461|      0|    return "No password present";
  462|       |
  463|      0|  case CURLUE_NO_OPTIONS:
  ------------------
  |  Branch (463:3): [True: 0, False: 40]
  ------------------
  464|      0|    return "No options present";
  465|       |
  466|      0|  case CURLUE_NO_HOST:
  ------------------
  |  Branch (466:3): [True: 0, False: 40]
  ------------------
  467|      0|    return "No host present";
  468|       |
  469|      0|  case CURLUE_NO_PORT:
  ------------------
  |  Branch (469:3): [True: 0, False: 40]
  ------------------
  470|      0|    return "No port number present";
  471|       |
  472|      0|  case CURLUE_NO_QUERY:
  ------------------
  |  Branch (472:3): [True: 0, False: 40]
  ------------------
  473|      0|    return "No query present";
  474|       |
  475|      0|  case CURLUE_NO_FRAGMENT:
  ------------------
  |  Branch (475:3): [True: 0, False: 40]
  ------------------
  476|      0|    return "No fragment present";
  477|       |
  478|      0|  case CURLUE_NO_ZONEID:
  ------------------
  |  Branch (478:3): [True: 0, False: 40]
  ------------------
  479|      0|    return "No zoneid present";
  480|       |
  481|      0|  case CURLUE_BAD_LOGIN:
  ------------------
  |  Branch (481:3): [True: 0, False: 40]
  ------------------
  482|      0|    return "Bad login";
  483|       |
  484|      0|  case CURLUE_BAD_IPV6:
  ------------------
  |  Branch (484:3): [True: 0, False: 40]
  ------------------
  485|      0|    return "Bad IPv6 address";
  486|       |
  487|      0|  case CURLUE_BAD_HOSTNAME:
  ------------------
  |  Branch (487:3): [True: 0, False: 40]
  ------------------
  488|      0|    return "Bad hostname";
  489|       |
  490|      0|  case CURLUE_BAD_FILE_URL:
  ------------------
  |  Branch (490:3): [True: 0, False: 40]
  ------------------
  491|      0|    return "Bad file:// URL";
  492|       |
  493|      0|  case CURLUE_BAD_SLASHES:
  ------------------
  |  Branch (493:3): [True: 0, False: 40]
  ------------------
  494|      0|    return "Unsupported number of slashes following scheme";
  495|       |
  496|      0|  case CURLUE_BAD_SCHEME:
  ------------------
  |  Branch (496:3): [True: 0, False: 40]
  ------------------
  497|      0|    return "Bad scheme";
  498|       |
  499|      0|  case CURLUE_BAD_PATH:
  ------------------
  |  Branch (499:3): [True: 0, False: 40]
  ------------------
  500|      0|    return "Bad path";
  501|       |
  502|      0|  case CURLUE_BAD_FRAGMENT:
  ------------------
  |  Branch (502:3): [True: 0, False: 40]
  ------------------
  503|      0|    return "Bad fragment";
  504|       |
  505|      0|  case CURLUE_BAD_QUERY:
  ------------------
  |  Branch (505:3): [True: 0, False: 40]
  ------------------
  506|      0|    return "Bad query";
  507|       |
  508|      0|  case CURLUE_BAD_PASSWORD:
  ------------------
  |  Branch (508:3): [True: 0, False: 40]
  ------------------
  509|      0|    return "Bad password";
  510|       |
  511|      0|  case CURLUE_BAD_USER:
  ------------------
  |  Branch (511:3): [True: 0, False: 40]
  ------------------
  512|      0|    return "Bad user";
  513|       |
  514|      0|  case CURLUE_LACKS_IDN:
  ------------------
  |  Branch (514:3): [True: 0, False: 40]
  ------------------
  515|      0|    return "libcurl lacks IDN support";
  516|       |
  517|      0|  case CURLUE_TOO_LARGE:
  ------------------
  |  Branch (517:3): [True: 0, False: 40]
  ------------------
  518|      0|    return "A value or data field is larger than allowed";
  519|       |
  520|      0|  case CURLUE_BACKSLASH:
  ------------------
  |  Branch (520:3): [True: 0, False: 40]
  ------------------
  521|      0|    return "Found a backslash where a forward slash was expected";
  522|       |
  523|      0|  case CURLUE_LAST:
  ------------------
  |  Branch (523:3): [True: 0, False: 40]
  ------------------
  524|      0|    break;
  525|     40|  }
  526|       |
  527|      0|  return "CURLUcode unknown";
  528|       |#else
  529|       |  if(error == CURLUE_OK)
  530|       |    return "No error";
  531|       |  else
  532|       |    return "Error";
  533|       |#endif
  534|     40|}

Curl_thrdpool_set_props:
  282|  3.73k|{
  283|  3.73k|  CURLcode result = CURLE_OK;
  284|  3.73k|  size_t running;
  285|       |
  286|  3.73k|  if(!max_threads || (min_threads > max_threads))
  ------------------
  |  Branch (286:6): [True: 0, False: 3.73k]
  |  Branch (286:22): [True: 0, False: 3.73k]
  ------------------
  287|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  288|       |
  289|  3.73k|  Curl_mutex_acquire(&tpool->lock);
  ------------------
  |  |   51|  3.73k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  290|  3.73k|  tpool->min_threads = min_threads;
  291|  3.73k|  tpool->max_threads = max_threads;
  292|  3.73k|  tpool->idle_time_ms = idle_time_ms;
  293|  3.73k|  running = Curl_llist_count(&tpool->slots);
  294|  3.73k|  if(tpool->min_threads > running) {
  ------------------
  |  Branch (294:6): [True: 0, False: 3.73k]
  ------------------
  295|      0|    result = thrdpool_signal(tpool, tpool->min_threads - (uint32_t)running);
  296|      0|  }
  297|  3.73k|  Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   52|  3.73k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  298|       |
  299|  3.73k|  return result;
  300|  3.73k|}
Curl_thrdpool_create:
  311|  3.73k|{
  312|  3.73k|  struct curl_thrdpool *tpool;
  313|  3.73k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  314|  3.73k|  DEBUGASSERT(name);
  ------------------
  |  | 1075|  3.73k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (314:3): [True: 0, False: 3.73k]
  |  Branch (314:3): [True: 3.73k, False: 0]
  ------------------
  315|       |
  316|  3.73k|  tpool = curlx_calloc(1, sizeof(*tpool));
  ------------------
  |  | 1473|  3.73k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  317|  3.73k|  if(!tpool)
  ------------------
  |  Branch (317:6): [True: 0, False: 3.73k]
  ------------------
  318|      0|    goto out;
  319|  3.73k|  tpool->refcount = 1;
  320|       |
  321|  3.73k|  Curl_mutex_init(&tpool->lock);
  ------------------
  |  |   50|  3.73k|#  define Curl_mutex_init(m)     pthread_mutex_init(m, NULL)
  ------------------
  322|  3.73k|  Curl_cond_init(&tpool->await);
  ------------------
  |  |   55|  3.73k|#  define Curl_cond_init(c)      pthread_cond_init(c, NULL)
  ------------------
  323|  3.73k|  Curl_llist_init(&tpool->slots, NULL);
  324|  3.73k|  Curl_llist_init(&tpool->zombies, NULL);
  325|  3.73k|  tpool->fn_take = fn_take;
  326|  3.73k|  tpool->fn_process = fn_process;
  327|  3.73k|  tpool->fn_return = fn_return;
  328|  3.73k|  tpool->fn_user_data = user_data;
  329|       |
  330|       |  /* a const string that remains */
  331|  3.73k|  tpool->name = name;
  332|       |
  333|  3.73k|#ifdef DEBUGBUILD
  334|  3.73k|  {
  335|  3.73k|    const char *p = getenv("CURL_DBG_THRDPOOL_FAIL_STARTS");
  336|  3.73k|    if(p) {
  ------------------
  |  Branch (336:8): [True: 0, False: 3.73k]
  ------------------
  337|      0|      curl_off_t l;
  338|      0|      if(!curlx_str_number(&p, &l, INT_MAX))
  ------------------
  |  Branch (338:10): [True: 0, False: 0]
  ------------------
  339|      0|        tpool->dbg_fail_starts = (int)l;
  340|      0|    }
  341|  3.73k|  }
  342|  3.73k|#endif
  343|       |
  344|  3.73k|  result = Curl_thrdpool_set_props(tpool, min_threads, max_threads,
  345|  3.73k|                                   idle_time_ms);
  346|       |
  347|  3.73k|out:
  348|  3.73k|  if(result && tpool) {
  ------------------
  |  Branch (348:6): [True: 0, False: 3.73k]
  |  Branch (348:16): [True: 0, False: 0]
  ------------------
  349|      0|    tpool->aborted = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  350|      0|    thrdpool_unlink(tpool, FALSE);
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  351|       |    tpool = NULL;
  352|      0|  }
  353|  3.73k|  *ptpool = tpool;
  354|  3.73k|  return result;
  355|  3.73k|}
Curl_thrdpool_destroy:
  358|  3.73k|{
  359|  3.73k|  Curl_mutex_acquire(&tpool->lock);
  ------------------
  |  |   51|  3.73k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  360|       |
  361|  3.73k|  tpool->aborted = TRUE;
  ------------------
  |  | 1045|  3.73k|#define TRUE true
  ------------------
  362|       |
  363|  3.73k|  while(join && Curl_llist_count(&tpool->slots)) {
  ------------------
  |  Branch (363:9): [True: 3.73k, False: 0]
  |  Branch (363:17): [True: 0, False: 3.73k]
  ------------------
  364|      0|    thrdpool_wake_all(tpool);
  365|      0|    Curl_cond_wait(&tpool->await, &tpool->lock);
  366|      0|  }
  367|       |
  368|  3.73k|  thrdpool_join_zombies(tpool);
  369|       |
  370|       |  /* detach all still running threads */
  371|  3.73k|  if(Curl_llist_count(&tpool->slots)) {
  ------------------
  |  Branch (371:6): [True: 0, False: 3.73k]
  ------------------
  372|      0|    struct Curl_llist_node *e;
  373|      0|    for(e = Curl_llist_head(&tpool->slots); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (373:45): [True: 0, False: 0]
  ------------------
  374|      0|      struct thrdslot *tslot = Curl_node_elem(e);
  375|      0|      if(tslot->thread != curl_thread_t_null)
  ------------------
  |  |   49|      0|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
  |  Branch (375:10): [True: 0, False: 0]
  ------------------
  376|      0|        Curl_thread_destroy(&tslot->thread);
  377|      0|    }
  378|      0|    tpool->detached = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  379|      0|  }
  380|       |
  381|  3.73k|  if(!thrdpool_unlink(tpool, TRUE)) {
  ------------------
  |  | 1045|  3.73k|#define TRUE true
  ------------------
  |  Branch (381:6): [True: 0, False: 3.73k]
  ------------------
  382|       |    /* tpool not destroyed */
  383|      0|    Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   52|      0|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  384|      0|  }
  385|  3.73k|}
thrdpool.c:thrdpool_unlink:
  227|  3.73k|{
  228|  3.73k|  DEBUGASSERT(tpool->refcount);
  ------------------
  |  | 1075|  3.73k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (228:3): [True: 0, False: 3.73k]
  |  Branch (228:3): [True: 3.73k, False: 0]
  ------------------
  229|  3.73k|  if(tpool->refcount)
  ------------------
  |  Branch (229:6): [True: 3.73k, False: 0]
  ------------------
  230|  3.73k|    tpool->refcount--;
  231|  3.73k|  if(tpool->refcount)
  ------------------
  |  Branch (231:6): [True: 0, False: 3.73k]
  ------------------
  232|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  233|       |
  234|       |  /* no more references, free */
  235|  3.73k|  DEBUGASSERT(tpool->aborted);
  ------------------
  |  | 1075|  3.73k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (235:3): [True: 0, False: 3.73k]
  |  Branch (235:3): [True: 3.73k, False: 0]
  ------------------
  236|  3.73k|  thrdpool_join_zombies(tpool);
  237|  3.73k|  if(locked)
  ------------------
  |  Branch (237:6): [True: 3.73k, False: 0]
  ------------------
  238|  3.73k|    Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   52|  3.73k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  239|  3.73k|  Curl_cond_destroy(&tpool->await);
  ------------------
  |  |   56|  3.73k|#  define Curl_cond_destroy(c)   pthread_cond_destroy(c)
  ------------------
  240|  3.73k|  Curl_mutex_destroy(&tpool->lock);
  ------------------
  |  |   53|  3.73k|#  define Curl_mutex_destroy(m)  pthread_mutex_destroy(m)
  ------------------
  241|  3.73k|  curlx_free(tpool);
  ------------------
  |  | 1476|  3.73k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  242|       |  return TRUE;
  ------------------
  |  | 1045|  3.73k|#define TRUE true
  ------------------
  243|  3.73k|}
thrdpool.c:thrdpool_join_zombies:
  208|  7.46k|{
  209|  7.46k|  struct Curl_llist_node *e;
  210|       |
  211|  7.46k|  for(e = Curl_llist_head(&tpool->zombies); e;
  ------------------
  |  Branch (211:45): [True: 0, False: 7.46k]
  ------------------
  212|  7.46k|      e = Curl_llist_head(&tpool->zombies)) {
  213|      0|    struct thrdslot *tslot = Curl_node_elem(e);
  214|       |
  215|      0|    Curl_node_remove(&tslot->node);
  216|      0|    if(tslot->thread != curl_thread_t_null) {
  ------------------
  |  |   49|      0|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
  |  Branch (216:8): [True: 0, False: 0]
  ------------------
  217|      0|      Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   52|      0|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  218|      0|      Curl_thread_join(&tslot->thread);
  219|      0|      Curl_mutex_acquire(&tpool->lock);
  ------------------
  |  |   51|      0|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  220|      0|      tslot->thread = curl_thread_t_null;
  ------------------
  |  |   49|      0|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
  221|      0|    }
  222|      0|    thrdslot_destroy(tslot);
  223|      0|  }
  224|  7.46k|}

Curl_thrdq_create:
  206|  3.73k|{
  207|  3.73k|  struct curl_thrdq *tqueue;
  208|  3.73k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  209|  3.73k|  DEBUGASSERT(name);
  ------------------
  |  | 1075|  3.73k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (209:3): [True: 0, False: 3.73k]
  |  Branch (209:3): [True: 3.73k, False: 0]
  ------------------
  210|       |
  211|  3.73k|  tqueue = curlx_calloc(1, sizeof(*tqueue));
  ------------------
  |  | 1473|  3.73k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  212|  3.73k|  if(!tqueue)
  ------------------
  |  Branch (212:6): [True: 0, False: 3.73k]
  ------------------
  213|      0|    goto out;
  214|       |
  215|  3.73k|  Curl_mutex_init(&tqueue->lock);
  ------------------
  |  |   50|  3.73k|#  define Curl_mutex_init(m)     pthread_mutex_init(m, NULL)
  ------------------
  216|  3.73k|  Curl_cond_init(&tqueue->await);
  ------------------
  |  |   55|  3.73k|#  define Curl_cond_init(c)      pthread_cond_init(c, NULL)
  ------------------
  217|  3.73k|  Curl_llist_init(&tqueue->sendq, thrdq_item_list_dtor);
  218|  3.73k|  Curl_llist_init(&tqueue->recvq, thrdq_item_list_dtor);
  219|  3.73k|  tqueue->fn_free = fn_free;
  220|  3.73k|  tqueue->fn_process = fn_process;
  221|  3.73k|  tqueue->fn_event = fn_event;
  222|  3.73k|  tqueue->fn_user_data = user_data;
  223|       |
  224|       |  /* a const string that remains */
  225|  3.73k|  tqueue->name = name;
  226|       |
  227|  3.73k|  result = Curl_thrdpool_create(&tqueue->tpool, name,
  228|  3.73k|                                min_threads, max_threads, idle_time_ms,
  229|  3.73k|                                thrdq_tpool_take,
  230|  3.73k|                                thrdq_tpool_process,
  231|  3.73k|                                thrdq_tpool_return,
  232|  3.73k|                                tqueue);
  233|       |
  234|  3.73k|out:
  235|  3.73k|  if(result && tqueue) {
  ------------------
  |  Branch (235:6): [True: 0, False: 3.73k]
  |  Branch (235:16): [True: 0, False: 0]
  ------------------
  236|      0|    tqueue->aborted = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  237|      0|    thrdq_unlink(tqueue, FALSE, TRUE);
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
                  thrdq_unlink(tqueue, FALSE, TRUE);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  238|       |    tqueue = NULL;
  239|      0|  }
  240|  3.73k|  *ptqueue = tqueue;
  241|  3.73k|  return result;
  242|  3.73k|}
Curl_thrdq_destroy:
  245|  3.73k|{
  246|  3.73k|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   51|  3.73k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  247|  3.73k|  DEBUGASSERT(!tqueue->aborted);
  ------------------
  |  | 1075|  3.73k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (247:3): [True: 0, False: 3.73k]
  |  Branch (247:3): [True: 3.73k, False: 0]
  ------------------
  248|  3.73k|  tqueue->aborted = TRUE;
  ------------------
  |  | 1045|  3.73k|#define TRUE true
  ------------------
  249|       |  thrdq_unlink(tqueue, TRUE, join);
  ------------------
  |  | 1045|  3.73k|#define TRUE true
  ------------------
  250|  3.73k|}
Curl_thrdq_recv:
  307|  10.9k|{
  308|  10.9k|  CURLcode result = CURLE_AGAIN;
  309|  10.9k|  struct Curl_llist_node *e;
  310|  10.9k|  uint32_t signals = 0;
  311|       |
  312|  10.9k|  *pitem = NULL;
  313|  10.9k|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   51|  10.9k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  314|  10.9k|  if(tqueue->aborted) {
  ------------------
  |  Branch (314:6): [True: 0, False: 10.9k]
  ------------------
  315|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (315:5): [Folded, False: 0]
  |  Branch (315:5): [Folded, False: 0]
  ------------------
  316|      0|    result = CURLE_RECV_ERROR;
  317|      0|    goto out;
  318|      0|  }
  319|       |
  320|  10.9k|  e = Curl_llist_head(&tqueue->recvq);
  321|  10.9k|  if(e) {
  ------------------
  |  Branch (321:6): [True: 0, False: 10.9k]
  ------------------
  322|      0|    struct thrdq_item *qitem = Curl_node_take_elem(e);
  323|      0|    *pitem = qitem->item;
  324|      0|    qitem->item = NULL;
  325|      0|    thrdq_item_destroy(qitem);
  326|      0|    result = CURLE_OK;
  327|      0|  }
  328|  10.9k|  else
  329|  10.9k|    signals = thrdq_get_signals(tqueue);
  330|       |
  331|  10.9k|out:
  332|  10.9k|  Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   52|  10.9k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  333|       |  /* Signal thread pool unlocked to avoid deadlocks. If items await
  334|       |   * processing while nothing was ready, make sure the pool has a
  335|       |   * thread to work on them. An earlier thread start may have failed,
  336|       |   * which `Curl_thrdq_send()` cannot report to its caller. Without
  337|       |   * this, such items would sit unprocessed until the next send. */
  338|  10.9k|  if(signals)
  ------------------
  |  Branch (338:6): [True: 0, False: 10.9k]
  ------------------
  339|      0|    (void)Curl_thrdpool_signal(tqueue->tpool, (uint32_t)signals);
  340|  10.9k|  return result;
  341|  10.9k|}
Curl_thrdq_trace:
  406|  14.7k|{
  407|  14.7k|  struct curl_trc_feat *feat = &Curl_trc_feat_threads;
  408|  14.7k|  if(Curl_trc_ft_is_verbose(data, feat)) {
  ------------------
  |  |  329|  14.7k|  (Curl_trc_is_verbose(data) &&          \
  |  |  ------------------
  |  |  |  |  322|  29.4k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 14.7k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 14.7k]
  |  |  |  |  ------------------
  |  |  |  |  323|  29.4k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  330|  14.7k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  409|      0|    struct Curl_llist_node *e;
  410|      0|    struct thrdq_item *qitem;
  411|       |
  412|      0|    Curl_thrdpool_trace(tqueue->tpool, data);
  413|      0|    Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   51|      0|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  414|      0|    if(!Curl_llist_count(&tqueue->sendq) &&
  ------------------
  |  Branch (414:8): [True: 0, False: 0]
  ------------------
  415|      0|       !Curl_llist_count(&tqueue->recvq)) {
  ------------------
  |  Branch (415:8): [True: 0, False: 0]
  ------------------
  416|      0|      Curl_trc_feat_infof(data, feat, "[TQUEUE-%s] empty", tqueue->name);
  417|      0|    }
  418|      0|    for(e = Curl_llist_head(&tqueue->sendq); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (418:46): [True: 0, False: 0]
  ------------------
  419|      0|      qitem = Curl_node_elem(e);
  420|      0|      Curl_trc_feat_infof(data, feat, "[TQUEUE-%s] in: %s",
  421|      0|                          tqueue->name, qitem->description);
  422|      0|    }
  423|      0|    for(e = Curl_llist_head(&tqueue->recvq); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (423:46): [True: 0, False: 0]
  ------------------
  424|      0|      qitem = Curl_node_elem(e);
  425|      0|      Curl_trc_feat_infof(data, feat, "[TQUEUE-%s] out: %s",
  426|      0|                          tqueue->name, qitem->description);
  427|      0|    }
  428|      0|    Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   52|      0|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  429|      0|  }
  430|  14.7k|}
thrdqueue.c:thrdq_unlink:
  177|  3.73k|{
  178|  3.73k|  DEBUGASSERT(tqueue->aborted);
  ------------------
  |  | 1075|  3.73k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (178:3): [True: 0, False: 3.73k]
  |  Branch (178:3): [True: 3.73k, False: 0]
  ------------------
  179|  3.73k|  if(tqueue->tpool) {
  ------------------
  |  Branch (179:6): [True: 3.73k, False: 0]
  ------------------
  180|  3.73k|    if(locked)
  ------------------
  |  Branch (180:8): [True: 3.73k, False: 0]
  ------------------
  181|  3.73k|      Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   52|  3.73k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  182|  3.73k|    Curl_thrdpool_destroy(tqueue->tpool, join);
  183|  3.73k|    tqueue->tpool = NULL;
  184|  3.73k|    if(locked)
  ------------------
  |  Branch (184:8): [True: 3.73k, False: 0]
  ------------------
  185|  3.73k|      Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   51|  3.73k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  186|  3.73k|  }
  187|       |
  188|  3.73k|  Curl_llist_destroy(&tqueue->sendq, NULL);
  189|  3.73k|  Curl_llist_destroy(&tqueue->recvq, NULL);
  190|  3.73k|  Curl_cond_destroy(&tqueue->await);
  ------------------
  |  |   56|  3.73k|#  define Curl_cond_destroy(c)   pthread_cond_destroy(c)
  ------------------
  191|  3.73k|  if(locked)
  ------------------
  |  Branch (191:6): [True: 3.73k, False: 0]
  ------------------
  192|  3.73k|    Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   52|  3.73k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  193|  3.73k|  Curl_mutex_destroy(&tqueue->lock);
  ------------------
  |  |   53|  3.73k|#  define Curl_mutex_destroy(m)  pthread_mutex_destroy(m)
  ------------------
  194|  3.73k|  curlx_free(tqueue);
  ------------------
  |  | 1476|  3.73k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  195|  3.73k|}
thrdqueue.c:thrdq_get_signals:
  253|  10.9k|{
  254|  10.9k|  size_t qlen = Curl_llist_count(&tqueue->sendq);
  255|  10.9k|  return (qlen <= UINT32_MAX) ? (uint32_t)qlen : UINT32_MAX;
  ------------------
  |  Branch (255:10): [True: 10.9k, False: 0]
  ------------------
  256|  10.9k|}

Curl_checkheaders:
   87|  16.7k|{
   88|  16.7k|  struct curl_slist *head;
   89|  16.7k|  DEBUGASSERT(thislen);
  ------------------
  |  | 1075|  16.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (89:3): [True: 0, False: 16.7k]
  |  Branch (89:3): [True: 16.7k, False: 0]
  ------------------
   90|  16.7k|  DEBUGASSERT(thisheader[thislen - 1] != ':');
  ------------------
  |  | 1075|  16.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (90:3): [True: 0, False: 16.7k]
  |  Branch (90:3): [True: 16.7k, False: 0]
  ------------------
   91|       |
   92|  22.1k|  for(head = data->set.headers; head; head = head->next) {
  ------------------
  |  Branch (92:33): [True: 5.45k, False: 16.7k]
  ------------------
   93|  5.45k|    if(curl_strnequal(head->data, thisheader, thislen) &&
  ------------------
  |  Branch (93:8): [True: 44, False: 5.40k]
  ------------------
   94|     44|       Curl_headersep(head->data[thislen]))
  ------------------
  |  |   26|     44|#define Curl_headersep(x) ((((x) == ':') || ((x) == ';')))
  |  |  ------------------
  |  |  |  Branch (26:29): [True: 33, False: 11]
  |  |  |  Branch (26:45): [True: 0, False: 11]
  |  |  ------------------
  ------------------
   95|     33|      return head->data;
   96|  5.45k|  }
   97|       |
   98|  16.7k|  return NULL;
   99|  16.7k|}
Curl_meets_timecondition:
  121|      1|{
  122|      1|  if((timeofdoc == 0) || (data->set.timevalue == 0))
  ------------------
  |  Branch (122:6): [True: 1, False: 0]
  |  Branch (122:26): [True: 0, False: 0]
  ------------------
  123|      1|    return TRUE;
  ------------------
  |  | 1045|      1|#define TRUE true
  ------------------
  124|       |
  125|      0|  switch(data->set.timecondition) {
  126|      0|  case CURL_TIMECOND_IFMODSINCE:
  ------------------
  |  | 2437|      0|#define CURL_TIMECOND_IFMODSINCE   1L
  ------------------
  |  Branch (126:3): [True: 0, False: 0]
  ------------------
  127|      0|  default:
  ------------------
  |  Branch (127:3): [True: 0, False: 0]
  ------------------
  128|      0|    if(timeofdoc <= data->set.timevalue) {
  ------------------
  |  Branch (128:8): [True: 0, False: 0]
  ------------------
  129|      0|      infof(data, "The requested document is not new enough");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  130|      0|      data->info.timecond = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  131|      0|      return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  132|      0|    }
  133|      0|    break;
  134|      0|  case CURL_TIMECOND_IFUNMODSINCE:
  ------------------
  |  | 2438|      0|#define CURL_TIMECOND_IFUNMODSINCE 2L
  ------------------
  |  Branch (134:3): [True: 0, False: 0]
  ------------------
  135|      0|    if(timeofdoc >= data->set.timevalue) {
  ------------------
  |  Branch (135:8): [True: 0, False: 0]
  ------------------
  136|      0|      infof(data, "The requested document is not old enough");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  137|      0|      data->info.timecond = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  138|      0|      return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  139|      0|    }
  140|      0|    break;
  141|      0|  }
  142|       |
  143|      0|  return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  144|      0|}
Curl_sendrecv:
  355|  7.23k|{
  356|  7.23k|  struct SingleRequest *k = &data->req;
  357|  7.23k|  CURLcode result = CURLE_OK;
  358|       |
  359|  7.23k|  if(Curl_xfer_is_blocked(data)) {
  ------------------
  |  Branch (359:6): [True: 0, False: 7.23k]
  ------------------
  360|      0|    result = CURLE_OK;
  361|      0|    goto out;
  362|      0|  }
  363|       |
  364|       |  /* We go ahead and do a read if we have a readable socket or if the stream
  365|       |     was rewound (in which case we have data in a buffer) */
  366|  7.23k|  if(CURL_REQ_WANT_RECV(data)) {
  ------------------
  |  |   40|  7.23k|#define CURL_REQ_WANT_RECV(d)  ((d)->req.io_flags & REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|  7.23k|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  |  |  |  Branch (40:32): [True: 7.23k, False: 0]
  |  |  ------------------
  ------------------
  367|  7.23k|    result = sendrecv_dl(data, k);
  368|  7.23k|    if(result || data->req.done)
  ------------------
  |  Branch (368:8): [True: 572, False: 6.65k]
  |  Branch (368:18): [True: 1, False: 6.65k]
  ------------------
  369|    573|      goto out;
  370|  7.23k|  }
  371|       |
  372|       |  /* If we still have writing to do, we check if we have a writable socket. */
  373|  6.65k|  if(Curl_req_want_send(data)) {
  ------------------
  |  Branch (373:6): [True: 114, False: 6.54k]
  ------------------
  374|    114|    result = sendrecv_ul(data);
  375|    114|    if(result)
  ------------------
  |  Branch (375:8): [True: 12, False: 102]
  ------------------
  376|     12|      goto out;
  377|    114|  }
  378|       |
  379|  6.64k|  result = Curl_pgrsCheck(data);
  380|  6.64k|  if(result)
  ------------------
  |  Branch (380:6): [True: 0, False: 6.64k]
  ------------------
  381|      0|    goto out;
  382|       |
  383|  6.64k|  if(CURL_REQ_WANT_IO(data)) {
  ------------------
  |  |   42|  6.64k|  ((d)->req.io_flags & (REQ_IO_RECV | REQ_IO_SEND))
  |  |  ------------------
  |  |  |  |   35|  6.64k|#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|  6.64k|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  |  |  |  Branch (42:3): [True: 3.63k, False: 3.01k]
  |  |  ------------------
  ------------------
  384|  3.63k|    if(Curl_timeleft_ms(data) < 0) {
  ------------------
  |  Branch (384:8): [True: 0, False: 3.63k]
  ------------------
  385|      0|      if(k->size != -1) {
  ------------------
  |  Branch (385:10): [True: 0, False: 0]
  ------------------
  386|      0|        failf(data, "Operation timed out after %" FMT_TIMEDIFF_T
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  387|      0|              " milliseconds with %" FMT_OFF_T " out of %"
  388|      0|              FMT_OFF_T " bytes received",
  389|      0|              Curl_pgrs_since_ms(data, NULL, TIMER_STARTSINGLE),
  390|      0|              k->bytecount, k->size);
  391|      0|      }
  392|      0|      else {
  393|      0|        failf(data, "Operation timed out after %" FMT_TIMEDIFF_T
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  394|      0|              " milliseconds with %" FMT_OFF_T " bytes received",
  395|      0|              Curl_pgrs_since_ms(data, NULL, TIMER_STARTSINGLE),
  396|      0|              k->bytecount);
  397|      0|      }
  398|      0|      result = CURLE_OPERATION_TIMEDOUT;
  399|      0|      goto out;
  400|      0|    }
  401|  3.63k|  }
  402|  3.01k|  else {
  403|       |    /*
  404|       |     * The transfer has been performed. Make some general checks before
  405|       |     * returning.
  406|       |     */
  407|  3.01k|    if(!data->req.no_body && (k->size != -1) &&
  ------------------
  |  Branch (407:8): [True: 2.99k, False: 18]
  |  Branch (407:30): [True: 34, False: 2.95k]
  ------------------
  408|     34|       (k->bytecount != k->size) && !k->newurl) {
  ------------------
  |  Branch (408:8): [True: 0, False: 34]
  |  Branch (408:37): [True: 0, False: 0]
  ------------------
  409|      0|      failf(data, "transfer closed with %" FMT_OFF_T
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  410|      0|            " bytes remaining to read", k->size - k->bytecount);
  411|      0|      result = CURLE_PARTIAL_FILE;
  412|      0|      goto out;
  413|      0|    }
  414|  3.01k|  }
  415|       |
  416|       |  /* If there is nothing more to send/recv, the request is done */
  417|  6.64k|  if(!CURL_REQ_WANT_IO(data))
  ------------------
  |  |   42|  6.64k|  ((d)->req.io_flags & (REQ_IO_RECV | REQ_IO_SEND))
  |  |  ------------------
  |  |  |  |   35|  6.64k|#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|  6.64k|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  ------------------
  |  Branch (417:6): [True: 3.01k, False: 3.63k]
  ------------------
  418|  3.01k|    data->req.done = TRUE;
  ------------------
  |  | 1045|  3.01k|#define TRUE true
  ------------------
  419|       |
  420|  6.64k|  result = Curl_pgrsUpdate(data);
  421|       |
  422|  7.23k|out:
  423|  7.23k|  if(result)
  ------------------
  |  Branch (423:6): [True: 584, False: 6.64k]
  ------------------
  424|    584|    DEBUGF(infof(data, "Curl_sendrecv() -> %d", (int)result));
  ------------------
  |  | 1061|  11.3k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1061:19): [True: 584, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 584]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [Folded, False: 584]
  |  |  ------------------
  ------------------
  425|  7.23k|  return result;
  426|  6.64k|}
Curl_init_CONNECT:
  431|  3.66k|{
  432|  3.66k|  data->state.fread_func = data->set.fread_func_set;
  433|  3.66k|  data->state.in = data->set.in_set;
  434|  3.66k|  data->state.upload = (data->state.httpreq == HTTPREQ_PUT);
  435|  3.66k|}
Curl_pretransfer:
  443|  3.73k|{
  444|  3.73k|  CURLcode result = CURLE_OK;
  445|       |
  446|       |  /* Reset the retry count at the start of each request.
  447|       |   * If the retry count is not reset, when the connection drops,
  448|       |   * it will not enter the retry mechanism on CONN_MAX_RETRIES + 1 attempts
  449|       |   * and will immediately throw
  450|       |   * "Connection died, tried CONN_MAX_RETRIES times before giving up".
  451|       |   * By resetting it here, we ensure each new request starts fresh. */
  452|  3.73k|  data->state.retrycount = 0;
  453|       |
  454|  3.73k|  if(!CURL_EASY_STR(data, STRING_SET_URL) && !data->set.uh) {
  ------------------
  |  | 1228|  7.46k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
  |  Branch (454:6): [True: 0, False: 3.73k]
  |  Branch (454:46): [True: 0, False: 0]
  ------------------
  455|       |    /* we cannot do anything without URL */
  456|      0|    failf(data, "No URL set");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  457|      0|    return CURLE_URL_MALFORMAT;
  458|      0|  }
  459|       |
  460|       |  /* CURLOPT_CURLU overrides CURLOPT_URL and the contents of the CURLU handle
  461|       |     is allowed to be changed by the user between transfers */
  462|  3.73k|  if(data->set.uh) {
  ------------------
  |  Branch (462:6): [True: 0, False: 3.73k]
  ------------------
  463|      0|    char *url = NULL;
  464|      0|    CURLUcode uc;
  465|      0|    uc = curl_url_get(data->set.uh, CURLUPART_URL, &url, 0);
  466|      0|    if(uc) {
  ------------------
  |  Branch (466:8): [True: 0, False: 0]
  ------------------
  467|       |      /* clear the pointer to not point to freed memory anymore */
  468|      0|      Curl_bufref_set(&data->state.url, NULL, 0, NULL);
  469|      0|      failf(data, "No URL set");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  470|      0|      return CURLE_URL_MALFORMAT;
  471|      0|    }
  472|      0|    result = CURL_EASY_STR_SETN(data, STRING_SET_URL, url);
  ------------------
  |  | 1232|      0|  Curl_u8_strset_setn(&(d)->set.strings, (uint8_t)(id), (s))
  ------------------
  473|      0|    if(result)
  ------------------
  |  Branch (473:8): [True: 0, False: 0]
  ------------------
  474|      0|      return result;
  475|      0|  }
  476|       |
  477|  3.73k|  Curl_bufref_set(&data->state.url, CURL_EASY_STR(data, STRING_SET_URL),
  ------------------
  |  | 1228|  3.73k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
  478|  3.73k|                  0, NULL);
  479|       |
  480|  3.73k|  if(data->set.postfields && data->set.set_resume_from) {
  ------------------
  |  Branch (480:6): [True: 159, False: 3.57k]
  |  Branch (480:30): [True: 65, False: 94]
  ------------------
  481|       |    /* we cannot */
  482|     65|    failf(data, "cannot mix POSTFIELDS with RESUME_FROM");
  ------------------
  |  |   62|     65|#define failf Curl_failf
  ------------------
  483|     65|    return CURLE_BAD_FUNCTION_ARGUMENT;
  484|     65|  }
  485|       |
  486|  3.66k|  data->state.prefer_ascii = data->set.prefer_ascii;
  487|  3.66k|#ifdef CURL_LIST_ONLY_PROTOCOL
  488|  3.66k|  data->state.list_only = data->set.list_only;
  489|  3.66k|#endif
  490|  3.66k|  data->state.httpreq = data->set.method;
  491|       |
  492|       |  /* initial transfer request coming up, forget the initial origin
  493|       |   * from a previous perform() on this handle. */
  494|  3.66k|  Curl_peer_unlink(&data->state.initial_origin);
  495|  3.66k|  Curl_peer_unlink(&data->state.origin);
  496|  3.66k|  data->state.requests = 0;
  497|  3.66k|  data->state.followlocation = 0; /* reset the location-follow counter */
  498|  3.66k|  data->state.this_is_a_follow = FALSE; /* reset this */
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  499|  3.66k|  data->state.http_ignorecustom = FALSE; /* use custom HTTP method */
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  500|  3.66k|  data->state.errorbuf = FALSE; /* no error has occurred */
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  501|  3.66k|#ifndef CURL_DISABLE_HTTP
  502|  3.66k|  Curl_http_neg_init(data, &data->state.http_neg);
  503|  3.66k|#endif
  504|  3.66k|  data->state.authproblem = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
  505|  3.66k|  data->state.authhost.want = data->set.httpauth;
  506|  3.66k|  data->state.authproxy.want = data->set.proxyauth;
  507|  3.66k|  curlx_safefree(data->info.wouldredirect);
  ------------------
  |  | 1332|  3.66k|  do {                      \
  |  | 1333|  3.66k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.66k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.66k|    (ptr) = NULL;           \
  |  | 1335|  3.66k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.66k]
  |  |  ------------------
  ------------------
  508|  3.66k|  Curl_data_priority_clear_state(data);
  509|  3.66k|  if(data->set.http_auto_referer)
  ------------------
  |  Branch (509:6): [True: 23, False: 3.64k]
  ------------------
  510|     23|    Curl_bufref_free(&data->state.referer);
  511|  3.66k|  if(CURL_EASY_STR(data, STRING_SET_REFERER))
  ------------------
  |  | 1228|  3.66k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  |  |  ------------------
  |  |  |  Branch (1228:3): [True: 42, False: 3.62k]
  |  |  ------------------
  ------------------
  512|     42|    Curl_bufref_set(&data->state.referer,
  513|     42|                    CURL_EASY_STR(data, STRING_SET_REFERER), 0, NULL);
  ------------------
  |  | 1228|     42|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
  514|  3.62k|  else
  515|  3.62k|    Curl_bufref_free(&data->state.referer);
  516|       |
  517|  3.66k|  if(data->state.httpreq == HTTPREQ_PUT)
  ------------------
  |  Branch (517:6): [True: 13, False: 3.65k]
  ------------------
  518|     13|    data->state.infilesize = data->set.filesize;
  519|  3.65k|  else if((data->state.httpreq != HTTPREQ_GET) &&
  ------------------
  |  Branch (519:11): [True: 754, False: 2.90k]
  ------------------
  520|    754|          (data->state.httpreq != HTTPREQ_HEAD)) {
  ------------------
  |  Branch (520:11): [True: 716, False: 38]
  ------------------
  521|    716|    data->state.infilesize = data->set.postfieldsize;
  522|    716|    if(data->set.postfields && (data->state.infilesize == -1))
  ------------------
  |  Branch (522:8): [True: 92, False: 624]
  |  Branch (522:32): [True: 0, False: 92]
  ------------------
  523|      0|      data->state.infilesize = (curl_off_t)strlen(data->set.postfields);
  524|    716|  }
  525|  2.94k|  else
  526|  2.94k|    data->state.infilesize = 0;
  527|       |
  528|       |  /* If there is a list of cookie files to read, do it now! */
  529|  3.66k|  result = Curl_cookie_loadfiles(data,
  530|  3.66k|                                 data->set.cookiesession ?
  ------------------
  |  Branch (530:34): [True: 43, False: 3.62k]
  ------------------
  531|  3.62k|                                 COOKIE_NOSESSION : 0);
  ------------------
  |  |  118|     43|#define COOKIE_NOSESSION  (1<<6) /* drop session cookies */
  ------------------
  532|  3.66k|  if(!result)
  ------------------
  |  Branch (532:6): [True: 3.66k, False: 0]
  ------------------
  533|  3.66k|    Curl_cookie_run(data); /* activate */
  534|       |
  535|       |  /* If there is a list of host pairs to deal with */
  536|  3.66k|  if(!result && data->state.resolve)
  ------------------
  |  Branch (536:6): [True: 3.66k, False: 0]
  |  Branch (536:17): [True: 0, False: 3.66k]
  ------------------
  537|      0|    result = Curl_loadhostpairs(data);
  538|       |
  539|  3.66k|  if(!result)
  ------------------
  |  Branch (539:6): [True: 3.66k, False: 0]
  ------------------
  540|       |    /* If there is a list of hsts files to read */
  541|  3.66k|    result = Curl_hsts_loadfiles(data);
  542|       |
  543|  3.66k|  if(!result) {
  ------------------
  |  Branch (543:6): [True: 3.66k, False: 0]
  ------------------
  544|       |    /* Allow data->set.use_port to set which port to use. This needs to be
  545|       |     * disabled for example when we follow Location: headers to URLs using
  546|       |     * different ports! */
  547|  3.66k|    data->state.allow_port = TRUE;
  ------------------
  |  | 1045|  3.66k|#define TRUE true
  ------------------
  548|       |
  549|       |#if defined(HAVE_SIGNAL) && defined(SIGPIPE) && !defined(MSG_NOSIGNAL)
  550|       |    /*************************************************************
  551|       |     * Tell signal handler to ignore SIGPIPE
  552|       |     *************************************************************/
  553|       |    if(!data->set.no_signal)
  554|       |      data->state.prev_signal = signal(SIGPIPE, SIG_IGN);
  555|       |#endif
  556|       |
  557|  3.66k|    Curl_initinfo(data); /* reset session-specific information "variables" */
  558|  3.66k|    Curl_pgrsResetTransferSizes(data);
  559|  3.66k|    Curl_pgrsStart(data, NULL);
  560|       |
  561|       |    /* In case the handle is reused and an authentication method was picked
  562|       |       in the session we need to make sure we only use the one(s) we now
  563|       |       consider to be fine */
  564|  3.66k|    data->state.authhost.picked &= data->state.authhost.want;
  565|  3.66k|    data->state.authproxy.picked &= data->state.authproxy.want;
  566|       |
  567|  3.66k|#ifndef CURL_DISABLE_FTP
  568|  3.66k|    data->state.wildcardmatch = data->set.wildcard_enabled;
  569|  3.66k|    if(data->state.wildcardmatch) {
  ------------------
  |  Branch (569:8): [True: 0, False: 3.66k]
  ------------------
  570|      0|      struct WildcardData *wc;
  571|      0|      if(!data->wildcard) {
  ------------------
  |  Branch (571:10): [True: 0, False: 0]
  ------------------
  572|      0|        data->wildcard = curlx_calloc(1, sizeof(struct WildcardData));
  ------------------
  |  | 1473|      0|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  573|      0|        if(!data->wildcard)
  ------------------
  |  Branch (573:12): [True: 0, False: 0]
  ------------------
  574|      0|          return CURLE_OUT_OF_MEMORY;
  575|      0|      }
  576|      0|      wc = data->wildcard;
  577|      0|      if(wc->state < CURLWC_INIT) {
  ------------------
  |  Branch (577:10): [True: 0, False: 0]
  ------------------
  578|      0|        if(wc->ftpwc)
  ------------------
  |  Branch (578:12): [True: 0, False: 0]
  ------------------
  579|      0|          wc->dtor(wc->ftpwc);
  580|      0|        curlx_safefree(wc->pattern);
  ------------------
  |  | 1332|      0|  do {                      \
  |  | 1333|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|      0|    (ptr) = NULL;           \
  |  | 1335|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  581|      0|        curlx_safefree(wc->path);
  ------------------
  |  | 1332|      0|  do {                      \
  |  | 1333|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|      0|    (ptr) = NULL;           \
  |  | 1335|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  582|      0|        Curl_wildcard_init(wc); /* init wildcard structures */
  583|      0|      }
  584|      0|    }
  585|  3.66k|#endif
  586|  3.66k|    result = Curl_hsts_loadcb(data, data->hsts);
  587|  3.66k|  }
  588|       |
  589|  3.66k|  data->req.headerbytecount = 0;
  590|  3.66k|  Curl_headers_cleanup(data);
  591|  3.66k|  return result;
  592|  3.66k|}
Curl_retry_request:
  598|  3.01k|{
  599|  3.01k|  struct connectdata *conn = data->conn;
  600|  3.01k|  bool retry = FALSE;
  ------------------
  |  | 1048|  3.01k|#define FALSE false
  ------------------
  601|  3.01k|  *url = NULL;
  602|       |
  603|       |  /* if we are talking upload, we cannot do the checks below, unless the
  604|       |     protocol is HTTP as when uploading over HTTP we will still get a
  605|       |     response */
  606|  3.01k|  if(data->state.upload &&
  ------------------
  |  Branch (606:6): [True: 11, False: 3.00k]
  ------------------
  607|     11|     !(conn->scheme->protocol & (PROTO_FAMILY_HTTP | CURLPROTO_RTSP)))
  ------------------
  |  |   84|     11|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1088|     11|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1089|     11|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|     11|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|     11|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|     11|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
                   !(conn->scheme->protocol & (PROTO_FAMILY_HTTP | CURLPROTO_RTSP)))
  ------------------
  |  | 1106|     11|#define CURLPROTO_RTSP    (1L << 18)
  ------------------
  |  Branch (607:6): [True: 0, False: 11]
  ------------------
  608|      0|    return CURLE_OK;
  609|       |
  610|  3.01k|  if(conn->bits.reuse &&
  ------------------
  |  Branch (610:6): [True: 0, False: 3.01k]
  ------------------
  611|      0|     (data->req.bytecount + data->req.headerbytecount == 0) &&
  ------------------
  |  Branch (611:6): [True: 0, False: 0]
  ------------------
  612|      0|     ((!data->req.no_body && !data->req.done) ||
  ------------------
  |  Branch (612:8): [True: 0, False: 0]
  |  Branch (612:30): [True: 0, False: 0]
  ------------------
  613|      0|      (conn->scheme->protocol & PROTO_FAMILY_HTTP))
  ------------------
  |  |   84|      0|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1088|      0|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1089|      0|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|      0|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|      0|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|      0|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
  |  Branch (613:7): [True: 0, False: 0]
  ------------------
  614|      0|#ifndef CURL_DISABLE_RTSP
  615|      0|     && (data->set.rtspreq != RTSPREQ_RECEIVE)
  ------------------
  |  |   44|      0|#define RTSPREQ_RECEIVE CURL_RTSPREQ_RECEIVE
  |  |  ------------------
  |  |  |  | 2377|      0|#define CURL_RTSPREQ_RECEIVE       11L
  |  |  ------------------
  ------------------
  |  Branch (615:9): [True: 0, False: 0]
  ------------------
  616|  3.01k|#endif
  617|  3.01k|    )
  618|       |    /* We got no data, we attempted to reuse a connection. For HTTP this
  619|       |       can be a retry so we try again regardless if we expected a body.
  620|       |       For other protocols we only try again only if we expected a body.
  621|       |
  622|       |       This might happen if the connection was left alive when we were
  623|       |       done using it before, but that was closed when we wanted to read from
  624|       |       it again. Bad luck. Retry the same request on a fresh connect! */
  625|      0|    retry = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  626|  3.01k|  else if(data->state.refused_stream &&
  ------------------
  |  Branch (626:11): [True: 0, False: 3.01k]
  ------------------
  627|      0|          (data->req.bytecount + data->req.headerbytecount == 0)) {
  ------------------
  |  Branch (627:11): [True: 0, False: 0]
  ------------------
  628|       |    /* This was sent on a refused stream, safe to rerun. A refused stream
  629|       |       error can typically only happen on HTTP/2 level if the stream is safe
  630|       |       to issue again, but the nghttp2 API can deliver the message to other
  631|       |       streams as well, which is why this adds the check the data counters
  632|       |       too. */
  633|      0|    infof(data, "REFUSED_STREAM, retrying a fresh connect");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  634|      0|    data->state.refused_stream = FALSE; /* clear again */
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  635|      0|    retry = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  636|      0|  }
  637|  3.01k|  if(retry) {
  ------------------
  |  Branch (637:6): [True: 0, False: 3.01k]
  ------------------
  638|      0|#define CONN_MAX_RETRIES 5
  639|      0|    if(data->state.retrycount++ >= CONN_MAX_RETRIES) {
  ------------------
  |  |  638|      0|#define CONN_MAX_RETRIES 5
  ------------------
  |  Branch (639:8): [True: 0, False: 0]
  ------------------
  640|      0|      failf(data, "Connection died, tried %d times before giving up",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  641|      0|            CONN_MAX_RETRIES);
  ------------------
  |  |  638|      0|#define CONN_MAX_RETRIES 5
  ------------------
  642|      0|      data->state.retrycount = 0;
  643|      0|      return CURLE_SEND_ERROR;
  644|      0|    }
  645|      0|    infof(data, "Connection died, retrying a fresh connect (retry count: %d)",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  646|      0|          data->state.retrycount);
  647|      0|    *url = Curl_bufref_dup(&data->state.url);
  ------------------
  |  |   49|      0|#define Curl_bufref_dup(x) curlx_strdup(Curl_bufref_ptr(x))
  |  |  ------------------
  |  |  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
  648|      0|    if(!*url)
  ------------------
  |  Branch (648:8): [True: 0, False: 0]
  ------------------
  649|      0|      return CURLE_OUT_OF_MEMORY;
  650|       |
  651|      0|    connclose(conn); /* close this connection */
  ------------------
  |  |   90|      0|#define connclose(x)   Curl_conncontrol((x), CONNCTRL_CONN_CLOSE)
  |  |  ------------------
  |  |  |  |   84|      0|#define CONNCTRL_CONN_CLOSE      1
  |  |  ------------------
  ------------------
  652|      0|    conn->bits.retry = TRUE; /* mark this as a connection we are about to
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  653|       |                                retry. Marking it this way should prevent i.e
  654|       |                                HTTP transfers to return error because nothing
  655|       |                                has been transferred! */
  656|      0|    Curl_creader_set_rewind(data, TRUE);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  657|      0|  }
  658|  3.01k|  return CURLE_OK;
  659|  3.01k|}
Curl_xfer_setup_sendrecv:
  714|  3.59k|{
  715|  3.59k|  xfer_setup(data, sockindex, sockindex, recv_size);
  716|  3.59k|}
Curl_xfer_write_resp:
  745|  3.59k|{
  746|  3.59k|  CURLcode result = CURLE_OK;
  747|       |
  748|  3.59k|  if(data->conn->scheme->run->write_resp) {
  ------------------
  |  Branch (748:6): [True: 3.59k, False: 0]
  ------------------
  749|       |    /* protocol handlers offering this function take full responsibility
  750|       |     * for writing all received download data to the client. */
  751|  3.59k|    result = data->conn->scheme->run->write_resp(data, buf, blen, is_eos);
  752|  3.59k|  }
  753|      0|  else {
  754|       |    /* No special handling by protocol handler, write all received data
  755|       |     * as BODY to the client. */
  756|      0|    if(blen || is_eos) {
  ------------------
  |  Branch (756:8): [True: 0, False: 0]
  |  Branch (756:16): [True: 0, False: 0]
  ------------------
  757|      0|      int cwtype = CLIENTWRITE_BODY;
  ------------------
  |  |   43|      0|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  758|      0|      if(is_eos)
  ------------------
  |  Branch (758:10): [True: 0, False: 0]
  ------------------
  759|      0|        cwtype |= CLIENTWRITE_EOS;
  ------------------
  |  |   50|      0|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  760|      0|      result = Curl_client_write(data, cwtype, buf, blen);
  761|      0|    }
  762|      0|  }
  763|       |
  764|  3.59k|  if(!result && is_eos) {
  ------------------
  |  Branch (764:6): [True: 3.02k, False: 570]
  |  Branch (764:17): [True: 2.97k, False: 53]
  ------------------
  765|       |    /* If we wrote the EOS, we are definitely done */
  766|  2.97k|    data->req.eos_written = TRUE;
  ------------------
  |  | 1045|  2.97k|#define TRUE true
  ------------------
  767|  2.97k|    data->req.download_done = TRUE;
  ------------------
  |  | 1045|  2.97k|#define TRUE true
  ------------------
  768|  2.97k|  }
  769|  3.59k|  CURL_TRC_WRITE(data, "xfer_write_resp(len=%zu, eos=%d) -> %d",
  ------------------
  |  |  158|  3.59k|  do {                                                     \
  |  |  159|  3.59k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  329|  3.59k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.19k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.59k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.59k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.19k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|  3.59k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  3.59k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  3.59k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 3.59k]
  |  |  ------------------
  ------------------
  770|  3.59k|                 blen, is_eos, (int)result);
  771|  3.59k|  return result;
  772|  3.59k|}
Curl_xfer_write_resp_hd:
  781|      1|{
  782|      1|  if(data->conn->scheme->run->write_resp_hd) {
  ------------------
  |  Branch (782:6): [True: 1, False: 0]
  ------------------
  783|      1|    DEBUGASSERT(!hd0[hdlen]); /* null-terminated */
  ------------------
  |  | 1075|      1|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (783:5): [True: 0, False: 1]
  |  Branch (783:5): [True: 1, False: 0]
  ------------------
  784|       |    /* protocol handlers offering this function take full responsibility
  785|       |     * for writing all received download data to the client. */
  786|      1|    return data->conn->scheme->run->write_resp_hd(data, hd0, hdlen, is_eos);
  787|      1|  }
  788|       |  /* No special handling by protocol handler, write as response bytes */
  789|      0|  return Curl_xfer_write_resp(data, hd0, hdlen, is_eos);
  790|      1|}
Curl_xfer_write_done:
  793|  3.62k|{
  794|  3.62k|  (void)premature;
  795|  3.62k|  return Curl_cw_out_done(data);
  796|  3.62k|}
Curl_xfer_needs_flush:
  799|  6.70k|{
  800|  6.70k|  return Curl_conn_needs_flush(data, data->conn->send_idx);
  801|  6.70k|}
Curl_xfer_send:
  811|  3.60k|{
  812|  3.60k|  CURLcode result;
  813|       |
  814|  3.60k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  3.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (814:3): [True: 0, False: 3.60k]
  |  Branch (814:3): [True: 3.60k, False: 0]
  ------------------
  815|  3.60k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1075|  3.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (815:3): [True: 0, False: 3.60k]
  |  Branch (815:3): [True: 3.60k, False: 0]
  ------------------
  816|       |
  817|  3.60k|  result = Curl_conn_send(data, data->conn->send_idx,
  818|  3.60k|                          buf, blen, eos, pnwritten);
  819|  3.60k|  if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (819:6): [True: 0, False: 3.60k]
  ------------------
  820|      0|    result = CURLE_OK;
  821|      0|    *pnwritten = 0;
  822|      0|  }
  823|  3.60k|  else if(!result && *pnwritten)
  ------------------
  |  Branch (823:11): [True: 3.60k, False: 0]
  |  Branch (823:22): [True: 3.60k, False: 0]
  ------------------
  824|  3.60k|    data->info.request_size += *pnwritten;
  825|       |
  826|  3.60k|  DEBUGF(infof(data, "Curl_xfer_send(len=%zu, eos=%d) -> %d, %zu",
  ------------------
  |  | 1061|  25.2k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1061:19): [True: 3.60k, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 3.60k]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [Folded, False: 3.60k]
  |  |  ------------------
  ------------------
  827|  3.60k|               blen, eos, (int)result, *pnwritten));
  828|  3.60k|  return result;
  829|  3.60k|}
Curl_xfer_recv:
  834|  7.24k|{
  835|  7.24k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  7.24k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (835:3): [True: 0, False: 7.24k]
  |  Branch (835:3): [True: 7.24k, False: 0]
  ------------------
  836|  7.24k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1075|  7.24k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (836:3): [True: 0, False: 7.24k]
  |  Branch (836:3): [True: 7.24k, False: 0]
  ------------------
  837|  7.24k|  DEBUGASSERT(data->set.buffer_size > 0);
  ------------------
  |  | 1075|  7.24k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (837:3): [True: 0, False: 7.24k]
  |  Branch (837:3): [True: 7.24k, False: 0]
  ------------------
  838|       |
  839|  7.24k|  if(curlx_uitouz(data->set.buffer_size) < blen)
  ------------------
  |  Branch (839:6): [True: 0, False: 7.24k]
  ------------------
  840|      0|    blen = curlx_uitouz(data->set.buffer_size);
  841|  7.24k|  return Curl_conn_recv(data, data->conn->recv_idx, buf, blen, pnrcvd);
  842|  7.24k|}
Curl_xfer_send_close:
  845|  3.55k|{
  846|  3.55k|  Curl_conn_ev_data_done_send(data);
  847|  3.55k|  return CURLE_OK;
  848|  3.55k|}
Curl_xfer_is_blocked:
  851|  7.23k|{
  852|  7.23k|  bool want_send = CURL_REQ_WANT_SEND(data);
  ------------------
  |  |   39|  7.23k|#define CURL_REQ_WANT_SEND(d)  ((d)->req.io_flags & REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|  7.23k|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  ------------------
  853|  7.23k|  bool want_recv = CURL_REQ_WANT_RECV(data);
  ------------------
  |  |   40|  7.23k|#define CURL_REQ_WANT_RECV(d)  ((d)->req.io_flags & REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|  7.23k|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  ------------------
  854|  7.23k|  if(!want_send)
  ------------------
  |  Branch (854:6): [True: 7.01k, False: 212]
  ------------------
  855|  7.01k|    return want_recv && Curl_xfer_recv_is_paused(data);
  ------------------
  |  Branch (855:12): [True: 7.01k, False: 0]
  |  Branch (855:25): [True: 0, False: 7.01k]
  ------------------
  856|    212|  else if(!want_recv)
  ------------------
  |  Branch (856:11): [True: 0, False: 212]
  ------------------
  857|      0|    return want_send && Curl_xfer_send_is_paused(data);
  ------------------
  |  Branch (857:12): [True: 0, False: 0]
  |  Branch (857:25): [True: 0, False: 0]
  ------------------
  858|    212|  else
  859|    212|    return Curl_xfer_recv_is_paused(data) && Curl_xfer_send_is_paused(data);
  ------------------
  |  Branch (859:12): [True: 0, False: 212]
  |  Branch (859:46): [True: 0, False: 0]
  ------------------
  860|  7.23k|}
Curl_xfer_send_is_paused:
  863|    768|{
  864|    768|  return Curl_rlimit_is_blocked(&data->progress.ul.rlimit);
  865|    768|}
Curl_xfer_recv_is_paused:
  868|  14.4k|{
  869|  14.4k|  return Curl_rlimit_is_blocked(&data->progress.dl.rlimit);
  870|  14.4k|}
Curl_xfer_is_secure:
  894|  3.60k|{
  895|  3.60k|#ifndef CURL_DISABLE_PROXY
  896|  3.60k|  if(data->conn && data->conn->bits.origin_is_proxy) {
  ------------------
  |  Branch (896:6): [True: 3.60k, False: 0]
  |  Branch (896:20): [True: 0, False: 3.60k]
  ------------------
  897|       |    /* talking to a forward proxy, not secure. we do not use
  898|       |     * a forward proxy for https: and other 's' URLs. Let's just check that
  899|       |     * this did not fail somewhere. */
  900|      0|    DEBUGASSERT(!(data->state.origin->scheme->flags & PROTOPT_SSL));
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (900:5): [True: 0, False: 0]
  |  Branch (900:5): [True: 0, False: 0]
  ------------------
  901|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  902|      0|  }
  903|  3.60k|#endif
  904|  3.60k|  return (data->state.origin->scheme->flags & PROTOPT_SSL);
  ------------------
  |  |  207|  3.60k|#define PROTOPT_SSL (1 << 0)       /* uses SSL */
  ------------------
  905|  3.60k|}
transfer.c:sendrecv_dl:
  222|  7.23k|{
  223|  7.23k|  struct connectdata *conn = data->conn;
  224|  7.23k|  CURLcode result = CURLE_OK;
  225|  7.23k|  char *buf, *xfer_buf;
  226|  7.23k|  size_t blen, xfer_blen;
  227|  7.23k|  int maxloops = 10;
  228|  7.23k|  bool is_multiplex = FALSE;
  ------------------
  |  | 1048|  7.23k|#define FALSE false
  ------------------
  229|  7.23k|  bool rcvd_eagain = FALSE;
  ------------------
  |  | 1048|  7.23k|#define FALSE false
  ------------------
  230|  7.23k|  bool is_eos = FALSE, rate_limited = FALSE;
  ------------------
  |  | 1048|  7.23k|#define FALSE false
  ------------------
                bool is_eos = FALSE, rate_limited = FALSE;
  ------------------
  |  | 1048|  7.23k|#define FALSE false
  ------------------
  231|       |
  232|  7.23k|  result = Curl_multi_xfer_buf_borrow(data, &xfer_buf, &xfer_blen);
  233|  7.23k|  if(result)
  ------------------
  |  Branch (233:6): [True: 0, False: 7.23k]
  ------------------
  234|      0|    goto out;
  235|       |
  236|       |  /* This is where we loop until we have read everything there is to
  237|       |     read or we get a CURLE_AGAIN */
  238|  7.24k|  do {
  239|  7.24k|    size_t bytestoread;
  240|       |
  241|  7.24k|    if(!is_multiplex) {
  ------------------
  |  Branch (241:8): [True: 7.24k, False: 0]
  ------------------
  242|       |      /* Multiplexed connection have inherent handling of EOF and we do not
  243|       |       * have to carefully restrict the amount we try to read.
  244|       |       * Multiplexed changes only in one direction. */
  245|  7.24k|      is_multiplex = Curl_conn_is_multiplex(conn, FIRSTSOCKET);
  ------------------
  |  |  234|  7.24k|#define FIRSTSOCKET     0
  ------------------
  246|  7.24k|    }
  247|       |
  248|  7.24k|    buf = xfer_buf;
  249|  7.24k|    bytestoread = xfer_blen;
  250|       |
  251|  7.24k|    if(bytestoread && Curl_rlimit_active(&data->progress.dl.rlimit)) {
  ------------------
  |  Branch (251:8): [True: 7.24k, False: 0]
  |  Branch (251:23): [True: 0, False: 7.24k]
  ------------------
  252|      0|      curl_off_t dl_avail = Curl_rlimit_avail(&data->progress.dl.rlimit, NULL);
  253|       |#if 0
  254|       |      DEBUGF(infof(data, "dl_rlimit, available=%" FMT_OFF_T, dl_avail));
  255|       |#endif
  256|       |      /* In case of rate limited downloads: if this loop already got data and
  257|       |       * less than 16k is left in the limit, break out. We want to stutter a
  258|       |       * bit to keep in the limit, but too small receives will cost cpu
  259|       |       * unnecessarily. */
  260|      0|      if(dl_avail <= 0) {
  ------------------
  |  Branch (260:10): [True: 0, False: 0]
  ------------------
  261|      0|        rate_limited = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  262|      0|        break;
  263|      0|      }
  264|      0|      if(dl_avail < (curl_off_t)bytestoread)
  ------------------
  |  Branch (264:10): [True: 0, False: 0]
  ------------------
  265|      0|        bytestoread = (size_t)dl_avail;
  266|      0|    }
  267|       |
  268|  7.24k|    rcvd_eagain = FALSE;
  ------------------
  |  | 1048|  7.24k|#define FALSE false
  ------------------
  269|  7.24k|    result = xfer_recv_resp(data, buf, bytestoread, is_multiplex, &blen);
  270|  7.24k|    if(result) {
  ------------------
  |  Branch (270:8): [True: 3.64k, False: 3.59k]
  ------------------
  271|  3.64k|      if(result != CURLE_AGAIN)
  ------------------
  |  Branch (271:10): [True: 2, False: 3.64k]
  ------------------
  272|      2|        goto out; /* real error */
  273|  3.64k|      rcvd_eagain = TRUE;
  ------------------
  |  | 1045|  3.64k|#define TRUE true
  ------------------
  274|  3.64k|      result = CURLE_OK;
  275|  3.64k|      if(data->req.download_done && data->req.no_body &&
  ------------------
  |  Branch (275:10): [True: 0, False: 3.64k]
  |  Branch (275:37): [True: 0, False: 0]
  ------------------
  276|      0|         !data->req.resp_trailer) {
  ------------------
  |  Branch (276:10): [True: 0, False: 0]
  ------------------
  277|      0|        DEBUGF(infof(data, "EAGAIN, download done, no trailer announced, "
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  278|      0|                     "not waiting for EOS"));
  279|      0|        blen = 0;
  280|       |        /* continue as if we received the EOS */
  281|      0|      }
  282|  3.64k|      else
  283|  3.64k|        break; /* get out of loop */
  284|  3.64k|    }
  285|       |
  286|       |    /* We only get a 0-length receive at the end of the response */
  287|  3.59k|    is_eos = (blen == 0);
  288|       |
  289|  3.59k|    if(!blen) {
  ------------------
  |  Branch (289:8): [True: 2.97k, False: 622]
  ------------------
  290|  2.97k|      result = Curl_req_stop_send_recv(data);
  291|  2.97k|      if(result)
  ------------------
  |  Branch (291:10): [True: 0, False: 2.97k]
  ------------------
  292|      0|        goto out;
  293|  2.97k|      if(k->eos_written) /* already did write this to client, leave */
  ------------------
  |  Branch (293:10): [True: 0, False: 2.97k]
  ------------------
  294|      0|        break;
  295|  2.97k|    }
  296|       |
  297|  3.59k|    result = Curl_xfer_write_resp(data, buf, blen, is_eos);
  298|  3.59k|    if(result || data->req.done)
  ------------------
  |  Branch (298:8): [True: 570, False: 3.02k]
  |  Branch (298:18): [True: 1, False: 3.02k]
  ------------------
  299|    571|      goto out;
  300|       |
  301|       |    /* if we are done, we stop receiving. On multiplexed connections,
  302|       |     * we should read the EOS. Which may arrive as meta data after
  303|       |     * the bytes. Not taking it in might lead to RST of streams. */
  304|  3.02k|    if((!is_multiplex && data->req.download_done) || is_eos) {
  ------------------
  |  Branch (304:9): [True: 3.02k, False: 0]
  |  Branch (304:26): [True: 3.01k, False: 17]
  |  Branch (304:54): [True: 0, False: 17]
  ------------------
  305|  3.01k|      CURL_REQ_CLEAR_RECV(data);
  ------------------
  |  |   49|  3.01k|  ((d)->req.io_flags &= (uint8_t)~REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|  3.01k|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  ------------------
  306|  3.01k|    }
  307|       |    /* if we stopped receiving, leave the loop */
  308|  3.02k|    if(!CURL_REQ_WANT_RECV(data))
  ------------------
  |  |   40|  3.02k|#define CURL_REQ_WANT_RECV(d)  ((d)->req.io_flags & REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|  3.02k|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  ------------------
  |  Branch (308:8): [True: 3.01k, False: 17]
  ------------------
  309|  3.01k|      break;
  310|       |
  311|  3.02k|  } while(maxloops--);
  ------------------
  |  Branch (311:11): [True: 17, False: 0]
  ------------------
  312|       |
  313|  6.65k|  if(!is_eos && !rate_limited && CURL_REQ_WANT_RECV(data) &&
  ------------------
  |  |   40|  10.3k|#define CURL_REQ_WANT_RECV(d)  ((d)->req.io_flags & REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|  3.68k|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  |  |  |  Branch (40:32): [True: 3.64k, False: 35]
  |  |  ------------------
  ------------------
  |  Branch (313:6): [True: 3.68k, False: 2.97k]
  |  Branch (313:17): [True: 3.68k, False: 0]
  ------------------
  314|  3.64k|     (!rcvd_eagain || data_pending(data, rcvd_eagain))) {
  ------------------
  |  Branch (314:7): [True: 0, False: 3.64k]
  |  Branch (314:23): [True: 0, False: 3.64k]
  ------------------
  315|       |    /* Did not read until EAGAIN/EOS or there is still data pending
  316|       |     * in buffers. Mark as read-again via simulated SELECT results. */
  317|      0|    Curl_multi_mark_dirty(data);
  318|      0|    CURL_TRC_M(data, "sendrecv_dl() no EAGAIN/pending data, mark as dirty");
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  319|      0|  }
  320|       |
  321|  6.65k|  if(!CURL_REQ_WANT_RECV(data) && CURL_REQ_WANT_SEND(data) &&
  ------------------
  |  |   40|  13.3k|#define CURL_REQ_WANT_RECV(d)  ((d)->req.io_flags & REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|  6.65k|#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|  9.66k|#define CURL_REQ_WANT_SEND(d)  ((d)->req.io_flags & REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|  3.01k|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  |  |  |  Branch (39:32): [True: 1, False: 3.01k]
  |  |  ------------------
  ------------------
  |  Branch (321:6): [True: 3.01k, False: 3.64k]
  ------------------
  322|      1|     (conn->bits.close || is_multiplex)) {
  ------------------
  |  Branch (322:7): [True: 1, False: 0]
  |  Branch (322:27): [True: 0, False: 0]
  ------------------
  323|       |    /* When we have read the entire thing and the close bit is set, the server
  324|       |       may now close the connection. If there is now any kind of sending going
  325|       |       on from our side, we need to stop that immediately. */
  326|      1|    infof(data, "we are done reading and this is set to close, stop send");
  ------------------
  |  |  143|      1|  do {                               \
  |  |  144|      1|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      1|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 1, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  323|      1|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      1|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  327|      1|    Curl_req_abort_sending(data);
  328|      1|  }
  329|       |
  330|  7.23k|out:
  331|  7.23k|  Curl_multi_xfer_buf_release(data, xfer_buf);
  332|  7.23k|  if(result)
  ------------------
  |  Branch (332:6): [True: 572, False: 6.65k]
  ------------------
  333|    572|    DEBUGF(infof(data, "sendrecv_dl() -> %d", (int)result));
  ------------------
  |  | 1061|  11.2k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1061:19): [True: 572, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 572]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [Folded, False: 572]
  |  |  ------------------
  ------------------
  334|  7.23k|  return result;
  335|  6.65k|}
transfer.c:xfer_recv_resp:
  179|  7.24k|{
  180|  7.24k|  CURLcode result;
  181|       |
  182|  7.24k|  DEBUGASSERT(blen > 0);
  ------------------
  |  | 1075|  7.24k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (182:3): [True: 0, False: 7.24k]
  |  Branch (182:3): [True: 7.24k, False: 0]
  ------------------
  183|  7.24k|  *pnread = 0;
  184|       |  /* If we are reading BODY data and the connection does NOT handle EOF
  185|       |   * and we know the size of the BODY data, limit the read amount */
  186|  7.24k|  if(!eos_reliable && !data->req.header && data->req.size != -1) {
  ------------------
  |  Branch (186:6): [True: 7.24k, False: 4]
  |  Branch (186:23): [True: 18, False: 7.22k]
  |  Branch (186:44): [True: 0, False: 18]
  ------------------
  187|      0|    blen = curlx_sotouz_range(data->req.size - data->req.bytecount, 0, blen);
  188|      0|  }
  189|  7.24k|  else if(xfer_recv_shutdown_started(data)) {
  ------------------
  |  Branch (189:11): [True: 0, False: 7.24k]
  ------------------
  190|       |    /* we already received everything. Do not try more. */
  191|      0|    blen = 0;
  192|      0|  }
  193|       |
  194|  7.24k|  if(blen) {
  ------------------
  |  Branch (194:6): [True: 7.24k, False: 0]
  ------------------
  195|  7.24k|    result = Curl_xfer_recv(data, buf, blen, pnread);
  196|  7.24k|    if(result)
  ------------------
  |  Branch (196:8): [True: 3.64k, False: 3.59k]
  ------------------
  197|  3.64k|      return result;
  198|  7.24k|  }
  199|       |
  200|  3.59k|  if(*pnread == 0) {
  ------------------
  |  Branch (200:6): [True: 2.97k, False: 622]
  ------------------
  201|  2.97k|    if(data->req.shutdown) {
  ------------------
  |  Branch (201:8): [True: 0, False: 2.97k]
  ------------------
  202|      0|      bool done;
  203|      0|      result = xfer_recv_shutdown(data, &done);
  204|      0|      if(result)
  ------------------
  |  Branch (204:10): [True: 0, False: 0]
  ------------------
  205|      0|        return result;
  206|      0|      if(!done) {
  ------------------
  |  Branch (206:10): [True: 0, False: 0]
  ------------------
  207|      0|        return CURLE_AGAIN;
  208|      0|      }
  209|      0|    }
  210|  2.97k|    DEBUGF(infof(data, "sendrecv_dl: we are done"));
  ------------------
  |  | 1061|  20.8k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1061:19): [True: 2.97k, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 2.97k]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [Folded, False: 2.97k]
  |  |  ------------------
  ------------------
  211|  2.97k|  }
  212|  3.59k|  return CURLE_OK;
  213|  3.59k|}
transfer.c:xfer_recv_shutdown_started:
  154|  7.24k|{
  155|  7.24k|  if(!data || !data->conn)
  ------------------
  |  Branch (155:6): [True: 0, False: 7.24k]
  |  Branch (155:15): [True: 0, False: 7.24k]
  ------------------
  156|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  157|  7.24k|  return Curl_shutdown_started(data->conn, data->conn->recv_idx);
  158|  7.24k|}
transfer.c:data_pending:
  103|  3.64k|{
  104|  3.64k|  struct connectdata *conn = data->conn;
  105|       |
  106|  3.64k|  if(conn->scheme->protocol & PROTO_FAMILY_FTP)
  ------------------
  |  |   86|  3.64k|#define PROTO_FAMILY_FTP  (CURLPROTO_FTP | CURLPROTO_FTPS)
  |  |  ------------------
  |  |  |  | 1090|  3.64k|#define CURLPROTO_FTP     (1L << 2)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_FTP  (CURLPROTO_FTP | CURLPROTO_FTPS)
  |  |  ------------------
  |  |  |  | 1091|  3.64k|#define CURLPROTO_FTPS    (1L << 3)
  |  |  ------------------
  ------------------
  |  Branch (106:6): [True: 0, False: 3.64k]
  ------------------
  107|      0|    return Curl_conn_data_pending(data, SECONDARYSOCKET);
  ------------------
  |  |  235|      0|#define SECONDARYSOCKET 1
  ------------------
  108|       |
  109|       |  /* in the case of libssh2, we can never be really sure that we have emptied
  110|       |     its internal buffers so we MUST always try until we get EAGAIN back */
  111|  3.64k|  return (!rcvd_eagain &&
  ------------------
  |  Branch (111:11): [True: 0, False: 3.64k]
  ------------------
  112|      0|          conn->scheme->protocol & (CURLPROTO_SCP | CURLPROTO_SFTP)) ||
  ------------------
  |  | 1092|      0|#define CURLPROTO_SCP     (1L << 4)
  ------------------
                        conn->scheme->protocol & (CURLPROTO_SCP | CURLPROTO_SFTP)) ||
  ------------------
  |  | 1093|      0|#define CURLPROTO_SFTP    (1L << 5)
  ------------------
  |  Branch (112:11): [True: 0, False: 0]
  ------------------
  113|  3.64k|         Curl_conn_data_pending(data, FIRSTSOCKET);
  ------------------
  |  |  234|  3.64k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (113:10): [True: 0, False: 3.64k]
  ------------------
  114|  3.64k|}
transfer.c:sendrecv_ul:
  341|    114|{
  342|       |  /* We should not get here when the sending is already done. */
  343|    114|  DEBUGASSERT(!Curl_req_done_sending(data));
  ------------------
  |  | 1075|    114|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (343:3): [True: 0, False: 114]
  |  Branch (343:3): [True: 114, False: 0]
  ------------------
  344|       |
  345|    114|  if(!Curl_req_done_sending(data))
  ------------------
  |  Branch (345:6): [True: 114, False: 0]
  ------------------
  346|    114|    return Curl_req_send_more(data);
  347|      0|  return CURLE_OK;
  348|    114|}
transfer.c:xfer_setup:
  667|  3.59k|{
  668|  3.59k|  struct SingleRequest *k = &data->req;
  669|  3.59k|  struct connectdata *conn = data->conn;
  670|       |
  671|  3.59k|  DEBUGASSERT(conn);
  ------------------
  |  | 1075|  3.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (671:3): [True: 0, False: 3.59k]
  |  Branch (671:3): [True: 3.59k, False: 0]
  ------------------
  672|       |  /* indexes are in range */
  673|  3.59k|  DEBUGASSERT((send_idx <= 1) && (send_idx >= -1));
  ------------------
  |  | 1075|  3.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (673:3): [True: 0, False: 3.59k]
  |  Branch (673:3): [True: 0, False: 0]
  |  Branch (673:3): [True: 3.59k, False: 0]
  |  Branch (673:3): [True: 3.59k, False: 0]
  ------------------
  674|  3.59k|  DEBUGASSERT((recv_idx <= 1) && (recv_idx >= -1));
  ------------------
  |  | 1075|  3.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (674:3): [True: 0, False: 3.59k]
  |  Branch (674:3): [True: 0, False: 0]
  |  Branch (674:3): [True: 3.59k, False: 0]
  |  Branch (674:3): [True: 3.59k, False: 0]
  ------------------
  675|       |  /* if request wants to send, switching off the send direction is wrong */
  676|  3.59k|  DEBUGASSERT((send_idx >= 0) || !Curl_req_want_send(data));
  ------------------
  |  | 1075|  3.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (676:3): [True: 3.59k, False: 0]
  |  Branch (676:3): [True: 0, False: 0]
  |  Branch (676:3): [True: 3.59k, False: 0]
  |  Branch (676:3): [True: 0, False: 0]
  ------------------
  677|       |
  678|  3.59k|  conn->send_idx = send_idx;
  679|  3.59k|  conn->recv_idx = recv_idx;
  680|       |
  681|       |  /* without receiving, there should be not recv_size */
  682|  3.59k|  DEBUGASSERT((conn->recv_idx >= 0) || (recv_size == -1));
  ------------------
  |  | 1075|  3.59k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (682:3): [True: 3.59k, False: 0]
  |  Branch (682:3): [True: 0, False: 0]
  |  Branch (682:3): [True: 3.59k, False: 0]
  |  Branch (682:3): [True: 0, False: 0]
  ------------------
  683|  3.59k|  k->size = recv_size;
  684|  3.59k|  k->header = !!conn->scheme->run->write_resp_hd;
  685|       |  /* by default, we do not shutdown at the end of the transfer */
  686|  3.59k|  k->shutdown = FALSE;
  ------------------
  |  | 1048|  3.59k|#define FALSE false
  ------------------
  687|  3.59k|  k->shutdown_err_ignore = FALSE;
  ------------------
  |  | 1048|  3.59k|#define FALSE false
  ------------------
  688|       |
  689|       |  /* The code sequence below is placed in this function because all necessary
  690|       |     input is not always known in do_complete() as this function may be called
  691|       |     after that */
  692|  3.59k|  if(!k->header && (recv_size > 0))
  ------------------
  |  Branch (692:6): [True: 0, False: 3.59k]
  |  Branch (692:20): [True: 0, False: 0]
  ------------------
  693|      0|    Curl_pgrsSetDownloadSize(data, recv_size);
  694|       |
  695|       |  /* we want header and/or body, if neither then do not do this! */
  696|  3.59k|  if(conn->scheme->run->write_resp_hd || !data->req.no_body) {
  ------------------
  |  Branch (696:6): [True: 3.59k, False: 0]
  |  Branch (696:42): [True: 0, False: 0]
  ------------------
  697|  3.59k|    if(conn->recv_idx != -1)
  ------------------
  |  Branch (697:8): [True: 3.59k, False: 0]
  ------------------
  698|  3.59k|      CURL_REQ_SET_RECV(data);
  ------------------
  |  |   45|  3.59k|#define CURL_REQ_SET_RECV(d)   ((d)->req.io_flags |= REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|  3.59k|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  ------------------
  699|  3.59k|    if(conn->send_idx != -1)
  ------------------
  |  Branch (699:8): [True: 3.59k, False: 0]
  ------------------
  700|  3.59k|      CURL_REQ_SET_SEND(data);
  ------------------
  |  |   44|  3.59k|#define CURL_REQ_SET_SEND(d)   ((d)->req.io_flags |= REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|  3.59k|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  ------------------
  701|  3.59k|  }
  702|  3.59k|  CURL_TRC_M(data, "xfer_setup: recv_idx=%d, send_idx=%d",
  ------------------
  |  |  148|  3.59k|  do {                                   \
  |  |  149|  3.59k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  3.59k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.59k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.19k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.59k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.59k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.19k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.59k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  3.59k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  3.59k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 3.59k]
  |  |  ------------------
  ------------------
  703|  3.59k|             conn->recv_idx, conn->send_idx);
  704|  3.59k|}

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

Curl_uint32_hash_init:
   47|      2|{
   48|      2|  DEBUGASSERT(h);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (48:3): [True: 0, False: 2]
  |  Branch (48:3): [True: 2, False: 0]
  ------------------
   49|      2|  DEBUGASSERT(slots);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (49:3): [True: 0, False: 2]
  |  Branch (49:3): [True: 2, False: 0]
  ------------------
   50|       |
   51|      2|  h->table = NULL;
   52|      2|  h->dtor = dtor;
   53|      2|  h->size = 0;
   54|      2|  h->slots = slots;
   55|      2|#ifdef DEBUGBUILD
   56|      2|  h->init = CURL_UINT32_HASHINIT;
  ------------------
  |  |   30|      2|#define CURL_UINT32_HASHINIT 0x7117e779
  ------------------
   57|      2|#endif
   58|      2|}
Curl_uint32_hash_set:
  114|      2|{
  115|      2|  struct uint_hash_entry *he, **slot;
  116|       |
  117|      2|  DEBUGASSERT(h);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (117:3): [True: 0, False: 2]
  |  Branch (117:3): [True: 2, False: 0]
  ------------------
  118|      2|  DEBUGASSERT(h->slots);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (118:3): [True: 0, False: 2]
  |  Branch (118:3): [True: 2, False: 0]
  ------------------
  119|      2|  DEBUGASSERT(h->init == CURL_UINT32_HASHINIT);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (119:3): [True: 0, False: 2]
  |  Branch (119:3): [True: 2, False: 0]
  ------------------
  120|      2|  if(!h->table) {
  ------------------
  |  Branch (120:6): [True: 2, False: 0]
  ------------------
  121|      2|    h->table = curlx_calloc(h->slots, sizeof(*he));
  ------------------
  |  | 1473|      2|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  122|      2|    if(!h->table)
  ------------------
  |  Branch (122:8): [True: 0, False: 2]
  ------------------
  123|      0|      return FALSE; /* OOM */
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  124|      2|  }
  125|       |
  126|      2|  slot = CURL_UINT32_HASH_SLOT_ADDR(h, id);
  ------------------
  |  |  111|      2|#define CURL_UINT32_HASH_SLOT_ADDR(h, id) &CURL_UINT32_HASH_SLOT(h, id)
  |  |  ------------------
  |  |  |  |  110|      2|#define CURL_UINT32_HASH_SLOT(h, id) h->table[uint32_hash_hash(id, (h)->slots)]
  |  |  ------------------
  ------------------
  127|      2|  for(he = *slot; he; he = he->next) {
  ------------------
  |  Branch (127:19): [True: 0, False: 2]
  ------------------
  128|      0|    if(he->id == id) {
  ------------------
  |  Branch (128:8): [True: 0, False: 0]
  ------------------
  129|       |      /* existing key entry, overwrite by clearing old pointer */
  130|      0|      uint32_hash_entry_clear(h, he);
  131|      0|      he->value = value;
  132|      0|      return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  133|      0|    }
  134|      0|  }
  135|       |
  136|      2|  he = uint32_hash_mk_entry(id, value);
  137|      2|  if(!he)
  ------------------
  |  Branch (137:6): [True: 0, False: 2]
  ------------------
  138|      0|    return FALSE; /* OOM */
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  139|       |
  140|      2|  uint32_hash_elem_link(h, slot, he);
  141|       |  return TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
  142|      2|}
Curl_uint32_hash_remove:
  145|      2|{
  146|      2|  DEBUGASSERT(h);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (146:3): [True: 0, False: 2]
  |  Branch (146:3): [True: 2, False: 0]
  ------------------
  147|      2|  DEBUGASSERT(h->slots);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (147:3): [True: 0, False: 2]
  |  Branch (147:3): [True: 2, False: 0]
  ------------------
  148|      2|  DEBUGASSERT(h->init == CURL_UINT32_HASHINIT);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (148:3): [True: 0, False: 2]
  |  Branch (148:3): [True: 2, False: 0]
  ------------------
  149|      2|  if(h->table) {
  ------------------
  |  Branch (149:6): [True: 2, False: 0]
  ------------------
  150|      2|    struct uint_hash_entry *he, **he_anchor;
  151|       |
  152|      2|    he_anchor = CURL_UINT32_HASH_SLOT_ADDR(h, id);
  ------------------
  |  |  111|      2|#define CURL_UINT32_HASH_SLOT_ADDR(h, id) &CURL_UINT32_HASH_SLOT(h, id)
  |  |  ------------------
  |  |  |  |  110|      2|#define CURL_UINT32_HASH_SLOT(h, id) h->table[uint32_hash_hash(id, (h)->slots)]
  |  |  ------------------
  ------------------
  153|      2|    while(*he_anchor) {
  ------------------
  |  Branch (153:11): [True: 2, False: 0]
  ------------------
  154|      2|      he = *he_anchor;
  155|      2|      if(id == he->id) {
  ------------------
  |  Branch (155:10): [True: 2, False: 0]
  ------------------
  156|      2|        uint32_hash_entry_unlink(h, he_anchor, he);
  157|      2|        uint32_hash_entry_destroy(h, he);
  158|      2|        return TRUE;
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
  159|      2|      }
  160|      0|      he_anchor = &he->next;
  161|      0|    }
  162|      2|  }
  163|      0|  return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  164|      2|}
Curl_uint32_hash_get:
  167|     27|{
  168|     27|  DEBUGASSERT(h);
  ------------------
  |  | 1075|     27|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (168:3): [True: 0, False: 27]
  |  Branch (168:3): [True: 27, False: 0]
  ------------------
  169|     27|  DEBUGASSERT(h->init == CURL_UINT32_HASHINIT);
  ------------------
  |  | 1075|     27|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (169:3): [True: 0, False: 27]
  |  Branch (169:3): [True: 27, False: 0]
  ------------------
  170|     27|  if(h->table) {
  ------------------
  |  Branch (170:6): [True: 21, False: 6]
  ------------------
  171|     21|    struct uint_hash_entry *he;
  172|     21|    DEBUGASSERT(h->slots);
  ------------------
  |  | 1075|     21|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (172:5): [True: 0, False: 21]
  |  Branch (172:5): [True: 21, False: 0]
  ------------------
  173|     21|    he = CURL_UINT32_HASH_SLOT(h, id);
  ------------------
  |  |  110|     21|#define CURL_UINT32_HASH_SLOT(h, id) h->table[uint32_hash_hash(id, (h)->slots)]
  ------------------
  174|     21|    while(he) {
  ------------------
  |  Branch (174:11): [True: 21, False: 0]
  ------------------
  175|     21|      if(id == he->id) {
  ------------------
  |  Branch (175:10): [True: 21, False: 0]
  ------------------
  176|     21|        return he->value;
  177|     21|      }
  178|      0|      he = he->next;
  179|      0|    }
  180|     21|  }
  181|      6|  return NULL;
  182|     27|}
uint_hash_clear:
  187|      2|{
  188|      2|  if(h && h->table) {
  ------------------
  |  Branch (188:6): [True: 2, False: 0]
  |  Branch (188:11): [True: 2, False: 0]
  ------------------
  189|      2|    struct uint_hash_entry *he, **he_anchor;
  190|      2|    size_t i;
  191|      2|    DEBUGASSERT(h->init == CURL_UINT32_HASHINIT);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (191:5): [True: 0, False: 2]
  |  Branch (191:5): [True: 2, False: 0]
  ------------------
  192|    128|    for(i = 0; i < h->slots; ++i) {
  ------------------
  |  Branch (192:16): [True: 126, False: 2]
  ------------------
  193|    126|      he_anchor = &h->table[i];
  194|    126|      while(*he_anchor) {
  ------------------
  |  Branch (194:13): [True: 0, False: 126]
  ------------------
  195|      0|        he = *he_anchor;
  196|      0|        uint32_hash_entry_unlink(h, he_anchor, he);
  197|      0|        uint32_hash_entry_destroy(h, he);
  198|      0|      }
  199|    126|    }
  200|      2|  }
  201|      2|}
Curl_uint32_hash_destroy:
  204|      2|{
  205|      2|  DEBUGASSERT(h->init == CURL_UINT32_HASHINIT);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (205:3): [True: 0, False: 2]
  |  Branch (205:3): [True: 2, False: 0]
  ------------------
  206|      2|  if(h->table) {
  ------------------
  |  Branch (206:6): [True: 2, False: 0]
  ------------------
  207|      2|    uint_hash_clear(h);
  208|      2|    curlx_safefree(h->table);
  ------------------
  |  | 1332|      2|  do {                      \
  |  | 1333|      2|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|      2|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|      2|    (ptr) = NULL;           \
  |  | 1335|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
  209|      2|  }
  210|      2|  DEBUGASSERT(h->size == 0);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (210:3): [True: 0, False: 2]
  |  Branch (210:3): [True: 2, False: 0]
  ------------------
  211|      2|  h->slots = 0;
  212|      2|}
uint-hash.c:uint32_hash_hash:
   34|     25|{
   35|     25|  return (id % slots);
   36|     25|}
uint-hash.c:uint32_hash_entry_clear:
   76|      2|{
   77|      2|  DEBUGASSERT(h);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (77:3): [True: 0, False: 2]
  |  Branch (77:3): [True: 2, False: 0]
  ------------------
   78|      2|  DEBUGASSERT(e);
  ------------------
  |  | 1075|      2|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (78:3): [True: 0, False: 2]
  |  Branch (78:3): [True: 2, False: 0]
  ------------------
   79|      2|  if(e->value) {
  ------------------
  |  Branch (79:6): [True: 2, False: 0]
  ------------------
   80|      2|    if(h->dtor)
  ------------------
  |  Branch (80:8): [True: 2, False: 0]
  ------------------
   81|      2|      h->dtor(e->id, e->value);
   82|       |    e->value = NULL;
   83|      2|  }
   84|      2|}
uint-hash.c:uint32_hash_mk_entry:
   61|      2|{
   62|      2|  struct uint_hash_entry *e;
   63|       |
   64|       |  /* allocate the struct for the hash entry */
   65|      2|  e = curlx_malloc(sizeof(*e));
  ------------------
  |  | 1471|      2|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
   66|      2|  if(e) {
  ------------------
  |  Branch (66:6): [True: 2, False: 0]
  ------------------
   67|      2|    e->id = id;
   68|       |    e->next = NULL;
   69|      2|    e->value = value;
   70|      2|  }
   71|      2|  return e;
   72|      2|}
uint-hash.c:uint32_hash_elem_link:
  104|      2|{
  105|      2|  he->next = *he_anchor;
  106|      2|  *he_anchor = he;
  107|      2|  ++h->size;
  108|      2|}
uint-hash.c:uint32_hash_entry_unlink:
   96|      2|{
   97|      2|  *he_anchor = he->next;
   98|      2|  --h->size;
   99|      2|}
uint-hash.c:uint32_hash_entry_destroy:
   88|      2|{
   89|      2|  uint32_hash_entry_clear(h, e);
   90|      2|  curlx_free(e);
  ------------------
  |  | 1476|      2|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   91|      2|}

Curl_u8_strset_init:
   75|  22.4k|{
   76|       |#if defined(__GNUC__) && __GNUC__ >= 13
   77|       |#pragma GCC diagnostic push
   78|       |#pragma GCC diagnostic ignored "-Warray-bounds"
   79|       |#endif
   80|  22.4k|  memset(set, 0, sizeof(*set));
   81|       |#if defined(__GNUC__) && __GNUC__ >= 13
   82|       |#pragma GCC diagnostic pop
   83|       |#endif
   84|  22.4k|  set->data = set->sdata;
   85|  22.4k|  set->ids = set->sids;
   86|  22.4k|  set->psl = set->spsl;
   87|  22.4k|  set->slotbits = CURL_U8_STRSET_START_BITS;
  ------------------
  |  |   39|  22.4k|#define CURL_U8_STRSET_START_BITS   3
  ------------------
   88|  22.4k|  set->count = 0;
   89|  22.4k|#ifdef DEBUGBUILD
   90|  22.4k|  set->init = CURL_U8_STRSET_MAGIC;
  ------------------
  |  |   31|  22.4k|#define CURL_U8_STRSET_MAGIC 0x7117e783
  ------------------
   91|  22.4k|#endif
   92|  22.4k|}
Curl_u8_strset_clear:
   95|  7.46k|{
   96|  7.46k|  uint16_t i;
   97|  7.46k|  DEBUGASSERT(set->init == CURL_U8_STRSET_MAGIC);
  ------------------
  |  | 1075|  7.46k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (97:3): [True: 0, False: 7.46k]
  |  Branch (97:3): [True: 7.46k, False: 0]
  ------------------
   98|  96.3k|  for(i = 0; i < CURL_U8_SET_SLOT_CNT(set); ++i)
  ------------------
  |  |   52|  96.3k|#define CURL_U8_SET_SLOT_CNT(s)       CURL_U8_SLOT_CNT((s)->slotbits)
  |  |  ------------------
  |  |  |  |   51|  96.3k|#define CURL_U8_SLOT_CNT(i)           ((uint16_t)u8_smask[(i)] + 1)
  |  |  ------------------
  ------------------
  |  Branch (98:14): [True: 88.8k, False: 7.46k]
  ------------------
   99|  88.8k|    curlx_safefree(set->data[i]);
  ------------------
  |  | 1332|  96.3k|  do {                      \
  |  | 1333|  88.8k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  88.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  88.8k|    (ptr) = NULL;           \
  |  | 1335|  88.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 88.8k]
  |  |  ------------------
  ------------------
  100|       |
  101|  7.46k|  if(set->data != set->sdata)
  ------------------
  |  Branch (101:6): [True: 3.62k, False: 3.83k]
  ------------------
  102|       |    curlx_safefree(set->data);
  ------------------
  |  | 1332|  3.62k|  do {                      \
  |  | 1333|  3.62k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.62k|    (ptr) = NULL;           \
  |  | 1335|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  103|  7.46k|  Curl_u8_strset_init(set);
  104|  7.46k|}
Curl_u8_strset_get:
  202|   226k|{
  203|   226k|  uint8_t i;
  204|   226k|  DEBUGASSERT(set->init == CURL_U8_STRSET_MAGIC);
  ------------------
  |  | 1075|   226k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (204:3): [True: 0, False: 226k]
  |  Branch (204:3): [True: 226k, False: 0]
  ------------------
  205|   226k|  if(u8_strset_get_index(set, id, &i))
  ------------------
  |  Branch (205:6): [True: 41.9k, False: 184k]
  ------------------
  206|  41.9k|    return set->data[i];
  207|   184k|  return NULL;
  208|   226k|}
Curl_u8_strset_setn:
  212|  38.3k|{
  213|  38.3k|  uint8_t i;
  214|       |
  215|  38.3k|  DEBUGASSERT(set->init == CURL_U8_STRSET_MAGIC);
  ------------------
  |  | 1075|  38.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 0, False: 38.3k]
  |  Branch (215:3): [True: 38.3k, False: 0]
  ------------------
  216|       |#if CURL_U8_STRSET_DEBUG
  217|       |  curl_mfprintf(stderr, "u8_strset_setn %d=%s\n", id, str);
  218|       |#endif
  219|  38.3k|  if(!str) {
  ------------------
  |  Branch (219:6): [True: 184, False: 38.1k]
  ------------------
  220|    184|    Curl_u8_strset_unset(set, id);
  221|    184|    return CURLE_OK;
  222|    184|  }
  223|       |
  224|  38.1k|  if(u8_strset_get_index(set, id, &i)) {
  ------------------
  |  Branch (224:6): [True: 416, False: 37.7k]
  ------------------
  225|       |    /* `id` is in set, replace value */
  226|    416|    curlx_free(set->data[i]);
  ------------------
  |  | 1476|    416|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  227|    416|    set->data[i] = str;
  228|    416|    return CURLE_OK;
  229|    416|  }
  230|       |  /* `id` not in set yet, grow if full */
  231|  37.7k|  if((set->count >= CURL_U8_SET_SLOT_CNT(set)) && !u8_strset_grow(set)) {
  ------------------
  |  |   52|  37.7k|#define CURL_U8_SET_SLOT_CNT(s)       CURL_U8_SLOT_CNT((s)->slotbits)
  |  |  ------------------
  |  |  |  |   51|  37.7k|#define CURL_U8_SLOT_CNT(i)           ((uint16_t)u8_smask[(i)] + 1)
  |  |  ------------------
  ------------------
  |  Branch (231:6): [True: 3.63k, False: 34.0k]
  |  Branch (231:51): [True: 0, False: 3.63k]
  ------------------
  232|      0|    curlx_free(str);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  233|      0|    return CURLE_OUT_OF_MEMORY;
  234|      0|  }
  235|       |
  236|  37.7k|  u8_strset_addn(set, id, str);
  237|  37.7k|  return CURLE_OK;
  238|  37.7k|}
Curl_u8_strset_setx:
  242|  37.7k|{
  243|  37.7k|  char *val;
  244|       |
  245|  37.7k|  DEBUGASSERT(set->init == CURL_U8_STRSET_MAGIC);
  ------------------
  |  | 1075|  37.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (245:3): [True: 0, False: 37.7k]
  |  Branch (245:3): [True: 37.7k, False: 0]
  ------------------
  246|  37.7k|  if(!str) {
  ------------------
  |  Branch (246:6): [True: 0, False: 37.7k]
  ------------------
  247|      0|    Curl_u8_strset_unset(set, id);
  248|      0|    return CURLE_OK;
  249|      0|  }
  250|       |
  251|  37.7k|  val = curlx_memdup0(str, slen);
  252|  37.7k|  if(!val)
  ------------------
  |  Branch (252:6): [True: 0, False: 37.7k]
  ------------------
  253|      0|    return CURLE_OUT_OF_MEMORY;
  254|  37.7k|  return Curl_u8_strset_setn(set, id, val);
  255|  37.7k|}
Curl_u8_strset_unset:
  290|    184|{
  291|       |  u8_strset_unset(set, id, FALSE);
  ------------------
  |  | 1048|    184|#define FALSE false
  ------------------
  292|    184|}
Curl_u8_strset_unset0:
  295|  37.3k|{
  296|       |  u8_strset_unset(set, id, TRUE);
  ------------------
  |  | 1045|  37.3k|#define TRUE true
  ------------------
  297|  37.3k|}
uint-hashset.c:u8_strset_get_index:
  175|   302k|{
  176|   302k|  uint8_t i = CURL_U8_SET_SLOT_IDX(set, id);
  ------------------
  |  |   50|   302k|#define CURL_U8_SET_SLOT_IDX(s, i)    (uint8_t)((i) & u8_smask[(s)->slotbits])
  ------------------
  177|   302k|  uint8_t psl = 0;
  178|   555k|  while(set->data[i] && (psl <= set->psl[i])) {
  ------------------
  |  Branch (178:9): [True: 388k, False: 167k]
  |  Branch (178:25): [True: 295k, False: 92.2k]
  ------------------
  179|   295k|    if(set->ids[i] == id) {
  ------------------
  |  Branch (179:8): [True: 42.5k, False: 253k]
  ------------------
  180|  42.5k|      *pindex = i;
  181|       |#if CURL_U8_STRSET_DEBUG
  182|       |      curl_mfprintf(stderr, "u8_strset_index %d=%s\n", id, set->data[i]);
  183|       |#endif
  184|  42.5k|      return TRUE;
  ------------------
  |  | 1045|  42.5k|#define TRUE true
  ------------------
  185|  42.5k|    }
  186|   253k|    i = CURL_U8_SET_SLOT_IDX(set, i + 1);
  ------------------
  |  |   50|   253k|#define CURL_U8_SET_SLOT_IDX(s, i)    (uint8_t)((i) & u8_smask[(s)->slotbits])
  ------------------
  187|   253k|    ++psl;
  188|   253k|  }
  189|       |#if CURL_U8_STRSET_DEBUG
  190|       |  curl_mfprintf(stderr, "u8_strset_index %d not found\n", id);
  191|       |#endif
  192|   259k|  *pindex = 0;
  193|       |  return FALSE;
  ------------------
  |  | 1048|   259k|#define FALSE false
  ------------------
  194|   302k|}
uint-hashset.c:u8_strset_grow:
  129|  3.63k|{
  130|  3.63k|  uint8_t i, *prev_ids, nslotbits;
  131|  3.63k|  uint16_t prev_slots;
  132|  3.63k|  char **prev_data;
  133|  3.63k|  size_t nslots;
  134|  3.63k|  void *d;
  135|       |
  136|  3.63k|  if(set->slotbits >= 8)
  ------------------
  |  Branch (136:6): [True: 0, False: 3.63k]
  ------------------
  137|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  138|  3.63k|  nslotbits = (uint8_t)(set->slotbits + 1);
  139|       |#if CURL_U8_STRSET_DEBUG
  140|       |  curl_mfprintf(stderr, "u8_strset_grow from %d to %d\n",
  141|       |                set->slotbits, nslotbits);
  142|       |#endif
  143|  3.63k|  nslots = CURL_U8_SLOT_CNT(nslotbits);
  ------------------
  |  |   51|  3.63k|#define CURL_U8_SLOT_CNT(i)           ((uint16_t)u8_smask[(i)] + 1)
  ------------------
  144|  3.63k|  d = curlx_calloc(1, (nslots * sizeof(char *)) + (2 * nslots));
  ------------------
  |  | 1473|  3.63k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  145|  3.63k|  if(!d)
  ------------------
  |  Branch (145:6): [True: 0, False: 3.63k]
  ------------------
  146|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  147|       |
  148|  3.63k|  prev_data = set->data;
  149|  3.63k|  prev_ids = set->ids;
  150|  3.63k|  prev_slots = set->slotbits;
  151|       |#if defined(__GNUC__) && __GNUC__ >= 13
  152|       |#pragma GCC diagnostic push
  153|       |#pragma GCC diagnostic ignored "-Wanalyzer-allocation-size"
  154|       |#endif
  155|  3.63k|  set->data = (char **)d;
  156|       |#if defined(__GNUC__) && __GNUC__ >= 13
  157|       |#pragma GCC diagnostic pop
  158|       |#endif
  159|  3.63k|  set->ids = (uint8_t *)d + (nslots * sizeof(char *));
  160|  3.63k|  set->psl = set->ids + nslots;
  161|  3.63k|  set->slotbits = nslotbits;
  162|  3.63k|  set->count = 0;
  163|       |  /* re-add previous entries */
  164|  32.7k|  for(i = 0; i < CURL_U8_SLOT_CNT(prev_slots); ++i) {
  ------------------
  |  |   51|  32.7k|#define CURL_U8_SLOT_CNT(i)           ((uint16_t)u8_smask[(i)] + 1)
  ------------------
  |  Branch (164:14): [True: 29.1k, False: 3.63k]
  ------------------
  165|  29.1k|    if(prev_data[i])
  ------------------
  |  Branch (165:8): [True: 29.1k, False: 0]
  ------------------
  166|  29.1k|      u8_strset_addn(set, prev_ids[i], prev_data[i]);
  167|  29.1k|  }
  168|  3.63k|  if(prev_data != set->sdata)
  ------------------
  |  Branch (168:6): [True: 7, False: 3.62k]
  ------------------
  169|      7|    curlx_free(prev_data);
  ------------------
  |  | 1476|      7|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  170|       |  return TRUE;
  ------------------
  |  | 1045|  3.63k|#define TRUE true
  ------------------
  171|  3.63k|}
uint-hashset.c:u8_strset_addn:
  107|  66.8k|{
  108|  66.8k|  uint8_t i = CURL_U8_SET_SLOT_IDX(set, id);
  ------------------
  |  |   50|  66.8k|#define CURL_U8_SET_SLOT_IDX(s, i)    (uint8_t)((i) & u8_smask[(s)->slotbits])
  ------------------
  109|  66.8k|  uint8_t psl = 0;
  110|   112k|  while(set->data[i]) {
  ------------------
  |  Branch (110:9): [True: 45.3k, False: 66.8k]
  ------------------
  111|  45.3k|    if(psl > set->psl[i]) { /* SWAP */
  ------------------
  |  Branch (111:8): [True: 12.0k, False: 33.2k]
  ------------------
  112|  12.0k|      char *tmpdata;
  113|  12.0k|      tmpdata = set->data[i];
  114|  12.0k|      set->data[i] = val;
  115|  12.0k|      val = tmpdata;
  116|  12.0k|      CURL_SWAP(set->psl[i], psl);
  ------------------
  |  |   36|  12.0k|#define CURL_SWAP(a, b) (((a) ^= (b)), ((b) ^= (a)), ((a) ^= (b)))
  ------------------
  117|  12.0k|      CURL_SWAP(set->ids[i], id);
  ------------------
  |  |   36|  12.0k|#define CURL_SWAP(a, b) (((a) ^= (b)), ((b) ^= (a)), ((a) ^= (b)))
  ------------------
  118|  12.0k|    }
  119|  45.3k|    i = CURL_U8_SET_SLOT_IDX(set, i + 1);
  ------------------
  |  |   50|  45.3k|#define CURL_U8_SET_SLOT_IDX(s, i)    (uint8_t)((i) & u8_smask[(s)->slotbits])
  ------------------
  120|  45.3k|    ++psl;
  121|  45.3k|  }
  122|  66.8k|  set->ids[i] = id;
  123|  66.8k|  set->data[i] = val;
  124|  66.8k|  set->psl[i] = psl;
  125|  66.8k|  ++set->count;
  126|  66.8k|}
uint-hashset.c:u8_strset_unset:
  264|  37.5k|{
  265|  37.5k|  uint8_t i, j;
  266|       |
  267|  37.5k|  DEBUGASSERT(set->init == CURL_U8_STRSET_MAGIC);
  ------------------
  |  | 1075|  37.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (267:3): [True: 0, False: 37.5k]
  |  Branch (267:3): [True: 37.5k, False: 0]
  ------------------
  268|  37.5k|  if(u8_strset_get_index(set, id, &i)) {
  ------------------
  |  Branch (268:6): [True: 191, False: 37.3k]
  ------------------
  269|       |    /* `id` is in set */
  270|    191|    if(zero)
  ------------------
  |  Branch (270:8): [True: 151, False: 40]
  ------------------
  271|    151|      curlx_strzero(set->data[i]);
  272|    191|    curlx_safefree(set->data[i]);
  ------------------
  |  | 1332|    191|  do {                      \
  |  | 1333|    191|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|    191|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|    191|    (ptr) = NULL;           \
  |  | 1335|    191|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 191]
  |  |  ------------------
  ------------------
  273|    191|    set->ids[i] = set->psl[i] = 0;
  274|    191|    --set->count;
  275|    191|    j = CURL_U8_SET_SLOT_IDX(set, i + 1);
  ------------------
  |  |   50|    191|#define CURL_U8_SET_SLOT_IDX(s, i)    (uint8_t)((i) & u8_smask[(s)->slotbits])
  ------------------
  276|       |    /* shift all entries with positive psl "down" */
  277|    263|    while(set->data[j] && set->psl[j]) {
  ------------------
  |  Branch (277:11): [True: 152, False: 111]
  |  Branch (277:27): [True: 72, False: 80]
  ------------------
  278|     72|      set->data[i] = set->data[j];
  279|     72|      set->ids[i] = set->ids[j];
  280|     72|      set->psl[i] = (uint8_t)(set->psl[j] - 1);
  281|     72|      set->data[j] = NULL;
  282|     72|      set->ids[j] = set->psl[j] = 0;
  283|     72|      i = j;
  284|     72|      j = CURL_U8_SET_SLOT_IDX(set, i + 1);
  ------------------
  |  |   50|     72|#define CURL_U8_SET_SLOT_IDX(s, i)    (uint8_t)((i) & u8_smask[(s)->slotbits])
  ------------------
  285|     72|    }
  286|    191|  }
  287|  37.5k|}

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

Curl_freeset:
  148|  7.46k|{
  149|       |  /* Free all dynamic strings stored in the data->set substructure. */
  150|  7.46k|  enum dupblob j;
  151|       |
  152|  7.46k|  CURL_EASY_STR_CLEAR0(data, STRING_PASSWORD);
  ------------------
  |  | 1236|  7.46k|  Curl_u8_strset_unset0(&(d)->set.strings, (uint8_t)(id))
  ------------------
  153|  7.46k|  CURL_EASY_STR_CLEAR0(data, STRING_KEY_PASSWD);
  ------------------
  |  | 1236|  7.46k|  Curl_u8_strset_unset0(&(d)->set.strings, (uint8_t)(id))
  ------------------
  154|  7.46k|  CURL_EASY_STR_CLEAR0(data, STRING_BEARER);
  ------------------
  |  | 1236|  7.46k|  Curl_u8_strset_unset0(&(d)->set.strings, (uint8_t)(id))
  ------------------
  155|  7.46k|#ifndef CURL_DISABLE_PROXY
  156|  7.46k|  CURL_EASY_STR_CLEAR0(data, STRING_PROXYPASSWORD);
  ------------------
  |  | 1236|  7.46k|  Curl_u8_strset_unset0(&(d)->set.strings, (uint8_t)(id))
  ------------------
  157|  7.46k|  CURL_EASY_STR_CLEAR0(data, STRING_KEY_PASSWD_PROXY);
  ------------------
  |  | 1236|  7.46k|  Curl_u8_strset_unset0(&(d)->set.strings, (uint8_t)(id))
  ------------------
  158|  7.46k|#endif
  159|  7.46k|  Curl_u8_strset_clear(&data->set.strings);
  160|  7.46k|  curlx_safefree(data->set.str_copypostfields);
  ------------------
  |  | 1332|  7.46k|  do {                      \
  |  | 1333|  7.46k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.46k|    (ptr) = NULL;           \
  |  | 1335|  7.46k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.46k]
  |  |  ------------------
  ------------------
  161|       |
  162|  67.2k|  for(j = (enum dupblob)0; j < BLOB_LAST; j++) {
  ------------------
  |  Branch (162:28): [True: 59.7k, False: 7.46k]
  ------------------
  163|  59.7k|    curlx_safefree(data->set.blobs[j]);
  ------------------
  |  | 1332|  59.7k|  do {                      \
  |  | 1333|  59.7k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  59.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  59.7k|    (ptr) = NULL;           \
  |  | 1335|  59.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 59.7k]
  |  |  ------------------
  ------------------
  164|  59.7k|  }
  165|       |
  166|  7.46k|  Curl_bufref_free(&data->state.referer);
  167|  7.46k|  Curl_bufref_free(&data->state.url);
  168|       |
  169|  7.46k|#if !defined(CURL_DISABLE_MIME) || !defined(CURL_DISABLE_FORM_API)
  170|  7.46k|  Curl_mime_cleanpart(data->set.mimepostp);
  171|  7.46k|  curlx_safefree(data->set.mimepostp);
  ------------------
  |  | 1332|  7.46k|  do {                      \
  |  | 1333|  7.46k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.46k|    (ptr) = NULL;           \
  |  | 1335|  7.46k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.46k]
  |  |  ------------------
  ------------------
  172|  7.46k|#endif
  173|       |
  174|  7.46k|#ifndef CURL_DISABLE_COOKIES
  175|  7.46k|  curl_slist_free_all(data->state.cookielist);
  176|       |  data->state.cookielist = NULL;
  177|  7.46k|#endif
  178|  7.46k|}
Curl_close:
  198|  7.46k|{
  199|  7.46k|  struct Curl_easy *data;
  200|       |
  201|  7.46k|  if(!datap || !*datap)
  ------------------
  |  Branch (201:6): [True: 0, False: 7.46k]
  |  Branch (201:16): [True: 0, False: 7.46k]
  ------------------
  202|      0|    return CURLE_OK;
  203|       |
  204|  7.46k|  data = *datap;
  205|  7.46k|  *datap = NULL;
  206|       |
  207|  7.46k|  if(!data->state.internal && data->multi) {
  ------------------
  |  Branch (207:6): [True: 3.73k, False: 3.73k]
  |  Branch (207:31): [True: 0, False: 3.73k]
  ------------------
  208|       |    /* This handle is still part of a multi handle, take care of this first
  209|       |       and detach this handle from there.
  210|       |       This detaches the connection. */
  211|      0|    Curl_multi_remove_handle(data->multi, data);
  212|      0|  }
  213|  7.46k|  else {
  214|       |    /* Detach connection if any is left. This should not be normal, but can be
  215|       |       the case for example with CONNECT_ONLY + recv/send (test 556) */
  216|  7.46k|    Curl_detach_connection(data);
  217|  7.46k|    if(!data->state.internal && data->multi_easy) {
  ------------------
  |  Branch (217:8): [True: 3.73k, False: 3.73k]
  |  Branch (217:33): [True: 0, False: 3.73k]
  ------------------
  218|       |      /* when curl_easy_perform() is used, it creates its own multi handle to
  219|       |         use and this is the one */
  220|      0|      curl_multi_cleanup(data->multi_easy);
  221|      0|      data->multi_easy = NULL;
  222|      0|    }
  223|  7.46k|  }
  224|  7.46k|  DEBUGASSERT(!data->conn || data->state.internal);
  ------------------
  |  | 1075|  7.46k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (224:3): [True: 7.46k, False: 0]
  |  Branch (224:3): [True: 0, False: 0]
  |  Branch (224:3): [True: 7.46k, False: 0]
  |  Branch (224:3): [True: 0, False: 0]
  ------------------
  225|       |
  226|  7.46k|  Curl_expire_clear_all(data); /* shut off any timers left */
  227|       |
  228|  7.46k|  if(data->state.rangestringalloc)
  ------------------
  |  Branch (228:6): [True: 101, False: 7.36k]
  ------------------
  229|    101|    curlx_free(data->state.range);
  ------------------
  |  | 1476|    101|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  230|       |
  231|       |  /* release any resolve information this transfer kept */
  232|  7.46k|  Curl_resolv_destroy_all(data);
  233|       |
  234|  7.46k|  data->set.verbose = FALSE; /* no more calls to DEBUGFUNCTION */
  ------------------
  |  | 1048|  7.46k|#define FALSE false
  ------------------
  235|  7.46k|  data->magic = 0; /* force a clear AFTER the possibly enforced removal from
  236|       |                    * the multi handle and async dns shutdown. The multi
  237|       |                    * handle might check the magic and so might any
  238|       |                    * DEBUGFUNCTION invoked for tracing */
  239|       |
  240|       |  /* freed here in case DONE was not called */
  241|  7.46k|  Curl_req_free(&data->req, data);
  242|       |
  243|       |  /* Close down all open SSL info and sessions */
  244|  7.46k|  Curl_ssl_close_all(data);
  245|  7.46k|  Curl_peer_unlink(&data->state.origin);
  246|  7.46k|  Curl_peer_unlink(&data->state.initial_origin);
  247|  7.46k|  Curl_ssl_free_certinfo(data);
  248|       |
  249|  7.46k|  Curl_bufref_free(&data->state.referer);
  250|       |
  251|  7.46k|  up_free(data);
  252|  7.46k|  curlx_dyn_free(&data->state.headerb);
  253|  7.46k|  Curl_flush_cookies(data, TRUE);
  ------------------
  |  | 1045|  7.46k|#define TRUE true
  ------------------
  254|  7.46k|#ifndef CURL_DISABLE_ALTSVC
  255|  7.46k|  Curl_altsvc_save(data, data->asi, CURL_EASY_STR(data, STRING_ALTSVC));
  ------------------
  |  | 1228|  7.46k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
  256|  7.46k|  Curl_altsvc_cleanup(&data->asi);
  257|  7.46k|#endif
  258|  7.46k|#ifndef CURL_DISABLE_HSTS
  259|  7.46k|  Curl_hsts_save(data, data->hsts, CURL_EASY_STR(data, STRING_HSTS));
  ------------------
  |  | 1228|  7.46k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
  260|  7.46k|  if(!data->share || !data->share->hsts)
  ------------------
  |  Branch (260:6): [True: 7.46k, False: 0]
  |  Branch (260:22): [True: 0, False: 0]
  ------------------
  261|  7.46k|    Curl_hsts_cleanup(&data->hsts);
  262|  7.46k|  curl_slist_free_all(data->state.hstslist); /* clean up list */
  263|  7.46k|#endif
  264|  7.46k|#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_DIGEST_AUTH)
  265|  7.46k|  Curl_http_auth_cleanup_digest(data);
  266|  7.46k|#endif
  267|  7.46k|  curlx_safefree(data->state.most_recent_ftp_entrypath);
  ------------------
  |  | 1332|  7.46k|  do {                      \
  |  | 1333|  7.46k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.46k|    (ptr) = NULL;           \
  |  | 1335|  7.46k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.46k]
  |  |  ------------------
  ------------------
  268|  7.46k|  curlx_safefree(data->info.contenttype);
  ------------------
  |  | 1332|  7.46k|  do {                      \
  |  | 1333|  7.46k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.46k|    (ptr) = NULL;           \
  |  | 1335|  7.46k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.46k]
  |  |  ------------------
  ------------------
  269|  7.46k|  curlx_safefree(data->info.wouldredirect);
  ------------------
  |  | 1332|  7.46k|  do {                      \
  |  | 1333|  7.46k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.46k|    (ptr) = NULL;           \
  |  | 1335|  7.46k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.46k]
  |  |  ------------------
  ------------------
  270|       |
  271|       |  /* No longer a dirty share, if it exists */
  272|  7.46k|  if(Curl_share_easy_unlink(data))
  ------------------
  |  Branch (272:6): [True: 0, False: 7.46k]
  ------------------
  273|  7.46k|    DEBUGASSERT(0);
  ------------------
  |  | 1075|  7.46k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (273:5): [Folded, False: 0]
  |  Branch (273:5): [Folded, False: 0]
  ------------------
  274|       |
  275|  7.46k|  Curl_hash_destroy(&data->meta_hash);
  276|  7.46k|  Curl_creds_unlink(&data->state.creds);
  277|  7.46k|#ifndef CURL_DISABLE_HTTP
  278|  7.46k|  curlx_safefree(data->state.rangeline);
  ------------------
  |  | 1332|  7.46k|  do {                      \
  |  | 1333|  7.46k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.46k|    (ptr) = NULL;           \
  |  | 1335|  7.46k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.46k]
  |  |  ------------------
  ------------------
  279|  7.46k|  curlx_safefree(data->state.http_host);
  ------------------
  |  | 1332|  7.46k|  do {                      \
  |  | 1333|  7.46k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.46k|    (ptr) = NULL;           \
  |  | 1335|  7.46k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.46k]
  |  |  ------------------
  ------------------
  280|  7.46k|#endif
  281|  7.46k|#ifndef CURL_DISABLE_COOKIES
  282|  7.46k|  curlx_safefree(data->req.cookiehost);
  ------------------
  |  | 1332|  7.46k|  do {                      \
  |  | 1333|  7.46k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.46k|    (ptr) = NULL;           \
  |  | 1335|  7.46k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.46k]
  |  |  ------------------
  ------------------
  283|  7.46k|#endif
  284|       |
  285|  7.46k|#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_FORM_API)
  286|  7.46k|  Curl_mime_cleanpart(data->state.formp);
  287|  7.46k|  curlx_safefree(data->state.formp);
  ------------------
  |  | 1332|  7.46k|  do {                      \
  |  | 1333|  7.46k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.46k|    (ptr) = NULL;           \
  |  | 1335|  7.46k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.46k]
  |  |  ------------------
  ------------------
  288|  7.46k|#endif
  289|       |
  290|       |  /* destruct wildcard structures if it is needed */
  291|  7.46k|  Curl_wildcard_dtor(&data->wildcard);
  292|  7.46k|  Curl_freeset(data);
  293|  7.46k|  Curl_headers_cleanup(data);
  294|  7.46k|  Curl_netrc_cleanup(&data->state.netrc);
  295|  7.46k|#ifndef CURL_DISABLE_DIGEST_AUTH
  296|  7.46k|  curlx_free(data->state.envproxy);
  ------------------
  |  | 1476|  7.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  297|  7.46k|#endif
  298|  7.46k|  Curl_ssl_config_cleanup(&data->set.ssl.primary);
  299|  7.46k|#ifndef CURL_DISABLE_PROXY
  300|  7.46k|  Curl_ssl_config_cleanup(&data->set.proxy_ssl.primary);
  301|  7.46k|#endif
  302|  7.46k|  curlx_memzero(data, sizeof(*data));
  303|  7.46k|  curlx_free(data);
  ------------------
  |  | 1476|  7.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  304|  7.46k|  return CURLE_OK;
  305|  7.46k|}
Curl_init_userdefined:
  312|  7.46k|{
  313|  7.46k|  struct UserDefined *set = &data->set;
  314|       |
  315|  7.46k|  set->out = stdout;  /* default output to stdout */
  316|  7.46k|  set->in_set = stdin;  /* default input from stdin */
  317|  7.46k|  set->err = stderr;  /* default stderr to stderr */
  318|       |
  319|  7.46k|  Curl_u8_strset_init(&data->set.strings);
  320|       |
  321|  7.46k|#if defined(__clang__) && __clang_major__ >= 16
  322|  7.46k|#pragma clang diagnostic push
  323|  7.46k|#pragma clang diagnostic ignored "-Wcast-function-type-strict"
  324|  7.46k|#endif
  325|       |  /* use fwrite as default function to store output */
  326|  7.46k|  set->fwrite_func = (curl_write_callback)fwrite;
  327|       |
  328|       |  /* use fread as default function to read input */
  329|  7.46k|  set->fread_func_set = (curl_read_callback)fread;
  330|  7.46k|#if defined(__clang__) && __clang_major__ >= 16
  331|  7.46k|#pragma clang diagnostic pop
  332|  7.46k|#endif
  333|  7.46k|  set->is_fread_set = 0;
  334|       |
  335|  7.46k|  set->seek_client = ZERO_NULL;
  ------------------
  |  | 1158|  7.46k|#define ZERO_NULL 0
  ------------------
  336|       |
  337|  7.46k|  set->filesize = -1;        /* we do not know the size */
  338|  7.46k|  set->postfieldsize = -1;   /* unknown size */
  339|  7.46k|  set->maxredirs = 30;       /* sensible default */
  340|       |
  341|  7.46k|  set->method = HTTPREQ_GET; /* Default HTTP request */
  342|  7.46k|#ifndef CURL_DISABLE_RTSP
  343|  7.46k|  set->rtspreq = RTSPREQ_OPTIONS; /* Default RTSP request */
  ------------------
  |  |   34|  7.46k|#define RTSPREQ_OPTIONS CURL_RTSPREQ_OPTIONS
  |  |  ------------------
  |  |  |  | 2367|  7.46k|#define CURL_RTSPREQ_OPTIONS       1L
  |  |  ------------------
  ------------------
  344|  7.46k|#endif
  345|  7.46k|#ifndef CURL_DISABLE_FTP
  346|  7.46k|  set->ftp_use_epsv = TRUE;   /* FTP defaults to EPSV operations */
  ------------------
  |  | 1045|  7.46k|#define TRUE true
  ------------------
  347|  7.46k|  set->ftp_use_eprt = TRUE;   /* FTP defaults to EPRT operations */
  ------------------
  |  | 1045|  7.46k|#define TRUE true
  ------------------
  348|  7.46k|  set->ftp_use_pret = FALSE;  /* mainly useful for drftpd servers */
  ------------------
  |  | 1048|  7.46k|#define FALSE false
  ------------------
  349|  7.46k|  set->ftp_filemethod = FTPFILE_MULTICWD;
  350|  7.46k|  set->ftp_skip_ip = TRUE;    /* skip PASV IP by default */
  ------------------
  |  | 1045|  7.46k|#define TRUE true
  ------------------
  351|  7.46k|#endif
  352|  7.46k|  set->dns_cache_timeout_ms = 60000; /* Timeout every 60 seconds by default */
  353|       |
  354|       |  /* Timeout every 24 hours by default */
  355|  7.46k|  set->general_ssl.ca_cache_timeout = 24 * 60 * 60;
  356|       |
  357|  7.46k|  set->httpauth = CURLAUTH_BASIC;  /* defaults to basic */
  ------------------
  |  |  833|  7.46k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  358|       |
  359|  7.46k|  Curl_ssl_config_init(&data->set.ssl.primary);
  360|  7.46k|#ifndef CURL_DISABLE_PROXY
  361|  7.46k|  Curl_ssl_config_init(&data->set.proxy_ssl.primary);
  362|  7.46k|  set->proxyport = 0;
  363|  7.46k|  set->proxytype = CURLPROXY_HTTP; /* defaults to HTTP proxy */
  ------------------
  |  |  792|  7.46k|#define CURLPROXY_HTTP            0L /* added in 7.10, new in 7.19.4 default is
  ------------------
  364|  7.46k|  set->proxyauth = CURLAUTH_BASIC; /* defaults to basic */
  ------------------
  |  |  833|  7.46k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  365|       |  /* SOCKS5 proxy auth defaults to username/password + GSS-API */
  366|  7.46k|  set->socks5auth = CURLAUTH_BASIC | CURLAUTH_GSSAPI;
  ------------------
  |  |  833|  7.46k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
                set->socks5auth = CURLAUTH_BASIC | CURLAUTH_GSSAPI;
  ------------------
  |  |  839|  7.46k|#define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
  |  |  ------------------
  |  |  |  |  835|  7.46k|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  |  |  ------------------
  ------------------
  367|  7.46k|#endif
  368|       |
  369|  7.46k|#ifndef CURL_DISABLE_DOH
  370|  7.46k|  set->doh_verifyhost = TRUE;
  ------------------
  |  | 1045|  7.46k|#define TRUE true
  ------------------
  371|  7.46k|  set->doh_verifypeer = TRUE;
  ------------------
  |  | 1045|  7.46k|#define TRUE true
  ------------------
  372|  7.46k|#endif
  373|       |#ifdef USE_SSH
  374|       |  /* defaults to any auth type */
  375|       |  set->ssh_auth_types = CURLSSH_AUTH_DEFAULT;
  376|       |  set->new_directory_perms = 0755; /* Default permissions */
  377|       |#endif
  378|       |
  379|  7.46k|  set->new_file_perms = 0644;    /* Default permissions */
  380|  7.46k|  set->allowed_protocols = (curl_prot_t)CURLPROTO_64ALL;
  ------------------
  |  |   68|  7.46k|#define CURLPROTO_64ALL ((uint64_t)0xffffffffffffffff)
  ------------------
  381|  7.46k|  set->redir_protocols = CURLPROTO_REDIR;
  ------------------
  |  |   71|  7.46k|#define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1088|  7.46k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1089|  7.46k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1090|  7.46k|#define CURLPROTO_FTP     (1L << 2)
  |  |  ------------------
  |  |   72|  7.46k|                         CURLPROTO_FTPS)
  |  |  ------------------
  |  |  |  | 1091|  7.46k|#define CURLPROTO_FTPS    (1L << 3)
  |  |  ------------------
  ------------------
  382|       |
  383|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
  384|       |  /*
  385|       |   * disallow unprotected protection negotiation NEC reference implementation
  386|       |   * seem not to follow rfc1961 section 4.3/4.4
  387|       |   */
  388|       |  set->socks5_gssapi_nec = FALSE;
  389|       |#endif
  390|       |
  391|       |  /* set default minimum TLS version */
  392|  7.46k|#ifdef USE_SSL
  393|  7.46k|  Curl_setopt_SSLVERSION(data, CURLOPT_SSLVERSION, CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 2394|  7.46k|#define CURL_SSLVERSION_DEFAULT 0L
  ------------------
  394|  7.46k|#ifndef CURL_DISABLE_PROXY
  395|  7.46k|  Curl_setopt_SSLVERSION(data, CURLOPT_PROXY_SSLVERSION,
  396|  7.46k|                         CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 2394|  7.46k|#define CURL_SSLVERSION_DEFAULT 0L
  ------------------
  397|  7.46k|#endif
  398|  7.46k|#endif
  399|  7.46k|#ifndef CURL_DISABLE_FTP
  400|  7.46k|  set->wildcard_enabled = FALSE;
  ------------------
  |  | 1048|  7.46k|#define FALSE false
  ------------------
  401|  7.46k|  set->chunk_bgn = ZERO_NULL;
  ------------------
  |  | 1158|  7.46k|#define ZERO_NULL 0
  ------------------
  402|  7.46k|  set->chunk_end = ZERO_NULL;
  ------------------
  |  | 1158|  7.46k|#define ZERO_NULL 0
  ------------------
  403|  7.46k|  set->fnmatch = ZERO_NULL;
  ------------------
  |  | 1158|  7.46k|#define ZERO_NULL 0
  ------------------
  404|  7.46k|#endif
  405|  7.46k|  set->tcp_keepalive = FALSE;
  ------------------
  |  | 1048|  7.46k|#define FALSE false
  ------------------
  406|  7.46k|  set->tcp_keepintvl = 60;
  407|  7.46k|  set->tcp_keepidle = 60;
  408|  7.46k|  set->tcp_keepcnt = 9;
  409|  7.46k|  set->tcp_fastopen = FALSE;
  ------------------
  |  | 1048|  7.46k|#define FALSE false
  ------------------
  410|  7.46k|  set->tcp_nodelay = TRUE;
  ------------------
  |  | 1045|  7.46k|#define TRUE true
  ------------------
  411|  7.46k|  set->ssl_enable_alpn = TRUE;
  ------------------
  |  | 1045|  7.46k|#define TRUE true
  ------------------
  412|  7.46k|  set->expect_100_timeout = 1000L; /* Wait for a second by default. */
  413|  7.46k|  set->sep_headers = TRUE; /* separated header lists by default */
  ------------------
  |  | 1045|  7.46k|#define TRUE true
  ------------------
  414|  7.46k|  set->buffer_size = READBUFFER_SIZE;
  ------------------
  |  |  121|  7.46k|#define READBUFFER_SIZE CURL_MAX_WRITE_SIZE
  |  |  ------------------
  |  |  |  |  267|  7.46k|#define CURL_MAX_WRITE_SIZE 16384
  |  |  ------------------
  ------------------
  415|  7.46k|  set->upload_buffer_size = UPLOADBUFFER_DEFAULT;
  ------------------
  |  |  133|  7.46k|#define UPLOADBUFFER_DEFAULT 65536
  ------------------
  416|  7.46k|  set->upload_flags = CURLULFLAG_SEEN;
  ------------------
  |  | 1054|  7.46k|#define CURLULFLAG_SEEN     (1L << 4)
  ------------------
  417|  7.46k|  set->happy_eyeballs_timeout = CURL_HET_DEFAULT;
  ------------------
  |  |  979|  7.46k|#define CURL_HET_DEFAULT 200L
  ------------------
  418|  7.46k|  set->upkeep_interval_ms = CURL_UPKEEP_INTERVAL_DEFAULT;
  ------------------
  |  |  982|  7.46k|#define CURL_UPKEEP_INTERVAL_DEFAULT 60000L
  ------------------
  419|  7.46k|  set->maxconnects = DEFAULT_CONNCACHE_SIZE; /* for easy handles */
  ------------------
  |  |   38|  7.46k|#define DEFAULT_CONNCACHE_SIZE 5
  ------------------
  420|  7.46k|  set->conn_max_idle_ms = 118 * 1000;
  421|  7.46k|  set->conn_max_age_ms = 24 * 3600 * 1000;
  422|  7.46k|  set->http09_allowed = FALSE;
  ------------------
  |  | 1048|  7.46k|#define FALSE false
  ------------------
  423|  7.46k|  set->httpwant = CURL_HTTP_VERSION_NONE;
  ------------------
  |  | 2338|  7.46k|#define CURL_HTTP_VERSION_NONE  0L /* setting this means we do not care, and
  ------------------
  424|  7.46k|#if defined(USE_HTTP2) || defined(USE_HTTP3)
  425|  7.46k|  set->weight = 0;
  426|  7.46k|#endif
  427|  7.46k|  set->quick_exit = 0L;
  428|  7.46k|#ifndef CURL_DISABLE_WEBSOCKETS
  429|  7.46k|  set->ws_raw_mode = FALSE;
  ------------------
  |  | 1048|  7.46k|#define FALSE false
  ------------------
  430|       |  set->ws_no_auto_pong = FALSE;
  ------------------
  |  | 1048|  7.46k|#define FALSE false
  ------------------
  431|  7.46k|#endif
  432|  7.46k|}
Curl_open:
  453|  7.46k|{
  454|  7.46k|  struct Curl_easy *data;
  455|       |
  456|       |  /* simple start-up: alloc the struct, init it with zeroes and return */
  457|  7.46k|  data = curlx_calloc(1, sizeof(struct Curl_easy));
  ------------------
  |  | 1473|  7.46k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  458|  7.46k|  if(!data) {
  ------------------
  |  Branch (458:6): [True: 0, False: 7.46k]
  ------------------
  459|       |    /* this is a serious error */
  460|      0|    DEBUGF(curl_mfprintf(stderr, "Error: calloc of Curl_easy failed\n"));
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  ------------------
  461|      0|    return CURLE_OUT_OF_MEMORY;
  462|      0|  }
  463|       |
  464|  7.46k|  data->magic = CURLEASY_MAGIC_NUMBER;
  ------------------
  |  |   28|  7.46k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  ------------------
  465|       |  /* most recent connection is not yet defined */
  466|  7.46k|  data->state.lastconnect_id = -1;
  467|       |  /* and not assigned an id yet */
  468|  7.46k|  data->id = -1;
  469|  7.46k|  data->mid = UINT32_MAX;
  470|  7.46k|  data->master_mid = UINT32_MAX;
  471|  7.46k|  data->progress.hide = TRUE;
  ------------------
  |  | 1045|  7.46k|#define TRUE true
  ------------------
  472|       |
  473|  7.46k|  Curl_hash_init(&data->meta_hash, 23,
  474|  7.46k|                 Curl_hash_str, curlx_str_key_compare, easy_meta_freeentry);
  475|  7.46k|  DEBUGASSERT(STRING_LAST <= UINT8_MAX);
  ------------------
  |  | 1075|  7.46k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (475:3): [True: 0, Folded]
  |  Branch (475:3): [True: 7.46k, Folded]
  ------------------
  476|  7.46k|  Curl_u8_strset_init(&data->set.strings);
  477|  7.46k|  curlx_dyn_init(&data->state.headerb, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  274|  7.46k|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  478|  7.46k|  Curl_bufref_init(&data->state.url);
  479|  7.46k|  Curl_bufref_init(&data->state.referer);
  480|  7.46k|  Curl_req_init(&data->req);
  481|  7.46k|  Curl_initinfo(data);
  482|  7.46k|#ifndef CURL_DISABLE_HTTP
  483|  7.46k|  Curl_llist_init(&data->state.httphdrs, NULL);
  484|  7.46k|#endif
  485|  7.46k|  Curl_netrc_init(&data->state.netrc);
  486|  7.46k|  Curl_init_userdefined(data);
  487|       |
  488|  7.46k|  *curl = data;
  489|  7.46k|  return CURLE_OK;
  490|  7.46k|}
Curl_conn_free:
  493|  3.62k|{
  494|  3.62k|  int8_t i;
  495|       |
  496|  3.62k|  DEBUGASSERT(conn);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (496:3): [True: 0, False: 3.62k]
  |  Branch (496:3): [True: 3.62k, False: 0]
  ------------------
  497|       |
  498|  3.62k|  if(conn->scheme && conn->scheme->run->disconnect &&
  ------------------
  |  Branch (498:6): [True: 3.62k, False: 0]
  |  Branch (498:22): [True: 0, False: 3.62k]
  ------------------
  499|      0|     !conn->bits.shutdown_handler)
  ------------------
  |  Branch (499:6): [True: 0, False: 0]
  ------------------
  500|      0|    conn->scheme->run->disconnect(data, conn, TRUE);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  501|       |
  502|  10.8k|  for(i = 0; i < (int8_t)CURL_ARRAYSIZE(conn->cfilter); ++i) {
  ------------------
  |  | 1299|  10.8k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (502:14): [True: 7.25k, False: 3.62k]
  ------------------
  503|  7.25k|    Curl_conn_cf_discard_all(data, conn, i);
  504|  7.25k|  }
  505|       |
  506|  3.62k|#ifndef CURL_DISABLE_PROXY
  507|  3.62k|  Curl_peer_unlink(&conn->http_proxy.peer);
  508|  3.62k|  Curl_peer_unlink(&conn->socks_proxy.peer);
  509|  3.62k|  Curl_creds_unlink(&conn->http_proxy.creds);
  510|  3.62k|  Curl_creds_unlink(&conn->socks_proxy.creds);
  511|  3.62k|#endif
  512|  3.62k|  Curl_creds_unlink(&conn->creds);
  513|  3.62k|  Curl_peer_unlink(&conn->creds_origin);
  514|  3.62k|  curlx_safefree(conn->options);
  ------------------
  |  | 1332|  3.62k|  do {                      \
  |  | 1333|  3.62k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.62k|    (ptr) = NULL;           \
  |  | 1335|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  515|  3.62k|  curlx_safefree(conn->localdev);
  ------------------
  |  | 1332|  3.62k|  do {                      \
  |  | 1333|  3.62k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.62k|    (ptr) = NULL;           \
  |  | 1335|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  516|  3.62k|  Curl_ssl_conn_config_cleanup(conn);
  517|       |
  518|  3.62k|  curlx_safefree(conn->destination);
  ------------------
  |  | 1332|  3.62k|  do {                      \
  |  | 1333|  3.62k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.62k|    (ptr) = NULL;           \
  |  | 1335|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  519|  3.62k|  Curl_hash_destroy(&conn->meta_hash);
  520|  3.62k|  Curl_peer_unlink(&conn->origin);
  521|  3.62k|  Curl_peer_unlink(&conn->via_peer);
  522|  3.62k|  Curl_peer_unlink(&conn->origin2);
  523|  3.62k|  Curl_peer_unlink(&conn->via_peer2);
  524|       |
  525|  3.62k|  curlx_free(conn); /* free all the connection oriented data */
  ------------------
  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  526|  3.62k|}
Curl_uc_to_curlcode:
 1292|     40|{
 1293|     40|  switch(uc) {
 1294|     40|  default:
  ------------------
  |  Branch (1294:3): [True: 40, False: 0]
  ------------------
 1295|     40|    return CURLE_URL_MALFORMAT;
 1296|      0|  case CURLUE_UNSUPPORTED_SCHEME:
  ------------------
  |  Branch (1296:3): [True: 0, False: 40]
  ------------------
 1297|      0|    return CURLE_UNSUPPORTED_PROTOCOL;
 1298|      0|  case CURLUE_OUT_OF_MEMORY:
  ------------------
  |  Branch (1298:3): [True: 0, False: 40]
  ------------------
 1299|      0|    return CURLE_OUT_OF_MEMORY;
 1300|      0|  case CURLUE_USER_NOT_ALLOWED:
  ------------------
  |  Branch (1300:3): [True: 0, False: 40]
  ------------------
 1301|      0|    return CURLE_LOGIN_DENIED;
 1302|     40|  }
 1303|     40|}
Curl_parse_login_details:
 1703|    202|{
 1704|    202|  char *ubuf = NULL;
 1705|    202|  char *pbuf = NULL;
 1706|    202|  const char *psep = NULL;
 1707|    202|  const char *osep = NULL;
 1708|    202|  size_t ulen;
 1709|    202|  size_t plen;
 1710|    202|  size_t olen;
 1711|       |
 1712|    202|  DEBUGASSERT(userp);
  ------------------
  |  | 1075|    202|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1712:3): [True: 0, False: 202]
  |  Branch (1712:3): [True: 202, False: 0]
  ------------------
 1713|    202|  DEBUGASSERT(passwdp);
  ------------------
  |  | 1075|    202|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1713:3): [True: 0, False: 202]
  |  Branch (1713:3): [True: 202, False: 0]
  ------------------
 1714|       |
 1715|       |  /* Attempt to find the password separator */
 1716|    202|  psep = memchr(login, ':', len);
 1717|       |
 1718|       |  /* Attempt to find the options separator */
 1719|    202|  if(optionsp)
  ------------------
  |  Branch (1719:6): [True: 0, False: 202]
  ------------------
 1720|      0|    osep = memchr(login, ';', len);
 1721|       |
 1722|       |  /* Calculate the portion lengths */
 1723|    202|  ulen = (psep ?
  ------------------
  |  Branch (1723:11): [True: 18, False: 184]
  ------------------
 1724|     18|          (size_t)(osep && psep > osep ? osep - login : psep - login) :
  ------------------
  |  Branch (1724:20): [True: 0, False: 18]
  |  Branch (1724:28): [True: 0, False: 0]
  ------------------
 1725|    202|          (osep ? (size_t)(osep - login) : len));
  ------------------
  |  Branch (1725:12): [True: 0, False: 184]
  ------------------
 1726|    202|  plen = (psep ?
  ------------------
  |  Branch (1726:11): [True: 18, False: 184]
  ------------------
 1727|     18|          (osep && osep > psep ? (size_t)(osep - psep) :
  ------------------
  |  Branch (1727:12): [True: 0, False: 18]
  |  Branch (1727:20): [True: 0, False: 0]
  ------------------
 1728|    184|           (size_t)(login + len - psep)) - 1 : 0);
 1729|    202|  olen = (osep ?
  ------------------
  |  Branch (1729:11): [True: 0, False: 202]
  ------------------
 1730|      0|          (psep && psep > osep ? (size_t)(psep - osep) :
  ------------------
  |  Branch (1730:12): [True: 0, False: 0]
  |  Branch (1730:20): [True: 0, False: 0]
  ------------------
 1731|    202|           (size_t)(login + len - osep)) - 1 : 0);
 1732|       |
 1733|       |  /* Clone the user portion buffer, which can be zero length */
 1734|    202|  ubuf = curlx_memdup0(login, ulen);
 1735|    202|  if(!ubuf)
  ------------------
  |  Branch (1735:6): [True: 0, False: 202]
  ------------------
 1736|      0|    goto error;
 1737|       |
 1738|       |  /* Clone the password portion buffer */
 1739|    202|  if(psep) {
  ------------------
  |  Branch (1739:6): [True: 18, False: 184]
  ------------------
 1740|     18|    pbuf = curlx_memdup0(&psep[1], plen);
 1741|     18|    if(!pbuf)
  ------------------
  |  Branch (1741:8): [True: 0, False: 18]
  ------------------
 1742|      0|      goto error;
 1743|     18|  }
 1744|       |
 1745|       |  /* Allocate the options portion buffer */
 1746|    202|  if(optionsp) {
  ------------------
  |  Branch (1746:6): [True: 0, False: 202]
  ------------------
 1747|      0|    char *obuf = NULL;
 1748|      0|    if(olen) {
  ------------------
  |  Branch (1748:8): [True: 0, False: 0]
  ------------------
 1749|      0|      obuf = curlx_memdup0(&osep[1], olen);
 1750|      0|      if(!obuf)
  ------------------
  |  Branch (1750:10): [True: 0, False: 0]
  ------------------
 1751|      0|        goto error;
 1752|      0|    }
 1753|      0|    *optionsp = obuf;
 1754|      0|  }
 1755|    202|  *userp = ubuf;
 1756|    202|  *passwdp = pbuf;
 1757|    202|  return CURLE_OK;
 1758|      0|error:
 1759|      0|  curlx_free(ubuf);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1760|      0|  curlx_free(pbuf);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1761|      0|  return CURLE_OUT_OF_MEMORY;
 1762|    202|}
Curl_connect:
 2476|  3.66k|{
 2477|  3.66k|  CURLcode result;
 2478|  3.66k|  struct connectdata *conn = NULL;
 2479|       |
 2480|  3.66k|  *pconnected = FALSE;
  ------------------
  |  | 1048|  3.66k|#define FALSE false
  ------------------
 2481|       |
 2482|       |  /* Set the request to virgin state based on transfer settings */
 2483|  3.66k|  Curl_req_hard_reset(&data->req, data);
 2484|       |  /* Determine the origin of the transfer and what credentials to use */
 2485|  3.66k|  result = url_set_data_origin_and_creds(data);
 2486|  3.66k|  if(result)
  ------------------
  |  Branch (2486:6): [True: 40, False: 3.62k]
  ------------------
 2487|     40|    goto out;
 2488|  3.62k|  if(!data->state.origin) { /* just make really sure */
  ------------------
  |  Branch (2488:6): [True: 0, False: 3.62k]
  ------------------
 2489|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2489:5): [Folded, False: 0]
  |  Branch (2489:5): [Folded, False: 0]
  ------------------
 2490|      0|    result = CURLE_FAILED_INIT;
 2491|      0|    goto out;
 2492|      0|  }
 2493|       |
 2494|       |  /* Get or create a connection for the transfer. */
 2495|  3.62k|  result = url_find_or_create_conn(data);
 2496|  3.62k|  conn = data->conn;
 2497|  3.62k|  if(result)
  ------------------
  |  Branch (2497:6): [True: 0, False: 3.62k]
  ------------------
 2498|      0|    goto out;
 2499|  3.62k|  if(!data->conn) { /* just make really sure */
  ------------------
  |  Branch (2499:6): [True: 0, False: 3.62k]
  ------------------
 2500|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2500:5): [Folded, False: 0]
  |  Branch (2500:5): [Folded, False: 0]
  ------------------
 2501|      0|    result = CURLE_FAILED_INIT;
 2502|      0|    goto out;
 2503|      0|  }
 2504|       |
 2505|  3.62k|  Curl_pgrsTime(data, TIMER_POSTQUEUE);
 2506|  3.62k|  if(conn->bits.reuse) {
  ------------------
  |  Branch (2506:6): [True: 0, False: 3.62k]
  ------------------
 2507|      0|    if(conn->attached_xfers > 1)
  ------------------
  |  Branch (2507:8): [True: 0, False: 0]
  ------------------
 2508|       |      /* multiplexed */
 2509|      0|      *pconnected = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2510|      0|  }
 2511|  3.62k|  else if(conn->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  214|  3.62k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (2511:11): [True: 0, False: 3.62k]
  ------------------
 2512|      0|    Curl_pgrsTime(data, TIMER_NAMELOOKUP);
 2513|      0|    *pconnected = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2514|      0|  }
 2515|  3.62k|  else {
 2516|  3.62k|    result = Curl_conn_setup(data, conn, FIRSTSOCKET, CURL_CF_SSL_DEFAULT);
  ------------------
  |  |  234|  3.62k|#define FIRSTSOCKET     0
  ------------------
                  result = Curl_conn_setup(data, conn, FIRSTSOCKET, CURL_CF_SSL_DEFAULT);
  ------------------
  |  |  364|  3.62k|#define CURL_CF_SSL_DEFAULT  (-1)
  ------------------
 2517|  3.62k|    if(!result)
  ------------------
  |  Branch (2517:8): [True: 3.62k, False: 0]
  ------------------
 2518|  3.62k|      result = Curl_headers_init(data);
 2519|  3.62k|    CURL_TRC_M(data, "Curl_conn_setup() -> %d", (int)result);
  ------------------
  |  |  148|  3.62k|  do {                                   \
  |  |  149|  3.62k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  3.62k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.62k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.62k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  3.62k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
 2520|  3.62k|  }
 2521|       |
 2522|  3.66k|out:
 2523|  3.66k|  if(result == CURLE_NO_CONNECTION_AVAILABLE)
  ------------------
  |  Branch (2523:6): [True: 0, False: 3.66k]
  ------------------
 2524|  3.66k|    DEBUGASSERT(!conn);
  ------------------
  |  | 1075|  3.66k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2524:5): [True: 0, False: 0]
  |  Branch (2524:5): [True: 0, False: 0]
  ------------------
 2525|       |
 2526|  3.66k|  if(result && conn) {
  ------------------
  |  Branch (2526:6): [True: 40, False: 3.62k]
  |  Branch (2526:16): [True: 0, False: 40]
  ------------------
 2527|       |    /* We are not allowed to return failure with memory left allocated in the
 2528|       |       connectdata struct, free those here */
 2529|      0|    Curl_detach_connection(data);
 2530|      0|    Curl_conn_close(data, conn, TRUE);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2531|      0|  }
 2532|       |
 2533|  3.66k|  return result;
 2534|  3.66k|}
Curl_init_transfer:
 2546|  3.62k|{
 2547|  3.62k|  CURLcode result;
 2548|       |
 2549|  3.62k|  if(conn) {
  ------------------
  |  Branch (2549:6): [True: 3.62k, False: 0]
  ------------------
 2550|  3.62k|    conn->bits.do_more = FALSE; /* by default there is no curl_do_more() to
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
 2551|       |                                   use */
 2552|       |    /* if the protocol used does not support wildcards, switch it off */
 2553|  3.62k|    if(data->state.wildcardmatch &&
  ------------------
  |  Branch (2553:8): [True: 0, False: 3.62k]
  ------------------
 2554|      0|       !(conn->scheme->flags & PROTOPT_WILDCARD))
  ------------------
  |  |  230|      0|#define PROTOPT_WILDCARD (1 << 12)  /* protocol supports wildcard matching */
  ------------------
  |  Branch (2554:8): [True: 0, False: 0]
  ------------------
 2555|      0|      data->state.wildcardmatch = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 2556|  3.62k|  }
 2557|       |
 2558|  3.62k|  data->state.done = FALSE; /* *_done() is not called yet */
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
 2559|       |
 2560|  3.62k|  data->req.no_body = data->set.opt_no_body;
 2561|  3.62k|  if(data->req.no_body)
  ------------------
  |  Branch (2561:6): [True: 38, False: 3.59k]
  ------------------
 2562|       |    /* in HTTP lingo, no body means using the HEAD request... */
 2563|     38|    data->state.httpreq = HTTPREQ_HEAD;
 2564|       |
 2565|  3.62k|  result = Curl_req_start(&data->req, data);
 2566|  3.62k|  if(!result) {
  ------------------
  |  Branch (2566:6): [True: 3.62k, False: 0]
  ------------------
 2567|  3.62k|    Curl_pgrsReset(data);
 2568|  3.62k|  }
 2569|  3.62k|  return result;
 2570|  3.62k|}
Curl_data_priority_clear_state:
 2575|  3.66k|{
 2576|  3.66k|  data->state.weight = 0;
 2577|  3.66k|}
Curl_conn_meta_remove:
 2593|  3.62k|{
 2594|  3.62k|  Curl_hash_delete(&conn->meta_hash, CURL_UNCONST(key), strlen(key) + 1);
  ------------------
  |  |  856|  3.62k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 2595|  3.62k|}
Curl_get_admin:
 2603|  10.8k|{
 2604|  10.8k|  struct Curl_easy *admin;
 2605|       |
 2606|  10.8k|  if(!data->mid) /* already an admin handle */
  ------------------
  |  Branch (2606:6): [True: 23, False: 10.8k]
  ------------------
 2607|     23|    admin = data;
 2608|  10.8k|  else if(data->multi)
  ------------------
  |  Branch (2608:11): [True: 10.8k, False: 0]
  ------------------
 2609|  10.8k|    admin = data->multi->admin;
 2610|      0|  else if(data->multi_easy)
  ------------------
  |  Branch (2610:11): [True: 0, False: 0]
  ------------------
 2611|      0|    admin = data->multi_easy->admin;
 2612|      0|  else {
 2613|      0|    DEBUGASSERT(0); /* we do not want this. does it happen? */
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2613:5): [Folded, False: 0]
  |  Branch (2613:5): [Folded, False: 0]
  ------------------
 2614|      0|    admin = data;
 2615|      0|  }
 2616|  10.8k|  if(admin != data) {
  ------------------
  |  Branch (2616:6): [True: 10.8k, False: 23]
  ------------------
 2617|  10.8k|    admin->set.conn_max_idle_ms = data->set.conn_max_idle_ms;
 2618|  10.8k|    admin->set.conn_max_age_ms = data->set.conn_max_age_ms;
 2619|  10.8k|    admin->set.upkeep_interval_ms = data->set.upkeep_interval_ms;
 2620|  10.8k|    admin->set.timeout = data->set.timeout;
 2621|  10.8k|    admin->set.server_response_timeout = data->set.server_response_timeout;
 2622|  10.8k|    admin->set.no_signal = data->set.no_signal;
 2623|  10.8k|  }
 2624|  10.8k|  return admin;
 2625|  10.8k|}
Curl_1st_fatal:
 2628|  3.66k|{
 2629|  3.66k|  if(r1 && (r1 != CURLE_AGAIN))
  ------------------
  |  Branch (2629:6): [True: 3.56k, False: 100]
  |  Branch (2629:12): [True: 3.56k, False: 0]
  ------------------
 2630|  3.56k|    return r1;
 2631|    100|  if(r2 && (r2 != CURLE_AGAIN))
  ------------------
  |  Branch (2631:6): [True: 0, False: 100]
  |  Branch (2631:12): [True: 0, False: 0]
  ------------------
 2632|      0|    return r2;
 2633|    100|  return r1;
 2634|    100|}
url.c:up_free:
  182|  11.1k|{
  183|  11.1k|  struct urlpieces *up = &data->state.up;
  184|  11.1k|  curlx_safefree(up->options);
  ------------------
  |  | 1332|  11.1k|  do {                      \
  |  | 1333|  11.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  11.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.1k|    (ptr) = NULL;           \
  |  | 1335|  11.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.1k]
  |  |  ------------------
  ------------------
  185|  11.1k|  curlx_safefree(up->path);
  ------------------
  |  | 1332|  11.1k|  do {                      \
  |  | 1333|  11.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  11.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.1k|    (ptr) = NULL;           \
  |  | 1335|  11.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.1k]
  |  |  ------------------
  ------------------
  186|  11.1k|  curlx_safefree(up->query);
  ------------------
  |  | 1332|  11.1k|  do {                      \
  |  | 1333|  11.1k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  11.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  11.1k|    (ptr) = NULL;           \
  |  | 1335|  11.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 11.1k]
  |  |  ------------------
  ------------------
  187|  11.1k|  curl_url_cleanup(data->state.uh);
  188|       |  data->state.uh = NULL;
  189|  11.1k|}
url.c:url_set_data_origin_and_creds:
 2160|  3.66k|{
 2161|  3.66k|  CURLcode result = CURLE_OK;
 2162|  3.66k|  CURLU *uh;
 2163|  3.66k|  CURLUcode uc;
 2164|  3.66k|  bool use_set_uh = (data->set.uh && !data->state.this_is_a_follow);
  ------------------
  |  Branch (2164:22): [True: 0, False: 3.66k]
  |  Branch (2164:38): [True: 0, False: 0]
  ------------------
 2165|  3.66k|  uint16_t port_override = data->state.allow_port ? data->set.use_port : 0;
  ------------------
  |  Branch (2165:28): [True: 3.66k, False: 0]
  ------------------
 2166|  3.66k|  uint32_t scope_id = 0;
 2167|       |
 2168|       |  /*************************************************************
 2169|       |   * Check input data
 2170|       |   *************************************************************/
 2171|  3.66k|  if(!Curl_bufref_ptr(&data->state.url)) {
  ------------------
  |  Branch (2171:6): [True: 0, False: 3.66k]
  ------------------
 2172|      0|    result = CURLE_URL_MALFORMAT;
 2173|      0|    goto out;
 2174|      0|  }
 2175|       |
 2176|  3.66k|  up_free(data); /* cleanup previous leftovers first */
 2177|       |
 2178|       |  /* parse the URL */
 2179|  3.66k|  if(use_set_uh)
  ------------------
  |  Branch (2179:6): [True: 0, False: 3.66k]
  ------------------
 2180|      0|    uh = data->state.uh = curl_url_dup(data->set.uh);
 2181|  3.66k|  else
 2182|  3.66k|    uh = data->state.uh = curl_url();
 2183|  3.66k|  if(!uh) {
  ------------------
  |  Branch (2183:6): [True: 0, False: 3.66k]
  ------------------
 2184|      0|    result = CURLE_OUT_OF_MEMORY;
 2185|      0|    goto out;
 2186|      0|  }
 2187|       |
 2188|       |  /* Calculate the *real* URL this transfer uses, applying defaults
 2189|       |   * where information is missing. */
 2190|  3.66k|  if(CURL_EASY_STR(data, STRING_DEFAULT_PROTOCOL) &&
  ------------------
  |  | 1228|  7.33k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  |  |  ------------------
  |  |  |  Branch (1228:3): [True: 0, False: 3.66k]
  |  |  ------------------
  ------------------
 2191|      0|     !Curl_is_absolute_url(Curl_bufref_ptr(&data->state.url), NULL, 0, TRUE)) {
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  |  Branch (2191:6): [True: 0, False: 0]
  ------------------
 2192|      0|    char *url = curl_maprintf("%s://%s",
 2193|      0|                              CURL_EASY_STR(data, STRING_DEFAULT_PROTOCOL),
  ------------------
  |  | 1228|      0|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
 2194|      0|                              Curl_bufref_ptr(&data->state.url));
 2195|      0|    if(!url) {
  ------------------
  |  Branch (2195:8): [True: 0, False: 0]
  ------------------
 2196|      0|      result = CURLE_OUT_OF_MEMORY;
 2197|      0|      goto out;
 2198|      0|    }
 2199|      0|    Curl_bufref_set(&data->state.url, url, 0, curl_free);
 2200|      0|  }
 2201|       |
 2202|  3.66k|  if(!use_set_uh) {
  ------------------
  |  Branch (2202:6): [True: 3.66k, False: 0]
  ------------------
 2203|  3.66k|    char *newurl;
 2204|  3.66k|    uc = curl_url_set(uh, CURLUPART_URL, Curl_bufref_ptr(&data->state.url),
 2205|  3.66k|                      (unsigned int)(CURLU_GUESS_SCHEME |
  ------------------
  |  |   97|  3.66k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
 2206|  3.66k|                       CURLU_NON_SUPPORT_SCHEME |
  ------------------
  |  |   91|  3.66k|#define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
  ------------------
 2207|  3.66k|                       (data->set.disallow_username_in_url ?
  ------------------
  |  Branch (2207:25): [True: 11, False: 3.65k]
  ------------------
 2208|  3.65k|                        CURLU_DISALLOW_USER : 0) |
  ------------------
  |  |   93|     11|#define CURLU_DISALLOW_USER (1 << 5)      /* no user+password allowed */
  ------------------
 2209|  3.66k|                       (data->set.path_as_is ? CURLU_PATH_AS_IS : 0)));
  ------------------
  |  |   92|     16|#define CURLU_PATH_AS_IS (1 << 4)         /* leave dot sequences */
  ------------------
  |  Branch (2209:25): [True: 16, False: 3.65k]
  ------------------
 2210|  3.66k|    if(uc) {
  ------------------
  |  Branch (2210:8): [True: 40, False: 3.62k]
  ------------------
 2211|     40|      failf(data, "URL rejected: %s", curl_url_strerror(uc));
  ------------------
  |  |   62|     40|#define failf Curl_failf
  ------------------
 2212|     40|      result = Curl_uc_to_curlcode(uc);
 2213|     40|      goto out;
 2214|     40|    }
 2215|       |
 2216|       |    /* after it was parsed, get the generated normalized version */
 2217|  3.62k|    uc = curl_url_get(uh, CURLUPART_URL, &newurl, CURLU_GET_EMPTY);
  ------------------
  |  |  103|  3.62k|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
 2218|  3.62k|    if(uc) {
  ------------------
  |  Branch (2218:8): [True: 0, False: 3.62k]
  ------------------
 2219|      0|      result = Curl_uc_to_curlcode(uc);
 2220|      0|      goto out;
 2221|      0|    }
 2222|  3.62k|    Curl_bufref_set(&data->state.url, newurl, 0, curl_free);
 2223|  3.62k|  }
 2224|       |
 2225|  3.62k|#ifdef USE_IPV6
 2226|  3.62k|  scope_id = data->set.scope_id;
 2227|  3.62k|#endif
 2228|       |
 2229|       |  /* `uh` is now as the connection should use it, probably. */
 2230|  3.62k|  result = Curl_peer_from_url(uh, data, port_override, scope_id,
 2231|  3.62k|                              &data->state.origin);
 2232|  3.62k|  if(result)
  ------------------
  |  Branch (2232:6): [True: 0, False: 3.62k]
  ------------------
 2233|      0|    goto out;
 2234|       |  /* The origin might get changed when HSTS applies */
 2235|  3.62k|  result = hsts_upgrade(data, uh, port_override, scope_id);
 2236|  3.62k|  if(result)
  ------------------
  |  Branch (2236:6): [True: 0, False: 3.62k]
  ------------------
 2237|      0|    goto out;
 2238|       |
 2239|       |  /* When the transfers initial_origin is not set, this is the initial
 2240|       |   * request. Remember this starting point. */
 2241|  3.62k|  if(!data->state.initial_origin)
  ------------------
  |  Branch (2241:6): [True: 3.62k, False: 0]
  ------------------
 2242|  3.62k|    Curl_peer_link(&data->state.initial_origin, data->state.origin);
 2243|       |
 2244|  3.62k|  uc = curl_url_get(uh, CURLUPART_PATH, &data->state.up.path, CURLU_URLENCODE);
  ------------------
  |  |   95|  3.62k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
 2245|  3.62k|  if(uc) {
  ------------------
  |  Branch (2245:6): [True: 0, False: 3.62k]
  ------------------
 2246|      0|    result = Curl_uc_to_curlcode(uc);
 2247|      0|    goto out;
 2248|      0|  }
 2249|  3.62k|  uc = curl_url_get(uh, CURLUPART_QUERY, &data->state.up.query,
 2250|  3.62k|                    CURLU_GET_EMPTY);
  ------------------
  |  |  103|  3.62k|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
 2251|  3.62k|  if(uc && (uc != CURLUE_NO_QUERY)) {
  ------------------
  |  Branch (2251:6): [True: 3.53k, False: 91]
  |  Branch (2251:12): [True: 0, False: 3.53k]
  ------------------
 2252|      0|    result = CURLE_OUT_OF_MEMORY;
 2253|      0|    goto out;
 2254|      0|  }
 2255|       |
 2256|  3.62k|  uc = curl_url_get(uh, CURLUPART_OPTIONS, &data->state.up.options,
 2257|  3.62k|                    CURLU_URLDECODE);
  ------------------
  |  |   94|  3.62k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
 2258|  3.62k|  if(uc && (uc != CURLUE_NO_OPTIONS)) {
  ------------------
  |  Branch (2258:6): [True: 3.62k, False: 0]
  |  Branch (2258:12): [True: 0, False: 3.62k]
  ------------------
 2259|      0|    result = Curl_uc_to_curlcode(uc);
 2260|      0|    goto out;
 2261|      0|  }
 2262|       |
 2263|  3.62k|  result = url_set_data_creds(data, uh);
 2264|  3.62k|  if(result)
  ------------------
  |  Branch (2264:6): [True: 0, False: 3.62k]
  ------------------
 2265|      0|    goto out;
 2266|       |
 2267|  3.66k|out:
 2268|  3.66k|  return result;
 2269|  3.62k|}
url.c:hsts_upgrade:
 1310|  3.62k|{
 1311|       |  /* HSTS upgrade */
 1312|  3.62k|  if(data->hsts && (data->state.origin->scheme == &Curl_scheme_http) &&
  ------------------
  |  Branch (1312:6): [True: 3.60k, False: 26]
  |  Branch (1312:20): [True: 0, False: 3.60k]
  ------------------
 1313|      0|     Curl_hsts_applies(data->hsts, data->state.origin)) {
  ------------------
  |  Branch (1313:6): [True: 0, False: 0]
  ------------------
 1314|      0|    char *url;
 1315|      0|    CURLUcode uc;
 1316|      0|    CURLcode result;
 1317|       |
 1318|      0|    uc = curl_url_set(uh, CURLUPART_SCHEME, "https", 0);
 1319|      0|    if(uc)
  ------------------
  |  Branch (1319:8): [True: 0, False: 0]
  ------------------
 1320|      0|      return Curl_uc_to_curlcode(uc);
 1321|      0|    Curl_bufref_free(&data->state.url);
 1322|       |    /* after update, get the updated version */
 1323|      0|    uc = curl_url_get(uh, CURLUPART_URL, &url, 0);
 1324|      0|    if(uc)
  ------------------
  |  Branch (1324:8): [True: 0, False: 0]
  ------------------
 1325|      0|      return Curl_uc_to_curlcode(uc);
 1326|      0|    Curl_bufref_set(&data->state.url, url, 0, curl_free);
 1327|       |
 1328|      0|    result = Curl_peer_from_url(uh, data, port_override, scope_id,
 1329|      0|                                &data->state.origin);
 1330|      0|    if(result)
  ------------------
  |  Branch (1330:8): [True: 0, False: 0]
  ------------------
 1331|      0|      return result;
 1332|      0|    infof(data, "Switched from HTTP to HTTPS due to HSTS => %s", url);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1333|      0|  }
 1334|  3.62k|  return CURLE_OK;
 1335|  3.62k|}
url.c:url_set_data_creds:
 1462|  3.62k|{
 1463|  3.62k|  struct Curl_creds *newcreds = NULL;
 1464|  3.62k|  CURLcode result = CURLE_OK;
 1465|       |
 1466|  3.62k|  if((CURL_EASY_STR(data, STRING_USERNAME) ||
  ------------------
  |  | 1228|  7.25k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  |  |  ------------------
  |  |  |  Branch (1228:3): [True: 142, False: 3.48k]
  |  |  ------------------
  ------------------
 1467|  3.48k|      CURL_EASY_STR(data, STRING_PASSWORD) ||
  ------------------
  |  | 1228|  7.11k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  |  |  ------------------
  |  |  |  Branch (1228:3): [True: 58, False: 3.42k]
  |  |  ------------------
  ------------------
 1468|  3.42k|      CURL_EASY_STR(data, STRING_BEARER) ||
  ------------------
  |  | 1228|  7.05k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  |  |  ------------------
  |  |  |  Branch (1228:3): [True: 44, False: 3.38k]
  |  |  ------------------
  ------------------
 1469|  3.38k|      CURL_EASY_STR(data, STRING_SASL_AUTHZID) ||
  ------------------
  |  | 1228|  7.01k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  |  |  ------------------
  |  |  |  Branch (1228:3): [True: 0, False: 3.38k]
  |  |  ------------------
  ------------------
 1470|  3.38k|      CURL_EASY_STR(data, STRING_SERVICE_NAME)) &&
  ------------------
  |  | 1228|  3.38k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  |  |  ------------------
  |  |  |  Branch (1228:3): [True: 0, False: 3.38k]
  |  |  ------------------
  ------------------
 1471|    244|     Curl_auth_allowed_to_origin(data, data->state.origin)) {
  ------------------
  |  Branch (1471:6): [True: 244, False: 0]
  ------------------
 1472|    244|    result = Curl_creds_create(CURL_EASY_STR(data, STRING_USERNAME),
  ------------------
  |  | 1228|    244|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
 1473|    244|                               CURL_EASY_STR(data, STRING_PASSWORD),
  ------------------
  |  | 1228|    244|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
 1474|    244|                               CURL_EASY_STR(data, STRING_BEARER),
  ------------------
  |  | 1228|    244|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
 1475|    244|                               CURL_EASY_STR(data, STRING_SASL_AUTHZID),
  ------------------
  |  | 1228|    244|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
 1476|    244|                               CURL_EASY_STR(data, STRING_SERVICE_NAME),
  ------------------
  |  | 1228|    244|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
 1477|    244|                               CREDS_OPTION, &newcreds);
  ------------------
  |  |   31|    244|#define CREDS_OPTION 2 /* username/passwd set with a CURLOPT_ */
  ------------------
 1478|    244|    if(result)
  ------------------
  |  Branch (1478:8): [True: 0, False: 244]
  ------------------
 1479|      0|      goto out;
 1480|    244|    if(newcreds &&
  ------------------
  |  Branch (1480:8): [True: 219, False: 25]
  ------------------
 1481|    219|       !(data->state.origin->scheme->flags & PROTOPT_USERPWDCTRL) &&
  ------------------
  |  |  231|    219|#define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in
  ------------------
  |  Branch (1481:8): [True: 0, False: 219]
  ------------------
 1482|      0|       (str_has_ctrl(Curl_creds_user(newcreds)) ||
  ------------------
  |  |   81|      0|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (81:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1482:9): [True: 0, False: 0]
  ------------------
 1483|      0|        str_has_ctrl(Curl_creds_passwd(newcreds)))) {
  ------------------
  |  |   82|      0|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (82:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1483:9): [True: 0, False: 0]
  ------------------
 1484|       |      /* if the protocol cannot handle control codes in credentials, make
 1485|       |         sure there are none */
 1486|      0|      failf(data, "control code detected in credentials");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1487|      0|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1488|      0|      goto out;
 1489|      0|    }
 1490|    244|  }
 1491|       |
 1492|       |  /* Extract credentials from the URL only if there are none OR
 1493|       |   * if no CURLOPT_USER was set. */
 1494|  3.62k|  if(!newcreds || !Curl_creds_has_user(newcreds)) {
  ------------------
  |  |   75|    219|#define Curl_creds_has_user(c)           ((c) && (c)->user[0])
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 219, False: 0]
  |  |  |  Branch (75:50): [True: 37, False: 182]
  |  |  ------------------
  ------------------
  |  Branch (1494:6): [True: 3.41k, False: 219]
  ------------------
 1495|  3.59k|    char *user = NULL;
 1496|  3.59k|    char *passwd = NULL;
 1497|  3.59k|    char *udecoded = NULL;
 1498|  3.59k|    char *pdecoded = NULL;
 1499|  3.59k|    CURLUcode uc;
 1500|       |
 1501|  3.59k|    uc = curl_url_get(uh, CURLUPART_USER, &user, 0);
 1502|  3.59k|    if(uc && (uc != CURLUE_NO_USER))
  ------------------
  |  Branch (1502:8): [True: 3.59k, False: 0]
  |  Branch (1502:14): [True: 0, False: 3.59k]
  ------------------
 1503|      0|      result = Curl_uc_to_curlcode(uc);
 1504|  3.59k|    if(!result) {
  ------------------
  |  Branch (1504:8): [True: 3.59k, False: 0]
  ------------------
 1505|  3.59k|      uc = curl_url_get(uh, CURLUPART_PASSWORD, &passwd, 0);
 1506|  3.59k|      if(uc && (uc != CURLUE_NO_PASSWORD))
  ------------------
  |  Branch (1506:10): [True: 3.59k, False: 0]
  |  Branch (1506:16): [True: 0, False: 3.59k]
  ------------------
 1507|      0|        result = Curl_uc_to_curlcode(uc);
 1508|  3.59k|    }
 1509|  3.59k|    if(!result && user) {
  ------------------
  |  Branch (1509:8): [True: 3.59k, False: 0]
  |  Branch (1509:19): [True: 0, False: 3.59k]
  ------------------
 1510|      0|      result = Curl_urldecode(user, 0, &udecoded, NULL,
 1511|      0|                              (data->state.origin->scheme->flags &
  ------------------
  |  Branch (1511:31): [True: 0, False: 0]
  ------------------
 1512|      0|                               PROTOPT_USERPWDCTRL) ?
  ------------------
  |  |  231|      0|#define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in
  ------------------
 1513|      0|                              REJECT_ZERO : REJECT_CTRL);
 1514|      0|    }
 1515|  3.59k|    if(!result && passwd) {
  ------------------
  |  Branch (1515:8): [True: 3.59k, False: 0]
  |  Branch (1515:19): [True: 0, False: 3.59k]
  ------------------
 1516|      0|      result = Curl_urldecode(passwd, 0, &pdecoded, NULL,
 1517|      0|                              (data->state.origin->scheme->flags &
  ------------------
  |  Branch (1517:31): [True: 0, False: 0]
  ------------------
 1518|      0|                               PROTOPT_USERPWDCTRL) ?
  ------------------
  |  |  231|      0|#define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in
  ------------------
 1519|      0|                              REJECT_ZERO : REJECT_CTRL);
 1520|      0|    }
 1521|  3.59k|    if(!result)
  ------------------
  |  Branch (1521:8): [True: 3.59k, False: 0]
  ------------------
 1522|  3.59k|      result = Curl_creds_merge(udecoded, pdecoded, newcreds,
 1523|  3.59k|                                CREDS_URL, &newcreds);
  ------------------
  |  |   30|  3.59k|#define CREDS_URL    1 /* username/passwd from URL */
  ------------------
 1524|       |
 1525|  3.59k|    curlx_free(udecoded);
  ------------------
  |  | 1476|  3.59k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1526|  3.59k|    curlx_free(pdecoded);
  ------------------
  |  | 1476|  3.59k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1527|  3.59k|    curlx_free(passwd);
  ------------------
  |  | 1476|  3.59k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1528|  3.59k|    curlx_free(user);
  ------------------
  |  | 1476|  3.59k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1529|  3.59k|    if(result) {
  ------------------
  |  Branch (1529:8): [True: 0, False: 3.59k]
  ------------------
 1530|      0|      failf(data, "error extracting credentials from URL");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1531|      0|      goto out;
 1532|      0|    }
 1533|  3.59k|  }
 1534|       |
 1535|  3.62k|#ifndef CURL_DISABLE_NETRC
 1536|       |  /* Check for overridden login details and set them accordingly so that
 1537|       |     they are known when protocol->setup_connection is called! */
 1538|  3.62k|  result = url_set_data_creds_netrc(data, &newcreds);
 1539|  3.62k|#endif /* CURL_DISABLE_NETRC */
 1540|       |
 1541|  3.62k|out:
 1542|  3.62k|  if(!result && !Curl_creds_equal(data->state.creds, newcreds)) {
  ------------------
  |  Branch (1542:6): [True: 3.62k, False: 0]
  |  Branch (1542:17): [True: 219, False: 3.41k]
  ------------------
 1543|       |    /* Do we have more things to trigger on credentials change? */
 1544|    219|    Curl_creds_link(&data->state.creds, newcreds);
 1545|    219|  }
 1546|  3.62k|  Curl_creds_unlink(&newcreds);
 1547|  3.62k|  return result;
 1548|  3.62k|}
url.c:url_set_data_creds_netrc:
 1360|  3.62k|{
 1361|  3.62k|  struct Curl_creds *ncreds_out = NULL;
 1362|  3.62k|  CURLcode result = CURLE_OK;
 1363|       |
 1364|  3.62k|  if(data->set.use_netrc) { /* not CURL_NETRC_IGNORED */
  ------------------
  |  Branch (1364:6): [True: 0, False: 3.62k]
  ------------------
 1365|      0|    struct Curl_creds *ncreds_in = NULL;
 1366|      0|    bool scan_netrc = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1367|      0|    NETRCcode ret;
 1368|      0|    CURLUcode uc;
 1369|       |
 1370|      0|    if(*pcreds) {
  ------------------
  |  Branch (1370:8): [True: 0, False: 0]
  ------------------
 1371|      0|      switch((*pcreds)->source) {
 1372|      0|      case CREDS_OPTION:
  ------------------
  |  |   31|      0|#define CREDS_OPTION 2 /* username/passwd set with a CURLOPT_ */
  ------------------
  |  Branch (1372:7): [True: 0, False: 0]
  ------------------
 1373|       |        /* we never override credentials set via CURLOPT_*, leave. */
 1374|      0|        scan_netrc = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1375|      0|        break;
 1376|      0|      case CREDS_URL: /* only apply when netrc is not required */
  ------------------
  |  |   30|      0|#define CREDS_URL    1 /* username/passwd from URL */
  ------------------
  |  Branch (1376:7): [True: 0, False: 0]
  ------------------
 1377|      0|        if(data->set.use_netrc == CURL_NETRC_REQUIRED) {
  ------------------
  |  | 2385|      0|#define CURL_NETRC_REQUIRED 2L /* A user:password in the URL is ignored.
  ------------------
  |  Branch (1377:12): [True: 0, False: 0]
  ------------------
 1378|       |          /* We ignore password from URL */
 1379|      0|          ncreds_in = *pcreds;
 1380|      0|        }
 1381|      0|        else if(!Curl_creds_has_user(*pcreds) ||
  ------------------
  |  |   75|      0|#define Curl_creds_has_user(c)           ((c) && (c)->user[0])
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 0, False: 0]
  |  |  |  Branch (75:50): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1382|      0|                !Curl_creds_has_passwd(*pcreds)) {
  ------------------
  |  |   76|      0|#define Curl_creds_has_passwd(c)         ((c) && (c)->passwd[0])
  |  |  ------------------
  |  |  |  Branch (76:43): [True: 0, False: 0]
  |  |  |  Branch (76:50): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1383|       |          /* We use netrc to complete what is missing */
 1384|      0|          ncreds_in = *pcreds;
 1385|      0|        }
 1386|      0|        else
 1387|      0|          scan_netrc = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1388|      0|        break;
 1389|      0|      default: /* ignore credentials from other sources */
  ------------------
  |  Branch (1389:7): [True: 0, False: 0]
  ------------------
 1390|      0|        break;
 1391|      0|      }
 1392|      0|    }
 1393|       |
 1394|      0|    if(!scan_netrc)
  ------------------
  |  Branch (1394:8): [True: 0, False: 0]
  ------------------
 1395|      0|      goto out;
 1396|       |
 1397|      0|    ret = Curl_netrc_scan(data, &data->state.netrc,
 1398|      0|                          data->state.origin->hostname,
 1399|      0|                          Curl_creds_user(ncreds_in),
  ------------------
  |  |   81|      0|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (81:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1400|      0|                          CURL_EASY_STR(data, STRING_NETRC_FILE),
  ------------------
  |  | 1228|      0|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
 1401|      0|                          &ncreds_out);
 1402|      0|    DEBUGASSERT(!ret || !ncreds_out);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1402:5): [True: 0, False: 0]
  |  Branch (1402:5): [True: 0, False: 0]
  |  Branch (1402:5): [True: 0, False: 0]
  |  Branch (1402:5): [True: 0, False: 0]
  ------------------
 1403|      0|    if(ret == NETRC_OUT_OF_MEMORY) {
  ------------------
  |  Branch (1403:8): [True: 0, False: 0]
  ------------------
 1404|      0|      result = CURLE_OUT_OF_MEMORY;
 1405|      0|      goto out;
 1406|      0|    }
 1407|      0|    else if(ret && ((ret == NETRC_NO_MATCH) ||
  ------------------
  |  Branch (1407:13): [True: 0, False: 0]
  |  Branch (1407:21): [True: 0, False: 0]
  ------------------
 1408|      0|                    (data->set.use_netrc == CURL_NETRC_OPTIONAL))) {
  ------------------
  |  | 2383|      0|#define CURL_NETRC_OPTIONAL 1L /* A user:password in the URL is preferred
  ------------------
  |  Branch (1408:21): [True: 0, False: 0]
  ------------------
 1409|      0|      infof(data, "Could not find host %s in the %s file; using defaults",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
 1410|      0|            data->state.origin->hostname,
 1411|      0|            (CURL_EASY_STR(data, STRING_NETRC_FILE) ?
 1412|      0|             CURL_EASY_STR(data, STRING_NETRC_FILE) : ".netrc"));
 1413|      0|    }
 1414|      0|    else if(ret) {
  ------------------
  |  Branch (1414:13): [True: 0, False: 0]
  ------------------
 1415|      0|      const char *m = Curl_netrc_strerror(ret);
 1416|      0|      failf(data, ".netrc error: %s", m);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1417|      0|      result = CURLE_READ_ERROR;
 1418|      0|      goto out;
 1419|      0|    }
 1420|      0|    else if(ncreds_out) {
  ------------------
  |  Branch (1420:13): [True: 0, False: 0]
  ------------------
 1421|      0|      if(!(data->state.origin->scheme->flags & PROTOPT_USERPWDCTRL)) {
  ------------------
  |  |  231|      0|#define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in
  ------------------
  |  Branch (1421:10): [True: 0, False: 0]
  ------------------
 1422|       |        /* if the protocol cannot handle control codes in credentials, make
 1423|       |           sure there are none */
 1424|      0|        if(str_has_ctrl(ncreds_out->user) ||
  ------------------
  |  Branch (1424:12): [True: 0, False: 0]
  ------------------
 1425|      0|           str_has_ctrl(ncreds_out->passwd)) {
  ------------------
  |  Branch (1425:12): [True: 0, False: 0]
  ------------------
 1426|      0|          failf(data, "control code detected in .netrc credentials");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1427|      0|          result = CURLE_READ_ERROR;
 1428|      0|          goto out;
 1429|      0|        }
 1430|      0|      }
 1431|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1432|      0|                 data->state.origin->hostname, ncreds_out->user);
 1433|      0|      result = Curl_creds_merge(ncreds_out->user, ncreds_out->passwd,
 1434|      0|                                *pcreds, CREDS_NETRC, pcreds);
  ------------------
  |  |   32|      0|#define CREDS_NETRC  3 /* username/passwd found in netrc */
  ------------------
 1435|      0|      if(result)
  ------------------
  |  Branch (1435:10): [True: 0, False: 0]
  ------------------
 1436|      0|        goto out;
 1437|       |      /* for updated strings, we update them in the URL */
 1438|      0|      uc = curl_url_set(data->state.uh, CURLUPART_USER,
 1439|      0|                        Curl_creds_user(*pcreds), CURLU_URLENCODE);
  ------------------
  |  |   81|      0|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (81:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                                      Curl_creds_user(*pcreds), CURLU_URLENCODE);
  ------------------
  |  |   95|      0|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
 1440|      0|      if(!uc)
  ------------------
  |  Branch (1440:10): [True: 0, False: 0]
  ------------------
 1441|      0|        uc = curl_url_set(data->state.uh, CURLUPART_PASSWORD,
 1442|      0|                          Curl_creds_passwd(*pcreds),
  ------------------
  |  |   82|      0|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (82:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1443|      0|                          CURLU_URLENCODE);
  ------------------
  |  |   95|      0|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
 1444|      0|      if(uc)
  ------------------
  |  Branch (1444:10): [True: 0, False: 0]
  ------------------
 1445|      0|        result = Curl_uc_to_curlcode(uc);
 1446|      0|    }
 1447|      0|    else
 1448|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1448:7): [Folded, False: 0]
  |  Branch (1448:7): [Folded, False: 0]
  ------------------
 1449|      0|  }
 1450|       |
 1451|  3.62k|#ifdef CURLVERBOSE
 1452|  3.62k|  Curl_creds_trace(data, data->state.creds, "transfer credentials");
 1453|  3.62k|#endif
 1454|       |
 1455|  3.62k|out:
 1456|  3.62k|  Curl_creds_unlink(&ncreds_out);
 1457|  3.62k|  return result;
 1458|  3.62k|}
url.c:url_find_or_create_conn:
 2280|  3.62k|{
 2281|  3.62k|  struct connectdata *needle = NULL;
 2282|  3.62k|  bool waitpipe = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
 2283|  3.62k|  CURLcode result;
 2284|       |
 2285|       |  /* create the template connection for transfer data. Use this needle to
 2286|       |   * find an existing connection or, if none exists, convert needle
 2287|       |   * to a full connection and attach it to data. */
 2288|  3.62k|  result = url_create_needle(data, &needle);
 2289|  3.62k|  if(result)
  ------------------
  |  Branch (2289:6): [True: 0, False: 3.62k]
  ------------------
 2290|      0|    goto out;
 2291|  3.62k|  DEBUGASSERT(needle);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2291:3): [True: 0, False: 3.62k]
  |  Branch (2291:3): [True: 3.62k, False: 0]
  ------------------
 2292|       |
 2293|       |  /***********************************************************************
 2294|       |   * file: is a special case in that it does not need a network connection
 2295|       |   ***********************************************************************/
 2296|  3.62k|#ifndef CURL_DISABLE_FILE
 2297|  3.62k|  if(needle->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  214|  3.62k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (2297:6): [True: 0, False: 3.62k]
  ------------------
 2298|      0|    bool done;
 2299|       |    /* this is supposed to be the connect function so we better at least check
 2300|       |       that the file is present here! */
 2301|      0|    DEBUGASSERT(needle->scheme->run->connect_it);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2301:5): [True: 0, False: 0]
  |  Branch (2301:5): [True: 0, False: 0]
  ------------------
 2302|      0|    data->info.conn_scheme = needle->scheme->name;
 2303|       |    /* conn_protocol can only provide "old" protocols */
 2304|      0|    data->info.conn_protocol = needle->scheme->protocol & CURLPROTO_MASK;
  ------------------
  |  |   79|      0|#define CURLPROTO_MASK   0x3fffffff
  ------------------
 2305|      0|    result = needle->scheme->run->connect_it(data, &done);
 2306|      0|    if(result)
  ------------------
  |  Branch (2306:8): [True: 0, False: 0]
  ------------------
 2307|      0|      goto out;
 2308|       |
 2309|       |    /* Setup a "faked" transfer that will do nothing */
 2310|      0|    result = Curl_cpool_add(data, needle);
 2311|      0|    Curl_attach_connection(data, needle, TRUE);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2312|      0|    needle = NULL;
 2313|      0|    if(!result) {
  ------------------
  |  Branch (2313:8): [True: 0, False: 0]
  ------------------
 2314|       |      /* Setup whatever necessary for a resumed transfer */
 2315|      0|      result = setup_range(data);
 2316|      0|      if(!result) {
  ------------------
  |  Branch (2316:10): [True: 0, False: 0]
  ------------------
 2317|      0|        Curl_xfer_setup_nop(data);
 2318|      0|        result = Curl_init_transfer(data, data->conn);
 2319|      0|      }
 2320|      0|    }
 2321|       |
 2322|      0|    if(result) {
  ------------------
  |  Branch (2322:8): [True: 0, False: 0]
  ------------------
 2323|      0|      DEBUGASSERT(data->conn->scheme->run->done);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2323:7): [True: 0, False: 0]
  |  Branch (2323:7): [True: 0, False: 0]
  ------------------
 2324|       |      /* we ignore the return code for the protocol-specific DONE */
 2325|      0|      (void)data->conn->scheme->run->done(data, result, FALSE);
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 2326|      0|    }
 2327|      0|    goto out;
 2328|      0|  }
 2329|  3.62k|#endif
 2330|       |
 2331|       |  /* Complete the easy's SSL configuration for connection cache matching */
 2332|  3.62k|  result = Curl_ssl_easy_config_complete(data, needle->origin);
 2333|  3.62k|  if(result)
  ------------------
  |  Branch (2333:6): [True: 0, False: 3.62k]
  ------------------
 2334|      0|    goto out;
 2335|       |
 2336|       |  /*************************************************************
 2337|       |   * Reuse of existing connection is not allowed when
 2338|       |   * - connect_only is set or
 2339|       |   * - reuse_fresh is set and this is not a follow-up request
 2340|       |   *   (like with HTTP followlocation)
 2341|       |   *************************************************************/
 2342|  3.62k|  if((!data->set.reuse_fresh || data->state.followlocation) &&
  ------------------
  |  Branch (2342:7): [True: 3.59k, False: 37]
  |  Branch (2342:33): [True: 0, False: 37]
  ------------------
 2343|  3.59k|     !data->set.connect_only) {
  ------------------
  |  Branch (2343:6): [True: 3.57k, False: 17]
  ------------------
 2344|       |    /* Ok, try to find and attach an existing one */
 2345|  3.57k|    url_attach_existing(data, needle, &waitpipe);
 2346|  3.57k|  }
 2347|       |
 2348|  3.62k|  if(data->conn) {
  ------------------
  |  Branch (2348:6): [True: 0, False: 3.62k]
  ------------------
 2349|       |    /* We attached an existing connection for this transfer. Copy
 2350|       |     * over transfer specific properties over from needle. */
 2351|      0|    struct connectdata *conn = data->conn;
 2352|      0|    VERBOSE(bool tls_upgraded = (!(needle->given->flags & PROTOPT_SSL) &&
  ------------------
  |  | 1611|      0|#define VERBOSE(x) x
  |  |  ------------------
  |  |  |  Branch (1611:20): [True: 0, False: 0]
  |  |  |  Branch (1611:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2353|      0|                                 Curl_conn_is_ssl(conn, FIRSTSOCKET)));
 2354|       |
 2355|      0|    conn->bits.reuse = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2356|      0|    url_conn_reuse_adjust(data, needle);
 2357|       |
 2358|      0|#ifndef CURL_DISABLE_PROXY
 2359|      0|    infof(data, "Reusing existing %s: connection%s with %s %s",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324: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]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2360|      0|          conn->given->name,
 2361|      0|          tls_upgraded ? " (upgraded to SSL)" : "",
 2362|      0|          (conn->socks_proxy.peer || conn->http_proxy.peer) ? "proxy" : "host",
 2363|      0|          conn->socks_proxy.peer ? conn->socks_proxy.peer->user_hostname :
 2364|      0|          conn->http_proxy.peer ? conn->http_proxy.peer->user_hostname :
 2365|      0|          conn->origin->hostname);
 2366|       |#else
 2367|       |    infof(data, "Reusing existing %s: connection%s with host %s",
 2368|       |          conn->given->name,
 2369|       |          tls_upgraded ? " (upgraded to SSL)" : "",
 2370|       |          conn->origin->hostname);
 2371|       |#endif
 2372|      0|  }
 2373|  3.62k|  else {
 2374|       |    /* We have decided that we want a new connection. We may not be able to do
 2375|       |       that if we have reached the limit of how many connections we are
 2376|       |       allowed to open. */
 2377|       |
 2378|  3.62k|    if(waitpipe) {
  ------------------
  |  Branch (2378:8): [True: 0, False: 3.62k]
  ------------------
 2379|       |      /* There is a connection that *might* become usable for multiplexing
 2380|       |         "soon", and we wait for that */
 2381|      0|      infof(data, "Waiting on connection to negotiate possible multiplexing.");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2382|      0|      result = CURLE_NO_CONNECTION_AVAILABLE;
 2383|      0|      goto out;
 2384|      0|    }
 2385|  3.62k|    else {
 2386|  3.62k|      switch(Curl_cpool_check_limits(data, needle, &needle->created)) {
 2387|      0|      case CPOOL_LIMIT_DEST:
  ------------------
  |  |   93|      0|#define CPOOL_LIMIT_DEST   1
  ------------------
  |  Branch (2387:7): [True: 0, False: 3.62k]
  ------------------
 2388|      0|        infof(data, "No more connections allowed to host");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2389|      0|        result = CURLE_NO_CONNECTION_AVAILABLE;
 2390|      0|        goto out;
 2391|      0|      case CPOOL_LIMIT_TOTAL:
  ------------------
  |  |   94|      0|#define CPOOL_LIMIT_TOTAL  2
  ------------------
  |  Branch (2391:7): [True: 0, False: 3.62k]
  ------------------
 2392|      0|        if(data->master_mid != UINT32_MAX)
  ------------------
  |  Branch (2392:12): [True: 0, False: 0]
  ------------------
 2393|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2394|      0|                     "max connection limit");
 2395|      0|        else {
 2396|      0|          infof(data, "No connections available, total of %zu reached.",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2397|      0|                data->multi->max_total_connections);
 2398|      0|          result = CURLE_NO_CONNECTION_AVAILABLE;
 2399|      0|          goto out;
 2400|      0|        }
 2401|      0|        break;
 2402|  3.62k|      default:
  ------------------
  |  Branch (2402:7): [True: 3.62k, False: 0]
  ------------------
 2403|  3.62k|        break;
 2404|  3.62k|      }
 2405|  3.62k|    }
 2406|       |
 2407|       |    /* Convert needle into a full connection by filling in all the
 2408|       |     * remaining parts like the cloned SSL configuration. */
 2409|  3.62k|    result = Curl_ssl_conn_config_init(data, needle);
 2410|  3.62k|    if(result) {
  ------------------
  |  Branch (2410:8): [True: 0, False: 3.62k]
  ------------------
 2411|      0|      DEBUGF(curl_mfprintf(stderr, "Error: init connection SSL config\n"));
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  ------------------
 2412|      0|      goto out;
 2413|      0|    }
 2414|       |
 2415|       |    /* Add needle to conn pool, which assigns the connection id.
 2416|       |     * Attach regardless of result, for correct handling. */
 2417|  3.62k|    result = Curl_cpool_add(data, needle);
 2418|  3.62k|    Curl_attach_connection(data, needle, TRUE);
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
 2419|  3.62k|    needle = NULL;
 2420|  3.62k|    if(result)
  ------------------
  |  Branch (2420:8): [True: 0, False: 3.62k]
  ------------------
 2421|      0|      goto out;
 2422|       |
 2423|       |#ifdef USE_NTLM
 2424|       |    /* If NTLM is requested in a part of this connection, make sure we do not
 2425|       |       assume the state is fine as this is a fresh connection and NTLM is
 2426|       |       connection based. */
 2427|       |    if((data->state.authhost.picked & CURLAUTH_NTLM) &&
 2428|       |       data->state.authhost.done) {
 2429|       |      infof(data, "NTLM picked AND auth done set, clear picked");
 2430|       |      data->state.authhost.picked = CURLAUTH_NONE;
 2431|       |      data->state.authhost.done = FALSE;
 2432|       |    }
 2433|       |
 2434|       |    if((data->state.authproxy.picked & CURLAUTH_NTLM) &&
 2435|       |       data->state.authproxy.done) {
 2436|       |      infof(data, "NTLM-proxy picked AND auth done set, clear picked");
 2437|       |      data->state.authproxy.picked = CURLAUTH_NONE;
 2438|       |      data->state.authproxy.done = FALSE;
 2439|       |    }
 2440|       |#endif
 2441|  3.62k|  }
 2442|       |
 2443|       |  /* Setup and init stuff before DO starts, in preparing for the transfer. */
 2444|  3.62k|  result = Curl_init_transfer(data, data->conn);
 2445|  3.62k|  if(result)
  ------------------
  |  Branch (2445:6): [True: 0, False: 3.62k]
  ------------------
 2446|      0|    goto out;
 2447|       |
 2448|       |  /* Setup whatever necessary for a resumed transfer */
 2449|  3.62k|  result = setup_range(data);
 2450|  3.62k|  if(result)
  ------------------
  |  Branch (2450:6): [True: 0, False: 3.62k]
  ------------------
 2451|      0|    goto out;
 2452|       |
 2453|       |  /* persist the scheme and handler the transfer is using */
 2454|  3.62k|  data->info.conn_scheme = data->conn->scheme->name;
 2455|       |  /* conn_protocol can only provide "old" protocols */
 2456|  3.62k|  data->info.conn_protocol = data->conn->scheme->protocol & CURLPROTO_MASK;
  ------------------
  |  |   79|  3.62k|#define CURLPROTO_MASK   0x3fffffff
  ------------------
 2457|  3.62k|  data->info.used_proxy =
 2458|       |#ifdef CURL_DISABLE_PROXY
 2459|       |    0
 2460|       |#else
 2461|  3.62k|    (data->conn->socks_proxy.peer || data->conn->http_proxy.peer)
  ------------------
  |  Branch (2461:6): [True: 0, False: 3.62k]
  |  Branch (2461:38): [True: 0, False: 3.62k]
  ------------------
 2462|  3.62k|#endif
 2463|  3.62k|    ;
 2464|       |
 2465|       |  /* Lastly, inform connection filters that a new transfer is attached */
 2466|  3.62k|  result = Curl_conn_ev_data_setup(data);
 2467|       |
 2468|  3.62k|out:
 2469|  3.62k|  if(needle)
  ------------------
  |  Branch (2469:6): [True: 0, False: 3.62k]
  ------------------
 2470|      0|    Curl_conn_free(data, needle);
 2471|  3.62k|  DEBUGASSERT(result || data->conn);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2471:3): [True: 3.62k, False: 0]
  |  Branch (2471:3): [True: 0, False: 0]
  |  Branch (2471:3): [True: 0, False: 3.62k]
  |  Branch (2471:3): [True: 3.62k, False: 0]
  ------------------
 2472|  3.62k|  return result;
 2473|  3.62k|}
url.c:url_create_needle:
 2042|  3.62k|{
 2043|  3.62k|  struct connectdata *needle = NULL;
 2044|  3.62k|  CURLcode result = CURLE_OK;
 2045|  3.62k|  bool network_scheme = TRUE; /* almost all are */
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
 2046|       |
 2047|       |  /* Allocate a temporary connection data struct (needle) and fill in for
 2048|       |     comparison purposes. */
 2049|  3.62k|  needle = allocate_conn(data);
 2050|  3.62k|  if(!needle) {
  ------------------
  |  Branch (2050:6): [True: 0, False: 3.62k]
  ------------------
 2051|      0|    result = CURLE_OUT_OF_MEMORY;
 2052|      0|    goto out;
 2053|      0|  }
 2054|       |
 2055|       |  /* Do the unfailable inits first, before checks that may early return */
 2056|  3.62k|  Curl_hash_init(&needle->meta_hash, 23,
 2057|  3.62k|                 Curl_hash_str, curlx_str_key_compare, conn_meta_freeentry);
 2058|       |
 2059|       |  /*************************************************************
 2060|       |   * Determine `conn->origin` and populate `data->state.up` and
 2061|       |   * other URL related properties.
 2062|       |   *************************************************************/
 2063|  3.62k|  result = url_set_conn_origin_etc(data, needle);
 2064|  3.62k|  if(result)
  ------------------
  |  Branch (2064:6): [True: 0, False: 3.62k]
  ------------------
 2065|      0|    goto out;
 2066|       |
 2067|  3.62k|  DEBUGASSERT(needle->origin);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2067:3): [True: 0, False: 3.62k]
  |  Branch (2067:3): [True: 3.62k, False: 0]
  ------------------
 2068|  3.62k|  network_scheme = !(needle->origin->scheme->flags & PROTOPT_NONETWORK);
  ------------------
  |  |  214|  3.62k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
 2069|       |
 2070|  3.62k|#ifdef USE_UNIX_SOCKETS
 2071|       |  /*************************************************************
 2072|       |   * Set UDS first. It overrides "via_peer" and proxy settings.
 2073|       |   *************************************************************/
 2074|  3.62k|  if(network_scheme && CURL_EASY_STR(data, STRING_UNIX_SOCKET_PATH)) {
  ------------------
  |  | 1228|  3.62k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  |  |  ------------------
  |  |  |  Branch (1228:3): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  |  Branch (2074:6): [True: 3.62k, False: 0]
  ------------------
 2075|      0|    result = Curl_peer_uds_create(
 2076|      0|      needle->origin->scheme, CURL_EASY_STR(data, STRING_UNIX_SOCKET_PATH),
  ------------------
  |  | 1228|      0|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
 2077|      0|      (bool)data->set.abstract_unix_socket, &needle->via_peer);
 2078|      0|    if(result)
  ------------------
  |  Branch (2078:8): [True: 0, False: 0]
  ------------------
 2079|      0|      goto out;
 2080|      0|  }
 2081|  3.62k|#endif /* USE_UNIX_SOCKETS */
 2082|       |
 2083|  3.62k|  if(network_scheme && !needle->via_peer) {
  ------------------
  |  Branch (2083:6): [True: 3.62k, False: 0]
  |  Branch (2083:24): [True: 3.62k, False: 0]
  ------------------
 2084|       |    /*************************************************************
 2085|       |     * If the `via_peer` is not already set (via UDS above),
 2086|       |     * determine if we talk to `conn->origin` directly or use
 2087|       |     * `conn->via_peer` using "connect to" and "alt-svc" properties.
 2088|       |     *************************************************************/
 2089|  3.62k|    result = url_set_conn_peer(data, needle);
 2090|  3.62k|    if(result)
  ------------------
  |  Branch (2090:8): [True: 0, False: 3.62k]
  ------------------
 2091|      0|      goto out;
 2092|  3.62k|  }
 2093|       |
 2094|       |  /*************************************************************
 2095|       |   * Check whether the host and the "connect to host" are equal.
 2096|       |   * Do this after the hostnames have been IDN-converted and
 2097|       |   * before initializing the proxy.
 2098|       |   *************************************************************/
 2099|  3.62k|  if(Curl_peer_equal(needle->origin, needle->via_peer)) {
  ------------------
  |  Branch (2099:6): [True: 0, False: 3.62k]
  ------------------
 2100|      0|    Curl_peer_unlink(&needle->via_peer);
 2101|      0|  }
 2102|       |
 2103|  3.62k|#ifndef CURL_DISABLE_PROXY
 2104|       |  /* Going via a unix socket ignores any proxy settings */
 2105|  3.62k|  if(network_scheme &&
  ------------------
  |  Branch (2105:6): [True: 3.62k, False: 0]
  ------------------
 2106|  3.62k|     (!needle->via_peer || !needle->via_peer->unix_socket)) {
  ------------------
  |  Branch (2106:7): [True: 0, False: 3.62k]
  |  Branch (2106:28): [True: 3.62k, False: 0]
  ------------------
 2107|  3.62k|    result = Curl_proxy_init_conn(data, needle);
 2108|  3.62k|    if(result)
  ------------------
  |  Branch (2108:8): [True: 0, False: 3.62k]
  ------------------
 2109|      0|      goto out;
 2110|  3.62k|  }
 2111|  3.62k|#endif /* CURL_DISABLE_PROXY */
 2112|       |
 2113|  3.62k|  result = url_set_conn_login(data, needle); /* default credentials */
 2114|  3.62k|  if(result)
  ------------------
  |  Branch (2114:6): [True: 0, False: 3.62k]
  ------------------
 2115|      0|    goto out;
 2116|       |
 2117|       |  /*************************************************************
 2118|       |   * Setup internals depending on protocol. Needs to be done after
 2119|       |   * we figured out what/if proxy to use.
 2120|       |   *************************************************************/
 2121|  3.62k|  result = setup_connection_internals(data, needle);
 2122|  3.62k|  if(result)
  ------------------
  |  Branch (2122:6): [True: 0, False: 3.62k]
  ------------------
 2123|      0|    goto out;
 2124|       |
 2125|  3.62k|  if(needle->scheme->flags & PROTOPT_ALPN) {
  ------------------
  |  |  222|  3.62k|#define PROTOPT_ALPN (1 << 8) /* set ALPN for this */
  ------------------
  |  Branch (2125:6): [True: 3.62k, False: 0]
  ------------------
 2126|       |    /* The protocol wants it, so set the bits if enabled in the easy handle
 2127|       |       (default) */
 2128|  3.62k|    if(data->set.ssl_enable_alpn)
  ------------------
  |  Branch (2128:8): [True: 3.62k, False: 0]
  ------------------
 2129|  3.62k|      needle->bits.tls_enable_alpn = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
 2130|  3.62k|  }
 2131|       |
 2132|  3.62k|  if(network_scheme) {
  ------------------
  |  Branch (2132:6): [True: 3.62k, False: 0]
  ------------------
 2133|       |    /* Setup callbacks for network connections */
 2134|  3.62k|    needle->recv[FIRSTSOCKET] = Curl_cf_recv;
  ------------------
  |  |  234|  3.62k|#define FIRSTSOCKET     0
  ------------------
 2135|  3.62k|    needle->send[FIRSTSOCKET] = Curl_cf_send;
  ------------------
  |  |  234|  3.62k|#define FIRSTSOCKET     0
  ------------------
 2136|  3.62k|    needle->recv[SECONDARYSOCKET] = Curl_cf_recv;
  ------------------
  |  |  235|  3.62k|#define SECONDARYSOCKET 1
  ------------------
 2137|  3.62k|    needle->send[SECONDARYSOCKET] = Curl_cf_send;
  ------------------
  |  |  235|  3.62k|#define SECONDARYSOCKET 1
  ------------------
 2138|  3.62k|    needle->bits.tcp_fastopen = data->set.tcp_fastopen;
 2139|  3.62k|#ifdef USE_UNIX_SOCKETS
 2140|  3.62k|    if(Curl_conn_get_first_peer(needle, FIRSTSOCKET)->unix_socket)
  ------------------
  |  |  234|  3.62k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2140:8): [True: 0, False: 3.62k]
  ------------------
 2141|      0|      needle->transport_wanted = TRNSPRT_UNIX;
  ------------------
  |  |  241|      0|#define TRNSPRT_UNIX 6
  ------------------
 2142|  3.62k|#endif
 2143|  3.62k|  }
 2144|       |
 2145|  3.62k|out:
 2146|  3.62k|  if(!result) {
  ------------------
  |  Branch (2146:6): [True: 3.62k, False: 0]
  ------------------
 2147|  3.62k|    DEBUGASSERT(needle);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2147:5): [True: 0, False: 3.62k]
  |  Branch (2147:5): [True: 3.62k, False: 0]
  ------------------
 2148|  3.62k|    DEBUGASSERT(needle->origin);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2148:5): [True: 0, False: 3.62k]
  |  Branch (2148:5): [True: 3.62k, False: 0]
  ------------------
 2149|  3.62k|    *pneedle = needle;
 2150|  3.62k|  }
 2151|      0|  else {
 2152|      0|    *pneedle = NULL;
 2153|      0|    if(needle)
  ------------------
  |  Branch (2153:8): [True: 0, False: 0]
  ------------------
 2154|      0|      Curl_conn_free(data, needle);
 2155|      0|  }
 2156|  3.62k|  return result;
 2157|  3.62k|}
url.c:allocate_conn:
 1218|  3.62k|{
 1219|  3.62k|  struct connectdata *conn = curlx_calloc(1, sizeof(struct connectdata));
  ------------------
  |  | 1473|  3.62k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1220|  3.62k|  if(!conn)
  ------------------
  |  Branch (1220:6): [True: 0, False: 3.62k]
  ------------------
 1221|      0|    return NULL;
 1222|       |
 1223|       |  /* and we setup a few fields in case we end up actually using this struct */
 1224|       |
 1225|  3.62k|  conn->sock[FIRSTSOCKET] = CURL_SOCKET_BAD;     /* no file descriptor */
  ------------------
  |  |  234|  3.62k|#define FIRSTSOCKET     0
  ------------------
                conn->sock[FIRSTSOCKET] = CURL_SOCKET_BAD;     /* no file descriptor */
  ------------------
  |  |  147|  3.62k|#define CURL_SOCKET_BAD (-1)
  ------------------
 1226|  3.62k|  conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD; /* no file descriptor */
  ------------------
  |  |  235|  3.62k|#define SECONDARYSOCKET 1
  ------------------
                conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD; /* no file descriptor */
  ------------------
  |  |  147|  3.62k|#define CURL_SOCKET_BAD (-1)
  ------------------
 1227|  3.62k|  conn->recv_idx = 0; /* default for receiving transfer data */
 1228|  3.62k|  conn->send_idx = 0; /* default for sending transfer data */
 1229|  3.62k|  conn->connection_id = -1;    /* no ID */
 1230|  3.62k|  conn->attached_xfers = 0;
 1231|       |
 1232|       |  /* Remember time this connection started */
 1233|  3.62k|  conn->lastused = conn->lastupkeep = conn->created = *Curl_pgrs_now(data);
 1234|       |
 1235|  3.62k|#ifndef CURL_DISABLE_FTP
 1236|  3.62k|  conn->bits.ftp_use_epsv = data->set.ftp_use_epsv;
 1237|  3.62k|  conn->bits.ftp_use_eprt = data->set.ftp_use_eprt;
 1238|  3.62k|#endif
 1239|  3.62k|  conn->ip_version = data->set.ipver;
 1240|  3.62k|  conn->bits.connect_only = (bool)data->set.connect_only;
 1241|  3.62k|  conn->transport_wanted = TRNSPRT_TCP; /* most of them are TCP streams */
  ------------------
  |  |  238|  3.62k|#define TRNSPRT_TCP  3
  ------------------
 1242|       |
 1243|       |  /* Store the local bind parameters that will be used for this connection */
 1244|  3.62k|  if(CURL_EASY_STR(data, STRING_DEVICE)) {
  ------------------
  |  | 1228|  3.62k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  |  |  ------------------
  |  |  |  Branch (1228:3): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
 1245|      0|    conn->localdev = curlx_strdup(CURL_EASY_STR(data, STRING_DEVICE));
  ------------------
  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1246|      0|    if(!conn->localdev)
  ------------------
  |  Branch (1246:8): [True: 0, False: 0]
  ------------------
 1247|      0|      goto error;
 1248|      0|  }
 1249|  3.62k|#ifndef CURL_DISABLE_BINDLOCAL
 1250|  3.62k|  conn->localportrange = data->set.localportrange;
 1251|  3.62k|  conn->localport = data->set.localport;
 1252|  3.62k|#endif
 1253|       |
 1254|       |  /* the close socket stuff needs to be copied to the connection struct as
 1255|       |     it may live on without (this specific) Curl_easy */
 1256|  3.62k|  conn->fclosesocket = data->set.fclosesocket;
 1257|  3.62k|  conn->closesocket_client = data->set.closesocket_client;
 1258|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
 1259|       |  conn->gssapi_delegation = data->set.gssapi_delegation;
 1260|       |#endif
 1261|  3.62k|  return conn;
 1262|      0|error:
 1263|       |
 1264|      0|  curlx_free(conn->localdev);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1265|      0|  curlx_free(conn);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1266|       |  return NULL;
 1267|  3.62k|}
url.c:url_set_conn_origin_etc:
 1552|  3.62k|{
 1553|  3.62k|  CURLcode result = CURLE_OK;
 1554|       |
 1555|  3.62k|  Curl_peer_link(&conn->origin, data->state.origin);
 1556|       |
 1557|       |  /* set the connection scheme */
 1558|  3.62k|  result = url_set_conn_scheme(data, conn, conn->origin->scheme);
 1559|  3.62k|  if(result)
  ------------------
  |  Branch (1559:6): [True: 0, False: 3.62k]
  ------------------
 1560|      0|    goto out;
 1561|       |
 1562|       |  /* set the connection options */
 1563|  3.62k|  if(CURL_EASY_STR(data, STRING_OPTIONS)) {
  ------------------
  |  | 1228|  3.62k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  |  |  ------------------
  |  |  |  Branch (1228:3): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
 1564|      0|    conn->options = curlx_strdup(CURL_EASY_STR(data, STRING_OPTIONS));
  ------------------
  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1565|      0|    if(!conn->options) {
  ------------------
  |  Branch (1565:8): [True: 0, False: 0]
  ------------------
 1566|      0|      result = CURLE_OUT_OF_MEMORY;
 1567|      0|      goto out;
 1568|      0|    }
 1569|      0|  }
 1570|  3.62k|  else if(data->state.up.options) {
  ------------------
  |  Branch (1570:11): [True: 0, False: 3.62k]
  ------------------
 1571|      0|    conn->options = curlx_strdup(data->state.up.options);
  ------------------
  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1572|      0|    if(!conn->options) {
  ------------------
  |  Branch (1572:8): [True: 0, False: 0]
  ------------------
 1573|      0|      result = CURLE_OUT_OF_MEMORY;
 1574|      0|      goto out;
 1575|      0|    }
 1576|      0|  }
 1577|       |
 1578|  3.62k|out:
 1579|  3.62k|  return result;
 1580|  3.62k|}
url.c:url_set_conn_scheme:
 1272|  3.62k|{
 1273|       |  /* URL scheme is usable for connection when it is
 1274|       |   * - allowed
 1275|       |   * - not from a redirect or an allowed redirect protocol */
 1276|  3.62k|  if(scheme->run &&
  ------------------
  |  Branch (1276:6): [True: 3.62k, False: 0]
  ------------------
 1277|  3.62k|     (data->set.allowed_protocols & scheme->protocol) &&
  ------------------
  |  Branch (1277:6): [True: 3.62k, False: 0]
  ------------------
 1278|  3.62k|     (!data->state.this_is_a_follow ||
  ------------------
  |  Branch (1278:7): [True: 3.62k, False: 0]
  ------------------
 1279|  3.62k|       (data->set.redir_protocols & scheme->protocol))) {
  ------------------
  |  Branch (1279:8): [True: 0, False: 0]
  ------------------
 1280|  3.62k|    conn->scheme = conn->given = scheme;
 1281|  3.62k|    return CURLE_OK;
 1282|  3.62k|  }
 1283|      0|  if(scheme->flags & PROTOPT_NO_TRANSFER)
  ------------------
  |  |  238|      0|#define PROTOPT_NO_TRANSFER (1 << 17) /* this protocol is not for transfers */
  ------------------
  |  Branch (1283:6): [True: 0, False: 0]
  ------------------
 1284|      0|    failf(data, "Protocol \"%s\" is not for transfers", scheme->name);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1285|      0|  else
 1286|      0|    failf(data, "Protocol \"%s\" is disabled%s", scheme->name,
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1287|      0|          data->state.this_is_a_follow ? " (in redirect)" : "");
  ------------------
  |  Branch (1287:11): [True: 0, False: 0]
  ------------------
 1288|      0|  return CURLE_UNSUPPORTED_PROTOCOL;
 1289|  3.62k|}
url.c:url_set_conn_peer:
 1857|  3.62k|{
 1858|  3.62k|  CURLcode result = CURLE_OK;
 1859|  3.62k|  struct Curl_peer *origin = conn->origin;
 1860|  3.62k|  struct Curl_peer *via_peer = NULL;
 1861|  3.62k|  struct curl_slist *conn_to_entry = data->set.connect_to;
 1862|       |
 1863|  3.62k|  DEBUGASSERT(!conn->via_peer);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1863:3): [True: 0, False: 3.62k]
  |  Branch (1863:3): [True: 3.62k, False: 0]
  ------------------
 1864|  3.62k|  Curl_peer_unlink(&conn->via_peer);
 1865|       |
 1866|  7.25k|  while(conn_to_entry && !via_peer) {
  ------------------
  |  Branch (1866:9): [True: 3.62k, False: 3.62k]
  |  Branch (1866:26): [True: 3.62k, False: 0]
  ------------------
 1867|  3.62k|    result = parse_connect_to_string(data, origin, conn_to_entry->data,
 1868|  3.62k|                                     &via_peer);
 1869|  3.62k|    if(result)
  ------------------
  |  Branch (1869:8): [True: 0, False: 3.62k]
  ------------------
 1870|      0|      return result;
 1871|  3.62k|    conn_to_entry = conn_to_entry->next;
 1872|  3.62k|  }
 1873|       |
 1874|  3.62k|#ifndef CURL_DISABLE_ALTSVC
 1875|  3.62k|  if(data->asi && !via_peer &&
  ------------------
  |  Branch (1875:6): [True: 3.62k, False: 0]
  |  Branch (1875:19): [True: 0, False: 3.62k]
  ------------------
 1876|      0|     ((conn->scheme->protocol == CURLPROTO_HTTPS) ||
  ------------------
  |  | 1089|      0|#define CURLPROTO_HTTPS   (1L << 1)
  ------------------
  |  Branch (1876:7): [True: 0, False: 0]
  ------------------
 1877|      0|#ifdef DEBUGBUILD
 1878|       |      /* allow debug builds to circumvent the HTTPS restriction */
 1879|      0|      getenv("CURL_ALTSVC_HTTP")
  ------------------
  |  Branch (1879:7): [True: 0, False: 0]
  ------------------
 1880|       |#else
 1881|       |      0
 1882|       |#endif
 1883|      0|       )) {
 1884|       |    /* no connect_to match, try alt-svc! */
 1885|      0|    enum alpnid srcalpnid = ALPN_none;
 1886|      0|    bool hit = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1887|      0|    struct altsvc *as = NULL;
 1888|      0|    int allowed_alpns = ALPN_none;
 1889|      0|    struct http_negotiation *neg = &data->state.http_neg;
 1890|      0|    bool same_dest = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1891|       |
 1892|      0|    DEBUGF(infof(data, "Alt-svc check wanted=%x, allowed=%x",
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1893|      0|                 neg->wanted, neg->allowed));
 1894|       |#ifdef USE_HTTP3
 1895|       |    if(neg->allowed & CURL_HTTP_V3x)
 1896|       |      allowed_alpns |= ALPN_h3;
 1897|       |#endif
 1898|      0|#ifdef USE_HTTP2
 1899|      0|    if(neg->allowed & CURL_HTTP_V2x)
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (1899:8): [True: 0, False: 0]
  ------------------
 1900|      0|      allowed_alpns |= ALPN_h2;
 1901|      0|#endif
 1902|      0|    if(neg->allowed & CURL_HTTP_V1x)
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (1902:8): [True: 0, False: 0]
  ------------------
 1903|      0|      allowed_alpns |= ALPN_h1;
 1904|      0|    allowed_alpns &= (int)data->asi->flags;
 1905|       |
 1906|      0|    DEBUGF(infof(data, "check Alt-Svc for host '%s'", origin->hostname));
  ------------------
  |  | 1061|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [True: 0, False: 0]
  |  |  |  Branch (1061:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1907|       |#ifdef USE_HTTP3
 1908|       |    if(!hit && (neg->wanted & CURL_HTTP_V3x)) {
 1909|       |      srcalpnid = ALPN_h3;
 1910|       |      hit = Curl_altsvc_lookup(data->asi,
 1911|       |                               origin, ALPN_h3, /* from */
 1912|       |                               &as /* to */,
 1913|       |                               allowed_alpns, &same_dest);
 1914|       |    }
 1915|       |#endif
 1916|      0|#ifdef USE_HTTP2
 1917|      0|    if(!hit && (neg->wanted & CURL_HTTP_V2x) &&
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (1917:8): [True: 0, False: 0]
  |  Branch (1917:16): [True: 0, False: 0]
  ------------------
 1918|      0|       !neg->h2_prior_knowledge) {
  ------------------
  |  Branch (1918:8): [True: 0, False: 0]
  ------------------
 1919|      0|      srcalpnid = ALPN_h2;
 1920|      0|      hit = Curl_altsvc_lookup(data->asi,
 1921|      0|                               origin, ALPN_h2, /* from */
 1922|      0|                               &as /* to */,
 1923|      0|                               allowed_alpns, &same_dest);
 1924|      0|    }
 1925|      0|#endif
 1926|      0|    if(!hit && (neg->wanted & CURL_HTTP_V1x) &&
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (1926:8): [True: 0, False: 0]
  |  Branch (1926:16): [True: 0, False: 0]
  ------------------
 1927|      0|       !neg->only_10) {
  ------------------
  |  Branch (1927:8): [True: 0, False: 0]
  ------------------
 1928|      0|      srcalpnid = ALPN_h1;
 1929|      0|      hit = Curl_altsvc_lookup(data->asi,
 1930|      0|                               origin, ALPN_h1, /* from */
 1931|      0|                               &as /* to */,
 1932|      0|                               allowed_alpns, &same_dest);
 1933|      0|    }
 1934|       |
 1935|      0|    if(hit && same_dest) {
  ------------------
  |  Branch (1935:8): [True: 0, False: 0]
  |  Branch (1935:15): [True: 0, False: 0]
  ------------------
 1936|       |      /* same destination, but more HTTPS version options */
 1937|      0|      switch(as->dst.alpnid) {
 1938|      0|      case ALPN_h1:
  ------------------
  |  Branch (1938:7): [True: 0, False: 0]
  ------------------
 1939|      0|        neg->wanted |= CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 1940|      0|        neg->preferred = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 1941|      0|        break;
 1942|      0|      case ALPN_h2:
  ------------------
  |  Branch (1942:7): [True: 0, False: 0]
  ------------------
 1943|      0|        neg->wanted |= CURL_HTTP_V2x;
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
 1944|      0|        neg->preferred = CURL_HTTP_V2x;
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
 1945|      0|        break;
 1946|      0|      case ALPN_h3:
  ------------------
  |  Branch (1946:7): [True: 0, False: 0]
  ------------------
 1947|      0|        neg->wanted |= CURL_HTTP_V3x;
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
 1948|      0|        neg->preferred = CURL_HTTP_V3x;
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
 1949|      0|        break;
 1950|      0|      default: /* should not be possible */
  ------------------
  |  Branch (1950:7): [True: 0, False: 0]
  ------------------
 1951|      0|        break;
 1952|      0|      }
 1953|      0|    }
 1954|      0|    else if(hit) {
  ------------------
  |  Branch (1954:13): [True: 0, False: 0]
  ------------------
 1955|      0|      result = Curl_peer_create(data, conn->origin->scheme,
 1956|      0|                                as->dst.host, as->dst.port,
 1957|      0|                                &via_peer);
 1958|      0|      if(result)
  ------------------
  |  Branch (1958:10): [True: 0, False: 0]
  ------------------
 1959|      0|        return result;
 1960|      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))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1961|      0|            Curl_alpnid2str(srcalpnid), origin->hostname, origin->port,
 1962|      0|            Curl_alpnid2str(as->dst.alpnid),
 1963|      0|            via_peer->hostname, via_peer->port);
 1964|      0|      conn->bits.altused = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1965|      0|      if(srcalpnid != as->dst.alpnid) {
  ------------------
  |  Branch (1965:10): [True: 0, False: 0]
  ------------------
 1966|       |        /* protocol version switch */
 1967|      0|        switch(as->dst.alpnid) {
 1968|      0|        case ALPN_h1:
  ------------------
  |  Branch (1968:9): [True: 0, False: 0]
  ------------------
 1969|      0|          neg->wanted = neg->allowed = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 1970|      0|          neg->only_10 = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1971|      0|          break;
 1972|      0|        case ALPN_h2:
  ------------------
  |  Branch (1972:9): [True: 0, False: 0]
  ------------------
 1973|      0|          neg->wanted = neg->allowed = CURL_HTTP_V2x;
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
 1974|      0|          break;
 1975|      0|        case ALPN_h3:
  ------------------
  |  Branch (1975:9): [True: 0, False: 0]
  ------------------
 1976|      0|          conn->transport_wanted = TRNSPRT_QUIC;
  ------------------
  |  |  240|      0|#define TRNSPRT_QUIC 5
  ------------------
 1977|      0|          neg->wanted = neg->allowed = CURL_HTTP_V3x;
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
 1978|      0|          break;
 1979|      0|        default: /* should not be possible */
  ------------------
  |  Branch (1979:9): [True: 0, False: 0]
  ------------------
 1980|      0|          break;
 1981|      0|        }
 1982|      0|      }
 1983|      0|    }
 1984|      0|  }
 1985|  3.62k|#endif
 1986|       |
 1987|  3.62k|  if(via_peer)
  ------------------
  |  Branch (1987:6): [True: 3.62k, False: 0]
  ------------------
 1988|  3.62k|    conn->via_peer = via_peer;
 1989|       |
 1990|  3.62k|  return result;
 1991|  3.62k|}
url.c:parse_connect_to_string:
 1797|  3.62k|{
 1798|  3.62k|  CURLcode result = CURLE_OK;
 1799|  3.62k|  const char *ptr = conn_to_line;
 1800|  3.62k|  bool host_match = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
 1801|  3.62k|  bool port_match = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
 1802|       |
 1803|  3.62k|  *pvia_dest = NULL;
 1804|       |
 1805|  3.62k|  if(*ptr == ':') {
  ------------------
  |  Branch (1805:6): [True: 3.62k, False: 0]
  ------------------
 1806|       |    /* an empty hostname always matches */
 1807|  3.62k|    host_match = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
 1808|  3.62k|    ptr++;
 1809|  3.62k|  }
 1810|      0|  else {
 1811|       |    /* check whether the URL's hostname matches. Use the URL hostname
 1812|       |     * when it was an IPv6 address. Otherwise use the connection's hostname
 1813|       |     * that has IDN conversion. */
 1814|      0|    size_t hlen = strlen(dest->hostname);
 1815|      0|    host_match = curl_strnequal(ptr, dest->hostname, hlen);
 1816|      0|    if(!host_match && (dest->user_hostname != dest->hostname)) {
  ------------------
  |  Branch (1816:8): [True: 0, False: 0]
  |  Branch (1816:23): [True: 0, False: 0]
  ------------------
 1817|       |      /* hostname was normalized, could be IPv6 or IDN */
 1818|      0|      hlen = strlen(dest->user_hostname);
 1819|      0|      host_match = curl_strnequal(ptr, dest->user_hostname, hlen);
 1820|      0|    }
 1821|      0|    host_match = host_match && ptr[hlen] == ':';
  ------------------
  |  Branch (1821:18): [True: 0, False: 0]
  |  Branch (1821:32): [True: 0, False: 0]
  ------------------
 1822|      0|    if(host_match)
  ------------------
  |  Branch (1822:8): [True: 0, False: 0]
  ------------------
 1823|      0|      ptr += hlen + 1;
 1824|      0|  }
 1825|       |
 1826|  3.62k|  if(host_match) {
  ------------------
  |  Branch (1826:6): [True: 3.62k, False: 0]
  ------------------
 1827|  3.62k|    if(*ptr == ':') {
  ------------------
  |  Branch (1827:8): [True: 3.62k, False: 0]
  ------------------
 1828|       |      /* an empty port always matches */
 1829|  3.62k|      port_match = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
 1830|  3.62k|      ptr++;
 1831|  3.62k|    }
 1832|      0|    else {
 1833|       |      /* check whether the URL's port matches */
 1834|      0|      const char *ptr_next = strchr(ptr, ':');
 1835|      0|      if(ptr_next) {
  ------------------
  |  Branch (1835:10): [True: 0, False: 0]
  ------------------
 1836|      0|        curl_off_t port_to_match;
 1837|      0|        if(!curlx_str_number(&ptr, &port_to_match, 0xffff) &&
  ------------------
  |  Branch (1837:12): [True: 0, False: 0]
  ------------------
 1838|      0|           ((uint16_t)port_to_match == dest->port)) {
  ------------------
  |  Branch (1838:12): [True: 0, False: 0]
  ------------------
 1839|      0|          port_match = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1840|      0|        }
 1841|      0|        ptr = ptr_next + 1;
 1842|      0|      }
 1843|      0|    }
 1844|  3.62k|  }
 1845|       |
 1846|  3.62k|  if(host_match && port_match && ptr && *ptr)
  ------------------
  |  Branch (1846:6): [True: 3.62k, False: 0]
  |  Branch (1846:20): [True: 3.62k, False: 0]
  |  Branch (1846:34): [True: 3.62k, False: 0]
  |  Branch (1846:41): [True: 3.62k, False: 0]
  ------------------
 1847|  3.62k|    result = Curl_peer_from_connect_to(data, dest, ptr, pvia_dest);
 1848|       |
 1849|  3.62k|  return result;
 1850|  3.62k|}
url.c:url_set_conn_login:
 1769|  3.62k|{
 1770|       |  /* If our protocol needs a password and we have none, use the defaults */
 1771|  3.62k|  if((conn->scheme->flags & PROTOPT_NEEDSPWD) && !conn->creds) {
  ------------------
  |  |  215|  3.62k|#define PROTOPT_NEEDSPWD (1 << 5)  /* needs a password, and if none is set it
  ------------------
  |  Branch (1771:6): [True: 0, False: 3.62k]
  |  Branch (1771:50): [True: 0, False: 0]
  ------------------
 1772|      0|    Curl_peer_link(&conn->creds_origin, data->state.origin);
 1773|      0|    if(data->state.creds)
  ------------------
  |  Branch (1773:8): [True: 0, False: 0]
  ------------------
 1774|      0|      Curl_creds_link(&conn->creds, data->state.creds);
 1775|      0|    else
 1776|      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"
  ------------------
 1777|      0|                               NULL, NULL, NULL, CREDS_NONE, &conn->creds);
  ------------------
  |  |   29|      0|#define CREDS_NONE   0 /* used for default username/passwd */
  ------------------
 1778|      0|  }
 1779|  3.62k|  else if(!(conn->scheme->flags & PROTOPT_CREDSPERREQUEST)) {
  ------------------
  |  |  219|  3.62k|#define PROTOPT_CREDSPERREQUEST (1 << 7) /* requires login credentials per
  ------------------
  |  Branch (1779:11): [True: 0, False: 3.62k]
  ------------------
 1780|       |    /* for protocols that do not handle credentials per request,
 1781|       |     * the connection credentials are set by the initial transfer. */
 1782|      0|    Curl_peer_link(&conn->creds_origin, data->state.origin);
 1783|      0|    Curl_creds_link(&conn->creds, data->state.creds);
 1784|      0|  }
 1785|       |
 1786|  3.62k|  return CURLE_OK;
 1787|  3.62k|}
url.c:setup_connection_internals:
 1624|  3.62k|{
 1625|  3.62k|  struct Curl_peer *peer = NULL;
 1626|  3.62k|  CURLcode result;
 1627|       |
 1628|  3.62k|  if(conn->scheme->run->setup_connection) {
  ------------------
  |  Branch (1628:6): [True: 3.62k, False: 0]
  ------------------
 1629|  3.62k|    result = conn->scheme->run->setup_connection(data, conn);
 1630|  3.62k|    if(result)
  ------------------
  |  Branch (1630:8): [True: 0, False: 3.62k]
  ------------------
 1631|      0|      return result;
 1632|  3.62k|  }
 1633|       |
 1634|       |  /* Now create the destination name */
 1635|  3.62k|  peer = Curl_conn_get_destination(conn, FIRSTSOCKET);
  ------------------
  |  |  234|  3.62k|#define FIRSTSOCKET     0
  ------------------
 1636|  3.62k|  if(!peer)
  ------------------
  |  Branch (1636:6): [True: 0, False: 3.62k]
  ------------------
 1637|      0|    return CURLE_FAILED_INIT;
 1638|       |
 1639|       |  /* IPv6 addresses with a scope_id (0 is default == global) have a
 1640|       |   * printable representation with a '%<scope_id>' suffix. */
 1641|  3.62k|  if(peer->ipv6)
  ------------------
  |  Branch (1641:6): [True: 0, False: 3.62k]
  ------------------
 1642|      0|    if(peer->scopeid)
  ------------------
  |  Branch (1642:8): [True: 0, False: 0]
  ------------------
 1643|      0|      conn->destination = curl_maprintf("[%s%%%u]:%u",
 1644|      0|        peer->hostname, peer->scopeid, peer->port);
 1645|      0|    else
 1646|      0|      conn->destination = curl_maprintf("[%s]:%u",
 1647|      0|        peer->hostname, peer->port);
 1648|  3.62k|  else
 1649|  3.62k|    conn->destination = curl_maprintf("%s:%u", peer->hostname, peer->port);
 1650|  3.62k|  if(!conn->destination)
  ------------------
  |  Branch (1650:6): [True: 0, False: 3.62k]
  ------------------
 1651|      0|    return CURLE_OUT_OF_MEMORY;
 1652|       |
 1653|  3.62k|  Curl_strntolower(conn->destination, conn->destination,
 1654|  3.62k|                   strlen(conn->destination));
 1655|       |
 1656|  3.62k|#ifdef USE_IPV6
 1657|  3.62k|  if(data->set.scope_id)
  ------------------
  |  Branch (1657:6): [True: 0, False: 3.62k]
  ------------------
 1658|      0|    conn->scope_id = data->set.scope_id;
 1659|  3.62k|  else {
 1660|  3.62k|    struct Curl_peer *first = Curl_conn_get_first_peer(conn, FIRSTSOCKET);
  ------------------
  |  |  234|  3.62k|#define FIRSTSOCKET     0
  ------------------
 1661|  3.62k|    if(!first)
  ------------------
  |  Branch (1661:8): [True: 0, False: 3.62k]
  ------------------
 1662|      0|      return CURLE_FAILED_INIT;
 1663|  3.62k|    conn->scope_id = first->scopeid;
 1664|  3.62k|  }
 1665|  3.62k|#endif
 1666|       |
 1667|  3.62k|  return CURLE_OK;
 1668|  3.62k|}
url.c:setup_range:
 1587|  3.62k|{
 1588|  3.62k|  struct UrlState *s = &data->state;
 1589|  3.62k|  s->resume_from = data->set.set_resume_from;
 1590|  3.62k|  if(s->resume_from || CURL_EASY_STR(data, STRING_SET_RANGE)) {
  ------------------
  |  | 1228|  3.57k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  |  |  ------------------
  |  |  |  Branch (1228:3): [True: 46, False: 3.52k]
  |  |  ------------------
  ------------------
  |  Branch (1590:6): [True: 55, False: 3.57k]
  ------------------
 1591|    101|    if(s->rangestringalloc)
  ------------------
  |  Branch (1591:8): [True: 0, False: 101]
  ------------------
 1592|      0|      curlx_free(s->range);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1593|       |
 1594|    101|    if(s->resume_from)
  ------------------
  |  Branch (1594:8): [True: 55, False: 46]
  ------------------
 1595|     55|      s->range = curl_maprintf("%" FMT_OFF_T "-", s->resume_from);
 1596|     46|    else
 1597|     46|      s->range = curlx_strdup(CURL_EASY_STR(data, STRING_SET_RANGE));
  ------------------
  |  | 1470|     46|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1598|       |
 1599|    101|    if(!s->range)
  ------------------
  |  Branch (1599:8): [True: 0, False: 101]
  ------------------
 1600|      0|      return CURLE_OUT_OF_MEMORY;
 1601|       |
 1602|    101|    s->rangestringalloc = TRUE;
  ------------------
  |  | 1045|    101|#define TRUE true
  ------------------
 1603|       |
 1604|       |    /* tell ourselves to fetch this range */
 1605|    101|    s->use_range = TRUE;        /* enable range download */
  ------------------
  |  | 1045|    101|#define TRUE true
  ------------------
 1606|    101|  }
 1607|  3.52k|  else
 1608|  3.52k|    s->use_range = FALSE; /* disable range download */
  ------------------
  |  | 1048|  3.52k|#define FALSE false
  ------------------
 1609|       |
 1610|  3.62k|  return CURLE_OK;
 1611|  3.62k|}
url.c:url_attach_existing:
 1162|  3.57k|{
 1163|  3.57k|  struct cpool *cpool = Curl_cpool_get_instance(data);
 1164|  3.57k|  struct url_conn_match match;
 1165|  3.57k|  bool success;
 1166|       |
 1167|  3.57k|  DEBUGASSERT(!data->conn);
  ------------------
  |  | 1075|  3.57k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1167:3): [True: 0, False: 3.57k]
  |  Branch (1167:3): [True: 3.57k, False: 0]
  ------------------
 1168|       |
 1169|  3.57k|  memset(&match, 0, sizeof(match));
 1170|  3.57k|  match.data = data;
 1171|  3.57k|  match.needle = needle;
 1172|  3.57k|  match.now = *Curl_pgrs_now(data);
 1173|  3.57k|  match.may_multiplex = xfer_may_multiplex(data, needle);
 1174|       |
 1175|  3.57k|  Curl_cpool_prune_dead(cpool, data);
 1176|       |
 1177|       |#ifdef USE_NTLM
 1178|       |  match.want_ntlm_http =
 1179|       |    (data->state.authhost.want & CURLAUTH_NTLM) &&
 1180|       |    (needle->scheme->protocol & PROTO_FAMILY_HTTP);
 1181|       |#ifndef CURL_DISABLE_PROXY
 1182|       |  match.want_proxy_ntlm_http =
 1183|       |    needle->http_proxy.creds &&
 1184|       |    (data->state.authproxy.want & CURLAUTH_NTLM) &&
 1185|       |    (needle->scheme->protocol & PROTO_FAMILY_HTTP);
 1186|       |#endif
 1187|       |#endif
 1188|       |
 1189|       |#if !defined(CURL_DISABLE_HTTP) && defined(USE_SPNEGO)
 1190|       |  match.want_nego_http =
 1191|       |    (data->state.authhost.want & CURLAUTH_NEGOTIATE) &&
 1192|       |    (needle->scheme->protocol & PROTO_FAMILY_HTTP);
 1193|       |#ifndef CURL_DISABLE_PROXY
 1194|       |  match.want_proxy_nego_http =
 1195|       |    needle->http_proxy.creds &&
 1196|       |    (data->state.authproxy.want & CURLAUTH_NEGOTIATE) &&
 1197|       |    (needle->scheme->protocol & PROTO_FAMILY_HTTP);
 1198|       |#endif
 1199|       |#endif
 1200|  3.57k|  match.require_tls = data->set.use_ssl >= CURLUSESSL_CONTROL;
  ------------------
  |  |  936|  3.57k|#define CURLUSESSL_CONTROL 2L /* SSL for the control connection or fail */
  ------------------
 1201|  3.57k|  match.may_tls = data->set.use_ssl > CURLUSESSL_NONE;
  ------------------
  |  |  934|  3.57k|#define CURLUSESSL_NONE    0L /* do not attempt to use SSL */
  ------------------
 1202|       |
 1203|       |  /* Find a connection in the pool that matches what "data + needle"
 1204|       |   * requires. If a suitable candidate is found, it is attached to "data". */
 1205|  3.57k|  success = Curl_cpool_find(data, needle->destination,
 1206|  3.57k|                            url_match_conn, url_match_result, &match);
 1207|       |
 1208|       |  /* wait_pipe is TRUE if we encounter a bundle that is undecided. There
 1209|       |   * is no matching connection then, yet. */
 1210|  3.57k|  *waitpipe = (bool)match.wait_pipe;
 1211|  3.57k|  return success;
 1212|  3.57k|}
url.c:xfer_may_multiplex:
  536|  3.57k|{
  537|  3.57k|#ifndef CURL_DISABLE_HTTP
  538|       |  /* If an HTTP protocol and multiplexing is enabled */
  539|  3.57k|  if((conn->scheme->protocol & PROTO_FAMILY_HTTP) &&
  ------------------
  |  |   84|  3.57k|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1088|  3.57k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1089|  3.57k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|  3.57k|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|  3.57k|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|  3.57k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
  |  Branch (539:6): [True: 3.57k, False: 0]
  ------------------
  540|  3.57k|     (!conn->bits.protoconnstart || !conn->bits.close)) {
  ------------------
  |  Branch (540:7): [True: 3.57k, False: 0]
  |  Branch (540:37): [True: 0, False: 0]
  ------------------
  541|       |
  542|  3.57k|    if(Curl_multiplex_wanted(data->multi) &&
  ------------------
  |  Branch (542:8): [True: 3.57k, False: 0]
  ------------------
  543|  3.57k|       (data->state.http_neg.allowed & (CURL_HTTP_V2x | CURL_HTTP_V3x)))
  ------------------
  |  |   41|  3.57k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
                     (data->state.http_neg.allowed & (CURL_HTTP_V2x | CURL_HTTP_V3x)))
  ------------------
  |  |   42|  3.57k|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  |  Branch (543:8): [True: 3.53k, False: 36]
  ------------------
  544|       |      /* allows HTTP/2 or newer */
  545|  3.53k|      return TRUE;
  ------------------
  |  | 1045|  3.53k|#define TRUE true
  ------------------
  546|  3.57k|  }
  547|       |#else
  548|       |  (void)data;
  549|       |  (void)conn;
  550|       |#endif
  551|     36|  return FALSE;
  ------------------
  |  | 1048|     36|#define FALSE false
  ------------------
  552|  3.57k|}
url.c:url_match_result:
 1127|  3.57k|{
 1128|  3.57k|  struct url_conn_match *match = userdata;
 1129|  3.57k|  if(match->found) {
  ------------------
  |  Branch (1129:6): [True: 0, False: 3.57k]
  ------------------
 1130|       |    /* Attach it now while still under lock, so the connection does
 1131|       |     * no longer appear idle and can be reaped. */
 1132|      0|    Curl_attach_connection(match->data, match->found, TRUE);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1133|      0|    return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1134|      0|  }
 1135|  3.57k|  else if(match->seen_single_use_conn && !match->seen_multiplex_conn) {
  ------------------
  |  Branch (1135:11): [True: 0, False: 3.57k]
  |  Branch (1135:42): [True: 0, False: 0]
  ------------------
 1136|       |    /* We have seen a single-use, existing connection to the destination and
 1137|       |     * no multiplexed one. It seems safe to assume that the server does
 1138|       |     * not support multiplexing. */
 1139|      0|    match->wait_pipe = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1140|      0|  }
 1141|  3.57k|  else if(match->seen_pending_conn && match->data->set.pipewait) {
  ------------------
  |  Branch (1141:11): [True: 0, False: 3.57k]
  |  Branch (1141:39): [True: 0, False: 0]
  ------------------
 1142|      0|    infof(match->data,
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1143|      0|          "Found pending candidate for reuse and CURLOPT_PIPEWAIT is set");
 1144|      0|    match->wait_pipe = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1145|      0|  }
 1146|  3.57k|  match->force_reuse = FALSE;
  ------------------
  |  | 1048|  3.57k|#define FALSE false
  ------------------
 1147|       |  return FALSE;
  ------------------
  |  | 1048|  3.57k|#define FALSE false
  ------------------
 1148|  3.57k|}

urlencode_str:
  133|  3.63k|{
  134|       |  /* we must add this with whitespace-replacing */
  135|  3.63k|  const unsigned char *iptr;
  136|  3.63k|  const unsigned char *host_sep = (const unsigned char *)url;
  137|  3.63k|  CURLcode result = CURLE_OK;
  138|       |
  139|  3.63k|  DEBUGASSERT((query >= QUERY_NO) && (query <= QUERY_YES));
  ------------------
  |  | 1075|  3.63k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (139:3): [True: 0, False: 3.63k]
  |  Branch (139:3): [True: 0, False: 0]
  |  Branch (139:3): [True: 3.63k, False: 0]
  |  Branch (139:3): [True: 3.63k, False: 0]
  ------------------
  140|       |
  141|  3.63k|  if(!relative) {
  ------------------
  |  Branch (141:6): [True: 0, False: 3.63k]
  ------------------
  142|      0|    size_t n;
  143|      0|    host_sep = (const unsigned char *)find_host_sep(url);
  144|       |
  145|       |    /* output the first piece as-is */
  146|      0|    n = (const char *)host_sep - url;
  147|      0|    result = curlx_dyn_addn(o, url, n);
  148|      0|    len -= n;
  149|      0|  }
  150|       |
  151|   256k|  for(iptr = host_sep; len && !result; iptr++, len--) {
  ------------------
  |  Branch (151:24): [True: 253k, False: 3.63k]
  |  Branch (151:31): [True: 253k, False: 0]
  ------------------
  152|   253k|    if(*iptr == ' ') {
  ------------------
  |  Branch (152:8): [True: 0, False: 253k]
  ------------------
  153|      0|      if(query != QUERY_YES)
  ------------------
  |  |   54|      0|#define QUERY_YES     4
  ------------------
  |  Branch (153:10): [True: 0, False: 0]
  ------------------
  154|      0|        result = curlx_dyn_addn(o, "%20", 3);
  155|      0|      else
  156|      0|        result = curlx_dyn_addn(o, "+", 1);
  157|      0|    }
  158|   253k|    else if((*iptr < ' ') || (*iptr >= 0x7f)) {
  ------------------
  |  Branch (158:13): [True: 0, False: 253k]
  |  Branch (158:30): [True: 53.5k, False: 199k]
  ------------------
  159|  53.5k|      unsigned char out[3] = { '%' };
  160|  53.5k|      Curl_hexbyte(&out[1], *iptr);
  161|  53.5k|      result = curlx_dyn_addn(o, out, 3);
  162|  53.5k|    }
  163|   199k|    else if(*iptr == '%' && (len >= 3) &&
  ------------------
  |  Branch (163:13): [True: 59.5k, False: 139k]
  |  Branch (163:29): [True: 59.5k, False: 14]
  ------------------
  164|  59.5k|            ISXDIGIT(iptr[1]) && ISXDIGIT(iptr[2]) &&
  ------------------
  |  |   37|   258k|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   42|   119k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 18.4k, False: 41.0k]
  |  |  |  |  |  Branch (42:38): [True: 15.4k, False: 3.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|   103k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 2.32k, False: 41.7k]
  |  |  |  |  |  Branch (27:43): [True: 842, False: 1.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  43.2k|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 2.22k, False: 41.0k]
  |  |  |  |  |  Branch (28:43): [True: 677, False: 1.54k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          ISXDIGIT(iptr[1]) && ISXDIGIT(iptr[2]) &&
  ------------------
  |  |   37|   216k|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   42|  33.8k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 13.9k, False: 3.02k]
  |  |  |  |  |  Branch (42:38): [True: 9.36k, False: 4.55k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  24.5k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 4.31k, False: 3.25k]
  |  |  |  |  |  Branch (27:43): [True: 1.02k, False: 3.29k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  6.55k|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 3.53k, False: 3.02k]
  |  |  |  |  |  Branch (28:43): [True: 229, False: 3.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  165|  10.6k|            (ISLOWER(iptr[1]) || ISLOWER(iptr[2]))) {
  ------------------
  |  |   41|  21.2k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  ------------------
  |  |  |  Branch (41:22): [True: 464, False: 10.1k]
  |  |  |  Branch (41:38): [True: 464, False: 0]
  |  |  ------------------
  ------------------
                          (ISLOWER(iptr[1]) || ISLOWER(iptr[2]))) {
  ------------------
  |  |   41|  10.1k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  ------------------
  |  |  |  Branch (41:22): [True: 570, False: 9.58k]
  |  |  |  Branch (41:38): [True: 570, False: 0]
  |  |  ------------------
  ------------------
  166|       |      /* uppercase it */
  167|  1.03k|      unsigned char hex = (unsigned char)((curlx_hexval(iptr[1]) << 4) |
  ------------------
  |  |  111|  1.03k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  168|  1.03k|                                          curlx_hexval(iptr[2]));
  ------------------
  |  |  111|  1.03k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  169|  1.03k|      unsigned char out[3] = { '%' };
  170|  1.03k|      Curl_hexbyte(&out[1], hex);
  171|  1.03k|      result = curlx_dyn_addn(o, out, 3);
  172|  1.03k|      iptr += 2;
  173|  1.03k|      len -= 2;
  174|  1.03k|    }
  175|   198k|    else {
  176|   198k|      result = curlx_dyn_addn(o, iptr, 1);
  177|   198k|      if(*iptr == '?' && (query == QUERY_NOT_YET))
  ------------------
  |  |   53|      0|#define QUERY_NOT_YET 3 /* allow to change to query */
  ------------------
  |  Branch (177:10): [True: 0, False: 198k]
  |  Branch (177:26): [True: 0, False: 0]
  ------------------
  178|      0|        query = QUERY_YES;
  ------------------
  |  |   54|      0|#define QUERY_YES     4
  ------------------
  179|   198k|    }
  180|   253k|  }
  181|       |
  182|  3.63k|  if(result)
  ------------------
  |  Branch (182:6): [True: 0, False: 3.63k]
  ------------------
  183|      0|    return cc2cu(result);
  ------------------
  |  |  108|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (108:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  184|  3.63k|  return CURLUE_OK;
  185|  3.63k|}
Curl_is_absolute_url:
  197|  7.35k|{
  198|  7.35k|  size_t i = 0;
  199|  7.35k|  DEBUGASSERT(!buf || (buflen > MAX_SCHEME_LEN));
  ------------------
  |  | 1075|  7.35k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (199:3): [True: 7.35k, False: 0]
  |  Branch (199:3): [True: 0, False: 0]
  |  Branch (199:3): [True: 3.70k, False: 3.64k]
  |  Branch (199:3): [True: 3.64k, False: 0]
  ------------------
  200|  7.35k|  (void)buflen; /* only used in debug-builds */
  201|  7.35k|  if(buf)
  ------------------
  |  Branch (201:6): [True: 3.64k, False: 3.70k]
  ------------------
  202|  3.64k|    buf[0] = 0; /* always leave a defined value in buf */
  203|       |#ifdef _WIN32
  204|       |  if(guess_scheme && STARTS_WITH_DRIVE_PREFIX(url))
  205|       |    return 0;
  206|       |#endif
  207|  7.35k|  if(ISALPHA(url[0]))
  ------------------
  |  |   36|  7.35k|#define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   41|  14.7k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:22): [True: 7.35k, False: 0]
  |  |  |  |  |  Branch (41:38): [True: 7.35k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   40|      0|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (40:22): [True: 0, False: 0]
  |  |  |  |  |  Branch (40:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  208|  36.7k|    for(i = 1; i < MAX_SCHEME_LEN; ++i) {
  ------------------
  |  |   55|  36.7k|#define MAX_SCHEME_LEN 40
  ------------------
  |  Branch (208:16): [True: 36.7k, False: 0]
  ------------------
  209|  36.7k|      char s = url[i];
  210|  36.7k|      if(s && (ISALNUM(s) || (s == '+') || (s == '-') || (s == '.'))) {
  ------------------
  |  |   39|  73.4k|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|  73.4k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 36.7k, False: 0]
  |  |  |  |  |  Branch (42:38): [True: 0, False: 36.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   41|  73.4k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:22): [True: 29.3k, False: 7.35k]
  |  |  |  |  |  Branch (41:38): [True: 29.3k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   40|  7.35k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (40:22): [True: 0, False: 7.35k]
  |  |  |  |  |  Branch (40:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (210:10): [True: 36.7k, False: 0]
  |  Branch (210:30): [True: 0, False: 7.35k]
  |  Branch (210:44): [True: 0, False: 7.35k]
  |  Branch (210:58): [True: 0, False: 7.35k]
  ------------------
  211|       |        /* RFC 3986 3.1 explains:
  212|       |           scheme      = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
  213|       |         */
  214|  29.3k|      }
  215|  7.35k|      else {
  216|  7.35k|        break;
  217|  7.35k|      }
  218|  36.7k|    }
  219|  7.35k|  if(i && (url[i] == ':') && ((url[i + 1] == '/') || !guess_scheme)) {
  ------------------
  |  Branch (219:6): [True: 7.35k, False: 0]
  |  Branch (219:11): [True: 7.35k, False: 0]
  |  Branch (219:31): [True: 7.35k, False: 0]
  |  Branch (219:54): [True: 0, False: 0]
  ------------------
  220|       |    /* If this does not guess scheme, the scheme always ends with the colon so
  221|       |       that this also detects data: URLs etc. In guessing mode, data: could
  222|       |       be the hostname "data" with a specified port number. */
  223|       |
  224|       |    /* the length of the scheme is the name part only */
  225|  7.35k|    size_t len = i;
  226|  7.35k|    if(buf) {
  ------------------
  |  Branch (226:8): [True: 3.64k, False: 3.70k]
  ------------------
  227|  3.64k|      Curl_strntolower(buf, url, i);
  228|  3.64k|      buf[i] = 0;
  229|  3.64k|    }
  230|  7.35k|    return len;
  231|  7.35k|  }
  232|      0|  return 0;
  233|  7.35k|}
Curl_junkscan:
  237|  3.69k|{
  238|  3.69k|  size_t n = strlen(url);
  239|  3.69k|  size_t i;
  240|  3.69k|  unsigned char control;
  241|  3.69k|  const unsigned char *p = (const unsigned char *)url;
  242|  3.69k|  if(n > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|  3.69k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (242:6): [True: 0, False: 3.69k]
  ------------------
  243|      0|    return CURLUE_MALFORMED_INPUT;
  244|       |
  245|  3.69k|  control = allowspace ? 0x1f : 0x20;
  ------------------
  |  Branch (245:13): [True: 10, False: 3.68k]
  ------------------
  246|   364k|  for(i = 0; i < n; i++) {
  ------------------
  |  Branch (246:14): [True: 360k, False: 3.64k]
  ------------------
  247|   360k|    if(p[i] <= control || p[i] == 127)
  ------------------
  |  Branch (247:8): [True: 41, False: 360k]
  |  Branch (247:27): [True: 0, False: 360k]
  ------------------
  248|     41|      return CURLUE_MALFORMED_INPUT;
  249|   360k|  }
  250|  3.64k|  *urllen = n;
  251|  3.64k|  return CURLUE_OK;
  252|  3.69k|}
parse_hostname_login:
  272|  3.64k|{
  273|  3.64k|  CURLUcode ures = CURLUE_OK;
  274|  3.64k|  CURLcode result;
  275|  3.64k|  char *userp = NULL;
  276|  3.64k|  char *passwdp = NULL;
  277|  3.64k|  char *optionsp = NULL;
  278|  3.64k|  const struct Curl_scheme *h = NULL;
  279|       |
  280|       |  /* At this point, we assume all the other special cases have been taken
  281|       |   * care of, so the host is at most
  282|       |   *
  283|       |   *   [user[:password][;options]]@]hostname
  284|       |   *
  285|       |   * We need somewhere to put the embedded details, so do that first.
  286|       |   */
  287|  3.64k|  const char *ptr;
  288|       |
  289|  3.64k|  DEBUGASSERT(login);
  ------------------
  |  | 1075|  3.64k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (289:3): [True: 0, False: 3.64k]
  |  Branch (289:3): [True: 3.64k, False: 0]
  ------------------
  290|       |
  291|  3.64k|  *hostname_offset = 0;
  292|  3.64k|  ptr = memchr(login, '@', len);
  293|  3.64k|  if(!ptr)
  ------------------
  |  Branch (293:6): [True: 3.64k, False: 0]
  ------------------
  294|  3.64k|    goto out;
  295|       |
  296|       |  /* We will now try to extract the
  297|       |   * possible login information in a string like:
  298|       |   * ftp://user:password@ftp.site.example:8021/README */
  299|      0|  ptr++;
  300|       |
  301|       |  /* if this is a known scheme, get some details */
  302|      0|  if(u->scheme)
  ------------------
  |  Branch (302:6): [True: 0, False: 0]
  ------------------
  303|      0|    h = Curl_get_scheme(u->scheme);
  304|       |
  305|       |  /* We could use the login information in the URL so extract it. Only parse
  306|       |     options if the handler says we should. Note that 'h' might be NULL! */
  307|      0|  result = Curl_parse_login_details(login, ptr - login - 1,
  308|      0|                                    &userp, &passwdp,
  309|      0|                                    (h && (h->flags & PROTOPT_URLOPTIONS)) ?
  ------------------
  |  |  224|      0|#define PROTOPT_URLOPTIONS (1 << 10) /* allow options part in the userinfo
  ------------------
  |  Branch (309:38): [True: 0, False: 0]
  |  Branch (309:43): [True: 0, False: 0]
  ------------------
  310|      0|                                    &optionsp : NULL);
  311|      0|  if(result) {
  ------------------
  |  Branch (311:6): [True: 0, False: 0]
  ------------------
  312|       |    /* the only possible error from Curl_parse_login_details is out of
  313|       |       memory: */
  314|      0|    ures = CURLUE_OUT_OF_MEMORY;
  315|      0|    goto out;
  316|      0|  }
  317|       |
  318|      0|  if(userp) {
  ------------------
  |  Branch (318:6): [True: 0, False: 0]
  ------------------
  319|      0|    if(flags & CURLU_DISALLOW_USER) {
  ------------------
  |  |   93|      0|#define CURLU_DISALLOW_USER (1 << 5)      /* no user+password allowed */
  ------------------
  |  Branch (319:8): [True: 0, False: 0]
  ------------------
  320|       |      /* Option DISALLOW_USER is set and URL contains username. */
  321|      0|      ures = CURLUE_USER_NOT_ALLOWED;
  322|      0|      goto out;
  323|      0|    }
  324|      0|    curlx_free(u->user);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  325|      0|    u->user = userp;
  326|      0|  }
  327|       |
  328|      0|  if(passwdp) {
  ------------------
  |  Branch (328:6): [True: 0, False: 0]
  ------------------
  329|      0|    curlx_strzero(u->password);
  330|      0|    curlx_free(u->password);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  331|      0|    u->password = passwdp;
  332|      0|  }
  333|       |
  334|      0|  if(optionsp) {
  ------------------
  |  Branch (334:6): [True: 0, False: 0]
  ------------------
  335|      0|    curlx_free(u->options);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  336|      0|    u->options = optionsp;
  337|      0|  }
  338|       |
  339|       |  /* the hostname starts at this offset */
  340|      0|  *hostname_offset = ptr - login;
  341|      0|  return CURLUE_OK;
  342|       |
  343|  3.64k|out:
  344|       |
  345|  3.64k|  curlx_free(userp);
  ------------------
  |  | 1476|  3.64k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  346|  3.64k|  curlx_strzero(passwdp);
  347|  3.64k|  curlx_free(passwdp);
  ------------------
  |  | 1476|  3.64k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  348|  3.64k|  curlx_free(optionsp);
  ------------------
  |  | 1476|  3.64k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  349|  3.64k|  curlx_safefree(u->user);
  ------------------
  |  | 1332|  3.64k|  do {                      \
  |  | 1333|  3.64k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.64k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.64k|    (ptr) = NULL;           \
  |  | 1335|  3.64k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.64k]
  |  |  ------------------
  ------------------
  350|  3.64k|  curlx_strzero(u->password);
  351|  3.64k|  curlx_safefree(u->password);
  ------------------
  |  | 1332|  3.64k|  do {                      \
  |  | 1333|  3.64k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.64k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.64k|    (ptr) = NULL;           \
  |  | 1335|  3.64k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.64k]
  |  |  ------------------
  ------------------
  352|  3.64k|  curlx_safefree(u->options);
  ------------------
  |  | 1332|  3.64k|  do {                      \
  |  | 1333|  3.64k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.64k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.64k|    (ptr) = NULL;           \
  |  | 1335|  3.64k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.64k]
  |  |  ------------------
  ------------------
  353|       |
  354|  3.64k|  return ures;
  355|      0|}
parse_port:
  362|  3.64k|{
  363|  3.64k|  const char *portptr;
  364|  3.64k|  const char *hostname = curlx_dyn_ptr(host);
  365|       |  /*
  366|       |   * Find the end of an IPv6 address on the ']' ending bracket.
  367|       |   */
  368|  3.64k|  u->portnum = 0;
  369|  3.64k|  u->port_present = FALSE;
  ------------------
  |  | 1048|  3.64k|#define FALSE false
  ------------------
  370|  3.64k|  if(hostname[0] == '[') {
  ------------------
  |  Branch (370:6): [True: 0, False: 3.64k]
  ------------------
  371|      0|    portptr = strchr(hostname, ']');
  372|      0|    if(!portptr)
  ------------------
  |  Branch (372:8): [True: 0, False: 0]
  ------------------
  373|      0|      return CURLUE_BAD_IPV6;
  374|      0|    portptr++;
  375|       |    /* this is a RFC2732-style specified IP-address */
  376|      0|    if(*portptr) {
  ------------------
  |  Branch (376:8): [True: 0, False: 0]
  ------------------
  377|      0|      if(*portptr != ':')
  ------------------
  |  Branch (377:10): [True: 0, False: 0]
  ------------------
  378|      0|        return CURLUE_BAD_PORT_NUMBER;
  379|      0|    }
  380|      0|    else
  381|      0|      portptr = NULL;
  382|      0|  }
  383|  3.64k|  else
  384|  3.64k|    portptr = strchr(hostname, ':');
  385|       |
  386|  3.64k|  if(portptr) {
  ------------------
  |  Branch (386:6): [True: 0, False: 3.64k]
  ------------------
  387|      0|    curl_off_t port;
  388|      0|    size_t keep = portptr - hostname;
  389|      0|    int rc;
  390|       |
  391|       |    /* Browser behavior adaptation. If there is a colon with no digits after,
  392|       |       cut off the name there which makes us ignore the colon and use the
  393|       |       default port. Firefox, Chrome and Safari all do that.
  394|       |
  395|       |       Do not do it if the URL has no scheme, to make something that looks like
  396|       |       a scheme not work! */
  397|      0|    curlx_dyn_setlen(host, keep);
  398|      0|    portptr++;
  399|      0|    if(!*portptr)
  ------------------
  |  Branch (399:8): [True: 0, False: 0]
  ------------------
  400|      0|      return has_scheme ? CURLUE_OK : CURLUE_BAD_PORT_NUMBER;
  ------------------
  |  Branch (400:14): [True: 0, False: 0]
  ------------------
  401|      0|    if(*portptr == '\\')
  ------------------
  |  Branch (401:8): [True: 0, False: 0]
  ------------------
  402|      0|      return CURLUE_BACKSLASH;
  403|      0|    rc = curlx_str_number(&portptr, &port, 0xffff);
  404|      0|    if(rc)
  ------------------
  |  Branch (404:8): [True: 0, False: 0]
  ------------------
  405|      0|      return CURLUE_BAD_PORT_NUMBER;
  406|      0|    else if(*portptr == '\\')
  ------------------
  |  Branch (406:13): [True: 0, False: 0]
  ------------------
  407|      0|      return CURLUE_BACKSLASH;
  408|      0|    else if(*portptr)
  ------------------
  |  Branch (408:13): [True: 0, False: 0]
  ------------------
  409|      0|      return CURLUE_BAD_PORT_NUMBER;
  410|       |
  411|      0|    u->portnum = (uint16_t)port;
  412|      0|    u->port_present = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  413|      0|  }
  414|       |
  415|  3.64k|  return CURLUE_OK;
  416|  3.64k|}
ipv4_normalize:
  525|  3.64k|{
  526|  3.64k|  bool done = FALSE;
  ------------------
  |  | 1048|  3.64k|#define FALSE false
  ------------------
  527|  3.64k|  int n = 0;
  528|  3.64k|  const char *c = curlx_dyn_ptr(host);
  529|  3.64k|  unsigned int parts[4] = { 0, 0, 0, 0 };
  530|  3.64k|  CURLcode result = CURLE_OK;
  531|       |
  532|  3.64k|  if(*c == '[')
  ------------------
  |  Branch (532:6): [True: 0, False: 3.64k]
  ------------------
  533|      0|    return HOST_IPV6;
  ------------------
  |  |   50|      0|#define HOST_IPV6    3
  ------------------
  534|       |
  535|  3.64k|  while(!done) {
  ------------------
  |  Branch (535:9): [True: 3.64k, False: 0]
  ------------------
  536|  3.64k|    int rc;
  537|  3.64k|    curl_off_t l;
  538|  3.64k|    if(*c == '0') {
  ------------------
  |  Branch (538:8): [True: 0, False: 3.64k]
  ------------------
  539|      0|      if(Curl_raw_tolower(c[1]) == 'x') {
  ------------------
  |  Branch (539:10): [True: 0, False: 0]
  ------------------
  540|      0|        c += 2; /* skip the prefix */
  541|      0|        rc = curlx_str_hex(&c, &l, UINT_MAX);
  542|      0|        if(rc)
  ------------------
  |  Branch (542:12): [True: 0, False: 0]
  ------------------
  543|      0|          return HOST_NAME;
  ------------------
  |  |   48|      0|#define HOST_NAME    1
  ------------------
  544|      0|      }
  545|      0|      else
  546|      0|        rc = curlx_str_octal(&c, &l, UINT_MAX);
  547|      0|    }
  548|  3.64k|    else
  549|  3.64k|      rc = curlx_str_number(&c, &l, UINT_MAX);
  550|       |
  551|  3.64k|    if(rc) {
  ------------------
  |  Branch (551:8): [True: 3.64k, False: 0]
  ------------------
  552|  3.64k|      if(!n || (rc != STRE_NO_NUM) || *c)
  ------------------
  |  |   36|      0|#define STRE_NO_NUM   8
  ------------------
  |  Branch (552:10): [True: 3.64k, False: 0]
  |  Branch (552:16): [True: 0, False: 0]
  |  Branch (552:39): [True: 0, False: 0]
  ------------------
  553|  3.64k|        return HOST_NAME;
  ------------------
  |  |   48|  3.64k|#define HOST_NAME    1
  ------------------
  554|      0|      n--;
  555|      0|    }
  556|      0|    else
  557|      0|      parts[n] = (unsigned int)l;
  558|       |
  559|      0|    switch(*c) {
  560|      0|    case '.':
  ------------------
  |  Branch (560:5): [True: 0, False: 0]
  ------------------
  561|      0|      if(n == 3) {
  ------------------
  |  Branch (561:10): [True: 0, False: 0]
  ------------------
  562|      0|        if(c[1])
  ------------------
  |  Branch (562:12): [True: 0, False: 0]
  ------------------
  563|       |          /* something follows this dot */
  564|      0|          return HOST_NAME;
  ------------------
  |  |   48|      0|#define HOST_NAME    1
  ------------------
  565|      0|        done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  566|      0|      }
  567|      0|      else {
  568|      0|        n++;
  569|      0|        c++;
  570|      0|      }
  571|      0|      break;
  572|       |
  573|      0|    case '\0':
  ------------------
  |  Branch (573:5): [True: 0, False: 0]
  ------------------
  574|      0|      done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  575|      0|      break;
  576|       |
  577|      0|    default:
  ------------------
  |  Branch (577:5): [True: 0, False: 0]
  ------------------
  578|      0|      return HOST_NAME;
  ------------------
  |  |   48|      0|#define HOST_NAME    1
  ------------------
  579|      0|    }
  580|      0|  }
  581|       |
  582|      0|  switch(n) {
  ------------------
  |  Branch (582:10): [True: 0, False: 0]
  ------------------
  583|      0|  case 0: /* a -- 32 bits */
  ------------------
  |  Branch (583:3): [True: 0, False: 0]
  ------------------
  584|      0|    curlx_dyn_reset(host);
  585|       |
  586|      0|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  587|      0|                            (parts[0] >> 24),
  588|      0|                            ((parts[0] >> 16) & 0xff),
  589|      0|                            ((parts[0] >> 8) & 0xff),
  590|      0|                            (parts[0] & 0xff));
  591|      0|    break;
  592|      0|  case 1: /* a.b -- 8.24 bits */
  ------------------
  |  Branch (592:3): [True: 0, False: 0]
  ------------------
  593|      0|    if((parts[0] > 0xff) || (parts[1] > 0xffffff))
  ------------------
  |  Branch (593:8): [True: 0, False: 0]
  |  Branch (593:29): [True: 0, False: 0]
  ------------------
  594|      0|      return HOST_NAME;
  ------------------
  |  |   48|      0|#define HOST_NAME    1
  ------------------
  595|      0|    curlx_dyn_reset(host);
  596|      0|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  597|      0|                            parts[0],
  598|      0|                            ((parts[1] >> 16) & 0xff),
  599|      0|                            ((parts[1] >> 8) & 0xff),
  600|      0|                            (parts[1] & 0xff));
  601|      0|    break;
  602|      0|  case 2: /* a.b.c -- 8.8.16 bits */
  ------------------
  |  Branch (602:3): [True: 0, False: 0]
  ------------------
  603|      0|    if((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xffff))
  ------------------
  |  Branch (603:8): [True: 0, False: 0]
  |  Branch (603:29): [True: 0, False: 0]
  |  Branch (603:50): [True: 0, False: 0]
  ------------------
  604|      0|      return HOST_NAME;
  ------------------
  |  |   48|      0|#define HOST_NAME    1
  ------------------
  605|      0|    curlx_dyn_reset(host);
  606|      0|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  607|      0|                            parts[0],
  608|      0|                            parts[1],
  609|      0|                            ((parts[2] >> 8) & 0xff),
  610|      0|                            (parts[2] & 0xff));
  611|      0|    break;
  612|      0|  case 3: /* a.b.c.d -- 8.8.8.8 bits */
  ------------------
  |  Branch (612:3): [True: 0, False: 0]
  ------------------
  613|      0|    if((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xff) ||
  ------------------
  |  Branch (613:8): [True: 0, False: 0]
  |  Branch (613:29): [True: 0, False: 0]
  |  Branch (613:50): [True: 0, False: 0]
  ------------------
  614|      0|       (parts[3] > 0xff))
  ------------------
  |  Branch (614:8): [True: 0, False: 0]
  ------------------
  615|      0|      return HOST_NAME;
  ------------------
  |  |   48|      0|#define HOST_NAME    1
  ------------------
  616|      0|    curlx_dyn_reset(host);
  617|      0|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  618|      0|                            parts[0],
  619|      0|                            parts[1],
  620|      0|                            parts[2],
  621|      0|                            parts[3]);
  622|      0|    break;
  623|      0|  }
  624|      0|  if(result)
  ------------------
  |  Branch (624:6): [True: 0, False: 0]
  ------------------
  625|      0|    return HOST_ERROR;
  ------------------
  |  |   47|      0|#define HOST_ERROR   (-1) /* out of memory */
  ------------------
  626|      0|  return HOST_IPV4;
  ------------------
  |  |   49|      0|#define HOST_IPV4    2
  ------------------
  627|      0|}
dedotdotify:
  794|    628|{
  795|    628|  struct dynbuf out;
  796|    628|  CURLcode result = CURLE_OK;
  797|       |
  798|       |  /* variables for leading dot checks */
  799|    628|  const char *dinput = input;
  800|    628|  size_t dlen = clen;
  801|       |
  802|    628|  *outp = NULL;
  803|    628|  if(!needs_dedotdot(input, clen))
  ------------------
  |  Branch (803:6): [True: 479, False: 149]
  ------------------
  804|    479|    return 0;
  805|       |
  806|    149|  curlx_dyn_init(&out, clen + 1);
  807|       |
  808|       |  /* if the input buffer begins with a prefix of "../" or "./", then remove
  809|       |     that prefix from the input buffer; otherwise, */
  810|    149|  if(is_dot(&dinput, &dlen)) {
  ------------------
  |  Branch (810:6): [True: 0, False: 149]
  ------------------
  811|      0|    if(ISSLASH(*dinput)) {
  ------------------
  |  |  751|      0|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (751:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  812|       |      /* one dot followed by a slash */
  813|      0|      input = dinput + 1;
  814|      0|      clen = dlen - 1;
  815|      0|    }
  816|       |
  817|       |    /* if the input buffer consists only of "." or "..", then remove
  818|       |       that from the input buffer; otherwise, */
  819|      0|    else if(is_dot(&dinput, &dlen)) {
  ------------------
  |  Branch (819:13): [True: 0, False: 0]
  ------------------
  820|      0|      if(!dlen)
  ------------------
  |  Branch (820:10): [True: 0, False: 0]
  ------------------
  821|       |        /* .. [end] */
  822|      0|        goto end;
  823|      0|      else if(ISSLASH(*dinput)) {
  ------------------
  |  |  751|      0|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (751:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  824|       |        /* ../ */
  825|      0|        input = dinput + 1;
  826|      0|        clen = dlen - 1;
  827|      0|      }
  828|      0|    }
  829|      0|  }
  830|       |
  831|   181k|  while(clen && !result) { /* until end of path content */
  ------------------
  |  Branch (831:9): [True: 181k, False: 133]
  |  Branch (831:17): [True: 181k, False: 0]
  ------------------
  832|   181k|    if(ISSLASH(*input)) {
  ------------------
  |  |  751|   181k|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (751:20): [True: 13.8k, False: 167k]
  |  |  ------------------
  ------------------
  833|  13.8k|      const char *p = &input[1];
  834|  13.8k|      size_t blen = clen - 1;
  835|       |      /* if the input buffer begins with a prefix of "/./" or "/.", where "."
  836|       |         is a complete path segment, then replace that prefix with "/" in the
  837|       |         input buffer; otherwise, */
  838|  13.8k|      if(is_dot(&p, &blen)) {
  ------------------
  |  Branch (838:10): [True: 5.81k, False: 8.02k]
  ------------------
  839|  5.81k|        if(!blen) { /* /. */
  ------------------
  |  Branch (839:12): [True: 8, False: 5.80k]
  ------------------
  840|      8|          result = curlx_dyn_addn(&out, "/", 1);
  841|      8|          break;
  842|      8|        }
  843|  5.80k|        else if(ISSLASH(*p)) { /* /./ */
  ------------------
  |  |  751|  5.80k|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (751:20): [True: 116, False: 5.68k]
  |  |  ------------------
  ------------------
  844|    116|          input = p;
  845|    116|          clen = blen;
  846|    116|          continue;
  847|    116|        }
  848|       |
  849|       |        /* if the input buffer begins with a prefix of "/../" or "/..", where
  850|       |           ".." is a complete path segment, then replace that prefix with "/"
  851|       |           in the input buffer and remove the last segment and its preceding
  852|       |           "/" (if any) from the output buffer; otherwise, */
  853|  5.68k|        else if(is_dot(&p, &blen) && (ISSLASH(*p) || !blen)) {
  ------------------
  |  |  751|  3.09k|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (751:20): [True: 1.27k, False: 273]
  |  |  ------------------
  ------------------
  |  Branch (853:17): [True: 1.54k, False: 4.14k]
  |  Branch (853:54): [True: 8, False: 265]
  ------------------
  854|       |          /* remove the last segment from the output buffer */
  855|  1.28k|          size_t len = curlx_dyn_len(&out);
  856|  1.28k|          if(len) {
  ------------------
  |  Branch (856:14): [True: 1.20k, False: 72]
  ------------------
  857|  1.20k|            const char *ptr = curlx_dyn_ptr(&out);
  858|  1.20k|            const char *last = memrchr(ptr, '/', len);
  859|  1.20k|            if(last)
  ------------------
  |  Branch (859:16): [True: 1.20k, False: 0]
  ------------------
  860|       |              /* trim the output at the slash */
  861|  1.20k|              curlx_dyn_setlen(&out, last - ptr);
  862|  1.20k|          }
  863|       |
  864|  1.28k|          if(blen) { /* /../ */
  ------------------
  |  Branch (864:14): [True: 1.27k, False: 8]
  ------------------
  865|  1.27k|            input = p;
  866|  1.27k|            clen = blen;
  867|  1.27k|            continue;
  868|  1.27k|          }
  869|      8|          result = curlx_dyn_addn(&out, "/", 1);
  870|      8|          break;
  871|  1.28k|        }
  872|  5.81k|      }
  873|  13.8k|    }
  874|       |
  875|       |    /* move the first path segment in the input buffer to the end of the
  876|       |       output buffer, including the initial "/" character (if any) and any
  877|       |       subsequent characters up to, but not including, the next "/" character
  878|       |       or the end of the input buffer. */
  879|       |
  880|   179k|    result = curlx_dyn_addn(&out, input, 1);
  881|   179k|    input++;
  882|   179k|    clen--;
  883|   179k|  }
  884|    149|end:
  885|    149|  if(!result) {
  ------------------
  |  Branch (885:6): [True: 149, False: 0]
  ------------------
  886|    149|    if(curlx_dyn_len(&out))
  ------------------
  |  Branch (886:8): [True: 149, False: 0]
  ------------------
  887|    149|      *outp = curlx_dyn_ptr(&out);
  888|      0|    else {
  889|      0|      *outp = curlx_strdup("");
  ------------------
  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  890|      0|      if(!*outp)
  ------------------
  |  Branch (890:10): [True: 0, False: 0]
  ------------------
  891|      0|        return 1;
  892|      0|    }
  893|    149|  }
  894|    149|  return result ? 1 : 0; /* success */
  ------------------
  |  Branch (894:10): [True: 0, False: 149]
  ------------------
  895|    149|}
curl_url:
 1358|  3.67k|{
 1359|  3.67k|  return curlx_calloc(1, sizeof(struct Curl_URL));
  ------------------
  |  | 1473|  3.67k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1360|  3.67k|}
curl_url_cleanup:
 1363|  11.1k|{
 1364|  11.1k|  if(u) {
  ------------------
  |  Branch (1364:6): [True: 3.67k, False: 7.47k]
  ------------------
 1365|  3.67k|    free_urlhandle(u);
 1366|  3.67k|    curlx_free(u);
  ------------------
  |  | 1476|  3.67k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1367|  3.67k|  }
 1368|  11.1k|}
curl_url_get:
 1625|  32.5k|{
 1626|  32.5k|  const char *ptr;
 1627|  32.5k|  CURLUcode ifmissing = CURLUE_UNKNOWN_PART;
 1628|  32.5k|  char portbuf[7];
 1629|  32.5k|  bool plusdecode = FALSE;
  ------------------
  |  | 1048|  32.5k|#define FALSE false
  ------------------
 1630|  32.5k|  if(!u)
  ------------------
  |  Branch (1630:6): [True: 0, False: 32.5k]
  ------------------
 1631|      0|    return CURLUE_BAD_HANDLE;
 1632|  32.5k|  if(!part)
  ------------------
  |  Branch (1632:6): [True: 0, False: 32.5k]
  ------------------
 1633|      0|    return CURLUE_BAD_PARTPOINTER;
 1634|  32.5k|  *part = NULL;
 1635|       |
 1636|  32.5k|  switch(what) {
 1637|  3.62k|  case CURLUPART_SCHEME:
  ------------------
  |  Branch (1637:3): [True: 3.62k, False: 28.9k]
  ------------------
 1638|  3.62k|    ptr = u->scheme;
 1639|  3.62k|    ifmissing = CURLUE_NO_SCHEME;
 1640|  3.62k|    flags &= ~U_CURLU_URLDECODE; /* never for schemes */
  ------------------
  |  |   63|  3.62k|#define U_CURLU_URLDECODE  (unsigned int)CURLU_URLDECODE
  |  |  ------------------
  |  |  |  |   94|  3.62k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  |  |  ------------------
  ------------------
 1641|  3.62k|    if((flags & CURLU_NO_GUESS_SCHEME) && u->guessed_scheme)
  ------------------
  |  |  106|  3.62k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
  |  Branch (1641:8): [True: 0, False: 3.62k]
  |  Branch (1641:43): [True: 0, False: 0]
  ------------------
 1642|      0|      return CURLUE_NO_SCHEME;
 1643|  3.62k|    break;
 1644|  3.62k|  case CURLUPART_USER:
  ------------------
  |  Branch (1644:3): [True: 3.59k, False: 29.0k]
  ------------------
 1645|  3.59k|    ptr = u->user;
 1646|  3.59k|    ifmissing = CURLUE_NO_USER;
 1647|  3.59k|    break;
 1648|  3.59k|  case CURLUPART_PASSWORD:
  ------------------
  |  Branch (1648:3): [True: 3.59k, False: 29.0k]
  ------------------
 1649|  3.59k|    ptr = u->password;
 1650|  3.59k|    ifmissing = CURLUE_NO_PASSWORD;
 1651|  3.59k|    break;
 1652|  3.62k|  case CURLUPART_OPTIONS:
  ------------------
  |  Branch (1652:3): [True: 3.62k, False: 28.9k]
  ------------------
 1653|  3.62k|    ptr = u->options;
 1654|  3.62k|    ifmissing = CURLUE_NO_OPTIONS;
 1655|  3.62k|    break;
 1656|  3.62k|  case CURLUPART_HOST:
  ------------------
  |  Branch (1656:3): [True: 3.62k, False: 28.9k]
  ------------------
 1657|  3.62k|    ptr = u->host;
 1658|  3.62k|    ifmissing = CURLUE_NO_HOST;
 1659|  3.62k|    break;
 1660|  3.62k|  case CURLUPART_ZONEID:
  ------------------
  |  Branch (1660:3): [True: 3.62k, False: 28.9k]
  ------------------
 1661|  3.62k|    ptr = u->zoneid;
 1662|  3.62k|    ifmissing = CURLUE_NO_ZONEID;
 1663|  3.62k|    break;
 1664|      0|  case CURLUPART_PORT:
  ------------------
  |  Branch (1664:3): [True: 0, False: 32.5k]
  ------------------
 1665|      0|    ptr = NULL;
 1666|      0|    ifmissing = CURLUE_NO_PORT;
 1667|      0|    flags &= ~U_CURLU_URLDECODE; /* never for port */
  ------------------
  |  |   63|      0|#define U_CURLU_URLDECODE  (unsigned int)CURLU_URLDECODE
  |  |  ------------------
  |  |  |  |   94|      0|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  |  |  ------------------
  ------------------
 1668|      0|    if(u->port_present) {
  ------------------
  |  Branch (1668:8): [True: 0, False: 0]
  ------------------
 1669|      0|      const struct Curl_scheme *h = u->scheme ?
  ------------------
  |  Branch (1669:37): [True: 0, False: 0]
  ------------------
 1670|      0|                                    Curl_get_scheme(u->scheme) : NULL;
 1671|       |      /* there is a stored port number, but ask to inhibit if
 1672|       |         it matches the default one for the scheme */
 1673|      0|      if(h && (h->defport == u->portnum) &&
  ------------------
  |  Branch (1673:10): [True: 0, False: 0]
  |  Branch (1673:15): [True: 0, False: 0]
  ------------------
 1674|      0|         (flags & CURLU_NO_DEFAULT_PORT)) {
  ------------------
  |  |   86|      0|#define CURLU_NO_DEFAULT_PORT (1 << 1)    /* act as if no port number was set,
  ------------------
  |  Branch (1674:10): [True: 0, False: 0]
  ------------------
 1675|      0|        ptr = NULL;
 1676|      0|      }
 1677|      0|      else {
 1678|      0|        curl_msnprintf(portbuf, sizeof(portbuf), "%u", u->portnum);
 1679|      0|        ptr = portbuf;
 1680|      0|      }
 1681|      0|    }
 1682|      0|    else if((flags & CURLU_DEFAULT_PORT) && u->scheme) {
  ------------------
  |  |   85|      0|#define CURLU_DEFAULT_PORT (1 << 0)       /* return default port number */
  ------------------
  |  Branch (1682:13): [True: 0, False: 0]
  |  Branch (1682:45): [True: 0, False: 0]
  ------------------
 1683|       |      /* there is no stored port number, but asked to deliver
 1684|       |         a default one for the scheme */
 1685|      0|      const struct Curl_scheme *h = Curl_get_scheme(u->scheme);
 1686|      0|      if(h) {
  ------------------
  |  Branch (1686:10): [True: 0, False: 0]
  ------------------
 1687|      0|        curl_msnprintf(portbuf, sizeof(portbuf), "%u", h->defport);
 1688|      0|        ptr = portbuf;
 1689|      0|      }
 1690|      0|    }
 1691|      0|    break;
 1692|  3.62k|  case CURLUPART_PATH:
  ------------------
  |  Branch (1692:3): [True: 3.62k, False: 28.9k]
  ------------------
 1693|  3.62k|    ptr = u->path;
 1694|  3.62k|    if(!ptr)
  ------------------
  |  Branch (1694:8): [True: 3.00k, False: 620]
  ------------------
 1695|  3.00k|      ptr = "/";
 1696|  3.62k|    break;
 1697|  3.62k|  case CURLUPART_QUERY:
  ------------------
  |  Branch (1697:3): [True: 3.62k, False: 28.9k]
  ------------------
 1698|  3.62k|    ptr = u->query;
 1699|  3.62k|    ifmissing = CURLUE_NO_QUERY;
 1700|  3.62k|    plusdecode = flags & CURLU_URLDECODE;
  ------------------
  |  |   94|  3.62k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
 1701|  3.62k|    if(ptr && !ptr[0] && !(flags & CURLU_GET_EMPTY))
  ------------------
  |  |  103|     29|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1701:8): [True: 91, False: 3.53k]
  |  Branch (1701:15): [True: 29, False: 62]
  |  Branch (1701:26): [True: 0, False: 29]
  ------------------
 1702|       |      /* there was a blank query and the user does not ask for it */
 1703|      0|      ptr = NULL;
 1704|  3.62k|    break;
 1705|      0|  case CURLUPART_FRAGMENT:
  ------------------
  |  Branch (1705:3): [True: 0, False: 32.5k]
  ------------------
 1706|      0|    ptr = u->fragment;
 1707|      0|    ifmissing = CURLUE_NO_FRAGMENT;
 1708|      0|    if(!ptr && u->fragment_present && flags & CURLU_GET_EMPTY)
  ------------------
  |  |  103|      0|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1708:8): [True: 0, False: 0]
  |  Branch (1708:16): [True: 0, False: 0]
  |  Branch (1708:39): [True: 0, False: 0]
  ------------------
 1709|       |      /* there was a blank fragment and the user asks for it */
 1710|      0|      ptr = "";
 1711|      0|    break;
 1712|  3.63k|  case CURLUPART_URL:
  ------------------
  |  Branch (1712:3): [True: 3.63k, False: 28.9k]
  ------------------
 1713|  3.63k|    return urlget_url(u, part, flags);
 1714|      0|  default:
  ------------------
  |  Branch (1714:3): [True: 0, False: 32.5k]
  ------------------
 1715|      0|    ptr = NULL;
 1716|      0|    break;
 1717|  32.5k|  }
 1718|  28.9k|  if(ptr)
  ------------------
  |  Branch (1718:6): [True: 10.9k, False: 17.9k]
  ------------------
 1719|  10.9k|    return urlget_format(u, what, ptr, part, plusdecode, flags);
 1720|       |
 1721|  17.9k|  return ifmissing;
 1722|  28.9k|}
curl_url_set:
 2019|  3.69k|{
 2020|  3.69k|  char **storep = NULL;
 2021|  3.69k|  bool urlencode = (flags & CURLU_URLENCODE) ? 1 : 0;
  ------------------
  |  |   95|  3.69k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (2021:20): [True: 10, False: 3.68k]
  ------------------
 2022|  3.69k|  bool plusencode = FALSE;
  ------------------
  |  | 1048|  3.69k|#define FALSE false
  ------------------
 2023|  3.69k|  bool pathmode = FALSE;
  ------------------
  |  | 1048|  3.69k|#define FALSE false
  ------------------
 2024|  3.69k|  bool leadingslash = FALSE;
  ------------------
  |  | 1048|  3.69k|#define FALSE false
  ------------------
 2025|  3.69k|  bool appendquery = FALSE;
  ------------------
  |  | 1048|  3.69k|#define FALSE false
  ------------------
 2026|  3.69k|  bool equalsencode = FALSE;
  ------------------
  |  | 1048|  3.69k|#define FALSE false
  ------------------
 2027|  3.69k|  size_t nalloc;
 2028|       |
 2029|  3.69k|  if(!u)
  ------------------
  |  Branch (2029:6): [True: 0, False: 3.69k]
  ------------------
 2030|      0|    return CURLUE_BAD_HANDLE;
 2031|  3.69k|  if(!part)
  ------------------
  |  Branch (2031:6): [True: 0, False: 3.69k]
  ------------------
 2032|       |    /* setting a part to NULL clears it */
 2033|      0|    return urlset_clear(u, what);
 2034|       |
 2035|  3.69k|  nalloc = strlen(part);
 2036|  3.69k|  if(nalloc > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|  3.69k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (2036:6): [True: 0, False: 3.69k]
  ------------------
 2037|       |    /* excessive input length */
 2038|      0|    return CURLUE_MALFORMED_INPUT;
 2039|       |
 2040|  3.69k|  switch(what) {
 2041|      0|  case CURLUPART_SCHEME: {
  ------------------
  |  Branch (2041:3): [True: 0, False: 3.69k]
  ------------------
 2042|      0|    CURLUcode status = set_url_scheme(u, part, flags);
 2043|      0|    if(status)
  ------------------
  |  Branch (2043:8): [True: 0, False: 0]
  ------------------
 2044|      0|      return status;
 2045|      0|    storep = &u->scheme;
 2046|      0|    urlencode = FALSE; /* never */
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 2047|      0|    break;
 2048|      0|  }
 2049|      0|  case CURLUPART_USER:
  ------------------
  |  Branch (2049:3): [True: 0, False: 3.69k]
  ------------------
 2050|      0|    storep = &u->user;
 2051|      0|    break;
 2052|      0|  case CURLUPART_PASSWORD:
  ------------------
  |  Branch (2052:3): [True: 0, False: 3.69k]
  ------------------
 2053|      0|    storep = &u->password;
 2054|      0|    break;
 2055|      0|  case CURLUPART_OPTIONS:
  ------------------
  |  Branch (2055:3): [True: 0, False: 3.69k]
  ------------------
 2056|      0|    storep = &u->options;
 2057|      0|    break;
 2058|      0|  case CURLUPART_HOST:
  ------------------
  |  Branch (2058:3): [True: 0, False: 3.69k]
  ------------------
 2059|      0|    storep = &u->host;
 2060|      0|    curlx_safefree(u->zoneid);
  ------------------
  |  | 1332|      0|  do {                      \
  |  | 1333|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|      0|    (ptr) = NULL;           \
  |  | 1335|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2061|      0|    break;
 2062|      0|  case CURLUPART_ZONEID:
  ------------------
  |  Branch (2062:3): [True: 0, False: 3.69k]
  ------------------
 2063|      0|    storep = &u->zoneid;
 2064|      0|    break;
 2065|      0|  case CURLUPART_PORT:
  ------------------
  |  Branch (2065:3): [True: 0, False: 3.69k]
  ------------------
 2066|      0|    return set_url_port(u, part);
 2067|      0|  case CURLUPART_PATH:
  ------------------
  |  Branch (2067:3): [True: 0, False: 3.69k]
  ------------------
 2068|      0|    pathmode = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2069|      0|    leadingslash = TRUE; /* enforce */
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2070|      0|    storep = &u->path;
 2071|      0|    break;
 2072|      0|  case CURLUPART_QUERY:
  ------------------
  |  Branch (2072:3): [True: 0, False: 3.69k]
  ------------------
 2073|      0|    plusencode = urlencode;
 2074|      0|    appendquery = (flags & CURLU_APPENDQUERY) ? 1 : 0;
  ------------------
  |  |   96|      0|#define CURLU_APPENDQUERY (1 << 8)        /* append a form style part */
  ------------------
  |  Branch (2074:19): [True: 0, False: 0]
  ------------------
 2075|      0|    equalsencode = appendquery;
 2076|      0|    storep = &u->query;
 2077|      0|    u->query_present = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2078|      0|    break;
 2079|      0|  case CURLUPART_FRAGMENT:
  ------------------
  |  Branch (2079:3): [True: 0, False: 3.69k]
  ------------------
 2080|      0|    storep = &u->fragment;
 2081|      0|    u->fragment_present = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2082|      0|    break;
 2083|  3.69k|  case CURLUPART_URL:
  ------------------
  |  Branch (2083:3): [True: 3.69k, False: 0]
  ------------------
 2084|  3.69k|    return set_url(u, part, nalloc, flags);
 2085|      0|  default:
  ------------------
  |  Branch (2085:3): [True: 0, False: 3.69k]
  ------------------
 2086|      0|    return CURLUE_UNKNOWN_PART;
 2087|  3.69k|  }
 2088|      0|  DEBUGASSERT(storep);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2088:3): [True: 0, False: 0]
  |  Branch (2088:3): [True: 0, False: 0]
  ------------------
 2089|      0|  {
 2090|      0|    const char *newp = NULL;
 2091|      0|    struct dynbuf enc;
 2092|      0|    CURLUcode status;
 2093|      0|    curlx_dyn_init(&enc, (nalloc * 3) + 1 + leadingslash);
 2094|       |
 2095|      0|    if(leadingslash && (part[0] != '/')) {
  ------------------
  |  Branch (2095:8): [True: 0, False: 0]
  |  Branch (2095:24): [True: 0, False: 0]
  ------------------
 2096|      0|      CURLcode result = curlx_dyn_addn(&enc, "/", 1);
 2097|      0|      if(result)
  ------------------
  |  Branch (2097:10): [True: 0, False: 0]
  ------------------
 2098|      0|        return cc2cu(result);
  ------------------
  |  |  108|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (108:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2099|      0|    }
 2100|      0|    if(urlencode)
  ------------------
  |  Branch (2100:8): [True: 0, False: 0]
  ------------------
 2101|      0|      status = url_encode_part(&enc, part, plusencode, pathmode, equalsencode);
 2102|      0|    else
 2103|      0|      status = url_uppercasehex_part(&enc, part);
 2104|      0|    if(!status) {
  ------------------
  |  Branch (2104:8): [True: 0, False: 0]
  ------------------
 2105|      0|      newp = curlx_dyn_ptr(&enc);
 2106|       |
 2107|      0|      if(appendquery && newp)
  ------------------
  |  Branch (2107:10): [True: 0, False: 0]
  |  Branch (2107:25): [True: 0, False: 0]
  ------------------
 2108|      0|        return url_append_query(u, &enc);
 2109|      0|      else if(what == CURLUPART_HOST)
  ------------------
  |  Branch (2109:15): [True: 0, False: 0]
  ------------------
 2110|      0|        status = url_sethost(u, &enc, urlencode, flags);
 2111|      0|    }
 2112|      0|    if(status)
  ------------------
  |  Branch (2112:8): [True: 0, False: 0]
  ------------------
 2113|      0|      return status;
 2114|       |
 2115|      0|    if(what == CURLUPART_PASSWORD)
  ------------------
  |  Branch (2115:8): [True: 0, False: 0]
  ------------------
 2116|      0|      curlx_strzero(*storep);
 2117|      0|    curlx_free(*storep);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2118|      0|    *storep = (char *)CURL_UNCONST(newp);
  ------------------
  |  |  856|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 2119|      0|  }
 2120|      0|  return CURLUE_OK;
 2121|      0|}
Curl_url_same_origin:
 2124|     10|{
 2125|     10|  const struct Curl_scheme *s = NULL;
 2126|       |
 2127|       |  /* base must be an absolute URL */
 2128|     10|  if(!base->scheme || !base->host)
  ------------------
  |  Branch (2128:6): [True: 0, False: 10]
  |  Branch (2128:23): [True: 0, False: 10]
  ------------------
 2129|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 2130|     10|  if(href->scheme && !curl_strequal(base->scheme, href->scheme))
  ------------------
  |  Branch (2130:6): [True: 10, False: 0]
  |  Branch (2130:22): [True: 10, False: 0]
  ------------------
 2131|     10|    return FALSE;
  ------------------
  |  | 1048|     10|#define FALSE false
  ------------------
 2132|      0|  if(href->host) {
  ------------------
  |  Branch (2132:6): [True: 0, False: 0]
  ------------------
 2133|      0|    if(!curl_strequal(base->host, href->host))
  ------------------
  |  Branch (2133:8): [True: 0, False: 0]
  ------------------
 2134|      0|      return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 2135|       |
 2136|      0|    if(base->port_present != href->port_present) {
  ------------------
  |  Branch (2136:8): [True: 0, False: 0]
  ------------------
 2137|       |      /* one is present, one is not */
 2138|      0|      s = Curl_get_scheme(base->scheme);
 2139|      0|      if(!s) /* Cannot match default port for unknown scheme */
  ------------------
  |  Branch (2139:10): [True: 0, False: 0]
  ------------------
 2140|      0|        return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 2141|       |      /* to match, the present one must be the default port */
 2142|      0|      if((base->port_present && (base->portnum != s->defport)) ||
  ------------------
  |  Branch (2142:11): [True: 0, False: 0]
  |  Branch (2142:33): [True: 0, False: 0]
  ------------------
 2143|      0|         (href->port_present && (href->portnum != s->defport)))
  ------------------
  |  Branch (2143:11): [True: 0, False: 0]
  |  Branch (2143:33): [True: 0, False: 0]
  ------------------
 2144|      0|        return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 2145|      0|    }
 2146|      0|    else if(base->portnum != href->portnum) /* both present or missing */
  ------------------
  |  Branch (2146:13): [True: 0, False: 0]
  ------------------
 2147|      0|      return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 2148|       |
 2149|      0|    if(!curl_strequal(base->zoneid ? base->zoneid : "",
  ------------------
  |  Branch (2149:8): [True: 0, False: 0]
  |  Branch (2149:23): [True: 0, False: 0]
  ------------------
 2150|      0|                      href->zoneid ? href->zoneid : ""))
  ------------------
  |  Branch (2150:23): [True: 0, False: 0]
  ------------------
 2151|      0|      return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 2152|      0|  }
 2153|      0|  else if(href->port_present) /* no host in href, then there must be no port */
  ------------------
  |  Branch (2153:11): [True: 0, False: 0]
  ------------------
 2154|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 2155|      0|  return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2156|      0|}
Curl_url_get_port:
 2159|  3.62k|{
 2160|  3.62k|  if(u->port_present) {
  ------------------
  |  Branch (2160:6): [True: 0, False: 3.62k]
  ------------------
 2161|      0|    *pport = u->portnum;
 2162|      0|    return CURLUE_OK;
 2163|      0|  }
 2164|  3.62k|  else if(u->scheme) {
  ------------------
  |  Branch (2164:11): [True: 3.62k, False: 0]
  ------------------
 2165|  3.62k|    const struct Curl_scheme *s = Curl_get_scheme(u->scheme);
 2166|  3.62k|    if(s && s->defport) {
  ------------------
  |  Branch (2166:8): [True: 3.62k, False: 0]
  |  Branch (2166:13): [True: 3.62k, False: 0]
  ------------------
 2167|  3.62k|      *pport = s->defport;
 2168|  3.62k|      return CURLUE_OK;
 2169|  3.62k|    }
 2170|  3.62k|  }
 2171|      0|  *pport = 0;
 2172|      0|  return CURLUE_NO_PORT;
 2173|  3.62k|}
urlapi.c:parse_authority:
  661|  3.64k|{
  662|  3.64k|  size_t offset;
  663|  3.64k|  CURLUcode uc;
  664|  3.64k|  CURLcode result;
  665|       |
  666|       |  /*
  667|       |   * Parse the login details and strip them out of the hostname.
  668|       |   */
  669|  3.64k|  uc = parse_hostname_login(u, auth, authlen, flags, &offset);
  670|  3.64k|  if(uc)
  ------------------
  |  Branch (670:6): [True: 0, False: 3.64k]
  ------------------
  671|      0|    return uc;
  672|       |
  673|  3.64k|  result = curlx_dyn_addn(host, auth + offset, authlen - offset);
  674|  3.64k|  if(result) {
  ------------------
  |  Branch (674:6): [True: 0, False: 3.64k]
  ------------------
  675|      0|    uc = cc2cu(result);
  ------------------
  |  |  108|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (108:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  676|      0|    return uc;
  677|      0|  }
  678|       |
  679|  3.64k|  uc = parse_port(u, host, has_scheme);
  680|       |
  681|  3.64k|  if(!curlx_dyn_len(host))
  ------------------
  |  Branch (681:6): [True: 0, False: 3.64k]
  ------------------
  682|       |    /* this makes no-host errors override port number problems */
  683|      0|    uc = CURLUE_NO_HOST;
  684|  3.64k|  if(!uc)
  ------------------
  |  Branch (684:6): [True: 3.64k, False: 0]
  ------------------
  685|  3.64k|    uc = urldecode_host(host);
  686|  3.64k|  if(uc)
  ------------------
  |  Branch (686:6): [True: 0, False: 3.64k]
  ------------------
  687|      0|    return uc;
  688|       |
  689|  3.64k|  switch(ipv4_normalize(host)) {
  690|      0|  case HOST_IPV4:
  ------------------
  |  |   49|      0|#define HOST_IPV4    2
  ------------------
  |  Branch (690:3): [True: 0, False: 3.64k]
  ------------------
  691|      0|    break;
  692|      0|  case HOST_IPV6:
  ------------------
  |  |   50|      0|#define HOST_IPV6    3
  ------------------
  |  Branch (692:3): [True: 0, False: 3.64k]
  ------------------
  693|      0|    uc = ipv6_parse(u, curlx_dyn_ptr(host), curlx_dyn_len(host));
  694|      0|    break;
  695|  3.64k|  case HOST_NAME:
  ------------------
  |  |   48|  3.64k|#define HOST_NAME    1
  ------------------
  |  Branch (695:3): [True: 3.64k, False: 0]
  ------------------
  696|  3.64k|    uc = hostname_check(u, curlx_dyn_ptr(host), curlx_dyn_len(host));
  697|  3.64k|    break;
  698|      0|  case HOST_ERROR:
  ------------------
  |  |   47|      0|#define HOST_ERROR   (-1) /* out of memory */
  ------------------
  |  Branch (698:3): [True: 0, False: 3.64k]
  ------------------
  699|      0|    uc = CURLUE_OUT_OF_MEMORY;
  700|      0|    break;
  701|      0|  default:
  ------------------
  |  Branch (701:3): [True: 0, False: 3.64k]
  ------------------
  702|      0|    uc = CURLUE_BAD_HOSTNAME; /* Bad IPv4 address even */
  703|      0|    break;
  704|  3.64k|  }
  705|       |
  706|  3.64k|  return uc;
  707|  3.64k|}
urlapi.c:urldecode_host:
  631|  3.64k|{
  632|  3.64k|  const char *per;
  633|  3.64k|  const char *hostname = curlx_dyn_ptr(host);
  634|  3.64k|  per = strchr(hostname, '%');
  635|  3.64k|  if(!per)
  ------------------
  |  Branch (635:6): [True: 3.64k, False: 0]
  ------------------
  636|       |    /* nothing to decode */
  637|  3.64k|    return CURLUE_OK;
  638|      0|  else {
  639|       |    /* encoded */
  640|      0|    size_t dlen;
  641|      0|    char *decoded;
  642|      0|    CURLcode result = Curl_urldecode(hostname, 0, &decoded, &dlen,
  643|      0|                                     REJECT_CTRL);
  644|      0|    if(result)
  ------------------
  |  Branch (644:8): [True: 0, False: 0]
  ------------------
  645|      0|      return CURLUE_BAD_HOSTNAME;
  646|      0|    curlx_dyn_reset(host);
  647|      0|    result = curlx_dyn_addn(host, decoded, dlen);
  648|      0|    curlx_free(decoded);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  649|      0|    if(result)
  ------------------
  |  Branch (649:8): [True: 0, False: 0]
  ------------------
  650|      0|      return cc2cu(result);
  ------------------
  |  |  108|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (108:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  651|      0|  }
  652|       |
  653|      0|  return CURLUE_OK;
  654|  3.64k|}
urlapi.c:hostname_check:
  481|  3.64k|{
  482|  3.64k|  size_t len;
  483|  3.64k|  DEBUGASSERT(hostname);
  ------------------
  |  | 1075|  3.64k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (483:3): [True: 0, False: 3.64k]
  |  Branch (483:3): [True: 3.64k, False: 0]
  ------------------
  484|       |
  485|  3.64k|  if(!hlen)
  ------------------
  |  Branch (485:6): [True: 0, False: 3.64k]
  ------------------
  486|      0|    return CURLUE_NO_HOST;
  487|  3.64k|  else if(hostname[0] == '[')
  ------------------
  |  Branch (487:11): [True: 0, False: 3.64k]
  ------------------
  488|      0|    return ipv6_parse(u, hostname, hlen);
  489|  3.64k|  else {
  490|       |    /* letters from the second string are not ok */
  491|  3.64k|    len = strcspn(hostname, HOSTNAME_INVALID_CHARS);
  ------------------
  |  |   59|  3.64k|#define HOSTNAME_INVALID_CHARS " \r\n\t/:#?!@{}[]\\$\'\"^`*<>=;,+&()%|"
  ------------------
  492|  3.64k|    if(hlen != len)
  ------------------
  |  Branch (492:8): [True: 0, False: 3.64k]
  ------------------
  493|       |      /* hostname with bad content */
  494|      0|      return CURLUE_BAD_HOSTNAME;
  495|  3.64k|    else if((hlen >= 2) &&
  ------------------
  |  Branch (495:13): [True: 3.64k, False: 0]
  ------------------
  496|  3.64k|            (hostname[hlen - 1] == '.') && (hostname[hlen - 2] == '.'))
  ------------------
  |  Branch (496:13): [True: 0, False: 3.64k]
  |  Branch (496:44): [True: 0, False: 0]
  ------------------
  497|       |      /* more than one trailing dot is not allowed */
  498|      0|      return CURLUE_BAD_HOSTNAME;
  499|  3.64k|    else if((hlen == 1) && (hostname[0] == '.'))
  ------------------
  |  Branch (499:13): [True: 0, False: 3.64k]
  |  Branch (499:28): [True: 0, False: 0]
  ------------------
  500|       |      /* a single dot alone is not allowed */
  501|      0|      return CURLUE_BAD_HOSTNAME;
  502|  3.64k|  }
  503|  3.64k|  return CURLUE_OK;
  504|  3.64k|}
urlapi.c:needs_dedotdot:
  755|    628|{
  756|       |  /* a single byte path cannot be cleaned up */
  757|    628|  if(pn < 2)
  ------------------
  |  Branch (757:6): [True: 0, False: 628]
  ------------------
  758|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  759|  81.7k|  while(pn) {
  ------------------
  |  Branch (759:9): [True: 81.2k, False: 479]
  ------------------
  760|  81.2k|    if(is_dot(&p, &pn)) {
  ------------------
  |  Branch (760:8): [True: 3.14k, False: 78.0k]
  ------------------
  761|       |      /* "./" or dot before end of string */
  762|  3.14k|      if(!pn || ISSLASH(*p))
  ------------------
  |  |  751|  3.13k|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (751:20): [True: 67, False: 3.06k]
  |  |  ------------------
  ------------------
  |  Branch (762:10): [True: 16, False: 3.13k]
  ------------------
  763|     83|        return TRUE;
  ------------------
  |  | 1045|     83|#define TRUE true
  ------------------
  764|       |      /* "../" or ".." before end of string */
  765|  3.06k|      else if(is_dot(&p, &pn) && (!pn || ISSLASH(*p)))
  ------------------
  |  |  751|    874|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (751:20): [True: 55, False: 819]
  |  |  ------------------
  ------------------
  |  Branch (765:15): [True: 885, False: 2.18k]
  |  Branch (765:35): [True: 11, False: 874]
  ------------------
  766|     66|        return TRUE;
  ------------------
  |  | 1045|     66|#define TRUE true
  ------------------
  767|  3.14k|    }
  768|  78.0k|    else {
  769|  78.0k|      p++;
  770|  78.0k|      pn--;
  771|  78.0k|    }
  772|  81.2k|  }
  773|    479|  return FALSE;
  ------------------
  |  | 1048|    479|#define FALSE false
  ------------------
  774|    628|}
urlapi.c:is_dot:
  735|   103k|{
  736|   103k|  const char *p = *str;
  737|   103k|  if(*p == '.') {
  ------------------
  |  Branch (737:6): [True: 10.5k, False: 93.4k]
  ------------------
  738|  10.5k|    (*str)++;
  739|  10.5k|    (*clen)--;
  740|  10.5k|    return TRUE;
  ------------------
  |  | 1045|  10.5k|#define TRUE true
  ------------------
  741|  10.5k|  }
  742|  93.4k|  else if((*clen >= 3) &&
  ------------------
  |  Branch (742:11): [True: 92.4k, False: 1.01k]
  ------------------
  743|  92.4k|          (p[0] == '%') && (p[1] == '2') && ((p[2] | 0x20) == 'e')) {
  ------------------
  |  Branch (743:11): [True: 30.5k, False: 61.8k]
  |  Branch (743:28): [True: 3.73k, False: 26.8k]
  |  Branch (743:45): [True: 858, False: 2.87k]
  ------------------
  744|    858|    *str += 3;
  745|    858|    *clen -= 3;
  746|    858|    return TRUE;
  ------------------
  |  | 1045|    858|#define TRUE true
  ------------------
  747|    858|  }
  748|  92.5k|  return FALSE;
  ------------------
  |  | 1048|  92.5k|#define FALSE false
  ------------------
  749|   103k|}
urlapi.c:free_urlhandle:
   73|  7.36k|{
   74|  7.36k|  curlx_free(u->scheme);
  ------------------
  |  | 1476|  7.36k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   75|  7.36k|  curlx_free(u->user);
  ------------------
  |  | 1476|  7.36k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   76|  7.36k|  curlx_strzero(u->password);
   77|  7.36k|  curlx_free(u->password);
  ------------------
  |  | 1476|  7.36k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   78|  7.36k|  curlx_free(u->options);
  ------------------
  |  | 1476|  7.36k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   79|  7.36k|  curlx_free(u->host);
  ------------------
  |  | 1476|  7.36k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   80|  7.36k|  curlx_free(u->zoneid);
  ------------------
  |  | 1476|  7.36k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   81|  7.36k|  curlx_free(u->path);
  ------------------
  |  | 1476|  7.36k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   82|  7.36k|  curlx_free(u->query);
  ------------------
  |  | 1476|  7.36k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   83|  7.36k|  curlx_free(u->fragment);
  ------------------
  |  | 1476|  7.36k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   84|  7.36k|}
urlapi.c:urlget_url:
 1511|  3.63k|{
 1512|  3.63k|  char *url;
 1513|  3.63k|  char *allochost = NULL;
 1514|  3.63k|  const char *fragmentsep =
 1515|  3.63k|    (u->fragment || (u->fragment_present && flags & CURLU_GET_EMPTY)) ?
  ------------------
  |  |  103|     34|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1515:6): [True: 34, False: 3.60k]
  |  Branch (1515:22): [True: 34, False: 3.57k]
  |  Branch (1515:45): [True: 34, False: 0]
  ------------------
 1516|  3.57k|    "#" : "";
 1517|  3.63k|  const char *querysep = ((u->query && u->query[0]) ||
  ------------------
  |  Branch (1517:28): [True: 91, False: 3.54k]
  |  Branch (1517:40): [True: 62, False: 29]
  ------------------
 1518|  3.57k|                          (u->query_present && flags & CURLU_GET_EMPTY)) ?
  ------------------
  |  |  103|     29|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1518:28): [True: 29, False: 3.54k]
  |  Branch (1518:48): [True: 29, False: 0]
  ------------------
 1519|  3.54k|    "?" : "";
 1520|  3.63k|  char portbuf[7];
 1521|  3.63k|  if(curl_strequal("file", u->scheme))
  ------------------
  |  Branch (1521:6): [True: 0, False: 3.63k]
  ------------------
 1522|      0|    return file_url(u, part, fragmentsep, querysep);
 1523|  3.63k|  else if(!u->host)
  ------------------
  |  Branch (1523:11): [True: 0, False: 3.63k]
  ------------------
 1524|      0|    return CURLUE_NO_HOST;
 1525|  3.63k|  else {
 1526|  3.63k|    const char *scheme;
 1527|  3.63k|    char *options = u->options;
 1528|  3.63k|    char *port = NULL;
 1529|  3.63k|    const struct Curl_scheme *h = NULL;
 1530|  3.63k|    char schemebuf[MAX_SCHEME_LEN + 5];
 1531|  3.63k|    if(u->scheme)
  ------------------
  |  Branch (1531:8): [True: 3.63k, False: 0]
  ------------------
 1532|  3.63k|      scheme = u->scheme;
 1533|      0|    else if(flags & CURLU_DEFAULT_SCHEME)
  ------------------
  |  |   89|      0|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
  |  Branch (1533:13): [True: 0, False: 0]
  ------------------
 1534|      0|      scheme = DEFAULT_SCHEME;
  ------------------
  |  |   70|      0|#define DEFAULT_SCHEME "https"
  ------------------
 1535|      0|    else
 1536|      0|      return CURLUE_NO_SCHEME;
 1537|       |
 1538|  3.63k|    if(u->port_present) {
  ------------------
  |  Branch (1538:8): [True: 0, False: 3.63k]
  ------------------
 1539|      0|      curl_msnprintf(portbuf, sizeof(portbuf), "%u", u->portnum);
 1540|      0|      port = portbuf;
 1541|      0|    }
 1542|       |
 1543|  3.63k|    h = Curl_get_scheme(scheme);
 1544|  3.63k|    if(h) {
  ------------------
  |  Branch (1544:8): [True: 3.63k, False: 0]
  ------------------
 1545|  3.63k|      if(!u->port_present && (flags & CURLU_DEFAULT_PORT)) {
  ------------------
  |  |   85|  3.63k|#define CURLU_DEFAULT_PORT (1 << 0)       /* return default port number */
  ------------------
  |  Branch (1545:10): [True: 3.63k, False: 0]
  |  Branch (1545:30): [True: 0, False: 3.63k]
  ------------------
 1546|       |        /* there is no stored port number, but asked to deliver a default one
 1547|       |           for the scheme */
 1548|      0|        curl_msnprintf(portbuf, sizeof(portbuf), "%u", h->defport);
 1549|      0|        port = portbuf;
 1550|      0|      }
 1551|  3.63k|      else if(u->port_present && (h->defport == u->portnum) &&
  ------------------
  |  Branch (1551:15): [True: 0, False: 3.63k]
  |  Branch (1551:34): [True: 0, False: 0]
  ------------------
 1552|      0|              (flags & CURLU_NO_DEFAULT_PORT)) {
  ------------------
  |  |   86|      0|#define CURLU_NO_DEFAULT_PORT (1 << 1)    /* act as if no port number was set,
  ------------------
  |  Branch (1552:15): [True: 0, False: 0]
  ------------------
 1553|       |        /* there is a stored port number, but asked to inhibit if it matches
 1554|       |           the default port for the scheme */
 1555|      0|        port = NULL;
 1556|      0|      }
 1557|       |
 1558|  3.63k|      if(!(h->flags & PROTOPT_URLOPTIONS))
  ------------------
  |  |  224|  3.63k|#define PROTOPT_URLOPTIONS (1 << 10) /* allow options part in the userinfo
  ------------------
  |  Branch (1558:10): [True: 3.63k, False: 0]
  ------------------
 1559|  3.63k|        options = NULL;
 1560|  3.63k|    }
 1561|       |
 1562|  3.63k|    if(u->host[0] == '[') {
  ------------------
  |  Branch (1562:8): [True: 0, False: 3.63k]
  ------------------
 1563|      0|      if(u->zoneid) {
  ------------------
  |  Branch (1563:10): [True: 0, False: 0]
  ------------------
 1564|       |        /* make it '[ host %25 zoneid ]' */
 1565|      0|        struct dynbuf enc;
 1566|      0|        size_t hostlen = strlen(u->host);
 1567|      0|        curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|      0|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1568|      0|        if(curlx_dyn_addf(&enc, "%.*s%%25%s]", (int)hostlen - 1, u->host,
  ------------------
  |  Branch (1568:12): [True: 0, False: 0]
  ------------------
 1569|      0|                          u->zoneid))
 1570|      0|          return CURLUE_OUT_OF_MEMORY;
 1571|      0|        allochost = curlx_dyn_ptr(&enc);
 1572|      0|      }
 1573|      0|    }
 1574|  3.63k|    else if(flags & CURLU_URLENCODE) {
  ------------------
  |  |   95|  3.63k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1574:13): [True: 0, False: 3.63k]
  ------------------
 1575|      0|      allochost = curl_easy_escape(NULL, u->host, 0);
 1576|      0|      if(!allochost)
  ------------------
  |  Branch (1576:10): [True: 0, False: 0]
  ------------------
 1577|      0|        return CURLUE_OUT_OF_MEMORY;
 1578|      0|    }
 1579|  3.63k|    else if(flags & CURLU_PUNYCODE) {
  ------------------
  |  |  101|  3.63k|#define CURLU_PUNYCODE (1 << 12)          /* get the hostname in punycode */
  ------------------
  |  Branch (1579:13): [True: 0, False: 3.63k]
  ------------------
 1580|      0|      if(!Curl_is_ASCII_name(u->host)) {
  ------------------
  |  Branch (1580:10): [True: 0, False: 0]
  ------------------
 1581|      0|        CURLUcode ret = host_decode(u->host, &allochost);
 1582|      0|        if(ret)
  ------------------
  |  Branch (1582:12): [True: 0, False: 0]
  ------------------
 1583|      0|          return ret;
 1584|      0|      }
 1585|      0|    }
 1586|  3.63k|    else if(flags & CURLU_PUNY2IDN) {
  ------------------
  |  |  102|  3.63k|#define CURLU_PUNY2IDN (1 << 13)          /* punycode => IDN conversion */
  ------------------
  |  Branch (1586:13): [True: 0, False: 3.63k]
  ------------------
 1587|      0|      if(Curl_is_ASCII_name(u->host)) {
  ------------------
  |  Branch (1587:10): [True: 0, False: 0]
  ------------------
 1588|      0|        CURLUcode ret = host_encode(u->host, &allochost);
 1589|      0|        if(ret)
  ------------------
  |  Branch (1589:12): [True: 0, False: 0]
  ------------------
 1590|      0|          return ret;
 1591|      0|      }
 1592|      0|    }
 1593|       |
 1594|  3.63k|    if(!(flags & CURLU_NO_GUESS_SCHEME) || !u->guessed_scheme)
  ------------------
  |  |  106|  3.63k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
  |  Branch (1594:8): [True: 3.63k, False: 0]
  |  Branch (1594:44): [True: 0, False: 0]
  ------------------
 1595|  3.63k|      curl_msnprintf(schemebuf, sizeof(schemebuf), "%s://", scheme);
 1596|      0|    else
 1597|      0|      schemebuf[0] = 0;
 1598|       |
 1599|  3.63k|    url = curl_maprintf("%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
 1600|  3.63k|                        schemebuf,
 1601|  3.63k|                        u->user ? u->user : "",
  ------------------
  |  Branch (1601:25): [True: 0, False: 3.63k]
  ------------------
 1602|  3.63k|                        u->password ? ":" : "",
  ------------------
  |  Branch (1602:25): [True: 0, False: 3.63k]
  ------------------
 1603|  3.63k|                        u->password ? u->password : "",
  ------------------
  |  Branch (1603:25): [True: 0, False: 3.63k]
  ------------------
 1604|  3.63k|                        options ? ";" : "",
  ------------------
  |  Branch (1604:25): [True: 0, False: 3.63k]
  ------------------
 1605|  3.63k|                        options ? options : "",
  ------------------
  |  Branch (1605:25): [True: 0, False: 3.63k]
  ------------------
 1606|  3.63k|                        (u->user || u->password || options) ? "@" : "",
  ------------------
  |  Branch (1606:26): [True: 0, False: 3.63k]
  |  Branch (1606:37): [True: 0, False: 3.63k]
  |  Branch (1606:52): [True: 0, False: 3.63k]
  ------------------
 1607|  3.63k|                        allochost ? allochost : u->host,
  ------------------
  |  Branch (1607:25): [True: 0, False: 3.63k]
  ------------------
 1608|  3.63k|                        port ? ":" : "",
  ------------------
  |  Branch (1608:25): [True: 0, False: 3.63k]
  ------------------
 1609|  3.63k|                        port ? port : "",
  ------------------
  |  Branch (1609:25): [True: 0, False: 3.63k]
  ------------------
 1610|  3.63k|                        u->path ? u->path : "/",
  ------------------
  |  Branch (1610:25): [True: 630, False: 3.00k]
  ------------------
 1611|  3.63k|                        querysep,
 1612|  3.63k|                        u->query ? u->query : "",
  ------------------
  |  Branch (1612:25): [True: 91, False: 3.54k]
  ------------------
 1613|  3.63k|                        fragmentsep,
 1614|  3.63k|                        u->fragment ? u->fragment : "");
  ------------------
  |  Branch (1614:25): [True: 34, False: 3.60k]
  ------------------
 1615|  3.63k|    curlx_free(allochost);
  ------------------
  |  | 1476|  3.63k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1616|  3.63k|  }
 1617|  3.63k|  if(!url)
  ------------------
  |  Branch (1617:6): [True: 0, False: 3.63k]
  ------------------
 1618|      0|    return CURLUE_OUT_OF_MEMORY;
 1619|  3.63k|  *part = url;
 1620|  3.63k|  return CURLUE_OK;
 1621|  3.63k|}
urlapi.c:urlget_format:
 1429|  10.9k|{
 1430|  10.9k|  CURLUcode uc = CURLUE_OK;
 1431|  10.9k|  size_t partlen = strlen(ptr);
 1432|  10.9k|  bool urldecode = (flags & CURLU_URLDECODE) ? 1 : 0;
  ------------------
  |  |   94|  10.9k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
  |  Branch (1432:20): [True: 0, False: 10.9k]
  ------------------
 1433|  10.9k|  bool urlencode = (flags & CURLU_URLENCODE) ? 1 : 0;
  ------------------
  |  |   95|  10.9k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1433:20): [True: 3.62k, False: 7.34k]
  ------------------
 1434|  10.9k|  bool punycode = (flags & CURLU_PUNYCODE) && (what == CURLUPART_HOST);
  ------------------
  |  |  101|  10.9k|#define CURLU_PUNYCODE (1 << 12)          /* get the hostname in punycode */
  ------------------
  |  Branch (1434:19): [True: 0, False: 10.9k]
  |  Branch (1434:47): [True: 0, False: 0]
  ------------------
 1435|  10.9k|  bool depunyfy = (flags & CURLU_PUNY2IDN) && (what == CURLUPART_HOST);
  ------------------
  |  |  102|  10.9k|#define CURLU_PUNY2IDN (1 << 13)          /* punycode => IDN conversion */
  ------------------
  |  Branch (1435:19): [True: 0, False: 10.9k]
  |  Branch (1435:47): [True: 0, False: 0]
  ------------------
 1436|  10.9k|  char *part = curlx_memdup0(ptr, partlen);
 1437|  10.9k|  *partp = NULL;
 1438|  10.9k|  if(!part)
  ------------------
  |  Branch (1438:6): [True: 0, False: 10.9k]
  ------------------
 1439|      0|    return CURLUE_OUT_OF_MEMORY;
 1440|  10.9k|  if(plusdecode) {
  ------------------
  |  Branch (1440:6): [True: 0, False: 10.9k]
  ------------------
 1441|       |    /* convert + to space */
 1442|      0|    char *plus = part;
 1443|      0|    size_t i = 0;
 1444|      0|    for(i = 0; i < partlen; ++plus, i++) {
  ------------------
  |  Branch (1444:16): [True: 0, False: 0]
  ------------------
 1445|      0|      if(*plus == '+')
  ------------------
  |  Branch (1445:10): [True: 0, False: 0]
  ------------------
 1446|      0|        *plus = ' ';
 1447|      0|    }
 1448|      0|  }
 1449|  10.9k|  if(urldecode) {
  ------------------
  |  Branch (1449:6): [True: 0, False: 10.9k]
  ------------------
 1450|      0|    char *decoded;
 1451|      0|    size_t dlen;
 1452|       |    /* this unconditional rejection of control bytes is documented API
 1453|       |       behavior */
 1454|      0|    CURLcode result = Curl_urldecode(part, partlen, &decoded, &dlen,
 1455|      0|                                     REJECT_CTRL);
 1456|      0|    curlx_free(part);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1457|      0|    if(result)
  ------------------
  |  Branch (1457:8): [True: 0, False: 0]
  ------------------
 1458|      0|      return CURLUE_URLDECODE;
 1459|      0|    part = decoded;
 1460|      0|    partlen = dlen;
 1461|      0|  }
 1462|  10.9k|  if(urlencode) {
  ------------------
  |  Branch (1462:6): [True: 3.62k, False: 7.34k]
  ------------------
 1463|  3.62k|    struct dynbuf enc;
 1464|  3.62k|    curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|  3.62k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1465|  3.62k|    uc = urlencode_str(&enc, part, partlen, TRUE, what == CURLUPART_QUERY ?
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  |  Branch (1465:51): [True: 0, False: 3.62k]
  ------------------
 1466|  3.62k|                       QUERY_YES : QUERY_NO);
  ------------------
  |  |   54|      0|#define QUERY_YES     4
  ------------------
                                     QUERY_YES : QUERY_NO);
  ------------------
  |  |   52|  7.25k|#define QUERY_NO      2
  ------------------
 1467|  3.62k|    curlx_free(part);
  ------------------
  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1468|  3.62k|    if(uc)
  ------------------
  |  Branch (1468:8): [True: 0, False: 3.62k]
  ------------------
 1469|      0|      return uc;
 1470|  3.62k|    part = curlx_dyn_ptr(&enc);
 1471|  3.62k|  }
 1472|  7.34k|  else if(punycode) {
  ------------------
  |  Branch (1472:11): [True: 0, False: 7.34k]
  ------------------
 1473|      0|    if(!Curl_is_ASCII_name(u->host)) {
  ------------------
  |  Branch (1473:8): [True: 0, False: 0]
  ------------------
 1474|      0|      char *punyversion = NULL;
 1475|      0|      uc = host_decode(part, &punyversion);
 1476|      0|      curlx_free(part);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1477|      0|      if(uc)
  ------------------
  |  Branch (1477:10): [True: 0, False: 0]
  ------------------
 1478|      0|        return uc;
 1479|      0|      part = punyversion;
 1480|      0|    }
 1481|      0|  }
 1482|  7.34k|  else if(depunyfy) {
  ------------------
  |  Branch (1482:11): [True: 0, False: 7.34k]
  ------------------
 1483|      0|    if(Curl_is_ASCII_name(u->host)) {
  ------------------
  |  Branch (1483:8): [True: 0, False: 0]
  ------------------
 1484|      0|      char *unpunified = NULL;
 1485|      0|      uc = host_encode(part, &unpunified);
 1486|      0|      curlx_free(part);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1487|      0|      if(uc)
  ------------------
  |  Branch (1487:10): [True: 0, False: 0]
  ------------------
 1488|      0|        return uc;
 1489|      0|      part = unpunified;
 1490|      0|    }
 1491|      0|  }
 1492|  10.9k|  *partp = part;
 1493|  10.9k|  return CURLUE_OK;
 1494|  10.9k|}
urlapi.c:set_url:
 1771|  3.69k|{
 1772|       |  /*
 1773|       |   * Allow a new URL to replace the existing (if any) contents.
 1774|       |   *
 1775|       |   * If the existing contents is enough for a URL, allow a relative URL to
 1776|       |   * replace it.
 1777|       |   */
 1778|  3.69k|  CURLUcode uc;
 1779|  3.69k|  char *oldurl = NULL;
 1780|       |
 1781|  3.69k|  if(!part_size) {
  ------------------
  |  Branch (1781:6): [True: 0, False: 3.69k]
  ------------------
 1782|       |    /* a blank URL is not a valid URL unless we already have a complete one
 1783|       |       and this is a redirect */
 1784|      0|    uc = curl_url_get(u, CURLUPART_URL, &oldurl, flags);
 1785|      0|    if(!uc) {
  ------------------
  |  Branch (1785:8): [True: 0, False: 0]
  ------------------
 1786|       |      /* success, meaning the "" is a fine relative URL, and the new URL
 1787|       |         inherits scheme/authority/path/query, but not fragment, from the
 1788|       |         existing URL (RFC 3986 section 5.2.2) */
 1789|      0|      curlx_safefree(u->fragment);
  ------------------
  |  | 1332|      0|  do {                      \
  |  | 1333|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|      0|    (ptr) = NULL;           \
  |  | 1335|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1790|      0|      u->fragment_present = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1791|      0|      curlx_free(oldurl);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1792|      0|      return CURLUE_OK;
 1793|      0|    }
 1794|      0|    if(uc == CURLUE_OUT_OF_MEMORY)
  ------------------
  |  Branch (1794:8): [True: 0, False: 0]
  ------------------
 1795|      0|      return uc;
 1796|      0|    return CURLUE_MALFORMED_INPUT;
 1797|      0|  }
 1798|       |
 1799|       |  /* if the new URL is absolute replace the existing with the new. */
 1800|  3.69k|  if(Curl_is_absolute_url(url, NULL, 0,
  ------------------
  |  Branch (1800:6): [True: 3.69k, False: 0]
  ------------------
 1801|  3.69k|                          flags & (CURLU_GUESS_SCHEME | CURLU_DEFAULT_SCHEME)))
  ------------------
  |  |   97|  3.69k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
                                        flags & (CURLU_GUESS_SCHEME | CURLU_DEFAULT_SCHEME)))
  ------------------
  |  |   89|  3.69k|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
 1802|  3.69k|    return parseurl_and_replace(url, u, flags);
 1803|       |
 1804|       |  /* if the old URL is incomplete (we cannot get an absolute URL in
 1805|       |     'oldurl'), replace the existing with the new.
 1806|       |     Always include "scheme://" to make the URL "complete" */
 1807|       |  /* Preserve empty query/fragment separators: they affect where relative
 1808|       |     references splice into the base URL. */
 1809|      0|  uc = curl_url_get(u, CURLUPART_URL, &oldurl,
 1810|      0|                    (flags & ~CURLU_NO_GUESS_SCHEME) | CURLU_GET_EMPTY);
  ------------------
  |  |  106|      0|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
                                  (flags & ~CURLU_NO_GUESS_SCHEME) | CURLU_GET_EMPTY);
  ------------------
  |  |  103|      0|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
 1811|      0|  if(uc == CURLUE_OUT_OF_MEMORY)
  ------------------
  |  Branch (1811:6): [True: 0, False: 0]
  ------------------
 1812|      0|    return uc;
 1813|      0|  else if(uc)
  ------------------
  |  Branch (1813:11): [True: 0, False: 0]
  ------------------
 1814|      0|    return parseurl_and_replace(url, u, flags);
 1815|       |
 1816|      0|  DEBUGASSERT(oldurl); /* it is set here */
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1816:3): [True: 0, False: 0]
  |  Branch (1816:3): [True: 0, False: 0]
  ------------------
 1817|       |  /* apply the relative part to create a new URL */
 1818|      0|  uc = redirect_url(oldurl, url, u, flags);
 1819|      0|  curlx_free(oldurl);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1820|      0|  return uc;
 1821|      0|}
urlapi.c:parseurl_and_replace:
 1264|  3.69k|{
 1265|  3.69k|  CURLUcode ures;
 1266|  3.69k|  CURLU tmpurl;
 1267|  3.69k|  memset(&tmpurl, 0, sizeof(tmpurl));
 1268|  3.69k|  ures = parseurl(url, &tmpurl, flags);
 1269|  3.69k|  if(!ures) {
  ------------------
  |  Branch (1269:6): [True: 3.64k, False: 41]
  ------------------
 1270|  3.64k|    free_urlhandle(u);
 1271|  3.64k|    *u = tmpurl;
 1272|  3.64k|  }
 1273|  3.69k|  return ures;
 1274|  3.69k|}
urlapi.c:parseurl:
 1174|  3.69k|{
 1175|  3.69k|  const char *path;
 1176|  3.69k|  size_t pathlen;
 1177|  3.69k|  char schemebuf[MAX_SCHEME_LEN + 1];
 1178|  3.69k|  size_t schemelen = 0;
 1179|  3.69k|  size_t urllen;
 1180|  3.69k|  CURLUcode ures = CURLUE_OK;
 1181|  3.69k|  struct dynbuf host;
 1182|  3.69k|  bool is_file = FALSE;
  ------------------
  |  | 1048|  3.69k|#define FALSE false
  ------------------
 1183|       |
 1184|  3.69k|  DEBUGASSERT(url);
  ------------------
  |  | 1075|  3.69k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1184:3): [True: 0, False: 3.69k]
  |  Branch (1184:3): [True: 3.69k, False: 0]
  ------------------
 1185|       |
 1186|  3.69k|  curlx_dyn_init(&host, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|  3.69k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1187|       |
 1188|  3.69k|  ures = Curl_junkscan(url, &urllen, !!(flags & CURLU_ALLOW_SPACE));
  ------------------
  |  |  100|  3.69k|#define CURLU_ALLOW_SPACE (1 << 11)       /* Allow spaces in the URL */
  ------------------
 1189|  3.69k|  if(ures)
  ------------------
  |  Branch (1189:6): [True: 41, False: 3.64k]
  ------------------
 1190|     41|    goto fail;
 1191|       |
 1192|  3.64k|  schemelen = Curl_is_absolute_url(url, schemebuf, sizeof(schemebuf),
 1193|  3.64k|                                   flags & (CURLU_GUESS_SCHEME |
  ------------------
  |  |   97|  3.64k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
 1194|  3.64k|                                            CURLU_DEFAULT_SCHEME));
  ------------------
  |  |   89|  3.64k|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
 1195|       |
 1196|       |  /* handle the file: scheme */
 1197|  3.64k|  if(schemelen && !strcmp(schemebuf, "file")) {
  ------------------
  |  Branch (1197:6): [True: 3.64k, False: 0]
  |  Branch (1197:19): [True: 0, False: 3.64k]
  ------------------
 1198|      0|    is_file = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1199|      0|    ures = parse_file(url, urllen, u, &path, &pathlen);
 1200|      0|  }
 1201|  3.64k|  else {
 1202|  3.64k|    const char *hostp = NULL;
 1203|  3.64k|    size_t hostlen;
 1204|  3.64k|    ures = parse_scheme(url, u, schemebuf, schemelen, flags, &hostp);
 1205|  3.64k|    if(ures)
  ------------------
  |  Branch (1205:8): [True: 0, False: 3.64k]
  ------------------
 1206|      0|      goto fail;
 1207|       |
 1208|       |    /* find the end of the hostname + port number */
 1209|  3.64k|    hostlen = strcspn(hostp, "/?#");
 1210|  3.64k|    path = &hostp[hostlen];
 1211|       |
 1212|       |    /* this pathlen also contains the query and the fragment */
 1213|  3.64k|    pathlen = urllen - (path - url);
 1214|  3.64k|    if(hostlen) {
  ------------------
  |  Branch (1214:8): [True: 3.64k, False: 0]
  ------------------
 1215|  3.64k|      ures = parse_authority(u, hostp, hostlen, flags, &host, !!u->scheme);
 1216|  3.64k|      if(!ures && (flags & CURLU_GUESS_SCHEME) && !u->scheme)
  ------------------
  |  |   97|  3.64k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
  |  Branch (1216:10): [True: 3.64k, False: 0]
  |  Branch (1216:19): [True: 3.62k, False: 20]
  |  Branch (1216:51): [True: 0, False: 3.62k]
  ------------------
 1217|      0|        ures = guess_scheme(u, &host);
 1218|  3.64k|    }
 1219|      0|    else if(flags & CURLU_NO_AUTHORITY) {
  ------------------
  |  |   98|      0|#define CURLU_NO_AUTHORITY (1 << 10)      /* Allow empty authority when the
  ------------------
  |  Branch (1219:13): [True: 0, False: 0]
  ------------------
 1220|       |      /* allowed to be empty. */
 1221|      0|      if(curlx_dyn_add(&host, ""))
  ------------------
  |  Branch (1221:10): [True: 0, False: 0]
  ------------------
 1222|      0|        ures = CURLUE_OUT_OF_MEMORY;
 1223|      0|    }
 1224|      0|    else
 1225|      0|      ures = CURLUE_NO_HOST;
 1226|  3.64k|  }
 1227|  3.64k|  if(!ures) {
  ------------------
  |  Branch (1227:6): [True: 3.64k, False: 0]
  ------------------
 1228|       |    /* The path might at this point contain a fragment and/or a query to
 1229|       |       handle */
 1230|  3.64k|    const char *fragment = strchr(path, '#');
 1231|  3.64k|    if(fragment) {
  ------------------
  |  Branch (1231:8): [True: 68, False: 3.58k]
  ------------------
 1232|     68|      size_t fraglen = pathlen - (fragment - path);
 1233|     68|      ures = handle_fragment(u, fragment, fraglen, flags);
 1234|       |      /* after this, pathlen still contains the query */
 1235|     68|      pathlen -= fraglen;
 1236|     68|    }
 1237|  3.64k|  }
 1238|  3.64k|  if(!ures) {
  ------------------
  |  Branch (1238:6): [True: 3.64k, False: 0]
  ------------------
 1239|  3.64k|    const char *query = memchr(path, '?', pathlen);
 1240|  3.64k|    if(query) {
  ------------------
  |  Branch (1240:8): [True: 91, False: 3.55k]
  ------------------
 1241|     91|      size_t qlen = pathlen - (query - path);
 1242|     91|      ures = handle_query(u, query, qlen, flags);
 1243|     91|      pathlen -= qlen;
 1244|     91|    }
 1245|  3.64k|  }
 1246|  3.64k|  if(!ures)
  ------------------
  |  Branch (1246:6): [True: 3.64k, False: 0]
  ------------------
 1247|       |    /* the fragment and query parts are trimmed off from the path */
 1248|  3.64k|    ures = handle_path(u, path, pathlen, flags, is_file);
 1249|  3.64k|  if(!ures) {
  ------------------
  |  Branch (1249:6): [True: 3.64k, False: 0]
  ------------------
 1250|  3.64k|    u->host = curlx_dyn_ptr(&host);
 1251|  3.64k|    return CURLUE_OK;
 1252|  3.64k|  }
 1253|     41|fail:
 1254|     41|  curlx_dyn_free(&host);
 1255|     41|  free_urlhandle(u);
 1256|     41|  return ures;
 1257|  3.64k|}
urlapi.c:parse_scheme:
  995|  3.64k|{
  996|       |  /* clear path */
  997|  3.64k|  const char *schemep = NULL;
  998|       |
  999|  3.64k|  if(schemelen) {
  ------------------
  |  Branch (999:6): [True: 3.64k, False: 0]
  ------------------
 1000|  3.64k|    int num_slashes = 0;
 1001|  3.64k|    const char *p = &url[schemelen + 1];
 1002|  3.64k|    if(!Curl_get_scheme(schemebuf) && !(flags & CURLU_NON_SUPPORT_SCHEME))
  ------------------
  |  |   91|      0|#define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
  ------------------
  |  Branch (1002:8): [True: 0, False: 3.64k]
  |  Branch (1002:39): [True: 0, False: 0]
  ------------------
 1003|      0|      return CURLUE_UNSUPPORTED_SCHEME;
 1004|       |
 1005|  3.64k|    if(!ISSLASH(*p))
  ------------------
  |  |  751|  3.64k|#define ISSLASH(x) ((x) == '/')
  ------------------
  |  Branch (1005:8): [True: 0, False: 3.64k]
  ------------------
 1006|       |      /* less than one */
 1007|      0|      return CURLUE_BAD_SLASHES;
 1008|  3.64k|    if((flags & CURLU_NO_AUTHORITY)) {
  ------------------
  |  |   98|  3.64k|#define CURLU_NO_AUTHORITY (1 << 10)      /* Allow empty authority when the
  ------------------
  |  Branch (1008:8): [True: 0, False: 3.64k]
  ------------------
 1009|      0|      while(ISSLASH(*p) && (num_slashes < 2)) {
  ------------------
  |  |  751|      0|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (751:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1009:28): [True: 0, False: 0]
  ------------------
 1010|      0|        p++;
 1011|      0|        num_slashes++;
 1012|      0|      }
 1013|      0|    }
 1014|  3.64k|    else {
 1015|  10.9k|      while(ISSLASH(*p) && (num_slashes < 4)) {
  ------------------
  |  |  751|  21.8k|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (751:20): [True: 7.29k, False: 3.64k]
  |  |  ------------------
  ------------------
  |  Branch (1015:28): [True: 7.29k, False: 0]
  ------------------
 1016|  7.29k|        p++;
 1017|  7.29k|        num_slashes++;
 1018|  7.29k|      }
 1019|  3.64k|      if(num_slashes > 3)
  ------------------
  |  Branch (1019:10): [True: 0, False: 3.64k]
  ------------------
 1020|      0|        return CURLUE_BAD_SLASHES;
 1021|  3.64k|    }
 1022|       |
 1023|  3.64k|    schemep = schemebuf;
 1024|  3.64k|    *hostpp = p; /* hostname starts here */
 1025|  3.64k|  }
 1026|      0|  else {
 1027|       |    /* no scheme! */
 1028|       |
 1029|      0|    if(!(flags & (CURLU_DEFAULT_SCHEME | CURLU_GUESS_SCHEME)))
  ------------------
  |  |   89|      0|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
                  if(!(flags & (CURLU_DEFAULT_SCHEME | CURLU_GUESS_SCHEME)))
  ------------------
  |  |   97|      0|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
  |  Branch (1029:8): [True: 0, False: 0]
  ------------------
 1030|      0|      return CURLUE_BAD_SCHEME;
 1031|       |
 1032|      0|    if(flags & CURLU_DEFAULT_SCHEME)
  ------------------
  |  |   89|      0|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
  |  Branch (1032:8): [True: 0, False: 0]
  ------------------
 1033|      0|      schemep = DEFAULT_SCHEME;
  ------------------
  |  |   70|      0|#define DEFAULT_SCHEME "https"
  ------------------
 1034|       |
 1035|       |    /*
 1036|       |     * The URL was badly formatted, let's try without scheme specified.
 1037|       |     */
 1038|      0|    *hostpp = url;
 1039|      0|  }
 1040|       |
 1041|  3.64k|  if(schemep) {
  ------------------
  |  Branch (1041:6): [True: 3.64k, False: 0]
  ------------------
 1042|  3.64k|    u->scheme = curlx_strdup(schemep);
  ------------------
  |  | 1470|  3.64k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1043|  3.64k|    if(!u->scheme)
  ------------------
  |  Branch (1043:8): [True: 0, False: 3.64k]
  ------------------
 1044|      0|      return CURLUE_OUT_OF_MEMORY;
 1045|  3.64k|  }
 1046|  3.64k|  return CURLUE_OK;
 1047|  3.64k|}
urlapi.c:handle_fragment:
 1079|     68|{
 1080|     68|  CURLUcode ures;
 1081|     68|  u->fragment_present = TRUE;
  ------------------
  |  | 1045|     68|#define TRUE true
  ------------------
 1082|     68|  if(fraglen > 1) {
  ------------------
  |  Branch (1082:6): [True: 34, False: 34]
  ------------------
 1083|       |    /* skip the leading '#' in the copy but include the null-terminator */
 1084|     34|    if(flags & CURLU_URLENCODE) {
  ------------------
  |  |   95|     34|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1084:8): [True: 0, False: 34]
  ------------------
 1085|      0|      struct dynbuf enc;
 1086|      0|      curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|      0|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1087|      0|      ures = urlencode_str(&enc, fragment + 1, fraglen - 1, TRUE, QUERY_NO);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
                    ures = urlencode_str(&enc, fragment + 1, fraglen - 1, TRUE, QUERY_NO);
  ------------------
  |  |   52|      0|#define QUERY_NO      2
  ------------------
 1088|      0|      if(ures)
  ------------------
  |  Branch (1088:10): [True: 0, False: 0]
  ------------------
 1089|      0|        return ures;
 1090|      0|      u->fragment = curlx_dyn_ptr(&enc);
 1091|      0|    }
 1092|     34|    else {
 1093|     34|      u->fragment = curlx_memdup0(fragment + 1, fraglen - 1);
 1094|     34|      if(!u->fragment)
  ------------------
  |  Branch (1094:10): [True: 0, False: 34]
  ------------------
 1095|      0|        return CURLUE_OUT_OF_MEMORY;
 1096|     34|    }
 1097|     34|  }
 1098|     68|  return CURLUE_OK;
 1099|     68|}
urlapi.c:handle_query:
 1103|     91|{
 1104|     91|  u->query_present = TRUE;
  ------------------
  |  | 1045|     91|#define TRUE true
  ------------------
 1105|     91|  if(qlen > 1) {
  ------------------
  |  Branch (1105:6): [True: 62, False: 29]
  ------------------
 1106|     62|    if(flags & CURLU_URLENCODE) {
  ------------------
  |  |   95|     62|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1106:8): [True: 0, False: 62]
  ------------------
 1107|      0|      struct dynbuf enc;
 1108|      0|      CURLUcode ures;
 1109|      0|      curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|      0|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1110|       |      /* skip the leading question mark */
 1111|      0|      ures = urlencode_str(&enc, query + 1, qlen - 1, TRUE, QUERY_YES);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
                    ures = urlencode_str(&enc, query + 1, qlen - 1, TRUE, QUERY_YES);
  ------------------
  |  |   54|      0|#define QUERY_YES     4
  ------------------
 1112|      0|      if(ures)
  ------------------
  |  Branch (1112:10): [True: 0, False: 0]
  ------------------
 1113|      0|        return ures;
 1114|      0|      u->query = curlx_dyn_ptr(&enc);
 1115|      0|    }
 1116|     62|    else {
 1117|     62|      u->query = curlx_memdup0(query + 1, qlen - 1);
 1118|     62|      if(!u->query)
  ------------------
  |  Branch (1118:10): [True: 0, False: 62]
  ------------------
 1119|      0|        return CURLUE_OUT_OF_MEMORY;
 1120|     62|    }
 1121|     62|  }
 1122|     29|  else {
 1123|       |    /* single byte query */
 1124|     29|    u->query = curlx_strdup("");
  ------------------
  |  | 1470|     29|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1125|     29|    if(!u->query)
  ------------------
  |  Branch (1125:8): [True: 0, False: 29]
  ------------------
 1126|      0|      return CURLUE_OUT_OF_MEMORY;
 1127|     29|  }
 1128|     91|  return CURLUE_OK;
 1129|     91|}
urlapi.c:handle_path:
 1134|  3.64k|{
 1135|  3.64k|  CURLUcode ures;
 1136|  3.64k|  if(pathlen && (flags & CURLU_URLENCODE)) {
  ------------------
  |  |   95|  3.57k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1136:6): [True: 3.57k, False: 74]
  |  Branch (1136:17): [True: 10, False: 3.56k]
  ------------------
 1137|     10|    struct dynbuf enc;
 1138|     10|    curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|     10|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1139|     10|    ures = urlencode_str(&enc, path, pathlen, TRUE, QUERY_NO);
  ------------------
  |  | 1045|     10|#define TRUE true
  ------------------
                  ures = urlencode_str(&enc, path, pathlen, TRUE, QUERY_NO);
  ------------------
  |  |   52|     10|#define QUERY_NO      2
  ------------------
 1140|     10|    if(ures)
  ------------------
  |  Branch (1140:8): [True: 0, False: 10]
  ------------------
 1141|      0|      return ures;
 1142|     10|    pathlen = curlx_dyn_len(&enc);
 1143|     10|    path = u->path = curlx_dyn_ptr(&enc);
 1144|     10|  }
 1145|       |
 1146|  3.64k|  if(pathlen >= (size_t)(1 + !is_file)) {
  ------------------
  |  Branch (1146:6): [True: 634, False: 3.01k]
  ------------------
 1147|       |    /* paths for file:// scheme can be one byte, others need to be two */
 1148|    634|    if(!u->path) {
  ------------------
  |  Branch (1148:8): [True: 630, False: 4]
  ------------------
 1149|    630|      u->path = curlx_memdup0(path, pathlen);
 1150|    630|      if(!u->path)
  ------------------
  |  Branch (1150:10): [True: 0, False: 630]
  ------------------
 1151|      0|        return CURLUE_OUT_OF_MEMORY;
 1152|    630|      path = u->path;
 1153|    630|    }
 1154|      4|    else if(flags & CURLU_URLENCODE)
  ------------------
  |  |   95|      4|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1154:13): [True: 4, False: 0]
  ------------------
 1155|       |      /* it might have encoded more than the path so cut it */
 1156|      4|      u->path[pathlen] = 0;
 1157|       |
 1158|    634|    if(!(flags & CURLU_PATH_AS_IS)) {
  ------------------
  |  |   92|    634|#define CURLU_PATH_AS_IS (1 << 4)         /* leave dot sequences */
  ------------------
  |  Branch (1158:8): [True: 628, False: 6]
  ------------------
 1159|       |      /* remove ../ and ./ sequences according to RFC3986 */
 1160|    628|      char *dedot;
 1161|    628|      int err = dedotdotify(path, pathlen, &dedot);
 1162|    628|      if(err)
  ------------------
  |  Branch (1162:10): [True: 0, False: 628]
  ------------------
 1163|      0|        return CURLUE_OUT_OF_MEMORY;
 1164|    628|      if(dedot) {
  ------------------
  |  Branch (1164:10): [True: 149, False: 479]
  ------------------
 1165|    149|        curlx_free(u->path);
  ------------------
  |  | 1476|    149|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1166|    149|        u->path = dedot;
 1167|    149|      }
 1168|    628|    }
 1169|    634|  }
 1170|  3.64k|  return CURLUE_OK;
 1171|  3.64k|}

Curl_auth_digest_get_pair:
   62|     25|{
   63|     25|  int c;
   64|     25|  bool starts_with_quote = FALSE;
  ------------------
  |  | 1048|     25|#define FALSE false
  ------------------
   65|     25|  bool escape = FALSE;
  ------------------
  |  | 1048|     25|#define FALSE false
  ------------------
   66|       |
   67|    135|  for(c = DIGEST_MAX_VALUE_LENGTH - 1; (*str && (*str != '=') && c--);)
  ------------------
  |  |   30|     25|#define DIGEST_MAX_VALUE_LENGTH           256
  ------------------
  |  Branch (67:41): [True: 130, False: 5]
  |  Branch (67:49): [True: 110, False: 20]
  |  Branch (67:66): [True: 110, False: 0]
  ------------------
   68|    110|    *value++ = *str++;
   69|     25|  *value = 0;
   70|       |
   71|     25|  if('=' != *str++)
  ------------------
  |  Branch (71:6): [True: 5, False: 20]
  ------------------
   72|       |    /* eek, no match */
   73|      5|    return FALSE;
  ------------------
  |  | 1048|      5|#define FALSE false
  ------------------
   74|       |
   75|     20|  if('\"' == *str) {
  ------------------
  |  Branch (75:6): [True: 15, False: 5]
  ------------------
   76|       |    /* This starts with a quote so it must end with one as well! */
   77|     15|    str++;
   78|     15|    starts_with_quote = TRUE;
  ------------------
  |  | 1045|     15|#define TRUE true
  ------------------
   79|     15|  }
   80|       |
   81|    153|  for(c = DIGEST_MAX_CONTENT_LENGTH - 1; *str && c--; str++) {
  ------------------
  |  |   31|     20|#define DIGEST_MAX_CONTENT_LENGTH         1024
  ------------------
  |  Branch (81:42): [True: 148, False: 5]
  |  Branch (81:50): [True: 133, False: 15]
  ------------------
   82|    133|    if(!escape) {
  ------------------
  |  Branch (82:8): [True: 133, False: 0]
  ------------------
   83|    133|      switch(*str) {
  ------------------
  |  Branch (83:14): [True: 18, False: 115]
  ------------------
   84|      0|      case '\\':
  ------------------
  |  Branch (84:7): [True: 0, False: 133]
  ------------------
   85|      0|        if(starts_with_quote) {
  ------------------
  |  Branch (85:12): [True: 0, False: 0]
  ------------------
   86|       |          /* the start of an escaped quote */
   87|      0|          escape = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
   88|      0|          continue;
   89|      0|        }
   90|      0|        break;
   91|       |
   92|      3|      case ',':
  ------------------
  |  Branch (92:7): [True: 3, False: 130]
  ------------------
   93|      3|        if(!starts_with_quote) {
  ------------------
  |  Branch (93:12): [True: 3, False: 0]
  ------------------
   94|       |          /* This signals the end of the content if we did not get a starting
   95|       |             quote and then we do "sloppy" parsing */
   96|      3|          c = 0; /* the end */
   97|      3|          continue;
   98|      3|        }
   99|      0|        break;
  100|       |
  101|      0|      case '\r':
  ------------------
  |  Branch (101:7): [True: 0, False: 133]
  ------------------
  102|      0|      case '\n':
  ------------------
  |  Branch (102:7): [True: 0, False: 133]
  ------------------
  103|       |        /* end of string */
  104|      0|        if(starts_with_quote)
  ------------------
  |  Branch (104:12): [True: 0, False: 0]
  ------------------
  105|      0|          return FALSE; /* No closing quote */
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  106|      0|        c = 0;
  107|      0|        continue;
  108|       |
  109|     15|      case '\"':
  ------------------
  |  Branch (109:7): [True: 15, False: 118]
  ------------------
  110|     15|        if(starts_with_quote) {
  ------------------
  |  Branch (110:12): [True: 15, False: 0]
  ------------------
  111|       |          /* end of string */
  112|     15|          c = 0;
  113|     15|          continue;
  114|     15|        }
  115|      0|        else
  116|      0|          return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  117|    133|      }
  118|    133|    }
  119|       |
  120|    115|    escape = FALSE;
  ------------------
  |  | 1048|    115|#define FALSE false
  ------------------
  121|    115|    *content++ = *str;
  122|    115|  }
  123|     20|  if(escape)
  ------------------
  |  Branch (123:6): [True: 0, False: 20]
  ------------------
  124|      0|    return FALSE; /* No character after backslash */
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  125|       |
  126|     20|  *content = 0;
  127|     20|  *endptr = str;
  128|       |
  129|       |  return TRUE;
  ------------------
  |  | 1045|     20|#define TRUE true
  ------------------
  130|     20|}
Curl_auth_is_digest_supported:
  318|      5|{
  319|       |  return TRUE;
  ------------------
  |  | 1045|      5|#define TRUE true
  ------------------
  320|      5|}
Curl_auth_decode_digest_http_message:
  522|      5|{
  523|      5|  bool before = FALSE; /* got a nonce before */
  ------------------
  |  | 1048|      5|#define FALSE false
  ------------------
  524|       |
  525|       |  /* If we already have received a nonce, keep that in mind */
  526|      5|  if(digest->nonce)
  ------------------
  |  Branch (526:6): [True: 0, False: 5]
  ------------------
  527|      0|    before = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  528|       |
  529|       |  /* Clean up any former leftovers and initialize to defaults */
  530|      5|  Curl_auth_digest_cleanup(digest);
  531|       |
  532|     25|  for(;;) {
  533|     25|    char value[DIGEST_MAX_VALUE_LENGTH];
  534|     25|    char content[DIGEST_MAX_CONTENT_LENGTH];
  535|       |
  536|       |    /* Pass all additional spaces here */
  537|     37|    while(*chlg && ISBLANK(*chlg))
  ------------------
  |  |   43|     32|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 12, False: 20]
  |  |  |  Branch (43:38): [True: 0, False: 20]
  |  |  ------------------
  ------------------
  |  Branch (537:11): [True: 32, False: 5]
  ------------------
  538|     12|      chlg++;
  539|       |
  540|       |    /* Extract a value=content pair */
  541|     25|    if(Curl_auth_digest_get_pair(chlg, value, content, &chlg)) {
  ------------------
  |  Branch (541:8): [True: 20, False: 5]
  ------------------
  542|     20|      if(curl_strequal(value, "nonce")) {
  ------------------
  |  Branch (542:10): [True: 5, False: 15]
  ------------------
  543|      5|        curlx_free(digest->nonce);
  ------------------
  |  | 1476|      5|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  544|      5|        digest->nonce = curlx_strdup(content);
  ------------------
  |  | 1470|      5|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  545|      5|        if(!digest->nonce)
  ------------------
  |  Branch (545:12): [True: 0, False: 5]
  ------------------
  546|      0|          return CURLE_OUT_OF_MEMORY;
  547|      5|      }
  548|     15|      else if(curl_strequal(value, "stale")) {
  ------------------
  |  Branch (548:15): [True: 0, False: 15]
  ------------------
  549|      0|        if(curl_strequal(content, "true")) {
  ------------------
  |  Branch (549:12): [True: 0, False: 0]
  ------------------
  550|      0|          digest->stale = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  551|      0|          digest->nc = 1; /* we make a new nonce now */
  552|      0|        }
  553|      0|      }
  554|     15|      else if(curl_strequal(value, "realm")) {
  ------------------
  |  Branch (554:15): [True: 5, False: 10]
  ------------------
  555|      5|        curlx_free(digest->realm);
  ------------------
  |  | 1476|      5|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  556|      5|        digest->realm = curlx_strdup(content);
  ------------------
  |  | 1470|      5|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  557|      5|        if(!digest->realm)
  ------------------
  |  Branch (557:12): [True: 0, False: 5]
  ------------------
  558|      0|          return CURLE_OUT_OF_MEMORY;
  559|      5|      }
  560|     10|      else if(curl_strequal(value, "opaque")) {
  ------------------
  |  Branch (560:15): [True: 0, False: 10]
  ------------------
  561|      0|        curlx_free(digest->opaque);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  562|      0|        digest->opaque = curlx_strdup(content);
  ------------------
  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  563|      0|        if(!digest->opaque)
  ------------------
  |  Branch (563:12): [True: 0, False: 0]
  ------------------
  564|      0|          return CURLE_OUT_OF_MEMORY;
  565|      0|      }
  566|     10|      else if(curl_strequal(value, "qop")) {
  ------------------
  |  Branch (566:15): [True: 5, False: 5]
  ------------------
  567|      5|        const char *token = content;
  568|      5|        struct Curl_str out;
  569|      5|        bool foundAuth = FALSE;
  ------------------
  |  | 1048|      5|#define FALSE false
  ------------------
  570|      5|        bool foundAuthInt = FALSE;
  ------------------
  |  | 1048|      5|#define FALSE false
  ------------------
  571|       |        /* Pass leading spaces */
  572|      5|        while(*token && ISBLANK(*token))
  ------------------
  |  |   43|      5|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 0, False: 5]
  |  |  |  Branch (43:38): [True: 0, False: 5]
  |  |  ------------------
  ------------------
  |  Branch (572:15): [True: 5, False: 0]
  ------------------
  573|      0|          token++;
  574|      5|        while(!curlx_str_until(&token, &out, 32, ',')) {
  ------------------
  |  Branch (574:15): [True: 5, False: 0]
  ------------------
  575|      5|          if(curlx_str_casecompare(&out, DIGEST_QOP_VALUE_STRING_AUTH))
  ------------------
  |  |   55|      5|#define DIGEST_QOP_VALUE_STRING_AUTH      "auth"
  ------------------
  |  Branch (575:14): [True: 5, False: 0]
  ------------------
  576|      5|            foundAuth = TRUE;
  ------------------
  |  | 1045|      5|#define TRUE true
  ------------------
  577|      0|          else if(curlx_str_casecompare(&out,
  ------------------
  |  Branch (577:19): [True: 0, False: 0]
  ------------------
  578|      0|                                        DIGEST_QOP_VALUE_STRING_AUTH_INT))
  ------------------
  |  |   56|      0|#define DIGEST_QOP_VALUE_STRING_AUTH_INT  "auth-int"
  ------------------
  579|      0|            foundAuthInt = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  580|      5|          if(curlx_str_single(&token, ','))
  ------------------
  |  Branch (580:14): [True: 5, False: 0]
  ------------------
  581|      5|            break;
  582|      0|          while(*token && ISBLANK(*token))
  ------------------
  |  |   43|      0|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 0, False: 0]
  |  |  |  Branch (43:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (582:17): [True: 0, False: 0]
  ------------------
  583|      0|            token++;
  584|      0|        }
  585|       |
  586|       |        /* Select only auth or auth-int. Otherwise, ignore */
  587|      5|        if(foundAuth) {
  ------------------
  |  Branch (587:12): [True: 5, False: 0]
  ------------------
  588|      5|          curlx_free(digest->qop);
  ------------------
  |  | 1476|      5|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  589|      5|          digest->qop = curlx_strdup(DIGEST_QOP_VALUE_STRING_AUTH);
  ------------------
  |  | 1470|      5|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  590|      5|          if(!digest->qop)
  ------------------
  |  Branch (590:14): [True: 0, False: 5]
  ------------------
  591|      0|            return CURLE_OUT_OF_MEMORY;
  592|      5|        }
  593|      0|        else if(foundAuthInt) {
  ------------------
  |  Branch (593:17): [True: 0, False: 0]
  ------------------
  594|      0|          curlx_free(digest->qop);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  595|      0|          digest->qop = curlx_strdup(DIGEST_QOP_VALUE_STRING_AUTH_INT);
  ------------------
  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  596|      0|          if(!digest->qop)
  ------------------
  |  Branch (596:14): [True: 0, False: 0]
  ------------------
  597|      0|            return CURLE_OUT_OF_MEMORY;
  598|      0|        }
  599|      5|      }
  600|      5|      else if(curl_strequal(value, "algorithm")) {
  ------------------
  |  Branch (600:15): [True: 5, False: 0]
  ------------------
  601|      5|        curlx_free(digest->algorithm);
  ------------------
  |  | 1476|      5|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  602|      5|        digest->algorithm = curlx_strdup(content);
  ------------------
  |  | 1470|      5|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  603|      5|        if(!digest->algorithm)
  ------------------
  |  Branch (603:12): [True: 0, False: 5]
  ------------------
  604|      0|          return CURLE_OUT_OF_MEMORY;
  605|       |
  606|      5|        if(curl_strequal(content, "MD5-sess"))
  ------------------
  |  Branch (606:12): [True: 0, False: 5]
  ------------------
  607|      0|          digest->algo = ALGO_MD5SESS;
  ------------------
  |  |   45|      0|#define ALGO_MD5SESS (ALGO_MD5 | SESSION_ALGO)
  |  |  ------------------
  |  |  |  |   44|      0|#define ALGO_MD5 0
  |  |  ------------------
  |  |               #define ALGO_MD5SESS (ALGO_MD5 | SESSION_ALGO)
  |  |  ------------------
  |  |  |  |   42|      0|#define SESSION_ALGO 1 /* for algos with this bit set */
  |  |  ------------------
  ------------------
  608|      5|        else if(curl_strequal(content, "MD5"))
  ------------------
  |  Branch (608:17): [True: 5, False: 0]
  ------------------
  609|      5|          digest->algo = ALGO_MD5;
  ------------------
  |  |   44|      5|#define ALGO_MD5 0
  ------------------
  610|      0|        else if(curl_strequal(content, "SHA-256"))
  ------------------
  |  Branch (610:17): [True: 0, False: 0]
  ------------------
  611|      0|          digest->algo = ALGO_SHA256;
  ------------------
  |  |   46|      0|#define ALGO_SHA256 2
  ------------------
  612|      0|        else if(curl_strequal(content, "SHA-256-SESS"))
  ------------------
  |  Branch (612:17): [True: 0, False: 0]
  ------------------
  613|      0|          digest->algo = ALGO_SHA256SESS;
  ------------------
  |  |   47|      0|#define ALGO_SHA256SESS (ALGO_SHA256 | SESSION_ALGO)
  |  |  ------------------
  |  |  |  |   46|      0|#define ALGO_SHA256 2
  |  |  ------------------
  |  |               #define ALGO_SHA256SESS (ALGO_SHA256 | SESSION_ALGO)
  |  |  ------------------
  |  |  |  |   42|      0|#define SESSION_ALGO 1 /* for algos with this bit set */
  |  |  ------------------
  ------------------
  614|      0|        else if(curl_strequal(content, "SHA-512-256")) {
  ------------------
  |  Branch (614:17): [True: 0, False: 0]
  ------------------
  615|      0|#ifdef CURL_HAVE_SHA512_256
  616|      0|          digest->algo = ALGO_SHA512_256;
  ------------------
  |  |   48|      0|#define ALGO_SHA512_256 4
  ------------------
  617|       |#else /* !CURL_HAVE_SHA512_256 */
  618|       |          return CURLE_NOT_BUILT_IN;
  619|       |#endif /* CURL_HAVE_SHA512_256 */
  620|      0|        }
  621|      0|        else if(curl_strequal(content, "SHA-512-256-SESS")) {
  ------------------
  |  Branch (621:17): [True: 0, False: 0]
  ------------------
  622|      0|#ifdef CURL_HAVE_SHA512_256
  623|      0|          digest->algo = ALGO_SHA512_256SESS;
  ------------------
  |  |   49|      0|#define ALGO_SHA512_256SESS (ALGO_SHA512_256 | SESSION_ALGO)
  |  |  ------------------
  |  |  |  |   48|      0|#define ALGO_SHA512_256 4
  |  |  ------------------
  |  |               #define ALGO_SHA512_256SESS (ALGO_SHA512_256 | SESSION_ALGO)
  |  |  ------------------
  |  |  |  |   42|      0|#define SESSION_ALGO 1 /* for algos with this bit set */
  |  |  ------------------
  ------------------
  624|       |#else /* !CURL_HAVE_SHA512_256 */
  625|       |          return CURLE_NOT_BUILT_IN;
  626|       |#endif /* CURL_HAVE_SHA512_256 */
  627|      0|        }
  628|      0|        else
  629|      0|          return CURLE_BAD_CONTENT_ENCODING;
  630|      5|      }
  631|      0|      else if(curl_strequal(value, "userhash")) {
  ------------------
  |  Branch (631:15): [True: 0, False: 0]
  ------------------
  632|      0|        if(curl_strequal(content, "true")) {
  ------------------
  |  Branch (632:12): [True: 0, False: 0]
  ------------------
  633|      0|          digest->userhash = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  634|      0|        }
  635|      0|      }
  636|      0|      else {
  637|       |        /* Unknown specifier, ignore it! */
  638|      0|      }
  639|     20|    }
  640|      5|    else
  641|      5|      break; /* We are done here */
  642|       |
  643|       |    /* Pass all additional spaces here */
  644|     23|    while(*chlg && ISBLANK(*chlg))
  ------------------
  |  |   43|     18|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 3, False: 15]
  |  |  |  Branch (43:38): [True: 0, False: 15]
  |  |  ------------------
  ------------------
  |  Branch (644:11): [True: 18, False: 5]
  ------------------
  645|      3|      chlg++;
  646|       |
  647|       |    /* Allow the list to be comma-separated */
  648|     20|    if(',' == *chlg)
  ------------------
  |  Branch (648:8): [True: 12, False: 8]
  ------------------
  649|     12|      chlg++;
  650|     20|  }
  651|       |
  652|       |  /* We had a nonce since before, and we got another one now without
  653|       |     'stale=true'. This means we provided bad credentials in the previous
  654|       |     request */
  655|      5|  if(before && !digest->stale)
  ------------------
  |  Branch (655:6): [True: 0, False: 5]
  |  Branch (655:16): [True: 0, False: 0]
  ------------------
  656|      0|    return CURLE_BAD_CONTENT_ENCODING;
  657|       |
  658|       |  /* We got this header without a nonce, that is a bad Digest line! */
  659|      5|  if(!digest->nonce)
  ------------------
  |  Branch (659:6): [True: 0, False: 5]
  ------------------
  660|      0|    return CURLE_BAD_CONTENT_ENCODING;
  661|       |
  662|       |  /* "<algo>-sess" protocol versions require "auth" or "auth-int" qop */
  663|      5|  if(!digest->qop && (digest->algo & SESSION_ALGO))
  ------------------
  |  |   42|      0|#define SESSION_ALGO 1 /* for algos with this bit set */
  ------------------
  |  Branch (663:6): [True: 0, False: 5]
  |  Branch (663:22): [True: 0, False: 0]
  ------------------
  664|      0|    return CURLE_BAD_CONTENT_ENCODING;
  665|       |
  666|      5|  return CURLE_OK;
  667|      5|}
Curl_auth_digest_cleanup:
 1040|  18.6k|{
 1041|  18.6k|  Curl_peer_unlink(&digest->origin);
 1042|  18.6k|  Curl_creds_unlink(&digest->creds);
 1043|  18.6k|  curlx_safefree(digest->nonce);
  ------------------
  |  | 1332|  18.6k|  do {                      \
  |  | 1333|  18.6k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  18.6k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  18.6k|    (ptr) = NULL;           \
  |  | 1335|  18.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 18.6k]
  |  |  ------------------
  ------------------
 1044|  18.6k|  curlx_safefree(digest->cnonce);
  ------------------
  |  | 1332|  18.6k|  do {                      \
  |  | 1333|  18.6k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  18.6k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  18.6k|    (ptr) = NULL;           \
  |  | 1335|  18.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 18.6k]
  |  |  ------------------
  ------------------
 1045|  18.6k|  curlx_safefree(digest->realm);
  ------------------
  |  | 1332|  18.6k|  do {                      \
  |  | 1333|  18.6k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  18.6k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  18.6k|    (ptr) = NULL;           \
  |  | 1335|  18.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 18.6k]
  |  |  ------------------
  ------------------
 1046|  18.6k|  curlx_safefree(digest->opaque);
  ------------------
  |  | 1332|  18.6k|  do {                      \
  |  | 1333|  18.6k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  18.6k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  18.6k|    (ptr) = NULL;           \
  |  | 1335|  18.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 18.6k]
  |  |  ------------------
  ------------------
 1047|  18.6k|  curlx_safefree(digest->qop);
  ------------------
  |  | 1332|  18.6k|  do {                      \
  |  | 1333|  18.6k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  18.6k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  18.6k|    (ptr) = NULL;           \
  |  | 1335|  18.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 18.6k]
  |  |  ------------------
  ------------------
 1048|  18.6k|  curlx_safefree(digest->algorithm);
  ------------------
  |  | 1332|  18.6k|  do {                      \
  |  | 1333|  18.6k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  18.6k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  18.6k|    (ptr) = NULL;           \
  |  | 1335|  18.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 18.6k]
  |  |  ------------------
  ------------------
 1049|       |
 1050|  18.6k|  digest->nc = 0;
 1051|  18.6k|  digest->algo = ALGO_MD5; /* default algorithm */
  ------------------
  |  |   44|  18.6k|#define ALGO_MD5 0
  ------------------
 1052|  18.6k|  digest->stale = FALSE;   /* default means normal, not stale */
  ------------------
  |  | 1048|  18.6k|#define FALSE false
  ------------------
 1053|       |  digest->userhash = FALSE;
  ------------------
  |  | 1048|  18.6k|#define FALSE false
  ------------------
 1054|  18.6k|}

Curl_auth_allowed_to_host:
  141|     51|{
  142|     51|  return Curl_auth_allowed_to_origin(data, data->state.origin);
  143|     51|}
Curl_auth_allowed_to_origin:
  147|    295|{
  148|    295|  return data->set.allow_auth_to_other_hosts ||
  ------------------
  |  Branch (148:10): [True: 1, False: 294]
  ------------------
  149|    294|         Curl_peer_equal(data->state.initial_origin, origin);
  ------------------
  |  Branch (149:10): [True: 294, False: 0]
  ------------------
  150|    295|}

Curl_async_global_init:
   81|      2|{
   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|      2|  return CURLE_OK;
   88|      2|}
Curl_async_thrdd_multi_init:
  477|  3.73k|{
  478|  3.73k|  CURLcode result;
  479|  3.73k|  DEBUGASSERT(!multi->resolv_thrdq);
  ------------------
  |  | 1075|  3.73k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (479:3): [True: 0, False: 3.73k]
  |  Branch (479:3): [True: 3.73k, False: 0]
  ------------------
  480|  3.73k|  result = Curl_thrdq_create(&multi->resolv_thrdq, "DNS",
  481|  3.73k|                             min_threads, max_threads, idle_time_ms,
  482|  3.73k|                             async_thrdd_item_free,
  483|  3.73k|                             async_thrdd_item_process,
  484|  3.73k|                             async_thrdd_event,
  485|  3.73k|                             multi);
  486|  3.73k|#ifdef DEBUGBUILD
  487|  3.73k|  if(!result) {
  ------------------
  |  Branch (487:6): [True: 3.73k, False: 0]
  ------------------
  488|  3.73k|    const char *p = getenv("CURL_DBG_RESOLV_MAX_THREADS");
  489|  3.73k|    if(p) {
  ------------------
  |  Branch (489:8): [True: 0, False: 3.73k]
  ------------------
  490|      0|      curl_off_t l;
  491|      0|      if(!curlx_str_number(&p, &l, UINT32_MAX)) {
  ------------------
  |  Branch (491:10): [True: 0, False: 0]
  ------------------
  492|      0|        result = Curl_async_thrdd_multi_set_props(
  493|      0|          multi, min_threads, (uint32_t)l, idle_time_ms);
  494|      0|      }
  495|      0|    }
  496|  3.73k|  }
  497|  3.73k|#endif
  498|  3.73k|  return result;
  499|  3.73k|}
Curl_async_thrdd_multi_destroy:
  503|  3.73k|{
  504|  3.73k|  if(multi->resolv_thrdq) {
  ------------------
  |  Branch (504:6): [True: 3.73k, False: 0]
  ------------------
  505|  3.73k|#ifdef CURLVERBOSE
  506|  3.73k|    CURL_TRC_DNS(multi->admin, "destroy thread queue+pool, join=%d", join);
  ------------------
  |  |  168|  3.73k|  do {                                 \
  |  |  169|  3.73k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  3.73k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.73k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.46k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.73k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.46k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.73k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  3.73k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  3.73k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 3.73k]
  |  |  ------------------
  ------------------
  507|  3.73k|    Curl_thrdq_trace(multi->resolv_thrdq, multi->admin);
  508|  3.73k|#endif
  509|  3.73k|    Curl_thrdq_destroy(multi->resolv_thrdq, join);
  510|       |    multi->resolv_thrdq = NULL;
  511|  3.73k|  }
  512|  3.73k|}
Curl_async_thrdd_multi_process:
  559|  10.9k|{
  560|  10.9k|  struct Curl_easy *data;
  561|  10.9k|  void *qitem;
  562|       |
  563|  10.9k|  while(!Curl_thrdq_recv(multi->resolv_thrdq, &qitem)) {
  ------------------
  |  Branch (563:9): [True: 0, False: 10.9k]
  ------------------
  564|       |    /* dispatch resolve result */
  565|      0|    struct async_thrdd_item *item = qitem;
  566|      0|    struct Curl_resolv_async *async = NULL;
  567|       |
  568|      0|    data = Curl_multi_get_easy(multi, item->mid);
  569|      0|    if(data)
  ------------------
  |  Branch (569:8): [True: 0, False: 0]
  ------------------
  570|      0|      async = Curl_async_get(data, item->resolv_id);
  571|      0|    if(async) {
  ------------------
  |  Branch (571:8): [True: 0, False: 0]
  ------------------
  572|      0|      struct async_thrdd_item **pdest = &async->thrdd.res_A;
  573|       |
  574|      0|#ifdef CURLRES_IPV6
  575|      0|      if(item->dns_queries & CURL_DNSQ_AAAA)
  ------------------
  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (575:10): [True: 0, False: 0]
  ------------------
  576|      0|        pdest = &async->thrdd.res_AAAA;
  577|      0|#endif
  578|      0|      if(!*pdest) {
  ------------------
  |  Branch (578:10): [True: 0, False: 0]
  ------------------
  579|      0|        *pdest = item;
  580|      0|        item = NULL;
  581|      0|      }
  582|      0|      else
  583|      0|        DEBUGASSERT(0); /* should not receive duplicates here */
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (583:9): [Folded, False: 0]
  |  Branch (583:9): [Folded, False: 0]
  ------------------
  584|       |
  585|      0|      --async->queries_ongoing;
  586|      0|      Curl_multi_mark_dirty(data);
  587|      0|    }
  588|      0|    async_thrdd_item_free(item);
  589|      0|  }
  590|  10.9k|  VERBOSE(Curl_thrdq_trace(multi->resolv_thrdq, multi->admin));
  ------------------
  |  | 1611|  10.9k|#define VERBOSE(x) x
  ------------------
  591|  10.9k|}

Curl_conn_dns_add_addr_resolve:
  561|  3.62k|{
  562|       |  /* should only have address query bits */
  563|  3.62k|  DEBUGASSERT(!(dns_queries & ~CURL_DNSQ_ADDR));
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (563:3): [True: 0, False: 3.62k]
  |  Branch (563:3): [True: 3.62k, False: 0]
  ------------------
  564|  3.62k|  return cf_dns_add_resolve(data, conn, sockindex, peer,
  565|  3.62k|                            (dns_queries & CURL_DNSQ_ADDR), transport);
  ------------------
  |  |   55|  3.62k|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  ------------------
  |  |  |  |   51|  3.62k|#define CURL_DNSQ_A           (1U << 0)
  |  |  ------------------
  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  ------------------
  |  |  |  |   52|  3.62k|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  ------------------
  ------------------
  566|  3.62k|}
Curl_conn_dns_addr_result:
  578|  3.62k|{
  579|  3.62k|  struct Curl_cfilter *cf = conn->cfilter[sockindex];
  580|  3.62k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (580:9): [True: 3.62k, False: 0]
  ------------------
  581|  3.62k|    if(cf->cft == &Curl_cft_dns) {
  ------------------
  |  Branch (581:8): [True: 3.62k, False: 0]
  ------------------
  582|  3.62k|      struct cf_dns_ctx *ctx = cf->ctx;
  583|  3.62k|      if(Curl_peer_same_destination(ctx->peer, peer) &&
  ------------------
  |  Branch (583:10): [True: 3.62k, False: 0]
  ------------------
  584|  3.62k|         (ctx->dns_queries & (CURL_DNSQ_A | CURL_DNSQ_AAAA))) {
  ------------------
  |  |   51|  3.62k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                       (ctx->dns_queries & (CURL_DNSQ_A | CURL_DNSQ_AAAA))) {
  ------------------
  |  |   52|  3.62k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (584:10): [True: 3.62k, False: 0]
  ------------------
  585|  3.62k|        if(ctx->dns || ctx->resolv_result)
  ------------------
  |  Branch (585:12): [True: 3.62k, False: 0]
  |  Branch (585:24): [True: 0, False: 0]
  ------------------
  586|  3.62k|          return ctx->resolv_result;
  587|      0|        return CURLE_AGAIN;
  588|  3.62k|      }
  589|  3.62k|    }
  590|  3.62k|  }
  591|      0|  return CURLE_FAILED_INIT; /* no one is resolving */
  592|  3.62k|}
Curl_conn_dns_get_ai:
  603|  7.25k|{
  604|  7.25k|  struct connectdata *conn = data->conn;
  605|  7.25k|  struct Curl_cfilter *cf = conn->cfilter[sockindex];
  606|       |
  607|  7.25k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (607:9): [True: 7.25k, False: 0]
  ------------------
  608|  7.25k|    if(cf->cft == &Curl_cft_dns) {
  ------------------
  |  Branch (608:8): [True: 7.25k, False: 0]
  ------------------
  609|  7.25k|      struct cf_dns_ctx *ctx = cf->ctx;
  610|  7.25k|      if(Curl_peer_same_destination(ctx->peer, peer) &&
  ------------------
  |  Branch (610:10): [True: 7.25k, False: 0]
  ------------------
  611|  7.25k|         (ctx->dns_queries & (CURL_DNSQ_A | CURL_DNSQ_AAAA))) {
  ------------------
  |  |   51|  7.25k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                       (ctx->dns_queries & (CURL_DNSQ_A | CURL_DNSQ_AAAA))) {
  ------------------
  |  |   52|  7.25k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (611:10): [True: 7.25k, False: 0]
  ------------------
  612|  7.25k|        CURL_TRC_CF(data, cf, "get %uth result for %s:%u, family=%d, dns=%d",
  ------------------
  |  |  153|  7.25k|  do {                                          \
  |  |  154|  7.25k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  7.25k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  14.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 7.25k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 7.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  14.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  7.25k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  7.25k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  613|  7.25k|                    index, peer->hostname, peer->port, ai_family, !!ctx->dns);
  614|  7.25k|        if(ctx->resolv_result)
  ------------------
  |  Branch (614:12): [True: 0, False: 7.25k]
  ------------------
  615|      0|          return NULL;
  616|  7.25k|        else if(ctx->dns) {
  ------------------
  |  Branch (616:17): [True: 7.25k, False: 0]
  ------------------
  617|       |          /* A cached DNS entry may contain address families that we
  618|       |           * here never queried for. We want to give no results for those. */
  619|  7.25k|          if((ai_family == AF_INET) && !(ctx->dns_queries & CURL_DNSQ_A))
  ------------------
  |  |   51|  3.62k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (619:14): [True: 3.62k, False: 3.62k]
  |  Branch (619:40): [True: 0, False: 3.62k]
  ------------------
  620|      0|            return NULL;
  621|  7.25k|#ifdef USE_IPV6
  622|  7.25k|          if((ai_family == AF_INET6) && !(ctx->dns_queries & CURL_DNSQ_AAAA))
  ------------------
  |  |   52|  3.62k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (622:14): [True: 3.62k, False: 3.62k]
  |  Branch (622:41): [True: 0, False: 3.62k]
  ------------------
  623|      0|            return NULL;
  624|  7.25k|#endif
  625|  7.25k|          return Curl_addrinfo_get(ctx->dns->addr, ai_family, index);
  626|  7.25k|        }
  627|      0|        else
  628|      0|          return Curl_resolv_get_ai(data, ctx->resolv_id, ai_family, index);
  629|  7.25k|      }
  630|  7.25k|    }
  631|  7.25k|  }
  632|      0|  return NULL;
  633|  7.25k|}
cf-dns.c:cf_dns_destroy:
  348|  3.62k|{
  349|  3.62k|  struct cf_dns_ctx *ctx = cf->ctx;
  350|       |
  351|  3.62k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  352|  3.62k|  cf_dns_ctx_destroy(data, ctx);
  353|  3.62k|}
cf-dns.c:cf_dns_ctx_destroy:
   93|  3.62k|{
   94|  3.62k|  if(ctx) {
  ------------------
  |  Branch (94:6): [True: 3.62k, False: 0]
  ------------------
   95|  3.62k|    Curl_peer_unlink(&ctx->peer);
   96|  3.62k|    Curl_dns_entry_unlink(data, &ctx->dns);
   97|  3.62k|    curlx_free(ctx);
  ------------------
  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   98|  3.62k|  }
   99|  3.62k|}
cf-dns.c:cf_dns_connect:
  288|  7.25k|{
  289|  7.25k|  struct cf_dns_ctx *ctx = cf->ctx;
  290|  7.25k|  bool ip_query = (ctx->dns_queries & (CURL_DNSQ_A | CURL_DNSQ_AAAA));
  ------------------
  |  |   51|  7.25k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                bool ip_query = (ctx->dns_queries & (CURL_DNSQ_A | CURL_DNSQ_AAAA));
  ------------------
  |  |   52|  7.25k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  291|       |
  292|  7.25k|  if(cf->connected) {
  ------------------
  |  Branch (292:6): [True: 0, False: 7.25k]
  ------------------
  293|      0|    *done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  294|      0|    return CURLE_OK;
  295|      0|  }
  296|       |
  297|  7.25k|  *done = FALSE;
  ------------------
  |  | 1048|  7.25k|#define FALSE false
  ------------------
  298|  7.25k|  if(!ctx->started) {
  ------------------
  |  Branch (298:6): [True: 3.62k, False: 3.62k]
  ------------------
  299|  3.62k|    ctx->started = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  300|  3.62k|    ctx->resolv_result = cf_dns_start(cf, data, &ctx->dns);
  301|  3.62k|  }
  302|       |
  303|  7.25k|  if(!ctx->dns && !ctx->resolv_result) {
  ------------------
  |  Branch (303:6): [True: 0, False: 7.25k]
  |  Branch (303:19): [True: 0, False: 0]
  ------------------
  304|      0|    ctx->resolv_result =
  305|      0|      Curl_resolv_take_result(data, ctx->resolv_id, &ctx->dns);
  306|      0|  }
  307|       |
  308|  7.25k|  if(ctx->resolv_result && ip_query) {
  ------------------
  |  Branch (308:6): [True: 0, False: 7.25k]
  |  Branch (308:28): [True: 0, False: 0]
  ------------------
  309|       |    /* failing A|AAAA resolves is a hard failure. */
  310|      0|    CURL_TRC_CF(data, cf, "[%s] error resolving: %d",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  311|      0|                Curl_resolv_query_str(ctx->dns_queries),
  312|      0|                (int)ctx->resolv_result);
  313|      0|    return ctx->resolv_result;
  314|      0|  }
  315|       |
  316|  7.25k|  if(ctx->dns && !ctx->announced) {
  ------------------
  |  Branch (316:6): [True: 7.25k, False: 0]
  |  Branch (316:18): [True: 3.62k, False: 3.62k]
  ------------------
  317|  3.62k|    ctx->announced = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  318|  3.62k|    if((cf->sockindex == FIRSTSOCKET) && ip_query) {
  ------------------
  |  |  234|  3.62k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (318:8): [True: 3.62k, False: 0]
  |  Branch (318:42): [True: 3.62k, False: 0]
  ------------------
  319|  3.62k|      cf->conn->bits.dns_resolved = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  320|  3.62k|      Curl_pgrsTime(data, TIMER_NAMELOOKUP);
  321|  3.62k|    }
  322|  3.62k|    cf_dns_report(cf, data, ctx->dns);
  323|  3.62k|  }
  324|       |
  325|       |  /* Delay connection sub-filters when we are still waiting for AAAA */
  326|  7.25k|  if(!cf_dns_ready_to_connect(cf, data)) {
  ------------------
  |  Branch (326:6): [True: 0, False: 7.25k]
  ------------------
  327|      0|    return CURLE_OK;
  328|      0|  }
  329|       |
  330|  7.25k|  if(cf->next && !cf->next->connected) {
  ------------------
  |  Branch (330:6): [True: 7.25k, False: 0]
  |  Branch (330:18): [True: 7.25k, False: 0]
  ------------------
  331|  7.25k|    bool sub_done;
  332|  7.25k|    CURLcode result = Curl_conn_cf_connect(cf->next, data, &sub_done);
  333|  7.25k|    if(result || !sub_done)
  ------------------
  |  Branch (333:8): [True: 0, False: 7.25k]
  |  Branch (333:18): [True: 3.62k, False: 3.62k]
  ------------------
  334|  3.62k|      return result;
  335|  3.62k|    DEBUGASSERT(sub_done);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (335:5): [True: 0, False: 3.62k]
  |  Branch (335:5): [True: 3.62k, False: 0]
  ------------------
  336|  3.62k|  }
  337|       |
  338|       |  /* sub filter chain is connected, this means the filter has done
  339|       |   * its work and is connected as well, if it has results or not. */
  340|  3.62k|  CURL_TRC_CF(data, cf, "connected filter chain below");
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  341|  3.62k|  *done = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  342|       |  cf->connected = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  343|  3.62k|  Curl_resolv_destroy(data, ctx->resolv_id);
  344|  3.62k|  return CURLE_OK;
  345|  7.25k|}
cf-dns.c:cf_dns_start:
  187|  3.62k|{
  188|  3.62k|  struct cf_dns_ctx *ctx = cf->ctx;
  189|  3.62k|  timediff_t timeout_ms = Curl_timeleft_ms(data);
  190|  3.62k|  CURLcode result = CURLE_OK;
  191|       |
  192|  3.62k|  *pdns = NULL;
  193|       |
  194|  3.62k|  CURL_TRC_CF(data, cf, "[%s] cf_dns_start %s %s:%u",
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  195|  3.62k|              Curl_resolv_query_str(ctx->dns_queries),
  196|  3.62k|              ctx->peer->unix_socket ? "unix-domain-socket" : "host",
  197|  3.62k|              ctx->peer->hostname, ctx->peer->port);
  198|  3.62k|  if(ctx->peer->unix_socket)
  ------------------
  |  Branch (198:6): [True: 0, False: 3.62k]
  ------------------
  199|      0|    ctx->dns_queries = CURL_DNSQ_A; /* treat it like an A resolve */
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  200|       |
  201|  3.62k|  if(CURL_DNSQ_IS_ADDR(ctx->dns_queries)) {
  ------------------
  |  |   56|  3.62k|#define CURL_DNSQ_IS_ADDR(x)  (uint8_t)((x)&(CURL_DNSQ_ADDR))
  |  |  ------------------
  |  |  |  |   55|  3.62k|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|  3.62k|#define CURL_DNSQ_A           (1U << 0)
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  3.62k|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:31): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  202|  3.62k|    if(Curl_is_ipv4addr(ctx->peer->hostname))
  ------------------
  |  Branch (202:8): [True: 3.62k, False: 0]
  ------------------
  203|  3.62k|      ctx->dns_queries |= CURL_DNSQ_A;
  ------------------
  |  |   51|  3.62k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  204|      0|#ifdef USE_IPV6
  205|      0|    else if(ctx->peer->ipv6)
  ------------------
  |  Branch (205:13): [True: 0, False: 0]
  ------------------
  206|      0|      ctx->dns_queries |= CURL_DNSQ_AAAA;
  ------------------
  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  207|  3.62k|#endif
  208|       |
  209|  3.62k|    result = Curl_resolv(data, ctx->peer, ctx->dns_queries, ctx->transport,
  210|  3.62k|                         (bool)ctx->for_proxy, timeout_ms,
  211|  3.62k|                         &ctx->resolv_id, pdns);
  212|  3.62k|  }
  213|       |#ifdef USE_HTTPSRR
  214|       |  else if(ctx->dns_queries == CURL_DNSQ_HTTPS) {
  215|       |    result = Curl_resolv_https(data, ctx->peer, (bool)ctx->for_proxy,
  216|       |                               timeout_ms, &ctx->resolv_id, pdns);
  217|       |  }
  218|       |#endif
  219|      0|  else {
  220|      0|    failf(data, "unsupported DNS queries %x", ctx->dns_queries);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  221|      0|    return CURLE_FAILED_INIT;
  222|      0|  }
  223|       |
  224|  3.62k|  DEBUGASSERT(!result || !*pdns);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (224:3): [True: 3.62k, False: 0]
  |  Branch (224:3): [True: 0, False: 0]
  |  Branch (224:3): [True: 3.62k, False: 0]
  |  Branch (224:3): [True: 0, False: 0]
  ------------------
  225|  3.62k|  if(!result) { /* resolved right away, either sync or from dnscache */
  ------------------
  |  Branch (225:6): [True: 3.62k, False: 0]
  ------------------
  226|  3.62k|    DEBUGASSERT(*pdns);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (226:5): [True: 0, False: 3.62k]
  |  Branch (226:5): [True: 3.62k, False: 0]
  ------------------
  227|  3.62k|    return CURLE_OK;
  228|  3.62k|  }
  229|      0|  else if(result == CURLE_AGAIN) { /* async resolv in progress */
  ------------------
  |  Branch (229:11): [True: 0, False: 0]
  ------------------
  230|      0|    return CURLE_OK;
  231|      0|  }
  232|      0|  else if(result == CURLE_OPERATION_TIMEDOUT) { /* took too long */
  ------------------
  |  Branch (232:11): [True: 0, False: 0]
  ------------------
  233|      0|    failf(data, "Failed to resolve '%s' with timeout after %"
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  234|      0|          FMT_TIMEDIFF_T " ms", ctx->peer->hostname,
  235|      0|          Curl_pgrs_since_ms(data, NULL, TIMER_STARTSINGLE));
  236|      0|    return CURLE_OPERATION_TIMEDOUT;
  237|      0|  }
  238|      0|  else {
  239|      0|    DEBUGASSERT(result);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (239:5): [True: 0, False: 0]
  |  Branch (239:5): [True: 0, False: 0]
  ------------------
  240|      0|    if(ctx->dns_queries & (CURL_DNSQ_A | CURL_DNSQ_AAAA))
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                  if(ctx->dns_queries & (CURL_DNSQ_A | CURL_DNSQ_AAAA))
  ------------------
  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (240:8): [True: 0, False: 0]
  ------------------
  241|      0|      failf(data, "Could not resolve: %s", ctx->peer->hostname);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  242|      0|    return result;
  243|      0|  }
  244|  3.62k|}
cf-dns.c:cf_dns_report:
  132|  3.62k|{
  133|  3.62k|  struct cf_dns_ctx *ctx = cf->ctx;
  134|  3.62k|  struct dynbuf tmp;
  135|       |
  136|  3.62k|  if(!Curl_trc_is_verbose(data) ||
  ------------------
  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  ------------------
  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  ------------------
  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  ------------------
  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  137|       |     /* ignore no name or numerical IP addresses */
  138|      0|     !dns->hostname[0] || Curl_host_is_ipnum(dns->hostname))
  ------------------
  |  Branch (138:6): [True: 0, False: 0]
  |  Branch (138:27): [True: 0, False: 0]
  ------------------
  139|  3.62k|    return;
  140|       |
  141|      0|  if(ctx->peer->unix_socket) {
  ------------------
  |  Branch (141:6): [True: 0, False: 0]
  ------------------
  142|      0|#ifdef USE_UNIX_SOCKETS
  143|      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))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  144|       |#else
  145|       |    DEBUGASSERT(0);
  146|       |#endif
  147|      0|  }
  148|      0|  else {
  149|      0|    curlx_dyn_init(&tmp, 1024);
  150|      0|    if(CURL_DNSQ_IS_ADDR(ctx->dns_queries)) {
  ------------------
  |  |   56|      0|#define CURL_DNSQ_IS_ADDR(x)  (uint8_t)((x)&(CURL_DNSQ_ADDR))
  |  |  ------------------
  |  |  |  |   55|      0|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:31): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  151|      0|      infof(data, "Host %s:%u was resolved.", dns->hostname, dns->port);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  152|      0|#ifdef CURLRES_IPV6
  153|      0|      cf_dns_report_addr(data, &tmp, "IPv6: ", AF_INET6, dns->addr);
  154|      0|#endif
  155|      0|      cf_dns_report_addr(data, &tmp, "IPv4: ", AF_INET, dns->addr);
  156|      0|    }
  157|       |#ifdef USE_HTTPSRR
  158|       |    else if(ctx->dns_queries & CURL_DNSQ_HTTPS) {
  159|       |      if(!dns->hinfo)
  160|       |        infof(data, "HTTPS-RR %s:%u: -", dns->hostname, dns->port);
  161|       |      else if(!Curl_httpsrr_applicable(data, dns->hinfo))
  162|       |        infof(data, "HTTPS-RR %s:%u: not applicable",
  163|       |              dns->hostname, dns->port);
  164|       |      else {
  165|       |        CURLcode result = Curl_httpsrr_print(&tmp, dns->hinfo);
  166|       |        if(!result)
  167|       |          infof(data, "HTTPS-RR %s:%u: %s",
  168|       |                dns->hostname, dns->port, curlx_dyn_ptr(&tmp));
  169|       |        else
  170|       |          infof(data, "Error printing HTTPS-RR information");
  171|       |      }
  172|       |    }
  173|       |#endif
  174|      0|    curlx_dyn_free(&tmp);
  175|      0|  }
  176|      0|}
cf-dns.c:cf_dns_ready_to_connect:
  248|  7.25k|{
  249|  7.25k|  struct cf_dns_ctx *ctx = cf->ctx;
  250|       |
  251|  7.25k|  if(ctx->resolv_result)
  ------------------
  |  Branch (251:6): [True: 0, False: 7.25k]
  ------------------
  252|      0|    return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  253|  7.25k|  else if(ctx->dns)
  ------------------
  |  Branch (253:11): [True: 7.25k, False: 0]
  ------------------
  254|  7.25k|    return TRUE;
  ------------------
  |  | 1045|  7.25k|#define TRUE true
  ------------------
  255|      0|#ifdef USE_CURL_ASYNC
  256|      0|  else if(CURL_DNSQ_IS_ADDR(ctx->dns_queries)) {
  ------------------
  |  |   56|      0|#define CURL_DNSQ_IS_ADDR(x)  (uint8_t)((x)&(CURL_DNSQ_ADDR))
  |  |  ------------------
  |  |  |  |   55|      0|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:31): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  257|      0|    timediff_t remain_ms;
  258|       |    /* For Happy Eyeballing, we can start on either A or AAAA resolves,
  259|       |     * but AAAA is preferred. We enforce a small delay for missing
  260|       |     * AAAA to arrive, then we let the connect continue.
  261|       |     * Note: if AAAA was never started (-4), it is considered to have
  262|       |     * an answer (e.g. a negative one). */
  263|      0|    if(Curl_resolv_has_answers(data, ctx->resolv_id, CURL_DNSQ_AAAA))
  ------------------
  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (263:8): [True: 0, False: 0]
  ------------------
  264|      0|      return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  265|      0|    remain_ms = ctx->he_aaaa_await_ms -
  266|      0|                Curl_resolv_elapsed_ms(data, ctx->resolv_id);
  267|      0|    if(remain_ms <= 0)
  ------------------
  |  Branch (267:8): [True: 0, False: 0]
  ------------------
  268|      0|      return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  269|      0|    CURL_TRC_CF(data, cf, "[%s] still waiting %" FMT_TIMEDIFF_T
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
  270|      0|                "ms for AAAA result",
  271|      0|                Curl_resolv_query_str(ctx->dns_queries), remain_ms);
  272|      0|    Curl_expire(data, remain_ms, EXPIRE_HAPPY_EYEBALLS);
  273|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  274|      0|  }
  275|      0|  else {
  276|      0|    return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  277|      0|  }
  278|       |#else
  279|       |  (void)data;
  280|       |  DEBUGASSERT(0); /* We should not come here */
  281|       |  return FALSE;
  282|       |#endif /* USE_CURL_ASYNC */
  283|  7.25k|}
cf-dns.c:cf_dns_cntrl:
  389|  7.25k|{
  390|  7.25k|  struct cf_dns_ctx *ctx = cf->ctx;
  391|  7.25k|  CURLcode result = CURLE_OK;
  392|       |
  393|  7.25k|  (void)arg1;
  394|  7.25k|  (void)arg2;
  395|  7.25k|  switch(event) {
  396|      0|  case CF_CTRL_DATA_DONE:
  ------------------
  |  |  118|      0|#define CF_CTRL_DATA_DONE               7  /* premature  NULL     ignored */
  ------------------
  |  Branch (396:3): [True: 0, False: 7.25k]
  ------------------
  397|      0|    if(ctx->dns) {
  ------------------
  |  Branch (397:8): [True: 0, False: 0]
  ------------------
  398|       |      /* Should only come here when the connect attempt failed and
  399|       |       * `data` is giving up on it. On a successful connect, we already
  400|       |       * unlinked the DNS entry. */
  401|      0|      Curl_dns_entry_unlink(data, &ctx->dns);
  402|      0|    }
  403|      0|    break;
  404|  7.25k|  default:
  ------------------
  |  Branch (404:3): [True: 7.25k, False: 0]
  ------------------
  405|  7.25k|    break;
  406|  7.25k|  }
  407|  7.25k|  return result;
  408|  7.25k|}
cf-dns.c:cf_dns_add_resolve:
  511|  3.62k|{
  512|  3.62k|  struct Curl_cfilter *cf = data->conn->cfilter[sockindex];
  513|  3.62k|  struct Curl_cfilter *cf_dns = NULL;
  514|  3.62k|  bool is_addr = CURL_DNSQ_IS_ADDR(dns_queries);
  ------------------
  |  |   56|  3.62k|#define CURL_DNSQ_IS_ADDR(x)  (uint8_t)((x)&(CURL_DNSQ_ADDR))
  |  |  ------------------
  |  |  |  |   55|  3.62k|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|  3.62k|#define CURL_DNSQ_A           (1U << 0)
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  3.62k|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  515|       |
  516|  3.62k|  if((dns_queries & CURL_DNSQ_HTTPS) &&
  ------------------
  |  |   53|  3.62k|#define CURL_DNSQ_HTTPS       (1U << 2)
  ------------------
  |  Branch (516:6): [True: 0, False: 3.62k]
  ------------------
  517|      0|     Curl_is_ipaddr(peer->hostname)) {
  ------------------
  |  Branch (517:6): [True: 0, False: 0]
  ------------------
  518|      0|    dns_queries = (uint8_t)(dns_queries & ~CURL_DNSQ_HTTPS);
  ------------------
  |  |   53|      0|#define CURL_DNSQ_HTTPS       (1U << 2)
  ------------------
  519|      0|  }
  520|       |
  521|  7.25k|  for(; cf && dns_queries; cf = cf->next) {
  ------------------
  |  Branch (521:9): [True: 3.62k, False: 3.62k]
  |  Branch (521:15): [True: 3.62k, False: 0]
  ------------------
  522|  3.62k|    if(cf->cft == &Curl_cft_dns) {
  ------------------
  |  Branch (522:8): [True: 0, False: 3.62k]
  ------------------
  523|      0|      struct cf_dns_ctx *ctx = cf->ctx;
  524|      0|      cf_dns = cf;
  525|      0|      if(Curl_peer_same_destination(ctx->peer, peer)) {
  ------------------
  |  Branch (525:10): [True: 0, False: 0]
  ------------------
  526|       |        /* subtract queries already being scheduled/ongoing */
  527|      0|        dns_queries = (uint8_t)(~ctx->dns_queries & dns_queries);
  528|      0|        if(!dns_queries) { /* already there */
  ------------------
  |  Branch (528:12): [True: 0, False: 0]
  ------------------
  529|      0|          return CURLE_OK;
  530|      0|        }
  531|      0|        else if(is_addr && !ctx->started &&
  ------------------
  |  Branch (531:17): [True: 0, False: 0]
  |  Branch (531:28): [True: 0, False: 0]
  ------------------
  532|      0|                CURL_DNSQ_IS_ADDR(ctx->dns_queries)) {
  ------------------
  |  |   56|      0|#define CURL_DNSQ_IS_ADDR(x)  (uint8_t)((x)&(CURL_DNSQ_ADDR))
  |  |  ------------------
  |  |  |  |   55|      0|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:31): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  533|      0|          ctx->dns_queries |= dns_queries;
  534|      0|          CURL_TRC_DNS(data, "[%s] added queries=%s for %s:%u",
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  535|      0|                       Curl_resolv_query_str(ctx->dns_queries),
  536|      0|                       Curl_resolv_query_str(dns_queries),
  537|      0|                       peer->hostname, peer->port);
  538|      0|          return CURLE_OK;
  539|      0|        }
  540|      0|      }
  541|      0|    }
  542|  3.62k|  }
  543|       |
  544|  3.62k|  if(dns_queries) {
  ------------------
  |  Branch (544:6): [True: 3.62k, False: 0]
  ------------------
  545|       |    /* No existing filter is handling these, add a new DNS filter
  546|       |     * (after the last one if there was one already. FCFS. */
  547|  3.62k|    if(cf_dns)
  ------------------
  |  Branch (547:8): [True: 0, False: 3.62k]
  ------------------
  548|      0|      return cf_dns_insert_after(cf_dns, data, peer, dns_queries, transport);
  549|  3.62k|    else
  550|  3.62k|      return cf_dns_add(data, conn, sockindex, peer, dns_queries, transport);
  551|  3.62k|  }
  552|      0|  return CURLE_OK;
  553|  3.62k|}
cf-dns.c:cf_dns_create:
  433|  3.62k|{
  434|  3.62k|  struct Curl_cfilter *cf = NULL;
  435|  3.62k|  struct cf_dns_ctx *ctx;
  436|  3.62k|  CURLcode result = CURLE_OK;
  437|       |
  438|  3.62k|  (void)data;
  439|  3.62k|  ctx = cf_dns_ctx_create(data, peer, dns_queries, transport, for_proxy);
  440|  3.62k|  if(!ctx) {
  ------------------
  |  Branch (440:6): [True: 0, False: 3.62k]
  ------------------
  441|      0|    result = CURLE_OUT_OF_MEMORY;
  442|      0|    goto out;
  443|      0|  }
  444|       |
  445|  3.62k|  result = Curl_cf_create(&cf, &Curl_cft_dns, ctx);
  446|       |
  447|  3.62k|out:
  448|  3.62k|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (448:10): [True: 0, False: 3.62k]
  ------------------
  449|  3.62k|  if(result)
  ------------------
  |  Branch (449:6): [True: 0, False: 3.62k]
  ------------------
  450|      0|    cf_dns_ctx_destroy(data, ctx);
  451|  3.62k|  return result;
  452|  3.62k|}
cf-dns.c:cf_dns_ctx_create:
   61|  3.62k|{
   62|  3.62k|  struct cf_dns_ctx *ctx;
   63|       |
   64|  3.62k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1473|  3.62k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   65|  3.62k|  if(!ctx)
  ------------------
  |  Branch (65:6): [True: 0, False: 3.62k]
  ------------------
   66|      0|    return NULL;
   67|       |
   68|  3.62k|  Curl_peer_link(&ctx->peer, peer);
   69|  3.62k|  ctx->dns_queries = dns_queries;
   70|  3.62k|  ctx->transport = transport;
   71|  3.62k|  ctx->for_proxy = for_proxy;
   72|  3.62k|  ctx->he_aaaa_await_ms = CURL_HE_AAAA_AWAIT_MS;
  ------------------
  |  |   41|  3.62k|#define CURL_HE_AAAA_AWAIT_MS    25
  ------------------
   73|  3.62k|#ifdef DEBUGBUILD
   74|  3.62k|  {
   75|  3.62k|    const char *p = getenv("CURL_DBG_HE_AAAA_AWAIT_MS");
   76|  3.62k|    if(p) {
  ------------------
  |  Branch (76:8): [True: 0, False: 3.62k]
  ------------------
   77|      0|      curl_off_t l;
   78|      0|      if(!curlx_str_number(&p, &l, UINT32_MAX)) {
  ------------------
  |  Branch (78:10): [True: 0, False: 0]
  ------------------
   79|      0|        ctx->he_aaaa_await_ms = (uint32_t)l;
   80|      0|      }
   81|      0|    }
   82|  3.62k|  }
   83|  3.62k|#endif
   84|       |
   85|  3.62k|  CURL_TRC_DNS(data, "[%s] created DNS filter for %s:%u, transport=%x",
  ------------------
  |  |  168|  3.62k|  do {                                 \
  |  |  169|  3.62k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  3.62k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.62k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.62k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  3.62k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
   86|  3.62k|               Curl_resolv_query_str(ctx->dns_queries),
   87|  3.62k|               peer->hostname, peer->port, ctx->transport);
   88|  3.62k|  return ctx;
   89|  3.62k|}
cf-dns.c:cf_dns_add:
  462|  3.62k|{
  463|  3.62k|  struct Curl_cfilter *cf = NULL;
  464|  3.62k|  bool for_proxy = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  465|  3.62k|  CURLcode result;
  466|       |
  467|  3.62k|  if(!peer)
  ------------------
  |  Branch (467:6): [True: 0, False: 3.62k]
  ------------------
  468|      0|    return CURLE_FAILED_INIT;
  469|  3.62k|#ifndef CURL_DISABLE_PROXY
  470|  3.62k|  for_proxy = (peer == conn->socks_proxy.peer) ||
  ------------------
  |  Branch (470:15): [True: 0, False: 3.62k]
  ------------------
  471|  3.62k|              (peer == conn->http_proxy.peer);
  ------------------
  |  Branch (471:15): [True: 0, False: 3.62k]
  ------------------
  472|  3.62k|#endif
  473|       |
  474|  3.62k|  result = cf_dns_create(&cf, data, peer, dns_queries, transport, for_proxy);
  475|  3.62k|  if(result)
  ------------------
  |  Branch (475:6): [True: 0, False: 3.62k]
  ------------------
  476|      0|    goto out;
  477|  3.62k|  Curl_conn_cf_add(data, conn, sockindex, cf);
  478|  3.62k|out:
  479|  3.62k|  return result;
  480|  3.62k|}

Curl_dnscache_prune:
  196|  3.62k|{
  197|  3.62k|  struct Curl_dnscache *dnscache = dnscache_get(data);
  198|       |  /* the timeout may be set -1 (forever) */
  199|  3.62k|  timediff_t timeout_ms = data->set.dns_cache_timeout_ms;
  200|       |
  201|  3.62k|  if(!dnscache || (timeout_ms == -1))
  ------------------
  |  Branch (201:6): [True: 0, False: 3.62k]
  |  Branch (201:19): [True: 0, False: 3.62k]
  ------------------
  202|       |    /* NULL hostcache means we cannot do it */
  203|      0|    return;
  204|       |
  205|  3.62k|  dnscache_lock(data, dnscache);
  206|       |
  207|  3.62k|  do {
  208|       |    /* Remove outdated and unused entries from the hostcache */
  209|  3.62k|    timediff_t oldest_ms =
  210|  3.62k|      dnscache_prune(&dnscache->entries, timeout_ms, *Curl_pgrs_now(data));
  211|       |
  212|  3.62k|    if(Curl_hash_count(&dnscache->entries) > MAX_DNS_CACHE_SIZE)
  ------------------
  |  |   61|  3.62k|#define MAX_DNS_CACHE_SIZE 29999
  ------------------
  |  Branch (212:8): [True: 0, False: 3.62k]
  ------------------
  213|       |      /* prune the ones over half this age */
  214|      0|      timeout_ms = oldest_ms / 2;
  215|  3.62k|    else
  216|  3.62k|      break;
  217|       |
  218|       |    /* if the cache size is still too big, use the oldest age as new prune
  219|       |       limit */
  220|  3.62k|  } while(timeout_ms);
  ------------------
  |  Branch (220:11): [True: 0, False: 0]
  ------------------
  221|       |
  222|  3.62k|  dnscache_unlock(data, dnscache);
  223|  3.62k|}
Curl_dnscache_get:
  328|  3.62k|{
  329|  3.62k|  struct Curl_dnscache *dnscache = dnscache_get(data);
  330|  3.62k|  struct Curl_dns_entry *dns = NULL;
  331|  3.62k|  CURLcode result = CURLE_OK;
  332|       |
  333|  3.62k|  dnscache_lock(data, dnscache);
  334|  3.62k|  result = fetch_addr(data, dnscache, dns_queries, peer, &dns);
  335|  3.62k|  if(!result && dns)
  ------------------
  |  Branch (335:6): [True: 3.62k, False: 0]
  |  Branch (335:17): [True: 0, False: 3.62k]
  ------------------
  336|      0|    dns->refcount++; /* we pass out a reference */
  337|  3.62k|  else if(result) {
  ------------------
  |  Branch (337:11): [True: 0, False: 3.62k]
  ------------------
  338|      0|    DEBUGASSERT(!dns);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (338:5): [True: 0, False: 0]
  |  Branch (338:5): [True: 0, False: 0]
  ------------------
  339|      0|    dns = NULL;
  340|      0|  }
  341|  3.62k|  dnscache_unlock(data, dnscache);
  342|       |
  343|  3.62k|  CURL_TRC_DNS(data, "cache lookup %s:%u queries=%s -> %d %sfound",
  ------------------
  |  |  168|  3.62k|  do {                                 \
  |  |  169|  3.62k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  3.62k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.62k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.62k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  3.62k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (170:26): [True: 0, False: 0]
  |  |  ------------------
  |  |  171|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  344|  3.62k|               peer->hostname, peer->port, Curl_resolv_query_str(dns_queries),
  345|  3.62k|               (int)result, dns ? "" : "not ");
  346|  3.62k|  *pentry = dns;
  347|  3.62k|  return result;
  348|  3.62k|}
Curl_dnsc_mk_addr:
  543|  3.62k|{
  544|  3.62k|  struct dnsc_id id;
  545|  3.62k|  struct Curl_dns_entry *dns;
  546|       |
  547|  3.62k|  dnsc_peer2id(&id, CURL_DNST_ADDR, peer);
  ------------------
  |  |   41|  3.62k|#define CURL_DNST_ADDR      'A'
  ------------------
  548|  3.62k|  dns = dnsc_entry_create(data, &id, FALSE);
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  549|       |  dns = dnsc_entry_assign_addr(data, dns, dns_queries, paddr, NULL);
  550|  3.62k|  return dns;
  551|  3.62k|}
Curl_dnscache_add:
  698|  3.62k|{
  699|  3.62k|  struct Curl_dnscache *dnscache = dnscache_get(data);
  700|  3.62k|  struct Curl_str name;
  701|  3.62k|  struct dnsc_id id;
  702|  3.62k|  struct dnsc_key key;
  703|       |
  704|  3.62k|  if(!dnscache)
  ------------------
  |  Branch (704:6): [True: 0, False: 3.62k]
  ------------------
  705|      0|    return CURLE_FAILED_INIT;
  706|  3.62k|  if(!entry || (entry->type == CURL_DNST_INIT))
  ------------------
  |  |   40|  3.62k|#define CURL_DNST_INIT      '\0'
  ------------------
  |  Branch (706:6): [True: 0, False: 3.62k]
  |  Branch (706:16): [True: 0, False: 3.62k]
  ------------------
  707|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  708|       |
  709|  3.62k|  curlx_str_assign(&name, entry->hostname, entry->hostlen);
  710|  3.62k|  dnsc_str2id(&id, entry->type, &name, entry->port);
  711|  3.62k|  dnsc_id2key(&key, &id);
  712|       |
  713|       |  /* Store the resolved data in our DNS cache and up ref count */
  714|  3.62k|  dnscache_lock(data, dnscache);
  715|  3.62k|  if(!Curl_hash_add(&dnscache->entries, key.data, key.len, (void *)entry)) {
  ------------------
  |  Branch (715:6): [True: 0, False: 3.62k]
  ------------------
  716|      0|    dnscache_unlock(data, dnscache);
  717|      0|    return CURLE_OUT_OF_MEMORY;
  718|      0|  }
  719|  3.62k|  entry->refcount++;
  720|  3.62k|  dnscache_unlock(data, dnscache);
  721|  3.62k|  CURL_TRC_DNS(data, "cached entry for %s:%u queries=%s",
  ------------------
  |  |  168|  3.62k|  do {                                 \
  |  |  169|  3.62k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  3.62k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.62k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.62k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  3.62k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  722|  3.62k|               entry->hostname, entry->port,
  723|  3.62k|               Curl_resolv_query_str(entry->dns_queries));
  724|  3.62k|  return CURLE_OK;
  725|  3.62k|}
Curl_dns_entry_unlink:
  783|  3.62k|{
  784|  3.62k|  if(*pdns) {
  ------------------
  |  Branch (784:6): [True: 3.62k, False: 0]
  ------------------
  785|  3.62k|    struct Curl_dnscache *dnscache = dnscache_get(data);
  786|  3.62k|    struct Curl_dns_entry *dns = *pdns;
  787|  3.62k|    *pdns = NULL;
  788|  3.62k|    dnscache_lock(data, dnscache);
  789|  3.62k|    dns->refcount--;
  790|  3.62k|    if(dns->refcount == 0)
  ------------------
  |  Branch (790:8): [True: 0, False: 3.62k]
  ------------------
  791|      0|      dnscache_entry_free(dns);
  792|  3.62k|    dnscache_unlock(data, dnscache);
  793|  3.62k|  }
  794|  3.62k|}
Curl_dnscache_init:
  809|  3.73k|{
  810|  3.73k|  Curl_hash_init(&dns->entries, size, Curl_hash_str, curlx_str_key_compare,
  811|  3.73k|                 dnscache_entry_dtor);
  812|  3.73k|}
Curl_dnscache_destroy:
  815|  3.73k|{
  816|  3.73k|  Curl_hash_destroy(&dns->entries);
  817|  3.73k|}
dnscache.c:dnscache_get:
  169|  14.5k|{
  170|  14.5k|  if(data->share && data->share->specifier & (1 << CURL_LOCK_DATA_DNS))
  ------------------
  |  Branch (170:6): [True: 0, False: 14.5k]
  |  Branch (170:21): [True: 0, False: 0]
  ------------------
  171|      0|    return &data->share->dnscache;
  172|  14.5k|  if(data->multi)
  ------------------
  |  Branch (172:6): [True: 14.5k, False: 0]
  ------------------
  173|  14.5k|    return &data->multi->dnscache;
  174|      0|  return NULL;
  175|  14.5k|}
dnscache.c:dnscache_lock:
  179|  14.5k|{
  180|  14.5k|  if(data->share && dnscache == &data->share->dnscache)
  ------------------
  |  Branch (180:6): [True: 0, False: 14.5k]
  |  Branch (180:21): [True: 0, False: 0]
  ------------------
  181|      0|    Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE);
  182|  14.5k|}
dnscache.c:dnscache_prune:
  154|  3.62k|{
  155|  3.62k|  struct dnscache_prune_data user;
  156|       |
  157|  3.62k|  user.max_age_ms = cache_timeout_ms;
  158|  3.62k|  user.now = now;
  159|  3.62k|  user.oldest_ms = 0;
  160|       |
  161|  3.62k|  Curl_hash_clean_with_criterium(hostcache,
  162|  3.62k|                                 (void *)&user,
  163|  3.62k|                                 dnscache_entry_is_stale);
  164|       |
  165|  3.62k|  return user.oldest_ms;
  166|  3.62k|}
dnscache.c:dnscache_entry_is_stale:
  130|  3.62k|{
  131|  3.62k|  struct dnscache_prune_data *prune = (struct dnscache_prune_data *)datap;
  132|  3.62k|  struct Curl_dns_entry *dns = (struct Curl_dns_entry *)hc;
  133|       |
  134|  3.62k|  if(dns->timestamp.tv_sec || dns->timestamp.tv_usec) {
  ------------------
  |  Branch (134:6): [True: 3.62k, False: 0]
  |  Branch (134:31): [True: 0, False: 0]
  ------------------
  135|       |    /* get age in milliseconds */
  136|  3.62k|    timediff_t age = curlx_ptimediff_ms(&prune->now, &dns->timestamp);
  137|  3.62k|    if(!dns->addr)
  ------------------
  |  Branch (137:8): [True: 0, False: 3.62k]
  ------------------
  138|      0|      age *= 2; /* negative entries age twice as fast */
  139|  3.62k|    if(age >= prune->max_age_ms)
  ------------------
  |  Branch (139:8): [True: 0, False: 3.62k]
  ------------------
  140|      0|      return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  141|  3.62k|    if(age > prune->oldest_ms)
  ------------------
  |  Branch (141:8): [True: 3.62k, False: 0]
  ------------------
  142|  3.62k|      prune->oldest_ms = age;
  143|  3.62k|  }
  144|  3.62k|  return FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  145|  3.62k|}
dnscache.c:dnscache_unlock:
  186|  14.5k|{
  187|  14.5k|  if(data->share && dnscache == &data->share->dnscache)
  ------------------
  |  Branch (187:6): [True: 0, False: 14.5k]
  |  Branch (187:21): [True: 0, False: 0]
  ------------------
  188|      0|    Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
  189|  14.5k|}
dnscache.c:fetch_addr:
  241|  3.62k|{
  242|  3.62k|  struct Curl_dns_entry *dns = NULL;
  243|  3.62k|  struct dnsc_id id;
  244|  3.62k|  struct dnsc_key key;
  245|  3.62k|  char type = CURL_DNSQ_IS_ADDR(dns_queries) ?
  ------------------
  |  |   56|  3.62k|#define CURL_DNSQ_IS_ADDR(x)  (uint8_t)((x)&(CURL_DNSQ_ADDR))
  |  |  ------------------
  |  |  |  |   55|  3.62k|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|  3.62k|#define CURL_DNSQ_A           (1U << 0)
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  3.62k|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:31): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  246|  3.62k|              CURL_DNST_ADDR : CURL_DNST_HTTPS;
  ------------------
  |  |   41|  3.62k|#define CURL_DNST_ADDR      'A'
  ------------------
                            CURL_DNST_ADDR : CURL_DNST_HTTPS;
  ------------------
  |  |   42|  3.62k|#define CURL_DNST_HTTPS     'H'
  ------------------
  247|  3.62k|  CURLcode result = CURLE_OK;
  248|       |
  249|  3.62k|  *pdns = NULL;
  250|  3.62k|  if(!dnscache)
  ------------------
  |  Branch (250:6): [True: 0, False: 3.62k]
  ------------------
  251|      0|    return CURLE_OK;
  252|       |
  253|  3.62k|  dnsc_peer2id(&id, type, peer);
  254|  3.62k|  dnsc_id2key(&key, &id);
  255|       |
  256|       |  /* See if it is already in our dns cache */
  257|  3.62k|  dns = Curl_hash_pick(&dnscache->entries, key.data, key.len);
  258|       |
  259|       |  /* No entry found in cache, check if we might have a wildcard entry */
  260|  3.62k|  if(!dns && (type == CURL_DNST_ADDR) && data->state.wildcard_resolve) {
  ------------------
  |  |   41|  3.62k|#define CURL_DNST_ADDR      'A'
  ------------------
  |  Branch (260:6): [True: 3.62k, False: 0]
  |  Branch (260:14): [True: 3.62k, False: 0]
  |  Branch (260:42): [True: 0, False: 3.62k]
  ------------------
  261|      0|    struct Curl_str wildname;
  262|       |
  263|      0|    curlx_str_assign(&wildname, "*", 1);
  264|      0|    dnsc_str2id(&id, CURL_DNST_ADDR, &wildname, peer->port);
  ------------------
  |  |   41|      0|#define CURL_DNST_ADDR      'A'
  ------------------
  265|      0|    dnsc_id2key(&key, &id);
  266|       |
  267|       |    /* See if it is already in our dns cache */
  268|      0|    dns = Curl_hash_pick(&dnscache->entries, key.data, key.len);
  269|      0|  }
  270|       |
  271|  3.62k|  if(dns && (data->set.dns_cache_timeout_ms != -1)) {
  ------------------
  |  Branch (271:6): [True: 0, False: 3.62k]
  |  Branch (271:13): [True: 0, False: 0]
  ------------------
  272|       |    /* See whether the returned entry is stale. Done before we release lock */
  273|      0|    struct dnscache_prune_data user;
  274|       |
  275|      0|    user.now = *Curl_pgrs_now(data);
  276|      0|    user.max_age_ms = data->set.dns_cache_timeout_ms;
  277|      0|    user.oldest_ms = 0;
  278|       |
  279|      0|    if(dnscache_entry_is_stale(&user, dns)) {
  ------------------
  |  Branch (279:8): [True: 0, False: 0]
  ------------------
  280|      0|      infof(data, "Hostname in DNS cache was stale, zapped");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  281|      0|      dns = NULL; /* the memory deallocation is being handled by the hash */
  282|      0|      Curl_hash_delete(&dnscache->entries, key.data, key.len);
  283|      0|    }
  284|      0|  }
  285|       |
  286|       |  /* We need to cache address information and HTTPS-RR separately. */
  287|  3.62k|  if(dns && CURL_DNSQ_IS_ADDR(dns_queries)) {
  ------------------
  |  |   56|      0|#define CURL_DNSQ_IS_ADDR(x)  (uint8_t)((x)&(CURL_DNSQ_ADDR))
  |  |  ------------------
  |  |  |  |   55|      0|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (56:31): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (287:6): [True: 0, False: 3.62k]
  ------------------
  288|      0|    if((uint8_t)(dns->dns_queries & dns_queries) !=
  ------------------
  |  Branch (288:8): [True: 0, False: 0]
  ------------------
  289|      0|       (uint8_t)(dns_queries & CURL_DNSQ_ADDR)) {
  ------------------
  |  |   55|      0|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  ------------------
  |  |  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  |  |  ------------------
  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  ------------------
  |  |  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  ------------------
  ------------------
  290|       |      /* The entry does not cover all wanted address queries, a miss. */
  291|      0|      dns = NULL;
  292|      0|    }
  293|      0|    else if(!(dns->dns_responses & dns_queries)) {
  ------------------
  |  Branch (293:13): [True: 0, False: 0]
  ------------------
  294|       |      /* The entry has no responses for the wanted DNS queries. */
  295|      0|      CURL_TRC_DNS(data, "cache entry does not have type=%s addresses",
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  296|      0|                   Curl_resolv_query_str(dns_queries));
  297|      0|      dns = NULL;
  298|      0|      result = CURLE_COULDNT_RESOLVE_HOST;
  299|      0|    }
  300|      0|    else if(dns && !dns->addr) { /* negative entry */
  ------------------
  |  Branch (300:13): [True: 0, False: 0]
  |  Branch (300:20): [True: 0, False: 0]
  ------------------
  301|      0|      dns = NULL;
  302|      0|      result = CURLE_COULDNT_RESOLVE_HOST;
  303|      0|    }
  304|      0|  }
  305|       |
  306|  3.62k|  *pdns = dns;
  307|  3.62k|  return result;
  308|  3.62k|}
dnscache.c:dnsc_peer2id:
   71|  7.25k|{
   72|  7.25k|  curlx_str_assign(&pid->name, peer->hostname, strlen(peer->hostname));
   73|  7.25k|  pid->port = peer->port;
   74|  7.25k|  pid->type = type;
   75|  7.25k|}
dnscache.c:dnsc_entry_create:
  444|  3.62k|{
  445|  3.62k|  struct Curl_dns_entry *dns = NULL;
  446|       |
  447|       |  /* Create a new cache entry, struct already has the hostname NUL */
  448|  3.62k|  dns = curlx_calloc(1, sizeof(struct Curl_dns_entry) +
  ------------------
  |  | 1473|  3.62k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  449|  3.62k|                     curlx_strlen(&pid->name));
  450|  3.62k|  if(!dns)
  ------------------
  |  Branch (450:6): [True: 0, False: 3.62k]
  ------------------
  451|      0|    goto out;
  452|       |
  453|  3.62k|  dns->refcount = 1; /* the cache has the first reference */
  454|  3.62k|  dns->hostlen = curlx_strlen(&pid->name);
  ------------------
  |  |   50|  3.62k|#define curlx_strlen(x) ((x)->len)
  ------------------
  455|  3.62k|  dns->port = pid->port;
  456|  3.62k|  if(dns->hostlen)
  ------------------
  |  Branch (456:6): [True: 3.62k, False: 0]
  ------------------
  457|  3.62k|    memcpy(dns->hostname, curlx_str(&pid->name), dns->hostlen);
  ------------------
  |  |   49|  3.62k|#define curlx_str(x)    ((x)->str)
  ------------------
  458|       |
  459|  3.62k|  if(permanent) {
  ------------------
  |  Branch (459:6): [True: 0, False: 3.62k]
  ------------------
  460|      0|    dns->timestamp.tv_sec = 0; /* an entry that never goes stale */
  461|      0|    dns->timestamp.tv_usec = 0; /* an entry that never goes stale */
  462|      0|  }
  463|  3.62k|  else {
  464|  3.62k|    dns->timestamp = *Curl_pgrs_now(data);
  465|  3.62k|  }
  466|       |
  467|  3.62k|out:
  468|  3.62k|  return dns;
  469|  3.62k|}
dnscache.c:dnsc_entry_assign_addr:
  477|  3.62k|{
  478|  3.62k|  if(!dns)
  ------------------
  |  Branch (478:6): [True: 0, False: 3.62k]
  ------------------
  479|      0|    goto out;
  480|       |  /* only do this when this is the only reference */
  481|  3.62k|  DEBUGASSERT(dns->refcount == 1);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (481:3): [True: 0, False: 3.62k]
  |  Branch (481:3): [True: 3.62k, False: 0]
  ------------------
  482|  3.62k|  DEBUGASSERT(dns->type == CURL_DNST_INIT);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (482:3): [True: 0, False: 3.62k]
  |  Branch (482:3): [True: 3.62k, False: 0]
  ------------------
  483|       |
  484|  3.62k|  dns->type = CURL_DNST_ADDR;
  ------------------
  |  |   41|  3.62k|#define CURL_DNST_ADDR      'A'
  ------------------
  485|       |  /* queries should only be about addresses */
  486|  3.62k|  DEBUGASSERT(!(dns_queries & ~CURL_DNSQ_ADDR));
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (486:3): [True: 0, False: 3.62k]
  |  Branch (486:3): [True: 3.62k, False: 0]
  ------------------
  487|  3.62k|  dns->dns_queries = (dns_queries & CURL_DNSQ_ADDR);
  ------------------
  |  |   55|  3.62k|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  ------------------
  |  |  |  |   51|  3.62k|#define CURL_DNSQ_A           (1U << 0)
  |  |  ------------------
  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  ------------------
  |  |  |  |   52|  3.62k|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  ------------------
  ------------------
  488|       |
  489|       |  /* Take the given address lists into the entry */
  490|  3.62k|  if(paddr1 && *paddr1) {
  ------------------
  |  Branch (490:6): [True: 3.62k, False: 0]
  |  Branch (490:16): [True: 3.62k, False: 0]
  ------------------
  491|  3.62k|    dns->addr = *paddr1;
  492|  3.62k|    *paddr1 = NULL;
  493|  3.62k|  }
  494|  3.62k|  if(paddr2 && *paddr2) {
  ------------------
  |  Branch (494:6): [True: 0, False: 3.62k]
  |  Branch (494:16): [True: 0, False: 0]
  ------------------
  495|      0|    struct Curl_addrinfo **phead = &dns->addr;
  496|      0|    while(*phead)
  ------------------
  |  Branch (496:11): [True: 0, False: 0]
  ------------------
  497|      0|      phead = &(*phead)->ai_next;
  498|      0|    *phead = *paddr2;
  499|      0|    *paddr2 = NULL;
  500|      0|  }
  501|       |
  502|  3.62k|  if((dns_queries & CURL_DNSQ_A) &&
  ------------------
  |  |   51|  3.62k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (502:6): [True: 3.62k, False: 0]
  ------------------
  503|  3.62k|     dnscache_ai_has_family(dns->addr, PF_INET))
  ------------------
  |  Branch (503:6): [True: 3.62k, False: 0]
  ------------------
  504|  3.62k|    dns->dns_responses |= CURL_DNSQ_A;
  ------------------
  |  |   51|  3.62k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  505|       |
  506|  3.62k|#ifdef USE_IPV6
  507|  3.62k|  if((dns_queries & CURL_DNSQ_AAAA) &&
  ------------------
  |  |   52|  3.62k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (507:6): [True: 3.62k, False: 0]
  ------------------
  508|  3.62k|     dnscache_ai_has_family(dns->addr, PF_INET6))
  ------------------
  |  Branch (508:6): [True: 0, False: 3.62k]
  ------------------
  509|      0|    dns->dns_responses |= CURL_DNSQ_AAAA;
  ------------------
  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  510|  3.62k|#endif /* USE_IPV6 */
  511|       |
  512|  3.62k|#ifndef CURL_DISABLE_SHUFFLE_DNS
  513|       |  /* shuffle addresses if requested */
  514|  3.62k|  if(data->set.dns_shuffle_addresses && dns->addr) {
  ------------------
  |  Branch (514:6): [True: 0, False: 3.62k]
  |  Branch (514:41): [True: 0, False: 0]
  ------------------
  515|      0|    CURLcode result = dns_shuffle_addr(data, &dns->addr);
  516|      0|    if(result) {
  ------------------
  |  Branch (516:8): [True: 0, False: 0]
  ------------------
  517|       |      /* free without lock, we are the sole owner */
  518|      0|      dnscache_entry_free(dns);
  519|      0|      dns = NULL;
  520|      0|      goto out;
  521|      0|    }
  522|      0|  }
  523|       |#else
  524|       |  (void)data;
  525|       |#endif
  526|       |
  527|  3.62k|out:
  528|  3.62k|  if(paddr1 && *paddr1) {
  ------------------
  |  Branch (528:6): [True: 3.62k, False: 0]
  |  Branch (528:16): [True: 0, False: 3.62k]
  ------------------
  529|      0|    Curl_freeaddrinfo(*paddr1);
  530|      0|    *paddr1 = NULL;
  531|      0|  }
  532|  3.62k|  if(paddr2 && *paddr2) {
  ------------------
  |  Branch (532:6): [True: 0, False: 3.62k]
  |  Branch (532:16): [True: 0, False: 0]
  ------------------
  533|      0|    Curl_freeaddrinfo(*paddr2);
  534|       |    *paddr2 = NULL;
  535|      0|  }
  536|  3.62k|  return dns;
  537|  3.62k|}
dnscache.c:dnscache_ai_has_family:
  433|  7.25k|{
  434|  10.8k|  for(; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (434:9): [True: 7.25k, False: 3.62k]
  ------------------
  435|  7.25k|    if(ai->ai_family == ai_family)
  ------------------
  |  Branch (435:8): [True: 3.62k, False: 3.62k]
  ------------------
  436|  3.62k|      return TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  437|  7.25k|  }
  438|  3.62k|  return FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  439|  7.25k|}
dnscache.c:dnsc_str2id:
   79|  3.62k|{
   80|  3.62k|  pid->name = *name;
   81|  3.62k|  pid->port = port;
   82|  3.62k|  pid->type = type;
   83|  3.62k|}
dnscache.c:dnsc_id2key:
   95|  7.25k|{
   96|  7.25k|  size_t namelen = curlx_strlen(&id->name);
  ------------------
  |  |   50|  7.25k|#define curlx_strlen(x) ((x)->len)
  ------------------
   97|  7.25k|  if(namelen > (sizeof(key->data) - 8))
  ------------------
  |  Branch (97:6): [True: 0, False: 7.25k]
  ------------------
   98|      0|    namelen = sizeof(key->data) - 8;
   99|       |  /* store and lower case the name */
  100|  7.25k|  key->data[0] = id->type;
  101|  7.25k|  Curl_strntolower(key->data + 1, curlx_str(&id->name), namelen);
  ------------------
  |  |   49|  7.25k|#define curlx_str(x)    ((x)->str)
  ------------------
  102|       |  /* include the terminating 0 in key length */
  103|  7.25k|  key->len = namelen + 2 +
  104|  7.25k|             curl_msnprintf(&key->data[namelen + 1], 7, ":%u", id->port);
  105|  7.25k|}
dnscache.c:dnscache_entry_free:
  108|  3.62k|{
  109|  3.62k|  Curl_freeaddrinfo(dns->addr);
  110|       |#ifdef USE_HTTPSRR
  111|       |  Curl_httpsrr_destroy(dns->hinfo);
  112|       |#endif
  113|  3.62k|  curlx_free(dns);
  ------------------
  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  114|  3.62k|}
dnscache.c:dnscache_entry_dtor:
  797|  3.62k|{
  798|  3.62k|  struct Curl_dns_entry *dns = (struct Curl_dns_entry *)entry;
  799|  3.62k|  DEBUGASSERT(dns && (dns->refcount > 0));
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (799:3): [True: 0, False: 3.62k]
  |  Branch (799:3): [True: 0, False: 0]
  |  Branch (799:3): [True: 3.62k, False: 0]
  |  Branch (799:3): [True: 3.62k, False: 0]
  ------------------
  800|  3.62k|  dns->refcount--;
  801|  3.62k|  if(dns->refcount == 0)
  ------------------
  |  Branch (801:6): [True: 3.62k, False: 0]
  ------------------
  802|  3.62k|    dnscache_entry_free(dns);
  803|  3.62k|}

Curl_resolv_dns_queries:
  126|  3.62k|{
  127|  3.62k|  (void)data;
  128|  3.62k|  switch(ip_version) {
  129|      0|  case CURL_IPRESOLVE_V6:
  ------------------
  |  | 2332|      0|#define CURL_IPRESOLVE_V6       2L /* uses only IPv6 addresses/connections */
  ------------------
  |  Branch (129:3): [True: 0, False: 3.62k]
  ------------------
  130|      0|    return CURL_DNSQ_AAAA;
  ------------------
  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  131|      0|  case CURL_IPRESOLVE_V4:
  ------------------
  |  | 2331|      0|#define CURL_IPRESOLVE_V4       1L /* uses only IPv4 addresses/connections */
  ------------------
  |  Branch (131:3): [True: 0, False: 3.62k]
  ------------------
  132|      0|    return CURL_DNSQ_A;
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  133|  3.62k|  default:
  ------------------
  |  Branch (133:3): [True: 3.62k, False: 0]
  ------------------
  134|  3.62k|    if(ipv6works(data))
  ------------------
  |  Branch (134:8): [True: 3.62k, False: 0]
  ------------------
  135|  3.62k|      return (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   51|  3.62k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                    return (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   52|  3.62k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  136|      0|    else
  137|      0|      return CURL_DNSQ_A;
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  138|  3.62k|  }
  139|  3.62k|}
Curl_probeipv6:
  290|  3.73k|{
  291|       |  /* probe to see if we have a working IPv6 stack */
  292|  3.73k|  curl_socket_t s = CURL_SOCKET(PF_INET6, SOCK_DGRAM, 0);
  ------------------
  |  | 1429|  3.73k|  curl_dbg_socket((int)(domain), type, protocol, __LINE__, __FILE__)
  ------------------
  293|  3.73k|  multi->ipv6_works = FALSE;
  ------------------
  |  | 1048|  3.73k|#define FALSE false
  ------------------
  294|  3.73k|  if(s == CURL_SOCKET_BAD) {
  ------------------
  |  |  147|  3.73k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (294:6): [True: 0, False: 3.73k]
  ------------------
  295|      0|    if(SOCKERRNO == SOCKENOMEM)
  ------------------
  |  | 1089|      0|#define SOCKERRNO         errno
  ------------------
                  if(SOCKERRNO == SOCKENOMEM)
  ------------------
  |  | 1127|      0|#define SOCKENOMEM        ENOMEM
  ------------------
  |  Branch (295:8): [True: 0, False: 0]
  ------------------
  296|      0|      return CURLE_OUT_OF_MEMORY;
  297|      0|  }
  298|  3.73k|  else {
  299|  3.73k|    multi->ipv6_works = TRUE;
  ------------------
  |  | 1045|  3.73k|#define TRUE true
  ------------------
  300|  3.73k|    sclose(s);
  ------------------
  |  | 1421|  3.73k|#define sclose(sockfd) curl_dbg_sclose(sockfd, __LINE__, __FILE__)
  ------------------
  301|  3.73k|  }
  302|  3.73k|  return CURLE_OK;
  303|  3.73k|}
Curl_host_is_ipnum:
  321|  11.2k|{
  322|  11.2k|  struct in_addr in;
  323|  11.2k|#ifdef USE_IPV6
  324|  11.2k|  struct in6_addr in6;
  325|  11.2k|#endif
  326|  11.2k|  if(curlx_inet_pton(AF_INET, hostname, &in) > 0
  ------------------
  |  Branch (326:6): [True: 0, False: 11.2k]
  ------------------
  327|  11.2k|#ifdef USE_IPV6
  328|  11.2k|     || curlx_inet_pton(AF_INET6, hostname, &in6) > 0
  ------------------
  |  Branch (328:9): [True: 22, False: 11.2k]
  ------------------
  329|  11.2k|#endif
  330|  11.2k|    )
  331|     22|    return TRUE;
  ------------------
  |  | 1045|     22|#define TRUE true
  ------------------
  332|  11.2k|  return FALSE;
  ------------------
  |  | 1048|  11.2k|#define FALSE false
  ------------------
  333|  11.2k|}
Curl_resolv_announce_start:
  364|  3.62k|{
  365|  3.62k|  if(data->set.resolver_start) {
  ------------------
  |  Branch (365:6): [True: 0, False: 3.62k]
  ------------------
  366|      0|    struct Curl_mapi_guard guard;
  367|      0|    int rc;
  368|       |
  369|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  370|      0|    CURL_CBAPI_START(&guard, data, easy_resolver_start);
  ------------------
  |  |  201|      0|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
  371|      0|    rc = data->set.resolver_start(resolver, NULL,
  372|      0|                                  data->set.resolver_start_client);
  373|      0|    CURL_CBAPI_END(&guard);
  ------------------
  |  |  205|      0|  Curl_cbapi_leave(g)
  ------------------
  374|      0|    if(rc) {
  ------------------
  |  Branch (374:8): [True: 0, False: 0]
  ------------------
  375|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  376|      0|      return CURLE_ABORTED_BY_CALLBACK;
  377|      0|    }
  378|      0|  }
  379|  3.62k|  return CURLE_OK;
  380|  3.62k|}
Curl_resolv:
 1031|  3.62k|{
 1032|  3.62k|  *presolv_id = 0;
 1033|  3.62k|  *pdns = NULL;
 1034|       |
 1035|  3.62k|  if(timeout_ms < 0)
  ------------------
  |  Branch (1035:6): [True: 0, False: 3.62k]
  ------------------
 1036|       |    /* got an already expired timeout */
 1037|      0|    return CURLE_OPERATION_TIMEDOUT;
 1038|  3.62k|  else if(!timeout_ms)
  ------------------
  |  Branch (1038:11): [True: 0, False: 3.62k]
  ------------------
 1039|      0|    timeout_ms = CURL_TIMEOUT_RESOLVE_MS;
  ------------------
  |  |   38|      0|#define CURL_TIMEOUT_RESOLVE_MS (300 * 1000)
  ------------------
 1040|       |
 1041|  3.62k|#ifdef USE_UNIX_SOCKETS
 1042|  3.62k|  if((dns_queries & CURL_DNSQ_ADDR) && peer->unix_socket)
  ------------------
  |  |   55|  3.62k|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  ------------------
  |  |  |  |   51|  3.62k|#define CURL_DNSQ_A           (1U << 0)
  |  |  ------------------
  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  ------------------
  |  |  |  |   52|  3.62k|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  ------------------
  ------------------
  |  Branch (1042:6): [True: 3.62k, False: 0]
  |  Branch (1042:40): [True: 0, False: 3.62k]
  ------------------
 1043|      0|    return resolv_unix(data, peer, pdns);
 1044|       |#else
 1045|       |  if(peer->unix_socket)
 1046|       |    return hostip_resolv_failed(data, peer, for_proxy);
 1047|       |#endif
 1048|       |
 1049|       |#ifdef USE_ALARM_TIMEOUT
 1050|       |  if(dns_queries & CURL_DNSQ_ADDR) {
 1051|       |    if(timeout_ms && data->set.no_signal) {
 1052|       |      /* Cannot use ALARM when signals are disabled */
 1053|       |      timeout_ms = 0;
 1054|       |    }
 1055|       |    if(timeout_ms && !Curl_doh_wanted(data)) {
 1056|       |      return resolv_alarm_timeout(data, dns_queries, peer, transport,
 1057|       |                                  for_proxy, timeout_ms, presolv_id, pdns);
 1058|       |    }
 1059|       |  }
 1060|       |#endif /* !USE_ALARM_TIMEOUT */
 1061|       |
 1062|       |#ifndef CURLRES_ASYNCH
 1063|       |  if(timeout_ms)
 1064|       |    infof(data, "timeout on name lookup is not supported");
 1065|       |#endif
 1066|       |
 1067|  3.62k|  return hostip_resolv(data, dns_queries, peer, transport,
 1068|       |                       for_proxy, timeout_ms, TRUE, presolv_id, pdns);
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
 1069|  3.62k|}
Curl_resolv_destroy:
 1152|  3.62k|{
 1153|  3.62k|  struct Curl_resolv_async **panchor = &data->state.async;
 1154|       |
 1155|  3.62k|  for(; *panchor; panchor = &(*panchor)->next) {
  ------------------
  |  Branch (1155:9): [True: 0, False: 3.62k]
  ------------------
 1156|      0|    struct Curl_resolv_async *async = *panchor;
 1157|      0|    if(async->id == resolv_id) {
  ------------------
  |  Branch (1157:8): [True: 0, False: 0]
  ------------------
 1158|      0|      *panchor = async->next;
 1159|      0|      Curl_async_destroy(data, async);
 1160|      0|      break;
 1161|      0|    }
 1162|      0|  }
 1163|  3.62k|}
Curl_resolv_shutdown_all:
 1166|  3.62k|{
 1167|  3.62k|  struct Curl_resolv_async *async = data->state.async;
 1168|  3.62k|  for(; async; async = async->next) {
  ------------------
  |  Branch (1168:9): [True: 0, False: 3.62k]
  ------------------
 1169|      0|    Curl_async_shutdown(data, async);
 1170|      0|  }
 1171|  3.62k|}
Curl_resolv_destroy_all:
 1174|  11.1k|{
 1175|  11.1k|  while(data->state.async) {
  ------------------
  |  Branch (1175:9): [True: 0, False: 11.1k]
  ------------------
 1176|      0|    struct Curl_resolv_async *async = data->state.async;
 1177|      0|    data->state.async = async->next;
 1178|      0|    Curl_async_destroy(data, async);
 1179|      0|  }
 1180|  11.1k|}
hostip.c:ipv6works:
  309|  3.62k|{
  310|  3.62k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (310:3): [True: 0, False: 3.62k]
  |  Branch (310:3): [True: 3.62k, False: 0]
  ------------------
  311|  3.62k|  DEBUGASSERT(data->multi);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (311:3): [True: 0, False: 3.62k]
  |  Branch (311:3): [True: 3.62k, False: 0]
  ------------------
  312|  3.62k|  return data ? data->multi->ipv6_works : FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  |  Branch (312:10): [True: 3.62k, False: 0]
  ------------------
  313|  3.62k|}
hostip.c:hostip_resolv:
  712|  3.62k|{
  713|  3.62k|  size_t hostname_len;
  714|  3.62k|  CURLcode result = RESOLV_FAIL(for_proxy);
  ------------------
  |  |   74|  3.62k|  ((for_proxy) ? CURLE_COULDNT_RESOLVE_PROXY : CURLE_COULDNT_RESOLVE_HOST)
  |  |  ------------------
  |  |  |  Branch (74:4): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  715|  3.62k|  bool cache_dns = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  716|  3.62k|  bool negative = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  717|       |
  718|  3.62k|  (void)timeout_ms; /* not used in all ifdefs */
  719|  3.62k|  *presolv_id = 0;
  720|  3.62k|  *pdns = NULL;
  721|       |
  722|       |#ifdef CURL_DISABLE_DOH
  723|       |  (void)allowDOH;
  724|       |#endif
  725|       |
  726|       |  /* We should intentionally error and not resolve .onion TLDs */
  727|  3.62k|  hostname_len = strlen(peer->hostname);
  728|  3.62k|  DEBUGASSERT(hostname_len);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (728:3): [True: 0, False: 3.62k]
  |  Branch (728:3): [True: 3.62k, False: 0]
  ------------------
  729|  3.62k|  if(hostname_len >= 7 &&
  ------------------
  |  Branch (729:6): [True: 3.62k, False: 0]
  ------------------
  730|  3.62k|     (curl_strequal(&peer->hostname[hostname_len - 6], ".onion") ||
  ------------------
  |  Branch (730:7): [True: 0, False: 3.62k]
  ------------------
  731|  3.62k|      curl_strequal(&peer->hostname[hostname_len - 7], ".onion."))) {
  ------------------
  |  Branch (731:7): [True: 0, False: 3.62k]
  ------------------
  732|      0|    failf(data, "Not resolving .onion address (RFC 7686)");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  733|      0|    goto out;
  734|      0|  }
  735|       |
  736|  3.62k|#ifdef DEBUGBUILD
  737|  3.62k|  CURL_TRC_DNS(data, "[%s] hostip_resolv(%s:%u)",
  ------------------
  |  |  168|  3.62k|  do {                                 \
  |  |  169|  3.62k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  3.62k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.62k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.62k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  3.62k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  738|  3.62k|               Curl_resolv_query_str(dns_queries), peer->hostname, peer->port);
  739|  3.62k|  if((CURL_DNSQ_IS_ADDR(dns_queries) == CURL_DNSQ_AAAA) &&
  ------------------
  |  |   56|  3.62k|#define CURL_DNSQ_IS_ADDR(x)  (uint8_t)((x)&(CURL_DNSQ_ADDR))
  |  |  ------------------
  |  |  |  |   55|  3.62k|#define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   51|  3.62k|#define CURL_DNSQ_A           (1U << 0)
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_DNSQ_ADDR        (uint8_t)(CURL_DNSQ_A | CURL_DNSQ_AAAA)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  3.62k|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                if((CURL_DNSQ_IS_ADDR(dns_queries) == CURL_DNSQ_AAAA) &&
  ------------------
  |  |   52|  3.62k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (739:6): [True: 0, False: 3.62k]
  ------------------
  740|      0|     getenv("CURL_DBG_RESOLV_FAIL_IPV6")) {
  ------------------
  |  Branch (740:6): [True: 0, False: 0]
  ------------------
  741|      0|    infof(data, "DEBUG fail ipv6 resolve");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  742|      0|    result = hostip_resolv_failed(data, peer, for_proxy);
  743|      0|    goto out;
  744|      0|  }
  745|  3.62k|#endif
  746|       |  /* Let's check our DNS cache first */
  747|  3.62k|  result = Curl_dnscache_get(data, dns_queries, peer, pdns);
  748|  3.62k|  if(*pdns) {
  ------------------
  |  Branch (748:6): [True: 0, False: 3.62k]
  ------------------
  749|      0|    infof(data, "Hostname %s was found in DNS cache", peer->hostname);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  750|      0|    result = CURLE_OK;
  751|      0|  }
  752|  3.62k|  else if(result) {
  ------------------
  |  Branch (752:11): [True: 0, False: 3.62k]
  ------------------
  753|      0|    infof(data, "Negative DNS entry");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  754|      0|    result = hostip_resolv_failed(data, peer, for_proxy);
  755|      0|  }
  756|  3.62k|  else {
  757|       |    /* No luck, we need to start resolving. */
  758|  3.62k|    cache_dns = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  759|  3.62k|    result = hostip_resolv_start(data, dns_queries, peer, transport,
  760|  3.62k|                                 for_proxy, timeout_ms, allowDOH,
  761|  3.62k|                                 presolv_id, pdns, &negative);
  762|  3.62k|    CURL_TRC_DNS(data, "[%s] hostip_resolv started -> %d",
  ------------------
  |  |  168|  3.62k|  do {                                 \
  |  |  169|  3.62k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  3.62k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  329|  3.62k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  330|  3.62k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  3.62k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  763|  3.62k|                 Curl_resolv_query_str(dns_queries), (int)result);
  764|  3.62k|  }
  765|       |
  766|  3.62k|out:
  767|  3.62k|  if(result && (result != CURLE_AGAIN)) {
  ------------------
  |  Branch (767:6): [True: 0, False: 3.62k]
  |  Branch (767:16): [True: 0, False: 0]
  ------------------
  768|      0|    Curl_dns_entry_unlink(data, pdns);
  769|      0|    if(IS_RESOLV_FAIL(result)) {
  ------------------
  |  |   77|      0|  (((result) == CURLE_COULDNT_RESOLVE_HOST) || \
  |  |  ------------------
  |  |  |  Branch (77:4): [True: 0, False: 0]
  |  |  ------------------
  |  |   78|      0|   ((result) == CURLE_COULDNT_RESOLVE_PROXY))
  |  |  ------------------
  |  |  |  Branch (78:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  770|      0|      if(cache_dns && negative)
  ------------------
  |  Branch (770:10): [True: 0, False: 0]
  |  Branch (770:23): [True: 0, False: 0]
  ------------------
  771|      0|        Curl_dnscache_add_negative(data, dns_queries, peer);
  772|      0|      if(dns_queries & (CURL_DNSQ_A | CURL_DNSQ_AAAA))
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                    if(dns_queries & (CURL_DNSQ_A | CURL_DNSQ_AAAA))
  ------------------
  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (772:10): [True: 0, False: 0]
  ------------------
  773|      0|        failf(data, "Could not resolve: %s:%u", peer->hostname, peer->port);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  774|      0|    }
  775|      0|    else {
  776|      0|      failf(data, "Error %d resolving %s:%u",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  777|      0|            (int)result, peer->hostname, peer->port);
  778|      0|    }
  779|      0|  }
  780|  3.62k|  else if(cache_dns && *pdns) {
  ------------------
  |  Branch (780:11): [True: 3.62k, False: 0]
  |  Branch (780:24): [True: 3.62k, False: 0]
  ------------------
  781|  3.62k|    result = Curl_dnscache_add(data, *pdns);
  782|  3.62k|    if(result)
  ------------------
  |  Branch (782:8): [True: 0, False: 3.62k]
  ------------------
  783|      0|      Curl_dns_entry_unlink(data, pdns);
  784|  3.62k|  }
  785|       |
  786|  3.62k|  return result;
  787|  3.62k|}
hostip.c:hostip_resolv_start:
  567|  3.62k|{
  568|  3.62k|#ifdef USE_CURL_ASYNC
  569|  3.62k|  struct Curl_resolv_async *async = NULL;
  570|  3.62k|#endif
  571|  3.62k|  struct Curl_addrinfo *addr = NULL;
  572|  3.62k|  size_t hostname_len;
  573|  3.62k|  bool addr_queries = (dns_queries & (CURL_DNSQ_A | CURL_DNSQ_AAAA));
  ------------------
  |  |   51|  3.62k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                bool addr_queries = (dns_queries & (CURL_DNSQ_A | CURL_DNSQ_AAAA));
  ------------------
  |  |   52|  3.62k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  574|  3.62k|  CURLcode result = CURLE_OK;
  575|       |
  576|  3.62k|  *pnegative = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  577|       |
  578|  3.62k|  (void)timeout_ms; /* not in all ifdefs */
  579|  3.62k|  *presolv_id = 0;
  580|  3.62k|  *pdns = NULL;
  581|       |
  582|       |  /* Check for "known" things to resolve ourselves. */
  583|  3.62k|  if(addr_queries) {
  ------------------
  |  Branch (583:6): [True: 3.62k, False: 0]
  ------------------
  584|  3.62k|#ifndef USE_RESOLVE_ON_IPS
  585|  3.62k|    if(Curl_is_ipaddr(peer->hostname)) {
  ------------------
  |  Branch (585:8): [True: 3.62k, False: 0]
  ------------------
  586|       |      /* test655 verifies that the announce is done, even though there
  587|       |       * is no real resolving. So, keep doing this. */
  588|  3.62k|      result = Curl_resolv_announce_start(data, NULL);
  589|  3.62k|      if(result)
  ------------------
  |  Branch (589:10): [True: 0, False: 3.62k]
  ------------------
  590|      0|        goto out;
  591|       |      /* shortcut literal IP addresses, if we are not told to resolve them. */
  592|  3.62k|      result = Curl_str2addr(peer->hostname, peer->port, &addr);
  593|  3.62k|      goto out;
  594|  3.62k|    }
  595|      0|#endif
  596|       |
  597|      0|    hostname_len = strlen(peer->hostname);
  598|      0|    if(curl_strequal(peer->hostname, "localhost") ||
  ------------------
  |  Branch (598:8): [True: 0, False: 0]
  ------------------
  599|      0|       curl_strequal(peer->hostname, "localhost.") ||
  ------------------
  |  Branch (599:8): [True: 0, False: 0]
  ------------------
  600|      0|       tailmatch(peer->hostname, hostname_len, STRCONST(".localhost")) ||
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (600:8): [True: 0, False: 0]
  ------------------
  601|      0|       tailmatch(peer->hostname, hostname_len, STRCONST(".localhost."))) {
  ------------------
  |  | 1297|      0|#define STRCONST(x) x, CURL_CSTRLEN(x)
  |  |  ------------------
  |  |  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  |  |  ------------------
  ------------------
  |  Branch (601:8): [True: 0, False: 0]
  ------------------
  602|      0|      result = Curl_resolv_announce_start(data, NULL);
  603|      0|      if(result)
  ------------------
  |  Branch (603:10): [True: 0, False: 0]
  ------------------
  604|      0|        goto out;
  605|      0|      addr = get_localhost(peer->port, peer->hostname);
  606|      0|      if(!addr)
  ------------------
  |  Branch (606:10): [True: 0, False: 0]
  ------------------
  607|      0|        result = CURLE_OUT_OF_MEMORY;
  608|      0|      goto out;
  609|      0|    }
  610|      0|  }
  611|      0|#ifndef CURL_DISABLE_DOH
  612|      0|  if(!Curl_is_ipaddr(peer->hostname) && allowDOH && data->set.doh) {
  ------------------
  |  Branch (612:6): [True: 0, False: 0]
  |  Branch (612:41): [True: 0, False: 0]
  |  Branch (612:53): [True: 0, False: 0]
  ------------------
  613|      0|    result = Curl_resolv_announce_start(data, NULL);
  614|      0|    if(result)
  ------------------
  |  Branch (614:8): [True: 0, False: 0]
  ------------------
  615|      0|      goto out;
  616|      0|    if(!async) {
  ------------------
  |  Branch (616:8): [True: 0, False: 0]
  ------------------
  617|      0|      async = hostip_async_new(data, dns_queries, peer, transport,
  618|      0|                               for_proxy, timeout_ms);
  619|      0|      if(!async) {
  ------------------
  |  Branch (619:10): [True: 0, False: 0]
  ------------------
  620|      0|        result = CURLE_OUT_OF_MEMORY;
  621|      0|        goto out;
  622|      0|      }
  623|      0|    }
  624|      0|    result = Curl_doh(data, async);
  625|      0|    goto out;
  626|      0|  }
  627|       |#else
  628|       |  (void)allowDOH;
  629|       |#endif
  630|       |
  631|       |  /* Can we provide the requested IP specifics in resolving? */
  632|      0|  if(!can_resolve_dns_queries(data, dns_queries)) {
  ------------------
  |  Branch (632:6): [True: 0, False: 0]
  ------------------
  633|      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]
  |  |  ------------------
  ------------------
  634|      0|    goto out;
  635|      0|  }
  636|       |
  637|      0|#ifdef CURLRES_ASYNCH
  638|      0|  (void)addr;
  639|      0|  if(!async) {
  ------------------
  |  Branch (639:6): [True: 0, False: 0]
  ------------------
  640|      0|    async = hostip_async_new(data, dns_queries, peer, transport,
  641|      0|                             for_proxy, timeout_ms);
  642|      0|    if(!async) {
  ------------------
  |  Branch (642:8): [True: 0, False: 0]
  ------------------
  643|      0|      result = CURLE_OUT_OF_MEMORY;
  644|      0|      goto out;
  645|      0|    }
  646|      0|  }
  647|      0|  result = Curl_async_getaddrinfo(data, async);
  648|      0|  if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (648:6): [True: 0, False: 0]
  ------------------
  649|       |    /* the answer might be there already. Check. */
  650|      0|    CURLcode r2 = hostip_resolv_take_result(data, async, pdns);
  651|      0|    if(r2)
  ------------------
  |  Branch (651:8): [True: 0, False: 0]
  ------------------
  652|      0|      result = r2;
  653|      0|    else if(*pdns)
  ------------------
  |  Branch (653:13): [True: 0, False: 0]
  ------------------
  654|      0|      result = CURLE_OK;
  655|      0|  }
  656|       |#else
  657|       |  result = Curl_resolv_announce_start(data, NULL);
  658|       |  if(result)
  659|       |    goto out;
  660|       |  addr = Curl_sync_getaddrinfo(data, dns_queries, peer->hostname, peer->port,
  661|       |                               transport);
  662|       |  if(!addr) {
  663|       |    result = RESOLV_FAIL(for_proxy);
  664|       |    /* the synchronous resolvers do not tell a transient failure from
  665|       |       an authoritative negative answer, treat it as before */
  666|       |    *pnegative = TRUE;
  667|       |  }
  668|       |#endif
  669|       |
  670|  3.62k|out:
  671|  3.62k|  if(!result) {
  ------------------
  |  Branch (671:6): [True: 3.62k, False: 0]
  ------------------
  672|  3.62k|    if(addr) {
  ------------------
  |  Branch (672:8): [True: 3.62k, False: 0]
  ------------------
  673|       |      /* we got a response, create a dns entry, add to cache, return */
  674|  3.62k|      DEBUGASSERT(!*pdns);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (674:7): [True: 0, False: 3.62k]
  |  Branch (674:7): [True: 3.62k, False: 0]
  ------------------
  675|  3.62k|      *pdns = Curl_dnsc_mk_addr(data, dns_queries, &addr, peer);
  676|  3.62k|      if(!*pdns)
  ------------------
  |  Branch (676:10): [True: 0, False: 3.62k]
  ------------------
  677|      0|        result = CURLE_OUT_OF_MEMORY;
  678|  3.62k|    }
  679|      0|    else if(!*pdns)
  ------------------
  |  Branch (679:13): [True: 0, False: 0]
  ------------------
  680|      0|      result = CURLE_AGAIN;
  681|  3.62k|  }
  682|      0|  else if(*pdns)
  ------------------
  |  Branch (682:11): [True: 0, False: 0]
  ------------------
  683|      0|    Curl_dns_entry_unlink(data, pdns);
  684|      0|  else if(addr)
  ------------------
  |  Branch (684:11): [True: 0, False: 0]
  ------------------
  685|      0|    Curl_freeaddrinfo(addr);
  686|       |
  687|  3.62k|#ifdef USE_CURL_ASYNC
  688|  3.62k|  if(async) {
  ------------------
  |  Branch (688:6): [True: 0, False: 3.62k]
  ------------------
  689|      0|    if(result == CURLE_AGAIN) { /* still need it, link, return id. */
  ------------------
  |  Branch (689:8): [True: 0, False: 0]
  ------------------
  690|      0|      *presolv_id = async->id;
  691|      0|      async->next = data->state.async;
  692|      0|      data->state.async = async;
  693|      0|    }
  694|      0|    else {
  695|      0|      *pnegative = !!async->negative_answer;
  696|      0|      Curl_async_destroy(data, async);
  697|      0|    }
  698|      0|  }
  699|  3.62k|#endif
  700|  3.62k|  return result;
  701|  3.62k|}

Curl_cert_hostcheck:
  122|  3.62k|{
  123|  3.62k|  if(match && *match && hostname && *hostname)
  ------------------
  |  Branch (123:6): [True: 3.62k, False: 0]
  |  Branch (123:15): [True: 3.62k, False: 0]
  |  Branch (123:25): [True: 3.62k, False: 0]
  |  Branch (123:37): [True: 3.62k, False: 0]
  ------------------
  124|  3.62k|    return hostmatch(hostname, hostlen, match, matchlen);
  125|      0|  return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  126|  3.62k|}
hostcheck.c:hostmatch:
   78|  3.62k|{
   79|  3.62k|  const char *pattern_label_end;
   80|       |
   81|  3.62k|  DEBUGASSERT(pattern);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (81:3): [True: 0, False: 3.62k]
  |  Branch (81:3): [True: 3.62k, False: 0]
  ------------------
   82|  3.62k|  DEBUGASSERT(patternlen);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (82:3): [True: 0, False: 3.62k]
  |  Branch (82:3): [True: 3.62k, False: 0]
  ------------------
   83|  3.62k|  DEBUGASSERT(hostname);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (83:3): [True: 0, False: 3.62k]
  |  Branch (83:3): [True: 3.62k, False: 0]
  ------------------
   84|  3.62k|  DEBUGASSERT(hostlen);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (84:3): [True: 0, False: 3.62k]
  |  Branch (84:3): [True: 3.62k, False: 0]
  ------------------
   85|       |
   86|       |  /* normalize pattern and hostname by stripping off trailing dots */
   87|  3.62k|  if(hostname[hostlen - 1] == '.')
  ------------------
  |  Branch (87:6): [True: 0, False: 3.62k]
  ------------------
   88|      0|    hostlen--;
   89|  3.62k|  if(pattern[patternlen - 1] == '.')
  ------------------
  |  Branch (89:6): [True: 0, False: 3.62k]
  ------------------
   90|      0|    patternlen--;
   91|       |
   92|  3.62k|  if(strncmp(pattern, "*.", 2))
  ------------------
  |  Branch (92:6): [True: 3.62k, False: 0]
  ------------------
   93|  3.62k|    return pmatch(hostname, hostlen, pattern, patternlen);
   94|       |
   95|       |  /* detect host as IP address or starting with a dot and fail if so */
   96|      0|  else if(Curl_host_is_ipnum(hostname) || (hostname[0] == '.'))
  ------------------
  |  Branch (96:11): [True: 0, False: 0]
  |  Branch (96:43): [True: 0, False: 0]
  ------------------
   97|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
   98|       |
   99|       |  /* We require at least 2 dots in the pattern to avoid too wide wildcard
  100|       |     match. */
  101|      0|  pattern_label_end = memchr(pattern, '.', patternlen);
  102|      0|  if(!pattern_label_end ||
  ------------------
  |  Branch (102:6): [True: 0, False: 0]
  ------------------
  103|      0|     (memrchr(pattern, '.', patternlen) == pattern_label_end))
  ------------------
  |  Branch (103:6): [True: 0, False: 0]
  ------------------
  104|      0|    return pmatch(hostname, hostlen, pattern, patternlen);
  105|      0|  else {
  106|      0|    const char *hostname_label_end = memchr(hostname, '.', hostlen);
  107|      0|    if(hostname_label_end) {
  ------------------
  |  Branch (107:8): [True: 0, False: 0]
  ------------------
  108|      0|      size_t skiphost = hostname_label_end - hostname;
  109|      0|      size_t skiplen = pattern_label_end - pattern;
  110|      0|      return pmatch(hostname_label_end, hostlen - skiphost,
  111|      0|                    pattern_label_end, patternlen - skiplen);
  112|      0|    }
  113|      0|  }
  114|      0|  return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  115|      0|}
hostcheck.c:pmatch:
   44|  3.62k|{
   45|  3.62k|  if(hostlen != patternlen)
  ------------------
  |  Branch (45:6): [True: 0, False: 3.62k]
  ------------------
   46|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
   47|  3.62k|  return curl_strnequal(hostname, pattern, hostlen);
   48|  3.62k|}

Curl_tls_keylog_open:
   39|      2|{
   40|      2|  if(!keylog_file_fp) {
  ------------------
  |  Branch (40:6): [True: 2, False: 0]
  ------------------
   41|      2|    keylog_file_name = getenv("SSLKEYLOGFILE");
   42|      2|    if(keylog_file_name) {
  ------------------
  |  Branch (42:8): [True: 0, False: 2]
  ------------------
   43|      0|      keylog_file_fp = curlx_fopen(keylog_file_name, FOPEN_APPENDTEXT);
  ------------------
  |  |   76|      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);
  ------------------
  |  |   81|      0|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
   52|       |          keylog_file_fp = NULL;
   53|      0|        }
   54|      0|      }
   55|      0|    }
   56|      2|  }
   57|      2|}
Curl_tls_keylog_enabled:
   68|  7.25k|{
   69|  7.25k|  return !!keylog_file_fp;
   70|  7.25k|}

Curl_ossl_add_session:
 2632|  7.16k|{
 2633|  7.16k|  struct Curl_ssl_session *sc_session = NULL, *sc_dup = NULL;
 2634|  7.16k|  unsigned char *der_session_buf = NULL;
 2635|  7.16k|  unsigned char *qtp_clone = NULL;
 2636|  7.16k|  CURLcode result = CURLE_OK;
 2637|       |
 2638|  7.16k|  if(psession)
  ------------------
  |  Branch (2638:6): [True: 7.16k, False: 0]
  ------------------
 2639|  7.16k|    *psession = NULL;
 2640|  7.16k|  if(!cf || !data)
  ------------------
  |  Branch (2640:6): [True: 0, False: 7.16k]
  |  Branch (2640:13): [True: 0, False: 7.16k]
  ------------------
 2641|      0|    goto out;
 2642|       |
 2643|  7.16k|  if(Curl_ssl_scache_use(cf, data)) {
  ------------------
  |  Branch (2643:6): [True: 7.16k, False: 0]
  ------------------
 2644|  7.16k|    size_t der_session_size;
 2645|  7.16k|    unsigned char *der_session_ptr;
 2646|  7.16k|    size_t earlydata_max = 0;
 2647|  7.16k|    int ietf_tls_id = SSL_version(octx->ssl);
 2648|       |
 2649|  7.16k|    der_session_size = i2d_SSL_SESSION(session, NULL);
 2650|  7.16k|    if(der_session_size == 0) {
  ------------------
  |  Branch (2650:8): [True: 0, False: 7.16k]
  ------------------
 2651|      0|      result = CURLE_OUT_OF_MEMORY;
 2652|      0|      goto out;
 2653|      0|    }
 2654|       |
 2655|  7.16k|    der_session_buf = der_session_ptr = curlx_malloc(der_session_size);
  ------------------
  |  | 1471|  7.16k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
 2656|  7.16k|    if(!der_session_buf) {
  ------------------
  |  Branch (2656:8): [True: 0, False: 7.16k]
  ------------------
 2657|      0|      result = CURLE_OUT_OF_MEMORY;
 2658|      0|      goto out;
 2659|      0|    }
 2660|       |
 2661|  7.16k|    der_session_size = i2d_SSL_SESSION(session, &der_session_ptr);
 2662|  7.16k|    if(der_session_size == 0) {
  ------------------
  |  Branch (2662:8): [True: 0, False: 7.16k]
  ------------------
 2663|      0|      result = CURLE_OUT_OF_MEMORY;
 2664|      0|      goto out;
 2665|      0|    }
 2666|       |
 2667|  7.16k|#ifdef HAVE_OPENSSL_EARLYDATA
 2668|  7.16k|    earlydata_max = SSL_SESSION_get_max_early_data(session);
 2669|  7.16k|#endif
 2670|  7.16k|    if(quic_tp && quic_tp_len) {
  ------------------
  |  Branch (2670:8): [True: 0, False: 7.16k]
  |  Branch (2670:19): [True: 0, False: 0]
  ------------------
 2671|      0|      qtp_clone = curlx_memdup0((const char *)quic_tp, quic_tp_len);
 2672|      0|      if(!qtp_clone) {
  ------------------
  |  Branch (2672:10): [True: 0, False: 0]
  ------------------
 2673|      0|        result = CURLE_OUT_OF_MEMORY;
 2674|      0|        goto out;
 2675|      0|      }
 2676|      0|    }
 2677|       |
 2678|  7.16k|    result = Curl_ssl_session_create2(der_session_buf, der_session_size,
 2679|  7.16k|                                      ietf_tls_id, alpn,
 2680|  7.16k|                                      (curl_off_t)time(NULL) +
 2681|  7.16k|                                        SSL_SESSION_get_timeout(session),
 2682|  7.16k|                                      earlydata_max, qtp_clone, quic_tp_len,
 2683|  7.16k|                                      &sc_session);
 2684|  7.16k|    der_session_buf = NULL;  /* took ownership of sdata */
 2685|       |#ifdef USE_APPLE_SECTRUST
 2686|       |    if(!result)
 2687|       |      sc_session->sectrust_verified = octx->sectrust_verified;
 2688|       |#endif
 2689|  7.16k|    if(!result && psession &&  /* return a duplicate if asked for and FTP */
  ------------------
  |  Branch (2689:8): [True: 7.16k, False: 0]
  |  Branch (2689:19): [True: 7.16k, False: 0]
  ------------------
 2690|  7.16k|       (cf->conn->scheme->family == CURLPROTO_FTP)) {
  ------------------
  |  | 1090|  7.16k|#define CURLPROTO_FTP     (1L << 2)
  ------------------
  |  Branch (2690:8): [True: 0, False: 7.16k]
  ------------------
 2691|      0|        result = Curl_ssl_session_dup(sc_session, &sc_dup);
 2692|      0|    }
 2693|  7.16k|    if(!result) {
  ------------------
  |  Branch (2693:8): [True: 7.16k, False: 0]
  ------------------
 2694|  7.16k|      result = Curl_ssl_scache_put(cf, data, ssl_peer_key, sc_session);
 2695|       |      /* took ownership of `sc_session` */
 2696|  7.16k|      sc_session = NULL;
 2697|  7.16k|    }
 2698|  7.16k|  }
 2699|       |
 2700|  7.16k|out:
 2701|  7.16k|  curlx_free(der_session_buf);
  ------------------
  |  | 1476|  7.16k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2702|  7.16k|  if(!result && psession) {
  ------------------
  |  Branch (2702:6): [True: 7.16k, False: 0]
  |  Branch (2702:17): [True: 7.16k, False: 0]
  ------------------
 2703|  7.16k|    *psession = sc_dup;
 2704|       |    sc_dup = NULL;
 2705|  7.16k|  }
 2706|  7.16k|  Curl_ssl_session_destroy(sc_session);
 2707|  7.16k|  Curl_ssl_session_destroy(sc_dup);
 2708|  7.16k|  return result;
 2709|  7.16k|}
Curl_ssl_setup_x509_store:
 3293|  3.62k|{
 3294|  3.62k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 3295|  3.62k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 3296|  3.62k|  CURLcode result = CURLE_OK;
 3297|  3.62k|  X509_STORE *cached_store;
 3298|  3.62k|  bool cache_criteria_met, is_empty;
 3299|       |
 3300|       |  /* Consider the X509 store cacheable if it comes exclusively from a CAfile,
 3301|       |     or no source is provided and we are falling back to OpenSSL's built-in
 3302|       |     default. */
 3303|  3.62k|  cache_criteria_met = (data->set.general_ssl.ca_cache_timeout != 0) &&
  ------------------
  |  Branch (3303:24): [True: 3.62k, False: 0]
  ------------------
 3304|  3.62k|    conn_config->verifypeer &&
  ------------------
  |  Branch (3304:5): [True: 3.55k, False: 75]
  ------------------
 3305|  3.55k|    !conn_config->CApath &&
  ------------------
  |  Branch (3305:5): [True: 0, False: 3.55k]
  ------------------
 3306|      0|    !conn_config->ca_info_blob &&
  ------------------
  |  Branch (3306:5): [True: 0, False: 0]
  ------------------
 3307|      0|    !ssl_config->primary.CRLfile &&
  ------------------
  |  Branch (3307:5): [True: 0, False: 0]
  ------------------
 3308|      0|    !conn_config->native_ca_store;
  ------------------
  |  Branch (3308:5): [True: 0, False: 0]
  ------------------
 3309|       |
 3310|  3.62k|  ERR_set_mark();
 3311|       |
 3312|  3.62k|  cached_store = ossl_get_cached_x509_store(cf, data, &is_empty);
 3313|  3.62k|  if(cached_store && cache_criteria_met && X509_STORE_up_ref(cached_store)) {
  ------------------
  |  Branch (3313:6): [True: 0, False: 3.62k]
  |  Branch (3313:22): [True: 0, False: 0]
  |  Branch (3313:44): [True: 0, False: 0]
  ------------------
 3314|      0|    SSL_CTX_set_cert_store(octx->ssl_ctx, cached_store);
 3315|      0|    octx->store_is_empty = is_empty;
 3316|      0|  }
 3317|  3.62k|  else {
 3318|  3.62k|    X509_STORE *store = SSL_CTX_get_cert_store(octx->ssl_ctx);
 3319|       |
 3320|  3.62k|    result = ossl_populate_x509_store(cf, data, octx, store);
 3321|  3.62k|    if(result == CURLE_OK && cache_criteria_met) {
  ------------------
  |  Branch (3321:8): [True: 3.62k, False: 0]
  |  Branch (3321:30): [True: 0, False: 3.62k]
  ------------------
 3322|      0|      ossl_set_cached_x509_store(cf, data, store, (bool)octx->store_is_empty);
 3323|      0|    }
 3324|  3.62k|  }
 3325|       |
 3326|  3.62k|  ERR_pop_to_mark();
 3327|       |
 3328|  3.62k|  return result;
 3329|  3.62k|}
Curl_ossl_need_httpsrr:
 3596|  3.62k|{
 3597|  3.62k|  (void)data;
 3598|       |  return FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
 3599|  3.62k|}
Curl_ossl_ctx_init:
 3710|  3.62k|{
 3711|  3.62k|  CURLcode result = CURLE_OK;
 3712|  3.62k|  const char *ciphers;
 3713|  3.62k|  const SSL_METHOD *req_method = NULL;
 3714|  3.62k|  ctx_option_t ctx_options = 0;
 3715|  3.62k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 3716|  3.62k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 3717|  3.62k|  char * const ssl_cert = ssl_config->primary.clientcert;
 3718|  3.62k|  const struct curl_blob *ssl_cert_blob = ssl_config->primary.cert_blob;
 3719|  3.62k|  const char * const ssl_cert_type = ssl_config->primary.cert_type;
 3720|  3.62k|  unsigned int ssl_version_min;
 3721|  3.62k|  char error_buffer[256];
 3722|       |
 3723|       |  /* Make funny stuff to get random input */
 3724|  3.62k|  result = ossl_seed(data);
 3725|  3.62k|  if(result)
  ------------------
  |  Branch (3725:6): [True: 0, False: 3.62k]
  ------------------
 3726|      0|    return result;
 3727|       |
 3728|  3.62k|  ssl_config->certverifyresult = !X509_V_OK;
 3729|       |
 3730|  3.62k|  result = ossl_init_method(cf, data, peer, &req_method, &ssl_version_min);
 3731|  3.62k|  if(result)
  ------------------
  |  Branch (3731:6): [True: 0, False: 3.62k]
  ------------------
 3732|      0|    return result;
 3733|  3.62k|  DEBUGASSERT(req_method);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3733:3): [True: 0, False: 3.62k]
  |  Branch (3733:3): [True: 3.62k, False: 0]
  ------------------
 3734|       |
 3735|  3.62k|  DEBUGASSERT(!octx->ssl_ctx);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3735:3): [True: 0, False: 3.62k]
  |  Branch (3735:3): [True: 3.62k, False: 0]
  ------------------
 3736|  3.62k|  octx->ssl_ctx =
 3737|  3.62k|#ifdef OPENSSL_HAS_PROVIDERS
 3738|  3.62k|    data->state.libctx ?
  ------------------
  |  Branch (3738:5): [True: 0, False: 3.62k]
  ------------------
 3739|      0|    SSL_CTX_new_ex(data->state.libctx, data->state.propq, req_method):
 3740|  3.62k|#endif
 3741|  3.62k|    SSL_CTX_new(req_method);
 3742|       |
 3743|  3.62k|  if(!octx->ssl_ctx) {
  ------------------
  |  Branch (3743:6): [True: 0, False: 3.62k]
  ------------------
 3744|      0|    failf(data, "SSL: could not create a context: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3745|      0|          ossl_strerror(ERR_peek_error(), error_buffer, sizeof(error_buffer)));
 3746|      0|    return CURLE_OUT_OF_MEMORY;
 3747|      0|  }
 3748|  3.62k|#ifdef OPENSSL_HAS_PROVIDERS
 3749|  3.62k|  if(data->state.libctx)
  ------------------
  |  Branch (3749:6): [True: 0, False: 3.62k]
  ------------------
 3750|       |    /* forbid connection reuse with provider/engine use */
 3751|      0|    connclose(data->conn);
  ------------------
  |  |   90|      0|#define connclose(x)   Curl_conncontrol((x), CONNCTRL_CONN_CLOSE)
  |  |  ------------------
  |  |  |  |   84|      0|#define CONNCTRL_CONN_CLOSE      1
  |  |  ------------------
  ------------------
 3752|  3.62k|#endif
 3753|       |
 3754|  3.62k|  if(cb_setup) {
  ------------------
  |  Branch (3754:6): [True: 0, False: 3.62k]
  ------------------
 3755|      0|    result = cb_setup(cf, data, cb_user_data);
 3756|      0|    if(result)
  ------------------
  |  Branch (3756:8): [True: 0, False: 0]
  ------------------
 3757|      0|      return result;
 3758|      0|  }
 3759|       |
 3760|  3.62k|  if(data->set.fdebug && data->set.verbose &&
  ------------------
  |  Branch (3760:6): [True: 0, False: 3.62k]
  |  Branch (3760:26): [True: 0, False: 0]
  ------------------
 3761|      0|     (peer->transport != TRNSPRT_QUIC)) {
  ------------------
  |  |  240|      0|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (3761:6): [True: 0, False: 0]
  ------------------
 3762|       |    /* the SSL trace callback is only used for verbose logging;
 3763|       |     * QUIC connections use a different TLS record format that
 3764|       |     * ossl_trace cannot handle */
 3765|      0|    SSL_CTX_set_msg_callback(octx->ssl_ctx, ossl_trace);
 3766|      0|    SSL_CTX_set_msg_callback_arg(octx->ssl_ctx, cf);
 3767|      0|  }
 3768|       |
 3769|       |  /* OpenSSL contains code to work around lots of bugs and flaws in various
 3770|       |     SSL-implementations. SSL_CTX_set_options() is used to enable those
 3771|       |     workarounds. The man page for this option states that SSL_OP_ALL enables
 3772|       |     all the workarounds and that "It is usually safe to use SSL_OP_ALL to
 3773|       |     enable the bug workaround options if compatibility with somewhat broken
 3774|       |     implementations is desired."
 3775|       |
 3776|       |     The "-no_ticket" option was introduced in OpenSSL 0.9.8j. it is a flag to
 3777|       |     disable "rfc4507bis session ticket support". rfc4507bis was later turned
 3778|       |     into the proper RFC5077: https://datatracker.ietf.org/doc/html/rfc5077
 3779|       |
 3780|       |     The enabled extension concerns the session management. I wonder how often
 3781|       |     libcurl stops a connection and then resumes a TLS session. Also, sending
 3782|       |     the session data is some overhead. I suggest that you use your proposed
 3783|       |     patch (which explicitly disables TICKET).
 3784|       |
 3785|       |     If someone writes an application with libcurl and OpenSSL who wants to
 3786|       |     enable the feature, one can do this in the SSL callback.
 3787|       |
 3788|       |     SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG option enabling allowed proper
 3789|       |     interoperability with web server Netscape Enterprise Server 2.0.1 which
 3790|       |     was released back in 1996.
 3791|       |
 3792|       |     Due to CVE-2010-4180, option SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG has
 3793|       |     become ineffective as of OpenSSL 0.9.8q and 1.0.0c. In order to mitigate
 3794|       |     CVE-2010-4180 when using previous OpenSSL versions we no longer enable
 3795|       |     this option regardless of OpenSSL version and SSL_OP_ALL definition.
 3796|       |
 3797|       |     OpenSSL added a workaround for an SSL 3.0/TLS 1.0 CBC vulnerability:
 3798|       |     https://web.archive.org/web/20240114184648/openssl.org/~bodo/tls-cbc.txt.
 3799|       |     In 0.9.6e they added a bit to SSL_OP_ALL that _disables_ that workaround
 3800|       |     despite the fact that SSL_OP_ALL is documented to do "rather harmless"
 3801|       |     workarounds. In order to keep the secure workaround, the
 3802|       |     SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS bit must not be set. */
 3803|       |
 3804|  3.62k|  ctx_options = SSL_OP_ALL | SSL_OP_NO_TICKET | SSL_OP_NO_COMPRESSION;
 3805|       |
 3806|       |  /* mitigate CVE-2010-4180 */
 3807|  3.62k|  ctx_options &= ~(ctx_option_t)SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG;
 3808|       |
 3809|       |  /* unless the user explicitly asks to allow the protocol vulnerability we
 3810|       |     use the workaround */
 3811|  3.62k|  if(!ssl_config->enable_beast)
  ------------------
  |  Branch (3811:6): [True: 3.62k, False: 0]
  ------------------
 3812|  3.62k|    ctx_options &= ~(ctx_option_t)SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS;
 3813|       |
 3814|  3.62k|  DEBUGASSERT(ssl_version_min != CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3814:3): [True: 0, False: 3.62k]
  |  Branch (3814:3): [True: 3.62k, False: 0]
  ------------------
 3815|  3.62k|  switch(ssl_version_min) {
 3816|      0|  case CURL_SSLVERSION_SSLv2:
  ------------------
  |  | 2396|      0|#define CURL_SSLVERSION_SSLv2   2L
  ------------------
  |  Branch (3816:3): [True: 0, False: 3.62k]
  ------------------
 3817|      0|  case CURL_SSLVERSION_SSLv3:
  ------------------
  |  | 2397|      0|#define CURL_SSLVERSION_SSLv3   3L
  ------------------
  |  Branch (3817:3): [True: 0, False: 3.62k]
  ------------------
 3818|      0|    return CURLE_NOT_BUILT_IN;
 3819|       |
 3820|       |    /* "--tlsv<x.y>" options mean TLS >= version <x.y> */
 3821|      0|  case CURL_SSLVERSION_TLSv1:   /* TLS >= version 1.0 */
  ------------------
  |  | 2395|      0|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  ------------------
  |  Branch (3821:3): [True: 0, False: 3.62k]
  ------------------
 3822|      0|  case CURL_SSLVERSION_TLSv1_0: /* TLS >= version 1.0 */
  ------------------
  |  | 2398|      0|#define CURL_SSLVERSION_TLSv1_0 4L
  ------------------
  |  Branch (3822:3): [True: 0, False: 3.62k]
  ------------------
 3823|      0|  case CURL_SSLVERSION_TLSv1_1: /* TLS >= version 1.1 */
  ------------------
  |  | 2399|      0|#define CURL_SSLVERSION_TLSv1_1 5L
  ------------------
  |  Branch (3823:3): [True: 0, False: 3.62k]
  ------------------
 3824|  3.62k|  case CURL_SSLVERSION_TLSv1_2: /* TLS >= version 1.2 */
  ------------------
  |  | 2400|  3.62k|#define CURL_SSLVERSION_TLSv1_2 6L
  ------------------
  |  Branch (3824:3): [True: 3.62k, False: 0]
  ------------------
 3825|  3.62k|  case CURL_SSLVERSION_TLSv1_3: /* TLS >= version 1.3 */
  ------------------
  |  | 2401|  3.62k|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
  |  Branch (3825:3): [True: 0, False: 3.62k]
  ------------------
 3826|       |    /* asking for any TLS version as the minimum, means no SSL versions
 3827|       |       allowed */
 3828|  3.62k|    ctx_options |= SSL_OP_NO_SSLv2;
 3829|  3.62k|    ctx_options |= SSL_OP_NO_SSLv3;
 3830|       |
 3831|  3.62k|    result = ossl_set_ssl_version_min_max(cf, octx->ssl_ctx, ssl_version_min);
 3832|  3.62k|    if(result)
  ------------------
  |  Branch (3832:8): [True: 0, False: 3.62k]
  ------------------
 3833|      0|      return result;
 3834|  3.62k|    break;
 3835|       |
 3836|  3.62k|  default:
  ------------------
  |  Branch (3836:3): [True: 0, False: 3.62k]
  ------------------
 3837|      0|    failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3838|      0|    return CURLE_SSL_CONNECT_ERROR;
 3839|  3.62k|  }
 3840|       |
 3841|  3.62k|  SSL_CTX_set_options(octx->ssl_ctx, ctx_options);
 3842|  3.62k|  SSL_CTX_set_read_ahead(octx->ssl_ctx, 1);
 3843|       |
 3844|       |  /* Max TLS1.2 record size 0x4000 + 0x800.
 3845|       |     OpenSSL supports processing "jumbo TLS record" (8 TLS records) in one go
 3846|       |     for some algorithms, so match that here.
 3847|       |     Experimentation shows that a slightly larger buffer is needed
 3848|       |     to avoid short reads.
 3849|       |
 3850|       |     However using a large buffer (8 packets) actually decreases performance.
 3851|       |     4 packets is better.
 3852|       |   */
 3853|  3.62k|#ifdef HAVE_SSL_CTX_SET_DEFAULT_READ_BUFFER_LEN
 3854|  3.62k|  SSL_CTX_set_default_read_buffer_len(octx->ssl_ctx, 0x401e * 4);
 3855|  3.62k|#endif
 3856|       |
 3857|       |  /* We do retry writes sometimes from another buffer address */
 3858|  3.62k|  SSL_CTX_set_mode(octx->ssl_ctx, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
 3859|       |
 3860|  3.62k|  ciphers = conn_config->cipher_list;
 3861|  3.62k|  if(!ciphers && (peer->transport != TRNSPRT_QUIC))
  ------------------
  |  |  240|  3.62k|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (3861:6): [True: 3.62k, False: 0]
  |  Branch (3861:18): [True: 3.62k, False: 0]
  ------------------
 3862|  3.62k|    ciphers = NULL;
 3863|  3.62k|  if(ciphers && (ssl_version_min < CURL_SSLVERSION_TLSv1_3)) {
  ------------------
  |  | 2401|      0|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
  |  Branch (3863:6): [True: 0, False: 3.62k]
  |  Branch (3863:17): [True: 0, False: 0]
  ------------------
 3864|      0|    if(!SSL_CTX_set_cipher_list(octx->ssl_ctx, ciphers)) {
  ------------------
  |  Branch (3864:8): [True: 0, False: 0]
  ------------------
 3865|      0|      failf(data, "failed setting cipher list: %s", ciphers);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3866|      0|      return CURLE_SSL_CIPHER;
 3867|      0|    }
 3868|      0|    infof(data, "Cipher selection: %s", ciphers);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3869|      0|  }
 3870|       |
 3871|  3.62k|#ifdef HAVE_SSL_CTX_SET_CIPHERSUITES
 3872|  3.62k|  {
 3873|  3.62k|    const char *ciphers13 = conn_config->cipher_list13;
 3874|  3.62k|    if(ciphers13 &&
  ------------------
  |  Branch (3874:8): [True: 0, False: 3.62k]
  ------------------
 3875|      0|       (!conn_config->version_max ||
  ------------------
  |  Branch (3875:9): [True: 0, False: 0]
  ------------------
 3876|      0|        (conn_config->version_max == CURL_SSLVERSION_MAX_DEFAULT) ||
  ------------------
  |  | 2406|      0|#define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1   << 16)
  |  |  ------------------
  |  |  |  | 2395|      0|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  |  |  ------------------
  ------------------
  |  Branch (3876:9): [True: 0, False: 0]
  ------------------
 3877|      0|        (conn_config->version_max >= CURL_SSLVERSION_MAX_TLSv1_3))) {
  ------------------
  |  | 2410|      0|#define CURL_SSLVERSION_MAX_TLSv1_3 (CURL_SSLVERSION_TLSv1_3 << 16)
  |  |  ------------------
  |  |  |  | 2401|      0|#define CURL_SSLVERSION_TLSv1_3 7L
  |  |  ------------------
  ------------------
  |  Branch (3877:9): [True: 0, False: 0]
  ------------------
 3878|      0|      if(!SSL_CTX_set_ciphersuites(octx->ssl_ctx, ciphers13)) {
  ------------------
  |  Branch (3878:10): [True: 0, False: 0]
  ------------------
 3879|      0|        failf(data, "failed setting TLS 1.3 cipher suite: %s", ciphers13);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3880|      0|        return CURLE_SSL_CIPHER;
 3881|      0|      }
 3882|      0|      infof(data, "TLS 1.3 cipher selection: %s", ciphers13);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3883|      0|    }
 3884|  3.62k|  }
 3885|  3.62k|#endif
 3886|       |
 3887|  3.62k|  if(ssl_cert || ssl_cert_blob || ssl_cert_type) {
  ------------------
  |  Branch (3887:6): [True: 0, False: 3.62k]
  |  Branch (3887:18): [True: 0, False: 3.62k]
  |  Branch (3887:35): [True: 0, False: 3.62k]
  ------------------
 3888|      0|    result = client_cert(data, octx->ssl_ctx,
 3889|      0|                         ssl_cert, ssl_cert_blob, ssl_cert_type,
 3890|      0|                         ssl_config->primary.key, ssl_config->primary.key_blob,
 3891|      0|                         ssl_config->primary.key_type,
 3892|      0|                         ssl_config->primary.key_passwd);
 3893|      0|    if(result)
  ------------------
  |  Branch (3893:8): [True: 0, False: 0]
  ------------------
 3894|       |      /* failf() is already done in client_cert() */
 3895|      0|      return result;
 3896|      0|  }
 3897|       |
 3898|  3.62k|#ifdef HAVE_SSL_CTX_SET_POST_HANDSHAKE_AUTH
 3899|       |  /* OpenSSL 1.1.1 requires clients to opt-in for PHA */
 3900|  3.62k|  SSL_CTX_set_post_handshake_auth(octx->ssl_ctx, 1);
 3901|  3.62k|#endif
 3902|       |
 3903|  3.62k|  {
 3904|  3.62k|    const char *curves = conn_config->curves;
 3905|  3.62k|    if(curves) {
  ------------------
  |  Branch (3905:8): [True: 0, False: 3.62k]
  ------------------
 3906|       |#ifdef HAVE_BORINGSSL_LIKE
 3907|       |#define OSSL_CURVE_CAST(x) (x)
 3908|       |#else
 3909|      0|#define OSSL_CURVE_CAST(x) (char *)CURL_UNCONST(x)
 3910|      0|#endif
 3911|      0|      if(!SSL_CTX_set1_curves_list(octx->ssl_ctx, OSSL_CURVE_CAST(curves))) {
  ------------------
  |  Branch (3911:10): [True: 0, False: 0]
  ------------------
 3912|      0|        failf(data, "failed setting curves list: '%s'", curves);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3913|      0|        return CURLE_SSL_CIPHER;
 3914|      0|      }
 3915|      0|    }
 3916|  3.62k|  }
 3917|       |
 3918|  3.62k|#ifdef HAVE_SSL_CTX_SET1_SIGALGS
 3919|  3.62k|#define OSSL_SIGALG_CAST(x) OSSL_CURVE_CAST(x)
 3920|  3.62k|  {
 3921|  3.62k|    const char *signature_algorithms = conn_config->signature_algorithms;
 3922|  3.62k|    if(signature_algorithms) {
  ------------------
  |  Branch (3922:8): [True: 0, False: 3.62k]
  ------------------
 3923|      0|      if(!SSL_CTX_set1_sigalgs_list(octx->ssl_ctx,
  ------------------
  |  Branch (3923:10): [True: 0, False: 0]
  ------------------
 3924|      0|                                    OSSL_SIGALG_CAST(signature_algorithms))) {
 3925|      0|        failf(data, "failed setting signature algorithms: '%s'",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3926|      0|              signature_algorithms);
 3927|      0|        return CURLE_SSL_CIPHER;
 3928|      0|      }
 3929|      0|    }
 3930|  3.62k|  }
 3931|  3.62k|#endif
 3932|       |
 3933|       |  /* OpenSSL always tries to verify the peer. By setting the failure mode
 3934|       |   * to NONE, we allow the connect to complete, regardless of the outcome.
 3935|       |   * We then explicitly check the result and may try alternatives like
 3936|       |   * Apple's SecTrust for verification. */
 3937|  3.62k|  SSL_CTX_set_verify(octx->ssl_ctx, SSL_VERIFY_NONE, NULL);
 3938|       |
 3939|       |  /* Enable logging of secrets to the file specified in env SSLKEYLOGFILE. */
 3940|  3.62k|#if !defined(HAVE_KEYLOG_UPSTREAM) && defined(HAVE_KEYLOG_CALLBACK)
 3941|  3.62k|  if(Curl_tls_keylog_enabled()) {
  ------------------
  |  Branch (3941:6): [True: 0, False: 3.62k]
  ------------------
 3942|      0|    SSL_CTX_set_keylog_callback(octx->ssl_ctx, ossl_keylog_callback);
 3943|      0|  }
 3944|  3.62k|#endif
 3945|       |
 3946|  3.62k|  if(cb_new_session) {
  ------------------
  |  Branch (3946:6): [True: 3.62k, False: 0]
  ------------------
 3947|       |    /* Enable the session cache because it is a prerequisite for the
 3948|       |     * "new session" callback. Use the "external storage" mode to prevent
 3949|       |     * OpenSSL from creating an internal session cache.
 3950|       |     */
 3951|  3.62k|    SSL_CTX_set_session_cache_mode(octx->ssl_ctx,
 3952|  3.62k|                                   SSL_SESS_CACHE_CLIENT |
 3953|  3.62k|                                   SSL_SESS_CACHE_NO_INTERNAL);
 3954|  3.62k|    SSL_CTX_sess_set_new_cb(octx->ssl_ctx, cb_new_session);
 3955|  3.62k|  }
 3956|       |
 3957|       |  /* give application a chance to interfere with SSL set up. */
 3958|  3.62k|  if(data->set.ssl.fsslctx) {
  ------------------
  |  Branch (3958:6): [True: 0, False: 3.62k]
  ------------------
 3959|      0|    struct Curl_mapi_guard guard;
 3960|       |    /* When a user callback is installed to modify the SSL_CTX,
 3961|       |     * we need to do the full initialization before calling it.
 3962|       |     * See: #11800 */
 3963|      0|    if(!octx->x509_store_setup) {
  ------------------
  |  Branch (3963:8): [True: 0, False: 0]
  ------------------
 3964|      0|      result = Curl_ssl_setup_x509_store(cf, data, octx);
 3965|      0|      if(result)
  ------------------
  |  Branch (3965:10): [True: 0, False: 0]
  ------------------
 3966|      0|        return result;
 3967|      0|      octx->x509_store_setup = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 3968|      0|    }
 3969|      0|    CURL_CBAPI_START(&guard, data, easy_fsslctx);
  ------------------
  |  |  201|      0|  Curl_cbapi_enter((g), (d), NULL, CURL_CBAPI_FN_##fn)
  ------------------
 3970|      0|    result = (*data->set.ssl.fsslctx)(data, octx->ssl_ctx,
 3971|      0|                                      data->set.ssl.fsslctxp);
 3972|      0|    CURL_CBAPI_END(&guard);
  ------------------
  |  |  205|      0|  Curl_cbapi_leave(g)
  ------------------
 3973|      0|    if(result) {
  ------------------
  |  Branch (3973:8): [True: 0, False: 0]
  ------------------
 3974|      0|      failf(data, "error signaled by SSL ctx callback");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3975|      0|      return result;
 3976|      0|    }
 3977|      0|  }
 3978|       |
 3979|  3.62k|  return ossl_init_ssl(octx, cf, data, peer, alpns_requested,
 3980|  3.62k|                       ssl_user_data, sess_reuse_cb);
 3981|  3.62k|}
Curl_ossl_report_handshake:
 3998|  3.62k|{
 3999|  3.62k|#ifdef CURLVERBOSE
 4000|  3.62k|  if(Curl_trc_is_verbose(data)) {
  ------------------
  |  |  322|  3.62k|  ((data) && (data)->set.verbose &&                        \
  |  |  ------------------
  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  ------------------
  |  |  323|  3.62k|   (!(data)->state.feat ||                                 \
  |  |  ------------------
  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4001|      0|    int psigtype_nid = NID_undef;
 4002|      0|    const char *negotiated_group_name = NULL;
 4003|       |
 4004|      0|#ifdef HAVE_OPENSSL3
 4005|      0|    SSL_get_peer_signature_type_nid(octx->ssl, &psigtype_nid);
 4006|      0|#if OPENSSL_VERSION_NUMBER >= 0x30200000L
 4007|      0|    negotiated_group_name = SSL_get0_group_name(octx->ssl);
 4008|       |#else
 4009|       |    negotiated_group_name =
 4010|       |      OBJ_nid2sn(SSL_get_negotiated_group(octx->ssl) & 0x0000FFFF);
 4011|       |#endif
 4012|      0|#endif
 4013|       |
 4014|       |    /* Informational message */
 4015|      0|    infof(data, "SSL connection using %s / %s / %s / %s",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
 4016|      0|          SSL_get_version(octx->ssl),
 4017|      0|          SSL_get_cipher(octx->ssl),
 4018|      0|          negotiated_group_name ? negotiated_group_name : "[blank]",
 4019|      0|          OBJ_nid2sn(psigtype_nid));
 4020|      0|  }
 4021|       |#else
 4022|       |  (void)data;
 4023|       |  (void)octx;
 4024|       |#endif /* CURLVERBOSE */
 4025|  3.62k|}
Curl_ossl_check_peer_cert:
 4776|  3.62k|{
 4777|  3.62k|  struct connectdata *conn = cf->conn;
 4778|  3.62k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 4779|  3.62k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 4780|  3.62k|  CURLcode result = CURLE_OK;
 4781|  3.62k|  long ossl_verify;
 4782|  3.62k|  X509 *server_cert;
 4783|  3.62k|  bool verified = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
 4784|       |
 4785|  3.62k|  if(data->set.ssl.certinfo && !octx->reused_session) {
  ------------------
  |  Branch (4785:6): [True: 10, False: 3.61k]
  |  Branch (4785:32): [True: 10, False: 0]
  ------------------
 4786|       |    /* asked to gather certificate info. Reused sessions do not have cert
 4787|       |       chains */
 4788|     10|    result = ossl_certchain(data, octx->ssl);
 4789|     10|    if(result)
  ------------------
  |  Branch (4789:8): [True: 0, False: 10]
  ------------------
 4790|      0|      return result;
 4791|     10|  }
 4792|       |
 4793|  3.62k|  server_cert = SSL_get1_peer_certificate(octx->ssl);
 4794|  3.62k|  if(!server_cert) {
  ------------------
  |  Branch (4794:6): [True: 0, False: 3.62k]
  ------------------
 4795|       |    /* no verification at all, this maybe acceptable */
 4796|      0|    if(!(conn_config->verifypeer || conn_config->verifyhost) &&
  ------------------
  |  Branch (4796:10): [True: 0, False: 0]
  |  Branch (4796:37): [True: 0, False: 0]
  ------------------
 4797|      0|       !pinned(cf, data))
  ------------------
  |  Branch (4797:8): [True: 0, False: 0]
  ------------------
 4798|      0|      goto out;
 4799|       |
 4800|      0|    failf(data, "SSL: could not get peer certificate");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4801|      0|    result = CURLE_PEER_FAILED_VERIFICATION;
 4802|      0|    goto out;
 4803|      0|  }
 4804|       |
 4805|  3.62k|#ifdef CURLVERBOSE
 4806|  3.62k|  result = ossl_infof_cert(cf, data, server_cert);
 4807|  3.62k|  if(result)
  ------------------
  |  Branch (4807:6): [True: 0, False: 3.62k]
  ------------------
 4808|      0|    goto out;
 4809|  3.62k|  infof_certstack(data, octx->ssl);
 4810|  3.62k|#endif
 4811|       |
 4812|  3.62k|  if(conn_config->verifyhost) {
  ------------------
  |  Branch (4812:6): [True: 3.62k, False: 0]
  ------------------
 4813|  3.62k|    result = ossl_verifyhost(data, conn, peer, server_cert);
 4814|  3.62k|    if(result)
  ------------------
  |  Branch (4814:8): [True: 0, False: 3.62k]
  ------------------
 4815|      0|      goto out;
 4816|  3.62k|  }
 4817|       |  /* `verifyhost` is either OK or not requested from here on */
 4818|       |
 4819|  3.62k|  ossl_verify = SSL_get_verify_result(octx->ssl);
 4820|  3.62k|  ssl_config->certverifyresult = ossl_verify;
 4821|  3.62k|  infof(data, "OpenSSL verify result: %lx", (unsigned long)ossl_verify);
  ------------------
  |  |  143|  3.62k|  do {                               \
  |  |  144|  3.62k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  3.62k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  ------------------
  |  |  |  |  323|  3.62k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  3.62k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
 4822|       |
 4823|  3.62k|  verified = (ossl_verify == X509_V_OK);
 4824|  3.62k|  if(verified)
  ------------------
  |  Branch (4824:6): [True: 3.55k, False: 75]
  ------------------
 4825|  3.55k|    infof(data, "SSL certificate verified via OpenSSL.");
  ------------------
  |  |  143|  3.55k|  do {                               \
  |  |  144|  3.55k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  3.55k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 3.55k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.55k]
  |  |  |  |  ------------------
  |  |  |  |  323|  3.55k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  3.55k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  3.55k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 3.55k]
  |  |  ------------------
  ------------------
 4826|       |
 4827|       |#ifdef USE_APPLE_SECTRUST
 4828|       |  if(!verified && conn_config->verifypeer && conn_config->native_ca_store) {
 4829|       |    /* we verify using Apple SecTrust *unless* OpenSSL already verified.
 4830|       |     * This may happen if the application intercepted the OpenSSL callback
 4831|       |     * and installed its own. */
 4832|       |    result = ossl_apple_verify(cf, data, octx, peer);
 4833|       |    if(result && (result != CURLE_PEER_FAILED_VERIFICATION))
 4834|       |      goto out; /* unexpected error */
 4835|       |    if(octx->sectrust_verified) {
 4836|       |      infof(data, "SSL certificate verified via Apple SecTrust.");
 4837|       |      ssl_config->certverifyresult = X509_V_OK;
 4838|       |      verified = TRUE;
 4839|       |    }
 4840|       |  }
 4841|       |#endif
 4842|       |
 4843|  3.62k|  if(!verified) {
  ------------------
  |  Branch (4843:6): [True: 75, False: 3.55k]
  ------------------
 4844|       |    /* no trust established, report the OpenSSL status */
 4845|     75|    if(conn_config->verifypeer) {
  ------------------
  |  Branch (4845:8): [True: 0, False: 75]
  ------------------
 4846|      0|      failf(data, "SSL certificate OpenSSL verify result: %s (%ld)",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4847|      0|            X509_verify_cert_error_string(ossl_verify), ossl_verify);
 4848|      0|      result = CURLE_PEER_FAILED_VERIFICATION;
 4849|      0|      goto out;
 4850|      0|    }
 4851|     75|    infof(data, " SSL certificate verification failed, continuing anyway!");
  ------------------
  |  |  143|     75|  do {                               \
  |  |  144|     75|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|     75|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 75, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 75]
  |  |  |  |  ------------------
  |  |  |  |  323|     75|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     75|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     75|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 75]
  |  |  ------------------
  ------------------
 4852|     75|  }
 4853|       |
 4854|  3.62k|#ifndef OPENSSL_NO_OCSP
 4855|  3.62k|  if(conn_config->verifystatus &&
  ------------------
  |  Branch (4855:6): [True: 0, False: 3.62k]
  ------------------
 4856|       |#ifdef USE_APPLE_SECTRUST
 4857|       |     !octx->sectrust_verified && /* already verified via sectrust, cannot
 4858|       |                                  * verifystate via OpenSSL in that case as it
 4859|       |                                  * does not have the trust anchors */
 4860|       |#endif
 4861|      0|     !octx->reused_session) {
  ------------------
  |  Branch (4861:6): [True: 0, False: 0]
  ------------------
 4862|       |    /* do not do this after Session ID reuse */
 4863|      0|    result = verifystatus(cf, data, octx);
 4864|      0|    if(result)
  ------------------
  |  Branch (4864:8): [True: 0, False: 0]
  ------------------
 4865|      0|      goto out;
 4866|      0|  }
 4867|  3.62k|#endif
 4868|       |
 4869|  3.62k|  result = ossl_check_issuer(cf, data, server_cert);
 4870|  3.62k|  if(result)
  ------------------
  |  Branch (4870:6): [True: 0, False: 3.62k]
  ------------------
 4871|      0|    goto out;
 4872|       |
 4873|  3.62k|  result = ossl_check_pinned_key(cf, data, server_cert);
 4874|       |
 4875|  3.62k|out:
 4876|  3.62k|  X509_free(server_cert);
 4877|  3.62k|  return result;
 4878|  3.62k|}
Curl_ossl_version:
 5431|  3.62k|{
 5432|       |#ifdef LIBRESSL_VERSION_NUMBER
 5433|       |  char *p;
 5434|       |  size_t count;
 5435|       |  const char *ver = OpenSSL_version(OPENSSL_VERSION);
 5436|       |  static const char expected[] = OSSL_PACKAGE " "; /* ie "LibreSSL " */
 5437|       |  if(curl_strnequal(ver, expected, CURL_CSTRLEN(expected))) {
 5438|       |    ver += CURL_CSTRLEN(expected);
 5439|       |  }
 5440|       |  count = curl_msnprintf(buffer, size, "%s/%s", OSSL_PACKAGE, ver);
 5441|       |  for(p = buffer; *p; ++p) {
 5442|       |    if(ISBLANK(*p))
 5443|       |      *p = '_';
 5444|       |  }
 5445|       |  return count;
 5446|       |#elif defined(OPENSSL_IS_AWSLC)
 5447|       |  return curl_msnprintf(buffer, size, "%s/%s",
 5448|       |                        OSSL_PACKAGE, AWSLC_VERSION_NUMBER_STRING);
 5449|       |#elif defined(OPENSSL_IS_BORINGSSL)
 5450|       |#ifdef CURL_BORINGSSL_VERSION
 5451|       |  return curl_msnprintf(buffer, size, "%s/%s",
 5452|       |                        OSSL_PACKAGE, CURL_BORINGSSL_VERSION);
 5453|       |#else
 5454|       |  return curl_msnprintf(buffer, size, OSSL_PACKAGE);
 5455|       |#endif
 5456|       |#else /* OpenSSL 3+ */
 5457|  3.62k|  return curl_msnprintf(buffer, size, "%s/%s",
 5458|  3.62k|                        OSSL_PACKAGE, OpenSSL_version(OPENSSL_VERSION_STRING));
  ------------------
  |  |  163|  3.62k|#define OSSL_PACKAGE "OpenSSL"
  ------------------
 5459|  3.62k|#endif
 5460|  3.62k|}
openssl.c:ossl_get_cached_x509_store:
 3215|  3.62k|{
 3216|  3.62k|  struct Curl_multi *multi = data->multi;
 3217|  3.62k|  struct ossl_x509_share *share;
 3218|  3.62k|  X509_STORE *store = NULL;
 3219|       |
 3220|  3.62k|  DEBUGASSERT(multi);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3220:3): [True: 0, False: 3.62k]
  |  Branch (3220:3): [True: 3.62k, False: 0]
  ------------------
 3221|  3.62k|  *pempty = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
 3222|  3.62k|  share = multi ? Curl_hash_pick(&multi->proto_hash,
  ------------------
  |  Branch (3222:11): [True: 3.62k, False: 0]
  ------------------
 3223|  3.62k|                                 CURL_UNCONST(MPROTO_OSSL_X509_KEY),
  ------------------
  |  |  856|  3.62k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 3224|  3.62k|                                 CURL_CSTRLEN(MPROTO_OSSL_X509_KEY)) : NULL;
  ------------------
  |  | 1292|  3.62k|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  ------------------
 3225|  3.62k|  if(share && share->store &&
  ------------------
  |  Branch (3225:6): [True: 0, False: 3.62k]
  |  Branch (3225:15): [True: 0, False: 0]
  ------------------
 3226|      0|     !ossl_cached_x509_store_expired(data, share) &&
  ------------------
  |  Branch (3226:6): [True: 0, False: 0]
  ------------------
 3227|      0|     !ossl_cached_x509_store_different(cf, data, share)) {
  ------------------
  |  Branch (3227:6): [True: 0, False: 0]
  ------------------
 3228|      0|    store = share->store;
 3229|      0|    *pempty = (bool)share->store_is_empty;
 3230|      0|  }
 3231|       |
 3232|  3.62k|  return store;
 3233|  3.62k|}
openssl.c:ossl_populate_x509_store:
 3100|  3.62k|{
 3101|  3.62k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 3102|  3.62k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 3103|  3.62k|  CURLcode result = CURLE_OK;
 3104|  3.62k|  X509_LOOKUP *lookup = NULL;
 3105|  3.62k|  const char * const ssl_crlfile = ssl_config->primary.CRLfile;
 3106|  3.62k|  unsigned long x509flags = 0;
 3107|       |
 3108|  3.62k|  CURL_TRC_CF(data, cf, "configuring OpenSSL's x509 trust store");
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
 3109|  3.62k|  if(!store)
  ------------------
  |  Branch (3109:6): [True: 0, False: 3.62k]
  ------------------
 3110|      0|    return CURLE_OUT_OF_MEMORY;
 3111|       |
 3112|  3.62k|  if(!conn_config->verifypeer) {
  ------------------
  |  Branch (3112:6): [True: 75, False: 3.55k]
  ------------------
 3113|     75|    infof(data, "SSL Trust: peer verification disabled");
  ------------------
  |  |  143|     75|  do {                               \
  |  |  144|     75|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|     75|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 75, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 75]
  |  |  |  |  ------------------
  |  |  |  |  323|     75|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     75|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     75|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 75]
  |  |  ------------------
  ------------------
 3114|     75|    return CURLE_OK;
 3115|     75|  }
 3116|       |
 3117|  3.55k|  infof(data, "SSL Trust Anchors:");
  ------------------
  |  |  143|  3.55k|  do {                               \
  |  |  144|  3.55k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  3.55k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 3.55k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.55k]
  |  |  |  |  ------------------
  |  |  |  |  323|  3.55k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  3.55k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  3.55k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 3.55k]
  |  |  ------------------
  ------------------
 3118|  3.55k|  result = ossl_load_trust_anchors(cf, data, octx, store);
 3119|  3.55k|  if(result)
  ------------------
  |  Branch (3119:6): [True: 0, False: 3.55k]
  ------------------
 3120|      0|    return result;
 3121|       |
 3122|       |  /* Does not make sense to load a CRL file without peer verification */
 3123|  3.55k|  if(ssl_crlfile) {
  ------------------
  |  Branch (3123:6): [True: 0, False: 3.55k]
  ------------------
 3124|       |    /* tell OpenSSL where to find CRL file that is used to check certificate
 3125|       |     * revocation */
 3126|      0|    lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file());
 3127|      0|    if(!lookup ||
  ------------------
  |  Branch (3127:8): [True: 0, False: 0]
  ------------------
 3128|      0|       (!X509_load_crl_file(lookup, ssl_crlfile, X509_FILETYPE_PEM))) {
  ------------------
  |  Branch (3128:8): [True: 0, False: 0]
  ------------------
 3129|      0|      failf(data, "error loading CRL file: %s", ssl_crlfile);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3130|      0|      return CURLE_SSL_CRL_BADFILE;
 3131|      0|    }
 3132|      0|    x509flags = X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL;
 3133|      0|    infof(data, " CRLfile: %s", ssl_crlfile);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3134|      0|  }
 3135|       |
 3136|       |  /* Try building a chain using issuers in the trusted store first to avoid
 3137|       |     problems with server-sent legacy intermediates. Newer versions of
 3138|       |     OpenSSL do alternate chain checking by default but we do not know how to
 3139|       |     determine that in a reliable manner.
 3140|       |     https://web.archive.org/web/20190422050538/rt.openssl.org/Ticket/Display.html?id=3621
 3141|       |   */
 3142|  3.55k|  x509flags |= X509_V_FLAG_TRUSTED_FIRST;
 3143|       |
 3144|  3.55k|  if(!ssl_config->no_partialchain && !ssl_crlfile) {
  ------------------
  |  Branch (3144:6): [True: 3.55k, False: 0]
  |  Branch (3144:38): [True: 3.55k, False: 0]
  ------------------
 3145|       |    /* Have intermediate certificates in the trust store be treated as
 3146|       |       trust-anchors, in the same way as self-signed root CA certificates are.
 3147|       |       This allows users to verify servers using the intermediate cert only,
 3148|       |       instead of needing the whole chain.
 3149|       |
 3150|       |       Due to OpenSSL bug https://github.com/openssl/openssl/issues/5081 we
 3151|       |       cannot do partial chains with a CRL check. */
 3152|  3.55k|    x509flags |= X509_V_FLAG_PARTIAL_CHAIN;
 3153|  3.55k|  }
 3154|  3.55k|  (void)X509_STORE_set_flags(store, x509flags);
 3155|       |
 3156|  3.55k|  return result;
 3157|  3.55k|}
openssl.c:ossl_load_trust_anchors:
 2990|  3.55k|{
 2991|  3.55k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 2992|  3.55k|  CURLcode result = CURLE_OK;
 2993|  3.55k|  const char * const ssl_cafile =
 2994|       |    /* CURLOPT_CAINFO_BLOB overrides CURLOPT_CAINFO */
 2995|  3.55k|    (conn_config->ca_info_blob ? NULL : conn_config->CAfile);
  ------------------
  |  Branch (2995:6): [True: 3.55k, False: 0]
  ------------------
 2996|  3.55k|  const char * const ssl_capath = conn_config->CApath;
 2997|  3.55k|  bool have_native_check = FALSE;
  ------------------
  |  | 1048|  3.55k|#define FALSE false
  ------------------
 2998|       |
 2999|  3.55k|  octx->store_is_empty = TRUE;
  ------------------
  |  | 1045|  3.55k|#define TRUE true
  ------------------
 3000|  3.55k|  if(conn_config->native_ca_store) {
  ------------------
  |  Branch (3000:6): [True: 0, False: 3.55k]
  ------------------
 3001|       |#ifdef USE_WIN32_CRYPTO
 3002|       |    bool added = FALSE;
 3003|       |    result = ossl_windows_load_anchors(cf, data, store, &added);
 3004|       |    if(result)
 3005|       |      return result;
 3006|       |    if(added) {
 3007|       |      infof(data, "  Native: Windows System Stores ROOT+CA");
 3008|       |      octx->store_is_empty = FALSE;
 3009|       |    }
 3010|       |#elif defined(USE_APPLE_SECTRUST)
 3011|       |    infof(data, "  Native: Apple SecTrust");
 3012|       |    have_native_check = TRUE;
 3013|       |#endif
 3014|      0|  }
 3015|       |
 3016|  3.55k|  if(conn_config->ca_info_blob) {
  ------------------
  |  Branch (3016:6): [True: 3.55k, False: 0]
  ------------------
 3017|  3.55k|    result = load_cacert_from_memory(store, conn_config->ca_info_blob);
 3018|  3.55k|    if(result) {
  ------------------
  |  Branch (3018:8): [True: 0, False: 3.55k]
  ------------------
 3019|      0|      failf(data, "error adding trust anchors from certificate blob: %d",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3020|      0|            (int)result);
 3021|      0|      return result;
 3022|      0|    }
 3023|  3.55k|    infof(data, "  CA Blob from configuration");
  ------------------
  |  |  143|  3.55k|  do {                               \
  |  |  144|  3.55k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  3.55k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 3.55k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.55k]
  |  |  |  |  ------------------
  |  |  |  |  323|  3.55k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  3.55k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  3.55k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 3.55k]
  |  |  ------------------
  ------------------
 3024|  3.55k|    octx->store_is_empty = FALSE;
  ------------------
  |  | 1048|  3.55k|#define FALSE false
  ------------------
 3025|  3.55k|  }
 3026|       |
 3027|  3.55k|  if(ssl_cafile || ssl_capath) {
  ------------------
  |  Branch (3027:6): [True: 0, False: 3.55k]
  |  Branch (3027:20): [True: 3.55k, False: 0]
  ------------------
 3028|  3.55k|#ifdef HAVE_OPENSSL3
 3029|       |    /* OpenSSL 3.0.0 has deprecated SSL_CTX_load_verify_locations */
 3030|  3.55k|    if(ssl_cafile) {
  ------------------
  |  Branch (3030:8): [True: 0, False: 3.55k]
  ------------------
 3031|      0|      if(!X509_STORE_load_file(store, ssl_cafile)) {
  ------------------
  |  Branch (3031:10): [True: 0, False: 0]
  ------------------
 3032|      0|        if(octx->store_is_empty && !have_native_check) {
  ------------------
  |  Branch (3032:12): [True: 0, False: 0]
  |  Branch (3032:36): [True: 0, False: 0]
  ------------------
 3033|       |          /* Fail if we insist on successfully verifying the server. */
 3034|      0|          failf(data, "error adding trust anchors from file: %s", ssl_cafile);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3035|      0|          return CURLE_SSL_CACERT_BADFILE;
 3036|      0|        }
 3037|      0|        else
 3038|      0|          infof(data, "error setting certificate file, continuing anyway");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3039|      0|      }
 3040|      0|      infof(data, "  CAfile: %s", ssl_cafile);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3041|      0|      octx->store_is_empty = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 3042|      0|    }
 3043|  3.55k|    if(ssl_capath) {
  ------------------
  |  Branch (3043:8): [True: 3.55k, False: 0]
  ------------------
 3044|  3.55k|      if(!X509_STORE_load_path(store, ssl_capath)) {
  ------------------
  |  Branch (3044:10): [True: 0, False: 3.55k]
  ------------------
 3045|      0|        if(octx->store_is_empty && !have_native_check) {
  ------------------
  |  Branch (3045:12): [True: 0, False: 0]
  |  Branch (3045:36): [True: 0, False: 0]
  ------------------
 3046|       |          /* Fail if we insist on successfully verifying the server. */
 3047|      0|          failf(data, "error adding trust anchors from path: %s", ssl_capath);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3048|      0|          return CURLE_SSL_CACERT_BADFILE;
 3049|      0|        }
 3050|      0|        else
 3051|      0|          infof(data, "error setting certificate path, continuing anyway");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3052|      0|      }
 3053|  3.55k|      infof(data, "  CApath: %s", ssl_capath);
  ------------------
  |  |  143|  3.55k|  do {                               \
  |  |  144|  3.55k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  3.55k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 3.55k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.55k]
  |  |  |  |  ------------------
  |  |  |  |  323|  3.55k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  3.55k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  3.55k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 3.55k]
  |  |  ------------------
  ------------------
 3054|  3.55k|      octx->store_is_empty = FALSE;
  ------------------
  |  | 1048|  3.55k|#define FALSE false
  ------------------
 3055|  3.55k|    }
 3056|       |#else
 3057|       |    /* tell OpenSSL where to find CA certificates that are used to verify the
 3058|       |       server's certificate. */
 3059|       |    if(!X509_STORE_load_locations(store, ssl_cafile, ssl_capath)) {
 3060|       |      if(octx->store_is_empty && !have_native_check) {
 3061|       |        /* Fail if we insist on successfully verifying the server. */
 3062|       |        failf(data, "error adding trust anchors from locations:"
 3063|       |              "  CAfile: %s CApath: %s",
 3064|       |              ssl_cafile ? ssl_cafile : "none",
 3065|       |              ssl_capath ? ssl_capath : "none");
 3066|       |        return CURLE_SSL_CACERT_BADFILE;
 3067|       |      }
 3068|       |      else {
 3069|       |        infof(data, "error setting certificate verify locations,"
 3070|       |              " continuing anyway");
 3071|       |      }
 3072|       |    }
 3073|       |    if(ssl_cafile)
 3074|       |      infof(data, "  CAfile: %s", ssl_cafile);
 3075|       |    if(ssl_capath)
 3076|       |      infof(data, "  CApath: %s", ssl_capath);
 3077|       |    octx->store_is_empty = FALSE;
 3078|       |#endif
 3079|  3.55k|  }
 3080|       |
 3081|       |#ifdef CURL_CA_FALLBACK
 3082|       |  if(octx->store_is_empty) {
 3083|       |    /* verifying the peer without any CA certificates does not
 3084|       |       work so use OpenSSL's built-in default as fallback */
 3085|       |    X509_STORE_set_default_paths(store);
 3086|       |    infof(data, "  OpenSSL default paths (fallback)");
 3087|       |    octx->store_is_empty = FALSE;
 3088|       |  }
 3089|       |#endif
 3090|  3.55k|  if(octx->store_is_empty && !have_native_check)
  ------------------
  |  Branch (3090:6): [True: 0, False: 3.55k]
  |  Branch (3090:30): [True: 0, False: 0]
  ------------------
 3091|      0|    infof(data, "  no trust anchors configured");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3092|       |
 3093|  3.55k|  return result;
 3094|  3.55k|}
openssl.c:load_cacert_from_memory:
 2735|  3.55k|{
 2736|       |  /* these need to be freed at the end */
 2737|  3.55k|  BIO *cbio = NULL;
 2738|  3.55k|  STACK_OF(X509_INFO) *inf = NULL;
 2739|       |
 2740|       |  /* everything else is a reference */
 2741|  3.55k|  int i, count = 0;
 2742|  3.55k|  X509_INFO *itmp = NULL;
 2743|       |
 2744|  3.55k|  if(ca_info_blob->len > (size_t)INT_MAX)
  ------------------
  |  Branch (2744:6): [True: 0, False: 3.55k]
  ------------------
 2745|      0|    return CURLE_SSL_CACERT_BADFILE;
 2746|       |
 2747|  3.55k|  cbio = BIO_new_mem_buf(ca_info_blob->data, (int)ca_info_blob->len);
 2748|  3.55k|  if(!cbio)
  ------------------
  |  Branch (2748:6): [True: 0, False: 3.55k]
  ------------------
 2749|      0|    return CURLE_OUT_OF_MEMORY;
 2750|       |
 2751|  3.55k|  inf = PEM_X509_INFO_read_bio(cbio, NULL, NULL, NULL);
 2752|  3.55k|  if(!inf) {
  ------------------
  |  Branch (2752:6): [True: 0, False: 3.55k]
  ------------------
 2753|      0|    BIO_free(cbio);
 2754|      0|    return CURLE_SSL_CACERT_BADFILE;
 2755|      0|  }
 2756|       |
 2757|       |  /* add each entry from PEM file to x509_store */
 2758|  7.10k|  for(i = 0; i < (int)sk_X509_INFO_num(inf); ++i) {
  ------------------
  |  Branch (2758:14): [True: 3.55k, False: 3.55k]
  ------------------
 2759|  3.55k|    itmp = sk_X509_INFO_value(inf, (ossl_valsize_t)i);
 2760|  3.55k|    if(itmp->x509) {
  ------------------
  |  Branch (2760:8): [True: 3.55k, False: 0]
  ------------------
 2761|  3.55k|      if(X509_STORE_add_cert(store, itmp->x509)) {
  ------------------
  |  Branch (2761:10): [True: 3.55k, False: 0]
  ------------------
 2762|  3.55k|        ++count;
 2763|  3.55k|      }
 2764|      0|      else {
 2765|       |        /* set count to 0 to return an error */
 2766|      0|        count = 0;
 2767|      0|        break;
 2768|      0|      }
 2769|  3.55k|    }
 2770|  3.55k|    if(itmp->crl) {
  ------------------
  |  Branch (2770:8): [True: 0, False: 3.55k]
  ------------------
 2771|      0|      if(X509_STORE_add_crl(store, itmp->crl)) {
  ------------------
  |  Branch (2771:10): [True: 0, False: 0]
  ------------------
 2772|      0|        ++count;
 2773|      0|      }
 2774|      0|      else {
 2775|       |        /* set count to 0 to return an error */
 2776|      0|        count = 0;
 2777|      0|        break;
 2778|      0|      }
 2779|      0|    }
 2780|  3.55k|  }
 2781|       |
 2782|  3.55k|#if defined(__clang__) && __clang_major__ >= 16
 2783|  3.55k|#pragma clang diagnostic push
 2784|  3.55k|#pragma clang diagnostic ignored "-Wcast-function-type-strict"
 2785|  3.55k|#endif
 2786|  3.55k|  sk_X509_INFO_pop_free(inf, X509_INFO_free);
 2787|  3.55k|#if defined(__clang__) && __clang_major__ >= 16
 2788|  3.55k|#pragma clang diagnostic pop
 2789|  3.55k|#endif
 2790|  3.55k|  BIO_free(cbio);
 2791|       |
 2792|       |  /* if we did not end up importing anything, treat that as an error */
 2793|  3.55k|  return (count > 0) ? CURLE_OK : CURLE_SSL_CACERT_BADFILE;
  ------------------
  |  Branch (2793:10): [True: 3.55k, False: 0]
  ------------------
 2794|  3.55k|}
openssl.c:ossl_seed:
  802|  34.6k|{
  803|       |  /* This might get called before it has been added to a multi handle */
  804|  34.6k|  if(data->multi && data->multi->ssl_seeded)
  ------------------
  |  Branch (804:6): [True: 3.62k, False: 31.0k]
  |  Branch (804:21): [True: 0, False: 3.62k]
  ------------------
  805|      0|    return CURLE_OK;
  806|       |
  807|  34.6k|  if(rand_enough()) {
  ------------------
  |  Branch (807:6): [True: 34.6k, False: 0]
  ------------------
  808|       |    /* OpenSSL 1.1.0+ should return here */
  809|  34.6k|    if(data->multi)
  ------------------
  |  Branch (809:8): [True: 3.62k, False: 31.0k]
  ------------------
  810|  3.62k|      data->multi->ssl_seeded = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  811|  34.6k|    return CURLE_OK;
  812|  34.6k|  }
  813|      0|  failf(data, "Insufficient randomness");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  814|      0|  return CURLE_SSL_CONNECT_ERROR;
  815|  34.6k|}
openssl.c:rand_enough:
  797|  34.6k|{
  798|  34.6k|  return RAND_status() != 0;
  799|  34.6k|}
openssl.c:ossl_init_method:
 3652|  3.62k|{
 3653|  3.62k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 3654|       |
 3655|  3.62k|  *pmethod = NULL;
 3656|  3.62k|  *pssl_version_min = conn_config->version;
 3657|  3.62k|  DEBUGASSERT(conn_config->version != CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3657:3): [True: 0, False: 3.62k]
  |  Branch (3657:3): [True: 3.62k, False: 0]
  ------------------
 3658|  3.62k|  switch(peer->transport) {
 3659|  3.62k|  case TRNSPRT_TCP:
  ------------------
  |  |  238|  3.62k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (3659:3): [True: 3.62k, False: 0]
  ------------------
 3660|       |    /* check to see if we have been told to use an explicit SSL/TLS version */
 3661|  3.62k|    switch(*pssl_version_min) {
 3662|      0|    case CURL_SSLVERSION_TLSv1:
  ------------------
  |  | 2395|      0|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  ------------------
  |  Branch (3662:5): [True: 0, False: 3.62k]
  ------------------
 3663|      0|    case CURL_SSLVERSION_TLSv1_0:
  ------------------
  |  | 2398|      0|#define CURL_SSLVERSION_TLSv1_0 4L
  ------------------
  |  Branch (3663:5): [True: 0, False: 3.62k]
  ------------------
 3664|      0|    case CURL_SSLVERSION_TLSv1_1:
  ------------------
  |  | 2399|      0|#define CURL_SSLVERSION_TLSv1_1 5L
  ------------------
  |  Branch (3664:5): [True: 0, False: 3.62k]
  ------------------
 3665|  3.62k|    case CURL_SSLVERSION_TLSv1_2:
  ------------------
  |  | 2400|  3.62k|#define CURL_SSLVERSION_TLSv1_2 6L
  ------------------
  |  Branch (3665:5): [True: 3.62k, False: 0]
  ------------------
 3666|  3.62k|    case CURL_SSLVERSION_TLSv1_3:
  ------------------
  |  | 2401|  3.62k|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
  |  Branch (3666:5): [True: 0, False: 3.62k]
  ------------------
 3667|       |      /* it is handled later with the context options */
 3668|  3.62k|      *pmethod = TLS_client_method();
 3669|  3.62k|      break;
 3670|      0|    case CURL_SSLVERSION_SSLv2:
  ------------------
  |  | 2396|      0|#define CURL_SSLVERSION_SSLv2   2L
  ------------------
  |  Branch (3670:5): [True: 0, False: 3.62k]
  ------------------
 3671|      0|      failf(data, "No SSLv2 support");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3672|      0|      return CURLE_NOT_BUILT_IN;
 3673|      0|    case CURL_SSLVERSION_SSLv3:
  ------------------
  |  | 2397|      0|#define CURL_SSLVERSION_SSLv3   3L
  ------------------
  |  Branch (3673:5): [True: 0, False: 3.62k]
  ------------------
 3674|      0|      failf(data, "No SSLv3 support");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3675|      0|      return CURLE_NOT_BUILT_IN;
 3676|      0|    default:
  ------------------
  |  Branch (3676:5): [True: 0, False: 3.62k]
  ------------------
 3677|      0|      failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3678|      0|      return CURLE_SSL_CONNECT_ERROR;
 3679|  3.62k|    }
 3680|  3.62k|    break;
 3681|  3.62k|  case TRNSPRT_QUIC:
  ------------------
  |  |  240|      0|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (3681:3): [True: 0, False: 3.62k]
  ------------------
 3682|      0|    *pssl_version_min = CURL_SSLVERSION_TLSv1_3;
  ------------------
  |  | 2401|      0|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
 3683|      0|    if(conn_config->version_max &&
  ------------------
  |  Branch (3683:8): [True: 0, False: 0]
  ------------------
 3684|      0|       (conn_config->version_max != CURL_SSLVERSION_MAX_DEFAULT) &&
  ------------------
  |  | 2406|      0|#define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1   << 16)
  |  |  ------------------
  |  |  |  | 2395|      0|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  |  |  ------------------
  ------------------
  |  Branch (3684:8): [True: 0, False: 0]
  ------------------
 3685|      0|       (conn_config->version_max != CURL_SSLVERSION_MAX_TLSv1_3)) {
  ------------------
  |  | 2410|      0|#define CURL_SSLVERSION_MAX_TLSv1_3 (CURL_SSLVERSION_TLSv1_3 << 16)
  |  |  ------------------
  |  |  |  | 2401|      0|#define CURL_SSLVERSION_TLSv1_3 7L
  |  |  ------------------
  ------------------
  |  Branch (3685:8): [True: 0, False: 0]
  ------------------
 3686|      0|      failf(data, "QUIC needs at least TLS version 1.3");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3687|      0|      return CURLE_SSL_CONNECT_ERROR;
 3688|      0|    }
 3689|       |
 3690|      0|    *pmethod = TLS_method();
 3691|      0|    break;
 3692|      0|  default:
  ------------------
  |  Branch (3692:3): [True: 0, False: 3.62k]
  ------------------
 3693|      0|    failf(data, "unsupported transport %d in SSL init", peer->transport);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3694|      0|    return CURLE_SSL_CONNECT_ERROR;
 3695|  3.62k|  }
 3696|       |
 3697|  3.62k|  return *pmethod ? CURLE_OK : CURLE_SSL_CONNECT_ERROR;
  ------------------
  |  Branch (3697:10): [True: 3.62k, False: 0]
  ------------------
 3698|  3.62k|}
openssl.c:ossl_set_ssl_version_min_max:
 2557|  3.62k|{
 2558|  3.62k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 2559|       |  /* first, TLS min version... */
 2560|  3.62k|  long curl_ssl_version_min = (long)ssl_version_min;
 2561|  3.62k|  long curl_ssl_version_max;
 2562|       |
 2563|       |  /* convert curl min SSL version option to OpenSSL constant */
 2564|       |#if defined(HAVE_BORINGSSL_LIKE) || defined(LIBRESSL_VERSION_NUMBER)
 2565|       |  uint16_t ossl_ssl_version_min = 0;
 2566|       |  uint16_t ossl_ssl_version_max = 0;
 2567|       |#else
 2568|  3.62k|  long ossl_ssl_version_min = 0;
 2569|  3.62k|  long ossl_ssl_version_max = 0;
 2570|  3.62k|#endif
 2571|       |  /* it cannot be default here */
 2572|  3.62k|  DEBUGASSERT(curl_ssl_version_min != CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2572:3): [True: 0, False: 3.62k]
  |  Branch (2572:3): [True: 3.62k, False: 0]
  ------------------
 2573|  3.62k|  switch(curl_ssl_version_min) {
  ------------------
  |  Branch (2573:10): [True: 3.62k, False: 0]
  ------------------
 2574|      0|  case CURL_SSLVERSION_TLSv1: /* TLS 1.x */
  ------------------
  |  | 2395|      0|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  ------------------
  |  Branch (2574:3): [True: 0, False: 3.62k]
  ------------------
 2575|      0|  case CURL_SSLVERSION_TLSv1_0:
  ------------------
  |  | 2398|      0|#define CURL_SSLVERSION_TLSv1_0 4L
  ------------------
  |  Branch (2575:3): [True: 0, False: 3.62k]
  ------------------
 2576|      0|    ossl_ssl_version_min = TLS1_VERSION;
 2577|      0|    break;
 2578|      0|  case CURL_SSLVERSION_TLSv1_1:
  ------------------
  |  | 2399|      0|#define CURL_SSLVERSION_TLSv1_1 5L
  ------------------
  |  Branch (2578:3): [True: 0, False: 3.62k]
  ------------------
 2579|      0|    ossl_ssl_version_min = TLS1_1_VERSION;
 2580|      0|    break;
 2581|  3.62k|  case CURL_SSLVERSION_TLSv1_2:
  ------------------
  |  | 2400|  3.62k|#define CURL_SSLVERSION_TLSv1_2 6L
  ------------------
  |  Branch (2581:3): [True: 3.62k, False: 0]
  ------------------
 2582|  3.62k|    ossl_ssl_version_min = TLS1_2_VERSION;
 2583|  3.62k|    break;
 2584|      0|  case CURL_SSLVERSION_TLSv1_3:
  ------------------
  |  | 2401|      0|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
  |  Branch (2584:3): [True: 0, False: 3.62k]
  ------------------
 2585|      0|    ossl_ssl_version_min = TLS1_3_VERSION;
 2586|      0|    break;
 2587|  3.62k|  }
 2588|       |
 2589|       |  /* ... then, TLS max version */
 2590|  3.62k|  curl_ssl_version_max = (long)conn_config->version_max;
 2591|       |
 2592|       |  /* convert curl max SSL version option to OpenSSL constant */
 2593|  3.62k|  switch(curl_ssl_version_max) {
 2594|      0|  case CURL_SSLVERSION_MAX_TLSv1_0:
  ------------------
  |  | 2407|      0|#define CURL_SSLVERSION_MAX_TLSv1_0 (CURL_SSLVERSION_TLSv1_0 << 16)
  |  |  ------------------
  |  |  |  | 2398|      0|#define CURL_SSLVERSION_TLSv1_0 4L
  |  |  ------------------
  ------------------
  |  Branch (2594:3): [True: 0, False: 3.62k]
  ------------------
 2595|      0|    ossl_ssl_version_max = TLS1_VERSION;
 2596|      0|    break;
 2597|      0|  case CURL_SSLVERSION_MAX_TLSv1_1:
  ------------------
  |  | 2408|      0|#define CURL_SSLVERSION_MAX_TLSv1_1 (CURL_SSLVERSION_TLSv1_1 << 16)
  |  |  ------------------
  |  |  |  | 2399|      0|#define CURL_SSLVERSION_TLSv1_1 5L
  |  |  ------------------
  ------------------
  |  Branch (2597:3): [True: 0, False: 3.62k]
  ------------------
 2598|      0|    ossl_ssl_version_max = TLS1_1_VERSION;
 2599|      0|    break;
 2600|      0|  case CURL_SSLVERSION_MAX_TLSv1_2:
  ------------------
  |  | 2409|      0|#define CURL_SSLVERSION_MAX_TLSv1_2 (CURL_SSLVERSION_TLSv1_2 << 16)
  |  |  ------------------
  |  |  |  | 2400|      0|#define CURL_SSLVERSION_TLSv1_2 6L
  |  |  ------------------
  ------------------
  |  Branch (2600:3): [True: 0, False: 3.62k]
  ------------------
 2601|      0|    ossl_ssl_version_max = TLS1_2_VERSION;
 2602|      0|    break;
 2603|      0|  case CURL_SSLVERSION_MAX_TLSv1_3:
  ------------------
  |  | 2410|      0|#define CURL_SSLVERSION_MAX_TLSv1_3 (CURL_SSLVERSION_TLSv1_3 << 16)
  |  |  ------------------
  |  |  |  | 2401|      0|#define CURL_SSLVERSION_TLSv1_3 7L
  |  |  ------------------
  ------------------
  |  Branch (2603:3): [True: 0, False: 3.62k]
  ------------------
 2604|      0|    ossl_ssl_version_max = TLS1_3_VERSION;
 2605|      0|    break;
 2606|  3.62k|  case CURL_SSLVERSION_MAX_NONE:  /* none selected */
  ------------------
  |  | 2405|  3.62k|#define CURL_SSLVERSION_MAX_NONE 0L
  ------------------
  |  Branch (2606:3): [True: 3.62k, False: 0]
  ------------------
 2607|  3.62k|  case CURL_SSLVERSION_MAX_DEFAULT:  /* max selected */
  ------------------
  |  | 2406|  3.62k|#define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1   << 16)
  |  |  ------------------
  |  |  |  | 2395|  3.62k|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  |  |  ------------------
  ------------------
  |  Branch (2607:3): [True: 0, False: 3.62k]
  ------------------
 2608|  3.62k|  default:
  ------------------
  |  Branch (2608:3): [True: 0, False: 3.62k]
  ------------------
 2609|       |    /* SSL_CTX_set_max_proto_version states that: setting the maximum to 0
 2610|       |       enables protocol versions up to the highest version supported by
 2611|       |       the library */
 2612|  3.62k|    ossl_ssl_version_max = 0;
 2613|  3.62k|    break;
 2614|  3.62k|  }
 2615|       |
 2616|  3.62k|  if(!SSL_CTX_set_min_proto_version(ctx, ossl_ssl_version_min) ||
  ------------------
  |  Branch (2616:6): [True: 0, False: 3.62k]
  ------------------
 2617|  3.62k|     !SSL_CTX_set_max_proto_version(ctx, ossl_ssl_version_max))
  ------------------
  |  Branch (2617:6): [True: 0, False: 3.62k]
  ------------------
 2618|      0|    return CURLE_SSL_CONNECT_ERROR;
 2619|       |
 2620|  3.62k|  return CURLE_OK;
 2621|  3.62k|}
openssl.c:ossl_provider_cleanup:
 1743|  7.46k|{
 1744|  7.46k|  if(data->state.baseprov) {
  ------------------
  |  Branch (1744:6): [True: 0, False: 7.46k]
  ------------------
 1745|      0|    OSSL_PROVIDER_unload(data->state.baseprov);
 1746|      0|    data->state.baseprov = NULL;
 1747|      0|  }
 1748|  7.46k|  if(data->state.provider) {
  ------------------
  |  Branch (1748:6): [True: 0, False: 7.46k]
  ------------------
 1749|      0|    OSSL_PROVIDER_unload(data->state.provider);
 1750|      0|    data->state.provider = NULL;
 1751|      0|  }
 1752|  7.46k|  OSSL_LIB_CTX_free(data->state.libctx);
 1753|  7.46k|  data->state.libctx = NULL;
 1754|  7.46k|  curlx_safefree(data->state.propq);
  ------------------
  |  | 1332|  7.46k|  do {                      \
  |  | 1333|  7.46k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.46k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.46k|    (ptr) = NULL;           \
  |  | 1335|  7.46k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.46k]
  |  |  ------------------
  ------------------
 1755|       |  data->state.provider_loaded = FALSE;
  ------------------
  |  | 1048|  7.46k|#define FALSE false
  ------------------
 1756|  7.46k|}
openssl.c:ossl_init_ssl:
 3609|  3.62k|{
 3610|       |  /* Let's make an SSL structure */
 3611|  3.62k|  if(octx->ssl)
  ------------------
  |  Branch (3611:6): [True: 0, False: 3.62k]
  ------------------
 3612|      0|    SSL_free(octx->ssl);
 3613|  3.62k|  octx->ssl = SSL_new(octx->ssl_ctx);
 3614|  3.62k|  if(!octx->ssl) {
  ------------------
  |  Branch (3614:6): [True: 0, False: 3.62k]
  ------------------
 3615|      0|    failf(data, "SSL: could not create a context (handle)");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3616|      0|    return CURLE_OUT_OF_MEMORY;
 3617|      0|  }
 3618|       |
 3619|  3.62k|  SSL_set_app_data(octx->ssl, ssl_user_data);
 3620|       |
 3621|  3.62k|#ifndef OPENSSL_NO_OCSP
 3622|  3.62k|  if(Curl_ssl_cf_get_primary_config(cf)->verifystatus)
  ------------------
  |  Branch (3622:6): [True: 0, False: 3.62k]
  ------------------
 3623|  3.62k|    SSL_set_tlsext_status_type(octx->ssl, TLSEXT_STATUSTYPE_ocsp);
 3624|  3.62k|#endif
 3625|       |
 3626|  3.62k|  SSL_set_connect_state(octx->ssl);
 3627|       |
 3628|  3.62k|  if(peer->sni) {
  ------------------
  |  Branch (3628:6): [True: 3.62k, False: 0]
  ------------------
 3629|  3.62k|    if(!SSL_set_tlsext_host_name(octx->ssl, peer->sni)) {
  ------------------
  |  Branch (3629:8): [True: 0, False: 3.62k]
  ------------------
 3630|      0|      failf(data, "Failed set SNI");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3631|      0|      return CURLE_SSL_CONNECT_ERROR;
 3632|      0|    }
 3633|  3.62k|  }
 3634|       |
 3635|       |#ifdef HAVE_SSL_SET1_ECH_CONFIG_LIST
 3636|       |  {
 3637|       |    CURLcode result = ossl_init_ech(octx, cf, data, peer);
 3638|       |    if(result)
 3639|       |      return result;
 3640|       |  }
 3641|       |#endif /* HAVE_SSL_SET1_ECH_CONFIG_LIST */
 3642|       |
 3643|  3.62k|  return ossl_init_session_and_alpns(octx, cf, data, peer,
 3644|  3.62k|                                     alpns_requested, sess_reuse_cb);
 3645|  3.62k|}
openssl.c:ossl_init_session_and_alpns:
 3414|  3.62k|{
 3415|  3.62k|  struct ssl_primary_config *conn_cfg = Curl_ssl_cf_get_primary_config(cf);
 3416|  3.62k|  struct alpn_spec alpns;
 3417|  3.62k|  CURLcode result;
 3418|       |
 3419|  3.62k|  Curl_alpn_copy(&alpns, alpns_requested);
 3420|       |
 3421|  3.62k|  octx->reused_session = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
 3422|       |
 3423|  3.62k|  if((cf->sockindex == SECONDARYSOCKET) && !(cf->cft->flags & CF_TYPE_PROXY)) {
  ------------------
  |  |  235|  3.62k|#define SECONDARYSOCKET 1
  ------------------
                if((cf->sockindex == SECONDARYSOCKET) && !(cf->cft->flags & CF_TYPE_PROXY)) {
  ------------------
  |  |  211|      0|#define CF_TYPE_PROXY       (1 << 3)
  ------------------
  |  Branch (3423:6): [True: 0, False: 3.62k]
  |  Branch (3423:44): [True: 0, False: 0]
  ------------------
 3424|       |    /* FTP is a bitch. On TLS secured transfers, it is a common server
 3425|       |     * option to require the client to use the SAME TLS session as on
 3426|       |     * the control connection or it fails the request. See #22225. */
 3427|      0|    struct Curl_ssl_session *scs =
 3428|      0|      Curl_ssl_get_cf_session(data, cf->cft, FIRSTSOCKET);
  ------------------
  |  |  234|      0|#define FIRSTSOCKET     0
  ------------------
 3429|      0|    if(scs) {
  ------------------
  |  Branch (3429:8): [True: 0, False: 0]
  ------------------
 3430|      0|      if(ossl_apply_session(octx, cf, data, &alpns, sess_reuse_cb, scs))
  ------------------
  |  Branch (3430:10): [True: 0, False: 0]
  ------------------
 3431|      0|        CURL_TRC_CF(data, cf, "applied SSL session from control connection");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 3432|      0|    }
 3433|      0|  }
 3434|       |
 3435|  3.62k|  if(!octx->reused_session &&
  ------------------
  |  Branch (3435:6): [True: 3.62k, False: 0]
  ------------------
 3436|  3.62k|     Curl_ssl_scache_use(cf, data) && !conn_cfg->verifystatus) {
  ------------------
  |  Branch (3436:6): [True: 3.62k, False: 0]
  |  Branch (3436:39): [True: 3.62k, False: 0]
  ------------------
 3437|  3.62k|    struct Curl_ssl_session *scs = NULL;
 3438|       |
 3439|  3.62k|    result = Curl_ssl_scache_take(cf, data, peer->scache_key, &scs);
 3440|  3.62k|    if(!result && scs && scs->sdata && scs->sdata_len) {
  ------------------
  |  Branch (3440:8): [True: 3.62k, False: 0]
  |  Branch (3440:19): [True: 0, False: 3.62k]
  |  Branch (3440:26): [True: 0, False: 0]
  |  Branch (3440:40): [True: 0, False: 0]
  ------------------
 3441|      0|      (void)ossl_apply_session(octx, cf, data, &alpns, sess_reuse_cb, scs);
 3442|      0|    }
 3443|  3.62k|    Curl_ssl_scache_return(cf, data, peer->scache_key, scs);
 3444|  3.62k|  }
 3445|       |
 3446|  3.62k|  if(alpns.count) {
  ------------------
  |  Branch (3446:6): [True: 3.62k, False: 0]
  ------------------
 3447|  3.62k|    struct alpn_proto_buf proto;
 3448|  3.62k|    memset(&proto, 0, sizeof(proto));
 3449|  3.62k|    result = Curl_alpn_to_proto_buf(&proto, &alpns);
 3450|  3.62k|    if(result) {
  ------------------
  |  Branch (3450:8): [True: 0, False: 3.62k]
  ------------------
 3451|      0|      failf(data, "Error determining ALPN");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3452|      0|      return CURLE_SSL_CONNECT_ERROR;
 3453|      0|    }
 3454|  3.62k|    if(SSL_set_alpn_protos(octx->ssl, proto.data, proto.len)) {
  ------------------
  |  Branch (3454:8): [True: 0, False: 3.62k]
  ------------------
 3455|      0|      failf(data, "Error setting ALPN");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3456|      0|      return CURLE_SSL_CONNECT_ERROR;
 3457|      0|    }
 3458|  3.62k|  }
 3459|       |
 3460|  3.62k|  return CURLE_OK;
 3461|  3.62k|}
openssl.c:ossl_certchain:
  372|     10|{
  373|     10|  CURLcode result;
  374|     10|  STACK_OF(X509) *sk;
  375|     10|  int i;
  376|     10|  numcert_t numcerts;
  377|     10|  BIO *mem;
  378|       |
  379|     10|  DEBUGASSERT(ssl);
  ------------------
  |  | 1075|     10|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (379:3): [True: 0, False: 10]
  |  Branch (379:3): [True: 10, False: 0]
  ------------------
  380|       |
  381|     10|  sk = SSL_get_peer_cert_chain(ssl);
  382|     10|  if(!sk)
  ------------------
  |  Branch (382:6): [True: 0, False: 10]
  ------------------
  383|      0|    return CURLE_SSL_CONNECT_ERROR;
  384|       |
  385|     10|  numcerts = sk_X509_num(sk);
  386|     10|  if(numcerts > MAX_ALLOWED_CERT_AMOUNT) {
  ------------------
  |  |  136|     10|#define MAX_ALLOWED_CERT_AMOUNT 100
  ------------------
  |  Branch (386:6): [True: 0, False: 10]
  ------------------
  387|      0|    failf(data, "%d certificates is more than allowed (%d)", (int)numcerts,
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  388|      0|          MAX_ALLOWED_CERT_AMOUNT);
  ------------------
  |  |  136|      0|#define MAX_ALLOWED_CERT_AMOUNT 100
  ------------------
  389|      0|    return CURLE_SSL_CONNECT_ERROR;
  390|      0|  }
  391|       |
  392|     10|  result = Curl_ssl_init_certinfo(data, (int)numcerts);
  393|     10|  if(result)
  ------------------
  |  Branch (393:6): [True: 0, False: 10]
  ------------------
  394|      0|    return result;
  395|       |
  396|     10|  mem = BIO_new(BIO_s_mem());
  397|     10|  if(!mem)
  ------------------
  |  Branch (397:6): [True: 0, False: 10]
  ------------------
  398|      0|    result = CURLE_OUT_OF_MEMORY;
  399|       |
  400|     20|  for(i = 0; !result && (i < (int)numcerts); i++) {
  ------------------
  |  Branch (400:14): [True: 20, False: 0]
  |  Branch (400:25): [True: 10, False: 10]
  ------------------
  401|     10|    ASN1_INTEGER *num;
  402|     10|    const unsigned char *numdata;
  403|     10|    X509 *x = sk_X509_value(sk, (ossl_valsize_t)i);
  404|     10|    EVP_PKEY *pubkey = NULL;
  405|     10|    int j;
  406|     10|    const ASN1_BIT_STRING *psig = NULL;
  407|       |
  408|     10|    X509_NAME_print_ex(mem, X509_get_subject_name(x), 0, XN_FLAG_ONELINE);
  409|     10|    result = push_certinfo(data, mem, "Subject", i);
  410|     10|    if(result)
  ------------------
  |  Branch (410:8): [True: 0, False: 10]
  ------------------
  411|      0|      break;
  412|       |
  413|     10|    X509_NAME_print_ex(mem, X509_get_issuer_name(x), 0, XN_FLAG_ONELINE);
  414|     10|    result = push_certinfo(data, mem, "Issuer", i);
  415|     10|    if(result)
  ------------------
  |  Branch (415:8): [True: 0, False: 10]
  ------------------
  416|      0|      break;
  417|       |
  418|     10|    BIO_printf(mem, "%lx", (unsigned long)X509_get_version(x));
  419|     10|    result = push_certinfo(data, mem, "Version", i);
  420|     10|    if(result)
  ------------------
  |  Branch (420:8): [True: 0, False: 10]
  ------------------
  421|      0|      break;
  422|       |
  423|     10|    num = X509_get_serialNumber(x);
  424|     10|    if(ASN1_STRING_type(num) == V_ASN1_NEG_INTEGER)
  ------------------
  |  Branch (424:8): [True: 0, False: 10]
  ------------------
  425|      0|      BIO_puts(mem, "-");
  426|     10|    numdata = ASN1_STRING_get0_data(num);
  427|    210|    for(j = 0; j < ASN1_STRING_length(num); j++)
  ------------------
  |  Branch (427:16): [True: 200, False: 10]
  ------------------
  428|    200|      BIO_printf(mem, "%02x", numdata[j]);
  429|     10|    result = push_certinfo(data, mem, "Serial Number", i);
  430|     10|    if(result)
  ------------------
  |  Branch (430:8): [True: 0, False: 10]
  ------------------
  431|      0|      break;
  432|       |
  433|     10|    {
  434|     10|      const X509_ALGOR *sigalg = NULL;
  435|     10|      pubkeytype_t *xpubkey = NULL;
  436|     10|      ASN1_OBJECT *pubkeyoid = NULL;
  437|       |
  438|     10|      X509_get0_signature(&psig, &sigalg, x);
  439|     10|      if(sigalg) {
  ------------------
  |  Branch (439:10): [True: 10, False: 0]
  ------------------
  440|     10|        const ASN1_OBJECT *sigalgoid = NULL;
  441|     10|        X509_ALGOR_get0(&sigalgoid, NULL, NULL, sigalg);
  442|     10|        i2a_ASN1_OBJECT(mem, sigalgoid);
  443|     10|        result = push_certinfo(data, mem, "Signature Algorithm", i);
  444|     10|        if(result)
  ------------------
  |  Branch (444:12): [True: 0, False: 10]
  ------------------
  445|      0|          break;
  446|     10|      }
  447|       |
  448|     10|      xpubkey = X509_get_X509_PUBKEY(x);
  449|     10|      if(xpubkey) {
  ------------------
  |  Branch (449:10): [True: 10, False: 0]
  ------------------
  450|     10|        X509_PUBKEY_get0_param(&pubkeyoid, NULL, NULL, NULL, xpubkey);
  451|     10|        if(pubkeyoid) {
  ------------------
  |  Branch (451:12): [True: 10, False: 0]
  ------------------
  452|     10|          i2a_ASN1_OBJECT(mem, pubkeyoid);
  453|     10|          result = push_certinfo(data, mem, "Public Key Algorithm", i);
  454|     10|          if(result)
  ------------------
  |  Branch (454:14): [True: 0, False: 10]
  ------------------
  455|      0|            break;
  456|     10|        }
  457|     10|      }
  458|       |
  459|     10|      result = X509V3_ext(data, i, X509_get0_extensions(x));
  460|     10|      if(result)
  ------------------
  |  Branch (460:10): [True: 0, False: 10]
  ------------------
  461|      0|        break;
  462|     10|    }
  463|       |
  464|     10|    ASN1_TIME_print(mem, X509_get0_notBefore(x));
  465|     10|    result = push_certinfo(data, mem, "Start date", i);
  466|     10|    if(result)
  ------------------
  |  Branch (466:8): [True: 0, False: 10]
  ------------------
  467|      0|      break;
  468|       |
  469|     10|    ASN1_TIME_print(mem, X509_get0_notAfter(x));
  470|     10|    result = push_certinfo(data, mem, "Expire date", i);
  471|     10|    if(result)
  ------------------
  |  Branch (471:8): [True: 0, False: 10]
  ------------------
  472|      0|      break;
  473|       |
  474|     10|    pubkey = X509_get_pubkey(x);
  475|     10|    if(!pubkey)
  ------------------
  |  Branch (475:8): [True: 0, False: 10]
  ------------------
  476|      0|      infof(data, "   Unable to load public key");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  477|     10|    else {
  478|     10|      switch(EVP_PKEY_id(pubkey)) {
  ------------------
  |  Branch (478:14): [True: 0, False: 10]
  ------------------
  479|      0|      case EVP_PKEY_RSA:
  ------------------
  |  Branch (479:7): [True: 0, False: 10]
  ------------------
  480|      0|        result = get_pkey_rsa(data, pubkey, mem, i);
  481|      0|        break;
  482|       |
  483|      0|#ifndef OPENSSL_NO_DSA
  484|      0|      case EVP_PKEY_DSA:
  ------------------
  |  Branch (484:7): [True: 0, False: 10]
  ------------------
  485|      0|        result = get_pkey_dsa(data, pubkey, mem, i);
  486|      0|        break;
  487|      0|#endif
  488|       |
  489|      0|      case EVP_PKEY_DH:
  ------------------
  |  Branch (489:7): [True: 0, False: 10]
  ------------------
  490|      0|        result = get_pkey_dh(data, pubkey, mem, i);
  491|      0|        break;
  492|     10|      }
  493|     10|      EVP_PKEY_free(pubkey);
  494|     10|    }
  495|       |
  496|     10|    if(!result && psig) {
  ------------------
  |  Branch (496:8): [True: 10, False: 0]
  |  Branch (496:19): [True: 10, False: 0]
  ------------------
  497|     10|      const unsigned char *psigdata = ASN1_STRING_get0_data(psig);
  498|    710|      for(j = 0; j < ASN1_STRING_length(psig); j++)
  ------------------
  |  Branch (498:18): [True: 700, False: 10]
  ------------------
  499|    700|        BIO_printf(mem, "%02x:", psigdata[j]);
  500|     10|      result = push_certinfo(data, mem, "Signature", i);
  501|     10|    }
  502|       |
  503|     10|    if(!result) {
  ------------------
  |  Branch (503:8): [True: 10, False: 0]
  ------------------
  504|     10|      PEM_write_bio_X509(mem, x);
  505|     10|      result = push_certinfo(data, mem, "Cert", i);
  506|     10|    }
  507|     10|  }
  508|       |
  509|     10|  BIO_free(mem);
  510|       |
  511|     10|  if(result)
  ------------------
  |  Branch (511:6): [True: 0, False: 10]
  ------------------
  512|       |    /* cleanup all leftovers */
  513|      0|    Curl_ssl_free_certinfo(data);
  514|       |
  515|     10|  return result;
  516|     10|}
openssl.c:push_certinfo:
  181|    100|{
  182|    100|  char *ptr;
  183|    100|  long len = BIO_get_mem_data(mem, &ptr);
  184|    100|  CURLcode result = Curl_ssl_push_certinfo_len(data, num, label, ptr, len);
  185|       |  (void)BIO_reset(mem);
  186|    100|  return result;
  187|    100|}
openssl.c:X509V3_ext:
  224|     10|{
  225|     10|  int i;
  226|     10|  CURLcode result = CURLE_OK;
  227|       |#ifdef LIBRESSL_VERSION_NUMBER
  228|       |  STACK_OF(X509_EXTENSION) *exts = CURL_UNCONST(extsarg);
  229|       |#else
  230|     10|  const STACK_OF(X509_EXTENSION) *exts = extsarg;
  231|     10|#endif
  232|       |
  233|     10|  if((int)sk_X509_EXTENSION_num(exts) <= 0)
  ------------------
  |  Branch (233:6): [True: 0, False: 10]
  ------------------
  234|       |    /* no extensions, bail out */
  235|      0|    return result;
  236|       |
  237|     60|  for(i = 0; i < (int)sk_X509_EXTENSION_num(exts); i++) {
  ------------------
  |  Branch (237:14): [True: 50, False: 10]
  ------------------
  238|     50|    const ASN1_OBJECT *obj;
  239|     50|    X509_EXTENSION *ext = sk_X509_EXTENSION_value(exts, (ossl_valsize_t)i);
  240|     50|    BUF_MEM *biomem;
  241|     50|    char namebuf[128];
  242|     50|    BIO *bio_out = BIO_new(BIO_s_mem());
  243|       |
  244|     50|    if(!bio_out)
  ------------------
  |  Branch (244:8): [True: 0, False: 50]
  ------------------
  245|      0|      return result;
  246|       |
  247|     50|    obj = X509_EXTENSION_get_object(ext);
  248|       |
  249|     50|    if(asn1_object_dump(obj, namebuf, sizeof(namebuf)))
  ------------------
  |  Branch (249:8): [True: 0, False: 50]
  ------------------
  250|       |      /* make sure the name is null-terminated */
  251|      0|      namebuf[CURL_CSTRLEN(namebuf)] = 0;
  ------------------
  |  | 1292|      0|#define CURL_CSTRLEN(x) (sizeof(x) - 1)
  ------------------
  252|       |
  253|     50|    if(!X509V3_EXT_print(bio_out, ext, 0, 0))
  ------------------
  |  Branch (253:8): [True: 0, False: 50]
  ------------------
  254|      0|      ASN1_STRING_print(bio_out,
  255|      0|                        (const ASN1_STRING *)X509_EXTENSION_get_data(ext));
  256|       |
  257|     50|    BIO_get_mem_ptr(bio_out, &biomem);
  258|     50|    result = Curl_ssl_push_certinfo_len(data, certnum, namebuf, biomem->data,
  259|     50|                                        biomem->length);
  260|     50|    BIO_free(bio_out);
  261|     50|    if(result)
  ------------------
  |  Branch (261:8): [True: 0, False: 50]
  ------------------
  262|      0|      break;
  263|     50|  }
  264|     10|  return result;
  265|     10|}
openssl.c:asn1_object_dump:
  216|     50|{
  217|     50|  int i = i2t_ASN1_OBJECT(buf, (int)len, a);
  218|     50|  return (i >= (int)len);  /* buffer too small */
  219|     50|}
openssl.c:pinned:
 4591|  3.62k|{
 4592|  3.62k|  (void)cf;
 4593|  3.62k|  return
 4594|  3.62k|#ifndef CURL_DISABLE_PROXY
 4595|  3.62k|    Curl_ssl_cf_is_proxy(cf) ?
  ------------------
  |  Branch (4595:5): [True: 0, False: 3.62k]
  ------------------
 4596|      0|    CURL_EASY_STR(data, STRING_SSL_PINNEDPUBLICKEY_PROXY) :
  ------------------
  |  | 1228|      0|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
 4597|  3.62k|#endif
 4598|  3.62k|    CURL_EASY_STR(data, STRING_SSL_PINNEDPUBLICKEY);
  ------------------
  |  | 1228|  3.62k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
 4599|  3.62k|}
openssl.c:ossl_infof_cert:
 4620|  3.62k|{
 4621|  3.62k|  BIO *mem = NULL;
 4622|  3.62k|  struct dynbuf dname;
 4623|  3.62k|  char err_buf[256] = "";
 4624|  3.62k|  char *buf;
 4625|  3.62k|  long len;
 4626|  3.62k|  CURLcode result = CURLE_OK;
 4627|       |
 4628|  3.62k|  if(!Curl_trc_is_verbose(data))
  ------------------
  |  |  322|  3.62k|  ((data) && (data)->set.verbose &&                        \
  |  |  ------------------
  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  ------------------
  |  |  323|  3.62k|   (!(data)->state.feat ||                                 \
  |  |  ------------------
  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4629|  3.62k|    return CURLE_OK;
 4630|       |
 4631|      0|  curlx_dyn_init(&dname, MAX_CERT_NAME_LENGTH);
  ------------------
  |  | 4616|      0|#define MAX_CERT_NAME_LENGTH 2048
  ------------------
 4632|      0|  mem = BIO_new(BIO_s_mem());
 4633|      0|  if(!mem) {
  ------------------
  |  Branch (4633:6): [True: 0, False: 0]
  ------------------
 4634|      0|    failf(data, "BIO_new return NULL, " OSSL_PACKAGE " error %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4635|      0|          ossl_strerror(ERR_get_error(), err_buf, sizeof(err_buf)));
 4636|      0|    result = CURLE_OUT_OF_MEMORY;
 4637|      0|    goto out;
 4638|      0|  }
 4639|       |
 4640|      0|  infof(data, "%s certificate:", Curl_ssl_cf_is_proxy(cf) ?
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
 4641|      0|        "Proxy" : "Server");
 4642|       |
 4643|      0|  result = x509_name_oneline(X509_get_subject_name(server_cert), &dname);
 4644|      0|  infof(data, "  subject: %s", result ? "[NONE]" : curlx_dyn_ptr(&dname));
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
 4645|       |
 4646|      0|  ASN1_TIME_print(mem, X509_get0_notBefore(server_cert));
 4647|      0|  len = BIO_get_mem_data(mem, (char **)&buf);
 4648|      0|  infof(data, "  start date: %.*s", (int)len, buf);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4649|      0|  (void)BIO_reset(mem);
 4650|       |
 4651|      0|  ASN1_TIME_print(mem, X509_get0_notAfter(server_cert));
 4652|      0|  len = BIO_get_mem_data(mem, (char **)&buf);
 4653|      0|  infof(data, "  expire date: %.*s", (int)len, buf);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4654|      0|  (void)BIO_reset(mem);
 4655|       |
 4656|      0|  result = x509_name_oneline(X509_get_issuer_name(server_cert), &dname);
 4657|      0|  if(result) /* should be only fatal stuff like OOM */
  ------------------
  |  Branch (4657:6): [True: 0, False: 0]
  ------------------
 4658|      0|    goto out;
 4659|      0|  infof(data, "  issuer: %s", curlx_dyn_ptr(&dname));
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4660|       |
 4661|      0|out:
 4662|      0|  BIO_free(mem);
 4663|      0|  curlx_dyn_free(&dname);
 4664|      0|  return result;
 4665|      0|}
openssl.c:infof_certstack:
 4446|  3.62k|{
 4447|  3.62k|  STACK_OF(X509) *certstack;
 4448|  3.62k|  long verify_result;
 4449|  3.62k|  int num_cert_levels;
 4450|  3.62k|  int cert_level;
 4451|       |
 4452|  3.62k|  if(!Curl_trc_is_verbose(data))
  ------------------
  |  |  322|  3.62k|  ((data) && (data)->set.verbose &&                        \
  |  |  ------------------
  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  ------------------
  |  |  323|  3.62k|   (!(data)->state.feat ||                                 \
  |  |  ------------------
  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4453|  3.62k|    return;
 4454|       |
 4455|      0|  verify_result = SSL_get_verify_result(ssl);
 4456|      0|  if(verify_result != X509_V_OK)
  ------------------
  |  Branch (4456:6): [True: 0, False: 0]
  ------------------
 4457|      0|    certstack = SSL_get_peer_cert_chain(ssl);
 4458|      0|  else
 4459|      0|    certstack = SSL_get0_verified_chain(ssl);
 4460|      0|  if(!certstack)
  ------------------
  |  Branch (4460:6): [True: 0, False: 0]
  ------------------
 4461|      0|    return;
 4462|      0|  num_cert_levels = sk_X509_num(certstack);
 4463|       |
 4464|      0|  for(cert_level = 0; cert_level < num_cert_levels; cert_level++) {
  ------------------
  |  Branch (4464:23): [True: 0, False: 0]
  ------------------
 4465|      0|    char cert_algorithm[80] = "";
 4466|      0|    char group_name_final[80] = "";
 4467|      0|    const X509_ALGOR *palg_cert = NULL;
 4468|      0|    const ASN1_OBJECT *paobj_cert = NULL;
 4469|      0|    X509 *current_cert;
 4470|      0|    EVP_PKEY *current_pkey;
 4471|      0|    int key_bits;
 4472|      0|    int key_sec_bits;
 4473|      0|    int get_group_name;
 4474|      0|    const char *type_name;
 4475|       |
 4476|      0|    current_cert = sk_X509_value(certstack, cert_level);
 4477|      0|    if(!current_cert)
  ------------------
  |  Branch (4477:8): [True: 0, False: 0]
  ------------------
 4478|      0|      continue;
 4479|       |
 4480|      0|    current_pkey = X509_get0_pubkey(current_cert);
 4481|      0|    if(!current_pkey)
  ------------------
  |  Branch (4481:8): [True: 0, False: 0]
  ------------------
 4482|      0|      continue;
 4483|       |
 4484|      0|    X509_get0_signature(NULL, &palg_cert, current_cert);
 4485|      0|    X509_ALGOR_get0(&paobj_cert, NULL, NULL, palg_cert);
 4486|      0|    OBJ_obj2txt(cert_algorithm, sizeof(cert_algorithm), paobj_cert, 0);
 4487|       |
 4488|      0|    key_bits = EVP_PKEY_bits(current_pkey);
 4489|       |#ifndef HAVE_OPENSSL3
 4490|       |#define EVP_PKEY_get_security_bits EVP_PKEY_security_bits
 4491|       |#endif
 4492|      0|    key_sec_bits = EVP_PKEY_get_security_bits(current_pkey);
 4493|      0|#ifdef HAVE_OPENSSL3
 4494|      0|    {
 4495|      0|      char group_name[80] = "";
 4496|      0|      get_group_name = EVP_PKEY_get_group_name(current_pkey, group_name,
 4497|      0|                                               sizeof(group_name), NULL);
 4498|      0|      curl_msnprintf(group_name_final, sizeof(group_name_final), "/%s",
 4499|      0|                     group_name);
 4500|      0|    }
 4501|      0|    type_name = EVP_PKEY_get0_type_name(current_pkey);
 4502|       |#else
 4503|       |    get_group_name = 0;
 4504|       |    type_name = NULL;
 4505|       |#endif
 4506|       |
 4507|      0|    infof(data, "  Certificate level %d: "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324: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]
  |  |  ------------------
  ------------------
 4508|      0|          "Public key type %s%s (%d/%d Bits/secBits), signed using %s",
 4509|      0|          cert_level, type_name ? type_name : "?",
 4510|      0|          get_group_name == 0 ? "" : group_name_final,
 4511|      0|          key_bits, key_sec_bits, cert_algorithm);
 4512|      0|  }
 4513|      0|}
openssl.c:ossl_verifyhost:
 2033|  3.62k|{
 2034|  3.62k|  bool matched = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
 2035|  3.62k|  int target; /* target type, GEN_DNS or GEN_IPADD */
 2036|  3.62k|  size_t addrlen = 0;
 2037|  3.62k|  STACK_OF(GENERAL_NAME) *altnames;
 2038|  3.62k|#ifdef USE_IPV6
 2039|  3.62k|  struct in6_addr addr;
 2040|       |#else
 2041|       |  struct in_addr addr;
 2042|       |#endif
 2043|  3.62k|  CURLcode result = CURLE_OK;
 2044|  3.62k|  bool dNSName = FALSE; /* if a dNSName field exists in the cert */
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
 2045|  3.62k|  bool iPAddress = FALSE; /* if an iPAddress field exists in the cert */
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
 2046|  3.62k|  size_t hostlen = strlen(peer->origin->hostname);
 2047|       |
 2048|  3.62k|  (void)conn;
 2049|  3.62k|  switch(peer->type) {
 2050|      0|  case CURL_SSL_PEER_IPV4:
  ------------------
  |  Branch (2050:3): [True: 0, False: 3.62k]
  ------------------
 2051|      0|    if(!curlx_inet_pton(AF_INET, peer->origin->hostname, &addr))
  ------------------
  |  Branch (2051:8): [True: 0, False: 0]
  ------------------
 2052|      0|      return CURLE_PEER_FAILED_VERIFICATION;
 2053|      0|    target = GEN_IPADD;
 2054|      0|    addrlen = sizeof(struct in_addr);
 2055|      0|    break;
 2056|      0|#ifdef USE_IPV6
 2057|      0|  case CURL_SSL_PEER_IPV6:
  ------------------
  |  Branch (2057:3): [True: 0, False: 3.62k]
  ------------------
 2058|      0|    if(!curlx_inet_pton(AF_INET6, peer->origin->hostname, &addr))
  ------------------
  |  Branch (2058:8): [True: 0, False: 0]
  ------------------
 2059|      0|      return CURLE_PEER_FAILED_VERIFICATION;
 2060|      0|    target = GEN_IPADD;
 2061|      0|    addrlen = sizeof(struct in6_addr);
 2062|      0|    break;
 2063|      0|#endif
 2064|  3.62k|  case CURL_SSL_PEER_DNS:
  ------------------
  |  Branch (2064:3): [True: 3.62k, False: 0]
  ------------------
 2065|  3.62k|    target = GEN_DNS;
 2066|  3.62k|    break;
 2067|      0|  default:
  ------------------
  |  Branch (2067:3): [True: 0, False: 3.62k]
  ------------------
 2068|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2068:5): [Folded, False: 0]
  |  Branch (2068:5): [Folded, False: 0]
  ------------------
 2069|      0|    failf(data, "unexpected SSL peer type: %d", (int)peer->type);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2070|      0|    return CURLE_PEER_FAILED_VERIFICATION;
 2071|  3.62k|  }
 2072|       |
 2073|       |  /* get a "list" of alternative names */
 2074|  3.62k|  altnames = X509_get_ext_d2i(server_cert, NID_subject_alt_name, NULL, NULL);
 2075|       |
 2076|  3.62k|  if(altnames) {
  ------------------
  |  Branch (2076:6): [True: 0, False: 3.62k]
  ------------------
 2077|       |#ifdef HAVE_BORINGSSL_LIKE
 2078|       |    size_t numalts;
 2079|       |    size_t i;
 2080|       |#else
 2081|      0|    int numalts;
 2082|      0|    int i;
 2083|      0|#endif
 2084|       |
 2085|       |    /* get amount of alternatives, RFC2459 claims there MUST be at least
 2086|       |       one, but we do not depend on it... */
 2087|      0|    numalts = sk_GENERAL_NAME_num(altnames);
 2088|       |
 2089|       |    /* loop through all alternatives - until a dnsmatch */
 2090|      0|    for(i = 0; (i < numalts) && !matched; i++) {
  ------------------
  |  Branch (2090:16): [True: 0, False: 0]
  |  Branch (2090:33): [True: 0, False: 0]
  ------------------
 2091|       |      /* get a handle to alternative name number i */
 2092|      0|      const GENERAL_NAME *check = sk_GENERAL_NAME_value(altnames, i);
 2093|       |
 2094|      0|      if(check->type == GEN_DNS)
  ------------------
  |  Branch (2094:10): [True: 0, False: 0]
  ------------------
 2095|      0|        dNSName = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2096|      0|      else if(check->type == GEN_IPADD)
  ------------------
  |  Branch (2096:15): [True: 0, False: 0]
  ------------------
 2097|      0|        iPAddress = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2098|       |
 2099|       |      /* only check alternatives of the same type the target is */
 2100|      0|      if(check->type == target) {
  ------------------
  |  Branch (2100:10): [True: 0, False: 0]
  ------------------
 2101|       |        /* get data and length */
 2102|      0|        const char *altptr = (const char *)ASN1_STRING_get0_data(check->d.ia5);
 2103|      0|        size_t altlen = (size_t)ASN1_STRING_length(check->d.ia5);
 2104|       |
 2105|      0|        switch(target) {
  ------------------
  |  Branch (2105:16): [True: 0, False: 0]
  ------------------
 2106|      0|        case GEN_DNS: /* name/pattern comparison */
  ------------------
  |  Branch (2106:9): [True: 0, False: 0]
  ------------------
 2107|      0|          if(!memchr(altptr, '\0', altlen) &&
  ------------------
  |  Branch (2107:14): [True: 0, False: 0]
  ------------------
 2108|      0|             Curl_cert_hostcheck(altptr, altlen,
  ------------------
  |  Branch (2108:14): [True: 0, False: 0]
  ------------------
 2109|      0|                                 peer->origin->hostname, hostlen)) {
 2110|      0|            matched = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2111|      0|            infof(data, "  subjectAltName: \"%s\" matches cert's \"%.*s\"",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2112|      0|                  peer->origin->user_hostname, (int)altlen, altptr);
 2113|      0|          }
 2114|      0|          break;
 2115|       |
 2116|      0|        case GEN_IPADD: /* IP address comparison */
  ------------------
  |  Branch (2116:9): [True: 0, False: 0]
  ------------------
 2117|       |          /* compare alternative IP address if the data chunk is the same size
 2118|       |             our server IP address is */
 2119|      0|          if((altlen == addrlen) && !memcmp(altptr, &addr, altlen)) {
  ------------------
  |  Branch (2119:14): [True: 0, False: 0]
  |  Branch (2119:37): [True: 0, False: 0]
  ------------------
 2120|      0|            matched = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 2121|      0|            infof(data, "  subjectAltName: \"%s\" matches cert's IP address!",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2122|      0|                  peer->origin->user_hostname);
 2123|      0|          }
 2124|      0|          break;
 2125|      0|        }
 2126|      0|      }
 2127|      0|    }
 2128|      0|    GENERAL_NAMES_free(altnames);
 2129|      0|  }
 2130|       |
 2131|  3.62k|  if(matched)
  ------------------
  |  Branch (2131:6): [True: 0, False: 3.62k]
  ------------------
 2132|       |    /* an alternative name matched */
 2133|      0|    ;
 2134|  3.62k|  else if(dNSName || iPAddress) {
  ------------------
  |  Branch (2134:11): [True: 0, False: 3.62k]
  |  Branch (2134:22): [True: 0, False: 3.62k]
  ------------------
 2135|      0|    const char *tname = (peer->type == CURL_SSL_PEER_DNS) ? "hostname" :
  ------------------
  |  Branch (2135:25): [True: 0, False: 0]
  ------------------
 2136|      0|                        (peer->type == CURL_SSL_PEER_IPV4) ?
  ------------------
  |  Branch (2136:25): [True: 0, False: 0]
  ------------------
 2137|      0|                        "IPv4 address" : "IPv6 address";
 2138|      0|    infof(data, " subjectAltName does not match %s %s", tname,
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2139|      0|          peer->origin->user_hostname);
 2140|      0|    failf(data, "SSL: no alternative certificate subject name matches "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2141|      0|          "target %s '%s'", tname, peer->origin->user_hostname);
 2142|      0|    result = CURLE_PEER_FAILED_VERIFICATION;
 2143|      0|  }
 2144|  3.62k|  else {
 2145|       |    /* we have to look to the last occurrence of a commonName in the
 2146|       |       distinguished one to get the most significant one. */
 2147|  3.62k|    int i = -1;
 2148|  3.62k|    unsigned char *cn = NULL;
 2149|  3.62k|    int cnlen = 0;
 2150|  3.62k|    bool free_cn = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
 2151|       |
 2152|       |    /* The following is done because of a bug in 0.9.6b */
 2153|  3.62k|    const X509_NAME *name = X509_get_subject_name(server_cert);
 2154|  3.62k|    if(name) {
  ------------------
  |  Branch (2154:8): [True: 3.62k, False: 0]
  ------------------
 2155|  3.62k|      int j;
 2156|  7.25k|      while((j = X509_NAME_get_index_by_NID(name, NID_commonName, i)) >= 0)
  ------------------
  |  Branch (2156:13): [True: 3.62k, False: 3.62k]
  ------------------
 2157|  3.62k|        i = j;
 2158|  3.62k|    }
 2159|       |
 2160|       |    /* we have the name entry and we now convert this to a string
 2161|       |       that we can use for comparison. Doing this we support BMPstring,
 2162|       |       UTF8, etc. */
 2163|       |
 2164|  3.62k|    if(i >= 0) {
  ------------------
  |  Branch (2164:8): [True: 3.62k, False: 0]
  ------------------
 2165|  3.62k|      const ASN1_STRING *tmp =
 2166|  3.62k|        X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name, i));
 2167|       |
 2168|       |      /* In OpenSSL 0.9.7d and earlier, ASN1_STRING_to_UTF8 fails if the input
 2169|       |         is already UTF-8 encoded. We check for this case and copy the raw
 2170|       |         string manually to avoid the problem. This code can be made
 2171|       |         conditional in the future when OpenSSL has been fixed. */
 2172|  3.62k|      if(tmp) {
  ------------------
  |  Branch (2172:10): [True: 3.62k, False: 0]
  ------------------
 2173|  3.62k|        if(ASN1_STRING_type(tmp) == V_ASN1_UTF8STRING) {
  ------------------
  |  Branch (2173:12): [True: 0, False: 3.62k]
  ------------------
 2174|      0|          cnlen = ASN1_STRING_length(tmp);
 2175|      0|          cn = (unsigned char *)CURL_UNCONST(ASN1_STRING_get0_data(tmp));
  ------------------
  |  |  856|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 2176|      0|        }
 2177|  3.62k|        else { /* not a UTF8 name */
 2178|  3.62k|          cnlen = ASN1_STRING_to_UTF8(&cn, tmp);
 2179|  3.62k|          free_cn = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
 2180|  3.62k|        }
 2181|       |
 2182|  3.62k|        if((cnlen <= 0) || !cn)
  ------------------
  |  Branch (2182:12): [True: 0, False: 3.62k]
  |  Branch (2182:28): [True: 0, False: 3.62k]
  ------------------
 2183|      0|          result = CURLE_OUT_OF_MEMORY;
 2184|  3.62k|        else if((size_t)cnlen != strlen((char *)cn)) {
  ------------------
  |  Branch (2184:17): [True: 0, False: 3.62k]
  ------------------
 2185|       |          /* there was a null-terminator before the end of string, this
 2186|       |             cannot match and we return failure! */
 2187|      0|          failf(data, "SSL: illegal cert name field");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2188|      0|          result = CURLE_PEER_FAILED_VERIFICATION;
 2189|      0|        }
 2190|  3.62k|      }
 2191|  3.62k|    }
 2192|       |
 2193|  3.62k|    if(result)
  ------------------
  |  Branch (2193:8): [True: 0, False: 3.62k]
  ------------------
 2194|       |      /* error already detected, pass through */
 2195|      0|      ;
 2196|  3.62k|    else if(!cn) {
  ------------------
  |  Branch (2196:13): [True: 0, False: 3.62k]
  ------------------
 2197|      0|      failf(data, "SSL: unable to obtain common name from peer certificate");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2198|      0|      result = CURLE_PEER_FAILED_VERIFICATION;
 2199|      0|    }
 2200|  3.62k|    else if(!Curl_cert_hostcheck((const char *)cn, cnlen,
  ------------------
  |  Branch (2200:13): [True: 0, False: 3.62k]
  ------------------
 2201|  3.62k|                                 peer->origin->hostname, hostlen)) {
 2202|      0|      failf(data, "SSL: certificate subject name '%s' does not match "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2203|      0|            "target hostname '%s'", cn, peer->origin->user_hostname);
 2204|      0|      result = CURLE_PEER_FAILED_VERIFICATION;
 2205|      0|    }
 2206|  3.62k|    else {
 2207|  3.62k|      infof(data, " common name: %s (matched)", cn);
  ------------------
  |  |  143|  3.62k|  do {                               \
  |  |  144|  3.62k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  3.62k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  ------------------
  |  |  |  |  323|  3.62k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  3.62k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
 2208|  3.62k|    }
 2209|  3.62k|    if(free_cn)
  ------------------
  |  Branch (2209:8): [True: 3.62k, False: 0]
  ------------------
 2210|  3.62k|      OPENSSL_free(cn);
 2211|  3.62k|  }
 2212|       |
 2213|  3.62k|  return result;
 2214|  3.62k|}
openssl.c:ossl_check_issuer:
 4522|  3.62k|{
 4523|  3.62k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 4524|  3.62k|  X509 *issuer = NULL;
 4525|  3.62k|  BIO *fp = NULL;
 4526|  3.62k|  char err_buf[256] = "";
 4527|  3.62k|  bool verify_enabled = (conn_config->verifypeer || conn_config->verifyhost);
  ------------------
  |  Branch (4527:26): [True: 3.55k, False: 75]
  |  Branch (4527:53): [True: 75, False: 0]
  ------------------
 4528|  3.62k|  CURLcode result = CURLE_OK;
 4529|       |
 4530|       |  /* e.g. match issuer name with provided issuer certificate */
 4531|  3.62k|  if(conn_config->issuercert_blob) {
  ------------------
  |  Branch (4531:6): [True: 0, False: 3.62k]
  ------------------
 4532|      0|    fp = BIO_new_mem_buf(conn_config->issuercert_blob->data,
 4533|      0|                         (int)conn_config->issuercert_blob->len);
 4534|      0|    if(!fp) {
  ------------------
  |  Branch (4534:8): [True: 0, False: 0]
  ------------------
 4535|      0|      failf(data, "BIO_new_mem_buf NULL, " OSSL_PACKAGE " error %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4536|      0|            ossl_strerror(ERR_get_error(), err_buf, sizeof(err_buf)));
 4537|      0|      result = CURLE_OUT_OF_MEMORY;
 4538|      0|      goto out;
 4539|      0|    }
 4540|      0|  }
 4541|  3.62k|  else if(conn_config->issuercert) {
  ------------------
  |  Branch (4541:11): [True: 0, False: 3.62k]
  ------------------
 4542|      0|    fp = BIO_new(BIO_s_file());
 4543|      0|    if(!fp) {
  ------------------
  |  Branch (4543:8): [True: 0, False: 0]
  ------------------
 4544|      0|      failf(data, "BIO_new return NULL, " OSSL_PACKAGE " error %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4545|      0|            ossl_strerror(ERR_get_error(), err_buf, sizeof(err_buf)));
 4546|      0|      result = CURLE_OUT_OF_MEMORY;
 4547|      0|      goto out;
 4548|      0|    }
 4549|       |
 4550|      0|    if(BIO_read_filename(fp, conn_config->issuercert) <= 0) {
  ------------------
  |  Branch (4550:8): [True: 0, False: 0]
  ------------------
 4551|      0|      if(verify_enabled)
  ------------------
  |  Branch (4551:10): [True: 0, False: 0]
  ------------------
 4552|      0|        failf(data, "SSL: Unable to open issuer cert (%s)",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4553|      0|              conn_config->issuercert);
 4554|      0|      result = CURLE_SSL_ISSUER_ERROR;
 4555|      0|      goto out;
 4556|      0|    }
 4557|      0|  }
 4558|       |
 4559|  3.62k|  if(fp) {
  ------------------
  |  Branch (4559:6): [True: 0, False: 3.62k]
  ------------------
 4560|      0|    issuer = PEM_read_bio_X509(fp, NULL, ZERO_NULL, NULL);
  ------------------
  |  | 1158|      0|#define ZERO_NULL 0
  ------------------
 4561|      0|    if(!issuer) {
  ------------------
  |  Branch (4561:8): [True: 0, False: 0]
  ------------------
 4562|      0|      if(verify_enabled)
  ------------------
  |  Branch (4562:10): [True: 0, False: 0]
  ------------------
 4563|      0|        failf(data, "SSL: Unable to read issuer cert (%s)",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4564|      0|              conn_config->issuercert);
 4565|      0|      result = CURLE_SSL_ISSUER_ERROR;
 4566|      0|      goto out;
 4567|      0|    }
 4568|       |
 4569|      0|    if(X509_check_issued(issuer, server_cert) != X509_V_OK) {
  ------------------
  |  Branch (4569:8): [True: 0, False: 0]
  ------------------
 4570|      0|      if(verify_enabled)
  ------------------
  |  Branch (4570:10): [True: 0, False: 0]
  ------------------
 4571|      0|        failf(data, "SSL: Certificate issuer check failed (%s)",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4572|      0|              conn_config->issuercert);
 4573|      0|      result = CURLE_SSL_ISSUER_ERROR;
 4574|      0|      goto out;
 4575|      0|    }
 4576|       |
 4577|      0|    infof(data, " SSL certificate issuer check ok (%s)",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4578|      0|          conn_config->issuercert);
 4579|      0|  }
 4580|       |
 4581|  3.62k|out:
 4582|  3.62k|  if(fp)
  ------------------
  |  Branch (4582:6): [True: 0, False: 3.62k]
  ------------------
 4583|      0|    BIO_free(fp);
 4584|  3.62k|  if(issuer)
  ------------------
  |  Branch (4584:6): [True: 0, False: 3.62k]
  ------------------
 4585|      0|    X509_free(issuer);
 4586|  3.62k|  return result;
 4587|  3.62k|}
openssl.c:ossl_check_pinned_key:
 4604|  3.62k|{
 4605|  3.62k|  CURLcode result = CURLE_OK;
 4606|  3.62k|  const char *ptr = pinned(cf, data);
 4607|  3.62k|  if(ptr) {
  ------------------
  |  Branch (4607:6): [True: 0, False: 3.62k]
  ------------------
 4608|      0|    result = ossl_pkp_pin_peer_pubkey(data, server_cert, ptr);
 4609|      0|    if(result)
  ------------------
  |  Branch (4609:8): [True: 0, False: 0]
  ------------------
 4610|      0|      failf(data, "SSL: public key does not match pinned public key");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4611|      0|  }
 4612|  3.62k|  return result;
 4613|  3.62k|}
openssl.c:ossl_init:
 1627|      2|{
 1628|      2|  const uint64_t flags =
 1629|      2|#ifdef OPENSSL_INIT_ENGINE_ALL_BUILTIN
 1630|       |    /* not present in BoringSSL */
 1631|      2|    OPENSSL_INIT_ENGINE_ALL_BUILTIN |
 1632|      2|#endif
 1633|       |#ifdef CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG
 1634|       |    OPENSSL_INIT_NO_LOAD_CONFIG |
 1635|       |#else
 1636|      2|    OPENSSL_INIT_LOAD_CONFIG |
 1637|      2|#endif
 1638|      2|    0;
 1639|      2|  OPENSSL_init_ssl(flags, NULL);
 1640|       |
 1641|      2|#ifndef HAVE_KEYLOG_UPSTREAM
 1642|      2|  Curl_tls_keylog_open();
 1643|      2|#endif
 1644|       |
 1645|      2|  return 1;
 1646|      2|}
openssl.c:ossl_shutdown:
 1843|  3.04k|{
 1844|  3.04k|  struct ssl_connect_data *connssl = cf->ctx;
 1845|  3.04k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 1846|  3.04k|  CURLcode result = CURLE_OK;
 1847|  3.04k|  char buf[1024];
 1848|  3.04k|  int nread = -1, err;
 1849|  3.04k|  size_t i;
 1850|       |
 1851|  3.04k|  DEBUGASSERT(octx);
  ------------------
  |  | 1075|  3.04k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1851:3): [True: 0, False: 3.04k]
  |  Branch (1851:3): [True: 3.04k, False: 0]
  ------------------
 1852|  3.04k|  if(!octx->ssl || cf->shutdown) {
  ------------------
  |  Branch (1852:6): [True: 0, False: 3.04k]
  |  Branch (1852:20): [True: 0, False: 3.04k]
  ------------------
 1853|      0|    *done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1854|      0|    goto out;
 1855|      0|  }
 1856|       |
 1857|  3.04k|  connssl->io_need = CURL_SSL_IO_NEED_NONE;
  ------------------
  |  |  105|  3.04k|#define CURL_SSL_IO_NEED_NONE   0
  ------------------
 1858|  3.04k|  *done = FALSE;
  ------------------
  |  | 1048|  3.04k|#define FALSE false
  ------------------
 1859|  3.04k|  if(!(SSL_get_shutdown(octx->ssl) & SSL_SENT_SHUTDOWN)) {
  ------------------
  |  Branch (1859:6): [True: 3.02k, False: 15]
  ------------------
 1860|       |    /* We have not started the shutdown from our side yet. Check
 1861|       |     * if the server already sent us one. */
 1862|  3.02k|    ERR_clear_error();
 1863|  3.03k|    for(i = 0; i < 10; ++i) {
  ------------------
  |  Branch (1863:16): [True: 3.03k, False: 0]
  ------------------
 1864|  3.03k|      nread = SSL_read(octx->ssl, buf, (int)sizeof(buf));
 1865|  3.03k|      CURL_TRC_CF(data, cf, "SSL shutdown not sent, read -> %d", nread);
  ------------------
  |  |  153|  3.03k|  do {                                          \
  |  |  154|  3.03k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.03k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  6.06k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.03k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.03k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  6.06k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.03k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.03k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.03k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.03k]
  |  |  ------------------
  ------------------
 1866|  3.03k|      if(nread <= 0)
  ------------------
  |  Branch (1866:10): [True: 3.02k, False: 5]
  ------------------
 1867|  3.02k|        break;
 1868|  3.03k|    }
 1869|  3.02k|    err = SSL_get_error(octx->ssl, nread);
 1870|  3.02k|    if(!nread && err == SSL_ERROR_ZERO_RETURN) {
  ------------------
  |  Branch (1870:8): [True: 3.01k, False: 15]
  |  Branch (1870:18): [True: 3.01k, False: 0]
  ------------------
 1871|  3.01k|      bool input_pending;
 1872|       |      /* Yes, it did. */
 1873|  3.01k|      if(!send_shutdown) {
  ------------------
  |  Branch (1873:10): [True: 0, False: 3.01k]
  ------------------
 1874|      0|        CURL_TRC_CF(data, cf, "SSL shutdown received, not sending");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1875|      0|        *done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1876|      0|        goto out;
 1877|      0|      }
 1878|  3.01k|      else if(!cf->next->cft->is_alive(cf->next, data, &input_pending)) {
  ------------------
  |  Branch (1878:15): [True: 0, False: 3.01k]
  ------------------
 1879|       |        /* Server closed the connection after its closy notify. It
 1880|       |         * seems not interested to see our close notify, so do not
 1881|       |         * send it. We are done. */
 1882|      0|        connssl->peer_closed = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1883|      0|        CURL_TRC_CF(data, cf, "peer closed connection");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1884|      0|        *done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1885|      0|        goto out;
 1886|      0|      }
 1887|  3.01k|    }
 1888|  3.02k|  }
 1889|       |
 1890|       |  /* SSL should now have started the shutdown from our side. Since it
 1891|       |   * was not complete, we are lacking the close notify from the server. */
 1892|  3.04k|  if(send_shutdown && !(SSL_get_shutdown(octx->ssl) & SSL_SENT_SHUTDOWN)) {
  ------------------
  |  Branch (1892:6): [True: 3.04k, False: 0]
  |  Branch (1892:23): [True: 3.02k, False: 15]
  ------------------
 1893|  3.02k|    int rc;
 1894|  3.02k|    ERR_clear_error();
 1895|  3.02k|    CURL_TRC_CF(data, cf, "send SSL close notify");
  ------------------
  |  |  153|  3.02k|  do {                                          \
  |  |  154|  3.02k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.02k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  6.05k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.02k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  6.05k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.02k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.02k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.02k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.02k]
  |  |  ------------------
  ------------------
 1896|  3.02k|    rc = SSL_shutdown(octx->ssl);
 1897|  3.02k|    if(rc == 1) {
  ------------------
  |  Branch (1897:8): [True: 3.01k, False: 15]
  ------------------
 1898|  3.01k|      CURL_TRC_CF(data, cf, "SSL shutdown finished");
  ------------------
  |  |  153|  3.01k|  do {                                          \
  |  |  154|  3.01k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.01k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  6.02k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.01k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.01k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  6.02k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.01k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.01k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.01k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.01k]
  |  |  ------------------
  ------------------
 1899|  3.01k|      *done = TRUE;
  ------------------
  |  | 1045|  3.01k|#define TRUE true
  ------------------
 1900|  3.01k|      goto out;
 1901|  3.01k|    }
 1902|     15|    if(SSL_get_error(octx->ssl, rc) == SSL_ERROR_WANT_WRITE) {
  ------------------
  |  Branch (1902:8): [True: 0, False: 15]
  ------------------
 1903|      0|      CURL_TRC_CF(data, cf, "SSL shutdown still wants to send");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1904|      0|      connssl->io_need = CURL_SSL_IO_NEED_SEND;
  ------------------
  |  |  107|      0|#define CURL_SSL_IO_NEED_SEND   (1 << 1)
  ------------------
 1905|      0|      goto out;
 1906|      0|    }
 1907|       |    /* Having sent the close notify, we use SSL_read() to get the
 1908|       |     * missing close notify from the server. */
 1909|     15|  }
 1910|       |
 1911|     30|  for(i = 0; i < 10; ++i) {
  ------------------
  |  Branch (1911:14): [True: 30, False: 0]
  ------------------
 1912|     30|    ERR_clear_error();
 1913|     30|    nread = SSL_read(octx->ssl, buf, (int)sizeof(buf));
 1914|     30|    CURL_TRC_CF(data, cf, "SSL shutdown read -> %d", nread);
  ------------------
  |  |  153|     30|  do {                                          \
  |  |  154|     30|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|     30|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     60|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 30, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 30]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     60|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|     30|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     30|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     30|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 30]
  |  |  ------------------
  ------------------
 1915|     30|    if(nread <= 0)
  ------------------
  |  Branch (1915:8): [True: 30, False: 0]
  ------------------
 1916|     30|      break;
 1917|     30|  }
 1918|     30|  err = SSL_get_error(octx->ssl, nread);
 1919|     30|  switch(err) {
 1920|      0|  case SSL_ERROR_ZERO_RETURN: /* no more data */
  ------------------
  |  Branch (1920:3): [True: 0, False: 30]
  ------------------
 1921|      0|    if(SSL_shutdown(octx->ssl) == 1)
  ------------------
  |  Branch (1921:8): [True: 0, False: 0]
  ------------------
 1922|      0|      CURL_TRC_CF(data, cf, "SSL shutdown finished");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1923|      0|    else
 1924|      0|      CURL_TRC_CF(data, cf, "SSL shutdown not received, but closed");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1925|      0|    *done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1926|      0|    break;
 1927|      0|  case SSL_ERROR_NONE: /* did not get anything */
  ------------------
  |  Branch (1927:3): [True: 0, False: 30]
  ------------------
 1928|     30|  case SSL_ERROR_WANT_READ:
  ------------------
  |  Branch (1928:3): [True: 30, False: 0]
  ------------------
 1929|       |    /* SSL has sent its notify and now wants to read the reply
 1930|       |     * from the server. We are not really interested in that. */
 1931|     30|    CURL_TRC_CF(data, cf, "SSL shutdown sent, want receive");
  ------------------
  |  |  153|     30|  do {                                          \
  |  |  154|     30|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|     30|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|     60|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 30, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 30]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|     60|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|     30|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     30|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     30|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 30]
  |  |  ------------------
  ------------------
 1932|     30|    connssl->io_need = CURL_SSL_IO_NEED_RECV;
  ------------------
  |  |  106|     30|#define CURL_SSL_IO_NEED_RECV   (1 << 0)
  ------------------
 1933|     30|    break;
 1934|      0|  case SSL_ERROR_WANT_WRITE:
  ------------------
  |  Branch (1934:3): [True: 0, False: 30]
  ------------------
 1935|      0|    CURL_TRC_CF(data, cf, "SSL shutdown send blocked");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1936|      0|    connssl->io_need = CURL_SSL_IO_NEED_SEND;
  ------------------
  |  |  107|      0|#define CURL_SSL_IO_NEED_SEND   (1 << 1)
  ------------------
 1937|      0|    break;
 1938|      0|  default:
  ------------------
  |  Branch (1938:3): [True: 0, False: 30]
  ------------------
 1939|       |    /* Server seems to have closed the connection without sending us
 1940|       |     * a close notify. */
 1941|      0|    {
 1942|      0|      VERBOSE(unsigned long sslerr = ERR_get_error());
  ------------------
  |  | 1611|      0|#define VERBOSE(x) x
  ------------------
 1943|      0|      CURL_TRC_CF(data, cf, "SSL shutdown, ignore recv error: '%s', errno %d",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 1944|      0|                  (sslerr ?
 1945|      0|                   ossl_strerror(sslerr, buf, sizeof(buf)) :
 1946|      0|                   SSL_ERROR_to_str(err)),
 1947|      0|                  SOCKERRNO);
 1948|      0|    }
 1949|      0|    *done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1950|      0|    result = CURLE_OK;
 1951|      0|    break;
 1952|     30|  }
 1953|       |
 1954|  3.04k|out:
 1955|  3.04k|  cf->shutdown = (result || *done);
  ------------------
  |  Branch (1955:19): [True: 0, False: 3.04k]
  |  Branch (1955:29): [True: 3.01k, False: 30]
  ------------------
 1956|  3.04k|  if(cf->shutdown || (connssl->io_need != CURL_SSL_IO_NEED_NONE))
  ------------------
  |  |  105|     30|#define CURL_SSL_IO_NEED_NONE   0
  ------------------
  |  Branch (1956:6): [True: 3.01k, False: 30]
  |  Branch (1956:22): [True: 30, False: 0]
  ------------------
 1957|  3.04k|    connssl->input_pending = FALSE;
  ------------------
  |  | 1048|  3.04k|#define FALSE false
  ------------------
 1958|  3.04k|  return result;
 1959|     30|}
openssl.c:ossl_data_pending:
 5068|  3.64k|{
 5069|  3.64k|  struct ssl_connect_data *connssl = cf->ctx;
 5070|  3.64k|  (void)data;
 5071|  3.64k|  return (bool)connssl->input_pending;
 5072|  3.64k|}
openssl.c:ossl_random:
 5465|  31.0k|{
 5466|  31.0k|  int rc;
 5467|  31.0k|  if(data) {
  ------------------
  |  Branch (5467:6): [True: 31.0k, False: 0]
  ------------------
 5468|  31.0k|    if(ossl_seed(data)) /* Initiate the seed if not already done */
  ------------------
  |  Branch (5468:8): [True: 0, False: 31.0k]
  ------------------
 5469|      0|      return CURLE_FAILED_INIT; /* could not seed for some reason */
 5470|  31.0k|  }
 5471|      0|  else {
 5472|      0|    if(!rand_enough())
  ------------------
  |  Branch (5472:8): [True: 0, False: 0]
  ------------------
 5473|      0|      return CURLE_FAILED_INIT;
 5474|      0|  }
 5475|       |  /* RAND_bytes() returns 1 on success, 0 otherwise. */
 5476|  31.0k|  rc = RAND_bytes(entropy, (ossl_valsize_t)curlx_uztosi(length));
 5477|  31.0k|  return rc == 1 ? CURLE_OK : CURLE_FAILED_INIT;
  ------------------
  |  Branch (5477:10): [True: 31.0k, False: 0]
  ------------------
 5478|  31.0k|}
openssl.c:ossl_connect:
 4986|  7.25k|{
 4987|  7.25k|  CURLcode result = CURLE_OK;
 4988|  7.25k|  struct ssl_connect_data *connssl = cf->ctx;
 4989|       |
 4990|       |  /* check if the connection has already been established */
 4991|  7.25k|  if(ssl_connection_complete == connssl->state) {
  ------------------
  |  Branch (4991:6): [True: 0, False: 7.25k]
  ------------------
 4992|      0|    *done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 4993|      0|    return CURLE_OK;
 4994|      0|  }
 4995|       |
 4996|  7.25k|  *done = FALSE;
  ------------------
  |  | 1048|  7.25k|#define FALSE false
  ------------------
 4997|  7.25k|  connssl->io_need = CURL_SSL_IO_NEED_NONE;
  ------------------
  |  |  105|  7.25k|#define CURL_SSL_IO_NEED_NONE   0
  ------------------
 4998|       |
 4999|  7.25k|  if(connssl->connecting_state == ssl_connect_1) {
  ------------------
  |  Branch (4999:6): [True: 3.62k, False: 3.62k]
  ------------------
 5000|  3.62k|    if(Curl_ossl_need_httpsrr(data) &&
  ------------------
  |  Branch (5000:8): [True: 0, False: 3.62k]
  ------------------
 5001|      0|       !Curl_conn_dns_resolved_https(data, cf->sockindex,
  ------------------
  |  |   66|      0|#define Curl_conn_dns_resolved_https(a, b, c)   TRUE
  |  |  ------------------
  |  |  |  | 1045|      0|#define TRUE true
  |  |  ------------------
  ------------------
  |  Branch (5001:8): [Folded, False: 0]
  ------------------
 5002|  3.62k|                                     connssl->peer.peer)) {
 5003|      0|      CURL_TRC_CF(data, cf, "need HTTPS-RR, delaying connect");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 5004|      0|      return CURLE_OK;
 5005|      0|    }
 5006|  3.62k|    CURL_TRC_CF(data, cf, "ossl_connect, step1");
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
 5007|  3.62k|    result = ossl_connect_step1(cf, data);
 5008|  3.62k|    if(result)
  ------------------
  |  Branch (5008:8): [True: 0, False: 3.62k]
  ------------------
 5009|      0|      goto out;
 5010|  3.62k|  }
 5011|       |
 5012|  7.25k|  if(connssl->connecting_state == ssl_connect_2) {
  ------------------
  |  Branch (5012:6): [True: 7.25k, False: 0]
  ------------------
 5013|  7.25k|    CURL_TRC_CF(data, cf, "ossl_connect, step2");
  ------------------
  |  |  153|  7.25k|  do {                                          \
  |  |  154|  7.25k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  7.25k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  14.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 7.25k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 7.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  14.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  7.25k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  7.25k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
 5014|  7.25k|#ifdef HAVE_OPENSSL_EARLYDATA
 5015|  7.25k|    if(connssl->earlydata_state == ssl_earlydata_await) {
  ------------------
  |  Branch (5015:8): [True: 0, False: 7.25k]
  ------------------
 5016|      0|      goto out;
 5017|      0|    }
 5018|  7.25k|    else if(connssl->earlydata_state == ssl_earlydata_sending) {
  ------------------
  |  Branch (5018:13): [True: 0, False: 7.25k]
  ------------------
 5019|      0|      result = ossl_send_earlydata(cf, data);
 5020|      0|      if(result)
  ------------------
  |  Branch (5020:10): [True: 0, False: 0]
  ------------------
 5021|      0|        goto out;
 5022|      0|      connssl->earlydata_state = ssl_earlydata_sent;
 5023|      0|    }
 5024|  7.25k|#endif
 5025|  7.25k|    DEBUGASSERT((connssl->earlydata_state == ssl_earlydata_none) ||
  ------------------
  |  | 1075|  7.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (5025:5): [True: 7.25k, False: 0]
  |  Branch (5025:5): [True: 0, False: 0]
  |  Branch (5025:5): [True: 7.25k, False: 0]
  |  Branch (5025:5): [True: 0, False: 0]
  ------------------
 5026|  7.25k|                (connssl->earlydata_state == ssl_earlydata_sent));
 5027|       |
 5028|  7.25k|    result = ossl_connect_step2(cf, data);
 5029|  7.25k|    if(result)
  ------------------
  |  Branch (5029:8): [True: 3.62k, False: 3.62k]
  ------------------
 5030|  3.62k|      goto out;
 5031|  7.25k|  }
 5032|       |
 5033|  3.62k|  if(connssl->connecting_state == ssl_connect_3) {
  ------------------
  |  Branch (5033:6): [True: 3.62k, False: 0]
  ------------------
 5034|  3.62k|    CURL_TRC_CF(data, cf, "ossl_connect, step3");
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
 5035|  3.62k|    result = ossl_connect_step3(cf, data);
 5036|  3.62k|    if(result)
  ------------------
  |  Branch (5036:8): [True: 0, False: 3.62k]
  ------------------
 5037|      0|      goto out;
 5038|  3.62k|    connssl->connecting_state = ssl_connect_done;
 5039|  3.62k|#ifdef HAVE_OPENSSL_EARLYDATA
 5040|  3.62k|    if(connssl->earlydata_state > ssl_earlydata_none) {
  ------------------
  |  Branch (5040:8): [True: 0, False: 3.62k]
  ------------------
 5041|      0|      struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 5042|       |      /* We should be in this state by now */
 5043|      0|      DEBUGASSERT(connssl->earlydata_state == ssl_earlydata_sent);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (5043:7): [True: 0, False: 0]
  |  Branch (5043:7): [True: 0, False: 0]
  ------------------
 5044|      0|      connssl->earlydata_state =
 5045|      0|        (SSL_get_early_data_status(octx->ssl) == SSL_EARLY_DATA_ACCEPTED) ?
  ------------------
  |  Branch (5045:9): [True: 0, False: 0]
  ------------------
 5046|      0|        ssl_earlydata_accepted : ssl_earlydata_rejected;
 5047|      0|    }
 5048|  3.62k|#endif
 5049|  3.62k|  }
 5050|       |
 5051|  3.62k|  if(connssl->connecting_state == ssl_connect_done) {
  ------------------
  |  Branch (5051:6): [True: 3.62k, False: 0]
  ------------------
 5052|  3.62k|    CURL_TRC_CF(data, cf, "ossl_connect, done");
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
 5053|  3.62k|    connssl->state = ssl_connection_complete;
 5054|  3.62k|  }
 5055|       |
 5056|  7.25k|out:
 5057|  7.25k|  if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (5057:6): [True: 3.62k, False: 3.62k]
  ------------------
 5058|  3.62k|    *done = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
 5059|  3.62k|    return CURLE_OK;
 5060|  3.62k|  }
 5061|  3.62k|  *done = ((connssl->state == ssl_connection_complete) ||
  ------------------
  |  Branch (5061:12): [True: 3.62k, False: 0]
  ------------------
 5062|      0|           (connssl->state == ssl_connection_deferred));
  ------------------
  |  Branch (5062:12): [True: 0, False: 0]
  ------------------
 5063|  3.62k|  return result;
 5064|  7.25k|}
openssl.c:ossl_connect_step1:
 4029|  3.62k|{
 4030|  3.62k|  struct ssl_connect_data *connssl = cf->ctx;
 4031|  3.62k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 4032|  3.62k|  BIO *bio;
 4033|  3.62k|  CURLcode result;
 4034|       |
 4035|  3.62k|  DEBUGASSERT(connssl->connecting_state == ssl_connect_1);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4035:3): [True: 0, False: 3.62k]
  |  Branch (4035:3): [True: 3.62k, False: 0]
  ------------------
 4036|  3.62k|  DEBUGASSERT(octx);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4036:3): [True: 0, False: 3.62k]
  |  Branch (4036:3): [True: 3.62k, False: 0]
  ------------------
 4037|  3.62k|  DEBUGASSERT(connssl->peer.origin);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4037:3): [True: 0, False: 3.62k]
  |  Branch (4037:3): [True: 3.62k, False: 0]
  ------------------
 4038|       |
 4039|  3.62k|  result = Curl_ossl_ctx_init(octx, cf, data, &connssl->peer,
 4040|  3.62k|                              connssl->alpn, NULL, NULL,
 4041|  3.62k|                              ossl_new_session_cb, cf,
 4042|  3.62k|                              ossl_on_session_reuse);
 4043|  3.62k|  if(result)
  ------------------
  |  Branch (4043:6): [True: 0, False: 3.62k]
  ------------------
 4044|      0|    return result;
 4045|       |
 4046|  3.62k|  octx->bio_method = ossl_bio_cf_method_create();
 4047|  3.62k|  if(!octx->bio_method)
  ------------------
  |  Branch (4047:6): [True: 0, False: 3.62k]
  ------------------
 4048|      0|    return CURLE_OUT_OF_MEMORY;
 4049|  3.62k|  bio = BIO_new(octx->bio_method);
 4050|  3.62k|  if(!bio)
  ------------------
  |  Branch (4050:6): [True: 0, False: 3.62k]
  ------------------
 4051|      0|    return CURLE_OUT_OF_MEMORY;
 4052|       |
 4053|  3.62k|  BIO_set_data(bio, cf);
 4054|  3.62k|#ifdef HAVE_SSL_SET0_WBIO
 4055|       |  /* with OpenSSL v1.1.1 we get an alternative to SSL_set_bio() that works
 4056|       |   * without backward compat quirks. Every call takes one reference, so we
 4057|       |   * up it and pass. SSL* then owns and frees it.
 4058|       |   * We check on the function in configure, since LibreSSL and friends
 4059|       |   * each have their own versions to add support for this. */
 4060|  3.62k|  BIO_up_ref(bio);
 4061|  3.62k|  SSL_set0_rbio(octx->ssl, bio);
 4062|  3.62k|  SSL_set0_wbio(octx->ssl, bio);
 4063|       |#else
 4064|       |  SSL_set_bio(octx->ssl, bio, bio);
 4065|       |#endif
 4066|       |
 4067|  3.62k|  if(connssl->alpn && (connssl->state != ssl_connection_deferred)) {
  ------------------
  |  Branch (4067:6): [True: 3.62k, False: 0]
  |  Branch (4067:23): [True: 3.62k, False: 0]
  ------------------
 4068|  3.62k|    struct alpn_proto_buf proto;
 4069|  3.62k|    memset(&proto, 0, sizeof(proto));
 4070|  3.62k|    Curl_alpn_to_proto_str(&proto, connssl->alpn);
 4071|  3.62k|    infof(data, VTLS_INFOF_ALPN_OFFER_1STR, proto.data);
  ------------------
  |  |  143|  3.62k|  do {                               \
  |  |  144|  3.62k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  3.62k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  ------------------
  |  |  |  |  323|  3.62k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  3.62k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
 4072|  3.62k|  }
 4073|       |
 4074|  3.62k|  connssl->connecting_state = ssl_connect_2;
 4075|  3.62k|  return CURLE_OK;
 4076|  3.62k|}
openssl.c:ossl_new_session_cb:
 2715|  7.16k|{
 2716|  7.16k|  struct Curl_cfilter *cf = (struct Curl_cfilter *)SSL_get_app_data(ssl);
 2717|  7.16k|  if(cf) {
  ------------------
  |  Branch (2717:6): [True: 7.16k, False: 0]
  ------------------
 2718|  7.16k|    struct Curl_easy *data = CF_DATA_CURRENT(cf);
  ------------------
  |  |  698|  7.16k|#define CF_DATA_CURRENT(cf) ((cf) ? (CF_CTX_CALL_DATA(cf).data) : NULL)
  |  |  ------------------
  |  |  |  |  222|  7.16k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  |  Branch (698:30): [True: 7.16k, False: 0]
  |  |  ------------------
  ------------------
 2719|  7.16k|    struct ssl_connect_data *connssl = cf->ctx;
 2720|  7.16k|    struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 2721|  7.16k|    struct Curl_ssl_session *session = NULL;
 2722|  7.16k|    Curl_ossl_add_session(cf, data, octx, connssl->peer.scache_key,
 2723|  7.16k|                          ssl_sessionid, connssl->negotiated.alpn, NULL,
 2724|  7.16k|                          0, &session);
 2725|  7.16k|    if(session) { /* remember current TLS session */
  ------------------
  |  Branch (2725:8): [True: 0, False: 7.16k]
  ------------------
 2726|      0|      Curl_ssl_session_destroy(connssl->session);
 2727|      0|      connssl->session = session;
 2728|      0|    }
 2729|  7.16k|  }
 2730|  7.16k|  return 0;
 2731|  7.16k|}
openssl.c:ossl_bio_cf_method_create:
  642|  3.62k|{
  643|  3.62k|  BIO_METHOD *m = BIO_meth_new(BIO_TYPE_MEM, "OpenSSL CF BIO");
  644|  3.62k|  if(m) {
  ------------------
  |  Branch (644:6): [True: 3.62k, False: 0]
  ------------------
  645|  3.62k|    BIO_meth_set_write(m, &ossl_bio_cf_out_write);
  646|  3.62k|    BIO_meth_set_read(m, &ossl_bio_cf_in_read);
  647|  3.62k|    BIO_meth_set_ctrl(m, &ossl_bio_cf_ctrl);
  648|  3.62k|    BIO_meth_set_create(m, &ossl_bio_cf_create);
  649|  3.62k|    BIO_meth_set_destroy(m, &ossl_bio_cf_destroy);
  650|  3.62k|  }
  651|  3.62k|  return m;
  652|  3.62k|}
openssl.c:ossl_bio_cf_out_write:
  568|  13.9k|{
  569|  13.9k|  struct Curl_cfilter *cf = BIO_get_data(bio);
  570|  13.9k|  struct ssl_connect_data *connssl = cf->ctx;
  571|  13.9k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
  572|  13.9k|  struct Curl_easy *data = CF_DATA_CURRENT(cf);
  ------------------
  |  |  698|  13.9k|#define CF_DATA_CURRENT(cf) ((cf) ? (CF_CTX_CALL_DATA(cf).data) : NULL)
  |  |  ------------------
  |  |  |  |  222|  13.9k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  |  Branch (698:30): [True: 13.9k, False: 0]
  |  |  ------------------
  ------------------
  573|  13.9k|  size_t nwritten;
  574|  13.9k|  CURLcode result;
  575|       |
  576|  13.9k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  13.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (576:3): [True: 0, False: 13.9k]
  |  Branch (576:3): [True: 13.9k, False: 0]
  ------------------
  577|  13.9k|  if(blen < 0)
  ------------------
  |  Branch (577:6): [True: 0, False: 13.9k]
  ------------------
  578|      0|    return 0;
  579|       |
  580|  13.9k|  result = Curl_conn_cf_send(cf->next, data,
  581|  13.9k|                             (const uint8_t *)buf, (size_t)blen, FALSE,
  ------------------
  |  | 1048|  13.9k|#define FALSE false
  ------------------
  582|  13.9k|                             &nwritten);
  583|  13.9k|  CURL_TRC_CF(data, cf, "ossl_bio_cf_out_write(len=%d) -> %d, %zu",
  ------------------
  |  |  153|  13.9k|  do {                                          \
  |  |  154|  13.9k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  13.9k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  27.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 13.9k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 13.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  27.8k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  13.9k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  13.9k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  13.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 13.9k]
  |  |  ------------------
  ------------------
  584|  13.9k|              blen, (int)result, nwritten);
  585|  13.9k|  BIO_clear_retry_flags(bio);
  586|  13.9k|  octx->io_result = result;
  587|  13.9k|  if(result) {
  ------------------
  |  Branch (587:6): [True: 0, False: 13.9k]
  ------------------
  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|  13.9k|  return (int)nwritten;
  593|  13.9k|}
openssl.c:ossl_bio_cf_in_read:
  596|  54.4k|{
  597|  54.4k|  struct Curl_cfilter *cf = BIO_get_data(bio);
  598|  54.4k|  struct ssl_connect_data *connssl = cf->ctx;
  599|  54.4k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
  600|  54.4k|  struct Curl_easy *data = CF_DATA_CURRENT(cf);
  ------------------
  |  |  698|  54.4k|#define CF_DATA_CURRENT(cf) ((cf) ? (CF_CTX_CALL_DATA(cf).data) : NULL)
  |  |  ------------------
  |  |  |  |  222|  54.4k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  |  Branch (698:30): [True: 54.4k, False: 0]
  |  |  ------------------
  ------------------
  601|  54.4k|  size_t nread;
  602|  54.4k|  CURLcode result, r2;
  603|       |
  604|  54.4k|  DEBUGASSERT(data);
  ------------------
  |  | 1075|  54.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (604:3): [True: 0, False: 54.4k]
  |  Branch (604:3): [True: 54.4k, False: 0]
  ------------------
  605|       |  /* OpenSSL catches this case, so should we. */
  606|  54.4k|  if(!buf)
  ------------------
  |  Branch (606:6): [True: 0, False: 54.4k]
  ------------------
  607|      0|    return 0;
  608|  54.4k|  if(blen < 0)
  ------------------
  |  Branch (608:6): [True: 0, False: 54.4k]
  ------------------
  609|      0|    return 0;
  610|       |
  611|  54.4k|  result = Curl_conn_cf_recv(cf->next, data, buf, (size_t)blen, &nread);
  612|  54.4k|  CURL_TRC_CF(data, cf, "ossl_bio_cf_in_read(len=%d) -> %d, %zu",
  ------------------
  |  |  153|  54.4k|  do {                                          \
  |  |  154|  54.4k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  54.4k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|   108k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 54.4k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 54.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|   108k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  54.4k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  54.4k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  54.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 54.4k]
  |  |  ------------------
  ------------------
  613|  54.4k|              blen, (int)result, nread);
  614|  54.4k|  BIO_clear_retry_flags(bio);
  615|  54.4k|  octx->io_result = result;
  616|  54.4k|  if(result) {
  ------------------
  |  Branch (616:6): [True: 7.32k, False: 47.1k]
  ------------------
  617|  7.32k|    if(result == CURLE_AGAIN)
  ------------------
  |  Branch (617:8): [True: 7.32k, False: 0]
  ------------------
  618|  7.32k|      BIO_set_retry_read(bio);
  619|  7.32k|  }
  620|  47.1k|  else {
  621|       |    /* feeding data to OpenSSL means SSL_read() might succeed */
  622|  47.1k|    connssl->input_pending = TRUE;
  ------------------
  |  | 1045|  47.1k|#define TRUE true
  ------------------
  623|  47.1k|    if(nread == 0)
  ------------------
  |  Branch (623:8): [True: 0, False: 47.1k]
  ------------------
  624|      0|      connssl->peer_closed = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  625|  47.1k|  }
  626|       |
  627|       |  /* Before returning server replies to the SSL instance, we need
  628|       |   * to have setup the x509 store or verification fails. */
  629|  54.4k|  if(!octx->x509_store_setup) {
  ------------------
  |  Branch (629:6): [True: 3.62k, False: 50.8k]
  ------------------
  630|  3.62k|    r2 = Curl_ssl_setup_x509_store(cf, data, octx);
  631|  3.62k|    if(r2) {
  ------------------
  |  Branch (631:8): [True: 0, False: 3.62k]
  ------------------
  632|      0|      BIO_clear_retry_flags(bio);
  633|      0|      octx->io_result = r2;
  634|      0|      return -1;
  635|      0|    }
  636|  3.62k|    octx->x509_store_setup = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  637|  3.62k|  }
  638|  54.4k|  return result ? -1 : (int)nread;
  ------------------
  |  Branch (638:10): [True: 7.32k, False: 47.1k]
  ------------------
  639|  54.4k|}
openssl.c:ossl_bio_cf_ctrl:
  534|  31.8k|{
  535|  31.8k|  struct Curl_cfilter *cf = BIO_get_data(bio);
  536|  31.8k|  long ret = 1;
  537|       |
  538|  31.8k|  (void)cf;
  539|  31.8k|  (void)ptr;
  540|  31.8k|  switch(cmd) {
  541|      0|  case BIO_CTRL_GET_CLOSE:
  ------------------
  |  Branch (541:3): [True: 0, False: 31.8k]
  ------------------
  542|      0|    ret = (long)BIO_get_shutdown(bio);
  543|      0|    break;
  544|      0|  case BIO_CTRL_SET_CLOSE:
  ------------------
  |  Branch (544:3): [True: 0, False: 31.8k]
  ------------------
  545|      0|    BIO_set_shutdown(bio, (int)num);
  546|      0|    break;
  547|  10.2k|  case BIO_CTRL_FLUSH:
  ------------------
  |  Branch (547:3): [True: 10.2k, False: 21.5k]
  ------------------
  548|       |    /* we do no delayed writes, but if we ever would, this
  549|       |     * needs to trigger it. */
  550|  10.2k|    ret = 1;
  551|  10.2k|    break;
  552|      0|  case BIO_CTRL_DUP:
  ------------------
  |  Branch (552:3): [True: 0, False: 31.8k]
  ------------------
  553|      0|    ret = 1;
  554|      0|    break;
  555|      0|  case BIO_CTRL_EOF: {
  ------------------
  |  Branch (555:3): [True: 0, False: 31.8k]
  ------------------
  556|       |    /* EOF has been reached on input? */
  557|      0|    struct ssl_connect_data *connssl = cf->ctx;
  558|      0|    return connssl->peer_closed;
  559|      0|  }
  560|  21.5k|  default:
  ------------------
  |  Branch (560:3): [True: 21.5k, False: 10.2k]
  ------------------
  561|  21.5k|    ret = 0;
  562|  21.5k|    break;
  563|  31.8k|  }
  564|  31.8k|  return ret;
  565|  31.8k|}
openssl.c:ossl_bio_cf_create:
  519|  3.62k|{
  520|  3.62k|  BIO_set_shutdown(bio, 1);
  521|  3.62k|  BIO_set_init(bio, 1);
  522|       |  BIO_set_data(bio, NULL);
  523|  3.62k|  return 1;
  524|  3.62k|}
openssl.c:ossl_bio_cf_destroy:
  527|  3.62k|{
  528|  3.62k|  if(!bio)
  ------------------
  |  Branch (528:6): [True: 0, False: 3.62k]
  ------------------
  529|      0|    return 0;
  530|  3.62k|  return 1;
  531|  3.62k|}
openssl.c:ossl_connect_step2:
 4145|  7.25k|{
 4146|  7.25k|  int err;
 4147|  7.25k|  struct ssl_connect_data *connssl = cf->ctx;
 4148|  7.25k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 4149|  7.25k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 4150|  7.25k|  DEBUGASSERT(connssl->connecting_state == ssl_connect_2);
  ------------------
  |  | 1075|  7.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4150:3): [True: 0, False: 7.25k]
  |  Branch (4150:3): [True: 7.25k, False: 0]
  ------------------
 4151|  7.25k|  DEBUGASSERT(octx);
  ------------------
  |  | 1075|  7.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4151:3): [True: 0, False: 7.25k]
  |  Branch (4151:3): [True: 7.25k, False: 0]
  ------------------
 4152|       |
 4153|  7.25k|  connssl->io_need = CURL_SSL_IO_NEED_NONE;
  ------------------
  |  |  105|  7.25k|#define CURL_SSL_IO_NEED_NONE   0
  ------------------
 4154|  7.25k|  ERR_clear_error();
 4155|       |
 4156|  7.25k|  err = SSL_connect(octx->ssl);
 4157|       |
 4158|  7.25k|  if(!octx->x509_store_setup) {
  ------------------
  |  Branch (4158:6): [True: 0, False: 7.25k]
  ------------------
 4159|       |    /* After having send off the ClientHello, we prepare the x509
 4160|       |     * store to verify the coming certificate from the server */
 4161|      0|    CURLcode result = Curl_ssl_setup_x509_store(cf, data, octx);
 4162|      0|    if(result)
  ------------------
  |  Branch (4162:8): [True: 0, False: 0]
  ------------------
 4163|      0|      return result;
 4164|      0|    octx->x509_store_setup = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 4165|      0|  }
 4166|       |
 4167|       |#if !defined(HAVE_KEYLOG_UPSTREAM) && !defined(HAVE_KEYLOG_CALLBACK)
 4168|       |  /* If key logging is enabled, wait for the handshake to complete and then
 4169|       |   * proceed with logging secrets (for TLS 1.2 or older).
 4170|       |   */
 4171|       |  if(Curl_tls_keylog_enabled() && !octx->keylog_done)
 4172|       |    ossl_log_tls12_secret(octx->ssl, &octx->keylog_done);
 4173|       |#endif
 4174|       |
 4175|       |  /* 1  is fine
 4176|       |     0  is "not successful but was shut down controlled"
 4177|       |     <0 is "handshake was not successful, because a fatal error occurred" */
 4178|  7.25k|  if(err != 1) {
  ------------------
  |  Branch (4178:6): [True: 3.62k, False: 3.62k]
  ------------------
 4179|  3.62k|    int detail = SSL_get_error(octx->ssl, err);
 4180|  3.62k|    CURL_TRC_CF(data, cf, "SSL_connect() -> err=%d, detail=%d", err, detail);
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
 4181|       |
 4182|  3.62k|    if(detail == SSL_ERROR_WANT_READ) {
  ------------------
  |  Branch (4182:8): [True: 3.62k, False: 0]
  ------------------
 4183|  3.62k|      CURL_TRC_CF(data, cf, "SSL_connect() -> want recv");
  ------------------
  |  |  153|  3.62k|  do {                                          \
  |  |  154|  3.62k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.62k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.62k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.62k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
 4184|  3.62k|      connssl->io_need = CURL_SSL_IO_NEED_RECV;
  ------------------
  |  |  106|  3.62k|#define CURL_SSL_IO_NEED_RECV   (1 << 0)
  ------------------
 4185|  3.62k|      return CURLE_AGAIN;
 4186|  3.62k|    }
 4187|      0|    if(detail == SSL_ERROR_WANT_WRITE) {
  ------------------
  |  Branch (4187:8): [True: 0, False: 0]
  ------------------
 4188|      0|      CURL_TRC_CF(data, cf, "SSL_connect() -> want send");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 4189|      0|      connssl->io_need = CURL_SSL_IO_NEED_SEND;
  ------------------
  |  |  107|      0|#define CURL_SSL_IO_NEED_SEND   (1 << 1)
  ------------------
 4190|      0|      return CURLE_AGAIN;
 4191|      0|    }
 4192|      0|#ifdef SSL_ERROR_WANT_ASYNC
 4193|      0|    if(detail == SSL_ERROR_WANT_ASYNC) {
  ------------------
  |  Branch (4193:8): [True: 0, False: 0]
  ------------------
 4194|      0|      CURL_TRC_CF(data, cf, "SSL_connect() -> want async");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 4195|      0|      connssl->io_need = CURL_SSL_IO_NEED_RECV;
  ------------------
  |  |  106|      0|#define CURL_SSL_IO_NEED_RECV   (1 << 0)
  ------------------
 4196|      0|      return CURLE_AGAIN;
 4197|      0|    }
 4198|      0|#endif
 4199|      0|#ifdef SSL_ERROR_WANT_RETRY_VERIFY
 4200|      0|    if(detail == SSL_ERROR_WANT_RETRY_VERIFY) {
  ------------------
  |  Branch (4200:8): [True: 0, False: 0]
  ------------------
 4201|      0|      CURL_TRC_CF(data, cf, "SSL_connect() -> want retry_verify");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327: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]
  |  |  ------------------
  ------------------
 4202|      0|      Curl_xfer_pause_recv(data, TRUE);
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 4203|      0|      return CURLE_AGAIN;
 4204|      0|    }
 4205|      0|#endif
 4206|      0|    else {
 4207|       |      /* untreated error */
 4208|      0|      sslerr_t errdetail;
 4209|      0|      char error_buffer[256] = "";
 4210|      0|      CURLcode result;
 4211|      0|      long lerr;
 4212|      0|      int lib;
 4213|      0|      int reason;
 4214|       |
 4215|       |      /* the connection failed, we are not waiting for anything else. */
 4216|      0|      connssl->connecting_state = ssl_connect_2;
 4217|       |
 4218|       |      /* Get the earliest error code from the thread's error queue and remove
 4219|       |         the entry. */
 4220|      0|      errdetail = ERR_get_error();
 4221|       |
 4222|       |      /* Extract which lib and reason */
 4223|      0|      lib = ERR_GET_LIB(errdetail);
 4224|      0|      reason = ERR_GET_REASON(errdetail);
 4225|       |
 4226|      0|      if((lib == ERR_LIB_SSL) &&
  ------------------
  |  Branch (4226:10): [True: 0, False: 0]
  ------------------
 4227|      0|         ((reason == SSL_R_CERTIFICATE_VERIFY_FAILED)
  ------------------
  |  Branch (4227:11): [True: 0, False: 0]
  ------------------
 4228|       |/* Missing from OpenSSL 4+ OPENSSL_NO_DEPRECATED_3_0 builds */
 4229|      0|#ifdef SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED
 4230|      0|          || (reason == SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED)
  ------------------
  |  Branch (4230:14): [True: 0, False: 0]
  ------------------
 4231|      0|#endif
 4232|      0|         )) {
 4233|      0|        result = CURLE_PEER_FAILED_VERIFICATION;
 4234|       |
 4235|      0|        lerr = SSL_get_verify_result(octx->ssl);
 4236|      0|        if(lerr != X509_V_OK) {
  ------------------
  |  Branch (4236:12): [True: 0, False: 0]
  ------------------
 4237|      0|          ssl_config->certverifyresult = lerr;
 4238|      0|          failf(data, "SSL certificate problem: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4239|      0|                X509_verify_cert_error_string(lerr));
 4240|      0|        }
 4241|      0|        else
 4242|      0|          failf(data, "%s", "SSL certificate verification failed");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4243|      0|      }
 4244|      0|#ifdef SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED
 4245|       |      /* SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED is only available on
 4246|       |         OpenSSL version above v1.1.1, not AWS-LC, BoringSSL, or LibreSSL */
 4247|      0|      else if((lib == ERR_LIB_SSL) &&
  ------------------
  |  Branch (4247:15): [True: 0, False: 0]
  ------------------
 4248|      0|              (reason == SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED)) {
  ------------------
  |  Branch (4248:15): [True: 0, False: 0]
  ------------------
 4249|       |        /* If client certificate is required, communicate the
 4250|       |           error to client */
 4251|      0|        result = CURLE_SSL_CLIENTCERT;
 4252|      0|        failf(data, "TLS cert problem: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4253|      0|              ossl_strerror(errdetail, error_buffer, sizeof(error_buffer)));
 4254|      0|      }
 4255|      0|#endif
 4256|       |#ifdef HAVE_SSL_SET1_ECH_CONFIG_LIST
 4257|       |      else if((lib == ERR_LIB_SSL) &&
 4258|       |#ifndef HAVE_BORINGSSL_LIKE
 4259|       |              (reason == SSL_R_ECH_REQUIRED)) {
 4260|       |#else
 4261|       |              (reason == SSL_R_ECH_REJECTED)) {
 4262|       |#endif /* HAVE_BORINGSSL_LIKE */
 4263|       |
 4264|       |        /* trace retry_configs if we got some */
 4265|       |        ossl_trace_ech_retry_configs(data, octx->ssl, reason);
 4266|       |
 4267|       |        result = CURLE_ECH_REQUIRED;
 4268|       |        failf(data, "ECH required: %s",
 4269|       |              ossl_strerror(errdetail, error_buffer, sizeof(error_buffer)));
 4270|       |      }
 4271|       |#endif
 4272|      0|      else {
 4273|      0|        result = CURLE_SSL_CONNECT_ERROR;
 4274|      0|        failf(data, "TLS connect error: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4275|      0|              ossl_strerror(errdetail, error_buffer, sizeof(error_buffer)));
 4276|      0|      }
 4277|       |
 4278|       |      /* detail is already set to the SSL error above */
 4279|       |
 4280|       |      /* If we e.g. use SSLv2 request-method and the server does not like us
 4281|       |       * (RST connection, etc.), OpenSSL gives no explanation whatsoever and
 4282|       |       * the SO_ERROR is also lost.
 4283|       |       */
 4284|      0|      if(result == CURLE_SSL_CONNECT_ERROR && errdetail == 0) {
  ------------------
  |  Branch (4284:10): [True: 0, False: 0]
  |  Branch (4284:47): [True: 0, False: 0]
  ------------------
 4285|      0|        char extramsg[80] = "";
 4286|      0|        int sockerr = SOCKERRNO;
  ------------------
  |  | 1089|      0|#define SOCKERRNO         errno
  ------------------
 4287|       |
 4288|      0|        if(sockerr && detail == SSL_ERROR_SYSCALL)
  ------------------
  |  Branch (4288:12): [True: 0, False: 0]
  |  Branch (4288:23): [True: 0, False: 0]
  ------------------
 4289|      0|          curlx_strerror(sockerr, extramsg, sizeof(extramsg));
 4290|      0|        failf(data, OSSL_PACKAGE " SSL_connect: %s in connection to %s:%d ",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
                      failf(data, OSSL_PACKAGE " SSL_connect: %s in connection to %s:%d ",
  ------------------
  |  |  163|      0|#define OSSL_PACKAGE "OpenSSL"
  ------------------
 4291|      0|              extramsg[0] ? extramsg : SSL_ERROR_to_str(detail),
  ------------------
  |  Branch (4291:15): [True: 0, False: 0]
  ------------------
 4292|      0|              connssl->peer.origin->hostname, connssl->peer.origin->port);
 4293|      0|      }
 4294|       |
 4295|      0|      return result;
 4296|      0|    }
 4297|      0|  }
 4298|  3.62k|  else {
 4299|       |    /* we connected fine, we are not waiting for anything else. */
 4300|  3.62k|    connssl->connecting_state = ssl_connect_3;
 4301|  3.62k|    Curl_ossl_report_handshake(data, octx);
 4302|       |
 4303|       |#if defined(HAVE_SSL_SET1_ECH_CONFIG_LIST) && !defined(HAVE_BORINGSSL_LIKE)
 4304|       |    if(CURLECH_ENABLED(data)) {
 4305|       |      char *inner = NULL, *outer = NULL;
 4306|       |      int rv;
 4307|       |      VERBOSE(const char *status);
 4308|       |
 4309|       |      rv = SSL_ech_get1_status(octx->ssl, &inner, &outer);
 4310|       |      switch(rv) {
 4311|       |      case SSL_ECH_STATUS_SUCCESS:
 4312|       |        VERBOSE(status = "succeeded");
 4313|       |        break;
 4314|       |      case SSL_ECH_STATUS_GREASE_ECH:
 4315|       |        VERBOSE(status = "sent GREASE, got retry-configs");
 4316|       |        break;
 4317|       |      case SSL_ECH_STATUS_GREASE:
 4318|       |        VERBOSE(status = "sent GREASE");
 4319|       |        break;
 4320|       |      case SSL_ECH_STATUS_NOT_TRIED:
 4321|       |        VERBOSE(status = "not attempted");
 4322|       |        break;
 4323|       |      case SSL_ECH_STATUS_NOT_CONFIGURED:
 4324|       |        VERBOSE(status = "not configured");
 4325|       |        break;
 4326|       |      case SSL_ECH_STATUS_BACKEND:
 4327|       |        VERBOSE(status = "backend (unexpected)");
 4328|       |        break;
 4329|       |      case SSL_ECH_STATUS_FAILED:
 4330|       |        VERBOSE(status = "failed");
 4331|       |        break;
 4332|       |      case SSL_ECH_STATUS_BAD_CALL:
 4333|       |        VERBOSE(status = "bad call (unexpected)");
 4334|       |        break;
 4335|       |      case SSL_ECH_STATUS_BAD_NAME: {
 4336|       |        struct ssl_primary_config *conn_config =
 4337|       |          Curl_ssl_cf_get_primary_config(cf);
 4338|       |        if(!conn_config->verifypeer && !conn_config->verifyhost &&
 4339|       |           inner && !strcmp(inner, connssl->peer.origin->hostname)) {
 4340|       |          VERBOSE(status = "bad name (tolerated without peer verification)");
 4341|       |          rv = SSL_ECH_STATUS_SUCCESS;
 4342|       |        }
 4343|       |        else {
 4344|       |          VERBOSE(status = "bad name (unexpected)");
 4345|       |        }
 4346|       |        break;
 4347|       |      }
 4348|       |      default:
 4349|       |        VERBOSE(status = "unexpected status");
 4350|       |        infof(data, "ECH: unexpected status %d", rv);
 4351|       |      }
 4352|       |      infof(data, "ECH: result: status is %s, inner is %s, outer is %s",
 4353|       |            (status ? status : "NULL"),
 4354|       |            (inner ? inner : "NULL"),
 4355|       |            (outer ? outer : "NULL"));
 4356|       |      OPENSSL_free(inner);
 4357|       |      OPENSSL_free(outer);
 4358|       |      if(rv == SSL_ECH_STATUS_GREASE_ECH) {
 4359|       |        /* trace retry_configs if we got some */
 4360|       |        ossl_trace_ech_retry_configs(data, octx->ssl, 0);
 4361|       |      }
 4362|       |      if(rv != SSL_ECH_STATUS_SUCCESS && (data->set.tls_ech == CURLECH_HARD)) {
 4363|       |        infof(data, "ECH: ech-hard failed");
 4364|       |        return CURLE_SSL_CONNECT_ERROR;
 4365|       |      }
 4366|       |    }
 4367|       |    else {
 4368|       |      infof(data, "ECH: result: status is not attempted");
 4369|       |    }
 4370|       |#endif /* HAVE_SSL_SET1_ECH_CONFIG_LIST && !HAVE_BORINGSSL_LIKE */
 4371|       |
 4372|       |    /* Sets data and len to negotiated protocol, len is 0 if no protocol was
 4373|       |     * negotiated
 4374|       |     */
 4375|  3.62k|    if(connssl->alpn) {
  ------------------
  |  Branch (4375:8): [True: 3.62k, False: 0]
  ------------------
 4376|  3.62k|      const unsigned char *neg_protocol;
 4377|  3.62k|      unsigned int len;
 4378|  3.62k|      SSL_get0_alpn_selected(octx->ssl, &neg_protocol, &len);
 4379|       |
 4380|  3.62k|      return Curl_alpn_set_negotiated(cf, data, connssl, neg_protocol, len);
 4381|  3.62k|    }
 4382|       |
 4383|      0|    return CURLE_OK;
 4384|  3.62k|  }
 4385|  7.25k|}
openssl.c:ossl_connect_step3:
 4882|  3.62k|{
 4883|  3.62k|  CURLcode result = CURLE_OK;
 4884|  3.62k|  struct ssl_connect_data *connssl = cf->ctx;
 4885|  3.62k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 4886|       |
 4887|  3.62k|  DEBUGASSERT(connssl->connecting_state == ssl_connect_3);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4887:3): [True: 0, False: 3.62k]
  |  Branch (4887:3): [True: 3.62k, False: 0]
  ------------------
 4888|       |
 4889|       |  /*
 4890|       |   * We check certificates to authenticate the server; otherwise we risk
 4891|       |   * man-in-the-middle attack; NEVERTHELESS, if we are told explicitly not to
 4892|       |   * verify the peer, ignore faults and failures from the server cert
 4893|       |   * operations.
 4894|       |   */
 4895|       |
 4896|  3.62k|  result = Curl_ossl_check_peer_cert(cf, data, octx, &connssl->peer);
 4897|  3.62k|  if(result)
  ------------------
  |  Branch (4897:6): [True: 0, False: 3.62k]
  ------------------
 4898|       |    /* on error, remove sessions we might have in the pool */
 4899|      0|    Curl_ssl_scache_remove_all(cf, data, connssl->peer.scache_key);
 4900|       |
 4901|  3.62k|  return result;
 4902|  3.62k|}
openssl.c:ossl_get_internals:
 5515|  3.58k|{
 5516|       |  /* Legacy: CURLINFO_TLS_SESSION must return an SSL_CTX pointer. */
 5517|  3.58k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 5518|  3.58k|  DEBUGASSERT(octx);
  ------------------
  |  | 1075|  3.58k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (5518:3): [True: 0, False: 3.58k]
  |  Branch (5518:3): [True: 3.58k, False: 0]
  ------------------
 5519|  3.58k|  return info == CURLINFO_TLS_SESSION ?
  ------------------
  |  Branch (5519:10): [True: 0, False: 3.58k]
  ------------------
 5520|  3.58k|    (void *)octx->ssl_ctx : (void *)octx->ssl;
 5521|  3.58k|}
openssl.c:ossl_close:
 1962|  3.62k|{
 1963|  3.62k|  struct ssl_connect_data *connssl = cf->ctx;
 1964|  3.62k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 1965|       |
 1966|  3.62k|  (void)data;
 1967|  3.62k|  DEBUGASSERT(octx);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1967:3): [True: 0, False: 3.62k]
  |  Branch (1967:3): [True: 3.62k, False: 0]
  ------------------
 1968|       |
 1969|  3.62k|  connssl->input_pending = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
 1970|  3.62k|  if(octx->ssl) {
  ------------------
  |  Branch (1970:6): [True: 3.62k, False: 0]
  ------------------
 1971|  3.62k|    SSL_free(octx->ssl);
 1972|  3.62k|    octx->ssl = NULL;
 1973|  3.62k|  }
 1974|  3.62k|  if(octx->ssl_ctx) {
  ------------------
  |  Branch (1974:6): [True: 3.62k, False: 0]
  ------------------
 1975|  3.62k|    SSL_CTX_free(octx->ssl_ctx);
 1976|  3.62k|    octx->ssl_ctx = NULL;
 1977|  3.62k|    octx->x509_store_setup = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
 1978|  3.62k|  }
 1979|  3.62k|  if(octx->bio_method) {
  ------------------
  |  Branch (1979:6): [True: 3.62k, False: 0]
  ------------------
 1980|  3.62k|    ossl_bio_cf_method_free(octx->bio_method);
 1981|       |    octx->bio_method = NULL;
 1982|  3.62k|  }
 1983|  3.62k|}
openssl.c:ossl_bio_cf_method_free:
  655|  3.62k|{
  656|  3.62k|  if(m)
  ------------------
  |  Branch (656:6): [True: 3.62k, False: 0]
  ------------------
  657|  3.62k|    BIO_meth_free(m);
  658|  3.62k|}
openssl.c:ossl_close_all:
 1990|  7.46k|{
 1991|       |#ifdef USE_OPENSSL_ENGINE
 1992|       |  if(data->state.engine) {
 1993|       |    ENGINE_finish(data->state.engine);
 1994|       |    ENGINE_free(data->state.engine);
 1995|       |    data->state.engine = NULL;
 1996|       |  }
 1997|       |#else
 1998|  7.46k|  (void)data;
 1999|  7.46k|#endif
 2000|  7.46k|#ifdef OPENSSL_HAS_PROVIDERS
 2001|  7.46k|  ossl_provider_cleanup(data);
 2002|  7.46k|#endif
 2003|  7.46k|}
openssl.c:ossl_recv:
 5174|  7.24k|{
 5175|  7.24k|  char error_buffer[256];
 5176|  7.24k|  unsigned long sslerror;
 5177|  7.24k|  int buffsize;
 5178|  7.24k|  struct ssl_connect_data *connssl = cf->ctx;
 5179|  7.24k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 5180|  7.24k|  CURLcode result = CURLE_OK;
 5181|  7.24k|  int nread;
 5182|       |
 5183|  7.24k|  DEBUGASSERT(octx);
  ------------------
  |  | 1075|  7.24k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (5183:3): [True: 0, False: 7.24k]
  |  Branch (5183:3): [True: 7.24k, False: 0]
  ------------------
 5184|       |
 5185|  7.24k|  *pnread = 0;
 5186|  7.24k|  ERR_clear_error();
 5187|       |
 5188|  7.24k|  connssl->io_need = CURL_SSL_IO_NEED_NONE;
  ------------------
  |  |  105|  7.24k|#define CURL_SSL_IO_NEED_NONE   0
  ------------------
 5189|  7.24k|  buffsize = (buffersize > (size_t)INT_MAX) ? INT_MAX : (int)buffersize;
  ------------------
  |  Branch (5189:14): [True: 0, False: 7.24k]
  ------------------
 5190|  7.24k|  nread = SSL_read(octx->ssl, buf, buffsize);
 5191|       |
 5192|  7.24k|  if(nread > 0)
  ------------------
  |  Branch (5192:6): [True: 623, False: 6.62k]
  ------------------
 5193|    623|    *pnread = (size_t)nread;
 5194|  6.62k|  else {
 5195|       |    /* failed SSL_read */
 5196|  6.62k|    int err = SSL_get_error(octx->ssl, nread);
 5197|       |
 5198|  6.62k|    switch(err) {
 5199|      0|    case SSL_ERROR_NONE: /* this is not an error */
  ------------------
  |  Branch (5199:5): [True: 0, False: 6.62k]
  ------------------
 5200|      0|      break;
 5201|  2.97k|    case SSL_ERROR_ZERO_RETURN: /* no more data */
  ------------------
  |  Branch (5201:5): [True: 2.97k, False: 3.64k]
  ------------------
 5202|       |      /* close_notify alert */
 5203|  2.97k|      if(cf->sockindex == FIRSTSOCKET)
  ------------------
  |  |  234|  2.97k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (5203:10): [True: 2.97k, False: 0]
  ------------------
 5204|       |        /* mark the connection for close if it is indeed the control
 5205|       |           connection */
 5206|  2.97k|        CURL_TRC_CF(data, cf, "TLS close_notify");
  ------------------
  |  |  153|  2.97k|  do {                                          \
  |  |  154|  2.97k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  2.97k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  5.95k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 2.97k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 2.97k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  5.95k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  2.97k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  2.97k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  2.97k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2.97k]
  |  |  ------------------
  ------------------
 5207|  2.97k|      break;
 5208|  3.64k|    case SSL_ERROR_WANT_READ:
  ------------------
  |  Branch (5208:5): [True: 3.64k, False: 2.97k]
  ------------------
 5209|  3.64k|      connssl->io_need = CURL_SSL_IO_NEED_RECV;
  ------------------
  |  |  106|  3.64k|#define CURL_SSL_IO_NEED_RECV   (1 << 0)
  ------------------
 5210|  3.64k|      result = CURLE_AGAIN;
 5211|  3.64k|      goto out;
 5212|      0|    case SSL_ERROR_WANT_WRITE:
  ------------------
  |  Branch (5212:5): [True: 0, False: 6.62k]
  ------------------
 5213|      0|      connssl->io_need = CURL_SSL_IO_NEED_SEND;
  ------------------
  |  |  107|      0|#define CURL_SSL_IO_NEED_SEND   (1 << 1)
  ------------------
 5214|      0|      result = CURLE_AGAIN;
 5215|      0|      goto out;
 5216|      0|    default:
  ------------------
  |  Branch (5216:5): [True: 0, False: 6.62k]
  ------------------
 5217|       |      /* openssl/ssl.h for SSL_ERROR_SYSCALL says "look at error stack/return
 5218|       |         value/errno" */
 5219|       |      /* https://docs.openssl.org/master/man3/ERR_get_error/ */
 5220|      0|      if(octx->io_result == CURLE_AGAIN) {
  ------------------
  |  Branch (5220:10): [True: 0, False: 0]
  ------------------
 5221|      0|        result = CURLE_AGAIN;
 5222|      0|        goto out;
 5223|      0|      }
 5224|      0|      sslerror = ERR_get_error();
 5225|      0|      if((nread < 0) || sslerror) {
  ------------------
  |  Branch (5225:10): [True: 0, False: 0]
  |  Branch (5225:25): [True: 0, False: 0]
  ------------------
 5226|       |        /* If the return code was negative or there actually is an error in the
 5227|       |           queue */
 5228|      0|        int sockerr = SOCKERRNO;
  ------------------
  |  | 1089|      0|#define SOCKERRNO         errno
  ------------------
 5229|      0|        if(sslerror)
  ------------------
  |  Branch (5229:12): [True: 0, False: 0]
  ------------------
 5230|      0|          ossl_strerror(sslerror, error_buffer, sizeof(error_buffer));
 5231|      0|        else if(sockerr && err == SSL_ERROR_SYSCALL)
  ------------------
  |  Branch (5231:17): [True: 0, False: 0]
  |  Branch (5231:28): [True: 0, False: 0]
  ------------------
 5232|      0|          curlx_strerror(sockerr, error_buffer, sizeof(error_buffer));
 5233|      0|        else
 5234|      0|          curl_msnprintf(error_buffer, sizeof(error_buffer), "%s",
 5235|      0|                         SSL_ERROR_to_str(err));
 5236|      0|        failf(data, OSSL_PACKAGE " SSL_read: %s, errno %d",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
                      failf(data, OSSL_PACKAGE " SSL_read: %s, errno %d",
  ------------------
  |  |  163|      0|#define OSSL_PACKAGE "OpenSSL"
  ------------------
 5237|      0|              error_buffer, sockerr);
 5238|      0|        result = CURLE_RECV_ERROR;
 5239|      0|        goto out;
 5240|      0|      }
 5241|      0|      else if(err == SSL_ERROR_SYSCALL) {
  ------------------
  |  Branch (5241:15): [True: 0, False: 0]
  ------------------
 5242|      0|        if(octx->io_result) {
  ------------------
  |  Branch (5242:12): [True: 0, False: 0]
  ------------------
 5243|       |          /* logging handling in underlying filter already */
 5244|      0|          result = octx->io_result;
 5245|      0|        }
 5246|      0|        else if(connssl->peer_closed) {
  ------------------
  |  Branch (5246:17): [True: 0, False: 0]
  ------------------
 5247|      0|          failf(data, "Connection closed abruptly");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 5248|      0|          result = CURLE_RECV_ERROR;
 5249|      0|        }
 5250|      0|        else {
 5251|       |          /* We should no longer get here nowadays, but handle
 5252|       |           * the error in case of some weirdness in the OSSL stack */
 5253|      0|          int sockerr = SOCKERRNO;
  ------------------
  |  | 1089|      0|#define SOCKERRNO         errno
  ------------------
 5254|      0|          if(sockerr)
  ------------------
  |  Branch (5254:14): [True: 0, False: 0]
  ------------------
 5255|      0|            curlx_strerror(sockerr, error_buffer, sizeof(error_buffer));
 5256|      0|          else {
 5257|      0|            curl_msnprintf(error_buffer, sizeof(error_buffer),
 5258|      0|                           "Connection closed abruptly");
 5259|      0|          }
 5260|      0|          failf(data, OSSL_PACKAGE " SSL_read: %s, errno %d",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
                        failf(data, OSSL_PACKAGE " SSL_read: %s, errno %d",
  ------------------
  |  |  163|      0|#define OSSL_PACKAGE "OpenSSL"
  ------------------
 5261|      0|                error_buffer, sockerr);
 5262|      0|          result = CURLE_RECV_ERROR;
 5263|      0|        }
 5264|      0|        goto out;
 5265|      0|      }
 5266|  6.62k|    }
 5267|  6.62k|  }
 5268|       |
 5269|  7.24k|out:
 5270|  7.24k|  if((!result && !*pnread) || (result == CURLE_AGAIN)) {
  ------------------
  |  Branch (5270:7): [True: 3.60k, False: 3.64k]
  |  Branch (5270:18): [True: 2.97k, False: 623]
  |  Branch (5270:31): [True: 3.64k, False: 623]
  ------------------
 5271|       |    /* This happens when:
 5272|       |     * - we read an EOF
 5273|       |     * - OpenSSLs buffers are empty, there is no more data
 5274|       |     * - OpenSSL read is blocked on writing something first
 5275|       |     * - an incomplete TLS packet is buffered that cannot be read
 5276|       |     *   until more data arrives */
 5277|  6.62k|    connssl->input_pending = FALSE;
  ------------------
  |  | 1048|  6.62k|#define FALSE false
  ------------------
 5278|  6.62k|  }
 5279|  7.24k|  CURL_TRC_CF(data, cf, "ossl_recv(len=%zu) -> %d, %zu (in_pending=%d)",
  ------------------
  |  |  153|  7.24k|  do {                                          \
  |  |  154|  7.24k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  7.24k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  14.4k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 7.24k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 7.24k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  14.4k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  7.24k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  7.24k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  7.24k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 7.24k]
  |  |  ------------------
  ------------------
 5280|  7.24k|              buffersize, (int)result, *pnread, connssl->input_pending);
 5281|  7.24k|  return result;
 5282|  7.24k|}
openssl.c:ossl_send:
 5079|  3.60k|{
 5080|       |  /* SSL_write() is said to return 'int' while write() and send() returns
 5081|       |     'size_t' */
 5082|  3.60k|  int err;
 5083|  3.60k|  char error_buffer[256];
 5084|  3.60k|  sslerr_t sslerror;
 5085|  3.60k|  int memlen;
 5086|  3.60k|  struct ssl_connect_data *connssl = cf->ctx;
 5087|  3.60k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 5088|  3.60k|  CURLcode result = CURLE_OK;
 5089|  3.60k|  int nwritten;
 5090|       |
 5091|  3.60k|  DEBUGASSERT(octx);
  ------------------
  |  | 1075|  3.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (5091:3): [True: 0, False: 3.60k]
  |  Branch (5091:3): [True: 3.60k, False: 0]
  ------------------
 5092|  3.60k|  *pnwritten = 0;
 5093|  3.60k|  ERR_clear_error();
 5094|       |
 5095|  3.60k|  connssl->io_need = CURL_SSL_IO_NEED_NONE;
  ------------------
  |  |  105|  3.60k|#define CURL_SSL_IO_NEED_NONE   0
  ------------------
 5096|  3.60k|  memlen = (len > (size_t)INT_MAX) ? INT_MAX : (int)len;
  ------------------
  |  Branch (5096:12): [True: 0, False: 3.60k]
  ------------------
 5097|  3.60k|  if(octx->blocked_ssl_write_len && (octx->blocked_ssl_write_len != memlen)) {
  ------------------
  |  Branch (5097:6): [True: 0, False: 3.60k]
  |  Branch (5097:37): [True: 0, False: 0]
  ------------------
 5098|       |    /* The previous SSL_write() call was blocked, using that length.
 5099|       |     * We need to use that again or OpenSSL freaks out. A shorter
 5100|       |     * length should not happen and is a bug in libcurl. */
 5101|      0|    if(octx->blocked_ssl_write_len > memlen) {
  ------------------
  |  Branch (5101:8): [True: 0, False: 0]
  ------------------
 5102|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (5102:7): [Folded, False: 0]
  |  Branch (5102:7): [Folded, False: 0]
  ------------------
 5103|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 5104|      0|    }
 5105|      0|    memlen = octx->blocked_ssl_write_len;
 5106|      0|  }
 5107|  3.60k|  octx->blocked_ssl_write_len = 0;
 5108|  3.60k|  nwritten = SSL_write(octx->ssl, mem, memlen);
 5109|       |
 5110|  3.60k|  if(nwritten > 0)
  ------------------
  |  Branch (5110:6): [True: 3.60k, False: 0]
  ------------------
 5111|  3.60k|    *pnwritten = (size_t)nwritten;
 5112|      0|  else {
 5113|      0|    err = SSL_get_error(octx->ssl, nwritten);
 5114|       |
 5115|      0|    switch(err) {
 5116|      0|    case SSL_ERROR_WANT_READ:
  ------------------
  |  Branch (5116:5): [True: 0, False: 0]
  ------------------
 5117|      0|      connssl->io_need = CURL_SSL_IO_NEED_RECV;
  ------------------
  |  |  106|      0|#define CURL_SSL_IO_NEED_RECV   (1 << 0)
  ------------------
 5118|      0|      octx->blocked_ssl_write_len = memlen;
 5119|      0|      result = CURLE_AGAIN;
 5120|      0|      goto out;
 5121|      0|    case SSL_ERROR_WANT_WRITE:
  ------------------
  |  Branch (5121:5): [True: 0, False: 0]
  ------------------
 5122|      0|      result = CURLE_AGAIN;
 5123|      0|      octx->blocked_ssl_write_len = memlen;
 5124|      0|      goto out;
 5125|      0|    case SSL_ERROR_SYSCALL: {
  ------------------
  |  Branch (5125:5): [True: 0, False: 0]
  ------------------
 5126|      0|      int sockerr = SOCKERRNO;
  ------------------
  |  | 1089|      0|#define SOCKERRNO         errno
  ------------------
 5127|       |
 5128|      0|      if(octx->io_result == CURLE_AGAIN) {
  ------------------
  |  Branch (5128:10): [True: 0, False: 0]
  ------------------
 5129|      0|        octx->blocked_ssl_write_len = memlen;
 5130|      0|        result = CURLE_AGAIN;
 5131|      0|        goto out;
 5132|      0|      }
 5133|      0|      sslerror = ERR_get_error();
 5134|      0|      if(sslerror)
  ------------------
  |  Branch (5134:10): [True: 0, False: 0]
  ------------------
 5135|      0|        ossl_strerror(sslerror, error_buffer, sizeof(error_buffer));
 5136|      0|      else if(sockerr)
  ------------------
  |  Branch (5136:15): [True: 0, False: 0]
  ------------------
 5137|      0|        curlx_strerror(sockerr, error_buffer, sizeof(error_buffer));
 5138|      0|      else
 5139|      0|        curl_msnprintf(error_buffer, sizeof(error_buffer), "%s",
 5140|      0|                       SSL_ERROR_to_str(err));
 5141|       |
 5142|      0|      failf(data, OSSL_PACKAGE " SSL_write: %s, errno %d",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
                    failf(data, OSSL_PACKAGE " SSL_write: %s, errno %d",
  ------------------
  |  |  163|      0|#define OSSL_PACKAGE "OpenSSL"
  ------------------
 5143|      0|            error_buffer, sockerr);
 5144|      0|      result = CURLE_SEND_ERROR;
 5145|      0|      goto out;
 5146|      0|    }
 5147|      0|    case SSL_ERROR_SSL: {
  ------------------
  |  Branch (5147:5): [True: 0, False: 0]
  ------------------
 5148|       |      /*  A failure in the SSL library occurred, usually a protocol error.
 5149|       |          The OpenSSL error queue contains more information on the error. */
 5150|      0|      sslerror = ERR_get_error();
 5151|      0|      failf(data, "SSL_write() error: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 5152|      0|            ossl_strerror(sslerror, error_buffer, sizeof(error_buffer)));
 5153|      0|      result = CURLE_SEND_ERROR;
 5154|      0|      goto out;
 5155|      0|    }
 5156|      0|    default:
  ------------------
  |  Branch (5156:5): [True: 0, False: 0]
  ------------------
 5157|       |      /* a true error */
 5158|      0|      failf(data, OSSL_PACKAGE " SSL_write: %s, errno %d",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
                    failf(data, OSSL_PACKAGE " SSL_write: %s, errno %d",
  ------------------
  |  |  163|      0|#define OSSL_PACKAGE "OpenSSL"
  ------------------
 5159|      0|            SSL_ERROR_to_str(err), SOCKERRNO);
  ------------------
  |  | 1089|      0|#define SOCKERRNO         errno
  ------------------
 5160|      0|      result = CURLE_SEND_ERROR;
 5161|      0|      goto out;
 5162|      0|    }
 5163|      0|  }
 5164|       |
 5165|  3.60k|out:
 5166|  3.60k|  return result;
 5167|  3.60k|}

Curl_ssl_backend:
  131|  14.6k|{
  132|  14.6k|#ifdef USE_SSL
  133|  14.6k|  multissl_setup(NULL);
  134|  14.6k|  return Curl_ssl->info.id;
  135|       |#else
  136|       |  return CURLSSLBACKEND_NONE;
  137|       |#endif
  138|  14.6k|}
Curl_ssl_init:
  152|      2|{
  153|       |  /* make sure this is only done once */
  154|      2|  if(init_ssl)
  ------------------
  |  Branch (154:6): [True: 0, False: 2]
  ------------------
  155|      0|    return 1;
  156|      2|  init_ssl = TRUE; /* never again */
  ------------------
  |  | 1045|      2|#define TRUE true
  ------------------
  157|       |
  158|      2|  if(Curl_ssl->init)
  ------------------
  |  Branch (158:6): [True: 2, False: 0]
  ------------------
  159|      2|    return Curl_ssl->init();
  160|      0|  return 1;
  161|      2|}
Curl_ssl_close_all:
  227|  7.46k|{
  228|  7.46k|  if(Curl_ssl->close_all)
  ------------------
  |  Branch (228:6): [True: 7.46k, False: 0]
  ------------------
  229|  7.46k|    Curl_ssl->close_all(data);
  230|  7.46k|}
Curl_ssl_free_certinfo:
  296|  18.6k|{
  297|  18.6k|  struct curl_certinfo *ci = &data->info.certs;
  298|       |
  299|  18.6k|  if(ci->num_of_certs) {
  ------------------
  |  Branch (299:6): [True: 10, False: 18.6k]
  ------------------
  300|       |    /* free all individual lists used */
  301|     10|    int i;
  302|     20|    for(i = 0; i < ci->num_of_certs; i++) {
  ------------------
  |  Branch (302:16): [True: 10, False: 10]
  ------------------
  303|     10|      curl_slist_free_all(ci->certinfo[i]);
  304|     10|      ci->certinfo[i] = NULL;
  305|     10|    }
  306|       |
  307|       |    curlx_safefree(ci->certinfo); /* free the actual array too */
  ------------------
  |  | 1332|     10|  do {                      \
  |  | 1333|     10|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|     10|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|     10|    (ptr) = NULL;           \
  |  | 1335|     10|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 10]
  |  |  ------------------
  ------------------
  308|     10|    ci->num_of_certs = 0;
  309|     10|  }
  310|  18.6k|}
Curl_ssl_init_certinfo:
  313|     10|{
  314|     10|  struct curl_certinfo *ci = &data->info.certs;
  315|     10|  struct curl_slist **table;
  316|       |
  317|       |  /* Free any previous certificate information structures */
  318|     10|  Curl_ssl_free_certinfo(data);
  319|       |
  320|       |  /* Allocate the required certificate information structures */
  321|     10|  table = curlx_calloc((size_t)num, sizeof(struct curl_slist *));
  ------------------
  |  | 1473|     10|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  322|     10|  if(!table)
  ------------------
  |  Branch (322:6): [True: 0, False: 10]
  ------------------
  323|      0|    return CURLE_OUT_OF_MEMORY;
  324|       |
  325|     10|  ci->num_of_certs = num;
  326|     10|  ci->certinfo = table;
  327|       |
  328|     10|  return CURLE_OK;
  329|     10|}
Curl_ssl_push_certinfo_len:
  339|    150|{
  340|    150|  struct curl_certinfo *ci = &data->info.certs;
  341|    150|  struct curl_slist *nl;
  342|    150|  CURLcode result = CURLE_OK;
  343|    150|  struct dynbuf build;
  344|       |
  345|    150|  DEBUGASSERT(certnum < ci->num_of_certs);
  ------------------
  |  | 1075|    150|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (345:3): [True: 0, False: 150]
  |  Branch (345:3): [True: 150, False: 0]
  ------------------
  346|       |
  347|    150|  curlx_dyn_init(&build, CURL_X509_STR_MAX);
  ------------------
  |  |  135|    150|#define CURL_X509_STR_MAX  100000
  ------------------
  348|       |
  349|    150|  if(curlx_dyn_add(&build, label) ||
  ------------------
  |  Branch (349:6): [True: 0, False: 150]
  ------------------
  350|    150|     curlx_dyn_addn(&build, ":", 1) ||
  ------------------
  |  Branch (350:6): [True: 0, False: 150]
  ------------------
  351|    150|     curlx_dyn_addn(&build, value, valuelen))
  ------------------
  |  Branch (351:6): [True: 0, False: 150]
  ------------------
  352|      0|    return CURLE_OUT_OF_MEMORY;
  353|       |
  354|    150|  nl = Curl_slist_append_nodup(ci->certinfo[certnum], curlx_dyn_ptr(&build));
  355|    150|  if(!nl) {
  ------------------
  |  Branch (355:6): [True: 0, False: 150]
  ------------------
  356|      0|    curlx_dyn_free(&build);
  357|      0|    curl_slist_free_all(ci->certinfo[certnum]);
  358|      0|    result = CURLE_OUT_OF_MEMORY;
  359|      0|  }
  360|       |
  361|    150|  ci->certinfo[certnum] = nl;
  362|    150|  return result;
  363|    150|}
Curl_ssl_random:
  368|  31.0k|{
  369|  31.0k|  DEBUGASSERT(length == sizeof(int));
  ------------------
  |  | 1075|  31.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (369:3): [True: 0, False: 31.0k]
  |  Branch (369:3): [True: 31.0k, False: 0]
  ------------------
  370|  31.0k|  if(Curl_ssl->random)
  ------------------
  |  Branch (370:6): [True: 31.0k, False: 0]
  ------------------
  371|  31.0k|    return Curl_ssl->random(data, buffer, length);
  372|      0|  else
  373|      0|    return CURLE_NOT_BUILT_IN;
  374|  31.0k|}
Curl_ssl_peer_cleanup:
  868|  3.62k|{
  869|  3.62k|  Curl_peer_unlink(&peer->origin);
  870|  3.62k|  Curl_peer_unlink(&peer->peer);
  871|  3.62k|  curlx_safefree(peer->sni);
  ------------------
  |  | 1332|  3.62k|  do {                      \
  |  | 1333|  3.62k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.62k|    (ptr) = NULL;           \
  |  | 1335|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  872|  3.62k|  curlx_safefree(peer->scache_key);
  ------------------
  |  | 1332|  3.62k|  do {                      \
  |  | 1333|  3.62k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.62k|    (ptr) = NULL;           \
  |  | 1335|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  873|  3.62k|  peer->transport = TRNSPRT_NONE;
  ------------------
  |  |  237|  3.62k|#define TRNSPRT_NONE 0
  ------------------
  874|  3.62k|  peer->type = CURL_SSL_PEER_DNS;
  875|  3.62k|}
Curl_ssl_peer_init:
  902|  3.62k|{
  903|  3.62k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  904|       |
  905|       |  /* We expect a clean struct, e.g. called only ONCE */
  906|  3.62k|  if(!ssl_peer || !origin) {
  ------------------
  |  Branch (906:6): [True: 0, False: 3.62k]
  |  Branch (906:19): [True: 0, False: 3.62k]
  ------------------
  907|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (907:5): [Folded, False: 0]
  |  Branch (907:5): [Folded, False: 0]
  ------------------
  908|      0|    return CURLE_FAILED_INIT;
  909|      0|  }
  910|  3.62k|  DEBUGASSERT(!ssl_peer->origin);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (910:3): [True: 0, False: 3.62k]
  |  Branch (910:3): [True: 3.62k, False: 0]
  ------------------
  911|  3.62k|  DEBUGASSERT(!ssl_peer->peer);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (911:3): [True: 0, False: 3.62k]
  |  Branch (911:3): [True: 3.62k, False: 0]
  ------------------
  912|  3.62k|  DEBUGASSERT(!ssl_peer->sni);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (912:3): [True: 0, False: 3.62k]
  |  Branch (912:3): [True: 3.62k, False: 0]
  ------------------
  913|  3.62k|  ssl_peer->transport = transport;
  914|       |
  915|  3.62k|  Curl_peer_link(&ssl_peer->origin, origin);
  916|  3.62k|  Curl_peer_link(&ssl_peer->peer, peer);
  917|  3.62k|  ssl_peer->type = get_peer_type(origin->hostname);
  918|  3.62k|  if(ssl_peer->type == CURL_SSL_PEER_DNS) {
  ------------------
  |  Branch (918:6): [True: 3.62k, False: 0]
  ------------------
  919|       |    /* not an IP address, normalize according to RCC 6066 ch. 3,
  920|       |     * max len of SNI is 2^16-1, no trailing dot */
  921|  3.62k|    size_t len = strlen(origin->hostname);
  922|  3.62k|    if(len && (origin->hostname[len - 1] == '.'))
  ------------------
  |  Branch (922:8): [True: 3.62k, False: 0]
  |  Branch (922:15): [True: 0, False: 3.62k]
  ------------------
  923|      0|      len--;
  924|  3.62k|    if(len < USHRT_MAX) {
  ------------------
  |  Branch (924:8): [True: 3.62k, False: 0]
  ------------------
  925|  3.62k|      ssl_peer->sni = curlx_calloc(1, len + 1);
  ------------------
  |  | 1473|  3.62k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  926|  3.62k|      if(!ssl_peer->sni)
  ------------------
  |  Branch (926:10): [True: 0, False: 3.62k]
  ------------------
  927|      0|        goto out;
  928|  3.62k|      Curl_strntolower(ssl_peer->sni, origin->hostname, len);
  929|  3.62k|      ssl_peer->sni[len] = 0;
  930|  3.62k|    }
  931|  3.62k|  }
  932|       |
  933|  3.62k|  result = Curl_ssl_peer_key_make(ssl_peer, sslc, tls_id,
  934|  3.62k|                                  &ssl_peer->scache_key);
  935|       |
  936|  3.62k|out:
  937|  3.62k|  if(result)
  ------------------
  |  Branch (937:6): [True: 0, False: 3.62k]
  ------------------
  938|      0|    Curl_ssl_peer_cleanup(ssl_peer);
  939|  3.62k|  return result;
  940|  3.62k|}
Curl_cf_ssl_insert_after:
 1419|  3.62k|{
 1420|  3.62k|  struct Curl_cfilter *cf;
 1421|  3.62k|  CURLcode result;
 1422|       |
 1423|  3.62k|  result = cf_ssl_create(&cf, data, cf_at->conn);
 1424|  3.62k|  if(!result)
  ------------------
  |  Branch (1424:6): [True: 3.62k, False: 0]
  ------------------
 1425|  3.62k|    result = cf_ssl_peer_init(cf, origin, peer, &cf_at->conn->ssl_config);
 1426|  3.62k|  if(!result) {
  ------------------
  |  Branch (1426:6): [True: 3.62k, False: 0]
  ------------------
 1427|  3.62k|    Curl_conn_cf_insert_after(cf_at, cf);
 1428|       |#if defined(USE_HTTPSRR) && defined(USE_ECH)
 1429|       |    /* When using ECH, kick off the HTTPS-RR resolve */
 1430|       |    if((origin->scheme->family == CURLPROTO_HTTP) &&
 1431|       |       CURLECH_ENABLED(data) &&
 1432|       |       Curl_ssl_supports(data, SSLSUPP_ECH) &&
 1433|       |       (data->set.tls_ech != CURLECH_GREASE) &&
 1434|       |       !CURL_EASY_STR(data, STRING_ECH_CONFIG)) {
 1435|       |      result = Curl_conn_dns_add_https_resolve(data, cf->conn, cf->sockindex,
 1436|       |                                               origin);
 1437|       |    }
 1438|       |#endif /* USE_HTTPSRR && USE_ECH */
 1439|  3.62k|  }
 1440|      0|  else if(cf)
  ------------------
  |  Branch (1440:11): [True: 0, False: 0]
  ------------------
 1441|      0|    Curl_conn_cf_discard_chain(&cf, data);
 1442|  3.62k|  return result;
 1443|  3.62k|}
Curl_ssl_supports:
 1500|  3.78k|{
 1501|  3.78k|  (void)data;
 1502|  3.78k|  return (Curl_ssl->supports & ssl_option);
 1503|  3.78k|}
Curl_ssl_cf_is_proxy:
 1585|  93.9k|{
 1586|  93.9k|  return (cf->cft->flags & CF_TYPE_SSL) && (cf->cft->flags & CF_TYPE_PROXY);
  ------------------
  |  |  209|  93.9k|#define CF_TYPE_SSL         (1 << 1)
  ------------------
                return (cf->cft->flags & CF_TYPE_SSL) && (cf->cft->flags & CF_TYPE_PROXY);
  ------------------
  |  |  211|  93.9k|#define CF_TYPE_PROXY       (1 << 3)
  ------------------
  |  Branch (1586:10): [True: 93.9k, False: 0]
  |  Branch (1586:44): [True: 0, False: 93.9k]
  ------------------
 1587|  93.9k|}
Curl_ssl_cf_get_config:
 1591|  39.7k|{
 1592|       |#ifdef CURL_DISABLE_PROXY
 1593|       |  (void)cf;
 1594|       |  return &data->set.ssl;
 1595|       |#else
 1596|  39.7k|  return Curl_ssl_cf_is_proxy(cf) ? &data->set.proxy_ssl : &data->set.ssl;
  ------------------
  |  Branch (1596:10): [True: 0, False: 39.7k]
  ------------------
 1597|  39.7k|#endif
 1598|  39.7k|}
Curl_ssl_cf_get_primary_config:
 1602|  47.0k|{
 1603|       |#ifdef CURL_DISABLE_PROXY
 1604|       |  return &cf->conn->ssl_config;
 1605|       |#else
 1606|  47.0k|  return Curl_ssl_cf_is_proxy(cf) ?
  ------------------
  |  Branch (1606:10): [True: 0, False: 47.0k]
  ------------------
 1607|  47.0k|    &cf->conn->proxy_ssl_config : &cf->conn->ssl_config;
 1608|  47.0k|#endif
 1609|  47.0k|}
Curl_alpn_to_proto_buf:
 1613|  3.62k|{
 1614|  3.62k|  size_t i, len;
 1615|  3.62k|  int off = 0;
 1616|  3.62k|  unsigned char blen;
 1617|       |
 1618|  3.62k|  memset(buf, 0, sizeof(*buf));
 1619|  10.8k|  for(i = 0; spec && i < spec->count; ++i) {
  ------------------
  |  Branch (1619:14): [True: 10.8k, False: 0]
  |  Branch (1619:22): [True: 7.25k, False: 3.62k]
  ------------------
 1620|  7.25k|    len = strlen(spec->entries[i]);
 1621|  7.25k|    if(len >= ALPN_NAME_MAX)
  ------------------
  |  |   52|  7.25k|#define ALPN_NAME_MAX      10
  ------------------
  |  Branch (1621:8): [True: 0, False: 7.25k]
  ------------------
 1622|      0|      return CURLE_FAILED_INIT;
 1623|  7.25k|    blen = (unsigned char)len;
 1624|  7.25k|    if(off + blen + 1 >= (int)sizeof(buf->data))
  ------------------
  |  Branch (1624:8): [True: 0, False: 7.25k]
  ------------------
 1625|      0|      return CURLE_FAILED_INIT;
 1626|  7.25k|    buf->data[off++] = blen;
 1627|  7.25k|    memcpy(buf->data + off, spec->entries[i], blen);
 1628|  7.25k|    off += blen;
 1629|  7.25k|  }
 1630|  3.62k|  buf->len = off;
 1631|  3.62k|  return CURLE_OK;
 1632|  3.62k|}
Curl_alpn_to_proto_str:
 1636|  3.62k|{
 1637|  3.62k|  size_t i, len;
 1638|  3.62k|  size_t off = 0;
 1639|       |
 1640|  3.62k|  memset(buf, 0, sizeof(*buf));
 1641|  10.8k|  for(i = 0; spec && i < spec->count; ++i) {
  ------------------
  |  Branch (1641:14): [True: 10.8k, False: 0]
  |  Branch (1641:22): [True: 7.25k, False: 3.62k]
  ------------------
 1642|  7.25k|    len = strlen(spec->entries[i]);
 1643|  7.25k|    if(len >= ALPN_NAME_MAX)
  ------------------
  |  |   52|  7.25k|#define ALPN_NAME_MAX      10
  ------------------
  |  Branch (1643:8): [True: 0, False: 7.25k]
  ------------------
 1644|      0|      return CURLE_FAILED_INIT;
 1645|  7.25k|    if(off + len + 2 >= sizeof(buf->data))
  ------------------
  |  Branch (1645:8): [True: 0, False: 7.25k]
  ------------------
 1646|      0|      return CURLE_FAILED_INIT;
 1647|  7.25k|    if(off)
  ------------------
  |  Branch (1647:8): [True: 3.62k, False: 3.62k]
  ------------------
 1648|  3.62k|      buf->data[off++] = ',';
 1649|  7.25k|    memcpy(buf->data + off, spec->entries[i], len);
 1650|  7.25k|    off += len;
 1651|  7.25k|  }
 1652|  3.62k|  buf->data[off] = '\0';
 1653|  3.62k|  buf->len = (int)off;
 1654|  3.62k|  return CURLE_OK;
 1655|  3.62k|}
Curl_alpn_copy:
 1680|  3.62k|{
 1681|  3.62k|  if(src)
  ------------------
  |  Branch (1681:6): [True: 3.62k, False: 0]
  ------------------
 1682|  3.62k|    memcpy(dest, src, sizeof(*dest));
 1683|      0|  else
 1684|      0|    memset(dest, 0, sizeof(*dest));
 1685|  3.62k|}
Curl_alpn_set_negotiated:
 1692|  3.62k|{
 1693|  3.62k|  CURLcode result = CURLE_OK;
 1694|  3.62k|  (void)cf;
 1695|       |
 1696|  3.62k|  if(connssl->negotiated.alpn) {
  ------------------
  |  Branch (1696:6): [True: 0, False: 3.62k]
  ------------------
 1697|       |    /* When we ask for a specific ALPN protocol, we need the confirmation
 1698|       |     * of it by the server, as we have installed protocol handler and
 1699|       |     * connection filter chain for exactly this protocol. */
 1700|      0|    if(!proto_len) {
  ------------------
  |  Branch (1700:8): [True: 0, False: 0]
  ------------------
 1701|      0|      failf(data, "ALPN: asked for '%s' from previous session, "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1702|      0|            "but server did not confirm it. Refusing to continue.",
 1703|      0|            connssl->negotiated.alpn);
 1704|      0|      result = CURLE_SSL_CONNECT_ERROR;
 1705|      0|      goto out;
 1706|      0|    }
 1707|      0|    else if(!proto) {
  ------------------
  |  Branch (1707:13): [True: 0, False: 0]
  ------------------
 1708|      0|      DEBUGASSERT(0); /* with length, we need a pointer */
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1708:7): [Folded, False: 0]
  |  Branch (1708:7): [Folded, False: 0]
  ------------------
 1709|      0|      result = CURLE_SSL_CONNECT_ERROR;
 1710|      0|      goto out;
 1711|      0|    }
 1712|      0|    else if((strlen(connssl->negotiated.alpn) != proto_len) ||
  ------------------
  |  Branch (1712:13): [True: 0, False: 0]
  ------------------
 1713|      0|            memcmp(connssl->negotiated.alpn, proto, proto_len)) {
  ------------------
  |  Branch (1713:13): [True: 0, False: 0]
  ------------------
 1714|      0|      failf(data, "ALPN: asked for '%s' from previous session, but server "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1715|      0|            "selected '%.*s'. Refusing to continue.",
 1716|      0|            connssl->negotiated.alpn, (int)proto_len, proto);
 1717|      0|      result = CURLE_SSL_CONNECT_ERROR;
 1718|      0|      goto out;
 1719|      0|    }
 1720|       |    /* ALPN is exactly what we asked for, done. */
 1721|      0|    infof(data, "ALPN: server confirmed to use '%s'",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1722|      0|          connssl->negotiated.alpn);
 1723|      0|    goto out;
 1724|      0|  }
 1725|       |
 1726|  3.62k|  if(proto && proto_len) {
  ------------------
  |  Branch (1726:6): [True: 3.62k, False: 2]
  |  Branch (1726:15): [True: 3.62k, False: 0]
  ------------------
 1727|  3.62k|    if(memchr(proto, '\0', proto_len)) {
  ------------------
  |  Branch (1727:8): [True: 0, False: 3.62k]
  ------------------
 1728|      0|      failf(data, "ALPN: server selected protocol contains NUL. "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1729|      0|                  "Refusing to continue.");
 1730|      0|      result = CURLE_SSL_CONNECT_ERROR;
 1731|      0|      goto out;
 1732|      0|    }
 1733|  3.62k|    connssl->negotiated.alpn = curlx_memdup0((const char *)proto, proto_len);
 1734|  3.62k|    if(!connssl->negotiated.alpn)
  ------------------
  |  Branch (1734:8): [True: 0, False: 3.62k]
  ------------------
 1735|      0|      return CURLE_OUT_OF_MEMORY;
 1736|  3.62k|  }
 1737|       |
 1738|  3.62k|  if(proto && proto_len) {
  ------------------
  |  Branch (1738:6): [True: 3.62k, False: 2]
  |  Branch (1738:15): [True: 3.62k, False: 0]
  ------------------
 1739|  3.62k|    if(connssl->state == ssl_connection_deferred)
  ------------------
  |  Branch (1739:8): [True: 0, False: 3.62k]
  ------------------
 1740|      0|      infof(data, VTLS_INFOF_ALPN_DEFERRED, (int)proto_len, proto);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1741|  3.62k|    else
 1742|  3.62k|      infof(data, VTLS_INFOF_ALPN_ACCEPTED, (int)proto_len, proto);
  ------------------
  |  |  143|  3.62k|  do {                               \
  |  |  144|  3.62k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|  3.62k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  ------------------
  |  |  |  |  323|  3.62k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  3.62k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
 1743|  3.62k|  }
 1744|      2|  else {
 1745|      2|    if(connssl->state == ssl_connection_deferred)
  ------------------
  |  Branch (1745:8): [True: 0, False: 2]
  ------------------
 1746|      0|      infof(data, VTLS_INFOF_NO_ALPN_DEFERRED);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1747|      2|    else
 1748|      2|      infof(data, VTLS_INFOF_NO_ALPN);
  ------------------
  |  |  143|      2|  do {                               \
  |  |  144|      2|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 2, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  323|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      2|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
 1749|      2|  }
 1750|       |
 1751|  3.62k|out:
 1752|  3.62k|  return result;
 1753|  3.62k|}
vtls.c:multissl_setup:
  779|  14.6k|{
  780|  14.6k|  int i;
  781|  14.6k|  char *env;
  782|       |
  783|  14.6k|  if(Curl_ssl != &Curl_ssl_multi)
  ------------------
  |  Branch (783:6): [True: 14.6k, False: 0]
  ------------------
  784|  14.6k|    return 1;
  785|       |
  786|      0|  if(backend) {
  ------------------
  |  Branch (786:6): [True: 0, False: 0]
  ------------------
  787|      0|    Curl_ssl = backend;
  788|      0|    return 0;
  789|      0|  }
  790|       |
  791|      0|  if(!available_backends[0])
  ------------------
  |  Branch (791:6): [True: 0, False: 0]
  ------------------
  792|      0|    return 1;
  793|       |
  794|      0|  env = curl_getenv("CURL_SSL_BACKEND");
  795|      0|  if(env) {
  ------------------
  |  Branch (795:6): [True: 0, False: 0]
  ------------------
  796|      0|    for(i = 0; available_backends[i]; i++) {
  ------------------
  |  Branch (796:16): [True: 0, False: 0]
  ------------------
  797|      0|      if(curl_strequal(env, available_backends[i]->info.name)) {
  ------------------
  |  Branch (797:10): [True: 0, False: 0]
  ------------------
  798|      0|        Curl_ssl = available_backends[i];
  799|      0|        curlx_free(env);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  800|      0|        return 0;
  801|      0|      }
  802|      0|    }
  803|      0|  }
  804|       |
  805|       |#ifdef CURL_DEFAULT_SSL_BACKEND
  806|       |  for(i = 0; available_backends[i]; i++) {
  807|       |    if(curl_strequal(CURL_DEFAULT_SSL_BACKEND,
  808|       |                     available_backends[i]->info.name)) {
  809|       |      Curl_ssl = available_backends[i];
  810|       |      curlx_free(env);
  811|       |      return 0;
  812|       |    }
  813|       |  }
  814|       |#endif
  815|       |
  816|       |  /* Fall back to first available backend */
  817|      0|  Curl_ssl = available_backends[0];
  818|      0|  curlx_free(env);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  819|      0|  return 0;
  820|      0|}
vtls.c:get_peer_type:
  878|  3.62k|{
  879|  3.62k|  if(hostname && hostname[0]) {
  ------------------
  |  Branch (879:6): [True: 3.62k, False: 0]
  |  Branch (879:18): [True: 3.62k, False: 0]
  ------------------
  880|  3.62k|#ifdef USE_IPV6
  881|  3.62k|    struct in6_addr addr;
  882|       |#else
  883|       |    struct in_addr addr;
  884|       |#endif
  885|  3.62k|    if(curlx_inet_pton(AF_INET, hostname, &addr))
  ------------------
  |  Branch (885:8): [True: 0, False: 3.62k]
  ------------------
  886|      0|      return CURL_SSL_PEER_IPV4;
  887|  3.62k|#ifdef USE_IPV6
  888|  3.62k|    else if(curlx_inet_pton(AF_INET6, hostname, &addr)) {
  ------------------
  |  Branch (888:13): [True: 0, False: 3.62k]
  ------------------
  889|      0|      return CURL_SSL_PEER_IPV6;
  890|      0|    }
  891|  3.62k|#endif
  892|  3.62k|  }
  893|  3.62k|  return CURL_SSL_PEER_DNS;
  894|  3.62k|}
vtls.c:ssl_cf_destroy:
  943|  3.62k|{
  944|  3.62k|  struct ssl_connect_data *connssl = cf->ctx;
  945|  3.62k|  if(connssl) {
  ------------------
  |  Branch (945:6): [True: 3.62k, False: 0]
  ------------------
  946|  3.62k|    connssl->ssl_impl->close(cf, data);
  947|  3.62k|    connssl->state = ssl_connection_none;
  948|  3.62k|    connssl->connecting_state = ssl_connect_1;
  949|  3.62k|    connssl->prefs_checked = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  950|  3.62k|    Curl_ssl_peer_cleanup(&connssl->peer);
  951|  3.62k|    Curl_ssl_session_destroy(connssl->session);
  952|  3.62k|    cf_ctx_free(connssl);
  953|  3.62k|    cf->ctx = NULL;
  954|  3.62k|  }
  955|       |  cf->connected = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  956|  3.62k|}
vtls.c:cf_ctx_free:
  209|  3.62k|{
  210|  3.62k|  if(ctx) {
  ------------------
  |  Branch (210:6): [True: 3.62k, False: 0]
  ------------------
  211|  3.62k|    curlx_safefree(ctx->negotiated.alpn);
  ------------------
  |  | 1332|  3.62k|  do {                      \
  |  | 1333|  3.62k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  3.62k|    (ptr) = NULL;           \
  |  | 1335|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
  212|  3.62k|    Curl_bufq_free(&ctx->earlydata);
  213|  3.62k|    curlx_free(ctx->backend);
  ------------------
  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  214|  3.62k|    curlx_free(ctx);
  ------------------
  |  | 1476|  3.62k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  215|  3.62k|  }
  216|  3.62k|}
vtls.c:ssl_cf_connect:
  961|  7.25k|{
  962|  7.25k|  struct ssl_connect_data *connssl = cf->ctx;
  963|  7.25k|  struct cf_call_data save;
  964|  7.25k|  CURLcode result;
  965|       |
  966|  7.25k|  if(cf->connected && (connssl->state != ssl_connection_deferred)) {
  ------------------
  |  Branch (966:6): [True: 0, False: 7.25k]
  |  Branch (966:23): [True: 0, False: 0]
  ------------------
  967|      0|    *done = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  968|      0|    return CURLE_OK;
  969|      0|  }
  970|       |
  971|  7.25k|  if(!cf->next || !connssl->peer.origin) {
  ------------------
  |  Branch (971:6): [True: 0, False: 7.25k]
  |  Branch (971:19): [True: 0, False: 7.25k]
  ------------------
  972|      0|    *done = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  973|      0|    return CURLE_FAILED_INIT;
  974|      0|  }
  975|       |
  976|  7.25k|  if(!cf->next->connected) {
  ------------------
  |  Branch (976:6): [True: 0, False: 7.25k]
  ------------------
  977|      0|    result = cf->next->cft->do_connect(cf->next, data, done);
  978|      0|    if(result || !*done)
  ------------------
  |  Branch (978:8): [True: 0, False: 0]
  |  Branch (978:18): [True: 0, False: 0]
  ------------------
  979|      0|      return result;
  980|      0|  }
  981|       |
  982|  7.25k|  CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  669|  7.25k|  do { \
  |  |  670|  7.25k|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  222|  7.25k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  671|  7.25k|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1075|  7.25k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  672|  7.25k|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  222|  7.25k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  673|  7.25k|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  222|  7.25k|#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); \
  |  |  ------------------
  |  |  |  |  856|  7.25k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  674|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (674:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  |  Branch (982:3): [True: 7.25k, False: 0]
  |  Branch (982:3): [True: 0, False: 0]
  |  Branch (982:3): [True: 7.25k, False: 0]
  |  Branch (982:3): [True: 0, False: 0]
  ------------------
  983|  7.25k|  CURL_TRC_CF(data, cf, "cf_connect()");
  ------------------
  |  |  153|  7.25k|  do {                                          \
  |  |  154|  7.25k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  7.25k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  14.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 7.25k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 7.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  14.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  7.25k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  7.25k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  984|  7.25k|  DEBUGASSERT(connssl);
  ------------------
  |  | 1075|  7.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (984:3): [True: 0, False: 7.25k]
  |  Branch (984:3): [True: 7.25k, False: 0]
  ------------------
  985|       |
  986|  7.25k|  *done = FALSE;
  ------------------
  |  | 1048|  7.25k|#define FALSE false
  ------------------
  987|       |
  988|  7.25k|  if(!connssl->prefs_checked) {
  ------------------
  |  Branch (988:6): [True: 3.62k, False: 3.62k]
  ------------------
  989|  3.62k|    if(!ssl_prefs_check(data)) {
  ------------------
  |  Branch (989:8): [True: 0, False: 3.62k]
  ------------------
  990|      0|      result = CURLE_SSL_CONNECT_ERROR;
  991|      0|      goto out;
  992|      0|    }
  993|  3.62k|    connssl->prefs_checked = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  994|  3.62k|  }
  995|       |
  996|  7.25k|  result = connssl->ssl_impl->do_connect(cf, data, done);
  997|       |
  998|  7.25k|  if(!result && *done) {
  ------------------
  |  Branch (998:6): [True: 7.25k, False: 0]
  |  Branch (998:17): [True: 3.62k, False: 3.62k]
  ------------------
  999|  3.62k|    cf->connected = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
 1000|  3.62k|    if(connssl->state == ssl_connection_complete) {
  ------------------
  |  Branch (1000:8): [True: 3.62k, False: 0]
  ------------------
 1001|  3.62k|      connssl->handshake_done = *Curl_pgrs_now(data);
 1002|  3.62k|    }
 1003|  3.62k|    if(Curl_tls_keylog_enabled()) {
  ------------------
  |  Branch (1003:8): [True: 0, False: 3.62k]
  ------------------
 1004|      0|      infof(data, "SSLKEYLOGFILE set, all TLS secrets are logged to '%s'",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1005|      0|            Curl_tls_keylog_file_name());
 1006|       |#ifdef LIBRESSL_VERSION_NUMBER
 1007|       |      infof(data, "Note LibreSSL only supports SSLKEYLOGFILE for TLS <= 1.2");
 1008|       |#endif
 1009|      0|    }
 1010|       |    /* Connection can be deferred when sending early data */
 1011|  3.62k|    DEBUGASSERT(connssl->state == ssl_connection_complete ||
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1011:5): [True: 3.62k, False: 0]
  |  Branch (1011:5): [True: 0, False: 0]
  |  Branch (1011:5): [True: 3.62k, False: 0]
  |  Branch (1011:5): [True: 0, False: 0]
  ------------------
 1012|  3.62k|                connssl->state == ssl_connection_deferred);
 1013|  3.62k|    DEBUGASSERT(connssl->state != ssl_connection_deferred ||
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1013:5): [True: 3.62k, False: 0]
  |  Branch (1013:5): [True: 0, False: 0]
  |  Branch (1013:5): [True: 3.62k, False: 0]
  |  Branch (1013:5): [True: 0, False: 0]
  ------------------
 1014|  3.62k|                connssl->earlydata_state > ssl_earlydata_none);
 1015|  3.62k|  }
 1016|  7.25k|out:
 1017|  7.25k|  CURL_TRC_CF(data, cf, "cf_connect() -> %d, done=%d", (int)result, *done);
  ------------------
  |  |  153|  7.25k|  do {                                          \
  |  |  154|  7.25k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  7.25k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  14.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 7.25k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 7.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  14.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  7.25k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  7.25k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
 1018|  7.25k|  CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  677|  7.25k|  do { \
  |  |  678|  7.25k|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1075|  7.25k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  679|  7.25k|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1075|  7.25k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  680|  7.25k|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  222|  7.25k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  681|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (681:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  |  Branch (1018:3): [True: 0, False: 7.25k]
  |  Branch (1018:3): [True: 7.25k, False: 0]
  |  Branch (1018:3): [True: 7.25k, False: 0]
  |  Branch (1018:3): [True: 0, False: 0]
  |  Branch (1018:3): [True: 7.25k, False: 0]
  |  Branch (1018:3): [True: 0, False: 0]
  ------------------
 1019|  7.25k|  return result;
 1020|  7.25k|}
vtls.c:ssl_prefs_check:
  164|  3.62k|{
  165|       |  /* check for CURLOPT_SSLVERSION invalid parameter value */
  166|  3.62k|  const unsigned char sslver = data->set.ssl.primary.version;
  167|  3.62k|  if(sslver >= CURL_SSLVERSION_LAST) {
  ------------------
  |  | 2403|  3.62k|#define CURL_SSLVERSION_LAST    8L /* never use, keep last */
  ------------------
  |  Branch (167:6): [True: 0, False: 3.62k]
  ------------------
  168|      0|    failf(data, "Unrecognized parameter value passed via CURLOPT_SSLVERSION");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  169|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  170|      0|  }
  171|       |
  172|  3.62k|  switch(data->set.ssl.primary.version_max) {
  173|  3.62k|  case CURL_SSLVERSION_MAX_NONE:
  ------------------
  |  | 2405|  3.62k|#define CURL_SSLVERSION_MAX_NONE 0L
  ------------------
  |  Branch (173:3): [True: 3.62k, False: 0]
  ------------------
  174|  3.62k|  case CURL_SSLVERSION_MAX_DEFAULT:
  ------------------
  |  | 2406|  3.62k|#define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1   << 16)
  |  |  ------------------
  |  |  |  | 2395|  3.62k|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  |  |  ------------------
  ------------------
  |  Branch (174:3): [True: 0, False: 3.62k]
  ------------------
  175|  3.62k|    break;
  176|       |
  177|      0|  default:
  ------------------
  |  Branch (177:3): [True: 0, False: 3.62k]
  ------------------
  178|      0|    if((data->set.ssl.primary.version_max >> 16) < sslver) {
  ------------------
  |  Branch (178:8): [True: 0, False: 0]
  ------------------
  179|      0|      failf(data, "CURL_SSLVERSION_MAX incompatible with CURL_SSLVERSION");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  180|      0|      return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  181|      0|    }
  182|  3.62k|  }
  183|       |
  184|  3.62k|  return TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
  185|  3.62k|}
vtls.c:ssl_cf_shutdown:
 1198|  3.04k|{
 1199|  3.04k|  struct ssl_connect_data *connssl = cf->ctx;
 1200|  3.04k|  CURLcode result = CURLE_OK;
 1201|       |
 1202|  3.04k|  *done = TRUE;
  ------------------
  |  | 1045|  3.04k|#define TRUE true
  ------------------
 1203|       |  /* If we have done the SSL handshake, shut down the connection cleanly */
 1204|  3.04k|  if(cf->connected && (connssl->state == ssl_connection_complete) &&
  ------------------
  |  Branch (1204:6): [True: 3.04k, False: 0]
  |  Branch (1204:23): [True: 3.04k, False: 0]
  ------------------
 1205|  3.04k|     !cf->shutdown && Curl_ssl->shut_down) {
  ------------------
  |  Branch (1205:6): [True: 3.04k, False: 0]
  |  Branch (1205:23): [True: 3.04k, False: 0]
  ------------------
 1206|  3.04k|    struct cf_call_data save;
 1207|       |
 1208|  3.04k|    CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  669|  3.04k|  do { \
  |  |  670|  3.04k|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  222|  3.04k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  671|  3.04k|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1075|  3.04k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  672|  3.04k|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  222|  3.04k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  673|  3.04k|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  222|  3.04k|#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); \
  |  |  ------------------
  |  |  |  |  856|  3.04k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  674|  3.04k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (674:11): [Folded, False: 3.04k]
  |  |  ------------------
  ------------------
  |  Branch (1208:5): [True: 3.04k, False: 0]
  |  Branch (1208:5): [True: 0, False: 0]
  |  Branch (1208:5): [True: 3.04k, False: 0]
  |  Branch (1208:5): [True: 0, False: 0]
  ------------------
 1209|  3.04k|    result = connssl->ssl_impl->shut_down(cf, data, TRUE, done);
  ------------------
  |  | 1045|  3.04k|#define TRUE true
  ------------------
 1210|  3.04k|    CURL_TRC_CF(data, cf, "cf_shutdown -> %d, done=%d", (int)result, *done);
  ------------------
  |  |  153|  3.04k|  do {                                          \
  |  |  154|  3.04k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  3.04k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  6.08k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.04k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.04k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  6.08k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.04k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.04k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.04k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.04k]
  |  |  ------------------
  ------------------
 1211|  3.04k|    CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  677|  3.04k|  do { \
  |  |  678|  3.04k|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1075|  3.04k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  679|  3.04k|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1075|  3.04k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  680|  3.04k|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  222|  3.04k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  681|  3.04k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (681:11): [Folded, False: 3.04k]
  |  |  ------------------
  ------------------
  |  Branch (1211:5): [True: 0, False: 3.04k]
  |  Branch (1211:5): [True: 3.04k, False: 0]
  |  Branch (1211:5): [True: 3.04k, False: 0]
  |  Branch (1211:5): [True: 0, False: 0]
  |  Branch (1211:5): [True: 3.04k, False: 0]
  |  Branch (1211:5): [True: 0, False: 0]
  ------------------
 1212|  3.04k|    cf->shutdown = (result || *done);
  ------------------
  |  Branch (1212:21): [True: 0, False: 3.04k]
  |  Branch (1212:31): [True: 3.01k, False: 30]
  ------------------
 1213|  3.04k|  }
 1214|  3.04k|  return result;
 1215|  3.04k|}
vtls.c:ssl_cf_data_pending:
 1098|  3.64k|{
 1099|  3.64k|  struct ssl_connect_data *connssl = cf->ctx;
 1100|  3.64k|  struct cf_call_data save;
 1101|  3.64k|  bool pending;
 1102|       |
 1103|  3.64k|  CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  669|  3.64k|  do { \
  |  |  670|  3.64k|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  222|  3.64k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  671|  3.64k|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1075|  3.64k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  672|  3.64k|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  222|  3.64k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  673|  3.64k|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  222|  3.64k|#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); \
  |  |  ------------------
  |  |  |  |  856|  3.64k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  674|  3.64k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (674:11): [Folded, False: 3.64k]
  |  |  ------------------
  ------------------
  |  Branch (1103:3): [True: 3.64k, False: 0]
  |  Branch (1103:3): [True: 0, False: 0]
  |  Branch (1103:3): [True: 3.64k, False: 0]
  |  Branch (1103:3): [True: 0, False: 0]
  ------------------
 1104|  3.64k|  if(connssl->ssl_impl->data_pending &&
  ------------------
  |  Branch (1104:6): [True: 3.64k, False: 0]
  ------------------
 1105|  3.64k|     connssl->ssl_impl->data_pending(cf, data))
  ------------------
  |  Branch (1105:6): [True: 0, False: 3.64k]
  ------------------
 1106|      0|    pending = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
 1107|  3.64k|  else
 1108|  3.64k|    pending = cf->next->cft->has_data_pending(cf->next, data);
 1109|  3.64k|  CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  677|  3.64k|  do { \
  |  |  678|  3.64k|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1075|  3.64k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  679|  3.64k|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1075|  3.64k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  680|  3.64k|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  222|  3.64k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  681|  3.64k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (681:11): [Folded, False: 3.64k]
  |  |  ------------------
  ------------------
  |  Branch (1109:3): [True: 0, False: 3.64k]
  |  Branch (1109:3): [True: 3.64k, False: 0]
  |  Branch (1109:3): [True: 3.64k, False: 0]
  |  Branch (1109:3): [True: 0, False: 0]
  |  Branch (1109:3): [True: 3.64k, False: 0]
  |  Branch (1109:3): [True: 0, False: 0]
  ------------------
 1110|  3.64k|  return pending;
 1111|  3.64k|}
vtls.c:ssl_cf_send:
 1117|  3.60k|{
 1118|  3.60k|  struct ssl_connect_data *connssl = cf->ctx;
 1119|  3.60k|  struct cf_call_data save;
 1120|  3.60k|  CURLcode result = CURLE_OK;
 1121|       |
 1122|  3.60k|  (void)eos;
 1123|  3.60k|  *pnwritten = 0;
 1124|  3.60k|  CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  669|  3.60k|  do { \
  |  |  670|  3.60k|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  222|  3.60k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  671|  3.60k|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1075|  3.60k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  672|  3.60k|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  222|  3.60k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  673|  3.60k|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  222|  3.60k|#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); \
  |  |  ------------------
  |  |  |  |  856|  3.60k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  674|  3.60k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (674:11): [Folded, False: 3.60k]
  |  |  ------------------
  ------------------
  |  Branch (1124:3): [True: 3.60k, False: 0]
  |  Branch (1124:3): [True: 0, False: 0]
  |  Branch (1124:3): [True: 3.60k, False: 0]
  |  Branch (1124:3): [True: 0, False: 0]
  ------------------
 1125|       |
 1126|  3.60k|  if(connssl->state == ssl_connection_deferred) {
  ------------------
  |  Branch (1126:6): [True: 0, False: 3.60k]
  ------------------
 1127|      0|    bool done = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1128|      0|    result = ssl_cf_connect_deferred(cf, data, buf, blen, &done);
 1129|      0|    if(result)
  ------------------
  |  Branch (1129:8): [True: 0, False: 0]
  ------------------
 1130|      0|      goto out;
 1131|      0|    else if(!done) {
  ------------------
  |  Branch (1131:13): [True: 0, False: 0]
  ------------------
 1132|      0|      result = CURLE_AGAIN;
 1133|      0|      goto out;
 1134|      0|    }
 1135|      0|    DEBUGASSERT(connssl->state == ssl_connection_complete);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1135:5): [True: 0, False: 0]
  |  Branch (1135:5): [True: 0, False: 0]
  ------------------
 1136|      0|  }
 1137|       |
 1138|  3.60k|  if(connssl->earlydata_skip) {
  ------------------
  |  Branch (1138:6): [True: 0, False: 3.60k]
  ------------------
 1139|      0|    if(connssl->earlydata_skip >= blen) {
  ------------------
  |  Branch (1139:8): [True: 0, False: 0]
  ------------------
 1140|      0|      connssl->earlydata_skip -= blen;
 1141|      0|      result = CURLE_OK;
 1142|      0|      *pnwritten = blen;
 1143|      0|      goto out;
 1144|      0|    }
 1145|      0|    else {
 1146|      0|      *pnwritten = connssl->earlydata_skip;
 1147|      0|      buf = buf + connssl->earlydata_skip;
 1148|      0|      blen -= connssl->earlydata_skip;
 1149|      0|      connssl->earlydata_skip = 0;
 1150|      0|    }
 1151|      0|  }
 1152|       |
 1153|       |  /* OpenSSL and maybe other TLS libs do not like 0-length writes. Skip. */
 1154|  3.60k|  if(blen > 0) {
  ------------------
  |  Branch (1154:6): [True: 3.60k, False: 0]
  ------------------
 1155|  3.60k|    size_t nwritten;
 1156|  3.60k|    result = connssl->ssl_impl->send_plain(cf, data, buf, blen, &nwritten);
 1157|  3.60k|    if(!result)
  ------------------
  |  Branch (1157:8): [True: 3.60k, False: 0]
  ------------------
 1158|  3.60k|      *pnwritten += nwritten;
 1159|  3.60k|  }
 1160|       |
 1161|  3.60k|out:
 1162|  3.60k|  CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  677|  3.60k|  do { \
  |  |  678|  3.60k|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1075|  3.60k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  679|  3.60k|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1075|  3.60k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  680|  3.60k|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  222|  3.60k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  681|  3.60k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (681:11): [Folded, False: 3.60k]
  |  |  ------------------
  ------------------
  |  Branch (1162:3): [True: 0, False: 3.60k]
  |  Branch (1162:3): [True: 3.60k, False: 0]
  |  Branch (1162:3): [True: 3.60k, False: 0]
  |  Branch (1162:3): [True: 0, False: 0]
  |  Branch (1162:3): [True: 3.60k, False: 0]
  |  Branch (1162:3): [True: 0, False: 0]
  ------------------
 1163|  3.60k|  return result;
 1164|  3.60k|}
vtls.c:ssl_cf_recv:
 1169|  7.24k|{
 1170|  7.24k|  struct ssl_connect_data *connssl = cf->ctx;
 1171|  7.24k|  struct cf_call_data save;
 1172|  7.24k|  CURLcode result = CURLE_OK;
 1173|       |
 1174|  7.24k|  CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  669|  7.24k|  do { \
  |  |  670|  7.24k|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  222|  7.24k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  671|  7.24k|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1075|  7.24k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  672|  7.24k|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  222|  7.24k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  673|  7.24k|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  222|  7.24k|#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); \
  |  |  ------------------
  |  |  |  |  856|  7.24k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  674|  7.24k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (674:11): [Folded, False: 7.24k]
  |  |  ------------------
  ------------------
  |  Branch (1174:3): [True: 7.24k, False: 0]
  |  Branch (1174:3): [True: 0, False: 0]
  |  Branch (1174:3): [True: 7.24k, False: 0]
  |  Branch (1174:3): [True: 0, False: 0]
  ------------------
 1175|  7.24k|  *pnread = 0;
 1176|  7.24k|  if(connssl->state == ssl_connection_deferred) {
  ------------------
  |  Branch (1176:6): [True: 0, False: 7.24k]
  ------------------
 1177|      0|    bool done = FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
 1178|      0|    result = ssl_cf_connect_deferred(cf, data, NULL, 0, &done);
 1179|      0|    if(result)
  ------------------
  |  Branch (1179:8): [True: 0, False: 0]
  ------------------
 1180|      0|      goto out;
 1181|      0|    else if(!done) {
  ------------------
  |  Branch (1181:13): [True: 0, False: 0]
  ------------------
 1182|      0|      result = CURLE_AGAIN;
 1183|      0|      goto out;
 1184|      0|    }
 1185|      0|    DEBUGASSERT(connssl->state == ssl_connection_complete);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1185:5): [True: 0, False: 0]
  |  Branch (1185:5): [True: 0, False: 0]
  ------------------
 1186|      0|  }
 1187|       |
 1188|  7.24k|  result = connssl->ssl_impl->recv_plain(cf, data, buf, len, pnread);
 1189|       |
 1190|  7.24k|out:
 1191|  7.24k|  CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  677|  7.24k|  do { \
  |  |  678|  7.24k|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1075|  7.24k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  679|  7.24k|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1075|  7.24k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  680|  7.24k|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  222|  7.24k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  681|  7.24k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (681:11): [Folded, False: 7.24k]
  |  |  ------------------
  ------------------
  |  Branch (1191:3): [True: 0, False: 7.24k]
  |  Branch (1191:3): [True: 7.24k, False: 0]
  |  Branch (1191:3): [True: 7.24k, False: 0]
  |  Branch (1191:3): [True: 0, False: 0]
  |  Branch (1191:3): [True: 7.24k, False: 0]
  |  Branch (1191:3): [True: 0, False: 0]
  ------------------
 1192|  7.24k|  return result;
 1193|  7.24k|}
vtls.c:ssl_cf_cntrl:
 1270|  14.4k|{
 1271|  14.4k|  struct ssl_connect_data *connssl = cf->ctx;
 1272|       |
 1273|  14.4k|  (void)arg1;
 1274|  14.4k|  (void)arg2;
 1275|  14.4k|  (void)data;
 1276|  14.4k|  switch(event) {
  ------------------
  |  Branch (1276:10): [True: 7.25k, False: 7.18k]
  ------------------
 1277|  3.62k|  case CF_CTRL_CONN_INFO_UPDATE:
  ------------------
  |  |  121|  3.62k|#define CF_CTRL_CONN_INFO_UPDATE (256 + 0) /* 0          NULL     ignored */
  ------------------
  |  Branch (1277:3): [True: 3.62k, False: 10.8k]
  ------------------
 1278|  3.62k|    if(connssl->negotiated.alpn && !cf->sockindex) {
  ------------------
  |  Branch (1278:8): [True: 3.62k, False: 2]
  |  Branch (1278:36): [True: 3.62k, False: 0]
  ------------------
 1279|  3.62k|      if(!strcmp("http/1.1", connssl->negotiated.alpn))
  ------------------
  |  Branch (1279:10): [True: 3.62k, False: 0]
  ------------------
 1280|  3.62k|        cf->conn->httpversion_seen = 11;
 1281|      0|      else if(!strcmp("h2", connssl->negotiated.alpn))
  ------------------
  |  Branch (1281:15): [True: 0, False: 0]
  ------------------
 1282|      0|        cf->conn->httpversion_seen = 20;
 1283|      0|      else if(!strcmp("h3", connssl->negotiated.alpn))
  ------------------
  |  Branch (1283:15): [True: 0, False: 0]
  ------------------
 1284|      0|        cf->conn->httpversion_seen = 30;
 1285|  3.62k|    }
 1286|  3.62k|    break;
 1287|  3.62k|  case CF_CTRL_REPORT_STATS:
  ------------------
  |  |  124|  3.62k|#define CF_CTRL_REPORT_STATS     (256 + 3) /* 0          NULL     ignored */
  ------------------
  |  Branch (1287:3): [True: 3.62k, False: 10.8k]
  ------------------
 1288|  3.62k|    if(cf->connected && !connssl->stats_reported &&
  ------------------
  |  Branch (1288:8): [True: 3.62k, False: 0]
  |  Branch (1288:25): [True: 3.62k, False: 0]
  ------------------
 1289|  3.62k|       (cf->cft == &Curl_cft_ssl) &&
  ------------------
  |  Branch (1289:8): [True: 3.62k, False: 0]
  ------------------
 1290|  3.62k|       (connssl->handshake_done.tv_sec || connssl->handshake_done.tv_usec)) {
  ------------------
  |  Branch (1290:9): [True: 3.62k, False: 0]
  |  Branch (1290:43): [True: 0, False: 0]
  ------------------
 1291|  3.62k|      Curl_pgrsTimeWas(data, TIMER_APPCONNECT, connssl->handshake_done);
 1292|  3.62k|      connssl->stats_reported = TRUE;
  ------------------
  |  | 1045|  3.62k|#define TRUE true
  ------------------
 1293|  3.62k|    }
 1294|  3.62k|    break;
 1295|  14.4k|  }
 1296|  14.4k|  return CURLE_OK;
 1297|  14.4k|}
vtls.c:ssl_cf_query:
 1234|  21.2k|{
 1235|  21.2k|  struct ssl_connect_data *connssl = cf->ctx;
 1236|       |
 1237|  21.2k|  switch(query) {
 1238|  3.58k|  case CF_QUERY_SSL_INFO:
  ------------------
  |  |  179|  3.58k|#define CF_QUERY_SSL_INFO          12  /* -    struct curl_tlssessioninfo * */
  ------------------
  |  Branch (1238:3): [True: 3.58k, False: 17.6k]
  ------------------
 1239|  3.58k|  case CF_QUERY_SSL_CTX_INFO:
  ------------------
  |  |  180|  3.58k|#define CF_QUERY_SSL_CTX_INFO      13  /* -    struct curl_tlssessioninfo * */
  ------------------
  |  Branch (1239:3): [True: 0, False: 21.2k]
  ------------------
 1240|  3.58k|    if(!Curl_ssl_cf_is_proxy(cf)) {
  ------------------
  |  Branch (1240:8): [True: 3.58k, False: 0]
  ------------------
 1241|  3.58k|      struct curl_tlssessioninfo *info = pres2;
 1242|  3.58k|      struct cf_call_data save;
 1243|  3.58k|      CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  669|  3.58k|  do { \
  |  |  670|  3.58k|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  222|  3.58k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  671|  3.58k|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1075|  3.58k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  672|  3.58k|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  222|  3.58k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  673|  3.58k|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  222|  3.58k|#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); \
  |  |  ------------------
  |  |  |  |  856|  3.58k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  674|  3.58k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (674:11): [Folded, False: 3.58k]
  |  |  ------------------
  ------------------
  |  Branch (1243:7): [True: 3.58k, False: 0]
  |  Branch (1243:7): [True: 0, False: 0]
  |  Branch (1243:7): [True: 3.58k, False: 0]
  |  Branch (1243:7): [True: 0, False: 0]
  ------------------
 1244|  3.58k|      info->backend = Curl_ssl_backend();
 1245|  3.58k|      info->internals = connssl->ssl_impl->get_internals(
 1246|  3.58k|        cf->ctx, (query == CF_QUERY_SSL_INFO) ?
  ------------------
  |  |  179|  3.58k|#define CF_QUERY_SSL_INFO          12  /* -    struct curl_tlssessioninfo * */
  ------------------
  |  Branch (1246:18): [True: 3.58k, False: 0]
  ------------------
 1247|  3.58k|        CURLINFO_TLS_SSL_PTR : CURLINFO_TLS_SESSION);
 1248|  3.58k|      CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  677|  3.58k|  do { \
  |  |  678|  3.58k|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1075|  3.58k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  679|  3.58k|    DEBUGASSERT(!(save).data || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1075|  3.58k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  680|  3.58k|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  222|  3.58k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  681|  3.58k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (681:11): [Folded, False: 3.58k]
  |  |  ------------------
  ------------------
  |  Branch (1248:7): [True: 0, False: 3.58k]
  |  Branch (1248:7): [True: 3.58k, False: 0]
  |  Branch (1248:7): [True: 3.58k, False: 0]
  |  Branch (1248:7): [True: 0, False: 0]
  |  Branch (1248:7): [True: 3.58k, False: 0]
  |  Branch (1248:7): [True: 0, False: 0]
  ------------------
 1249|  3.58k|      return CURLE_OK;
 1250|  3.58k|    }
 1251|      0|    break;
 1252|  7.24k|  case CF_QUERY_ALPN_NEGOTIATED: {
  ------------------
  |  |  182|  7.24k|#define CF_QUERY_ALPN_NEGOTIATED   15  /* -          const char * */
  ------------------
  |  Branch (1252:3): [True: 7.24k, False: 13.9k]
  ------------------
 1253|  7.24k|    const char **palpn = pres2;
 1254|  7.24k|    DEBUGASSERT(palpn);
  ------------------
  |  | 1075|  7.24k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1254:5): [True: 0, False: 7.24k]
  |  Branch (1254:5): [True: 7.24k, False: 0]
  ------------------
 1255|  7.24k|    *palpn = connssl->negotiated.alpn;
 1256|  7.24k|    CURL_TRC_CF(data, cf, "query ALPN: returning '%s'", *palpn);
  ------------------
  |  |  153|  7.24k|  do {                                          \
  |  |  154|  7.24k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  326|  7.24k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  14.4k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 7.24k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 7.24k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  14.4k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  7.24k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (327:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  7.24k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  7.24k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 7.24k]
  |  |  ------------------
  ------------------
 1257|  7.24k|    return CURLE_OK;
 1258|  7.24k|  }
 1259|  10.3k|  default:
  ------------------
  |  Branch (1259:3): [True: 10.3k, False: 10.8k]
  ------------------
 1260|  10.3k|    break;
 1261|  21.2k|  }
 1262|  10.3k|  return cf->next ?
  ------------------
  |  Branch (1262:10): [True: 10.3k, False: 0]
  ------------------
 1263|  10.3k|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
 1264|  10.3k|    CURLE_UNKNOWN_OPTION;
 1265|  21.2k|}
vtls.c:cf_ssl_create:
 1351|  3.62k|{
 1352|  3.62k|  struct Curl_cfilter *cf = NULL;
 1353|  3.62k|  struct ssl_connect_data *ctx;
 1354|  3.62k|  CURLcode result;
 1355|       |
 1356|  3.62k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1075|  3.62k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1356:3): [True: 0, False: 3.62k]
  |  Branch (1356:3): [True: 3.62k, False: 0]
  ------------------
 1357|       |
 1358|       |#ifdef CURL_DISABLE_HTTP
 1359|       |  (void)conn;
 1360|       |  /* We only support ALPN for HTTP so far. */
 1361|       |  DEBUGASSERT(!conn->bits.tls_enable_alpn);
 1362|       |  ctx = cf_ctx_new(data, NULL);
 1363|       |#else
 1364|  3.62k|  ctx = cf_ctx_new(data, alpn_get_spec(data->state.http_neg.wanted,
 1365|  3.62k|                                       data->state.http_neg.preferred,
 1366|  3.62k|                                       (bool)data->state.http_neg.only_10,
 1367|  3.62k|                                       (bool)conn->bits.tls_enable_alpn));
 1368|  3.62k|#endif
 1369|  3.62k|  if(!ctx) {
  ------------------
  |  Branch (1369:6): [True: 0, False: 3.62k]
  ------------------
 1370|      0|    result = CURLE_OUT_OF_MEMORY;
 1371|      0|    goto out;
 1372|      0|  }
 1373|       |
 1374|  3.62k|  result = Curl_cf_create(&cf, &Curl_cft_ssl, ctx);
 1375|       |
 1376|  3.62k|out:
 1377|  3.62k|  if(result)
  ------------------
  |  Branch (1377:6): [True: 0, False: 3.62k]
  ------------------
 1378|      0|    cf_ctx_free(ctx);
 1379|  3.62k|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (1379:10): [True: 0, False: 3.62k]
  ------------------
 1380|  3.62k|  return result;
 1381|  3.62k|}
vtls.c:cf_ctx_new:
  189|  3.62k|{
  190|  3.62k|  struct ssl_connect_data *ctx;
  191|       |
  192|  3.62k|  (void)data;
  193|  3.62k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1473|  3.62k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  194|  3.62k|  if(!ctx)
  ------------------
  |  Branch (194:6): [True: 0, False: 3.62k]
  ------------------
  195|      0|    return NULL;
  196|       |
  197|  3.62k|  ctx->ssl_impl = Curl_ssl;
  198|  3.62k|  ctx->alpn = alpn;
  199|  3.62k|  Curl_bufq_init2(&ctx->earlydata, CURL_SSL_EARLY_MAX, 1, BUFQ_OPT_NO_SPARES);
  ------------------
  |  |  110|  3.62k|#define CURL_SSL_EARLY_MAX      (64 * 1024)
  ------------------
                Curl_bufq_init2(&ctx->earlydata, CURL_SSL_EARLY_MAX, 1, BUFQ_OPT_NO_SPARES);
  ------------------
  |  |  115|  3.62k|#define BUFQ_OPT_NO_SPARES   (1 << 1)
  ------------------
  200|  3.62k|  ctx->backend = curlx_calloc(1, ctx->ssl_impl->sizeof_ssl_backend_data);
  ------------------
  |  | 1473|  3.62k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  201|  3.62k|  if(!ctx->backend) {
  ------------------
  |  Branch (201:6): [True: 0, False: 3.62k]
  ------------------
  202|      0|    curlx_free(ctx);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  203|      0|    return NULL;
  204|      0|  }
  205|  3.62k|  return ctx;
  206|  3.62k|}
vtls.c:alpn_get_spec:
  102|  3.62k|{
  103|  3.62k|  if(!use_alpn)
  ------------------
  |  Branch (103:6): [True: 0, False: 3.62k]
  ------------------
  104|      0|    return NULL;
  105|       |  /* If HTTP/1.0 is the wanted protocol then use ALPN http/1.0 and http/1.1.
  106|       |     This is for compatibility reasons since some HTTP/1.0 servers with old
  107|       |     ALPN implementations understand ALPN http/1.1 but not http/1.0. */
  108|  3.62k|  if(only_http_10 && (wanted & CURL_HTTP_V1x))
  ------------------
  |  |   40|     36|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (108:6): [True: 36, False: 3.59k]
  |  Branch (108:22): [True: 36, False: 0]
  ------------------
  109|     36|    return &ALPN_SPEC_H10_H11;
  110|  3.59k|#ifdef USE_HTTP2
  111|  3.59k|  if(wanted & CURL_HTTP_V2x) {
  ------------------
  |  |   41|  3.59k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (111:6): [True: 3.59k, False: 2]
  ------------------
  112|  3.59k|    if(wanted & CURL_HTTP_V1x)
  ------------------
  |  |   40|  3.59k|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (112:8): [True: 3.58k, False: 2]
  ------------------
  113|  3.58k|      return (preferred == CURL_HTTP_V1x) ?
  ------------------
  |  |   40|  3.58k|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (113:14): [True: 0, False: 3.58k]
  ------------------
  114|  3.58k|        &ALPN_SPEC_H11_H2 : &ALPN_SPEC_H2_H11;
  115|      2|    return &ALPN_SPEC_H2;
  116|  3.59k|  }
  117|       |#else
  118|       |  (void)wanted;
  119|       |  (void)preferred;
  120|       |#endif
  121|      2|  return &ALPN_SPEC_H11;
  122|  3.59k|}
vtls.c:cf_ssl_peer_init:
 1387|  3.62k|{
 1388|  3.62k|  struct ssl_connect_data *connssl = cf->ctx;
 1389|  3.62k|  char tls_id[80];
 1390|  3.62k|  connssl->ssl_impl->version(tls_id, sizeof(tls_id) - 1);
 1391|  3.62k|  return Curl_ssl_peer_init(&connssl->peer, origin, peer, sslc,
 1392|  3.62k|                            tls_id, TRNSPRT_TCP);
  ------------------
  |  |  238|  3.62k|#define TRNSPRT_TCP  3
  ------------------
 1393|  3.62k|}

Curl_ssl_config_init:
  101|  14.9k|{
  102|       |  /*
  103|       |   * libcurl 7.10 introduced SSL verification *by default*! This needs to be
  104|       |   * switched off unless wanted.
  105|       |   */
  106|  14.9k|  sslc->verifypeer = TRUE;
  ------------------
  |  | 1045|  14.9k|#define TRUE true
  ------------------
  107|  14.9k|  sslc->verifyhost = TRUE;
  ------------------
  |  | 1045|  14.9k|#define TRUE true
  ------------------
  108|       |  sslc->cache_session = TRUE; /* caching by default */
  ------------------
  |  | 1045|  14.9k|#define TRUE true
  ------------------
  109|  14.9k|}
Curl_ssl_config_cleanup:
  112|  22.1k|{
  113|  22.1k|  if(sslc->deep_copy) {
  ------------------
  |  Branch (113:6): [True: 7.25k, False: 14.9k]
  ------------------
  114|  7.25k|    curlx_safefree(sslc->CApath);
  ------------------
  |  | 1332|  7.25k|  do {                      \
  |  | 1333|  7.25k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.25k|    (ptr) = NULL;           \
  |  | 1335|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  115|  7.25k|    curlx_safefree(sslc->CAfile);
  ------------------
  |  | 1332|  7.25k|  do {                      \
  |  | 1333|  7.25k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.25k|    (ptr) = NULL;           \
  |  | 1335|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  116|  7.25k|    curlx_safefree(sslc->issuercert);
  ------------------
  |  | 1332|  7.25k|  do {                      \
  |  | 1333|  7.25k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.25k|    (ptr) = NULL;           \
  |  | 1335|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  117|  7.25k|    curlx_safefree(sslc->clientcert);
  ------------------
  |  | 1332|  7.25k|  do {                      \
  |  | 1333|  7.25k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.25k|    (ptr) = NULL;           \
  |  | 1335|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  118|  7.25k|    curlx_safefree(sslc->cipher_list);
  ------------------
  |  | 1332|  7.25k|  do {                      \
  |  | 1333|  7.25k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.25k|    (ptr) = NULL;           \
  |  | 1335|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  119|  7.25k|    curlx_safefree(sslc->cipher_list13);
  ------------------
  |  | 1332|  7.25k|  do {                      \
  |  | 1333|  7.25k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.25k|    (ptr) = NULL;           \
  |  | 1335|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  120|  7.25k|    curlx_safefree(sslc->pinned_key);
  ------------------
  |  | 1332|  7.25k|  do {                      \
  |  | 1333|  7.25k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.25k|    (ptr) = NULL;           \
  |  | 1335|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  121|  7.25k|    curlx_safefree(sslc->cert_blob);
  ------------------
  |  | 1332|  7.25k|  do {                      \
  |  | 1333|  7.25k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.25k|    (ptr) = NULL;           \
  |  | 1335|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  122|  7.25k|    curlx_safefree(sslc->ca_info_blob);
  ------------------
  |  | 1332|  7.25k|  do {                      \
  |  | 1333|  7.25k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.25k|    (ptr) = NULL;           \
  |  | 1335|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  123|  7.25k|    curlx_safefree(sslc->issuercert_blob);
  ------------------
  |  | 1332|  7.25k|  do {                      \
  |  | 1333|  7.25k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.25k|    (ptr) = NULL;           \
  |  | 1335|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  124|  7.25k|    curlx_safefree(sslc->key_blob);
  ------------------
  |  | 1332|  7.25k|  do {                      \
  |  | 1333|  7.25k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.25k|    (ptr) = NULL;           \
  |  | 1335|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  125|  7.25k|    curlx_safefree(sslc->curves);
  ------------------
  |  | 1332|  7.25k|  do {                      \
  |  | 1333|  7.25k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.25k|    (ptr) = NULL;           \
  |  | 1335|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  126|  7.25k|    curlx_safefree(sslc->signature_algorithms);
  ------------------
  |  | 1332|  7.25k|  do {                      \
  |  | 1333|  7.25k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.25k|    (ptr) = NULL;           \
  |  | 1335|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  127|  7.25k|    curlx_safefree(sslc->CRLfile);
  ------------------
  |  | 1332|  7.25k|  do {                      \
  |  | 1333|  7.25k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.25k|    (ptr) = NULL;           \
  |  | 1335|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  128|  7.25k|    curlx_safefree(sslc->cert_type);
  ------------------
  |  | 1332|  7.25k|  do {                      \
  |  | 1333|  7.25k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.25k|    (ptr) = NULL;           \
  |  | 1335|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  129|  7.25k|    curlx_safefree(sslc->key);
  ------------------
  |  | 1332|  7.25k|  do {                      \
  |  | 1333|  7.25k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.25k|    (ptr) = NULL;           \
  |  | 1335|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  130|  7.25k|    curlx_safefree(sslc->key_type);
  ------------------
  |  | 1332|  7.25k|  do {                      \
  |  | 1333|  7.25k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.25k|    (ptr) = NULL;           \
  |  | 1335|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  131|  7.25k|    curlx_safefree(sslc->key_passwd);
  ------------------
  |  | 1332|  7.25k|  do {                      \
  |  | 1333|  7.25k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  7.25k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  7.25k|    (ptr) = NULL;           \
  |  | 1335|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  132|       |    sslc->deep_copy = FALSE;
  ------------------
  |  | 1048|  7.25k|#define FALSE false
  ------------------
  133|  7.25k|  }
  134|  22.1k|}
Curl_ssl_easy_config_complete:
  250|  3.62k|{
  251|  3.62k|  struct ssl_config_data *sslc = &data->set.ssl;
  252|  3.62k|#if defined(CURL_CA_PATH) || defined(CURL_CA_BUNDLE)
  253|  3.62k|  CURLcode result;
  254|  3.62k|#endif
  255|       |
  256|  3.62k|  ssl_easy_config_compl_options(origin, data->state.initial_origin, sslc);
  257|       |
  258|  3.62k|  if(Curl_ssl_backend() != CURLSSLBACKEND_SCHANNEL) {
  ------------------
  |  Branch (258:6): [True: 3.62k, False: 0]
  ------------------
  259|       |#if defined(USE_APPLE_SECTRUST) || defined(CURL_CA_NATIVE)
  260|       |    if(!sslc->custom_capath && !sslc->custom_cafile && !sslc->custom_cablob)
  261|       |      sslc->primary.native_ca_store = TRUE;
  262|       |#endif
  263|  3.62k|#ifdef CURL_CA_PATH
  264|  3.62k|    if(!sslc->custom_capath && !CURL_EASY_STR(data, STRING_SSL_CAPATH)) {
  ------------------
  |  | 1228|  3.62k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
  |  Branch (264:8): [True: 3.62k, False: 0]
  |  Branch (264:32): [True: 3.62k, False: 0]
  ------------------
  265|  3.62k|      result = Curl_setstropt(data, STRING_SSL_CAPATH, CURL_CA_PATH);
  ------------------
  |  |   32|  3.62k|#define CURL_CA_PATH "/etc/ssl/certs"
  ------------------
  266|  3.62k|      if(result)
  ------------------
  |  Branch (266:10): [True: 0, False: 3.62k]
  ------------------
  267|      0|        return result;
  268|  3.62k|    }
  269|  3.62k|#endif
  270|  3.62k|#ifdef CURL_CA_BUNDLE
  271|  3.62k|    if(!sslc->custom_cafile && !CURL_EASY_STR(data, STRING_SSL_CAFILE)) {
  ------------------
  |  | 1228|  3.62k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
  |  Branch (271:8): [True: 3.62k, False: 0]
  |  Branch (271:32): [True: 3.62k, False: 0]
  ------------------
  272|  3.62k|      result = Curl_setstropt(data, STRING_SSL_CAFILE, CURL_CA_BUNDLE);
  ------------------
  |  |   26|  3.62k|#define CURL_CA_BUNDLE "/etc/ssl/certs/ca-certificates.crt"
  ------------------
  273|  3.62k|      if(result)
  ------------------
  |  Branch (273:10): [True: 0, False: 3.62k]
  ------------------
  274|      0|        return result;
  275|  3.62k|    }
  276|  3.62k|#endif
  277|  3.62k|  }
  278|  3.62k|  sslc->primary.CAfile = ssl_easy_steal(data, STRING_SSL_CAFILE);
  279|  3.62k|  sslc->primary.CRLfile = ssl_easy_steal(data, STRING_SSL_CRLFILE);
  280|  3.62k|  sslc->primary.CApath = ssl_easy_steal(data, STRING_SSL_CAPATH);
  281|  3.62k|  sslc->primary.cipher_list = ssl_easy_steal(data, STRING_SSL_CIPHER_LIST);
  282|  3.62k|  sslc->primary.cipher_list13 = ssl_easy_steal(data, STRING_SSL_CIPHER13_LIST);
  283|  3.62k|  sslc->primary.signature_algorithms =
  284|  3.62k|    ssl_easy_steal(data, STRING_SSL_SIGNATURE_ALGORITHMS);
  285|  3.62k|  sslc->primary.ca_info_blob = data->set.blobs[BLOB_CAINFO];
  286|  3.62k|  sslc->primary.curves = ssl_easy_steal(data, STRING_SSL_EC_CURVES);
  287|       |  /* Maybe these should not be used for another origin. But for
  288|       |   * backwards compatibility, keep them in. */
  289|  3.62k|  sslc->primary.issuercert = ssl_easy_steal(data, STRING_SSL_ISSUERCERT);
  290|  3.62k|  sslc->primary.issuercert_blob = data->set.blobs[BLOB_SSL_ISSUERCERT];
  291|       |
  292|  3.62k|  if(Curl_peer_equal(data->state.initial_origin, origin)) {
  ------------------
  |  Branch (292:6): [True: 3.62k, False: 0]
  ------------------
  293|  3.62k|    sslc->primary.pinned_key =
  294|  3.62k|      ssl_easy_steal(data, STRING_SSL_PINNEDPUBLICKEY);
  295|  3.62k|    sslc->primary.cert_blob = data->set.blobs[BLOB_CERT];
  296|  3.62k|    sslc->primary.cert_type = ssl_easy_steal(data, STRING_CERT_TYPE);
  297|  3.62k|    sslc->primary.key = ssl_easy_steal(data, STRING_KEY);
  298|  3.62k|    sslc->primary.key_type = ssl_easy_steal(data, STRING_KEY_TYPE);
  299|  3.62k|    sslc->primary.key_passwd = ssl_easy_steal(data, STRING_KEY_PASSWD);
  300|  3.62k|    sslc->primary.clientcert = ssl_easy_steal(data, STRING_CERT);
  301|  3.62k|    sslc->primary.key_blob = data->set.blobs[BLOB_KEY];
  302|  3.62k|  }
  303|      0|  else {
  304|      0|    sslc->primary.pinned_key = NULL;
  305|      0|    sslc->primary.cert_blob = NULL;
  306|      0|    sslc->primary.cert_type = NULL;
  307|      0|    sslc->primary.key = NULL;
  308|      0|    sslc->primary.key_type = NULL;
  309|      0|    sslc->primary.key_passwd = NULL;
  310|      0|    sslc->primary.clientcert = NULL;
  311|      0|    sslc->primary.key_blob = NULL;
  312|      0|  }
  313|       |
  314|  3.62k|#ifndef CURL_DISABLE_PROXY
  315|  3.62k|  sslc = &data->set.proxy_ssl;
  316|       |  /* no initial origin for proxy, it is not changed for redirects */
  317|  3.62k|  ssl_easy_config_compl_options(NULL, NULL, sslc);
  318|       |
  319|  3.62k|  if(Curl_ssl_backend() != CURLSSLBACKEND_SCHANNEL) {
  ------------------
  |  Branch (319:6): [True: 3.62k, False: 0]
  ------------------
  320|       |#if defined(USE_APPLE_SECTRUST) || defined(CURL_CA_NATIVE)
  321|       |    if(!sslc->custom_capath && !sslc->custom_cafile && !sslc->custom_cablob)
  322|       |      sslc->primary.native_ca_store = TRUE;
  323|       |#endif
  324|  3.62k|#ifdef CURL_CA_PATH
  325|  3.62k|    if(!sslc->custom_capath &&
  ------------------
  |  Branch (325:8): [True: 3.62k, False: 0]
  ------------------
  326|  3.62k|       !CURL_EASY_STR(data, STRING_SSL_CAPATH_PROXY)) {
  ------------------
  |  | 1228|  3.62k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
  |  Branch (326:8): [True: 3.62k, False: 0]
  ------------------
  327|  3.62k|      result = Curl_setstropt(data, STRING_SSL_CAPATH_PROXY, CURL_CA_PATH);
  ------------------
  |  |   32|  3.62k|#define CURL_CA_PATH "/etc/ssl/certs"
  ------------------
  328|  3.62k|      if(result)
  ------------------
  |  Branch (328:10): [True: 0, False: 3.62k]
  ------------------
  329|      0|        return result;
  330|  3.62k|    }
  331|  3.62k|#endif
  332|  3.62k|#ifdef CURL_CA_BUNDLE
  333|  3.62k|    if(!sslc->custom_cafile &&
  ------------------
  |  Branch (333:8): [True: 3.62k, False: 0]
  ------------------
  334|  3.62k|       !CURL_EASY_STR(data, STRING_SSL_CAFILE_PROXY)) {
  ------------------
  |  | 1228|  3.62k|  Curl_u8_strset_get(&(d)->set.strings, (uint8_t)(id))
  ------------------
  |  Branch (334:8): [True: 3.62k, False: 0]
  ------------------
  335|  3.62k|      result = Curl_setstropt(data, STRING_SSL_CAFILE_PROXY, CURL_CA_BUNDLE);
  ------------------
  |  |   26|  3.62k|#define CURL_CA_BUNDLE "/etc/ssl/certs/ca-certificates.crt"
  ------------------
  336|  3.62k|      if(result)
  ------------------
  |  Branch (336:10): [True: 0, False: 3.62k]
  ------------------
  337|      0|        return result;
  338|  3.62k|    }
  339|  3.62k|#endif
  340|  3.62k|  }
  341|  3.62k|  sslc->primary.CAfile = ssl_easy_steal(data, STRING_SSL_CAFILE_PROXY);
  342|  3.62k|  sslc->primary.CApath = ssl_easy_steal(data, STRING_SSL_CAPATH_PROXY);
  343|  3.62k|  sslc->primary.cipher_list =
  344|  3.62k|    ssl_easy_steal(data, STRING_SSL_CIPHER_LIST_PROXY);
  345|  3.62k|  sslc->primary.cipher_list13 =
  346|  3.62k|    ssl_easy_steal(data, STRING_SSL_CIPHER13_LIST_PROXY);
  347|  3.62k|  sslc->primary.pinned_key =
  348|  3.62k|    ssl_easy_steal(data, STRING_SSL_PINNEDPUBLICKEY_PROXY);
  349|  3.62k|  sslc->primary.cert_blob = data->set.blobs[BLOB_CERT_PROXY];
  350|  3.62k|  sslc->primary.ca_info_blob = data->set.blobs[BLOB_CAINFO_PROXY];
  351|  3.62k|  sslc->primary.issuercert = ssl_easy_steal(data, STRING_SSL_ISSUERCERT_PROXY);
  352|  3.62k|  sslc->primary.issuercert_blob = data->set.blobs[BLOB_SSL_ISSUERCERT_PROXY];
  353|  3.62k|  sslc->primary.CRLfile = ssl_easy_steal(data, STRING_SSL_CRLFILE_PROXY);
  354|  3.62k|  sslc->primary.cert_type = ssl_easy_steal(data, STRING_CERT_TYPE_PROXY);
  355|  3.62k|  sslc->primary.key = ssl_easy_steal(data, STRING_KEY_PROXY);
  356|  3.62k|  sslc->primary.key_type = ssl_easy_steal(data, STRING_KEY_TYPE_PROXY);
  357|  3.62k|  sslc->primary.key_passwd = ssl_easy_steal(data, STRING_KEY_PASSWD_PROXY);
  358|  3.62k|  sslc->primary.clientcert = ssl_easy_steal(data, STRING_CERT_PROXY);
  359|  3.62k|  sslc->primary.key_blob = data->set.blobs[BLOB_KEY_PROXY];
  360|  3.62k|#endif /* CURL_DISABLE_PROXY */
  361|       |
  362|  3.62k|  return CURLE_OK;
  363|  3.62k|}
Curl_ssl_conn_config_init:
  367|  3.62k|{
  368|       |  /* Clone "primary" SSL configurations from the easy handle to
  369|       |   * the connection. They are used for connection cache matching and
  370|       |   * probably outlive the easy handle */
  371|  3.62k|  if(!clone_ssl_primary_config(&data->set.ssl.primary, &conn->ssl_config))
  ------------------
  |  Branch (371:6): [True: 0, False: 3.62k]
  ------------------
  372|      0|    return CURLE_OUT_OF_MEMORY;
  373|  3.62k|#ifndef CURL_DISABLE_PROXY
  374|  3.62k|  if(!clone_ssl_primary_config(&data->set.proxy_ssl.primary,
  ------------------
  |  Branch (374:6): [True: 0, False: 3.62k]
  ------------------
  375|  3.62k|                               &conn->proxy_ssl_config))
  376|      0|    return CURLE_OUT_OF_MEMORY;
  377|  3.62k|#endif
  378|  3.62k|  return CURLE_OK;
  379|  3.62k|}
Curl_ssl_conn_config_cleanup:
  382|  3.62k|{
  383|  3.62k|  Curl_ssl_config_cleanup(&conn->ssl_config);
  384|  3.62k|#ifndef CURL_DISABLE_PROXY
  385|  3.62k|  Curl_ssl_config_cleanup(&conn->proxy_ssl_config);
  386|  3.62k|#endif
  387|  3.62k|}
Curl_ssl_conn_config_update:
  390|  11.4k|{
  391|       |  /* May be called on an easy that has no connection yet */
  392|  11.4k|  if(data->conn) {
  ------------------
  |  Branch (392:6): [True: 0, False: 11.4k]
  ------------------
  393|      0|    struct ssl_primary_config *src, *dest;
  394|      0|#ifndef CURL_DISABLE_PROXY
  395|      0|    src = for_proxy ? &data->set.proxy_ssl.primary : &data->set.ssl.primary;
  ------------------
  |  Branch (395:11): [True: 0, False: 0]
  ------------------
  396|      0|    dest = for_proxy ? &data->conn->proxy_ssl_config : &data->conn->ssl_config;
  ------------------
  |  Branch (396:12): [True: 0, False: 0]
  ------------------
  397|       |#else
  398|       |    (void)for_proxy;
  399|       |    src = &data->set.ssl.primary;
  400|       |    dest = &data->conn->ssl_config;
  401|       |#endif
  402|      0|    dest->verifyhost = src->verifyhost;
  403|      0|    dest->verifypeer = src->verifypeer;
  404|      0|    dest->verifystatus = src->verifystatus;
  405|      0|  }
  406|  11.4k|}
vtls_config.c:ssl_easy_config_compl_options:
  225|  7.25k|{
  226|  7.25k|  uint8_t options = sslc->primary.ssl_options;
  227|       |  /* If set via CURLOPT_(PROXY_)SSL_OPTIONS, we definitely use it.
  228|       |   * If not, we switch it on for supported backends if no custom
  229|       |   * CA settings exist. */
  230|  7.25k|  sslc->primary.native_ca_store = !!(options & CURLSSLOPT_NATIVE_CA);
  ------------------
  |  |  967|  7.25k|#define CURLSSLOPT_NATIVE_CA (1L << 4)
  ------------------
  231|  7.25k|  sslc->enable_beast = !!(options & CURLSSLOPT_ALLOW_BEAST);
  ------------------
  |  |  950|  7.25k|#define CURLSSLOPT_ALLOW_BEAST (1L << 0)
  ------------------
  232|  7.25k|  sslc->no_partialchain = !!(options & CURLSSLOPT_NO_PARTIALCHAIN);
  ------------------
  |  |  958|  7.25k|#define CURLSSLOPT_NO_PARTIALCHAIN (1L << 2)
  ------------------
  233|  7.25k|  sslc->no_revoke = !!(options & CURLSSLOPT_NO_REVOKE);
  ------------------
  |  |  954|  7.25k|#define CURLSSLOPT_NO_REVOKE (1L << 1)
  ------------------
  234|  7.25k|  sslc->revoke_best_effort = !!(options & CURLSSLOPT_REVOKE_BEST_EFFORT);
  ------------------
  |  |  963|  7.25k|#define CURLSSLOPT_REVOKE_BEST_EFFORT (1L << 3)
  ------------------
  235|  7.25k|  sslc->earlydata = !!(options & CURLSSLOPT_EARLYDATA);
  ------------------
  |  |  974|  7.25k|#define CURLSSLOPT_EARLYDATA (1L << 6)
  ------------------
  236|       |
  237|  7.25k|  sslc->auto_client_cert = Curl_peer_equal(origin, initial_origin) &&
  ------------------
  |  Branch (237:28): [True: 7.25k, False: 0]
  ------------------
  238|  7.25k|                           !!(options & CURLSSLOPT_AUTO_CLIENT_CERT);
  ------------------
  |  |  971|  7.25k|#define CURLSSLOPT_AUTO_CLIENT_CERT (1L << 5)
  ------------------
  |  Branch (238:28): [True: 0, False: 7.25k]
  ------------------
  239|  7.25k|}
vtls_config.c:ssl_easy_steal:
  242|  94.3k|{
  243|       |  /* For connection matching, we borrow string references from data
  244|       |   * THIS IS NOT REALLY NICE. */
  245|  94.3k|  return CURL_UNCONST(CURL_EASY_STR(data, id));
  ------------------
  |  |  856|  94.3k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  246|  94.3k|}
vtls_config.c:clone_ssl_primary_config:
  188|  7.25k|{
  189|  7.25k|  DEBUGASSERT(!dest->deep_copy);
  ------------------
  |  | 1075|  7.25k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (189:3): [True: 0, False: 7.25k]
  |  Branch (189:3): [True: 7.25k, False: 0]
  ------------------
  190|  7.25k|  dest->deep_copy = TRUE;
  ------------------
  |  | 1045|  7.25k|#define TRUE true
  ------------------
  191|  7.25k|  dest->version = source->version;
  192|  7.25k|  dest->version_max = source->version_max;
  193|  7.25k|  dest->verifypeer = source->verifypeer;
  194|  7.25k|  dest->verifyhost = source->verifyhost;
  195|  7.25k|  dest->verifystatus = source->verifystatus;
  196|  7.25k|  dest->native_ca_store = source->native_ca_store;
  197|  7.25k|  dest->cache_session = source->cache_session;
  198|  7.25k|  dest->ssl_options = source->ssl_options;
  199|       |
  200|  7.25k|  CLONE_BLOB(cert_blob);
  ------------------
  |  |   62|  7.25k|  do {                                   \
  |  |   63|  7.25k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (63:8): [True: 0, False: 7.25k]
  |  |  ------------------
  |  |   64|  7.25k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  |  |   65|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (65:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  201|  7.25k|  CLONE_BLOB(ca_info_blob);
  ------------------
  |  |   62|  7.25k|  do {                                   \
  |  |   63|  7.25k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (63:8): [True: 0, False: 7.25k]
  |  |  ------------------
  |  |   64|  7.25k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  |  |   65|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (65:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  202|  7.25k|  CLONE_BLOB(issuercert_blob);
  ------------------
  |  |   62|  7.25k|  do {                                   \
  |  |   63|  7.25k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (63:8): [True: 0, False: 7.25k]
  |  |  ------------------
  |  |   64|  7.25k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  |  |   65|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (65:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  203|  7.25k|  CLONE_STRING(CApath);
  ------------------
  |  |   51|  7.25k|  do {                                       \
  |  |   52|  7.25k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 7.25k, False: 0]
  |  |  ------------------
  |  |   53|  7.25k|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1470|  7.25k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|  7.25k|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 7.25k]
  |  |  ------------------
  |  |   55|  7.25k|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  |  |   56|  7.25k|    }                                        \
  |  |   57|  7.25k|    else                                     \
  |  |   58|  7.25k|      dest->var = NULL;                      \
  |  |   59|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  204|  7.25k|  CLONE_STRING(CAfile);
  ------------------
  |  |   51|  7.25k|  do {                                       \
  |  |   52|  7.25k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 7.25k, False: 0]
  |  |  ------------------
  |  |   53|  7.25k|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1470|  7.25k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|  7.25k|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 7.25k]
  |  |  ------------------
  |  |   55|  7.25k|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  |  |   56|  7.25k|    }                                        \
  |  |   57|  7.25k|    else                                     \
  |  |   58|  7.25k|      dest->var = NULL;                      \
  |  |   59|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  205|  7.25k|  CLONE_STRING(issuercert);
  ------------------
  |  |   51|  7.25k|  do {                                       \
  |  |   52|  7.25k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 0, False: 7.25k]
  |  |  ------------------
  |  |   53|      0|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|      0|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  |  |   56|      0|    }                                        \
  |  |   57|  7.25k|    else                                     \
  |  |   58|  7.25k|      dest->var = NULL;                      \
  |  |   59|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  206|  7.25k|  CLONE_STRING(cipher_list);
  ------------------
  |  |   51|  7.25k|  do {                                       \
  |  |   52|  7.25k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 0, False: 7.25k]
  |  |  ------------------
  |  |   53|      0|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|      0|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  |  |   56|      0|    }                                        \
  |  |   57|  7.25k|    else                                     \
  |  |   58|  7.25k|      dest->var = NULL;                      \
  |  |   59|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  207|  7.25k|  CLONE_STRING(cipher_list13);
  ------------------
  |  |   51|  7.25k|  do {                                       \
  |  |   52|  7.25k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 0, False: 7.25k]
  |  |  ------------------
  |  |   53|      0|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|      0|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  |  |   56|      0|    }                                        \
  |  |   57|  7.25k|    else                                     \
  |  |   58|  7.25k|      dest->var = NULL;                      \
  |  |   59|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  208|  7.25k|  CLONE_STRING(pinned_key);
  ------------------
  |  |   51|  7.25k|  do {                                       \
  |  |   52|  7.25k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 0, False: 7.25k]
  |  |  ------------------
  |  |   53|      0|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|      0|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  |  |   56|      0|    }                                        \
  |  |   57|  7.25k|    else                                     \
  |  |   58|  7.25k|      dest->var = NULL;                      \
  |  |   59|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  209|  7.25k|  CLONE_STRING(curves);
  ------------------
  |  |   51|  7.25k|  do {                                       \
  |  |   52|  7.25k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 0, False: 7.25k]
  |  |  ------------------
  |  |   53|      0|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|      0|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  |  |   56|      0|    }                                        \
  |  |   57|  7.25k|    else                                     \
  |  |   58|  7.25k|      dest->var = NULL;                      \
  |  |   59|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  210|  7.25k|  CLONE_STRING(signature_algorithms);
  ------------------
  |  |   51|  7.25k|  do {                                       \
  |  |   52|  7.25k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 0, False: 7.25k]
  |  |  ------------------
  |  |   53|      0|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|      0|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  |  |   56|      0|    }                                        \
  |  |   57|  7.25k|    else                                     \
  |  |   58|  7.25k|      dest->var = NULL;                      \
  |  |   59|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  211|  7.25k|  CLONE_STRING(CRLfile);
  ------------------
  |  |   51|  7.25k|  do {                                       \
  |  |   52|  7.25k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 0, False: 7.25k]
  |  |  ------------------
  |  |   53|      0|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|      0|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  |  |   56|      0|    }                                        \
  |  |   57|  7.25k|    else                                     \
  |  |   58|  7.25k|      dest->var = NULL;                      \
  |  |   59|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  212|       |  /* SSL credentials: client certificate */
  213|  7.25k|  CLONE_STRING(clientcert);
  ------------------
  |  |   51|  7.25k|  do {                                       \
  |  |   52|  7.25k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 0, False: 7.25k]
  |  |  ------------------
  |  |   53|      0|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|      0|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  |  |   56|      0|    }                                        \
  |  |   57|  7.25k|    else                                     \
  |  |   58|  7.25k|      dest->var = NULL;                      \
  |  |   59|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  214|  7.25k|  CLONE_STRING(cert_type);
  ------------------
  |  |   51|  7.25k|  do {                                       \
  |  |   52|  7.25k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 0, False: 7.25k]
  |  |  ------------------
  |  |   53|      0|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|      0|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  |  |   56|      0|    }                                        \
  |  |   57|  7.25k|    else                                     \
  |  |   58|  7.25k|      dest->var = NULL;                      \
  |  |   59|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  215|  7.25k|  CLONE_STRING(key);
  ------------------
  |  |   51|  7.25k|  do {                                       \
  |  |   52|  7.25k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 0, False: 7.25k]
  |  |  ------------------
  |  |   53|      0|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|      0|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  |  |   56|      0|    }                                        \
  |  |   57|  7.25k|    else                                     \
  |  |   58|  7.25k|      dest->var = NULL;                      \
  |  |   59|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  216|  7.25k|  CLONE_STRING(key_type);
  ------------------
  |  |   51|  7.25k|  do {                                       \
  |  |   52|  7.25k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 0, False: 7.25k]
  |  |  ------------------
  |  |   53|      0|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|      0|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  |  |   56|      0|    }                                        \
  |  |   57|  7.25k|    else                                     \
  |  |   58|  7.25k|      dest->var = NULL;                      \
  |  |   59|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  217|  7.25k|  CLONE_STRING(key_passwd);
  ------------------
  |  |   51|  7.25k|  do {                                       \
  |  |   52|  7.25k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 0, False: 7.25k]
  |  |  ------------------
  |  |   53|      0|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   54|      0|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (54:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  |  |   56|      0|    }                                        \
  |  |   57|  7.25k|    else                                     \
  |  |   58|  7.25k|      dest->var = NULL;                      \
  |  |   59|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (59:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  218|  7.25k|  CLONE_BLOB(key_blob);
  ------------------
  |  |   62|  7.25k|  do {                                   \
  |  |   63|  7.25k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (63:8): [True: 0, False: 7.25k]
  |  |  ------------------
  |  |   64|  7.25k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1048|      0|#define FALSE false
  |  |  ------------------
  |  |   65|  7.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (65:11): [Folded, False: 7.25k]
  |  |  ------------------
  ------------------
  219|  7.25k|  return TRUE;
  ------------------
  |  | 1045|  7.25k|#define TRUE true
  ------------------
  220|  7.25k|}
vtls_config.c:blobdup:
   68|  29.0k|{
   69|  29.0k|  DEBUGASSERT(dest);
  ------------------
  |  | 1075|  29.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (69:3): [True: 0, False: 29.0k]
  |  Branch (69:3): [True: 29.0k, False: 0]
  ------------------
   70|  29.0k|  DEBUGASSERT(!*dest);
  ------------------
  |  | 1075|  29.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (70:3): [True: 0, False: 29.0k]
  |  Branch (70:3): [True: 29.0k, False: 0]
  ------------------
   71|  29.0k|  if(src) {
  ------------------
  |  Branch (71:6): [True: 3.62k, False: 25.4k]
  ------------------
   72|       |    /* only if there is data to dupe! */
   73|  3.62k|    struct curl_blob *d;
   74|  3.62k|    d = curlx_malloc(sizeof(struct curl_blob) + src->len);
  ------------------
  |  | 1471|  3.62k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
   75|  3.62k|    if(!d)
  ------------------
  |  Branch (75:8): [True: 0, False: 3.62k]
  ------------------
   76|      0|      return CURLE_OUT_OF_MEMORY;
   77|  3.62k|    d->len = src->len;
   78|       |    /* Always duplicate because the connection may survive longer than the
   79|       |       handle that passed in the blob. */
   80|  3.62k|    d->flags = CURL_BLOB_COPY;
  ------------------
  |  |   31|  3.62k|#define CURL_BLOB_COPY   1 /* tell libcurl to copy the data */
  ------------------
   81|  3.62k|    d->data = (void *)((char *)d + sizeof(struct curl_blob));
   82|  3.62k|    memcpy(d->data, src->data, src->len);
   83|  3.62k|    *dest = d;
   84|  3.62k|  }
   85|  29.0k|  return CURLE_OK;
   86|  29.0k|}

Curl_ssl_peer_key_make:
  350|  3.62k|{
  351|  3.62k|  return ssl_peer_key_build(sslc, peer, tls_id, ppeer_key);
  352|  3.62k|}
Curl_ssl_session_create2:
  409|  7.16k|{
  410|  7.16k|  struct Curl_ssl_session *s;
  411|       |
  412|  7.16k|  if(!sdata || !sdata_len) {
  ------------------
  |  Branch (412:6): [True: 0, False: 7.16k]
  |  Branch (412:16): [True: 0, False: 7.16k]
  ------------------
  413|      0|    curlx_free(sdata);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  414|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  415|      0|  }
  416|       |
  417|  7.16k|  *psession = NULL;
  418|  7.16k|  s = curlx_calloc(1, sizeof(*s));
  ------------------
  |  | 1473|  7.16k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  419|  7.16k|  if(!s) {
  ------------------
  |  Branch (419:6): [True: 0, False: 7.16k]
  ------------------
  420|      0|    curlx_free(sdata);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  421|      0|    curlx_free(quic_tp);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  422|      0|    return CURLE_OUT_OF_MEMORY;
  423|      0|  }
  424|       |
  425|  7.16k|  s->ietf_tls_id = ietf_tls_id;
  426|  7.16k|  s->valid_until = valid_until;
  427|  7.16k|  s->earlydata_max = earlydata_max;
  428|  7.16k|  s->sdata = sdata;
  429|  7.16k|  s->sdata_len = sdata_len;
  430|  7.16k|  s->quic_tp = quic_tp;
  431|  7.16k|  s->quic_tp_len = quic_tp_len;
  432|  7.16k|  if(alpn) {
  ------------------
  |  Branch (432:6): [True: 7.16k, False: 4]
  ------------------
  433|  7.16k|    s->alpn = curlx_strdup(alpn);
  ------------------
  |  | 1470|  7.16k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  434|  7.16k|    if(!s->alpn) {
  ------------------
  |  Branch (434:8): [True: 0, False: 7.16k]
  ------------------
  435|      0|      cf_ssl_scache_session_ldestroy(NULL, s);
  436|      0|      return CURLE_OUT_OF_MEMORY;
  437|      0|    }
  438|  7.16k|  }
  439|  7.16k|  *psession = s;
  440|  7.16k|  return CURLE_OK;
  441|  7.16k|}
Curl_ssl_session_destroy:
  444|  21.5k|{
  445|  21.5k|  if(s) {
  ------------------
  |  Branch (445:6): [True: 0, False: 21.5k]
  ------------------
  446|       |    /* if in the list, the list destructor takes care of it */
  447|      0|    if(Curl_node_llist(&s->list))
  ------------------
  |  Branch (447:8): [True: 0, False: 0]
  ------------------
  448|      0|      Curl_node_remove(&s->list);
  449|      0|    else {
  450|       |      cf_ssl_scache_session_ldestroy(NULL, s);
  451|      0|    }
  452|      0|  }
  453|  21.5k|}
Curl_ssl_scache_create:
  627|  3.73k|{
  628|  3.73k|  struct Curl_ssl_scache *scache;
  629|  3.73k|  struct Curl_ssl_scache_peer *peers;
  630|  3.73k|  size_t i;
  631|       |
  632|  3.73k|  *pscache = NULL;
  633|  3.73k|  peers = curlx_calloc(max_peers, sizeof(*peers));
  ------------------
  |  | 1473|  3.73k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  634|  3.73k|  if(!peers)
  ------------------
  |  Branch (634:6): [True: 0, False: 3.73k]
  ------------------
  635|      0|    return CURLE_OUT_OF_MEMORY;
  636|       |
  637|  3.73k|  scache = curlx_calloc(1, sizeof(*scache));
  ------------------
  |  | 1473|  3.73k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  638|  3.73k|  if(!scache) {
  ------------------
  |  Branch (638:6): [True: 0, False: 3.73k]
  ------------------
  639|      0|    curlx_free(peers);
  ------------------
  |  | 1476|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  640|      0|    return CURLE_OUT_OF_MEMORY;
  641|      0|  }
  642|       |
  643|  3.73k|  scache->magic = CURL_SCACHE_MAGIC;
  ------------------
  |  |   62|  3.73k|#define CURL_SCACHE_MAGIC 0x000e1551
  ------------------
  644|  3.73k|  scache->default_lifetime_secs = (24 * 60 * 60); /* 1 day */
  645|  3.73k|  scache->peer_count = max_peers;
  646|  3.73k|  scache->peers = peers;
  647|  3.73k|  scache->age = 1;
  648|  97.0k|  for(i = 0; i < scache->peer_count; ++i) {
  ------------------
  |  Branch (648:14): [True: 93.3k, False: 3.73k]
  ------------------
  649|  93.3k|    scache->peers[i].max_sessions = max_sessions_per_peer;
  650|  93.3k|    Curl_llist_init(&scache->peers[i].sessions,
  651|  93.3k|                    cf_ssl_scache_session_ldestroy);
  652|  93.3k|  }
  653|  3.73k|#ifdef USE_MUTEX
  654|       |  Curl_mutex_init(&scache->mutex);
  ------------------
  |  |   50|  3.73k|#  define Curl_mutex_init(m)     pthread_mutex_init(m, NULL)
  ------------------
  655|  3.73k|#endif
  656|  3.73k|  *pscache = scache;
  657|  3.73k|  return CURLE_OK;
  658|  3.73k|}
Curl_ssl_scache_destroy:
  661|  3.73k|{
  662|  3.73k|  if(GOOD_SCACHE(scache)) {
  ------------------
  |  |   64|  3.73k|#define GOOD_SCACHE(x) ((x) && (x)->magic == CURL_SCACHE_MAGIC)
  |  |  ------------------
  |  |  |  |   62|  3.73k|#define CURL_SCACHE_MAGIC 0x000e1551
  |  |  ------------------
  |  |  |  Branch (64:25): [True: 3.73k, False: 0]
  |  |  |  Branch (64:32): [True: 3.73k, False: 0]
  |  |  ------------------
  ------------------
  663|  3.73k|    size_t i;
  664|  3.73k|    scache->magic = 0;
  665|  97.0k|    for(i = 0; i < scache->peer_count; ++i) {
  ------------------
  |  Branch (665:16): [True: 93.3k, False: 3.73k]
  ------------------
  666|  93.3k|      cf_ssl_scache_clear_peer(&scache->peers[i]);
  667|  93.3k|    }
  668|  3.73k|    curlx_free(scache->peers);
  ------------------
  |  | 1476|  3.73k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  669|  3.73k|#ifdef USE_MUTEX
  670|  3.73k|    Curl_mutex_destroy(&scache->mutex);
  ------------------
  |  |   53|  3.73k|#  define Curl_mutex_destroy(m)  pthread_mutex_destroy(m)
  ------------------
  671|  3.73k|#endif
  672|  3.73k|    curlx_free(scache);
  ------------------
  |  | 1476|  3.73k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  673|  3.73k|  }
  674|  3.73k|}
Curl_ssl_scache_use:
  677|  10.7k|{
  678|  10.7k|  if(cf_ssl_scache_get(data)) {
  ------------------
  |  Branch (678:6): [True: 10.7k, False: 0]
  ------------------
  679|  10.7k|    struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
  680|  10.7k|    return ssl_config ? ssl_config->primary.cache_session : FALSE;
  ------------------
  |  | 1048|  10.7k|#define FALSE false
  ------------------
  |  Branch (680:12): [True: 10.7k, False: 0]
  ------------------
  681|  10.7k|  }
  682|      0|  return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  683|  10.7k|}
Curl_ssl_scache_lock:
  687|  10.7k|{
  688|  10.7k|  struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
  689|  10.7k|  if(scache) {
  ------------------
  |  Branch (689:6): [True: 10.7k, False: 0]
  ------------------
  690|  10.7k|    if(CURL_SHARE_ssl_scache(data))
  ------------------
  |  |   93|  10.7k|  ((data)->share &&                                                \
  |  |  ------------------
  |  |  |  Branch (93:4): [True: 0, False: 10.7k]
  |  |  ------------------
  |  |   94|  10.7k|   ((data)->share->specifier & (1 << CURL_LOCK_DATA_SSL_SESSION)))
  |  |  ------------------
  |  |  |  Branch (94:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  691|      0|      Curl_share_lock(data, CURL_LOCK_DATA_SSL_SESSION,
  692|      0|                      CURL_LOCK_ACCESS_SINGLE);
  693|  10.7k|#ifdef USE_MUTEX
  694|  10.7k|    Curl_mutex_acquire(&scache->mutex);
  ------------------
  |  |   51|  10.7k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  695|  10.7k|    scache->locking_thread = Curl_thread_get_current_id();
  696|  10.7k|    DEBUGASSERT(!scache->is_locked);
  ------------------
  |  | 1075|  10.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (696:5): [True: 0, False: 10.7k]
  |  Branch (696:5): [True: 10.7k, False: 0]
  ------------------
  697|  10.7k|    scache->is_locked = TRUE;
  ------------------
  |  | 1045|  10.7k|#define TRUE true
  ------------------
  698|  10.7k|    Curl_mutex_release(&scache->mutex);
  ------------------
  |  |   52|  10.7k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  699|       |#else
  700|       |    DEBUGASSERT(!scache->is_locked);
  701|       |    scache->is_locked = TRUE;
  702|       |#endif
  703|  10.7k|  }
  704|  10.7k|}
Curl_ssl_scache_unlock:
  708|  10.7k|{
  709|  10.7k|  struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
  710|  10.7k|  if(scache) {
  ------------------
  |  Branch (710:6): [True: 10.7k, False: 0]
  ------------------
  711|  10.7k|#ifdef USE_MUTEX
  712|  10.7k|    Curl_mutex_acquire(&scache->mutex);
  ------------------
  |  |   51|  10.7k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  713|  10.7k|    scache->locking_thread = 0;
  714|  10.7k|    DEBUGASSERT(scache->is_locked);
  ------------------
  |  | 1075|  10.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (714:5): [True: 0, False: 10.7k]
  |  Branch (714:5): [True: 10.7k, False: 0]
  ------------------
  715|  10.7k|    scache->is_locked = FALSE;
  ------------------
  |  | 1048|  10.7k|#define FALSE false
  ------------------
  716|  10.7k|    Curl_mutex_release(&scache->mutex);
  ------------------
  |  |   52|  10.7k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  717|       |#else
  718|       |    DEBUGASSERT(scache->is_locked);
  719|       |    scache->is_locked = FALSE;
  720|       |#endif
  721|  10.7k|    if(CURL_SHARE_ssl_scache(data))
  ------------------
  |  |   93|  10.7k|  ((data)->share &&                                                \
  |  |  ------------------
  |  |  |  Branch (93:4): [True: 0, False: 10.7k]
  |  |  ------------------
  |  |   94|  10.7k|   ((data)->share->specifier & (1 << CURL_LOCK_DATA_SSL_SESSION)))
  |  |  ------------------
  |  |  |  Branch (94:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  722|      0|      Curl_share_unlock(data, CURL_LOCK_DATA_SSL_SESSION);
  723|  10.7k|  }
  724|  10.7k|}
Curl_ssl_scache_is_locked_by_current_thread:
  727|  14.7k|{
  728|  14.7k|  struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
  729|  14.7k|  bool locked = FALSE;
  ------------------
  |  | 1048|  14.7k|#define FALSE false
  ------------------
  730|  14.7k|  if(!scache)
  ------------------
  |  Branch (730:6): [True: 0, False: 14.7k]
  ------------------
  731|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  732|  14.7k|#ifdef USE_MUTEX
  733|  14.7k|  Curl_mutex_acquire(&scache->mutex);
  ------------------
  |  |   51|  14.7k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  734|  14.7k|  locked = scache->is_locked && Curl_thread_is_current(scache->locking_thread);
  ------------------
  |  Branch (734:12): [True: 0, False: 14.7k]
  |  Branch (734:33): [True: 0, False: 0]
  ------------------
  735|  14.7k|  Curl_mutex_release(&scache->mutex);
  ------------------
  |  |   52|  14.7k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  736|       |#else
  737|       |  locked = (bool)scache->is_locked;
  738|       |#endif
  739|  14.7k|  return locked;
  740|  14.7k|}
Curl_ssl_scache_put:
  980|  7.16k|{
  981|  7.16k|  struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
  982|  7.16k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
  983|  7.16k|  CURLcode result;
  984|  7.16k|  DEBUGASSERT(ssl_config);
  ------------------
  |  | 1075|  7.16k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (984:3): [True: 0, False: 7.16k]
  |  Branch (984:3): [True: 7.16k, False: 0]
  ------------------
  985|       |
  986|  7.16k|  if(!scache || !ssl_config->primary.cache_session) {
  ------------------
  |  Branch (986:6): [True: 0, False: 7.16k]
  |  Branch (986:17): [True: 0, False: 7.16k]
  ------------------
  987|      0|    Curl_ssl_session_destroy(s);
  988|      0|    return CURLE_OK;
  989|      0|  }
  990|       |
  991|  7.16k|  Curl_ssl_scache_lock(data);
  992|  7.16k|  result = cf_scache_add_session(cf, data, scache, ssl_peer_key, s);
  993|  7.16k|  Curl_ssl_scache_unlock(data);
  994|  7.16k|  return result;
  995|  7.16k|}
Curl_ssl_scache_return:
 1001|  3.62k|{
 1002|       |  /* See RFC 8446 C.4:
 1003|       |   * "Clients SHOULD NOT reuse a ticket for multiple connections." */
 1004|  3.62k|  if(s && s->ietf_tls_id < 0x304)
  ------------------
  |  Branch (1004:6): [True: 0, False: 3.62k]
  |  Branch (1004:11): [True: 0, False: 0]
  ------------------
 1005|      0|    (void)Curl_ssl_scache_put(cf, data, ssl_peer_key, s);
 1006|  3.62k|  else
 1007|  3.62k|    Curl_ssl_session_destroy(s);
 1008|  3.62k|}
Curl_ssl_scache_take:
 1014|  3.62k|{
 1015|  3.62k|  struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
 1016|  3.62k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 1017|  3.62k|  struct Curl_ssl_scache_peer *peer = NULL;
 1018|  3.62k|  struct Curl_llist_node *n;
 1019|  3.62k|  struct Curl_ssl_session *s = NULL;
 1020|  3.62k|  CURLcode result;
 1021|       |
 1022|  3.62k|  *ps = NULL;
 1023|  3.62k|  if(!scache)
  ------------------
  |  Branch (1023:6): [True: 0, False: 3.62k]
  ------------------
 1024|      0|    return CURLE_OK;
 1025|       |
 1026|  3.62k|  Curl_ssl_scache_lock(data);
 1027|  3.62k|  result = cf_ssl_find_peer_by_key(data, scache, ssl_peer_key, conn_config,
 1028|  3.62k|                                   &peer);
 1029|  3.62k|  if(!result && peer) {
  ------------------
  |  Branch (1029:6): [True: 3.62k, False: 0]
  |  Branch (1029:17): [True: 0, False: 3.62k]
  ------------------
 1030|      0|    cf_scache_peer_remove_expired(peer, (curl_off_t)time(NULL));
 1031|      0|    n = Curl_llist_head(&peer->sessions);
 1032|      0|    if(n) {
  ------------------
  |  Branch (1032:8): [True: 0, False: 0]
  ------------------
 1033|      0|      s = Curl_node_take_elem(n);
 1034|      0|      scache->age++;           /* increase general age */
 1035|      0|      peer->age = scache->age; /* set this as used in this age */
 1036|      0|    }
 1037|      0|  }
 1038|  3.62k|  if(s) {
  ------------------
  |  Branch (1038:6): [True: 0, False: 3.62k]
  ------------------
 1039|      0|    *ps = s;
 1040|      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)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330: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]
  |  |  ------------------
  ------------------
 1041|      0|                  "alpn=%s, earlydata=%zu, quic_tp=%s], %zu sessions remain",
 1042|      0|                  ssl_peer_key, (unsigned int)s->ietf_tls_id, s->alpn,
 1043|      0|                  s->earlydata_max, s->quic_tp ? "yes" : "no",
 1044|      0|                  Curl_llist_count(&peer->sessions));
 1045|      0|  }
 1046|  3.62k|  else {
 1047|  3.62k|    CURL_TRC_SSLS(data, "no cached session for %s", ssl_peer_key);
  ------------------
  |  |  194|  3.62k|  do {                                                    \
  |  |  195|  3.62k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  329|  3.62k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  7.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 3.62k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  7.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|  3.62k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|  3.62k|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|  3.62k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
 1048|  3.62k|  }
 1049|  3.62k|  Curl_ssl_scache_unlock(data);
 1050|  3.62k|  return result;
 1051|  3.62k|}
vtls_scache.c:ssl_peer_key_build:
  232|  3.62k|{
  233|  3.62k|  struct dynbuf buf;
  234|  3.62k|  size_t key_len;
  235|  3.62k|  bool is_local = FALSE;
  ------------------
  |  | 1048|  3.62k|#define FALSE false
  ------------------
  236|  3.62k|  CURLcode result;
  237|       |
  238|  3.62k|  *ppeer_key = NULL;
  239|  3.62k|  curlx_dyn_init(&buf, 10 * 1024);
  240|       |
  241|  3.62k|  result = curlx_dyn_addf(&buf, "%s:%d",
  242|  3.62k|                          peer->origin->hostname, peer->origin->port);
  243|  3.62k|  if(result)
  ------------------
  |  Branch (243:6): [True: 0, False: 3.62k]
  ------------------
  244|      0|    goto out;
  245|  3.62k|  result = ssl_peer_key_add_transport(&buf, peer->transport);
  246|  3.62k|  if(result)
  ------------------
  |  Branch (246:6): [True: 0, False: 3.62k]
  ------------------
  247|      0|    goto out;
  248|  3.62k|  result = ssl_peer_key_add_vrfy(&buf, ssl, peer);
  249|  3.62k|  if(result)
  ------------------
  |  Branch (249:6): [True: 0, False: 3.62k]
  ------------------
  250|      0|    goto out;
  251|  3.62k|  if(ssl->version || ssl->version_max) {
  ------------------
  |  Branch (251:6): [True: 3.62k, False: 0]
  |  Branch (251:22): [True: 0, False: 0]
  ------------------
  252|  3.62k|    result = curlx_dyn_addf(&buf, ":TLSVER-%d-%u", ssl->version,
  253|  3.62k|                            (ssl->version_max >> 16));
  254|  3.62k|    if(result)
  ------------------
  |  Branch (254:8): [True: 0, False: 3.62k]
  ------------------
  255|      0|      goto out;
  256|  3.62k|  }
  257|  3.62k|  if(ssl->ssl_options) {
  ------------------
  |  Branch (257:6): [True: 0, False: 3.62k]
  ------------------
  258|      0|    result = curlx_dyn_addf(&buf, ":TLSOPT-%x", ssl->ssl_options);
  259|      0|    if(result)
  ------------------
  |  Branch (259:8): [True: 0, False: 0]
  ------------------
  260|      0|      goto out;
  261|      0|  }
  262|  3.62k|  if(ssl->cipher_list) {
  ------------------
  |  Branch (262:6): [True: 0, False: 3.62k]
  ------------------
  263|      0|    result = curlx_dyn_addf(&buf, ":CIPHER-%s", ssl->cipher_list);
  264|      0|    if(result)
  ------------------
  |  Branch (264:8): [True: 0, False: 0]
  ------------------
  265|      0|      goto out;
  266|      0|  }
  267|  3.62k|  if(ssl->cipher_list13) {
  ------------------
  |  Branch (267:6): [True: 0, False: 3.62k]
  ------------------
  268|      0|    result = curlx_dyn_addf(&buf, ":CIPHER13-%s", ssl->cipher_list13);
  269|      0|    if(result)
  ------------------
  |  Branch (269:8): [True: 0, False: 0]
  ------------------
  270|      0|      goto out;
  271|      0|  }
  272|  3.62k|  if(ssl->curves) {
  ------------------
  |  Branch (272:6): [True: 0, False: 3.62k]
  ------------------
  273|      0|    result = curlx_dyn_addf(&buf, ":CURVES-%s", ssl->curves);
  274|      0|    if(result)
  ------------------
  |  Branch (274:8): [True: 0, False: 0]
  ------------------
  275|      0|      goto out;
  276|      0|  }
  277|  3.62k|  if(ssl->signature_algorithms) {
  ------------------
  |  Branch (277:6): [True: 0, False: 3.62k]
  ------------------
  278|      0|    result = curlx_dyn_addf(&buf, ":SIGALGS-%s",
  279|      0|                            ssl->signature_algorithms);
  280|      0|    if(result)
  ------------------
  |  Branch (280:8): [True: 0, False: 0]
  ------------------
  281|      0|      goto out;
  282|      0|  }
  283|  3.62k|  if(ssl->verifypeer) {
  ------------------
  |  Branch (283:6): [True: 3.55k, False: 75]
  ------------------
  284|  3.55k|    result = cf_ssl_peer_key_add_path(&buf, "CA", ssl->CAfile, &is_local);
  285|  3.55k|    if(result)
  ------------------
  |  Branch (285:8): [True: 0, False: 3.55k]
  ------------------
  286|      0|      goto out;
  287|  3.55k|    result = cf_ssl_peer_key_add_path(&buf, "CApath", ssl->CApath, &is_local);
  288|  3.55k|    if(result)
  ------------------
  |  Branch (288:8): [True: 0, False: 3.55k]
  ------------------
  289|      0|      goto out;
  290|  3.55k|    result = cf_ssl_peer_key_add_path(&buf, "CRL", ssl->CRLfile, &is_local);
  291|  3.55k|    if(result)
  ------------------
  |  Branch (291:8): [True: 0, False: 3.55k]
  ------------------
  292|      0|      goto out;
  293|  3.55k|    result = cf_ssl_peer_key_add_path(&buf, "Issuer", ssl->issuercert,
  294|  3.55k|                                      &is_local);
  295|  3.55k|    if(result)
  ------------------
  |  Branch (295:8): [True: 0, False: 3.55k]
  ------------------
  296|      0|      goto out;
  297|  3.55k|    if(ssl->ca_info_blob) {
  ------------------
  |  Branch (297:8): [True: 3.55k, False: 0]
  ------------------
  298|  3.55k|      result = cf_ssl_peer_key_add_hash(&buf, "CAInfoBlob", ssl->ca_info_blob);
  299|  3.55k|      if(result)
  ------------------
  |  Branch (299:10): [True: 0, False: 3.55k]
  ------------------
  300|      0|        goto out;
  301|  3.55k|    }
  302|  3.55k|    if(ssl->issuercert_blob) {
  ------------------
  |  Branch (302:8): [True: 0, False: 3.55k]
  ------------------
  303|      0|      result = cf_ssl_peer_key_add_hash(&buf, "IssuerBlob",
  304|      0|                                        ssl->issuercert_blob);
  305|      0|      if(result)
  ------------------
  |  Branch (305:10): [True: 0, False: 0]
  ------------------
  306|      0|        goto out;
  307|      0|    }
  308|  3.55k|  }
  309|  3.62k|  if(ssl->cert_blob) {
  ------------------
  |  Branch (309:6): [True: 0, False: 3.62k]
  ------------------
  310|      0|    result = cf_ssl_peer_key_add_hash(&buf, "CertBlob", ssl->cert_blob);
  311|      0|    if(result)
  ------------------
  |  Branch (311:8): [True: 0, False: 0]
  ------------------
  312|      0|      goto out;
  313|      0|  }
  314|  3.62k|  if(ssl->pinned_key && ssl->pinned_key[0]) {
  ------------------
  |  Branch (314:6): [True: 0, False: 3.62k]
  |  Branch (314:25): [True: 0, False: 0]
  ------------------
  315|      0|    result = curlx_dyn_addf(&buf, ":Pinned-%s", ssl->pinned_key);
  316|      0|    if(result)
  ------------------
  |  Branch (316:8): [True: 0, False: 0]
  ------------------
  317|      0|      goto out;
  318|      0|  }
  319|       |
  320|  3.62k|  result = cf_ssl_peer_key_add_mtls(&buf, ssl, &is_local);
  321|  3.62k|  if(result)
  ------------------
  |  Branch (321:6): [True: 0, False: 3.62k]
  ------------------
  322|      0|    goto out;
  323|       |
  324|  3.62k|  if(!tls_id || !tls_id[0]) {
  ------------------
  |  Branch (324:6): [True: 0, False: 3.62k]
  |  Branch (324:17): [True: 0, False: 3.62k]
  ------------------
  325|      0|    result = CURLE_FAILED_INIT;
  326|      0|    goto out;
  327|      0|  }
  328|  3.62k|  result = curlx_dyn_addf(&buf, ":IMPL-%s", tls_id);
  329|  3.62k|  if(result)
  ------------------
  |  Branch (329:6): [True: 0, False: 3.62k]
  ------------------
  330|      0|    goto out;
  331|       |
  332|  3.62k|  result = curlx_dyn_addf(&buf, is_local ?
  ------------------
  |  Branch (332:33): [True: 0, False: 3.62k]
  ------------------
  333|  3.62k|                          CURL_SSLS_LOCAL_SUFFIX : CURL_SSLS_GLOBAL_SUFFIX);
  ------------------
  |  |  168|      0|#define CURL_SSLS_LOCAL_SUFFIX     ":L"
  ------------------
                                        CURL_SSLS_LOCAL_SUFFIX : CURL_SSLS_GLOBAL_SUFFIX);
  ------------------
  |  |  169|  3.62k|#define CURL_SSLS_GLOBAL_SUFFIX    ":G"
  ------------------
  334|  3.62k|  if(result)
  ------------------
  |  Branch (334:6): [True: 0, False: 3.62k]
  ------------------
  335|      0|    goto out;
  336|       |
  337|  3.62k|  *ppeer_key = curlx_dyn_take(&buf, &key_len);
  338|       |  /* we added printable char, and dynbuf always null-terminates, no need
  339|       |   * to track length */
  340|       |
  341|  3.62k|out:
  342|  3.62k|  curlx_dyn_free(&buf);
  343|  3.62k|  return result;
  344|  3.62k|}
vtls_scache.c:ssl_peer_key_add_transport:
  181|  3.62k|{
  182|  3.62k|  switch(transport) {
  183|  3.62k|  case TRNSPRT_TCP:
  ------------------
  |  |  238|  3.62k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (183:3): [True: 3.62k, False: 0]
  ------------------
  184|  3.62k|    return CURLE_OK;
  185|      0|  case TRNSPRT_UDP:
  ------------------
  |  |  239|      0|#define TRNSPRT_UDP  4
  ------------------
  |  Branch (185:3): [True: 0, False: 3.62k]
  ------------------
  186|      0|    return curlx_dyn_add(buf, ":UDP");
  187|      0|  case TRNSPRT_QUIC:
  ------------------
  |  |  240|      0|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (187:3): [True: 0, False: 3.62k]
  ------------------
  188|      0|    return curlx_dyn_add(buf, ":QUIC");
  189|      0|  case TRNSPRT_UNIX:
  ------------------
  |  |  241|      0|#define TRNSPRT_UNIX 6
  ------------------
  |  Branch (189:3): [True: 0, False: 3.62k]
  ------------------
  190|      0|    return curlx_dyn_add(buf, ":UNIX");
  191|      0|  default:
  ------------------
  |  Branch (191:3): [True: 0, False: 3.62k]
  ------------------
  192|      0|    return curlx_dyn_addf(buf, ":TRNSPRT-%d", transport);
  193|  3.62k|  }
  194|  3.62k|}
vtls_scache.c:ssl_peer_key_add_vrfy:
  199|  3.62k|{
  200|  3.62k|  CURLcode result;
  201|       |
  202|  3.62k|  if(!ssl->verifypeer) {
  ------------------
  |  Branch (202:6): [True: 75, False: 3.55k]
  ------------------
  203|     75|    result = curlx_dyn_add(buf, ":NO-VRFY-PEER");
  204|     75|    if(result)
  ------------------
  |  Branch (204:8): [True: 0, False: 75]
  ------------------
  205|      0|      return result;
  206|     75|  }
  207|  3.62k|  if(!ssl->verifyhost) {
  ------------------
  |  Branch (207:6): [True: 0, False: 3.62k]
  ------------------
  208|      0|    result = curlx_dyn_add(buf, ":NO-VRFY-HOST");
  209|      0|    if(result)
  ------------------
  |  Branch (209:8): [True: 0, False: 0]
  ------------------
  210|      0|      return result;
  211|      0|  }
  212|  3.62k|  if(ssl->verifystatus) {
  ------------------
  |  Branch (212:6): [True: 0, False: 3.62k]
  ------------------
  213|      0|    result = curlx_dyn_add(buf, ":VRFY-STATUS");
  214|      0|    if(result)
  ------------------
  |  Branch (214:8): [True: 0, False: 0]
  ------------------
  215|      0|      return result;
  216|      0|  }
  217|  3.62k|  if((!ssl->verifypeer || !ssl->verifyhost) &&
  ------------------
  |  Branch (217:7): [True: 75, False: 3.55k]
  |  Branch (217:27): [True: 0, False: 3.55k]
  ------------------
  218|     75|     peer->peer && !Curl_peer_equal(peer->origin, peer->peer)) {
  ------------------
  |  Branch (218:6): [True: 75, False: 0]
  |  Branch (218:20): [True: 75, False: 0]
  ------------------
  219|     75|    result = curlx_dyn_addf(buf, ":CHOST-%s:CPORT-%u",
  220|     75|                            peer->peer->hostname,
  221|     75|                            peer->peer->port);
  222|     75|    if(result)
  ------------------
  |  Branch (222:8): [True: 0, False: 75]
  ------------------
  223|      0|      return result;
  224|     75|  }
  225|  3.62k|  return CURLE_OK;
  226|  3.62k|}
vtls_scache.c:cf_ssl_peer_key_add_path:
   70|  14.2k|{
   71|  14.2k|  if(path && path[0]) {
  ------------------
  |  Branch (71:6): [True: 7.10k, False: 7.10k]
  |  Branch (71:14): [True: 7.10k, False: 0]
  ------------------
   72|       |    /* We try to add absolute paths, so that the session key can stay valid
   73|       |     * when used in another process with different CWD. When a path does not
   74|       |     * exist, this does not work. Then, we add the path as is. */
   75|       |#ifdef _WIN32
   76|       |    char *abspath = _fullpath(NULL, path, 0);
   77|       |    if(abspath) {
   78|       |      CURLcode result = curlx_dyn_addf(buf, ":%s-%s", name, abspath);
   79|       |      /* !checksrc! disable BANNEDFUNC 1 */
   80|       |      free(abspath); /* allocated by CRT, use system free() */
   81|       |      return result;
   82|       |    }
   83|       |    *is_local = TRUE;
   84|       |#elif defined(HAVE_REALPATH)
   85|  7.10k|    if(path[0] != '/') {
  ------------------
  |  Branch (85:8): [True: 0, False: 7.10k]
  ------------------
   86|      0|      char *abspath = realpath(path, NULL);
   87|      0|      if(abspath) {
  ------------------
  |  Branch (87:10): [True: 0, False: 0]
  ------------------
   88|      0|        CURLcode result = curlx_dyn_addf(buf, ":%s-%s", name, abspath);
   89|       |        /* !checksrc! disable BANNEDFUNC 1 */
   90|      0|        free(abspath); /* allocated by libc, free without memdebug */
   91|      0|        return result;
   92|      0|      }
   93|      0|      *is_local = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
   94|      0|    }
   95|  7.10k|#endif
   96|  7.10k|    return curlx_dyn_addf(buf, ":%s-%s", name, path);
   97|  7.10k|  }
   98|  7.10k|  return CURLE_OK;
   99|  14.2k|}
vtls_scache.c:cf_ssl_peer_key_add_hash:
  104|  3.55k|{
  105|  3.55k|  CURLcode result = CURLE_OK;
  106|  3.55k|  if(blob && blob->len) {
  ------------------
  |  Branch (106:6): [True: 3.55k, False: 0]
  |  Branch (106:14): [True: 3.55k, False: 0]
  ------------------
  107|  3.55k|    unsigned char hash[CURL_SHA256_DIGEST_LENGTH];
  108|  3.55k|    size_t i;
  109|       |
  110|  3.55k|    result = curlx_dyn_addf(buf, ":%s-", name);
  111|  3.55k|    if(result)
  ------------------
  |  Branch (111:8): [True: 0, False: 3.55k]
  ------------------
  112|      0|      goto out;
  113|  3.55k|    result = Curl_sha256it(hash, blob->data, blob->len);
  114|  3.55k|    if(result)
  ------------------
  |  Branch (114:8): [True: 0, False: 3.55k]
  ------------------
  115|      0|      goto out;
  116|   117k|    for(i = 0; i < CURL_SHA256_DIGEST_LENGTH; ++i) {
  ------------------
  |  |   38|   117k|#define CURL_SHA256_DIGEST_LENGTH 32 /* fixed size */
  ------------------
  |  Branch (116:16): [True: 113k, False: 3.55k]
  ------------------
  117|   113k|      result = curlx_dyn_addf(buf, "%02x", hash[i]);
  118|   113k|      if(result)
  ------------------
  |  Branch (118:10): [True: 0, False: 113k]
  ------------------
  119|      0|        goto out;
  120|   113k|    }
  121|  3.55k|  }
  122|  3.55k|out:
  123|  3.55k|  return result;
  124|  3.55k|}
vtls_scache.c:cf_ssl_peer_key_add_mtls:
  129|  3.62k|{
  130|  3.62k|  CURLcode result = CURLE_OK;
  131|  3.62k|  if(ssl->clientcert && ssl->clientcert[0]) {
  ------------------
  |  Branch (131:6): [True: 0, False: 3.62k]
  |  Branch (131:25): [True: 0, False: 0]
  ------------------
  132|      0|    result = cf_ssl_peer_key_add_path(buf, "CCERT", ssl->clientcert, is_local);
  133|      0|    if(result)
  ------------------
  |  Branch (133:8): [True: 0, False: 0]
  ------------------
  134|      0|      goto out;
  135|      0|  }
  136|  3.62k|  if(ssl->key && ssl->key[0]) {
  ------------------
  |  Branch (136:6): [True: 0, False: 3.62k]
  |  Branch (136:18): [True: 0, False: 0]
  ------------------
  137|      0|    result = cf_ssl_peer_key_add_path(buf, "KEY", ssl->key, is_local);
  138|      0|    if(result)
  ------------------
  |  Branch (138:8): [True: 0, False: 0]
  ------------------
  139|      0|      goto out;
  140|      0|  }
  141|  3.62k|  if(ssl->key_blob) {
  ------------------
  |  Branch (141:6): [True: 0, False: 3.62k]
  ------------------
  142|      0|    result = cf_ssl_peer_key_add_hash(buf, "KEYBlob", ssl->key_blob);
  143|      0|    if(result)
  ------------------
  |  Branch (143:8): [True: 0, False: 0]
  ------------------
  144|      0|      goto out;
  145|      0|  }
  146|  3.62k|  if(ssl->cert_type && ssl->cert_type[0]) {
  ------------------
  |  Branch (146:6): [True: 0, False: 3.62k]
  |  Branch (146:24): [True: 0, False: 0]
  ------------------
  147|      0|    size_t i;
  148|      0|    result = curlx_dyn_add(buf, ":CT-");
  149|      0|    for(i = 0; !result && ssl->cert_type[i]; i++) {
  ------------------
  |  Branch (149:16): [True: 0, False: 0]
  |  Branch (149:27): [True: 0, False: 0]
  ------------------
  150|      0|      char c = Curl_raw_toupper(ssl->cert_type[i]);
  151|      0|      result = curlx_dyn_addn(buf, &c, 1);
  152|      0|    }
  153|      0|    if(result)
  ------------------
  |  Branch (153:8): [True: 0, False: 0]
  ------------------
  154|      0|      goto out;
  155|      0|  }
  156|  3.62k|  if(ssl->key_type && ssl->key_type[0]) {
  ------------------
  |  Branch (156:6): [True: 0, False: 3.62k]
  |  Branch (156:23): [True: 0, False: 0]
  ------------------
  157|      0|    size_t i;
  158|      0|    result = curlx_dyn_add(buf, ":KT-");
  159|      0|    for(i = 0; !result && ssl->key_type[i]; i++) {
  ------------------
  |  Branch (159:16): [True: 0, False: 0]
  |  Branch (159:27): [True: 0, False: 0]
  ------------------
  160|      0|      char c = Curl_raw_toupper(ssl->key_type[i]);
  161|      0|      result = curlx_dyn_addn(buf, &c, 1);
  162|      0|    }
  163|      0|  }
  164|  3.62k|out:
  165|  3.62k|  return result;
  166|  3.62k|}
vtls_scache.c:cf_ssl_scache_session_ldestroy:
  385|  7.16k|{
  386|  7.16k|  struct Curl_ssl_session *s = obj;
  387|  7.16k|  (void)udata;
  388|  7.16k|  curlx_free(s->sdata);
  ------------------
  |  | 1476|  7.16k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  389|  7.16k|  curlx_free(s->quic_tp);
  ------------------
  |  | 1476|  7.16k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  390|  7.16k|  curlx_free(s->alpn);
  ------------------
  |  | 1476|  7.16k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  391|  7.16k|  curlx_free(s);
  ------------------
  |  | 1476|  7.16k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  392|  7.16k|}
vtls_scache.c:cf_ssl_scache_clear_peer:
  504|  96.9k|{
  505|  96.9k|  Curl_llist_destroy(&peer->sessions, NULL);
  506|  96.9k|  if(peer->sobj) {
  ------------------
  |  Branch (506:6): [True: 0, False: 96.9k]
  ------------------
  507|      0|    DEBUGASSERT(peer->sobj_free);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (507:5): [True: 0, False: 0]
  |  Branch (507:5): [True: 0, False: 0]
  ------------------
  508|      0|    if(peer->sobj_free)
  ------------------
  |  Branch (508:8): [True: 0, False: 0]
  ------------------
  509|      0|      peer->sobj_free(peer->sobj);
  510|      0|    peer->sobj = NULL;
  511|      0|  }
  512|  96.9k|  peer->sobj_free = NULL;
  513|  96.9k|  curlx_safefree(peer->clientcert);
  ------------------
  |  | 1332|  96.9k|  do {                      \
  |  | 1333|  96.9k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  96.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  96.9k|    (ptr) = NULL;           \
  |  | 1335|  96.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 96.9k]
  |  |  ------------------
  ------------------
  514|  96.9k|  curlx_safefree(peer->key_passwd);
  ------------------
  |  | 1332|  96.9k|  do {                      \
  |  | 1333|  96.9k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  96.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  96.9k|    (ptr) = NULL;           \
  |  | 1335|  96.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 96.9k]
  |  |  ------------------
  ------------------
  515|  96.9k|  curlx_safefree(peer->ssl_peer_key);
  ------------------
  |  | 1332|  96.9k|  do {                      \
  |  | 1333|  96.9k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1476|  96.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1334|  96.9k|    (ptr) = NULL;           \
  |  | 1335|  96.9k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1335:11): [Folded, False: 96.9k]
  |  |  ------------------
  ------------------
  516|  96.9k|  peer->age = 0;
  517|       |  peer->hmac_set = FALSE;
  ------------------
  |  | 1048|  96.9k|#define FALSE false
  ------------------
  518|  96.9k|}
vtls_scache.c:cf_ssl_scache_get:
  368|  57.9k|{
  369|  57.9k|  struct Curl_ssl_scache *scache = NULL;
  370|       |  /* If a share is present, its ssl_scache has preference over the multi */
  371|  57.9k|  if(data->share && data->share->ssl_scache)
  ------------------
  |  Branch (371:6): [True: 0, False: 57.9k]
  |  Branch (371:21): [True: 0, False: 0]
  ------------------
  372|      0|    scache = data->share->ssl_scache;
  373|  57.9k|  else if(data->multi && data->multi->ssl_scache)
  ------------------
  |  Branch (373:11): [True: 57.9k, False: 0]
  |  Branch (373:26): [True: 57.9k, False: 0]
  ------------------
  374|  57.9k|    scache = data->multi->ssl_scache;
  375|  57.9k|  if(scache && !GOOD_SCACHE(scache)) {
  ------------------
  |  |   64|  57.9k|#define GOOD_SCACHE(x) ((x) && (x)->magic == CURL_SCACHE_MAGIC)
  |  |  ------------------
  |  |  |  |   62|  57.9k|#define CURL_SCACHE_MAGIC 0x000e1551
  |  |  ------------------
  |  |  |  Branch (64:25): [True: 57.9k, False: 0]
  |  |  |  Branch (64:32): [True: 57.9k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (375:6): [True: 57.9k, False: 0]
  ------------------
  376|      0|    failf(data, "transfer would use an invalid scache at %p, denied",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  377|      0|          (void *)scache);
  378|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1075|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (378:5): [Folded, False: 0]
  |  Branch (378:5): [Folded, False: 0]
  ------------------
  379|      0|    return NULL;
  380|      0|  }
  381|  57.9k|  return scache;
  382|  57.9k|}
vtls_scache.c:cf_scache_add_session:
  925|  7.16k|{
  926|  7.16k|  struct Curl_ssl_scache_peer *peer = NULL;
  927|  7.16k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
  928|  7.16k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  929|  7.16k|  curl_off_t now = (curl_off_t)time(NULL);
  930|  7.16k|  curl_off_t max_lifetime;
  931|       |
  932|  7.16k|  if(!scache || !scache->peer_count) {
  ------------------
  |  Branch (932:6): [True: 0, False: 7.16k]
  |  Branch (932:17): [True: 0, False: 7.16k]
  ------------------
  933|      0|    Curl_ssl_session_destroy(s);
  934|      0|    return CURLE_OK;
  935|      0|  }
  936|       |
  937|  7.16k|  if(s->valid_until <= 0)
  ------------------
  |  Branch (937:6): [True: 0, False: 7.16k]
  ------------------
  938|      0|    s->valid_until = now + scache->default_lifetime_secs;
  939|       |
  940|  7.16k|  max_lifetime = (s->ietf_tls_id == CURL_IETF_PROTO_TLS1_3) ?
  ------------------
  |  |   81|  7.16k|#define CURL_IETF_PROTO_TLS1_3        0x0304
  ------------------
  |  Branch (940:18): [True: 7.16k, False: 0]
  ------------------
  941|  7.16k|                 CURL_SCACHE_MAX_13_LIFETIME_SEC :
  ------------------
  |  |   41|  7.16k|#define CURL_SCACHE_MAX_13_LIFETIME_SEC    (60 * 60 * 24 * 7)
  ------------------
  942|  7.16k|                 CURL_SCACHE_MAX_12_LIFETIME_SEC;
  ------------------
  |  |   42|  7.16k|#define CURL_SCACHE_MAX_12_LIFETIME_SEC    (60 * 60 * 24)
  ------------------
  943|  7.16k|  if(s->valid_until > (now + max_lifetime))
  ------------------
  |  Branch (943:6): [True: 0, False: 7.16k]
  ------------------
  944|      0|    s->valid_until = now + max_lifetime;
  945|       |
  946|  7.16k|  if(cf_scache_session_expired(s, now)) {
  ------------------
  |  Branch (946:6): [True: 0, False: 7.16k]
  ------------------
  947|      0|    CURL_TRC_SSLS(data, "add, session already expired");
  ------------------
  |  |  194|      0|  do {                                                    \
  |  |  195|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|      0|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  948|      0|    Curl_ssl_session_destroy(s);
  949|      0|    return CURLE_OK;
  950|      0|  }
  951|       |
  952|  7.16k|  result = cf_ssl_add_peer(data, scache, ssl_peer_key, conn_config, &peer);
  953|  7.16k|  if(result || !peer) {
  ------------------
  |  Branch (953:6): [True: 0, False: 7.16k]
  |  Branch (953:16): [True: 0, False: 7.16k]
  ------------------
  954|      0|    CURL_TRC_SSLS(data, "unable to add scache peer: %d", (int)result);
  ------------------
  |  |  194|      0|  do {                                                    \
  |  |  195|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|      0|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  955|      0|    Curl_ssl_session_destroy(s);
  956|      0|    goto out;
  957|      0|  }
  958|       |
  959|  7.16k|  cf_scache_peer_add_session(peer, s, now);
  960|       |
  961|  7.16k|out:
  962|  7.16k|  if(result) {
  ------------------
  |  Branch (962:6): [True: 0, False: 7.16k]
  ------------------
  963|      0|    failf(data, "[SCACHE] failed to add session for %s, error=%d",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  964|      0|          ssl_peer_key, (int)result);
  965|      0|  }
  966|  7.16k|  else
  967|  7.16k|    CURL_TRC_SSLS(data, "added session for %s [proto=0x%x, "
  ------------------
  |  |  194|  7.16k|  do {                                                    \
  |  |  195|  7.16k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  329|  7.16k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  14.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 7.16k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 7.16k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  14.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|  7.16k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|  7.16k|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  ------------------
  |  |  |  Branch (196:27): [True: 0, False: 0]
  |  |  |  Branch (196:27): [True: 0, False: 0]
  |  |  ------------------
  |  |  197|  7.16k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 7.16k]
  |  |  ------------------
  ------------------
  968|  7.16k|                  "valid_secs=%" FMT_OFF_T ", alpn=%s, earlydata=%zu, "
  969|  7.16k|                  "quic_tp=%s], peer has %zu sessions now", ssl_peer_key,
  970|  7.16k|                  (unsigned int)s->ietf_tls_id, s->valid_until - now,
  971|  7.16k|                  s->alpn, s->earlydata_max, s->quic_tp ? "yes" : "no",
  972|  7.16k|                  peer ? Curl_llist_count(&peer->sessions) : 0);
  973|  7.16k|  return result;
  974|  7.16k|}
vtls_scache.c:cf_scache_session_expired:
  597|  10.7k|{
  598|  10.7k|  return (s->valid_until > 0) && (s->valid_until < now);
  ------------------
  |  Branch (598:10): [True: 10.7k, False: 0]
  |  Branch (598:34): [True: 0, False: 10.7k]
  ------------------
  599|  10.7k|}
vtls_scache.c:cf_scache_peer_add_session:
  903|  7.16k|{
  904|       |  /* A session not from TLSv1.3 replaces all other. */
  905|  7.16k|  if(s->ietf_tls_id != CURL_IETF_PROTO_TLS1_3) {
  ------------------
  |  |   81|  7.16k|#define CURL_IETF_PROTO_TLS1_3        0x0304
  ------------------
  |  Branch (905:6): [True: 0, False: 7.16k]
  ------------------
  906|      0|    Curl_llist_destroy(&peer->sessions, NULL);
  907|      0|    Curl_llist_append(&peer->sessions, s, &s->list);
  908|      0|  }
  909|  7.16k|  else {
  910|       |    /* Expire existing, append, trim from head to obey max_sessions */
  911|  7.16k|    cf_scache_peer_remove_expired(peer, now);
  912|  7.16k|    cf_scache_peer_remove_non13(peer);
  913|  7.16k|    Curl_llist_append(&peer->sessions, s, &s->list);
  914|  7.16k|    while(Curl_llist_count(&peer->sessions) > peer->max_sessions) {
  ------------------
  |  Branch (914:11): [True: 0, False: 7.16k]
  ------------------
  915|      0|      Curl_node_remove(Curl_llist_head(&peer->sessions));
  916|      0|    }
  917|  7.16k|  }
  918|  7.16k|}
vtls_scache.c:cf_scache_peer_remove_non13:
  614|  7.16k|{
  615|  7.16k|  struct Curl_llist_node *n = Curl_llist_head(&peer->sessions);
  616|  10.7k|  while(n) {
  ------------------
  |  Branch (616:9): [True: 3.58k, False: 7.16k]
  ------------------
  617|  3.58k|    struct Curl_ssl_session *s = Curl_node_elem(n);
  618|  3.58k|    n = Curl_node_next(n);
  619|  3.58k|    if(s->ietf_tls_id != CURL_IETF_PROTO_TLS1_3)
  ------------------
  |  |   81|  3.58k|#define CURL_IETF_PROTO_TLS1_3        0x0304
  ------------------
  |  Branch (619:8): [True: 0, False: 3.58k]
  ------------------
  620|      0|      cf_scache_session_remove(peer, s);
  621|  3.58k|  }
  622|  7.16k|}
vtls_scache.c:cf_ssl_find_peer_by_key:
  762|  10.7k|{
  763|  10.7k|  size_t i, peer_key_len = 0;
  764|  10.7k|  CURLcode result = CURLE_OK;
  765|       |
  766|  10.7k|  *ppeer = NULL;
  767|  10.7k|  if(!GOOD_SCACHE(scache)) {
  ------------------
  |  |   64|  10.7k|#define GOOD_SCACHE(x) ((x) && (x)->magic == CURL_SCACHE_MAGIC)
  |  |  ------------------
  |  |  |  |   62|  10.7k|#define CURL_SCACHE_MAGIC 0x000e1551
  |  |  ------------------
  |  |  |  Branch (64:25): [True: 10.7k, False: 0]
  |  |  |  Branch (64:32): [True: 10.7k, False: 0]
  |  |  ------------------
  ------------------
  768|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  769|      0|  }
  770|       |
  771|  10.7k|  CURL_TRC_SSLS(data, "find peer slot for %s among %zu slots",
  ------------------
  |  |  194|  10.7k|  do {                                                    \
  |  |  195|  10.7k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  329|  10.7k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  21.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 10.7k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 10.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  21.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|  10.7k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|  10.7k|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|  10.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 10.7k]
  |  |  ------------------
  ------------------
  772|  10.7k|                ssl_peer_key, scache->peer_count);
  773|       |
  774|       |  /* check for entries with known peer_key */
  775|   191k|  for(i = 0; scache && i < scache->peer_count; i++) {
  ------------------
  |  Branch (775:14): [True: 191k, False: 0]
  |  Branch (775:24): [True: 183k, False: 7.21k]
  ------------------
  776|   183k|    if(scache->peers[i].ssl_peer_key &&
  ------------------
  |  Branch (776:8): [True: 3.58k, False: 180k]
  ------------------
  777|  3.58k|       !strcmp(ssl_peer_key, scache->peers[i].ssl_peer_key) &&
  ------------------
  |  Branch (777:8): [True: 3.58k, False: 0]
  ------------------
  778|  3.58k|       cf_ssl_scache_match_auth(&scache->peers[i], conn_config)) {
  ------------------
  |  Branch (778:8): [True: 3.58k, False: 0]
  ------------------
  779|       |      /* yes, we have a cached session for this! */
  780|  3.58k|      *ppeer = &scache->peers[i];
  781|  3.58k|      goto out;
  782|  3.58k|    }
  783|   183k|  }
  784|       |  /* check for entries with HMAC set but no known peer_key */
  785|   187k|  for(i = 0; scache && i < scache->peer_count; i++) {
  ------------------
  |  Branch (785:14): [True: 187k, False: 0]
  |  Branch (785:24): [True: 180k, False: 7.21k]
  ------------------
  786|   180k|    if(!scache->peers[i].ssl_peer_key &&
  ------------------
  |  Branch (786:8): [True: 180k, False: 0]
  ------------------
  787|   180k|       scache->peers[i].hmac_set &&
  ------------------
  |  Branch (787:8): [True: 0, False: 180k]
  ------------------
  788|      0|       cf_ssl_scache_match_auth(&scache->peers[i], conn_config)) {
  ------------------
  |  Branch (788:8): [True: 0, False: 0]
  ------------------
  789|       |      /* possible entry with unknown peer_key, check hmac */
  790|      0|      unsigned char my_hmac[CURL_SHA256_DIGEST_LENGTH];
  791|      0|      if(!peer_key_len) /* we are lazy */
  ------------------
  |  Branch (791:10): [True: 0, False: 0]
  ------------------
  792|      0|        peer_key_len = strlen(ssl_peer_key);
  793|      0|      result = Curl_hmacit(&Curl_HMAC_SHA256,
  794|      0|                           scache->peers[i].key_salt,
  795|      0|                           sizeof(scache->peers[i].key_salt),
  796|      0|                           (const unsigned char *)ssl_peer_key,
  797|      0|                           peer_key_len,
  798|      0|                           my_hmac);
  799|      0|      if(result)
  ------------------
  |  Branch (799:10): [True: 0, False: 0]
  ------------------
  800|      0|        goto out;
  801|      0|      if(!memcmp(scache->peers[i].key_hmac, my_hmac, sizeof(my_hmac))) {
  ------------------
  |  Branch (801:10): [True: 0, False: 0]
  ------------------
  802|       |        /* remember peer_key for future lookups */
  803|      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)) \
  |  |  ------------------
  |  |  |  |  329|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|      0|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  804|      0|                      i, ssl_peer_key);
  805|      0|        scache->peers[i].ssl_peer_key = curlx_strdup(ssl_peer_key);
  ------------------
  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  806|      0|        if(!scache->peers[i].ssl_peer_key) {
  ------------------
  |  Branch (806:12): [True: 0, False: 0]
  ------------------
  807|      0|          result = CURLE_OUT_OF_MEMORY;
  808|      0|          goto out;
  809|      0|        }
  810|      0|        cf_ssl_cache_peer_update(&scache->peers[i]);
  811|      0|        *ppeer = &scache->peers[i];
  812|      0|        goto out;
  813|      0|      }
  814|      0|    }
  815|   180k|  }
  816|  7.21k|  CURL_TRC_SSLS(data, "peer not found for %s", ssl_peer_key);
  ------------------
  |  |  194|  7.21k|  do {                                                    \
  |  |  195|  7.21k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  329|  7.21k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  322|  14.4k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (322:4): [True: 7.21k, False: 0]
  |  |  |  |  |  |  |  Branch (322:14): [True: 0, False: 7.21k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  323|  14.4k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (323:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (324:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  330|  7.21k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (330:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|  7.21k|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|  7.21k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 7.21k]
  |  |  ------------------
  ------------------
  817|  10.7k|out:
  818|  10.7k|  return result;
  819|  7.21k|}
vtls_scache.c:cf_ssl_scache_match_auth:
  744|  3.58k|{
  745|  3.58k|  if(!conn_config) {
  ------------------
  |  Branch (745:6): [True: 0, False: 3.58k]
  ------------------
  746|      0|    if(peer->clientcert || peer->key_passwd)
  ------------------
  |  Branch (746:8): [True: 0, False: 0]
  |  Branch (746:28): [True: 0, False: 0]
  ------------------
  747|      0|      return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  748|      0|    return TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  749|      0|  }
  750|  3.58k|  else if(!Curl_safecmp(peer->clientcert, conn_config->clientcert))
  ------------------
  |  Branch (750:11): [True: 0, False: 3.58k]
  ------------------
  751|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  752|  3.58k|  if(Curl_timestrcmp(peer->key_passwd, conn_config->key_passwd))
  ------------------
  |  Branch (752:6): [True: 0, False: 3.58k]
  ------------------
  753|      0|    return FALSE;
  ------------------
  |  | 1048|      0|#define FALSE false
  ------------------
  754|  3.58k|  return TRUE;
  ------------------
  |  | 1045|  3.58k|#define TRUE true
  ------------------
  755|  3.58k|}
vtls_scache.c:cf_ssl_cache_peer_update:
  533|  3.58k|{
  534|       |  /* The sessions of this peer are exportable if
  535|       |   * - it has no confidential information
  536|       |   * - its peer key is not yet known, because sessions were
  537|       |   *   imported using only the salt+hmac
  538|       |   * - the peer key is global, e.g. carrying no relative paths */
  539|  3.58k|  peer->exportable = (!peer->clientcert && !peer->key_passwd &&
  ------------------
  |  Branch (539:23): [True: 3.58k, False: 0]
  |  Branch (539:44): [True: 3.58k, False: 0]
  ------------------
  540|  3.58k|                      (!peer->ssl_peer_key ||
  ------------------
  |  Branch (540:24): [True: 0, False: 3.58k]
  ------------------
  541|  3.58k|                       cf_ssl_peer_key_is_global(peer->ssl_peer_key)));
  ------------------
  |  Branch (541:24): [True: 3.58k, False: 0]
  ------------------
  542|  3.58k|}
vtls_scache.c:cf_ssl_peer_key_is_global:
  172|  3.58k|{
  173|  3.58k|  size_t len = peer_key ? strlen(peer_key) : 0;
  ------------------
  |  Branch (173:16): [True: 3.58k, False: 0]
  ------------------
  174|  3.58k|  return (len > 2) &&
  ------------------
  |  Branch (174:10): [True: 3.58k, False: 0]
  ------------------
  175|  3.58k|         (peer_key[len - 1] == 'G') &&
  ------------------
  |  Branch (175:10): [True: 3.58k, False: 0]
  ------------------
  176|  3.58k|         (peer_key[len - 2] == ':');
  ------------------
  |  Branch (176:10): [True: 3.58k, False: 0]
  ------------------
  177|  3.58k|}
vtls_scache.c:cf_scache_peer_remove_expired:
  603|  7.16k|{
  604|  7.16k|  struct Curl_llist_node *n = Curl_llist_head(&peer->sessions);
  605|  10.7k|  while(n) {
  ------------------
  |  Branch (605:9): [True: 3.58k, False: 7.16k]
  ------------------
  606|  3.58k|    struct Curl_ssl_session *s = Curl_node_elem(n);
  607|  3.58k|    n = Curl_node_next(n);
  608|  3.58k|    if(cf_scache_session_expired(s, now))
  ------------------
  |  Branch (608:8): [True: 0, False: 3.58k]
  ------------------
  609|      0|      cf_scache_session_remove(peer, s);
  610|  3.58k|  }
  611|  7.16k|}
vtls_scache.c:cf_ssl_add_peer:
  856|  7.16k|{
  857|  7.16k|  struct Curl_ssl_scache_peer *peer = NULL;
  858|  7.16k|  CURLcode result = CURLE_OK;
  859|       |
  860|  7.16k|  *ppeer = NULL;
  861|  7.16k|  if(ssl_peer_key) {
  ------------------
  |  Branch (861:6): [True: 7.16k, False: 0]
  ------------------
  862|  7.16k|    result = cf_ssl_find_peer_by_key(data, scache, ssl_peer_key, conn_config,
  863|  7.16k|                                     &peer);
  864|  7.16k|    if(result || !scache->peer_count)
  ------------------
  |  Branch (864:8): [True: 0, False: 7.16k]
  |  Branch (864:18): [True: 0, False: 7.16k]
  ------------------
  865|      0|      return result;
  866|  7.16k|  }
  867|       |
  868|  7.16k|  if(peer) {
  ------------------
  |  Branch (868:6): [True: 3.58k, False: 3.58k]
  ------------------
  869|  3.58k|    *ppeer = peer;
  870|  3.58k|    return CURLE_OK;
  871|  3.58k|  }
  872|       |
  873|  3.58k|  peer = cf_ssl_get_free_peer(scache);
  874|  3.58k|  if(peer) {
  ------------------
  |  Branch (874:6): [True: 3.58k, False: 0]
  ------------------
  875|  3.58k|    char buffer[64];
  876|  3.58k|    const char *ccert = conn_config ? conn_config->clientcert : NULL;
  ------------------
  |  Branch (876:25): [True: 3.58k, False: 0]
  ------------------
  877|  3.58k|    const char *kpasswd = conn_config ? conn_config->key_passwd : NULL;
  ------------------
  |  Branch (877:27): [True: 3.58k, False: 0]
  ------------------
  878|  3.58k|    if(!ccert && conn_config && conn_config->cert_blob) {
  ------------------
  |  Branch (878:8): [True: 3.58k, False: 0]
  |  Branch (878:18): [True: 3.58k, False: 0]
  |  Branch (878:33): [True: 0, False: 3.58k]
  ------------------
  879|       |      /* when using a client cert blob, create a name for it */
  880|      0|      curl_msnprintf(buffer, sizeof(buffer),
  881|      0|                     "cert-%p", conn_config->cert_blob->data);
  882|      0|      ccert = buffer; /* data is strduped by cf_ssl_scache_peer_init */
  883|      0|    }
  884|  3.58k|    result = cf_ssl_scache_peer_init(peer, ssl_peer_key, ccert, kpasswd,
  885|  3.58k|                                     NULL, NULL);
  886|  3.58k|    if(result)
  ------------------
  |  Branch (886:8): [True: 0, False: 3.58k]
  ------------------
  887|      0|      goto out;
  888|       |    /* all ready */
  889|  3.58k|    *ppeer = peer;
  890|  3.58k|    result = CURLE_OK;
  891|  3.58k|  }
  892|       |
  893|  3.58k|out:
  894|  3.58k|  if(result) {
  ------------------
  |  Branch (894:6): [True: 0, False: 3.58k]
  ------------------
  895|      0|    cf_ssl_scache_clear_peer(peer);
  896|      0|  }
  897|  3.58k|  return result;
  898|  3.58k|}
vtls_scache.c:cf_ssl_get_free_peer:
  823|  3.58k|{
  824|  3.58k|  struct Curl_ssl_scache_peer *peer = NULL;
  825|  3.58k|  size_t i;
  826|       |
  827|       |  /* find empty or oldest peer */
  828|  3.58k|  for(i = 0; i < scache->peer_count; ++i) {
  ------------------
  |  Branch (828:14): [True: 3.58k, False: 0]
  ------------------
  829|       |    /* free peer entry? */
  830|  3.58k|    if(!scache->peers[i].ssl_peer_key && !scache->peers[i].hmac_set) {
  ------------------
  |  Branch (830:8): [True: 3.58k, False: 0]
  |  Branch (830:42): [True: 3.58k, False: 0]
  ------------------
  831|  3.58k|      peer = &scache->peers[i];
  832|  3.58k|      break;
  833|  3.58k|    }
  834|       |    /* peer without sessions and obj */
  835|      0|    if(!scache->peers[i].sobj &&
  ------------------
  |  Branch (835:8): [True: 0, False: 0]
  ------------------
  836|      0|       !Curl_llist_count(&scache->peers[i].sessions)) {
  ------------------
  |  Branch (836:8): [True: 0, False: 0]
  ------------------
  837|      0|      peer = &scache->peers[i];
  838|      0|      break;
  839|      0|    }
  840|       |    /* remember "oldest" peer */
  841|      0|    if(!peer || (scache->peers[i].age < peer->age)) {
  ------------------
  |  Branch (841:8): [True: 0, False: 0]
  |  Branch (841:17): [True: 0, False: 0]
  ------------------
  842|      0|      peer = &scache->peers[i];
  843|      0|    }
  844|      0|  }
  845|  3.58k|  DEBUGASSERT(peer);
  ------------------
  |  | 1075|  3.58k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (845:3): [True: 0, False: 3.58k]
  |  Branch (845:3): [True: 3.58k, False: 0]
  ------------------
  846|  3.58k|  if(peer)
  ------------------
  |  Branch (846:6): [True: 3.58k, False: 0]
  ------------------
  847|  3.58k|    cf_ssl_scache_clear_peer(peer);
  848|  3.58k|  return peer;
  849|  3.58k|}
vtls_scache.c:cf_ssl_scache_peer_init:
  550|  3.58k|{
  551|  3.58k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  552|       |
  553|  3.58k|  DEBUGASSERT(!peer->ssl_peer_key);
  ------------------
  |  | 1075|  3.58k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (553:3): [True: 0, False: 3.58k]
  |  Branch (553:3): [True: 3.58k, False: 0]
  ------------------
  554|  3.58k|  if(ssl_peer_key) {
  ------------------
  |  Branch (554:6): [True: 3.58k, False: 0]
  ------------------
  555|  3.58k|    peer->ssl_peer_key = curlx_strdup(ssl_peer_key);
  ------------------
  |  | 1470|  3.58k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  556|  3.58k|    if(!peer->ssl_peer_key)
  ------------------
  |  Branch (556:8): [True: 0, False: 3.58k]
  ------------------
  557|      0|      goto out;
  558|  3.58k|    peer->hmac_set = FALSE;
  ------------------
  |  | 1048|  3.58k|#define FALSE false
  ------------------
  559|  3.58k|  }
  560|      0|  else if(salt && hmac) {
  ------------------
  |  Branch (560:11): [True: 0, False: 0]
  |  Branch (560:19): [True: 0, False: 0]
  ------------------
  561|      0|    memcpy(peer->key_salt, salt, sizeof(peer->key_salt));
  562|      0|    memcpy(peer->key_hmac, hmac, sizeof(peer->key_hmac));
  563|      0|    peer->hmac_set = TRUE;
  ------------------
  |  | 1045|      0|#define TRUE true
  ------------------
  564|      0|  }
  565|      0|  else {
  566|      0|    result = CURLE_BAD_FUNCTION_ARGUMENT;
  567|      0|    goto out;
  568|      0|  }
  569|  3.58k|  if(clientcert) {
  ------------------
  |  Branch (569:6): [True: 0, False: 3.58k]
  ------------------
  570|      0|    peer->clientcert = curlx_strdup(clientcert);
  ------------------
  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  571|      0|    if(!peer->clientcert)
  ------------------
  |  Branch (571:8): [True: 0, False: 0]
  ------------------
  572|      0|      goto out;
  573|      0|  }
  574|  3.58k|  if(key_passwd) {
  ------------------
  |  Branch (574:6): [True: 0, False: 3.58k]
  ------------------
  575|      0|    peer->key_passwd = curlx_strdup(key_passwd);
  ------------------
  |  | 1470|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  576|      0|    if(!peer->key_passwd)
  ------------------
  |  Branch (576:8): [True: 0, False: 0]
  ------------------
  577|      0|      goto out;
  578|      0|  }
  579|  3.58k|  cf_ssl_cache_peer_update(peer);
  580|  3.58k|  result = CURLE_OK;
  581|  3.58k|out:
  582|  3.58k|  if(result)
  ------------------
  |  Branch (582:6): [True: 0, False: 3.58k]
  ------------------
  583|      0|    cf_ssl_scache_clear_peer(peer);
  584|  3.58k|  return result;
  585|  3.58k|}

_ZN4curl6fuzzer5proto8ScenarioC2EPN6google8protobuf5ArenaE:
  826|  3.73k|    : ::google::protobuf::Message(arena) {
  827|  3.73k|#endif  // PROTOBUF_CUSTOM_VTABLE
  828|  3.73k|  SharedCtor(arena);
  829|       |  // @@protoc_insertion_point(arena_constructor:curl.fuzzer.proto.Scenario)
  830|  3.73k|}
_ZN4curl6fuzzer5proto8ScenarioD2Ev:
  891|  3.73k|Scenario::~Scenario() {
  892|       |  // @@protoc_insertion_point(destructor:curl.fuzzer.proto.Scenario)
  893|  3.73k|  SharedDtor(*this);
  894|  3.73k|}
_ZNK4curl6fuzzer5proto8Scenario12GetClassDataEv:
  961|  33.6k|const ::google::protobuf::internal::ClassData* Scenario::GetClassData() const {
  962|  33.6k|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
  963|  33.6k|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
  964|  33.6k|  return _class_data_.base();
  965|  33.6k|}
_ZN4curl6fuzzer5proto8Scenario5ClearEv:
 1065|  7.46k|PROTOBUF_NOINLINE void Scenario::Clear() {
 1066|       |// @@protoc_insertion_point(message_clear_start:curl.fuzzer.proto.Scenario)
 1067|  7.46k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 1068|  7.46k|  ::uint32_t cached_has_bits = 0;
 1069|       |  // Prevent compiler warnings about cached_has_bits being unused
 1070|  7.46k|  (void) cached_has_bits;
 1071|       |
 1072|  7.46k|  _impl_.options_.Clear();
 1073|  7.46k|  _impl_.request_headers_.Clear();
 1074|  7.46k|  _impl_.subsequent_connections_.Clear();
 1075|  7.46k|  _impl_.telnet_options_.Clear();
 1076|  7.46k|  _impl_.host_path_.ClearToEmpty();
 1077|  7.46k|  cached_has_bits = _impl_._has_bits_[0];
 1078|  7.46k|  if (cached_has_bits & 0x0000000fu) {
  ------------------
  |  Branch (1078:7): [True: 0, False: 7.46k]
  ------------------
 1079|      0|    if (cached_has_bits & 0x00000001u) {
  ------------------
  |  Branch (1079:9): [True: 0, False: 0]
  ------------------
 1080|      0|      ABSL_DCHECK(_impl_.connection_ != nullptr);
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1081|      0|      _impl_.connection_->Clear();
 1082|      0|    }
 1083|      0|    if (cached_has_bits & 0x00000002u) {
  ------------------
  |  Branch (1083:9): [True: 0, False: 0]
  ------------------
 1084|      0|      ABSL_DCHECK(_impl_.mime_post_ != nullptr);
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1085|      0|      _impl_.mime_post_->Clear();
 1086|      0|    }
 1087|      0|    if (cached_has_bits & 0x00000004u) {
  ------------------
  |  Branch (1087:9): [True: 0, False: 0]
  ------------------
 1088|      0|      ABSL_DCHECK(_impl_.upload_ != nullptr);
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1089|      0|      _impl_.upload_->Clear();
 1090|      0|    }
 1091|      0|    if (cached_has_bits & 0x00000008u) {
  ------------------
  |  Branch (1091:9): [True: 0, False: 0]
  ------------------
 1092|      0|      ABSL_DCHECK(_impl_.api_plan_ != nullptr);
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1093|      0|      _impl_.api_plan_->Clear();
 1094|      0|    }
 1095|      0|  }
 1096|  7.46k|  _impl_.scheme_ = 0;
 1097|  7.46k|  _impl_._has_bits_.Clear();
 1098|  7.46k|  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
 1099|  7.46k|}
_ZNK4curl6fuzzer5proto8Scenario11GetMetadataEv:
 1382|      1|::google::protobuf::Metadata Scenario::GetMetadata() const {
 1383|      1|  return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
 1384|      1|}
_ZNK4curl6fuzzer5proto7ApiPlan12GetClassDataEv:
 1507|      1|const ::google::protobuf::internal::ClassData* ApiPlan::GetClassData() const {
 1508|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 1509|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 1510|      1|  return _class_data_.base();
 1511|      1|}
_ZN4curl6fuzzer5proto12UploadScriptD2Ev:
 1848|    381|UploadScript::~UploadScript() {
 1849|       |  // @@protoc_insertion_point(destructor:curl.fuzzer.proto.UploadScript)
 1850|    381|  SharedDtor(*this);
 1851|    381|}
_ZNK4curl6fuzzer5proto12UploadScript12GetClassDataEv:
 1902|  2.28k|const ::google::protobuf::internal::ClassData* UploadScript::GetClassData() const {
 1903|  2.28k|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 1904|  2.28k|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 1905|  2.28k|  return _class_data_.base();
 1906|  2.28k|}
_ZN4curl6fuzzer5proto8MimePostD2Ev:
 2165|    638|MimePost::~MimePost() {
 2166|       |  // @@protoc_insertion_point(destructor:curl.fuzzer.proto.MimePost)
 2167|    638|  SharedDtor(*this);
 2168|    638|}
_ZNK4curl6fuzzer5proto8MimePost12GetClassDataEv:
 2218|  3.82k|const ::google::protobuf::internal::ClassData* MimePost::GetClassData() const {
 2219|  3.82k|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 2220|  3.82k|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 2221|  3.82k|  return _class_data_.base();
 2222|  3.82k|}
_ZN4curl6fuzzer5proto8MimePartD2Ev:
 2444|  1.55k|MimePart::~MimePart() {
 2445|       |  // @@protoc_insertion_point(destructor:curl.fuzzer.proto.MimePart)
 2446|  1.55k|  SharedDtor(*this);
 2447|  1.55k|}
_ZN4curl6fuzzer5proto8MimePart13clear_contentEv:
 2461|    961|void MimePart::clear_content() {
 2462|       |// @@protoc_insertion_point(one_of_clear_start:curl.fuzzer.proto.MimePart)
 2463|    961|  ::google::protobuf::internal::TSanWrite(&_impl_);
 2464|    961|  switch (content_case()) {
  ------------------
  |  Branch (2464:11): [True: 961, False: 0]
  ------------------
 2465|    189|    case kData: {
  ------------------
  |  Branch (2465:5): [True: 189, False: 772]
  ------------------
 2466|    189|      _impl_.content_.data_.Destroy();
 2467|    189|      break;
 2468|      0|    }
 2469|    772|    case kSubparts: {
  ------------------
  |  Branch (2469:5): [True: 772, False: 189]
  ------------------
 2470|    772|      if (GetArena() == nullptr) {
  ------------------
  |  Branch (2470:11): [True: 772, False: 0]
  ------------------
 2471|    772|        delete _impl_.content_.subparts_;
 2472|    772|      } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) {
  ------------------
  |  Branch (2472:18): [True: 0, Folded]
  ------------------
 2473|      0|        ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.content_.subparts_);
 2474|      0|      }
 2475|    772|      break;
 2476|      0|    }
 2477|      0|    case CONTENT_NOT_SET: {
  ------------------
  |  Branch (2477:5): [True: 0, False: 961]
  ------------------
 2478|      0|      break;
 2479|      0|    }
 2480|    961|  }
 2481|    961|  _impl_._oneof_case_[0] = CONTENT_NOT_SET;
 2482|    961|}
_ZNK4curl6fuzzer5proto8MimePart12GetClassDataEv:
 2527|  9.35k|const ::google::protobuf::internal::ClassData* MimePart::GetClassData() const {
 2528|  9.35k|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 2529|  9.35k|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 2530|  9.35k|  return _class_data_.base();
 2531|  9.35k|}
_ZN4curl6fuzzer5proto12MimeSubpartsD2Ev:
 2879|    772|MimeSubparts::~MimeSubparts() {
 2880|       |  // @@protoc_insertion_point(destructor:curl.fuzzer.proto.MimeSubparts)
 2881|    772|  SharedDtor(*this);
 2882|    772|}
_ZNK4curl6fuzzer5proto12MimeSubparts12GetClassDataEv:
 2932|  4.63k|const ::google::protobuf::internal::ClassData* MimeSubparts::GetClassData() const {
 2933|  4.63k|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 2934|  4.63k|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 2935|  4.63k|  return _class_data_.base();
 2936|  4.63k|}
_ZN4curl6fuzzer5proto12MimeDataPartD2Ev:
 3131|  1.80k|MimeDataPart::~MimeDataPart() {
 3132|       |  // @@protoc_insertion_point(destructor:curl.fuzzer.proto.MimeDataPart)
 3133|  1.80k|  SharedDtor(*this);
 3134|  1.80k|}
_ZNK4curl6fuzzer5proto12MimeDataPart12GetClassDataEv:
 3188|  10.8k|const ::google::protobuf::internal::ClassData* MimeDataPart::GetClassData() const {
 3189|  10.8k|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 3190|  10.8k|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 3191|  10.8k|  return _class_data_.base();
 3192|  10.8k|}
_ZN4curl6fuzzer5proto9SetOptionD2Ev:
 3509|  12.7k|SetOption::~SetOption() {
 3510|       |  // @@protoc_insertion_point(destructor:curl.fuzzer.proto.SetOption)
 3511|  12.7k|  SharedDtor(*this);
 3512|  12.7k|}
_ZN4curl6fuzzer5proto9SetOption11clear_valueEv:
 3523|  12.3k|void SetOption::clear_value() {
 3524|       |// @@protoc_insertion_point(one_of_clear_start:curl.fuzzer.proto.SetOption)
 3525|  12.3k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 3526|  12.3k|  switch (value_case()) {
  ------------------
  |  Branch (3526:11): [True: 12.3k, False: 0]
  ------------------
 3527|  4.82k|    case kStringValue: {
  ------------------
  |  Branch (3527:5): [True: 4.82k, False: 7.50k]
  ------------------
 3528|  4.82k|      _impl_.value_.string_value_.Destroy();
 3529|  4.82k|      break;
 3530|      0|    }
 3531|  4.97k|    case kUintValue: {
  ------------------
  |  Branch (3531:5): [True: 4.97k, False: 7.35k]
  ------------------
 3532|       |      // No need to clear
 3533|  4.97k|      break;
 3534|      0|    }
 3535|  2.52k|    case kBoolValue: {
  ------------------
  |  Branch (3535:5): [True: 2.52k, False: 9.79k]
  ------------------
 3536|       |      // No need to clear
 3537|  2.52k|      break;
 3538|      0|    }
 3539|      0|    case VALUE_NOT_SET: {
  ------------------
  |  Branch (3539:5): [True: 0, False: 12.3k]
  ------------------
 3540|      0|      break;
 3541|      0|    }
 3542|  12.3k|  }
 3543|  12.3k|  _impl_._oneof_case_[0] = VALUE_NOT_SET;
 3544|  12.3k|}
_ZNK4curl6fuzzer5proto9SetOption12GetClassDataEv:
 3577|  76.4k|const ::google::protobuf::internal::ClassData* SetOption::GetClassData() const {
 3578|  76.4k|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 3579|  76.4k|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 3580|  76.4k|  return _class_data_.base();
 3581|  76.4k|}
_ZN4curl6fuzzer5proto10ConnectionC2EPN6google8protobuf5ArenaE:
 3814|      1|    : ::google::protobuf::Message(arena) {
 3815|      1|#endif  // PROTOBUF_CUSTOM_VTABLE
 3816|      1|  SharedCtor(arena);
 3817|       |  // @@protoc_insertion_point(arena_constructor:curl.fuzzer.proto.Connection)
 3818|      1|}
_ZN4curl6fuzzer5proto10ConnectionD2Ev:
 3868|  4.07k|Connection::~Connection() {
 3869|       |  // @@protoc_insertion_point(destructor:curl.fuzzer.proto.Connection)
 3870|  4.07k|  SharedDtor(*this);
 3871|  4.07k|}
_ZNK4curl6fuzzer5proto10Connection12GetClassDataEv:
 3928|  24.4k|const ::google::protobuf::internal::ClassData* Connection::GetClassData() const {
 3929|  24.4k|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 3930|  24.4k|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 3931|  24.4k|  return _class_data_.base();
 3932|  24.4k|}
_ZN4curl6fuzzer5proto14WsManualProbesD2Ev:
 4242|    338|WsManualProbes::~WsManualProbes() {
 4243|       |  // @@protoc_insertion_point(destructor:curl.fuzzer.proto.WsManualProbes)
 4244|    338|  SharedDtor(*this);
 4245|    338|}
_ZNK4curl6fuzzer5proto14WsManualProbes12GetClassDataEv:
 4283|  2.02k|const ::google::protobuf::internal::ClassData* WsManualProbes::GetClassData() const {
 4284|  2.02k|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 4285|  2.02k|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 4286|  2.02k|  return _class_data_.base();
 4287|  2.02k|}
_ZNK4curl6fuzzer5proto18BackpressureConfig12GetClassDataEv:
 4543|      1|const ::google::protobuf::internal::ClassData* BackpressureConfig::GetClassData() const {
 4544|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 4545|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 4546|      1|  return _class_data_.base();
 4547|      1|}
_ZN4curl6fuzzer5proto14WebSocketFrameD2Ev:
 4768|    848|WebSocketFrame::~WebSocketFrame() {
 4769|       |  // @@protoc_insertion_point(destructor:curl.fuzzer.proto.WebSocketFrame)
 4770|    848|  SharedDtor(*this);
 4771|    848|}
_ZNK4curl6fuzzer5proto14WebSocketFrame12GetClassDataEv:
 4810|  5.08k|const ::google::protobuf::internal::ClassData* WebSocketFrame::GetClassData() const {
 4811|  5.08k|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 4812|  5.08k|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 4813|  5.08k|  return _class_data_.base();
 4814|  5.08k|}
_ZN4curl6fuzzer5proto8Scenario10SharedCtorEPN6google8protobuf5ArenaE:
  882|  3.73k|inline void Scenario::SharedCtor(::_pb::Arena* arena) {
  883|  3.73k|  new (&_impl_) Impl_(internal_visibility(), arena);
  884|  3.73k|  ::memset(reinterpret_cast<char *>(&_impl_) +
  885|  3.73k|               offsetof(Impl_, connection_),
  886|  3.73k|           0,
  887|  3.73k|           offsetof(Impl_, scheme_) -
  888|       |               offsetof(Impl_, connection_) +
  889|  3.73k|               sizeof(Impl_::scheme_));
  890|  3.73k|}
_ZN4curl6fuzzer5proto8Scenario5Impl_C2EN6google8protobuf8internal18InternalVisibilityEPNS5_5ArenaE:
  875|  3.73k|      : _cached_size_{0},
  876|  3.73k|        options_{visibility, arena},
  877|  3.73k|        request_headers_{visibility, arena},
  878|  3.73k|        subsequent_connections_{visibility, arena},
  879|  3.73k|        telnet_options_{visibility, arena},
  880|  3.73k|        host_path_(arena) {}
_ZN4curl6fuzzer5proto8Scenario10SharedDtorERN6google8protobuf11MessageLiteE:
  895|  3.73k|inline void Scenario::SharedDtor(MessageLite& self) {
  896|  3.73k|  Scenario& this_ = static_cast<Scenario&>(self);
  897|  3.73k|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  898|  3.73k|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|  3.73k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|  3.73k|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  7.46k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  3.73k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  7.46k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  7.46k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 3.73k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  3.73k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 3.73k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  7.46k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 3.73k, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 3.73k]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 3.73k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.46k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  7.46k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  899|  3.73k|  this_._impl_.host_path_.Destroy();
  900|  3.73k|  delete this_._impl_.connection_;
  901|  3.73k|  delete this_._impl_.mime_post_;
  902|  3.73k|  delete this_._impl_.upload_;
  903|  3.73k|  delete this_._impl_.api_plan_;
  904|  3.73k|  this_._impl_.~Impl_();
  905|  3.73k|}
_ZN4curl6fuzzer5proto12UploadScript10SharedDtorERN6google8protobuf11MessageLiteE:
 1852|    381|inline void UploadScript::SharedDtor(MessageLite& self) {
 1853|    381|  UploadScript& this_ = static_cast<UploadScript&>(self);
 1854|    381|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
 1855|    381|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|    381|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|    381|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|    762|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    381|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|    762|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|    762|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 381, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    381|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 381]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|    762|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 381, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 381]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 381]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    762|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|    762|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1856|    381|  this_._impl_.data_.Destroy();
 1857|    381|  this_._impl_.~Impl_();
 1858|    381|}
_ZN4curl6fuzzer5proto8MimePost10SharedDtorERN6google8protobuf11MessageLiteE:
 2169|    638|inline void MimePost::SharedDtor(MessageLite& self) {
 2170|    638|  MimePost& this_ = static_cast<MimePost&>(self);
 2171|    638|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
 2172|    638|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|    638|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|    638|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  1.27k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    638|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  1.27k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  1.27k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 638, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    638|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 638]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  1.27k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 638, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 638]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 638]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.27k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  1.27k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2173|    638|  this_._impl_.~Impl_();
 2174|    638|}
_ZN4curl6fuzzer5proto8MimePart10SharedDtorERN6google8protobuf11MessageLiteE:
 2448|  1.55k|inline void MimePart::SharedDtor(MessageLite& self) {
 2449|  1.55k|  MimePart& this_ = static_cast<MimePart&>(self);
 2450|  1.55k|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
 2451|  1.55k|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|  1.55k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|  1.55k|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  3.11k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  1.55k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  3.11k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  3.11k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 1.55k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  1.55k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 1.55k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  3.11k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 1.55k, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 1.55k]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 1.55k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.11k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  3.11k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2452|  1.55k|  this_._impl_.name_.Destroy();
 2453|  1.55k|  this_._impl_.filename_.Destroy();
 2454|  1.55k|  this_._impl_.content_type_.Destroy();
 2455|  1.55k|  if (this_.has_content()) {
  ------------------
  |  Branch (2455:7): [True: 961, False: 598]
  ------------------
 2456|    961|    this_.clear_content();
 2457|    961|  }
 2458|  1.55k|  this_._impl_.~Impl_();
 2459|  1.55k|}
_ZN4curl6fuzzer5proto12MimeSubparts10SharedDtorERN6google8protobuf11MessageLiteE:
 2883|    772|inline void MimeSubparts::SharedDtor(MessageLite& self) {
 2884|    772|  MimeSubparts& this_ = static_cast<MimeSubparts&>(self);
 2885|    772|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
 2886|    772|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|    772|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|    772|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  1.54k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    772|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  1.54k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  1.54k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 772, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    772|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 772]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  1.54k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 772, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 772]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 772]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.54k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  1.54k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2887|    772|  this_._impl_.~Impl_();
 2888|    772|}
_ZN4curl6fuzzer5proto12MimeDataPart10SharedDtorERN6google8protobuf11MessageLiteE:
 3135|  1.80k|inline void MimeDataPart::SharedDtor(MessageLite& self) {
 3136|  1.80k|  MimeDataPart& this_ = static_cast<MimeDataPart&>(self);
 3137|  1.80k|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
 3138|  1.80k|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|  1.80k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|  1.80k|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  3.60k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  1.80k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  3.60k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  3.60k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 1.80k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  1.80k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 1.80k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  3.60k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 1.80k, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 1.80k]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 1.80k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.60k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  3.60k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3139|  1.80k|  this_._impl_.name_.Destroy();
 3140|  1.80k|  this_._impl_.data_.Destroy();
 3141|  1.80k|  this_._impl_.filename_.Destroy();
 3142|  1.80k|  this_._impl_.content_type_.Destroy();
 3143|  1.80k|  this_._impl_.~Impl_();
 3144|  1.80k|}
_ZN4curl6fuzzer5proto9SetOption10SharedDtorERN6google8protobuf11MessageLiteE:
 3513|  12.7k|inline void SetOption::SharedDtor(MessageLite& self) {
 3514|  12.7k|  SetOption& this_ = static_cast<SetOption&>(self);
 3515|  12.7k|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
 3516|  12.7k|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|  12.7k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|  12.7k|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  25.4k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  12.7k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  25.4k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  25.4k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 12.7k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  12.7k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 12.7k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  25.4k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 12.7k, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 12.7k]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 12.7k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  25.4k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  25.4k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3517|  12.7k|  if (this_.has_value()) {
  ------------------
  |  Branch (3517:7): [True: 12.3k, False: 417]
  ------------------
 3518|  12.3k|    this_.clear_value();
 3519|  12.3k|  }
 3520|  12.7k|  this_._impl_.~Impl_();
 3521|  12.7k|}
_ZN4curl6fuzzer5proto10Connection10SharedCtorEPN6google8protobuf5ArenaE:
 3859|      1|inline void Connection::SharedCtor(::_pb::Arena* arena) {
 3860|      1|  new (&_impl_) Impl_(internal_visibility(), arena);
 3861|      1|  ::memset(reinterpret_cast<char *>(&_impl_) +
 3862|      1|               offsetof(Impl_, backpressure_),
 3863|      1|           0,
 3864|      1|           offsetof(Impl_, manual_probes_) -
 3865|       |               offsetof(Impl_, backpressure_) +
 3866|      1|               sizeof(Impl_::manual_probes_));
 3867|      1|}
_ZN4curl6fuzzer5proto10Connection5Impl_C2EN6google8protobuf8internal18InternalVisibilityEPNS5_5ArenaE:
 3854|      1|      : _cached_size_{0},
 3855|      1|        on_readable_{visibility, arena},
 3856|      1|        server_frames_{visibility, arena},
 3857|      1|        initial_response_(arena) {}
_ZN4curl6fuzzer5proto10Connection10SharedDtorERN6google8protobuf11MessageLiteE:
 3872|  4.07k|inline void Connection::SharedDtor(MessageLite& self) {
 3873|  4.07k|  Connection& this_ = static_cast<Connection&>(self);
 3874|  4.07k|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
 3875|  4.07k|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|  4.07k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|  4.07k|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  8.14k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  4.07k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  8.14k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  8.14k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 4.07k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  4.07k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 4.07k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  8.14k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 4.07k, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 4.07k]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 4.07k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  8.14k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  8.14k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3876|  4.07k|  this_._impl_.initial_response_.Destroy();
 3877|  4.07k|  delete this_._impl_.backpressure_;
 3878|  4.07k|  delete this_._impl_.manual_probes_;
 3879|  4.07k|  this_._impl_.~Impl_();
 3880|  4.07k|}
_ZN4curl6fuzzer5proto14WsManualProbes10SharedDtorERN6google8protobuf11MessageLiteE:
 4246|    338|inline void WsManualProbes::SharedDtor(MessageLite& self) {
 4247|    338|  WsManualProbes& this_ = static_cast<WsManualProbes&>(self);
 4248|    338|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
 4249|    338|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|    338|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|    338|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|    676|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    338|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|    676|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|    676|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 338, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    338|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 338]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|    676|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 338, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 338]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 338]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    676|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|    676|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4250|    338|  this_._impl_.~Impl_();
 4251|    338|}
_ZN4curl6fuzzer5proto14WebSocketFrame10SharedDtorERN6google8protobuf11MessageLiteE:
 4772|    848|inline void WebSocketFrame::SharedDtor(MessageLite& self) {
 4773|    848|  WebSocketFrame& this_ = static_cast<WebSocketFrame&>(self);
 4774|    848|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
 4775|    848|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|    848|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|    848|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  1.69k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    848|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  1.69k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  1.69k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 848, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    848|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 848]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  1.69k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 848, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 848]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 848]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.69k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  1.69k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4776|    848|  this_._impl_.payload_.Destroy();
 4777|    848|  this_._impl_.~Impl_();
 4778|    848|}

_ZN4curl6fuzzer5proto8ScenarioC2Ev:
 3158|  3.73k|  inline Scenario() : Scenario(nullptr) {}
_ZN4curl6fuzzer5proto8Scenario10descriptorEv:
 3198|      1|  static const ::google::protobuf::Descriptor* descriptor() {
 3199|      1|    return GetDescriptor();
 3200|      1|  }
_ZN4curl6fuzzer5proto8Scenario13GetDescriptorEv:
 3201|      1|  static const ::google::protobuf::Descriptor* GetDescriptor() {
 3202|      1|    return default_instance().GetMetadata().descriptor;
 3203|      1|  }
_ZN4curl6fuzzer5proto8Scenario16default_instanceEv:
 3207|  3.73k|  static const Scenario& default_instance() {
 3208|  3.73k|    return *internal_default_instance();
 3209|  3.73k|  }
_ZN4curl6fuzzer5proto8Scenario25internal_default_instanceEv:
 3210|  3.73k|  static inline const Scenario* internal_default_instance() {
 3211|  3.73k|    return reinterpret_cast<const Scenario*>(
 3212|  3.73k|        &_Scenario_default_instance_);
 3213|  3.73k|  }
_ZNK4curl6fuzzer5proto8Scenario6schemeEv:
 3538|  27.6k|inline ::curl::fuzzer::proto::Scheme Scenario::scheme() const {
 3539|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.Scenario.scheme)
 3540|  27.6k|  return _internal_scheme();
 3541|  27.6k|}
_ZN4curl6fuzzer5proto8Scenario10set_schemeENS1_6SchemeE:
 3542|  3.73k|inline void Scenario::set_scheme(::curl::fuzzer::proto::Scheme value) {
 3543|  3.73k|  _internal_set_scheme(value);
 3544|       |  // @@protoc_insertion_point(field_set:curl.fuzzer.proto.Scenario.scheme)
 3545|  3.73k|}
_ZNK4curl6fuzzer5proto8Scenario16_internal_schemeEv:
 3546|  27.6k|inline ::curl::fuzzer::proto::Scheme Scenario::_internal_scheme() const {
 3547|  27.6k|  ::google::protobuf::internal::TSanRead(&_impl_);
 3548|  27.6k|  return static_cast<::curl::fuzzer::proto::Scheme>(_impl_.scheme_);
 3549|  27.6k|}
_ZN4curl6fuzzer5proto8Scenario20_internal_set_schemeENS1_6SchemeE:
 3550|  3.73k|inline void Scenario::_internal_set_scheme(::curl::fuzzer::proto::Scheme value) {
 3551|  3.73k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 3552|  3.73k|  _impl_.scheme_ = value;
 3553|  3.73k|}
_ZNK4curl6fuzzer5proto8Scenario9host_pathEv:
 3561|  11.2k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3562|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.Scenario.host_path)
 3563|  11.2k|  return _internal_host_path();
 3564|  11.2k|}
_ZNK4curl6fuzzer5proto8Scenario19_internal_host_pathEv:
 3577|  11.2k|inline const std::string& Scenario::_internal_host_path() const {
 3578|  11.2k|  ::google::protobuf::internal::TSanRead(&_impl_);
 3579|  11.2k|  return _impl_.host_path_.Get();
 3580|  11.2k|}
_ZNK4curl6fuzzer5proto8Scenario22_internal_options_sizeEv:
 3604|  7.08k|inline int Scenario::_internal_options_size() const {
 3605|  7.08k|  return _internal_options().size();
 3606|  7.08k|}
_ZNK4curl6fuzzer5proto8Scenario12options_sizeEv:
 3607|  7.08k|inline int Scenario::options_size() const {
 3608|  7.08k|  return _internal_options_size();
 3609|  7.08k|}
_ZN4curl6fuzzer5proto8Scenario15mutable_optionsEv:
 3620|  14.9k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3621|       |  // @@protoc_insertion_point(field_mutable_list:curl.fuzzer.proto.Scenario.options)
 3622|  14.9k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 3623|  14.9k|  return _internal_mutable_options();
 3624|  14.9k|}
_ZNK4curl6fuzzer5proto8Scenario7optionsEi:
 3626|  22.5k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3627|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.Scenario.options)
 3628|  22.5k|  return _internal_options().Get(index);
 3629|  22.5k|}
_ZNK4curl6fuzzer5proto8Scenario17_internal_optionsEv:
 3642|  29.6k|Scenario::_internal_options() const {
 3643|  29.6k|  ::google::protobuf::internal::TSanRead(&_impl_);
 3644|  29.6k|  return _impl_.options_;
 3645|  29.6k|}
_ZN4curl6fuzzer5proto8Scenario25_internal_mutable_optionsEv:
 3647|  14.9k|Scenario::_internal_mutable_options() {
 3648|  14.9k|  ::google::protobuf::internal::TSanRead(&_impl_);
 3649|  14.9k|  return &_impl_.options_;
 3650|  14.9k|}
_ZNK4curl6fuzzer5proto8Scenario14has_connectionEv:
 3653|  3.73k|inline bool Scenario::has_connection() const {
 3654|  3.73k|  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
 3655|  3.73k|  PROTOBUF_ASSUME(!value || _impl_.connection_ != nullptr);
  ------------------
  |  |  944|  7.46k|  if (!(pred)) {                                                               \
  |  |  ------------------
  |  |  |  Branch (944:9): [True: 0, False: 3.73k]
  |  |  |  Branch (944:9): [True: 3.73k, False: 0]
  |  |  ------------------
  |  |  945|      0|    ::google::protobuf::internal::protobuf_assumption_failed(#pred, __FILE__, __LINE__); \
  |  |  946|      0|  }                                                                            \
  |  |  947|  7.46k|  __builtin_assume(pred)
  |  |  ------------------
  |  |  |  Branch (947:20): [True: 0, False: 3.73k]
  |  |  |  Branch (947:20): [True: 3.73k, False: 0]
  |  |  ------------------
  ------------------
 3656|  3.73k|  return value;
 3657|  3.73k|}
_ZNK4curl6fuzzer5proto8Scenario20_internal_connectionEv:
 3663|  7.46k|inline const ::curl::fuzzer::proto::Connection& Scenario::_internal_connection() const {
 3664|  7.46k|  ::google::protobuf::internal::TSanRead(&_impl_);
 3665|  7.46k|  const ::curl::fuzzer::proto::Connection* p = _impl_.connection_;
 3666|  7.46k|  return p != nullptr ? *p : reinterpret_cast<const ::curl::fuzzer::proto::Connection&>(::curl::fuzzer::proto::_Connection_default_instance_);
  ------------------
  |  Branch (3666:10): [True: 7.46k, False: 0]
  ------------------
 3667|  7.46k|}
_ZNK4curl6fuzzer5proto8Scenario10connectionEv:
 3668|  7.46k|inline const ::curl::fuzzer::proto::Connection& Scenario::connection() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3669|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.Scenario.connection)
 3670|  7.46k|  return _internal_connection();
 3671|  7.46k|}
_ZN4curl6fuzzer5proto8Scenario28_internal_mutable_connectionEv:
 3713|  7.46k|inline ::curl::fuzzer::proto::Connection* Scenario::_internal_mutable_connection() {
 3714|  7.46k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 3715|  7.46k|  if (_impl_.connection_ == nullptr) {
  ------------------
  |  Branch (3715:7): [True: 1, False: 7.46k]
  ------------------
 3716|      1|    auto* p = ::google::protobuf::Message::DefaultConstruct<::curl::fuzzer::proto::Connection>(GetArena());
 3717|      1|    _impl_.connection_ = reinterpret_cast<::curl::fuzzer::proto::Connection*>(p);
 3718|      1|  }
 3719|  7.46k|  return _impl_.connection_;
 3720|  7.46k|}
_ZN4curl6fuzzer5proto8Scenario18mutable_connectionEv:
 3721|  7.46k|inline ::curl::fuzzer::proto::Connection* Scenario::mutable_connection() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3722|  7.46k|  _impl_._has_bits_[0] |= 0x00000001u;
 3723|  7.46k|  ::curl::fuzzer::proto::Connection* _msg = _internal_mutable_connection();
 3724|       |  // @@protoc_insertion_point(field_mutable:curl.fuzzer.proto.Scenario.connection)
 3725|  7.46k|  return _msg;
 3726|  7.46k|}
_ZNK4curl6fuzzer5proto8Scenario15request_headersEv:
 3791|  3.73k|Scenario::request_headers() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3792|       |  // @@protoc_insertion_point(field_list:curl.fuzzer.proto.Scenario.request_headers)
 3793|  3.73k|  return _internal_request_headers();
 3794|  3.73k|}
_ZN4curl6fuzzer5proto8Scenario23mutable_request_headersEv:
 3796|  3.73k|Scenario::mutable_request_headers() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3797|       |  // @@protoc_insertion_point(field_mutable_list:curl.fuzzer.proto.Scenario.request_headers)
 3798|  3.73k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 3799|  3.73k|  return _internal_mutable_request_headers();
 3800|  3.73k|}
_ZNK4curl6fuzzer5proto8Scenario25_internal_request_headersEv:
 3802|  3.73k|Scenario::_internal_request_headers() const {
 3803|  3.73k|  ::google::protobuf::internal::TSanRead(&_impl_);
 3804|  3.73k|  return _impl_.request_headers_;
 3805|  3.73k|}
_ZN4curl6fuzzer5proto8Scenario33_internal_mutable_request_headersEv:
 3807|  3.73k|Scenario::_internal_mutable_request_headers() {
 3808|  3.73k|  ::google::protobuf::internal::TSanRead(&_impl_);
 3809|  3.73k|  return &_impl_.request_headers_;
 3810|  3.73k|}
_ZNK4curl6fuzzer5proto8Scenario13has_mime_postEv:
 3813|  7.46k|inline bool Scenario::has_mime_post() const {
 3814|  7.46k|  bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
 3815|  7.46k|  PROTOBUF_ASSUME(!value || _impl_.mime_post_ != nullptr);
  ------------------
  |  |  944|  8.74k|  if (!(pred)) {                                                               \
  |  |  ------------------
  |  |  |  Branch (944:9): [True: 6.19k, False: 1.27k]
  |  |  |  Branch (944:9): [True: 1.27k, False: 0]
  |  |  ------------------
  |  |  945|      0|    ::google::protobuf::internal::protobuf_assumption_failed(#pred, __FILE__, __LINE__); \
  |  |  946|      0|  }                                                                            \
  |  |  947|  8.74k|  __builtin_assume(pred)
  |  |  ------------------
  |  |  |  Branch (947:20): [True: 6.19k, False: 1.27k]
  |  |  |  Branch (947:20): [True: 1.27k, False: 0]
  |  |  ------------------
  ------------------
 3816|  7.46k|  return value;
 3817|  7.46k|}
_ZNK4curl6fuzzer5proto8Scenario19_internal_mime_postEv:
 3823|    638|inline const ::curl::fuzzer::proto::MimePost& Scenario::_internal_mime_post() const {
 3824|    638|  ::google::protobuf::internal::TSanRead(&_impl_);
 3825|    638|  const ::curl::fuzzer::proto::MimePost* p = _impl_.mime_post_;
 3826|    638|  return p != nullptr ? *p : reinterpret_cast<const ::curl::fuzzer::proto::MimePost&>(::curl::fuzzer::proto::_MimePost_default_instance_);
  ------------------
  |  Branch (3826:10): [True: 638, False: 0]
  ------------------
 3827|    638|}
_ZNK4curl6fuzzer5proto8Scenario9mime_postEv:
 3828|    638|inline const ::curl::fuzzer::proto::MimePost& Scenario::mime_post() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3829|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.Scenario.mime_post)
 3830|    638|  return _internal_mime_post();
 3831|    638|}
_ZN4curl6fuzzer5proto8Scenario27_internal_mutable_mime_postEv:
 3873|    638|inline ::curl::fuzzer::proto::MimePost* Scenario::_internal_mutable_mime_post() {
 3874|    638|  ::google::protobuf::internal::TSanWrite(&_impl_);
 3875|    638|  if (_impl_.mime_post_ == nullptr) {
  ------------------
  |  Branch (3875:7): [True: 0, False: 638]
  ------------------
 3876|      0|    auto* p = ::google::protobuf::Message::DefaultConstruct<::curl::fuzzer::proto::MimePost>(GetArena());
 3877|      0|    _impl_.mime_post_ = reinterpret_cast<::curl::fuzzer::proto::MimePost*>(p);
 3878|      0|  }
 3879|    638|  return _impl_.mime_post_;
 3880|    638|}
_ZN4curl6fuzzer5proto8Scenario17mutable_mime_postEv:
 3881|    638|inline ::curl::fuzzer::proto::MimePost* Scenario::mutable_mime_post() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3882|    638|  _impl_._has_bits_[0] |= 0x00000002u;
 3883|    638|  ::curl::fuzzer::proto::MimePost* _msg = _internal_mutable_mime_post();
 3884|       |  // @@protoc_insertion_point(field_mutable:curl.fuzzer.proto.Scenario.mime_post)
 3885|    638|  return _msg;
 3886|    638|}
_ZNK4curl6fuzzer5proto8Scenario37_internal_subsequent_connections_sizeEv:
 3909|  3.73k|inline int Scenario::_internal_subsequent_connections_size() const {
 3910|  3.73k|  return _internal_subsequent_connections().size();
 3911|  3.73k|}
_ZNK4curl6fuzzer5proto8Scenario27subsequent_connections_sizeEv:
 3912|  3.73k|inline int Scenario::subsequent_connections_size() const {
 3913|  3.73k|  return _internal_subsequent_connections_size();
 3914|  3.73k|}
_ZN4curl6fuzzer5proto8Scenario30mutable_subsequent_connectionsEv:
 3925|  11.2k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3926|       |  // @@protoc_insertion_point(field_mutable_list:curl.fuzzer.proto.Scenario.subsequent_connections)
 3927|  11.2k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 3928|  11.2k|  return _internal_mutable_subsequent_connections();
 3929|  11.2k|}
_ZNK4curl6fuzzer5proto8Scenario22subsequent_connectionsEi:
 3931|    338|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3932|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.Scenario.subsequent_connections)
 3933|    338|  return _internal_subsequent_connections().Get(index);
 3934|    338|}
_ZNK4curl6fuzzer5proto8Scenario32_internal_subsequent_connectionsEv:
 3947|  4.07k|Scenario::_internal_subsequent_connections() const {
 3948|  4.07k|  ::google::protobuf::internal::TSanRead(&_impl_);
 3949|  4.07k|  return _impl_.subsequent_connections_;
 3950|  4.07k|}
_ZN4curl6fuzzer5proto8Scenario40_internal_mutable_subsequent_connectionsEv:
 3952|  11.2k|Scenario::_internal_mutable_subsequent_connections() {
 3953|  11.2k|  ::google::protobuf::internal::TSanRead(&_impl_);
 3954|  11.2k|  return &_impl_.subsequent_connections_;
 3955|  11.2k|}
_ZNK4curl6fuzzer5proto8Scenario10has_uploadEv:
 3958|  14.9k|inline bool Scenario::has_upload() const {
 3959|  14.9k|  bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
 3960|  14.9k|  PROTOBUF_ASSUME(!value || _impl_.upload_ != nullptr);
  ------------------
  |  |  944|  16.4k|  if (!(pred)) {                                                               \
  |  |  ------------------
  |  |  |  Branch (944:9): [True: 13.4k, False: 1.52k]
  |  |  |  Branch (944:9): [True: 1.52k, False: 0]
  |  |  ------------------
  |  |  945|      0|    ::google::protobuf::internal::protobuf_assumption_failed(#pred, __FILE__, __LINE__); \
  |  |  946|      0|  }                                                                            \
  |  |  947|  16.4k|  __builtin_assume(pred)
  |  |  ------------------
  |  |  |  Branch (947:20): [True: 13.4k, False: 1.52k]
  |  |  |  Branch (947:20): [True: 1.52k, False: 0]
  |  |  ------------------
  ------------------
 3961|  14.9k|  return value;
 3962|  14.9k|}
_ZNK4curl6fuzzer5proto8Scenario16_internal_uploadEv:
 3968|    762|inline const ::curl::fuzzer::proto::UploadScript& Scenario::_internal_upload() const {
 3969|    762|  ::google::protobuf::internal::TSanRead(&_impl_);
 3970|    762|  const ::curl::fuzzer::proto::UploadScript* p = _impl_.upload_;
 3971|    762|  return p != nullptr ? *p : reinterpret_cast<const ::curl::fuzzer::proto::UploadScript&>(::curl::fuzzer::proto::_UploadScript_default_instance_);
  ------------------
  |  Branch (3971:10): [True: 762, False: 0]
  ------------------
 3972|    762|}
_ZNK4curl6fuzzer5proto8Scenario6uploadEv:
 3973|    762|inline const ::curl::fuzzer::proto::UploadScript& Scenario::upload() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3974|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.Scenario.upload)
 3975|    762|  return _internal_upload();
 3976|    762|}
_ZN4curl6fuzzer5proto8Scenario24_internal_mutable_uploadEv:
 4018|    381|inline ::curl::fuzzer::proto::UploadScript* Scenario::_internal_mutable_upload() {
 4019|    381|  ::google::protobuf::internal::TSanWrite(&_impl_);
 4020|    381|  if (_impl_.upload_ == nullptr) {
  ------------------
  |  Branch (4020:7): [True: 0, False: 381]
  ------------------
 4021|      0|    auto* p = ::google::protobuf::Message::DefaultConstruct<::curl::fuzzer::proto::UploadScript>(GetArena());
 4022|      0|    _impl_.upload_ = reinterpret_cast<::curl::fuzzer::proto::UploadScript*>(p);
 4023|      0|  }
 4024|    381|  return _impl_.upload_;
 4025|    381|}
_ZN4curl6fuzzer5proto8Scenario14mutable_uploadEv:
 4026|    381|inline ::curl::fuzzer::proto::UploadScript* Scenario::mutable_upload() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 4027|    381|  _impl_._has_bits_[0] |= 0x00000004u;
 4028|    381|  ::curl::fuzzer::proto::UploadScript* _msg = _internal_mutable_upload();
 4029|       |  // @@protoc_insertion_point(field_mutable:curl.fuzzer.proto.Scenario.upload)
 4030|    381|  return _msg;
 4031|    381|}
_ZN4curl6fuzzer5proto8Scenario20clear_telnet_optionsEv:
 4060|  3.73k|inline void Scenario::clear_telnet_options() {
 4061|  3.73k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 4062|  3.73k|  _impl_.telnet_options_.Clear();
 4063|  3.73k|}
_ZN4curl6fuzzer5proto8Scenario22mutable_telnet_optionsEv:
 4101|  3.73k|Scenario::mutable_telnet_options() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 4102|       |  // @@protoc_insertion_point(field_mutable_list:curl.fuzzer.proto.Scenario.telnet_options)
 4103|  3.73k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 4104|  3.73k|  return _internal_mutable_telnet_options();
 4105|  3.73k|}
_ZN4curl6fuzzer5proto8Scenario32_internal_mutable_telnet_optionsEv:
 4112|  3.73k|Scenario::_internal_mutable_telnet_options() {
 4113|  3.73k|  ::google::protobuf::internal::TSanRead(&_impl_);
 4114|  3.73k|  return &_impl_.telnet_options_;
 4115|  3.73k|}
_ZN4curl6fuzzer5proto8Scenario14clear_api_planEv:
 4123|  3.73k|inline void Scenario::clear_api_plan() {
 4124|  3.73k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 4125|  3.73k|  if (_impl_.api_plan_ != nullptr) _impl_.api_plan_->Clear();
  ------------------
  |  Branch (4125:7): [True: 0, False: 3.73k]
  ------------------
 4126|  3.73k|  _impl_._has_bits_[0] &= ~0x00000008u;
 4127|  3.73k|}
_ZNK4curl6fuzzer5proto12UploadScript4dataEv:
 4427|  1.14k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 4428|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.UploadScript.data)
 4429|  1.14k|  return _internal_data();
 4430|  1.14k|}
_ZNK4curl6fuzzer5proto12UploadScript14_internal_dataEv:
 4443|  1.14k|inline const std::string& UploadScript::_internal_data() const {
 4444|  1.14k|  ::google::protobuf::internal::TSanRead(&_impl_);
 4445|  1.14k|  return _impl_.data_.Get();
 4446|  1.14k|}
_ZNK4curl6fuzzer5proto12UploadScript25_internal_read_sizes_sizeEv:
 4470|  1.64k|inline int UploadScript::_internal_read_sizes_size() const {
 4471|  1.64k|  return _internal_read_sizes().size();
 4472|  1.64k|}
_ZNK4curl6fuzzer5proto12UploadScript15read_sizes_sizeEv:
 4473|  1.64k|inline int UploadScript::read_sizes_size() const {
 4474|  1.64k|  return _internal_read_sizes_size();
 4475|  1.64k|}
_ZNK4curl6fuzzer5proto12UploadScript10read_sizesEi:
 4480|    994|inline ::uint32_t UploadScript::read_sizes(int index) const {
 4481|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.UploadScript.read_sizes)
 4482|    994|  return _internal_read_sizes().Get(index);
 4483|    994|}
_ZNK4curl6fuzzer5proto12UploadScript20_internal_read_sizesEv:
 4505|  2.63k|UploadScript::_internal_read_sizes() const {
 4506|  2.63k|  ::google::protobuf::internal::TSanRead(&_impl_);
 4507|  2.63k|  return _impl_.read_sizes_;
 4508|  2.63k|}
_ZNK4curl6fuzzer5proto12UploadScript8terminalEv:
 4519|    762|inline ::curl::fuzzer::proto::UploadTerminal UploadScript::terminal() const {
 4520|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.UploadScript.terminal)
 4521|    762|  return _internal_terminal();
 4522|    762|}
_ZNK4curl6fuzzer5proto12UploadScript18_internal_terminalEv:
 4527|    762|inline ::curl::fuzzer::proto::UploadTerminal UploadScript::_internal_terminal() const {
 4528|    762|  ::google::protobuf::internal::TSanRead(&_impl_);
 4529|    762|  return static_cast<::curl::fuzzer::proto::UploadTerminal>(_impl_.terminal_);
 4530|    762|}
_ZNK4curl6fuzzer5proto12UploadScript11seek_resultEv:
 4541|    381|inline ::curl::fuzzer::proto::UploadSeekResult UploadScript::seek_result() const {
 4542|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.UploadScript.seek_result)
 4543|    381|  return _internal_seek_result();
 4544|    381|}
_ZNK4curl6fuzzer5proto12UploadScript21_internal_seek_resultEv:
 4549|    381|inline ::curl::fuzzer::proto::UploadSeekResult UploadScript::_internal_seek_result() const {
 4550|    381|  ::google::protobuf::internal::TSanRead(&_impl_);
 4551|    381|  return static_cast<::curl::fuzzer::proto::UploadSeekResult>(_impl_.seek_result_);
 4552|    381|}
_ZNK4curl6fuzzer5proto8MimePost20_internal_parts_sizeEv:
 4563|  2.83k|inline int MimePost::_internal_parts_size() const {
 4564|  2.83k|  return _internal_parts().size();
 4565|  2.83k|}
_ZNK4curl6fuzzer5proto8MimePost10parts_sizeEv:
 4566|  2.83k|inline int MimePost::parts_size() const {
 4567|  2.83k|  return _internal_parts_size();
 4568|  2.83k|}
_ZN4curl6fuzzer5proto8MimePost13mutable_partsEi:
 4574|  1.55k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 4575|       |  // @@protoc_insertion_point(field_mutable:curl.fuzzer.proto.MimePost.parts)
 4576|  1.55k|  return _internal_mutable_parts()->Mutable(index);
 4577|  1.55k|}
_ZN4curl6fuzzer5proto8MimePost13mutable_partsEv:
 4579|  1.27k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 4580|       |  // @@protoc_insertion_point(field_mutable_list:curl.fuzzer.proto.MimePost.parts)
 4581|  1.27k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 4582|  1.27k|  return _internal_mutable_parts();
 4583|  1.27k|}
_ZNK4curl6fuzzer5proto8MimePost5partsEi:
 4585|  1.55k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 4586|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.MimePost.parts)
 4587|  1.55k|  return _internal_parts().Get(index);
 4588|  1.55k|}
_ZNK4curl6fuzzer5proto8MimePost15_internal_partsEv:
 4601|  4.39k|MimePost::_internal_parts() const {
 4602|  4.39k|  ::google::protobuf::internal::TSanRead(&_impl_);
 4603|  4.39k|  return _impl_.parts_;
 4604|  4.39k|}
_ZN4curl6fuzzer5proto8MimePost23_internal_mutable_partsEv:
 4606|  2.83k|MimePost::_internal_mutable_parts() {
 4607|  2.83k|  ::google::protobuf::internal::TSanRead(&_impl_);
 4608|  2.83k|  return &_impl_.parts_;
 4609|  2.83k|}
_ZNK4curl6fuzzer5proto8MimePart4nameEv:
 4621|  2.07k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 4622|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.MimePart.name)
 4623|  2.07k|  return _internal_name();
 4624|  2.07k|}
_ZN4curl6fuzzer5proto8MimePart12mutable_nameEv:
 4632|  1.55k|inline std::string* MimePart::mutable_name() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 4633|  1.55k|  std::string* _s = _internal_mutable_name();
 4634|       |  // @@protoc_insertion_point(field_mutable:curl.fuzzer.proto.MimePart.name)
 4635|  1.55k|  return _s;
 4636|  1.55k|}
_ZNK4curl6fuzzer5proto8MimePart14_internal_nameEv:
 4637|  2.07k|inline const std::string& MimePart::_internal_name() const {
 4638|  2.07k|  ::google::protobuf::internal::TSanRead(&_impl_);
 4639|  2.07k|  return _impl_.name_.Get();
 4640|  2.07k|}
_ZN4curl6fuzzer5proto8MimePart22_internal_mutable_nameEv:
 4645|  1.55k|inline std::string* MimePart::_internal_mutable_name() {
 4646|  1.55k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 4647|  1.55k|  return _impl_.name_.Mutable( GetArena());
 4648|  1.55k|}
_ZNK4curl6fuzzer5proto8MimePart4dataEv:
 4678|    378|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 4679|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.MimePart.data)
 4680|    378|  return _internal_data();
 4681|    378|}
_ZNK4curl6fuzzer5proto8MimePart14_internal_dataEv:
 4700|    378|inline const std::string& MimePart::_internal_data() const {
 4701|    378|  ::google::protobuf::internal::TSanRead(&_impl_);
 4702|    378|  if (content_case() != kData) {
  ------------------
  |  Branch (4702:7): [True: 0, False: 378]
  ------------------
 4703|      0|    return ::google::protobuf::internal::GetEmptyStringAlreadyInited();
 4704|      0|  }
 4705|    378|  return _impl_.content_.data_.Get();
 4706|    378|}
_ZNK4curl6fuzzer5proto8MimePart18_internal_subpartsEv:
 4783|    772|inline const ::curl::fuzzer::proto::MimeSubparts& MimePart::_internal_subparts() const {
 4784|    772|  return content_case() == kSubparts ? *_impl_.content_.subparts_ : reinterpret_cast<::curl::fuzzer::proto::MimeSubparts&>(::curl::fuzzer::proto::_MimeSubparts_default_instance_);
  ------------------
  |  Branch (4784:10): [True: 772, False: 0]
  ------------------
 4785|    772|}
_ZNK4curl6fuzzer5proto8MimePart8subpartsEv:
 4786|    772|inline const ::curl::fuzzer::proto::MimeSubparts& MimePart::subparts() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 4787|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.MimePart.subparts)
 4788|    772|  return _internal_subparts();
 4789|    772|}
_ZN4curl6fuzzer5proto8MimePart26_internal_mutable_subpartsEv:
 4812|    772|inline ::curl::fuzzer::proto::MimeSubparts* MimePart::_internal_mutable_subparts() {
 4813|    772|  if (content_case() != kSubparts) {
  ------------------
  |  Branch (4813:7): [True: 0, False: 772]
  ------------------
 4814|      0|    clear_content();
 4815|      0|    set_has_subparts();
 4816|      0|    _impl_.content_.subparts_ =
 4817|      0|        ::google::protobuf::Message::DefaultConstruct<::curl::fuzzer::proto::MimeSubparts>(GetArena());
 4818|      0|  }
 4819|    772|  return _impl_.content_.subparts_;
 4820|    772|}
_ZN4curl6fuzzer5proto8MimePart16mutable_subpartsEv:
 4821|    772|inline ::curl::fuzzer::proto::MimeSubparts* MimePart::mutable_subparts() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 4822|    772|  ::curl::fuzzer::proto::MimeSubparts* _msg = _internal_mutable_subparts();
 4823|       |  // @@protoc_insertion_point(field_mutable:curl.fuzzer.proto.MimePart.subparts)
 4824|    772|  return _msg;
 4825|    772|}
_ZNK4curl6fuzzer5proto8MimePart8filenameEv:
 4833|  1.99k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 4834|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.MimePart.filename)
 4835|  1.99k|  return _internal_filename();
 4836|  1.99k|}
_ZN4curl6fuzzer5proto8MimePart16mutable_filenameEv:
 4844|  1.55k|inline std::string* MimePart::mutable_filename() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 4845|  1.55k|  std::string* _s = _internal_mutable_filename();
 4846|       |  // @@protoc_insertion_point(field_mutable:curl.fuzzer.proto.MimePart.filename)
 4847|  1.55k|  return _s;
 4848|  1.55k|}
_ZNK4curl6fuzzer5proto8MimePart18_internal_filenameEv:
 4849|  1.99k|inline const std::string& MimePart::_internal_filename() const {
 4850|  1.99k|  ::google::protobuf::internal::TSanRead(&_impl_);
 4851|  1.99k|  return _impl_.filename_.Get();
 4852|  1.99k|}
_ZN4curl6fuzzer5proto8MimePart26_internal_mutable_filenameEv:
 4857|  1.55k|inline std::string* MimePart::_internal_mutable_filename() {
 4858|  1.55k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 4859|  1.55k|  return _impl_.filename_.Mutable( GetArena());
 4860|  1.55k|}
_ZNK4curl6fuzzer5proto8MimePart12content_typeEv:
 4881|  2.02k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 4882|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.MimePart.content_type)
 4883|  2.02k|  return _internal_content_type();
 4884|  2.02k|}
_ZN4curl6fuzzer5proto8MimePart20mutable_content_typeEv:
 4892|  1.55k|inline std::string* MimePart::mutable_content_type() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 4893|  1.55k|  std::string* _s = _internal_mutable_content_type();
 4894|       |  // @@protoc_insertion_point(field_mutable:curl.fuzzer.proto.MimePart.content_type)
 4895|  1.55k|  return _s;
 4896|  1.55k|}
_ZNK4curl6fuzzer5proto8MimePart22_internal_content_typeEv:
 4897|  2.02k|inline const std::string& MimePart::_internal_content_type() const {
 4898|  2.02k|  ::google::protobuf::internal::TSanRead(&_impl_);
 4899|  2.02k|  return _impl_.content_type_.Get();
 4900|  2.02k|}
_ZN4curl6fuzzer5proto8MimePart30_internal_mutable_content_typeEv:
 4905|  1.55k|inline std::string* MimePart::_internal_mutable_content_type() {
 4906|  1.55k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 4907|  1.55k|  return _impl_.content_type_.Mutable( GetArena());
 4908|  1.55k|}
_ZNK4curl6fuzzer5proto8MimePart7encoderEv:
 4928|  1.55k|inline ::curl::fuzzer::proto::MimeEncoder MimePart::encoder() const {
 4929|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.MimePart.encoder)
 4930|  1.55k|  return _internal_encoder();
 4931|  1.55k|}
_ZNK4curl6fuzzer5proto8MimePart17_internal_encoderEv:
 4936|  1.55k|inline ::curl::fuzzer::proto::MimeEncoder MimePart::_internal_encoder() const {
 4937|  1.55k|  ::google::protobuf::internal::TSanRead(&_impl_);
 4938|  1.55k|  return static_cast<::curl::fuzzer::proto::MimeEncoder>(_impl_.encoder_);
 4939|  1.55k|}
_ZNK4curl6fuzzer5proto8MimePart7headersEv:
 4988|  1.55k|MimePart::headers() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 4989|       |  // @@protoc_insertion_point(field_list:curl.fuzzer.proto.MimePart.headers)
 4990|  1.55k|  return _internal_headers();
 4991|  1.55k|}
_ZN4curl6fuzzer5proto8MimePart15mutable_headersEv:
 4993|  1.55k|MimePart::mutable_headers() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 4994|       |  // @@protoc_insertion_point(field_mutable_list:curl.fuzzer.proto.MimePart.headers)
 4995|  1.55k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 4996|  1.55k|  return _internal_mutable_headers();
 4997|  1.55k|}
_ZNK4curl6fuzzer5proto8MimePart17_internal_headersEv:
 4999|  1.55k|MimePart::_internal_headers() const {
 5000|  1.55k|  ::google::protobuf::internal::TSanRead(&_impl_);
 5001|  1.55k|  return _impl_.headers_;
 5002|  1.55k|}
_ZN4curl6fuzzer5proto8MimePart25_internal_mutable_headersEv:
 5004|  1.55k|MimePart::_internal_mutable_headers() {
 5005|  1.55k|  ::google::protobuf::internal::TSanRead(&_impl_);
 5006|  1.55k|  return &_impl_.headers_;
 5007|  1.55k|}
_ZNK4curl6fuzzer5proto8MimePart11has_contentEv:
 5009|  1.55k|inline bool MimePart::has_content() const {
 5010|  1.55k|  return content_case() != CONTENT_NOT_SET;
 5011|  1.55k|}
_ZNK4curl6fuzzer5proto8MimePart12content_caseEv:
 5015|  8.93k|inline MimePart::ContentCase MimePart::content_case() const {
 5016|  8.93k|  return MimePart::ContentCase(_impl_._oneof_case_[0]);
 5017|  8.93k|}
_ZNK4curl6fuzzer5proto12MimeSubparts20_internal_parts_sizeEv:
 5023|    772|inline int MimeSubparts::_internal_parts_size() const {
 5024|    772|  return _internal_parts().size();
 5025|    772|}
_ZNK4curl6fuzzer5proto12MimeSubparts10parts_sizeEv:
 5026|    772|inline int MimeSubparts::parts_size() const {
 5027|    772|  return _internal_parts_size();
 5028|    772|}
_ZN4curl6fuzzer5proto12MimeSubparts13mutable_partsEv:
 5039|    772|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 5040|       |  // @@protoc_insertion_point(field_mutable_list:curl.fuzzer.proto.MimeSubparts.parts)
 5041|    772|  ::google::protobuf::internal::TSanWrite(&_impl_);
 5042|    772|  return _internal_mutable_parts();
 5043|    772|}
_ZNK4curl6fuzzer5proto12MimeSubparts5partsEi:
 5045|  1.80k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 5046|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.MimeSubparts.parts)
 5047|  1.80k|  return _internal_parts().Get(index);
 5048|  1.80k|}
_ZNK4curl6fuzzer5proto12MimeSubparts15_internal_partsEv:
 5061|  2.57k|MimeSubparts::_internal_parts() const {
 5062|  2.57k|  ::google::protobuf::internal::TSanRead(&_impl_);
 5063|  2.57k|  return _impl_.parts_;
 5064|  2.57k|}
_ZN4curl6fuzzer5proto12MimeSubparts23_internal_mutable_partsEv:
 5066|    772|MimeSubparts::_internal_mutable_parts() {
 5067|    772|  ::google::protobuf::internal::TSanRead(&_impl_);
 5068|    772|  return &_impl_.parts_;
 5069|    772|}
_ZNK4curl6fuzzer5proto12MimeDataPart4nameEv:
 5081|  2.48k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 5082|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.MimeDataPart.name)
 5083|  2.48k|  return _internal_name();
 5084|  2.48k|}
_ZN4curl6fuzzer5proto12MimeDataPart12mutable_nameEv:
 5092|  1.80k|inline std::string* MimeDataPart::mutable_name() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 5093|  1.80k|  std::string* _s = _internal_mutable_name();
 5094|       |  // @@protoc_insertion_point(field_mutable:curl.fuzzer.proto.MimeDataPart.name)
 5095|  1.80k|  return _s;
 5096|  1.80k|}
_ZNK4curl6fuzzer5proto12MimeDataPart14_internal_nameEv:
 5097|  2.48k|inline const std::string& MimeDataPart::_internal_name() const {
 5098|  2.48k|  ::google::protobuf::internal::TSanRead(&_impl_);
 5099|  2.48k|  return _impl_.name_.Get();
 5100|  2.48k|}
_ZN4curl6fuzzer5proto12MimeDataPart22_internal_mutable_nameEv:
 5105|  1.80k|inline std::string* MimeDataPart::_internal_mutable_name() {
 5106|  1.80k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 5107|  1.80k|  return _impl_.name_.Mutable( GetArena());
 5108|  1.80k|}
_ZNK4curl6fuzzer5proto12MimeDataPart4dataEv:
 5129|  3.60k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 5130|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.MimeDataPart.data)
 5131|  3.60k|  return _internal_data();
 5132|  3.60k|}
_ZNK4curl6fuzzer5proto12MimeDataPart14_internal_dataEv:
 5145|  3.60k|inline const std::string& MimeDataPart::_internal_data() const {
 5146|  3.60k|  ::google::protobuf::internal::TSanRead(&_impl_);
 5147|  3.60k|  return _impl_.data_.Get();
 5148|  3.60k|}
_ZNK4curl6fuzzer5proto12MimeDataPart8filenameEv:
 5177|  2.43k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 5178|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.MimeDataPart.filename)
 5179|  2.43k|  return _internal_filename();
 5180|  2.43k|}
_ZN4curl6fuzzer5proto12MimeDataPart16mutable_filenameEv:
 5188|  1.80k|inline std::string* MimeDataPart::mutable_filename() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 5189|  1.80k|  std::string* _s = _internal_mutable_filename();
 5190|       |  // @@protoc_insertion_point(field_mutable:curl.fuzzer.proto.MimeDataPart.filename)
 5191|  1.80k|  return _s;
 5192|  1.80k|}
_ZNK4curl6fuzzer5proto12MimeDataPart18_internal_filenameEv:
 5193|  2.43k|inline const std::string& MimeDataPart::_internal_filename() const {
 5194|  2.43k|  ::google::protobuf::internal::TSanRead(&_impl_);
 5195|  2.43k|  return _impl_.filename_.Get();
 5196|  2.43k|}
_ZN4curl6fuzzer5proto12MimeDataPart26_internal_mutable_filenameEv:
 5201|  1.80k|inline std::string* MimeDataPart::_internal_mutable_filename() {
 5202|  1.80k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 5203|  1.80k|  return _impl_.filename_.Mutable( GetArena());
 5204|  1.80k|}
_ZNK4curl6fuzzer5proto12MimeDataPart12content_typeEv:
 5225|  2.52k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 5226|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.MimeDataPart.content_type)
 5227|  2.52k|  return _internal_content_type();
 5228|  2.52k|}
_ZN4curl6fuzzer5proto12MimeDataPart20mutable_content_typeEv:
 5236|  1.80k|inline std::string* MimeDataPart::mutable_content_type() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 5237|  1.80k|  std::string* _s = _internal_mutable_content_type();
 5238|       |  // @@protoc_insertion_point(field_mutable:curl.fuzzer.proto.MimeDataPart.content_type)
 5239|  1.80k|  return _s;
 5240|  1.80k|}
_ZNK4curl6fuzzer5proto12MimeDataPart22_internal_content_typeEv:
 5241|  2.52k|inline const std::string& MimeDataPart::_internal_content_type() const {
 5242|  2.52k|  ::google::protobuf::internal::TSanRead(&_impl_);
 5243|  2.52k|  return _impl_.content_type_.Get();
 5244|  2.52k|}
_ZN4curl6fuzzer5proto12MimeDataPart30_internal_mutable_content_typeEv:
 5249|  1.80k|inline std::string* MimeDataPart::_internal_mutable_content_type() {
 5250|  1.80k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 5251|  1.80k|  return _impl_.content_type_.Mutable( GetArena());
 5252|  1.80k|}
_ZNK4curl6fuzzer5proto12MimeDataPart7encoderEv:
 5272|  1.80k|inline ::curl::fuzzer::proto::MimeEncoder MimeDataPart::encoder() const {
 5273|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.MimeDataPart.encoder)
 5274|  1.80k|  return _internal_encoder();
 5275|  1.80k|}
_ZNK4curl6fuzzer5proto12MimeDataPart17_internal_encoderEv:
 5280|  1.80k|inline ::curl::fuzzer::proto::MimeEncoder MimeDataPart::_internal_encoder() const {
 5281|  1.80k|  ::google::protobuf::internal::TSanRead(&_impl_);
 5282|  1.80k|  return static_cast<::curl::fuzzer::proto::MimeEncoder>(_impl_.encoder_);
 5283|  1.80k|}
_ZNK4curl6fuzzer5proto12MimeDataPart7headersEv:
 5332|  1.80k|MimeDataPart::headers() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 5333|       |  // @@protoc_insertion_point(field_list:curl.fuzzer.proto.MimeDataPart.headers)
 5334|  1.80k|  return _internal_headers();
 5335|  1.80k|}
_ZN4curl6fuzzer5proto12MimeDataPart15mutable_headersEv:
 5337|  1.80k|MimeDataPart::mutable_headers() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 5338|       |  // @@protoc_insertion_point(field_mutable_list:curl.fuzzer.proto.MimeDataPart.headers)
 5339|  1.80k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 5340|  1.80k|  return _internal_mutable_headers();
 5341|  1.80k|}
_ZNK4curl6fuzzer5proto12MimeDataPart17_internal_headersEv:
 5343|  1.80k|MimeDataPart::_internal_headers() const {
 5344|  1.80k|  ::google::protobuf::internal::TSanRead(&_impl_);
 5345|  1.80k|  return _impl_.headers_;
 5346|  1.80k|}
_ZN4curl6fuzzer5proto12MimeDataPart25_internal_mutable_headersEv:
 5348|  1.80k|MimeDataPart::_internal_mutable_headers() {
 5349|  1.80k|  ::google::protobuf::internal::TSanRead(&_impl_);
 5350|  1.80k|  return &_impl_.headers_;
 5351|  1.80k|}
_ZNK4curl6fuzzer5proto9SetOption9option_idEv:
 5362|  57.7k|inline ::curl::fuzzer::proto::CurlOptionId SetOption::option_id() const {
 5363|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.SetOption.option_id)
 5364|  57.7k|  return _internal_option_id();
 5365|  57.7k|}
_ZNK4curl6fuzzer5proto9SetOption19_internal_option_idEv:
 5370|  57.7k|inline ::curl::fuzzer::proto::CurlOptionId SetOption::_internal_option_id() const {
 5371|  57.7k|  ::google::protobuf::internal::TSanRead(&_impl_);
 5372|  57.7k|  return static_cast<::curl::fuzzer::proto::CurlOptionId>(_impl_.option_id_);
 5373|  57.7k|}
_ZNK4curl6fuzzer5proto9SetOption12string_valueEv:
 5394|  4.77k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 5395|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.SetOption.string_value)
 5396|  4.77k|  return _internal_string_value();
 5397|  4.77k|}
_ZN4curl6fuzzer5proto9SetOption20mutable_string_valueEv:
 5411|  4.82k|inline std::string* SetOption::mutable_string_value() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 5412|  4.82k|  std::string* _s = _internal_mutable_string_value();
 5413|       |  // @@protoc_insertion_point(field_mutable:curl.fuzzer.proto.SetOption.string_value)
 5414|  4.82k|  return _s;
 5415|  4.82k|}
_ZNK4curl6fuzzer5proto9SetOption22_internal_string_valueEv:
 5416|  4.77k|inline const std::string& SetOption::_internal_string_value() const {
 5417|  4.77k|  ::google::protobuf::internal::TSanRead(&_impl_);
 5418|  4.77k|  if (value_case() != kStringValue) {
  ------------------
  |  Branch (5418:7): [True: 0, False: 4.77k]
  ------------------
 5419|      0|    return ::google::protobuf::internal::GetEmptyStringAlreadyInited();
 5420|      0|  }
 5421|  4.77k|  return _impl_.value_.string_value_.Get();
 5422|  4.77k|}
_ZN4curl6fuzzer5proto9SetOption30_internal_mutable_string_valueEv:
 5433|  4.82k|inline std::string* SetOption::_internal_mutable_string_value() {
 5434|  4.82k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 5435|  4.82k|  if (value_case() != kStringValue) {
  ------------------
  |  Branch (5435:7): [True: 0, False: 4.82k]
  ------------------
 5436|      0|    clear_value();
 5437|       |
 5438|      0|    set_has_string_value();
 5439|      0|    _impl_.value_.string_value_.InitDefault();
 5440|      0|  }
 5441|  4.82k|  return _impl_.value_.string_value_.Mutable( GetArena());
 5442|  4.82k|}
_ZNK4curl6fuzzer5proto9SetOption10uint_valueEv:
 5478|  4.90k|inline ::uint64_t SetOption::uint_value() const {
 5479|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.SetOption.uint_value)
 5480|  4.90k|  return _internal_uint_value();
 5481|  4.90k|}
_ZNK4curl6fuzzer5proto9SetOption20_internal_uint_valueEv:
 5490|  4.90k|inline ::uint64_t SetOption::_internal_uint_value() const {
 5491|  4.90k|  if (value_case() == kUintValue) {
  ------------------
  |  Branch (5491:7): [True: 4.90k, False: 0]
  ------------------
 5492|  4.90k|    return _impl_.value_.uint_value_;
 5493|  4.90k|  }
 5494|      0|  return ::uint64_t{0u};
 5495|  4.90k|}
_ZNK4curl6fuzzer5proto9SetOption10bool_valueEv:
 5511|  2.43k|inline bool SetOption::bool_value() const {
 5512|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.SetOption.bool_value)
 5513|  2.43k|  return _internal_bool_value();
 5514|  2.43k|}
_ZNK4curl6fuzzer5proto9SetOption20_internal_bool_valueEv:
 5523|  2.43k|inline bool SetOption::_internal_bool_value() const {
 5524|  2.43k|  if (value_case() == kBoolValue) {
  ------------------
  |  Branch (5524:7): [True: 2.43k, False: 0]
  ------------------
 5525|  2.43k|    return _impl_.value_.bool_value_;
 5526|  2.43k|  }
 5527|      0|  return false;
 5528|  2.43k|}
_ZNK4curl6fuzzer5proto9SetOption9has_valueEv:
 5530|  12.7k|inline bool SetOption::has_value() const {
 5531|  12.7k|  return value_case() != VALUE_NOT_SET;
 5532|  12.7k|}
_ZNK4curl6fuzzer5proto9SetOption10value_caseEv:
 5536|  74.2k|inline SetOption::ValueCase SetOption::value_case() const {
 5537|  74.2k|  return SetOption::ValueCase(_impl_._oneof_case_[0]);
 5538|  74.2k|}
_ZNK4curl6fuzzer5proto10Connection16initial_responseEv:
 5549|  3.62k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 5550|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.Connection.initial_response)
 5551|  3.62k|  return _internal_initial_response();
 5552|  3.62k|}
_ZNK4curl6fuzzer5proto10Connection26_internal_initial_responseEv:
 5565|  3.62k|inline const std::string& Connection::_internal_initial_response() const {
 5566|  3.62k|  ::google::protobuf::internal::TSanRead(&_impl_);
 5567|  3.62k|  return _impl_.initial_response_.Get();
 5568|  3.62k|}
_ZNK4curl6fuzzer5proto10Connection26_internal_on_readable_sizeEv:
 5592|  8.14k|inline int Connection::_internal_on_readable_size() const {
 5593|  8.14k|  return _internal_on_readable().size();
 5594|  8.14k|}
_ZNK4curl6fuzzer5proto10Connection16on_readable_sizeEv:
 5595|  8.14k|inline int Connection::on_readable_size() const {
 5596|  8.14k|  return _internal_on_readable_size();
 5597|  8.14k|}
_ZNK4curl6fuzzer5proto10Connection11on_readableEi:
 5609|    513|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 5610|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.Connection.on_readable)
 5611|    513|  return _internal_on_readable().Get(index);
 5612|    513|}
_ZN4curl6fuzzer5proto10Connection19mutable_on_readableEv:
 5639|  4.07k|Connection::mutable_on_readable() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 5640|       |  // @@protoc_insertion_point(field_mutable_list:curl.fuzzer.proto.Connection.on_readable)
 5641|  4.07k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 5642|  4.07k|  return _internal_mutable_on_readable();
 5643|  4.07k|}
_ZNK4curl6fuzzer5proto10Connection21_internal_on_readableEv:
 5645|  8.65k|Connection::_internal_on_readable() const {
 5646|  8.65k|  ::google::protobuf::internal::TSanRead(&_impl_);
 5647|  8.65k|  return _impl_.on_readable_;
 5648|  8.65k|}
_ZN4curl6fuzzer5proto10Connection29_internal_mutable_on_readableEv:
 5650|  4.07k|Connection::_internal_mutable_on_readable() {
 5651|  4.07k|  ::google::protobuf::internal::TSanRead(&_impl_);
 5652|  4.07k|  return &_impl_.on_readable_;
 5653|  4.07k|}
_ZNK4curl6fuzzer5proto10Connection28_internal_server_frames_sizeEv:
 5656|  4.07k|inline int Connection::_internal_server_frames_size() const {
 5657|  4.07k|  return _internal_server_frames().size();
 5658|  4.07k|}
_ZNK4curl6fuzzer5proto10Connection18server_frames_sizeEv:
 5659|  4.07k|inline int Connection::server_frames_size() const {
 5660|  4.07k|  return _internal_server_frames_size();
 5661|  4.07k|}
_ZN4curl6fuzzer5proto10Connection21mutable_server_framesEv:
 5672|  4.07k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 5673|       |  // @@protoc_insertion_point(field_mutable_list:curl.fuzzer.proto.Connection.server_frames)
 5674|  4.07k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 5675|  4.07k|  return _internal_mutable_server_frames();
 5676|  4.07k|}
_ZNK4curl6fuzzer5proto10Connection13server_framesEi:
 5678|    289|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 5679|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.Connection.server_frames)
 5680|    289|  return _internal_server_frames().Get(index);
 5681|    289|}
_ZNK4curl6fuzzer5proto10Connection23_internal_server_framesEv:
 5694|  4.36k|Connection::_internal_server_frames() const {
 5695|  4.36k|  ::google::protobuf::internal::TSanRead(&_impl_);
 5696|  4.36k|  return _impl_.server_frames_;
 5697|  4.36k|}
_ZN4curl6fuzzer5proto10Connection31_internal_mutable_server_framesEv:
 5699|  4.07k|Connection::_internal_mutable_server_frames() {
 5700|  4.07k|  ::google::protobuf::internal::TSanRead(&_impl_);
 5701|  4.07k|  return &_impl_.server_frames_;
 5702|  4.07k|}
_ZN4curl6fuzzer5proto10Connection18clear_backpressureEv:
 5710|  4.07k|inline void Connection::clear_backpressure() {
 5711|  4.07k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 5712|  4.07k|  if (_impl_.backpressure_ != nullptr) _impl_.backpressure_->Clear();
  ------------------
  |  Branch (5712:7): [True: 0, False: 4.07k]
  ------------------
 5713|  4.07k|  _impl_._has_bits_[0] &= ~0x00000001u;
 5714|  4.07k|}
_ZNK4curl6fuzzer5proto10Connection22_internal_backpressureEv:
 5715|  11.4k|inline const ::curl::fuzzer::proto::BackpressureConfig& Connection::_internal_backpressure() const {
 5716|  11.4k|  ::google::protobuf::internal::TSanRead(&_impl_);
 5717|  11.4k|  const ::curl::fuzzer::proto::BackpressureConfig* p = _impl_.backpressure_;
 5718|  11.4k|  return p != nullptr ? *p : reinterpret_cast<const ::curl::fuzzer::proto::BackpressureConfig&>(::curl::fuzzer::proto::_BackpressureConfig_default_instance_);
  ------------------
  |  Branch (5718:10): [True: 0, False: 11.4k]
  ------------------
 5719|  11.4k|}
_ZNK4curl6fuzzer5proto10Connection12backpressureEv:
 5720|  11.4k|inline const ::curl::fuzzer::proto::BackpressureConfig& Connection::backpressure() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 5721|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.Connection.backpressure)
 5722|  11.4k|  return _internal_backpressure();
 5723|  11.4k|}
_ZNK4curl6fuzzer5proto18BackpressureConfig14recv_buf_bytesEv:
 5975|  11.4k|inline ::uint32_t BackpressureConfig::recv_buf_bytes() const {
 5976|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.BackpressureConfig.recv_buf_bytes)
 5977|  11.4k|  return _internal_recv_buf_bytes();
 5978|  11.4k|}
_ZNK4curl6fuzzer5proto18BackpressureConfig24_internal_recv_buf_bytesEv:
 5983|  11.4k|inline ::uint32_t BackpressureConfig::_internal_recv_buf_bytes() const {
 5984|  11.4k|  ::google::protobuf::internal::TSanRead(&_impl_);
 5985|  11.4k|  return _impl_.recv_buf_bytes_;
 5986|  11.4k|}
_ZNK4curl6fuzzer5proto18BackpressureConfig11drain_limitEv:
 5997|  11.4k|inline ::uint32_t BackpressureConfig::drain_limit() const {
 5998|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.BackpressureConfig.drain_limit)
 5999|  11.4k|  return _internal_drain_limit();
 6000|  11.4k|}
_ZNK4curl6fuzzer5proto18BackpressureConfig21_internal_drain_limitEv:
 6005|  11.4k|inline ::uint32_t BackpressureConfig::_internal_drain_limit() const {
 6006|  11.4k|  ::google::protobuf::internal::TSanRead(&_impl_);
 6007|  11.4k|  return _impl_.drain_limit_;
 6008|  11.4k|}
_ZNK4curl6fuzzer5proto14WebSocketFrame3finEv:
 6023|    289|inline bool WebSocketFrame::fin() const {
 6024|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.WebSocketFrame.fin)
 6025|    289|  return _internal_fin();
 6026|    289|}
_ZNK4curl6fuzzer5proto14WebSocketFrame13_internal_finEv:
 6031|    289|inline bool WebSocketFrame::_internal_fin() const {
 6032|    289|  ::google::protobuf::internal::TSanRead(&_impl_);
 6033|    289|  return _impl_.fin_;
 6034|    289|}
_ZNK4curl6fuzzer5proto14WebSocketFrame4rsv1Ev:
 6045|    289|inline bool WebSocketFrame::rsv1() const {
 6046|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.WebSocketFrame.rsv1)
 6047|    289|  return _internal_rsv1();
 6048|    289|}
_ZNK4curl6fuzzer5proto14WebSocketFrame14_internal_rsv1Ev:
 6053|    289|inline bool WebSocketFrame::_internal_rsv1() const {
 6054|    289|  ::google::protobuf::internal::TSanRead(&_impl_);
 6055|    289|  return _impl_.rsv1_;
 6056|    289|}
_ZNK4curl6fuzzer5proto14WebSocketFrame4rsv2Ev:
 6067|    289|inline bool WebSocketFrame::rsv2() const {
 6068|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.WebSocketFrame.rsv2)
 6069|    289|  return _internal_rsv2();
 6070|    289|}
_ZNK4curl6fuzzer5proto14WebSocketFrame14_internal_rsv2Ev:
 6075|    289|inline bool WebSocketFrame::_internal_rsv2() const {
 6076|    289|  ::google::protobuf::internal::TSanRead(&_impl_);
 6077|    289|  return _impl_.rsv2_;
 6078|    289|}
_ZNK4curl6fuzzer5proto14WebSocketFrame4rsv3Ev:
 6089|    289|inline bool WebSocketFrame::rsv3() const {
 6090|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.WebSocketFrame.rsv3)
 6091|    289|  return _internal_rsv3();
 6092|    289|}
_ZNK4curl6fuzzer5proto14WebSocketFrame14_internal_rsv3Ev:
 6097|    289|inline bool WebSocketFrame::_internal_rsv3() const {
 6098|    289|  ::google::protobuf::internal::TSanRead(&_impl_);
 6099|    289|  return _impl_.rsv3_;
 6100|    289|}
_ZNK4curl6fuzzer5proto14WebSocketFrame6opcodeEv:
 6111|    289|inline ::uint32_t WebSocketFrame::opcode() const {
 6112|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.WebSocketFrame.opcode)
 6113|    289|  return _internal_opcode();
 6114|    289|}
_ZNK4curl6fuzzer5proto14WebSocketFrame16_internal_opcodeEv:
 6119|    289|inline ::uint32_t WebSocketFrame::_internal_opcode() const {
 6120|    289|  ::google::protobuf::internal::TSanRead(&_impl_);
 6121|    289|  return _impl_.opcode_;
 6122|    289|}
_ZNK4curl6fuzzer5proto14WebSocketFrame6maskedEv:
 6133|    578|inline bool WebSocketFrame::masked() const {
 6134|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.WebSocketFrame.masked)
 6135|    578|  return _internal_masked();
 6136|    578|}
_ZNK4curl6fuzzer5proto14WebSocketFrame16_internal_maskedEv:
 6141|    578|inline bool WebSocketFrame::_internal_masked() const {
 6142|    578|  ::google::protobuf::internal::TSanRead(&_impl_);
 6143|    578|  return _impl_.masked_;
 6144|    578|}
_ZNK4curl6fuzzer5proto14WebSocketFrame8mask_keyEv:
 6155|     42|inline ::uint32_t WebSocketFrame::mask_key() const {
 6156|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.WebSocketFrame.mask_key)
 6157|     42|  return _internal_mask_key();
 6158|     42|}
_ZNK4curl6fuzzer5proto14WebSocketFrame18_internal_mask_keyEv:
 6163|     42|inline ::uint32_t WebSocketFrame::_internal_mask_key() const {
 6164|     42|  ::google::protobuf::internal::TSanRead(&_impl_);
 6165|     42|  return _impl_.mask_key_;
 6166|     42|}
_ZNK4curl6fuzzer5proto14WebSocketFrame7payloadEv:
 6178|    289|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 6179|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.WebSocketFrame.payload)
 6180|    289|  return _internal_payload();
 6181|    289|}
_ZNK4curl6fuzzer5proto14WebSocketFrame17_internal_payloadEv:
 6194|    289|inline const std::string& WebSocketFrame::_internal_payload() const {
 6195|    289|  ::google::protobuf::internal::TSanRead(&_impl_);
 6196|    289|  return _impl_.payload_.Get();
 6197|    289|}
_ZNK4curl6fuzzer5proto14WebSocketFrame11length_formEv:
 6225|    289|inline ::uint32_t WebSocketFrame::length_form() const {
 6226|       |  // @@protoc_insertion_point(field_get:curl.fuzzer.proto.WebSocketFrame.length_form)
 6227|    289|  return _internal_length_form();
 6228|    289|}
_ZNK4curl6fuzzer5proto14WebSocketFrame21_internal_length_formEv:
 6233|    289|inline ::uint32_t WebSocketFrame::_internal_length_form() const {
 6234|    289|  ::google::protobuf::internal::TSanRead(&_impl_);
 6235|    289|  return _impl_.length_form_;
 6236|    289|}
_ZN4curl6fuzzer5proto8Scenario13set_host_pathINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEJEEEvOT_DpT0_:
 3567|    798|                                                     Args_... args) {
 3568|    798|  ::google::protobuf::internal::TSanWrite(&_impl_);
 3569|    798|  _impl_.host_path_.SetBytes(static_cast<Arg_&&>(arg), args..., GetArena());
 3570|       |  // @@protoc_insertion_point(field_set:curl.fuzzer.proto.Scenario.host_path)
 3571|    798|}
_ZN4curl6fuzzer5proto8Scenario13set_host_pathIRA10_KcJEEEvOT_DpT0_:
 3567|  2.93k|                                                     Args_... args) {
 3568|  2.93k|  ::google::protobuf::internal::TSanWrite(&_impl_);
 3569|  2.93k|  _impl_.host_path_.SetBytes(static_cast<Arg_&&>(arg), args..., GetArena());
 3570|       |  // @@protoc_insertion_point(field_set:curl.fuzzer.proto.Scenario.host_path)
 3571|  2.93k|}

option_apply.cc:_ZN12proto_fuzzerL22LookupOptionDescriptorEN4curl6fuzzer5proto12CurlOptionIdE:
   87|  25.4k|    curl::fuzzer::proto::CurlOptionId id) {
   88|  25.4k|  switch (id) {
   89|    206|    case curl::fuzzer::proto::CURLOPT_CUSTOMREQUEST:
  ------------------
  |  Branch (89:5): [True: 206, False: 25.2k]
  ------------------
   90|    206|      return &kOptionManifest[0];
   91|    310|    case curl::fuzzer::proto::CURLOPT_HTTPGET:
  ------------------
  |  Branch (91:5): [True: 310, False: 25.1k]
  ------------------
   92|    310|      return &kOptionManifest[1];
   93|    418|    case curl::fuzzer::proto::CURLOPT_NOBODY:
  ------------------
  |  Branch (93:5): [True: 418, False: 25.0k]
  ------------------
   94|    418|      return &kOptionManifest[2];
   95|    308|    case curl::fuzzer::proto::CURLOPT_POST:
  ------------------
  |  Branch (95:5): [True: 308, False: 25.1k]
  ------------------
   96|    308|      return &kOptionManifest[3];
   97|    486|    case curl::fuzzer::proto::CURLOPT_POSTFIELDS:
  ------------------
  |  Branch (97:5): [True: 486, False: 25.0k]
  ------------------
   98|    486|      return &kOptionManifest[4];
   99|    682|    case curl::fuzzer::proto::CURLOPT_FOLLOWLOCATION:
  ------------------
  |  Branch (99:5): [True: 682, False: 24.8k]
  ------------------
  100|    682|      return &kOptionManifest[5];
  101|    944|    case curl::fuzzer::proto::CURLOPT_MAXREDIRS:
  ------------------
  |  Branch (101:5): [True: 944, False: 24.5k]
  ------------------
  102|    944|      return &kOptionManifest[6];
  103|    142|    case curl::fuzzer::proto::CURLOPT_USERAGENT:
  ------------------
  |  Branch (103:5): [True: 142, False: 25.3k]
  ------------------
  104|    142|      return &kOptionManifest[7];
  105|    386|    case curl::fuzzer::proto::CURLOPT_ACCEPT_ENCODING:
  ------------------
  |  Branch (105:5): [True: 386, False: 25.1k]
  ------------------
  106|    386|      return &kOptionManifest[8];
  107|    208|    case curl::fuzzer::proto::CURLOPT_HEADER:
  ------------------
  |  Branch (107:5): [True: 208, False: 25.2k]
  ------------------
  108|    208|      return &kOptionManifest[9];
  109|    232|    case curl::fuzzer::proto::CURLOPT_FAILONERROR:
  ------------------
  |  Branch (109:5): [True: 232, False: 25.2k]
  ------------------
  110|    232|      return &kOptionManifest[10];
  111|    708|    case curl::fuzzer::proto::CURLOPT_HTTP_VERSION:
  ------------------
  |  Branch (111:5): [True: 708, False: 24.7k]
  ------------------
  112|    708|      return &kOptionManifest[11];
  113|     66|    case curl::fuzzer::proto::CURLOPT_HTTP09_ALLOWED:
  ------------------
  |  Branch (113:5): [True: 66, False: 25.4k]
  ------------------
  114|     66|      return &kOptionManifest[12];
  115|    160|    case curl::fuzzer::proto::CURLOPT_AUTOREFERER:
  ------------------
  |  Branch (115:5): [True: 160, False: 25.3k]
  ------------------
  116|    160|      return &kOptionManifest[13];
  117|    100|    case curl::fuzzer::proto::CURLOPT_REFERER:
  ------------------
  |  Branch (117:5): [True: 100, False: 25.3k]
  ------------------
  118|    100|      return &kOptionManifest[14];
  119|    410|    case curl::fuzzer::proto::CURLOPT_CONNECT_ONLY:
  ------------------
  |  Branch (119:5): [True: 410, False: 25.0k]
  ------------------
  120|    410|      return &kOptionManifest[15];
  121|    120|    case curl::fuzzer::proto::CURLOPT_WS_OPTIONS:
  ------------------
  |  Branch (121:5): [True: 120, False: 25.3k]
  ------------------
  122|    120|      return &kOptionManifest[16];
  123|    274|    case curl::fuzzer::proto::CURLOPT_UPLOAD:
  ------------------
  |  Branch (123:5): [True: 274, False: 25.2k]
  ------------------
  124|    274|      return &kOptionManifest[17];
  125|    408|    case curl::fuzzer::proto::CURLOPT_INFILESIZE_LARGE:
  ------------------
  |  Branch (125:5): [True: 408, False: 25.0k]
  ------------------
  126|    408|      return &kOptionManifest[18];
  127|    210|    case curl::fuzzer::proto::CURLOPT_CRLF:
  ------------------
  |  Branch (127:5): [True: 210, False: 25.2k]
  ------------------
  128|    210|      return &kOptionManifest[19];
  129|    442|    case curl::fuzzer::proto::CURLOPT_SSL_VERIFYPEER:
  ------------------
  |  Branch (129:5): [True: 442, False: 25.0k]
  ------------------
  130|    442|      return &kOptionManifest[20];
  131|      0|    case curl::fuzzer::proto::CURLOPT_SSL_VERIFYHOST:
  ------------------
  |  Branch (131:5): [True: 0, False: 25.4k]
  ------------------
  132|      0|      return &kOptionManifest[21];
  133|     94|    case curl::fuzzer::proto::CURLOPT_CERTINFO:
  ------------------
  |  Branch (133:5): [True: 94, False: 25.3k]
  ------------------
  134|     94|      return &kOptionManifest[22];
  135|      0|    case curl::fuzzer::proto::CURLOPT_SSLVERSION:
  ------------------
  |  Branch (135:5): [True: 0, False: 25.4k]
  ------------------
  136|      0|      return &kOptionManifest[23];
  137|      0|    case curl::fuzzer::proto::CURLOPT_SSL_CIPHER_LIST:
  ------------------
  |  Branch (137:5): [True: 0, False: 25.4k]
  ------------------
  138|      0|      return &kOptionManifest[24];
  139|      0|    case curl::fuzzer::proto::CURLOPT_TLS13_CIPHERS:
  ------------------
  |  Branch (139:5): [True: 0, False: 25.4k]
  ------------------
  140|      0|      return &kOptionManifest[25];
  141|      0|    case curl::fuzzer::proto::CURLOPT_SSL_EC_CURVES:
  ------------------
  |  Branch (141:5): [True: 0, False: 25.4k]
  ------------------
  142|      0|      return &kOptionManifest[26];
  143|      0|    case curl::fuzzer::proto::CURLOPT_SSL_SIGNATURE_ALGORITHMS:
  ------------------
  |  Branch (143:5): [True: 0, False: 25.4k]
  ------------------
  144|      0|      return &kOptionManifest[27];
  145|      0|    case curl::fuzzer::proto::CURLOPT_SSL_SESSIONID_CACHE:
  ------------------
  |  Branch (145:5): [True: 0, False: 25.4k]
  ------------------
  146|      0|      return &kOptionManifest[28];
  147|      0|    case curl::fuzzer::proto::CURLOPT_SSL_ENABLE_ALPN:
  ------------------
  |  Branch (147:5): [True: 0, False: 25.4k]
  ------------------
  148|      0|      return &kOptionManifest[29];
  149|      0|    case curl::fuzzer::proto::CURLOPT_SSL_OPTIONS:
  ------------------
  |  Branch (149:5): [True: 0, False: 25.4k]
  ------------------
  150|      0|      return &kOptionManifest[30];
  151|      0|    case curl::fuzzer::proto::CURLOPT_PINNEDPUBLICKEY:
  ------------------
  |  Branch (151:5): [True: 0, False: 25.4k]
  ------------------
  152|      0|      return &kOptionManifest[31];
  153|    162|    case curl::fuzzer::proto::CURLOPT_COOKIE:
  ------------------
  |  Branch (153:5): [True: 162, False: 25.3k]
  ------------------
  154|    162|      return &kOptionManifest[32];
  155|  6.65k|    case curl::fuzzer::proto::CURLOPT_COOKIELIST:
  ------------------
  |  Branch (155:5): [True: 6.65k, False: 18.8k]
  ------------------
  156|  6.65k|      return &kOptionManifest[33];
  157|    318|    case curl::fuzzer::proto::CURLOPT_COOKIESESSION:
  ------------------
  |  Branch (157:5): [True: 318, False: 25.1k]
  ------------------
  158|    318|      return &kOptionManifest[34];
  159|    842|    case curl::fuzzer::proto::CURLOPT_HTTPAUTH:
  ------------------
  |  Branch (159:5): [True: 842, False: 24.6k]
  ------------------
  160|    842|      return &kOptionManifest[35];
  161|    404|    case curl::fuzzer::proto::CURLOPT_USERPWD:
  ------------------
  |  Branch (161:5): [True: 404, False: 25.0k]
  ------------------
  162|    404|      return &kOptionManifest[36];
  163|    124|    case curl::fuzzer::proto::CURLOPT_USERNAME:
  ------------------
  |  Branch (163:5): [True: 124, False: 25.3k]
  ------------------
  164|    124|      return &kOptionManifest[37];
  165|    268|    case curl::fuzzer::proto::CURLOPT_PASSWORD:
  ------------------
  |  Branch (165:5): [True: 268, False: 25.2k]
  ------------------
  166|    268|      return &kOptionManifest[38];
  167|    360|    case curl::fuzzer::proto::CURLOPT_UNRESTRICTED_AUTH:
  ------------------
  |  Branch (167:5): [True: 360, False: 25.1k]
  ------------------
  168|    360|      return &kOptionManifest[39];
  169|    156|    case curl::fuzzer::proto::CURLOPT_XOAUTH2_BEARER:
  ------------------
  |  Branch (169:5): [True: 156, False: 25.3k]
  ------------------
  170|    156|      return &kOptionManifest[40];
  171|    158|    case curl::fuzzer::proto::CURLOPT_AWS_SIGV4:
  ------------------
  |  Branch (171:5): [True: 158, False: 25.3k]
  ------------------
  172|    158|      return &kOptionManifest[41];
  173|    626|    case curl::fuzzer::proto::CURLOPT_TIMECONDITION:
  ------------------
  |  Branch (173:5): [True: 626, False: 24.8k]
  ------------------
  174|    626|      return &kOptionManifest[42];
  175|     68|    case curl::fuzzer::proto::CURLOPT_TIMEVALUE_LARGE:
  ------------------
  |  Branch (175:5): [True: 68, False: 25.4k]
  ------------------
  176|     68|      return &kOptionManifest[43];
  177|    594|    case curl::fuzzer::proto::CURLOPT_ALTSVC_CTRL:
  ------------------
  |  Branch (177:5): [True: 594, False: 24.8k]
  ------------------
  178|    594|      return &kOptionManifest[44];
  179|    116|    case curl::fuzzer::proto::CURLOPT_HSTS_CTRL:
  ------------------
  |  Branch (179:5): [True: 116, False: 25.3k]
  ------------------
  180|    116|      return &kOptionManifest[45];
  181|    134|    case curl::fuzzer::proto::CURLOPT_RANGE:
  ------------------
  |  Branch (181:5): [True: 134, False: 25.3k]
  ------------------
  182|    134|      return &kOptionManifest[46];
  183|    544|    case curl::fuzzer::proto::CURLOPT_RESUME_FROM_LARGE:
  ------------------
  |  Branch (183:5): [True: 544, False: 24.9k]
  ------------------
  184|    544|      return &kOptionManifest[47];
  185|    166|    case curl::fuzzer::proto::CURLOPT_FILETIME:
  ------------------
  |  Branch (185:5): [True: 166, False: 25.3k]
  ------------------
  186|    166|      return &kOptionManifest[48];
  187|    164|    case curl::fuzzer::proto::CURLOPT_REQUEST_TARGET:
  ------------------
  |  Branch (187:5): [True: 164, False: 25.3k]
  ------------------
  188|    164|      return &kOptionManifest[49];
  189|     90|    case curl::fuzzer::proto::CURLOPT_PATH_AS_IS:
  ------------------
  |  Branch (189:5): [True: 90, False: 25.3k]
  ------------------
  190|     90|      return &kOptionManifest[50];
  191|    468|    case curl::fuzzer::proto::CURLOPT_EXPECT_100_TIMEOUT_MS:
  ------------------
  |  Branch (191:5): [True: 468, False: 25.0k]
  ------------------
  192|    468|      return &kOptionManifest[51];
  193|    160|    case curl::fuzzer::proto::CURLOPT_KEEP_SENDING_ON_ERROR:
  ------------------
  |  Branch (193:5): [True: 160, False: 25.3k]
  ------------------
  194|    160|      return &kOptionManifest[52];
  195|    468|    case curl::fuzzer::proto::CURLOPT_POSTREDIR:
  ------------------
  |  Branch (195:5): [True: 468, False: 25.0k]
  ------------------
  196|    468|      return &kOptionManifest[53];
  197|     70|    case curl::fuzzer::proto::CURLOPT_TRANSFER_ENCODING:
  ------------------
  |  Branch (197:5): [True: 70, False: 25.4k]
  ------------------
  198|     70|      return &kOptionManifest[54];
  199|    110|    case curl::fuzzer::proto::CURLOPT_HTTP_TRANSFER_DECODING:
  ------------------
  |  Branch (199:5): [True: 110, False: 25.3k]
  ------------------
  200|    110|      return &kOptionManifest[55];
  201|     80|    case curl::fuzzer::proto::CURLOPT_HTTP_CONTENT_DECODING:
  ------------------
  |  Branch (201:5): [True: 80, False: 25.4k]
  ------------------
  202|     80|      return &kOptionManifest[56];
  203|    110|    case curl::fuzzer::proto::CURLOPT_IGNORE_CONTENT_LENGTH:
  ------------------
  |  Branch (203:5): [True: 110, False: 25.3k]
  ------------------
  204|    110|      return &kOptionManifest[57];
  205|     74|    case curl::fuzzer::proto::CURLOPT_DISALLOW_USERNAME_IN_URL:
  ------------------
  |  Branch (205:5): [True: 74, False: 25.4k]
  ------------------
  206|     74|      return &kOptionManifest[58];
  207|    360|    case curl::fuzzer::proto::CURLOPT_FRESH_CONNECT:
  ------------------
  |  Branch (207:5): [True: 360, False: 25.1k]
  ------------------
  208|    360|      return &kOptionManifest[59];
  209|    252|    case curl::fuzzer::proto::CURLOPT_FORBID_REUSE:
  ------------------
  |  Branch (209:5): [True: 252, False: 25.2k]
  ------------------
  210|    252|      return &kOptionManifest[60];
  211|    452|    case curl::fuzzer::proto::CURLOPT_MAXAGE_CONN:
  ------------------
  |  Branch (211:5): [True: 452, False: 25.0k]
  ------------------
  212|    452|      return &kOptionManifest[61];
  213|    600|    case curl::fuzzer::proto::CURLOPT_MAXLIFETIME_CONN:
  ------------------
  |  Branch (213:5): [True: 600, False: 24.8k]
  ------------------
  214|    600|      return &kOptionManifest[62];
  215|    636|    case curl::fuzzer::proto::CURLOPT_UPLOAD_BUFFERSIZE:
  ------------------
  |  Branch (215:5): [True: 636, False: 24.8k]
  ------------------
  216|    636|      return &kOptionManifest[63];
  217|     70|    case curl::fuzzer::proto::CURLOPT_MIME_OPTIONS:
  ------------------
  |  Branch (217:5): [True: 70, False: 25.4k]
  ------------------
  218|     70|      return &kOptionManifest[64];
  219|    376|    case curl::fuzzer::proto::CURLOPT_MAXFILESIZE_LARGE:
  ------------------
  |  Branch (219:5): [True: 376, False: 25.1k]
  ------------------
  220|    376|      return &kOptionManifest[65];
  221|    686|    case curl::fuzzer::proto::CURLOPT_BUFFERSIZE:
  ------------------
  |  Branch (221:5): [True: 686, False: 24.8k]
  ------------------
  222|    686|      return &kOptionManifest[66];
  223|      0|    case curl::fuzzer::proto::CURLOPT_DIRLISTONLY:
  ------------------
  |  Branch (223:5): [True: 0, False: 25.4k]
  ------------------
  224|      0|      return &kOptionManifest[67];
  225|      0|    case curl::fuzzer::proto::CURLOPT_APPEND:
  ------------------
  |  Branch (225:5): [True: 0, False: 25.4k]
  ------------------
  226|      0|      return &kOptionManifest[68];
  227|      0|    case curl::fuzzer::proto::CURLOPT_TRANSFERTEXT:
  ------------------
  |  Branch (227:5): [True: 0, False: 25.4k]
  ------------------
  228|      0|      return &kOptionManifest[69];
  229|      0|    case curl::fuzzer::proto::CURLOPT_FTP_USE_EPSV:
  ------------------
  |  Branch (229:5): [True: 0, False: 25.4k]
  ------------------
  230|      0|      return &kOptionManifest[70];
  231|      0|    case curl::fuzzer::proto::CURLOPT_FTP_CREATE_MISSING_DIRS:
  ------------------
  |  Branch (231:5): [True: 0, False: 25.4k]
  ------------------
  232|      0|      return &kOptionManifest[71];
  233|      0|    case curl::fuzzer::proto::CURLOPT_FTP_ACCOUNT:
  ------------------
  |  Branch (233:5): [True: 0, False: 25.4k]
  ------------------
  234|      0|      return &kOptionManifest[72];
  235|      0|    case curl::fuzzer::proto::CURLOPT_FTP_SKIP_PASV_IP:
  ------------------
  |  Branch (235:5): [True: 0, False: 25.4k]
  ------------------
  236|      0|      return &kOptionManifest[73];
  237|      0|    case curl::fuzzer::proto::CURLOPT_FTP_FILEMETHOD:
  ------------------
  |  Branch (237:5): [True: 0, False: 25.4k]
  ------------------
  238|      0|      return &kOptionManifest[74];
  239|      0|    case curl::fuzzer::proto::CURLOPT_FTP_ALTERNATIVE_TO_USER:
  ------------------
  |  Branch (239:5): [True: 0, False: 25.4k]
  ------------------
  240|      0|      return &kOptionManifest[75];
  241|      0|    case curl::fuzzer::proto::CURLOPT_FTP_USE_PRET:
  ------------------
  |  Branch (241:5): [True: 0, False: 25.4k]
  ------------------
  242|      0|      return &kOptionManifest[76];
  243|      0|    case curl::fuzzer::proto::CURLOPT_WILDCARDMATCH:
  ------------------
  |  Branch (243:5): [True: 0, False: 25.4k]
  ------------------
  244|      0|      return &kOptionManifest[77];
  245|      0|    case curl::fuzzer::proto::CURLOPT_TFTP_BLKSIZE:
  ------------------
  |  Branch (245:5): [True: 0, False: 25.4k]
  ------------------
  246|      0|      return &kOptionManifest[78];
  247|      0|    case curl::fuzzer::proto::CURLOPT_TFTP_NO_OPTIONS:
  ------------------
  |  Branch (247:5): [True: 0, False: 25.4k]
  ------------------
  248|      0|      return &kOptionManifest[79];
  249|  1.25k|    default:
  ------------------
  |  Branch (249:5): [True: 1.25k, False: 24.2k]
  ------------------
  250|  1.25k|      return nullptr;
  251|  25.4k|  }
  252|  25.4k|}

_ZN4absl12lts_2024011620PrefetchToLocalCacheEPKv:
  146|   484k|    const void* addr) {
  147|   484k|  __builtin_prefetch(addr, 0, 3);
  148|   484k|}

_ZN4absl12lts_2024011612log_internal12Check_EQImplIbbEEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERKT_RKT0_PKc:
  348|  3.58k|                                             const char* exprtext) {     \
  349|  3.58k|    using U1 = CheckOpStreamType<T1>;                                    \
  350|  3.58k|    using U2 = CheckOpStreamType<T2>;                                    \
  351|  3.58k|    return ABSL_PREDICT_TRUE(v1 op v2)                                   \
  ------------------
  |  |  179|  3.58k|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 3.58k, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 3.58k]
  |  |  |  Branch (179:57): [True: 3.58k, False: 0]
  |  |  ------------------
  ------------------
  352|  3.58k|               ? nullptr                                                 \
  353|  3.58k|               : ABSL_LOG_INTERNAL_CHECK_OP_IMPL_RESULT(U1, U2, v1, v2,  \
  ------------------
  |  |  338|      0|  MakeCheckOpString<U1, U2>(v1, v2, exprtext)
  ------------------
  354|  3.58k|                                                        exprtext);       \
  355|  3.58k|  }                                                                      \
_ZN4absl12lts_2024011612log_internal21GetReferenceableValueIbEERKT_S5_:
  386|  7.16k|inline constexpr const T& GetReferenceableValue(const T& t) {
  387|  7.16k|  return t;
  388|  7.16k|}
_ZN4absl12lts_2024011612log_internal12Check_GEImplEiiPKc:
  357|  95.6k|                                             const char* exprtext) {     \
  358|  95.6k|    return name##Impl<int, int>(v1, v2, exprtext);                       \
  359|  95.6k|  }
_ZN4absl12lts_2024011612log_internal12Check_GEImplIiiEEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERKT_RKT0_PKc:
  348|  95.6k|                                             const char* exprtext) {     \
  349|  95.6k|    using U1 = CheckOpStreamType<T1>;                                    \
  350|  95.6k|    using U2 = CheckOpStreamType<T2>;                                    \
  351|  95.6k|    return ABSL_PREDICT_TRUE(v1 op v2)                                   \
  ------------------
  |  |  179|  95.6k|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 95.6k, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 95.6k]
  |  |  |  Branch (179:57): [True: 95.6k, False: 0]
  |  |  ------------------
  ------------------
  352|  95.6k|               ? nullptr                                                 \
  353|  95.6k|               : ABSL_LOG_INTERNAL_CHECK_OP_IMPL_RESULT(U1, U2, v1, v2,  \
  ------------------
  |  |  338|      0|  MakeCheckOpString<U1, U2>(v1, v2, exprtext)
  ------------------
  354|  95.6k|                                                        exprtext);       \
  355|  95.6k|  }                                                                      \
_ZN4absl12lts_2024011612log_internal21GetReferenceableValueEi:
  399|   315k|inline constexpr int GetReferenceableValue(int t) { return t; }
_ZN4absl12lts_2024011612log_internal12Check_LTImplEiiPKc:
  357|  47.1k|                                             const char* exprtext) {     \
  358|  47.1k|    return name##Impl<int, int>(v1, v2, exprtext);                       \
  359|  47.1k|  }
_ZN4absl12lts_2024011612log_internal12Check_LTImplIiiEEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERKT_RKT0_PKc:
  348|  47.1k|                                             const char* exprtext) {     \
  349|  47.1k|    using U1 = CheckOpStreamType<T1>;                                    \
  350|  47.1k|    using U2 = CheckOpStreamType<T2>;                                    \
  351|  47.1k|    return ABSL_PREDICT_TRUE(v1 op v2)                                   \
  ------------------
  |  |  179|  47.1k|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 47.1k, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 47.1k]
  |  |  |  Branch (179:57): [True: 47.1k, False: 0]
  |  |  ------------------
  ------------------
  352|  47.1k|               ? nullptr                                                 \
  353|  47.1k|               : ABSL_LOG_INTERNAL_CHECK_OP_IMPL_RESULT(U1, U2, v1, v2,  \
  ------------------
  |  |  338|      0|  MakeCheckOpString<U1, U2>(v1, v2, exprtext)
  ------------------
  354|  47.1k|                                                        exprtext);       \
  355|  47.1k|  }                                                                      \
_ZN4absl12lts_2024011612log_internal12Check_GTImplEiiPKc:
  357|  1.18k|                                             const char* exprtext) {     \
  358|  1.18k|    return name##Impl<int, int>(v1, v2, exprtext);                       \
  359|  1.18k|  }
_ZN4absl12lts_2024011612log_internal12Check_GTImplIiiEEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERKT_RKT0_PKc:
  348|  1.18k|                                             const char* exprtext) {     \
  349|  1.18k|    using U1 = CheckOpStreamType<T1>;                                    \
  350|  1.18k|    using U2 = CheckOpStreamType<T2>;                                    \
  351|  1.18k|    return ABSL_PREDICT_TRUE(v1 op v2)                                   \
  ------------------
  |  |  179|  1.18k|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 1.18k, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 1.18k]
  |  |  |  Branch (179:57): [True: 1.18k, False: 0]
  |  |  ------------------
  ------------------
  352|  1.18k|               ? nullptr                                                 \
  353|  1.18k|               : ABSL_LOG_INTERNAL_CHECK_OP_IMPL_RESULT(U1, U2, v1, v2,  \
  ------------------
  |  |  338|      0|  MakeCheckOpString<U1, U2>(v1, v2, exprtext)
  ------------------
  354|  1.18k|                                                        exprtext);       \
  355|  1.18k|  }                                                                      \
_ZN4absl12lts_2024011612log_internal12Check_NEImplIPcDnEEPNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKT_RKT0_PKc:
  348|  1.22k|                                             const char* exprtext) {     \
  349|  1.22k|    using U1 = CheckOpStreamType<T1>;                                    \
  350|  1.22k|    using U2 = CheckOpStreamType<T2>;                                    \
  351|  1.22k|    return ABSL_PREDICT_TRUE(v1 op v2)                                   \
  ------------------
  |  |  179|  1.22k|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 1.22k, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 1.22k]
  |  |  |  Branch (179:57): [True: 1.22k, False: 0]
  |  |  ------------------
  ------------------
  352|  1.22k|               ? nullptr                                                 \
  353|  1.22k|               : ABSL_LOG_INTERNAL_CHECK_OP_IMPL_RESULT(U1, U2, v1, v2,  \
  ------------------
  |  |  338|      0|  MakeCheckOpString<U1, U2>(v1, v2, exprtext)
  ------------------
  354|  1.22k|                                                        exprtext);       \
  355|  1.22k|  }                                                                      \
_ZN4absl12lts_2024011612log_internal21GetReferenceableValueIPcEERKT_S6_:
  386|  1.22k|inline constexpr const T& GetReferenceableValue(const T& t) {
  387|  1.22k|  return t;
  388|  1.22k|}
_ZN4absl12lts_2024011612log_internal21GetReferenceableValueIDnEERKT_S5_:
  386|  1.31k|inline constexpr const T& GetReferenceableValue(const T& t) {
  387|  1.31k|  return t;
  388|  1.31k|}
_ZN4absl12lts_2024011612log_internal12Check_EQImplIiiEEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERKT_RKT0_PKc:
  348|  5.15k|                                             const char* exprtext) {     \
  349|  5.15k|    using U1 = CheckOpStreamType<T1>;                                    \
  350|  5.15k|    using U2 = CheckOpStreamType<T2>;                                    \
  351|  5.15k|    return ABSL_PREDICT_TRUE(v1 op v2)                                   \
  ------------------
  |  |  179|  5.15k|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 5.15k, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 5.15k]
  |  |  |  Branch (179:57): [True: 5.15k, False: 0]
  |  |  ------------------
  ------------------
  352|  5.15k|               ? nullptr                                                 \
  353|  5.15k|               : ABSL_LOG_INTERNAL_CHECK_OP_IMPL_RESULT(U1, U2, v1, v2,  \
  ------------------
  |  |  338|      0|  MakeCheckOpString<U1, U2>(v1, v2, exprtext)
  ------------------
  354|  5.15k|                                                        exprtext);       \
  355|  5.15k|  }                                                                      \
_ZN4absl12lts_2024011612log_internal12Check_LEImplIiiEEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERKT_RKT0_PKc:
  348|  8.47k|                                             const char* exprtext) {     \
  349|  8.47k|    using U1 = CheckOpStreamType<T1>;                                    \
  350|  8.47k|    using U2 = CheckOpStreamType<T2>;                                    \
  351|  8.47k|    return ABSL_PREDICT_TRUE(v1 op v2)                                   \
  ------------------
  |  |  179|  8.47k|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 8.47k, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 8.47k]
  |  |  |  Branch (179:57): [True: 8.47k, False: 0]
  |  |  ------------------
  ------------------
  352|  8.47k|               ? nullptr                                                 \
  353|  8.47k|               : ABSL_LOG_INTERNAL_CHECK_OP_IMPL_RESULT(U1, U2, v1, v2,  \
  ------------------
  |  |  338|      0|  MakeCheckOpString<U1, U2>(v1, v2, exprtext)
  ------------------
  354|  8.47k|                                                        exprtext);       \
  355|  8.47k|  }                                                                      \
_ZN4absl12lts_2024011612log_internal12Check_EQImplEiiPKc:
  357|  5.15k|                                             const char* exprtext) {     \
  358|  5.15k|    return name##Impl<int, int>(v1, v2, exprtext);                       \
  359|  5.15k|  }
_ZN4absl12lts_2024011612log_internal12Check_LEImplEiiPKc:
  357|  8.47k|                                             const char* exprtext) {     \
  358|  8.47k|    return name##Impl<int, int>(v1, v2, exprtext);                       \
  359|  8.47k|  }
_ZN4absl12lts_2024011612log_internal21GetReferenceableValueEm:
  405|  1.90k|    unsigned long t) {                                             // NOLINT
  406|  1.90k|  return t;
  407|  1.90k|}
_ZN4absl12lts_2024011612log_internal12Check_LEImplImmEEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERKT_RKT0_PKc:
  348|    859|                                             const char* exprtext) {     \
  349|    859|    using U1 = CheckOpStreamType<T1>;                                    \
  350|    859|    using U2 = CheckOpStreamType<T2>;                                    \
  351|    859|    return ABSL_PREDICT_TRUE(v1 op v2)                                   \
  ------------------
  |  |  179|    859|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 859, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 859]
  |  |  |  Branch (179:57): [True: 859, False: 0]
  |  |  ------------------
  ------------------
  352|    859|               ? nullptr                                                 \
  353|    859|               : ABSL_LOG_INTERNAL_CHECK_OP_IMPL_RESULT(U1, U2, v1, v2,  \
  ------------------
  |  |  338|      0|  MakeCheckOpString<U1, U2>(v1, v2, exprtext)
  ------------------
  354|    859|                                                        exprtext);       \
  355|    859|  }                                                                      \
_ZN4absl12lts_2024011612log_internal12Check_EQImplImmEEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERKT_RKT0_PKc:
  348|     94|                                             const char* exprtext) {     \
  349|     94|    using U1 = CheckOpStreamType<T1>;                                    \
  350|     94|    using U2 = CheckOpStreamType<T2>;                                    \
  351|     94|    return ABSL_PREDICT_TRUE(v1 op v2)                                   \
  ------------------
  |  |  179|     94|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 94, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 94]
  |  |  |  Branch (179:57): [True: 94, False: 0]
  |  |  ------------------
  ------------------
  352|     94|               ? nullptr                                                 \
  353|     94|               : ABSL_LOG_INTERNAL_CHECK_OP_IMPL_RESULT(U1, U2, v1, v2,  \
  ------------------
  |  |  338|      0|  MakeCheckOpString<U1, U2>(v1, v2, exprtext)
  ------------------
  354|     94|                                                        exprtext);       \
  355|     94|  }                                                                      \
_ZN4absl12lts_2024011612log_internal21GetReferenceableValueIPvEERKT_S6_:
  386|     94|inline constexpr const T& GetReferenceableValue(const T& t) {
  387|     94|  return t;
  388|     94|}
_ZN4absl12lts_2024011612log_internal12Check_NEImplIPvDnEEPNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKT_RKT0_PKc:
  348|     94|                                             const char* exprtext) {     \
  349|     94|    using U1 = CheckOpStreamType<T1>;                                    \
  350|     94|    using U2 = CheckOpStreamType<T2>;                                    \
  351|     94|    return ABSL_PREDICT_TRUE(v1 op v2)                                   \
  ------------------
  |  |  179|     94|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 94, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 94]
  |  |  |  Branch (179:57): [True: 94, False: 0]
  |  |  ------------------
  ------------------
  352|     94|               ? nullptr                                                 \
  353|     94|               : ABSL_LOG_INTERNAL_CHECK_OP_IMPL_RESULT(U1, U2, v1, v2,  \
  ------------------
  |  |  338|      0|  MakeCheckOpString<U1, U2>(v1, v2, exprtext)
  ------------------
  354|     94|                                                        exprtext);       \
  355|     94|  }                                                                      \

_ZN4absl12lts_2024011611countl_zeroImEENSt3__19enable_ifIXsr3std11is_unsignedIT_EE5valueEiE4typeES4_:
  103|  1.94k|    countl_zero(T x) noexcept {
  104|  1.94k|  return numeric_internal::CountLeadingZeroes(x);
  105|  1.94k|}
_ZN4absl12lts_202401169bit_widthImEENSt3__19enable_ifIXsr3std11is_unsignedIT_EE5valueEiE4typeES4_:
  160|    208|    bit_width(T x) noexcept {
  161|    208|  return std::numeric_limits<T>::digits - countl_zero(x);
  162|    208|}
_ZN4absl12lts_2024011611countl_zeroIjEENSt3__19enable_ifIXsr3std11is_unsignedIT_EE5valueEiE4typeES4_:
  103|  1.00k|    countl_zero(T x) noexcept {
  104|  1.00k|  return numeric_internal::CountLeadingZeroes(x);
  105|  1.00k|}

_ZN4absl12lts_2024011616numeric_internal20CountLeadingZeroes32Ej:
  133|  1.00k|CountLeadingZeroes32(uint32_t x) {
  134|  1.00k|#if ABSL_NUMERIC_INTERNAL_HAVE_BUILTIN_OR_GCC(__builtin_clz)
  135|       |  // Use __builtin_clz, which uses the following instructions:
  136|       |  //  x86: bsr, lzcnt
  137|       |  //  ARM64: clz
  138|       |  //  PPC: cntlzd
  139|       |
  140|  1.00k|  static_assert(sizeof(unsigned int) == sizeof(x),
  141|  1.00k|                "__builtin_clz does not take 32-bit arg");
  142|       |  // Handle 0 as a special case because __builtin_clz(0) is undefined.
  143|  1.00k|  return x == 0 ? 32 : __builtin_clz(x);
  ------------------
  |  Branch (143:10): [True: 0, False: 1.00k]
  ------------------
  144|       |#elif defined(_MSC_VER) && !defined(__clang__)
  145|       |  unsigned long result = 0;  // NOLINT(runtime/int)
  146|       |  if (_BitScanReverse(&result, x)) {
  147|       |    return 31 - result;
  148|       |  }
  149|       |  return 32;
  150|       |#else
  151|       |  int zeroes = 28;
  152|       |  if (x >> 16) {
  153|       |    zeroes -= 16;
  154|       |    x >>= 16;
  155|       |  }
  156|       |  if (x >> 8) {
  157|       |    zeroes -= 8;
  158|       |    x >>= 8;
  159|       |  }
  160|       |  if (x >> 4) {
  161|       |    zeroes -= 4;
  162|       |    x >>= 4;
  163|       |  }
  164|       |  return "\4\3\2\2\1\1\1\1\0\0\0\0\0\0\0"[x] + zeroes;
  165|       |#endif
  166|  1.00k|}
_ZN4absl12lts_2024011616numeric_internal20CountLeadingZeroes64Em:
  180|  1.94k|CountLeadingZeroes64(uint64_t x) {
  181|  1.94k|#if ABSL_NUMERIC_INTERNAL_HAVE_BUILTIN_OR_GCC(__builtin_clzll)
  182|       |  // Use __builtin_clzll, which uses the following instructions:
  183|       |  //  x86: bsr, lzcnt
  184|       |  //  ARM64: clz
  185|       |  //  PPC: cntlzd
  186|  1.94k|  static_assert(sizeof(unsigned long long) == sizeof(x),  // NOLINT(runtime/int)
  187|  1.94k|                "__builtin_clzll does not take 64-bit arg");
  188|       |
  189|       |  // Handle 0 as a special case because __builtin_clzll(0) is undefined.
  190|  1.94k|  return x == 0 ? 64 : __builtin_clzll(x);
  ------------------
  |  Branch (190:10): [True: 0, False: 1.94k]
  ------------------
  191|       |#elif defined(_MSC_VER) && !defined(__clang__) && \
  192|       |    (defined(_M_X64) || defined(_M_ARM64))
  193|       |  // MSVC does not have __buitin_clzll. Use _BitScanReverse64.
  194|       |  unsigned long result = 0;  // NOLINT(runtime/int)
  195|       |  if (_BitScanReverse64(&result, x)) {
  196|       |    return 63 - result;
  197|       |  }
  198|       |  return 64;
  199|       |#elif defined(_MSC_VER) && !defined(__clang__)
  200|       |  // MSVC does not have __buitin_clzll. Compose two calls to _BitScanReverse
  201|       |  unsigned long result = 0;  // NOLINT(runtime/int)
  202|       |  if ((x >> 32) &&
  203|       |      _BitScanReverse(&result, static_cast<unsigned long>(x >> 32))) {
  204|       |    return 31 - result;
  205|       |  }
  206|       |  if (_BitScanReverse(&result, static_cast<unsigned long>(x))) {
  207|       |    return 63 - result;
  208|       |  }
  209|       |  return 64;
  210|       |#else
  211|       |  int zeroes = 60;
  212|       |  if (x >> 32) {
  213|       |    zeroes -= 32;
  214|       |    x >>= 32;
  215|       |  }
  216|       |  if (x >> 16) {
  217|       |    zeroes -= 16;
  218|       |    x >>= 16;
  219|       |  }
  220|       |  if (x >> 8) {
  221|       |    zeroes -= 8;
  222|       |    x >>= 8;
  223|       |  }
  224|       |  if (x >> 4) {
  225|       |    zeroes -= 4;
  226|       |    x >>= 4;
  227|       |  }
  228|       |  return "\4\3\2\2\1\1\1\1\0\0\0\0\0\0\0"[x] + zeroes;
  229|       |#endif
  230|  1.94k|}
_ZN4absl12lts_2024011616numeric_internal18CountLeadingZeroesImEEiT_:
  234|  1.94k|CountLeadingZeroes(T x) {
  235|  1.94k|  static_assert(std::is_unsigned<T>::value, "T must be unsigned");
  236|  1.94k|  static_assert(IsPowerOf2(std::numeric_limits<T>::digits),
  237|  1.94k|                "T must have a power-of-2 size");
  238|  1.94k|  static_assert(sizeof(T) <= sizeof(uint64_t), "T too large");
  239|  1.94k|  return sizeof(T) <= sizeof(uint16_t)
  ------------------
  |  Branch (239:10): [Folded, False: 1.94k]
  ------------------
  240|  1.94k|             ? CountLeadingZeroes16(static_cast<uint16_t>(x)) -
  241|      0|                   (std::numeric_limits<uint16_t>::digits -
  242|      0|                    std::numeric_limits<T>::digits)
  243|  1.94k|             : (sizeof(T) <= sizeof(uint32_t)
  ------------------
  |  Branch (243:17): [Folded, False: 1.94k]
  ------------------
  244|  1.94k|                    ? CountLeadingZeroes32(static_cast<uint32_t>(x)) -
  245|      0|                          (std::numeric_limits<uint32_t>::digits -
  246|      0|                           std::numeric_limits<T>::digits)
  247|  1.94k|                    : CountLeadingZeroes64(x));
  248|  1.94k|}
_ZN4absl12lts_2024011616numeric_internal18CountLeadingZeroesIjEEiT_:
  234|  1.00k|CountLeadingZeroes(T x) {
  235|  1.00k|  static_assert(std::is_unsigned<T>::value, "T must be unsigned");
  236|  1.00k|  static_assert(IsPowerOf2(std::numeric_limits<T>::digits),
  237|  1.00k|                "T must have a power-of-2 size");
  238|  1.00k|  static_assert(sizeof(T) <= sizeof(uint64_t), "T too large");
  239|  1.00k|  return sizeof(T) <= sizeof(uint16_t)
  ------------------
  |  Branch (239:10): [Folded, False: 1.00k]
  ------------------
  240|  1.00k|             ? CountLeadingZeroes16(static_cast<uint16_t>(x)) -
  241|      0|                   (std::numeric_limits<uint16_t>::digits -
  242|      0|                    std::numeric_limits<T>::digits)
  243|  1.00k|             : (sizeof(T) <= sizeof(uint32_t)
  ------------------
  |  Branch (243:17): [True: 1.00k, Folded]
  ------------------
  244|  1.00k|                    ? CountLeadingZeroes32(static_cast<uint32_t>(x)) -
  245|  1.00k|                          (std::numeric_limits<uint32_t>::digits -
  246|  1.00k|                           std::numeric_limits<T>::digits)
  247|  1.00k|                    : CountLeadingZeroes64(x));
  248|  1.00k|}

_ZN4absl12lts_2024011611string_viewC2INSt3__19allocatorIcEEEERKNS3_12basic_stringIcNS3_11char_traitsIcEET_EE:
  192|  19.9k|      : string_view(str.data(), str.size(), SkipCheckLengthTag{}) {}
_ZN4absl12lts_2024011611string_viewC2EPKcmNS1_18SkipCheckLengthTagE:
  663|  19.9k|      : ptr_(data), length_(len) {}
_ZN4absl12lts_2024011611string_viewC2EPKc:
  200|  4.00k|      : ptr_(str), length_(str ? StrlenInternal(str) : 0) {}
  ------------------
  |  Branch (200:28): [True: 4.00k, False: 0]
  ------------------
_ZN4absl12lts_2024011611string_view14StrlenInternalEPKc:
  672|  4.00k|  static constexpr size_type StrlenInternal(absl::Nonnull<const char*> str) {
  673|       |#if defined(_MSC_VER) && _MSC_VER >= 1910 && !defined(__clang__)
  674|       |    // MSVC 2017+ can evaluate this at compile-time.
  675|       |    const char* begin = str;
  676|       |    while (*str != '\0') ++str;
  677|       |    return str - begin;
  678|       |#elif ABSL_HAVE_BUILTIN(__builtin_strlen) || \
  679|       |    (defined(__GNUC__) && !defined(__clang__))
  680|       |    // GCC has __builtin_strlen according to
  681|       |    // https://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Other-Builtins.html, but
  682|       |    // ABSL_HAVE_BUILTIN doesn't detect that, so we use the extra checks above.
  683|       |    // __builtin_strlen is constexpr.
  684|  4.00k|    return __builtin_strlen(str);
  685|       |#else
  686|       |    return str ? strlen(str) : 0;
  687|       |#endif
  688|  4.00k|  }

_ZN6google8protobuf3Any10descriptorEv:
  113|  53.7k|  static const ::google::protobuf::Descriptor* descriptor() {
  114|  53.7k|    return GetDescriptor();
  115|  53.7k|  }
_ZN6google8protobuf3Any13GetDescriptorEv:
  116|  53.7k|  static const ::google::protobuf::Descriptor* GetDescriptor() {
  117|  53.7k|    return default_instance().GetMetadata().descriptor;
  118|  53.7k|  }
_ZN6google8protobuf3Any16default_instanceEv:
  122|  53.7k|  static const Any& default_instance() {
  123|  53.7k|    return *internal_default_instance();
  124|  53.7k|  }
_ZN6google8protobuf3Any25internal_default_instanceEv:
  125|  53.7k|  static inline const Any* internal_default_instance() {
  126|  53.7k|    return reinterpret_cast<const Any*>(
  127|  53.7k|        &_Any_default_instance_);
  128|  53.7k|  }

_ZN6google8protobuf5Arena15AllocateAlignedEmm:
  264|    577|  void* AllocateAligned(size_t size, size_t align = 8) {
  265|    577|    if (align <= internal::ArenaAlignDefault::align) {
  ------------------
  |  Branch (265:9): [True: 577, False: 0]
  ------------------
  266|    577|      return Allocate(internal::ArenaAlignDefault::Ceil(size));
  267|    577|    } else {
  268|       |      // We are wasting space by over allocating align - 8 bytes. Compared
  269|       |      // to a dedicated function that takes current alignment in consideration.
  270|       |      // Such a scheme would only waste (align - 8)/2 bytes on average, but
  271|       |      // requires a dedicated function in the outline arena allocation
  272|       |      // functions. Possibly re-evaluate tradeoffs later.
  273|      0|      auto align_as = internal::ArenaAlignAs(align);
  274|      0|      return align_as.Ceil(Allocate(align_as.Padded(size)));
  275|      0|    }
  276|    577|  }
_ZN6google8protobuf5Arena17ReturnArrayMemoryEPvm:
  527|     60|  void ReturnArrayMemory(void* p, size_t size) {
  528|     60|    impl_.ReturnArrayMemory(p, size);
  529|     60|  }
_ZN6google8protobuf5Arena23AllocateAlignedForArrayEmm:
  634|    148|  void* AllocateAlignedForArray(size_t n, size_t align) {
  635|    148|    if (align <= internal::ArenaAlignDefault::align) {
  ------------------
  |  Branch (635:9): [True: 148, False: 0]
  ------------------
  636|    148|      return AllocateForArray(internal::ArenaAlignDefault::Ceil(n));
  637|    148|    } else {
  638|       |      // We are wasting space by over allocating align - 8 bytes. Compared
  639|       |      // to a dedicated function that takes current alignment in consideration.
  640|       |      // Such a scheme would only waste (align - 8)/2 bytes on average, but
  641|       |      // requires a dedicated function in the outline arena allocation
  642|       |      // functions. Possibly re-evaluate tradeoffs later.
  643|      0|      auto align_as = internal::ArenaAlignAs(align);
  644|      0|      return align_as.Ceil(AllocateForArray(align_as.Padded(n)));
  645|      0|    }
  646|    148|  }
_ZN6google8protobuf5Arena11CreateArrayIcEEPT_PS1_m:
  286|    148|                                               size_t num_elements) {
  287|    148|    static_assert(std::is_trivial<T>::value,
  288|    148|                  "CreateArray requires a trivially constructible type");
  289|    148|    static_assert(std::is_trivially_destructible<T>::value,
  290|    148|                  "CreateArray requires a trivially destructible type");
  291|    148|    ABSL_CHECK_LE(num_elements, std::numeric_limits<size_t>::max() / sizeof(T))
  ------------------
  |  |   54|      0|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   52|    148|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|    148|  while (                                                                      \
  |  |  |  |  |  |   62|    148|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 148]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|    148|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|    148|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|    148|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|    148|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|    148|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|    148|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|    148|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|    148|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  292|      0|        << "Requested size is too large to fit into size_t.";
  293|    148|    if (PROTOBUF_PREDICT_FALSE(arena == nullptr)) {
  ------------------
  |  |  365|    148|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 148]
  |  |  |  Branch (365:54): [Folded, False: 148]
  |  |  |  Branch (365:63): [True: 0, False: 148]
  |  |  ------------------
  ------------------
  294|      0|      return new T[num_elements];
  295|    148|    } else {
  296|       |      // We count on compiler to realize that if sizeof(T) is a multiple of
  297|       |      // 8 AlignUpTo can be elided.
  298|    148|      return static_cast<T*>(
  299|    148|          arena->AllocateAlignedForArray(sizeof(T) * num_elements, alignof(T)));
  300|    148|    }
  301|    148|  }
_ZN6google8protobuf5Arena16DefaultConstructIN4curl6fuzzer5proto10ConnectionEEEPvPS1_:
  684|      1|PROTOBUF_NOINLINE void* Arena::DefaultConstruct(Arena* arena) {
  685|      1|  static_assert(is_destructor_skippable<T>::value, "");
  686|      1|  void* mem = arena != nullptr ? arena->AllocateAligned(sizeof(T))
  ------------------
  |  Branch (686:15): [True: 0, False: 1]
  ------------------
  687|      1|                               : ::operator new(sizeof(T));
  688|      1|  return new (mem) T(arena);
  689|      1|}

_ZN6google8protobuf8internal17ArenaAlignDefault4CeilEm:
   79|    725|  static inline PROTOBUF_ALWAYS_INLINE constexpr size_t Ceil(size_t n) {
   80|    725|    return (n + align - 1) & ~(align - 1);
   81|    725|  }

_ZN6google8protobuf8internal15TaggedStringPtrC2EPNS1_21ExplicitlyConstructedINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEELm8EEE:
  111|  8.80k|      : ptr_(ptr) {}
_ZNK6google8protobuf8internal15TaggedStringPtr9IsDefaultEv:
  144|  11.2k|  inline bool IsDefault() const { return (as_int() & kMask) == kDefault; }
_ZNK6google8protobuf8internal15TaggedStringPtr3GetEv:
  167|  57.4k|  inline std::string* Get() const {
  168|  57.4k|    return reinterpret_cast<std::string*>(as_int() & ~kMask);
  169|  57.4k|  }
_ZNK6google8protobuf8internal15TaggedStringPtr6as_intEv:
  203|   126k|  uintptr_t as_int() const { return reinterpret_cast<uintptr_t>(ptr_); }
_ZN6google8protobuf8internal14ArenaStringPtrC2EPNS0_5ArenaE:
  242|  3.78k|      : tagged_ptr_(&fixed_address_empty_string) {
  243|  3.78k|    if (DebugHardenForceCopyDefaultString()) {
  ------------------
  |  Branch (243:9): [Folded, False: 3.78k]
  ------------------
  244|      0|      Set(absl::string_view(""), arena);
  245|      0|    }
  246|  3.78k|  }
_ZNK6google8protobuf8internal14ArenaStringPtr3GetEv:
  335|  45.5k|  PROTOBUF_NDEBUG_INLINE const std::string& Get() const {
  336|       |    // Unconditionally mask away the tag.
  337|  45.5k|    return *tagged_ptr_.Get();
  338|  45.5k|  }
_ZN6google8protobuf8internal14ArenaStringPtr11InitDefaultEv:
  451|  5.01k|inline void ArenaStringPtr::InitDefault() {
  452|  5.01k|  tagged_ptr_ = TaggedStringPtr(&fixed_address_empty_string);
  453|  5.01k|}
_ZN6google8protobuf8internal14ArenaStringPtr3SetEPKcPNS0_5ArenaE:
  468|  2.93k|inline void ArenaStringPtr::Set(const char* s, Arena* arena) {
  469|  2.93k|  Set(absl::string_view{s}, arena);
  470|  2.93k|}
_ZN6google8protobuf8internal14ArenaStringPtr8SetBytesEONSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS0_5ArenaE:
  489|    798|inline void ArenaStringPtr::SetBytes(std::string&& value, Arena* arena) {
  490|    798|  Set(std::move(value), arena);
  491|    798|}
_ZN6google8protobuf8internal14ArenaStringPtr8SetBytesEPKcPNS0_5ArenaE:
  493|  2.93k|inline void ArenaStringPtr::SetBytes(const char* s, Arena* arena) {
  494|  2.93k|  Set(s, arena);
  495|  2.93k|}

_ZNK6google8protobuf10Descriptor4fileEv:
 2510|    271|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf10Descriptor11field_countEv:
 2510|   341k|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf10Descriptor5fieldEi:
 2529|   285k|  inline TYPE CLASS::FIELD(int index) const {              \
 2530|   285k|    ABSL_DCHECK_LE(0, index);                              \
  ------------------
  |  |   78|   285k|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   90|   285k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|   285k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 285k]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|   285k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2531|   285k|    ABSL_DCHECK_LT(index, FIELD##_count());                \
  ------------------
  |  |   80|   285k|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|   285k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|   285k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 285k]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|   285k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2532|   285k|    return FIELD##s_ + index;                              \
 2533|   285k|  }
_ZNK6google8protobuf10Descriptor7optionsEv:
 2536|   202k|  inline const TYPE& CLASS::options() const { return *options_; }
_ZNK6google8protobuf15OneofDescriptor11field_countEv:
 2510|      9|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf14EnumDescriptor11value_countEv:
 2510|  1.09k|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf14EnumDescriptor5valueEi:
 2529|  1.16k|  inline TYPE CLASS::FIELD(int index) const {              \
 2530|  1.16k|    ABSL_DCHECK_LE(0, index);                              \
  ------------------
  |  |   78|  1.16k|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   90|  1.16k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  1.16k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 1.16k]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  1.16k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2531|  1.16k|    ABSL_DCHECK_LT(index, FIELD##_count());                \
  ------------------
  |  |   80|  1.16k|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|  1.16k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  1.16k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 1.16k]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  1.16k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2532|  1.16k|    return FIELD##s_ + index;                              \
 2533|  1.16k|  }
_ZNK6google8protobuf19EnumValueDescriptor4typeEv:
 2510|  2.15k|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf15FieldDescriptor16containing_oneofEv:
 2711|  14.6k|inline const OneofDescriptor* FieldDescriptor::containing_oneof() const {
 2712|  14.6k|  if (is_oneof_) {
  ------------------
  |  Branch (2712:7): [True: 13.9k, False: 689]
  ------------------
 2713|  13.9k|    auto* res = scope_.containing_oneof;
 2714|  13.9k|    PROTOBUF_ASSUME(res != nullptr);
  ------------------
  |  |  941|  13.9k|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  ------------------
 2715|  13.9k|    return res;
 2716|  13.9k|  }
 2717|    689|  return nullptr;
 2718|  14.6k|}
_ZNK6google8protobuf15FieldDescriptor4typeEv:
 2734|   489k|inline FieldDescriptor::Type FieldDescriptor::type() const {
 2735|   489k|  return static_cast<Type>(type_);
 2736|   489k|}
_ZNK6google8protobuf15FieldDescriptor11is_repeatedEv:
 2742|  75.1k|inline bool FieldDescriptor::is_repeated() const {
 2743|  75.1k|  ABSL_DCHECK_EQ(is_repeated_, label() == LABEL_REPEATED);
  ------------------
  |  |   74|  75.1k|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|  75.1k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  75.1k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 75.1k]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  75.1k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2744|  75.1k|  return is_repeated_;
 2745|  75.1k|}
_ZNK6google8protobuf19EnumValueDescriptor5indexEv:
 2813|    190|inline int EnumValueDescriptor::index() const {
 2814|    190|  return static_cast<int>(this - type_->values_);
 2815|    190|}
_ZNK6google8protobuf15FieldDescriptor8cpp_typeEv:
 2833|   357k|inline FieldDescriptor::CppType FieldDescriptor::cpp_type() const {
 2834|   357k|  return kTypeToCppTypeMap[type()];
 2835|   357k|}

_ZNK6google8protobuf14MessageOptions9map_entryEv:
17247|   202k|inline bool MessageOptions::map_entry() const {
17248|       |  // @@protoc_insertion_point(field_get:google.protobuf.MessageOptions.map_entry)
17249|   202k|  return _internal_map_entry();
17250|   202k|}
_ZNK6google8protobuf14MessageOptions19_internal_map_entryEv:
17256|   202k|inline bool MessageOptions::_internal_map_entry() const {
17257|   202k|  ::google::protobuf::internal::TSanRead(&_impl_);
17258|   202k|  return _impl_.map_entry_;
17259|   202k|}

_ZNK6google8protobuf8internal21ExplicitlyConstructedINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEELm8EE3getEv:
   49|     61|  constexpr const T& get() const { return reinterpret_cast<const T&>(union_); }

_ZNK6google8protobuf8internal7HasBitsILi1EEixEi:
   45|  35.6k|  PROTOBUF_NDEBUG_INLINE const uint32_t& operator[](int index) const {
   46|  35.6k|    return has_bits_[index];
   47|  35.6k|  }
_ZN6google8protobuf8internal7HasBitsILi1EEixEi:
   41|  25.5k|  PROTOBUF_NDEBUG_INLINE uint32_t& operator[](int index) {
   42|  25.5k|    return has_bits_[index];
   43|  25.5k|  }
_ZN6google8protobuf8internal7HasBitsILi1EEC2Ev:
   31|  4.02k|  PROTOBUF_NDEBUG_INLINE constexpr HasBits() : has_bits_{} {}
_ZN6google8protobuf8internal7HasBitsILi1EE5ClearEv:
   37|  7.49k|  PROTOBUF_NDEBUG_INLINE void Clear() {
   38|  7.49k|    memset(has_bits_, 0, sizeof(has_bits_));
   39|  7.49k|  }

_ZN6google8protobuf8internal18InternalVisibilityC2Ev:
   38|  4.80k|inline constexpr InternalVisibility::InternalVisibility() = default;

_ZN6google8protobuf2io19EpsCopyOutputStream11EnsureSpaceEPh:
  662|  2.48k|  PROTOBUF_NODISCARD uint8_t* EnsureSpace(uint8_t* ptr) {
  663|  2.48k|    if (PROTOBUF_PREDICT_FALSE(ptr >= end_)) {
  ------------------
  |  |  365|  2.48k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 2.48k]
  |  |  |  Branch (365:54): [Folded, False: 2.48k]
  |  |  |  Branch (365:63): [True: 0, False: 2.48k]
  |  |  ------------------
  ------------------
  664|      0|      return EnsureSpaceFallback(ptr);
  665|      0|    }
  666|  2.48k|    return ptr;
  667|  2.48k|  }
_ZN6google8protobuf2io19EpsCopyOutputStream23WriteStringMaybeAliasedEjRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPh:
  697|     29|                                   uint8_t* ptr) {
  698|     29|    std::ptrdiff_t size = s.size();
  699|     29|    if (PROTOBUF_PREDICT_FALSE(
  ------------------
  |  |  365|     57|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 1, False: 28]
  |  |  |  Branch (365:54): [Folded, False: 29]
  |  |  |  Branch (365:64): [True: 1, False: 28]
  |  |  |  Branch (365:64): [True: 0, False: 28]
  |  |  ------------------
  ------------------
  700|     29|            size >= 128 || end_ - ptr + 16 - TagSize(num << 3) - 1 < size)) {
  701|      1|      return WriteStringMaybeAliasedOutline(num, s, ptr);
  702|      1|    }
  703|     28|    ptr = UnsafeVarint((num << 3) | 2, ptr);
  704|     28|    *ptr++ = static_cast<uint8_t>(size);
  705|     28|    std::memcpy(ptr, s.data(), size);
  706|     28|    return ptr + size;
  707|     29|  }
_ZN6google8protobuf2io19EpsCopyOutputStream7TagSizeEj:
  843|     28|  static constexpr int TagSize(uint32_t tag) {
  844|     28|    return (tag < (1 << 7))    ? 1
  ------------------
  |  Branch (844:12): [True: 24, False: 4]
  ------------------
  845|     28|           : (tag < (1 << 14)) ? 2
  ------------------
  |  Branch (845:14): [True: 4, False: 0]
  ------------------
  846|      4|           : (tag < (1 << 21)) ? 3
  ------------------
  |  Branch (846:14): [True: 0, False: 0]
  ------------------
  847|      0|           : (tag < (1 << 28)) ? 4
  ------------------
  |  Branch (847:14): [True: 0, False: 0]
  ------------------
  848|      0|                               : 5;
  849|     28|  }
_ZN6google8protobuf2io19EpsCopyOutputStream8WriteTagEjjPh:
  852|      1|                                           uint8_t* ptr) {
  853|      1|    ABSL_DCHECK(ptr < end_);  // NOLINT
  ------------------
  |  |   47|      1|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|      1|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      2|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      1|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      2|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      2|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 1, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      1|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 1]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      1|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 1, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      2|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      2|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  854|      1|    return UnsafeVarint((num << 3) | wt, ptr);
  855|      1|  }
_ZN6google8protobuf2io19EpsCopyOutputStream16WriteLengthDelimEijPh:
  858|      1|                                                   uint8_t* ptr) {
  859|      1|    ptr = WriteTag(num, 2, ptr);
  860|      1|    return UnsafeWriteSize(size, ptr);
  861|      1|  }
_ZN6google8protobuf2io19EpsCopyOutputStream15UnsafeWriteSizeEjPh:
  911|      1|                                                         uint8_t* ptr) {
  912|      2|    while (PROTOBUF_PREDICT_FALSE(value >= 0x80)) {
  ------------------
  |  |  365|      2|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 1, False: 1]
  |  |  |  Branch (365:54): [Folded, False: 2]
  |  |  |  Branch (365:63): [True: 1, False: 1]
  |  |  ------------------
  ------------------
  913|      1|      *ptr = static_cast<uint8_t>(value | 0x80);
  914|      1|      value >>= 7;
  915|      1|      ++ptr;
  916|      1|    }
  917|      1|    *ptr++ = static_cast<uint8_t>(value);
  918|      1|    return ptr;
  919|      1|  }
_ZN6google8protobuf2io17CodedOutputStream20WriteVarint32ToArrayEjPh:
 1641|  3.23k|                                                        uint8_t* target) {
 1642|  3.23k|  return EpsCopyOutputStream::UnsafeVarint(value, target);
 1643|  3.23k|}
_ZN6google8protobuf2io17CodedOutputStream20WriteVarint64ToArrayEmPh:
 1646|  1.73k|                                                        uint8_t* target) {
 1647|  1.73k|  return EpsCopyOutputStream::UnsafeVarint(value, target);
 1648|  1.73k|}
_ZN6google8protobuf2io17CodedOutputStream32WriteVarint32SignExtendedToArrayEiPh:
 1655|  1.73k|    int32_t value, uint8_t* target) {
 1656|  1.73k|  return WriteVarint64ToArray(static_cast<uint64_t>(value), target);
 1657|  1.73k|}
_ZN6google8protobuf2io17CodedOutputStream15WriteTagToArrayEjPh:
 1716|  2.48k|                                                   uint8_t* target) {
 1717|  2.48k|  return WriteVarint32ToArray(value, target);
 1718|  2.48k|}
_ZN6google8protobuf2io17CodedOutputStream12VarintSize32Ej:
 1730|  1.00k|inline size_t CodedOutputStream::VarintSize32(uint32_t value) {
 1731|  1.00k|#if PROTOBUF_CODED_STREAM_H_PREFER_BSR
 1732|       |  // Explicit OR 0x1 to avoid calling absl::countl_zero(0), which
 1733|       |  // requires a branch to check for on platforms without a clz instruction.
 1734|  1.00k|  uint32_t log2value = (std::numeric_limits<uint32_t>::digits - 1) -
 1735|  1.00k|                       absl::countl_zero(value | 0x1);
 1736|  1.00k|  return static_cast<size_t>((log2value * 9 + (64 + 9)) / 64);
 1737|       |#else
 1738|       |  uint32_t clz = absl::countl_zero(value);
 1739|       |  return static_cast<size_t>(
 1740|       |      ((std::numeric_limits<uint32_t>::digits * 9 + 64) - (clz * 9)) / 64);
 1741|       |#endif
 1742|  1.00k|}
_ZN6google8protobuf2io17CodedOutputStream12VarintSize64Em:
 1757|  1.73k|inline size_t CodedOutputStream::VarintSize64(uint64_t value) {
 1758|  1.73k|#if PROTOBUF_CODED_STREAM_H_PREFER_BSR
 1759|       |  // Explicit OR 0x1 to avoid calling absl::countl_zero(0), which
 1760|       |  // requires a branch to check for on platforms without a clz instruction.
 1761|  1.73k|  uint32_t log2value = (std::numeric_limits<uint64_t>::digits - 1) -
 1762|  1.73k|                       absl::countl_zero(value | 0x1);
 1763|  1.73k|  return static_cast<size_t>((log2value * 9 + (64 + 9)) / 64);
 1764|       |#else
 1765|       |  uint32_t clz = absl::countl_zero(value);
 1766|       |  return static_cast<size_t>(
 1767|       |      ((std::numeric_limits<uint64_t>::digits * 9 + 64) - (clz * 9)) / 64);
 1768|       |#endif
 1769|  1.73k|}
_ZN6google8protobuf2io17CodedOutputStream24VarintSize32SignExtendedEi:
 1784|  1.73k|inline size_t CodedOutputStream::VarintSize32SignExtended(int32_t value) {
 1785|  1.73k|  return VarintSize64(static_cast<uint64_t>(int64_t{value}));
 1786|  1.73k|}
_ZN6google8protobuf2io19EpsCopyOutputStream12UnsafeVarintIjEEPhT_S4_:
  898|  3.26k|  PROTOBUF_ALWAYS_INLINE static uint8_t* UnsafeVarint(T value, uint8_t* ptr) {
  899|  3.26k|    static_assert(std::is_unsigned<T>::value,
  900|  3.26k|                  "Varint serialization must be unsigned");
  901|  3.56k|    while (PROTOBUF_PREDICT_FALSE(value >= 0x80)) {
  ------------------
  |  |  365|  3.56k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 302, False: 3.26k]
  |  |  |  Branch (365:54): [Folded, False: 3.56k]
  |  |  |  Branch (365:63): [True: 302, False: 3.26k]
  |  |  ------------------
  ------------------
  902|    302|      *ptr = static_cast<uint8_t>(value | 0x80);
  903|    302|      value >>= 7;
  904|    302|      ++ptr;
  905|    302|    }
  906|  3.26k|    *ptr++ = static_cast<uint8_t>(value);
  907|  3.26k|    return ptr;
  908|  3.26k|  }
_ZN6google8protobuf2io19EpsCopyOutputStream12UnsafeVarintImEEPhT_S4_:
  898|  1.73k|  PROTOBUF_ALWAYS_INLINE static uint8_t* UnsafeVarint(T value, uint8_t* ptr) {
  899|  1.73k|    static_assert(std::is_unsigned<T>::value,
  900|  1.73k|                  "Varint serialization must be unsigned");
  901|  1.76k|    while (PROTOBUF_PREDICT_FALSE(value >= 0x80)) {
  ------------------
  |  |  365|  1.76k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 28, False: 1.73k]
  |  |  |  Branch (365:54): [Folded, False: 1.76k]
  |  |  |  Branch (365:63): [True: 28, False: 1.73k]
  |  |  ------------------
  ------------------
  902|     28|      *ptr = static_cast<uint8_t>(value | 0x80);
  903|     28|      value >>= 7;
  904|     28|      ++ptr;
  905|     28|    }
  906|  1.73k|    *ptr++ = static_cast<uint8_t>(value);
  907|  1.73k|    return ptr;
  908|  1.73k|  }

_ZNK6google8protobuf7Message13GetDescriptorEv:
  363|   107k|  const Descriptor* GetDescriptor() const { return GetMetadata().descriptor; }
_ZNK6google8protobuf7Message13GetReflectionEv:
  369|  53.7k|  const Reflection* GetReflection() const { return GetMetadata().reflection; }

_ZN6google8protobuf8internal10CachedSizeC2Ei:
  173|  4.80k|  constexpr CachedSize(Scalar desired) noexcept : atom_(desired) {}
_ZNK6google8protobuf8internal10CachedSize3GetEv:
  178|    782|  Scalar Get() const noexcept {
  179|    782|    return __atomic_load_n(&atom_, __ATOMIC_RELAXED);
  180|    782|  }
_ZNK6google8protobuf8internal13ClassDataFull4baseEv:
  454|   228k|  constexpr const ClassData* base() const { return this; }
_ZNK6google8protobuf11MessageLite8GetArenaEv:
  531|  68.0k|  Arena* GetArena() const { return _internal_metadata_.arena(); }
_ZN6google8protobuf11MessageLite19internal_visibilityEv:
  816|  4.80k|  static constexpr internal::InternalVisibility internal_visibility() {
  817|  4.80k|    return internal::InternalVisibility{};
  818|  4.80k|  }
_ZN6google8protobuf11MessageLiteC2EPNS0_5ArenaE:
  879|  4.80k|  explicit MessageLite(Arena* arena) : _internal_metadata_(arena) {}
_ZN6google8protobuf6TypeId3GetERKNS0_11MessageLiteE:
 1035|  3.73k|  static TypeId Get(const MessageLite& msg) {
 1036|  3.73k|    return TypeId(msg.GetClassData());
 1037|  3.73k|  }
_ZN6google8protobufeqENS0_6TypeIdES1_:
 1048|  3.73k|  friend constexpr bool operator==(TypeId a, TypeId b) {
 1049|  3.73k|    return a.data_ == b.data_;
 1050|  3.73k|  }
_ZN6google8protobufneENS0_6TypeIdES1_:
 1051|  3.73k|  friend constexpr bool operator!=(TypeId a, TypeId b) { return !(a == b); }
_ZN6google8protobuf6TypeIdC2EPKNS0_8internal9ClassDataE:
 1078|  7.46k|  constexpr explicit TypeId(const internal::ClassData* data) : data_(data) {}
_ZN6google8protobuf8internal11FromIntSizeEi:
  288|     17|inline size_t FromIntSize(int size) {
  289|       |  // Convert to unsigned before widening so sign extension is not necessary.
  290|     17|  return static_cast<unsigned int>(size);
  291|     17|}
_ZN6google8protobuf8internal27GetEmptyStringAlreadyInitedEv:
  314|     61|PROTOBUF_EXPORT constexpr const std::string& GetEmptyStringAlreadyInited() {
  315|     61|  return fixed_address_empty_string.get();
  316|     61|}
_ZNK6google8protobuf8internal9ClassData4fullEv:
  474|   215k|inline const ClassDataFull& ClassData::full() const {
  475|   215k|  ABSL_DCHECK(!is_lite);
  ------------------
  |  |   47|   215k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|   215k|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|   430k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|   215k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|   430k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|   430k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 215k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|   215k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 215k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|   215k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 215k, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 1]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 1]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|   430k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|   430k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  476|   215k|  return *static_cast<const ClassDataFull*>(this);
  477|   215k|}
_ZN6google8protobuf11MessageLite16DefaultConstructIN4curl6fuzzer5proto10ConnectionEEEPT_PNS0_5ArenaE:
  821|      1|  PROTOBUF_ALWAYS_INLINE static T* DefaultConstruct(Arena* arena) {
  822|      1|    return static_cast<T*>(Arena::DefaultConstruct<T>(arena));
  823|      1|  }
_ZN6google8protobuf15DownCastMessageIN4curl6fuzzer5proto8ScenarioEEEPT_PNS0_11MessageLiteE:
 1379|  3.73k|T* DownCastMessage(MessageLite* from) {
 1380|  3.73k|  return const_cast<T*>(
 1381|  3.73k|      DownCastMessage<T>(static_cast<const MessageLite*>(from)));
 1382|  3.73k|}
_ZN6google8protobuf15DownCastMessageIN4curl6fuzzer5proto8ScenarioEEEPKT_PKNS0_11MessageLiteE:
 1370|  3.73k|const T* DownCastMessage(const MessageLite* from) {
 1371|  3.73k|  internal::StrongReferenceToType<T>();
 1372|  7.46k|  ABSL_DCHECK(DynamicCastMessage<T>(from) == from)
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|  3.73k|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  3.73k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  7.46k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  7.46k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 3.73k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  3.73k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 3.73k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  7.46k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 3.73k, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 3.73k]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 3.73k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  3.73k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  3.73k|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1373|  7.46k|      << "Cannot downcast " << from->GetTypeName() << " to "
 1374|  7.46k|      << T::default_instance().GetTypeName();
 1375|  3.73k|  return static_cast<const T*>(from);
 1376|  3.73k|}
_ZN6google8protobuf18DynamicCastMessageIN4curl6fuzzer5proto8ScenarioEEEPKT_PKNS0_11MessageLiteE:
 1329|  3.73k|const T* DynamicCastMessage(const MessageLite* from) {
 1330|  3.73k|  static_assert(std::is_base_of<MessageLite, T>::value, "");
 1331|       |
 1332|       |  // We might avoid the call to T::GetClassData() altogether if T were to
 1333|       |  // expose the class data pointer.
 1334|  3.73k|  if (from == nullptr || TypeId::Get<T>() != TypeId::Get(*from)) {
  ------------------
  |  Branch (1334:7): [True: 0, False: 3.73k]
  |  Branch (1334:26): [True: 0, False: 3.73k]
  ------------------
 1335|      0|    return nullptr;
 1336|      0|  }
 1337|       |
 1338|  3.73k|  return static_cast<const T*>(from);
 1339|  3.73k|}
_ZN6google8protobuf6TypeId3GetIN4curl6fuzzer5proto8ScenarioEEES1_v:
 1040|  3.73k|  static TypeId Get() {
 1041|  3.73k|    return TypeId(MessageLite::GetClassDataGenerated<T>());
 1042|  3.73k|  }
_ZN6google8protobuf11MessageLite21GetClassDataGeneratedIN4curl6fuzzer5proto8ScenarioEEEDav:
  902|  3.73k|  static auto GetClassDataGenerated() {
  903|  3.73k|    static_assert(std::is_base_of<MessageLite, T>::value, "");
  904|       |    // We could speed this up if needed by avoiding the function call.
  905|       |    // In LTO this is likely inlined, so it might not matter.
  906|  3.73k|    static_assert(
  907|  3.73k|        std::is_same<const T&, decltype(T::default_instance())>::value, "");
  908|  3.73k|    return T::default_instance().T::GetClassData();
  909|  3.73k|  }
_ZN6google8protobuf11MessageLiteD2Ev:
  511|  29.1k|  PROTOBUF_VIRTUAL ~MessageLite() = default;

_ZN6google8protobuf8internal16InternalMetadataC2EPNS0_5ArenaE:
   46|  4.80k|  explicit InternalMetadata(Arena* arena) {
   47|  4.80k|    ptr_ = reinterpret_cast<intptr_t>(arena);
   48|  4.80k|  }
_ZNK6google8protobuf8internal16InternalMetadata5arenaEv:
   65|  68.0k|  PROTOBUF_NDEBUG_INLINE Arena* arena() const {
   66|  68.0k|    if (PROTOBUF_PREDICT_FALSE(have_unknown_fields())) {
  ------------------
  |  |  365|  68.0k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 68.0k]
  |  |  |  Branch (365:54): [Folded, False: 68.0k]
  |  |  |  Branch (365:63): [True: 0, False: 68.0k]
  |  |  ------------------
  ------------------
   67|      0|      return PtrValue<ContainerBase>()->arena;
   68|  68.0k|    } else {
   69|  68.0k|      return PtrValue<Arena>();
   70|  68.0k|    }
   71|  68.0k|  }
_ZNK6google8protobuf8internal16InternalMetadata19have_unknown_fieldsEv:
   73|   108k|  PROTOBUF_NDEBUG_INLINE bool have_unknown_fields() const {
   74|   108k|    return HasUnknownFieldsTag();
   75|   108k|  }
_ZN6google8protobuf8internal16InternalMetadata12InternalSwapEPS2_:
  114|    259|      InternalMetadata* PROTOBUF_RESTRICT other) {
  115|    259|    std::swap(ptr_, other->ptr_);
  116|    259|  }
_ZNK6google8protobuf8internal16InternalMetadata19HasUnknownFieldsTagEv:
  141|   108k|  PROTOBUF_ALWAYS_INLINE bool HasUnknownFieldsTag() const {
  142|   108k|    return ptr_ & kUnknownFieldsTagMask;
  143|   108k|  }
_ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS0_5ArenaEEEPT_v:
  146|  68.0k|  U* PtrValue() const {
  147|  68.0k|    return reinterpret_cast<U*>(ptr_ & kPtrValueMask);
  148|  68.0k|  }
_ZNK6google8protobuf8internal16InternalMetadata14unknown_fieldsINS0_15UnknownFieldSetEEERKT_PFS7_vE:
   83|     19|      const T& (*default_instance)()) const {
   84|     19|    if (PROTOBUF_PREDICT_FALSE(have_unknown_fields())) {
  ------------------
  |  |  365|     19|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 19]
  |  |  |  Branch (365:54): [Folded, False: 19]
  |  |  |  Branch (365:63): [True: 0, False: 19]
  |  |  ------------------
  ------------------
   85|      0|      return PtrValue<Container<T>>()->unknown_fields;
   86|     19|    } else {
   87|     19|      return default_instance();
   88|     19|    }
   89|     19|  }
_ZN6google8protobuf8internal16InternalMetadata6DeleteINS0_15UnknownFieldSetEEEvv:
   58|  29.1k|  void Delete() {
   59|       |    // Note that Delete<> should be called not more than once.
   60|  29.1k|    if (have_unknown_fields()) {
  ------------------
  |  Branch (60:9): [True: 0, False: 29.1k]
  ------------------
   61|      0|      DeleteOutOfLineHelper<T>();
   62|      0|    }
   63|  29.1k|  }
_ZN6google8protobuf8internal16InternalMetadata9MergeFromINS0_15UnknownFieldSetEEEvRKS2_:
  119|  2.02k|  PROTOBUF_NDEBUG_INLINE void MergeFrom(const InternalMetadata& other) {
  120|  2.02k|    if (other.have_unknown_fields()) {
  ------------------
  |  Branch (120:9): [True: 0, False: 2.02k]
  ------------------
  121|      0|      DoMergeFrom<T>(other.unknown_fields<T>(nullptr));
  122|      0|    }
  123|  2.02k|  }
_ZN6google8protobuf8internal16InternalMetadata5ClearINS0_15UnknownFieldSetEEEvv:
  126|  7.49k|  PROTOBUF_NDEBUG_INLINE void Clear() {
  127|  7.49k|    if (have_unknown_fields()) {
  ------------------
  |  Branch (127:9): [True: 0, False: 7.49k]
  ------------------
  128|      0|      DoClear<T>();
  129|      0|    }
  130|  7.49k|  }

_ZN6google8protobuf8internal8TSanReadEPKv:
  365|   649k|inline PROTOBUF_ALWAYS_INLINE void TSanRead(const void*) {}
_ZN6google8protobuf8internal15AllocateAtLeastEm:
  129|  7.51k|inline SizedPtr AllocateAtLeast(size_t size) {
  130|  7.51k|#if !defined(NDEBUG) && defined(ABSL_HAVE_THREAD_LOCAL) && \
  131|  7.51k|    defined(__cpp_inline_variables)
  132|  7.51k|  if (allocate_at_least_hook != nullptr) {
  ------------------
  |  Branch (132:7): [True: 0, False: 7.51k]
  ------------------
  133|      0|    return allocate_at_least_hook(size, allocate_at_least_hook_context);
  134|      0|  }
  135|  7.51k|#endif  // !NDEBUG && ABSL_HAVE_THREAD_LOCAL && __cpp_inline_variables
  136|  7.51k|  return {::operator new(size), size};
  137|  7.51k|}
_ZN6google8protobuf8internal11SizedDeleteEPvm:
  139|  7.50k|inline void SizedDelete(void* p, size_t size) {
  140|  7.50k|#if defined(__cpp_sized_deallocation)
  141|  7.50k|  ::operator delete(p, size);
  142|       |#else
  143|       |  // Avoid -Wunused-parameter
  144|       |  (void)size;
  145|       |  ::operator delete(p);
  146|       |#endif
  147|  7.50k|}
_ZN6google8protobuf8internal24Prefetch5LinesFrom7LinesEPKv:
  314|  1.27k|inline PROTOBUF_ALWAYS_INLINE void Prefetch5LinesFrom7Lines(const void* ptr) {
  315|  1.27k|  PROTOBUF_PREFETCH_WITH_OFFSET(ptr, 448);
  ------------------
  |  |  670|  1.27k|  asm("prefetcht0 " #offset "(%0)" : : "r"(base));
  ------------------
  316|  1.27k|  PROTOBUF_PREFETCH_WITH_OFFSET(ptr, 512);
  ------------------
  |  |  670|  1.27k|  asm("prefetcht0 " #offset "(%0)" : : "r"(base));
  ------------------
  317|  1.27k|  PROTOBUF_PREFETCH_WITH_OFFSET(ptr, 576);
  ------------------
  |  |  670|  1.27k|  asm("prefetcht0 " #offset "(%0)" : : "r"(base));
  ------------------
  318|  1.27k|  PROTOBUF_PREFETCH_WITH_OFFSET(ptr, 640);
  ------------------
  |  |  670|  1.27k|  asm("prefetcht0 " #offset "(%0)" : : "r"(base));
  ------------------
  319|  1.27k|  PROTOBUF_PREFETCH_WITH_OFFSET(ptr, 704);
  ------------------
  |  |  670|  1.27k|  asm("prefetcht0 " #offset "(%0)" : : "r"(base));
  ------------------
  320|  1.27k|}
_ZN6google8protobuf8internal9TSanWriteEPKv:
  366|   110k|inline PROTOBUF_ALWAYS_INLINE void TSanWrite(const void*) {}
_ZN6google8protobuf8internal20PrefetchToLocalCacheEPKv:
  371|   457k|inline void PrefetchToLocalCache(const void* ptr) {
  372|   457k|  absl::PrefetchToLocalCache(ptr);
  373|   457k|}
_ZN6google8protobuf8internal21StrongReferenceToTypeIN4curl6fuzzer5proto8ScenarioENS1_17MessageTraitsImplEEEvv:
   67|  3.73k|inline PROTOBUF_ALWAYS_INLINE void StrongReferenceToType() {
   68|  3.73k|  static constexpr auto ptr =
   69|  3.73k|      decltype(TraitsImpl::template value<T>)::StrongPointer();
   70|       |  // This is identical to the implementation of StrongPointer() above, but it
   71|       |  // has to be explicitly inlined here or else Clang 19 will raise an error in
   72|       |  // some configurations.
   73|  3.73k|  asm(".reloc ., BFD_RELOC_NONE, %p0" ::"Ws"(ptr));
   74|  3.73k|}

_ZNK6google8protobuf13RepeatedFieldIjE4sizeEv:
  738|  3.10k|inline int RepeatedField<Element>::size() const {
  739|  3.10k|  return size(is_soo());
  740|  3.10k|}
_ZNK6google8protobuf13RepeatedFieldIjE4sizeEb:
  477|  5.15k|  int size(bool is_soo) const { return soo_rep_.size(is_soo); }
_ZNK6google8protobuf8internal6SooRep4sizeEb:
  196|  5.38k|  int size(bool is_soo) const {
  197|  5.38k|    ABSL_DCHECK_EQ(is_soo, this->is_soo());
  ------------------
  |  |   74|  5.38k|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   73|  5.38k|  ABSL_LOG_INTERNAL_CHECK_EQ_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   48|  5.38k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  5.38k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  5.38k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 5.38k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  5.38k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  5.38k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  5.38k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  5.38k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  5.38k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  5.38k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|  1.44k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 1.44k, False: 18.4E]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|  1.44k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 1.44k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|  2.88k|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|  1.44k|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  198|       |#if !defined(__clang__) && defined(__GNUC__)
  199|       |#pragma GCC diagnostic push
  200|       |#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
  201|       |#endif
  202|  5.38k|    return is_soo ? short_rep.size() : long_rep.size;
  ------------------
  |  Branch (202:12): [True: 2.03k, False: 3.34k]
  ------------------
  203|       |#if !defined(__clang__) && defined(__GNUC__)
  204|       |#pragma GCC diagnostic pop
  205|       |#endif
  206|  5.38k|  }
_ZNK6google8protobuf8internal6SooRep6is_sooEv:
  183|  12.4k|  bool is_soo() const {
  184|  12.4k|    static_assert(sizeof(LongSooRep) == sizeof(ShortSooRep), "");
  185|  12.4k|    static_assert(offsetof(SooRep, long_rep) == offsetof(SooRep, short_rep),
  186|  12.4k|                  "");
  187|  12.4k|    static_assert(offsetof(LongSooRep, elements_int) ==
  188|  12.4k|                      offsetof(ShortSooRep, arena_and_size),
  189|  12.4k|                  "");
  190|  12.4k|    return short_rep.is_soo();
  191|  12.4k|  }
_ZNK6google8protobuf8internal11ShortSooRep6is_sooEv:
  168|  12.4k|  bool is_soo() const { return (arena_and_size & kNotSooBit) == 0; }
_ZNK6google8protobuf8internal11ShortSooRep4sizeEv:
  167|  3.56k|  int size() const { return arena_and_size & kSooSizeMask; }
_ZNK6google8protobuf13RepeatedFieldIjE6is_sooEv:
  476|  8.08k|  bool is_soo() const { return soo_rep_.is_soo(); }
_ZNK6google8protobuf13RepeatedFieldIjE3GetEi:
  805|    994|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  806|    994|  ABSL_DCHECK_GE(index, 0);
  ------------------
  |  |   82|    994|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   81|    994|  ABSL_LOG_INTERNAL_CHECK_GE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    994|  ABSL_LOG_INTERNAL_CHECK_OP(Check_GE, >=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|    994|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|    994|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 994]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|    994|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|    994|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|    994|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|    994|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|    994|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|    994|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  807|    994|  ABSL_DCHECK_LT(index, size());
  ------------------
  |  |   80|    994|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   79|    994|  ABSL_LOG_INTERNAL_CHECK_LT_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   54|    994|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LT, <, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|    994|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|    994|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 994]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|    994|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|    994|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|    994|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|    994|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|    994|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|    994|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  808|    994|  return elements(is_soo())[index];
  809|    994|}
_ZNK6google8protobuf13RepeatedFieldIjE8elementsEb:
  585|    994|  const Element* elements(bool is_soo) const {
  586|    994|    return const_cast<RepeatedField*>(this)->elements(is_soo);
  587|    994|  }
_ZN6google8protobuf13RepeatedFieldIjE8elementsEb:
  581|  1.08k|  Element* elements(bool is_soo) {
  582|  1.08k|    ABSL_DCHECK_GT(Capacity(is_soo), 0);
  ------------------
  |  |   84|  1.08k|  ABSL_LOG_INTERNAL_DCHECK_GT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   83|  1.08k|  ABSL_LOG_INTERNAL_CHECK_GT_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   58|  1.08k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_GT, >, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  1.08k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  1.08k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 1.08k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  1.08k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  1.08k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  1.08k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  1.08k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  1.08k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  1.08k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  583|  1.08k|    return unsafe_elements(is_soo);
  584|  1.08k|  }
_ZNK6google8protobuf13RepeatedFieldIjE8CapacityEb:
  478|  3.04k|  int Capacity(bool is_soo) const {
  479|       |#if !defined(__clang__) && defined(__GNUC__)
  480|       |#pragma GCC diagnostic push
  481|       |#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
  482|       |#endif
  483|  3.04k|    return is_soo ? kSooCapacityElements : soo_rep_.long_rep.capacity;
  ------------------
  |  Branch (483:12): [True: 1.70k, False: 1.33k]
  ------------------
  484|       |#if !defined(__clang__) && defined(__GNUC__)
  485|       |#pragma GCC diagnostic pop
  486|       |#endif
  487|  3.04k|  }
_ZN6google8protobuf13RepeatedFieldIjE15unsafe_elementsEb:
  592|  3.48k|  Element* unsafe_elements(bool is_soo) {
  593|  3.48k|    return is_soo ? reinterpret_cast<Element*>(soo_rep_.short_rep.data)
  ------------------
  |  Branch (593:12): [True: 1.99k, False: 1.48k]
  ------------------
  594|  3.48k|                  : reinterpret_cast<Element*>(soo_rep_.long_rep.elements());
  595|  3.48k|  }
_ZNK6google8protobuf8internal10LongSooRep8elementsEv:
  150|  1.77k|  char* elements() const {
  151|  1.77k|    auto ret = reinterpret_cast<char*>(elements_int & kSooPtrMask);
  152|  1.77k|    ABSL_DCHECK_NE(ret, nullptr);
  ------------------
  |  |   76|  1.77k|  ABSL_LOG_INTERNAL_DCHECK_NE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   75|  1.77k|  ABSL_LOG_INTERNAL_CHECK_NE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   50|  1.77k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_NE, !=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  1.77k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  1.77k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 1.77k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  1.77k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  1.77k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  1.77k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  1.77k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  1.77k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  1.77k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  153|  1.77k|    return ret;
  154|  1.77k|  }
_ZN6google8protobuf8internal11ShortSooRepC2EPNS0_5ArenaE:
  163|     37|      : arena_and_size(reinterpret_cast<uintptr_t>(arena)) {
  164|     37|    ABSL_DCHECK_EQ(size(), 0);
  ------------------
  |  |   74|     37|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   73|     37|  ABSL_LOG_INTERNAL_CHECK_EQ_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   48|     37|  ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|     37|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|     37|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 37]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|     37|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|     37|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|     37|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|     37|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|     37|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|     37|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  165|     37|  }
_ZN6google8protobuf8internal6SooRepC2EPNS0_5ArenaE:
  181|     37|  explicit SooRep(Arena* arena) : short_rep(arena) {}
_ZNK6google8protobuf8internal6SooRep9soo_arenaEv:
  192|    384|  Arena* soo_arena() const {
  193|    384|    ABSL_DCHECK(is_soo());
  ------------------
  |  |   47|    384|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|    384|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|    768|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    384|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|    768|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|    768|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 384, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    384|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 384]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|    768|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 384, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 384]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 384]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    768|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|    768|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  194|    384|    return reinterpret_cast<Arena*>(short_rep.arena_and_size & kSooPtrMask);
  195|    384|  }
_ZN6google8protobuf8internal6SooRep8set_sizeEbi:
  207|    591|  void set_size(bool is_soo, int size) {
  208|    591|    ABSL_DCHECK_EQ(is_soo, this->is_soo());
  ------------------
  |  |   74|    591|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   73|    591|  ABSL_LOG_INTERNAL_CHECK_EQ_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   48|    591|  ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|    591|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|    591|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 591]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|    591|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|    591|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|    591|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|    591|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|    591|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|    828|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|    414|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 414, False: 18.4E]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|    414|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 414]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|    828|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|    414|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  209|    591|    if (is_soo) {
  ------------------
  |  Branch (209:9): [True: 0, False: 591]
  ------------------
  210|      0|      ABSL_DCHECK_LE(size, kSooSizeMask);
  ------------------
  |  |   78|      0|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   77|      0|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|      0|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|      0|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|      0|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|      0|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|      0|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|      0|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|      0|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  211|      0|      short_rep.arena_and_size &= kSooPtrMask;
  212|      0|      short_rep.arena_and_size |= size;
  213|    591|    } else {
  214|    591|      long_rep.size = size;
  215|    591|    }
  216|    591|  }
_ZN6google8protobuf8internal6SooRep11set_non_sooEbiPv:
  219|     94|  void set_non_soo(bool was_soo, int capacity, void* elements) {
  220|     94|    ABSL_DCHECK_EQ(was_soo, is_soo());
  ------------------
  |  |   74|     94|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   73|     94|  ABSL_LOG_INTERNAL_CHECK_EQ_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   48|     94|  ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|     94|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|     94|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 94]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|     94|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|     94|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|     94|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|     94|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|     94|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|     94|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  221|     94|    ABSL_DCHECK_NE(elements, nullptr);
  ------------------
  |  |   76|     94|  ABSL_LOG_INTERNAL_DCHECK_NE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   75|     94|  ABSL_LOG_INTERNAL_CHECK_NE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   50|     94|  ABSL_LOG_INTERNAL_CHECK_OP(Check_NE, !=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|     94|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|     94|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 94]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|     94|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|     94|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|     94|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|     94|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|     94|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|     94|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  222|     94|    ABSL_DCHECK_EQ(reinterpret_cast<uintptr_t>(elements) % kSooPtrAlignment,
  ------------------
  |  |   74|     94|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   73|     94|  ABSL_LOG_INTERNAL_CHECK_EQ_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   48|     94|  ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|     94|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|     94|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 94]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|     94|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|     94|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|     94|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|     94|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|     94|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|     94|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  223|     94|                   uintptr_t{0});
  224|     94|    if (was_soo) long_rep.size = short_rep.size();
  ------------------
  |  Branch (224:9): [True: 87, False: 7]
  ------------------
  225|     94|    long_rep.capacity = capacity;
  226|     94|    long_rep.elements_int = reinterpret_cast<uintptr_t>(elements) | kNotSooBit;
  227|     94|  }
_ZNK6google8protobuf13RepeatedFieldIjE8CapacityEv:
  743|    569|inline int RepeatedField<Element>::Capacity() const {
  744|    569|  return Capacity(is_soo());
  745|    569|}
_ZN6google8protobuf13RepeatedFieldIjE19ExchangeCurrentSizeEbi:
  572|    554|  inline int ExchangeCurrentSize(bool is_soo, int new_size) {
  573|    554|    const int prev_size = size(is_soo);
  574|    554|    AnnotateSize(prev_size, new_size);
  575|    554|    set_size(is_soo, new_size);
  576|    554|    return prev_size;
  577|    554|  }
_ZNK6google8protobuf13RepeatedFieldIjE12AnnotateSizeEii:
  543|  1.12k|  void AnnotateSize(int old_size, int new_size) const {
  544|  1.12k|    if (old_size != new_size) {
  ------------------
  |  Branch (544:9): [True: 993, False: 130]
  ------------------
  545|    993|      ABSL_ATTRIBUTE_UNUSED const bool is_soo = this->is_soo();
  ------------------
  |  |  557|    993|#define ABSL_ATTRIBUTE_UNUSED __attribute__((__unused__))
  ------------------
  546|    993|      ABSL_ATTRIBUTE_UNUSED const Element* elem = unsafe_elements(is_soo);
  ------------------
  |  |  557|    993|#define ABSL_ATTRIBUTE_UNUSED __attribute__((__unused__))
  ------------------
  547|    993|      ABSL_ANNOTATE_CONTIGUOUS_CONTAINER(elem, elem + Capacity(is_soo),
  548|    993|                                         elem + old_size, elem + new_size);
  549|    993|      if (new_size < old_size) {
  ------------------
  |  Branch (549:11): [True: 94, False: 899]
  ------------------
  550|     94|        ABSL_ANNOTATE_MEMORY_IS_UNINITIALIZED(
  551|     94|            elem + new_size, (old_size - new_size) * sizeof(Element));
  552|     94|      }
  553|    993|    }
  554|  1.12k|  }
_ZNK6google8protobuf13RepeatedFieldIjE15unsafe_elementsEb:
  596|    993|  const Element* unsafe_elements(bool is_soo) const {
  597|    993|    return const_cast<RepeatedField*>(this)->unsafe_elements(is_soo);
  598|    993|  }
_ZN6google8protobuf13RepeatedFieldIjE8set_sizeEbi:
  488|    554|  void set_size(bool is_soo, int size) {
  489|    554|    ABSL_DCHECK_LE(size, Capacity(is_soo));
  ------------------
  |  |   78|    554|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   77|    554|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|    554|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|    554|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|    554|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 554]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|    554|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|    554|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|    554|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|    554|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|    554|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|    554|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  490|    554|    soo_rep_.set_size(is_soo, size);
  491|    554|  }
_ZN6google8protobuf8internal7HeapRepILm8EE8elementsEv:
  107|    188|  void* elements() { return this + 1; }
_ZN6google8protobuf13RepeatedFieldIjE4GrowEbii:
 1240|     94|                                                    int new_size) {
 1241|     94|  UnpoisonBuffer();
 1242|     94|  GrowNoAnnotate(was_soo, old_size, new_size);
 1243|     94|  AnnotateSize(Capacity(), old_size);
 1244|     94|}
_ZNK6google8protobuf13RepeatedFieldIjE14UnpoisonBufferEv:
  557|    475|  void UnpoisonBuffer() const {
  558|    475|    AnnotateSize(size(), Capacity());
  559|    475|    if (is_soo()) {
  ------------------
  |  Branch (559:9): [True: 384, False: 91]
  ------------------
  560|       |      // We need to manually unpoison the SOO buffer because in reflection for
  561|       |      // split repeated fields, we poison the whole SOO buffer even when we
  562|       |      // don't actually use the whole SOO buffer (e.g. for RepeatedField<bool>).
  563|    384|      PROTOBUF_UNPOISON_MEMORY_REGION(soo_rep_.short_rep.data,
  564|    384|                                      sizeof(soo_rep_.short_rep.data));
  565|    384|    }
  566|    475|  }
_ZN6google8protobuf13RepeatedFieldIjE14GrowNoAnnotateEbii:
 1184|     94|                                                              int new_size) {
 1185|     94|  const int old_capacity = Capacity(was_soo);
 1186|     94|  ABSL_DCHECK_GT(new_size, old_capacity);
  ------------------
  |  |   84|     94|  ABSL_LOG_INTERNAL_DCHECK_GT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   83|     94|  ABSL_LOG_INTERNAL_CHECK_GT_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   58|     94|  ABSL_LOG_INTERNAL_CHECK_OP(Check_GT, >, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|     94|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|     94|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 94]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|     94|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|     94|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|     94|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|     94|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|     94|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|     94|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1187|     94|  HeapRep* new_rep;
 1188|     94|  Arena* arena = GetArena();
 1189|       |
 1190|     94|  new_size = internal::CalculateReserveSize<Element, kHeapRepHeaderSize>(
 1191|     94|      old_capacity, new_size);
 1192|       |
 1193|     94|  ABSL_DCHECK_LE(static_cast<size_t>(new_size),
  ------------------
  |  |   78|      0|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   77|      0|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|     94|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|     94|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|     94|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 94]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|     94|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|     94|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|     94|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|     94|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|     94|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|     94|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|     94|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|     94|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1194|      0|                 (std::numeric_limits<size_t>::max() - kHeapRepHeaderSize) /
 1195|      0|                     sizeof(Element))
 1196|      0|      << "Requested size is too large to fit into size_t.";
 1197|     94|  size_t bytes =
 1198|     94|      kHeapRepHeaderSize + sizeof(Element) * static_cast<size_t>(new_size);
 1199|     94|  if (arena == nullptr) {
  ------------------
  |  Branch (1199:7): [True: 93, False: 1]
  ------------------
 1200|     93|    ABSL_DCHECK_LE((bytes - kHeapRepHeaderSize) / sizeof(Element),
  ------------------
  |  |   78|      0|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   77|      0|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|     93|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|     93|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|     93|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 93]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|     93|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|     93|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|     93|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|     93|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|     93|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|     93|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|     93|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|     93|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1201|      0|                   static_cast<size_t>(std::numeric_limits<int>::max()))
 1202|      0|        << "Requested size is too large to fit element count into int.";
 1203|     93|    internal::SizedPtr res = internal::AllocateAtLeast(bytes);
 1204|     93|    size_t num_available =
 1205|     93|        std::min((res.n - kHeapRepHeaderSize) / sizeof(Element),
 1206|     93|                 static_cast<size_t>(std::numeric_limits<int>::max()));
 1207|     93|    new_size = static_cast<int>(num_available);
 1208|     93|    new_rep = static_cast<HeapRep*>(res.p);
 1209|     93|  } else {
 1210|      1|    new_rep =
 1211|      1|        reinterpret_cast<HeapRep*>(Arena::CreateArray<char>(arena, bytes));
 1212|      1|  }
 1213|     94|  new_rep->arena = arena;
 1214|       |
 1215|     94|  if (old_size > 0) {
  ------------------
  |  Branch (1215:7): [True: 94, False: 0]
  ------------------
 1216|     94|    Element* pnew = static_cast<Element*>(new_rep->elements());
 1217|     94|    Element* pold = elements(was_soo);
 1218|       |    // TODO: add absl::is_trivially_relocatable<Element>
 1219|     94|    if (std::is_trivial<Element>::value) {
  ------------------
  |  Branch (1219:9): [True: 94, Folded]
  ------------------
 1220|     94|      memcpy(static_cast<void*>(pnew), pold, old_size * sizeof(Element));
 1221|     94|    } else {
 1222|      0|      for (Element* end = pnew + old_size; pnew != end; ++pnew, ++pold) {
  ------------------
  |  Branch (1222:44): [True: 0, False: 0]
  ------------------
 1223|      0|        ::new (static_cast<void*>(pnew)) Element(std::move(*pold));
 1224|      0|        pold->~Element();
 1225|      0|      }
 1226|      0|    }
 1227|     94|  }
 1228|     94|  if (!was_soo) InternalDeallocate();
  ------------------
  |  Branch (1228:7): [True: 7, False: 87]
  ------------------
 1229|       |
 1230|     94|  soo_rep_.set_non_soo(was_soo, new_size, new_rep->elements());
 1231|     94|}
_ZN6google8protobuf13RepeatedFieldIjE8GetArenaEv:
  440|     94|  inline Arena* GetArena() { return GetArena(is_soo()); }
_ZNK6google8protobuf13RepeatedFieldIjE8GetArenaEb:
  472|    475|  inline Arena* GetArena(bool is_soo) const {
  473|    475|    return is_soo ? soo_rep_.soo_arena() : heap_rep()->arena;
  ------------------
  |  Branch (473:12): [True: 384, False: 91]
  ------------------
  474|    475|  }
_ZNK6google8protobuf13RepeatedFieldIjE8heap_repEv:
  602|    273|  HeapRep* heap_rep() const {
  603|    273|    ABSL_DCHECK(!is_soo());
  ------------------
  |  |   47|    273|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|    273|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|    546|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    273|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|    546|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|    546|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 273, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    273|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 273]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|    546|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 273, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 273]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 273]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    546|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|    546|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  604|    273|    return reinterpret_cast<HeapRep*>(soo_rep_.long_rep.elements() -
  605|    273|                                      kHeapRepHeaderSize);
  606|    273|  }
_ZN6google8protobuf8internal20CalculateReserveSizeIjLi8EEEiii:
 1142|     94|inline int CalculateReserveSize(int capacity, int new_size) {
 1143|     94|  constexpr int lower_limit =
 1144|     94|      RepeatedFieldLowerClampLimit<T, kHeapRepHeaderSize>();
 1145|     94|  if (new_size < lower_limit) {
  ------------------
  |  Branch (1145:7): [True: 0, False: 94]
  ------------------
 1146|       |    // Clamp to smallest allowed size.
 1147|      0|    return lower_limit;
 1148|      0|  }
 1149|     94|  constexpr int kMaxSizeBeforeClamp =
 1150|     94|      (std::numeric_limits<int>::max() - kHeapRepHeaderSize) / 2;
 1151|     94|  if (PROTOBUF_PREDICT_FALSE(capacity > kMaxSizeBeforeClamp)) {
  ------------------
  |  |  365|     94|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 94]
  |  |  |  Branch (365:54): [Folded, False: 94]
  |  |  |  Branch (365:63): [True: 0, False: 94]
  |  |  ------------------
  ------------------
 1152|      0|    return std::numeric_limits<int>::max();
 1153|      0|  }
 1154|     94|  constexpr int kSooCapacityElements = SooCapacityElements(sizeof(T));
 1155|     94|  if (kSooCapacityElements > 0 && kSooCapacityElements < lower_limit) {
  ------------------
  |  Branch (1155:7): [True: 0, Folded]
  |  Branch (1155:35): [Folded, False: 0]
  ------------------
 1156|       |    // In this case, we need to set capacity to 0 here to ensure power-of-two
 1157|       |    // sized allocations.
 1158|      0|    if (capacity < lower_limit) capacity = 0;
  ------------------
  |  Branch (1158:9): [True: 0, False: 0]
  ------------------
 1159|     94|  } else {
 1160|    188|    ABSL_DCHECK(capacity == 0 || capacity >= lower_limit)
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|     94|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|     94|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|    188|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|    188|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 94, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|     94|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 94]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|    376|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 94, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 94]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 94, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 94]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|     94|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|     94|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1161|    188|        << capacity << " " << lower_limit;
 1162|     94|  }
 1163|       |  // We want to double the number of bytes, not the number of elements, to try
 1164|       |  // to stay within power-of-two allocations.
 1165|       |  // The allocation has kHeapRepHeaderSize + sizeof(T) * capacity.
 1166|     94|  int doubled_size = 2 * capacity + kHeapRepHeaderSize / sizeof(T);
 1167|     94|  return std::max(doubled_size, new_size);
 1168|     94|}
_ZN6google8protobuf13RepeatedFieldIjE18InternalDeallocateILb0EEEvv:
  610|      7|  void InternalDeallocate() {
  611|      7|    ABSL_DCHECK(!is_soo());
  ------------------
  |  |   47|      7|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|      7|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|     14|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      7|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|     14|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|     14|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 7, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      7|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 7]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|     14|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 7, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 7]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 7]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     14|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|     14|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  612|      7|    const size_t bytes = Capacity(false) * sizeof(Element) + kHeapRepHeaderSize;
  613|      7|    if (heap_rep()->arena == nullptr) {
  ------------------
  |  Branch (613:9): [True: 7, False: 0]
  ------------------
  614|      7|      internal::SizedDelete(heap_rep(), bytes);
  615|      7|    } else if (!in_destructor) {
  ------------------
  |  Branch (615:16): [True: 0, Folded]
  ------------------
  616|       |      // If we are in the destructor, we might be being destroyed as part of
  617|       |      // the arena teardown. We can't try and return blocks to the arena then.
  618|      0|      heap_rep()->arena->ReturnArrayMemory(heap_rep(), bytes);
  619|      0|    }
  620|      7|  }
_ZN6google8protobuf13RepeatedFieldIjE7DestroyEPKjS4_:
  518|    205|  static void Destroy(const Element* begin, const Element* end) {
  519|    205|    if (!std::is_trivial<Element>::value) {
  ------------------
  |  Branch (519:9): [Folded, False: 205]
  ------------------
  520|      0|      std::for_each(begin, end, [&](const Element& e) { e.~Element(); });
  521|      0|    }
  522|    205|  }
_ZN6google8protobuf13RepeatedFieldIjE19StaticValidityCheckEv:
  259|    381|  static constexpr PROTOBUF_ALWAYS_INLINE void StaticValidityCheck() {
  260|    381|    static_assert(
  261|    381|        absl::disjunction<internal::is_supported_integral_type<Element>,
  262|    381|                          internal::is_supported_floating_point_type<Element>,
  263|    381|                          std::is_same<absl::Cord, Element>,
  264|    381|                          std::is_same<UnknownField, Element>,
  265|    381|                          is_proto_enum<Element>>::value,
  266|    381|        "We only support non-string scalars in RepeatedField.");
  267|    381|  }
_ZN6google8protobuf13RepeatedFieldIjED2Ev:
  680|    381|RepeatedField<Element>::~RepeatedField() {
  681|    381|  StaticValidityCheck();
  682|    381|  const bool is_soo = this->is_soo();
  683|    381|#ifndef NDEBUG
  684|       |  // Try to trigger segfault / asan failure in non-opt builds if arena_
  685|       |  // lifetime has ended before the destructor.
  686|    381|  auto arena = GetArena(is_soo);
  687|    381|  if (arena) (void)arena->SpaceAllocated();
  ------------------
  |  Branch (687:7): [True: 0, False: 381]
  ------------------
  688|    381|#endif
  689|    381|  const int size = this->size(is_soo);
  690|    381|  if (size > 0) {
  ------------------
  |  Branch (690:7): [True: 205, False: 176]
  ------------------
  691|    205|    Element* elem = unsafe_elements(is_soo);
  692|    205|    Destroy(elem, elem + size);
  693|    205|  }
  694|    381|  UnpoisonBuffer();
  695|    381|  if (!is_soo) InternalDeallocate<true>();
  ------------------
  |  Branch (695:7): [True: 84, False: 297]
  ------------------
  696|    381|}
_ZN6google8protobuf13RepeatedFieldIjE18InternalDeallocateILb1EEEvv:
  610|     84|  void InternalDeallocate() {
  611|     84|    ABSL_DCHECK(!is_soo());
  ------------------
  |  |   47|     84|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|     84|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|    168|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|     84|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|    168|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|    168|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 84, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|     84|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 84]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|    168|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 84, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 84]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 84]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    168|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|    168|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  612|     84|    const size_t bytes = Capacity(false) * sizeof(Element) + kHeapRepHeaderSize;
  613|     84|    if (heap_rep()->arena == nullptr) {
  ------------------
  |  Branch (613:9): [True: 84, False: 0]
  ------------------
  614|     84|      internal::SizedDelete(heap_rep(), bytes);
  615|     84|    } else if (!in_destructor) {
  ------------------
  |  Branch (615:16): [Folded, False: 0]
  ------------------
  616|       |      // If we are in the destructor, we might be being destroyed as part of
  617|       |      // the arena teardown. We can't try and return blocks to the arena then.
  618|      0|      heap_rep()->arena->ReturnArrayMemory(heap_rep(), bytes);
  619|      0|    }
  620|     84|  }

_ZN6google8protobuf8internal20RepeatedPtrFieldBaseC2EPNS0_5ArenaE:
  146|  15.0k|      : tagged_rep_or_elem_(nullptr),
  147|  15.0k|        current_size_(0),
  148|  15.0k|        capacity_proxy_(0),
  149|  15.0k|        arena_(arena) {}
_ZN6google8protobuf8internal20RepeatedPtrFieldBaseD2Ev:
  154|  28.4k|  ~RepeatedPtrFieldBase() {
  155|  28.4k|#ifndef NDEBUG
  156|       |    // Try to trigger segfault / asan failure in non-opt builds if arena_
  157|       |    // lifetime has ended before the destructor.
  158|  28.4k|    if (arena_) (void)arena_->SpaceAllocated();
  ------------------
  |  Branch (158:9): [True: 0, False: 28.4k]
  ------------------
  159|  28.4k|#endif
  160|  28.4k|  }
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase4sizeEv:
  163|   146k|  int size() const { return current_size_; }
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase8CapacityEv:
  170|  24.5k|  int Capacity() const { return capacity_proxy_ + kSSOCapacity; }
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase12NeedsDestroyEv:
  239|  30.8k|  inline bool NeedsDestroy() const {
  240|       |    // Either there is an allocated element in SSO buffer or there is an
  241|       |    // allocated Rep.
  242|  30.8k|    return tagged_rep_or_elem_ != nullptr;
  243|  30.8k|  }
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase8raw_dataEv:
  347|  54.2k|  void* const* raw_data() const { return elements(); }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase16raw_mutable_dataEv:
  348|  3.73k|  void** raw_mutable_data() { return elements(); }
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase8GetArenaEv:
  535|  38.1k|  inline Arena* GetArena() const { return arena_; }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase19ExchangeCurrentSizeEi:
  602|  24.5k|  inline int ExchangeCurrentSize(int new_size) {
  603|  24.5k|    return std::exchange(current_size_, new_size);
  604|  24.5k|  }
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase8elementsEv:
  625|  54.2k|  void* const* elements() const {
  626|  54.2k|    return using_sso() ? &tagged_rep_or_elem_ : +rep()->elements;
  ------------------
  |  Branch (626:12): [True: 43.1k, False: 11.0k]
  ------------------
  627|  54.2k|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase8elementsEv:
  628|  10.9k|  void** elements() {
  629|  10.9k|    return using_sso() ? &tagged_rep_or_elem_ : +rep()->elements;
  ------------------
  |  Branch (629:12): [True: 4.86k, False: 6.10k]
  ------------------
  630|  10.9k|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase10element_atEi:
  632|  84.6k|  void*& element_at(int index) {
  633|  84.6k|    if (using_sso()) {
  ------------------
  |  Branch (633:9): [True: 9.02k, False: 75.6k]
  ------------------
  634|  9.02k|      ABSL_DCHECK_EQ(index, 0);
  ------------------
  |  |   74|  9.02k|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   73|  9.02k|  ABSL_LOG_INTERNAL_CHECK_EQ_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   48|  9.02k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  9.02k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  9.02k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 9.02k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  9.02k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  9.02k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  9.02k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  9.02k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  9.02k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  9.02k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  635|  9.02k|      return tagged_rep_or_elem_;
  636|  9.02k|    }
  637|  75.6k|    return rep()->elements[index];
  638|  84.6k|  }
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase10element_atEi:
  639|  65.8k|  const void* element_at(int index) const {
  640|  65.8k|    return const_cast<RepeatedPtrFieldBase*>(this)->element_at(index);
  641|  65.8k|  }
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase14allocated_sizeEv:
  643|  7.23k|  int allocated_size() const {
  644|  7.23k|    return using_sso() ? (tagged_rep_or_elem_ != nullptr ? 1 : 0)
  ------------------
  |  Branch (644:12): [True: 3.12k, False: 4.10k]
  |  Branch (644:27): [True: 3.12k, False: 3]
  ------------------
  645|  7.23k|                       : rep()->allocated_size;
  646|  7.23k|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase3repEv:
  647|   124k|  Rep* rep() {
  648|   124k|    ABSL_DCHECK(!using_sso());
  ------------------
  |  |   47|   124k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|   124k|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|   249k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|   124k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|   249k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|   249k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 124k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|   124k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 124k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|   182k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 124k, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 57.2k]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 57.2k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|   249k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|   249k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  649|   124k|    return reinterpret_cast<Rep*>(
  650|   124k|        reinterpret_cast<uintptr_t>(tagged_rep_or_elem_) - 1);
  651|   124k|  }
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase3repEv:
  652|  15.2k|  const Rep* rep() const {
  653|  15.2k|    return const_cast<RepeatedPtrFieldBase*>(this)->rep();
  654|  15.2k|  }
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase9using_ssoEv:
  656|   246k|  bool using_sso() const {
  657|   246k|    return (reinterpret_cast<uintptr_t>(tagged_rep_or_elem_) & 1) == 0;
  658|   246k|  }
_ZN6google8protobuf8internal18GenericTypeHandlerINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEE6DeleteEPS9_PNS0_5ArenaE:
  912|  5.91k|  static inline void Delete(Type* value, Arena* arena) {
  913|  5.91k|    if (arena == nullptr) {
  ------------------
  |  Branch (913:9): [True: 5.91k, False: 0]
  ------------------
  914|  5.91k|      delete value;
  915|  5.91k|    }
  916|  5.91k|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEEPNT_4TypeEPv:
  661|  11.8k|  static inline Value<TypeHandler>* cast(void* element) {
  662|  11.8k|    return reinterpret_cast<Value<TypeHandler>*>(element);
  663|  11.8k|  }
_ZNK6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto9SetOptionEE4sizeEv:
 1340|  45.9k|inline int RepeatedPtrField<Element>::size() const {
 1341|  45.9k|  return RepeatedPtrFieldBase::size();
 1342|  45.9k|}
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto9SetOptionEE5ClearEv:
 1469|  7.46k|inline void RepeatedPtrField<Element>::Clear() {
 1470|  7.46k|  RepeatedPtrFieldBase::Clear<TypeHandler>();
 1471|  7.46k|}
_ZN6google8protobuf8internal20RepeatedPtrFieldBase5ClearINS1_18GenericTypeHandlerIN4curl6fuzzer5proto9SetOptionEEEEEvv:
  265|  7.46k|  void Clear() {
  266|  7.46k|    const int n = current_size_;
  267|  7.46k|    ABSL_DCHECK_GE(n, 0);
  ------------------
  |  |   82|  7.46k|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   81|  7.46k|  ABSL_LOG_INTERNAL_CHECK_GE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  7.46k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_GE, >=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  7.46k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  7.46k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 7.46k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  7.46k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  7.46k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  7.46k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  7.46k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  7.46k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  7.46k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  268|  7.46k|    if (n > 0) {
  ------------------
  |  Branch (268:9): [True: 0, False: 7.46k]
  ------------------
  269|      0|      using H = CommonHandler<TypeHandler>;
  270|      0|      ClearNonEmpty<H>();
  271|      0|    }
  272|  7.46k|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerINS0_11MessageLiteEEEEEPNT_4TypeEPv:
  661|  18.0k|  static inline Value<TypeHandler>* cast(void* element) {
  662|  18.0k|    return reinterpret_cast<Value<TypeHandler>*>(element);
  663|  18.0k|  }
_ZNK6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto9SetOptionEE3GetEi:
 1346|  35.2k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1347|  35.2k|  return RepeatedPtrFieldBase::Get<TypeHandler>(index);
 1348|  35.2k|}
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase3GetINS1_18GenericTypeHandlerIN4curl6fuzzer5proto9SetOptionEEEEERKNT_4TypeEi:
  252|  35.2k|  const Value<TypeHandler>& Get(int index) const {
  253|  35.2k|    ABSL_DCHECK_GE(index, 0);
  ------------------
  |  |   82|  35.2k|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   81|  35.2k|  ABSL_LOG_INTERNAL_CHECK_GE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  35.2k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_GE, >=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  35.2k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  35.2k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 35.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  35.2k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  35.2k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  35.2k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  35.2k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  35.2k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  35.2k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|  35.2k|    ABSL_DCHECK_LT(index, current_size_);
  ------------------
  |  |   80|  35.2k|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   79|  35.2k|  ABSL_LOG_INTERNAL_CHECK_LT_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   54|  35.2k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LT, <, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  35.2k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  35.2k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 35.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  35.2k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  35.2k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  35.2k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  35.2k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  35.2k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  35.2k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  255|  35.2k|    return *cast<TypeHandler>(element_at(index));
  256|  35.2k|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerIN4curl6fuzzer5proto9SetOptionEEEEEPKNT_4TypeEPKv:
  665|  35.2k|  static inline const Value<TypeHandler>* cast(const void* element) {
  666|  35.2k|    return reinterpret_cast<const Value<TypeHandler>*>(element);
  667|  35.2k|  }
_ZNK6google8protobuf16RepeatedPtrFieldINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEE4sizeEv:
 1340|  41.2k|inline int RepeatedPtrField<Element>::size() const {
 1341|  41.2k|  return RepeatedPtrFieldBase::size();
 1342|  41.2k|}
_ZN6google8protobuf16RepeatedPtrFieldINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEE5ClearEv:
 1469|  18.6k|inline void RepeatedPtrField<Element>::Clear() {
 1470|  18.6k|  RepeatedPtrFieldBase::Clear<TypeHandler>();
 1471|  18.6k|}
_ZN6google8protobuf8internal20RepeatedPtrFieldBase5ClearINS1_18GenericTypeHandlerINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEEvv:
  265|  18.6k|  void Clear() {
  266|  18.6k|    const int n = current_size_;
  267|  18.6k|    ABSL_DCHECK_GE(n, 0);
  ------------------
  |  |   82|  18.6k|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   81|  18.6k|  ABSL_LOG_INTERNAL_CHECK_GE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  18.6k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_GE, >=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  18.6k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  18.6k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 18.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  18.6k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  18.6k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  18.6k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  18.6k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  18.6k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  18.6k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  268|  18.6k|    if (n > 0) {
  ------------------
  |  Branch (268:9): [True: 0, False: 18.6k]
  ------------------
  269|      0|      using H = CommonHandler<TypeHandler>;
  270|      0|      ClearNonEmpty<H>();
  271|      0|    }
  272|  18.6k|  }
_ZN6google8protobuf16RepeatedPtrFieldINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEE3AddEv:
 1370|  5.91k|inline Element* RepeatedPtrField<Element>::Add() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1371|  5.91k|  return RepeatedPtrFieldBase::Add<TypeHandler>();
 1372|  5.91k|}
_ZN6google8protobuf8internal20RepeatedPtrFieldBase3AddINS1_18GenericTypeHandlerINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEEPNT_4TypeEv:
  194|  5.91k|  Value<TypeHandler>* Add() {
  195|  5.91k|    if (std::is_same<Value<TypeHandler>, std::string>{}) {
  ------------------
  |  Branch (195:9): [True: 5.91k, Folded]
  ------------------
  196|  5.91k|      return cast<TypeHandler>(AddString());
  197|  5.91k|    }
  198|      0|    return cast<TypeHandler>(AddMessageLite(TypeHandler::GetNewFunc()));
  199|  5.91k|  }
_ZNK6google8protobuf16RepeatedPtrFieldINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEE3GetEi:
 1346|  5.30k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1347|  5.30k|  return RepeatedPtrFieldBase::Get<TypeHandler>(index);
 1348|  5.30k|}
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase3GetINS1_18GenericTypeHandlerINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEERKNT_4TypeEi:
  252|  5.30k|  const Value<TypeHandler>& Get(int index) const {
  253|  5.30k|    ABSL_DCHECK_GE(index, 0);
  ------------------
  |  |   82|  5.30k|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   81|  5.30k|  ABSL_LOG_INTERNAL_CHECK_GE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  5.30k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_GE, >=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  5.30k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  5.30k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 5.30k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  5.30k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  5.30k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  5.30k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  5.30k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  5.30k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  5.30k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|  5.30k|    ABSL_DCHECK_LT(index, current_size_);
  ------------------
  |  |   80|  5.30k|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   79|  5.30k|  ABSL_LOG_INTERNAL_CHECK_LT_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   54|  5.30k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LT, <, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  5.30k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  5.30k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 5.30k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  5.30k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  5.30k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  5.30k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  5.30k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  5.30k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  5.30k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  255|  5.30k|    return *cast<TypeHandler>(element_at(index));
  256|  5.30k|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEEPKNT_4TypeEPKv:
  665|  5.30k|  static inline const Value<TypeHandler>* cast(const void* element) {
  666|  5.30k|    return reinterpret_cast<const Value<TypeHandler>*>(element);
  667|  5.30k|  }
_ZNK6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto10ConnectionEE4sizeEv:
 1340|  14.9k|inline int RepeatedPtrField<Element>::size() const {
 1341|  14.9k|  return RepeatedPtrFieldBase::size();
 1342|  14.9k|}
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto10ConnectionEE5ClearEv:
 1469|  7.46k|inline void RepeatedPtrField<Element>::Clear() {
 1470|  7.46k|  RepeatedPtrFieldBase::Clear<TypeHandler>();
 1471|  7.46k|}
_ZN6google8protobuf8internal20RepeatedPtrFieldBase5ClearINS1_18GenericTypeHandlerIN4curl6fuzzer5proto10ConnectionEEEEEvv:
  265|  7.46k|  void Clear() {
  266|  7.46k|    const int n = current_size_;
  267|  7.46k|    ABSL_DCHECK_GE(n, 0);
  ------------------
  |  |   82|  7.46k|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   81|  7.46k|  ABSL_LOG_INTERNAL_CHECK_GE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  7.46k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_GE, >=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  7.46k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  7.46k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 7.46k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  7.46k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  7.46k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  7.46k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  7.46k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  7.46k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  7.46k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  268|  7.46k|    if (n > 0) {
  ------------------
  |  Branch (268:9): [True: 0, False: 7.46k]
  ------------------
  269|      0|      using H = CommonHandler<TypeHandler>;
  270|      0|      ClearNonEmpty<H>();
  271|      0|    }
  272|  7.46k|  }
_ZNK6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto10ConnectionEE3GetEi:
 1346|    338|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1347|    338|  return RepeatedPtrFieldBase::Get<TypeHandler>(index);
 1348|    338|}
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase3GetINS1_18GenericTypeHandlerIN4curl6fuzzer5proto10ConnectionEEEEERKNT_4TypeEi:
  252|    338|  const Value<TypeHandler>& Get(int index) const {
  253|    338|    ABSL_DCHECK_GE(index, 0);
  ------------------
  |  |   82|    338|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   81|    338|  ABSL_LOG_INTERNAL_CHECK_GE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    338|  ABSL_LOG_INTERNAL_CHECK_OP(Check_GE, >=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|    338|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|    338|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 338]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|    338|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|    338|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|    338|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|    338|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|    338|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|    338|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|    338|    ABSL_DCHECK_LT(index, current_size_);
  ------------------
  |  |   80|    338|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   79|    338|  ABSL_LOG_INTERNAL_CHECK_LT_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   54|    338|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LT, <, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|    338|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|    338|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 338]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|    338|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|    338|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|    338|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|    338|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|    338|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|    338|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  255|    338|    return *cast<TypeHandler>(element_at(index));
  256|    338|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerIN4curl6fuzzer5proto10ConnectionEEEEEPKNT_4TypeEPKv:
  665|    338|  static inline const Value<TypeHandler>* cast(const void* element) {
  666|    338|    return reinterpret_cast<const Value<TypeHandler>*>(element);
  667|    338|  }
_ZNK6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto8MimePartEE4sizeEv:
 1340|  4.11k|inline int RepeatedPtrField<Element>::size() const {
 1341|  4.11k|  return RepeatedPtrFieldBase::size();
 1342|  4.11k|}
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto8MimePartEE7MutableEi:
 1365|  1.55k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1366|  1.55k|  return RepeatedPtrFieldBase::Mutable<TypeHandler>(index);
 1367|  1.55k|}
_ZN6google8protobuf8internal20RepeatedPtrFieldBase7MutableINS1_18GenericTypeHandlerIN4curl6fuzzer5proto8MimePartEEEEEPNT_4TypeEi:
  187|  1.55k|  Value<TypeHandler>* Mutable(int index) {
  188|  1.55k|    ABSL_DCHECK_GE(index, 0);
  ------------------
  |  |   82|  1.55k|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   81|  1.55k|  ABSL_LOG_INTERNAL_CHECK_GE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  1.55k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_GE, >=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  1.55k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  1.55k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 1.55k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  1.55k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  1.55k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  1.55k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  1.55k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  1.55k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  1.55k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  189|  1.55k|    ABSL_DCHECK_LT(index, current_size_);
  ------------------
  |  |   80|  1.55k|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   79|  1.55k|  ABSL_LOG_INTERNAL_CHECK_LT_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   54|  1.55k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LT, <, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  1.55k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  1.55k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 1.55k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  1.55k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  1.55k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  1.55k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  1.55k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  1.55k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  1.55k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  190|  1.55k|    return cast<TypeHandler>(element_at(index));
  191|  1.55k|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerIN4curl6fuzzer5proto8MimePartEEEEEPNT_4TypeEPv:
  661|  1.55k|  static inline Value<TypeHandler>* cast(void* element) {
  662|  1.55k|    return reinterpret_cast<Value<TypeHandler>*>(element);
  663|  1.55k|  }
_ZNK6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto8MimePartEE3GetEi:
 1346|  1.55k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1347|  1.55k|  return RepeatedPtrFieldBase::Get<TypeHandler>(index);
 1348|  1.55k|}
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase3GetINS1_18GenericTypeHandlerIN4curl6fuzzer5proto8MimePartEEEEERKNT_4TypeEi:
  252|  1.55k|  const Value<TypeHandler>& Get(int index) const {
  253|  1.55k|    ABSL_DCHECK_GE(index, 0);
  ------------------
  |  |   82|  1.55k|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   81|  1.55k|  ABSL_LOG_INTERNAL_CHECK_GE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  1.55k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_GE, >=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  1.55k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  1.55k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 1.55k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  1.55k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  1.55k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  1.55k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  1.55k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  1.55k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  1.55k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|  1.55k|    ABSL_DCHECK_LT(index, current_size_);
  ------------------
  |  |   80|  1.55k|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   79|  1.55k|  ABSL_LOG_INTERNAL_CHECK_LT_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   54|  1.55k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LT, <, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  1.55k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  1.55k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 1.55k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  1.55k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  1.55k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  1.55k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  1.55k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  1.55k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  1.55k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  255|  1.55k|    return *cast<TypeHandler>(element_at(index));
  256|  1.55k|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerIN4curl6fuzzer5proto8MimePartEEEEEPKNT_4TypeEPKv:
  665|  1.55k|  static inline const Value<TypeHandler>* cast(const void* element) {
  666|  1.55k|    return reinterpret_cast<const Value<TypeHandler>*>(element);
  667|  1.55k|  }
_ZNK6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto12MimeDataPartEE4sizeEv:
 1340|  2.31k|inline int RepeatedPtrField<Element>::size() const {
 1341|  2.31k|  return RepeatedPtrFieldBase::size();
 1342|  2.31k|}
_ZNK6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto12MimeDataPartEE3GetEi:
 1346|  1.80k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1347|  1.80k|  return RepeatedPtrFieldBase::Get<TypeHandler>(index);
 1348|  1.80k|}
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase3GetINS1_18GenericTypeHandlerIN4curl6fuzzer5proto12MimeDataPartEEEEERKNT_4TypeEi:
  252|  1.80k|  const Value<TypeHandler>& Get(int index) const {
  253|  1.80k|    ABSL_DCHECK_GE(index, 0);
  ------------------
  |  |   82|  1.80k|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   81|  1.80k|  ABSL_LOG_INTERNAL_CHECK_GE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  1.80k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_GE, >=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  1.80k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  1.80k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 1.80k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  1.80k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  1.80k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  1.80k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  1.80k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  1.80k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  1.80k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|  1.80k|    ABSL_DCHECK_LT(index, current_size_);
  ------------------
  |  |   80|  1.80k|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   79|  1.80k|  ABSL_LOG_INTERNAL_CHECK_LT_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   54|  1.80k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LT, <, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  1.80k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  1.80k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 1.80k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  1.80k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  1.80k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  1.80k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  1.80k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  1.80k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  1.80k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  255|  1.80k|    return *cast<TypeHandler>(element_at(index));
  256|  1.80k|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerIN4curl6fuzzer5proto12MimeDataPartEEEEEPKNT_4TypeEPKv:
  665|  1.80k|  static inline const Value<TypeHandler>* cast(const void* element) {
  666|  1.80k|    return reinterpret_cast<const Value<TypeHandler>*>(element);
  667|  1.80k|  }
_ZNK6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto14WebSocketFrameEE4sizeEv:
 1340|  8.14k|inline int RepeatedPtrField<Element>::size() const {
 1341|  8.14k|  return RepeatedPtrFieldBase::size();
 1342|  8.14k|}
_ZNK6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto14WebSocketFrameEE3GetEi:
 1346|    289|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1347|    289|  return RepeatedPtrFieldBase::Get<TypeHandler>(index);
 1348|    289|}
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase3GetINS1_18GenericTypeHandlerIN4curl6fuzzer5proto14WebSocketFrameEEEEERKNT_4TypeEi:
  252|    289|  const Value<TypeHandler>& Get(int index) const {
  253|    289|    ABSL_DCHECK_GE(index, 0);
  ------------------
  |  |   82|    289|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   81|    289|  ABSL_LOG_INTERNAL_CHECK_GE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    289|  ABSL_LOG_INTERNAL_CHECK_OP(Check_GE, >=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|    289|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|    289|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 289]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|    289|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|    289|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|    289|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|    289|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|    289|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|    289|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|    289|    ABSL_DCHECK_LT(index, current_size_);
  ------------------
  |  |   80|    289|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   79|    289|  ABSL_LOG_INTERNAL_CHECK_LT_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   54|    289|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LT, <, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|    289|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|    289|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 289]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|    289|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|    289|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|    289|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|    289|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|    289|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|    289|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  255|    289|    return *cast<TypeHandler>(element_at(index));
  256|    289|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerIN4curl6fuzzer5proto14WebSocketFrameEEEEEPKNT_4TypeEPKv:
  665|    289|  static inline const Value<TypeHandler>* cast(const void* element) {
  666|    289|    return reinterpret_cast<const Value<TypeHandler>*>(element);
  667|    289|  }
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto9SetOptionEE5beginEv:
 1831|  7.46k|RepeatedPtrField<Element>::begin() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1832|  7.46k|  return iterator(raw_data());
 1833|  7.46k|}
_ZN6google8protobuf8internal19RepeatedPtrIteratorIN4curl6fuzzer5proto9SetOptionEEC2EPKPv:
 1617|  14.9k|  explicit RepeatedPtrIterator(void* const* it) : it_(it) {}
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto9SetOptionEE3endEv:
 1846|  7.46k|RepeatedPtrField<Element>::end() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1847|  7.46k|  return iterator(raw_data() + size());
 1848|  7.46k|}
_ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIN4curl6fuzzer5proto9SetOptionEEES9_:
 1647|  32.9k|  friend bool operator!=(const iterator& x, const iterator& y) {
 1648|  32.9k|    return x.it_ != y.it_;
 1649|  32.9k|  }
_ZN6google8protobuf8internal19RepeatedPtrIteratorIN4curl6fuzzer5proto9SetOptionEEppEv:
 1632|  25.4k|  iterator& operator++() {
 1633|  25.4k|    ++it_;
 1634|  25.4k|    return *this;
 1635|  25.4k|  }
_ZNK6google8protobuf8internal19RepeatedPtrIteratorIN4curl6fuzzer5proto9SetOptionEEdeEv:
 1628|  25.4k|  reference operator*() const { return *reinterpret_cast<Element*>(*it_); }
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto9SetOptionEE14DeleteSubrangeEii:
 1399|  3.73k|inline void RepeatedPtrField<Element>::DeleteSubrange(int start, int num) {
 1400|  3.73k|  ABSL_DCHECK_GE(start, 0);
  ------------------
  |  |   82|  3.73k|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   81|  3.73k|  ABSL_LOG_INTERNAL_CHECK_GE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  3.73k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_GE, >=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  3.73k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  3.73k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 3.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  3.73k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  3.73k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  3.73k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  3.73k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  3.73k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  3.73k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1401|  3.73k|  ABSL_DCHECK_GE(num, 0);
  ------------------
  |  |   82|  3.73k|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   81|  3.73k|  ABSL_LOG_INTERNAL_CHECK_GE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  3.73k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_GE, >=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  3.73k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  3.73k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 3.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  3.73k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  3.73k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  3.73k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  3.73k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  3.73k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  3.73k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1402|  3.73k|  ABSL_DCHECK_LE(start + num, size());
  ------------------
  |  |   78|  3.73k|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   77|  3.73k|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  3.73k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  3.73k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  3.73k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 3.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  3.73k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  3.73k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  3.73k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  3.73k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  3.73k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  3.73k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1403|  3.73k|  void** subrange = raw_mutable_data() + start;
 1404|  3.73k|  Arena* arena = GetArena();
 1405|  3.73k|  for (int i = 0; i < num; ++i) {
  ------------------
  |  Branch (1405:19): [True: 0, False: 3.73k]
  ------------------
 1406|      0|    using H = CommonHandler<TypeHandler>;
 1407|      0|    H::Delete(static_cast<Element*>(subrange[i]), arena);
 1408|      0|  }
 1409|  3.73k|  UnsafeArenaExtractSubrange(start, num, nullptr);
 1410|  3.73k|}
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto9SetOptionEE8GetArenaEv:
 1541|  3.73k|inline Arena* RepeatedPtrField<Element>::GetArena() {
 1542|  3.73k|  return RepeatedPtrFieldBase::GetArena();
 1543|  3.73k|}
_ZN6google8protobuf8internal18GenericTypeHandlerINS0_11MessageLiteEE6DeleteEPS3_PNS0_5ArenaE:
  837|  18.0k|  static inline void Delete(Type* value, Arena* arena) {
  838|  18.0k|    if (arena != nullptr) return;
  ------------------
  |  Branch (838:9): [True: 0, False: 18.0k]
  ------------------
  839|  18.0k|#ifdef __cpp_if_constexpr
  840|  18.0k|    if constexpr (std::is_base_of<MessageLite, Type>::value) {
  841|       |      // Using virtual destructor to reduce generated code size that would have
  842|       |      // happened otherwise due to inlined `~Type()`.
  843|  18.0k|      InternalOutOfLineDeleteMessageLite(value);
  844|       |    } else {
  845|       |      delete value;
  846|       |    }
  847|       |#else
  848|       |    delete value;
  849|       |#endif
  850|  18.0k|  }
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto9SetOptionEE26UnsafeArenaExtractSubrangeEiiPPS5_:
 1454|  3.73k|    int start, int num, Element** elements) {
 1455|  3.73k|  ABSL_DCHECK_GE(start, 0);
  ------------------
  |  |   82|  3.73k|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   81|  3.73k|  ABSL_LOG_INTERNAL_CHECK_GE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  3.73k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_GE, >=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  3.73k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  3.73k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 3.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  3.73k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  3.73k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  3.73k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  3.73k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  3.73k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  3.73k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1456|  3.73k|  ABSL_DCHECK_GE(num, 0);
  ------------------
  |  |   82|  3.73k|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   81|  3.73k|  ABSL_LOG_INTERNAL_CHECK_GE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  3.73k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_GE, >=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  3.73k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  3.73k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 3.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  3.73k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  3.73k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  3.73k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  3.73k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  3.73k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  3.73k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1457|  3.73k|  ABSL_DCHECK_LE(start + num, size());
  ------------------
  |  |   78|  3.73k|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   77|  3.73k|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL(val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  3.73k|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|  3.73k|  while (                                                                      \
  |  |  |  |  |  |  |  |   62|  3.73k|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 3.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  3.73k|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |  |  |   64|  3.73k|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |  |  |   65|  3.73k|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |  |  |   66|  3.73k|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |  |  |   67|  3.73k|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |  |  |   68|  3.73k|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1458|       |
 1459|  3.73k|  if (num > 0) {
  ------------------
  |  Branch (1459:7): [True: 0, False: 3.73k]
  ------------------
 1460|       |    // Save the values of the removed elements if requested.
 1461|      0|    if (elements != nullptr) {
  ------------------
  |  Branch (1461:9): [True: 0, False: 0]
  ------------------
 1462|      0|      memcpy(elements, data() + start, num * sizeof(Element*));
 1463|      0|    }
 1464|      0|    CloseGap(start, num);
 1465|      0|  }
 1466|  3.73k|}
_ZN6google8protobuf16RepeatedPtrFieldINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEE8GetArenaEv:
 1541|  2.41k|inline Arena* RepeatedPtrField<Element>::GetArena() {
 1542|  2.41k|  return RepeatedPtrFieldBase::GetArena();
 1543|  2.41k|}
_ZN6google8protobuf16RepeatedPtrFieldINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEE5beginEv:
 1831|  10.8k|RepeatedPtrField<Element>::begin() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1832|  10.8k|  return iterator(raw_data());
 1833|  10.8k|}
_ZN6google8protobuf8internal19RepeatedPtrIteratorINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEC2EPKPv:
 1617|  21.8k|  explicit RepeatedPtrIterator(void* const* it) : it_(it) {}
_ZN6google8protobuf16RepeatedPtrFieldINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEE3endEv:
 1846|  10.8k|RepeatedPtrField<Element>::end() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1847|  10.8k|  return iterator(raw_data() + size());
 1848|  10.8k|}
_ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEESC_:
 1647|  15.6k|  friend bool operator!=(const iterator& x, const iterator& y) {
 1648|  15.6k|    return x.it_ != y.it_;
 1649|  15.6k|  }
_ZNK6google8protobuf8internal19RepeatedPtrIteratorINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEdeEv:
 1628|  4.78k|  reference operator*() const { return *reinterpret_cast<Element*>(*it_); }
_ZN6google8protobuf8internal19RepeatedPtrIteratorINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEppEv:
 1632|  4.78k|  iterator& operator++() {
 1633|  4.78k|    ++it_;
 1634|  4.78k|    return *this;
 1635|  4.78k|  }
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto12MimeDataPartEE5beginEv:
 1831|    772|RepeatedPtrField<Element>::begin() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1832|    772|  return iterator(raw_data());
 1833|    772|}
_ZN6google8protobuf8internal19RepeatedPtrIteratorIN4curl6fuzzer5proto12MimeDataPartEEC2EPKPv:
 1617|  1.54k|  explicit RepeatedPtrIterator(void* const* it) : it_(it) {}
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto12MimeDataPartEE3endEv:
 1846|    772|RepeatedPtrField<Element>::end() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1847|    772|  return iterator(raw_data() + size());
 1848|    772|}
_ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIN4curl6fuzzer5proto12MimeDataPartEEES9_:
 1647|  2.57k|  friend bool operator!=(const iterator& x, const iterator& y) {
 1648|  2.57k|    return x.it_ != y.it_;
 1649|  2.57k|  }
_ZNK6google8protobuf8internal19RepeatedPtrIteratorIN4curl6fuzzer5proto12MimeDataPartEEdeEv:
 1628|  1.80k|  reference operator*() const { return *reinterpret_cast<Element*>(*it_); }
_ZN6google8protobuf8internal19RepeatedPtrIteratorIN4curl6fuzzer5proto12MimeDataPartEEppEv:
 1632|  1.80k|  iterator& operator++() {
 1633|  1.80k|    ++it_;
 1634|  1.80k|    return *this;
 1635|  1.80k|  }
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto10ConnectionEE5beginEv:
 1831|  7.46k|RepeatedPtrField<Element>::begin() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1832|  7.46k|  return iterator(raw_data());
 1833|  7.46k|}
_ZN6google8protobuf8internal19RepeatedPtrIteratorIN4curl6fuzzer5proto10ConnectionEEC2EPKPv:
 1617|  14.9k|  explicit RepeatedPtrIterator(void* const* it) : it_(it) {}
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto10ConnectionEE3endEv:
 1846|  7.46k|RepeatedPtrField<Element>::end() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1847|  7.46k|  return iterator(raw_data() + size());
 1848|  7.46k|}
_ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIN4curl6fuzzer5proto10ConnectionEEES9_:
 1647|  8.14k|  friend bool operator!=(const iterator& x, const iterator& y) {
 1648|  8.14k|    return x.it_ != y.it_;
 1649|  8.14k|  }
_ZN6google8protobuf8internal19RepeatedPtrIteratorIN4curl6fuzzer5proto10ConnectionEEppEv:
 1632|    676|  iterator& operator++() {
 1633|    676|    ++it_;
 1634|    676|    return *this;
 1635|    676|  }
_ZNK6google8protobuf8internal19RepeatedPtrIteratorIN4curl6fuzzer5proto10ConnectionEEdeEv:
 1628|    676|  reference operator*() const { return *reinterpret_cast<Element*>(*it_); }
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto9SetOptionEE19StaticValidityCheckEv:
  938|  3.73k|  static constexpr PROTOBUF_ALWAYS_INLINE void StaticValidityCheck() {
  939|  3.73k|    static_assert(
  940|  3.73k|        absl::disjunction<
  941|  3.73k|            internal::is_supported_string_type<Element>,
  942|  3.73k|            internal::is_supported_message_type<Element>>::value,
  943|  3.73k|        "We only support string and Message types in RepeatedPtrField.");
  944|  3.73k|  }
_ZN6google8protobuf16RepeatedPtrFieldINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEE19StaticValidityCheckEv:
  938|  14.9k|  static constexpr PROTOBUF_ALWAYS_INLINE void StaticValidityCheck() {
  939|  14.9k|    static_assert(
  940|  14.9k|        absl::disjunction<
  941|  14.9k|            internal::is_supported_string_type<Element>,
  942|  14.9k|            internal::is_supported_message_type<Element>>::value,
  943|  14.9k|        "We only support string and Message types in RepeatedPtrField.");
  944|  14.9k|  }
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto10ConnectionEE19StaticValidityCheckEv:
  938|  3.73k|  static constexpr PROTOBUF_ALWAYS_INLINE void StaticValidityCheck() {
  939|  3.73k|    static_assert(
  940|  3.73k|        absl::disjunction<
  941|  3.73k|            internal::is_supported_string_type<Element>,
  942|  3.73k|            internal::is_supported_message_type<Element>>::value,
  943|  3.73k|        "We only support string and Message types in RepeatedPtrField.");
  944|  3.73k|  }
_ZN6google8protobuf16RepeatedPtrFieldINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEED2Ev:
 1285|  14.9k|RepeatedPtrField<Element>::~RepeatedPtrField() {
 1286|  14.9k|  StaticValidityCheck();
 1287|  14.9k|  if (!NeedsDestroy()) return;
  ------------------
  |  Branch (1287:7): [True: 12.6k, False: 2.32k]
  ------------------
 1288|  2.32k|#ifdef __cpp_if_constexpr
 1289|       |  if constexpr (std::is_base_of<MessageLite, Element>::value) {
 1290|       |#else
 1291|       |  if (std::is_base_of<MessageLite, Element>::value) {
 1292|       |#endif
 1293|       |    DestroyProtos();
 1294|  2.32k|  } else {
 1295|  2.32k|    Destroy<TypeHandler>();
 1296|  2.32k|  }
 1297|  2.32k|}
_ZN6google8protobuf8internal20RepeatedPtrFieldBase7DestroyINS1_18GenericTypeHandlerINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEEvv:
  220|  2.32k|  void Destroy() {
  221|  2.32k|    ABSL_DCHECK(NeedsDestroy());
  ------------------
  |  |   47|  2.32k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   40|  2.32k|  ABSL_LOG_INTERNAL_CHECK_IMPL(condition, condition_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  4.65k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  2.32k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  4.65k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  4.65k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 2.32k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  2.32k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 2.32k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  4.65k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 2.32k, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 2.32k]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 2.32k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  4.65k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  4.65k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  222|       |
  223|       |    // TODO: arena check is redundant once all `RepeatedPtrField`s
  224|       |    // with non-null arena are owned by the arena.
  225|  2.32k|    if (PROTOBUF_PREDICT_FALSE(arena_ != nullptr)) return;
  ------------------
  |  |  365|  2.32k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 2.32k]
  |  |  |  Branch (365:54): [Folded, False: 2.32k]
  |  |  |  Branch (365:63): [True: 0, False: 2.32k]
  |  |  ------------------
  ------------------
  226|       |
  227|  2.32k|    using H = CommonHandler<TypeHandler>;
  228|  2.32k|    int n = allocated_size();
  229|  2.32k|    void** elems = elements();
  230|  8.24k|    for (int i = 0; i < n; i++) {
  ------------------
  |  Branch (230:21): [True: 5.91k, False: 2.32k]
  ------------------
  231|  5.91k|      Delete<H>(elems[i], nullptr);
  232|  5.91k|    }
  233|  2.32k|    if (!using_sso()) {
  ------------------
  |  Branch (233:9): [True: 1.09k, False: 1.23k]
  ------------------
  234|  1.09k|      internal::SizedDelete(rep(),
  235|  1.09k|                            Capacity() * sizeof(elems[0]) + kRepHeaderSize);
  236|  1.09k|    }
  237|  2.32k|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase6DeleteINS1_18GenericTypeHandlerINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEEvPvPNS0_5ArenaE:
  669|  5.91k|  static inline void Delete(void* obj, Arena* arena) {
  670|  5.91k|    TypeHandler::Delete(cast<TypeHandler>(obj), arena);
  671|  5.91k|  }
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto10ConnectionEED2Ev:
 1285|  3.73k|RepeatedPtrField<Element>::~RepeatedPtrField() {
 1286|  3.73k|  StaticValidityCheck();
 1287|  3.73k|  if (!NeedsDestroy()) return;
  ------------------
  |  Branch (1287:7): [True: 3.46k, False: 269]
  ------------------
 1288|    269|#ifdef __cpp_if_constexpr
 1289|    269|  if constexpr (std::is_base_of<MessageLite, Element>::value) {
 1290|       |#else
 1291|       |  if (std::is_base_of<MessageLite, Element>::value) {
 1292|       |#endif
 1293|    269|    DestroyProtos();
 1294|       |  } else {
 1295|       |    Destroy<TypeHandler>();
 1296|       |  }
 1297|    269|}
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto9SetOptionEED2Ev:
 1285|  3.73k|RepeatedPtrField<Element>::~RepeatedPtrField() {
 1286|  3.73k|  StaticValidityCheck();
 1287|  3.73k|  if (!NeedsDestroy()) return;
  ------------------
  |  Branch (1287:7): [True: 737, False: 2.99k]
  ------------------
 1288|  2.99k|#ifdef __cpp_if_constexpr
 1289|  2.99k|  if constexpr (std::is_base_of<MessageLite, Element>::value) {
 1290|       |#else
 1291|       |  if (std::is_base_of<MessageLite, Element>::value) {
 1292|       |#endif
 1293|  2.99k|    DestroyProtos();
 1294|       |  } else {
 1295|       |    Destroy<TypeHandler>();
 1296|       |  }
 1297|  2.99k|}
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto9SetOptionEEC2ENS0_8internal18InternalVisibilityEPNS0_5ArenaE:
  970|  3.73k|      : RepeatedPtrField(arena) {}
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto9SetOptionEEC2EPNS0_5ArenaE:
 1263|  3.73k|    : RepeatedPtrFieldBase(arena) {
 1264|       |  // We can't have StaticValidityCheck here because that requires Element to be
 1265|       |  // a complete type, and in split repeated fields cases, we call
 1266|       |  // CreateMessage<RepeatedPtrField<T>> for incomplete Ts.
 1267|  3.73k|}
_ZN6google8protobuf16RepeatedPtrFieldINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEC2ENS0_8internal18InternalVisibilityEPNS0_5ArenaE:
  970|  7.47k|      : RepeatedPtrField(arena) {}
_ZN6google8protobuf16RepeatedPtrFieldINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEC2EPNS0_5ArenaE:
 1263|  7.47k|    : RepeatedPtrFieldBase(arena) {
 1264|       |  // We can't have StaticValidityCheck here because that requires Element to be
 1265|       |  // a complete type, and in split repeated fields cases, we call
 1266|       |  // CreateMessage<RepeatedPtrField<T>> for incomplete Ts.
 1267|  7.47k|}
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto10ConnectionEEC2ENS0_8internal18InternalVisibilityEPNS0_5ArenaE:
  970|  3.73k|      : RepeatedPtrField(arena) {}
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto10ConnectionEEC2EPNS0_5ArenaE:
 1263|  3.73k|    : RepeatedPtrFieldBase(arena) {
 1264|       |  // We can't have StaticValidityCheck here because that requires Element to be
 1265|       |  // a complete type, and in split repeated fields cases, we call
 1266|       |  // CreateMessage<RepeatedPtrField<T>> for incomplete Ts.
 1267|  3.73k|}
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto8MimePartEE19StaticValidityCheckEv:
  938|    638|  static constexpr PROTOBUF_ALWAYS_INLINE void StaticValidityCheck() {
  939|    638|    static_assert(
  940|    638|        absl::disjunction<
  941|    638|            internal::is_supported_string_type<Element>,
  942|    638|            internal::is_supported_message_type<Element>>::value,
  943|    638|        "We only support string and Message types in RepeatedPtrField.");
  944|    638|  }
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto8MimePartEED2Ev:
 1285|    638|RepeatedPtrField<Element>::~RepeatedPtrField() {
 1286|    638|  StaticValidityCheck();
 1287|    638|  if (!NeedsDestroy()) return;
  ------------------
  |  Branch (1287:7): [True: 130, False: 508]
  ------------------
 1288|    508|#ifdef __cpp_if_constexpr
 1289|    508|  if constexpr (std::is_base_of<MessageLite, Element>::value) {
 1290|       |#else
 1291|       |  if (std::is_base_of<MessageLite, Element>::value) {
 1292|       |#endif
 1293|    508|    DestroyProtos();
 1294|       |  } else {
 1295|       |    Destroy<TypeHandler>();
 1296|       |  }
 1297|    508|}
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto12MimeDataPartEE19StaticValidityCheckEv:
  938|    772|  static constexpr PROTOBUF_ALWAYS_INLINE void StaticValidityCheck() {
  939|    772|    static_assert(
  940|    772|        absl::disjunction<
  941|    772|            internal::is_supported_string_type<Element>,
  942|    772|            internal::is_supported_message_type<Element>>::value,
  943|    772|        "We only support string and Message types in RepeatedPtrField.");
  944|    772|  }
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto12MimeDataPartEED2Ev:
 1285|    772|RepeatedPtrField<Element>::~RepeatedPtrField() {
 1286|    772|  StaticValidityCheck();
 1287|    772|  if (!NeedsDestroy()) return;
  ------------------
  |  Branch (1287:7): [True: 188, False: 584]
  ------------------
 1288|    584|#ifdef __cpp_if_constexpr
 1289|    584|  if constexpr (std::is_base_of<MessageLite, Element>::value) {
 1290|       |#else
 1291|       |  if (std::is_base_of<MessageLite, Element>::value) {
 1292|       |#endif
 1293|    584|    DestroyProtos();
 1294|       |  } else {
 1295|       |    Destroy<TypeHandler>();
 1296|       |  }
 1297|    584|}
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto14WebSocketFrameEE19StaticValidityCheckEv:
  938|  4.07k|  static constexpr PROTOBUF_ALWAYS_INLINE void StaticValidityCheck() {
  939|  4.07k|    static_assert(
  940|  4.07k|        absl::disjunction<
  941|  4.07k|            internal::is_supported_string_type<Element>,
  942|  4.07k|            internal::is_supported_message_type<Element>>::value,
  943|  4.07k|        "We only support string and Message types in RepeatedPtrField.");
  944|  4.07k|  }
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto14WebSocketFrameEED2Ev:
 1285|  4.07k|RepeatedPtrField<Element>::~RepeatedPtrField() {
 1286|  4.07k|  StaticValidityCheck();
 1287|  4.07k|  if (!NeedsDestroy()) return;
  ------------------
  |  Branch (1287:7): [True: 3.67k, False: 395]
  ------------------
 1288|    395|#ifdef __cpp_if_constexpr
 1289|    395|  if constexpr (std::is_base_of<MessageLite, Element>::value) {
 1290|       |#else
 1291|       |  if (std::is_base_of<MessageLite, Element>::value) {
 1292|       |#endif
 1293|    395|    DestroyProtos();
 1294|       |  } else {
 1295|       |    Destroy<TypeHandler>();
 1296|       |  }
 1297|    395|}
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto14WebSocketFrameEEC2ENS0_8internal18InternalVisibilityEPNS0_5ArenaE:
  970|      1|      : RepeatedPtrField(arena) {}
_ZN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto14WebSocketFrameEEC2EPNS0_5ArenaE:
 1263|      1|    : RepeatedPtrFieldBase(arena) {
 1264|       |  // We can't have StaticValidityCheck here because that requires Element to be
 1265|       |  // a complete type, and in split repeated fields cases, we call
 1266|       |  // CreateMessage<RepeatedPtrField<T>> for incomplete Ts.
 1267|      1|}

_ZN6google8protobuf8internal11SerialArena17ReturnArrayMemoryEPvm:
  151|     60|  void ReturnArrayMemory(void* p, size_t size) {
  152|       |    // We only need to check for 32-bit platforms.
  153|       |    // In 64-bit platforms the minimum allocation size from Repeated*Field will
  154|       |    // be 16 guaranteed.
  155|     60|    if (sizeof(void*) < 8) {
  ------------------
  |  Branch (155:9): [Folded, False: 60]
  ------------------
  156|      0|      if (PROTOBUF_PREDICT_FALSE(size < 16)) return;
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  157|     60|    } else {
  158|     60|      PROTOBUF_ASSUME(size >= 16);
  ------------------
  |  |  944|     60|  if (!(pred)) {                                                               \
  |  |  ------------------
  |  |  |  Branch (944:7): [True: 4, False: 56]
  |  |  ------------------
  |  |  945|      4|    ::google::protobuf::internal::protobuf_assumption_failed(#pred, __FILE__, __LINE__); \
  |  |  946|      4|  }                                                                            \
  |  |  947|     60|  __builtin_assume(pred)
  ------------------
  159|     60|    }
  160|       |
  161|       |    // We round down to the next smaller block in case the memory doesn't match
  162|       |    // the pattern we are looking for. eg, someone might have called Reserve()
  163|       |    // on the repeated field.
  164|     60|    const size_t index = absl::bit_width(size) - 5;
  165|       |
  166|     60|    if (PROTOBUF_PREDICT_FALSE(index >= cached_block_length_)) {
  ------------------
  |  |  365|     60|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 60, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 56]
  |  |  |  Branch (365:63): [True: 56, False: 0]
  |  |  ------------------
  ------------------
  167|       |      // We can't put this object on the freelist so make this object the
  168|       |      // freelist. It is guaranteed it is larger than the one we have, and
  169|       |      // large enough to hold another allocation of `size`.
  170|     60|      CachedBlock** new_list = static_cast<CachedBlock**>(p);
  171|     60|      size_t new_size = size / sizeof(CachedBlock*);
  172|       |
  173|     60|      std::copy(cached_blocks_, cached_blocks_ + cached_block_length_,
  174|     60|                new_list);
  175|       |
  176|       |      // We need to unpoison this memory before filling it in case it has been
  177|       |      // poisoned by another sanitizer client.
  178|     60|      PROTOBUF_UNPOISON_MEMORY_REGION(
  179|     60|          new_list + cached_block_length_,
  180|     60|          (new_size - cached_block_length_) * sizeof(CachedBlock*));
  181|       |
  182|     60|      std::fill(new_list + cached_block_length_, new_list + new_size, nullptr);
  183|       |
  184|     60|      cached_blocks_ = new_list;
  185|       |      // Make the size fit in uint8_t. This is the power of two, so we don't
  186|       |      // need anything larger.
  187|     60|      cached_block_length_ =
  188|     60|          static_cast<uint8_t>(std::min(size_t{64}, new_size));
  189|       |
  190|     60|      return;
  191|     60|    }
  192|       |
  193|      0|    auto& cached_head = cached_blocks_[index];
  194|      0|    auto* new_node = static_cast<CachedBlock*>(p);
  195|      0|    new_node->next = cached_head;
  196|      0|    cached_head = new_node;
  197|      0|    PROTOBUF_POISON_MEMORY_REGION(p, size);
  198|      0|  }

_ZN6google8protobuf8internal15ThreadSafeArena17ReturnArrayMemoryEPvm:
   78|     60|  void ReturnArrayMemory(void* p, size_t size) {
   79|     60|    SerialArena* arena;
   80|     60|    if (PROTOBUF_PREDICT_TRUE(GetSerialArenaFast(&arena))) {
  ------------------
  |  |  364|     60|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 60, False: 0]
  |  |  |  Branch (364:53): [Folded, False: 60]
  |  |  |  Branch (364:62): [True: 60, False: 0]
  |  |  ------------------
  ------------------
   81|     60|      arena->ReturnArrayMemory(p, size);
   82|     60|    }
   83|     60|  }
_ZN6google8protobuf8internal15ThreadSafeArena18GetSerialArenaFastEPPNS1_11SerialArenaE:
  173|  1.45k|  PROTOBUF_NDEBUG_INLINE bool GetSerialArenaFast(SerialArena** arena) {
  174|       |    // If this thread already owns a block in this arena then try to use that.
  175|       |    // This fast path optimizes the case where multiple threads allocate from
  176|       |    // the same arena.
  177|  1.45k|    ThreadCache* tc = &thread_cache();
  178|  1.45k|    if (PROTOBUF_PREDICT_TRUE(tc->last_lifecycle_id_seen == tag_and_id_)) {
  ------------------
  |  |  364|  1.45k|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 1.45k, False: 0]
  |  |  |  Branch (364:53): [Folded, False: 1.45k]
  |  |  |  Branch (364:62): [True: 1.45k, False: 0]
  |  |  ------------------
  ------------------
  179|  1.45k|      *arena = tc->last_serial_arena;
  180|  1.45k|      return true;
  181|  1.45k|    }
  182|      0|    return false;
  183|  1.45k|  }
_ZN6google8protobuf8internal15ThreadSafeArena12thread_cacheEv:
  257|  1.46k|  static ThreadCache& thread_cache() { return thread_cache_; }

_ZN6google8protobuf15UnknownFieldSet16default_instanceEv:
  320|     19|inline const UnknownFieldSet& UnknownFieldSet::default_instance() {
  321|     19|  PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT static const UnknownFieldSet
  ------------------
  |  |  481|     19|#define PROTOBUF_ATTRIBUTE_NO_DESTROY [[clang::no_destroy]]
  ------------------
  322|     19|      instance;
  323|     19|  return instance;
  324|     19|}

_ZN6google8protobuf8internal14WireFormatLite7MakeTagEiNS2_8WireTypeE:
  828|  2.48k|                                                  WireType type) {
  829|  2.48k|  return GOOGLE_PROTOBUF_WIRE_FORMAT_MAKE_TAG(field_number, type);
  ------------------
  |  |  191|  2.48k|  static_cast<uint32_t>((static_cast<uint32_t>(FIELD_NUMBER) << 3) | (TYPE))
  ------------------
  830|  2.48k|}
_ZN6google8protobuf8internal14WireFormatLite15WriteTagToArrayEiNS2_8WireTypeEPh:
 1415|  2.48k|                                                uint8_t* target) {
 1416|  2.48k|  return io::CodedOutputStream::WriteTagToArray(MakeTag(field_number, type),
 1417|  2.48k|                                                target);
 1418|  2.48k|}
_ZN6google8protobuf8internal14WireFormatLite21WriteBoolNoTagToArrayEbPh:
 1476|    486|                                                      uint8_t* target) {
 1477|    486|  return io::CodedOutputStream::WriteVarint32ToArray(value ? 1 : 0, target);
  ------------------
  |  Branch (1477:54): [True: 184, False: 302]
  ------------------
 1478|    486|}
_ZN6google8protobuf8internal14WireFormatLite21WriteEnumNoTagToArrayEiPh:
 1480|  1.73k|                                                      uint8_t* target) {
 1481|  1.73k|  return io::CodedOutputStream::WriteVarint32SignExtendedToArray(value, target);
 1482|  1.73k|}
_ZN6google8protobuf8internal14WireFormatLite16WriteBoolToArrayEibPh:
 1648|    486|                                                 uint8_t* target) {
 1649|    486|  target = WriteTagToArray(field_number, WIRETYPE_VARINT, target);
 1650|    486|  return WriteBoolNoTagToArray(value, target);
 1651|    486|}
_ZN6google8protobuf8internal14WireFormatLite16WriteEnumToArrayEiiPh:
 1653|  1.73k|                                                 uint8_t* target) {
 1654|  1.73k|  target = WriteTagToArray(field_number, WIRETYPE_VARINT, target);
 1655|  1.73k|  return WriteEnumNoTagToArray(value, target);
 1656|  1.73k|}
_ZN6google8protobuf8internal14WireFormatLite8EnumSizeEi:
 1799|  1.71k|inline size_t WireFormatLite::EnumSize(int value) {
 1800|  1.71k|  return io::CodedOutputStream::VarintSize32SignExtended(value);
 1801|  1.71k|}
_ZN6google8protobuf8internal14WireFormatLite19LengthDelimitedSizeEm:
 1873|    530|inline size_t WireFormatLite::LengthDelimitedSize(size_t length) {
 1874|       |  // The static_cast here prevents an error in certain compiler configurations
 1875|       |  // but is not technically correct--if length is too large to fit in a uint32_t
 1876|       |  // then it will be silently truncated. We will need to fix this if we ever
 1877|       |  // decide to start supporting serialized messages greater than 2 GiB in size.
 1878|    530|  return length +
 1879|    530|         io::CodedOutputStream::VarintSize32(static_cast<uint32_t>(length));
 1880|    530|}

_ZNK6google8protobuf3Any12GetClassDataEv:
  220|  53.7k|const ::google::protobuf::internal::ClassData* Any::GetClassData() const {
  221|  53.7k|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
  222|  53.7k|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
  223|  53.7k|  return _class_data_.base();
  224|  53.7k|}
_ZNK6google8protobuf3Any11GetMetadataEv:
  383|  53.7k|::google::protobuf::Metadata Any::GetMetadata() const {
  384|  53.7k|  return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
  385|  53.7k|}

_ZN6google8protobuf8internal7cleanup9ChunkList7CleanupERKNS1_11SerialArenaE:
  148|      4|void ChunkList::Cleanup(const SerialArena& arena) {
  149|      4|  Chunk* c = head_;
  150|      4|  if (c == nullptr) return;
  ------------------
  |  Branch (150:7): [True: 4, False: 0]
  ------------------
  151|      0|  GetDeallocator deallocator(arena.parent_.AllocPolicy());
  152|       |
  153|       |  // Iterate backwards in order to destroy in the right order.
  154|      0|  CleanupNode* it = next_ - 1;
  155|      0|  while (true) {
  ------------------
  |  Branch (155:10): [True: 0, Folded]
  ------------------
  156|      0|    CleanupNode* first = c->First();
  157|       |    // A prefetch distance of 8 here was chosen arbitrarily.
  158|      0|    constexpr int kPrefetchDistance = 8;
  159|      0|    CleanupNode* prefetch = it;
  160|       |    // Prefetch the first kPrefetchDistance nodes.
  161|      0|    for (int i = 0; prefetch >= first && i < kPrefetchDistance;
  ------------------
  |  Branch (161:21): [True: 0, False: 0]
  |  Branch (161:42): [True: 0, False: 0]
  ------------------
  162|      0|         --prefetch, ++i) {
  163|      0|      prefetch->Prefetch();
  164|      0|    }
  165|       |    // For the middle nodes, run destructor and prefetch the node
  166|       |    // kPrefetchDistance after the current one.
  167|      0|    for (; prefetch >= first; --it, --prefetch) {
  ------------------
  |  Branch (167:12): [True: 0, False: 0]
  ------------------
  168|      0|      it->Destroy();
  169|      0|      prefetch->Prefetch();
  170|      0|    }
  171|       |    // Note: we could consider prefetching `next` chunk earlier.
  172|      0|    absl::PrefetchToLocalCacheNta(c->next);
  173|       |    // Destroy the rest without prefetching.
  174|      0|    for (; it >= first; --it) {
  ------------------
  |  Branch (174:12): [True: 0, False: 0]
  ------------------
  175|      0|      it->Destroy();
  176|      0|    }
  177|      0|    Chunk* next = c->next;
  178|      0|    deallocator({c, c->size});
  179|      0|    if (next == nullptr) return;
  ------------------
  |  Branch (179:9): [True: 0, False: 0]
  ------------------
  180|      0|    c = next;
  181|      0|    it = c->Last();
  182|      0|  };
  183|      0|}
_ZN6google8protobuf8internal11SerialArena23AllocateAlignedFallbackEm:
  272|     22|void* SerialArena::AllocateAlignedFallback(size_t n) {
  273|     22|  AllocateNewBlock(n);
  274|     22|  void* ret = nullptr;
  275|     22|  bool res = MaybeAllocateAligned(n, &ret);
  276|     22|  ABSL_DCHECK(res);
  ------------------
  |  |   47|     22|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|     22|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|     44|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|     22|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|     44|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|     44|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 22, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|     22|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 22]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|     22|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 22, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     44|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|     44|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  277|     22|  return ret;
  278|     22|}
_ZN6google8protobuf8internal11SerialArena31AllocateFromStringBlockFallbackEv:
  281|     18|void* SerialArena::AllocateFromStringBlockFallback() {
  282|     18|  ABSL_DCHECK_EQ(string_block_unused_.load(std::memory_order_relaxed), 0U);
  ------------------
  |  |   74|     18|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|     18|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     18|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 18]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  283|     18|  StringBlock* sb = string_block_.load(std::memory_order_relaxed);
  284|     18|  if (sb) {
  ------------------
  |  Branch (284:7): [True: 14, False: 4]
  ------------------
  285|     14|    AddSpaceUsed(sb->effective_size());
  286|     14|  }
  287|       |
  288|     18|  void* ptr;
  289|     18|  StringBlock* new_sb;
  290|     18|  size_t size = StringBlock::NextSize(sb);
  291|     18|  if (MaybeAllocateAligned(size, &ptr)) {
  ------------------
  |  Branch (291:7): [True: 13, False: 5]
  ------------------
  292|       |    // Correct space_used_ to avoid double counting
  293|     13|    AddSpaceUsed(-size);
  294|     13|    new_sb = StringBlock::Emplace(ptr, size, sb);
  295|     13|  } else {
  296|      5|    new_sb = StringBlock::New(sb);
  297|      5|    AddSpaceAllocated(new_sb->allocated_size());
  298|      5|  }
  299|     18|  string_block_.store(new_sb, std::memory_order_release);
  300|     18|  size_t unused = new_sb->effective_size() - sizeof(std::string);
  301|     18|  string_block_unused_.store(unused, std::memory_order_relaxed);
  302|     18|  return new_sb->AtOffset(unused);
  303|     18|}
_ZN6google8protobuf8internal11SerialArena16FreeStringBlocksEPNS1_11StringBlockEm:
  369|      4|                                     size_t unused_bytes) {
  370|      4|  ABSL_DCHECK(string_block != nullptr);
  ------------------
  |  |   47|      4|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      4|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      8|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      4|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      8|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      8|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      4|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      4|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 4, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      8|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      8|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  371|      4|  StringBlock* next = string_block->next();
  372|      4|  absl::PrefetchToLocalCacheNta(next);
  373|      4|  std::string* end = string_block->end();
  374|    138|  for (std::string* s = string_block->AtOffset(unused_bytes); s != end; ++s) {
  ------------------
  |  Branch (374:63): [True: 134, False: 4]
  ------------------
  375|    134|    s->~basic_string();
  376|    134|  }
  377|      4|  size_t deallocated = StringBlock::Delete(string_block);
  378|       |
  379|     18|  while ((string_block = next) != nullptr) {
  ------------------
  |  Branch (379:10): [True: 14, False: 4]
  ------------------
  380|     14|    next = string_block->next();
  381|     14|    absl::PrefetchToLocalCacheNta(next);
  382|    532|    for (std::string& s : *string_block) {
  ------------------
  |  Branch (382:25): [True: 532, False: 14]
  ------------------
  383|    532|      s.~basic_string();
  384|    532|    }
  385|     14|    deallocated += StringBlock::Delete(string_block);
  386|     14|  }
  387|      4|  return deallocated;
  388|      4|}
_ZN6google8protobuf8internal15ThreadSafeArena22SentrySerialArenaChunkEv:
  539|      4|ThreadSafeArena::SerialArenaChunk* ThreadSafeArena::SentrySerialArenaChunk() {
  540|       |  // const_cast is okay because the sentry chunk is never mutated. Also,
  541|       |  // reinterpret_cast is acceptable here as it should be identical to
  542|       |  // SerialArenaChunk with zero payload. This is a necessary trick to
  543|       |  // constexpr initialize kSentryArenaChunk.
  544|      4|  return reinterpret_cast<SerialArenaChunk*>(
  545|      4|      const_cast<SerialArenaChunkHeader*>(&kSentryArenaChunk));
  546|      4|}
_ZN6google8protobuf8internal15ThreadSafeArenaC2Ev:
  567|      4|ThreadSafeArena::ThreadSafeArena() : first_arena_(*this) { Init(); }
_ZN6google8protobuf8internal15ThreadSafeArena18GetNextLifeCycleIdEv:
  638|      4|uint64_t ThreadSafeArena::GetNextLifeCycleId() {
  639|      4|  ThreadCache& tc = thread_cache();
  640|      4|  uint64_t id = tc.next_lifecycle_id;
  641|      4|  constexpr uint64_t kInc = ThreadCache::kPerThreadIds;
  642|      4|  if (PROTOBUF_PREDICT_FALSE((id & (kInc - 1)) == 0)) {
  ------------------
  |  |  365|      4|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 1, False: 3]
  |  |  |  Branch (365:54): [Folded, False: 4]
  |  |  |  Branch (365:63): [True: 1, False: 3]
  |  |  ------------------
  ------------------
  643|       |    // On platforms that don't support uint64_t atomics we can certainly not
  644|       |    // afford to increment by large intervals and expect uniqueness due to
  645|       |    // wrapping, hence we only add by 1.
  646|      1|    id = lifecycle_id_.fetch_add(1, std::memory_order_relaxed) * kInc;
  647|      1|  }
  648|      4|  tc.next_lifecycle_id = id + 1;
  649|      4|  return id;
  650|      4|}
_ZN6google8protobuf8internal15ThreadSafeArena4InitEv:
  719|      4|void ThreadSafeArena::Init() {
  720|      4|  tag_and_id_ = GetNextLifeCycleId();
  721|      4|  arena_stats_ = Sample();
  722|      4|  head_.store(SentrySerialArenaChunk(), std::memory_order_relaxed);
  723|      4|  first_owner_ = &thread_cache();
  724|       |
  725|       |  // Record allocation for the first block that was either user-provided or
  726|       |  // newly allocated.
  727|      4|  ThreadSafeArenaStats::RecordAllocateStats(
  728|      4|      arena_stats_.MutableStats(),
  729|      4|      /*used=*/0,
  730|      4|      /*allocated=*/first_arena_.SpaceAllocated(),
  731|      4|      /*wasted=*/0);
  732|       |
  733|      4|  CacheSerialArena(&first_arena_);
  734|      4|}
_ZN6google8protobuf8internal15ThreadSafeArenaD2Ev:
  736|      4|ThreadSafeArena::~ThreadSafeArena() {
  737|       |  // Have to do this in a first pass, because some of the destructors might
  738|       |  // refer to memory in other blocks.
  739|      4|  CleanupList();
  740|       |
  741|      4|  auto mem = Free();
  742|      4|  if (alloc_policy_.is_user_owned_initial_block()) {
  ------------------
  |  Branch (742:7): [True: 0, False: 4]
  ------------------
  743|       |    // Unpoison the initial block, now that it's going back to the user.
  744|      0|    PROTOBUF_UNPOISON_MEMORY_REGION(mem.p, mem.n);
  745|      4|  } else if (mem.n > 0) {
  ------------------
  |  Branch (745:14): [True: 0, False: 4]
  ------------------
  746|      0|    GetDeallocator(alloc_policy_.get())(mem);
  747|      0|  }
  748|      4|}
_ZN6google8protobuf8internal15ThreadSafeArena4FreeEv:
  750|      4|SizedPtr ThreadSafeArena::Free() {
  751|      4|  auto deallocator = GetDeallocator(alloc_policy_.get());
  752|       |
  753|      4|  WalkSerialArenaChunk([&](SerialArenaChunk* chunk) {
  754|      4|    absl::Span<std::atomic<SerialArena*>> span = chunk->arenas();
  755|       |    // Walks arenas backward to handle the first serial arena the last. Freeing
  756|       |    // in reverse-order to the order in which objects were created may not be
  757|       |    // necessary to Free and we should revisit this. (b/247560530)
  758|      4|    for (auto it = span.rbegin(); it != span.rend(); ++it) {
  759|      4|      SerialArena* serial = it->load(std::memory_order_relaxed);
  760|      4|      ABSL_DCHECK_NE(serial, nullptr);
  761|       |      // Always frees the first block of "serial" as it cannot be user-provided.
  762|      4|      SizedPtr mem = serial->Free(deallocator);
  763|      4|      ABSL_DCHECK_NE(mem.p, nullptr);
  764|      4|      deallocator(mem);
  765|      4|    }
  766|       |
  767|       |    // Delete the chunk as we're done with it.
  768|      4|    internal::SizedDelete(chunk,
  769|      4|                          SerialArenaChunk::AllocSize(chunk->capacity()));
  770|      4|  });
  771|       |
  772|       |  // The first block of the first arena is special and let the caller handle it.
  773|      4|  return first_arena_.Free(deallocator);
  774|      4|}
_ZN6google8protobuf8internal15ThreadSafeArena14GetSerialArenaEv:
  823|    663|SerialArena* ThreadSafeArena::GetSerialArena() {
  824|    663|  SerialArena* arena;
  825|    663|  if (PROTOBUF_PREDICT_FALSE(!GetSerialArenaFast(&arena))) {
  ------------------
  |  |  365|    663|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 663]
  |  |  |  Branch (365:54): [Folded, False: 663]
  |  |  |  Branch (365:63): [True: 0, False: 663]
  |  |  ------------------
  ------------------
  826|      0|    arena = GetSerialArenaFallback(kMaxCleanupNodeSize);
  827|      0|  }
  828|    663|  return arena;
  829|    663|}
_ZN6google8protobuf8internal15ThreadSafeArena23AllocateFromStringBlockEv:
  839|    663|void* ThreadSafeArena::AllocateFromStringBlock() {
  840|    663|  return GetSerialArena()->AllocateFromStringBlock();
  841|    663|}
_ZN6google8protobuf8internal15ThreadSafeArena11CleanupListEv:
  917|      4|void ThreadSafeArena::CleanupList() {
  918|       |#ifdef PROTOBUF_ASAN
  919|       |  UnpoisonAllArenaBlocks();
  920|       |#endif
  921|       |
  922|      4|  WalkSerialArenaChunk([](SerialArenaChunk* chunk) {
  923|      4|    absl::Span<std::atomic<SerialArena*>> span = chunk->arenas();
  924|       |    // Walks arenas backward to handle the first serial arena the last.
  925|       |    // Destroying in reverse-order to the construction is often assumed by users
  926|       |    // and required not to break inter-object dependencies. (b/247560530)
  927|      4|    for (auto it = span.rbegin(); it != span.rend(); ++it) {
  928|      4|      SerialArena* serial = it->load(std::memory_order_relaxed);
  929|      4|      ABSL_DCHECK_NE(serial, nullptr);
  930|      4|      serial->CleanupList();
  931|      4|    }
  932|      4|  });
  933|       |  // First arena must be cleaned up last. (b/247560530)
  934|      4|  first_arena_.CleanupList();
  935|      4|}
_ZN6google8protobuf5Arena8AllocateEm:
  974|    577|void* Arena::Allocate(size_t n) { return impl_.AllocateAligned(n); }
_ZN6google8protobuf5Arena16AllocateForArrayEm:
  976|    148|void* Arena::AllocateForArray(size_t n) {
  977|    148|  return impl_.AllocateAligned<internal::AllocationClient::kArray>(n);
  978|    148|}
arena.cc:_ZN6google8protobuf8internal12_GLOBAL__N_114AllocationSizeEmmm:
   64|     22|                             size_t max_size) {
   65|     22|  if (last_size == 0) return start_size;
  ------------------
  |  Branch (65:7): [True: 4, False: 18]
  ------------------
   66|       |  // Double the current block size, up to a limit.
   67|     18|  return std::min(2 * last_size, max_size);
   68|     22|}
arena.cc:_ZN6google8protobuf8internal12_GLOBAL__N_114AllocateMemoryERKNS1_16AllocationPolicyEm:
   70|     22|SizedPtr AllocateMemory(const AllocationPolicy& policy, size_t size) {
   71|     22|  if (policy.block_alloc == nullptr) {
  ------------------
  |  Branch (71:7): [True: 22, False: 0]
  ------------------
   72|     22|    return AllocateAtLeast(size);
   73|     22|  }
   74|      0|  return {policy.block_alloc(size), size};
   75|     22|}
arena.cc:_ZN6google8protobuf8internal12_GLOBAL__N_114GetDeallocatorC2EPKNS1_16AllocationPolicyE:
  105|      4|      : dealloc_(policy ? policy->block_dealloc : nullptr) {}
  ------------------
  |  Branch (105:18): [True: 0, False: 4]
  ------------------
arena.cc:_ZNK6google8protobuf8internal12_GLOBAL__N_114GetDeallocatorclENS1_8SizedPtrE:
  107|     22|  void operator()(SizedPtr mem) const {
  108|     22|    if (dealloc_) {
  ------------------
  |  Branch (108:9): [True: 0, False: 22]
  ------------------
  109|      0|      dealloc_(mem.p, mem.n);
  110|     22|    } else {
  111|     22|      internal::SizedDelete(mem.p, mem.n);
  112|     22|    }
  113|     22|  }
_ZN6google8protobuf8internal11SerialArena16AllocateNewBlockEm:
  313|     22|void SerialArena::AllocateNewBlock(size_t n) {
  314|     22|  size_t used = 0;
  315|     22|  size_t wasted = 0;
  316|     22|  ArenaBlock* old_head = head();
  317|     22|  if (!old_head->IsSentry()) {
  ------------------
  |  Branch (317:7): [True: 18, False: 4]
  ------------------
  318|       |    // Record how much used in this block.
  319|     18|    used = static_cast<size_t>(ptr() - old_head->Pointer(kBlockHeaderSize));
  320|     18|    wasted = old_head->size - used - kBlockHeaderSize;
  321|     18|    AddSpaceUsed(used);
  322|     18|  }
  323|       |
  324|       |  // TODO: Evaluate if pushing unused space into the cached blocks is a
  325|       |  // win. In preliminary testing showed increased memory savings as expected,
  326|       |  // but with a CPU regression. The regression might have been an artifact of
  327|       |  // the microbenchmark.
  328|       |
  329|     22|  auto mem = AllocateBlock(parent_.AllocPolicy(), old_head->size, n);
  330|     22|  AddSpaceAllocated(mem.n);
  331|     22|  ThreadSafeArenaStats::RecordAllocateStats(parent_.arena_stats_.MutableStats(),
  332|     22|                                            /*used=*/used,
  333|     22|                                            /*allocated=*/mem.n, wasted);
  334|     22|  auto* new_head = new (mem.p) ArenaBlock{old_head, mem.n};
  335|     22|  set_range(new_head->Pointer(kBlockHeaderSize), new_head->Limit());
  336|       |  // Previous writes must take effect before writing new head.
  337|     22|  head_.store(new_head, std::memory_order_release);
  338|       |
  339|     22|  PROTOBUF_POISON_MEMORY_REGION(ptr(), limit_ - ptr());
  340|     22|}
_ZN6google8protobuf8internal11SerialArenaC2ERNS1_15ThreadSafeArenaE:
  218|      4|    : head_{SentryArenaBlock()}, parent_{parent} {}
arena.cc:_ZN6google8protobuf8internal12_GLOBAL__N_116SentryArenaBlockEv:
   56|      4|ArenaBlock* SentryArenaBlock() {
   57|      4|  static const ArenaBlock kSentryArenaBlock;
   58|       |  // const_cast<> is okay as kSentryArenaBlock will never be mutated.
   59|      4|  return const_cast<ArenaBlock*>(&kSentryArenaBlock);
   60|      4|}
arena.cc:_ZN6google8protobuf8internal12_GLOBAL__N_113AllocateBlockEPKNS1_16AllocationPolicyEmm:
   78|     22|                       size_t min_bytes) {
   79|     22|  AllocationPolicy policy;  // default policy
   80|     22|  if (policy_ptr) policy = *policy_ptr;
  ------------------
  |  Branch (80:7): [True: 0, False: 22]
  ------------------
   81|     22|  size_t size =
   82|     22|      AllocationSize(last_size, policy.start_block_size, policy.max_block_size);
   83|       |  // Verify that min_bytes + kBlockHeaderSize won't overflow.
   84|     22|  ABSL_CHECK_LE(min_bytes, std::numeric_limits<size_t>::max() -
  ------------------
  |  |   54|     22|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   52|     22|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|     22|  while (                                                                      \
  |  |  |  |  |  |   62|     22|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 22]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|     22|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|     22|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|     22|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|     22|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|     22|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|     22|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   85|     22|                               SerialArena::kBlockHeaderSize);
   86|     22|  size = std::max(size, SerialArena::kBlockHeaderSize + min_bytes);
   87|       |
   88|     22|  return AllocateMemory(policy, size);
   89|     22|}
_ZNK6google8protobuf8internal15ThreadSafeArena16SerialArenaChunk8IsSentryEv:
  439|      8|  bool IsSentry() const { return capacity() == 0; }
_ZNK6google8protobuf8internal15ThreadSafeArena16SerialArenaChunk8capacityEv:
  449|      8|  uint32_t capacity() const { return header().capacity; }
_ZNK6google8protobuf8internal15ThreadSafeArena16SerialArenaChunk6headerEv:
  518|      8|  const SerialArenaChunkHeader& header() const {
  519|      8|    return *layout_type::Partial().Pointer<kHeader>(ptr());
  520|      8|  }
_ZNK6google8protobuf8internal15ThreadSafeArena16SerialArenaChunk3ptrEv:
  512|      8|  const char* ptr() const { return reinterpret_cast<const char*>(this); }
arena.cc:_ZN6google8protobuf8internal11SerialArena4FreeINS1_12_GLOBAL__N_114GetDeallocatorEEENS1_8SizedPtrET_:
  258|      4|SizedPtr SerialArena::Free(Deallocator deallocator) {
  259|      4|  FreeStringBlocks();
  260|       |
  261|      4|  ArenaBlock* b = head();
  262|      4|  SizedPtr mem = {b, b->size};
  263|     26|  while (b->next) {
  ------------------
  |  Branch (263:10): [True: 22, False: 4]
  ------------------
  264|     22|    b = b->next;  // We must first advance before deleting this block
  265|     22|    deallocator(mem);
  266|     22|    mem = {b, b->size};
  267|     22|  }
  268|      4|  return mem;
  269|      4|}
arena.cc:_ZN6google8protobuf8internal15ThreadSafeArena20WalkSerialArenaChunkIZNS2_4FreeEvE3$_0EEvT_:
  855|      4|void ThreadSafeArena::WalkSerialArenaChunk(Callback fn) {
  856|       |  // By omitting an Acquire barrier we help the sanitizer that any user code
  857|       |  // that doesn't properly synchronize Reset() or the destructor will throw a
  858|       |  // TSAN warning.
  859|      4|  SerialArenaChunk* chunk = head_.load(std::memory_order_relaxed);
  860|       |
  861|      4|  while (!chunk->IsSentry()) {
  ------------------
  |  Branch (861:10): [True: 0, False: 4]
  ------------------
  862|       |    // Cache next chunk in case this chunk is destroyed.
  863|      0|    SerialArenaChunk* next_chunk = chunk->next_chunk();
  864|       |    // Prefetch the next chunk.
  865|      0|    absl::PrefetchToLocalCache(next_chunk);
  866|      0|    fn(chunk);
  867|      0|    chunk = next_chunk;
  868|      0|  }
  869|      4|}
arena.cc:_ZN6google8protobuf8internal15ThreadSafeArena20WalkSerialArenaChunkIZNS2_11CleanupListEvE3$_0EEvT_:
  855|      4|void ThreadSafeArena::WalkSerialArenaChunk(Callback fn) {
  856|       |  // By omitting an Acquire barrier we help the sanitizer that any user code
  857|       |  // that doesn't properly synchronize Reset() or the destructor will throw a
  858|       |  // TSAN warning.
  859|      4|  SerialArenaChunk* chunk = head_.load(std::memory_order_relaxed);
  860|       |
  861|      4|  while (!chunk->IsSentry()) {
  ------------------
  |  Branch (861:10): [True: 0, False: 4]
  ------------------
  862|       |    // Cache next chunk in case this chunk is destroyed.
  863|      0|    SerialArenaChunk* next_chunk = chunk->next_chunk();
  864|       |    // Prefetch the next chunk.
  865|      0|    absl::PrefetchToLocalCache(next_chunk);
  866|      0|    fn(chunk);
  867|      0|    chunk = next_chunk;
  868|      0|  }
  869|      4|}

_ZN6google8protobuf5ArenaC2Ev:
  173|      4|  inline Arena() : impl_() {}
_ZN6google8protobuf8internal23CanMoveWithInternalSwapEPNS0_5ArenaES3_:
  101|    259|inline bool CanMoveWithInternalSwap(Arena* lhs, Arena* rhs) {
  102|    259|  if (DebugHardenForceCopyInMove()) {
  ------------------
  |  Branch (102:7): [Folded, False: 259]
  ------------------
  103|       |    // We force copy in move when we are not using an arena.
  104|       |    // If we did with an arena we would grow arena usage too much.
  105|      0|    return lhs != nullptr && lhs == rhs;
  ------------------
  |  Branch (105:12): [True: 0, False: 0]
  |  Branch (105:30): [True: 0, False: 0]
  ------------------
  106|    259|  } else {
  107|    259|    return lhs == rhs;
  108|    259|  }
  109|    259|}
_ZN6google8protobuf5Arena16AllocateInternalINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEELb0EEEPvv:
  706|    663|inline void* Arena::AllocateInternal<std::string, false>() {
  707|    663|  return impl_.AllocateFromStringBlock();
  708|    663|}
_ZZN6google8protobuf5Arena6CreateINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEJEEEPT_PS1_DpOT0_ENKUlDpOT_E0_clIJEEEDaSI_:
  244|  6.58k|        [arena](auto&&... args) {
  245|  6.58k|          if (PROTOBUF_PREDICT_FALSE(arena == nullptr)) {
  ------------------
  |  |  365|  6.58k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 5.91k, False: 663]
  |  |  |  Branch (365:54): [Folded, False: 6.58k]
  |  |  |  Branch (365:63): [True: 5.91k, False: 663]
  |  |  ------------------
  ------------------
  246|  5.91k|            return new T(std::forward<Args>(args)...);
  247|  5.91k|          }
  248|    663|          return new (arena->AllocateInternal<T>())
  249|    663|              T(std::forward<Args>(args)...);
  250|  6.58k|        },
_ZN6google8protobuf5Arena6CreateINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEJEEEPT_PS1_DpOT0_:
  216|  6.58k|  PROTOBUF_NDEBUG_INLINE static T* Create(Arena* arena, Args&&... args) {
  217|  6.58k|    return absl::utility_internal::IfConstexprElse<
  218|  6.58k|        is_arena_constructable<T>::value>(
  219|       |        // Arena-constructable
  220|  6.58k|        [arena](auto&&... args) {
  221|  6.58k|          using Type = std::remove_const_t<T>;
  222|       |#ifdef __cpp_if_constexpr
  223|       |          // DefaultConstruct/CopyConstruct are optimized for messages, which
  224|       |          // are both arena constructible and destructor skippable and they
  225|       |          // assume much. Don't use these functions unless the invariants
  226|       |          // hold.
  227|       |          if constexpr (is_destructor_skippable<T>::value) {
  228|       |            constexpr auto construct_type = GetConstructType<T, Args&&...>();
  229|       |            // We delegate to DefaultConstruct/CopyConstruct where appropriate
  230|       |            // because protobuf generated classes have external templates for
  231|       |            // these functions for code size reasons. When `if constexpr` is not
  232|       |            // available always use the fallback.
  233|       |            if constexpr (construct_type == ConstructType::kDefault) {
  234|       |              return static_cast<Type*>(DefaultConstruct<Type>(arena));
  235|       |            } else if constexpr (construct_type == ConstructType::kCopy) {
  236|       |              return static_cast<Type*>(CopyConstruct<Type>(arena, &args...));
  237|       |            }
  238|       |          }
  239|       |#endif
  240|  6.58k|          return CreateArenaCompatible<Type>(arena,
  241|  6.58k|                                             std::forward<Args>(args)...);
  242|  6.58k|        },
  243|       |        // Non arena-constructable
  244|  6.58k|        [arena](auto&&... args) {
  245|  6.58k|          if (PROTOBUF_PREDICT_FALSE(arena == nullptr)) {
  246|  6.58k|            return new T(std::forward<Args>(args)...);
  247|  6.58k|          }
  248|  6.58k|          return new (arena->AllocateInternal<T>())
  249|  6.58k|              T(std::forward<Args>(args)...);
  250|  6.58k|        },
  251|  6.58k|        std::forward<Args>(args)...);
  252|  6.58k|  }
_ZN6google8protobuf5Arena11CreateArrayINS0_8internal12ExtensionSet8KeyValueEEEPT_PS1_m:
  286|    502|                                               size_t num_elements) {
  287|    502|    static_assert(std::is_trivial<T>::value,
  288|    502|                  "CreateArray requires a trivially constructible type");
  289|    502|    static_assert(std::is_trivially_destructible<T>::value,
  290|    502|                  "CreateArray requires a trivially destructible type");
  291|    502|    ABSL_CHECK_LE(num_elements, std::numeric_limits<size_t>::max() / sizeof(T))
  ------------------
  |  |   54|      0|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   52|    502|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|    502|  while (                                                                      \
  |  |  |  |  |  |   62|    502|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 502]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|    502|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|    502|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|    502|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|    502|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|    502|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|    502|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|    502|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|    502|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  292|      0|        << "Requested size is too large to fit into size_t.";
  293|    502|    if (PROTOBUF_PREDICT_FALSE(arena == nullptr)) {
  ------------------
  |  |  365|    502|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 502, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 502]
  |  |  |  Branch (365:63): [True: 502, False: 0]
  |  |  ------------------
  ------------------
  294|    502|      return new T[num_elements];
  295|    502|    } else {
  296|       |      // We count on compiler to realize that if sizeof(T) is a multiple of
  297|       |      // 8 AlignUpTo can be elided.
  298|      0|      return static_cast<T*>(
  299|      0|          arena->AllocateAlignedForArray(sizeof(T) * num_elements, alignof(T)));
  300|      0|    }
  301|    502|  }
_ZN6google8protobuf5ArenaD2Ev:
  198|      4|  inline ~Arena() = default;
_ZN6google8protobuf5Arena6CreateINS0_19FileDescriptorProtoEJEEEPT_PS1_DpOT0_:
  216|      4|  PROTOBUF_NDEBUG_INLINE static T* Create(Arena* arena, Args&&... args) {
  217|      4|    return absl::utility_internal::IfConstexprElse<
  218|      4|        is_arena_constructable<T>::value>(
  219|       |        // Arena-constructable
  220|      4|        [arena](auto&&... args) {
  221|      4|          using Type = std::remove_const_t<T>;
  222|       |#ifdef __cpp_if_constexpr
  223|       |          // DefaultConstruct/CopyConstruct are optimized for messages, which
  224|       |          // are both arena constructible and destructor skippable and they
  225|       |          // assume much. Don't use these functions unless the invariants
  226|       |          // hold.
  227|       |          if constexpr (is_destructor_skippable<T>::value) {
  228|       |            constexpr auto construct_type = GetConstructType<T, Args&&...>();
  229|       |            // We delegate to DefaultConstruct/CopyConstruct where appropriate
  230|       |            // because protobuf generated classes have external templates for
  231|       |            // these functions for code size reasons. When `if constexpr` is not
  232|       |            // available always use the fallback.
  233|       |            if constexpr (construct_type == ConstructType::kDefault) {
  234|       |              return static_cast<Type*>(DefaultConstruct<Type>(arena));
  235|       |            } else if constexpr (construct_type == ConstructType::kCopy) {
  236|       |              return static_cast<Type*>(CopyConstruct<Type>(arena, &args...));
  237|       |            }
  238|       |          }
  239|       |#endif
  240|      4|          return CreateArenaCompatible<Type>(arena,
  241|      4|                                             std::forward<Args>(args)...);
  242|      4|        },
  243|       |        // Non arena-constructable
  244|      4|        [arena](auto&&... args) {
  245|      4|          if (PROTOBUF_PREDICT_FALSE(arena == nullptr)) {
  246|      4|            return new T(std::forward<Args>(args)...);
  247|      4|          }
  248|      4|          return new (arena->AllocateInternal<T>())
  249|      4|              T(std::forward<Args>(args)...);
  250|      4|        },
  251|      4|        std::forward<Args>(args)...);
  252|      4|  }
_ZZN6google8protobuf5Arena6CreateINS0_19FileDescriptorProtoEJEEEPT_PS1_DpOT0_ENKUlDpOT_E_clIJEEEDaSC_:
  220|      4|        [arena](auto&&... args) {
  221|      4|          using Type = std::remove_const_t<T>;
  222|       |#ifdef __cpp_if_constexpr
  223|       |          // DefaultConstruct/CopyConstruct are optimized for messages, which
  224|       |          // are both arena constructible and destructor skippable and they
  225|       |          // assume much. Don't use these functions unless the invariants
  226|       |          // hold.
  227|       |          if constexpr (is_destructor_skippable<T>::value) {
  228|       |            constexpr auto construct_type = GetConstructType<T, Args&&...>();
  229|       |            // We delegate to DefaultConstruct/CopyConstruct where appropriate
  230|       |            // because protobuf generated classes have external templates for
  231|       |            // these functions for code size reasons. When `if constexpr` is not
  232|       |            // available always use the fallback.
  233|       |            if constexpr (construct_type == ConstructType::kDefault) {
  234|       |              return static_cast<Type*>(DefaultConstruct<Type>(arena));
  235|       |            } else if constexpr (construct_type == ConstructType::kCopy) {
  236|       |              return static_cast<Type*>(CopyConstruct<Type>(arena, &args...));
  237|       |            }
  238|       |          }
  239|       |#endif
  240|      4|          return CreateArenaCompatible<Type>(arena,
  241|      4|                                             std::forward<Args>(args)...);
  242|      4|        },
_ZN6google8protobuf5Arena21CreateArenaCompatibleINS0_19FileDescriptorProtoEEEPT_PS1_:
  547|      4|  PROTOBUF_NDEBUG_INLINE static T* CreateArenaCompatible(Arena* arena) {
  548|      4|    static_assert(is_arena_constructable<T>::value,
  549|      4|                  "Can only construct types that are ArenaConstructable");
  550|      4|    if (PROTOBUF_PREDICT_FALSE(arena == nullptr)) {
  ------------------
  |  |  365|      4|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 4]
  |  |  |  Branch (365:54): [Folded, False: 4]
  |  |  |  Branch (365:63): [True: 0, False: 4]
  |  |  ------------------
  ------------------
  551|       |      // Generated arena constructor T(Arena*) is protected. Call via
  552|       |      // InternalHelper.
  553|      0|      return InternalHelper<T>::New();
  554|      4|    } else {
  555|      4|      return arena->DoCreateMessage<T>();
  556|      4|    }
  557|      4|  }
_ZN6google8protobuf5Arena15DoCreateMessageINS0_19FileDescriptorProtoEJEEEPT_DpOT0_:
  588|      4|  PROTOBUF_NDEBUG_INLINE T* DoCreateMessage(Args&&... args) {
  589|      4|    return InternalHelper<T>::Construct(
  590|      4|        AllocateInternal<T, is_destructor_skippable<T>::value>(), this,
  591|      4|        std::forward<Args>(args)...);
  592|      4|  }
_ZN6google8protobuf5Arena14InternalHelperINS0_19FileDescriptorProtoEE9ConstructIJPS1_EEEPS3_PvDpOT_:
  457|      4|    static T* Construct(void* ptr, Args&&... args) {
  458|      4|      return new (ptr) T(static_cast<Args&&>(args)...);
  459|      4|    }
_ZN6google8protobuf5Arena16AllocateInternalINS0_19FileDescriptorProtoELb1EEEPvv:
  560|      4|  PROTOBUF_NDEBUG_INLINE void* AllocateInternal() {
  561|      4|    if (trivial) {
  ------------------
  |  Branch (561:9): [True: 4, Folded]
  ------------------
  562|      4|      return AllocateAligned(sizeof(T), alignof(T));
  563|      4|    } else {
  564|       |      // We avoid instantiating arena_destruct_object<T> in the trivial case.
  565|      0|      constexpr auto dtor = &internal::cleanup::arena_destruct_object<
  566|      0|          std::conditional_t<trivial, std::string, T>>;
  567|      0|      return AllocateAlignedWithCleanup(sizeof(T), alignof(T), dtor);
  568|      0|    }
  569|      4|  }

_ZN6google8protobuf8internal25TaggedAllocationPolicyPtrC2Ev:
   43|      4|  constexpr TaggedAllocationPolicyPtr() : policy_(0) {}
_ZN6google8protobuf8internal25TaggedAllocationPolicyPtr3getEv:
   53|      4|  AllocationPolicy* get() {
   54|      4|    return reinterpret_cast<AllocationPolicy*>(policy_ & kPtrMask);
   55|      4|  }
_ZNK6google8protobuf8internal25TaggedAllocationPolicyPtr3getEv:
   56|     22|  const AllocationPolicy* get() const {
   57|     22|    return reinterpret_cast<const AllocationPolicy*>(policy_ & kPtrMask);
   58|     22|  }
_ZNK6google8protobuf8internal25TaggedAllocationPolicyPtr27is_user_owned_initial_blockEv:
   66|      4|  bool is_user_owned_initial_block() const {
   67|      4|    return static_cast<bool>(get_mask<kUserOwnedInitialBlock>());
   68|      4|  }
_ZNK6google8protobuf8internal25TaggedAllocationPolicyPtr8get_maskILm1EEEmv:
   84|      4|  uintptr_t get_mask() const {
   85|      4|    return policy_ & kMask;
   86|      4|  }

_ZN6google8protobuf8internal14ArenaStringPtr3SetEN4absl12lts_2024011611string_viewEPNS0_5ArenaE:
  100|  2.93k|void ArenaStringPtr::Set(absl::string_view value, Arena* arena) {
  101|  2.93k|  ScopedCheckPtrInvariants check(&tagged_ptr_);
  102|  2.93k|  if (IsDefault()) {
  ------------------
  |  Branch (102:7): [True: 88, False: 2.84k]
  ------------------
  103|       |    // If we're not on an arena, skip straight to a true string to avoid
  104|       |    // possible copy cost later.
  105|     88|    tagged_ptr_ = arena != nullptr ? CreateArenaString(*arena, value)
  ------------------
  |  Branch (105:19): [True: 0, False: 88]
  ------------------
  106|     88|                                   : CreateString(value);
  107|  2.84k|  } else {
  108|  2.84k|    if (internal::DebugHardenForceCopyDefaultString()) {
  ------------------
  |  Branch (108:9): [Folded, False: 2.84k]
  ------------------
  109|      0|      if (arena == nullptr) {
  ------------------
  |  Branch (109:11): [True: 0, False: 0]
  ------------------
  110|      0|        auto* old = tagged_ptr_.GetIfAllocated();
  111|      0|        tagged_ptr_ = CreateString(value);
  112|      0|        delete old;
  113|      0|      } else {
  114|      0|        auto* old = UnsafeMutablePointer();
  115|      0|        tagged_ptr_ = CreateArenaString(*arena, value);
  116|      0|        old->assign("garbagedata");
  117|      0|      }
  118|  2.84k|    } else {
  119|  2.84k|      UnsafeMutablePointer()->assign(value.data(), value.length());
  120|  2.84k|    }
  121|  2.84k|  }
  122|  2.93k|}
_ZN6google8protobuf8internal14ArenaStringPtr3SetEONSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS0_5ArenaE:
  149|    798|void ArenaStringPtr::Set(std::string&& value, Arena* arena) {
  150|    798|  ScopedCheckPtrInvariants check(&tagged_ptr_);
  151|    798|  if (IsDefault()) {
  ------------------
  |  Branch (151:7): [True: 0, False: 798]
  ------------------
  152|      0|    NewString(arena, std::move(value));
  153|    798|  } else if (IsFixedSizeArena()) {
  ------------------
  |  Branch (153:14): [True: 0, False: 798]
  ------------------
  154|      0|    std::string* current = tagged_ptr_.Get();
  155|      0|    auto* s = new (current) std::string(std::move(value));
  156|      0|    arena->OwnDestructor(s);
  157|      0|    tagged_ptr_.SetMutableArena(s);
  158|    798|  } else /* !IsFixedSizeArena() */ {
  159|    798|    *UnsafeMutablePointer() = std::move(value);
  160|    798|  }
  161|    798|}
_ZN6google8protobuf8internal14ArenaStringPtr7MutableEPNS0_5ArenaE:
  163|  14.9k|std::string* ArenaStringPtr::Mutable(Arena* arena) {
  164|  14.9k|  ScopedCheckPtrInvariants check(&tagged_ptr_);
  165|  14.9k|  if (tagged_ptr_.IsMutable()) {
  ------------------
  |  Branch (165:7): [True: 8.26k, False: 6.65k]
  ------------------
  166|  8.26k|    return tagged_ptr_.Get();
  167|  8.26k|  } else {
  168|  6.65k|    return MutableSlow(arena);
  169|  6.65k|  }
  170|  14.9k|}
_ZN6google8protobuf8internal14ArenaStringPtr13MutableNoCopyEPNS0_5ArenaE:
  182|  14.5k|std::string* ArenaStringPtr::MutableNoCopy(Arena* arena) {
  183|  14.5k|  ScopedCheckPtrInvariants check(&tagged_ptr_);
  184|  14.5k|  if (tagged_ptr_.IsMutable()) {
  ------------------
  |  Branch (184:7): [True: 0, False: 14.5k]
  ------------------
  185|      0|    return tagged_ptr_.Get();
  186|  14.5k|  } else {
  187|  14.5k|    ABSL_DCHECK(IsDefault());
  ------------------
  |  |   47|  14.5k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  14.5k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  29.1k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  14.5k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  29.1k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  29.1k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 14.5k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  14.5k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 14.5k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  14.5k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 14.5k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  29.1k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  29.1k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  188|       |    // Allocate empty. The contents are not relevant.
  189|  14.5k|    return NewString(arena);
  190|  14.5k|  }
  191|  14.5k|}
_ZN6google8protobuf8internal14ArenaStringPtr7DestroyEv:
  237|  27.8k|void ArenaStringPtr::Destroy() {
  238|  27.8k|  delete tagged_ptr_.GetIfAllocated();
  239|  27.8k|}
_ZN6google8protobuf8internal14ArenaStringPtr12ClearToEmptyEv:
  241|  7.46k|void ArenaStringPtr::ClearToEmpty() {
  242|  7.46k|  ScopedCheckPtrInvariants check(&tagged_ptr_);
  243|  7.46k|  if (IsDefault()) {
  ------------------
  |  Branch (243:7): [True: 7.46k, False: 0]
  ------------------
  244|       |    // Already set to default -- do nothing.
  245|  7.46k|  } else {
  246|       |    // Unconditionally mask away the tag.
  247|       |    //
  248|       |    // UpdateArenaString uses assign when capacity is larger than the new
  249|       |    // value, which is trivially true in the donated string case.
  250|       |    // const_cast<std::string*>(PtrValue<std::string>())->clear();
  251|      0|    tagged_ptr_.Get()->clear();
  252|      0|  }
  253|  7.46k|}
_ZN6google8protobuf8internal18EpsCopyInputStream15ReadArenaStringEPKcPNS1_14ArenaStringPtrEPNS0_5ArenaE:
  268|    663|                                                Arena* arena) {
  269|    663|  ScopedCheckPtrInvariants check(&s->tagged_ptr_);
  270|    663|  ABSL_DCHECK(arena != nullptr);
  ------------------
  |  |   47|    663|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|    663|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  1.32k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    663|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  1.32k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  1.32k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 663, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    663|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 663]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|    663|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 663, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.32k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  1.32k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  271|       |
  272|    663|  int size = ReadSize(&ptr);
  273|    663|  if (!ptr) return nullptr;
  ------------------
  |  Branch (273:7): [True: 0, False: 663]
  ------------------
  274|       |
  275|    663|  auto* str = s->NewString(arena);
  276|    663|  ptr = ReadString(ptr, size, str);
  277|    663|  GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
  ------------------
  |  | 1157|    663|  GOOGLE_PROTOBUF_ASSERT_RETURN(predicate, nullptr)
  |  |  ------------------
  |  |  |  | 1150|    663|  if (!(predicate)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1150:7): [True: 0, False: 663]
  |  |  |  |  ------------------
  |  |  |  | 1151|      0|    /*  ::raise(SIGINT);  */                           \
  |  |  |  | 1152|      0|    /*  ABSL_LOG(ERROR) << "Parse failure";  */        \
  |  |  |  | 1153|      0|    return ret;                                        \
  |  |  |  | 1154|      0|  }
  |  |  ------------------
  ------------------
  278|    663|  return ptr;
  279|    663|}
arenastring.cc:_ZN6google8protobuf8internal12_GLOBAL__N_112CreateStringEN4absl12lts_2024011611string_viewE:
   76|     88|inline TaggedStringPtr CreateString(absl::string_view value) {
   77|     88|  TaggedStringPtr res;
   78|     88|  res.SetAllocated(new std::string(value.data(), value.length()));
   79|     88|  return res;
   80|     88|}
arenastring.cc:_ZN6google8protobuf8internal12_GLOBAL__N_124ScopedCheckPtrInvariantsC2EPKNS1_15TaggedStringPtrE:
   70|  41.3k|  explicit ScopedCheckPtrInvariants(const TaggedStringPtr*) {}
_ZN6google8protobuf8internal14ArenaStringPtr11MutableSlowIJEEEPNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS0_5ArenaEDpRKT_:
  195|  6.65k|                                         const Lazy&... lazy_default) {
  196|  6.65k|  ABSL_DCHECK(IsDefault());
  ------------------
  |  |   47|  6.65k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  6.65k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  13.3k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  6.65k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  13.3k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  13.3k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 6.65k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  6.65k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 6.65k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  6.65k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 6.65k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  13.3k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  13.3k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  197|       |
  198|       |  // For empty defaults, this ends up calling the default constructor which is
  199|       |  // more efficient than a copy construction from
  200|       |  // GetEmptyStringAlreadyInited().
  201|  6.65k|  return NewString(arena, lazy_default.get()...);
  202|  6.65k|}

_ZN6google8protobuf8internal15TaggedStringPtr12SetAllocatedEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
  122|  21.3k|  inline std::string* SetAllocated(std::string* p) {
  123|  21.3k|    return TagAs(kAllocated, p);
  124|  21.3k|  }
_ZN6google8protobuf8internal15TaggedStringPtr15SetMutableArenaEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
  136|    663|  inline std::string* SetMutableArena(std::string* p) {
  137|    663|    return TagAs(kMutableArena, p);
  138|    663|  }
_ZNK6google8protobuf8internal15TaggedStringPtr9IsMutableEv:
  141|  29.5k|  inline bool IsMutable() const { return as_int() & kMutableBit; }
_ZNK6google8protobuf8internal15TaggedStringPtr14GetIfAllocatedEv:
  148|  27.8k|  inline std::string* GetIfAllocated() const {
  149|  27.8k|    auto allocated = as_int() ^ kAllocated;
  150|  27.8k|    if (allocated & kMask) return nullptr;
  ------------------
  |  Branch (150:9): [True: 6.58k, False: 21.2k]
  ------------------
  151|       |
  152|  21.2k|    auto ptr = reinterpret_cast<std::string*>(allocated);
  153|  21.2k|    PROTOBUF_ASSUME(ptr != nullptr);
  ------------------
  |  |  941|  21.2k|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  ------------------
  154|  21.2k|    return ptr;
  155|  27.8k|  }
_ZN6google8protobuf8internal15TaggedStringPtr14assert_alignedEPKv:
  186|  21.9k|  static inline void assert_aligned(const void* p) {
  187|  21.9k|    static_assert(kMask <= alignof(void*), "Pointer underaligned for bit mask");
  188|  21.9k|    static_assert(kMask <= alignof(std::string),
  189|  21.9k|                  "std::string underaligned for bit mask");
  190|  21.9k|    ABSL_DCHECK_EQ(reinterpret_cast<uintptr_t>(p) & kMask, 0UL);
  ------------------
  |  |   74|  21.9k|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|  21.9k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  21.9k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 21.9k]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  21.9k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  191|  21.9k|  }
_ZN6google8protobuf8internal15TaggedStringPtr5TagAsENS2_4TypeEPNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  196|  21.9k|  inline std::string* TagAs(Type type, std::string* p) {
  197|  21.9k|    ABSL_DCHECK(p != nullptr);
  ------------------
  |  |   47|  21.9k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  21.9k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  43.9k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  21.9k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  43.9k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  43.9k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 21.9k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  21.9k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 21.9k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  21.9k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 21.9k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  43.9k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  43.9k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  198|  21.9k|    assert_aligned(p);
  199|  21.9k|    ptr_ = reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(p) | type);
  200|  21.9k|    return p;
  201|  21.9k|  }
_ZNK6google8protobuf8internal14ArenaStringPtr9IsDefaultEv:
  392|  11.2k|  inline bool IsDefault() const { return tagged_ptr_.IsDefault(); }
_ZNK6google8protobuf8internal14ArenaStringPtr16IsFixedSizeArenaEv:
  408|    798|  bool IsFixedSizeArena() const { return false; }
_ZN6google8protobuf8internal14ArenaStringPtr20UnsafeMutablePointerEv:
  529|  3.64k|inline std::string* ArenaStringPtr::UnsafeMutablePointer() {
  530|  3.64k|  ABSL_DCHECK(tagged_ptr_.IsMutable());
  ------------------
  |  |   47|  3.64k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  3.64k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  7.29k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  3.64k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  7.29k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  7.29k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 3.64k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  3.64k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 3.64k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  3.64k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 3.64k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.29k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  7.29k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  531|  3.64k|  ABSL_DCHECK(tagged_ptr_.Get() != nullptr);
  ------------------
  |  |   47|  3.64k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  3.64k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  10.9k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  3.64k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  7.29k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  7.29k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 3.64k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  3.64k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 3.64k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  3.64k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 3.64k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  10.9k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  10.9k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  532|  3.64k|  return tagged_ptr_.Get();
  533|  3.64k|}
_ZN6google8protobuf8internal14ArenaStringPtr9NewStringIJEEEPNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS0_5ArenaEDpOT_:
  396|  21.9k|  inline std::string* NewString(Arena* arena, Args&&... args) {
  397|  21.9k|    if (arena == nullptr) {
  ------------------
  |  Branch (397:9): [True: 21.2k, False: 663]
  ------------------
  398|  21.2k|      auto* s = new std::string(std::forward<Args>(args)...);
  399|  21.2k|      return tagged_ptr_.SetAllocated(s);
  400|  21.2k|    } else {
  401|    663|      auto* s = Arena::Create<std::string>(arena, std::forward<Args>(args)...);
  402|    663|      return tagged_ptr_.SetMutableArena(s);
  403|    663|    }
  404|  21.9k|  }

_ZN6google8protobuf8internal20ThreadSafeArenaStats19RecordAllocateStatsEPS2_mmm:
  169|     26|                                  size_t /*allocated*/, size_t /*wasted*/) {}
_ZN6google8protobuf8internal26ThreadSafeArenaStatsHandleC2EPNS1_20ThreadSafeArenaStatsE:
  178|      4|  explicit ThreadSafeArenaStatsHandle(ThreadSafeArenaStats*) {}
_ZN6google8protobuf8internal26ThreadSafeArenaStatsHandle12MutableStatsEv:
  182|     26|  ThreadSafeArenaStats* MutableStats() { return nullptr; }
_ZN6google8protobuf8internal6SampleEv:
  198|      4|inline ThreadSafeArenaStatsHandle Sample() {
  199|      4|  return ThreadSafeArenaStatsHandle(nullptr);
  200|      4|}

_ZN2pb11CppFeaturesD2Ev:
  187|    490|CppFeatures::~CppFeatures() {
  188|       |  // @@protoc_insertion_point(destructor:pb.CppFeatures)
  189|    490|  SharedDtor(*this);
  190|    490|}
_ZNK2pb11CppFeatures12GetClassDataEv:
  228|  2.25k|const ::google::protobuf::internal::ClassData* CppFeatures::GetClassData() const {
  229|  2.25k|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
  230|  2.25k|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
  231|  2.25k|  return _class_data_.base();
  232|  2.25k|}
_ZNK2pb11CppFeatures18_InternalSerializeEPhPN6google8protobuf2io19EpsCopyOutputStreamE:
  305|    239|            ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  306|    239|          const CppFeatures& this_ = *this;
  307|    239|#endif  // PROTOBUF_CUSTOM_VTABLE
  308|       |          // @@protoc_insertion_point(serialize_to_array_start:pb.CppFeatures)
  309|    239|          ::uint32_t cached_has_bits = 0;
  310|    239|          (void)cached_has_bits;
  311|       |
  312|    239|          cached_has_bits = this_._impl_._has_bits_[0];
  313|       |          // optional bool legacy_closed_enum = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {
  314|    239|          if (cached_has_bits & 0x00000002u) {
  ------------------
  |  Branch (314:15): [True: 239, False: 0]
  ------------------
  315|    239|            target = stream->EnsureSpace(target);
  316|    239|            target = ::_pbi::WireFormatLite::WriteBoolToArray(
  317|    239|                1, this_._internal_legacy_closed_enum(), target);
  318|    239|          }
  319|       |
  320|       |          // optional .pb.CppFeatures.StringType string_type = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {
  321|    239|          if (cached_has_bits & 0x00000001u) {
  ------------------
  |  Branch (321:15): [True: 239, False: 0]
  ------------------
  322|    239|            target = stream->EnsureSpace(target);
  323|    239|            target = ::_pbi::WireFormatLite::WriteEnumToArray(
  324|    239|                2, this_._internal_string_type(), target);
  325|    239|          }
  326|       |
  327|       |          // optional bool enum_name_uses_string_view = 3 [retention = RETENTION_SOURCE, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = {
  328|    239|          if (cached_has_bits & 0x00000004u) {
  ------------------
  |  Branch (328:15): [True: 239, False: 0]
  ------------------
  329|    239|            target = stream->EnsureSpace(target);
  330|    239|            target = ::_pbi::WireFormatLite::WriteBoolToArray(
  331|    239|                3, this_._internal_enum_name_uses_string_view(), target);
  332|    239|          }
  333|       |
  334|    239|          if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
  ------------------
  |  |  365|    239|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 239]
  |  |  |  Branch (365:54): [Folded, False: 239]
  |  |  |  Branch (365:63): [True: 0, False: 239]
  |  |  ------------------
  ------------------
  335|      0|            target =
  336|      0|                ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  337|      0|                    this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  338|      0|          }
  339|       |          // @@protoc_insertion_point(serialize_to_array_end:pb.CppFeatures)
  340|    239|          return target;
  341|    239|        }
_ZNK2pb11CppFeatures12ByteSizeLongEv:
  347|    474|        ::size_t CppFeatures::ByteSizeLong() const {
  348|    474|          const CppFeatures& this_ = *this;
  349|    474|#endif  // PROTOBUF_CUSTOM_VTABLE
  350|       |          // @@protoc_insertion_point(message_byte_size_start:pb.CppFeatures)
  351|    474|          ::size_t total_size = 0;
  352|       |
  353|    474|          ::uint32_t cached_has_bits = 0;
  354|       |          // Prevent compiler warnings about cached_has_bits being unused
  355|    474|          (void)cached_has_bits;
  356|       |
  357|    474|          ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  358|    474|          cached_has_bits = this_._impl_._has_bits_[0];
  359|    474|          if (cached_has_bits & 0x00000007u) {
  ------------------
  |  Branch (359:15): [True: 239, False: 235]
  ------------------
  360|       |            // optional .pb.CppFeatures.StringType string_type = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {
  361|    239|            if (cached_has_bits & 0x00000001u) {
  ------------------
  |  Branch (361:17): [True: 239, False: 0]
  ------------------
  362|    239|              total_size += 1 +
  363|    239|                            ::_pbi::WireFormatLite::EnumSize(this_._internal_string_type());
  364|    239|            }
  365|       |            // optional bool legacy_closed_enum = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {
  366|    239|            if (cached_has_bits & 0x00000002u) {
  ------------------
  |  Branch (366:17): [True: 239, False: 0]
  ------------------
  367|    239|              total_size += 2;
  368|    239|            }
  369|       |            // optional bool enum_name_uses_string_view = 3 [retention = RETENTION_SOURCE, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = {
  370|    239|            if (cached_has_bits & 0x00000004u) {
  ------------------
  |  Branch (370:17): [True: 239, False: 0]
  ------------------
  371|    239|              total_size += 2;
  372|    239|            }
  373|    239|          }
  374|    474|          return this_.MaybeComputeUnknownFieldsSize(total_size,
  375|    474|                                                     &this_._impl_._cached_size_);
  376|    474|        }
_ZN2pb11CppFeatures9MergeImplERN6google8protobuf11MessageLiteERKS3_:
  378|    749|void CppFeatures::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
  379|    749|  auto* const _this = static_cast<CppFeatures*>(&to_msg);
  380|    749|  auto& from = static_cast<const CppFeatures&>(from_msg);
  381|       |  // @@protoc_insertion_point(class_specific_merge_from_start:pb.CppFeatures)
  382|    749|  ABSL_DCHECK_NE(&from, _this);
  ------------------
  |  |   76|    749|  ABSL_LOG_INTERNAL_DCHECK_NE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   88|    749|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    749|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 749]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    749|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  383|    749|  ::uint32_t cached_has_bits = 0;
  384|    749|  (void) cached_has_bits;
  385|       |
  386|    749|  cached_has_bits = from._impl_._has_bits_[0];
  387|    749|  if (cached_has_bits & 0x00000007u) {
  ------------------
  |  Branch (387:7): [True: 498, False: 251]
  ------------------
  388|    498|    if (cached_has_bits & 0x00000001u) {
  ------------------
  |  Branch (388:9): [True: 494, False: 4]
  ------------------
  389|    494|      _this->_impl_.string_type_ = from._impl_.string_type_;
  390|    494|    }
  391|    498|    if (cached_has_bits & 0x00000002u) {
  ------------------
  |  Branch (391:9): [True: 494, False: 4]
  ------------------
  392|    494|      _this->_impl_.legacy_closed_enum_ = from._impl_.legacy_closed_enum_;
  393|    494|    }
  394|    498|    if (cached_has_bits & 0x00000004u) {
  ------------------
  |  Branch (394:9): [True: 494, False: 4]
  ------------------
  395|    494|      _this->_impl_.enum_name_uses_string_view_ = from._impl_.enum_name_uses_string_view_;
  396|    494|    }
  397|    498|  }
  398|    749|  _this->_impl_._has_bits_[0] |= cached_has_bits;
  399|    749|  _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  400|    749|}
_ZNK2pb11CppFeatures11GetMetadataEv:
  422|      2|::google::protobuf::Metadata CppFeatures::GetMetadata() const {
  423|      2|  return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
  424|      2|}
_ZN2pb11CppFeatures10SharedDtorERN6google8protobuf11MessageLiteE:
  191|    490|inline void CppFeatures::SharedDtor(MessageLite& self) {
  192|    490|  CppFeatures& this_ = static_cast<CppFeatures&>(self);
  193|    490|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  194|    490|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|    490|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|    490|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|    980|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    490|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|    980|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|    980|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 490, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    490|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 490]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|    490|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 490, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    980|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|    980|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  195|    490|  this_._impl_.~Impl_();
  196|    490|}

_ZN2pb11CppFeatures10descriptorEv:
  147|      2|  static const ::google::protobuf::Descriptor* descriptor() {
  148|      2|    return GetDescriptor();
  149|      2|  }
_ZN2pb11CppFeatures13GetDescriptorEv:
  150|      2|  static const ::google::protobuf::Descriptor* GetDescriptor() {
  151|      2|    return default_instance().GetMetadata().descriptor;
  152|      2|  }
_ZNK2pb11CppFeatures15has_string_typeEv:
  392|    235|inline bool CppFeatures::has_string_type() const {
  393|    235|  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
  394|    235|  return value;
  395|    235|}
_ZNK2pb11CppFeatures28_internal_legacy_closed_enumEv:
  382|    239|inline bool CppFeatures::_internal_legacy_closed_enum() const {
  383|    239|  ::google::protobuf::internal::TSanRead(&_impl_);
  384|    239|  return _impl_.legacy_closed_enum_;
  385|    239|}
_ZNK2pb11CppFeatures21_internal_string_typeEv:
  410|    478|inline ::pb::CppFeatures_StringType CppFeatures::_internal_string_type() const {
  411|    478|  ::google::protobuf::internal::TSanRead(&_impl_);
  412|    478|  return static_cast<::pb::CppFeatures_StringType>(_impl_.string_type_);
  413|    478|}
_ZN2pb11CppFeatures16default_instanceEv:
  156|    238|  static const CppFeatures& default_instance() {
  157|    238|    return *internal_default_instance();
  158|    238|  }
_ZN2pb11CppFeatures25internal_default_instanceEv:
  159|    238|  static inline const CppFeatures* internal_default_instance() {
  160|    238|    return reinterpret_cast<const CppFeatures*>(
  161|    238|        &_CppFeatures_default_instance_);
  162|    238|  }
_ZNK2pb11CppFeatures36_internal_enum_name_uses_string_viewEv:
  439|    239|inline bool CppFeatures::_internal_enum_name_uses_string_view() const {
  440|    239|  ::google::protobuf::internal::TSanRead(&_impl_);
  441|    239|  return _impl_.enum_name_uses_string_view_;
  442|    239|}

_ZN6google8protobuf14DescriptorPool6TablesC2Ev:
 1609|      2|DescriptorPool::Tables::Tables() {
 1610|      2|  well_known_types_.insert({
 1611|      2|      {"google.protobuf.DoubleValue", Descriptor::WELLKNOWNTYPE_DOUBLEVALUE},
 1612|      2|      {"google.protobuf.FloatValue", Descriptor::WELLKNOWNTYPE_FLOATVALUE},
 1613|      2|      {"google.protobuf.Int64Value", Descriptor::WELLKNOWNTYPE_INT64VALUE},
 1614|      2|      {"google.protobuf.UInt64Value", Descriptor::WELLKNOWNTYPE_UINT64VALUE},
 1615|      2|      {"google.protobuf.Int32Value", Descriptor::WELLKNOWNTYPE_INT32VALUE},
 1616|      2|      {"google.protobuf.UInt32Value", Descriptor::WELLKNOWNTYPE_UINT32VALUE},
 1617|      2|      {"google.protobuf.StringValue", Descriptor::WELLKNOWNTYPE_STRINGVALUE},
 1618|      2|      {"google.protobuf.BytesValue", Descriptor::WELLKNOWNTYPE_BYTESVALUE},
 1619|      2|      {"google.protobuf.BoolValue", Descriptor::WELLKNOWNTYPE_BOOLVALUE},
 1620|      2|      {"google.protobuf.Any", Descriptor::WELLKNOWNTYPE_ANY},
 1621|      2|      {"google.protobuf.FieldMask", Descriptor::WELLKNOWNTYPE_FIELDMASK},
 1622|      2|      {"google.protobuf.Duration", Descriptor::WELLKNOWNTYPE_DURATION},
 1623|      2|      {"google.protobuf.Timestamp", Descriptor::WELLKNOWNTYPE_TIMESTAMP},
 1624|      2|      {"google.protobuf.Value", Descriptor::WELLKNOWNTYPE_VALUE},
 1625|      2|      {"google.protobuf.ListValue", Descriptor::WELLKNOWNTYPE_LISTVALUE},
 1626|      2|      {"google.protobuf.Struct", Descriptor::WELLKNOWNTYPE_STRUCT},
 1627|      2|  });
 1628|      2|}
_ZN6google8protobuf20FileDescriptorTablesC2Ev:
 1632|      4|FileDescriptorTables::FileDescriptorTables() = default;
_ZN6google8protobuf14DescriptorPool6Tables13AddCheckpointEv:
 1645|      4|void DescriptorPool::Tables::AddCheckpoint() {
 1646|      4|  checkpoints_.emplace_back(this);
 1647|      4|}
_ZN6google8protobuf14DescriptorPool6Tables19ClearLastCheckpointEv:
 1649|      4|void DescriptorPool::Tables::ClearLastCheckpoint() {
 1650|      4|  ABSL_DCHECK(!checkpoints_.empty());
  ------------------
  |  |   47|      4|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      4|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      8|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      4|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      8|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      8|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      4|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      4|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 4, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      8|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      8|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1651|      4|  checkpoints_.pop_back();
 1652|      4|  if (checkpoints_.empty()) {
  ------------------
  |  Branch (1652:7): [True: 4, False: 0]
  ------------------
 1653|       |    // All checkpoints have been cleared: we can now commit all of the pending
 1654|       |    // data.
 1655|      4|    symbols_after_checkpoint_.clear();
 1656|      4|    files_after_checkpoint_.clear();
 1657|      4|    extensions_after_checkpoint_.clear();
 1658|      4|  }
 1659|      4|}
_ZN6google8protobuf14DescriptorPool6Tables9AddSymbolEN4absl12lts_2024011611string_viewENS0_6SymbolE:
 1929|    504|                                       Symbol symbol) {
 1930|    504|  ABSL_DCHECK_EQ(full_name, symbol.full_name());
  ------------------
  |  |   74|    504|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|    504|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    504|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 504]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    504|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1931|    504|  if (symbols_by_name_.insert(symbol).second) {
  ------------------
  |  Branch (1931:7): [True: 504, False: 0]
  ------------------
 1932|    504|    symbols_after_checkpoint_.push_back(symbol);
 1933|    504|    return true;
 1934|    504|  } else {
 1935|      0|    return false;
 1936|      0|  }
 1937|    504|}
_ZN6google8protobuf20FileDescriptorTables19AddAliasUnderParentEPKvN4absl12lts_2024011611string_viewENS0_6SymbolE:
 1941|    688|                                               Symbol symbol) {
 1942|    688|  ABSL_DCHECK_EQ(name, symbol.parent_name_key().second);
  ------------------
  |  |   74|    688|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|    688|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    688|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 688]
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 688]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    688|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1943|    688|  ABSL_DCHECK_EQ(parent, symbol.parent_name_key().first);
  ------------------
  |  |   74|    688|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|    688|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    688|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 688]
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 688]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    688|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1944|    688|  return symbols_by_parent_.insert(symbol).second;
 1945|    688|}
_ZN6google8protobuf14DescriptorPool6Tables7AddFileEPKNS0_14FileDescriptorE:
 1947|      4|bool DescriptorPool::Tables::AddFile(const FileDescriptor* file) {
 1948|      4|  if (files_by_name_.insert(file).second) {
  ------------------
  |  Branch (1948:7): [True: 4, False: 0]
  ------------------
 1949|      4|    files_after_checkpoint_.push_back(file);
 1950|      4|    return true;
 1951|      4|  } else {
 1952|      0|    return false;
 1953|      0|  }
 1954|      4|}
_ZN6google8protobuf20FileDescriptorTables14FinalizeTablesEv:
 1956|      4|void FileDescriptorTables::FinalizeTables() {}
_ZN6google8protobuf20FileDescriptorTables16AddFieldByNumberEPNS0_15FieldDescriptorE:
 1958|    235|bool FileDescriptorTables::AddFieldByNumber(FieldDescriptor* field) {
 1959|       |  // Skip fields that are at the start of the sequence.
 1960|    235|  if (field->containing_type() != nullptr && field->number() >= 1 &&
  ------------------
  |  Branch (1960:7): [True: 235, False: 0]
  |  Branch (1960:46): [True: 235, False: 0]
  ------------------
 1961|    235|      field->number() <= field->containing_type()->sequential_field_limit_) {
  ------------------
  |  Branch (1961:7): [True: 127, False: 108]
  ------------------
 1962|    127|    if (field->is_extension()) {
  ------------------
  |  Branch (1962:9): [True: 0, False: 127]
  ------------------
 1963|       |      // Conflicts with the field that already exists in the sequential range.
 1964|      0|      return false;
 1965|      0|    }
 1966|       |    // Only return true if the field at that index matches. Otherwise it
 1967|       |    // conflicts with the existing field in the sequential range.
 1968|    127|    return field->containing_type()->field(field->number() - 1) == field;
 1969|    127|  }
 1970|       |
 1971|    108|  return fields_by_number_.insert(field).second;
 1972|    235|}
_ZN6google8protobuf20FileDescriptorTables20AddEnumValueByNumberEPNS0_19EnumValueDescriptorE:
 1974|    190|bool FileDescriptorTables::AddEnumValueByNumber(EnumValueDescriptor* value) {
 1975|       |  // Skip values that are at the start of the sequence.
 1976|    190|  const int base = value->type()->value(0)->number();
 1977|    190|  if (base <= value->number() &&
  ------------------
  |  Branch (1977:7): [True: 190, False: 0]
  ------------------
 1978|    190|      value->number() <=
  ------------------
  |  Branch (1978:7): [True: 95, False: 95]
  ------------------
 1979|    190|          static_cast<int64_t>(base) + value->type()->sequential_value_limit_)
 1980|     95|    return true;
 1981|     95|  return enum_values_by_number_.insert(value).second;
 1982|    190|}
_ZN6google8protobuf14DescriptorPool6Tables12AddExtensionEPKNS0_15FieldDescriptorE:
 1984|      1|bool DescriptorPool::Tables::AddExtension(const FieldDescriptor* field) {
 1985|      1|  auto it_inserted =
 1986|      1|      extensions_.insert({{field->containing_type(), field->number()}, field});
 1987|      1|  if (it_inserted.second) {
  ------------------
  |  Branch (1987:7): [True: 1, False: 0]
  ------------------
 1988|      1|    extensions_after_checkpoint_.push_back(it_inserted.first->first);
 1989|      1|    return true;
 1990|      1|  } else {
 1991|      0|    return false;
 1992|      0|  }
 1993|      1|}
_ZN6google8protobuf14DescriptorPool6Tables16InternFeatureSetEONS0_10FeatureSetE:
 1996|    239|    FeatureSet&& features) {
 1997|       |  // Use the serialized feature set as the cache key.  If multiple equivalent
 1998|       |  // feature sets serialize to different strings, that just bloats the cache a
 1999|       |  // little.
 2000|    239|  auto& result = feature_set_cache_[features.SerializeAsString()];
 2001|    239|  if (result == nullptr) {
  ------------------
  |  Branch (2001:7): [True: 4, False: 235]
  ------------------
 2002|      4|    result = absl::make_unique<FeatureSet>(std::move(features));
 2003|      4|  }
 2004|    239|  return result.get();
 2005|    239|}
_ZN6google8protobuf14DescriptorPool6Tables13AllocateBytesEi:
 2016|      3|void* DescriptorPool::Tables::AllocateBytes(int size) {
 2017|      3|  if (size == 0) return nullptr;
  ------------------
  |  Branch (2017:7): [True: 0, False: 3]
  ------------------
 2018|      3|  void* p = ::operator new(size + RoundUpTo<8>(sizeof(int)));
 2019|      3|  int* sizep = static_cast<int*>(p);
 2020|      3|  misc_allocs_.emplace_back(sizep);
 2021|      3|  *sizep = size;
 2022|      3|  return static_cast<char*>(p) + RoundUpTo<8>(sizeof(int));
 2023|      3|}
_ZN6google8protobuf14DescriptorPoolC2EPNS0_18DescriptorDatabaseEPNS1_14ErrorCollectorE:
 2113|      2|    : mutex_(new absl::Mutex),
 2114|      2|      fallback_database_(fallback_database),
 2115|      2|      default_error_collector_(error_collector),
 2116|      2|      underlay_(nullptr),
 2117|      2|      tables_(new Tables),
 2118|      2|      enforce_dependencies_(true),
 2119|      2|      lazily_build_dependencies_(false),
 2120|      2|      allow_unknown_(false),
 2121|      2|      enforce_weak_(false),
 2122|      2|      enforce_extension_declarations_(false),
 2123|      2|      disallow_enforce_utf8_(false),
 2124|      2|      deprecated_legacy_json_field_conflicts_(false) {}
_ZN6google8protobuf14DescriptorPool31InternalDontEnforceDependenciesEv:
 2147|      2|void DescriptorPool::InternalDontEnforceDependencies() {
 2148|      2|  enforce_dependencies_ = false;
 2149|      2|}
_ZN6google8protobuf14DescriptorPool23internal_generated_poolEv:
 2204|     63|DescriptorPool* DescriptorPool::internal_generated_pool() {
 2205|     63|  static DescriptorPool* generated_pool =
 2206|     63|      internal::OnShutdownDelete(NewGeneratedPool());
 2207|     63|  return generated_pool;
 2208|     63|}
_ZN6google8protobuf14DescriptorPool14generated_poolEv:
 2210|      2|const DescriptorPool* DescriptorPool::generated_pool() {
 2211|      2|  const DescriptorPool* pool = internal_generated_pool();
 2212|       |  // Ensure that descriptor.proto and cpp_features.proto get registered in the
 2213|       |  // generated pool. They're special cases because they're included in the full
 2214|       |  // runtime. We have to avoid registering it pre-main, because we need to
 2215|       |  // ensure that the linker --gc-sections step can strip out the full runtime if
 2216|       |  // it is unused.
 2217|      2|  DescriptorProto::descriptor();
 2218|      2|  pb::CppFeatures::descriptor();
 2219|      2|  return pool;
 2220|      2|}
_ZN6google8protobuf14DescriptorPool24InternalAddGeneratedFileEPKvi:
 2224|      6|    const void* encoded_file_descriptor, int size) {
 2225|       |  // So, this function is called in the process of initializing the
 2226|       |  // descriptors for generated proto classes.  Each generated .pb.cc file
 2227|       |  // has an internal procedure called AddDescriptors() which is called at
 2228|       |  // process startup, and that function calls this one in order to register
 2229|       |  // the raw bytes of the FileDescriptorProto representing the file.
 2230|       |  //
 2231|       |  // We do not actually construct the descriptor objects right away.  We just
 2232|       |  // hang on to the bytes until they are actually needed.  We actually construct
 2233|       |  // the descriptor the first time one of the following things happens:
 2234|       |  // * Someone calls a method like descriptor(), GetDescriptor(), or
 2235|       |  //   GetReflection() on the generated types, which requires returning the
 2236|       |  //   descriptor or an object based on it.
 2237|       |  // * Someone looks up the descriptor in DescriptorPool::generated_pool().
 2238|       |  //
 2239|       |  // Once one of these happens, the DescriptorPool actually parses the
 2240|       |  // FileDescriptorProto and generates a FileDescriptor (and all its children)
 2241|       |  // based on it.
 2242|       |  //
 2243|       |  // Note that FileDescriptorProto is itself a generated protocol message.
 2244|       |  // Therefore, when we parse one, we have to be very careful to avoid using
 2245|       |  // any descriptor-based operations, since this might cause infinite recursion
 2246|       |  // or deadlock.
 2247|      6|  absl::MutexLockMaybe lock(internal_generated_pool()->mutex_);
 2248|      6|  ABSL_CHECK(GeneratedDatabase()->Add(encoded_file_descriptor, size));
  ------------------
  |  |   41|      6|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|     12|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      6|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|     12|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|     12|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 6, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      6|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 6]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|     12|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 6, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 6]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 6]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|     12|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|     12|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2249|      6|}
_ZNK6google8protobuf14DescriptorPool14FindFileByNameEN4absl12lts_2024011611string_viewE:
 2259|      4|    absl::string_view name) const {
 2260|      4|  DeferredValidation deferred_validation(this);
 2261|      4|  const FileDescriptor* result = nullptr;
 2262|      4|  {
 2263|      4|    absl::MutexLockMaybe lock(mutex_);
 2264|      4|    if (fallback_database_ != nullptr) {
  ------------------
  |  Branch (2264:9): [True: 4, False: 0]
  ------------------
 2265|      4|      tables_->known_bad_symbols_.clear();
 2266|      4|      tables_->known_bad_files_.clear();
 2267|      4|    }
 2268|      4|    result = tables_->FindFile(name);
 2269|      4|    if (result != nullptr) return result;
  ------------------
  |  Branch (2269:9): [True: 0, False: 4]
  ------------------
 2270|      4|    if (underlay_ != nullptr) {
  ------------------
  |  Branch (2270:9): [True: 0, False: 4]
  ------------------
 2271|      0|      result = underlay_->FindFileByName(name);
 2272|      0|      if (result != nullptr) return result;
  ------------------
  |  Branch (2272:11): [True: 0, False: 0]
  ------------------
 2273|      0|    }
 2274|      4|    if (TryFindFileInFallbackDatabase(name, deferred_validation)) {
  ------------------
  |  Branch (2274:9): [True: 4, False: 0]
  ------------------
 2275|      4|      result = tables_->FindFile(name);
 2276|      4|    }
 2277|      4|  }
 2278|      4|  if (!deferred_validation.Validate()) {
  ------------------
  |  Branch (2278:7): [True: 0, False: 4]
  ------------------
 2279|      0|    return nullptr;
 2280|      0|  }
 2281|      4|  return result;
 2282|      4|}
_ZNK6google8protobuf10Descriptor34FindExtensionRangeContainingNumberEi:
 2665|      1|Descriptor::FindExtensionRangeContainingNumber(int number) const {
 2666|       |  // Linear search should be fine because we don't expect a message to have
 2667|       |  // more than a couple extension ranges.
 2668|      1|  for (int i = 0; i < extension_range_count(); i++) {
  ------------------
  |  Branch (2668:19): [True: 1, False: 0]
  ------------------
 2669|      1|    if (number >= extension_range(i)->start_number() &&
  ------------------
  |  Branch (2669:9): [True: 1, False: 0]
  ------------------
 2670|      1|        number < extension_range(i)->end_number()) {
  ------------------
  |  Branch (2670:9): [True: 1, False: 0]
  ------------------
 2671|      1|      return extension_range(i);
 2672|      1|    }
 2673|      1|  }
 2674|      0|  return nullptr;
 2675|      1|}
_ZNK6google8protobuf14DescriptorPool29TryFindFileInFallbackDatabaseEN4absl12lts_2024011611string_viewERNS1_18DeferredValidationE:
 2703|      4|    absl::string_view name, DeferredValidation& deferred_validation) const {
 2704|      4|  if (fallback_database_ == nullptr) return false;
  ------------------
  |  Branch (2704:7): [True: 0, False: 4]
  ------------------
 2705|       |
 2706|      4|  if (tables_->known_bad_files_.contains(name)) return false;
  ------------------
  |  Branch (2706:7): [True: 0, False: 4]
  ------------------
 2707|       |
 2708|       |  // NOINLINE to reduce the stack cost of the operation in the caller.
 2709|      4|  const auto find_file = [](DescriptorDatabase& database,
 2710|      4|                            absl::string_view filename,
 2711|      4|                            FileDescriptorProto& output) PROTOBUF_NOINLINE {
 2712|      4|    return database.FindFileByName(std::string(filename), &output);
 2713|      4|  };
 2714|       |
 2715|      4|  auto& file_proto = deferred_validation.CreateProto();
 2716|      4|  if (!find_file(*fallback_database_, name, file_proto) ||
  ------------------
  |  Branch (2716:7): [True: 0, False: 4]
  ------------------
 2717|      4|      BuildFileFromDatabase(file_proto, deferred_validation) == nullptr) {
  ------------------
  |  Branch (2717:7): [True: 0, False: 4]
  ------------------
 2718|      0|    tables_->known_bad_files_.emplace(name);
 2719|      0|    return false;
 2720|      0|  }
 2721|      4|  return true;
 2722|      4|}
_ZNK6google8protobuf15FieldDescriptor19is_map_message_typeEv:
 2816|  60.4k|bool FieldDescriptor::is_map_message_type() const {
 2817|  60.4k|  return message_type()->options().map_entry();
 2818|  60.4k|}
_ZNK6google8protobuf15FieldDescriptor11is_requiredEv:
 3945|   141k|bool FieldDescriptor::is_required() const {
 3946|   141k|  return features().field_presence() == FeatureSet::LEGACY_REQUIRED;
 3947|   141k|}
_ZNK6google8protobuf10Descriptor15GetLocationPathEPNSt3__16vectorIiNS2_9allocatorIiEEEE:
 4058|    435|void Descriptor::GetLocationPath(std::vector<int>* output) const {
 4059|    435|  if (containing_type()) {
  ------------------
  |  Branch (4059:7): [True: 47, False: 388]
  ------------------
 4060|     47|    containing_type()->GetLocationPath(output);
 4061|     47|    output->push_back(DescriptorProto::kNestedTypeFieldNumber);
 4062|     47|    output->push_back(index());
 4063|    388|  } else {
 4064|    388|    output->push_back(FileDescriptorProto::kMessageTypeFieldNumber);
 4065|    388|    output->push_back(index());
 4066|    388|  }
 4067|    435|}
_ZNK6google8protobuf15FieldDescriptor15GetLocationPathEPNSt3__16vectorIiNS2_9allocatorIiEEEE:
 4069|    235|void FieldDescriptor::GetLocationPath(std::vector<int>* output) const {
 4070|    235|  if (is_extension()) {
  ------------------
  |  Branch (4070:7): [True: 1, False: 234]
  ------------------
 4071|      1|    if (extension_scope() == nullptr) {
  ------------------
  |  Branch (4071:9): [True: 1, False: 0]
  ------------------
 4072|      1|      output->push_back(FileDescriptorProto::kExtensionFieldNumber);
 4073|      1|      output->push_back(index());
 4074|      1|    } else {
 4075|      0|      extension_scope()->GetLocationPath(output);
 4076|      0|      output->push_back(DescriptorProto::kExtensionFieldNumber);
 4077|      0|      output->push_back(index());
 4078|      0|    }
 4079|    234|  } else {
 4080|    234|    containing_type()->GetLocationPath(output);
 4081|    234|    output->push_back(DescriptorProto::kFieldFieldNumber);
 4082|    234|    output->push_back(index());
 4083|    234|  }
 4084|    235|}
_ZNK6google8protobuf15OneofDescriptor15GetLocationPathEPNSt3__16vectorIiNS2_9allocatorIiEEEE:
 4086|      2|void OneofDescriptor::GetLocationPath(std::vector<int>* output) const {
 4087|      2|  containing_type()->GetLocationPath(output);
 4088|      2|  output->push_back(DescriptorProto::kOneofDeclFieldNumber);
 4089|      2|  output->push_back(index());
 4090|      2|}
_ZNK6google8protobuf10Descriptor14ExtensionRange15GetLocationPathEPNSt3__16vectorIiNS3_9allocatorIiEEEE:
 4093|     14|    std::vector<int>* output) const {
 4094|     14|  containing_type()->GetLocationPath(output);
 4095|     14|  output->push_back(DescriptorProto::kExtensionRangeFieldNumber);
 4096|     14|  output->push_back(index());
 4097|     14|}
_ZNK6google8protobuf14EnumDescriptor15GetLocationPathEPNSt3__16vectorIiNS2_9allocatorIiEEEE:
 4099|    214|void EnumDescriptor::GetLocationPath(std::vector<int>* output) const {
 4100|    214|  if (containing_type()) {
  ------------------
  |  Branch (4100:7): [True: 91, False: 123]
  ------------------
 4101|     91|    containing_type()->GetLocationPath(output);
 4102|     91|    output->push_back(DescriptorProto::kEnumTypeFieldNumber);
 4103|     91|    output->push_back(index());
 4104|    123|  } else {
 4105|    123|    output->push_back(FileDescriptorProto::kEnumTypeFieldNumber);
 4106|    123|    output->push_back(index());
 4107|    123|  }
 4108|    214|}
_ZNK6google8protobuf19EnumValueDescriptor15GetLocationPathEPNSt3__16vectorIiNS2_9allocatorIiEEEE:
 4110|    190|void EnumValueDescriptor::GetLocationPath(std::vector<int>* output) const {
 4111|    190|  type()->GetLocationPath(output);
 4112|    190|  output->push_back(EnumDescriptorProto::kValueFieldNumber);
 4113|    190|  output->push_back(index());
 4114|    190|}
_ZNK6google8protobuf14DescriptorPool21BuildFileFromDatabaseERKNS0_19FileDescriptorProtoERNS1_18DeferredValidationE:
 4740|      4|    DeferredValidation& deferred_validation) const {
 4741|      4|  mutex_->AssertHeld();
 4742|      4|  build_started_ = true;
 4743|      4|  if (tables_->known_bad_files_.contains(proto.name())) {
  ------------------
  |  Branch (4743:7): [True: 0, False: 4]
  ------------------
 4744|      0|    return nullptr;
 4745|      0|  }
 4746|      4|  const FileDescriptor* result;
 4747|      4|  const auto build_file = [&] {
 4748|      4|    result = DescriptorBuilder::New(this, tables_.get(), deferred_validation,
 4749|      4|                                    default_error_collector_)
 4750|      4|                 ->BuildFile(proto);
 4751|      4|  };
 4752|      4|  if (dispatcher_ != nullptr) {
  ------------------
  |  Branch (4752:7): [True: 0, False: 4]
  ------------------
 4753|      0|    (*dispatcher_)(build_file);
 4754|      4|  } else {
 4755|      4|    build_file();
 4756|      4|  }
 4757|      4|  if (result == nullptr) {
  ------------------
  |  Branch (4757:7): [True: 0, False: 4]
  ------------------
 4758|      0|    tables_->known_bad_files_.insert(proto.name());
 4759|      0|  }
 4760|      4|  return result;
 4761|      4|}
_ZN6google8protobuf17DescriptorBuilderC2EPKNS0_14DescriptorPoolEPNS2_6TablesERNS2_18DeferredValidationEPNS2_14ErrorCollectorE:
 4797|      4|    : pool_(pool),
 4798|      4|      tables_(tables),
 4799|      4|      deferred_validation_(deferred_validation),
 4800|      4|      error_collector_(error_collector),
 4801|      4|      had_errors_(false),
 4802|      4|      possible_undeclared_dependency_(nullptr),
 4803|      4|      undefine_resolved_name_("") {
 4804|       |  // Ensure that any lazily loaded static initializers from the generated pool
 4805|       |  // (e.g. from bootstrapped protos) are run before building any descriptors. We
 4806|       |  // have to avoid registering these pre-main, because we need to ensure that
 4807|       |  // the linker --gc-sections step can strip out the full runtime if it is
 4808|       |  // unused.
 4809|      4|  PROTOBUF_UNUSED static std::true_type lazy_register =
  ------------------
  |  |  620|      4|#define PROTOBUF_UNUSED [[maybe_unused]]
  ------------------
 4810|      4|      (internal::ExtensionSet::RegisterMessageExtension(
 4811|      4|           &FeatureSet::default_instance(), pb::cpp.number(),
 4812|      4|           FieldDescriptor::TYPE_MESSAGE, false, false,
 4813|      4|           &pb::CppFeatures::default_instance(),
 4814|      4|           nullptr,
 4815|      4|           internal::LazyAnnotation::kUndefined),
 4816|      4|       std::true_type{});
 4817|      4|}
_ZN6google8protobuf17DescriptorBuilderD2Ev:
 4819|      4|DescriptorBuilder::~DescriptorBuilder() = default;
_ZN6google8protobuf17DescriptorBuilder32FindSymbolNotEnforcingDepsHelperEPKNS0_14DescriptorPoolEN4absl12lts_2024011611string_viewEb:
 4916|    104|    const DescriptorPool* pool, const absl::string_view name, bool build_it) {
 4917|       |  // If we are looking at an underlay, we must lock its mutex_, since we are
 4918|       |  // accessing the underlay's tables_ directly.
 4919|    104|  absl::MutexLockMaybe lock((pool == pool_) ? nullptr : pool->mutex_);
  ------------------
  |  Branch (4919:29): [True: 104, False: 0]
  ------------------
 4920|       |
 4921|    104|  Symbol result = pool->tables_->FindSymbol(name);
 4922|    104|  if (result.IsNull() && pool->underlay_ != nullptr) {
  ------------------
  |  Branch (4922:7): [True: 0, False: 104]
  |  Branch (4922:26): [True: 0, False: 0]
  ------------------
 4923|       |    // Symbol not found; check the underlay.
 4924|      0|    result = FindSymbolNotEnforcingDepsHelper(pool->underlay_, name);
 4925|      0|  }
 4926|       |
 4927|    104|  if (result.IsNull()) {
  ------------------
  |  Branch (4927:7): [True: 0, False: 104]
  ------------------
 4928|       |    // With lazily_build_dependencies_, a symbol lookup at cross link time is
 4929|       |    // not guaranteed to be successful. In most cases, build_it will be false,
 4930|       |    // which intentionally prevents us from building an import until it's
 4931|       |    // actually needed. In some cases, like registering an extension, we want
 4932|       |    // to build the file containing the symbol, and build_it will be set.
 4933|       |    // Also, build_it will be true when !lazily_build_dependencies_, to provide
 4934|       |    // better error reporting of missing dependencies.
 4935|      0|    if (build_it &&
  ------------------
  |  Branch (4935:9): [True: 0, False: 0]
  ------------------
 4936|      0|        pool->TryFindSymbolInFallbackDatabase(name, deferred_validation_)) {
  ------------------
  |  Branch (4936:9): [True: 0, False: 0]
  ------------------
 4937|      0|      result = pool->tables_->FindSymbol(name);
 4938|      0|    }
 4939|      0|  }
 4940|       |
 4941|    104|  return result;
 4942|    104|}
_ZN6google8protobuf17DescriptorBuilder26FindSymbolNotEnforcingDepsEN4absl12lts_2024011611string_viewEb:
 4945|    104|    const absl::string_view name, bool build_it) {
 4946|    104|  Symbol result = FindSymbolNotEnforcingDepsHelper(pool_, name, build_it);
 4947|       |  // Only find symbols which were defined in this file or one of its
 4948|       |  // dependencies.
 4949|    104|  const FileDescriptor* file = result.GetFile();
 4950|    104|  if ((file == file_ || dependencies_.contains(file)) && !result.IsPackage()) {
  ------------------
  |  Branch (4950:8): [True: 103, False: 1]
  |  Branch (4950:25): [True: 0, False: 1]
  |  Branch (4950:58): [True: 103, False: 0]
  ------------------
 4951|    103|    unused_dependency_.erase(file);
 4952|    103|  }
 4953|    104|  return result;
 4954|    104|}
_ZN6google8protobuf17DescriptorBuilder10FindSymbolEN4absl12lts_2024011611string_viewEb:
 4957|    104|                                     bool build_it) {
 4958|    104|  Symbol result = FindSymbolNotEnforcingDeps(name, build_it);
 4959|       |
 4960|    104|  if (result.IsNull()) return result;
  ------------------
  |  Branch (4960:7): [True: 0, False: 104]
  ------------------
 4961|       |
 4962|    104|  if (!pool_->enforce_dependencies_) {
  ------------------
  |  Branch (4962:7): [True: 104, False: 0]
  ------------------
 4963|       |    // Hack for CompilerUpgrader, and also used for lazily_build_dependencies_
 4964|    104|    return result;
 4965|    104|  }
 4966|       |
 4967|       |  // Only find symbols which were defined in this file or one of its
 4968|       |  // dependencies.
 4969|      0|  const FileDescriptor* file = result.GetFile();
 4970|      0|  if (file == file_ || dependencies_.contains(file)) {
  ------------------
  |  Branch (4970:7): [True: 0, False: 0]
  |  Branch (4970:24): [True: 0, False: 0]
  ------------------
 4971|      0|    return result;
 4972|      0|  }
 4973|       |
 4974|      0|  if (result.IsPackage()) {
  ------------------
  |  Branch (4974:7): [True: 0, False: 0]
  ------------------
 4975|       |    // Arg, this is overcomplicated.  The symbol is a package name.  It could
 4976|       |    // be that the package was defined in multiple files.  result.GetFile()
 4977|       |    // returns the first file we saw that used this package.  We've determined
 4978|       |    // that that file is not a direct dependency of the file we are currently
 4979|       |    // building, but it could be that some other file which *is* a direct
 4980|       |    // dependency also defines the same package.  We can't really rule out this
 4981|       |    // symbol unless none of the dependencies define it.
 4982|      0|    if (IsInPackage(file_, name)) return result;
  ------------------
  |  Branch (4982:9): [True: 0, False: 0]
  ------------------
 4983|      0|    for (const auto* dep : dependencies_) {
  ------------------
  |  Branch (4983:26): [True: 0, False: 0]
  ------------------
 4984|       |      // Note:  A dependency may be nullptr if it was not found or had errors.
 4985|      0|      if (dep != nullptr && IsInPackage(dep, name)) return result;
  ------------------
  |  Branch (4985:11): [True: 0, False: 0]
  |  Branch (4985:29): [True: 0, False: 0]
  ------------------
 4986|      0|    }
 4987|      0|  }
 4988|       |
 4989|      0|  possible_undeclared_dependency_ = file;
 4990|      0|  possible_undeclared_dependency_name_ = std::string(name);
 4991|      0|  return Symbol();
 4992|      0|}
_ZN6google8protobuf17DescriptorBuilder25LookupSymbolNoPlaceholderEN4absl12lts_2024011611string_viewES4_NS1_11ResolveModeEb:
 4996|    104|    ResolveMode resolve_mode, bool build_it) {
 4997|    104|  possible_undeclared_dependency_ = nullptr;
 4998|    104|  undefine_resolved_name_.clear();
 4999|       |
 5000|    104|  if (!name.empty() && name[0] == '.') {
  ------------------
  |  Branch (5000:7): [True: 104, False: 0]
  |  Branch (5000:24): [True: 99, False: 5]
  ------------------
 5001|       |    // Fully-qualified name.
 5002|     99|    return FindSymbol(name.substr(1), build_it);
 5003|     99|  }
 5004|       |
 5005|       |  // If name is something like "Foo.Bar.baz", and symbols named "Foo" are
 5006|       |  // defined in multiple parent scopes, we only want to find "Bar.baz" in the
 5007|       |  // innermost one.  E.g., the following should produce an error:
 5008|       |  //   message Bar { message Baz {} }
 5009|       |  //   message Foo {
 5010|       |  //     message Bar {
 5011|       |  //     }
 5012|       |  //     optional Bar.Baz baz = 1;
 5013|       |  //   }
 5014|       |  // So, we look for just "Foo" first, then look for "Bar.baz" within it if
 5015|       |  // found.
 5016|      5|  std::string::size_type name_dot_pos = name.find_first_of('.');
 5017|      5|  absl::string_view first_part_of_name;
 5018|      5|  if (name_dot_pos == std::string::npos) {
  ------------------
  |  Branch (5018:7): [True: 5, False: 0]
  ------------------
 5019|      5|    first_part_of_name = name;
 5020|      5|  } else {
 5021|      0|    first_part_of_name = name.substr(0, name_dot_pos);
 5022|      0|  }
 5023|       |
 5024|      5|  std::string scope_to_try(relative_to);
 5025|       |
 5026|      5|  while (true) {
  ------------------
  |  Branch (5026:10): [True: 5, Folded]
  ------------------
 5027|       |    // Chop off the last component of the scope.
 5028|      5|    std::string::size_type dot_pos = scope_to_try.find_last_of('.');
 5029|      5|    if (dot_pos == std::string::npos) {
  ------------------
  |  Branch (5029:9): [True: 0, False: 5]
  ------------------
 5030|      0|      return FindSymbol(name, build_it);
 5031|      5|    } else {
 5032|      5|      scope_to_try.erase(dot_pos);
 5033|      5|    }
 5034|       |
 5035|       |    // Append ".first_part_of_name" and try to find.
 5036|      5|    std::string::size_type old_size = scope_to_try.size();
 5037|      5|    absl::StrAppend(&scope_to_try, ".", first_part_of_name);
 5038|      5|    Symbol result = FindSymbol(scope_to_try, build_it);
 5039|      5|    if (!result.IsNull()) {
  ------------------
  |  Branch (5039:9): [True: 5, False: 0]
  ------------------
 5040|      5|      if (first_part_of_name.size() < name.size()) {
  ------------------
  |  Branch (5040:11): [True: 0, False: 5]
  ------------------
 5041|       |        // name is a compound symbol, of which we only found the first part.
 5042|       |        // Now try to look up the rest of it.
 5043|      0|        if (result.IsAggregate()) {
  ------------------
  |  Branch (5043:13): [True: 0, False: 0]
  ------------------
 5044|      0|          absl::StrAppend(&scope_to_try,
 5045|      0|                          name.substr(first_part_of_name.size()));
 5046|      0|          result = FindSymbol(scope_to_try, build_it);
 5047|      0|          if (result.IsNull()) {
  ------------------
  |  Branch (5047:15): [True: 0, False: 0]
  ------------------
 5048|      0|            undefine_resolved_name_ = scope_to_try;
 5049|      0|          }
 5050|      0|          return result;
 5051|      0|        } else {
 5052|       |          // We found a symbol but it's not an aggregate.  Continue the loop.
 5053|      0|        }
 5054|      5|      } else {
 5055|      5|        if (resolve_mode == LOOKUP_TYPES && !result.IsType()) {
  ------------------
  |  Branch (5055:13): [True: 0, False: 5]
  |  Branch (5055:45): [True: 0, False: 0]
  ------------------
 5056|       |          // We found a symbol but it's not a type.  Continue the loop.
 5057|      5|        } else {
 5058|      5|          return result;
 5059|      5|        }
 5060|      5|      }
 5061|      5|    }
 5062|       |
 5063|       |    // Not found.  Remove the name so we can try again.
 5064|      0|    scope_to_try.erase(old_size);
 5065|      0|  }
 5066|      5|}
_ZN6google8protobuf17DescriptorBuilder12LookupSymbolEN4absl12lts_2024011611string_viewES4_NS0_14DescriptorPool15PlaceholderTypeENS1_11ResolveModeEb:
 5071|     99|    bool build_it) {
 5072|     99|  Symbol result =
 5073|     99|      LookupSymbolNoPlaceholder(name, relative_to, resolve_mode, build_it);
 5074|     99|  if (result.IsNull() && pool_->allow_unknown_) {
  ------------------
  |  Branch (5074:7): [True: 0, False: 99]
  |  Branch (5074:26): [True: 0, False: 0]
  ------------------
 5075|       |    // Not found, but AllowUnknownDependencies() is enabled.  Return a
 5076|       |    // placeholder instead.
 5077|      0|    result = pool_->NewPlaceholderWithMutexHeld(name, placeholder_type);
 5078|      0|  }
 5079|     99|  return result;
 5080|     99|}
_ZN6google8protobuf17DescriptorBuilder9AddSymbolEN4absl12lts_2024011611string_viewEPKvS4_RKNS0_7MessageENS0_6SymbolE:
 5269|    498|                                  const Message& proto, Symbol symbol) {
 5270|       |  // If the caller passed nullptr for the parent, the symbol is at file scope.
 5271|       |  // Use its file as the parent instead.
 5272|    498|  if (parent == nullptr) parent = file_;
  ------------------
  |  Branch (5272:7): [True: 161, False: 337]
  ------------------
 5273|       |
 5274|    498|  if (absl::StrContains(full_name, '\0')) {
  ------------------
  |  Branch (5274:7): [True: 0, False: 498]
  ------------------
 5275|      0|    AddError(full_name, proto, DescriptorPool::ErrorCollector::NAME, [&] {
 5276|      0|      return absl::StrCat("\"", full_name, "\" contains null character.");
 5277|      0|    });
 5278|      0|    return false;
 5279|      0|  }
 5280|    498|  if (tables_->AddSymbol(full_name, symbol)) {
  ------------------
  |  Branch (5280:7): [True: 498, False: 0]
  ------------------
 5281|    498|    if (!file_tables_->AddAliasUnderParent(parent, name, symbol)) {
  ------------------
  |  Branch (5281:9): [True: 0, False: 498]
  ------------------
 5282|       |      // This is only possible if there was already an error adding something of
 5283|       |      // the same name.
 5284|      0|      if (!had_errors_) {
  ------------------
  |  Branch (5284:11): [True: 0, False: 0]
  ------------------
 5285|      0|        ABSL_DLOG(FATAL) << "\"" << full_name
  ------------------
  |  |   40|      0|#define ABSL_DLOG(severity) ABSL_LOG_INTERNAL_DLOG_IMPL(_##severity)
  |  |  ------------------
  |  |  |  |   41|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, false) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   42|      0|      ABSL_LOGGING_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5286|      0|                         << "\" not previously defined in "
 5287|      0|                            "symbols_by_name_, but was defined in "
 5288|      0|                            "symbols_by_parent_; this shouldn't be possible.";
 5289|      0|      }
 5290|      0|      return false;
 5291|      0|    }
 5292|    498|    return true;
 5293|    498|  } else {
 5294|      0|    const FileDescriptor* other_file = tables_->FindSymbol(full_name).GetFile();
 5295|      0|    if (other_file == file_) {
  ------------------
  |  Branch (5295:9): [True: 0, False: 0]
  ------------------
 5296|      0|      std::string::size_type dot_pos = full_name.find_last_of('.');
 5297|      0|      if (dot_pos == std::string::npos) {
  ------------------
  |  Branch (5297:11): [True: 0, False: 0]
  ------------------
 5298|      0|        AddError(full_name, proto, DescriptorPool::ErrorCollector::NAME, [&] {
 5299|      0|          return absl::StrCat("\"", full_name, "\" is already defined.");
 5300|      0|        });
 5301|      0|      } else {
 5302|      0|        AddError(full_name, proto, DescriptorPool::ErrorCollector::NAME, [&] {
 5303|      0|          return absl::StrCat("\"", full_name.substr(dot_pos + 1),
 5304|      0|                              "\" is already defined in \"",
 5305|      0|                              full_name.substr(0, dot_pos), "\".");
 5306|      0|        });
 5307|      0|      }
 5308|      0|    } else {
 5309|       |      // Symbol seems to have been defined in a different file.
 5310|      0|      AddError(full_name, proto, DescriptorPool::ErrorCollector::NAME, [&] {
 5311|      0|        return absl::StrCat(
 5312|      0|            "\"", full_name, "\" is already defined in file \"",
 5313|      0|            (other_file == nullptr ? "null" : other_file->name()), "\".");
 5314|      0|      });
 5315|      0|    }
 5316|      0|    return false;
 5317|      0|  }
 5318|    498|}
_ZN6google8protobuf17DescriptorBuilder10AddPackageEN4absl12lts_2024011611string_viewERKNS0_7MessageEPNS0_14FileDescriptorEb:
 5322|      7|                                   bool toplevel) {
 5323|      7|  if (absl::StrContains(name, '\0')) {
  ------------------
  |  Branch (5323:7): [True: 0, False: 7]
  ------------------
 5324|      0|    AddError(name, proto, DescriptorPool::ErrorCollector::NAME, [&] {
 5325|      0|      return absl::StrCat("\"", name, "\" contains null character.");
 5326|      0|    });
 5327|      0|    return;
 5328|      0|  }
 5329|       |
 5330|      7|  Symbol existing_symbol = tables_->FindSymbol(name);
 5331|       |  // It's OK to redefine a package.
 5332|      7|  if (existing_symbol.IsNull()) {
  ------------------
  |  Branch (5332:7): [True: 6, False: 1]
  ------------------
 5333|      6|    if (toplevel) {
  ------------------
  |  Branch (5333:9): [True: 3, False: 3]
  ------------------
 5334|       |      // It is the toplevel package name, so insert the descriptor directly.
 5335|      3|      tables_->AddSymbol(file->package(), Symbol(file));
 5336|      3|    } else {
 5337|      3|      auto* package = tables_->Allocate<Symbol::Subpackage>();
 5338|       |      // If the name is the package name, then it is already in the arena.
 5339|       |      // If not, copy it there. It came from the call to AddPackage below.
 5340|      3|      package->name_size = static_cast<int>(name.size());
 5341|      3|      package->file = file;
 5342|      3|      tables_->AddSymbol(name, Symbol(package));
 5343|      3|    }
 5344|       |    // Also add parent package, if any.
 5345|      6|    std::string::size_type dot_pos = name.find_last_of('.');
 5346|      6|    if (dot_pos == std::string::npos) {
  ------------------
  |  Branch (5346:9): [True: 3, False: 3]
  ------------------
 5347|       |      // No parents.
 5348|      3|      ValidateSymbolName(name, name, proto);
 5349|      3|    } else {
 5350|       |      // Has parent.
 5351|      3|      AddPackage(name.substr(0, dot_pos), proto, file, false);
 5352|      3|      ValidateSymbolName(name.substr(dot_pos + 1), name, proto);
 5353|      3|    }
 5354|      6|  } else if (!existing_symbol.IsPackage()) {
  ------------------
  |  Branch (5354:14): [True: 0, False: 1]
  ------------------
 5355|       |    // Symbol seems to have been defined in a different file.
 5356|      0|    const FileDescriptor* other_file = existing_symbol.GetFile();
 5357|      0|    AddError(name, proto, DescriptorPool::ErrorCollector::NAME, [&] {
 5358|      0|      return absl::StrCat("\"", name,
 5359|      0|                          "\" is already defined (as something other than "
 5360|      0|                          "a package) in file \"",
 5361|      0|                          (other_file == nullptr ? "null" : other_file->name()),
 5362|      0|                          "\".");
 5363|      0|    });
 5364|      0|  }
 5365|      7|}
_ZN6google8protobuf17DescriptorBuilder18ValidateSymbolNameEN4absl12lts_2024011611string_viewES4_RKNS0_7MessageE:
 5369|    504|                                           const Message& proto) {
 5370|    504|  if (name.empty()) {
  ------------------
  |  Branch (5370:7): [True: 0, False: 504]
  ------------------
 5371|      0|    AddError(full_name, proto, DescriptorPool::ErrorCollector::NAME,
 5372|      0|             "Missing name.");
 5373|    504|  } else {
 5374|  6.74k|    for (char character : name) {
  ------------------
  |  Branch (5374:25): [True: 6.74k, False: 504]
  ------------------
 5375|       |      // I don't trust isalnum() due to locales.  :(
 5376|  6.74k|      if ((character < 'a' || 'z' < character) &&
  ------------------
  |  Branch (5376:12): [True: 3.50k, False: 3.23k]
  |  Branch (5376:31): [True: 0, False: 3.23k]
  ------------------
 5377|  3.50k|          (character < 'A' || 'Z' < character) &&
  ------------------
  |  Branch (5377:12): [True: 68, False: 3.44k]
  |  Branch (5377:31): [True: 453, False: 2.98k]
  ------------------
 5378|    521|          (character < '0' || '9' < character) && (character != '_')) {
  ------------------
  |  Branch (5378:12): [True: 0, False: 521]
  |  Branch (5378:31): [True: 453, False: 68]
  |  Branch (5378:51): [True: 0, False: 453]
  ------------------
 5379|      0|        AddError(full_name, proto, DescriptorPool::ErrorCollector::NAME, [&] {
 5380|      0|          return absl::StrCat("\"", name, "\" is not a valid identifier.");
 5381|      0|        });
 5382|      0|        return;
 5383|      0|      }
 5384|  6.74k|    }
 5385|    504|  }
 5386|    504|}
_ZN6google8protobuf17DescriptorBuilder15AllocateOptionsERKNS0_19FileDescriptorProtoEPNS0_14FileDescriptorERNS0_8internal13FlatAllocatorE:
 5411|      4|                                        internal::FlatAllocator& alloc) {
 5412|      4|  std::vector<int> options_path;
 5413|      4|  options_path.push_back(FileDescriptorProto::kOptionsFieldNumber);
 5414|       |  // We add the dummy token so that LookupSymbol does the right thing.
 5415|      4|  auto options = AllocateOptionsImpl<FileDescriptor>(
 5416|      4|      absl::StrCat(descriptor->package(), ".dummy"), descriptor->name(), proto,
 5417|      4|      options_path, "google.protobuf.FileOptions", alloc);
 5418|      4|  descriptor->options_ = options;
 5419|      4|  descriptor->proto_features_ = &FeatureSet::default_instance();
 5420|      4|  descriptor->merged_features_ = &FeatureSet::default_instance();
 5421|      4|}
_ZN6google8protobuf17DescriptorBuilder15ResolveFeaturesERKNS0_19FileDescriptorProtoEPNS0_14FileDescriptorEPNS0_11FileOptionsERNS0_8internal13FlatAllocatorE:
 5593|      4|                                        internal::FlatAllocator& alloc) {
 5594|       |  // File descriptors always need their own merged feature set, even without
 5595|       |  // any explicit features.
 5596|      4|  ResolveFeaturesImpl(descriptor->edition(), proto, descriptor, options, alloc,
 5597|      4|                      DescriptorPool::ErrorCollector::EDITIONS,
 5598|      4|                      /*force_merge=*/true);
 5599|      4|}
_ZN6google8protobuf17DescriptorBuilder24PostProcessFieldFeaturesERNS0_15FieldDescriptorERKNS0_20FieldDescriptorProtoE:
 5602|    235|    FieldDescriptor& field, const FieldDescriptorProto& proto) {
 5603|       |  // TODO This can be replace by a runtime check in `is_required`
 5604|       |  // once the `label` getter is hidden.
 5605|    235|  if (field.features().field_presence() == FeatureSet::LEGACY_REQUIRED &&
  ------------------
  |  Branch (5605:7): [True: 2, False: 233]
  ------------------
 5606|      2|      field.label_ == FieldDescriptor::LABEL_OPTIONAL) {
  ------------------
  |  Branch (5606:7): [True: 0, False: 2]
  ------------------
 5607|      0|    field.label_ = FieldDescriptor::LABEL_REQUIRED;
 5608|      0|  }
 5609|       |  // TODO This can be replace by a runtime check of `is_delimited`
 5610|       |  // once the `TYPE_GROUP` value is removed.
 5611|    235|  if (field.type_ == FieldDescriptor::TYPE_MESSAGE &&
  ------------------
  |  Branch (5611:7): [True: 66, False: 169]
  ------------------
 5612|     66|      !field.containing_type()->options().map_entry() &&
  ------------------
  |  Branch (5612:7): [True: 66, False: 0]
  ------------------
 5613|     66|      field.features().message_encoding() == FeatureSet::DELIMITED) {
  ------------------
  |  Branch (5613:7): [True: 0, False: 66]
  ------------------
 5614|      0|    Symbol type =
 5615|      0|        LookupSymbol(proto.type_name(), field.full_name(),
 5616|      0|                     DescriptorPool::PLACEHOLDER_MESSAGE, LOOKUP_TYPES, false);
 5617|      0|    if (type.descriptor() == nullptr ||
  ------------------
  |  Branch (5617:9): [True: 0, False: 0]
  ------------------
 5618|      0|        !type.descriptor()->options().map_entry()) {
  ------------------
  |  Branch (5618:9): [True: 0, False: 0]
  ------------------
 5619|      0|      field.type_ = FieldDescriptor::TYPE_GROUP;
 5620|      0|    }
 5621|      0|  }
 5622|    235|}
_ZN6google8protobuf17DescriptorBuilder9BuildFileERKNS0_19FileDescriptorProtoE:
 5816|      4|    const FileDescriptorProto& proto) {
 5817|       |  // Ensure the generated pool has been lazily initialized.  This is most
 5818|       |  // important for protos that use C++-specific features, since that extension
 5819|       |  // is only registered lazily and we always parse options into the generated
 5820|       |  // pool.
 5821|      4|  if (pool_ != DescriptorPool::internal_generated_pool()) {
  ------------------
  |  Branch (5821:7): [True: 0, False: 4]
  ------------------
 5822|      0|    DescriptorPool::generated_pool();
 5823|      0|  }
 5824|       |
 5825|      4|  filename_ = proto.name();
 5826|       |
 5827|       |  // Check if the file already exists and is identical to the one being built.
 5828|       |  // Note:  This only works if the input is canonical -- that is, it
 5829|       |  //   fully-qualifies all type names, has no UninterpretedOptions, etc.
 5830|       |  //   This is fine, because this idempotency "feature" really only exists to
 5831|       |  //   accommodate one hack in the proto1->proto2 migration layer.
 5832|      4|  const FileDescriptor* existing_file = tables_->FindFile(filename_);
 5833|      4|  if (existing_file != nullptr) {
  ------------------
  |  Branch (5833:7): [True: 0, False: 4]
  ------------------
 5834|       |    // File already in pool.  Compare the existing one to the input.
 5835|      0|    if (ExistingFileMatchesProto(existing_file->edition(), existing_file,
  ------------------
  |  Branch (5835:9): [True: 0, False: 0]
  ------------------
 5836|      0|                                 proto)) {
 5837|       |      // They're identical.  Return the existing descriptor.
 5838|      0|      return existing_file;
 5839|      0|    }
 5840|       |
 5841|       |    // Not a match.  The error will be detected and handled later.
 5842|      0|  }
 5843|       |
 5844|       |  // Check to see if this file is already on the pending files list.
 5845|       |  // TODO:  Allow recursive imports?  It may not work with some
 5846|       |  //   (most?) programming languages.  E.g., in C++, a forward declaration
 5847|       |  //   of a type is not sufficient to allow it to be used even in a
 5848|       |  //   generated header file due to inlining.  This could perhaps be
 5849|       |  //   worked around using tricks involving inserting #include statements
 5850|       |  //   mid-file, but that's pretty ugly, and I'm pretty sure there are
 5851|       |  //   some languages out there that do not allow recursive dependencies
 5852|       |  //   at all.
 5853|      4|  for (size_t i = 0; i < tables_->pending_files_.size(); i++) {
  ------------------
  |  Branch (5853:22): [True: 0, False: 4]
  ------------------
 5854|      0|    if (tables_->pending_files_[i] == proto.name()) {
  ------------------
  |  Branch (5854:9): [True: 0, False: 0]
  ------------------
 5855|      0|      AddRecursiveImportError(proto, i);
 5856|      0|      return nullptr;
 5857|      0|    }
 5858|      0|  }
 5859|       |
 5860|      4|  static const int kMaximumPackageLength = 511;
 5861|      4|  if (proto.package().size() > kMaximumPackageLength) {
  ------------------
  |  Branch (5861:7): [True: 0, False: 4]
  ------------------
 5862|      0|    AddError(proto.package(), proto, DescriptorPool::ErrorCollector::NAME,
 5863|      0|             "Package name is too long");
 5864|      0|    return nullptr;
 5865|      0|  }
 5866|       |
 5867|       |  // If we have a fallback_database_, and we aren't doing lazy import building,
 5868|       |  // attempt to load all dependencies now, before checkpointing tables_.  This
 5869|       |  // avoids confusion with recursive checkpoints.
 5870|      4|  if (!pool_->lazily_build_dependencies_) {
  ------------------
  |  Branch (5870:7): [True: 0, False: 4]
  ------------------
 5871|      0|    if (pool_->fallback_database_ != nullptr) {
  ------------------
  |  Branch (5871:9): [True: 0, False: 0]
  ------------------
 5872|      0|      tables_->pending_files_.push_back(proto.name());
 5873|      0|      for (int i = 0; i < proto.dependency_size(); i++) {
  ------------------
  |  Branch (5873:23): [True: 0, False: 0]
  ------------------
 5874|      0|        if (tables_->FindFile(proto.dependency(i)) == nullptr &&
  ------------------
  |  Branch (5874:13): [True: 0, False: 0]
  |  Branch (5874:13): [True: 0, False: 0]
  ------------------
 5875|      0|            (pool_->underlay_ == nullptr ||
  ------------------
  |  Branch (5875:14): [True: 0, False: 0]
  ------------------
 5876|      0|             pool_->underlay_->FindFileByName(proto.dependency(i)) ==
  ------------------
  |  Branch (5876:14): [True: 0, False: 0]
  ------------------
 5877|      0|                 nullptr)) {
 5878|       |          // We don't care what this returns since we'll find out below anyway.
 5879|      0|          pool_->TryFindFileInFallbackDatabase(proto.dependency(i),
 5880|      0|                                               deferred_validation_);
 5881|      0|        }
 5882|      0|      }
 5883|      0|      tables_->pending_files_.pop_back();
 5884|      0|    }
 5885|      0|  }
 5886|       |
 5887|       |  // Checkpoint the tables so that we can roll back if something goes wrong.
 5888|      4|  tables_->AddCheckpoint();
 5889|       |
 5890|      4|  auto alloc = absl::make_unique<internal::FlatAllocator>();
 5891|      4|  PlanAllocationSize(proto, *alloc);
 5892|      4|  alloc->FinalizePlanning(tables_);
 5893|      4|  FileDescriptor* result = BuildFileImpl(proto, *alloc);
 5894|       |
 5895|      4|  file_tables_->FinalizeTables();
 5896|      4|  if (result) {
  ------------------
  |  Branch (5896:7): [True: 4, False: 0]
  ------------------
 5897|      4|    tables_->ClearLastCheckpoint();
 5898|      4|    result->finished_building_ = true;
 5899|      4|    alloc->ExpectConsumed();
 5900|      4|  } else {
 5901|      0|    tables_->RollbackToLastCheckpoint(deferred_validation_);
 5902|      0|  }
 5903|       |
 5904|      4|  return result;
 5905|      4|}
_ZN6google8protobuf17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS0_8internal13FlatAllocatorE:
 5908|      4|    const FileDescriptorProto& proto, internal::FlatAllocator& alloc) {
 5909|      4|  FileDescriptor* result = alloc.AllocateArray<FileDescriptor>(1);
 5910|      4|  file_ = result;
 5911|       |
 5912|      4|  if (proto.has_edition()) {
  ------------------
  |  Branch (5912:7): [True: 0, False: 4]
  ------------------
 5913|      0|    file_->edition_ = proto.edition();
 5914|      4|  } else if (proto.syntax().empty() || proto.syntax() == "proto2") {
  ------------------
  |  Branch (5914:14): [True: 2, False: 2]
  |  Branch (5914:40): [True: 0, False: 2]
  ------------------
 5915|      2|    file_->edition_ = Edition::EDITION_PROTO2;
 5916|      2|  } else if (proto.syntax() == "proto3") {
  ------------------
  |  Branch (5916:14): [True: 2, False: 0]
  ------------------
 5917|      2|    file_->edition_ = Edition::EDITION_PROTO3;
 5918|      2|  } else {
 5919|      0|    file_->edition_ = Edition::EDITION_UNKNOWN;
 5920|      0|    AddError(proto.name(), proto, DescriptorPool::ErrorCollector::OTHER, [&] {
 5921|      0|      return absl::StrCat("Unrecognized syntax: ", proto.syntax());
 5922|      0|    });
 5923|      0|  }
 5924|       |
 5925|      4|  const FeatureSetDefaults& defaults =
 5926|      4|      pool_->feature_set_defaults_spec_ == nullptr
  ------------------
  |  Branch (5926:7): [True: 4, False: 0]
  ------------------
 5927|      4|          ? GetCppFeatureSetDefaults()
 5928|      4|          : *pool_->feature_set_defaults_spec_;
 5929|       |
 5930|      4|  absl::StatusOr<FeatureResolver> feature_resolver =
 5931|      4|      FeatureResolver::Create(file_->edition_, defaults);
 5932|      4|  if (!feature_resolver.ok()) {
  ------------------
  |  Branch (5932:7): [True: 0, False: 4]
  ------------------
 5933|      0|    AddError(proto.name(), proto, DescriptorPool::ErrorCollector::EDITIONS,
 5934|      0|             [&] { return std::string(feature_resolver.status().message()); });
 5935|      4|  } else {
 5936|      4|    feature_resolver_.emplace(std::move(feature_resolver).value());
 5937|      4|  }
 5938|       |
 5939|      4|  result->is_placeholder_ = false;
 5940|      4|  result->finished_building_ = false;
 5941|      4|  SourceCodeInfo* info = nullptr;
 5942|      4|  if (proto.has_source_code_info()) {
  ------------------
  |  Branch (5942:7): [True: 0, False: 4]
  ------------------
 5943|      0|    info = alloc.AllocateArray<SourceCodeInfo>(1);
 5944|      0|    *info = proto.source_code_info();
 5945|      0|    result->source_code_info_ = info;
 5946|      4|  } else {
 5947|      4|    result->source_code_info_ = &SourceCodeInfo::default_instance();
 5948|      4|  }
 5949|       |
 5950|      4|  file_tables_ = alloc.AllocateArray<FileDescriptorTables>(1);
 5951|      4|  file_->tables_ = file_tables_;
 5952|       |
 5953|      4|  if (!proto.has_name()) {
  ------------------
  |  Branch (5953:7): [True: 0, False: 4]
  ------------------
 5954|      0|    AddError("", proto, DescriptorPool::ErrorCollector::OTHER,
 5955|      0|             "Missing field: FileDescriptorProto.name.");
 5956|      0|  }
 5957|       |
 5958|      4|  result->name_ = alloc.AllocateStrings(proto.name());
 5959|      4|  if (proto.has_package()) {
  ------------------
  |  Branch (5959:7): [True: 4, False: 0]
  ------------------
 5960|      4|    result->package_ = alloc.AllocateStrings(proto.package());
 5961|      4|  } else {
 5962|       |    // We cannot rely on proto.package() returning a valid string if
 5963|       |    // proto.has_package() is false, because we might be running at static
 5964|       |    // initialization time, in which case default values have not yet been
 5965|       |    // initialized.
 5966|      0|    result->package_ = alloc.AllocateStrings("");
 5967|      0|  }
 5968|      4|  result->pool_ = pool_;
 5969|       |
 5970|      4|  if (absl::StrContains(result->name(), '\0')) {
  ------------------
  |  Branch (5970:7): [True: 0, False: 4]
  ------------------
 5971|      0|    AddError(result->name(), proto, DescriptorPool::ErrorCollector::NAME, [&] {
 5972|      0|      return absl::StrCat("\"", result->name(), "\" contains null character.");
 5973|      0|    });
 5974|      0|    return nullptr;
 5975|      0|  }
 5976|       |
 5977|       |  // Add to tables.
 5978|      4|  if (!tables_->AddFile(result)) {
  ------------------
  |  Branch (5978:7): [True: 0, False: 4]
  ------------------
 5979|      0|    AddError(proto.name(), proto, DescriptorPool::ErrorCollector::OTHER,
 5980|      0|             "A file with this name is already in the pool.");
 5981|       |    // Bail out early so that if this is actually the exact same file, we
 5982|       |    // don't end up reporting that every single symbol is already defined.
 5983|      0|    return nullptr;
 5984|      0|  }
 5985|      4|  if (!result->package().empty()) {
  ------------------
  |  Branch (5985:7): [True: 4, False: 0]
  ------------------
 5986|      4|    if (std::count(result->package().begin(), result->package().end(), '.') >
  ------------------
  |  Branch (5986:9): [True: 0, False: 4]
  ------------------
 5987|      4|        kPackageLimit) {
 5988|      0|      AddError(result->package(), proto, DescriptorPool::ErrorCollector::NAME,
 5989|      0|               "Exceeds Maximum Package Depth");
 5990|      0|      return nullptr;
 5991|      0|    }
 5992|      4|    AddPackage(result->package(), proto, result, true);
 5993|      4|  }
 5994|       |
 5995|       |  // Make sure all dependencies are loaded.
 5996|      4|  absl::flat_hash_set<absl::string_view> seen_dependencies;
 5997|      4|  result->dependency_count_ = proto.dependency_size();
 5998|      4|  result->dependencies_ =
 5999|      4|      alloc.AllocateArray<const FileDescriptor*>(proto.dependency_size());
 6000|      4|  result->dependencies_once_ = nullptr;
 6001|      4|  unused_dependency_.clear();
 6002|      4|  absl::flat_hash_set<int> weak_deps;
 6003|      4|  for (int i = 0; i < proto.weak_dependency_size(); ++i) {
  ------------------
  |  Branch (6003:19): [True: 0, False: 4]
  ------------------
 6004|      0|    weak_deps.insert(proto.weak_dependency(i));
 6005|      0|  }
 6006|       |
 6007|      4|  bool need_lazy_deps = false;
 6008|      5|  for (int i = 0; i < proto.dependency_size(); i++) {
  ------------------
  |  Branch (6008:19): [True: 1, False: 4]
  ------------------
 6009|      1|    if (!seen_dependencies.insert(proto.dependency(i)).second) {
  ------------------
  |  Branch (6009:9): [True: 0, False: 1]
  ------------------
 6010|      0|      AddTwiceListedError(proto, i);
 6011|      0|    }
 6012|       |
 6013|      1|    const FileDescriptor* dependency = tables_->FindFile(proto.dependency(i));
 6014|      1|    if (dependency == nullptr && pool_->underlay_ != nullptr) {
  ------------------
  |  Branch (6014:9): [True: 0, False: 1]
  |  Branch (6014:34): [True: 0, False: 0]
  ------------------
 6015|      0|      dependency = pool_->underlay_->FindFileByName(proto.dependency(i));
 6016|      0|    }
 6017|       |
 6018|      1|    if (dependency == result) {
  ------------------
  |  Branch (6018:9): [True: 0, False: 1]
  ------------------
 6019|       |      // Recursive import.  dependency/result is not fully initialized, and it's
 6020|       |      // dangerous to try to do anything with it.  The recursive import error
 6021|       |      // will be detected and reported in DescriptorBuilder::BuildFile().
 6022|      0|      return nullptr;
 6023|      0|    }
 6024|       |
 6025|      1|    if (dependency == nullptr) {
  ------------------
  |  Branch (6025:9): [True: 0, False: 1]
  ------------------
 6026|      0|      if (!pool_->lazily_build_dependencies_) {
  ------------------
  |  Branch (6026:11): [True: 0, False: 0]
  ------------------
 6027|      0|        if (pool_->allow_unknown_ ||
  ------------------
  |  Branch (6027:13): [True: 0, False: 0]
  ------------------
 6028|      0|            (!pool_->enforce_weak_ && weak_deps.contains(i))) {
  ------------------
  |  Branch (6028:14): [True: 0, False: 0]
  |  Branch (6028:39): [True: 0, False: 0]
  ------------------
 6029|      0|          internal::FlatAllocator lazy_dep_alloc;
 6030|      0|          lazy_dep_alloc.PlanArray<FileDescriptor>(1);
 6031|      0|          lazy_dep_alloc.PlanArray<std::string>(1);
 6032|      0|          lazy_dep_alloc.FinalizePlanning(tables_);
 6033|      0|          dependency = pool_->NewPlaceholderFileWithMutexHeld(
 6034|      0|              proto.dependency(i), lazy_dep_alloc);
 6035|      0|        } else {
 6036|      0|          AddImportError(proto, i);
 6037|      0|        }
 6038|      0|      }
 6039|      1|    } else {
 6040|       |      // Add to unused_dependency_ to track unused imported files.
 6041|       |      // Note: do not track unused imported files for public import.
 6042|      1|      if (pool_->enforce_dependencies_ &&
  ------------------
  |  Branch (6042:11): [True: 0, False: 1]
  |  Branch (6042:11): [True: 0, False: 1]
  ------------------
 6043|      0|          (pool_->direct_input_files_.find(proto.name()) !=
  ------------------
  |  Branch (6043:11): [True: 0, False: 0]
  ------------------
 6044|      0|           pool_->direct_input_files_.end()) &&
 6045|      0|          (dependency->public_dependency_count() == 0)) {
  ------------------
  |  Branch (6045:11): [True: 0, False: 0]
  ------------------
 6046|      0|        unused_dependency_.insert(dependency);
 6047|      0|      }
 6048|      1|    }
 6049|       |
 6050|      1|    result->dependencies_[i] = dependency;
 6051|      1|    if (pool_->lazily_build_dependencies_ && !dependency) {
  ------------------
  |  Branch (6051:9): [True: 1, False: 0]
  |  Branch (6051:46): [True: 0, False: 1]
  ------------------
 6052|      0|      need_lazy_deps = true;
 6053|      0|    }
 6054|      1|  }
 6055|      4|  if (need_lazy_deps) {
  ------------------
  |  Branch (6055:7): [True: 0, False: 4]
  ------------------
 6056|      0|    int total_char_size = 0;
 6057|      0|    for (int i = 0; i < proto.dependency_size(); i++) {
  ------------------
  |  Branch (6057:21): [True: 0, False: 0]
  ------------------
 6058|      0|      if (result->dependencies_[i] == nullptr) {
  ------------------
  |  Branch (6058:11): [True: 0, False: 0]
  ------------------
 6059|      0|        total_char_size += static_cast<int>(proto.dependency(i).size());
 6060|      0|      }
 6061|      0|      ++total_char_size;  // For NUL char
 6062|      0|    }
 6063|       |
 6064|      0|    void* data = tables_->AllocateBytes(
 6065|      0|        static_cast<int>(sizeof(absl::once_flag)) + total_char_size);
 6066|      0|    result->dependencies_once_ = ::new (data) absl::once_flag{};
 6067|      0|    char* name_data = reinterpret_cast<char*>(result->dependencies_once_ + 1);
 6068|       |
 6069|      0|    for (int i = 0; i < proto.dependency_size(); i++) {
  ------------------
  |  Branch (6069:21): [True: 0, False: 0]
  ------------------
 6070|      0|      if (result->dependencies_[i] == nullptr) {
  ------------------
  |  Branch (6070:11): [True: 0, False: 0]
  ------------------
 6071|      0|        memcpy(name_data, proto.dependency(i).data(),
 6072|      0|               proto.dependency(i).size());
 6073|      0|        name_data += proto.dependency(i).size();
 6074|      0|      }
 6075|      0|      *name_data++ = '\0';
 6076|      0|    }
 6077|      0|  }
 6078|       |
 6079|       |  // Check public dependencies.
 6080|      4|  int public_dependency_count = 0;
 6081|      4|  result->public_dependencies_ =
 6082|      4|      alloc.AllocateArray<int>(proto.public_dependency_size());
 6083|      4|  for (int i = 0; i < proto.public_dependency_size(); i++) {
  ------------------
  |  Branch (6083:19): [True: 0, False: 4]
  ------------------
 6084|       |    // Only put valid public dependency indexes.
 6085|      0|    int index = proto.public_dependency(i);
 6086|      0|    if (index >= 0 && index < proto.dependency_size()) {
  ------------------
  |  Branch (6086:9): [True: 0, False: 0]
  |  Branch (6086:23): [True: 0, False: 0]
  ------------------
 6087|      0|      result->public_dependencies_[public_dependency_count++] = index;
 6088|       |      // Do not track unused imported files for public import.
 6089|       |      // Calling dependency(i) builds that file when doing lazy imports,
 6090|       |      // need to avoid doing this. Unused dependency detection isn't done
 6091|       |      // when building lazily, anyways.
 6092|      0|      if (!pool_->lazily_build_dependencies_) {
  ------------------
  |  Branch (6092:11): [True: 0, False: 0]
  ------------------
 6093|      0|        unused_dependency_.erase(result->dependency(index));
 6094|      0|      }
 6095|      0|    } else {
 6096|      0|      AddError(proto.name(), proto, DescriptorPool::ErrorCollector::OTHER,
 6097|      0|               "Invalid public dependency index.");
 6098|      0|    }
 6099|      0|  }
 6100|      4|  result->public_dependency_count_ = public_dependency_count;
 6101|       |
 6102|       |  // Build dependency set
 6103|      4|  dependencies_.clear();
 6104|       |  // We don't/can't do proper dependency error checking when
 6105|       |  // lazily_build_dependencies_, and calling dependency(i) will force
 6106|       |  // a dependency to be built, which we don't want.
 6107|      4|  if (!pool_->lazily_build_dependencies_) {
  ------------------
  |  Branch (6107:7): [True: 0, False: 4]
  ------------------
 6108|      0|    for (int i = 0; i < result->dependency_count(); i++) {
  ------------------
  |  Branch (6108:21): [True: 0, False: 0]
  ------------------
 6109|      0|      RecordPublicDependencies(result->dependency(i));
 6110|      0|    }
 6111|      0|  }
 6112|       |
 6113|       |  // Check weak dependencies.
 6114|      4|  int weak_dependency_count = 0;
 6115|      4|  result->weak_dependencies_ =
 6116|      4|      alloc.AllocateArray<int>(proto.weak_dependency_size());
 6117|      4|  for (int i = 0; i < proto.weak_dependency_size(); i++) {
  ------------------
  |  Branch (6117:19): [True: 0, False: 4]
  ------------------
 6118|      0|    int index = proto.weak_dependency(i);
 6119|      0|    if (index >= 0 && index < proto.dependency_size()) {
  ------------------
  |  Branch (6119:9): [True: 0, False: 0]
  |  Branch (6119:23): [True: 0, False: 0]
  ------------------
 6120|      0|      result->weak_dependencies_[weak_dependency_count++] = index;
 6121|      0|    } else {
 6122|      0|      AddError(proto.name(), proto, DescriptorPool::ErrorCollector::OTHER,
 6123|      0|               "Invalid weak dependency index.");
 6124|      0|    }
 6125|      0|  }
 6126|      4|  result->weak_dependency_count_ = weak_dependency_count;
 6127|       |
 6128|       |  // Convert children.
 6129|      4|  BUILD_ARRAY(proto, result, message_type, BuildMessage, nullptr);
  ------------------
  |  | 5627|      4|  OUTPUT->NAME##_count_ = INPUT.NAME##_size();                         \
  |  | 5628|      4|  OUTPUT->NAME##s_ = alloc.AllocateArray<                              \
  |  | 5629|      4|      typename std::remove_pointer<decltype(OUTPUT->NAME##s_)>::type>( \
  |  | 5630|      4|      INPUT.NAME##_size());                                            \
  |  | 5631|     41|  for (int i = 0; i < INPUT.NAME##_size(); i++) {                      \
  |  |  ------------------
  |  |  |  Branch (5631:19): [True: 37, False: 4]
  |  |  ------------------
  |  | 5632|     37|    METHOD(INPUT.NAME(i), PARENT, OUTPUT->NAME##s_ + i, alloc);        \
  |  | 5633|     37|  }
  ------------------
 6130|      4|  BUILD_ARRAY(proto, result, enum_type, BuildEnum, nullptr);
  ------------------
  |  | 5627|      4|  OUTPUT->NAME##_count_ = INPUT.NAME##_size();                         \
  |  | 5628|      4|  OUTPUT->NAME##s_ = alloc.AllocateArray<                              \
  |  | 5629|      4|      typename std::remove_pointer<decltype(OUTPUT->NAME##s_)>::type>( \
  |  | 5630|      4|      INPUT.NAME##_size());                                            \
  |  | 5631|     11|  for (int i = 0; i < INPUT.NAME##_size(); i++) {                      \
  |  |  ------------------
  |  |  |  Branch (5631:19): [True: 7, False: 4]
  |  |  ------------------
  |  | 5632|      7|    METHOD(INPUT.NAME(i), PARENT, OUTPUT->NAME##s_ + i, alloc);        \
  |  | 5633|      7|  }
  ------------------
 6131|      4|  BUILD_ARRAY(proto, result, service, BuildService, nullptr);
  ------------------
  |  | 5627|      4|  OUTPUT->NAME##_count_ = INPUT.NAME##_size();                         \
  |  | 5628|      4|  OUTPUT->NAME##s_ = alloc.AllocateArray<                              \
  |  | 5629|      4|      typename std::remove_pointer<decltype(OUTPUT->NAME##s_)>::type>( \
  |  | 5630|      4|      INPUT.NAME##_size());                                            \
  |  | 5631|      4|  for (int i = 0; i < INPUT.NAME##_size(); i++) {                      \
  |  |  ------------------
  |  |  |  Branch (5631:19): [True: 0, False: 4]
  |  |  ------------------
  |  | 5632|      0|    METHOD(INPUT.NAME(i), PARENT, OUTPUT->NAME##s_ + i, alloc);        \
  |  | 5633|      0|  }
  ------------------
 6132|      4|  BUILD_ARRAY(proto, result, extension, BuildExtension, nullptr);
  ------------------
  |  | 5627|      4|  OUTPUT->NAME##_count_ = INPUT.NAME##_size();                         \
  |  | 5628|      4|  OUTPUT->NAME##s_ = alloc.AllocateArray<                              \
  |  | 5629|      4|      typename std::remove_pointer<decltype(OUTPUT->NAME##s_)>::type>( \
  |  | 5630|      4|      INPUT.NAME##_size());                                            \
  |  | 5631|      5|  for (int i = 0; i < INPUT.NAME##_size(); i++) {                      \
  |  |  ------------------
  |  |  |  Branch (5631:19): [True: 1, False: 4]
  |  |  ------------------
  |  | 5632|      1|    METHOD(INPUT.NAME(i), PARENT, OUTPUT->NAME##s_ + i, alloc);        \
  |  | 5633|      1|  }
  ------------------
 6133|       |
 6134|       |  // Copy options.
 6135|      4|  AllocateOptions(proto, result, alloc);
 6136|       |
 6137|       |  // Note that the following steps must occur in exactly the specified order.
 6138|       |
 6139|       |  // Cross-link.
 6140|      4|  CrossLinkFile(result, proto);
 6141|       |
 6142|      4|  if (!message_hints_.empty()) {
  ------------------
  |  Branch (6142:7): [True: 0, False: 4]
  ------------------
 6143|      0|    SuggestFieldNumbers(result, proto);
 6144|      0|  }
 6145|       |
 6146|       |  // Interpret only the non-extension options first, including features and
 6147|       |  // their extensions.  This has to be done in two passes, since option
 6148|       |  // extensions defined in this file may have features attached to them.
 6149|      4|  if (!had_errors_) {
  ------------------
  |  Branch (6149:7): [True: 4, False: 0]
  ------------------
 6150|      4|    OptionInterpreter option_interpreter(this);
 6151|      4|    for (std::vector<OptionsToInterpret>::iterator iter =
 6152|      4|             options_to_interpret_.begin();
 6153|      4|         iter != options_to_interpret_.end(); ++iter) {
  ------------------
  |  Branch (6153:10): [True: 0, False: 4]
  ------------------
 6154|      0|      option_interpreter.InterpretNonExtensionOptions(&(*iter));
 6155|      0|    }
 6156|       |
 6157|       |    // TODO: move this check back to generator.cc once we no longer
 6158|       |    // need to set both ctype and string_type internally.
 6159|      4|    internal::VisitDescriptors(
 6160|      4|        *result, proto,
 6161|      4|        [&](const FieldDescriptor& field, const FieldDescriptorProto& proto) {
 6162|      4|          if (field.options_->has_ctype() && field.options_->features()
 6163|      4|                                                 .GetExtension(pb::cpp)
 6164|      4|                                                 .has_string_type()) {
 6165|      4|            AddError(field.full_name(), proto,
 6166|      4|                     DescriptorPool::ErrorCollector::TYPE, [&] {
 6167|      4|                       return absl::StrFormat(
 6168|      4|                           "Field %s specifies both string_type and ctype "
 6169|      4|                           "which is not supported.",
 6170|      4|                           field.full_name());
 6171|      4|                     });
 6172|      4|          }
 6173|      4|        });
 6174|       |
 6175|       |    // Handle feature resolution.  This must occur after option interpretation,
 6176|       |    // but before validation.
 6177|      4|    {
 6178|      4|      auto cleanup = DisableTracking();
 6179|      4|      internal::VisitDescriptors(
 6180|      4|          *result, proto, [&](const auto& descriptor, const auto& proto) {
 6181|      4|            using OptionsT =
 6182|      4|                typename std::remove_const<typename std::remove_pointer<
 6183|      4|                    decltype(descriptor.options_)>::type>::type;
 6184|      4|            using DescriptorT =
 6185|      4|                typename std::remove_const<typename std::remove_reference<
 6186|      4|                    decltype(descriptor)>::type>::type;
 6187|       |
 6188|      4|            ResolveFeatures(
 6189|      4|                proto, const_cast<DescriptorT*>(&descriptor),
 6190|      4|                const_cast<  // NOLINT(google3-runtime-proto-const-cast)
 6191|      4|                    OptionsT*>(descriptor.options_),
 6192|      4|                alloc);
 6193|      4|          });
 6194|      4|    }
 6195|       |
 6196|      4|    internal::VisitDescriptors(*result, [&](const FieldDescriptor& field) {
 6197|      4|      if (result->edition() >= Edition::EDITION_2024 &&
 6198|      4|          field.options().has_ctype()) {
 6199|       |        // "ctype" is no longer supported in edition 2024 and beyond.
 6200|      4|        AddError(
 6201|      4|            field.full_name(), proto, DescriptorPool::ErrorCollector::NAME,
 6202|      4|            "ctype option is not allowed under edition 2024 and beyond. Use "
 6203|      4|            "the feature string_type = VIEW|CORD|STRING|... instead.");
 6204|      4|      }
 6205|      4|      EnforceCTypeStringTypeConsistency(
 6206|      4|          field.file()->edition(), field.cpp_type(),
 6207|      4|          field.merged_features_->GetExtension(pb::cpp),
 6208|      4|          const_cast<  // NOLINT(google3-runtime-proto-const-cast)
 6209|      4|              FieldOptions&>(*field.options_));
 6210|      4|    });
 6211|       |
 6212|       |    // Post-process cleanup for field features.
 6213|      4|    internal::VisitDescriptors(
 6214|      4|        *result, proto,
 6215|      4|        [&](const FieldDescriptor& field, const FieldDescriptorProto& proto) {
 6216|      4|          PostProcessFieldFeatures(const_cast<FieldDescriptor&>(field), proto);
 6217|      4|        });
 6218|       |
 6219|       |    // Interpret any remaining uninterpreted options gathered into
 6220|       |    // options_to_interpret_ during descriptor building.  Cross-linking has made
 6221|       |    // extension options known, so all interpretations should now succeed.
 6222|      4|    for (std::vector<OptionsToInterpret>::iterator iter =
 6223|      4|             options_to_interpret_.begin();
 6224|      4|         iter != options_to_interpret_.end(); ++iter) {
  ------------------
  |  Branch (6224:10): [True: 0, False: 4]
  ------------------
 6225|      0|      option_interpreter.InterpretOptionExtensions(&(*iter));
 6226|      0|    }
 6227|      4|    options_to_interpret_.clear();
 6228|      4|    if (info != nullptr) {
  ------------------
  |  Branch (6228:9): [True: 0, False: 4]
  ------------------
 6229|      0|      option_interpreter.UpdateSourceCodeInfo(info);
 6230|      0|    }
 6231|      4|  }
 6232|       |
 6233|       |  // Validate options. See comments at InternalSetLazilyBuildDependencies about
 6234|       |  // error checking and lazy import building.
 6235|      4|  if (!had_errors_ && !pool_->lazily_build_dependencies_) {
  ------------------
  |  Branch (6235:7): [True: 4, False: 0]
  |  Branch (6235:23): [True: 0, False: 4]
  ------------------
 6236|      0|    internal::VisitDescriptors(
 6237|      0|        *result, proto, [&](const auto& descriptor, const auto& desc_proto) {
 6238|      0|          ValidateOptions(&descriptor, desc_proto);
 6239|      0|        });
 6240|      0|  }
 6241|       |
 6242|       |  // Additional naming conflict check for map entry types. Only need to check
 6243|       |  // this if there are already errors.
 6244|      4|  if (had_errors_) {
  ------------------
  |  Branch (6244:7): [True: 0, False: 4]
  ------------------
 6245|      0|    for (int i = 0; i < proto.message_type_size(); ++i) {
  ------------------
  |  Branch (6245:21): [True: 0, False: 0]
  ------------------
 6246|      0|      DetectMapConflicts(result->message_type(i), proto.message_type(i));
 6247|      0|    }
 6248|      0|  }
 6249|       |
 6250|       |
 6251|       |  // Again, see comments at InternalSetLazilyBuildDependencies about error
 6252|       |  // checking. Also, don't log unused dependencies if there were previous
 6253|       |  // errors, since the results might be inaccurate.
 6254|      4|  if (!had_errors_ && !unused_dependency_.empty() &&
  ------------------
  |  Branch (6254:7): [True: 4, False: 0]
  |  Branch (6254:23): [True: 0, False: 4]
  ------------------
 6255|      0|      !pool_->lazily_build_dependencies_) {
  ------------------
  |  Branch (6255:7): [True: 0, False: 0]
  ------------------
 6256|      0|    LogUnusedDependency(proto, result);
 6257|      0|  }
 6258|       |
 6259|       |  // Store feature information for deferred validation outside of the database
 6260|       |  // mutex.
 6261|      4|  if (!had_errors_ && !pool_->lazily_build_dependencies_) {
  ------------------
  |  Branch (6261:7): [True: 4, False: 0]
  |  Branch (6261:23): [True: 0, False: 4]
  ------------------
 6262|      0|    internal::VisitDescriptors(
 6263|      0|        *result, proto, [&](const auto& descriptor, const auto& desc_proto) {
 6264|      0|          if (descriptor.proto_features_ != &FeatureSet::default_instance()) {
 6265|      0|            deferred_validation_.ValidateFeatureLifetimes(
 6266|      0|                GetFile(descriptor), {descriptor.proto_features_, &desc_proto,
 6267|      0|                                      GetFullName(descriptor), proto.name()});
 6268|      0|          }
 6269|      0|        });
 6270|      0|  }
 6271|       |
 6272|      4|  if (had_errors_) {
  ------------------
  |  Branch (6272:7): [True: 0, False: 4]
  ------------------
 6273|      0|    return nullptr;
 6274|      4|  } else {
 6275|      4|    return result;
 6276|      4|  }
 6277|      4|}
_ZN6google8protobuf17DescriptorBuilder19AllocateNameStringsEN4absl12lts_2024011611string_viewES4_RNS0_8internal13FlatAllocatorE:
 6282|     73|    internal::FlatAllocator& alloc) {
 6283|     73|  if (scope.empty()) {
  ------------------
  |  Branch (6283:7): [True: 0, False: 73]
  ------------------
 6284|      0|    return alloc.AllocateStrings(proto_name, proto_name);
 6285|     73|  } else {
 6286|     73|    return alloc.AllocateStrings(proto_name,
 6287|     73|                                 absl::StrCat(scope, ".", proto_name));
 6288|     73|  }
 6289|     73|}
_ZN6google8protobuf17DescriptorBuilder12BuildMessageERKNS0_15DescriptorProtoEPKNS0_10DescriptorEPS5_RNS0_8internal13FlatAllocatorE:
 6316|     47|                                     internal::FlatAllocator& alloc) {
 6317|     47|  const absl::string_view scope =
 6318|     47|      (parent == nullptr) ? file_->package() : parent->full_name();
  ------------------
  |  Branch (6318:7): [True: 37, False: 10]
  ------------------
 6319|     47|  result->all_names_ = AllocateNameStrings(scope, proto.name(), alloc);
 6320|     47|  ValidateSymbolName(proto.name(), result->full_name(), proto);
 6321|       |
 6322|     47|  result->file_ = file_;
 6323|     47|  result->containing_type_ = parent;
 6324|     47|  result->is_placeholder_ = false;
 6325|     47|  result->is_unqualified_placeholder_ = false;
 6326|     47|  result->well_known_type_ = Descriptor::WELLKNOWNTYPE_UNSPECIFIED;
 6327|     47|  result->options_ = nullptr;  // Set to default_instance later if necessary.
 6328|       |
 6329|     47|  auto it = pool_->tables_->well_known_types_.find(result->full_name());
 6330|     47|  if (it != pool_->tables_->well_known_types_.end()) {
  ------------------
  |  Branch (6330:7): [True: 1, False: 46]
  ------------------
 6331|      1|    result->well_known_type_ = it->second;
 6332|      1|  }
 6333|       |
 6334|       |  // Calculate the continuous sequence of fields.
 6335|       |  // These can be fast-path'd during lookup and don't need to be added to the
 6336|       |  // tables.
 6337|       |  // We use uint16_t to save space for sequential_field_limit_, so stop before
 6338|       |  // overflowing it. Worst case, we are not taking full advantage on huge
 6339|       |  // messages, but it is unlikely.
 6340|     47|  result->sequential_field_limit_ = 0;
 6341|    174|  for (int i = 0; i < std::numeric_limits<uint16_t>::max() &&
  ------------------
  |  Branch (6341:19): [True: 174, False: 0]
  ------------------
 6342|    174|                  i < proto.field_size() && proto.field(i).number() == i + 1;
  ------------------
  |  Branch (6342:19): [True: 147, False: 27]
  |  Branch (6342:45): [True: 127, False: 20]
  ------------------
 6343|    127|       ++i) {
 6344|    127|    result->sequential_field_limit_ = i + 1;
 6345|    127|  }
 6346|       |
 6347|       |  // Build oneofs first so that fields and extension ranges can refer to them.
 6348|     47|  BUILD_ARRAY(proto, result, oneof_decl, BuildOneof, result);
  ------------------
  |  | 5627|     47|  OUTPUT->NAME##_count_ = INPUT.NAME##_size();                         \
  |  | 5628|     47|  OUTPUT->NAME##s_ = alloc.AllocateArray<                              \
  |  | 5629|     47|      typename std::remove_pointer<decltype(OUTPUT->NAME##s_)>::type>( \
  |  | 5630|     47|      INPUT.NAME##_size());                                            \
  |  | 5631|     49|  for (int i = 0; i < INPUT.NAME##_size(); i++) {                      \
  |  |  ------------------
  |  |  |  Branch (5631:19): [True: 2, False: 47]
  |  |  ------------------
  |  | 5632|      2|    METHOD(INPUT.NAME(i), PARENT, OUTPUT->NAME##s_ + i, alloc);        \
  |  | 5633|      2|  }
  ------------------
 6349|     47|  BUILD_ARRAY(proto, result, field, BuildField, result);
  ------------------
  |  | 5627|     47|  OUTPUT->NAME##_count_ = INPUT.NAME##_size();                         \
  |  | 5628|     47|  OUTPUT->NAME##s_ = alloc.AllocateArray<                              \
  |  | 5629|     47|      typename std::remove_pointer<decltype(OUTPUT->NAME##s_)>::type>( \
  |  | 5630|     47|      INPUT.NAME##_size());                                            \
  |  | 5631|    281|  for (int i = 0; i < INPUT.NAME##_size(); i++) {                      \
  |  |  ------------------
  |  |  |  Branch (5631:19): [True: 234, False: 47]
  |  |  ------------------
  |  | 5632|    234|    METHOD(INPUT.NAME(i), PARENT, OUTPUT->NAME##s_ + i, alloc);        \
  |  | 5633|    234|  }
  ------------------
 6350|     47|  BUILD_ARRAY(proto, result, enum_type, BuildEnum, result);
  ------------------
  |  | 5627|     47|  OUTPUT->NAME##_count_ = INPUT.NAME##_size();                         \
  |  | 5628|     47|  OUTPUT->NAME##s_ = alloc.AllocateArray<                              \
  |  | 5629|     47|      typename std::remove_pointer<decltype(OUTPUT->NAME##s_)>::type>( \
  |  | 5630|     47|      INPUT.NAME##_size());                                            \
  |  | 5631|     64|  for (int i = 0; i < INPUT.NAME##_size(); i++) {                      \
  |  |  ------------------
  |  |  |  Branch (5631:19): [True: 17, False: 47]
  |  |  ------------------
  |  | 5632|     17|    METHOD(INPUT.NAME(i), PARENT, OUTPUT->NAME##s_ + i, alloc);        \
  |  | 5633|     17|  }
  ------------------
 6351|     47|  BUILD_ARRAY(proto, result, extension_range, BuildExtensionRange, result);
  ------------------
  |  | 5627|     47|  OUTPUT->NAME##_count_ = INPUT.NAME##_size();                         \
  |  | 5628|     47|  OUTPUT->NAME##s_ = alloc.AllocateArray<                              \
  |  | 5629|     47|      typename std::remove_pointer<decltype(OUTPUT->NAME##s_)>::type>( \
  |  | 5630|     47|      INPUT.NAME##_size());                                            \
  |  | 5631|     61|  for (int i = 0; i < INPUT.NAME##_size(); i++) {                      \
  |  |  ------------------
  |  |  |  Branch (5631:19): [True: 14, False: 47]
  |  |  ------------------
  |  | 5632|     14|    METHOD(INPUT.NAME(i), PARENT, OUTPUT->NAME##s_ + i, alloc);        \
  |  | 5633|     14|  }
  ------------------
 6352|     47|  BUILD_ARRAY(proto, result, extension, BuildExtension, result);
  ------------------
  |  | 5627|     47|  OUTPUT->NAME##_count_ = INPUT.NAME##_size();                         \
  |  | 5628|     47|  OUTPUT->NAME##s_ = alloc.AllocateArray<                              \
  |  | 5629|     47|      typename std::remove_pointer<decltype(OUTPUT->NAME##s_)>::type>( \
  |  | 5630|     47|      INPUT.NAME##_size());                                            \
  |  | 5631|     47|  for (int i = 0; i < INPUT.NAME##_size(); i++) {                      \
  |  |  ------------------
  |  |  |  Branch (5631:19): [True: 0, False: 47]
  |  |  ------------------
  |  | 5632|      0|    METHOD(INPUT.NAME(i), PARENT, OUTPUT->NAME##s_ + i, alloc);        \
  |  | 5633|      0|  }
  ------------------
 6353|     47|  BUILD_ARRAY(proto, result, reserved_range, BuildReservedRange, result);
  ------------------
  |  | 5627|     47|  OUTPUT->NAME##_count_ = INPUT.NAME##_size();                         \
  |  | 5628|     47|  OUTPUT->NAME##s_ = alloc.AllocateArray<                              \
  |  | 5629|     47|      typename std::remove_pointer<decltype(OUTPUT->NAME##s_)>::type>( \
  |  | 5630|     47|      INPUT.NAME##_size());                                            \
  |  | 5631|     61|  for (int i = 0; i < INPUT.NAME##_size(); i++) {                      \
  |  |  ------------------
  |  |  |  Branch (5631:19): [True: 14, False: 47]
  |  |  ------------------
  |  | 5632|     14|    METHOD(INPUT.NAME(i), PARENT, OUTPUT->NAME##s_ + i, alloc);        \
  |  | 5633|     14|  }
  ------------------
 6354|       |
 6355|       |  // Copy options.
 6356|     47|  AllocateOptions(proto, result, DescriptorProto::kOptionsFieldNumber,
 6357|     47|                  "google.protobuf.MessageOptions", alloc);
 6358|       |
 6359|       |  // Before building submessages, check recursion limit.
 6360|     47|  --recursion_depth_;
 6361|     47|  IncrementWhenDestroyed revert{recursion_depth_};
 6362|     47|  if (recursion_depth_ <= 0) {
  ------------------
  |  Branch (6362:7): [True: 0, False: 47]
  ------------------
 6363|      0|    AddError(result->full_name(), proto, DescriptorPool::ErrorCollector::OTHER,
 6364|      0|             "Reached maximum recursion limit for nested messages.");
 6365|      0|    result->nested_types_ = nullptr;
 6366|      0|    result->nested_type_count_ = 0;
 6367|      0|    return;
 6368|      0|  }
 6369|     47|  BUILD_ARRAY(proto, result, nested_type, BuildMessage, result);
  ------------------
  |  | 5627|     47|  OUTPUT->NAME##_count_ = INPUT.NAME##_size();                         \
  |  | 5628|     47|  OUTPUT->NAME##s_ = alloc.AllocateArray<                              \
  |  | 5629|     47|      typename std::remove_pointer<decltype(OUTPUT->NAME##s_)>::type>( \
  |  | 5630|     47|      INPUT.NAME##_size());                                            \
  |  | 5631|     57|  for (int i = 0; i < INPUT.NAME##_size(); i++) {                      \
  |  |  ------------------
  |  |  |  Branch (5631:19): [True: 10, False: 47]
  |  |  ------------------
  |  | 5632|     10|    METHOD(INPUT.NAME(i), PARENT, OUTPUT->NAME##s_ + i, alloc);        \
  |  | 5633|     10|  }
  ------------------
 6370|       |
 6371|       |  // Copy reserved names.
 6372|     47|  int reserved_name_count = proto.reserved_name_size();
 6373|     47|  result->reserved_name_count_ = reserved_name_count;
 6374|     47|  result->reserved_names_ =
 6375|     47|      alloc.AllocateArray<const std::string*>(reserved_name_count);
 6376|     49|  for (int i = 0; i < reserved_name_count; ++i) {
  ------------------
  |  Branch (6376:19): [True: 2, False: 47]
  ------------------
 6377|      2|    result->reserved_names_[i] = alloc.AllocateStrings(proto.reserved_name(i));
 6378|      2|  }
 6379|       |
 6380|     47|  AddSymbol(result->full_name(), parent, result->name(), proto, Symbol(result));
 6381|       |
 6382|     61|  for (int i = 0; i < proto.reserved_range_size(); i++) {
  ------------------
  |  Branch (6382:19): [True: 14, False: 47]
  ------------------
 6383|     14|    const DescriptorProto_ReservedRange& range1 = proto.reserved_range(i);
 6384|     27|    for (int j = i + 1; j < proto.reserved_range_size(); j++) {
  ------------------
  |  Branch (6384:25): [True: 13, False: 14]
  ------------------
 6385|     13|      const DescriptorProto_ReservedRange& range2 = proto.reserved_range(j);
 6386|     13|      if (range1.end() > range2.start() && range2.end() > range1.start()) {
  ------------------
  |  Branch (6386:11): [True: 1, False: 12]
  |  Branch (6386:44): [True: 0, False: 1]
  ------------------
 6387|      0|        AddError(result->full_name(), proto.reserved_range(i),
 6388|      0|                 DescriptorPool::ErrorCollector::NUMBER, [&] {
 6389|      0|                   return absl::Substitute(
 6390|      0|                       "Reserved range $0 to $1 overlaps with "
 6391|      0|                       "already-defined range $2 to $3.",
 6392|      0|                       range2.start(), range2.end() - 1, range1.start(),
 6393|      0|                       range1.end() - 1);
 6394|      0|                 });
 6395|      0|      }
 6396|     13|    }
 6397|     14|  }
 6398|       |
 6399|     47|  absl::flat_hash_set<absl::string_view> reserved_name_set;
 6400|     47|  for (const std::string& name : proto.reserved_name()) {
  ------------------
  |  Branch (6400:32): [True: 2, False: 47]
  ------------------
 6401|      2|    if (!reserved_name_set.insert(name).second) {
  ------------------
  |  Branch (6401:9): [True: 0, False: 2]
  ------------------
 6402|      0|      AddError(name, proto, DescriptorPool::ErrorCollector::NAME, [&] {
 6403|      0|        return absl::Substitute("Field name \"$0\" is reserved multiple times.",
 6404|      0|                                name);
 6405|      0|      });
 6406|      0|    }
 6407|      2|  }
 6408|       |  // Check that fields aren't using reserved names or numbers and that they
 6409|       |  // aren't using extension numbers.
 6410|    281|  for (int i = 0; i < result->field_count(); i++) {
  ------------------
  |  Branch (6410:19): [True: 234, False: 47]
  ------------------
 6411|    234|    const FieldDescriptor* field = result->field(i);
 6412|    319|    for (int j = 0; j < result->extension_range_count(); j++) {
  ------------------
  |  Branch (6412:21): [True: 85, False: 234]
  ------------------
 6413|     85|      const Descriptor::ExtensionRange* range = result->extension_range(j);
 6414|     85|      if (range->start_number() <= field->number() &&
  ------------------
  |  Branch (6414:11): [True: 0, False: 85]
  ------------------
 6415|      0|          field->number() < range->end_number()) {
  ------------------
  |  Branch (6415:11): [True: 0, False: 0]
  ------------------
 6416|      0|        message_hints_[result].RequestHintOnFieldNumbers(
 6417|      0|            proto.extension_range(j), DescriptorPool::ErrorCollector::NUMBER);
 6418|      0|        AddError(field->full_name(), proto.extension_range(j),
 6419|      0|                 DescriptorPool::ErrorCollector::NUMBER, [&] {
 6420|      0|                   return absl::Substitute(
 6421|      0|                       "Extension range $0 to $1 includes field \"$2\" ($3).",
 6422|      0|                       range->start_number(), range->end_number() - 1,
 6423|      0|                       field->name(), field->number());
 6424|      0|                 });
 6425|      0|      }
 6426|     85|    }
 6427|    361|    for (int j = 0; j < result->reserved_range_count(); j++) {
  ------------------
  |  Branch (6427:21): [True: 127, False: 234]
  ------------------
 6428|    127|      const Descriptor::ReservedRange* range = result->reserved_range(j);
 6429|    127|      if (range->start <= field->number() && field->number() < range->end) {
  ------------------
  |  Branch (6429:11): [True: 56, False: 71]
  |  Branch (6429:46): [True: 0, False: 56]
  ------------------
 6430|      0|        message_hints_[result].RequestHintOnFieldNumbers(
 6431|      0|            proto.reserved_range(j), DescriptorPool::ErrorCollector::NUMBER);
 6432|      0|        AddError(field->full_name(), proto.reserved_range(j),
 6433|      0|                 DescriptorPool::ErrorCollector::NUMBER, [&] {
 6434|      0|                   return absl::Substitute(
 6435|      0|                       "Field \"$0\" uses reserved number $1.", field->name(),
 6436|      0|                       field->number());
 6437|      0|                 });
 6438|      0|      }
 6439|    127|    }
 6440|    234|    if (reserved_name_set.contains(field->name())) {
  ------------------
  |  Branch (6440:9): [True: 0, False: 234]
  ------------------
 6441|      0|      AddError(field->full_name(), proto.field(i),
 6442|      0|               DescriptorPool::ErrorCollector::NAME, [&] {
 6443|      0|                 return absl::Substitute("Field name \"$0\" is reserved.",
 6444|      0|                                         field->name());
 6445|      0|               });
 6446|      0|    }
 6447|    234|  }
 6448|       |
 6449|       |  // Check that extension ranges don't overlap and don't include
 6450|       |  // reserved field numbers or names.
 6451|     61|  for (int i = 0; i < result->extension_range_count(); i++) {
  ------------------
  |  Branch (6451:19): [True: 14, False: 47]
  ------------------
 6452|     14|    const Descriptor::ExtensionRange* range1 = result->extension_range(i);
 6453|     27|    for (int j = 0; j < result->reserved_range_count(); j++) {
  ------------------
  |  Branch (6453:21): [True: 13, False: 14]
  ------------------
 6454|     13|      const Descriptor::ReservedRange* range2 = result->reserved_range(j);
 6455|     13|      if (range1->end_number() > range2->start &&
  ------------------
  |  Branch (6455:11): [True: 13, False: 0]
  ------------------
 6456|     13|          range2->end > range1->start_number()) {
  ------------------
  |  Branch (6456:11): [True: 0, False: 13]
  ------------------
 6457|      0|        AddError(result->full_name(), proto.extension_range(i),
 6458|      0|                 DescriptorPool::ErrorCollector::NUMBER, [&] {
 6459|      0|                   return absl::Substitute(
 6460|      0|                       "Extension range $0 to $1 overlaps with "
 6461|      0|                       "reserved range $2 to $3.",
 6462|      0|                       range1->start_number(), range1->end_number() - 1,
 6463|      0|                       range2->start, range2->end - 1);
 6464|      0|                 });
 6465|      0|      }
 6466|     13|    }
 6467|     17|    for (int j = i + 1; j < result->extension_range_count(); j++) {
  ------------------
  |  Branch (6467:25): [True: 3, False: 14]
  ------------------
 6468|      3|      const Descriptor::ExtensionRange* range2 = result->extension_range(j);
 6469|      3|      if (range1->end_number() > range2->start_number() &&
  ------------------
  |  Branch (6469:11): [True: 0, False: 3]
  ------------------
 6470|      0|          range2->end_number() > range1->start_number()) {
  ------------------
  |  Branch (6470:11): [True: 0, False: 0]
  ------------------
 6471|      0|        AddError(result->full_name(), proto.extension_range(i),
 6472|      0|                 DescriptorPool::ErrorCollector::NUMBER, [&] {
 6473|      0|                   return absl::Substitute(
 6474|      0|                       "Extension range $0 to $1 overlaps with "
 6475|      0|                       "already-defined range $2 to $3.",
 6476|      0|                       range2->start_number(), range2->end_number() - 1,
 6477|      0|                       range1->start_number(), range1->end_number() - 1);
 6478|      0|                 });
 6479|      0|      }
 6480|      3|    }
 6481|     14|  }
 6482|     47|}
_ZN6google8protobuf17DescriptorBuilder21BuildFieldOrExtensionERKNS0_20FieldDescriptorProtoEPNS0_10DescriptorEPNS0_15FieldDescriptorEbRNS0_8internal13FlatAllocatorE:
 6585|    235|                                              internal::FlatAllocator& alloc) {
 6586|    235|  const absl::string_view scope =
 6587|    235|      (parent == nullptr) ? file_->package() : parent->full_name();
  ------------------
  |  Branch (6587:7): [True: 1, False: 234]
  ------------------
 6588|       |
 6589|       |  // We allocate all names in a single array, and dedup them.
 6590|       |  // We remember the indices for the potentially deduped values.
 6591|    235|  auto all_names = alloc.AllocateFieldNames(
 6592|    235|      proto.name(), scope,
 6593|    235|      proto.has_json_name() ? &proto.json_name() : nullptr);
  ------------------
  |  Branch (6593:7): [True: 0, False: 235]
  ------------------
 6594|    235|  result->all_names_ = all_names.array;
 6595|    235|  result->lowercase_name_index_ = all_names.lowercase_index;
 6596|    235|  result->camelcase_name_index_ = all_names.camelcase_index;
 6597|    235|  result->json_name_index_ = all_names.json_index;
 6598|       |
 6599|    235|  ValidateSymbolName(proto.name(), result->full_name(), proto);
 6600|       |
 6601|    235|  result->file_ = file_;
 6602|    235|  result->number_ = proto.number();
 6603|    235|  result->is_extension_ = is_extension;
 6604|    235|  result->is_oneof_ = false;
 6605|    235|  result->in_real_oneof_ = false;
 6606|    235|  result->proto3_optional_ = proto.proto3_optional();
 6607|       |
 6608|    235|  if (proto.proto3_optional() && file_->edition() != Edition::EDITION_PROTO3) {
  ------------------
  |  Branch (6608:7): [True: 0, False: 235]
  |  Branch (6608:34): [True: 0, False: 0]
  ------------------
 6609|      0|    AddError(result->full_name(), proto, DescriptorPool::ErrorCollector::TYPE,
 6610|      0|             [&] {
 6611|      0|               return absl::StrCat(
 6612|      0|                   "The [proto3_optional=true] option may only be set on proto3"
 6613|      0|                   "fields, not ",
 6614|      0|                   result->full_name());
 6615|      0|             });
 6616|      0|  }
 6617|       |
 6618|    235|  result->has_json_name_ = proto.has_json_name();
 6619|       |
 6620|    235|  result->type_ = proto.type();
 6621|    235|  result->label_ = proto.label();
 6622|    235|  result->is_repeated_ = result->label_ == FieldDescriptor::LABEL_REPEATED;
 6623|       |
 6624|    235|  if (result->label() == FieldDescriptor::LABEL_REQUIRED) {
  ------------------
  |  Branch (6624:7): [True: 2, False: 233]
  ------------------
 6625|       |    // An extension cannot have a required field (b/13365836).
 6626|      2|    if (result->is_extension_) {
  ------------------
  |  Branch (6626:9): [True: 0, False: 2]
  ------------------
 6627|      0|      AddError(result->full_name(), proto,
 6628|       |               // Error location `TYPE`: we would really like to indicate
 6629|       |               // `LABEL`, but the `ErrorLocation` enum has no entry for this,
 6630|       |               // and we don't necessarily know about all implementations of the
 6631|       |               // `ErrorCollector` interface to extend them to handle the new
 6632|       |               // error location type properly.
 6633|      0|               DescriptorPool::ErrorCollector::TYPE, [&] {
 6634|      0|                 return absl::StrCat("The extension ", result->full_name(),
 6635|      0|                                     " cannot be required.");
 6636|      0|               });
 6637|      0|    }
 6638|      2|  }
 6639|       |
 6640|       |  // Some of these may be filled in when cross-linking.
 6641|    235|  result->containing_type_ = nullptr;
 6642|    235|  result->type_once_ = nullptr;
 6643|    235|  result->default_value_enum_ = nullptr;
 6644|       |
 6645|    235|  result->has_default_value_ = proto.has_default_value();
 6646|    235|  if (proto.has_default_value() && result->is_repeated()) {
  ------------------
  |  Branch (6646:7): [True: 27, False: 208]
  |  Branch (6646:36): [True: 0, False: 27]
  ------------------
 6647|      0|    AddError(result->full_name(), proto,
 6648|      0|             DescriptorPool::ErrorCollector::DEFAULT_VALUE,
 6649|      0|             "Repeated fields can't have default values.");
 6650|      0|  }
 6651|       |
 6652|    235|  if (proto.has_type()) {
  ------------------
  |  Branch (6652:7): [True: 235, False: 0]
  ------------------
 6653|    235|    if (proto.has_default_value()) {
  ------------------
  |  Branch (6653:9): [True: 27, False: 208]
  ------------------
 6654|     27|      char* end_pos = nullptr;
 6655|     27|      switch (result->cpp_type()) {
  ------------------
  |  Branch (6655:15): [True: 27, False: 0]
  ------------------
 6656|      0|        case FieldDescriptor::CPPTYPE_INT32:
  ------------------
  |  Branch (6656:9): [True: 0, False: 27]
  ------------------
 6657|      0|          result->default_value_int32_t_ =
 6658|      0|              std::strtol(proto.default_value().c_str(), &end_pos, 0);
 6659|      0|          break;
 6660|      0|        case FieldDescriptor::CPPTYPE_INT64:
  ------------------
  |  Branch (6660:9): [True: 0, False: 27]
  ------------------
 6661|      0|          static_assert(sizeof(int64_t) == sizeof(long long),  // NOLINT
 6662|      0|                        "sizeof int64_t is not sizeof long long");
 6663|      0|          result->default_value_int64_t_ =
 6664|      0|              std::strtoll(proto.default_value().c_str(), &end_pos, 0);
 6665|      0|          break;
 6666|      0|        case FieldDescriptor::CPPTYPE_UINT32:
  ------------------
  |  Branch (6666:9): [True: 0, False: 27]
  ------------------
 6667|      0|          result->default_value_uint32_t_ =
 6668|      0|              std::strtoul(proto.default_value().c_str(), &end_pos, 0);
 6669|      0|          break;
 6670|      0|        case FieldDescriptor::CPPTYPE_UINT64:
  ------------------
  |  Branch (6670:9): [True: 0, False: 27]
  ------------------
 6671|      0|          static_assert(
 6672|      0|              sizeof(uint64_t) == sizeof(unsigned long long),  // NOLINT
 6673|      0|              "sizeof uint64_t is not sizeof unsigned long long");
 6674|      0|          result->default_value_uint64_t_ =
 6675|      0|              std::strtoull(proto.default_value().c_str(), &end_pos, 0);
 6676|      0|          break;
 6677|      0|        case FieldDescriptor::CPPTYPE_FLOAT:
  ------------------
  |  Branch (6677:9): [True: 0, False: 27]
  ------------------
 6678|      0|          if (proto.default_value() == "inf") {
  ------------------
  |  Branch (6678:15): [True: 0, False: 0]
  ------------------
 6679|      0|            result->default_value_float_ =
 6680|      0|                std::numeric_limits<float>::infinity();
 6681|      0|          } else if (proto.default_value() == "-inf") {
  ------------------
  |  Branch (6681:22): [True: 0, False: 0]
  ------------------
 6682|      0|            result->default_value_float_ =
 6683|      0|                -std::numeric_limits<float>::infinity();
 6684|      0|          } else if (proto.default_value() == "nan") {
  ------------------
  |  Branch (6684:22): [True: 0, False: 0]
  ------------------
 6685|      0|            result->default_value_float_ =
 6686|      0|                std::numeric_limits<float>::quiet_NaN();
 6687|      0|          } else {
 6688|      0|            result->default_value_float_ = io::SafeDoubleToFloat(
 6689|      0|                io::NoLocaleStrtod(proto.default_value().c_str(), &end_pos));
 6690|      0|          }
 6691|      0|          break;
 6692|      0|        case FieldDescriptor::CPPTYPE_DOUBLE:
  ------------------
  |  Branch (6692:9): [True: 0, False: 27]
  ------------------
 6693|      0|          if (proto.default_value() == "inf") {
  ------------------
  |  Branch (6693:15): [True: 0, False: 0]
  ------------------
 6694|      0|            result->default_value_double_ =
 6695|      0|                std::numeric_limits<double>::infinity();
 6696|      0|          } else if (proto.default_value() == "-inf") {
  ------------------
  |  Branch (6696:22): [True: 0, False: 0]
  ------------------
 6697|      0|            result->default_value_double_ =
 6698|      0|                -std::numeric_limits<double>::infinity();
 6699|      0|          } else if (proto.default_value() == "nan") {
  ------------------
  |  Branch (6699:22): [True: 0, False: 0]
  ------------------
 6700|      0|            result->default_value_double_ =
 6701|      0|                std::numeric_limits<double>::quiet_NaN();
 6702|      0|          } else {
 6703|      0|            result->default_value_double_ =
 6704|      0|                io::NoLocaleStrtod(proto.default_value().c_str(), &end_pos);
 6705|      0|          }
 6706|      0|          break;
 6707|     22|        case FieldDescriptor::CPPTYPE_BOOL:
  ------------------
  |  Branch (6707:9): [True: 22, False: 5]
  ------------------
 6708|     22|          if (proto.default_value() == "true") {
  ------------------
  |  Branch (6708:15): [True: 1, False: 21]
  ------------------
 6709|      1|            result->default_value_bool_ = true;
 6710|     21|          } else if (proto.default_value() == "false") {
  ------------------
  |  Branch (6710:22): [True: 21, False: 0]
  ------------------
 6711|     21|            result->default_value_bool_ = false;
 6712|     21|          } else {
 6713|      0|            AddError(result->full_name(), proto,
 6714|      0|                     DescriptorPool::ErrorCollector::DEFAULT_VALUE,
 6715|      0|                     "Boolean default must be true or false.");
 6716|      0|          }
 6717|     22|          break;
 6718|      5|        case FieldDescriptor::CPPTYPE_ENUM:
  ------------------
  |  Branch (6718:9): [True: 5, False: 22]
  ------------------
 6719|       |          // This will be filled in when cross-linking.
 6720|      5|          result->default_value_enum_ = nullptr;
 6721|      5|          break;
 6722|      0|        case FieldDescriptor::CPPTYPE_STRING:
  ------------------
  |  Branch (6722:9): [True: 0, False: 27]
  ------------------
 6723|      0|          if (result->type() == FieldDescriptor::TYPE_BYTES) {
  ------------------
  |  Branch (6723:15): [True: 0, False: 0]
  ------------------
 6724|      0|            std::string value;
 6725|      0|            if (absl::CUnescape(proto.default_value(), &value)) {
  ------------------
  |  Branch (6725:17): [True: 0, False: 0]
  ------------------
 6726|      0|              result->default_value_string_ = alloc.AllocateStrings(value);
 6727|      0|            } else {
 6728|      0|              AddError(result->full_name(), proto,
 6729|      0|                       DescriptorPool::ErrorCollector::DEFAULT_VALUE,
 6730|      0|                       "Invalid escaping in default value.");
 6731|      0|            }
 6732|      0|          } else {
 6733|      0|            result->default_value_string_ =
 6734|      0|                alloc.AllocateStrings(proto.default_value());
 6735|      0|          }
 6736|      0|          break;
 6737|      0|        case FieldDescriptor::CPPTYPE_MESSAGE:
  ------------------
  |  Branch (6737:9): [True: 0, False: 27]
  ------------------
 6738|      0|          AddError(result->full_name(), proto,
 6739|      0|                   DescriptorPool::ErrorCollector::DEFAULT_VALUE,
 6740|      0|                   "Messages can't have default values.");
 6741|      0|          result->has_default_value_ = false;
 6742|      0|          result->default_generated_instance_ = nullptr;
 6743|      0|          break;
 6744|     27|      }
 6745|       |
 6746|     27|      if (end_pos != nullptr) {
  ------------------
  |  Branch (6746:11): [True: 0, False: 27]
  ------------------
 6747|       |        // end_pos is only set non-null by the parsers for numeric types,
 6748|       |        // above. This checks that the default was non-empty and had no extra
 6749|       |        // junk after the end of the number.
 6750|      0|        if (proto.default_value().empty() || *end_pos != '\0') {
  ------------------
  |  Branch (6750:13): [True: 0, False: 0]
  |  Branch (6750:46): [True: 0, False: 0]
  ------------------
 6751|      0|          AddError(result->full_name(), proto,
 6752|      0|                   DescriptorPool::ErrorCollector::DEFAULT_VALUE, [&] {
 6753|      0|                     return absl::StrCat("Couldn't parse default value \"",
 6754|      0|                                         proto.default_value(), "\".");
 6755|      0|                   });
 6756|      0|        }
 6757|      0|      }
 6758|    208|    } else {
 6759|       |      // No explicit default value
 6760|    208|      switch (result->cpp_type()) {
  ------------------
  |  Branch (6760:15): [True: 208, False: 0]
  ------------------
 6761|     17|        case FieldDescriptor::CPPTYPE_INT32:
  ------------------
  |  Branch (6761:9): [True: 17, False: 191]
  ------------------
 6762|     17|          result->default_value_int32_t_ = 0;
 6763|     17|          break;
 6764|      1|        case FieldDescriptor::CPPTYPE_INT64:
  ------------------
  |  Branch (6764:9): [True: 1, False: 207]
  ------------------
 6765|      1|          result->default_value_int64_t_ = 0;
 6766|      1|          break;
 6767|      8|        case FieldDescriptor::CPPTYPE_UINT32:
  ------------------
  |  Branch (6767:9): [True: 8, False: 200]
  ------------------
 6768|      8|          result->default_value_uint32_t_ = 0;
 6769|      8|          break;
 6770|      2|        case FieldDescriptor::CPPTYPE_UINT64:
  ------------------
  |  Branch (6770:9): [True: 2, False: 206]
  ------------------
 6771|      2|          result->default_value_uint64_t_ = 0;
 6772|      2|          break;
 6773|      0|        case FieldDescriptor::CPPTYPE_FLOAT:
  ------------------
  |  Branch (6773:9): [True: 0, False: 208]
  ------------------
 6774|      0|          result->default_value_float_ = 0.0f;
 6775|      0|          break;
 6776|      1|        case FieldDescriptor::CPPTYPE_DOUBLE:
  ------------------
  |  Branch (6776:9): [True: 1, False: 207]
  ------------------
 6777|      1|          result->default_value_double_ = 0.0;
 6778|      1|          break;
 6779|     25|        case FieldDescriptor::CPPTYPE_BOOL:
  ------------------
  |  Branch (6779:9): [True: 25, False: 183]
  ------------------
 6780|     25|          result->default_value_bool_ = false;
 6781|     25|          break;
 6782|     27|        case FieldDescriptor::CPPTYPE_ENUM:
  ------------------
  |  Branch (6782:9): [True: 27, False: 181]
  ------------------
 6783|       |          // This will be filled in when cross-linking.
 6784|     27|          result->default_value_enum_ = nullptr;
 6785|     27|          break;
 6786|     61|        case FieldDescriptor::CPPTYPE_STRING:
  ------------------
  |  Branch (6786:9): [True: 61, False: 147]
  ------------------
 6787|     61|          result->default_value_string_ = &internal::GetEmptyString();
 6788|     61|          break;
 6789|     66|        case FieldDescriptor::CPPTYPE_MESSAGE:
  ------------------
  |  Branch (6789:9): [True: 66, False: 142]
  ------------------
 6790|     66|          result->default_generated_instance_ = nullptr;
 6791|     66|          break;
 6792|    208|      }
 6793|    208|    }
 6794|    235|  }
 6795|       |
 6796|    235|  if (result->number() <= 0) {
  ------------------
  |  Branch (6796:7): [True: 0, False: 235]
  ------------------
 6797|      0|    message_hints_[parent].RequestHintOnFieldNumbers(
 6798|      0|        proto, DescriptorPool::ErrorCollector::NUMBER);
 6799|      0|    AddError(result->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER,
 6800|      0|             "Field numbers must be positive integers.");
 6801|    235|  } else if (!is_extension && result->number() > FieldDescriptor::kMaxNumber) {
  ------------------
  |  Branch (6801:14): [True: 234, False: 1]
  |  Branch (6801:31): [True: 0, False: 234]
  ------------------
 6802|       |    // Only validate that the number is within the valid field range if it is
 6803|       |    // not an extension. Since extension numbers are validated with the
 6804|       |    // extendee's valid set of extension numbers, and those are in turn
 6805|       |    // validated against the max allowed number, the check is unnecessary for
 6806|       |    // extension fields.
 6807|       |    // This avoids cross-linking issues that arise when attempting to check if
 6808|       |    // the extendee is a message_set_wire_format message, which has a higher max
 6809|       |    // on extension numbers.
 6810|      0|    message_hints_[parent].RequestHintOnFieldNumbers(
 6811|      0|        proto, DescriptorPool::ErrorCollector::NUMBER);
 6812|      0|    AddError(result->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER,
 6813|      0|             [&] {
 6814|      0|               return absl::Substitute(
 6815|      0|                   "Field numbers cannot be greater than $0.",
 6816|      0|                   FieldDescriptor::kMaxNumber);
 6817|      0|             });
 6818|      0|  }
 6819|       |
 6820|    235|  if (is_extension) {
  ------------------
  |  Branch (6820:7): [True: 1, False: 234]
  ------------------
 6821|      1|    if (!proto.has_extendee()) {
  ------------------
  |  Branch (6821:9): [True: 0, False: 1]
  ------------------
 6822|      0|      AddError(result->full_name(), proto,
 6823|      0|               DescriptorPool::ErrorCollector::EXTENDEE,
 6824|      0|               "FieldDescriptorProto.extendee not set for extension field.");
 6825|      0|    }
 6826|       |
 6827|      1|    result->scope_.extension_scope = parent;
 6828|       |
 6829|      1|    if (proto.has_oneof_index()) {
  ------------------
  |  Branch (6829:9): [True: 0, False: 1]
  ------------------
 6830|      0|      AddError(result->full_name(), proto, DescriptorPool::ErrorCollector::TYPE,
 6831|      0|               "FieldDescriptorProto.oneof_index should not be set for "
 6832|      0|               "extensions.");
 6833|      0|    }
 6834|    234|  } else {
 6835|    234|    if (proto.has_extendee()) {
  ------------------
  |  Branch (6835:9): [True: 0, False: 234]
  ------------------
 6836|      0|      AddError(result->full_name(), proto,
 6837|      0|               DescriptorPool::ErrorCollector::EXTENDEE,
 6838|      0|               "FieldDescriptorProto.extendee set for non-extension field.");
 6839|      0|    }
 6840|       |
 6841|    234|    result->containing_type_ = parent;
 6842|       |
 6843|    234|    if (proto.has_oneof_index()) {
  ------------------
  |  Branch (6843:9): [True: 5, False: 229]
  ------------------
 6844|      5|      if (proto.oneof_index() < 0 ||
  ------------------
  |  Branch (6844:11): [True: 0, False: 5]
  ------------------
 6845|      5|          proto.oneof_index() >= parent->oneof_decl_count()) {
  ------------------
  |  Branch (6845:11): [True: 0, False: 5]
  ------------------
 6846|      0|        AddError(result->full_name(), proto,
 6847|      0|                 DescriptorPool::ErrorCollector::TYPE, [&] {
 6848|      0|                   return absl::Substitute(
 6849|      0|                       "FieldDescriptorProto.oneof_index $0 is "
 6850|      0|                       "out of range for type \"$1\".",
 6851|      0|                       proto.oneof_index(), parent->name());
 6852|      0|                 });
 6853|      5|      } else {
 6854|      5|        result->is_oneof_ = true;
 6855|      5|        result->scope_.containing_oneof =
 6856|      5|            parent->oneof_decl(proto.oneof_index());
 6857|      5|        result->in_real_oneof_ = !result->proto3_optional_;
 6858|      5|      }
 6859|      5|    }
 6860|    234|  }
 6861|       |
 6862|       |  // Copy options.
 6863|    235|  AllocateOptions(proto, result, FieldDescriptorProto::kOptionsFieldNumber,
 6864|    235|                  "google.protobuf.FieldOptions", alloc);
 6865|       |
 6866|    235|  AddSymbol(result->full_name(), parent, result->name(), proto, Symbol(result));
 6867|    235|}
_ZN6google8protobuf17DescriptorBuilder19BuildExtensionRangeERKNS0_30DescriptorProto_ExtensionRangeEPKNS0_10DescriptorEPNS5_14ExtensionRangeERNS0_8internal13FlatAllocatorE:
 6871|     14|    Descriptor::ExtensionRange* result, internal::FlatAllocator& alloc) {
 6872|     14|  result->start_ = proto.start();
 6873|     14|  result->end_ = proto.end();
 6874|     14|  result->containing_type_ = parent;
 6875|       |
 6876|     14|  if (result->start_number() <= 0) {
  ------------------
  |  Branch (6876:7): [True: 0, False: 14]
  ------------------
 6877|      0|    message_hints_[parent].RequestHintOnFieldNumbers(
 6878|      0|        proto, DescriptorPool::ErrorCollector::NUMBER, result->start_number(),
 6879|      0|        result->end_number());
 6880|      0|    AddError(parent->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER,
 6881|      0|             "Extension numbers must be positive integers.");
 6882|      0|  }
 6883|       |
 6884|       |  // Checking of the upper bound of the extension range is deferred until after
 6885|       |  // options interpreting. This allows messages with message_set_wire_format to
 6886|       |  // have extensions beyond FieldDescriptor::kMaxNumber, since the extension
 6887|       |  // numbers are actually used as int32s in the message_set_wire_format.
 6888|       |
 6889|     14|  if (result->start_number() >= result->end_number()) {
  ------------------
  |  Branch (6889:7): [True: 0, False: 14]
  ------------------
 6890|      0|    AddError(parent->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER,
 6891|      0|             "Extension range end number must be greater than start number.");
 6892|      0|  }
 6893|       |
 6894|       |  // Copy options
 6895|     14|  AllocateOptions(proto, result,
 6896|     14|                  DescriptorProto_ExtensionRange::kOptionsFieldNumber,
 6897|     14|                  "google.protobuf.ExtensionRangeOptions", alloc);
 6898|     14|}
_ZN6google8protobuf17DescriptorBuilder18BuildReservedRangeERKNS0_29DescriptorProto_ReservedRangeEPKNS0_10DescriptorEPNS5_13ReservedRangeERNS0_8internal13FlatAllocatorE:
 6902|     14|    Descriptor::ReservedRange* result, internal::FlatAllocator&) {
 6903|     14|  result->start = proto.start();
 6904|     14|  result->end = proto.end();
 6905|     14|  if (result->start <= 0) {
  ------------------
  |  Branch (6905:7): [True: 0, False: 14]
  ------------------
 6906|      0|    message_hints_[parent].RequestHintOnFieldNumbers(
 6907|      0|        proto, DescriptorPool::ErrorCollector::NUMBER, result->start,
 6908|      0|        result->end);
 6909|      0|    AddError(parent->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER,
 6910|      0|             "Reserved numbers must be positive integers.");
 6911|      0|  }
 6912|     14|  if (result->start >= result->end) {
  ------------------
  |  Branch (6912:7): [True: 0, False: 14]
  ------------------
 6913|      0|    AddError(parent->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER,
 6914|      0|             "Reserved range end number must be greater than start number.");
 6915|      0|  }
 6916|     14|}
_ZN6google8protobuf17DescriptorBuilder18BuildReservedRangeERKNS0_37EnumDescriptorProto_EnumReservedRangeEPKNS0_14EnumDescriptorEPNS5_13ReservedRangeERNS0_8internal13FlatAllocatorE:
 6921|      1|    internal::FlatAllocator&) {
 6922|      1|  result->start = proto.start();
 6923|      1|  result->end = proto.end();
 6924|       |
 6925|      1|  if (result->start > result->end) {
  ------------------
  |  Branch (6925:7): [True: 0, False: 1]
  ------------------
 6926|      0|    AddError(parent->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER,
 6927|      0|             "Reserved range end number must be greater than start number.");
 6928|      0|  }
 6929|      1|}
_ZN6google8protobuf17DescriptorBuilder10BuildOneofERKNS0_20OneofDescriptorProtoEPNS0_10DescriptorEPNS0_15OneofDescriptorERNS0_8internal13FlatAllocatorE:
 6933|      2|                                   internal::FlatAllocator& alloc) {
 6934|      2|  result->all_names_ =
 6935|      2|      AllocateNameStrings(parent->full_name(), proto.name(), alloc);
 6936|      2|  ValidateSymbolName(proto.name(), result->full_name(), proto);
 6937|       |
 6938|      2|  result->containing_type_ = parent;
 6939|       |
 6940|       |  // We need to fill these in later.
 6941|      2|  result->field_count_ = 0;
 6942|      2|  result->fields_ = nullptr;
 6943|       |
 6944|       |  // Copy options.
 6945|      2|  AllocateOptions(proto, result, OneofDescriptorProto::kOptionsFieldNumber,
 6946|      2|                  "google.protobuf.OneofOptions", alloc);
 6947|       |
 6948|      2|  AddSymbol(result->full_name(), parent, result->name(), proto, Symbol(result));
 6949|      2|}
_ZN6google8protobuf17DescriptorBuilder9BuildEnumERKNS0_19EnumDescriptorProtoEPKNS0_10DescriptorEPNS0_14EnumDescriptorERNS0_8internal13FlatAllocatorE:
 7021|     24|                                  internal::FlatAllocator& alloc) {
 7022|     24|  const absl::string_view scope =
 7023|     24|      (parent == nullptr) ? file_->package() : parent->full_name();
  ------------------
  |  Branch (7023:7): [True: 7, False: 17]
  ------------------
 7024|       |
 7025|     24|  result->all_names_ = AllocateNameStrings(scope, proto.name(), alloc);
 7026|     24|  ValidateSymbolName(proto.name(), result->full_name(), proto);
 7027|     24|  result->file_ = file_;
 7028|     24|  result->containing_type_ = parent;
 7029|     24|  result->is_placeholder_ = false;
 7030|     24|  result->is_unqualified_placeholder_ = false;
 7031|       |
 7032|     24|  if (proto.value_size() == 0) {
  ------------------
  |  Branch (7032:7): [True: 0, False: 24]
  ------------------
 7033|       |    // We cannot allow enums with no values because this would mean there
 7034|       |    // would be no valid default value for fields of this type.
 7035|      0|    AddError(result->full_name(), proto, DescriptorPool::ErrorCollector::NAME,
 7036|      0|             "Enums must contain at least one value.");
 7037|      0|  }
 7038|       |
 7039|       |  // Calculate the continuous sequence of the labels.
 7040|       |  // These can be fast-path'd during lookup and don't need to be added to the
 7041|       |  // tables.
 7042|       |  // We use uint16_t to save space for sequential_value_limit_, so stop before
 7043|       |  // overflowing it. Worst case, we are not taking full advantage on huge
 7044|       |  // enums, but it is unlikely.
 7045|     24|  for (int i = 0;
 7046|    119|       i < std::numeric_limits<uint16_t>::max() && i < proto.value_size() &&
  ------------------
  |  Branch (7046:8): [True: 119, False: 0]
  |  Branch (7046:52): [True: 99, False: 20]
  ------------------
 7047|       |       // We do the math in int64_t to avoid overflows.
 7048|     99|       proto.value(i).number() ==
  ------------------
  |  Branch (7048:8): [True: 95, False: 4]
  ------------------
 7049|     99|           static_cast<int64_t>(i) + proto.value(0).number();
 7050|     95|       ++i) {
 7051|     95|    result->sequential_value_limit_ = i;
 7052|     95|  }
 7053|       |
 7054|     24|  BUILD_ARRAY(proto, result, value, BuildEnumValue, result);
  ------------------
  |  | 5627|     24|  OUTPUT->NAME##_count_ = INPUT.NAME##_size();                         \
  |  | 5628|     24|  OUTPUT->NAME##s_ = alloc.AllocateArray<                              \
  |  | 5629|     24|      typename std::remove_pointer<decltype(OUTPUT->NAME##s_)>::type>( \
  |  | 5630|     24|      INPUT.NAME##_size());                                            \
  |  | 5631|    214|  for (int i = 0; i < INPUT.NAME##_size(); i++) {                      \
  |  |  ------------------
  |  |  |  Branch (5631:19): [True: 190, False: 24]
  |  |  ------------------
  |  | 5632|    190|    METHOD(INPUT.NAME(i), PARENT, OUTPUT->NAME##s_ + i, alloc);        \
  |  | 5633|    190|  }
  ------------------
 7055|     24|  BUILD_ARRAY(proto, result, reserved_range, BuildReservedRange, result);
  ------------------
  |  | 5627|     24|  OUTPUT->NAME##_count_ = INPUT.NAME##_size();                         \
  |  | 5628|     24|  OUTPUT->NAME##s_ = alloc.AllocateArray<                              \
  |  | 5629|     24|      typename std::remove_pointer<decltype(OUTPUT->NAME##s_)>::type>( \
  |  | 5630|     24|      INPUT.NAME##_size());                                            \
  |  | 5631|     25|  for (int i = 0; i < INPUT.NAME##_size(); i++) {                      \
  |  |  ------------------
  |  |  |  Branch (5631:19): [True: 1, False: 24]
  |  |  ------------------
  |  | 5632|      1|    METHOD(INPUT.NAME(i), PARENT, OUTPUT->NAME##s_ + i, alloc);        \
  |  | 5633|      1|  }
  ------------------
 7056|       |
 7057|       |  // Copy reserved names.
 7058|     24|  int reserved_name_count = proto.reserved_name_size();
 7059|     24|  result->reserved_name_count_ = reserved_name_count;
 7060|     24|  result->reserved_names_ =
 7061|     24|      alloc.AllocateArray<const std::string*>(reserved_name_count);
 7062|     24|  for (int i = 0; i < reserved_name_count; ++i) {
  ------------------
  |  Branch (7062:19): [True: 0, False: 24]
  ------------------
 7063|      0|    result->reserved_names_[i] = alloc.AllocateStrings(proto.reserved_name(i));
 7064|      0|  }
 7065|       |
 7066|       |  // Copy options.
 7067|     24|  AllocateOptions(proto, result, EnumDescriptorProto::kOptionsFieldNumber,
 7068|     24|                  "google.protobuf.EnumOptions", alloc);
 7069|       |
 7070|     24|  AddSymbol(result->full_name(), parent, result->name(), proto, Symbol(result));
 7071|       |
 7072|     25|  for (int i = 0; i < proto.reserved_range_size(); i++) {
  ------------------
  |  Branch (7072:19): [True: 1, False: 24]
  ------------------
 7073|      1|    const EnumDescriptorProto_EnumReservedRange& range1 =
 7074|      1|        proto.reserved_range(i);
 7075|      1|    for (int j = i + 1; j < proto.reserved_range_size(); j++) {
  ------------------
  |  Branch (7075:25): [True: 0, False: 1]
  ------------------
 7076|      0|      const EnumDescriptorProto_EnumReservedRange& range2 =
 7077|      0|          proto.reserved_range(j);
 7078|      0|      if (range1.end() >= range2.start() && range2.end() >= range1.start()) {
  ------------------
  |  Branch (7078:11): [True: 0, False: 0]
  |  Branch (7078:45): [True: 0, False: 0]
  ------------------
 7079|      0|        AddError(result->full_name(), proto.reserved_range(i),
 7080|      0|                 DescriptorPool::ErrorCollector::NUMBER, [&] {
 7081|      0|                   return absl::Substitute(
 7082|      0|                       "Reserved range $0 to $1 overlaps with "
 7083|      0|                       "already-defined range $2 to $3.",
 7084|      0|                       range2.start(), range2.end(), range1.start(),
 7085|      0|                       range1.end());
 7086|      0|                 });
 7087|      0|      }
 7088|      0|    }
 7089|      1|  }
 7090|       |
 7091|     24|  absl::flat_hash_set<absl::string_view> reserved_name_set;
 7092|     24|  for (const std::string& name : proto.reserved_name()) {
  ------------------
  |  Branch (7092:32): [True: 0, False: 24]
  ------------------
 7093|      0|    if (!reserved_name_set.insert(name).second) {
  ------------------
  |  Branch (7093:9): [True: 0, False: 0]
  ------------------
 7094|      0|      AddError(name, proto, DescriptorPool::ErrorCollector::NAME, [&] {
 7095|      0|        return absl::Substitute("Enum value \"$0\" is reserved multiple times.",
 7096|      0|                                name);
 7097|      0|      });
 7098|      0|    }
 7099|      0|  }
 7100|       |
 7101|    214|  for (int i = 0; i < result->value_count(); i++) {
  ------------------
  |  Branch (7101:19): [True: 190, False: 24]
  ------------------
 7102|    190|    const EnumValueDescriptor* value = result->value(i);
 7103|    193|    for (int j = 0; j < result->reserved_range_count(); j++) {
  ------------------
  |  Branch (7103:21): [True: 3, False: 190]
  ------------------
 7104|      3|      const EnumDescriptor::ReservedRange* range = result->reserved_range(j);
 7105|      3|      if (range->start <= value->number() && value->number() <= range->end) {
  ------------------
  |  Branch (7105:11): [True: 2, False: 1]
  |  Branch (7105:46): [True: 0, False: 2]
  ------------------
 7106|      0|        AddError(value->full_name(), proto.reserved_range(j),
 7107|      0|                 DescriptorPool::ErrorCollector::NUMBER, [&] {
 7108|      0|                   return absl::Substitute(
 7109|      0|                       "Enum value \"$0\" uses reserved number $1.",
 7110|      0|                       value->name(), value->number());
 7111|      0|                 });
 7112|      0|      }
 7113|      3|    }
 7114|    190|    if (reserved_name_set.contains(value->name())) {
  ------------------
  |  Branch (7114:9): [True: 0, False: 190]
  ------------------
 7115|      0|      AddError(value->full_name(), proto.value(i),
 7116|      0|               DescriptorPool::ErrorCollector::NAME, [&] {
 7117|      0|                 return absl::Substitute("Enum value \"$0\" is reserved.",
 7118|      0|                                         value->name());
 7119|      0|               });
 7120|      0|    }
 7121|    190|  }
 7122|     24|}
_ZN6google8protobuf17DescriptorBuilder14BuildEnumValueERKNS0_24EnumValueDescriptorProtoEPKNS0_14EnumDescriptorEPNS0_19EnumValueDescriptorERNS0_8internal13FlatAllocatorE:
 7127|    190|                                       internal::FlatAllocator& alloc) {
 7128|       |  // Note:  full_name for enum values is a sibling to the parent's name, not a
 7129|       |  //   child of it.
 7130|    190|  std::string full_name;
 7131|    190|  size_t scope_len = parent->full_name().size() - parent->name().size();
 7132|    190|  full_name.reserve(scope_len + proto.name().size());
 7133|    190|  full_name.append(parent->full_name().data(), scope_len);
 7134|    190|  full_name.append(proto.name());
 7135|       |
 7136|    190|  result->all_names_ =
 7137|    190|      alloc.AllocateStrings(proto.name(), std::move(full_name));
 7138|    190|  result->number_ = proto.number();
 7139|    190|  result->type_ = parent;
 7140|       |
 7141|    190|  ValidateSymbolName(proto.name(), result->full_name(), proto);
 7142|       |
 7143|       |  // Copy options.
 7144|    190|  AllocateOptions(proto, result, EnumValueDescriptorProto::kOptionsFieldNumber,
 7145|    190|                  "google.protobuf.EnumValueOptions", alloc);
 7146|       |
 7147|       |  // Again, enum values are weird because we makes them appear as siblings
 7148|       |  // of the enum type instead of children of it.  So, we use
 7149|       |  // parent->containing_type() as the value's parent.
 7150|    190|  bool added_to_outer_scope =
 7151|    190|      AddSymbol(result->full_name(), parent->containing_type(), result->name(),
 7152|    190|                proto, Symbol::EnumValue(result, 0));
 7153|       |
 7154|       |  // However, we also want to be able to search for values within a single
 7155|       |  // enum type, so we add it as a child of the enum type itself, too.
 7156|       |  // Note:  This could fail, but if it does, the error has already been
 7157|       |  //   reported by the above AddSymbol() call, so we ignore the return code.
 7158|    190|  bool added_to_inner_scope = file_tables_->AddAliasUnderParent(
 7159|    190|      parent, result->name(), Symbol::EnumValue(result, 1));
 7160|       |
 7161|    190|  if (added_to_inner_scope && !added_to_outer_scope) {
  ------------------
  |  Branch (7161:7): [True: 190, False: 0]
  |  Branch (7161:31): [True: 0, False: 190]
  ------------------
 7162|       |    // This value did not conflict with any values defined in the same enum,
 7163|       |    // but it did conflict with some other symbol defined in the enum type's
 7164|       |    // scope.  Let's print an additional error to explain this.
 7165|      0|    std::string outer_scope;
 7166|      0|    if (parent->containing_type() == nullptr) {
  ------------------
  |  Branch (7166:9): [True: 0, False: 0]
  ------------------
 7167|      0|      outer_scope = file_->package();
 7168|      0|    } else {
 7169|      0|      outer_scope = parent->containing_type()->full_name();
 7170|      0|    }
 7171|       |
 7172|      0|    if (outer_scope.empty()) {
  ------------------
  |  Branch (7172:9): [True: 0, False: 0]
  ------------------
 7173|      0|      outer_scope = "the global scope";
 7174|      0|    } else {
 7175|      0|      outer_scope = absl::StrCat("\"", outer_scope, "\"");
 7176|      0|    }
 7177|       |
 7178|      0|    AddError(
 7179|      0|        result->full_name(), proto, DescriptorPool::ErrorCollector::NAME, [&] {
 7180|      0|          return absl::StrCat(
 7181|      0|              "Note that enum values use C++ scoping rules, meaning that "
 7182|      0|              "enum values are siblings of their type, not children of it.  "
 7183|      0|              "Therefore, \"",
 7184|      0|              result->name(), "\" must be unique within ", outer_scope,
 7185|      0|              ", not just within \"", parent->name(), "\".");
 7186|      0|        });
 7187|      0|  }
 7188|       |
 7189|       |  // An enum is allowed to define two numbers that refer to the same value.
 7190|       |  // FindValueByNumber() should return the first such value, so we simply
 7191|       |  // ignore AddEnumValueByNumber()'s return code.
 7192|    190|  file_tables_->AddEnumValueByNumber(result);
 7193|    190|}
_ZN6google8protobuf17DescriptorBuilder13CrossLinkFileEPNS0_14FileDescriptorERKNS0_19FileDescriptorProtoE:
 7243|      4|                                      const FileDescriptorProto& proto) {
 7244|     41|  for (int i = 0; i < file->message_type_count(); i++) {
  ------------------
  |  Branch (7244:19): [True: 37, False: 4]
  ------------------
 7245|     37|    CrossLinkMessage(&file->message_types_[i], proto.message_type(i));
 7246|     37|  }
 7247|       |
 7248|      5|  for (int i = 0; i < file->extension_count(); i++) {
  ------------------
  |  Branch (7248:19): [True: 1, False: 4]
  ------------------
 7249|      1|    CrossLinkField(&file->extensions_[i], proto.extension(i));
 7250|      1|  }
 7251|       |
 7252|      4|  for (int i = 0; i < file->service_count(); i++) {
  ------------------
  |  Branch (7252:19): [True: 0, False: 4]
  ------------------
 7253|      0|    CrossLinkService(&file->services_[i], proto.service(i));
 7254|      0|  }
 7255|      4|}
_ZN6google8protobuf17DescriptorBuilder16CrossLinkMessageEPNS0_10DescriptorERKNS0_15DescriptorProtoE:
 7258|     47|                                         const DescriptorProto& proto) {
 7259|     57|  for (int i = 0; i < message->nested_type_count(); i++) {
  ------------------
  |  Branch (7259:19): [True: 10, False: 47]
  ------------------
 7260|     10|    CrossLinkMessage(&message->nested_types_[i], proto.nested_type(i));
 7261|     10|  }
 7262|       |
 7263|    281|  for (int i = 0; i < message->field_count(); i++) {
  ------------------
  |  Branch (7263:19): [True: 234, False: 47]
  ------------------
 7264|    234|    CrossLinkField(&message->fields_[i], proto.field(i));
 7265|    234|  }
 7266|       |
 7267|     47|  for (int i = 0; i < message->extension_count(); i++) {
  ------------------
  |  Branch (7267:19): [True: 0, False: 47]
  ------------------
 7268|      0|    CrossLinkField(&message->extensions_[i], proto.extension(i));
 7269|      0|  }
 7270|       |
 7271|       |  // Set up field array for each oneof.
 7272|       |
 7273|       |  // First count the number of fields per oneof.
 7274|    281|  for (int i = 0; i < message->field_count(); i++) {
  ------------------
  |  Branch (7274:19): [True: 234, False: 47]
  ------------------
 7275|    234|    const OneofDescriptor* oneof_decl = message->field(i)->containing_oneof();
 7276|    234|    if (oneof_decl != nullptr) {
  ------------------
  |  Branch (7276:9): [True: 5, False: 229]
  ------------------
 7277|       |      // Make sure fields belonging to the same oneof are defined consecutively.
 7278|       |      // This enables optimizations in codegens and reflection libraries to
 7279|       |      // skip fields in the oneof group, as only one of the field can be set.
 7280|       |      // Note that field_count() returns how many fields in this oneof we have
 7281|       |      // seen so far. field_count() > 0 guarantees that i > 0, so field(i-1) is
 7282|       |      // safe.
 7283|      5|      if (oneof_decl->field_count() > 0 &&
  ------------------
  |  Branch (7283:11): [True: 3, False: 2]
  ------------------
 7284|      3|          message->field(i - 1)->containing_oneof() != oneof_decl) {
  ------------------
  |  Branch (7284:11): [True: 0, False: 3]
  ------------------
 7285|      0|        AddError(
 7286|      0|            absl::StrCat(message->full_name(), ".",
 7287|      0|                         message->field(i - 1)->name()),
 7288|      0|            proto.field(i - 1), DescriptorPool::ErrorCollector::TYPE, [&] {
 7289|      0|              return absl::Substitute(
 7290|      0|                  "Fields in the same oneof must be defined consecutively. "
 7291|      0|                  "\"$0\" cannot be defined before the completion of the "
 7292|      0|                  "\"$1\" oneof definition.",
 7293|      0|                  message->field(i - 1)->name(), oneof_decl->name());
 7294|      0|            });
 7295|      0|      }
 7296|       |      // Must go through oneof_decls_ array to get a non-const version of the
 7297|       |      // OneofDescriptor.
 7298|      5|      auto& out_oneof_decl = message->oneof_decls_[oneof_decl->index()];
 7299|      5|      if (out_oneof_decl.field_count_ == 0) {
  ------------------
  |  Branch (7299:11): [True: 2, False: 3]
  ------------------
 7300|      2|        out_oneof_decl.fields_ = message->field(i);
 7301|      2|      }
 7302|       |
 7303|      5|      if (!had_errors_) {
  ------------------
  |  Branch (7303:11): [True: 5, False: 0]
  ------------------
 7304|       |        // Verify that they are contiguous.
 7305|       |        // This is assumed by OneofDescriptor::field(i).
 7306|       |        // But only if there are no errors.
 7307|      5|        ABSL_CHECK_EQ(out_oneof_decl.fields_ + out_oneof_decl.field_count_,
  ------------------
  |  |   50|      5|  ABSL_LOG_INTERNAL_CHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   48|      5|  ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|      5|  while (                                                                      \
  |  |  |  |  |  |   62|      5|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      5|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|      5|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|      5|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|      5|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|      5|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|      5|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7308|      5|                      message->field(i));
 7309|      5|      }
 7310|      5|      ++out_oneof_decl.field_count_;
 7311|      5|    }
 7312|    234|  }
 7313|       |
 7314|       |  // Then verify the sizes.
 7315|     49|  for (int i = 0; i < message->oneof_decl_count(); i++) {
  ------------------
  |  Branch (7315:19): [True: 2, False: 47]
  ------------------
 7316|      2|    OneofDescriptor* oneof_decl = &message->oneof_decls_[i];
 7317|       |
 7318|      2|    if (oneof_decl->field_count() == 0) {
  ------------------
  |  Branch (7318:9): [True: 0, False: 2]
  ------------------
 7319|      0|      AddError(absl::StrCat(message->full_name(), ".", oneof_decl->name()),
 7320|      0|               proto.oneof_decl(i), DescriptorPool::ErrorCollector::NAME,
 7321|      0|               "Oneof must have at least one field.");
 7322|      0|    }
 7323|      2|  }
 7324|       |
 7325|    281|  for (int i = 0; i < message->field_count(); i++) {
  ------------------
  |  Branch (7325:19): [True: 234, False: 47]
  ------------------
 7326|    234|    const FieldDescriptor* field = message->field(i);
 7327|    234|    if (field->proto3_optional_) {
  ------------------
  |  Branch (7327:9): [True: 0, False: 234]
  ------------------
 7328|      0|      if (!field->containing_oneof() ||
  ------------------
  |  Branch (7328:11): [True: 0, False: 0]
  ------------------
 7329|      0|          !field->containing_oneof()->is_synthetic()) {
  ------------------
  |  Branch (7329:11): [True: 0, False: 0]
  ------------------
 7330|      0|        AddError(message->full_name(), proto.field(i),
 7331|      0|                 DescriptorPool::ErrorCollector::OTHER,
 7332|      0|                 "Fields with proto3_optional set must be "
 7333|      0|                 "a member of a one-field oneof");
 7334|      0|      }
 7335|      0|    }
 7336|    234|  }
 7337|       |
 7338|       |  // Synthetic oneofs must be last.
 7339|     47|  int first_synthetic = -1;
 7340|     49|  for (int i = 0; i < message->oneof_decl_count(); i++) {
  ------------------
  |  Branch (7340:19): [True: 2, False: 47]
  ------------------
 7341|      2|    if (message->oneof_decl(i)->is_synthetic()) {
  ------------------
  |  Branch (7341:9): [True: 0, False: 2]
  ------------------
 7342|      0|      if (first_synthetic == -1) {
  ------------------
  |  Branch (7342:11): [True: 0, False: 0]
  ------------------
 7343|      0|        first_synthetic = i;
 7344|      0|      }
 7345|      2|    } else {
 7346|      2|      if (first_synthetic != -1) {
  ------------------
  |  Branch (7346:11): [True: 0, False: 2]
  ------------------
 7347|      0|        AddError(message->full_name(), proto.oneof_decl(i),
 7348|      0|                 DescriptorPool::ErrorCollector::OTHER,
 7349|      0|                 "Synthetic oneofs must be after all other oneofs");
 7350|      0|      }
 7351|      2|    }
 7352|      2|  }
 7353|       |
 7354|     47|  if (first_synthetic == -1) {
  ------------------
  |  Branch (7354:7): [True: 47, False: 0]
  ------------------
 7355|     47|    message->real_oneof_decl_count_ = message->oneof_decl_count_;
 7356|     47|  } else {
 7357|      0|    message->real_oneof_decl_count_ = first_synthetic;
 7358|      0|  }
 7359|     47|}
_ZN6google8protobuf17DescriptorBuilder14CrossLinkFieldEPNS0_15FieldDescriptorERKNS0_20FieldDescriptorProtoE:
 7425|    235|                                       const FieldDescriptorProto& proto) {
 7426|    235|  if (proto.has_extendee()) {
  ------------------
  |  Branch (7426:7): [True: 1, False: 234]
  ------------------
 7427|      1|    Symbol extendee =
 7428|      1|        LookupSymbol(proto.extendee(), field->full_name(),
 7429|      1|                     DescriptorPool::PLACEHOLDER_EXTENDABLE_MESSAGE);
 7430|      1|    if (extendee.IsNull()) {
  ------------------
  |  Branch (7430:9): [True: 0, False: 1]
  ------------------
 7431|      0|      AddNotDefinedError(field->full_name(), proto,
 7432|      0|                         DescriptorPool::ErrorCollector::EXTENDEE,
 7433|      0|                         proto.extendee());
 7434|      0|      return;
 7435|      1|    } else if (extendee.type() != Symbol::MESSAGE) {
  ------------------
  |  Branch (7435:16): [True: 0, False: 1]
  ------------------
 7436|      0|      AddError(field->full_name(), proto,
 7437|      0|               DescriptorPool::ErrorCollector::EXTENDEE, [&] {
 7438|      0|                 return absl::StrCat("\"", proto.extendee(),
 7439|      0|                                     "\" is not a message type.");
 7440|      0|               });
 7441|      0|      return;
 7442|      0|    }
 7443|      1|    field->containing_type_ = extendee.descriptor();
 7444|       |
 7445|      1|    const Descriptor::ExtensionRange* extension_range =
 7446|      1|        field->containing_type()->FindExtensionRangeContainingNumber(
 7447|      1|            field->number());
 7448|       |
 7449|      1|    if (extension_range == nullptr) {
  ------------------
  |  Branch (7449:9): [True: 0, False: 1]
  ------------------
 7450|      0|      AddError(field->full_name(), proto,
 7451|      0|               DescriptorPool::ErrorCollector::NUMBER, [&] {
 7452|      0|                 return absl::Substitute(
 7453|      0|                     "\"$0\" does not declare $1 as an "
 7454|      0|                     "extension number.",
 7455|      0|                     field->containing_type()->full_name(), field->number());
 7456|      0|               });
 7457|      0|    }
 7458|      1|  }
 7459|       |
 7460|    235|  if (field->containing_oneof() != nullptr) {
  ------------------
  |  Branch (7460:7): [True: 5, False: 230]
  ------------------
 7461|      5|    if (field->label() != FieldDescriptor::LABEL_OPTIONAL) {
  ------------------
  |  Branch (7461:9): [True: 0, False: 5]
  ------------------
 7462|       |      // Note that this error will never happen when parsing .proto files.
 7463|       |      // It can only happen if you manually construct a FileDescriptorProto
 7464|       |      // that is incorrect.
 7465|      0|      AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::NAME,
 7466|      0|               "Fields of oneofs must themselves have label LABEL_OPTIONAL.");
 7467|      0|    }
 7468|      5|  }
 7469|       |
 7470|    235|  if (proto.has_type_name()) {
  ------------------
  |  Branch (7470:7): [True: 98, False: 137]
  ------------------
 7471|       |    // Assume we are expecting a message type unless the proto contains some
 7472|       |    // evidence that it expects an enum type.  This only makes a difference if
 7473|       |    // we end up creating a placeholder.
 7474|     98|    bool expecting_enum = (proto.type() == FieldDescriptorProto::TYPE_ENUM) ||
  ------------------
  |  Branch (7474:27): [True: 32, False: 66]
  ------------------
 7475|     66|                          proto.has_default_value();
  ------------------
  |  Branch (7475:27): [True: 0, False: 66]
  ------------------
 7476|       |
 7477|       |    // In case of weak fields we force building the dependency. We need to know
 7478|       |    // if the type exist or not. If it doesn't exist we substitute Empty which
 7479|       |    // should only be done if the type can't be found in the generated pool.
 7480|       |    // TODO Ideally we should query the database directly to check
 7481|       |    // if weak fields exist or not so that we don't need to force building
 7482|       |    // weak dependencies. However the name lookup rules for symbols are
 7483|       |    // somewhat complicated, so I defer it too another CL.
 7484|     98|    bool is_weak = !pool_->enforce_weak_ && proto.options().weak();
  ------------------
  |  Branch (7484:20): [True: 98, False: 0]
  |  Branch (7484:45): [True: 0, False: 98]
  ------------------
 7485|     98|    bool is_lazy = pool_->lazily_build_dependencies_ && !is_weak;
  ------------------
  |  Branch (7485:20): [True: 98, False: 0]
  |  Branch (7485:57): [True: 98, False: 0]
  ------------------
 7486|       |
 7487|     98|    Symbol type =
 7488|     98|        LookupSymbol(proto.type_name(), field->full_name(),
 7489|     98|                     expecting_enum ? DescriptorPool::PLACEHOLDER_ENUM
  ------------------
  |  Branch (7489:22): [True: 32, False: 66]
  ------------------
 7490|     98|                                    : DescriptorPool::PLACEHOLDER_MESSAGE,
 7491|     98|                     LOOKUP_TYPES, !is_lazy);
 7492|       |
 7493|     98|    if (type.IsNull()) {
  ------------------
  |  Branch (7493:9): [True: 0, False: 98]
  ------------------
 7494|      0|      if (is_lazy) {
  ------------------
  |  Branch (7494:11): [True: 0, False: 0]
  ------------------
 7495|      0|        ABSL_CHECK(field->type_ == FieldDescriptor::TYPE_MESSAGE ||
  ------------------
  |  |   41|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7496|      0|                   field->type_ == FieldDescriptor::TYPE_GROUP ||
 7497|      0|                   field->type_ == FieldDescriptor::TYPE_ENUM)
 7498|      0|            << proto;
 7499|       |        // Save the symbol names for later for lookup, and allocate the once
 7500|       |        // object needed for the accessors.
 7501|      0|        const std::string& name = proto.type_name();
 7502|       |
 7503|      0|        int name_sizes = static_cast<int>(name.size() + 1 +
 7504|      0|                                          proto.default_value().size() + 1);
 7505|       |
 7506|      0|        field->type_once_ = ::new (tables_->AllocateBytes(
 7507|      0|            static_cast<int>(sizeof(absl::once_flag)) + name_sizes))
 7508|      0|            absl::once_flag{};
 7509|      0|        char* names = reinterpret_cast<char*>(field->type_once_ + 1);
 7510|       |
 7511|      0|        memcpy(names, name.c_str(), name.size() + 1);
 7512|      0|        memcpy(names + name.size() + 1, proto.default_value().c_str(),
 7513|      0|               proto.default_value().size() + 1);
 7514|       |
 7515|       |        // AddFieldByNumber and AddExtension are done later in this function,
 7516|       |        // and can/must be done if the field type was not found. The related
 7517|       |        // error checking is not necessary when in lazily_build_dependencies_
 7518|       |        // mode, and can't be done without building the type's descriptor,
 7519|       |        // which we don't want to do.
 7520|      0|        file_tables_->AddFieldByNumber(field);
 7521|      0|        if (field->is_extension()) {
  ------------------
  |  Branch (7521:13): [True: 0, False: 0]
  ------------------
 7522|      0|          tables_->AddExtension(field);
 7523|      0|        }
 7524|      0|        return;
 7525|      0|      } else {
 7526|       |        // If the type is a weak type, we change the type to a google.protobuf.Empty
 7527|       |        // field.
 7528|      0|        if (is_weak) {
  ------------------
  |  Branch (7528:13): [True: 0, False: 0]
  ------------------
 7529|      0|          type = FindSymbol(kNonLinkedWeakMessageReplacementName);
 7530|      0|        }
 7531|      0|        if (type.IsNull()) {
  ------------------
  |  Branch (7531:13): [True: 0, False: 0]
  ------------------
 7532|      0|          AddNotDefinedError(field->full_name(), proto,
 7533|      0|                             DescriptorPool::ErrorCollector::TYPE,
 7534|      0|                             proto.type_name());
 7535|      0|          return;
 7536|      0|        }
 7537|      0|      }
 7538|      0|    }
 7539|       |
 7540|     98|    if (!proto.has_type()) {
  ------------------
  |  Branch (7540:9): [True: 0, False: 98]
  ------------------
 7541|       |      // Choose field type based on symbol.
 7542|      0|      if (type.type() == Symbol::MESSAGE) {
  ------------------
  |  Branch (7542:11): [True: 0, False: 0]
  ------------------
 7543|      0|        field->type_ = FieldDescriptor::TYPE_MESSAGE;
 7544|      0|      } else if (type.type() == Symbol::ENUM) {
  ------------------
  |  Branch (7544:18): [True: 0, False: 0]
  ------------------
 7545|      0|        field->type_ = FieldDescriptor::TYPE_ENUM;
 7546|      0|      } else {
 7547|      0|        AddError(field->full_name(), proto,
 7548|      0|                 DescriptorPool::ErrorCollector::TYPE, [&] {
 7549|      0|                   return absl::StrCat("\"", proto.type_name(),
 7550|      0|                                       "\" is not a type.");
 7551|      0|                 });
 7552|      0|        return;
 7553|      0|      }
 7554|      0|    }
 7555|       |
 7556|     98|    if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
  ------------------
  |  Branch (7556:9): [True: 66, False: 32]
  ------------------
 7557|     66|      field->type_descriptor_.message_type = type.descriptor();
 7558|     66|      if (field->type_descriptor_.message_type == nullptr) {
  ------------------
  |  Branch (7558:11): [True: 0, False: 66]
  ------------------
 7559|      0|        AddError(field->full_name(), proto,
 7560|      0|                 DescriptorPool::ErrorCollector::TYPE, [&] {
 7561|      0|                   return absl::StrCat("\"", proto.type_name(),
 7562|      0|                                       "\" is not a message type.");
 7563|      0|                 });
 7564|      0|        return;
 7565|      0|      }
 7566|       |
 7567|     66|      if (field->has_default_value()) {
  ------------------
  |  Branch (7567:11): [True: 0, False: 66]
  ------------------
 7568|      0|        AddError(field->full_name(), proto,
 7569|      0|                 DescriptorPool::ErrorCollector::DEFAULT_VALUE,
 7570|      0|                 "Messages can't have default values.");
 7571|      0|      }
 7572|     66|    } else if (field->cpp_type() == FieldDescriptor::CPPTYPE_ENUM) {
  ------------------
  |  Branch (7572:16): [True: 32, False: 0]
  ------------------
 7573|     32|      field->type_descriptor_.enum_type = type.enum_descriptor();
 7574|     32|      if (field->type_descriptor_.enum_type == nullptr) {
  ------------------
  |  Branch (7574:11): [True: 0, False: 32]
  ------------------
 7575|      0|        AddError(field->full_name(), proto,
 7576|      0|                 DescriptorPool::ErrorCollector::TYPE, [&] {
 7577|      0|                   return absl::StrCat("\"", proto.type_name(),
 7578|      0|                                       "\" is not an enum type.");
 7579|      0|                 });
 7580|      0|        return;
 7581|      0|      }
 7582|       |
 7583|     32|      if (field->enum_type()->is_placeholder_) {
  ------------------
  |  Branch (7583:11): [True: 0, False: 32]
  ------------------
 7584|       |        // We can't look up default values for placeholder types.  We'll have
 7585|       |        // to just drop them.
 7586|      0|        field->has_default_value_ = false;
 7587|      0|      }
 7588|       |
 7589|     32|      if (field->has_default_value()) {
  ------------------
  |  Branch (7589:11): [True: 5, False: 27]
  ------------------
 7590|       |        // Ensure that the default value is an identifier. Parser cannot always
 7591|       |        // verify this because it does not have complete type information.
 7592|       |        // N.B. that this check yields better error messages but is not
 7593|       |        // necessary for correctness (an enum symbol must be a valid identifier
 7594|       |        // anyway), only for better errors.
 7595|      5|        if (!io::Tokenizer::IsIdentifier(proto.default_value())) {
  ------------------
  |  Branch (7595:13): [True: 0, False: 5]
  ------------------
 7596|      0|          AddError(field->full_name(), proto,
 7597|      0|                   DescriptorPool::ErrorCollector::DEFAULT_VALUE,
 7598|      0|                   "Default value for an enum field must be an identifier.");
 7599|      5|        } else {
 7600|       |          // We can't just use field->enum_type()->FindValueByName() here
 7601|       |          // because that locks the pool's mutex, which we have already locked
 7602|       |          // at this point.
 7603|      5|          const EnumValueDescriptor* default_value =
 7604|      5|              LookupSymbolNoPlaceholder(proto.default_value(),
 7605|      5|                                        field->enum_type()->full_name())
 7606|      5|                  .enum_value_descriptor();
 7607|       |
 7608|      5|          if (default_value != nullptr &&
  ------------------
  |  Branch (7608:15): [True: 5, False: 0]
  ------------------
 7609|      5|              default_value->type() == field->enum_type()) {
  ------------------
  |  Branch (7609:15): [True: 5, False: 0]
  ------------------
 7610|      5|            field->default_value_enum_ = default_value;
 7611|      5|          } else {
 7612|      0|            AddError(field->full_name(), proto,
 7613|      0|                     DescriptorPool::ErrorCollector::DEFAULT_VALUE, [&] {
 7614|      0|                       return absl::StrCat("Enum type \"",
 7615|      0|                                           field->enum_type()->full_name(),
 7616|      0|                                           "\" has no value named \"",
 7617|      0|                                           proto.default_value(), "\".");
 7618|      0|                     });
 7619|      0|          }
 7620|      5|        }
 7621|     27|      } else if (field->enum_type()->value_count() > 0) {
  ------------------
  |  Branch (7621:18): [True: 27, False: 0]
  ------------------
 7622|       |        // All enums must have at least one value, or we would have reported
 7623|       |        // an error elsewhere.  We use the first defined value as the default
 7624|       |        // if a default is not explicitly defined.
 7625|     27|        field->default_value_enum_ = field->enum_type()->value(0);
 7626|     27|      }
 7627|     32|    } else {
 7628|      0|      AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE,
 7629|      0|               "Field with primitive type has type_name.");
 7630|      0|    }
 7631|    137|  } else {
 7632|    137|    if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE ||
  ------------------
  |  Branch (7632:9): [True: 0, False: 137]
  ------------------
 7633|    137|        field->cpp_type() == FieldDescriptor::CPPTYPE_ENUM) {
  ------------------
  |  Branch (7633:9): [True: 0, False: 137]
  ------------------
 7634|      0|      AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE,
 7635|      0|               "Field with message or enum type missing type_name.");
 7636|      0|    }
 7637|    137|  }
 7638|       |
 7639|       |  // Add the field to the fields-by-number table.
 7640|       |  // Note:  We have to do this *after* cross-linking because extensions do not
 7641|       |  // know their containing type until now. If we're in
 7642|       |  // lazily_build_dependencies_ mode, we're guaranteed there's no errors, so no
 7643|       |  // risk to calling containing_type() or other accessors that will build
 7644|       |  // dependencies.
 7645|    235|  if (!file_tables_->AddFieldByNumber(field)) {
  ------------------
  |  Branch (7645:7): [True: 0, False: 235]
  ------------------
 7646|      0|    const FieldDescriptor* conflicting_field = file_tables_->FindFieldByNumber(
 7647|      0|        field->containing_type(), field->number());
 7648|      0|    const absl::string_view containing_type_name =
 7649|      0|        field->containing_type() == nullptr
  ------------------
  |  Branch (7649:9): [True: 0, False: 0]
  ------------------
 7650|      0|            ? absl::string_view("unknown")
 7651|      0|            : field->containing_type()->full_name();
 7652|      0|    if (field->is_extension()) {
  ------------------
  |  Branch (7652:9): [True: 0, False: 0]
  ------------------
 7653|      0|      AddError(field->full_name(), proto,
 7654|      0|               DescriptorPool::ErrorCollector::NUMBER, [&] {
 7655|      0|                 return absl::Substitute(
 7656|      0|                     "Extension number $0 has already been used "
 7657|      0|                     "in \"$1\" by extension \"$2\".",
 7658|      0|                     field->number(), containing_type_name,
 7659|      0|                     conflicting_field->full_name());
 7660|      0|               });
 7661|      0|    } else {
 7662|      0|      AddError(field->full_name(), proto,
 7663|      0|               DescriptorPool::ErrorCollector::NUMBER, [&] {
 7664|      0|                 return absl::Substitute(
 7665|      0|                     "Field number $0 has already been used in "
 7666|      0|                     "\"$1\" by field \"$2\".",
 7667|      0|                     field->number(), containing_type_name,
 7668|      0|                     conflicting_field->name());
 7669|      0|               });
 7670|      0|    }
 7671|    235|  } else {
 7672|    235|    if (field->is_extension()) {
  ------------------
  |  Branch (7672:9): [True: 1, False: 234]
  ------------------
 7673|      1|      if (!tables_->AddExtension(field)) {
  ------------------
  |  Branch (7673:11): [True: 0, False: 1]
  ------------------
 7674|      0|        auto make_error = [&] {
 7675|      0|          const FieldDescriptor* conflicting_field =
 7676|      0|              tables_->FindExtension(field->containing_type(), field->number());
 7677|      0|          const absl::string_view containing_type_name =
 7678|      0|              field->containing_type() == nullptr
 7679|      0|                  ? absl::string_view("unknown")
 7680|      0|                  : field->containing_type()->full_name();
 7681|      0|          return absl::Substitute(
 7682|      0|              "Extension number $0 has already been used in \"$1\" by "
 7683|      0|              "extension "
 7684|      0|              "\"$2\" defined in $3.",
 7685|      0|              field->number(), containing_type_name,
 7686|      0|              conflicting_field->full_name(),
 7687|      0|              conflicting_field->file()->name());
 7688|      0|        };
 7689|       |        // Conflicting extension numbers should be an error. However, before
 7690|       |        // turning this into an error we need to fix all existing broken
 7691|       |        // protos first.
 7692|       |        // TODO: Change this to an error.
 7693|      0|        AddWarning(field->full_name(), proto,
 7694|      0|                   DescriptorPool::ErrorCollector::NUMBER, make_error);
 7695|      0|      }
 7696|      1|    }
 7697|    235|  }
 7698|    235|}
_ZN6google8protobuf17DescriptorBuilder17OptionInterpreterC2EPS1_:
 8612|      4|    : builder_(builder) {
 8613|      4|  ABSL_CHECK(builder_);
  ------------------
  |  |   41|      4|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|      8|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      4|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      8|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      8|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      4|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      8|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 4]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|      8|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|      8|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8614|      4|}
_ZN6google8protobuf17DescriptorBuilder17OptionInterpreterD2Ev:
 8616|      4|DescriptorBuilder::OptionInterpreter::~OptionInterpreter() = default;
_ZNK6google8protobuf15FieldDescriptor12message_typeEv:
 9676|  60.4k|const Descriptor* FieldDescriptor::message_type() const {
 9677|  60.4k|  if (type_ == TYPE_MESSAGE || type_ == TYPE_GROUP) {
  ------------------
  |  Branch (9677:7): [True: 60.4k, False: 0]
  |  Branch (9677:32): [True: 0, False: 0]
  ------------------
 9678|  60.4k|    if (type_once_) {
  ------------------
  |  Branch (9678:9): [True: 0, False: 60.4k]
  ------------------
 9679|      0|      absl::call_once(*type_once_, FieldDescriptor::TypeOnceInit, this);
 9680|      0|    }
 9681|  60.4k|    return type_descriptor_.message_type;
 9682|  60.4k|  }
 9683|      0|  return nullptr;
 9684|  60.4k|}
_ZNK6google8protobuf15FieldDescriptor9enum_typeEv:
 9686|     96|const EnumDescriptor* FieldDescriptor::enum_type() const {
 9687|     96|  if (type_ == TYPE_ENUM) {
  ------------------
  |  Branch (9687:7): [True: 96, False: 0]
  ------------------
 9688|     96|    if (type_once_) {
  ------------------
  |  Branch (9688:9): [True: 0, False: 96]
  ------------------
 9689|      0|      absl::call_once(*type_once_, FieldDescriptor::TypeOnceInit, this);
 9690|      0|    }
 9691|     96|    return type_descriptor_.enum_type;
 9692|     96|  }
 9693|      0|  return nullptr;
 9694|     96|}
_ZN6google8protobuf8internal17ParseNoReflectionEN4absl12lts_2024011611string_viewERNS0_11MessageLiteE:
 9780|     24|bool ParseNoReflection(absl::string_view from, google::protobuf::MessageLite& to) {
 9781|     24|  auto cleanup = DisableTracking();
 9782|       |
 9783|     24|  to.Clear();
 9784|     24|  const char* ptr;
 9785|     24|  internal::ParseContext ctx(io::CodedInputStream::GetDefaultRecursionLimit(),
 9786|     24|                             false, &ptr, from);
 9787|     24|  ptr = to._InternalParse(ptr, &ctx);
 9788|     24|  if (ptr == nullptr || !ctx.EndedAtLimit()) return false;
  ------------------
  |  Branch (9788:7): [True: 0, False: 24]
  |  Branch (9788:25): [True: 0, False: 24]
  ------------------
 9789|     24|  return to.IsInitializedWithErrors();
 9790|     24|}
_ZN6google8protobuf8internal3cpp23IsLazilyInitializedFileEN4absl12lts_2024011611string_viewE:
 9846|      4|bool IsLazilyInitializedFile(absl::string_view filename) {
 9847|      4|  if (filename == "third_party/protobuf/cpp_features.proto" ||
  ------------------
  |  Branch (9847:7): [True: 0, False: 4]
  |  Branch (9847:7): [True: 1, False: 3]
  ------------------
 9848|      4|      filename == "google/protobuf/cpp_features.proto") {
  ------------------
  |  Branch (9848:7): [True: 1, False: 3]
  ------------------
 9849|      1|    return true;
 9850|      1|  }
 9851|      3|  return filename == "net/proto2/proto/descriptor.proto" ||
  ------------------
  |  Branch (9851:10): [True: 0, False: 3]
  ------------------
 9852|      3|         filename == "google/protobuf/descriptor.proto";
  ------------------
  |  Branch (9852:10): [True: 1, False: 2]
  ------------------
 9853|      4|}
_ZNK6google8protobuf14FileDescriptor7editionEv:
 9860|    986|Edition FileDescriptor::edition() const { return edition_; }
_ZNK6google8protobuf14DescriptorPool6Tables10FindSymbolEN4absl12lts_2024011611string_viewE:
 1693|    111|inline Symbol DescriptorPool::Tables::FindSymbol(absl::string_view key) const {
 1694|    111|  auto it = symbols_by_name_.find(FullNameQuery{key});
 1695|    111|  return it == symbols_by_name_.end() ? Symbol() : *it;
  ------------------
  |  Branch (1695:10): [True: 6, False: 105]
  ------------------
 1696|    111|}
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_118SymbolByFullNameEqclINS0_6SymbolENS1_13FullNameQueryEEEbRKT_RKT0_:
  958|    105|  bool operator()(const T& a, const U& b) const {
  959|    105|    return a.full_name() == b.full_name();
  960|    105|  }
_ZNK6google8protobuf6Symbol9full_nameEv:
  707|  1.57k|  absl::string_view full_name() const {
  708|  1.57k|    switch (type()) {
  709|    217|      case MESSAGE:
  ------------------
  |  Branch (709:7): [True: 217, False: 1.36k]
  ------------------
  710|    217|        return descriptor()->full_name();
  711|    805|      case FIELD:
  ------------------
  |  Branch (711:7): [True: 805, False: 774]
  ------------------
  712|    805|        return field_descriptor()->full_name();
  713|      4|      case ONEOF:
  ------------------
  |  Branch (713:7): [True: 4, False: 1.57k]
  ------------------
  714|      4|        return oneof_descriptor()->full_name();
  715|     96|      case ENUM:
  ------------------
  |  Branch (715:7): [True: 96, False: 1.48k]
  ------------------
  716|     96|        return enum_descriptor()->full_name();
  717|    434|      case ENUM_VALUE:
  ------------------
  |  Branch (717:7): [True: 434, False: 1.14k]
  ------------------
  718|    434|        return enum_value_descriptor()->full_name();
  719|      0|      case SERVICE:
  ------------------
  |  Branch (719:7): [True: 0, False: 1.57k]
  ------------------
  720|      0|        return service_descriptor()->full_name();
  721|      0|      case METHOD:
  ------------------
  |  Branch (721:7): [True: 0, False: 1.57k]
  ------------------
  722|      0|        return method_descriptor()->full_name();
  723|     12|      case FULL_PACKAGE:
  ------------------
  |  Branch (723:7): [True: 12, False: 1.56k]
  ------------------
  724|     12|        return file_descriptor()->package();
  725|     11|      case SUB_PACKAGE:
  ------------------
  |  Branch (725:7): [True: 11, False: 1.56k]
  ------------------
  726|     11|        return absl::string_view(sub_package_file_descriptor()->file->package())
  727|     11|            .substr(0, sub_package_file_descriptor()->name_size);
  728|      0|      default:
  ------------------
  |  Branch (728:7): [True: 0, False: 1.57k]
  ------------------
  729|      0|        ABSL_CHECK(false);
  ------------------
  |  |   41|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  730|  1.57k|    }
  731|      0|    return "";
  732|  1.57k|  }
_ZNK6google8protobuf6Symbol15file_descriptorEv:
  622|     12|  const TYPE* FIELD() const {                                                  \
  623|     12|    return type() == TYPE_CONSTANT ? static_cast<const TYPE*>(ptr_) : nullptr; \
  ------------------
  |  Branch (623:12): [True: 12, False: 0]
  ------------------
  624|     12|  }
_ZNK6google8protobuf6Symbol27sub_package_file_descriptorEv:
  622|     22|  const TYPE* FIELD() const {                                                  \
  623|     22|    return type() == TYPE_CONSTANT ? static_cast<const TYPE*>(ptr_) : nullptr; \
  ------------------
  |  Branch (623:12): [True: 22, False: 0]
  ------------------
  624|     22|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_113FullNameQuery9full_nameEv:
  944|    216|  absl::string_view full_name() const { return query; }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_120SymbolByFullNameHashclINS1_13FullNameQueryEEEmRKT_:
  950|    111|  size_t operator()(const T& s) const {
  951|    111|    return absl::HashOf(s.full_name());
  952|    111|  }
_ZNK6google8protobuf6Symbol6IsNullEv:
  673|    522|  bool IsNull() const { return type() == NULL_SYMBOL; }
_ZN6google8protobuf14DescriptorPool18DeferredValidationC2EPKS1_:
 1337|      4|      : pool_(pool), error_collector_(pool->default_error_collector_) {}
_ZN6google8protobuf6SymbolC2Ev:
  607|    386|  Symbol() {
  608|    386|    static constexpr internal::SymbolBase null_symbol{};
  609|    386|    static_assert(null_symbol.symbol_type_ == NULL_SYMBOL, "");
  610|       |    // Initialize with a sentinel to make sure `ptr_` is never null.
  611|    386|    ptr_ = &null_symbol;
  612|    386|  }
_ZN6google8protobuf14DescriptorPool18DeferredValidation8ValidateEv:
 1373|      4|  bool Validate() {
 1374|      4|    if (lifetimes_info_map_.empty()) return true;
  ------------------
  |  Branch (1374:9): [True: 4, False: 0]
  ------------------
 1375|       |
 1376|      0|    static absl::string_view feature_set_name = "google.protobuf.FeatureSet";
 1377|      0|    const Descriptor* feature_set =
 1378|      0|        pool_->FindMessageTypeByName(feature_set_name);
 1379|       |
 1380|      0|    bool has_errors = false;
 1381|      0|    for (const auto& it : lifetimes_info_map_) {
  ------------------
  |  Branch (1381:25): [True: 0, False: 0]
  ------------------
 1382|      0|      const FileDescriptor* file = it.first;
 1383|       |
 1384|      0|      for (const auto& info : it.second) {
  ------------------
  |  Branch (1384:29): [True: 0, False: 0]
  ------------------
 1385|      0|        auto results = FeatureResolver::ValidateFeatureLifetimes(
 1386|      0|            file->edition(), *info.proto_features, feature_set);
 1387|      0|        for (const auto& error : results.errors) {
  ------------------
  |  Branch (1387:32): [True: 0, False: 0]
  ------------------
 1388|      0|          has_errors = true;
 1389|      0|          if (error_collector_ == nullptr) {
  ------------------
  |  Branch (1389:15): [True: 0, False: 0]
  ------------------
 1390|      0|            ABSL_LOG(ERROR)
  ------------------
  |  |   38|      0|#define ABSL_LOG(severity) ABSL_LOG_INTERNAL_LOG_IMPL(_##severity)
  |  |  ------------------
  |  |  |  |   25|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, true) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  170|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   26|      0|      ABSL_LOGGING_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|  ::absl::log_internal::LogMessage(     \
  |  |  |  |  |  |   53|      0|      __FILE__, __LINE__, ::absl::log_internal::LogMessage::ErrorTag{})
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1391|      0|                << info.filename << " " << info.full_name << ": " << error;
 1392|      0|          } else {
 1393|      0|            error_collector_->RecordError(
 1394|      0|                info.filename, info.full_name, info.proto,
 1395|      0|                DescriptorPool::ErrorCollector::NAME, error);
 1396|      0|          }
 1397|      0|        }
 1398|      0|        if (pool_->direct_input_files_.find(file->name()) !=
  ------------------
  |  Branch (1398:13): [True: 0, False: 0]
  ------------------
 1399|      0|            pool_->direct_input_files_.end()) {
 1400|      0|          for (const auto& warning : results.warnings) {
  ------------------
  |  Branch (1400:36): [True: 0, False: 0]
  ------------------
 1401|      0|            if (error_collector_ == nullptr) {
  ------------------
  |  Branch (1401:17): [True: 0, False: 0]
  ------------------
 1402|      0|              ABSL_LOG(WARNING)
  ------------------
  |  |   38|      0|#define ABSL_LOG(severity) ABSL_LOG_INTERNAL_LOG_IMPL(_##severity)
  |  |  ------------------
  |  |  |  |   25|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, true) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  168|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   26|      0|      ABSL_LOGGING_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|      0|  ::absl::log_internal::LogMessage(       \
  |  |  |  |  |  |   50|      0|      __FILE__, __LINE__, ::absl::log_internal::LogMessage::WarningTag{})
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1403|      0|                  << info.filename << " " << info.full_name << ": " << warning;
 1404|      0|            } else {
 1405|      0|              error_collector_->RecordWarning(
 1406|      0|                  info.filename, info.full_name, info.proto,
 1407|      0|                  DescriptorPool::ErrorCollector::NAME, warning);
 1408|      0|            }
 1409|      0|          }
 1410|      0|        }
 1411|      0|      }
 1412|      0|    }
 1413|      0|    lifetimes_info_map_.clear();
 1414|      0|    return !has_errors;
 1415|      0|  }
_ZN6google8protobuf14DescriptorPool18DeferredValidationD2Ev:
 1344|      4|  ~DeferredValidation() {
 1345|      8|    ABSL_CHECK(lifetimes_info_map_.empty())
  ------------------
  |  |   41|      4|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      4|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      8|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      8|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      4|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      8|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 4]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|      4|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      4|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1346|      8|        << "DeferredValidation destroyed with unvalidated features";
 1347|      4|  }
_ZNK6google8protobuf6Symbol16field_descriptorEv:
  622|  1.52k|  const TYPE* FIELD() const {                                                  \
  623|  1.52k|    return type() == TYPE_CONSTANT ? static_cast<const TYPE*>(ptr_) : nullptr; \
  ------------------
  |  Branch (623:12): [True: 1.52k, False: 0]
  ------------------
  624|  1.52k|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_19RoundUpToILi8EEEmm:
  162|  1.03k|constexpr size_t RoundUpTo(size_t n) {
  163|  1.03k|  static_assert((R & (R - 1)) == 0, "Must be power of two");
  164|  1.03k|  return (n + (R - 1)) & ~(R - 1);
  165|  1.03k|}
_ZNK6google8protobuf14DescriptorPool6Tables8FindFileEN4absl12lts_2024011611string_viewE:
 1745|     13|    absl::string_view key) const {
 1746|     13|  auto it = files_by_name_.find(key);
 1747|     13|  if (it == files_by_name_.end()) return nullptr;
  ------------------
  |  Branch (1747:7): [True: 8, False: 5]
  ------------------
 1748|      5|  return *it;
 1749|     13|}
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_119DescriptorsByNameEqINS0_14FileDescriptorEEclEPKS3_N4absl12lts_2024011611string_viewE:
 1011|      7|  bool operator()(const DescriptorT* lhs, absl::string_view rhs) const {
 1012|      7|    return lhs->name() == rhs;
 1013|      7|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_121DescriptorsByNameHashINS0_14FileDescriptorEEclEN4absl12lts_2024011611string_viewE:
  994|     13|  size_t operator()(absl::string_view name) const { return absl::HashOf(name); }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117GeneratedDatabaseEv:
 2186|      8|EncodedDescriptorDatabase* GeneratedDatabase() {
 2187|      8|  static auto generated_database =
 2188|      8|      internal::OnShutdownDelete(new EncodedDescriptorDatabase());
 2189|      8|  return generated_database;
 2190|      8|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_116NewGeneratedPoolEv:
 2192|      2|DescriptorPool* NewGeneratedPool() {
 2193|      2|  auto generated_pool = new DescriptorPool(GeneratedDatabase());
 2194|      2|  generated_pool->InternalSetLazilyBuildDependencies();
 2195|      2|  return generated_pool;
 2196|      2|}
_ZNK6google8protobuf6Symbol7GetFileEv:
  682|    453|  const FileDescriptor* GetFile() const {
  683|    453|    switch (type()) {
  684|    171|      case MESSAGE:
  ------------------
  |  Branch (684:7): [True: 171, False: 282]
  ------------------
  685|    171|        return descriptor()->file();
  686|      1|      case FIELD:
  ------------------
  |  Branch (686:7): [True: 1, False: 452]
  ------------------
  687|      1|        return field_descriptor()->file();
  688|      0|      case ONEOF:
  ------------------
  |  Branch (688:7): [True: 0, False: 453]
  ------------------
  689|      0|        return oneof_descriptor()->containing_type()->file();
  690|     51|      case ENUM:
  ------------------
  |  Branch (690:7): [True: 51, False: 402]
  ------------------
  691|     51|        return enum_descriptor()->file();
  692|    230|      case ENUM_VALUE:
  ------------------
  |  Branch (692:7): [True: 230, False: 223]
  ------------------
  693|    230|        return enum_value_descriptor()->type()->file();
  694|      0|      case SERVICE:
  ------------------
  |  Branch (694:7): [True: 0, False: 453]
  ------------------
  695|      0|        return service_descriptor()->file();
  696|      0|      case METHOD:
  ------------------
  |  Branch (696:7): [True: 0, False: 453]
  ------------------
  697|      0|        return method_descriptor()->service()->file();
  698|      0|      case FULL_PACKAGE:
  ------------------
  |  Branch (698:7): [True: 0, False: 453]
  ------------------
  699|      0|        return file_descriptor();
  700|      0|      case SUB_PACKAGE:
  ------------------
  |  Branch (700:7): [True: 0, False: 453]
  ------------------
  701|      0|        return sub_package_file_descriptor()->file;
  702|      0|      default:
  ------------------
  |  Branch (702:7): [True: 0, False: 453]
  ------------------
  703|      0|        return nullptr;
  704|    453|    }
  705|    453|  }
_ZNK6google8protobuf6Symbol10descriptorEv:
  622|    703|  const TYPE* FIELD() const {                                                  \
  623|    703|    return type() == TYPE_CONSTANT ? static_cast<const TYPE*>(ptr_) : nullptr; \
  ------------------
  |  Branch (623:12): [True: 703, False: 0]
  ------------------
  624|    703|  }
_ZNK6google8protobuf6Symbol16oneof_descriptorEv:
  622|     22|  const TYPE* FIELD() const {                                                  \
  623|     22|    return type() == TYPE_CONSTANT ? static_cast<const TYPE*>(ptr_) : nullptr; \
  ------------------
  |  Branch (623:12): [True: 22, False: 0]
  ------------------
  624|     22|  }
_ZNK6google8protobuf6Symbol15enum_descriptorEv:
  622|    273|  const TYPE* FIELD() const {                                                  \
  623|    273|    return type() == TYPE_CONSTANT ? static_cast<const TYPE*>(ptr_) : nullptr; \
  ------------------
  |  Branch (623:12): [True: 273, False: 0]
  ------------------
  624|    273|  }
_ZNK6google8protobuf6Symbol21enum_value_descriptorEv:
  660|  2.18k|  const EnumValueDescriptor* enum_value_descriptor() const {
  661|  2.18k|    return type() == ENUM_VALUE
  ------------------
  |  Branch (661:12): [True: 1.42k, False: 754]
  ------------------
  662|  2.18k|               ? static_cast<const EnumValueDescriptor*>(
  663|  1.42k|                     static_cast<const internal::SymbolBaseN<0>*>(ptr_))
  664|  2.18k|           : type() == ENUM_VALUE_OTHER_PARENT
  ------------------
  |  Branch (664:14): [True: 754, False: 0]
  ------------------
  665|    754|               ? static_cast<const EnumValueDescriptor*>(
  666|    754|                     static_cast<const internal::SymbolBaseN<1>*>(ptr_))
  667|    754|               : nullptr;
  668|  2.18k|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_120ObjectToParentNumberEPKNS0_15FieldDescriptorE:
 1031|    224|std::pair<const void*, int> ObjectToParentNumber(const FieldDescriptor* field) {
 1032|    224|  return {field->containing_type(), field->number()};
 1033|    224|}
_ZNK6google8protobuf6Symbol15parent_name_keyEv:
  734|  1.65k|  std::pair<const void*, absl::string_view> parent_name_key() const {
  735|  1.65k|    const auto or_file = [&](const void* p) { return p ? p : GetFile(); };
  736|  1.65k|    switch (type()) {
  737|    124|      case MESSAGE:
  ------------------
  |  Branch (737:7): [True: 124, False: 1.53k]
  ------------------
  738|    124|        return {or_file(descriptor()->containing_type()), descriptor()->name()};
  739|    721|      case FIELD: {
  ------------------
  |  Branch (739:7): [True: 721, False: 937]
  ------------------
  740|    721|        auto* field = field_descriptor();
  741|    721|        return {or_file(field->is_extension() ? field->extension_scope()
  ------------------
  |  Branch (741:25): [True: 1, False: 720]
  ------------------
  742|    721|                                              : field->containing_type()),
  743|    721|                field->name()};
  744|      0|      }
  745|      9|      case ONEOF:
  ------------------
  |  Branch (745:7): [True: 9, False: 1.64k]
  ------------------
  746|      9|        return {oneof_descriptor()->containing_type(),
  747|      9|                oneof_descriptor()->name()};
  748|     47|      case ENUM:
  ------------------
  |  Branch (748:7): [True: 47, False: 1.61k]
  ------------------
  749|     47|        return {or_file(enum_descriptor()->containing_type()),
  750|     47|                enum_descriptor()->name()};
  751|    380|      case ENUM_VALUE:
  ------------------
  |  Branch (751:7): [True: 380, False: 1.27k]
  ------------------
  752|    380|        return {or_file(enum_value_descriptor()->type()->containing_type()),
  753|    380|                enum_value_descriptor()->name()};
  754|    377|      case ENUM_VALUE_OTHER_PARENT:
  ------------------
  |  Branch (754:7): [True: 377, False: 1.28k]
  ------------------
  755|    377|        return {enum_value_descriptor()->type(),
  756|    377|                enum_value_descriptor()->name()};
  757|      0|      case SERVICE:
  ------------------
  |  Branch (757:7): [True: 0, False: 1.65k]
  ------------------
  758|      0|        return {GetFile(), service_descriptor()->name()};
  759|      0|      case METHOD:
  ------------------
  |  Branch (759:7): [True: 0, False: 1.65k]
  ------------------
  760|      0|        return {method_descriptor()->service(), method_descriptor()->name()};
  761|      0|      default:
  ------------------
  |  Branch (761:7): [True: 0, False: 1.65k]
  ------------------
  762|      0|        ABSL_CHECK(false);
  ------------------
  |  |   41|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  763|  1.65k|    }
  764|      0|    return {};
  765|  1.65k|  }
_ZZNK6google8protobuf6Symbol15parent_name_keyEvENKUlPKvE_clES3_:
  735|  1.27k|    const auto or_file = [&](const void* p) { return p ? p : GetFile(); };
  ------------------
  |  Branch (735:54): [True: 923, False: 349]
  ------------------
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_120ObjectToParentNumberEPKNS0_19EnumValueDescriptorE:
 1035|    213|    const EnumValueDescriptor* enum_value) {
 1036|    213|  return {enum_value->type(), enum_value->number()};
 1037|    213|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13AllocateArrayIS9_EEPT_i:
  400|    508|  U* AllocateArray(int array_size) {
  401|    508|    constexpr bool trivial = std::is_trivially_destructible<U>::value;
  402|    508|    using TypeToUse = typename std::conditional<trivial, char, U>::type;
  403|       |
  404|       |    // We can only allocate after FinalizePlanning has been called.
  405|    508|    ABSL_CHECK(has_allocated());
  ------------------
  |  |   41|    508|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|  1.01k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|    508|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|  1.01k|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|  1.01k|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 508, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|    508|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 508]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|  1.01k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 508, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 508]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 508]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|  1.01k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|  1.01k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  406|       |
  407|    508|    TypeToUse*& data = pointers_.template Get<TypeToUse>();
  408|    508|    int& used = used_.template Get<TypeToUse>();
  409|    508|    U* res = reinterpret_cast<U*>(data + used);
  410|    508|    used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size;
  ------------------
  |  Branch (410:13): [Folded, False: 508]
  ------------------
  411|    508|    ABSL_CHECK_LE(used, total_.template Get<TypeToUse>());
  ------------------
  |  |   54|    508|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   52|    508|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|    508|  while (                                                                      \
  |  |  |  |  |  |   62|    508|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 508]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|    508|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|    508|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|    508|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|    508|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|    508|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|    508|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  412|    508|    return res;
  413|    508|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13has_allocatedEv:
  541|  2.47k|  bool has_allocated() const {
  542|  2.47k|    return pointers_.template Get<char>() != nullptr;
  543|  2.47k|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_17TypeMapINS1_8PointerTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetIcEERKPT_v:
  243|  2.47k|  const ValueT<K>& Get() const {
  244|  2.47k|    return static_cast<const Base<K>&>(payload_).value;
  245|  2.47k|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_8PointerTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISA_EERPT_v:
  238|    512|  ValueT<K>& Get() {
  239|    512|    return static_cast<Base<K>&>(payload_).value;
  240|    512|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISA_EERiv:
  238|  1.51k|  ValueT<K>& Get() {
  239|  1.51k|    return static_cast<Base<K>&>(payload_).value;
  240|  1.51k|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_14FoldESt16initializer_listINS1_15ExpressionEaterEE:
  159|    528|void Fold(std::initializer_list<ExpressionEater>) {}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_115ExpressionEaterC2IRNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEEOT_:
  157|  1.13k|  ExpressionEater(T&&) {}  // NOLINT
_ZN6google8protobuf14DescriptorPool18DeferredValidation11CreateProtoEv:
 1368|      4|  FileDescriptorProto& CreateProto() {
 1369|      4|    owned_protos_.push_back(Arena::Create<FileDescriptorProto>(&arena_));
 1370|      4|    return *owned_protos_.back();
 1371|      4|  }
descriptor.cc:_ZZNK6google8protobuf14DescriptorPool29TryFindFileInFallbackDatabaseEN4absl12lts_2024011611string_viewERNS1_18DeferredValidationEENK3$_0clERNS0_18DescriptorDatabaseES4_RNS0_19FileDescriptorProtoE:
 2711|      4|                            FileDescriptorProto& output) PROTOBUF_NOINLINE {
 2712|      4|    return database.FindFileByName(std::string(filename), &output);
 2713|      4|  };
_ZNK6google8protobuf6Symbol9IsPackageEv:
  678|    104|  bool IsPackage() const {
  679|    104|    return type() == FULL_PACKAGE || type() == SUB_PACKAGE;
  ------------------
  |  Branch (679:12): [True: 1, False: 103]
  |  Branch (679:38): [True: 0, False: 103]
  ------------------
  680|    104|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_115IsLegacyEditionENS0_7EditionE:
 1198|    751|bool IsLegacyEdition(Edition edition) {
 1199|    751|  return edition < Edition::EDITION_2023;
 1200|    751|}
_ZN6google8protobuf17DescriptorBuilder3NewEPKNS0_14DescriptorPoolEPNS2_6TablesERNS2_18DeferredValidationEPNS2_14ErrorCollectorE:
 4159|      4|      DescriptorPool::ErrorCollector* error_collector) {
 4160|      4|    return std::unique_ptr<DescriptorBuilder>(new DescriptorBuilder(
 4161|      4|        pool, tables, deferred_validation, error_collector));
 4162|      4|  }
descriptor.cc:_ZZNK6google8protobuf14DescriptorPool21BuildFileFromDatabaseERKNS0_19FileDescriptorProtoERNS1_18DeferredValidationEENK3$_0clEv:
 4747|      4|  const auto build_file = [&] {
 4748|      4|    result = DescriptorBuilder::New(this, tables_.get(), deferred_validation,
 4749|      4|                                    default_error_collector_)
 4750|      4|                 ->BuildFile(proto);
 4751|      4|  };
_ZN6google8protobuf6SymbolC2EPNS0_14EnumDescriptorE:
  619|     24|  explicit Symbol(TYPE* value) : ptr_(value) {                                 \
  620|     24|    value->symbol_type_ = TYPE_CONSTANT;                                       \
  621|     24|  }                                                                            \
_ZN6google8protobuf6SymbolC2EPNS0_10DescriptorE:
  619|     47|  explicit Symbol(TYPE* value) : ptr_(value) {                                 \
  620|     47|    value->symbol_type_ = TYPE_CONSTANT;                                       \
  621|     47|  }                                                                            \
_ZN6google8protobuf6SymbolC2EPNS0_14FileDescriptorE:
  619|      3|  explicit Symbol(TYPE* value) : ptr_(value) {                                 \
  620|      3|    value->symbol_type_ = TYPE_CONSTANT;                                       \
  621|      3|  }                                                                            \
_ZN6google8protobuf6SymbolC2EPNS1_10SubpackageE:
  619|      3|  explicit Symbol(TYPE* value) : ptr_(value) {                                 \
  620|      3|    value->symbol_type_ = TYPE_CONSTANT;                                       \
  621|      3|  }                                                                            \
descriptor.cc:_ZN6google8protobufL18PlanAllocationSizeERKNS0_19FileDescriptorProtoERNS0_8internal13FlatAllocatorE:
 5798|      4|                               internal::FlatAllocator& alloc) {
 5799|      4|  alloc.PlanArray<FileDescriptor>(1);
 5800|      4|  alloc.PlanArray<FileDescriptorTables>(1);
 5801|      4|  alloc.PlanArray<std::string>(2);  // name + package
 5802|      4|  if (proto.has_options()) alloc.PlanArray<FileOptions>(1);
  ------------------
  |  Branch (5802:7): [True: 2, False: 2]
  ------------------
 5803|      4|  if (proto.has_source_code_info()) alloc.PlanArray<SourceCodeInfo>(1);
  ------------------
  |  Branch (5803:7): [True: 0, False: 4]
  ------------------
 5804|       |
 5805|      4|  PlanAllocationSize(proto.service(), alloc);
 5806|      4|  PlanAllocationSize(proto.message_type(), alloc);
 5807|      4|  PlanAllocationSize(proto.enum_type(), alloc);
 5808|      4|  PlanAllocationSize(proto.extension(), alloc);
 5809|       |
 5810|      4|  alloc.PlanArray<int>(proto.weak_dependency_size());
 5811|      4|  alloc.PlanArray<int>(proto.public_dependency_size());
 5812|      4|  alloc.PlanArray<const FileDescriptor*>(proto.dependency_size());
 5813|      4|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayISB_EEvi:
  382|      4|  void PlanArray(int array_size) {
  383|       |    // We can't call PlanArray after FinalizePlanning has been called.
  384|      4|    ABSL_CHECK(!has_allocated());
  ------------------
  |  |   41|      4|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|      8|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      4|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      8|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      8|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      4|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      8|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 4]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|      8|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|      8|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  385|      4|    if (std::is_trivially_destructible<U>::value) {
  ------------------
  |  Branch (385:9): [Folded, False: 4]
  ------------------
  386|       |      // Trivial types are aligned to 8 bytes.
  387|      0|      static_assert(alignof(U) <= 8, "");
  388|      0|      total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U));
  389|      4|    } else {
  390|       |      // Since we can't use `if constexpr`, just make the expression compile
  391|       |      // when this path is not taken.
  392|      4|      using TypeToUse =
  393|      4|          typename std::conditional<std::is_trivially_destructible<U>::value,
  394|      4|                                    char, U>::type;
  395|      4|      total_.template Get<TypeToUse>() += array_size;
  396|      4|    }
  397|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISC_EERiv:
  238|     20|  ValueT<K>& Get() {
  239|     20|    return static_cast<Base<K>&>(payload_).value;
  240|     20|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayISL_EEvi:
  382|      2|  void PlanArray(int array_size) {
  383|       |    // We can't call PlanArray after FinalizePlanning has been called.
  384|      2|    ABSL_CHECK(!has_allocated());
  ------------------
  |  |   41|      2|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|      4|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      2|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      4|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      4|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      2|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      4|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 2]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|      4|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|      4|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  385|      2|    if (std::is_trivially_destructible<U>::value) {
  ------------------
  |  Branch (385:9): [Folded, False: 2]
  ------------------
  386|       |      // Trivial types are aligned to 8 bytes.
  387|      0|      static_assert(alignof(U) <= 8, "");
  388|      0|      total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U));
  389|      2|    } else {
  390|       |      // Since we can't use `if constexpr`, just make the expression compile
  391|       |      // when this path is not taken.
  392|      2|      using TypeToUse =
  393|      2|          typename std::conditional<std::is_trivially_destructible<U>::value,
  394|      2|                                    char, U>::type;
  395|      2|      total_.template Get<TypeToUse>() += array_size;
  396|      2|    }
  397|      2|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISM_EERiv:
  238|     18|  ValueT<K>& Get() {
  239|     18|    return static_cast<Base<K>&>(payload_).value;
  240|     18|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISB_EERiv:
  238|      8|  ValueT<K>& Get() {
  239|      8|    return static_cast<Base<K>&>(payload_).value;
  240|      8|  }
descriptor.cc:_ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_22ServiceDescriptorProtoEEERNS0_8internal13FlatAllocatorE:
 5788|      4|    internal::FlatAllocator& alloc) {
 5789|      4|  alloc.PlanArray<ServiceDescriptor>(services.size());
 5790|      4|  alloc.PlanArray<std::string>(2 * services.size());  // name + full_name
 5791|      4|  for (const auto& service : services) {
  ------------------
  |  Branch (5791:28): [True: 0, False: 4]
  ------------------
 5792|      0|    if (service.has_options()) alloc.PlanArray<ServiceOptions>(1);
  ------------------
  |  Branch (5792:9): [True: 0, False: 0]
  ------------------
 5793|      0|    PlanAllocationSize(service.method(), alloc);
 5794|      0|  }
 5795|      4|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayINS0_17ServiceDescriptorEEEvi:
  382|      4|  void PlanArray(int array_size) {
  383|       |    // We can't call PlanArray after FinalizePlanning has been called.
  384|      4|    ABSL_CHECK(!has_allocated());
  ------------------
  |  |   41|      4|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|      8|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      4|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      8|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      8|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      4|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      8|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 4]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|      8|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|      8|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  385|      4|    if (std::is_trivially_destructible<U>::value) {
  ------------------
  |  Branch (385:9): [True: 4, Folded]
  ------------------
  386|       |      // Trivial types are aligned to 8 bytes.
  387|      4|      static_assert(alignof(U) <= 8, "");
  388|      4|      total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U));
  389|      4|    } else {
  390|       |      // Since we can't use `if constexpr`, just make the expression compile
  391|       |      // when this path is not taken.
  392|      0|      using TypeToUse =
  393|      0|          typename std::conditional<std::is_trivially_destructible<U>::value,
  394|      0|                                    char, U>::type;
  395|      0|      total_.template Get<TypeToUse>() += array_size;
  396|      0|    }
  397|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetIcEERiv:
  238|  1.44k|  ValueT<K>& Get() {
  239|  1.44k|    return static_cast<Base<K>&>(payload_).value;
  240|  1.44k|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISK_EERiv:
  238|      8|  ValueT<K>& Get() {
  239|      8|    return static_cast<Base<K>&>(payload_).value;
  240|      8|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISL_EERiv:
  238|      8|  ValueT<K>& Get() {
  239|      8|    return static_cast<Base<K>&>(payload_).value;
  240|      8|  }
descriptor.cc:_ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_15DescriptorProtoEEERNS0_8internal13FlatAllocatorE:
 5758|     51|    internal::FlatAllocator& alloc) {
 5759|     51|  alloc.PlanArray<Descriptor>(messages.size());
 5760|     51|  alloc.PlanArray<std::string>(2 * messages.size());  // name + full_name
 5761|       |
 5762|     51|  for (const auto& message : messages) {
  ------------------
  |  Branch (5762:28): [True: 47, False: 51]
  ------------------
 5763|     47|    if (message.has_options()) alloc.PlanArray<MessageOptions>(1);
  ------------------
  |  Branch (5763:9): [True: 0, False: 47]
  ------------------
 5764|     47|    PlanAllocationSize(message.nested_type(), alloc);
 5765|     47|    PlanAllocationSize(message.field(), alloc);
 5766|     47|    PlanAllocationSize(message.extension(), alloc);
 5767|     47|    PlanAllocationSize(message.extension_range(), alloc);
 5768|     47|    alloc.PlanArray<Descriptor::ReservedRange>(message.reserved_range_size());
 5769|     47|    alloc.PlanArray<const std::string*>(message.reserved_name_size());
 5770|     47|    alloc.PlanArray<std::string>(message.reserved_name_size());
 5771|     47|    PlanAllocationSize(message.enum_type(), alloc);
 5772|     47|    PlanAllocationSize(message.oneof_decl(), alloc);
 5773|     47|  }
 5774|     51|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISE_EERiv:
  238|      8|  ValueT<K>& Get() {
  239|      8|    return static_cast<Base<K>&>(payload_).value;
  240|      8|  }
descriptor.cc:_ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_30DescriptorProto_ExtensionRangeEEERNS0_8internal13FlatAllocatorE:
 5749|     47|    internal::FlatAllocator& alloc) {
 5750|     47|  alloc.PlanArray<Descriptor::ExtensionRange>(ranges.size());
 5751|     47|  for (const auto& r : ranges) {
  ------------------
  |  Branch (5751:22): [True: 14, False: 47]
  ------------------
 5752|     14|    if (r.has_options()) alloc.PlanArray<ExtensionRangeOptions>(1);
  ------------------
  |  Branch (5752:9): [True: 0, False: 14]
  ------------------
 5753|     14|  }
 5754|     47|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISI_EERiv:
  238|      8|  ValueT<K>& Get() {
  239|      8|    return static_cast<Base<K>&>(payload_).value;
  240|      8|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayINS0_10Descriptor13ReservedRangeEEEvi:
  382|     47|  void PlanArray(int array_size) {
  383|       |    // We can't call PlanArray after FinalizePlanning has been called.
  384|     47|    ABSL_CHECK(!has_allocated());
  ------------------
  |  |   41|     47|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|     94|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     47|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|     94|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|     94|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 47, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     47|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 47]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|     94|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 47, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 47]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 47]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|     94|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|     94|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  385|     47|    if (std::is_trivially_destructible<U>::value) {
  ------------------
  |  Branch (385:9): [True: 47, Folded]
  ------------------
  386|       |      // Trivial types are aligned to 8 bytes.
  387|     47|      static_assert(alignof(U) <= 8, "");
  388|     47|      total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U));
  389|     47|    } else {
  390|       |      // Since we can't use `if constexpr`, just make the expression compile
  391|       |      // when this path is not taken.
  392|      0|      using TypeToUse =
  393|      0|          typename std::conditional<std::is_trivially_destructible<U>::value,
  394|      0|                                    char, U>::type;
  395|      0|      total_.template Get<TypeToUse>() += array_size;
  396|      0|    }
  397|     47|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayIPKS9_EEvi:
  382|     71|  void PlanArray(int array_size) {
  383|       |    // We can't call PlanArray after FinalizePlanning has been called.
  384|     71|    ABSL_CHECK(!has_allocated());
  ------------------
  |  |   41|     71|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|    142|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     71|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    142|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|    142|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 71, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     71|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 71]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|    142|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 71, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 71]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 71]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|    142|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|    142|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  385|     71|    if (std::is_trivially_destructible<U>::value) {
  ------------------
  |  Branch (385:9): [True: 71, Folded]
  ------------------
  386|       |      // Trivial types are aligned to 8 bytes.
  387|     71|      static_assert(alignof(U) <= 8, "");
  388|     71|      total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U));
  389|     71|    } else {
  390|       |      // Since we can't use `if constexpr`, just make the expression compile
  391|       |      // when this path is not taken.
  392|      0|      using TypeToUse =
  393|      0|          typename std::conditional<std::is_trivially_destructible<U>::value,
  394|      0|                                    char, U>::type;
  395|      0|      total_.template Get<TypeToUse>() += array_size;
  396|      0|    }
  397|     71|  }
descriptor.cc:_ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_20OneofDescriptorProtoEEERNS0_8internal13FlatAllocatorE:
 5722|     47|    internal::FlatAllocator& alloc) {
 5723|     47|  alloc.PlanArray<OneofDescriptor>(oneofs.size());
 5724|     47|  alloc.PlanArray<std::string>(2 * oneofs.size());  // name + full_name
 5725|     47|  for (const auto& oneof : oneofs) {
  ------------------
  |  Branch (5725:26): [True: 2, False: 47]
  ------------------
 5726|      2|    if (oneof.has_options()) alloc.PlanArray<OneofOptions>(1);
  ------------------
  |  Branch (5726:9): [True: 0, False: 2]
  ------------------
 5727|      2|  }
 5728|     47|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayINS0_15OneofDescriptorEEEvi:
  382|     47|  void PlanArray(int array_size) {
  383|       |    // We can't call PlanArray after FinalizePlanning has been called.
  384|     47|    ABSL_CHECK(!has_allocated());
  ------------------
  |  |   41|     47|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|     94|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     47|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|     94|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|     94|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 47, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     47|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 47]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|     94|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 47, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 47]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 47]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|     94|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|     94|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  385|     47|    if (std::is_trivially_destructible<U>::value) {
  ------------------
  |  Branch (385:9): [True: 47, Folded]
  ------------------
  386|       |      // Trivial types are aligned to 8 bytes.
  387|     47|      static_assert(alignof(U) <= 8, "");
  388|     47|      total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U));
  389|     47|    } else {
  390|       |      // Since we can't use `if constexpr`, just make the expression compile
  391|       |      // when this path is not taken.
  392|      0|      using TypeToUse =
  393|      0|          typename std::conditional<std::is_trivially_destructible<U>::value,
  394|      0|                                    char, U>::type;
  395|      0|      total_.template Get<TypeToUse>() += array_size;
  396|      0|    }
  397|     47|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISJ_EERiv:
  238|      8|  ValueT<K>& Get() {
  239|      8|    return static_cast<Base<K>&>(payload_).value;
  240|      8|  }
descriptor.cc:_ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_19EnumDescriptorProtoEEERNS0_8internal13FlatAllocatorE:
 5708|     51|    internal::FlatAllocator& alloc) {
 5709|     51|  alloc.PlanArray<EnumDescriptor>(enums.size());
 5710|     51|  alloc.PlanArray<std::string>(2 * enums.size());  // name + full_name
 5711|     51|  for (const auto& e : enums) {
  ------------------
  |  Branch (5711:22): [True: 24, False: 51]
  ------------------
 5712|     24|    if (e.has_options()) alloc.PlanArray<EnumOptions>(1);
  ------------------
  |  Branch (5712:9): [True: 0, False: 24]
  ------------------
 5713|     24|    PlanAllocationSize(e.value(), alloc);
 5714|     24|    alloc.PlanArray<EnumDescriptor::ReservedRange>(e.reserved_range_size());
 5715|     24|    alloc.PlanArray<const std::string*>(e.reserved_name_size());
 5716|     24|    alloc.PlanArray<std::string>(e.reserved_name_size());
 5717|     24|  }
 5718|     51|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISG_EERiv:
  238|      8|  ValueT<K>& Get() {
  239|      8|    return static_cast<Base<K>&>(payload_).value;
  240|      8|  }
descriptor.cc:_ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_24EnumValueDescriptorProtoEEERNS0_8internal13FlatAllocatorE:
 5698|     24|    internal::FlatAllocator& alloc) {
 5699|     24|  alloc.PlanArray<EnumValueDescriptor>(values.size());
 5700|     24|  alloc.PlanArray<std::string>(2 * values.size());  // name + full_name
 5701|    190|  for (const auto& v : values) {
  ------------------
  |  Branch (5701:22): [True: 190, False: 24]
  ------------------
 5702|    190|    if (v.has_options()) alloc.PlanArray<EnumValueOptions>(1);
  ------------------
  |  Branch (5702:9): [True: 0, False: 190]
  ------------------
 5703|    190|  }
 5704|     24|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISH_EERiv:
  238|      8|  ValueT<K>& Get() {
  239|      8|    return static_cast<Base<K>&>(payload_).value;
  240|      8|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayINS0_14EnumDescriptor13ReservedRangeEEEvi:
  382|     24|  void PlanArray(int array_size) {
  383|       |    // We can't call PlanArray after FinalizePlanning has been called.
  384|     24|    ABSL_CHECK(!has_allocated());
  ------------------
  |  |   41|     24|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|     48|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     24|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|     48|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|     48|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 24, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     24|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 24]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|     48|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 24, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 24]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 24]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|     48|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|     48|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  385|     24|    if (std::is_trivially_destructible<U>::value) {
  ------------------
  |  Branch (385:9): [True: 24, Folded]
  ------------------
  386|       |      // Trivial types are aligned to 8 bytes.
  387|     24|      static_assert(alignof(U) <= 8, "");
  388|     24|      total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U));
  389|     24|    } else {
  390|       |      // Since we can't use `if constexpr`, just make the expression compile
  391|       |      // when this path is not taken.
  392|      0|      using TypeToUse =
  393|      0|          typename std::conditional<std::is_trivially_destructible<U>::value,
  394|      0|                                    char, U>::type;
  395|      0|      total_.template Get<TypeToUse>() += array_size;
  396|      0|    }
  397|     24|  }
descriptor.cc:_ZN6google8protobufL18PlanAllocationSizeERKNS0_16RepeatedPtrFieldINS0_20FieldDescriptorProtoEEERNS0_8internal13FlatAllocatorE:
 5732|     98|    internal::FlatAllocator& alloc) {
 5733|     98|  alloc.PlanArray<FieldDescriptor>(fields.size());
 5734|    235|  for (const auto& field : fields) {
  ------------------
  |  Branch (5734:26): [True: 235, False: 98]
  ------------------
 5735|    235|    if (field.has_options()) alloc.PlanArray<FieldOptions>(1);
  ------------------
  |  Branch (5735:9): [True: 17, False: 218]
  ------------------
 5736|    235|    alloc.PlanFieldNames(field.name(),
 5737|    235|                         field.has_json_name() ? &field.json_name() : nullptr);
  ------------------
  |  Branch (5737:26): [True: 0, False: 235]
  ------------------
 5738|    235|    if (field.has_default_value() && field.has_type() &&
  ------------------
  |  Branch (5738:9): [True: 27, False: 208]
  |  Branch (5738:38): [True: 27, False: 0]
  ------------------
 5739|     27|        (field.type() == FieldDescriptorProto::TYPE_STRING ||
  ------------------
  |  Branch (5739:10): [True: 0, False: 27]
  ------------------
 5740|     27|         field.type() == FieldDescriptorProto::TYPE_BYTES)) {
  ------------------
  |  Branch (5740:10): [True: 0, False: 27]
  ------------------
 5741|       |      // For the default string value.
 5742|      0|      alloc.PlanArray<std::string>(1);
 5743|      0|    }
 5744|    235|  }
 5745|     98|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayINS0_15FieldDescriptorEEEvi:
  382|     98|  void PlanArray(int array_size) {
  383|       |    // We can't call PlanArray after FinalizePlanning has been called.
  384|     98|    ABSL_CHECK(!has_allocated());
  ------------------
  |  |   41|     98|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|    196|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     98|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    196|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|    196|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 98, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     98|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 98]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|    196|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 98, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 98]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 98]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|    196|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|    196|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  385|     98|    if (std::is_trivially_destructible<U>::value) {
  ------------------
  |  Branch (385:9): [True: 98, Folded]
  ------------------
  386|       |      // Trivial types are aligned to 8 bytes.
  387|     98|      static_assert(alignof(U) <= 8, "");
  388|     98|      total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U));
  389|     98|    } else {
  390|       |      // Since we can't use `if constexpr`, just make the expression compile
  391|       |      // when this path is not taken.
  392|      0|      using TypeToUse =
  393|      0|          typename std::conditional<std::is_trivially_destructible<U>::value,
  394|      0|                                    char, U>::type;
  395|      0|      total_.template Get<TypeToUse>() += array_size;
  396|      0|    }
  397|     98|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayISE_EEvi:
  382|     17|  void PlanArray(int array_size) {
  383|       |    // We can't call PlanArray after FinalizePlanning has been called.
  384|     17|    ABSL_CHECK(!has_allocated());
  ------------------
  |  |   41|     17|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|     34|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     17|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|     34|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|     34|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 17, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     17|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 17]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|     34|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 17, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 17]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 17]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|     34|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|     34|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  385|     17|    if (std::is_trivially_destructible<U>::value) {
  ------------------
  |  Branch (385:9): [Folded, False: 17]
  ------------------
  386|       |      // Trivial types are aligned to 8 bytes.
  387|      0|      static_assert(alignof(U) <= 8, "");
  388|      0|      total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U));
  389|     17|    } else {
  390|       |      // Since we can't use `if constexpr`, just make the expression compile
  391|       |      // when this path is not taken.
  392|     17|      using TypeToUse =
  393|     17|          typename std::conditional<std::is_trivially_destructible<U>::value,
  394|     17|                                    char, U>::type;
  395|     17|      total_.template Get<TypeToUse>() += array_size;
  396|     17|    }
  397|     17|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISF_EERiv:
  238|     59|  ValueT<K>& Get() {
  239|     59|    return static_cast<Base<K>&>(payload_).value;
  240|     59|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE14PlanFieldNamesERKS9_PSN_:
  429|    235|                      const std::string* opt_json_name) {
  430|    235|    ABSL_CHECK(!has_allocated());
  ------------------
  |  |   41|    235|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|    470|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|    235|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    470|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|    470|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 235, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|    235|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 235]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|    470|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 235, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 235]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 235]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|    470|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|    470|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  431|       |
  432|       |    // Fast path for snake_case names, which follow the style guide.
  433|    235|    if (opt_json_name == nullptr) {
  ------------------
  |  Branch (433:9): [True: 235, False: 0]
  ------------------
  434|    235|      switch (GetFieldNameCase(name)) {
  435|    110|        case FieldNameCase::kAllLower:
  ------------------
  |  Branch (435:9): [True: 110, False: 125]
  ------------------
  436|       |          // Case 1: they are all the same.
  437|    110|          return PlanArray<std::string>(2);
  438|    125|        case FieldNameCase::kSnakeCase:
  ------------------
  |  Branch (438:9): [True: 125, False: 110]
  ------------------
  439|       |          // Case 2: name==lower, camel==json
  440|    125|          return PlanArray<std::string>(3);
  441|      0|        default:
  ------------------
  |  Branch (441:9): [True: 0, False: 235]
  ------------------
  442|      0|          break;
  443|    235|      }
  444|    235|    }
  445|       |
  446|      0|    std::string lowercase_name = name;
  447|      0|    absl::AsciiStrToLower(&lowercase_name);
  448|       |
  449|      0|    std::string camelcase_name = ToCamelCase(name, /* lower_first = */ true);
  450|      0|    std::string json_name =
  451|      0|        opt_json_name != nullptr ? *opt_json_name : ToJsonName(name);
  ------------------
  |  Branch (451:9): [True: 0, False: 0]
  ------------------
  452|       |
  453|      0|    absl::string_view all_names[] = {name, lowercase_name, camelcase_name,
  454|      0|                                     json_name};
  455|      0|    std::sort(all_names, all_names + 4);
  456|      0|    int unique =
  457|      0|        static_cast<int>(std::unique(all_names, all_names + 4) - all_names);
  458|       |
  459|      0|    PlanArray<std::string>(unique + 1);
  460|      0|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE16GetFieldNameCaseEN4absl12lts_2024011611string_viewE:
  550|    470|  FieldNameCase GetFieldNameCase(const absl::string_view name) {
  551|    470|    if (!name.empty() && !IsLower(name[0])) return FieldNameCase::kOther;
  ------------------
  |  Branch (551:9): [True: 470, False: 0]
  |  Branch (551:26): [True: 0, False: 470]
  ------------------
  552|    470|    FieldNameCase best = FieldNameCase::kAllLower;
  553|  5.17k|    for (char c : name) {
  ------------------
  |  Branch (553:17): [True: 5.17k, False: 470]
  ------------------
  554|  5.17k|      if (IsLowerOrDigit(c)) {
  ------------------
  |  Branch (554:11): [True: 4.84k, False: 322]
  ------------------
  555|       |        // nothing to do
  556|  4.84k|      } else if (c == '_') {
  ------------------
  |  Branch (556:18): [True: 322, False: 0]
  ------------------
  557|    322|        best = FieldNameCase::kSnakeCase;
  558|    322|      } else {
  559|      0|        return FieldNameCase::kOther;
  560|      0|      }
  561|  5.17k|    }
  562|    470|    return best;
  563|    470|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE7IsLowerEc:
  545|  5.64k|  static bool IsLower(char c) { return 'a' <= c && c <= 'z'; }
  ------------------
  |  Branch (545:40): [True: 5.30k, False: 334]
  |  Branch (545:52): [True: 5.30k, False: 0]
  ------------------
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE14IsLowerOrDigitEc:
  547|  5.17k|  static bool IsLowerOrDigit(char c) { return IsLower(c) || IsDigit(c); }
  ------------------
  |  Branch (547:47): [True: 4.83k, False: 334]
  |  Branch (547:61): [True: 12, False: 322]
  ------------------
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE7IsDigitEc:
  546|    334|  static bool IsDigit(char c) { return '0' <= c && c <= '9'; }
  ------------------
  |  Branch (546:40): [True: 334, False: 0]
  |  Branch (546:52): [True: 12, False: 322]
  ------------------
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayIiEEvi:
  382|      8|  void PlanArray(int array_size) {
  383|       |    // We can't call PlanArray after FinalizePlanning has been called.
  384|      8|    ABSL_CHECK(!has_allocated());
  ------------------
  |  |   41|      8|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|     16|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      8|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|     16|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|     16|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 8, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      8|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 8]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|     16|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 8, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 8]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 8]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|     16|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|     16|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  385|      8|    if (std::is_trivially_destructible<U>::value) {
  ------------------
  |  Branch (385:9): [True: 8, Folded]
  ------------------
  386|       |      // Trivial types are aligned to 8 bytes.
  387|      8|      static_assert(alignof(U) <= 8, "");
  388|      8|      total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U));
  389|      8|    } else {
  390|       |      // Since we can't use `if constexpr`, just make the expression compile
  391|       |      // when this path is not taken.
  392|      0|      using TypeToUse =
  393|      0|          typename std::conditional<std::is_trivially_destructible<U>::value,
  394|      0|                                    char, U>::type;
  395|      0|      total_.template Get<TypeToUse>() += array_size;
  396|      0|    }
  397|      8|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayIPKNS0_14FileDescriptorEEEvi:
  382|      4|  void PlanArray(int array_size) {
  383|       |    // We can't call PlanArray after FinalizePlanning has been called.
  384|      4|    ABSL_CHECK(!has_allocated());
  ------------------
  |  |   41|      4|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|      8|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      4|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      8|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      8|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      4|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      8|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 4]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|      8|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|      8|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  385|      4|    if (std::is_trivially_destructible<U>::value) {
  ------------------
  |  Branch (385:9): [True: 4, Folded]
  ------------------
  386|       |      // Trivial types are aligned to 8 bytes.
  387|      4|      static_assert(alignof(U) <= 8, "");
  388|      4|      total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U));
  389|      4|    } else {
  390|       |      // Since we can't use `if constexpr`, just make the expression compile
  391|       |      // when this path is not taken.
  392|      0|      using TypeToUse =
  393|      0|          typename std::conditional<std::is_trivially_destructible<U>::value,
  394|      0|                                    char, U>::type;
  395|      0|      total_.template Get<TypeToUse>() += array_size;
  396|      0|    }
  397|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_124GetCppFeatureSetDefaultsEv:
 1105|      4|const FeatureSetDefaults& GetCppFeatureSetDefaults() {
 1106|      4|  static const FeatureSetDefaults* default_spec =
 1107|      4|      internal::OnShutdownDelete([] {
 1108|      4|        auto* defaults = new FeatureSetDefaults();
 1109|      4|        internal::ParseNoReflection(
 1110|      4|            absl::string_view{
 1111|      4|                PROTOBUF_INTERNAL_CPP_EDITION_DEFAULTS,
 1112|      4|                sizeof(PROTOBUF_INTERNAL_CPP_EDITION_DEFAULTS) - 1},
 1113|      4|            *defaults);
 1114|      4|        return defaults;
 1115|      4|      }());
 1116|      4|  return *default_spec;
 1117|      4|}
descriptor.cc:_ZZN6google8protobuf12_GLOBAL__N_124GetCppFeatureSetDefaultsEvENK3$_0clEv:
 1107|      1|      internal::OnShutdownDelete([] {
 1108|      1|        auto* defaults = new FeatureSetDefaults();
 1109|      1|        internal::ParseNoReflection(
 1110|      1|            absl::string_view{
 1111|      1|                PROTOBUF_INTERNAL_CPP_EDITION_DEFAULTS,
  ------------------
  |  |    8|      1|#define PROTOBUF_INTERNAL_CPP_EDITION_DEFAULTS "\n\037\030\204\007\"\003\302>\000*\025\010\001\020\002\030\002 \003(\0010\002\302>\006\010\001\020\003\030\000\n\037\030\347\007\"\003\302>\000*\025\010\002\020\001\030\001 \002(\0010\001\302>\006\010\000\020\003\030\000\n\037\030\350\007\"\023\010\001\020\001\030\001 \002(\0010\001\302>\004\010\000\020\003*\005\302>\002\030\000\n\037\030\351\007\"\025\010\001\020\001\030\001 \002(\0010\001\302>\006\010\000\020\001\030\001*\003\302>\000 \346\007(\351\007"
  ------------------
 1112|      1|                sizeof(PROTOBUF_INTERNAL_CPP_EDITION_DEFAULTS) - 1},
  ------------------
  |  |    8|      1|#define PROTOBUF_INTERNAL_CPP_EDITION_DEFAULTS "\n\037\030\204\007\"\003\302>\000*\025\010\001\020\002\030\002 \003(\0010\002\302>\006\010\001\020\003\030\000\n\037\030\347\007\"\003\302>\000*\025\010\002\020\001\030\001 \002(\0010\001\302>\006\010\000\020\003\030\000\n\037\030\350\007\"\023\010\001\020\001\030\001 \002(\0010\001\302>\004\010\000\020\003*\005\302>\002\030\000\n\037\030\351\007\"\025\010\001\020\001\030\001 \002(\0010\001\302>\006\010\000\020\001\030\001*\003\302>\000 \346\007(\351\007"
  ------------------
 1113|      1|            *defaults);
 1114|      1|        return defaults;
 1115|      1|      }());
_ZN6google8protobuf17DescriptorBuilder14BuildExtensionERKNS0_20FieldDescriptorProtoEPNS0_10DescriptorEPNS0_15FieldDescriptorERNS0_8internal13FlatAllocatorE:
 4423|      1|                      FieldDescriptor* result, internal::FlatAllocator& alloc) {
 4424|      1|    BuildFieldOrExtension(proto, parent, result, true, alloc);
 4425|      1|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_115DisableTrackingEv:
  583|     28|auto DisableTracking() {
  584|     28|  bool old_value = is_tracking_enabled();
  585|     28|  is_tracking_enabled() = false;
  586|     28|  return absl::MakeCleanup([=] { is_tracking_enabled() = old_value; });
  587|     28|}
_ZN6google8protobuf17DescriptorBuilder10BuildFieldERKNS0_20FieldDescriptorProtoEPNS0_10DescriptorEPNS0_15FieldDescriptorERNS0_8internal13FlatAllocatorE:
 4419|    234|                  FieldDescriptor* result, internal::FlatAllocator& alloc) {
 4420|    234|    BuildFieldOrExtension(proto, parent, result, false, alloc);
 4421|    234|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_122IncrementWhenDestroyedD2Ev:
 6295|     47|  ~IncrementWhenDestroyed() { ++to_increment; }
_ZN6google8protobuf6SymbolC2EPNS0_15FieldDescriptorE:
  619|    235|  explicit Symbol(TYPE* value) : ptr_(value) {                                 \
  620|    235|    value->symbol_type_ = TYPE_CONSTANT;                                       \
  621|    235|  }                                                                            \
_ZN6google8protobuf6SymbolC2EPNS0_15OneofDescriptorE:
  619|      2|  explicit Symbol(TYPE* value) : ptr_(value) {                                 \
  620|      2|    value->symbol_type_ = TYPE_CONSTANT;                                       \
  621|      2|  }                                                                            \
_ZN6google8protobuf6Symbol9EnumValueEPNS0_19EnumValueDescriptorEi:
  646|    380|  static Symbol EnumValue(EnumValueDescriptor* value, int n) {
  647|    380|    Symbol s;
  648|    380|    internal::SymbolBase* ptr;
  649|    380|    if (n == 0) {
  ------------------
  |  Branch (649:9): [True: 190, False: 190]
  ------------------
  650|    190|      ptr = static_cast<internal::SymbolBaseN<0>*>(value);
  651|    190|      ptr->symbol_type_ = ENUM_VALUE;
  652|    190|    } else {
  653|    190|      ptr = static_cast<internal::SymbolBaseN<1>*>(value);
  654|    190|      ptr->symbol_type_ = ENUM_VALUE_OTHER_PARENT;
  655|    190|    }
  656|    380|    s.ptr_ = ptr;
  657|    380|    return s;
  658|    380|  }
_ZNK6google8protobuf6Symbol4typeEv:
  672|  9.91k|  Type type() const { return static_cast<Type>(ptr_->symbol_type_); }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_111ToCamelCaseEN4absl12lts_2024011611string_viewEb:
   97|    125|std::string ToCamelCase(const absl::string_view input, bool lower_first) {
   98|    125|  bool capitalize_next = !lower_first;
   99|    125|  std::string result;
  100|    125|  result.reserve(input.size());
  101|       |
  102|  1.88k|  for (char character : input) {
  ------------------
  |  Branch (102:23): [True: 1.88k, False: 125]
  ------------------
  103|  1.88k|    if (character == '_') {
  ------------------
  |  Branch (103:9): [True: 161, False: 1.71k]
  ------------------
  104|    161|      capitalize_next = true;
  105|  1.71k|    } else if (capitalize_next) {
  ------------------
  |  Branch (105:16): [True: 161, False: 1.55k]
  ------------------
  106|    161|      result.push_back(absl::ascii_toupper(character));
  107|    161|      capitalize_next = false;
  108|  1.55k|    } else {
  109|  1.55k|      result.push_back(character);
  110|  1.55k|    }
  111|  1.88k|  }
  112|       |
  113|       |  // Lower-case the first letter.
  114|    125|  if (lower_first && !result.empty()) {
  ------------------
  |  Branch (114:7): [True: 125, False: 0]
  |  Branch (114:22): [True: 125, False: 0]
  ------------------
  115|    125|    result[0] = absl::ascii_tolower(result[0]);
  116|    125|  }
  117|       |
  118|    125|  return result;
  119|    125|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_119is_tracking_enabledEv:
  578|     84|bool& is_tracking_enabled() {
  579|     84|  static PROTOBUF_THREAD_LOCAL bool value = true;
  580|     84|  return value;
  581|     84|}
descriptor.cc:_ZZN6google8protobuf12_GLOBAL__N_115DisableTrackingEvENK3$_0clEv:
  586|     28|  return absl::MakeCleanup([=] { is_tracking_enabled() = old_value; });
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_115ExpressionEaterC2IbEEOT_:
  157|    112|  ExpressionEater(T&&) {}  // NOLINT
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE5BeginIS9_EEPT_v:
  324|      4|  U* Begin() const {
  325|      4|    int begin = BeginOffset<U>(), end = EndOffset<U>();
  326|      4|    if (begin == end) return nullptr;
  ------------------
  |  Branch (326:9): [True: 0, False: 4]
  ------------------
  327|      4|    return reinterpret_cast<U*>(data() + begin);
  328|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE11BeginOffsetIS9_EEiv:
  302|      8|  int BeginOffset() const {
  303|      8|    constexpr int type_index = FindTypeIndex<U, T...>();
  304|       |    // Avoid a negative value here to keep it compiling when type_index == 0
  305|      8|    constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1;
  ------------------
  |  Branch (305:37): [Folded, False: 8]
  ------------------
  306|      8|    using PrevType =
  307|      8|        typename std::tuple_element<prev_type_index, std::tuple<T...>>::type;
  308|       |    // Ensure the types are properly aligned.
  309|      8|    static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), "");
  310|      8|    return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation))
  ------------------
  |  Branch (310:12): [Folded, False: 8]
  ------------------
  311|      8|                           : ends_.template Get<PrevType>();
  312|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetIcEERKiv:
  243|     24|  const ValueT<K>& Get() const {
  244|     24|    return static_cast<const Base<K>&>(payload_).value;
  245|     24|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9EndOffsetIS9_EEiv:
  315|      8|  int EndOffset() const {
  316|      8|    return ends_.template Get<U>();
  317|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISA_EERKiv:
  243|     28|  const ValueT<K>& Get() const {
  244|     28|    return static_cast<const Base<K>&>(payload_).value;
  245|     28|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE4dataEv:
  357|    120|  char* data() const {
  358|    120|    return const_cast<char*>(reinterpret_cast<const char*>(this));
  359|    120|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE5BeginISA_EEPT_v:
  324|      4|  U* Begin() const {
  325|      4|    int begin = BeginOffset<U>(), end = EndOffset<U>();
  326|      4|    if (begin == end) return nullptr;
  ------------------
  |  Branch (326:9): [True: 4, False: 0]
  ------------------
  327|      0|    return reinterpret_cast<U*>(data() + begin);
  328|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE11BeginOffsetISA_EEiv:
  302|      8|  int BeginOffset() const {
  303|      8|    constexpr int type_index = FindTypeIndex<U, T...>();
  304|       |    // Avoid a negative value here to keep it compiling when type_index == 0
  305|      8|    constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1;
  ------------------
  |  Branch (305:37): [Folded, False: 8]
  ------------------
  306|      8|    using PrevType =
  307|      8|        typename std::tuple_element<prev_type_index, std::tuple<T...>>::type;
  308|       |    // Ensure the types are properly aligned.
  309|      8|    static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), "");
  310|      8|    return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation))
  ------------------
  |  Branch (310:12): [Folded, False: 8]
  ------------------
  311|      8|                           : ends_.template Get<PrevType>();
  312|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9EndOffsetISA_EEiv:
  315|      8|  int EndOffset() const {
  316|      8|    return ends_.template Get<U>();
  317|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISB_EERKiv:
  243|     28|  const ValueT<K>& Get() const {
  244|     28|    return static_cast<const Base<K>&>(payload_).value;
  245|     28|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE5BeginISB_EEPT_v:
  324|      4|  U* Begin() const {
  325|      4|    int begin = BeginOffset<U>(), end = EndOffset<U>();
  326|      4|    if (begin == end) return nullptr;
  ------------------
  |  Branch (326:9): [True: 0, False: 4]
  ------------------
  327|      4|    return reinterpret_cast<U*>(data() + begin);
  328|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE11BeginOffsetISB_EEiv:
  302|      8|  int BeginOffset() const {
  303|      8|    constexpr int type_index = FindTypeIndex<U, T...>();
  304|       |    // Avoid a negative value here to keep it compiling when type_index == 0
  305|      8|    constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1;
  ------------------
  |  Branch (305:37): [Folded, False: 8]
  ------------------
  306|      8|    using PrevType =
  307|      8|        typename std::tuple_element<prev_type_index, std::tuple<T...>>::type;
  308|       |    // Ensure the types are properly aligned.
  309|      8|    static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), "");
  310|      8|    return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation))
  ------------------
  |  Branch (310:12): [Folded, False: 8]
  ------------------
  311|      8|                           : ends_.template Get<PrevType>();
  312|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9EndOffsetISB_EEiv:
  315|      8|  int EndOffset() const {
  316|      8|    return ends_.template Get<U>();
  317|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISC_EERKiv:
  243|     28|  const ValueT<K>& Get() const {
  244|     28|    return static_cast<const Base<K>&>(payload_).value;
  245|     28|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE5BeginISC_EEPT_v:
  324|      4|  U* Begin() const {
  325|      4|    int begin = BeginOffset<U>(), end = EndOffset<U>();
  326|      4|    if (begin == end) return nullptr;
  ------------------
  |  Branch (326:9): [True: 4, False: 0]
  ------------------
  327|      0|    return reinterpret_cast<U*>(data() + begin);
  328|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE11BeginOffsetISC_EEiv:
  302|      8|  int BeginOffset() const {
  303|      8|    constexpr int type_index = FindTypeIndex<U, T...>();
  304|       |    // Avoid a negative value here to keep it compiling when type_index == 0
  305|      8|    constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1;
  ------------------
  |  Branch (305:37): [Folded, False: 8]
  ------------------
  306|      8|    using PrevType =
  307|      8|        typename std::tuple_element<prev_type_index, std::tuple<T...>>::type;
  308|       |    // Ensure the types are properly aligned.
  309|      8|    static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), "");
  310|      8|    return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation))
  ------------------
  |  Branch (310:12): [Folded, False: 8]
  ------------------
  311|      8|                           : ends_.template Get<PrevType>();
  312|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9EndOffsetISC_EEiv:
  315|      8|  int EndOffset() const {
  316|      8|    return ends_.template Get<U>();
  317|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISD_EERKiv:
  243|     28|  const ValueT<K>& Get() const {
  244|     28|    return static_cast<const Base<K>&>(payload_).value;
  245|     28|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE5BeginISD_EEPT_v:
  324|      4|  U* Begin() const {
  325|      4|    int begin = BeginOffset<U>(), end = EndOffset<U>();
  326|      4|    if (begin == end) return nullptr;
  ------------------
  |  Branch (326:9): [True: 4, False: 0]
  ------------------
  327|      0|    return reinterpret_cast<U*>(data() + begin);
  328|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE11BeginOffsetISD_EEiv:
  302|      8|  int BeginOffset() const {
  303|      8|    constexpr int type_index = FindTypeIndex<U, T...>();
  304|       |    // Avoid a negative value here to keep it compiling when type_index == 0
  305|      8|    constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1;
  ------------------
  |  Branch (305:37): [Folded, False: 8]
  ------------------
  306|      8|    using PrevType =
  307|      8|        typename std::tuple_element<prev_type_index, std::tuple<T...>>::type;
  308|       |    // Ensure the types are properly aligned.
  309|      8|    static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), "");
  310|      8|    return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation))
  ------------------
  |  Branch (310:12): [Folded, False: 8]
  ------------------
  311|      8|                           : ends_.template Get<PrevType>();
  312|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9EndOffsetISD_EEiv:
  315|      8|  int EndOffset() const {
  316|      8|    return ends_.template Get<U>();
  317|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISE_EERKiv:
  243|     28|  const ValueT<K>& Get() const {
  244|     28|    return static_cast<const Base<K>&>(payload_).value;
  245|     28|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE5BeginISE_EEPT_v:
  324|      4|  U* Begin() const {
  325|      4|    int begin = BeginOffset<U>(), end = EndOffset<U>();
  326|      4|    if (begin == end) return nullptr;
  ------------------
  |  Branch (326:9): [True: 2, False: 2]
  ------------------
  327|      2|    return reinterpret_cast<U*>(data() + begin);
  328|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE11BeginOffsetISE_EEiv:
  302|      8|  int BeginOffset() const {
  303|      8|    constexpr int type_index = FindTypeIndex<U, T...>();
  304|       |    // Avoid a negative value here to keep it compiling when type_index == 0
  305|      8|    constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1;
  ------------------
  |  Branch (305:37): [Folded, False: 8]
  ------------------
  306|      8|    using PrevType =
  307|      8|        typename std::tuple_element<prev_type_index, std::tuple<T...>>::type;
  308|       |    // Ensure the types are properly aligned.
  309|      8|    static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), "");
  310|      8|    return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation))
  ------------------
  |  Branch (310:12): [Folded, False: 8]
  ------------------
  311|      8|                           : ends_.template Get<PrevType>();
  312|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9EndOffsetISE_EEiv:
  315|      8|  int EndOffset() const {
  316|      8|    return ends_.template Get<U>();
  317|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISF_EERKiv:
  243|     28|  const ValueT<K>& Get() const {
  244|     28|    return static_cast<const Base<K>&>(payload_).value;
  245|     28|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE5BeginISF_EEPT_v:
  324|      4|  U* Begin() const {
  325|      4|    int begin = BeginOffset<U>(), end = EndOffset<U>();
  326|      4|    if (begin == end) return nullptr;
  ------------------
  |  Branch (326:9): [True: 4, False: 0]
  ------------------
  327|      0|    return reinterpret_cast<U*>(data() + begin);
  328|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE11BeginOffsetISF_EEiv:
  302|      8|  int BeginOffset() const {
  303|      8|    constexpr int type_index = FindTypeIndex<U, T...>();
  304|       |    // Avoid a negative value here to keep it compiling when type_index == 0
  305|      8|    constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1;
  ------------------
  |  Branch (305:37): [Folded, False: 8]
  ------------------
  306|      8|    using PrevType =
  307|      8|        typename std::tuple_element<prev_type_index, std::tuple<T...>>::type;
  308|       |    // Ensure the types are properly aligned.
  309|      8|    static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), "");
  310|      8|    return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation))
  ------------------
  |  Branch (310:12): [Folded, False: 8]
  ------------------
  311|      8|                           : ends_.template Get<PrevType>();
  312|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9EndOffsetISF_EEiv:
  315|      8|  int EndOffset() const {
  316|      8|    return ends_.template Get<U>();
  317|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISG_EERKiv:
  243|     28|  const ValueT<K>& Get() const {
  244|     28|    return static_cast<const Base<K>&>(payload_).value;
  245|     28|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE5BeginISG_EEPT_v:
  324|      4|  U* Begin() const {
  325|      4|    int begin = BeginOffset<U>(), end = EndOffset<U>();
  326|      4|    if (begin == end) return nullptr;
  ------------------
  |  Branch (326:9): [True: 4, False: 0]
  ------------------
  327|      0|    return reinterpret_cast<U*>(data() + begin);
  328|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE11BeginOffsetISG_EEiv:
  302|      8|  int BeginOffset() const {
  303|      8|    constexpr int type_index = FindTypeIndex<U, T...>();
  304|       |    // Avoid a negative value here to keep it compiling when type_index == 0
  305|      8|    constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1;
  ------------------
  |  Branch (305:37): [Folded, False: 8]
  ------------------
  306|      8|    using PrevType =
  307|      8|        typename std::tuple_element<prev_type_index, std::tuple<T...>>::type;
  308|       |    // Ensure the types are properly aligned.
  309|      8|    static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), "");
  310|      8|    return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation))
  ------------------
  |  Branch (310:12): [Folded, False: 8]
  ------------------
  311|      8|                           : ends_.template Get<PrevType>();
  312|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9EndOffsetISG_EEiv:
  315|      8|  int EndOffset() const {
  316|      8|    return ends_.template Get<U>();
  317|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISH_EERKiv:
  243|     28|  const ValueT<K>& Get() const {
  244|     28|    return static_cast<const Base<K>&>(payload_).value;
  245|     28|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE5BeginISH_EEPT_v:
  324|      4|  U* Begin() const {
  325|      4|    int begin = BeginOffset<U>(), end = EndOffset<U>();
  326|      4|    if (begin == end) return nullptr;
  ------------------
  |  Branch (326:9): [True: 4, False: 0]
  ------------------
  327|      0|    return reinterpret_cast<U*>(data() + begin);
  328|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE11BeginOffsetISH_EEiv:
  302|      8|  int BeginOffset() const {
  303|      8|    constexpr int type_index = FindTypeIndex<U, T...>();
  304|       |    // Avoid a negative value here to keep it compiling when type_index == 0
  305|      8|    constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1;
  ------------------
  |  Branch (305:37): [Folded, False: 8]
  ------------------
  306|      8|    using PrevType =
  307|      8|        typename std::tuple_element<prev_type_index, std::tuple<T...>>::type;
  308|       |    // Ensure the types are properly aligned.
  309|      8|    static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), "");
  310|      8|    return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation))
  ------------------
  |  Branch (310:12): [Folded, False: 8]
  ------------------
  311|      8|                           : ends_.template Get<PrevType>();
  312|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9EndOffsetISH_EEiv:
  315|      8|  int EndOffset() const {
  316|      8|    return ends_.template Get<U>();
  317|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISI_EERKiv:
  243|     28|  const ValueT<K>& Get() const {
  244|     28|    return static_cast<const Base<K>&>(payload_).value;
  245|     28|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE5BeginISI_EEPT_v:
  324|      4|  U* Begin() const {
  325|      4|    int begin = BeginOffset<U>(), end = EndOffset<U>();
  326|      4|    if (begin == end) return nullptr;
  ------------------
  |  Branch (326:9): [True: 4, False: 0]
  ------------------
  327|      0|    return reinterpret_cast<U*>(data() + begin);
  328|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE11BeginOffsetISI_EEiv:
  302|      8|  int BeginOffset() const {
  303|      8|    constexpr int type_index = FindTypeIndex<U, T...>();
  304|       |    // Avoid a negative value here to keep it compiling when type_index == 0
  305|      8|    constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1;
  ------------------
  |  Branch (305:37): [Folded, False: 8]
  ------------------
  306|      8|    using PrevType =
  307|      8|        typename std::tuple_element<prev_type_index, std::tuple<T...>>::type;
  308|       |    // Ensure the types are properly aligned.
  309|      8|    static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), "");
  310|      8|    return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation))
  ------------------
  |  Branch (310:12): [Folded, False: 8]
  ------------------
  311|      8|                           : ends_.template Get<PrevType>();
  312|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9EndOffsetISI_EEiv:
  315|      8|  int EndOffset() const {
  316|      8|    return ends_.template Get<U>();
  317|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISJ_EERKiv:
  243|     28|  const ValueT<K>& Get() const {
  244|     28|    return static_cast<const Base<K>&>(payload_).value;
  245|     28|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE5BeginISJ_EEPT_v:
  324|      4|  U* Begin() const {
  325|      4|    int begin = BeginOffset<U>(), end = EndOffset<U>();
  326|      4|    if (begin == end) return nullptr;
  ------------------
  |  Branch (326:9): [True: 4, False: 0]
  ------------------
  327|      0|    return reinterpret_cast<U*>(data() + begin);
  328|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE11BeginOffsetISJ_EEiv:
  302|      8|  int BeginOffset() const {
  303|      8|    constexpr int type_index = FindTypeIndex<U, T...>();
  304|       |    // Avoid a negative value here to keep it compiling when type_index == 0
  305|      8|    constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1;
  ------------------
  |  Branch (305:37): [Folded, False: 8]
  ------------------
  306|      8|    using PrevType =
  307|      8|        typename std::tuple_element<prev_type_index, std::tuple<T...>>::type;
  308|       |    // Ensure the types are properly aligned.
  309|      8|    static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), "");
  310|      8|    return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation))
  ------------------
  |  Branch (310:12): [Folded, False: 8]
  ------------------
  311|      8|                           : ends_.template Get<PrevType>();
  312|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9EndOffsetISJ_EEiv:
  315|      8|  int EndOffset() const {
  316|      8|    return ends_.template Get<U>();
  317|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISK_EERKiv:
  243|     28|  const ValueT<K>& Get() const {
  244|     28|    return static_cast<const Base<K>&>(payload_).value;
  245|     28|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE5BeginISK_EEPT_v:
  324|      4|  U* Begin() const {
  325|      4|    int begin = BeginOffset<U>(), end = EndOffset<U>();
  326|      4|    if (begin == end) return nullptr;
  ------------------
  |  Branch (326:9): [True: 4, False: 0]
  ------------------
  327|      0|    return reinterpret_cast<U*>(data() + begin);
  328|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE11BeginOffsetISK_EEiv:
  302|      8|  int BeginOffset() const {
  303|      8|    constexpr int type_index = FindTypeIndex<U, T...>();
  304|       |    // Avoid a negative value here to keep it compiling when type_index == 0
  305|      8|    constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1;
  ------------------
  |  Branch (305:37): [Folded, False: 8]
  ------------------
  306|      8|    using PrevType =
  307|      8|        typename std::tuple_element<prev_type_index, std::tuple<T...>>::type;
  308|       |    // Ensure the types are properly aligned.
  309|      8|    static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), "");
  310|      8|    return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation))
  ------------------
  |  Branch (310:12): [Folded, False: 8]
  ------------------
  311|      8|                           : ends_.template Get<PrevType>();
  312|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9EndOffsetISK_EEiv:
  315|      8|  int EndOffset() const {
  316|      8|    return ends_.template Get<U>();
  317|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISL_EERKiv:
  243|     28|  const ValueT<K>& Get() const {
  244|     28|    return static_cast<const Base<K>&>(payload_).value;
  245|     28|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE5BeginISL_EEPT_v:
  324|      4|  U* Begin() const {
  325|      4|    int begin = BeginOffset<U>(), end = EndOffset<U>();
  326|      4|    if (begin == end) return nullptr;
  ------------------
  |  Branch (326:9): [True: 2, False: 2]
  ------------------
  327|      2|    return reinterpret_cast<U*>(data() + begin);
  328|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE11BeginOffsetISL_EEiv:
  302|      8|  int BeginOffset() const {
  303|      8|    constexpr int type_index = FindTypeIndex<U, T...>();
  304|       |    // Avoid a negative value here to keep it compiling when type_index == 0
  305|      8|    constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1;
  ------------------
  |  Branch (305:37): [Folded, False: 8]
  ------------------
  306|      8|    using PrevType =
  307|      8|        typename std::tuple_element<prev_type_index, std::tuple<T...>>::type;
  308|       |    // Ensure the types are properly aligned.
  309|      8|    static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), "");
  310|      8|    return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation))
  ------------------
  |  Branch (310:12): [Folded, False: 8]
  ------------------
  311|      8|                           : ends_.template Get<PrevType>();
  312|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9EndOffsetISL_EEiv:
  315|      8|  int EndOffset() const {
  316|      8|    return ends_.template Get<U>();
  317|      8|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISM_EERKiv:
  243|     20|  const ValueT<K>& Get() const {
  244|     20|    return static_cast<const Base<K>&>(payload_).value;
  245|     20|  }
_ZN6google8protobuf14DescriptorPool6Tables10CheckPointC2EPKS2_:
 1588|      4|              static_cast<int>(tables->flat_allocs_.size())),
 1589|       |          misc_allocations_before_checkpoint(
 1590|      4|              static_cast<int>(tables->misc_allocs_.size())),
 1591|       |          pending_symbols_before_checkpoint(
 1592|      4|              tables->symbols_after_checkpoint_.size()),
 1593|       |          pending_files_before_checkpoint(
 1594|      4|              tables->files_after_checkpoint_.size()),
 1595|       |          pending_extensions_before_checkpoint(
 1596|      4|              tables->extensions_after_checkpoint_.size()) {}
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_118SymbolByFullNameEqclINS0_6SymbolES4_EEbRKT_RKT0_:
  958|     44|  bool operator()(const T& a, const U& b) const {
  959|     44|    return a.full_name() == b.full_name();
  960|     44|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_120SymbolByFullNameHashclINS0_6SymbolEEEmRKT_:
  950|  1.38k|  size_t operator()(const T& s) const {
  951|  1.38k|    return absl::HashOf(s.full_name());
  952|  1.38k|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_119DescriptorsByNameEqINS0_14FileDescriptorEEclEPKS3_S6_:
 1014|      1|  bool operator()(const DescriptorT* lhs, const DescriptorT* rhs) const {
 1015|      1|    return lhs == rhs || lhs->name() == rhs->name();
  ------------------
  |  Branch (1015:12): [True: 0, False: 1]
  |  Branch (1015:26): [True: 0, False: 1]
  ------------------
 1016|      1|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_121DescriptorsByNameHashINS0_14FileDescriptorEEclEPKS3_:
  996|      4|  size_t operator()(const DescriptorT* file) const {
  997|      4|    return absl::HashOf(file->name());
  998|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayINS0_19EnumValueDescriptorEEEvi:
  382|     24|  void PlanArray(int array_size) {
  383|       |    // We can't call PlanArray after FinalizePlanning has been called.
  384|     24|    ABSL_CHECK(!has_allocated());
  ------------------
  |  |   41|     24|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|     48|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     24|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|     48|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|     48|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 24, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     24|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 24]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|     48|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 24, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 24]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 24]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|     48|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|     48|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  385|     24|    if (std::is_trivially_destructible<U>::value) {
  ------------------
  |  Branch (385:9): [True: 24, Folded]
  ------------------
  386|       |      // Trivial types are aligned to 8 bytes.
  387|     24|      static_assert(alignof(U) <= 8, "");
  388|     24|      total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U));
  389|     24|    } else {
  390|       |      // Since we can't use `if constexpr`, just make the expression compile
  391|       |      // when this path is not taken.
  392|      0|      using TypeToUse =
  393|      0|          typename std::conditional<std::is_trivially_destructible<U>::value,
  394|      0|                                    char, U>::type;
  395|      0|      total_.template Get<TypeToUse>() += array_size;
  396|      0|    }
  397|     24|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayIS9_EEvi:
  382|    487|  void PlanArray(int array_size) {
  383|       |    // We can't call PlanArray after FinalizePlanning has been called.
  384|    487|    ABSL_CHECK(!has_allocated());
  ------------------
  |  |   41|    487|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|    974|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|    487|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    974|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|    974|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 487, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|    487|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 487]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|    974|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 487, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 487]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 487]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|    974|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|    974|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  385|    487|    if (std::is_trivially_destructible<U>::value) {
  ------------------
  |  Branch (385:9): [Folded, False: 487]
  ------------------
  386|       |      // Trivial types are aligned to 8 bytes.
  387|      0|      static_assert(alignof(U) <= 8, "");
  388|      0|      total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U));
  389|    487|    } else {
  390|       |      // Since we can't use `if constexpr`, just make the expression compile
  391|       |      // when this path is not taken.
  392|    487|      using TypeToUse =
  393|    487|          typename std::conditional<std::is_trivially_destructible<U>::value,
  394|    487|                                    char, U>::type;
  395|    487|      total_.template Get<TypeToUse>() += array_size;
  396|    487|    }
  397|    487|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE16FinalizePlanningIPNS0_14DescriptorPool6TablesEEEvRT_:
  526|      4|  void FinalizePlanning(Alloc& alloc) {
  527|      4|    ABSL_CHECK(!has_allocated());
  ------------------
  |  |   41|      4|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|      8|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      4|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      8|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      8|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      4|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      8|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 4]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|      8|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|      8|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  528|       |
  529|      4|    pointers_ = alloc->CreateFlatAlloc(total_)->Pointers();
  530|       |
  531|      4|    ABSL_CHECK(has_allocated());
  ------------------
  |  |   41|      4|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|      8|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      4|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      8|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      8|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      4|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      8|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 4]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|      8|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|      8|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  532|      4|  }
descriptor.cc:_ZN6google8protobuf14DescriptorPool6Tables15CreateFlatAllocIJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEEEPNS0_12_GLOBAL__N_114FlatAllocationIJcSA_SB_SC_SD_SE_SF_SG_SH_SI_SJ_SK_SL_SM_EEERKNSN_7TypeMapINSN_4IntTEJDpT_EEE:
 2027|      4|    const TypeMap<IntT, T...>& sizes) {
 2028|      4|  auto ends = CalculateEnds(sizes);
 2029|      4|  using FlatAlloc = internal::FlatAllocator::Allocation;
 2030|       |
 2031|      4|  int last_end = ends.template Get<
 2032|      4|      typename std::tuple_element<sizeof...(T) - 1, std::tuple<T...>>::type>();
 2033|      4|  size_t total_size =
 2034|      4|      last_end + RoundUpTo<FlatAlloc::kMaxAlign>(sizeof(FlatAlloc));
 2035|      4|  char* data = static_cast<char*>(::operator new(total_size));
 2036|      4|  auto* res = ::new (data) FlatAlloc(ends);
 2037|      4|  flat_allocs_.emplace_back(res);
 2038|       |
 2039|      4|  return res;
 2040|      4|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_113CalculateEndsIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEEENS1_7TypeMapINS1_4IntTEJDpT_EEERKSQ_:
  365|      4|TypeMap<IntT, T...> CalculateEnds(const TypeMap<IntT, T...>& sizes) {
  366|      4|  int total = 0;
  367|      4|  TypeMap<IntT, T...> out;
  368|      4|  Fold({(out.template Get<T>() = total +=
  369|      4|         sizeof(T) * sizes.template Get<T>())...});
  370|      4|  return out;
  371|      4|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_115ExpressionEaterC2IRiEEOT_:
  157|    112|  ExpressionEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISD_EERiv:
  238|      8|  ValueT<K>& Get() {
  239|      8|    return static_cast<Base<K>&>(payload_).value;
  240|      8|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEEC2ERKNS1_7TypeMapINS1_4IntTEJcS9_SA_SB_SC_SD_SE_SF_SG_SH_SI_SJ_SK_SL_EEE:
  269|      4|  explicit FlatAllocation(const TypeMap<IntT, T...>& ends) : ends_(ends) {
  270|       |    // The arrays start just after FlatAllocation, so adjust the ends.
  271|      4|    Fold({(ends_.template Get<T>() +=
  272|      4|           RoundUpTo<kMaxAlign>(sizeof(FlatAllocation)))...});
  273|      4|    Fold({Init<T>()...});
  274|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE4InitIcEEbv:
  338|      4|  bool Init() {
  339|       |    // Skip for the `char` block. No need to zero initialize it.
  340|      4|    if (std::is_same<U, char>::value) return true;
  ------------------
  |  Branch (340:9): [True: 4, Folded]
  ------------------
  341|      0|    for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>();
  342|      0|         p != end; p += sizeof(U)) {
  ------------------
  |  Branch (342:10): [True: 0, False: 0]
  ------------------
  343|      0|      ::new (p) U{};
  344|      0|    }
  345|      0|    return true;
  346|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE4InitIS9_EEbv:
  338|      4|  bool Init() {
  339|       |    // Skip for the `char` block. No need to zero initialize it.
  340|      4|    if (std::is_same<U, char>::value) return true;
  ------------------
  |  Branch (340:9): [Folded, False: 4]
  ------------------
  341|      4|    for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>();
  342|  1.13k|         p != end; p += sizeof(U)) {
  ------------------
  |  Branch (342:10): [True: 1.13k, False: 4]
  ------------------
  343|  1.13k|      ::new (p) U{};
  344|  1.13k|    }
  345|      4|    return true;
  346|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE4InitISA_EEbv:
  338|      4|  bool Init() {
  339|       |    // Skip for the `char` block. No need to zero initialize it.
  340|      4|    if (std::is_same<U, char>::value) return true;
  ------------------
  |  Branch (340:9): [Folded, False: 4]
  ------------------
  341|      4|    for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>();
  342|      4|         p != end; p += sizeof(U)) {
  ------------------
  |  Branch (342:10): [True: 0, False: 4]
  ------------------
  343|      0|      ::new (p) U{};
  344|      0|    }
  345|      4|    return true;
  346|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE4InitISB_EEbv:
  338|      4|  bool Init() {
  339|       |    // Skip for the `char` block. No need to zero initialize it.
  340|      4|    if (std::is_same<U, char>::value) return true;
  ------------------
  |  Branch (340:9): [Folded, False: 4]
  ------------------
  341|      4|    for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>();
  342|      8|         p != end; p += sizeof(U)) {
  ------------------
  |  Branch (342:10): [True: 4, False: 4]
  ------------------
  343|      4|      ::new (p) U{};
  344|      4|    }
  345|      4|    return true;
  346|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE4InitISC_EEbv:
  338|      4|  bool Init() {
  339|       |    // Skip for the `char` block. No need to zero initialize it.
  340|      4|    if (std::is_same<U, char>::value) return true;
  ------------------
  |  Branch (340:9): [Folded, False: 4]
  ------------------
  341|      4|    for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>();
  342|      4|         p != end; p += sizeof(U)) {
  ------------------
  |  Branch (342:10): [True: 0, False: 4]
  ------------------
  343|      0|      ::new (p) U{};
  344|      0|    }
  345|      4|    return true;
  346|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE4InitISD_EEbv:
  338|      4|  bool Init() {
  339|       |    // Skip for the `char` block. No need to zero initialize it.
  340|      4|    if (std::is_same<U, char>::value) return true;
  ------------------
  |  Branch (340:9): [Folded, False: 4]
  ------------------
  341|      4|    for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>();
  342|      4|         p != end; p += sizeof(U)) {
  ------------------
  |  Branch (342:10): [True: 0, False: 4]
  ------------------
  343|      0|      ::new (p) U{};
  344|      0|    }
  345|      4|    return true;
  346|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE4InitISE_EEbv:
  338|      4|  bool Init() {
  339|       |    // Skip for the `char` block. No need to zero initialize it.
  340|      4|    if (std::is_same<U, char>::value) return true;
  ------------------
  |  Branch (340:9): [Folded, False: 4]
  ------------------
  341|      4|    for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>();
  342|     21|         p != end; p += sizeof(U)) {
  ------------------
  |  Branch (342:10): [True: 17, False: 4]
  ------------------
  343|     17|      ::new (p) U{};
  344|     17|    }
  345|      4|    return true;
  346|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE4InitISF_EEbv:
  338|      4|  bool Init() {
  339|       |    // Skip for the `char` block. No need to zero initialize it.
  340|      4|    if (std::is_same<U, char>::value) return true;
  ------------------
  |  Branch (340:9): [Folded, False: 4]
  ------------------
  341|      4|    for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>();
  342|      4|         p != end; p += sizeof(U)) {
  ------------------
  |  Branch (342:10): [True: 0, False: 4]
  ------------------
  343|      0|      ::new (p) U{};
  344|      0|    }
  345|      4|    return true;
  346|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE4InitISG_EEbv:
  338|      4|  bool Init() {
  339|       |    // Skip for the `char` block. No need to zero initialize it.
  340|      4|    if (std::is_same<U, char>::value) return true;
  ------------------
  |  Branch (340:9): [Folded, False: 4]
  ------------------
  341|      4|    for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>();
  342|      4|         p != end; p += sizeof(U)) {
  ------------------
  |  Branch (342:10): [True: 0, False: 4]
  ------------------
  343|      0|      ::new (p) U{};
  344|      0|    }
  345|      4|    return true;
  346|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE4InitISH_EEbv:
  338|      4|  bool Init() {
  339|       |    // Skip for the `char` block. No need to zero initialize it.
  340|      4|    if (std::is_same<U, char>::value) return true;
  ------------------
  |  Branch (340:9): [Folded, False: 4]
  ------------------
  341|      4|    for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>();
  342|      4|         p != end; p += sizeof(U)) {
  ------------------
  |  Branch (342:10): [True: 0, False: 4]
  ------------------
  343|      0|      ::new (p) U{};
  344|      0|    }
  345|      4|    return true;
  346|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE4InitISI_EEbv:
  338|      4|  bool Init() {
  339|       |    // Skip for the `char` block. No need to zero initialize it.
  340|      4|    if (std::is_same<U, char>::value) return true;
  ------------------
  |  Branch (340:9): [Folded, False: 4]
  ------------------
  341|      4|    for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>();
  342|      4|         p != end; p += sizeof(U)) {
  ------------------
  |  Branch (342:10): [True: 0, False: 4]
  ------------------
  343|      0|      ::new (p) U{};
  344|      0|    }
  345|      4|    return true;
  346|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE4InitISJ_EEbv:
  338|      4|  bool Init() {
  339|       |    // Skip for the `char` block. No need to zero initialize it.
  340|      4|    if (std::is_same<U, char>::value) return true;
  ------------------
  |  Branch (340:9): [Folded, False: 4]
  ------------------
  341|      4|    for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>();
  342|      4|         p != end; p += sizeof(U)) {
  ------------------
  |  Branch (342:10): [True: 0, False: 4]
  ------------------
  343|      0|      ::new (p) U{};
  344|      0|    }
  345|      4|    return true;
  346|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE4InitISK_EEbv:
  338|      4|  bool Init() {
  339|       |    // Skip for the `char` block. No need to zero initialize it.
  340|      4|    if (std::is_same<U, char>::value) return true;
  ------------------
  |  Branch (340:9): [Folded, False: 4]
  ------------------
  341|      4|    for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>();
  342|      4|         p != end; p += sizeof(U)) {
  ------------------
  |  Branch (342:10): [True: 0, False: 4]
  ------------------
  343|      0|      ::new (p) U{};
  344|      0|    }
  345|      4|    return true;
  346|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE4InitISL_EEbv:
  338|      4|  bool Init() {
  339|       |    // Skip for the `char` block. No need to zero initialize it.
  340|      4|    if (std::is_same<U, char>::value) return true;
  ------------------
  |  Branch (340:9): [Folded, False: 4]
  ------------------
  341|      4|    for (char *p = data() + BeginOffset<U>(), *end = data() + EndOffset<U>();
  342|      6|         p != end; p += sizeof(U)) {
  ------------------
  |  Branch (342:10): [True: 2, False: 4]
  ------------------
  343|      2|      ::new (p) U{};
  344|      2|    }
  345|      4|    return true;
  346|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE8PointersEv:
  285|      4|  TypeMap<PointerT, T...> Pointers() const {
  286|      4|    TypeMap<PointerT, T...> out;
  287|      4|    Fold({(out.template Get<T>() = Begin<T>())...});
  288|      4|    return out;
  289|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE5BeginIcEEPT_v:
  324|      4|  U* Begin() const {
  325|      4|    int begin = BeginOffset<U>(), end = EndOffset<U>();
  326|      4|    if (begin == end) return nullptr;
  ------------------
  |  Branch (326:9): [True: 0, False: 4]
  ------------------
  327|      4|    return reinterpret_cast<U*>(data() + begin);
  328|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE11BeginOffsetIcEEiv:
  302|      4|  int BeginOffset() const {
  303|      4|    constexpr int type_index = FindTypeIndex<U, T...>();
  304|       |    // Avoid a negative value here to keep it compiling when type_index == 0
  305|      4|    constexpr int prev_type_index = type_index == 0 ? 0 : type_index - 1;
  ------------------
  |  Branch (305:37): [True: 0, Folded]
  ------------------
  306|      4|    using PrevType =
  307|      4|        typename std::tuple_element<prev_type_index, std::tuple<T...>>::type;
  308|       |    // Ensure the types are properly aligned.
  309|      4|    static_assert(EffectiveAlignof<PrevType>() >= EffectiveAlignof<U>(), "");
  310|      4|    return type_index == 0 ? RoundUpTo<kMaxAlign>(sizeof(FlatAllocation))
  ------------------
  |  Branch (310:12): [True: 4, Folded]
  ------------------
  311|      4|                           : ends_.template Get<PrevType>();
  312|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9EndOffsetIcEEiv:
  315|      4|  int EndOffset() const {
  316|      4|    return ends_.template Get<U>();
  317|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_8PointerTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetIcEERPT_v:
  238|    484|  ValueT<K>& Get() {
  239|    484|    return static_cast<Base<K>&>(payload_).value;
  240|    484|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_115ExpressionEaterC2IRPcEEOT_:
  157|      4|  ExpressionEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_115ExpressionEaterC2IRPNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEEOT_:
  157|      4|  ExpressionEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_8PointerTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISB_EERPT_v:
  238|      4|  ValueT<K>& Get() {
  239|      4|    return static_cast<Base<K>&>(payload_).value;
  240|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_115ExpressionEaterC2IRPNS0_14SourceCodeInfoEEEOT_:
  157|      4|  ExpressionEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_8PointerTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISC_EERPT_v:
  238|      8|  ValueT<K>& Get() {
  239|      8|    return static_cast<Base<K>&>(payload_).value;
  240|      8|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_115ExpressionEaterC2IRPNS0_20FileDescriptorTablesEEEOT_:
  157|      4|  ExpressionEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_8PointerTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISD_EERPT_v:
  238|      4|  ValueT<K>& Get() {
  239|      4|    return static_cast<Base<K>&>(payload_).value;
  240|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_115ExpressionEaterC2IRPNS0_10FeatureSetEEEOT_:
  157|      4|  ExpressionEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_8PointerTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISE_EERPT_v:
  238|      4|  ValueT<K>& Get() {
  239|      4|    return static_cast<Base<K>&>(payload_).value;
  240|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_115ExpressionEaterC2IRPNS0_14MessageOptionsEEEOT_:
  157|      4|  ExpressionEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_8PointerTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISF_EERPT_v:
  238|     21|  ValueT<K>& Get() {
  239|     21|    return static_cast<Base<K>&>(payload_).value;
  240|     21|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_115ExpressionEaterC2IRPNS0_12FieldOptionsEEEOT_:
  157|      4|  ExpressionEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_8PointerTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISG_EERPT_v:
  238|      4|  ValueT<K>& Get() {
  239|      4|    return static_cast<Base<K>&>(payload_).value;
  240|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_115ExpressionEaterC2IRPNS0_11EnumOptionsEEEOT_:
  157|      4|  ExpressionEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_8PointerTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISH_EERPT_v:
  238|      4|  ValueT<K>& Get() {
  239|      4|    return static_cast<Base<K>&>(payload_).value;
  240|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_115ExpressionEaterC2IRPNS0_16EnumValueOptionsEEEOT_:
  157|      4|  ExpressionEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_8PointerTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISI_EERPT_v:
  238|      4|  ValueT<K>& Get() {
  239|      4|    return static_cast<Base<K>&>(payload_).value;
  240|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_115ExpressionEaterC2IRPNS0_21ExtensionRangeOptionsEEEOT_:
  157|      4|  ExpressionEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_8PointerTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISJ_EERPT_v:
  238|      4|  ValueT<K>& Get() {
  239|      4|    return static_cast<Base<K>&>(payload_).value;
  240|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_115ExpressionEaterC2IRPNS0_12OneofOptionsEEEOT_:
  157|      4|  ExpressionEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_8PointerTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISK_EERPT_v:
  238|      4|  ValueT<K>& Get() {
  239|      4|    return static_cast<Base<K>&>(payload_).value;
  240|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_115ExpressionEaterC2IRPNS0_14ServiceOptionsEEEOT_:
  157|      4|  ExpressionEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_8PointerTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISL_EERPT_v:
  238|      4|  ValueT<K>& Get() {
  239|      4|    return static_cast<Base<K>&>(payload_).value;
  240|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_115ExpressionEaterC2IRPNS0_13MethodOptionsEEEOT_:
  157|      4|  ExpressionEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_8PointerTEJcNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISM_EERPT_v:
  238|      6|  ValueT<K>& Get() {
  239|      6|    return static_cast<Base<K>&>(payload_).value;
  240|      6|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_115ExpressionEaterC2IRPNS0_11FileOptionsEEEOT_:
  157|      4|  ExpressionEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13AllocateArrayINS0_19EnumValueDescriptorEEEPT_i:
  400|     24|  U* AllocateArray(int array_size) {
  401|     24|    constexpr bool trivial = std::is_trivially_destructible<U>::value;
  402|     24|    using TypeToUse = typename std::conditional<trivial, char, U>::type;
  403|       |
  404|       |    // We can only allocate after FinalizePlanning has been called.
  405|     24|    ABSL_CHECK(has_allocated());
  ------------------
  |  |   41|     24|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|     48|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     24|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|     48|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|     48|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 24, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     24|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 24]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|     48|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 24, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 24]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 24]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|     48|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|     48|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  406|       |
  407|     24|    TypeToUse*& data = pointers_.template Get<TypeToUse>();
  408|     24|    int& used = used_.template Get<TypeToUse>();
  409|     24|    U* res = reinterpret_cast<U*>(data + used);
  410|     24|    used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size;
  ------------------
  |  Branch (410:13): [True: 24, Folded]
  ------------------
  411|     24|    ABSL_CHECK_LE(used, total_.template Get<TypeToUse>());
  ------------------
  |  |   54|     24|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   52|     24|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|     24|  while (                                                                      \
  |  |  |  |  |  |   62|     24|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 24]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|     24|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|     24|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|     24|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|     24|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|     24|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|     24|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  412|     24|    return res;
  413|     24|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_116ParentNumberHashclIPNS0_19EnumValueDescriptorEEEmRKT_:
 1045|     95|  size_t operator()(const T& t) const {
 1046|     95|    return absl::HashOf(ObjectToParentNumber(t));
 1047|     95|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114ParentNumberEqclIPKNS0_19EnumValueDescriptorEPS4_EEbRKT_RKT0_:
 1053|      3|  bool operator()(const T& a, const U& b) const {
 1054|      3|    return ObjectToParentNumber(a) == ObjectToParentNumber(b);
 1055|      3|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_116ParentNumberHashclIPKNS0_19EnumValueDescriptorEEEmRKT_:
 1045|    112|  size_t operator()(const T& t) const {
 1046|    112|    return absl::HashOf(ObjectToParentNumber(t));
 1047|    112|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_118SymbolByParentHashclINS0_6SymbolEEEmRKT_:
  975|  1.55k|  size_t operator()(const T& s) const {
  976|  1.55k|    return absl::HashOf(s.parent_name_key());
  977|  1.55k|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_116SymbolByParentEqclINS0_6SymbolES4_EEbRKT_RKT0_:
  983|     51|  bool operator()(const T& a, const U& b) const {
  984|     51|    return a.parent_name_key() == b.parent_name_key();
  985|     51|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_116ParentNumberHashclIPNS0_15FieldDescriptorEEEmRKT_:
 1045|    108|  size_t operator()(const T& t) const {
 1046|    108|    return absl::HashOf(ObjectToParentNumber(t));
 1047|    108|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_114ParentNumberEqclIPKNS0_15FieldDescriptorEPS4_EEbRKT_RKT0_:
 1053|      9|  bool operator()(const T& a, const U& b) const {
 1054|      9|    return ObjectToParentNumber(a) == ObjectToParentNumber(b);
 1055|      9|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_116ParentNumberHashclIPKNS0_15FieldDescriptorEEEmRKT_:
 1045|     98|  size_t operator()(const T& t) const {
 1046|     98|    return absl::HashOf(ObjectToParentNumber(t));
 1047|     98|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayINS0_14FileDescriptorEEEvi:
  382|      4|  void PlanArray(int array_size) {
  383|       |    // We can't call PlanArray after FinalizePlanning has been called.
  384|      4|    ABSL_CHECK(!has_allocated());
  ------------------
  |  |   41|      4|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|      8|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      4|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      8|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      8|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      4|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      8|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 4]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|      8|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|      8|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  385|      4|    if (std::is_trivially_destructible<U>::value) {
  ------------------
  |  Branch (385:9): [True: 4, Folded]
  ------------------
  386|       |      // Trivial types are aligned to 8 bytes.
  387|      4|      static_assert(alignof(U) <= 8, "");
  388|      4|      total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U));
  389|      4|    } else {
  390|       |      // Since we can't use `if constexpr`, just make the expression compile
  391|       |      // when this path is not taken.
  392|      0|      using TypeToUse =
  393|      0|          typename std::conditional<std::is_trivially_destructible<U>::value,
  394|      0|                                    char, U>::type;
  395|      0|      total_.template Get<TypeToUse>() += array_size;
  396|      0|    }
  397|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayINS0_14EnumDescriptorEEEvi:
  382|     51|  void PlanArray(int array_size) {
  383|       |    // We can't call PlanArray after FinalizePlanning has been called.
  384|     51|    ABSL_CHECK(!has_allocated());
  ------------------
  |  |   41|     51|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|    102|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     51|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    102|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|    102|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 51, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     51|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 51]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|    102|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 51, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 51]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 51]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|    102|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|    102|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  385|     51|    if (std::is_trivially_destructible<U>::value) {
  ------------------
  |  Branch (385:9): [True: 51, Folded]
  ------------------
  386|       |      // Trivial types are aligned to 8 bytes.
  387|     51|      static_assert(alignof(U) <= 8, "");
  388|     51|      total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U));
  389|     51|    } else {
  390|       |      // Since we can't use `if constexpr`, just make the expression compile
  391|       |      // when this path is not taken.
  392|      0|      using TypeToUse =
  393|      0|          typename std::conditional<std::is_trivially_destructible<U>::value,
  394|      0|                                    char, U>::type;
  395|      0|      total_.template Get<TypeToUse>() += array_size;
  396|      0|    }
  397|     51|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayINS0_10DescriptorEEEvi:
  382|     51|  void PlanArray(int array_size) {
  383|       |    // We can't call PlanArray after FinalizePlanning has been called.
  384|     51|    ABSL_CHECK(!has_allocated());
  ------------------
  |  |   41|     51|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|    102|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     51|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    102|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|    102|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 51, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     51|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 51]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|    102|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 51, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 51]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 51]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|    102|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|    102|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  385|     51|    if (std::is_trivially_destructible<U>::value) {
  ------------------
  |  Branch (385:9): [True: 51, Folded]
  ------------------
  386|       |      // Trivial types are aligned to 8 bytes.
  387|     51|      static_assert(alignof(U) <= 8, "");
  388|     51|      total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U));
  389|     51|    } else {
  390|       |      // Since we can't use `if constexpr`, just make the expression compile
  391|       |      // when this path is not taken.
  392|      0|      using TypeToUse =
  393|      0|          typename std::conditional<std::is_trivially_destructible<U>::value,
  394|      0|                                    char, U>::type;
  395|      0|      total_.template Get<TypeToUse>() += array_size;
  396|      0|    }
  397|     51|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE9PlanArrayINS0_10Descriptor14ExtensionRangeEEEvi:
  382|     47|  void PlanArray(int array_size) {
  383|       |    // We can't call PlanArray after FinalizePlanning has been called.
  384|     47|    ABSL_CHECK(!has_allocated());
  ------------------
  |  |   41|     47|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|     94|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     47|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|     94|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|     94|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 47, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     47|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 47]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|     94|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 47, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 47]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 47]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|     94|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|     94|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  385|     47|    if (std::is_trivially_destructible<U>::value) {
  ------------------
  |  Branch (385:9): [True: 47, Folded]
  ------------------
  386|       |      // Trivial types are aligned to 8 bytes.
  387|     47|      static_assert(alignof(U) <= 8, "");
  388|     47|      total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U));
  389|     47|    } else {
  390|       |      // Since we can't use `if constexpr`, just make the expression compile
  391|       |      // when this path is not taken.
  392|      0|      using TypeToUse =
  393|      0|          typename std::conditional<std::is_trivially_destructible<U>::value,
  394|      0|                                    char, U>::type;
  395|      0|      total_.template Get<TypeToUse>() += array_size;
  396|      0|    }
  397|     47|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13AllocateArrayINS0_14EnumDescriptorEEEPT_i:
  400|     51|  U* AllocateArray(int array_size) {
  401|     51|    constexpr bool trivial = std::is_trivially_destructible<U>::value;
  402|     51|    using TypeToUse = typename std::conditional<trivial, char, U>::type;
  403|       |
  404|       |    // We can only allocate after FinalizePlanning has been called.
  405|     51|    ABSL_CHECK(has_allocated());
  ------------------
  |  |   41|     51|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|    102|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     51|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    102|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|    102|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 51, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     51|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 51]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|    102|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 51, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 51]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 51]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|    102|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|    102|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  406|       |
  407|     51|    TypeToUse*& data = pointers_.template Get<TypeToUse>();
  408|     51|    int& used = used_.template Get<TypeToUse>();
  409|     51|    U* res = reinterpret_cast<U*>(data + used);
  410|     51|    used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size;
  ------------------
  |  Branch (410:13): [True: 51, Folded]
  ------------------
  411|     51|    ABSL_CHECK_LE(used, total_.template Get<TypeToUse>());
  ------------------
  |  |   54|     51|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   52|     51|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|     51|  while (                                                                      \
  |  |  |  |  |  |   62|     51|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 51]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|     51|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|     51|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|     51|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|     51|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|     51|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|     51|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  412|     51|    return res;
  413|     51|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13AllocateArrayINS0_10DescriptorEEEPT_i:
  400|     51|  U* AllocateArray(int array_size) {
  401|     51|    constexpr bool trivial = std::is_trivially_destructible<U>::value;
  402|     51|    using TypeToUse = typename std::conditional<trivial, char, U>::type;
  403|       |
  404|       |    // We can only allocate after FinalizePlanning has been called.
  405|     51|    ABSL_CHECK(has_allocated());
  ------------------
  |  |   41|     51|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|    102|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     51|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    102|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|    102|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 51, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     51|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 51]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|    102|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 51, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 51]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 51]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|    102|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|    102|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  406|       |
  407|     51|    TypeToUse*& data = pointers_.template Get<TypeToUse>();
  408|     51|    int& used = used_.template Get<TypeToUse>();
  409|     51|    U* res = reinterpret_cast<U*>(data + used);
  410|     51|    used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size;
  ------------------
  |  Branch (410:13): [True: 51, Folded]
  ------------------
  411|     51|    ABSL_CHECK_LE(used, total_.template Get<TypeToUse>());
  ------------------
  |  |   54|     51|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   52|     51|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|     51|  while (                                                                      \
  |  |  |  |  |  |   62|     51|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 51]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|     51|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|     51|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|     51|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|     51|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|     51|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|     51|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  412|     51|    return res;
  413|     51|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13AllocateArrayINS0_10Descriptor14ExtensionRangeEEEPT_i:
  400|     47|  U* AllocateArray(int array_size) {
  401|     47|    constexpr bool trivial = std::is_trivially_destructible<U>::value;
  402|     47|    using TypeToUse = typename std::conditional<trivial, char, U>::type;
  403|       |
  404|       |    // We can only allocate after FinalizePlanning has been called.
  405|     47|    ABSL_CHECK(has_allocated());
  ------------------
  |  |   41|     47|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|     94|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     47|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|     94|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|     94|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 47, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     47|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 47]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|     94|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 47, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 47]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 47]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|     94|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|     94|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  406|       |
  407|     47|    TypeToUse*& data = pointers_.template Get<TypeToUse>();
  408|     47|    int& used = used_.template Get<TypeToUse>();
  409|     47|    U* res = reinterpret_cast<U*>(data + used);
  410|     47|    used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size;
  ------------------
  |  Branch (410:13): [True: 47, Folded]
  ------------------
  411|     47|    ABSL_CHECK_LE(used, total_.template Get<TypeToUse>());
  ------------------
  |  |   54|     47|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   52|     47|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|     47|  while (                                                                      \
  |  |  |  |  |  |   62|     47|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 47]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|     47|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|     47|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|     47|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|     47|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|     47|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|     47|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  412|     47|    return res;
  413|     47|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13AllocateArrayINS0_14FileDescriptorEEEPT_i:
  400|      4|  U* AllocateArray(int array_size) {
  401|      4|    constexpr bool trivial = std::is_trivially_destructible<U>::value;
  402|      4|    using TypeToUse = typename std::conditional<trivial, char, U>::type;
  403|       |
  404|       |    // We can only allocate after FinalizePlanning has been called.
  405|      4|    ABSL_CHECK(has_allocated());
  ------------------
  |  |   41|      4|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|      8|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      4|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      8|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      8|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      4|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      8|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 4]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|      8|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|      8|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  406|       |
  407|      4|    TypeToUse*& data = pointers_.template Get<TypeToUse>();
  408|      4|    int& used = used_.template Get<TypeToUse>();
  409|      4|    U* res = reinterpret_cast<U*>(data + used);
  410|      4|    used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size;
  ------------------
  |  Branch (410:13): [True: 4, Folded]
  ------------------
  411|      4|    ABSL_CHECK_LE(used, total_.template Get<TypeToUse>());
  ------------------
  |  |   54|      4|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   52|      4|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|      4|  while (                                                                      \
  |  |  |  |  |  |   62|      4|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      4|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|      4|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|      4|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|      4|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|      4|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|      4|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  412|      4|    return res;
  413|      4|  }
_ZN6google8protobuf14DescriptorPool6Tables8AllocateINS0_6Symbol10SubpackageEEEPT_v:
 2010|      3|Type* DescriptorPool::Tables::Allocate() {
 2011|      3|  static_assert(std::is_trivially_destructible<Type>::value, "");
 2012|      3|  static_assert(alignof(Type) <= 8, "");
 2013|      3|  return ::new (AllocateBytes(sizeof(Type))) Type{};
 2014|      3|}
_ZN6google8protobuf17DescriptorBuilder19AllocateOptionsImplINS0_14FileDescriptorEEEPKNT_11OptionsTypeEN4absl12lts_2024011611string_viewESA_RKNS4_5ProtoENS9_4SpanIKiEESA_RNS0_8internal13FlatAllocatorE:
 5428|      4|    internal::FlatAllocator& alloc) {
 5429|      4|  if (!proto.has_options()) {
  ------------------
  |  Branch (5429:7): [True: 2, False: 2]
  ------------------
 5430|      2|    return &DescriptorT::OptionsType::default_instance();
 5431|      2|  }
 5432|      2|  const typename DescriptorT::OptionsType& orig_options = proto.options();
 5433|       |
 5434|      2|  auto* options = alloc.AllocateArray<typename DescriptorT::OptionsType>(1);
 5435|       |
 5436|      2|  if (!orig_options.IsInitialized()) {
  ------------------
  |  Branch (5436:7): [True: 0, False: 2]
  ------------------
 5437|      0|    AddError(absl::StrCat(name_scope, ".", element_name), orig_options,
 5438|      0|             DescriptorPool::ErrorCollector::OPTION_NAME,
 5439|      0|             "Uninterpreted option is missing name or value.");
 5440|      0|    return &DescriptorT::OptionsType::default_instance();
 5441|      0|  }
 5442|       |
 5443|      2|  const bool parse_success =
 5444|      2|      internal::ParseNoReflection(orig_options.SerializeAsString(), *options);
 5445|      2|  ABSL_DCHECK(parse_success);
  ------------------
  |  |   47|      2|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      2|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      4|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      2|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      4|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      4|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      2|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      2|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 2, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      4|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      4|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5446|       |
 5447|       |  // Don't add to options_to_interpret_ unless there were uninterpreted
 5448|       |  // options.  This not only avoids unnecessary work, but prevents a
 5449|       |  // bootstrapping problem when building descriptors for descriptor.proto.
 5450|       |  // descriptor.proto does not contain any uninterpreted options, but
 5451|       |  // attempting to interpret options anyway will cause
 5452|       |  // OptionsType::GetDescriptor() to be called which may then deadlock since
 5453|       |  // we're still trying to build it.
 5454|      2|  if (options->uninterpreted_option_size() > 0) {
  ------------------
  |  Branch (5454:7): [True: 0, False: 2]
  ------------------
 5455|      0|    options_to_interpret_.push_back(OptionsToInterpret(
 5456|      0|        name_scope, element_name, options_path, &orig_options, options));
 5457|      0|  }
 5458|       |
 5459|       |  // If the custom option is in unknown fields, no need to interpret it.
 5460|       |  // Remove the dependency file from unused_dependency.
 5461|      2|  const UnknownFieldSet& unknown_fields = orig_options.unknown_fields();
 5462|      2|  if (!unknown_fields.empty()) {
  ------------------
  |  Branch (5462:7): [True: 0, False: 2]
  ------------------
 5463|       |    // Can not use options->GetDescriptor() which may case deadlock.
 5464|      0|    Symbol msg_symbol = tables_->FindSymbol(option_name);
 5465|      0|    if (msg_symbol.type() == Symbol::MESSAGE) {
  ------------------
  |  Branch (5465:9): [True: 0, False: 0]
  ------------------
 5466|      0|      for (int i = 0; i < unknown_fields.field_count(); ++i) {
  ------------------
  |  Branch (5466:23): [True: 0, False: 0]
  ------------------
 5467|      0|        assert_mutex_held(pool_);
 5468|      0|        const FieldDescriptor* field =
 5469|      0|            pool_->InternalFindExtensionByNumberNoLock(
 5470|      0|                msg_symbol.descriptor(), unknown_fields.field(i).number());
 5471|      0|        if (field) {
  ------------------
  |  Branch (5471:13): [True: 0, False: 0]
  ------------------
 5472|      0|          unused_dependency_.erase(field->file());
 5473|      0|        }
 5474|      0|      }
 5475|      0|    }
 5476|      0|  }
 5477|      2|  return options;
 5478|      2|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13AllocateArrayISL_EEPT_i:
  400|      2|  U* AllocateArray(int array_size) {
  401|      2|    constexpr bool trivial = std::is_trivially_destructible<U>::value;
  402|      2|    using TypeToUse = typename std::conditional<trivial, char, U>::type;
  403|       |
  404|       |    // We can only allocate after FinalizePlanning has been called.
  405|      2|    ABSL_CHECK(has_allocated());
  ------------------
  |  |   41|      2|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|      4|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      2|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      4|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      4|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      2|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      4|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 2]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|      4|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|      4|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  406|       |
  407|      2|    TypeToUse*& data = pointers_.template Get<TypeToUse>();
  408|      2|    int& used = used_.template Get<TypeToUse>();
  409|      2|    U* res = reinterpret_cast<U*>(data + used);
  410|      2|    used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size;
  ------------------
  |  Branch (410:13): [Folded, False: 2]
  ------------------
  411|      2|    ABSL_CHECK_LE(used, total_.template Get<TypeToUse>());
  ------------------
  |  |   54|      2|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   52|      2|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|      2|  while (                                                                      \
  |  |  |  |  |  |   62|      2|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      2|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|      2|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|      2|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|      2|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|      2|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|      2|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  412|      2|    return res;
  413|      2|  }
_ZN6google8protobuf17DescriptorBuilder19ResolveFeaturesImplINS0_14FileDescriptorEEEvNS0_7EditionERKNT_5ProtoEPS5_PNS5_11OptionsTypeERNS0_8internal13FlatAllocatorENS0_14DescriptorPool14ErrorCollector13ErrorLocationEb:
 5537|      4|    bool force_merge) {
 5538|      4|  const FeatureSet& parent_features = GetParentFeatures(descriptor);
 5539|      4|  descriptor->proto_features_ = &FeatureSet::default_instance();
 5540|      4|  descriptor->merged_features_ = &FeatureSet::default_instance();
 5541|       |
 5542|      4|  ABSL_CHECK(feature_resolver_.has_value());
  ------------------
  |  |   41|      4|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|      8|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      4|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      8|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      8|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      4|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      8|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 4]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|      8|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|      8|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5543|       |
 5544|      4|  if (options->has_features()) {
  ------------------
  |  Branch (5544:7): [True: 0, False: 4]
  ------------------
 5545|       |    // Remove the features from the child's options proto to avoid leaking
 5546|       |    // internal details.
 5547|      0|    descriptor->proto_features_ =
 5548|      0|        tables_->InternFeatureSet(std::move(*options->mutable_features()));
 5549|      0|    options->clear_features();
 5550|      0|  }
 5551|       |
 5552|      4|  FeatureSet base_features = *descriptor->proto_features_;
 5553|       |
 5554|       |  // Handle feature inference from proto2/proto3.
 5555|      4|  if (IsLegacyEdition(edition)) {
  ------------------
  |  Branch (5555:7): [True: 4, False: 0]
  ------------------
 5556|      4|    if (descriptor->proto_features_ != &FeatureSet::default_instance()) {
  ------------------
  |  Branch (5556:9): [True: 0, False: 4]
  ------------------
 5557|      0|      AddError(descriptor->name(), proto, error_location,
 5558|      0|               "Features are only valid under editions.");
 5559|      0|    }
 5560|      4|  }
 5561|      4|  InferLegacyProtoFeatures(proto, *options, edition, base_features);
 5562|       |
 5563|      4|  if (base_features.ByteSizeLong() == 0 && !force_merge) {
  ------------------
  |  Branch (5563:7): [True: 4, False: 0]
  |  Branch (5563:44): [True: 0, False: 4]
  ------------------
 5564|       |    // Nothing to merge, and we aren't forcing it.
 5565|      0|    descriptor->merged_features_ = &parent_features;
 5566|      0|    return;
 5567|      0|  }
 5568|       |
 5569|       |  // Calculate the merged features for this target.
 5570|      4|  absl::StatusOr<FeatureSet> merged =
 5571|      4|      feature_resolver_->MergeFeatures(parent_features, base_features);
 5572|      4|  if (!merged.ok()) {
  ------------------
  |  Branch (5572:7): [True: 0, False: 4]
  ------------------
 5573|      0|    AddError(descriptor->name(), proto, error_location,
 5574|      0|             [&] { return std::string(merged.status().message()); });
 5575|      0|    return;
 5576|      0|  }
 5577|       |
 5578|      4|  descriptor->merged_features_ = tables_->InternFeatureSet(*std::move(merged));
 5579|      4|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117GetParentFeaturesEPKNS0_14FileDescriptorE:
 1142|      4|const FeatureSet& GetParentFeatures(const FileDescriptor* file) {
 1143|      4|  return FeatureSet::default_instance();
 1144|      4|}
descriptor.cc:_ZN6google8protobufL24InferLegacyProtoFeaturesINS0_19FileDescriptorProtoENS0_11FileOptionsEEEvRKT_RKT0_NS0_7EditionERNS0_10FeatureSetE:
 5483|      4|                                     FeatureSet& features) {}
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE14ExpectConsumedEv:
  534|      4|  void ExpectConsumed() const {
  535|       |    // We verify that we consumed all the memory requested if there was no
  536|       |    // error in processing.
  537|      4|    Fold({ExpectConsumed<T>()...});
  538|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE14ExpectConsumedIcEEbv:
  566|      4|  bool ExpectConsumed() const {
  567|      4|    ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>());
  ------------------
  |  |   50|      4|  ABSL_LOG_INTERNAL_CHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   48|      4|  ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|      4|  while (                                                                      \
  |  |  |  |  |  |   62|      4|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      4|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|      4|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|      4|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|      4|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|      4|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|      4|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  568|      4|    return true;
  569|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE14ExpectConsumedIS9_EEbv:
  566|      4|  bool ExpectConsumed() const {
  567|      4|    ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>());
  ------------------
  |  |   50|      4|  ABSL_LOG_INTERNAL_CHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   48|      4|  ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|      4|  while (                                                                      \
  |  |  |  |  |  |   62|      4|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      4|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|      4|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|      4|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|      4|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|      4|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|      4|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  568|      4|    return true;
  569|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE14ExpectConsumedISA_EEbv:
  566|      4|  bool ExpectConsumed() const {
  567|      4|    ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>());
  ------------------
  |  |   50|      4|  ABSL_LOG_INTERNAL_CHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   48|      4|  ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|      4|  while (                                                                      \
  |  |  |  |  |  |   62|      4|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      4|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|      4|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|      4|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|      4|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|      4|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|      4|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  568|      4|    return true;
  569|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE14ExpectConsumedISB_EEbv:
  566|      4|  bool ExpectConsumed() const {
  567|      4|    ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>());
  ------------------
  |  |   50|      4|  ABSL_LOG_INTERNAL_CHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   48|      4|  ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|      4|  while (                                                                      \
  |  |  |  |  |  |   62|      4|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      4|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|      4|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|      4|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|      4|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|      4|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|      4|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  568|      4|    return true;
  569|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE14ExpectConsumedISC_EEbv:
  566|      4|  bool ExpectConsumed() const {
  567|      4|    ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>());
  ------------------
  |  |   50|      4|  ABSL_LOG_INTERNAL_CHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   48|      4|  ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|      4|  while (                                                                      \
  |  |  |  |  |  |   62|      4|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      4|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|      4|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|      4|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|      4|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|      4|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|      4|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  568|      4|    return true;
  569|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE14ExpectConsumedISD_EEbv:
  566|      4|  bool ExpectConsumed() const {
  567|      4|    ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>());
  ------------------
  |  |   50|      4|  ABSL_LOG_INTERNAL_CHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   48|      4|  ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|      4|  while (                                                                      \
  |  |  |  |  |  |   62|      4|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      4|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|      4|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|      4|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|      4|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|      4|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|      4|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  568|      4|    return true;
  569|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE14ExpectConsumedISE_EEbv:
  566|      4|  bool ExpectConsumed() const {
  567|      4|    ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>());
  ------------------
  |  |   50|      4|  ABSL_LOG_INTERNAL_CHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   48|      4|  ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|      4|  while (                                                                      \
  |  |  |  |  |  |   62|      4|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      4|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|      4|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|      4|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|      4|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|      4|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|      4|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  568|      4|    return true;
  569|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE14ExpectConsumedISF_EEbv:
  566|      4|  bool ExpectConsumed() const {
  567|      4|    ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>());
  ------------------
  |  |   50|      4|  ABSL_LOG_INTERNAL_CHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   48|      4|  ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|      4|  while (                                                                      \
  |  |  |  |  |  |   62|      4|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      4|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|      4|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|      4|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|      4|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|      4|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|      4|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  568|      4|    return true;
  569|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE14ExpectConsumedISG_EEbv:
  566|      4|  bool ExpectConsumed() const {
  567|      4|    ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>());
  ------------------
  |  |   50|      4|  ABSL_LOG_INTERNAL_CHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   48|      4|  ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|      4|  while (                                                                      \
  |  |  |  |  |  |   62|      4|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      4|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|      4|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|      4|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|      4|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|      4|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|      4|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  568|      4|    return true;
  569|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE14ExpectConsumedISH_EEbv:
  566|      4|  bool ExpectConsumed() const {
  567|      4|    ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>());
  ------------------
  |  |   50|      4|  ABSL_LOG_INTERNAL_CHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   48|      4|  ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|      4|  while (                                                                      \
  |  |  |  |  |  |   62|      4|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      4|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|      4|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|      4|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|      4|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|      4|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|      4|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  568|      4|    return true;
  569|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE14ExpectConsumedISI_EEbv:
  566|      4|  bool ExpectConsumed() const {
  567|      4|    ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>());
  ------------------
  |  |   50|      4|  ABSL_LOG_INTERNAL_CHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   48|      4|  ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|      4|  while (                                                                      \
  |  |  |  |  |  |   62|      4|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      4|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|      4|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|      4|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|      4|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|      4|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|      4|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  568|      4|    return true;
  569|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE14ExpectConsumedISJ_EEbv:
  566|      4|  bool ExpectConsumed() const {
  567|      4|    ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>());
  ------------------
  |  |   50|      4|  ABSL_LOG_INTERNAL_CHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   48|      4|  ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|      4|  while (                                                                      \
  |  |  |  |  |  |   62|      4|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      4|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|      4|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|      4|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|      4|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|      4|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|      4|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  568|      4|    return true;
  569|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE14ExpectConsumedISK_EEbv:
  566|      4|  bool ExpectConsumed() const {
  567|      4|    ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>());
  ------------------
  |  |   50|      4|  ABSL_LOG_INTERNAL_CHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   48|      4|  ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|      4|  while (                                                                      \
  |  |  |  |  |  |   62|      4|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      4|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|      4|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|      4|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|      4|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|      4|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|      4|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  568|      4|    return true;
  569|      4|  }
descriptor.cc:_ZNK6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE14ExpectConsumedISL_EEbv:
  566|      4|  bool ExpectConsumed() const {
  567|      4|    ABSL_CHECK_EQ(total_.template Get<U>(), used_.template Get<U>());
  ------------------
  |  |   50|      4|  ABSL_LOG_INTERNAL_CHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   48|      4|  ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|      4|  while (                                                                      \
  |  |  |  |  |  |   62|      4|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      4|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|      4|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|      4|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|      4|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|      4|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|      4|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  568|      4|    return true;
  569|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13AllocateArrayISB_EEPT_i:
  400|      4|  U* AllocateArray(int array_size) {
  401|      4|    constexpr bool trivial = std::is_trivially_destructible<U>::value;
  402|      4|    using TypeToUse = typename std::conditional<trivial, char, U>::type;
  403|       |
  404|       |    // We can only allocate after FinalizePlanning has been called.
  405|      4|    ABSL_CHECK(has_allocated());
  ------------------
  |  |   41|      4|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|      8|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      4|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      8|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      8|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      4|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      8|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 4]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|      8|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|      8|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  406|       |
  407|      4|    TypeToUse*& data = pointers_.template Get<TypeToUse>();
  408|      4|    int& used = used_.template Get<TypeToUse>();
  409|      4|    U* res = reinterpret_cast<U*>(data + used);
  410|      4|    used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size;
  ------------------
  |  Branch (410:13): [Folded, False: 4]
  ------------------
  411|      4|    ABSL_CHECK_LE(used, total_.template Get<TypeToUse>());
  ------------------
  |  |   54|      4|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   52|      4|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|      4|  while (                                                                      \
  |  |  |  |  |  |   62|      4|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      4|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|      4|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|      4|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|      4|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|      4|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|      4|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  412|      4|    return res;
  413|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE15AllocateStringsIJRKS9_EEEPSO_DpOT_:
  416|     10|  const std::string* AllocateStrings(In&&... in) {
  417|     10|    std::string* strings = AllocateArray<std::string>(sizeof...(in));
  418|     10|    std::string* res = strings;
  419|     10|    Fold({(*strings++ = std::string(std::forward<In>(in)))...});
  420|     10|    return res;
  421|     10|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13AllocateArrayIPKNS0_14FileDescriptorEEEPT_i:
  400|      4|  U* AllocateArray(int array_size) {
  401|      4|    constexpr bool trivial = std::is_trivially_destructible<U>::value;
  402|      4|    using TypeToUse = typename std::conditional<trivial, char, U>::type;
  403|       |
  404|       |    // We can only allocate after FinalizePlanning has been called.
  405|      4|    ABSL_CHECK(has_allocated());
  ------------------
  |  |   41|      4|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|      8|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      4|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      8|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      8|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      4|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      8|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 4]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|      8|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|      8|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  406|       |
  407|      4|    TypeToUse*& data = pointers_.template Get<TypeToUse>();
  408|      4|    int& used = used_.template Get<TypeToUse>();
  409|      4|    U* res = reinterpret_cast<U*>(data + used);
  410|      4|    used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size;
  ------------------
  |  Branch (410:13): [True: 4, Folded]
  ------------------
  411|      4|    ABSL_CHECK_LE(used, total_.template Get<TypeToUse>());
  ------------------
  |  |   54|      4|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   52|      4|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|      4|  while (                                                                      \
  |  |  |  |  |  |   62|      4|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      4|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|      4|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|      4|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|      4|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|      4|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|      4|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  412|      4|    return res;
  413|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13AllocateArrayIiEEPT_i:
  400|      8|  U* AllocateArray(int array_size) {
  401|      8|    constexpr bool trivial = std::is_trivially_destructible<U>::value;
  402|      8|    using TypeToUse = typename std::conditional<trivial, char, U>::type;
  403|       |
  404|       |    // We can only allocate after FinalizePlanning has been called.
  405|      8|    ABSL_CHECK(has_allocated());
  ------------------
  |  |   41|      8|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|     16|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      8|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|     16|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|     16|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 8, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      8|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 8]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|     16|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 8, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 8]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 8]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|     16|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|     16|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  406|       |
  407|      8|    TypeToUse*& data = pointers_.template Get<TypeToUse>();
  408|      8|    int& used = used_.template Get<TypeToUse>();
  409|      8|    U* res = reinterpret_cast<U*>(data + used);
  410|      8|    used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size;
  ------------------
  |  Branch (410:13): [True: 8, Folded]
  ------------------
  411|      8|    ABSL_CHECK_LE(used, total_.template Get<TypeToUse>());
  ------------------
  |  |   54|      8|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   52|      8|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|      8|  while (                                                                      \
  |  |  |  |  |  |   62|      8|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      8|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|      8|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|      8|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|      8|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|      8|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|      8|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  412|      8|    return res;
  413|      8|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13AllocateArrayINS0_17ServiceDescriptorEEEPT_i:
  400|      4|  U* AllocateArray(int array_size) {
  401|      4|    constexpr bool trivial = std::is_trivially_destructible<U>::value;
  402|      4|    using TypeToUse = typename std::conditional<trivial, char, U>::type;
  403|       |
  404|       |    // We can only allocate after FinalizePlanning has been called.
  405|      4|    ABSL_CHECK(has_allocated());
  ------------------
  |  |   41|      4|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|      8|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      4|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      8|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      8|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      4|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      8|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 4]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|      8|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|      8|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  406|       |
  407|      4|    TypeToUse*& data = pointers_.template Get<TypeToUse>();
  408|      4|    int& used = used_.template Get<TypeToUse>();
  409|      4|    U* res = reinterpret_cast<U*>(data + used);
  410|      4|    used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size;
  ------------------
  |  Branch (410:13): [True: 4, Folded]
  ------------------
  411|      4|    ABSL_CHECK_LE(used, total_.template Get<TypeToUse>());
  ------------------
  |  |   54|      4|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   52|      4|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|      4|  while (                                                                      \
  |  |  |  |  |  |   62|      4|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      4|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|      4|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|      4|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|      4|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|      4|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|      4|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  412|      4|    return res;
  413|      4|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13AllocateArrayINS0_15FieldDescriptorEEEPT_i:
  400|     98|  U* AllocateArray(int array_size) {
  401|     98|    constexpr bool trivial = std::is_trivially_destructible<U>::value;
  402|     98|    using TypeToUse = typename std::conditional<trivial, char, U>::type;
  403|       |
  404|       |    // We can only allocate after FinalizePlanning has been called.
  405|     98|    ABSL_CHECK(has_allocated());
  ------------------
  |  |   41|     98|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|    196|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     98|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    196|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|    196|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 98, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     98|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 98]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|    196|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 98, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 98]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 98]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|    196|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|    196|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  406|       |
  407|     98|    TypeToUse*& data = pointers_.template Get<TypeToUse>();
  408|     98|    int& used = used_.template Get<TypeToUse>();
  409|     98|    U* res = reinterpret_cast<U*>(data + used);
  410|     98|    used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size;
  ------------------
  |  Branch (410:13): [True: 98, Folded]
  ------------------
  411|     98|    ABSL_CHECK_LE(used, total_.template Get<TypeToUse>());
  ------------------
  |  |   54|     98|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   52|     98|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|     98|  while (                                                                      \
  |  |  |  |  |  |   62|     98|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 98]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|     98|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|     98|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|     98|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|     98|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|     98|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|     98|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  412|     98|    return res;
  413|     98|  }
descriptor.cc:_ZZN6google8protobuf17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS0_8internal13FlatAllocatorEENK3$_3clERKNS0_15FieldDescriptorERKNS0_20FieldDescriptorProtoE:
 6161|    235|        [&](const FieldDescriptor& field, const FieldDescriptorProto& proto) {
 6162|    235|          if (field.options_->has_ctype() && field.options_->features()
  ------------------
  |  Branch (6162:15): [True: 0, False: 235]
  |  Branch (6162:46): [True: 0, False: 0]
  ------------------
 6163|      0|                                                 .GetExtension(pb::cpp)
 6164|      0|                                                 .has_string_type()) {
 6165|      0|            AddError(field.full_name(), proto,
 6166|      0|                     DescriptorPool::ErrorCollector::TYPE, [&] {
 6167|      0|                       return absl::StrFormat(
 6168|      0|                           "Field %s specifies both string_type and ctype "
 6169|      0|                           "which is not supported.",
 6170|      0|                           field.full_name());
 6171|      0|                     });
 6172|      0|          }
 6173|    235|        });
descriptor.cc:_ZZN6google8protobuf17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS0_8internal13FlatAllocatorEENK3$_4clINS0_14FileDescriptorES2_EEDaRKT_RKT0_:
 6180|      4|          *result, proto, [&](const auto& descriptor, const auto& proto) {
 6181|      4|            using OptionsT =
 6182|      4|                typename std::remove_const<typename std::remove_pointer<
 6183|      4|                    decltype(descriptor.options_)>::type>::type;
 6184|      4|            using DescriptorT =
 6185|      4|                typename std::remove_const<typename std::remove_reference<
 6186|      4|                    decltype(descriptor)>::type>::type;
 6187|       |
 6188|      4|            ResolveFeatures(
 6189|      4|                proto, const_cast<DescriptorT*>(&descriptor),
 6190|      4|                const_cast<  // NOLINT(google3-runtime-proto-const-cast)
 6191|      4|                    OptionsT*>(descriptor.options_),
 6192|      4|                alloc);
 6193|      4|          });
descriptor.cc:_ZZN6google8protobuf17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS0_8internal13FlatAllocatorEENK3$_4clINS0_10DescriptorENS0_15DescriptorProtoEEEDaRKT_RKT0_:
 6180|     47|          *result, proto, [&](const auto& descriptor, const auto& proto) {
 6181|     47|            using OptionsT =
 6182|     47|                typename std::remove_const<typename std::remove_pointer<
 6183|     47|                    decltype(descriptor.options_)>::type>::type;
 6184|     47|            using DescriptorT =
 6185|     47|                typename std::remove_const<typename std::remove_reference<
 6186|     47|                    decltype(descriptor)>::type>::type;
 6187|       |
 6188|     47|            ResolveFeatures(
 6189|     47|                proto, const_cast<DescriptorT*>(&descriptor),
 6190|     47|                const_cast<  // NOLINT(google3-runtime-proto-const-cast)
 6191|     47|                    OptionsT*>(descriptor.options_),
 6192|     47|                alloc);
 6193|     47|          });
_ZN6google8protobuf17DescriptorBuilder15ResolveFeaturesINS0_10DescriptorEEEvRKNT_5ProtoEPS4_PNS4_11OptionsTypeERNS0_8internal13FlatAllocatorE:
 5585|     47|    internal::FlatAllocator& alloc) {
 5586|     47|  ResolveFeaturesImpl(descriptor->file()->edition(), proto, descriptor, options,
 5587|     47|                      alloc, DescriptorPool::ErrorCollector::NAME);
 5588|     47|}
_ZN6google8protobuf17DescriptorBuilder19ResolveFeaturesImplINS0_10DescriptorEEEvNS0_7EditionERKNT_5ProtoEPS5_PNS5_11OptionsTypeERNS0_8internal13FlatAllocatorENS0_14DescriptorPool14ErrorCollector13ErrorLocationEb:
 5537|     47|    bool force_merge) {
 5538|     47|  const FeatureSet& parent_features = GetParentFeatures(descriptor);
 5539|     47|  descriptor->proto_features_ = &FeatureSet::default_instance();
 5540|     47|  descriptor->merged_features_ = &FeatureSet::default_instance();
 5541|       |
 5542|     47|  ABSL_CHECK(feature_resolver_.has_value());
  ------------------
  |  |   41|     47|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|     94|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     47|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|     94|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|     94|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 47, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     47|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 47]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|     94|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 47, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 47]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 47]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|     94|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|     94|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5543|       |
 5544|     47|  if (options->has_features()) {
  ------------------
  |  Branch (5544:7): [True: 0, False: 47]
  ------------------
 5545|       |    // Remove the features from the child's options proto to avoid leaking
 5546|       |    // internal details.
 5547|      0|    descriptor->proto_features_ =
 5548|      0|        tables_->InternFeatureSet(std::move(*options->mutable_features()));
 5549|      0|    options->clear_features();
 5550|      0|  }
 5551|       |
 5552|     47|  FeatureSet base_features = *descriptor->proto_features_;
 5553|       |
 5554|       |  // Handle feature inference from proto2/proto3.
 5555|     47|  if (IsLegacyEdition(edition)) {
  ------------------
  |  Branch (5555:7): [True: 47, False: 0]
  ------------------
 5556|     47|    if (descriptor->proto_features_ != &FeatureSet::default_instance()) {
  ------------------
  |  Branch (5556:9): [True: 0, False: 47]
  ------------------
 5557|      0|      AddError(descriptor->name(), proto, error_location,
 5558|      0|               "Features are only valid under editions.");
 5559|      0|    }
 5560|     47|  }
 5561|     47|  InferLegacyProtoFeatures(proto, *options, edition, base_features);
 5562|       |
 5563|     47|  if (base_features.ByteSizeLong() == 0 && !force_merge) {
  ------------------
  |  Branch (5563:7): [True: 47, False: 0]
  |  Branch (5563:44): [True: 47, False: 0]
  ------------------
 5564|       |    // Nothing to merge, and we aren't forcing it.
 5565|     47|    descriptor->merged_features_ = &parent_features;
 5566|     47|    return;
 5567|     47|  }
 5568|       |
 5569|       |  // Calculate the merged features for this target.
 5570|      0|  absl::StatusOr<FeatureSet> merged =
 5571|      0|      feature_resolver_->MergeFeatures(parent_features, base_features);
 5572|      0|  if (!merged.ok()) {
  ------------------
  |  Branch (5572:7): [True: 0, False: 0]
  ------------------
 5573|      0|    AddError(descriptor->name(), proto, error_location,
 5574|      0|             [&] { return std::string(merged.status().message()); });
 5575|      0|    return;
 5576|      0|  }
 5577|       |
 5578|      0|  descriptor->merged_features_ = tables_->InternFeatureSet(*std::move(merged));
 5579|      0|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117GetParentFeaturesEPKNS0_10DescriptorE:
 1146|     47|const FeatureSet& GetParentFeatures(const Descriptor* message) {
 1147|     47|  if (message->containing_type() == nullptr) {
  ------------------
  |  Branch (1147:7): [True: 37, False: 10]
  ------------------
 1148|     37|    return internal::InternalFeatureHelper::GetFeatures(*message->file());
 1149|     37|  }
 1150|     10|  return internal::InternalFeatureHelper::GetFeatures(
 1151|     10|      *message->containing_type());
 1152|     47|}
descriptor.cc:_ZN6google8protobufL24InferLegacyProtoFeaturesINS0_15DescriptorProtoENS0_14MessageOptionsEEEvRKT_RKT0_NS0_7EditionERNS0_10FeatureSetE:
 5483|     47|                                     FeatureSet& features) {}
descriptor.cc:_ZZN6google8protobuf17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS0_8internal13FlatAllocatorEENK3$_4clINS0_15OneofDescriptorENS0_20OneofDescriptorProtoEEEDaRKT_RKT0_:
 6180|      2|          *result, proto, [&](const auto& descriptor, const auto& proto) {
 6181|      2|            using OptionsT =
 6182|      2|                typename std::remove_const<typename std::remove_pointer<
 6183|      2|                    decltype(descriptor.options_)>::type>::type;
 6184|      2|            using DescriptorT =
 6185|      2|                typename std::remove_const<typename std::remove_reference<
 6186|      2|                    decltype(descriptor)>::type>::type;
 6187|       |
 6188|      2|            ResolveFeatures(
 6189|      2|                proto, const_cast<DescriptorT*>(&descriptor),
 6190|      2|                const_cast<  // NOLINT(google3-runtime-proto-const-cast)
 6191|      2|                    OptionsT*>(descriptor.options_),
 6192|      2|                alloc);
 6193|      2|          });
_ZN6google8protobuf17DescriptorBuilder15ResolveFeaturesINS0_15OneofDescriptorEEEvRKNT_5ProtoEPS4_PNS4_11OptionsTypeERNS0_8internal13FlatAllocatorE:
 5585|      2|    internal::FlatAllocator& alloc) {
 5586|      2|  ResolveFeaturesImpl(descriptor->file()->edition(), proto, descriptor, options,
 5587|      2|                      alloc, DescriptorPool::ErrorCollector::NAME);
 5588|      2|}
_ZN6google8protobuf17DescriptorBuilder19ResolveFeaturesImplINS0_15OneofDescriptorEEEvNS0_7EditionERKNT_5ProtoEPS5_PNS5_11OptionsTypeERNS0_8internal13FlatAllocatorENS0_14DescriptorPool14ErrorCollector13ErrorLocationEb:
 5537|      2|    bool force_merge) {
 5538|      2|  const FeatureSet& parent_features = GetParentFeatures(descriptor);
 5539|      2|  descriptor->proto_features_ = &FeatureSet::default_instance();
 5540|      2|  descriptor->merged_features_ = &FeatureSet::default_instance();
 5541|       |
 5542|      2|  ABSL_CHECK(feature_resolver_.has_value());
  ------------------
  |  |   41|      2|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|      4|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      2|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      4|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      4|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      2|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      4|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 2]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|      4|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|      4|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5543|       |
 5544|      2|  if (options->has_features()) {
  ------------------
  |  Branch (5544:7): [True: 0, False: 2]
  ------------------
 5545|       |    // Remove the features from the child's options proto to avoid leaking
 5546|       |    // internal details.
 5547|      0|    descriptor->proto_features_ =
 5548|      0|        tables_->InternFeatureSet(std::move(*options->mutable_features()));
 5549|      0|    options->clear_features();
 5550|      0|  }
 5551|       |
 5552|      2|  FeatureSet base_features = *descriptor->proto_features_;
 5553|       |
 5554|       |  // Handle feature inference from proto2/proto3.
 5555|      2|  if (IsLegacyEdition(edition)) {
  ------------------
  |  Branch (5555:7): [True: 2, False: 0]
  ------------------
 5556|      2|    if (descriptor->proto_features_ != &FeatureSet::default_instance()) {
  ------------------
  |  Branch (5556:9): [True: 0, False: 2]
  ------------------
 5557|      0|      AddError(descriptor->name(), proto, error_location,
 5558|      0|               "Features are only valid under editions.");
 5559|      0|    }
 5560|      2|  }
 5561|      2|  InferLegacyProtoFeatures(proto, *options, edition, base_features);
 5562|       |
 5563|      2|  if (base_features.ByteSizeLong() == 0 && !force_merge) {
  ------------------
  |  Branch (5563:7): [True: 2, False: 0]
  |  Branch (5563:44): [True: 2, False: 0]
  ------------------
 5564|       |    // Nothing to merge, and we aren't forcing it.
 5565|      2|    descriptor->merged_features_ = &parent_features;
 5566|      2|    return;
 5567|      2|  }
 5568|       |
 5569|       |  // Calculate the merged features for this target.
 5570|      0|  absl::StatusOr<FeatureSet> merged =
 5571|      0|      feature_resolver_->MergeFeatures(parent_features, base_features);
 5572|      0|  if (!merged.ok()) {
  ------------------
  |  Branch (5572:7): [True: 0, False: 0]
  ------------------
 5573|      0|    AddError(descriptor->name(), proto, error_location,
 5574|      0|             [&] { return std::string(merged.status().message()); });
 5575|      0|    return;
 5576|      0|  }
 5577|       |
 5578|      0|  descriptor->merged_features_ = tables_->InternFeatureSet(*std::move(merged));
 5579|      0|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117GetParentFeaturesEPKNS0_15OneofDescriptorE:
 1154|      2|const FeatureSet& GetParentFeatures(const OneofDescriptor* oneof) {
 1155|      2|  return internal::InternalFeatureHelper::GetFeatures(
 1156|      2|      *oneof->containing_type());
 1157|      2|}
descriptor.cc:_ZN6google8protobufL24InferLegacyProtoFeaturesINS0_20OneofDescriptorProtoENS0_12OneofOptionsEEEvRKT_RKT0_NS0_7EditionERNS0_10FeatureSetE:
 5483|      2|                                     FeatureSet& features) {}
descriptor.cc:_ZZN6google8protobuf17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS0_8internal13FlatAllocatorEENK3$_4clINS0_10Descriptor14ExtensionRangeENS0_30DescriptorProto_ExtensionRangeEEEDaRKT_RKT0_:
 6180|     14|          *result, proto, [&](const auto& descriptor, const auto& proto) {
 6181|     14|            using OptionsT =
 6182|     14|                typename std::remove_const<typename std::remove_pointer<
 6183|     14|                    decltype(descriptor.options_)>::type>::type;
 6184|     14|            using DescriptorT =
 6185|     14|                typename std::remove_const<typename std::remove_reference<
 6186|     14|                    decltype(descriptor)>::type>::type;
 6187|       |
 6188|     14|            ResolveFeatures(
 6189|     14|                proto, const_cast<DescriptorT*>(&descriptor),
 6190|     14|                const_cast<  // NOLINT(google3-runtime-proto-const-cast)
 6191|     14|                    OptionsT*>(descriptor.options_),
 6192|     14|                alloc);
 6193|     14|          });
_ZN6google8protobuf17DescriptorBuilder15ResolveFeaturesINS0_10Descriptor14ExtensionRangeEEEvRKNT_5ProtoEPS5_PNS5_11OptionsTypeERNS0_8internal13FlatAllocatorE:
 5585|     14|    internal::FlatAllocator& alloc) {
 5586|     14|  ResolveFeaturesImpl(descriptor->file()->edition(), proto, descriptor, options,
 5587|     14|                      alloc, DescriptorPool::ErrorCollector::NAME);
 5588|     14|}
_ZN6google8protobuf17DescriptorBuilder19ResolveFeaturesImplINS0_10Descriptor14ExtensionRangeEEEvNS0_7EditionERKNT_5ProtoEPS6_PNS6_11OptionsTypeERNS0_8internal13FlatAllocatorENS0_14DescriptorPool14ErrorCollector13ErrorLocationEb:
 5537|     14|    bool force_merge) {
 5538|     14|  const FeatureSet& parent_features = GetParentFeatures(descriptor);
 5539|     14|  descriptor->proto_features_ = &FeatureSet::default_instance();
 5540|     14|  descriptor->merged_features_ = &FeatureSet::default_instance();
 5541|       |
 5542|     14|  ABSL_CHECK(feature_resolver_.has_value());
  ------------------
  |  |   41|     14|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|     28|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     14|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|     28|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|     28|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 14, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     14|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 14]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|     28|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 14, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 14]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 14]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|     28|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|     28|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5543|       |
 5544|     14|  if (options->has_features()) {
  ------------------
  |  Branch (5544:7): [True: 0, False: 14]
  ------------------
 5545|       |    // Remove the features from the child's options proto to avoid leaking
 5546|       |    // internal details.
 5547|      0|    descriptor->proto_features_ =
 5548|      0|        tables_->InternFeatureSet(std::move(*options->mutable_features()));
 5549|      0|    options->clear_features();
 5550|      0|  }
 5551|       |
 5552|     14|  FeatureSet base_features = *descriptor->proto_features_;
 5553|       |
 5554|       |  // Handle feature inference from proto2/proto3.
 5555|     14|  if (IsLegacyEdition(edition)) {
  ------------------
  |  Branch (5555:7): [True: 14, False: 0]
  ------------------
 5556|     14|    if (descriptor->proto_features_ != &FeatureSet::default_instance()) {
  ------------------
  |  Branch (5556:9): [True: 0, False: 14]
  ------------------
 5557|      0|      AddError(descriptor->name(), proto, error_location,
 5558|      0|               "Features are only valid under editions.");
 5559|      0|    }
 5560|     14|  }
 5561|     14|  InferLegacyProtoFeatures(proto, *options, edition, base_features);
 5562|       |
 5563|     14|  if (base_features.ByteSizeLong() == 0 && !force_merge) {
  ------------------
  |  Branch (5563:7): [True: 14, False: 0]
  |  Branch (5563:44): [True: 14, False: 0]
  ------------------
 5564|       |    // Nothing to merge, and we aren't forcing it.
 5565|     14|    descriptor->merged_features_ = &parent_features;
 5566|     14|    return;
 5567|     14|  }
 5568|       |
 5569|       |  // Calculate the merged features for this target.
 5570|      0|  absl::StatusOr<FeatureSet> merged =
 5571|      0|      feature_resolver_->MergeFeatures(parent_features, base_features);
 5572|      0|  if (!merged.ok()) {
  ------------------
  |  Branch (5572:7): [True: 0, False: 0]
  ------------------
 5573|      0|    AddError(descriptor->name(), proto, error_location,
 5574|      0|             [&] { return std::string(merged.status().message()); });
 5575|      0|    return;
 5576|      0|  }
 5577|       |
 5578|      0|  descriptor->merged_features_ = tables_->InternFeatureSet(*std::move(merged));
 5579|      0|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117GetParentFeaturesEPKNS0_10Descriptor14ExtensionRangeE:
 1159|     14|const FeatureSet& GetParentFeatures(const Descriptor::ExtensionRange* range) {
 1160|     14|  return internal::InternalFeatureHelper::GetFeatures(
 1161|     14|      *range->containing_type());
 1162|     14|}
descriptor.cc:_ZN6google8protobufL24InferLegacyProtoFeaturesINS0_30DescriptorProto_ExtensionRangeENS0_21ExtensionRangeOptionsEEEvRKT_RKT0_NS0_7EditionERNS0_10FeatureSetE:
 5483|     14|                                     FeatureSet& features) {}
descriptor.cc:_ZZN6google8protobuf17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS0_8internal13FlatAllocatorEENK3$_4clINS0_14EnumDescriptorENS0_19EnumDescriptorProtoEEEDaRKT_RKT0_:
 6180|     24|          *result, proto, [&](const auto& descriptor, const auto& proto) {
 6181|     24|            using OptionsT =
 6182|     24|                typename std::remove_const<typename std::remove_pointer<
 6183|     24|                    decltype(descriptor.options_)>::type>::type;
 6184|     24|            using DescriptorT =
 6185|     24|                typename std::remove_const<typename std::remove_reference<
 6186|     24|                    decltype(descriptor)>::type>::type;
 6187|       |
 6188|     24|            ResolveFeatures(
 6189|     24|                proto, const_cast<DescriptorT*>(&descriptor),
 6190|     24|                const_cast<  // NOLINT(google3-runtime-proto-const-cast)
 6191|     24|                    OptionsT*>(descriptor.options_),
 6192|     24|                alloc);
 6193|     24|          });
_ZN6google8protobuf17DescriptorBuilder15ResolveFeaturesINS0_14EnumDescriptorEEEvRKNT_5ProtoEPS4_PNS4_11OptionsTypeERNS0_8internal13FlatAllocatorE:
 5585|     24|    internal::FlatAllocator& alloc) {
 5586|     24|  ResolveFeaturesImpl(descriptor->file()->edition(), proto, descriptor, options,
 5587|     24|                      alloc, DescriptorPool::ErrorCollector::NAME);
 5588|     24|}
_ZN6google8protobuf17DescriptorBuilder19ResolveFeaturesImplINS0_14EnumDescriptorEEEvNS0_7EditionERKNT_5ProtoEPS5_PNS5_11OptionsTypeERNS0_8internal13FlatAllocatorENS0_14DescriptorPool14ErrorCollector13ErrorLocationEb:
 5537|     24|    bool force_merge) {
 5538|     24|  const FeatureSet& parent_features = GetParentFeatures(descriptor);
 5539|     24|  descriptor->proto_features_ = &FeatureSet::default_instance();
 5540|     24|  descriptor->merged_features_ = &FeatureSet::default_instance();
 5541|       |
 5542|     24|  ABSL_CHECK(feature_resolver_.has_value());
  ------------------
  |  |   41|     24|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|     48|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     24|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|     48|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|     48|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 24, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     24|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 24]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|     48|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 24, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 24]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 24]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|     48|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|     48|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5543|       |
 5544|     24|  if (options->has_features()) {
  ------------------
  |  Branch (5544:7): [True: 0, False: 24]
  ------------------
 5545|       |    // Remove the features from the child's options proto to avoid leaking
 5546|       |    // internal details.
 5547|      0|    descriptor->proto_features_ =
 5548|      0|        tables_->InternFeatureSet(std::move(*options->mutable_features()));
 5549|      0|    options->clear_features();
 5550|      0|  }
 5551|       |
 5552|     24|  FeatureSet base_features = *descriptor->proto_features_;
 5553|       |
 5554|       |  // Handle feature inference from proto2/proto3.
 5555|     24|  if (IsLegacyEdition(edition)) {
  ------------------
  |  Branch (5555:7): [True: 24, False: 0]
  ------------------
 5556|     24|    if (descriptor->proto_features_ != &FeatureSet::default_instance()) {
  ------------------
  |  Branch (5556:9): [True: 0, False: 24]
  ------------------
 5557|      0|      AddError(descriptor->name(), proto, error_location,
 5558|      0|               "Features are only valid under editions.");
 5559|      0|    }
 5560|     24|  }
 5561|     24|  InferLegacyProtoFeatures(proto, *options, edition, base_features);
 5562|       |
 5563|     24|  if (base_features.ByteSizeLong() == 0 && !force_merge) {
  ------------------
  |  Branch (5563:7): [True: 24, False: 0]
  |  Branch (5563:44): [True: 24, False: 0]
  ------------------
 5564|       |    // Nothing to merge, and we aren't forcing it.
 5565|     24|    descriptor->merged_features_ = &parent_features;
 5566|     24|    return;
 5567|     24|  }
 5568|       |
 5569|       |  // Calculate the merged features for this target.
 5570|      0|  absl::StatusOr<FeatureSet> merged =
 5571|      0|      feature_resolver_->MergeFeatures(parent_features, base_features);
 5572|      0|  if (!merged.ok()) {
  ------------------
  |  Branch (5572:7): [True: 0, False: 0]
  ------------------
 5573|      0|    AddError(descriptor->name(), proto, error_location,
 5574|      0|             [&] { return std::string(merged.status().message()); });
 5575|      0|    return;
 5576|      0|  }
 5577|       |
 5578|      0|  descriptor->merged_features_ = tables_->InternFeatureSet(*std::move(merged));
 5579|      0|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117GetParentFeaturesEPKNS0_14EnumDescriptorE:
 1179|     24|const FeatureSet& GetParentFeatures(const EnumDescriptor* enm) {
 1180|     24|  if (enm->containing_type() == nullptr) {
  ------------------
  |  Branch (1180:7): [True: 7, False: 17]
  ------------------
 1181|      7|    return internal::InternalFeatureHelper::GetFeatures(*enm->file());
 1182|      7|  }
 1183|     17|  return internal::InternalFeatureHelper::GetFeatures(*enm->containing_type());
 1184|     24|}
descriptor.cc:_ZN6google8protobufL24InferLegacyProtoFeaturesINS0_19EnumDescriptorProtoENS0_11EnumOptionsEEEvRKT_RKT0_NS0_7EditionERNS0_10FeatureSetE:
 5483|     24|                                     FeatureSet& features) {}
descriptor.cc:_ZZN6google8protobuf17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS0_8internal13FlatAllocatorEENK3$_4clINS0_19EnumValueDescriptorENS0_24EnumValueDescriptorProtoEEEDaRKT_RKT0_:
 6180|    190|          *result, proto, [&](const auto& descriptor, const auto& proto) {
 6181|    190|            using OptionsT =
 6182|    190|                typename std::remove_const<typename std::remove_pointer<
 6183|    190|                    decltype(descriptor.options_)>::type>::type;
 6184|    190|            using DescriptorT =
 6185|    190|                typename std::remove_const<typename std::remove_reference<
 6186|    190|                    decltype(descriptor)>::type>::type;
 6187|       |
 6188|    190|            ResolveFeatures(
 6189|    190|                proto, const_cast<DescriptorT*>(&descriptor),
 6190|    190|                const_cast<  // NOLINT(google3-runtime-proto-const-cast)
 6191|    190|                    OptionsT*>(descriptor.options_),
 6192|    190|                alloc);
 6193|    190|          });
_ZN6google8protobuf17DescriptorBuilder15ResolveFeaturesINS0_19EnumValueDescriptorEEEvRKNT_5ProtoEPS4_PNS4_11OptionsTypeERNS0_8internal13FlatAllocatorE:
 5585|    190|    internal::FlatAllocator& alloc) {
 5586|    190|  ResolveFeaturesImpl(descriptor->file()->edition(), proto, descriptor, options,
 5587|    190|                      alloc, DescriptorPool::ErrorCollector::NAME);
 5588|    190|}
_ZN6google8protobuf17DescriptorBuilder19ResolveFeaturesImplINS0_19EnumValueDescriptorEEEvNS0_7EditionERKNT_5ProtoEPS5_PNS5_11OptionsTypeERNS0_8internal13FlatAllocatorENS0_14DescriptorPool14ErrorCollector13ErrorLocationEb:
 5537|    190|    bool force_merge) {
 5538|    190|  const FeatureSet& parent_features = GetParentFeatures(descriptor);
 5539|    190|  descriptor->proto_features_ = &FeatureSet::default_instance();
 5540|    190|  descriptor->merged_features_ = &FeatureSet::default_instance();
 5541|       |
 5542|    190|  ABSL_CHECK(feature_resolver_.has_value());
  ------------------
  |  |   41|    190|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|    380|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|    190|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    380|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|    380|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 190, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|    190|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 190]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|    380|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 190, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 190]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 190]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|    380|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|    380|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5543|       |
 5544|    190|  if (options->has_features()) {
  ------------------
  |  Branch (5544:7): [True: 0, False: 190]
  ------------------
 5545|       |    // Remove the features from the child's options proto to avoid leaking
 5546|       |    // internal details.
 5547|      0|    descriptor->proto_features_ =
 5548|      0|        tables_->InternFeatureSet(std::move(*options->mutable_features()));
 5549|      0|    options->clear_features();
 5550|      0|  }
 5551|       |
 5552|    190|  FeatureSet base_features = *descriptor->proto_features_;
 5553|       |
 5554|       |  // Handle feature inference from proto2/proto3.
 5555|    190|  if (IsLegacyEdition(edition)) {
  ------------------
  |  Branch (5555:7): [True: 190, False: 0]
  ------------------
 5556|    190|    if (descriptor->proto_features_ != &FeatureSet::default_instance()) {
  ------------------
  |  Branch (5556:9): [True: 0, False: 190]
  ------------------
 5557|      0|      AddError(descriptor->name(), proto, error_location,
 5558|      0|               "Features are only valid under editions.");
 5559|      0|    }
 5560|    190|  }
 5561|    190|  InferLegacyProtoFeatures(proto, *options, edition, base_features);
 5562|       |
 5563|    190|  if (base_features.ByteSizeLong() == 0 && !force_merge) {
  ------------------
  |  Branch (5563:7): [True: 190, False: 0]
  |  Branch (5563:44): [True: 190, False: 0]
  ------------------
 5564|       |    // Nothing to merge, and we aren't forcing it.
 5565|    190|    descriptor->merged_features_ = &parent_features;
 5566|    190|    return;
 5567|    190|  }
 5568|       |
 5569|       |  // Calculate the merged features for this target.
 5570|      0|  absl::StatusOr<FeatureSet> merged =
 5571|      0|      feature_resolver_->MergeFeatures(parent_features, base_features);
 5572|      0|  if (!merged.ok()) {
  ------------------
  |  Branch (5572:7): [True: 0, False: 0]
  ------------------
 5573|      0|    AddError(descriptor->name(), proto, error_location,
 5574|      0|             [&] { return std::string(merged.status().message()); });
 5575|      0|    return;
 5576|      0|  }
 5577|       |
 5578|      0|  descriptor->merged_features_ = tables_->InternFeatureSet(*std::move(merged));
 5579|      0|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117GetParentFeaturesEPKNS0_19EnumValueDescriptorE:
 1186|    190|const FeatureSet& GetParentFeatures(const EnumValueDescriptor* value) {
 1187|    190|  return internal::InternalFeatureHelper::GetFeatures(*value->type());
 1188|    190|}
descriptor.cc:_ZN6google8protobufL24InferLegacyProtoFeaturesINS0_24EnumValueDescriptorProtoENS0_16EnumValueOptionsEEEvRKT_RKT0_NS0_7EditionERNS0_10FeatureSetE:
 5483|    190|                                     FeatureSet& features) {}
descriptor.cc:_ZZN6google8protobuf17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS0_8internal13FlatAllocatorEENK3$_4clINS0_15FieldDescriptorENS0_20FieldDescriptorProtoEEEDaRKT_RKT0_:
 6180|    235|          *result, proto, [&](const auto& descriptor, const auto& proto) {
 6181|    235|            using OptionsT =
 6182|    235|                typename std::remove_const<typename std::remove_pointer<
 6183|    235|                    decltype(descriptor.options_)>::type>::type;
 6184|    235|            using DescriptorT =
 6185|    235|                typename std::remove_const<typename std::remove_reference<
 6186|    235|                    decltype(descriptor)>::type>::type;
 6187|       |
 6188|    235|            ResolveFeatures(
 6189|    235|                proto, const_cast<DescriptorT*>(&descriptor),
 6190|    235|                const_cast<  // NOLINT(google3-runtime-proto-const-cast)
 6191|    235|                    OptionsT*>(descriptor.options_),
 6192|    235|                alloc);
 6193|    235|          });
_ZN6google8protobuf17DescriptorBuilder15ResolveFeaturesINS0_15FieldDescriptorEEEvRKNT_5ProtoEPS4_PNS4_11OptionsTypeERNS0_8internal13FlatAllocatorE:
 5585|    235|    internal::FlatAllocator& alloc) {
 5586|    235|  ResolveFeaturesImpl(descriptor->file()->edition(), proto, descriptor, options,
 5587|    235|                      alloc, DescriptorPool::ErrorCollector::NAME);
 5588|    235|}
_ZN6google8protobuf17DescriptorBuilder19ResolveFeaturesImplINS0_15FieldDescriptorEEEvNS0_7EditionERKNT_5ProtoEPS5_PNS5_11OptionsTypeERNS0_8internal13FlatAllocatorENS0_14DescriptorPool14ErrorCollector13ErrorLocationEb:
 5537|    235|    bool force_merge) {
 5538|    235|  const FeatureSet& parent_features = GetParentFeatures(descriptor);
 5539|    235|  descriptor->proto_features_ = &FeatureSet::default_instance();
 5540|    235|  descriptor->merged_features_ = &FeatureSet::default_instance();
 5541|       |
 5542|    235|  ABSL_CHECK(feature_resolver_.has_value());
  ------------------
  |  |   41|    235|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|    470|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|    235|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    470|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|    470|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 235, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|    235|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 235]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|    470|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 235, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 235]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 235]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|    470|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|    470|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5543|       |
 5544|    235|  if (options->has_features()) {
  ------------------
  |  Branch (5544:7): [True: 0, False: 235]
  ------------------
 5545|       |    // Remove the features from the child's options proto to avoid leaking
 5546|       |    // internal details.
 5547|      0|    descriptor->proto_features_ =
 5548|      0|        tables_->InternFeatureSet(std::move(*options->mutable_features()));
 5549|      0|    options->clear_features();
 5550|      0|  }
 5551|       |
 5552|    235|  FeatureSet base_features = *descriptor->proto_features_;
 5553|       |
 5554|       |  // Handle feature inference from proto2/proto3.
 5555|    235|  if (IsLegacyEdition(edition)) {
  ------------------
  |  Branch (5555:7): [True: 235, False: 0]
  ------------------
 5556|    235|    if (descriptor->proto_features_ != &FeatureSet::default_instance()) {
  ------------------
  |  Branch (5556:9): [True: 0, False: 235]
  ------------------
 5557|      0|      AddError(descriptor->name(), proto, error_location,
 5558|      0|               "Features are only valid under editions.");
 5559|      0|    }
 5560|    235|  }
 5561|    235|  InferLegacyProtoFeatures(proto, *options, edition, base_features);
 5562|       |
 5563|    235|  if (base_features.ByteSizeLong() == 0 && !force_merge) {
  ------------------
  |  Branch (5563:7): [True: 0, False: 235]
  |  Branch (5563:44): [True: 0, False: 0]
  ------------------
 5564|       |    // Nothing to merge, and we aren't forcing it.
 5565|      0|    descriptor->merged_features_ = &parent_features;
 5566|      0|    return;
 5567|      0|  }
 5568|       |
 5569|       |  // Calculate the merged features for this target.
 5570|    235|  absl::StatusOr<FeatureSet> merged =
 5571|    235|      feature_resolver_->MergeFeatures(parent_features, base_features);
 5572|    235|  if (!merged.ok()) {
  ------------------
  |  Branch (5572:7): [True: 0, False: 235]
  ------------------
 5573|      0|    AddError(descriptor->name(), proto, error_location,
 5574|      0|             [&] { return std::string(merged.status().message()); });
 5575|      0|    return;
 5576|      0|  }
 5577|       |
 5578|    235|  descriptor->merged_features_ = tables_->InternFeatureSet(*std::move(merged));
 5579|    235|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117GetParentFeaturesEPKNS0_15FieldDescriptorE:
 1164|    235|const FeatureSet& GetParentFeatures(const FieldDescriptor* field) {
 1165|    235|  if (field->containing_oneof() != nullptr) {
  ------------------
  |  Branch (1165:7): [True: 5, False: 230]
  ------------------
 1166|      5|    return internal::InternalFeatureHelper::GetFeatures(
 1167|      5|        *field->containing_oneof());
 1168|    230|  } else if (field->is_extension()) {
  ------------------
  |  Branch (1168:14): [True: 1, False: 229]
  ------------------
 1169|      1|    if (field->extension_scope() == nullptr) {
  ------------------
  |  Branch (1169:9): [True: 1, False: 0]
  ------------------
 1170|      1|      return internal::InternalFeatureHelper::GetFeatures(*field->file());
 1171|      1|    }
 1172|      0|    return internal::InternalFeatureHelper::GetFeatures(
 1173|      0|        *field->extension_scope());
 1174|      1|  }
 1175|    229|  return internal::InternalFeatureHelper::GetFeatures(
 1176|    229|      *field->containing_type());
 1177|    235|}
descriptor.cc:_ZN6google8protobufL24InferLegacyProtoFeaturesERKNS0_20FieldDescriptorProtoERKNS0_12FieldOptionsENS0_7EditionERNS0_10FeatureSetE:
 5487|    235|                                     Edition edition, FeatureSet& features) {
 5488|    235|  if (!features.MutableExtension(pb::cpp)->has_string_type()) {
  ------------------
  |  Branch (5488:7): [True: 235, False: 0]
  ------------------
 5489|    235|    if (options.ctype() == FieldOptions::CORD) {
  ------------------
  |  Branch (5489:9): [True: 0, False: 235]
  ------------------
 5490|      0|      features.MutableExtension(pb::cpp)->set_string_type(
 5491|      0|          pb::CppFeatures::CORD);
 5492|      0|    }
 5493|    235|  }
 5494|       |
 5495|       |  // Everything below is specifically for proto2/proto.
 5496|    235|  if (!IsLegacyEdition(edition)) return;
  ------------------
  |  Branch (5496:7): [True: 0, False: 235]
  ------------------
 5497|       |
 5498|    235|  if (proto.label() == FieldDescriptorProto::LABEL_REQUIRED) {
  ------------------
  |  Branch (5498:7): [True: 2, False: 233]
  ------------------
 5499|      2|    features.set_field_presence(FeatureSet::LEGACY_REQUIRED);
 5500|      2|  }
 5501|    235|  if (proto.type() == FieldDescriptorProto::TYPE_GROUP) {
  ------------------
  |  Branch (5501:7): [True: 0, False: 235]
  ------------------
 5502|      0|    features.set_message_encoding(FeatureSet::DELIMITED);
 5503|      0|  }
 5504|    235|  if (options.packed()) {
  ------------------
  |  Branch (5504:7): [True: 3, False: 232]
  ------------------
 5505|      3|    features.set_repeated_field_encoding(FeatureSet::PACKED);
 5506|      3|  }
 5507|    235|  if (edition == Edition::EDITION_PROTO3) {
  ------------------
  |  Branch (5507:7): [True: 61, False: 174]
  ------------------
 5508|     61|    if (options.has_packed() && !options.packed()) {
  ------------------
  |  Branch (5508:9): [True: 0, False: 61]
  |  Branch (5508:33): [True: 0, False: 0]
  ------------------
 5509|      0|      features.set_repeated_field_encoding(FeatureSet::EXPANDED);
 5510|      0|    }
 5511|     61|  }
 5512|    235|}
descriptor.cc:_ZZN6google8protobuf17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS0_8internal13FlatAllocatorEENK3$_5clERKNS0_15FieldDescriptorE:
 6196|    235|    internal::VisitDescriptors(*result, [&](const FieldDescriptor& field) {
 6197|    235|      if (result->edition() >= Edition::EDITION_2024 &&
  ------------------
  |  Branch (6197:11): [True: 0, False: 235]
  ------------------
 6198|      0|          field.options().has_ctype()) {
  ------------------
  |  Branch (6198:11): [True: 0, False: 0]
  ------------------
 6199|       |        // "ctype" is no longer supported in edition 2024 and beyond.
 6200|      0|        AddError(
 6201|      0|            field.full_name(), proto, DescriptorPool::ErrorCollector::NAME,
 6202|      0|            "ctype option is not allowed under edition 2024 and beyond. Use "
 6203|      0|            "the feature string_type = VIEW|CORD|STRING|... instead.");
 6204|      0|      }
 6205|    235|      EnforceCTypeStringTypeConsistency(
 6206|    235|          field.file()->edition(), field.cpp_type(),
 6207|    235|          field.merged_features_->GetExtension(pb::cpp),
 6208|    235|          const_cast<  // NOLINT(google3-runtime-proto-const-cast)
 6209|    235|              FieldOptions&>(*field.options_));
 6210|    235|    });
descriptor.cc:_ZN6google8protobufL33EnforceCTypeStringTypeConsistencyENS0_7EditionENS0_8internal19FieldDescriptorLite7CppTypeERKN2pb11CppFeaturesERNS0_12FieldOptionsE:
 5518|    235|    const pb::CppFeatures& cpp_features, FieldOptions& options) {
 5519|    235|  if (&options == &FieldOptions::default_instance()) return;
  ------------------
  |  Branch (5519:7): [True: 218, False: 17]
  ------------------
 5520|     17|  if (type == FieldDescriptor::CPPTYPE_STRING) {
  ------------------
  |  Branch (5520:7): [True: 0, False: 17]
  ------------------
 5521|      0|    switch (cpp_features.string_type()) {
 5522|      0|      case pb::CppFeatures::CORD:
  ------------------
  |  Branch (5522:7): [True: 0, False: 0]
  ------------------
 5523|      0|        options.set_ctype(FieldOptions::CORD);
 5524|      0|        break;
 5525|      0|      default:
  ------------------
  |  Branch (5525:7): [True: 0, False: 0]
  ------------------
 5526|      0|        break;
 5527|      0|    }
 5528|      0|  }
 5529|     17|}
descriptor.cc:_ZZN6google8protobuf17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS0_8internal13FlatAllocatorEENK3$_6clERKNS0_15FieldDescriptorERKNS0_20FieldDescriptorProtoE:
 6215|    235|        [&](const FieldDescriptor& field, const FieldDescriptorProto& proto) {
 6216|    235|          PostProcessFieldFeatures(const_cast<FieldDescriptor&>(field), proto);
 6217|    235|        });
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE15AllocateStringsIJRKN4absl12lts_2024011611string_viewES9_EEEPKS9_DpOT_:
  416|    183|  const std::string* AllocateStrings(In&&... in) {
  417|    183|    std::string* strings = AllocateArray<std::string>(sizeof...(in));
  418|    183|    std::string* res = strings;
  419|    183|    Fold({(*strings++ = std::string(std::forward<In>(in)))...});
  420|    183|    return res;
  421|    183|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13AllocateArrayINS0_15OneofDescriptorEEEPT_i:
  400|     47|  U* AllocateArray(int array_size) {
  401|     47|    constexpr bool trivial = std::is_trivially_destructible<U>::value;
  402|     47|    using TypeToUse = typename std::conditional<trivial, char, U>::type;
  403|       |
  404|       |    // We can only allocate after FinalizePlanning has been called.
  405|     47|    ABSL_CHECK(has_allocated());
  ------------------
  |  |   41|     47|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|     94|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     47|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|     94|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|     94|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 47, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     47|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 47]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|     94|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 47, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 47]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 47]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|     94|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|     94|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  406|       |
  407|     47|    TypeToUse*& data = pointers_.template Get<TypeToUse>();
  408|     47|    int& used = used_.template Get<TypeToUse>();
  409|     47|    U* res = reinterpret_cast<U*>(data + used);
  410|     47|    used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size;
  ------------------
  |  Branch (410:13): [True: 47, Folded]
  ------------------
  411|     47|    ABSL_CHECK_LE(used, total_.template Get<TypeToUse>());
  ------------------
  |  |   54|     47|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   52|     47|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|     47|  while (                                                                      \
  |  |  |  |  |  |   62|     47|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 47]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|     47|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|     47|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|     47|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|     47|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|     47|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|     47|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  412|     47|    return res;
  413|     47|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13AllocateArrayINS0_10Descriptor13ReservedRangeEEEPT_i:
  400|     47|  U* AllocateArray(int array_size) {
  401|     47|    constexpr bool trivial = std::is_trivially_destructible<U>::value;
  402|     47|    using TypeToUse = typename std::conditional<trivial, char, U>::type;
  403|       |
  404|       |    // We can only allocate after FinalizePlanning has been called.
  405|     47|    ABSL_CHECK(has_allocated());
  ------------------
  |  |   41|     47|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|     94|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     47|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|     94|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|     94|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 47, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     47|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 47]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|     94|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 47, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 47]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 47]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|     94|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|     94|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  406|       |
  407|     47|    TypeToUse*& data = pointers_.template Get<TypeToUse>();
  408|     47|    int& used = used_.template Get<TypeToUse>();
  409|     47|    U* res = reinterpret_cast<U*>(data + used);
  410|     47|    used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size;
  ------------------
  |  Branch (410:13): [True: 47, Folded]
  ------------------
  411|     47|    ABSL_CHECK_LE(used, total_.template Get<TypeToUse>());
  ------------------
  |  |   54|     47|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   52|     47|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|     47|  while (                                                                      \
  |  |  |  |  |  |   62|     47|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 47]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|     47|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|     47|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|     47|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|     47|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|     47|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|     47|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  412|     47|    return res;
  413|     47|  }
_ZN6google8protobuf17DescriptorBuilder15AllocateOptionsINS0_10DescriptorEEEvRKNT_5ProtoEPS4_iN4absl12lts_2024011611string_viewERNS0_8internal13FlatAllocatorE:
 5396|     47|    internal::FlatAllocator& alloc) {
 5397|     47|  std::vector<int> options_path;
 5398|     47|  descriptor->GetLocationPath(&options_path);
 5399|     47|  options_path.push_back(options_field_tag);
 5400|     47|  auto options = AllocateOptionsImpl<DescriptorT>(
 5401|     47|      descriptor->full_name(), descriptor->full_name(), proto, options_path,
 5402|     47|      option_name, alloc);
 5403|     47|  descriptor->options_ = options;
 5404|     47|  descriptor->proto_features_ = &FeatureSet::default_instance();
 5405|     47|  descriptor->merged_features_ = &FeatureSet::default_instance();
 5406|     47|}
_ZN6google8protobuf17DescriptorBuilder19AllocateOptionsImplINS0_10DescriptorEEEPKNT_11OptionsTypeEN4absl12lts_2024011611string_viewESA_RKNS4_5ProtoENS9_4SpanIKiEESA_RNS0_8internal13FlatAllocatorE:
 5428|     47|    internal::FlatAllocator& alloc) {
 5429|     47|  if (!proto.has_options()) {
  ------------------
  |  Branch (5429:7): [True: 47, False: 0]
  ------------------
 5430|     47|    return &DescriptorT::OptionsType::default_instance();
 5431|     47|  }
 5432|      0|  const typename DescriptorT::OptionsType& orig_options = proto.options();
 5433|       |
 5434|      0|  auto* options = alloc.AllocateArray<typename DescriptorT::OptionsType>(1);
 5435|       |
 5436|      0|  if (!orig_options.IsInitialized()) {
  ------------------
  |  Branch (5436:7): [True: 0, False: 0]
  ------------------
 5437|      0|    AddError(absl::StrCat(name_scope, ".", element_name), orig_options,
 5438|      0|             DescriptorPool::ErrorCollector::OPTION_NAME,
 5439|      0|             "Uninterpreted option is missing name or value.");
 5440|      0|    return &DescriptorT::OptionsType::default_instance();
 5441|      0|  }
 5442|       |
 5443|      0|  const bool parse_success =
 5444|      0|      internal::ParseNoReflection(orig_options.SerializeAsString(), *options);
 5445|      0|  ABSL_DCHECK(parse_success);
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5446|       |
 5447|       |  // Don't add to options_to_interpret_ unless there were uninterpreted
 5448|       |  // options.  This not only avoids unnecessary work, but prevents a
 5449|       |  // bootstrapping problem when building descriptors for descriptor.proto.
 5450|       |  // descriptor.proto does not contain any uninterpreted options, but
 5451|       |  // attempting to interpret options anyway will cause
 5452|       |  // OptionsType::GetDescriptor() to be called which may then deadlock since
 5453|       |  // we're still trying to build it.
 5454|      0|  if (options->uninterpreted_option_size() > 0) {
  ------------------
  |  Branch (5454:7): [True: 0, False: 0]
  ------------------
 5455|      0|    options_to_interpret_.push_back(OptionsToInterpret(
 5456|      0|        name_scope, element_name, options_path, &orig_options, options));
 5457|      0|  }
 5458|       |
 5459|       |  // If the custom option is in unknown fields, no need to interpret it.
 5460|       |  // Remove the dependency file from unused_dependency.
 5461|      0|  const UnknownFieldSet& unknown_fields = orig_options.unknown_fields();
 5462|      0|  if (!unknown_fields.empty()) {
  ------------------
  |  Branch (5462:7): [True: 0, False: 0]
  ------------------
 5463|       |    // Can not use options->GetDescriptor() which may case deadlock.
 5464|      0|    Symbol msg_symbol = tables_->FindSymbol(option_name);
 5465|      0|    if (msg_symbol.type() == Symbol::MESSAGE) {
  ------------------
  |  Branch (5465:9): [True: 0, False: 0]
  ------------------
 5466|      0|      for (int i = 0; i < unknown_fields.field_count(); ++i) {
  ------------------
  |  Branch (5466:23): [True: 0, False: 0]
  ------------------
 5467|      0|        assert_mutex_held(pool_);
 5468|      0|        const FieldDescriptor* field =
 5469|      0|            pool_->InternalFindExtensionByNumberNoLock(
 5470|      0|                msg_symbol.descriptor(), unknown_fields.field(i).number());
 5471|      0|        if (field) {
  ------------------
  |  Branch (5471:13): [True: 0, False: 0]
  ------------------
 5472|      0|          unused_dependency_.erase(field->file());
 5473|      0|        }
 5474|      0|      }
 5475|      0|    }
 5476|      0|  }
 5477|      0|  return options;
 5478|      0|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13AllocateArrayIPKS9_EEPT_i:
  400|     71|  U* AllocateArray(int array_size) {
  401|     71|    constexpr bool trivial = std::is_trivially_destructible<U>::value;
  402|     71|    using TypeToUse = typename std::conditional<trivial, char, U>::type;
  403|       |
  404|       |    // We can only allocate after FinalizePlanning has been called.
  405|     71|    ABSL_CHECK(has_allocated());
  ------------------
  |  |   41|     71|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|    142|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     71|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    142|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|    142|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 71, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     71|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 71]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|    142|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 71, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 71]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 71]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|    142|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|    142|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  406|       |
  407|     71|    TypeToUse*& data = pointers_.template Get<TypeToUse>();
  408|     71|    int& used = used_.template Get<TypeToUse>();
  409|     71|    U* res = reinterpret_cast<U*>(data + used);
  410|     71|    used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size;
  ------------------
  |  Branch (410:13): [True: 71, Folded]
  ------------------
  411|     71|    ABSL_CHECK_LE(used, total_.template Get<TypeToUse>());
  ------------------
  |  |   54|     71|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   52|     71|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|     71|  while (                                                                      \
  |  |  |  |  |  |   62|     71|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 71]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|     71|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|     71|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|     71|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|     71|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|     71|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|     71|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  412|     71|    return res;
  413|     71|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE18AllocateFieldNamesEN4absl12lts_2024011611string_viewESP_PKS9_:
  470|    235|                                      const std::string* opt_json_name) {
  471|    235|    ABSL_CHECK(has_allocated());
  ------------------
  |  |   41|    235|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|    470|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|    235|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|    470|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|    470|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 235, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|    235|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 235]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|    470|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 235, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 235]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 235]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|    470|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|    470|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  472|       |
  473|    235|    std::string full_name =
  474|    235|        scope.empty() ? std::string(name) : absl::StrCat(scope, ".", name);
  ------------------
  |  Branch (474:9): [True: 0, False: 235]
  ------------------
  475|       |
  476|       |    // Fast path for snake_case names, which follow the style guide.
  477|    235|    if (opt_json_name == nullptr) {
  ------------------
  |  Branch (477:9): [True: 235, False: 0]
  ------------------
  478|    235|      switch (GetFieldNameCase(name)) {
  479|    110|        case FieldNameCase::kAllLower:
  ------------------
  |  Branch (479:9): [True: 110, False: 125]
  ------------------
  480|       |          // Case 1: they are all the same.
  481|    110|          return {AllocateStrings(name, std::move(full_name)), 0, 0, 0};
  482|    125|        case FieldNameCase::kSnakeCase:
  ------------------
  |  Branch (482:9): [True: 125, False: 110]
  ------------------
  483|       |          // Case 2: name==lower, camel==json
  484|    125|          return {AllocateStrings(name, std::move(full_name),
  485|    125|                                  ToCamelCase(name, /* lower_first = */ true)),
  486|    125|                  0, 2, 2};
  487|      0|        default:
  ------------------
  |  Branch (487:9): [True: 0, False: 235]
  ------------------
  488|      0|          break;
  489|    235|      }
  490|    235|    }
  491|       |
  492|      0|    std::vector<std::string> names;
  493|      0|    names.emplace_back(name);
  494|      0|    names.push_back(std::move(full_name));
  495|       |
  496|      0|    const auto push_name = [&](std::string new_name) {
  497|      0|      for (size_t i = 0; i < names.size(); ++i) {
  498|       |        // Do not compare the full_name. It is unlikely to match, except in
  499|       |        // custom json_name. We are not taking this into account in
  500|       |        // PlanFieldNames so better to not try it.
  501|      0|        if (i == 1) continue;
  502|      0|        if (names[i] == new_name) return i;
  503|      0|      }
  504|      0|      names.push_back(std::move(new_name));
  505|      0|      return names.size() - 1;
  506|      0|    };
  507|       |
  508|      0|    FieldNamesResult result{nullptr, 0, 0, 0};
  509|       |
  510|      0|    std::string lowercase_name = std::string(name);
  511|      0|    absl::AsciiStrToLower(&lowercase_name);
  512|      0|    result.lowercase_index = push_name(std::move(lowercase_name));
  513|      0|    result.camelcase_index =
  514|      0|        push_name(ToCamelCase(name, /* lower_first = */ true));
  515|      0|    result.json_index =
  516|      0|        push_name(opt_json_name != nullptr ? *opt_json_name : ToJsonName(name));
  ------------------
  |  Branch (516:19): [True: 0, False: 0]
  ------------------
  517|       |
  518|      0|    std::string* all_names = AllocateArray<std::string>(names.size());
  519|      0|    result.array = all_names;
  520|      0|    std::move(names.begin(), names.end(), all_names);
  521|       |
  522|      0|    return result;
  523|    235|  }
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE15AllocateStringsIJRKN4absl12lts_2024011611string_viewES9_S9_EEEPKS9_DpOT_:
  416|    125|  const std::string* AllocateStrings(In&&... in) {
  417|    125|    std::string* strings = AllocateArray<std::string>(sizeof...(in));
  418|    125|    std::string* res = strings;
  419|    125|    Fold({(*strings++ = std::string(std::forward<In>(in)))...});
  420|    125|    return res;
  421|    125|  }
_ZN6google8protobuf17DescriptorBuilder15AllocateOptionsINS0_15FieldDescriptorEEEvRKNT_5ProtoEPS4_iN4absl12lts_2024011611string_viewERNS0_8internal13FlatAllocatorE:
 5396|    235|    internal::FlatAllocator& alloc) {
 5397|    235|  std::vector<int> options_path;
 5398|    235|  descriptor->GetLocationPath(&options_path);
 5399|    235|  options_path.push_back(options_field_tag);
 5400|    235|  auto options = AllocateOptionsImpl<DescriptorT>(
 5401|    235|      descriptor->full_name(), descriptor->full_name(), proto, options_path,
 5402|    235|      option_name, alloc);
 5403|    235|  descriptor->options_ = options;
 5404|    235|  descriptor->proto_features_ = &FeatureSet::default_instance();
 5405|    235|  descriptor->merged_features_ = &FeatureSet::default_instance();
 5406|    235|}
_ZN6google8protobuf17DescriptorBuilder19AllocateOptionsImplINS0_15FieldDescriptorEEEPKNT_11OptionsTypeEN4absl12lts_2024011611string_viewESA_RKNS4_5ProtoENS9_4SpanIKiEESA_RNS0_8internal13FlatAllocatorE:
 5428|    235|    internal::FlatAllocator& alloc) {
 5429|    235|  if (!proto.has_options()) {
  ------------------
  |  Branch (5429:7): [True: 218, False: 17]
  ------------------
 5430|    218|    return &DescriptorT::OptionsType::default_instance();
 5431|    218|  }
 5432|     17|  const typename DescriptorT::OptionsType& orig_options = proto.options();
 5433|       |
 5434|     17|  auto* options = alloc.AllocateArray<typename DescriptorT::OptionsType>(1);
 5435|       |
 5436|     17|  if (!orig_options.IsInitialized()) {
  ------------------
  |  Branch (5436:7): [True: 0, False: 17]
  ------------------
 5437|      0|    AddError(absl::StrCat(name_scope, ".", element_name), orig_options,
 5438|      0|             DescriptorPool::ErrorCollector::OPTION_NAME,
 5439|      0|             "Uninterpreted option is missing name or value.");
 5440|      0|    return &DescriptorT::OptionsType::default_instance();
 5441|      0|  }
 5442|       |
 5443|     17|  const bool parse_success =
 5444|     17|      internal::ParseNoReflection(orig_options.SerializeAsString(), *options);
 5445|     17|  ABSL_DCHECK(parse_success);
  ------------------
  |  |   47|     17|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|     17|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|     34|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|     17|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|     34|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|     34|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 17, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|     17|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 17]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|     17|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 17, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     34|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|     34|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5446|       |
 5447|       |  // Don't add to options_to_interpret_ unless there were uninterpreted
 5448|       |  // options.  This not only avoids unnecessary work, but prevents a
 5449|       |  // bootstrapping problem when building descriptors for descriptor.proto.
 5450|       |  // descriptor.proto does not contain any uninterpreted options, but
 5451|       |  // attempting to interpret options anyway will cause
 5452|       |  // OptionsType::GetDescriptor() to be called which may then deadlock since
 5453|       |  // we're still trying to build it.
 5454|     17|  if (options->uninterpreted_option_size() > 0) {
  ------------------
  |  Branch (5454:7): [True: 0, False: 17]
  ------------------
 5455|      0|    options_to_interpret_.push_back(OptionsToInterpret(
 5456|      0|        name_scope, element_name, options_path, &orig_options, options));
 5457|      0|  }
 5458|       |
 5459|       |  // If the custom option is in unknown fields, no need to interpret it.
 5460|       |  // Remove the dependency file from unused_dependency.
 5461|     17|  const UnknownFieldSet& unknown_fields = orig_options.unknown_fields();
 5462|     17|  if (!unknown_fields.empty()) {
  ------------------
  |  Branch (5462:7): [True: 0, False: 17]
  ------------------
 5463|       |    // Can not use options->GetDescriptor() which may case deadlock.
 5464|      0|    Symbol msg_symbol = tables_->FindSymbol(option_name);
 5465|      0|    if (msg_symbol.type() == Symbol::MESSAGE) {
  ------------------
  |  Branch (5465:9): [True: 0, False: 0]
  ------------------
 5466|      0|      for (int i = 0; i < unknown_fields.field_count(); ++i) {
  ------------------
  |  Branch (5466:23): [True: 0, False: 0]
  ------------------
 5467|      0|        assert_mutex_held(pool_);
 5468|      0|        const FieldDescriptor* field =
 5469|      0|            pool_->InternalFindExtensionByNumberNoLock(
 5470|      0|                msg_symbol.descriptor(), unknown_fields.field(i).number());
 5471|      0|        if (field) {
  ------------------
  |  Branch (5471:13): [True: 0, False: 0]
  ------------------
 5472|      0|          unused_dependency_.erase(field->file());
 5473|      0|        }
 5474|      0|      }
 5475|      0|    }
 5476|      0|  }
 5477|     17|  return options;
 5478|     17|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13AllocateArrayISE_EEPT_i:
  400|     17|  U* AllocateArray(int array_size) {
  401|     17|    constexpr bool trivial = std::is_trivially_destructible<U>::value;
  402|     17|    using TypeToUse = typename std::conditional<trivial, char, U>::type;
  403|       |
  404|       |    // We can only allocate after FinalizePlanning has been called.
  405|     17|    ABSL_CHECK(has_allocated());
  ------------------
  |  |   41|     17|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|     34|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     17|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|     34|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|     34|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 17, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     17|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 17]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|     34|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 17, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 17]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 17]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|     34|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|     34|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  406|       |
  407|     17|    TypeToUse*& data = pointers_.template Get<TypeToUse>();
  408|     17|    int& used = used_.template Get<TypeToUse>();
  409|     17|    U* res = reinterpret_cast<U*>(data + used);
  410|     17|    used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size;
  ------------------
  |  Branch (410:13): [Folded, False: 17]
  ------------------
  411|     17|    ABSL_CHECK_LE(used, total_.template Get<TypeToUse>());
  ------------------
  |  |   54|     17|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   52|     17|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|     17|  while (                                                                      \
  |  |  |  |  |  |   62|     17|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 17]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|     17|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|     17|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|     17|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|     17|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|     17|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|     17|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  412|     17|    return res;
  413|     17|  }
_ZN6google8protobuf17DescriptorBuilder15AllocateOptionsINS0_10Descriptor14ExtensionRangeEEEvRKNT_5ProtoEPS5_iN4absl12lts_2024011611string_viewERNS0_8internal13FlatAllocatorE:
 5396|     14|    internal::FlatAllocator& alloc) {
 5397|     14|  std::vector<int> options_path;
 5398|     14|  descriptor->GetLocationPath(&options_path);
 5399|     14|  options_path.push_back(options_field_tag);
 5400|     14|  auto options = AllocateOptionsImpl<DescriptorT>(
 5401|     14|      descriptor->full_name(), descriptor->full_name(), proto, options_path,
 5402|     14|      option_name, alloc);
 5403|     14|  descriptor->options_ = options;
 5404|     14|  descriptor->proto_features_ = &FeatureSet::default_instance();
 5405|     14|  descriptor->merged_features_ = &FeatureSet::default_instance();
 5406|     14|}
_ZN6google8protobuf17DescriptorBuilder19AllocateOptionsImplINS0_10Descriptor14ExtensionRangeEEEPKNT_11OptionsTypeEN4absl12lts_2024011611string_viewESB_RKNS5_5ProtoENSA_4SpanIKiEESB_RNS0_8internal13FlatAllocatorE:
 5428|     14|    internal::FlatAllocator& alloc) {
 5429|     14|  if (!proto.has_options()) {
  ------------------
  |  Branch (5429:7): [True: 14, False: 0]
  ------------------
 5430|     14|    return &DescriptorT::OptionsType::default_instance();
 5431|     14|  }
 5432|      0|  const typename DescriptorT::OptionsType& orig_options = proto.options();
 5433|       |
 5434|      0|  auto* options = alloc.AllocateArray<typename DescriptorT::OptionsType>(1);
 5435|       |
 5436|      0|  if (!orig_options.IsInitialized()) {
  ------------------
  |  Branch (5436:7): [True: 0, False: 0]
  ------------------
 5437|      0|    AddError(absl::StrCat(name_scope, ".", element_name), orig_options,
 5438|      0|             DescriptorPool::ErrorCollector::OPTION_NAME,
 5439|      0|             "Uninterpreted option is missing name or value.");
 5440|      0|    return &DescriptorT::OptionsType::default_instance();
 5441|      0|  }
 5442|       |
 5443|      0|  const bool parse_success =
 5444|      0|      internal::ParseNoReflection(orig_options.SerializeAsString(), *options);
 5445|      0|  ABSL_DCHECK(parse_success);
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5446|       |
 5447|       |  // Don't add to options_to_interpret_ unless there were uninterpreted
 5448|       |  // options.  This not only avoids unnecessary work, but prevents a
 5449|       |  // bootstrapping problem when building descriptors for descriptor.proto.
 5450|       |  // descriptor.proto does not contain any uninterpreted options, but
 5451|       |  // attempting to interpret options anyway will cause
 5452|       |  // OptionsType::GetDescriptor() to be called which may then deadlock since
 5453|       |  // we're still trying to build it.
 5454|      0|  if (options->uninterpreted_option_size() > 0) {
  ------------------
  |  Branch (5454:7): [True: 0, False: 0]
  ------------------
 5455|      0|    options_to_interpret_.push_back(OptionsToInterpret(
 5456|      0|        name_scope, element_name, options_path, &orig_options, options));
 5457|      0|  }
 5458|       |
 5459|       |  // If the custom option is in unknown fields, no need to interpret it.
 5460|       |  // Remove the dependency file from unused_dependency.
 5461|      0|  const UnknownFieldSet& unknown_fields = orig_options.unknown_fields();
 5462|      0|  if (!unknown_fields.empty()) {
  ------------------
  |  Branch (5462:7): [True: 0, False: 0]
  ------------------
 5463|       |    // Can not use options->GetDescriptor() which may case deadlock.
 5464|      0|    Symbol msg_symbol = tables_->FindSymbol(option_name);
 5465|      0|    if (msg_symbol.type() == Symbol::MESSAGE) {
  ------------------
  |  Branch (5465:9): [True: 0, False: 0]
  ------------------
 5466|      0|      for (int i = 0; i < unknown_fields.field_count(); ++i) {
  ------------------
  |  Branch (5466:23): [True: 0, False: 0]
  ------------------
 5467|      0|        assert_mutex_held(pool_);
 5468|      0|        const FieldDescriptor* field =
 5469|      0|            pool_->InternalFindExtensionByNumberNoLock(
 5470|      0|                msg_symbol.descriptor(), unknown_fields.field(i).number());
 5471|      0|        if (field) {
  ------------------
  |  Branch (5471:13): [True: 0, False: 0]
  ------------------
 5472|      0|          unused_dependency_.erase(field->file());
 5473|      0|        }
 5474|      0|      }
 5475|      0|    }
 5476|      0|  }
 5477|      0|  return options;
 5478|      0|}
_ZN6google8protobuf17DescriptorBuilder15AllocateOptionsINS0_15OneofDescriptorEEEvRKNT_5ProtoEPS4_iN4absl12lts_2024011611string_viewERNS0_8internal13FlatAllocatorE:
 5396|      2|    internal::FlatAllocator& alloc) {
 5397|      2|  std::vector<int> options_path;
 5398|      2|  descriptor->GetLocationPath(&options_path);
 5399|      2|  options_path.push_back(options_field_tag);
 5400|      2|  auto options = AllocateOptionsImpl<DescriptorT>(
 5401|      2|      descriptor->full_name(), descriptor->full_name(), proto, options_path,
 5402|      2|      option_name, alloc);
 5403|      2|  descriptor->options_ = options;
 5404|      2|  descriptor->proto_features_ = &FeatureSet::default_instance();
 5405|      2|  descriptor->merged_features_ = &FeatureSet::default_instance();
 5406|      2|}
_ZN6google8protobuf17DescriptorBuilder19AllocateOptionsImplINS0_15OneofDescriptorEEEPKNT_11OptionsTypeEN4absl12lts_2024011611string_viewESA_RKNS4_5ProtoENS9_4SpanIKiEESA_RNS0_8internal13FlatAllocatorE:
 5428|      2|    internal::FlatAllocator& alloc) {
 5429|      2|  if (!proto.has_options()) {
  ------------------
  |  Branch (5429:7): [True: 2, False: 0]
  ------------------
 5430|      2|    return &DescriptorT::OptionsType::default_instance();
 5431|      2|  }
 5432|      0|  const typename DescriptorT::OptionsType& orig_options = proto.options();
 5433|       |
 5434|      0|  auto* options = alloc.AllocateArray<typename DescriptorT::OptionsType>(1);
 5435|       |
 5436|      0|  if (!orig_options.IsInitialized()) {
  ------------------
  |  Branch (5436:7): [True: 0, False: 0]
  ------------------
 5437|      0|    AddError(absl::StrCat(name_scope, ".", element_name), orig_options,
 5438|      0|             DescriptorPool::ErrorCollector::OPTION_NAME,
 5439|      0|             "Uninterpreted option is missing name or value.");
 5440|      0|    return &DescriptorT::OptionsType::default_instance();
 5441|      0|  }
 5442|       |
 5443|      0|  const bool parse_success =
 5444|      0|      internal::ParseNoReflection(orig_options.SerializeAsString(), *options);
 5445|      0|  ABSL_DCHECK(parse_success);
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5446|       |
 5447|       |  // Don't add to options_to_interpret_ unless there were uninterpreted
 5448|       |  // options.  This not only avoids unnecessary work, but prevents a
 5449|       |  // bootstrapping problem when building descriptors for descriptor.proto.
 5450|       |  // descriptor.proto does not contain any uninterpreted options, but
 5451|       |  // attempting to interpret options anyway will cause
 5452|       |  // OptionsType::GetDescriptor() to be called which may then deadlock since
 5453|       |  // we're still trying to build it.
 5454|      0|  if (options->uninterpreted_option_size() > 0) {
  ------------------
  |  Branch (5454:7): [True: 0, False: 0]
  ------------------
 5455|      0|    options_to_interpret_.push_back(OptionsToInterpret(
 5456|      0|        name_scope, element_name, options_path, &orig_options, options));
 5457|      0|  }
 5458|       |
 5459|       |  // If the custom option is in unknown fields, no need to interpret it.
 5460|       |  // Remove the dependency file from unused_dependency.
 5461|      0|  const UnknownFieldSet& unknown_fields = orig_options.unknown_fields();
 5462|      0|  if (!unknown_fields.empty()) {
  ------------------
  |  Branch (5462:7): [True: 0, False: 0]
  ------------------
 5463|       |    // Can not use options->GetDescriptor() which may case deadlock.
 5464|      0|    Symbol msg_symbol = tables_->FindSymbol(option_name);
 5465|      0|    if (msg_symbol.type() == Symbol::MESSAGE) {
  ------------------
  |  Branch (5465:9): [True: 0, False: 0]
  ------------------
 5466|      0|      for (int i = 0; i < unknown_fields.field_count(); ++i) {
  ------------------
  |  Branch (5466:23): [True: 0, False: 0]
  ------------------
 5467|      0|        assert_mutex_held(pool_);
 5468|      0|        const FieldDescriptor* field =
 5469|      0|            pool_->InternalFindExtensionByNumberNoLock(
 5470|      0|                msg_symbol.descriptor(), unknown_fields.field(i).number());
 5471|      0|        if (field) {
  ------------------
  |  Branch (5471:13): [True: 0, False: 0]
  ------------------
 5472|      0|          unused_dependency_.erase(field->file());
 5473|      0|        }
 5474|      0|      }
 5475|      0|    }
 5476|      0|  }
 5477|      0|  return options;
 5478|      0|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13AllocateArrayINS0_14EnumDescriptor13ReservedRangeEEEPT_i:
  400|     24|  U* AllocateArray(int array_size) {
  401|     24|    constexpr bool trivial = std::is_trivially_destructible<U>::value;
  402|     24|    using TypeToUse = typename std::conditional<trivial, char, U>::type;
  403|       |
  404|       |    // We can only allocate after FinalizePlanning has been called.
  405|     24|    ABSL_CHECK(has_allocated());
  ------------------
  |  |   41|     24|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|     48|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|     24|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|     48|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|     48|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 24, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|     24|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 24]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|     48|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 24, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 24]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 24]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|     48|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|     48|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  406|       |
  407|     24|    TypeToUse*& data = pointers_.template Get<TypeToUse>();
  408|     24|    int& used = used_.template Get<TypeToUse>();
  409|     24|    U* res = reinterpret_cast<U*>(data + used);
  410|     24|    used += trivial ? RoundUpTo<8>(array_size * sizeof(U)) : array_size;
  ------------------
  |  Branch (410:13): [True: 24, Folded]
  ------------------
  411|     24|    ABSL_CHECK_LE(used, total_.template Get<TypeToUse>());
  ------------------
  |  |   54|     24|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   52|     24|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|     24|  while (                                                                      \
  |  |  |  |  |  |   62|     24|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 24]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|     24|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|     24|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|     24|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|     24|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|     24|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|     24|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  412|     24|    return res;
  413|     24|  }
_ZN6google8protobuf17DescriptorBuilder15AllocateOptionsINS0_14EnumDescriptorEEEvRKNT_5ProtoEPS4_iN4absl12lts_2024011611string_viewERNS0_8internal13FlatAllocatorE:
 5396|     24|    internal::FlatAllocator& alloc) {
 5397|     24|  std::vector<int> options_path;
 5398|     24|  descriptor->GetLocationPath(&options_path);
 5399|     24|  options_path.push_back(options_field_tag);
 5400|     24|  auto options = AllocateOptionsImpl<DescriptorT>(
 5401|     24|      descriptor->full_name(), descriptor->full_name(), proto, options_path,
 5402|     24|      option_name, alloc);
 5403|     24|  descriptor->options_ = options;
 5404|     24|  descriptor->proto_features_ = &FeatureSet::default_instance();
 5405|     24|  descriptor->merged_features_ = &FeatureSet::default_instance();
 5406|     24|}
_ZN6google8protobuf17DescriptorBuilder19AllocateOptionsImplINS0_14EnumDescriptorEEEPKNT_11OptionsTypeEN4absl12lts_2024011611string_viewESA_RKNS4_5ProtoENS9_4SpanIKiEESA_RNS0_8internal13FlatAllocatorE:
 5428|     24|    internal::FlatAllocator& alloc) {
 5429|     24|  if (!proto.has_options()) {
  ------------------
  |  Branch (5429:7): [True: 24, False: 0]
  ------------------
 5430|     24|    return &DescriptorT::OptionsType::default_instance();
 5431|     24|  }
 5432|      0|  const typename DescriptorT::OptionsType& orig_options = proto.options();
 5433|       |
 5434|      0|  auto* options = alloc.AllocateArray<typename DescriptorT::OptionsType>(1);
 5435|       |
 5436|      0|  if (!orig_options.IsInitialized()) {
  ------------------
  |  Branch (5436:7): [True: 0, False: 0]
  ------------------
 5437|      0|    AddError(absl::StrCat(name_scope, ".", element_name), orig_options,
 5438|      0|             DescriptorPool::ErrorCollector::OPTION_NAME,
 5439|      0|             "Uninterpreted option is missing name or value.");
 5440|      0|    return &DescriptorT::OptionsType::default_instance();
 5441|      0|  }
 5442|       |
 5443|      0|  const bool parse_success =
 5444|      0|      internal::ParseNoReflection(orig_options.SerializeAsString(), *options);
 5445|      0|  ABSL_DCHECK(parse_success);
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5446|       |
 5447|       |  // Don't add to options_to_interpret_ unless there were uninterpreted
 5448|       |  // options.  This not only avoids unnecessary work, but prevents a
 5449|       |  // bootstrapping problem when building descriptors for descriptor.proto.
 5450|       |  // descriptor.proto does not contain any uninterpreted options, but
 5451|       |  // attempting to interpret options anyway will cause
 5452|       |  // OptionsType::GetDescriptor() to be called which may then deadlock since
 5453|       |  // we're still trying to build it.
 5454|      0|  if (options->uninterpreted_option_size() > 0) {
  ------------------
  |  Branch (5454:7): [True: 0, False: 0]
  ------------------
 5455|      0|    options_to_interpret_.push_back(OptionsToInterpret(
 5456|      0|        name_scope, element_name, options_path, &orig_options, options));
 5457|      0|  }
 5458|       |
 5459|       |  // If the custom option is in unknown fields, no need to interpret it.
 5460|       |  // Remove the dependency file from unused_dependency.
 5461|      0|  const UnknownFieldSet& unknown_fields = orig_options.unknown_fields();
 5462|      0|  if (!unknown_fields.empty()) {
  ------------------
  |  Branch (5462:7): [True: 0, False: 0]
  ------------------
 5463|       |    // Can not use options->GetDescriptor() which may case deadlock.
 5464|      0|    Symbol msg_symbol = tables_->FindSymbol(option_name);
 5465|      0|    if (msg_symbol.type() == Symbol::MESSAGE) {
  ------------------
  |  Branch (5465:9): [True: 0, False: 0]
  ------------------
 5466|      0|      for (int i = 0; i < unknown_fields.field_count(); ++i) {
  ------------------
  |  Branch (5466:23): [True: 0, False: 0]
  ------------------
 5467|      0|        assert_mutex_held(pool_);
 5468|      0|        const FieldDescriptor* field =
 5469|      0|            pool_->InternalFindExtensionByNumberNoLock(
 5470|      0|                msg_symbol.descriptor(), unknown_fields.field(i).number());
 5471|      0|        if (field) {
  ------------------
  |  Branch (5471:13): [True: 0, False: 0]
  ------------------
 5472|      0|          unused_dependency_.erase(field->file());
 5473|      0|        }
 5474|      0|      }
 5475|      0|    }
 5476|      0|  }
 5477|      0|  return options;
 5478|      0|}
descriptor.cc:_ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_10FeatureSetENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE15AllocateStringsIJRKS9_S9_EEEPSO_DpOT_:
  416|    190|  const std::string* AllocateStrings(In&&... in) {
  417|    190|    std::string* strings = AllocateArray<std::string>(sizeof...(in));
  418|    190|    std::string* res = strings;
  419|    190|    Fold({(*strings++ = std::string(std::forward<In>(in)))...});
  420|    190|    return res;
  421|    190|  }
_ZN6google8protobuf17DescriptorBuilder15AllocateOptionsINS0_19EnumValueDescriptorEEEvRKNT_5ProtoEPS4_iN4absl12lts_2024011611string_viewERNS0_8internal13FlatAllocatorE:
 5396|    190|    internal::FlatAllocator& alloc) {
 5397|    190|  std::vector<int> options_path;
 5398|    190|  descriptor->GetLocationPath(&options_path);
 5399|    190|  options_path.push_back(options_field_tag);
 5400|    190|  auto options = AllocateOptionsImpl<DescriptorT>(
 5401|    190|      descriptor->full_name(), descriptor->full_name(), proto, options_path,
 5402|    190|      option_name, alloc);
 5403|    190|  descriptor->options_ = options;
 5404|    190|  descriptor->proto_features_ = &FeatureSet::default_instance();
 5405|    190|  descriptor->merged_features_ = &FeatureSet::default_instance();
 5406|    190|}
_ZN6google8protobuf17DescriptorBuilder19AllocateOptionsImplINS0_19EnumValueDescriptorEEEPKNT_11OptionsTypeEN4absl12lts_2024011611string_viewESA_RKNS4_5ProtoENS9_4SpanIKiEESA_RNS0_8internal13FlatAllocatorE:
 5428|    190|    internal::FlatAllocator& alloc) {
 5429|    190|  if (!proto.has_options()) {
  ------------------
  |  Branch (5429:7): [True: 190, False: 0]
  ------------------
 5430|    190|    return &DescriptorT::OptionsType::default_instance();
 5431|    190|  }
 5432|      0|  const typename DescriptorT::OptionsType& orig_options = proto.options();
 5433|       |
 5434|      0|  auto* options = alloc.AllocateArray<typename DescriptorT::OptionsType>(1);
 5435|       |
 5436|      0|  if (!orig_options.IsInitialized()) {
  ------------------
  |  Branch (5436:7): [True: 0, False: 0]
  ------------------
 5437|      0|    AddError(absl::StrCat(name_scope, ".", element_name), orig_options,
 5438|      0|             DescriptorPool::ErrorCollector::OPTION_NAME,
 5439|      0|             "Uninterpreted option is missing name or value.");
 5440|      0|    return &DescriptorT::OptionsType::default_instance();
 5441|      0|  }
 5442|       |
 5443|      0|  const bool parse_success =
 5444|      0|      internal::ParseNoReflection(orig_options.SerializeAsString(), *options);
 5445|      0|  ABSL_DCHECK(parse_success);
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5446|       |
 5447|       |  // Don't add to options_to_interpret_ unless there were uninterpreted
 5448|       |  // options.  This not only avoids unnecessary work, but prevents a
 5449|       |  // bootstrapping problem when building descriptors for descriptor.proto.
 5450|       |  // descriptor.proto does not contain any uninterpreted options, but
 5451|       |  // attempting to interpret options anyway will cause
 5452|       |  // OptionsType::GetDescriptor() to be called which may then deadlock since
 5453|       |  // we're still trying to build it.
 5454|      0|  if (options->uninterpreted_option_size() > 0) {
  ------------------
  |  Branch (5454:7): [True: 0, False: 0]
  ------------------
 5455|      0|    options_to_interpret_.push_back(OptionsToInterpret(
 5456|      0|        name_scope, element_name, options_path, &orig_options, options));
 5457|      0|  }
 5458|       |
 5459|       |  // If the custom option is in unknown fields, no need to interpret it.
 5460|       |  // Remove the dependency file from unused_dependency.
 5461|      0|  const UnknownFieldSet& unknown_fields = orig_options.unknown_fields();
 5462|      0|  if (!unknown_fields.empty()) {
  ------------------
  |  Branch (5462:7): [True: 0, False: 0]
  ------------------
 5463|       |    // Can not use options->GetDescriptor() which may case deadlock.
 5464|      0|    Symbol msg_symbol = tables_->FindSymbol(option_name);
 5465|      0|    if (msg_symbol.type() == Symbol::MESSAGE) {
  ------------------
  |  Branch (5465:9): [True: 0, False: 0]
  ------------------
 5466|      0|      for (int i = 0; i < unknown_fields.field_count(); ++i) {
  ------------------
  |  Branch (5466:23): [True: 0, False: 0]
  ------------------
 5467|      0|        assert_mutex_held(pool_);
 5468|      0|        const FieldDescriptor* field =
 5469|      0|            pool_->InternalFindExtensionByNumberNoLock(
 5470|      0|                msg_symbol.descriptor(), unknown_fields.field(i).number());
 5471|      0|        if (field) {
  ------------------
  |  Branch (5471:13): [True: 0, False: 0]
  ------------------
 5472|      0|          unused_dependency_.erase(field->file());
 5473|      0|        }
 5474|      0|      }
 5475|      0|    }
 5476|      0|  }
 5477|      0|  return options;
 5478|      0|}

_ZNK6google8protobuf10Descriptor14ExtensionRange12start_numberEv:
  493|    130|    int start_number() const { return start_; }
_ZNK6google8protobuf10Descriptor14ExtensionRange10end_numberEv:
  496|     31|    int end_number() const { return end_; }
_ZNK6google8protobuf10Descriptor14ExtensionRange9full_nameEv:
  511|     28|    internal::DescriptorStringView full_name() const {
  512|     28|      return containing_type_->full_name();
  513|     28|    }
_ZNK6google8protobuf10Descriptor14ExtensionRange4fileEv:
  517|     14|    const FileDescriptor* file() const { return containing_type_->file(); }
_ZNK6google8protobuf10Descriptor14ExtensionRange15containing_typeEv:
  521|     28|    const Descriptor* containing_type() const { return containing_type_; }
_ZNK6google8protobuf10Descriptor8featuresEv:
  667|    272|  const FeatureSet& features() const { return *merged_features_; }
_ZNK6google8protobuf15FieldDescriptor8featuresEv:
 1077|   142k|  const FeatureSet& features() const { return *merged_features_; }
_ZNK6google8protobuf15OneofDescriptor8featuresEv:
 1261|      5|  const FeatureSet& features() const { return *merged_features_; }
_ZNK6google8protobuf14EnumDescriptor8featuresEv:
 1436|    190|  const FeatureSet& features() const { return *merged_features_; }
_ZNK6google8protobuf14FileDescriptor8featuresEv:
 1992|     45|  const FeatureSet& features() const { return *merged_features_; }
_ZN6google8protobuf14DescriptorPool34InternalSetLazilyBuildDependenciesEv:
 2356|      2|  void InternalSetLazilyBuildDependencies() {
 2357|      2|    lazily_build_dependencies_ = true;
 2358|       |    // This needs to be set when lazily building dependencies, as it breaks
 2359|       |    // dependency checking.
 2360|      2|    InternalDontEnforceDependencies();
 2361|      2|  }
_ZNK6google8protobuf10Descriptor4nameEv:
 2520|    171|  inline internal::DescriptorStringView CLASS::name() const {      \
 2521|    171|    return all_names_[0];                                          \
 2522|    171|  }                                                                \
_ZNK6google8protobuf10Descriptor9full_nameEv:
 2523|    743|  inline internal::DescriptorStringView CLASS::full_name() const { \
 2524|    743|    return all_names_[1];                                          \
 2525|    743|  }
_ZNK6google8protobuf10Descriptor15containing_typeEv:
 2510|    663|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf10Descriptor16oneof_decl_countEv:
 2510|    299|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf10Descriptor17nested_type_countEv:
 2510|    342|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf10Descriptor15enum_type_countEv:
 2510|    320|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf10Descriptor10oneof_declEi:
 2529|     15|  inline TYPE CLASS::FIELD(int index) const {              \
 2530|     15|    ABSL_DCHECK_LE(0, index);                              \
  ------------------
  |  |   78|     15|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   90|     15|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     15|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 15]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2531|     15|    ABSL_DCHECK_LT(index, FIELD##_count());                \
  ------------------
  |  |   80|     15|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|     15|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     15|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 15]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2532|     15|    return FIELD##s_ + index;                              \
 2533|     15|  }
_ZNK6google8protobuf10Descriptor11nested_typeEi:
 2529|     50|  inline TYPE CLASS::FIELD(int index) const {              \
 2530|     50|    ABSL_DCHECK_LE(0, index);                              \
  ------------------
  |  |   78|     50|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   90|     50|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     50|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 50]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     50|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2531|     50|    ABSL_DCHECK_LT(index, FIELD##_count());                \
  ------------------
  |  |   80|     50|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|     50|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     50|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 50]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     50|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2532|     50|    return FIELD##s_ + index;                              \
 2533|     50|  }
_ZNK6google8protobuf10Descriptor9enum_typeEi:
 2529|     85|  inline TYPE CLASS::FIELD(int index) const {              \
 2530|     85|    ABSL_DCHECK_LE(0, index);                              \
  ------------------
  |  |   78|     85|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   90|     85|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     85|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 85]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     85|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2531|     85|    ABSL_DCHECK_LT(index, FIELD##_count());                \
  ------------------
  |  |   80|     85|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|     85|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     85|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 85]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     85|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2532|     85|    return FIELD##s_ + index;                              \
 2533|     85|  }
_ZNK6google8protobuf10Descriptor21extension_range_countEv:
 2510|    642|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf10Descriptor15extension_countEv:
 2510|    235|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf10Descriptor15extension_rangeEi:
 2529|    161|  inline TYPE CLASS::FIELD(int index) const {              \
 2530|    161|    ABSL_DCHECK_LE(0, index);                              \
  ------------------
  |  |   78|    161|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   90|    161|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    161|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 161]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    161|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2531|    161|    ABSL_DCHECK_LT(index, FIELD##_count());                \
  ------------------
  |  |   80|    161|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|    161|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    161|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 161]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    161|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2532|    161|    return FIELD##s_ + index;                              \
 2533|    161|  }
_ZNK6google8protobuf10Descriptor20reserved_range_countEv:
 2510|    388|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf10Descriptor14reserved_rangeEi:
 2529|    140|  inline TYPE CLASS::FIELD(int index) const {              \
 2530|    140|    ABSL_DCHECK_LE(0, index);                              \
  ------------------
  |  |   78|    140|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   90|    140|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    140|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 140]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    140|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2531|    140|    ABSL_DCHECK_LT(index, FIELD##_count());                \
  ------------------
  |  |   80|    140|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|    140|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    140|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 140]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    140|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2532|    140|    return FIELD##s_ + index;                              \
 2533|    140|  }
_ZNK6google8protobuf15FieldDescriptor4nameEv:
 2520|  1.19k|  inline internal::DescriptorStringView CLASS::name() const {      \
 2521|  1.19k|    return all_names_[0];                                          \
 2522|  1.19k|  }                                                                \
_ZNK6google8protobuf15FieldDescriptor9full_nameEv:
 2523|  1.84k|  inline internal::DescriptorStringView CLASS::full_name() const { \
 2524|  1.84k|    return all_names_[1];                                          \
 2525|  1.84k|  }
_ZNK6google8protobuf15FieldDescriptor4fileEv:
 2510|    472|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf15FieldDescriptor6numberEv:
 2510|  6.22k|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf15FieldDescriptor12is_extensionEv:
 2510|   123k|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf15FieldDescriptor15containing_typeEv:
 2510|   293k|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf15FieldDescriptor17has_default_valueEv:
 2510|     98|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf15OneofDescriptor4nameEv:
 2520|     11|  inline internal::DescriptorStringView CLASS::name() const {      \
 2521|     11|    return all_names_[0];                                          \
 2522|     11|  }                                                                \
_ZNK6google8protobuf15OneofDescriptor9full_nameEv:
 2523|     12|  inline internal::DescriptorStringView CLASS::full_name() const { \
 2524|     12|    return all_names_[1];                                          \
 2525|     12|  }
_ZNK6google8protobuf15OneofDescriptor15containing_typeEv:
 2510|     15|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf14EnumDescriptor4nameEv:
 2520|    261|  inline internal::DescriptorStringView CLASS::name() const {      \
 2521|    261|    return all_names_[0];                                          \
 2522|    261|  }                                                                \
_ZNK6google8protobuf14EnumDescriptor9full_nameEv:
 2523|    577|  inline internal::DescriptorStringView CLASS::full_name() const { \
 2524|    577|    return all_names_[1];                                          \
 2525|    577|  }
_ZNK6google8protobuf14EnumDescriptor4fileEv:
 2510|    502|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf14EnumDescriptor15containing_typeEv:
 2510|    963|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf14EnumDescriptor20reserved_range_countEv:
 2510|    193|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf14EnumDescriptor14reserved_rangeEi:
 2529|      3|  inline TYPE CLASS::FIELD(int index) const {              \
 2530|      3|    ABSL_DCHECK_LE(0, index);                              \
  ------------------
  |  |   78|      3|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   90|      3|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2531|      3|    ABSL_DCHECK_LT(index, FIELD##_count());                \
  ------------------
  |  |   80|      3|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|      3|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2532|      3|    return FIELD##s_ + index;                              \
 2533|      3|  }
_ZNK6google8protobuf19EnumValueDescriptor4nameEv:
 2520|  1.32k|  inline internal::DescriptorStringView CLASS::name() const {      \
 2521|  1.32k|    return all_names_[0];                                          \
 2522|  1.32k|  }                                                                \
_ZNK6google8protobuf19EnumValueDescriptor9full_nameEv:
 2523|  1.19k|  inline internal::DescriptorStringView CLASS::full_name() const { \
 2524|  1.19k|    return all_names_[1];                                          \
 2525|  1.19k|  }
_ZNK6google8protobuf19EnumValueDescriptor6numberEv:
 2510|    788|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf14FileDescriptor4nameEv:
 2514|     21|  inline internal::DescriptorStringView CLASS::FIELD() const { \
 2515|     21|    return *FIELD##_;                                          \
 2516|     21|  }
_ZNK6google8protobuf14FileDescriptor7packageEv:
 2514|     91|  inline internal::DescriptorStringView CLASS::FIELD() const { \
 2515|     91|    return *FIELD##_;                                          \
 2516|     91|  }
_ZNK6google8protobuf14FileDescriptor18message_type_countEv:
 2510|    246|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf14FileDescriptor15enum_type_countEv:
 2510|     55|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf14FileDescriptor13service_countEv:
 2510|     20|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf14FileDescriptor15extension_countEv:
 2510|     25|  inline TYPE CLASS::FIELD() const { return FIELD##_; }
_ZNK6google8protobuf14FileDescriptor7optionsEv:
 2536|      4|  inline const TYPE& CLASS::options() const { return *options_; }
_ZNK6google8protobuf14FileDescriptor12message_typeEi:
 2529|    185|  inline TYPE CLASS::FIELD(int index) const {              \
 2530|    185|    ABSL_DCHECK_LE(0, index);                              \
  ------------------
  |  |   78|    185|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   90|    185|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    185|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 185]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    185|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2531|    185|    ABSL_DCHECK_LT(index, FIELD##_count());                \
  ------------------
  |  |   80|    185|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|    185|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    185|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 185]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    185|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2532|    185|    return FIELD##s_ + index;                              \
 2533|    185|  }
_ZNK6google8protobuf14FileDescriptor9enum_typeEi:
 2529|     35|  inline TYPE CLASS::FIELD(int index) const {              \
 2530|     35|    ABSL_DCHECK_LE(0, index);                              \
  ------------------
  |  |   78|     35|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   90|     35|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     35|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 35]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     35|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2531|     35|    ABSL_DCHECK_LT(index, FIELD##_count());                \
  ------------------
  |  |   80|     35|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|     35|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     35|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 35]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     35|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2532|     35|    return FIELD##s_ + index;                              \
 2533|     35|  }
_ZNK6google8protobuf14FileDescriptor9extensionEi:
 2529|      4|  inline TYPE CLASS::FIELD(int index) const {              \
 2530|      4|    ABSL_DCHECK_LE(0, index);                              \
  ------------------
  |  |   78|      4|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   90|      4|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 4]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2531|      4|    ABSL_DCHECK_LT(index, FIELD##_count());                \
  ------------------
  |  |   80|      4|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|      4|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 4]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2532|      4|    return FIELD##s_ + index;                              \
 2533|      4|  }
_ZNK6google8protobuf15FieldDescriptor15extension_scopeEv:
 2725|      4|inline const Descriptor* FieldDescriptor::extension_scope() const {
 2726|      4|  ABSL_CHECK(is_extension_);
  ------------------
  |  |   41|      4|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|      8|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      4|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      8|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      8|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      4|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      8|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 4]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|      8|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|      8|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2727|      4|  return scope_.extension_scope;
 2728|      4|}
_ZNK6google8protobuf15FieldDescriptor5labelEv:
 2730|   121k|inline FieldDescriptor::Label FieldDescriptor::label() const {
 2731|   121k|  return static_cast<Label>(label_);
 2732|   121k|}
_ZNK6google8protobuf15FieldDescriptor6is_mapEv:
 2751|  60.4k|inline bool FieldDescriptor::is_map() const {
 2752|  60.4k|  return type() == TYPE_MESSAGE && is_map_message_type();
  ------------------
  |  Branch (2752:10): [True: 60.4k, False: 0]
  |  Branch (2752:36): [True: 0, False: 60.4k]
  ------------------
 2753|  60.4k|}
_ZNK6google8protobuf15FieldDescriptor21real_containing_oneofEv:
 2755|   134k|inline const OneofDescriptor* FieldDescriptor::real_containing_oneof() const {
 2756|   134k|  if (in_real_oneof_) {
  ------------------
  |  Branch (2756:7): [True: 7.75k, False: 127k]
  ------------------
 2757|  7.75k|    auto* res = containing_oneof();
 2758|  7.75k|    PROTOBUF_ASSUME(res != nullptr);
  ------------------
  |  |  941|  7.75k|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  ------------------
 2759|  7.75k|    ABSL_DCHECK(!res->is_synthetic());
  ------------------
  |  |   47|  7.75k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  7.75k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  15.5k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  7.75k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  15.5k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  15.5k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 7.75k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  7.75k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 7.75k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  7.75k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 7.75k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  15.5k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  15.5k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2760|  7.75k|    return res;
 2761|  7.75k|  }
 2762|   127k|  return nullptr;
 2763|   134k|}
_ZNK6google8protobuf15FieldDescriptor5indexEv:
 2767|   168k|inline int FieldDescriptor::index() const {
 2768|   168k|  if (!is_extension_) {
  ------------------
  |  Branch (2768:7): [True: 168k, False: 1]
  ------------------
 2769|   168k|    return static_cast<int>(this - containing_type()->fields_);
 2770|   168k|  } else if (extension_scope() != nullptr) {
  ------------------
  |  Branch (2770:14): [True: 0, False: 1]
  ------------------
 2771|      0|    return static_cast<int>(this - extension_scope()->extensions_);
 2772|      1|  } else {
 2773|      1|    return static_cast<int>(this - file_->extensions_);
 2774|      1|  }
 2775|   168k|}
_ZNK6google8protobuf10Descriptor5indexEv:
 2777|    435|inline int Descriptor::index() const {
 2778|    435|  if (containing_type_ == nullptr) {
  ------------------
  |  Branch (2778:7): [True: 388, False: 47]
  ------------------
 2779|    388|    return static_cast<int>(this - file_->message_types_);
 2780|    388|  } else {
 2781|     47|    return static_cast<int>(this - containing_type_->nested_types_);
 2782|     47|  }
 2783|    435|}
_ZNK6google8protobuf10Descriptor14ExtensionRange5indexEv:
 2785|     14|inline int Descriptor::ExtensionRange::index() const {
 2786|     14|  return static_cast<int>(this - containing_type_->extension_ranges_);
 2787|     14|}
_ZNK6google8protobuf15OneofDescriptor4fileEv:
 2789|      2|inline const FileDescriptor* OneofDescriptor::file() const {
 2790|      2|  return containing_type()->file();
 2791|      2|}
_ZNK6google8protobuf15OneofDescriptor5indexEv:
 2793|  6.21k|inline int OneofDescriptor::index() const {
 2794|  6.21k|  return static_cast<int>(this - containing_type_->oneof_decls_);
 2795|  6.21k|}
_ZNK6google8protobuf15OneofDescriptor12is_syntheticEv:
 2797|      2|inline bool OneofDescriptor::is_synthetic() const {
 2798|      2|  return field_count() == 1 && field(0)->proto3_optional_;
  ------------------
  |  Branch (2798:10): [True: 0, False: 2]
  |  Branch (2798:32): [True: 0, False: 0]
  ------------------
 2799|      2|}
_ZNK6google8protobuf14EnumDescriptor5indexEv:
 2801|    214|inline int EnumDescriptor::index() const {
 2802|    214|  if (containing_type_ == nullptr) {
  ------------------
  |  Branch (2802:7): [True: 123, False: 91]
  ------------------
 2803|    123|    return static_cast<int>(this - file_->enum_types_);
 2804|    123|  } else {
 2805|     91|    return static_cast<int>(this - containing_type_->enum_types_);
 2806|     91|  }
 2807|    214|}
_ZNK6google8protobuf19EnumValueDescriptor4fileEv:
 2809|    190|inline const FileDescriptor* EnumValueDescriptor::file() const {
 2810|    190|  return type()->file();
 2811|    190|}
_ZN6google8protobuf8internal3cpp33MaxMessageDeclarationNestingDepthEv:
 2942|      4|constexpr int MaxMessageDeclarationNestingDepth() { return 32; }
_ZN6google8protobuf8internal21InternalFeatureHelper11GetFeaturesINS0_14FileDescriptorEEERKNS0_10FeatureSetERKT_:
  264|     45|  static const FeatureSet& GetFeatures(const DescriptorT& desc) {
  265|     45|    return desc.features();
  266|     45|  }
_ZN6google8protobuf8internal21InternalFeatureHelper11GetFeaturesINS0_10DescriptorEEERKNS0_10FeatureSetERKT_:
  264|    272|  static const FeatureSet& GetFeatures(const DescriptorT& desc) {
  265|    272|    return desc.features();
  266|    272|  }
_ZN6google8protobuf8internal21InternalFeatureHelper11GetFeaturesINS0_14EnumDescriptorEEERKNS0_10FeatureSetERKT_:
  264|    190|  static const FeatureSet& GetFeatures(const DescriptorT& desc) {
  265|    190|    return desc.features();
  266|    190|  }
_ZN6google8protobuf8internal21InternalFeatureHelper11GetFeaturesINS0_15OneofDescriptorEEERKNS0_10FeatureSetERKT_:
  264|      5|  static const FeatureSet& GetFeatures(const DescriptorT& desc) {
  265|      5|    return desc.features();
  266|      5|  }

_ZN6google8protobuf32FeatureSet_FieldPresence_IsValidEi:
 2452|    255|bool FeatureSet_FieldPresence_IsValid(int value) {
 2453|    255|  return 0 <= value && value <= 3;
  ------------------
  |  Branch (2453:10): [True: 255, False: 0]
  |  Branch (2453:24): [True: 255, False: 0]
  ------------------
 2454|    255|}
_ZN6google8protobuf27FeatureSet_EnumType_IsValidEi:
 2474|    255|bool FeatureSet_EnumType_IsValid(int value) {
 2475|    255|  return 0 <= value && value <= 2;
  ------------------
  |  Branch (2475:10): [True: 255, False: 0]
  |  Branch (2475:24): [True: 255, False: 0]
  ------------------
 2476|    255|}
_ZN6google8protobuf40FeatureSet_RepeatedFieldEncoding_IsValidEi:
 2495|    255|bool FeatureSet_RepeatedFieldEncoding_IsValid(int value) {
 2496|    255|  return 0 <= value && value <= 2;
  ------------------
  |  Branch (2496:10): [True: 255, False: 0]
  |  Branch (2496:24): [True: 255, False: 0]
  ------------------
 2497|    255|}
_ZN6google8protobuf33FeatureSet_Utf8Validation_IsValidEi:
 2516|    255|bool FeatureSet_Utf8Validation_IsValid(int value) {
 2517|    255|  return 0 <= value && value <= 3 && ((13u >> value) & 1) != 0;
  ------------------
  |  Branch (2517:10): [True: 255, False: 0]
  |  Branch (2517:24): [True: 255, False: 0]
  |  Branch (2517:38): [True: 255, False: 0]
  ------------------
 2518|    255|}
_ZN6google8protobuf34FeatureSet_MessageEncoding_IsValidEi:
 2537|    255|bool FeatureSet_MessageEncoding_IsValid(int value) {
 2538|    255|  return 0 <= value && value <= 2;
  ------------------
  |  Branch (2538:10): [True: 255, False: 0]
  |  Branch (2538:24): [True: 255, False: 0]
  ------------------
 2539|    255|}
_ZN6google8protobuf29FeatureSet_JsonFormat_IsValidEi:
 2558|    255|bool FeatureSet_JsonFormat_IsValid(int value) {
 2559|    255|  return 0 <= value && value <= 2;
  ------------------
  |  Branch (2559:10): [True: 255, False: 0]
  |  Branch (2559:24): [True: 255, False: 0]
  ------------------
 2560|    255|}
_ZNK6google8protobuf17FileDescriptorSet12GetClassDataEv:
 2708|      1|const ::google::protobuf::internal::ClassData* FileDescriptorSet::GetClassData() const {
 2709|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 2710|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 2711|      1|  return _class_data_.base();
 2712|      1|}
_ZN6google8protobuf19FileDescriptorProtoC2EPNS0_5ArenaE:
 2882|     10|    : ::google::protobuf::Message(arena) {
 2883|     10|#endif  // PROTOBUF_CUSTOM_VTABLE
 2884|     10|  SharedCtor(arena);
 2885|       |  // @@protoc_insertion_point(arena_constructor:google.protobuf.FileDescriptorProto)
 2886|     10|}
_ZN6google8protobuf19FileDescriptorProtoD2Ev:
 2951|      6|FileDescriptorProto::~FileDescriptorProto() {
 2952|       |  // @@protoc_insertion_point(destructor:google.protobuf.FileDescriptorProto)
 2953|      6|  SharedDtor(*this);
 2954|      6|}
_ZNK6google8protobuf19FileDescriptorProto12GetClassDataEv:
 3033|     21|const ::google::protobuf::internal::ClassData* FileDescriptorProto::GetClassData() const {
 3034|     21|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 3035|     21|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 3036|     21|  return _class_data_.base();
 3037|     21|}
_ZN6google8protobuf19FileDescriptorProto5ClearEv:
 3158|     10|PROTOBUF_NOINLINE void FileDescriptorProto::Clear() {
 3159|       |// @@protoc_insertion_point(message_clear_start:google.protobuf.FileDescriptorProto)
 3160|     10|  ::google::protobuf::internal::TSanWrite(&_impl_);
 3161|     10|  ::uint32_t cached_has_bits = 0;
 3162|       |  // Prevent compiler warnings about cached_has_bits being unused
 3163|     10|  (void) cached_has_bits;
 3164|       |
 3165|     10|  _impl_.dependency_.Clear();
 3166|     10|  _impl_.message_type_.Clear();
 3167|     10|  _impl_.enum_type_.Clear();
 3168|     10|  _impl_.service_.Clear();
 3169|     10|  _impl_.extension_.Clear();
 3170|     10|  _impl_.public_dependency_.Clear();
 3171|     10|  _impl_.weak_dependency_.Clear();
 3172|     10|  cached_has_bits = _impl_._has_bits_[0];
 3173|     10|  if (cached_has_bits & 0x0000001fu) {
  ------------------
  |  Branch (3173:7): [True: 0, False: 10]
  ------------------
 3174|      0|    if (cached_has_bits & 0x00000001u) {
  ------------------
  |  Branch (3174:9): [True: 0, False: 0]
  ------------------
 3175|      0|      _impl_.name_.ClearNonDefaultToEmpty();
 3176|      0|    }
 3177|      0|    if (cached_has_bits & 0x00000002u) {
  ------------------
  |  Branch (3177:9): [True: 0, False: 0]
  ------------------
 3178|      0|      _impl_.package_.ClearNonDefaultToEmpty();
 3179|      0|    }
 3180|      0|    if (cached_has_bits & 0x00000004u) {
  ------------------
  |  Branch (3180:9): [True: 0, False: 0]
  ------------------
 3181|      0|      _impl_.syntax_.ClearNonDefaultToEmpty();
 3182|      0|    }
 3183|      0|    if (cached_has_bits & 0x00000008u) {
  ------------------
  |  Branch (3183:9): [True: 0, False: 0]
  ------------------
 3184|      0|      ABSL_DCHECK(_impl_.options_ != nullptr);
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3185|      0|      _impl_.options_->Clear();
 3186|      0|    }
 3187|      0|    if (cached_has_bits & 0x00000010u) {
  ------------------
  |  Branch (3187:9): [True: 0, False: 0]
  ------------------
 3188|      0|      ABSL_DCHECK(_impl_.source_code_info_ != nullptr);
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3189|      0|      _impl_.source_code_info_->Clear();
 3190|      0|    }
 3191|      0|  }
 3192|     10|  _impl_.edition_ = 0;
 3193|     10|  _impl_._has_bits_.Clear();
 3194|     10|  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
 3195|     10|}
_ZN6google8protobuf19FileDescriptorProto17IsInitializedImplERKNS0_11MessageLiteE:
 3505|     10|    const MessageLite& msg) {
 3506|     10|  auto& this_ = static_cast<const FileDescriptorProto&>(msg);
 3507|     10|  if (!::google::protobuf::internal::AllAreInitialized(this_._internal_message_type()))
  ------------------
  |  Branch (3507:7): [True: 0, False: 10]
  ------------------
 3508|      0|    return false;
 3509|     10|  if (!::google::protobuf::internal::AllAreInitialized(this_._internal_enum_type()))
  ------------------
  |  Branch (3509:7): [True: 0, False: 10]
  ------------------
 3510|      0|    return false;
 3511|     10|  if (!::google::protobuf::internal::AllAreInitialized(this_._internal_service()))
  ------------------
  |  Branch (3511:7): [True: 0, False: 10]
  ------------------
 3512|      0|    return false;
 3513|     10|  if (!::google::protobuf::internal::AllAreInitialized(this_._internal_extension()))
  ------------------
  |  Branch (3513:7): [True: 0, False: 10]
  ------------------
 3514|      0|    return false;
 3515|     10|  if ((this_._impl_._has_bits_[0] & 0x00000008u) != 0) {
  ------------------
  |  Branch (3515:7): [True: 5, False: 5]
  ------------------
 3516|      5|    if (!this_._impl_.options_->IsInitialized()) return false;
  ------------------
  |  Branch (3516:9): [True: 0, False: 5]
  ------------------
 3517|      5|  }
 3518|     10|  if ((this_._impl_._has_bits_[0] & 0x00000010u) != 0) {
  ------------------
  |  Branch (3518:7): [True: 0, False: 10]
  ------------------
 3519|      0|    if (!this_._impl_.source_code_info_->IsInitialized()) return false;
  ------------------
  |  Branch (3519:9): [True: 0, False: 0]
  ------------------
 3520|      0|  }
 3521|     10|  return true;
 3522|     10|}
_ZN6google8protobuf30DescriptorProto_ExtensionRangeD2Ev:
 3617|     14|DescriptorProto_ExtensionRange::~DescriptorProto_ExtensionRange() {
 3618|       |  // @@protoc_insertion_point(destructor:google.protobuf.DescriptorProto.ExtensionRange)
 3619|     14|  SharedDtor(*this);
 3620|     14|}
_ZNK6google8protobuf30DescriptorProto_ExtensionRange12GetClassDataEv:
 3659|      1|const ::google::protobuf::internal::ClassData* DescriptorProto_ExtensionRange::GetClassData() const {
 3660|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 3661|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 3662|      1|  return _class_data_.base();
 3663|      1|}
_ZN6google8protobuf30DescriptorProto_ExtensionRange17IsInitializedImplERKNS0_11MessageLiteE:
 3853|     28|    const MessageLite& msg) {
 3854|     28|  auto& this_ = static_cast<const DescriptorProto_ExtensionRange&>(msg);
 3855|     28|  if ((this_._impl_._has_bits_[0] & 0x00000001u) != 0) {
  ------------------
  |  Branch (3855:7): [True: 0, False: 28]
  ------------------
 3856|      0|    if (!this_._impl_.options_->IsInitialized()) return false;
  ------------------
  |  Branch (3856:9): [True: 0, False: 0]
  ------------------
 3857|      0|  }
 3858|     28|  return true;
 3859|     28|}
_ZN6google8protobuf29DescriptorProto_ReservedRangeD2Ev:
 3914|     14|DescriptorProto_ReservedRange::~DescriptorProto_ReservedRange() {
 3915|       |  // @@protoc_insertion_point(destructor:google.protobuf.DescriptorProto.ReservedRange)
 3916|     14|  SharedDtor(*this);
 3917|     14|}
_ZNK6google8protobuf29DescriptorProto_ReservedRange12GetClassDataEv:
 3955|      1|const ::google::protobuf::internal::ClassData* DescriptorProto_ReservedRange::GetClassData() const {
 3956|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 3957|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 3958|      1|  return _class_data_.base();
 3959|      1|}
_ZN6google8protobuf15DescriptorProtoD2Ev:
 4203|     60|DescriptorProto::~DescriptorProto() {
 4204|       |  // @@protoc_insertion_point(destructor:google.protobuf.DescriptorProto)
 4205|     60|  SharedDtor(*this);
 4206|     60|}
_ZNK6google8protobuf15DescriptorProto12GetClassDataEv:
 4286|      3|const ::google::protobuf::internal::ClassData* DescriptorProto::GetClassData() const {
 4287|      3|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 4288|      3|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 4289|      3|  return _class_data_.base();
 4290|      3|}
_ZN6google8protobuf15DescriptorProto17IsInitializedImplERKNS0_11MessageLiteE:
 4692|    107|    const MessageLite& msg) {
 4693|    107|  auto& this_ = static_cast<const DescriptorProto&>(msg);
 4694|    107|  if (!::google::protobuf::internal::AllAreInitialized(this_._internal_field()))
  ------------------
  |  Branch (4694:7): [True: 0, False: 107]
  ------------------
 4695|      0|    return false;
 4696|    107|  if (!::google::protobuf::internal::AllAreInitialized(this_._internal_nested_type()))
  ------------------
  |  Branch (4696:7): [True: 0, False: 107]
  ------------------
 4697|      0|    return false;
 4698|    107|  if (!::google::protobuf::internal::AllAreInitialized(this_._internal_enum_type()))
  ------------------
  |  Branch (4698:7): [True: 0, False: 107]
  ------------------
 4699|      0|    return false;
 4700|    107|  if (!::google::protobuf::internal::AllAreInitialized(this_._internal_extension_range()))
  ------------------
  |  Branch (4700:7): [True: 0, False: 107]
  ------------------
 4701|      0|    return false;
 4702|    107|  if (!::google::protobuf::internal::AllAreInitialized(this_._internal_extension()))
  ------------------
  |  Branch (4702:7): [True: 0, False: 107]
  ------------------
 4703|      0|    return false;
 4704|    107|  if (!::google::protobuf::internal::AllAreInitialized(this_._internal_oneof_decl()))
  ------------------
  |  Branch (4704:7): [True: 0, False: 107]
  ------------------
 4705|      0|    return false;
 4706|    107|  if ((this_._impl_._has_bits_[0] & 0x00000002u) != 0) {
  ------------------
  |  Branch (4706:7): [True: 0, False: 107]
  ------------------
 4707|      0|    if (!this_._impl_.options_->IsInitialized()) return false;
  ------------------
  |  Branch (4707:9): [True: 0, False: 0]
  ------------------
 4708|      0|  }
 4709|    107|  return true;
 4710|    107|}
_ZNK6google8protobuf15DescriptorProto11GetMetadataEv:
 4730|      2|::google::protobuf::Metadata DescriptorProto::GetMetadata() const {
 4731|      2|  return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
 4732|      2|}
_ZNK6google8protobuf33ExtensionRangeOptions_Declaration12GetClassDataEv:
 4842|      1|const ::google::protobuf::internal::ClassData* ExtensionRangeOptions_Declaration::GetClassData() const {
 4843|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 4844|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 4845|      1|  return _class_data_.base();
 4846|      1|}
_ZNK6google8protobuf21ExtensionRangeOptions12GetClassDataEv:
 5224|      1|const ::google::protobuf::internal::ClassData* ExtensionRangeOptions::GetClassData() const {
 5225|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 5226|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 5227|      1|  return _class_data_.base();
 5228|      1|}
_ZN6google8protobuf20FieldDescriptorProtoD2Ev:
 5574|    296|FieldDescriptorProto::~FieldDescriptorProto() {
 5575|       |  // @@protoc_insertion_point(destructor:google.protobuf.FieldDescriptorProto)
 5576|    296|  SharedDtor(*this);
 5577|    296|}
_ZNK6google8protobuf20FieldDescriptorProto12GetClassDataEv:
 5621|      1|const ::google::protobuf::internal::ClassData* FieldDescriptorProto::GetClassData() const {
 5622|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 5623|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 5624|      1|  return _class_data_.base();
 5625|      1|}
_ZN6google8protobuf20FieldDescriptorProto17IsInitializedImplERKNS0_11MessageLiteE:
 6024|    531|    const MessageLite& msg) {
 6025|    531|  auto& this_ = static_cast<const FieldDescriptorProto&>(msg);
 6026|    531|  if ((this_._impl_._has_bits_[0] & 0x00000020u) != 0) {
  ------------------
  |  Branch (6026:7): [True: 34, False: 497]
  ------------------
 6027|     34|    if (!this_._impl_.options_->IsInitialized()) return false;
  ------------------
  |  Branch (6027:9): [True: 0, False: 34]
  ------------------
 6028|     34|  }
 6029|    531|  return true;
 6030|    531|}
_ZN6google8protobuf20OneofDescriptorProtoD2Ev:
 6110|      4|OneofDescriptorProto::~OneofDescriptorProto() {
 6111|       |  // @@protoc_insertion_point(destructor:google.protobuf.OneofDescriptorProto)
 6112|      4|  SharedDtor(*this);
 6113|      4|}
_ZNK6google8protobuf20OneofDescriptorProto12GetClassDataEv:
 6153|      1|const ::google::protobuf::internal::ClassData* OneofDescriptorProto::GetClassData() const {
 6154|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 6155|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 6156|      1|  return _class_data_.base();
 6157|      1|}
_ZN6google8protobuf20OneofDescriptorProto17IsInitializedImplERKNS0_11MessageLiteE:
 6329|      6|    const MessageLite& msg) {
 6330|      6|  auto& this_ = static_cast<const OneofDescriptorProto&>(msg);
 6331|      6|  if ((this_._impl_._has_bits_[0] & 0x00000002u) != 0) {
  ------------------
  |  Branch (6331:7): [True: 0, False: 6]
  ------------------
 6332|      0|    if (!this_._impl_.options_->IsInitialized()) return false;
  ------------------
  |  Branch (6332:9): [True: 0, False: 0]
  ------------------
 6333|      0|  }
 6334|      6|  return true;
 6335|      6|}
_ZN6google8protobuf37EnumDescriptorProto_EnumReservedRangeD2Ev:
 6388|      1|EnumDescriptorProto_EnumReservedRange::~EnumDescriptorProto_EnumReservedRange() {
 6389|       |  // @@protoc_insertion_point(destructor:google.protobuf.EnumDescriptorProto.EnumReservedRange)
 6390|      1|  SharedDtor(*this);
 6391|      1|}
_ZNK6google8protobuf37EnumDescriptorProto_EnumReservedRange12GetClassDataEv:
 6429|      1|const ::google::protobuf::internal::ClassData* EnumDescriptorProto_EnumReservedRange::GetClassData() const {
 6430|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 6431|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 6432|      1|  return _class_data_.base();
 6433|      1|}
_ZN6google8protobuf19EnumDescriptorProtoD2Ev:
 6667|     30|EnumDescriptorProto::~EnumDescriptorProto() {
 6668|       |  // @@protoc_insertion_point(destructor:google.protobuf.EnumDescriptorProto)
 6669|     30|  SharedDtor(*this);
 6670|     30|}
_ZNK6google8protobuf19EnumDescriptorProto12GetClassDataEv:
 6730|      1|const ::google::protobuf::internal::ClassData* EnumDescriptorProto::GetClassData() const {
 6731|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 6732|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 6733|      1|  return _class_data_.base();
 6734|      1|}
_ZN6google8protobuf19EnumDescriptorProto17IsInitializedImplERKNS0_11MessageLiteE:
 6993|     54|    const MessageLite& msg) {
 6994|     54|  auto& this_ = static_cast<const EnumDescriptorProto&>(msg);
 6995|     54|  if (!::google::protobuf::internal::AllAreInitialized(this_._internal_value()))
  ------------------
  |  Branch (6995:7): [True: 0, False: 54]
  ------------------
 6996|      0|    return false;
 6997|     54|  if ((this_._impl_._has_bits_[0] & 0x00000002u) != 0) {
  ------------------
  |  Branch (6997:7): [True: 0, False: 54]
  ------------------
 6998|      0|    if (!this_._impl_.options_->IsInitialized()) return false;
  ------------------
  |  Branch (6998:9): [True: 0, False: 0]
  ------------------
 6999|      0|  }
 7000|     54|  return true;
 7001|     54|}
_ZN6google8protobuf24EnumValueDescriptorProtoD2Ev:
 7081|    294|EnumValueDescriptorProto::~EnumValueDescriptorProto() {
 7082|       |  // @@protoc_insertion_point(destructor:google.protobuf.EnumValueDescriptorProto)
 7083|    294|  SharedDtor(*this);
 7084|    294|}
_ZNK6google8protobuf24EnumValueDescriptorProto12GetClassDataEv:
 7124|      1|const ::google::protobuf::internal::ClassData* EnumValueDescriptorProto::GetClassData() const {
 7125|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 7126|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 7127|      1|  return _class_data_.base();
 7128|      1|}
_ZN6google8protobuf24EnumValueDescriptorProto17IsInitializedImplERKNS0_11MessageLiteE:
 7323|    484|    const MessageLite& msg) {
 7324|    484|  auto& this_ = static_cast<const EnumValueDescriptorProto&>(msg);
 7325|    484|  if ((this_._impl_._has_bits_[0] & 0x00000002u) != 0) {
  ------------------
  |  Branch (7325:7): [True: 0, False: 484]
  ------------------
 7326|      0|    if (!this_._impl_.options_->IsInitialized()) return false;
  ------------------
  |  Branch (7326:9): [True: 0, False: 0]
  ------------------
 7327|      0|  }
 7328|    484|  return true;
 7329|    484|}
_ZNK6google8protobuf22ServiceDescriptorProto12GetClassDataEv:
 7462|      1|const ::google::protobuf::internal::ClassData* ServiceDescriptorProto::GetClassData() const {
 7463|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 7464|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 7465|      1|  return _class_data_.base();
 7466|      1|}
_ZNK6google8protobuf21MethodDescriptorProto12GetClassDataEv:
 7810|      1|const ::google::protobuf::internal::ClassData* MethodDescriptorProto::GetClassData() const {
 7811|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 7812|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 7813|      1|  return _class_data_.base();
 7814|      1|}
_ZN6google8protobuf11FileOptionsC2EPNS0_5ArenaE:
 8125|      2|    : ::google::protobuf::Message(arena) {
 8126|      2|#endif  // PROTOBUF_CUSTOM_VTABLE
 8127|      2|  SharedCtor(arena);
 8128|       |  // @@protoc_insertion_point(arena_constructor:google.protobuf.FileOptions)
 8129|      2|}
_ZN6google8protobuf11FileOptionsD2Ev:
 8204|      3|FileOptions::~FileOptions() {
 8205|       |  // @@protoc_insertion_point(destructor:google.protobuf.FileOptions)
 8206|      3|  SharedDtor(*this);
 8207|      3|}
_ZNK6google8protobuf11FileOptions12GetClassDataEv:
 8271|      5|const ::google::protobuf::internal::ClassData* FileOptions::GetClassData() const {
 8272|      5|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 8273|      5|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 8274|      5|  return _class_data_.base();
 8275|      5|}
_ZN6google8protobuf11FileOptions5ClearEv:
 8449|      2|PROTOBUF_NOINLINE void FileOptions::Clear() {
 8450|       |// @@protoc_insertion_point(message_clear_start:google.protobuf.FileOptions)
 8451|      2|  ::google::protobuf::internal::TSanWrite(&_impl_);
 8452|      2|  ::uint32_t cached_has_bits = 0;
 8453|       |  // Prevent compiler warnings about cached_has_bits being unused
 8454|      2|  (void) cached_has_bits;
 8455|       |
 8456|      2|  _impl_._extensions_.Clear();
 8457|      2|  _impl_.uninterpreted_option_.Clear();
 8458|      2|  cached_has_bits = _impl_._has_bits_[0];
 8459|      2|  if (cached_has_bits & 0x000000ffu) {
  ------------------
  |  Branch (8459:7): [True: 0, False: 2]
  ------------------
 8460|      0|    if (cached_has_bits & 0x00000001u) {
  ------------------
  |  Branch (8460:9): [True: 0, False: 0]
  ------------------
 8461|      0|      _impl_.java_package_.ClearNonDefaultToEmpty();
 8462|      0|    }
 8463|      0|    if (cached_has_bits & 0x00000002u) {
  ------------------
  |  Branch (8463:9): [True: 0, False: 0]
  ------------------
 8464|      0|      _impl_.java_outer_classname_.ClearNonDefaultToEmpty();
 8465|      0|    }
 8466|      0|    if (cached_has_bits & 0x00000004u) {
  ------------------
  |  Branch (8466:9): [True: 0, False: 0]
  ------------------
 8467|      0|      _impl_.go_package_.ClearNonDefaultToEmpty();
 8468|      0|    }
 8469|      0|    if (cached_has_bits & 0x00000008u) {
  ------------------
  |  Branch (8469:9): [True: 0, False: 0]
  ------------------
 8470|      0|      _impl_.objc_class_prefix_.ClearNonDefaultToEmpty();
 8471|      0|    }
 8472|      0|    if (cached_has_bits & 0x00000010u) {
  ------------------
  |  Branch (8472:9): [True: 0, False: 0]
  ------------------
 8473|      0|      _impl_.csharp_namespace_.ClearNonDefaultToEmpty();
 8474|      0|    }
 8475|      0|    if (cached_has_bits & 0x00000020u) {
  ------------------
  |  Branch (8475:9): [True: 0, False: 0]
  ------------------
 8476|      0|      _impl_.swift_prefix_.ClearNonDefaultToEmpty();
 8477|      0|    }
 8478|      0|    if (cached_has_bits & 0x00000040u) {
  ------------------
  |  Branch (8478:9): [True: 0, False: 0]
  ------------------
 8479|      0|      _impl_.php_class_prefix_.ClearNonDefaultToEmpty();
 8480|      0|    }
 8481|      0|    if (cached_has_bits & 0x00000080u) {
  ------------------
  |  Branch (8481:9): [True: 0, False: 0]
  ------------------
 8482|      0|      _impl_.php_namespace_.ClearNonDefaultToEmpty();
 8483|      0|    }
 8484|      0|  }
 8485|      2|  if (cached_has_bits & 0x00000700u) {
  ------------------
  |  Branch (8485:7): [True: 0, False: 2]
  ------------------
 8486|      0|    if (cached_has_bits & 0x00000100u) {
  ------------------
  |  Branch (8486:9): [True: 0, False: 0]
  ------------------
 8487|      0|      _impl_.php_metadata_namespace_.ClearNonDefaultToEmpty();
 8488|      0|    }
 8489|      0|    if (cached_has_bits & 0x00000200u) {
  ------------------
  |  Branch (8489:9): [True: 0, False: 0]
  ------------------
 8490|      0|      _impl_.ruby_package_.ClearNonDefaultToEmpty();
 8491|      0|    }
 8492|      0|    if (cached_has_bits & 0x00000400u) {
  ------------------
  |  Branch (8492:9): [True: 0, False: 0]
  ------------------
 8493|      0|      ABSL_DCHECK(_impl_.features_ != nullptr);
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8494|      0|      _impl_.features_->Clear();
 8495|      0|    }
 8496|      0|  }
 8497|      2|  if (cached_has_bits & 0x0000f800u) {
  ------------------
  |  Branch (8497:7): [True: 0, False: 2]
  ------------------
 8498|      0|    ::memset(&_impl_.java_multiple_files_, 0, static_cast<::size_t>(
 8499|      0|        reinterpret_cast<char*>(&_impl_.java_generic_services_) -
 8500|      0|        reinterpret_cast<char*>(&_impl_.java_multiple_files_)) + sizeof(_impl_.java_generic_services_));
 8501|      0|  }
 8502|      2|  if (cached_has_bits & 0x000f0000u) {
  ------------------
  |  Branch (8502:7): [True: 0, False: 2]
  ------------------
 8503|      0|    ::memset(&_impl_.py_generic_services_, 0, static_cast<::size_t>(
 8504|      0|        reinterpret_cast<char*>(&_impl_.deprecated_) -
 8505|      0|        reinterpret_cast<char*>(&_impl_.py_generic_services_)) + sizeof(_impl_.deprecated_));
 8506|      0|    _impl_.optimize_for_ = 1;
 8507|      0|    _impl_.cc_enable_arenas_ = true;
 8508|      0|  }
 8509|      2|  _impl_._has_bits_.Clear();
 8510|      2|  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
 8511|      2|}
_ZNK6google8protobuf11FileOptions18_InternalSerializeEPhPNS0_2io19EpsCopyOutputStreamE:
 8521|      2|            ::google::protobuf::io::EpsCopyOutputStream* stream) const {
 8522|      2|          const FileOptions& this_ = *this;
 8523|      2|#endif  // PROTOBUF_CUSTOM_VTABLE
 8524|       |          // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FileOptions)
 8525|      2|          ::uint32_t cached_has_bits = 0;
 8526|      2|          (void)cached_has_bits;
 8527|       |
 8528|      2|          cached_has_bits = this_._impl_._has_bits_[0];
 8529|       |          // optional string java_package = 1;
 8530|      2|          if (cached_has_bits & 0x00000001u) {
  ------------------
  |  Branch (8530:15): [True: 2, False: 0]
  ------------------
 8531|      2|            const std::string& _s = this_._internal_java_package();
 8532|      2|            ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE,
 8533|      2|                                        "google.protobuf.FileOptions.java_package");
 8534|      2|            target = stream->WriteStringMaybeAliased(1, _s, target);
 8535|      2|          }
 8536|       |
 8537|       |          // optional string java_outer_classname = 8;
 8538|      2|          if (cached_has_bits & 0x00000002u) {
  ------------------
  |  Branch (8538:15): [True: 2, False: 0]
  ------------------
 8539|      2|            const std::string& _s = this_._internal_java_outer_classname();
 8540|      2|            ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE,
 8541|      2|                                        "google.protobuf.FileOptions.java_outer_classname");
 8542|      2|            target = stream->WriteStringMaybeAliased(8, _s, target);
 8543|      2|          }
 8544|       |
 8545|       |          // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
 8546|      2|          if (cached_has_bits & 0x00040000u) {
  ------------------
  |  Branch (8546:15): [True: 1, False: 1]
  ------------------
 8547|      1|            target = stream->EnsureSpace(target);
 8548|      1|            target = ::_pbi::WireFormatLite::WriteEnumToArray(
 8549|      1|                9, this_._internal_optimize_for(), target);
 8550|      1|          }
 8551|       |
 8552|       |          // optional bool java_multiple_files = 10 [default = false];
 8553|      2|          if (cached_has_bits & 0x00000800u) {
  ------------------
  |  Branch (8553:15): [True: 1, False: 1]
  ------------------
 8554|      1|            target = stream->EnsureSpace(target);
 8555|      1|            target = ::_pbi::WireFormatLite::WriteBoolToArray(
 8556|      1|                10, this_._internal_java_multiple_files(), target);
 8557|      1|          }
 8558|       |
 8559|       |          // optional string go_package = 11;
 8560|      2|          if (cached_has_bits & 0x00000004u) {
  ------------------
  |  Branch (8560:15): [True: 2, False: 0]
  ------------------
 8561|      2|            const std::string& _s = this_._internal_go_package();
 8562|      2|            ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE,
 8563|      2|                                        "google.protobuf.FileOptions.go_package");
 8564|      2|            target = stream->WriteStringMaybeAliased(11, _s, target);
 8565|      2|          }
 8566|       |
 8567|       |          // optional bool cc_generic_services = 16 [default = false];
 8568|      2|          if (cached_has_bits & 0x00004000u) {
  ------------------
  |  Branch (8568:15): [True: 0, False: 2]
  ------------------
 8569|      0|            target = stream->EnsureSpace(target);
 8570|      0|            target = ::_pbi::WireFormatLite::WriteBoolToArray(
 8571|      0|                16, this_._internal_cc_generic_services(), target);
 8572|      0|          }
 8573|       |
 8574|       |          // optional bool java_generic_services = 17 [default = false];
 8575|      2|          if (cached_has_bits & 0x00008000u) {
  ------------------
  |  Branch (8575:15): [True: 0, False: 2]
  ------------------
 8576|      0|            target = stream->EnsureSpace(target);
 8577|      0|            target = ::_pbi::WireFormatLite::WriteBoolToArray(
 8578|      0|                17, this_._internal_java_generic_services(), target);
 8579|      0|          }
 8580|       |
 8581|       |          // optional bool py_generic_services = 18 [default = false];
 8582|      2|          if (cached_has_bits & 0x00010000u) {
  ------------------
  |  Branch (8582:15): [True: 0, False: 2]
  ------------------
 8583|      0|            target = stream->EnsureSpace(target);
 8584|      0|            target = ::_pbi::WireFormatLite::WriteBoolToArray(
 8585|      0|                18, this_._internal_py_generic_services(), target);
 8586|      0|          }
 8587|       |
 8588|       |          // optional bool java_generate_equals_and_hash = 20 [deprecated = true];
 8589|      2|          if (cached_has_bits & 0x00001000u) {
  ------------------
  |  Branch (8589:15): [True: 0, False: 2]
  ------------------
 8590|      0|            target = stream->EnsureSpace(target);
 8591|      0|            target = ::_pbi::WireFormatLite::WriteBoolToArray(
 8592|      0|                20, this_._internal_java_generate_equals_and_hash(), target);
 8593|      0|          }
 8594|       |
 8595|       |          // optional bool deprecated = 23 [default = false];
 8596|      2|          if (cached_has_bits & 0x00020000u) {
  ------------------
  |  Branch (8596:15): [True: 0, False: 2]
  ------------------
 8597|      0|            target = stream->EnsureSpace(target);
 8598|      0|            target = ::_pbi::WireFormatLite::WriteBoolToArray(
 8599|      0|                23, this_._internal_deprecated(), target);
 8600|      0|          }
 8601|       |
 8602|       |          // optional bool java_string_check_utf8 = 27 [default = false];
 8603|      2|          if (cached_has_bits & 0x00002000u) {
  ------------------
  |  Branch (8603:15): [True: 0, False: 2]
  ------------------
 8604|      0|            target = stream->EnsureSpace(target);
 8605|      0|            target = ::_pbi::WireFormatLite::WriteBoolToArray(
 8606|      0|                27, this_._internal_java_string_check_utf8(), target);
 8607|      0|          }
 8608|       |
 8609|       |          // optional bool cc_enable_arenas = 31 [default = true];
 8610|      2|          if (cached_has_bits & 0x00080000u) {
  ------------------
  |  Branch (8610:15): [True: 1, False: 1]
  ------------------
 8611|      1|            target = stream->EnsureSpace(target);
 8612|      1|            target = ::_pbi::WireFormatLite::WriteBoolToArray(
 8613|      1|                31, this_._internal_cc_enable_arenas(), target);
 8614|      1|          }
 8615|       |
 8616|       |          // optional string objc_class_prefix = 36;
 8617|      2|          if (cached_has_bits & 0x00000008u) {
  ------------------
  |  Branch (8617:15): [True: 2, False: 0]
  ------------------
 8618|      2|            const std::string& _s = this_._internal_objc_class_prefix();
 8619|      2|            ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE,
 8620|      2|                                        "google.protobuf.FileOptions.objc_class_prefix");
 8621|      2|            target = stream->WriteStringMaybeAliased(36, _s, target);
 8622|      2|          }
 8623|       |
 8624|       |          // optional string csharp_namespace = 37;
 8625|      2|          if (cached_has_bits & 0x00000010u) {
  ------------------
  |  Branch (8625:15): [True: 2, False: 0]
  ------------------
 8626|      2|            const std::string& _s = this_._internal_csharp_namespace();
 8627|      2|            ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE,
 8628|      2|                                        "google.protobuf.FileOptions.csharp_namespace");
 8629|      2|            target = stream->WriteStringMaybeAliased(37, _s, target);
 8630|      2|          }
 8631|       |
 8632|       |          // optional string swift_prefix = 39;
 8633|      2|          if (cached_has_bits & 0x00000020u) {
  ------------------
  |  Branch (8633:15): [True: 0, False: 2]
  ------------------
 8634|      0|            const std::string& _s = this_._internal_swift_prefix();
 8635|      0|            ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE,
 8636|      0|                                        "google.protobuf.FileOptions.swift_prefix");
 8637|      0|            target = stream->WriteStringMaybeAliased(39, _s, target);
 8638|      0|          }
 8639|       |
 8640|       |          // optional string php_class_prefix = 40;
 8641|      2|          if (cached_has_bits & 0x00000040u) {
  ------------------
  |  Branch (8641:15): [True: 0, False: 2]
  ------------------
 8642|      0|            const std::string& _s = this_._internal_php_class_prefix();
 8643|      0|            ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE,
 8644|      0|                                        "google.protobuf.FileOptions.php_class_prefix");
 8645|      0|            target = stream->WriteStringMaybeAliased(40, _s, target);
 8646|      0|          }
 8647|       |
 8648|       |          // optional string php_namespace = 41;
 8649|      2|          if (cached_has_bits & 0x00000080u) {
  ------------------
  |  Branch (8649:15): [True: 0, False: 2]
  ------------------
 8650|      0|            const std::string& _s = this_._internal_php_namespace();
 8651|      0|            ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE,
 8652|      0|                                        "google.protobuf.FileOptions.php_namespace");
 8653|      0|            target = stream->WriteStringMaybeAliased(41, _s, target);
 8654|      0|          }
 8655|       |
 8656|       |          // optional string php_metadata_namespace = 44;
 8657|      2|          if (cached_has_bits & 0x00000100u) {
  ------------------
  |  Branch (8657:15): [True: 0, False: 2]
  ------------------
 8658|      0|            const std::string& _s = this_._internal_php_metadata_namespace();
 8659|      0|            ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE,
 8660|      0|                                        "google.protobuf.FileOptions.php_metadata_namespace");
 8661|      0|            target = stream->WriteStringMaybeAliased(44, _s, target);
 8662|      0|          }
 8663|       |
 8664|       |          // optional string ruby_package = 45;
 8665|      2|          if (cached_has_bits & 0x00000200u) {
  ------------------
  |  Branch (8665:15): [True: 0, False: 2]
  ------------------
 8666|      0|            const std::string& _s = this_._internal_ruby_package();
 8667|      0|            ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE,
 8668|      0|                                        "google.protobuf.FileOptions.ruby_package");
 8669|      0|            target = stream->WriteStringMaybeAliased(45, _s, target);
 8670|      0|          }
 8671|       |
 8672|       |          // optional .google.protobuf.FeatureSet features = 50;
 8673|      2|          if (cached_has_bits & 0x00000400u) {
  ------------------
  |  Branch (8673:15): [True: 0, False: 2]
  ------------------
 8674|      0|            target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
 8675|      0|                50, *this_._impl_.features_, this_._impl_.features_->GetCachedSize(), target,
 8676|      0|                stream);
 8677|      0|          }
 8678|       |
 8679|       |          // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
 8680|      2|          for (unsigned i = 0, n = static_cast<unsigned>(
 8681|      2|                                   this_._internal_uninterpreted_option_size());
 8682|      2|               i < n; i++) {
  ------------------
  |  Branch (8682:16): [True: 0, False: 2]
  ------------------
 8683|      0|            const auto& repfield = this_._internal_uninterpreted_option().Get(i);
 8684|      0|            target =
 8685|      0|                ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
 8686|      0|                    999, repfield, repfield.GetCachedSize(),
 8687|      0|                    target, stream);
 8688|      0|          }
 8689|       |
 8690|       |          // Extension range [1000, 536870912)
 8691|      2|          target = this_._impl_._extensions_._InternalSerialize(
 8692|      2|              internal_default_instance(), 1000, 536870912, target, stream);
 8693|      2|          if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
  ------------------
  |  |  365|      2|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 2]
  |  |  |  Branch (365:54): [Folded, False: 2]
  |  |  |  Branch (365:63): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 8694|      0|            target =
 8695|      0|                ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
 8696|      0|                    this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
 8697|      0|          }
 8698|       |          // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FileOptions)
 8699|      2|          return target;
 8700|      2|        }
_ZNK6google8protobuf11FileOptions12ByteSizeLongEv:
 8706|      2|        ::size_t FileOptions::ByteSizeLong() const {
 8707|      2|          const FileOptions& this_ = *this;
 8708|      2|#endif  // PROTOBUF_CUSTOM_VTABLE
 8709|       |          // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FileOptions)
 8710|      2|          ::size_t total_size = 0;
 8711|      2|          total_size += this_._impl_._extensions_.ByteSize();
 8712|       |
 8713|      2|          ::uint32_t cached_has_bits = 0;
 8714|       |          // Prevent compiler warnings about cached_has_bits being unused
 8715|      2|          (void)cached_has_bits;
 8716|       |
 8717|      2|          ::_pbi::Prefetch5LinesFrom7Lines(&this_);
 8718|      2|           {
 8719|       |            // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
 8720|      2|            {
 8721|      2|              total_size += 2UL * this_._internal_uninterpreted_option_size();
 8722|      2|              for (const auto& msg : this_._internal_uninterpreted_option()) {
  ------------------
  |  Branch (8722:36): [True: 0, False: 2]
  ------------------
 8723|      0|                total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
 8724|      0|              }
 8725|      2|            }
 8726|      2|          }
 8727|      2|          cached_has_bits = this_._impl_._has_bits_[0];
 8728|      2|          if (cached_has_bits & 0x000000ffu) {
  ------------------
  |  Branch (8728:15): [True: 2, False: 0]
  ------------------
 8729|       |            // optional string java_package = 1;
 8730|      2|            if (cached_has_bits & 0x00000001u) {
  ------------------
  |  Branch (8730:17): [True: 2, False: 0]
  ------------------
 8731|      2|              total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
 8732|      2|                                              this_._internal_java_package());
 8733|      2|            }
 8734|       |            // optional string java_outer_classname = 8;
 8735|      2|            if (cached_has_bits & 0x00000002u) {
  ------------------
  |  Branch (8735:17): [True: 2, False: 0]
  ------------------
 8736|      2|              total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
 8737|      2|                                              this_._internal_java_outer_classname());
 8738|      2|            }
 8739|       |            // optional string go_package = 11;
 8740|      2|            if (cached_has_bits & 0x00000004u) {
  ------------------
  |  Branch (8740:17): [True: 2, False: 0]
  ------------------
 8741|      2|              total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
 8742|      2|                                              this_._internal_go_package());
 8743|      2|            }
 8744|       |            // optional string objc_class_prefix = 36;
 8745|      2|            if (cached_has_bits & 0x00000008u) {
  ------------------
  |  Branch (8745:17): [True: 2, False: 0]
  ------------------
 8746|      2|              total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize(
 8747|      2|                                              this_._internal_objc_class_prefix());
 8748|      2|            }
 8749|       |            // optional string csharp_namespace = 37;
 8750|      2|            if (cached_has_bits & 0x00000010u) {
  ------------------
  |  Branch (8750:17): [True: 2, False: 0]
  ------------------
 8751|      2|              total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize(
 8752|      2|                                              this_._internal_csharp_namespace());
 8753|      2|            }
 8754|       |            // optional string swift_prefix = 39;
 8755|      2|            if (cached_has_bits & 0x00000020u) {
  ------------------
  |  Branch (8755:17): [True: 0, False: 2]
  ------------------
 8756|      0|              total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize(
 8757|      0|                                              this_._internal_swift_prefix());
 8758|      0|            }
 8759|       |            // optional string php_class_prefix = 40;
 8760|      2|            if (cached_has_bits & 0x00000040u) {
  ------------------
  |  Branch (8760:17): [True: 0, False: 2]
  ------------------
 8761|      0|              total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize(
 8762|      0|                                              this_._internal_php_class_prefix());
 8763|      0|            }
 8764|       |            // optional string php_namespace = 41;
 8765|      2|            if (cached_has_bits & 0x00000080u) {
  ------------------
  |  Branch (8765:17): [True: 0, False: 2]
  ------------------
 8766|      0|              total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize(
 8767|      0|                                              this_._internal_php_namespace());
 8768|      0|            }
 8769|      2|          }
 8770|      2|          if (cached_has_bits & 0x0000ff00u) {
  ------------------
  |  Branch (8770:15): [True: 1, False: 1]
  ------------------
 8771|       |            // optional string php_metadata_namespace = 44;
 8772|      1|            if (cached_has_bits & 0x00000100u) {
  ------------------
  |  Branch (8772:17): [True: 0, False: 1]
  ------------------
 8773|      0|              total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize(
 8774|      0|                                              this_._internal_php_metadata_namespace());
 8775|      0|            }
 8776|       |            // optional string ruby_package = 45;
 8777|      1|            if (cached_has_bits & 0x00000200u) {
  ------------------
  |  Branch (8777:17): [True: 0, False: 1]
  ------------------
 8778|      0|              total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize(
 8779|      0|                                              this_._internal_ruby_package());
 8780|      0|            }
 8781|       |            // optional .google.protobuf.FeatureSet features = 50;
 8782|      1|            if (cached_has_bits & 0x00000400u) {
  ------------------
  |  Branch (8782:17): [True: 0, False: 1]
  ------------------
 8783|      0|              total_size += 2 +
 8784|      0|                            ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.features_);
 8785|      0|            }
 8786|       |            // optional bool java_multiple_files = 10 [default = false];
 8787|      1|            if (cached_has_bits & 0x00000800u) {
  ------------------
  |  Branch (8787:17): [True: 1, False: 0]
  ------------------
 8788|      1|              total_size += 2;
 8789|      1|            }
 8790|       |            // optional bool java_generate_equals_and_hash = 20 [deprecated = true];
 8791|      1|            if (cached_has_bits & 0x00001000u) {
  ------------------
  |  Branch (8791:17): [True: 0, False: 1]
  ------------------
 8792|      0|              total_size += 3;
 8793|      0|            }
 8794|       |            // optional bool java_string_check_utf8 = 27 [default = false];
 8795|      1|            if (cached_has_bits & 0x00002000u) {
  ------------------
  |  Branch (8795:17): [True: 0, False: 1]
  ------------------
 8796|      0|              total_size += 3;
 8797|      0|            }
 8798|       |            // optional bool cc_generic_services = 16 [default = false];
 8799|      1|            if (cached_has_bits & 0x00004000u) {
  ------------------
  |  Branch (8799:17): [True: 0, False: 1]
  ------------------
 8800|      0|              total_size += 3;
 8801|      0|            }
 8802|       |            // optional bool java_generic_services = 17 [default = false];
 8803|      1|            if (cached_has_bits & 0x00008000u) {
  ------------------
  |  Branch (8803:17): [True: 0, False: 1]
  ------------------
 8804|      0|              total_size += 3;
 8805|      0|            }
 8806|      1|          }
 8807|      2|          if (cached_has_bits & 0x000f0000u) {
  ------------------
  |  Branch (8807:15): [True: 1, False: 1]
  ------------------
 8808|       |            // optional bool py_generic_services = 18 [default = false];
 8809|      1|            if (cached_has_bits & 0x00010000u) {
  ------------------
  |  Branch (8809:17): [True: 0, False: 1]
  ------------------
 8810|      0|              total_size += 3;
 8811|      0|            }
 8812|       |            // optional bool deprecated = 23 [default = false];
 8813|      1|            if (cached_has_bits & 0x00020000u) {
  ------------------
  |  Branch (8813:17): [True: 0, False: 1]
  ------------------
 8814|      0|              total_size += 3;
 8815|      0|            }
 8816|       |            // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];
 8817|      1|            if (cached_has_bits & 0x00040000u) {
  ------------------
  |  Branch (8817:17): [True: 1, False: 0]
  ------------------
 8818|      1|              total_size += 1 +
 8819|      1|                            ::_pbi::WireFormatLite::EnumSize(this_._internal_optimize_for());
 8820|      1|            }
 8821|       |            // optional bool cc_enable_arenas = 31 [default = true];
 8822|      1|            if (cached_has_bits & 0x00080000u) {
  ------------------
  |  Branch (8822:17): [True: 1, False: 0]
  ------------------
 8823|      1|              total_size += 3;
 8824|      1|            }
 8825|      1|          }
 8826|      2|          return this_.MaybeComputeUnknownFieldsSize(total_size,
 8827|      2|                                                     &this_._impl_._cached_size_);
 8828|      2|        }
_ZN6google8protobuf11FileOptions17IsInitializedImplERKNS0_11MessageLiteE:
 8927|      9|    const MessageLite& msg) {
 8928|      9|  auto& this_ = static_cast<const FileOptions&>(msg);
 8929|      9|  if (!this_._impl_._extensions_.IsInitialized(
  ------------------
  |  Branch (8929:7): [True: 0, False: 9]
  ------------------
 8930|      9|          internal_default_instance())) {
 8931|      0|    return false;
 8932|      0|  }
 8933|      9|  if (!::google::protobuf::internal::AllAreInitialized(this_._internal_uninterpreted_option()))
  ------------------
  |  Branch (8933:7): [True: 0, False: 9]
  ------------------
 8934|      0|    return false;
 8935|      9|  if ((this_._impl_._has_bits_[0] & 0x00000400u) != 0) {
  ------------------
  |  Branch (8935:7): [True: 0, False: 9]
  ------------------
 8936|      0|    if (!this_._impl_.features_->IsInitialized()) return false;
  ------------------
  |  Branch (8936:9): [True: 0, False: 0]
  ------------------
 8937|      0|  }
 8938|      9|  return true;
 8939|      9|}
_ZNK6google8protobuf14MessageOptions12GetClassDataEv:
 9098|      1|const ::google::protobuf::internal::ClassData* MessageOptions::GetClassData() const {
 9099|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 9100|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 9101|      1|  return _class_data_.base();
 9102|      1|}
_ZN6google8protobuf27FieldOptions_EditionDefaultD2Ev:
 9468|     18|FieldOptions_EditionDefault::~FieldOptions_EditionDefault() {
 9469|       |  // @@protoc_insertion_point(destructor:google.protobuf.FieldOptions.EditionDefault)
 9470|     18|  SharedDtor(*this);
 9471|     18|}
_ZNK6google8protobuf27FieldOptions_EditionDefault12GetClassDataEv:
 9510|      1|const ::google::protobuf::internal::ClassData* FieldOptions_EditionDefault::GetClassData() const {
 9511|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 9512|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 9513|      1|  return _class_data_.base();
 9514|      1|}
_ZNK6google8protobuf27FieldOptions_EditionDefault18_InternalSerializeEPhPNS0_2io19EpsCopyOutputStreamE:
 9581|     18|            ::google::protobuf::io::EpsCopyOutputStream* stream) const {
 9582|     18|          const FieldOptions_EditionDefault& this_ = *this;
 9583|     18|#endif  // PROTOBUF_CUSTOM_VTABLE
 9584|       |          // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldOptions.EditionDefault)
 9585|     18|          ::uint32_t cached_has_bits = 0;
 9586|     18|          (void)cached_has_bits;
 9587|       |
 9588|     18|          cached_has_bits = this_._impl_._has_bits_[0];
 9589|       |          // optional string value = 2;
 9590|     18|          if (cached_has_bits & 0x00000001u) {
  ------------------
  |  Branch (9590:15): [True: 18, False: 0]
  ------------------
 9591|     18|            const std::string& _s = this_._internal_value();
 9592|     18|            ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE,
 9593|     18|                                        "google.protobuf.FieldOptions.EditionDefault.value");
 9594|     18|            target = stream->WriteStringMaybeAliased(2, _s, target);
 9595|     18|          }
 9596|       |
 9597|       |          // optional .google.protobuf.Edition edition = 3;
 9598|     18|          if (cached_has_bits & 0x00000002u) {
  ------------------
  |  Branch (9598:15): [True: 18, False: 0]
  ------------------
 9599|     18|            target = stream->EnsureSpace(target);
 9600|     18|            target = ::_pbi::WireFormatLite::WriteEnumToArray(
 9601|     18|                3, this_._internal_edition(), target);
 9602|     18|          }
 9603|       |
 9604|     18|          if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
  ------------------
  |  |  365|     18|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 18]
  |  |  |  Branch (365:54): [Folded, False: 18]
  |  |  |  Branch (365:63): [True: 0, False: 18]
  |  |  ------------------
  ------------------
 9605|      0|            target =
 9606|      0|                ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
 9607|      0|                    this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
 9608|      0|          }
 9609|       |          // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldOptions.EditionDefault)
 9610|     18|          return target;
 9611|     18|        }
_ZNK6google8protobuf27FieldOptions_EditionDefault12ByteSizeLongEv:
 9617|     18|        ::size_t FieldOptions_EditionDefault::ByteSizeLong() const {
 9618|     18|          const FieldOptions_EditionDefault& this_ = *this;
 9619|     18|#endif  // PROTOBUF_CUSTOM_VTABLE
 9620|       |          // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldOptions.EditionDefault)
 9621|     18|          ::size_t total_size = 0;
 9622|       |
 9623|     18|          ::uint32_t cached_has_bits = 0;
 9624|       |          // Prevent compiler warnings about cached_has_bits being unused
 9625|     18|          (void)cached_has_bits;
 9626|       |
 9627|     18|          ::_pbi::Prefetch5LinesFrom7Lines(&this_);
 9628|     18|          cached_has_bits = this_._impl_._has_bits_[0];
 9629|     18|          if (cached_has_bits & 0x00000003u) {
  ------------------
  |  Branch (9629:15): [True: 18, False: 0]
  ------------------
 9630|       |            // optional string value = 2;
 9631|     18|            if (cached_has_bits & 0x00000001u) {
  ------------------
  |  Branch (9631:17): [True: 18, False: 0]
  ------------------
 9632|     18|              total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
 9633|     18|                                              this_._internal_value());
 9634|     18|            }
 9635|       |            // optional .google.protobuf.Edition edition = 3;
 9636|     18|            if (cached_has_bits & 0x00000002u) {
  ------------------
  |  Branch (9636:17): [True: 18, False: 0]
  ------------------
 9637|     18|              total_size += 1 +
 9638|     18|                            ::_pbi::WireFormatLite::EnumSize(this_._internal_edition());
 9639|     18|            }
 9640|     18|          }
 9641|     18|          return this_.MaybeComputeUnknownFieldsSize(total_size,
 9642|     18|                                                     &this_._impl_._cached_size_);
 9643|     18|        }
_ZN6google8protobuf27FieldOptions_FeatureSupportD2Ev:
 9751|      9|FieldOptions_FeatureSupport::~FieldOptions_FeatureSupport() {
 9752|       |  // @@protoc_insertion_point(destructor:google.protobuf.FieldOptions.FeatureSupport)
 9753|      9|  SharedDtor(*this);
 9754|      9|}
_ZNK6google8protobuf27FieldOptions_FeatureSupport12GetClassDataEv:
 9793|      1|const ::google::protobuf::internal::ClassData* FieldOptions_FeatureSupport::GetClassData() const {
 9794|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
 9795|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
 9796|      1|  return _class_data_.base();
 9797|      1|}
_ZNK6google8protobuf27FieldOptions_FeatureSupport18_InternalSerializeEPhPNS0_2io19EpsCopyOutputStreamE:
 9882|      9|            ::google::protobuf::io::EpsCopyOutputStream* stream) const {
 9883|      9|          const FieldOptions_FeatureSupport& this_ = *this;
 9884|      9|#endif  // PROTOBUF_CUSTOM_VTABLE
 9885|       |          // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldOptions.FeatureSupport)
 9886|      9|          ::uint32_t cached_has_bits = 0;
 9887|      9|          (void)cached_has_bits;
 9888|       |
 9889|      9|          cached_has_bits = this_._impl_._has_bits_[0];
 9890|       |          // optional .google.protobuf.Edition edition_introduced = 1;
 9891|      9|          if (cached_has_bits & 0x00000002u) {
  ------------------
  |  Branch (9891:15): [True: 9, False: 0]
  ------------------
 9892|      9|            target = stream->EnsureSpace(target);
 9893|      9|            target = ::_pbi::WireFormatLite::WriteEnumToArray(
 9894|      9|                1, this_._internal_edition_introduced(), target);
 9895|      9|          }
 9896|       |
 9897|       |          // optional .google.protobuf.Edition edition_deprecated = 2;
 9898|      9|          if (cached_has_bits & 0x00000004u) {
  ------------------
  |  Branch (9898:15): [True: 1, False: 8]
  ------------------
 9899|      1|            target = stream->EnsureSpace(target);
 9900|      1|            target = ::_pbi::WireFormatLite::WriteEnumToArray(
 9901|      1|                2, this_._internal_edition_deprecated(), target);
 9902|      1|          }
 9903|       |
 9904|       |          // optional string deprecation_warning = 3;
 9905|      9|          if (cached_has_bits & 0x00000001u) {
  ------------------
  |  Branch (9905:15): [True: 1, False: 8]
  ------------------
 9906|      1|            const std::string& _s = this_._internal_deprecation_warning();
 9907|      1|            ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormat::SERIALIZE,
 9908|      1|                                        "google.protobuf.FieldOptions.FeatureSupport.deprecation_warning");
 9909|      1|            target = stream->WriteStringMaybeAliased(3, _s, target);
 9910|      1|          }
 9911|       |
 9912|       |          // optional .google.protobuf.Edition edition_removed = 4;
 9913|      9|          if (cached_has_bits & 0x00000008u) {
  ------------------
  |  Branch (9913:15): [True: 0, False: 9]
  ------------------
 9914|      0|            target = stream->EnsureSpace(target);
 9915|      0|            target = ::_pbi::WireFormatLite::WriteEnumToArray(
 9916|      0|                4, this_._internal_edition_removed(), target);
 9917|      0|          }
 9918|       |
 9919|      9|          if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
  ------------------
  |  |  365|      9|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 9]
  |  |  |  Branch (365:54): [Folded, False: 9]
  |  |  |  Branch (365:63): [True: 0, False: 9]
  |  |  ------------------
  ------------------
 9920|      0|            target =
 9921|      0|                ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
 9922|      0|                    this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
 9923|      0|          }
 9924|       |          // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldOptions.FeatureSupport)
 9925|      9|          return target;
 9926|      9|        }
_ZNK6google8protobuf27FieldOptions_FeatureSupport12ByteSizeLongEv:
 9932|      9|        ::size_t FieldOptions_FeatureSupport::ByteSizeLong() const {
 9933|      9|          const FieldOptions_FeatureSupport& this_ = *this;
 9934|      9|#endif  // PROTOBUF_CUSTOM_VTABLE
 9935|       |          // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldOptions.FeatureSupport)
 9936|      9|          ::size_t total_size = 0;
 9937|       |
 9938|      9|          ::uint32_t cached_has_bits = 0;
 9939|       |          // Prevent compiler warnings about cached_has_bits being unused
 9940|      9|          (void)cached_has_bits;
 9941|       |
 9942|      9|          ::_pbi::Prefetch5LinesFrom7Lines(&this_);
 9943|      9|          cached_has_bits = this_._impl_._has_bits_[0];
 9944|      9|          if (cached_has_bits & 0x0000000fu) {
  ------------------
  |  Branch (9944:15): [True: 9, False: 0]
  ------------------
 9945|       |            // optional string deprecation_warning = 3;
 9946|      9|            if (cached_has_bits & 0x00000001u) {
  ------------------
  |  Branch (9946:17): [True: 1, False: 8]
  ------------------
 9947|      1|              total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
 9948|      1|                                              this_._internal_deprecation_warning());
 9949|      1|            }
 9950|       |            // optional .google.protobuf.Edition edition_introduced = 1;
 9951|      9|            if (cached_has_bits & 0x00000002u) {
  ------------------
  |  Branch (9951:17): [True: 9, False: 0]
  ------------------
 9952|      9|              total_size += 1 +
 9953|      9|                            ::_pbi::WireFormatLite::EnumSize(this_._internal_edition_introduced());
 9954|      9|            }
 9955|       |            // optional .google.protobuf.Edition edition_deprecated = 2;
 9956|      9|            if (cached_has_bits & 0x00000004u) {
  ------------------
  |  Branch (9956:17): [True: 1, False: 8]
  ------------------
 9957|      1|              total_size += 1 +
 9958|      1|                            ::_pbi::WireFormatLite::EnumSize(this_._internal_edition_deprecated());
 9959|      1|            }
 9960|       |            // optional .google.protobuf.Edition edition_removed = 4;
 9961|      9|            if (cached_has_bits & 0x00000008u) {
  ------------------
  |  Branch (9961:17): [True: 0, False: 9]
  ------------------
 9962|      0|              total_size += 1 +
 9963|      0|                            ::_pbi::WireFormatLite::EnumSize(this_._internal_edition_removed());
 9964|      0|            }
 9965|      9|          }
 9966|      9|          return this_.MaybeComputeUnknownFieldsSize(total_size,
 9967|      9|                                                     &this_._impl_._cached_size_);
 9968|      9|        }
_ZN6google8protobuf12FieldOptionsC2EPNS0_5ArenaE:
10037|     17|    : ::google::protobuf::Message(arena) {
10038|     17|#endif  // PROTOBUF_CUSTOM_VTABLE
10039|     17|  SharedCtor(arena);
10040|       |  // @@protoc_insertion_point(arena_constructor:google.protobuf.FieldOptions)
10041|     17|}
_ZN6google8protobuf12FieldOptionsD2Ev:
10101|     17|FieldOptions::~FieldOptions() {
10102|       |  // @@protoc_insertion_point(destructor:google.protobuf.FieldOptions)
10103|     17|  SharedDtor(*this);
10104|     17|}
_ZNK6google8protobuf12FieldOptions12GetClassDataEv:
10167|     35|const ::google::protobuf::internal::ClassData* FieldOptions::GetClassData() const {
10168|     35|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
10169|     35|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
10170|     35|  return _class_data_.base();
10171|     35|}
_ZN6google8protobuf12FieldOptions5ClearEv:
10286|     17|PROTOBUF_NOINLINE void FieldOptions::Clear() {
10287|       |// @@protoc_insertion_point(message_clear_start:google.protobuf.FieldOptions)
10288|     17|  ::google::protobuf::internal::TSanWrite(&_impl_);
10289|     17|  ::uint32_t cached_has_bits = 0;
10290|       |  // Prevent compiler warnings about cached_has_bits being unused
10291|     17|  (void) cached_has_bits;
10292|       |
10293|     17|  _impl_._extensions_.Clear();
10294|     17|  _impl_.targets_.Clear();
10295|     17|  _impl_.edition_defaults_.Clear();
10296|     17|  _impl_.uninterpreted_option_.Clear();
10297|     17|  cached_has_bits = _impl_._has_bits_[0];
10298|     17|  if (cached_has_bits & 0x00000003u) {
  ------------------
  |  Branch (10298:7): [True: 0, False: 17]
  ------------------
10299|      0|    if (cached_has_bits & 0x00000001u) {
  ------------------
  |  Branch (10299:9): [True: 0, False: 0]
  ------------------
10300|      0|      ABSL_DCHECK(_impl_.features_ != nullptr);
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10301|      0|      _impl_.features_->Clear();
10302|      0|    }
10303|      0|    if (cached_has_bits & 0x00000002u) {
  ------------------
  |  Branch (10303:9): [True: 0, False: 0]
  ------------------
10304|      0|      ABSL_DCHECK(_impl_.feature_support_ != nullptr);
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10305|      0|      _impl_.feature_support_->Clear();
10306|      0|    }
10307|      0|  }
10308|     17|  if (cached_has_bits & 0x000000fcu) {
  ------------------
  |  Branch (10308:7): [True: 0, False: 17]
  ------------------
10309|      0|    ::memset(&_impl_.ctype_, 0, static_cast<::size_t>(
10310|      0|        reinterpret_cast<char*>(&_impl_.deprecated_) -
10311|      0|        reinterpret_cast<char*>(&_impl_.ctype_)) + sizeof(_impl_.deprecated_));
10312|      0|  }
10313|     17|  if (cached_has_bits & 0x00000700u) {
  ------------------
  |  Branch (10313:7): [True: 0, False: 17]
  ------------------
10314|      0|    ::memset(&_impl_.weak_, 0, static_cast<::size_t>(
10315|      0|        reinterpret_cast<char*>(&_impl_.retention_) -
10316|      0|        reinterpret_cast<char*>(&_impl_.weak_)) + sizeof(_impl_.retention_));
10317|      0|  }
10318|     17|  _impl_._has_bits_.Clear();
10319|     17|  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
10320|     17|}
_ZNK6google8protobuf12FieldOptions18_InternalSerializeEPhPNS0_2io19EpsCopyOutputStreamE:
10330|     17|            ::google::protobuf::io::EpsCopyOutputStream* stream) const {
10331|     17|          const FieldOptions& this_ = *this;
10332|     17|#endif  // PROTOBUF_CUSTOM_VTABLE
10333|       |          // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldOptions)
10334|     17|          ::uint32_t cached_has_bits = 0;
10335|     17|          (void)cached_has_bits;
10336|       |
10337|     17|          cached_has_bits = this_._impl_._has_bits_[0];
10338|       |          // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
10339|     17|          if (cached_has_bits & 0x00000004u) {
  ------------------
  |  Branch (10339:15): [True: 0, False: 17]
  ------------------
10340|      0|            target = stream->EnsureSpace(target);
10341|      0|            target = ::_pbi::WireFormatLite::WriteEnumToArray(
10342|      0|                1, this_._internal_ctype(), target);
10343|      0|          }
10344|       |
10345|       |          // optional bool packed = 2;
10346|     17|          if (cached_has_bits & 0x00000010u) {
  ------------------
  |  Branch (10346:15): [True: 3, False: 14]
  ------------------
10347|      3|            target = stream->EnsureSpace(target);
10348|      3|            target = ::_pbi::WireFormatLite::WriteBoolToArray(
10349|      3|                2, this_._internal_packed(), target);
10350|      3|          }
10351|       |
10352|       |          // optional bool deprecated = 3 [default = false];
10353|     17|          if (cached_has_bits & 0x00000080u) {
  ------------------
  |  Branch (10353:15): [True: 3, False: 14]
  ------------------
10354|      3|            target = stream->EnsureSpace(target);
10355|      3|            target = ::_pbi::WireFormatLite::WriteBoolToArray(
10356|      3|                3, this_._internal_deprecated(), target);
10357|      3|          }
10358|       |
10359|       |          // optional bool lazy = 5 [default = false];
10360|     17|          if (cached_has_bits & 0x00000020u) {
  ------------------
  |  Branch (10360:15): [True: 0, False: 17]
  ------------------
10361|      0|            target = stream->EnsureSpace(target);
10362|      0|            target = ::_pbi::WireFormatLite::WriteBoolToArray(
10363|      0|                5, this_._internal_lazy(), target);
10364|      0|          }
10365|       |
10366|       |          // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
10367|     17|          if (cached_has_bits & 0x00000008u) {
  ------------------
  |  Branch (10367:15): [True: 0, False: 17]
  ------------------
10368|      0|            target = stream->EnsureSpace(target);
10369|      0|            target = ::_pbi::WireFormatLite::WriteEnumToArray(
10370|      0|                6, this_._internal_jstype(), target);
10371|      0|          }
10372|       |
10373|       |          // optional bool weak = 10 [default = false];
10374|     17|          if (cached_has_bits & 0x00000100u) {
  ------------------
  |  Branch (10374:15): [True: 0, False: 17]
  ------------------
10375|      0|            target = stream->EnsureSpace(target);
10376|      0|            target = ::_pbi::WireFormatLite::WriteBoolToArray(
10377|      0|                10, this_._internal_weak(), target);
10378|      0|          }
10379|       |
10380|       |          // optional bool unverified_lazy = 15 [default = false];
10381|     17|          if (cached_has_bits & 0x00000040u) {
  ------------------
  |  Branch (10381:15): [True: 0, False: 17]
  ------------------
10382|      0|            target = stream->EnsureSpace(target);
10383|      0|            target = ::_pbi::WireFormatLite::WriteBoolToArray(
10384|      0|                15, this_._internal_unverified_lazy(), target);
10385|      0|          }
10386|       |
10387|       |          // optional bool debug_redact = 16 [default = false];
10388|     17|          if (cached_has_bits & 0x00000200u) {
  ------------------
  |  Branch (10388:15): [True: 0, False: 17]
  ------------------
10389|      0|            target = stream->EnsureSpace(target);
10390|      0|            target = ::_pbi::WireFormatLite::WriteBoolToArray(
10391|      0|                16, this_._internal_debug_redact(), target);
10392|      0|          }
10393|       |
10394|       |          // optional .google.protobuf.FieldOptions.OptionRetention retention = 17;
10395|     17|          if (cached_has_bits & 0x00000400u) {
  ------------------
  |  Branch (10395:15): [True: 11, False: 6]
  ------------------
10396|     11|            target = stream->EnsureSpace(target);
10397|     11|            target = ::_pbi::WireFormatLite::WriteEnumToArray(
10398|     11|                17, this_._internal_retention(), target);
10399|     11|          }
10400|       |
10401|       |          // repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19;
10402|     36|          for (int i = 0, n = this_._internal_targets_size(); i < n; ++i) {
  ------------------
  |  Branch (10402:63): [True: 19, False: 17]
  ------------------
10403|     19|            target = stream->EnsureSpace(target);
10404|     19|            target = ::_pbi::WireFormatLite::WriteEnumToArray(
10405|     19|                19, static_cast<::google::protobuf::FieldOptions_OptionTargetType>(this_._internal_targets().Get(i)),
10406|     19|                target);
10407|     19|          }
10408|       |
10409|       |          // repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
10410|     17|          for (unsigned i = 0, n = static_cast<unsigned>(
10411|     17|                                   this_._internal_edition_defaults_size());
10412|     35|               i < n; i++) {
  ------------------
  |  Branch (10412:16): [True: 18, False: 17]
  ------------------
10413|     18|            const auto& repfield = this_._internal_edition_defaults().Get(i);
10414|     18|            target =
10415|     18|                ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
10416|     18|                    20, repfield, repfield.GetCachedSize(),
10417|     18|                    target, stream);
10418|     18|          }
10419|       |
10420|       |          // optional .google.protobuf.FeatureSet features = 21;
10421|     17|          if (cached_has_bits & 0x00000001u) {
  ------------------
  |  Branch (10421:15): [True: 0, False: 17]
  ------------------
10422|      0|            target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
10423|      0|                21, *this_._impl_.features_, this_._impl_.features_->GetCachedSize(), target,
10424|      0|                stream);
10425|      0|          }
10426|       |
10427|       |          // optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22;
10428|     17|          if (cached_has_bits & 0x00000002u) {
  ------------------
  |  Branch (10428:15): [True: 9, False: 8]
  ------------------
10429|      9|            target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
10430|      9|                22, *this_._impl_.feature_support_, this_._impl_.feature_support_->GetCachedSize(), target,
10431|      9|                stream);
10432|      9|          }
10433|       |
10434|       |          // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
10435|     17|          for (unsigned i = 0, n = static_cast<unsigned>(
10436|     17|                                   this_._internal_uninterpreted_option_size());
10437|     17|               i < n; i++) {
  ------------------
  |  Branch (10437:16): [True: 0, False: 17]
  ------------------
10438|      0|            const auto& repfield = this_._internal_uninterpreted_option().Get(i);
10439|      0|            target =
10440|      0|                ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
10441|      0|                    999, repfield, repfield.GetCachedSize(),
10442|      0|                    target, stream);
10443|      0|          }
10444|       |
10445|       |          // Extension range [1000, 536870912)
10446|     17|          target = this_._impl_._extensions_._InternalSerialize(
10447|     17|              internal_default_instance(), 1000, 536870912, target, stream);
10448|     17|          if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
  ------------------
  |  |  365|     17|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 17]
  |  |  |  Branch (365:54): [Folded, False: 17]
  |  |  |  Branch (365:63): [True: 0, False: 17]
  |  |  ------------------
  ------------------
10449|      0|            target =
10450|      0|                ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
10451|      0|                    this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
10452|      0|          }
10453|       |          // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldOptions)
10454|     17|          return target;
10455|     17|        }
_ZNK6google8protobuf12FieldOptions12ByteSizeLongEv:
10461|     17|        ::size_t FieldOptions::ByteSizeLong() const {
10462|     17|          const FieldOptions& this_ = *this;
10463|     17|#endif  // PROTOBUF_CUSTOM_VTABLE
10464|       |          // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldOptions)
10465|     17|          ::size_t total_size = 0;
10466|     17|          total_size += this_._impl_._extensions_.ByteSize();
10467|       |
10468|     17|          ::uint32_t cached_has_bits = 0;
10469|       |          // Prevent compiler warnings about cached_has_bits being unused
10470|     17|          (void)cached_has_bits;
10471|       |
10472|     17|          ::_pbi::Prefetch5LinesFrom7Lines(&this_);
10473|     17|           {
10474|       |            // repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19;
10475|     17|            {
10476|     17|              std::size_t data_size =
10477|     17|                  ::_pbi::WireFormatLite::EnumSize(this_._internal_targets());
10478|     17|              std::size_t tag_size = std::size_t{2} *
10479|     17|                  ::_pbi::FromIntSize(this_._internal_targets_size());
10480|     17|              total_size += data_size + tag_size;
10481|     17|            }
10482|       |            // repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
10483|     17|            {
10484|     17|              total_size += 2UL * this_._internal_edition_defaults_size();
10485|     18|              for (const auto& msg : this_._internal_edition_defaults()) {
  ------------------
  |  Branch (10485:36): [True: 18, False: 17]
  ------------------
10486|     18|                total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
10487|     18|              }
10488|     17|            }
10489|       |            // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
10490|     17|            {
10491|     17|              total_size += 2UL * this_._internal_uninterpreted_option_size();
10492|     17|              for (const auto& msg : this_._internal_uninterpreted_option()) {
  ------------------
  |  Branch (10492:36): [True: 0, False: 17]
  ------------------
10493|      0|                total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
10494|      0|              }
10495|     17|            }
10496|     17|          }
10497|     17|          cached_has_bits = this_._impl_._has_bits_[0];
10498|     17|          if (cached_has_bits & 0x000000ffu) {
  ------------------
  |  Branch (10498:15): [True: 15, False: 2]
  ------------------
10499|       |            // optional .google.protobuf.FeatureSet features = 21;
10500|     15|            if (cached_has_bits & 0x00000001u) {
  ------------------
  |  Branch (10500:17): [True: 0, False: 15]
  ------------------
10501|      0|              total_size += 2 +
10502|      0|                            ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.features_);
10503|      0|            }
10504|       |            // optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22;
10505|     15|            if (cached_has_bits & 0x00000002u) {
  ------------------
  |  Branch (10505:17): [True: 9, False: 6]
  ------------------
10506|      9|              total_size += 2 +
10507|      9|                            ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.feature_support_);
10508|      9|            }
10509|       |            // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
10510|     15|            if (cached_has_bits & 0x00000004u) {
  ------------------
  |  Branch (10510:17): [True: 0, False: 15]
  ------------------
10511|      0|              total_size += 1 +
10512|      0|                            ::_pbi::WireFormatLite::EnumSize(this_._internal_ctype());
10513|      0|            }
10514|       |            // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
10515|     15|            if (cached_has_bits & 0x00000008u) {
  ------------------
  |  Branch (10515:17): [True: 0, False: 15]
  ------------------
10516|      0|              total_size += 1 +
10517|      0|                            ::_pbi::WireFormatLite::EnumSize(this_._internal_jstype());
10518|      0|            }
10519|       |            // optional bool packed = 2;
10520|     15|            if (cached_has_bits & 0x00000010u) {
  ------------------
  |  Branch (10520:17): [True: 3, False: 12]
  ------------------
10521|      3|              total_size += 2;
10522|      3|            }
10523|       |            // optional bool lazy = 5 [default = false];
10524|     15|            if (cached_has_bits & 0x00000020u) {
  ------------------
  |  Branch (10524:17): [True: 0, False: 15]
  ------------------
10525|      0|              total_size += 2;
10526|      0|            }
10527|       |            // optional bool unverified_lazy = 15 [default = false];
10528|     15|            if (cached_has_bits & 0x00000040u) {
  ------------------
  |  Branch (10528:17): [True: 0, False: 15]
  ------------------
10529|      0|              total_size += 2;
10530|      0|            }
10531|       |            // optional bool deprecated = 3 [default = false];
10532|     15|            if (cached_has_bits & 0x00000080u) {
  ------------------
  |  Branch (10532:17): [True: 3, False: 12]
  ------------------
10533|      3|              total_size += 2;
10534|      3|            }
10535|     15|          }
10536|     17|          if (cached_has_bits & 0x00000700u) {
  ------------------
  |  Branch (10536:15): [True: 11, False: 6]
  ------------------
10537|       |            // optional bool weak = 10 [default = false];
10538|     11|            if (cached_has_bits & 0x00000100u) {
  ------------------
  |  Branch (10538:17): [True: 0, False: 11]
  ------------------
10539|      0|              total_size += 2;
10540|      0|            }
10541|       |            // optional bool debug_redact = 16 [default = false];
10542|     11|            if (cached_has_bits & 0x00000200u) {
  ------------------
  |  Branch (10542:17): [True: 0, False: 11]
  ------------------
10543|      0|              total_size += 3;
10544|      0|            }
10545|       |            // optional .google.protobuf.FieldOptions.OptionRetention retention = 17;
10546|     11|            if (cached_has_bits & 0x00000400u) {
  ------------------
  |  Branch (10546:17): [True: 11, False: 0]
  ------------------
10547|     11|              total_size += 2 +
10548|     11|                            ::_pbi::WireFormatLite::EnumSize(this_._internal_retention());
10549|     11|            }
10550|     11|          }
10551|     17|          return this_.MaybeComputeUnknownFieldsSize(total_size,
10552|     17|                                                     &this_._impl_._cached_size_);
10553|     17|        }
_ZN6google8protobuf12FieldOptions17IsInitializedImplERKNS0_11MessageLiteE:
10632|     68|    const MessageLite& msg) {
10633|     68|  auto& this_ = static_cast<const FieldOptions&>(msg);
10634|     68|  if (!this_._impl_._extensions_.IsInitialized(
  ------------------
  |  Branch (10634:7): [True: 0, False: 68]
  ------------------
10635|     68|          internal_default_instance())) {
10636|      0|    return false;
10637|      0|  }
10638|     68|  if (!::google::protobuf::internal::AllAreInitialized(this_._internal_uninterpreted_option()))
  ------------------
  |  Branch (10638:7): [True: 0, False: 68]
  ------------------
10639|      0|    return false;
10640|     68|  if ((this_._impl_._has_bits_[0] & 0x00000001u) != 0) {
  ------------------
  |  Branch (10640:7): [True: 0, False: 68]
  ------------------
10641|      0|    if (!this_._impl_.features_->IsInitialized()) return false;
  ------------------
  |  Branch (10641:9): [True: 0, False: 0]
  ------------------
10642|      0|  }
10643|     68|  return true;
10644|     68|}
_ZNK6google8protobuf12OneofOptions12GetClassDataEv:
10781|      1|const ::google::protobuf::internal::ClassData* OneofOptions::GetClassData() const {
10782|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
10783|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
10784|      1|  return _class_data_.base();
10785|      1|}
_ZNK6google8protobuf11EnumOptions12GetClassDataEv:
11119|      1|const ::google::protobuf::internal::ClassData* EnumOptions::GetClassData() const {
11120|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
11121|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
11122|      1|  return _class_data_.base();
11123|      1|}
_ZNK6google8protobuf16EnumValueOptions12GetClassDataEv:
11530|      1|const ::google::protobuf::internal::ClassData* EnumValueOptions::GetClassData() const {
11531|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
11532|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
11533|      1|  return _class_data_.base();
11534|      1|}
_ZNK6google8protobuf14ServiceOptions12GetClassDataEv:
11947|      1|const ::google::protobuf::internal::ClassData* ServiceOptions::GetClassData() const {
11948|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
11949|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
11950|      1|  return _class_data_.base();
11951|      1|}
_ZNK6google8protobuf13MethodOptions12GetClassDataEv:
12313|      1|const ::google::protobuf::internal::ClassData* MethodOptions::GetClassData() const {
12314|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
12315|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
12316|      1|  return _class_data_.base();
12317|      1|}
_ZNK6google8protobuf28UninterpretedOption_NamePart12GetClassDataEv:
12678|      1|const ::google::protobuf::internal::ClassData* UninterpretedOption_NamePart::GetClassData() const {
12679|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
12680|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
12681|      1|  return _class_data_.base();
12682|      1|}
_ZNK6google8protobuf19UninterpretedOption12GetClassDataEv:
12988|      1|const ::google::protobuf::internal::ClassData* UninterpretedOption::GetClassData() const {
12989|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
12990|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
12991|      1|  return _class_data_.base();
12992|      1|}
_ZN6google8protobuf10FeatureSetC2EPNS0_5ArenaE:
13320|    259|    : ::google::protobuf::Message(arena) {
13321|    259|#endif  // PROTOBUF_CUSTOM_VTABLE
13322|    259|  SharedCtor(arena);
13323|       |  // @@protoc_insertion_point(arena_constructor:google.protobuf.FeatureSet)
13324|    259|}
_ZN6google8protobuf10FeatureSetC2EPNS0_5ArenaERKS1_:
13338|    775|    : ::google::protobuf::Message(arena) {
13339|    775|#endif  // PROTOBUF_CUSTOM_VTABLE
13340|    775|  FeatureSet* const _this = this;
13341|    775|  (void)_this;
13342|    775|  _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
13343|    775|      from._internal_metadata_);
13344|    775|  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
13345|    775|  _impl_._extensions_.MergeFrom(this, from._impl_._extensions_);
13346|    775|  ::memcpy(reinterpret_cast<char *>(&_impl_) +
13347|    775|               offsetof(Impl_, field_presence_),
13348|    775|           reinterpret_cast<const char *>(&from._impl_) +
13349|    775|               offsetof(Impl_, field_presence_),
13350|    775|           offsetof(Impl_, json_format_) -
13351|    775|               offsetof(Impl_, field_presence_) +
13352|    775|               sizeof(Impl_::json_format_));
13353|       |
13354|       |  // @@protoc_insertion_point(copy_constructor:google.protobuf.FeatureSet)
13355|    775|}
_ZN6google8protobuf10FeatureSetD2Ev:
13371|  1.03k|FeatureSet::~FeatureSet() {
13372|       |  // @@protoc_insertion_point(destructor:google.protobuf.FeatureSet)
13373|  1.03k|  SharedDtor(*this);
13374|  1.03k|}
_ZNK6google8protobuf10FeatureSet12GetClassDataEv:
13423|      1|const ::google::protobuf::internal::ClassData* FeatureSet::GetClassData() const {
13424|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
13425|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
13426|      1|  return _class_data_.base();
13427|      1|}
_ZNK6google8protobuf10FeatureSet18_InternalSerializeEPhPNS0_2io19EpsCopyOutputStreamE:
13524|    239|            ::google::protobuf::io::EpsCopyOutputStream* stream) const {
13525|    239|          const FeatureSet& this_ = *this;
13526|    239|#endif  // PROTOBUF_CUSTOM_VTABLE
13527|       |          // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FeatureSet)
13528|    239|          ::uint32_t cached_has_bits = 0;
13529|    239|          (void)cached_has_bits;
13530|       |
13531|    239|          cached_has_bits = this_._impl_._has_bits_[0];
13532|       |          // optional .google.protobuf.FeatureSet.FieldPresence field_presence = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {
13533|    239|          if (cached_has_bits & 0x00000001u) {
  ------------------
  |  Branch (13533:15): [True: 239, False: 0]
  ------------------
13534|    239|            target = stream->EnsureSpace(target);
13535|    239|            target = ::_pbi::WireFormatLite::WriteEnumToArray(
13536|    239|                1, this_._internal_field_presence(), target);
13537|    239|          }
13538|       |
13539|       |          // optional .google.protobuf.FeatureSet.EnumType enum_type = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = {
13540|    239|          if (cached_has_bits & 0x00000002u) {
  ------------------
  |  Branch (13540:15): [True: 239, False: 0]
  ------------------
13541|    239|            target = stream->EnsureSpace(target);
13542|    239|            target = ::_pbi::WireFormatLite::WriteEnumToArray(
13543|    239|                2, this_._internal_enum_type(), target);
13544|    239|          }
13545|       |
13546|       |          // optional .google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {
13547|    239|          if (cached_has_bits & 0x00000004u) {
  ------------------
  |  Branch (13547:15): [True: 239, False: 0]
  ------------------
13548|    239|            target = stream->EnsureSpace(target);
13549|    239|            target = ::_pbi::WireFormatLite::WriteEnumToArray(
13550|    239|                3, this_._internal_repeated_field_encoding(), target);
13551|    239|          }
13552|       |
13553|       |          // optional .google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {
13554|    239|          if (cached_has_bits & 0x00000008u) {
  ------------------
  |  Branch (13554:15): [True: 239, False: 0]
  ------------------
13555|    239|            target = stream->EnsureSpace(target);
13556|    239|            target = ::_pbi::WireFormatLite::WriteEnumToArray(
13557|    239|                4, this_._internal_utf8_validation(), target);
13558|    239|          }
13559|       |
13560|       |          // optional .google.protobuf.FeatureSet.MessageEncoding message_encoding = 5 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {
13561|    239|          if (cached_has_bits & 0x00000010u) {
  ------------------
  |  Branch (13561:15): [True: 239, False: 0]
  ------------------
13562|    239|            target = stream->EnsureSpace(target);
13563|    239|            target = ::_pbi::WireFormatLite::WriteEnumToArray(
13564|    239|                5, this_._internal_message_encoding(), target);
13565|    239|          }
13566|       |
13567|       |          // optional .google.protobuf.FeatureSet.JsonFormat json_format = 6 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_MESSAGE, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = {
13568|    239|          if (cached_has_bits & 0x00000020u) {
  ------------------
  |  Branch (13568:15): [True: 239, False: 0]
  ------------------
13569|    239|            target = stream->EnsureSpace(target);
13570|    239|            target = ::_pbi::WireFormatLite::WriteEnumToArray(
13571|    239|                6, this_._internal_json_format(), target);
13572|    239|          }
13573|       |
13574|       |          // Extension range [1000, 10001)
13575|    239|          target = this_._impl_._extensions_._InternalSerialize(
13576|    239|              internal_default_instance(), 1000, 10001, target, stream);
13577|    239|          if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
  ------------------
  |  |  365|    239|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 239]
  |  |  |  Branch (365:54): [Folded, False: 239]
  |  |  |  Branch (365:63): [True: 0, False: 239]
  |  |  ------------------
  ------------------
13578|      0|            target =
13579|      0|                ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
13580|      0|                    this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
13581|      0|          }
13582|       |          // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FeatureSet)
13583|    239|          return target;
13584|    239|        }
_ZNK6google8protobuf10FeatureSet12ByteSizeLongEv:
13590|    755|        ::size_t FeatureSet::ByteSizeLong() const {
13591|    755|          const FeatureSet& this_ = *this;
13592|    755|#endif  // PROTOBUF_CUSTOM_VTABLE
13593|       |          // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FeatureSet)
13594|    755|          ::size_t total_size = 0;
13595|    755|          total_size += this_._impl_._extensions_.ByteSize();
13596|       |
13597|    755|          ::uint32_t cached_has_bits = 0;
13598|       |          // Prevent compiler warnings about cached_has_bits being unused
13599|    755|          (void)cached_has_bits;
13600|       |
13601|    755|          ::_pbi::Prefetch5LinesFrom7Lines(&this_);
13602|    755|          cached_has_bits = this_._impl_._has_bits_[0];
13603|    755|          if (cached_has_bits & 0x0000003fu) {
  ------------------
  |  Branch (13603:15): [True: 244, False: 511]
  ------------------
13604|       |            // optional .google.protobuf.FeatureSet.FieldPresence field_presence = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {
13605|    244|            if (cached_has_bits & 0x00000001u) {
  ------------------
  |  Branch (13605:17): [True: 241, False: 3]
  ------------------
13606|    241|              total_size += 1 +
13607|    241|                            ::_pbi::WireFormatLite::EnumSize(this_._internal_field_presence());
13608|    241|            }
13609|       |            // optional .google.protobuf.FeatureSet.EnumType enum_type = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = {
13610|    244|            if (cached_has_bits & 0x00000002u) {
  ------------------
  |  Branch (13610:17): [True: 239, False: 5]
  ------------------
13611|    239|              total_size += 1 +
13612|    239|                            ::_pbi::WireFormatLite::EnumSize(this_._internal_enum_type());
13613|    239|            }
13614|       |            // optional .google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {
13615|    244|            if (cached_has_bits & 0x00000004u) {
  ------------------
  |  Branch (13615:17): [True: 242, False: 2]
  ------------------
13616|    242|              total_size += 1 +
13617|    242|                            ::_pbi::WireFormatLite::EnumSize(this_._internal_repeated_field_encoding());
13618|    242|            }
13619|       |            // optional .google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {
13620|    244|            if (cached_has_bits & 0x00000008u) {
  ------------------
  |  Branch (13620:17): [True: 239, False: 5]
  ------------------
13621|    239|              total_size += 1 +
13622|    239|                            ::_pbi::WireFormatLite::EnumSize(this_._internal_utf8_validation());
13623|    239|            }
13624|       |            // optional .google.protobuf.FeatureSet.MessageEncoding message_encoding = 5 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = {
13625|    244|            if (cached_has_bits & 0x00000010u) {
  ------------------
  |  Branch (13625:17): [True: 239, False: 5]
  ------------------
13626|    239|              total_size += 1 +
13627|    239|                            ::_pbi::WireFormatLite::EnumSize(this_._internal_message_encoding());
13628|    239|            }
13629|       |            // optional .google.protobuf.FeatureSet.JsonFormat json_format = 6 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_MESSAGE, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = {
13630|    244|            if (cached_has_bits & 0x00000020u) {
  ------------------
  |  Branch (13630:17): [True: 239, False: 5]
  ------------------
13631|    239|              total_size += 1 +
13632|    239|                            ::_pbi::WireFormatLite::EnumSize(this_._internal_json_format());
13633|    239|            }
13634|    244|          }
13635|    755|          return this_.MaybeComputeUnknownFieldsSize(total_size,
13636|    755|                                                     &this_._impl_._cached_size_);
13637|    755|        }
_ZN6google8protobuf10FeatureSet9MergeImplERNS0_11MessageLiteERKS2_:
13639|    498|void FeatureSet::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
13640|    498|  auto* const _this = static_cast<FeatureSet*>(&to_msg);
13641|    498|  auto& from = static_cast<const FeatureSet&>(from_msg);
13642|       |  // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FeatureSet)
13643|    498|  ABSL_DCHECK_NE(&from, _this);
  ------------------
  |  |   76|    498|  ABSL_LOG_INTERNAL_DCHECK_NE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   88|    498|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    498|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 498]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    498|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13644|    498|  ::uint32_t cached_has_bits = 0;
13645|    498|  (void) cached_has_bits;
13646|       |
13647|    498|  cached_has_bits = from._impl_._has_bits_[0];
13648|    498|  if (cached_has_bits & 0x0000003fu) {
  ------------------
  |  Branch (13648:7): [True: 248, False: 250]
  ------------------
13649|    248|    if (cached_has_bits & 0x00000001u) {
  ------------------
  |  Branch (13649:9): [True: 245, False: 3]
  ------------------
13650|    245|      _this->_impl_.field_presence_ = from._impl_.field_presence_;
13651|    245|    }
13652|    248|    if (cached_has_bits & 0x00000002u) {
  ------------------
  |  Branch (13652:9): [True: 243, False: 5]
  ------------------
13653|    243|      _this->_impl_.enum_type_ = from._impl_.enum_type_;
13654|    243|    }
13655|    248|    if (cached_has_bits & 0x00000004u) {
  ------------------
  |  Branch (13655:9): [True: 246, False: 2]
  ------------------
13656|    246|      _this->_impl_.repeated_field_encoding_ = from._impl_.repeated_field_encoding_;
13657|    246|    }
13658|    248|    if (cached_has_bits & 0x00000008u) {
  ------------------
  |  Branch (13658:9): [True: 243, False: 5]
  ------------------
13659|    243|      _this->_impl_.utf8_validation_ = from._impl_.utf8_validation_;
13660|    243|    }
13661|    248|    if (cached_has_bits & 0x00000010u) {
  ------------------
  |  Branch (13661:9): [True: 243, False: 5]
  ------------------
13662|    243|      _this->_impl_.message_encoding_ = from._impl_.message_encoding_;
13663|    243|    }
13664|    248|    if (cached_has_bits & 0x00000020u) {
  ------------------
  |  Branch (13664:9): [True: 243, False: 5]
  ------------------
13665|    243|      _this->_impl_.json_format_ = from._impl_.json_format_;
13666|    243|    }
13667|    248|  }
13668|    498|  _this->_impl_._has_bits_[0] |= cached_has_bits;
13669|    498|  _this->_impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
13670|    498|  _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
13671|    498|}
_ZN6google8protobuf10FeatureSet17IsInitializedImplERKNS0_11MessageLiteE:
13681|      8|    const MessageLite& msg) {
13682|      8|  auto& this_ = static_cast<const FeatureSet&>(msg);
13683|      8|  if (!this_._impl_._extensions_.IsInitialized(
  ------------------
  |  Branch (13683:7): [True: 0, False: 8]
  ------------------
13684|      8|          internal_default_instance())) {
13685|      0|    return false;
13686|      0|  }
13687|      8|  return true;
13688|      8|}
_ZN6google8protobuf10FeatureSet12InternalSwapEPS1_:
13690|    259|void FeatureSet::InternalSwap(FeatureSet* PROTOBUF_RESTRICT other) {
13691|    259|  using std::swap;
13692|    259|  _impl_._extensions_.InternalSwap(&other->_impl_._extensions_);
13693|    259|  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
13694|    259|  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
13695|    259|  ::google::protobuf::internal::memswap<
13696|    259|      PROTOBUF_FIELD_OFFSET(FeatureSet, _impl_.json_format_)
13697|    259|      + sizeof(FeatureSet::_impl_.json_format_)
13698|    259|      - PROTOBUF_FIELD_OFFSET(FeatureSet, _impl_.field_presence_)>(
13699|    259|          reinterpret_cast<char*>(&_impl_.field_presence_),
13700|    259|          reinterpret_cast<char*>(&other->_impl_.field_presence_));
13701|    259|}
_ZN6google8protobuf43FeatureSetDefaults_FeatureSetEditionDefaultC2EPNS0_5ArenaE:
13720|      4|    : ::google::protobuf::Message(arena) {
13721|      4|#endif  // PROTOBUF_CUSTOM_VTABLE
13722|      4|  SharedCtor(arena);
13723|       |  // @@protoc_insertion_point(arena_constructor:google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault)
13724|      4|}
_ZN6google8protobuf43FeatureSetDefaults_FeatureSetEditionDefaultD2Ev:
13769|      4|FeatureSetDefaults_FeatureSetEditionDefault::~FeatureSetDefaults_FeatureSetEditionDefault() {
13770|       |  // @@protoc_insertion_point(destructor:google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault)
13771|      4|  SharedDtor(*this);
13772|      4|}
_ZNK6google8protobuf43FeatureSetDefaults_FeatureSetEditionDefault12GetClassDataEv:
13812|      1|const ::google::protobuf::internal::ClassData* FeatureSetDefaults_FeatureSetEditionDefault::GetClassData() const {
13813|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
13814|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
13815|      1|  return _class_data_.base();
13816|      1|}
_ZN6google8protobuf43FeatureSetDefaults_FeatureSetEditionDefault17IsInitializedImplERKNS0_11MessageLiteE:
14016|      4|    const MessageLite& msg) {
14017|      4|  auto& this_ = static_cast<const FeatureSetDefaults_FeatureSetEditionDefault&>(msg);
14018|      4|  if ((this_._impl_._has_bits_[0] & 0x00000001u) != 0) {
  ------------------
  |  Branch (14018:7): [True: 4, False: 0]
  ------------------
14019|      4|    if (!this_._impl_.overridable_features_->IsInitialized()) return false;
  ------------------
  |  Branch (14019:9): [True: 0, False: 4]
  ------------------
14020|      4|  }
14021|      4|  if ((this_._impl_._has_bits_[0] & 0x00000002u) != 0) {
  ------------------
  |  Branch (14021:7): [True: 4, False: 0]
  ------------------
14022|      4|    if (!this_._impl_.fixed_features_->IsInitialized()) return false;
  ------------------
  |  Branch (14022:9): [True: 0, False: 4]
  ------------------
14023|      4|  }
14024|      4|  return true;
14025|      4|}
_ZN6google8protobuf18FeatureSetDefaultsC2EPNS0_5ArenaE:
14056|      1|    : ::google::protobuf::Message(arena) {
14057|      1|#endif  // PROTOBUF_CUSTOM_VTABLE
14058|      1|  SharedCtor(arena);
14059|       |  // @@protoc_insertion_point(arena_constructor:google.protobuf.FeatureSetDefaults)
14060|      1|}
_ZNK6google8protobuf18FeatureSetDefaults12GetClassDataEv:
14159|      3|const ::google::protobuf::internal::ClassData* FeatureSetDefaults::GetClassData() const {
14160|      3|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
14161|      3|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
14162|      3|  return _class_data_.base();
14163|      3|}
_ZN6google8protobuf18FeatureSetDefaults5ClearEv:
14208|      1|PROTOBUF_NOINLINE void FeatureSetDefaults::Clear() {
14209|       |// @@protoc_insertion_point(message_clear_start:google.protobuf.FeatureSetDefaults)
14210|      1|  ::google::protobuf::internal::TSanWrite(&_impl_);
14211|      1|  ::uint32_t cached_has_bits = 0;
14212|       |  // Prevent compiler warnings about cached_has_bits being unused
14213|      1|  (void) cached_has_bits;
14214|       |
14215|      1|  _impl_.defaults_.Clear();
14216|      1|  cached_has_bits = _impl_._has_bits_[0];
14217|      1|  if (cached_has_bits & 0x00000003u) {
  ------------------
  |  Branch (14217:7): [True: 0, False: 1]
  ------------------
14218|      0|    ::memset(&_impl_.minimum_edition_, 0, static_cast<::size_t>(
14219|      0|        reinterpret_cast<char*>(&_impl_.maximum_edition_) -
14220|      0|        reinterpret_cast<char*>(&_impl_.minimum_edition_)) + sizeof(_impl_.maximum_edition_));
14221|      0|  }
14222|      1|  _impl_._has_bits_.Clear();
14223|      1|  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
14224|      1|}
_ZN6google8protobuf18FeatureSetDefaults17IsInitializedImplERKNS0_11MessageLiteE:
14348|      1|    const MessageLite& msg) {
14349|      1|  auto& this_ = static_cast<const FeatureSetDefaults&>(msg);
14350|      1|  if (!::google::protobuf::internal::AllAreInitialized(this_._internal_defaults()))
  ------------------
  |  Branch (14350:7): [True: 0, False: 1]
  ------------------
14351|      0|    return false;
14352|      1|  return true;
14353|      1|}
_ZNK6google8protobuf23SourceCodeInfo_Location12GetClassDataEv:
14497|      1|const ::google::protobuf::internal::ClassData* SourceCodeInfo_Location::GetClassData() const {
14498|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
14499|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
14500|      1|  return _class_data_.base();
14501|      1|}
_ZNK6google8protobuf14SourceCodeInfo12GetClassDataEv:
14867|      1|const ::google::protobuf::internal::ClassData* SourceCodeInfo::GetClassData() const {
14868|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
14869|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
14870|      1|  return _class_data_.base();
14871|      1|}
_ZNK6google8protobuf28GeneratedCodeInfo_Annotation12GetClassDataEv:
15147|      1|const ::google::protobuf::internal::ClassData* GeneratedCodeInfo_Annotation::GetClassData() const {
15148|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
15149|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
15150|      1|  return _class_data_.base();
15151|      1|}
_ZNK6google8protobuf17GeneratedCodeInfo12GetClassDataEv:
15504|      1|const ::google::protobuf::internal::ClassData* GeneratedCodeInfo::GetClassData() const {
15505|      1|  ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
15506|      1|  ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
15507|      1|  return _class_data_.base();
15508|      1|}
_ZN6google8protobuf19FileDescriptorProto10SharedCtorEPNS0_5ArenaE:
 2942|     10|inline void FileDescriptorProto::SharedCtor(::_pb::Arena* arena) {
 2943|     10|  new (&_impl_) Impl_(internal_visibility(), arena);
 2944|     10|  ::memset(reinterpret_cast<char *>(&_impl_) +
 2945|     10|               offsetof(Impl_, options_),
 2946|     10|           0,
 2947|     10|           offsetof(Impl_, edition_) -
 2948|       |               offsetof(Impl_, options_) +
 2949|     10|               sizeof(Impl_::edition_));
 2950|     10|}
_ZN6google8protobuf19FileDescriptorProto5Impl_C2ENS0_8internal18InternalVisibilityEPNS0_5ArenaE:
 2930|     10|      : _cached_size_{0},
 2931|     10|        dependency_{visibility, arena},
 2932|     10|        message_type_{visibility, arena},
 2933|     10|        enum_type_{visibility, arena},
 2934|     10|        service_{visibility, arena},
 2935|     10|        extension_{visibility, arena},
 2936|     10|        public_dependency_{visibility, arena},
 2937|     10|        weak_dependency_{visibility, arena},
 2938|     10|        name_(arena),
 2939|     10|        package_(arena),
 2940|     10|        syntax_(arena) {}
_ZN6google8protobuf19FileDescriptorProto10SharedDtorERNS0_11MessageLiteE:
 2955|      6|inline void FileDescriptorProto::SharedDtor(MessageLite& self) {
 2956|      6|  FileDescriptorProto& this_ = static_cast<FileDescriptorProto&>(self);
 2957|      6|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
 2958|      6|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|      6|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      6|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|     12|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      6|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|     12|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|     12|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 6, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      6|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 6]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      6|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 6, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     12|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|     12|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2959|      6|  this_._impl_.name_.Destroy();
 2960|      6|  this_._impl_.package_.Destroy();
 2961|      6|  this_._impl_.syntax_.Destroy();
 2962|      6|  delete this_._impl_.options_;
 2963|      6|  delete this_._impl_.source_code_info_;
 2964|      6|  this_._impl_.~Impl_();
 2965|      6|}
_ZN6google8protobuf30DescriptorProto_ExtensionRange10SharedDtorERNS0_11MessageLiteE:
 3621|     14|inline void DescriptorProto_ExtensionRange::SharedDtor(MessageLite& self) {
 3622|     14|  DescriptorProto_ExtensionRange& this_ = static_cast<DescriptorProto_ExtensionRange&>(self);
 3623|     14|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
 3624|     14|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|     14|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|     14|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|     28|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|     14|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|     28|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|     28|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 14, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|     14|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 14]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|     14|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 14, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     28|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|     28|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3625|     14|  delete this_._impl_.options_;
 3626|     14|  this_._impl_.~Impl_();
 3627|     14|}
_ZN6google8protobuf29DescriptorProto_ReservedRange10SharedDtorERNS0_11MessageLiteE:
 3918|     14|inline void DescriptorProto_ReservedRange::SharedDtor(MessageLite& self) {
 3919|     14|  DescriptorProto_ReservedRange& this_ = static_cast<DescriptorProto_ReservedRange&>(self);
 3920|     14|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
 3921|     14|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|     14|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|     14|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|     28|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|     14|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|     28|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|     28|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 14, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|     14|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 14]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|     14|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 14, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     28|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|     28|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3922|     14|  this_._impl_.~Impl_();
 3923|     14|}
_ZN6google8protobuf15DescriptorProto10SharedDtorERNS0_11MessageLiteE:
 4207|     60|inline void DescriptorProto::SharedDtor(MessageLite& self) {
 4208|     60|  DescriptorProto& this_ = static_cast<DescriptorProto&>(self);
 4209|     60|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
 4210|     60|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|     60|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|     60|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|    120|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|     60|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|    120|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|    120|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 60, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|     60|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 60]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|     60|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 60, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    120|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|    120|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4211|     60|  this_._impl_.name_.Destroy();
 4212|     60|  delete this_._impl_.options_;
 4213|     60|  this_._impl_.~Impl_();
 4214|     60|}
_ZN6google8protobuf20FieldDescriptorProto10SharedDtorERNS0_11MessageLiteE:
 5578|    296|inline void FieldDescriptorProto::SharedDtor(MessageLite& self) {
 5579|    296|  FieldDescriptorProto& this_ = static_cast<FieldDescriptorProto&>(self);
 5580|    296|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
 5581|    296|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|    296|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|    296|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|    592|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    296|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|    592|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|    592|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 296, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    296|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 296]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|    296|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 296, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    592|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|    592|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5582|    296|  this_._impl_.name_.Destroy();
 5583|    296|  this_._impl_.extendee_.Destroy();
 5584|    296|  this_._impl_.type_name_.Destroy();
 5585|    296|  this_._impl_.default_value_.Destroy();
 5586|    296|  this_._impl_.json_name_.Destroy();
 5587|    296|  delete this_._impl_.options_;
 5588|    296|  this_._impl_.~Impl_();
 5589|    296|}
_ZN6google8protobuf20OneofDescriptorProto10SharedDtorERNS0_11MessageLiteE:
 6114|      4|inline void OneofDescriptorProto::SharedDtor(MessageLite& self) {
 6115|      4|  OneofDescriptorProto& this_ = static_cast<OneofDescriptorProto&>(self);
 6116|      4|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
 6117|      4|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|      4|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      4|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      8|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      4|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      8|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      8|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      4|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      4|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 4, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      8|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      8|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6118|      4|  this_._impl_.name_.Destroy();
 6119|      4|  delete this_._impl_.options_;
 6120|      4|  this_._impl_.~Impl_();
 6121|      4|}
_ZN6google8protobuf37EnumDescriptorProto_EnumReservedRange10SharedDtorERNS0_11MessageLiteE:
 6392|      1|inline void EnumDescriptorProto_EnumReservedRange::SharedDtor(MessageLite& self) {
 6393|      1|  EnumDescriptorProto_EnumReservedRange& this_ = static_cast<EnumDescriptorProto_EnumReservedRange&>(self);
 6394|      1|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
 6395|      1|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|      1|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      1|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      2|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      1|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      2|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      2|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 1, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      1|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 1]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      1|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 1, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      2|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      2|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6396|      1|  this_._impl_.~Impl_();
 6397|      1|}
_ZN6google8protobuf19EnumDescriptorProto10SharedDtorERNS0_11MessageLiteE:
 6671|     30|inline void EnumDescriptorProto::SharedDtor(MessageLite& self) {
 6672|     30|  EnumDescriptorProto& this_ = static_cast<EnumDescriptorProto&>(self);
 6673|     30|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
 6674|     30|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|     30|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|     30|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|     60|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|     30|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|     60|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|     60|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 30, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|     30|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 30]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|     30|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 30, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     60|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|     60|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6675|     30|  this_._impl_.name_.Destroy();
 6676|     30|  delete this_._impl_.options_;
 6677|     30|  this_._impl_.~Impl_();
 6678|     30|}
_ZN6google8protobuf24EnumValueDescriptorProto10SharedDtorERNS0_11MessageLiteE:
 7085|    294|inline void EnumValueDescriptorProto::SharedDtor(MessageLite& self) {
 7086|    294|  EnumValueDescriptorProto& this_ = static_cast<EnumValueDescriptorProto&>(self);
 7087|    294|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
 7088|    294|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|    294|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|    294|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|    588|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    294|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|    588|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|    588|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 294, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    294|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 294]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|    294|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 294, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    588|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|    588|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7089|    294|  this_._impl_.name_.Destroy();
 7090|    294|  delete this_._impl_.options_;
 7091|    294|  this_._impl_.~Impl_();
 7092|    294|}
_ZN6google8protobuf11FileOptions10SharedCtorEPNS0_5ArenaE:
 8195|      2|inline void FileOptions::SharedCtor(::_pb::Arena* arena) {
 8196|      2|  new (&_impl_) Impl_(internal_visibility(), arena);
 8197|      2|  ::memset(reinterpret_cast<char *>(&_impl_) +
 8198|      2|               offsetof(Impl_, features_),
 8199|      2|           0,
 8200|      2|           offsetof(Impl_, deprecated_) -
 8201|       |               offsetof(Impl_, features_) +
 8202|      2|               sizeof(Impl_::deprecated_));
 8203|      2|}
_ZN6google8protobuf11FileOptions5Impl_C2ENS0_8internal18InternalVisibilityEPNS0_5ArenaE:
 8179|      2|      : _extensions_{visibility, arena},
 8180|      2|        _cached_size_{0},
 8181|      2|        uninterpreted_option_{visibility, arena},
 8182|      2|        java_package_(arena),
 8183|      2|        java_outer_classname_(arena),
 8184|      2|        go_package_(arena),
 8185|      2|        objc_class_prefix_(arena),
 8186|      2|        csharp_namespace_(arena),
 8187|      2|        swift_prefix_(arena),
 8188|      2|        php_class_prefix_(arena),
 8189|      2|        php_namespace_(arena),
 8190|      2|        php_metadata_namespace_(arena),
 8191|      2|        ruby_package_(arena),
 8192|      2|        optimize_for_{static_cast< ::google::protobuf::FileOptions_OptimizeMode >(1)},
 8193|      2|        cc_enable_arenas_{true} {}
_ZN6google8protobuf11FileOptions10SharedDtorERNS0_11MessageLiteE:
 8208|      3|inline void FileOptions::SharedDtor(MessageLite& self) {
 8209|      3|  FileOptions& this_ = static_cast<FileOptions&>(self);
 8210|      3|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
 8211|      3|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|      3|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      3|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      6|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      3|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      6|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      6|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 3, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      3|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 3]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      3|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 3, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      6|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      6|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 8212|      3|  this_._impl_.java_package_.Destroy();
 8213|      3|  this_._impl_.java_outer_classname_.Destroy();
 8214|      3|  this_._impl_.go_package_.Destroy();
 8215|      3|  this_._impl_.objc_class_prefix_.Destroy();
 8216|      3|  this_._impl_.csharp_namespace_.Destroy();
 8217|      3|  this_._impl_.swift_prefix_.Destroy();
 8218|      3|  this_._impl_.php_class_prefix_.Destroy();
 8219|      3|  this_._impl_.php_namespace_.Destroy();
 8220|      3|  this_._impl_.php_metadata_namespace_.Destroy();
 8221|      3|  this_._impl_.ruby_package_.Destroy();
 8222|      3|  delete this_._impl_.features_;
 8223|      3|  this_._impl_.~Impl_();
 8224|      3|}
_ZN6google8protobuf27FieldOptions_EditionDefault10SharedDtorERNS0_11MessageLiteE:
 9472|     18|inline void FieldOptions_EditionDefault::SharedDtor(MessageLite& self) {
 9473|     18|  FieldOptions_EditionDefault& this_ = static_cast<FieldOptions_EditionDefault&>(self);
 9474|     18|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
 9475|     18|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|     18|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|     18|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|     36|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|     18|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|     36|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|     36|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 18, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|     18|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 18]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|     18|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 18, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     36|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|     36|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9476|     18|  this_._impl_.value_.Destroy();
 9477|     18|  this_._impl_.~Impl_();
 9478|     18|}
_ZN6google8protobuf27FieldOptions_FeatureSupport10SharedDtorERNS0_11MessageLiteE:
 9755|      9|inline void FieldOptions_FeatureSupport::SharedDtor(MessageLite& self) {
 9756|      9|  FieldOptions_FeatureSupport& this_ = static_cast<FieldOptions_FeatureSupport&>(self);
 9757|      9|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
 9758|      9|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|      9|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      9|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|     18|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      9|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|     18|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|     18|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 9, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      9|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 9]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      9|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 9, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     18|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|     18|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 9759|      9|  this_._impl_.deprecation_warning_.Destroy();
 9760|      9|  this_._impl_.~Impl_();
 9761|      9|}
_ZN6google8protobuf12FieldOptions10SharedCtorEPNS0_5ArenaE:
10092|     17|inline void FieldOptions::SharedCtor(::_pb::Arena* arena) {
10093|     17|  new (&_impl_) Impl_(internal_visibility(), arena);
10094|     17|  ::memset(reinterpret_cast<char *>(&_impl_) +
10095|     17|               offsetof(Impl_, features_),
10096|     17|           0,
10097|     17|           offsetof(Impl_, retention_) -
10098|       |               offsetof(Impl_, features_) +
10099|     17|               sizeof(Impl_::retention_));
10100|     17|}
_ZN6google8protobuf12FieldOptions5Impl_C2ENS0_8internal18InternalVisibilityEPNS0_5ArenaE:
10086|     17|      : _extensions_{visibility, arena},
10087|     17|        _cached_size_{0},
10088|     17|        targets_{visibility, arena},
10089|     17|        edition_defaults_{visibility, arena},
10090|     17|        uninterpreted_option_{visibility, arena} {}
_ZN6google8protobuf12FieldOptions10SharedDtorERNS0_11MessageLiteE:
10105|     17|inline void FieldOptions::SharedDtor(MessageLite& self) {
10106|     17|  FieldOptions& this_ = static_cast<FieldOptions&>(self);
10107|     17|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
10108|     17|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|     17|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|     17|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|     34|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|     17|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|     34|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|     34|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 17, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|     17|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 17]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|     17|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 17, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     34|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|     34|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
10109|     17|  delete this_._impl_.features_;
10110|     17|  delete this_._impl_.feature_support_;
10111|     17|  this_._impl_.~Impl_();
10112|     17|}
_ZN6google8protobuf10FeatureSet5Impl_C2ENS0_8internal18InternalVisibilityEPNS0_5ArenaERKS2_RKS1_:
13328|    775|      : _extensions_{visibility, arena},
13329|    775|        _has_bits_{from._has_bits_},
13330|    775|        _cached_size_{0} {}
_ZN6google8protobuf10FeatureSet10SharedCtorEPNS0_5ArenaE:
13362|    259|inline void FeatureSet::SharedCtor(::_pb::Arena* arena) {
13363|    259|  new (&_impl_) Impl_(internal_visibility(), arena);
13364|    259|  ::memset(reinterpret_cast<char *>(&_impl_) +
13365|    259|               offsetof(Impl_, field_presence_),
13366|    259|           0,
13367|    259|           offsetof(Impl_, json_format_) -
13368|       |               offsetof(Impl_, field_presence_) +
13369|    259|               sizeof(Impl_::json_format_));
13370|    259|}
_ZN6google8protobuf10FeatureSet5Impl_C2ENS0_8internal18InternalVisibilityEPNS0_5ArenaE:
13359|    259|      : _extensions_{visibility, arena},
13360|    259|        _cached_size_{0} {}
_ZN6google8protobuf10FeatureSet10SharedDtorERNS0_11MessageLiteE:
13375|  1.03k|inline void FeatureSet::SharedDtor(MessageLite& self) {
13376|  1.03k|  FeatureSet& this_ = static_cast<FeatureSet&>(self);
13377|  1.03k|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
13378|  1.03k|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|  1.03k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  1.03k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  2.06k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  1.03k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  2.06k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  2.06k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 1.03k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  1.03k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 1.03k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  1.03k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 1.03k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  2.06k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  2.06k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13379|  1.03k|  this_._impl_.~Impl_();
13380|  1.03k|}
_ZN6google8protobuf43FeatureSetDefaults_FeatureSetEditionDefault10SharedCtorEPNS0_5ArenaE:
13760|      4|inline void FeatureSetDefaults_FeatureSetEditionDefault::SharedCtor(::_pb::Arena* arena) {
13761|      4|  new (&_impl_) Impl_(internal_visibility(), arena);
13762|      4|  ::memset(reinterpret_cast<char *>(&_impl_) +
13763|      4|               offsetof(Impl_, overridable_features_),
13764|      4|           0,
13765|      4|           offsetof(Impl_, edition_) -
13766|       |               offsetof(Impl_, overridable_features_) +
13767|      4|               sizeof(Impl_::edition_));
13768|      4|}
_ZN6google8protobuf43FeatureSetDefaults_FeatureSetEditionDefault5Impl_C2ENS0_8internal18InternalVisibilityEPNS0_5ArenaE:
13758|      4|      : _cached_size_{0} {}
_ZN6google8protobuf43FeatureSetDefaults_FeatureSetEditionDefault10SharedDtorERNS0_11MessageLiteE:
13773|      4|inline void FeatureSetDefaults_FeatureSetEditionDefault::SharedDtor(MessageLite& self) {
13774|      4|  FeatureSetDefaults_FeatureSetEditionDefault& this_ = static_cast<FeatureSetDefaults_FeatureSetEditionDefault&>(self);
13775|      4|  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
13776|      4|  ABSL_DCHECK(this_.GetArena() == nullptr);
  ------------------
  |  |   47|      4|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      4|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      8|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      4|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      8|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      8|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      4|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      4|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 4, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      8|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      8|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
13777|      4|  delete this_._impl_.overridable_features_;
13778|      4|  delete this_._impl_.fixed_features_;
13779|      4|  this_._impl_.~Impl_();
13780|      4|}
_ZN6google8protobuf18FeatureSetDefaults10SharedCtorEPNS0_5ArenaE:
14097|      1|inline void FeatureSetDefaults::SharedCtor(::_pb::Arena* arena) {
14098|      1|  new (&_impl_) Impl_(internal_visibility(), arena);
14099|      1|  ::memset(reinterpret_cast<char *>(&_impl_) +
14100|      1|               offsetof(Impl_, minimum_edition_),
14101|      1|           0,
14102|      1|           offsetof(Impl_, maximum_edition_) -
14103|       |               offsetof(Impl_, minimum_edition_) +
14104|      1|               sizeof(Impl_::maximum_edition_));
14105|      1|}
_ZN6google8protobuf18FeatureSetDefaults5Impl_C2ENS0_8internal18InternalVisibilityEPNS0_5ArenaE:
14094|      1|      : _cached_size_{0},
14095|      1|        defaults_{visibility, arena} {}

_ZNK6google8protobuf27FieldOptions_FeatureSupport13GetCachedSizeEv:
 1598|      9|  int GetCachedSize() const { return _impl_._cached_size_.Get(); }
_ZNK6google8protobuf27FieldOptions_EditionDefault13GetCachedSizeEv:
 1835|     18|  int GetCachedSize() const { return _impl_._cached_size_.Get(); }
_ZN6google8protobuf10FeatureSetC2ERKS1_:
 1948|    775|  inline FeatureSet(const FeatureSet& from) : FeatureSet(nullptr, from) {}
_ZN6google8protobuf10FeatureSetC2EOS1_:
 1950|    259|      : FeatureSet(nullptr, std::move(from)) {}
_ZN6google8protobuf10FeatureSetaSEOS1_:
 1955|    259|  inline FeatureSet& operator=(FeatureSet&& from) noexcept {
 1956|    259|    if (this == &from) return *this;
  ------------------
  |  Branch (1956:9): [True: 0, False: 259]
  ------------------
 1957|    259|    if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
  ------------------
  |  Branch (1957:9): [True: 259, False: 0]
  ------------------
 1958|    259|      InternalSwap(&from);
 1959|    259|    } else {
 1960|      0|      CopyFrom(from);
 1961|      0|    }
 1962|    259|    return *this;
 1963|    259|  }
_ZN6google8protobuf10FeatureSet16default_instanceEv:
 1983|  2.58k|  static const FeatureSet& default_instance() {
 1984|  2.58k|    return *internal_default_instance();
 1985|  2.58k|  }
_ZN6google8protobuf10FeatureSet25internal_default_instanceEv:
 1986|  3.33k|  static inline const FeatureSet* internal_default_instance() {
 1987|  3.33k|    return reinterpret_cast<const FeatureSet*>(
 1988|  3.33k|        &_FeatureSet_default_instance_);
 1989|  3.33k|  }
_ZN6google8protobuf10FeatureSet9MergeFromERKS1_:
 2014|    498|  void MergeFrom(const FeatureSet& from) { FeatureSet::MergeImpl(*this, from); }
_ZNK6google8protobuf10FeatureSet13IsInitializedEv:
 2022|      8|  bool IsInitialized() const {
 2023|      8|    return IsInitializedImpl(*this);
 2024|      8|  }
_ZN6google8protobuf10FeatureSetC2EPNS0_5ArenaEOS1_:
 2067|    259|      : FeatureSet(arena) {
 2068|    259|    *this = ::std::move(from);
 2069|    259|  }
_ZN6google8protobuf10FeatureSet21FieldPresence_IsValidEi:
 2084|    255|  static inline bool FieldPresence_IsValid(int value) {
 2085|    255|    return FeatureSet_FieldPresence_IsValid(value);
 2086|    255|  }
_ZN6google8protobuf10FeatureSet16EnumType_IsValidEi:
 2104|    255|  static inline bool EnumType_IsValid(int value) {
 2105|    255|    return FeatureSet_EnumType_IsValid(value);
 2106|    255|  }
_ZN6google8protobuf10FeatureSet29RepeatedFieldEncoding_IsValidEi:
 2124|    255|  static inline bool RepeatedFieldEncoding_IsValid(int value) {
 2125|    255|    return FeatureSet_RepeatedFieldEncoding_IsValid(value);
 2126|    255|  }
_ZN6google8protobuf10FeatureSet22Utf8Validation_IsValidEi:
 2144|    255|  static inline bool Utf8Validation_IsValid(int value) {
 2145|    255|    return FeatureSet_Utf8Validation_IsValid(value);
 2146|    255|  }
_ZN6google8protobuf10FeatureSet23MessageEncoding_IsValidEi:
 2164|    255|  static inline bool MessageEncoding_IsValid(int value) {
 2165|    255|    return FeatureSet_MessageEncoding_IsValid(value);
 2166|    255|  }
_ZN6google8protobuf10FeatureSet18JsonFormat_IsValidEi:
 2184|    255|  static inline bool JsonFormat_IsValid(int value) {
 2185|    255|    return FeatureSet_JsonFormat_IsValid(value);
 2186|    255|  }
_ZN6google8protobuf14SourceCodeInfo16default_instanceEv:
 3512|      4|  static const SourceCodeInfo& default_instance() {
 3513|      4|    return *internal_default_instance();
 3514|      4|  }
_ZN6google8protobuf14SourceCodeInfo25internal_default_instanceEv:
 3515|      4|  static inline const SourceCodeInfo* internal_default_instance() {
 3516|      4|    return reinterpret_cast<const SourceCodeInfo*>(
 3517|      4|        &_SourceCodeInfo_default_instance_);
 3518|      4|  }
_ZN6google8protobuf43FeatureSetDefaults_FeatureSetEditionDefaultC2Ev:
 4044|      4|  inline FeatureSetDefaults_FeatureSetEditionDefault() : FeatureSetDefaults_FeatureSetEditionDefault(nullptr) {}
_ZNK6google8protobuf43FeatureSetDefaults_FeatureSetEditionDefault13IsInitializedEv:
 4132|      4|  bool IsInitialized() const {
 4133|      4|    return IsInitializedImpl(*this);
 4134|      4|  }
_ZN6google8protobuf12OneofOptions16default_instanceEv:
 4737|      2|  static const OneofOptions& default_instance() {
 4738|      2|    return *internal_default_instance();
 4739|      2|  }
_ZN6google8protobuf12OneofOptions25internal_default_instanceEv:
 4740|      2|  static inline const OneofOptions* internal_default_instance() {
 4741|      2|    return reinterpret_cast<const OneofOptions*>(
 4742|      2|        &_OneofOptions_default_instance_);
 4743|      2|  }
_ZN6google8protobuf14MessageOptions16default_instanceEv:
 5583|     47|  static const MessageOptions& default_instance() {
 5584|     47|    return *internal_default_instance();
 5585|     47|  }
_ZN6google8protobuf14MessageOptions25internal_default_instanceEv:
 5586|     47|  static inline const MessageOptions* internal_default_instance() {
 5587|     47|    return reinterpret_cast<const MessageOptions*>(
 5588|     47|        &_MessageOptions_default_instance_);
 5589|     47|  }
_ZN6google8protobuf11FileOptionsC2Ev:
 5999|      2|  inline FileOptions() : FileOptions(nullptr) {}
_ZNK6google8protobuf11FileOptions14unknown_fieldsEv:
 6031|      2|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 6032|      2|    return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
 6033|      2|  }
_ZN6google8protobuf11FileOptions16default_instanceEv:
 6048|      2|  static const FileOptions& default_instance() {
 6049|      2|    return *internal_default_instance();
 6050|      2|  }
_ZN6google8protobuf11FileOptions25internal_default_instanceEv:
 6051|     13|  static inline const FileOptions* internal_default_instance() {
 6052|     13|    return reinterpret_cast<const FileOptions*>(
 6053|     13|        &_FileOptions_default_instance_);
 6054|     13|  }
_ZNK6google8protobuf11FileOptions13IsInitializedEv:
 6087|      7|  bool IsInitialized() const {
 6088|      7|    return IsInitializedImpl(*this);
 6089|      7|  }
_ZN6google8protobuf12FieldOptionsC2Ev:
 6726|     17|  inline FieldOptions() : FieldOptions(nullptr) {}
_ZNK6google8protobuf12FieldOptions14unknown_fieldsEv:
 6758|     17|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 6759|     17|    return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
 6760|     17|  }
_ZN6google8protobuf12FieldOptions16default_instanceEv:
 6775|    453|  static const FieldOptions& default_instance() {
 6776|    453|    return *internal_default_instance();
 6777|    453|  }
_ZN6google8protobuf12FieldOptions25internal_default_instanceEv:
 6778|    538|  static inline const FieldOptions* internal_default_instance() {
 6779|    538|    return reinterpret_cast<const FieldOptions*>(
 6780|    538|        &_FieldOptions_default_instance_);
 6781|    538|  }
_ZNK6google8protobuf12FieldOptions13IsInitializedEv:
 6814|     51|  bool IsInitialized() const {
 6815|     51|    return IsInitializedImpl(*this);
 6816|     51|  }
_ZN6google8protobuf18FeatureSetDefaultsC2Ev:
 7389|      1|  inline FeatureSetDefaults() : FeatureSetDefaults(nullptr) {}
_ZN6google8protobuf21ExtensionRangeOptions16default_instanceEv:
 7668|     14|  static const ExtensionRangeOptions& default_instance() {
 7669|     14|    return *internal_default_instance();
 7670|     14|  }
_ZN6google8protobuf21ExtensionRangeOptions25internal_default_instanceEv:
 7671|     14|  static inline const ExtensionRangeOptions* internal_default_instance() {
 7672|     14|    return reinterpret_cast<const ExtensionRangeOptions*>(
 7673|     14|        &_ExtensionRangeOptions_default_instance_);
 7674|     14|  }
_ZN6google8protobuf16EnumValueOptions16default_instanceEv:
 8120|    190|  static const EnumValueOptions& default_instance() {
 8121|    190|    return *internal_default_instance();
 8122|    190|  }
_ZN6google8protobuf16EnumValueOptions25internal_default_instanceEv:
 8123|    190|  static inline const EnumValueOptions* internal_default_instance() {
 8124|    190|    return reinterpret_cast<const EnumValueOptions*>(
 8125|    190|        &_EnumValueOptions_default_instance_);
 8126|    190|  }
_ZN6google8protobuf11EnumOptions16default_instanceEv:
 8563|     24|  static const EnumOptions& default_instance() {
 8564|     24|    return *internal_default_instance();
 8565|     24|  }
_ZN6google8protobuf11EnumOptions25internal_default_instanceEv:
 8566|     24|  static inline const EnumOptions* internal_default_instance() {
 8567|     24|    return reinterpret_cast<const EnumOptions*>(
 8568|     24|        &_EnumOptions_default_instance_);
 8569|     24|  }
_ZNK6google8protobuf20OneofDescriptorProto13IsInitializedEv:
 9041|      6|  bool IsInitialized() const {
 9042|      6|    return IsInitializedImpl(*this);
 9043|      6|  }
_ZNK6google8protobuf20FieldDescriptorProto13IsInitializedEv:
 9545|    531|  bool IsInitialized() const {
 9546|    531|    return IsInitializedImpl(*this);
 9547|    531|  }
_ZNK6google8protobuf24EnumValueDescriptorProto13IsInitializedEv:
 9961|    484|  bool IsInitialized() const {
 9962|    484|    return IsInitializedImpl(*this);
 9963|    484|  }
_ZNK6google8protobuf30DescriptorProto_ExtensionRange13IsInitializedEv:
10194|     28|  bool IsInitialized() const {
10195|     28|    return IsInitializedImpl(*this);
10196|     28|  }
_ZNK6google8protobuf19EnumDescriptorProto13IsInitializedEv:
10660|     54|  bool IsInitialized() const {
10661|     54|    return IsInitializedImpl(*this);
10662|     54|  }
_ZN6google8protobuf15DescriptorProto10descriptorEv:
10895|      2|  static const ::google::protobuf::Descriptor* descriptor() {
10896|      2|    return GetDescriptor();
10897|      2|  }
_ZN6google8protobuf15DescriptorProto13GetDescriptorEv:
10898|      2|  static const ::google::protobuf::Descriptor* GetDescriptor() {
10899|      2|    return default_instance().GetMetadata().descriptor;
10900|      2|  }
_ZN6google8protobuf15DescriptorProto16default_instanceEv:
10904|      2|  static const DescriptorProto& default_instance() {
10905|      2|    return *internal_default_instance();
10906|      2|  }
_ZN6google8protobuf15DescriptorProto25internal_default_instanceEv:
10907|      2|  static inline const DescriptorProto* internal_default_instance() {
10908|      2|    return reinterpret_cast<const DescriptorProto*>(
10909|      2|        &_DescriptorProto_default_instance_);
10910|      2|  }
_ZNK6google8protobuf15DescriptorProto13IsInitializedEv:
10943|    107|  bool IsInitialized() const {
10944|    107|    return IsInitializedImpl(*this);
10945|    107|  }
_ZN6google8protobuf19FileDescriptorProtoC2Ev:
11234|      6|  inline FileDescriptorProto() : FileDescriptorProto(nullptr) {}
_ZNK6google8protobuf19FileDescriptorProto8has_nameEv:
12110|      4|inline bool FileDescriptorProto::has_name() const {
12111|      4|  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
12112|      4|  return value;
12113|      4|}
_ZNK6google8protobuf19FileDescriptorProto4nameEv:
12120|     75|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
12121|       |  // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.name)
12122|     75|  return _internal_name();
12123|     75|}
_ZNK6google8protobuf19FileDescriptorProto14_internal_nameEv:
12137|     75|inline const std::string& FileDescriptorProto::_internal_name() const {
12138|     75|  ::google::protobuf::internal::TSanRead(&_impl_);
12139|     75|  return _impl_.name_.Get();
12140|     75|}
_ZNK6google8protobuf19FileDescriptorProto11has_packageEv:
12179|      4|inline bool FileDescriptorProto::has_package() const {
12180|      4|  bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
12181|      4|  return value;
12182|      4|}
_ZNK6google8protobuf19FileDescriptorProto7packageEv:
12189|     20|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
12190|       |  // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.package)
12191|     20|  return _internal_package();
12192|     20|}
_ZNK6google8protobuf19FileDescriptorProto17_internal_packageEv:
12206|     20|inline const std::string& FileDescriptorProto::_internal_package() const {
12207|     20|  ::google::protobuf::internal::TSanRead(&_impl_);
12208|     20|  return _impl_.package_.Get();
12209|     20|}
_ZNK6google8protobuf19FileDescriptorProto25_internal_dependency_sizeEv:
12248|     17|inline int FileDescriptorProto::_internal_dependency_size() const {
12249|     17|  return _internal_dependency().size();
12250|     17|}
_ZNK6google8protobuf19FileDescriptorProto15dependency_sizeEv:
12251|     17|inline int FileDescriptorProto::dependency_size() const {
12252|     17|  return _internal_dependency_size();
12253|     17|}
_ZNK6google8protobuf19FileDescriptorProto10dependencyEi:
12265|      2|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
12266|       |  // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.dependency)
12267|      2|  return _internal_dependency().Get(index);
12268|      2|}
_ZNK6google8protobuf19FileDescriptorProto20_internal_dependencyEv:
12301|     19|FileDescriptorProto::_internal_dependency() const {
12302|     19|  ::google::protobuf::internal::TSanRead(&_impl_);
12303|     19|  return _impl_.dependency_;
12304|     19|}
_ZNK6google8protobuf19FileDescriptorProto32_internal_public_dependency_sizeEv:
12312|     12|inline int FileDescriptorProto::_internal_public_dependency_size() const {
12313|     12|  return _internal_public_dependency().size();
12314|     12|}
_ZNK6google8protobuf19FileDescriptorProto22public_dependency_sizeEv:
12315|     12|inline int FileDescriptorProto::public_dependency_size() const {
12316|     12|  return _internal_public_dependency_size();
12317|     12|}
_ZNK6google8protobuf19FileDescriptorProto27_internal_public_dependencyEv:
12347|     12|FileDescriptorProto::_internal_public_dependency() const {
12348|     12|  ::google::protobuf::internal::TSanRead(&_impl_);
12349|     12|  return _impl_.public_dependency_;
12350|     12|}
_ZNK6google8protobuf19FileDescriptorProto30_internal_weak_dependency_sizeEv:
12357|     16|inline int FileDescriptorProto::_internal_weak_dependency_size() const {
12358|     16|  return _internal_weak_dependency().size();
12359|     16|}
_ZNK6google8protobuf19FileDescriptorProto20weak_dependency_sizeEv:
12360|     16|inline int FileDescriptorProto::weak_dependency_size() const {
12361|     16|  return _internal_weak_dependency_size();
12362|     16|}
_ZNK6google8protobuf19FileDescriptorProto25_internal_weak_dependencyEv:
12392|     16|FileDescriptorProto::_internal_weak_dependency() const {
12393|     16|  ::google::protobuf::internal::TSanRead(&_impl_);
12394|     16|  return _impl_.weak_dependency_;
12395|     16|}
_ZNK6google8protobuf19FileDescriptorProto27_internal_message_type_sizeEv:
12402|     49|inline int FileDescriptorProto::_internal_message_type_size() const {
12403|     49|  return _internal_message_type().size();
12404|     49|}
_ZNK6google8protobuf19FileDescriptorProto17message_type_sizeEv:
12405|     49|inline int FileDescriptorProto::message_type_size() const {
12406|     49|  return _internal_message_type_size();
12407|     49|}
_ZNK6google8protobuf19FileDescriptorProto12message_typeEi:
12424|    185|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
12425|       |  // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.message_type)
12426|    185|  return _internal_message_type().Get(index);
12427|    185|}
_ZNK6google8protobuf19FileDescriptorProto12message_typeEv:
12435|     10|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
12436|       |  // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.message_type)
12437|     10|  return _internal_message_type();
12438|     10|}
_ZNK6google8protobuf19FileDescriptorProto22_internal_message_typeEv:
12440|    254|FileDescriptorProto::_internal_message_type() const {
12441|    254|  ::google::protobuf::internal::TSanRead(&_impl_);
12442|    254|  return _impl_.message_type_;
12443|    254|}
_ZNK6google8protobuf19FileDescriptorProto24_internal_enum_type_sizeEv:
12451|     19|inline int FileDescriptorProto::_internal_enum_type_size() const {
12452|     19|  return _internal_enum_type().size();
12453|     19|}
_ZNK6google8protobuf19FileDescriptorProto14enum_type_sizeEv:
12454|     19|inline int FileDescriptorProto::enum_type_size() const {
12455|     19|  return _internal_enum_type_size();
12456|     19|}
_ZNK6google8protobuf19FileDescriptorProto9enum_typeEi:
12473|     28|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
12474|       |  // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.enum_type)
12475|     28|  return _internal_enum_type().Get(index);
12476|     28|}
_ZNK6google8protobuf19FileDescriptorProto9enum_typeEv:
12484|     10|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
12485|       |  // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.enum_type)
12486|     10|  return _internal_enum_type();
12487|     10|}
_ZNK6google8protobuf19FileDescriptorProto19_internal_enum_typeEv:
12489|     67|FileDescriptorProto::_internal_enum_type() const {
12490|     67|  ::google::protobuf::internal::TSanRead(&_impl_);
12491|     67|  return _impl_.enum_type_;
12492|     67|}
_ZNK6google8protobuf19FileDescriptorProto22_internal_service_sizeEv:
12500|     12|inline int FileDescriptorProto::_internal_service_size() const {
12501|     12|  return _internal_service().size();
12502|     12|}
_ZNK6google8protobuf19FileDescriptorProto12service_sizeEv:
12503|     12|inline int FileDescriptorProto::service_size() const {
12504|     12|  return _internal_service_size();
12505|     12|}
_ZNK6google8protobuf19FileDescriptorProto7serviceEv:
12533|     10|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
12534|       |  // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.service)
12535|     10|  return _internal_service();
12536|     10|}
_ZNK6google8protobuf19FileDescriptorProto17_internal_serviceEv:
12538|     32|FileDescriptorProto::_internal_service() const {
12539|     32|  ::google::protobuf::internal::TSanRead(&_impl_);
12540|     32|  return _impl_.service_;
12541|     32|}
_ZNK6google8protobuf19FileDescriptorProto24_internal_extension_sizeEv:
12549|     13|inline int FileDescriptorProto::_internal_extension_size() const {
12550|     13|  return _internal_extension().size();
12551|     13|}
_ZNK6google8protobuf19FileDescriptorProto14extension_sizeEv:
12552|     13|inline int FileDescriptorProto::extension_size() const {
12553|     13|  return _internal_extension_size();
12554|     13|}
_ZNK6google8protobuf19FileDescriptorProto9extensionEi:
12571|      5|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
12572|       |  // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.extension)
12573|      5|  return _internal_extension().Get(index);
12574|      5|}
_ZNK6google8protobuf19FileDescriptorProto9extensionEv:
12582|     10|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
12583|       |  // @@protoc_insertion_point(field_list:google.protobuf.FileDescriptorProto.extension)
12584|     10|  return _internal_extension();
12585|     10|}
_ZNK6google8protobuf19FileDescriptorProto19_internal_extensionEv:
12587|     38|FileDescriptorProto::_internal_extension() const {
12588|     38|  ::google::protobuf::internal::TSanRead(&_impl_);
12589|     38|  return _impl_.extension_;
12590|     38|}
_ZNK6google8protobuf19FileDescriptorProto11has_optionsEv:
12598|      8|inline bool FileDescriptorProto::has_options() const {
12599|      8|  bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0;
12600|      8|  PROTOBUF_ASSUME(!value || _impl_.options_ != nullptr);
  ------------------
  |  |  941|     12|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  |  |  ------------------
  |  |  |  Branch (941:48): [True: 4, False: 4]
  |  |  |  Branch (941:48): [True: 4, False: 0]
  |  |  ------------------
  ------------------
12601|      8|  return value;
12602|      8|}
_ZNK6google8protobuf19FileDescriptorProto17_internal_optionsEv:
12608|      2|inline const ::google::protobuf::FileOptions& FileDescriptorProto::_internal_options() const {
12609|      2|  ::google::protobuf::internal::TSanRead(&_impl_);
12610|      2|  const ::google::protobuf::FileOptions* p = _impl_.options_;
12611|      2|  return p != nullptr ? *p : reinterpret_cast<const ::google::protobuf::FileOptions&>(::google::protobuf::_FileOptions_default_instance_);
  ------------------
  |  Branch (12611:10): [True: 2, False: 0]
  ------------------
12612|      2|}
_ZNK6google8protobuf19FileDescriptorProto7optionsEv:
12613|      2|inline const ::google::protobuf::FileOptions& FileDescriptorProto::options() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
12614|       |  // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.options)
12615|      2|  return _internal_options();
12616|      2|}
_ZNK6google8protobuf19FileDescriptorProto20has_source_code_infoEv:
12694|      8|inline bool FileDescriptorProto::has_source_code_info() const {
12695|      8|  bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0;
12696|      8|  PROTOBUF_ASSUME(!value || _impl_.source_code_info_ != nullptr);
  ------------------
  |  |  941|      8|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  |  |  ------------------
  |  |  |  Branch (941:48): [True: 8, False: 0]
  |  |  |  Branch (941:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
12697|      8|  return value;
12698|      8|}
_ZNK6google8protobuf19FileDescriptorProto6syntaxEv:
12800|      8|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
12801|       |  // @@protoc_insertion_point(field_get:google.protobuf.FileDescriptorProto.syntax)
12802|      8|  return _internal_syntax();
12803|      8|}
_ZNK6google8protobuf19FileDescriptorProto16_internal_syntaxEv:
12817|      8|inline const std::string& FileDescriptorProto::_internal_syntax() const {
12818|      8|  ::google::protobuf::internal::TSanRead(&_impl_);
12819|      8|  return _impl_.syntax_.Get();
12820|      8|}
_ZNK6google8protobuf19FileDescriptorProto11has_editionEv:
12859|      4|inline bool FileDescriptorProto::has_edition() const {
12860|      4|  bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0;
12861|      4|  return value;
12862|      4|}
_ZNK6google8protobuf30DescriptorProto_ExtensionRange5startEv:
12901|     14|inline ::int32_t DescriptorProto_ExtensionRange::start() const {
12902|       |  // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.start)
12903|     14|  return _internal_start();
12904|     14|}
_ZNK6google8protobuf30DescriptorProto_ExtensionRange15_internal_startEv:
12910|     14|inline ::int32_t DescriptorProto_ExtensionRange::_internal_start() const {
12911|     14|  ::google::protobuf::internal::TSanRead(&_impl_);
12912|     14|  return _impl_.start_;
12913|     14|}
_ZNK6google8protobuf30DescriptorProto_ExtensionRange3endEv:
12929|     14|inline ::int32_t DescriptorProto_ExtensionRange::end() const {
12930|       |  // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ExtensionRange.end)
12931|     14|  return _internal_end();
12932|     14|}
_ZNK6google8protobuf30DescriptorProto_ExtensionRange13_internal_endEv:
12938|     14|inline ::int32_t DescriptorProto_ExtensionRange::_internal_end() const {
12939|     14|  ::google::protobuf::internal::TSanRead(&_impl_);
12940|     14|  return _impl_.end_;
12941|     14|}
_ZNK6google8protobuf30DescriptorProto_ExtensionRange11has_optionsEv:
12948|     28|inline bool DescriptorProto_ExtensionRange::has_options() const {
12949|     28|  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
12950|     28|  PROTOBUF_ASSUME(!value || _impl_.options_ != nullptr);
  ------------------
  |  |  941|     28|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  |  |  ------------------
  |  |  |  Branch (941:48): [True: 28, False: 0]
  |  |  |  Branch (941:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
12951|     28|  return value;
12952|     28|}
_ZNK6google8protobuf29DescriptorProto_ReservedRange5startEv:
13057|     28|inline ::int32_t DescriptorProto_ReservedRange::start() const {
13058|       |  // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ReservedRange.start)
13059|     28|  return _internal_start();
13060|     28|}
_ZNK6google8protobuf29DescriptorProto_ReservedRange15_internal_startEv:
13066|     28|inline ::int32_t DescriptorProto_ReservedRange::_internal_start() const {
13067|     28|  ::google::protobuf::internal::TSanRead(&_impl_);
13068|     28|  return _impl_.start_;
13069|     28|}
_ZNK6google8protobuf29DescriptorProto_ReservedRange3endEv:
13085|     28|inline ::int32_t DescriptorProto_ReservedRange::end() const {
13086|       |  // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.ReservedRange.end)
13087|     28|  return _internal_end();
13088|     28|}
_ZNK6google8protobuf29DescriptorProto_ReservedRange13_internal_endEv:
13094|     28|inline ::int32_t DescriptorProto_ReservedRange::_internal_end() const {
13095|     28|  ::google::protobuf::internal::TSanRead(&_impl_);
13096|     28|  return _impl_.end_;
13097|     28|}
_ZNK6google8protobuf15DescriptorProto4nameEv:
13118|    144|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
13119|       |  // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.name)
13120|    144|  return _internal_name();
13121|    144|}
_ZNK6google8protobuf15DescriptorProto14_internal_nameEv:
13135|    144|inline const std::string& DescriptorProto::_internal_name() const {
13136|    144|  ::google::protobuf::internal::TSanRead(&_impl_);
13137|    144|  return _impl_.name_.Get();
13138|    144|}
_ZNK6google8protobuf15DescriptorProto20_internal_field_sizeEv:
13177|    549|inline int DescriptorProto::_internal_field_size() const {
13178|    549|  return _internal_field().size();
13179|    549|}
_ZNK6google8protobuf15DescriptorProto10field_sizeEv:
13180|    549|inline int DescriptorProto::field_size() const {
13181|    549|  return _internal_field_size();
13182|    549|}
_ZNK6google8protobuf15DescriptorProto5fieldEi:
13199|  1.31k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
13200|       |  // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.field)
13201|  1.31k|  return _internal_field().Get(index);
13202|  1.31k|}
_ZNK6google8protobuf15DescriptorProto5fieldEv:
13210|     47|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
13211|       |  // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.field)
13212|     47|  return _internal_field();
13213|     47|}
_ZNK6google8protobuf15DescriptorProto15_internal_fieldEv:
13215|  2.02k|DescriptorProto::_internal_field() const {
13216|  2.02k|  ::google::protobuf::internal::TSanRead(&_impl_);
13217|  2.02k|  return _impl_.field_;
13218|  2.02k|}
_ZNK6google8protobuf15DescriptorProto24_internal_extension_sizeEv:
13226|    141|inline int DescriptorProto::_internal_extension_size() const {
13227|    141|  return _internal_extension().size();
13228|    141|}
_ZNK6google8protobuf15DescriptorProto14extension_sizeEv:
13229|    141|inline int DescriptorProto::extension_size() const {
13230|    141|  return _internal_extension_size();
13231|    141|}
_ZNK6google8protobuf15DescriptorProto9extensionEv:
13259|    107|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
13260|       |  // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.extension)
13261|    107|  return _internal_extension();
13262|    107|}
_ZNK6google8protobuf15DescriptorProto19_internal_extensionEv:
13264|    355|DescriptorProto::_internal_extension() const {
13265|    355|  ::google::protobuf::internal::TSanRead(&_impl_);
13266|    355|  return _impl_.extension_;
13267|    355|}
_ZNK6google8protobuf15DescriptorProto26_internal_nested_type_sizeEv:
13275|    151|inline int DescriptorProto::_internal_nested_type_size() const {
13276|    151|  return _internal_nested_type().size();
13277|    151|}
_ZNK6google8protobuf15DescriptorProto16nested_type_sizeEv:
13278|    151|inline int DescriptorProto::nested_type_size() const {
13279|    151|  return _internal_nested_type_size();
13280|    151|}
_ZNK6google8protobuf15DescriptorProto11nested_typeEi:
13297|     50|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
13298|       |  // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.nested_type)
13299|     50|  return _internal_nested_type().Get(index);
13300|     50|}
_ZNK6google8protobuf15DescriptorProto11nested_typeEv:
13308|    107|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
13309|       |  // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.nested_type)
13310|    107|  return _internal_nested_type();
13311|    107|}
_ZNK6google8protobuf15DescriptorProto21_internal_nested_typeEv:
13313|    415|DescriptorProto::_internal_nested_type() const {
13314|    415|  ::google::protobuf::internal::TSanRead(&_impl_);
13315|    415|  return _impl_.nested_type_;
13316|    415|}
_ZNK6google8protobuf15DescriptorProto24_internal_enum_type_sizeEv:
13324|    158|inline int DescriptorProto::_internal_enum_type_size() const {
13325|    158|  return _internal_enum_type().size();
13326|    158|}
_ZNK6google8protobuf15DescriptorProto14enum_type_sizeEv:
13327|    158|inline int DescriptorProto::enum_type_size() const {
13328|    158|  return _internal_enum_type_size();
13329|    158|}
_ZNK6google8protobuf15DescriptorProto9enum_typeEi:
13346|     68|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
13347|       |  // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.enum_type)
13348|     68|  return _internal_enum_type().Get(index);
13349|     68|}
_ZNK6google8protobuf15DescriptorProto9enum_typeEv:
13357|     47|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
13358|       |  // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.enum_type)
13359|     47|  return _internal_enum_type();
13360|     47|}
_ZNK6google8protobuf15DescriptorProto19_internal_enum_typeEv:
13362|    380|DescriptorProto::_internal_enum_type() const {
13363|    380|  ::google::protobuf::internal::TSanRead(&_impl_);
13364|    380|  return _impl_.enum_type_;
13365|    380|}
_ZNK6google8protobuf15DescriptorProto30_internal_extension_range_sizeEv:
13373|    155|inline int DescriptorProto::_internal_extension_range_size() const {
13374|    155|  return _internal_extension_range().size();
13375|    155|}
_ZNK6google8protobuf15DescriptorProto20extension_range_sizeEv:
13376|    155|inline int DescriptorProto::extension_range_size() const {
13377|    155|  return _internal_extension_range_size();
13378|    155|}
_ZNK6google8protobuf15DescriptorProto15extension_rangeEi:
13395|     56|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
13396|       |  // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.extension_range)
13397|     56|  return _internal_extension_range().Get(index);
13398|     56|}
_ZNK6google8protobuf15DescriptorProto15extension_rangeEv:
13406|     47|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
13407|       |  // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.extension_range)
13408|     47|  return _internal_extension_range();
13409|     47|}
_ZNK6google8protobuf15DescriptorProto25_internal_extension_rangeEv:
13411|    365|DescriptorProto::_internal_extension_range() const {
13412|    365|  ::google::protobuf::internal::TSanRead(&_impl_);
13413|    365|  return _impl_.extension_range_;
13414|    365|}
_ZNK6google8protobuf15DescriptorProto25_internal_oneof_decl_sizeEv:
13422|    143|inline int DescriptorProto::_internal_oneof_decl_size() const {
13423|    143|  return _internal_oneof_decl().size();
13424|    143|}
_ZNK6google8protobuf15DescriptorProto15oneof_decl_sizeEv:
13425|    143|inline int DescriptorProto::oneof_decl_size() const {
13426|    143|  return _internal_oneof_decl_size();
13427|    143|}
_ZNK6google8protobuf15DescriptorProto10oneof_declEi:
13444|      8|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
13445|       |  // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.oneof_decl)
13446|      8|  return _internal_oneof_decl().Get(index);
13447|      8|}
_ZNK6google8protobuf15DescriptorProto10oneof_declEv:
13455|     47|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
13456|       |  // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.oneof_decl)
13457|     47|  return _internal_oneof_decl();
13458|     47|}
_ZNK6google8protobuf15DescriptorProto20_internal_oneof_declEv:
13460|    305|DescriptorProto::_internal_oneof_decl() const {
13461|    305|  ::google::protobuf::internal::TSanRead(&_impl_);
13462|    305|  return _impl_.oneof_decl_;
13463|    305|}
_ZNK6google8protobuf15DescriptorProto11has_optionsEv:
13471|     94|inline bool DescriptorProto::has_options() const {
13472|     94|  bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
13473|     94|  PROTOBUF_ASSUME(!value || _impl_.options_ != nullptr);
  ------------------
  |  |  941|     94|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  |  |  ------------------
  |  |  |  Branch (941:48): [True: 94, False: 0]
  |  |  |  Branch (941:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
13474|     94|  return value;
13475|     94|}
_ZNK6google8protobuf15DescriptorProto29_internal_reserved_range_sizeEv:
13567|    290|inline int DescriptorProto::_internal_reserved_range_size() const {
13568|    290|  return _internal_reserved_range().size();
13569|    290|}
_ZNK6google8protobuf15DescriptorProto19reserved_range_sizeEv:
13570|    290|inline int DescriptorProto::reserved_range_size() const {
13571|    290|  return _internal_reserved_range_size();
13572|    290|}
_ZNK6google8protobuf15DescriptorProto14reserved_rangeEi:
13589|     41|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
13590|       |  // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.reserved_range)
13591|     41|  return _internal_reserved_range().Get(index);
13592|     41|}
_ZNK6google8protobuf15DescriptorProto24_internal_reserved_rangeEv:
13605|    331|DescriptorProto::_internal_reserved_range() const {
13606|    331|  ::google::protobuf::internal::TSanRead(&_impl_);
13607|    331|  return _impl_.reserved_range_;
13608|    331|}
_ZNK6google8protobuf15DescriptorProto28_internal_reserved_name_sizeEv:
13616|    141|inline int DescriptorProto::_internal_reserved_name_size() const {
13617|    141|  return _internal_reserved_name().size();
13618|    141|}
_ZNK6google8protobuf15DescriptorProto18reserved_name_sizeEv:
13619|    141|inline int DescriptorProto::reserved_name_size() const {
13620|    141|  return _internal_reserved_name_size();
13621|    141|}
_ZNK6google8protobuf15DescriptorProto13reserved_nameEi:
13633|      2|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
13634|       |  // @@protoc_insertion_point(field_get:google.protobuf.DescriptorProto.reserved_name)
13635|      2|  return _internal_reserved_name().Get(index);
13636|      2|}
_ZNK6google8protobuf15DescriptorProto13reserved_nameEv:
13658|     47|DescriptorProto::reserved_name() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
13659|       |  // @@protoc_insertion_point(field_list:google.protobuf.DescriptorProto.reserved_name)
13660|     47|  return _internal_reserved_name();
13661|     47|}
_ZNK6google8protobuf15DescriptorProto23_internal_reserved_nameEv:
13669|    190|DescriptorProto::_internal_reserved_name() const {
13670|    190|  ::google::protobuf::internal::TSanRead(&_impl_);
13671|    190|  return _impl_.reserved_name_;
13672|    190|}
_ZNK6google8protobuf21ExtensionRangeOptions12has_featuresEv:
14008|     14|inline bool ExtensionRangeOptions::has_features() const {
14009|     14|  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
14010|     14|  PROTOBUF_ASSUME(!value || _impl_.features_ != nullptr);
  ------------------
  |  |  941|     14|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  |  |  ------------------
  |  |  |  Branch (941:48): [True: 14, False: 0]
  |  |  |  Branch (941:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
14011|     14|  return value;
14012|     14|}
_ZNK6google8protobuf20FieldDescriptorProto4nameEv:
14147|    706|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
14148|       |  // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.name)
14149|    706|  return _internal_name();
14150|    706|}
_ZNK6google8protobuf20FieldDescriptorProto14_internal_nameEv:
14164|    706|inline const std::string& FieldDescriptorProto::_internal_name() const {
14165|    706|  ::google::protobuf::internal::TSanRead(&_impl_);
14166|    706|  return _impl_.name_.Get();
14167|    706|}
_ZNK6google8protobuf20FieldDescriptorProto6numberEv:
14215|    384|inline ::int32_t FieldDescriptorProto::number() const {
14216|       |  // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.number)
14217|    384|  return _internal_number();
14218|    384|}
_ZNK6google8protobuf20FieldDescriptorProto16_internal_numberEv:
14224|    384|inline ::int32_t FieldDescriptorProto::_internal_number() const {
14225|    384|  ::google::protobuf::internal::TSanRead(&_impl_);
14226|    384|  return _impl_.number_;
14227|    384|}
_ZNK6google8protobuf20FieldDescriptorProto5labelEv:
14243|    470|inline ::google::protobuf::FieldDescriptorProto_Label FieldDescriptorProto::label() const {
14244|       |  // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.label)
14245|    470|  return _internal_label();
14246|    470|}
_ZNK6google8protobuf20FieldDescriptorProto15_internal_labelEv:
14252|    470|inline ::google::protobuf::FieldDescriptorProto_Label FieldDescriptorProto::_internal_label() const {
14253|    470|  ::google::protobuf::internal::TSanRead(&_impl_);
14254|    470|  return static_cast<::google::protobuf::FieldDescriptorProto_Label>(_impl_.label_);
14255|    470|}
_ZNK6google8protobuf20FieldDescriptorProto8has_typeEv:
14263|    360|inline bool FieldDescriptorProto::has_type() const {
14264|    360|  bool value = (_impl_._has_bits_[0] & 0x00000400u) != 0;
14265|    360|  return value;
14266|    360|}
_ZNK6google8protobuf20FieldDescriptorProto4typeEv:
14272|    622|inline ::google::protobuf::FieldDescriptorProto_Type FieldDescriptorProto::type() const {
14273|       |  // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type)
14274|    622|  return _internal_type();
14275|    622|}
_ZNK6google8protobuf20FieldDescriptorProto14_internal_typeEv:
14281|    622|inline ::google::protobuf::FieldDescriptorProto_Type FieldDescriptorProto::_internal_type() const {
14282|    622|  ::google::protobuf::internal::TSanRead(&_impl_);
14283|    622|  return static_cast<::google::protobuf::FieldDescriptorProto_Type>(_impl_.type_);
14284|    622|}
_ZNK6google8protobuf20FieldDescriptorProto13has_type_nameEv:
14292|    235|inline bool FieldDescriptorProto::has_type_name() const {
14293|    235|  bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
14294|    235|  return value;
14295|    235|}
_ZNK6google8protobuf20FieldDescriptorProto9type_nameEv:
14302|     98|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
14303|       |  // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.type_name)
14304|     98|  return _internal_type_name();
14305|     98|}
_ZNK6google8protobuf20FieldDescriptorProto19_internal_type_nameEv:
14319|     98|inline const std::string& FieldDescriptorProto::_internal_type_name() const {
14320|     98|  ::google::protobuf::internal::TSanRead(&_impl_);
14321|     98|  return _impl_.type_name_.Get();
14322|     98|}
_ZNK6google8protobuf20FieldDescriptorProto12has_extendeeEv:
14361|    470|inline bool FieldDescriptorProto::has_extendee() const {
14362|    470|  bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
14363|    470|  return value;
14364|    470|}
_ZNK6google8protobuf20FieldDescriptorProto8extendeeEv:
14371|      5|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
14372|       |  // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.extendee)
14373|      5|  return _internal_extendee();
14374|      5|}
_ZNK6google8protobuf20FieldDescriptorProto18_internal_extendeeEv:
14388|      5|inline const std::string& FieldDescriptorProto::_internal_extendee() const {
14389|      5|  ::google::protobuf::internal::TSanRead(&_impl_);
14390|      5|  return _impl_.extendee_.Get();
14391|      5|}
_ZNK6google8protobuf20FieldDescriptorProto17has_default_valueEv:
14430|  1.00k|inline bool FieldDescriptorProto::has_default_value() const {
14431|  1.00k|  bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0;
14432|  1.00k|  return value;
14433|  1.00k|}
_ZNK6google8protobuf20FieldDescriptorProto13default_valueEv:
14440|     53|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
14441|       |  // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.default_value)
14442|     53|  return _internal_default_value();
14443|     53|}
_ZNK6google8protobuf20FieldDescriptorProto23_internal_default_valueEv:
14457|     53|inline const std::string& FieldDescriptorProto::_internal_default_value() const {
14458|     53|  ::google::protobuf::internal::TSanRead(&_impl_);
14459|     53|  return _impl_.default_value_.Get();
14460|     53|}
_ZNK6google8protobuf20FieldDescriptorProto15has_oneof_indexEv:
14499|    235|inline bool FieldDescriptorProto::has_oneof_index() const {
14500|    235|  bool value = (_impl_._has_bits_[0] & 0x00000080u) != 0;
14501|    235|  return value;
14502|    235|}
_ZNK6google8protobuf20FieldDescriptorProto11oneof_indexEv:
14508|     15|inline ::int32_t FieldDescriptorProto::oneof_index() const {
14509|       |  // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.oneof_index)
14510|     15|  return _internal_oneof_index();
14511|     15|}
_ZNK6google8protobuf20FieldDescriptorProto21_internal_oneof_indexEv:
14517|     15|inline ::int32_t FieldDescriptorProto::_internal_oneof_index() const {
14518|     15|  ::google::protobuf::internal::TSanRead(&_impl_);
14519|     15|  return _impl_.oneof_index_;
14520|     15|}
_ZNK6google8protobuf20FieldDescriptorProto13has_json_nameEv:
14527|    705|inline bool FieldDescriptorProto::has_json_name() const {
14528|    705|  bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0;
14529|    705|  return value;
14530|    705|}
_ZNK6google8protobuf20FieldDescriptorProto11has_optionsEv:
14596|    470|inline bool FieldDescriptorProto::has_options() const {
14597|    470|  bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0;
14598|    470|  PROTOBUF_ASSUME(!value || _impl_.options_ != nullptr);
  ------------------
  |  |  941|    504|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  |  |  ------------------
  |  |  |  Branch (941:48): [True: 436, False: 34]
  |  |  |  Branch (941:48): [True: 34, False: 0]
  |  |  ------------------
  ------------------
14599|    470|  return value;
14600|    470|}
_ZNK6google8protobuf20FieldDescriptorProto17_internal_optionsEv:
14606|    115|inline const ::google::protobuf::FieldOptions& FieldDescriptorProto::_internal_options() const {
14607|    115|  ::google::protobuf::internal::TSanRead(&_impl_);
14608|    115|  const ::google::protobuf::FieldOptions* p = _impl_.options_;
14609|    115|  return p != nullptr ? *p : reinterpret_cast<const ::google::protobuf::FieldOptions&>(::google::protobuf::_FieldOptions_default_instance_);
  ------------------
  |  Branch (14609:10): [True: 26, False: 89]
  ------------------
14610|    115|}
_ZNK6google8protobuf20FieldDescriptorProto7optionsEv:
14611|    115|inline const ::google::protobuf::FieldOptions& FieldDescriptorProto::options() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
14612|       |  // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.options)
14613|    115|  return _internal_options();
14614|    115|}
_ZNK6google8protobuf20FieldDescriptorProto15proto3_optionalEv:
14701|    470|inline bool FieldDescriptorProto::proto3_optional() const {
14702|       |  // @@protoc_insertion_point(field_get:google.protobuf.FieldDescriptorProto.proto3_optional)
14703|    470|  return _internal_proto3_optional();
14704|    470|}
_ZNK6google8protobuf20FieldDescriptorProto25_internal_proto3_optionalEv:
14710|    470|inline bool FieldDescriptorProto::_internal_proto3_optional() const {
14711|    470|  ::google::protobuf::internal::TSanRead(&_impl_);
14712|    470|  return _impl_.proto3_optional_;
14713|    470|}
_ZNK6google8protobuf20OneofDescriptorProto4nameEv:
14734|      4|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
14735|       |  // @@protoc_insertion_point(field_get:google.protobuf.OneofDescriptorProto.name)
14736|      4|  return _internal_name();
14737|      4|}
_ZNK6google8protobuf20OneofDescriptorProto14_internal_nameEv:
14751|      4|inline const std::string& OneofDescriptorProto::_internal_name() const {
14752|      4|  ::google::protobuf::internal::TSanRead(&_impl_);
14753|      4|  return _impl_.name_.Get();
14754|      4|}
_ZNK6google8protobuf20OneofDescriptorProto11has_optionsEv:
14793|      4|inline bool OneofDescriptorProto::has_options() const {
14794|      4|  bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
14795|      4|  PROTOBUF_ASSUME(!value || _impl_.options_ != nullptr);
  ------------------
  |  |  941|      4|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  |  |  ------------------
  |  |  |  Branch (941:48): [True: 4, False: 0]
  |  |  |  Branch (941:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
14796|      4|  return value;
14797|      4|}
_ZNK6google8protobuf37EnumDescriptorProto_EnumReservedRange5startEv:
14902|      1|inline ::int32_t EnumDescriptorProto_EnumReservedRange::start() const {
14903|       |  // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.EnumReservedRange.start)
14904|      1|  return _internal_start();
14905|      1|}
_ZNK6google8protobuf37EnumDescriptorProto_EnumReservedRange15_internal_startEv:
14911|      1|inline ::int32_t EnumDescriptorProto_EnumReservedRange::_internal_start() const {
14912|      1|  ::google::protobuf::internal::TSanRead(&_impl_);
14913|      1|  return _impl_.start_;
14914|      1|}
_ZNK6google8protobuf37EnumDescriptorProto_EnumReservedRange3endEv:
14930|      1|inline ::int32_t EnumDescriptorProto_EnumReservedRange::end() const {
14931|       |  // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.EnumReservedRange.end)
14932|      1|  return _internal_end();
14933|      1|}
_ZNK6google8protobuf37EnumDescriptorProto_EnumReservedRange13_internal_endEv:
14939|      1|inline ::int32_t EnumDescriptorProto_EnumReservedRange::_internal_end() const {
14940|      1|  ::google::protobuf::internal::TSanRead(&_impl_);
14941|      1|  return _impl_.end_;
14942|      1|}
_ZNK6google8protobuf19EnumDescriptorProto4nameEv:
14963|     61|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
14964|       |  // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.name)
14965|     61|  return _internal_name();
14966|     61|}
_ZNK6google8protobuf19EnumDescriptorProto14_internal_nameEv:
14980|     61|inline const std::string& EnumDescriptorProto::_internal_name() const {
14981|     61|  ::google::protobuf::internal::TSanRead(&_impl_);
14982|     61|  return _impl_.name_.Get();
14983|     61|}
_ZNK6google8protobuf19EnumDescriptorProto20_internal_value_sizeEv:
15022|    405|inline int EnumDescriptorProto::_internal_value_size() const {
15023|    405|  return _internal_value().size();
15024|    405|}
_ZNK6google8protobuf19EnumDescriptorProto10value_sizeEv:
15025|    405|inline int EnumDescriptorProto::value_size() const {
15026|    405|  return _internal_value_size();
15027|    405|}
_ZNK6google8protobuf19EnumDescriptorProto5valueEi:
15044|    958|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
15045|       |  // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.value)
15046|    958|  return _internal_value().Get(index);
15047|    958|}
_ZNK6google8protobuf19EnumDescriptorProto5valueEv:
15055|     24|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
15056|       |  // @@protoc_insertion_point(field_list:google.protobuf.EnumDescriptorProto.value)
15057|     24|  return _internal_value();
15058|     24|}
_ZNK6google8protobuf19EnumDescriptorProto15_internal_valueEv:
15060|  1.44k|EnumDescriptorProto::_internal_value() const {
15061|  1.44k|  ::google::protobuf::internal::TSanRead(&_impl_);
15062|  1.44k|  return _impl_.value_;
15063|  1.44k|}
_ZNK6google8protobuf19EnumDescriptorProto11has_optionsEv:
15071|     48|inline bool EnumDescriptorProto::has_options() const {
15072|     48|  bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
15073|     48|  PROTOBUF_ASSUME(!value || _impl_.options_ != nullptr);
  ------------------
  |  |  941|     48|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  |  |  ------------------
  |  |  |  Branch (941:48): [True: 48, False: 0]
  |  |  |  Branch (941:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
15074|     48|  return value;
15075|     48|}
_ZNK6google8protobuf19EnumDescriptorProto29_internal_reserved_range_sizeEv:
15167|    123|inline int EnumDescriptorProto::_internal_reserved_range_size() const {
15168|    123|  return _internal_reserved_range().size();
15169|    123|}
_ZNK6google8protobuf19EnumDescriptorProto19reserved_range_sizeEv:
15170|    123|inline int EnumDescriptorProto::reserved_range_size() const {
15171|    123|  return _internal_reserved_range_size();
15172|    123|}
_ZNK6google8protobuf19EnumDescriptorProto14reserved_rangeEi:
15189|      2|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
15190|       |  // @@protoc_insertion_point(field_get:google.protobuf.EnumDescriptorProto.reserved_range)
15191|      2|  return _internal_reserved_range().Get(index);
15192|      2|}
_ZNK6google8protobuf19EnumDescriptorProto24_internal_reserved_rangeEv:
15205|    125|EnumDescriptorProto::_internal_reserved_range() const {
15206|    125|  ::google::protobuf::internal::TSanRead(&_impl_);
15207|    125|  return _impl_.reserved_range_;
15208|    125|}
_ZNK6google8protobuf19EnumDescriptorProto28_internal_reserved_name_sizeEv:
15216|     72|inline int EnumDescriptorProto::_internal_reserved_name_size() const {
15217|     72|  return _internal_reserved_name().size();
15218|     72|}
_ZNK6google8protobuf19EnumDescriptorProto18reserved_name_sizeEv:
15219|     72|inline int EnumDescriptorProto::reserved_name_size() const {
15220|     72|  return _internal_reserved_name_size();
15221|     72|}
_ZNK6google8protobuf19EnumDescriptorProto13reserved_nameEv:
15258|     24|EnumDescriptorProto::reserved_name() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
15259|       |  // @@protoc_insertion_point(field_list:google.protobuf.EnumDescriptorProto.reserved_name)
15260|     24|  return _internal_reserved_name();
15261|     24|}
_ZNK6google8protobuf19EnumDescriptorProto23_internal_reserved_nameEv:
15269|     96|EnumDescriptorProto::_internal_reserved_name() const {
15270|     96|  ::google::protobuf::internal::TSanRead(&_impl_);
15271|     96|  return _impl_.reserved_name_;
15272|     96|}
_ZNK6google8protobuf24EnumValueDescriptorProto4nameEv:
15294|    760|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
15295|       |  // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.name)
15296|    760|  return _internal_name();
15297|    760|}
_ZNK6google8protobuf24EnumValueDescriptorProto14_internal_nameEv:
15311|    760|inline const std::string& EnumValueDescriptorProto::_internal_name() const {
15312|    760|  ::google::protobuf::internal::TSanRead(&_impl_);
15313|    760|  return _impl_.name_.Get();
15314|    760|}
_ZNK6google8protobuf24EnumValueDescriptorProto6numberEv:
15362|    388|inline ::int32_t EnumValueDescriptorProto::number() const {
15363|       |  // @@protoc_insertion_point(field_get:google.protobuf.EnumValueDescriptorProto.number)
15364|    388|  return _internal_number();
15365|    388|}
_ZNK6google8protobuf24EnumValueDescriptorProto16_internal_numberEv:
15371|    388|inline ::int32_t EnumValueDescriptorProto::_internal_number() const {
15372|    388|  ::google::protobuf::internal::TSanRead(&_impl_);
15373|    388|  return _impl_.number_;
15374|    388|}
_ZNK6google8protobuf24EnumValueDescriptorProto11has_optionsEv:
15381|    380|inline bool EnumValueDescriptorProto::has_options() const {
15382|    380|  bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
15383|    380|  PROTOBUF_ASSUME(!value || _impl_.options_ != nullptr);
  ------------------
  |  |  941|    380|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  |  |  ------------------
  |  |  |  Branch (941:48): [True: 380, False: 0]
  |  |  |  Branch (941:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
15384|    380|  return value;
15385|    380|}
_ZNK6google8protobuf11FileOptions22_internal_java_packageEv:
16089|      4|inline const std::string& FileOptions::_internal_java_package() const {
16090|      4|  ::google::protobuf::internal::TSanRead(&_impl_);
16091|      4|  return _impl_.java_package_.Get();
16092|      4|}
_ZNK6google8protobuf11FileOptions30_internal_java_outer_classnameEv:
16158|      4|inline const std::string& FileOptions::_internal_java_outer_classname() const {
16159|      4|  ::google::protobuf::internal::TSanRead(&_impl_);
16160|      4|  return _impl_.java_outer_classname_.Get();
16161|      4|}
_ZNK6google8protobuf11FileOptions29_internal_java_multiple_filesEv:
16218|      1|inline bool FileOptions::_internal_java_multiple_files() const {
16219|      1|  ::google::protobuf::internal::TSanRead(&_impl_);
16220|      1|  return _impl_.java_multiple_files_;
16221|      1|}
_ZNK6google8protobuf11FileOptions22_internal_optimize_forEv:
16302|      2|inline ::google::protobuf::FileOptions_OptimizeMode FileOptions::_internal_optimize_for() const {
16303|      2|  ::google::protobuf::internal::TSanRead(&_impl_);
16304|      2|  return static_cast<::google::protobuf::FileOptions_OptimizeMode>(_impl_.optimize_for_);
16305|      2|}
_ZNK6google8protobuf11FileOptions20_internal_go_packageEv:
16340|      4|inline const std::string& FileOptions::_internal_go_package() const {
16341|      4|  ::google::protobuf::internal::TSanRead(&_impl_);
16342|      4|  return _impl_.go_package_.Get();
16343|      4|}
_ZNK6google8protobuf11FileOptions19cc_generic_servicesEv:
16391|      4|inline bool FileOptions::cc_generic_services() const {
16392|       |  // @@protoc_insertion_point(field_get:google.protobuf.FileOptions.cc_generic_services)
16393|      4|  return _internal_cc_generic_services();
16394|      4|}
_ZNK6google8protobuf11FileOptions29_internal_cc_generic_servicesEv:
16400|      4|inline bool FileOptions::_internal_cc_generic_services() const {
16401|      4|  ::google::protobuf::internal::TSanRead(&_impl_);
16402|      4|  return _impl_.cc_generic_services_;
16403|      4|}
_ZNK6google8protobuf11FileOptions26_internal_cc_enable_arenasEv:
16512|      1|inline bool FileOptions::_internal_cc_enable_arenas() const {
16513|      1|  ::google::protobuf::internal::TSanRead(&_impl_);
16514|      1|  return _impl_.cc_enable_arenas_;
16515|      1|}
_ZNK6google8protobuf11FileOptions27_internal_objc_class_prefixEv:
16549|      4|inline const std::string& FileOptions::_internal_objc_class_prefix() const {
16550|      4|  ::google::protobuf::internal::TSanRead(&_impl_);
16551|      4|  return _impl_.objc_class_prefix_.Get();
16552|      4|}
_ZNK6google8protobuf11FileOptions26_internal_csharp_namespaceEv:
16618|      4|inline const std::string& FileOptions::_internal_csharp_namespace() const {
16619|      4|  ::google::protobuf::internal::TSanRead(&_impl_);
16620|      4|  return _impl_.csharp_namespace_.Get();
16621|      4|}
_ZNK6google8protobuf11FileOptions12has_featuresEv:
17005|      4|inline bool FileOptions::has_features() const {
17006|      4|  bool value = (_impl_._has_bits_[0] & 0x00000400u) != 0;
17007|      4|  PROTOBUF_ASSUME(!value || _impl_.features_ != nullptr);
  ------------------
  |  |  941|      4|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  |  |  ------------------
  |  |  |  Branch (941:48): [True: 4, False: 0]
  |  |  |  Branch (941:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
17008|      4|  return value;
17009|      4|}
_ZNK6google8protobuf11FileOptions35_internal_uninterpreted_option_sizeEv:
17101|      6|inline int FileOptions::_internal_uninterpreted_option_size() const {
17102|      6|  return _internal_uninterpreted_option().size();
17103|      6|}
_ZNK6google8protobuf11FileOptions25uninterpreted_option_sizeEv:
17104|      2|inline int FileOptions::uninterpreted_option_size() const {
17105|      2|  return _internal_uninterpreted_option_size();
17106|      2|}
_ZNK6google8protobuf11FileOptions30_internal_uninterpreted_optionEv:
17139|     17|FileOptions::_internal_uninterpreted_option() const {
17140|     17|  ::google::protobuf::internal::TSanRead(&_impl_);
17141|     17|  return _impl_.uninterpreted_option_;
17142|     17|}
_ZNK6google8protobuf14MessageOptions12has_featuresEv:
17294|     47|inline bool MessageOptions::has_features() const {
17295|     47|  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
17296|     47|  PROTOBUF_ASSUME(!value || _impl_.features_ != nullptr);
  ------------------
  |  |  941|     47|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  |  |  ------------------
  |  |  |  Branch (941:48): [True: 47, False: 0]
  |  |  |  Branch (941:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
17297|     47|  return value;
17298|     47|}
_ZNK6google8protobuf27FieldOptions_EditionDefault17_internal_editionEv:
17461|     36|inline ::google::protobuf::Edition FieldOptions_EditionDefault::_internal_edition() const {
17462|     36|  ::google::protobuf::internal::TSanRead(&_impl_);
17463|     36|  return static_cast<::google::protobuf::Edition>(_impl_.edition_);
17464|     36|}
_ZNK6google8protobuf27FieldOptions_EditionDefault15_internal_valueEv:
17499|     36|inline const std::string& FieldOptions_EditionDefault::_internal_value() const {
17500|     36|  ::google::protobuf::internal::TSanRead(&_impl_);
17501|     36|  return _impl_.value_.Get();
17502|     36|}
_ZNK6google8protobuf27FieldOptions_FeatureSupport28_internal_edition_introducedEv:
17563|     18|inline ::google::protobuf::Edition FieldOptions_FeatureSupport::_internal_edition_introduced() const {
17564|     18|  ::google::protobuf::internal::TSanRead(&_impl_);
17565|     18|  return static_cast<::google::protobuf::Edition>(_impl_.edition_introduced_);
17566|     18|}
_ZNK6google8protobuf27FieldOptions_FeatureSupport28_internal_edition_deprecatedEv:
17592|      2|inline ::google::protobuf::Edition FieldOptions_FeatureSupport::_internal_edition_deprecated() const {
17593|      2|  ::google::protobuf::internal::TSanRead(&_impl_);
17594|      2|  return static_cast<::google::protobuf::Edition>(_impl_.edition_deprecated_);
17595|      2|}
_ZNK6google8protobuf27FieldOptions_FeatureSupport29_internal_deprecation_warningEv:
17630|      2|inline const std::string& FieldOptions_FeatureSupport::_internal_deprecation_warning() const {
17631|      2|  ::google::protobuf::internal::TSanRead(&_impl_);
17632|      2|  return _impl_.deprecation_warning_.Get();
17633|      2|}
_ZNK6google8protobuf12FieldOptions9has_ctypeEv:
17705|    235|inline bool FieldOptions::has_ctype() const {
17706|    235|  bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
17707|    235|  return value;
17708|    235|}
_ZNK6google8protobuf12FieldOptions5ctypeEv:
17714|    235|inline ::google::protobuf::FieldOptions_CType FieldOptions::ctype() const {
17715|       |  // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.ctype)
17716|    235|  return _internal_ctype();
17717|    235|}
_ZNK6google8protobuf12FieldOptions15_internal_ctypeEv:
17723|    235|inline ::google::protobuf::FieldOptions_CType FieldOptions::_internal_ctype() const {
17724|    235|  ::google::protobuf::internal::TSanRead(&_impl_);
17725|    235|  return static_cast<::google::protobuf::FieldOptions_CType>(_impl_.ctype_);
17726|    235|}
_ZNK6google8protobuf12FieldOptions10has_packedEv:
17734|     61|inline bool FieldOptions::has_packed() const {
17735|     61|  bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0;
17736|     61|  return value;
17737|     61|}
_ZNK6google8protobuf12FieldOptions6packedEv:
17743|    235|inline bool FieldOptions::packed() const {
17744|       |  // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.packed)
17745|    235|  return _internal_packed();
17746|    235|}
_ZNK6google8protobuf12FieldOptions16_internal_packedEv:
17752|    238|inline bool FieldOptions::_internal_packed() const {
17753|    238|  ::google::protobuf::internal::TSanRead(&_impl_);
17754|    238|  return _impl_.packed_;
17755|    238|}
_ZNK6google8protobuf12FieldOptions20_internal_deprecatedEv:
17865|      3|inline bool FieldOptions::_internal_deprecated() const {
17866|      3|  ::google::protobuf::internal::TSanRead(&_impl_);
17867|      3|  return _impl_.deprecated_;
17868|      3|}
_ZNK6google8protobuf12FieldOptions4weakEv:
17884|     98|inline bool FieldOptions::weak() const {
17885|       |  // @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.weak)
17886|     98|  return _internal_weak();
17887|     98|}
_ZNK6google8protobuf12FieldOptions14_internal_weakEv:
17893|     98|inline bool FieldOptions::_internal_weak() const {
17894|     98|  ::google::protobuf::internal::TSanRead(&_impl_);
17895|     98|  return _impl_.weak_;
17896|     98|}
_ZNK6google8protobuf12FieldOptions19_internal_retentionEv:
17949|     22|inline ::google::protobuf::FieldOptions_OptionRetention FieldOptions::_internal_retention() const {
17950|     22|  ::google::protobuf::internal::TSanRead(&_impl_);
17951|     22|  return static_cast<::google::protobuf::FieldOptions_OptionRetention>(_impl_.retention_);
17952|     22|}
_ZNK6google8protobuf12FieldOptions22_internal_targets_sizeEv:
17960|     34|inline int FieldOptions::_internal_targets_size() const {
17961|     34|  return _internal_targets().size();
17962|     34|}
_ZNK6google8protobuf12FieldOptions17_internal_targetsEv:
17997|     70|    const {
17998|     70|  ::google::protobuf::internal::TSanRead(&_impl_);
17999|     70|  return _impl_.targets_;
18000|     70|}
_ZNK6google8protobuf12FieldOptions31_internal_edition_defaults_sizeEv:
18007|     34|inline int FieldOptions::_internal_edition_defaults_size() const {
18008|     34|  return _internal_edition_defaults().size();
18009|     34|}
_ZNK6google8protobuf12FieldOptions26_internal_edition_defaultsEv:
18045|     69|FieldOptions::_internal_edition_defaults() const {
18046|     69|  ::google::protobuf::internal::TSanRead(&_impl_);
18047|     69|  return _impl_.edition_defaults_;
18048|     69|}
_ZNK6google8protobuf12FieldOptions12has_featuresEv:
18056|    235|inline bool FieldOptions::has_features() const {
18057|    235|  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
18058|    235|  PROTOBUF_ASSUME(!value || _impl_.features_ != nullptr);
  ------------------
  |  |  941|    235|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  |  |  ------------------
  |  |  |  Branch (941:48): [True: 235, False: 0]
  |  |  |  Branch (941:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
18059|    235|  return value;
18060|    235|}
_ZNK6google8protobuf12FieldOptions35_internal_uninterpreted_option_sizeEv:
18248|     51|inline int FieldOptions::_internal_uninterpreted_option_size() const {
18249|     51|  return _internal_uninterpreted_option().size();
18250|     51|}
_ZNK6google8protobuf12FieldOptions25uninterpreted_option_sizeEv:
18251|     17|inline int FieldOptions::uninterpreted_option_size() const {
18252|     17|  return _internal_uninterpreted_option_size();
18253|     17|}
_ZNK6google8protobuf12FieldOptions30_internal_uninterpreted_optionEv:
18286|    136|FieldOptions::_internal_uninterpreted_option() const {
18287|    136|  ::google::protobuf::internal::TSanRead(&_impl_);
18288|    136|  return _impl_.uninterpreted_option_;
18289|    136|}
_ZNK6google8protobuf12OneofOptions12has_featuresEv:
18301|      2|inline bool OneofOptions::has_features() const {
18302|      2|  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
18303|      2|  PROTOBUF_ASSUME(!value || _impl_.features_ != nullptr);
  ------------------
  |  |  941|      2|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  |  |  ------------------
  |  |  |  Branch (941:48): [True: 2, False: 0]
  |  |  |  Branch (941:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
18304|      2|  return value;
18305|      2|}
_ZNK6google8protobuf11EnumOptions12has_featuresEv:
18534|     24|inline bool EnumOptions::has_features() const {
18535|     24|  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
18536|     24|  PROTOBUF_ASSUME(!value || _impl_.features_ != nullptr);
  ------------------
  |  |  941|     24|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  |  |  ------------------
  |  |  |  Branch (941:48): [True: 24, False: 0]
  |  |  |  Branch (941:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
18537|     24|  return value;
18538|     24|}
_ZNK6google8protobuf16EnumValueOptions12has_featuresEv:
18711|    190|inline bool EnumValueOptions::has_features() const {
18712|    190|  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
18713|    190|  PROTOBUF_ASSUME(!value || _impl_.features_ != nullptr);
  ------------------
  |  |  941|    190|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  |  |  ------------------
  |  |  |  Branch (941:48): [True: 190, False: 0]
  |  |  |  Branch (941:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
18714|    190|  return value;
18715|    190|}
_ZNK6google8protobuf10FeatureSet14field_presenceEv:
19821|   142k|inline ::google::protobuf::FeatureSet_FieldPresence FeatureSet::field_presence() const {
19822|       |  // @@protoc_insertion_point(field_get:google.protobuf.FeatureSet.field_presence)
19823|   142k|  return _internal_field_presence();
19824|   142k|}
_ZN6google8protobuf10FeatureSet18set_field_presenceENS0_24FeatureSet_FieldPresenceE:
19825|      2|inline void FeatureSet::set_field_presence(::google::protobuf::FeatureSet_FieldPresence value) {
19826|      2|  _internal_set_field_presence(value);
19827|      2|  _impl_._has_bits_[0] |= 0x00000001u;
19828|       |  // @@protoc_insertion_point(field_set:google.protobuf.FeatureSet.field_presence)
19829|      2|}
_ZNK6google8protobuf10FeatureSet24_internal_field_presenceEv:
19830|   143k|inline ::google::protobuf::FeatureSet_FieldPresence FeatureSet::_internal_field_presence() const {
19831|   143k|  ::google::protobuf::internal::TSanRead(&_impl_);
19832|   143k|  return static_cast<::google::protobuf::FeatureSet_FieldPresence>(_impl_.field_presence_);
19833|   143k|}
_ZN6google8protobuf10FeatureSet28_internal_set_field_presenceENS0_24FeatureSet_FieldPresenceE:
19834|      2|inline void FeatureSet::_internal_set_field_presence(::google::protobuf::FeatureSet_FieldPresence value) {
19835|      2|  ::google::protobuf::internal::TSanWrite(&_impl_);
19836|       |  assert(::google::protobuf::FeatureSet_FieldPresence_IsValid(value));
19837|      2|  _impl_.field_presence_ = value;
19838|      2|}
_ZNK6google8protobuf10FeatureSet9enum_typeEv:
19850|    510|inline ::google::protobuf::FeatureSet_EnumType FeatureSet::enum_type() const {
19851|       |  // @@protoc_insertion_point(field_get:google.protobuf.FeatureSet.enum_type)
19852|    510|  return _internal_enum_type();
19853|    510|}
_ZNK6google8protobuf10FeatureSet19_internal_enum_typeEv:
19859|    988|inline ::google::protobuf::FeatureSet_EnumType FeatureSet::_internal_enum_type() const {
19860|    988|  ::google::protobuf::internal::TSanRead(&_impl_);
19861|    988|  return static_cast<::google::protobuf::FeatureSet_EnumType>(_impl_.enum_type_);
19862|    988|}
_ZNK6google8protobuf10FeatureSet23repeated_field_encodingEv:
19879|    510|inline ::google::protobuf::FeatureSet_RepeatedFieldEncoding FeatureSet::repeated_field_encoding() const {
19880|       |  // @@protoc_insertion_point(field_get:google.protobuf.FeatureSet.repeated_field_encoding)
19881|    510|  return _internal_repeated_field_encoding();
19882|    510|}
_ZN6google8protobuf10FeatureSet27set_repeated_field_encodingENS0_32FeatureSet_RepeatedFieldEncodingE:
19883|      3|inline void FeatureSet::set_repeated_field_encoding(::google::protobuf::FeatureSet_RepeatedFieldEncoding value) {
19884|      3|  _internal_set_repeated_field_encoding(value);
19885|      3|  _impl_._has_bits_[0] |= 0x00000004u;
19886|       |  // @@protoc_insertion_point(field_set:google.protobuf.FeatureSet.repeated_field_encoding)
19887|      3|}
_ZNK6google8protobuf10FeatureSet33_internal_repeated_field_encodingEv:
19888|    991|inline ::google::protobuf::FeatureSet_RepeatedFieldEncoding FeatureSet::_internal_repeated_field_encoding() const {
19889|    991|  ::google::protobuf::internal::TSanRead(&_impl_);
19890|    991|  return static_cast<::google::protobuf::FeatureSet_RepeatedFieldEncoding>(_impl_.repeated_field_encoding_);
19891|    991|}
_ZN6google8protobuf10FeatureSet37_internal_set_repeated_field_encodingENS0_32FeatureSet_RepeatedFieldEncodingE:
19892|      3|inline void FeatureSet::_internal_set_repeated_field_encoding(::google::protobuf::FeatureSet_RepeatedFieldEncoding value) {
19893|      3|  ::google::protobuf::internal::TSanWrite(&_impl_);
19894|       |  assert(::google::protobuf::FeatureSet_RepeatedFieldEncoding_IsValid(value));
19895|      3|  _impl_.repeated_field_encoding_ = value;
19896|      3|}
_ZNK6google8protobuf10FeatureSet15utf8_validationEv:
19908|    510|inline ::google::protobuf::FeatureSet_Utf8Validation FeatureSet::utf8_validation() const {
19909|       |  // @@protoc_insertion_point(field_get:google.protobuf.FeatureSet.utf8_validation)
19910|    510|  return _internal_utf8_validation();
19911|    510|}
_ZNK6google8protobuf10FeatureSet25_internal_utf8_validationEv:
19917|    988|inline ::google::protobuf::FeatureSet_Utf8Validation FeatureSet::_internal_utf8_validation() const {
19918|    988|  ::google::protobuf::internal::TSanRead(&_impl_);
19919|    988|  return static_cast<::google::protobuf::FeatureSet_Utf8Validation>(_impl_.utf8_validation_);
19920|    988|}
_ZNK6google8protobuf10FeatureSet16message_encodingEv:
19937|    576|inline ::google::protobuf::FeatureSet_MessageEncoding FeatureSet::message_encoding() const {
19938|       |  // @@protoc_insertion_point(field_get:google.protobuf.FeatureSet.message_encoding)
19939|    576|  return _internal_message_encoding();
19940|    576|}
_ZNK6google8protobuf10FeatureSet26_internal_message_encodingEv:
19946|  1.05k|inline ::google::protobuf::FeatureSet_MessageEncoding FeatureSet::_internal_message_encoding() const {
19947|  1.05k|  ::google::protobuf::internal::TSanRead(&_impl_);
19948|  1.05k|  return static_cast<::google::protobuf::FeatureSet_MessageEncoding>(_impl_.message_encoding_);
19949|  1.05k|}
_ZNK6google8protobuf10FeatureSet11json_formatEv:
19966|    510|inline ::google::protobuf::FeatureSet_JsonFormat FeatureSet::json_format() const {
19967|       |  // @@protoc_insertion_point(field_get:google.protobuf.FeatureSet.json_format)
19968|    510|  return _internal_json_format();
19969|    510|}
_ZNK6google8protobuf10FeatureSet21_internal_json_formatEv:
19975|    988|inline ::google::protobuf::FeatureSet_JsonFormat FeatureSet::_internal_json_format() const {
19976|    988|  ::google::protobuf::internal::TSanRead(&_impl_);
19977|    988|  return static_cast<::google::protobuf::FeatureSet_JsonFormat>(_impl_.json_format_);
19978|    988|}
_ZNK6google8protobuf43FeatureSetDefaults_FeatureSetEditionDefault7editionEv:
19999|     64|inline ::google::protobuf::Edition FeatureSetDefaults_FeatureSetEditionDefault::edition() const {
20000|       |  // @@protoc_insertion_point(field_get:google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition)
20001|     64|  return _internal_edition();
20002|     64|}
_ZN6google8protobuf43FeatureSetDefaults_FeatureSetEditionDefault11set_editionENS0_7EditionE:
20003|      4|inline void FeatureSetDefaults_FeatureSetEditionDefault::set_edition(::google::protobuf::Edition value) {
20004|      4|  _internal_set_edition(value);
20005|      4|  _impl_._has_bits_[0] |= 0x00000004u;
20006|       |  // @@protoc_insertion_point(field_set:google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition)
20007|      4|}
_ZNK6google8protobuf43FeatureSetDefaults_FeatureSetEditionDefault17_internal_editionEv:
20008|     64|inline ::google::protobuf::Edition FeatureSetDefaults_FeatureSetEditionDefault::_internal_edition() const {
20009|     64|  ::google::protobuf::internal::TSanRead(&_impl_);
20010|     64|  return static_cast<::google::protobuf::Edition>(_impl_.edition_);
20011|     64|}
_ZN6google8protobuf43FeatureSetDefaults_FeatureSetEditionDefault21_internal_set_editionENS0_7EditionE:
20012|      4|inline void FeatureSetDefaults_FeatureSetEditionDefault::_internal_set_edition(::google::protobuf::Edition value) {
20013|      4|  ::google::protobuf::internal::TSanWrite(&_impl_);
20014|       |  assert(::google::protobuf::Edition_IsValid(value));
20015|      4|  _impl_.edition_ = value;
20016|      4|}
_ZNK6google8protobuf43FeatureSetDefaults_FeatureSetEditionDefault30_internal_overridable_featuresEv:
20029|     20|inline const ::google::protobuf::FeatureSet& FeatureSetDefaults_FeatureSetEditionDefault::_internal_overridable_features() const {
20030|     20|  ::google::protobuf::internal::TSanRead(&_impl_);
20031|     20|  const ::google::protobuf::FeatureSet* p = _impl_.overridable_features_;
20032|     20|  return p != nullptr ? *p : reinterpret_cast<const ::google::protobuf::FeatureSet&>(::google::protobuf::_FeatureSet_default_instance_);
  ------------------
  |  Branch (20032:10): [True: 20, False: 0]
  ------------------
20033|     20|}
_ZNK6google8protobuf43FeatureSetDefaults_FeatureSetEditionDefault20overridable_featuresEv:
20034|     20|inline const ::google::protobuf::FeatureSet& FeatureSetDefaults_FeatureSetEditionDefault::overridable_features() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
20035|       |  // @@protoc_insertion_point(field_get:google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridable_features)
20036|     20|  return _internal_overridable_features();
20037|     20|}
_ZNK6google8protobuf43FeatureSetDefaults_FeatureSetEditionDefault24_internal_fixed_featuresEv:
20125|     20|inline const ::google::protobuf::FeatureSet& FeatureSetDefaults_FeatureSetEditionDefault::_internal_fixed_features() const {
20126|     20|  ::google::protobuf::internal::TSanRead(&_impl_);
20127|     20|  const ::google::protobuf::FeatureSet* p = _impl_.fixed_features_;
20128|     20|  return p != nullptr ? *p : reinterpret_cast<const ::google::protobuf::FeatureSet&>(::google::protobuf::_FeatureSet_default_instance_);
  ------------------
  |  Branch (20128:10): [True: 20, False: 0]
  ------------------
20129|     20|}
_ZNK6google8protobuf43FeatureSetDefaults_FeatureSetEditionDefault14fixed_featuresEv:
20130|     20|inline const ::google::protobuf::FeatureSet& FeatureSetDefaults_FeatureSetEditionDefault::fixed_features() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
20131|       |  // @@protoc_insertion_point(field_get:google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixed_features)
20132|     20|  return _internal_fixed_features();
20133|     20|}
_ZNK6google8protobuf18FeatureSetDefaults8defaultsEv:
20248|     12|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
20249|       |  // @@protoc_insertion_point(field_list:google.protobuf.FeatureSetDefaults.defaults)
20250|     12|  return _internal_defaults();
20251|     12|}
_ZNK6google8protobuf18FeatureSetDefaults18_internal_defaultsEv:
20253|     13|FeatureSetDefaults::_internal_defaults() const {
20254|     13|  ::google::protobuf::internal::TSanRead(&_impl_);
20255|     13|  return _impl_.defaults_;
20256|     13|}
_ZNK6google8protobuf18FeatureSetDefaults15minimum_editionEv:
20273|      4|inline ::google::protobuf::Edition FeatureSetDefaults::minimum_edition() const {
20274|       |  // @@protoc_insertion_point(field_get:google.protobuf.FeatureSetDefaults.minimum_edition)
20275|      4|  return _internal_minimum_edition();
20276|      4|}
_ZNK6google8protobuf18FeatureSetDefaults25_internal_minimum_editionEv:
20282|      4|inline ::google::protobuf::Edition FeatureSetDefaults::_internal_minimum_edition() const {
20283|      4|  ::google::protobuf::internal::TSanRead(&_impl_);
20284|      4|  return static_cast<::google::protobuf::Edition>(_impl_.minimum_edition_);
20285|      4|}
_ZNK6google8protobuf18FeatureSetDefaults15maximum_editionEv:
20302|      4|inline ::google::protobuf::Edition FeatureSetDefaults::maximum_edition() const {
20303|       |  // @@protoc_insertion_point(field_get:google.protobuf.FeatureSetDefaults.maximum_edition)
20304|      4|  return _internal_maximum_edition();
20305|      4|}
_ZNK6google8protobuf18FeatureSetDefaults25_internal_maximum_editionEv:
20311|      4|inline ::google::protobuf::Edition FeatureSetDefaults::_internal_maximum_edition() const {
20312|      4|  ::google::protobuf::internal::TSanRead(&_impl_);
20313|      4|  return static_cast<::google::protobuf::Edition>(_impl_.maximum_edition_);
20314|      4|}
_ZNK6google8protobuf10FeatureSet12GetExtensionINS0_8internal17MessageTypeTraitsIN2pb11CppFeaturesEEELh11ELb0ETnNSt3__19enable_ifIXsrT_14kLifetimeBoundEiE4typeELi0EEENSA_8Singular9ConstTypeERKNS3_19ExtensionIdentifierIS1_SA_XT0_EXT1_EEE:
 2317|    235|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2318|    235|    return _proto_TypeTraits::Get(id.number(), _impl_._extensions_, id.default_value());
 2319|    235|  }
_ZN6google8protobuf10FeatureSet16MutableExtensionINS0_8internal17MessageTypeTraitsIN2pb11CppFeaturesEEELh11ELb0EEENT_8Singular11MutableTypeERKNS3_19ExtensionIdentifierIS1_S8_XT0_EXT1_EEE:
 2326|    235|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2327|    235|    return _proto_TypeTraits::Mutable(id.number(), _field_type, &_impl_._extensions_);
 2328|    235|  }

_ZN6google8protobuf25EncodedDescriptorDatabase3AddEPKvi:
  545|      6|                                    int size) {
  546|      6|  FileDescriptorProto file;
  547|      6|  if (file.ParseFromArray(encoded_file_descriptor, size)) {
  ------------------
  |  Branch (547:7): [True: 6, False: 0]
  ------------------
  548|      6|    return index_->AddFile(file, std::make_pair(encoded_file_descriptor, size));
  549|      6|  } else {
  550|      0|    ABSL_LOG(ERROR) << "Invalid file descriptor data passed to "
  ------------------
  |  |   38|      0|#define ABSL_LOG(severity) ABSL_LOG_INTERNAL_LOG_IMPL(_##severity)
  |  |  ------------------
  |  |  |  |   25|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, true) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  170|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   26|      0|      ABSL_LOGGING_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|  ::absl::log_internal::LogMessage(     \
  |  |  |  |  |  |   53|      0|      __FILE__, __LINE__, ::absl::log_internal::LogMessage::ErrorTag{})
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  551|      0|                       "EncodedDescriptorDatabase::Add().";
  552|      0|    return false;
  553|      0|  }
  554|      6|}
_ZN6google8protobuf25EncodedDescriptorDatabase14FindFileByNameERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEPNS0_19FileDescriptorProtoE:
  565|      4|                                               FileDescriptorProto* output) {
  566|      4|  return MaybeParse(index_->FindFile(filename), output);
  567|      4|}
_ZN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9AddSymbolEN4absl12lts_2024011611string_viewE:
  684|     64|    absl::string_view symbol) {
  685|     64|  SymbolEntry entry = {static_cast<int>(all_values_.size() - 1),
  686|     64|                       EncodeString(symbol)};
  687|     64|  std::string entry_as_string = entry.AsString(*this);
  688|       |
  689|       |  // We need to make sure not to violate our map invariant.
  690|       |
  691|       |  // If the symbol name is invalid it could break our lookup algorithm (which
  692|       |  // relies on the fact that '.' sorts before all other characters that are
  693|       |  // valid in symbol names).
  694|     64|  if (!ValidateSymbolName(symbol)) {
  ------------------
  |  Branch (694:7): [True: 0, False: 64]
  ------------------
  695|      0|    ABSL_LOG(ERROR) << "Invalid symbol name: " << entry_as_string;
  ------------------
  |  |   38|      0|#define ABSL_LOG(severity) ABSL_LOG_INTERNAL_LOG_IMPL(_##severity)
  |  |  ------------------
  |  |  |  |   25|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, true) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  170|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   26|      0|      ABSL_LOGGING_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|  ::absl::log_internal::LogMessage(     \
  |  |  |  |  |  |   53|      0|      __FILE__, __LINE__, ::absl::log_internal::LogMessage::ErrorTag{})
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  696|      0|    return false;
  697|      0|  }
  698|       |
  699|     64|  auto iter = FindLastLessOrEqual(&by_symbol_, entry);
  700|     64|  if (!CheckForMutualSubsymbols(entry_as_string, &iter, by_symbol_.end(),
  ------------------
  |  Branch (700:7): [True: 0, False: 64]
  ------------------
  701|     64|                                *this)) {
  702|      0|    return false;
  703|      0|  }
  704|       |
  705|       |  // Same, but on by_symbol_flat_
  706|     64|  auto flat_iter =
  707|     64|      FindLastLessOrEqual(&by_symbol_flat_, entry, by_symbol_.key_comp());
  708|     64|  if (!CheckForMutualSubsymbols(entry_as_string, &flat_iter,
  ------------------
  |  Branch (708:7): [True: 0, False: 64]
  ------------------
  709|     64|                                by_symbol_flat_.end(), *this)) {
  710|      0|    return false;
  711|      0|  }
  712|       |
  713|       |  // OK, no conflicts.
  714|       |
  715|       |  // Insert the new symbol using the iterator as a hint, the new entry will
  716|       |  // appear immediately before the one the iterator is pointing at.
  717|     64|  by_symbol_.insert(iter, entry);
  718|       |
  719|     64|  return true;
  720|     64|}
_ZN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex10EnsureFlatEv:
  806|      4|void EncodedDescriptorDatabase::DescriptorIndex::EnsureFlat() {
  807|      4|  all_values_.shrink_to_fit();
  808|       |  // Merge each of the sets into their flat counterpart.
  809|      4|  MergeIntoFlat(&by_name_, &by_name_flat_);
  810|      4|  MergeIntoFlat(&by_symbol_, &by_symbol_flat_);
  811|      4|  MergeIntoFlat(&by_extension_, &by_extension_flat_);
  812|      4|}
_ZN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex8FindFileEN4absl12lts_2024011611string_viewE:
  848|      4|    absl::string_view filename) {
  849|      4|  EnsureFlat();
  850|       |
  851|      4|  auto it = std::lower_bound(by_name_flat_.begin(), by_name_flat_.end(),
  852|      4|                             filename, by_name_.key_comp());
  853|      4|  return it == by_name_flat_.end() || it->name(*this) != filename
  ------------------
  |  Branch (853:10): [True: 0, False: 4]
  |  Branch (853:39): [True: 0, False: 4]
  ------------------
  854|      4|             ? std::make_pair(nullptr, 0)
  855|      4|             : all_values_[it->data_offset].value();
  856|      4|}
_ZN6google8protobuf25EncodedDescriptorDatabase10MaybeParseENSt3__14pairIPKviEEPNS0_19FileDescriptorProtoE:
  866|      4|    std::pair<const void*, int> encoded_file, FileDescriptorProto* output) {
  867|      4|  if (encoded_file.first == nullptr) return false;
  ------------------
  |  Branch (867:7): [True: 0, False: 4]
  ------------------
  868|      4|  absl::string_view source(static_cast<const char*>(encoded_file.first),
  869|      4|                           encoded_file.second);
  870|      4|  return internal::ParseNoReflection(source, *output);
  871|      4|}
_ZN6google8protobuf25EncodedDescriptorDatabaseC2Ev:
  874|      2|    : index_(new DescriptorIndex()) {}
_ZNK6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex12EncodeStringEN4absl12lts_2024011611string_viewE:
  420|     77|  String EncodeString(absl::string_view str) const { return String(str); }
_ZNK6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntry8AsStringERKS2_:
  470|    174|    std::string AsString(const DescriptorIndex& index) const {
  471|    174|      auto p = package(index);
  472|    174|      return absl::StrCat(p, p.empty() ? "" : ".", symbol(index));
  ------------------
  |  Branch (472:30): [True: 0, False: 174]
  ------------------
  473|    174|    }
_ZNK6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntry7packageERKS2_:
  462|    982|    absl::string_view package(const DescriptorIndex& index) const {
  463|    982|      return index.DecodeString(index.all_values_[data_offset].encoded_package,
  464|    982|                                data_offset);
  465|    982|    }
_ZNK6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex12DecodeStringERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEi:
  421|  1.99k|  absl::string_view DecodeString(const String& str, int) const { return str; }
_ZNK6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntry6symbolERKS2_:
  466|    982|    absl::string_view symbol(const DescriptorIndex& index) const {
  467|    982|      return index.DecodeString(encoded_symbol, data_offset);
  468|    982|    }
descriptor_database.cc:_ZN6google8protobuf12_GLOBAL__N_118ValidateSymbolNameEN4absl12lts_2024011611string_viewE:
  138|     70|bool ValidateSymbolName(absl::string_view name) {
  139|    893|  for (char c : name) {
  ------------------
  |  Branch (139:15): [True: 893, False: 70]
  ------------------
  140|       |    // I don't trust ctype.h due to locales.  :(
  141|    893|    if (c != '.' && c != '_' && (c < '0' || c > '9') && (c < 'A' || c > 'Z') &&
  ------------------
  |  Branch (141:9): [True: 886, False: 7]
  |  Branch (141:21): [True: 886, False: 0]
  |  Branch (141:34): [True: 0, False: 886]
  |  Branch (141:45): [True: 886, False: 0]
  |  Branch (141:58): [True: 0, False: 886]
  |  Branch (141:69): [True: 743, False: 143]
  ------------------
  142|    743|        (c < 'a' || c > 'z')) {
  ------------------
  |  Branch (142:10): [True: 0, False: 743]
  |  Branch (142:21): [True: 0, False: 743]
  ------------------
  143|      0|      return false;
  144|      0|    }
  145|    893|  }
  146|     70|  return true;
  147|     70|}
descriptor_database.cc:_ZN6google8protobuf12_GLOBAL__N_111IsSubSymbolEN4absl12lts_2024011611string_viewES4_:
  172|    110|bool IsSubSymbol(absl::string_view sub_symbol, absl::string_view super_symbol) {
  173|    110|  return sub_symbol == super_symbol ||
  ------------------
  |  Branch (173:10): [True: 0, False: 110]
  ------------------
  174|    110|         (absl::StartsWith(super_symbol, sub_symbol) &&
  ------------------
  |  Branch (174:11): [True: 1, False: 109]
  ------------------
  175|      1|          super_symbol[sub_symbol.size()] == '.');
  ------------------
  |  Branch (175:11): [True: 0, False: 1]
  ------------------
  176|    110|}
_ZNK6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex12EncodedEntry5valueEv:
  430|      4|    Value value() const { return {data, size}; }
_ZNK6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntry4nameERKS2_:
  438|     29|    absl::string_view name(const DescriptorIndex& index) const {
  439|     29|      return index.DecodeString(encoded_name, data_offset);
  440|     29|    }
_ZN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex7AddFileINS0_19FileDescriptorProtoEEEbRKT_NSt3__14pairIPKviEE:
  616|      6|                                                         Value value) {
  617|       |  // We push `value` into the array first. This is important because the AddXXX
  618|       |  // functions below will expect it to be there.
  619|      6|  all_values_.push_back({value.first, value.second, {}});
  620|       |
  621|      6|  if (!ValidateSymbolName(file.package())) {
  ------------------
  |  Branch (621:7): [True: 0, False: 6]
  ------------------
  622|      0|    ABSL_LOG(ERROR) << "Invalid package name: " << file.package();
  ------------------
  |  |   38|      0|#define ABSL_LOG(severity) ABSL_LOG_INTERNAL_LOG_IMPL(_##severity)
  |  |  ------------------
  |  |  |  |   25|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, true) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  170|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   26|      0|      ABSL_LOGGING_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|  ::absl::log_internal::LogMessage(     \
  |  |  |  |  |  |   53|      0|      __FILE__, __LINE__, ::absl::log_internal::LogMessage::ErrorTag{})
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  623|      0|    return false;
  624|      0|  }
  625|      6|  all_values_.back().encoded_package = EncodeString(file.package());
  626|       |
  627|      6|  if (!by_name_
  ------------------
  |  Branch (627:7): [True: 0, False: 6]
  |  Branch (627:7): [True: 0, False: 6]
  ------------------
  628|      6|           .insert({static_cast<int>(all_values_.size() - 1),
  629|      6|                    EncodeString(file.name())})
  630|      6|           .second ||
  631|      6|      std::binary_search(by_name_flat_.begin(), by_name_flat_.end(),
  ------------------
  |  Branch (631:7): [True: 0, False: 6]
  ------------------
  632|      6|                         file.name(), by_name_.key_comp())) {
  633|      0|    ABSL_LOG(ERROR) << "File already exists in database: " << file.name();
  ------------------
  |  |   38|      0|#define ABSL_LOG(severity) ABSL_LOG_INTERNAL_LOG_IMPL(_##severity)
  |  |  ------------------
  |  |  |  |   25|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, true) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  170|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   26|      0|      ABSL_LOGGING_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|  ::absl::log_internal::LogMessage(     \
  |  |  |  |  |  |   53|      0|      __FILE__, __LINE__, ::absl::log_internal::LogMessage::ErrorTag{})
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  634|      0|    return false;
  635|      0|  }
  636|       |
  637|     50|  for (const auto& message_type : file.message_type()) {
  ------------------
  |  Branch (637:33): [True: 50, False: 6]
  ------------------
  638|     50|    if (!AddSymbol(message_type.name())) return false;
  ------------------
  |  Branch (638:9): [True: 0, False: 50]
  ------------------
  639|     50|    if (!AddNestedExtensions(file.name(), message_type)) return false;
  ------------------
  |  Branch (639:9): [True: 0, False: 50]
  ------------------
  640|     50|  }
  641|     13|  for (const auto& enum_type : file.enum_type()) {
  ------------------
  |  Branch (641:30): [True: 13, False: 6]
  ------------------
  642|     13|    if (!AddSymbol(enum_type.name())) return false;
  ------------------
  |  Branch (642:9): [True: 0, False: 13]
  ------------------
  643|     13|  }
  644|      6|  for (const auto& extension : file.extension()) {
  ------------------
  |  Branch (644:30): [True: 1, False: 6]
  ------------------
  645|      1|    if (!AddSymbol(extension.name())) return false;
  ------------------
  |  Branch (645:9): [True: 0, False: 1]
  ------------------
  646|      1|    if (!AddExtension(file.name(), extension)) return false;
  ------------------
  |  Branch (646:9): [True: 0, False: 1]
  ------------------
  647|      1|  }
  648|      6|  for (const auto& service : file.service()) {
  ------------------
  |  Branch (648:28): [True: 0, False: 6]
  ------------------
  649|      0|    if (!AddSymbol(service.name())) return false;
  ------------------
  |  Branch (649:9): [True: 0, False: 0]
  ------------------
  650|      0|  }
  651|       |
  652|      6|  return true;
  653|      6|}
_ZNK6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11FileCompareclERKNS2_9FileEntryES6_:
  445|      6|    bool operator()(const FileEntry& a, const FileEntry& b) const {
  446|      6|      return a.name(index) < b.name(index);
  447|      6|    }
_ZNK6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11FileCompareclERKNS2_9FileEntryEN4absl12lts_2024011611string_viewE:
  448|     12|    bool operator()(const FileEntry& a, absl::string_view b) const {
  449|     12|      return a.name(index) < b;
  450|     12|    }
_ZNK6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11FileCompareclEN4absl12lts_2024011611string_viewERKNS2_9FileEntryE:
  451|      1|    bool operator()(absl::string_view a, const FileEntry& b) const {
  452|      1|      return a < b.name(index);
  453|      1|    }
_ZN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex19AddNestedExtensionsINS0_15DescriptorProtoEEEbN4absl12lts_2024011611string_viewERKT_:
  724|     60|    absl::string_view filename, const DescProto& message_type) {
  725|     60|  for (const auto& nested_type : message_type.nested_type()) {
  ------------------
  |  Branch (725:32): [True: 10, False: 60]
  ------------------
  726|     10|    if (!AddNestedExtensions(filename, nested_type)) return false;
  ------------------
  |  Branch (726:9): [True: 0, False: 10]
  ------------------
  727|     10|  }
  728|     60|  for (const auto& extension : message_type.extension()) {
  ------------------
  |  Branch (728:30): [True: 0, False: 60]
  ------------------
  729|      0|    if (!AddExtension(filename, extension)) return false;
  ------------------
  |  Branch (729:9): [True: 0, False: 0]
  ------------------
  730|      0|  }
  731|     60|  return true;
  732|     60|}
_ZN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex12AddExtensionINS0_20FieldDescriptorProtoEEEbN4absl12lts_2024011611string_viewERKT_:
  736|      1|    absl::string_view filename, const FieldProto& field) {
  737|      1|  if (!field.extendee().empty() && field.extendee()[0] == '.') {
  ------------------
  |  Branch (737:7): [True: 1, False: 0]
  |  Branch (737:36): [True: 1, False: 0]
  ------------------
  738|       |    // The extension is fully-qualified.  We can use it as a lookup key in
  739|       |    // the by_symbol_ table.
  740|      1|    if (!by_extension_
  ------------------
  |  Branch (740:9): [True: 0, False: 1]
  |  Branch (740:9): [True: 0, False: 1]
  ------------------
  741|      1|             .insert({static_cast<int>(all_values_.size() - 1),
  742|      1|                      EncodeString(field.extendee()), field.number()})
  743|      1|             .second ||
  744|      1|        std::binary_search(
  ------------------
  |  Branch (744:9): [True: 0, False: 1]
  ------------------
  745|      1|            by_extension_flat_.begin(), by_extension_flat_.end(),
  746|      1|            std::make_pair(field.extendee().substr(1), field.number()),
  747|      1|            by_extension_.key_comp())) {
  748|      0|      ABSL_LOG(ERROR)
  ------------------
  |  |   38|      0|#define ABSL_LOG(severity) ABSL_LOG_INTERNAL_LOG_IMPL(_##severity)
  |  |  ------------------
  |  |  |  |   25|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, true) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  170|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   26|      0|      ABSL_LOGGING_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|  ::absl::log_internal::LogMessage(     \
  |  |  |  |  |  |   53|      0|      __FILE__, __LINE__, ::absl::log_internal::LogMessage::ErrorTag{})
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  749|      0|          << "Extension conflicts with extension already in database: "
  750|      0|             "extend "
  751|      0|          << field.extendee() << " { " << field.name() << " = "
  752|      0|          << field.number() << " } from:" << filename;
  753|      0|      return false;
  754|      0|    }
  755|      1|  } else {
  756|       |    // Not fully-qualified.  We can't really do anything here, unfortunately.
  757|       |    // We don't consider this an error, though, because the descriptor is
  758|       |    // valid.
  759|      0|  }
  760|      1|  return true;
  761|      1|}
descriptor_database.cc:_ZN6google8protobuf12_GLOBAL__N_119FindLastLessOrEqualIN4absl12lts_202401169btree_setINS0_25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EEEES8_EENT_14const_iteratorEPKSE_RKT0_:
  154|     64|    const Container* container, const Key& key) {
  155|     64|  auto iter = container->upper_bound(key);
  156|     64|  if (iter != container->begin()) --iter;
  ------------------
  |  Branch (156:7): [True: 57, False: 7]
  ------------------
  157|     64|  return iter;
  158|     64|}
_ZNK6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex13SymbolCompareclINS2_11SymbolEntryES5_EEbRKT_RKT0_:
  496|    404|    bool operator()(const T& lhs, const U& rhs) const {
  497|    404|      auto lhs_parts = GetParts(lhs);
  498|    404|      auto rhs_parts = GetParts(rhs);
  499|       |
  500|       |      // Fast path to avoid making the whole string for common cases.
  501|    404|      if (int res =
  ------------------
  |  Branch (501:15): [True: 75, False: 329]
  ------------------
  502|    404|              lhs_parts.first.substr(0, rhs_parts.first.size())
  503|    404|                  .compare(rhs_parts.first.substr(0, lhs_parts.first.size()))) {
  504|       |        // If the packages already differ, exit early.
  505|     75|        return res < 0;
  506|    329|      } else if (lhs_parts.first.size() == rhs_parts.first.size()) {
  ------------------
  |  Branch (506:18): [True: 329, False: 0]
  ------------------
  507|    329|        return lhs_parts.second < rhs_parts.second;
  508|    329|      }
  509|      0|      return AsString(lhs) < AsString(rhs);
  510|    404|    }
_ZNK6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex13SymbolCompare8GetPartsERKNS2_11SymbolEntryE:
  485|    808|        const SymbolEntry& entry) const {
  486|    808|      auto package = entry.package(index);
  487|    808|      if (package.empty()) return {entry.symbol(index), absl::string_view{}};
  ------------------
  |  Branch (487:11): [True: 0, False: 808]
  ------------------
  488|    808|      return {package, entry.symbol(index)};
  489|    808|    }
descriptor_database.cc:_ZN6google8protobufL24CheckForMutualSubsymbolsIN4absl12lts_2024011618container_internal14btree_iteratorIKNS4_10btree_nodeINS4_10set_paramsINS0_25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS9_13SymbolCompareENSt3__19allocatorISA_EELi256ELb0EEEEERKSA_PSI_EENS5_ISG_SJ_SK_EES9_EEbNS3_11string_viewEPT_T0_RKT1_:
  657|     64|                                     Iter2 end, const Index& index) {
  658|     64|  if (*iter != end) {
  ------------------
  |  Branch (658:7): [True: 61, False: 3]
  ------------------
  659|     61|    if (IsSubSymbol((*iter)->AsString(index), symbol_name)) {
  ------------------
  |  Branch (659:9): [True: 0, False: 61]
  ------------------
  660|      0|      ABSL_LOG(ERROR) << "Symbol name \"" << symbol_name
  ------------------
  |  |   38|      0|#define ABSL_LOG(severity) ABSL_LOG_INTERNAL_LOG_IMPL(_##severity)
  |  |  ------------------
  |  |  |  |   25|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, true) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  170|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   26|      0|      ABSL_LOGGING_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|  ::absl::log_internal::LogMessage(     \
  |  |  |  |  |  |   53|      0|      __FILE__, __LINE__, ::absl::log_internal::LogMessage::ErrorTag{})
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  661|      0|                      << "\" conflicts with the existing symbol \""
  662|      0|                      << (*iter)->AsString(index) << "\".";
  663|      0|      return false;
  664|      0|    }
  665|       |
  666|       |    // OK, that worked.  Now we have to make sure that no symbol in the map is
  667|       |    // a sub-symbol of the one we are inserting.  The only symbol which could
  668|       |    // be so is the first symbol that is greater than the new symbol.  Since
  669|       |    // |iter| points at the last symbol that is less than or equal, we just have
  670|       |    // to increment it.
  671|     61|    ++*iter;
  672|       |
  673|     61|    if (*iter != end && IsSubSymbol(symbol_name, (*iter)->AsString(index))) {
  ------------------
  |  Branch (673:9): [True: 47, False: 14]
  |  Branch (673:9): [True: 0, False: 61]
  |  Branch (673:25): [True: 0, False: 47]
  ------------------
  674|      0|      ABSL_LOG(ERROR) << "Symbol name \"" << symbol_name
  ------------------
  |  |   38|      0|#define ABSL_LOG(severity) ABSL_LOG_INTERNAL_LOG_IMPL(_##severity)
  |  |  ------------------
  |  |  |  |   25|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, true) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  170|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   26|      0|      ABSL_LOGGING_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|  ::absl::log_internal::LogMessage(     \
  |  |  |  |  |  |   53|      0|      __FILE__, __LINE__, ::absl::log_internal::LogMessage::ErrorTag{})
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  675|      0|                      << "\" conflicts with the existing symbol \""
  676|      0|                      << (*iter)->AsString(index) << "\".";
  677|      0|      return false;
  678|      0|    }
  679|     61|  }
  680|     64|  return true;
  681|     64|}
descriptor_database.cc:_ZN6google8protobuf12_GLOBAL__N_119FindLastLessOrEqualINSt3__16vectorINS0_25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS3_9allocatorIS7_EEEES7_NS6_13SymbolCompareEEENT_14const_iteratorEPKSC_RKT0_RKT1_:
  163|     64|    const Container* container, const Key& key, const Cmp& cmp) {
  164|     64|  auto iter = std::upper_bound(container->begin(), container->end(), key, cmp);
  165|     64|  if (iter != container->begin()) --iter;
  ------------------
  |  Branch (165:7): [True: 2, False: 62]
  ------------------
  166|     64|  return iter;
  167|     64|}
descriptor_database.cc:_ZN6google8protobufL24CheckForMutualSubsymbolsINSt3__111__wrap_iterIPKNS0_25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryEEENS3_IPS6_EES5_EEbN4absl12lts_2024011611string_viewEPT_T0_RKT1_:
  657|     64|                                     Iter2 end, const Index& index) {
  658|     64|  if (*iter != end) {
  ------------------
  |  Branch (658:7): [True: 2, False: 62]
  ------------------
  659|      2|    if (IsSubSymbol((*iter)->AsString(index), symbol_name)) {
  ------------------
  |  Branch (659:9): [True: 0, False: 2]
  ------------------
  660|      0|      ABSL_LOG(ERROR) << "Symbol name \"" << symbol_name
  ------------------
  |  |   38|      0|#define ABSL_LOG(severity) ABSL_LOG_INTERNAL_LOG_IMPL(_##severity)
  |  |  ------------------
  |  |  |  |   25|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, true) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  170|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   26|      0|      ABSL_LOGGING_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|  ::absl::log_internal::LogMessage(     \
  |  |  |  |  |  |   53|      0|      __FILE__, __LINE__, ::absl::log_internal::LogMessage::ErrorTag{})
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  661|      0|                      << "\" conflicts with the existing symbol \""
  662|      0|                      << (*iter)->AsString(index) << "\".";
  663|      0|      return false;
  664|      0|    }
  665|       |
  666|       |    // OK, that worked.  Now we have to make sure that no symbol in the map is
  667|       |    // a sub-symbol of the one we are inserting.  The only symbol which could
  668|       |    // be so is the first symbol that is greater than the new symbol.  Since
  669|       |    // |iter| points at the last symbol that is less than or equal, we just have
  670|       |    // to increment it.
  671|      2|    ++*iter;
  672|       |
  673|      2|    if (*iter != end && IsSubSymbol(symbol_name, (*iter)->AsString(index))) {
  ------------------
  |  Branch (673:9): [True: 0, False: 2]
  |  Branch (673:9): [True: 0, False: 2]
  |  Branch (673:25): [True: 0, False: 0]
  ------------------
  674|      0|      ABSL_LOG(ERROR) << "Symbol name \"" << symbol_name
  ------------------
  |  |   38|      0|#define ABSL_LOG(severity) ABSL_LOG_INTERNAL_LOG_IMPL(_##severity)
  |  |  ------------------
  |  |  |  |   25|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, true) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  170|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   26|      0|      ABSL_LOGGING_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|  ::absl::log_internal::LogMessage(     \
  |  |  |  |  |  |   53|      0|      __FILE__, __LINE__, ::absl::log_internal::LogMessage::ErrorTag{})
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  675|      0|                      << "\" conflicts with the existing symbol \""
  676|      0|                      << (*iter)->AsString(index) << "\".";
  677|      0|      return false;
  678|      0|    }
  679|      2|  }
  680|     64|  return true;
  681|     64|}
descriptor_database.cc:_ZN6google8protobufL13MergeIntoFlatINS0_25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS3_11FileCompareEEEvPN4absl12lts_202401169btree_setIT_T0_NSt3__19allocatorIS9_EEEEPNSB_6vectorIS9_SD_EE:
  797|      4|static void MergeIntoFlat(absl::btree_set<T, Less>* s, std::vector<T>* flat) {
  798|      4|  if (s->empty()) return;
  ------------------
  |  Branch (798:7): [True: 2, False: 2]
  ------------------
  799|      2|  std::vector<T> new_flat(s->size() + flat->size());
  800|      2|  std::merge(s->begin(), s->end(), flat->begin(), flat->end(), &new_flat[0],
  801|      2|             s->key_comp());
  802|      2|  *flat = std::move(new_flat);
  803|      2|  s->clear();
  804|      2|}
descriptor_database.cc:_ZN6google8protobufL13MergeIntoFlatINS0_25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS3_13SymbolCompareEEEvPN4absl12lts_202401169btree_setIT_T0_NSt3__19allocatorIS9_EEEEPNSB_6vectorIS9_SD_EE:
  797|      4|static void MergeIntoFlat(absl::btree_set<T, Less>* s, std::vector<T>* flat) {
  798|      4|  if (s->empty()) return;
  ------------------
  |  Branch (798:7): [True: 2, False: 2]
  ------------------
  799|      2|  std::vector<T> new_flat(s->size() + flat->size());
  800|      2|  std::merge(s->begin(), s->end(), flat->begin(), flat->end(), &new_flat[0],
  801|      2|             s->key_comp());
  802|      2|  *flat = std::move(new_flat);
  803|      2|  s->clear();
  804|      2|}
descriptor_database.cc:_ZN6google8protobufL13MergeIntoFlatINS0_25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS3_16ExtensionCompareEEEvPN4absl12lts_202401169btree_setIT_T0_NSt3__19allocatorIS9_EEEEPNSB_6vectorIS9_SD_EE:
  797|      4|static void MergeIntoFlat(absl::btree_set<T, Less>* s, std::vector<T>* flat) {
  798|      4|  if (s->empty()) return;
  ------------------
  |  Branch (798:7): [True: 3, False: 1]
  ------------------
  799|      1|  std::vector<T> new_flat(s->size() + flat->size());
  800|      1|  std::merge(s->begin(), s->end(), flat->begin(), flat->end(), &new_flat[0],
  801|      1|             s->key_comp());
  802|      1|  *flat = std::move(new_flat);
  803|      1|  s->clear();
  804|      1|}

_ZN6google8protobuf18DescriptorDatabaseC2Ev:
   52|      2|  inline DescriptorDatabase() {}

descriptor.cc:_ZN6google8protobuf8internal16VisitDescriptorsIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3EEvRKNS0_14FileDescriptorES6_T_:
  165|      4|                      const FileDescriptorProto& proto, Visitor visitor) {
  166|      4|  using VisitorImpl = internal::VisitorImpl<Visitor>;
  167|      4|  internal::VisitImpl<VisitorImpl>{VisitorImpl(visitor)}.Visit(file, proto);
  168|      4|}
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3EC2ES9_:
  149|      4|  explicit VisitorImpl(Visitor visitor) : Visitor(visitor) {}
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3EEE5VisitIJS6_EEEvRKNS0_14FileDescriptorEDpRT_:
  108|      4|  void Visit(const FileDescriptor& descriptor, Proto&... proto) {
  109|      4|    visitor(descriptor, proto...);
  110|     41|    for (int i = 0; i < descriptor.message_type_count(); i++) {
  ------------------
  |  Branch (110:21): [True: 37, False: 4]
  ------------------
  111|     37|      Visit(*descriptor.message_type(i), message_type(proto, i)...);
  112|     37|    }
  113|     11|    for (int i = 0; i < descriptor.enum_type_count(); i++) {
  ------------------
  |  Branch (113:21): [True: 7, False: 4]
  ------------------
  114|      7|      Visit(*descriptor.enum_type(i), enum_type(proto, i)...);
  115|      7|    }
  116|      5|    for (int i = 0; i < descriptor.extension_count(); i++) {
  ------------------
  |  Branch (116:21): [True: 1, False: 4]
  ------------------
  117|      1|      Visit(*descriptor.extension(i), extension(proto, i)...);
  118|      1|    }
  119|      4|    for (int i = 0; i < descriptor.service_count(); i++) {
  ------------------
  |  Branch (119:21): [True: 0, False: 4]
  ------------------
  120|      0|      Visit(*descriptor.service(i), service(proto, i)...);
  121|      0|    }
  122|      4|  }
descriptor.cc:_ZNK6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3EclENSA_15DescriptorEaterESB_:
  159|    281|  void operator()(DescriptorEater, DescriptorEater) const {}
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3E15DescriptorEaterC2IRKNS0_14FileDescriptorEEEOT_:
  157|      4|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3E15DescriptorEaterC2IS6_EEOT_:
  157|      4|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3EEE5VisitIJKNS0_15DescriptorProtoEEEEvRKNS0_10DescriptorEDpRT_:
   66|     47|  void Visit(const Descriptor& descriptor, Proto&... proto) {
   67|     47|    visitor(descriptor, proto...);
   68|       |
   69|     64|    for (int i = 0; i < descriptor.enum_type_count(); i++) {
  ------------------
  |  Branch (69:21): [True: 17, False: 47]
  ------------------
   70|     17|      Visit(*descriptor.enum_type(i), enum_type(proto, i)...);
   71|     17|    }
   72|       |
   73|     49|    for (int i = 0; i < descriptor.oneof_decl_count(); i++) {
  ------------------
  |  Branch (73:21): [True: 2, False: 47]
  ------------------
   74|      2|      Visit(*descriptor.oneof_decl(i), oneof_decl(proto, i)...);
   75|      2|    }
   76|       |
   77|    281|    for (int i = 0; i < descriptor.field_count(); i++) {
  ------------------
  |  Branch (77:21): [True: 234, False: 47]
  ------------------
   78|    234|      Visit(*descriptor.field(i), field(proto, i)...);
   79|    234|    }
   80|       |
   81|     57|    for (int i = 0; i < descriptor.nested_type_count(); i++) {
  ------------------
  |  Branch (81:21): [True: 10, False: 47]
  ------------------
   82|     10|      Visit(*descriptor.nested_type(i), nested_type(proto, i)...);
   83|     10|    }
   84|       |
   85|     47|    for (int i = 0; i < descriptor.extension_count(); i++) {
  ------------------
  |  Branch (85:21): [True: 0, False: 47]
  ------------------
   86|      0|      Visit(*descriptor.extension(i), extension(proto, i)...);
   87|      0|    }
   88|       |
   89|     61|    for (int i = 0; i < descriptor.extension_range_count(); i++) {
  ------------------
  |  Branch (89:21): [True: 14, False: 47]
  ------------------
   90|     14|      Visit(*descriptor.extension_range(i), extension_range(proto, i)...);
   91|     14|    }
   92|     47|  }
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3E15DescriptorEaterC2IRKNS0_10DescriptorEEEOT_:
  157|     47|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3E15DescriptorEaterC2IRKNS0_15DescriptorProtoEEEOT_:
  157|     47|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3EEE9enum_typeERKNS0_15DescriptorProtoEi:
  127|     17|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3EEE5VisitIJKNS0_20OneofDescriptorProtoEEEEvRKNS0_15OneofDescriptorEDpRT_:
   61|      2|  void Visit(const OneofDescriptor& descriptor, Proto&... proto) {
   62|      2|    visitor(descriptor, proto...);
   63|      2|  }
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3E15DescriptorEaterC2IRKNS0_15OneofDescriptorEEEOT_:
  157|      2|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3E15DescriptorEaterC2IRKNS0_20OneofDescriptorProtoEEEOT_:
  157|      2|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3EEE10oneof_declERKNS0_15DescriptorProtoEi:
  127|      2|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3EEE5fieldERKNS0_15DescriptorProtoEi:
  127|    234|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3EEE11nested_typeERKNS0_15DescriptorProtoEi:
  127|     10|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3EEE5VisitIJKNS0_30DescriptorProto_ExtensionRangeEEEEvRKNS0_10Descriptor14ExtensionRangeEDpRT_:
   56|     14|  void Visit(const Descriptor::ExtensionRange& descriptor, Proto&... proto) {
   57|     14|    visitor(descriptor, proto...);
   58|     14|  }
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3E15DescriptorEaterC2IRKNS0_10Descriptor14ExtensionRangeEEEOT_:
  157|     14|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3E15DescriptorEaterC2IRKNS0_30DescriptorProto_ExtensionRangeEEEOT_:
  157|     14|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3EEE15extension_rangeERKNS0_15DescriptorProtoEi:
  127|     14|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3EEE12message_typeES7_i:
  127|     37|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3EEE5VisitIJKNS0_19EnumDescriptorProtoEEEEvRKNS0_14EnumDescriptorEDpRT_:
   48|     24|  void Visit(const EnumDescriptor& descriptor, Proto&... proto) {
   49|     24|    visitor(descriptor, proto...);
   50|    214|    for (int i = 0; i < descriptor.value_count(); i++) {
  ------------------
  |  Branch (50:21): [True: 190, False: 24]
  ------------------
   51|    190|      Visit(*descriptor.value(i), value(proto, i)...);
   52|    190|    }
   53|     24|  }
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3E15DescriptorEaterC2IRKNS0_14EnumDescriptorEEEOT_:
  157|     24|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3E15DescriptorEaterC2IRKNS0_19EnumDescriptorProtoEEEOT_:
  157|     24|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3EEE5VisitIJKNS0_24EnumValueDescriptorProtoEEEEvRKNS0_19EnumValueDescriptorEDpRT_:
   43|    190|  void Visit(const EnumValueDescriptor& descriptor, Proto&... proto) {
   44|    190|    visitor(descriptor, proto...);
   45|    190|  }
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3E15DescriptorEaterC2IRKNS0_19EnumValueDescriptorEEEOT_:
  157|    190|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3E15DescriptorEaterC2IRKNS0_24EnumValueDescriptorProtoEEEOT_:
  157|    190|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3EEE5valueERKNS0_19EnumDescriptorProtoEi:
  127|    190|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3EEE9enum_typeES7_i:
  127|      7|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3EEE5VisitIJKNS0_20FieldDescriptorProtoEEEEvRKNS0_15FieldDescriptorEDpRT_:
   38|    235|  void Visit(const FieldDescriptor& descriptor, Proto&... proto) {
   39|    235|    visitor(descriptor, proto...);
   40|    235|  }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_3EEE9extensionES7_i:
  127|      1|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal16VisitDescriptorsIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_4EEvRKNS0_14FileDescriptorES6_T_:
  165|      4|                      const FileDescriptorProto& proto, Visitor visitor) {
  166|      4|  using VisitorImpl = internal::VisitorImpl<Visitor>;
  167|      4|  internal::VisitImpl<VisitorImpl>{VisitorImpl(visitor)}.Visit(file, proto);
  168|      4|}
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_4EC2ES9_:
  149|      4|  explicit VisitorImpl(Visitor visitor) : Visitor(visitor) {}
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_4EEE5VisitIJS6_EEEvRKNS0_14FileDescriptorEDpRT_:
  108|      4|  void Visit(const FileDescriptor& descriptor, Proto&... proto) {
  109|      4|    visitor(descriptor, proto...);
  110|     41|    for (int i = 0; i < descriptor.message_type_count(); i++) {
  ------------------
  |  Branch (110:21): [True: 37, False: 4]
  ------------------
  111|     37|      Visit(*descriptor.message_type(i), message_type(proto, i)...);
  112|     37|    }
  113|     11|    for (int i = 0; i < descriptor.enum_type_count(); i++) {
  ------------------
  |  Branch (113:21): [True: 7, False: 4]
  ------------------
  114|      7|      Visit(*descriptor.enum_type(i), enum_type(proto, i)...);
  115|      7|    }
  116|      5|    for (int i = 0; i < descriptor.extension_count(); i++) {
  ------------------
  |  Branch (116:21): [True: 1, False: 4]
  ------------------
  117|      1|      Visit(*descriptor.extension(i), extension(proto, i)...);
  118|      1|    }
  119|      4|    for (int i = 0; i < descriptor.service_count(); i++) {
  ------------------
  |  Branch (119:21): [True: 0, False: 4]
  ------------------
  120|      0|      Visit(*descriptor.service(i), service(proto, i)...);
  121|      0|    }
  122|      4|  }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_4EEE5VisitIJKNS0_15DescriptorProtoEEEEvRKNS0_10DescriptorEDpRT_:
   66|     47|  void Visit(const Descriptor& descriptor, Proto&... proto) {
   67|     47|    visitor(descriptor, proto...);
   68|       |
   69|     64|    for (int i = 0; i < descriptor.enum_type_count(); i++) {
  ------------------
  |  Branch (69:21): [True: 17, False: 47]
  ------------------
   70|     17|      Visit(*descriptor.enum_type(i), enum_type(proto, i)...);
   71|     17|    }
   72|       |
   73|     49|    for (int i = 0; i < descriptor.oneof_decl_count(); i++) {
  ------------------
  |  Branch (73:21): [True: 2, False: 47]
  ------------------
   74|      2|      Visit(*descriptor.oneof_decl(i), oneof_decl(proto, i)...);
   75|      2|    }
   76|       |
   77|    281|    for (int i = 0; i < descriptor.field_count(); i++) {
  ------------------
  |  Branch (77:21): [True: 234, False: 47]
  ------------------
   78|    234|      Visit(*descriptor.field(i), field(proto, i)...);
   79|    234|    }
   80|       |
   81|     57|    for (int i = 0; i < descriptor.nested_type_count(); i++) {
  ------------------
  |  Branch (81:21): [True: 10, False: 47]
  ------------------
   82|     10|      Visit(*descriptor.nested_type(i), nested_type(proto, i)...);
   83|     10|    }
   84|       |
   85|     47|    for (int i = 0; i < descriptor.extension_count(); i++) {
  ------------------
  |  Branch (85:21): [True: 0, False: 47]
  ------------------
   86|      0|      Visit(*descriptor.extension(i), extension(proto, i)...);
   87|      0|    }
   88|       |
   89|     61|    for (int i = 0; i < descriptor.extension_range_count(); i++) {
  ------------------
  |  Branch (89:21): [True: 14, False: 47]
  ------------------
   90|     14|      Visit(*descriptor.extension_range(i), extension_range(proto, i)...);
   91|     14|    }
   92|     47|  }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_4EEE9enum_typeERKNS0_15DescriptorProtoEi:
  127|     17|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_4EEE5VisitIJKNS0_20OneofDescriptorProtoEEEEvRKNS0_15OneofDescriptorEDpRT_:
   61|      2|  void Visit(const OneofDescriptor& descriptor, Proto&... proto) {
   62|      2|    visitor(descriptor, proto...);
   63|      2|  }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_4EEE10oneof_declERKNS0_15DescriptorProtoEi:
  127|      2|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_4EEE5fieldERKNS0_15DescriptorProtoEi:
  127|    234|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_4EEE11nested_typeERKNS0_15DescriptorProtoEi:
  127|     10|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_4EEE5VisitIJKNS0_30DescriptorProto_ExtensionRangeEEEEvRKNS0_10Descriptor14ExtensionRangeEDpRT_:
   56|     14|  void Visit(const Descriptor::ExtensionRange& descriptor, Proto&... proto) {
   57|     14|    visitor(descriptor, proto...);
   58|     14|  }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_4EEE15extension_rangeERKNS0_15DescriptorProtoEi:
  127|     14|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_4EEE12message_typeES7_i:
  127|     37|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_4EEE5VisitIJKNS0_19EnumDescriptorProtoEEEEvRKNS0_14EnumDescriptorEDpRT_:
   48|     24|  void Visit(const EnumDescriptor& descriptor, Proto&... proto) {
   49|     24|    visitor(descriptor, proto...);
   50|    214|    for (int i = 0; i < descriptor.value_count(); i++) {
  ------------------
  |  Branch (50:21): [True: 190, False: 24]
  ------------------
   51|    190|      Visit(*descriptor.value(i), value(proto, i)...);
   52|    190|    }
   53|     24|  }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_4EEE5VisitIJKNS0_24EnumValueDescriptorProtoEEEEvRKNS0_19EnumValueDescriptorEDpRT_:
   43|    190|  void Visit(const EnumValueDescriptor& descriptor, Proto&... proto) {
   44|    190|    visitor(descriptor, proto...);
   45|    190|  }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_4EEE5valueERKNS0_19EnumDescriptorProtoEi:
  127|    190|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_4EEE9enum_typeES7_i:
  127|      7|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_4EEE5VisitIJKNS0_20FieldDescriptorProtoEEEEvRKNS0_15FieldDescriptorEDpRT_:
   38|    235|  void Visit(const FieldDescriptor& descriptor, Proto&... proto) {
   39|    235|    visitor(descriptor, proto...);
   40|    235|  }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_4EEE9extensionES7_i:
  127|      1|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal16VisitDescriptorsIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_5EEvRKNS0_14FileDescriptorET_:
  178|      4|void VisitDescriptors(const FileDescriptor& file, Visitor visitor) {
  179|      4|  using VisitorImpl = internal::VisitorImpl<Visitor>;
  180|      4|  internal::VisitImpl<VisitorImpl>{VisitorImpl(visitor)}.Visit(file);
  181|      4|}
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_5EC2ES9_:
  149|      4|  explicit VisitorImpl(Visitor visitor) : Visitor(visitor) {}
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_5EEE5VisitIJEEEvRKNS0_14FileDescriptorEDpRT_:
  108|      4|  void Visit(const FileDescriptor& descriptor, Proto&... proto) {
  109|      4|    visitor(descriptor, proto...);
  110|     41|    for (int i = 0; i < descriptor.message_type_count(); i++) {
  ------------------
  |  Branch (110:21): [True: 37, False: 4]
  ------------------
  111|     37|      Visit(*descriptor.message_type(i), message_type(proto, i)...);
  112|     37|    }
  113|     11|    for (int i = 0; i < descriptor.enum_type_count(); i++) {
  ------------------
  |  Branch (113:21): [True: 7, False: 4]
  ------------------
  114|      7|      Visit(*descriptor.enum_type(i), enum_type(proto, i)...);
  115|      7|    }
  116|      5|    for (int i = 0; i < descriptor.extension_count(); i++) {
  ------------------
  |  Branch (116:21): [True: 1, False: 4]
  ------------------
  117|      1|      Visit(*descriptor.extension(i), extension(proto, i)...);
  118|      1|    }
  119|      4|    for (int i = 0; i < descriptor.service_count(); i++) {
  ------------------
  |  Branch (119:21): [True: 0, False: 4]
  ------------------
  120|      0|      Visit(*descriptor.service(i), service(proto, i)...);
  121|      0|    }
  122|      4|  }
descriptor.cc:_ZNK6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_5EclENSA_15DescriptorEaterE:
  160|    281|  void operator()(DescriptorEater) const {}
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_5E15DescriptorEaterC2IRKNS0_14FileDescriptorEEEOT_:
  157|      4|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_5EEE5VisitIJEEEvRKNS0_10DescriptorEDpRT_:
   66|     47|  void Visit(const Descriptor& descriptor, Proto&... proto) {
   67|     47|    visitor(descriptor, proto...);
   68|       |
   69|     64|    for (int i = 0; i < descriptor.enum_type_count(); i++) {
  ------------------
  |  Branch (69:21): [True: 17, False: 47]
  ------------------
   70|     17|      Visit(*descriptor.enum_type(i), enum_type(proto, i)...);
   71|     17|    }
   72|       |
   73|     49|    for (int i = 0; i < descriptor.oneof_decl_count(); i++) {
  ------------------
  |  Branch (73:21): [True: 2, False: 47]
  ------------------
   74|      2|      Visit(*descriptor.oneof_decl(i), oneof_decl(proto, i)...);
   75|      2|    }
   76|       |
   77|    281|    for (int i = 0; i < descriptor.field_count(); i++) {
  ------------------
  |  Branch (77:21): [True: 234, False: 47]
  ------------------
   78|    234|      Visit(*descriptor.field(i), field(proto, i)...);
   79|    234|    }
   80|       |
   81|     57|    for (int i = 0; i < descriptor.nested_type_count(); i++) {
  ------------------
  |  Branch (81:21): [True: 10, False: 47]
  ------------------
   82|     10|      Visit(*descriptor.nested_type(i), nested_type(proto, i)...);
   83|     10|    }
   84|       |
   85|     47|    for (int i = 0; i < descriptor.extension_count(); i++) {
  ------------------
  |  Branch (85:21): [True: 0, False: 47]
  ------------------
   86|      0|      Visit(*descriptor.extension(i), extension(proto, i)...);
   87|      0|    }
   88|       |
   89|     61|    for (int i = 0; i < descriptor.extension_range_count(); i++) {
  ------------------
  |  Branch (89:21): [True: 14, False: 47]
  ------------------
   90|     14|      Visit(*descriptor.extension_range(i), extension_range(proto, i)...);
   91|     14|    }
   92|     47|  }
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_5E15DescriptorEaterC2IRKNS0_10DescriptorEEEOT_:
  157|     47|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_5EEE5VisitIJEEEvRKNS0_15OneofDescriptorEDpRT_:
   61|      2|  void Visit(const OneofDescriptor& descriptor, Proto&... proto) {
   62|      2|    visitor(descriptor, proto...);
   63|      2|  }
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_5E15DescriptorEaterC2IRKNS0_15OneofDescriptorEEEOT_:
  157|      2|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_5EEE5VisitIJEEEvRKNS0_10Descriptor14ExtensionRangeEDpRT_:
   56|     14|  void Visit(const Descriptor::ExtensionRange& descriptor, Proto&... proto) {
   57|     14|    visitor(descriptor, proto...);
   58|     14|  }
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_5E15DescriptorEaterC2IRKNS0_10Descriptor14ExtensionRangeEEEOT_:
  157|     14|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_5EEE5VisitIJEEEvRKNS0_14EnumDescriptorEDpRT_:
   48|     24|  void Visit(const EnumDescriptor& descriptor, Proto&... proto) {
   49|     24|    visitor(descriptor, proto...);
   50|    214|    for (int i = 0; i < descriptor.value_count(); i++) {
  ------------------
  |  Branch (50:21): [True: 190, False: 24]
  ------------------
   51|    190|      Visit(*descriptor.value(i), value(proto, i)...);
   52|    190|    }
   53|     24|  }
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_5E15DescriptorEaterC2IRKNS0_14EnumDescriptorEEEOT_:
  157|     24|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_5EEE5VisitIJEEEvRKNS0_19EnumValueDescriptorEDpRT_:
   43|    190|  void Visit(const EnumValueDescriptor& descriptor, Proto&... proto) {
   44|    190|    visitor(descriptor, proto...);
   45|    190|  }
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_5E15DescriptorEaterC2IRKNS0_19EnumValueDescriptorEEEOT_:
  157|    190|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_5EEE5VisitIJEEEvRKNS0_15FieldDescriptorEDpRT_:
   38|    235|  void Visit(const FieldDescriptor& descriptor, Proto&... proto) {
   39|    235|    visitor(descriptor, proto...);
   40|    235|  }
descriptor.cc:_ZN6google8protobuf8internal16VisitDescriptorsIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6EEvRKNS0_14FileDescriptorES6_T_:
  165|      4|                      const FileDescriptorProto& proto, Visitor visitor) {
  166|      4|  using VisitorImpl = internal::VisitorImpl<Visitor>;
  167|      4|  internal::VisitImpl<VisitorImpl>{VisitorImpl(visitor)}.Visit(file, proto);
  168|      4|}
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6EC2ES9_:
  149|      4|  explicit VisitorImpl(Visitor visitor) : Visitor(visitor) {}
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6EEE5VisitIJS6_EEEvRKNS0_14FileDescriptorEDpRT_:
  108|      4|  void Visit(const FileDescriptor& descriptor, Proto&... proto) {
  109|      4|    visitor(descriptor, proto...);
  110|     41|    for (int i = 0; i < descriptor.message_type_count(); i++) {
  ------------------
  |  Branch (110:21): [True: 37, False: 4]
  ------------------
  111|     37|      Visit(*descriptor.message_type(i), message_type(proto, i)...);
  112|     37|    }
  113|     11|    for (int i = 0; i < descriptor.enum_type_count(); i++) {
  ------------------
  |  Branch (113:21): [True: 7, False: 4]
  ------------------
  114|      7|      Visit(*descriptor.enum_type(i), enum_type(proto, i)...);
  115|      7|    }
  116|      5|    for (int i = 0; i < descriptor.extension_count(); i++) {
  ------------------
  |  Branch (116:21): [True: 1, False: 4]
  ------------------
  117|      1|      Visit(*descriptor.extension(i), extension(proto, i)...);
  118|      1|    }
  119|      4|    for (int i = 0; i < descriptor.service_count(); i++) {
  ------------------
  |  Branch (119:21): [True: 0, False: 4]
  ------------------
  120|      0|      Visit(*descriptor.service(i), service(proto, i)...);
  121|      0|    }
  122|      4|  }
descriptor.cc:_ZNK6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6EclENSA_15DescriptorEaterESB_:
  159|    281|  void operator()(DescriptorEater, DescriptorEater) const {}
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6E15DescriptorEaterC2IRKNS0_14FileDescriptorEEEOT_:
  157|      4|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6E15DescriptorEaterC2IS6_EEOT_:
  157|      4|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6EEE5VisitIJKNS0_15DescriptorProtoEEEEvRKNS0_10DescriptorEDpRT_:
   66|     47|  void Visit(const Descriptor& descriptor, Proto&... proto) {
   67|     47|    visitor(descriptor, proto...);
   68|       |
   69|     64|    for (int i = 0; i < descriptor.enum_type_count(); i++) {
  ------------------
  |  Branch (69:21): [True: 17, False: 47]
  ------------------
   70|     17|      Visit(*descriptor.enum_type(i), enum_type(proto, i)...);
   71|     17|    }
   72|       |
   73|     49|    for (int i = 0; i < descriptor.oneof_decl_count(); i++) {
  ------------------
  |  Branch (73:21): [True: 2, False: 47]
  ------------------
   74|      2|      Visit(*descriptor.oneof_decl(i), oneof_decl(proto, i)...);
   75|      2|    }
   76|       |
   77|    281|    for (int i = 0; i < descriptor.field_count(); i++) {
  ------------------
  |  Branch (77:21): [True: 234, False: 47]
  ------------------
   78|    234|      Visit(*descriptor.field(i), field(proto, i)...);
   79|    234|    }
   80|       |
   81|     57|    for (int i = 0; i < descriptor.nested_type_count(); i++) {
  ------------------
  |  Branch (81:21): [True: 10, False: 47]
  ------------------
   82|     10|      Visit(*descriptor.nested_type(i), nested_type(proto, i)...);
   83|     10|    }
   84|       |
   85|     47|    for (int i = 0; i < descriptor.extension_count(); i++) {
  ------------------
  |  Branch (85:21): [True: 0, False: 47]
  ------------------
   86|      0|      Visit(*descriptor.extension(i), extension(proto, i)...);
   87|      0|    }
   88|       |
   89|     61|    for (int i = 0; i < descriptor.extension_range_count(); i++) {
  ------------------
  |  Branch (89:21): [True: 14, False: 47]
  ------------------
   90|     14|      Visit(*descriptor.extension_range(i), extension_range(proto, i)...);
   91|     14|    }
   92|     47|  }
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6E15DescriptorEaterC2IRKNS0_10DescriptorEEEOT_:
  157|     47|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6E15DescriptorEaterC2IRKNS0_15DescriptorProtoEEEOT_:
  157|     47|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6EEE9enum_typeERKNS0_15DescriptorProtoEi:
  127|     17|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6EEE5VisitIJKNS0_20OneofDescriptorProtoEEEEvRKNS0_15OneofDescriptorEDpRT_:
   61|      2|  void Visit(const OneofDescriptor& descriptor, Proto&... proto) {
   62|      2|    visitor(descriptor, proto...);
   63|      2|  }
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6E15DescriptorEaterC2IRKNS0_15OneofDescriptorEEEOT_:
  157|      2|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6E15DescriptorEaterC2IRKNS0_20OneofDescriptorProtoEEEOT_:
  157|      2|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6EEE10oneof_declERKNS0_15DescriptorProtoEi:
  127|      2|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6EEE5fieldERKNS0_15DescriptorProtoEi:
  127|    234|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6EEE11nested_typeERKNS0_15DescriptorProtoEi:
  127|     10|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6EEE5VisitIJKNS0_30DescriptorProto_ExtensionRangeEEEEvRKNS0_10Descriptor14ExtensionRangeEDpRT_:
   56|     14|  void Visit(const Descriptor::ExtensionRange& descriptor, Proto&... proto) {
   57|     14|    visitor(descriptor, proto...);
   58|     14|  }
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6E15DescriptorEaterC2IRKNS0_10Descriptor14ExtensionRangeEEEOT_:
  157|     14|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6E15DescriptorEaterC2IRKNS0_30DescriptorProto_ExtensionRangeEEEOT_:
  157|     14|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6EEE15extension_rangeERKNS0_15DescriptorProtoEi:
  127|     14|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6EEE12message_typeES7_i:
  127|     37|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6EEE5VisitIJKNS0_19EnumDescriptorProtoEEEEvRKNS0_14EnumDescriptorEDpRT_:
   48|     24|  void Visit(const EnumDescriptor& descriptor, Proto&... proto) {
   49|     24|    visitor(descriptor, proto...);
   50|    214|    for (int i = 0; i < descriptor.value_count(); i++) {
  ------------------
  |  Branch (50:21): [True: 190, False: 24]
  ------------------
   51|    190|      Visit(*descriptor.value(i), value(proto, i)...);
   52|    190|    }
   53|     24|  }
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6E15DescriptorEaterC2IRKNS0_14EnumDescriptorEEEOT_:
  157|     24|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6E15DescriptorEaterC2IRKNS0_19EnumDescriptorProtoEEEOT_:
  157|     24|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6EEE5VisitIJKNS0_24EnumValueDescriptorProtoEEEEvRKNS0_19EnumValueDescriptorEDpRT_:
   43|    190|  void Visit(const EnumValueDescriptor& descriptor, Proto&... proto) {
   44|    190|    visitor(descriptor, proto...);
   45|    190|  }
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6E15DescriptorEaterC2IRKNS0_19EnumValueDescriptorEEEOT_:
  157|    190|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6E15DescriptorEaterC2IRKNS0_24EnumValueDescriptorProtoEEEOT_:
  157|    190|    DescriptorEater(T&&) {}  // NOLINT
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6EEE5valueERKNS0_19EnumDescriptorProtoEi:
  127|    190|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6EEE9enum_typeES7_i:
  127|      7|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6EEE5VisitIJKNS0_20FieldDescriptorProtoEEEEvRKNS0_15FieldDescriptorEDpRT_:
   38|    235|  void Visit(const FieldDescriptor& descriptor, Proto&... proto) {
   39|    235|    visitor(descriptor, proto...);
   40|    235|  }
descriptor.cc:_ZN6google8protobuf8internal9VisitImplINS1_11VisitorImplIZNS0_17DescriptorBuilder13BuildFileImplERKNS0_19FileDescriptorProtoERNS1_13FlatAllocatorEE3$_6EEE9extensionES7_i:
  127|      1|  inline auto& NESTED(const TYPE& desc, int i) { return desc.NESTED(i); }

_ZN6google8protobuf21DynamicMessageFactoryC2Ev:
  644|      6|    : pool_(nullptr), delegate_to_generated_factory_(false) {}
_ZN6google8protobuf21DynamicMessageFactoryD2Ev:
  649|      4|DynamicMessageFactory::~DynamicMessageFactory() {
  650|      4|  for (auto iter = prototypes_.begin(); iter != prototypes_.end(); ++iter) {
  ------------------
  |  Branch (650:41): [True: 0, False: 4]
  ------------------
  651|      0|    delete iter->second;
  652|      0|  }
  653|      4|}

_ZN6google8protobuf21DynamicMessageFactory29SetDelegateToGeneratedFactoryEb:
   94|      2|  void SetDelegateToGeneratedFactory(bool enable) {
   95|      2|    delegate_to_generated_factory_ = enable;
   96|      2|  }

_ZN6google8protobuf8internal13little_endian6ToHostEt:
   93|  58.2k|inline uint16_t ToHost(uint16_t value) {
   94|       |#if defined(ABSL_IS_BIG_ENDIAN)
   95|       |  return BSwap16(value);
   96|       |#else
   97|  58.2k|  return value;
   98|  58.2k|#endif
   99|  58.2k|}

_ZN6google8protobuf8internal21ExplicitlyConstructedINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEELm8EE16DefaultConstructEv:
   40|      2|  void DefaultConstruct() { new (&union_) T(); }
_ZN6google8protobuf8internal21ExplicitlyConstructedINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEELm8EE11get_mutableEv:
   50|      2|  T* get_mutable() { return reinterpret_cast<T*>(&union_); }

_ZN6google8protobuf8internal24GeneratedExtensionFinder4FindEiPNS1_13ExtensionInfoE:
  118|      8|bool GeneratedExtensionFinder::Find(int number, ExtensionInfo* output) {
  119|      8|  const ExtensionInfo* extension = FindRegisteredExtension(extendee_, number);
  120|      8|  if (extension == nullptr) {
  ------------------
  |  Branch (120:7): [True: 0, False: 8]
  ------------------
  121|      0|    return false;
  122|      8|  } else {
  123|      8|    *output = *extension;
  124|      8|    return true;
  125|      8|  }
  126|      8|}
_ZN6google8protobuf8internal12ExtensionSet24RegisterMessageExtensionEPKNS0_11MessageLiteEihbbS5_PFPKcS7_PNS1_12ParseContextEENS1_14LazyAnnotationE:
  168|      1|                                            LazyAnnotation is_lazy) {
  169|      1|  ABSL_CHECK(type == WireFormatLite::TYPE_MESSAGE ||
  ------------------
  |  |   41|      1|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|      2|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      1|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      2|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      2|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 1, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      1|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      3|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 1, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 1, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 1]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|      2|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|      2|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  170|      1|             type == WireFormatLite::TYPE_GROUP);
  171|      1|  ExtensionInfo info(extendee, number, type, is_repeated, is_packed,
  172|      1|                     verify_func, is_lazy);
  173|      1|  info.message_info = {prototype,
  174|      1|#if defined(PROTOBUF_CONSTINIT_DEFAULT_INSTANCES)
  175|      1|                       prototype->GetTcParseTable()
  176|       |#else
  177|       |                       nullptr
  178|       |#endif
  179|      1|  };
  180|      1|  Register(info);
  181|      1|}
_ZN6google8protobuf8internal12ExtensionSetD2Ev:
  186|  1.05k|ExtensionSet::~ExtensionSet() {
  187|       |  // Deletes all allocated extensions.
  188|  1.05k|  if (arena_ == nullptr) {
  ------------------
  |  Branch (188:7): [True: 1.05k, False: 0]
  ------------------
  189|  1.05k|    ForEach([](int /* number */, Extension& ext) { ext.Free(); },
  190|  1.05k|            PrefetchNta{});
  191|  1.05k|    if (PROTOBUF_PREDICT_FALSE(is_large())) {
  ------------------
  |  |  365|  1.05k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 1.05k]
  |  |  |  Branch (365:54): [Folded, False: 1.05k]
  |  |  |  Branch (365:63): [True: 0, False: 1.05k]
  |  |  ------------------
  ------------------
  192|      0|      delete map_.large;
  193|  1.05k|    } else {
  194|  1.05k|      DeleteFlatMap(map_.flat, flat_capacity_);
  195|  1.05k|    }
  196|  1.05k|  }
  197|  1.05k|}
_ZN6google8protobuf8internal12ExtensionSet13DeleteFlatMapEPKNS2_8KeyValueEt:
  200|  1.05k|                                 uint16_t flat_capacity) {
  201|       |  // Arena::CreateArray already requires a trivially destructible type, but
  202|       |  // ensure this constraint is not violated in the future.
  203|  1.05k|  static_assert(std::is_trivially_destructible<KeyValue>::value,
  204|  1.05k|                "CreateArray requires a trivially destructible type");
  205|       |  // A const-cast is needed, but this is safe as we are about to deallocate the
  206|       |  // array.
  207|  1.05k|  internal::SizedArrayDelete(const_cast<KeyValue*>(flat),
  208|  1.05k|                             sizeof(*flat) * flat_capacity);
  209|  1.05k|}
_ZNK6google8protobuf8internal12ExtensionSet10GetMessageEiRKNS0_11MessageLiteE:
  633|    235|    int number, const MessageLite& default_value) const {
  634|    235|  const Extension* extension = FindOrNull(number);
  635|    235|  if (extension == nullptr) {
  ------------------
  |  Branch (635:7): [True: 0, False: 235]
  ------------------
  636|       |    // Not present.  Return the default value.
  637|      0|    return default_value;
  638|    235|  } else {
  639|    235|    ABSL_DCHECK_TYPE(*extension, OPTIONAL_FIELD, MESSAGE);
  ------------------
  |  |  272|    235|  ABSL_DCHECK_EQ((EXTENSION).is_repeated ? REPEATED_FIELD : OPTIONAL_FIELD, \
  |  |  ------------------
  |  |  |  |   74|    235|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   86|    235|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|    235|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 235]
  |  |  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (56:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   57|    235|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  273|    235|                 LABEL);                                                    \
  |  |  274|    235|  ABSL_DCHECK_EQ(cpp_type((EXTENSION).type), WireFormatLite::CPPTYPE_##CPPTYPE)
  |  |  ------------------
  |  |  |  |   74|    235|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   86|    235|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|    235|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 235]
  |  |  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   57|    235|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  640|    235|    if (extension->is_lazy) {
  ------------------
  |  Branch (640:9): [True: 0, False: 235]
  ------------------
  641|      0|      return extension->ptr.lazymessage_value->GetMessage(default_value,
  642|      0|                                                          arena_);
  643|    235|    } else {
  644|    235|      return *extension->ptr.message_value;
  645|    235|    }
  646|    235|  }
  647|    235|}
_ZN6google8protobuf8internal12ExtensionSet14MutableMessageEihRKNS0_11MessageLiteEPKNS0_15FieldDescriptorE:
  656|    243|                                          const FieldDescriptor* descriptor) {
  657|    243|  Extension* extension;
  658|    243|  if (MaybeNewExtension(number, descriptor, &extension)) {
  ------------------
  |  Branch (658:7): [True: 243, False: 0]
  ------------------
  659|    243|    extension->type = type;
  660|    243|    ABSL_DCHECK_EQ(cpp_type(extension->type), WireFormatLite::CPPTYPE_MESSAGE);
  ------------------
  |  |   74|    243|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|    243|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    243|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 243]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    243|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  661|    243|    extension->is_repeated = false;
  662|    243|    extension->is_pointer = true;
  663|    243|    extension->is_lazy = false;
  664|    243|    extension->ptr.message_value = prototype.New(arena_);
  665|    243|    extension->is_cleared = false;
  666|    243|    return extension->ptr.message_value;
  667|    243|  } else {
  668|      0|    ABSL_DCHECK_TYPE(*extension, OPTIONAL_FIELD, MESSAGE);
  ------------------
  |  |  272|      0|  ABSL_DCHECK_EQ((EXTENSION).is_repeated ? REPEATED_FIELD : OPTIONAL_FIELD, \
  |  |  ------------------
  |  |  |  |   74|      0|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   86|      0|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|      0|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (56:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   57|      0|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  273|      0|                 LABEL);                                                    \
  |  |  274|      0|  ABSL_DCHECK_EQ(cpp_type((EXTENSION).type), WireFormatLite::CPPTYPE_##CPPTYPE)
  |  |  ------------------
  |  |  |  |   74|      0|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   86|      0|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|      0|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   57|      0|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  669|      0|    extension->is_cleared = false;
  670|      0|    if (extension->is_lazy) {
  ------------------
  |  Branch (670:9): [True: 0, False: 0]
  ------------------
  671|      0|      return extension->ptr.lazymessage_value->MutableMessage(prototype,
  672|      0|                                                              arena_);
  673|      0|    } else {
  674|      0|      return extension->ptr.message_value;
  675|      0|    }
  676|      0|  }
  677|    243|}
_ZN6google8protobuf8internal12ExtensionSet5ClearEv:
  959|     19|void ExtensionSet::Clear() {
  960|     19|  ForEach([](int /* number */, Extension& ext) { ext.Clear(); }, Prefetch{});
  961|     19|}
_ZN6google8protobuf8internal12ExtensionSet9MergeFromEPKNS0_11MessageLiteERKS2_:
  998|  1.27k|                             const ExtensionSet& other) {
  999|  1.27k|  Prefetch5LinesFrom1Line(&other);
 1000|  1.27k|  if (PROTOBUF_PREDICT_TRUE(!is_large())) {
  ------------------
  |  |  364|  1.27k|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 1.27k, False: 0]
  |  |  |  Branch (364:53): [Folded, False: 1.27k]
  |  |  |  Branch (364:62): [True: 1.27k, False: 0]
  |  |  ------------------
  ------------------
 1001|  1.27k|    if (PROTOBUF_PREDICT_TRUE(!other.is_large())) {
  ------------------
  |  |  364|  1.27k|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 1.27k, False: 0]
  |  |  |  Branch (364:53): [Folded, False: 1.27k]
  |  |  |  Branch (364:62): [True: 1.27k, False: 0]
  |  |  ------------------
  ------------------
 1002|  1.27k|      GrowCapacity(SizeOfUnion(flat_begin(), flat_end(), other.flat_begin(),
 1003|  1.27k|                               other.flat_end()));
 1004|  1.27k|    } else {
 1005|      0|      GrowCapacity(SizeOfUnion(flat_begin(), flat_end(),
 1006|      0|                               other.map_.large->begin(),
 1007|      0|                               other.map_.large->end()));
 1008|      0|    }
 1009|  1.27k|  }
 1010|  1.27k|  other.ForEach(
 1011|  1.27k|      [extendee, this, &other](int number, const Extension& ext) {
 1012|  1.27k|        this->InternalExtensionMergeFrom(extendee, number, ext, other.arena_);
 1013|  1.27k|      },
 1014|  1.27k|      Prefetch{});
 1015|  1.27k|}
_ZN6google8protobuf8internal12ExtensionSet26InternalExtensionMergeFromEPKNS0_11MessageLiteEiRKNS2_9ExtensionEPNS0_5ArenaE:
 1020|    749|                                              Arena* other_arena) {
 1021|    749|  if (other_extension.is_repeated) {
  ------------------
  |  Branch (1021:7): [True: 0, False: 749]
  ------------------
 1022|      0|    Extension* extension;
 1023|      0|    bool is_new =
 1024|      0|        MaybeNewExtension(number, other_extension.descriptor, &extension);
 1025|      0|    if (is_new) {
  ------------------
  |  Branch (1025:9): [True: 0, False: 0]
  ------------------
 1026|       |      // Extension did not already exist in set.
 1027|      0|      extension->type = other_extension.type;
 1028|      0|      extension->is_packed = other_extension.is_packed;
 1029|      0|      extension->is_repeated = true;
 1030|      0|      extension->is_pointer = true;
 1031|      0|    } else {
 1032|      0|      ABSL_DCHECK_EQ(extension->type, other_extension.type);
  ------------------
  |  |   74|      0|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|      0|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1033|      0|      ABSL_DCHECK_EQ(extension->is_packed, other_extension.is_packed);
  ------------------
  |  |   74|      0|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|      0|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1034|      0|      ABSL_DCHECK(extension->is_repeated);
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1035|      0|    }
 1036|       |
 1037|      0|    switch (cpp_type(other_extension.type)) {
  ------------------
  |  Branch (1037:13): [True: 0, False: 0]
  ------------------
 1038|      0|#define HANDLE_TYPE(UPPERCASE, LOWERCASE, REPEATED_TYPE)    \
 1039|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:                 \
 1040|      0|    if (is_new) {                                           \
 1041|      0|      extension->ptr.repeated_##LOWERCASE##_value =         \
 1042|      0|          Arena::Create<REPEATED_TYPE>(arena_);             \
 1043|      0|    }                                                       \
 1044|      0|    extension->ptr.repeated_##LOWERCASE##_value->MergeFrom( \
 1045|      0|        *other_extension.ptr.repeated_##LOWERCASE##_value); \
 1046|      0|    break;
 1047|       |
 1048|      0|      HANDLE_TYPE(INT32, int32_t, RepeatedField<int32_t>);
  ------------------
  |  | 1039|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:                 \
  |  |  ------------------
  |  |  |  Branch (1039:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1040|      0|    if (is_new) {                                           \
  |  |  ------------------
  |  |  |  Branch (1040:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1041|      0|      extension->ptr.repeated_##LOWERCASE##_value =         \
  |  | 1042|      0|          Arena::Create<REPEATED_TYPE>(arena_);             \
  |  | 1043|      0|    }                                                       \
  |  | 1044|      0|    extension->ptr.repeated_##LOWERCASE##_value->MergeFrom( \
  |  | 1045|      0|        *other_extension.ptr.repeated_##LOWERCASE##_value); \
  |  | 1046|      0|    break;
  ------------------
 1049|      0|      HANDLE_TYPE(INT64, int64_t, RepeatedField<int64_t>);
  ------------------
  |  | 1039|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:                 \
  |  |  ------------------
  |  |  |  Branch (1039:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1040|      0|    if (is_new) {                                           \
  |  |  ------------------
  |  |  |  Branch (1040:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1041|      0|      extension->ptr.repeated_##LOWERCASE##_value =         \
  |  | 1042|      0|          Arena::Create<REPEATED_TYPE>(arena_);             \
  |  | 1043|      0|    }                                                       \
  |  | 1044|      0|    extension->ptr.repeated_##LOWERCASE##_value->MergeFrom( \
  |  | 1045|      0|        *other_extension.ptr.repeated_##LOWERCASE##_value); \
  |  | 1046|      0|    break;
  ------------------
 1050|      0|      HANDLE_TYPE(UINT32, uint32_t, RepeatedField<uint32_t>);
  ------------------
  |  | 1039|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:                 \
  |  |  ------------------
  |  |  |  Branch (1039:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1040|      0|    if (is_new) {                                           \
  |  |  ------------------
  |  |  |  Branch (1040:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1041|      0|      extension->ptr.repeated_##LOWERCASE##_value =         \
  |  | 1042|      0|          Arena::Create<REPEATED_TYPE>(arena_);             \
  |  | 1043|      0|    }                                                       \
  |  | 1044|      0|    extension->ptr.repeated_##LOWERCASE##_value->MergeFrom( \
  |  | 1045|      0|        *other_extension.ptr.repeated_##LOWERCASE##_value); \
  |  | 1046|      0|    break;
  ------------------
 1051|      0|      HANDLE_TYPE(UINT64, uint64_t, RepeatedField<uint64_t>);
  ------------------
  |  | 1039|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:                 \
  |  |  ------------------
  |  |  |  Branch (1039:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1040|      0|    if (is_new) {                                           \
  |  |  ------------------
  |  |  |  Branch (1040:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1041|      0|      extension->ptr.repeated_##LOWERCASE##_value =         \
  |  | 1042|      0|          Arena::Create<REPEATED_TYPE>(arena_);             \
  |  | 1043|      0|    }                                                       \
  |  | 1044|      0|    extension->ptr.repeated_##LOWERCASE##_value->MergeFrom( \
  |  | 1045|      0|        *other_extension.ptr.repeated_##LOWERCASE##_value); \
  |  | 1046|      0|    break;
  ------------------
 1052|      0|      HANDLE_TYPE(FLOAT, float, RepeatedField<float>);
  ------------------
  |  | 1039|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:                 \
  |  |  ------------------
  |  |  |  Branch (1039:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1040|      0|    if (is_new) {                                           \
  |  |  ------------------
  |  |  |  Branch (1040:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1041|      0|      extension->ptr.repeated_##LOWERCASE##_value =         \
  |  | 1042|      0|          Arena::Create<REPEATED_TYPE>(arena_);             \
  |  | 1043|      0|    }                                                       \
  |  | 1044|      0|    extension->ptr.repeated_##LOWERCASE##_value->MergeFrom( \
  |  | 1045|      0|        *other_extension.ptr.repeated_##LOWERCASE##_value); \
  |  | 1046|      0|    break;
  ------------------
 1053|      0|      HANDLE_TYPE(DOUBLE, double, RepeatedField<double>);
  ------------------
  |  | 1039|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:                 \
  |  |  ------------------
  |  |  |  Branch (1039:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1040|      0|    if (is_new) {                                           \
  |  |  ------------------
  |  |  |  Branch (1040:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1041|      0|      extension->ptr.repeated_##LOWERCASE##_value =         \
  |  | 1042|      0|          Arena::Create<REPEATED_TYPE>(arena_);             \
  |  | 1043|      0|    }                                                       \
  |  | 1044|      0|    extension->ptr.repeated_##LOWERCASE##_value->MergeFrom( \
  |  | 1045|      0|        *other_extension.ptr.repeated_##LOWERCASE##_value); \
  |  | 1046|      0|    break;
  ------------------
 1054|      0|      HANDLE_TYPE(BOOL, bool, RepeatedField<bool>);
  ------------------
  |  | 1039|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:                 \
  |  |  ------------------
  |  |  |  Branch (1039:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1040|      0|    if (is_new) {                                           \
  |  |  ------------------
  |  |  |  Branch (1040:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1041|      0|      extension->ptr.repeated_##LOWERCASE##_value =         \
  |  | 1042|      0|          Arena::Create<REPEATED_TYPE>(arena_);             \
  |  | 1043|      0|    }                                                       \
  |  | 1044|      0|    extension->ptr.repeated_##LOWERCASE##_value->MergeFrom( \
  |  | 1045|      0|        *other_extension.ptr.repeated_##LOWERCASE##_value); \
  |  | 1046|      0|    break;
  ------------------
 1055|      0|      HANDLE_TYPE(ENUM, enum, RepeatedField<int>);
  ------------------
  |  | 1039|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:                 \
  |  |  ------------------
  |  |  |  Branch (1039:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1040|      0|    if (is_new) {                                           \
  |  |  ------------------
  |  |  |  Branch (1040:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1041|      0|      extension->ptr.repeated_##LOWERCASE##_value =         \
  |  | 1042|      0|          Arena::Create<REPEATED_TYPE>(arena_);             \
  |  | 1043|      0|    }                                                       \
  |  | 1044|      0|    extension->ptr.repeated_##LOWERCASE##_value->MergeFrom( \
  |  | 1045|      0|        *other_extension.ptr.repeated_##LOWERCASE##_value); \
  |  | 1046|      0|    break;
  ------------------
 1056|      0|      HANDLE_TYPE(STRING, string, RepeatedPtrField<std::string>);
  ------------------
  |  | 1039|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:                 \
  |  |  ------------------
  |  |  |  Branch (1039:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1040|      0|    if (is_new) {                                           \
  |  |  ------------------
  |  |  |  Branch (1040:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1041|      0|      extension->ptr.repeated_##LOWERCASE##_value =         \
  |  | 1042|      0|          Arena::Create<REPEATED_TYPE>(arena_);             \
  |  | 1043|      0|    }                                                       \
  |  | 1044|      0|    extension->ptr.repeated_##LOWERCASE##_value->MergeFrom( \
  |  | 1045|      0|        *other_extension.ptr.repeated_##LOWERCASE##_value); \
  |  | 1046|      0|    break;
  ------------------
 1057|      0|      HANDLE_TYPE(MESSAGE, message, RepeatedPtrField<MessageLite>);
  ------------------
  |  | 1039|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:                 \
  |  |  ------------------
  |  |  |  Branch (1039:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1040|      0|    if (is_new) {                                           \
  |  |  ------------------
  |  |  |  Branch (1040:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1041|      0|      extension->ptr.repeated_##LOWERCASE##_value =         \
  |  | 1042|      0|          Arena::Create<REPEATED_TYPE>(arena_);             \
  |  | 1043|      0|    }                                                       \
  |  | 1044|      0|    extension->ptr.repeated_##LOWERCASE##_value->MergeFrom( \
  |  | 1045|      0|        *other_extension.ptr.repeated_##LOWERCASE##_value); \
  |  | 1046|      0|    break;
  ------------------
 1058|      0|#undef HANDLE_TYPE
 1059|      0|    }
 1060|    749|  } else {
 1061|    749|    if (!other_extension.is_cleared) {
  ------------------
  |  Branch (1061:9): [True: 749, False: 0]
  ------------------
 1062|    749|      switch (cpp_type(other_extension.type)) {
  ------------------
  |  Branch (1062:15): [True: 749, False: 0]
  ------------------
 1063|      0|#define HANDLE_TYPE(UPPERCASE, LOWERCASE, CAMELCASE)  \
 1064|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:           \
 1065|      0|    Set##CAMELCASE(number, other_extension.type,      \
 1066|      0|                   other_extension.LOWERCASE##_value, \
 1067|      0|                   other_extension.descriptor);       \
 1068|      0|    break;
 1069|       |
 1070|      0|        HANDLE_TYPE(INT32, int32_t, Int32);
  ------------------
  |  | 1064|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:           \
  |  |  ------------------
  |  |  |  Branch (1064:3): [True: 0, False: 749]
  |  |  ------------------
  |  | 1065|      0|    Set##CAMELCASE(number, other_extension.type,      \
  |  | 1066|      0|                   other_extension.LOWERCASE##_value, \
  |  | 1067|      0|                   other_extension.descriptor);       \
  |  | 1068|      0|    break;
  ------------------
 1071|      0|        HANDLE_TYPE(INT64, int64_t, Int64);
  ------------------
  |  | 1064|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:           \
  |  |  ------------------
  |  |  |  Branch (1064:3): [True: 0, False: 749]
  |  |  ------------------
  |  | 1065|      0|    Set##CAMELCASE(number, other_extension.type,      \
  |  | 1066|      0|                   other_extension.LOWERCASE##_value, \
  |  | 1067|      0|                   other_extension.descriptor);       \
  |  | 1068|      0|    break;
  ------------------
 1072|      0|        HANDLE_TYPE(UINT32, uint32_t, UInt32);
  ------------------
  |  | 1064|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:           \
  |  |  ------------------
  |  |  |  Branch (1064:3): [True: 0, False: 749]
  |  |  ------------------
  |  | 1065|      0|    Set##CAMELCASE(number, other_extension.type,      \
  |  | 1066|      0|                   other_extension.LOWERCASE##_value, \
  |  | 1067|      0|                   other_extension.descriptor);       \
  |  | 1068|      0|    break;
  ------------------
 1073|      0|        HANDLE_TYPE(UINT64, uint64_t, UInt64);
  ------------------
  |  | 1064|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:           \
  |  |  ------------------
  |  |  |  Branch (1064:3): [True: 0, False: 749]
  |  |  ------------------
  |  | 1065|      0|    Set##CAMELCASE(number, other_extension.type,      \
  |  | 1066|      0|                   other_extension.LOWERCASE##_value, \
  |  | 1067|      0|                   other_extension.descriptor);       \
  |  | 1068|      0|    break;
  ------------------
 1074|      0|        HANDLE_TYPE(FLOAT, float, Float);
  ------------------
  |  | 1064|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:           \
  |  |  ------------------
  |  |  |  Branch (1064:3): [True: 0, False: 749]
  |  |  ------------------
  |  | 1065|      0|    Set##CAMELCASE(number, other_extension.type,      \
  |  | 1066|      0|                   other_extension.LOWERCASE##_value, \
  |  | 1067|      0|                   other_extension.descriptor);       \
  |  | 1068|      0|    break;
  ------------------
 1075|      0|        HANDLE_TYPE(DOUBLE, double, Double);
  ------------------
  |  | 1064|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:           \
  |  |  ------------------
  |  |  |  Branch (1064:3): [True: 0, False: 749]
  |  |  ------------------
  |  | 1065|      0|    Set##CAMELCASE(number, other_extension.type,      \
  |  | 1066|      0|                   other_extension.LOWERCASE##_value, \
  |  | 1067|      0|                   other_extension.descriptor);       \
  |  | 1068|      0|    break;
  ------------------
 1076|      0|        HANDLE_TYPE(BOOL, bool, Bool);
  ------------------
  |  | 1064|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:           \
  |  |  ------------------
  |  |  |  Branch (1064:3): [True: 0, False: 749]
  |  |  ------------------
  |  | 1065|      0|    Set##CAMELCASE(number, other_extension.type,      \
  |  | 1066|      0|                   other_extension.LOWERCASE##_value, \
  |  | 1067|      0|                   other_extension.descriptor);       \
  |  | 1068|      0|    break;
  ------------------
 1077|      0|        HANDLE_TYPE(ENUM, enum, Enum);
  ------------------
  |  | 1064|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:           \
  |  |  ------------------
  |  |  |  Branch (1064:3): [True: 0, False: 749]
  |  |  ------------------
  |  | 1065|      0|    Set##CAMELCASE(number, other_extension.type,      \
  |  | 1066|      0|                   other_extension.LOWERCASE##_value, \
  |  | 1067|      0|                   other_extension.descriptor);       \
  |  | 1068|      0|    break;
  ------------------
 1078|      0|#undef HANDLE_TYPE
 1079|      0|        case WireFormatLite::CPPTYPE_STRING:
  ------------------
  |  Branch (1079:9): [True: 0, False: 749]
  ------------------
 1080|      0|          SetString(number, other_extension.type,
 1081|      0|                    *other_extension.ptr.string_value,
 1082|      0|                    other_extension.descriptor);
 1083|      0|          break;
 1084|    749|        case WireFormatLite::CPPTYPE_MESSAGE: {
  ------------------
  |  Branch (1084:9): [True: 749, False: 0]
  ------------------
 1085|    749|          Arena* const arena = arena_;
 1086|    749|          Extension* extension;
 1087|    749|          bool is_new =
 1088|    749|              MaybeNewExtension(number, other_extension.descriptor, &extension);
 1089|    749|          if (is_new) {
  ------------------
  |  Branch (1089:15): [True: 259, False: 490]
  ------------------
 1090|    259|            extension->type = other_extension.type;
 1091|    259|            extension->is_packed = other_extension.is_packed;
 1092|    259|            extension->is_repeated = false;
 1093|    259|            extension->is_pointer = true;
 1094|    259|            if (other_extension.is_lazy) {
  ------------------
  |  Branch (1094:17): [True: 0, False: 259]
  ------------------
 1095|      0|              extension->is_lazy = true;
 1096|      0|              extension->ptr.lazymessage_value =
 1097|      0|                  other_extension.ptr.lazymessage_value->New(arena);
 1098|      0|              extension->ptr.lazymessage_value->MergeFrom(
 1099|      0|                  GetPrototypeForLazyMessage(extendee, number),
 1100|      0|                  *other_extension.ptr.lazymessage_value, arena, other_arena);
 1101|    259|            } else {
 1102|    259|              extension->is_lazy = false;
 1103|    259|              extension->ptr.message_value =
 1104|    259|                  other_extension.ptr.message_value->New(arena);
 1105|    259|              extension->ptr.message_value->CheckTypeAndMergeFrom(
 1106|    259|                  *other_extension.ptr.message_value);
 1107|    259|            }
 1108|    490|          } else {
 1109|    490|            ABSL_DCHECK_EQ(extension->type, other_extension.type);
  ------------------
  |  |   74|    490|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|    490|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    490|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 490]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    490|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1110|    490|            ABSL_DCHECK_EQ(extension->is_packed, other_extension.is_packed);
  ------------------
  |  |   74|    490|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|    490|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    490|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 490]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    490|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1111|    490|            ABSL_DCHECK(!extension->is_repeated);
  ------------------
  |  |   47|    490|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|    490|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|    980|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    490|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|    980|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|    980|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 490, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    490|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 490]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|    490|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 490, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    980|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|    980|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1112|    490|            if (other_extension.is_lazy) {
  ------------------
  |  Branch (1112:17): [True: 0, False: 490]
  ------------------
 1113|      0|              if (extension->is_lazy) {
  ------------------
  |  Branch (1113:19): [True: 0, False: 0]
  ------------------
 1114|      0|                extension->ptr.lazymessage_value->MergeFrom(
 1115|      0|                    GetPrototypeForLazyMessage(extendee, number),
 1116|      0|                    *other_extension.ptr.lazymessage_value, arena, other_arena);
 1117|      0|              } else {
 1118|      0|                extension->ptr.message_value->CheckTypeAndMergeFrom(
 1119|      0|                    other_extension.ptr.lazymessage_value->GetMessage(
 1120|      0|                        *extension->ptr.message_value, other_arena));
 1121|      0|              }
 1122|    490|            } else {
 1123|    490|              if (extension->is_lazy) {
  ------------------
  |  Branch (1123:19): [True: 0, False: 490]
  ------------------
 1124|      0|                extension->ptr.lazymessage_value
 1125|      0|                    ->MutableMessage(*other_extension.ptr.message_value, arena)
 1126|      0|                    ->CheckTypeAndMergeFrom(*other_extension.ptr.message_value);
 1127|    490|              } else {
 1128|    490|                extension->ptr.message_value->CheckTypeAndMergeFrom(
 1129|    490|                    *other_extension.ptr.message_value);
 1130|    490|              }
 1131|    490|            }
 1132|    490|          }
 1133|    749|          extension->is_cleared = false;
 1134|    749|          break;
 1135|    749|        }
 1136|    749|      }
 1137|    749|    }
 1138|    749|  }
 1139|    749|}
_ZN6google8protobuf8internal12ExtensionSet12InternalSwapEPS2_:
 1157|    259|void ExtensionSet::InternalSwap(ExtensionSet* other) {
 1158|    259|  using std::swap;
 1159|    259|  swap(arena_, other->arena_);
 1160|    259|  swap(flat_capacity_, other->flat_capacity_);
 1161|    259|  swap(flat_size_, other->flat_size_);
 1162|    259|  swap(map_, other->map_);
 1163|    259|}
_ZNK6google8protobuf8internal12ExtensionSet13IsInitializedEPKNS0_11MessageLiteE:
 1227|     85|bool ExtensionSet::IsInitialized(const MessageLite* extendee) const {
 1228|       |  // Extensions are never required.  However, we need to check that all
 1229|       |  // embedded messages are initialized.
 1230|     85|  Arena* const arena = arena_;
 1231|     85|  if (PROTOBUF_PREDICT_FALSE(is_large())) {
  ------------------
  |  |  365|     85|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 85]
  |  |  |  Branch (365:54): [Folded, False: 85]
  |  |  |  Branch (365:63): [True: 0, False: 85]
  |  |  ------------------
  ------------------
 1232|      0|    for (const auto& kv : *map_.large) {
  ------------------
  |  Branch (1232:25): [True: 0, False: 0]
  ------------------
 1233|      0|      if (!kv.second.IsInitialized(this, extendee, kv.first, arena)) {
  ------------------
  |  Branch (1233:11): [True: 0, False: 0]
  ------------------
 1234|      0|        return false;
 1235|      0|      }
 1236|      0|    }
 1237|      0|    return true;
 1238|      0|  }
 1239|     93|  for (const KeyValue* it = flat_begin(); it != flat_end(); ++it) {
  ------------------
  |  Branch (1239:43): [True: 8, False: 85]
  ------------------
 1240|      8|    if (!it->second.IsInitialized(this, extendee, it->first, arena)) {
  ------------------
  |  Branch (1240:9): [True: 0, False: 8]
  ------------------
 1241|      0|      return false;
 1242|      0|    }
 1243|      8|  }
 1244|     85|  return true;
 1245|     85|}
_ZNK6google8protobuf8internal12ExtensionSet22_InternalSerializeImplEPKNS0_11MessageLiteEiiPhPNS0_2io19EpsCopyOutputStreamE:
 1280|    239|    uint8_t* target, io::EpsCopyOutputStream* stream) const {
 1281|    239|  if (PROTOBUF_PREDICT_FALSE(is_large())) {
  ------------------
  |  |  365|    239|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 239]
  |  |  |  Branch (365:54): [Folded, False: 239]
  |  |  |  Branch (365:63): [True: 0, False: 239]
  |  |  ------------------
  ------------------
 1282|      0|    const auto& end = map_.large->end();
 1283|      0|    for (auto it = map_.large->lower_bound(start_field_number);
 1284|      0|         it != end && it->first < end_field_number; ++it) {
  ------------------
  |  Branch (1284:10): [True: 0, False: 0]
  |  Branch (1284:23): [True: 0, False: 0]
  ------------------
 1285|      0|      target = it->second.InternalSerializeFieldWithCachedSizesToArray(
 1286|      0|          extendee, this, it->first, target, stream);
 1287|      0|    }
 1288|      0|    return target;
 1289|      0|  }
 1290|    239|  const KeyValue* end = flat_end();
 1291|    239|  const KeyValue* it = flat_begin();
 1292|    239|  while (it != end && it->first < start_field_number) ++it;
  ------------------
  |  Branch (1292:10): [True: 239, False: 0]
  |  Branch (1292:23): [True: 0, False: 239]
  ------------------
 1293|    478|  for (; it != end && it->first < end_field_number; ++it) {
  ------------------
  |  Branch (1293:10): [True: 239, False: 239]
  |  Branch (1293:23): [True: 239, False: 0]
  ------------------
 1294|    239|    target = it->second.InternalSerializeFieldWithCachedSizesToArray(
 1295|    239|        extendee, this, it->first, target, stream);
 1296|    239|  }
 1297|    239|  return target;
 1298|    239|}
_ZNK6google8protobuf8internal12ExtensionSet8ByteSizeEv:
 1314|    774|size_t ExtensionSet::ByteSize() const {
 1315|    774|  size_t total_size = 0;
 1316|    774|  ForEach(
 1317|    774|      [&total_size](int number, const Extension& ext) {
 1318|    774|        total_size += ext.ByteSize(number);
 1319|    774|      },
 1320|    774|      Prefetch{});
 1321|    774|  return total_size;
 1322|    774|}
_ZN6google8protobuf8internal12ExtensionSet17MaybeNewExtensionEiPKNS0_15FieldDescriptorEPPNS2_9ExtensionE:
 1329|    992|                                     Extension** result) {
 1330|    992|  bool extension_is_new = false;
 1331|    992|  std::tie(*result, extension_is_new) = Insert(number);
 1332|    992|  (*result)->descriptor = descriptor;
 1333|    992|  return extension_is_new;
 1334|    992|}
_ZNK6google8protobuf8internal12ExtensionSet9Extension8ByteSizeEi:
 1384|    474|size_t ExtensionSet::Extension::ByteSize(int number) const {
 1385|    474|  size_t result = 0;
 1386|       |
 1387|    474|  if (is_repeated) {
  ------------------
  |  Branch (1387:7): [True: 0, False: 474]
  ------------------
 1388|      0|    if (is_packed) {
  ------------------
  |  Branch (1388:9): [True: 0, False: 0]
  ------------------
 1389|      0|      switch (real_type(type)) {
  ------------------
  |  Branch (1389:15): [True: 0, False: 0]
  ------------------
 1390|      0|#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE)                     \
 1391|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
 1392|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
 1393|      0|      result += WireFormatLite::CAMELCASE##Size(                         \
 1394|      0|          ptr.repeated_##LOWERCASE##_value->Get(i));                     \
 1395|      0|    }                                                                    \
 1396|      0|    break
 1397|       |
 1398|      0|        HANDLE_TYPE(INT32, Int32, int32_t);
  ------------------
  |  | 1391|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1391:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1392|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1392:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1393|      0|      result += WireFormatLite::CAMELCASE##Size(                         \
  |  | 1394|      0|          ptr.repeated_##LOWERCASE##_value->Get(i));                     \
  |  | 1395|      0|    }                                                                    \
  |  | 1396|      0|    break
  ------------------
 1399|      0|        HANDLE_TYPE(INT64, Int64, int64_t);
  ------------------
  |  | 1391|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1391:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1392|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1392:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1393|      0|      result += WireFormatLite::CAMELCASE##Size(                         \
  |  | 1394|      0|          ptr.repeated_##LOWERCASE##_value->Get(i));                     \
  |  | 1395|      0|    }                                                                    \
  |  | 1396|      0|    break
  ------------------
 1400|      0|        HANDLE_TYPE(UINT32, UInt32, uint32_t);
  ------------------
  |  | 1391|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1391:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1392|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1392:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1393|      0|      result += WireFormatLite::CAMELCASE##Size(                         \
  |  | 1394|      0|          ptr.repeated_##LOWERCASE##_value->Get(i));                     \
  |  | 1395|      0|    }                                                                    \
  |  | 1396|      0|    break
  ------------------
 1401|      0|        HANDLE_TYPE(UINT64, UInt64, uint64_t);
  ------------------
  |  | 1391|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1391:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1392|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1392:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1393|      0|      result += WireFormatLite::CAMELCASE##Size(                         \
  |  | 1394|      0|          ptr.repeated_##LOWERCASE##_value->Get(i));                     \
  |  | 1395|      0|    }                                                                    \
  |  | 1396|      0|    break
  ------------------
 1402|      0|        HANDLE_TYPE(SINT32, SInt32, int32_t);
  ------------------
  |  | 1391|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1391:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1392|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1392:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1393|      0|      result += WireFormatLite::CAMELCASE##Size(                         \
  |  | 1394|      0|          ptr.repeated_##LOWERCASE##_value->Get(i));                     \
  |  | 1395|      0|    }                                                                    \
  |  | 1396|      0|    break
  ------------------
 1403|      0|        HANDLE_TYPE(SINT64, SInt64, int64_t);
  ------------------
  |  | 1391|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1391:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1392|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1392:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1393|      0|      result += WireFormatLite::CAMELCASE##Size(                         \
  |  | 1394|      0|          ptr.repeated_##LOWERCASE##_value->Get(i));                     \
  |  | 1395|      0|    }                                                                    \
  |  | 1396|      0|    break
  ------------------
 1404|      0|        HANDLE_TYPE(ENUM, Enum, enum);
  ------------------
  |  | 1391|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1391:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1392|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1392:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1393|      0|      result += WireFormatLite::CAMELCASE##Size(                         \
  |  | 1394|      0|          ptr.repeated_##LOWERCASE##_value->Get(i));                     \
  |  | 1395|      0|    }                                                                    \
  |  | 1396|      0|    break
  ------------------
 1405|      0|#undef HANDLE_TYPE
 1406|       |
 1407|       |        // Stuff with fixed size.
 1408|      0|#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE)                 \
 1409|      0|  case WireFormatLite::TYPE_##UPPERCASE:                             \
 1410|      0|    result += WireFormatLite::k##CAMELCASE##Size *                   \
 1411|      0|              FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
 1412|      0|    break
 1413|      0|        HANDLE_TYPE(FIXED32, Fixed32, uint32_t);
  ------------------
  |  | 1409|      0|  case WireFormatLite::TYPE_##UPPERCASE:                             \
  |  |  ------------------
  |  |  |  Branch (1409:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1410|      0|    result += WireFormatLite::k##CAMELCASE##Size *                   \
  |  | 1411|      0|              FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1412|      0|    break
  ------------------
 1414|      0|        HANDLE_TYPE(FIXED64, Fixed64, uint64_t);
  ------------------
  |  | 1409|      0|  case WireFormatLite::TYPE_##UPPERCASE:                             \
  |  |  ------------------
  |  |  |  Branch (1409:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1410|      0|    result += WireFormatLite::k##CAMELCASE##Size *                   \
  |  | 1411|      0|              FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1412|      0|    break
  ------------------
 1415|      0|        HANDLE_TYPE(SFIXED32, SFixed32, int32_t);
  ------------------
  |  | 1409|      0|  case WireFormatLite::TYPE_##UPPERCASE:                             \
  |  |  ------------------
  |  |  |  Branch (1409:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1410|      0|    result += WireFormatLite::k##CAMELCASE##Size *                   \
  |  | 1411|      0|              FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1412|      0|    break
  ------------------
 1416|      0|        HANDLE_TYPE(SFIXED64, SFixed64, int64_t);
  ------------------
  |  | 1409|      0|  case WireFormatLite::TYPE_##UPPERCASE:                             \
  |  |  ------------------
  |  |  |  Branch (1409:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1410|      0|    result += WireFormatLite::k##CAMELCASE##Size *                   \
  |  | 1411|      0|              FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1412|      0|    break
  ------------------
 1417|      0|        HANDLE_TYPE(FLOAT, Float, float);
  ------------------
  |  | 1409|      0|  case WireFormatLite::TYPE_##UPPERCASE:                             \
  |  |  ------------------
  |  |  |  Branch (1409:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1410|      0|    result += WireFormatLite::k##CAMELCASE##Size *                   \
  |  | 1411|      0|              FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1412|      0|    break
  ------------------
 1418|      0|        HANDLE_TYPE(DOUBLE, Double, double);
  ------------------
  |  | 1409|      0|  case WireFormatLite::TYPE_##UPPERCASE:                             \
  |  |  ------------------
  |  |  |  Branch (1409:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1410|      0|    result += WireFormatLite::k##CAMELCASE##Size *                   \
  |  | 1411|      0|              FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1412|      0|    break
  ------------------
 1419|      0|        HANDLE_TYPE(BOOL, Bool, bool);
  ------------------
  |  | 1409|      0|  case WireFormatLite::TYPE_##UPPERCASE:                             \
  |  |  ------------------
  |  |  |  Branch (1409:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1410|      0|    result += WireFormatLite::k##CAMELCASE##Size *                   \
  |  | 1411|      0|              FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1412|      0|    break
  ------------------
 1420|      0|#undef HANDLE_TYPE
 1421|       |
 1422|      0|        case WireFormatLite::TYPE_STRING:
  ------------------
  |  Branch (1422:9): [True: 0, False: 0]
  ------------------
 1423|      0|        case WireFormatLite::TYPE_BYTES:
  ------------------
  |  Branch (1423:9): [True: 0, False: 0]
  ------------------
 1424|      0|        case WireFormatLite::TYPE_GROUP:
  ------------------
  |  Branch (1424:9): [True: 0, False: 0]
  ------------------
 1425|      0|        case WireFormatLite::TYPE_MESSAGE:
  ------------------
  |  Branch (1425:9): [True: 0, False: 0]
  ------------------
 1426|      0|          ABSL_LOG(FATAL) << "Non-primitive types can't be packed.";
  ------------------
  |  |   38|      0|#define ABSL_LOG(severity) ABSL_LOG_INTERNAL_LOG_IMPL(_##severity)
  |  |  ------------------
  |  |  |  |   25|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, true) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   26|      0|      ABSL_LOGGING_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1427|      0|          break;
 1428|      0|      }
 1429|       |
 1430|      0|      cached_size.set(ToCachedSize(result));
 1431|      0|      if (result > 0) {
  ------------------
  |  Branch (1431:11): [True: 0, False: 0]
  ------------------
 1432|      0|        result += io::CodedOutputStream::VarintSize32(result);
 1433|      0|        result += io::CodedOutputStream::VarintSize32(WireFormatLite::MakeTag(
 1434|      0|            number, WireFormatLite::WIRETYPE_LENGTH_DELIMITED));
 1435|      0|      }
 1436|      0|    } else {
 1437|      0|      size_t tag_size = WireFormatLite::TagSize(number, real_type(type));
 1438|       |
 1439|      0|      switch (real_type(type)) {
  ------------------
  |  Branch (1439:15): [True: 0, False: 0]
  ------------------
 1440|      0|#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE)                      \
 1441|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                  \
 1442|      0|    result +=                                                             \
 1443|      0|        tag_size * FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
 1444|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) {  \
 1445|      0|      result += WireFormatLite::CAMELCASE##Size(                          \
 1446|      0|          ptr.repeated_##LOWERCASE##_value->Get(i));                      \
 1447|      0|    }                                                                     \
 1448|      0|    break
 1449|       |
 1450|      0|        HANDLE_TYPE(INT32, Int32, int32_t);
  ------------------
  |  | 1441|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                  \
  |  |  ------------------
  |  |  |  Branch (1441:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1442|      0|    result +=                                                             \
  |  | 1443|      0|        tag_size * FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1444|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) {  \
  |  |  ------------------
  |  |  |  Branch (1444:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1445|      0|      result += WireFormatLite::CAMELCASE##Size(                          \
  |  | 1446|      0|          ptr.repeated_##LOWERCASE##_value->Get(i));                      \
  |  | 1447|      0|    }                                                                     \
  |  | 1448|      0|    break
  ------------------
 1451|      0|        HANDLE_TYPE(INT64, Int64, int64_t);
  ------------------
  |  | 1441|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                  \
  |  |  ------------------
  |  |  |  Branch (1441:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1442|      0|    result +=                                                             \
  |  | 1443|      0|        tag_size * FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1444|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) {  \
  |  |  ------------------
  |  |  |  Branch (1444:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1445|      0|      result += WireFormatLite::CAMELCASE##Size(                          \
  |  | 1446|      0|          ptr.repeated_##LOWERCASE##_value->Get(i));                      \
  |  | 1447|      0|    }                                                                     \
  |  | 1448|      0|    break
  ------------------
 1452|      0|        HANDLE_TYPE(UINT32, UInt32, uint32_t);
  ------------------
  |  | 1441|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                  \
  |  |  ------------------
  |  |  |  Branch (1441:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1442|      0|    result +=                                                             \
  |  | 1443|      0|        tag_size * FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1444|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) {  \
  |  |  ------------------
  |  |  |  Branch (1444:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1445|      0|      result += WireFormatLite::CAMELCASE##Size(                          \
  |  | 1446|      0|          ptr.repeated_##LOWERCASE##_value->Get(i));                      \
  |  | 1447|      0|    }                                                                     \
  |  | 1448|      0|    break
  ------------------
 1453|      0|        HANDLE_TYPE(UINT64, UInt64, uint64_t);
  ------------------
  |  | 1441|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                  \
  |  |  ------------------
  |  |  |  Branch (1441:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1442|      0|    result +=                                                             \
  |  | 1443|      0|        tag_size * FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1444|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) {  \
  |  |  ------------------
  |  |  |  Branch (1444:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1445|      0|      result += WireFormatLite::CAMELCASE##Size(                          \
  |  | 1446|      0|          ptr.repeated_##LOWERCASE##_value->Get(i));                      \
  |  | 1447|      0|    }                                                                     \
  |  | 1448|      0|    break
  ------------------
 1454|      0|        HANDLE_TYPE(SINT32, SInt32, int32_t);
  ------------------
  |  | 1441|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                  \
  |  |  ------------------
  |  |  |  Branch (1441:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1442|      0|    result +=                                                             \
  |  | 1443|      0|        tag_size * FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1444|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) {  \
  |  |  ------------------
  |  |  |  Branch (1444:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1445|      0|      result += WireFormatLite::CAMELCASE##Size(                          \
  |  | 1446|      0|          ptr.repeated_##LOWERCASE##_value->Get(i));                      \
  |  | 1447|      0|    }                                                                     \
  |  | 1448|      0|    break
  ------------------
 1455|      0|        HANDLE_TYPE(SINT64, SInt64, int64_t);
  ------------------
  |  | 1441|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                  \
  |  |  ------------------
  |  |  |  Branch (1441:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1442|      0|    result +=                                                             \
  |  | 1443|      0|        tag_size * FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1444|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) {  \
  |  |  ------------------
  |  |  |  Branch (1444:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1445|      0|      result += WireFormatLite::CAMELCASE##Size(                          \
  |  | 1446|      0|          ptr.repeated_##LOWERCASE##_value->Get(i));                      \
  |  | 1447|      0|    }                                                                     \
  |  | 1448|      0|    break
  ------------------
 1456|      0|        HANDLE_TYPE(STRING, String, string);
  ------------------
  |  | 1441|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                  \
  |  |  ------------------
  |  |  |  Branch (1441:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1442|      0|    result +=                                                             \
  |  | 1443|      0|        tag_size * FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1444|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) {  \
  |  |  ------------------
  |  |  |  Branch (1444:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1445|      0|      result += WireFormatLite::CAMELCASE##Size(                          \
  |  | 1446|      0|          ptr.repeated_##LOWERCASE##_value->Get(i));                      \
  |  | 1447|      0|    }                                                                     \
  |  | 1448|      0|    break
  ------------------
 1457|      0|        HANDLE_TYPE(BYTES, Bytes, string);
  ------------------
  |  | 1441|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                  \
  |  |  ------------------
  |  |  |  Branch (1441:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1442|      0|    result +=                                                             \
  |  | 1443|      0|        tag_size * FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1444|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) {  \
  |  |  ------------------
  |  |  |  Branch (1444:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1445|      0|      result += WireFormatLite::CAMELCASE##Size(                          \
  |  | 1446|      0|          ptr.repeated_##LOWERCASE##_value->Get(i));                      \
  |  | 1447|      0|    }                                                                     \
  |  | 1448|      0|    break
  ------------------
 1458|      0|        HANDLE_TYPE(ENUM, Enum, enum);
  ------------------
  |  | 1441|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                  \
  |  |  ------------------
  |  |  |  Branch (1441:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1442|      0|    result +=                                                             \
  |  | 1443|      0|        tag_size * FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1444|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) {  \
  |  |  ------------------
  |  |  |  Branch (1444:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1445|      0|      result += WireFormatLite::CAMELCASE##Size(                          \
  |  | 1446|      0|          ptr.repeated_##LOWERCASE##_value->Get(i));                      \
  |  | 1447|      0|    }                                                                     \
  |  | 1448|      0|    break
  ------------------
 1459|      0|        HANDLE_TYPE(GROUP, Group, message);
  ------------------
  |  | 1441|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                  \
  |  |  ------------------
  |  |  |  Branch (1441:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1442|      0|    result +=                                                             \
  |  | 1443|      0|        tag_size * FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1444|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) {  \
  |  |  ------------------
  |  |  |  Branch (1444:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1445|      0|      result += WireFormatLite::CAMELCASE##Size(                          \
  |  | 1446|      0|          ptr.repeated_##LOWERCASE##_value->Get(i));                      \
  |  | 1447|      0|    }                                                                     \
  |  | 1448|      0|    break
  ------------------
 1460|      0|        HANDLE_TYPE(MESSAGE, Message, message);
  ------------------
  |  | 1441|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                  \
  |  |  ------------------
  |  |  |  Branch (1441:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1442|      0|    result +=                                                             \
  |  | 1443|      0|        tag_size * FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1444|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) {  \
  |  |  ------------------
  |  |  |  Branch (1444:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1445|      0|      result += WireFormatLite::CAMELCASE##Size(                          \
  |  | 1446|      0|          ptr.repeated_##LOWERCASE##_value->Get(i));                      \
  |  | 1447|      0|    }                                                                     \
  |  | 1448|      0|    break
  ------------------
 1461|      0|#undef HANDLE_TYPE
 1462|       |
 1463|       |        // Stuff with fixed size.
 1464|      0|#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE)                 \
 1465|      0|  case WireFormatLite::TYPE_##UPPERCASE:                             \
 1466|      0|    result += (tag_size + WireFormatLite::k##CAMELCASE##Size) *      \
 1467|      0|              FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
 1468|      0|    break
 1469|      0|        HANDLE_TYPE(FIXED32, Fixed32, uint32_t);
  ------------------
  |  | 1465|      0|  case WireFormatLite::TYPE_##UPPERCASE:                             \
  |  |  ------------------
  |  |  |  Branch (1465:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1466|      0|    result += (tag_size + WireFormatLite::k##CAMELCASE##Size) *      \
  |  | 1467|      0|              FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1468|      0|    break
  ------------------
 1470|      0|        HANDLE_TYPE(FIXED64, Fixed64, uint64_t);
  ------------------
  |  | 1465|      0|  case WireFormatLite::TYPE_##UPPERCASE:                             \
  |  |  ------------------
  |  |  |  Branch (1465:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1466|      0|    result += (tag_size + WireFormatLite::k##CAMELCASE##Size) *      \
  |  | 1467|      0|              FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1468|      0|    break
  ------------------
 1471|      0|        HANDLE_TYPE(SFIXED32, SFixed32, int32_t);
  ------------------
  |  | 1465|      0|  case WireFormatLite::TYPE_##UPPERCASE:                             \
  |  |  ------------------
  |  |  |  Branch (1465:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1466|      0|    result += (tag_size + WireFormatLite::k##CAMELCASE##Size) *      \
  |  | 1467|      0|              FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1468|      0|    break
  ------------------
 1472|      0|        HANDLE_TYPE(SFIXED64, SFixed64, int64_t);
  ------------------
  |  | 1465|      0|  case WireFormatLite::TYPE_##UPPERCASE:                             \
  |  |  ------------------
  |  |  |  Branch (1465:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1466|      0|    result += (tag_size + WireFormatLite::k##CAMELCASE##Size) *      \
  |  | 1467|      0|              FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1468|      0|    break
  ------------------
 1473|      0|        HANDLE_TYPE(FLOAT, Float, float);
  ------------------
  |  | 1465|      0|  case WireFormatLite::TYPE_##UPPERCASE:                             \
  |  |  ------------------
  |  |  |  Branch (1465:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1466|      0|    result += (tag_size + WireFormatLite::k##CAMELCASE##Size) *      \
  |  | 1467|      0|              FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1468|      0|    break
  ------------------
 1474|      0|        HANDLE_TYPE(DOUBLE, Double, double);
  ------------------
  |  | 1465|      0|  case WireFormatLite::TYPE_##UPPERCASE:                             \
  |  |  ------------------
  |  |  |  Branch (1465:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1466|      0|    result += (tag_size + WireFormatLite::k##CAMELCASE##Size) *      \
  |  | 1467|      0|              FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1468|      0|    break
  ------------------
 1475|      0|        HANDLE_TYPE(BOOL, Bool, bool);
  ------------------
  |  | 1465|      0|  case WireFormatLite::TYPE_##UPPERCASE:                             \
  |  |  ------------------
  |  |  |  Branch (1465:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1466|      0|    result += (tag_size + WireFormatLite::k##CAMELCASE##Size) *      \
  |  | 1467|      0|              FromIntSize(ptr.repeated_##LOWERCASE##_value->size()); \
  |  | 1468|      0|    break
  ------------------
 1476|      0|#undef HANDLE_TYPE
 1477|      0|      }
 1478|      0|    }
 1479|    474|  } else if (!is_cleared) {
  ------------------
  |  Branch (1479:14): [True: 474, False: 0]
  ------------------
 1480|    474|    result += WireFormatLite::TagSize(number, real_type(type));
 1481|    474|    switch (real_type(type)) {
  ------------------
  |  Branch (1481:13): [True: 474, False: 0]
  ------------------
 1482|      0|#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE)      \
 1483|      0|  case WireFormatLite::TYPE_##UPPERCASE:                  \
 1484|      0|    result += WireFormatLite::CAMELCASE##Size(LOWERCASE); \
 1485|      0|    break
 1486|       |
 1487|      0|      HANDLE_TYPE(INT32, Int32, int32_t_value);
  ------------------
  |  | 1483|      0|  case WireFormatLite::TYPE_##UPPERCASE:                  \
  |  |  ------------------
  |  |  |  Branch (1483:3): [True: 0, False: 474]
  |  |  ------------------
  |  | 1484|      0|    result += WireFormatLite::CAMELCASE##Size(LOWERCASE); \
  |  | 1485|      0|    break
  ------------------
 1488|      0|      HANDLE_TYPE(INT64, Int64, int64_t_value);
  ------------------
  |  | 1483|      0|  case WireFormatLite::TYPE_##UPPERCASE:                  \
  |  |  ------------------
  |  |  |  Branch (1483:3): [True: 0, False: 474]
  |  |  ------------------
  |  | 1484|      0|    result += WireFormatLite::CAMELCASE##Size(LOWERCASE); \
  |  | 1485|      0|    break
  ------------------
 1489|      0|      HANDLE_TYPE(UINT32, UInt32, uint32_t_value);
  ------------------
  |  | 1483|      0|  case WireFormatLite::TYPE_##UPPERCASE:                  \
  |  |  ------------------
  |  |  |  Branch (1483:3): [True: 0, False: 474]
  |  |  ------------------
  |  | 1484|      0|    result += WireFormatLite::CAMELCASE##Size(LOWERCASE); \
  |  | 1485|      0|    break
  ------------------
 1490|      0|      HANDLE_TYPE(UINT64, UInt64, uint64_t_value);
  ------------------
  |  | 1483|      0|  case WireFormatLite::TYPE_##UPPERCASE:                  \
  |  |  ------------------
  |  |  |  Branch (1483:3): [True: 0, False: 474]
  |  |  ------------------
  |  | 1484|      0|    result += WireFormatLite::CAMELCASE##Size(LOWERCASE); \
  |  | 1485|      0|    break
  ------------------
 1491|      0|      HANDLE_TYPE(SINT32, SInt32, int32_t_value);
  ------------------
  |  | 1483|      0|  case WireFormatLite::TYPE_##UPPERCASE:                  \
  |  |  ------------------
  |  |  |  Branch (1483:3): [True: 0, False: 474]
  |  |  ------------------
  |  | 1484|      0|    result += WireFormatLite::CAMELCASE##Size(LOWERCASE); \
  |  | 1485|      0|    break
  ------------------
 1492|      0|      HANDLE_TYPE(SINT64, SInt64, int64_t_value);
  ------------------
  |  | 1483|      0|  case WireFormatLite::TYPE_##UPPERCASE:                  \
  |  |  ------------------
  |  |  |  Branch (1483:3): [True: 0, False: 474]
  |  |  ------------------
  |  | 1484|      0|    result += WireFormatLite::CAMELCASE##Size(LOWERCASE); \
  |  | 1485|      0|    break
  ------------------
 1493|      0|      HANDLE_TYPE(STRING, String, *ptr.string_value);
  ------------------
  |  | 1483|      0|  case WireFormatLite::TYPE_##UPPERCASE:                  \
  |  |  ------------------
  |  |  |  Branch (1483:3): [True: 0, False: 474]
  |  |  ------------------
  |  | 1484|      0|    result += WireFormatLite::CAMELCASE##Size(LOWERCASE); \
  |  | 1485|      0|    break
  ------------------
 1494|      0|      HANDLE_TYPE(BYTES, Bytes, *ptr.string_value);
  ------------------
  |  | 1483|      0|  case WireFormatLite::TYPE_##UPPERCASE:                  \
  |  |  ------------------
  |  |  |  Branch (1483:3): [True: 0, False: 474]
  |  |  ------------------
  |  | 1484|      0|    result += WireFormatLite::CAMELCASE##Size(LOWERCASE); \
  |  | 1485|      0|    break
  ------------------
 1495|      0|      HANDLE_TYPE(ENUM, Enum, enum_value);
  ------------------
  |  | 1483|      0|  case WireFormatLite::TYPE_##UPPERCASE:                  \
  |  |  ------------------
  |  |  |  Branch (1483:3): [True: 0, False: 474]
  |  |  ------------------
  |  | 1484|      0|    result += WireFormatLite::CAMELCASE##Size(LOWERCASE); \
  |  | 1485|      0|    break
  ------------------
 1496|      0|      HANDLE_TYPE(GROUP, Group, *ptr.message_value);
  ------------------
  |  | 1483|      0|  case WireFormatLite::TYPE_##UPPERCASE:                  \
  |  |  ------------------
  |  |  |  Branch (1483:3): [True: 0, False: 474]
  |  |  ------------------
  |  | 1484|      0|    result += WireFormatLite::CAMELCASE##Size(LOWERCASE); \
  |  | 1485|      0|    break
  ------------------
 1497|      0|#undef HANDLE_TYPE
 1498|    474|      case WireFormatLite::TYPE_MESSAGE: {
  ------------------
  |  Branch (1498:7): [True: 474, False: 0]
  ------------------
 1499|    474|        result += WireFormatLite::LengthDelimitedSize(
 1500|    474|            is_lazy ? ptr.lazymessage_value->ByteSizeLong()
  ------------------
  |  Branch (1500:13): [True: 0, False: 474]
  ------------------
 1501|    474|                    : ptr.message_value->ByteSizeLong());
 1502|    474|        break;
 1503|      0|      }
 1504|       |
 1505|       |      // Stuff with fixed size.
 1506|      0|#define HANDLE_TYPE(UPPERCASE, CAMELCASE)         \
 1507|      0|  case WireFormatLite::TYPE_##UPPERCASE:          \
 1508|      0|    result += WireFormatLite::k##CAMELCASE##Size; \
 1509|      0|    break
 1510|      0|        HANDLE_TYPE(FIXED32, Fixed32);
  ------------------
  |  | 1507|      0|  case WireFormatLite::TYPE_##UPPERCASE:          \
  |  |  ------------------
  |  |  |  Branch (1507:3): [True: 0, False: 474]
  |  |  ------------------
  |  | 1508|      0|    result += WireFormatLite::k##CAMELCASE##Size; \
  |  | 1509|      0|    break
  ------------------
 1511|      0|        HANDLE_TYPE(FIXED64, Fixed64);
  ------------------
  |  | 1507|      0|  case WireFormatLite::TYPE_##UPPERCASE:          \
  |  |  ------------------
  |  |  |  Branch (1507:3): [True: 0, False: 474]
  |  |  ------------------
  |  | 1508|      0|    result += WireFormatLite::k##CAMELCASE##Size; \
  |  | 1509|      0|    break
  ------------------
 1512|      0|        HANDLE_TYPE(SFIXED32, SFixed32);
  ------------------
  |  | 1507|      0|  case WireFormatLite::TYPE_##UPPERCASE:          \
  |  |  ------------------
  |  |  |  Branch (1507:3): [True: 0, False: 474]
  |  |  ------------------
  |  | 1508|      0|    result += WireFormatLite::k##CAMELCASE##Size; \
  |  | 1509|      0|    break
  ------------------
 1513|      0|        HANDLE_TYPE(SFIXED64, SFixed64);
  ------------------
  |  | 1507|      0|  case WireFormatLite::TYPE_##UPPERCASE:          \
  |  |  ------------------
  |  |  |  Branch (1507:3): [True: 0, False: 474]
  |  |  ------------------
  |  | 1508|      0|    result += WireFormatLite::k##CAMELCASE##Size; \
  |  | 1509|      0|    break
  ------------------
 1514|      0|        HANDLE_TYPE(FLOAT, Float);
  ------------------
  |  | 1507|      0|  case WireFormatLite::TYPE_##UPPERCASE:          \
  |  |  ------------------
  |  |  |  Branch (1507:3): [True: 0, False: 474]
  |  |  ------------------
  |  | 1508|      0|    result += WireFormatLite::k##CAMELCASE##Size; \
  |  | 1509|      0|    break
  ------------------
 1515|      0|        HANDLE_TYPE(DOUBLE, Double);
  ------------------
  |  | 1507|      0|  case WireFormatLite::TYPE_##UPPERCASE:          \
  |  |  ------------------
  |  |  |  Branch (1507:3): [True: 0, False: 474]
  |  |  ------------------
  |  | 1508|      0|    result += WireFormatLite::k##CAMELCASE##Size; \
  |  | 1509|      0|    break
  ------------------
 1516|    474|        HANDLE_TYPE(BOOL, Bool);
  ------------------
  |  | 1507|      0|  case WireFormatLite::TYPE_##UPPERCASE:          \
  |  |  ------------------
  |  |  |  Branch (1507:3): [True: 0, False: 474]
  |  |  ------------------
  |  | 1508|      0|    result += WireFormatLite::k##CAMELCASE##Size; \
  |  | 1509|      0|    break
  ------------------
 1517|    474|#undef HANDLE_TYPE
 1518|    474|    }
 1519|    474|  }
 1520|       |
 1521|    474|  return result;
 1522|    474|}
_ZN6google8protobuf8internal12ExtensionSet9Extension4FreeEv:
 1550|    490|void ExtensionSet::Extension::Free() {
 1551|    490|  if (is_repeated) {
  ------------------
  |  Branch (1551:7): [True: 0, False: 490]
  ------------------
 1552|      0|    switch (cpp_type(type)) {
  ------------------
  |  Branch (1552:13): [True: 0, False: 0]
  ------------------
 1553|      0|#define HANDLE_TYPE(UPPERCASE, LOWERCASE)    \
 1554|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:  \
 1555|      0|    delete ptr.repeated_##LOWERCASE##_value; \
 1556|      0|    break
 1557|       |
 1558|      0|      HANDLE_TYPE(INT32, int32_t);
  ------------------
  |  | 1554|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:  \
  |  |  ------------------
  |  |  |  Branch (1554:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1555|      0|    delete ptr.repeated_##LOWERCASE##_value; \
  |  | 1556|      0|    break
  ------------------
 1559|      0|      HANDLE_TYPE(INT64, int64_t);
  ------------------
  |  | 1554|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:  \
  |  |  ------------------
  |  |  |  Branch (1554:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1555|      0|    delete ptr.repeated_##LOWERCASE##_value; \
  |  | 1556|      0|    break
  ------------------
 1560|      0|      HANDLE_TYPE(UINT32, uint32_t);
  ------------------
  |  | 1554|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:  \
  |  |  ------------------
  |  |  |  Branch (1554:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1555|      0|    delete ptr.repeated_##LOWERCASE##_value; \
  |  | 1556|      0|    break
  ------------------
 1561|      0|      HANDLE_TYPE(UINT64, uint64_t);
  ------------------
  |  | 1554|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:  \
  |  |  ------------------
  |  |  |  Branch (1554:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1555|      0|    delete ptr.repeated_##LOWERCASE##_value; \
  |  | 1556|      0|    break
  ------------------
 1562|      0|      HANDLE_TYPE(FLOAT, float);
  ------------------
  |  | 1554|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:  \
  |  |  ------------------
  |  |  |  Branch (1554:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1555|      0|    delete ptr.repeated_##LOWERCASE##_value; \
  |  | 1556|      0|    break
  ------------------
 1563|      0|      HANDLE_TYPE(DOUBLE, double);
  ------------------
  |  | 1554|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:  \
  |  |  ------------------
  |  |  |  Branch (1554:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1555|      0|    delete ptr.repeated_##LOWERCASE##_value; \
  |  | 1556|      0|    break
  ------------------
 1564|      0|      HANDLE_TYPE(BOOL, bool);
  ------------------
  |  | 1554|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:  \
  |  |  ------------------
  |  |  |  Branch (1554:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1555|      0|    delete ptr.repeated_##LOWERCASE##_value; \
  |  | 1556|      0|    break
  ------------------
 1565|      0|      HANDLE_TYPE(ENUM, enum);
  ------------------
  |  | 1554|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:  \
  |  |  ------------------
  |  |  |  Branch (1554:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1555|      0|    delete ptr.repeated_##LOWERCASE##_value; \
  |  | 1556|      0|    break
  ------------------
 1566|      0|      HANDLE_TYPE(STRING, string);
  ------------------
  |  | 1554|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:  \
  |  |  ------------------
  |  |  |  Branch (1554:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1555|      0|    delete ptr.repeated_##LOWERCASE##_value; \
  |  | 1556|      0|    break
  ------------------
 1567|      0|      HANDLE_TYPE(MESSAGE, message);
  ------------------
  |  | 1554|      0|  case WireFormatLite::CPPTYPE_##UPPERCASE:  \
  |  |  ------------------
  |  |  |  Branch (1554:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1555|      0|    delete ptr.repeated_##LOWERCASE##_value; \
  |  | 1556|      0|    break
  ------------------
 1568|      0|#undef HANDLE_TYPE
 1569|      0|    }
 1570|    490|  } else {
 1571|    490|    switch (cpp_type(type)) {
 1572|      0|      case WireFormatLite::CPPTYPE_STRING:
  ------------------
  |  Branch (1572:7): [True: 0, False: 490]
  ------------------
 1573|      0|        delete ptr.string_value;
 1574|      0|        break;
 1575|    490|      case WireFormatLite::CPPTYPE_MESSAGE:
  ------------------
  |  Branch (1575:7): [True: 490, False: 0]
  ------------------
 1576|    490|        if (is_lazy) {
  ------------------
  |  Branch (1576:13): [True: 0, False: 490]
  ------------------
 1577|      0|          delete ptr.lazymessage_value;
 1578|    490|        } else {
 1579|    490|          delete ptr.message_value;
 1580|    490|        }
 1581|    490|        break;
 1582|      0|      default:
  ------------------
  |  Branch (1582:7): [True: 0, False: 490]
  ------------------
 1583|      0|        break;
 1584|    490|    }
 1585|    490|  }
 1586|    490|}
_ZNK6google8protobuf8internal12ExtensionSet9Extension13IsInitializedEPKS2_PKNS0_11MessageLiteEiPNS0_5ArenaE:
 1593|      8|                                            int number, Arena* arena) const {
 1594|      8|  if (cpp_type(type) != WireFormatLite::CPPTYPE_MESSAGE) return true;
  ------------------
  |  Branch (1594:7): [True: 0, False: 8]
  ------------------
 1595|       |
 1596|      8|  if (is_repeated) {
  ------------------
  |  Branch (1596:7): [True: 0, False: 8]
  ------------------
 1597|      0|    for (int i = 0; i < ptr.repeated_message_value->size(); i++) {
  ------------------
  |  Branch (1597:21): [True: 0, False: 0]
  ------------------
 1598|      0|      if (!ptr.repeated_message_value->Get(i).IsInitialized()) {
  ------------------
  |  Branch (1598:11): [True: 0, False: 0]
  ------------------
 1599|      0|        return false;
 1600|      0|      }
 1601|      0|    }
 1602|      0|    return true;
 1603|      0|  }
 1604|       |
 1605|      8|  if (is_cleared) return true;
  ------------------
  |  Branch (1605:7): [True: 0, False: 8]
  ------------------
 1606|       |
 1607|      8|  if (!is_lazy) return ptr.message_value->IsInitialized();
  ------------------
  |  Branch (1607:7): [True: 8, False: 0]
  ------------------
 1608|       |
 1609|      0|  const MessageLite* prototype =
 1610|      0|      ext_set->GetPrototypeForLazyMessage(extendee, number);
 1611|      0|  ABSL_DCHECK_NE(prototype, nullptr)
  ------------------
  |  |   76|      0|  ABSL_LOG_INTERNAL_DCHECK_NE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   88|      0|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1612|      0|      << "extendee: " << extendee->GetTypeName() << "; number: " << number;
 1613|      0|  return ptr.lazymessage_value->IsInitialized(prototype, arena);
 1614|      8|}
_ZNK6google8protobuf8internal12ExtensionSet10FindOrNullEi:
 1619|    235|const ExtensionSet::Extension* ExtensionSet::FindOrNull(int key) const {
 1620|    235|  if (flat_size_ == 0) {
  ------------------
  |  Branch (1620:7): [True: 0, False: 235]
  ------------------
 1621|      0|    return nullptr;
 1622|    235|  } else if (PROTOBUF_PREDICT_TRUE(!is_large())) {
  ------------------
  |  |  364|    235|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 235, False: 0]
  |  |  |  Branch (364:53): [Folded, False: 235]
  |  |  |  Branch (364:62): [True: 235, False: 0]
  |  |  ------------------
  ------------------
 1623|    235|    for (auto it = flat_begin(), end = flat_end();
 1624|    235|         it != end && it->first <= key; ++it) {
  ------------------
  |  Branch (1624:10): [True: 235, False: 0]
  |  Branch (1624:23): [True: 235, False: 0]
  ------------------
 1625|    235|      if (it->first == key) return &it->second;
  ------------------
  |  Branch (1625:11): [True: 235, False: 0]
  ------------------
 1626|    235|    }
 1627|      0|    return nullptr;
 1628|    235|  } else {
 1629|      0|    return FindOrNullInLargeMap(key);
 1630|      0|  }
 1631|    235|}
_ZN6google8protobuf8internal12ExtensionSet6InsertEi:
 1654|  1.23k|std::pair<ExtensionSet::Extension*, bool> ExtensionSet::Insert(int key) {
 1655|  1.23k|  if (PROTOBUF_PREDICT_FALSE(is_large())) {
  ------------------
  |  |  365|  1.23k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 1.23k]
  |  |  |  Branch (365:54): [Folded, False: 1.23k]
  |  |  |  Branch (365:63): [True: 0, False: 1.23k]
  |  |  ------------------
  ------------------
 1656|      0|    auto maybe = map_.large->insert({key, Extension()});
 1657|      0|    return {&maybe.first->second, maybe.second};
 1658|      0|  }
 1659|  1.23k|  KeyValue* end = flat_end();
 1660|  1.23k|  KeyValue* it = flat_begin();
 1661|  1.23k|  for (; it != end && it->first <= key; ++it) {
  ------------------
  |  Branch (1661:10): [True: 490, False: 745]
  |  Branch (1661:23): [True: 490, False: 0]
  ------------------
 1662|    490|    if (it->first == key) return {&it->second, false};
  ------------------
  |  Branch (1662:9): [True: 490, False: 0]
  ------------------
 1663|    490|  }
 1664|    745|  if (flat_size_ < flat_capacity_) {
  ------------------
  |  Branch (1664:7): [True: 502, False: 243]
  ------------------
 1665|    502|    std::copy_backward(it, end, end + 1);
 1666|    502|    ++flat_size_;
 1667|    502|    it->first = key;
 1668|    502|    it->second = Extension();
 1669|    502|    return {&it->second, true};
 1670|    502|  }
 1671|    243|  GrowCapacity(flat_size_ + 1);
 1672|    243|  return Insert(key);
 1673|    745|}
_ZN6google8protobuf8internal12ExtensionSet12GrowCapacityEm:
 1679|  1.51k|void ExtensionSet::GrowCapacity(size_t minimum_new_capacity) {
 1680|  1.51k|  if (PROTOBUF_PREDICT_FALSE(is_large())) {
  ------------------
  |  |  365|  1.51k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 1.51k]
  |  |  |  Branch (365:54): [Folded, False: 1.51k]
  |  |  |  Branch (365:63): [True: 0, False: 1.51k]
  |  |  ------------------
  ------------------
 1681|      0|    return;  // LargeMap does not have a "reserve" method.
 1682|      0|  }
 1683|  1.51k|  if (flat_capacity_ >= minimum_new_capacity) {
  ------------------
  |  Branch (1683:7): [True: 1.01k, False: 502]
  ------------------
 1684|  1.01k|    return;
 1685|  1.01k|  }
 1686|       |
 1687|    502|  auto new_flat_capacity = flat_capacity_;
 1688|    502|  do {
 1689|    502|    new_flat_capacity = new_flat_capacity == 0 ? 1 : new_flat_capacity * 4;
  ------------------
  |  Branch (1689:25): [True: 502, False: 0]
  ------------------
 1690|    502|  } while (new_flat_capacity < minimum_new_capacity);
  ------------------
  |  Branch (1690:12): [True: 0, False: 502]
  ------------------
 1691|       |
 1692|    502|  KeyValue* begin = flat_begin();
 1693|    502|  KeyValue* end = flat_end();
 1694|    502|  AllocatedData new_map;
 1695|    502|  Arena* const arena = arena_;
 1696|    502|  if (new_flat_capacity > kMaximumFlatCapacity) {
  ------------------
  |  Branch (1696:7): [True: 0, False: 502]
  ------------------
 1697|      0|    new_map.large = Arena::Create<LargeMap>(arena);
 1698|      0|    LargeMap::iterator hint = new_map.large->begin();
 1699|      0|    for (const KeyValue* it = begin; it != end; ++it) {
  ------------------
  |  Branch (1699:38): [True: 0, False: 0]
  ------------------
 1700|      0|      hint = new_map.large->insert(hint, {it->first, it->second});
 1701|      0|    }
 1702|      0|    flat_size_ = static_cast<uint16_t>(-1);
 1703|      0|    ABSL_DCHECK(is_large());
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|    502|  } else {
 1705|    502|    new_map.flat = Arena::CreateArray<KeyValue>(arena, new_flat_capacity);
 1706|    502|    std::copy(begin, end, new_map.flat);
 1707|    502|  }
 1708|       |
 1709|       |  // ReturnArrayMemory is more efficient with power-of-2 bytes, and
 1710|       |  // sizeof(KeyValue) is a power-of-2 on 64-bit platforms. flat_capacity_ is
 1711|       |  // always a power-of-2.
 1712|  1.00k|  ABSL_DCHECK(IsPowerOfTwo(sizeof(KeyValue)) || sizeof(void*) != 8)
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|    502|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    502|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  1.00k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  1.00k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 502, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    502|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 502]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|    502|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 502, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|    502|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|    502|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1713|  1.00k|      << sizeof(KeyValue) << " " << sizeof(void*);
 1714|    502|  ABSL_DCHECK(IsPowerOfTwo(flat_capacity_));
  ------------------
  |  |   47|    502|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|    502|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  1.50k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    502|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  1.00k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  1.00k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 502, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    502|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 502]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|    502|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 502, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.50k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  1.50k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1715|    502|  if (flat_capacity_ > 0) {
  ------------------
  |  Branch (1715:7): [True: 0, False: 502]
  ------------------
 1716|      0|    if (arena == nullptr) {
  ------------------
  |  Branch (1716:9): [True: 0, False: 0]
  ------------------
 1717|      0|      DeleteFlatMap(begin, flat_capacity_);
 1718|      0|    } else {
 1719|      0|      arena->ReturnArrayMemory(begin, sizeof(KeyValue) * flat_capacity_);
 1720|      0|    }
 1721|      0|  }
 1722|    502|  flat_capacity_ = new_flat_capacity;
 1723|    502|  map_ = new_map;
 1724|    502|}
_ZNK6google8protobuf8internal12ExtensionSet9Extension44InternalSerializeFieldWithCachedSizesToArrayEPKNS0_11MessageLiteEPKS2_iPhPNS0_2io19EpsCopyOutputStreamE:
 1764|    239|    uint8_t* target, io::EpsCopyOutputStream* stream) const {
 1765|    239|  if (is_repeated) {
  ------------------
  |  Branch (1765:7): [True: 0, False: 239]
  ------------------
 1766|      0|    if (is_packed) {
  ------------------
  |  Branch (1766:9): [True: 0, False: 0]
  ------------------
 1767|      0|      if (cached_size() == 0) return target;
  ------------------
  |  Branch (1767:11): [True: 0, False: 0]
  ------------------
 1768|       |
 1769|      0|      target = stream->EnsureSpace(target);
 1770|      0|      target = WireFormatLite::WriteTagToArray(
 1771|      0|          number, WireFormatLite::WIRETYPE_LENGTH_DELIMITED, target);
 1772|      0|      target = WireFormatLite::WriteInt32NoTagToArray(cached_size(), target);
 1773|       |
 1774|      0|      switch (real_type(type)) {
  ------------------
  |  Branch (1774:15): [True: 0, False: 0]
  ------------------
 1775|      0|#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE)                     \
 1776|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
 1777|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
 1778|      0|      target = stream->EnsureSpace(target);                              \
 1779|      0|      target = WireFormatLite::Write##CAMELCASE##NoTagToArray(           \
 1780|      0|          ptr.repeated_##LOWERCASE##_value->Get(i), target);             \
 1781|      0|    }                                                                    \
 1782|      0|    break
 1783|       |
 1784|      0|        HANDLE_TYPE(INT32, Int32, int32_t);
  ------------------
  |  | 1776|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1776:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1777|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1777:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1778|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1779|      0|      target = WireFormatLite::Write##CAMELCASE##NoTagToArray(           \
  |  | 1780|      0|          ptr.repeated_##LOWERCASE##_value->Get(i), target);             \
  |  | 1781|      0|    }                                                                    \
  |  | 1782|      0|    break
  ------------------
 1785|      0|        HANDLE_TYPE(INT64, Int64, int64_t);
  ------------------
  |  | 1776|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1776:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1777|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1777:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1778|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1779|      0|      target = WireFormatLite::Write##CAMELCASE##NoTagToArray(           \
  |  | 1780|      0|          ptr.repeated_##LOWERCASE##_value->Get(i), target);             \
  |  | 1781|      0|    }                                                                    \
  |  | 1782|      0|    break
  ------------------
 1786|      0|        HANDLE_TYPE(UINT32, UInt32, uint32_t);
  ------------------
  |  | 1776|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1776:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1777|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1777:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1778|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1779|      0|      target = WireFormatLite::Write##CAMELCASE##NoTagToArray(           \
  |  | 1780|      0|          ptr.repeated_##LOWERCASE##_value->Get(i), target);             \
  |  | 1781|      0|    }                                                                    \
  |  | 1782|      0|    break
  ------------------
 1787|      0|        HANDLE_TYPE(UINT64, UInt64, uint64_t);
  ------------------
  |  | 1776|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1776:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1777|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1777:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1778|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1779|      0|      target = WireFormatLite::Write##CAMELCASE##NoTagToArray(           \
  |  | 1780|      0|          ptr.repeated_##LOWERCASE##_value->Get(i), target);             \
  |  | 1781|      0|    }                                                                    \
  |  | 1782|      0|    break
  ------------------
 1788|      0|        HANDLE_TYPE(SINT32, SInt32, int32_t);
  ------------------
  |  | 1776|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1776:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1777|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1777:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1778|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1779|      0|      target = WireFormatLite::Write##CAMELCASE##NoTagToArray(           \
  |  | 1780|      0|          ptr.repeated_##LOWERCASE##_value->Get(i), target);             \
  |  | 1781|      0|    }                                                                    \
  |  | 1782|      0|    break
  ------------------
 1789|      0|        HANDLE_TYPE(SINT64, SInt64, int64_t);
  ------------------
  |  | 1776|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1776:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1777|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1777:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1778|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1779|      0|      target = WireFormatLite::Write##CAMELCASE##NoTagToArray(           \
  |  | 1780|      0|          ptr.repeated_##LOWERCASE##_value->Get(i), target);             \
  |  | 1781|      0|    }                                                                    \
  |  | 1782|      0|    break
  ------------------
 1790|      0|        HANDLE_TYPE(FIXED32, Fixed32, uint32_t);
  ------------------
  |  | 1776|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1776:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1777|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1777:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1778|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1779|      0|      target = WireFormatLite::Write##CAMELCASE##NoTagToArray(           \
  |  | 1780|      0|          ptr.repeated_##LOWERCASE##_value->Get(i), target);             \
  |  | 1781|      0|    }                                                                    \
  |  | 1782|      0|    break
  ------------------
 1791|      0|        HANDLE_TYPE(FIXED64, Fixed64, uint64_t);
  ------------------
  |  | 1776|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1776:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1777|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1777:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1778|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1779|      0|      target = WireFormatLite::Write##CAMELCASE##NoTagToArray(           \
  |  | 1780|      0|          ptr.repeated_##LOWERCASE##_value->Get(i), target);             \
  |  | 1781|      0|    }                                                                    \
  |  | 1782|      0|    break
  ------------------
 1792|      0|        HANDLE_TYPE(SFIXED32, SFixed32, int32_t);
  ------------------
  |  | 1776|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1776:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1777|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1777:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1778|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1779|      0|      target = WireFormatLite::Write##CAMELCASE##NoTagToArray(           \
  |  | 1780|      0|          ptr.repeated_##LOWERCASE##_value->Get(i), target);             \
  |  | 1781|      0|    }                                                                    \
  |  | 1782|      0|    break
  ------------------
 1793|      0|        HANDLE_TYPE(SFIXED64, SFixed64, int64_t);
  ------------------
  |  | 1776|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1776:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1777|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1777:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1778|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1779|      0|      target = WireFormatLite::Write##CAMELCASE##NoTagToArray(           \
  |  | 1780|      0|          ptr.repeated_##LOWERCASE##_value->Get(i), target);             \
  |  | 1781|      0|    }                                                                    \
  |  | 1782|      0|    break
  ------------------
 1794|      0|        HANDLE_TYPE(FLOAT, Float, float);
  ------------------
  |  | 1776|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1776:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1777|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1777:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1778|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1779|      0|      target = WireFormatLite::Write##CAMELCASE##NoTagToArray(           \
  |  | 1780|      0|          ptr.repeated_##LOWERCASE##_value->Get(i), target);             \
  |  | 1781|      0|    }                                                                    \
  |  | 1782|      0|    break
  ------------------
 1795|      0|        HANDLE_TYPE(DOUBLE, Double, double);
  ------------------
  |  | 1776|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1776:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1777|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1777:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1778|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1779|      0|      target = WireFormatLite::Write##CAMELCASE##NoTagToArray(           \
  |  | 1780|      0|          ptr.repeated_##LOWERCASE##_value->Get(i), target);             \
  |  | 1781|      0|    }                                                                    \
  |  | 1782|      0|    break
  ------------------
 1796|      0|        HANDLE_TYPE(BOOL, Bool, bool);
  ------------------
  |  | 1776|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1776:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1777|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1777:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1778|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1779|      0|      target = WireFormatLite::Write##CAMELCASE##NoTagToArray(           \
  |  | 1780|      0|          ptr.repeated_##LOWERCASE##_value->Get(i), target);             \
  |  | 1781|      0|    }                                                                    \
  |  | 1782|      0|    break
  ------------------
 1797|      0|        HANDLE_TYPE(ENUM, Enum, enum);
  ------------------
  |  | 1776|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1776:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1777|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1777:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1778|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1779|      0|      target = WireFormatLite::Write##CAMELCASE##NoTagToArray(           \
  |  | 1780|      0|          ptr.repeated_##LOWERCASE##_value->Get(i), target);             \
  |  | 1781|      0|    }                                                                    \
  |  | 1782|      0|    break
  ------------------
 1798|      0|#undef HANDLE_TYPE
 1799|       |
 1800|      0|        case WireFormatLite::TYPE_STRING:
  ------------------
  |  Branch (1800:9): [True: 0, False: 0]
  ------------------
 1801|      0|        case WireFormatLite::TYPE_BYTES:
  ------------------
  |  Branch (1801:9): [True: 0, False: 0]
  ------------------
 1802|      0|        case WireFormatLite::TYPE_GROUP:
  ------------------
  |  Branch (1802:9): [True: 0, False: 0]
  ------------------
 1803|      0|        case WireFormatLite::TYPE_MESSAGE:
  ------------------
  |  Branch (1803:9): [True: 0, False: 0]
  ------------------
 1804|      0|          ABSL_LOG(FATAL) << "Non-primitive types can't be packed.";
  ------------------
  |  |   38|      0|#define ABSL_LOG(severity) ABSL_LOG_INTERNAL_LOG_IMPL(_##severity)
  |  |  ------------------
  |  |  |  |   25|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, true) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   26|      0|      ABSL_LOGGING_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1805|      0|          break;
 1806|      0|      }
 1807|      0|    } else {
 1808|      0|      switch (real_type(type)) {
  ------------------
  |  Branch (1808:15): [True: 0, False: 0]
  ------------------
 1809|      0|#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE)                     \
 1810|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
 1811|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
 1812|      0|      target = stream->EnsureSpace(target);                              \
 1813|      0|      target = WireFormatLite::Write##CAMELCASE##ToArray(                \
 1814|      0|          number, ptr.repeated_##LOWERCASE##_value->Get(i), target);     \
 1815|      0|    }                                                                    \
 1816|      0|    break
 1817|       |
 1818|      0|        HANDLE_TYPE(INT32, Int32, int32_t);
  ------------------
  |  | 1810|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1810:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1811|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1811:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1812|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1813|      0|      target = WireFormatLite::Write##CAMELCASE##ToArray(                \
  |  | 1814|      0|          number, ptr.repeated_##LOWERCASE##_value->Get(i), target);     \
  |  | 1815|      0|    }                                                                    \
  |  | 1816|      0|    break
  ------------------
 1819|      0|        HANDLE_TYPE(INT64, Int64, int64_t);
  ------------------
  |  | 1810|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1810:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1811|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1811:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1812|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1813|      0|      target = WireFormatLite::Write##CAMELCASE##ToArray(                \
  |  | 1814|      0|          number, ptr.repeated_##LOWERCASE##_value->Get(i), target);     \
  |  | 1815|      0|    }                                                                    \
  |  | 1816|      0|    break
  ------------------
 1820|      0|        HANDLE_TYPE(UINT32, UInt32, uint32_t);
  ------------------
  |  | 1810|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1810:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1811|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1811:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1812|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1813|      0|      target = WireFormatLite::Write##CAMELCASE##ToArray(                \
  |  | 1814|      0|          number, ptr.repeated_##LOWERCASE##_value->Get(i), target);     \
  |  | 1815|      0|    }                                                                    \
  |  | 1816|      0|    break
  ------------------
 1821|      0|        HANDLE_TYPE(UINT64, UInt64, uint64_t);
  ------------------
  |  | 1810|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1810:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1811|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1811:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1812|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1813|      0|      target = WireFormatLite::Write##CAMELCASE##ToArray(                \
  |  | 1814|      0|          number, ptr.repeated_##LOWERCASE##_value->Get(i), target);     \
  |  | 1815|      0|    }                                                                    \
  |  | 1816|      0|    break
  ------------------
 1822|      0|        HANDLE_TYPE(SINT32, SInt32, int32_t);
  ------------------
  |  | 1810|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1810:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1811|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1811:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1812|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1813|      0|      target = WireFormatLite::Write##CAMELCASE##ToArray(                \
  |  | 1814|      0|          number, ptr.repeated_##LOWERCASE##_value->Get(i), target);     \
  |  | 1815|      0|    }                                                                    \
  |  | 1816|      0|    break
  ------------------
 1823|      0|        HANDLE_TYPE(SINT64, SInt64, int64_t);
  ------------------
  |  | 1810|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1810:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1811|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1811:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1812|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1813|      0|      target = WireFormatLite::Write##CAMELCASE##ToArray(                \
  |  | 1814|      0|          number, ptr.repeated_##LOWERCASE##_value->Get(i), target);     \
  |  | 1815|      0|    }                                                                    \
  |  | 1816|      0|    break
  ------------------
 1824|      0|        HANDLE_TYPE(FIXED32, Fixed32, uint32_t);
  ------------------
  |  | 1810|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1810:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1811|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1811:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1812|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1813|      0|      target = WireFormatLite::Write##CAMELCASE##ToArray(                \
  |  | 1814|      0|          number, ptr.repeated_##LOWERCASE##_value->Get(i), target);     \
  |  | 1815|      0|    }                                                                    \
  |  | 1816|      0|    break
  ------------------
 1825|      0|        HANDLE_TYPE(FIXED64, Fixed64, uint64_t);
  ------------------
  |  | 1810|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1810:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1811|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1811:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1812|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1813|      0|      target = WireFormatLite::Write##CAMELCASE##ToArray(                \
  |  | 1814|      0|          number, ptr.repeated_##LOWERCASE##_value->Get(i), target);     \
  |  | 1815|      0|    }                                                                    \
  |  | 1816|      0|    break
  ------------------
 1826|      0|        HANDLE_TYPE(SFIXED32, SFixed32, int32_t);
  ------------------
  |  | 1810|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1810:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1811|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1811:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1812|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1813|      0|      target = WireFormatLite::Write##CAMELCASE##ToArray(                \
  |  | 1814|      0|          number, ptr.repeated_##LOWERCASE##_value->Get(i), target);     \
  |  | 1815|      0|    }                                                                    \
  |  | 1816|      0|    break
  ------------------
 1827|      0|        HANDLE_TYPE(SFIXED64, SFixed64, int64_t);
  ------------------
  |  | 1810|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1810:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1811|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1811:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1812|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1813|      0|      target = WireFormatLite::Write##CAMELCASE##ToArray(                \
  |  | 1814|      0|          number, ptr.repeated_##LOWERCASE##_value->Get(i), target);     \
  |  | 1815|      0|    }                                                                    \
  |  | 1816|      0|    break
  ------------------
 1828|      0|        HANDLE_TYPE(FLOAT, Float, float);
  ------------------
  |  | 1810|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1810:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1811|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1811:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1812|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1813|      0|      target = WireFormatLite::Write##CAMELCASE##ToArray(                \
  |  | 1814|      0|          number, ptr.repeated_##LOWERCASE##_value->Get(i), target);     \
  |  | 1815|      0|    }                                                                    \
  |  | 1816|      0|    break
  ------------------
 1829|      0|        HANDLE_TYPE(DOUBLE, Double, double);
  ------------------
  |  | 1810|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1810:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1811|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1811:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1812|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1813|      0|      target = WireFormatLite::Write##CAMELCASE##ToArray(                \
  |  | 1814|      0|          number, ptr.repeated_##LOWERCASE##_value->Get(i), target);     \
  |  | 1815|      0|    }                                                                    \
  |  | 1816|      0|    break
  ------------------
 1830|      0|        HANDLE_TYPE(BOOL, Bool, bool);
  ------------------
  |  | 1810|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1810:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1811|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1811:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1812|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1813|      0|      target = WireFormatLite::Write##CAMELCASE##ToArray(                \
  |  | 1814|      0|          number, ptr.repeated_##LOWERCASE##_value->Get(i), target);     \
  |  | 1815|      0|    }                                                                    \
  |  | 1816|      0|    break
  ------------------
 1831|      0|        HANDLE_TYPE(ENUM, Enum, enum);
  ------------------
  |  | 1810|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1810:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1811|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1811:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1812|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1813|      0|      target = WireFormatLite::Write##CAMELCASE##ToArray(                \
  |  | 1814|      0|          number, ptr.repeated_##LOWERCASE##_value->Get(i), target);     \
  |  | 1815|      0|    }                                                                    \
  |  | 1816|      0|    break
  ------------------
 1832|      0|#undef HANDLE_TYPE
 1833|      0|#define HANDLE_TYPE(UPPERCASE, CAMELCASE, LOWERCASE)                     \
 1834|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
 1835|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
 1836|      0|      target = stream->EnsureSpace(target);                              \
 1837|      0|      target = stream->WriteString(                                      \
 1838|      0|          number, ptr.repeated_##LOWERCASE##_value->Get(i), target);     \
 1839|      0|    }                                                                    \
 1840|      0|    break
 1841|      0|        HANDLE_TYPE(STRING, String, string);
  ------------------
  |  | 1834|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1834:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1835|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1835:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1836|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1837|      0|      target = stream->WriteString(                                      \
  |  | 1838|      0|          number, ptr.repeated_##LOWERCASE##_value->Get(i), target);     \
  |  | 1839|      0|    }                                                                    \
  |  | 1840|      0|    break
  ------------------
 1842|      0|        HANDLE_TYPE(BYTES, Bytes, string);
  ------------------
  |  | 1834|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                 \
  |  |  ------------------
  |  |  |  Branch (1834:3): [True: 0, False: 0]
  |  |  ------------------
  |  | 1835|      0|    for (int i = 0; i < ptr.repeated_##LOWERCASE##_value->size(); i++) { \
  |  |  ------------------
  |  |  |  Branch (1835:21): [True: 0, False: 0]
  |  |  ------------------
  |  | 1836|      0|      target = stream->EnsureSpace(target);                              \
  |  | 1837|      0|      target = stream->WriteString(                                      \
  |  | 1838|      0|          number, ptr.repeated_##LOWERCASE##_value->Get(i), target);     \
  |  | 1839|      0|    }                                                                    \
  |  | 1840|      0|    break
  ------------------
 1843|      0|#undef HANDLE_TYPE
 1844|      0|        case WireFormatLite::TYPE_GROUP:
  ------------------
  |  Branch (1844:9): [True: 0, False: 0]
  ------------------
 1845|      0|          for (int i = 0; i < ptr.repeated_message_value->size(); i++) {
  ------------------
  |  Branch (1845:27): [True: 0, False: 0]
  ------------------
 1846|      0|            target = stream->EnsureSpace(target);
 1847|      0|            target = WireFormatLite::InternalWriteGroup(
 1848|      0|                number, ptr.repeated_message_value->Get(i), target, stream);
 1849|      0|          }
 1850|      0|          break;
 1851|      0|        case WireFormatLite::TYPE_MESSAGE:
  ------------------
  |  Branch (1851:9): [True: 0, False: 0]
  ------------------
 1852|      0|          for (int i = 0; i < ptr.repeated_message_value->size(); i++) {
  ------------------
  |  Branch (1852:27): [True: 0, False: 0]
  ------------------
 1853|      0|            auto& msg = ptr.repeated_message_value->Get(i);
 1854|      0|            target = WireFormatLite::InternalWriteMessage(
 1855|      0|                number, msg, msg.GetCachedSize(), target, stream);
 1856|      0|          }
 1857|      0|          break;
 1858|      0|      }
 1859|      0|    }
 1860|    239|  } else if (!is_cleared) {
  ------------------
  |  Branch (1860:14): [True: 239, False: 0]
  ------------------
 1861|    239|    switch (real_type(type)) {
  ------------------
  |  Branch (1861:13): [True: 239, False: 0]
  ------------------
 1862|      0|#define HANDLE_TYPE(UPPERCASE, CAMELCASE, VALUE)                               \
 1863|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                       \
 1864|      0|    target = stream->EnsureSpace(target);                                      \
 1865|      0|    target = WireFormatLite::Write##CAMELCASE##ToArray(number, VALUE, target); \
 1866|      0|    break
 1867|       |
 1868|      0|      HANDLE_TYPE(INT32, Int32, int32_t_value);
  ------------------
  |  | 1863|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                       \
  |  |  ------------------
  |  |  |  Branch (1863:3): [True: 0, False: 239]
  |  |  ------------------
  |  | 1864|      0|    target = stream->EnsureSpace(target);                                      \
  |  | 1865|      0|    target = WireFormatLite::Write##CAMELCASE##ToArray(number, VALUE, target); \
  |  | 1866|      0|    break
  ------------------
 1869|      0|      HANDLE_TYPE(INT64, Int64, int64_t_value);
  ------------------
  |  | 1863|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                       \
  |  |  ------------------
  |  |  |  Branch (1863:3): [True: 0, False: 239]
  |  |  ------------------
  |  | 1864|      0|    target = stream->EnsureSpace(target);                                      \
  |  | 1865|      0|    target = WireFormatLite::Write##CAMELCASE##ToArray(number, VALUE, target); \
  |  | 1866|      0|    break
  ------------------
 1870|      0|      HANDLE_TYPE(UINT32, UInt32, uint32_t_value);
  ------------------
  |  | 1863|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                       \
  |  |  ------------------
  |  |  |  Branch (1863:3): [True: 0, False: 239]
  |  |  ------------------
  |  | 1864|      0|    target = stream->EnsureSpace(target);                                      \
  |  | 1865|      0|    target = WireFormatLite::Write##CAMELCASE##ToArray(number, VALUE, target); \
  |  | 1866|      0|    break
  ------------------
 1871|      0|      HANDLE_TYPE(UINT64, UInt64, uint64_t_value);
  ------------------
  |  | 1863|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                       \
  |  |  ------------------
  |  |  |  Branch (1863:3): [True: 0, False: 239]
  |  |  ------------------
  |  | 1864|      0|    target = stream->EnsureSpace(target);                                      \
  |  | 1865|      0|    target = WireFormatLite::Write##CAMELCASE##ToArray(number, VALUE, target); \
  |  | 1866|      0|    break
  ------------------
 1872|      0|      HANDLE_TYPE(SINT32, SInt32, int32_t_value);
  ------------------
  |  | 1863|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                       \
  |  |  ------------------
  |  |  |  Branch (1863:3): [True: 0, False: 239]
  |  |  ------------------
  |  | 1864|      0|    target = stream->EnsureSpace(target);                                      \
  |  | 1865|      0|    target = WireFormatLite::Write##CAMELCASE##ToArray(number, VALUE, target); \
  |  | 1866|      0|    break
  ------------------
 1873|      0|      HANDLE_TYPE(SINT64, SInt64, int64_t_value);
  ------------------
  |  | 1863|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                       \
  |  |  ------------------
  |  |  |  Branch (1863:3): [True: 0, False: 239]
  |  |  ------------------
  |  | 1864|      0|    target = stream->EnsureSpace(target);                                      \
  |  | 1865|      0|    target = WireFormatLite::Write##CAMELCASE##ToArray(number, VALUE, target); \
  |  | 1866|      0|    break
  ------------------
 1874|      0|      HANDLE_TYPE(FIXED32, Fixed32, uint32_t_value);
  ------------------
  |  | 1863|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                       \
  |  |  ------------------
  |  |  |  Branch (1863:3): [True: 0, False: 239]
  |  |  ------------------
  |  | 1864|      0|    target = stream->EnsureSpace(target);                                      \
  |  | 1865|      0|    target = WireFormatLite::Write##CAMELCASE##ToArray(number, VALUE, target); \
  |  | 1866|      0|    break
  ------------------
 1875|      0|      HANDLE_TYPE(FIXED64, Fixed64, uint64_t_value);
  ------------------
  |  | 1863|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                       \
  |  |  ------------------
  |  |  |  Branch (1863:3): [True: 0, False: 239]
  |  |  ------------------
  |  | 1864|      0|    target = stream->EnsureSpace(target);                                      \
  |  | 1865|      0|    target = WireFormatLite::Write##CAMELCASE##ToArray(number, VALUE, target); \
  |  | 1866|      0|    break
  ------------------
 1876|      0|      HANDLE_TYPE(SFIXED32, SFixed32, int32_t_value);
  ------------------
  |  | 1863|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                       \
  |  |  ------------------
  |  |  |  Branch (1863:3): [True: 0, False: 239]
  |  |  ------------------
  |  | 1864|      0|    target = stream->EnsureSpace(target);                                      \
  |  | 1865|      0|    target = WireFormatLite::Write##CAMELCASE##ToArray(number, VALUE, target); \
  |  | 1866|      0|    break
  ------------------
 1877|      0|      HANDLE_TYPE(SFIXED64, SFixed64, int64_t_value);
  ------------------
  |  | 1863|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                       \
  |  |  ------------------
  |  |  |  Branch (1863:3): [True: 0, False: 239]
  |  |  ------------------
  |  | 1864|      0|    target = stream->EnsureSpace(target);                                      \
  |  | 1865|      0|    target = WireFormatLite::Write##CAMELCASE##ToArray(number, VALUE, target); \
  |  | 1866|      0|    break
  ------------------
 1878|      0|      HANDLE_TYPE(FLOAT, Float, float_value);
  ------------------
  |  | 1863|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                       \
  |  |  ------------------
  |  |  |  Branch (1863:3): [True: 0, False: 239]
  |  |  ------------------
  |  | 1864|      0|    target = stream->EnsureSpace(target);                                      \
  |  | 1865|      0|    target = WireFormatLite::Write##CAMELCASE##ToArray(number, VALUE, target); \
  |  | 1866|      0|    break
  ------------------
 1879|      0|      HANDLE_TYPE(DOUBLE, Double, double_value);
  ------------------
  |  | 1863|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                       \
  |  |  ------------------
  |  |  |  Branch (1863:3): [True: 0, False: 239]
  |  |  ------------------
  |  | 1864|      0|    target = stream->EnsureSpace(target);                                      \
  |  | 1865|      0|    target = WireFormatLite::Write##CAMELCASE##ToArray(number, VALUE, target); \
  |  | 1866|      0|    break
  ------------------
 1880|      0|      HANDLE_TYPE(BOOL, Bool, bool_value);
  ------------------
  |  | 1863|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                       \
  |  |  ------------------
  |  |  |  Branch (1863:3): [True: 0, False: 239]
  |  |  ------------------
  |  | 1864|      0|    target = stream->EnsureSpace(target);                                      \
  |  | 1865|      0|    target = WireFormatLite::Write##CAMELCASE##ToArray(number, VALUE, target); \
  |  | 1866|      0|    break
  ------------------
 1881|      0|      HANDLE_TYPE(ENUM, Enum, enum_value);
  ------------------
  |  | 1863|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                       \
  |  |  ------------------
  |  |  |  Branch (1863:3): [True: 0, False: 239]
  |  |  ------------------
  |  | 1864|      0|    target = stream->EnsureSpace(target);                                      \
  |  | 1865|      0|    target = WireFormatLite::Write##CAMELCASE##ToArray(number, VALUE, target); \
  |  | 1866|      0|    break
  ------------------
 1882|      0|#undef HANDLE_TYPE
 1883|      0|#define HANDLE_TYPE(UPPERCASE, CAMELCASE, VALUE)         \
 1884|      0|  case WireFormatLite::TYPE_##UPPERCASE:                 \
 1885|      0|    target = stream->EnsureSpace(target);                \
 1886|      0|    target = stream->WriteString(number, VALUE, target); \
 1887|      0|    break
 1888|      0|      HANDLE_TYPE(STRING, String, *ptr.string_value);
  ------------------
  |  | 1884|      0|  case WireFormatLite::TYPE_##UPPERCASE:                 \
  |  |  ------------------
  |  |  |  Branch (1884:3): [True: 0, False: 239]
  |  |  ------------------
  |  | 1885|      0|    target = stream->EnsureSpace(target);                \
  |  | 1886|      0|    target = stream->WriteString(number, VALUE, target); \
  |  | 1887|      0|    break
  ------------------
 1889|      0|      HANDLE_TYPE(BYTES, Bytes, *ptr.string_value);
  ------------------
  |  | 1884|      0|  case WireFormatLite::TYPE_##UPPERCASE:                 \
  |  |  ------------------
  |  |  |  Branch (1884:3): [True: 0, False: 239]
  |  |  ------------------
  |  | 1885|      0|    target = stream->EnsureSpace(target);                \
  |  | 1886|      0|    target = stream->WriteString(number, VALUE, target); \
  |  | 1887|      0|    break
  ------------------
 1890|      0|#undef HANDLE_TYPE
 1891|      0|      case WireFormatLite::TYPE_GROUP:
  ------------------
  |  Branch (1891:7): [True: 0, False: 239]
  ------------------
 1892|      0|        target = stream->EnsureSpace(target);
 1893|      0|        target = WireFormatLite::InternalWriteGroup(number, *ptr.message_value,
 1894|      0|                                                    target, stream);
 1895|      0|        break;
 1896|    239|      case WireFormatLite::TYPE_MESSAGE:
  ------------------
  |  Branch (1896:7): [True: 239, False: 0]
  ------------------
 1897|    239|        if (is_lazy) {
  ------------------
  |  Branch (1897:13): [True: 0, False: 239]
  ------------------
 1898|      0|          const auto* prototype =
 1899|      0|              extension_set->GetPrototypeForLazyMessage(extendee, number);
 1900|      0|          target = ptr.lazymessage_value->WriteMessageToArray(prototype, number,
 1901|      0|                                                              target, stream);
 1902|    239|        } else {
 1903|    239|          target = WireFormatLite::InternalWriteMessage(
 1904|    239|              number, *ptr.message_value, ptr.message_value->GetCachedSize(),
 1905|    239|              target, stream);
 1906|    239|        }
 1907|    239|        break;
 1908|    239|    }
 1909|    239|  }
 1910|    239|  return target;
 1911|    239|}
extension_set.cc:_ZN6google8protobuf8internal12_GLOBAL__N_123FindRegisteredExtensionEPKNS0_11MessageLiteEi:
  101|      8|                                             int number) {
  102|      8|  if (!global_registry) return nullptr;
  ------------------
  |  Branch (102:7): [True: 0, False: 8]
  ------------------
  103|       |
  104|      8|  ExtensionInfoKey info;
  105|      8|  info.message = extendee;
  106|      8|  info.number = number;
  107|       |
  108|      8|  auto it = global_registry->find(info);
  109|      8|  if (it == global_registry->end()) {
  ------------------
  |  Branch (109:7): [True: 0, False: 8]
  ------------------
  110|      0|    return nullptr;
  111|      8|  } else {
  112|      8|    return &*it;
  113|      8|  }
  114|      8|}
extension_set.cc:_ZNK6google8protobuf8internal12_GLOBAL__N_111ExtensionEqclERKNS1_13ExtensionInfoERKNS2_16ExtensionInfoKeyE:
   65|      8|  bool operator()(const ExtensionInfo& lhs, const ExtensionInfoKey& rhs) const {
   66|      8|    return lhs.message == rhs.message && lhs.number == rhs.number;
  ------------------
  |  Branch (66:12): [True: 8, False: 0]
  |  Branch (66:42): [True: 8, False: 0]
  ------------------
   67|      8|  }
extension_set.cc:_ZNK6google8protobuf8internal12_GLOBAL__N_115ExtensionHasherclERKNS2_16ExtensionInfoKeyE:
   78|      8|  std::size_t operator()(const ExtensionInfoKey& info) const {
   79|      8|    return absl::HashOf(info.message, info.number);
   80|      8|  }
extension_set.cc:_ZN6google8protobuf8internal12_GLOBAL__N_18RegisterERKNS1_13ExtensionInfoE:
   90|      1|void Register(const ExtensionInfo& info) {
   91|      1|  static auto local_static_registry = OnShutdownDelete(new ExtensionRegistry);
   92|      1|  global_registry = local_static_registry;
   93|      1|  if (!local_static_registry->insert(info).second) {
  ------------------
  |  Branch (93:7): [True: 0, False: 1]
  ------------------
   94|      0|    ABSL_LOG(FATAL) << "Multiple extension registrations for type \""
  ------------------
  |  |   38|      0|#define ABSL_LOG(severity) ABSL_LOG_INTERNAL_LOG_IMPL(_##severity)
  |  |  ------------------
  |  |  |  |   25|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, true) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   26|      0|      ABSL_LOGGING_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   95|      0|                    << info.message->GetTypeName() << "\", field number "
   96|      0|                    << info.number << ".";
   97|      0|  }
   98|      1|}
extension_set.cc:_ZNK6google8protobuf8internal12_GLOBAL__N_115ExtensionHasherclERKNS1_13ExtensionInfoE:
   75|      1|  std::size_t operator()(const ExtensionInfo& info) const {
   76|      1|    return absl::HashOf(info.message, info.number);
   77|      1|  }
extension_set.cc:_ZN6google8protobuf8internal12_GLOBAL__N_18cpp_typeEh:
   49|  1.24k|inline WireFormatLite::CppType cpp_type(FieldType type) {
   50|  1.24k|  return WireFormatLite::FieldTypeToCppType(real_type(type));
   51|  1.24k|}
extension_set.cc:_ZN6google8protobuf8internal12_GLOBAL__N_19real_typeEh:
   44|  2.43k|inline WireFormatLite::FieldType real_type(FieldType type) {
   45|  2.43k|  ABSL_DCHECK(type > 0 && type <= WireFormatLite::MAX_FIELD_TYPE);
  ------------------
  |  |   47|  2.43k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  2.43k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  4.86k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  2.43k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  4.86k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  4.86k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 2.43k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  2.43k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 2.43k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  2.43k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 2.43k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  4.86k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  4.86k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   46|  2.43k|  return static_cast<WireFormatLite::FieldType>(type);
   47|  2.43k|}
extension_set.cc:_ZZN6google8protobuf8internal12ExtensionSetD1EvENK3$_0clEiRNS2_9ExtensionE:
  189|    490|    ForEach([](int /* number */, Extension& ext) { ext.Free(); },
extension_set.cc:_ZN6google8protobuf8internal12_GLOBAL__N_111SizeOfUnionIPNS1_12ExtensionSet8KeyValueEPKS5_EEmT_S9_T0_SA_:
  970|  1.27k|size_t SizeOfUnion(ItX it_dest, ItX end_dest, ItY it_source, ItY end_source) {
  971|  1.27k|  size_t result = 0;
  972|  1.76k|  while (it_dest != end_dest && it_source != end_source) {
  ------------------
  |  Branch (972:10): [True: 498, False: 1.26k]
  |  Branch (972:33): [True: 490, False: 8]
  ------------------
  973|    490|    if (it_dest->first < it_source->first) {
  ------------------
  |  Branch (973:9): [True: 0, False: 490]
  ------------------
  974|      0|      ++result;
  975|      0|      ++it_dest;
  976|    490|    } else if (it_dest->first == it_source->first) {
  ------------------
  |  Branch (976:16): [True: 490, False: 0]
  ------------------
  977|    490|      ++result;
  978|    490|      ++it_dest;
  979|    490|      ++it_source;
  980|    490|    } else {
  981|      0|      if (!it_source->second.is_cleared) {
  ------------------
  |  Branch (981:11): [True: 0, False: 0]
  ------------------
  982|      0|        ++result;
  983|      0|      }
  984|      0|      ++it_source;
  985|      0|    }
  986|    490|  }
  987|  1.27k|  result += std::distance(it_dest, end_dest);
  988|  1.53k|  for (; it_source != end_source; ++it_source) {
  ------------------
  |  Branch (988:10): [True: 259, False: 1.27k]
  ------------------
  989|    259|    if (!it_source->second.is_cleared) {
  ------------------
  |  Branch (989:9): [True: 259, False: 0]
  ------------------
  990|    259|      ++result;
  991|    259|    }
  992|    259|  }
  993|  1.27k|  return result;
  994|  1.27k|}
extension_set.cc:_ZZN6google8protobuf8internal12ExtensionSet9MergeFromEPKNS0_11MessageLiteERKS2_ENK3$_0clEiRKNS2_9ExtensionE:
 1011|    749|      [extendee, this, &other](int number, const Extension& ext) {
 1012|    749|        this->InternalExtensionMergeFrom(extendee, number, ext, other.arena_);
 1013|    749|      },
extension_set.cc:_ZZNK6google8protobuf8internal12ExtensionSet8ByteSizeEvENK3$_0clEiRKNS2_9ExtensionE:
 1317|    474|      [&total_size](int number, const Extension& ext) {
 1318|    474|        total_size += ext.ByteSize(number);
 1319|    474|      },

_ZN6google8protobuf8internal13ExtensionInfoC2Ev:
  108|      8|  constexpr ExtensionInfo() : enum_validity_check() {}
_ZN6google8protobuf8internal13ExtensionInfoC2EPKNS0_11MessageLiteEihbbPFPKcS7_PNS1_12ParseContextEENS1_14LazyAnnotationE:
  121|      1|      : message(extendee),
  122|      1|        number(param_number),
  123|      1|        type(type_param),
  124|      1|        is_repeated(isrepeated),
  125|      1|        is_packed(ispacked),
  126|      1|        is_lazy(islazy),
  127|      1|        enum_validity_check(),
  128|      1|        lazy_eager_verify_func(verify_func) {}
_ZN6google8protobuf8internal24GeneratedExtensionFinderC2EPKNS0_11MessageLiteE:
  178|      8|      : extendee_(extendee) {}
_ZN6google8protobuf8internal12ExtensionSetC2ENS1_18InternalVisibilityEPNS0_5ArenaE:
  208|  1.05k|      : ExtensionSet(arena) {}
_ZNK6google8protobuf8internal12ExtensionSet18_InternalSerializeEPKNS0_11MessageLiteEiiPhPNS0_2io19EpsCopyOutputStreamE:
  486|    258|                              io::EpsCopyOutputStream* stream) const {
  487|    258|    if (flat_size_ == 0) {
  ------------------
  |  Branch (487:9): [True: 19, False: 239]
  ------------------
  488|     19|      assert(!is_large());
  489|     19|      return target;
  490|     19|    }
  491|    239|    return _InternalSerializeImpl(extendee, start_field_number,
  492|    239|                                  end_field_number, target, stream);
  493|    258|  }
_ZNK6google8protobuf8internal12ExtensionSet9Extension11PrefetchPtrEv:
  682|  1.71k|    const void* PrefetchPtr() const {
  683|  1.71k|      ABSL_DCHECK_EQ(is_pointer, is_repeated || FieldTypeIsPointer(type));
  ------------------
  |  |   74|  1.71k|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|  1.71k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  1.71k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 1.71k]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (56:38): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (56:38): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  1.71k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  684|       |      // We don't want to prefetch invalid/null pointers so if there isn't a
  685|       |      // pointer to prefetch, then return `this`.
  686|  1.71k|      return is_pointer ? absl::bit_cast<const void*>(ptr) : this;
  ------------------
  |  Branch (686:14): [True: 1.71k, False: 0]
  ------------------
  687|  1.71k|    }
_ZNK6google8protobuf8internal12ExtensionSet8is_largeEv:
  791|  10.0k|  bool is_large() const { return static_cast<int16_t>(flat_size_) < 0; }
_ZNK6google8protobuf8internal12ExtensionSet8PrefetchclEPKv:
  802|  1.22k|    void operator()(const void* ptr) const { absl::PrefetchToLocalCache(ptr); }
_ZNK6google8protobuf8internal12ExtensionSet11PrefetchNtaclEPKv:
  805|    490|    void operator()(const void* ptr) const {
  806|    490|      absl::PrefetchToLocalCacheNta(ptr);
  807|    490|    }
_ZN6google8protobuf8internal12ExtensionSet10flat_beginEv:
 1030|  4.07k|  KeyValue* flat_begin() {
 1031|       |    assert(!is_large());
 1032|  4.07k|    return map_.flat;
 1033|  4.07k|  }
_ZNK6google8protobuf8internal12ExtensionSet10flat_beginEv:
 1034|  3.87k|  const KeyValue* flat_begin() const {
 1035|       |    assert(!is_large());
 1036|  3.87k|    return map_.flat;
 1037|  3.87k|  }
_ZN6google8protobuf8internal12ExtensionSet8flat_endEv:
 1038|  4.07k|  KeyValue* flat_end() {
 1039|       |    assert(!is_large());
 1040|  4.07k|    return map_.flat + flat_size_;
 1041|  4.07k|  }
_ZNK6google8protobuf8internal12ExtensionSet8flat_endEv:
 1042|  3.88k|  const KeyValue* flat_end() const {
 1043|       |    assert(!is_large());
 1044|  3.88k|    return map_.flat + flat_size_;
 1045|  3.88k|  }
_ZNK6google8protobuf8internal12ExtensionSet32FindExtensionInfoFromFieldNumberINS1_24GeneratedExtensionFinderEEEbiiPT_PNS1_13ExtensionInfoEPb:
  937|      8|                                        bool* was_packed_on_wire) const {
  938|      8|    if (!extension_finder->Find(field_number, extension)) {
  ------------------
  |  Branch (938:9): [True: 0, False: 8]
  ------------------
  939|      0|      return false;
  940|      0|    }
  941|       |
  942|      8|    ABSL_DCHECK(extension->type > 0 &&
  ------------------
  |  |   47|      8|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      8|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|     24|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      8|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|     16|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|     16|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 8, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      8|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 8]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      8|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 8, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     24|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|     24|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  943|      8|                extension->type <= WireFormatLite::MAX_FIELD_TYPE);
  944|      8|    auto real_type = static_cast<WireFormatLite::FieldType>(extension->type);
  945|       |
  946|      8|    WireFormatLite::WireType expected_wire_type =
  947|      8|        WireFormatLite::WireTypeForFieldType(real_type);
  948|       |
  949|       |    // Check if this is a packed field.
  950|      8|    *was_packed_on_wire = false;
  951|      8|    if (extension->is_repeated &&
  ------------------
  |  Branch (951:9): [True: 0, False: 8]
  ------------------
  952|      0|        wire_type == WireFormatLite::WIRETYPE_LENGTH_DELIMITED &&
  ------------------
  |  Branch (952:9): [True: 0, False: 0]
  ------------------
  953|      0|        is_packable(expected_wire_type)) {
  ------------------
  |  Branch (953:9): [True: 0, False: 0]
  ------------------
  954|      0|      *was_packed_on_wire = true;
  955|      0|      return true;
  956|      0|    }
  957|       |    // Otherwise the wire type must match.
  958|      8|    return expected_wire_type == wire_type;
  959|      8|  }
_ZN6google8protobuf8internal12ExtensionSetC2EPNS0_5ArenaE:
 1066|  1.05k|    : arena_(arena), flat_capacity_(0), flat_size_(0), map_{nullptr} {}
extension_set.cc:_ZN6google8protobuf8internal12ExtensionSet7ForEachIZNS2_D1EvE3$_0NS2_11PrefetchNtaEEEvT_T0_:
  839|  1.05k|  void ForEach(KeyValueFunctor func, PrefetchFunctor prefetch_func) {
  840|  1.05k|    if (PROTOBUF_PREDICT_FALSE(is_large())) {
  ------------------
  |  |  365|  1.05k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 1.05k]
  |  |  |  Branch (365:54): [Folded, False: 1.05k]
  |  |  |  Branch (365:63): [True: 0, False: 1.05k]
  |  |  ------------------
  ------------------
  841|      0|      ForEachPrefetchImpl(map_.large->begin(), map_.large->end(),
  842|      0|                          std::move(func), std::move(prefetch_func));
  843|      0|      return;
  844|      0|    }
  845|  1.05k|    ForEachPrefetchImpl(flat_begin(), flat_end(), std::move(func),
  846|  1.05k|                        std::move(prefetch_func));
  847|  1.05k|  }
extension_set.cc:_ZN6google8protobuf8internal12ExtensionSet19ForEachPrefetchImplIPNS2_8KeyValueEZNS2_D1EvE3$_0NS2_11PrefetchNtaEEEvT_S8_T0_T1_:
  814|  1.05k|                                  PrefetchFunctor prefetch_func) {
  815|       |    // Note: based on arena's ChunkList::Cleanup().
  816|       |    // Prefetch distance 16 performs better than 8 in load tests.
  817|  1.05k|    constexpr int kPrefetchDistance = 16;
  818|  1.05k|    Iterator prefetch = it;
  819|       |    // Prefetch the first kPrefetchDistance extensions.
  820|  1.54k|    for (int i = 0; prefetch != end && i < kPrefetchDistance; ++prefetch, ++i) {
  ------------------
  |  Branch (820:21): [True: 490, False: 1.05k]
  |  Branch (820:40): [True: 490, False: 0]
  ------------------
  821|    490|      prefetch_func(prefetch->second.PrefetchPtr());
  822|    490|    }
  823|       |    // For the middle extensions, call func and then prefetch the extension
  824|       |    // kPrefetchDistance after the current one.
  825|  1.05k|    for (; prefetch != end; ++it, ++prefetch) {
  ------------------
  |  Branch (825:12): [True: 0, False: 1.05k]
  ------------------
  826|      0|      func(it->first, it->second);
  827|      0|      prefetch_func(prefetch->second.PrefetchPtr());
  828|      0|    }
  829|       |    // Call func on the rest without prefetching.
  830|  1.54k|    for (; it != end; ++it) func(it->first, it->second);
  ------------------
  |  Branch (830:12): [True: 490, False: 1.05k]
  ------------------
  831|  1.05k|  }
extension_set.cc:_ZN6google8protobuf8internal12ExtensionSet7ForEachIZNS2_5ClearEvE3$_0NS2_8PrefetchEEEvT_T0_:
  839|     19|  void ForEach(KeyValueFunctor func, PrefetchFunctor prefetch_func) {
  840|     19|    if (PROTOBUF_PREDICT_FALSE(is_large())) {
  ------------------
  |  |  365|     19|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 19]
  |  |  |  Branch (365:54): [Folded, False: 19]
  |  |  |  Branch (365:63): [True: 0, False: 19]
  |  |  ------------------
  ------------------
  841|      0|      ForEachPrefetchImpl(map_.large->begin(), map_.large->end(),
  842|      0|                          std::move(func), std::move(prefetch_func));
  843|      0|      return;
  844|      0|    }
  845|     19|    ForEachPrefetchImpl(flat_begin(), flat_end(), std::move(func),
  846|     19|                        std::move(prefetch_func));
  847|     19|  }
extension_set.cc:_ZN6google8protobuf8internal12ExtensionSet19ForEachPrefetchImplIPNS2_8KeyValueEZNS2_5ClearEvE3$_0NS2_8PrefetchEEEvT_S8_T0_T1_:
  814|     19|                                  PrefetchFunctor prefetch_func) {
  815|       |    // Note: based on arena's ChunkList::Cleanup().
  816|       |    // Prefetch distance 16 performs better than 8 in load tests.
  817|     19|    constexpr int kPrefetchDistance = 16;
  818|     19|    Iterator prefetch = it;
  819|       |    // Prefetch the first kPrefetchDistance extensions.
  820|     19|    for (int i = 0; prefetch != end && i < kPrefetchDistance; ++prefetch, ++i) {
  ------------------
  |  Branch (820:21): [True: 0, False: 19]
  |  Branch (820:40): [True: 0, False: 0]
  ------------------
  821|      0|      prefetch_func(prefetch->second.PrefetchPtr());
  822|      0|    }
  823|       |    // For the middle extensions, call func and then prefetch the extension
  824|       |    // kPrefetchDistance after the current one.
  825|     19|    for (; prefetch != end; ++it, ++prefetch) {
  ------------------
  |  Branch (825:12): [True: 0, False: 19]
  ------------------
  826|      0|      func(it->first, it->second);
  827|      0|      prefetch_func(prefetch->second.PrefetchPtr());
  828|      0|    }
  829|       |    // Call func on the rest without prefetching.
  830|     19|    for (; it != end; ++it) func(it->first, it->second);
  ------------------
  |  Branch (830:12): [True: 0, False: 19]
  ------------------
  831|     19|  }
extension_set.cc:_ZNK6google8protobuf8internal12ExtensionSet7ForEachIZNS2_9MergeFromEPKNS0_11MessageLiteERKS2_E3$_0NS2_8PrefetchEEEvT_T0_:
  850|  1.27k|  void ForEach(KeyValueFunctor func, PrefetchFunctor prefetch_func) const {
  851|  1.27k|    if (PROTOBUF_PREDICT_FALSE(is_large())) {
  ------------------
  |  |  365|  1.27k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 1.27k]
  |  |  |  Branch (365:54): [Folded, False: 1.27k]
  |  |  |  Branch (365:63): [True: 0, False: 1.27k]
  |  |  ------------------
  ------------------
  852|      0|      ForEachPrefetchImpl(map_.large->begin(), map_.large->end(),
  853|      0|                          std::move(func), std::move(prefetch_func));
  854|      0|      return;
  855|      0|    }
  856|  1.27k|    ForEachPrefetchImpl(flat_begin(), flat_end(), std::move(func),
  857|  1.27k|                        std::move(prefetch_func));
  858|  1.27k|  }
extension_set.cc:_ZN6google8protobuf8internal12ExtensionSet19ForEachPrefetchImplIPKNS2_8KeyValueEZNS2_9MergeFromEPKNS0_11MessageLiteERKS2_E3$_0NS2_8PrefetchEEEvT_SE_T0_T1_:
  814|  1.27k|                                  PrefetchFunctor prefetch_func) {
  815|       |    // Note: based on arena's ChunkList::Cleanup().
  816|       |    // Prefetch distance 16 performs better than 8 in load tests.
  817|  1.27k|    constexpr int kPrefetchDistance = 16;
  818|  1.27k|    Iterator prefetch = it;
  819|       |    // Prefetch the first kPrefetchDistance extensions.
  820|  2.02k|    for (int i = 0; prefetch != end && i < kPrefetchDistance; ++prefetch, ++i) {
  ------------------
  |  Branch (820:21): [True: 749, False: 1.27k]
  |  Branch (820:40): [True: 749, False: 0]
  ------------------
  821|    749|      prefetch_func(prefetch->second.PrefetchPtr());
  822|    749|    }
  823|       |    // For the middle extensions, call func and then prefetch the extension
  824|       |    // kPrefetchDistance after the current one.
  825|  1.27k|    for (; prefetch != end; ++it, ++prefetch) {
  ------------------
  |  Branch (825:12): [True: 0, False: 1.27k]
  ------------------
  826|      0|      func(it->first, it->second);
  827|      0|      prefetch_func(prefetch->second.PrefetchPtr());
  828|      0|    }
  829|       |    // Call func on the rest without prefetching.
  830|  2.02k|    for (; it != end; ++it) func(it->first, it->second);
  ------------------
  |  Branch (830:12): [True: 749, False: 1.27k]
  ------------------
  831|  1.27k|  }
extension_set.cc:_ZNK6google8protobuf8internal12ExtensionSet7ForEachIZNKS2_8ByteSizeEvE3$_0NS2_8PrefetchEEEvT_T0_:
  850|    774|  void ForEach(KeyValueFunctor func, PrefetchFunctor prefetch_func) const {
  851|    774|    if (PROTOBUF_PREDICT_FALSE(is_large())) {
  ------------------
  |  |  365|    774|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 774]
  |  |  |  Branch (365:54): [Folded, False: 774]
  |  |  |  Branch (365:63): [True: 0, False: 774]
  |  |  ------------------
  ------------------
  852|      0|      ForEachPrefetchImpl(map_.large->begin(), map_.large->end(),
  853|      0|                          std::move(func), std::move(prefetch_func));
  854|      0|      return;
  855|      0|    }
  856|    774|    ForEachPrefetchImpl(flat_begin(), flat_end(), std::move(func),
  857|    774|                        std::move(prefetch_func));
  858|    774|  }
extension_set.cc:_ZN6google8protobuf8internal12ExtensionSet19ForEachPrefetchImplIPKNS2_8KeyValueEZNKS2_8ByteSizeEvE3$_0NS2_8PrefetchEEEvT_S9_T0_T1_:
  814|    774|                                  PrefetchFunctor prefetch_func) {
  815|       |    // Note: based on arena's ChunkList::Cleanup().
  816|       |    // Prefetch distance 16 performs better than 8 in load tests.
  817|    774|    constexpr int kPrefetchDistance = 16;
  818|    774|    Iterator prefetch = it;
  819|       |    // Prefetch the first kPrefetchDistance extensions.
  820|  1.24k|    for (int i = 0; prefetch != end && i < kPrefetchDistance; ++prefetch, ++i) {
  ------------------
  |  Branch (820:21): [True: 474, False: 774]
  |  Branch (820:40): [True: 474, False: 0]
  ------------------
  821|    474|      prefetch_func(prefetch->second.PrefetchPtr());
  822|    474|    }
  823|       |    // For the middle extensions, call func and then prefetch the extension
  824|       |    // kPrefetchDistance after the current one.
  825|    774|    for (; prefetch != end; ++it, ++prefetch) {
  ------------------
  |  Branch (825:12): [True: 0, False: 774]
  ------------------
  826|      0|      func(it->first, it->second);
  827|      0|      prefetch_func(prefetch->second.PrefetchPtr());
  828|      0|    }
  829|       |    // Call func on the rest without prefetching.
  830|  1.24k|    for (; it != end; ++it) func(it->first, it->second);
  ------------------
  |  Branch (830:12): [True: 474, False: 774]
  ------------------
  831|    774|  }
_ZN6google8protobuf8internal17MessageTypeTraitsIN2pb11CppFeaturesEE3GetEiRKNS1_12ExtensionSetERKS4_:
 1484|    235|                              ConstType default_value) {
 1485|    235|    return static_cast<const Type&>(set.GetMessage(number, default_value));
 1486|    235|  }
_ZNK6google8protobuf8internal19ExtensionIdentifierINS0_10FeatureSetENS1_17MessageTypeTraitsIN2pb11CppFeaturesEEELh11ELb0EE13default_valueEv:
 1622|    235|  typename TypeTraits::ConstType default_value() const {
 1623|    235|    return TypeTraits::FromInitType(default_value_);
 1624|    235|  }
_ZN6google8protobuf8internal17MessageTypeTraitsIN2pb11CppFeaturesEE12FromInitTypeEPKv:
 1477|    235|  static ConstType FromInitType(InitType v) {
 1478|    235|    return *static_cast<const Type*>(v);
 1479|    235|  }
_ZNK6google8protobuf8internal19ExtensionIdentifierINS0_10FeatureSetENS1_17MessageTypeTraitsIN2pb11CppFeaturesEEELh11ELb0EE6numberEv:
 1621|    471|  inline int number() const { return number_; }
_ZN6google8protobuf8internal17MessageTypeTraitsIN2pb11CppFeaturesEE7MutableEihPNS1_12ExtensionSetE:
 1494|    235|                                    ExtensionSet* set) {
 1495|    235|    return static_cast<Type*>(set->MutableMessage(
 1496|    235|        number, field_type, Type::default_instance(), nullptr));
 1497|    235|  }

_ZN6google8protobuf8internal12ExtensionSet10ParseFieldEmPKcPKNS0_7MessageEPNS1_16InternalMetadataEPNS1_12ParseContextE:
  328|      8|                                     internal::ParseContext* ctx) {
  329|      8|  int number = tag >> 3;
  330|      8|  bool was_packed_on_wire;
  331|      8|  ExtensionInfo extension;
  332|      8|  if (!FindExtension(tag & 7, number, extendee, ctx, &extension,
  ------------------
  |  Branch (332:7): [True: 0, False: 8]
  ------------------
  333|      8|                     &was_packed_on_wire)) {
  334|      0|    return UnknownFieldParse(
  335|      0|        tag, metadata->mutable_unknown_fields<UnknownFieldSet>(), ptr, ctx);
  336|      0|  }
  337|      8|  return ParseFieldWithExtensionInfo<UnknownFieldSet>(
  338|      8|      number, was_packed_on_wire, extension, metadata, ptr, ctx);
  339|      8|}
_ZN6google8protobuf8internal12ExtensionSet13FindExtensionEijPKNS0_7MessageEPKNS1_12ParseContextEPNS1_13ExtensionInfoEPb:
  306|      8|                                 bool* was_packed_on_wire) {
  307|      8|  if (ctx->data().pool == nullptr) {
  ------------------
  |  Branch (307:7): [True: 8, False: 0]
  ------------------
  308|      8|    GeneratedExtensionFinder finder(extendee);
  309|      8|    if (!FindExtensionInfoFromFieldNumber(wire_type, field, &finder, extension,
  ------------------
  |  Branch (309:9): [True: 0, False: 8]
  ------------------
  310|      8|                                          was_packed_on_wire)) {
  311|      0|      return false;
  312|      0|    }
  313|      8|  } else {
  314|      0|    DescriptorPoolExtensionFinder finder(ctx->data().pool, ctx->data().factory,
  315|      0|                                         extendee->GetDescriptor());
  316|      0|    if (!FindExtensionInfoFromFieldNumber(wire_type, field, &finder, extension,
  ------------------
  |  Branch (316:9): [True: 0, False: 0]
  ------------------
  317|      0|                                          was_packed_on_wire)) {
  318|      0|      return false;
  319|      0|    }
  320|      0|  }
  321|      8|  return true;
  322|      8|}

_ZN6google8protobuf8internal12ExtensionSet27ParseFieldWithExtensionInfoINS0_15UnknownFieldSetEEEPKcibRKNS1_13ExtensionInfoEPNS1_16InternalMetadataES6_PNS1_12ParseContextE:
   22|      8|    InternalMetadata* metadata, const char* ptr, internal::ParseContext* ctx) {
   23|      8|  if (was_packed_on_wire) {
  ------------------
  |  Branch (23:7): [True: 0, False: 8]
  ------------------
   24|      0|    switch (extension.type) {
  ------------------
  |  Branch (24:13): [True: 0, False: 0]
  ------------------
   25|      0|#define HANDLE_TYPE(UPPERCASE, CPP_CAMELCASE)                                \
   26|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                     \
   27|      0|    return internal::Packed##CPP_CAMELCASE##Parser(                          \
   28|      0|        MutableRawRepeatedField(number, extension.type, extension.is_packed, \
   29|      0|                                extension.descriptor),                       \
   30|      0|        ptr, ctx);
   31|      0|      HANDLE_TYPE(INT32, Int32);
  ------------------
  |  |   26|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                     \
  |  |  ------------------
  |  |  |  Branch (26:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   27|      0|    return internal::Packed##CPP_CAMELCASE##Parser(                          \
  |  |   28|      0|        MutableRawRepeatedField(number, extension.type, extension.is_packed, \
  |  |   29|      0|                                extension.descriptor),                       \
  |  |   30|      0|        ptr, ctx);
  ------------------
   32|      0|      HANDLE_TYPE(INT64, Int64);
  ------------------
  |  |   26|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                     \
  |  |  ------------------
  |  |  |  Branch (26:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   27|      0|    return internal::Packed##CPP_CAMELCASE##Parser(                          \
  |  |   28|      0|        MutableRawRepeatedField(number, extension.type, extension.is_packed, \
  |  |   29|      0|                                extension.descriptor),                       \
  |  |   30|      0|        ptr, ctx);
  ------------------
   33|      0|      HANDLE_TYPE(UINT32, UInt32);
  ------------------
  |  |   26|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                     \
  |  |  ------------------
  |  |  |  Branch (26:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   27|      0|    return internal::Packed##CPP_CAMELCASE##Parser(                          \
  |  |   28|      0|        MutableRawRepeatedField(number, extension.type, extension.is_packed, \
  |  |   29|      0|                                extension.descriptor),                       \
  |  |   30|      0|        ptr, ctx);
  ------------------
   34|      0|      HANDLE_TYPE(UINT64, UInt64);
  ------------------
  |  |   26|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                     \
  |  |  ------------------
  |  |  |  Branch (26:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   27|      0|    return internal::Packed##CPP_CAMELCASE##Parser(                          \
  |  |   28|      0|        MutableRawRepeatedField(number, extension.type, extension.is_packed, \
  |  |   29|      0|                                extension.descriptor),                       \
  |  |   30|      0|        ptr, ctx);
  ------------------
   35|      0|      HANDLE_TYPE(SINT32, SInt32);
  ------------------
  |  |   26|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                     \
  |  |  ------------------
  |  |  |  Branch (26:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   27|      0|    return internal::Packed##CPP_CAMELCASE##Parser(                          \
  |  |   28|      0|        MutableRawRepeatedField(number, extension.type, extension.is_packed, \
  |  |   29|      0|                                extension.descriptor),                       \
  |  |   30|      0|        ptr, ctx);
  ------------------
   36|      0|      HANDLE_TYPE(SINT64, SInt64);
  ------------------
  |  |   26|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                     \
  |  |  ------------------
  |  |  |  Branch (26:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   27|      0|    return internal::Packed##CPP_CAMELCASE##Parser(                          \
  |  |   28|      0|        MutableRawRepeatedField(number, extension.type, extension.is_packed, \
  |  |   29|      0|                                extension.descriptor),                       \
  |  |   30|      0|        ptr, ctx);
  ------------------
   37|      0|      HANDLE_TYPE(FIXED32, Fixed32);
  ------------------
  |  |   26|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                     \
  |  |  ------------------
  |  |  |  Branch (26:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   27|      0|    return internal::Packed##CPP_CAMELCASE##Parser(                          \
  |  |   28|      0|        MutableRawRepeatedField(number, extension.type, extension.is_packed, \
  |  |   29|      0|                                extension.descriptor),                       \
  |  |   30|      0|        ptr, ctx);
  ------------------
   38|      0|      HANDLE_TYPE(FIXED64, Fixed64);
  ------------------
  |  |   26|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                     \
  |  |  ------------------
  |  |  |  Branch (26:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   27|      0|    return internal::Packed##CPP_CAMELCASE##Parser(                          \
  |  |   28|      0|        MutableRawRepeatedField(number, extension.type, extension.is_packed, \
  |  |   29|      0|                                extension.descriptor),                       \
  |  |   30|      0|        ptr, ctx);
  ------------------
   39|      0|      HANDLE_TYPE(SFIXED32, SFixed32);
  ------------------
  |  |   26|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                     \
  |  |  ------------------
  |  |  |  Branch (26:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   27|      0|    return internal::Packed##CPP_CAMELCASE##Parser(                          \
  |  |   28|      0|        MutableRawRepeatedField(number, extension.type, extension.is_packed, \
  |  |   29|      0|                                extension.descriptor),                       \
  |  |   30|      0|        ptr, ctx);
  ------------------
   40|      0|      HANDLE_TYPE(SFIXED64, SFixed64);
  ------------------
  |  |   26|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                     \
  |  |  ------------------
  |  |  |  Branch (26:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   27|      0|    return internal::Packed##CPP_CAMELCASE##Parser(                          \
  |  |   28|      0|        MutableRawRepeatedField(number, extension.type, extension.is_packed, \
  |  |   29|      0|                                extension.descriptor),                       \
  |  |   30|      0|        ptr, ctx);
  ------------------
   41|      0|      HANDLE_TYPE(FLOAT, Float);
  ------------------
  |  |   26|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                     \
  |  |  ------------------
  |  |  |  Branch (26:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   27|      0|    return internal::Packed##CPP_CAMELCASE##Parser(                          \
  |  |   28|      0|        MutableRawRepeatedField(number, extension.type, extension.is_packed, \
  |  |   29|      0|                                extension.descriptor),                       \
  |  |   30|      0|        ptr, ctx);
  ------------------
   42|      0|      HANDLE_TYPE(DOUBLE, Double);
  ------------------
  |  |   26|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                     \
  |  |  ------------------
  |  |  |  Branch (26:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   27|      0|    return internal::Packed##CPP_CAMELCASE##Parser(                          \
  |  |   28|      0|        MutableRawRepeatedField(number, extension.type, extension.is_packed, \
  |  |   29|      0|                                extension.descriptor),                       \
  |  |   30|      0|        ptr, ctx);
  ------------------
   43|      0|      HANDLE_TYPE(BOOL, Bool);
  ------------------
  |  |   26|      0|  case WireFormatLite::TYPE_##UPPERCASE:                                     \
  |  |  ------------------
  |  |  |  Branch (26:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   27|      0|    return internal::Packed##CPP_CAMELCASE##Parser(                          \
  |  |   28|      0|        MutableRawRepeatedField(number, extension.type, extension.is_packed, \
  |  |   29|      0|                                extension.descriptor),                       \
  |  |   30|      0|        ptr, ctx);
  ------------------
   44|      0|#undef HANDLE_TYPE
   45|       |
   46|      0|      case WireFormatLite::TYPE_ENUM:
  ------------------
  |  Branch (46:7): [True: 0, False: 0]
  ------------------
   47|      0|        return internal::PackedEnumParserArg<T>(
   48|      0|            MutableRawRepeatedField(number, extension.type, extension.is_packed,
   49|      0|                                    extension.descriptor),
   50|      0|            ptr, ctx, extension.enum_validity_check.func,
   51|      0|            extension.enum_validity_check.arg, metadata, number);
   52|      0|      case WireFormatLite::TYPE_STRING:
  ------------------
  |  Branch (52:7): [True: 0, False: 0]
  ------------------
   53|      0|      case WireFormatLite::TYPE_BYTES:
  ------------------
  |  Branch (53:7): [True: 0, False: 0]
  ------------------
   54|      0|      case WireFormatLite::TYPE_GROUP:
  ------------------
  |  Branch (54:7): [True: 0, False: 0]
  ------------------
   55|      0|      case WireFormatLite::TYPE_MESSAGE:
  ------------------
  |  Branch (55:7): [True: 0, False: 0]
  ------------------
   56|      0|        ABSL_LOG(FATAL) << "Non-primitive types can't be packed.";
  ------------------
  |  |   38|      0|#define ABSL_LOG(severity) ABSL_LOG_INTERNAL_LOG_IMPL(_##severity)
  |  |  ------------------
  |  |  |  |   25|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, true) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   26|      0|      ABSL_LOGGING_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   57|      0|        break;
   58|      0|    }
   59|      8|  } else {
   60|      8|    switch (extension.type) {
  ------------------
  |  Branch (60:13): [True: 8, False: 0]
  ------------------
   61|      0|#define HANDLE_VARINT_TYPE(UPPERCASE, CPP_CAMELCASE)                        \
   62|      0|  case WireFormatLite::TYPE_##UPPERCASE: {                                  \
   63|      0|    uint64_t value;                                                         \
   64|      0|    ptr = VarintParse(ptr, &value);                                         \
   65|      0|    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);                                    \
   66|      0|    if (extension.is_repeated) {                                            \
   67|      0|      Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE,          \
   68|      0|                         extension.is_packed, value, extension.descriptor); \
   69|      0|    } else {                                                                \
   70|      0|      Set##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, value,   \
   71|      0|                         extension.descriptor);                             \
   72|      0|    }                                                                       \
   73|      0|  } break
   74|       |
   75|      0|      HANDLE_VARINT_TYPE(INT32, Int32);
  ------------------
  |  |   62|      0|  case WireFormatLite::TYPE_##UPPERCASE: {                                  \
  |  |  ------------------
  |  |  |  Branch (62:3): [True: 0, False: 8]
  |  |  ------------------
  |  |   63|      0|    uint64_t value;                                                         \
  |  |   64|      0|    ptr = VarintParse(ptr, &value);                                         \
  |  |   65|      0|    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);                                    \
  |  |  ------------------
  |  |  |  | 1157|      0|  GOOGLE_PROTOBUF_ASSERT_RETURN(predicate, nullptr)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1150|      0|  if (!(predicate)) {                                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1150:7): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1151|      0|    /*  ::raise(SIGINT);  */                           \
  |  |  |  |  |  | 1152|      0|    /*  ABSL_LOG(ERROR) << "Parse failure";  */        \
  |  |  |  |  |  | 1153|      0|    return ret;                                        \
  |  |  |  |  |  | 1154|      0|  }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   66|      0|    if (extension.is_repeated) {                                            \
  |  |  ------------------
  |  |  |  Branch (66:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   67|      0|      Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE,          \
  |  |   68|      0|                         extension.is_packed, value, extension.descriptor); \
  |  |   69|      0|    } else {                                                                \
  |  |   70|      0|      Set##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, value,   \
  |  |   71|      0|                         extension.descriptor);                             \
  |  |   72|      0|    }                                                                       \
  |  |   73|      0|  } break
  ------------------
   76|      0|      HANDLE_VARINT_TYPE(INT64, Int64);
  ------------------
  |  |   62|      0|  case WireFormatLite::TYPE_##UPPERCASE: {                                  \
  |  |  ------------------
  |  |  |  Branch (62:3): [True: 0, False: 8]
  |  |  ------------------
  |  |   63|      0|    uint64_t value;                                                         \
  |  |   64|      0|    ptr = VarintParse(ptr, &value);                                         \
  |  |   65|      0|    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);                                    \
  |  |  ------------------
  |  |  |  | 1157|      0|  GOOGLE_PROTOBUF_ASSERT_RETURN(predicate, nullptr)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1150|      0|  if (!(predicate)) {                                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1150:7): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1151|      0|    /*  ::raise(SIGINT);  */                           \
  |  |  |  |  |  | 1152|      0|    /*  ABSL_LOG(ERROR) << "Parse failure";  */        \
  |  |  |  |  |  | 1153|      0|    return ret;                                        \
  |  |  |  |  |  | 1154|      0|  }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   66|      0|    if (extension.is_repeated) {                                            \
  |  |  ------------------
  |  |  |  Branch (66:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   67|      0|      Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE,          \
  |  |   68|      0|                         extension.is_packed, value, extension.descriptor); \
  |  |   69|      0|    } else {                                                                \
  |  |   70|      0|      Set##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, value,   \
  |  |   71|      0|                         extension.descriptor);                             \
  |  |   72|      0|    }                                                                       \
  |  |   73|      0|  } break
  ------------------
   77|      0|      HANDLE_VARINT_TYPE(UINT32, UInt32);
  ------------------
  |  |   62|      0|  case WireFormatLite::TYPE_##UPPERCASE: {                                  \
  |  |  ------------------
  |  |  |  Branch (62:3): [True: 0, False: 8]
  |  |  ------------------
  |  |   63|      0|    uint64_t value;                                                         \
  |  |   64|      0|    ptr = VarintParse(ptr, &value);                                         \
  |  |   65|      0|    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);                                    \
  |  |  ------------------
  |  |  |  | 1157|      0|  GOOGLE_PROTOBUF_ASSERT_RETURN(predicate, nullptr)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1150|      0|  if (!(predicate)) {                                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1150:7): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1151|      0|    /*  ::raise(SIGINT);  */                           \
  |  |  |  |  |  | 1152|      0|    /*  ABSL_LOG(ERROR) << "Parse failure";  */        \
  |  |  |  |  |  | 1153|      0|    return ret;                                        \
  |  |  |  |  |  | 1154|      0|  }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   66|      0|    if (extension.is_repeated) {                                            \
  |  |  ------------------
  |  |  |  Branch (66:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   67|      0|      Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE,          \
  |  |   68|      0|                         extension.is_packed, value, extension.descriptor); \
  |  |   69|      0|    } else {                                                                \
  |  |   70|      0|      Set##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, value,   \
  |  |   71|      0|                         extension.descriptor);                             \
  |  |   72|      0|    }                                                                       \
  |  |   73|      0|  } break
  ------------------
   78|      0|      HANDLE_VARINT_TYPE(UINT64, UInt64);
  ------------------
  |  |   62|      0|  case WireFormatLite::TYPE_##UPPERCASE: {                                  \
  |  |  ------------------
  |  |  |  Branch (62:3): [True: 0, False: 8]
  |  |  ------------------
  |  |   63|      0|    uint64_t value;                                                         \
  |  |   64|      0|    ptr = VarintParse(ptr, &value);                                         \
  |  |   65|      0|    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);                                    \
  |  |  ------------------
  |  |  |  | 1157|      0|  GOOGLE_PROTOBUF_ASSERT_RETURN(predicate, nullptr)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1150|      0|  if (!(predicate)) {                                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1150:7): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1151|      0|    /*  ::raise(SIGINT);  */                           \
  |  |  |  |  |  | 1152|      0|    /*  ABSL_LOG(ERROR) << "Parse failure";  */        \
  |  |  |  |  |  | 1153|      0|    return ret;                                        \
  |  |  |  |  |  | 1154|      0|  }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   66|      0|    if (extension.is_repeated) {                                            \
  |  |  ------------------
  |  |  |  Branch (66:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   67|      0|      Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE,          \
  |  |   68|      0|                         extension.is_packed, value, extension.descriptor); \
  |  |   69|      0|    } else {                                                                \
  |  |   70|      0|      Set##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, value,   \
  |  |   71|      0|                         extension.descriptor);                             \
  |  |   72|      0|    }                                                                       \
  |  |   73|      0|  } break
  ------------------
   79|      0|      HANDLE_VARINT_TYPE(BOOL, Bool);
  ------------------
  |  |   62|      0|  case WireFormatLite::TYPE_##UPPERCASE: {                                  \
  |  |  ------------------
  |  |  |  Branch (62:3): [True: 0, False: 8]
  |  |  ------------------
  |  |   63|      0|    uint64_t value;                                                         \
  |  |   64|      0|    ptr = VarintParse(ptr, &value);                                         \
  |  |   65|      0|    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);                                    \
  |  |  ------------------
  |  |  |  | 1157|      0|  GOOGLE_PROTOBUF_ASSERT_RETURN(predicate, nullptr)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1150|      0|  if (!(predicate)) {                                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1150:7): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1151|      0|    /*  ::raise(SIGINT);  */                           \
  |  |  |  |  |  | 1152|      0|    /*  ABSL_LOG(ERROR) << "Parse failure";  */        \
  |  |  |  |  |  | 1153|      0|    return ret;                                        \
  |  |  |  |  |  | 1154|      0|  }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   66|      0|    if (extension.is_repeated) {                                            \
  |  |  ------------------
  |  |  |  Branch (66:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   67|      0|      Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE,          \
  |  |   68|      0|                         extension.is_packed, value, extension.descriptor); \
  |  |   69|      0|    } else {                                                                \
  |  |   70|      0|      Set##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, value,   \
  |  |   71|      0|                         extension.descriptor);                             \
  |  |   72|      0|    }                                                                       \
  |  |   73|      0|  } break
  ------------------
   80|      0|#undef HANDLE_VARINT_TYPE
   81|      0|#define HANDLE_SVARINT_TYPE(UPPERCASE, CPP_CAMELCASE, SIZE)                 \
   82|      0|  case WireFormatLite::TYPE_##UPPERCASE: {                                  \
   83|      0|    uint64_t val;                                                           \
   84|      0|    ptr = VarintParse(ptr, &val);                                           \
   85|      0|    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);                                    \
   86|      0|    auto value = WireFormatLite::ZigZagDecode##SIZE(val);                   \
   87|      0|    if (extension.is_repeated) {                                            \
   88|      0|      Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE,          \
   89|      0|                         extension.is_packed, value, extension.descriptor); \
   90|      0|    } else {                                                                \
   91|      0|      Set##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, value,   \
   92|      0|                         extension.descriptor);                             \
   93|      0|    }                                                                       \
   94|      0|  } break
   95|       |
   96|      0|      HANDLE_SVARINT_TYPE(SINT32, Int32, 32);
  ------------------
  |  |   82|      0|  case WireFormatLite::TYPE_##UPPERCASE: {                                  \
  |  |  ------------------
  |  |  |  Branch (82:3): [True: 0, False: 8]
  |  |  ------------------
  |  |   83|      0|    uint64_t val;                                                           \
  |  |   84|      0|    ptr = VarintParse(ptr, &val);                                           \
  |  |   85|      0|    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);                                    \
  |  |  ------------------
  |  |  |  | 1157|      0|  GOOGLE_PROTOBUF_ASSERT_RETURN(predicate, nullptr)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1150|      0|  if (!(predicate)) {                                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1150:7): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1151|      0|    /*  ::raise(SIGINT);  */                           \
  |  |  |  |  |  | 1152|      0|    /*  ABSL_LOG(ERROR) << "Parse failure";  */        \
  |  |  |  |  |  | 1153|      0|    return ret;                                        \
  |  |  |  |  |  | 1154|      0|  }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   86|      0|    auto value = WireFormatLite::ZigZagDecode##SIZE(val);                   \
  |  |   87|      0|    if (extension.is_repeated) {                                            \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|      Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE,          \
  |  |   89|      0|                         extension.is_packed, value, extension.descriptor); \
  |  |   90|      0|    } else {                                                                \
  |  |   91|      0|      Set##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, value,   \
  |  |   92|      0|                         extension.descriptor);                             \
  |  |   93|      0|    }                                                                       \
  |  |   94|      0|  } break
  ------------------
   97|      0|      HANDLE_SVARINT_TYPE(SINT64, Int64, 64);
  ------------------
  |  |   82|      0|  case WireFormatLite::TYPE_##UPPERCASE: {                                  \
  |  |  ------------------
  |  |  |  Branch (82:3): [True: 0, False: 8]
  |  |  ------------------
  |  |   83|      0|    uint64_t val;                                                           \
  |  |   84|      0|    ptr = VarintParse(ptr, &val);                                           \
  |  |   85|      0|    GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);                                    \
  |  |  ------------------
  |  |  |  | 1157|      0|  GOOGLE_PROTOBUF_ASSERT_RETURN(predicate, nullptr)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1150|      0|  if (!(predicate)) {                                  \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1150:7): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1151|      0|    /*  ::raise(SIGINT);  */                           \
  |  |  |  |  |  | 1152|      0|    /*  ABSL_LOG(ERROR) << "Parse failure";  */        \
  |  |  |  |  |  | 1153|      0|    return ret;                                        \
  |  |  |  |  |  | 1154|      0|  }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   86|      0|    auto value = WireFormatLite::ZigZagDecode##SIZE(val);                   \
  |  |   87|      0|    if (extension.is_repeated) {                                            \
  |  |  ------------------
  |  |  |  Branch (87:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|      Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE,          \
  |  |   89|      0|                         extension.is_packed, value, extension.descriptor); \
  |  |   90|      0|    } else {                                                                \
  |  |   91|      0|      Set##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, value,   \
  |  |   92|      0|                         extension.descriptor);                             \
  |  |   93|      0|    }                                                                       \
  |  |   94|      0|  } break
  ------------------
   98|      0|#undef HANDLE_SVARINT_TYPE
   99|      0|#define HANDLE_FIXED_TYPE(UPPERCASE, CPP_CAMELCASE, CPPTYPE)                \
  100|      0|  case WireFormatLite::TYPE_##UPPERCASE: {                                  \
  101|      0|    auto value = UnalignedLoad<CPPTYPE>(ptr);                               \
  102|      0|    ptr += sizeof(CPPTYPE);                                                 \
  103|      0|    if (extension.is_repeated) {                                            \
  104|      0|      Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE,          \
  105|      0|                         extension.is_packed, value, extension.descriptor); \
  106|      0|    } else {                                                                \
  107|      0|      Set##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, value,   \
  108|      0|                         extension.descriptor);                             \
  109|      0|    }                                                                       \
  110|      0|  } break
  111|       |
  112|      0|      HANDLE_FIXED_TYPE(FIXED32, UInt32, uint32_t);
  ------------------
  |  |  100|      0|  case WireFormatLite::TYPE_##UPPERCASE: {                                  \
  |  |  ------------------
  |  |  |  Branch (100:3): [True: 0, False: 8]
  |  |  ------------------
  |  |  101|      0|    auto value = UnalignedLoad<CPPTYPE>(ptr);                               \
  |  |  102|      0|    ptr += sizeof(CPPTYPE);                                                 \
  |  |  103|      0|    if (extension.is_repeated) {                                            \
  |  |  ------------------
  |  |  |  Branch (103:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|      Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE,          \
  |  |  105|      0|                         extension.is_packed, value, extension.descriptor); \
  |  |  106|      0|    } else {                                                                \
  |  |  107|      0|      Set##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, value,   \
  |  |  108|      0|                         extension.descriptor);                             \
  |  |  109|      0|    }                                                                       \
  |  |  110|      0|  } break
  ------------------
  113|      0|      HANDLE_FIXED_TYPE(FIXED64, UInt64, uint64_t);
  ------------------
  |  |  100|      0|  case WireFormatLite::TYPE_##UPPERCASE: {                                  \
  |  |  ------------------
  |  |  |  Branch (100:3): [True: 0, False: 8]
  |  |  ------------------
  |  |  101|      0|    auto value = UnalignedLoad<CPPTYPE>(ptr);                               \
  |  |  102|      0|    ptr += sizeof(CPPTYPE);                                                 \
  |  |  103|      0|    if (extension.is_repeated) {                                            \
  |  |  ------------------
  |  |  |  Branch (103:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|      Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE,          \
  |  |  105|      0|                         extension.is_packed, value, extension.descriptor); \
  |  |  106|      0|    } else {                                                                \
  |  |  107|      0|      Set##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, value,   \
  |  |  108|      0|                         extension.descriptor);                             \
  |  |  109|      0|    }                                                                       \
  |  |  110|      0|  } break
  ------------------
  114|      0|      HANDLE_FIXED_TYPE(SFIXED32, Int32, int32_t);
  ------------------
  |  |  100|      0|  case WireFormatLite::TYPE_##UPPERCASE: {                                  \
  |  |  ------------------
  |  |  |  Branch (100:3): [True: 0, False: 8]
  |  |  ------------------
  |  |  101|      0|    auto value = UnalignedLoad<CPPTYPE>(ptr);                               \
  |  |  102|      0|    ptr += sizeof(CPPTYPE);                                                 \
  |  |  103|      0|    if (extension.is_repeated) {                                            \
  |  |  ------------------
  |  |  |  Branch (103:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|      Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE,          \
  |  |  105|      0|                         extension.is_packed, value, extension.descriptor); \
  |  |  106|      0|    } else {                                                                \
  |  |  107|      0|      Set##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, value,   \
  |  |  108|      0|                         extension.descriptor);                             \
  |  |  109|      0|    }                                                                       \
  |  |  110|      0|  } break
  ------------------
  115|      0|      HANDLE_FIXED_TYPE(SFIXED64, Int64, int64_t);
  ------------------
  |  |  100|      0|  case WireFormatLite::TYPE_##UPPERCASE: {                                  \
  |  |  ------------------
  |  |  |  Branch (100:3): [True: 0, False: 8]
  |  |  ------------------
  |  |  101|      0|    auto value = UnalignedLoad<CPPTYPE>(ptr);                               \
  |  |  102|      0|    ptr += sizeof(CPPTYPE);                                                 \
  |  |  103|      0|    if (extension.is_repeated) {                                            \
  |  |  ------------------
  |  |  |  Branch (103:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|      Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE,          \
  |  |  105|      0|                         extension.is_packed, value, extension.descriptor); \
  |  |  106|      0|    } else {                                                                \
  |  |  107|      0|      Set##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, value,   \
  |  |  108|      0|                         extension.descriptor);                             \
  |  |  109|      0|    }                                                                       \
  |  |  110|      0|  } break
  ------------------
  116|      0|      HANDLE_FIXED_TYPE(FLOAT, Float, float);
  ------------------
  |  |  100|      0|  case WireFormatLite::TYPE_##UPPERCASE: {                                  \
  |  |  ------------------
  |  |  |  Branch (100:3): [True: 0, False: 8]
  |  |  ------------------
  |  |  101|      0|    auto value = UnalignedLoad<CPPTYPE>(ptr);                               \
  |  |  102|      0|    ptr += sizeof(CPPTYPE);                                                 \
  |  |  103|      0|    if (extension.is_repeated) {                                            \
  |  |  ------------------
  |  |  |  Branch (103:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|      Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE,          \
  |  |  105|      0|                         extension.is_packed, value, extension.descriptor); \
  |  |  106|      0|    } else {                                                                \
  |  |  107|      0|      Set##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, value,   \
  |  |  108|      0|                         extension.descriptor);                             \
  |  |  109|      0|    }                                                                       \
  |  |  110|      0|  } break
  ------------------
  117|      0|      HANDLE_FIXED_TYPE(DOUBLE, Double, double);
  ------------------
  |  |  100|      0|  case WireFormatLite::TYPE_##UPPERCASE: {                                  \
  |  |  ------------------
  |  |  |  Branch (100:3): [True: 0, False: 8]
  |  |  ------------------
  |  |  101|      0|    auto value = UnalignedLoad<CPPTYPE>(ptr);                               \
  |  |  102|      0|    ptr += sizeof(CPPTYPE);                                                 \
  |  |  103|      0|    if (extension.is_repeated) {                                            \
  |  |  ------------------
  |  |  |  Branch (103:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|      Add##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE,          \
  |  |  105|      0|                         extension.is_packed, value, extension.descriptor); \
  |  |  106|      0|    } else {                                                                \
  |  |  107|      0|      Set##CPP_CAMELCASE(number, WireFormatLite::TYPE_##UPPERCASE, value,   \
  |  |  108|      0|                         extension.descriptor);                             \
  |  |  109|      0|    }                                                                       \
  |  |  110|      0|  } break
  ------------------
  118|      0|#undef HANDLE_FIXED_TYPE
  119|       |
  120|      0|      case WireFormatLite::TYPE_ENUM: {
  ------------------
  |  Branch (120:7): [True: 0, False: 8]
  ------------------
  121|      0|        uint64_t tmp;
  122|      0|        ptr = VarintParse(ptr, &tmp);
  123|      0|        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
  ------------------
  |  | 1157|      0|  GOOGLE_PROTOBUF_ASSERT_RETURN(predicate, nullptr)
  |  |  ------------------
  |  |  |  | 1150|      0|  if (!(predicate)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1150:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1151|      0|    /*  ::raise(SIGINT);  */                           \
  |  |  |  | 1152|      0|    /*  ABSL_LOG(ERROR) << "Parse failure";  */        \
  |  |  |  | 1153|      0|    return ret;                                        \
  |  |  |  | 1154|      0|  }
  |  |  ------------------
  ------------------
  124|      0|        int value = tmp;
  125|       |
  126|      0|        if (!extension.enum_validity_check.func(
  ------------------
  |  Branch (126:13): [True: 0, False: 0]
  ------------------
  127|      0|                extension.enum_validity_check.arg, value)) {
  128|      0|          WriteVarint(number, value, metadata->mutable_unknown_fields<T>());
  129|      0|        } else if (extension.is_repeated) {
  ------------------
  |  Branch (129:20): [True: 0, False: 0]
  ------------------
  130|      0|          AddEnum(number, WireFormatLite::TYPE_ENUM, extension.is_packed, value,
  131|      0|                  extension.descriptor);
  132|      0|        } else {
  133|      0|          SetEnum(number, WireFormatLite::TYPE_ENUM, value,
  134|      0|                  extension.descriptor);
  135|      0|        }
  136|      0|        break;
  137|      0|      }
  138|       |
  139|      0|      case WireFormatLite::TYPE_BYTES:
  ------------------
  |  Branch (139:7): [True: 0, False: 8]
  ------------------
  140|      0|      case WireFormatLite::TYPE_STRING: {
  ------------------
  |  Branch (140:7): [True: 0, False: 8]
  ------------------
  141|      0|        std::string* value =
  142|      0|            extension.is_repeated
  ------------------
  |  Branch (142:13): [True: 0, False: 0]
  ------------------
  143|      0|                ? AddString(number, WireFormatLite::TYPE_STRING,
  144|      0|                            extension.descriptor)
  145|      0|                : MutableString(number, WireFormatLite::TYPE_STRING,
  146|      0|                                extension.descriptor);
  147|      0|        int size = ReadSize(&ptr);
  148|      0|        GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
  ------------------
  |  | 1157|      0|  GOOGLE_PROTOBUF_ASSERT_RETURN(predicate, nullptr)
  |  |  ------------------
  |  |  |  | 1150|      0|  if (!(predicate)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1150:7): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1151|      0|    /*  ::raise(SIGINT);  */                           \
  |  |  |  | 1152|      0|    /*  ABSL_LOG(ERROR) << "Parse failure";  */        \
  |  |  |  | 1153|      0|    return ret;                                        \
  |  |  |  | 1154|      0|  }
  |  |  ------------------
  ------------------
  149|      0|        return ctx->ReadString(ptr, size, value);
  150|      0|      }
  151|       |
  152|      0|      case WireFormatLite::TYPE_GROUP: {
  ------------------
  |  Branch (152:7): [True: 0, False: 8]
  ------------------
  153|      0|        MessageLite* value =
  154|      0|            extension.is_repeated
  ------------------
  |  Branch (154:13): [True: 0, False: 0]
  ------------------
  155|      0|                ? AddMessage(number, WireFormatLite::TYPE_GROUP,
  156|      0|                             *extension.message_info.prototype,
  157|      0|                             extension.descriptor)
  158|      0|                : MutableMessage(number, WireFormatLite::TYPE_GROUP,
  159|      0|                                 *extension.message_info.prototype,
  160|      0|                                 extension.descriptor);
  161|      0|        uint32_t tag = (number << 3) + WireFormatLite::WIRETYPE_START_GROUP;
  162|      0|        return ctx->ParseGroup(value, ptr, tag);
  163|      0|      }
  164|       |
  165|      8|      case WireFormatLite::TYPE_MESSAGE: {
  ------------------
  |  Branch (165:7): [True: 8, False: 0]
  ------------------
  166|      8|        MessageLite* value =
  167|      8|            extension.is_repeated
  ------------------
  |  Branch (167:13): [True: 0, False: 8]
  ------------------
  168|      8|                ? AddMessage(number, WireFormatLite::TYPE_MESSAGE,
  169|      0|                             *extension.message_info.prototype,
  170|      0|                             extension.descriptor)
  171|      8|                : MutableMessage(number, WireFormatLite::TYPE_MESSAGE,
  172|      8|                                 *extension.message_info.prototype,
  173|      8|                                 extension.descriptor);
  174|      8|        return ctx->ParseMessage(value, ptr);
  175|      0|      }
  176|      8|    }
  177|      8|  }
  178|      0|  return ptr;
  179|      8|}

_ZN6google8protobuf15FeatureResolver6CreateENS0_7EditionERKNS0_18FeatureSetDefaultsE:
  490|      4|    Edition edition, const FeatureSetDefaults& compiled_defaults) {
  491|      4|  if (edition < compiled_defaults.minimum_edition()) {
  ------------------
  |  Branch (491:7): [True: 0, False: 4]
  ------------------
  492|      0|    return Error("Edition ", edition,
  493|      0|                 " is earlier than the minimum supported edition ",
  494|      0|                 compiled_defaults.minimum_edition());
  495|      0|  }
  496|      4|  if (compiled_defaults.maximum_edition() < edition) {
  ------------------
  |  Branch (496:7): [True: 0, False: 4]
  ------------------
  497|      0|    return Error("Edition ", edition,
  498|      0|                 " is later than the maximum supported edition ",
  499|      0|                 compiled_defaults.maximum_edition());
  500|      0|  }
  501|       |
  502|       |  // Validate compiled defaults.
  503|      4|  Edition prev_edition = EDITION_UNKNOWN;
  504|     16|  for (const auto& edition_default : compiled_defaults.defaults()) {
  ------------------
  |  Branch (504:36): [True: 16, False: 4]
  ------------------
  505|     16|    if (edition_default.edition() == EDITION_UNKNOWN) {
  ------------------
  |  Branch (505:9): [True: 0, False: 16]
  ------------------
  506|      0|      return Error("Invalid edition ", edition_default.edition(),
  507|      0|                   " specified.");
  508|      0|    }
  509|     16|    if (prev_edition != EDITION_UNKNOWN) {
  ------------------
  |  Branch (509:9): [True: 12, False: 4]
  ------------------
  510|     12|      if (edition_default.edition() <= prev_edition) {
  ------------------
  |  Branch (510:11): [True: 0, False: 12]
  ------------------
  511|      0|        return Error(
  512|      0|            "Feature set defaults are not strictly increasing.  Edition ",
  513|      0|            prev_edition, " is greater than or equal to edition ",
  514|      0|            edition_default.edition(), ".");
  515|      0|      }
  516|     12|    }
  517|     16|    FeatureSet features = edition_default.fixed_features();
  518|     16|    features.MergeFrom(edition_default.overridable_features());
  519|     16|    RETURN_IF_ERROR(ValidateMergedFeatures(features));
  ------------------
  |  |   42|     16|  do {                                                         \
  |  |   43|     16|    const absl::Status _status = (expr);                       \
  |  |   44|     16|    if (PROTOBUF_PREDICT_FALSE(!_status.ok())) return _status; \
  |  |  ------------------
  |  |  |  |  365|     16|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (365:36): [True: 0, False: 16]
  |  |  |  |  |  Branch (365:54): [Folded, False: 16]
  |  |  |  |  |  Branch (365:63): [True: 0, False: 16]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|     16|  } while (0)
  |  |  ------------------
  |  |  |  Branch (45:12): [Folded, False: 16]
  |  |  ------------------
  ------------------
  520|       |
  521|     16|    prev_edition = edition_default.edition();
  522|     16|  }
  523|       |
  524|       |  // Select the matching edition defaults.
  525|      4|  auto comparator = [](const auto& a, const auto& b) {
  526|      4|    return a.edition() < b.edition();
  527|      4|  };
  528|      4|  FeatureSetDefaults::FeatureSetEditionDefault search;
  529|      4|  search.set_edition(edition);
  530|      4|  auto first_nonmatch =
  531|      4|      absl::c_upper_bound(compiled_defaults.defaults(), search, comparator);
  532|      4|  if (first_nonmatch == compiled_defaults.defaults().begin()) {
  ------------------
  |  Branch (532:7): [True: 0, False: 4]
  ------------------
  533|      0|    return Error("No valid default found for edition ", edition);
  534|      0|  }
  535|       |
  536|      4|  FeatureSet features = std::prev(first_nonmatch)->fixed_features();
  537|      4|  features.MergeFrom(std::prev(first_nonmatch)->overridable_features());
  538|      4|  return FeatureResolver(std::move(features));
  539|      4|}
_ZNK6google8protobuf15FeatureResolver13MergeFeaturesERKNS0_10FeatureSetES4_:
  542|    239|    const FeatureSet& merged_parent, const FeatureSet& unmerged_child) const {
  543|    239|  FeatureSet merged = defaults_;
  544|    239|  merged.MergeFrom(merged_parent);
  545|    239|  merged.MergeFrom(unmerged_child);
  546|       |
  547|    239|  RETURN_IF_ERROR(ValidateMergedFeatures(merged));
  ------------------
  |  |   42|    239|  do {                                                         \
  |  |   43|    239|    const absl::Status _status = (expr);                       \
  |  |   44|    239|    if (PROTOBUF_PREDICT_FALSE(!_status.ok())) return _status; \
  |  |  ------------------
  |  |  |  |  365|    239|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (365:36): [True: 0, False: 239]
  |  |  |  |  |  Branch (365:54): [Folded, False: 239]
  |  |  |  |  |  Branch (365:63): [True: 0, False: 239]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|    239|  } while (0)
  |  |  ------------------
  |  |  |  Branch (45:12): [Folded, False: 239]
  |  |  ------------------
  ------------------
  548|       |
  549|    239|  return merged;
  550|    239|}
feature_resolver.cc:_ZN6google8protobuf12_GLOBAL__N_122ValidateMergedFeaturesERKNS0_10FeatureSetE:
  334|    255|absl::Status ValidateMergedFeatures(const FeatureSet& features) {
  335|       |// Avoid using reflection here because this is called early in the descriptor
  336|       |// builds.  Instead, a reflection-based test will be used to keep this in sync
  337|       |// with descriptor.proto.  These checks should be run on every global feature
  338|       |// in FeatureSet.
  339|    255|#define CHECK_ENUM_FEATURE(FIELD, CAMELCASE, UPPERCASE)               \
  340|    255|  if (!FeatureSet::CAMELCASE##_IsValid(features.FIELD()) ||           \
  341|    255|      features.FIELD() == FeatureSet::UPPERCASE##_UNKNOWN) {          \
  342|    255|    return Error("Feature field `" #FIELD                             \
  343|    255|                 "` must resolve to a known value, found " #UPPERCASE \
  344|    255|                 "_UNKNOWN");                                         \
  345|    255|  }
  346|       |
  347|    255|  CHECK_ENUM_FEATURE(field_presence, FieldPresence, FIELD_PRESENCE)
  ------------------
  |  |  340|    255|  if (!FeatureSet::CAMELCASE##_IsValid(features.FIELD()) ||           \
  |  |  ------------------
  |  |  |  Branch (340:7): [True: 0, False: 255]
  |  |  ------------------
  |  |  341|    255|      features.FIELD() == FeatureSet::UPPERCASE##_UNKNOWN) {          \
  |  |  ------------------
  |  |  |  Branch (341:7): [True: 0, False: 255]
  |  |  ------------------
  |  |  342|      0|    return Error("Feature field `" #FIELD                             \
  |  |  343|      0|                 "` must resolve to a known value, found " #UPPERCASE \
  |  |  344|      0|                 "_UNKNOWN");                                         \
  |  |  345|      0|  }
  ------------------
  348|    255|  CHECK_ENUM_FEATURE(enum_type, EnumType, ENUM_TYPE)
  ------------------
  |  |  340|    255|  if (!FeatureSet::CAMELCASE##_IsValid(features.FIELD()) ||           \
  |  |  ------------------
  |  |  |  Branch (340:7): [True: 0, False: 255]
  |  |  ------------------
  |  |  341|    255|      features.FIELD() == FeatureSet::UPPERCASE##_UNKNOWN) {          \
  |  |  ------------------
  |  |  |  Branch (341:7): [True: 0, False: 255]
  |  |  ------------------
  |  |  342|      0|    return Error("Feature field `" #FIELD                             \
  |  |  343|      0|                 "` must resolve to a known value, found " #UPPERCASE \
  |  |  344|      0|                 "_UNKNOWN");                                         \
  |  |  345|      0|  }
  ------------------
  349|    255|  CHECK_ENUM_FEATURE(repeated_field_encoding, RepeatedFieldEncoding,
  ------------------
  |  |  340|    255|  if (!FeatureSet::CAMELCASE##_IsValid(features.FIELD()) ||           \
  |  |  ------------------
  |  |  |  Branch (340:7): [True: 0, False: 255]
  |  |  ------------------
  |  |  341|    255|      features.FIELD() == FeatureSet::UPPERCASE##_UNKNOWN) {          \
  |  |  ------------------
  |  |  |  Branch (341:7): [True: 0, False: 255]
  |  |  ------------------
  |  |  342|      0|    return Error("Feature field `" #FIELD                             \
  |  |  343|      0|                 "` must resolve to a known value, found " #UPPERCASE \
  |  |  344|      0|                 "_UNKNOWN");                                         \
  |  |  345|      0|  }
  ------------------
  350|    255|                     REPEATED_FIELD_ENCODING)
  351|    255|  CHECK_ENUM_FEATURE(utf8_validation, Utf8Validation, UTF8_VALIDATION)
  ------------------
  |  |  340|    255|  if (!FeatureSet::CAMELCASE##_IsValid(features.FIELD()) ||           \
  |  |  ------------------
  |  |  |  Branch (340:7): [True: 0, False: 255]
  |  |  ------------------
  |  |  341|    255|      features.FIELD() == FeatureSet::UPPERCASE##_UNKNOWN) {          \
  |  |  ------------------
  |  |  |  Branch (341:7): [True: 0, False: 255]
  |  |  ------------------
  |  |  342|      0|    return Error("Feature field `" #FIELD                             \
  |  |  343|      0|                 "` must resolve to a known value, found " #UPPERCASE \
  |  |  344|      0|                 "_UNKNOWN");                                         \
  |  |  345|      0|  }
  ------------------
  352|    255|  CHECK_ENUM_FEATURE(message_encoding, MessageEncoding, MESSAGE_ENCODING)
  ------------------
  |  |  340|    255|  if (!FeatureSet::CAMELCASE##_IsValid(features.FIELD()) ||           \
  |  |  ------------------
  |  |  |  Branch (340:7): [True: 0, False: 255]
  |  |  ------------------
  |  |  341|    255|      features.FIELD() == FeatureSet::UPPERCASE##_UNKNOWN) {          \
  |  |  ------------------
  |  |  |  Branch (341:7): [True: 0, False: 255]
  |  |  ------------------
  |  |  342|      0|    return Error("Feature field `" #FIELD                             \
  |  |  343|      0|                 "` must resolve to a known value, found " #UPPERCASE \
  |  |  344|      0|                 "_UNKNOWN");                                         \
  |  |  345|      0|  }
  ------------------
  353|    255|  CHECK_ENUM_FEATURE(json_format, JsonFormat, JSON_FORMAT)
  ------------------
  |  |  340|    255|  if (!FeatureSet::CAMELCASE##_IsValid(features.FIELD()) ||           \
  |  |  ------------------
  |  |  |  Branch (340:7): [True: 0, False: 255]
  |  |  ------------------
  |  |  341|    255|      features.FIELD() == FeatureSet::UPPERCASE##_UNKNOWN) {          \
  |  |  ------------------
  |  |  |  Branch (341:7): [True: 0, False: 255]
  |  |  ------------------
  |  |  342|      0|    return Error("Feature field `" #FIELD                             \
  |  |  343|      0|                 "` must resolve to a known value, found " #UPPERCASE \
  |  |  344|      0|                 "_UNKNOWN");                                         \
  |  |  345|      0|  }
  ------------------
  354|       |
  355|    255|#undef CHECK_ENUM_FEATURE
  356|       |
  357|    255|  return absl::OkStatus();
  358|    255|}
feature_resolver.cc:_ZZN6google8protobuf15FeatureResolver6CreateENS0_7EditionERKNS0_18FeatureSetDefaultsEENK3$_0clINS0_43FeatureSetDefaults_FeatureSetEditionDefaultES8_EEDaRKT_RKT0_:
  525|     10|  auto comparator = [](const auto& a, const auto& b) {
  526|     10|    return a.edition() < b.edition();
  527|     10|  };

_ZN6google8protobuf15FeatureResolverC2EOS1_:
   35|      8|  FeatureResolver(FeatureResolver&&) = default;
_ZN6google8protobuf15FeatureResolverC2ENS0_10FeatureSetE:
   78|      4|      : defaults_(std::move(defaults)) {}

_ZN6google8protobuf8internal12ValidateEnumEiPKj:
   80|      1|bool ValidateEnum(int value, const uint32_t* data) {
   81|      1|  return ValidateEnumInlined(value, data);
   82|      1|}

_ZN6google8protobuf8internal19ValidateEnumInlinedEiPKj:
   79|     94|                                                       const uint32_t* data) {
   80|     94|  const int16_t min_seq = static_cast<int16_t>(data[0] & 0xFFFF);
   81|     94|  const uint16_t length_seq = static_cast<uint16_t>(data[0] >> 16);
   82|     94|  uint64_t adjusted =
   83|     94|      static_cast<uint64_t>(static_cast<int64_t>(value)) - min_seq;
   84|       |  // Check if the value is within the sequential part.
   85|     94|  if (PROTOBUF_PREDICT_TRUE(adjusted < length_seq)) {
  ------------------
  |  |  364|     94|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 0, False: 94]
  |  |  |  Branch (364:53): [Folded, False: 94]
  |  |  |  Branch (364:62): [True: 0, False: 94]
  |  |  ------------------
  ------------------
   86|      0|    return true;
   87|      0|  }
   88|       |
   89|     94|  const uint16_t length_bitmap = static_cast<uint16_t>(data[1] & 0xFFFF);
   90|     94|  adjusted -= length_seq;
   91|       |  // Check if the value is within the bitmap.
   92|     94|  if (PROTOBUF_PREDICT_TRUE(adjusted < length_bitmap)) {
  ------------------
  |  |  364|     94|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 4, False: 90]
  |  |  |  Branch (364:53): [Folded, False: 94]
  |  |  |  Branch (364:62): [True: 4, False: 90]
  |  |  ------------------
  ------------------
   93|      4|    return ((data[2 + (adjusted / 32)] >> (adjusted % 32)) & 1) == 1;
   94|      4|  }
   95|       |
   96|       |  // Check if the value is on the ordered part.
   97|     90|  const uint16_t num_ordered = static_cast<uint16_t>(data[1] >> 16);
   98|     90|  data += 2 + length_bitmap / 32;
   99|     90|  size_t pos = 0;
  100|    286|  while (pos < num_ordered) {
  ------------------
  |  Branch (100:10): [True: 286, False: 0]
  ------------------
  101|    286|    const int32_t sample = static_cast<int32_t>(data[pos]);
  102|    286|    if (sample == value) return true;
  ------------------
  |  Branch (102:9): [True: 90, False: 196]
  ------------------
  103|    196|    pos = 2 * pos + (sample > value ? 1 : 2);
  ------------------
  |  Branch (103:22): [True: 166, False: 30]
  ------------------
  104|    196|  }
  105|      0|  return false;
  106|     90|}

_ZN6google8protobuf8internal40InitializeFileDescriptorDefaultInstancesEv:
   93|      6|void InitializeFileDescriptorDefaultInstances() {
   94|       |#if !defined(PROTOBUF_CONSTINIT_DEFAULT_INSTANCES)
   95|       |  static std::true_type init =
   96|       |      (InitializeFileDescriptorDefaultInstancesSlow(), std::true_type{});
   97|       |  (void)init;
   98|       |#endif  // !defined(PROTOBUF_CONSTINIT_DEFAULT_INSTANCES)
   99|      6|}
_ZN6google8protobuf8internal26InitializeLazyExtensionSetEv:
  101|      6|void InitializeLazyExtensionSet() {
  102|      6|}
_ZN6google8protobuf10ReflectionC2EPKNS0_10DescriptorERKNS0_8internal16ReflectionSchemaEPKNS0_14DescriptorPoolEPNS0_14MessageFactoryE:
  314|     47|    : descriptor_(descriptor),
  315|     47|      schema_(schema),
  316|       |      descriptor_pool_(
  317|     47|          (pool == nullptr) ? DescriptorPool::internal_generated_pool() : pool),
  ------------------
  |  Branch (317:11): [True: 0, False: 47]
  ------------------
  318|     47|      message_factory_(factory),
  319|     47|      last_non_weak_field_index_(-1) {
  320|     47|  last_non_weak_field_index_ = descriptor_->field_count() - 1;
  321|     47|}
_ZNK6google8protobuf10Reflection8HasFieldERKNS0_7MessageEPKNS0_15FieldDescriptorE:
 1224|  49.2k|                          const FieldDescriptor* field) const {
 1225|  49.2k|  USAGE_CHECK_MESSAGE(HasField, &message);
 1226|  49.2k|  USAGE_CHECK_MESSAGE_TYPE(HasField);
  ------------------
  |  |  286|  49.2k|  USAGE_CHECK_EQ(field->containing_type(), descriptor_, METHOD, \
  |  |  ------------------
  |  |  |  |  262|  49.2k|  USAGE_CHECK((A) == (B), METHOD, ERROR_DESCRIPTION)
  |  |  |  |  ------------------
  |  |  |  |  |  |  259|  49.2k|  if (!(CONDITION))                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (259:7): [True: 0, False: 49.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  260|  49.2k|  ReportReflectionUsageError(descriptor_, field, #METHOD, ERROR_DESCRIPTION)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  287|  49.2k|                 "Field does not match message type.");
  ------------------
 1227|  49.2k|  USAGE_CHECK_SINGULAR(HasField);
  ------------------
  |  |  289|  49.2k|  USAGE_CHECK_NE(field->label(), FieldDescriptor::LABEL_REPEATED, METHOD, \
  |  |  ------------------
  |  |  |  |  264|  49.2k|  USAGE_CHECK((A) != (B), METHOD, ERROR_DESCRIPTION)
  |  |  |  |  ------------------
  |  |  |  |  |  |  259|  49.2k|  if (!(CONDITION))                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (259:7): [True: 0, False: 49.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  260|  49.2k|  ReportReflectionUsageError(descriptor_, field, #METHOD, ERROR_DESCRIPTION)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  290|  49.2k|                 "Field is repeated; the method requires a singular field.")
  ------------------
 1228|       |
 1229|  49.2k|  if (field->is_extension()) {
  ------------------
  |  Branch (1229:7): [True: 0, False: 49.2k]
  ------------------
 1230|      0|    return GetExtensionSet(message).Has(field->number());
 1231|  49.2k|  } else {
 1232|  49.2k|    if (schema_.InRealOneof(field)) {
  ------------------
  |  Branch (1232:9): [True: 3.11k, False: 46.1k]
  ------------------
 1233|  3.11k|      return HasOneofField(message, field);
 1234|  46.1k|    } else {
 1235|  46.1k|      return HasFieldSingular(message, field);
 1236|  46.1k|    }
 1237|  49.2k|  }
 1238|  49.2k|}
_ZNK6google8protobuf10Reflection9FieldSizeERKNS0_7MessageEPKNS0_15FieldDescriptorE:
 1325|  25.8k|                          const FieldDescriptor* field) const {
 1326|  25.8k|  USAGE_CHECK_MESSAGE(FieldSize, &message);
 1327|  25.8k|  USAGE_CHECK_MESSAGE_TYPE(FieldSize);
  ------------------
  |  |  286|  25.8k|  USAGE_CHECK_EQ(field->containing_type(), descriptor_, METHOD, \
  |  |  ------------------
  |  |  |  |  262|  25.8k|  USAGE_CHECK((A) == (B), METHOD, ERROR_DESCRIPTION)
  |  |  |  |  ------------------
  |  |  |  |  |  |  259|  25.8k|  if (!(CONDITION))                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (259:7): [True: 0, False: 25.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  260|  25.8k|  ReportReflectionUsageError(descriptor_, field, #METHOD, ERROR_DESCRIPTION)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  287|  25.8k|                 "Field does not match message type.");
  ------------------
 1328|  25.8k|  USAGE_CHECK_REPEATED(FieldSize);
  ------------------
  |  |  292|  25.8k|  USAGE_CHECK_EQ(field->label(), FieldDescriptor::LABEL_REPEATED, METHOD, \
  |  |  ------------------
  |  |  |  |  262|  25.8k|  USAGE_CHECK((A) == (B), METHOD, ERROR_DESCRIPTION)
  |  |  |  |  ------------------
  |  |  |  |  |  |  259|  25.8k|  if (!(CONDITION))                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (259:7): [True: 0, False: 25.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  260|  25.8k|  ReportReflectionUsageError(descriptor_, field, #METHOD, ERROR_DESCRIPTION)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  293|  25.8k|                 "Field is singular; the method requires a repeated field.")
  ------------------
 1329|       |
 1330|  25.8k|  if (field->is_extension()) {
  ------------------
  |  Branch (1330:7): [True: 0, False: 25.8k]
  ------------------
 1331|      0|    return GetExtensionSet(message).ExtensionSize(field->number());
 1332|  25.8k|  } else {
 1333|  25.8k|    switch (field->cpp_type()) {
  ------------------
  |  Branch (1333:13): [True: 25.8k, False: 0]
  ------------------
 1334|      0|#define HANDLE_TYPE(UPPERCASE, LOWERCASE)    \
 1335|      0|  case FieldDescriptor::CPPTYPE_##UPPERCASE: \
 1336|      0|    return GetRaw<RepeatedField<LOWERCASE> >(message, field).size()
 1337|       |
 1338|      0|      HANDLE_TYPE(INT32, int32_t);
  ------------------
  |  | 1335|      0|  case FieldDescriptor::CPPTYPE_##UPPERCASE: \
  |  |  ------------------
  |  |  |  Branch (1335:3): [True: 0, False: 25.8k]
  |  |  ------------------
  |  | 1336|      0|    return GetRaw<RepeatedField<LOWERCASE> >(message, field).size()
  ------------------
 1339|      0|      HANDLE_TYPE(INT64, int64_t);
  ------------------
  |  | 1335|      0|  case FieldDescriptor::CPPTYPE_##UPPERCASE: \
  |  |  ------------------
  |  |  |  Branch (1335:3): [True: 0, False: 25.8k]
  |  |  ------------------
  |  | 1336|      0|    return GetRaw<RepeatedField<LOWERCASE> >(message, field).size()
  ------------------
 1340|      0|      HANDLE_TYPE(UINT32, uint32_t);
  ------------------
  |  | 1335|      0|  case FieldDescriptor::CPPTYPE_##UPPERCASE: \
  |  |  ------------------
  |  |  |  Branch (1335:3): [True: 0, False: 25.8k]
  |  |  ------------------
  |  | 1336|      0|    return GetRaw<RepeatedField<LOWERCASE> >(message, field).size()
  ------------------
 1341|      0|      HANDLE_TYPE(UINT64, uint64_t);
  ------------------
  |  | 1335|      0|  case FieldDescriptor::CPPTYPE_##UPPERCASE: \
  |  |  ------------------
  |  |  |  Branch (1335:3): [True: 0, False: 25.8k]
  |  |  ------------------
  |  | 1336|      0|    return GetRaw<RepeatedField<LOWERCASE> >(message, field).size()
  ------------------
 1342|      0|      HANDLE_TYPE(DOUBLE, double);
  ------------------
  |  | 1335|      0|  case FieldDescriptor::CPPTYPE_##UPPERCASE: \
  |  |  ------------------
  |  |  |  Branch (1335:3): [True: 0, False: 25.8k]
  |  |  ------------------
  |  | 1336|      0|    return GetRaw<RepeatedField<LOWERCASE> >(message, field).size()
  ------------------
 1343|      0|      HANDLE_TYPE(FLOAT, float);
  ------------------
  |  | 1335|      0|  case FieldDescriptor::CPPTYPE_##UPPERCASE: \
  |  |  ------------------
  |  |  |  Branch (1335:3): [True: 0, False: 25.8k]
  |  |  ------------------
  |  | 1336|      0|    return GetRaw<RepeatedField<LOWERCASE> >(message, field).size()
  ------------------
 1344|      0|      HANDLE_TYPE(BOOL, bool);
  ------------------
  |  | 1335|      0|  case FieldDescriptor::CPPTYPE_##UPPERCASE: \
  |  |  ------------------
  |  |  |  Branch (1335:3): [True: 0, False: 25.8k]
  |  |  ------------------
  |  | 1336|      0|    return GetRaw<RepeatedField<LOWERCASE> >(message, field).size()
  ------------------
 1345|      0|      HANDLE_TYPE(ENUM, int);
  ------------------
  |  | 1335|      0|  case FieldDescriptor::CPPTYPE_##UPPERCASE: \
  |  |  ------------------
  |  |  |  Branch (1335:3): [True: 0, False: 25.8k]
  |  |  ------------------
  |  | 1336|      0|    return GetRaw<RepeatedField<LOWERCASE> >(message, field).size()
  ------------------
 1346|      0|#undef HANDLE_TYPE
 1347|       |
 1348|      0|      case FieldDescriptor::CPPTYPE_STRING:
  ------------------
  |  Branch (1348:7): [True: 0, False: 25.8k]
  ------------------
 1349|      0|        if (field->cpp_string_type() == FieldDescriptor::CppStringType::kCord) {
  ------------------
  |  Branch (1349:13): [True: 0, False: 0]
  ------------------
 1350|      0|          return GetRaw<RepeatedField<absl::Cord> >(message, field).size();
 1351|      0|        }
 1352|      0|        ABSL_FALLTHROUGH_INTENDED;
  ------------------
  |  |  644|      0|#define ABSL_FALLTHROUGH_INTENDED [[fallthrough]]
  ------------------
 1353|  25.8k|      case FieldDescriptor::CPPTYPE_MESSAGE:
  ------------------
  |  Branch (1353:7): [True: 25.8k, False: 0]
  ------------------
 1354|  25.8k|        if (IsMapFieldInApi(field)) {
  ------------------
  |  Branch (1354:13): [True: 0, False: 25.8k]
  ------------------
 1355|      0|          const internal::MapFieldBase& map =
 1356|      0|              GetRaw<MapFieldBase>(message, field);
 1357|      0|          if (map.IsRepeatedFieldValid()) {
  ------------------
  |  Branch (1357:15): [True: 0, False: 0]
  ------------------
 1358|      0|            return map.GetRepeatedField().size();
 1359|      0|          } else {
 1360|       |            // No need to materialize the repeated field if it is out of sync:
 1361|       |            // its size will be the same as the map's size.
 1362|      0|            return map.size();
 1363|      0|          }
 1364|  25.8k|        } else {
 1365|  25.8k|          return GetRaw<RepeatedPtrFieldBase>(message, field).size();
 1366|  25.8k|        }
 1367|  25.8k|    }
 1368|       |
 1369|      0|    ABSL_LOG(FATAL) << "Can't get here.";
  ------------------
  |  |   38|      0|#define ABSL_LOG(severity) ABSL_LOG_INTERNAL_LOG_IMPL(_##severity)
  |  |  ------------------
  |  |  |  |   25|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, true) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   26|  25.8k|      ABSL_LOGGING_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|  25.8k|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1370|      0|    return 0;
 1371|      0|  }
 1372|  25.8k|}
_ZNK6google8protobuf10Reflection10GetMessageERKNS0_7MessageEPKNS0_15FieldDescriptorEPNS0_14MessageFactoryE:
 2340|  5.86k|                                      MessageFactory* factory) const {
 2341|  5.86k|  USAGE_CHECK_ALL(GetMessage, SINGULAR, MESSAGE);
  ------------------
  |  |  296|  5.86k|  USAGE_CHECK_MESSAGE(METHOD, &message);        \
  |  |  297|  5.86k|  USAGE_CHECK_MESSAGE_TYPE(METHOD);             \
  |  |  ------------------
  |  |  |  |  286|  5.86k|  USAGE_CHECK_EQ(field->containing_type(), descriptor_, METHOD, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  262|  5.86k|  USAGE_CHECK((A) == (B), METHOD, ERROR_DESCRIPTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  259|  5.86k|  if (!(CONDITION))                                       \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (259:7): [True: 0, False: 5.86k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  260|  5.86k|  ReportReflectionUsageError(descriptor_, field, #METHOD, ERROR_DESCRIPTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  287|  5.86k|                 "Field does not match message type.");
  |  |  ------------------
  |  |  298|  5.86k|  USAGE_CHECK_##LABEL(METHOD);                  \
  |  |  ------------------
  |  |  |  |  289|  5.86k|  USAGE_CHECK_NE(field->label(), FieldDescriptor::LABEL_REPEATED, METHOD, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  264|  5.86k|  USAGE_CHECK((A) != (B), METHOD, ERROR_DESCRIPTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  259|  5.86k|  if (!(CONDITION))                                       \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (259:7): [True: 0, False: 5.86k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  260|  5.86k|  ReportReflectionUsageError(descriptor_, field, #METHOD, ERROR_DESCRIPTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  290|  5.86k|                 "Field is repeated; the method requires a singular field.")
  |  |  ------------------
  |  |  299|  5.86k|  USAGE_CHECK_TYPE(METHOD, CPPTYPE)
  |  |  ------------------
  |  |  |  |  267|  5.86k|  if (field->cpp_type() != FieldDescriptor::CPPTYPE_##CPPTYPE) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (267:7): [True: 0, False: 5.86k]
  |  |  |  |  ------------------
  |  |  |  |  268|  5.86k|  ReportReflectionUsageTypeError(descriptor_, field, #METHOD,  \
  |  |  |  |  269|      0|                                 FieldDescriptor::CPPTYPE_##CPPTYPE)
  |  |  ------------------
  ------------------
 2342|       |
 2343|  5.86k|  if (factory == nullptr) factory = message_factory_;
  ------------------
  |  Branch (2343:7): [True: 5.86k, False: 0]
  ------------------
 2344|       |
 2345|  5.86k|  if (field->is_extension()) {
  ------------------
  |  Branch (2345:7): [True: 0, False: 5.86k]
  ------------------
 2346|      0|    return static_cast<const Message&>(GetExtensionSet(message).GetMessage(
 2347|      0|        field->number(), field->message_type(), factory));
 2348|  5.86k|  } else {
 2349|  5.86k|    if (schema_.InRealOneof(field) && !HasOneofField(message, field)) {
  ------------------
  |  Branch (2349:9): [True: 772, False: 5.09k]
  |  Branch (2349:39): [True: 0, False: 772]
  ------------------
 2350|      0|      return *GetDefaultMessageInstance(field);
 2351|      0|    }
 2352|  5.86k|    const Message* result = GetRaw<const Message*>(message, field);
 2353|  5.86k|    if (result == nullptr) {
  ------------------
  |  Branch (2353:9): [True: 0, False: 5.86k]
  ------------------
 2354|      0|      result = GetDefaultMessageInstance(field);
 2355|      0|    }
 2356|  5.86k|    return *result;
 2357|  5.86k|  }
 2358|  5.86k|}
_ZNK6google8protobuf10Reflection14MutableMessageEPNS0_7MessageEPKNS0_15FieldDescriptorEPNS0_14MessageFactoryE:
 2362|  5.86k|                                    MessageFactory* factory) const {
 2363|  5.86k|  USAGE_MUTABLE_CHECK_ALL(MutableMessage, SINGULAR, MESSAGE);
  ------------------
  |  |  302|  5.86k|  USAGE_CHECK_MESSAGE(METHOD, message);                 \
  |  |  303|  5.86k|  USAGE_CHECK_MESSAGE_TYPE(METHOD);                     \
  |  |  ------------------
  |  |  |  |  286|  5.86k|  USAGE_CHECK_EQ(field->containing_type(), descriptor_, METHOD, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  262|  5.86k|  USAGE_CHECK((A) == (B), METHOD, ERROR_DESCRIPTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  259|  5.86k|  if (!(CONDITION))                                       \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (259:7): [True: 0, False: 5.86k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  260|  5.86k|  ReportReflectionUsageError(descriptor_, field, #METHOD, ERROR_DESCRIPTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  287|  5.86k|                 "Field does not match message type.");
  |  |  ------------------
  |  |  304|  5.86k|  USAGE_CHECK_##LABEL(METHOD);                          \
  |  |  ------------------
  |  |  |  |  289|  5.86k|  USAGE_CHECK_NE(field->label(), FieldDescriptor::LABEL_REPEATED, METHOD, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  264|  5.86k|  USAGE_CHECK((A) != (B), METHOD, ERROR_DESCRIPTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  259|  5.86k|  if (!(CONDITION))                                       \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (259:7): [True: 0, False: 5.86k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  260|  5.86k|  ReportReflectionUsageError(descriptor_, field, #METHOD, ERROR_DESCRIPTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  290|  5.86k|                 "Field is repeated; the method requires a singular field.")
  |  |  ------------------
  |  |  305|  5.86k|  USAGE_CHECK_TYPE(METHOD, CPPTYPE)
  |  |  ------------------
  |  |  |  |  267|  5.86k|  if (field->cpp_type() != FieldDescriptor::CPPTYPE_##CPPTYPE) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (267:7): [True: 0, False: 5.86k]
  |  |  |  |  ------------------
  |  |  |  |  268|  5.86k|  ReportReflectionUsageTypeError(descriptor_, field, #METHOD,  \
  |  |  |  |  269|      0|                                 FieldDescriptor::CPPTYPE_##CPPTYPE)
  |  |  ------------------
  ------------------
 2364|       |
 2365|  5.86k|  if (factory == nullptr) factory = message_factory_;
  ------------------
  |  Branch (2365:7): [True: 5.86k, False: 0]
  ------------------
 2366|       |
 2367|  5.86k|  if (field->is_extension()) {
  ------------------
  |  Branch (2367:7): [True: 0, False: 5.86k]
  ------------------
 2368|      0|    return static_cast<Message*>(
 2369|      0|        MutableExtensionSet(message)->MutableMessage(field, factory));
 2370|  5.86k|  } else {
 2371|  5.86k|    Message* result;
 2372|       |
 2373|  5.86k|    Message** result_holder = MutableRaw<Message*>(message, field);
 2374|       |
 2375|  5.86k|    if (schema_.InRealOneof(field)) {
  ------------------
  |  Branch (2375:9): [True: 772, False: 5.09k]
  ------------------
 2376|    772|      if (!HasOneofField(*message, field)) {
  ------------------
  |  Branch (2376:11): [True: 0, False: 772]
  ------------------
 2377|      0|        ClearOneof(message, field->containing_oneof());
 2378|      0|        result_holder = MutableField<Message*>(message, field);
 2379|      0|        const Message* default_message = GetDefaultMessageInstance(field);
 2380|      0|        *result_holder = default_message->New(message->GetArena());
 2381|      0|      }
 2382|  5.09k|    } else {
 2383|  5.09k|      SetHasBit(message, field);
 2384|  5.09k|    }
 2385|       |
 2386|  5.86k|    if (*result_holder == nullptr) {
  ------------------
  |  Branch (2386:9): [True: 0, False: 5.86k]
  ------------------
 2387|      0|      const Message* default_message = GetDefaultMessageInstance(field);
 2388|      0|      *result_holder = default_message->New(message->GetArena());
 2389|      0|    }
 2390|  5.86k|    result = *result_holder;
 2391|  5.86k|    return result;
 2392|  5.86k|  }
 2393|  5.86k|}
_ZNK6google8protobuf10Reflection18GetRepeatedMessageERKNS0_7MessageEPKNS0_15FieldDescriptorEi:
 2511|  17.2k|                                              int index) const {
 2512|  17.2k|  USAGE_CHECK_ALL(GetRepeatedMessage, REPEATED, MESSAGE);
  ------------------
  |  |  296|  17.2k|  USAGE_CHECK_MESSAGE(METHOD, &message);        \
  |  |  297|  17.2k|  USAGE_CHECK_MESSAGE_TYPE(METHOD);             \
  |  |  ------------------
  |  |  |  |  286|  17.2k|  USAGE_CHECK_EQ(field->containing_type(), descriptor_, METHOD, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  262|  17.2k|  USAGE_CHECK((A) == (B), METHOD, ERROR_DESCRIPTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  259|  17.2k|  if (!(CONDITION))                                       \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (259:7): [True: 0, False: 17.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  260|  17.2k|  ReportReflectionUsageError(descriptor_, field, #METHOD, ERROR_DESCRIPTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  287|  17.2k|                 "Field does not match message type.");
  |  |  ------------------
  |  |  298|  17.2k|  USAGE_CHECK_##LABEL(METHOD);                  \
  |  |  ------------------
  |  |  |  |  292|  17.2k|  USAGE_CHECK_EQ(field->label(), FieldDescriptor::LABEL_REPEATED, METHOD, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  262|  17.2k|  USAGE_CHECK((A) == (B), METHOD, ERROR_DESCRIPTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  259|  17.2k|  if (!(CONDITION))                                       \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (259:7): [True: 0, False: 17.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  260|  17.2k|  ReportReflectionUsageError(descriptor_, field, #METHOD, ERROR_DESCRIPTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  293|  17.2k|                 "Field is singular; the method requires a repeated field.")
  |  |  ------------------
  |  |  299|  17.2k|  USAGE_CHECK_TYPE(METHOD, CPPTYPE)
  |  |  ------------------
  |  |  |  |  267|  17.2k|  if (field->cpp_type() != FieldDescriptor::CPPTYPE_##CPPTYPE) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (267:7): [True: 0, False: 17.2k]
  |  |  |  |  ------------------
  |  |  |  |  268|  17.2k|  ReportReflectionUsageTypeError(descriptor_, field, #METHOD,  \
  |  |  |  |  269|      0|                                 FieldDescriptor::CPPTYPE_##CPPTYPE)
  |  |  ------------------
  ------------------
 2513|       |
 2514|  17.2k|  if (field->is_extension()) {
  ------------------
  |  Branch (2514:7): [True: 0, False: 17.2k]
  ------------------
 2515|      0|    return static_cast<const Message&>(
 2516|      0|        GetExtensionSet(message).GetRepeatedMessage(field->number(), index));
 2517|  17.2k|  } else {
 2518|  17.2k|    if (IsMapFieldInApi(field)) {
  ------------------
  |  Branch (2518:9): [True: 0, False: 17.2k]
  ------------------
 2519|      0|      return GetRaw<MapFieldBase>(message, field)
 2520|      0|          .GetRepeatedField()
 2521|      0|          .Get<GenericTypeHandler<Message> >(index);
 2522|  17.2k|    } else {
 2523|  17.2k|      return GetRaw<RepeatedPtrFieldBase>(message, field)
 2524|  17.2k|          .Get<GenericTypeHandler<Message> >(index);
 2525|  17.2k|    }
 2526|  17.2k|  }
 2527|  17.2k|}
_ZNK6google8protobuf10Reflection22MutableRepeatedMessageEPNS0_7MessageEPKNS0_15FieldDescriptorEi:
 2531|  17.2k|                                            int index) const {
 2532|  17.2k|  USAGE_MUTABLE_CHECK_ALL(MutableRepeatedMessage, REPEATED, MESSAGE);
  ------------------
  |  |  302|  17.2k|  USAGE_CHECK_MESSAGE(METHOD, message);                 \
  |  |  303|  17.2k|  USAGE_CHECK_MESSAGE_TYPE(METHOD);                     \
  |  |  ------------------
  |  |  |  |  286|  17.2k|  USAGE_CHECK_EQ(field->containing_type(), descriptor_, METHOD, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  262|  17.2k|  USAGE_CHECK((A) == (B), METHOD, ERROR_DESCRIPTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  259|  17.2k|  if (!(CONDITION))                                       \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (259:7): [True: 0, False: 17.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  260|  17.2k|  ReportReflectionUsageError(descriptor_, field, #METHOD, ERROR_DESCRIPTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  287|  17.2k|                 "Field does not match message type.");
  |  |  ------------------
  |  |  304|  17.2k|  USAGE_CHECK_##LABEL(METHOD);                          \
  |  |  ------------------
  |  |  |  |  292|  17.2k|  USAGE_CHECK_EQ(field->label(), FieldDescriptor::LABEL_REPEATED, METHOD, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  262|  17.2k|  USAGE_CHECK((A) == (B), METHOD, ERROR_DESCRIPTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  259|  17.2k|  if (!(CONDITION))                                       \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (259:7): [True: 0, False: 17.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  260|  17.2k|  ReportReflectionUsageError(descriptor_, field, #METHOD, ERROR_DESCRIPTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  293|  17.2k|                 "Field is singular; the method requires a repeated field.")
  |  |  ------------------
  |  |  305|  17.2k|  USAGE_CHECK_TYPE(METHOD, CPPTYPE)
  |  |  ------------------
  |  |  |  |  267|  17.2k|  if (field->cpp_type() != FieldDescriptor::CPPTYPE_##CPPTYPE) \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (267:7): [True: 0, False: 17.2k]
  |  |  |  |  ------------------
  |  |  |  |  268|  17.2k|  ReportReflectionUsageTypeError(descriptor_, field, #METHOD,  \
  |  |  |  |  269|      0|                                 FieldDescriptor::CPPTYPE_##CPPTYPE)
  |  |  ------------------
  ------------------
 2533|       |
 2534|  17.2k|  if (field->is_extension()) {
  ------------------
  |  Branch (2534:7): [True: 0, False: 17.2k]
  ------------------
 2535|      0|    return static_cast<Message*>(
 2536|      0|        MutableExtensionSet(message)->MutableRepeatedMessage(field->number(),
 2537|      0|                                                             index));
 2538|  17.2k|  } else {
 2539|  17.2k|    if (IsMapFieldInApi(field)) {
  ------------------
  |  Branch (2539:9): [True: 0, False: 17.2k]
  ------------------
 2540|      0|      return MutableRaw<MapFieldBase>(message, field)
 2541|      0|          ->MutableRepeatedField()
 2542|      0|          ->Mutable<GenericTypeHandler<Message> >(index);
 2543|  17.2k|    } else {
 2544|  17.2k|      return MutableRaw<RepeatedPtrFieldBase>(message, field)
 2545|  17.2k|          ->Mutable<GenericTypeHandler<Message> >(index);
 2546|  17.2k|    }
 2547|  17.2k|  }
 2548|  17.2k|}
_ZNK6google8protobuf10Reflection22MutableRawNonOneofImplEPNS0_7MessageEPKNS0_15FieldDescriptorE:
 2825|  22.3k|                                         const FieldDescriptor* field) const {
 2826|  22.3k|  if (PROTOBUF_PREDICT_FALSE(schema_.IsSplit(field))) {
  ------------------
  |  |  365|  22.3k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 22.3k]
  |  |  |  Branch (365:54): [Folded, False: 22.3k]
  |  |  |  Branch (365:63): [True: 0, False: 22.3k]
  |  |  ------------------
  ------------------
 2827|      0|    return MutableRawSplitImpl(message, field);
 2828|      0|  }
 2829|       |
 2830|  22.3k|  const uint32_t field_offset = schema_.GetFieldOffsetNonOneof(field);
 2831|  22.3k|  return GetPointerAtOffset<void>(message, field_offset);
 2832|  22.3k|}
_ZNK6google8protobuf10Reflection14MutableRawImplEPNS0_7MessageEPKNS0_15FieldDescriptorE:
 2835|  23.1k|                                 const FieldDescriptor* field) const {
 2836|  23.1k|  if (PROTOBUF_PREDICT_TRUE(!schema_.InRealOneof(field))) {
  ------------------
  |  |  364|  23.1k|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 22.3k, False: 772]
  |  |  |  Branch (364:53): [Folded, False: 23.1k]
  |  |  |  Branch (364:62): [True: 22.3k, False: 772]
  |  |  ------------------
  ------------------
 2837|  22.3k|    return MutableRawNonOneofImpl(message, field);
 2838|  22.3k|  }
 2839|       |
 2840|       |  // Oneof fields are not split.
 2841|    772|  ABSL_DCHECK(!schema_.IsSplit(field));
  ------------------
  |  |   47|    772|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  23.1k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  2.31k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    772|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  1.54k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  1.54k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 772, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    772|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 772]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|    772|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 772, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  2.31k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  2.31k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2842|       |
 2843|    772|  const uint32_t field_offset = schema_.GetFieldOffset(field);
 2844|    772|  return GetPointerAtOffset<void>(message, field_offset);
 2845|    772|}
_ZNK6google8protobuf10Reflection10GetHasBitsERKNS0_7MessageE:
 2847|  46.1k|const uint32_t* Reflection::GetHasBits(const Message& message) const {
 2848|  46.1k|  ABSL_DCHECK(schema_.HasHasbits());
  ------------------
  |  |   47|  46.1k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  46.1k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  92.3k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  46.1k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  92.3k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  92.3k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 46.1k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  46.1k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 46.1k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  46.1k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 46.1k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  92.3k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  92.3k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2849|  46.1k|  return &GetConstRefAtOffset<uint32_t>(message, schema_.HasBitsOffset());
 2850|  46.1k|}
_ZNK6google8protobuf10Reflection12GetOneofCaseERKNS0_7MessageEPKNS0_15OneofDescriptorE:
 2858|  4.66k|    const Message& message, const OneofDescriptor* oneof_descriptor) const {
 2859|  4.66k|  ABSL_DCHECK(!oneof_descriptor->is_synthetic());
  ------------------
  |  |   47|  4.66k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  4.66k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  9.32k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  4.66k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  9.32k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  9.32k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 4.66k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  4.66k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 4.66k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  4.66k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 4.66k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  9.32k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  9.32k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2860|  4.66k|  return internal::GetConstRefAtOffset<uint32_t>(
 2861|  4.66k|      message, schema_.GetOneofCaseOffset(oneof_descriptor));
 2862|  4.66k|}
_ZNK6google8protobuf10Reflection16HasFieldSingularERKNS0_7MessageEPKNS0_15FieldDescriptorE:
 2954|  46.1k|                                  const FieldDescriptor* field) const {
 2955|  46.1k|  ABSL_DCHECK(!field->options().weak());
  ------------------
  |  |   47|  46.1k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  46.1k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  92.3k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  46.1k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  92.3k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  92.3k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 46.1k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  46.1k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 46.1k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  46.1k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 46.1k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  92.3k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  92.3k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2956|  46.1k|  if (schema_.HasBitIndex(field) != static_cast<uint32_t>(-1)) {
  ------------------
  |  Branch (2956:7): [True: 46.1k, False: 0]
  ------------------
 2957|  46.1k|    return IsIndexInHasBitSet(GetHasBits(message), schema_.HasBitIndex(field));
 2958|  46.1k|  }
 2959|       |
 2960|       |  // proto3: no has-bits. All fields present except messages, which are
 2961|       |  // present only if their message-field pointer is non-null.
 2962|      0|  if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
  ------------------
  |  Branch (2962:7): [True: 0, False: 0]
  ------------------
 2963|      0|    return !schema_.IsDefaultInstance(message) &&
  ------------------
  |  Branch (2963:12): [True: 0, False: 0]
  ------------------
 2964|      0|           GetRaw<const Message*>(message, field) != nullptr;
  ------------------
  |  Branch (2964:12): [True: 0, False: 0]
  ------------------
 2965|      0|  } else {
 2966|       |    // Non-message field (and non-oneof, since that was handled in HasField()
 2967|       |    // before calling us), and singular (again, checked in HasField). So, this
 2968|       |    // field must be a scalar.
 2969|       |
 2970|       |    // Scalar primitive (numeric or string/bytes) fields are present if
 2971|       |    // their value is non-zero (numeric) or non-empty (string/bytes). N.B.:
 2972|       |    // we must use this definition here, rather than the "scalar fields
 2973|       |    // always present" in the proto3 docs, because MergeFrom() semantics
 2974|       |    // require presence as "present on wire", and reflection-based merge
 2975|       |    // (which uses HasField()) needs to be consistent with this.
 2976|      0|    switch (field->cpp_type()) {
  ------------------
  |  Branch (2976:13): [True: 0, False: 0]
  ------------------
 2977|      0|      case FieldDescriptor::CPPTYPE_STRING:
  ------------------
  |  Branch (2977:7): [True: 0, False: 0]
  ------------------
 2978|      0|        switch (field->cpp_string_type()) {
  ------------------
  |  Branch (2978:17): [True: 0, False: 0]
  ------------------
 2979|      0|          case FieldDescriptor::CppStringType::kCord:
  ------------------
  |  Branch (2979:11): [True: 0, False: 0]
  ------------------
 2980|      0|            return !GetField<const absl::Cord>(message, field).empty();
 2981|      0|          case FieldDescriptor::CppStringType::kView:
  ------------------
  |  Branch (2981:11): [True: 0, False: 0]
  ------------------
 2982|      0|          case FieldDescriptor::CppStringType::kString: {
  ------------------
  |  Branch (2982:11): [True: 0, False: 0]
  ------------------
 2983|      0|            if (IsInlined(field)) {
  ------------------
  |  Branch (2983:17): [True: 0, False: 0]
  ------------------
 2984|      0|              return !GetField<InlinedStringField>(message, field)
 2985|      0|                          .GetNoArena()
 2986|      0|                          .empty();
 2987|      0|            }
 2988|       |
 2989|      0|            return GetField<ArenaStringPtr>(message, field).Get().size() > 0;
 2990|      0|          }
 2991|      0|        }
 2992|      0|        internal::Unreachable();
 2993|      0|      case FieldDescriptor::CPPTYPE_BOOL:
  ------------------
  |  Branch (2993:7): [True: 0, False: 0]
  ------------------
 2994|      0|        return GetRaw<bool>(message, field) != false;
 2995|      0|      case FieldDescriptor::CPPTYPE_INT32:
  ------------------
  |  Branch (2995:7): [True: 0, False: 0]
  ------------------
 2996|      0|        return GetRaw<int32_t>(message, field) != 0;
 2997|      0|      case FieldDescriptor::CPPTYPE_INT64:
  ------------------
  |  Branch (2997:7): [True: 0, False: 0]
  ------------------
 2998|      0|        return GetRaw<int64_t>(message, field) != 0;
 2999|      0|      case FieldDescriptor::CPPTYPE_UINT32:
  ------------------
  |  Branch (2999:7): [True: 0, False: 0]
  ------------------
 3000|      0|        return GetRaw<uint32_t>(message, field) != 0;
 3001|      0|      case FieldDescriptor::CPPTYPE_UINT64:
  ------------------
  |  Branch (3001:7): [True: 0, False: 0]
  ------------------
 3002|      0|        return GetRaw<uint64_t>(message, field) != 0;
 3003|      0|      case FieldDescriptor::CPPTYPE_FLOAT:
  ------------------
  |  Branch (3003:7): [True: 0, False: 0]
  ------------------
 3004|      0|        static_assert(sizeof(uint32_t) == sizeof(float),
 3005|      0|                      "Code assumes uint32_t and float are the same size.");
 3006|      0|        return GetRaw<uint32_t>(message, field) != 0;
 3007|      0|      case FieldDescriptor::CPPTYPE_DOUBLE:
  ------------------
  |  Branch (3007:7): [True: 0, False: 0]
  ------------------
 3008|      0|        static_assert(sizeof(uint64_t) == sizeof(double),
 3009|      0|                      "Code assumes uint64_t and double are the same size.");
 3010|      0|        return GetRaw<uint64_t>(message, field) != 0;
 3011|      0|      case FieldDescriptor::CPPTYPE_ENUM:
  ------------------
  |  Branch (3011:7): [True: 0, False: 0]
  ------------------
 3012|      0|        return GetRaw<int>(message, field) != 0;
 3013|      0|      case FieldDescriptor::CPPTYPE_MESSAGE:
  ------------------
  |  Branch (3013:7): [True: 0, False: 0]
  ------------------
 3014|       |        // handled above; avoid warning
 3015|      0|        break;
 3016|      0|    }
 3017|      0|    ABSL_LOG(FATAL) << "Reached impossible case in HasFieldSingular().";
  ------------------
  |  |   38|      0|#define ABSL_LOG(severity) ABSL_LOG_INTERNAL_LOG_IMPL(_##severity)
  |  |  ------------------
  |  |  |  |   25|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, true) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   26|      0|      ABSL_LOGGING_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3018|      0|    return false;
 3019|      0|  }
 3020|      0|}
_ZNK6google8protobuf10Reflection9SetHasBitEPNS0_7MessageEPKNS0_15FieldDescriptorE:
 3023|  5.09k|                           const FieldDescriptor* field) const {
 3024|  5.09k|  ABSL_DCHECK(!field->options().weak());
  ------------------
  |  |   47|  5.09k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  5.09k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  10.1k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  5.09k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  10.1k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  10.1k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 5.09k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  5.09k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 5.09k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  5.09k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 5.09k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  10.1k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  10.1k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3025|  5.09k|  const uint32_t index = schema_.HasBitIndex(field);
 3026|  5.09k|  if (index == static_cast<uint32_t>(-1)) return;
  ------------------
  |  Branch (3026:7): [True: 0, False: 5.09k]
  ------------------
 3027|  5.09k|  MutableHasBits(message)[index / 32] |=
 3028|  5.09k|      (static_cast<uint32_t>(1) << (index % 32));
 3029|  5.09k|}
_ZN6google8protobuf8internal14AddDescriptorsEPKNS1_15DescriptorTableE:
 3720|      9|void AddDescriptors(const DescriptorTable* table) {
 3721|       |  // AddDescriptors is not thread safe. Callers need to ensure calls are
 3722|       |  // properly serialized. This function is only called pre-main by global
 3723|       |  // descriptors and we can assume single threaded access or it's called
 3724|       |  // by AssignDescriptorImpl which uses a mutex to sequence calls.
 3725|      9|  if (table->is_initialized) return;
  ------------------
  |  Branch (3725:7): [True: 3, False: 6]
  ------------------
 3726|      6|  table->is_initialized = true;
 3727|      6|  AddDescriptorsImpl(table);
 3728|      6|}
_ZN6google8protobuf8internal30AssignDescriptorsOnceInnerCallEPKNS1_15DescriptorTableE:
 3730|      4|void AssignDescriptorsOnceInnerCall(const DescriptorTable* table) {
 3731|      4|  MaybeInitializeLazyDescriptors(table);
 3732|      4|  AssignDescriptorsImpl(table, table->is_eager);
 3733|      4|}
generated_message_reflection.cc:_ZN6google8protobuf12_GLOBAL__N_115IsMapFieldInApiEPKNS0_15FieldDescriptorE:
   79|  60.4k|bool IsMapFieldInApi(const FieldDescriptor* field) { return field->is_map(); }
generated_message_reflection.cc:_ZN6google8protobuf12_GLOBAL__N_118IsIndexInHasBitSetEPKjj:
 1647|  46.1k|bool IsIndexInHasBitSet(const uint32_t* has_bit_set, uint32_t has_bit_index) {
 1648|  46.1k|  ABSL_DCHECK_NE(has_bit_index, ~0u);
  ------------------
  |  |   76|  46.1k|  ABSL_LOG_INTERNAL_DCHECK_NE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   88|  46.1k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  46.1k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 46.1k]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  46.1k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1649|  46.1k|  return ((has_bit_set[has_bit_index / 32] >> (has_bit_index % 32)) &
 1650|  46.1k|          static_cast<uint32_t>(1)) != 0;
 1651|  46.1k|}
_ZNK6google8protobuf10Reflection14MutableHasBitsEPNS0_7MessageE:
 2852|  5.09k|uint32_t* Reflection::MutableHasBits(Message* message) const {
 2853|  5.09k|  ABSL_DCHECK(schema_.HasHasbits());
  ------------------
  |  |   47|  5.09k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  5.09k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  10.1k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  5.09k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  10.1k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  10.1k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 5.09k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  5.09k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 5.09k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  5.09k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 5.09k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  10.1k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  10.1k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2854|  5.09k|  return GetPointerAtOffset<uint32_t>(message, schema_.HasBitsOffset());
 2855|  5.09k|}
generated_message_reflection.cc:_ZN6google8protobuf12_GLOBAL__N_118AddDescriptorsImplEPKNS0_8internal15DescriptorTableE:
 3697|      6|void AddDescriptorsImpl(const DescriptorTable* table) {
 3698|       |  // Reflection refers to the default fields so make sure they are initialized.
 3699|      6|  internal::InitProtobufDefaults();
 3700|      6|  internal::InitializeFileDescriptorDefaultInstances();
 3701|      6|  internal::InitializeLazyExtensionSet();
 3702|       |
 3703|       |  // Ensure all dependent descriptors are registered to the generated descriptor
 3704|       |  // pool and message factory.
 3705|      6|  int num_deps = table->num_deps;
 3706|      7|  for (int i = 0; i < num_deps; i++) {
  ------------------
  |  Branch (3706:19): [True: 1, False: 6]
  ------------------
 3707|       |    // In case of weak fields deps[i] could be null.
 3708|      1|    if (table->deps[i]) AddDescriptors(table->deps[i]);
  ------------------
  |  Branch (3708:9): [True: 1, False: 0]
  ------------------
 3709|      1|  }
 3710|       |
 3711|       |  // Register the descriptor of this file.
 3712|      6|  DescriptorPool::InternalAddGeneratedFile(table->descriptor, table->size);
 3713|      6|  MessageFactory::InternalRegisterGeneratedFile(table);
 3714|      6|}
generated_message_reflection.cc:_ZN6google8protobuf12_GLOBAL__N_130MaybeInitializeLazyDescriptorsEPKNS0_8internal15DescriptorTableE:
 3690|      4|void MaybeInitializeLazyDescriptors(const DescriptorTable* table) {
 3691|      4|  if (!IsLazilyInitializedFile(table->filename)) {
  ------------------
  |  Branch (3691:7): [True: 2, False: 2]
  ------------------
 3692|       |    // Ensure the generated pool has been lazily initialized.
 3693|      2|    DescriptorPool::generated_pool();
 3694|      2|  }
 3695|      4|}
generated_message_reflection.cc:_ZN6google8protobuf12_GLOBAL__N_121AssignDescriptorsImplEPKNS0_8internal15DescriptorTableEb:
 3631|      4|void AssignDescriptorsImpl(const DescriptorTable* table, bool eager) {
 3632|       |  // Ensure the file descriptor is added to the pool.
 3633|      4|  {
 3634|       |    // This only happens once per proto file. So a global mutex to serialize
 3635|       |    // calls to AddDescriptors.
 3636|      4|    static absl::Mutex mu{absl::kConstInit};
 3637|      4|    mu.Lock();
 3638|      4|    AddDescriptors(table);
 3639|      4|    mu.Unlock();
 3640|      4|  }
 3641|      4|  if (eager) {
  ------------------
  |  Branch (3641:7): [True: 0, False: 4]
  ------------------
 3642|       |    // Normally we do not want to eagerly build descriptors of our deps.
 3643|       |    // However if this proto is optimized for code size (ie using reflection)
 3644|       |    // and it has a message extending a custom option of a descriptor with that
 3645|       |    // message being optimized for code size as well. Building the descriptors
 3646|       |    // in this file requires parsing the serialized file descriptor, which now
 3647|       |    // requires parsing the message extension, which potentially requires
 3648|       |    // building the descriptor of the message extending one of the options.
 3649|       |    // However we are already updating descriptor pool under a lock. To prevent
 3650|       |    // this the compiler statically looks for this case and we just make sure we
 3651|       |    // first build the descriptors of all our dependencies, preventing the
 3652|       |    // deadlock.
 3653|      0|    int num_deps = table->num_deps;
 3654|      0|    for (int i = 0; i < num_deps; i++) {
  ------------------
  |  Branch (3654:21): [True: 0, False: 0]
  ------------------
 3655|       |      // In case of weak fields deps[i] could be null.
 3656|      0|      if (table->deps[i]) {
  ------------------
  |  Branch (3656:11): [True: 0, False: 0]
  ------------------
 3657|      0|        absl::call_once(*table->deps[i]->once, AssignDescriptorsImpl,
 3658|      0|                        table->deps[i],
 3659|      0|                        /*eager=*/true);
 3660|      0|      }
 3661|      0|    }
 3662|      0|  }
 3663|       |
 3664|       |  // Fill the arrays with pointers to descriptors and reflection classes.
 3665|      4|  const FileDescriptor* file =
 3666|      4|      DescriptorPool::internal_generated_pool()->FindFileByName(
 3667|      4|          table->filename);
 3668|      4|  ABSL_CHECK(file != nullptr);
  ------------------
  |  |   41|      4|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   26|      8|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      4|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      8|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      8|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      4|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      8|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 4]
  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   27|      8|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |   28|      8|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3669|       |
 3670|      4|  MessageFactory* factory = MessageFactory::generated_factory();
 3671|       |
 3672|      4|  AssignDescriptorsHelper helper(factory, table->file_level_enum_descriptors,
 3673|      4|                                 table->schemas, table->default_instances,
 3674|      4|                                 table->offsets);
 3675|       |
 3676|     41|  for (int i = 0; i < file->message_type_count(); i++) {
  ------------------
  |  Branch (3676:19): [True: 37, False: 4]
  ------------------
 3677|     37|    helper.AssignMessageDescriptor(file->message_type(i));
 3678|     37|  }
 3679|       |
 3680|     11|  for (int i = 0; i < file->enum_type_count(); i++) {
  ------------------
  |  Branch (3680:19): [True: 7, False: 4]
  ------------------
 3681|      7|    helper.AssignEnumDescriptor(file->enum_type(i));
 3682|      7|  }
 3683|      4|  if (file->options().cc_generic_services()) {
  ------------------
  |  Branch (3683:7): [True: 0, False: 4]
  ------------------
 3684|      0|    for (int i = 0; i < file->service_count(); i++) {
  ------------------
  |  Branch (3684:21): [True: 0, False: 0]
  ------------------
 3685|      0|      table->file_level_service_descriptors[i] = file->service(i);
 3686|      0|    }
 3687|      0|  }
 3688|      4|}
_ZN6google8protobuf23AssignDescriptorsHelperC2EPNS0_14MessageFactoryEPPKNS0_14EnumDescriptorEPKNS0_8internal15MigrationSchemaEPKPKNS0_7MessageEPKj:
 3582|      4|      : factory_(factory),
 3583|      4|        file_level_enum_descriptors_(file_level_enum_descriptors),
 3584|      4|        schemas_(schemas),
 3585|      4|        default_instance_data_(default_instance_data),
 3586|      4|        offsets_(offsets) {}
_ZN6google8protobuf23AssignDescriptorsHelper23AssignMessageDescriptorEPKNS0_10DescriptorE:
 3588|     47|  void AssignMessageDescriptor(const Descriptor* descriptor) {
 3589|     57|    for (int i = 0; i < descriptor->nested_type_count(); i++) {
  ------------------
  |  Branch (3589:21): [True: 10, False: 47]
  ------------------
 3590|     10|      AssignMessageDescriptor(descriptor->nested_type(i));
 3591|     10|    }
 3592|       |
 3593|       |    // If there is no default instance we only want to initialize the descriptor
 3594|       |    // without updating the reflection.
 3595|     47|    if (default_instance_data_[0] != nullptr) {
  ------------------
  |  Branch (3595:9): [True: 47, False: 0]
  ------------------
 3596|     47|      auto& class_data = default_instance_data_[0]->GetClassData()->full();
 3597|       |      // If there is no descriptor_table in the class data, then it is not
 3598|       |      // interested in receiving reflection information either.
 3599|     47|      if (class_data.descriptor_table != nullptr) {
  ------------------
  |  Branch (3599:11): [True: 47, False: 0]
  ------------------
 3600|     47|        class_data.descriptor = descriptor;
 3601|       |
 3602|     47|        class_data.reflection = OnShutdownDelete(new Reflection(
 3603|     47|            descriptor,
 3604|     47|            MigrationToReflectionSchema(default_instance_data_, offsets_,
 3605|     47|                                        *schemas_),
 3606|     47|            DescriptorPool::internal_generated_pool(), factory_));
 3607|     47|      }
 3608|     47|    }
 3609|     64|    for (int i = 0; i < descriptor->enum_type_count(); i++) {
  ------------------
  |  Branch (3609:21): [True: 17, False: 47]
  ------------------
 3610|     17|      AssignEnumDescriptor(descriptor->enum_type(i));
 3611|     17|    }
 3612|     47|    schemas_++;
 3613|     47|    default_instance_data_++;
 3614|     47|  }
generated_message_reflection.cc:_ZN6google8protobuf12_GLOBAL__N_127MigrationToReflectionSchemaEPKPKNS0_7MessageEPKjNS0_8internal15MigrationSchemaE:
 3549|     47|    MigrationSchema migration_schema) {
 3550|     47|  ReflectionSchema result;
 3551|     47|  result.default_instance_ = *default_instance;
 3552|       |  // First 9 offsets are offsets to the special fields. The following offsets
 3553|       |  // are the proto fields.
 3554|       |  //
 3555|       |  // TODO: Find a way to not encode sizeof_split_ in offsets.
 3556|     47|  result.offsets_ = offsets + migration_schema.offsets_index + 8;
 3557|     47|  result.has_bit_indices_ = offsets + migration_schema.has_bit_indices_index;
 3558|     47|  result.has_bits_offset_ = offsets[migration_schema.offsets_index + 0];
 3559|     47|  result.metadata_offset_ = offsets[migration_schema.offsets_index + 1];
 3560|     47|  result.extensions_offset_ = offsets[migration_schema.offsets_index + 2];
 3561|     47|  result.oneof_case_offset_ = offsets[migration_schema.offsets_index + 3];
 3562|     47|  result.object_size_ = migration_schema.object_size;
 3563|     47|  result.weak_field_map_offset_ = offsets[migration_schema.offsets_index + 4];
 3564|     47|  result.inlined_string_donated_offset_ =
 3565|     47|      offsets[migration_schema.offsets_index + 5];
 3566|     47|  result.split_offset_ = offsets[migration_schema.offsets_index + 6];
 3567|     47|  result.sizeof_split_ = offsets[migration_schema.offsets_index + 7];
 3568|     47|  result.inlined_string_indices_ =
 3569|     47|      offsets + migration_schema.inlined_string_indices_index;
 3570|     47|  return result;
 3571|     47|}
_ZN6google8protobuf23AssignDescriptorsHelper20AssignEnumDescriptorEPKNS0_14EnumDescriptorE:
 3616|     24|  void AssignEnumDescriptor(const EnumDescriptor* descriptor) {
 3617|     24|    *file_level_enum_descriptors_ = descriptor;
 3618|     24|    file_level_enum_descriptors_++;
 3619|     24|  }

_ZNK6google8protobuf8internal16ReflectionSchema11InRealOneofEPKNS0_15FieldDescriptorE:
  117|   134k|  bool InRealOneof(const FieldDescriptor* field) const {
  118|   134k|    return field->real_containing_oneof();
  119|   134k|  }
_ZNK6google8protobuf8internal16ReflectionSchema22GetFieldOffsetNonOneofEPKNS0_15FieldDescriptorE:
  123|  70.6k|  uint32_t GetFieldOffsetNonOneof(const FieldDescriptor* field) const {
  124|  70.6k|    ABSL_DCHECK(!InRealOneof(field));
  ------------------
  |  |   47|  70.6k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  70.6k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|   141k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  70.6k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|   141k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|   141k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 70.6k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  70.6k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 70.6k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  70.6k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 70.6k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|   141k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|   141k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  125|  70.6k|    return OffsetValue(offsets_[field->index()], field->type());
  126|  70.6k|  }
_ZNK6google8protobuf8internal16ReflectionSchema14GetFieldOffsetEPKNS0_15FieldDescriptorE:
  129|  1.54k|  uint32_t GetFieldOffset(const FieldDescriptor* field) const {
  130|  1.54k|    if (InRealOneof(field)) {
  ------------------
  |  Branch (130:9): [True: 1.54k, False: 0]
  ------------------
  131|  1.54k|      size_t offset =
  132|  1.54k|          static_cast<size_t>(field->containing_type()->field_count()) +
  133|  1.54k|          field->containing_oneof()->index();
  134|  1.54k|      return OffsetValue(offsets_[offset], field->type());
  135|  1.54k|    } else {
  136|      0|      return GetFieldOffsetNonOneof(field);
  137|      0|    }
  138|  1.54k|  }
_ZNK6google8protobuf8internal16ReflectionSchema18GetOneofCaseOffsetEPKNS0_15OneofDescriptorE:
  144|  4.66k|  uint32_t GetOneofCaseOffset(const OneofDescriptor* oneof_descriptor) const {
  145|  4.66k|    return static_cast<uint32_t>(oneof_case_offset_) +
  146|  4.66k|           static_cast<uint32_t>(
  147|  4.66k|               static_cast<size_t>(oneof_descriptor->index()) *
  148|  4.66k|               sizeof(uint32_t));
  149|  4.66k|  }
_ZNK6google8protobuf8internal16ReflectionSchema11HasBitIndexEPKNS0_15FieldDescriptorE:
  154|  97.4k|  uint32_t HasBitIndex(const FieldDescriptor* field) const {
  155|  97.4k|    if (has_bits_offset_ == -1) return static_cast<uint32_t>(-1);
  ------------------
  |  Branch (155:9): [True: 0, False: 97.4k]
  ------------------
  156|  97.4k|    ABSL_DCHECK(HasHasbits());
  ------------------
  |  |   47|  97.4k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  97.4k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|   292k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  97.4k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|   194k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|   194k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 97.4k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  97.4k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 97.4k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  97.4k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 97.4k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|   292k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|   292k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  157|  97.4k|    return has_bit_indices_[field->index()];
  158|  97.4k|  }
_ZNK6google8protobuf8internal16ReflectionSchema13HasBitsOffsetEv:
  161|  51.2k|  uint32_t HasBitsOffset() const {
  162|  51.2k|    ABSL_DCHECK(HasHasbits());
  ------------------
  |  |   47|  51.2k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  51.2k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|   102k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  51.2k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|   102k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|   102k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 51.2k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  51.2k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 51.2k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  51.2k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 51.2k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|   102k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|   102k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|  51.2k|    return static_cast<uint32_t>(has_bits_offset_);
  164|  51.2k|  }
_ZNK6google8protobuf8internal16ReflectionSchema7IsSplitEPKNS0_15FieldDescriptorE:
  222|  70.6k|  bool IsSplit(const FieldDescriptor* field) const {
  223|  70.6k|    return split_offset_ != -1 &&
  ------------------
  |  Branch (223:12): [True: 0, False: 70.6k]
  ------------------
  224|      0|           (offsets_[field->index()] & kSplitFieldOffsetMask) != 0;
  ------------------
  |  Branch (224:12): [True: 0, False: 0]
  ------------------
  225|  70.6k|  }
_ZN6google8protobuf8internal16ReflectionSchema11OffsetValueEjNS1_19FieldDescriptorLite4TypeE:
  263|  72.2k|  static uint32_t OffsetValue(uint32_t v, FieldDescriptor::Type type) {
  264|  72.2k|    if (type == FieldDescriptor::TYPE_MESSAGE ||
  ------------------
  |  Branch (264:9): [True: 72.2k, False: 0]
  ------------------
  265|      0|        type == FieldDescriptor::TYPE_STRING ||
  ------------------
  |  Branch (265:9): [True: 0, False: 0]
  ------------------
  266|  72.2k|        type == FieldDescriptor::TYPE_BYTES) {
  ------------------
  |  Branch (266:9): [True: 0, False: 0]
  ------------------
  267|  72.2k|      return v & (~kSplitFieldOffsetMask) & (~kInlinedMask) & (~kLazyMask);
  268|  72.2k|    }
  269|      0|    return v & (~kSplitFieldOffsetMask);
  270|  72.2k|  }

_ZN6google8protobuf8internal11TcFieldDataC2ENS2_11DefaultInitE:
   64|   153k|  TcFieldData(DefaultInit) {}  // NOLINT(google-explicit-constructor)
_ZNK6google8protobuf8internal11TcFieldData10hasbit_idxEv:
   85|  36.5k|  uint8_t hasbit_idx() const { return static_cast<uint8_t>(data >> 16); }
_ZNK6google8protobuf8internal11TcFieldData7aux_idxEv:
   86|  22.1k|  uint8_t aux_idx() const { return static_cast<uint8_t>(data >> 24); }
_ZNK6google8protobuf8internal11TcFieldData6offsetEv:
   87|  44.7k|  uint16_t offset() const { return static_cast<uint16_t>(data >> 48); }
_ZNK6google8protobuf8internal11TcFieldData3tagEv:
  122|  26.7k|  uint32_t tag() const { return static_cast<uint32_t>(data); }
_ZNK6google8protobuf8internal11TcFieldData12entry_offsetEv:
  123|  13.4k|  uint32_t entry_offset() const { return static_cast<uint32_t>(data >> 32); }
_ZNK6google8protobuf8internal16TcParseTableBase14FastFieldEntry6targetEv:
  370|  58.1k|    TailCallParseFunc target() const {
  371|  58.1k|      return target_atomic.load(std::memory_order_relaxed);
  372|  58.1k|    }
_ZNK6google8protobuf8internal16TcParseTableBase10fast_entryEm:
  378|  58.1k|  const FastFieldEntry* fast_entry(size_t idx) const {
  379|  58.1k|    return reinterpret_cast<const FastFieldEntry*>(this + 1) + idx;
  380|  58.1k|  }
_ZNK6google8protobuf8internal16TcParseTableBase18field_lookup_beginEv:
  386|     15|  const uint16_t* field_lookup_begin() const {
  387|     15|    return reinterpret_cast<const uint16_t*>(reinterpret_cast<uintptr_t>(this) +
  388|     15|                                             lookup_table_offset);
  389|     15|  }
_ZNK6google8protobuf8internal16TcParseTableBase19field_entries_beginEv:
  406|  13.3k|  const FieldEntry* field_entries_begin() const {
  407|  13.3k|    return reinterpret_cast<const FieldEntry*>(
  408|  13.3k|        reinterpret_cast<uintptr_t>(this) + field_entries_offset);
  409|  13.3k|  }
_ZN6google8protobuf8internal16TcParseTableBase8FieldAuxC2Ev:
  420|     27|    constexpr FieldAux() : message_default_p(nullptr) {}
_ZNK6google8protobuf8internal16TcParseTableBase9field_auxEj:
  451|  11.6k|  const FieldAux* field_aux(uint32_t idx) const {
  452|  11.6k|    return reinterpret_cast<const FieldAux*>(reinterpret_cast<uintptr_t>(this) +
  453|  11.6k|                                             aux_offset) +
  454|  11.6k|           idx;
  455|  11.6k|  }
_ZNK6google8protobuf8internal16TcParseTableBase9field_auxEPKNS2_10FieldEntryE:
  461|    860|  const FieldAux* field_aux(const FieldEntry* entry) const {
  462|    860|    return field_aux(entry->aux_idx);
  463|    860|  }
_ZNK6google8protobuf8internal16TcParseTableBase16default_instanceEv:
  477|      8|  const MessageLite* default_instance() const { return class_data->prototype; }
_ZNK6google8protobuf8internal11TcFieldData9coded_tagIhEET_v:
   82|  56.1k|  TagType coded_tag() const {
   83|  56.1k|    return static_cast<TagType>(data);
   84|  56.1k|  }
_ZNK6google8protobuf8internal11TcFieldData9coded_tagItEET_v:
   82|  1.02k|  TagType coded_tag() const {
   83|  1.02k|    return static_cast<TagType>(data);
   84|  1.02k|  }

_ZN6google8protobuf8internal8TcParser15GenericFallbackEPNS0_11MessageLiteEPKcPNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
   49|      8|const char* TcParser::GenericFallback(PROTOBUF_TC_PARAM_DECL) {
   50|      8|  PROTOBUF_MUSTTAIL return GenericFallbackImpl<Message, UnknownFieldSet>(
  ------------------
  |  |  236|      8|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
   51|      8|      PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      8|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
   52|      8|}

_ZN6google8protobuf8internal8TcParser11SyncHasbitsEPNS0_11MessageLiteEmPKNS1_16TcParseTableBaseE:
  860|  27.7k|      MessageLite* msg, uint64_t hasbits, const TcParseTableBase* table) {
  861|  27.7k|    const uint32_t has_bits_offset = table->has_bits_offset;
  862|  27.7k|    if (has_bits_offset) {
  ------------------
  |  Branch (862:9): [True: 9.51k, False: 18.2k]
  ------------------
  863|       |      // Only the first 32 has-bits are updated. Nothing above those is stored,
  864|       |      // but e.g. messages without has-bits update the upper bits.
  865|  9.51k|      RefAt<uint32_t>(msg, has_bits_offset) |= static_cast<uint32_t>(hasbits);
  866|  9.51k|    }
  867|  27.7k|  }
_ZN6google8protobuf8internal8TcParser11TagDispatchEPNS0_11MessageLiteEPKcPNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 1098|  58.1k|    PROTOBUF_TC_PARAM_NO_DATA_DECL) {
 1099|  58.1k|  const auto coded_tag = UnalignedLoad<uint16_t>(ptr);
 1100|  58.1k|  const size_t idx = coded_tag & table->fast_idx_mask;
 1101|  58.1k|  PROTOBUF_ASSUME((idx & 7) == 0);
  ------------------
  |  |  941|  58.1k|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  ------------------
 1102|  58.1k|  auto* fast_entry = table->fast_entry(idx >> 3);
 1103|  58.1k|  TcFieldData data = fast_entry->bits;
 1104|  58.1k|  data.data ^= coded_tag;
 1105|  58.1k|  PROTOBUF_MUSTTAIL return fast_entry->target()(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  236|  58.1k|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return fast_entry->target()(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|  58.1k|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 1106|  58.1k|}
_ZN6google8protobuf8internal8TcParser13ToTagDispatchEPNS0_11MessageLiteEPKcPNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 1114|  47.4k|    PROTOBUF_TC_PARAM_NO_DATA_DECL) {
 1115|  47.4k|  constexpr bool always_return = !PROTOBUF_TAILCALL;
  ------------------
  |  |  237|  47.4k|#define PROTOBUF_TAILCALL true
  ------------------
 1116|  47.4k|  if (always_return || !ctx->DataAvailable(ptr)) {
  ------------------
  |  Branch (1116:7): [Folded, False: 47.4k]
  |  Branch (1116:24): [True: 17.1k, False: 30.3k]
  ------------------
 1117|  17.1k|    PROTOBUF_MUSTTAIL return ToParseLoop(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|  17.1k|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return ToParseLoop(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|  17.1k|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1118|  17.1k|  }
 1119|  30.3k|  PROTOBUF_MUSTTAIL return TagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|  30.3k|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return TagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|  30.3k|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1120|  47.4k|}
_ZN6google8protobuf8internal8TcParser11ToParseLoopEPNS0_11MessageLiteEPKcPNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 1123|  21.6k|    PROTOBUF_TC_PARAM_NO_DATA_DECL) {
 1124|  21.6k|  (void)ctx;
 1125|  21.6k|  SyncHasbits(msg, hasbits, table);
 1126|  21.6k|  return ptr;
 1127|  21.6k|}
_ZN6google8protobuf8internal8TcParser9ParseLoopEPNS0_11MessageLiteEPKcPNS1_12ParseContextEPKNS1_16TcParseTableBaseE:
 1131|  28.2k|    const TcParseTableBase* table) {
 1132|       |  // Note: TagDispatch uses a dispatch table at "&table->fast_entries".
 1133|       |  // For fast dispatch, we'd like to have a pointer to that, but if we use
 1134|       |  // that expression, there's no easy way to get back to "table", which we also
 1135|       |  // need during dispatch.  It turns out that "table + 1" points exactly to
 1136|       |  // fast_entries, so we just increment table by 1 here, to get the register
 1137|       |  // holding the value we want.
 1138|  28.2k|  table += 1;
 1139|  56.0k|  while (!ctx->Done(&ptr)) {
  ------------------
  |  Branch (1139:10): [True: 27.7k, False: 28.2k]
  ------------------
 1140|  27.7k|#if defined(__GNUC__)
 1141|       |    // Note: this asm prevents the compiler (clang, specifically) from
 1142|       |    // believing (thanks to CSE) that it needs to dedicate a register both
 1143|       |    // to "table" and "&table->fast_entries".
 1144|       |    // TODO: remove this asm
 1145|  27.7k|    asm("" : "+r"(table));
 1146|  27.7k|#endif
 1147|  27.7k|    ptr = TagDispatch(msg, ptr, ctx, TcFieldData::DefaultInit(), table - 1, 0);
 1148|  27.7k|    if (ptr == nullptr) break;
  ------------------
  |  Branch (1148:9): [True: 0, False: 27.7k]
  ------------------
 1149|  27.7k|    if (ctx->LastTag() != 1) break;  // Ended on terminating tag
  ------------------
  |  Branch (1149:9): [True: 0, False: 27.7k]
  ------------------
 1150|  27.7k|  }
 1151|  28.2k|  table -= 1;
 1152|  28.2k|  if (ABSL_PREDICT_FALSE(table->has_post_loop_handler)) {
  ------------------
  |  |  178|  28.2k|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 28.2k]
  |  |  |  Branch (178:49): [Folded, False: 28.2k]
  |  |  |  Branch (178:58): [True: 0, False: 28.2k]
  |  |  ------------------
  ------------------
 1153|      0|    return table->post_loop_handler(msg, ptr, ctx);
 1154|      0|  }
 1155|  28.2k|  return ptr;
 1156|  28.2k|}
_ZN6google8protobuf8internal8TcParser5RefAtIjEERT_Pvm:
  714|  41.8k|  static inline T& RefAt(void* x, size_t offset) {
  715|  41.8k|    T* target = reinterpret_cast<T*>(static_cast<char*>(x) + offset);
  716|       |#if !defined(NDEBUG) && !(defined(_MSC_VER) && defined(_M_IX86))
  717|       |    // Check the alignment in debug mode, except in 32-bit msvc because it does
  718|       |    // not respect the alignment as expressed by `alignof(T)`
  719|       |    if (PROTOBUF_PREDICT_FALSE(
  720|       |            reinterpret_cast<uintptr_t>(target) % alignof(T) != 0)) {
  721|       |      AlignFail(std::integral_constant<size_t, alignof(T)>(),
  722|       |                reinterpret_cast<uintptr_t>(target));
  723|       |      // Explicit abort to let compilers know this code-path does not return
  724|       |      abort();
  725|       |    }
  726|       |#endif
  727|  41.8k|    return *target;
  728|  41.8k|  }
_ZN6google8protobuf8internal8TcParser5RefAtINS1_12ExtensionSetEEERT_Pvm:
  714|      8|  static inline T& RefAt(void* x, size_t offset) {
  715|      8|    T* target = reinterpret_cast<T*>(static_cast<char*>(x) + offset);
  716|       |#if !defined(NDEBUG) && !(defined(_MSC_VER) && defined(_M_IX86))
  717|       |    // Check the alignment in debug mode, except in 32-bit msvc because it does
  718|       |    // not respect the alignment as expressed by `alignof(T)`
  719|       |    if (PROTOBUF_PREDICT_FALSE(
  720|       |            reinterpret_cast<uintptr_t>(target) % alignof(T) != 0)) {
  721|       |      AlignFail(std::integral_constant<size_t, alignof(T)>(),
  722|       |                reinterpret_cast<uintptr_t>(target));
  723|       |      // Explicit abort to let compilers know this code-path does not return
  724|       |      abort();
  725|       |    }
  726|       |#endif
  727|      8|    return *target;
  728|      8|  }
_ZN6google8protobuf8internal8TcParser5RefAtINS1_16TcParseTableBase10FieldEntryEEERKT_PKvm:
  731|  13.4k|  static inline const T& RefAt(const void* x, size_t offset) {
  732|  13.4k|    const T* target =
  733|  13.4k|        reinterpret_cast<const T*>(static_cast<const char*>(x) + offset);
  734|       |#if !defined(NDEBUG) && !(defined(_MSC_VER) && defined(_M_IX86))
  735|       |    // Check the alignment in debug mode, except in 32-bit msvc because it does
  736|       |    // not respect the alignment as expressed by `alignof(T)`
  737|       |    if (PROTOBUF_PREDICT_FALSE(
  738|       |            reinterpret_cast<uintptr_t>(target) % alignof(T) != 0)) {
  739|       |      AlignFail(std::integral_constant<size_t, alignof(T)>(),
  740|       |                reinterpret_cast<uintptr_t>(target));
  741|       |      // Explicit abort to let compilers know this code-path does not return
  742|       |      abort();
  743|       |    }
  744|       |#endif
  745|  13.4k|    return *target;
  746|  13.4k|  }
_ZN6google8protobuf8internal8TcParser29MaybeCreateRepeatedFieldRefAtIjLb0EEERNS0_13RepeatedFieldIT_EEPvmPNS0_11MessageLiteE:
  767|     27|      void* x, size_t offset, MessageLite* msg) {
  768|     27|    return MaybeCreateRepeatedRefAt<RepeatedField<T>, is_split>(x, offset, msg);
  769|     27|  }
_ZN6google8protobuf8internal8TcParser24MaybeCreateRepeatedRefAtINS0_13RepeatedFieldIjEELb0EEERT_PvmPNS0_11MessageLiteE:
  756|     27|                                            MessageLite* msg) {
  757|     27|    if (!is_split) return RefAt<T>(x, offset);
  ------------------
  |  Branch (757:9): [True: 27, Folded]
  ------------------
  758|      0|    void*& ptr = RefAt<void*>(x, offset);
  759|      0|    if (ptr == DefaultRawPtr()) {
  ------------------
  |  Branch (759:9): [True: 0, False: 0]
  ------------------
  760|      0|      ptr = Arena::Create<T>(msg->GetArena());
  761|      0|    }
  762|      0|    return *static_cast<T*>(ptr);
  763|     27|  }
_ZN6google8protobuf8internal8TcParser5RefAtINS0_13RepeatedFieldIjEEEERT_Pvm:
  714|    232|  static inline T& RefAt(void* x, size_t offset) {
  715|    232|    T* target = reinterpret_cast<T*>(static_cast<char*>(x) + offset);
  716|       |#if !defined(NDEBUG) && !(defined(_MSC_VER) && defined(_M_IX86))
  717|       |    // Check the alignment in debug mode, except in 32-bit msvc because it does
  718|       |    // not respect the alignment as expressed by `alignof(T)`
  719|       |    if (PROTOBUF_PREDICT_FALSE(
  720|       |            reinterpret_cast<uintptr_t>(target) % alignof(T) != 0)) {
  721|       |      AlignFail(std::integral_constant<size_t, alignof(T)>(),
  722|       |                reinterpret_cast<uintptr_t>(target));
  723|       |      // Explicit abort to let compilers know this code-path does not return
  724|       |      abort();
  725|       |    }
  726|       |#endif
  727|    232|    return *target;
  728|    232|  }
_ZN6google8protobuf8internal8TcParser5RefAtImEERT_Pvm:
  714|  4.97k|  static inline T& RefAt(void* x, size_t offset) {
  715|  4.97k|    T* target = reinterpret_cast<T*>(static_cast<char*>(x) + offset);
  716|       |#if !defined(NDEBUG) && !(defined(_MSC_VER) && defined(_M_IX86))
  717|       |    // Check the alignment in debug mode, except in 32-bit msvc because it does
  718|       |    // not respect the alignment as expressed by `alignof(T)`
  719|       |    if (PROTOBUF_PREDICT_FALSE(
  720|       |            reinterpret_cast<uintptr_t>(target) % alignof(T) != 0)) {
  721|       |      AlignFail(std::integral_constant<size_t, alignof(T)>(),
  722|       |                reinterpret_cast<uintptr_t>(target));
  723|       |      // Explicit abort to let compilers know this code-path does not return
  724|       |      abort();
  725|       |    }
  726|       |#endif
  727|  4.97k|    return *target;
  728|  4.97k|  }
_ZN6google8protobuf8internal8TcParser5RefAtINS0_16RepeatedPtrFieldINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEERT_Pvm:
  714|  2.41k|  static inline T& RefAt(void* x, size_t offset) {
  715|  2.41k|    T* target = reinterpret_cast<T*>(static_cast<char*>(x) + offset);
  716|       |#if !defined(NDEBUG) && !(defined(_MSC_VER) && defined(_M_IX86))
  717|       |    // Check the alignment in debug mode, except in 32-bit msvc because it does
  718|       |    // not respect the alignment as expressed by `alignof(T)`
  719|       |    if (PROTOBUF_PREDICT_FALSE(
  720|       |            reinterpret_cast<uintptr_t>(target) % alignof(T) != 0)) {
  721|       |      AlignFail(std::integral_constant<size_t, alignof(T)>(),
  722|       |                reinterpret_cast<uintptr_t>(target));
  723|       |      // Explicit abort to let compilers know this code-path does not return
  724|       |      abort();
  725|       |    }
  726|       |#endif
  727|  2.41k|    return *target;
  728|  2.41k|  }
_ZN6google8protobuf8internal8TcParser5RefAtINS1_20RepeatedPtrFieldBaseEEERT_Pvm:
  714|  5.59k|  static inline T& RefAt(void* x, size_t offset) {
  715|  5.59k|    T* target = reinterpret_cast<T*>(static_cast<char*>(x) + offset);
  716|       |#if !defined(NDEBUG) && !(defined(_MSC_VER) && defined(_M_IX86))
  717|       |    // Check the alignment in debug mode, except in 32-bit msvc because it does
  718|       |    // not respect the alignment as expressed by `alignof(T)`
  719|       |    if (PROTOBUF_PREDICT_FALSE(
  720|       |            reinterpret_cast<uintptr_t>(target) % alignof(T) != 0)) {
  721|       |      AlignFail(std::integral_constant<size_t, alignof(T)>(),
  722|       |                reinterpret_cast<uintptr_t>(target));
  723|       |      // Explicit abort to let compilers know this code-path does not return
  724|       |      abort();
  725|       |    }
  726|       |#endif
  727|  5.59k|    return *target;
  728|  5.59k|  }
_ZN6google8protobuf8internal8TcParser5RefAtIbEERT_Pvm:
  714|  3.48k|  static inline T& RefAt(void* x, size_t offset) {
  715|  3.48k|    T* target = reinterpret_cast<T*>(static_cast<char*>(x) + offset);
  716|       |#if !defined(NDEBUG) && !(defined(_MSC_VER) && defined(_M_IX86))
  717|       |    // Check the alignment in debug mode, except in 32-bit msvc because it does
  718|       |    // not respect the alignment as expressed by `alignof(T)`
  719|       |    if (PROTOBUF_PREDICT_FALSE(
  720|       |            reinterpret_cast<uintptr_t>(target) % alignof(T) != 0)) {
  721|       |      AlignFail(std::integral_constant<size_t, alignof(T)>(),
  722|       |                reinterpret_cast<uintptr_t>(target));
  723|       |      // Explicit abort to let compilers know this code-path does not return
  724|       |      abort();
  725|       |    }
  726|       |#endif
  727|  3.48k|    return *target;
  728|  3.48k|  }
_ZN6google8protobuf8internal8TcParser5RefAtIiEERT_Pvm:
  714|  1.18k|  static inline T& RefAt(void* x, size_t offset) {
  715|  1.18k|    T* target = reinterpret_cast<T*>(static_cast<char*>(x) + offset);
  716|       |#if !defined(NDEBUG) && !(defined(_MSC_VER) && defined(_M_IX86))
  717|       |    // Check the alignment in debug mode, except in 32-bit msvc because it does
  718|       |    // not respect the alignment as expressed by `alignof(T)`
  719|       |    if (PROTOBUF_PREDICT_FALSE(
  720|       |            reinterpret_cast<uintptr_t>(target) % alignof(T) != 0)) {
  721|       |      AlignFail(std::integral_constant<size_t, alignof(T)>(),
  722|       |                reinterpret_cast<uintptr_t>(target));
  723|       |      // Explicit abort to let compilers know this code-path does not return
  724|       |      abort();
  725|       |    }
  726|       |#endif
  727|  1.18k|    return *target;
  728|  1.18k|  }
_ZN6google8protobuf8internal8TcParser5RefAtINS1_14ArenaStringPtrEEERT_Pvm:
  714|  15.2k|  static inline T& RefAt(void* x, size_t offset) {
  715|  15.2k|    T* target = reinterpret_cast<T*>(static_cast<char*>(x) + offset);
  716|       |#if !defined(NDEBUG) && !(defined(_MSC_VER) && defined(_M_IX86))
  717|       |    // Check the alignment in debug mode, except in 32-bit msvc because it does
  718|       |    // not respect the alignment as expressed by `alignof(T)`
  719|       |    if (PROTOBUF_PREDICT_FALSE(
  720|       |            reinterpret_cast<uintptr_t>(target) % alignof(T) != 0)) {
  721|       |      AlignFail(std::integral_constant<size_t, alignof(T)>(),
  722|       |                reinterpret_cast<uintptr_t>(target));
  723|       |      // Explicit abort to let compilers know this code-path does not return
  724|       |      abort();
  725|       |    }
  726|       |#endif
  727|  15.2k|    return *target;
  728|  15.2k|  }
_ZN6google8protobuf8internal8TcParser5RefAtIPNS0_11MessageLiteEEERT_Pvm:
  714|  5.93k|  static inline T& RefAt(void* x, size_t offset) {
  715|  5.93k|    T* target = reinterpret_cast<T*>(static_cast<char*>(x) + offset);
  716|       |#if !defined(NDEBUG) && !(defined(_MSC_VER) && defined(_M_IX86))
  717|       |    // Check the alignment in debug mode, except in 32-bit msvc because it does
  718|       |    // not respect the alignment as expressed by `alignof(T)`
  719|       |    if (PROTOBUF_PREDICT_FALSE(
  720|       |            reinterpret_cast<uintptr_t>(target) % alignof(T) != 0)) {
  721|       |      AlignFail(std::integral_constant<size_t, alignof(T)>(),
  722|       |                reinterpret_cast<uintptr_t>(target));
  723|       |      // Explicit abort to let compilers know this code-path does not return
  724|       |      abort();
  725|       |    }
  726|       |#endif
  727|  5.93k|    return *target;
  728|  5.93k|  }
_ZN6google8protobuf8internal8TcParser19GenericFallbackImplINS0_7MessageENS0_15UnknownFieldSetEEEPKcPNS0_11MessageLiteES7_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
  906|      8|  PROTOBUF_CC static const char* GenericFallbackImpl(PROTOBUF_TC_PARAM_DECL) {
  907|      8|    if (PROTOBUF_PREDICT_FALSE(ptr == nullptr)) {
  ------------------
  |  |  365|      8|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 8]
  |  |  |  Branch (365:54): [Folded, False: 8]
  |  |  |  Branch (365:63): [True: 0, False: 8]
  |  |  ------------------
  ------------------
  908|       |      // This is the ABI used by GetUnknownFieldOps(). Return the vtable.
  909|      0|      static constexpr UnknownFieldOps kOps = {
  910|      0|          WriteVarintToUnknown<UnknownFieldsT>,
  911|      0|          WriteLengthDelimitedToUnknown<UnknownFieldsT>};
  912|      0|      return reinterpret_cast<const char*>(&kOps);
  913|      0|    }
  914|       |
  915|      8|    SyncHasbits(msg, hasbits, table);
  916|      8|    uint32_t tag = data.tag();
  917|      8|    if ((tag & 7) == WireFormatLite::WIRETYPE_END_GROUP || tag == 0) {
  ------------------
  |  Branch (917:9): [True: 0, False: 8]
  |  Branch (917:60): [True: 0, False: 8]
  ------------------
  918|      0|      ctx->SetLastTag(tag);
  919|      0|      return ptr;
  920|      0|    }
  921|       |
  922|      8|    if (table->extension_offset != 0) {
  ------------------
  |  Branch (922:9): [True: 8, False: 0]
  ------------------
  923|       |      // We don't need to check the extension ranges. If it is not an extension
  924|       |      // it will be handled just like if it was an unknown extension: sent to
  925|       |      // the unknown field set.
  926|      8|      return RefAt<ExtensionSet>(msg, table->extension_offset)
  927|      8|          .ParseField(
  928|      8|              tag, ptr,
  929|      8|              static_cast<const MessageBaseT*>(table->default_instance()),
  930|      8|              &msg->_internal_metadata_, ctx);
  931|      8|    } else {
  932|       |      // Otherwise, we directly put it on the unknown field set.
  933|      0|      return UnknownFieldParse(
  934|      0|          tag,
  935|      0|          msg->_internal_metadata_.mutable_unknown_fields<UnknownFieldsT>(),
  936|      0|          ptr, ctx);
  937|      0|    }
  938|      8|  }

_ZN6google8protobuf8internal8TcParser21ParseLoopPreserveNoneEPNS0_11MessageLiteEPKcPNS1_12ParseContextEPKNS1_16TcParseTableBaseE:
   82|    799|    const TcParseTableBase* table) {
   83|    799|  return ParseLoop(msg, ptr, ctx, table);
   84|    799|}
_ZN6google8protobuf8internal8TcParser14FindFieldEntryEPKNS1_16TcParseTableBaseEj:
  138|  13.3k|    const TcParseTableBase* table, uint32_t field_num) {
  139|  13.3k|  const FieldEntry* const field_entries = table->field_entries_begin();
  140|       |
  141|  13.3k|  uint32_t fstart = 1;
  142|  13.3k|  uint32_t adj_fnum = field_num - fstart;
  143|       |
  144|  13.3k|  if (PROTOBUF_PREDICT_TRUE(adj_fnum < 32)) {
  ------------------
  |  |  364|  13.3k|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 13.3k, False: 15]
  |  |  |  Branch (364:53): [Folded, False: 13.3k]
  |  |  |  Branch (364:62): [True: 13.3k, False: 15]
  |  |  ------------------
  ------------------
  145|  13.3k|    uint32_t skipmap = table->skipmap32;
  146|  13.3k|    uint32_t skipbit = 1 << adj_fnum;
  147|  13.3k|    if (PROTOBUF_PREDICT_FALSE(skipmap & skipbit)) return nullptr;
  ------------------
  |  |  365|  13.3k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 13.3k]
  |  |  |  Branch (365:54): [Folded, False: 13.3k]
  |  |  |  Branch (365:63): [True: 0, False: 13.3k]
  |  |  ------------------
  ------------------
  148|  13.3k|    skipmap &= skipbit - 1;
  149|  13.3k|    adj_fnum -= absl::popcount(skipmap);
  150|  13.3k|    auto* entry = field_entries + adj_fnum;
  151|  13.3k|    PROTOBUF_ASSUME(entry != nullptr);
  ------------------
  |  |  941|  13.3k|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  ------------------
  152|  13.3k|    return entry;
  153|  13.3k|  }
  154|     15|  const uint16_t* lookup_table = table->field_lookup_begin();
  155|     15|  for (;;) {
  156|     15|#ifdef ABSL_IS_LITTLE_ENDIAN
  157|     15|    memcpy(&fstart, lookup_table, sizeof(fstart));
  158|       |#else
  159|       |    fstart = lookup_table[0] | (lookup_table[1] << 16);
  160|       |#endif
  161|     15|    lookup_table += sizeof(fstart) / sizeof(*lookup_table);
  162|     15|    uint32_t num_skip_entries = *lookup_table++;
  163|     15|    if (field_num < fstart) return nullptr;
  ------------------
  |  Branch (163:9): [True: 8, False: 7]
  ------------------
  164|      7|    adj_fnum = field_num - fstart;
  165|      7|    uint32_t skip_num = adj_fnum / 16;
  166|      7|    if (PROTOBUF_PREDICT_TRUE(skip_num < num_skip_entries)) {
  ------------------
  |  |  364|      7|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 7, False: 0]
  |  |  |  Branch (364:53): [Folded, False: 7]
  |  |  |  Branch (364:62): [True: 7, False: 0]
  |  |  ------------------
  ------------------
  167|       |      // for each group of 16 fields we have:
  168|       |      // a bitmap of 16 bits
  169|       |      // a 16-bit field-entry offset for the first of them.
  170|      7|      auto* skip_data = lookup_table + (adj_fnum / 16) * (sizeof(SkipEntry16) /
  171|      7|                                                          sizeof(uint16_t));
  172|      7|      SkipEntry16 se = {skip_data[0], skip_data[1]};
  173|      7|      adj_fnum &= 15;
  174|      7|      uint32_t skipmap = se.skipmap;
  175|      7|      uint16_t skipbit = 1 << adj_fnum;
  176|      7|      if (PROTOBUF_PREDICT_FALSE(skipmap & skipbit)) return nullptr;
  ------------------
  |  |  365|      7|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 7]
  |  |  |  Branch (365:54): [Folded, False: 7]
  |  |  |  Branch (365:63): [True: 0, False: 7]
  |  |  ------------------
  ------------------
  177|      7|      skipmap &= skipbit - 1;
  178|      7|      adj_fnum += se.field_entry_offset;
  179|      7|      adj_fnum -= absl::popcount(skipmap);
  180|      7|      auto* entry = field_entries + adj_fnum;
  181|      7|      PROTOBUF_ASSUME(entry != nullptr);
  ------------------
  |  |  941|      7|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  ------------------
  182|      7|      return entry;
  183|      7|    }
  184|      0|    lookup_table +=
  185|      0|        num_skip_entries * (sizeof(SkipEntry16) / sizeof(*lookup_table));
  186|      0|  }
  187|     15|}
_ZN6google8protobuf8internal8TcParser9MiniParseEPNS0_11MessageLiteEPKcPNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
  322|  13.3k|    PROTOBUF_TC_PARAM_NO_DATA_DECL) {
  323|  13.3k|  PROTOBUF_MUSTTAIL return MiniParse<false>(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|  13.3k|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return MiniParse<false>(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|  13.3k|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
  324|  13.3k|}
_ZN6google8protobuf8internal8TcParser10AddMessageEPKNS1_16TcParseTableBaseERNS1_20RepeatedPtrFieldBaseE:
  364|  18.5k|                                  RepeatedPtrFieldBase& field) {
  365|  18.5k|  return static_cast<MessageLite*>(field.AddInternal(
  366|  18.5k|      [table](Arena* arena) { return NewMessage(table, arena); }));
  367|  18.5k|}
_ZN6google8protobuf8internal8TcParser8FastMtS1EPNS0_11MessageLiteEPKcPNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
  417|  5.13k|PROTOBUF_NOINLINE const char* TcParser::FastMtS1(PROTOBUF_TC_PARAM_DECL) {
  418|  5.13k|  PROTOBUF_MUSTTAIL return SingularParseMessageAuxImpl<uint8_t, false, true>(
  ------------------
  |  |  236|  5.13k|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
  419|  5.13k|      PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|  5.13k|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
  420|  5.13k|}
_ZN6google8protobuf8internal8TcParser8FastMtR1EPNS0_11MessageLiteEPKcPNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
  503|  5.56k|PROTOBUF_NOINLINE const char* TcParser::FastMtR1(PROTOBUF_TC_PARAM_DECL) {
  504|  5.56k|  PROTOBUF_MUSTTAIL return RepeatedParseMessageAuxImpl<uint8_t, false, true>(
  ------------------
  |  |  236|  5.56k|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
  505|  5.56k|      PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|  5.56k|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
  506|  5.56k|}
_ZN6google8protobuf8internal8TcParser8FastMtR2EPNS0_11MessageLiteEPKcPNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
  508|     27|PROTOBUF_NOINLINE const char* TcParser::FastMtR2(PROTOBUF_TC_PARAM_DECL) {
  509|     27|  PROTOBUF_MUSTTAIL return RepeatedParseMessageAuxImpl<uint16_t, false, true>(
  ------------------
  |  |  236|     27|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
  510|     27|      PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|     27|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
  511|     27|}
_ZN6google8protobuf8internal8TcParser8FastV8S1EPNS0_11MessageLiteEPKcPNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
  829|    976|PROTOBUF_NOINLINE const char* TcParser::FastV8S1(PROTOBUF_TC_PARAM_DECL) {
  830|    976|  using TagType = uint8_t;
  831|       |
  832|       |  // Special case for a varint bool field with a tag of 1 byte:
  833|       |  // The coded_tag() field will actually contain the value too and we can check
  834|       |  // both at the same time.
  835|    976|  auto coded_tag = data.coded_tag<uint16_t>();
  836|    976|  if (PROTOBUF_PREDICT_TRUE(coded_tag == 0x0000 || coded_tag == 0x0100)) {
  ------------------
  |  |  364|  1.94k|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 949, False: 27]
  |  |  |  Branch (364:53): [Folded, False: 976]
  |  |  |  Branch (364:63): [True: 6, False: 970]
  |  |  |  Branch (364:63): [True: 943, False: 27]
  |  |  ------------------
  ------------------
  837|    949|    auto& field = RefAt<bool>(msg, data.offset());
  838|       |    // Note: we use `data.data` because Clang generates suboptimal code when
  839|       |    // using coded_tag.
  840|       |    // In x86_64 this uses the CH register to read the second byte out of
  841|       |    // `data`.
  842|    949|    uint8_t value = data.data >> 8;
  843|       |    // The assume allows using a mov instead of test+setne.
  844|    949|    PROTOBUF_ASSUME(value <= 1);
  ------------------
  |  |  941|    949|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  ------------------
  845|    949|    field = static_cast<bool>(value);
  846|       |
  847|    949|    ptr += sizeof(TagType) + 1;  // Consume the tag and the value.
  848|    949|    hasbits |= (uint64_t{1} << data.hasbit_idx());
  849|       |
  850|    949|    PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|    949|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|    949|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
  851|    949|  }
  852|       |
  853|       |  // If it didn't match above either the tag is wrong, or the value is encoded
  854|       |  // non-canonically.
  855|       |  // Jump to MiniParse as wrong tag is the most probable reason.
  856|     27|  PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|     27|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|     27|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
  857|    976|}
_ZN6google8protobuf8internal8TcParser8FastV8S2EPNS0_11MessageLiteEPKcPNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
  859|     10|PROTOBUF_NOINLINE const char* TcParser::FastV8S2(PROTOBUF_TC_PARAM_DECL) {
  860|     10|  PROTOBUF_MUSTTAIL return SingularVarint<bool, uint16_t>(
  ------------------
  |  |  236|     10|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
  861|     10|      PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|     10|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
  862|     10|}
_ZN6google8protobuf8internal8TcParser9FastV32S1EPNS0_11MessageLiteEPKcPNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
  863|  31.3k|PROTOBUF_NOINLINE const char* TcParser::FastV32S1(PROTOBUF_TC_PARAM_DECL) {
  864|  31.3k|  PROTOBUF_MUSTTAIL return FastVarintS1<uint32_t>(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  236|  31.3k|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return FastVarintS1<uint32_t>(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|  31.3k|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
  865|  31.3k|}
_ZN6google8protobuf8internal8TcParser9FastV32P1EPNS0_11MessageLiteEPKcPNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
  992|    205|PROTOBUF_NOINLINE const char* TcParser::FastV32P1(PROTOBUF_TC_PARAM_DECL) {
  993|    205|  PROTOBUF_MUSTTAIL return PackedVarint<uint32_t, uint8_t>(
  ------------------
  |  |  236|    205|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
  994|    205|      PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|    205|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
  995|    205|}
_ZN6google8protobuf8internal8TcParser8FastEvS1EPNS0_11MessageLiteEPKcPNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 1095|     93|PROTOBUF_NOINLINE const char* TcParser::FastEvS1(PROTOBUF_TC_PARAM_DECL) {
 1096|     93|  PROTOBUF_MUSTTAIL return SingularEnum<uint8_t, field_layout::kTvEnum>(
  ------------------
  |  |  236|     93|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
 1097|     93|      PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|     93|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 1098|     93|}
_ZN6google8protobuf8internal8TcParser9FastEr0S1EPNS0_11MessageLiteEPKcPNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 1231|     84|PROTOBUF_NOINLINE const char* TcParser::FastEr0S1(PROTOBUF_TC_PARAM_DECL) {
 1232|     84|  PROTOBUF_MUSTTAIL return SingularEnumSmallRange<uint8_t, 0>(
  ------------------
  |  |  236|     84|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
 1233|     84|      PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|     84|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 1234|     84|}
_ZN6google8protobuf8internal8TcParser9FastEr1S1EPNS0_11MessageLiteEPKcPNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 1241|  1.06k|PROTOBUF_NOINLINE const char* TcParser::FastEr1S1(PROTOBUF_TC_PARAM_DECL) {
 1242|  1.06k|  PROTOBUF_MUSTTAIL return SingularEnumSmallRange<uint8_t, 1>(
  ------------------
  |  |  236|  1.06k|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
 1243|  1.06k|      PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|  1.06k|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 1244|  1.06k|}
_ZN6google8protobuf8internal8TcParser7FastBS1EPNS0_11MessageLiteEPKcPNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 1448|  8.66k|PROTOBUF_NOINLINE const char* TcParser::FastBS1(PROTOBUF_TC_PARAM_DECL) {
 1449|  8.66k|  PROTOBUF_MUSTTAIL return SingularString<uint8_t, ArenaStringPtr, kNoUtf8>(
  ------------------
  |  |  236|  8.66k|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
 1450|  8.66k|      PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|  8.66k|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 1451|  8.66k|}
_ZN6google8protobuf8internal8TcParser7FastSS1EPNS0_11MessageLiteEPKcPNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 1456|  1.55k|PROTOBUF_NOINLINE const char* TcParser::FastSS1(PROTOBUF_TC_PARAM_DECL) {
 1457|  1.55k|  PROTOBUF_MUSTTAIL return SingularString<uint8_t, ArenaStringPtr,
  ------------------
  |  |  236|  1.55k|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
 1458|  1.55k|                                          kUtf8ValidateOnly>(
 1459|  1.55k|      PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|  1.55k|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 1460|  1.55k|}
_ZN6google8protobuf8internal8TcParser7FastSS2EPNS0_11MessageLiteEPKcPNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 1461|      7|PROTOBUF_NOINLINE const char* TcParser::FastSS2(PROTOBUF_TC_PARAM_DECL) {
 1462|      7|  PROTOBUF_MUSTTAIL return SingularString<uint16_t, ArenaStringPtr,
  ------------------
  |  |  236|      7|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
 1463|      7|                                          kUtf8ValidateOnly>(
 1464|      7|      PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      7|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 1465|      7|}
_ZN6google8protobuf8internal8TcParser7FastBR1EPNS0_11MessageLiteEPKcPNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 1573|  2.40k|PROTOBUF_NOINLINE const char* TcParser::FastBR1(PROTOBUF_TC_PARAM_DECL) {
 1574|  2.40k|  PROTOBUF_MUSTTAIL return RepeatedString<
  ------------------
  |  |  236|  2.40k|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
 1575|  2.40k|      uint8_t, RepeatedPtrField<std::string>, kNoUtf8>(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|  2.40k|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 1576|  2.40k|}
_ZN6google8protobuf8internal8TcParser7FastSR1EPNS0_11MessageLiteEPKcPNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 1581|      6|PROTOBUF_NOINLINE const char* TcParser::FastSR1(PROTOBUF_TC_PARAM_DECL) {
 1582|      6|  PROTOBUF_MUSTTAIL return RepeatedString<
  ------------------
  |  |  236|      6|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
 1583|      6|      uint8_t, RepeatedPtrField<std::string>, kUtf8ValidateOnly>(
 1584|      6|      PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      6|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 1585|      6|}
_ZN6google8protobuf8internal8TcParser11ChangeOneofEPKNS1_16TcParseTableBaseERKNS3_10FieldEntryEjPNS1_12ParseContextEPNS0_11MessageLiteE:
 1624|  13.2k|                           MessageLite* msg) {
 1625|       |  // The _oneof_case_ value offset is stored in the has-bit index.
 1626|  13.2k|  uint32_t* oneof_case = &TcParser::RefAt<uint32_t>(msg, entry.has_idx);
 1627|  13.2k|  uint32_t current_case = *oneof_case;
 1628|  13.2k|  *oneof_case = field_num;
 1629|       |
 1630|  13.2k|  if (current_case == 0) {
  ------------------
  |  Branch (1630:7): [True: 13.2k, False: 0]
  ------------------
 1631|       |    // If the member is empty, we don't have anything to clear. Caller is
 1632|       |    // responsible for creating a new member object.
 1633|  13.2k|    return true;
 1634|  13.2k|  }
 1635|      0|  if (current_case == field_num) {
  ------------------
  |  Branch (1635:7): [True: 0, False: 0]
  ------------------
 1636|       |    // If the member is already active, then it should be merged. We're done.
 1637|      0|    return false;
 1638|      0|  }
 1639|       |  // Look up the value that is already stored, and dispose of it if necessary.
 1640|      0|  const FieldEntry* current_entry = FindFieldEntry(table, current_case);
 1641|      0|  uint16_t current_kind = current_entry->type_card & field_layout::kFkMask;
 1642|      0|  uint16_t current_rep = current_entry->type_card & field_layout::kRepMask;
 1643|      0|  if (current_kind == field_layout::kFkString) {
  ------------------
  |  Branch (1643:7): [True: 0, False: 0]
  ------------------
 1644|      0|    switch (current_rep) {
 1645|      0|      case field_layout::kRepAString: {
  ------------------
  |  Branch (1645:7): [True: 0, False: 0]
  ------------------
 1646|      0|        auto& field = RefAt<ArenaStringPtr>(msg, current_entry->offset);
 1647|      0|        field.Destroy();
 1648|      0|        break;
 1649|      0|      }
 1650|      0|      case field_layout::kRepCord: {
  ------------------
  |  Branch (1650:7): [True: 0, False: 0]
  ------------------
 1651|      0|        if (msg->GetArena() == nullptr) {
  ------------------
  |  Branch (1651:13): [True: 0, False: 0]
  ------------------
 1652|      0|          delete RefAt<absl::Cord*>(msg, current_entry->offset);
 1653|      0|        }
 1654|      0|        break;
 1655|      0|      }
 1656|      0|      case field_layout::kRepSString:
  ------------------
  |  Branch (1656:7): [True: 0, False: 0]
  ------------------
 1657|      0|      case field_layout::kRepIString:
  ------------------
  |  Branch (1657:7): [True: 0, False: 0]
  ------------------
 1658|      0|      default:
  ------------------
  |  Branch (1658:7): [True: 0, False: 0]
  ------------------
 1659|      0|        ABSL_DLOG(FATAL) << "string rep not handled: "
  ------------------
  |  |   40|      0|#define ABSL_DLOG(severity) ABSL_LOG_INTERNAL_DLOG_IMPL(_##severity)
  |  |  ------------------
  |  |  |  |   41|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, false) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   42|      0|      ABSL_LOGGING_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1660|      0|                         << (current_rep >> field_layout::kRepShift);
 1661|      0|        return true;
 1662|      0|    }
 1663|      0|  } else if (current_kind == field_layout::kFkMessage) {
  ------------------
  |  Branch (1663:14): [True: 0, False: 0]
  ------------------
 1664|      0|    switch (current_rep) {
 1665|      0|      case field_layout::kRepMessage:
  ------------------
  |  Branch (1665:7): [True: 0, False: 0]
  ------------------
 1666|      0|      case field_layout::kRepGroup: {
  ------------------
  |  Branch (1666:7): [True: 0, False: 0]
  ------------------
 1667|      0|        auto& field = RefAt<MessageLite*>(msg, current_entry->offset);
 1668|      0|        if (!msg->GetArena()) {
  ------------------
  |  Branch (1668:13): [True: 0, False: 0]
  ------------------
 1669|      0|          delete field;
 1670|      0|        }
 1671|      0|        break;
 1672|      0|      }
 1673|      0|      default:
  ------------------
  |  Branch (1673:7): [True: 0, False: 0]
  ------------------
 1674|      0|        ABSL_DLOG(FATAL) << "message rep not handled: "
  ------------------
  |  |   40|      0|#define ABSL_DLOG(severity) ABSL_LOG_INTERNAL_DLOG_IMPL(_##severity)
  |  |  ------------------
  |  |  |  |   41|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, false) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   42|      0|      ABSL_LOGGING_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1675|      0|                         << (current_rep >> field_layout::kRepShift);
 1676|      0|        break;
 1677|      0|    }
 1678|      0|  }
 1679|      0|  return true;
 1680|      0|}
_ZN6google8protobuf8internal8TcParser17MaybeGetSplitBaseEPNS0_11MessageLiteEbPKNS1_16TcParseTableBaseE:
 1693|  13.3k|                                  const TcParseTableBase* table) {
 1694|  13.3k|  void* out = msg;
 1695|  13.3k|  if (is_split) {
  ------------------
  |  Branch (1695:7): [True: 0, False: 13.3k]
  ------------------
 1696|      0|    const uint32_t split_offset = GetSplitOffset(table);
 1697|      0|    void* default_split =
 1698|      0|        TcParser::RefAt<void*>(table->default_instance(), split_offset);
 1699|      0|    void*& split = TcParser::RefAt<void*>(msg, split_offset);
 1700|      0|    if (split == default_split) {
  ------------------
  |  Branch (1700:9): [True: 0, False: 0]
  ------------------
 1701|       |      // Allocate split instance when needed.
 1702|      0|      uint32_t size = GetSizeofSplit(table);
 1703|      0|      Arena* arena = msg->GetArena();
 1704|      0|      split = (arena == nullptr) ? ::operator new(size)
  ------------------
  |  Branch (1704:15): [True: 0, False: 0]
  ------------------
 1705|      0|                                 : arena->AllocateAligned(size);
 1706|      0|      memcpy(split, default_split, size);
 1707|      0|    }
 1708|      0|    out = split;
 1709|      0|  }
 1710|  13.3k|  return out;
 1711|  13.3k|}
_ZN6google8protobuf8internal8TcParser12MpVerifyUtf8EN4absl12lts_2024011611string_viewEPKNS1_16TcParseTableBaseERKNS6_10FieldEntryEt:
 2116|  5.02k|                            const FieldEntry& entry, uint16_t xform_val) {
 2117|  5.02k|  if (xform_val == field_layout::kTvUtf8) {
  ------------------
  |  Branch (2117:7): [True: 0, False: 5.02k]
  ------------------
 2118|      0|    if (!utf8_range::IsStructurallyValid(wire_bytes)) {
  ------------------
  |  Branch (2118:9): [True: 0, False: 0]
  ------------------
 2119|      0|      PrintUTF8ErrorLog(MessageName(table), FieldName(table, &entry), "parsing",
 2120|      0|                        false);
 2121|      0|      return false;
 2122|      0|    }
 2123|      0|    return true;
 2124|      0|  }
 2125|       |#ifndef NDEBUG
 2126|       |  if (xform_val == field_layout::kTvUtf8Debug) {
 2127|       |    if (!utf8_range::IsStructurallyValid(wire_bytes)) {
 2128|       |      PrintUTF8ErrorLog(MessageName(table), FieldName(table, &entry), "parsing",
 2129|       |                        false);
 2130|       |    }
 2131|       |  }
 2132|       |#endif  // NDEBUG
 2133|  5.02k|  return true;
 2134|  5.02k|}
_ZN6google8protobuf8internal8TcParser9MiniParseILb0EEEPKcPNS0_11MessageLiteES5_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
  238|  13.3k|    PROTOBUF_TC_PARAM_DECL) {
  239|  13.3k|  TestMiniParseResult* test_out;
  240|  13.3k|  if (export_called_function) {
  ------------------
  |  Branch (240:7): [Folded, False: 13.3k]
  ------------------
  241|      0|    test_out = reinterpret_cast<TestMiniParseResult*>(
  242|      0|        static_cast<uintptr_t>(data.data));
  243|      0|  }
  244|       |
  245|  13.3k|  uint32_t tag;
  246|  13.3k|  ptr = ReadTagInlined(ptr, &tag);
  247|  13.3k|  if (PROTOBUF_PREDICT_FALSE(ptr == nullptr)) {
  ------------------
  |  |  365|  13.3k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 13.3k]
  |  |  |  Branch (365:54): [Folded, False: 13.3k]
  |  |  |  Branch (365:63): [True: 0, False: 13.3k]
  |  |  ------------------
  ------------------
  248|      0|    if (export_called_function) *test_out = {Error};
  ------------------
  |  Branch (248:9): [Folded, False: 0]
  ------------------
  249|      0|    PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
  250|      0|  }
  251|       |
  252|  13.3k|  auto* entry = FindFieldEntry(table, tag >> 3);
  253|  13.3k|  if (entry == nullptr) {
  ------------------
  |  Branch (253:7): [True: 8, False: 13.3k]
  ------------------
  254|      8|    if (export_called_function) *test_out = {table->fallback, tag};
  ------------------
  |  Branch (254:9): [Folded, False: 8]
  ------------------
  255|      8|    data.data = tag;
  256|      8|    PROTOBUF_MUSTTAIL return table->fallback(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  236|      8|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return table->fallback(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      8|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
  257|      8|  }
  258|       |
  259|       |  // The handler may need the tag and the entry to resolve fallback logic. Both
  260|       |  // of these are 32 bits, so pack them into (the 64-bit) `data`. Since we can't
  261|       |  // pack the entry pointer itself, just pack its offset from `table`.
  262|  13.3k|  uint64_t entry_offset = reinterpret_cast<const char*>(entry) -
  263|  13.3k|                          reinterpret_cast<const char*>(table);
  264|  13.3k|  data.data = entry_offset << 32 | tag;
  265|       |
  266|  13.3k|  using field_layout::FieldKind;
  267|  13.3k|  auto field_type =
  268|  13.3k|      entry->type_card & (+field_layout::kSplitMask | FieldKind::kFkMask);
  269|       |
  270|  13.3k|  static constexpr TailCallParseFunc kMiniParseTable[] = {
  271|  13.3k|      &MpFallback,             // FieldKind::kFkNone
  272|  13.3k|      &MpVarint<false>,        // FieldKind::kFkVarint
  273|  13.3k|      &MpPackedVarint<false>,  // FieldKind::kFkPackedVarint
  274|  13.3k|      &MpFixed<false>,         // FieldKind::kFkFixed
  275|  13.3k|      &MpPackedFixed<false>,   // FieldKind::kFkPackedFixed
  276|  13.3k|      &MpString<false>,        // FieldKind::kFkString
  277|  13.3k|      &MpMessage<false>,       // FieldKind::kFkMessage
  278|  13.3k|      &MpMap<false>,           // FieldKind::kFkMap
  279|  13.3k|      &Error,                  // kSplitMask | FieldKind::kFkNone
  280|  13.3k|      &MpVarint<true>,         // kSplitMask | FieldKind::kFkVarint
  281|  13.3k|      &MpPackedVarint<true>,   // kSplitMask | FieldKind::kFkPackedVarint
  282|  13.3k|      &MpFixed<true>,          // kSplitMask | FieldKind::kFkFixed
  283|  13.3k|      &MpPackedFixed<true>,    // kSplitMask | FieldKind::kFkPackedFixed
  284|  13.3k|      &MpString<true>,         // kSplitMask | FieldKind::kFkString
  285|  13.3k|      &MpMessage<true>,        // kSplitMask | FieldKind::kFkMessage
  286|  13.3k|      &MpMap<true>,            // kSplitMask | FieldKind::kFkMap
  287|  13.3k|  };
  288|       |  // Just to be sure we got the order right, above.
  289|  13.3k|  static_assert(0 == FieldKind::kFkNone, "Invalid table order");
  290|  13.3k|  static_assert(1 == FieldKind::kFkVarint, "Invalid table order");
  291|  13.3k|  static_assert(2 == FieldKind::kFkPackedVarint, "Invalid table order");
  292|  13.3k|  static_assert(3 == FieldKind::kFkFixed, "Invalid table order");
  293|  13.3k|  static_assert(4 == FieldKind::kFkPackedFixed, "Invalid table order");
  294|  13.3k|  static_assert(5 == FieldKind::kFkString, "Invalid table order");
  295|  13.3k|  static_assert(6 == FieldKind::kFkMessage, "Invalid table order");
  296|  13.3k|  static_assert(7 == FieldKind::kFkMap, "Invalid table order");
  297|       |
  298|  13.3k|  static_assert(8 == (+field_layout::kSplitMask | FieldKind::kFkNone),
  299|  13.3k|    "Invalid table order");
  300|  13.3k|  static_assert(9 == (+field_layout::kSplitMask | FieldKind::kFkVarint),
  301|  13.3k|    "Invalid table order");
  302|  13.3k|  static_assert(10 == (+field_layout::kSplitMask | FieldKind::kFkPackedVarint),
  303|  13.3k|    "Invalid table order");
  304|  13.3k|  static_assert(11 == (+field_layout::kSplitMask | FieldKind::kFkFixed),
  305|  13.3k|    "Invalid table order");
  306|  13.3k|  static_assert(12 == (+field_layout::kSplitMask | FieldKind::kFkPackedFixed),
  307|  13.3k|    "Invalid table order");
  308|  13.3k|  static_assert(13 == (+field_layout::kSplitMask | FieldKind::kFkString),
  309|  13.3k|    "Invalid table order");
  310|  13.3k|  static_assert(14 == (+field_layout::kSplitMask | FieldKind::kFkMessage),
  311|  13.3k|    "Invalid table order");
  312|  13.3k|  static_assert(15 == (+field_layout::kSplitMask | FieldKind::kFkMap),
  313|  13.3k|    "Invalid table order");
  314|       |
  315|  13.3k|  TailCallParseFunc parse_fn = kMiniParseTable[field_type];
  316|  13.3k|  if (export_called_function) *test_out = {parse_fn, tag, entry};
  ------------------
  |  Branch (316:7): [Folded, False: 13.3k]
  ------------------
  317|       |
  318|  13.3k|  PROTOBUF_MUSTTAIL return parse_fn(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  236|  13.3k|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return parse_fn(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|  13.3k|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
  319|  13.3k|}
_ZN6google8protobuf8internal8TcParser8MpVarintILb0EEEPKcPNS0_11MessageLiteES5_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 1845|  7.56k|PROTOBUF_NOINLINE const char* TcParser::MpVarint(PROTOBUF_TC_PARAM_DECL) {
 1846|  7.56k|  const auto& entry = RefAt<FieldEntry>(table, data.entry_offset());
 1847|  7.56k|  const uint16_t type_card = entry.type_card;
 1848|  7.56k|  const uint16_t card = type_card & field_layout::kFcMask;
 1849|       |
 1850|       |  // Check for repeated parsing:
 1851|  7.56k|  if (card == field_layout::kFcRepeated) {
  ------------------
  |  Branch (1851:7): [True: 27, False: 7.53k]
  ------------------
 1852|     27|    PROTOBUF_MUSTTAIL return MpRepeatedVarint<is_split>(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  236|     27|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return MpRepeatedVarint<is_split>(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|     27|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 1853|     27|  }
 1854|       |  // Check for wire type mismatch:
 1855|  7.53k|  if ((data.tag() & 7) != WireFormatLite::WIRETYPE_VARINT) {
  ------------------
  |  Branch (1855:7): [True: 0, False: 7.53k]
  ------------------
 1856|      0|    PROTOBUF_MUSTTAIL return table->fallback(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return table->fallback(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      0|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 1857|      0|  }
 1858|  7.53k|  const uint16_t xform_val = type_card & field_layout::kTvMask;
 1859|  7.53k|  const bool is_zigzag = xform_val == field_layout::kTvZigZag;
 1860|  7.53k|  const bool is_validated_enum = xform_val & field_layout::kTvEnum;
 1861|       |
 1862|       |  // Parse the value:
 1863|  7.53k|  const char* ptr2 = ptr;  // save for unknown enum case
 1864|  7.53k|  uint64_t tmp;
 1865|  7.53k|  ptr = ParseVarint(ptr, &tmp);
 1866|  7.53k|  if (ptr == nullptr) {
  ------------------
  |  Branch (1866:7): [True: 0, False: 7.53k]
  ------------------
 1867|      0|    PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1868|      0|  }
 1869|       |
 1870|       |  // Transform and/or validate the value
 1871|  7.53k|  uint16_t rep = type_card & field_layout::kRepMask;
 1872|  7.53k|  if (rep == field_layout::kRep64Bits) {
  ------------------
  |  Branch (1872:7): [True: 4.97k, False: 2.56k]
  ------------------
 1873|  4.97k|    if (is_zigzag) {
  ------------------
  |  Branch (1873:9): [True: 0, False: 4.97k]
  ------------------
 1874|      0|      tmp = WireFormatLite::ZigZagDecode64(tmp);
 1875|      0|    }
 1876|  4.97k|  } else if (rep == field_layout::kRep32Bits) {
  ------------------
  |  Branch (1876:14): [True: 34, False: 2.52k]
  ------------------
 1877|     34|    if (is_validated_enum) {
  ------------------
  |  Branch (1877:9): [True: 34, False: 0]
  ------------------
 1878|     34|      if (!EnumIsValidAux(tmp, xform_val, *table->field_aux(&entry))) {
  ------------------
  |  Branch (1878:11): [True: 0, False: 34]
  ------------------
 1879|      0|        ptr = ptr2;
 1880|      0|        PROTOBUF_MUSTTAIL return MpUnknownEnumFallback(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                      PROTOBUF_MUSTTAIL return MpUnknownEnumFallback(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      0|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 1881|      0|      }
 1882|     34|    } else if (is_zigzag) {
  ------------------
  |  Branch (1882:16): [True: 0, False: 0]
  ------------------
 1883|      0|      tmp = WireFormatLite::ZigZagDecode32(static_cast<uint32_t>(tmp));
 1884|      0|    }
 1885|     34|  }
 1886|       |
 1887|       |  // Mark the field as present:
 1888|  7.53k|  const bool is_oneof = card == field_layout::kFcOneof;
 1889|  7.53k|  if (card == field_layout::kFcOptional) {
  ------------------
  |  Branch (1889:7): [True: 34, False: 7.50k]
  ------------------
 1890|     34|    SetHas(entry, msg);
 1891|  7.50k|  } else if (is_oneof) {
  ------------------
  |  Branch (1891:14): [True: 7.50k, False: 0]
  ------------------
 1892|  7.50k|    ChangeOneof(table, entry, data.tag() >> 3, ctx, msg);
 1893|  7.50k|  }
 1894|       |
 1895|  7.53k|  void* const base = MaybeGetSplitBase(msg, is_split, table);
 1896|  7.53k|  if (rep == field_layout::kRep64Bits) {
  ------------------
  |  Branch (1896:7): [True: 4.97k, False: 2.56k]
  ------------------
 1897|  4.97k|    RefAt<uint64_t>(base, entry.offset) = tmp;
 1898|  4.97k|  } else if (rep == field_layout::kRep32Bits) {
  ------------------
  |  Branch (1898:14): [True: 34, False: 2.52k]
  ------------------
 1899|     34|    RefAt<uint32_t>(base, entry.offset) = static_cast<uint32_t>(tmp);
 1900|  2.52k|  } else {
 1901|  2.52k|    ABSL_DCHECK_EQ(rep, static_cast<uint16_t>(field_layout::kRep8Bits));
  ------------------
  |  |   74|  2.52k|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|  2.52k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  2.52k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 2.52k]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  2.52k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1902|  2.52k|    RefAt<bool>(base, entry.offset) = static_cast<bool>(tmp);
 1903|  2.52k|  }
 1904|       |
 1905|  7.53k|  PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|  7.53k|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|  7.53k|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1906|  7.53k|}
_ZN6google8protobuf8internal8TcParser16MpRepeatedVarintILb0EEEPKcPNS0_11MessageLiteES5_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 1958|     27|    PROTOBUF_TC_PARAM_DECL) {
 1959|     27|  const auto& entry = RefAt<FieldEntry>(table, data.entry_offset());
 1960|     27|  const auto type_card = entry.type_card;
 1961|     27|  const uint32_t decoded_tag = data.tag();
 1962|     27|  const auto decoded_wiretype = decoded_tag & 7;
 1963|       |
 1964|       |  // Check for packed repeated fallback:
 1965|     27|  if (decoded_wiretype == WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  ------------------
  |  Branch (1965:7): [True: 0, False: 27]
  ------------------
 1966|      0|    PROTOBUF_MUSTTAIL return MpPackedVarint<is_split>(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return MpPackedVarint<is_split>(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      0|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 1967|      0|  }
 1968|       |  // Check for wire type mismatch:
 1969|     27|  if (decoded_wiretype != WireFormatLite::WIRETYPE_VARINT) {
  ------------------
  |  Branch (1969:7): [True: 0, False: 27]
  ------------------
 1970|      0|    PROTOBUF_MUSTTAIL return table->fallback(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return table->fallback(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      0|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 1971|      0|  }
 1972|       |  // For split we avoid the duplicate code and have the impl reload the value.
 1973|       |  // Less code bloat for uncommon paths.
 1974|     27|  const uint16_t xform_val = (type_card & field_layout::kTvMask);
 1975|     27|  const uint16_t rep = type_card & field_layout::kRepMask;
 1976|     27|  switch (rep >> field_layout::kRepShift) {
 1977|      0|    case field_layout::kRep64Bits >> field_layout::kRepShift:
  ------------------
  |  Branch (1977:5): [True: 0, False: 27]
  ------------------
 1978|      0|      if (xform_val == 0) {
  ------------------
  |  Branch (1978:11): [True: 0, False: 0]
  ------------------
 1979|      0|        PROTOBUF_MUSTTAIL return MpRepeatedVarintT<is_split, uint64_t, 0>(
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
 1980|      0|            PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      0|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 1981|      0|      } else {
 1982|      0|        ABSL_DCHECK_EQ(xform_val, +field_layout::kTvZigZag);
  ------------------
  |  |   74|      0|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|      0|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1983|      0|        PROTOBUF_MUSTTAIL return MpRepeatedVarintT<
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
 1984|      0|            is_split, uint64_t, (is_split ? 0 : field_layout::kTvZigZag)>(
 1985|      0|            PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      0|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 1986|      0|      }
 1987|     27|    case field_layout::kRep32Bits >> field_layout::kRepShift:
  ------------------
  |  Branch (1987:5): [True: 27, False: 0]
  ------------------
 1988|     27|      switch (xform_val >> field_layout::kTvShift) {
 1989|      0|        case 0:
  ------------------
  |  Branch (1989:9): [True: 0, False: 27]
  ------------------
 1990|      0|          PROTOBUF_MUSTTAIL return MpRepeatedVarintT<is_split, uint32_t, 0>(
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
 1991|      0|              PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      0|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 1992|      0|        case field_layout::kTvZigZag >> field_layout::kTvShift:
  ------------------
  |  Branch (1992:9): [True: 0, False: 27]
  ------------------
 1993|      0|          PROTOBUF_MUSTTAIL return MpRepeatedVarintT<
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
 1994|      0|              is_split, uint32_t, (is_split ? 0 : field_layout::kTvZigZag)>(
 1995|      0|              PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      0|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 1996|      0|        case field_layout::kTvEnum >> field_layout::kTvShift:
  ------------------
  |  Branch (1996:9): [True: 0, False: 27]
  ------------------
 1997|      0|          PROTOBUF_MUSTTAIL return MpRepeatedVarintT<
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
 1998|      0|              is_split, uint32_t, (is_split ? 0 : field_layout::kTvEnum)>(
 1999|      0|              PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      0|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 2000|     27|        case field_layout::kTvRange >> field_layout::kTvShift:
  ------------------
  |  Branch (2000:9): [True: 27, False: 0]
  ------------------
 2001|     27|          PROTOBUF_MUSTTAIL return MpRepeatedVarintT<
  ------------------
  |  |  236|     27|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
 2002|     27|              is_split, uint32_t, (is_split ? 0 : field_layout::kTvRange)>(
 2003|     27|              PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|     27|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 2004|      0|        default:
  ------------------
  |  Branch (2004:9): [True: 0, False: 27]
  ------------------
 2005|      0|          Unreachable();
 2006|     27|      }
 2007|      0|    case field_layout::kRep8Bits >> field_layout::kRepShift:
  ------------------
  |  Branch (2007:5): [True: 0, False: 27]
  ------------------
 2008|      0|      PROTOBUF_MUSTTAIL return MpRepeatedVarintT<is_split, bool, 0>(
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
 2009|      0|          PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      0|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 2010|       |
 2011|      0|    default:
  ------------------
  |  Branch (2011:5): [True: 0, False: 27]
  ------------------
 2012|      0|      Unreachable();
 2013|      0|      return nullptr;  // To silence -Werror=return-type in some toolchains
 2014|     27|  }
 2015|     27|}
generated_message_tctable_lite.cc:_ZN6google8protobuf8internal12_GLOBAL__N_116PrefetchEnumDataEtNS1_16TcParseTableBase8FieldAuxE:
  725|    120|    uint16_t xform_val, TcParseTableBase::FieldAux aux) {
  726|    120|}
_ZN6google8protobuf8internal8TcParser17MpRepeatedVarintTILb0EjLt1536EEEPKcPNS0_11MessageLiteES5_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 1909|     27|const char* TcParser::MpRepeatedVarintT(PROTOBUF_TC_PARAM_DECL) {
 1910|     27|  const auto& entry = RefAt<FieldEntry>(table, data.entry_offset());
 1911|     27|  const uint32_t decoded_tag = data.tag();
 1912|       |  // For is_split we ignore the incoming xform_val and read it from entry to
 1913|       |  // reduce duplication for the uncommon paths.
 1914|     27|  const uint16_t xform_val =
 1915|     27|      is_split ? (entry.type_card & field_layout::kTvMask) : xform_val_in;
  ------------------
  |  Branch (1915:7): [Folded, False: 27]
  ------------------
 1916|     27|  const bool is_zigzag = xform_val == field_layout::kTvZigZag;
 1917|     27|  const bool is_validated_enum = xform_val & field_layout::kTvEnum;
 1918|       |
 1919|     27|  const char* ptr2 = ptr;
 1920|     27|  uint32_t next_tag;
 1921|     27|  void* const base = MaybeGetSplitBase(msg, is_split, table);
 1922|     27|  auto& field = MaybeCreateRepeatedFieldRefAt<FieldType, is_split>(
 1923|     27|      base, entry.offset, msg);
 1924|       |
 1925|     27|  TcParseTableBase::FieldAux aux;
 1926|     27|  if (is_validated_enum) {
  ------------------
  |  Branch (1926:7): [True: 27, Folded]
  ------------------
 1927|     27|    aux = *table->field_aux(&entry);
 1928|     27|    PrefetchEnumData(xform_val, aux);
 1929|     27|  }
 1930|       |
 1931|     57|  do {
 1932|     57|    uint64_t tmp;
 1933|     57|    ptr = ParseVarint(ptr2, &tmp);
 1934|     57|    if (PROTOBUF_PREDICT_FALSE(ptr == nullptr)) goto error;
  ------------------
  |  |  365|     57|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 57]
  |  |  |  Branch (365:54): [Folded, False: 57]
  |  |  |  Branch (365:63): [True: 0, False: 57]
  |  |  ------------------
  ------------------
 1935|     57|    if (is_validated_enum) {
  ------------------
  |  Branch (1935:9): [True: 57, Folded]
  ------------------
 1936|     57|      if (!EnumIsValidAux(static_cast<int32_t>(tmp), xform_val, aux)) {
  ------------------
  |  Branch (1936:11): [True: 0, False: 57]
  ------------------
 1937|      0|        ptr = ptr2;
 1938|      0|        PROTOBUF_MUSTTAIL return MpUnknownEnumFallback(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                      PROTOBUF_MUSTTAIL return MpUnknownEnumFallback(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      0|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 1939|      0|      }
 1940|     57|    } else if (is_zigzag) {
  ------------------
  |  Branch (1940:16): [Folded, False: 0]
  ------------------
 1941|      0|      tmp = sizeof(FieldType) == 8 ? WireFormatLite::ZigZagDecode64(tmp)
  ------------------
  |  Branch (1941:13): [Folded, False: 0]
  ------------------
 1942|      0|                                   : WireFormatLite::ZigZagDecode32(tmp);
 1943|      0|    }
 1944|     57|    field.Add(static_cast<FieldType>(tmp));
 1945|     57|    if (PROTOBUF_PREDICT_FALSE(!ctx->DataAvailable(ptr))) goto parse_loop;
  ------------------
  |  |  365|     57|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 57]
  |  |  |  Branch (365:54): [Folded, False: 57]
  |  |  |  Branch (365:63): [True: 0, False: 57]
  |  |  ------------------
  ------------------
 1946|     57|    ptr2 = ReadTag(ptr, &next_tag);
 1947|     57|    if (PROTOBUF_PREDICT_FALSE(ptr2 == nullptr)) goto error;
  ------------------
  |  |  365|     57|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 57]
  |  |  |  Branch (365:54): [Folded, False: 57]
  |  |  |  Branch (365:63): [True: 0, False: 57]
  |  |  ------------------
  ------------------
 1948|     57|  } while (next_tag == decoded_tag);
  ------------------
  |  Branch (1948:12): [True: 30, False: 27]
  ------------------
 1949|       |
 1950|     27|parse_loop:
 1951|     27|  PROTOBUF_MUSTTAIL return ToParseLoop(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|     27|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return ToParseLoop(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|     27|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1952|      0|error:
 1953|      0|  PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1954|     27|}
generated_message_tctable_lite.cc:_ZN6google8protobuf8internal12_GLOBAL__N_114EnumIsValidAuxEitNS1_16TcParseTableBase8FieldAuxE:
  737|    184|    int32_t val, uint16_t xform_val, TcParseTableBase::FieldAux aux) {
  738|    184|  if (xform_val == field_layout::kTvRange) {
  ------------------
  |  Branch (738:7): [True: 90, False: 94]
  ------------------
  739|     90|    auto lo = aux.enum_range.start;
  740|     90|    return lo <= val && val < (lo + aux.enum_range.length);
  ------------------
  |  Branch (740:12): [True: 90, False: 0]
  |  Branch (740:25): [True: 90, False: 0]
  ------------------
  741|     90|  }
  742|     94|  if (PROTOBUF_BUILTIN_CONSTANT_P(xform_val)) {
  ------------------
  |  |  636|     94|#define PROTOBUF_BUILTIN_CONSTANT_P(x) __builtin_constant_p(x)
  |  |  ------------------
  |  |  |  Branch (636:40): [True: 93, False: 1]
  |  |  ------------------
  ------------------
  743|     93|    return internal::ValidateEnumInlined(val, aux.enum_data);
  744|     93|  } else {
  745|      1|    return internal::ValidateEnum(val, aux.enum_data);
  746|      1|  }
  747|     94|}
generated_message_tctable_lite.cc:_ZN6google8protobuf8internal12_GLOBAL__N_16SetHasERKNS1_16TcParseTableBase10FieldEntryEPNS0_11MessageLiteE:
 1607|     68|inline void SetHas(const FieldEntry& entry, MessageLite* msg) {
 1608|     68|  auto has_idx = static_cast<uint32_t>(entry.has_idx);
 1609|     68|#if defined(__x86_64__) && defined(__GNUC__)
 1610|     68|  asm("bts %1, %0\n" : "+m"(*reinterpret_cast<char*>(msg)) : "r"(has_idx));
 1611|       |#else
 1612|       |  auto& hasblock = TcParser::RefAt<uint32_t>(msg, has_idx / 32 * 4);
 1613|       |  hasblock |= uint32_t{1} << (has_idx % 32);
 1614|       |#endif
 1615|     68|}
_ZN6google8protobuf8internal8TcParser8MpStringILb0EEEPKcPNS0_11MessageLiteES5_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 2146|  5.02k|PROTOBUF_NOINLINE const char* TcParser::MpString(PROTOBUF_TC_PARAM_DECL) {
 2147|  5.02k|  const auto& entry = RefAt<FieldEntry>(table, data.entry_offset());
 2148|  5.02k|  const uint16_t type_card = entry.type_card;
 2149|  5.02k|  const uint16_t card = type_card & field_layout::kFcMask;
 2150|  5.02k|  const uint32_t decoded_wiretype = data.tag() & 7;
 2151|       |
 2152|  5.02k|  if (decoded_wiretype != WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  ------------------
  |  Branch (2152:7): [True: 0, False: 5.02k]
  ------------------
 2153|      0|    PROTOBUF_MUSTTAIL return table->fallback(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return table->fallback(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      0|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 2154|      0|  }
 2155|  5.02k|  if (card == field_layout::kFcRepeated) {
  ------------------
  |  Branch (2155:7): [True: 0, False: 5.02k]
  ------------------
 2156|      0|    PROTOBUF_MUSTTAIL return MpRepeatedString<is_split>(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return MpRepeatedString<is_split>(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      0|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 2157|      0|  }
 2158|  5.02k|  const uint16_t xform_val = type_card & field_layout::kTvMask;
 2159|  5.02k|  const uint16_t rep = type_card & field_layout::kRepMask;
 2160|       |
 2161|       |  // Mark the field as present:
 2162|  5.02k|  const bool is_oneof = card == field_layout::kFcOneof;
 2163|  5.02k|  bool need_init = false;
 2164|  5.02k|  if (card == field_layout::kFcOptional) {
  ------------------
  |  Branch (2164:7): [True: 7, False: 5.01k]
  ------------------
 2165|      7|    SetHas(entry, msg);
 2166|  5.01k|  } else if (is_oneof) {
  ------------------
  |  Branch (2166:14): [True: 5.01k, False: 0]
  ------------------
 2167|  5.01k|    need_init = ChangeOneof(table, entry, data.tag() >> 3, ctx, msg);
 2168|  5.01k|  }
 2169|       |
 2170|  5.02k|  bool is_valid = false;
 2171|  5.02k|  void* const base = MaybeGetSplitBase(msg, is_split, table);
 2172|  5.02k|  switch (rep) {
 2173|  5.02k|    case field_layout::kRepAString: {
  ------------------
  |  Branch (2173:5): [True: 5.02k, False: 0]
  ------------------
 2174|  5.02k|      auto& field = RefAt<ArenaStringPtr>(base, entry.offset);
 2175|  5.02k|      if (need_init) field.InitDefault();
  ------------------
  |  Branch (2175:11): [True: 5.01k, False: 7]
  ------------------
 2176|  5.02k|      Arena* arena = msg->GetArena();
 2177|  5.02k|      if (arena) {
  ------------------
  |  Branch (2177:11): [True: 2, False: 5.02k]
  ------------------
 2178|      2|        ptr = ctx->ReadArenaString(ptr, &field, arena);
 2179|  5.02k|      } else {
 2180|  5.02k|        std::string* str = field.MutableNoCopy(nullptr);
 2181|  5.02k|        ptr = InlineGreedyStringParser(str, ptr, ctx);
 2182|  5.02k|      }
 2183|  5.02k|      if (!ptr) break;
  ------------------
  |  Branch (2183:11): [True: 0, False: 5.02k]
  ------------------
 2184|  5.02k|      is_valid = MpVerifyUtf8(field.Get(), table, entry, xform_val);
 2185|  5.02k|      break;
 2186|  5.02k|    }
 2187|       |
 2188|       |
 2189|      0|    case field_layout::kRepCord: {
  ------------------
  |  Branch (2189:5): [True: 0, False: 5.02k]
  ------------------
 2190|      0|      absl::Cord* field;
 2191|      0|      if (is_oneof) {
  ------------------
  |  Branch (2191:11): [True: 0, False: 0]
  ------------------
 2192|      0|        if (need_init) {
  ------------------
  |  Branch (2192:13): [True: 0, False: 0]
  ------------------
 2193|      0|          field = Arena::Create<absl::Cord>(msg->GetArena());
 2194|      0|          RefAt<absl::Cord*>(msg, entry.offset) = field;
 2195|      0|        } else {
 2196|      0|          field = RefAt<absl::Cord*>(msg, entry.offset);
 2197|      0|        }
 2198|      0|      } else {
 2199|      0|        field = &RefAt<absl::Cord>(base, entry.offset);
 2200|      0|      }
 2201|      0|      ptr = InlineCordParser(field, ptr, ctx);
 2202|      0|      if (!ptr) break;
  ------------------
  |  Branch (2202:11): [True: 0, False: 0]
  ------------------
 2203|      0|      is_valid = MpVerifyUtf8(*field, table, entry, xform_val);
 2204|      0|      break;
 2205|      0|    }
 2206|       |
 2207|      0|    default:
  ------------------
  |  Branch (2207:5): [True: 0, False: 5.02k]
  ------------------
 2208|      0|      Unreachable();
 2209|  5.02k|  }
 2210|       |
 2211|  5.02k|  if (PROTOBUF_PREDICT_FALSE(ptr == nullptr || !is_valid)) {
  ------------------
  |  |  365|  10.0k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 5.02k]
  |  |  |  Branch (365:54): [Folded, False: 5.02k]
  |  |  |  Branch (365:64): [True: 0, False: 5.02k]
  |  |  |  Branch (365:64): [True: 0, False: 5.02k]
  |  |  ------------------
  ------------------
 2212|      0|    PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 2213|      0|  }
 2214|  5.02k|  PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|  5.02k|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|  5.02k|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 2215|  5.02k|}
_ZN6google8protobuf8internal8TcParser23ParseRepeatedStringOnceEPKcPNS1_11SerialArenaEPNS1_12ParseContextERNS0_16RepeatedPtrFieldINSt3__112basic_stringIcNSA_11char_traitsIcEENSA_9allocatorIcEEEEEE:
 2219|      3|    RepeatedPtrField<std::string>& field) {
 2220|      3|  int size = ReadSize(&ptr);
 2221|      3|  if (PROTOBUF_PREDICT_FALSE(!ptr)) return {};
  ------------------
  |  |  365|      3|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 3]
  |  |  |  Branch (365:54): [Folded, False: 3]
  |  |  |  Branch (365:63): [True: 0, False: 3]
  |  |  ------------------
  ------------------
 2222|      3|  auto* str = new (serial_arena->AllocateFromStringBlock()) std::string();
 2223|      3|  field.AddAllocatedForParse(str);
 2224|      3|  ptr = ctx->ReadString(ptr, size, str);
 2225|      3|  if (PROTOBUF_PREDICT_FALSE(!ptr)) return {};
  ------------------
  |  |  365|      3|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 3]
  |  |  |  Branch (365:54): [Folded, False: 3]
  |  |  |  Branch (365:63): [True: 0, False: 3]
  |  |  ------------------
  ------------------
 2226|      3|  PROTOBUF_ASSUME(ptr != nullptr);
  ------------------
  |  |  941|      3|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  ------------------
 2227|      3|  return ptr;
 2228|      3|}
_ZN6google8protobuf8internal8TcParser9MpMessageILb0EEEPKcPNS0_11MessageLiteES5_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 2314|    799|PROTOBUF_NOINLINE const char* TcParser::MpMessage(PROTOBUF_TC_PARAM_DECL) {
 2315|    799|  const auto& entry = RefAt<FieldEntry>(table, data.entry_offset());
 2316|    799|  const uint16_t type_card = entry.type_card;
 2317|    799|  const uint16_t card = type_card & field_layout::kFcMask;
 2318|       |
 2319|       |  // Check for repeated parsing:
 2320|    799|  if (card == field_layout::kFcRepeated) {
  ------------------
  |  Branch (2320:7): [True: 0, False: 799]
  ------------------
 2321|      0|    const uint16_t rep = type_card & field_layout::kRepMask;
 2322|      0|    switch (rep) {
 2323|      0|      case field_layout::kRepMessage:
  ------------------
  |  Branch (2323:7): [True: 0, False: 0]
  ------------------
 2324|      0|        PROTOBUF_MUSTTAIL return MpRepeatedMessageOrGroup<is_split, false>(
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
 2325|      0|            PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      0|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 2326|      0|      case field_layout::kRepGroup:
  ------------------
  |  Branch (2326:7): [True: 0, False: 0]
  ------------------
 2327|      0|        PROTOBUF_MUSTTAIL return MpRepeatedMessageOrGroup<is_split, true>(
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
 2328|      0|            PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      0|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 2329|      0|      default:
  ------------------
  |  Branch (2329:7): [True: 0, False: 0]
  ------------------
 2330|      0|        PROTOBUF_MUSTTAIL return table->fallback(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                      PROTOBUF_MUSTTAIL return table->fallback(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      0|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 2331|      0|    }
 2332|      0|  }
 2333|       |
 2334|    799|  const uint32_t decoded_tag = data.tag();
 2335|    799|  const uint32_t decoded_wiretype = decoded_tag & 7;
 2336|    799|  const uint16_t rep = type_card & field_layout::kRepMask;
 2337|    799|  const bool is_group = rep == field_layout::kRepGroup;
 2338|       |
 2339|       |  // Validate wiretype:
 2340|    799|  switch (rep) {
 2341|    799|    case field_layout::kRepMessage:
  ------------------
  |  Branch (2341:5): [True: 799, False: 0]
  ------------------
 2342|    799|      if (decoded_wiretype != WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  ------------------
  |  Branch (2342:11): [True: 0, False: 799]
  ------------------
 2343|      0|        goto fallback;
 2344|      0|      }
 2345|    799|      break;
 2346|    799|    case field_layout::kRepGroup:
  ------------------
  |  Branch (2346:5): [True: 0, False: 799]
  ------------------
 2347|      0|      if (decoded_wiretype != WireFormatLite::WIRETYPE_START_GROUP) {
  ------------------
  |  Branch (2347:11): [True: 0, False: 0]
  ------------------
 2348|      0|        goto fallback;
 2349|      0|      }
 2350|      0|      break;
 2351|      0|    default: {
  ------------------
  |  Branch (2351:5): [True: 0, False: 799]
  ------------------
 2352|      0|    fallback:
 2353|      0|      PROTOBUF_MUSTTAIL return table->fallback(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                    PROTOBUF_MUSTTAIL return table->fallback(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      0|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 2354|      0|    }
 2355|    799|  }
 2356|       |
 2357|    799|  const bool is_oneof = card == field_layout::kFcOneof;
 2358|    799|  bool need_init = false;
 2359|    799|  if (card == field_layout::kFcOptional) {
  ------------------
  |  Branch (2359:7): [True: 27, False: 772]
  ------------------
 2360|     27|    SetHas(entry, msg);
 2361|    772|  } else if (is_oneof) {
  ------------------
  |  Branch (2361:14): [True: 772, False: 0]
  ------------------
 2362|    772|    need_init = ChangeOneof(table, entry, data.tag() >> 3, ctx, msg);
 2363|    772|  }
 2364|       |
 2365|    799|  void* const base = MaybeGetSplitBase(msg, is_split, table);
 2366|    799|  SyncHasbits(msg, hasbits, table);
 2367|    799|  MessageLite*& field = RefAt<MessageLite*>(base, entry.offset);
 2368|       |
 2369|    799|  const TcParseTableBase* inner_table =
 2370|    799|      GetTableFromAux(type_card, *table->field_aux(&entry));
 2371|    799|  if (need_init || field == nullptr) {
  ------------------
  |  Branch (2371:7): [True: 772, False: 27]
  |  Branch (2371:20): [True: 27, False: 0]
  ------------------
 2372|    799|    field = NewMessage(inner_table, msg->GetArena());
 2373|    799|  }
 2374|    799|  const auto inner_loop = [&](const char* ptr) {
 2375|    799|    return ParseLoopPreserveNone(field, ptr, ctx, inner_table);
 2376|    799|  };
 2377|    799|  return is_group ? ctx->ParseGroupInlined(ptr, decoded_tag, inner_loop)
  ------------------
  |  Branch (2377:10): [True: 0, False: 799]
  ------------------
 2378|    799|                  : ctx->ParseLengthDelimitedInlined(ptr, inner_loop);
 2379|    799|}
_ZN6google8protobuf8internal8TcParser15GetTableFromAuxEtNS1_16TcParseTableBase8FieldAuxE:
 2301|    799|    uint16_t type_card, TcParseTableBase::FieldAux aux) {
 2302|    799|  uint16_t tv = type_card & field_layout::kTvMask;
 2303|    799|  if (ABSL_PREDICT_TRUE(tv == field_layout::kTvTable)) {
  ------------------
  |  |  179|    799|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 799, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 799]
  |  |  |  Branch (179:57): [True: 799, False: 0]
  |  |  ------------------
  ------------------
 2304|    799|    return aux.table;
 2305|    799|  }
 2306|      0|  ABSL_DCHECK(tv == field_layout::kTvDefault || tv == field_layout::kTvWeakPtr);
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|    799|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2307|      0|  const MessageLite* prototype = tv == field_layout::kTvDefault
  ------------------
  |  Branch (2307:34): [True: 0, False: 0]
  ------------------
 2308|      0|                                     ? aux.message_default()
 2309|      0|                                     : aux.message_default_weak();
 2310|      0|  return prototype->GetTcParseTable();
 2311|      0|}
_ZN6google8protobuf8internal8TcParser10NewMessageEPKNS1_16TcParseTableBaseEPNS0_5ArenaE:
  359|  24.5k|    const TcParseTableBase* table, Arena* arena) {
  360|  24.5k|  return table->class_data->New(arena);
  361|  24.5k|}
_ZZN6google8protobuf8internal8TcParser9MpMessageILb0EEEPKcPNS0_11MessageLiteES5_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEmENKUlS5_E_clES5_:
 2374|    799|  const auto inner_loop = [&](const char* ptr) {
 2375|    799|    return ParseLoopPreserveNone(field, ptr, ctx, inner_table);
 2376|    799|  };
generated_message_tctable_lite.cc:_ZZN6google8protobuf8internal8TcParser10AddMessageEPKNS1_16TcParseTableBaseERNS1_20RepeatedPtrFieldBaseEENK3$_0clEPNS0_5ArenaE:
  366|  18.5k|      [table](Arena* arena) { return NewMessage(table, arena); }));
_ZN6google8protobuf8internal8TcParser27SingularParseMessageAuxImplIhLb0ELb1EEEPKcPNS0_11MessageLiteES5_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
  371|  5.13k|    PROTOBUF_TC_PARAM_DECL) {
  372|  5.13k|  PROTOBUF_PREFETCH_WITH_OFFSET(ptr, 192);
  ------------------
  |  |  670|  5.13k|  asm("prefetcht0 " #offset "(%0)" : : "r"(base));
  ------------------
  373|  5.13k|  PROTOBUF_PREFETCH_WITH_OFFSET(ptr, 256);
  ------------------
  |  |  670|  5.13k|  asm("prefetcht0 " #offset "(%0)" : : "r"(base));
  ------------------
  374|  5.13k|  if (PROTOBUF_PREDICT_FALSE(data.coded_tag<TagType>() != 0)) {
  ------------------
  |  |  365|  5.13k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 5.13k]
  |  |  |  Branch (365:54): [Folded, False: 5.13k]
  |  |  |  Branch (365:63): [True: 0, False: 5.13k]
  |  |  ------------------
  ------------------
  375|      0|    PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
  376|      0|  }
  377|  5.13k|  auto saved_tag = UnalignedLoad<TagType>(ptr);
  378|  5.13k|  ptr += sizeof(TagType);
  379|  5.13k|  hasbits |= (uint64_t{1} << data.hasbit_idx());
  380|  5.13k|  SyncHasbits(msg, hasbits, table);
  381|  5.13k|  auto& field = RefAt<MessageLite*>(msg, data.offset());
  382|  5.13k|  const auto aux = *table->field_aux(data.aux_idx());
  383|  5.13k|  const auto* inner_table =
  384|  5.13k|      aux_is_table ? aux.table : aux.message_default()->GetTcParseTable();
  ------------------
  |  Branch (384:7): [True: 5.13k, Folded]
  ------------------
  385|       |
  386|  5.13k|  if (field == nullptr) {
  ------------------
  |  Branch (386:7): [True: 5.13k, False: 0]
  ------------------
  387|  5.13k|    field = NewMessage(inner_table, msg->GetArena());
  388|  5.13k|  }
  389|  5.13k|  const auto inner_loop = [&](const char* ptr) {
  390|  5.13k|    return ParseLoop(field, ptr, ctx, inner_table);
  391|  5.13k|  };
  392|  5.13k|  return group_coding
  ------------------
  |  Branch (392:10): [Folded, False: 5.13k]
  ------------------
  393|  5.13k|             ? ctx->ParseGroupInlined(ptr, FastDecodeTag(saved_tag), inner_loop)
  394|  5.13k|             : ctx->ParseLengthDelimitedInlined(ptr, inner_loop);
  395|  5.13k|}
_ZZN6google8protobuf8internal8TcParser27SingularParseMessageAuxImplIhLb0ELb1EEEPKcPNS0_11MessageLiteES5_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEmENKUlS5_E_clES5_:
  389|  5.13k|  const auto inner_loop = [&](const char* ptr) {
  390|  5.13k|    return ParseLoop(field, ptr, ctx, inner_table);
  391|  5.13k|  };
_ZN6google8protobuf8internal8TcParser27RepeatedParseMessageAuxImplIhLb0ELb1EEEPKcPNS0_11MessageLiteES5_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
  453|  5.56k|    PROTOBUF_TC_PARAM_DECL) {
  454|  5.56k|  if (PROTOBUF_PREDICT_FALSE(data.coded_tag<TagType>() != 0)) {
  ------------------
  |  |  365|  5.56k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 1, False: 5.56k]
  |  |  |  Branch (365:54): [Folded, False: 5.56k]
  |  |  |  Branch (365:63): [True: 1, False: 5.56k]
  |  |  ------------------
  ------------------
  455|      1|    PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      1|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      1|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
  456|      1|  }
  457|  5.56k|  PROTOBUF_PREFETCH_WITH_OFFSET(ptr, 256);
  ------------------
  |  |  670|  5.56k|  asm("prefetcht0 " #offset "(%0)" : : "r"(base));
  ------------------
  458|  5.56k|  const auto expected_tag = UnalignedLoad<TagType>(ptr);
  459|  5.56k|  const auto aux = *table->field_aux(data.aux_idx());
  460|  5.56k|  auto& field = RefAt<RepeatedPtrFieldBase>(msg, data.offset());
  461|  5.56k|  const TcParseTableBase* inner_table =
  462|  5.56k|      aux_is_table ? aux.table : aux.message_default()->GetTcParseTable();
  ------------------
  |  Branch (462:7): [True: 5.56k, Folded]
  ------------------
  463|  18.5k|  do {
  464|  18.5k|    ptr += sizeof(TagType);
  465|  18.5k|    MessageLite* submsg = AddMessage(inner_table, field);
  466|  18.5k|    const auto inner_loop = [&](const char* ptr) {
  467|  18.5k|      return ParseLoop(submsg, ptr, ctx, inner_table);
  468|  18.5k|    };
  469|  18.5k|    ptr = group_coding ? ctx->ParseGroupInlined(
  ------------------
  |  Branch (469:11): [Folded, False: 18.5k]
  ------------------
  470|      0|                             ptr, FastDecodeTag(expected_tag), inner_loop)
  471|  18.5k|                       : ctx->ParseLengthDelimitedInlined(ptr, inner_loop);
  472|  18.5k|    if (PROTOBUF_PREDICT_FALSE(ptr == nullptr)) {
  ------------------
  |  |  365|  18.5k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 18.5k]
  |  |  |  Branch (365:54): [Folded, False: 18.5k]
  |  |  |  Branch (365:63): [True: 0, False: 18.5k]
  |  |  ------------------
  ------------------
  473|      0|      PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                    PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
  474|      0|    }
  475|  18.5k|    if (PROTOBUF_PREDICT_FALSE(!ctx->DataAvailable(ptr))) {
  ------------------
  |  |  365|  18.5k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 2.84k, False: 15.6k]
  |  |  |  Branch (365:54): [Folded, False: 18.5k]
  |  |  |  Branch (365:63): [True: 2.84k, False: 15.6k]
  |  |  ------------------
  ------------------
  476|  2.84k|      PROTOBUF_MUSTTAIL return ToParseLoop(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|  2.84k|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                    PROTOBUF_MUSTTAIL return ToParseLoop(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|  2.84k|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
  477|  2.84k|    }
  478|  18.5k|  } while (UnalignedLoad<TagType>(ptr) == expected_tag);
  ------------------
  |  Branch (478:12): [True: 12.9k, False: 2.72k]
  ------------------
  479|       |
  480|  2.72k|  PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|  2.72k|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|  2.72k|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
  481|  5.56k|}
_ZZN6google8protobuf8internal8TcParser27RepeatedParseMessageAuxImplIhLb0ELb1EEEPKcPNS0_11MessageLiteES5_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEmENKUlS5_E_clES5_:
  466|  18.5k|    const auto inner_loop = [&](const char* ptr) {
  467|  18.5k|      return ParseLoop(submsg, ptr, ctx, inner_table);
  468|  18.5k|    };
_ZN6google8protobuf8internal8TcParser27RepeatedParseMessageAuxImplItLb0ELb1EEEPKcPNS0_11MessageLiteES5_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
  453|     27|    PROTOBUF_TC_PARAM_DECL) {
  454|     27|  if (PROTOBUF_PREDICT_FALSE(data.coded_tag<TagType>() != 0)) {
  ------------------
  |  |  365|     27|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 27]
  |  |  |  Branch (365:54): [Folded, False: 27]
  |  |  |  Branch (365:63): [True: 0, False: 27]
  |  |  ------------------
  ------------------
  455|      0|    PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
  456|      0|  }
  457|     27|  PROTOBUF_PREFETCH_WITH_OFFSET(ptr, 256);
  ------------------
  |  |  670|     27|  asm("prefetcht0 " #offset "(%0)" : : "r"(base));
  ------------------
  458|     27|  const auto expected_tag = UnalignedLoad<TagType>(ptr);
  459|     27|  const auto aux = *table->field_aux(data.aux_idx());
  460|     27|  auto& field = RefAt<RepeatedPtrFieldBase>(msg, data.offset());
  461|     27|  const TcParseTableBase* inner_table =
  462|     27|      aux_is_table ? aux.table : aux.message_default()->GetTcParseTable();
  ------------------
  |  Branch (462:7): [True: 27, Folded]
  ------------------
  463|     54|  do {
  464|     54|    ptr += sizeof(TagType);
  465|     54|    MessageLite* submsg = AddMessage(inner_table, field);
  466|     54|    const auto inner_loop = [&](const char* ptr) {
  467|     54|      return ParseLoop(submsg, ptr, ctx, inner_table);
  468|     54|    };
  469|     54|    ptr = group_coding ? ctx->ParseGroupInlined(
  ------------------
  |  Branch (469:11): [Folded, False: 54]
  ------------------
  470|      0|                             ptr, FastDecodeTag(expected_tag), inner_loop)
  471|     54|                       : ctx->ParseLengthDelimitedInlined(ptr, inner_loop);
  472|     54|    if (PROTOBUF_PREDICT_FALSE(ptr == nullptr)) {
  ------------------
  |  |  365|     54|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 54]
  |  |  |  Branch (365:54): [Folded, False: 54]
  |  |  |  Branch (365:63): [True: 0, False: 54]
  |  |  ------------------
  ------------------
  473|      0|      PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                    PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
  474|      0|    }
  475|     54|    if (PROTOBUF_PREDICT_FALSE(!ctx->DataAvailable(ptr))) {
  ------------------
  |  |  365|     54|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 54]
  |  |  |  Branch (365:54): [Folded, False: 54]
  |  |  |  Branch (365:63): [True: 0, False: 54]
  |  |  ------------------
  ------------------
  476|      0|      PROTOBUF_MUSTTAIL return ToParseLoop(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                    PROTOBUF_MUSTTAIL return ToParseLoop(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
  477|      0|    }
  478|     54|  } while (UnalignedLoad<TagType>(ptr) == expected_tag);
  ------------------
  |  Branch (478:12): [True: 27, False: 27]
  ------------------
  479|       |
  480|     27|  PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|     27|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|     27|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
  481|     27|}
_ZZN6google8protobuf8internal8TcParser27RepeatedParseMessageAuxImplItLb0ELb1EEEPKcPNS0_11MessageLiteES5_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEmENKUlS5_E_clES5_:
  466|     54|    const auto inner_loop = [&](const char* ptr) {
  467|     54|      return ParseLoop(submsg, ptr, ctx, inner_table);
  468|     54|    };
_ZN6google8protobuf8internal8TcParser14SingularVarintIbtLb0EEEPKcPNS0_11MessageLiteES5_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
  753|     10|    PROTOBUF_TC_PARAM_DECL) {
  754|     10|  if (PROTOBUF_PREDICT_FALSE(data.coded_tag<TagType>() != 0)) {
  ------------------
  |  |  365|     10|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 7, False: 3]
  |  |  |  Branch (365:54): [Folded, False: 10]
  |  |  |  Branch (365:63): [True: 7, False: 3]
  |  |  ------------------
  ------------------
  755|      7|    PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      7|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      7|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
  756|      7|  }
  757|      3|  ptr += sizeof(TagType);  // Consume tag
  758|      3|  hasbits |= (uint64_t{1} << data.hasbit_idx());
  759|       |
  760|       |  // clang isn't smart enough to be able to only conditionally save
  761|       |  // registers to the stack, so we turn the integer-greater-than-128
  762|       |  // case into a separate routine.
  763|      3|  if (PROTOBUF_PREDICT_FALSE(static_cast<int8_t>(*ptr) < 0)) {
  ------------------
  |  |  365|      3|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 3]
  |  |  |  Branch (365:54): [Folded, False: 3]
  |  |  |  Branch (365:63): [True: 0, False: 3]
  |  |  ------------------
  ------------------
  764|      0|    PROTOBUF_MUSTTAIL return SingularVarBigint<FieldType, TagType, zigzag>(
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
  765|      0|        PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      0|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
  766|      0|  }
  767|       |
  768|      3|  RefAt<FieldType>(msg, data.offset()) =
  769|      3|      ZigZagDecodeHelper<FieldType, zigzag>(static_cast<uint8_t>(*ptr++));
  770|      3|  PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      3|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      3|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
  771|      3|}
generated_message_tctable_lite.cc:_ZN6google8protobuf8internal12_GLOBAL__N_118ZigZagDecodeHelperIbLb0EEET_S4_:
  708|      3|inline FieldType ZigZagDecodeHelper(FieldType value) {
  709|      3|  return static_cast<FieldType>(value);
  710|      3|}
_ZN6google8protobuf8internal8TcParser12FastVarintS1IjEEPKcPNS0_11MessageLiteES5_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
  814|  31.3k|    PROTOBUF_TC_PARAM_DECL) {
  815|  31.3k|  using TagType = uint8_t;
  816|  31.3k|  if (PROTOBUF_PREDICT_FALSE(data.coded_tag<TagType>() != 0)) {
  ------------------
  |  |  365|  31.3k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 12.3k, False: 19.0k]
  |  |  |  Branch (365:54): [Folded, False: 31.3k]
  |  |  |  Branch (365:63): [True: 12.3k, False: 19.0k]
  |  |  ------------------
  ------------------
  817|  12.3k|    PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|  12.3k|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|  12.3k|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
  818|  12.3k|  }
  819|  19.0k|  int64_t res;
  820|  19.0k|  ptr = ShiftMixParseVarint<FieldType>(ptr + sizeof(TagType), res);
  821|  19.0k|  if (PROTOBUF_PREDICT_FALSE(ptr == nullptr)) {
  ------------------
  |  |  365|  19.0k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 19.0k]
  |  |  |  Branch (365:54): [Folded, False: 19.0k]
  |  |  |  Branch (365:63): [True: 0, False: 19.0k]
  |  |  ------------------
  ------------------
  822|      0|    PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
  823|      0|  }
  824|  19.0k|  hasbits |= (uint64_t{1} << data.hasbit_idx());
  825|  19.0k|  RefAt<FieldType>(msg, data.offset()) = res;
  826|  19.0k|  PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|  19.0k|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|  19.0k|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
  827|  19.0k|}
_ZN6google8protobuf8internal8TcParser12PackedVarintIjhLb0EEEPKcPNS0_11MessageLiteES5_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
  962|    205|    PROTOBUF_TC_PARAM_DECL) {
  963|    205|  if (PROTOBUF_PREDICT_FALSE(data.coded_tag<TagType>() != 0)) {
  ------------------
  |  |  365|    205|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 205]
  |  |  |  Branch (365:54): [Folded, False: 205]
  |  |  |  Branch (365:63): [True: 0, False: 205]
  |  |  ------------------
  ------------------
  964|      0|    PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
  965|      0|  }
  966|    205|  ptr += sizeof(TagType);
  967|       |  // Since ctx->ReadPackedVarint does not use TailCall or Return, sync any
  968|       |  // pending hasbits now:
  969|    205|  SyncHasbits(msg, hasbits, table);
  970|    205|  auto* field = &RefAt<RepeatedField<FieldType>>(msg, data.offset());
  971|    205|  return ctx->ReadPackedVarint(ptr, [field](uint64_t varint) {
  972|    205|    FieldType val;
  973|    205|    if (zigzag) {
  974|    205|      if (sizeof(FieldType) == 8) {
  975|    205|        val = WireFormatLite::ZigZagDecode64(varint);
  976|    205|      } else {
  977|    205|        val = WireFormatLite::ZigZagDecode32(varint);
  978|    205|      }
  979|    205|    } else {
  980|    205|      val = varint;
  981|    205|    }
  982|    205|    field->Add(val);
  983|    205|  });
  984|    205|}
_ZZN6google8protobuf8internal8TcParser12PackedVarintIjhLb0EEEPKcPNS0_11MessageLiteES5_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEmENKUlmE_clEm:
  971|    497|  return ctx->ReadPackedVarint(ptr, [field](uint64_t varint) {
  972|    497|    FieldType val;
  973|    497|    if (zigzag) {
  ------------------
  |  Branch (973:9): [Folded, False: 497]
  ------------------
  974|      0|      if (sizeof(FieldType) == 8) {
  ------------------
  |  Branch (974:11): [Folded, False: 0]
  ------------------
  975|      0|        val = WireFormatLite::ZigZagDecode64(varint);
  976|      0|      } else {
  977|      0|        val = WireFormatLite::ZigZagDecode32(varint);
  978|      0|      }
  979|    497|    } else {
  980|    497|      val = varint;
  981|    497|    }
  982|    497|    field->Add(val);
  983|    497|  });
generated_message_tctable_lite.cc:_ZN6google8protobuf8internal12_GLOBAL__N_111ParseVarintImEEPKcS5_PT_:
  634|  7.68k|                                                      Type* value) {
  635|  7.68k|  static_assert(sizeof(Type) == 4 || sizeof(Type) == 8,
  636|  7.68k|                "Only [u]int32_t and [u]int64_t please");
  637|       |#ifdef __aarch64__
  638|       |  // The VarintParse parser has a faster implementation on ARM.
  639|       |  absl::conditional_t<sizeof(Type) == 4, uint32_t, uint64_t> tmp;
  640|       |  p = VarintParse(p, &tmp);
  641|       |  if (p != nullptr) {
  642|       |    *value = tmp;
  643|       |  }
  644|       |  return p;
  645|       |#endif
  646|  7.68k|  int64_t res;
  647|  7.68k|  p = ShiftMixParseVarint<Type>(p, res);
  648|  7.68k|  *value = res;
  649|  7.68k|  return p;
  650|  7.68k|}
_ZN6google8protobuf8internal8TcParser12SingularEnumIhLt1024EEEPKcPNS0_11MessageLiteES5_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 1064|     93|    PROTOBUF_TC_PARAM_DECL) {
 1065|     93|  if (PROTOBUF_PREDICT_FALSE(data.coded_tag<TagType>() != 0)) {
  ------------------
  |  |  365|     93|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 93]
  |  |  |  Branch (365:54): [Folded, False: 93]
  |  |  |  Branch (365:63): [True: 0, False: 93]
  |  |  ------------------
  ------------------
 1066|      0|    PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1067|      0|  }
 1068|     93|  const TcParseTableBase::FieldAux aux = *table->field_aux(data.aux_idx());
 1069|     93|  PrefetchEnumData(xform_val, aux);
 1070|     93|  const char* ptr2 = ptr;  // Save for unknown enum case
 1071|     93|  ptr += sizeof(TagType);  // Consume tag
 1072|     93|  uint64_t tmp;
 1073|     93|  ptr = ParseVarint(ptr, &tmp);
 1074|     93|  if (PROTOBUF_PREDICT_FALSE(ptr == nullptr)) {
  ------------------
  |  |  365|     93|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 93]
  |  |  |  Branch (365:54): [Folded, False: 93]
  |  |  |  Branch (365:63): [True: 0, False: 93]
  |  |  ------------------
  ------------------
 1075|      0|    PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1076|      0|  }
 1077|     93|  if (PROTOBUF_PREDICT_FALSE(
  ------------------
  |  |  365|     93|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 93]
  |  |  |  Branch (365:54): [Folded, False: 93]
  |  |  |  Branch (365:63): [True: 0, False: 93]
  |  |  ------------------
  ------------------
 1078|     93|          !EnumIsValidAux(static_cast<int32_t>(tmp), xform_val, aux))) {
 1079|      0|    ptr = ptr2;
 1080|      0|    PROTOBUF_MUSTTAIL return FastUnknownEnumFallback(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return FastUnknownEnumFallback(PROTOBUF_TC_PARAM_PASS);
  ------------------
  |  |  600|      0|#define PROTOBUF_TC_PARAM_PASS msg, ptr, ctx, data, table, hasbits
  ------------------
 1081|      0|  }
 1082|     93|  hasbits |= (uint64_t{1} << data.hasbit_idx());
 1083|     93|  RefAt<int32_t>(msg, data.offset()) = tmp;
 1084|     93|  PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|     93|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|     93|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1085|     93|}
_ZN6google8protobuf8internal8TcParser22SingularEnumSmallRangeIhLh0EEEPKcPNS0_11MessageLiteES5_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 1215|     84|    PROTOBUF_TC_PARAM_DECL) {
 1216|     84|  if (PROTOBUF_PREDICT_FALSE(data.coded_tag<TagType>() != 0)) {
  ------------------
  |  |  365|     84|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 60, False: 24]
  |  |  |  Branch (365:54): [Folded, False: 84]
  |  |  |  Branch (365:63): [True: 60, False: 24]
  |  |  ------------------
  ------------------
 1217|     60|    PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|     60|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|     60|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1218|     60|  }
 1219|       |
 1220|     24|  uint8_t v = ptr[sizeof(TagType)];
 1221|     24|  if (PROTOBUF_PREDICT_FALSE(min > v || v > data.aux_idx())) {
  ------------------
  |  |  365|     48|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 24]
  |  |  |  Branch (365:54): [Folded, False: 24]
  |  |  |  Branch (365:64): [True: 0, False: 24]
  |  |  |  Branch (365:64): [True: 0, False: 24]
  |  |  ------------------
  ------------------
 1222|      0|    PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1223|      0|  }
 1224|       |
 1225|     24|  RefAt<int32_t>(msg, data.offset()) = v;
 1226|     24|  ptr += sizeof(TagType) + 1;
 1227|     24|  hasbits |= (uint64_t{1} << data.hasbit_idx());
 1228|     24|  PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|     24|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|     24|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1229|     24|}
_ZN6google8protobuf8internal8TcParser22SingularEnumSmallRangeIhLh1EEEPKcPNS0_11MessageLiteES5_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 1215|  1.06k|    PROTOBUF_TC_PARAM_DECL) {
 1216|  1.06k|  if (PROTOBUF_PREDICT_FALSE(data.coded_tag<TagType>() != 0)) {
  ------------------
  |  |  365|  1.06k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 1.06k]
  |  |  |  Branch (365:54): [Folded, False: 1.06k]
  |  |  |  Branch (365:63): [True: 0, False: 1.06k]
  |  |  ------------------
  ------------------
 1217|      0|    PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1218|      0|  }
 1219|       |
 1220|  1.06k|  uint8_t v = ptr[sizeof(TagType)];
 1221|  1.06k|  if (PROTOBUF_PREDICT_FALSE(min > v || v > data.aux_idx())) {
  ------------------
  |  |  365|  2.13k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 1.06k]
  |  |  |  Branch (365:54): [Folded, False: 1.06k]
  |  |  |  Branch (365:64): [True: 0, False: 1.06k]
  |  |  |  Branch (365:64): [True: 0, False: 1.06k]
  |  |  ------------------
  ------------------
 1222|      0|    PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1223|      0|  }
 1224|       |
 1225|  1.06k|  RefAt<int32_t>(msg, data.offset()) = v;
 1226|  1.06k|  ptr += sizeof(TagType) + 1;
 1227|  1.06k|  hasbits |= (uint64_t{1} << data.hasbit_idx());
 1228|  1.06k|  PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|  1.06k|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|  1.06k|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1229|  1.06k|}
_ZN6google8protobuf8internal8TcParser14SingularStringIhNS1_14ArenaStringPtrELNS2_8Utf8TypeE0EEEPKcPNS0_11MessageLiteES7_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 1410|  8.66k|    PROTOBUF_TC_PARAM_DECL) {
 1411|  8.66k|  if (PROTOBUF_PREDICT_FALSE(data.coded_tag<TagType>() != 0)) {
  ------------------
  |  |  365|  8.66k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 8.66k]
  |  |  |  Branch (365:54): [Folded, False: 8.66k]
  |  |  |  Branch (365:63): [True: 0, False: 8.66k]
  |  |  ------------------
  ------------------
 1412|      0|    PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1413|      0|  }
 1414|  8.66k|  auto saved_tag = UnalignedLoad<TagType>(ptr);
 1415|  8.66k|  ptr += sizeof(TagType);
 1416|  8.66k|  hasbits |= (uint64_t{1} << data.hasbit_idx());
 1417|  8.66k|  auto& field = RefAt<FieldType>(msg, data.offset());
 1418|  8.66k|  auto arena = msg->GetArena();
 1419|  8.66k|  if (arena) {
  ------------------
  |  Branch (1419:7): [True: 0, False: 8.66k]
  ------------------
 1420|      0|    ptr =
 1421|      0|        ReadStringIntoArena(msg, ptr, ctx, data.aux_idx(), table, field, arena);
 1422|  8.66k|  } else {
 1423|  8.66k|    ptr = ReadStringNoArena(msg, ptr, ctx, data.aux_idx(), table, field);
 1424|  8.66k|  }
 1425|  8.66k|  if (PROTOBUF_PREDICT_FALSE(ptr == nullptr)) {
  ------------------
  |  |  365|  8.66k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 8.66k]
  |  |  |  Branch (365:54): [Folded, False: 8.66k]
  |  |  |  Branch (365:63): [True: 0, False: 8.66k]
  |  |  ------------------
  ------------------
 1426|      0|    PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1427|      0|  }
 1428|  8.66k|  switch (utf8) {
 1429|  8.66k|    case kNoUtf8:
  ------------------
  |  Branch (1429:5): [True: 8.66k, False: 0]
  ------------------
 1430|  8.66k|#ifdef NDEBUG
 1431|  8.66k|    case kUtf8ValidateOnly:
  ------------------
  |  Branch (1431:5): [True: 0, False: 8.66k]
  ------------------
 1432|  8.66k|#endif
 1433|  8.66k|      break;
 1434|      0|    default:
  ------------------
  |  Branch (1434:5): [True: 0, False: 8.66k]
  ------------------
 1435|      0|      if (PROTOBUF_PREDICT_TRUE(IsValidUTF8(field))) {
  ------------------
  |  |  364|      0|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 0, False: 0]
  |  |  |  Branch (364:53): [Folded, False: 0]
  |  |  |  Branch (364:62): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1436|      0|        break;
 1437|      0|      }
 1438|      0|      ReportFastUtf8Error(FastDecodeTag(saved_tag), table);
 1439|      0|      if (utf8 == kUtf8) {
  ------------------
  |  Branch (1439:11): [Folded, False: 0]
  ------------------
 1440|      0|        PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                      PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1441|      0|      }
 1442|      0|      break;
 1443|  8.66k|  }
 1444|       |
 1445|  8.66k|  PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|  8.66k|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|  8.66k|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1446|  8.66k|}
generated_message_tctable_lite.cc:_ZN6google8protobuf8internal12_GLOBAL__N_119ReadStringIntoArenaEPNS0_11MessageLiteEPKcPNS1_12ParseContextEjPKNS1_16TcParseTableBaseERNS1_14ArenaStringPtrEPNS0_5ArenaE:
 1387|    661|    ArenaStringPtr& field, Arena* arena) {
 1388|    661|  return ctx->ReadArenaString(ptr, &field, arena);
 1389|    661|}
generated_message_tctable_lite.cc:_ZN6google8protobuf8internal12_GLOBAL__N_117ReadStringNoArenaEPNS0_11MessageLiteEPKcPNS1_12ParseContextEjPKNS1_16TcParseTableBaseERNS1_14ArenaStringPtrE:
 1395|  9.56k|                              ArenaStringPtr& field) {
 1396|  9.56k|  int size = ReadSize(&ptr);
 1397|  9.56k|  if (!ptr) return nullptr;
  ------------------
  |  Branch (1397:7): [True: 0, False: 9.56k]
  ------------------
 1398|  9.56k|  return ctx->ReadString(ptr, size, field.MutableNoCopy(nullptr));
 1399|  9.56k|}
_ZN6google8protobuf8internal8TcParser14SingularStringIhNS1_14ArenaStringPtrELNS2_8Utf8TypeE2EEEPKcPNS0_11MessageLiteES7_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 1410|  1.55k|    PROTOBUF_TC_PARAM_DECL) {
 1411|  1.55k|  if (PROTOBUF_PREDICT_FALSE(data.coded_tag<TagType>() != 0)) {
  ------------------
  |  |  365|  1.55k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 1.55k]
  |  |  |  Branch (365:54): [Folded, False: 1.55k]
  |  |  |  Branch (365:63): [True: 0, False: 1.55k]
  |  |  ------------------
  ------------------
 1412|      0|    PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1413|      0|  }
 1414|  1.55k|  auto saved_tag = UnalignedLoad<TagType>(ptr);
 1415|  1.55k|  ptr += sizeof(TagType);
 1416|  1.55k|  hasbits |= (uint64_t{1} << data.hasbit_idx());
 1417|  1.55k|  auto& field = RefAt<FieldType>(msg, data.offset());
 1418|  1.55k|  auto arena = msg->GetArena();
 1419|  1.55k|  if (arena) {
  ------------------
  |  Branch (1419:7): [True: 659, False: 898]
  ------------------
 1420|    659|    ptr =
 1421|    659|        ReadStringIntoArena(msg, ptr, ctx, data.aux_idx(), table, field, arena);
 1422|    898|  } else {
 1423|    898|    ptr = ReadStringNoArena(msg, ptr, ctx, data.aux_idx(), table, field);
 1424|    898|  }
 1425|  1.55k|  if (PROTOBUF_PREDICT_FALSE(ptr == nullptr)) {
  ------------------
  |  |  365|  1.55k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 1.55k]
  |  |  |  Branch (365:54): [Folded, False: 1.55k]
  |  |  |  Branch (365:63): [True: 0, False: 1.55k]
  |  |  ------------------
  ------------------
 1426|      0|    PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1427|      0|  }
 1428|  1.55k|  switch (utf8) {
 1429|      0|    case kNoUtf8:
  ------------------
  |  Branch (1429:5): [True: 0, False: 1.55k]
  ------------------
 1430|      0|#ifdef NDEBUG
 1431|  1.55k|    case kUtf8ValidateOnly:
  ------------------
  |  Branch (1431:5): [True: 1.55k, False: 0]
  ------------------
 1432|  1.55k|#endif
 1433|  1.55k|      break;
 1434|      0|    default:
  ------------------
  |  Branch (1434:5): [True: 0, False: 1.55k]
  ------------------
 1435|      0|      if (PROTOBUF_PREDICT_TRUE(IsValidUTF8(field))) {
  ------------------
  |  |  364|      0|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 0, False: 0]
  |  |  |  Branch (364:53): [Folded, False: 0]
  |  |  |  Branch (364:62): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1436|      0|        break;
 1437|      0|      }
 1438|      0|      ReportFastUtf8Error(FastDecodeTag(saved_tag), table);
 1439|      0|      if (utf8 == kUtf8) {
  ------------------
  |  Branch (1439:11): [Folded, False: 0]
  ------------------
 1440|      0|        PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                      PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1441|      0|      }
 1442|      0|      break;
 1443|  1.55k|  }
 1444|       |
 1445|  1.55k|  PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|  1.55k|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|  1.55k|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1446|  1.55k|}
_ZN6google8protobuf8internal8TcParser14SingularStringItNS1_14ArenaStringPtrELNS2_8Utf8TypeE2EEEPKcPNS0_11MessageLiteES7_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 1410|      7|    PROTOBUF_TC_PARAM_DECL) {
 1411|      7|  if (PROTOBUF_PREDICT_FALSE(data.coded_tag<TagType>() != 0)) {
  ------------------
  |  |  365|      7|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 7]
  |  |  |  Branch (365:54): [Folded, False: 7]
  |  |  |  Branch (365:63): [True: 0, False: 7]
  |  |  ------------------
  ------------------
 1412|      0|    PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1413|      0|  }
 1414|      7|  auto saved_tag = UnalignedLoad<TagType>(ptr);
 1415|      7|  ptr += sizeof(TagType);
 1416|      7|  hasbits |= (uint64_t{1} << data.hasbit_idx());
 1417|      7|  auto& field = RefAt<FieldType>(msg, data.offset());
 1418|      7|  auto arena = msg->GetArena();
 1419|      7|  if (arena) {
  ------------------
  |  Branch (1419:7): [True: 2, False: 5]
  ------------------
 1420|      2|    ptr =
 1421|      2|        ReadStringIntoArena(msg, ptr, ctx, data.aux_idx(), table, field, arena);
 1422|      5|  } else {
 1423|      5|    ptr = ReadStringNoArena(msg, ptr, ctx, data.aux_idx(), table, field);
 1424|      5|  }
 1425|      7|  if (PROTOBUF_PREDICT_FALSE(ptr == nullptr)) {
  ------------------
  |  |  365|      7|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 7]
  |  |  |  Branch (365:54): [Folded, False: 7]
  |  |  |  Branch (365:63): [True: 0, False: 7]
  |  |  ------------------
  ------------------
 1426|      0|    PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1427|      0|  }
 1428|      7|  switch (utf8) {
 1429|      0|    case kNoUtf8:
  ------------------
  |  Branch (1429:5): [True: 0, False: 7]
  ------------------
 1430|      0|#ifdef NDEBUG
 1431|      7|    case kUtf8ValidateOnly:
  ------------------
  |  Branch (1431:5): [True: 7, False: 0]
  ------------------
 1432|      7|#endif
 1433|      7|      break;
 1434|      0|    default:
  ------------------
  |  Branch (1434:5): [True: 0, False: 7]
  ------------------
 1435|      0|      if (PROTOBUF_PREDICT_TRUE(IsValidUTF8(field))) {
  ------------------
  |  |  364|      0|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 0, False: 0]
  |  |  |  Branch (364:53): [Folded, False: 0]
  |  |  |  Branch (364:62): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1436|      0|        break;
 1437|      0|      }
 1438|      0|      ReportFastUtf8Error(FastDecodeTag(saved_tag), table);
 1439|      0|      if (utf8 == kUtf8) {
  ------------------
  |  Branch (1439:11): [Folded, False: 0]
  ------------------
 1440|      0|        PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                      PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1441|      0|      }
 1442|      0|      break;
 1443|      7|  }
 1444|       |
 1445|      7|  PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      7|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      7|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1446|      7|}
_ZN6google8protobuf8internal8TcParser14RepeatedStringIhNS0_16RepeatedPtrFieldINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEELNS2_8Utf8TypeE0EEEPKcPNS0_11MessageLiteESF_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 1518|  2.40k|    PROTOBUF_TC_PARAM_DECL) {
 1519|  2.40k|  if (PROTOBUF_PREDICT_FALSE(data.coded_tag<TagType>() != 0)) {
  ------------------
  |  |  365|  2.40k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 2.40k]
  |  |  |  Branch (365:54): [Folded, False: 2.40k]
  |  |  |  Branch (365:63): [True: 0, False: 2.40k]
  |  |  ------------------
  ------------------
 1520|      0|    PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1521|      0|  }
 1522|  2.40k|  const auto expected_tag = UnalignedLoad<TagType>(ptr);
 1523|  2.40k|  auto& field = RefAt<FieldType>(msg, data.offset());
 1524|       |
 1525|  2.40k|  const auto validate_last_string = [expected_tag, table, &field] {
 1526|  2.40k|    switch (utf8) {
 1527|  2.40k|      case kNoUtf8:
 1528|  2.40k|#ifdef NDEBUG
 1529|  2.40k|      case kUtf8ValidateOnly:
 1530|  2.40k|#endif
 1531|  2.40k|        return true;
 1532|  2.40k|      default:
 1533|  2.40k|        if (PROTOBUF_PREDICT_TRUE(
 1534|  2.40k|                utf8_range::IsStructurallyValid(field[field.size() - 1]))) {
 1535|  2.40k|          return true;
 1536|  2.40k|        }
 1537|  2.40k|        ReportFastUtf8Error(FastDecodeTag(expected_tag), table);
 1538|  2.40k|        if (utf8 == kUtf8) return false;
 1539|  2.40k|        return true;
 1540|  2.40k|    }
 1541|  2.40k|  };
 1542|       |
 1543|  2.40k|  auto* arena = field.GetArena();
 1544|  2.40k|  SerialArena* serial_arena;
 1545|  2.40k|  if (PROTOBUF_PREDICT_TRUE(arena != nullptr &&
  ------------------
  |  |  364|  4.81k|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 0, False: 2.40k]
  |  |  |  Branch (364:53): [Folded, False: 2.40k]
  |  |  |  Branch (364:63): [True: 0, False: 2.40k]
  |  |  |  Branch (364:63): [True: 0, False: 0]
  |  |  |  Branch (364:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1546|  2.40k|                            arena->impl_.GetSerialArenaFast(&serial_arena) &&
 1547|  2.40k|                            field.PrepareForParse())) {
 1548|      0|    do {
 1549|      0|      ptr += sizeof(TagType);
 1550|      0|      ptr = ParseRepeatedStringOnce(ptr, serial_arena, ctx, field);
 1551|       |
 1552|      0|      if (PROTOBUF_PREDICT_FALSE(ptr == nullptr || !validate_last_string())) {
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:64): [True: 0, False: 0]
  |  |  |  Branch (365:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1553|      0|        PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                      PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1554|      0|      }
 1555|      0|      if (PROTOBUF_PREDICT_FALSE(!ctx->DataAvailable(ptr))) goto parse_loop;
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1556|      0|    } while (UnalignedLoad<TagType>(ptr) == expected_tag);
  ------------------
  |  Branch (1556:14): [True: 0, False: 0]
  ------------------
 1557|  2.40k|  } else {
 1558|  5.91k|    do {
 1559|  5.91k|      ptr += sizeof(TagType);
 1560|  5.91k|      std::string* str = field.Add();
 1561|  5.91k|      ptr = InlineGreedyStringParser(str, ptr, ctx);
 1562|  5.91k|      if (PROTOBUF_PREDICT_FALSE(ptr == nullptr || !validate_last_string())) {
  ------------------
  |  |  365|  11.8k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 5.91k]
  |  |  |  Branch (365:54): [Folded, False: 5.91k]
  |  |  |  Branch (365:64): [True: 0, False: 5.91k]
  |  |  |  Branch (365:64): [True: 0, False: 5.91k]
  |  |  ------------------
  ------------------
 1563|      0|        PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                      PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1564|      0|      }
 1565|  5.91k|      if (PROTOBUF_PREDICT_FALSE(!ctx->DataAvailable(ptr))) goto parse_loop;
  ------------------
  |  |  365|  5.91k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 1.61k, False: 4.29k]
  |  |  |  Branch (365:54): [Folded, False: 5.91k]
  |  |  |  Branch (365:63): [True: 1.61k, False: 4.29k]
  |  |  ------------------
  ------------------
 1566|  5.91k|    } while (UnalignedLoad<TagType>(ptr) == expected_tag);
  ------------------
  |  Branch (1566:14): [True: 3.51k, False: 786]
  ------------------
 1567|  2.40k|  }
 1568|    786|  PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|    786|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|    786|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1569|  1.61k|parse_loop:
 1570|  1.61k|  PROTOBUF_MUSTTAIL return ToParseLoop(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|  1.61k|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return ToParseLoop(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|  1.61k|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1571|  2.40k|}
_ZZN6google8protobuf8internal8TcParser14RepeatedStringIhNS0_16RepeatedPtrFieldINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEELNS2_8Utf8TypeE0EEEPKcPNS0_11MessageLiteESF_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEmENKUlvE_clEv:
 1525|  5.91k|  const auto validate_last_string = [expected_tag, table, &field] {
 1526|  5.91k|    switch (utf8) {
 1527|  5.91k|      case kNoUtf8:
  ------------------
  |  Branch (1527:7): [True: 5.91k, False: 0]
  ------------------
 1528|  5.91k|#ifdef NDEBUG
 1529|  5.91k|      case kUtf8ValidateOnly:
  ------------------
  |  Branch (1529:7): [True: 0, False: 5.91k]
  ------------------
 1530|  5.91k|#endif
 1531|  5.91k|        return true;
 1532|      0|      default:
  ------------------
  |  Branch (1532:7): [True: 0, False: 5.91k]
  ------------------
 1533|      0|        if (PROTOBUF_PREDICT_TRUE(
  ------------------
  |  |  364|      0|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 0, False: 0]
  |  |  |  Branch (364:53): [Folded, False: 0]
  |  |  |  Branch (364:62): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1534|      0|                utf8_range::IsStructurallyValid(field[field.size() - 1]))) {
 1535|      0|          return true;
 1536|      0|        }
 1537|      0|        ReportFastUtf8Error(FastDecodeTag(expected_tag), table);
 1538|      0|        if (utf8 == kUtf8) return false;
  ------------------
  |  Branch (1538:13): [Folded, False: 0]
  ------------------
 1539|      0|        return true;
 1540|  5.91k|    }
 1541|  5.91k|  };
_ZN6google8protobuf8internal8TcParser14RepeatedStringIhNS0_16RepeatedPtrFieldINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEELNS2_8Utf8TypeE2EEEPKcPNS0_11MessageLiteESF_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEm:
 1518|      6|    PROTOBUF_TC_PARAM_DECL) {
 1519|      6|  if (PROTOBUF_PREDICT_FALSE(data.coded_tag<TagType>() != 0)) {
  ------------------
  |  |  365|      6|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 6]
  |  |  |  Branch (365:54): [Folded, False: 6]
  |  |  |  Branch (365:63): [True: 0, False: 6]
  |  |  ------------------
  ------------------
 1520|      0|    PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                  PROTOBUF_MUSTTAIL return MiniParse(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1521|      0|  }
 1522|      6|  const auto expected_tag = UnalignedLoad<TagType>(ptr);
 1523|      6|  auto& field = RefAt<FieldType>(msg, data.offset());
 1524|       |
 1525|      6|  const auto validate_last_string = [expected_tag, table, &field] {
 1526|      6|    switch (utf8) {
 1527|      6|      case kNoUtf8:
 1528|      6|#ifdef NDEBUG
 1529|      6|      case kUtf8ValidateOnly:
 1530|      6|#endif
 1531|      6|        return true;
 1532|      6|      default:
 1533|      6|        if (PROTOBUF_PREDICT_TRUE(
 1534|      6|                utf8_range::IsStructurallyValid(field[field.size() - 1]))) {
 1535|      6|          return true;
 1536|      6|        }
 1537|      6|        ReportFastUtf8Error(FastDecodeTag(expected_tag), table);
 1538|      6|        if (utf8 == kUtf8) return false;
 1539|      6|        return true;
 1540|      6|    }
 1541|      6|  };
 1542|       |
 1543|      6|  auto* arena = field.GetArena();
 1544|      6|  SerialArena* serial_arena;
 1545|      6|  if (PROTOBUF_PREDICT_TRUE(arena != nullptr &&
  ------------------
  |  |  364|     18|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 3, False: 3]
  |  |  |  Branch (364:53): [Folded, False: 6]
  |  |  |  Branch (364:63): [True: 3, False: 3]
  |  |  |  Branch (364:63): [True: 3, False: 0]
  |  |  |  Branch (364:63): [True: 3, False: 0]
  |  |  ------------------
  ------------------
 1546|      6|                            arena->impl_.GetSerialArenaFast(&serial_arena) &&
 1547|      6|                            field.PrepareForParse())) {
 1548|      3|    do {
 1549|      3|      ptr += sizeof(TagType);
 1550|      3|      ptr = ParseRepeatedStringOnce(ptr, serial_arena, ctx, field);
 1551|       |
 1552|      3|      if (PROTOBUF_PREDICT_FALSE(ptr == nullptr || !validate_last_string())) {
  ------------------
  |  |  365|      6|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 3]
  |  |  |  Branch (365:54): [Folded, False: 3]
  |  |  |  Branch (365:64): [True: 0, False: 3]
  |  |  |  Branch (365:64): [True: 0, False: 3]
  |  |  ------------------
  ------------------
 1553|      0|        PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                      PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1554|      0|      }
 1555|      3|      if (PROTOBUF_PREDICT_FALSE(!ctx->DataAvailable(ptr))) goto parse_loop;
  ------------------
  |  |  365|      3|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 2, False: 1]
  |  |  |  Branch (365:54): [Folded, False: 3]
  |  |  |  Branch (365:63): [True: 2, False: 1]
  |  |  ------------------
  ------------------
 1556|      3|    } while (UnalignedLoad<TagType>(ptr) == expected_tag);
  ------------------
  |  Branch (1556:14): [True: 0, False: 1]
  ------------------
 1557|      3|  } else {
 1558|      3|    do {
 1559|      3|      ptr += sizeof(TagType);
 1560|      3|      std::string* str = field.Add();
 1561|      3|      ptr = InlineGreedyStringParser(str, ptr, ctx);
 1562|      3|      if (PROTOBUF_PREDICT_FALSE(ptr == nullptr || !validate_last_string())) {
  ------------------
  |  |  365|      6|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 3]
  |  |  |  Branch (365:54): [Folded, False: 3]
  |  |  |  Branch (365:64): [True: 0, False: 3]
  |  |  |  Branch (365:64): [True: 0, False: 3]
  |  |  ------------------
  ------------------
 1563|      0|        PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      0|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                      PROTOBUF_MUSTTAIL return Error(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      0|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1564|      0|      }
 1565|      3|      if (PROTOBUF_PREDICT_FALSE(!ctx->DataAvailable(ptr))) goto parse_loop;
  ------------------
  |  |  365|      3|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 2, False: 1]
  |  |  |  Branch (365:54): [Folded, False: 3]
  |  |  |  Branch (365:63): [True: 2, False: 1]
  |  |  ------------------
  ------------------
 1566|      3|    } while (UnalignedLoad<TagType>(ptr) == expected_tag);
  ------------------
  |  Branch (1566:14): [True: 0, False: 1]
  ------------------
 1567|      3|  }
 1568|      2|  PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      2|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return ToTagDispatch(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      2|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1569|      4|parse_loop:
 1570|      4|  PROTOBUF_MUSTTAIL return ToParseLoop(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  236|      4|#define PROTOBUF_MUSTTAIL [[clang::musttail]]
  ------------------
                PROTOBUF_MUSTTAIL return ToParseLoop(PROTOBUF_TC_PARAM_NO_DATA_PASS);
  ------------------
  |  |  613|      4|  msg, ptr, ctx, ::google::protobuf::internal::TcFieldData::DefaultInit(), table, hasbits
  ------------------
 1571|      6|}
_ZZN6google8protobuf8internal8TcParser14RepeatedStringIhNS0_16RepeatedPtrFieldINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEELNS2_8Utf8TypeE2EEEPKcPNS0_11MessageLiteESF_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEmENKUlvE_clEv:
 1525|      6|  const auto validate_last_string = [expected_tag, table, &field] {
 1526|      6|    switch (utf8) {
 1527|      0|      case kNoUtf8:
  ------------------
  |  Branch (1527:7): [True: 0, False: 6]
  ------------------
 1528|      0|#ifdef NDEBUG
 1529|      6|      case kUtf8ValidateOnly:
  ------------------
  |  Branch (1529:7): [True: 6, False: 0]
  ------------------
 1530|      6|#endif
 1531|      6|        return true;
 1532|      0|      default:
  ------------------
  |  Branch (1532:7): [True: 0, False: 6]
  ------------------
 1533|      0|        if (PROTOBUF_PREDICT_TRUE(
  ------------------
  |  |  364|      0|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 0, False: 0]
  |  |  |  Branch (364:53): [Folded, False: 0]
  |  |  |  Branch (364:62): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1534|      0|                utf8_range::IsStructurallyValid(field[field.size() - 1]))) {
 1535|      0|          return true;
 1536|      0|        }
 1537|      0|        ReportFastUtf8Error(FastDecodeTag(expected_tag), table);
 1538|      0|        if (utf8 == kUtf8) return false;
  ------------------
  |  Branch (1538:13): [Folded, False: 0]
  ------------------
 1539|      0|        return true;
 1540|      6|    }
 1541|      6|  };

_ZN6google8protobuf8internal24InitProtobufDefaultsSlowEv:
  101|      2|void InitProtobufDefaultsSlow() {
  102|      2|  static bool is_inited = InitProtobufDefaultsImpl();
  103|      2|  (void)is_inited;
  104|      2|}
generated_message_util.cc:_ZN6google8protobuf8internalL24InitProtobufDefaultsImplEv:
   91|      2|static bool InitProtobufDefaultsImpl() {
   92|      2|  fixed_address_empty_string.DefaultConstruct();
   93|      2|  OnShutdownDestroyString(fixed_address_empty_string.get_mutable());
   94|      2|  InitWeakDefaults();
   95|       |
   96|       |
   97|      2|  init_protobuf_defaults_state.store(true, std::memory_order_release);
   98|      2|  return true;
   99|      2|}
generated_message_util.cc:_ZN6google8protobuf8internalL16InitWeakDefaultsEv:
   71|      2|static void InitWeakDefaults() {
   72|       |  // force link the dummy entry.
   73|      2|  StrongPointer<DummyWeakDefault*, &dummy_weak_default>();
   74|       |  // We don't know the size of each object, but we know the layout of the tail.
   75|       |  // It contains a WeakDescriptorDefaultTail object.
   76|       |  // As such, we iterate the section backwards.
   77|      2|  const char* start = &__start_pb_defaults;
   78|      2|  const char* end = &__stop_pb_defaults;
   79|      4|  while (start != end) {
  ------------------
  |  Branch (79:10): [True: 2, False: 2]
  ------------------
   80|      2|    auto* tail = reinterpret_cast<const WeakDescriptorDefaultTail*>(end) - 1;
   81|      2|    end -= tail->size;
   82|      2|    const Message* instance = reinterpret_cast<const Message*>(end);
   83|      2|    *tail->target = instance;
   84|      2|  }
   85|      2|}

_ZN6google8protobuf8internal20InitProtobufDefaultsEv:
   71|     67|PROTOBUF_EXPORT inline void InitProtobufDefaults() {
   72|     67|  if (PROTOBUF_PREDICT_FALSE(
  ------------------
  |  |  365|     67|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 67]
  |  |  |  Branch (365:54): [Folded, False: 67]
  |  |  |  Branch (365:63): [True: 0, False: 67]
  |  |  ------------------
  ------------------
   73|     67|          !init_protobuf_defaults_state.load(std::memory_order_acquire))) {
   74|      0|    InitProtobufDefaultsSlow();
   75|      0|  }
   76|     67|}
_ZN6google8protobuf8internal14GetEmptyStringEv:
   79|     61|PROTOBUF_EXPORT inline const std::string& GetEmptyString() {
   80|     61|  InitProtobufDefaults();
   81|     61|  return GetEmptyStringAlreadyInited();
   82|     61|}
_ZN6google8protobuf8internal23OnShutdownDestroyStringEPKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  182|      2|inline void OnShutdownDestroyString(const std::string* ptr) {
  183|      2|  OnShutdownRun(DestroyString, ptr);
  184|      2|}
_ZN6google8protobuf8internal17AllAreInitializedINS0_15DescriptorProtoEEEbRKNS0_16RepeatedPtrFieldIT_EE:
  103|    117|bool AllAreInitialized(const RepeatedPtrField<Msg>& t) {
  104|    224|  for (int i = t.size(); --i >= 0;) {
  ------------------
  |  Branch (104:26): [True: 107, False: 117]
  ------------------
  105|    107|    if (!t.Get(i).IsInitialized()) return false;
  ------------------
  |  Branch (105:9): [True: 0, False: 107]
  ------------------
  106|    107|  }
  107|    117|  return true;
  108|    117|}
_ZN6google8protobuf8internal17AllAreInitializedINS0_19EnumDescriptorProtoEEEbRKNS0_16RepeatedPtrFieldIT_EE:
  103|    117|bool AllAreInitialized(const RepeatedPtrField<Msg>& t) {
  104|    171|  for (int i = t.size(); --i >= 0;) {
  ------------------
  |  Branch (104:26): [True: 54, False: 117]
  ------------------
  105|     54|    if (!t.Get(i).IsInitialized()) return false;
  ------------------
  |  Branch (105:9): [True: 0, False: 54]
  ------------------
  106|     54|  }
  107|    117|  return true;
  108|    117|}
_ZN6google8protobuf8internal17AllAreInitializedINS0_22ServiceDescriptorProtoEEEbRKNS0_16RepeatedPtrFieldIT_EE:
  103|     10|bool AllAreInitialized(const RepeatedPtrField<Msg>& t) {
  104|     10|  for (int i = t.size(); --i >= 0;) {
  ------------------
  |  Branch (104:26): [True: 0, False: 10]
  ------------------
  105|      0|    if (!t.Get(i).IsInitialized()) return false;
  ------------------
  |  Branch (105:9): [True: 0, False: 0]
  ------------------
  106|      0|  }
  107|     10|  return true;
  108|     10|}
_ZN6google8protobuf8internal17AllAreInitializedINS0_20FieldDescriptorProtoEEEbRKNS0_16RepeatedPtrFieldIT_EE:
  103|    224|bool AllAreInitialized(const RepeatedPtrField<Msg>& t) {
  104|    755|  for (int i = t.size(); --i >= 0;) {
  ------------------
  |  Branch (104:26): [True: 531, False: 224]
  ------------------
  105|    531|    if (!t.Get(i).IsInitialized()) return false;
  ------------------
  |  Branch (105:9): [True: 0, False: 531]
  ------------------
  106|    531|  }
  107|    224|  return true;
  108|    224|}
_ZN6google8protobuf8internal17AllAreInitializedINS0_30DescriptorProto_ExtensionRangeEEEbRKNS0_16RepeatedPtrFieldIT_EE:
  103|    107|bool AllAreInitialized(const RepeatedPtrField<Msg>& t) {
  104|    135|  for (int i = t.size(); --i >= 0;) {
  ------------------
  |  Branch (104:26): [True: 28, False: 107]
  ------------------
  105|     28|    if (!t.Get(i).IsInitialized()) return false;
  ------------------
  |  Branch (105:9): [True: 0, False: 28]
  ------------------
  106|     28|  }
  107|    107|  return true;
  108|    107|}
_ZN6google8protobuf8internal17AllAreInitializedINS0_20OneofDescriptorProtoEEEbRKNS0_16RepeatedPtrFieldIT_EE:
  103|    107|bool AllAreInitialized(const RepeatedPtrField<Msg>& t) {
  104|    113|  for (int i = t.size(); --i >= 0;) {
  ------------------
  |  Branch (104:26): [True: 6, False: 107]
  ------------------
  105|      6|    if (!t.Get(i).IsInitialized()) return false;
  ------------------
  |  Branch (105:9): [True: 0, False: 6]
  ------------------
  106|      6|  }
  107|    107|  return true;
  108|    107|}
_ZN6google8protobuf8internal17AllAreInitializedINS0_19UninterpretedOptionEEEbRKNS0_16RepeatedPtrFieldIT_EE:
  103|     77|bool AllAreInitialized(const RepeatedPtrField<Msg>& t) {
  104|     77|  for (int i = t.size(); --i >= 0;) {
  ------------------
  |  Branch (104:26): [True: 0, False: 77]
  ------------------
  105|      0|    if (!t.Get(i).IsInitialized()) return false;
  ------------------
  |  Branch (105:9): [True: 0, False: 0]
  ------------------
  106|      0|  }
  107|     77|  return true;
  108|     77|}
_ZN6google8protobuf8internal17AllAreInitializedINS0_24EnumValueDescriptorProtoEEEbRKNS0_16RepeatedPtrFieldIT_EE:
  103|     54|bool AllAreInitialized(const RepeatedPtrField<Msg>& t) {
  104|    538|  for (int i = t.size(); --i >= 0;) {
  ------------------
  |  Branch (104:26): [True: 484, False: 54]
  ------------------
  105|    484|    if (!t.Get(i).IsInitialized()) return false;
  ------------------
  |  Branch (105:9): [True: 0, False: 484]
  ------------------
  106|    484|  }
  107|     54|  return true;
  108|     54|}
_ZN6google8protobuf8internal17AllAreInitializedINS0_43FeatureSetDefaults_FeatureSetEditionDefaultEEEbRKNS0_16RepeatedPtrFieldIT_EE:
  103|      1|bool AllAreInitialized(const RepeatedPtrField<Msg>& t) {
  104|      5|  for (int i = t.size(); --i >= 0;) {
  ------------------
  |  Branch (104:26): [True: 4, False: 1]
  ------------------
  105|      4|    if (!t.Get(i).IsInitialized()) return false;
  ------------------
  |  Branch (105:9): [True: 0, False: 4]
  ------------------
  106|      4|  }
  107|      1|  return true;
  108|      1|}

_ZN6google8protobuf2io19EpsCopyOutputStream30WriteStringMaybeAliasedOutlineEjRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPh:
  990|      1|                                                           uint8_t* ptr) {
  991|      1|  ptr = EnsureSpace(ptr);
  992|      1|  uint32_t size = s.size();
  993|      1|  ptr = WriteLengthDelim(num, size, ptr);
  994|      1|  return WriteRawMaybeAliased(s.data(), size, ptr);
  995|      1|}

_ZN6google8protobuf2io16CodedInputStream24GetDefaultRecursionLimitEv:
  387|  3.76k|  static int GetDefaultRecursionLimit() { return default_recursion_limit_; }
_ZN6google8protobuf2io19EpsCopyOutputStreamC2EPvib:
  643|    258|      : end_(static_cast<uint8_t*>(data) + size),
  644|    258|        buffer_end_(nullptr),
  645|    258|        stream_(nullptr),
  646|    258|        is_serialization_deterministic_(deterministic) {}
_ZN6google8protobuf2io19EpsCopyOutputStream8WriteRawEPKviPh:
  669|      1|  uint8_t* WriteRaw(const void* data, int size, uint8_t* ptr) {
  670|      1|    if (PROTOBUF_PREDICT_FALSE(end_ - ptr < size)) {
  ------------------
  |  |  365|      1|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 1]
  |  |  |  Branch (365:54): [Folded, False: 1]
  |  |  |  Branch (365:63): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  671|      0|      return WriteRawFallback(data, size, ptr);
  672|      0|    }
  673|      1|    std::memcpy(ptr, data, static_cast<unsigned int>(size));
  674|      1|    return ptr + size;
  675|      1|  }
_ZN6google8protobuf2io19EpsCopyOutputStream20WriteRawMaybeAliasedEPKviPh:
  683|      1|  uint8_t* WriteRawMaybeAliased(const void* data, int size, uint8_t* ptr) {
  684|      1|    if (aliasing_enabled_) {
  ------------------
  |  Branch (684:9): [True: 0, False: 1]
  ------------------
  685|      0|      return WriteAliasedRaw(data, size, ptr);
  686|      1|    } else {
  687|      1|      return WriteRaw(data, size, ptr);
  688|      1|    }
  689|      1|  }
_ZN6google8protobuf2io17CodedOutputStream35IsDefaultSerializationDeterministicEv:
 1258|    258|  static bool IsDefaultSerializationDeterministic() {
 1259|    258|    return default_serialization_deterministic_.load(
 1260|    258|               std::memory_order_relaxed) != 0;
 1261|    258|  }

_ZN6google8protobuf2io9Tokenizer12IsIdentifierERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
 1244|      5|bool Tokenizer::IsIdentifier(const std::string& text) {
 1245|       |  // Mirrors IDENTIFIER definition in Tokenizer::Next() above.
 1246|      5|  if (text.size() == 0) return false;
  ------------------
  |  Branch (1246:7): [True: 0, False: 5]
  ------------------
 1247|      5|  if (!Letter::InClass(text.at(0))) return false;
  ------------------
  |  Branch (1247:7): [True: 0, False: 5]
  ------------------
 1248|      5|  if (!AllInClass<Alphanumeric>(text.substr(1))) return false;
  ------------------
  |  Branch (1248:7): [True: 0, False: 5]
  ------------------
 1249|      5|  return true;
 1250|      5|}
tokenizer.cc:_ZN6google8protobuf2io12_GLOBAL__N_16Letter7InClassEc:
  100|     30|    static inline bool InClass(char c) { return EXPRESSION; } \
  ------------------
  |  Branch (100:49): [True: 0, False: 5]
  |  Branch (100:49): [True: 0, False: 0]
  |  Branch (100:49): [True: 5, False: 0]
  |  Branch (100:49): [True: 5, False: 0]
  |  Branch (100:49): [True: 0, False: 0]
  ------------------
tokenizer.cc:_ZN6google8protobuf2io12_GLOBAL__N_112Alphanumeric7InClassEc:
  100|    316|    static inline bool InClass(char c) { return EXPRESSION; } \
  ------------------
  |  Branch (100:49): [True: 0, False: 44]
  |  Branch (100:49): [True: 0, False: 0]
  |  Branch (100:49): [True: 44, False: 0]
  |  Branch (100:49): [True: 42, False: 2]
  |  Branch (100:49): [True: 2, False: 0]
  |  Branch (100:49): [True: 0, False: 2]
  |  Branch (100:49): [True: 2, False: 0]
  ------------------
tokenizer.cc:_ZN6google8protobuf2ioL10AllInClassINS1_12_GLOBAL__N_112AlphanumericEEEbRKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE:
 1237|      5|static bool AllInClass(const std::string& s) {
 1238|     44|  for (const char character : s) {
  ------------------
  |  Branch (1238:29): [True: 44, False: 5]
  ------------------
 1239|     44|    if (!CharacterClass::InClass(character)) return false;
  ------------------
  |  Branch (1239:9): [True: 0, False: 44]
  ------------------
 1240|     44|  }
 1241|      5|  return true;
 1242|      5|}

_ZN6google8protobuf2io19mutable_string_dataEPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  499|    258|inline char* mutable_string_data(std::string* s) {
  500|    258|  return &(*s)[0];
  501|    258|}

_ZNK6google8protobuf7Message11GetMetadataEv:
  155|   161k|Metadata Message::GetMetadata() const {
  156|   161k|  return GetMetadataImpl(GetClassData()->full());
  157|   161k|}
_ZN6google8protobuf7Message15GetMetadataImplERKNS0_8internal13ClassDataFullE:
  159|   215k|Metadata Message::GetMetadataImpl(const internal::ClassDataFull& data) {
  160|   215k|  auto* table = data.descriptor_table;
  161|       |  // Only codegen types provide a table. DynamicMessage does not provide a table
  162|       |  // and instead eagerly initializes the descriptor/reflection members.
  163|   215k|  if (ABSL_PREDICT_TRUE(table != nullptr)) {
  ------------------
  |  |  179|   215k|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 215k, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 215k]
  |  |  |  Branch (179:57): [True: 215k, False: 0]
  |  |  ------------------
  ------------------
  164|   215k|    if (ABSL_PREDICT_FALSE(data.get_metadata_tracker != nullptr)) {
  ------------------
  |  |  178|   215k|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 215k]
  |  |  |  Branch (178:49): [Folded, False: 215k]
  |  |  |  Branch (178:58): [True: 0, False: 215k]
  |  |  ------------------
  ------------------
  165|      0|      data.get_metadata_tracker();
  166|      0|    }
  167|   215k|    absl::call_once(*table->once, [table] {
  168|   215k|      internal::AssignDescriptorsOnceInnerCall(table);
  169|   215k|    });
  170|   215k|  }
  171|   215k|  return {data.descriptor, data.reflection};
  172|   215k|}
_ZNK6google8protobuf7Message29MaybeComputeUnknownFieldsSizeEmPKNS0_8internal10CachedSizeE:
  197|  1.27k|    size_t total_size, const internal::CachedSize* cached_size) const {
  198|  1.27k|  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  ------------------
  |  |  365|  1.27k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 1.27k]
  |  |  |  Branch (365:54): [Folded, False: 1.27k]
  |  |  |  Branch (365:63): [True: 0, False: 1.27k]
  |  |  ------------------
  ------------------
  199|      0|    return ComputeUnknownFieldsSize(total_size, cached_size);
  200|      0|  }
  201|  1.27k|  cached_size->Set(internal::ToCachedSize(total_size));
  202|  1.27k|  return total_size;
  203|  1.27k|}
_ZN6google8protobuf14MessageFactoryD2Ev:
  253|      4|MessageFactory::~MessageFactory() = default;
_ZN6google8protobuf14MessageFactory17generated_factoryEv:
  440|      4|MessageFactory* MessageFactory::generated_factory() {
  441|      4|  return GeneratedMessageFactory::singleton();
  442|      4|}
_ZN6google8protobuf14MessageFactory29InternalRegisterGeneratedFileEPKNS0_8internal15DescriptorTableE:
  445|      6|    const google::protobuf::internal::DescriptorTable* table) {
  446|      6|  GeneratedMessageFactory::singleton()->RegisterFile(table);
  447|      6|}
message.cc:_ZN6google8protobuf12_GLOBAL__N_123GeneratedMessageFactory9singletonEv:
  339|     10|GeneratedMessageFactory* GeneratedMessageFactory::singleton() {
  340|     10|  static auto instance =
  341|     10|      internal::OnShutdownDelete(new GeneratedMessageFactory);
  342|     10|  return instance;
  343|     10|}
message.cc:_ZN6google8protobuf12_GLOBAL__N_123GeneratedMessageFactoryC2Ev:
  270|      2|  GeneratedMessageFactory() {
  271|      2|    dropped_defaults_factory_.SetDelegateToGeneratedFactory(true);
  272|      2|  }
message.cc:_ZNK6google8protobuf12_GLOBAL__N_123GeneratedMessageFactory18DescriptorByNameEqclEN4absl12lts_2024011611string_viewES6_:
  313|      2|    bool operator()(absl::string_view lhs, absl::string_view rhs) const {
  314|      2|      return lhs == rhs;
  315|      2|    }
message.cc:_ZN6google8protobuf12_GLOBAL__N_123GeneratedMessageFactory12RegisterFileEPKNS0_8internal15DescriptorTableE:
  346|      6|    const google::protobuf::internal::DescriptorTable* table) {
  347|      6|  if (!files_.insert(table).second) {
  ------------------
  |  Branch (347:7): [True: 0, False: 6]
  ------------------
  348|      0|    ABSL_LOG(FATAL) << "File is already registered: " << table->filename;
  ------------------
  |  |   38|      0|#define ABSL_LOG(severity) ABSL_LOG_INTERNAL_LOG_IMPL(_##severity)
  |  |  ------------------
  |  |  |  |   25|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, true) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   26|      0|      ABSL_LOGGING_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  349|      0|  }
  350|      6|}
message.cc:_ZNK6google8protobuf12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashclEPKNS0_8internal15DescriptorTableE:
  291|      6|    size_t operator()(const google::protobuf::internal::DescriptorTable* t) const {
  292|      6|      return absl::HashOf(absl::string_view{t->filename});
  293|      6|    }
message.cc:_ZNK6google8protobuf12_GLOBAL__N_123GeneratedMessageFactory18DescriptorByNameEqclEPKNS0_8internal15DescriptorTableES7_:
  302|      2|                    const google::protobuf::internal::DescriptorTable* rhs) const {
  303|      2|      return lhs == rhs || (*this)(lhs->filename, rhs->filename);
  ------------------
  |  Branch (303:14): [True: 0, False: 2]
  |  Branch (303:28): [True: 0, False: 2]
  ------------------
  304|      2|    }
message.cc:_ZZN6google8protobuf7Message15GetMetadataImplERKNS0_8internal13ClassDataFullEENK3$_0clEv:
  167|      4|    absl::call_once(*table->once, [table] {
  168|      4|      internal::AssignDescriptorsOnceInnerCall(table);
  169|      4|    });

_ZNK6google8protobuf10Reflection13HasOneofFieldERKNS0_7MessageEPKNS0_15FieldDescriptorE:
 1552|  4.66k|                               const FieldDescriptor* field) const {
 1553|  4.66k|  return (GetOneofCase(message, field->containing_oneof()) ==
 1554|  4.66k|          static_cast<uint32_t>(field->number()));
 1555|  4.66k|}
_ZN6google8protobuf14MessageFactoryC2Ev:
 1365|      8|  inline MessageFactory() = default;
_ZN6google8protobuf8internal18GetPointerAtOffsetIjEEPT_Pvj:
  214|  5.09k|inline To* GetPointerAtOffset(void* message, uint32_t offset) {
  215|  5.09k|  return reinterpret_cast<To*>(reinterpret_cast<char*>(message) + offset);
  216|  5.09k|}
_ZNK6google8protobuf10Reflection6GetRawINS0_8internal20RepeatedPtrFieldBaseEEERKT_RKNS0_7MessageEPKNS0_15FieldDescriptorE:
 1624|  43.1k|                               const FieldDescriptor* field) const {
 1625|  86.3k|  ABSL_DCHECK(!schema_.InRealOneof(field) || HasOneofField(message, field))
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  43.1k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  43.1k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  86.3k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  86.3k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 43.1k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  43.1k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 43.1k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  43.1k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 43.1k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  43.1k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  43.1k|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1626|  86.3k|      << "Field = " << field->full_name();
 1627|       |
 1628|  43.1k|  if (PROTOBUF_PREDICT_TRUE(!schema_.InRealOneof(field))) {
  ------------------
  |  |  364|  43.1k|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 43.1k, False: 0]
  |  |  |  Branch (364:53): [Folded, False: 43.1k]
  |  |  |  Branch (364:62): [True: 43.1k, False: 0]
  |  |  ------------------
  ------------------
 1629|  43.1k|    return GetRawNonOneof<Type>(message, field);
 1630|  43.1k|  }
 1631|       |
 1632|       |  // Oneof fields are not split.
 1633|      0|  ABSL_DCHECK(!schema_.IsSplit(field));
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  43.1k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1634|       |
 1635|      0|  const uint32_t field_offset = schema_.GetFieldOffset(field);
 1636|      0|  return internal::GetConstRefAtOffset<Type>(message, field_offset);
 1637|      0|}
_ZNK6google8protobuf10Reflection14GetRawNonOneofINS0_8internal20RepeatedPtrFieldBaseEEERKT_RKNS0_7MessageEPKNS0_15FieldDescriptorE:
 1614|  43.1k|                                       const FieldDescriptor* field) const {
 1615|  43.1k|  if (PROTOBUF_PREDICT_FALSE(schema_.IsSplit(field))) {
  ------------------
  |  |  365|  43.1k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 43.1k]
  |  |  |  Branch (365:54): [Folded, False: 43.1k]
  |  |  |  Branch (365:63): [True: 0, False: 43.1k]
  |  |  ------------------
  ------------------
 1616|      0|    return GetRawSplit<Type>(message, field);
 1617|      0|  }
 1618|  43.1k|  const uint32_t field_offset = schema_.GetFieldOffsetNonOneof(field);
 1619|  43.1k|  return internal::GetConstRefAtOffset<Type>(message, field_offset);
 1620|  43.1k|}
_ZN6google8protobuf8internal23GetConstPointerAtOffsetINS1_20RepeatedPtrFieldBaseEEEPKT_PKvj:
  219|  43.1k|const To* GetConstPointerAtOffset(const void* message, uint32_t offset) {
  220|  43.1k|  return reinterpret_cast<const To*>(reinterpret_cast<const char*>(message) +
  221|  43.1k|                                     offset);
  222|  43.1k|}
_ZN6google8protobuf8internal19GetConstRefAtOffsetINS1_20RepeatedPtrFieldBaseEEERKT_RKNS0_7MessageEj:
  225|  43.1k|const To& GetConstRefAtOffset(const Message& message, uint32_t offset) {
  226|  43.1k|  return *GetConstPointerAtOffset<To>(&message, offset);
  227|  43.1k|}
_ZNK6google8protobuf10Reflection6GetRawIPKNS0_7MessageEEERKT_RS4_PKNS0_15FieldDescriptorE:
 1624|  5.86k|                               const FieldDescriptor* field) const {
 1625|  11.7k|  ABSL_DCHECK(!schema_.InRealOneof(field) || HasOneofField(message, field))
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  5.86k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  5.86k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  11.7k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  11.7k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 5.86k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  5.86k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 5.86k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  5.86k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 5.86k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  5.86k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  5.86k|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1626|  11.7k|      << "Field = " << field->full_name();
 1627|       |
 1628|  5.86k|  if (PROTOBUF_PREDICT_TRUE(!schema_.InRealOneof(field))) {
  ------------------
  |  |  364|  5.86k|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 5.09k, False: 772]
  |  |  |  Branch (364:53): [Folded, False: 5.86k]
  |  |  |  Branch (364:62): [True: 5.09k, False: 772]
  |  |  ------------------
  ------------------
 1629|  5.09k|    return GetRawNonOneof<Type>(message, field);
 1630|  5.09k|  }
 1631|       |
 1632|       |  // Oneof fields are not split.
 1633|    772|  ABSL_DCHECK(!schema_.IsSplit(field));
  ------------------
  |  |   47|    772|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  5.86k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  2.31k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    772|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  1.54k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  1.54k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 772, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    772|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 772]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|    772|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 772, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  2.31k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  2.31k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1634|       |
 1635|    772|  const uint32_t field_offset = schema_.GetFieldOffset(field);
 1636|    772|  return internal::GetConstRefAtOffset<Type>(message, field_offset);
 1637|    772|}
_ZNK6google8protobuf10Reflection14GetRawNonOneofIPKNS0_7MessageEEERKT_RS4_PKNS0_15FieldDescriptorE:
 1614|  5.09k|                                       const FieldDescriptor* field) const {
 1615|  5.09k|  if (PROTOBUF_PREDICT_FALSE(schema_.IsSplit(field))) {
  ------------------
  |  |  365|  5.09k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 5.09k]
  |  |  |  Branch (365:54): [Folded, False: 5.09k]
  |  |  |  Branch (365:63): [True: 0, False: 5.09k]
  |  |  ------------------
  ------------------
 1616|      0|    return GetRawSplit<Type>(message, field);
 1617|      0|  }
 1618|  5.09k|  const uint32_t field_offset = schema_.GetFieldOffsetNonOneof(field);
 1619|  5.09k|  return internal::GetConstRefAtOffset<Type>(message, field_offset);
 1620|  5.09k|}
_ZN6google8protobuf8internal23GetConstPointerAtOffsetIPKNS0_7MessageEEEPKT_PKvj:
  219|  5.86k|const To* GetConstPointerAtOffset(const void* message, uint32_t offset) {
  220|  5.86k|  return reinterpret_cast<const To*>(reinterpret_cast<const char*>(message) +
  221|  5.86k|                                     offset);
  222|  5.86k|}
_ZN6google8protobuf8internal19GetConstRefAtOffsetIPKNS0_7MessageEEERKT_RS4_j:
  225|  5.86k|const To& GetConstRefAtOffset(const Message& message, uint32_t offset) {
  226|  5.86k|  return *GetConstPointerAtOffset<To>(&message, offset);
  227|  5.86k|}
_ZNK6google8protobuf10Reflection10MutableRawIPNS0_7MessageEEEPT_S4_PKNS0_15FieldDescriptorE:
 1207|  5.86k|  Type* MutableRaw(Message* message, const FieldDescriptor* field) const {
 1208|  5.86k|    return reinterpret_cast<Type*>(MutableRawImpl(message, field));
 1209|  5.86k|  }
_ZNK6google8protobuf10Reflection10MutableRawINS0_8internal20RepeatedPtrFieldBaseEEEPT_PNS0_7MessageEPKNS0_15FieldDescriptorE:
 1207|  17.2k|  Type* MutableRaw(Message* message, const FieldDescriptor* field) const {
 1208|  17.2k|    return reinterpret_cast<Type*>(MutableRawImpl(message, field));
 1209|  17.2k|  }
_ZN6google8protobuf8internal23GetConstPointerAtOffsetIjEEPKT_PKvj:
  219|  50.8k|const To* GetConstPointerAtOffset(const void* message, uint32_t offset) {
  220|  50.8k|  return reinterpret_cast<const To*>(reinterpret_cast<const char*>(message) +
  221|  50.8k|                                     offset);
  222|  50.8k|}
_ZN6google8protobuf8internal18GetPointerAtOffsetIvEEPT_Pvj:
  214|  23.1k|inline To* GetPointerAtOffset(void* message, uint32_t offset) {
  215|  23.1k|  return reinterpret_cast<To*>(reinterpret_cast<char*>(message) + offset);
  216|  23.1k|}
_ZN6google8protobuf8internal19GetConstRefAtOffsetIjEERKT_RKNS0_7MessageEj:
  225|  50.8k|const To& GetConstRefAtOffset(const Message& message, uint32_t offset) {
  226|  50.8k|  return *GetConstPointerAtOffset<To>(&message, offset);
  227|  50.8k|}

_ZN6google8protobuf8internal13MergeFromImplILb0EEEbN4absl12lts_2024011611string_viewEPNS0_11MessageLiteEPKNS1_16TcParseTableBaseENS6_10ParseFlagsE:
  214|  3.74k|                   MessageLite::ParseFlags parse_flags) {
  215|  3.74k|  const char* ptr;
  216|  3.74k|  internal::ParseContext ctx(io::CodedInputStream::GetDefaultRecursionLimit(),
  217|  3.74k|                             aliasing, &ptr, input);
  218|  3.74k|  ptr = internal::TcParser::ParseLoop(msg, ptr, &ctx, tc_table);
  219|       |  // ctx has an explicit limit set (length of string_view).
  220|  3.74k|  if (PROTOBUF_PREDICT_TRUE(ptr && ctx.EndedAtLimit())) {
  ------------------
  |  |  364|  7.48k|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 3.74k, False: 0]
  |  |  |  Branch (364:53): [Folded, False: 3.74k]
  |  |  |  Branch (364:63): [True: 3.74k, False: 0]
  |  |  |  Branch (364:63): [True: 3.74k, False: 0]
  |  |  ------------------
  ------------------
  221|  3.74k|    return CheckFieldPresence(ctx, *msg, parse_flags);
  222|  3.74k|  }
  223|      0|  return false;
  224|  3.74k|}
_ZN6google8protobuf11MessageLite21CheckTypeAndMergeFromERKS1_:
   67|    749|void MessageLite::CheckTypeAndMergeFrom(const MessageLite& other) {
   68|    749|  auto* data = GetClassData();
   69|    749|  auto* other_data = other.GetClassData();
   70|       |
   71|    749|  ABSL_CHECK_EQ(data, other_data)
  ------------------
  |  |   50|      0|  ABSL_LOG_INTERNAL_CHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   48|    749|  ABSL_LOG_INTERNAL_CHECK_OP(Check_EQ, ==, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|    749|  while (                                                                      \
  |  |  |  |  |  |   62|    749|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 749]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|    749|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|    749|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|    749|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|    749|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|    749|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|    749|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|    749|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|    749|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   72|      0|      << "Invalid call to CheckTypeAndMergeFrom between types " << GetTypeName()
   73|      0|      << " and " << other.GetTypeName();
   74|    749|  data->merge_to_from(*this, other);
   75|    749|}
_ZNK6google8protobuf11MessageLite3NewEPNS0_5ArenaE:
   77|    502|MessageLite* MessageLite::New(Arena* arena) const {
   78|    502|  auto* data = GetClassData();
   79|       |  // The `instance->New()` expression requires using the actual instance
   80|       |  // instead of the prototype for the inner function call.
   81|       |  // Certain custom instances have special per-instance state that needs to be
   82|       |  // copied.
   83|    502|  return data->message_creator.New(this, data->prototype, arena);
   84|    502|}
_ZNK6google8protobuf11MessageLite13IsInitializedEv:
   86|     38|bool MessageLite::IsInitialized() const {
   87|     38|  auto* data = GetClassData();
   88|     38|  return data->is_initialized != nullptr ? data->is_initialized(*this) : true;
  ------------------
  |  Branch (88:10): [True: 30, False: 8]
  ------------------
   89|     38|}
_ZN6google8protobuf11MessageLite14_InternalParseEPKcPNS0_8internal12ParseContextE:
   92|     32|                                        internal::ParseContext* ctx) {
   93|     32|  return internal::TcParser::ParseLoop(this, ptr, ctx, GetTcParseTable());
   94|     32|}
_ZNK6google8protobuf11MessageLite13GetCachedSizeEv:
  143|    239|int MessageLite::GetCachedSize() const { return AccessCachedSize().Get(); }
_ZN6google8protobuf11MessageLite22ParsePartialFromStringEN4absl12lts_2024011611string_viewE:
  404|  3.73k|bool MessageLite::ParsePartialFromString(absl::string_view data) {
  405|  3.73k|  return ParseFrom<kParsePartial>(data);
  406|  3.73k|}
_ZN6google8protobuf11MessageLite14ParseFromArrayEPKvi:
  408|      6|bool MessageLite::ParseFromArray(const void* data, int size) {
  409|      6|  return ParseFrom<kParse>(as_string_view(data, size));
  410|      6|}
_ZNK6google8protobuf11MessageLite14AppendToStringEPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  572|    258|bool MessageLite::AppendToString(std::string* output) const {
  573|    516|  ABSL_DCHECK(IsInitialized())
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|    258|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    258|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|    516|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|    516|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 258, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    258|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 258]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|    258|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 258, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|    258|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|    258|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  574|    516|      << InitializationErrorMessage("serialize", *this);
  575|    258|  return AppendPartialToString(output);
  576|    258|}
_ZNK6google8protobuf11MessageLite21AppendPartialToStringEPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  578|    258|bool MessageLite::AppendPartialToString(std::string* output) const {
  579|    258|  size_t old_size = output->size();
  580|    258|  size_t byte_size = ByteSizeLong();
  581|    258|  if (byte_size > INT_MAX) {
  ------------------
  |  Branch (581:7): [True: 0, False: 258]
  ------------------
  582|      0|    ABSL_LOG(ERROR) << GetTypeName()
  ------------------
  |  |   38|      0|#define ABSL_LOG(severity) ABSL_LOG_INTERNAL_LOG_IMPL(_##severity)
  |  |  ------------------
  |  |  |  |   25|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, true) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  170|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   26|      0|      ABSL_LOGGING_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|  ::absl::log_internal::LogMessage(     \
  |  |  |  |  |  |   53|      0|      __FILE__, __LINE__, ::absl::log_internal::LogMessage::ErrorTag{})
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  583|      0|                    << " exceeded maximum protobuf size of 2GB: " << byte_size;
  584|      0|    return false;
  585|      0|  }
  586|       |
  587|    258|  absl::strings_internal::STLStringResizeUninitializedAmortized(
  588|    258|      output, old_size + byte_size);
  589|    258|  uint8_t* start =
  590|    258|      reinterpret_cast<uint8_t*>(io::mutable_string_data(output) + old_size);
  591|    258|  SerializeToArrayImpl(*this, start, byte_size);
  592|    258|  return true;
  593|    258|}
_ZNK6google8protobuf11MessageLite17SerializeAsStringEv:
  624|    258|std::string MessageLite::SerializeAsString() const {
  625|       |  // If the compiler implements the (Named) Return Value Optimization,
  626|       |  // the local variable 'output' will not actually reside on the stack
  627|       |  // of this function, but will be overlaid with the object that the
  628|       |  // caller supplied for the return value to be constructed in.
  629|    258|  std::string output;
  630|    258|  if (!AppendToString(&output)) output.clear();
  ------------------
  |  Branch (630:7): [True: 0, False: 258]
  ------------------
  631|    258|  return output;
  632|    258|}
_ZN6google8protobuf8internal13OnShutdownRunEPFvPKvES3_:
  783|     57|void OnShutdownRun(void (*f)(const void*), const void* arg) {
  784|     57|  auto shutdown_data = ShutdownData::get();
  785|     57|  absl::MutexLock lock(&shutdown_data->mutex);
  786|     57|  shutdown_data->functions.push_back(std::make_pair(f, arg));
  787|     57|}
message_lite.cc:_ZN6google8protobuf12_GLOBAL__N_118CheckFieldPresenceERKNS0_8internal12ParseContextERKNS0_11MessageLiteENS6_10ParseFlagsE:
  184|  3.74k|                               MessageLite::ParseFlags parse_flags) {
  185|  3.74k|  (void)ctx;  // Parameter is used by Google-internal code.
  186|  3.74k|  if (PROTOBUF_PREDICT_FALSE((parse_flags & MessageLite::kMergePartial) != 0)) {
  ------------------
  |  |  365|  3.74k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 3.73k, False: 6]
  |  |  |  Branch (365:54): [Folded, False: 3.74k]
  |  |  |  Branch (365:63): [True: 3.73k, False: 6]
  |  |  ------------------
  ------------------
  187|  3.73k|    return true;
  188|  3.73k|  }
  189|      6|  return msg.IsInitializedWithErrors();
  190|  3.74k|}
message_lite.cc:_ZN6google8protobuf12_GLOBAL__N_114as_string_viewEPKvi:
  177|      6|inline absl::string_view as_string_view(const void* data, int size) {
  178|      6|  return absl::string_view(static_cast<const char*>(data), size);
  179|      6|}
_ZN6google8protobuf20SerializeToArrayImplERKNS0_11MessageLiteEPhi:
  462|    258|                                     int size) {
  463|    258|  constexpr bool debug = false;
  464|    258|  if (debug) {
  ------------------
  |  Branch (464:7): [Folded, False: 258]
  ------------------
  465|       |    // Force serialization to a stream with a block size of 1, which forces
  466|       |    // all writes to the stream to cross buffers triggering all fallback paths
  467|       |    // in the unittests when serializing to string / array.
  468|      0|    io::ArrayOutputStream stream(target, size, 1);
  469|      0|    uint8_t* ptr;
  470|      0|    io::EpsCopyOutputStream out(
  471|      0|        &stream, io::CodedOutputStream::IsDefaultSerializationDeterministic(),
  472|      0|        &ptr);
  473|      0|    ptr = msg._InternalSerialize(ptr, &out);
  474|      0|    out.Trim(ptr);
  475|      0|    ABSL_DCHECK(!out.HadError() && stream.ByteCount() == size);
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  476|      0|    return target + size;
  477|    258|  } else {
  478|    258|    io::EpsCopyOutputStream out(
  479|    258|        target, size,
  480|    258|        io::CodedOutputStream::IsDefaultSerializationDeterministic());
  481|    258|    uint8_t* res = msg._InternalSerialize(target, &out);
  482|    258|    ABSL_DCHECK(target + size == res);
  ------------------
  |  |   47|    258|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|    258|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|    516|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    258|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|    516|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|    516|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 258, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    258|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 258]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|    258|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 258, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    516|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|    516|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  483|    258|    return res;
  484|    258|  }
  485|    258|}
_ZN6google8protobuf8internal12ShutdownData3getEv:
  765|     57|  static ShutdownData* get() {
  766|     57|    static auto* data = new ShutdownData;
  767|     57|    return data;
  768|     57|  }

_ZNK6google8protobuf8internal14MessageCreator3tagEv:
  131|  25.0k|  Tag tag() const { return tag_; }
_ZNK6google8protobuf8internal14MessageCreator10arena_bitsEv:
  137|  25.6k|  uintptr_t arena_bits() const {
  138|  25.6k|    ABSL_DCHECK_NE(+tag(), +kFunc);
  ------------------
  |  |   76|  25.6k|  ABSL_LOG_INTERNAL_DCHECK_NE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   88|  25.6k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  25.6k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 25.6k]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  25.6k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  139|  25.6k|    return arena_bits_;
  140|  25.6k|  }
_ZNK6google8protobuf8internal10CachedSize3SetEi:
  182|  1.27k|  void Set(Scalar desired) const noexcept {
  183|       |    // Avoid writing the value when it is zero. This prevents writing to global
  184|       |    // default instances, which might be in readonly memory.
  185|  1.27k|    if (ABSL_PREDICT_FALSE(desired == 0)) {
  ------------------
  |  |  178|  1.27k|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 516, False: 759]
  |  |  |  Branch (178:49): [Folded, False: 1.27k]
  |  |  |  Branch (178:58): [True: 516, False: 759]
  |  |  ------------------
  ------------------
  186|    516|      if (Get() == 0) return;
  ------------------
  |  Branch (186:11): [True: 516, False: 0]
  ------------------
  187|    516|    }
  188|    759|    __atomic_store_n(&atom_, desired, __ATOMIC_RELAXED);
  189|    759|  }
_ZNK6google8protobuf8internal9ClassData3NewEPNS0_5ArenaE:
  410|  24.5k|  MessageLite* New(Arena* arena) const {
  411|  24.5k|    return message_creator.New(prototype, prototype, arena);
  412|  24.5k|  }
_ZNK6google8protobuf11MessageLite15GetTcParseTableEv:
  860|  3.77k|  const internal::TcParseTableBase* GetTcParseTable() const {
  861|  3.77k|    auto* data = GetClassData();
  862|  3.77k|    ABSL_DCHECK(data != nullptr);
  ------------------
  |  |   47|  3.77k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  3.77k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  7.54k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  3.77k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  7.54k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  7.54k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 3.77k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  3.77k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 3.77k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  3.77k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 3.77k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.54k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  7.54k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  863|       |
  864|  3.77k|    auto* tc_table = data->tc_table;
  865|  3.77k|    if (ABSL_PREDICT_FALSE(tc_table == nullptr)) {
  ------------------
  |  |  178|  3.77k|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 3.77k]
  |  |  |  Branch (178:49): [Folded, False: 3.77k]
  |  |  |  Branch (178:58): [True: 0, False: 3.77k]
  |  |  ------------------
  ------------------
  866|      0|      ABSL_DCHECK(!data->is_lite);
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  867|      0|      return data->full().descriptor_methods->get_tc_table(*this);
  868|      0|    }
  869|  3.77k|    return tc_table;
  870|  3.77k|  }
_ZNK6google8protobuf11MessageLite16AccessCachedSizeEv:
  918|    239|  const internal::CachedSize& AccessCachedSize() const {
  919|    239|    return *reinterpret_cast<const internal::CachedSize*>(
  920|    239|        reinterpret_cast<const char*>(this) +
  921|    239|        GetClassData()->cached_size_offset);
  922|    239|  }
_ZNK6google8protobuf11MessageLite23IsInitializedWithErrorsEv:
  966|     30|  bool IsInitializedWithErrors() const {
  967|     30|    if (IsInitialized()) return true;
  ------------------
  |  Branch (967:9): [True: 30, False: 0]
  ------------------
  968|      0|    LogInitializationErrorMessage();
  969|      0|    return false;
  970|     30|  }
_ZN6google8protobuf8internal12ToCachedSizeEm:
  281|  1.27k|inline int ToCachedSize(size_t size) { return static_cast<int>(size); }
_ZNK6google8protobuf8internal14MessageCreator3NewILb0ENS0_11MessageLiteEEEPT0_PKS5_S8_PNS0_5ArenaE:
 1299|  25.0k|    const MessageLite* prototype_for_copy, Arena* arena) const {
 1300|  25.0k|  return PlacementNew<test_call>(prototype_for_func, prototype_for_copy,
 1301|  25.0k|                                 arena != nullptr
  ------------------
  |  Branch (1301:34): [True: 573, False: 24.4k]
  ------------------
 1302|  25.0k|                                     ? arena->AllocateAligned(allocation_size_)
 1303|  25.0k|                                     : ::operator new(allocation_size_),
 1304|  25.0k|                                 arena);
 1305|  25.0k|}
_ZNK6google8protobuf8internal14MessageCreator12PlacementNewILb0ENS0_11MessageLiteEEEPT0_PKS5_S8_PvPNS0_5ArenaE:
 1193|  25.0k|    const MessageLite* prototype_for_copy, void* mem, Arena* arena) const {
 1194|  25.0k|  ABSL_DCHECK_EQ(reinterpret_cast<uintptr_t>(mem) % alignment_, 0u);
  ------------------
  |  |   74|  25.0k|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|  25.0k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  25.0k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 25.0k]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  25.0k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1195|  25.0k|  const Tag as_tag = tag();
 1196|       |  // When the feature is not enabled we skip the `as_tag` check since it is
 1197|       |  // unnecessary. Except for testing, where we want to test the copy logic even
 1198|       |  // when we can't use it for real messages.
 1199|  25.0k|  constexpr bool kMustBeFunc = !test_call && !internal::EnableCustomNew();
  ------------------
  |  Branch (1199:32): [True: 0, Folded]
  |  Branch (1199:46): [Folded, False: 0]
  ------------------
 1200|  25.0k|  static_assert(kFunc < 0 && !(kZeroInit < 0) && !(kMemcpy < 0),
 1201|  25.0k|                "Only kFunc must be the only negative value");
 1202|  25.0k|  if (ABSL_PREDICT_FALSE(kMustBeFunc || as_tag < 0)) {
  ------------------
  |  |  178|  50.0k|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 25.0k]
  |  |  |  Branch (178:49): [Folded, False: 25.0k]
  |  |  |  Branch (178:59): [Folded, False: 25.0k]
  |  |  |  Branch (178:59): [True: 0, False: 25.0k]
  |  |  ------------------
  ------------------
 1203|      0|    PROTOBUF_DEBUG_COUNTER("MessageCreator.Func").Inc();
  ------------------
  |  |  983|      0|  ::google::protobuf::internal::NoopDebugCounter {}
  ------------------
 1204|      0|    return static_cast<MessageLite*>(func_(prototype_for_func, mem, arena));
 1205|      0|  }
 1206|       |
 1207|  25.0k|  char* dst = static_cast<char*>(mem);
 1208|  25.0k|  const size_t size = allocation_size_;
 1209|  25.0k|  const char* src = reinterpret_cast<const char*>(prototype_for_copy);
 1210|       |
 1211|       |  // These are a bit more efficient than calling normal memset/memcpy because:
 1212|       |  //  - We know the minimum size is 16. We have a fallback for when it is not.
 1213|       |  //  - We can "underflow" the buffer because those are the MessageLite bytes
 1214|       |  //    we will set later.
 1215|  25.0k|#ifndef PROTO2_OPENSOURCE
 1216|       |  // This manual handling shows a 1.85% improvement in the parsing
 1217|       |  // microbenchmark.
 1218|       |  // TODO: Verify this is still the case.
 1219|  25.0k|#endif  // !PROTO2_OPENSOUCE
 1220|  25.0k|  if (as_tag == kZeroInit) {
  ------------------
  |  Branch (1220:7): [True: 15.0k, False: 9.93k]
  ------------------
 1221|       |    // Make sure the input is really all zeros.
 1222|  15.0k|    ABSL_DCHECK(std::all_of(src + sizeof(MessageLite), src + size,
  ------------------
  |  |   47|  15.0k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  15.0k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  30.1k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  15.0k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  30.1k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  30.1k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 15.0k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  15.0k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 15.0k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  15.0k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 15.0k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  30.1k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  30.1k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1223|  15.0k|                            [](auto c) { return c == 0; }));
 1224|       |
 1225|  15.0k|    if (sizeof(MessageLite) != 16) {
  ------------------
  |  Branch (1225:9): [Folded, False: 15.0k]
  ------------------
 1226|      0|      memset(dst, 0, size);
 1227|  15.0k|    } else if (size <= 32) {
  ------------------
  |  Branch (1227:16): [True: 870, False: 14.2k]
  ------------------
 1228|    870|      memset(dst + size - 16, 0, 16);
 1229|  14.2k|    } else if (size <= 64) {
  ------------------
  |  Branch (1229:16): [True: 14.1k, False: 42]
  ------------------
 1230|  14.1k|      memset(dst + 16, 0, 16);
 1231|  14.1k|      memset(dst + size - 32, 0, 32);
 1232|  14.1k|    } else {
 1233|    110|      for (size_t offset = 16; offset + 64 < size; offset += 64) {
  ------------------
  |  Branch (1233:32): [True: 68, False: 42]
  ------------------
 1234|     68|        absl::PrefetchToLocalCacheForWrite(dst + offset + 64);
 1235|     68|        memset(dst + offset, 0, 64);
 1236|     68|      }
 1237|     42|      memset(dst + size - 64, 0, 64);
 1238|     42|    }
 1239|  15.0k|  } else {
 1240|  9.93k|    ABSL_DCHECK_EQ(+as_tag, +kMemcpy);
  ------------------
  |  |   74|  9.93k|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|  9.93k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  9.93k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 9.93k]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  9.93k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1241|       |
 1242|  9.93k|    if (sizeof(MessageLite) != 16) {
  ------------------
  |  Branch (1242:9): [Folded, False: 9.93k]
  ------------------
 1243|      0|      memcpy(dst, src, size);
 1244|  9.93k|    } else if (size <= 32) {
  ------------------
  |  Branch (1244:16): [True: 0, False: 9.93k]
  ------------------
 1245|      0|      memcpy(dst + size - 16, src + size - 16, 16);
 1246|  9.93k|    } else if (size <= 64) {
  ------------------
  |  Branch (1246:16): [True: 1.80k, False: 8.13k]
  ------------------
 1247|  1.80k|      memcpy(dst + 16, src + 16, 16);
 1248|  1.80k|      memcpy(dst + size - 32, src + size - 32, 32);
 1249|  8.13k|    } else {
 1250|  14.6k|      for (size_t offset = 16; offset + 64 < size; offset += 64) {
  ------------------
  |  Branch (1250:32): [True: 6.54k, False: 8.13k]
  ------------------
 1251|  6.54k|        absl::PrefetchToLocalCache(src + offset + 64);
 1252|  6.54k|        absl::PrefetchToLocalCacheForWrite(dst + offset + 64);
 1253|  6.54k|        memcpy(dst + offset, src + offset, 64);
 1254|  6.54k|      }
 1255|  8.13k|      memcpy(dst + size - 64, src + size - 64, 64);
 1256|  8.13k|    }
 1257|  9.93k|  }
 1258|       |
 1259|  25.0k|  if (arena_bits() != 0) {
  ------------------
  |  Branch (1259:7): [True: 9.43k, False: 15.5k]
  ------------------
 1260|  9.43k|    if (as_tag == kZeroInit) {
  ------------------
  |  Branch (1260:9): [True: 1.45k, False: 7.98k]
  ------------------
 1261|  1.45k|      PROTOBUF_DEBUG_COUNTER("MessageCreator.ZeroArena").Inc();
  ------------------
  |  |  983|  1.45k|  ::google::protobuf::internal::NoopDebugCounter {}
  ------------------
 1262|  7.98k|    } else {
 1263|  7.98k|      PROTOBUF_DEBUG_COUNTER("MessageCreator.McpyArena").Inc();
  ------------------
  |  |  983|  7.98k|  ::google::protobuf::internal::NoopDebugCounter {}
  ------------------
 1264|  7.98k|    }
 1265|  15.5k|  } else {
 1266|  15.5k|    if (as_tag == kZeroInit) {
  ------------------
  |  Branch (1266:9): [True: 13.6k, False: 1.95k]
  ------------------
 1267|  13.6k|      PROTOBUF_DEBUG_COUNTER("MessageCreator.Zero").Inc();
  ------------------
  |  |  983|  13.6k|  ::google::protobuf::internal::NoopDebugCounter {}
  ------------------
 1268|  13.6k|    } else {
 1269|  1.95k|      PROTOBUF_DEBUG_COUNTER("MessageCreator.Mcpy").Inc();
  ------------------
  |  |  983|  1.95k|  ::google::protobuf::internal::NoopDebugCounter {}
  ------------------
 1270|  1.95k|    }
 1271|  15.5k|  }
 1272|       |
 1273|  25.0k|  if (internal::PerformDebugChecks() || arena != nullptr) {
  ------------------
  |  Branch (1273:7): [Folded, False: 25.0k]
  |  Branch (1273:41): [True: 573, False: 24.4k]
  ------------------
 1274|    573|    if (uintptr_t offsets = arena_bits()) {
  ------------------
  |  Branch (1274:19): [True: 90, False: 483]
  ------------------
 1275|    520|      do {
 1276|    520|        const size_t offset = absl::countr_zero(offsets) * sizeof(Arena*);
 1277|    520|        ABSL_DCHECK_LE(offset + sizeof(Arena*), size);
  ------------------
  |  |   78|    520|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   90|    520|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    520|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 520]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    520|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1278|       |        // Verify we are overwriting a null pointer. If we are not, there is a
 1279|       |        // bug somewhere.
 1280|    520|        ABSL_DCHECK_EQ(*reinterpret_cast<Arena**>(dst + offset), nullptr);
  ------------------
  |  |   74|    520|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|    520|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    520|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 520]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    520|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1281|    520|        memcpy(dst + offset, &arena, sizeof(arena));
 1282|    520|        offsets &= offsets - 1;
 1283|    520|      } while (offsets != 0);
  ------------------
  |  Branch (1283:16): [True: 430, False: 90]
  ------------------
 1284|     90|    }
 1285|    573|  }
 1286|       |
 1287|       |  // The second memcpy overwrites part of the first, but the compiler should
 1288|       |  // avoid the double-write. It's easier than trying to avoid the overlap.
 1289|  25.0k|  memcpy(dst, static_cast<const void*>(prototype_for_copy),
 1290|  25.0k|         sizeof(MessageLite));
 1291|  25.0k|  memcpy(dst + PROTOBUF_FIELD_OFFSET(MessageLite, _internal_metadata_), &arena,
  ------------------
  |  |  303|  25.0k|  _Pragma("clang diagnostic push")                           \
  |  |  304|  25.0k|  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  |  |  305|  25.0k|  __builtin_offsetof(TYPE, FIELD)                            \
  |  |  306|  25.0k|  _Pragma("clang diagnostic pop")
  ------------------
 1292|  25.0k|         sizeof(arena));
 1293|  25.0k|  return Launder(reinterpret_cast<MessageLite*>(mem));
 1294|  25.0k|}
_ZN6google8protobuf11MessageLite9ParseFromILNS1_10ParseFlagsE1EN4absl12lts_2024011611string_viewEEEbRKT0_:
 1144|      6|bool MessageLite::ParseFrom(const T& input) {
 1145|      6|  if (flags & kParse) Clear();
  ------------------
  |  Branch (1145:7): [True: 6, Folded]
  ------------------
 1146|      6|  constexpr bool alias = (flags & kMergeWithAliasing) != 0;
 1147|      6|  const internal::TcParseTableBase* tc_table;
 1148|      6|  PROTOBUF_ALWAYS_INLINE_CALL tc_table = GetTcParseTable();
  ------------------
  |  |  187|      6|#define PROTOBUF_ALWAYS_INLINE_CALL [[clang::always_inline]]
  ------------------
 1149|      6|  return internal::MergeFromImpl<alias>(input, this, tc_table, flags);
 1150|      6|}
_ZN6google8protobuf11MessageLite9ParseFromILNS1_10ParseFlagsE3EN4absl12lts_2024011611string_viewEEEbRKT0_:
 1144|  3.73k|bool MessageLite::ParseFrom(const T& input) {
 1145|  3.73k|  if (flags & kParse) Clear();
  ------------------
  |  Branch (1145:7): [True: 3.73k, Folded]
  ------------------
 1146|  3.73k|  constexpr bool alias = (flags & kMergeWithAliasing) != 0;
 1147|  3.73k|  const internal::TcParseTableBase* tc_table;
 1148|  3.73k|  PROTOBUF_ALWAYS_INLINE_CALL tc_table = GetTcParseTable();
  ------------------
  |  |  187|  3.73k|#define PROTOBUF_ALWAYS_INLINE_CALL [[clang::always_inline]]
  ------------------
 1149|  3.73k|  return internal::MergeFromImpl<alias>(input, this, tc_table, flags);
 1150|  3.73k|}
extension_set.cc:_ZN6google8protobuf8internal16OnShutdownDeleteIN4absl12lts_2024011613flat_hash_setINS1_13ExtensionInfoENS1_12_GLOBAL__N_115ExtensionHasherENS7_11ExtensionEqENSt3__19allocatorIS6_EEEEEEPT_SF_:
 1180|      1|T* OnShutdownDelete(T* p) {
 1181|      1|  OnShutdownRun([](const void* pp) { delete static_cast<const T*>(pp); }, p);
 1182|      1|  return p;
 1183|      1|}
_ZN6google8protobuf8internal16OnShutdownDeleteINS0_25EncodedDescriptorDatabaseEEEPT_S5_:
 1180|      2|T* OnShutdownDelete(T* p) {
 1181|      2|  OnShutdownRun([](const void* pp) { delete static_cast<const T*>(pp); }, p);
 1182|      2|  return p;
 1183|      2|}
_ZN6google8protobuf8internal16OnShutdownDeleteINS0_18FeatureSetDefaultsEEEPT_S5_:
 1180|      1|T* OnShutdownDelete(T* p) {
 1181|      1|  OnShutdownRun([](const void* pp) { delete static_cast<const T*>(pp); }, p);
 1182|      1|  return p;
 1183|      1|}
_ZN6google8protobuf8internal16OnShutdownDeleteINS0_14DescriptorPoolEEEPT_S5_:
 1180|      2|T* OnShutdownDelete(T* p) {
 1181|      2|  OnShutdownRun([](const void* pp) { delete static_cast<const T*>(pp); }, p);
 1182|      2|  return p;
 1183|      2|}
_ZN6google8protobuf8internal16OnShutdownDeleteINS0_10ReflectionEEEPT_S5_:
 1180|     47|T* OnShutdownDelete(T* p) {
 1181|     47|  OnShutdownRun([](const void* pp) { delete static_cast<const T*>(pp); }, p);
 1182|     47|  return p;
 1183|     47|}
message.cc:_ZN6google8protobuf8internal16OnShutdownDeleteINS0_12_GLOBAL__N_123GeneratedMessageFactoryEEEPT_S6_:
 1180|      2|T* OnShutdownDelete(T* p) {
 1181|      2|  OnShutdownRun([](const void* pp) { delete static_cast<const T*>(pp); }, p);
 1182|      2|  return p;
 1183|      2|}

_ZN6google8protobuf8internal18EpsCopyInputStream12DoneFallbackEii:
  149|  3.33k|                                                              int depth) {
  150|       |  // Did we exceeded the limit (parse error).
  151|  3.33k|  if (PROTOBUF_PREDICT_FALSE(overrun > limit_)) return {nullptr, true};
  ------------------
  |  |  365|  3.33k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 3.33k]
  |  |  |  Branch (365:54): [Folded, False: 3.33k]
  |  |  |  Branch (365:63): [True: 0, False: 3.33k]
  |  |  ------------------
  ------------------
  152|  3.33k|  ABSL_DCHECK(overrun != limit_);  // Guaranteed by caller.
  ------------------
  |  |   47|  3.33k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  3.33k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  9.99k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  3.33k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  6.66k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  6.66k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 3.33k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  3.33k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 3.33k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  3.33k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 3.33k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  9.99k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  9.99k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  153|  3.33k|  ABSL_DCHECK(overrun < limit_);   // Follows from above
  ------------------
  |  |   47|  3.33k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  3.33k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  9.99k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  3.33k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  6.66k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  6.66k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 3.33k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  3.33k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 3.33k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  3.33k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 3.33k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  9.99k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  9.99k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  154|       |  // TODO Instead of this dcheck we could just assign, and remove
  155|       |  // updating the limit_end from PopLimit, ie.
  156|       |  // limit_end_ = buffer_end_ + (std::min)(0, limit_);
  157|       |  // if (ptr < limit_end_) return {ptr, false};
  158|  3.33k|  ABSL_DCHECK(limit_end_ == buffer_end_ + (std::min)(0, limit_));
  ------------------
  |  |   47|  3.33k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  3.33k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  9.99k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  3.33k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  6.66k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  6.66k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 3.33k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  3.33k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 3.33k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  3.33k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 3.33k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  9.99k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  9.99k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  159|       |  // At this point we know the following assertion holds.
  160|  3.33k|  ABSL_DCHECK_GT(limit_, 0);
  ------------------
  |  |   84|  3.33k|  ABSL_LOG_INTERNAL_DCHECK_GT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   96|  3.33k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  3.33k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 3.33k]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  3.33k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  161|  3.33k|  ABSL_DCHECK(limit_end_ == buffer_end_);  // because limit_ > 0
  ------------------
  |  |   47|  3.33k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  3.33k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  6.66k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  3.33k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  6.66k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  6.66k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 3.33k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  3.33k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 3.33k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  3.33k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 3.33k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  6.66k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  6.66k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  162|  3.33k|  const char* p;
  163|  3.33k|  do {
  164|       |    // We are past the end of buffer_end_, in the slop region.
  165|  3.33k|    ABSL_DCHECK_GE(overrun, 0);
  ------------------
  |  |   82|  3.33k|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|  3.33k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  3.33k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 3.33k]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  3.33k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  166|  3.33k|    p = NextBuffer(overrun, depth);
  167|  3.33k|    if (p == nullptr) {
  ------------------
  |  Branch (167:9): [True: 0, False: 3.33k]
  ------------------
  168|       |      // We are at the end of the stream
  169|      0|      if (PROTOBUF_PREDICT_FALSE(overrun != 0)) return {nullptr, true};
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  170|      0|      ABSL_DCHECK_GT(limit_, 0);
  ------------------
  |  |   84|      0|  ABSL_LOG_INTERNAL_DCHECK_GT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   96|      0|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  171|      0|      limit_end_ = buffer_end_;
  172|       |      // Distinguish ending on a pushed limit or ending on end-of-stream.
  173|      0|      SetEndOfStream();
  174|      0|      return {buffer_end_, true};
  175|      0|    }
  176|  3.33k|    limit_ -= buffer_end_ - p;  // Adjust limit_ relative to new anchor
  177|  3.33k|    p += overrun;
  178|  3.33k|    overrun = p - buffer_end_;
  179|  3.33k|  } while (overrun >= 0);
  ------------------
  |  Branch (179:12): [True: 0, False: 3.33k]
  ------------------
  180|  3.33k|  limit_end_ = buffer_end_ + std::min(0, limit_);
  181|  3.33k|  return {p, false};
  182|  3.33k|}
_ZN6google8protobuf8internal12ParseContext28ReadSizeAndPushLimitAndDepthEPKcPNS1_18EpsCopyInputStream10LimitTokenE:
  299|      8|                                                       LimitToken* old_limit) {
  300|      8|  return ReadSizeAndPushLimitAndDepthInlined(ptr, old_limit);
  301|      8|}
_ZN6google8protobuf8internal12ParseContext12ParseMessageEPNS0_11MessageLiteEPKc:
  303|      8|const char* ParseContext::ParseMessage(MessageLite* msg, const char* ptr) {
  304|      8|  LimitToken old;
  305|      8|  ptr = ReadSizeAndPushLimitAndDepth(ptr, &old);
  306|      8|  if (ptr == nullptr) return ptr;
  ------------------
  |  Branch (306:7): [True: 0, False: 8]
  ------------------
  307|      8|  auto old_depth = depth_;
  308|      8|  ptr = msg->_InternalParse(ptr, this);
  309|      8|  if (ptr != nullptr) ABSL_DCHECK_EQ(old_depth, depth_);
  ------------------
  |  |   74|      8|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|      8|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      8|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 8]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (309:7): [True: 8, False: 0]
  ------------------
  310|      8|  depth_++;
  311|      8|  if (!PopLimit(std::move(old))) return nullptr;
  ------------------
  |  Branch (311:7): [True: 0, False: 8]
  ------------------
  312|      8|  return ptr;
  313|      8|}
_ZN6google8protobuf8internal17VarintParseSlow64EPKcj:
  355|    199|                                                   uint32_t res32) {
  356|    199|  uint64_t res = res32;
  357|    284|  for (std::uint32_t i = 1; i < 10; i++) {
  ------------------
  |  Branch (357:29): [True: 284, False: 0]
  ------------------
  358|    284|    uint64_t byte = static_cast<uint8_t>(p[i]);
  359|    284|    res += (byte - 1) << (7 * i);
  360|    284|    if (PROTOBUF_PREDICT_TRUE(byte < 128)) {
  ------------------
  |  |  364|    284|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 199, False: 85]
  |  |  |  Branch (364:53): [Folded, False: 284]
  |  |  |  Branch (364:62): [True: 199, False: 85]
  |  |  ------------------
  ------------------
  361|    199|      return {p + i + 1, res};
  362|    199|    }
  363|    284|  }
  364|      0|  return {nullptr, 0};
  365|    199|}
_ZN6google8protobuf8internal16ReadSizeFallbackEPKcj:
  378|  2.36k|std::pair<const char*, int32_t> ReadSizeFallback(const char* p, uint32_t res) {
  379|  2.38k|  for (std::uint32_t i = 1; i < 4; i++) {
  ------------------
  |  Branch (379:29): [True: 2.38k, False: 0]
  ------------------
  380|  2.38k|    uint32_t byte = static_cast<uint8_t>(p[i]);
  381|  2.38k|    res += (byte - 1) << (7 * i);
  382|  2.38k|    if (PROTOBUF_PREDICT_TRUE(byte < 128)) {
  ------------------
  |  |  364|  2.38k|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 2.36k, False: 27]
  |  |  |  Branch (364:53): [Folded, False: 2.38k]
  |  |  |  Branch (364:62): [True: 2.36k, False: 27]
  |  |  ------------------
  ------------------
  383|  2.36k|      return {p + i + 1, res};
  384|  2.36k|    }
  385|  2.38k|  }
  386|      0|  std::uint32_t byte = static_cast<uint8_t>(p[4]);
  387|      0|  if (PROTOBUF_PREDICT_FALSE(byte >= 8)) return {nullptr, 0};  // size >= 2gb
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  388|      0|  res += (byte - 1) << 28;
  389|       |  // Protect against sign integer overflow in PushLimit. Limits are relative
  390|       |  // to buffer ends and ptr could potential be kSlopBytes beyond a buffer end.
  391|       |  // To protect against overflow we reject limits absurdly close to INT_MAX.
  392|      0|  if (PROTOBUF_PREDICT_FALSE(res > INT_MAX - ParseContext::kSlopBytes)) {
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  393|      0|    return {nullptr, 0};
  394|      0|  }
  395|      0|  return {p + 5, res};
  396|      0|}
_ZN6google8protobuf8internal24InlineGreedyStringParserEPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEPKcPNS1_12ParseContextE:
  419|  10.9k|                                     ParseContext* ctx) {
  420|  10.9k|  int size = ReadSize(&ptr);
  421|  10.9k|  if (!ptr) return nullptr;
  ------------------
  |  Branch (421:7): [True: 0, False: 10.9k]
  ------------------
  422|  10.9k|  return ctx->ReadString(ptr, size, s);
  423|  10.9k|}
_ZN6google8protobuf8internal18EpsCopyInputStream10NextBufferEii:
   79|  3.33k|const char* EpsCopyInputStream::NextBuffer(int overrun, int depth) {
   80|  3.33k|  if (next_chunk_ == nullptr) return nullptr;  // We've reached end of stream.
  ------------------
  |  Branch (80:7): [True: 0, False: 3.33k]
  ------------------
   81|  3.33k|  if (next_chunk_ != patch_buffer_) {
  ------------------
  |  Branch (81:7): [True: 0, False: 3.33k]
  ------------------
   82|      0|    ABSL_DCHECK(size_ > kSlopBytes);
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   83|       |    // The chunk is large enough to be used directly
   84|      0|    buffer_end_ = next_chunk_ + size_ - kSlopBytes;
   85|      0|    auto res = next_chunk_;
   86|      0|    next_chunk_ = patch_buffer_;
   87|      0|    if (aliasing_ == kOnPatch) aliasing_ = kNoDelta;
  ------------------
  |  Branch (87:9): [True: 0, False: 0]
  ------------------
   88|      0|    return res;
   89|      0|  }
   90|       |  // Move the slop bytes of previous buffer to start of the patch buffer.
   91|       |  // Note we must use memmove because the previous buffer could be part of
   92|       |  // patch_buffer_.
   93|  3.33k|  std::memmove(patch_buffer_, buffer_end_, kSlopBytes);
   94|  3.33k|  if (overall_limit_ > 0 &&
  ------------------
  |  Branch (94:7): [True: 0, False: 3.33k]
  ------------------
   95|      0|      (depth < 0 || !ParseEndsInSlopRegion(patch_buffer_, overrun, depth))) {
  ------------------
  |  Branch (95:8): [True: 0, False: 0]
  |  Branch (95:21): [True: 0, False: 0]
  ------------------
   96|      0|    const void* data;
   97|       |    // ZeroCopyInputStream indicates Next may return 0 size buffers. Hence
   98|       |    // we loop.
   99|      0|    while (StreamNext(&data)) {
  ------------------
  |  Branch (99:12): [True: 0, False: 0]
  ------------------
  100|      0|      if (size_ > kSlopBytes) {
  ------------------
  |  Branch (100:11): [True: 0, False: 0]
  ------------------
  101|       |        // We got a large chunk
  102|      0|        std::memcpy(patch_buffer_ + kSlopBytes, data, kSlopBytes);
  103|      0|        next_chunk_ = static_cast<const char*>(data);
  104|      0|        buffer_end_ = patch_buffer_ + kSlopBytes;
  105|      0|        if (aliasing_ >= kNoDelta) aliasing_ = kOnPatch;
  ------------------
  |  Branch (105:13): [True: 0, False: 0]
  ------------------
  106|      0|        return patch_buffer_;
  107|      0|      } else if (size_ > 0) {
  ------------------
  |  Branch (107:18): [True: 0, False: 0]
  ------------------
  108|      0|        std::memcpy(patch_buffer_ + kSlopBytes, data, size_);
  109|      0|        next_chunk_ = patch_buffer_;
  110|      0|        buffer_end_ = patch_buffer_ + size_;
  111|      0|        if (aliasing_ >= kNoDelta) aliasing_ = kOnPatch;
  ------------------
  |  Branch (111:13): [True: 0, False: 0]
  ------------------
  112|      0|        return patch_buffer_;
  113|      0|      }
  114|      0|      ABSL_DCHECK(size_ == 0) << size_;
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  115|      0|    }
  116|      0|    overall_limit_ = 0;  // Next failed, no more needs for next
  117|      0|  }
  118|       |  // End of stream or array
  119|  3.33k|  if (aliasing_ == kNoDelta) {
  ------------------
  |  Branch (119:7): [True: 0, False: 3.33k]
  ------------------
  120|       |    // If there is no more block and aliasing is true, the previous block
  121|       |    // is still valid and we can alias. We have users relying on string_view's
  122|       |    // obtained from protos to outlive the proto, when the parse was from an
  123|       |    // array. This guarantees string_view's are always aliased if parsed from
  124|       |    // an array.
  125|      0|    aliasing_ = reinterpret_cast<std::uintptr_t>(buffer_end_) -
  126|      0|                reinterpret_cast<std::uintptr_t>(patch_buffer_);
  127|      0|  }
  128|  3.33k|  next_chunk_ = nullptr;
  129|  3.33k|  buffer_end_ = patch_buffer_ + kSlopBytes;
  130|  3.33k|  size_ = 0;
  131|  3.33k|  return patch_buffer_;
  132|  3.33k|}

_ZN6google8protobuf8internal18EpsCopyInputStreamC2Eb:
  100|  3.76k|      : aliasing_(enable_aliasing ? kOnPatch : kNoAliasing) {}
  ------------------
  |  Branch (100:19): [True: 0, False: 3.76k]
  ------------------
_ZN6google8protobuf8internal18EpsCopyInputStream10LimitTokenC2Ev:
  119|  24.5k|    LimitToken() { PROTOBUF_POISON_MEMORY_REGION(&token_, sizeof(token_)); }
_ZN6google8protobuf8internal18EpsCopyInputStream10LimitTokenC2Ei:
  121|  24.5k|    explicit LimitToken(int token) : token_(token) {
  122|  24.5k|      PROTOBUF_UNPOISON_MEMORY_REGION(&token_, sizeof(token_));
  123|  24.5k|    }
_ZN6google8protobuf8internal18EpsCopyInputStream10LimitTokenC2EOS3_:
  128|  24.5k|    LimitToken(LimitToken&& other) { *this = std::move(other); }
_ZN6google8protobuf8internal18EpsCopyInputStream10LimitTokenaSEOS3_:
  130|  49.0k|    LimitToken& operator=(LimitToken&& other) {
  131|  49.0k|      PROTOBUF_UNPOISON_MEMORY_REGION(&token_, sizeof(token_));
  132|  49.0k|      token_ = other.token_;
  133|  49.0k|      PROTOBUF_POISON_MEMORY_REGION(&other.token_, sizeof(token_));
  134|  49.0k|      return *this;
  135|  49.0k|    }
_ZN6google8protobuf8internal18EpsCopyInputStream10LimitTokenD2Ev:
  137|  73.6k|    ~LimitToken() { PROTOBUF_UNPOISON_MEMORY_REGION(&token_, sizeof(token_)); }
_ZNO6google8protobuf8internal18EpsCopyInputStream10LimitToken5tokenEv:
  139|  24.5k|    int token() && {
  140|  24.5k|      int t = token_;
  141|  24.5k|      PROTOBUF_POISON_MEMORY_REGION(&token_, sizeof(token_));
  142|  24.5k|      return t;
  143|  24.5k|    }
_ZN6google8protobuf8internal18EpsCopyInputStream9PushLimitEPKci:
  150|  24.5k|  PROTOBUF_NODISCARD LimitToken PushLimit(const char* ptr, int limit) {
  151|  24.5k|    ABSL_DCHECK(limit >= 0 && limit <= INT_MAX - kSlopBytes);
  ------------------
  |  |   47|  24.5k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  24.5k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  49.0k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  24.5k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  49.0k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  49.0k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 24.5k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  24.5k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 24.5k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  24.5k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 24.5k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  49.0k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  49.0k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  152|       |    // This add is safe due to the invariant above, because
  153|       |    // ptr - buffer_end_ <= kSlopBytes.
  154|  24.5k|    limit += static_cast<int>(ptr - buffer_end_);
  155|  24.5k|    limit_end_ = buffer_end_ + (std::min)(0, limit);
  156|  24.5k|    auto old_limit = limit_;
  157|  24.5k|    limit_ = limit;
  158|  24.5k|    return LimitToken(old_limit - limit);
  159|  24.5k|  }
_ZN6google8protobuf8internal18EpsCopyInputStream8PopLimitENS2_10LimitTokenE:
  161|  24.5k|  PROTOBUF_NODISCARD bool PopLimit(LimitToken delta) {
  162|       |    // We must update the limit first before the early return. Otherwise, we can
  163|       |    // end up with an invalid limit and it can lead to integer overflows.
  164|  24.5k|    limit_ = limit_ + std::move(delta).token();
  165|  24.5k|    if (PROTOBUF_PREDICT_FALSE(!EndedAtLimit())) return false;
  ------------------
  |  |  365|  24.5k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 24.5k]
  |  |  |  Branch (365:54): [Folded, False: 24.5k]
  |  |  |  Branch (365:63): [True: 0, False: 24.5k]
  |  |  ------------------
  ------------------
  166|       |    // TODO We could remove this line and hoist the code to
  167|       |    // DoneFallback. Study the perf/bin-size effects.
  168|  24.5k|    limit_end_ = buffer_end_ + (std::min)(0, limit_);
  169|  24.5k|    return true;
  170|  24.5k|  }
_ZN6google8protobuf8internal18EpsCopyInputStream10ReadStringEPKciPNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE:
  179|  21.1k|                                            std::string* s) {
  180|  21.1k|    if (size <= buffer_end_ + kSlopBytes - ptr) {
  ------------------
  |  Branch (180:9): [True: 21.1k, False: 0]
  ------------------
  181|       |      // Fundamentally we just want to do assign to the string.
  182|       |      // However micro-benchmarks regress on string reading cases. So we copy
  183|       |      // the same logic from the old CodedInputStream ReadString. Note: as of
  184|       |      // Apr 2021, this is still a significant win over `assign()`.
  185|  21.1k|      absl::strings_internal::STLStringResizeUninitialized(s, size);
  186|  21.1k|      char* z = &(*s)[0];
  187|  21.1k|      memcpy(z, ptr, size);
  188|  21.1k|      return ptr + size;
  189|  21.1k|    }
  190|      0|    return ReadStringFallback(ptr, size, s);
  191|  21.1k|  }
_ZNK6google8protobuf8internal18EpsCopyInputStream7LastTagEv:
  232|  27.7k|  uint32_t LastTag() const { return last_tag_minus_1_ + 1; }
_ZNK6google8protobuf8internal18EpsCopyInputStream12EndedAtLimitEv:
  238|  28.2k|  bool EndedAtLimit() const { return last_tag_minus_1_ == 0; }
_ZN6google8protobuf8internal18EpsCopyInputStream13DataAvailableEPKc:
  256|  72.0k|  bool DataAvailable(const char* ptr) { return ptr < limit_end_; }
_ZN6google8protobuf8internal18EpsCopyInputStream13DoneWithCheckEPPKci:
  262|  56.0k|  bool DoneWithCheck(const char** ptr, int d) {
  263|  56.0k|    ABSL_DCHECK(*ptr);
  ------------------
  |  |   47|  56.0k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  56.0k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|   112k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  56.0k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|   112k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|   112k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 56.0k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  56.0k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 56.0k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  56.0k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 56.0k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|   112k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|   112k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  264|  56.0k|    if (PROTOBUF_PREDICT_TRUE(*ptr < limit_end_)) return false;
  ------------------
  |  |  364|  56.0k|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 24.4k, False: 31.6k]
  |  |  |  Branch (364:53): [Folded, False: 56.0k]
  |  |  |  Branch (364:62): [True: 24.4k, False: 31.6k]
  |  |  ------------------
  ------------------
  265|  31.6k|    int overrun = static_cast<int>(*ptr - buffer_end_);
  266|  31.6k|    ABSL_DCHECK_LE(overrun, kSlopBytes);  // Guaranteed by parse loop.
  ------------------
  |  |   78|  31.6k|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   90|  31.6k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  31.6k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 31.6k]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  31.6k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  267|  31.6k|    if (overrun ==
  ------------------
  |  Branch (267:9): [True: 28.2k, False: 3.33k]
  ------------------
  268|  31.6k|        limit_) {  //  No need to flip buffers if we ended on a limit.
  269|       |      // If we actually overrun the buffer and next_chunk_ is null, it means
  270|       |      // the stream ended and we passed the stream end.
  271|  28.2k|      if (overrun > 0 && next_chunk_ == nullptr) *ptr = nullptr;
  ------------------
  |  Branch (271:11): [True: 1.46k, False: 26.8k]
  |  Branch (271:26): [True: 0, False: 1.46k]
  ------------------
  272|  28.2k|      return true;
  273|  28.2k|    }
  274|  3.33k|    auto res = DoneFallback(overrun, d);
  275|  3.33k|    *ptr = res.first;
  276|  3.33k|    return res.second;
  277|  31.6k|  }
_ZN6google8protobuf8internal18EpsCopyInputStream8InitFromEN4absl12lts_2024011611string_viewE:
  279|  3.76k|  const char* InitFrom(absl::string_view flat) {
  280|  3.76k|    overall_limit_ = 0;
  281|  3.76k|    if (flat.size() > kSlopBytes) {
  ------------------
  |  Branch (281:9): [True: 3.50k, False: 260]
  ------------------
  282|  3.50k|      limit_ = kSlopBytes;
  283|  3.50k|      limit_end_ = buffer_end_ = flat.data() + flat.size() - kSlopBytes;
  284|  3.50k|      next_chunk_ = patch_buffer_;
  285|  3.50k|      if (aliasing_ == kOnPatch) aliasing_ = kNoDelta;
  ------------------
  |  Branch (285:11): [True: 0, False: 3.50k]
  ------------------
  286|  3.50k|      return flat.data();
  287|  3.50k|    } else {
  288|    260|      if (!flat.empty()) {
  ------------------
  |  Branch (288:11): [True: 260, False: 0]
  ------------------
  289|    260|        std::memcpy(patch_buffer_, flat.data(), flat.size());
  290|    260|      }
  291|    260|      limit_ = 0;
  292|    260|      limit_end_ = buffer_end_ = patch_buffer_ + flat.size();
  293|    260|      next_chunk_ = nullptr;
  294|    260|      if (aliasing_ == kOnPatch) {
  ------------------
  |  Branch (294:11): [True: 0, False: 260]
  ------------------
  295|      0|        aliasing_ = reinterpret_cast<std::uintptr_t>(flat.data()) -
  296|      0|                    reinterpret_cast<std::uintptr_t>(patch_buffer_);
  297|      0|      }
  298|    260|      return patch_buffer_;
  299|    260|    }
  300|  3.76k|  }
_ZN6google8protobuf8internal12ParseContext4DoneEPPKc:
  487|  56.0k|  bool Done(const char** ptr) { return DoneWithCheck(ptr, group_depth_); }
_ZNK6google8protobuf8internal12ParseContext4dataEv:
  492|      8|  const Data& data() const { return data_; }
_ZN6google8protobuf8internal12EndianHelperILi1EE4LoadEPKv:
  578|  43.3k|  static uint8_t Load(const void* p) { return *static_cast<const uint8_t*>(p); }
_ZN6google8protobuf8internal12EndianHelperILi2EE4LoadEPKv:
  583|  58.2k|  static uint16_t Load(const void* p) {
  584|  58.2k|    uint16_t tmp;
  585|  58.2k|    std::memcpy(&tmp, p, 2);
  586|  58.2k|    return little_endian::ToHost(tmp);
  587|  58.2k|  }
_ZN6google8protobuf8internal10RotateLeftImEET_S3_i:
  930|    102|    T x, int s) noexcept {
  931|    102|  return static_cast<T>(x << (s & (std::numeric_limits<T>::digits - 1))) |
  932|    102|         static_cast<T>(x >> ((-s) & (std::numeric_limits<T>::digits - 1)));
  933|    102|}
_ZN6google8protobuf8internal15VarintParseSlowEPKcjPm:
  632|    199|inline const char* VarintParseSlow(const char* p, uint32_t res, uint64_t* out) {
  633|    199|  auto tmp = VarintParseSlow64(p, res);
  634|    199|  *out = tmp.second;
  635|    199|  return tmp.first;
  636|    199|}
_ZN6google8protobuf8internal7ReadTagEPKcPjj:
  906|     57|                           uint32_t /*max_tag*/ = 0) {
  907|     57|  uint32_t res = static_cast<uint8_t>(p[0]);
  908|     57|  if (res < 128) {
  ------------------
  |  Branch (908:7): [True: 0, False: 57]
  ------------------
  909|      0|    *out = res;
  910|      0|    return p + 1;
  911|      0|  }
  912|     57|  uint32_t second = static_cast<uint8_t>(p[1]);
  913|     57|  res += (second - 1) << 7;
  914|     57|  if (second < 128) {
  ------------------
  |  Branch (914:7): [True: 57, False: 0]
  ------------------
  915|     57|    *out = res;
  916|     57|    return p + 2;
  917|     57|  }
  918|      0|  auto tmp = ReadTagFallback(p, res);
  919|      0|  *out = tmp.second;
  920|      0|  return tmp.first;
  921|     57|}
_ZN6google8protobuf8internal26RotRight7AndReplaceLowByteEmRKc:
  936|    102|RotRight7AndReplaceLowByte(uint64_t res, const char& byte) {
  937|       |  // TODO: remove the inline assembly
  938|    102|#if defined(__x86_64__) && defined(__GNUC__)
  939|       |  // This will only use one register for `res`.
  940|       |  // `byte` comes as a reference to allow the compiler to generate code like:
  941|       |  //
  942|       |  //   rorq    $7, %rcx
  943|       |  //   movb    1(%rax), %cl
  944|       |  //
  945|       |  // which avoids loading the incoming bytes into a separate register first.
  946|    102|  asm("ror $7,%0\n\t"
  947|    102|      "movb %1,%b0"
  948|    102|      : "+r"(res)
  949|    102|      : "m"(byte));
  950|       |#else
  951|       |  res = RotateLeft(res, -7);
  952|       |  res = res & ~0xFF;
  953|       |  res |= 0xFF & byte;
  954|       |#endif
  955|    102|  return res;
  956|    102|}
_ZN6google8protobuf8internal14ReadTagInlinedEPKcPj:
  959|  13.3k|                                                         uint32_t* out) {
  960|  13.3k|  uint64_t res = 0xFF & ptr[0];
  961|  13.3k|  if (PROTOBUF_PREDICT_FALSE(res >= 128)) {
  ------------------
  |  |  365|  13.3k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 102, False: 13.2k]
  |  |  |  Branch (365:54): [Folded, False: 13.3k]
  |  |  |  Branch (365:63): [True: 102, False: 13.2k]
  |  |  ------------------
  ------------------
  962|    102|    res = RotRight7AndReplaceLowByte(res, ptr[1]);
  963|    102|    if (PROTOBUF_PREDICT_FALSE(res & 0x80)) {
  ------------------
  |  |  365|    102|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 102]
  |  |  |  Branch (365:54): [Folded, False: 102]
  |  |  |  Branch (365:63): [True: 0, False: 102]
  |  |  ------------------
  ------------------
  964|      0|      res = RotRight7AndReplaceLowByte(res, ptr[2]);
  965|      0|      if (PROTOBUF_PREDICT_FALSE(res & 0x80)) {
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  966|      0|        res = RotRight7AndReplaceLowByte(res, ptr[3]);
  967|      0|        if (PROTOBUF_PREDICT_FALSE(res & 0x80)) {
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  968|       |          // Note: this wouldn't work if res were 32-bit,
  969|       |          // because then replacing the low byte would overwrite
  970|       |          // the bottom 4 bits of the result.
  971|      0|          res = RotRight7AndReplaceLowByte(res, ptr[4]);
  972|      0|          if (PROTOBUF_PREDICT_FALSE(res & 0x80)) {
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  973|       |            // The proto format does not permit longer than 5-byte encodings for
  974|       |            // tags.
  975|      0|            *out = 0;
  976|      0|            return nullptr;
  977|      0|          }
  978|      0|          *out = static_cast<uint32_t>(RotateLeft(res, 28));
  979|      0|#if defined(__GNUC__)
  980|       |          // Note: this asm statement prevents the compiler from
  981|       |          // trying to share the "return ptr + constant" among all
  982|       |          // branches.
  983|      0|          asm("" : "+r"(ptr));
  984|      0|#endif
  985|      0|          return ptr + 5;
  986|      0|        }
  987|      0|        *out = static_cast<uint32_t>(RotateLeft(res, 21));
  988|      0|        return ptr + 4;
  989|      0|      }
  990|      0|      *out = static_cast<uint32_t>(RotateLeft(res, 14));
  991|      0|      return ptr + 3;
  992|      0|    }
  993|    102|    *out = static_cast<uint32_t>(RotateLeft(res, 7));
  994|    102|    return ptr + 2;
  995|    102|  }
  996|  13.2k|  *out = static_cast<uint32_t>(res);
  997|  13.2k|  return ptr + 1;
  998|  13.3k|}
_ZN6google8protobuf8internal8ReadSizeEPPKc:
 1050|  45.9k|inline uint32_t ReadSize(const char** pp) {
 1051|  45.9k|  auto p = *pp;
 1052|  45.9k|  uint32_t res = static_cast<uint8_t>(p[0]);
 1053|  45.9k|  if (res < 128) {
  ------------------
  |  Branch (1053:7): [True: 43.5k, False: 2.36k]
  ------------------
 1054|  43.5k|    *pp = p + 1;
 1055|  43.5k|    return res;
 1056|  43.5k|  }
 1057|  2.36k|  auto x = ReadSizeFallback(p, res);
 1058|  2.36k|  *pp = x.first;
 1059|  2.36k|  return x.second;
 1060|  45.9k|}
_ZN6google8protobuf8internal12ParseContext35ReadSizeAndPushLimitAndDepthInlinedEPKcPNS1_18EpsCopyInputStream10LimitTokenE:
 1125|  24.5k|    const char* ptr, LimitToken* old_limit) {
 1126|  24.5k|  int size = ReadSize(&ptr);
 1127|  24.5k|  if (PROTOBUF_PREDICT_FALSE(!ptr) || depth_ <= 0) {
  ------------------
  |  |  365|  49.0k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 24.5k]
  |  |  |  Branch (365:54): [Folded, False: 24.5k]
  |  |  |  Branch (365:63): [True: 0, False: 24.5k]
  |  |  ------------------
  ------------------
  |  Branch (1127:39): [True: 0, False: 24.5k]
  ------------------
 1128|      0|    return nullptr;
 1129|      0|  }
 1130|  24.5k|  *old_limit = PushLimit(ptr, size);
 1131|  24.5k|  --depth_;
 1132|  24.5k|  return ptr;
 1133|  24.5k|}
_ZN6google8protobuf8internal13UnalignedLoadItEET_PKc:
  609|  58.2k|T UnalignedLoad(const char* p) {
  610|  58.2k|  auto tmp = EndianHelper<sizeof(T)>::Load(p);
  611|  58.2k|  T res;
  612|  58.2k|  memcpy(&res, &tmp, sizeof(T));
  613|  58.2k|  return res;
  614|  58.2k|}
_ZN6google8protobuf8internal11VarintParseImEEPKcS4_PT_:
  868|    497|PROTOBUF_NODISCARD const char* VarintParse(const char* p, T* out) {
  869|       |#if defined(__aarch64__) && defined(ABSL_IS_LITTLE_ENDIAN) && !defined(_MSC_VER)
  870|       |  // This optimization is not supported in big endian mode
  871|       |  uint64_t first8;
  872|       |  std::memcpy(&first8, p, sizeof(first8));
  873|       |  if (PROTOBUF_PREDICT_TRUE((first8 & 0x80) == 0)) {
  874|       |    *out = static_cast<uint8_t>(first8);
  875|       |    return p + 1;
  876|       |  }
  877|       |  if (PROTOBUF_PREDICT_TRUE((first8 & 0x8000) == 0)) {
  878|       |    uint64_t chunk1;
  879|       |    uint64_t chunk2;
  880|       |    // Extracting the two chunks this way gives a speedup for this path.
  881|       |    chunk1 = Ubfx7(first8, 0);
  882|       |    chunk2 = Ubfx7(first8, 8);
  883|       |    *out = chunk1 | (chunk2 << 7);
  884|       |    return p + 2;
  885|       |  }
  886|       |  return VarintParseSlowArm(p, out, first8);
  887|       |#else   // __aarch64__
  888|    497|  auto ptr = reinterpret_cast<const uint8_t*>(p);
  889|    497|  uint32_t res = ptr[0];
  890|    497|  if ((res & 0x80) == 0) {
  ------------------
  |  Branch (890:7): [True: 298, False: 199]
  ------------------
  891|    298|    *out = res;
  892|    298|    return p + 1;
  893|    298|  }
  894|    199|  return VarintParseSlow(p, res, out);
  895|    497|#endif  // __aarch64__
  896|    497|}
_ZN6google8protobuf8internal12ParseContext27ParseLengthDelimitedInlinedIZNS1_8TcParser9MpMessageILb0EEEPKcPNS0_11MessageLiteES7_PS2_NS1_11TcFieldDataEPKNS1_16TcParseTableBaseEmEUlS7_E_EES7_S7_RKT_:
 1093|    799|ParseContext::ParseLengthDelimitedInlined(const char* ptr, const Func& func) {
 1094|    799|  LimitToken old;
 1095|    799|  ptr = ReadSizeAndPushLimitAndDepthInlined(ptr, &old);
 1096|    799|  if (ptr == nullptr) return ptr;
  ------------------
  |  Branch (1096:7): [True: 0, False: 799]
  ------------------
 1097|    799|  auto old_depth = depth_;
 1098|    799|  PROTOBUF_ALWAYS_INLINE_CALL ptr = func(ptr);
  ------------------
  |  |  187|    799|#define PROTOBUF_ALWAYS_INLINE_CALL [[clang::always_inline]]
  ------------------
 1099|    799|  if (ptr != nullptr) ABSL_DCHECK_EQ(old_depth, depth_);
  ------------------
  |  |   74|    799|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|    799|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    799|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 799]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    799|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1099:7): [True: 799, False: 0]
  ------------------
 1100|    799|  depth_++;
 1101|    799|  if (!PopLimit(std::move(old))) return nullptr;
  ------------------
  |  Branch (1101:7): [True: 0, False: 799]
  ------------------
 1102|    799|  return ptr;
 1103|    799|}
_ZN6google8protobuf8internal13UnalignedLoadIhEET_PKc:
  609|  43.3k|T UnalignedLoad(const char* p) {
  610|  43.3k|  auto tmp = EndianHelper<sizeof(T)>::Load(p);
  611|  43.3k|  T res;
  612|  43.3k|  memcpy(&res, &tmp, sizeof(T));
  613|  43.3k|  return res;
  614|  43.3k|}
_ZN6google8protobuf8internal12ParseContext27ParseLengthDelimitedInlinedIZNS1_8TcParser27SingularParseMessageAuxImplIhLb0ELb1EEEPKcPNS0_11MessageLiteES7_PS2_NS1_11TcFieldDataEPKNS1_16TcParseTableBaseEmEUlS7_E_EES7_S7_RKT_:
 1093|  5.13k|ParseContext::ParseLengthDelimitedInlined(const char* ptr, const Func& func) {
 1094|  5.13k|  LimitToken old;
 1095|  5.13k|  ptr = ReadSizeAndPushLimitAndDepthInlined(ptr, &old);
 1096|  5.13k|  if (ptr == nullptr) return ptr;
  ------------------
  |  Branch (1096:7): [True: 0, False: 5.13k]
  ------------------
 1097|  5.13k|  auto old_depth = depth_;
 1098|  5.13k|  PROTOBUF_ALWAYS_INLINE_CALL ptr = func(ptr);
  ------------------
  |  |  187|  5.13k|#define PROTOBUF_ALWAYS_INLINE_CALL [[clang::always_inline]]
  ------------------
 1099|  5.13k|  if (ptr != nullptr) ABSL_DCHECK_EQ(old_depth, depth_);
  ------------------
  |  |   74|  5.13k|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|  5.13k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  5.13k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 5.13k]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  5.13k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1099:7): [True: 5.13k, False: 0]
  ------------------
 1100|  5.13k|  depth_++;
 1101|  5.13k|  if (!PopLimit(std::move(old))) return nullptr;
  ------------------
  |  Branch (1101:7): [True: 0, False: 5.13k]
  ------------------
 1102|  5.13k|  return ptr;
 1103|  5.13k|}
_ZN6google8protobuf8internal12ParseContext27ParseLengthDelimitedInlinedIZNS1_8TcParser27RepeatedParseMessageAuxImplIhLb0ELb1EEEPKcPNS0_11MessageLiteES7_PS2_NS1_11TcFieldDataEPKNS1_16TcParseTableBaseEmEUlS7_E_EES7_S7_RKT_:
 1093|  18.5k|ParseContext::ParseLengthDelimitedInlined(const char* ptr, const Func& func) {
 1094|  18.5k|  LimitToken old;
 1095|  18.5k|  ptr = ReadSizeAndPushLimitAndDepthInlined(ptr, &old);
 1096|  18.5k|  if (ptr == nullptr) return ptr;
  ------------------
  |  Branch (1096:7): [True: 0, False: 18.5k]
  ------------------
 1097|  18.5k|  auto old_depth = depth_;
 1098|  18.5k|  PROTOBUF_ALWAYS_INLINE_CALL ptr = func(ptr);
  ------------------
  |  |  187|  18.5k|#define PROTOBUF_ALWAYS_INLINE_CALL [[clang::always_inline]]
  ------------------
 1099|  18.5k|  if (ptr != nullptr) ABSL_DCHECK_EQ(old_depth, depth_);
  ------------------
  |  |   74|  18.5k|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|  18.5k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  18.5k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 18.5k]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  18.5k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1099:7): [True: 18.5k, False: 0]
  ------------------
 1100|  18.5k|  depth_++;
 1101|  18.5k|  if (!PopLimit(std::move(old))) return nullptr;
  ------------------
  |  Branch (1101:7): [True: 0, False: 18.5k]
  ------------------
 1102|  18.5k|  return ptr;
 1103|  18.5k|}
_ZN6google8protobuf8internal12ParseContext27ParseLengthDelimitedInlinedIZNS1_8TcParser27RepeatedParseMessageAuxImplItLb0ELb1EEEPKcPNS0_11MessageLiteES7_PS2_NS1_11TcFieldDataEPKNS1_16TcParseTableBaseEmEUlS7_E_EES7_S7_RKT_:
 1093|     54|ParseContext::ParseLengthDelimitedInlined(const char* ptr, const Func& func) {
 1094|     54|  LimitToken old;
 1095|     54|  ptr = ReadSizeAndPushLimitAndDepthInlined(ptr, &old);
 1096|     54|  if (ptr == nullptr) return ptr;
  ------------------
  |  Branch (1096:7): [True: 0, False: 54]
  ------------------
 1097|     54|  auto old_depth = depth_;
 1098|     54|  PROTOBUF_ALWAYS_INLINE_CALL ptr = func(ptr);
  ------------------
  |  |  187|     54|#define PROTOBUF_ALWAYS_INLINE_CALL [[clang::always_inline]]
  ------------------
 1099|     54|  if (ptr != nullptr) ABSL_DCHECK_EQ(old_depth, depth_);
  ------------------
  |  |   74|     54|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|     54|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     54|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 54]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     54|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1099:7): [True: 54, False: 0]
  ------------------
 1100|     54|  depth_++;
 1101|     54|  if (!PopLimit(std::move(old))) return nullptr;
  ------------------
  |  Branch (1101:7): [True: 0, False: 54]
  ------------------
 1102|     54|  return ptr;
 1103|     54|}
_ZN6google8protobuf8internal18EpsCopyInputStream16ReadPackedVarintIZNS1_8TcParser12PackedVarintIjhLb0EEEPKcPNS0_11MessageLiteES7_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEmEUlmE_EES7_S7_T_:
  225|    205|  PROTOBUF_NODISCARD const char* ReadPackedVarint(const char* ptr, Add add) {
  226|    205|    return ReadPackedVarint(ptr, add, [](int) {});
  227|    205|  }
_ZN6google8protobuf8internal18EpsCopyInputStream16ReadPackedVarintIZNS1_8TcParser12PackedVarintIjhLb0EEEPKcPNS0_11MessageLiteES7_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEmEUlmE_ZNS2_16ReadPackedVarintISG_EES7_S7_T_EUliE_EES7_S7_SI_T0_:
 1213|    205|                                                 SizeCb size_callback) {
 1214|    205|  int size = ReadSize(&ptr);
 1215|    205|  size_callback(size);
 1216|       |
 1217|    205|  GOOGLE_PROTOBUF_PARSER_ASSERT(ptr);
  ------------------
  |  | 1157|    205|  GOOGLE_PROTOBUF_ASSERT_RETURN(predicate, nullptr)
  |  |  ------------------
  |  |  |  | 1150|    205|  if (!(predicate)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1150:7): [True: 0, False: 205]
  |  |  |  |  ------------------
  |  |  |  | 1151|      0|    /*  ::raise(SIGINT);  */                           \
  |  |  |  | 1152|      0|    /*  ABSL_LOG(ERROR) << "Parse failure";  */        \
  |  |  |  | 1153|      0|    return ret;                                        \
  |  |  |  | 1154|      0|  }
  |  |  ------------------
  ------------------
 1218|    205|  int chunk_size = static_cast<int>(buffer_end_ - ptr);
 1219|    205|  while (size > chunk_size) {
  ------------------
  |  Branch (1219:10): [True: 2, False: 203]
  ------------------
 1220|      2|    ptr = ReadPackedVarintArray(ptr, buffer_end_, add);
 1221|      2|    if (ptr == nullptr) return nullptr;
  ------------------
  |  Branch (1221:9): [True: 0, False: 2]
  ------------------
 1222|      2|    int overrun = static_cast<int>(ptr - buffer_end_);
 1223|      2|    ABSL_DCHECK(overrun >= 0 && overrun <= kSlopBytes);
  ------------------
  |  |   47|      2|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      2|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      4|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      2|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      4|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      4|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      2|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      2|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 2, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      4|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      4|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1224|      2|    if (size - chunk_size <= kSlopBytes) {
  ------------------
  |  Branch (1224:9): [True: 2, False: 0]
  ------------------
 1225|       |      // The current buffer contains all the information needed, we don't need
 1226|       |      // to flip buffers. However we must parse from a buffer with enough space
 1227|       |      // so we are not prone to a buffer overflow.
 1228|      2|      char buf[kSlopBytes + 10] = {};
 1229|      2|      std::memcpy(buf, buffer_end_, kSlopBytes);
 1230|      2|      ABSL_CHECK_LE(size - chunk_size, kSlopBytes);
  ------------------
  |  |   54|      2|  ABSL_LOG_INTERNAL_CHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   52|      2|  ABSL_LOG_INTERNAL_CHECK_OP(Check_LE, <=, val1, val1_text, val2, val2_text)
  |  |  |  |  ------------------
  |  |  |  |  |  |   61|      2|  while (                                                                      \
  |  |  |  |  |  |   62|      2|      ::std::string* absl_log_internal_check_op_result ABSL_ATTRIBUTE_UNUSED = \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (62:22): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|      2|          ::absl::log_internal::name##Impl(                                    \
  |  |  |  |  |  |   64|      2|              ::absl::log_internal::GetReferenceableValue(val1),               \
  |  |  |  |  |  |   65|      2|              ::absl::log_internal::GetReferenceableValue(val2),               \
  |  |  |  |  |  |   66|      2|              ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text                 \
  |  |  |  |  |  |   67|      2|                                                     " " #op " " val2_text)))  \
  |  |  |  |  |  |   68|      2|    ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true)                         \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   69|      0|  ABSL_LOG_INTERNAL_CHECK(*absl_log_internal_check_op_result).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1231|      2|      auto end = buf + (size - chunk_size);
 1232|      2|      auto res = ReadPackedVarintArray(buf + overrun, end, add);
 1233|      2|      if (res == nullptr || res != end) return nullptr;
  ------------------
  |  Branch (1233:11): [True: 0, False: 2]
  |  Branch (1233:29): [True: 0, False: 2]
  ------------------
 1234|      2|      return buffer_end_ + (res - buf);
 1235|      2|    }
 1236|      0|    size -= overrun + chunk_size;
 1237|      0|    ABSL_DCHECK_GT(size, 0);
  ------------------
  |  |   84|      0|  ABSL_LOG_INTERNAL_DCHECK_GT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   96|      0|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1238|       |    // We must flip buffers
 1239|      0|    if (limit_ <= kSlopBytes) return nullptr;
  ------------------
  |  Branch (1239:9): [True: 0, False: 0]
  ------------------
 1240|      0|    ptr = Next();
 1241|      0|    if (ptr == nullptr) return nullptr;
  ------------------
  |  Branch (1241:9): [True: 0, False: 0]
  ------------------
 1242|      0|    ptr += overrun;
 1243|      0|    chunk_size = static_cast<int>(buffer_end_ - ptr);
 1244|      0|  }
 1245|    203|  auto end = ptr + size;
 1246|    203|  ptr = ReadPackedVarintArray(ptr, end, add);
 1247|    203|  return end == ptr ? ptr : nullptr;
  ------------------
  |  Branch (1247:10): [True: 203, False: 0]
  ------------------
 1248|    205|}
_ZZN6google8protobuf8internal18EpsCopyInputStream16ReadPackedVarintIZNS1_8TcParser12PackedVarintIjhLb0EEEPKcPNS0_11MessageLiteES7_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEmEUlmE_EES7_S7_T_ENKUliE_clEi:
  226|    205|    return ReadPackedVarint(ptr, add, [](int) {});
_ZN6google8protobuf8internal21ReadPackedVarintArrayIZNS1_8TcParser12PackedVarintIjhLb0EEEPKcPNS0_11MessageLiteES6_PNS1_12ParseContextENS1_11TcFieldDataEPKNS1_16TcParseTableBaseEmEUlmE_EES6_S6_S6_T_:
 1201|    207|const char* ReadPackedVarintArray(const char* ptr, const char* end, Add add) {
 1202|    704|  while (ptr < end) {
  ------------------
  |  Branch (1202:10): [True: 497, False: 207]
  ------------------
 1203|    497|    uint64_t varint;
 1204|    497|    ptr = VarintParse(ptr, &varint);
 1205|    497|    if (ptr == nullptr) return nullptr;
  ------------------
  |  Branch (1205:9): [True: 0, False: 497]
  ------------------
 1206|    497|    add(varint);
 1207|    497|  }
 1208|    207|  return ptr;
 1209|    207|}
_ZN6google8protobuf8internal12ParseContextC2IJRN4absl12lts_2024011611string_viewEEEEibPPKcDpOT_:
  455|  3.76k|      : EpsCopyInputStream(aliasing), depth_(depth) {
  456|  3.76k|    *start = InitFrom(std::forward<T>(args)...);
  457|  3.76k|  }

_ZN6google8protobuf8internal16NoopDebugCounter3IncEv:
  440|  25.0k|  constexpr void Inc() {}
_ZN6google8protobuf8internal16SizedArrayDeleteEPvm:
  148|  1.05k|inline void SizedArrayDelete(void* p, size_t size) {
  149|  1.05k|#if defined(__cpp_sized_deallocation)
  150|  1.05k|  ::operator delete[](p, size);
  151|       |#else
  152|       |  // Avoid -Wunused-parameter
  153|       |  (void)size;
  154|       |  ::operator delete[](p);
  155|       |#endif
  156|  1.05k|}
_ZN6google8protobuf8internal23Prefetch5LinesFrom1LineEPKv:
  323|  1.27k|inline PROTOBUF_ALWAYS_INLINE void Prefetch5LinesFrom1Line(const void* ptr) {
  324|  1.27k|  PROTOBUF_PREFETCH_WITH_OFFSET(ptr, 64);
  ------------------
  |  |  670|  1.27k|  asm("prefetcht0 " #offset "(%0)" : : "r"(base));
  ------------------
  325|  1.27k|  PROTOBUF_PREFETCH_WITH_OFFSET(ptr, 128);
  ------------------
  |  |  670|  1.27k|  asm("prefetcht0 " #offset "(%0)" : : "r"(base));
  ------------------
  326|  1.27k|  PROTOBUF_PREFETCH_WITH_OFFSET(ptr, 192);
  ------------------
  |  |  670|  1.27k|  asm("prefetcht0 " #offset "(%0)" : : "r"(base));
  ------------------
  327|  1.27k|  PROTOBUF_PREFETCH_WITH_OFFSET(ptr, 256);
  ------------------
  |  |  670|  1.27k|  asm("prefetcht0 " #offset "(%0)" : : "r"(base));
  ------------------
  328|  1.27k|  PROTOBUF_PREFETCH_WITH_OFFSET(ptr, 320);
  ------------------
  |  |  670|  1.27k|  asm("prefetcht0 " #offset "(%0)" : : "r"(base));
  ------------------
  329|  1.27k|}
_ZN6google8protobuf8internal7LaunderINS0_11MessageLiteEEEPT_S5_:
  376|  25.0k|constexpr T* Launder(T* p) {
  377|       |#if defined(__cpp_lib_launder) && __cpp_lib_launder >= 201606L
  378|       |  return std::launder(p);
  379|       |#elif ABSL_HAVE_BUILTIN(__builtin_launder)
  380|       |  return __builtin_launder(p);
  381|       |#else
  382|       |  return p;
  383|       |#endif
  384|  25.0k|}
_ZN6google8protobuf8internal13StrongPointerIPNS1_16DummyWeakDefaultETnT_XadL_ZNS1_18dummy_weak_defaultEEEEEvv:
   60|      2|inline PROTOBUF_ALWAYS_INLINE void StrongPointer() {
   61|       |  // This injects a relocation in the code path without having to run code, but
   62|       |  // we can only do it with a newer clang.
   63|      2|  asm(".reloc ., BFD_RELOC_NONE, %p0" ::"Ws"(ptr));
   64|      2|}

_ZNK6google8protobuf13RepeatedFieldIiE6is_sooEv:
  476|    326|  bool is_soo() const { return soo_rep_.is_soo(); }
_ZNK6google8protobuf13RepeatedFieldIiE4sizeEb:
  477|    211|  int size(bool is_soo) const { return soo_rep_.size(is_soo); }
_ZNK6google8protobuf13RepeatedFieldIiE8CapacityEb:
  478|     30|  int Capacity(bool is_soo) const {
  479|       |#if !defined(__clang__) && defined(__GNUC__)
  480|       |#pragma GCC diagnostic push
  481|       |#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
  482|       |#endif
  483|     30|    return is_soo ? kSooCapacityElements : soo_rep_.long_rep.capacity;
  ------------------
  |  Branch (483:12): [True: 28, False: 2]
  ------------------
  484|       |#if !defined(__clang__) && defined(__GNUC__)
  485|       |#pragma GCC diagnostic pop
  486|       |#endif
  487|     30|  }
_ZN6google8protobuf13RepeatedFieldIiE15unsafe_elementsEb:
  592|    140|  Element* unsafe_elements(bool is_soo) {
  593|    140|    return is_soo ? reinterpret_cast<Element*>(soo_rep_.short_rep.data)
  ------------------
  |  Branch (593:12): [True: 134, False: 6]
  ------------------
  594|    140|                  : reinterpret_cast<Element*>(soo_rep_.long_rep.elements());
  595|    140|  }
_ZNK6google8protobuf13RepeatedFieldIiE14UnpoisonBufferEv:
  557|     29|  void UnpoisonBuffer() const {
  558|     29|    AnnotateSize(size(), Capacity());
  559|     29|    if (is_soo()) {
  ------------------
  |  Branch (559:9): [True: 28, False: 1]
  ------------------
  560|       |      // We need to manually unpoison the SOO buffer because in reflection for
  561|       |      // split repeated fields, we poison the whole SOO buffer even when we
  562|       |      // don't actually use the whole SOO buffer (e.g. for RepeatedField<bool>).
  563|     28|      PROTOBUF_UNPOISON_MEMORY_REGION(soo_rep_.short_rep.data,
  564|     28|                                      sizeof(soo_rep_.short_rep.data));
  565|     28|    }
  566|     29|  }
_ZNK6google8protobuf13RepeatedFieldIiE8heap_repEv:
  602|      2|  HeapRep* heap_rep() const {
  603|      2|    ABSL_DCHECK(!is_soo());
  ------------------
  |  |   47|      2|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      2|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      4|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      2|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      4|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      4|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      2|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      2|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 2, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      4|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      4|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  604|      2|    return reinterpret_cast<HeapRep*>(soo_rep_.long_rep.elements() -
  605|      2|                                      kHeapRepHeaderSize);
  606|      2|  }
_ZN6google8protobuf13RepeatedFieldIiE8elementsEb:
  581|     19|  Element* elements(bool is_soo) {
  582|     19|    ABSL_DCHECK_GT(Capacity(is_soo), 0);
  ------------------
  |  |   84|     19|  ABSL_LOG_INTERNAL_DCHECK_GT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   96|     19|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     19|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 19]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  583|     19|    return unsafe_elements(is_soo);
  584|     19|  }
_ZNK6google8protobuf13RepeatedFieldIiE12AnnotateSizeEii:
  543|    103|  void AnnotateSize(int old_size, int new_size) const {
  544|    103|    if (old_size != new_size) {
  ------------------
  |  Branch (544:9): [True: 58, False: 45]
  ------------------
  545|     58|      ABSL_ATTRIBUTE_UNUSED const bool is_soo = this->is_soo();
  ------------------
  |  |  557|     58|#define ABSL_ATTRIBUTE_UNUSED __attribute__((__unused__))
  ------------------
  546|     58|      ABSL_ATTRIBUTE_UNUSED const Element* elem = unsafe_elements(is_soo);
  ------------------
  |  |  557|     58|#define ABSL_ATTRIBUTE_UNUSED __attribute__((__unused__))
  ------------------
  547|     58|      ABSL_ANNOTATE_CONTIGUOUS_CONTAINER(elem, elem + Capacity(is_soo),
  548|     58|                                         elem + old_size, elem + new_size);
  549|     58|      if (new_size < old_size) {
  ------------------
  |  Branch (549:11): [True: 37, False: 21]
  ------------------
  550|     37|        ABSL_ANNOTATE_MEMORY_IS_UNINITIALIZED(
  551|     37|            elem + new_size, (old_size - new_size) * sizeof(Element));
  552|     37|      }
  553|     58|    }
  554|    103|  }
_ZNK6google8protobuf13RepeatedFieldIiE15unsafe_elementsEb:
  596|     75|  const Element* unsafe_elements(bool is_soo) const {
  597|     75|    return const_cast<RepeatedField*>(this)->unsafe_elements(is_soo);
  598|     75|  }
_ZN6google8protobuf13RepeatedFieldIiE19ExchangeCurrentSizeEbi:
  572|     37|  inline int ExchangeCurrentSize(bool is_soo, int new_size) {
  573|     37|    const int prev_size = size(is_soo);
  574|     37|    AnnotateSize(prev_size, new_size);
  575|     37|    set_size(is_soo, new_size);
  576|     37|    return prev_size;
  577|     37|  }
_ZN6google8protobuf13RepeatedFieldIiE8set_sizeEbi:
  488|     37|  void set_size(bool is_soo, int size) {
  489|     37|    ABSL_DCHECK_LE(size, Capacity(is_soo));
  ------------------
  |  |   78|     37|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   90|     37|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     37|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 37]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     37|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  490|     37|    soo_rep_.set_size(is_soo, size);
  491|     37|  }
_ZNK6google8protobuf13RepeatedFieldIiE8CapacityEv:
  743|     29|inline int RepeatedField<Element>::Capacity() const {
  744|     29|  return Capacity(is_soo());
  745|     29|}
_ZNK6google8protobuf13RepeatedFieldIiE4sizeEv:
  738|    108|inline int RepeatedField<Element>::size() const {
  739|    108|  return size(is_soo());
  740|    108|}
_ZN6google8protobuf13RepeatedFieldIiE7DestroyEPKiS4_:
  518|     46|  static void Destroy(const Element* begin, const Element* end) {
  519|     46|    if (!std::is_trivial<Element>::value) {
  ------------------
  |  Branch (519:9): [Folded, False: 46]
  ------------------
  520|      0|      std::for_each(begin, end, [&](const Element& e) { e.~Element(); });
  521|      0|    }
  522|     46|  }
_ZNK6google8protobuf13RepeatedFieldIiE4dataEv:
 1043|     17|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1044|     17|  return unsafe_elements(is_soo());
 1045|     17|}
_ZNK6google8protobuf13RepeatedFieldINS0_12UnknownFieldEE6is_sooEv:
  476|     19|  bool is_soo() const { return soo_rep_.is_soo(); }
_ZNK6google8protobuf13RepeatedFieldINS0_12UnknownFieldEE4sizeEb:
  477|     19|  int size(bool is_soo) const { return soo_rep_.size(is_soo); }
_ZNK6google8protobuf13RepeatedFieldINS0_12UnknownFieldEE5emptyEv:
  733|     19|inline bool RepeatedField<Element>::empty() const {
  734|     19|  return size() == 0;
  735|     19|}
_ZNK6google8protobuf13RepeatedFieldINS0_12UnknownFieldEE4sizeEv:
  738|     19|inline int RepeatedField<Element>::size() const {
  739|     19|  return size(is_soo());
  740|     19|}
_ZN6google8protobuf13RepeatedFieldIjE3AddEj:
  841|    554|inline void RepeatedField<Element>::Add(Element value) {
  842|    554|  bool is_soo = this->is_soo();
  843|    554|  const int old_size = size(is_soo);
  844|    554|  int capacity = Capacity(is_soo);
  845|    554|  Element* elem = unsafe_elements(is_soo);
  846|    554|  if (ABSL_PREDICT_FALSE(old_size == capacity)) {
  ------------------
  |  |  178|    554|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 94, False: 460]
  |  |  |  Branch (178:49): [Folded, False: 554]
  |  |  |  Branch (178:58): [True: 94, False: 460]
  |  |  ------------------
  ------------------
  847|     94|    Grow(is_soo, old_size, old_size + 1);
  848|     94|    is_soo = false;
  849|     94|    capacity = Capacity(is_soo);
  850|     94|    elem = unsafe_elements(is_soo);
  851|     94|  }
  852|    554|  int new_size = old_size + 1;
  853|    554|  void* p = elem + ExchangeCurrentSize(is_soo, new_size);
  854|    554|  ::new (p) Element(std::move(value));
  855|       |
  856|       |  // The below helps the compiler optimize dense loops.
  857|       |  // Note: we can't call functions in PROTOBUF_ASSUME so use local variables.
  858|    554|  ABSL_ATTRIBUTE_UNUSED const bool final_is_soo = this->is_soo();
  ------------------
  |  |  557|    554|#define ABSL_ATTRIBUTE_UNUSED __attribute__((__unused__))
  ------------------
  859|    554|  PROTOBUF_ASSUME(is_soo == final_is_soo);
  ------------------
  |  |  941|    554|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  ------------------
  860|    554|  ABSL_ATTRIBUTE_UNUSED const int final_size = size(is_soo);
  ------------------
  |  |  557|    554|#define ABSL_ATTRIBUTE_UNUSED __attribute__((__unused__))
  ------------------
  861|    554|  PROTOBUF_ASSUME(new_size == final_size);
  ------------------
  |  |  941|    554|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  ------------------
  862|    554|  ABSL_ATTRIBUTE_UNUSED Element* const final_elements = unsafe_elements(is_soo);
  ------------------
  |  |  557|    554|#define ABSL_ATTRIBUTE_UNUSED __attribute__((__unused__))
  ------------------
  863|    554|  PROTOBUF_ASSUME(elem == final_elements);
  ------------------
  |  |  941|    554|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  ------------------
  864|    554|  ABSL_ATTRIBUTE_UNUSED const int final_capacity = Capacity(is_soo);
  ------------------
  |  |  557|    554|#define ABSL_ATTRIBUTE_UNUSED __attribute__((__unused__))
  ------------------
  865|    554|  PROTOBUF_ASSUME(capacity == final_capacity);
  ------------------
  |  |  941|    554|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  ------------------
  866|    554|}
_ZN6google8protobuf13RepeatedFieldIiE5ClearEv:
  984|     37|inline void RepeatedField<Element>::Clear() {
  985|     37|  const bool is_soo = this->is_soo();
  986|     37|  Element* elem = unsafe_elements(is_soo);
  987|     37|  Destroy(elem, elem + size(is_soo));
  988|     37|  ExchangeCurrentSize(is_soo, 0);
  989|     37|}
_ZNK6google8protobuf13RepeatedFieldIiE3GetEi:
  805|     19|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  806|     19|  ABSL_DCHECK_GE(index, 0);
  ------------------
  |  |   82|     19|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|     19|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     19|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 19]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  807|     19|  ABSL_DCHECK_LT(index, size());
  ------------------
  |  |   80|     19|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|     19|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     19|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 19]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  808|     19|  return elements(is_soo())[index];
  809|     19|}
_ZNK6google8protobuf13RepeatedFieldIiE8elementsEb:
  585|     19|  const Element* elements(bool is_soo) const {
  586|     19|    return const_cast<RepeatedField*>(this)->elements(is_soo);
  587|     19|  }
_ZN6google8protobuf8internal20CalculateReserveSizeIPvLi8EEEiii:
 1142|  7.54k|inline int CalculateReserveSize(int capacity, int new_size) {
 1143|  7.54k|  constexpr int lower_limit =
 1144|  7.54k|      RepeatedFieldLowerClampLimit<T, kHeapRepHeaderSize>();
 1145|  7.54k|  if (new_size < lower_limit) {
  ------------------
  |  Branch (1145:7): [True: 0, False: 7.54k]
  ------------------
 1146|       |    // Clamp to smallest allowed size.
 1147|      0|    return lower_limit;
 1148|      0|  }
 1149|  7.54k|  constexpr int kMaxSizeBeforeClamp =
 1150|  7.54k|      (std::numeric_limits<int>::max() - kHeapRepHeaderSize) / 2;
 1151|  7.54k|  if (PROTOBUF_PREDICT_FALSE(capacity > kMaxSizeBeforeClamp)) {
  ------------------
  |  |  365|  7.54k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 7.54k]
  |  |  |  Branch (365:54): [Folded, False: 7.54k]
  |  |  |  Branch (365:63): [True: 0, False: 7.54k]
  |  |  ------------------
  ------------------
 1152|      0|    return std::numeric_limits<int>::max();
 1153|      0|  }
 1154|  7.54k|  constexpr int kSooCapacityElements = SooCapacityElements(sizeof(T));
 1155|  7.54k|  if (kSooCapacityElements > 0 && kSooCapacityElements < lower_limit) {
  ------------------
  |  Branch (1155:7): [True: 0, Folded]
  |  Branch (1155:35): [Folded, False: 0]
  ------------------
 1156|       |    // In this case, we need to set capacity to 0 here to ensure power-of-two
 1157|       |    // sized allocations.
 1158|      0|    if (capacity < lower_limit) capacity = 0;
  ------------------
  |  Branch (1158:9): [True: 0, False: 0]
  ------------------
 1159|  7.54k|  } else {
 1160|  15.0k|    ABSL_DCHECK(capacity == 0 || capacity >= lower_limit)
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  7.54k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  7.54k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  15.0k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  15.0k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 7.54k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  7.54k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 7.54k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  7.54k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 7.54k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  7.54k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  7.54k|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1161|  15.0k|        << capacity << " " << lower_limit;
 1162|  7.54k|  }
 1163|       |  // We want to double the number of bytes, not the number of elements, to try
 1164|       |  // to stay within power-of-two allocations.
 1165|       |  // The allocation has kHeapRepHeaderSize + sizeof(T) * capacity.
 1166|  7.54k|  int doubled_size = 2 * capacity + kHeapRepHeaderSize / sizeof(T);
 1167|  7.54k|  return std::max(doubled_size, new_size);
 1168|  7.54k|}
_ZN6google8protobuf13RepeatedFieldIiE19StaticValidityCheckEv:
  259|     66|  static constexpr PROTOBUF_ALWAYS_INLINE void StaticValidityCheck() {
  260|     66|    static_assert(
  261|     66|        absl::disjunction<internal::is_supported_integral_type<Element>,
  262|     66|                          internal::is_supported_floating_point_type<Element>,
  263|     66|                          std::is_same<absl::Cord, Element>,
  264|     66|                          std::is_same<UnknownField, Element>,
  265|     66|                          is_proto_enum<Element>>::value,
  266|     66|        "We only support non-string scalars in RepeatedField.");
  267|     66|  }
_ZN6google8protobuf13RepeatedFieldIiEC2EPNS0_5ArenaE:
  648|     37|inline RepeatedField<Element>::RepeatedField(Arena* arena) : soo_rep_(arena) {
  649|     37|  StaticValidityCheck();
  650|     37|  AnnotateSize(kSooCapacityElements, 0);
  651|     37|}
_ZN6google8protobuf13RepeatedFieldIiED2Ev:
  680|     29|RepeatedField<Element>::~RepeatedField() {
  681|     29|  StaticValidityCheck();
  682|     29|  const bool is_soo = this->is_soo();
  683|       |#ifndef NDEBUG
  684|       |  // Try to trigger segfault / asan failure in non-opt builds if arena_
  685|       |  // lifetime has ended before the destructor.
  686|       |  auto arena = GetArena(is_soo);
  687|       |  if (arena) (void)arena->SpaceAllocated();
  688|       |#endif
  689|     29|  const int size = this->size(is_soo);
  690|     29|  if (size > 0) {
  ------------------
  |  Branch (690:7): [True: 9, False: 20]
  ------------------
  691|      9|    Element* elem = unsafe_elements(is_soo);
  692|      9|    Destroy(elem, elem + size);
  693|      9|  }
  694|     29|  UnpoisonBuffer();
  695|     29|  if (!is_soo) InternalDeallocate<true>();
  ------------------
  |  Branch (695:7): [True: 1, False: 28]
  ------------------
  696|     29|}
_ZN6google8protobuf13RepeatedFieldIiE18InternalDeallocateILb1EEEvv:
  610|      1|  void InternalDeallocate() {
  611|      1|    ABSL_DCHECK(!is_soo());
  ------------------
  |  |   47|      1|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      1|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      2|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      1|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      2|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      2|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 1, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      1|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 1]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      1|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 1, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      2|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      2|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  612|      1|    const size_t bytes = Capacity(false) * sizeof(Element) + kHeapRepHeaderSize;
  613|      1|    if (heap_rep()->arena == nullptr) {
  ------------------
  |  Branch (613:9): [True: 1, False: 0]
  ------------------
  614|      1|      internal::SizedDelete(heap_rep(), bytes);
  615|      1|    } else if (!in_destructor) {
  ------------------
  |  Branch (615:16): [Folded, False: 0]
  ------------------
  616|       |      // If we are in the destructor, we might be being destroyed as part of
  617|       |      // the arena teardown. We can't try and return blocks to the arena then.
  618|      0|      heap_rep()->arena->ReturnArrayMemory(heap_rep(), bytes);
  619|      0|    }
  620|      1|  }
_ZN6google8protobuf13RepeatedFieldIiEC2ENS0_8internal18InternalVisibilityEPNS0_5ArenaE:
  295|     37|      : RepeatedField(arena) {}

_ZN6google8protobuf8internal20RepeatedPtrFieldBase14InternalExtendEi:
   36|  7.54k|void** RepeatedPtrFieldBase::InternalExtend(int extend_amount) {
   37|  7.54k|  ABSL_DCHECK(extend_amount > 0);
  ------------------
  |  |   47|  7.54k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  7.54k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  15.0k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  7.54k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  15.0k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  15.0k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 7.54k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  7.54k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 7.54k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  7.54k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 7.54k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  15.0k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  15.0k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   38|  7.54k|  constexpr size_t kPtrSize = sizeof(rep()->elements[0]);
   39|  7.54k|  constexpr size_t kMaxSize = std::numeric_limits<size_t>::max();
   40|  7.54k|  constexpr size_t kMaxCapacity = (kMaxSize - kRepHeaderSize) / kPtrSize;
   41|  7.54k|  const int old_capacity = Capacity();
   42|  7.54k|  Arena* arena = GetArena();
   43|  7.54k|  Rep* new_rep = nullptr;
   44|  7.54k|  {
   45|  7.54k|    int new_capacity = internal::CalculateReserveSize<void*, kRepHeaderSize>(
   46|  7.54k|        old_capacity, old_capacity + extend_amount);
   47|  7.54k|    ABSL_DCHECK_LE(new_capacity, kMaxCapacity)
  ------------------
  |  |   78|      0|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   90|  7.54k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  7.54k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 7.54k]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  7.54k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   48|      0|        << "New capacity is too large to fit into internal representation";
   49|  7.54k|    const size_t new_size = kRepHeaderSize + kPtrSize * new_capacity;
   50|  7.54k|    if (arena == nullptr) {
  ------------------
  |  Branch (50:9): [True: 7.39k, False: 147]
  ------------------
   51|  7.39k|      const internal::SizedPtr alloc = internal::AllocateAtLeast(new_size);
   52|  7.39k|      new_capacity = static_cast<int>((alloc.n - kRepHeaderSize) / kPtrSize);
   53|  7.39k|      new_rep = reinterpret_cast<Rep*>(alloc.p);
   54|  7.39k|    } else {
   55|    147|      auto* alloc = Arena::CreateArray<char>(arena, new_size);
   56|    147|      new_rep = reinterpret_cast<Rep*>(alloc);
   57|    147|    }
   58|  7.54k|    capacity_proxy_ = new_capacity - kSSOCapacity;
   59|  7.54k|  }
   60|       |
   61|  7.54k|  if (using_sso()) {
  ------------------
  |  Branch (61:7): [True: 4.20k, False: 3.34k]
  ------------------
   62|  4.20k|    new_rep->allocated_size = tagged_rep_or_elem_ != nullptr ? 1 : 0;
  ------------------
  |  Branch (62:31): [True: 4.20k, False: 0]
  ------------------
   63|  4.20k|    new_rep->elements[0] = tagged_rep_or_elem_;
   64|  4.20k|  } else {
   65|  3.34k|    Rep* old_rep = rep();
   66|  3.34k|    memcpy(new_rep, old_rep,
   67|  3.34k|           old_rep->allocated_size * kPtrSize + kRepHeaderSize);
   68|  3.34k|    size_t old_size = old_capacity * kPtrSize + kRepHeaderSize;
   69|  3.34k|    if (arena == nullptr) {
  ------------------
  |  Branch (69:9): [True: 3.28k, False: 60]
  ------------------
   70|  3.28k|      internal::SizedDelete(old_rep, old_size);
   71|  3.28k|    } else {
   72|     60|      arena->ReturnArrayMemory(old_rep, old_size);
   73|     60|    }
   74|  3.34k|  }
   75|       |
   76|  7.54k|  tagged_rep_or_elem_ =
   77|  7.54k|      reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(new_rep) + 1);
   78|       |
   79|  7.54k|  return &new_rep->elements[current_size_];
   80|  7.54k|}
_ZN6google8protobuf8internal20RepeatedPtrFieldBase13DestroyProtosEv:
   89|  4.90k|void RepeatedPtrFieldBase::DestroyProtos() {
   90|  4.90k|  PROTOBUF_ALWAYS_INLINE_CALL Destroy<GenericTypeHandler<MessageLite>>();
  ------------------
  |  |  187|  4.90k|#define PROTOBUF_ALWAYS_INLINE_CALL [[clang::always_inline]]
  ------------------
   91|       |
   92|       |  // TODO:  Eliminate this store when invoked from the destructor,
   93|       |  // since it is dead.
   94|  4.90k|  tagged_rep_or_elem_ = nullptr;
   95|  4.90k|}
_ZN6google8protobuf8internal20RepeatedPtrFieldBase9AddStringEv:
  101|  5.91k|void* RepeatedPtrFieldBase::AddString() {
  102|  5.91k|  return AddInternal([](Arena* arena) { return NewStringElement(arena); });
  103|  5.91k|}
_ZN6google8protobuf8internal16NewStringElementEPNS0_5ArenaE:
  231|  5.91k|void* NewStringElement(Arena* arena) {
  232|  5.91k|  return Arena::Create<std::string>(arena);
  233|  5.91k|}
repeated_ptr_field.cc:_ZZN6google8protobuf8internal20RepeatedPtrFieldBase9AddStringEvENK3$_0clEPNS0_5ArenaE:
  102|  5.91k|  return AddInternal([](Arena* arena) { return NewStringElement(arena); });

_ZN6google8protobuf8internal20RepeatedPtrFieldBase15PrepareForParseEv:
  296|      3|  bool PrepareForParse() { return allocated_size() == current_size_; }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase20AddAllocatedForParseEPv:
  301|      3|  void AddAllocatedForParse(void* value) {
  302|      3|    ABSL_DCHECK(PrepareForParse());
  ------------------
  |  |   47|      3|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      3|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      6|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      3|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      6|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      6|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 3, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      3|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 3]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      3|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 3, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      6|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      6|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  303|      3|    if (PROTOBUF_PREDICT_FALSE(SizeAtCapacity())) {
  ------------------
  |  |  365|      3|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 3]
  |  |  |  Branch (365:54): [Folded, False: 3]
  |  |  |  Branch (365:63): [True: 0, False: 3]
  |  |  ------------------
  ------------------
  304|      0|      *InternalExtend(1) = value;
  305|      0|      ++rep()->allocated_size;
  306|      3|    } else {
  307|      3|      if (using_sso()) {
  ------------------
  |  Branch (307:11): [True: 3, False: 0]
  ------------------
  308|      3|        tagged_rep_or_elem_ = value;
  309|      3|      } else {
  310|      0|        rep()->elements[current_size_] = value;
  311|      0|        ++rep()->allocated_size;
  312|      0|      }
  313|      3|    }
  314|      3|    ExchangeCurrentSize(current_size_ + 1);
  315|      3|  }
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase14SizeAtCapacityEv:
  605|  12.9k|  inline bool SizeAtCapacity() const {
  606|       |    // Harden invariant size() <= allocated_size() <= Capacity().
  607|  12.9k|    ABSL_DCHECK_LE(size(), allocated_size());
  ------------------
  |  |   78|  12.9k|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   90|  12.9k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  12.9k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 12.9k]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  12.9k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  608|  12.9k|    ABSL_DCHECK_LE(allocated_size(), Capacity());
  ------------------
  |  |   78|  12.9k|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   90|  12.9k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  12.9k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 12.9k]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  12.9k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  609|       |    // This is equivalent to `current_size_ == Capacity()`.
  610|       |    // Assuming `Capacity()` function is inlined, compiler is likely to optimize
  611|       |    // away "+ kSSOCapacity" and reduce it to "current_size_ > capacity_proxy_"
  612|       |    // which is an instruction less than "current_size_ == capacity_proxy_ + 1".
  613|  12.9k|    return current_size_ >= Capacity();
  614|  12.9k|  }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_15DescriptorProtoEE4sizeEv:
 1340|    536|inline int RepeatedPtrField<Element>::size() const {
 1341|    536|  return RepeatedPtrFieldBase::size();
 1342|    536|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_15DescriptorProtoEE5ClearEv:
 1469|     10|inline void RepeatedPtrField<Element>::Clear() {
 1470|     10|  RepeatedPtrFieldBase::Clear<TypeHandler>();
 1471|     10|}
_ZN6google8protobuf8internal20RepeatedPtrFieldBase5ClearINS1_18GenericTypeHandlerINS0_15DescriptorProtoEEEEEvv:
  265|     10|  void Clear() {
  266|     10|    const int n = current_size_;
  267|     10|    ABSL_DCHECK_GE(n, 0);
  ------------------
  |  |   82|     10|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|     10|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 10]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  268|     10|    if (n > 0) {
  ------------------
  |  Branch (268:9): [True: 0, False: 10]
  ------------------
  269|      0|      using H = CommonHandler<TypeHandler>;
  270|      0|      ClearNonEmpty<H>();
  271|      0|    }
  272|     10|  }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_15DescriptorProtoEE3GetEi:
 1346|    342|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1347|    342|  return RepeatedPtrFieldBase::Get<TypeHandler>(index);
 1348|    342|}
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase3GetINS1_18GenericTypeHandlerINS0_15DescriptorProtoEEEEERKNT_4TypeEi:
  252|    342|  const Value<TypeHandler>& Get(int index) const {
  253|    342|    ABSL_DCHECK_GE(index, 0);
  ------------------
  |  |   82|    342|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|    342|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    342|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 342]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    342|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|    342|    ABSL_DCHECK_LT(index, current_size_);
  ------------------
  |  |   80|    342|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|    342|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    342|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 342]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    342|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  255|    342|    return *cast<TypeHandler>(element_at(index));
  256|    342|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerINS0_15DescriptorProtoEEEEEPKNT_4TypeEPKv:
  665|    342|  static inline const Value<TypeHandler>* cast(const void* element) {
  666|    342|    return reinterpret_cast<const Value<TypeHandler>*>(element);
  667|    342|  }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_19EnumDescriptorProtoEE4sizeEv:
 1340|    453|inline int RepeatedPtrField<Element>::size() const {
 1341|    453|  return RepeatedPtrFieldBase::size();
 1342|    453|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_19EnumDescriptorProtoEE5ClearEv:
 1469|     10|inline void RepeatedPtrField<Element>::Clear() {
 1470|     10|  RepeatedPtrFieldBase::Clear<TypeHandler>();
 1471|     10|}
_ZN6google8protobuf8internal20RepeatedPtrFieldBase5ClearINS1_18GenericTypeHandlerINS0_19EnumDescriptorProtoEEEEEvv:
  265|     10|  void Clear() {
  266|     10|    const int n = current_size_;
  267|     10|    ABSL_DCHECK_GE(n, 0);
  ------------------
  |  |   82|     10|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|     10|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 10]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  268|     10|    if (n > 0) {
  ------------------
  |  Branch (268:9): [True: 0, False: 10]
  ------------------
  269|      0|      using H = CommonHandler<TypeHandler>;
  270|      0|      ClearNonEmpty<H>();
  271|      0|    }
  272|     10|  }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_19EnumDescriptorProtoEE3GetEi:
 1346|    150|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1347|    150|  return RepeatedPtrFieldBase::Get<TypeHandler>(index);
 1348|    150|}
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase3GetINS1_18GenericTypeHandlerINS0_19EnumDescriptorProtoEEEEERKNT_4TypeEi:
  252|    150|  const Value<TypeHandler>& Get(int index) const {
  253|    150|    ABSL_DCHECK_GE(index, 0);
  ------------------
  |  |   82|    150|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|    150|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    150|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 150]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    150|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|    150|    ABSL_DCHECK_LT(index, current_size_);
  ------------------
  |  |   80|    150|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|    150|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    150|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 150]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    150|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  255|    150|    return *cast<TypeHandler>(element_at(index));
  256|    150|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerINS0_19EnumDescriptorProtoEEEEEPKNT_4TypeEPKv:
  665|    150|  static inline const Value<TypeHandler>* cast(const void* element) {
  666|    150|    return reinterpret_cast<const Value<TypeHandler>*>(element);
  667|    150|  }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_22ServiceDescriptorProtoEE4sizeEv:
 1340|     40|inline int RepeatedPtrField<Element>::size() const {
 1341|     40|  return RepeatedPtrFieldBase::size();
 1342|     40|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_22ServiceDescriptorProtoEE5ClearEv:
 1469|     10|inline void RepeatedPtrField<Element>::Clear() {
 1470|     10|  RepeatedPtrFieldBase::Clear<TypeHandler>();
 1471|     10|}
_ZN6google8protobuf8internal20RepeatedPtrFieldBase5ClearINS1_18GenericTypeHandlerINS0_22ServiceDescriptorProtoEEEEEvv:
  265|     10|  void Clear() {
  266|     10|    const int n = current_size_;
  267|     10|    ABSL_DCHECK_GE(n, 0);
  ------------------
  |  |   82|     10|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|     10|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 10]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  268|     10|    if (n > 0) {
  ------------------
  |  Branch (268:9): [True: 0, False: 10]
  ------------------
  269|      0|      using H = CommonHandler<TypeHandler>;
  270|      0|      ClearNonEmpty<H>();
  271|      0|    }
  272|     10|  }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_20FieldDescriptorProtoEE4sizeEv:
 1340|  1.18k|inline int RepeatedPtrField<Element>::size() const {
 1341|  1.18k|  return RepeatedPtrFieldBase::size();
 1342|  1.18k|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_20FieldDescriptorProtoEE5ClearEv:
 1469|     10|inline void RepeatedPtrField<Element>::Clear() {
 1470|     10|  RepeatedPtrFieldBase::Clear<TypeHandler>();
 1471|     10|}
_ZN6google8protobuf8internal20RepeatedPtrFieldBase5ClearINS1_18GenericTypeHandlerINS0_20FieldDescriptorProtoEEEEEvv:
  265|     10|  void Clear() {
  266|     10|    const int n = current_size_;
  267|     10|    ABSL_DCHECK_GE(n, 0);
  ------------------
  |  |   82|     10|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|     10|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 10]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  268|     10|    if (n > 0) {
  ------------------
  |  Branch (268:9): [True: 0, False: 10]
  ------------------
  269|      0|      using H = CommonHandler<TypeHandler>;
  270|      0|      ClearNonEmpty<H>();
  271|      0|    }
  272|     10|  }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_20FieldDescriptorProtoEE3GetEi:
 1346|  1.85k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1347|  1.85k|  return RepeatedPtrFieldBase::Get<TypeHandler>(index);
 1348|  1.85k|}
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase3GetINS1_18GenericTypeHandlerINS0_20FieldDescriptorProtoEEEEERKNT_4TypeEi:
  252|  1.85k|  const Value<TypeHandler>& Get(int index) const {
  253|  1.85k|    ABSL_DCHECK_GE(index, 0);
  ------------------
  |  |   82|  1.85k|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|  1.85k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  1.85k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 1.85k]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  1.85k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|  1.85k|    ABSL_DCHECK_LT(index, current_size_);
  ------------------
  |  |   80|  1.85k|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|  1.85k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  1.85k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 1.85k]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  1.85k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  255|  1.85k|    return *cast<TypeHandler>(element_at(index));
  256|  1.85k|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerINS0_20FieldDescriptorProtoEEEEEPKNT_4TypeEPKv:
  665|  1.85k|  static inline const Value<TypeHandler>* cast(const void* element) {
  666|  1.85k|    return reinterpret_cast<const Value<TypeHandler>*>(element);
  667|  1.85k|  }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_30DescriptorProto_ExtensionRangeEE4sizeEv:
 1340|    356|inline int RepeatedPtrField<Element>::size() const {
 1341|    356|  return RepeatedPtrFieldBase::size();
 1342|    356|}
_ZNK6google8protobuf16RepeatedPtrFieldINS0_30DescriptorProto_ExtensionRangeEE3GetEi:
 1346|     84|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1347|     84|  return RepeatedPtrFieldBase::Get<TypeHandler>(index);
 1348|     84|}
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase3GetINS1_18GenericTypeHandlerINS0_30DescriptorProto_ExtensionRangeEEEEERKNT_4TypeEi:
  252|     84|  const Value<TypeHandler>& Get(int index) const {
  253|     84|    ABSL_DCHECK_GE(index, 0);
  ------------------
  |  |   82|     84|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|     84|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     84|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 84]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     84|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|     84|    ABSL_DCHECK_LT(index, current_size_);
  ------------------
  |  |   80|     84|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|     84|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     84|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 84]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     84|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  255|     84|    return *cast<TypeHandler>(element_at(index));
  256|     84|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerINS0_30DescriptorProto_ExtensionRangeEEEEEPKNT_4TypeEPKv:
  665|     84|  static inline const Value<TypeHandler>* cast(const void* element) {
  666|     84|    return reinterpret_cast<const Value<TypeHandler>*>(element);
  667|     84|  }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_20OneofDescriptorProtoEE4sizeEv:
 1340|    391|inline int RepeatedPtrField<Element>::size() const {
 1341|    391|  return RepeatedPtrFieldBase::size();
 1342|    391|}
_ZNK6google8protobuf16RepeatedPtrFieldINS0_20OneofDescriptorProtoEE3GetEi:
 1346|     14|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1347|     14|  return RepeatedPtrFieldBase::Get<TypeHandler>(index);
 1348|     14|}
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase3GetINS1_18GenericTypeHandlerINS0_20OneofDescriptorProtoEEEEERKNT_4TypeEi:
  252|     14|  const Value<TypeHandler>& Get(int index) const {
  253|     14|    ABSL_DCHECK_GE(index, 0);
  ------------------
  |  |   82|     14|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|     14|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     14|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 14]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|     14|    ABSL_DCHECK_LT(index, current_size_);
  ------------------
  |  |   80|     14|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|     14|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     14|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 14]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  255|     14|    return *cast<TypeHandler>(element_at(index));
  256|     14|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerINS0_20OneofDescriptorProtoEEEEEPKNT_4TypeEPKv:
  665|     14|  static inline const Value<TypeHandler>* cast(const void* element) {
  666|     14|    return reinterpret_cast<const Value<TypeHandler>*>(element);
  667|     14|  }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_29DescriptorProto_ReservedRangeEE4sizeEv:
 1340|    290|inline int RepeatedPtrField<Element>::size() const {
 1341|    290|  return RepeatedPtrFieldBase::size();
 1342|    290|}
_ZNK6google8protobuf16RepeatedPtrFieldINS0_29DescriptorProto_ReservedRangeEE3GetEi:
 1346|     41|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1347|     41|  return RepeatedPtrFieldBase::Get<TypeHandler>(index);
 1348|     41|}
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase3GetINS1_18GenericTypeHandlerINS0_29DescriptorProto_ReservedRangeEEEEERKNT_4TypeEi:
  252|     41|  const Value<TypeHandler>& Get(int index) const {
  253|     41|    ABSL_DCHECK_GE(index, 0);
  ------------------
  |  |   82|     41|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|     41|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     41|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 41]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     41|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|     41|    ABSL_DCHECK_LT(index, current_size_);
  ------------------
  |  |   80|     41|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|     41|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     41|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 41]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     41|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  255|     41|    return *cast<TypeHandler>(element_at(index));
  256|     41|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerINS0_29DescriptorProto_ReservedRangeEEEEEPKNT_4TypeEPKv:
  665|     41|  static inline const Value<TypeHandler>* cast(const void* element) {
  666|     41|    return reinterpret_cast<const Value<TypeHandler>*>(element);
  667|     41|  }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEE4sizeEv:
 1340|    153|inline int RepeatedPtrField<Element>::size() const {
 1341|    153|  return RepeatedPtrFieldBase::size();
 1342|    153|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEE5ClearEv:
 1469|     19|inline void RepeatedPtrField<Element>::Clear() {
 1470|     19|  RepeatedPtrFieldBase::Clear<TypeHandler>();
 1471|     19|}
_ZN6google8protobuf8internal20RepeatedPtrFieldBase5ClearINS1_18GenericTypeHandlerINS0_19UninterpretedOptionEEEEEvv:
  265|     19|  void Clear() {
  266|     19|    const int n = current_size_;
  267|     19|    ABSL_DCHECK_GE(n, 0);
  ------------------
  |  |   82|     19|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|     19|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     19|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 19]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  268|     19|    if (n > 0) {
  ------------------
  |  Branch (268:9): [True: 0, False: 19]
  ------------------
  269|      0|      using H = CommonHandler<TypeHandler>;
  270|      0|      ClearNonEmpty<H>();
  271|      0|    }
  272|     19|  }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_24EnumValueDescriptorProtoEE4sizeEv:
 1340|    531|inline int RepeatedPtrField<Element>::size() const {
 1341|    531|  return RepeatedPtrFieldBase::size();
 1342|    531|}
_ZNK6google8protobuf16RepeatedPtrFieldINS0_24EnumValueDescriptorProtoEE3GetEi:
 1346|  1.44k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1347|  1.44k|  return RepeatedPtrFieldBase::Get<TypeHandler>(index);
 1348|  1.44k|}
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase3GetINS1_18GenericTypeHandlerINS0_24EnumValueDescriptorProtoEEEEERKNT_4TypeEi:
  252|  1.44k|  const Value<TypeHandler>& Get(int index) const {
  253|  1.44k|    ABSL_DCHECK_GE(index, 0);
  ------------------
  |  |   82|  1.44k|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|  1.44k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  1.44k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 1.44k]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  1.44k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|  1.44k|    ABSL_DCHECK_LT(index, current_size_);
  ------------------
  |  |   80|  1.44k|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|  1.44k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  1.44k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 1.44k]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  1.44k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  255|  1.44k|    return *cast<TypeHandler>(element_at(index));
  256|  1.44k|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerINS0_24EnumValueDescriptorProtoEEEEEPKNT_4TypeEPKv:
  665|  1.44k|  static inline const Value<TypeHandler>* cast(const void* element) {
  666|  1.44k|    return reinterpret_cast<const Value<TypeHandler>*>(element);
  667|  1.44k|  }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_37EnumDescriptorProto_EnumReservedRangeEE4sizeEv:
 1340|    123|inline int RepeatedPtrField<Element>::size() const {
 1341|    123|  return RepeatedPtrFieldBase::size();
 1342|    123|}
_ZNK6google8protobuf16RepeatedPtrFieldINS0_37EnumDescriptorProto_EnumReservedRangeEE3GetEi:
 1346|      2|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1347|      2|  return RepeatedPtrFieldBase::Get<TypeHandler>(index);
 1348|      2|}
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase3GetINS1_18GenericTypeHandlerINS0_37EnumDescriptorProto_EnumReservedRangeEEEEERKNT_4TypeEi:
  252|      2|  const Value<TypeHandler>& Get(int index) const {
  253|      2|    ABSL_DCHECK_GE(index, 0);
  ------------------
  |  |   82|      2|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|      2|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 2]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|      2|    ABSL_DCHECK_LT(index, current_size_);
  ------------------
  |  |   80|      2|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|      2|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 2]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  255|      2|    return *cast<TypeHandler>(element_at(index));
  256|      2|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerINS0_37EnumDescriptorProto_EnumReservedRangeEEEEEPKNT_4TypeEPKv:
  665|      2|  static inline const Value<TypeHandler>* cast(const void* element) {
  666|      2|    return reinterpret_cast<const Value<TypeHandler>*>(element);
  667|      2|  }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_27FieldOptions_EditionDefaultEE4sizeEv:
 1340|     51|inline int RepeatedPtrField<Element>::size() const {
 1341|     51|  return RepeatedPtrFieldBase::size();
 1342|     51|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_27FieldOptions_EditionDefaultEE5ClearEv:
 1469|     17|inline void RepeatedPtrField<Element>::Clear() {
 1470|     17|  RepeatedPtrFieldBase::Clear<TypeHandler>();
 1471|     17|}
_ZN6google8protobuf8internal20RepeatedPtrFieldBase5ClearINS1_18GenericTypeHandlerINS0_27FieldOptions_EditionDefaultEEEEEvv:
  265|     17|  void Clear() {
  266|     17|    const int n = current_size_;
  267|     17|    ABSL_DCHECK_GE(n, 0);
  ------------------
  |  |   82|     17|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|     17|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     17|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 17]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  268|     17|    if (n > 0) {
  ------------------
  |  Branch (268:9): [True: 0, False: 17]
  ------------------
  269|      0|      using H = CommonHandler<TypeHandler>;
  270|      0|      ClearNonEmpty<H>();
  271|      0|    }
  272|     17|  }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_27FieldOptions_EditionDefaultEE3GetEi:
 1346|     18|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1347|     18|  return RepeatedPtrFieldBase::Get<TypeHandler>(index);
 1348|     18|}
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase3GetINS1_18GenericTypeHandlerINS0_27FieldOptions_EditionDefaultEEEEERKNT_4TypeEi:
  252|     18|  const Value<TypeHandler>& Get(int index) const {
  253|     18|    ABSL_DCHECK_GE(index, 0);
  ------------------
  |  |   82|     18|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|     18|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     18|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 18]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|     18|    ABSL_DCHECK_LT(index, current_size_);
  ------------------
  |  |   80|     18|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|     18|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     18|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 18]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  255|     18|    return *cast<TypeHandler>(element_at(index));
  256|     18|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerINS0_27FieldOptions_EditionDefaultEEEEEPKNT_4TypeEPKv:
  665|     18|  static inline const Value<TypeHandler>* cast(const void* element) {
  666|     18|    return reinterpret_cast<const Value<TypeHandler>*>(element);
  667|     18|  }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_43FeatureSetDefaults_FeatureSetEditionDefaultEE4sizeEv:
 1340|      9|inline int RepeatedPtrField<Element>::size() const {
 1341|      9|  return RepeatedPtrFieldBase::size();
 1342|      9|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_43FeatureSetDefaults_FeatureSetEditionDefaultEE5ClearEv:
 1469|      1|inline void RepeatedPtrField<Element>::Clear() {
 1470|      1|  RepeatedPtrFieldBase::Clear<TypeHandler>();
 1471|      1|}
_ZN6google8protobuf8internal20RepeatedPtrFieldBase5ClearINS1_18GenericTypeHandlerINS0_43FeatureSetDefaults_FeatureSetEditionDefaultEEEEEvv:
  265|      1|  void Clear() {
  266|      1|    const int n = current_size_;
  267|      1|    ABSL_DCHECK_GE(n, 0);
  ------------------
  |  |   82|      1|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|      1|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 1]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      1|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  268|      1|    if (n > 0) {
  ------------------
  |  Branch (268:9): [True: 0, False: 1]
  ------------------
  269|      0|      using H = CommonHandler<TypeHandler>;
  270|      0|      ClearNonEmpty<H>();
  271|      0|    }
  272|      1|  }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_43FeatureSetDefaults_FeatureSetEditionDefaultEE3GetEi:
 1346|      4|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1347|      4|  return RepeatedPtrFieldBase::Get<TypeHandler>(index);
 1348|      4|}
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase3GetINS1_18GenericTypeHandlerINS0_43FeatureSetDefaults_FeatureSetEditionDefaultEEEEERKNT_4TypeEi:
  252|      4|  const Value<TypeHandler>& Get(int index) const {
  253|      4|    ABSL_DCHECK_GE(index, 0);
  ------------------
  |  |   82|      4|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|      4|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 4]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|      4|    ABSL_DCHECK_LT(index, current_size_);
  ------------------
  |  |   80|      4|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|      4|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 4]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  255|      4|    return *cast<TypeHandler>(element_at(index));
  256|      4|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerINS0_43FeatureSetDefaults_FeatureSetEditionDefaultEEEEEPKNT_4TypeEPKv:
  665|      4|  static inline const Value<TypeHandler>* cast(const void* element) {
  666|      4|    return reinterpret_cast<const Value<TypeHandler>*>(element);
  667|      4|  }
_ZN6google8protobuf16RepeatedPtrFieldINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEE20AddAllocatedForParseEPS8_:
 1248|      3|  void AddAllocatedForParse(Element* p) {
 1249|      3|    return RepeatedPtrFieldBase::AddAllocatedForParse(p);
 1250|      3|  }
generated_message_tctable_lite.cc:_ZN6google8protobuf8internal20RepeatedPtrFieldBase11AddInternalIZNS1_8TcParser10AddMessageEPKNS1_16TcParseTableBaseERS2_E3$_0EEPvT_:
  779|  18.5k|void* RepeatedPtrFieldBase::AddInternal(Factory factory) {
  780|  18.5k|  Arena* const arena = GetArena();
  781|  18.5k|  if (tagged_rep_or_elem_ == nullptr) {
  ------------------
  |  Branch (781:7): [True: 5.03k, False: 13.5k]
  ------------------
  782|  5.03k|    ExchangeCurrentSize(1);
  783|  5.03k|    tagged_rep_or_elem_ = factory(arena);
  784|  5.03k|    return tagged_rep_or_elem_;
  785|  5.03k|  }
  786|  13.5k|  absl::PrefetchToLocalCache(tagged_rep_or_elem_);
  787|  13.5k|  if (using_sso()) {
  ------------------
  |  Branch (787:7): [True: 3.11k, False: 10.4k]
  ------------------
  788|  3.11k|    if (current_size_ == 0) {
  ------------------
  |  Branch (788:9): [True: 0, False: 3.11k]
  ------------------
  789|      0|      ExchangeCurrentSize(1);
  790|      0|      return tagged_rep_or_elem_;
  791|      0|    }
  792|  3.11k|    void*& result = *InternalExtend(1);
  793|  3.11k|    result = factory(arena);
  794|  3.11k|    Rep* r = rep();
  795|  3.11k|    r->allocated_size = 2;
  796|  3.11k|    ExchangeCurrentSize(2);
  797|  3.11k|    return result;
  798|  3.11k|  }
  799|  10.4k|  Rep* r = rep();
  800|  10.4k|  if (PROTOBUF_PREDICT_FALSE(SizeAtCapacity())) {
  ------------------
  |  |  365|  10.4k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 2.62k, False: 7.81k]
  |  |  |  Branch (365:54): [Folded, False: 10.4k]
  |  |  |  Branch (365:63): [True: 2.62k, False: 7.81k]
  |  |  ------------------
  ------------------
  801|  2.62k|    InternalExtend(1);
  802|  2.62k|    r = rep();
  803|  7.81k|  } else {
  804|  7.81k|    if (current_size_ != r->allocated_size) {
  ------------------
  |  Branch (804:9): [True: 0, False: 7.81k]
  ------------------
  805|      0|      return r->elements[ExchangeCurrentSize(current_size_ + 1)];
  806|      0|    }
  807|  7.81k|  }
  808|  10.4k|  ++r->allocated_size;
  809|  10.4k|  void*& result = r->elements[ExchangeCurrentSize(current_size_ + 1)];
  810|  10.4k|  result = factory(arena);
  811|  10.4k|  return result;
  812|  10.4k|}
_ZN6google8protobuf8internal20RepeatedPtrFieldBase7DestroyINS1_18GenericTypeHandlerINS0_11MessageLiteEEEEEvv:
  220|  4.90k|  void Destroy() {
  221|  4.90k|    ABSL_DCHECK(NeedsDestroy());
  ------------------
  |  |   47|  4.90k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  4.90k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  9.80k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  4.90k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  9.80k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  9.80k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 4.90k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  4.90k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 4.90k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  4.90k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 4.90k, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  9.80k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  9.80k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  222|       |
  223|       |    // TODO: arena check is redundant once all `RepeatedPtrField`s
  224|       |    // with non-null arena are owned by the arena.
  225|  4.90k|    if (PROTOBUF_PREDICT_FALSE(arena_ != nullptr)) return;
  ------------------
  |  |  365|  4.90k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 4.90k]
  |  |  |  Branch (365:54): [Folded, False: 4.90k]
  |  |  |  Branch (365:63): [True: 0, False: 4.90k]
  |  |  ------------------
  ------------------
  226|       |
  227|  4.90k|    using H = CommonHandler<TypeHandler>;
  228|  4.90k|    int n = allocated_size();
  229|  4.90k|    void** elems = elements();
  230|  22.9k|    for (int i = 0; i < n; i++) {
  ------------------
  |  Branch (230:21): [True: 18.0k, False: 4.90k]
  ------------------
  231|  18.0k|      Delete<H>(elems[i], nullptr);
  232|  18.0k|    }
  233|  4.90k|    if (!using_sso()) {
  ------------------
  |  Branch (233:9): [True: 3.01k, False: 1.88k]
  ------------------
  234|  3.01k|      internal::SizedDelete(rep(),
  235|  3.01k|                            Capacity() * sizeof(elems[0]) + kRepHeaderSize);
  236|  3.01k|    }
  237|  4.90k|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase6DeleteINS1_18GenericTypeHandlerINS0_11MessageLiteEEEEEvPvPNS0_5ArenaE:
  669|  18.0k|  static inline void Delete(void* obj, Arena* arena) {
  670|  18.0k|    TypeHandler::Delete(cast<TypeHandler>(obj), arena);
  671|  18.0k|  }
repeated_ptr_field.cc:_ZN6google8protobuf8internal20RepeatedPtrFieldBase11AddInternalIZNS2_9AddStringEvE3$_0EEPvT_:
  779|  5.91k|void* RepeatedPtrFieldBase::AddInternal(Factory factory) {
  780|  5.91k|  Arena* const arena = GetArena();
  781|  5.91k|  if (tagged_rep_or_elem_ == nullptr) {
  ------------------
  |  Branch (781:7): [True: 2.32k, False: 3.58k]
  ------------------
  782|  2.32k|    ExchangeCurrentSize(1);
  783|  2.32k|    tagged_rep_or_elem_ = factory(arena);
  784|  2.32k|    return tagged_rep_or_elem_;
  785|  2.32k|  }
  786|  3.58k|  absl::PrefetchToLocalCache(tagged_rep_or_elem_);
  787|  3.58k|  if (using_sso()) {
  ------------------
  |  Branch (787:7): [True: 1.09k, False: 2.49k]
  ------------------
  788|  1.09k|    if (current_size_ == 0) {
  ------------------
  |  Branch (788:9): [True: 0, False: 1.09k]
  ------------------
  789|      0|      ExchangeCurrentSize(1);
  790|      0|      return tagged_rep_or_elem_;
  791|      0|    }
  792|  1.09k|    void*& result = *InternalExtend(1);
  793|  1.09k|    result = factory(arena);
  794|  1.09k|    Rep* r = rep();
  795|  1.09k|    r->allocated_size = 2;
  796|  1.09k|    ExchangeCurrentSize(2);
  797|  1.09k|    return result;
  798|  1.09k|  }
  799|  2.49k|  Rep* r = rep();
  800|  2.49k|  if (PROTOBUF_PREDICT_FALSE(SizeAtCapacity())) {
  ------------------
  |  |  365|  2.49k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 714, False: 1.78k]
  |  |  |  Branch (365:54): [Folded, False: 2.49k]
  |  |  |  Branch (365:63): [True: 714, False: 1.78k]
  |  |  ------------------
  ------------------
  801|    714|    InternalExtend(1);
  802|    714|    r = rep();
  803|  1.78k|  } else {
  804|  1.78k|    if (current_size_ != r->allocated_size) {
  ------------------
  |  Branch (804:9): [True: 0, False: 1.78k]
  ------------------
  805|      0|      return r->elements[ExchangeCurrentSize(current_size_ + 1)];
  806|      0|    }
  807|  1.78k|  }
  808|  2.49k|  ++r->allocated_size;
  809|  2.49k|  void*& result = r->elements[ExchangeCurrentSize(current_size_ + 1)];
  810|  2.49k|  result = factory(arena);
  811|  2.49k|  return result;
  812|  2.49k|}
_ZNK6google8protobuf16RepeatedPtrFieldINS0_22ServiceDescriptorProtoEE5beginEv:
 1836|     10|RepeatedPtrField<Element>::begin() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1837|     10|  return iterator(raw_data());
 1838|     10|}
_ZN6google8protobuf8internal19RepeatedPtrIteratorINS0_22ServiceDescriptorProtoEEC2EPKPv:
 1617|     20|  explicit RepeatedPtrIterator(void* const* it) : it_(it) {}
_ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_22ServiceDescriptorProtoEEC2IS3_TnPNSt3__19enable_ifIXsr3std14is_convertibleIPT_PS4_EE5valueEvE4typeELPv0EEERKNS2_IS9_EE:
 1625|     20|      : it_(other.it_) {}
_ZNK6google8protobuf16RepeatedPtrFieldINS0_22ServiceDescriptorProtoEE3endEv:
 1851|     10|RepeatedPtrField<Element>::end() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1852|     10|  return iterator(raw_data() + size());
 1853|     10|}
_ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIKNS0_22ServiceDescriptorProtoEEES7_:
 1647|     10|  friend bool operator!=(const iterator& x, const iterator& y) {
 1648|     10|    return x.it_ != y.it_;
 1649|     10|  }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_15DescriptorProtoEE5beginEv:
 1836|    117|RepeatedPtrField<Element>::begin() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1837|    117|  return iterator(raw_data());
 1838|    117|}
_ZN6google8protobuf8internal19RepeatedPtrIteratorINS0_15DescriptorProtoEEC2EPKPv:
 1617|    234|  explicit RepeatedPtrIterator(void* const* it) : it_(it) {}
_ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_15DescriptorProtoEEC2IS3_TnPNSt3__19enable_ifIXsr3std14is_convertibleIPT_PS4_EE5valueEvE4typeELPv0EEERKNS2_IS9_EE:
 1625|    234|      : it_(other.it_) {}
_ZNK6google8protobuf16RepeatedPtrFieldINS0_15DescriptorProtoEE3endEv:
 1851|    117|RepeatedPtrField<Element>::end() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1852|    117|  return iterator(raw_data() + size());
 1853|    117|}
_ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIKNS0_15DescriptorProtoEEES7_:
 1647|    224|  friend bool operator!=(const iterator& x, const iterator& y) {
 1648|    224|    return x.it_ != y.it_;
 1649|    224|  }
_ZNK6google8protobuf8internal19RepeatedPtrIteratorIKNS0_15DescriptorProtoEEdeEv:
 1628|    107|  reference operator*() const { return *reinterpret_cast<Element*>(*it_); }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_30DescriptorProto_ExtensionRangeEE5beginEv:
 1836|     47|RepeatedPtrField<Element>::begin() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1837|     47|  return iterator(raw_data());
 1838|     47|}
_ZN6google8protobuf8internal19RepeatedPtrIteratorINS0_30DescriptorProto_ExtensionRangeEEC2EPKPv:
 1617|     94|  explicit RepeatedPtrIterator(void* const* it) : it_(it) {}
_ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_30DescriptorProto_ExtensionRangeEEC2IS3_TnPNSt3__19enable_ifIXsr3std14is_convertibleIPT_PS4_EE5valueEvE4typeELPv0EEERKNS2_IS9_EE:
 1625|     94|      : it_(other.it_) {}
_ZNK6google8protobuf16RepeatedPtrFieldINS0_30DescriptorProto_ExtensionRangeEE3endEv:
 1851|     47|RepeatedPtrField<Element>::end() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1852|     47|  return iterator(raw_data() + size());
 1853|     47|}
_ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIKNS0_30DescriptorProto_ExtensionRangeEEES7_:
 1647|     61|  friend bool operator!=(const iterator& x, const iterator& y) {
 1648|     61|    return x.it_ != y.it_;
 1649|     61|  }
_ZNK6google8protobuf8internal19RepeatedPtrIteratorIKNS0_30DescriptorProto_ExtensionRangeEEdeEv:
 1628|     14|  reference operator*() const { return *reinterpret_cast<Element*>(*it_); }
_ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_30DescriptorProto_ExtensionRangeEEppEv:
 1632|     14|  iterator& operator++() {
 1633|     14|    ++it_;
 1634|     14|    return *this;
 1635|     14|  }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_20OneofDescriptorProtoEE5beginEv:
 1836|     47|RepeatedPtrField<Element>::begin() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1837|     47|  return iterator(raw_data());
 1838|     47|}
_ZN6google8protobuf8internal19RepeatedPtrIteratorINS0_20OneofDescriptorProtoEEC2EPKPv:
 1617|     94|  explicit RepeatedPtrIterator(void* const* it) : it_(it) {}
_ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_20OneofDescriptorProtoEEC2IS3_TnPNSt3__19enable_ifIXsr3std14is_convertibleIPT_PS4_EE5valueEvE4typeELPv0EEERKNS2_IS9_EE:
 1625|     94|      : it_(other.it_) {}
_ZNK6google8protobuf16RepeatedPtrFieldINS0_20OneofDescriptorProtoEE3endEv:
 1851|     47|RepeatedPtrField<Element>::end() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1852|     47|  return iterator(raw_data() + size());
 1853|     47|}
_ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIKNS0_20OneofDescriptorProtoEEES7_:
 1647|     49|  friend bool operator!=(const iterator& x, const iterator& y) {
 1648|     49|    return x.it_ != y.it_;
 1649|     49|  }
_ZNK6google8protobuf8internal19RepeatedPtrIteratorIKNS0_20OneofDescriptorProtoEEdeEv:
 1628|      2|  reference operator*() const { return *reinterpret_cast<Element*>(*it_); }
_ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_20OneofDescriptorProtoEEppEv:
 1632|      2|  iterator& operator++() {
 1633|      2|    ++it_;
 1634|      2|    return *this;
 1635|      2|  }
_ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_15DescriptorProtoEEppEv:
 1632|    107|  iterator& operator++() {
 1633|    107|    ++it_;
 1634|    107|    return *this;
 1635|    107|  }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_19EnumDescriptorProtoEE5beginEv:
 1836|     57|RepeatedPtrField<Element>::begin() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1837|     57|  return iterator(raw_data());
 1838|     57|}
_ZN6google8protobuf8internal19RepeatedPtrIteratorINS0_19EnumDescriptorProtoEEC2EPKPv:
 1617|    114|  explicit RepeatedPtrIterator(void* const* it) : it_(it) {}
_ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_19EnumDescriptorProtoEEC2IS3_TnPNSt3__19enable_ifIXsr3std14is_convertibleIPT_PS4_EE5valueEvE4typeELPv0EEERKNS2_IS9_EE:
 1625|    114|      : it_(other.it_) {}
_ZNK6google8protobuf16RepeatedPtrFieldINS0_19EnumDescriptorProtoEE3endEv:
 1851|     57|RepeatedPtrField<Element>::end() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1852|     57|  return iterator(raw_data() + size());
 1853|     57|}
_ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIKNS0_19EnumDescriptorProtoEEES7_:
 1647|     94|  friend bool operator!=(const iterator& x, const iterator& y) {
 1648|     94|    return x.it_ != y.it_;
 1649|     94|  }
_ZNK6google8protobuf8internal19RepeatedPtrIteratorIKNS0_19EnumDescriptorProtoEEdeEv:
 1628|     37|  reference operator*() const { return *reinterpret_cast<Element*>(*it_); }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_24EnumValueDescriptorProtoEE5beginEv:
 1836|     24|RepeatedPtrField<Element>::begin() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1837|     24|  return iterator(raw_data());
 1838|     24|}
_ZN6google8protobuf8internal19RepeatedPtrIteratorINS0_24EnumValueDescriptorProtoEEC2EPKPv:
 1617|     48|  explicit RepeatedPtrIterator(void* const* it) : it_(it) {}
_ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_24EnumValueDescriptorProtoEEC2IS3_TnPNSt3__19enable_ifIXsr3std14is_convertibleIPT_PS4_EE5valueEvE4typeELPv0EEERKNS2_IS9_EE:
 1625|     48|      : it_(other.it_) {}
_ZNK6google8protobuf16RepeatedPtrFieldINS0_24EnumValueDescriptorProtoEE3endEv:
 1851|     24|RepeatedPtrField<Element>::end() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1852|     24|  return iterator(raw_data() + size());
 1853|     24|}
_ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIKNS0_24EnumValueDescriptorProtoEEES7_:
 1647|    214|  friend bool operator!=(const iterator& x, const iterator& y) {
 1648|    214|    return x.it_ != y.it_;
 1649|    214|  }
_ZNK6google8protobuf8internal19RepeatedPtrIteratorIKNS0_24EnumValueDescriptorProtoEEdeEv:
 1628|    190|  reference operator*() const { return *reinterpret_cast<Element*>(*it_); }
_ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_24EnumValueDescriptorProtoEEppEv:
 1632|    190|  iterator& operator++() {
 1633|    190|    ++it_;
 1634|    190|    return *this;
 1635|    190|  }
_ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_19EnumDescriptorProtoEEppEv:
 1632|     37|  iterator& operator++() {
 1633|     37|    ++it_;
 1634|     37|    return *this;
 1635|     37|  }
_ZNK6google8protobuf16RepeatedPtrFieldINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEE5beginEv:
 1836|     71|RepeatedPtrField<Element>::begin() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1837|     71|  return iterator(raw_data());
 1838|     71|}
_ZN6google8protobuf8internal19RepeatedPtrIteratorIKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEC2IS9_TnPNS3_9enable_ifIXsr3std14is_convertibleIPT_PSA_EE5valueEvE4typeELPv0EEERKNS2_ISE_EE:
 1625|    142|      : it_(other.it_) {}
_ZNK6google8protobuf16RepeatedPtrFieldINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEE3endEv:
 1851|     71|RepeatedPtrField<Element>::end() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1852|     71|  return iterator(raw_data() + size());
 1853|     71|}
_ZNK6google8protobuf16RepeatedPtrFieldINS0_43FeatureSetDefaults_FeatureSetEditionDefaultEE5beginEv:
 1836|     12|RepeatedPtrField<Element>::begin() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1837|     12|  return iterator(raw_data());
 1838|     12|}
_ZN6google8protobuf8internal19RepeatedPtrIteratorINS0_43FeatureSetDefaults_FeatureSetEditionDefaultEEC2EPKPv:
 1617|     20|  explicit RepeatedPtrIterator(void* const* it) : it_(it) {}
_ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_43FeatureSetDefaults_FeatureSetEditionDefaultEEC2IS3_TnPNSt3__19enable_ifIXsr3std14is_convertibleIPT_PS4_EE5valueEvE4typeELPv0EEERKNS2_IS9_EE:
 1625|     20|      : it_(other.it_) {}
_ZNK6google8protobuf16RepeatedPtrFieldINS0_43FeatureSetDefaults_FeatureSetEditionDefaultEE3endEv:
 1851|      8|RepeatedPtrField<Element>::end() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1852|      8|  return iterator(raw_data() + size());
 1853|      8|}
_ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIKNS0_43FeatureSetDefaults_FeatureSetEditionDefaultEEES7_:
 1647|     20|  friend bool operator!=(const iterator& x, const iterator& y) {
 1648|     20|    return x.it_ != y.it_;
 1649|     20|  }
_ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_43FeatureSetDefaults_FeatureSetEditionDefaultEEppEv:
 1632|     20|  iterator& operator++() {
 1633|     20|    ++it_;
 1634|     20|    return *this;
 1635|     20|  }
_ZNK6google8protobuf8internal19RepeatedPtrIteratorIKNS0_43FeatureSetDefaults_FeatureSetEditionDefaultEEdeEv:
 1628|     34|  reference operator*() const { return *reinterpret_cast<Element*>(*it_); }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_20FieldDescriptorProtoEE5beginEv:
 1836|    164|RepeatedPtrField<Element>::begin() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1837|    164|  return iterator(raw_data());
 1838|    164|}
_ZN6google8protobuf8internal19RepeatedPtrIteratorINS0_20FieldDescriptorProtoEEC2EPKPv:
 1617|    328|  explicit RepeatedPtrIterator(void* const* it) : it_(it) {}
_ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_20FieldDescriptorProtoEEC2IS3_TnPNSt3__19enable_ifIXsr3std14is_convertibleIPT_PS4_EE5valueEvE4typeELPv0EEERKNS2_IS9_EE:
 1625|    328|      : it_(other.it_) {}
_ZNK6google8protobuf16RepeatedPtrFieldINS0_20FieldDescriptorProtoEE3endEv:
 1851|    164|RepeatedPtrField<Element>::end() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1852|    164|  return iterator(raw_data() + size());
 1853|    164|}
_ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIKNS0_20FieldDescriptorProtoEEES7_:
 1647|    400|  friend bool operator!=(const iterator& x, const iterator& y) {
 1648|    400|    return x.it_ != y.it_;
 1649|    400|  }
_ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_20FieldDescriptorProtoEEppEv:
 1632|    236|  iterator& operator++() {
 1633|    236|    ++it_;
 1634|    236|    return *this;
 1635|    236|  }
_ZNK6google8protobuf8internal19RepeatedPtrIteratorIKNS0_20FieldDescriptorProtoEEdeEv:
 1628|    236|  reference operator*() const { return *reinterpret_cast<Element*>(*it_); }
_ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEESD_:
 1647|     73|  friend bool operator!=(const iterator& x, const iterator& y) {
 1648|     73|    return x.it_ != y.it_;
 1649|     73|  }
_ZN6google8protobuf8internal19RepeatedPtrIteratorIKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEppEv:
 1632|      2|  iterator& operator++() {
 1633|      2|    ++it_;
 1634|      2|    return *this;
 1635|      2|  }
_ZNK6google8protobuf8internal19RepeatedPtrIteratorIKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEdeEv:
 1628|      2|  reference operator*() const { return *reinterpret_cast<Element*>(*it_); }
_ZN6google8protobuf16RepeatedPtrFieldINS0_15DescriptorProtoEE19StaticValidityCheckEv:
  938|     66|  static constexpr PROTOBUF_ALWAYS_INLINE void StaticValidityCheck() {
  939|     66|    static_assert(
  940|     66|        absl::disjunction<
  941|     66|            internal::is_supported_string_type<Element>,
  942|     66|            internal::is_supported_message_type<Element>>::value,
  943|     66|        "We only support string and Message types in RepeatedPtrField.");
  944|     66|  }
_ZN6google8protobuf16RepeatedPtrFieldINS0_19EnumDescriptorProtoEE19StaticValidityCheckEv:
  938|     66|  static constexpr PROTOBUF_ALWAYS_INLINE void StaticValidityCheck() {
  939|     66|    static_assert(
  940|     66|        absl::disjunction<
  941|     66|            internal::is_supported_string_type<Element>,
  942|     66|            internal::is_supported_message_type<Element>>::value,
  943|     66|        "We only support string and Message types in RepeatedPtrField.");
  944|     66|  }
_ZN6google8protobuf16RepeatedPtrFieldINS0_22ServiceDescriptorProtoEE19StaticValidityCheckEv:
  938|      6|  static constexpr PROTOBUF_ALWAYS_INLINE void StaticValidityCheck() {
  939|      6|    static_assert(
  940|      6|        absl::disjunction<
  941|      6|            internal::is_supported_string_type<Element>,
  942|      6|            internal::is_supported_message_type<Element>>::value,
  943|      6|        "We only support string and Message types in RepeatedPtrField.");
  944|      6|  }
_ZN6google8protobuf16RepeatedPtrFieldINS0_20FieldDescriptorProtoEE19StaticValidityCheckEv:
  938|    126|  static constexpr PROTOBUF_ALWAYS_INLINE void StaticValidityCheck() {
  939|    126|    static_assert(
  940|    126|        absl::disjunction<
  941|    126|            internal::is_supported_string_type<Element>,
  942|    126|            internal::is_supported_message_type<Element>>::value,
  943|    126|        "We only support string and Message types in RepeatedPtrField.");
  944|    126|  }
_ZN6google8protobuf16RepeatedPtrFieldINS0_15DescriptorProtoEEC2ENS0_8internal18InternalVisibilityEPNS0_5ArenaE:
  970|     10|      : RepeatedPtrField(arena) {}
_ZN6google8protobuf16RepeatedPtrFieldINS0_15DescriptorProtoEEC2EPNS0_5ArenaE:
 1263|     10|    : RepeatedPtrFieldBase(arena) {
 1264|       |  // We can't have StaticValidityCheck here because that requires Element to be
 1265|       |  // a complete type, and in split repeated fields cases, we call
 1266|       |  // CreateMessage<RepeatedPtrField<T>> for incomplete Ts.
 1267|     10|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_19EnumDescriptorProtoEEC2ENS0_8internal18InternalVisibilityEPNS0_5ArenaE:
  970|     10|      : RepeatedPtrField(arena) {}
_ZN6google8protobuf16RepeatedPtrFieldINS0_19EnumDescriptorProtoEEC2EPNS0_5ArenaE:
 1263|     10|    : RepeatedPtrFieldBase(arena) {
 1264|       |  // We can't have StaticValidityCheck here because that requires Element to be
 1265|       |  // a complete type, and in split repeated fields cases, we call
 1266|       |  // CreateMessage<RepeatedPtrField<T>> for incomplete Ts.
 1267|     10|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_22ServiceDescriptorProtoEEC2ENS0_8internal18InternalVisibilityEPNS0_5ArenaE:
  970|     10|      : RepeatedPtrField(arena) {}
_ZN6google8protobuf16RepeatedPtrFieldINS0_22ServiceDescriptorProtoEEC2EPNS0_5ArenaE:
 1263|     10|    : RepeatedPtrFieldBase(arena) {
 1264|       |  // We can't have StaticValidityCheck here because that requires Element to be
 1265|       |  // a complete type, and in split repeated fields cases, we call
 1266|       |  // CreateMessage<RepeatedPtrField<T>> for incomplete Ts.
 1267|     10|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_20FieldDescriptorProtoEEC2ENS0_8internal18InternalVisibilityEPNS0_5ArenaE:
  970|     10|      : RepeatedPtrField(arena) {}
_ZN6google8protobuf16RepeatedPtrFieldINS0_20FieldDescriptorProtoEEC2EPNS0_5ArenaE:
 1263|     10|    : RepeatedPtrFieldBase(arena) {
 1264|       |  // We can't have StaticValidityCheck here because that requires Element to be
 1265|       |  // a complete type, and in split repeated fields cases, we call
 1266|       |  // CreateMessage<RepeatedPtrField<T>> for incomplete Ts.
 1267|     10|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_20FieldDescriptorProtoEED2Ev:
 1285|    126|RepeatedPtrField<Element>::~RepeatedPtrField() {
 1286|    126|  StaticValidityCheck();
 1287|    126|  if (!NeedsDestroy()) return;
  ------------------
  |  Branch (1287:7): [True: 65, False: 61]
  ------------------
 1288|       |#ifdef __cpp_if_constexpr
 1289|       |  if constexpr (std::is_base_of<MessageLite, Element>::value) {
 1290|       |#else
 1291|     61|  if (std::is_base_of<MessageLite, Element>::value) {
  ------------------
  |  Branch (1291:7): [True: 61, Folded]
  ------------------
 1292|     61|#endif
 1293|     61|    DestroyProtos();
 1294|     61|  } else {
 1295|      0|    Destroy<TypeHandler>();
 1296|      0|  }
 1297|     61|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_22ServiceDescriptorProtoEED2Ev:
 1285|      6|RepeatedPtrField<Element>::~RepeatedPtrField() {
 1286|      6|  StaticValidityCheck();
 1287|      6|  if (!NeedsDestroy()) return;
  ------------------
  |  Branch (1287:7): [True: 6, False: 0]
  ------------------
 1288|       |#ifdef __cpp_if_constexpr
 1289|       |  if constexpr (std::is_base_of<MessageLite, Element>::value) {
 1290|       |#else
 1291|      0|  if (std::is_base_of<MessageLite, Element>::value) {
  ------------------
  |  Branch (1291:7): [True: 0, Folded]
  ------------------
 1292|      0|#endif
 1293|      0|    DestroyProtos();
 1294|      0|  } else {
 1295|      0|    Destroy<TypeHandler>();
 1296|      0|  }
 1297|      0|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_19EnumDescriptorProtoEED2Ev:
 1285|     66|RepeatedPtrField<Element>::~RepeatedPtrField() {
 1286|     66|  StaticValidityCheck();
 1287|     66|  if (!NeedsDestroy()) return;
  ------------------
  |  Branch (1287:7): [True: 55, False: 11]
  ------------------
 1288|       |#ifdef __cpp_if_constexpr
 1289|       |  if constexpr (std::is_base_of<MessageLite, Element>::value) {
 1290|       |#else
 1291|     11|  if (std::is_base_of<MessageLite, Element>::value) {
  ------------------
  |  Branch (1291:7): [True: 11, Folded]
  ------------------
 1292|     11|#endif
 1293|     11|    DestroyProtos();
 1294|     11|  } else {
 1295|      0|    Destroy<TypeHandler>();
 1296|      0|  }
 1297|     11|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_15DescriptorProtoEED2Ev:
 1285|     66|RepeatedPtrField<Element>::~RepeatedPtrField() {
 1286|     66|  StaticValidityCheck();
 1287|     66|  if (!NeedsDestroy()) return;
  ------------------
  |  Branch (1287:7): [True: 52, False: 14]
  ------------------
 1288|       |#ifdef __cpp_if_constexpr
 1289|       |  if constexpr (std::is_base_of<MessageLite, Element>::value) {
 1290|       |#else
 1291|     14|  if (std::is_base_of<MessageLite, Element>::value) {
  ------------------
  |  Branch (1291:7): [True: 14, Folded]
  ------------------
 1292|     14|#endif
 1293|     14|    DestroyProtos();
 1294|     14|  } else {
 1295|      0|    Destroy<TypeHandler>();
 1296|      0|  }
 1297|     14|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_30DescriptorProto_ExtensionRangeEE19StaticValidityCheckEv:
  938|     60|  static constexpr PROTOBUF_ALWAYS_INLINE void StaticValidityCheck() {
  939|     60|    static_assert(
  940|     60|        absl::disjunction<
  941|     60|            internal::is_supported_string_type<Element>,
  942|     60|            internal::is_supported_message_type<Element>>::value,
  943|     60|        "We only support string and Message types in RepeatedPtrField.");
  944|     60|  }
_ZN6google8protobuf16RepeatedPtrFieldINS0_20OneofDescriptorProtoEE19StaticValidityCheckEv:
  938|     60|  static constexpr PROTOBUF_ALWAYS_INLINE void StaticValidityCheck() {
  939|     60|    static_assert(
  940|     60|        absl::disjunction<
  941|     60|            internal::is_supported_string_type<Element>,
  942|     60|            internal::is_supported_message_type<Element>>::value,
  943|     60|        "We only support string and Message types in RepeatedPtrField.");
  944|     60|  }
_ZN6google8protobuf16RepeatedPtrFieldINS0_29DescriptorProto_ReservedRangeEE19StaticValidityCheckEv:
  938|     60|  static constexpr PROTOBUF_ALWAYS_INLINE void StaticValidityCheck() {
  939|     60|    static_assert(
  940|     60|        absl::disjunction<
  941|     60|            internal::is_supported_string_type<Element>,
  942|     60|            internal::is_supported_message_type<Element>>::value,
  943|     60|        "We only support string and Message types in RepeatedPtrField.");
  944|     60|  }
_ZN6google8protobuf16RepeatedPtrFieldINS0_29DescriptorProto_ReservedRangeEED2Ev:
 1285|     60|RepeatedPtrField<Element>::~RepeatedPtrField() {
 1286|     60|  StaticValidityCheck();
 1287|     60|  if (!NeedsDestroy()) return;
  ------------------
  |  Branch (1287:7): [True: 53, False: 7]
  ------------------
 1288|       |#ifdef __cpp_if_constexpr
 1289|       |  if constexpr (std::is_base_of<MessageLite, Element>::value) {
 1290|       |#else
 1291|      7|  if (std::is_base_of<MessageLite, Element>::value) {
  ------------------
  |  Branch (1291:7): [True: 7, Folded]
  ------------------
 1292|      7|#endif
 1293|      7|    DestroyProtos();
 1294|      7|  } else {
 1295|      0|    Destroy<TypeHandler>();
 1296|      0|  }
 1297|      7|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_20OneofDescriptorProtoEED2Ev:
 1285|     60|RepeatedPtrField<Element>::~RepeatedPtrField() {
 1286|     60|  StaticValidityCheck();
 1287|     60|  if (!NeedsDestroy()) return;
  ------------------
  |  Branch (1287:7): [True: 56, False: 4]
  ------------------
 1288|       |#ifdef __cpp_if_constexpr
 1289|       |  if constexpr (std::is_base_of<MessageLite, Element>::value) {
 1290|       |#else
 1291|      4|  if (std::is_base_of<MessageLite, Element>::value) {
  ------------------
  |  Branch (1291:7): [True: 4, Folded]
  ------------------
 1292|      4|#endif
 1293|      4|    DestroyProtos();
 1294|      4|  } else {
 1295|      0|    Destroy<TypeHandler>();
 1296|      0|  }
 1297|      4|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_30DescriptorProto_ExtensionRangeEED2Ev:
 1285|     60|RepeatedPtrField<Element>::~RepeatedPtrField() {
 1286|     60|  StaticValidityCheck();
 1287|     60|  if (!NeedsDestroy()) return;
  ------------------
  |  Branch (1287:7): [True: 48, False: 12]
  ------------------
 1288|       |#ifdef __cpp_if_constexpr
 1289|       |  if constexpr (std::is_base_of<MessageLite, Element>::value) {
 1290|       |#else
 1291|     12|  if (std::is_base_of<MessageLite, Element>::value) {
  ------------------
  |  Branch (1291:7): [True: 12, Folded]
  ------------------
 1292|     12|#endif
 1293|     12|    DestroyProtos();
 1294|     12|  } else {
 1295|      0|    Destroy<TypeHandler>();
 1296|      0|  }
 1297|     12|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEE19StaticValidityCheckEv:
  938|     20|  static constexpr PROTOBUF_ALWAYS_INLINE void StaticValidityCheck() {
  939|     20|    static_assert(
  940|     20|        absl::disjunction<
  941|     20|            internal::is_supported_string_type<Element>,
  942|     20|            internal::is_supported_message_type<Element>>::value,
  943|     20|        "We only support string and Message types in RepeatedPtrField.");
  944|     20|  }
_ZN6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEEC2ENS0_8internal18InternalVisibilityEPNS0_5ArenaE:
  970|     19|      : RepeatedPtrField(arena) {}
_ZN6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEEC2EPNS0_5ArenaE:
 1263|     19|    : RepeatedPtrFieldBase(arena) {
 1264|       |  // We can't have StaticValidityCheck here because that requires Element to be
 1265|       |  // a complete type, and in split repeated fields cases, we call
 1266|       |  // CreateMessage<RepeatedPtrField<T>> for incomplete Ts.
 1267|     19|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEED2Ev:
 1285|     20|RepeatedPtrField<Element>::~RepeatedPtrField() {
 1286|     20|  StaticValidityCheck();
 1287|     20|  if (!NeedsDestroy()) return;
  ------------------
  |  Branch (1287:7): [True: 20, False: 0]
  ------------------
 1288|       |#ifdef __cpp_if_constexpr
 1289|       |  if constexpr (std::is_base_of<MessageLite, Element>::value) {
 1290|       |#else
 1291|      0|  if (std::is_base_of<MessageLite, Element>::value) {
  ------------------
  |  Branch (1291:7): [True: 0, Folded]
  ------------------
 1292|      0|#endif
 1293|      0|    DestroyProtos();
 1294|      0|  } else {
 1295|      0|    Destroy<TypeHandler>();
 1296|      0|  }
 1297|      0|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_24EnumValueDescriptorProtoEE19StaticValidityCheckEv:
  938|     30|  static constexpr PROTOBUF_ALWAYS_INLINE void StaticValidityCheck() {
  939|     30|    static_assert(
  940|     30|        absl::disjunction<
  941|     30|            internal::is_supported_string_type<Element>,
  942|     30|            internal::is_supported_message_type<Element>>::value,
  943|     30|        "We only support string and Message types in RepeatedPtrField.");
  944|     30|  }
_ZN6google8protobuf16RepeatedPtrFieldINS0_37EnumDescriptorProto_EnumReservedRangeEE19StaticValidityCheckEv:
  938|     30|  static constexpr PROTOBUF_ALWAYS_INLINE void StaticValidityCheck() {
  939|     30|    static_assert(
  940|     30|        absl::disjunction<
  941|     30|            internal::is_supported_string_type<Element>,
  942|     30|            internal::is_supported_message_type<Element>>::value,
  943|     30|        "We only support string and Message types in RepeatedPtrField.");
  944|     30|  }
_ZN6google8protobuf16RepeatedPtrFieldINS0_37EnumDescriptorProto_EnumReservedRangeEED2Ev:
 1285|     30|RepeatedPtrField<Element>::~RepeatedPtrField() {
 1286|     30|  StaticValidityCheck();
 1287|     30|  if (!NeedsDestroy()) return;
  ------------------
  |  Branch (1287:7): [True: 29, False: 1]
  ------------------
 1288|       |#ifdef __cpp_if_constexpr
 1289|       |  if constexpr (std::is_base_of<MessageLite, Element>::value) {
 1290|       |#else
 1291|      1|  if (std::is_base_of<MessageLite, Element>::value) {
  ------------------
  |  Branch (1291:7): [True: 1, Folded]
  ------------------
 1292|      1|#endif
 1293|      1|    DestroyProtos();
 1294|      1|  } else {
 1295|      0|    Destroy<TypeHandler>();
 1296|      0|  }
 1297|      1|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_24EnumValueDescriptorProtoEED2Ev:
 1285|     30|RepeatedPtrField<Element>::~RepeatedPtrField() {
 1286|     30|  StaticValidityCheck();
 1287|     30|  if (!NeedsDestroy()) return;
  ------------------
  |  Branch (1287:7): [True: 0, False: 30]
  ------------------
 1288|       |#ifdef __cpp_if_constexpr
 1289|       |  if constexpr (std::is_base_of<MessageLite, Element>::value) {
 1290|       |#else
 1291|     30|  if (std::is_base_of<MessageLite, Element>::value) {
  ------------------
  |  Branch (1291:7): [True: 30, Folded]
  ------------------
 1292|     30|#endif
 1293|     30|    DestroyProtos();
 1294|     30|  } else {
 1295|      0|    Destroy<TypeHandler>();
 1296|      0|  }
 1297|     30|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_27FieldOptions_EditionDefaultEE19StaticValidityCheckEv:
  938|     17|  static constexpr PROTOBUF_ALWAYS_INLINE void StaticValidityCheck() {
  939|     17|    static_assert(
  940|     17|        absl::disjunction<
  941|     17|            internal::is_supported_string_type<Element>,
  942|     17|            internal::is_supported_message_type<Element>>::value,
  943|     17|        "We only support string and Message types in RepeatedPtrField.");
  944|     17|  }
_ZN6google8protobuf16RepeatedPtrFieldINS0_27FieldOptions_EditionDefaultEEC2ENS0_8internal18InternalVisibilityEPNS0_5ArenaE:
  970|     17|      : RepeatedPtrField(arena) {}
_ZN6google8protobuf16RepeatedPtrFieldINS0_27FieldOptions_EditionDefaultEEC2EPNS0_5ArenaE:
 1263|     17|    : RepeatedPtrFieldBase(arena) {
 1264|       |  // We can't have StaticValidityCheck here because that requires Element to be
 1265|       |  // a complete type, and in split repeated fields cases, we call
 1266|       |  // CreateMessage<RepeatedPtrField<T>> for incomplete Ts.
 1267|     17|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_27FieldOptions_EditionDefaultEED2Ev:
 1285|     17|RepeatedPtrField<Element>::~RepeatedPtrField() {
 1286|     17|  StaticValidityCheck();
 1287|     17|  if (!NeedsDestroy()) return;
  ------------------
  |  Branch (1287:7): [True: 8, False: 9]
  ------------------
 1288|       |#ifdef __cpp_if_constexpr
 1289|       |  if constexpr (std::is_base_of<MessageLite, Element>::value) {
 1290|       |#else
 1291|      9|  if (std::is_base_of<MessageLite, Element>::value) {
  ------------------
  |  Branch (1291:7): [True: 9, Folded]
  ------------------
 1292|      9|#endif
 1293|      9|    DestroyProtos();
 1294|      9|  } else {
 1295|      0|    Destroy<TypeHandler>();
 1296|      0|  }
 1297|      9|}
_ZN6google8protobuf16RepeatedPtrFieldINS0_43FeatureSetDefaults_FeatureSetEditionDefaultEEC2ENS0_8internal18InternalVisibilityEPNS0_5ArenaE:
  970|      1|      : RepeatedPtrField(arena) {}
_ZN6google8protobuf16RepeatedPtrFieldINS0_43FeatureSetDefaults_FeatureSetEditionDefaultEEC2EPNS0_5ArenaE:
 1263|      1|    : RepeatedPtrFieldBase(arena) {
 1264|       |  // We can't have StaticValidityCheck here because that requires Element to be
 1265|       |  // a complete type, and in split repeated fields cases, we call
 1266|       |  // CreateMessage<RepeatedPtrField<T>> for incomplete Ts.
 1267|      1|}
_ZNK6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEE5beginEv:
 1836|     19|RepeatedPtrField<Element>::begin() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1837|     19|  return iterator(raw_data());
 1838|     19|}
_ZN6google8protobuf8internal19RepeatedPtrIteratorINS0_19UninterpretedOptionEEC2EPKPv:
 1617|     38|  explicit RepeatedPtrIterator(void* const* it) : it_(it) {}
_ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_19UninterpretedOptionEEC2IS3_TnPNSt3__19enable_ifIXsr3std14is_convertibleIPT_PS4_EE5valueEvE4typeELPv0EEERKNS2_IS9_EE:
 1625|     38|      : it_(other.it_) {}
_ZNK6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEE3endEv:
 1851|     19|RepeatedPtrField<Element>::end() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1852|     19|  return iterator(raw_data() + size());
 1853|     19|}
_ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIKNS0_19UninterpretedOptionEEES7_:
 1647|     19|  friend bool operator!=(const iterator& x, const iterator& y) {
 1648|     19|    return x.it_ != y.it_;
 1649|     19|  }
_ZNK6google8protobuf16RepeatedPtrFieldINS0_27FieldOptions_EditionDefaultEE5beginEv:
 1836|     17|RepeatedPtrField<Element>::begin() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1837|     17|  return iterator(raw_data());
 1838|     17|}
_ZN6google8protobuf8internal19RepeatedPtrIteratorINS0_27FieldOptions_EditionDefaultEEC2EPKPv:
 1617|     34|  explicit RepeatedPtrIterator(void* const* it) : it_(it) {}
_ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_27FieldOptions_EditionDefaultEEC2IS3_TnPNSt3__19enable_ifIXsr3std14is_convertibleIPT_PS4_EE5valueEvE4typeELPv0EEERKNS2_IS9_EE:
 1625|     34|      : it_(other.it_) {}
_ZNK6google8protobuf16RepeatedPtrFieldINS0_27FieldOptions_EditionDefaultEE3endEv:
 1851|     17|RepeatedPtrField<Element>::end() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1852|     17|  return iterator(raw_data() + size());
 1853|     17|}
_ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIKNS0_27FieldOptions_EditionDefaultEEES7_:
 1647|     35|  friend bool operator!=(const iterator& x, const iterator& y) {
 1648|     35|    return x.it_ != y.it_;
 1649|     35|  }
_ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_27FieldOptions_EditionDefaultEEppEv:
 1632|     18|  iterator& operator++() {
 1633|     18|    ++it_;
 1634|     18|    return *this;
 1635|     18|  }
_ZNK6google8protobuf8internal19RepeatedPtrIteratorIKNS0_27FieldOptions_EditionDefaultEEdeEv:
 1628|     18|  reference operator*() const { return *reinterpret_cast<Element*>(*it_); }
_ZN6google8protobuf8internal7memswapILm24EEEvPcS3_:
   78|    259|inline void memswap(char* PROTOBUF_RESTRICT a, char* PROTOBUF_RESTRICT b) {
   79|       |  // `PROTOBUF_RESTRICT` tells compiler that blocks do not overlapping which
   80|       |  // allows it to generate optimized code for swap_ranges.
   81|    259|  std::swap_ranges(a, a + N, b);
   82|    259|}
_ZN6google8protobuf8internalmiENS1_19RepeatedPtrIteratorIKNS0_43FeatureSetDefaults_FeatureSetEditionDefaultEEES5_:
 1691|      4|  friend difference_type operator-(iterator it1, iterator it2) {
 1692|      4|    return it1.it_ - it2.it_;
 1693|      4|  }
_ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_43FeatureSetDefaults_FeatureSetEditionDefaultEEpLEl:
 1666|     18|  iterator& operator+=(difference_type d) {
 1667|     18|    it_ += d;
 1668|     18|    return *this;
 1669|     18|  }
_ZN6google8protobuf8internaleqERKNS1_19RepeatedPtrIteratorIKNS0_43FeatureSetDefaults_FeatureSetEditionDefaultEEES7_:
 1644|      4|  friend bool operator==(const iterator& x, const iterator& y) {
 1645|      4|    return x.it_ == y.it_;
 1646|      4|  }
_ZNK6google8protobuf8internal19RepeatedPtrIteratorIKNS0_43FeatureSetDefaults_FeatureSetEditionDefaultEEptEv:
 1629|      8|  pointer operator->() const { return &(operator*()); }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerINS0_7MessageEEEEEPNT_4TypeEPv:
  661|  17.2k|  static inline Value<TypeHandler>* cast(void* element) {
  662|  17.2k|    return reinterpret_cast<Value<TypeHandler>*>(element);
  663|  17.2k|  }
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase3GetINS1_18GenericTypeHandlerINS0_7MessageEEEEERKNT_4TypeEi:
  252|  17.2k|  const Value<TypeHandler>& Get(int index) const {
  253|  17.2k|    ABSL_DCHECK_GE(index, 0);
  ------------------
  |  |   82|  17.2k|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|  17.2k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  17.2k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 17.2k]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  17.2k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  254|  17.2k|    ABSL_DCHECK_LT(index, current_size_);
  ------------------
  |  |   80|  17.2k|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|  17.2k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  17.2k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 17.2k]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  17.2k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  255|  17.2k|    return *cast<TypeHandler>(element_at(index));
  256|  17.2k|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerINS0_7MessageEEEEEPKNT_4TypeEPKv:
  665|  17.2k|  static inline const Value<TypeHandler>* cast(const void* element) {
  666|  17.2k|    return reinterpret_cast<const Value<TypeHandler>*>(element);
  667|  17.2k|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase7MutableINS1_18GenericTypeHandlerINS0_7MessageEEEEEPNT_4TypeEi:
  187|  17.2k|  Value<TypeHandler>* Mutable(int index) {
  188|  17.2k|    ABSL_DCHECK_GE(index, 0);
  ------------------
  |  |   82|  17.2k|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|  17.2k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  17.2k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 17.2k]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  17.2k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  189|  17.2k|    ABSL_DCHECK_LT(index, current_size_);
  ------------------
  |  |   80|  17.2k|  ABSL_LOG_INTERNAL_DCHECK_LT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   92|  17.2k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  17.2k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 17.2k]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  17.2k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  190|  17.2k|    return cast<TypeHandler>(element_at(index));
  191|  17.2k|  }

_ZN6google8protobuf8internal10ArenaBlockC2EPS2_m:
   43|     22|  ArenaBlock(ArenaBlock* next, size_t size) : next(next), size(size) {
   44|     22|    ABSL_DCHECK_GT(size, sizeof(ArenaBlock));
  ------------------
  |  |   84|     22|  ABSL_LOG_INTERNAL_DCHECK_GT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   96|     22|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     22|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 22]
  |  |  |  |  |  |  |  Branch (56:19): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     22|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   45|     22|  }
_ZN6google8protobuf8internal10ArenaBlock7PointerEm:
   47|     62|  char* Pointer(size_t n) {
   48|     62|    ABSL_DCHECK_LE(n, size);
  ------------------
  |  |   78|     62|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   90|     62|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     62|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 62]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     62|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   49|     62|    return reinterpret_cast<char*>(this) + n;
   50|     62|  }
_ZN6google8protobuf8internal10ArenaBlock5LimitEv:
   51|     22|  char* Limit() { return Pointer(size & static_cast<size_t>(-8)); }
_ZNK6google8protobuf8internal10ArenaBlock8IsSentryEv:
   53|     22|  bool IsSentry() const { return size == 0; }
_ZN6google8protobuf8internal11SerialArena11CleanupListEv:
   85|      4|  void CleanupList() { cleanup_list_.Cleanup(*this); }
_ZNK6google8protobuf8internal11SerialArena14SpaceAllocatedEv:
   86|      4|  uint64_t SpaceAllocated() const {
   87|      4|    return space_allocated_.load(std::memory_order_relaxed);
   88|      4|  }
_ZN6google8protobuf8internal11SerialArena26TryAllocateFromCachedBlockEm:
   92|    148|  PROTOBUF_ALWAYS_INLINE void* TryAllocateFromCachedBlock(size_t size) {
   93|    148|    if (PROTOBUF_PREDICT_FALSE(size < 16)) return nullptr;
  ------------------
  |  |  365|    148|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 148]
  |  |  |  Branch (365:54): [Folded, False: 148]
  |  |  |  Branch (365:63): [True: 0, False: 148]
  |  |  ------------------
  ------------------
   94|       |    // We round up to the next larger block in case the memory doesn't match
   95|       |    // the pattern we are looking for.
   96|    148|    const size_t index = absl::bit_width(size - 1) - 4;
   97|       |
   98|    148|    if (PROTOBUF_PREDICT_FALSE(index >= cached_block_length_)) return nullptr;
  ------------------
  |  |  365|    148|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 17, False: 131]
  |  |  |  Branch (365:54): [Folded, False: 148]
  |  |  |  Branch (365:63): [True: 17, False: 131]
  |  |  ------------------
  ------------------
   99|    131|    auto& cached_head = cached_blocks_[index];
  100|    131|    if (cached_head == nullptr) return nullptr;
  ------------------
  |  Branch (100:9): [True: 81, False: 50]
  ------------------
  101|       |
  102|     50|    void* ret = cached_head;
  103|     50|    PROTOBUF_UNPOISON_MEMORY_REGION(ret, size);
  104|     50|    cached_head = cached_head->next;
  105|     50|    return ret;
  106|    131|  }
_ZN6google8protobuf8internal11SerialArena20MaybeAllocateAlignedEmPPv:
  202|    715|  bool MaybeAllocateAligned(size_t n, void** out) {
  203|    715|    ABSL_DCHECK(internal::ArenaAlignDefault::IsAligned(n));
  ------------------
  |  |   47|    715|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|    715|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  1.43k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    715|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  1.43k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  1.43k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 715, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    715|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 715]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|    715|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 715, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.43k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  1.43k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  204|    715|    ABSL_DCHECK_GE(limit_, ptr());
  ------------------
  |  |   82|    715|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|    715|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    715|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 715]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    715|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|    715|    char* ret = ptr();
  206|       |    // ret + n may point out of the block bounds, or ret may be nullptr.
  207|       |    // Both computations have undefined behavior when done on pointers,
  208|       |    // so do them on uintptr_t instead.
  209|    715|    if (PROTOBUF_PREDICT_FALSE(reinterpret_cast<uintptr_t>(ret) + n >
  ------------------
  |  |  365|    715|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 27, False: 688]
  |  |  |  Branch (365:54): [Folded, False: 715]
  |  |  |  Branch (365:63): [True: 27, False: 688]
  |  |  ------------------
  ------------------
  210|    715|                               reinterpret_cast<uintptr_t>(limit_))) {
  211|     27|      return false;
  212|     27|    }
  213|    688|    PROTOBUF_UNPOISON_MEMORY_REGION(ret, n);
  214|    688|    *out = ret;
  215|    688|    char* next = ret + n;
  216|    688|    set_ptr(next);
  217|    688|    MaybePrefetchData(next);
  218|    688|    return true;
  219|    715|  }
_ZN6google8protobuf8internal11SerialArena17MaybePrefetchImplElPKcS4_S4_:
  286|    688|                                       const char* prefetch_ptr) {
  287|    688|    if (PROTOBUF_PREDICT_TRUE(prefetch_ptr - next > prefetch_degree))
  ------------------
  |  |  364|    688|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 495, False: 193]
  |  |  |  Branch (364:53): [Folded, False: 688]
  |  |  |  Branch (364:62): [True: 495, False: 193]
  |  |  ------------------
  ------------------
  288|    495|      return prefetch_ptr;
  289|    193|    if (PROTOBUF_PREDICT_TRUE(prefetch_ptr < limit)) {
  ------------------
  |  |  364|    193|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 81, False: 112]
  |  |  |  Branch (364:53): [Folded, False: 193]
  |  |  |  Branch (364:62): [True: 81, False: 112]
  |  |  ------------------
  ------------------
  290|     81|      prefetch_ptr = std::max(next, prefetch_ptr);
  291|     81|      ABSL_DCHECK(prefetch_ptr != nullptr);
  ------------------
  |  |   47|     81|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|     81|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|    162|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|     81|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|    162|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|    162|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 81, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|     81|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 81]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|     81|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 81, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    162|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|    162|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  292|     81|      const char* end = std::min(limit, prefetch_ptr + prefetch_degree);
  293|  1.22k|      for (; prefetch_ptr < end; prefetch_ptr += ABSL_CACHELINE_SIZE) {
  ------------------
  |  |   77|  1.14k|#define ABSL_CACHELINE_SIZE 64
  ------------------
  |  Branch (293:14): [True: 1.14k, False: 81]
  ------------------
  294|  1.14k|        absl::PrefetchToLocalCacheForWrite(prefetch_ptr);
  295|  1.14k|      }
  296|     81|    }
  297|    193|    return prefetch_ptr;
  298|    193|  }
_ZN6google8protobuf8internal11SerialArena17MaybePrefetchDataEPKc:
  300|    688|  void MaybePrefetchData(const char* next) {
  301|    688|    ABSL_DCHECK(static_cast<const void*>(prefetch_ptr_) == nullptr ||
  ------------------
  |  |   47|    688|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|    688|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  1.37k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    688|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  1.37k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  1.37k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 688, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    688|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 688]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|    688|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 688, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.37k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  1.37k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  302|    688|                static_cast<const void*>(prefetch_ptr_) >= head());
  303|    688|    prefetch_ptr_ =
  304|    688|        MaybePrefetchImpl(kPrefetchDataDegree, next, limit_, prefetch_ptr_);
  305|    688|  }
_ZN6google8protobuf8internal11SerialArena16FreeStringBlocksEv:
  327|      4|  size_t FreeStringBlocks() {
  328|       |    // On the active block delete all strings skipping the unused instances.
  329|      4|    size_t unused_bytes = string_block_unused_.load(std::memory_order_relaxed);
  330|      4|    if (StringBlock* sb = string_block_.load(std::memory_order_relaxed)) {
  ------------------
  |  Branch (330:22): [True: 4, False: 0]
  ------------------
  331|      4|      return FreeStringBlocks(sb, unused_bytes);
  332|      4|    }
  333|      0|    return 0;
  334|      4|  }
_ZN6google8protobuf8internal11SerialArena12AddSpaceUsedEm:
  338|     45|  void AddSpaceUsed(size_t space_used) {
  339|     45|    space_used_.store(space_used_.load(std::memory_order_relaxed) + space_used,
  340|     45|                      std::memory_order_relaxed);
  341|     45|  }
_ZN6google8protobuf8internal11SerialArena17AddSpaceAllocatedEm:
  344|     27|  void AddSpaceAllocated(size_t space_allocated) {
  345|     27|    space_allocated_.store(
  346|     27|        space_allocated_.load(std::memory_order_relaxed) + space_allocated,
  347|     27|        std::memory_order_relaxed);
  348|     27|  }
_ZN6google8protobuf8internal11SerialArena4headEv:
  351|     26|  ArenaBlock* head() { return head_.load(std::memory_order_relaxed); }
_ZN6google8protobuf8internal11SerialArena3ptrEv:
  356|    733|  char* ptr() { return ptr_.load(std::memory_order_relaxed); }
_ZN6google8protobuf8internal11SerialArena7set_ptrEPc:
  358|    710|  void set_ptr(char* ptr) { return ptr_.store(ptr, std::memory_order_relaxed); }
_ZN6google8protobuf8internal11SerialArena9set_rangeEPcS3_:
  359|     22|  PROTOBUF_ALWAYS_INLINE void set_range(char* ptr, char* limit) {
  360|     22|    set_ptr(ptr);
  361|     22|    prefetch_ptr_ = ptr;
  362|     22|    limit_ = limit;
  363|     22|  }
_ZN6google8protobuf8internal11SerialArena19MaybeAllocateStringERPv:
  412|    666|inline PROTOBUF_ALWAYS_INLINE bool SerialArena::MaybeAllocateString(void*& p) {
  413|       |  // Check how many unused instances are in the current block.
  414|    666|  size_t unused_bytes = string_block_unused_.load(std::memory_order_relaxed);
  415|    666|  if (PROTOBUF_PREDICT_TRUE(unused_bytes != 0)) {
  ------------------
  |  |  364|    666|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 648, False: 18]
  |  |  |  Branch (364:53): [Folded, False: 666]
  |  |  |  Branch (364:62): [True: 648, False: 18]
  |  |  ------------------
  ------------------
  416|    648|    unused_bytes -= sizeof(std::string);
  417|    648|    string_block_unused_.store(unused_bytes, std::memory_order_relaxed);
  418|    648|    p = string_block_.load(std::memory_order_relaxed)->AtOffset(unused_bytes);
  419|    648|    return true;
  420|    648|  }
  421|     18|  return false;
  422|    666|}
_ZN6google8protobuf8internal11SerialArena23AllocateFromStringBlockEv:
  425|    666|SerialArena::AllocateFromStringBlock() {
  426|    666|  void* p;
  427|    666|  if (ABSL_PREDICT_TRUE(MaybeAllocateString(p))) return p;
  ------------------
  |  |  179|    666|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 648, False: 18]
  |  |  |  Branch (179:48): [Folded, False: 666]
  |  |  |  Branch (179:57): [True: 648, False: 18]
  |  |  ------------------
  ------------------
  428|     18|  return AllocateFromStringBlockFallback();
  429|    666|}
_ZN6google8protobuf8internal11SerialArena15AllocateAlignedILNS1_16AllocationClientE0EEEPvm:
  116|    577|  void* AllocateAligned(size_t n) {
  117|    577|    ABSL_DCHECK(internal::ArenaAlignDefault::IsAligned(n));
  ------------------
  |  |   47|    577|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|    577|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  1.15k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    577|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  1.15k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  1.15k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 577, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    577|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 577]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|    577|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 577, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.15k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  1.15k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  118|    577|    ABSL_DCHECK_GE(limit_, ptr());
  ------------------
  |  |   82|    577|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|    577|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    577|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 577]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    577|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  119|       |
  120|    577|    if (alloc_client == AllocationClient::kArray) {
  ------------------
  |  Branch (120:9): [Folded, False: 577]
  ------------------
  121|      0|      if (void* res = TryAllocateFromCachedBlock(n)) {
  ------------------
  |  Branch (121:17): [True: 0, False: 0]
  ------------------
  122|      0|        return res;
  123|      0|      }
  124|      0|    }
  125|       |
  126|    577|    void* ptr;
  127|    577|    if (PROTOBUF_PREDICT_TRUE(MaybeAllocateAligned(n, &ptr))) {
  ------------------
  |  |  364|    577|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 557, False: 20]
  |  |  |  Branch (364:53): [Folded, False: 577]
  |  |  |  Branch (364:62): [True: 557, False: 20]
  |  |  ------------------
  ------------------
  128|    557|      return ptr;
  129|    557|    }
  130|     20|    return AllocateAlignedFallback(n);
  131|    577|  }
_ZN6google8protobuf8internal11SerialArena15AllocateAlignedILNS1_16AllocationClientE1EEEPvm:
  116|    148|  void* AllocateAligned(size_t n) {
  117|    148|    ABSL_DCHECK(internal::ArenaAlignDefault::IsAligned(n));
  ------------------
  |  |   47|    148|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|    148|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|    296|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    148|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|    296|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|    296|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 148, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    148|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 148]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|    148|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 148, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    296|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|    296|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  118|    148|    ABSL_DCHECK_GE(limit_, ptr());
  ------------------
  |  |   82|    148|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|    148|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    148|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 148]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    148|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  119|       |
  120|    148|    if (alloc_client == AllocationClient::kArray) {
  ------------------
  |  Branch (120:9): [True: 148, Folded]
  ------------------
  121|    148|      if (void* res = TryAllocateFromCachedBlock(n)) {
  ------------------
  |  Branch (121:17): [True: 50, False: 98]
  ------------------
  122|     50|        return res;
  123|     50|      }
  124|    148|    }
  125|       |
  126|     98|    void* ptr;
  127|     98|    if (PROTOBUF_PREDICT_TRUE(MaybeAllocateAligned(n, &ptr))) {
  ------------------
  |  |  364|     98|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 96, False: 2]
  |  |  |  Branch (364:53): [Folded, False: 98]
  |  |  |  Branch (364:62): [True: 96, False: 2]
  |  |  ------------------
  ------------------
  128|     96|      return ptr;
  129|     96|    }
  130|      2|    return AllocateAlignedFallback(n);
  131|     98|  }

_ZNK6google8protobuf8internal11StringBlock14allocated_sizeEv:
   74|     10|  size_t allocated_size() const { return allocated_size_; }
_ZN6google8protobuf8internal11StringBlockC2EPS2_btt:
   94|     18|      : next_(next),
   95|     18|        allocated_size_(size),
   96|     18|        next_size_(next_size),
   97|     18|        heap_allocated_(heap_allocated) {}
_ZN6google8protobuf8internal11StringBlock8min_sizeEv:
   99|     14|  static constexpr size_type min_size() { return size_type{256}; }
_ZN6google8protobuf8internal11StringBlock8max_sizeEv:
  100|     14|  static constexpr size_type max_size() { return size_type{8192}; }
_ZNK6google8protobuf8internal11StringBlock9next_sizeEv:
  107|     14|  size_t next_size() const { return next_size_; }
_ZN6google8protobuf8internal11StringBlock11RoundedSizeEt:
  115|     18|constexpr StringBlock::size_type StringBlock::RoundedSize(size_type size) {
  116|     18|  return size - (size - sizeof(StringBlock)) % sizeof(std::string);
  117|     18|}
_ZN6google8protobuf8internal11StringBlock8NextSizeEPS2_:
  119|     18|inline size_t StringBlock::NextSize(StringBlock* block) {
  120|     18|  return block ? block->next_size() : min_size();
  ------------------
  |  Branch (120:10): [True: 14, False: 4]
  ------------------
  121|     18|}
_ZN6google8protobuf8internal11StringBlock7EmplaceEPvmPS2_:
  123|     13|inline StringBlock* StringBlock::Emplace(void* p, size_t n, StringBlock* next) {
  124|     13|  const auto count = static_cast<size_type>(n);
  125|     13|  ABSL_DCHECK_EQ(count, NextSize(next));
  ------------------
  |  |   74|     13|  ABSL_LOG_INTERNAL_DCHECK_EQ_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   86|     13|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     13|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 13]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  126|     13|  size_type doubled = count * 2;
  127|     13|  size_type next_size = next ? std::min(doubled, max_size()) : min_size();
  ------------------
  |  Branch (127:25): [True: 13, False: 0]
  ------------------
  128|     13|  return new (p) StringBlock(next, false, RoundedSize(count), next_size);
  129|     13|}
_ZN6google8protobuf8internal11StringBlock3NewEPS2_:
  131|      5|inline StringBlock* StringBlock::New(StringBlock* next) {
  132|       |  // Compute required size, rounding down to a multiple of sizeof(std:string)
  133|       |  // so that we can optimize the allocation path. I.e., we incur a (constant
  134|       |  // size) MOD() operation cost here to avoid any MUL() later on.
  135|      5|  size_type size = min_size();
  136|      5|  size_type next_size = min_size();
  137|      5|  if (next) {
  ------------------
  |  Branch (137:7): [True: 1, False: 4]
  ------------------
  138|      1|    size = next->next_size_;
  139|      1|    next_size = std::min<size_type>(size * 2, max_size());
  140|      1|  }
  141|      5|  size = RoundedSize(size);
  142|      5|  void* p = ::operator new(size);
  143|      5|  return new (p) StringBlock(next, true, size, next_size);
  144|      5|}
_ZN6google8protobuf8internal11StringBlock6DeleteEPS2_:
  146|     18|inline size_t StringBlock::Delete(StringBlock* block) {
  147|     18|  ABSL_DCHECK(block != nullptr);
  ------------------
  |  |   47|     18|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|     18|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|     36|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|     18|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|     36|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|     36|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 18, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|     18|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 18]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|     18|    !(condition) ? (void)0 : ::absl::log_internal::Voidify()&&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 18, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     36|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|     36|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|     18|  if (!block->heap_allocated_) return size_t{0};
  ------------------
  |  Branch (148:7): [True: 13, False: 5]
  ------------------
  149|      5|  size_t size = block->allocated_size();
  150|      5|  internal::SizedDelete(block, size);
  151|      5|  return size;
  152|     18|}
_ZNK6google8protobuf8internal11StringBlock4nextEv:
  154|     18|inline StringBlock* StringBlock::next() const { return next_; }
_ZNK6google8protobuf8internal11StringBlock14effective_sizeEv:
  156|     50|inline size_t StringBlock::effective_size() const {
  157|     50|  return allocated_size_ - sizeof(StringBlock);
  158|     50|}
_ZN6google8protobuf8internal11StringBlock8AtOffsetEm:
  161|    702|    size_t offset) {
  162|    702|  ABSL_DCHECK_LE(offset, effective_size());
  ------------------
  |  |   78|    702|  ABSL_LOG_INTERNAL_DCHECK_LE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   90|    702|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    702|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded, False: 702]
  |  |  |  |  |  |  |  Branch (56:19): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    702|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|    702|  return reinterpret_cast<std::string*>(reinterpret_cast<char*>(this + 1) +
  164|    702|                                        offset);
  165|    702|}
_ZN6google8protobuf8internal11StringBlock5beginEv:
  167|     14|ABSL_ATTRIBUTE_RETURNS_NONNULL inline std::string* StringBlock::begin() {
  168|     14|  return AtOffset(0);
  169|     14|}
_ZN6google8protobuf8internal11StringBlock3endEv:
  171|     18|ABSL_ATTRIBUTE_RETURNS_NONNULL inline std::string* StringBlock::end() {
  172|     18|  return AtOffset(effective_size());
  173|     18|}

_ZNK6google8protobuf8internal15ThreadSafeArena11AllocPolicyEv:
  158|     22|  const AllocationPolicy* AllocPolicy() const { return alloc_policy_.get(); }
_ZN6google8protobuf8internal15ThreadSafeArena16CacheSerialArenaEPNS1_11SerialArenaE:
  168|      4|  inline void CacheSerialArena(SerialArena* serial) {
  169|      4|    thread_cache().last_serial_arena = serial;
  170|      4|    thread_cache().last_lifecycle_id_seen = tag_and_id_;
  171|      4|  }
_ZN6google8protobuf8internal15ThreadSafeArena15AllocateAlignedILNS1_16AllocationClientE0EEEPvm:
   69|    577|  void* AllocateAligned(size_t n) {
   70|    577|    SerialArena* arena;
   71|    577|    if (PROTOBUF_PREDICT_TRUE(GetSerialArenaFast(&arena))) {
  ------------------
  |  |  364|    577|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 577, False: 0]
  |  |  |  Branch (364:53): [Folded, False: 577]
  |  |  |  Branch (364:62): [True: 577, False: 0]
  |  |  ------------------
  ------------------
   72|    577|      return arena->AllocateAligned<alloc_client>(n);
   73|    577|    } else {
   74|      0|      return AllocateAlignedFallback<alloc_client>(n);
   75|      0|    }
   76|    577|  }
_ZN6google8protobuf8internal15ThreadSafeArena15AllocateAlignedILNS1_16AllocationClientE1EEEPvm:
   69|    148|  void* AllocateAligned(size_t n) {
   70|    148|    SerialArena* arena;
   71|    148|    if (PROTOBUF_PREDICT_TRUE(GetSerialArenaFast(&arena))) {
  ------------------
  |  |  364|    148|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 148, False: 0]
  |  |  |  Branch (364:53): [Folded, False: 148]
  |  |  |  Branch (364:62): [True: 148, False: 0]
  |  |  ------------------
  ------------------
   72|    148|      return arena->AllocateAligned<alloc_client>(n);
   73|    148|    } else {
   74|      0|      return AllocateAlignedFallback<alloc_client>(n);
   75|      0|    }
   76|    148|  }

_ZNK6google8protobuf15UnknownFieldSet5emptyEv:
  334|     19|inline bool UnknownFieldSet::empty() const { return fields_.empty(); }

_ZN6google8protobuf8internal19ShiftMixParseVarintIjLi10EEEPKcS4_Rl:
   53|  19.0k|                                                              int64_t& res1) {
   54|  19.0k|  using Signed = std::make_signed_t<VarintType>;
   55|  19.0k|  constexpr bool kIs64BitVarint = std::is_same<Signed, int64_t>::value;
   56|  19.0k|  constexpr bool kIs32BitVarint = std::is_same<Signed, int32_t>::value;
   57|  19.0k|  static_assert(kIs64BitVarint || kIs32BitVarint, "");
   58|       |
   59|       |  // The algorithm relies on sign extension for each byte to set all high bits
   60|       |  // when the varint continues. It also relies on asserting all of the lower
   61|       |  // bits for each successive byte read. This allows the result to be aggregated
   62|       |  // using a bitwise AND. For example:
   63|       |  //
   64|       |  //          8       1          64     57 ... 24     17  16      9  8       1
   65|       |  // ptr[0] = 1aaa aaaa ; res1 = 1111 1111 ... 1111 1111  1111 1111  1aaa aaaa
   66|       |  // ptr[1] = 1bbb bbbb ; res2 = 1111 1111 ... 1111 1111  11bb bbbb  b111 1111
   67|       |  // ptr[2] = 0ccc cccc ; res3 = 0000 0000 ... 000c cccc  cc11 1111  1111 1111
   68|       |  //                             ---------------------------------------------
   69|       |  //        res1 & res2 & res3 = 0000 0000 ... 000c cccc  ccbb bbbb  baaa aaaa
   70|       |  //
   71|       |  // On x86-64, a shld from a single register filled with enough 1s in the high
   72|       |  // bits can accomplish all this in one instruction. It so happens that res1
   73|       |  // has 57 high bits of ones, which is enough for the largest shift done.
   74|       |  //
   75|       |  // Just as importantly, by keeping results in res1, res2, and res3, we take
   76|       |  // advantage of the superscalar abilities of the CPU.
   77|  19.0k|  const auto next = [&p] { return static_cast<const int8_t>(*p++); };
   78|  19.0k|  const auto last = [&p] { return static_cast<const int8_t>(p[-1]); };
   79|       |
   80|  19.0k|  int64_t res2, res3;  // accumulated result chunks
   81|  19.0k|  res1 = next();
   82|  19.0k|  if (PROTOBUF_PREDICT_TRUE(res1 >= 0)) return p;
  ------------------
  |  |  364|  19.0k|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 10.6k, False: 8.43k]
  |  |  |  Branch (364:53): [Folded, False: 19.0k]
  |  |  |  Branch (364:62): [True: 10.6k, False: 8.43k]
  |  |  ------------------
  ------------------
   83|  8.43k|  if (limit <= 1) goto limit0;
  ------------------
  |  Branch (83:7): [Folded, False: 8.43k]
  ------------------
   84|       |
   85|       |  // Densify all ops with explicit FALSE predictions from here on, except that
   86|       |  // we predict length = 5 as a common length for fields like timestamp.
   87|  8.43k|  if (PROTOBUF_PREDICT_FALSE(VarintShl<1>(next(), res1, res2))) goto done1;
  ------------------
  |  |  365|  8.43k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 7.46k, False: 971]
  |  |  |  Branch (365:54): [Folded, False: 8.43k]
  |  |  |  Branch (365:63): [True: 7.46k, False: 971]
  |  |  ------------------
  ------------------
   88|    971|  if (limit <= 2) goto limit1;
  ------------------
  |  Branch (88:7): [Folded, False: 971]
  ------------------
   89|    971|  if (PROTOBUF_PREDICT_FALSE(VarintShl<2>(next(), res1, res3))) goto done2;
  ------------------
  |  |  365|    971|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 787, False: 184]
  |  |  |  Branch (365:54): [Folded, False: 971]
  |  |  |  Branch (365:63): [True: 787, False: 184]
  |  |  ------------------
  ------------------
   90|    184|  if (limit <= 3) goto limit2;
  ------------------
  |  Branch (90:7): [Folded, False: 184]
  ------------------
   91|    184|  if (PROTOBUF_PREDICT_FALSE(VarintShlAnd<3>(next(), res1, res2))) goto done2;
  ------------------
  |  |  365|    184|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 69, False: 115]
  |  |  |  Branch (365:54): [Folded, False: 184]
  |  |  |  Branch (365:63): [True: 69, False: 115]
  |  |  ------------------
  ------------------
   92|    115|  if (limit <= 4) goto limit2;
  ------------------
  |  Branch (92:7): [Folded, False: 115]
  ------------------
   93|    115|  if (PROTOBUF_PREDICT_TRUE(VarintShlAnd<4>(next(), res1, res3))) goto done2;
  ------------------
  |  |  364|    115|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 115, False: 0]
  |  |  |  Branch (364:53): [Folded, False: 115]
  |  |  |  Branch (364:62): [True: 115, False: 0]
  |  |  ------------------
  ------------------
   94|      0|  if (limit <= 5) goto limit2;
  ------------------
  |  Branch (94:7): [Folded, False: 0]
  ------------------
   95|       |
   96|      0|  if (kIs64BitVarint) {
  ------------------
  |  Branch (96:7): [Folded, False: 0]
  ------------------
   97|      0|    if (PROTOBUF_PREDICT_FALSE(VarintShlAnd<5>(next(), res1, res2))) goto done2;
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   98|      0|    if (limit <= 6) goto limit2;
  ------------------
  |  Branch (98:9): [Folded, False: 0]
  ------------------
   99|      0|    if (PROTOBUF_PREDICT_FALSE(VarintShlAnd<6>(next(), res1, res3))) goto done2;
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  100|      0|    if (limit <= 7) goto limit2;
  ------------------
  |  Branch (100:9): [Folded, False: 0]
  ------------------
  101|      0|    if (PROTOBUF_PREDICT_FALSE(VarintShlAnd<7>(next(), res1, res2))) goto done2;
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  102|      0|    if (limit <= 8) goto limit2;
  ------------------
  |  Branch (102:9): [Folded, False: 0]
  ------------------
  103|      0|    if (PROTOBUF_PREDICT_FALSE(VarintShlAnd<8>(next(), res1, res3))) goto done2;
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  104|      0|    if (limit <= 9) goto limit2;
  ------------------
  |  Branch (104:9): [Folded, False: 0]
  ------------------
  105|      0|  } else {
  106|       |    // An overlong int32 is expected to span the full 10 bytes
  107|      0|    if (PROTOBUF_PREDICT_FALSE(!(next() & 0x80))) goto done2;
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  108|      0|    if (limit <= 6) goto limit2;
  ------------------
  |  Branch (108:9): [Folded, False: 0]
  ------------------
  109|      0|    if (PROTOBUF_PREDICT_FALSE(!(next() & 0x80))) goto done2;
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  110|      0|    if (limit <= 7) goto limit2;
  ------------------
  |  Branch (110:9): [Folded, False: 0]
  ------------------
  111|      0|    if (PROTOBUF_PREDICT_FALSE(!(next() & 0x80))) goto done2;
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  112|      0|    if (limit <= 8) goto limit2;
  ------------------
  |  Branch (112:9): [Folded, False: 0]
  ------------------
  113|      0|    if (PROTOBUF_PREDICT_FALSE(!(next() & 0x80))) goto done2;
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  114|      0|    if (limit <= 9) goto limit2;
  ------------------
  |  Branch (114:9): [Folded, False: 0]
  ------------------
  115|      0|  }
  116|       |
  117|       |  // For valid 64bit varints, the 10th byte/ptr[9] should be exactly 1. In this
  118|       |  // case, the continuation bit of ptr[8] already set the top bit of res3
  119|       |  // correctly, so all we have to do is check that the expected case is true.
  120|      0|  if (PROTOBUF_PREDICT_TRUE(next() == 1)) goto done2;
  ------------------
  |  |  364|      0|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 0, False: 0]
  |  |  |  Branch (364:53): [Folded, False: 0]
  |  |  |  Branch (364:62): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  121|       |
  122|      0|  if (PROTOBUF_PREDICT_FALSE(last() & 0x80)) {
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  123|       |    // If the continue bit is set, it is an unterminated varint.
  124|      0|    return nullptr;
  125|      0|  }
  126|       |
  127|       |  // A zero value of the first bit of the 10th byte represents an
  128|       |  // over-serialized varint. This case should not happen, but if does (say, due
  129|       |  // to a nonconforming serializer), deassert the continuation bit that came
  130|       |  // from ptr[8].
  131|      0|  if (kIs64BitVarint && (last() & 1) == 0) {
  ------------------
  |  Branch (131:7): [Folded, False: 0]
  |  Branch (131:25): [True: 0, False: 0]
  ------------------
  132|      0|    static constexpr int bits = 64 - 1;
  133|      0|#if defined(__GCC_ASM_FLAG_OUTPUTS__) && defined(__x86_64__)
  134|       |    // Use a small instruction since this is an uncommon code path.
  135|      0|    asm("btc %[bits], %[res3]" : [res3] "+r"(res3) : [bits] "i"(bits));
  136|       |#else
  137|       |    res3 ^= int64_t{1} << bits;
  138|       |#endif
  139|      0|  }
  140|       |
  141|    971|done2:
  142|    971|  res2 &= res3;
  143|  8.43k|done1:
  144|  8.43k|  res1 &= res2;
  145|  8.43k|  PROTOBUF_ASSUME(p != nullptr);
  ------------------
  |  |  941|  8.43k|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  ------------------
  146|  8.43k|  return p;
  147|      0|limit2:
  148|      0|  res2 &= res3;
  149|      0|limit1:
  150|      0|  res1 &= res2;
  151|      0|limit0:
  152|      0|  PROTOBUF_ASSUME(p != nullptr);
  ------------------
  |  |  941|      0|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  ------------------
  153|      0|  PROTOBUF_ASSUME(res1 < 0);
  ------------------
  |  |  941|      0|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  ------------------
  154|      0|  return p;
  155|      0|}
_ZZN6google8protobuf8internal19ShiftMixParseVarintIjLi10EEEPKcS4_RlENKUlvE_clEv:
   77|  28.7k|  const auto next = [&p] { return static_cast<const int8_t>(*p++); };
_ZN6google8protobuf8internal9VarintShlILi1EEEbalRl:
   46|  10.8k|                                             int64_t& res) {
   47|  10.8k|  res = VarintShlByte<n>(byte, ones);
   48|  10.8k|  return res >= 0;
   49|  10.8k|}
_ZN6google8protobuf8internal13VarintShlByteILi1EEElal:
   26|  10.8k|inline PROTOBUF_ALWAYS_INLINE int64_t VarintShlByte(int8_t byte, int64_t ones) {
   27|  10.8k|  return static_cast<int64_t>((static_cast<uint64_t>(byte) << n * 7) |
   28|  10.8k|                              (static_cast<uint64_t>(ones) >> (64 - n * 7)));
   29|  10.8k|}
_ZN6google8protobuf8internal9VarintShlILi2EEEbalRl:
   46|  3.27k|                                             int64_t& res) {
   47|  3.27k|  res = VarintShlByte<n>(byte, ones);
   48|  3.27k|  return res >= 0;
   49|  3.27k|}
_ZN6google8protobuf8internal13VarintShlByteILi2EEElal:
   26|  3.27k|inline PROTOBUF_ALWAYS_INLINE int64_t VarintShlByte(int8_t byte, int64_t ones) {
   27|  3.27k|  return static_cast<int64_t>((static_cast<uint64_t>(byte) << n * 7) |
   28|  3.27k|                              (static_cast<uint64_t>(ones) >> (64 - n * 7)));
   29|  3.27k|}
_ZN6google8protobuf8internal12VarintShlAndILi3EEEbalRl:
   36|  2.41k|                                                int64_t& res) {
   37|  2.41k|  res &= VarintShlByte<n>(byte, ones);
   38|  2.41k|  return res >= 0;
   39|  2.41k|}
_ZN6google8protobuf8internal13VarintShlByteILi3EEElal:
   26|  2.41k|inline PROTOBUF_ALWAYS_INLINE int64_t VarintShlByte(int8_t byte, int64_t ones) {
   27|  2.41k|  return static_cast<int64_t>((static_cast<uint64_t>(byte) << n * 7) |
   28|  2.41k|                              (static_cast<uint64_t>(ones) >> (64 - n * 7)));
   29|  2.41k|}
_ZN6google8protobuf8internal12VarintShlAndILi4EEEbalRl:
   36|  2.25k|                                                int64_t& res) {
   37|  2.25k|  res &= VarintShlByte<n>(byte, ones);
   38|  2.25k|  return res >= 0;
   39|  2.25k|}
_ZN6google8protobuf8internal13VarintShlByteILi4EEElal:
   26|  2.25k|inline PROTOBUF_ALWAYS_INLINE int64_t VarintShlByte(int8_t byte, int64_t ones) {
   27|  2.25k|  return static_cast<int64_t>((static_cast<uint64_t>(byte) << n * 7) |
   28|  2.25k|                              (static_cast<uint64_t>(ones) >> (64 - n * 7)));
   29|  2.25k|}
_ZN6google8protobuf8internal19ShiftMixParseVarintImLi10EEEPKcS4_Rl:
   53|  7.68k|                                                              int64_t& res1) {
   54|  7.68k|  using Signed = std::make_signed_t<VarintType>;
   55|  7.68k|  constexpr bool kIs64BitVarint = std::is_same<Signed, int64_t>::value;
   56|  7.68k|  constexpr bool kIs32BitVarint = std::is_same<Signed, int32_t>::value;
   57|  7.68k|  static_assert(kIs64BitVarint || kIs32BitVarint, "");
   58|       |
   59|       |  // The algorithm relies on sign extension for each byte to set all high bits
   60|       |  // when the varint continues. It also relies on asserting all of the lower
   61|       |  // bits for each successive byte read. This allows the result to be aggregated
   62|       |  // using a bitwise AND. For example:
   63|       |  //
   64|       |  //          8       1          64     57 ... 24     17  16      9  8       1
   65|       |  // ptr[0] = 1aaa aaaa ; res1 = 1111 1111 ... 1111 1111  1111 1111  1aaa aaaa
   66|       |  // ptr[1] = 1bbb bbbb ; res2 = 1111 1111 ... 1111 1111  11bb bbbb  b111 1111
   67|       |  // ptr[2] = 0ccc cccc ; res3 = 0000 0000 ... 000c cccc  cc11 1111  1111 1111
   68|       |  //                             ---------------------------------------------
   69|       |  //        res1 & res2 & res3 = 0000 0000 ... 000c cccc  ccbb bbbb  baaa aaaa
   70|       |  //
   71|       |  // On x86-64, a shld from a single register filled with enough 1s in the high
   72|       |  // bits can accomplish all this in one instruction. It so happens that res1
   73|       |  // has 57 high bits of ones, which is enough for the largest shift done.
   74|       |  //
   75|       |  // Just as importantly, by keeping results in res1, res2, and res3, we take
   76|       |  // advantage of the superscalar abilities of the CPU.
   77|  7.68k|  const auto next = [&p] { return static_cast<const int8_t>(*p++); };
   78|  7.68k|  const auto last = [&p] { return static_cast<const int8_t>(p[-1]); };
   79|       |
   80|  7.68k|  int64_t res2, res3;  // accumulated result chunks
   81|  7.68k|  res1 = next();
   82|  7.68k|  if (PROTOBUF_PREDICT_TRUE(res1 >= 0)) return p;
  ------------------
  |  |  364|  7.68k|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 5.24k, False: 2.43k]
  |  |  |  Branch (364:53): [Folded, False: 7.68k]
  |  |  |  Branch (364:62): [True: 5.24k, False: 2.43k]
  |  |  ------------------
  ------------------
   83|  2.43k|  if (limit <= 1) goto limit0;
  ------------------
  |  Branch (83:7): [Folded, False: 2.43k]
  ------------------
   84|       |
   85|       |  // Densify all ops with explicit FALSE predictions from here on, except that
   86|       |  // we predict length = 5 as a common length for fields like timestamp.
   87|  2.43k|  if (PROTOBUF_PREDICT_FALSE(VarintShl<1>(next(), res1, res2))) goto done1;
  ------------------
  |  |  365|  2.43k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 136, False: 2.30k]
  |  |  |  Branch (365:54): [Folded, False: 2.43k]
  |  |  |  Branch (365:63): [True: 136, False: 2.30k]
  |  |  ------------------
  ------------------
   88|  2.30k|  if (limit <= 2) goto limit1;
  ------------------
  |  Branch (88:7): [Folded, False: 2.30k]
  ------------------
   89|  2.30k|  if (PROTOBUF_PREDICT_FALSE(VarintShl<2>(next(), res1, res3))) goto done2;
  ------------------
  |  |  365|  2.30k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 70, False: 2.23k]
  |  |  |  Branch (365:54): [Folded, False: 2.30k]
  |  |  |  Branch (365:63): [True: 70, False: 2.23k]
  |  |  ------------------
  ------------------
   90|  2.23k|  if (limit <= 3) goto limit2;
  ------------------
  |  Branch (90:7): [Folded, False: 2.23k]
  ------------------
   91|  2.23k|  if (PROTOBUF_PREDICT_FALSE(VarintShlAnd<3>(next(), res1, res2))) goto done2;
  ------------------
  |  |  365|  2.23k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 91, False: 2.14k]
  |  |  |  Branch (365:54): [Folded, False: 2.23k]
  |  |  |  Branch (365:63): [True: 91, False: 2.14k]
  |  |  ------------------
  ------------------
   92|  2.14k|  if (limit <= 4) goto limit2;
  ------------------
  |  Branch (92:7): [Folded, False: 2.14k]
  ------------------
   93|  2.14k|  if (PROTOBUF_PREDICT_TRUE(VarintShlAnd<4>(next(), res1, res3))) goto done2;
  ------------------
  |  |  364|  2.14k|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 86, False: 2.05k]
  |  |  |  Branch (364:53): [Folded, False: 2.14k]
  |  |  |  Branch (364:62): [True: 86, False: 2.05k]
  |  |  ------------------
  ------------------
   94|  2.05k|  if (limit <= 5) goto limit2;
  ------------------
  |  Branch (94:7): [Folded, False: 2.05k]
  ------------------
   95|       |
   96|  2.05k|  if (kIs64BitVarint) {
  ------------------
  |  Branch (96:7): [True: 2.05k, Folded]
  ------------------
   97|  2.05k|    if (PROTOBUF_PREDICT_FALSE(VarintShlAnd<5>(next(), res1, res2))) goto done2;
  ------------------
  |  |  365|  2.05k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 115, False: 1.94k]
  |  |  |  Branch (365:54): [Folded, False: 2.05k]
  |  |  |  Branch (365:63): [True: 115, False: 1.94k]
  |  |  ------------------
  ------------------
   98|  1.94k|    if (limit <= 6) goto limit2;
  ------------------
  |  Branch (98:9): [Folded, False: 1.94k]
  ------------------
   99|  1.94k|    if (PROTOBUF_PREDICT_FALSE(VarintShlAnd<6>(next(), res1, res3))) goto done2;
  ------------------
  |  |  365|  1.94k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 202, False: 1.73k]
  |  |  |  Branch (365:54): [Folded, False: 1.94k]
  |  |  |  Branch (365:63): [True: 202, False: 1.73k]
  |  |  ------------------
  ------------------
  100|  1.73k|    if (limit <= 7) goto limit2;
  ------------------
  |  Branch (100:9): [Folded, False: 1.73k]
  ------------------
  101|  1.73k|    if (PROTOBUF_PREDICT_FALSE(VarintShlAnd<7>(next(), res1, res2))) goto done2;
  ------------------
  |  |  365|  1.73k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 255, False: 1.48k]
  |  |  |  Branch (365:54): [Folded, False: 1.73k]
  |  |  |  Branch (365:63): [True: 255, False: 1.48k]
  |  |  ------------------
  ------------------
  102|  1.48k|    if (limit <= 8) goto limit2;
  ------------------
  |  Branch (102:9): [Folded, False: 1.48k]
  ------------------
  103|  1.48k|    if (PROTOBUF_PREDICT_FALSE(VarintShlAnd<8>(next(), res1, res3))) goto done2;
  ------------------
  |  |  365|  1.48k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 263, False: 1.22k]
  |  |  |  Branch (365:54): [Folded, False: 1.48k]
  |  |  |  Branch (365:63): [True: 263, False: 1.22k]
  |  |  ------------------
  ------------------
  104|  1.22k|    if (limit <= 9) goto limit2;
  ------------------
  |  Branch (104:9): [Folded, False: 1.22k]
  ------------------
  105|  1.22k|  } else {
  106|       |    // An overlong int32 is expected to span the full 10 bytes
  107|      0|    if (PROTOBUF_PREDICT_FALSE(!(next() & 0x80))) goto done2;
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  108|      0|    if (limit <= 6) goto limit2;
  ------------------
  |  Branch (108:9): [Folded, False: 0]
  ------------------
  109|      0|    if (PROTOBUF_PREDICT_FALSE(!(next() & 0x80))) goto done2;
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  110|      0|    if (limit <= 7) goto limit2;
  ------------------
  |  Branch (110:9): [Folded, False: 0]
  ------------------
  111|      0|    if (PROTOBUF_PREDICT_FALSE(!(next() & 0x80))) goto done2;
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  112|      0|    if (limit <= 8) goto limit2;
  ------------------
  |  Branch (112:9): [Folded, False: 0]
  ------------------
  113|      0|    if (PROTOBUF_PREDICT_FALSE(!(next() & 0x80))) goto done2;
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  114|      0|    if (limit <= 9) goto limit2;
  ------------------
  |  Branch (114:9): [Folded, False: 0]
  ------------------
  115|      0|  }
  116|       |
  117|       |  // For valid 64bit varints, the 10th byte/ptr[9] should be exactly 1. In this
  118|       |  // case, the continuation bit of ptr[8] already set the top bit of res3
  119|       |  // correctly, so all we have to do is check that the expected case is true.
  120|  1.22k|  if (PROTOBUF_PREDICT_TRUE(next() == 1)) goto done2;
  ------------------
  |  |  364|  1.22k|# define PROTOBUF_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (364:35): [True: 1.22k, False: 0]
  |  |  |  Branch (364:53): [Folded, False: 1.22k]
  |  |  |  Branch (364:62): [True: 1.22k, False: 0]
  |  |  ------------------
  ------------------
  121|       |
  122|      0|  if (PROTOBUF_PREDICT_FALSE(last() & 0x80)) {
  ------------------
  |  |  365|      0|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (365:36): [True: 0, False: 0]
  |  |  |  Branch (365:54): [Folded, False: 0]
  |  |  |  Branch (365:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  123|       |    // If the continue bit is set, it is an unterminated varint.
  124|      0|    return nullptr;
  125|      0|  }
  126|       |
  127|       |  // A zero value of the first bit of the 10th byte represents an
  128|       |  // over-serialized varint. This case should not happen, but if does (say, due
  129|       |  // to a nonconforming serializer), deassert the continuation bit that came
  130|       |  // from ptr[8].
  131|      0|  if (kIs64BitVarint && (last() & 1) == 0) {
  ------------------
  |  Branch (131:7): [True: 0, Folded]
  |  Branch (131:25): [True: 0, False: 0]
  ------------------
  132|      0|    static constexpr int bits = 64 - 1;
  133|      0|#if defined(__GCC_ASM_FLAG_OUTPUTS__) && defined(__x86_64__)
  134|       |    // Use a small instruction since this is an uncommon code path.
  135|      0|    asm("btc %[bits], %[res3]" : [res3] "+r"(res3) : [bits] "i"(bits));
  136|       |#else
  137|       |    res3 ^= int64_t{1} << bits;
  138|       |#endif
  139|      0|  }
  140|       |
  141|  2.30k|done2:
  142|  2.30k|  res2 &= res3;
  143|  2.43k|done1:
  144|  2.43k|  res1 &= res2;
  145|  2.43k|  PROTOBUF_ASSUME(p != nullptr);
  ------------------
  |  |  941|  2.43k|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  ------------------
  146|  2.43k|  return p;
  147|      0|limit2:
  148|      0|  res2 &= res3;
  149|      0|limit1:
  150|      0|  res1 &= res2;
  151|      0|limit0:
  152|      0|  PROTOBUF_ASSUME(p != nullptr);
  ------------------
  |  |  941|      0|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  ------------------
  153|      0|  PROTOBUF_ASSUME(res1 < 0);
  ------------------
  |  |  941|      0|#define PROTOBUF_ASSUME(pred) __builtin_assume(pred)
  ------------------
  154|      0|  return p;
  155|      0|}
_ZZN6google8protobuf8internal19ShiftMixParseVarintImLi10EEEPKcS4_RlENKUlvE_clEv:
   77|  25.2k|  const auto next = [&p] { return static_cast<const int8_t>(*p++); };
_ZN6google8protobuf8internal12VarintShlAndILi5EEEbalRl:
   36|  2.05k|                                                int64_t& res) {
   37|  2.05k|  res &= VarintShlByte<n>(byte, ones);
   38|  2.05k|  return res >= 0;
   39|  2.05k|}
_ZN6google8protobuf8internal13VarintShlByteILi5EEElal:
   26|  2.05k|inline PROTOBUF_ALWAYS_INLINE int64_t VarintShlByte(int8_t byte, int64_t ones) {
   27|  2.05k|  return static_cast<int64_t>((static_cast<uint64_t>(byte) << n * 7) |
   28|  2.05k|                              (static_cast<uint64_t>(ones) >> (64 - n * 7)));
   29|  2.05k|}
_ZN6google8protobuf8internal12VarintShlAndILi6EEEbalRl:
   36|  1.94k|                                                int64_t& res) {
   37|  1.94k|  res &= VarintShlByte<n>(byte, ones);
   38|  1.94k|  return res >= 0;
   39|  1.94k|}
_ZN6google8protobuf8internal13VarintShlByteILi6EEElal:
   26|  1.94k|inline PROTOBUF_ALWAYS_INLINE int64_t VarintShlByte(int8_t byte, int64_t ones) {
   27|  1.94k|  return static_cast<int64_t>((static_cast<uint64_t>(byte) << n * 7) |
   28|  1.94k|                              (static_cast<uint64_t>(ones) >> (64 - n * 7)));
   29|  1.94k|}
_ZN6google8protobuf8internal12VarintShlAndILi7EEEbalRl:
   36|  1.73k|                                                int64_t& res) {
   37|  1.73k|  res &= VarintShlByte<n>(byte, ones);
   38|  1.73k|  return res >= 0;
   39|  1.73k|}
_ZN6google8protobuf8internal13VarintShlByteILi7EEElal:
   26|  1.73k|inline PROTOBUF_ALWAYS_INLINE int64_t VarintShlByte(int8_t byte, int64_t ones) {
   27|  1.73k|  return static_cast<int64_t>((static_cast<uint64_t>(byte) << n * 7) |
   28|  1.73k|                              (static_cast<uint64_t>(ones) >> (64 - n * 7)));
   29|  1.73k|}
_ZN6google8protobuf8internal12VarintShlAndILi8EEEbalRl:
   36|  1.48k|                                                int64_t& res) {
   37|  1.48k|  res &= VarintShlByte<n>(byte, ones);
   38|  1.48k|  return res >= 0;
   39|  1.48k|}
_ZN6google8protobuf8internal13VarintShlByteILi8EEElal:
   26|  1.48k|inline PROTOBUF_ALWAYS_INLINE int64_t VarintShlByte(int8_t byte, int64_t ones) {
   27|  1.48k|  return static_cast<int64_t>((static_cast<uint64_t>(byte) << n * 7) |
   28|  1.48k|                              (static_cast<uint64_t>(ones) >> (64 - n * 7)));
   29|  1.48k|}

_ZN6google8protobuf8internal10WireFormat26VerifyUTF8StringNamedFieldEPKciNS2_9OperationEN4absl12lts_2024011611string_viewE:
  357|     29|    const absl::string_view field_name) {
  358|       |#ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
  359|       |  WireFormatLite::VerifyUtf8String(
  360|       |      data, size, static_cast<WireFormatLite::Operation>(op), field_name);
  361|       |#else
  362|       |  // Avoid the compiler warning about unused variables.
  363|     29|  (void)data;
  364|     29|  (void)size;
  365|     29|  (void)op;
  366|     29|  (void)field_name;
  367|     29|#endif
  368|     29|}

_ZN6google8protobuf8internal14WireFormatLite20InternalWriteMessageEiRKNS0_11MessageLiteEiPhPNS0_2io19EpsCopyOutputStreamE:
  537|    266|                                              io::EpsCopyOutputStream* stream) {
  538|    266|  target = stream->EnsureSpace(target);
  539|    266|  target = WriteTagToArray(field_number, WIRETYPE_LENGTH_DELIMITED, target);
  540|    266|  target = io::CodedOutputStream::WriteVarint32ToArray(
  541|    266|      static_cast<uint32_t>(cached_size), target);
  542|    266|  return value._InternalSerialize(target, stream);
  543|    266|}
_ZN6google8protobuf8internal14WireFormatLite8EnumSizeERKNS0_13RepeatedFieldIiEE:
  753|     17|size_t WireFormatLite::EnumSize(const RepeatedField<int>& value) {
  754|       |  // On ILP64, sizeof(int) == 8, which would require a different template.
  755|     17|  return VarintSize<false, true>(value.data(), value.size());
  756|     17|}
wire_format_lite.cc:_ZN6google8protobuf8internalL10VarintSizeILb0ELb1EiEEmPKT1_i:
  635|     17|static size_t VarintSize(const T* data, const int n) {
  636|     17|  static_assert(sizeof(T) == 4, "This routine only works for 32 bit integers");
  637|       |  // is_unsigned<T> => !ZigZag
  638|     17|  static_assert(
  639|     17|      (std::is_unsigned<T>::value ^ ZigZag) || std::is_signed<T>::value,
  640|     17|      "Cannot ZigZag encode unsigned types");
  641|       |  // is_unsigned<T> => !SignExtended
  642|     17|  static_assert(
  643|     17|      (std::is_unsigned<T>::value ^ SignExtended) || std::is_signed<T>::value,
  644|     17|      "Cannot SignExtended unsigned types");
  645|     17|  static_assert(!(SignExtended && ZigZag),
  646|     17|                "Cannot SignExtended and ZigZag on the same type");
  647|       |  // This approach is only faster when vectorized, and the vectorized
  648|       |  // implementation only works in units of the platform's vector width, and is
  649|       |  // only faster once a certain number of iterations are used. Normally the
  650|       |  // compiler generates two loops - one partially unrolled vectorized loop that
  651|       |  // processes big chunks, and a second "epilogue" scalar loop to finish up the
  652|       |  // remainder. This is done manually here so that the faster scalar
  653|       |  // implementation is used for small inputs and for the epilogue.
  654|     17|  int vectorN = n & -32;
  655|     17|  uint32_t sum = vectorN;
  656|     17|  uint32_t msb_sum = 0;
  657|     17|  int i = 0;
  658|     17|  for (; i < vectorN; i++) {
  ------------------
  |  Branch (658:10): [True: 0, False: 17]
  ------------------
  659|      0|    uint32_t x = data[i];
  660|      0|    if (ZigZag) {
  ------------------
  |  Branch (660:9): [Folded, False: 0]
  ------------------
  661|      0|      x = WireFormatLite::ZigZagEncode32(x);
  662|      0|    } else if (SignExtended) {
  ------------------
  |  Branch (662:16): [True: 0, Folded]
  ------------------
  663|      0|      msb_sum += x >> 31;
  664|      0|    }
  665|       |    // clang is so smart that it produces optimal SIMD sequence unrolling
  666|       |    // the loop 8 ints at a time. With a sequence of 4
  667|       |    // cmpres = cmpgt x, sizeclass  ( -1 or 0)
  668|       |    // sum = sum - cmpres
  669|      0|    if (x > 0x7F) sum++;
  ------------------
  |  Branch (669:9): [True: 0, False: 0]
  ------------------
  670|      0|    if (x > 0x3FFF) sum++;
  ------------------
  |  Branch (670:9): [True: 0, False: 0]
  ------------------
  671|      0|    if (x > 0x1FFFFF) sum++;
  ------------------
  |  Branch (671:9): [True: 0, False: 0]
  ------------------
  672|      0|    if (x > 0xFFFFFFF) sum++;
  ------------------
  |  Branch (672:9): [True: 0, False: 0]
  ------------------
  673|      0|  }
  674|     17|#ifdef __clang__
  675|       |// Clang is not smart enough to see that this loop doesn't run many times
  676|       |// NOLINTNEXTLINE(google3-runtime-pragma-loop-hint): b/315043579
  677|     17|#pragma clang loop vectorize(disable) unroll(disable) interleave(disable)
  678|     17|#endif
  679|     36|  for (; i < n; i++) {
  ------------------
  |  Branch (679:10): [True: 19, False: 17]
  ------------------
  680|     19|    uint32_t x = data[i];
  681|     19|    if (ZigZag) {
  ------------------
  |  Branch (681:9): [Folded, False: 19]
  ------------------
  682|      0|      sum += WireFormatLite::SInt32Size(x);
  683|     19|    } else if (SignExtended) {
  ------------------
  |  Branch (683:16): [True: 19, Folded]
  ------------------
  684|     19|      sum += WireFormatLite::Int32Size(x);
  685|     19|    } else {
  686|      0|      sum += WireFormatLite::UInt32Size(x);
  687|      0|    }
  688|     19|  }
  689|     17|  if (SignExtended) sum += msb_sum * 5;
  ------------------
  |  Branch (689:7): [True: 17, Folded]
  ------------------
  690|     17|  return sum;
  691|     17|}

_ZN6google8protobuf8internal14WireFormatLite20WireTypeForFieldTypeENS2_9FieldTypeE:
  141|      8|      WireFormatLite::FieldType type) {
  142|      8|    return kWireTypeForFieldType[type];
  143|      8|  }
_ZN6google8protobuf8internal14WireFormatLite18FieldTypeToCppTypeENS2_9FieldTypeE:
  823|  1.24k|    FieldType type) {
  824|  1.24k|  return kFieldTypeToCppTypeMap[type];
  825|  1.24k|}
_ZN6google8protobuf8internal14WireFormatLite7TagSizeEiNS2_9FieldTypeE:
  841|    474|                                      WireFormatLite::FieldType type) {
  842|    474|  size_t result = io::CodedOutputStream::VarintSize32(
  843|    474|      static_cast<uint32_t>(field_number << kTagTypeBits));
  844|    474|  if (type == TYPE_GROUP) {
  ------------------
  |  Branch (844:7): [True: 0, False: 474]
  ------------------
  845|       |    // Groups have both a start and an end tag.
  846|      0|    return result * 2;
  847|    474|  } else {
  848|    474|    return result;
  849|    474|  }
  850|    474|}
_ZN6google8protobuf8internal14WireFormatLite9Int32SizeEi:
 1781|     19|inline size_t WireFormatLite::Int32Size(int32_t value) {
 1782|     19|  return io::CodedOutputStream::VarintSize32SignExtended(value);
 1783|     19|}
_ZN6google8protobuf8internal14WireFormatLite10StringSizeERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
 1825|     29|inline size_t WireFormatLite::StringSize(const std::string& value) {
 1826|     29|  return LengthDelimitedSize(value.size());
 1827|     29|}
_ZN6google8protobuf8internal14WireFormatLite11MessageSizeINS0_27FieldOptions_EditionDefaultEEEmRKT_:
 1855|     18|inline size_t WireFormatLite::MessageSize(const MessageType& value) {
 1856|     18|  return LengthDelimitedSize(value.ByteSizeLong());
 1857|     18|}
_ZN6google8protobuf8internal14WireFormatLite11MessageSizeINS0_27FieldOptions_FeatureSupportEEEmRKT_:
 1855|      9|inline size_t WireFormatLite::MessageSize(const MessageType& value) {
 1856|      9|  return LengthDelimitedSize(value.ByteSizeLong());
 1857|      9|}

feature_resolver.cc:_ZN4absl12lts_2024011613c_upper_boundIKN6google8protobuf16RepeatedPtrFieldINS3_43FeatureSetDefaults_FeatureSetEditionDefaultEEES5_RZNS3_15FeatureResolver6CreateENS3_7EditionERKNS3_18FeatureSetDefaultsEE3$_0EEDTcl5beginclsr3stdE7declvalIRT_EEEESG_RKT0_OT1_:
 1086|      4|    Sequence& sequence, const T& value, LessThan&& comp) {
 1087|      4|  return std::upper_bound(container_algorithm_internal::c_begin(sequence),
 1088|      4|                          container_algorithm_internal::c_end(sequence), value,
 1089|      4|                          std::forward<LessThan>(comp));
 1090|      4|}
_ZN4absl12lts_2024011628container_algorithm_internal7c_beginIKN6google8protobuf16RepeatedPtrFieldINS4_43FeatureSetDefaults_FeatureSetEditionDefaultEEEEEDTcl5beginclsr3stdE7declvalIRT_EEEESA_:
  100|      4|ContainerIter<C> c_begin(C& c) {
  101|      4|  return begin(c);
  102|      4|}
_ZN4absl12lts_2024011628container_algorithm_internal5c_endIKN6google8protobuf16RepeatedPtrFieldINS4_43FeatureSetDefaults_FeatureSetEditionDefaultEEEEEDTcl5beginclsr3stdE7declvalIRT_EEEESA_:
  105|      4|ContainerIter<C> c_end(C& c) {
  106|      4|  return end(c);
  107|      4|}

_ZN4absl12lts_202401169once_flagC2Ev:
   89|     59|  constexpr once_flag() : control_(0) {}
_ZN4absl12lts_2024011613base_internal16SchedulingHelperC2ENS1_14SchedulingModeE:
  116|      4|  explicit SchedulingHelper(base_internal::SchedulingMode mode) : mode_(mode) {
  117|      4|    if (mode_ == base_internal::SCHEDULE_KERNEL_ONLY) {
  ------------------
  |  Branch (117:9): [True: 0, False: 4]
  ------------------
  118|      0|      guard_result_ = base_internal::SchedulingGuard::DisableRescheduling();
  119|      0|    }
  120|      4|  }
_ZN4absl12lts_2024011613base_internal16SchedulingHelperD2Ev:
  122|      4|  ~SchedulingHelper() {
  123|      4|    if (mode_ == base_internal::SCHEDULE_KERNEL_ONLY) {
  ------------------
  |  Branch (123:9): [True: 0, False: 4]
  ------------------
  124|      0|      base_internal::SchedulingGuard::EnableRescheduling(guard_result_);
  125|      0|    }
  126|      4|  }
_ZN4absl12lts_2024011613base_internal11ControlWordEPNS0_9once_flagE:
  193|   215k|    absl::Nonnull<once_flag*> flag) {
  194|   215k|  return &flag->control_;
  195|   215k|}
message.cc:_ZN4absl12lts_202401169call_onceIZN6google8protobuf7Message15GetMetadataImplERKNS3_8internal13ClassDataFullEE3$_0JEEEvRNS0_9once_flagEOT_DpOT0_:
  212|   215k|void call_once(absl::once_flag& flag, Callable&& fn, Args&&... args) {
  213|   215k|  std::atomic<uint32_t>* once = base_internal::ControlWord(&flag);
  214|   215k|  uint32_t s = once->load(std::memory_order_acquire);
  215|   215k|  if (ABSL_PREDICT_FALSE(s != base_internal::kOnceDone)) {
  ------------------
  |  |  178|   215k|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 4, False: 215k]
  |  |  |  Branch (178:49): [Folded, False: 215k]
  |  |  |  Branch (178:58): [True: 4, False: 215k]
  |  |  ------------------
  ------------------
  216|      4|    base_internal::CallOnceImpl(
  217|      4|        once, base_internal::SCHEDULE_COOPERATIVE_AND_KERNEL,
  218|      4|        std::forward<Callable>(fn), std::forward<Args>(args)...);
  219|      4|  }
  220|   215k|}
message.cc:_ZN4absl12lts_2024011613base_internal12CallOnceImplIZN6google8protobuf7Message15GetMetadataImplERKNS4_8internal13ClassDataFullEE3$_0JEEEvPNSt3__16atomicIjEENS1_14SchedulingModeEOT_DpOT0_:
  153|      4|    Args&&... args) {
  154|       |#ifndef NDEBUG
  155|       |  {
  156|       |    uint32_t old_control = control->load(std::memory_order_relaxed);
  157|       |    if (old_control != kOnceInit &&
  158|       |        old_control != kOnceRunning &&
  159|       |        old_control != kOnceWaiter &&
  160|       |        old_control != kOnceDone) {
  161|       |      ABSL_RAW_LOG(FATAL, "Unexpected value for control word: 0x%lx",
  162|       |                   static_cast<unsigned long>(old_control));  // NOLINT
  163|       |    }
  164|       |  }
  165|       |#endif  // NDEBUG
  166|      4|  static const base_internal::SpinLockWaitTransition trans[] = {
  167|      4|      {kOnceInit, kOnceRunning, true},
  168|      4|      {kOnceRunning, kOnceWaiter, false},
  169|      4|      {kOnceDone, kOnceDone, true}};
  170|       |
  171|       |  // Must do this before potentially modifying control word's state.
  172|      4|  base_internal::SchedulingHelper maybe_disable_scheduling(scheduling_mode);
  173|       |  // Short circuit the simplest case to avoid procedure call overhead.
  174|       |  // The base_internal::SpinLockWait() call returns either kOnceInit or
  175|       |  // kOnceDone. If it returns kOnceDone, it must have loaded the control word
  176|       |  // with std::memory_order_acquire and seen a value of kOnceDone.
  177|      4|  uint32_t old_control = kOnceInit;
  178|      4|  if (control->compare_exchange_strong(old_control, kOnceRunning,
  ------------------
  |  Branch (178:7): [True: 4, False: 0]
  ------------------
  179|      4|                                       std::memory_order_relaxed) ||
  180|      0|      base_internal::SpinLockWait(control, ABSL_ARRAYSIZE(trans), trans,
  ------------------
  |  |   45|      0|  (sizeof(::absl::macros_internal::ArraySizeHelper(array)))
  ------------------
  |  Branch (180:7): [True: 0, False: 0]
  ------------------
  181|      4|                                  scheduling_mode) == kOnceInit) {
  182|      4|    base_internal::invoke(std::forward<Callable>(fn),
  183|      4|                          std::forward<Args>(args)...);
  184|      4|    old_control =
  185|      4|        control->exchange(base_internal::kOnceDone, std::memory_order_release);
  186|      4|    if (old_control == base_internal::kOnceWaiter) {
  ------------------
  |  Branch (186:9): [True: 0, False: 4]
  ------------------
  187|      0|      base_internal::SpinLockWake(control, true);
  188|      0|    }
  189|      4|  }  // else *control is already kOnceDone
  190|      4|}

_ZN4absl12lts_202401168bit_castIPKvN6google8protobuf8internal12ExtensionSet9Extension7PointerETnNSt3__19enable_ifIXaaaaeqstT_stT0_sr3std21is_trivially_copyableISD_EE5valuesr3std21is_trivially_copyableISC_EE5valueEiE4typeELi0EEESC_RKSD_:
  163|  1.71k|inline constexpr Dest bit_cast(const Source& source) {
  164|  1.71k|  return __builtin_bit_cast(Dest, source);
  165|  1.71k|}

message.cc:_ZN4absl12lts_2024011613base_internal6invokeIZN6google8protobuf7Message15GetMetadataImplERKNS4_8internal13ClassDataFullEE3$_0JEEEDTclsr7InvokerIT_DpT0_E4typeE6Invokeclsr3stdE7declvalISB_EEspclsr3stdE7declvalISC_EEEEOSB_DpOSC_:
  211|      4|invoke_result_t<F, Args...> invoke(F&& f, Args&&... args) {
  212|      4|  return Invoker<F, Args...>::type::Invoke(std::forward<F>(f),
  213|      4|                                           std::forward<Args>(args)...);
  214|      4|}
message.cc:_ZN4absl12lts_2024011613base_internal8Callable6InvokeIZN6google8protobuf7Message15GetMetadataImplERKNS5_8internal13ClassDataFullEE3$_0JEEEDTclclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSC_DpOSD_:
  184|      4|      F&& f, Args&&... args) {
  185|      4|    return std::forward<F>(f)(std::forward<Args>(args)...);
  186|      4|  }

_ZN4absl12lts_2024011613base_internal15UnalignedLoad32EPKv:
   45|  19.7k|inline uint32_t UnalignedLoad32(absl::Nonnull<const void *> p) {
   46|  19.7k|  uint32_t t;
   47|  19.7k|  memcpy(&t, p, sizeof t);
   48|  19.7k|  return t;
   49|  19.7k|}
_ZN4absl12lts_2024011613base_internal15UnalignedLoad64EPKv:
   51|  11.7k|inline uint64_t UnalignedLoad64(absl::Nonnull<const void *> p) {
   52|  11.7k|  uint64_t t;
   53|  11.7k|  memcpy(&t, p, sizeof t);
   54|  11.7k|  return t;
   55|  11.7k|}

_ZN4absl12lts_2024011623PrefetchToLocalCacheNtaEPKv:
  151|    508|    const void* addr) {
  152|    508|  __builtin_prefetch(addr, 0, 0);
  153|    508|}
_ZN4absl12lts_2024011628PrefetchToLocalCacheForWriteEPKv:
  156|  7.75k|    const void* addr) {
  157|       |  // [x86] gcc/clang don't generate PREFETCHW for __builtin_prefetch(.., 1)
  158|       |  // unless -march=broadwell or newer; this is not generally the default, so we
  159|       |  // manually emit prefetchw. PREFETCHW is recognized as a no-op on older Intel
  160|       |  // processors and has been present on AMD processors since the K6-2.
  161|  7.75k|#if defined(__x86_64__) && !defined(__PRFCHW__)
  162|  7.75k|  asm("prefetchw %0" : : "m"(*reinterpret_cast<const char*>(addr)));
  163|       |#else
  164|       |  __builtin_prefetch(addr, 1, 3);
  165|       |#endif
  166|  7.75k|}

descriptor.cc:_ZN4absl12lts_2024011611MakeCleanupIJEZN6google8protobuf12_GLOBAL__N_115DisableTrackingEvE3$_0EENS0_7CleanupINS0_16cleanup_internal3TagET0_EES9_:
  127|     28|absl::Cleanup<cleanup_internal::Tag, Callback> MakeCleanup(Callback callback) {
  128|     28|  static_assert(cleanup_internal::WasDeduced<cleanup_internal::Tag, Args...>(),
  129|     28|                "Explicit template parameters are not supported.");
  130|       |
  131|     28|  static_assert(cleanup_internal::ReturnsVoid<Callback>(),
  132|     28|                "Callbacks that return values are not supported.");
  133|       |
  134|     28|  return {std::move(callback)};
  135|     28|}
descriptor.cc:_ZN4absl12lts_202401167CleanupINS0_16cleanup_internal3TagEZN6google8protobuf12_GLOBAL__N_115DisableTrackingEvE3$_0EC2ES7_:
   89|     28|  Cleanup(Callback callback) : storage_(std::move(callback)) {}  // NOLINT
descriptor.cc:_ZN4absl12lts_202401167CleanupINS0_16cleanup_internal3TagEZN6google8protobuf12_GLOBAL__N_115DisableTrackingEvE3$_0ED2Ev:
  104|     28|  ~Cleanup() {
  105|     28|    if (storage_.IsCallbackEngaged()) {
  ------------------
  |  Branch (105:9): [True: 28, False: 0]
  ------------------
  106|     28|      storage_.InvokeCallback();
  107|     28|      storage_.DestroyCallback();
  108|     28|    }
  109|     28|  }

descriptor.cc:_ZN4absl12lts_2024011616cleanup_internal7StorageIZN6google8protobuf12_GLOBAL__N_115DisableTrackingEvE3$_0EC2ES6_:
   50|     28|  explicit Storage(Callback callback) {
   51|       |    // Placement-new into a character buffer is used for eager destruction when
   52|       |    // the cleanup is invoked or cancelled. To ensure this optimizes well, the
   53|       |    // behavior is implemented locally instead of using an absl::optional.
   54|     28|    ::new (GetCallbackBuffer()) Callback(std::move(callback));
   55|     28|    is_callback_engaged_ = true;
   56|     28|  }
descriptor.cc:_ZN4absl12lts_2024011616cleanup_internal7StorageIZN6google8protobuf12_GLOBAL__N_115DisableTrackingEvE3$_0E17GetCallbackBufferEv:
   73|     84|  void* GetCallbackBuffer() { return static_cast<void*>(+callback_buffer_); }
descriptor.cc:_ZNK4absl12lts_2024011616cleanup_internal7StorageIZN6google8protobuf12_GLOBAL__N_115DisableTrackingEvE3$_0E17IsCallbackEngagedEv:
   79|     28|  bool IsCallbackEngaged() const { return is_callback_engaged_; }
descriptor.cc:_ZN4absl12lts_2024011616cleanup_internal7StorageIZN6google8protobuf12_GLOBAL__N_115DisableTrackingEvE3$_0E14InvokeCallbackEv:
   86|     28|  void InvokeCallback() ABSL_NO_THREAD_SAFETY_ANALYSIS {
   87|     28|    std::move(GetCallback())();
   88|     28|  }
descriptor.cc:_ZN4absl12lts_2024011616cleanup_internal7StorageIZN6google8protobuf12_GLOBAL__N_115DisableTrackingEvE3$_0E11GetCallbackEv:
   75|     56|  Callback& GetCallback() {
   76|     56|    return *reinterpret_cast<Callback*>(GetCallbackBuffer());
   77|     56|  }
descriptor.cc:_ZN4absl12lts_2024011616cleanup_internal7StorageIZN6google8protobuf12_GLOBAL__N_115DisableTrackingEvE3$_0E15DestroyCallbackEv:
   81|     28|  void DestroyCallback() {
   82|     28|    is_callback_engaged_ = false;
   83|     28|    GetCallback().~Callback();
   84|     28|  }

_ZN4absl12lts_202401169btree_mapINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS5_15FieldDescriptorENS2_4lessIS9_EENS2_9allocatorINS3_IKS9_SC_EEEEEC2Ev:
  134|      2|  btree_map() {}
_ZN4absl12lts_2024011618container_internal10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS6_15FieldDescriptorENS3_4lessISA_EENS3_9allocatorINS4_IKSA_SD_EEEELi256ELb0EE3keyISI_EEDTdtfp_5firstERKT_:
  869|      1|      -> decltype((value.first)) {
  870|      1|    return value.first;
  871|      1|  }

_ZN4absl12lts_2024011618container_internal10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS6_11FileCompareENSt3__19allocatorIS7_EELi256ELb0EE3keyEPKS7_:
  812|      3|  static const Key &key(const slot_type *slot) { return *slot; }
_ZN4absl12lts_2024011618container_internal15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryEE9constructINSt3__19allocatorIS7_EEJS7_EEEvPT_PS7_DpOT0_:
  778|     10|  static void construct(Alloc *alloc, slot_type *slot, Args &&...args) {
  779|     10|    absl::allocator_traits<Alloc>::construct(*alloc, slot,
  780|     10|                                             std::forward<Args>(args)...);
  781|     10|  }
_ZN4absl12lts_2024011618container_internal15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryEE7elementEPS7_:
  774|     11|  static value_type &element(slot_type *slot) { return *slot; }
_ZN4absl12lts_2024011618container_internal15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryEE7destroyINSt3__19allocatorIS7_EEEEvPT_PS7_:
  794|      8|  static void destroy(Alloc *alloc, slot_type *slot) {
  795|      8|    absl::allocator_traits<Alloc>::destroy(*alloc, slot);
  796|      8|  }
_ZN4absl12lts_2024011618container_internal10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS6_11FileCompareENSt3__19allocatorIS7_EELi256ELb0EE3keyIS7_EERKT_SG_:
  809|      6|  static const V &key(const V &value) {
  810|      6|    return value;
  811|      6|  }
_ZN4absl12lts_2024011618container_internal15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryEE9constructINSt3__19allocatorIS7_EEJS7_EEEvPT_PS7_DpOT0_:
  778|      1|  static void construct(Alloc *alloc, slot_type *slot, Args &&...args) {
  779|      1|    absl::allocator_traits<Alloc>::construct(*alloc, slot,
  780|      1|                                             std::forward<Args>(args)...);
  781|      1|  }
_ZN4absl12lts_2024011618container_internal15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryEE7elementEPS7_:
  774|      1|  static value_type &element(slot_type *slot) { return *slot; }
_ZN4absl12lts_2024011618container_internal15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryEE7destroyINSt3__19allocatorIS7_EEEEvPT_PS7_:
  794|      1|  static void destroy(Alloc *alloc, slot_type *slot) {
  795|      1|    absl::allocator_traits<Alloc>::destroy(*alloc, slot);
  796|      1|  }
_ZN4absl12lts_2024011618container_internal10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS6_16ExtensionCompareENSt3__19allocatorIS7_EELi256ELb0EE3keyIS7_EERKT_SG_:
  809|      1|  static const V &key(const V &value) {
  810|      1|    return value;
  811|      1|  }
_ZN4absl12lts_2024011618container_internal10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS6_13SymbolCompareENSt3__19allocatorIS7_EELi256ELb0EE3keyEPKS7_:
  812|    351|  static const Key &key(const slot_type *slot) { return *slot; }
_ZN4absl12lts_2024011618container_internal15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryEE7elementEPKS7_:
  775|    108|  static const value_type &element(const slot_type *slot) { return *slot; }
_ZN4absl12lts_2024011618container_internal15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryEE9constructINSt3__19allocatorIS7_EEJS7_EEEvPT_PS7_DpOT0_:
  778|    235|  static void construct(Alloc *alloc, slot_type *slot, Args &&...args) {
  779|    235|    absl::allocator_traits<Alloc>::construct(*alloc, slot,
  780|    235|                                             std::forward<Args>(args)...);
  781|    235|  }
_ZN4absl12lts_2024011618container_internal15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryEE7elementEPS7_:
  774|    323|  static value_type &element(slot_type *slot) { return *slot; }
_ZN4absl12lts_2024011618container_internal15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryEE7destroyINSt3__19allocatorIS7_EEEEvPT_PS7_:
  794|    288|  static void destroy(Alloc *alloc, slot_type *slot) {
  795|    288|    absl::allocator_traits<Alloc>::destroy(*alloc, slot);
  796|    288|  }
_ZN4absl12lts_2024011618container_internal15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryEE9constructINSt3__19allocatorIS7_EEEEvPT_PS7_SF_:
  784|      8|  static void construct(Alloc *alloc, slot_type *slot, slot_type *other) {
  785|      8|    absl::allocator_traits<Alloc>::construct(*alloc, slot, std::move(*other));
  786|      8|  }
_ZN4absl12lts_2024011618container_internal15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryEE9constructINSt3__19allocatorIS7_EEJRKS7_EEEvPT_PS7_DpOT0_:
  778|     64|  static void construct(Alloc *alloc, slot_type *slot, Args &&...args) {
  779|     64|    absl::allocator_traits<Alloc>::construct(*alloc, slot,
  780|     64|                                             std::forward<Args>(args)...);
  781|     64|  }
_ZN4absl12lts_2024011618container_internal10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS6_13SymbolCompareENSt3__19allocatorIS7_EELi256ELb0EE3keyIS7_EERKT_SG_:
  809|     64|  static const V &key(const V &value) {
  810|     64|    return value;
  811|     64|  }

_ZN4absl12lts_2024011613flat_hash_mapIPKN6google8protobuf14FileDescriptorENSt3__16vectorINS3_14DescriptorPool18DeferredValidation13LifetimesInfoENS7_9allocatorISB_EEEENS0_18container_internal6HashEqIS6_vE4HashENSH_2EqENSC_INS7_4pairIKS6_SE_EEEEEC2Ev:
  159|      4|  flat_hash_map() {}
_ZN4absl12lts_2024011613flat_hash_mapINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeENS0_18container_internal10StringHashENSD_8StringEqENS6_INS2_4pairIKS8_SC_EEEEEC2Ev:
  159|      2|  flat_hash_map() {}
_ZN4absl12lts_2024011613flat_hash_mapINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_10unique_ptrIN6google8protobuf10FeatureSetENS2_14default_deleteISC_EEEENS0_18container_internal10StringHashENSG_8StringEqENS6_INS2_4pairIKS8_SF_EEEEEC2Ev:
  159|      2|  flat_hash_map() {}
_ZN4absl12lts_2024011618container_internal17FlatHashMapPolicyINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEE5applyINS1_12raw_hash_setISE_NS1_10StringHashENS1_8StringEqENS7_INS3_4pairIKS9_SD_EEEEE19EmplaceDecomposableEJRKNSJ_IS9_SD_EEEEEDTclsr4absl18container_internalE13DecomposePairclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSS_DpOST_:
  590|     32|  apply(F&& f, Args&&... args) {
  591|     32|    return absl::container_internal::DecomposePair(std::forward<F>(f),
  592|     32|                                                   std::forward<Args>(args)...);
  593|     32|  }
_ZN4absl12lts_2024011618container_internal17FlatHashMapPolicyINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEE5applyINS1_12raw_hash_setISE_NS1_10StringHashENS1_8StringEqENS7_INS3_4pairIKS9_SD_EEEEE12EqualElementIS9_EEJRSL_EEEDTclsr4absl18container_internalE13DecomposePairclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSR_DpOSS_:
  590|      7|  apply(F&& f, Args&&... args) {
  591|      7|    return absl::container_internal::DecomposePair(std::forward<F>(f),
  592|      7|                                                   std::forward<Args>(args)...);
  593|      7|  }
_ZN4absl12lts_2024011618container_internal17FlatHashMapPolicyINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEE7elementEPNS1_13map_slot_typeIS9_SD_EE:
  597|     36|  static std::pair<const K, V>& element(slot_type* slot) { return slot->value; }
_ZN4absl12lts_2024011618container_internal17FlatHashMapPolicyINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEE8transferINS7_INS3_4pairIKS9_SD_EEEEEEDaPT_PNS1_13map_slot_typeIS9_SD_EESO_:
  583|     50|                       slot_type* old_slot) {
  584|     50|    return slot_policy::transfer(alloc, new_slot, old_slot);
  585|     50|  }
_ZN4absl12lts_2024011618container_internal17FlatHashMapPolicyINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEE5applyINS1_12raw_hash_setISE_NS1_10StringHashENS1_8StringEqENS7_INS3_4pairIKS9_SD_EEEEE11HashElementEJRSL_EEEDTclsr4absl18container_internalE13DecomposePairclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSQ_DpOSR_:
  590|     28|  apply(F&& f, Args&&... args) {
  591|     28|    return absl::container_internal::DecomposePair(std::forward<F>(f),
  592|     28|                                                   std::forward<Args>(args)...);
  593|     28|  }
_ZN4absl12lts_2024011618container_internal17FlatHashMapPolicyINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEE9constructINS7_INS3_4pairIKS9_SD_EEEEJRKNS3_21piecewise_construct_tENS3_5tupleIJRSH_EEENSN_IJRKSD_EEEEEEvPT_PNS1_13map_slot_typeIS9_SD_EEDpOT0_:
  572|     32|  static void construct(Allocator* alloc, slot_type* slot, Args&&... args) {
  573|     32|    slot_policy::construct(alloc, slot, std::forward<Args>(args)...);
  574|     32|  }
_ZN4absl12lts_2024011613flat_hash_mapINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEPKN6google8protobuf23SourceCodeInfo_LocationENS0_18container_internal10StringHashENSE_8StringEqENS6_INS2_4pairIKS8_SD_EEEEEC2Ev:
  159|      4|  flat_hash_map() {}
_ZN4absl12lts_2024011618container_internal17FlatHashMapPolicyINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS3_10unique_ptrIN6google8protobuf10FeatureSetENS3_14default_deleteISD_EEEEE5valueEPNS3_4pairIKS9_SG_EE:
  599|    239|  static V& value(std::pair<const K, V>* kv) { return kv->second; }
_ZN4absl12lts_2024011618container_internal17FlatHashMapPolicyINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS3_10unique_ptrIN6google8protobuf10FeatureSetENS3_14default_deleteISD_EEEEE7elementEPNS1_13map_slot_typeIS9_SG_EE:
  597|    474|  static std::pair<const K, V>& element(slot_type* slot) { return slot->value; }
_ZN4absl12lts_2024011618container_internal17FlatHashMapPolicyINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS3_10unique_ptrIN6google8protobuf10FeatureSetENS3_14default_deleteISD_EEEEE5applyINS1_12raw_hash_setISH_NS1_10StringHashENS1_8StringEqENS7_INS3_4pairIKS9_SG_EEEEE12EqualElementIS9_EEJRSO_EEEDTclsr4absl18container_internalE13DecomposePairclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSU_DpOSV_:
  590|    235|  apply(F&& f, Args&&... args) {
  591|    235|    return absl::container_internal::DecomposePair(std::forward<F>(f),
  592|    235|                                                   std::forward<Args>(args)...);
  593|    235|  }
_ZN4absl12lts_2024011618container_internal17FlatHashMapPolicyINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS3_10unique_ptrIN6google8protobuf10FeatureSetENS3_14default_deleteISD_EEEEE8transferINS7_INS3_4pairIKS9_SG_EEEEEEDaPT_PNS1_13map_slot_typeIS9_SG_EESR_:
  583|      4|                       slot_type* old_slot) {
  584|      4|    return slot_policy::transfer(alloc, new_slot, old_slot);
  585|      4|  }
_ZN4absl12lts_2024011618container_internal17FlatHashMapPolicyINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS3_10unique_ptrIN6google8protobuf10FeatureSetENS3_14default_deleteISD_EEEEE9constructINS7_INS3_4pairIKS9_SG_EEEEJRKNS3_21piecewise_construct_tENS3_5tupleIJOS9_EEENSQ_IJEEEEEEvPT_PNS1_13map_slot_typeIS9_SG_EEDpOT0_:
  572|      4|  static void construct(Allocator* alloc, slot_type* slot, Args&&... args) {
  573|      4|    slot_policy::construct(alloc, slot, std::forward<Args>(args)...);
  574|      4|  }
_ZN4absl12lts_2024011613flat_hash_mapINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbNS0_18container_internal10StringHashENS9_8StringEqENS6_INS2_4pairIKS8_bEEEEEC2Ev:
  159|      2|  flat_hash_map() {}
_ZN4absl12lts_2024011613flat_hash_mapIPKN6google8protobuf10DescriptorENS3_17DescriptorBuilder12MessageHintsENS0_18container_internal6HashEqIS6_vE4HashENSB_2EqENSt3__19allocatorINSE_4pairIKS6_S8_EEEEEC2Ev:
  159|      4|  flat_hash_map() {}
_ZN4absl12lts_2024011613flat_hash_mapINSt3__16vectorIiNS2_9allocatorIiEEEES6_NS0_13hash_internal4HashIS6_EENS2_8equal_toIS6_EENS4_INS2_4pairIKS6_S6_EEEEEC2Ev:
  159|      4|  flat_hash_map() {}
_ZN4absl12lts_2024011613flat_hash_mapINSt3__16vectorIiNS2_9allocatorIiEEEEiNS0_13hash_internal4HashIS6_EENS2_8equal_toIS6_EENS4_INS2_4pairIKS6_iEEEEEC2Ev:
  159|      4|  flat_hash_map() {}
_ZN4absl12lts_2024011613flat_hash_mapIPKN6google8protobuf10DescriptorEPKNS3_21DynamicMessageFactory8TypeInfoENS0_18container_internal6HashEqIS6_vE4HashENSD_2EqENSt3__19allocatorINSG_4pairIKS6_SA_EEEEEC2Ev:
  159|      6|  flat_hash_map() {}
message.cc:_ZN4absl12lts_2024011613flat_hash_mapIPKN6google8protobuf10DescriptorENS3_12_GLOBAL__N_123GeneratedMessageFactory10MessagePtrENS0_18container_internal6HashEqIS6_vE4HashENSC_2EqENSt3__19allocatorINSF_4pairIKS6_S9_EEEEEC2Ev:
  159|      2|  flat_hash_map() {}

extension_set.cc:_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEE5applyINS1_12raw_hash_setIS7_NS5_12_GLOBAL__N_115ExtensionHasherENSA_11ExtensionEqENSt3__19allocatorIS6_EEE12EqualElementINSA_16ExtensionInfoKeyEEEJRS6_EEEDTclsr4absl18container_internalE14DecomposeValueclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSL_DpOSM_:
  486|      8|  apply(F&& f, Args&&... args) {
  487|      8|    return absl::container_internal::DecomposeValue(
  488|      8|        std::forward<F>(f), std::forward<Args>(args)...);
  489|      8|  }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEE7elementEPS6_:
  481|     16|  static T& element(slot_type* slot) { return *slot; }
extension_set.cc:_ZN4absl12lts_2024011613flat_hash_setIN6google8protobuf8internal13ExtensionInfoENS4_12_GLOBAL__N_115ExtensionHasherENS6_11ExtensionEqENSt3__19allocatorIS5_EEEC2Ev:
  151|      1|  flat_hash_set() {}
extension_set.cc:_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEE5applyINS1_12raw_hash_setIS7_NS5_12_GLOBAL__N_115ExtensionHasherENSA_11ExtensionEqENSt3__19allocatorIS6_EEE19EmplaceDecomposableEJRKS6_EEEDTclsr4absl18container_internalE14DecomposeValueclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSK_DpOSL_:
  486|      1|  apply(F&& f, Args&&... args) {
  487|      1|    return absl::container_internal::DecomposeValue(
  488|      1|        std::forward<F>(f), std::forward<Args>(args)...);
  489|      1|  }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEE9constructINSt3__19allocatorIS6_EEJRKS6_EEEvPT_PS6_DpOT0_:
  471|      1|  static void construct(Allocator* alloc, slot_type* slot, Args&&... args) {
  472|      1|    absl::allocator_traits<Allocator>::construct(*alloc, slot,
  473|      1|                                                 std::forward<Args>(args)...);
  474|      1|  }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEE7destroyINSt3__19allocatorIS7_EEEEvPT_PS7_:
  477|      4|  static void destroy(Allocator* alloc, slot_type* slot) {
  478|      4|    absl::allocator_traits<Allocator>::destroy(*alloc, slot);
  479|      4|  }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIN6google8protobuf6SymbolEE7destroyINSt3__19allocatorIS5_EEEEvPT_PS5_:
  477|  1.79k|  static void destroy(Allocator* alloc, slot_type* slot) {
  478|  1.79k|    absl::allocator_traits<Allocator>::destroy(*alloc, slot);
  479|  1.79k|  }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEE7destroyINSt3__19allocatorIS7_EEEEvPT_PS7_:
  477|    134|  static void destroy(Allocator* alloc, slot_type* slot) {
  478|    134|    absl::allocator_traits<Allocator>::destroy(*alloc, slot);
  479|    134|  }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEE7destroyINSt3__19allocatorIS7_EEEEvPT_PS7_:
  477|    120|  static void destroy(Allocator* alloc, slot_type* slot) {
  478|    120|    absl::allocator_traits<Allocator>::destroy(*alloc, slot);
  479|    120|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIN6google8protobuf6SymbolEE5applyINS1_12raw_hash_setIS6_NS4_12_GLOBAL__N_120SymbolByFullNameHashENS9_18SymbolByFullNameEqENSt3__19allocatorIS5_EEE12EqualElementINS9_13FullNameQueryEEEJRS5_EEEDTclsr4absl18container_internalE14DecomposeValueclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSK_DpOSL_:
  486|    105|  apply(F&& f, Args&&... args) {
  487|    105|    return absl::container_internal::DecomposeValue(
  488|    105|        std::forward<F>(f), std::forward<Args>(args)...);
  489|    105|  }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIN6google8protobuf6SymbolEE7elementEPS5_:
  481|  3.85k|  static T& element(slot_type* slot) { return *slot; }
descriptor.cc:_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEE5applyINS1_12raw_hash_setIS8_NS4_12_GLOBAL__N_121DescriptorsByNameHashIS5_EENSB_19DescriptorsByNameEqIS5_EENSt3__19allocatorIS7_EEE12EqualElementINS0_11string_viewEEEJRS7_EEEDTclsr4absl18container_internalE14DecomposeValueclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSO_DpOSP_:
  486|      7|  apply(F&& f, Args&&... args) {
  487|      7|    return absl::container_internal::DecomposeValue(
  488|      7|        std::forward<F>(f), std::forward<Args>(args)...);
  489|      7|  }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEE7elementEPS7_:
  481|     17|  static T& element(slot_type* slot) { return *slot; }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEE7elementEPS7_:
  481|    227|  static T& element(slot_type* slot) { return *slot; }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEE7elementEPS7_:
  481|    249|  static T& element(slot_type* slot) { return *slot; }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyINS0_11string_viewEE7destroyINSt3__19allocatorIS3_EEEEvPT_PS3_:
  477|      3|  static void destroy(Allocator* alloc, slot_type* slot) {
  478|      3|    absl::allocator_traits<Allocator>::destroy(*alloc, slot);
  479|      3|  }
_ZN4absl12lts_2024011613flat_hash_setINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS0_18container_internal10StringHashENS9_8StringEqENS6_IS8_EEEC2Ev:
  151|      4|  flat_hash_set() {}
_ZN4absl12lts_2024011613flat_hash_setIPKN6google8protobuf10DescriptorENS0_18container_internal6HashEqIS6_vE4HashENS9_2EqENSt3__19allocatorIS6_EEEC2Ev:
  151|      2|  flat_hash_set() {}
descriptor.cc:_ZN4absl12lts_2024011613flat_hash_setIN6google8protobuf6SymbolENS3_12_GLOBAL__N_120SymbolByFullNameHashENS5_18SymbolByFullNameEqENSt3__19allocatorIS4_EEEC2Ev:
  151|      2|  flat_hash_set() {}
descriptor.cc:_ZN4absl12lts_2024011613flat_hash_setIPKN6google8protobuf14FileDescriptorENS3_12_GLOBAL__N_121DescriptorsByNameHashIS4_EENS7_19DescriptorsByNameEqIS4_EENSt3__19allocatorIS6_EEEC2Ev:
  151|      2|  flat_hash_set() {}
descriptor.cc:_ZN4absl12lts_2024011613flat_hash_setIN6google8protobuf6SymbolENS3_12_GLOBAL__N_118SymbolByParentHashENS5_16SymbolByParentEqENSt3__19allocatorIS4_EEEC2Ev:
  151|      4|  flat_hash_set() {}
descriptor.cc:_ZN4absl12lts_2024011613flat_hash_setIPKN6google8protobuf15FieldDescriptorENS3_12_GLOBAL__N_116ParentNumberHashENS7_14ParentNumberEqENSt3__19allocatorIS6_EEEC2Ev:
  151|      4|  flat_hash_set() {}
descriptor.cc:_ZN4absl12lts_2024011613flat_hash_setIPKN6google8protobuf19EnumValueDescriptorENS3_12_GLOBAL__N_116ParentNumberHashENS7_14ParentNumberEqENSt3__19allocatorIS6_EEEC2Ev:
  151|      8|  flat_hash_set() {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIN6google8protobuf6SymbolEE5applyINS1_12raw_hash_setIS6_NS4_12_GLOBAL__N_120SymbolByFullNameHashENS9_18SymbolByFullNameEqENSt3__19allocatorIS5_EEE12EqualElementIS5_EEJRS5_EEEDTclsr4absl18container_internalE14DecomposeValueclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSJ_DpOSK_:
  486|     44|  apply(F&& f, Args&&... args) {
  487|     44|    return absl::container_internal::DecomposeValue(
  488|     44|        std::forward<F>(f), std::forward<Args>(args)...);
  489|     44|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEE5applyINS1_12raw_hash_setIS8_NS4_12_GLOBAL__N_121DescriptorsByNameHashIS5_EENSB_19DescriptorsByNameEqIS5_EENSt3__19allocatorIS7_EEE12EqualElementIS7_EEJRS7_EEEDTclsr4absl18container_internalE14DecomposeValueclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSN_DpOSO_:
  486|      1|  apply(F&& f, Args&&... args) {
  487|      1|    return absl::container_internal::DecomposeValue(
  488|      1|        std::forward<F>(f), std::forward<Args>(args)...);
  489|      1|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEE5applyINS1_12raw_hash_setIS8_NS4_12_GLOBAL__N_116ParentNumberHashENSB_14ParentNumberEqENSt3__19allocatorIS7_EEE19EmplaceDecomposableEJRKPS5_EEEDTclsr4absl18container_internalE14DecomposeValueclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSM_DpOSN_:
  486|     95|  apply(F&& f, Args&&... args) {
  487|     95|    return absl::container_internal::DecomposeValue(
  488|     95|        std::forward<F>(f), std::forward<Args>(args)...);
  489|     95|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEE5applyINS1_12raw_hash_setIS8_NS4_12_GLOBAL__N_116ParentNumberHashENSB_14ParentNumberEqENSt3__19allocatorIS7_EEE12EqualElementIPS5_EEJRS7_EEEDTclsr4absl18container_internalE14DecomposeValueclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSM_DpOSN_:
  486|      3|  apply(F&& f, Args&&... args) {
  487|      3|    return absl::container_internal::DecomposeValue(
  488|      3|        std::forward<F>(f), std::forward<Args>(args)...);
  489|      3|  }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEE9constructINSt3__19allocatorIS7_EEJS7_EEEvPT_PS7_DpOT0_:
  471|    134|  static void construct(Allocator* alloc, slot_type* slot, Args&&... args) {
  472|    134|    absl::allocator_traits<Allocator>::construct(*alloc, slot,
  473|    134|                                                 std::forward<Args>(args)...);
  474|    134|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEE5applyINS1_12raw_hash_setIS8_NS4_12_GLOBAL__N_116ParentNumberHashENSB_14ParentNumberEqENSt3__19allocatorIS7_EEE11HashElementEJRS7_EEEDTclsr4absl18container_internalE14DecomposeValueclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSK_DpOSL_:
  486|    112|  apply(F&& f, Args&&... args) {
  487|    112|    return absl::container_internal::DecomposeValue(
  488|    112|        std::forward<F>(f), std::forward<Args>(args)...);
  489|    112|  }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEE9constructINSt3__19allocatorIS7_EEJRKPS5_EEEvPT_PS7_DpOT0_:
  471|     95|  static void construct(Allocator* alloc, slot_type* slot, Args&&... args) {
  472|     95|    absl::allocator_traits<Allocator>::construct(*alloc, slot,
  473|     95|                                                 std::forward<Args>(args)...);
  474|     95|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIN6google8protobuf6SymbolEE5applyINS1_12raw_hash_setIS6_NS4_12_GLOBAL__N_120SymbolByFullNameHashENS9_18SymbolByFullNameEqENSt3__19allocatorIS5_EEE19EmplaceDecomposableEJRKS5_EEEDTclsr4absl18container_internalE14DecomposeValueclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSJ_DpOSK_:
  486|    504|  apply(F&& f, Args&&... args) {
  487|    504|    return absl::container_internal::DecomposeValue(
  488|    504|        std::forward<F>(f), std::forward<Args>(args)...);
  489|    504|  }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIN6google8protobuf6SymbolEE9constructINSt3__19allocatorIS5_EEJS5_EEEvPT_PS5_DpOT0_:
  471|  1.79k|  static void construct(Allocator* alloc, slot_type* slot, Args&&... args) {
  472|  1.79k|    absl::allocator_traits<Allocator>::construct(*alloc, slot,
  473|  1.79k|                                                 std::forward<Args>(args)...);
  474|  1.79k|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIN6google8protobuf6SymbolEE5applyINS1_12raw_hash_setIS6_NS4_12_GLOBAL__N_120SymbolByFullNameHashENS9_18SymbolByFullNameEqENSt3__19allocatorIS5_EEE11HashElementEJRS5_EEEDTclsr4absl18container_internalE14DecomposeValueclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSI_DpOSJ_:
  486|    882|  apply(F&& f, Args&&... args) {
  487|    882|    return absl::container_internal::DecomposeValue(
  488|    882|        std::forward<F>(f), std::forward<Args>(args)...);
  489|    882|  }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIN6google8protobuf6SymbolEE9constructINSt3__19allocatorIS5_EEJRKS5_EEEvPT_PS5_DpOT0_:
  471|  1.19k|  static void construct(Allocator* alloc, slot_type* slot, Args&&... args) {
  472|  1.19k|    absl::allocator_traits<Allocator>::construct(*alloc, slot,
  473|  1.19k|                                                 std::forward<Args>(args)...);
  474|  1.19k|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIN6google8protobuf6SymbolEE5applyINS1_12raw_hash_setIS6_NS4_12_GLOBAL__N_118SymbolByParentHashENS9_16SymbolByParentEqENSt3__19allocatorIS5_EEE19EmplaceDecomposableEJRKS5_EEEDTclsr4absl18container_internalE14DecomposeValueclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSJ_DpOSK_:
  486|    688|  apply(F&& f, Args&&... args) {
  487|    688|    return absl::container_internal::DecomposeValue(
  488|    688|        std::forward<F>(f), std::forward<Args>(args)...);
  489|    688|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIN6google8protobuf6SymbolEE5applyINS1_12raw_hash_setIS6_NS4_12_GLOBAL__N_118SymbolByParentHashENS9_16SymbolByParentEqENSt3__19allocatorIS5_EEE12EqualElementIS5_EEJRS5_EEEDTclsr4absl18container_internalE14DecomposeValueclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSJ_DpOSK_:
  486|     51|  apply(F&& f, Args&&... args) {
  487|     51|    return absl::container_internal::DecomposeValue(
  488|     51|        std::forward<F>(f), std::forward<Args>(args)...);
  489|     51|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIN6google8protobuf6SymbolEE5applyINS1_12raw_hash_setIS6_NS4_12_GLOBAL__N_118SymbolByParentHashENS9_16SymbolByParentEqENSt3__19allocatorIS5_EEE11HashElementEJRS5_EEEDTclsr4absl18container_internalE14DecomposeValueclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSI_DpOSJ_:
  486|    868|  apply(F&& f, Args&&... args) {
  487|    868|    return absl::container_internal::DecomposeValue(
  488|    868|        std::forward<F>(f), std::forward<Args>(args)...);
  489|    868|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEE5applyINS1_12raw_hash_setIS8_NS4_12_GLOBAL__N_121DescriptorsByNameHashIS5_EENSB_19DescriptorsByNameEqIS5_EENSt3__19allocatorIS7_EEE19EmplaceDecomposableEJRKS7_EEEDTclsr4absl18container_internalE14DecomposeValueclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSN_DpOSO_:
  486|      4|  apply(F&& f, Args&&... args) {
  487|      4|    return absl::container_internal::DecomposeValue(
  488|      4|        std::forward<F>(f), std::forward<Args>(args)...);
  489|      4|  }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEE9constructINSt3__19allocatorIS7_EEJS7_EEEvPT_PS7_DpOT0_:
  471|      4|  static void construct(Allocator* alloc, slot_type* slot, Args&&... args) {
  472|      4|    absl::allocator_traits<Allocator>::construct(*alloc, slot,
  473|      4|                                                 std::forward<Args>(args)...);
  474|      4|  }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEE9constructINSt3__19allocatorIS7_EEJRKS7_EEEvPT_PS7_DpOT0_:
  471|      4|  static void construct(Allocator* alloc, slot_type* slot, Args&&... args) {
  472|      4|    absl::allocator_traits<Allocator>::construct(*alloc, slot,
  473|      4|                                                 std::forward<Args>(args)...);
  474|      4|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEE5applyINS1_12raw_hash_setIS8_NS4_12_GLOBAL__N_116ParentNumberHashENSB_14ParentNumberEqENSt3__19allocatorIS7_EEE19EmplaceDecomposableEJRKPS5_EEEDTclsr4absl18container_internalE14DecomposeValueclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSM_DpOSN_:
  486|    108|  apply(F&& f, Args&&... args) {
  487|    108|    return absl::container_internal::DecomposeValue(
  488|    108|        std::forward<F>(f), std::forward<Args>(args)...);
  489|    108|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEE5applyINS1_12raw_hash_setIS8_NS4_12_GLOBAL__N_116ParentNumberHashENSB_14ParentNumberEqENSt3__19allocatorIS7_EEE12EqualElementIPS5_EEJRS7_EEEDTclsr4absl18container_internalE14DecomposeValueclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSM_DpOSN_:
  486|      9|  apply(F&& f, Args&&... args) {
  487|      9|    return absl::container_internal::DecomposeValue(
  488|      9|        std::forward<F>(f), std::forward<Args>(args)...);
  489|      9|  }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEE9constructINSt3__19allocatorIS7_EEJS7_EEEvPT_PS7_DpOT0_:
  471|    120|  static void construct(Allocator* alloc, slot_type* slot, Args&&... args) {
  472|    120|    absl::allocator_traits<Allocator>::construct(*alloc, slot,
  473|    120|                                                 std::forward<Args>(args)...);
  474|    120|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEE5applyINS1_12raw_hash_setIS8_NS4_12_GLOBAL__N_116ParentNumberHashENSB_14ParentNumberEqENSt3__19allocatorIS7_EEE11HashElementEJRS7_EEEDTclsr4absl18container_internalE14DecomposeValueclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSK_DpOSL_:
  486|     98|  apply(F&& f, Args&&... args) {
  487|     98|    return absl::container_internal::DecomposeValue(
  488|     98|        std::forward<F>(f), std::forward<Args>(args)...);
  489|     98|  }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEE9constructINSt3__19allocatorIS7_EEJRKPS5_EEEvPT_PS7_DpOT0_:
  471|    108|  static void construct(Allocator* alloc, slot_type* slot, Args&&... args) {
  472|    108|    absl::allocator_traits<Allocator>::construct(*alloc, slot,
  473|    108|                                                 std::forward<Args>(args)...);
  474|    108|  }
_ZN4absl12lts_2024011613flat_hash_setIPKN6google8protobuf14FileDescriptorENS0_18container_internal6HashEqIS6_vE4HashENS9_2EqENSt3__19allocatorIS6_EEEC2Ev:
  151|      8|  flat_hash_set() {}
_ZN4absl12lts_2024011613flat_hash_setINS0_11string_viewENS0_18container_internal10StringHashENS3_8StringEqENSt3__19allocatorIS2_EEEC2Ev:
  151|     75|  flat_hash_set() {}
_ZN4absl12lts_2024011613flat_hash_setIiNS0_13hash_internal4HashIiEENSt3__18equal_toIiEENS5_9allocatorIiEEEC2Ev:
  151|      4|  flat_hash_set() {}
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyINS0_11string_viewEE5applyINS1_12raw_hash_setIS4_NS1_10StringHashENS1_8StringEqENSt3__19allocatorIS3_EEE19EmplaceDecomposableEJRKNS9_12basic_stringIcNS9_11char_traitsIcEENSA_IcEEEEEEEDTclsr4absl18container_internalE14DecomposeValueclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSL_DpOSM_:
  486|      3|  apply(F&& f, Args&&... args) {
  487|      3|    return absl::container_internal::DecomposeValue(
  488|      3|        std::forward<F>(f), std::forward<Args>(args)...);
  489|      3|  }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyINS0_11string_viewEE9constructINSt3__19allocatorIS3_EEJRKNS6_12basic_stringIcNS6_11char_traitsIcEENS7_IcEEEEEEEvPT_PS3_DpOT0_:
  471|      3|  static void construct(Allocator* alloc, slot_type* slot, Args&&... args) {
  472|      3|    absl::allocator_traits<Allocator>::construct(*alloc, slot,
  473|      3|                                                 std::forward<Args>(args)...);
  474|      3|  }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEE7destroyINSt3__19allocatorIS8_EEEEvPT_PS8_:
  477|      5|  static void destroy(Allocator* alloc, slot_type* slot) {
  478|      5|    absl::allocator_traits<Allocator>::destroy(*alloc, slot);
  479|      5|  }
message.cc:_ZN4absl12lts_2024011613flat_hash_setIPKN6google8protobuf8internal15DescriptorTableENS3_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENS9_18DescriptorByNameEqENSt3__19allocatorIS7_EEEC2Ev:
  151|      2|  flat_hash_set() {}
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEE7elementEPS8_:
  481|      7|  static T& element(slot_type* slot) { return *slot; }
message.cc:_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEE5applyINS1_12raw_hash_setIS9_NS4_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSD_18DescriptorByNameEqENSt3__19allocatorIS8_EEE19EmplaceDecomposableEJRKS8_EEEDTclsr4absl18container_internalE14DecomposeValueclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSN_DpOSO_:
  486|      6|  apply(F&& f, Args&&... args) {
  487|      6|    return absl::container_internal::DecomposeValue(
  488|      6|        std::forward<F>(f), std::forward<Args>(args)...);
  489|      6|  }
message.cc:_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEE5applyINS1_12raw_hash_setIS9_NS4_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSD_18DescriptorByNameEqENSt3__19allocatorIS8_EEE12EqualElementIS8_EEJRS8_EEEDTclsr4absl18container_internalE14DecomposeValueclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSN_DpOSO_:
  486|      2|  apply(F&& f, Args&&... args) {
  487|      2|    return absl::container_internal::DecomposeValue(
  488|      2|        std::forward<F>(f), std::forward<Args>(args)...);
  489|      2|  }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEE9constructINSt3__19allocatorIS8_EEJS8_EEEvPT_PS8_DpOT0_:
  471|      5|  static void construct(Allocator* alloc, slot_type* slot, Args&&... args) {
  472|      5|    absl::allocator_traits<Allocator>::construct(*alloc, slot,
  473|      5|                                                 std::forward<Args>(args)...);
  474|      5|  }
_ZN4absl12lts_2024011618container_internal17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEE9constructINSt3__19allocatorIS8_EEJRKS8_EEEvPT_PS8_DpOT0_:
  471|      6|  static void construct(Allocator* alloc, slot_type* slot, Args&&... args) {
  472|      6|    absl::allocator_traits<Allocator>::construct(*alloc, slot,
  473|      6|                                                 std::forward<Args>(args)...);
  474|      6|  }

_ZN4absl12lts_2024011618container_internal39btree_iterator_generation_info_disabledC2Ej:
 1096|    418|  explicit btree_iterator_generation_info_disabled(uint32_t) {}
_ZN4absl12lts_2024011618container_internal39btree_iterator_generation_info_disabled17update_generationEPKv:
 1097|    151|  static void update_generation(const void *) {}
_ZN4absl12lts_2024011618container_internal39btree_iterator_generation_info_disabled10generationEv:
 1098|     64|  static uint32_t generation() { return 0; }
_ZN4absl12lts_2024011618container_internal39btree_iterator_generation_info_disabled23assert_valid_generationEPKv:
 1099|  1.26k|  static void assert_valid_generation(const void *) {}
_ZN4absl12lts_2024011618container_internal12SearchResultImLb0EEC2Em:
  479|    127|  explicit SearchResult(V v) : value(v) {}
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE5emptyEv:
 1583|      1|  bool empty() const { return size_ == 0; }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE7is_leafEv:
  685|      4|  bool is_leaf() const { return GetField<2>()[3] != kInternalNodeMaxCount; }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE8GetFieldILm2EEEPKNS4_13tuple_elementIXT_ENS4_5tupleIJPSM_jhNS1_13map_slot_typeISB_SE_EESQ_EEEE4typeEv:
  665|     12|  inline const typename layout_type::template ElementType<N> *GetField() const {
  666|       |    assert(N < 4 || is_internal());
  667|     12|    return InternalLayout().template Pointer<N>(
  668|     12|        reinterpret_cast<const char *>(this));
  669|     12|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE14InternalLayoutEv:
  640|     23|  constexpr static layout_type InternalLayout() {
  641|     23|    return Layout(kNodeSlots, kNodeSlots + 1);
  642|     23|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE6LayoutEmm:
  627|     24|                                      const size_type child_count) {
  628|     24|    return layout_type(
  629|     24|        /*parent*/ 1,
  630|     24|        /*generation*/ BtreeGenerationsEnabled() ? 1 : 0,
  ------------------
  |  Branch (630:24): [Folded, False: 24]
  ------------------
  631|     24|        /*position, start, finish, max_count*/ 4,
  632|     24|        /*slots*/ slot_count,
  633|     24|        /*children*/ child_count);
  634|     24|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE15next_generationEv:
  747|      1|  void next_generation() {
  748|      1|    if (BtreeGenerationsEnabled()) ++*get_root_generation();
  ------------------
  |  Branch (748:9): [Folded, False: 1]
  ------------------
  749|      1|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE4slotEm:
  672|      4|  slot_type *slot(size_type i) { return &GetField<3>()[i]; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE8GetFieldILm3EEEPNS4_13tuple_elementIXT_ENS4_5tupleIJPSM_jhNS1_13map_slot_typeISB_SE_EESQ_EEEE4typeEv:
  659|      4|  inline typename layout_type::template ElementType<N> *GetField() {
  660|       |    // We assert that we don't read from values that aren't there.
  661|       |    assert(N < 4 || is_internal());
  662|      4|    return InternalLayout().template Pointer<N>(reinterpret_cast<char *>(this));
  663|      4|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE5startEv:
  694|      4|  field_type start() const {
  695|       |    // TODO(ezb): when floating storage is implemented, return GetField<2>()[1];
  696|       |    assert(GetField<2>()[1] == 0);
  697|      4|    return 0;
  698|      4|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE5countEv:
  704|      1|  field_type count() const {
  705|       |    assert(finish() >= start());
  706|      1|    return finish() - start();
  707|      1|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE8LeafSizeEm:
  643|      1|  constexpr static size_type LeafSize(const size_type slot_count = kNodeSlots) {
  644|      1|    return LeafLayout(slot_count).AllocSize();
  645|      1|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE10LeafLayoutEm:
  637|      1|      const size_type slot_count = kNodeSlots) {
  638|      1|    return Layout(slot_count, 0);
  639|      1|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE9max_countEv:
  708|      1|  field_type max_count() const {
  709|       |    // Internal nodes have max_count==kInternalNodeMaxCount.
  710|       |    // Leaf nodes have max_count in [1, kNodeSlots].
  711|      1|    const field_type max_count = GetField<2>()[3];
  712|      1|    return max_count == field_type{kInternalNodeMaxCount}
  ------------------
  |  Branch (712:12): [True: 0, False: 1]
  ------------------
  713|      1|               ? field_type{kNodeSlots}
  714|      1|               : max_count;
  715|      1|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE6parentEv:
  718|      1|  btree_node *parent() const { return *GetField<0>(); }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE8GetFieldILm0EEEPKNS4_13tuple_elementIXT_ENS4_5tupleIJPSM_jhNS1_13map_slot_typeISB_SE_EESQ_EEEE4typeEv:
  665|      1|  inline const typename layout_type::template ElementType<N> *GetField() const {
  666|       |    assert(N < 4 || is_internal());
  667|      1|    return InternalLayout().template Pointer<N>(
  668|      1|        reinterpret_cast<const char *>(this));
  669|      1|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE11is_internalEv:
  688|      2|  bool is_internal() const { return !is_leaf(); }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE8positionEv:
  691|      1|  field_type position() const { return GetField<2>()[0]; }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE6finishEv:
  701|      6|  field_type finish() const { return GetField<2>()[2]; }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE17mutable_allocatorEv:
 1676|      2|  allocator_type *mutable_allocator() noexcept {
 1677|      2|    return &rightmost_.template get<1>();
 1678|      2|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE9EmptyNodeEv:
 1340|      4|  static node_type *EmptyNode() {
 1341|      4|    alignas(node_type::Alignment()) static constexpr EmptyNodeType empty_node;
 1342|      4|    return const_cast<EmptyNodeType *>(&empty_node);
 1343|      4|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE17mutable_rightmostEv:
 1664|      1|  node_type *&mutable_rightmost() noexcept {
 1665|      1|    return rightmost_.template get<2>();
 1666|      1|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE12mutable_rootEv:
 1661|      1|  node_type *&mutable_root() noexcept { return root_; }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE10generationEv:
  738|      1|  uint32_t generation() const {
  739|      1|    return BtreeGenerationsEnabled() ? *get_root_generation() : 0;
  ------------------
  |  Branch (739:12): [Folded, False: 1]
  ------------------
  740|      1|  }
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE15internal_locateISB_EENS1_12SearchResultINS1_14btree_iteratorINS1_10btree_nodeISL_EERSJ_PSJ_EELb0EEERKT_:
 2898|      1|    -> SearchResult<iterator, is_key_compare_to::value> {
 2899|      1|  iterator iter(const_cast<node_type *>(root()));
 2900|      1|  for (;;) {
 2901|      1|    SearchResult<size_type, is_key_compare_to::value> res =
 2902|      1|        iter.node_->lower_bound(key, key_comp());
 2903|      1|    iter.position_ = static_cast<int>(res.value);
 2904|      1|    if (res.IsEq()) {
  ------------------
  |  Branch (2904:9): [Folded, False: 1]
  ------------------
 2905|      0|      return {iter, MatchKind::kEq};
 2906|      0|    }
 2907|       |    // Note: in the non-key-compare-to case, we don't need to walk all the way
 2908|       |    // down the tree if the keys are equal, but determining equality would
 2909|       |    // require doing an extra comparison on each node on the way down, and we
 2910|       |    // will need to go all the way to the leaf node in the expected case.
 2911|      1|    if (iter.node_->is_leaf()) {
  ------------------
  |  Branch (2911:9): [True: 1, False: 0]
  ------------------
 2912|      1|      break;
 2913|      1|    }
 2914|      0|    iter.node_ = iter.node_->child(static_cast<field_type>(iter.position_));
 2915|      0|  }
 2916|       |  // Note: in the non-key-compare-to case, the key may actually be equivalent
 2917|       |  // here (and the MatchKind::kNe is ignored).
 2918|      1|  return {iter, MatchKind::kNe};
 2919|      1|}
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE4rootEv:
 1660|      1|  const node_type *root() const { return root_; }
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS8_15FieldDescriptorENS5_4lessISC_EENS5_9allocatorINS6_IKSC_SF_EEEELi256ELb0EEEEERSK_PSK_EC2EPSN_:
 1142|      1|  explicit btree_iterator(Node *n) : btree_iterator(n, n->start()) {}
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS8_15FieldDescriptorENS5_4lessISC_EENS5_9allocatorINS6_IKSC_SF_EEEELi256ELb0EEEEERSK_PSK_EC2EPSN_i:
 1144|      1|      : btree_iterator_generation_info(n != nullptr ? n->generation()
  ------------------
  |  Branch (1144:40): [True: 1, False: 0]
  ------------------
 1145|      1|                                                    : ~uint32_t{}),
 1146|      1|        node_(n),
 1147|      1|        position_(p) {}
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE11lower_boundISB_EENS1_12SearchResultImLb0EEERKT_RKNS1_19key_compare_adapterISG_SB_E15checked_compareE:
  781|      1|      const K &k, const key_compare &comp) const {
  782|      1|    return use_linear_search::value ? linear_search(k, comp)
  ------------------
  |  Branch (782:12): [Folded, False: 1]
  ------------------
  783|      1|                                    : binary_search(k, comp);
  784|      1|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE13binary_searchISB_NS1_19key_compare_adapterISG_SB_E15checked_compareEEENS1_12SearchResultImXsr23btree_is_key_compare_toIT0_SB_EE5valueEEERKT_RKSS_:
  802|      1|  binary_search(const K &k, const Compare &comp) const {
  803|      1|    return binary_search_impl(k, start(), finish(), comp,
  804|      1|                              btree_is_key_compare_to<Compare, key_type>());
  805|      1|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE18binary_search_implISB_NS1_19key_compare_adapterISG_SB_E15checked_compareEEENS1_12SearchResultImLb0EEERKT_mmRKT0_NS4_17integral_constantIbLb0EEE:
  845|      1|      std::false_type /* IsCompareTo */) const {
  846|      1|    while (s != e) {
  ------------------
  |  Branch (846:12): [True: 0, False: 1]
  ------------------
  847|      0|      const size_type mid = (s + e) >> 1;
  848|      0|      if (comp(key(mid), k)) {
  ------------------
  |  Branch (848:11): [True: 0, False: 0]
  ------------------
  849|      0|        s = mid + 1;
  850|      0|      } else {
  851|      0|        e = mid;
  852|      0|      }
  853|      0|    }
  854|      1|    return SearchResult<size_type, false>{s};
  855|      1|  }
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE8key_compEv:
 1565|      1|  const key_compare &key_comp() const noexcept {
 1566|      1|    return rightmost_.template get<0>();
 1567|      1|  }
_ZN4absl12lts_2024011618container_internal12SearchResultINS1_14btree_iteratorINS1_10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS9_15FieldDescriptorENS6_4lessISD_EENS6_9allocatorINS7_IKSD_SG_EEEELi256ELb0EEEEERSL_PSL_EELb0EEC2ESR_NS1_9MatchKindE:
  480|      1|  SearchResult(V v, MatchKind /*match*/) : value(v) {}
_ZN4absl12lts_2024011618container_internal5btreeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE13internal_lastINS1_14btree_iteratorINS1_10btree_nodeISL_EERSJ_PSJ_EEEET_SU_:
 2802|      1|inline IterType btree<P>::internal_last(IterType iter) {
 2803|      1|  assert(iter.node_ != nullptr);
 2804|      1|  while (iter.position_ == iter.node_->finish()) {
  ------------------
  |  Branch (2804:10): [True: 1, False: 0]
  ------------------
 2805|      1|    iter.position_ = iter.node_->position();
 2806|      1|    iter.node_ = iter.node_->parent();
 2807|      1|    if (iter.node_->is_leaf()) {
  ------------------
  |  Branch (2807:9): [True: 1, False: 0]
  ------------------
 2808|      1|      iter.node_ = nullptr;
 2809|      1|      break;
 2810|      1|    }
 2811|      1|  }
 2812|      1|  iter.update_generation();
 2813|      1|  return iter;
 2814|      1|}
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS8_15FieldDescriptorENS5_4lessISC_EENS5_9allocatorINS6_IKSC_SF_EEEELi256ELb0EEEEERSK_PSK_E17update_generationEv:
 1304|      2|  void update_generation() {
 1305|      2|    btree_iterator_generation_info::update_generation(node_);
 1306|      2|  }
_ZN4absl12lts_2024011618container_internal19key_compare_adapterINSt3__14lessINS3_4pairIPKN6google8protobuf10DescriptorEiEEEESB_E15checked_compareC2ESC_:
  227|      2|    checked_compare(Compare comp) : Base(std::move(comp)) {}  // NOLINT
_ZN4absl12lts_2024011618container_internal20checked_compare_baseINSt3__14lessINS3_4pairIPKN6google8protobuf10DescriptorEiEEEELb1EEC2ESC_:
  174|      2|  explicit checked_compare_base(Compare c) : Compare(std::move(c)) {}
_ZN4absl12lts_2024011618container_internal5btreeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEEC2ERKNS1_19key_compare_adapterISG_SB_E15checked_compareERKSK_:
 1402|      2|      : root_(EmptyNode()), rightmost_(comp, alloc, EmptyNode()), size_(0) {}
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE12set_positionEh:
  676|      1|  void set_position(field_type v) { GetField<2>()[0] = v; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE8GetFieldILm2EEEPNS4_13tuple_elementIXT_ENS4_5tupleIJPSM_jhNS1_13map_slot_typeISB_SE_EESQ_EEEE4typeEv:
  659|      5|  inline typename layout_type::template ElementType<N> *GetField() {
  660|       |    // We assert that we don't read from values that aren't there.
  661|       |    assert(N < 4 || is_internal());
  662|      5|    return InternalLayout().template Pointer<N>(reinterpret_cast<char *>(this));
  663|      5|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE10set_finishEh:
  678|      2|  void set_finish(field_type v) { GetField<2>()[2] = v; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE14set_generationEj:
  743|      1|  void set_generation(uint32_t generation) {
  744|      1|    if (BtreeGenerationsEnabled()) GetField<1>()[0] = generation;
  ------------------
  |  Branch (744:9): [Folded, False: 1]
  ------------------
  745|      1|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE10set_parentEPSM_:
  670|      1|  void set_parent(btree_node *p) { *GetField<0>() = p; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE8GetFieldILm0EEEPNS4_13tuple_elementIXT_ENS4_5tupleIJPSM_jhNS1_13map_slot_typeISB_SE_EESQ_EEEE4typeEv:
  659|      1|  inline typename layout_type::template ElementType<N> *GetField() {
  660|       |    // We assert that we don't read from values that aren't there.
  661|       |    assert(N < 4 || is_internal());
  662|      1|    return InternalLayout().template Pointer<N>(reinterpret_cast<char *>(this));
  663|      1|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE13insert_uniqueISB_JSJ_EEENS5_INS1_14btree_iteratorINS1_10btree_nodeISL_EERSJ_PSJ_EEbEERKT_DpOT0_:
 2278|      1|    -> std::pair<iterator, bool> {
 2279|      1|  if (empty()) {
  ------------------
  |  Branch (2279:7): [True: 1, False: 0]
  ------------------
 2280|      1|    mutable_root() = mutable_rightmost() = new_leaf_root_node(1);
 2281|      1|  }
 2282|       |
 2283|      1|  SearchResult<iterator, is_key_compare_to::value> res = internal_locate(key);
 2284|      1|  iterator iter = res.value;
 2285|       |
 2286|      1|  if (res.HasMatch()) {
  ------------------
  |  Branch (2286:7): [Folded, False: 1]
  ------------------
 2287|      0|    if (res.IsEq()) {
  ------------------
  |  Branch (2287:9): [Folded, False: 0]
  ------------------
 2288|       |      // The key already exists in the tree, do nothing.
 2289|      0|      return {iter, false};
 2290|      0|    }
 2291|      1|  } else {
 2292|      1|    iterator last = internal_last(iter);
 2293|      1|    if (last.node_ && !compare_keys(key, last.key())) {
  ------------------
  |  Branch (2293:9): [True: 0, False: 1]
  |  Branch (2293:23): [True: 0, False: 0]
  ------------------
 2294|       |      // The key already exists in the tree, do nothing.
 2295|      0|      return {last, false};
 2296|      0|    }
 2297|      1|  }
 2298|      1|  return {internal_emplace(iter, std::forward<Args>(args)...), true};
 2299|      1|}
_ZN4absl12lts_2024011618container_internal5btreeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE18new_leaf_root_nodeEh:
 1702|      1|  node_type *new_leaf_root_node(field_type max_count) {
 1703|      1|    node_type *n = allocate(node_type::LeafSize(max_count));
 1704|      1|    n->init_leaf(/*position=*/0, max_count, /*parent=*/n);
 1705|      1|    return n;
 1706|      1|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE8allocateEm:
 1685|      1|  node_type *allocate(size_type size) {
 1686|      1|    return reinterpret_cast<node_type *>(
 1687|      1|        absl::container_internal::Allocate<node_type::Alignment()>(
 1688|      1|            mutable_allocator(), size));
 1689|      1|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE9init_leafEhhPSM_:
  954|      1|                 btree_node *parent) {
  955|      1|    set_generation(0);
  956|      1|    set_parent(parent);
  957|      1|    set_position(position);
  958|      1|    set_start(0);
  959|      1|    set_finish(0);
  960|      1|    set_max_count(max_count);
  961|      1|    absl::container_internal::SanitizerPoisonMemoryRegion(
  962|      1|        start_slot(), max_count * sizeof(slot_type));
  963|      1|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE9set_startEh:
  677|      1|  void set_start(field_type v) { GetField<2>()[1] = v; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE13set_max_countEh:
  680|      1|  void set_max_count(field_type v) { GetField<2>()[3] = v; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE10start_slotEv:
  673|      1|  slot_type *start_slot() { return slot(start()); }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE16internal_emplaceIJSJ_EEENS1_14btree_iteratorINS1_10btree_nodeISL_EERSJ_PSJ_EEST_DpOT_:
 2819|      1|    -> iterator {
 2820|      1|  if (iter.node_->is_internal()) {
  ------------------
  |  Branch (2820:7): [True: 0, False: 1]
  ------------------
 2821|       |    // We can't insert on an internal node. Instead, we'll insert after the
 2822|       |    // previous value which is guaranteed to be on a leaf node.
 2823|      0|    --iter;
 2824|      0|    ++iter.position_;
 2825|      0|  }
 2826|      1|  const field_type max_count = iter.node_->max_count();
 2827|      1|  allocator_type *alloc = mutable_allocator();
 2828|       |
 2829|      1|  const auto transfer_and_delete = [&](node_type *old_node,
 2830|      1|                                       node_type *new_node) {
 2831|      1|    new_node->transfer_n(old_node->count(), new_node->start(),
 2832|      1|                         old_node->start(), old_node, alloc);
 2833|      1|    new_node->set_finish(old_node->finish());
 2834|      1|    old_node->set_finish(old_node->start());
 2835|      1|    new_node->set_generation(old_node->generation());
 2836|      1|    node_type::clear_and_delete(old_node, alloc);
 2837|      1|  };
 2838|      1|  const auto replace_leaf_root_node = [&](field_type new_node_size) {
 2839|      1|    assert(iter.node_ == root());
 2840|      1|    node_type *old_root = iter.node_;
 2841|      1|    node_type *new_root = iter.node_ = new_leaf_root_node(new_node_size);
 2842|      1|    transfer_and_delete(old_root, new_root);
 2843|      1|    mutable_root() = mutable_rightmost() = new_root;
 2844|      1|  };
 2845|       |
 2846|      1|  bool replaced_node = false;
 2847|      1|  if (iter.node_->count() == max_count) {
  ------------------
  |  Branch (2847:7): [True: 0, False: 1]
  ------------------
 2848|       |    // Make room in the leaf for the new item.
 2849|      0|    if (max_count < kNodeSlots) {
  ------------------
  |  Branch (2849:9): [True: 0, False: 0]
  ------------------
 2850|       |      // Insertion into the root where the root is smaller than the full node
 2851|       |      // size. Simply grow the size of the root node.
 2852|      0|      replace_leaf_root_node(static_cast<field_type>(
 2853|      0|          (std::min)(static_cast<int>(kNodeSlots), 2 * max_count)));
 2854|      0|      replaced_node = true;
 2855|      0|    } else {
 2856|      0|      rebalance_or_split(&iter);
 2857|      0|    }
 2858|      0|  }
 2859|      1|  (void)replaced_node;
 2860|       |#if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \
 2861|       |    defined(ABSL_HAVE_HWADDRESS_SANITIZER)
 2862|       |  if (!replaced_node) {
 2863|       |    assert(iter.node_->is_leaf());
 2864|       |    if (iter.node_->is_root()) {
 2865|       |      replace_leaf_root_node(max_count);
 2866|       |    } else {
 2867|       |      node_type *old_node = iter.node_;
 2868|       |      const bool was_rightmost = rightmost() == old_node;
 2869|       |      const bool was_leftmost = leftmost() == old_node;
 2870|       |      node_type *parent = old_node->parent();
 2871|       |      const field_type position = old_node->position();
 2872|       |      node_type *new_node = iter.node_ = new_leaf_node(position, parent);
 2873|       |      parent->set_child_noupdate_position(position, new_node);
 2874|       |      transfer_and_delete(old_node, new_node);
 2875|       |      if (was_rightmost) mutable_rightmost() = new_node;
 2876|       |      // The leftmost node is stored as the parent of the root node.
 2877|       |      if (was_leftmost) root()->set_parent(new_node);
 2878|       |    }
 2879|       |  }
 2880|       |#endif
 2881|      1|  iter.node_->emplace_value(static_cast<field_type>(iter.position_), alloc,
 2882|      1|                            std::forward<Args>(args)...);
 2883|       |  assert(
 2884|      1|      iter.node_->is_ordered_correctly(static_cast<field_type>(iter.position_),
 2885|      1|                                       original_key_compare(key_comp())) &&
 2886|      1|      "If this assert fails, then either (1) the comparator may violate "
 2887|      1|      "transitivity, i.e. comp(a,b) && comp(b,c) -> comp(a,c) (see "
 2888|      1|      "https://en.cppreference.com/w/cpp/named_req/Compare), or (2) a "
 2889|      1|      "key may have been mutated after it was inserted into the tree.");
 2890|      1|  ++size_;
 2891|      1|  iter.update_generation();
 2892|      1|  return iter;
 2893|      1|}
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE13emplace_valueIJSJ_EEEvhPSK_DpOT_:
 1807|      1|                                         Args &&...args) {
 1808|      1|  assert(i >= start());
 1809|      1|  assert(i <= finish());
 1810|       |  // Shift old values to create space for new value and then construct it in
 1811|       |  // place.
 1812|      1|  if (i < finish()) {
  ------------------
  |  Branch (1812:7): [True: 0, False: 1]
  ------------------
 1813|      0|    transfer_n_backward(finish() - i, /*dest_i=*/i + 1, /*src_i=*/i, this,
 1814|      0|                        alloc);
 1815|      0|  }
 1816|      1|  value_init(static_cast<field_type>(i), alloc, std::forward<Args>(args)...);
 1817|      1|  set_finish(finish() + 1);
 1818|       |
 1819|      1|  if (is_internal() && finish() > i + 1) {
  ------------------
  |  Branch (1819:7): [True: 0, False: 1]
  |  Branch (1819:24): [True: 0, False: 0]
  ------------------
 1820|      0|    for (field_type j = finish(); j > i + 1; --j) {
  ------------------
  |  Branch (1820:35): [True: 0, False: 0]
  ------------------
 1821|      0|      set_child(j, child(j - 1));
 1822|      0|    }
 1823|      0|    clear_child(i + 1);
 1824|      0|  }
 1825|      1|}
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE10value_initIJSJ_EEEvhPSK_DpOT_:
  984|      1|  void value_init(const field_type i, allocator_type *alloc, Args &&...args) {
  985|      1|    next_generation();
  986|      1|    absl::container_internal::SanitizerUnpoisonObject(slot(i));
  987|      1|    params_type::construct(alloc, slot(i), std::forward<Args>(args)...);
  988|      1|  }
_ZNK4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS8_15FieldDescriptorENS5_4lessISC_EENS5_9allocatorINS6_IKSC_SF_EEEELi256ELb0EEEEERSK_PSK_EptEv:
 1196|      1|  pointer operator->() const { return &operator*(); }
_ZNK4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS8_15FieldDescriptorENS5_4lessISC_EENS5_9allocatorINS6_IKSC_SF_EEEELi256ELb0EEEEERSK_PSK_EdeEv:
 1186|      1|  reference operator*() const {
 1187|      1|    ABSL_HARDENING_ASSERT(node_ != nullptr);
  ------------------
  |  |  128|      1|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      1|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|      1|    assert_valid_generation(node_);
 1189|      1|    ABSL_HARDENING_ASSERT(position_ >= node_->start());
  ------------------
  |  |  128|      1|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      1|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1190|      1|    if (position_ >= node_->finish()) {
  ------------------
  |  Branch (1190:9): [True: 0, False: 1]
  ------------------
 1191|      0|      ABSL_HARDENING_ASSERT(!IsEndIterator() && "Dereferencing end() iterator");
  ------------------
  |  |  128|      0|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      0|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1192|      0|      ABSL_HARDENING_ASSERT(position_ < node_->finish());
  ------------------
  |  |  128|      0|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      0|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1193|      0|    }
 1194|      1|    return node_->value(static_cast<field_type>(position_));
 1195|      1|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorENS4_4lessISB_EENS4_9allocatorINS5_IKSB_SE_EEEELi256ELb0EEEE5valueEm:
  753|      1|  reference value(size_type i) { return params_type::element(slot(i)); }
_ZN4absl12lts_2024011618container_internal19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11FileCompareENS6_9FileEntryEE15checked_compareC2ES7_:
  227|      2|    checked_compare(Compare comp) : Base(std::move(comp)) {}  // NOLINT
_ZN4absl12lts_2024011618container_internal20checked_compare_baseIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11FileCompareELb1EEC2ES7_:
  174|      2|  explicit checked_compare_base(Compare c) : Compare(std::move(c)) {}
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEEC2ERKNS1_19key_compare_adapterIS9_S8_E15checked_compareERKSC_:
 1402|      2|      : root_(EmptyNode()), rightmost_(comp, alloc, EmptyNode()), size_(0) {}
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE9EmptyNodeEv:
 1340|      6|  static node_type *EmptyNode() {
 1341|      6|    alignas(node_type::Alignment()) static constexpr EmptyNodeType empty_node;
 1342|      6|    return const_cast<EmptyNodeType *>(&empty_node);
 1343|      6|  }
_ZN4absl12lts_2024011618container_internal19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex13SymbolCompareENS6_11SymbolEntryEE15checked_compareC2ES7_:
  227|      2|    checked_compare(Compare comp) : Base(std::move(comp)) {}  // NOLINT
_ZN4absl12lts_2024011618container_internal20checked_compare_baseIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex13SymbolCompareELb1EEC2ES7_:
  174|      2|  explicit checked_compare_base(Compare c) : Compare(std::move(c)) {}
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEEC2ERKNS1_19key_compare_adapterIS9_S8_E15checked_compareERKSC_:
 1402|      2|      : root_(EmptyNode()), rightmost_(comp, alloc, EmptyNode()), size_(0) {}
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE9EmptyNodeEv:
 1340|      6|  static node_type *EmptyNode() {
 1341|      6|    alignas(node_type::Alignment()) static constexpr EmptyNodeType empty_node;
 1342|      6|    return const_cast<EmptyNodeType *>(&empty_node);
 1343|      6|  }
_ZN4absl12lts_2024011618container_internal19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex16ExtensionCompareENS6_14ExtensionEntryEE15checked_compareC2ES7_:
  227|      2|    checked_compare(Compare comp) : Base(std::move(comp)) {}  // NOLINT
_ZN4absl12lts_2024011618container_internal20checked_compare_baseIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex16ExtensionCompareELb1EEC2ES7_:
  174|      2|  explicit checked_compare_base(Compare c) : Compare(std::move(c)) {}
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEEC2ERKNS1_19key_compare_adapterIS9_S8_E15checked_compareERKSC_:
 1402|      2|      : root_(EmptyNode()), rightmost_(comp, alloc, EmptyNode()), size_(0) {}
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE9EmptyNodeEv:
 1340|      5|  static node_type *EmptyNode() {
 1341|      5|    alignas(node_type::Alignment()) static constexpr EmptyNodeType empty_node;
 1342|      5|    return const_cast<EmptyNodeType *>(&empty_node);
 1343|      5|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE13insert_uniqueIS8_JS8_EEENSA_4pairINS1_14btree_iteratorINS1_10btree_nodeISD_EERKS8_PSK_EEbEERKT_DpOT0_:
 2278|      6|    -> std::pair<iterator, bool> {
 2279|      6|  if (empty()) {
  ------------------
  |  Branch (2279:7): [True: 3, False: 3]
  ------------------
 2280|      3|    mutable_root() = mutable_rightmost() = new_leaf_root_node(1);
 2281|      3|  }
 2282|       |
 2283|      6|  SearchResult<iterator, is_key_compare_to::value> res = internal_locate(key);
 2284|      6|  iterator iter = res.value;
 2285|       |
 2286|      6|  if (res.HasMatch()) {
  ------------------
  |  Branch (2286:7): [Folded, False: 6]
  ------------------
 2287|      0|    if (res.IsEq()) {
  ------------------
  |  Branch (2287:9): [Folded, False: 0]
  ------------------
 2288|       |      // The key already exists in the tree, do nothing.
 2289|      0|      return {iter, false};
 2290|      0|    }
 2291|      6|  } else {
 2292|      6|    iterator last = internal_last(iter);
 2293|      6|    if (last.node_ && !compare_keys(key, last.key())) {
  ------------------
  |  Branch (2293:9): [True: 0, False: 6]
  |  Branch (2293:23): [True: 0, False: 0]
  ------------------
 2294|       |      // The key already exists in the tree, do nothing.
 2295|      0|      return {last, false};
 2296|      0|    }
 2297|      6|  }
 2298|      6|  return {internal_emplace(iter, std::forward<Args>(args)...), true};
 2299|      6|}
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE5emptyEv:
 1583|     12|  bool empty() const { return size_ == 0; }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE18new_leaf_root_nodeEh:
 1702|      6|  node_type *new_leaf_root_node(field_type max_count) {
 1703|      6|    node_type *n = allocate(node_type::LeafSize(max_count));
 1704|      6|    n->init_leaf(/*position=*/0, max_count, /*parent=*/n);
 1705|      6|    return n;
 1706|      6|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8allocateEm:
 1685|      6|  node_type *allocate(size_type size) {
 1686|      6|    return reinterpret_cast<node_type *>(
 1687|      6|        absl::container_internal::Allocate<node_type::Alignment()>(
 1688|      6|            mutable_allocator(), size));
 1689|      6|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE17mutable_allocatorEv:
 1676|     14|  allocator_type *mutable_allocator() noexcept {
 1677|     14|    return &rightmost_.template get<1>();
 1678|     14|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8LeafSizeEm:
  643|     11|  constexpr static size_type LeafSize(const size_type slot_count = kNodeSlots) {
  644|     11|    return LeafLayout(slot_count).AllocSize();
  645|     11|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10LeafLayoutEm:
  637|     11|      const size_type slot_count = kNodeSlots) {
  638|     11|    return Layout(slot_count, 0);
  639|     11|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE6LayoutEmm:
  627|    219|                                      const size_type child_count) {
  628|    219|    return layout_type(
  629|    219|        /*parent*/ 1,
  630|    219|        /*generation*/ BtreeGenerationsEnabled() ? 1 : 0,
  ------------------
  |  Branch (630:24): [Folded, False: 219]
  ------------------
  631|    219|        /*position, start, finish, max_count*/ 4,
  632|    219|        /*slots*/ slot_count,
  633|    219|        /*children*/ child_count);
  634|    219|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE9init_leafEhhPSE_:
  954|      6|                 btree_node *parent) {
  955|      6|    set_generation(0);
  956|      6|    set_parent(parent);
  957|      6|    set_position(position);
  958|      6|    set_start(0);
  959|      6|    set_finish(0);
  960|      6|    set_max_count(max_count);
  961|      6|    absl::container_internal::SanitizerPoisonMemoryRegion(
  962|      6|        start_slot(), max_count * sizeof(slot_type));
  963|      6|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE14set_generationEj:
  743|      9|  void set_generation(uint32_t generation) {
  744|      9|    if (BtreeGenerationsEnabled()) GetField<1>()[0] = generation;
  ------------------
  |  Branch (744:9): [Folded, False: 9]
  ------------------
  745|      9|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10set_parentEPSE_:
  670|      6|  void set_parent(btree_node *p) { *GetField<0>() = p; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8GetFieldILm0EEEPNSA_13tuple_elementIXT_ENSA_5tupleIJPSE_jhS8_SI_EEEE4typeEv:
  659|      6|  inline typename layout_type::template ElementType<N> *GetField() {
  660|       |    // We assert that we don't read from values that aren't there.
  661|       |    assert(N < 4 || is_internal());
  662|      6|    return InternalLayout().template Pointer<N>(reinterpret_cast<char *>(this));
  663|      6|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE14InternalLayoutEv:
  640|    208|  constexpr static layout_type InternalLayout() {
  641|    208|    return Layout(kNodeSlots, kNodeSlots + 1);
  642|    208|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE12set_positionEh:
  676|      6|  void set_position(field_type v) { GetField<2>()[0] = v; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8GetFieldILm2EEEPNSA_13tuple_elementIXT_ENSA_5tupleIJPSE_jhS8_SI_EEEE4typeEv:
  659|     36|  inline typename layout_type::template ElementType<N> *GetField() {
  660|       |    // We assert that we don't read from values that aren't there.
  661|       |    assert(N < 4 || is_internal());
  662|     36|    return InternalLayout().template Pointer<N>(reinterpret_cast<char *>(this));
  663|     36|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE9set_startEh:
  677|      6|  void set_start(field_type v) { GetField<2>()[1] = v; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10set_finishEh:
  678|     18|  void set_finish(field_type v) { GetField<2>()[2] = v; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE13set_max_countEh:
  680|      6|  void set_max_count(field_type v) { GetField<2>()[3] = v; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10start_slotEv:
  673|      6|  slot_type *start_slot() { return slot(start()); }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE4slotEm:
  672|     41|  slot_type *slot(size_type i) { return &GetField<3>()[i]; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8GetFieldILm3EEEPNSA_13tuple_elementIXT_ENSA_5tupleIJPSE_jhS8_SI_EEEE4typeEv:
  659|     41|  inline typename layout_type::template ElementType<N> *GetField() {
  660|       |    // We assert that we don't read from values that aren't there.
  661|       |    assert(N < 4 || is_internal());
  662|     41|    return InternalLayout().template Pointer<N>(reinterpret_cast<char *>(this));
  663|     41|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE5startEv:
  694|     48|  field_type start() const {
  695|       |    // TODO(ezb): when floating storage is implemented, return GetField<2>()[1];
  696|       |    assert(GetField<2>()[1] == 0);
  697|     48|    return 0;
  698|     48|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE17mutable_rightmostEv:
 1664|      8|  node_type *&mutable_rightmost() noexcept {
 1665|      8|    return rightmost_.template get<2>();
 1666|      8|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE12mutable_rootEv:
 1661|      8|  node_type *&mutable_root() noexcept { return root_; }
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE15internal_locateIS8_EENS1_12SearchResultINS1_14btree_iteratorINS1_10btree_nodeISD_EERKS8_PSK_EELb0EEERKT_:
 2898|      6|    -> SearchResult<iterator, is_key_compare_to::value> {
 2899|      6|  iterator iter(const_cast<node_type *>(root()));
 2900|      6|  for (;;) {
 2901|      6|    SearchResult<size_type, is_key_compare_to::value> res =
 2902|      6|        iter.node_->lower_bound(key, key_comp());
 2903|      6|    iter.position_ = static_cast<int>(res.value);
 2904|      6|    if (res.IsEq()) {
  ------------------
  |  Branch (2904:9): [Folded, False: 6]
  ------------------
 2905|      0|      return {iter, MatchKind::kEq};
 2906|      0|    }
 2907|       |    // Note: in the non-key-compare-to case, we don't need to walk all the way
 2908|       |    // down the tree if the keys are equal, but determining equality would
 2909|       |    // require doing an extra comparison on each node on the way down, and we
 2910|       |    // will need to go all the way to the leaf node in the expected case.
 2911|      6|    if (iter.node_->is_leaf()) {
  ------------------
  |  Branch (2911:9): [True: 6, False: 0]
  ------------------
 2912|      6|      break;
 2913|      6|    }
 2914|      0|    iter.node_ = iter.node_->child(static_cast<field_type>(iter.position_));
 2915|      0|  }
 2916|       |  // Note: in the non-key-compare-to case, the key may actually be equivalent
 2917|       |  // here (and the MatchKind::kNe is ignored).
 2918|      6|  return {iter, MatchKind::kNe};
 2919|      6|}
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE4rootEv:
 1660|      6|  const node_type *root() const { return root_; }
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS8_11FileCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_EC2EPSF_:
 1142|      8|  explicit btree_iterator(Node *n) : btree_iterator(n, n->start()) {}
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS8_11FileCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_EC2EPSF_i:
 1144|     10|      : btree_iterator_generation_info(n != nullptr ? n->generation()
  ------------------
  |  Branch (1144:40): [True: 10, False: 0]
  ------------------
 1145|     10|                                                    : ~uint32_t{}),
 1146|     10|        node_(n),
 1147|     10|        position_(p) {}
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10generationEv:
  738|     13|  uint32_t generation() const {
  739|     13|    return BtreeGenerationsEnabled() ? *get_root_generation() : 0;
  ------------------
  |  Branch (739:12): [Folded, False: 13]
  ------------------
  740|     13|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE11lower_boundIS8_EENS1_12SearchResultImLb0EEERKT_RKNS1_19key_compare_adapterIS9_S8_E15checked_compareE:
  781|      6|      const K &k, const key_compare &comp) const {
  782|      6|    return use_linear_search::value ? linear_search(k, comp)
  ------------------
  |  Branch (782:12): [Folded, False: 6]
  ------------------
  783|      6|                                    : binary_search(k, comp);
  784|      6|  }
_ZNK4absl12lts_2024011618container_internal19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11FileCompareENS6_9FileEntryEE15checked_compareclIS8_S8_TnNSt3__19enable_ifIXsr3std7is_sameIbNSC_9result_ofIFKS7_RKT_RKT0_EE4typeEEE5valueEiE4typeELi0EEEbSI_SL_:
  236|      3|    bool operator()(const T &lhs, const U &rhs) const {
  237|       |      // NOTE: if any of these assertions fail, then the comparator does not
  238|       |      // establish a strict-weak-ordering (see
  239|       |      // https://en.cppreference.com/w/cpp/named_req/Compare).
  240|      3|      assert(is_self_equivalent(lhs));
  241|      3|      assert(is_self_equivalent(rhs));
  242|      3|      const bool lhs_comp_rhs = comp()(lhs, rhs);
  243|       |      assert(!lhs_comp_rhs || !comp()(rhs, lhs));
  244|      3|      return lhs_comp_rhs;
  245|      3|    }
_ZNK4absl12lts_2024011618container_internal20checked_compare_baseIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11FileCompareELb1EE4compEv:
  175|      3|  const Compare &comp() const { return *this; }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE3keyEm:
  752|      3|  const key_type &key(size_type i) const { return params_type::key(slot(i)); }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE4slotEm:
  675|      3|  const slot_type *slot(size_type i) const { return &GetField<3>()[i]; }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8GetFieldILm3EEEPKNSA_13tuple_elementIXT_ENSA_5tupleIJPSE_jhS8_SI_EEEE4typeEv:
  665|      3|  inline const typename layout_type::template ElementType<N> *GetField() const {
  666|       |    assert(N < 4 || is_internal());
  667|      3|    return InternalLayout().template Pointer<N>(
  668|      3|        reinterpret_cast<const char *>(this));
  669|      3|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE6finishEv:
  701|     58|  field_type finish() const { return GetField<2>()[2]; }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8GetFieldILm2EEEPKNSA_13tuple_elementIXT_ENSA_5tupleIJPSE_jhS8_SI_EEEE4typeEv:
  665|    112|  inline const typename layout_type::template ElementType<N> *GetField() const {
  666|       |    assert(N < 4 || is_internal());
  667|    112|    return InternalLayout().template Pointer<N>(
  668|    112|        reinterpret_cast<const char *>(this));
  669|    112|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE13binary_searchIS8_NS1_19key_compare_adapterIS9_S8_E15checked_compareEEENS1_12SearchResultImXsr23btree_is_key_compare_toIT0_S8_EE5valueEEERKT_RKSK_:
  802|      6|  binary_search(const K &k, const Compare &comp) const {
  803|      6|    return binary_search_impl(k, start(), finish(), comp,
  804|      6|                              btree_is_key_compare_to<Compare, key_type>());
  805|      6|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE18binary_search_implIS8_NS1_19key_compare_adapterIS9_S8_E15checked_compareEEENS1_12SearchResultImLb0EEERKT_mmRKT0_NSA_17integral_constantIbLb0EEE:
  845|      6|      std::false_type /* IsCompareTo */) const {
  846|      9|    while (s != e) {
  ------------------
  |  Branch (846:12): [True: 3, False: 6]
  ------------------
  847|      3|      const size_type mid = (s + e) >> 1;
  848|      3|      if (comp(key(mid), k)) {
  ------------------
  |  Branch (848:11): [True: 3, False: 0]
  ------------------
  849|      3|        s = mid + 1;
  850|      3|      } else {
  851|      0|        e = mid;
  852|      0|      }
  853|      3|    }
  854|      6|    return SearchResult<size_type, false>{s};
  855|      6|  }
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8key_compEv:
 1565|     18|  const key_compare &key_comp() const noexcept {
 1566|     18|    return rightmost_.template get<0>();
 1567|     18|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE7is_leafEv:
  685|     37|  bool is_leaf() const { return GetField<2>()[3] != kInternalNodeMaxCount; }
_ZN4absl12lts_2024011618container_internal12SearchResultINS1_14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS9_11FileCompareENSt3__19allocatorISA_EELi256ELb0EEEEERKSA_PSH_EELb0EEC2ESK_NS1_9MatchKindE:
  480|      6|  SearchResult(V v, MatchKind /*match*/) : value(v) {}
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE13internal_lastINS1_14btree_iteratorINS1_10btree_nodeISD_EERKS8_PSJ_EEEET_SN_:
 2802|      6|inline IterType btree<P>::internal_last(IterType iter) {
 2803|      6|  assert(iter.node_ != nullptr);
 2804|      6|  while (iter.position_ == iter.node_->finish()) {
  ------------------
  |  Branch (2804:10): [True: 6, False: 0]
  ------------------
 2805|      6|    iter.position_ = iter.node_->position();
 2806|      6|    iter.node_ = iter.node_->parent();
 2807|      6|    if (iter.node_->is_leaf()) {
  ------------------
  |  Branch (2807:9): [True: 6, False: 0]
  ------------------
 2808|      6|      iter.node_ = nullptr;
 2809|      6|      break;
 2810|      6|    }
 2811|      6|  }
 2812|      6|  iter.update_generation();
 2813|      6|  return iter;
 2814|      6|}
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8positionEv:
  691|      6|  field_type position() const { return GetField<2>()[0]; }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE6parentEv:
  718|     10|  btree_node *parent() const { return *GetField<0>(); }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8GetFieldILm0EEEPKNSA_13tuple_elementIXT_ENSA_5tupleIJPSE_jhS8_SI_EEEE4typeEv:
  665|     10|  inline const typename layout_type::template ElementType<N> *GetField() const {
  666|       |    assert(N < 4 || is_internal());
  667|     10|    return InternalLayout().template Pointer<N>(
  668|     10|        reinterpret_cast<const char *>(this));
  669|     10|  }
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS8_11FileCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_E17update_generationEv:
 1304|     12|  void update_generation() {
 1305|     12|    btree_iterator_generation_info::update_generation(node_);
 1306|     12|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE16internal_emplaceIJS8_EEENS1_14btree_iteratorINS1_10btree_nodeISD_EERKS8_PSJ_EESM_DpOT_:
 2819|      6|    -> iterator {
 2820|      6|  if (iter.node_->is_internal()) {
  ------------------
  |  Branch (2820:7): [True: 0, False: 6]
  ------------------
 2821|       |    // We can't insert on an internal node. Instead, we'll insert after the
 2822|       |    // previous value which is guaranteed to be on a leaf node.
 2823|      0|    --iter;
 2824|      0|    ++iter.position_;
 2825|      0|  }
 2826|      6|  const field_type max_count = iter.node_->max_count();
 2827|      6|  allocator_type *alloc = mutable_allocator();
 2828|       |
 2829|      6|  const auto transfer_and_delete = [&](node_type *old_node,
 2830|      6|                                       node_type *new_node) {
 2831|      6|    new_node->transfer_n(old_node->count(), new_node->start(),
 2832|      6|                         old_node->start(), old_node, alloc);
 2833|      6|    new_node->set_finish(old_node->finish());
 2834|      6|    old_node->set_finish(old_node->start());
 2835|      6|    new_node->set_generation(old_node->generation());
 2836|      6|    node_type::clear_and_delete(old_node, alloc);
 2837|      6|  };
 2838|      6|  const auto replace_leaf_root_node = [&](field_type new_node_size) {
 2839|      6|    assert(iter.node_ == root());
 2840|      6|    node_type *old_root = iter.node_;
 2841|      6|    node_type *new_root = iter.node_ = new_leaf_root_node(new_node_size);
 2842|      6|    transfer_and_delete(old_root, new_root);
 2843|      6|    mutable_root() = mutable_rightmost() = new_root;
 2844|      6|  };
 2845|       |
 2846|      6|  bool replaced_node = false;
 2847|      6|  if (iter.node_->count() == max_count) {
  ------------------
  |  Branch (2847:7): [True: 3, False: 3]
  ------------------
 2848|       |    // Make room in the leaf for the new item.
 2849|      3|    if (max_count < kNodeSlots) {
  ------------------
  |  Branch (2849:9): [True: 3, False: 0]
  ------------------
 2850|       |      // Insertion into the root where the root is smaller than the full node
 2851|       |      // size. Simply grow the size of the root node.
 2852|      3|      replace_leaf_root_node(static_cast<field_type>(
 2853|      3|          (std::min)(static_cast<int>(kNodeSlots), 2 * max_count)));
 2854|      3|      replaced_node = true;
 2855|      3|    } else {
 2856|      0|      rebalance_or_split(&iter);
 2857|      0|    }
 2858|      3|  }
 2859|      6|  (void)replaced_node;
 2860|       |#if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \
 2861|       |    defined(ABSL_HAVE_HWADDRESS_SANITIZER)
 2862|       |  if (!replaced_node) {
 2863|       |    assert(iter.node_->is_leaf());
 2864|       |    if (iter.node_->is_root()) {
 2865|       |      replace_leaf_root_node(max_count);
 2866|       |    } else {
 2867|       |      node_type *old_node = iter.node_;
 2868|       |      const bool was_rightmost = rightmost() == old_node;
 2869|       |      const bool was_leftmost = leftmost() == old_node;
 2870|       |      node_type *parent = old_node->parent();
 2871|       |      const field_type position = old_node->position();
 2872|       |      node_type *new_node = iter.node_ = new_leaf_node(position, parent);
 2873|       |      parent->set_child_noupdate_position(position, new_node);
 2874|       |      transfer_and_delete(old_node, new_node);
 2875|       |      if (was_rightmost) mutable_rightmost() = new_node;
 2876|       |      // The leftmost node is stored as the parent of the root node.
 2877|       |      if (was_leftmost) root()->set_parent(new_node);
 2878|       |    }
 2879|       |  }
 2880|       |#endif
 2881|      6|  iter.node_->emplace_value(static_cast<field_type>(iter.position_), alloc,
 2882|      6|                            std::forward<Args>(args)...);
 2883|       |  assert(
 2884|      6|      iter.node_->is_ordered_correctly(static_cast<field_type>(iter.position_),
 2885|      6|                                       original_key_compare(key_comp())) &&
 2886|      6|      "If this assert fails, then either (1) the comparator may violate "
 2887|      6|      "transitivity, i.e. comp(a,b) && comp(b,c) -> comp(a,c) (see "
 2888|      6|      "https://en.cppreference.com/w/cpp/named_req/Compare), or (2) a "
 2889|      6|      "key may have been mutated after it was inserted into the tree.");
 2890|      6|  ++size_;
 2891|      6|  iter.update_generation();
 2892|      6|  return iter;
 2893|      6|}
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE11is_internalEv:
  688|     12|  bool is_internal() const { return !is_leaf(); }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE7is_rootEv:
  722|      2|  bool is_root() const { return parent()->is_leaf(); }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE9max_countEv:
  708|     11|  field_type max_count() const {
  709|       |    // Internal nodes have max_count==kInternalNodeMaxCount.
  710|       |    // Leaf nodes have max_count in [1, kNodeSlots].
  711|     11|    const field_type max_count = GetField<2>()[3];
  712|     11|    return max_count == field_type{kInternalNodeMaxCount}
  ------------------
  |  Branch (712:12): [True: 0, False: 11]
  ------------------
  713|     11|               ? field_type{kNodeSlots}
  714|     11|               : max_count;
  715|     11|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE5countEv:
  704|     14|  field_type count() const {
  705|       |    assert(finish() >= start());
  706|     14|    return finish() - start();
  707|     14|  }
_ZZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE16internal_emplaceIJS8_EEENS1_14btree_iteratorINS1_10btree_nodeISD_EERKS8_PSJ_EESM_DpOT_ENKUlhE_clEh:
 2838|      3|  const auto replace_leaf_root_node = [&](field_type new_node_size) {
 2839|       |    assert(iter.node_ == root());
 2840|      3|    node_type *old_root = iter.node_;
 2841|      3|    node_type *new_root = iter.node_ = new_leaf_root_node(new_node_size);
 2842|      3|    transfer_and_delete(old_root, new_root);
 2843|      3|    mutable_root() = mutable_rightmost() = new_root;
 2844|      3|  };
_ZZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE16internal_emplaceIJS8_EEENS1_14btree_iteratorINS1_10btree_nodeISD_EERKS8_PSJ_EESM_DpOT_ENKUlPSI_SQ_E_clESQ_SQ_:
 2830|      3|                                       node_type *new_node) {
 2831|      3|    new_node->transfer_n(old_node->count(), new_node->start(),
 2832|      3|                         old_node->start(), old_node, alloc);
 2833|      3|    new_node->set_finish(old_node->finish());
 2834|      3|    old_node->set_finish(old_node->start());
 2835|      3|    new_node->set_generation(old_node->generation());
 2836|      3|    node_type::clear_and_delete(old_node, alloc);
 2837|      3|  };
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10transfer_nEmmmPSE_PSC_:
 1020|      3|                  allocator_type *alloc) {
 1021|      3|    next_generation();
 1022|      3|    for (slot_type *src = src_node->slot(src_i), *end = src + n,
 1023|      3|                   *dest = slot(dest_i);
 1024|      7|         src != end; ++src, ++dest) {
  ------------------
  |  Branch (1024:10): [True: 4, False: 3]
  ------------------
 1025|      4|      transfer(dest, src, alloc);
 1026|      4|    }
 1027|      3|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE15next_generationEv:
  747|     14|  void next_generation() {
  748|     14|    if (BtreeGenerationsEnabled()) ++*get_root_generation();
  ------------------
  |  Branch (748:9): [Folded, False: 14]
  ------------------
  749|     14|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8transferEPS8_SF_PSC_:
 1003|      4|  static void transfer(slot_type *dest, slot_type *src, allocator_type *alloc) {
 1004|      4|    absl::container_internal::SanitizerUnpoisonObject(dest);
 1005|      4|    params_type::transfer(alloc, dest, src);
 1006|      4|    absl::container_internal::SanitizerPoisonObject(src);
 1007|      4|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE16clear_and_deleteEPSE_PSC_:
 2008|      5|void btree_node<P>::clear_and_delete(btree_node *node, allocator_type *alloc) {
 2009|      5|  if (node->is_leaf()) {
  ------------------
  |  Branch (2009:7): [True: 5, False: 0]
  ------------------
 2010|      5|    node->value_destroy_n(node->start(), node->count(), alloc);
 2011|      5|    deallocate(LeafSize(node->max_count()), node, alloc);
 2012|      5|    return;
 2013|      5|  }
 2014|      0|  if (node->count() == 0) {
  ------------------
  |  Branch (2014:7): [True: 0, False: 0]
  ------------------
 2015|      0|    deallocate(InternalSize(), node, alloc);
 2016|      0|    return;
 2017|      0|  }
 2018|       |
 2019|       |  // The parent of the root of the subtree we are deleting.
 2020|      0|  btree_node *delete_root_parent = node->parent();
 2021|       |
 2022|       |  // Navigate to the leftmost leaf under node, and then delete upwards.
 2023|      0|  while (node->is_internal()) node = node->start_child();
  ------------------
  |  Branch (2023:10): [True: 0, False: 0]
  ------------------
 2024|       |#ifdef ABSL_BTREE_ENABLE_GENERATIONS
 2025|       |  // When generations are enabled, we delete the leftmost leaf last in case it's
 2026|       |  // the parent of the root and we need to check whether it's a leaf before we
 2027|       |  // can update the root's generation.
 2028|       |  // TODO(ezb): if we change btree_node::is_root to check a bool inside the node
 2029|       |  // instead of checking whether the parent is a leaf, we can remove this logic.
 2030|       |  btree_node *leftmost_leaf = node;
 2031|       |#endif
 2032|       |  // Use `size_type` because `pos` needs to be able to hold `kNodeSlots+1`,
 2033|       |  // which isn't guaranteed to be a valid `field_type`.
 2034|      0|  size_type pos = node->position();
 2035|      0|  btree_node *parent = node->parent();
 2036|      0|  for (;;) {
 2037|       |    // In each iteration of the next loop, we delete one leaf node and go right.
 2038|      0|    assert(pos <= parent->finish());
 2039|      0|    do {
 2040|      0|      node = parent->child(static_cast<field_type>(pos));
 2041|      0|      if (node->is_internal()) {
  ------------------
  |  Branch (2041:11): [True: 0, False: 0]
  ------------------
 2042|       |        // Navigate to the leftmost leaf under node.
 2043|      0|        while (node->is_internal()) node = node->start_child();
  ------------------
  |  Branch (2043:16): [True: 0, False: 0]
  ------------------
 2044|      0|        pos = node->position();
 2045|      0|        parent = node->parent();
 2046|      0|      }
 2047|      0|      node->value_destroy_n(node->start(), node->count(), alloc);
 2048|       |#ifdef ABSL_BTREE_ENABLE_GENERATIONS
 2049|       |      if (leftmost_leaf != node)
 2050|       |#endif
 2051|      0|        deallocate(LeafSize(node->max_count()), node, alloc);
 2052|      0|      ++pos;
 2053|      0|    } while (pos <= parent->finish());
  ------------------
  |  Branch (2053:14): [True: 0, False: 0]
  ------------------
 2054|       |
 2055|       |    // Once we've deleted all children of parent, delete parent and go up/right.
 2056|      0|    assert(pos > parent->finish());
 2057|      0|    do {
 2058|      0|      node = parent;
 2059|      0|      pos = node->position();
 2060|      0|      parent = node->parent();
 2061|      0|      node->value_destroy_n(node->start(), node->count(), alloc);
 2062|      0|      deallocate(InternalSize(), node, alloc);
 2063|      0|      if (parent == delete_root_parent) {
  ------------------
  |  Branch (2063:11): [True: 0, False: 0]
  ------------------
 2064|       |#ifdef ABSL_BTREE_ENABLE_GENERATIONS
 2065|       |        deallocate(LeafSize(leftmost_leaf->max_count()), leftmost_leaf, alloc);
 2066|       |#endif
 2067|      0|        return;
 2068|      0|      }
 2069|      0|      ++pos;
 2070|      0|    } while (pos > parent->finish());
  ------------------
  |  Branch (2070:14): [True: 0, False: 0]
  ------------------
 2071|      0|  }
 2072|      0|}
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE15value_destroy_nEhhPSC_:
  995|      5|                       allocator_type *alloc) {
  996|      5|    next_generation();
  997|      9|    for (slot_type *s = slot(i), *end = slot(i + n); s != end; ++s) {
  ------------------
  |  Branch (997:54): [True: 4, False: 5]
  ------------------
  998|      4|      params_type::destroy(alloc, s);
  999|      4|      absl::container_internal::SanitizerPoisonObject(s);
 1000|      4|    }
 1001|      5|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10deallocateEmPSE_PSC_:
  974|      5|                         allocator_type *alloc) {
  975|      5|    absl::container_internal::SanitizerUnpoisonMemoryRegion(node, size);
  976|      5|    absl::container_internal::Deallocate<Alignment()>(alloc, node, size);
  977|      5|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE4rootEv:
 1659|      4|  node_type *root() { return root_; }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE9rightmostEv:
 1662|      4|  node_type *rightmost() { return rightmost_.template get<2>(); }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE13emplace_valueIJS8_EEEvhPSC_DpOT_:
 1807|      6|                                         Args &&...args) {
 1808|      6|  assert(i >= start());
 1809|      6|  assert(i <= finish());
 1810|       |  // Shift old values to create space for new value and then construct it in
 1811|       |  // place.
 1812|      6|  if (i < finish()) {
  ------------------
  |  Branch (1812:7): [True: 0, False: 6]
  ------------------
 1813|      0|    transfer_n_backward(finish() - i, /*dest_i=*/i + 1, /*src_i=*/i, this,
 1814|      0|                        alloc);
 1815|      0|  }
 1816|      6|  value_init(static_cast<field_type>(i), alloc, std::forward<Args>(args)...);
 1817|      6|  set_finish(finish() + 1);
 1818|       |
 1819|      6|  if (is_internal() && finish() > i + 1) {
  ------------------
  |  Branch (1819:7): [True: 0, False: 6]
  |  Branch (1819:24): [True: 0, False: 0]
  ------------------
 1820|      0|    for (field_type j = finish(); j > i + 1; --j) {
  ------------------
  |  Branch (1820:35): [True: 0, False: 0]
  ------------------
 1821|      0|      set_child(j, child(j - 1));
 1822|      0|    }
 1823|      0|    clear_child(i + 1);
 1824|      0|  }
 1825|      6|}
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10value_initIJS8_EEEvhPSC_DpOT_:
  984|      6|  void value_init(const field_type i, allocator_type *alloc, Args &&...args) {
  985|      6|    next_generation();
  986|      6|    absl::container_internal::SanitizerUnpoisonObject(slot(i));
  987|      6|    params_type::construct(alloc, slot(i), std::forward<Args>(args)...);
  988|      6|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE13insert_uniqueIS8_JS8_EEENSA_4pairINS1_14btree_iteratorINS1_10btree_nodeISD_EERKS8_PSK_EEbEERKT_DpOT0_:
 2278|      1|    -> std::pair<iterator, bool> {
 2279|      1|  if (empty()) {
  ------------------
  |  Branch (2279:7): [True: 1, False: 0]
  ------------------
 2280|      1|    mutable_root() = mutable_rightmost() = new_leaf_root_node(1);
 2281|      1|  }
 2282|       |
 2283|      1|  SearchResult<iterator, is_key_compare_to::value> res = internal_locate(key);
 2284|      1|  iterator iter = res.value;
 2285|       |
 2286|      1|  if (res.HasMatch()) {
  ------------------
  |  Branch (2286:7): [Folded, False: 1]
  ------------------
 2287|      0|    if (res.IsEq()) {
  ------------------
  |  Branch (2287:9): [Folded, False: 0]
  ------------------
 2288|       |      // The key already exists in the tree, do nothing.
 2289|      0|      return {iter, false};
 2290|      0|    }
 2291|      1|  } else {
 2292|      1|    iterator last = internal_last(iter);
 2293|      1|    if (last.node_ && !compare_keys(key, last.key())) {
  ------------------
  |  Branch (2293:9): [True: 0, False: 1]
  |  Branch (2293:23): [True: 0, False: 0]
  ------------------
 2294|       |      // The key already exists in the tree, do nothing.
 2295|      0|      return {last, false};
 2296|      0|    }
 2297|      1|  }
 2298|      1|  return {internal_emplace(iter, std::forward<Args>(args)...), true};
 2299|      1|}
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE5emptyEv:
 1583|      6|  bool empty() const { return size_ == 0; }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE18new_leaf_root_nodeEh:
 1702|      1|  node_type *new_leaf_root_node(field_type max_count) {
 1703|      1|    node_type *n = allocate(node_type::LeafSize(max_count));
 1704|      1|    n->init_leaf(/*position=*/0, max_count, /*parent=*/n);
 1705|      1|    return n;
 1706|      1|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8allocateEm:
 1685|      1|  node_type *allocate(size_type size) {
 1686|      1|    return reinterpret_cast<node_type *>(
 1687|      1|        absl::container_internal::Allocate<node_type::Alignment()>(
 1688|      1|            mutable_allocator(), size));
 1689|      1|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE17mutable_allocatorEv:
 1676|      3|  allocator_type *mutable_allocator() noexcept {
 1677|      3|    return &rightmost_.template get<1>();
 1678|      3|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8LeafSizeEm:
  643|      2|  constexpr static size_type LeafSize(const size_type slot_count = kNodeSlots) {
  644|      2|    return LeafLayout(slot_count).AllocSize();
  645|      2|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10LeafLayoutEm:
  637|      2|      const size_type slot_count = kNodeSlots) {
  638|      2|    return Layout(slot_count, 0);
  639|      2|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE6LayoutEmm:
  627|     39|                                      const size_type child_count) {
  628|     39|    return layout_type(
  629|     39|        /*parent*/ 1,
  630|     39|        /*generation*/ BtreeGenerationsEnabled() ? 1 : 0,
  ------------------
  |  Branch (630:24): [Folded, False: 39]
  ------------------
  631|     39|        /*position, start, finish, max_count*/ 4,
  632|     39|        /*slots*/ slot_count,
  633|     39|        /*children*/ child_count);
  634|     39|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE9init_leafEhhPSE_:
  954|      1|                 btree_node *parent) {
  955|      1|    set_generation(0);
  956|      1|    set_parent(parent);
  957|      1|    set_position(position);
  958|      1|    set_start(0);
  959|      1|    set_finish(0);
  960|      1|    set_max_count(max_count);
  961|      1|    absl::container_internal::SanitizerPoisonMemoryRegion(
  962|      1|        start_slot(), max_count * sizeof(slot_type));
  963|      1|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE14set_generationEj:
  743|      1|  void set_generation(uint32_t generation) {
  744|      1|    if (BtreeGenerationsEnabled()) GetField<1>()[0] = generation;
  ------------------
  |  Branch (744:9): [Folded, False: 1]
  ------------------
  745|      1|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10set_parentEPSE_:
  670|      1|  void set_parent(btree_node *p) { *GetField<0>() = p; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8GetFieldILm0EEEPNSA_13tuple_elementIXT_ENSA_5tupleIJPSE_jhS8_SI_EEEE4typeEv:
  659|      1|  inline typename layout_type::template ElementType<N> *GetField() {
  660|       |    // We assert that we don't read from values that aren't there.
  661|       |    assert(N < 4 || is_internal());
  662|      1|    return InternalLayout().template Pointer<N>(reinterpret_cast<char *>(this));
  663|      1|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE14InternalLayoutEv:
  640|     37|  constexpr static layout_type InternalLayout() {
  641|     37|    return Layout(kNodeSlots, kNodeSlots + 1);
  642|     37|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE12set_positionEh:
  676|      1|  void set_position(field_type v) { GetField<2>()[0] = v; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8GetFieldILm2EEEPNSA_13tuple_elementIXT_ENSA_5tupleIJPSE_jhS8_SI_EEEE4typeEv:
  659|      5|  inline typename layout_type::template ElementType<N> *GetField() {
  660|       |    // We assert that we don't read from values that aren't there.
  661|       |    assert(N < 4 || is_internal());
  662|      5|    return InternalLayout().template Pointer<N>(reinterpret_cast<char *>(this));
  663|      5|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE9set_startEh:
  677|      1|  void set_start(field_type v) { GetField<2>()[1] = v; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10set_finishEh:
  678|      2|  void set_finish(field_type v) { GetField<2>()[2] = v; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE13set_max_countEh:
  680|      1|  void set_max_count(field_type v) { GetField<2>()[3] = v; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10start_slotEv:
  673|      1|  slot_type *start_slot() { return slot(start()); }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE4slotEm:
  672|      6|  slot_type *slot(size_type i) { return &GetField<3>()[i]; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8GetFieldILm3EEEPNSA_13tuple_elementIXT_ENSA_5tupleIJPSE_jhS8_SI_EEEE4typeEv:
  659|      6|  inline typename layout_type::template ElementType<N> *GetField() {
  660|       |    // We assert that we don't read from values that aren't there.
  661|       |    assert(N < 4 || is_internal());
  662|      6|    return InternalLayout().template Pointer<N>(reinterpret_cast<char *>(this));
  663|      6|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE5startEv:
  694|      7|  field_type start() const {
  695|       |    // TODO(ezb): when floating storage is implemented, return GetField<2>()[1];
  696|       |    assert(GetField<2>()[1] == 0);
  697|      7|    return 0;
  698|      7|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE17mutable_rightmostEv:
 1664|      2|  node_type *&mutable_rightmost() noexcept {
 1665|      2|    return rightmost_.template get<2>();
 1666|      2|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE12mutable_rootEv:
 1661|      2|  node_type *&mutable_root() noexcept { return root_; }
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE15internal_locateIS8_EENS1_12SearchResultINS1_14btree_iteratorINS1_10btree_nodeISD_EERKS8_PSK_EELb0EEERKT_:
 2898|      1|    -> SearchResult<iterator, is_key_compare_to::value> {
 2899|      1|  iterator iter(const_cast<node_type *>(root()));
 2900|      1|  for (;;) {
 2901|      1|    SearchResult<size_type, is_key_compare_to::value> res =
 2902|      1|        iter.node_->lower_bound(key, key_comp());
 2903|      1|    iter.position_ = static_cast<int>(res.value);
 2904|      1|    if (res.IsEq()) {
  ------------------
  |  Branch (2904:9): [Folded, False: 1]
  ------------------
 2905|      0|      return {iter, MatchKind::kEq};
 2906|      0|    }
 2907|       |    // Note: in the non-key-compare-to case, we don't need to walk all the way
 2908|       |    // down the tree if the keys are equal, but determining equality would
 2909|       |    // require doing an extra comparison on each node on the way down, and we
 2910|       |    // will need to go all the way to the leaf node in the expected case.
 2911|      1|    if (iter.node_->is_leaf()) {
  ------------------
  |  Branch (2911:9): [True: 1, False: 0]
  ------------------
 2912|      1|      break;
 2913|      1|    }
 2914|      0|    iter.node_ = iter.node_->child(static_cast<field_type>(iter.position_));
 2915|      0|  }
 2916|       |  // Note: in the non-key-compare-to case, the key may actually be equivalent
 2917|       |  // here (and the MatchKind::kNe is ignored).
 2918|      1|  return {iter, MatchKind::kNe};
 2919|      1|}
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE4rootEv:
 1660|      1|  const node_type *root() const { return root_; }
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS8_16ExtensionCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_EC2EPSF_:
 1142|      2|  explicit btree_iterator(Node *n) : btree_iterator(n, n->start()) {}
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS8_16ExtensionCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_EC2EPSF_i:
 1144|      3|      : btree_iterator_generation_info(n != nullptr ? n->generation()
  ------------------
  |  Branch (1144:40): [True: 3, False: 0]
  ------------------
 1145|      3|                                                    : ~uint32_t{}),
 1146|      3|        node_(n),
 1147|      3|        position_(p) {}
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10generationEv:
  738|      3|  uint32_t generation() const {
  739|      3|    return BtreeGenerationsEnabled() ? *get_root_generation() : 0;
  ------------------
  |  Branch (739:12): [Folded, False: 3]
  ------------------
  740|      3|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE11lower_boundIS8_EENS1_12SearchResultImLb0EEERKT_RKNS1_19key_compare_adapterIS9_S8_E15checked_compareE:
  781|      1|      const K &k, const key_compare &comp) const {
  782|      1|    return use_linear_search::value ? linear_search(k, comp)
  ------------------
  |  Branch (782:12): [Folded, False: 1]
  ------------------
  783|      1|                                    : binary_search(k, comp);
  784|      1|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE6finishEv:
  701|     11|  field_type finish() const { return GetField<2>()[2]; }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8GetFieldILm2EEEPKNSA_13tuple_elementIXT_ENSA_5tupleIJPSE_jhS8_SI_EEEE4typeEv:
  665|     22|  inline const typename layout_type::template ElementType<N> *GetField() const {
  666|       |    assert(N < 4 || is_internal());
  667|     22|    return InternalLayout().template Pointer<N>(
  668|     22|        reinterpret_cast<const char *>(this));
  669|     22|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE13binary_searchIS8_NS1_19key_compare_adapterIS9_S8_E15checked_compareEEENS1_12SearchResultImXsr23btree_is_key_compare_toIT0_S8_EE5valueEEERKT_RKSK_:
  802|      1|  binary_search(const K &k, const Compare &comp) const {
  803|      1|    return binary_search_impl(k, start(), finish(), comp,
  804|      1|                              btree_is_key_compare_to<Compare, key_type>());
  805|      1|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE18binary_search_implIS8_NS1_19key_compare_adapterIS9_S8_E15checked_compareEEENS1_12SearchResultImLb0EEERKT_mmRKT0_NSA_17integral_constantIbLb0EEE:
  845|      1|      std::false_type /* IsCompareTo */) const {
  846|      1|    while (s != e) {
  ------------------
  |  Branch (846:12): [True: 0, False: 1]
  ------------------
  847|      0|      const size_type mid = (s + e) >> 1;
  848|      0|      if (comp(key(mid), k)) {
  ------------------
  |  Branch (848:11): [True: 0, False: 0]
  ------------------
  849|      0|        s = mid + 1;
  850|      0|      } else {
  851|      0|        e = mid;
  852|      0|      }
  853|      0|    }
  854|      1|    return SearchResult<size_type, false>{s};
  855|      1|  }
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8key_compEv:
 1565|      3|  const key_compare &key_comp() const noexcept {
 1566|      3|    return rightmost_.template get<0>();
 1567|      3|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE7is_leafEv:
  685|      8|  bool is_leaf() const { return GetField<2>()[3] != kInternalNodeMaxCount; }
_ZN4absl12lts_2024011618container_internal12SearchResultINS1_14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS9_16ExtensionCompareENSt3__19allocatorISA_EELi256ELb0EEEEERKSA_PSH_EELb0EEC2ESK_NS1_9MatchKindE:
  480|      1|  SearchResult(V v, MatchKind /*match*/) : value(v) {}
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE13internal_lastINS1_14btree_iteratorINS1_10btree_nodeISD_EERKS8_PSJ_EEEET_SN_:
 2802|      1|inline IterType btree<P>::internal_last(IterType iter) {
 2803|      1|  assert(iter.node_ != nullptr);
 2804|      1|  while (iter.position_ == iter.node_->finish()) {
  ------------------
  |  Branch (2804:10): [True: 1, False: 0]
  ------------------
 2805|      1|    iter.position_ = iter.node_->position();
 2806|      1|    iter.node_ = iter.node_->parent();
 2807|      1|    if (iter.node_->is_leaf()) {
  ------------------
  |  Branch (2807:9): [True: 1, False: 0]
  ------------------
 2808|      1|      iter.node_ = nullptr;
 2809|      1|      break;
 2810|      1|    }
 2811|      1|  }
 2812|      1|  iter.update_generation();
 2813|      1|  return iter;
 2814|      1|}
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8positionEv:
  691|      1|  field_type position() const { return GetField<2>()[0]; }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE6parentEv:
  718|      3|  btree_node *parent() const { return *GetField<0>(); }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8GetFieldILm0EEEPKNSA_13tuple_elementIXT_ENSA_5tupleIJPSE_jhS8_SI_EEEE4typeEv:
  665|      3|  inline const typename layout_type::template ElementType<N> *GetField() const {
  666|       |    assert(N < 4 || is_internal());
  667|      3|    return InternalLayout().template Pointer<N>(
  668|      3|        reinterpret_cast<const char *>(this));
  669|      3|  }
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS8_16ExtensionCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_E17update_generationEv:
 1304|      2|  void update_generation() {
 1305|      2|    btree_iterator_generation_info::update_generation(node_);
 1306|      2|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE16internal_emplaceIJS8_EEENS1_14btree_iteratorINS1_10btree_nodeISD_EERKS8_PSJ_EESM_DpOT_:
 2819|      1|    -> iterator {
 2820|      1|  if (iter.node_->is_internal()) {
  ------------------
  |  Branch (2820:7): [True: 0, False: 1]
  ------------------
 2821|       |    // We can't insert on an internal node. Instead, we'll insert after the
 2822|       |    // previous value which is guaranteed to be on a leaf node.
 2823|      0|    --iter;
 2824|      0|    ++iter.position_;
 2825|      0|  }
 2826|      1|  const field_type max_count = iter.node_->max_count();
 2827|      1|  allocator_type *alloc = mutable_allocator();
 2828|       |
 2829|      1|  const auto transfer_and_delete = [&](node_type *old_node,
 2830|      1|                                       node_type *new_node) {
 2831|      1|    new_node->transfer_n(old_node->count(), new_node->start(),
 2832|      1|                         old_node->start(), old_node, alloc);
 2833|      1|    new_node->set_finish(old_node->finish());
 2834|      1|    old_node->set_finish(old_node->start());
 2835|      1|    new_node->set_generation(old_node->generation());
 2836|      1|    node_type::clear_and_delete(old_node, alloc);
 2837|      1|  };
 2838|      1|  const auto replace_leaf_root_node = [&](field_type new_node_size) {
 2839|      1|    assert(iter.node_ == root());
 2840|      1|    node_type *old_root = iter.node_;
 2841|      1|    node_type *new_root = iter.node_ = new_leaf_root_node(new_node_size);
 2842|      1|    transfer_and_delete(old_root, new_root);
 2843|      1|    mutable_root() = mutable_rightmost() = new_root;
 2844|      1|  };
 2845|       |
 2846|      1|  bool replaced_node = false;
 2847|      1|  if (iter.node_->count() == max_count) {
  ------------------
  |  Branch (2847:7): [True: 0, False: 1]
  ------------------
 2848|       |    // Make room in the leaf for the new item.
 2849|      0|    if (max_count < kNodeSlots) {
  ------------------
  |  Branch (2849:9): [True: 0, False: 0]
  ------------------
 2850|       |      // Insertion into the root where the root is smaller than the full node
 2851|       |      // size. Simply grow the size of the root node.
 2852|      0|      replace_leaf_root_node(static_cast<field_type>(
 2853|      0|          (std::min)(static_cast<int>(kNodeSlots), 2 * max_count)));
 2854|      0|      replaced_node = true;
 2855|      0|    } else {
 2856|      0|      rebalance_or_split(&iter);
 2857|      0|    }
 2858|      0|  }
 2859|      1|  (void)replaced_node;
 2860|       |#if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \
 2861|       |    defined(ABSL_HAVE_HWADDRESS_SANITIZER)
 2862|       |  if (!replaced_node) {
 2863|       |    assert(iter.node_->is_leaf());
 2864|       |    if (iter.node_->is_root()) {
 2865|       |      replace_leaf_root_node(max_count);
 2866|       |    } else {
 2867|       |      node_type *old_node = iter.node_;
 2868|       |      const bool was_rightmost = rightmost() == old_node;
 2869|       |      const bool was_leftmost = leftmost() == old_node;
 2870|       |      node_type *parent = old_node->parent();
 2871|       |      const field_type position = old_node->position();
 2872|       |      node_type *new_node = iter.node_ = new_leaf_node(position, parent);
 2873|       |      parent->set_child_noupdate_position(position, new_node);
 2874|       |      transfer_and_delete(old_node, new_node);
 2875|       |      if (was_rightmost) mutable_rightmost() = new_node;
 2876|       |      // The leftmost node is stored as the parent of the root node.
 2877|       |      if (was_leftmost) root()->set_parent(new_node);
 2878|       |    }
 2879|       |  }
 2880|       |#endif
 2881|      1|  iter.node_->emplace_value(static_cast<field_type>(iter.position_), alloc,
 2882|      1|                            std::forward<Args>(args)...);
 2883|       |  assert(
 2884|      1|      iter.node_->is_ordered_correctly(static_cast<field_type>(iter.position_),
 2885|      1|                                       original_key_compare(key_comp())) &&
 2886|      1|      "If this assert fails, then either (1) the comparator may violate "
 2887|      1|      "transitivity, i.e. comp(a,b) && comp(b,c) -> comp(a,c) (see "
 2888|      1|      "https://en.cppreference.com/w/cpp/named_req/Compare), or (2) a "
 2889|      1|      "key may have been mutated after it was inserted into the tree.");
 2890|      1|  ++size_;
 2891|      1|  iter.update_generation();
 2892|      1|  return iter;
 2893|      1|}
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE11is_internalEv:
  688|      2|  bool is_internal() const { return !is_leaf(); }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE7is_rootEv:
  722|      1|  bool is_root() const { return parent()->is_leaf(); }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE9max_countEv:
  708|      2|  field_type max_count() const {
  709|       |    // Internal nodes have max_count==kInternalNodeMaxCount.
  710|       |    // Leaf nodes have max_count in [1, kNodeSlots].
  711|      2|    const field_type max_count = GetField<2>()[3];
  712|      2|    return max_count == field_type{kInternalNodeMaxCount}
  ------------------
  |  Branch (712:12): [True: 0, False: 2]
  ------------------
  713|      2|               ? field_type{kNodeSlots}
  714|      2|               : max_count;
  715|      2|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE5countEv:
  704|      2|  field_type count() const {
  705|       |    assert(finish() >= start());
  706|      2|    return finish() - start();
  707|      2|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE15next_generationEv:
  747|      2|  void next_generation() {
  748|      2|    if (BtreeGenerationsEnabled()) ++*get_root_generation();
  ------------------
  |  Branch (748:9): [Folded, False: 2]
  ------------------
  749|      2|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE16clear_and_deleteEPSE_PSC_:
 2008|      1|void btree_node<P>::clear_and_delete(btree_node *node, allocator_type *alloc) {
 2009|      1|  if (node->is_leaf()) {
  ------------------
  |  Branch (2009:7): [True: 1, False: 0]
  ------------------
 2010|      1|    node->value_destroy_n(node->start(), node->count(), alloc);
 2011|      1|    deallocate(LeafSize(node->max_count()), node, alloc);
 2012|      1|    return;
 2013|      1|  }
 2014|      0|  if (node->count() == 0) {
  ------------------
  |  Branch (2014:7): [True: 0, False: 0]
  ------------------
 2015|      0|    deallocate(InternalSize(), node, alloc);
 2016|      0|    return;
 2017|      0|  }
 2018|       |
 2019|       |  // The parent of the root of the subtree we are deleting.
 2020|      0|  btree_node *delete_root_parent = node->parent();
 2021|       |
 2022|       |  // Navigate to the leftmost leaf under node, and then delete upwards.
 2023|      0|  while (node->is_internal()) node = node->start_child();
  ------------------
  |  Branch (2023:10): [True: 0, False: 0]
  ------------------
 2024|       |#ifdef ABSL_BTREE_ENABLE_GENERATIONS
 2025|       |  // When generations are enabled, we delete the leftmost leaf last in case it's
 2026|       |  // the parent of the root and we need to check whether it's a leaf before we
 2027|       |  // can update the root's generation.
 2028|       |  // TODO(ezb): if we change btree_node::is_root to check a bool inside the node
 2029|       |  // instead of checking whether the parent is a leaf, we can remove this logic.
 2030|       |  btree_node *leftmost_leaf = node;
 2031|       |#endif
 2032|       |  // Use `size_type` because `pos` needs to be able to hold `kNodeSlots+1`,
 2033|       |  // which isn't guaranteed to be a valid `field_type`.
 2034|      0|  size_type pos = node->position();
 2035|      0|  btree_node *parent = node->parent();
 2036|      0|  for (;;) {
 2037|       |    // In each iteration of the next loop, we delete one leaf node and go right.
 2038|      0|    assert(pos <= parent->finish());
 2039|      0|    do {
 2040|      0|      node = parent->child(static_cast<field_type>(pos));
 2041|      0|      if (node->is_internal()) {
  ------------------
  |  Branch (2041:11): [True: 0, False: 0]
  ------------------
 2042|       |        // Navigate to the leftmost leaf under node.
 2043|      0|        while (node->is_internal()) node = node->start_child();
  ------------------
  |  Branch (2043:16): [True: 0, False: 0]
  ------------------
 2044|      0|        pos = node->position();
 2045|      0|        parent = node->parent();
 2046|      0|      }
 2047|      0|      node->value_destroy_n(node->start(), node->count(), alloc);
 2048|       |#ifdef ABSL_BTREE_ENABLE_GENERATIONS
 2049|       |      if (leftmost_leaf != node)
 2050|       |#endif
 2051|      0|        deallocate(LeafSize(node->max_count()), node, alloc);
 2052|      0|      ++pos;
 2053|      0|    } while (pos <= parent->finish());
  ------------------
  |  Branch (2053:14): [True: 0, False: 0]
  ------------------
 2054|       |
 2055|       |    // Once we've deleted all children of parent, delete parent and go up/right.
 2056|      0|    assert(pos > parent->finish());
 2057|      0|    do {
 2058|      0|      node = parent;
 2059|      0|      pos = node->position();
 2060|      0|      parent = node->parent();
 2061|      0|      node->value_destroy_n(node->start(), node->count(), alloc);
 2062|      0|      deallocate(InternalSize(), node, alloc);
 2063|      0|      if (parent == delete_root_parent) {
  ------------------
  |  Branch (2063:11): [True: 0, False: 0]
  ------------------
 2064|       |#ifdef ABSL_BTREE_ENABLE_GENERATIONS
 2065|       |        deallocate(LeafSize(leftmost_leaf->max_count()), leftmost_leaf, alloc);
 2066|       |#endif
 2067|      0|        return;
 2068|      0|      }
 2069|      0|      ++pos;
 2070|      0|    } while (pos > parent->finish());
  ------------------
  |  Branch (2070:14): [True: 0, False: 0]
  ------------------
 2071|      0|  }
 2072|      0|}
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE15value_destroy_nEhhPSC_:
  995|      1|                       allocator_type *alloc) {
  996|      1|    next_generation();
  997|      2|    for (slot_type *s = slot(i), *end = slot(i + n); s != end; ++s) {
  ------------------
  |  Branch (997:54): [True: 1, False: 1]
  ------------------
  998|      1|      params_type::destroy(alloc, s);
  999|      1|      absl::container_internal::SanitizerPoisonObject(s);
 1000|      1|    }
 1001|      1|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10deallocateEmPSE_PSC_:
  974|      1|                         allocator_type *alloc) {
  975|      1|    absl::container_internal::SanitizerUnpoisonMemoryRegion(node, size);
  976|      1|    absl::container_internal::Deallocate<Alignment()>(alloc, node, size);
  977|      1|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE4rootEv:
 1659|      2|  node_type *root() { return root_; }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE9rightmostEv:
 1662|      2|  node_type *rightmost() { return rightmost_.template get<2>(); }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE13emplace_valueIJS8_EEEvhPSC_DpOT_:
 1807|      1|                                         Args &&...args) {
 1808|      1|  assert(i >= start());
 1809|      1|  assert(i <= finish());
 1810|       |  // Shift old values to create space for new value and then construct it in
 1811|       |  // place.
 1812|      1|  if (i < finish()) {
  ------------------
  |  Branch (1812:7): [True: 0, False: 1]
  ------------------
 1813|      0|    transfer_n_backward(finish() - i, /*dest_i=*/i + 1, /*src_i=*/i, this,
 1814|      0|                        alloc);
 1815|      0|  }
 1816|      1|  value_init(static_cast<field_type>(i), alloc, std::forward<Args>(args)...);
 1817|      1|  set_finish(finish() + 1);
 1818|       |
 1819|      1|  if (is_internal() && finish() > i + 1) {
  ------------------
  |  Branch (1819:7): [True: 0, False: 1]
  |  Branch (1819:24): [True: 0, False: 0]
  ------------------
 1820|      0|    for (field_type j = finish(); j > i + 1; --j) {
  ------------------
  |  Branch (1820:35): [True: 0, False: 0]
  ------------------
 1821|      0|      set_child(j, child(j - 1));
 1822|      0|    }
 1823|      0|    clear_child(i + 1);
 1824|      0|  }
 1825|      1|}
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10value_initIJS8_EEEvhPSC_DpOT_:
  984|      1|  void value_init(const field_type i, allocator_type *alloc, Args &&...args) {
  985|      1|    next_generation();
  986|      1|    absl::container_internal::SanitizerUnpoisonObject(slot(i));
  987|      1|    params_type::construct(alloc, slot(i), std::forward<Args>(args)...);
  988|      1|  }
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE11upper_boundIS8_EENS1_14btree_iteratorIKNS1_10btree_nodeISD_EERKS8_PSK_EERKT_:
 1472|     64|  const_iterator upper_bound(const K &key) const {
 1473|     64|    return internal_end(internal_upper_bound(key));
 1474|     64|  }
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE12internal_endENS1_14btree_iteratorIKNS1_10btree_nodeISD_EERKS8_PSJ_EE:
 1730|     64|  const_iterator internal_end(const_iterator iter) const {
 1731|     64|    return iter.node_ != nullptr ? iter : end();
  ------------------
  |  Branch (1731:12): [True: 49, False: 15]
  ------------------
 1732|     64|  }
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE3endEv:
 1439|     15|  const_iterator end() const {
 1440|     15|    return const_iterator(rightmost(), rightmost()->finish());
 1441|     15|  }
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE9rightmostEv:
 1663|     30|  const node_type *rightmost() const { return rightmost_.template get<2>(); }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE6finishEv:
  701|  1.17k|  field_type finish() const { return GetField<2>()[2]; }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8GetFieldILm2EEEPKNSA_13tuple_elementIXT_ENSA_5tupleIJPSE_jhS8_SI_EEEE4typeEv:
  665|  2.05k|  inline const typename layout_type::template ElementType<N> *GetField() const {
  666|       |    assert(N < 4 || is_internal());
  667|  2.05k|    return InternalLayout().template Pointer<N>(
  668|  2.05k|        reinterpret_cast<const char *>(this));
  669|  2.05k|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE14InternalLayoutEv:
  640|  3.67k|  constexpr static layout_type InternalLayout() {
  641|  3.67k|    return Layout(kNodeSlots, kNodeSlots + 1);
  642|  3.67k|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE6LayoutEmm:
  627|  3.70k|                                      const size_type child_count) {
  628|  3.70k|    return layout_type(
  629|  3.70k|        /*parent*/ 1,
  630|  3.70k|        /*generation*/ BtreeGenerationsEnabled() ? 1 : 0,
  ------------------
  |  Branch (630:24): [Folded, False: 3.70k]
  ------------------
  631|  3.70k|        /*position, start, finish, max_count*/ 4,
  632|  3.70k|        /*slots*/ slot_count,
  633|  3.70k|        /*children*/ child_count);
  634|  3.70k|  }
_ZN4absl12lts_2024011618container_internal14btree_iteratorIKNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSH_EC2EPSG_i:
 1144|     79|      : btree_iterator_generation_info(n != nullptr ? n->generation()
  ------------------
  |  Branch (1144:40): [True: 79, False: 0]
  ------------------
 1145|     79|                                                    : ~uint32_t{}),
 1146|     79|        node_(n),
 1147|     79|        position_(p) {}
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10generationEv:
  738|    349|  uint32_t generation() const {
  739|    349|    return BtreeGenerationsEnabled() ? *get_root_generation() : 0;
  ------------------
  |  Branch (739:12): [Folded, False: 349]
  ------------------
  740|    349|  }
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE20internal_upper_boundIS8_EENS1_14btree_iteratorINS1_10btree_nodeISD_EERKS8_PSJ_EERKT_:
 2948|     64|auto btree<P>::internal_upper_bound(const K &key) const -> iterator {
 2949|     64|  iterator iter(const_cast<node_type *>(root()));
 2950|    110|  for (;;) {
 2951|    110|    iter.position_ = static_cast<int>(iter.node_->upper_bound(key, key_comp()));
 2952|    110|    if (iter.node_->is_leaf()) {
  ------------------
  |  Branch (2952:9): [True: 64, False: 46]
  ------------------
 2953|     64|      break;
 2954|     64|    }
 2955|     46|    iter.node_ = iter.node_->child(static_cast<field_type>(iter.position_));
 2956|     46|  }
 2957|     64|  return internal_last(iter);
 2958|     64|}
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE4rootEv:
 1660|    135|  const node_type *root() const { return root_; }
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_EC2EPSF_:
 1142|    134|  explicit btree_iterator(Node *n) : btree_iterator(n, n->start()) {}
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE5startEv:
  694|    786|  field_type start() const {
  695|       |    // TODO(ezb): when floating storage is implemented, return GetField<2>()[1];
  696|       |    assert(GetField<2>()[1] == 0);
  697|    786|    return 0;
  698|    786|  }
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_EC2EPSF_i:
 1144|    261|      : btree_iterator_generation_info(n != nullptr ? n->generation()
  ------------------
  |  Branch (1144:40): [True: 261, False: 0]
  ------------------
 1145|    261|                                                    : ~uint32_t{}),
 1146|    261|        node_(n),
 1147|    261|        position_(p) {}
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE11upper_boundIS8_EEmRKT_RKNS1_19key_compare_adapterIS9_S8_E15checked_compareE:
  787|    110|  size_type upper_bound(const K &k, const key_compare &comp) const {
  788|    110|    auto upper_compare = upper_bound_adapter<key_compare>(comp);
  789|    110|    return use_linear_search::value ? linear_search(k, upper_compare).value
  ------------------
  |  Branch (789:12): [Folded, False: 110]
  ------------------
  790|    110|                                    : binary_search(k, upper_compare).value;
  791|    110|  }
_ZN4absl12lts_2024011618container_internal19upper_bound_adapterINS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex13SymbolCompareENS7_11SymbolEntryEE15checked_compareEEC2ERKSB_:
  451|    110|  explicit upper_bound_adapter(const Compare &c) : comp(c) {}
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE13binary_searchIS8_NS1_19upper_bound_adapterINS1_19key_compare_adapterIS9_S8_E15checked_compareEEEEENS1_12SearchResultImXsr23btree_is_key_compare_toIT0_S8_EE5valueEEERKT_RKSM_:
  802|    110|  binary_search(const K &k, const Compare &comp) const {
  803|    110|    return binary_search_impl(k, start(), finish(), comp,
  804|    110|                              btree_is_key_compare_to<Compare, key_type>());
  805|    110|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE18binary_search_implIS8_NS1_19upper_bound_adapterINS1_19key_compare_adapterIS9_S8_E15checked_compareEEEEENS1_12SearchResultImLb0EEERKT_mmRKT0_NSA_17integral_constantIbLb0EEE:
  845|    110|      std::false_type /* IsCompareTo */) const {
  846|    339|    while (s != e) {
  ------------------
  |  Branch (846:12): [True: 229, False: 110]
  ------------------
  847|    229|      const size_type mid = (s + e) >> 1;
  848|    229|      if (comp(key(mid), k)) {
  ------------------
  |  Branch (848:11): [True: 131, False: 98]
  ------------------
  849|    131|        s = mid + 1;
  850|    131|      } else {
  851|     98|        e = mid;
  852|     98|      }
  853|    229|    }
  854|    110|    return SearchResult<size_type, false>{s};
  855|    110|  }
_ZNK4absl12lts_2024011618container_internal19upper_bound_adapterINS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex13SymbolCompareENS7_11SymbolEntryEE15checked_compareEEclIS9_S9_EEbRKT_RKT0_:
  453|    229|  bool operator()(const K1 &a, const K2 &b) const {
  454|       |    // Returns true when a is not greater than b.
  455|    229|    return !compare_internal::compare_result_as_less_than(comp(b, a));
  456|    229|  }
_ZNK4absl12lts_2024011618container_internal19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex13SymbolCompareENS6_11SymbolEntryEE15checked_compareclIS8_S8_TnNSt3__19enable_ifIXsr3std7is_sameIbNSC_9result_ofIFKS7_RKT_RKT0_EE4typeEEE5valueEiE4typeELi0EEEbSI_SL_:
  236|    351|    bool operator()(const T &lhs, const U &rhs) const {
  237|       |      // NOTE: if any of these assertions fail, then the comparator does not
  238|       |      // establish a strict-weak-ordering (see
  239|       |      // https://en.cppreference.com/w/cpp/named_req/Compare).
  240|    351|      assert(is_self_equivalent(lhs));
  241|    351|      assert(is_self_equivalent(rhs));
  242|    351|      const bool lhs_comp_rhs = comp()(lhs, rhs);
  243|       |      assert(!lhs_comp_rhs || !comp()(rhs, lhs));
  244|    351|      return lhs_comp_rhs;
  245|    351|    }
_ZNK4absl12lts_2024011618container_internal20checked_compare_baseIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex13SymbolCompareELb1EE4compEv:
  175|    351|  const Compare &comp() const { return *this; }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE3keyEm:
  752|    351|  const key_type &key(size_type i) const { return params_type::key(slot(i)); }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE4slotEm:
  675|    459|  const slot_type *slot(size_type i) const { return &GetField<3>()[i]; }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8GetFieldILm3EEEPKNSA_13tuple_elementIXT_ENSA_5tupleIJPSE_jhS8_SI_EEEE4typeEv:
  665|    459|  inline const typename layout_type::template ElementType<N> *GetField() const {
  666|       |    assert(N < 4 || is_internal());
  667|    459|    return InternalLayout().template Pointer<N>(
  668|    459|        reinterpret_cast<const char *>(this));
  669|    459|  }
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8key_compEv:
 1565|    297|  const key_compare &key_comp() const noexcept {
 1566|    297|    return rightmost_.template get<0>();
 1567|    297|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE7is_leafEv:
  685|    665|  bool is_leaf() const { return GetField<2>()[3] != kInternalNodeMaxCount; }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE5childEh:
  759|     94|  btree_node *child(field_type i) const { return GetField<4>()[i]; }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8GetFieldILm4EEEPKNSA_13tuple_elementIXT_ENSA_5tupleIJPSE_jhS8_SI_EEEE4typeEv:
  665|     94|  inline const typename layout_type::template ElementType<N> *GetField() const {
  666|       |    assert(N < 4 || is_internal());
  667|     94|    return InternalLayout().template Pointer<N>(
  668|     94|        reinterpret_cast<const char *>(this));
  669|     94|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE13internal_lastINS1_14btree_iteratorINS1_10btree_nodeISD_EERKS8_PSJ_EEEET_SN_:
 2802|     71|inline IterType btree<P>::internal_last(IterType iter) {
 2803|     71|  assert(iter.node_ != nullptr);
 2804|     82|  while (iter.position_ == iter.node_->finish()) {
  ------------------
  |  Branch (2804:10): [True: 29, False: 53]
  ------------------
 2805|     29|    iter.position_ = iter.node_->position();
 2806|     29|    iter.node_ = iter.node_->parent();
 2807|     29|    if (iter.node_->is_leaf()) {
  ------------------
  |  Branch (2807:9): [True: 18, False: 11]
  ------------------
 2808|     18|      iter.node_ = nullptr;
 2809|     18|      break;
 2810|     18|    }
 2811|     29|  }
 2812|     71|  iter.update_generation();
 2813|     71|  return iter;
 2814|     71|}
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8positionEv:
  691|    140|  field_type position() const { return GetField<2>()[0]; }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE6parentEv:
  718|    282|  btree_node *parent() const { return *GetField<0>(); }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8GetFieldILm0EEEPKNSA_13tuple_elementIXT_ENSA_5tupleIJPSE_jhS8_SI_EEEE4typeEv:
  665|    282|  inline const typename layout_type::template ElementType<N> *GetField() const {
  666|       |    assert(N < 4 || is_internal());
  667|    282|    return InternalLayout().template Pointer<N>(
  668|    282|        reinterpret_cast<const char *>(this));
  669|    282|  }
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_E17update_generationEv:
 1304|    135|  void update_generation() {
 1305|    135|    btree_iterator_generation_info::update_generation(node_);
 1306|    135|  }
_ZN4absl12lts_2024011618container_internal14btree_iteratorIKNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSH_EC2ISF_SI_SJ_TnNSB_9enable_ifIXaasr3std7is_sameINS2_IT_T0_T1_EENS2_ISF_SI_SJ_EEEE5valueL_ZNSB_17integral_constantIbLb1EE5valueEEEiE4typeELi0EEESQ_:
 1158|    403|      : btree_iterator_generation_info(other),
 1159|    403|        node_(other.node_),
 1160|    403|        position_(other.position_) {}
_ZNK4absl12lts_2024011618container_internal14btree_iteratorIKNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSH_EneERKSK_:
 1171|     64|  bool operator!=(const const_iterator &other) const {
 1172|     64|    return !Equals(other);
 1173|     64|  }
_ZNK4absl12lts_2024011618container_internal14btree_iteratorIKNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSH_E6EqualsESK_:
 1248|    189|  bool Equals(const const_iterator other) const {
 1249|    189|    ABSL_HARDENING_ASSERT(((node_ == nullptr && other.node_ == nullptr) ||
  ------------------
  |  |  128|    189|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|    189|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 189]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1250|    189|                           (node_ != nullptr && other.node_ != nullptr)) &&
 1251|    189|                          "Comparing default-constructed iterator with "
 1252|    189|                          "non-default-constructed iterator.");
 1253|       |    // Note: we use assert instead of ABSL_HARDENING_ASSERT here because this
 1254|       |    // changes the complexity of Equals from O(1) to O(log(N) + log(M)) where
 1255|       |    // N/M are sizes of the containers containing node_/other.node_.
 1256|    189|    assert(AreNodesFromSameContainer(node_, other.node_) &&
 1257|    189|           "Comparing iterators from different containers.");
 1258|    189|    assert_valid_generation(node_);
 1259|    189|    other.assert_valid_generation(other.node_);
 1260|    189|    return node_ == other.node_ && position_ == other.position_;
  ------------------
  |  Branch (1260:12): [True: 109, False: 80]
  |  Branch (1260:36): [True: 24, False: 85]
  ------------------
 1261|    189|  }
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE5beginEv:
 1437|     64|  const_iterator begin() const { return const_iterator(leftmost()); }
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8leftmostEv:
 1673|     64|  const node_type *leftmost() const { return root()->parent(); }
_ZN4absl12lts_2024011618container_internal14btree_iteratorIKNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSH_EC2EPSG_:
 1142|     64|  explicit btree_iterator(Node *n) : btree_iterator(n, n->start()) {}
_ZN4absl12lts_2024011618container_internal14btree_iteratorIKNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSH_EmmEv:
 1202|     57|  btree_iterator &operator--() {
 1203|     57|    decrement();
 1204|     57|    return *this;
 1205|     57|  }
_ZN4absl12lts_2024011618container_internal14btree_iteratorIKNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSH_E9decrementEv:
 1288|     57|  void decrement() {
 1289|     57|    assert_valid_generation(node_);
 1290|     57|    if (node_->is_leaf() && --position_ >= node_->start()) {
  ------------------
  |  Branch (1290:9): [True: 55, False: 2]
  |  Branch (1290:29): [True: 50, False: 5]
  ------------------
 1291|     50|      return;
 1292|     50|    }
 1293|      7|    decrement_slow();
 1294|      7|  }
_ZN4absl12lts_2024011618container_internal14btree_iteratorIKNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSH_E14decrement_slowEv:
 2159|      7|void btree_iterator<N, R, P>::decrement_slow() {
 2160|      7|  if (node_->is_leaf()) {
  ------------------
  |  Branch (2160:7): [True: 5, False: 2]
  ------------------
 2161|      5|    assert(position_ <= -1);
 2162|      5|    btree_iterator save(*this);
 2163|     10|    while (position_ < node_->start() && !node_->is_root()) {
  ------------------
  |  Branch (2163:12): [True: 5, False: 5]
  |  Branch (2163:42): [True: 5, False: 0]
  ------------------
 2164|      5|      assert(node_->parent()->child(node_->position()) == node_);
 2165|      5|      position_ = node_->position() - 1;
 2166|      5|      node_ = node_->parent();
 2167|      5|    }
 2168|       |    // TODO(ezb): assert we aren't decrementing begin() instead of handling.
 2169|      5|    if (position_ < node_->start()) {
  ------------------
  |  Branch (2169:9): [True: 0, False: 5]
  ------------------
 2170|      0|      *this = save;
 2171|      0|    }
 2172|      5|  } else {
 2173|      2|    assert(position_ >= node_->start());
 2174|      2|    node_ = node_->child(static_cast<field_type>(position_));
 2175|      2|    while (node_->is_internal()) {
  ------------------
  |  Branch (2175:12): [True: 0, False: 2]
  ------------------
 2176|      0|      node_ = node_->child(node_->finish());
 2177|      0|    }
 2178|      2|    position_ = node_->finish() - 1;
 2179|      2|  }
 2180|      7|}
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE7is_rootEv:
  722|     44|  bool is_root() const { return parent()->is_leaf(); }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE11is_internalEv:
  688|    179|  bool is_internal() const { return !is_leaf(); }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE3endEv:
 1438|    127|  iterator end() { return iterator(rightmost(), rightmost()->finish()); }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE9rightmostEv:
 1662|    262|  node_type *rightmost() { return rightmost_.template get<2>(); }
_ZNK4absl12lts_2024011618container_internal14btree_iteratorIKNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSH_EneERKNS2_ISF_SI_SJ_EE:
 1168|    125|  bool operator!=(const iterator &other) const {
 1169|    125|    return !Equals(other);
 1170|    125|  }
_ZNK4absl12lts_2024011618container_internal14btree_iteratorIKNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSH_EptEv:
 1196|    108|  pointer operator->() const { return &operator*(); }
_ZNK4absl12lts_2024011618container_internal14btree_iteratorIKNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSH_EdeEv:
 1186|    108|  reference operator*() const {
 1187|    108|    ABSL_HARDENING_ASSERT(node_ != nullptr);
  ------------------
  |  |  128|    108|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|    108|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 108]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|    108|    assert_valid_generation(node_);
 1189|    108|    ABSL_HARDENING_ASSERT(position_ >= node_->start());
  ------------------
  |  |  128|    108|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|    108|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 108]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1190|    108|    if (position_ >= node_->finish()) {
  ------------------
  |  Branch (1190:9): [True: 0, False: 108]
  ------------------
 1191|      0|      ABSL_HARDENING_ASSERT(!IsEndIterator() && "Dereferencing end() iterator");
  ------------------
  |  |  128|      0|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      0|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1192|      0|      ABSL_HARDENING_ASSERT(position_ < node_->finish());
  ------------------
  |  |  128|      0|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      0|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1193|      0|    }
 1194|    108|    return node_->value(static_cast<field_type>(position_));
 1195|    108|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE5valueEm:
  754|    108|  const_reference value(size_type i) const {
  755|    108|    return params_type::element(slot(i));
  756|    108|  }
_ZN4absl12lts_2024011618container_internal14btree_iteratorIKNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSH_EppEv:
 1198|     61|  btree_iterator &operator++() {
 1199|     61|    increment();
 1200|     61|    return *this;
 1201|     61|  }
_ZN4absl12lts_2024011618container_internal14btree_iteratorIKNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSH_E9incrementEv:
 1279|     61|  void increment() {
 1280|     61|    assert_valid_generation(node_);
 1281|     61|    if (node_->is_leaf() && ++position_ < node_->finish()) {
  ------------------
  |  Branch (1281:9): [True: 56, False: 5]
  |  Branch (1281:29): [True: 40, False: 16]
  ------------------
 1282|     40|      return;
 1283|     40|    }
 1284|     21|    increment_slow();
 1285|     21|  }
_ZN4absl12lts_2024011618container_internal14btree_iteratorIKNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSH_E14increment_slowEv:
 2135|     21|void btree_iterator<N, R, P>::increment_slow() {
 2136|     21|  if (node_->is_leaf()) {
  ------------------
  |  Branch (2136:7): [True: 16, False: 5]
  ------------------
 2137|     16|    assert(position_ >= node_->finish());
 2138|     16|    btree_iterator save(*this);
 2139|     27|    while (position_ == node_->finish() && !node_->is_root()) {
  ------------------
  |  Branch (2139:12): [True: 25, False: 2]
  |  Branch (2139:44): [True: 11, False: 14]
  ------------------
 2140|     11|      assert(node_->parent()->child(node_->position()) == node_);
 2141|     11|      position_ = node_->position();
 2142|     11|      node_ = node_->parent();
 2143|     11|    }
 2144|       |    // TODO(ezb): assert we aren't incrementing end() instead of handling.
 2145|     16|    if (position_ == node_->finish()) {
  ------------------
  |  Branch (2145:9): [True: 14, False: 2]
  ------------------
 2146|     14|      *this = save;
 2147|     14|    }
 2148|     16|  } else {
 2149|      5|    assert(position_ < node_->finish());
 2150|      5|    node_ = node_->child(static_cast<field_type>(position_ + 1));
 2151|      5|    while (node_->is_internal()) {
  ------------------
  |  Branch (2151:12): [True: 0, False: 5]
  ------------------
 2152|      0|      node_ = node_->start_child();
 2153|      0|    }
 2154|      5|    position_ = node_->start();
 2155|      5|  }
 2156|     21|}
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE11start_childEv:
  760|      1|  btree_node *start_child() const { return child(start()); }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE18insert_hint_uniqueIS8_JRKS8_EEENSA_4pairINS1_14btree_iteratorINS1_10btree_nodeISD_EESH_PSG_EEbEESN_RKT_DpOT0_:
 2305|     64|    -> std::pair<iterator, bool> {
 2306|     64|  if (!empty()) {
  ------------------
  |  Branch (2306:7): [True: 61, False: 3]
  ------------------
 2307|     61|    if (position == end() || compare_keys(key, position.key())) {
  ------------------
  |  Branch (2307:9): [True: 14, False: 47]
  |  Branch (2307:9): [True: 61, False: 0]
  |  Branch (2307:30): [True: 47, False: 0]
  ------------------
 2308|     61|      if (position == begin() || compare_keys(std::prev(position).key(), key)) {
  ------------------
  |  Branch (2308:11): [True: 0, False: 61]
  |  Branch (2308:11): [True: 57, False: 4]
  |  Branch (2308:34): [True: 57, False: 4]
  ------------------
 2309|       |        // prev.key() < key < position.key()
 2310|     57|        return {internal_emplace(position, std::forward<Args>(args)...), true};
 2311|     57|      }
 2312|     61|    } else if (compare_keys(position.key(), key)) {
  ------------------
  |  Branch (2312:16): [True: 0, False: 0]
  ------------------
 2313|      0|      ++position;
 2314|      0|      if (position == end() || compare_keys(key, position.key())) {
  ------------------
  |  Branch (2314:11): [True: 0, False: 0]
  |  Branch (2314:11): [True: 0, False: 0]
  |  Branch (2314:32): [True: 0, False: 0]
  ------------------
 2315|       |        // {original `position`}.key() < key < {current `position`}.key()
 2316|      0|        return {internal_emplace(position, std::forward<Args>(args)...), true};
 2317|      0|      }
 2318|      0|    } else {
 2319|       |      // position.key() == key
 2320|      0|      return {position, false};
 2321|      0|    }
 2322|     61|  }
 2323|      7|  return insert_unique(key, std::forward<Args>(args)...);
 2324|     64|}
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE5emptyEv:
 1583|     77|  bool empty() const { return size_ == 0; }
_ZNK4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_EeqERKSJ_:
 1162|    122|  bool operator==(const iterator &other) const {
 1163|    122|    return Equals(other);
 1164|    122|  }
_ZNK4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_E6EqualsENS2_IKSF_SH_SI_EE:
 1248|    214|  bool Equals(const const_iterator other) const {
 1249|    214|    ABSL_HARDENING_ASSERT(((node_ == nullptr && other.node_ == nullptr) ||
  ------------------
  |  |  128|    214|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|    214|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 214]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1250|    214|                           (node_ != nullptr && other.node_ != nullptr)) &&
 1251|    214|                          "Comparing default-constructed iterator with "
 1252|    214|                          "non-default-constructed iterator.");
 1253|       |    // Note: we use assert instead of ABSL_HARDENING_ASSERT here because this
 1254|       |    // changes the complexity of Equals from O(1) to O(log(N) + log(M)) where
 1255|       |    // N/M are sizes of the containers containing node_/other.node_.
 1256|    214|    assert(AreNodesFromSameContainer(node_, other.node_) &&
 1257|    214|           "Comparing iterators from different containers.");
 1258|    214|    assert_valid_generation(node_);
 1259|    214|    other.assert_valid_generation(other.node_);
 1260|    214|    return node_ == other.node_ && position_ == other.position_;
  ------------------
  |  Branch (1260:12): [True: 115, False: 99]
  |  Branch (1260:36): [True: 16, False: 99]
  ------------------
 1261|    214|  }
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE12compare_keysIS8_S8_EEbRKT_RKT0_:
 1569|    112|  bool compare_keys(const K1 &a, const K2 &b) const {
 1570|    112|    return compare_internal::compare_result_as_less_than(key_comp()(a, b));
 1571|    112|  }
_ZNK4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_E3keyEv:
 1297|    112|  const key_type &key() const {
 1298|    112|    return node_->key(static_cast<size_type>(position_));
 1299|    112|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE5beginEv:
 1436|     63|  iterator begin() { return iterator(leftmost()); }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8leftmostEv:
 1672|     63|  node_type *leftmost() { return root()->parent(); }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE4rootEv:
 1659|     84|  node_type *root() { return root_; }
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_EmmEv:
 1202|     63|  btree_iterator &operator--() {
 1203|     63|    decrement();
 1204|     63|    return *this;
 1205|     63|  }
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_E9decrementEv:
 1288|     63|  void decrement() {
 1289|     63|    assert_valid_generation(node_);
 1290|     63|    if (node_->is_leaf() && --position_ >= node_->start()) {
  ------------------
  |  Branch (1290:9): [True: 59, False: 4]
  |  Branch (1290:29): [True: 54, False: 5]
  ------------------
 1291|     54|      return;
 1292|     54|    }
 1293|      9|    decrement_slow();
 1294|      9|  }
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_E14decrement_slowEv:
 2159|      9|void btree_iterator<N, R, P>::decrement_slow() {
 2160|      9|  if (node_->is_leaf()) {
  ------------------
  |  Branch (2160:7): [True: 5, False: 4]
  ------------------
 2161|      5|    assert(position_ <= -1);
 2162|      5|    btree_iterator save(*this);
 2163|     10|    while (position_ < node_->start() && !node_->is_root()) {
  ------------------
  |  Branch (2163:12): [True: 5, False: 5]
  |  Branch (2163:42): [True: 5, False: 0]
  ------------------
 2164|      5|      assert(node_->parent()->child(node_->position()) == node_);
 2165|      5|      position_ = node_->position() - 1;
 2166|      5|      node_ = node_->parent();
 2167|      5|    }
 2168|       |    // TODO(ezb): assert we aren't decrementing begin() instead of handling.
 2169|      5|    if (position_ < node_->start()) {
  ------------------
  |  Branch (2169:9): [True: 0, False: 5]
  ------------------
 2170|      0|      *this = save;
 2171|      0|    }
 2172|      5|  } else {
 2173|      4|    assert(position_ >= node_->start());
 2174|      4|    node_ = node_->child(static_cast<field_type>(position_));
 2175|      4|    while (node_->is_internal()) {
  ------------------
  |  Branch (2175:12): [True: 0, False: 4]
  ------------------
 2176|      0|      node_ = node_->child(node_->finish());
 2177|      0|    }
 2178|      4|    position_ = node_->finish() - 1;
 2179|      4|  }
 2180|      9|}
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE16internal_emplaceIJRKS8_EEENS1_14btree_iteratorINS1_10btree_nodeISD_EESH_PSG_EESM_DpOT_:
 2819|     64|    -> iterator {
 2820|     64|  if (iter.node_->is_internal()) {
  ------------------
  |  Branch (2820:7): [True: 2, False: 62]
  ------------------
 2821|       |    // We can't insert on an internal node. Instead, we'll insert after the
 2822|       |    // previous value which is guaranteed to be on a leaf node.
 2823|      2|    --iter;
 2824|      2|    ++iter.position_;
 2825|      2|  }
 2826|     64|  const field_type max_count = iter.node_->max_count();
 2827|     64|  allocator_type *alloc = mutable_allocator();
 2828|       |
 2829|     64|  const auto transfer_and_delete = [&](node_type *old_node,
 2830|     64|                                       node_type *new_node) {
 2831|     64|    new_node->transfer_n(old_node->count(), new_node->start(),
 2832|     64|                         old_node->start(), old_node, alloc);
 2833|     64|    new_node->set_finish(old_node->finish());
 2834|     64|    old_node->set_finish(old_node->start());
 2835|     64|    new_node->set_generation(old_node->generation());
 2836|     64|    node_type::clear_and_delete(old_node, alloc);
 2837|     64|  };
 2838|     64|  const auto replace_leaf_root_node = [&](field_type new_node_size) {
 2839|     64|    assert(iter.node_ == root());
 2840|     64|    node_type *old_root = iter.node_;
 2841|     64|    node_type *new_root = iter.node_ = new_leaf_root_node(new_node_size);
 2842|     64|    transfer_and_delete(old_root, new_root);
 2843|     64|    mutable_root() = mutable_rightmost() = new_root;
 2844|     64|  };
 2845|       |
 2846|     64|  bool replaced_node = false;
 2847|     64|  if (iter.node_->count() == max_count) {
  ------------------
  |  Branch (2847:7): [True: 24, False: 40]
  ------------------
 2848|       |    // Make room in the leaf for the new item.
 2849|     24|    if (max_count < kNodeSlots) {
  ------------------
  |  Branch (2849:9): [True: 7, False: 17]
  ------------------
 2850|       |      // Insertion into the root where the root is smaller than the full node
 2851|       |      // size. Simply grow the size of the root node.
 2852|      7|      replace_leaf_root_node(static_cast<field_type>(
 2853|      7|          (std::min)(static_cast<int>(kNodeSlots), 2 * max_count)));
 2854|      7|      replaced_node = true;
 2855|     17|    } else {
 2856|     17|      rebalance_or_split(&iter);
 2857|     17|    }
 2858|     24|  }
 2859|     64|  (void)replaced_node;
 2860|       |#if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \
 2861|       |    defined(ABSL_HAVE_HWADDRESS_SANITIZER)
 2862|       |  if (!replaced_node) {
 2863|       |    assert(iter.node_->is_leaf());
 2864|       |    if (iter.node_->is_root()) {
 2865|       |      replace_leaf_root_node(max_count);
 2866|       |    } else {
 2867|       |      node_type *old_node = iter.node_;
 2868|       |      const bool was_rightmost = rightmost() == old_node;
 2869|       |      const bool was_leftmost = leftmost() == old_node;
 2870|       |      node_type *parent = old_node->parent();
 2871|       |      const field_type position = old_node->position();
 2872|       |      node_type *new_node = iter.node_ = new_leaf_node(position, parent);
 2873|       |      parent->set_child_noupdate_position(position, new_node);
 2874|       |      transfer_and_delete(old_node, new_node);
 2875|       |      if (was_rightmost) mutable_rightmost() = new_node;
 2876|       |      // The leftmost node is stored as the parent of the root node.
 2877|       |      if (was_leftmost) root()->set_parent(new_node);
 2878|       |    }
 2879|       |  }
 2880|       |#endif
 2881|     64|  iter.node_->emplace_value(static_cast<field_type>(iter.position_), alloc,
 2882|     64|                            std::forward<Args>(args)...);
 2883|       |  assert(
 2884|     64|      iter.node_->is_ordered_correctly(static_cast<field_type>(iter.position_),
 2885|     64|                                       original_key_compare(key_comp())) &&
 2886|     64|      "If this assert fails, then either (1) the comparator may violate "
 2887|     64|      "transitivity, i.e. comp(a,b) && comp(b,c) -> comp(a,c) (see "
 2888|     64|      "https://en.cppreference.com/w/cpp/named_req/Compare), or (2) a "
 2889|     64|      "key may have been mutated after it was inserted into the tree.");
 2890|     64|  ++size_;
 2891|     64|  iter.update_generation();
 2892|     64|  return iter;
 2893|     64|}
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE9max_countEv:
  708|     79|  field_type max_count() const {
  709|       |    // Internal nodes have max_count==kInternalNodeMaxCount.
  710|       |    // Leaf nodes have max_count in [1, kNodeSlots].
  711|     79|    const field_type max_count = GetField<2>()[3];
  712|     79|    return max_count == field_type{kInternalNodeMaxCount}
  ------------------
  |  Branch (712:12): [True: 0, False: 79]
  ------------------
  713|     79|               ? field_type{kNodeSlots}
  714|     79|               : max_count;
  715|     79|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE17mutable_allocatorEv:
 1676|    103|  allocator_type *mutable_allocator() noexcept {
 1677|    103|    return &rightmost_.template get<1>();
 1678|    103|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE5countEv:
  704|    160|  field_type count() const {
  705|       |    assert(finish() >= start());
  706|    160|    return finish() - start();
  707|    160|  }
_ZZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE16internal_emplaceIJRKS8_EEENS1_14btree_iteratorINS1_10btree_nodeISD_EESH_PSG_EESM_DpOT_ENKUlhE_clEh:
 2838|      7|  const auto replace_leaf_root_node = [&](field_type new_node_size) {
 2839|       |    assert(iter.node_ == root());
 2840|      7|    node_type *old_root = iter.node_;
 2841|      7|    node_type *new_root = iter.node_ = new_leaf_root_node(new_node_size);
 2842|      7|    transfer_and_delete(old_root, new_root);
 2843|      7|    mutable_root() = mutable_rightmost() = new_root;
 2844|      7|  };
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE18new_leaf_root_nodeEh:
 1702|     10|  node_type *new_leaf_root_node(field_type max_count) {
 1703|     10|    node_type *n = allocate(node_type::LeafSize(max_count));
 1704|     10|    n->init_leaf(/*position=*/0, max_count, /*parent=*/n);
 1705|     10|    return n;
 1706|     10|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8allocateEm:
 1685|     20|  node_type *allocate(size_type size) {
 1686|     20|    return reinterpret_cast<node_type *>(
 1687|     20|        absl::container_internal::Allocate<node_type::Alignment()>(
 1688|     20|            mutable_allocator(), size));
 1689|     20|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8LeafSizeEm:
  643|     33|  constexpr static size_type LeafSize(const size_type slot_count = kNodeSlots) {
  644|     33|    return LeafLayout(slot_count).AllocSize();
  645|     33|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10LeafLayoutEm:
  637|     33|      const size_type slot_count = kNodeSlots) {
  638|     33|    return Layout(slot_count, 0);
  639|     33|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE9init_leafEhhPSE_:
  954|     20|                 btree_node *parent) {
  955|     20|    set_generation(0);
  956|     20|    set_parent(parent);
  957|     20|    set_position(position);
  958|     20|    set_start(0);
  959|     20|    set_finish(0);
  960|     20|    set_max_count(max_count);
  961|     20|    absl::container_internal::SanitizerPoisonMemoryRegion(
  962|     20|        start_slot(), max_count * sizeof(slot_type));
  963|     20|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE14set_generationEj:
  743|     29|  void set_generation(uint32_t generation) {
  744|     29|    if (BtreeGenerationsEnabled()) GetField<1>()[0] = generation;
  ------------------
  |  Branch (744:9): [Folded, False: 29]
  ------------------
  745|     29|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10set_parentEPSE_:
  670|     22|  void set_parent(btree_node *p) { *GetField<0>() = p; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8GetFieldILm0EEEPNSA_13tuple_elementIXT_ENSA_5tupleIJPSE_jhS8_SI_EEEE4typeEv:
  659|     22|  inline typename layout_type::template ElementType<N> *GetField() {
  660|       |    // We assert that we don't read from values that aren't there.
  661|       |    assert(N < 4 || is_internal());
  662|     22|    return InternalLayout().template Pointer<N>(reinterpret_cast<char *>(this));
  663|     22|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE12set_positionEh:
  676|     26|  void set_position(field_type v) { GetField<2>()[0] = v; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8GetFieldILm2EEEPNSA_13tuple_elementIXT_ENSA_5tupleIJPSE_jhS8_SI_EEEE4typeEv:
  659|    216|  inline typename layout_type::template ElementType<N> *GetField() {
  660|       |    // We assert that we don't read from values that aren't there.
  661|       |    assert(N < 4 || is_internal());
  662|    216|    return InternalLayout().template Pointer<N>(reinterpret_cast<char *>(this));
  663|    216|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE9set_startEh:
  677|     20|  void set_start(field_type v) { GetField<2>()[1] = v; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10set_finishEh:
  678|    140|  void set_finish(field_type v) { GetField<2>()[2] = v; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE13set_max_countEh:
  680|     22|  void set_max_count(field_type v) { GetField<2>()[3] = v; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10start_slotEv:
  673|     20|  slot_type *start_slot() { return slot(start()); }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE4slotEm:
  672|    510|  slot_type *slot(size_type i) { return &GetField<3>()[i]; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8GetFieldILm3EEEPNSA_13tuple_elementIXT_ENSA_5tupleIJPSE_jhS8_SI_EEEE4typeEv:
  659|    510|  inline typename layout_type::template ElementType<N> *GetField() {
  660|       |    // We assert that we don't read from values that aren't there.
  661|       |    assert(N < 4 || is_internal());
  662|    510|    return InternalLayout().template Pointer<N>(reinterpret_cast<char *>(this));
  663|    510|  }
_ZZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE16internal_emplaceIJRKS8_EEENS1_14btree_iteratorINS1_10btree_nodeISD_EESH_PSG_EESM_DpOT_ENKUlPSK_SQ_E_clESQ_SQ_:
 2830|      7|                                       node_type *new_node) {
 2831|      7|    new_node->transfer_n(old_node->count(), new_node->start(),
 2832|      7|                         old_node->start(), old_node, alloc);
 2833|      7|    new_node->set_finish(old_node->finish());
 2834|      7|    old_node->set_finish(old_node->start());
 2835|      7|    new_node->set_generation(old_node->generation());
 2836|      7|    node_type::clear_and_delete(old_node, alloc);
 2837|      7|  };
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10transfer_nEmmmPSE_PSC_:
 1020|     32|                  allocator_type *alloc) {
 1021|     32|    next_generation();
 1022|     32|    for (slot_type *src = src_node->slot(src_i), *end = src + n,
 1023|     32|                   *dest = slot(dest_i);
 1024|    112|         src != end; ++src, ++dest) {
  ------------------
  |  Branch (1024:10): [True: 80, False: 32]
  ------------------
 1025|     80|      transfer(dest, src, alloc);
 1026|     80|    }
 1027|     32|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE15next_generationEv:
  747|    197|  void next_generation() {
  748|    197|    if (BtreeGenerationsEnabled()) ++*get_root_generation();
  ------------------
  |  Branch (748:9): [Folded, False: 197]
  ------------------
  749|    197|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8transferEPS8_SF_PSC_:
 1003|    235|  static void transfer(slot_type *dest, slot_type *src, allocator_type *alloc) {
 1004|    235|    absl::container_internal::SanitizerUnpoisonObject(dest);
 1005|    235|    params_type::transfer(alloc, dest, src);
 1006|    235|    absl::container_internal::SanitizerPoisonObject(src);
 1007|    235|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE16clear_and_deleteEPSE_PSC_:
 2008|      9|void btree_node<P>::clear_and_delete(btree_node *node, allocator_type *alloc) {
 2009|      9|  if (node->is_leaf()) {
  ------------------
  |  Branch (2009:7): [True: 8, False: 1]
  ------------------
 2010|      8|    node->value_destroy_n(node->start(), node->count(), alloc);
 2011|      8|    deallocate(LeafSize(node->max_count()), node, alloc);
 2012|      8|    return;
 2013|      8|  }
 2014|      1|  if (node->count() == 0) {
  ------------------
  |  Branch (2014:7): [True: 0, False: 1]
  ------------------
 2015|      0|    deallocate(InternalSize(), node, alloc);
 2016|      0|    return;
 2017|      0|  }
 2018|       |
 2019|       |  // The parent of the root of the subtree we are deleting.
 2020|      1|  btree_node *delete_root_parent = node->parent();
 2021|       |
 2022|       |  // Navigate to the leftmost leaf under node, and then delete upwards.
 2023|      2|  while (node->is_internal()) node = node->start_child();
  ------------------
  |  Branch (2023:10): [True: 1, False: 1]
  ------------------
 2024|       |#ifdef ABSL_BTREE_ENABLE_GENERATIONS
 2025|       |  // When generations are enabled, we delete the leftmost leaf last in case it's
 2026|       |  // the parent of the root and we need to check whether it's a leaf before we
 2027|       |  // can update the root's generation.
 2028|       |  // TODO(ezb): if we change btree_node::is_root to check a bool inside the node
 2029|       |  // instead of checking whether the parent is a leaf, we can remove this logic.
 2030|       |  btree_node *leftmost_leaf = node;
 2031|       |#endif
 2032|       |  // Use `size_type` because `pos` needs to be able to hold `kNodeSlots+1`,
 2033|       |  // which isn't guaranteed to be a valid `field_type`.
 2034|      1|  size_type pos = node->position();
 2035|      1|  btree_node *parent = node->parent();
 2036|      1|  for (;;) {
 2037|       |    // In each iteration of the next loop, we delete one leaf node and go right.
 2038|      1|    assert(pos <= parent->finish());
 2039|      7|    do {
 2040|      7|      node = parent->child(static_cast<field_type>(pos));
 2041|      7|      if (node->is_internal()) {
  ------------------
  |  Branch (2041:11): [True: 0, False: 7]
  ------------------
 2042|       |        // Navigate to the leftmost leaf under node.
 2043|      0|        while (node->is_internal()) node = node->start_child();
  ------------------
  |  Branch (2043:16): [True: 0, False: 0]
  ------------------
 2044|      0|        pos = node->position();
 2045|      0|        parent = node->parent();
 2046|      0|      }
 2047|      7|      node->value_destroy_n(node->start(), node->count(), alloc);
 2048|       |#ifdef ABSL_BTREE_ENABLE_GENERATIONS
 2049|       |      if (leftmost_leaf != node)
 2050|       |#endif
 2051|      7|        deallocate(LeafSize(node->max_count()), node, alloc);
 2052|      7|      ++pos;
 2053|      7|    } while (pos <= parent->finish());
  ------------------
  |  Branch (2053:14): [True: 6, False: 1]
  ------------------
 2054|       |
 2055|       |    // Once we've deleted all children of parent, delete parent and go up/right.
 2056|      1|    assert(pos > parent->finish());
 2057|      1|    do {
 2058|      1|      node = parent;
 2059|      1|      pos = node->position();
 2060|      1|      parent = node->parent();
 2061|      1|      node->value_destroy_n(node->start(), node->count(), alloc);
 2062|      1|      deallocate(InternalSize(), node, alloc);
 2063|      1|      if (parent == delete_root_parent) {
  ------------------
  |  Branch (2063:11): [True: 1, False: 0]
  ------------------
 2064|       |#ifdef ABSL_BTREE_ENABLE_GENERATIONS
 2065|       |        deallocate(LeafSize(leftmost_leaf->max_count()), leftmost_leaf, alloc);
 2066|       |#endif
 2067|      1|        return;
 2068|      1|      }
 2069|      0|      ++pos;
 2070|      0|    } while (pos > parent->finish());
  ------------------
  |  Branch (2070:14): [True: 0, False: 0]
  ------------------
 2071|      1|  }
 2072|      1|}
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE15value_destroy_nEhhPSC_:
  995|     16|                       allocator_type *alloc) {
  996|     16|    next_generation();
  997|     61|    for (slot_type *s = slot(i), *end = slot(i + n); s != end; ++s) {
  ------------------
  |  Branch (997:54): [True: 45, False: 16]
  ------------------
  998|     45|      params_type::destroy(alloc, s);
  999|     45|      absl::container_internal::SanitizerPoisonObject(s);
 1000|     45|    }
 1001|     16|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10deallocateEmPSE_PSC_:
  974|     16|                         allocator_type *alloc) {
  975|     16|    absl::container_internal::SanitizerUnpoisonMemoryRegion(node, size);
  976|     16|    absl::container_internal::Deallocate<Alignment()>(alloc, node, size);
  977|     16|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE12InternalSizeEv:
  646|      3|  constexpr static size_type InternalSize() {
  647|      3|    return InternalLayout().AllocSize();
  648|      3|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE17mutable_rightmostEv:
 1664|     17|  node_type *&mutable_rightmost() noexcept {
 1665|     17|    return rightmost_.template get<2>();
 1666|     17|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE12mutable_rootEv:
 1661|     14|  node_type *&mutable_root() noexcept { return root_; }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE18rebalance_or_splitEPNS1_14btree_iteratorINS1_10btree_nodeISD_EERKS8_PSI_EE:
 2615|     17|void btree<P>::rebalance_or_split(iterator *iter) {
 2616|     17|  node_type *&node = iter->node_;
 2617|     17|  int &insert_position = iter->position_;
 2618|     17|  assert(node->count() == node->max_count());
 2619|     17|  assert(kNodeSlots == node->max_count());
 2620|       |
 2621|       |  // First try to make room on the node by rebalancing.
 2622|     17|  node_type *parent = node->parent();
 2623|     17|  if (node != root()) {
  ------------------
  |  Branch (2623:7): [True: 15, False: 2]
  ------------------
 2624|     15|    if (node->position() > parent->start()) {
  ------------------
  |  Branch (2624:9): [True: 13, False: 2]
  ------------------
 2625|       |      // Try rebalancing with our left sibling.
 2626|     13|      node_type *left = parent->child(node->position() - 1);
 2627|     13|      assert(left->max_count() == kNodeSlots);
 2628|     13|      if (left->count() < kNodeSlots) {
  ------------------
  |  Branch (2628:11): [True: 8, False: 5]
  ------------------
 2629|       |        // We bias rebalancing based on the position being inserted. If we're
 2630|       |        // inserting at the end of the right node then we bias rebalancing to
 2631|       |        // fill up the left node.
 2632|      8|        field_type to_move =
 2633|      8|            (kNodeSlots - left->count()) /
 2634|      8|            (1 + (static_cast<field_type>(insert_position) < kNodeSlots));
 2635|      8|        to_move = (std::max)(field_type{1}, to_move);
 2636|       |
 2637|      8|        if (static_cast<field_type>(insert_position) - to_move >=
  ------------------
  |  Branch (2637:13): [True: 8, False: 0]
  ------------------
 2638|      8|                node->start() ||
 2639|      8|            left->count() + to_move < kNodeSlots) {
  ------------------
  |  Branch (2639:13): [True: 0, False: 0]
  ------------------
 2640|      8|          left->rebalance_right_to_left(to_move, node, mutable_allocator());
 2641|       |
 2642|      8|          assert(node->max_count() - node->count() == to_move);
 2643|      8|          insert_position = static_cast<int>(
 2644|      8|              static_cast<field_type>(insert_position) - to_move);
 2645|      8|          if (insert_position < node->start()) {
  ------------------
  |  Branch (2645:15): [True: 0, False: 8]
  ------------------
 2646|      0|            insert_position = insert_position + left->count() + 1;
 2647|      0|            node = left;
 2648|      0|          }
 2649|       |
 2650|      8|          assert(node->count() < node->max_count());
 2651|      8|          return;
 2652|      8|        }
 2653|      8|      }
 2654|     13|    }
 2655|       |
 2656|      7|    if (node->position() < parent->finish()) {
  ------------------
  |  Branch (2656:9): [True: 4, False: 3]
  ------------------
 2657|       |      // Try rebalancing with our right sibling.
 2658|      4|      node_type *right = parent->child(node->position() + 1);
 2659|      4|      assert(right->max_count() == kNodeSlots);
 2660|      4|      if (right->count() < kNodeSlots) {
  ------------------
  |  Branch (2660:11): [True: 1, False: 3]
  ------------------
 2661|       |        // We bias rebalancing based on the position being inserted. If we're
 2662|       |        // inserting at the beginning of the left node then we bias rebalancing
 2663|       |        // to fill up the right node.
 2664|      1|        field_type to_move = (kNodeSlots - right->count()) /
 2665|      1|                             (1 + (insert_position > node->start()));
 2666|      1|        to_move = (std::max)(field_type{1}, to_move);
 2667|       |
 2668|      1|        if (static_cast<field_type>(insert_position) <=
  ------------------
  |  Branch (2668:13): [True: 0, False: 1]
  ------------------
 2669|      1|                node->finish() - to_move ||
 2670|      1|            right->count() + to_move < kNodeSlots) {
  ------------------
  |  Branch (2670:13): [True: 1, False: 0]
  ------------------
 2671|      1|          node->rebalance_left_to_right(to_move, right, mutable_allocator());
 2672|       |
 2673|      1|          if (insert_position > node->finish()) {
  ------------------
  |  Branch (2673:15): [True: 1, False: 0]
  ------------------
 2674|      1|            insert_position = insert_position - node->count() - 1;
 2675|      1|            node = right;
 2676|      1|          }
 2677|       |
 2678|      1|          assert(node->count() < node->max_count());
 2679|      1|          return;
 2680|      1|        }
 2681|      1|      }
 2682|      4|    }
 2683|       |
 2684|       |    // Rebalancing failed, make sure there is room on the parent node for a new
 2685|       |    // value.
 2686|      7|    assert(parent->max_count() == kNodeSlots);
 2687|      6|    if (parent->count() == kNodeSlots) {
  ------------------
  |  Branch (2687:9): [True: 0, False: 6]
  ------------------
 2688|      0|      iterator parent_iter(parent, node->position());
 2689|      0|      rebalance_or_split(&parent_iter);
 2690|      0|      parent = node->parent();
 2691|      0|    }
 2692|      6|  } else {
 2693|       |    // Rebalancing not possible because this is the root node.
 2694|       |    // Create a new root node and set the current root node as the child of the
 2695|       |    // new root.
 2696|      2|    parent = new_internal_node(/*position=*/0, parent);
 2697|      2|    parent->set_generation(root()->generation());
 2698|      2|    parent->init_child(parent->start(), node);
 2699|      2|    mutable_root() = parent;
 2700|       |    // If the former root was a leaf node, then it's now the rightmost node.
 2701|      2|    assert(parent->start_child()->is_internal() ||
 2702|      2|           parent->start_child() == rightmost());
 2703|      2|  }
 2704|       |
 2705|       |  // Split the node.
 2706|      8|  node_type *split_node;
 2707|      8|  if (node->is_leaf()) {
  ------------------
  |  Branch (2707:7): [True: 8, False: 0]
  ------------------
 2708|      8|    split_node = new_leaf_node(node->position() + 1, parent);
 2709|      8|    node->split(insert_position, split_node, mutable_allocator());
 2710|      8|    if (rightmost() == node) mutable_rightmost() = split_node;
  ------------------
  |  Branch (2710:9): [True: 5, False: 3]
  ------------------
 2711|      8|  } else {
 2712|      0|    split_node = new_internal_node(node->position() + 1, parent);
 2713|      0|    node->split(insert_position, split_node, mutable_allocator());
 2714|      0|  }
 2715|       |
 2716|      8|  if (insert_position > node->finish()) {
  ------------------
  |  Branch (2716:7): [True: 8, False: 0]
  ------------------
 2717|      8|    insert_position = insert_position - node->count() - 1;
 2718|      8|    node = split_node;
 2719|      8|  }
 2720|      8|}
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE23rebalance_right_to_leftEhPSE_PSC_:
 1854|      8|                                            allocator_type *alloc) {
 1855|      8|  assert(parent() == right->parent());
 1856|      8|  assert(position() + 1 == right->position());
 1857|      8|  assert(right->count() >= count());
 1858|      8|  assert(to_move >= 1);
 1859|      8|  assert(to_move <= right->count());
 1860|       |
 1861|       |  // 1) Move the delimiting value in the parent to the left node.
 1862|      8|  transfer(finish(), position(), parent(), alloc);
 1863|       |
 1864|       |  // 2) Move the (to_move - 1) values from the right node to the left node.
 1865|      8|  transfer_n(to_move - 1, finish() + 1, right->start(), right, alloc);
 1866|       |
 1867|       |  // 3) Move the new delimiting value to the parent from the right node.
 1868|      8|  parent()->transfer(position(), right->start() + to_move - 1, right, alloc);
 1869|       |
 1870|       |  // 4) Shift the values in the right node to their correct positions.
 1871|      8|  right->transfer_n(right->count() - to_move, right->start(),
 1872|      8|                    right->start() + to_move, right, alloc);
 1873|       |
 1874|      8|  if (is_internal()) {
  ------------------
  |  Branch (1874:7): [True: 0, False: 8]
  ------------------
 1875|       |    // Move the child pointers from the right to the left node.
 1876|      0|    for (field_type i = 0; i < to_move; ++i) {
  ------------------
  |  Branch (1876:28): [True: 0, False: 0]
  ------------------
 1877|      0|      init_child(finish() + i + 1, right->child(i));
 1878|      0|    }
 1879|      0|    for (field_type i = right->start(); i <= right->finish() - to_move; ++i) {
  ------------------
  |  Branch (1879:41): [True: 0, False: 0]
  ------------------
 1880|      0|      assert(i + to_move <= right->max_count());
 1881|      0|      right->init_child(i, right->child(i + to_move));
 1882|      0|      right->clear_child(i + to_move);
 1883|      0|    }
 1884|      0|  }
 1885|       |
 1886|       |  // Fixup `finish` on the left and right nodes.
 1887|      8|  set_finish(finish() + to_move);
 1888|      8|  right->set_finish(right->finish() - to_move);
 1889|      8|}
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8transferEmmPSE_PSC_:
 1011|     18|                btree_node *src_node, allocator_type *alloc) {
 1012|     18|    next_generation();
 1013|     18|    transfer(slot(dest_i), src_node->slot(src_i), alloc);
 1014|     18|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE11clear_childEh:
  762|      3|  void clear_child(field_type i) {
  763|      3|    absl::container_internal::SanitizerPoisonObject(&mutable_child(i));
  764|      3|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE13mutable_childEh:
  761|     33|  btree_node *&mutable_child(field_type i) { return GetField<4>()[i]; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8GetFieldILm4EEEPNSA_13tuple_elementIXT_ENSA_5tupleIJPSE_jhS8_SI_EEEE4typeEv:
  659|     33|  inline typename layout_type::template ElementType<N> *GetField() {
  660|       |    // We assert that we don't read from values that aren't there.
  661|       |    assert(N < 4 || is_internal());
  662|     33|    return InternalLayout().template Pointer<N>(reinterpret_cast<char *>(this));
  663|     33|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE23rebalance_left_to_rightEhPSE_PSC_:
 1894|      1|                                            allocator_type *alloc) {
 1895|      1|  assert(parent() == right->parent());
 1896|      1|  assert(position() + 1 == right->position());
 1897|      1|  assert(count() >= right->count());
 1898|      1|  assert(to_move >= 1);
 1899|      1|  assert(to_move <= count());
 1900|       |
 1901|       |  // Values in the right node are shifted to the right to make room for the
 1902|       |  // new to_move values. Then, the delimiting value in the parent and the
 1903|       |  // other (to_move - 1) values in the left node are moved into the right node.
 1904|       |  // Lastly, a new delimiting value is moved from the left node into the
 1905|       |  // parent, and the remaining empty left node entries are destroyed.
 1906|       |
 1907|       |  // 1) Shift existing values in the right node to their correct positions.
 1908|      1|  right->transfer_n_backward(right->count(), right->start() + to_move,
 1909|      1|                             right->start(), right, alloc);
 1910|       |
 1911|       |  // 2) Move the delimiting value in the parent to the right node.
 1912|      1|  right->transfer(right->start() + to_move - 1, position(), parent(), alloc);
 1913|       |
 1914|       |  // 3) Move the (to_move - 1) values from the left node to the right node.
 1915|      1|  right->transfer_n(to_move - 1, right->start(), finish() - (to_move - 1), this,
 1916|      1|                    alloc);
 1917|       |
 1918|       |  // 4) Move the new delimiting value to the parent from the left node.
 1919|      1|  parent()->transfer(position(), finish() - to_move, this, alloc);
 1920|       |
 1921|      1|  if (is_internal()) {
  ------------------
  |  Branch (1921:7): [True: 0, False: 1]
  ------------------
 1922|       |    // Move the child pointers from the left to the right node.
 1923|      0|    for (field_type i = right->finish() + 1; i > right->start(); --i) {
  ------------------
  |  Branch (1923:46): [True: 0, False: 0]
  ------------------
 1924|      0|      right->init_child(i - 1 + to_move, right->child(i - 1));
 1925|      0|      right->clear_child(i - 1);
 1926|      0|    }
 1927|      0|    for (field_type i = 1; i <= to_move; ++i) {
  ------------------
  |  Branch (1927:28): [True: 0, False: 0]
  ------------------
 1928|      0|      right->init_child(i - 1, child(finish() - to_move + i));
 1929|      0|      clear_child(finish() - to_move + i);
 1930|      0|    }
 1931|      0|  }
 1932|       |
 1933|       |  // Fixup the counts on the left and right nodes.
 1934|      1|  set_finish(finish() - to_move);
 1935|      1|  right->set_finish(right->finish() + to_move);
 1936|      1|}
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE19transfer_n_backwardEmmmPSE_PSC_:
 1033|     51|                           allocator_type *alloc) {
 1034|     51|    next_generation();
 1035|     51|    for (slot_type *src = src_node->slot(src_i + n), *end = src - n,
 1036|     51|                   *dest = slot(dest_i + n);
 1037|    188|         src != end; --src, --dest) {
  ------------------
  |  Branch (1037:10): [True: 137, False: 51]
  ------------------
 1038|       |      // If we modified the loop index calculations above to avoid the -1s here,
 1039|       |      // it would result in UB in the computation of `end` (and possibly `src`
 1040|       |      // as well, if n == 0), since slot() is effectively an array index and it
 1041|       |      // is UB to compute the address of any out-of-bounds array element except
 1042|       |      // for one-past-the-end.
 1043|    137|      transfer(dest - 1, src - 1, alloc);
 1044|    137|    }
 1045|     51|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE17new_internal_nodeEhPNS1_10btree_nodeISD_EE:
 1692|      2|  node_type *new_internal_node(field_type position, node_type *parent) {
 1693|      2|    node_type *n = allocate(node_type::InternalSize());
 1694|      2|    n->init_internal(position, parent);
 1695|      2|    return n;
 1696|      2|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE13init_internalEhPSE_:
  964|      2|  void init_internal(field_type position, btree_node *parent) {
  965|      2|    init_leaf(position, kNodeSlots, parent);
  966|       |    // Set `max_count` to a sentinel value to indicate that this node is
  967|       |    // internal.
  968|      2|    set_max_count(kInternalNodeMaxCount);
  969|      2|    absl::container_internal::SanitizerPoisonMemoryRegion(
  970|      2|        &mutable_child(start()), (kNodeSlots + 1) * sizeof(btree_node *));
  971|      2|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10init_childEhPSE_:
  773|      2|  void init_child(field_type i, btree_node *c) {
  774|      2|    set_child(i, c);
  775|      2|    c->set_parent(this);
  776|      2|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE9set_childEhPSE_:
  769|      6|  void set_child(field_type i, btree_node *c) {
  770|      6|    set_child_noupdate_position(i, c);
  771|      6|    c->set_position(i);
  772|      6|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE27set_child_noupdate_positionEhPSE_:
  765|     14|  void set_child_noupdate_position(field_type i, btree_node *c) {
  766|     14|    absl::container_internal::SanitizerUnpoisonObject(&mutable_child(i));
  767|     14|    mutable_child(i) = c;
  768|     14|  }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE13new_leaf_nodeEhPNS1_10btree_nodeISD_EE:
 1697|      8|  node_type *new_leaf_node(field_type position, node_type *parent) {
 1698|      8|    node_type *n = allocate(node_type::LeafSize());
 1699|      8|    n->init_leaf(position, kNodeSlots, parent);
 1700|      8|    return n;
 1701|      8|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE5splitEiPSE_PSC_:
 1940|      8|                          allocator_type *alloc) {
 1941|      8|  assert(dest->count() == 0);
 1942|      8|  assert(max_count() == kNodeSlots);
 1943|      8|  assert(position() + 1 == dest->position());
 1944|      8|  assert(parent() == dest->parent());
 1945|       |
 1946|       |  // We bias the split based on the position being inserted. If we're
 1947|       |  // inserting at the beginning of the left node then bias the split to put
 1948|       |  // more values on the right node. If we're inserting at the end of the
 1949|       |  // right node then bias the split to put more values on the left node.
 1950|      8|  if (insert_position == start()) {
  ------------------
  |  Branch (1950:7): [True: 0, False: 8]
  ------------------
 1951|      0|    dest->set_finish(dest->start() + finish() - 1);
 1952|      8|  } else if (insert_position == kNodeSlots) {
  ------------------
  |  Branch (1952:14): [True: 3, False: 5]
  ------------------
 1953|      3|    dest->set_finish(dest->start());
 1954|      5|  } else {
 1955|      5|    dest->set_finish(dest->start() + count() / 2);
 1956|      5|  }
 1957|      8|  set_finish(finish() - dest->count());
 1958|      8|  assert(count() >= 1);
 1959|       |
 1960|       |  // Move values from the left sibling to the right sibling.
 1961|      8|  dest->transfer_n(dest->count(), dest->start(), finish(), this, alloc);
 1962|       |
 1963|       |  // The split key is the largest value in the left sibling.
 1964|      8|  --mutable_finish();
 1965|      8|  parent()->emplace_value(position(), alloc, finish_slot());
 1966|      8|  value_destroy(finish(), alloc);
 1967|      8|  parent()->set_child_noupdate_position(position() + 1, dest);
 1968|       |
 1969|      8|  if (is_internal()) {
  ------------------
  |  Branch (1969:7): [True: 0, False: 8]
  ------------------
 1970|      0|    for (field_type i = dest->start(), j = finish() + 1; i <= dest->finish();
  ------------------
  |  Branch (1970:58): [True: 0, False: 0]
  ------------------
 1971|      0|         ++i, ++j) {
 1972|       |      assert(child(j) != nullptr);
 1973|      0|      dest->init_child(i, child(j));
 1974|      0|      clear_child(j);
 1975|      0|    }
 1976|      0|  }
 1977|      8|}
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE14mutable_finishEv:
  671|      8|  field_type &mutable_finish() { return GetField<2>()[2]; }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE13emplace_valueIJPS8_EEEvhPSC_DpOT_:
 1807|      8|                                         Args &&...args) {
 1808|      8|  assert(i >= start());
 1809|      8|  assert(i <= finish());
 1810|       |  // Shift old values to create space for new value and then construct it in
 1811|       |  // place.
 1812|      8|  if (i < finish()) {
  ------------------
  |  Branch (1812:7): [True: 3, False: 5]
  ------------------
 1813|      3|    transfer_n_backward(finish() - i, /*dest_i=*/i + 1, /*src_i=*/i, this,
 1814|      3|                        alloc);
 1815|      3|  }
 1816|      8|  value_init(static_cast<field_type>(i), alloc, std::forward<Args>(args)...);
 1817|      8|  set_finish(finish() + 1);
 1818|       |
 1819|      8|  if (is_internal() && finish() > i + 1) {
  ------------------
  |  Branch (1819:7): [True: 8, False: 0]
  |  Branch (1819:24): [True: 3, False: 5]
  ------------------
 1820|      7|    for (field_type j = finish(); j > i + 1; --j) {
  ------------------
  |  Branch (1820:35): [True: 4, False: 3]
  ------------------
 1821|      4|      set_child(j, child(j - 1));
 1822|      4|    }
 1823|      3|    clear_child(i + 1);
 1824|      3|  }
 1825|      8|}
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10value_initIJPS8_EEEvhPSC_DpOT_:
  984|      8|  void value_init(const field_type i, allocator_type *alloc, Args &&...args) {
  985|      8|    next_generation();
  986|      8|    absl::container_internal::SanitizerUnpoisonObject(slot(i));
  987|      8|    params_type::construct(alloc, slot(i), std::forward<Args>(args)...);
  988|      8|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE11finish_slotEv:
  674|      8|  slot_type *finish_slot() { return slot(finish()); }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE13value_destroyEhPSC_:
  989|      8|  void value_destroy(const field_type i, allocator_type *alloc) {
  990|      8|    next_generation();
  991|      8|    params_type::destroy(alloc, slot(i));
  992|      8|    absl::container_internal::SanitizerPoisonObject(slot(i));
  993|      8|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE13emplace_valueIJRKS8_EEEvhPSC_DpOT_:
 1807|     64|                                         Args &&...args) {
 1808|     64|  assert(i >= start());
 1809|     64|  assert(i <= finish());
 1810|       |  // Shift old values to create space for new value and then construct it in
 1811|       |  // place.
 1812|     64|  if (i < finish()) {
  ------------------
  |  Branch (1812:7): [True: 47, False: 17]
  ------------------
 1813|     47|    transfer_n_backward(finish() - i, /*dest_i=*/i + 1, /*src_i=*/i, this,
 1814|     47|                        alloc);
 1815|     47|  }
 1816|     64|  value_init(static_cast<field_type>(i), alloc, std::forward<Args>(args)...);
 1817|     64|  set_finish(finish() + 1);
 1818|       |
 1819|     64|  if (is_internal() && finish() > i + 1) {
  ------------------
  |  Branch (1819:7): [True: 0, False: 64]
  |  Branch (1819:24): [True: 0, False: 0]
  ------------------
 1820|      0|    for (field_type j = finish(); j > i + 1; --j) {
  ------------------
  |  Branch (1820:35): [True: 0, False: 0]
  ------------------
 1821|      0|      set_child(j, child(j - 1));
 1822|      0|    }
 1823|      0|    clear_child(i + 1);
 1824|      0|  }
 1825|     64|}
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE10value_initIJRKS8_EEEvhPSC_DpOT_:
  984|     64|  void value_init(const field_type i, allocator_type *alloc, Args &&...args) {
  985|     64|    next_generation();
  986|     64|    absl::container_internal::SanitizerUnpoisonObject(slot(i));
  987|     64|    params_type::construct(alloc, slot(i), std::forward<Args>(args)...);
  988|     64|  }
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_EppEv:
 1198|     45|  btree_iterator &operator++() {
 1199|     45|    increment();
 1200|     45|    return *this;
 1201|     45|  }
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_E9incrementEv:
 1279|     45|  void increment() {
 1280|     45|    assert_valid_generation(node_);
 1281|     45|    if (node_->is_leaf() && ++position_ < node_->finish()) {
  ------------------
  |  Branch (1281:9): [True: 39, False: 6]
  |  Branch (1281:29): [True: 31, False: 8]
  ------------------
 1282|     31|      return;
 1283|     31|    }
 1284|     14|    increment_slow();
 1285|     14|  }
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_E14increment_slowEv:
 2135|     14|void btree_iterator<N, R, P>::increment_slow() {
 2136|     14|  if (node_->is_leaf()) {
  ------------------
  |  Branch (2136:7): [True: 8, False: 6]
  ------------------
 2137|      8|    assert(position_ >= node_->finish());
 2138|      8|    btree_iterator save(*this);
 2139|     15|    while (position_ == node_->finish() && !node_->is_root()) {
  ------------------
  |  Branch (2139:12): [True: 9, False: 6]
  |  Branch (2139:44): [True: 7, False: 2]
  ------------------
 2140|      7|      assert(node_->parent()->child(node_->position()) == node_);
 2141|      7|      position_ = node_->position();
 2142|      7|      node_ = node_->parent();
 2143|      7|    }
 2144|       |    // TODO(ezb): assert we aren't incrementing end() instead of handling.
 2145|      8|    if (position_ == node_->finish()) {
  ------------------
  |  Branch (2145:9): [True: 2, False: 6]
  ------------------
 2146|      2|      *this = save;
 2147|      2|    }
 2148|      8|  } else {
 2149|      6|    assert(position_ < node_->finish());
 2150|      6|    node_ = node_->child(static_cast<field_type>(position_ + 1));
 2151|      6|    while (node_->is_internal()) {
  ------------------
  |  Branch (2151:12): [True: 0, False: 6]
  ------------------
 2152|      0|      node_ = node_->start_child();
 2153|      0|    }
 2154|      6|    position_ = node_->start();
 2155|      6|  }
 2156|     14|}
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE13insert_uniqueIS8_JRKS8_EEENSA_4pairINS1_14btree_iteratorINS1_10btree_nodeISD_EESH_PSG_EEbEERKT_DpOT0_:
 2278|      7|    -> std::pair<iterator, bool> {
 2279|      7|  if (empty()) {
  ------------------
  |  Branch (2279:7): [True: 3, False: 4]
  ------------------
 2280|      3|    mutable_root() = mutable_rightmost() = new_leaf_root_node(1);
 2281|      3|  }
 2282|       |
 2283|      7|  SearchResult<iterator, is_key_compare_to::value> res = internal_locate(key);
 2284|      7|  iterator iter = res.value;
 2285|       |
 2286|      7|  if (res.HasMatch()) {
  ------------------
  |  Branch (2286:7): [Folded, False: 7]
  ------------------
 2287|      0|    if (res.IsEq()) {
  ------------------
  |  Branch (2287:9): [Folded, False: 0]
  ------------------
 2288|       |      // The key already exists in the tree, do nothing.
 2289|      0|      return {iter, false};
 2290|      0|    }
 2291|      7|  } else {
 2292|      7|    iterator last = internal_last(iter);
 2293|      7|    if (last.node_ && !compare_keys(key, last.key())) {
  ------------------
  |  Branch (2293:9): [True: 4, False: 3]
  |  Branch (2293:23): [True: 0, False: 4]
  ------------------
 2294|       |      // The key already exists in the tree, do nothing.
 2295|      0|      return {last, false};
 2296|      0|    }
 2297|      7|  }
 2298|      7|  return {internal_emplace(iter, std::forward<Args>(args)...), true};
 2299|      7|}
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE15internal_locateIS8_EENS1_12SearchResultINS1_14btree_iteratorINS1_10btree_nodeISD_EERKS8_PSK_EELb0EEERKT_:
 2898|      7|    -> SearchResult<iterator, is_key_compare_to::value> {
 2899|      7|  iterator iter(const_cast<node_type *>(root()));
 2900|      9|  for (;;) {
 2901|      9|    SearchResult<size_type, is_key_compare_to::value> res =
 2902|      9|        iter.node_->lower_bound(key, key_comp());
 2903|      9|    iter.position_ = static_cast<int>(res.value);
 2904|      9|    if (res.IsEq()) {
  ------------------
  |  Branch (2904:9): [Folded, False: 9]
  ------------------
 2905|      0|      return {iter, MatchKind::kEq};
 2906|      0|    }
 2907|       |    // Note: in the non-key-compare-to case, we don't need to walk all the way
 2908|       |    // down the tree if the keys are equal, but determining equality would
 2909|       |    // require doing an extra comparison on each node on the way down, and we
 2910|       |    // will need to go all the way to the leaf node in the expected case.
 2911|      9|    if (iter.node_->is_leaf()) {
  ------------------
  |  Branch (2911:9): [True: 7, False: 2]
  ------------------
 2912|      7|      break;
 2913|      7|    }
 2914|      2|    iter.node_ = iter.node_->child(static_cast<field_type>(iter.position_));
 2915|      2|  }
 2916|       |  // Note: in the non-key-compare-to case, the key may actually be equivalent
 2917|       |  // here (and the MatchKind::kNe is ignored).
 2918|      7|  return {iter, MatchKind::kNe};
 2919|      7|}
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE11lower_boundIS8_EENS1_12SearchResultImLb0EEERKT_RKNS1_19key_compare_adapterIS9_S8_E15checked_compareE:
  781|      9|      const K &k, const key_compare &comp) const {
  782|      9|    return use_linear_search::value ? linear_search(k, comp)
  ------------------
  |  Branch (782:12): [Folded, False: 9]
  ------------------
  783|      9|                                    : binary_search(k, comp);
  784|      9|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE13binary_searchIS8_NS1_19key_compare_adapterIS9_S8_E15checked_compareEEENS1_12SearchResultImXsr23btree_is_key_compare_toIT0_S8_EE5valueEEERKT_RKSK_:
  802|      9|  binary_search(const K &k, const Compare &comp) const {
  803|      9|    return binary_search_impl(k, start(), finish(), comp,
  804|      9|                              btree_is_key_compare_to<Compare, key_type>());
  805|      9|  }
_ZNK4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE18binary_search_implIS8_NS1_19key_compare_adapterIS9_S8_E15checked_compareEEENS1_12SearchResultImLb0EEERKT_mmRKT0_NSA_17integral_constantIbLb0EEE:
  845|      9|      std::false_type /* IsCompareTo */) const {
  846|     19|    while (s != e) {
  ------------------
  |  Branch (846:12): [True: 10, False: 9]
  ------------------
  847|     10|      const size_type mid = (s + e) >> 1;
  848|     10|      if (comp(key(mid), k)) {
  ------------------
  |  Branch (848:11): [True: 0, False: 10]
  ------------------
  849|      0|        s = mid + 1;
  850|     10|      } else {
  851|     10|        e = mid;
  852|     10|      }
  853|     10|    }
  854|      9|    return SearchResult<size_type, false>{s};
  855|      9|  }
_ZN4absl12lts_2024011618container_internal12SearchResultINS1_14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS9_13SymbolCompareENSt3__19allocatorISA_EELi256ELb0EEEEERKSA_PSH_EELb0EEC2ESK_NS1_9MatchKindE:
  480|      7|  SearchResult(V v, MatchKind /*match*/) : value(v) {}
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_EC2IKSF_SH_SI_TnNSB_9enable_ifIXaasr3std7is_sameINS2_IT_T0_T1_EENS2_ISL_SH_SI_EEEE5valueL_ZNSB_17integral_constantIbLb1EE5valueEEEiE4typeELi0EEESQ_:
 1244|     64|      : btree_iterator_generation_info(other.generation()),
 1245|     64|        node_(const_cast<node_type *>(other.node_)),
 1246|     64|        position_(other.position_) {}
_ZNK4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS8_11FileCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_EneERKSJ_:
 1168|      9|  bool operator!=(const iterator &other) const {
 1169|      9|    return !Equals(other);
 1170|      9|  }
_ZNK4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS8_11FileCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_E6EqualsENS2_IKSF_SH_SI_EE:
 1248|      9|  bool Equals(const const_iterator other) const {
 1249|      9|    ABSL_HARDENING_ASSERT(((node_ == nullptr && other.node_ == nullptr) ||
  ------------------
  |  |  128|      9|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      9|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 9]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1250|      9|                           (node_ != nullptr && other.node_ != nullptr)) &&
 1251|      9|                          "Comparing default-constructed iterator with "
 1252|      9|                          "non-default-constructed iterator.");
 1253|       |    // Note: we use assert instead of ABSL_HARDENING_ASSERT here because this
 1254|       |    // changes the complexity of Equals from O(1) to O(log(N) + log(M)) where
 1255|       |    // N/M are sizes of the containers containing node_/other.node_.
 1256|      9|    assert(AreNodesFromSameContainer(node_, other.node_) &&
 1257|      9|           "Comparing iterators from different containers.");
 1258|      9|    assert_valid_generation(node_);
 1259|      9|    other.assert_valid_generation(other.node_);
 1260|      9|    return node_ == other.node_ && position_ == other.position_;
  ------------------
  |  Branch (1260:12): [True: 9, False: 0]
  |  Branch (1260:36): [True: 2, False: 7]
  ------------------
 1261|      9|  }
_ZN4absl12lts_2024011618container_internal14btree_iteratorIKNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS8_11FileCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSH_EC2ISF_SI_SJ_TnNSB_9enable_ifIXaasr3std7is_sameINS2_IT_T0_T1_EENS2_ISF_SI_SJ_EEEE5valueL_ZNSB_17integral_constantIbLb1EE5valueEEEiE4typeELi0EEESQ_:
 1158|      9|      : btree_iterator_generation_info(other),
 1159|      9|        node_(other.node_),
 1160|      9|        position_(other.position_) {}
_ZNK4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS8_11FileCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_EdeEv:
 1186|      7|  reference operator*() const {
 1187|      7|    ABSL_HARDENING_ASSERT(node_ != nullptr);
  ------------------
  |  |  128|      7|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      7|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 7]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|      7|    assert_valid_generation(node_);
 1189|      7|    ABSL_HARDENING_ASSERT(position_ >= node_->start());
  ------------------
  |  |  128|      7|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      7|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 7]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1190|      7|    if (position_ >= node_->finish()) {
  ------------------
  |  Branch (1190:9): [True: 0, False: 7]
  ------------------
 1191|      0|      ABSL_HARDENING_ASSERT(!IsEndIterator() && "Dereferencing end() iterator");
  ------------------
  |  |  128|      0|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      0|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1192|      0|      ABSL_HARDENING_ASSERT(position_ < node_->finish());
  ------------------
  |  |  128|      0|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      0|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1193|      0|    }
 1194|      7|    return node_->value(static_cast<field_type>(position_));
 1195|      7|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE5valueEm:
  753|      7|  reference value(size_type i) { return params_type::element(slot(i)); }
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS8_11FileCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_EppEv:
 1198|      4|  btree_iterator &operator++() {
 1199|      4|    increment();
 1200|      4|    return *this;
 1201|      4|  }
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS8_11FileCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_E9incrementEv:
 1279|      4|  void increment() {
 1280|      4|    assert_valid_generation(node_);
 1281|      4|    if (node_->is_leaf() && ++position_ < node_->finish()) {
  ------------------
  |  Branch (1281:9): [True: 4, False: 0]
  |  Branch (1281:29): [True: 2, False: 2]
  ------------------
 1282|      2|      return;
 1283|      2|    }
 1284|      2|    increment_slow();
 1285|      2|  }
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS8_11FileCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_E14increment_slowEv:
 2135|      2|void btree_iterator<N, R, P>::increment_slow() {
 2136|      2|  if (node_->is_leaf()) {
  ------------------
  |  Branch (2136:7): [True: 2, False: 0]
  ------------------
 2137|      2|    assert(position_ >= node_->finish());
 2138|      2|    btree_iterator save(*this);
 2139|      2|    while (position_ == node_->finish() && !node_->is_root()) {
  ------------------
  |  Branch (2139:12): [True: 2, False: 0]
  |  Branch (2139:44): [True: 0, False: 2]
  ------------------
 2140|      0|      assert(node_->parent()->child(node_->position()) == node_);
 2141|      0|      position_ = node_->position();
 2142|      0|      node_ = node_->parent();
 2143|      0|    }
 2144|       |    // TODO(ezb): assert we aren't incrementing end() instead of handling.
 2145|      2|    if (position_ == node_->finish()) {
  ------------------
  |  Branch (2145:9): [True: 2, False: 0]
  ------------------
 2146|      2|      *this = save;
 2147|      2|    }
 2148|      2|  } else {
 2149|      0|    assert(position_ < node_->finish());
 2150|      0|    node_ = node_->child(static_cast<field_type>(position_ + 1));
 2151|      0|    while (node_->is_internal()) {
  ------------------
  |  Branch (2151:12): [True: 0, False: 0]
  ------------------
 2152|      0|      node_ = node_->start_child();
 2153|      0|    }
 2154|      0|    position_ = node_->start();
 2155|      0|  }
 2156|      2|}
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE5beginEv:
 1436|      2|  iterator begin() { return iterator(leftmost()); }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8leftmostEv:
 1672|      2|  node_type *leftmost() { return root()->parent(); }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE3endEv:
 1438|      2|  iterator end() { return iterator(rightmost(), rightmost()->finish()); }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE5clearEv:
 2577|      2|void btree<P>::clear() {
 2578|      2|  if (!empty()) {
  ------------------
  |  Branch (2578:7): [True: 2, False: 0]
  ------------------
 2579|      2|    node_type::clear_and_delete(root(), mutable_allocator());
 2580|      2|  }
 2581|      2|  mutable_root() = mutable_rightmost() = EmptyNode();
 2582|      2|  size_ = 0;
 2583|      2|}
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE4sizeEv:
 1581|      2|  size_type size() const { return size_; }
_ZNK4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_EneERKSJ_:
 1168|     92|  bool operator!=(const iterator &other) const {
 1169|     92|    return !Equals(other);
 1170|     92|  }
_ZNK4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_EdeEv:
 1186|     88|  reference operator*() const {
 1187|     88|    ABSL_HARDENING_ASSERT(node_ != nullptr);
  ------------------
  |  |  128|     88|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|     88|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 88]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|     88|    assert_valid_generation(node_);
 1189|     88|    ABSL_HARDENING_ASSERT(position_ >= node_->start());
  ------------------
  |  |  128|     88|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|     88|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 88]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1190|     88|    if (position_ >= node_->finish()) {
  ------------------
  |  Branch (1190:9): [True: 0, False: 88]
  ------------------
 1191|      0|      ABSL_HARDENING_ASSERT(!IsEndIterator() && "Dereferencing end() iterator");
  ------------------
  |  |  128|      0|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      0|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1192|      0|      ABSL_HARDENING_ASSERT(position_ < node_->finish());
  ------------------
  |  |  128|      0|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      0|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1193|      0|    }
 1194|     88|    return node_->value(static_cast<field_type>(position_));
 1195|     88|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE5valueEm:
  753|     88|  reference value(size_type i) { return params_type::element(slot(i)); }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS7_13SymbolCompareENSt3__19allocatorIS8_EELi256ELb0EEEE5clearEv:
 2577|      2|void btree<P>::clear() {
 2578|      2|  if (!empty()) {
  ------------------
  |  Branch (2578:7): [True: 2, False: 0]
  ------------------
 2579|      2|    node_type::clear_and_delete(root(), mutable_allocator());
 2580|      2|  }
 2581|      2|  mutable_root() = mutable_rightmost() = EmptyNode();
 2582|      2|  size_ = 0;
 2583|      2|}
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE4sizeEv:
 1581|      1|  size_type size() const { return size_; }
_ZNK4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS8_16ExtensionCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_EneERKSJ_:
 1168|      3|  bool operator!=(const iterator &other) const {
 1169|      3|    return !Equals(other);
 1170|      3|  }
_ZNK4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS8_16ExtensionCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_E6EqualsENS2_IKSF_SH_SI_EE:
 1248|      3|  bool Equals(const const_iterator other) const {
 1249|      3|    ABSL_HARDENING_ASSERT(((node_ == nullptr && other.node_ == nullptr) ||
  ------------------
  |  |  128|      3|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      3|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 3]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1250|      3|                           (node_ != nullptr && other.node_ != nullptr)) &&
 1251|      3|                          "Comparing default-constructed iterator with "
 1252|      3|                          "non-default-constructed iterator.");
 1253|       |    // Note: we use assert instead of ABSL_HARDENING_ASSERT here because this
 1254|       |    // changes the complexity of Equals from O(1) to O(log(N) + log(M)) where
 1255|       |    // N/M are sizes of the containers containing node_/other.node_.
 1256|      3|    assert(AreNodesFromSameContainer(node_, other.node_) &&
 1257|      3|           "Comparing iterators from different containers.");
 1258|      3|    assert_valid_generation(node_);
 1259|      3|    other.assert_valid_generation(other.node_);
 1260|      3|    return node_ == other.node_ && position_ == other.position_;
  ------------------
  |  Branch (1260:12): [True: 3, False: 0]
  |  Branch (1260:36): [True: 1, False: 2]
  ------------------
 1261|      3|  }
_ZN4absl12lts_2024011618container_internal14btree_iteratorIKNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS8_16ExtensionCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSH_EC2ISF_SI_SJ_TnNSB_9enable_ifIXaasr3std7is_sameINS2_IT_T0_T1_EENS2_ISF_SI_SJ_EEEE5valueL_ZNSB_17integral_constantIbLb1EE5valueEEEiE4typeELi0EEESQ_:
 1158|      3|      : btree_iterator_generation_info(other),
 1159|      3|        node_(other.node_),
 1160|      3|        position_(other.position_) {}
_ZNK4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS8_16ExtensionCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_EdeEv:
 1186|      1|  reference operator*() const {
 1187|      1|    ABSL_HARDENING_ASSERT(node_ != nullptr);
  ------------------
  |  |  128|      1|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      1|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|      1|    assert_valid_generation(node_);
 1189|      1|    ABSL_HARDENING_ASSERT(position_ >= node_->start());
  ------------------
  |  |  128|      1|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      1|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1190|      1|    if (position_ >= node_->finish()) {
  ------------------
  |  Branch (1190:9): [True: 0, False: 1]
  ------------------
 1191|      0|      ABSL_HARDENING_ASSERT(!IsEndIterator() && "Dereferencing end() iterator");
  ------------------
  |  |  128|      0|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      0|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1192|      0|      ABSL_HARDENING_ASSERT(position_ < node_->finish());
  ------------------
  |  |  128|      0|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      0|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1193|      0|    }
 1194|      1|    return node_->value(static_cast<field_type>(position_));
 1195|      1|  }
_ZN4absl12lts_2024011618container_internal10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE5valueEm:
  753|      1|  reference value(size_type i) { return params_type::element(slot(i)); }
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS8_16ExtensionCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_EppEv:
 1198|      1|  btree_iterator &operator++() {
 1199|      1|    increment();
 1200|      1|    return *this;
 1201|      1|  }
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS8_16ExtensionCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_E9incrementEv:
 1279|      1|  void increment() {
 1280|      1|    assert_valid_generation(node_);
 1281|      1|    if (node_->is_leaf() && ++position_ < node_->finish()) {
  ------------------
  |  Branch (1281:9): [True: 1, False: 0]
  |  Branch (1281:29): [True: 0, False: 1]
  ------------------
 1282|      0|      return;
 1283|      0|    }
 1284|      1|    increment_slow();
 1285|      1|  }
_ZN4absl12lts_2024011618container_internal14btree_iteratorINS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS8_16ExtensionCompareENSt3__19allocatorIS9_EELi256ELb0EEEEERKS9_PSG_E14increment_slowEv:
 2135|      1|void btree_iterator<N, R, P>::increment_slow() {
 2136|      1|  if (node_->is_leaf()) {
  ------------------
  |  Branch (2136:7): [True: 1, False: 0]
  ------------------
 2137|      1|    assert(position_ >= node_->finish());
 2138|      1|    btree_iterator save(*this);
 2139|      1|    while (position_ == node_->finish() && !node_->is_root()) {
  ------------------
  |  Branch (2139:12): [True: 1, False: 0]
  |  Branch (2139:44): [True: 0, False: 1]
  ------------------
 2140|      0|      assert(node_->parent()->child(node_->position()) == node_);
 2141|      0|      position_ = node_->position();
 2142|      0|      node_ = node_->parent();
 2143|      0|    }
 2144|       |    // TODO(ezb): assert we aren't incrementing end() instead of handling.
 2145|      1|    if (position_ == node_->finish()) {
  ------------------
  |  Branch (2145:9): [True: 1, False: 0]
  ------------------
 2146|      1|      *this = save;
 2147|      1|    }
 2148|      1|  } else {
 2149|      0|    assert(position_ < node_->finish());
 2150|      0|    node_ = node_->child(static_cast<field_type>(position_ + 1));
 2151|      0|    while (node_->is_internal()) {
  ------------------
  |  Branch (2151:12): [True: 0, False: 0]
  ------------------
 2152|      0|      node_ = node_->start_child();
 2153|      0|    }
 2154|      0|    position_ = node_->start();
 2155|      0|  }
 2156|      1|}
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE5beginEv:
 1436|      1|  iterator begin() { return iterator(leftmost()); }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE8leftmostEv:
 1672|      1|  node_type *leftmost() { return root()->parent(); }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE3endEv:
 1438|      1|  iterator end() { return iterator(rightmost(), rightmost()->finish()); }
_ZN4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS7_16ExtensionCompareENSt3__19allocatorIS8_EELi256ELb0EEEE5clearEv:
 2577|      1|void btree<P>::clear() {
 2578|      1|  if (!empty()) {
  ------------------
  |  Branch (2578:7): [True: 1, False: 0]
  ------------------
 2579|      1|    node_type::clear_and_delete(root(), mutable_allocator());
 2580|      1|  }
 2581|      1|  mutable_root() = mutable_rightmost() = EmptyNode();
 2582|      1|  size_ = 0;
 2583|      1|}
_ZNK4absl12lts_2024011618container_internal5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS7_11FileCompareENSt3__19allocatorIS8_EELi256ELb0EEEE4sizeEv:
 1581|      2|  size_type size() const { return size_; }

_ZN4absl12lts_2024011618container_internal19btree_map_containerINS1_5btreeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS8_15FieldDescriptorENS5_4lessISC_EENS5_9allocatorINS6_IKSC_SF_EEEELi256ELb0EEEEEEC2Ev:
  465|      2|  btree_map_container() {}
_ZN4absl12lts_2024011618container_internal19btree_set_containerINS1_5btreeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS8_15FieldDescriptorENS5_4lessISC_EENS5_9allocatorINS6_IKSC_SF_EEEELi256ELb0EEEEEEC2Ev:
  303|      2|  btree_set_container() {}
_ZN4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS8_15FieldDescriptorENS5_4lessISC_EENS5_9allocatorINS6_IKSC_SF_EEEELi256ELb0EEEEEEC2Ev:
   74|      2|  btree_container() : tree_(key_compare(), allocator_type()) {}
_ZN4absl12lts_2024011618container_internal19btree_set_containerINS1_5btreeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS8_15FieldDescriptorENS5_4lessISC_EENS5_9allocatorINS6_IKSC_SF_EEEELi256ELb0EEEEEE6insertEOSK_:
  333|      1|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
  334|      1|    return this->tree_.insert_unique(params_type::key(v), std::move(v));
  335|      1|  }
_ZN4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS8_11FileCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEEC2ERKSA_RKSD_:
   77|      2|      : tree_(comp, alloc) {}
_ZN4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEEC2ERKSA_RKSD_:
   77|      2|      : tree_(comp, alloc) {}
_ZN4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS8_16ExtensionCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEEC2ERKSA_RKSD_:
   77|      2|      : tree_(comp, alloc) {}
_ZN4absl12lts_2024011618container_internal19btree_set_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS8_11FileCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE6insertEOS9_:
  333|      6|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
  334|      6|    return this->tree_.insert_unique(params_type::key(v), std::move(v));
  335|      6|  }
_ZN4absl12lts_2024011618container_internal19btree_set_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS8_16ExtensionCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE6insertEOS9_:
  333|      1|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
  334|      1|    return this->tree_.insert_unique(params_type::key(v), std::move(v));
  335|      1|  }
_ZNK4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE11upper_boundIS9_EENS1_14btree_iteratorIKNS1_10btree_nodeISE_EERKS9_PSM_EERSM_:
  163|     64|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
  164|     64|    return tree_.upper_bound(key);
  165|     64|  }
_ZNK4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE5beginEv:
   99|     64|  const_iterator begin() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  100|     64|    return tree_.begin();
  101|     64|  }
_ZN4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE3endEv:
  105|     66|  iterator end() ABSL_ATTRIBUTE_LIFETIME_BOUND { return tree_.end(); }
_ZNK4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE8key_compEv:
  260|     66|  key_compare key_comp() const { return key_compare(tree_.key_comp()); }
_ZN4absl12lts_2024011618container_internal19btree_set_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE6insertENS1_14btree_iteratorIKNS1_10btree_nodeISE_EERKS9_PSL_EESM_:
  346|     64|                  const value_type &v) ABSL_ATTRIBUTE_LIFETIME_BOUND {
  347|     64|    return this->tree_
  348|     64|        .insert_hint_unique(iterator(hint), params_type::key(v), v)
  349|     64|        .first;
  350|     64|  }
_ZNK4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS8_16ExtensionCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE8key_compEv:
  260|      2|  key_compare key_comp() const { return key_compare(tree_.key_comp()); }
_ZNK4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS8_11FileCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE5emptyEv:
  229|      4|  bool empty() const { return tree_.empty(); }
_ZN4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS8_11FileCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE5beginEv:
   98|      2|  iterator begin() ABSL_ATTRIBUTE_LIFETIME_BOUND { return tree_.begin(); }
_ZN4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS8_11FileCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE3endEv:
  105|      2|  iterator end() ABSL_ATTRIBUTE_LIFETIME_BOUND { return tree_.end(); }
_ZN4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS8_11FileCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE5clearEv:
  222|      2|  ABSL_ATTRIBUTE_REINITIALIZES void clear() { tree_.clear(); }
_ZNK4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE5emptyEv:
  229|      4|  bool empty() const { return tree_.empty(); }
_ZNK4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE4sizeEv:
  227|      2|  size_type size() const { return tree_.size(); }
_ZN4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE5beginEv:
   98|      2|  iterator begin() ABSL_ATTRIBUTE_LIFETIME_BOUND { return tree_.begin(); }
_ZN4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE5clearEv:
  222|      2|  ABSL_ATTRIBUTE_REINITIALIZES void clear() { tree_.clear(); }
_ZNK4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS8_16ExtensionCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE5emptyEv:
  229|      4|  bool empty() const { return tree_.empty(); }
_ZNK4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS8_16ExtensionCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE4sizeEv:
  227|      1|  size_type size() const { return tree_.size(); }
_ZN4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS8_16ExtensionCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE5beginEv:
   98|      1|  iterator begin() ABSL_ATTRIBUTE_LIFETIME_BOUND { return tree_.begin(); }
_ZN4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS8_16ExtensionCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE3endEv:
  105|      1|  iterator end() ABSL_ATTRIBUTE_LIFETIME_BOUND { return tree_.end(); }
_ZN4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS8_16ExtensionCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE5clearEv:
  222|      1|  ABSL_ATTRIBUTE_REINITIALIZES void clear() { tree_.clear(); }
_ZNK4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS8_11FileCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE4sizeEv:
  227|      2|  size_type size() const { return tree_.size(); }
_ZNK4absl12lts_2024011618container_internal15btree_containerINS1_5btreeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS8_11FileCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEE8key_compEv:
  260|     12|  key_compare key_comp() const { return key_compare(tree_.key_comp()); }

_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEEvE7elementIS8_EEDTclsrT_7elementfp_EEPS7_:
   75|     16|      -> decltype(P::element(slot)) {
   76|     16|    return P::element(slot);
   77|     16|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEEvE9constructINSt3__19allocatorIS7_EEJRKS7_EEEvPT_PS7_DpOT0_:
   42|      1|  static void construct(Alloc* alloc, slot_type* slot, Args&&... args) {
   43|      1|    Policy::construct(alloc, slot, std::forward<Args>(args)...);
   44|      1|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEEvE7destroyINSt3__19allocatorIS8_EEEEvPT_PS8_:
   49|      4|  static void destroy(Alloc* alloc, slot_type* slot) {
   50|      4|    Policy::destroy(alloc, slot);
   51|      4|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEEvE7destroyINSt3__19allocatorIS6_EEEEvPT_PS6_:
   49|  1.79k|  static void destroy(Alloc* alloc, slot_type* slot) {
   50|  1.79k|    Policy::destroy(alloc, slot);
   51|  1.79k|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEEvE7destroyINSt3__19allocatorIS8_EEEEvPT_PS8_:
   49|    134|  static void destroy(Alloc* alloc, slot_type* slot) {
   50|    134|    Policy::destroy(alloc, slot);
   51|    134|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEEvE7destroyINSt3__19allocatorIS8_EEEEvPT_PS8_:
   49|    120|  static void destroy(Alloc* alloc, slot_type* slot) {
   50|    120|    Policy::destroy(alloc, slot);
   51|    120|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEEvE7elementIS7_EEDTclsrT_7elementfp_EEPS6_:
   75|  3.85k|      -> decltype(P::element(slot)) {
   76|  3.85k|    return P::element(slot);
   77|  3.85k|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEEvE7elementIS9_EEDTclsrT_7elementfp_EEPS8_:
   75|     17|      -> decltype(P::element(slot)) {
   76|     17|    return P::element(slot);
   77|     17|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEEvE7elementIS9_EEDTclsrT_7elementfp_EEPS8_:
   75|    227|      -> decltype(P::element(slot)) {
   76|    227|    return P::element(slot);
   77|    227|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEEvE7elementIS9_EEDTclsrT_7elementfp_EEPS8_:
   75|    249|      -> decltype(P::element(slot)) {
   76|    249|    return P::element(slot);
   77|    249|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyINS0_11string_viewEEEvE7destroyINSt3__19allocatorIS4_EEEEvPT_PS4_:
   49|      3|  static void destroy(Alloc* alloc, slot_type* slot) {
   50|      3|    Policy::destroy(alloc, slot);
   51|      3|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEEvE7elementISF_EEDTclsrT_7elementfp_EEPNS1_13map_slot_typeISA_SE_EE:
   75|     36|      -> decltype(P::element(slot)) {
   76|     36|    return P::element(slot);
   77|     36|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEEvE8transferINS8_INS4_4pairIKSA_SE_EEEEEEvPT_PNS1_13map_slot_typeISA_SE_EESQ_:
   65|     50|  static void transfer(Alloc* alloc, slot_type* new_slot, slot_type* old_slot) {
   66|     50|    transfer_impl(alloc, new_slot, old_slot, Rank0{});
   67|     50|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEEvE13transfer_implINS8_INS4_4pairIKSA_SE_EEEESF_EEDTclsrT0_8transferfp_fp0_fp1_EEPT_PNS1_13map_slot_typeISA_SE_EESS_NSG_5Rank0E:
  101|     50|      -> decltype(P::transfer(alloc, new_slot, old_slot)) {
  102|     50|    return P::transfer(alloc, new_slot, old_slot);
  103|     50|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEEvE9constructINS8_INS4_4pairIKSA_SE_EEEEJRKNS4_21piecewise_construct_tENS4_5tupleIJRSJ_EEENSP_IJRKSE_EEEEEEvPT_PNS1_13map_slot_typeISA_SE_EEDpOT0_:
   42|     32|  static void construct(Alloc* alloc, slot_type* slot, Args&&... args) {
   43|     32|    Policy::construct(alloc, slot, std::forward<Args>(args)...);
   44|     32|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEEvE8transferINSt3__19allocatorIS8_EEEEvPT_PS8_SH_:
   65|    134|  static void transfer(Alloc* alloc, slot_type* new_slot, slot_type* old_slot) {
   66|    134|    transfer_impl(alloc, new_slot, old_slot, Rank0{});
   67|    134|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEEvE13transfer_implINSt3__19allocatorIS8_EEEEvPT_PS8_SH_NSA_5Rank2E:
  124|    134|                            slot_type* old_slot, Rank2) {
  125|    134|    construct(alloc, new_slot, std::move(element(old_slot)));
  126|    134|    destroy(alloc, old_slot);
  127|    134|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEEvE9constructINSt3__19allocatorIS8_EEJS8_EEEvPT_PS8_DpOT0_:
   42|    134|  static void construct(Alloc* alloc, slot_type* slot, Args&&... args) {
   43|    134|    Policy::construct(alloc, slot, std::forward<Args>(args)...);
   44|    134|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEEvE9constructINSt3__19allocatorIS8_EEJRKPS6_EEEvPT_PS8_DpOT0_:
   42|     95|  static void construct(Alloc* alloc, slot_type* slot, Args&&... args) {
   43|     95|    Policy::construct(alloc, slot, std::forward<Args>(args)...);
   44|     95|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEEvE8transferINSt3__19allocatorIS6_EEEEvPT_PS6_SF_:
   65|  1.79k|  static void transfer(Alloc* alloc, slot_type* new_slot, slot_type* old_slot) {
   66|  1.79k|    transfer_impl(alloc, new_slot, old_slot, Rank0{});
   67|  1.79k|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEEvE13transfer_implINSt3__19allocatorIS6_EEEEvPT_PS6_SF_NS8_5Rank2E:
  124|  1.79k|                            slot_type* old_slot, Rank2) {
  125|  1.79k|    construct(alloc, new_slot, std::move(element(old_slot)));
  126|  1.79k|    destroy(alloc, old_slot);
  127|  1.79k|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEEvE9constructINSt3__19allocatorIS6_EEJS6_EEEvPT_PS6_DpOT0_:
   42|  1.79k|  static void construct(Alloc* alloc, slot_type* slot, Args&&... args) {
   43|  1.79k|    Policy::construct(alloc, slot, std::forward<Args>(args)...);
   44|  1.79k|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEEvE9constructINSt3__19allocatorIS6_EEJRKS6_EEEvPT_PS6_DpOT0_:
   42|  1.19k|  static void construct(Alloc* alloc, slot_type* slot, Args&&... args) {
   43|  1.19k|    Policy::construct(alloc, slot, std::forward<Args>(args)...);
   44|  1.19k|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEEvE8transferINSt3__19allocatorIS8_EEEEvPT_PS8_SH_:
   65|      4|  static void transfer(Alloc* alloc, slot_type* new_slot, slot_type* old_slot) {
   66|      4|    transfer_impl(alloc, new_slot, old_slot, Rank0{});
   67|      4|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEEvE13transfer_implINSt3__19allocatorIS8_EEEEvPT_PS8_SH_NSA_5Rank2E:
  124|      4|                            slot_type* old_slot, Rank2) {
  125|      4|    construct(alloc, new_slot, std::move(element(old_slot)));
  126|      4|    destroy(alloc, old_slot);
  127|      4|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEEvE9constructINSt3__19allocatorIS8_EEJS8_EEEvPT_PS8_DpOT0_:
   42|      4|  static void construct(Alloc* alloc, slot_type* slot, Args&&... args) {
   43|      4|    Policy::construct(alloc, slot, std::forward<Args>(args)...);
   44|      4|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEEvE9constructINSt3__19allocatorIS8_EEJRKS8_EEEvPT_PS8_DpOT0_:
   42|      4|  static void construct(Alloc* alloc, slot_type* slot, Args&&... args) {
   43|      4|    Policy::construct(alloc, slot, std::forward<Args>(args)...);
   44|      4|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEEvE8transferINSt3__19allocatorIS8_EEEEvPT_PS8_SH_:
   65|    120|  static void transfer(Alloc* alloc, slot_type* new_slot, slot_type* old_slot) {
   66|    120|    transfer_impl(alloc, new_slot, old_slot, Rank0{});
   67|    120|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEEvE13transfer_implINSt3__19allocatorIS8_EEEEvPT_PS8_SH_NSA_5Rank2E:
  124|    120|                            slot_type* old_slot, Rank2) {
  125|    120|    construct(alloc, new_slot, std::move(element(old_slot)));
  126|    120|    destroy(alloc, old_slot);
  127|    120|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEEvE9constructINSt3__19allocatorIS8_EEJS8_EEEvPT_PS8_DpOT0_:
   42|    120|  static void construct(Alloc* alloc, slot_type* slot, Args&&... args) {
   43|    120|    Policy::construct(alloc, slot, std::forward<Args>(args)...);
   44|    120|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEEvE9constructINSt3__19allocatorIS8_EEJRKPS6_EEEvPT_PS8_DpOT0_:
   42|    108|  static void construct(Alloc* alloc, slot_type* slot, Args&&... args) {
   43|    108|    Policy::construct(alloc, slot, std::forward<Args>(args)...);
   44|    108|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_15map_slot_policyINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorEEEvE9constructINS4_9allocatorINS5_IKSB_SE_EEEEJSK_EEEvPT_PNS1_13map_slot_typeISB_SE_EEDpOT0_:
   42|      1|  static void construct(Alloc* alloc, slot_type* slot, Args&&... args) {
   43|      1|    Policy::construct(alloc, slot, std::forward<Args>(args)...);
   44|      1|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_15map_slot_policyINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorEEEvE7elementISF_EEDTclsrT_7elementfp_EEPNS1_13map_slot_typeISB_SE_EE:
   75|      1|      -> decltype(P::element(slot)) {
   76|      1|    return P::element(slot);
   77|      1|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEEvE7elementISI_EEDTclsrT_7elementfp_EEPNS1_13map_slot_typeISA_SH_EE:
   75|    474|      -> decltype(P::element(slot)) {
   76|    474|    return P::element(slot);
   77|    474|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEEvE8transferINS8_INS4_4pairIKSA_SH_EEEEEEvPT_PNS1_13map_slot_typeISA_SH_EEST_:
   65|      4|  static void transfer(Alloc* alloc, slot_type* new_slot, slot_type* old_slot) {
   66|      4|    transfer_impl(alloc, new_slot, old_slot, Rank0{});
   67|      4|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEEvE13transfer_implINS8_INS4_4pairIKSA_SH_EEEESI_EEDTclsrT0_8transferfp_fp0_fp1_EEPT_PNS1_13map_slot_typeISA_SH_EESV_NSJ_5Rank0E:
  101|      4|      -> decltype(P::transfer(alloc, new_slot, old_slot)) {
  102|      4|    return P::transfer(alloc, new_slot, old_slot);
  103|      4|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEEvE9constructINS8_INS4_4pairIKSA_SH_EEEEJRKNS4_21piecewise_construct_tENS4_5tupleIJOSA_EEENSS_IJEEEEEEvPT_PNS1_13map_slot_typeISA_SH_EEDpOT0_:
   42|      4|  static void construct(Alloc* alloc, slot_type* slot, Args&&... args) {
   43|      4|    Policy::construct(alloc, slot, std::forward<Args>(args)...);
   44|      4|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyINS0_11string_viewEEEvE9constructINSt3__19allocatorIS4_EEJRKNS8_12basic_stringIcNS8_11char_traitsIcEENS9_IcEEEEEEEvPT_PS4_DpOT0_:
   42|      3|  static void construct(Alloc* alloc, slot_type* slot, Args&&... args) {
   43|      3|    Policy::construct(alloc, slot, std::forward<Args>(args)...);
   44|      3|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryEEEvE8transferINSt3__19allocatorIS8_EEEEvPT_PS8_SH_:
   65|      4|  static void transfer(Alloc* alloc, slot_type* new_slot, slot_type* old_slot) {
   66|      4|    transfer_impl(alloc, new_slot, old_slot, Rank0{});
   67|      4|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryEEEvE13transfer_implINSt3__19allocatorIS8_EEEEvPT_PS8_SH_NSA_5Rank2E:
  124|      4|                            slot_type* old_slot, Rank2) {
  125|      4|    construct(alloc, new_slot, std::move(element(old_slot)));
  126|      4|    destroy(alloc, old_slot);
  127|      4|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryEEEvE9constructINSt3__19allocatorIS8_EEJS8_EEEvPT_PS8_DpOT0_:
   42|     10|  static void construct(Alloc* alloc, slot_type* slot, Args&&... args) {
   43|     10|    Policy::construct(alloc, slot, std::forward<Args>(args)...);
   44|     10|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryEEEvE7elementIS9_EEDTclsrT_7elementfp_EEPS8_:
   75|     11|      -> decltype(P::element(slot)) {
   76|     11|    return P::element(slot);
   77|     11|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryEEEvE7destroyINSt3__19allocatorIS8_EEEEvPT_PS8_:
   49|      8|  static void destroy(Alloc* alloc, slot_type* slot) {
   50|      8|    Policy::destroy(alloc, slot);
   51|      8|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryEEEvE9constructINSt3__19allocatorIS8_EEJS8_EEEvPT_PS8_DpOT0_:
   42|      1|  static void construct(Alloc* alloc, slot_type* slot, Args&&... args) {
   43|      1|    Policy::construct(alloc, slot, std::forward<Args>(args)...);
   44|      1|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryEEEvE7elementIS9_EEDTclsrT_7elementfp_EEPS8_:
   75|      1|      -> decltype(P::element(slot)) {
   76|      1|    return P::element(slot);
   77|      1|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryEEEvE7destroyINSt3__19allocatorIS8_EEEEvPT_PS8_:
   49|      1|  static void destroy(Alloc* alloc, slot_type* slot) {
   50|      1|    Policy::destroy(alloc, slot);
   51|      1|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryEEEvE7elementIS9_EEDTclsrT_7elementfp_EEPKS8_:
   79|    108|  static auto element(const slot_type* slot) -> decltype(P::element(slot)) {
   80|    108|    return P::element(slot);
   81|    108|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryEEEvE8transferINSt3__19allocatorIS8_EEEEvPT_PS8_SH_:
   65|    235|  static void transfer(Alloc* alloc, slot_type* new_slot, slot_type* old_slot) {
   66|    235|    transfer_impl(alloc, new_slot, old_slot, Rank0{});
   67|    235|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryEEEvE13transfer_implINSt3__19allocatorIS8_EEEEvPT_PS8_SH_NSA_5Rank2E:
  124|    235|                            slot_type* old_slot, Rank2) {
  125|    235|    construct(alloc, new_slot, std::move(element(old_slot)));
  126|    235|    destroy(alloc, old_slot);
  127|    235|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryEEEvE9constructINSt3__19allocatorIS8_EEJS8_EEEvPT_PS8_DpOT0_:
   42|    235|  static void construct(Alloc* alloc, slot_type* slot, Args&&... args) {
   43|    235|    Policy::construct(alloc, slot, std::forward<Args>(args)...);
   44|    235|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryEEEvE7elementIS9_EEDTclsrT_7elementfp_EEPS8_:
   75|    323|      -> decltype(P::element(slot)) {
   76|    323|    return P::element(slot);
   77|    323|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryEEEvE7destroyINSt3__19allocatorIS8_EEEEvPT_PS8_:
   49|    288|  static void destroy(Alloc* alloc, slot_type* slot) {
   50|    288|    Policy::destroy(alloc, slot);
   51|    288|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryEEEvE9constructINSt3__19allocatorIS8_EEJPS8_EEEvPT_SF_DpOT0_:
   42|      8|  static void construct(Alloc* alloc, slot_type* slot, Args&&... args) {
   43|      8|    Policy::construct(alloc, slot, std::forward<Args>(args)...);
   44|      8|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_15set_slot_policyIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryEEEvE9constructINSt3__19allocatorIS8_EEJRKS8_EEEvPT_PS8_DpOT0_:
   42|     64|  static void construct(Alloc* alloc, slot_type* slot, Args&&... args) {
   43|     64|    Policy::construct(alloc, slot, std::forward<Args>(args)...);
   44|     64|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEEvE7destroyINSt3__19allocatorIS9_EEEEvPT_PS9_:
   49|      5|  static void destroy(Alloc* alloc, slot_type* slot) {
   50|      5|    Policy::destroy(alloc, slot);
   51|      5|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEEvE7elementISA_EEDTclsrT_7elementfp_EEPS9_:
   75|      7|      -> decltype(P::element(slot)) {
   76|      7|    return P::element(slot);
   77|      7|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEEvE8transferINSt3__19allocatorIS9_EEEEvPT_PS9_SI_:
   65|      5|  static void transfer(Alloc* alloc, slot_type* new_slot, slot_type* old_slot) {
   66|      5|    transfer_impl(alloc, new_slot, old_slot, Rank0{});
   67|      5|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEEvE13transfer_implINSt3__19allocatorIS9_EEEEvPT_PS9_SI_NSB_5Rank2E:
  124|      5|                            slot_type* old_slot, Rank2) {
  125|      5|    construct(alloc, new_slot, std::move(element(old_slot)));
  126|      5|    destroy(alloc, old_slot);
  127|      5|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEEvE9constructINSt3__19allocatorIS9_EEJS9_EEEvPT_PS9_DpOT0_:
   42|      5|  static void construct(Alloc* alloc, slot_type* slot, Args&&... args) {
   43|      5|    Policy::construct(alloc, slot, std::forward<Args>(args)...);
   44|      5|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEEvE9constructINSt3__19allocatorIS9_EEJRKS9_EEEvPT_PS9_DpOT0_:
   42|      6|  static void construct(Alloc* alloc, slot_type* slot, Args&&... args) {
   43|      6|    Policy::construct(alloc, slot, std::forward<Args>(args)...);
   44|      6|  }

_ZNKR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_12CommonFieldsELm0ELb0EE3getEv:
   91|  16.3k|  constexpr const T& get() const& { return value; }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_12CommonFieldsELm0ELb0EE3getEv:
   92|  19.4k|  T& get() & { return value; }
extension_set.cc:_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf8internal12_GLOBAL__N_115ExtensionHasherENS7_11ExtensionEqENSt3__19allocatorINS6_13ExtensionInfoEEEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISE_XT_EE4typeEv:
  246|     60|  constexpr const ElemT<I>& get() const& {
  247|     60|    return StorageT<I>::get();
  248|     60|  }
extension_set.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf8internal12_GLOBAL__N_115ExtensionHasherENS7_11ExtensionEqENSt3__19allocatorINS6_13ExtensionInfoEEEEE3getILi0EEERNS1_25internal_compressed_tuple4ElemISE_XT_EE4typeEv:
  241|     29|  ElemT<I>& get() & {
  242|     29|    return StorageT<I>::get();
  243|     29|  }
extension_set.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf8internal12_GLOBAL__N_115ExtensionHasherENS7_11ExtensionEqENSt3__19allocatorINS6_13ExtensionInfoEEEEE3getILi2EEERNS1_25internal_compressed_tuple4ElemISE_XT_EE4typeEv:
  241|      8|  ElemT<I>& get() & {
  242|      8|    return StorageT<I>::get();
  243|      8|  }
extension_set.cc:_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf8internal12_GLOBAL__N_111ExtensionEqELm2ELb1EE3getEv:
  106|      8|  T& get() & { return *this; }
extension_set.cc:_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf8internal12_GLOBAL__N_115ExtensionHasherENS7_11ExtensionEqENSt3__19allocatorINS6_13ExtensionInfoEEEEE3getILi1EEERKNS1_25internal_compressed_tuple4ElemISE_XT_EE4typeEv:
  246|      8|  constexpr const ElemT<I>& get() const& {
  247|      8|    return StorageT<I>::get();
  248|      8|  }
extension_set.cc:_ZNKR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf8internal12_GLOBAL__N_115ExtensionHasherELm1ELb1EE3getEv:
  105|      8|  constexpr const T& get() const& { return *this; }
extension_set.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf8internal12_GLOBAL__N_115ExtensionHasherENS7_11ExtensionEqENSt3__19allocatorINS6_13ExtensionInfoEEEEE3getILi3EEERNS1_25internal_compressed_tuple4ElemISE_XT_EE4typeEv:
  241|      2|  ElemT<I>& get() & {
  242|      2|    return StorageT<I>::get();
  243|      2|  }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorIN6google8protobuf8internal13ExtensionInfoEEELm3ELb1EE3getEv:
  106|      2|  T& get() & { return *this; }
extension_set.cc:_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf8internal12_GLOBAL__N_115ExtensionHasherENS7_11ExtensionEqENSt3__19allocatorINS6_13ExtensionInfoEEEEEC2IS3_JS8_S9_SD_ETnNSA_9enable_ifIXsr4absl11conjunctionINS0_8negationINSA_7is_sameIFvSE_EFvNSA_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISE_JSL_DpT0_EEEEE5valueEbE4typeELb1EEEOSL_DpOST_:
  236|      1|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      1|                                             absl::forward<First>(first),
  238|      1|                                             absl::forward<Vs>(base)...) {}
extension_set.cc:_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf8internal12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorINS8_13ExtensionInfoEEEEEENSC_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_SA_SB_SF_EEENS0_10in_place_tEDpOT_:
  126|      4|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_12CommonFieldsELm0ELb0EEC2IS4_EENS0_10in_place_tEOT_:
   90|    150|      : value(absl::forward<V>(v)) {}
extension_set.cc:_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf8internal12_GLOBAL__N_115ExtensionHasherELm1ELb1EEC2IS8_EENS0_10in_place_tEOT_:
  103|      1|      : T(absl::forward<V>(v)) {}
extension_set.cc:_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf8internal12_GLOBAL__N_111ExtensionEqELm2ELb1EEC2IS8_EENS0_10in_place_tEOT_:
  103|      1|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorIN6google8protobuf8internal13ExtensionInfoEEELm3ELb1EEC2ISA_EENS0_10in_place_tEOT_:
  103|      1|      : T(absl::forward<V>(v)) {}
extension_set.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf8internal12_GLOBAL__N_115ExtensionHasherENS7_11ExtensionEqENSt3__19allocatorINS6_13ExtensionInfoEEEEE3getILi1EEERNS1_25internal_compressed_tuple4ElemISE_XT_EE4typeEv:
  241|      1|  ElemT<I>& get() & {
  242|      1|    return StorageT<I>::get();
  243|      1|  }
extension_set.cc:_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf8internal12_GLOBAL__N_115ExtensionHasherELm1ELb1EE3getEv:
  106|      1|  T& get() & { return *this; }
_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_4pairIKNS6_12basic_stringIcNS6_11char_traitsIcEENS7_IcEEEENS6_10unique_ptrIN6google8protobuf10FeatureSetENS6_14default_deleteISI_EEEEEEEEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISO_XT_EE4typeEv:
  246|  1.21k|  constexpr const ElemT<I>& get() const& {
  247|  1.21k|    return StorageT<I>::get();
  248|  1.21k|  }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_4pairIKNS6_12basic_stringIcNS6_11char_traitsIcEENS7_IcEEEENS6_10unique_ptrIN6google8protobuf10FeatureSetENS6_14default_deleteISI_EEEEEEEEEE3getILi3EEERNS1_25internal_compressed_tuple4ElemISO_XT_EE4typeEv:
  241|     11|  ElemT<I>& get() & {
  242|     11|    return StorageT<I>::get();
  243|     11|  }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorINS4_4pairIKNS4_12basic_stringIcNS4_11char_traitsIcEENS5_IcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISG_EEEEEEEELm3ELb1EE3getEv:
  106|     11|  T& get() & { return *this; }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_4pairIKNS6_12basic_stringIcNS6_11char_traitsIcEENS7_IcEEEENS6_10unique_ptrIN6google8protobuf10FeatureSetENS6_14default_deleteISI_EEEEEEEEEE3getILi0EEERNS1_25internal_compressed_tuple4ElemISO_XT_EE4typeEv:
  241|    520|  ElemT<I>& get() & {
  242|    520|    return StorageT<I>::get();
  243|    520|  }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_19key_compare_adapterINSt3__14lessINS4_4pairIPKN6google8protobuf10DescriptorEiEEEESC_E15checked_compareENS4_9allocatorINS6_IKSC_PKNS8_15FieldDescriptorEEEEEPNS1_10btree_nodeINS1_10map_paramsISC_SK_SD_SM_Li256ELb0EEEEEEE3getILi1EEERNS1_25internal_compressed_tuple4ElemISS_XT_EE4typeEv:
  241|      2|  ElemT<I>& get() & {
  242|      2|    return StorageT<I>::get();
  243|      2|  }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorINS4_4pairIKNS6_IPKN6google8protobuf10DescriptorEiEEPKNS8_15FieldDescriptorEEEEELm1ELb1EE3getEv:
  106|      2|  T& get() & { return *this; }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_19key_compare_adapterINSt3__14lessINS4_4pairIPKN6google8protobuf10DescriptorEiEEEESC_E15checked_compareENS4_9allocatorINS6_IKSC_PKNS8_15FieldDescriptorEEEEEPNS1_10btree_nodeINS1_10map_paramsISC_SK_SD_SM_Li256ELb0EEEEEEE3getILi2EEERNS1_25internal_compressed_tuple4ElemISS_XT_EE4typeEv:
  241|      1|  ElemT<I>& get() & {
  242|      1|    return StorageT<I>::get();
  243|      1|  }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIPNS1_10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS9_15FieldDescriptorENS6_4lessISD_EENS6_9allocatorINS7_IKSD_SG_EEEELi256ELb0EEEEELm2ELb0EE3getEv:
   92|      1|  T& get() & { return value; }
descriptor.cc:_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_121DescriptorsByNameHashINS5_14FileDescriptorEEENS6_19DescriptorsByNameEqIS8_EENSt3__19allocatorIPKS8_EEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISH_XT_EE4typeEv:
  246|    107|  constexpr const ElemT<I>& get() const& {
  247|    107|    return StorageT<I>::get();
  248|    107|  }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_121DescriptorsByNameHashINS5_14FileDescriptorEEENS6_19DescriptorsByNameEqIS8_EENSt3__19allocatorIPKS8_EEEE3getILi3EEERNS1_25internal_compressed_tuple4ElemISH_XT_EE4typeEv:
  241|     11|  ElemT<I>& get() & {
  242|     11|    return StorageT<I>::get();
  243|     11|  }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorIPKN6google8protobuf14FileDescriptorEEELm3ELb1EE3getEv:
  106|     11|  T& get() & { return *this; }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_121DescriptorsByNameHashINS5_14FileDescriptorEEENS6_19DescriptorsByNameEqIS8_EENSt3__19allocatorIPKS8_EEEE3getILi0EEERNS1_25internal_compressed_tuple4ElemISH_XT_EE4typeEv:
  241|     76|  ElemT<I>& get() & {
  242|     76|    return StorageT<I>::get();
  243|     76|  }
descriptor.cc:_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_120SymbolByFullNameHashENS6_18SymbolByFullNameEqENSt3__19allocatorINS5_6SymbolEEEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISD_XT_EE4typeEv:
  246|  4.78k|  constexpr const ElemT<I>& get() const& {
  247|  4.78k|    return StorageT<I>::get();
  248|  4.78k|  }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_120SymbolByFullNameHashENS6_18SymbolByFullNameEqENSt3__19allocatorINS5_6SymbolEEEEE3getILi3EEERNS1_25internal_compressed_tuple4ElemISD_XT_EE4typeEv:
  241|  1.40k|  ElemT<I>& get() & {
  242|  1.40k|    return StorageT<I>::get();
  243|  1.40k|  }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorIN6google8protobuf6SymbolEEELm3ELb1EE3getEv:
  106|  3.01k|  T& get() & { return *this; }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_120SymbolByFullNameHashENS6_18SymbolByFullNameEqENSt3__19allocatorINS5_6SymbolEEEEE3getILi0EEERNS1_25internal_compressed_tuple4ElemISD_XT_EE4typeEv:
  241|  6.57k|  ElemT<I>& get() & {
  242|  6.57k|    return StorageT<I>::get();
  243|  6.57k|  }
_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_4pairIKNS6_12basic_stringIcNS6_11char_traitsIcEENS7_IcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEEEEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISL_XT_EE4typeEv:
  246|    444|  constexpr const ElemT<I>& get() const& {
  247|    444|    return StorageT<I>::get();
  248|    444|  }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_4pairIKNS6_12basic_stringIcNS6_11char_traitsIcEENS7_IcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEEEEEE3getILi3EEERNS1_25internal_compressed_tuple4ElemISL_XT_EE4typeEv:
  241|     84|  ElemT<I>& get() & {
  242|     84|    return StorageT<I>::get();
  243|     84|  }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorINS4_4pairIKNS4_12basic_stringIcNS4_11char_traitsIcEENS5_IcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEEEELm3ELb1EE3getEv:
  106|     84|  T& get() & { return *this; }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_4pairIKNS6_12basic_stringIcNS6_11char_traitsIcEENS7_IcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEEEEEE3getILi0EEERNS1_25internal_compressed_tuple4ElemISL_XT_EE4typeEv:
  241|    533|  ElemT<I>& get() & {
  242|    533|    return StorageT<I>::get();
  243|    533|  }
_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_12basic_stringIcNS6_11char_traitsIcEENS7_IcEEEEEEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISE_XT_EE4typeEv:
  246|     40|  constexpr const ElemT<I>& get() const& {
  247|     40|    return StorageT<I>::get();
  248|     40|  }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_12basic_stringIcNS6_11char_traitsIcEENS7_IcEEEEEEEE3getILi0EEERNS1_25internal_compressed_tuple4ElemISE_XT_EE4typeEv:
  241|     32|  ElemT<I>& get() & {
  242|     32|    return StorageT<I>::get();
  243|     32|  }
descriptor.cc:_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_116ParentNumberHashENS6_14ParentNumberEqENSt3__19allocatorIPKNS5_19EnumValueDescriptorEEEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISF_XT_EE4typeEv:
  246|    817|  constexpr const ElemT<I>& get() const& {
  247|    817|    return StorageT<I>::get();
  248|    817|  }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_116ParentNumberHashENS6_14ParentNumberEqENSt3__19allocatorIPKNS5_19EnumValueDescriptorEEEEE3getILi3EEERNS1_25internal_compressed_tuple4ElemISF_XT_EE4typeEv:
  241|    235|  ElemT<I>& get() & {
  242|    235|    return StorageT<I>::get();
  243|    235|  }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorIPKN6google8protobuf19EnumValueDescriptorEEELm3ELb1EE3getEv:
  106|    235|  T& get() & { return *this; }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_116ParentNumberHashENS6_14ParentNumberEqENSt3__19allocatorIPKNS5_19EnumValueDescriptorEEEEE3getILi0EEERNS1_25internal_compressed_tuple4ElemISF_XT_EE4typeEv:
  241|  1.13k|  ElemT<I>& get() & {
  242|  1.13k|    return StorageT<I>::get();
  243|  1.13k|  }
descriptor.cc:_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_116ParentNumberHashENS6_14ParentNumberEqENSt3__19allocatorIPKNS5_15FieldDescriptorEEEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISF_XT_EE4typeEv:
  246|    926|  constexpr const ElemT<I>& get() const& {
  247|    926|    return StorageT<I>::get();
  248|    926|  }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_116ParentNumberHashENS6_14ParentNumberEqENSt3__19allocatorIPKNS5_15FieldDescriptorEEEEE3getILi3EEERNS1_25internal_compressed_tuple4ElemISF_XT_EE4typeEv:
  241|    233|  ElemT<I>& get() & {
  242|    233|    return StorageT<I>::get();
  243|    233|  }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorIPKN6google8protobuf15FieldDescriptorEEELm3ELb1EE3getEv:
  106|    233|  T& get() & { return *this; }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_116ParentNumberHashENS6_14ParentNumberEqENSt3__19allocatorIPKNS5_15FieldDescriptorEEEEE3getILi0EEERNS1_25internal_compressed_tuple4ElemISF_XT_EE4typeEv:
  241|  1.22k|  ElemT<I>& get() & {
  242|  1.22k|    return StorageT<I>::get();
  243|  1.22k|  }
descriptor.cc:_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_118SymbolByParentHashENS6_16SymbolByParentEqENSt3__19allocatorINS5_6SymbolEEEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISD_XT_EE4typeEv:
  246|  5.66k|  constexpr const ElemT<I>& get() const& {
  247|  5.66k|    return StorageT<I>::get();
  248|  5.66k|  }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_118SymbolByParentHashENS6_16SymbolByParentEqENSt3__19allocatorINS5_6SymbolEEEEE3getILi3EEERNS1_25internal_compressed_tuple4ElemISD_XT_EE4typeEv:
  241|  1.61k|  ElemT<I>& get() & {
  242|  1.61k|    return StorageT<I>::get();
  243|  1.61k|  }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_118SymbolByParentHashENS6_16SymbolByParentEqENSt3__19allocatorINS5_6SymbolEEEEE3getILi0EEERNS1_25internal_compressed_tuple4ElemISD_XT_EE4typeEv:
  241|  8.04k|  ElemT<I>& get() & {
  242|  8.04k|    return StorageT<I>::get();
  243|  8.04k|  }
_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_6HashEqIPKN6google8protobuf14FileDescriptorEvE4HashENSA_2EqENSt3__19allocatorINSD_4pairIKS9_NSD_6vectorINS6_14DescriptorPool18DeferredValidation13LifetimesInfoENSE_ISK_EEEEEEEEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISP_XT_EE4typeEv:
  246|     12|  constexpr const ElemT<I>& get() const& {
  247|     12|    return StorageT<I>::get();
  248|     12|  }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_6HashEqIPKN6google8protobuf14FileDescriptorEvE4HashELm1ELb1EE3getEv:
  106|    103|  T& get() & { return *this; }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_120SymbolByFullNameHashENS6_18SymbolByFullNameEqENSt3__19allocatorINS5_6SymbolEEEEE3getILi2EEERNS1_25internal_compressed_tuple4ElemISD_XT_EE4typeEv:
  241|    149|  ElemT<I>& get() & {
  242|    149|    return StorageT<I>::get();
  243|    149|  }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf12_GLOBAL__N_118SymbolByFullNameEqELm2ELb1EE3getEv:
  106|    149|  T& get() & { return *this; }
descriptor.cc:_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_120SymbolByFullNameHashENS6_18SymbolByFullNameEqENSt3__19allocatorINS5_6SymbolEEEEE3getILi1EEERKNS1_25internal_compressed_tuple4ElemISD_XT_EE4typeEv:
  246|    111|  constexpr const ElemT<I>& get() const& {
  247|    111|    return StorageT<I>::get();
  248|    111|  }
descriptor.cc:_ZNKR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf12_GLOBAL__N_120SymbolByFullNameHashELm1ELb1EE3getEv:
  105|    111|  constexpr const T& get() const& { return *this; }
_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_6HashEqIPKN6google8protobuf14FileDescriptorEvE4HashENSA_2EqENSt3__19allocatorINSD_4pairIKS9_NSD_6vectorINS6_14DescriptorPool18DeferredValidation13LifetimesInfoENSE_ISK_EEEEEEEEEEC2IS3_JSB_SC_SO_ETnNSD_9enable_ifIXsr4absl11conjunctionINS0_8negationINSD_7is_sameIFvSP_EFvNSD_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISP_JSW_DpT0_EEEEE5valueEbE4typeELb1EEEOSW_DpOS14_:
  236|      4|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      4|                                             absl::forward<First>(first),
  238|      4|                                             absl::forward<Vs>(base)...) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsENS1_6HashEqIPKN6google8protobuf14FileDescriptorEvE4HashENSC_2EqENSt3__19allocatorINSF_4pairIKSB_NSF_6vectorINS8_14DescriptorPool18DeferredValidation13LifetimesInfoENSG_ISM_EEEEEEEEEEENSF_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_SD_SE_SQ_EEENS0_10in_place_tEDpOT_:
  126|     16|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_6HashEqIPKN6google8protobuf14FileDescriptorEvE4HashELm1ELb1EEC2ISB_EENS0_10in_place_tEOT_:
  103|     12|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_6HashEqIPKN6google8protobuf14FileDescriptorEvE2EqELm2ELb1EEC2ISB_EENS0_10in_place_tEOT_:
  103|     12|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorINS4_4pairIKPKN6google8protobuf14FileDescriptorENS4_6vectorINS8_14DescriptorPool18DeferredValidation13LifetimesInfoENS5_ISG_EEEEEEEELm3ELb1EEC2ISK_EENS0_10in_place_tEOT_:
  103|      4|      : T(absl::forward<V>(v)) {}
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_10StringHashELm1ELb1EE3getEv:
  106|    349|  T& get() & { return *this; }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_8StringEqELm2ELb1EE3getEv:
  106|    242|  T& get() & { return *this; }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_121DescriptorsByNameHashINS5_14FileDescriptorEEENS6_19DescriptorsByNameEqIS8_EENSt3__19allocatorIPKS8_EEEE3getILi2EEERNS1_25internal_compressed_tuple4ElemISH_XT_EE4typeEv:
  241|      8|  ElemT<I>& get() & {
  242|      8|    return StorageT<I>::get();
  243|      8|  }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf12_GLOBAL__N_119DescriptorsByNameEqINS5_14FileDescriptorEEELm2ELb1EE3getEv:
  106|      8|  T& get() & { return *this; }
descriptor.cc:_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_121DescriptorsByNameHashINS5_14FileDescriptorEEENS6_19DescriptorsByNameEqIS8_EENSt3__19allocatorIPKS8_EEEE3getILi1EEERKNS1_25internal_compressed_tuple4ElemISH_XT_EE4typeEv:
  246|     13|  constexpr const ElemT<I>& get() const& {
  247|     13|    return StorageT<I>::get();
  248|     13|  }
descriptor.cc:_ZNKR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf12_GLOBAL__N_121DescriptorsByNameHashINS5_14FileDescriptorEEELm1ELb1EE3getEv:
  105|     13|  constexpr const T& get() const& { return *this; }
_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_19key_compare_adapterINSt3__14lessINS4_4pairIPKN6google8protobuf10DescriptorEiEEEESC_E15checked_compareENS4_9allocatorINS6_IKSC_PKNS8_15FieldDescriptorEEEEEPNS1_10btree_nodeINS1_10map_paramsISC_SK_SD_SM_Li256ELb0EEEEEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISS_XT_EE4typeEv:
  246|      1|  constexpr const ElemT<I>& get() const& {
  247|      1|    return StorageT<I>::get();
  248|      1|  }
_ZNKR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_19key_compare_adapterINSt3__14lessINS5_4pairIPKN6google8protobuf10DescriptorEiEEEESD_E15checked_compareELm0ELb1EE3getEv:
  105|      1|  constexpr const T& get() const& { return *this; }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_116ParentNumberHashENS6_14ParentNumberEqENSt3__19allocatorIPKNS5_15FieldDescriptorEEEEE3getILi2EEERNS1_25internal_compressed_tuple4ElemISF_XT_EE4typeEv:
  241|      9|  ElemT<I>& get() & {
  242|      9|    return StorageT<I>::get();
  243|      9|  }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf12_GLOBAL__N_114ParentNumberEqELm2ELb1EE3getEv:
  106|     12|  T& get() & { return *this; }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_118SymbolByParentHashENS6_16SymbolByParentEqENSt3__19allocatorINS5_6SymbolEEEEE3getILi2EEERNS1_25internal_compressed_tuple4ElemISD_XT_EE4typeEv:
  241|     51|  ElemT<I>& get() & {
  242|     51|    return StorageT<I>::get();
  243|     51|  }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf12_GLOBAL__N_116SymbolByParentEqELm2ELb1EE3getEv:
  106|     51|  T& get() & { return *this; }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_116ParentNumberHashENS6_14ParentNumberEqENSt3__19allocatorIPKNS5_19EnumValueDescriptorEEEEE3getILi2EEERNS1_25internal_compressed_tuple4ElemISF_XT_EE4typeEv:
  241|      3|  ElemT<I>& get() & {
  242|      3|    return StorageT<I>::get();
  243|      3|  }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_116ParentNumberHashENS6_14ParentNumberEqENSt3__19allocatorIPKNS5_19EnumValueDescriptorEEEEE3getILi1EEERNS1_25internal_compressed_tuple4ElemISF_XT_EE4typeEv:
  241|    207|  ElemT<I>& get() & {
  242|    207|    return StorageT<I>::get();
  243|    207|  }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf12_GLOBAL__N_116ParentNumberHashELm1ELb1EE3getEv:
  106|    413|  T& get() & { return *this; }
_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS0_13hash_internal4HashIiEENSt3__18equal_toIiEENS7_9allocatorIiEEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISC_XT_EE4typeEv:
  246|      4|  constexpr const ElemT<I>& get() const& {
  247|      4|    return StorageT<I>::get();
  248|      4|  }
_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_6HashEqIPKN6google8protobuf14FileDescriptorEvE4HashENSA_2EqENSt3__19allocatorIS9_EEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISG_XT_EE4typeEv:
  246|    333|  constexpr const ElemT<I>& get() const& {
  247|    333|    return StorageT<I>::get();
  248|    333|  }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_6HashEqIPKN6google8protobuf14FileDescriptorEvE4HashENSA_2EqENSt3__19allocatorIS9_EEEE3getILi0EEERNS1_25internal_compressed_tuple4ElemISG_XT_EE4typeEv:
  241|    327|  ElemT<I>& get() & {
  242|    327|    return StorageT<I>::get();
  243|    327|  }
_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_6HashEqIPKN6google8protobuf10DescriptorEvE4HashENSA_2EqENSt3__19allocatorINSD_4pairIKS9_NS6_17DescriptorBuilder12MessageHintsEEEEEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISL_XT_EE4typeEv:
  246|      8|  constexpr const ElemT<I>& get() const& {
  247|      8|    return StorageT<I>::get();
  248|      8|  }
_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS0_11string_viewEEEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISA_XT_EE4typeEv:
  246|  1.82k|  constexpr const ElemT<I>& get() const& {
  247|  1.82k|    return StorageT<I>::get();
  248|  1.82k|  }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS0_11string_viewEEEEE3getILi3EEERNS1_25internal_compressed_tuple4ElemISA_XT_EE4typeEv:
  241|     12|  ElemT<I>& get() & {
  242|     12|    return StorageT<I>::get();
  243|     12|  }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorINS0_11string_viewEEELm3ELb1EE3getEv:
  106|     12|  T& get() & { return *this; }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS0_11string_viewEEEEE3getILi0EEERNS1_25internal_compressed_tuple4ElemISA_XT_EE4typeEv:
  241|    896|  ElemT<I>& get() & {
  242|    896|    return StorageT<I>::get();
  243|    896|  }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS0_11string_viewEEEEE3getILi1EEERNS1_25internal_compressed_tuple4ElemISA_XT_EE4typeEv:
  241|      3|  ElemT<I>& get() & {
  242|      3|    return StorageT<I>::get();
  243|      3|  }
_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS0_11string_viewEEEEE3getILi1EEERKNS1_25internal_compressed_tuple4ElemISA_XT_EE4typeEv:
  246|    424|  constexpr const ElemT<I>& get() const& {
  247|    424|    return StorageT<I>::get();
  248|    424|  }
_ZNKR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_10StringHashELm1ELb1EE3getEv:
  105|    432|  constexpr const T& get() const& { return *this; }
_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS0_13hash_internal4HashINSt3__16vectorIiNS6_9allocatorIiEEEEEENS6_8equal_toISA_EENS8_INS6_4pairIKSA_iEEEEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISI_XT_EE4typeEv:
  246|      4|  constexpr const ElemT<I>& get() const& {
  247|      4|    return StorageT<I>::get();
  248|      4|  }
_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS0_13hash_internal4HashINSt3__16vectorIiNS6_9allocatorIiEEEEEENS6_8equal_toISA_EENS8_INS6_4pairIKSA_SA_EEEEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISI_XT_EE4typeEv:
  246|      4|  constexpr const ElemT<I>& get() const& {
  247|      4|    return StorageT<I>::get();
  248|      4|  }
_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_12basic_stringIcNS6_11char_traitsIcEENS7_IcEEEEEEEEC2IS3_JS4_S5_SD_ETnNS6_9enable_ifIXsr4absl11conjunctionINS0_8negationINS6_7is_sameIFvSE_EFvNS6_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISE_JSL_DpT0_EEEEE5valueEbE4typeELb1EEEOSL_DpOST_:
  236|      4|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      4|                                             absl::forward<First>(first),
  238|      4|                                             absl::forward<Vs>(base)...) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS8_12basic_stringIcNS8_11char_traitsIcEENS9_IcEEEEEEEEENS8_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_S6_S7_SF_EEENS0_10in_place_tEDpOT_:
  126|     16|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_10StringHashELm1ELb1EEC2IS4_EENS0_10in_place_tEOT_:
  103|     89|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_8StringEqELm2ELb1EEC2IS4_EENS0_10in_place_tEOT_:
  103|     89|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorINS4_12basic_stringIcNS4_11char_traitsIcEENS5_IcEEEEEELm3ELb1EEC2ISB_EENS0_10in_place_tEOT_:
  103|      4|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_6HashEqIPKN6google8protobuf10DescriptorEvE4HashENSA_2EqENSt3__19allocatorIS9_EEEEC2IS3_JSB_SC_SF_ETnNSD_9enable_ifIXsr4absl11conjunctionINS0_8negationINSD_7is_sameIFvSG_EFvNSD_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISG_JSN_DpT0_EEEEE5valueEbE4typeELb1EEEOSN_DpOSV_:
  236|      2|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      2|                                             absl::forward<First>(first),
  238|      2|                                             absl::forward<Vs>(base)...) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsENS1_6HashEqIPKN6google8protobuf10DescriptorEvE4HashENSC_2EqENSt3__19allocatorISB_EEEEENSF_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_SD_SE_SH_EEENS0_10in_place_tEDpOT_:
  126|      8|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_6HashEqIPKN6google8protobuf10DescriptorEvE4HashELm1ELb1EEC2ISB_EENS0_10in_place_tEOT_:
  103|     14|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_6HashEqIPKN6google8protobuf10DescriptorEvE2EqELm2ELb1EEC2ISB_EENS0_10in_place_tEOT_:
  103|     14|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorIPKN6google8protobuf10DescriptorEEELm3ELb1EEC2ISB_EENS0_10in_place_tEOT_:
  103|      2|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_4pairIKNS6_12basic_stringIcNS6_11char_traitsIcEENS7_IcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEEEEEEC2IS3_JS4_S5_SK_ETnNS6_9enable_ifIXsr4absl11conjunctionINS0_8negationINS6_7is_sameIFvSL_EFvNS6_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISL_JSS_DpT0_EEEEE5valueEbE4typeELb1EEEOSS_DpOS10_:
  236|      2|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      2|                                             absl::forward<First>(first),
  238|      2|                                             absl::forward<Vs>(base)...) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS8_4pairIKNS8_12basic_stringIcNS8_11char_traitsIcEENS9_IcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEEEEEEENS8_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_S6_S7_SM_EEENS0_10in_place_tEDpOT_:
  126|      8|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorINS4_4pairIKNS4_12basic_stringIcNS4_11char_traitsIcEENS5_IcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEEEELm3ELb1EEC2ISI_EENS0_10in_place_tEOT_:
  103|      2|      : T(absl::forward<V>(v)) {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_120SymbolByFullNameHashENS6_18SymbolByFullNameEqENSt3__19allocatorINS5_6SymbolEEEEEC2IS3_JS7_S8_SC_ETnNS9_9enable_ifIXsr4absl11conjunctionINS0_8negationINS9_7is_sameIFvSD_EFvNS9_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISD_JSK_DpT0_EEEEE5valueEbE4typeELb1EEEOSK_DpOSS_:
  236|      2|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      2|                                             absl::forward<First>(first),
  238|      2|                                             absl::forward<Vs>(base)...) {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorINS7_6SymbolEEEEEENSB_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_S9_SA_SE_EEENS0_10in_place_tEDpOT_:
  126|      8|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf12_GLOBAL__N_120SymbolByFullNameHashELm1ELb1EEC2IS7_EENS0_10in_place_tEOT_:
  103|      2|      : T(absl::forward<V>(v)) {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf12_GLOBAL__N_118SymbolByFullNameEqELm2ELb1EEC2IS7_EENS0_10in_place_tEOT_:
  103|      2|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorIN6google8protobuf6SymbolEEELm3ELb1EEC2IS9_EENS0_10in_place_tEOT_:
  103|      6|      : T(absl::forward<V>(v)) {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_121DescriptorsByNameHashINS5_14FileDescriptorEEENS6_19DescriptorsByNameEqIS8_EENSt3__19allocatorIPKS8_EEEEC2IS3_JS9_SB_SG_ETnNSC_9enable_ifIXsr4absl11conjunctionINS0_8negationINSC_7is_sameIFvSH_EFvNSC_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISH_JSO_DpT0_EEEEE5valueEbE4typeELb1EEEOSO_DpOSW_:
  236|      2|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      2|                                             absl::forward<First>(first),
  238|      2|                                             absl::forward<Vs>(base)...) {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_121DescriptorsByNameHashINS7_14FileDescriptorEEENS8_19DescriptorsByNameEqISA_EENSt3__19allocatorIPKSA_EEEEENSE_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_SB_SD_SI_EEENS0_10in_place_tEDpOT_:
  126|      8|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf12_GLOBAL__N_121DescriptorsByNameHashINS5_14FileDescriptorEEELm1ELb1EEC2IS9_EENS0_10in_place_tEOT_:
  103|      2|      : T(absl::forward<V>(v)) {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf12_GLOBAL__N_119DescriptorsByNameEqINS5_14FileDescriptorEEELm2ELb1EEC2IS9_EENS0_10in_place_tEOT_:
  103|      2|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorIPKN6google8protobuf14FileDescriptorEEELm3ELb1EEC2ISB_EENS0_10in_place_tEOT_:
  103|     10|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_19key_compare_adapterINSt3__14lessINS4_4pairIPKN6google8protobuf10DescriptorEiEEEESC_E15checked_compareENS4_9allocatorINS6_IKSC_PKNS8_15FieldDescriptorEEEEEPNS1_10btree_nodeINS1_10map_paramsISC_SK_SD_SM_Li256ELb0EEEEEEEC2IRKSF_JRKSM_SR_ETnNS4_9enable_ifIXsr4absl11conjunctionINS0_8negationINS4_7is_sameIFvSS_EFvNS4_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISS_JS13_DpT0_EEEEE5valueEbE4typeELb1EEEOS13_DpOS1B_:
  236|      2|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      2|                                             absl::forward<First>(first),
  238|      2|                                             absl::forward<Vs>(base)...) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_19key_compare_adapterINSt3__14lessINS6_4pairIPKN6google8protobuf10DescriptorEiEEEESE_E15checked_compareENS6_9allocatorINS8_IKSE_PKNSA_15FieldDescriptorEEEEEPNS1_10btree_nodeINS1_10map_paramsISE_SM_SF_SO_Li256ELb0EEEEEEEENS6_16integer_sequenceImJLm0ELm1ELm2EEEELb1EEC2IJRKSH_RKSO_ST_EEENS0_10in_place_tEDpOT_:
  126|      6|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_19key_compare_adapterINSt3__14lessINS5_4pairIPKN6google8protobuf10DescriptorEiEEEESD_E15checked_compareELm0ELb1EEC2IRKSG_EENS0_10in_place_tEOT_:
  103|      2|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorINS4_4pairIKNS6_IPKN6google8protobuf10DescriptorEiEEPKNS8_15FieldDescriptorEEEEELm1ELb1EEC2IRKSI_EENS0_10in_place_tEOT_:
  103|      2|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIPNS1_10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS9_15FieldDescriptorENS6_4lessISD_EENS6_9allocatorINS7_IKSD_SG_EEEELi256ELb0EEEEELm2ELb0EEC2ISP_EENS0_10in_place_tEOT_:
   90|      2|      : value(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_4pairIKNS6_12basic_stringIcNS6_11char_traitsIcEENS7_IcEEEENS6_10unique_ptrIN6google8protobuf10FeatureSetENS6_14default_deleteISI_EEEEEEEEEEC2IS3_JS4_S5_SN_ETnNS6_9enable_ifIXsr4absl11conjunctionINS0_8negationINS6_7is_sameIFvSO_EFvNS6_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISO_JSV_DpT0_EEEEE5valueEbE4typeELb1EEEOSV_DpOS13_:
  236|      2|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      2|                                             absl::forward<First>(first),
  238|      2|                                             absl::forward<Vs>(base)...) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS8_4pairIKNS8_12basic_stringIcNS8_11char_traitsIcEENS9_IcEEEENS8_10unique_ptrIN6google8protobuf10FeatureSetENS8_14default_deleteISK_EEEEEEEEEEENS8_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_S6_S7_SP_EEENS0_10in_place_tEDpOT_:
  126|      8|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorINS4_4pairIKNS4_12basic_stringIcNS4_11char_traitsIcEENS5_IcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISG_EEEEEEEELm3ELb1EEC2ISL_EENS0_10in_place_tEOT_:
  103|      2|      : T(absl::forward<V>(v)) {}
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_4pairIKNS6_12basic_stringIcNS6_11char_traitsIcEENS7_IcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEEEEEE3getILi1EEERNS1_25internal_compressed_tuple4ElemISL_XT_EE4typeEv:
  241|    107|  ElemT<I>& get() & {
  242|    107|    return StorageT<I>::get();
  243|    107|  }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_4pairIKNS6_12basic_stringIcNS6_11char_traitsIcEENS7_IcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEEEEEE3getILi2EEERNS1_25internal_compressed_tuple4ElemISL_XT_EE4typeEv:
  241|      7|  ElemT<I>& get() & {
  242|      7|    return StorageT<I>::get();
  243|      7|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_118SymbolByParentHashENS6_16SymbolByParentEqENSt3__19allocatorINS5_6SymbolEEEEEC2IS3_JS7_S8_SC_ETnNS9_9enable_ifIXsr4absl11conjunctionINS0_8negationINS9_7is_sameIFvSD_EFvNS9_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISD_JSK_DpT0_EEEEE5valueEbE4typeELb1EEEOSK_DpOSS_:
  236|      4|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      4|                                             absl::forward<First>(first),
  238|      4|                                             absl::forward<Vs>(base)...) {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorINS7_6SymbolEEEEEENSB_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_S9_SA_SE_EEENS0_10in_place_tEDpOT_:
  126|     16|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf12_GLOBAL__N_118SymbolByParentHashELm1ELb1EEC2IS7_EENS0_10in_place_tEOT_:
  103|      4|      : T(absl::forward<V>(v)) {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf12_GLOBAL__N_116SymbolByParentEqELm2ELb1EEC2IS7_EENS0_10in_place_tEOT_:
  103|      4|      : T(absl::forward<V>(v)) {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_116ParentNumberHashENS6_14ParentNumberEqENSt3__19allocatorIPKNS5_15FieldDescriptorEEEEEC2IS3_JS7_S8_SE_ETnNS9_9enable_ifIXsr4absl11conjunctionINS0_8negationINS9_7is_sameIFvSF_EFvNS9_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISF_JSM_DpT0_EEEEE5valueEbE4typeELb1EEEOSM_DpOSU_:
  236|      4|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      4|                                             absl::forward<First>(first),
  238|      4|                                             absl::forward<Vs>(base)...) {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_116ParentNumberHashENS8_14ParentNumberEqENSt3__19allocatorIPKNS7_15FieldDescriptorEEEEEENSB_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_S9_SA_SG_EEENS0_10in_place_tEDpOT_:
  126|     16|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf12_GLOBAL__N_116ParentNumberHashELm1ELb1EEC2IS7_EENS0_10in_place_tEOT_:
  103|     12|      : T(absl::forward<V>(v)) {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf12_GLOBAL__N_114ParentNumberEqELm2ELb1EEC2IS7_EENS0_10in_place_tEOT_:
  103|     12|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorIPKN6google8protobuf15FieldDescriptorEEELm3ELb1EEC2ISB_EENS0_10in_place_tEOT_:
  103|      4|      : T(absl::forward<V>(v)) {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_116ParentNumberHashENS6_14ParentNumberEqENSt3__19allocatorIPKNS5_19EnumValueDescriptorEEEEEC2IS3_JS7_S8_SE_ETnNS9_9enable_ifIXsr4absl11conjunctionINS0_8negationINS9_7is_sameIFvSF_EFvNS9_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISF_JSM_DpT0_EEEEE5valueEbE4typeELb1EEEOSM_DpOSU_:
  236|      8|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      8|                                             absl::forward<First>(first),
  238|      8|                                             absl::forward<Vs>(base)...) {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_116ParentNumberHashENS8_14ParentNumberEqENSt3__19allocatorIPKNS7_19EnumValueDescriptorEEEEEENSB_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_S9_SA_SG_EEENS0_10in_place_tEDpOT_:
  126|     32|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorIPKN6google8protobuf19EnumValueDescriptorEEELm3ELb1EEC2ISB_EENS0_10in_place_tEOT_:
  103|      8|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_4pairIKNS6_12basic_stringIcNS6_11char_traitsIcEENS7_IcEEEEPKN6google8protobuf23SourceCodeInfo_LocationEEEEEEEC2IS3_JS4_S5_SL_ETnNS6_9enable_ifIXsr4absl11conjunctionINS0_8negationINS6_7is_sameIFvSM_EFvNS6_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISM_JST_DpT0_EEEEE5valueEbE4typeELb1EEEOST_DpOS11_:
  236|      4|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      4|                                             absl::forward<First>(first),
  238|      4|                                             absl::forward<Vs>(base)...) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS8_4pairIKNS8_12basic_stringIcNS8_11char_traitsIcEENS9_IcEEEEPKN6google8protobuf23SourceCodeInfo_LocationEEEEEEEENS8_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_S6_S7_SN_EEENS0_10in_place_tEDpOT_:
  126|     16|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorINS4_4pairIKNS4_12basic_stringIcNS4_11char_traitsIcEENS5_IcEEEEPKN6google8protobuf23SourceCodeInfo_LocationEEEEELm3ELb1EEC2ISJ_EENS0_10in_place_tEOT_:
  103|      4|      : T(absl::forward<V>(v)) {}
descriptor.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_120SymbolByFullNameHashENS6_18SymbolByFullNameEqENSt3__19allocatorINS5_6SymbolEEEEE3getILi1EEERNS1_25internal_compressed_tuple4ElemISD_XT_EE4typeEv:
  241|  1.38k|  ElemT<I>& get() & {
  242|  1.38k|    return StorageT<I>::get();
  243|  1.38k|  }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf12_GLOBAL__N_120SymbolByFullNameHashELm1ELb1EE3getEv:
  106|  1.38k|  T& get() & { return *this; }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_121DescriptorsByNameHashINS5_14FileDescriptorEEENS6_19DescriptorsByNameEqIS8_EENSt3__19allocatorIPKS8_EEEE3getILi1EEERNS1_25internal_compressed_tuple4ElemISH_XT_EE4typeEv:
  241|      4|  ElemT<I>& get() & {
  242|      4|    return StorageT<I>::get();
  243|      4|  }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf12_GLOBAL__N_121DescriptorsByNameHashINS5_14FileDescriptorEEELm1ELb1EE3getEv:
  106|      4|  T& get() & { return *this; }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_118SymbolByParentHashENS6_16SymbolByParentEqENSt3__19allocatorINS5_6SymbolEEEEE3getILi1EEERNS1_25internal_compressed_tuple4ElemISD_XT_EE4typeEv:
  241|  1.55k|  ElemT<I>& get() & {
  242|  1.55k|    return StorageT<I>::get();
  243|  1.55k|  }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf12_GLOBAL__N_118SymbolByParentHashELm1ELb1EE3getEv:
  106|  1.55k|  T& get() & { return *this; }
descriptor.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_116ParentNumberHashENS6_14ParentNumberEqENSt3__19allocatorIPKNS5_15FieldDescriptorEEEEE3getILi1EEERNS1_25internal_compressed_tuple4ElemISF_XT_EE4typeEv:
  241|    206|  ElemT<I>& get() & {
  242|    206|    return StorageT<I>::get();
  243|    206|  }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_4pairIKNS6_12basic_stringIcNS6_11char_traitsIcEENS7_IcEEEENS6_10unique_ptrIN6google8protobuf10FeatureSetENS6_14default_deleteISI_EEEEEEEEEE3getILi1EEERNS1_25internal_compressed_tuple4ElemISO_XT_EE4typeEv:
  241|    239|  ElemT<I>& get() & {
  242|    239|    return StorageT<I>::get();
  243|    239|  }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_4pairIKNS6_12basic_stringIcNS6_11char_traitsIcEENS7_IcEEEENS6_10unique_ptrIN6google8protobuf10FeatureSetENS6_14default_deleteISI_EEEEEEEEEE3getILi2EEERNS1_25internal_compressed_tuple4ElemISO_XT_EE4typeEv:
  241|    235|  ElemT<I>& get() & {
  242|    235|    return StorageT<I>::get();
  243|    235|  }
_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_4pairIKNS6_12basic_stringIcNS6_11char_traitsIcEENS7_IcEEEEbEEEEEEC2IS3_JS4_S5_SG_ETnNS6_9enable_ifIXsr4absl11conjunctionINS0_8negationINS6_7is_sameIFvSH_EFvNS6_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISH_JSO_DpT0_EEEEE5valueEbE4typeELb1EEEOSO_DpOSW_:
  236|      2|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      2|                                             absl::forward<First>(first),
  238|      2|                                             absl::forward<Vs>(base)...) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS8_4pairIKNS8_12basic_stringIcNS8_11char_traitsIcEENS9_IcEEEEbEEEEEEENS8_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_S6_S7_SI_EEENS0_10in_place_tEDpOT_:
  126|      8|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorINS4_4pairIKNS4_12basic_stringIcNS4_11char_traitsIcEENS5_IcEEEEbEEEELm3ELb1EEC2ISE_EENS0_10in_place_tEOT_:
  103|      2|      : T(absl::forward<V>(v)) {}
_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_12basic_stringIcNS6_11char_traitsIcEENS7_IcEEEEEEEE3getILi1EEERKNS1_25internal_compressed_tuple4ElemISE_XT_EE4typeEv:
  246|      8|  constexpr const ElemT<I>& get() const& {
  247|      8|    return StorageT<I>::get();
  248|      8|  }
_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_6HashEqIPKN6google8protobuf14FileDescriptorEvE4HashENSA_2EqENSt3__19allocatorIS9_EEEEC2IS3_JSB_SC_SF_ETnNSD_9enable_ifIXsr4absl11conjunctionINS0_8negationINSD_7is_sameIFvSG_EFvNSD_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISG_JSN_DpT0_EEEEE5valueEbE4typeELb1EEEOSN_DpOSV_:
  236|      8|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      8|                                             absl::forward<First>(first),
  238|      8|                                             absl::forward<Vs>(base)...) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsENS1_6HashEqIPKN6google8protobuf14FileDescriptorEvE4HashENSC_2EqENSt3__19allocatorISB_EEEEENSF_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_SD_SE_SH_EEENS0_10in_place_tEDpOT_:
  126|     32|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_6HashEqIPKN6google8protobuf10DescriptorEvE4HashENSA_2EqENSt3__19allocatorINSD_4pairIKS9_NS6_17DescriptorBuilder12MessageHintsEEEEEEEC2IS3_JSB_SC_SK_ETnNSD_9enable_ifIXsr4absl11conjunctionINS0_8negationINSD_7is_sameIFvSL_EFvNSD_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISL_JSS_DpT0_EEEEE5valueEbE4typeELb1EEEOSS_DpOS10_:
  236|      4|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      4|                                             absl::forward<First>(first),
  238|      4|                                             absl::forward<Vs>(base)...) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsENS1_6HashEqIPKN6google8protobuf10DescriptorEvE4HashENSC_2EqENSt3__19allocatorINSF_4pairIKSB_NS8_17DescriptorBuilder12MessageHintsEEEEEEEENSF_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_SD_SE_SM_EEENS0_10in_place_tEDpOT_:
  126|     16|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorINS4_4pairIKPKN6google8protobuf10DescriptorENS8_17DescriptorBuilder12MessageHintsEEEEELm3ELb1EEC2ISG_EENS0_10in_place_tEOT_:
  103|      4|      : T(absl::forward<V>(v)) {}
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_6HashEqIPKN6google8protobuf14FileDescriptorEvE4HashENSA_2EqENSt3__19allocatorIS9_EEEE3getILi1EEERNS1_25internal_compressed_tuple4ElemISG_XT_EE4typeEv:
  241|    103|  ElemT<I>& get() & {
  242|    103|    return StorageT<I>::get();
  243|    103|  }
_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_6HashEqIPKN6google8protobuf14FileDescriptorEvE4HashENSA_2EqENSt3__19allocatorIS9_EEEE3getILi1EEERKNS1_25internal_compressed_tuple4ElemISG_XT_EE4typeEv:
  246|      1|  constexpr const ElemT<I>& get() const& {
  247|      1|    return StorageT<I>::get();
  248|      1|  }
_ZNKR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_6HashEqIPKN6google8protobuf14FileDescriptorEvE4HashELm1ELb1EE3getEv:
  105|      1|  constexpr const T& get() const& { return *this; }
_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS0_11string_viewEEEEEC2IS3_JS4_S5_S9_ETnNS6_9enable_ifIXsr4absl11conjunctionINS0_8negationINS6_7is_sameIFvSA_EFvNS6_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISA_JSH_DpT0_EEEEE5valueEbE4typeELb1EEEOSH_DpOSP_:
  236|     75|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|     75|                                             absl::forward<First>(first),
  238|     75|                                             absl::forward<Vs>(base)...) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS0_11string_viewEEEEEENS8_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_S6_S7_SB_EEENS0_10in_place_tEDpOT_:
  126|    300|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorINS0_11string_viewEEELm3ELb1EEC2IS7_EENS0_10in_place_tEOT_:
  103|     75|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS0_13hash_internal4HashIiEENSt3__18equal_toIiEENS7_9allocatorIiEEEEC2IS3_JS6_S9_SB_ETnNS7_9enable_ifIXsr4absl11conjunctionINS0_8negationINS7_7is_sameIFvSC_EFvNS7_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISC_JSJ_DpT0_EEEEE5valueEbE4typeELb1EEEOSJ_DpOSR_:
  236|      4|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      4|                                             absl::forward<First>(first),
  238|      4|                                             absl::forward<Vs>(base)...) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsENS0_13hash_internal4HashIiEENSt3__18equal_toIiEENS9_9allocatorIiEEEEENS9_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_S8_SB_SD_EEENS0_10in_place_tEDpOT_:
  126|     16|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS0_13hash_internal4HashIiEELm1ELb1EEC2IS6_EENS0_10in_place_tEOT_:
  103|      4|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__18equal_toIiEELm2ELb1EEC2IS6_EENS0_10in_place_tEOT_:
  103|      4|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorIiEELm3ELb1EEC2IS6_EENS0_10in_place_tEOT_:
  103|      4|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS0_13hash_internal4HashINSt3__16vectorIiNS6_9allocatorIiEEEEEENS6_8equal_toISA_EENS8_INS6_4pairIKSA_SA_EEEEEEC2IS3_JSB_SD_SH_ETnNS6_9enable_ifIXsr4absl11conjunctionINS0_8negationINS6_7is_sameIFvSI_EFvNS6_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISI_JSP_DpT0_EEEEE5valueEbE4typeELb1EEEOSP_DpOSX_:
  236|      4|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      4|                                             absl::forward<First>(first),
  238|      4|                                             absl::forward<Vs>(base)...) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsENS0_13hash_internal4HashINSt3__16vectorIiNS8_9allocatorIiEEEEEENS8_8equal_toISC_EENSA_INS8_4pairIKSC_SC_EEEEEEENS8_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_SD_SF_SJ_EEENS0_10in_place_tEDpOT_:
  126|     16|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS0_13hash_internal4HashINSt3__16vectorIiNS6_9allocatorIiEEEEEELm1ELb1EEC2ISB_EENS0_10in_place_tEOT_:
  103|      8|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__18equal_toINS4_6vectorIiNS4_9allocatorIiEEEEEELm2ELb1EEC2ISA_EENS0_10in_place_tEOT_:
  103|      8|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorINS4_4pairIKNS4_6vectorIiNS5_IiEEEES9_EEEELm3ELb1EEC2ISC_EENS0_10in_place_tEOT_:
  103|      4|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS0_13hash_internal4HashINSt3__16vectorIiNS6_9allocatorIiEEEEEENS6_8equal_toISA_EENS8_INS6_4pairIKSA_iEEEEEEC2IS3_JSB_SD_SH_ETnNS6_9enable_ifIXsr4absl11conjunctionINS0_8negationINS6_7is_sameIFvSI_EFvNS6_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISI_JSP_DpT0_EEEEE5valueEbE4typeELb1EEEOSP_DpOSX_:
  236|      4|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      4|                                             absl::forward<First>(first),
  238|      4|                                             absl::forward<Vs>(base)...) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsENS0_13hash_internal4HashINSt3__16vectorIiNS8_9allocatorIiEEEEEENS8_8equal_toISC_EENSA_INS8_4pairIKSC_iEEEEEEENS8_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_SD_SF_SJ_EEENS0_10in_place_tEDpOT_:
  126|     16|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorINS4_4pairIKNS4_6vectorIiNS5_IiEEEEiEEEELm3ELb1EEC2ISC_EENS0_10in_place_tEOT_:
  103|      4|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11FileCompareENS7_9FileEntryEE15checked_compareENSt3__19allocatorIS9_EEPNS1_10btree_nodeINS1_10set_paramsIS9_S8_SE_Li256ELb0EEEEEEEC2IRKSB_JRKSE_SJ_ETnNSC_9enable_ifIXsr4absl11conjunctionINS0_8negationINSC_7is_sameIFvSK_EFvNSC_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISK_JSV_DpT0_EEEEE5valueEbE4typeELb1EEEOSV_DpOS13_:
  236|      2|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      2|                                             absl::forward<First>(first),
  238|      2|                                             absl::forward<Vs>(base)...) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11FileCompareENS9_9FileEntryEE15checked_compareENSt3__19allocatorISB_EEPNS1_10btree_nodeINS1_10set_paramsISB_SA_SG_Li256ELb0EEEEEEEENSE_16integer_sequenceImJLm0ELm1ELm2EEEELb1EEC2IJRKSD_RKSG_SL_EEENS0_10in_place_tEDpOT_:
  126|      6|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11FileCompareENS8_9FileEntryEE15checked_compareELm0ELb0EEC2IRKSC_EENS0_10in_place_tEOT_:
   90|      2|      : value(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryEEELm1ELb1EEC2IRKSB_EENS0_10in_place_tEOT_:
  103|      2|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS9_11FileCompareENSt3__19allocatorISA_EELi256ELb0EEEEELm2ELb0EEC2ISH_EENS0_10in_place_tEOT_:
   90|      2|      : value(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex13SymbolCompareENS7_11SymbolEntryEE15checked_compareENSt3__19allocatorIS9_EEPNS1_10btree_nodeINS1_10set_paramsIS9_S8_SE_Li256ELb0EEEEEEEC2IRKSB_JRKSE_SJ_ETnNSC_9enable_ifIXsr4absl11conjunctionINS0_8negationINSC_7is_sameIFvSK_EFvNSC_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISK_JSV_DpT0_EEEEE5valueEbE4typeELb1EEEOSV_DpOS13_:
  236|      2|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      2|                                             absl::forward<First>(first),
  238|      2|                                             absl::forward<Vs>(base)...) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex13SymbolCompareENS9_11SymbolEntryEE15checked_compareENSt3__19allocatorISB_EEPNS1_10btree_nodeINS1_10set_paramsISB_SA_SG_Li256ELb0EEEEEEEENSE_16integer_sequenceImJLm0ELm1ELm2EEEELb1EEC2IJRKSD_RKSG_SL_EEENS0_10in_place_tEDpOT_:
  126|      6|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex13SymbolCompareENS8_11SymbolEntryEE15checked_compareELm0ELb0EEC2IRKSC_EENS0_10in_place_tEOT_:
   90|      2|      : value(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryEEELm1ELb1EEC2IRKSB_EENS0_10in_place_tEOT_:
  103|      2|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS9_13SymbolCompareENSt3__19allocatorISA_EELi256ELb0EEEEELm2ELb0EEC2ISH_EENS0_10in_place_tEOT_:
   90|      2|      : value(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex16ExtensionCompareENS7_14ExtensionEntryEE15checked_compareENSt3__19allocatorIS9_EEPNS1_10btree_nodeINS1_10set_paramsIS9_S8_SE_Li256ELb0EEEEEEEC2IRKSB_JRKSE_SJ_ETnNSC_9enable_ifIXsr4absl11conjunctionINS0_8negationINSC_7is_sameIFvSK_EFvNSC_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISK_JSV_DpT0_EEEEE5valueEbE4typeELb1EEEOSV_DpOS13_:
  236|      2|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      2|                                             absl::forward<First>(first),
  238|      2|                                             absl::forward<Vs>(base)...) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex16ExtensionCompareENS9_14ExtensionEntryEE15checked_compareENSt3__19allocatorISB_EEPNS1_10btree_nodeINS1_10set_paramsISB_SA_SG_Li256ELb0EEEEEEEENSE_16integer_sequenceImJLm0ELm1ELm2EEEELb1EEC2IJRKSD_RKSG_SL_EEENS0_10in_place_tEDpOT_:
  126|      6|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex16ExtensionCompareENS8_14ExtensionEntryEE15checked_compareELm0ELb0EEC2IRKSC_EENS0_10in_place_tEOT_:
   90|      2|      : value(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryEEELm1ELb1EEC2IRKSB_EENS0_10in_place_tEOT_:
  103|      2|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS9_16ExtensionCompareENSt3__19allocatorISA_EELi256ELb0EEEEELm2ELb0EEC2ISH_EENS0_10in_place_tEOT_:
   90|      2|      : value(absl::forward<V>(v)) {}
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11FileCompareENS7_9FileEntryEE15checked_compareENSt3__19allocatorIS9_EEPNS1_10btree_nodeINS1_10set_paramsIS9_S8_SE_Li256ELb0EEEEEEE3getILi1EEERNS1_25internal_compressed_tuple4ElemISK_XT_EE4typeEv:
  241|     14|  ElemT<I>& get() & {
  242|     14|    return StorageT<I>::get();
  243|     14|  }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryEEELm1ELb1EE3getEv:
  106|     14|  T& get() & { return *this; }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11FileCompareENS7_9FileEntryEE15checked_compareENSt3__19allocatorIS9_EEPNS1_10btree_nodeINS1_10set_paramsIS9_S8_SE_Li256ELb0EEEEEEE3getILi2EEERNS1_25internal_compressed_tuple4ElemISK_XT_EE4typeEv:
  241|     12|  ElemT<I>& get() & {
  242|     12|    return StorageT<I>::get();
  243|     12|  }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS9_11FileCompareENSt3__19allocatorISA_EELi256ELb0EEEEELm2ELb0EE3getEv:
   92|     12|  T& get() & { return value; }
_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11FileCompareENS7_9FileEntryEE15checked_compareENSt3__19allocatorIS9_EEPNS1_10btree_nodeINS1_10set_paramsIS9_S8_SE_Li256ELb0EEEEEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISK_XT_EE4typeEv:
  246|     18|  constexpr const ElemT<I>& get() const& {
  247|     18|    return StorageT<I>::get();
  248|     18|  }
_ZNKR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11FileCompareENS8_9FileEntryEE15checked_compareELm0ELb0EE3getEv:
   91|     18|  constexpr const T& get() const& { return value; }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex16ExtensionCompareENS7_14ExtensionEntryEE15checked_compareENSt3__19allocatorIS9_EEPNS1_10btree_nodeINS1_10set_paramsIS9_S8_SE_Li256ELb0EEEEEEE3getILi1EEERNS1_25internal_compressed_tuple4ElemISK_XT_EE4typeEv:
  241|      3|  ElemT<I>& get() & {
  242|      3|    return StorageT<I>::get();
  243|      3|  }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryEEELm1ELb1EE3getEv:
  106|      3|  T& get() & { return *this; }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex16ExtensionCompareENS7_14ExtensionEntryEE15checked_compareENSt3__19allocatorIS9_EEPNS1_10btree_nodeINS1_10set_paramsIS9_S8_SE_Li256ELb0EEEEEEE3getILi2EEERNS1_25internal_compressed_tuple4ElemISK_XT_EE4typeEv:
  241|      4|  ElemT<I>& get() & {
  242|      4|    return StorageT<I>::get();
  243|      4|  }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS9_16ExtensionCompareENSt3__19allocatorISA_EELi256ELb0EEEEELm2ELb0EE3getEv:
   92|      4|  T& get() & { return value; }
_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex16ExtensionCompareENS7_14ExtensionEntryEE15checked_compareENSt3__19allocatorIS9_EEPNS1_10btree_nodeINS1_10set_paramsIS9_S8_SE_Li256ELb0EEEEEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISK_XT_EE4typeEv:
  246|      3|  constexpr const ElemT<I>& get() const& {
  247|      3|    return StorageT<I>::get();
  248|      3|  }
_ZNKR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex16ExtensionCompareENS8_14ExtensionEntryEE15checked_compareELm0ELb0EE3getEv:
   91|      3|  constexpr const T& get() const& { return value; }
_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex13SymbolCompareENS7_11SymbolEntryEE15checked_compareENSt3__19allocatorIS9_EEPNS1_10btree_nodeINS1_10set_paramsIS9_S8_SE_Li256ELb0EEEEEEE3getILi2EEERKNS1_25internal_compressed_tuple4ElemISK_XT_EE4typeEv:
  246|     30|  constexpr const ElemT<I>& get() const& {
  247|     30|    return StorageT<I>::get();
  248|     30|  }
_ZNKR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS9_13SymbolCompareENSt3__19allocatorISA_EELi256ELb0EEEEELm2ELb0EE3getEv:
   91|     30|  constexpr const T& get() const& { return value; }
_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex13SymbolCompareENS7_11SymbolEntryEE15checked_compareENSt3__19allocatorIS9_EEPNS1_10btree_nodeINS1_10set_paramsIS9_S8_SE_Li256ELb0EEEEEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISK_XT_EE4typeEv:
  246|    297|  constexpr const ElemT<I>& get() const& {
  247|    297|    return StorageT<I>::get();
  248|    297|  }
_ZNKR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex13SymbolCompareENS8_11SymbolEntryEE15checked_compareELm0ELb0EE3getEv:
   91|    297|  constexpr const T& get() const& { return value; }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex13SymbolCompareENS7_11SymbolEntryEE15checked_compareENSt3__19allocatorIS9_EEPNS1_10btree_nodeINS1_10set_paramsIS9_S8_SE_Li256ELb0EEEEEEE3getILi2EEERNS1_25internal_compressed_tuple4ElemISK_XT_EE4typeEv:
  241|    279|  ElemT<I>& get() & {
  242|    279|    return StorageT<I>::get();
  243|    279|  }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS9_13SymbolCompareENSt3__19allocatorISA_EELi256ELb0EEEEELm2ELb0EE3getEv:
   92|    279|  T& get() & { return value; }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex13SymbolCompareENS7_11SymbolEntryEE15checked_compareENSt3__19allocatorIS9_EEPNS1_10btree_nodeINS1_10set_paramsIS9_S8_SE_Li256ELb0EEEEEEE3getILi1EEERNS1_25internal_compressed_tuple4ElemISK_XT_EE4typeEv:
  241|    103|  ElemT<I>& get() & {
  242|    103|    return StorageT<I>::get();
  243|    103|  }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryEEELm1ELb1EE3getEv:
  106|    103|  T& get() & { return *this; }
_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_6HashEqIPKN6google8protobuf10DescriptorEvE4HashENSA_2EqENSt3__19allocatorINSD_4pairIKS9_PKNS6_21DynamicMessageFactory8TypeInfoEEEEEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISN_XT_EE4typeEv:
  246|     12|  constexpr const ElemT<I>& get() const& {
  247|     12|    return StorageT<I>::get();
  248|     12|  }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_6HashEqIPKN6google8protobuf10DescriptorEvE4HashENSA_2EqENSt3__19allocatorINSD_4pairIKS9_PKNS6_21DynamicMessageFactory8TypeInfoEEEEEEE3getILi0EEERNS1_25internal_compressed_tuple4ElemISN_XT_EE4typeEv:
  241|      8|  ElemT<I>& get() & {
  242|      8|    return StorageT<I>::get();
  243|      8|  }
_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_6HashEqIPKN6google8protobuf10DescriptorEvE4HashENSA_2EqENSt3__19allocatorINSD_4pairIKS9_PKNS6_21DynamicMessageFactory8TypeInfoEEEEEEEC2IS3_JSB_SC_SM_ETnNSD_9enable_ifIXsr4absl11conjunctionINS0_8negationINSD_7is_sameIFvSN_EFvNSD_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISN_JSU_DpT0_EEEEE5valueEbE4typeELb1EEEOSU_DpOS12_:
  236|      6|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      6|                                             absl::forward<First>(first),
  238|      6|                                             absl::forward<Vs>(base)...) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsENS1_6HashEqIPKN6google8protobuf10DescriptorEvE4HashENSC_2EqENSt3__19allocatorINSF_4pairIKSB_PKNS8_21DynamicMessageFactory8TypeInfoEEEEEEEENSF_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_SD_SE_SO_EEENS0_10in_place_tEDpOT_:
  126|     24|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorINS4_4pairIKPKN6google8protobuf10DescriptorEPKNS8_21DynamicMessageFactory8TypeInfoEEEEELm3ELb1EEC2ISI_EENS0_10in_place_tEOT_:
  103|      6|      : T(absl::forward<V>(v)) {}
message.cc:_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENS7_18DescriptorByNameEqENSt3__19allocatorIPKNS5_8internal15DescriptorTableEEEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISH_XT_EE4typeEv:
  246|     70|  constexpr const ElemT<I>& get() const& {
  247|     70|    return StorageT<I>::get();
  248|     70|  }
message.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENS7_18DescriptorByNameEqENSt3__19allocatorIPKNS5_8internal15DescriptorTableEEEEE3getILi3EEERNS1_25internal_compressed_tuple4ElemISH_XT_EE4typeEv:
  241|     17|  ElemT<I>& get() & {
  242|     17|    return StorageT<I>::get();
  243|     17|  }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorIPKN6google8protobuf8internal15DescriptorTableEEELm3ELb1EE3getEv:
  106|     17|  T& get() & { return *this; }
message.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENS7_18DescriptorByNameEqENSt3__19allocatorIPKNS5_8internal15DescriptorTableEEEEE3getILi0EEERNS1_25internal_compressed_tuple4ElemISH_XT_EE4typeEv:
  241|     77|  ElemT<I>& get() & {
  242|     77|    return StorageT<I>::get();
  243|     77|  }
message.cc:_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENS7_18DescriptorByNameEqENSt3__19allocatorIPKNS5_8internal15DescriptorTableEEEEEC2IS3_JS8_S9_SG_ETnNSA_9enable_ifIXsr4absl11conjunctionINS0_8negationINSA_7is_sameIFvSH_EFvNSA_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISH_JSO_DpT0_EEEEE5valueEbE4typeELb1EEEOSO_DpOSW_:
  236|      2|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      2|                                             absl::forward<First>(first),
  238|      2|                                             absl::forward<Vs>(base)...) {}
message.cc:_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENS9_18DescriptorByNameEqENSt3__19allocatorIPKNS7_8internal15DescriptorTableEEEEEENSC_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_SA_SB_SI_EEENS0_10in_place_tEDpOT_:
  126|      8|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
message.cc:_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashELm1ELb1EEC2IS8_EENS0_10in_place_tEOT_:
  103|      2|      : T(absl::forward<V>(v)) {}
message.cc:_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf12_GLOBAL__N_123GeneratedMessageFactory18DescriptorByNameEqELm2ELb1EEC2IS8_EENS0_10in_place_tEOT_:
  103|      2|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorIPKN6google8protobuf8internal15DescriptorTableEEELm3ELb1EEC2ISC_EENS0_10in_place_tEOT_:
  103|      2|      : T(absl::forward<V>(v)) {}
message.cc:_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_6HashEqIPKN6google8protobuf10DescriptorEvE4HashENSA_2EqENSt3__19allocatorINSD_4pairIKS9_NS6_12_GLOBAL__N_123GeneratedMessageFactory10MessagePtrEEEEEEEC2IS3_JSB_SC_SL_ETnNSD_9enable_ifIXsr4absl11conjunctionINS0_8negationINSD_7is_sameIFvSM_EFvNSD_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISM_JST_DpT0_EEEEE5valueEbE4typeELb1EEEOST_DpOS11_:
  236|      2|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      2|                                             absl::forward<First>(first),
  238|      2|                                             absl::forward<Vs>(base)...) {}
message.cc:_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsENS1_6HashEqIPKN6google8protobuf10DescriptorEvE4HashENSC_2EqENSt3__19allocatorINSF_4pairIKSB_NS8_12_GLOBAL__N_123GeneratedMessageFactory10MessagePtrEEEEEEEENSF_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_SD_SE_SN_EEENS0_10in_place_tEDpOT_:
  126|      8|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
message.cc:_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorINS4_4pairIKPKN6google8protobuf10DescriptorENS8_12_GLOBAL__N_123GeneratedMessageFactory10MessagePtrEEEEELm3ELb1EEC2ISH_EENS0_10in_place_tEOT_:
  103|      2|      : T(absl::forward<V>(v)) {}
message.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENS7_18DescriptorByNameEqENSt3__19allocatorIPKNS5_8internal15DescriptorTableEEEEE3getILi2EEERNS1_25internal_compressed_tuple4ElemISH_XT_EE4typeEv:
  241|      2|  ElemT<I>& get() & {
  242|      2|    return StorageT<I>::get();
  243|      2|  }
message.cc:_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf12_GLOBAL__N_123GeneratedMessageFactory18DescriptorByNameEqELm2ELb1EE3getEv:
  106|      2|  T& get() & { return *this; }
message.cc:_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsEN6google8protobuf12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENS7_18DescriptorByNameEqENSt3__19allocatorIPKNS5_8internal15DescriptorTableEEEEE3getILi1EEERNS1_25internal_compressed_tuple4ElemISH_XT_EE4typeEv:
  241|      6|  ElemT<I>& get() & {
  242|      6|    return StorageT<I>::get();
  243|      6|  }
message.cc:_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageIN6google8protobuf12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashELm1ELb1EE3getEv:
  106|      6|  T& get() & { return *this; }

_ZN4absl12lts_2024011618container_internal27SanitizerPoisonMemoryRegionEPKvm:
  220|    537|inline void SanitizerPoisonMemoryRegion(const void* m, size_t s) {
  221|       |#ifdef ABSL_HAVE_ADDRESS_SANITIZER
  222|       |  ASAN_POISON_MEMORY_REGION(m, s);
  223|       |#endif
  224|       |#ifdef ABSL_HAVE_MEMORY_SANITIZER
  225|       |  __msan_poison(m, s);
  226|       |#endif
  227|    537|  (void)m;
  228|    537|  (void)s;
  229|    537|}
_ZN4absl12lts_2024011618container_internal29SanitizerUnpoisonMemoryRegionEPKvm:
  231|  3.97k|inline void SanitizerUnpoisonMemoryRegion(const void* m, size_t s) {
  232|       |#ifdef ABSL_HAVE_ADDRESS_SANITIZER
  233|       |  ASAN_UNPOISON_MEMORY_REGION(m, s);
  234|       |#endif
  235|       |#ifdef ABSL_HAVE_MEMORY_SANITIZER
  236|       |  __msan_unpoison(m, s);
  237|       |#endif
  238|  3.97k|  (void)m;
  239|  3.97k|  (void)s;
  240|  3.97k|}
_ZN4absl12lts_2024011618container_internal8AllocateILm8ENSt3__19allocatorIcEEEEPvPT0_m:
   55|     83|void* Allocate(Alloc* alloc, size_t n) {
   56|     83|  static_assert(Alignment > 0, "");
   57|     83|  assert(n && "n must be positive");
   58|     83|  using M = AlignedType<Alignment>;
   59|     83|  using A = typename absl::allocator_traits<Alloc>::template rebind_alloc<M>;
   60|     83|  using AT = typename absl::allocator_traits<Alloc>::template rebind_traits<M>;
   61|       |  // On macOS, "mem_alloc" is a #define with one argument defined in
   62|       |  // rpc/types.h, so we can't name the variable "mem_alloc" and initialize it
   63|       |  // with the "foo(bar)" syntax.
   64|     83|  A my_mem_alloc(*alloc);
   65|     83|  void* p = AT::allocate(my_mem_alloc, (n + sizeof(M) - 1) / sizeof(M));
   66|       |  assert(reinterpret_cast<uintptr_t>(p) % Alignment == 0 &&
   67|     83|         "allocator does not respect alignment");
   68|     83|  return p;
   69|     83|}
_ZN4absl12lts_2024011618container_internal10DeallocateILm8ENSt3__19allocatorIcEEEEvPT0_Pvm:
   74|     63|void Deallocate(Alloc* alloc, void* p, size_t n) {
   75|     63|  static_assert(Alignment > 0, "");
   76|     63|  assert(n && "n must be positive");
   77|     63|  using M = AlignedType<Alignment>;
   78|     63|  using A = typename absl::allocator_traits<Alloc>::template rebind_alloc<M>;
   79|     63|  using AT = typename absl::allocator_traits<Alloc>::template rebind_traits<M>;
   80|       |  // On macOS, "mem_alloc" is a #define with one argument defined in
   81|       |  // rpc/types.h, so we can't name the variable "mem_alloc" and initialize it
   82|       |  // with the "foo(bar)" syntax.
   83|     63|  A my_mem_alloc(*alloc);
   84|     63|  AT::deallocate(my_mem_alloc, static_cast<M*>(p),
   85|     63|                 (n + sizeof(M) - 1) / sizeof(M));
   86|     63|}
extension_set.cc:_ZN4absl12lts_2024011618container_internal14DecomposeValueINS1_12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS7_12_GLOBAL__N_115ExtensionHasherENSA_11ExtensionEqENSt3__19allocatorIS8_EEE12EqualElementINSA_16ExtensionInfoKeyEEERS8_EEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEclsr3stdE7declvalISM_EEEEOSL_OSM_:
  214|      8|DecomposeValue(F&& f, Arg&& arg) {
  215|      8|  const auto& key = arg;
  216|      8|  return std::forward<F>(f)(key, std::forward<Arg>(arg));
  217|      8|}
extension_set.cc:_ZN4absl12lts_2024011618container_internal14DecomposeValueINS1_12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS7_12_GLOBAL__N_115ExtensionHasherENSA_11ExtensionEqENSt3__19allocatorIS8_EEE19EmplaceDecomposableERKS8_EEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEclsr3stdE7declvalISL_EEEEOSK_OSL_:
  214|      1|DecomposeValue(F&& f, Arg&& arg) {
  215|      1|  const auto& key = arg;
  216|      1|  return std::forward<F>(f)(key, std::forward<Arg>(arg));
  217|      1|}
_ZN4absl12lts_2024011618container_internal15map_slot_policyINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS3_10unique_ptrIN6google8protobuf10FeatureSetENS3_14default_deleteISD_EEEEE7destroyINS7_INS3_4pairIKS9_SG_EEEEEEvPT_PNS1_13map_slot_typeIS9_SG_EE:
  417|      4|  static void destroy(Allocator* alloc, slot_type* slot) {
  418|      4|    if (kMutableKeys::value) {
  ------------------
  |  Branch (418:9): [True: 4, Folded]
  ------------------
  419|      4|      absl::allocator_traits<Allocator>::destroy(*alloc, &slot->mutable_value);
  420|      4|    } else {
  421|      0|      absl::allocator_traits<Allocator>::destroy(*alloc, &slot->value);
  422|      0|    }
  423|      4|  }
_ZN4absl12lts_2024011618container_internal15map_slot_policyINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEE7destroyINS7_INS3_4pairIKS9_SD_EEEEEEvPT_PNS1_13map_slot_typeIS9_SD_EE:
  417|     50|  static void destroy(Allocator* alloc, slot_type* slot) {
  418|     50|    if (kMutableKeys::value) {
  ------------------
  |  Branch (418:9): [True: 50, Folded]
  ------------------
  419|     50|      absl::allocator_traits<Allocator>::destroy(*alloc, &slot->mutable_value);
  420|     50|    } else {
  421|      0|      absl::allocator_traits<Allocator>::destroy(*alloc, &slot->value);
  422|      0|    }
  423|     50|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal14DecomposeValueINS1_12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS6_12_GLOBAL__N_120SymbolByFullNameHashENS9_18SymbolByFullNameEqENSt3__19allocatorIS7_EEE12EqualElementINS9_13FullNameQueryEEERS7_EEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEclsr3stdE7declvalISL_EEEEOSK_OSL_:
  214|    105|DecomposeValue(F&& f, Arg&& arg) {
  215|    105|  const auto& key = arg;
  216|    105|  return std::forward<F>(f)(key, std::forward<Arg>(arg));
  217|    105|}
descriptor.cc:_ZN4absl12lts_2024011618container_internal14DecomposeValueINS1_12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS6_12_GLOBAL__N_121DescriptorsByNameHashIS7_EENSB_19DescriptorsByNameEqIS7_EENSt3__19allocatorIS9_EEE12EqualElementINS0_11string_viewEEERS9_EEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEclsr3stdE7declvalISP_EEEEOSO_OSP_:
  214|      7|DecomposeValue(F&& f, Arg&& arg) {
  215|      7|  const auto& key = arg;
  216|      7|  return std::forward<F>(f)(key, std::forward<Arg>(arg));
  217|      7|}
_ZN4absl12lts_2024011618container_internal10DeallocateILm8ENSt3__19allocatorINS0_11string_viewEEEEEvPT0_Pvm:
   74|      3|void Deallocate(Alloc* alloc, void* p, size_t n) {
   75|      3|  static_assert(Alignment > 0, "");
   76|      3|  assert(n && "n must be positive");
   77|      3|  using M = AlignedType<Alignment>;
   78|      3|  using A = typename absl::allocator_traits<Alloc>::template rebind_alloc<M>;
   79|      3|  using AT = typename absl::allocator_traits<Alloc>::template rebind_traits<M>;
   80|       |  // On macOS, "mem_alloc" is a #define with one argument defined in
   81|       |  // rpc/types.h, so we can't name the variable "mem_alloc" and initialize it
   82|       |  // with the "foo(bar)" syntax.
   83|      3|  A my_mem_alloc(*alloc);
   84|      3|  AT::deallocate(my_mem_alloc, static_cast<M*>(p),
   85|      3|                 (n + sizeof(M) - 1) / sizeof(M));
   86|      3|}
_ZN4absl12lts_2024011618container_internal13DecomposePairINS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS9_INS5_4pairIKSB_SF_EEEEE19EmplaceDecomposableEJRKNSJ_ISB_SF_EEEEEDTclsr15memory_internalE17DecomposePairImplclsr3stdE7forwardIT_Efp_Ecl8PairArgsspclsr3stdE7forwardIT0_Efp0_EEEEOSS_DpOST_:
  206|     32|        std::forward<F>(f), PairArgs(std::forward<Args>(args)...))) {
  207|     32|  return memory_internal::DecomposePairImpl(
  208|     32|      std::forward<F>(f), PairArgs(std::forward<Args>(args)...));
  209|     32|}
_ZN4absl12lts_2024011618container_internal15memory_internal17DecomposePairImplINS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENSA_INS6_4pairIKSC_SG_EEEEE19EmplaceDecomposableERSL_NS6_5tupleIJRKSG_EEEEEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEL_ZNS6_L19piecewise_constructEEclsr3stdE7declvalINSR_IJSW_EEEEEclsr3stdE7declvalIT1_EEEEOSV_NSK_ISZ_S10_EE:
  138|     32|DecomposePairImpl(F&& f, std::pair<std::tuple<K>, V> p) {
  139|     32|  const auto& key = std::get<0>(p.first);
  140|     32|  return std::forward<F>(f)(key, std::piecewise_construct, std::move(p.first),
  141|     32|                            std::move(p.second));
  142|     32|}
_ZN4absl12lts_2024011618container_internal13DecomposePairINS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS9_INS5_4pairIKSB_SF_EEEEE12EqualElementISB_EEJRSL_EEEDTclsr15memory_internalE17DecomposePairImplclsr3stdE7forwardIT_Efp_Ecl8PairArgsspclsr3stdE7forwardIT0_Efp0_EEEEOSR_DpOSS_:
  206|      7|        std::forward<F>(f), PairArgs(std::forward<Args>(args)...))) {
  207|      7|  return memory_internal::DecomposePairImpl(
  208|      7|      std::forward<F>(f), PairArgs(std::forward<Args>(args)...));
  209|      7|}
_ZN4absl12lts_2024011618container_internal15memory_internal17DecomposePairImplINS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENSA_INS6_4pairIKSC_SG_EEEEE12EqualElementISC_EERSL_NS6_5tupleIJRKSG_EEEEEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEL_ZNS6_L19piecewise_constructEEclsr3stdE7declvalINSS_IJSX_EEEEEclsr3stdE7declvalIT1_EEEEOSW_NSK_IS10_S11_EE:
  138|      7|DecomposePairImpl(F&& f, std::pair<std::tuple<K>, V> p) {
  139|      7|  const auto& key = std::get<0>(p.first);
  140|      7|  return std::forward<F>(f)(key, std::piecewise_construct, std::move(p.first),
  141|      7|                            std::move(p.second));
  142|      7|}
_ZN4absl12lts_2024011618container_internal8PairArgsIKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS3_4pairINS3_5tupleIJRKT_EEENSG_IJRKT0_EEEEERKNSF_ISH_SL_EE:
  187|     35|    const std::pair<F, S>& p) {
  188|     35|  return PairArgs(p.first, p.second);
  189|     35|}
_ZN4absl12lts_2024011618container_internal8PairArgsIRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERKN6google8protobuf10Descriptor13WellKnownTypeEEENS3_4pairINS3_5tupleIJOT_EEENSJ_IJOT0_EEEEESL_SO_:
  181|     67|std::pair<std::tuple<F&&>, std::tuple<S&&>> PairArgs(F&& f, S&& s) {
  182|     67|  return {std::piecewise_construct, std::forward_as_tuple(std::forward<F>(f)),
  183|     67|          std::forward_as_tuple(std::forward<S>(s))};
  184|     67|}
_ZN4absl12lts_2024011618container_internal15map_slot_policyINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEE8transferINS7_INS3_4pairIKS9_SD_EEEEEEDaPT_PNS1_13map_slot_typeIS9_SD_EESO_:
  427|     50|                       slot_type* old_slot) {
  428|     50|    auto is_relocatable =
  429|     50|        typename absl::is_trivially_relocatable<value_type>::type();
  430|       |
  431|     50|    emplace(new_slot);
  432|       |#if defined(__cpp_lib_launder) && __cpp_lib_launder >= 201606
  433|       |    if (is_relocatable) {
  434|       |      // TODO(b/247130232,b/251814870): remove casts after fixing warnings.
  435|       |      std::memcpy(static_cast<void*>(std::launder(&new_slot->value)),
  436|       |                  static_cast<const void*>(&old_slot->value),
  437|       |                  sizeof(value_type));
  438|       |      return is_relocatable;
  439|       |    }
  440|       |#endif
  441|       |
  442|     50|    if (kMutableKeys::value) {
  ------------------
  |  Branch (442:9): [True: 50, Folded]
  ------------------
  443|     50|      absl::allocator_traits<Allocator>::construct(
  444|     50|          *alloc, &new_slot->mutable_value, std::move(old_slot->mutable_value));
  445|     50|    } else {
  446|      0|      absl::allocator_traits<Allocator>::construct(*alloc, &new_slot->value,
  447|      0|                                                   std::move(old_slot->value));
  448|      0|    }
  449|     50|    destroy(alloc, old_slot);
  450|     50|    return is_relocatable;
  451|     50|  }
_ZN4absl12lts_2024011618container_internal15map_slot_policyINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEE7emplaceEPNS1_13map_slot_typeIS9_SD_EE:
  348|     82|  static void emplace(slot_type* slot) {
  349|       |    // The construction of union doesn't do anything at runtime but it allows us
  350|       |    // to access its members without violating aliasing rules.
  351|     82|    new (slot) slot_type;
  352|     82|  }
_ZN4absl12lts_2024011618container_internal13map_slot_typeINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEC2Ev:
  329|     82|  map_slot_type() {}
_ZN4absl12lts_2024011618container_internal13DecomposePairINS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS9_INS5_4pairIKSB_SF_EEEEE11HashElementEJRSL_EEEDTclsr15memory_internalE17DecomposePairImplclsr3stdE7forwardIT_Efp_Ecl8PairArgsspclsr3stdE7forwardIT0_Efp0_EEEEOSQ_DpOSR_:
  206|     28|        std::forward<F>(f), PairArgs(std::forward<Args>(args)...))) {
  207|     28|  return memory_internal::DecomposePairImpl(
  208|     28|      std::forward<F>(f), PairArgs(std::forward<Args>(args)...));
  209|     28|}
_ZN4absl12lts_2024011618container_internal15memory_internal17DecomposePairImplINS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENSA_INS6_4pairIKSC_SG_EEEEE11HashElementERSL_NS6_5tupleIJRKSG_EEEEEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEL_ZNS6_L19piecewise_constructEEclsr3stdE7declvalINSR_IJSW_EEEEEclsr3stdE7declvalIT1_EEEEOSV_NSK_ISZ_S10_EE:
  138|     28|DecomposePairImpl(F&& f, std::pair<std::tuple<K>, V> p) {
  139|     28|  const auto& key = std::get<0>(p.first);
  140|     28|  return std::forward<F>(f)(key, std::piecewise_construct, std::move(p.first),
  141|     28|                            std::move(p.second));
  142|     28|}
_ZN4absl12lts_2024011618container_internal15map_slot_policyINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEE9constructINS7_INS3_4pairIKS9_SD_EEEEJRKNS3_21piecewise_construct_tENS3_5tupleIJRSH_EEENSN_IJRKSD_EEEEEEvPT_PNS1_13map_slot_typeIS9_SD_EEDpOT0_:
  383|     32|  static void construct(Allocator* alloc, slot_type* slot, Args&&... args) {
  384|     32|    emplace(slot);
  385|     32|    if (kMutableKeys::value) {
  ------------------
  |  Branch (385:9): [True: 32, Folded]
  ------------------
  386|     32|      absl::allocator_traits<Allocator>::construct(*alloc, &slot->mutable_value,
  387|     32|                                                   std::forward<Args>(args)...);
  388|     32|    } else {
  389|      0|      absl::allocator_traits<Allocator>::construct(*alloc, &slot->value,
  390|      0|                                                   std::forward<Args>(args)...);
  391|      0|    }
  392|     32|  }
_ZN4absl12lts_2024011618container_internal8PairArgsINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS3_4pairINS3_5tupleIJRKT_EEENSF_IJRKT0_EEEEERKNSE_ISG_SK_EE:
  187|     32|    const std::pair<F, S>& p) {
  188|     32|  return PairArgs(p.first, p.second);
  189|     32|}
descriptor.cc:_ZN4absl12lts_2024011618container_internal14DecomposeValueINS1_12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS6_12_GLOBAL__N_120SymbolByFullNameHashENS9_18SymbolByFullNameEqENSt3__19allocatorIS7_EEE12EqualElementIS7_EERS7_EEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEclsr3stdE7declvalISK_EEEEOSJ_OSK_:
  214|     44|DecomposeValue(F&& f, Arg&& arg) {
  215|     44|  const auto& key = arg;
  216|     44|  return std::forward<F>(f)(key, std::forward<Arg>(arg));
  217|     44|}
descriptor.cc:_ZN4absl12lts_2024011618container_internal14DecomposeValueINS1_12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS6_12_GLOBAL__N_121DescriptorsByNameHashIS7_EENSB_19DescriptorsByNameEqIS7_EENSt3__19allocatorIS9_EEE12EqualElementIS9_EERS9_EEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEclsr3stdE7declvalISO_EEEEOSN_OSO_:
  214|      1|DecomposeValue(F&& f, Arg&& arg) {
  215|      1|  const auto& key = arg;
  216|      1|  return std::forward<F>(f)(key, std::forward<Arg>(arg));
  217|      1|}
_ZN4absl12lts_2024011618container_internal23SanitizerUnpoisonObjectINS1_13map_slot_typeINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorEEEEEvPKT_:
  248|      1|inline void SanitizerUnpoisonObject(const T* object) {
  249|      1|  SanitizerUnpoisonMemoryRegion(object, sizeof(T));
  250|      1|}
_ZN4absl12lts_2024011618container_internal15map_slot_policyINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS6_15FieldDescriptorEE7emplaceEPNS1_13map_slot_typeISA_SD_EE:
  348|      1|  static void emplace(slot_type* slot) {
  349|       |    // The construction of union doesn't do anything at runtime but it allows us
  350|       |    // to access its members without violating aliasing rules.
  351|      1|    new (slot) slot_type;
  352|      1|  }
_ZN4absl12lts_2024011618container_internal13map_slot_typeINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS6_15FieldDescriptorEEC2Ev:
  329|      1|  map_slot_type() {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal14DecomposeValueINS1_12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS6_12_GLOBAL__N_116ParentNumberHashENSB_14ParentNumberEqENSt3__19allocatorIS9_EEE19EmplaceDecomposableERKPS7_EEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEclsr3stdE7declvalISN_EEEEOSM_OSN_:
  214|     95|DecomposeValue(F&& f, Arg&& arg) {
  215|     95|  const auto& key = arg;
  216|     95|  return std::forward<F>(f)(key, std::forward<Arg>(arg));
  217|     95|}
descriptor.cc:_ZN4absl12lts_2024011618container_internal14DecomposeValueINS1_12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS6_12_GLOBAL__N_116ParentNumberHashENSB_14ParentNumberEqENSt3__19allocatorIS9_EEE12EqualElementIPS7_EERS9_EEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEclsr3stdE7declvalISN_EEEEOSM_OSN_:
  214|      3|DecomposeValue(F&& f, Arg&& arg) {
  215|      3|  const auto& key = arg;
  216|      3|  return std::forward<F>(f)(key, std::forward<Arg>(arg));
  217|      3|}
descriptor.cc:_ZN4absl12lts_2024011618container_internal14DecomposeValueINS1_12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS6_12_GLOBAL__N_116ParentNumberHashENSB_14ParentNumberEqENSt3__19allocatorIS9_EEE11HashElementERS9_EEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEclsr3stdE7declvalISL_EEEEOSK_OSL_:
  214|    112|DecomposeValue(F&& f, Arg&& arg) {
  215|    112|  const auto& key = arg;
  216|    112|  return std::forward<F>(f)(key, std::forward<Arg>(arg));
  217|    112|}
descriptor.cc:_ZN4absl12lts_2024011618container_internal14DecomposeValueINS1_12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS6_12_GLOBAL__N_120SymbolByFullNameHashENS9_18SymbolByFullNameEqENSt3__19allocatorIS7_EEE19EmplaceDecomposableERKS7_EEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEclsr3stdE7declvalISK_EEEEOSJ_OSK_:
  214|    504|DecomposeValue(F&& f, Arg&& arg) {
  215|    504|  const auto& key = arg;
  216|    504|  return std::forward<F>(f)(key, std::forward<Arg>(arg));
  217|    504|}
descriptor.cc:_ZN4absl12lts_2024011618container_internal14DecomposeValueINS1_12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS6_12_GLOBAL__N_120SymbolByFullNameHashENS9_18SymbolByFullNameEqENSt3__19allocatorIS7_EEE11HashElementERS7_EEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEclsr3stdE7declvalISJ_EEEEOSI_OSJ_:
  214|    882|DecomposeValue(F&& f, Arg&& arg) {
  215|    882|  const auto& key = arg;
  216|    882|  return std::forward<F>(f)(key, std::forward<Arg>(arg));
  217|    882|}
descriptor.cc:_ZN4absl12lts_2024011618container_internal14DecomposeValueINS1_12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS6_12_GLOBAL__N_118SymbolByParentHashENS9_16SymbolByParentEqENSt3__19allocatorIS7_EEE19EmplaceDecomposableERKS7_EEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEclsr3stdE7declvalISK_EEEEOSJ_OSK_:
  214|    688|DecomposeValue(F&& f, Arg&& arg) {
  215|    688|  const auto& key = arg;
  216|    688|  return std::forward<F>(f)(key, std::forward<Arg>(arg));
  217|    688|}
descriptor.cc:_ZN4absl12lts_2024011618container_internal14DecomposeValueINS1_12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS6_12_GLOBAL__N_118SymbolByParentHashENS9_16SymbolByParentEqENSt3__19allocatorIS7_EEE12EqualElementIS7_EERS7_EEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEclsr3stdE7declvalISK_EEEEOSJ_OSK_:
  214|     51|DecomposeValue(F&& f, Arg&& arg) {
  215|     51|  const auto& key = arg;
  216|     51|  return std::forward<F>(f)(key, std::forward<Arg>(arg));
  217|     51|}
descriptor.cc:_ZN4absl12lts_2024011618container_internal14DecomposeValueINS1_12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS6_12_GLOBAL__N_118SymbolByParentHashENS9_16SymbolByParentEqENSt3__19allocatorIS7_EEE11HashElementERS7_EEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEclsr3stdE7declvalISJ_EEEEOSI_OSJ_:
  214|    868|DecomposeValue(F&& f, Arg&& arg) {
  215|    868|  const auto& key = arg;
  216|    868|  return std::forward<F>(f)(key, std::forward<Arg>(arg));
  217|    868|}
descriptor.cc:_ZN4absl12lts_2024011618container_internal14DecomposeValueINS1_12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS6_12_GLOBAL__N_121DescriptorsByNameHashIS7_EENSB_19DescriptorsByNameEqIS7_EENSt3__19allocatorIS9_EEE19EmplaceDecomposableERKS9_EEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEclsr3stdE7declvalISO_EEEEOSN_OSO_:
  214|      4|DecomposeValue(F&& f, Arg&& arg) {
  215|      4|  const auto& key = arg;
  216|      4|  return std::forward<F>(f)(key, std::forward<Arg>(arg));
  217|      4|}
descriptor.cc:_ZN4absl12lts_2024011618container_internal14DecomposeValueINS1_12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS6_12_GLOBAL__N_116ParentNumberHashENSB_14ParentNumberEqENSt3__19allocatorIS9_EEE19EmplaceDecomposableERKPS7_EEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEclsr3stdE7declvalISN_EEEEOSM_OSN_:
  214|    108|DecomposeValue(F&& f, Arg&& arg) {
  215|    108|  const auto& key = arg;
  216|    108|  return std::forward<F>(f)(key, std::forward<Arg>(arg));
  217|    108|}
descriptor.cc:_ZN4absl12lts_2024011618container_internal14DecomposeValueINS1_12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS6_12_GLOBAL__N_116ParentNumberHashENSB_14ParentNumberEqENSt3__19allocatorIS9_EEE12EqualElementIPS7_EERS9_EEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEclsr3stdE7declvalISN_EEEEOSM_OSN_:
  214|      9|DecomposeValue(F&& f, Arg&& arg) {
  215|      9|  const auto& key = arg;
  216|      9|  return std::forward<F>(f)(key, std::forward<Arg>(arg));
  217|      9|}
descriptor.cc:_ZN4absl12lts_2024011618container_internal14DecomposeValueINS1_12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS6_12_GLOBAL__N_116ParentNumberHashENSB_14ParentNumberEqENSt3__19allocatorIS9_EEE11HashElementERS9_EEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEclsr3stdE7declvalISL_EEEEOSK_OSL_:
  214|     98|DecomposeValue(F&& f, Arg&& arg) {
  215|     98|  const auto& key = arg;
  216|     98|  return std::forward<F>(f)(key, std::forward<Arg>(arg));
  217|     98|}
_ZN4absl12lts_2024011618container_internal8AllocateILm8ENSt3__19allocatorINS3_4pairIKNS5_IPKN6google8protobuf10DescriptorEiEEPKNS7_15FieldDescriptorEEEEEEEPvPT0_m:
   55|      1|void* Allocate(Alloc* alloc, size_t n) {
   56|      1|  static_assert(Alignment > 0, "");
   57|      1|  assert(n && "n must be positive");
   58|      1|  using M = AlignedType<Alignment>;
   59|      1|  using A = typename absl::allocator_traits<Alloc>::template rebind_alloc<M>;
   60|      1|  using AT = typename absl::allocator_traits<Alloc>::template rebind_traits<M>;
   61|       |  // On macOS, "mem_alloc" is a #define with one argument defined in
   62|       |  // rpc/types.h, so we can't name the variable "mem_alloc" and initialize it
   63|       |  // with the "foo(bar)" syntax.
   64|      1|  A my_mem_alloc(*alloc);
   65|      1|  void* p = AT::allocate(my_mem_alloc, (n + sizeof(M) - 1) / sizeof(M));
   66|       |  assert(reinterpret_cast<uintptr_t>(p) % Alignment == 0 &&
   67|      1|         "allocator does not respect alignment");
   68|      1|  return p;
   69|      1|}
_ZN4absl12lts_2024011618container_internal15map_slot_policyINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS6_15FieldDescriptorEE9constructINS3_9allocatorINS4_IKSA_SD_EEEEJSI_EEEvPT_PNS1_13map_slot_typeISA_SD_EEDpOT0_:
  383|      1|  static void construct(Allocator* alloc, slot_type* slot, Args&&... args) {
  384|      1|    emplace(slot);
  385|      1|    if (kMutableKeys::value) {
  ------------------
  |  Branch (385:9): [True: 1, Folded]
  ------------------
  386|      1|      absl::allocator_traits<Allocator>::construct(*alloc, &slot->mutable_value,
  387|      1|                                                   std::forward<Args>(args)...);
  388|      1|    } else {
  389|      0|      absl::allocator_traits<Allocator>::construct(*alloc, &slot->value,
  390|      0|                                                   std::forward<Args>(args)...);
  391|      0|    }
  392|      1|  }
_ZN4absl12lts_2024011618container_internal15map_slot_policyINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS6_15FieldDescriptorEE7elementEPNS1_13map_slot_typeISA_SD_EE:
  359|      1|  static value_type& element(slot_type* slot) { return slot->value; }
_ZN4absl12lts_2024011618container_internal13DecomposePairINS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEENS5_10unique_ptrIN6google8protobuf10FeatureSetENS5_14default_deleteISF_EEEEEENS1_10StringHashENS1_8StringEqENS9_INS5_4pairIKSB_SI_EEEEE12EqualElementISB_EEJRSO_EEEDTclsr15memory_internalE17DecomposePairImplclsr3stdE7forwardIT_Efp_Ecl8PairArgsspclsr3stdE7forwardIT0_Efp0_EEEEOSU_DpOSV_:
  206|    235|        std::forward<F>(f), PairArgs(std::forward<Args>(args)...))) {
  207|    235|  return memory_internal::DecomposePairImpl(
  208|    235|      std::forward<F>(f), PairArgs(std::forward<Args>(args)...));
  209|    235|}
_ZN4absl12lts_2024011618container_internal15memory_internal17DecomposePairImplINS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEENS6_10unique_ptrIN6google8protobuf10FeatureSetENS6_14default_deleteISG_EEEEEENS1_10StringHashENS1_8StringEqENSA_INS6_4pairIKSC_SJ_EEEEE12EqualElementISC_EERSO_NS6_5tupleIJRKSJ_EEEEEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEL_ZNS6_L19piecewise_constructEEclsr3stdE7declvalINSV_IJS10_EEEEEclsr3stdE7declvalIT1_EEEEOSZ_NSN_IS13_S14_EE:
  138|    235|DecomposePairImpl(F&& f, std::pair<std::tuple<K>, V> p) {
  139|    235|  const auto& key = std::get<0>(p.first);
  140|    235|  return std::forward<F>(f)(key, std::piecewise_construct, std::move(p.first),
  141|    235|                            std::move(p.second));
  142|    235|}
_ZN4absl12lts_2024011618container_internal8PairArgsIKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS3_10unique_ptrIN6google8protobuf10FeatureSetENS3_14default_deleteISE_EEEEEENS3_4pairINS3_5tupleIJRKT_EEENSJ_IJRKT0_EEEEERKNSI_ISK_SO_EE:
  187|    235|    const std::pair<F, S>& p) {
  188|    235|  return PairArgs(p.first, p.second);
  189|    235|}
_ZN4absl12lts_2024011618container_internal8PairArgsIRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERKNS3_10unique_ptrIN6google8protobuf10FeatureSetENS3_14default_deleteISF_EEEEEENS3_4pairINS3_5tupleIJOT_EEENSM_IJOT0_EEEEESO_SR_:
  181|    235|std::pair<std::tuple<F&&>, std::tuple<S&&>> PairArgs(F&& f, S&& s) {
  182|    235|  return {std::piecewise_construct, std::forward_as_tuple(std::forward<F>(f)),
  183|    235|          std::forward_as_tuple(std::forward<S>(s))};
  184|    235|}
_ZN4absl12lts_2024011618container_internal15map_slot_policyINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS3_10unique_ptrIN6google8protobuf10FeatureSetENS3_14default_deleteISD_EEEEE8transferINS7_INS3_4pairIKS9_SG_EEEEEEDaPT_PNS1_13map_slot_typeIS9_SG_EESR_:
  427|      4|                       slot_type* old_slot) {
  428|      4|    auto is_relocatable =
  429|      4|        typename absl::is_trivially_relocatable<value_type>::type();
  430|       |
  431|      4|    emplace(new_slot);
  432|       |#if defined(__cpp_lib_launder) && __cpp_lib_launder >= 201606
  433|       |    if (is_relocatable) {
  434|       |      // TODO(b/247130232,b/251814870): remove casts after fixing warnings.
  435|       |      std::memcpy(static_cast<void*>(std::launder(&new_slot->value)),
  436|       |                  static_cast<const void*>(&old_slot->value),
  437|       |                  sizeof(value_type));
  438|       |      return is_relocatable;
  439|       |    }
  440|       |#endif
  441|       |
  442|      4|    if (kMutableKeys::value) {
  ------------------
  |  Branch (442:9): [True: 4, Folded]
  ------------------
  443|      4|      absl::allocator_traits<Allocator>::construct(
  444|      4|          *alloc, &new_slot->mutable_value, std::move(old_slot->mutable_value));
  445|      4|    } else {
  446|      0|      absl::allocator_traits<Allocator>::construct(*alloc, &new_slot->value,
  447|      0|                                                   std::move(old_slot->value));
  448|      0|    }
  449|      4|    destroy(alloc, old_slot);
  450|      4|    return is_relocatable;
  451|      4|  }
_ZN4absl12lts_2024011618container_internal15map_slot_policyINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS3_10unique_ptrIN6google8protobuf10FeatureSetENS3_14default_deleteISD_EEEEE7emplaceEPNS1_13map_slot_typeIS9_SG_EE:
  348|      8|  static void emplace(slot_type* slot) {
  349|       |    // The construction of union doesn't do anything at runtime but it allows us
  350|       |    // to access its members without violating aliasing rules.
  351|      8|    new (slot) slot_type;
  352|      8|  }
_ZN4absl12lts_2024011618container_internal13map_slot_typeINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS3_10unique_ptrIN6google8protobuf10FeatureSetENS3_14default_deleteISD_EEEEEC2Ev:
  329|      8|  map_slot_type() {}
_ZN4absl12lts_2024011618container_internal15map_slot_policyINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS3_10unique_ptrIN6google8protobuf10FeatureSetENS3_14default_deleteISD_EEEEE9constructINS7_INS3_4pairIKS9_SG_EEEEJRKNS3_21piecewise_construct_tENS3_5tupleIJOS9_EEENSQ_IJEEEEEEvPT_PNS1_13map_slot_typeIS9_SG_EEDpOT0_:
  383|      4|  static void construct(Allocator* alloc, slot_type* slot, Args&&... args) {
  384|      4|    emplace(slot);
  385|      4|    if (kMutableKeys::value) {
  ------------------
  |  Branch (385:9): [True: 4, Folded]
  ------------------
  386|      4|      absl::allocator_traits<Allocator>::construct(*alloc, &slot->mutable_value,
  387|      4|                                                   std::forward<Args>(args)...);
  388|      4|    } else {
  389|      0|      absl::allocator_traits<Allocator>::construct(*alloc, &slot->value,
  390|      0|                                                   std::forward<Args>(args)...);
  391|      0|    }
  392|      4|  }
_ZN4absl12lts_2024011618container_internal14DecomposeValueINS1_12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS5_EEE19EmplaceDecomposableERKNS9_12basic_stringIcNS9_11char_traitsIcEENSA_IcEEEEEEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEclsr3stdE7declvalISM_EEEEOSL_OSM_:
  214|      3|DecomposeValue(F&& f, Arg&& arg) {
  215|      3|  const auto& key = arg;
  216|      3|  return std::forward<F>(f)(key, std::forward<Arg>(arg));
  217|      3|}
_ZN4absl12lts_2024011618container_internal8AllocateILm8ENSt3__19allocatorIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryEEEEEPvPT0_m:
   55|      6|void* Allocate(Alloc* alloc, size_t n) {
   56|      6|  static_assert(Alignment > 0, "");
   57|      6|  assert(n && "n must be positive");
   58|      6|  using M = AlignedType<Alignment>;
   59|      6|  using A = typename absl::allocator_traits<Alloc>::template rebind_alloc<M>;
   60|      6|  using AT = typename absl::allocator_traits<Alloc>::template rebind_traits<M>;
   61|       |  // On macOS, "mem_alloc" is a #define with one argument defined in
   62|       |  // rpc/types.h, so we can't name the variable "mem_alloc" and initialize it
   63|       |  // with the "foo(bar)" syntax.
   64|      6|  A my_mem_alloc(*alloc);
   65|      6|  void* p = AT::allocate(my_mem_alloc, (n + sizeof(M) - 1) / sizeof(M));
   66|       |  assert(reinterpret_cast<uintptr_t>(p) % Alignment == 0 &&
   67|      6|         "allocator does not respect alignment");
   68|      6|  return p;
   69|      6|}
_ZN4absl12lts_2024011618container_internal23SanitizerUnpoisonObjectIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryEEEvPKT_:
  248|     10|inline void SanitizerUnpoisonObject(const T* object) {
  249|     10|  SanitizerUnpoisonMemoryRegion(object, sizeof(T));
  250|     10|}
_ZN4absl12lts_2024011618container_internal21SanitizerPoisonObjectIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryEEEvPKT_:
  243|      8|inline void SanitizerPoisonObject(const T* object) {
  244|      8|  SanitizerPoisonMemoryRegion(object, sizeof(T));
  245|      8|}
_ZN4absl12lts_2024011618container_internal10DeallocateILm8ENSt3__19allocatorIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryEEEEEvPT0_Pvm:
   74|      5|void Deallocate(Alloc* alloc, void* p, size_t n) {
   75|      5|  static_assert(Alignment > 0, "");
   76|      5|  assert(n && "n must be positive");
   77|      5|  using M = AlignedType<Alignment>;
   78|      5|  using A = typename absl::allocator_traits<Alloc>::template rebind_alloc<M>;
   79|      5|  using AT = typename absl::allocator_traits<Alloc>::template rebind_traits<M>;
   80|       |  // On macOS, "mem_alloc" is a #define with one argument defined in
   81|       |  // rpc/types.h, so we can't name the variable "mem_alloc" and initialize it
   82|       |  // with the "foo(bar)" syntax.
   83|      5|  A my_mem_alloc(*alloc);
   84|      5|  AT::deallocate(my_mem_alloc, static_cast<M*>(p),
   85|      5|                 (n + sizeof(M) - 1) / sizeof(M));
   86|      5|}
_ZN4absl12lts_2024011618container_internal8AllocateILm8ENSt3__19allocatorIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryEEEEEPvPT0_m:
   55|      1|void* Allocate(Alloc* alloc, size_t n) {
   56|      1|  static_assert(Alignment > 0, "");
   57|      1|  assert(n && "n must be positive");
   58|      1|  using M = AlignedType<Alignment>;
   59|      1|  using A = typename absl::allocator_traits<Alloc>::template rebind_alloc<M>;
   60|      1|  using AT = typename absl::allocator_traits<Alloc>::template rebind_traits<M>;
   61|       |  // On macOS, "mem_alloc" is a #define with one argument defined in
   62|       |  // rpc/types.h, so we can't name the variable "mem_alloc" and initialize it
   63|       |  // with the "foo(bar)" syntax.
   64|      1|  A my_mem_alloc(*alloc);
   65|      1|  void* p = AT::allocate(my_mem_alloc, (n + sizeof(M) - 1) / sizeof(M));
   66|       |  assert(reinterpret_cast<uintptr_t>(p) % Alignment == 0 &&
   67|      1|         "allocator does not respect alignment");
   68|      1|  return p;
   69|      1|}
_ZN4absl12lts_2024011618container_internal23SanitizerUnpoisonObjectIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryEEEvPKT_:
  248|      1|inline void SanitizerUnpoisonObject(const T* object) {
  249|      1|  SanitizerUnpoisonMemoryRegion(object, sizeof(T));
  250|      1|}
_ZN4absl12lts_2024011618container_internal21SanitizerPoisonObjectIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryEEEvPKT_:
  243|      1|inline void SanitizerPoisonObject(const T* object) {
  244|      1|  SanitizerPoisonMemoryRegion(object, sizeof(T));
  245|      1|}
_ZN4absl12lts_2024011618container_internal10DeallocateILm8ENSt3__19allocatorIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryEEEEEvPT0_Pvm:
   74|      1|void Deallocate(Alloc* alloc, void* p, size_t n) {
   75|      1|  static_assert(Alignment > 0, "");
   76|      1|  assert(n && "n must be positive");
   77|      1|  using M = AlignedType<Alignment>;
   78|      1|  using A = typename absl::allocator_traits<Alloc>::template rebind_alloc<M>;
   79|      1|  using AT = typename absl::allocator_traits<Alloc>::template rebind_traits<M>;
   80|       |  // On macOS, "mem_alloc" is a #define with one argument defined in
   81|       |  // rpc/types.h, so we can't name the variable "mem_alloc" and initialize it
   82|       |  // with the "foo(bar)" syntax.
   83|      1|  A my_mem_alloc(*alloc);
   84|      1|  AT::deallocate(my_mem_alloc, static_cast<M*>(p),
   85|      1|                 (n + sizeof(M) - 1) / sizeof(M));
   86|      1|}
_ZN4absl12lts_2024011618container_internal8AllocateILm8ENSt3__19allocatorIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryEEEEEPvPT0_m:
   55|     20|void* Allocate(Alloc* alloc, size_t n) {
   56|     20|  static_assert(Alignment > 0, "");
   57|     20|  assert(n && "n must be positive");
   58|     20|  using M = AlignedType<Alignment>;
   59|     20|  using A = typename absl::allocator_traits<Alloc>::template rebind_alloc<M>;
   60|     20|  using AT = typename absl::allocator_traits<Alloc>::template rebind_traits<M>;
   61|       |  // On macOS, "mem_alloc" is a #define with one argument defined in
   62|       |  // rpc/types.h, so we can't name the variable "mem_alloc" and initialize it
   63|       |  // with the "foo(bar)" syntax.
   64|     20|  A my_mem_alloc(*alloc);
   65|     20|  void* p = AT::allocate(my_mem_alloc, (n + sizeof(M) - 1) / sizeof(M));
   66|       |  assert(reinterpret_cast<uintptr_t>(p) % Alignment == 0 &&
   67|     20|         "allocator does not respect alignment");
   68|     20|  return p;
   69|     20|}
_ZN4absl12lts_2024011618container_internal23SanitizerUnpoisonObjectIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryEEEvPKT_:
  248|    307|inline void SanitizerUnpoisonObject(const T* object) {
  249|    307|  SanitizerUnpoisonMemoryRegion(object, sizeof(T));
  250|    307|}
_ZN4absl12lts_2024011618container_internal21SanitizerPoisonObjectIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryEEEvPKT_:
  243|    288|inline void SanitizerPoisonObject(const T* object) {
  244|    288|  SanitizerPoisonMemoryRegion(object, sizeof(T));
  245|    288|}
_ZN4absl12lts_2024011618container_internal10DeallocateILm8ENSt3__19allocatorIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryEEEEEvPT0_Pvm:
   74|     16|void Deallocate(Alloc* alloc, void* p, size_t n) {
   75|     16|  static_assert(Alignment > 0, "");
   76|     16|  assert(n && "n must be positive");
   77|     16|  using M = AlignedType<Alignment>;
   78|     16|  using A = typename absl::allocator_traits<Alloc>::template rebind_alloc<M>;
   79|     16|  using AT = typename absl::allocator_traits<Alloc>::template rebind_traits<M>;
   80|       |  // On macOS, "mem_alloc" is a #define with one argument defined in
   81|       |  // rpc/types.h, so we can't name the variable "mem_alloc" and initialize it
   82|       |  // with the "foo(bar)" syntax.
   83|     16|  A my_mem_alloc(*alloc);
   84|     16|  AT::deallocate(my_mem_alloc, static_cast<M*>(p),
   85|     16|                 (n + sizeof(M) - 1) / sizeof(M));
   86|     16|}
_ZN4absl12lts_2024011618container_internal21SanitizerPoisonObjectIPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEEEvPKT_:
  243|      3|inline void SanitizerPoisonObject(const T* object) {
  244|      3|  SanitizerPoisonMemoryRegion(object, sizeof(T));
  245|      3|}
_ZN4absl12lts_2024011618container_internal23SanitizerUnpoisonObjectIPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEEEvPKT_:
  248|     14|inline void SanitizerUnpoisonObject(const T* object) {
  249|     14|  SanitizerUnpoisonMemoryRegion(object, sizeof(T));
  250|     14|}
message.cc:_ZN4absl12lts_2024011618container_internal14DecomposeValueINS1_12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS6_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSD_18DescriptorByNameEqENSt3__19allocatorISA_EEE19EmplaceDecomposableERKSA_EEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEclsr3stdE7declvalISO_EEEEOSN_OSO_:
  214|      6|DecomposeValue(F&& f, Arg&& arg) {
  215|      6|  const auto& key = arg;
  216|      6|  return std::forward<F>(f)(key, std::forward<Arg>(arg));
  217|      6|}
message.cc:_ZN4absl12lts_2024011618container_internal14DecomposeValueINS1_12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS6_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSD_18DescriptorByNameEqENSt3__19allocatorISA_EEE12EqualElementISA_EERSA_EEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEclsr3stdE7declvalISO_EEEEOSN_OSO_:
  214|      2|DecomposeValue(F&& f, Arg&& arg) {
  215|      2|  const auto& key = arg;
  216|      2|  return std::forward<F>(f)(key, std::forward<Arg>(arg));
  217|      2|}

_ZNK4absl12lts_2024011618container_internal10StringHashclENS0_11string_viewE:
   77|    781|  size_t operator()(absl::string_view v) const {
   78|    781|    return absl::Hash<absl::string_view>{}(v);
   79|    781|  }
_ZNK4absl12lts_2024011618container_internal8StringEqclENS0_11string_viewES3_:
   87|    242|  bool operator()(absl::string_view lhs, absl::string_view rhs) const {
   88|    242|    return lhs == rhs;
   89|    242|  }
_ZN4absl12lts_2024011618container_internal6HashEqIPKN6google8protobuf14FileDescriptorEvE5ToPtrES7_:
  175|    104|  static const T* ToPtr(const T* ptr) { return ptr; }
_ZNK4absl12lts_2024011618container_internal6HashEqIPKN6google8protobuf14FileDescriptorEvE4HashclIS7_EEmRKT_:
  162|    104|    size_t operator()(const U& ptr) const {
  163|    104|      return absl::Hash<const T*>{}(HashEq::ToPtr(ptr));
  164|    104|    }

extension_set.cc:_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEEvE5applyINS1_12raw_hash_setIS8_NS6_12_GLOBAL__N_115ExtensionHasherENSC_11ExtensionEqENSt3__19allocatorIS7_EEE12EqualElementINSC_16ExtensionInfoKeyEEEJRS7_ES8_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSO_DpOSP_:
  133|      8|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|      8|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|      8|  }
extension_set.cc:_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEEvE5applyINS1_12raw_hash_setIS8_NS6_12_GLOBAL__N_115ExtensionHasherENSC_11ExtensionEqENSt3__19allocatorIS7_EEE19EmplaceDecomposableEJRKS7_ES8_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSN_DpOSO_:
  133|      1|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|      1|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|      1|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEEvE5applyINS1_12raw_hash_setIS7_NS5_12_GLOBAL__N_120SymbolByFullNameHashENSB_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE12EqualElementINSB_13FullNameQueryEEEJRS6_ES7_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSN_DpOSO_:
  133|    105|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|    105|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|    105|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEEvE5applyINS1_12raw_hash_setIS9_NS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSD_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE12EqualElementINS0_11string_viewEEEJRS8_ES9_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSR_DpOSS_:
  133|      7|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|      7|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|      7|  }
_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEEvE5applyINS1_12raw_hash_setISF_NS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE19EmplaceDecomposableEJRKNSL_ISA_SE_EEESF_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSV_DpOSW_:
  133|     32|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|     32|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|     32|  }
_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEEvE5applyINS1_12raw_hash_setISF_NS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE12EqualElementISA_EEJRSN_ESF_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSU_DpOSV_:
  133|      7|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|      7|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|      7|  }
_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEEvE5applyINS1_12raw_hash_setISF_NS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE11HashElementEJRSN_ESF_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOST_DpOSU_:
  133|     28|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|     28|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|     28|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEEvE5applyINS1_12raw_hash_setIS7_NS5_12_GLOBAL__N_120SymbolByFullNameHashENSB_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE12EqualElementIS6_EEJRS6_ES7_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSM_DpOSN_:
  133|     44|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|     44|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|     44|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEEvE5applyINS1_12raw_hash_setIS9_NS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSD_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE12EqualElementIS8_EEJRS8_ES9_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSQ_DpOSR_:
  133|      1|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|      1|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|      1|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEEvE5applyINS1_12raw_hash_setIS9_NS5_12_GLOBAL__N_116ParentNumberHashENSD_14ParentNumberEqENSt3__19allocatorIS8_EEE19EmplaceDecomposableEJRKPS6_ES9_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSP_DpOSQ_:
  133|     95|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|     95|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|     95|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEEvE5applyINS1_12raw_hash_setIS9_NS5_12_GLOBAL__N_116ParentNumberHashENSD_14ParentNumberEqENSt3__19allocatorIS8_EEE12EqualElementIPS6_EEJRS8_ES9_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSP_DpOSQ_:
  133|      3|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|      3|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|      3|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEEvE5applyINS1_12raw_hash_setIS9_NS5_12_GLOBAL__N_116ParentNumberHashENSD_14ParentNumberEqENSt3__19allocatorIS8_EEE11HashElementEJRS8_ES9_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSN_DpOSO_:
  133|    112|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|    112|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|    112|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEEvE5applyINS1_12raw_hash_setIS7_NS5_12_GLOBAL__N_120SymbolByFullNameHashENSB_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE19EmplaceDecomposableEJRKS6_ES7_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSM_DpOSN_:
  133|    504|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|    504|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|    504|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEEvE5applyINS1_12raw_hash_setIS7_NS5_12_GLOBAL__N_120SymbolByFullNameHashENSB_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE11HashElementEJRS6_ES7_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSL_DpOSM_:
  133|    882|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|    882|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|    882|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEEvE5applyINS1_12raw_hash_setIS7_NS5_12_GLOBAL__N_118SymbolByParentHashENSB_16SymbolByParentEqENSt3__19allocatorIS6_EEE19EmplaceDecomposableEJRKS6_ES7_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSM_DpOSN_:
  133|    688|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|    688|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|    688|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEEvE5applyINS1_12raw_hash_setIS7_NS5_12_GLOBAL__N_118SymbolByParentHashENSB_16SymbolByParentEqENSt3__19allocatorIS6_EEE12EqualElementIS6_EEJRS6_ES7_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSM_DpOSN_:
  133|     51|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|     51|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|     51|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEEvE5applyINS1_12raw_hash_setIS7_NS5_12_GLOBAL__N_118SymbolByParentHashENSB_16SymbolByParentEqENSt3__19allocatorIS6_EEE11HashElementEJRS6_ES7_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSL_DpOSM_:
  133|    868|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|    868|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|    868|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEEvE5applyINS1_12raw_hash_setIS9_NS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSD_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE19EmplaceDecomposableEJRKS8_ES9_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSQ_DpOSR_:
  133|      4|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|      4|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|      4|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEEvE5applyINS1_12raw_hash_setIS9_NS5_12_GLOBAL__N_116ParentNumberHashENSD_14ParentNumberEqENSt3__19allocatorIS8_EEE19EmplaceDecomposableEJRKPS6_ES9_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSP_DpOSQ_:
  133|    108|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|    108|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|    108|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEEvE5applyINS1_12raw_hash_setIS9_NS5_12_GLOBAL__N_116ParentNumberHashENSD_14ParentNumberEqENSt3__19allocatorIS8_EEE12EqualElementIPS6_EEJRS8_ES9_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSP_DpOSQ_:
  133|      9|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|      9|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|      9|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEEvE5applyINS1_12raw_hash_setIS9_NS5_12_GLOBAL__N_116ParentNumberHashENSD_14ParentNumberEqENSt3__19allocatorIS8_EEE11HashElementEJRS8_ES9_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSN_DpOSO_:
  133|     98|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|     98|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|     98|  }
_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEEvE5applyINS1_12raw_hash_setISI_NS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE12EqualElementISA_EEJRSQ_ESI_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSX_DpOSY_:
  133|    235|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|    235|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|    235|  }
_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashSetPolicyINS0_11string_viewEEEvE5applyINS1_12raw_hash_setIS5_NS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE19EmplaceDecomposableEJRKNSB_12basic_stringIcNSB_11char_traitsIcEENSC_IcEEEEES5_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSO_DpOSP_:
  133|      3|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|      3|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|      3|  }
message.cc:_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEEvE5applyINS1_12raw_hash_setISA_NS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSF_18DescriptorByNameEqENSt3__19allocatorIS9_EEE19EmplaceDecomposableEJRKS9_ESA_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSQ_DpOSR_:
  133|      6|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|      6|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|      6|  }
message.cc:_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEEvE5applyINS1_12raw_hash_setISA_NS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSF_18DescriptorByNameEqENSt3__19allocatorIS9_EEE12EqualElementIS9_EEJRS9_ESA_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSQ_DpOSR_:
  133|      2|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|      2|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|      2|  }

_ZN4absl12lts_2024011618container_internal20HashtablezInfoHandleC2EDn:
  187|     20|  explicit HashtablezInfoHandle(std::nullptr_t) {}
_ZN4absl12lts_2024011618container_internal20HashtablezInfoHandle10UnregisterEv:
  189|      3|  inline void Unregister() {}
_ZNK4absl12lts_2024011618container_internal20HashtablezInfoHandle9IsSampledEv:
  190|     83|  inline bool IsSampled() const { return false; }
_ZN4absl12lts_2024011618container_internal20HashtablezInfoHandle12RecordRehashEm:
  192|     25|  inline void RecordRehash(size_t /*total_probe_length*/) {}
_ZN4absl12lts_2024011618container_internal20HashtablezInfoHandle12RecordInsertEmm:
  195|  1.44k|  inline void RecordInsert(size_t /*hash*/, size_t /*distance_from_desired*/) {}
_ZN4absl12lts_2024011618container_internal6SampleEm:
  210|     20|    size_t inline_element_size ABSL_ATTRIBUTE_UNUSED) {
  211|       |#if defined(ABSL_INTERNAL_HASHTABLEZ_SAMPLE)
  212|       |  if (ABSL_PREDICT_TRUE(--global_next_sample.next_sample > 0)) {
  213|       |    return HashtablezInfoHandle(nullptr);
  214|       |  }
  215|       |  return HashtablezInfoHandle(
  216|       |      SampleSlow(global_next_sample, inline_element_size));
  217|       |#else
  218|     20|  return HashtablezInfoHandle(nullptr);
  219|     20|#endif  // !ABSL_PER_THREAD_TLS
  220|     20|}

_ZN4absl12lts_2024011618container_internal15internal_layout11adl_barrier5AlignEmm:
  276|  8.70k|constexpr size_t Align(size_t n, size_t m) { return (n + m - 1) & ~(m - 1); }
_ZN4absl12lts_2024011618container_internal6LayoutIJN6google8protobuf8internal22SerialArenaChunkHeaderENSt3__16atomicIPvEENS8_IPNS5_11SerialArenaEEEEE7PartialIJEEENS1_15internal_layout10LayoutImplINS7_5tupleIJS6_SA_SD_EEE18__make_integer_seqINS7_16integer_sequenceEmXsZT_EESK_ISL_mXclL_ZNSG_11adl_barrier3MinEmmEsZT0_plsZT_Li1EEEEEEDpOT_:
  707|      8|  static constexpr PartialType<sizeof...(Sizes)> Partial(Sizes&&... sizes) {
  708|      8|    static_assert(sizeof...(Sizes) <= sizeof...(Ts), "");
  709|      8|    return PartialType<sizeof...(Sizes)>(absl::forward<Sizes>(sizes)...);
  710|      8|  }
_ZN4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJN6google8protobuf8internal22SerialArenaChunkHeaderENS4_6atomicIPvEENSA_IPNS8_11SerialArenaEEEEEENS4_16integer_sequenceImJEEENSH_ImJLm0EEEEEC2Ev:
  367|      8|      : size_{sizes...} {}
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJN6google8protobuf8internal22SerialArenaChunkHeaderENS4_6atomicIPvEENSA_IPNS8_11SerialArenaEEEEEENS4_16integer_sequenceImJEEENSH_ImJLm0EEEEE6OffsetILm0ETnNS4_9enable_ifIXeqT_Li0EEiE4typeELi0EEEmv:
  384|      8|  constexpr size_t Offset() const {
  385|      8|    return 0;
  386|      8|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJN6google8protobuf8internal22SerialArenaChunkHeaderENS4_6atomicIPvEENSA_IPNS8_11SerialArenaEEEEEENS4_16integer_sequenceImJEEENSH_ImJLm0EEEEE7PointerILm0EKcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_ESG_E4typeESR_E4typeEPSO_:
  460|      8|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|      8|    using C = typename std::remove_const<Char>::type;
  462|      8|    static_assert(
  463|      8|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|      8|            std::is_same<C, signed char>(),
  465|      8|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|      8|    constexpr size_t alignment = Alignment();
  467|      8|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|      8|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|      8|  }
_ZN4absl12lts_2024011618container_internal6LayoutIJPNS1_10btree_nodeINS1_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS8_15FieldDescriptorENS5_4lessISC_EENS5_9allocatorINS6_IKSC_SF_EEEELi256ELb0EEEEEjhNS1_13map_slot_typeISC_SF_EESO_EEC2Emmmmm:
  721|     24|      : internal_layout::LayoutType<sizeof...(Ts), Ts...>(sizes...) {}
_ZN4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10map_paramsINS4_4pairIPKN6google8protobuf10DescriptorEiEEPKNSA_15FieldDescriptorENS4_4lessISE_EENS4_9allocatorINS8_IKSE_SH_EEEELi256ELb0EEEEEjhNS1_13map_slot_typeISE_SH_EESQ_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESV_EC2Emmmmm:
  367|     24|      : size_{sizes...} {}
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10map_paramsINS4_4pairIPKN6google8protobuf10DescriptorEiEEPKNSA_15FieldDescriptorENS4_4lessISE_EENS4_9allocatorINS8_IKSE_SH_EEEELi256ELb0EEEEEjhNS1_13map_slot_typeISE_SH_EESQ_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESV_E7PointerILm2EKcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_EST_E4typeES13_E4typeEPS10_:
  460|     12|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|     12|    using C = typename std::remove_const<Char>::type;
  462|     12|    static_assert(
  463|     12|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|     12|            std::is_same<C, signed char>(),
  465|     12|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|     12|    constexpr size_t alignment = Alignment();
  467|     12|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|     12|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|     12|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10map_paramsINS4_4pairIPKN6google8protobuf10DescriptorEiEEPKNSA_15FieldDescriptorENS4_4lessISE_EENS4_9allocatorINS8_IKSE_SH_EEEELi256ELb0EEEEEjhNS1_13map_slot_typeISE_SH_EESQ_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESV_E6OffsetILm2ETnNS4_9enable_ifIXneT_Li0EEiE4typeELi0EEEmv:
  389|     22|  constexpr size_t Offset() const {
  390|     22|    static_assert(N < NumOffsets, "Index out of bounds");
  391|     22|    return adl_barrier::Align(
  392|     22|        Offset<N - 1>() + SizeOf<ElementType<N - 1>>::value * size_[N - 1],
  393|     22|        ElementAlignment<N>::value);
  394|     22|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10map_paramsINS4_4pairIPKN6google8protobuf10DescriptorEiEEPKNSA_15FieldDescriptorENS4_4lessISE_EENS4_9allocatorINS8_IKSE_SH_EEEELi256ELb0EEEEEjhNS1_13map_slot_typeISE_SH_EESQ_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESV_E6OffsetILm1ETnNS4_9enable_ifIXneT_Li0EEiE4typeELi0EEEmv:
  389|     22|  constexpr size_t Offset() const {
  390|     22|    static_assert(N < NumOffsets, "Index out of bounds");
  391|     22|    return adl_barrier::Align(
  392|     22|        Offset<N - 1>() + SizeOf<ElementType<N - 1>>::value * size_[N - 1],
  393|     22|        ElementAlignment<N>::value);
  394|     22|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10map_paramsINS4_4pairIPKN6google8protobuf10DescriptorEiEEPKNSA_15FieldDescriptorENS4_4lessISE_EENS4_9allocatorINS8_IKSE_SH_EEEELi256ELb0EEEEEjhNS1_13map_slot_typeISE_SH_EESQ_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESV_E6OffsetILm0ETnNS4_9enable_ifIXeqT_Li0EEiE4typeELi0EEEmv:
  384|     24|  constexpr size_t Offset() const {
  385|     24|    return 0;
  386|     24|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10map_paramsINS4_4pairIPKN6google8protobuf10DescriptorEiEEPKNSA_15FieldDescriptorENS4_4lessISE_EENS4_9allocatorINS8_IKSE_SH_EEEELi256ELb0EEEEEjhNS1_13map_slot_typeISE_SH_EESQ_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESV_E7PointerILm3EcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_EST_E4typeES12_E4typeEPSZ_:
  460|      4|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|      4|    using C = typename std::remove_const<Char>::type;
  462|      4|    static_assert(
  463|      4|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|      4|            std::is_same<C, signed char>(),
  465|      4|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|      4|    constexpr size_t alignment = Alignment();
  467|      4|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|      4|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|      4|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10map_paramsINS4_4pairIPKN6google8protobuf10DescriptorEiEEPKNSA_15FieldDescriptorENS4_4lessISE_EENS4_9allocatorINS8_IKSE_SH_EEEELi256ELb0EEEEEjhNS1_13map_slot_typeISE_SH_EESQ_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESV_E6OffsetILm3ETnNS4_9enable_ifIXneT_Li0EEiE4typeELi0EEEmv:
  389|      5|  constexpr size_t Offset() const {
  390|      5|    static_assert(N < NumOffsets, "Index out of bounds");
  391|      5|    return adl_barrier::Align(
  392|      5|        Offset<N - 1>() + SizeOf<ElementType<N - 1>>::value * size_[N - 1],
  393|      5|        ElementAlignment<N>::value);
  394|      5|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10map_paramsINS4_4pairIPKN6google8protobuf10DescriptorEiEEPKNSA_15FieldDescriptorENS4_4lessISE_EENS4_9allocatorINS8_IKSE_SH_EEEELi256ELb0EEEEEjhNS1_13map_slot_typeISE_SH_EESQ_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESV_E9AllocSizeEv:
  582|      1|  constexpr size_t AllocSize() const {
  583|      1|    static_assert(NumTypes == NumSizes, "You must specify sizes of all fields");
  584|      1|    return Offset<NumTypes - 1>() +
  585|      1|        SizeOf<ElementType<NumTypes - 1>>::value * size_[NumTypes - 1];
  586|      1|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10map_paramsINS4_4pairIPKN6google8protobuf10DescriptorEiEEPKNSA_15FieldDescriptorENS4_4lessISE_EENS4_9allocatorINS8_IKSE_SH_EEEELi256ELb0EEEEEjhNS1_13map_slot_typeISE_SH_EESQ_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESV_E6OffsetILm4ETnNS4_9enable_ifIXneT_Li0EEiE4typeELi0EEEmv:
  389|      1|  constexpr size_t Offset() const {
  390|      1|    static_assert(N < NumOffsets, "Index out of bounds");
  391|      1|    return adl_barrier::Align(
  392|      1|        Offset<N - 1>() + SizeOf<ElementType<N - 1>>::value * size_[N - 1],
  393|      1|        ElementAlignment<N>::value);
  394|      1|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10map_paramsINS4_4pairIPKN6google8protobuf10DescriptorEiEEPKNSA_15FieldDescriptorENS4_4lessISE_EENS4_9allocatorINS8_IKSE_SH_EEEELi256ELb0EEEEEjhNS1_13map_slot_typeISE_SH_EESQ_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESV_E7PointerILm0EKcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_EST_E4typeES13_E4typeEPS10_:
  460|      1|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|      1|    using C = typename std::remove_const<Char>::type;
  462|      1|    static_assert(
  463|      1|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|      1|            std::is_same<C, signed char>(),
  465|      1|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|      1|    constexpr size_t alignment = Alignment();
  467|      1|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|      1|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|      1|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10map_paramsINS4_4pairIPKN6google8protobuf10DescriptorEiEEPKNSA_15FieldDescriptorENS4_4lessISE_EENS4_9allocatorINS8_IKSE_SH_EEEELi256ELb0EEEEEjhNS1_13map_slot_typeISE_SH_EESQ_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESV_E7PointerILm2EcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_EST_E4typeES12_E4typeEPSZ_:
  460|      5|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|      5|    using C = typename std::remove_const<Char>::type;
  462|      5|    static_assert(
  463|      5|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|      5|            std::is_same<C, signed char>(),
  465|      5|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|      5|    constexpr size_t alignment = Alignment();
  467|      5|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|      5|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|      5|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10map_paramsINS4_4pairIPKN6google8protobuf10DescriptorEiEEPKNSA_15FieldDescriptorENS4_4lessISE_EENS4_9allocatorINS8_IKSE_SH_EEEELi256ELb0EEEEEjhNS1_13map_slot_typeISE_SH_EESQ_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESV_E7PointerILm0EcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_EST_E4typeES12_E4typeEPSZ_:
  460|      1|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|      1|    using C = typename std::remove_const<Char>::type;
  462|      1|    static_assert(
  463|      1|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|      1|            std::is_same<C, signed char>(),
  465|      1|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|      1|    constexpr size_t alignment = Alignment();
  467|      1|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|      1|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|      1|  }
_ZN4absl12lts_2024011618container_internal6LayoutIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS8_11FileCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEjhS9_SG_EEC2Emmmmm:
  721|    219|      : internal_layout::LayoutType<sizeof...(Ts), Ts...>(sizes...) {}
_ZN4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENSB_11FileCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_EC2Emmmmm:
  367|    219|      : size_{sizes...} {}
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENSB_11FileCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E9AllocSizeEv:
  582|     11|  constexpr size_t AllocSize() const {
  583|     11|    static_assert(NumTypes == NumSizes, "You must specify sizes of all fields");
  584|     11|    return Offset<NumTypes - 1>() +
  585|     11|        SizeOf<ElementType<NumTypes - 1>>::value * size_[NumTypes - 1];
  586|     11|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENSB_11FileCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E6OffsetILm4ETnNS4_9enable_ifIXneT_Li0EEiE4typeELi0EEEmv:
  389|     11|  constexpr size_t Offset() const {
  390|     11|    static_assert(N < NumOffsets, "Index out of bounds");
  391|     11|    return adl_barrier::Align(
  392|     11|        Offset<N - 1>() + SizeOf<ElementType<N - 1>>::value * size_[N - 1],
  393|     11|        ElementAlignment<N>::value);
  394|     11|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENSB_11FileCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E6OffsetILm3ETnNS4_9enable_ifIXneT_Li0EEiE4typeELi0EEEmv:
  389|     55|  constexpr size_t Offset() const {
  390|     55|    static_assert(N < NumOffsets, "Index out of bounds");
  391|     55|    return adl_barrier::Align(
  392|     55|        Offset<N - 1>() + SizeOf<ElementType<N - 1>>::value * size_[N - 1],
  393|     55|        ElementAlignment<N>::value);
  394|     55|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENSB_11FileCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E6OffsetILm2ETnNS4_9enable_ifIXneT_Li0EEiE4typeELi0EEEmv:
  389|    203|  constexpr size_t Offset() const {
  390|    203|    static_assert(N < NumOffsets, "Index out of bounds");
  391|    203|    return adl_barrier::Align(
  392|    203|        Offset<N - 1>() + SizeOf<ElementType<N - 1>>::value * size_[N - 1],
  393|    203|        ElementAlignment<N>::value);
  394|    203|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENSB_11FileCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E6OffsetILm1ETnNS4_9enable_ifIXneT_Li0EEiE4typeELi0EEEmv:
  389|    203|  constexpr size_t Offset() const {
  390|    203|    static_assert(N < NumOffsets, "Index out of bounds");
  391|    203|    return adl_barrier::Align(
  392|    203|        Offset<N - 1>() + SizeOf<ElementType<N - 1>>::value * size_[N - 1],
  393|    203|        ElementAlignment<N>::value);
  394|    203|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENSB_11FileCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E6OffsetILm0ETnNS4_9enable_ifIXeqT_Li0EEiE4typeELi0EEEmv:
  384|    219|  constexpr size_t Offset() const {
  385|    219|    return 0;
  386|    219|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENSB_11FileCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E7PointerILm0EcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_ESJ_E4typeESS_E4typeEPSP_:
  460|      6|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|      6|    using C = typename std::remove_const<Char>::type;
  462|      6|    static_assert(
  463|      6|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|      6|            std::is_same<C, signed char>(),
  465|      6|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|      6|    constexpr size_t alignment = Alignment();
  467|      6|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|      6|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|      6|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENSB_11FileCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E7PointerILm2EcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_ESJ_E4typeESS_E4typeEPSP_:
  460|     36|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|     36|    using C = typename std::remove_const<Char>::type;
  462|     36|    static_assert(
  463|     36|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|     36|            std::is_same<C, signed char>(),
  465|     36|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|     36|    constexpr size_t alignment = Alignment();
  467|     36|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|     36|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|     36|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENSB_11FileCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E7PointerILm3EcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_ESJ_E4typeESS_E4typeEPSP_:
  460|     41|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|     41|    using C = typename std::remove_const<Char>::type;
  462|     41|    static_assert(
  463|     41|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|     41|            std::is_same<C, signed char>(),
  465|     41|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|     41|    constexpr size_t alignment = Alignment();
  467|     41|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|     41|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|     41|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENSB_11FileCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E7PointerILm3EKcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_ESJ_E4typeEST_E4typeEPSQ_:
  460|      3|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|      3|    using C = typename std::remove_const<Char>::type;
  462|      3|    static_assert(
  463|      3|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|      3|            std::is_same<C, signed char>(),
  465|      3|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|      3|    constexpr size_t alignment = Alignment();
  467|      3|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|      3|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|      3|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENSB_11FileCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E7PointerILm2EKcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_ESJ_E4typeEST_E4typeEPSQ_:
  460|    112|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|    112|    using C = typename std::remove_const<Char>::type;
  462|    112|    static_assert(
  463|    112|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|    112|            std::is_same<C, signed char>(),
  465|    112|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|    112|    constexpr size_t alignment = Alignment();
  467|    112|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|    112|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|    112|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENSB_11FileCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E7PointerILm0EKcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_ESJ_E4typeEST_E4typeEPSQ_:
  460|     10|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|     10|    using C = typename std::remove_const<Char>::type;
  462|     10|    static_assert(
  463|     10|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|     10|            std::is_same<C, signed char>(),
  465|     10|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|     10|    constexpr size_t alignment = Alignment();
  467|     10|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|     10|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|     10|  }
_ZN4absl12lts_2024011618container_internal6LayoutIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS8_16ExtensionCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEjhS9_SG_EEC2Emmmmm:
  721|     39|      : internal_layout::LayoutType<sizeof...(Ts), Ts...>(sizes...) {}
_ZN4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENSB_16ExtensionCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_EC2Emmmmm:
  367|     39|      : size_{sizes...} {}
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENSB_16ExtensionCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E9AllocSizeEv:
  582|      2|  constexpr size_t AllocSize() const {
  583|      2|    static_assert(NumTypes == NumSizes, "You must specify sizes of all fields");
  584|      2|    return Offset<NumTypes - 1>() +
  585|      2|        SizeOf<ElementType<NumTypes - 1>>::value * size_[NumTypes - 1];
  586|      2|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENSB_16ExtensionCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E6OffsetILm4ETnNS4_9enable_ifIXneT_Li0EEiE4typeELi0EEEmv:
  389|      2|  constexpr size_t Offset() const {
  390|      2|    static_assert(N < NumOffsets, "Index out of bounds");
  391|      2|    return adl_barrier::Align(
  392|      2|        Offset<N - 1>() + SizeOf<ElementType<N - 1>>::value * size_[N - 1],
  393|      2|        ElementAlignment<N>::value);
  394|      2|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENSB_16ExtensionCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E6OffsetILm3ETnNS4_9enable_ifIXneT_Li0EEiE4typeELi0EEEmv:
  389|      8|  constexpr size_t Offset() const {
  390|      8|    static_assert(N < NumOffsets, "Index out of bounds");
  391|      8|    return adl_barrier::Align(
  392|      8|        Offset<N - 1>() + SizeOf<ElementType<N - 1>>::value * size_[N - 1],
  393|      8|        ElementAlignment<N>::value);
  394|      8|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENSB_16ExtensionCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E6OffsetILm2ETnNS4_9enable_ifIXneT_Li0EEiE4typeELi0EEEmv:
  389|     35|  constexpr size_t Offset() const {
  390|     35|    static_assert(N < NumOffsets, "Index out of bounds");
  391|     35|    return adl_barrier::Align(
  392|     35|        Offset<N - 1>() + SizeOf<ElementType<N - 1>>::value * size_[N - 1],
  393|     35|        ElementAlignment<N>::value);
  394|     35|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENSB_16ExtensionCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E6OffsetILm1ETnNS4_9enable_ifIXneT_Li0EEiE4typeELi0EEEmv:
  389|     35|  constexpr size_t Offset() const {
  390|     35|    static_assert(N < NumOffsets, "Index out of bounds");
  391|     35|    return adl_barrier::Align(
  392|     35|        Offset<N - 1>() + SizeOf<ElementType<N - 1>>::value * size_[N - 1],
  393|     35|        ElementAlignment<N>::value);
  394|     35|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENSB_16ExtensionCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E6OffsetILm0ETnNS4_9enable_ifIXeqT_Li0EEiE4typeELi0EEEmv:
  384|     39|  constexpr size_t Offset() const {
  385|     39|    return 0;
  386|     39|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENSB_16ExtensionCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E7PointerILm0EcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_ESJ_E4typeESS_E4typeEPSP_:
  460|      1|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|      1|    using C = typename std::remove_const<Char>::type;
  462|      1|    static_assert(
  463|      1|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|      1|            std::is_same<C, signed char>(),
  465|      1|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|      1|    constexpr size_t alignment = Alignment();
  467|      1|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|      1|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|      1|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENSB_16ExtensionCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E7PointerILm2EcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_ESJ_E4typeESS_E4typeEPSP_:
  460|      5|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|      5|    using C = typename std::remove_const<Char>::type;
  462|      5|    static_assert(
  463|      5|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|      5|            std::is_same<C, signed char>(),
  465|      5|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|      5|    constexpr size_t alignment = Alignment();
  467|      5|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|      5|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|      5|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENSB_16ExtensionCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E7PointerILm3EcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_ESJ_E4typeESS_E4typeEPSP_:
  460|      6|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|      6|    using C = typename std::remove_const<Char>::type;
  462|      6|    static_assert(
  463|      6|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|      6|            std::is_same<C, signed char>(),
  465|      6|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|      6|    constexpr size_t alignment = Alignment();
  467|      6|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|      6|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|      6|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENSB_16ExtensionCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E7PointerILm2EKcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_ESJ_E4typeEST_E4typeEPSQ_:
  460|     22|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|     22|    using C = typename std::remove_const<Char>::type;
  462|     22|    static_assert(
  463|     22|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|     22|            std::is_same<C, signed char>(),
  465|     22|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|     22|    constexpr size_t alignment = Alignment();
  467|     22|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|     22|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|     22|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENSB_16ExtensionCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E7PointerILm0EKcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_ESJ_E4typeEST_E4typeEPSQ_:
  460|      3|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|      3|    using C = typename std::remove_const<Char>::type;
  462|      3|    static_assert(
  463|      3|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|      3|            std::is_same<C, signed char>(),
  465|      3|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|      3|    constexpr size_t alignment = Alignment();
  467|      3|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|      3|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|      3|  }
_ZN4absl12lts_2024011618container_internal6LayoutIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEjhS9_SG_EEC2Emmmmm:
  721|  3.70k|      : internal_layout::LayoutType<sizeof...(Ts), Ts...>(sizes...) {}
_ZN4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENSB_13SymbolCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_EC2Emmmmm:
  367|  3.70k|      : size_{sizes...} {}
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENSB_13SymbolCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E7PointerILm2EKcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_ESJ_E4typeEST_E4typeEPSQ_:
  460|  2.05k|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|  2.05k|    using C = typename std::remove_const<Char>::type;
  462|  2.05k|    static_assert(
  463|  2.05k|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|  2.05k|            std::is_same<C, signed char>(),
  465|  2.05k|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|  2.05k|    constexpr size_t alignment = Alignment();
  467|  2.05k|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|  2.05k|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|  2.05k|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENSB_13SymbolCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E6OffsetILm2ETnNS4_9enable_ifIXneT_Li0EEiE4typeELi0EEEmv:
  389|  3.40k|  constexpr size_t Offset() const {
  390|  3.40k|    static_assert(N < NumOffsets, "Index out of bounds");
  391|  3.40k|    return adl_barrier::Align(
  392|  3.40k|        Offset<N - 1>() + SizeOf<ElementType<N - 1>>::value * size_[N - 1],
  393|  3.40k|        ElementAlignment<N>::value);
  394|  3.40k|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENSB_13SymbolCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E6OffsetILm1ETnNS4_9enable_ifIXneT_Li0EEiE4typeELi0EEEmv:
  389|  3.40k|  constexpr size_t Offset() const {
  390|  3.40k|    static_assert(N < NumOffsets, "Index out of bounds");
  391|  3.40k|    return adl_barrier::Align(
  392|  3.40k|        Offset<N - 1>() + SizeOf<ElementType<N - 1>>::value * size_[N - 1],
  393|  3.40k|        ElementAlignment<N>::value);
  394|  3.40k|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENSB_13SymbolCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E6OffsetILm0ETnNS4_9enable_ifIXeqT_Li0EEiE4typeELi0EEEmv:
  384|  3.70k|  constexpr size_t Offset() const {
  385|  3.70k|    return 0;
  386|  3.70k|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENSB_13SymbolCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E7PointerILm3EKcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_ESJ_E4typeEST_E4typeEPSQ_:
  460|    459|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|    459|    using C = typename std::remove_const<Char>::type;
  462|    459|    static_assert(
  463|    459|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|    459|            std::is_same<C, signed char>(),
  465|    459|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|    459|    constexpr size_t alignment = Alignment();
  467|    459|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|    459|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|    459|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENSB_13SymbolCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E6OffsetILm3ETnNS4_9enable_ifIXneT_Li0EEiE4typeELi0EEEmv:
  389|  1.13k|  constexpr size_t Offset() const {
  390|  1.13k|    static_assert(N < NumOffsets, "Index out of bounds");
  391|  1.13k|    return adl_barrier::Align(
  392|  1.13k|        Offset<N - 1>() + SizeOf<ElementType<N - 1>>::value * size_[N - 1],
  393|  1.13k|        ElementAlignment<N>::value);
  394|  1.13k|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENSB_13SymbolCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E7PointerILm4EKcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_ESJ_E4typeEST_E4typeEPSQ_:
  460|     94|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|     94|    using C = typename std::remove_const<Char>::type;
  462|     94|    static_assert(
  463|     94|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|     94|            std::is_same<C, signed char>(),
  465|     94|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|     94|    constexpr size_t alignment = Alignment();
  467|     94|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|     94|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|     94|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENSB_13SymbolCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E6OffsetILm4ETnNS4_9enable_ifIXneT_Li0EEiE4typeELi0EEEmv:
  389|    163|  constexpr size_t Offset() const {
  390|    163|    static_assert(N < NumOffsets, "Index out of bounds");
  391|    163|    return adl_barrier::Align(
  392|    163|        Offset<N - 1>() + SizeOf<ElementType<N - 1>>::value * size_[N - 1],
  393|    163|        ElementAlignment<N>::value);
  394|    163|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENSB_13SymbolCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E7PointerILm0EKcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_ESJ_E4typeEST_E4typeEPSQ_:
  460|    282|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|    282|    using C = typename std::remove_const<Char>::type;
  462|    282|    static_assert(
  463|    282|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|    282|            std::is_same<C, signed char>(),
  465|    282|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|    282|    constexpr size_t alignment = Alignment();
  467|    282|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|    282|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|    282|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENSB_13SymbolCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E9AllocSizeEv:
  582|     36|  constexpr size_t AllocSize() const {
  583|     36|    static_assert(NumTypes == NumSizes, "You must specify sizes of all fields");
  584|     36|    return Offset<NumTypes - 1>() +
  585|     36|        SizeOf<ElementType<NumTypes - 1>>::value * size_[NumTypes - 1];
  586|     36|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENSB_13SymbolCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E7PointerILm0EcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_ESJ_E4typeESS_E4typeEPSP_:
  460|     22|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|     22|    using C = typename std::remove_const<Char>::type;
  462|     22|    static_assert(
  463|     22|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|     22|            std::is_same<C, signed char>(),
  465|     22|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|     22|    constexpr size_t alignment = Alignment();
  467|     22|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|     22|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|     22|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENSB_13SymbolCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E7PointerILm2EcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_ESJ_E4typeESS_E4typeEPSP_:
  460|    216|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|    216|    using C = typename std::remove_const<Char>::type;
  462|    216|    static_assert(
  463|    216|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|    216|            std::is_same<C, signed char>(),
  465|    216|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|    216|    constexpr size_t alignment = Alignment();
  467|    216|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|    216|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|    216|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENSB_13SymbolCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E7PointerILm3EcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_ESJ_E4typeESS_E4typeEPSP_:
  460|    510|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|    510|    using C = typename std::remove_const<Char>::type;
  462|    510|    static_assert(
  463|    510|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|    510|            std::is_same<C, signed char>(),
  465|    510|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|    510|    constexpr size_t alignment = Alignment();
  467|    510|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|    510|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|    510|  }
_ZNK4absl12lts_2024011618container_internal15internal_layout10LayoutImplINSt3__15tupleIJPNS1_10btree_nodeINS1_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENSB_13SymbolCompareENS4_9allocatorISC_EELi256ELb0EEEEEjhSC_SI_EEENS4_16integer_sequenceImJLm0ELm1ELm2ELm3ELm4EEEESL_E7PointerILm4EcEEPNS4_11conditionalIXsr3std8is_constIT0_EE5valueEKNS4_13tuple_elementIXT_ESJ_E4typeESS_E4typeEPSP_:
  460|     33|  CopyConst<Char, ElementType<N>>* Pointer(Char* p) const {
  461|     33|    using C = typename std::remove_const<Char>::type;
  462|     33|    static_assert(
  463|     33|        std::is_same<C, char>() || std::is_same<C, unsigned char>() ||
  464|     33|            std::is_same<C, signed char>(),
  465|     33|        "The argument must be a pointer to [const] [signed|unsigned] char");
  466|     33|    constexpr size_t alignment = Alignment();
  467|     33|    (void)alignment;
  468|       |    assert(reinterpret_cast<uintptr_t>(p) % alignment == 0);
  469|     33|    return reinterpret_cast<CopyConst<Char, ElementType<N>>*>(p + Offset<N>());
  470|     33|  }

_ZN4absl12lts_2024011618container_internal12raw_hash_mapINS1_17FlatHashMapPolicyIPKN6google8protobuf14FileDescriptorENSt3__16vectorINS5_14DescriptorPool18DeferredValidation13LifetimesInfoENS9_9allocatorISD_EEEEEENS1_6HashEqIS8_vE4HashENSJ_2EqENSE_INS9_4pairIKS8_SG_EEEEEC2Ev:
   64|      4|  raw_hash_map() {}
_ZN4absl12lts_2024011618container_internal12raw_hash_mapINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEEC2Ev:
   64|      2|  raw_hash_map() {}
_ZN4absl12lts_2024011618container_internal12raw_hash_mapINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEEC2Ev:
   64|      2|  raw_hash_map() {}
_ZN4absl12lts_2024011618container_internal12raw_hash_mapINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPKN6google8protobuf23SourceCodeInfo_LocationEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SF_EEEEEC2Ev:
   64|      4|  raw_hash_map() {}
_ZN4absl12lts_2024011618container_internal12raw_hash_mapINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEEixISA_SI_TnPT_LPSA_0EEEDTclsrT0_5valueclL_ZNS4_9addressofB8nn220000ISN_EESS_RSR_EclL_ZNS4_7declvalB8nn220000IRSN_EEDTclsr3stdE9__declvalISR_ELi0EEEvEEEEEOSR_:
  179|    239|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
  180|       |    // It is safe to use unchecked_deref here because try_emplace
  181|       |    // will always return an iterator pointing to a valid item in the table,
  182|       |    // since it inserts if nothing is found for the given key.
  183|    239|    return Policy::value(
  184|    239|        &this->unchecked_deref(try_emplace(std::forward<K>(key)).first));
  185|    239|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_mapINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE11try_emplaceISA_JETnNS4_9enable_ifIXntsr3std14is_convertibleIT_NS1_12raw_hash_setISI_SJ_SK_SO_E14const_iteratorEEE5valueEiE4typeELi0ETnPSS_LPSA_0EEENSL_INSU_8iteratorEbEEOSS_DpOT0_:
  132|    239|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
  133|    239|    return try_emplace_impl(std::forward<K>(k), std::forward<Args>(args)...);
  134|    239|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_mapINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE16try_emplace_implISA_JEEENSL_INS1_12raw_hash_setISI_SJ_SK_SO_E8iteratorEbEEOT_DpOT0_:
  210|    239|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
  211|    239|    auto res = this->find_or_prepare_insert(k);
  212|    239|    if (res.second)
  ------------------
  |  Branch (212:9): [True: 4, False: 235]
  ------------------
  213|      4|      this->emplace_at(res.first, std::piecewise_construct,
  214|      4|                       std::forward_as_tuple(std::forward<K>(k)),
  215|      4|                       std::forward_as_tuple(std::forward<Args>(args)...));
  216|    239|    return {this->iterator_at(res.first), res.second};
  217|    239|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_mapINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEbEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_bEEEEEC2Ev:
   64|      2|  raw_hash_map() {}
_ZN4absl12lts_2024011618container_internal12raw_hash_mapINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorENS5_17DescriptorBuilder12MessageHintsEEENS1_6HashEqIS8_vE4HashENSD_2EqENSt3__19allocatorINSG_4pairIKS8_SA_EEEEEC2Ev:
   64|      4|  raw_hash_map() {}
_ZN4absl12lts_2024011618container_internal12raw_hash_mapINS1_17FlatHashMapPolicyINSt3__16vectorIiNS4_9allocatorIiEEEES8_EENS0_13hash_internal4HashIS8_EENS4_8equal_toIS8_EENS6_INS4_4pairIKS8_S8_EEEEEC2Ev:
   64|      4|  raw_hash_map() {}
_ZN4absl12lts_2024011618container_internal12raw_hash_mapINS1_17FlatHashMapPolicyINSt3__16vectorIiNS4_9allocatorIiEEEEiEENS0_13hash_internal4HashIS8_EENS4_8equal_toIS8_EENS6_INS4_4pairIKS8_iEEEEEC2Ev:
   64|      4|  raw_hash_map() {}
_ZN4absl12lts_2024011618container_internal12raw_hash_mapINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorEPKNS5_21DynamicMessageFactory8TypeInfoEEENS1_6HashEqIS8_vE4HashENSF_2EqENSt3__19allocatorINSI_4pairIKS8_SC_EEEEEC2Ev:
   64|      6|  raw_hash_map() {}
message.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_mapINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorENS5_12_GLOBAL__N_123GeneratedMessageFactory10MessagePtrEEENS1_6HashEqIS8_vE4HashENSE_2EqENSt3__19allocatorINSH_4pairIKS8_SB_EEEEEC2Ev:
   64|      2|  raw_hash_map() {}

_ZNK4absl12lts_2024011618container_internal19HashSetResizeHelper38GrowIntoSingleGroupShuffleControlBytesEPNS1_6ctrl_tEm:
  276|     38|    ctrl_t* new_ctrl, size_t new_capacity) const {
  277|     38|  assert(is_single_group(new_capacity));
  278|     38|  constexpr size_t kHalfWidth = Group::kWidth / 2;
  279|     38|  assert(old_capacity_ < kHalfWidth);
  280|       |
  281|     38|  const size_t half_old_capacity = old_capacity_ / 2;
  282|       |
  283|       |  // NOTE: operations are done with compile time known size = kHalfWidth.
  284|       |  // Compiler optimizes that into single ASM operation.
  285|       |
  286|       |  // Copy second half of bytes to the beginning.
  287|       |  // We potentially copy more bytes in order to have compile time known size.
  288|       |  // Mirrored bytes from the old_ctrl_ will also be copied.
  289|       |  // In case of old_capacity_ == 3, we will copy 1st element twice.
  290|       |  // Examples:
  291|       |  // old_ctrl = 0S0EEEEEEE...
  292|       |  // new_ctrl = S0EEEEEEEE...
  293|       |  //
  294|       |  // old_ctrl = 01S01EEEEE...
  295|       |  // new_ctrl = 1S01EEEEEE...
  296|       |  //
  297|       |  // old_ctrl = 0123456S0123456EE...
  298|       |  // new_ctrl = 456S0123?????????...
  299|     38|  std::memcpy(new_ctrl, old_ctrl_ + half_old_capacity + 1, kHalfWidth);
  300|       |  // Clean up copied kSentinel from old_ctrl.
  301|     38|  new_ctrl[half_old_capacity] = ctrl_t::kEmpty;
  302|       |
  303|       |  // Clean up damaged or uninitialized bytes.
  304|       |
  305|       |  // Clean bytes after the intended size of the copy.
  306|       |  // Example:
  307|       |  // new_ctrl = 1E01EEEEEEE????
  308|       |  // *new_ctrl= 1E0EEEEEEEE????
  309|       |  // position      /
  310|     38|  std::memset(new_ctrl + old_capacity_ + 1, static_cast<int8_t>(ctrl_t::kEmpty),
  311|     38|              kHalfWidth);
  312|       |  // Clean non-mirrored bytes that are not initialized.
  313|       |  // For small old_capacity that may be inside of mirrored bytes zone.
  314|       |  // Examples:
  315|       |  // new_ctrl = 1E0EEEEEEEE??????????....
  316|       |  // *new_ctrl= 1E0EEEEEEEEEEEEE?????....
  317|       |  // position           /
  318|       |  //
  319|       |  // new_ctrl = 456E0123???????????...
  320|       |  // *new_ctrl= 456E0123EEEEEEEE???...
  321|       |  // position           /
  322|     38|  std::memset(new_ctrl + kHalfWidth, static_cast<int8_t>(ctrl_t::kEmpty),
  323|     38|              kHalfWidth);
  324|       |  // Clean last mirrored bytes that are not initialized
  325|       |  // and will not be overwritten by mirroring.
  326|       |  // Examples:
  327|       |  // new_ctrl = 1E0EEEEEEEEEEEEE????????
  328|       |  // *new_ctrl= 1E0EEEEEEEEEEEEEEEEEEEEE
  329|       |  // position           S       /
  330|       |  //
  331|       |  // new_ctrl = 456E0123EEEEEEEE???????????????
  332|       |  // *new_ctrl= 456E0123EEEEEEEE???????EEEEEEEE
  333|       |  // position                  S       /
  334|     38|  std::memset(new_ctrl + new_capacity + kHalfWidth,
  335|     38|              static_cast<int8_t>(ctrl_t::kEmpty), kHalfWidth);
  336|       |
  337|       |  // Create mirrored bytes. old_capacity_ < kHalfWidth
  338|       |  // Example:
  339|       |  // new_ctrl = 456E0123EEEEEEEE???????EEEEEEEE
  340|       |  // *new_ctrl= 456E0123EEEEEEEE456E0123EEEEEEE
  341|       |  // position                  S/
  342|     38|  ctrl_t g[kHalfWidth];
  343|     38|  std::memcpy(g, new_ctrl, kHalfWidth);
  344|     38|  std::memcpy(new_ctrl + new_capacity + 1, g, kHalfWidth);
  345|       |
  346|       |  // Finally set sentinel to its place.
  347|     38|  new_ctrl[new_capacity] = ctrl_t::kSentinel;
  348|     38|}

_ZN4absl12lts_2024011618container_internal13GroupSse2ImplC2EPKNS1_6ctrl_tE:
  615|  6.07k|  explicit GroupSse2Impl(const ctrl_t* pos) {
  616|  6.07k|    ctrl = _mm_loadu_si128(reinterpret_cast<const __m128i*>(pos));
  617|  6.07k|  }
_ZNK4absl12lts_2024011618container_internal13GroupSse2Impl5MatchEh:
  620|  2.50k|  BitMask<uint16_t, kWidth> Match(h2_t hash) const {
  621|  2.50k|    auto match = _mm_set1_epi8(static_cast<char>(hash));
  622|  2.50k|    BitMask<uint16_t, kWidth> result = BitMask<uint16_t, kWidth>(0);
  623|  2.50k|    result = BitMask<uint16_t, kWidth>(
  624|  2.50k|        static_cast<uint16_t>(_mm_movemask_epi8(_mm_cmpeq_epi8(match, ctrl))));
  625|  2.50k|    return result;
  626|  2.50k|  }
_ZNK4absl12lts_2024011618container_internal13GroupSse2Impl9MaskEmptyEv:
  629|  2.15k|  NonIterableBitMask<uint16_t, kWidth> MaskEmpty() const {
  630|       |#ifdef ABSL_INTERNAL_HAVE_SSSE3
  631|       |    // This only works because ctrl_t::kEmpty is -128.
  632|       |    return NonIterableBitMask<uint16_t, kWidth>(
  633|       |        static_cast<uint16_t>(_mm_movemask_epi8(_mm_sign_epi8(ctrl, ctrl))));
  634|       |#else
  635|  2.15k|    auto match = _mm_set1_epi8(static_cast<char>(ctrl_t::kEmpty));
  636|  2.15k|    return NonIterableBitMask<uint16_t, kWidth>(
  637|  2.15k|        static_cast<uint16_t>(_mm_movemask_epi8(_mm_cmpeq_epi8(match, ctrl))));
  638|  2.15k|#endif
  639|  2.15k|  }
_ZNK4absl12lts_2024011618container_internal13GroupSse2Impl18MaskEmptyOrDeletedEv:
  650|  3.57k|  NonIterableBitMask<uint16_t, kWidth> MaskEmptyOrDeleted() const {
  651|  3.57k|    auto special = _mm_set1_epi8(static_cast<char>(ctrl_t::kSentinel));
  652|  3.57k|    return NonIterableBitMask<uint16_t, kWidth>(static_cast<uint16_t>(
  653|  3.57k|        _mm_movemask_epi8(_mm_cmpgt_epi8_fixed(special, ctrl))));
  654|  3.57k|  }
_ZNK4absl12lts_2024011618container_internal34CommonFieldsGenerationInfoDisabled41should_rehash_for_bug_detection_on_insertEPKNS1_6ctrl_tEm:
  926|  1.44k|  bool should_rehash_for_bug_detection_on_insert(const ctrl_t*, size_t) const {
  927|  1.44k|    return false;
  928|  1.44k|  }
_ZN4absl12lts_2024011618container_internal34CommonFieldsGenerationInfoDisabled36maybe_increment_generation_on_insertEv:
  932|  1.44k|  void maybe_increment_generation_on_insert() {}
_ZN4absl12lts_2024011618container_internal34CommonFieldsGenerationInfoDisabled19set_reserved_growthEm:
  936|     16|  void set_reserved_growth(size_t) {}
_ZN4absl12lts_2024011618container_internal34CommonFieldsGenerationInfoDisabled20set_reservation_sizeEm:
  938|     16|  void set_reservation_size(size_t) {}
_ZNK4absl12lts_2024011618container_internal34CommonFieldsGenerationInfoDisabled10generationEv:
  939|     83|  GenerationType generation() const { return 0; }
_ZN4absl12lts_2024011618container_internal34CommonFieldsGenerationInfoDisabled14set_generationEh:
  940|     83|  void set_generation(GenerationType) {}
_ZNK4absl12lts_2024011618container_internal34CommonFieldsGenerationInfoDisabled14generation_ptrEv:
  941|  3.11k|  GenerationType* generation_ptr() const { return nullptr; }
_ZN4absl12lts_2024011618container_internal34CommonFieldsGenerationInfoDisabled18set_generation_ptrEPh:
  942|     83|  void set_generation_ptr(GenerationType*) {}
_ZN4absl12lts_2024011618container_internal37HashSetIteratorGenerationInfoDisabledC2EPKh:
  965|  3.11k|  explicit HashSetIteratorGenerationInfoDisabled(const GenerationType*) {}
_ZNK4absl12lts_2024011618container_internal37HashSetIteratorGenerationInfoDisabled10generationEv:
  967|    692|  GenerationType generation() const { return 0; }
_ZNK4absl12lts_2024011618container_internal37HashSetIteratorGenerationInfoDisabled14generation_ptrEv:
  969|  1.26k|  const GenerationType* generation_ptr() const { return nullptr; }
_ZNK4absl12lts_2024011618container_internal12CommonFields7controlEv:
 1038|  27.2k|  ctrl_t* control() const { return control_; }
_ZN4absl12lts_2024011618container_internal12CommonFields11set_controlEPNS1_6ctrl_tE:
 1039|     83|  void set_control(ctrl_t* c) { control_ = c; }
_ZNK4absl12lts_2024011618container_internal12CommonFields19backing_array_startEv:
 1040|      3|  void* backing_array_start() const {
 1041|       |    // growth_left (and maybe infoz) is stored before control bytes.
 1042|       |    assert(reinterpret_cast<uintptr_t>(control()) % alignof(size_t) == 0);
 1043|      3|    return control() - ControlOffset(has_infoz());
 1044|      3|  }
_ZNK4absl12lts_2024011618container_internal12CommonFields10slot_arrayEv:
 1047|  8.18k|  void* slot_array() const { return slots_; }
_ZN4absl12lts_2024011618container_internal12CommonFields9set_slotsEPv:
 1048|     83|  void set_slots(void* s) { slots_ = s; }
_ZNK4absl12lts_2024011618container_internal12CommonFields4sizeEv:
 1051|    199|  size_t size() const { return size_ >> HasInfozShift(); }
_ZN4absl12lts_2024011618container_internal12CommonFields14increment_sizeEv:
 1055|  1.44k|  void increment_size() {
 1056|       |    assert(size() < capacity());
 1057|  1.44k|    size_ += size_t{1} << HasInfozShift();
 1058|  1.44k|  }
_ZNK4absl12lts_2024011618container_internal12CommonFields8capacityEv:
 1065|  11.9k|  size_t capacity() const { return capacity_; }
_ZN4absl12lts_2024011618container_internal12CommonFields12set_capacityEm:
 1066|     83|  void set_capacity(size_t c) {
 1067|       |    assert(c == 0 || IsValidCapacity(c));
 1068|     83|    capacity_ = c;
 1069|     83|  }
_ZNK4absl12lts_2024011618container_internal12CommonFields11growth_leftEv:
 1073|  2.89k|  size_t growth_left() const {
 1074|  2.89k|    const size_t* gl_ptr = reinterpret_cast<size_t*>(control()) - 1;
 1075|       |    assert(reinterpret_cast<uintptr_t>(gl_ptr) % alignof(size_t) == 0);
 1076|  2.89k|    return *gl_ptr;
 1077|  2.89k|  }
_ZN4absl12lts_2024011618container_internal12CommonFields15set_growth_leftEm:
 1078|  1.52k|  void set_growth_left(size_t gl) {
 1079|  1.52k|    size_t* gl_ptr = reinterpret_cast<size_t*>(control()) - 1;
 1080|       |    assert(reinterpret_cast<uintptr_t>(gl_ptr) % alignof(size_t) == 0);
 1081|  1.52k|    *gl_ptr = gl;
 1082|  1.52k|  }
_ZNK4absl12lts_2024011618container_internal12CommonFields9has_infozEv:
 1084|  1.62k|  bool has_infoz() const {
 1085|  1.62k|    return ABSL_PREDICT_FALSE((size_ & HasInfozMask()) != 0);
  ------------------
  |  |  178|  1.62k|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:49): [Folded, False: 1.62k]
  |  |  |  Branch (178:58): [True: 0, False: 1.62k]
  |  |  ------------------
  ------------------
 1086|  1.62k|  }
_ZN4absl12lts_2024011618container_internal12CommonFields13set_has_infozEb:
 1087|     83|  void set_has_infoz(bool has_infoz) {
 1088|     83|    size_ = (size() << HasInfozShift()) | static_cast<size_t>(has_infoz);
 1089|     83|  }
_ZN4absl12lts_2024011618container_internal12CommonFields5infozEv:
 1091|  1.53k|  HashtablezInfoHandle infoz() {
 1092|  1.53k|    return has_infoz()
  ------------------
  |  Branch (1092:12): [True: 0, False: 1.53k]
  ------------------
 1093|  1.53k|               ? *reinterpret_cast<HashtablezInfoHandle*>(backing_array_start())
 1094|  1.53k|               : HashtablezInfoHandle();
 1095|  1.53k|  }
_ZNK4absl12lts_2024011618container_internal12CommonFields41should_rehash_for_bug_detection_on_insertEv:
 1101|  1.44k|  bool should_rehash_for_bug_detection_on_insert() const {
 1102|  1.44k|    return CommonFieldsGenerationInfo::
 1103|  1.44k|        should_rehash_for_bug_detection_on_insert(control(), capacity());
 1104|  1.44k|  }
_ZNK4absl12lts_2024011618container_internal12CommonFields10alloc_sizeEmm:
 1118|      3|  size_t alloc_size(size_t slot_size, size_t slot_align) const {
 1119|      3|    return AllocSize(capacity(), slot_size, slot_align, has_infoz());
 1120|      3|  }
_ZN4absl12lts_2024011618container_internal12CommonFields13HasInfozShiftEv:
 1130|  3.35k|  static constexpr size_t HasInfozShift() { return 1; }
_ZN4absl12lts_2024011618container_internal12CommonFields12HasInfozMaskEv:
 1131|  1.62k|  static constexpr size_t HasInfozMask() {
 1132|  1.62k|    return (size_t{1} << HasInfozShift()) - 1;
 1133|  1.62k|  }
_ZN4absl12lts_2024011618container_internal19HashSetResizeHelperC2ERNS1_12CommonFieldsE:
 1525|     83|      : old_ctrl_(c.control()),
 1526|     83|        old_capacity_(c.capacity()),
 1527|     83|        had_infoz_(c.has_infoz()) {}
_ZN4absl12lts_2024011618container_internal19HashSetResizeHelper27FindFirstNonFullAfterResizeERKNS1_12CommonFieldsEmm:
 1537|     83|                                              size_t hash) {
 1538|     83|    if (!IsGrowingIntoSingleGroupApplicable(old_capacity, c.capacity())) {
  ------------------
  |  Branch (1538:9): [True: 25, False: 58]
  ------------------
 1539|     25|      return find_first_non_full(c, hash);
 1540|     25|    }
 1541|       |    // Find a location for the new element non-deterministically.
 1542|       |    // Note that any position is correct.
 1543|       |    // It will located at `half_old_capacity` or one of the other
 1544|       |    // empty slots with approximately 50% probability each.
 1545|     58|    size_t offset = probe(c, hash).offset();
 1546|       |
 1547|       |    // Note that we intentionally use unsigned int underflow.
 1548|     58|    if (offset - (old_capacity + 1) >= old_capacity) {
  ------------------
  |  Branch (1548:9): [True: 44, False: 14]
  ------------------
 1549|       |      // Offset fall on kSentinel or into the mostly occupied first half.
 1550|     44|      offset = old_capacity / 2;
 1551|     44|    }
 1552|       |    assert(IsEmpty(c.control()[offset]));
 1553|     58|    return FindInfo{offset, 0};
 1554|     83|  }
_ZNK4absl12lts_2024011618container_internal19HashSetResizeHelper8old_ctrlEv:
 1556|  2.24k|  ctrl_t* old_ctrl() const { return old_ctrl_; }
_ZNK4absl12lts_2024011618container_internal19HashSetResizeHelper12old_capacityEv:
 1557|  2.35k|  size_t old_capacity() const { return old_capacity_; }
_ZN4absl12lts_2024011618container_internal19HashSetResizeHelper34IsGrowingIntoSingleGroupApplicableEmm:
 1686|    166|                                                 size_t new_capacity) {
 1687|       |    // NOTE that `old_capacity < new_capacity` in order to have
 1688|       |    // `old_capacity < Group::kWidth / 2` to make faster copies of 8 bytes.
 1689|    166|    return is_single_group(new_capacity) && old_capacity < new_capacity;
  ------------------
  |  Branch (1689:12): [True: 116, False: 50]
  |  Branch (1689:45): [True: 116, False: 0]
  ------------------
 1690|    166|  }
_ZNK4absl12lts_2024011618container_internal19HashSetResizeHelper27PoisonSingleGroupEmptySlotsERNS1_12CommonFieldsEm:
 1753|     38|  void PoisonSingleGroupEmptySlots(CommonFields& c, size_t slot_size) const {
 1754|       |    // poison non full items
 1755|    324|    for (size_t i = 0; i < c.capacity(); ++i) {
  ------------------
  |  Branch (1755:24): [True: 286, False: 38]
  ------------------
 1756|    286|      if (!IsFull(c.control()[i])) {
  ------------------
  |  Branch (1756:11): [True: 162, False: 124]
  ------------------
 1757|    162|        SanitizerPoisonMemoryRegion(SlotAddress(c.slot_array(), i, slot_size),
 1758|    162|                                    slot_size);
 1759|    162|      }
 1760|    286|    }
 1761|     38|  }
_ZN4absl12lts_2024011618container_internal23SentinelEmptyGenerationEv:
  252|     83|constexpr GenerationType SentinelEmptyGeneration() { return 0; }
_ZN4absl12lts_2024011618container_internal14NextGenerationEh:
  254|     83|constexpr GenerationType NextGeneration(GenerationType generation) {
  255|     83|  return ++generation == SentinelEmptyGeneration() ? ++generation : generation;
  ------------------
  |  Branch (255:10): [True: 0, False: 83]
  ------------------
  256|     83|}
_ZN4absl12lts_2024011618container_internal18NumGenerationBytesEv:
  263|    232|constexpr size_t NumGenerationBytes() { return 0; }
_ZN4absl12lts_2024011618container_internal10EmptyGroupEv:
  521|    150|inline ctrl_t* EmptyGroup() {
  522|       |  // Const must be cast away here; no uses of this function will actually write
  523|       |  // to it, because it is only used for empty tables.
  524|    150|  return const_cast<ctrl_t*>(kEmptyGroup + 16);
  525|    150|}
_ZN4absl12lts_2024011618container_internal12PerTableSaltEPKNS1_6ctrl_tE:
  545|  5.91k|inline size_t PerTableSalt(const ctrl_t* ctrl) {
  546|       |  // The low bits of the pointer have little or no entropy because of
  547|       |  // alignment. We shift the pointer to try to use higher entropy bits. A
  548|       |  // good number seems to be 12 bits, because that aligns with page size.
  549|  5.91k|  return reinterpret_cast<uintptr_t>(ctrl) >> 12;
  550|  5.91k|}
_ZN4absl12lts_2024011618container_internal2H1EmPKNS1_6ctrl_tE:
  552|  5.91k|inline size_t H1(size_t hash, const ctrl_t* ctrl) {
  553|  5.91k|  return (hash >> 7) ^ PerTableSalt(ctrl);
  554|  5.91k|}
_ZN4absl12lts_2024011618container_internal2H2Em:
  559|  5.94k|inline h2_t H2(size_t hash) { return hash & 0x7F; }
_ZN4absl12lts_2024011618container_internal7IsEmptyENS1_6ctrl_tE:
  562|  1.44k|inline bool IsEmpty(ctrl_t c) { return c == ctrl_t::kEmpty; }
_ZN4absl12lts_2024011618container_internal6IsFullENS1_6ctrl_tE:
  563|  6.09k|inline bool IsFull(ctrl_t c) { return c >= static_cast<ctrl_t>(0); }
_ZN4absl12lts_2024011618container_internal9IsDeletedENS1_6ctrl_tE:
  564|     83|inline bool IsDeleted(ctrl_t c) { return c == ctrl_t::kDeleted; }
_ZN4absl12lts_2024011618container_internal16IsEmptyOrDeletedENS1_6ctrl_tE:
  565|      4|inline bool IsEmptyOrDeleted(ctrl_t c) { return c < ctrl_t::kSentinel; }
_ZN4absl12lts_2024011618container_internal20_mm_cmpgt_epi8_fixedEDv2_xS2_:
  601|  3.57k|inline __m128i _mm_cmpgt_epi8_fixed(__m128i a, __m128i b) {
  602|       |#if defined(__GNUC__) && !defined(__clang__)
  603|       |  if (std::is_unsigned<char>::value) {
  604|       |    const __m128i mask = _mm_set1_epi8(0x80);
  605|       |    const __m128i diff = _mm_subs_epi8(b, a);
  606|       |    return _mm_cmpeq_epi8(_mm_and_si128(diff, mask), mask);
  607|       |  }
  608|       |#endif
  609|  3.57k|  return _mm_cmpgt_epi8(a, b);
  610|  3.57k|}
_ZN4absl12lts_2024011618container_internal13ControlOffsetEb:
  988|    464|inline size_t ControlOffset(bool has_infoz) {
  989|    464|  return (has_infoz ? sizeof(HashtablezInfoHandle) : 0) + sizeof(size_t);
  ------------------
  |  Branch (989:11): [True: 0, False: 464]
  ------------------
  990|    464|}
_ZN4absl12lts_2024011618container_internal14NumClonedBytesEv:
  997|  7.22k|constexpr size_t NumClonedBytes() { return Group::kWidth - 1; }
_ZN4absl12lts_2024011618container_internal16GenerationOffsetEmb:
 1001|    315|inline size_t GenerationOffset(size_t capacity, bool has_infoz) {
 1002|       |  assert(IsValidCapacity(capacity));
 1003|    315|  const size_t num_control_bytes = capacity + 1 + NumClonedBytes();
 1004|    315|  return ControlOffset(has_infoz) + num_control_bytes;
 1005|    315|}
_ZN4absl12lts_2024011618container_internal10SlotOffsetEmmb:
 1009|    232|inline size_t SlotOffset(size_t capacity, size_t slot_align, bool has_infoz) {
 1010|       |  assert(IsValidCapacity(capacity));
 1011|    232|  return (GenerationOffset(capacity, has_infoz) + NumGenerationBytes() +
 1012|    232|          slot_align - 1) &
 1013|    232|         (~slot_align + 1);
 1014|    232|}
_ZN4absl12lts_2024011618container_internal9AllocSizeEmmmb:
 1019|    149|                        bool has_infoz) {
 1020|    149|  return SlotOffset(capacity, slot_align, has_infoz) + capacity * slot_size;
 1021|    149|}
_ZN4absl12lts_2024011618container_internal12NextCapacityEm:
 1167|     83|inline size_t NextCapacity(size_t n) {
 1168|       |  assert(IsValidCapacity(n) || n == 0);
 1169|     83|  return n * 2 + 1;
 1170|     83|}
_ZN4absl12lts_2024011618container_internal16CapacityToGrowthEm:
 1197|     83|inline size_t CapacityToGrowth(size_t capacity) {
 1198|     83|  assert(IsValidCapacity(capacity));
 1199|       |  // `capacity*7/8`
 1200|     83|  if (Group::kWidth == 8 && capacity == 7) {
  ------------------
  |  Branch (1200:7): [Folded, False: 83]
  |  Branch (1200:29): [True: 0, False: 0]
  ------------------
 1201|       |    // x-x/8 does not work when x==7.
 1202|      0|    return 6;
 1203|      0|  }
 1204|     83|  return capacity - capacity / 8;
 1205|     83|}
_ZN4absl12lts_2024011618container_internal12AssertIsFullEPKNS1_6ctrl_tEhPKhPKc:
 1248|    120|                         const char* operation) {
 1249|    120|  if (!SwisstableDebugEnabled()) return;
  ------------------
  |  Branch (1249:7): [True: 120, Folded]
  ------------------
 1250|       |  // `SwisstableDebugEnabled()` is also true for release builds with hardening
 1251|       |  // enabled. To minimize their impact in those builds:
 1252|       |  // - use `ABSL_PREDICT_FALSE()` to provide a compiler hint for code layout
 1253|       |  // - use `ABSL_RAW_LOG()` with a format string to reduce code size and improve
 1254|       |  //   the chances that the hot paths will be inlined.
 1255|      0|  if (ABSL_PREDICT_FALSE(ctrl == nullptr)) {
  ------------------
  |  |  178|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 0]
  |  |  |  Branch (178:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1256|      0|    ABSL_RAW_LOG(FATAL, "%s called on end() iterator.", operation);
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1257|      0|  }
 1258|      0|  if (ABSL_PREDICT_FALSE(ctrl == EmptyGroup())) {
  ------------------
  |  |  178|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 0]
  |  |  |  Branch (178:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1259|      0|    ABSL_RAW_LOG(FATAL, "%s called on default-constructed iterator.",
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1260|      0|                 operation);
 1261|      0|  }
 1262|      0|  if (SwisstableGenerationsEnabled()) {
  ------------------
  |  Branch (1262:7): [Folded, False: 0]
  ------------------
 1263|      0|    if (ABSL_PREDICT_FALSE(generation != *generation_ptr)) {
  ------------------
  |  |  178|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 0]
  |  |  |  Branch (178:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1264|      0|      ABSL_RAW_LOG(FATAL,
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1265|      0|                   "%s called on invalid iterator. The table could have "
 1266|      0|                   "rehashed or moved since this iterator was initialized.",
 1267|      0|                   operation);
 1268|      0|    }
 1269|      0|    if (ABSL_PREDICT_FALSE(!IsFull(*ctrl))) {
  ------------------
  |  |  178|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 0]
  |  |  |  Branch (178:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1270|      0|      ABSL_RAW_LOG(
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1271|      0|          FATAL,
 1272|      0|          "%s called on invalid iterator. The element was likely erased.",
 1273|      0|          operation);
 1274|      0|    }
 1275|      0|  } else {
 1276|      0|    if (ABSL_PREDICT_FALSE(!IsFull(*ctrl))) {
  ------------------
  |  |  178|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 0]
  |  |  |  Branch (178:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1277|       |      ABSL_RAW_LOG(
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1278|      0|          FATAL,
 1279|      0|          "%s called on invalid iterator. The element might have been erased "
 1280|      0|          "or the table might have rehashed. Consider running with "
 1281|      0|          "--config=asan to diagnose rehashing issues.",
 1282|      0|          operation);
 1283|      0|    }
 1284|      0|  }
 1285|      0|}
_ZN4absl12lts_2024011618container_internal26AssertIsValidForComparisonEPKNS1_6ctrl_tEhPKh:
 1290|    572|                                       const GenerationType* generation_ptr) {
 1291|    572|  if (!SwisstableDebugEnabled()) return;
  ------------------
  |  Branch (1291:7): [True: 572, Folded]
  ------------------
 1292|      0|  const bool ctrl_is_valid_for_comparison =
 1293|      0|      ctrl == nullptr || ctrl == EmptyGroup() || IsFull(*ctrl);
  ------------------
  |  Branch (1293:7): [True: 0, False: 0]
  |  Branch (1293:26): [True: 0, False: 0]
  |  Branch (1293:50): [True: 0, False: 0]
  ------------------
 1294|      0|  if (SwisstableGenerationsEnabled()) {
  ------------------
  |  Branch (1294:7): [Folded, False: 0]
  ------------------
 1295|      0|    if (ABSL_PREDICT_FALSE(generation != *generation_ptr)) {
  ------------------
  |  |  178|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 0]
  |  |  |  Branch (178:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1296|      0|      ABSL_RAW_LOG(FATAL,
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1297|      0|                   "Invalid iterator comparison. The table could have rehashed "
 1298|      0|                   "or moved since this iterator was initialized.");
 1299|      0|    }
 1300|      0|    if (ABSL_PREDICT_FALSE(!ctrl_is_valid_for_comparison)) {
  ------------------
  |  |  178|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 0]
  |  |  |  Branch (178:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1301|      0|      ABSL_RAW_LOG(
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1302|      0|          FATAL, "Invalid iterator comparison. The element was likely erased.");
 1303|      0|    }
 1304|      0|  } else {
 1305|      0|    ABSL_HARDENING_ASSERT(
  ------------------
  |  |  128|      0|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      0|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1306|      0|        ctrl_is_valid_for_comparison &&
 1307|      0|        "Invalid iterator comparison. The element might have been erased or "
 1308|      0|        "the table might have rehashed. Consider running with --config=asan to "
 1309|      0|        "diagnose rehashing issues.");
 1310|      0|  }
 1311|      0|}
_ZN4absl12lts_2024011618container_internal19AssertSameContainerEPKNS1_6ctrl_tES4_RKPKvS8_PKhSA_:
 1339|    286|                                const GenerationType* generation_ptr_b) {
 1340|    286|  if (!SwisstableDebugEnabled()) return;
  ------------------
  |  Branch (1340:7): [True: 286, Folded]
  ------------------
 1341|       |  // `SwisstableDebugEnabled()` is also true for release builds with hardening
 1342|       |  // enabled. To minimize their impact in those builds:
 1343|       |  // - use `ABSL_PREDICT_FALSE()` to provide a compiler hint for code layout
 1344|       |  // - use `ABSL_RAW_LOG()` with a format string to reduce code size and improve
 1345|       |  //   the chances that the hot paths will be inlined.
 1346|      0|  const bool a_is_default = ctrl_a == EmptyGroup();
 1347|      0|  const bool b_is_default = ctrl_b == EmptyGroup();
 1348|      0|  if (ABSL_PREDICT_FALSE(a_is_default != b_is_default)) {
  ------------------
  |  |  178|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 0]
  |  |  |  Branch (178:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1349|      0|    ABSL_RAW_LOG(
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1350|      0|        FATAL,
 1351|      0|        "Invalid iterator comparison. Comparing default-constructed iterator "
 1352|      0|        "with non-default-constructed iterator.");
 1353|      0|  }
 1354|      0|  if (a_is_default && b_is_default) return;
  ------------------
  |  Branch (1354:7): [True: 0, False: 0]
  |  Branch (1354:23): [True: 0, False: 0]
  ------------------
 1355|       |
 1356|      0|  if (SwisstableGenerationsEnabled()) {
  ------------------
  |  Branch (1356:7): [Folded, False: 0]
  ------------------
 1357|      0|    if (ABSL_PREDICT_TRUE(generation_ptr_a == generation_ptr_b)) return;
  ------------------
  |  |  179|      0|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 0, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 0]
  |  |  |  Branch (179:57): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1358|      0|    const bool a_is_empty = IsEmptyGeneration(generation_ptr_a);
 1359|      0|    const bool b_is_empty = IsEmptyGeneration(generation_ptr_b);
 1360|      0|    if (a_is_empty != b_is_empty) {
  ------------------
  |  Branch (1360:9): [True: 0, False: 0]
  ------------------
 1361|      0|      ABSL_RAW_LOG(FATAL,
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1362|      0|                   "Invalid iterator comparison. Comparing iterator from a "
 1363|      0|                   "non-empty hashtable with an iterator from an empty "
 1364|      0|                   "hashtable.");
 1365|      0|    }
 1366|      0|    if (a_is_empty && b_is_empty) {
  ------------------
  |  Branch (1366:9): [True: 0, False: 0]
  |  Branch (1366:23): [True: 0, False: 0]
  ------------------
 1367|      0|      ABSL_RAW_LOG(FATAL,
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1368|      0|                   "Invalid iterator comparison. Comparing iterators from "
 1369|      0|                   "different empty hashtables.");
 1370|      0|    }
 1371|      0|    const bool a_is_end = ctrl_a == nullptr;
 1372|      0|    const bool b_is_end = ctrl_b == nullptr;
 1373|      0|    if (a_is_end || b_is_end) {
  ------------------
  |  Branch (1373:9): [True: 0, False: 0]
  |  Branch (1373:21): [True: 0, False: 0]
  ------------------
 1374|      0|      ABSL_RAW_LOG(FATAL,
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1375|      0|                   "Invalid iterator comparison. Comparing iterator with an "
 1376|      0|                   "end() iterator from a different hashtable.");
 1377|      0|    }
 1378|      0|    ABSL_RAW_LOG(FATAL,
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1379|      0|                 "Invalid iterator comparison. Comparing non-end() iterators "
 1380|      0|                 "from different hashtables.");
 1381|      0|  } else {
 1382|      0|    ABSL_HARDENING_ASSERT(
  ------------------
  |  |  128|      0|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      0|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1383|      0|        AreItersFromSameContainer(ctrl_a, ctrl_b, slot_a, slot_b) &&
 1384|      0|        "Invalid iterator comparison. The iterators may be from different "
 1385|      0|        "containers or the container might have rehashed or moved. Consider "
 1386|      0|        "running with --config=asan to diagnose issues.");
 1387|      0|  }
 1388|      0|}
_ZN4absl12lts_2024011618container_internal15is_single_groupEm:
 1411|    166|inline bool is_single_group(size_t capacity) {
 1412|    166|  return capacity <= Group::kWidth;
 1413|    166|}
_ZN4absl12lts_2024011618container_internal5probeEPKNS1_6ctrl_tEmm:
 1417|  5.91k|                                      size_t hash) {
 1418|  5.91k|  return probe_seq<Group::kWidth>(H1(hash, ctrl), capacity);
 1419|  5.91k|}
_ZN4absl12lts_2024011618container_internal5probeERKNS1_12CommonFieldsEm:
 1420|  5.91k|inline probe_seq<Group::kWidth> probe(const CommonFields& common, size_t hash) {
 1421|  5.91k|  return probe(common.control(), common.capacity(), hash);
 1422|  5.91k|}
_ZN4absl12lts_2024011618container_internal15ResetGrowthLeftERNS1_12CommonFieldsE:
 1464|     83|inline void ResetGrowthLeft(CommonFields& common) {
 1465|     83|  common.set_growth_left(CapacityToGrowth(common.capacity()) - common.size());
 1466|     83|}
_ZN4absl12lts_2024011618container_internal9ResetCtrlERNS1_12CommonFieldsEm:
 1470|     45|inline void ResetCtrl(CommonFields& common, size_t slot_size) {
 1471|     45|  const size_t capacity = common.capacity();
 1472|     45|  ctrl_t* ctrl = common.control();
 1473|     45|  std::memset(ctrl, static_cast<int8_t>(ctrl_t::kEmpty),
 1474|     45|              capacity + 1 + NumClonedBytes());
 1475|     45|  ctrl[capacity] = ctrl_t::kSentinel;
 1476|     45|  SanitizerPoisonMemoryRegion(common.slot_array(), slot_size * capacity);
 1477|     45|}
_ZN4absl12lts_2024011618container_internal7SetCtrlERKNS1_12CommonFieldsEmNS1_6ctrl_tEm:
 1484|  3.43k|                    size_t slot_size) {
 1485|  3.43k|  const size_t capacity = common.capacity();
 1486|  3.43k|  assert(i < capacity);
 1487|       |
 1488|  3.43k|  auto* slot_i = static_cast<const char*>(common.slot_array()) + i * slot_size;
 1489|  3.43k|  if (IsFull(h)) {
  ------------------
  |  Branch (1489:7): [True: 3.43k, False: 0]
  ------------------
 1490|  3.43k|    SanitizerUnpoisonMemoryRegion(slot_i, slot_size);
 1491|  3.43k|  } else {
 1492|      0|    SanitizerPoisonMemoryRegion(slot_i, slot_size);
 1493|      0|  }
 1494|       |
 1495|  3.43k|  ctrl_t* ctrl = common.control();
 1496|  3.43k|  ctrl[i] = h;
 1497|  3.43k|  ctrl[((i - NumClonedBytes()) & capacity) + (NumClonedBytes() & capacity)] = h;
 1498|  3.43k|}
_ZN4absl12lts_2024011618container_internal7SetCtrlERKNS1_12CommonFieldsEmhm:
 1502|  3.43k|                    size_t slot_size) {
 1503|  3.43k|  SetCtrl(common, i, static_cast<ctrl_t>(h), slot_size);
 1504|  3.43k|}
_ZN4absl12lts_2024011618container_internal11SlotAddressEPvmm:
 1513|    162|inline void* SlotAddress(void* slot_array, size_t slot, size_t slot_size) {
 1514|    162|  return reinterpret_cast<void*>(reinterpret_cast<char*>(slot_array) +
 1515|    162|                                 (slot * slot_size));
 1516|    162|}
_ZN4absl12lts_2024011618container_internal19find_first_non_fullIvEENS1_8FindInfoERKNS1_12CommonFieldsEm:
 1432|  3.45k|inline FindInfo find_first_non_full(const CommonFields& common, size_t hash) {
 1433|  3.45k|  auto seq = probe(common, hash);
 1434|  3.45k|  const ctrl_t* ctrl = common.control();
 1435|  3.57k|  while (true) {
  ------------------
  |  Branch (1435:10): [True: 3.57k, Folded]
  ------------------
 1436|  3.57k|    GroupEmptyOrDeleted g{ctrl + seq.offset()};
 1437|  3.57k|    auto mask = g.MaskEmptyOrDeleted();
 1438|  3.57k|    if (mask) {
  ------------------
  |  Branch (1438:9): [True: 3.45k, False: 112]
  ------------------
 1439|       |#if !defined(NDEBUG)
 1440|       |      // We want to add entropy even when ASLR is not enabled.
 1441|       |      // In debug build we will randomly insert in either the front or back of
 1442|       |      // the group.
 1443|       |      // TODO(kfm,sbenza): revisit after we do unconditional mixing
 1444|       |      if (!is_small(common.capacity()) && ShouldInsertBackwards(hash, ctrl)) {
 1445|       |        return {seq.offset(mask.HighestBitSet()), seq.index()};
 1446|       |      }
 1447|       |#endif
 1448|  3.45k|      return {seq.offset(mask.LowestBitSet()), seq.index()};
 1449|  3.45k|    }
 1450|    112|    seq.next();
 1451|       |    assert(seq.index() <= common.capacity() && "full table!");
 1452|    112|  }
 1453|  3.45k|}
_ZNK4absl12lts_2024011618container_internal18NonIterableBitMaskItLi16ELi0EEcvbEv:
  391|  5.72k|  explicit operator bool() const { return this->mask_ != 0; }
_ZNK4absl12lts_2024011618container_internal9probe_seqILm16EE6offsetEm:
  324|  4.28k|  size_t offset(size_t i) const { return (offset_ + i) & mask_; }
_ZNK4absl12lts_2024011618container_internal9probe_seqILm16EE5indexEv:
  332|  3.45k|  size_t index() const { return index_; }
_ZNK4absl12lts_2024011618container_internal18NonIterableBitMaskItLi16ELi0EE12LowestBitSetEv:
  394|  3.93k|  uint32_t LowestBitSet() const {
  395|  3.93k|    return container_internal::TrailingZeros(mask_) >> Shift;
  396|  3.93k|  }
_ZN4absl12lts_2024011618container_internal13TrailingZerosItEEjT_:
  372|  3.93k|uint32_t TrailingZeros(T x) {
  373|  3.93k|  ABSL_ASSUME(x != 0);
  ------------------
  |  |  259|  3.93k|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
  374|  3.93k|  return static_cast<uint32_t>(countr_zero(x));
  375|  3.93k|}
_ZN4absl12lts_2024011618container_internal9probe_seqILm16EE4nextEv:
  326|    224|  void next() {
  327|    224|    index_ += Width;
  328|    224|    offset_ += index_;
  329|    224|    offset_ &= mask_;
  330|    224|  }
_ZNK4absl12lts_2024011618container_internal9probe_seqILm16EE6offsetEv:
  323|  6.13k|  size_t offset() const { return offset_; }
_ZNK4absl12lts_2024011618container_internal7BitMaskItLi16ELi0EE5beginEv:
  454|  2.50k|  BitMask begin() const { return *this; }
_ZNK4absl12lts_2024011618container_internal7BitMaskItLi16ELi0EE3endEv:
  455|  2.50k|  BitMask end() const { return BitMask(0); }
_ZN4absl12lts_2024011618container_internalneERKNS1_7BitMaskItLi16ELi0EEES5_:
  461|  2.62k|  friend bool operator!=(const BitMask& a, const BitMask& b) {
  462|  2.62k|    return a.mask_ != b.mask_;
  463|  2.62k|  }
_ZN4absl12lts_2024011618container_internal7BitMaskItLi16ELi0EEppEv:
  443|    118|  BitMask& operator++() {
  444|    118|    if (Shift == 3) {
  ------------------
  |  Branch (444:9): [Folded, False: 118]
  ------------------
  445|      0|      constexpr uint64_t msbs = 0x8080808080808080ULL;
  446|      0|      this->mask_ &= msbs;
  447|      0|    }
  448|    118|    this->mask_ &= (this->mask_ - 1);
  449|    118|    return *this;
  450|    118|  }
_ZNK4absl12lts_2024011618container_internal7BitMaskItLi16ELi0EEdeEv:
  452|    472|  uint32_t operator*() const { return Base::LowestBitSet(); }
_ZN4absl12lts_2024011618container_internal19HashSetResizeHelper13DeallocateOldILm8ENSt3__19allocatorIcEEEEvT0_mPv:
 1676|     63|  void DeallocateOld(CharAlloc alloc_ref, size_t slot_size, void* old_slots) {
 1677|     63|    SanitizerUnpoisonMemoryRegion(old_slots, slot_size * old_capacity_);
 1678|     63|    Deallocate<BackingArrayAlignment(AlignOfSlot)>(
 1679|     63|        &alloc_ref, old_ctrl_ - ControlOffset(had_infoz_),
 1680|     63|        AllocSize(old_capacity_, slot_size, AlignOfSlot, had_infoz_));
 1681|     63|  }
extension_set.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE4findINS9_16ExtensionInfoKeyEEENSF_14const_iteratorERKT_:
 2718|      8|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2719|      8|    prefetch_heap_block();
 2720|      8|    return find(key, hash_ref()(key));
 2721|      8|  }
extension_set.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE19prefetch_heap_blockEv:
 3187|      9|  void prefetch_heap_block() const {
 3188|      9|#if ABSL_HAVE_BUILTIN(__builtin_prefetch) || defined(__GNUC__)
 3189|      9|    __builtin_prefetch(control(), 0, 1);
 3190|      9|#endif
 3191|      9|  }
extension_set.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE7controlEv:
 3196|     29|  ctrl_t* control() const { return common().control(); }
extension_set.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE6commonEv:
 3194|     60|  const CommonFields& common() const { return settings_.template get<0>(); }
extension_set.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE4findINS9_16ExtensionInfoKeyEEENSF_14const_iteratorERKT_m:
 2713|      8|                      size_t hash) const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2714|      8|    return const_cast<raw_hash_set*>(this)->find(key, hash);
 2715|      8|  }
extension_set.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE4findINS9_16ExtensionInfoKeyEEENSF_8iteratorERKT_m:
 2688|      8|                size_t hash) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2689|      8|    auto seq = probe(common(), hash);
 2690|      8|    slot_type* slot_ptr = slot_array();
 2691|      8|    const ctrl_t* ctrl = control();
 2692|      8|    while (true) {
  ------------------
  |  Branch (2692:12): [True: 8, Folded]
  ------------------
 2693|      8|      Group g{ctrl + seq.offset()};
 2694|      8|      for (uint32_t i : g.Match(H2(hash))) {
  ------------------
  |  Branch (2694:23): [True: 8, False: 0]
  ------------------
 2695|      8|        if (ABSL_PREDICT_TRUE(PolicyTraits::apply(
  ------------------
  |  |  179|      8|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 8, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 8]
  |  |  |  Branch (179:57): [True: 8, False: 0]
  |  |  ------------------
  ------------------
 2696|      8|                EqualElement<K>{key, eq_ref()},
 2697|      8|                PolicyTraits::element(slot_ptr + seq.offset(i)))))
 2698|      8|          return iterator_at(seq.offset(i));
 2699|      8|      }
 2700|      0|      if (ABSL_PREDICT_TRUE(g.MaskEmpty())) return end();
  ------------------
  |  |  179|      0|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 0, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 0]
  |  |  |  Branch (179:57): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2701|      0|      seq.next();
 2702|       |      assert(seq.index() <= capacity() && "full table!");
 2703|      0|    }
 2704|      8|  }
_ZN4absl12lts_2024011618container_internal9probe_seqILm16EEC2Emm:
  316|  5.91k|  probe_seq(size_t hash, size_t mask) {
  317|       |    assert(((mask + 1) & mask) == 0 && "not a mask");
  318|  5.91k|    mask_ = mask;
  319|  5.91k|    offset_ = hash & mask_;
  320|  5.91k|  }
extension_set.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE6commonEv:
 3193|     29|  CommonFields& common() { return settings_.template get<0>(); }
extension_set.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE10slot_arrayEv:
 3197|     19|  slot_type* slot_array() const {
 3198|     19|    return static_cast<slot_type*>(common().slot_array());
 3199|     19|  }
_ZN4absl12lts_2024011618container_internal7BitMaskItLi16ELi0EEC2Et:
  437|  7.52k|  explicit BitMask(T mask) : Base(mask) {}
_ZN4absl12lts_2024011618container_internal18NonIterableBitMaskItLi16ELi0EEC2Et:
  389|  13.2k|  explicit NonIterableBitMask(T mask) : mask_(mask) {}
extension_set.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE12EqualElementINS9_16ExtensionInfoKeyEEclIS7_JRS7_EEEbRKT_DpOT0_:
 2813|      8|    bool operator()(const K2& lhs, Args&&...) const {
 2814|      8|      return eq(lhs, rhs);
 2815|      8|    }
extension_set.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE6eq_refEv:
 3204|      8|  key_equal& eq_ref() { return settings_.template get<2>(); }
extension_set.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE11iterator_atEm:
 3159|      9|  iterator iterator_at(size_t i) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3160|      9|    return {control() + i, slot_array() + i, common().generation_ptr()};
 3161|      9|  }
extension_set.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE8iteratorC2EPNS1_6ctrl_tEPS7_PKh:
 1984|      9|        : HashSetIteratorGenerationInfo(generation_ptr),
 1985|      9|          ctrl_(ctrl),
 1986|      9|          slot_(slot) {
 1987|       |      // This assumption helps the compiler know that any non-end iterator is
 1988|       |      // not equal to any end iterator.
 1989|      9|      ABSL_ASSUME(ctrl != nullptr);
  ------------------
  |  |  259|      9|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 1990|      9|    }
extension_set.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE8iteratorC2EPKh:
 1993|      8|        : HashSetIteratorGenerationInfo(generation_ptr), ctrl_(nullptr) {}
extension_set.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE14const_iteratorC2ENSF_8iteratorE:
 2047|     16|    const_iterator(iterator i) : inner_(std::move(i)) {}  // NOLINT
extension_set.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE8hash_refEv:
 3203|      8|  const hasher& hash_ref() const { return settings_.template get<1>(); }
extension_set.cc:_ZN4absl12lts_2024011618container_internaleqERKNS1_12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE14const_iteratorESI_:
 2058|      8|    friend bool operator==(const const_iterator& a, const const_iterator& b) {
 2059|      8|      return a.inner_ == b.inner_;
 2060|      8|    }
extension_set.cc:_ZN4absl12lts_2024011618container_internaleqERKNS1_12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE8iteratorESI_:
 1970|      8|    friend bool operator==(const iterator& a, const iterator& b) {
 1971|      8|      AssertIsValidForComparison(a.ctrl_, a.generation(), a.generation_ptr());
 1972|      8|      AssertIsValidForComparison(b.ctrl_, b.generation(), b.generation_ptr());
 1973|      8|      AssertSameContainer(a.ctrl_, b.ctrl_, a.slot_, b.slot_,
 1974|      8|                          a.generation_ptr(), b.generation_ptr());
 1975|      8|      return a.ctrl_ == b.ctrl_;
 1976|      8|    }
extension_set.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE3endEv:
 2278|      8|  const_iterator end() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2279|      8|    return iterator(common().generation_ptr());
 2280|      8|  }
extension_set.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE14const_iteratordeEv:
 2049|      8|    reference operator*() const { return *inner_; }
extension_set.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE8iteratordeEv:
 1944|      8|    reference operator*() const {
 1945|      8|      AssertIsFull(ctrl_, generation(), generation_ptr(), "operator*()");
 1946|      8|      return unchecked_deref();
 1947|      8|    }
extension_set.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE8iterator15unchecked_derefEv:
 2029|      8|    reference unchecked_deref() const { return PolicyTraits::element(slot_); }
extension_set.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE8capacityEv:
 2288|      2|  size_t capacity() const { return common().capacity(); }
extension_set.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE9alloc_refEv:
 3206|      2|  allocator_type& alloc_ref() { return settings_.template get<3>(); }
extension_set.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE5infozEv:
 3200|      1|  HashtablezInfoHandle infoz() { return common().infoz(); }
extension_set.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEEC2Ev:
 2088|      1|      std::is_nothrow_default_constructible<allocator_type>::value) {}
_ZN4absl12lts_2024011618container_internal12CommonFieldsC2Ev:
 1028|    150|  CommonFields() = default;
extension_set.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE6insertIS7_TnNSC_9enable_ifIXsr4absl11disjunctionINSC_14is_convertibleIRKT_S7_EENSF_22SameAsElementReferenceISL_EEEE5valueEiE4typeELi0ETnNSH_IXsr14IsDecomposableISL_EE5valueEiE4typeELi0EEENSC_4pairINSF_8iteratorEbEESL_:
 2339|      1|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2340|      1|    return emplace(value);
 2341|      1|  }
extension_set.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE7emplaceIJRKS7_ETnNSC_9enable_ifIXsr14IsDecomposableIDpT_EE5valueEiE4typeELi0EEENSC_4pairINSF_8iteratorEbEEDpOSK_:
 2422|      1|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2423|      1|    return PolicyTraits::apply(EmplaceDecomposable{*this},
 2424|      1|                               std::forward<Args>(args)...);
 2425|      1|  }
extension_set.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE19EmplaceDecomposableclIS7_JRKS7_EEENSC_4pairINSF_8iteratorEbEERKT_DpOT0_:
 2822|      1|    std::pair<iterator, bool> operator()(const K& key, Args&&... args) const {
 2823|      1|      auto res = s.find_or_prepare_insert(key);
 2824|      1|      if (res.second) {
  ------------------
  |  Branch (2824:11): [True: 1, False: 0]
  ------------------
 2825|      1|        s.emplace_at(res.first, std::forward<Args>(args)...);
 2826|      1|      }
 2827|      1|      return {s.iterator_at(res.first), res.second};
 2828|      1|    }
extension_set.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE22find_or_prepare_insertIS7_EENSC_4pairImbEERKT_:
 3086|      1|  std::pair<size_t, bool> find_or_prepare_insert(const K& key) {
 3087|      1|    prefetch_heap_block();
 3088|      1|    auto hash = hash_ref()(key);
 3089|      1|    auto seq = probe(common(), hash);
 3090|      1|    const ctrl_t* ctrl = control();
 3091|      1|    while (true) {
  ------------------
  |  Branch (3091:12): [True: 1, Folded]
  ------------------
 3092|      1|      Group g{ctrl + seq.offset()};
 3093|      1|      for (uint32_t i : g.Match(H2(hash))) {
  ------------------
  |  Branch (3093:23): [True: 0, False: 1]
  ------------------
 3094|      0|        if (ABSL_PREDICT_TRUE(PolicyTraits::apply(
  ------------------
  |  |  179|      0|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 0, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 0]
  |  |  |  Branch (179:57): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3095|      0|                EqualElement<K>{key, eq_ref()},
 3096|      0|                PolicyTraits::element(slot_array() + seq.offset(i)))))
 3097|      0|          return {seq.offset(i), false};
 3098|      0|      }
 3099|      1|      if (ABSL_PREDICT_TRUE(g.MaskEmpty())) break;
  ------------------
  |  |  179|      1|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 1, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 1]
  |  |  |  Branch (179:57): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 3100|      0|      seq.next();
 3101|      0|      assert(seq.index() <= capacity() && "full table!");
 3102|      0|    }
 3103|      1|    return {prepare_insert(hash), true};
 3104|      1|  }
extension_set.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE8hash_refEv:
 3202|      1|  hasher& hash_ref() { return settings_.template get<1>(); }
extension_set.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE14prepare_insertEm:
 3110|      1|  size_t prepare_insert(size_t hash) ABSL_ATTRIBUTE_NOINLINE {
 3111|      1|    const bool rehash_for_bug_detection =
 3112|      1|        common().should_rehash_for_bug_detection_on_insert();
 3113|      1|    if (rehash_for_bug_detection) {
  ------------------
  |  Branch (3113:9): [True: 0, False: 1]
  ------------------
 3114|       |      // Move to a different heap allocation in order to detect bugs.
 3115|      0|      const size_t cap = capacity();
 3116|      0|      resize(growth_left() > 0 ? cap : NextCapacity(cap));
  ------------------
  |  Branch (3116:14): [True: 0, False: 0]
  ------------------
 3117|      0|    }
 3118|      1|    auto target = find_first_non_full(common(), hash);
 3119|      1|    if (!rehash_for_bug_detection &&
  ------------------
  |  Branch (3119:9): [True: 1, False: 0]
  ------------------
 3120|      1|        ABSL_PREDICT_FALSE(growth_left() == 0 &&
  ------------------
  |  |  178|      2|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 1, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 1]
  |  |  |  Branch (178:59): [True: 1, False: 0]
  |  |  |  Branch (178:59): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 3121|      1|                           !IsDeleted(control()[target.offset]))) {
 3122|      1|      size_t old_capacity = capacity();
 3123|      1|      rehash_and_grow_if_necessary();
 3124|       |      // NOTE: It is safe to use `FindFirstNonFullAfterResize`.
 3125|       |      // `FindFirstNonFullAfterResize` must be called right after resize.
 3126|       |      // `rehash_and_grow_if_necessary` may *not* call `resize`
 3127|       |      // and perform `drop_deletes_without_resize` instead. But this
 3128|       |      // could happen only on big tables.
 3129|       |      // For big tables `FindFirstNonFullAfterResize` will always
 3130|       |      // fallback to normal `find_first_non_full`, so it is safe to use it.
 3131|      1|      target = HashSetResizeHelper::FindFirstNonFullAfterResize(
 3132|      1|          common(), old_capacity, hash);
 3133|      1|    }
 3134|      1|    common().increment_size();
 3135|      1|    set_growth_left(growth_left() - IsEmpty(control()[target.offset]));
 3136|      1|    SetCtrl(common(), target.offset, H2(hash), sizeof(slot_type));
 3137|      1|    common().maybe_increment_generation_on_insert();
 3138|      1|    infoz().RecordInsert(hash, target.probe_length);
 3139|      1|    return target.offset;
 3140|      1|  }
extension_set.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE6resizeEm:
 2905|      1|  ABSL_ATTRIBUTE_NOINLINE void resize(size_t new_capacity) {
 2906|      1|    assert(IsValidCapacity(new_capacity));
 2907|      1|    HashSetResizeHelper resize_helper(common());
 2908|      1|    auto* old_slots = slot_array();
 2909|      1|    common().set_capacity(new_capacity);
 2910|       |    // Note that `InitializeSlots` does different number initialization steps
 2911|       |    // depending on the values of `transfer_uses_memcpy` and capacities.
 2912|       |    // Refer to the comment in `InitializeSlots` for more details.
 2913|      1|    const bool grow_single_group =
 2914|      1|        resize_helper.InitializeSlots<CharAlloc, sizeof(slot_type),
 2915|      1|                                      PolicyTraits::transfer_uses_memcpy(),
 2916|      1|                                      alignof(slot_type)>(
 2917|      1|            common(), const_cast<std::remove_const_t<slot_type>*>(old_slots),
 2918|      1|            CharAlloc(alloc_ref()));
 2919|       |
 2920|      1|    if (resize_helper.old_capacity() == 0) {
  ------------------
  |  Branch (2920:9): [True: 1, False: 0]
  ------------------
 2921|       |      // InitializeSlots did all the work including infoz().RecordRehash().
 2922|      1|      return;
 2923|      1|    }
 2924|       |
 2925|      0|    if (grow_single_group) {
  ------------------
  |  Branch (2925:9): [True: 0, False: 0]
  ------------------
 2926|      0|      if (PolicyTraits::transfer_uses_memcpy()) {
  ------------------
  |  Branch (2926:11): [Folded, False: 0]
  ------------------
 2927|       |        // InitializeSlots did all the work.
 2928|      0|        return;
 2929|      0|      }
 2930|       |      // We want GrowSizeIntoSingleGroup to be called here in order to make
 2931|       |      // InitializeSlots not depend on PolicyTraits.
 2932|      0|      resize_helper.GrowSizeIntoSingleGroup<PolicyTraits>(common(), alloc_ref(),
 2933|      0|                                                          old_slots);
 2934|      0|    } else {
 2935|       |      // InitializeSlots prepares control bytes to correspond to empty table.
 2936|      0|      auto* new_slots = slot_array();
 2937|      0|      size_t total_probe_length = 0;
 2938|      0|      for (size_t i = 0; i != resize_helper.old_capacity(); ++i) {
  ------------------
  |  Branch (2938:26): [True: 0, False: 0]
  ------------------
 2939|      0|        if (IsFull(resize_helper.old_ctrl()[i])) {
  ------------------
  |  Branch (2939:13): [True: 0, False: 0]
  ------------------
 2940|      0|          size_t hash = PolicyTraits::apply(
 2941|      0|              HashElement{hash_ref()}, PolicyTraits::element(old_slots + i));
 2942|      0|          auto target = find_first_non_full(common(), hash);
 2943|      0|          size_t new_i = target.offset;
 2944|      0|          total_probe_length += target.probe_length;
 2945|      0|          SetCtrl(common(), new_i, H2(hash), sizeof(slot_type));
 2946|      0|          transfer(new_slots + new_i, old_slots + i);
 2947|      0|        }
 2948|      0|      }
 2949|      0|      infoz().RecordRehash(total_probe_length);
 2950|      0|    }
 2951|      0|    resize_helper.DeallocateOld<alignof(slot_type)>(
 2952|      0|        CharAlloc(alloc_ref()), sizeof(slot_type),
 2953|      0|        const_cast<std::remove_const_t<slot_type>*>(old_slots));
 2954|      0|  }
_ZN4absl12lts_2024011618container_internal19HashSetResizeHelper15InitializeSlotsINSt3__19allocatorIcEELm48ELb0ELm8EEEbRNS1_12CommonFieldsEPvT_:
 1595|      1|                                               Alloc alloc) {
 1596|      1|    assert(c.capacity());
 1597|       |    // Folks with custom allocators often make unwarranted assumptions about the
 1598|       |    // behavior of their classes vis-a-vis trivial destructability and what
 1599|       |    // calls they will or won't make.  Avoid sampling for people with custom
 1600|       |    // allocators to get us out of this mess.  This is not a hard guarantee but
 1601|       |    // a workaround while we plan the exact guarantee we want to provide.
 1602|      1|    const size_t sample_size =
 1603|      1|        (std::is_same<Alloc, std::allocator<char>>::value &&
  ------------------
  |  Branch (1603:10): [True: 1, Folded]
  ------------------
 1604|      1|         c.slot_array() == nullptr)
  ------------------
  |  Branch (1604:10): [True: 1, False: 0]
  ------------------
 1605|      1|            ? SizeOfSlot
 1606|      1|            : 0;
 1607|      1|    HashtablezInfoHandle infoz =
 1608|      1|        sample_size > 0 ? Sample(sample_size) : c.infoz();
  ------------------
  |  Branch (1608:9): [True: 1, False: 0]
  ------------------
 1609|       |
 1610|      1|    const bool has_infoz = infoz.IsSampled();
 1611|      1|    const size_t cap = c.capacity();
 1612|      1|    const size_t alloc_size =
 1613|      1|        AllocSize(cap, SizeOfSlot, AlignOfSlot, has_infoz);
 1614|      1|    char* mem = static_cast<char*>(
 1615|      1|        Allocate<BackingArrayAlignment(AlignOfSlot)>(&alloc, alloc_size));
 1616|      1|    const GenerationType old_generation = c.generation();
 1617|      1|    c.set_generation_ptr(reinterpret_cast<GenerationType*>(
 1618|      1|        mem + GenerationOffset(cap, has_infoz)));
 1619|      1|    c.set_generation(NextGeneration(old_generation));
 1620|      1|    c.set_control(reinterpret_cast<ctrl_t*>(mem + ControlOffset(has_infoz)));
 1621|      1|    c.set_slots(mem + SlotOffset(cap, AlignOfSlot, has_infoz));
 1622|      1|    ResetGrowthLeft(c);
 1623|       |
 1624|      1|    const bool grow_single_group =
 1625|      1|        IsGrowingIntoSingleGroupApplicable(old_capacity_, c.capacity());
 1626|      1|    if (old_capacity_ != 0 && grow_single_group) {
  ------------------
  |  Branch (1626:9): [True: 0, False: 1]
  |  Branch (1626:31): [True: 0, False: 0]
  ------------------
 1627|      0|      if (TransferUsesMemcpy) {
  ------------------
  |  Branch (1627:11): [Folded, False: 0]
  ------------------
 1628|      0|        GrowSizeIntoSingleGroupTransferable(c, old_slots, SizeOfSlot);
 1629|      0|        DeallocateOld<AlignOfSlot>(alloc, SizeOfSlot, old_slots);
 1630|      0|      } else {
 1631|      0|        GrowIntoSingleGroupShuffleControlBytes(c.control(), c.capacity());
 1632|      0|      }
 1633|      1|    } else {
 1634|      1|      ResetCtrl(c, SizeOfSlot);
 1635|      1|    }
 1636|       |
 1637|      1|    c.set_has_infoz(has_infoz);
 1638|      1|    if (has_infoz) {
  ------------------
  |  Branch (1638:9): [True: 0, False: 1]
  ------------------
 1639|      0|      infoz.RecordStorageChanged(c.size(), cap);
 1640|      0|      if (grow_single_group || old_capacity_ == 0) {
  ------------------
  |  Branch (1640:11): [True: 0, False: 0]
  |  Branch (1640:32): [True: 0, False: 0]
  ------------------
 1641|      0|        infoz.RecordRehash(0);
 1642|      0|      }
 1643|      0|      c.set_infoz(infoz);
 1644|      0|    }
 1645|      1|    return grow_single_group;
 1646|      1|  }
extension_set.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE11growth_leftEv:
 3181|      2|  size_t growth_left() const { return common().growth_left(); }
extension_set.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE28rehash_and_grow_if_necessaryEv:
 2970|      1|  void rehash_and_grow_if_necessary() {
 2971|      1|    const size_t cap = capacity();
 2972|      1|    if (cap > Group::kWidth &&
  ------------------
  |  Branch (2972:9): [True: 0, False: 1]
  ------------------
 2973|       |        // Do these calculations in 64-bit to avoid overflow.
 2974|      0|        size() * uint64_t{32} <= cap * uint64_t{25}) {
  ------------------
  |  Branch (2974:9): [True: 0, False: 0]
  ------------------
 2975|       |      // Squash DELETED without growing if there is enough capacity.
 2976|       |      //
 2977|       |      // Rehash in place if the current size is <= 25/32 of capacity.
 2978|       |      // Rationale for such a high factor: 1) drop_deletes_without_resize() is
 2979|       |      // faster than resize, and 2) it takes quite a bit of work to add
 2980|       |      // tombstones.  In the worst case, seems to take approximately 4
 2981|       |      // insert/erase pairs to create a single tombstone and so if we are
 2982|       |      // rehashing because of tombstones, we can afford to rehash-in-place as
 2983|       |      // long as we are reclaiming at least 1/8 the capacity without doing more
 2984|       |      // than 2X the work.  (Where "work" is defined to be size() for rehashing
 2985|       |      // or rehashing in place, and 1 for an insert or erase.)  But rehashing in
 2986|       |      // place is faster per operation than inserting or even doubling the size
 2987|       |      // of the table, so we actually afford to reclaim even less space from a
 2988|       |      // resize-in-place.  The decision is to rehash in place if we can reclaim
 2989|       |      // at about 1/8th of the usable capacity (specifically 3/28 of the
 2990|       |      // capacity) which means that the total cost of rehashing will be a small
 2991|       |      // fraction of the total work.
 2992|       |      //
 2993|       |      // Here is output of an experiment using the BM_CacheInSteadyState
 2994|       |      // benchmark running the old case (where we rehash-in-place only if we can
 2995|       |      // reclaim at least 7/16*capacity) vs. this code (which rehashes in place
 2996|       |      // if we can recover 3/32*capacity).
 2997|       |      //
 2998|       |      // Note that although in the worst-case number of rehashes jumped up from
 2999|       |      // 15 to 190, but the number of operations per second is almost the same.
 3000|       |      //
 3001|       |      // Abridged output of running BM_CacheInSteadyState benchmark from
 3002|       |      // raw_hash_set_benchmark.   N is the number of insert/erase operations.
 3003|       |      //
 3004|       |      //      | OLD (recover >= 7/16        | NEW (recover >= 3/32)
 3005|       |      // size |    N/s LoadFactor NRehashes |    N/s LoadFactor NRehashes
 3006|       |      //  448 | 145284       0.44        18 | 140118       0.44        19
 3007|       |      //  493 | 152546       0.24        11 | 151417       0.48        28
 3008|       |      //  538 | 151439       0.26        11 | 151152       0.53        38
 3009|       |      //  583 | 151765       0.28        11 | 150572       0.57        50
 3010|       |      //  628 | 150241       0.31        11 | 150853       0.61        66
 3011|       |      //  672 | 149602       0.33        12 | 150110       0.66        90
 3012|       |      //  717 | 149998       0.35        12 | 149531       0.70       129
 3013|       |      //  762 | 149836       0.37        13 | 148559       0.74       190
 3014|       |      //  807 | 149736       0.39        14 | 151107       0.39        14
 3015|       |      //  852 | 150204       0.42        15 | 151019       0.42        15
 3016|      0|      drop_deletes_without_resize();
 3017|      1|    } else {
 3018|       |      // Otherwise grow the container.
 3019|      1|      resize(NextCapacity(cap));
 3020|      1|    }
 3021|      1|  }
extension_set.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE15set_growth_leftEm:
 3182|      1|  void set_growth_left(size_t gl) { return common().set_growth_left(gl); }
extension_set.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE10emplace_atIJRKS7_EEEvmDpOT_:
 3151|      1|  void emplace_at(size_t i, Args&&... args) {
 3152|      1|    construct(slot_array() + i, std::forward<Args>(args)...);
 3153|       |
 3154|       |    assert(PolicyTraits::apply(FindElement{*this}, *iterator_at(i)) ==
 3155|      1|               iterator_at(i) &&
 3156|      1|           "constructed value does not match the lookup key");
 3157|      1|  }
extension_set.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf8internal13ExtensionInfoEEENS6_12_GLOBAL__N_115ExtensionHasherENS9_11ExtensionEqENSt3__19allocatorIS7_EEE9constructIJRKS7_EEEvPS7_DpOT_:
 2851|      1|  inline void construct(slot_type* slot, Args&&... args) {
 2852|      1|    PolicyTraits::construct(&alloc_ref(), slot, std::forward<Args>(args)...);
 2853|      1|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE8capacityEv:
 2288|      6|  size_t capacity() const { return common().capacity(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE6commonEv:
 3194|  1.21k|  const CommonFields& common() const { return settings_.template get<0>(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE7controlEv:
 3196|    724|  ctrl_t* control() const { return common().control(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE10slot_arrayEv:
 3197|    481|  slot_type* slot_array() const {
 3198|    481|    return static_cast<slot_type*>(common().slot_array());
 3199|    481|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE9alloc_refEv:
 3206|     11|  allocator_type& alloc_ref() { return settings_.template get<3>(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE5infozEv:
 3200|      4|  HashtablezInfoHandle infoz() { return common().infoz(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE6commonEv:
 3193|    520|  CommonFields& common() { return settings_.template get<0>(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE8capacityEv:
 2288|      6|  size_t capacity() const { return common().capacity(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE6commonEv:
 3194|    107|  const CommonFields& common() const { return settings_.template get<0>(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE7controlEv:
 3196|     50|  ctrl_t* control() const { return common().control(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE10slot_arrayEv:
 3197|     30|  slot_type* slot_array() const {
 3198|     30|    return static_cast<slot_type*>(common().slot_array());
 3199|     30|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE9alloc_refEv:
 3206|     11|  allocator_type& alloc_ref() { return settings_.template get<3>(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE5infozEv:
 3200|      4|  HashtablezInfoHandle infoz() { return common().infoz(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE6commonEv:
 3193|     76|  CommonFields& common() { return settings_.template get<0>(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE8capacityEv:
 2288|     20|  size_t capacity() const { return common().capacity(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE6commonEv:
 3194|  4.78k|  const CommonFields& common() const { return settings_.template get<0>(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE7controlEv:
 3196|  2.35k|  ctrl_t* control() const { return common().control(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE10slot_arrayEv:
 3197|  1.28k|  slot_type* slot_array() const {
 3198|  1.28k|    return static_cast<slot_type*>(common().slot_array());
 3199|  1.28k|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE9alloc_refEv:
 3206|  1.40k|  allocator_type& alloc_ref() { return settings_.template get<3>(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE5infozEv:
 3200|    510|  HashtablezInfoHandle infoz() { return common().infoz(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE6commonEv:
 3193|  6.57k|  CommonFields& common() { return settings_.template get<0>(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE8capacityEv:
 2288|     20|  size_t capacity() const { return common().capacity(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE6commonEv:
 3194|    444|  const CommonFields& common() const { return settings_.template get<0>(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE7controlEv:
 3196|    233|  ctrl_t* control() const { return common().control(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE10slot_arrayEv:
 3197|    127|  slot_type* slot_array() const {
 3198|    127|    return static_cast<slot_type*>(common().slot_array());
 3199|    127|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE9alloc_refEv:
 3206|     84|  allocator_type& alloc_ref() { return settings_.template get<3>(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE5infozEv:
 3200|     34|  HashtablezInfoHandle infoz() { return common().infoz(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE6commonEv:
 3193|    533|  CommonFields& common() { return settings_.template get<0>(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE8capacityEv:
 2288|      8|  size_t capacity() const { return common().capacity(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE6commonEv:
 3194|     40|  const CommonFields& common() const { return settings_.template get<0>(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE7controlEv:
 3196|     16|  ctrl_t* control() const { return common().control(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE10slot_arrayEv:
 3197|      8|  slot_type* slot_array() const {
 3198|      8|    return static_cast<slot_type*>(common().slot_array());
 3199|      8|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE6commonEv:
 3193|     32|  CommonFields& common() { return settings_.template get<0>(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE8capacityEv:
 2288|     24|  size_t capacity() const { return common().capacity(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE6commonEv:
 3194|    817|  const CommonFields& common() const { return settings_.template get<0>(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE7controlEv:
 3196|    392|  ctrl_t* control() const { return common().control(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE10slot_arrayEv:
 3197|    209|  slot_type* slot_array() const {
 3198|    209|    return static_cast<slot_type*>(common().slot_array());
 3199|    209|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE9alloc_refEv:
 3206|    235|  allocator_type& alloc_ref() { return settings_.template get<3>(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE5infozEv:
 3200|     99|  HashtablezInfoHandle infoz() { return common().infoz(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE6commonEv:
 3193|  1.13k|  CommonFields& common() { return settings_.template get<0>(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE8capacityEv:
 2288|     24|  size_t capacity() const { return common().capacity(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE6commonEv:
 3194|    926|  const CommonFields& common() const { return settings_.template get<0>(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE7controlEv:
 3196|    444|  ctrl_t* control() const { return common().control(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE10slot_arrayEv:
 3197|    240|  slot_type* slot_array() const {
 3198|    240|    return static_cast<slot_type*>(common().slot_array());
 3199|    240|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE9alloc_refEv:
 3206|    233|  allocator_type& alloc_ref() { return settings_.template get<3>(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE5infozEv:
 3200|    111|  HashtablezInfoHandle infoz() { return common().infoz(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE6commonEv:
 3193|  1.22k|  CommonFields& common() { return settings_.template get<0>(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE8capacityEv:
 2288|     48|  size_t capacity() const { return common().capacity(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE6commonEv:
 3194|  5.66k|  const CommonFields& common() const { return settings_.template get<0>(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE7controlEv:
 3196|  2.77k|  ctrl_t* control() const { return common().control(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE10slot_arrayEv:
 3197|  1.46k|  slot_type* slot_array() const {
 3198|  1.46k|    return static_cast<slot_type*>(common().slot_array());
 3199|  1.46k|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE9alloc_refEv:
 3206|  1.61k|  allocator_type& alloc_ref() { return settings_.template get<3>(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE5infozEv:
 3200|    698|  HashtablezInfoHandle infoz() { return common().infoz(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE6commonEv:
 3193|  8.04k|  CommonFields& common() { return settings_.template get<0>(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf14FileDescriptorENSt3__16vectorINS5_14DescriptorPool18DeferredValidation13LifetimesInfoENS9_9allocatorISD_EEEEEENS1_6HashEqIS8_vE4HashENSJ_2EqENSE_INS9_4pairIKS8_SG_EEEEE6commonEv:
 3194|     12|  const CommonFields& common() const { return settings_.template get<0>(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE4findINS8_13FullNameQueryEEENSE_14const_iteratorERKT_:
 2718|    111|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2719|    111|    prefetch_heap_block();
 2720|    111|    return find(key, hash_ref()(key));
 2721|    111|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE19prefetch_heap_blockEv:
 3187|    615|  void prefetch_heap_block() const {
 3188|    615|#if ABSL_HAVE_BUILTIN(__builtin_prefetch) || defined(__GNUC__)
 3189|    615|    __builtin_prefetch(control(), 0, 1);
 3190|    615|#endif
 3191|    615|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE4findINS8_13FullNameQueryEEENSE_14const_iteratorERKT_m:
 2713|    111|                      size_t hash) const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2714|    111|    return const_cast<raw_hash_set*>(this)->find(key, hash);
 2715|    111|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE4findINS8_13FullNameQueryEEENSE_8iteratorERKT_m:
 2688|    111|                size_t hash) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2689|    111|    auto seq = probe(common(), hash);
 2690|    111|    slot_type* slot_ptr = slot_array();
 2691|    111|    const ctrl_t* ctrl = control();
 2692|    111|    while (true) {
  ------------------
  |  Branch (2692:12): [True: 111, Folded]
  ------------------
 2693|    111|      Group g{ctrl + seq.offset()};
 2694|    111|      for (uint32_t i : g.Match(H2(hash))) {
  ------------------
  |  Branch (2694:23): [True: 105, False: 6]
  ------------------
 2695|    105|        if (ABSL_PREDICT_TRUE(PolicyTraits::apply(
  ------------------
  |  |  179|    105|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 105, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 105]
  |  |  |  Branch (179:57): [True: 105, False: 0]
  |  |  ------------------
  ------------------
 2696|    105|                EqualElement<K>{key, eq_ref()},
 2697|    105|                PolicyTraits::element(slot_ptr + seq.offset(i)))))
 2698|    105|          return iterator_at(seq.offset(i));
 2699|    105|      }
 2700|      6|      if (ABSL_PREDICT_TRUE(g.MaskEmpty())) return end();
  ------------------
  |  |  179|      6|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 6, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 6]
  |  |  |  Branch (179:57): [True: 6, False: 0]
  |  |  ------------------
  ------------------
 2701|      0|      seq.next();
 2702|       |      assert(seq.index() <= capacity() && "full table!");
 2703|      0|    }
 2704|    111|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE12EqualElementINS8_13FullNameQueryEEclIS6_JRS6_EEEbRKT_DpOT0_:
 2813|    105|    bool operator()(const K2& lhs, Args&&...) const {
 2814|    105|      return eq(lhs, rhs);
 2815|    105|    }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE6eq_refEv:
 3204|    149|  key_equal& eq_ref() { return settings_.template get<2>(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE11iterator_atEm:
 3159|    609|  iterator iterator_at(size_t i) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3160|    609|    return {control() + i, slot_array() + i, common().generation_ptr()};
 3161|    609|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE8iteratorC2EPNS1_6ctrl_tEPS6_PKh:
 1984|    609|        : HashSetIteratorGenerationInfo(generation_ptr),
 1985|    609|          ctrl_(ctrl),
 1986|    609|          slot_(slot) {
 1987|       |      // This assumption helps the compiler know that any non-end iterator is
 1988|       |      // not equal to any end iterator.
 1989|    609|      ABSL_ASSUME(ctrl != nullptr);
  ------------------
  |  |  259|    609|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 1990|    609|    }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE3endEv:
 2271|      6|  iterator end() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2272|      6|    return iterator(common().generation_ptr());
 2273|      6|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE8iteratorC2EPKh:
 1993|    117|        : HashSetIteratorGenerationInfo(generation_ptr), ctrl_(nullptr) {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE14const_iteratorC2ENSE_8iteratorE:
 2047|    222|    const_iterator(iterator i) : inner_(std::move(i)) {}  // NOLINT
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE8hash_refEv:
 3203|    111|  const hasher& hash_ref() const { return settings_.template get<1>(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internaleqERKNS1_12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE14const_iteratorESH_:
 2058|    111|    friend bool operator==(const const_iterator& a, const const_iterator& b) {
 2059|    111|      return a.inner_ == b.inner_;
 2060|    111|    }
descriptor.cc:_ZN4absl12lts_2024011618container_internaleqERKNS1_12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE8iteratorESH_:
 1970|    111|    friend bool operator==(const iterator& a, const iterator& b) {
 1971|    111|      AssertIsValidForComparison(a.ctrl_, a.generation(), a.generation_ptr());
 1972|    111|      AssertIsValidForComparison(b.ctrl_, b.generation(), b.generation_ptr());
 1973|    111|      AssertSameContainer(a.ctrl_, b.ctrl_, a.slot_, b.slot_,
 1974|    111|                          a.generation_ptr(), b.generation_ptr());
 1975|    111|      return a.ctrl_ == b.ctrl_;
 1976|    111|    }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE3endEv:
 2278|    111|  const_iterator end() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2279|    111|    return iterator(common().generation_ptr());
 2280|    111|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE14const_iteratordeEv:
 2049|    105|    reference operator*() const { return *inner_; }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE8iteratordeEv:
 1944|    105|    reference operator*() const {
 1945|    105|      AssertIsFull(ctrl_, generation(), generation_ptr(), "operator*()");
 1946|    105|      return unchecked_deref();
 1947|    105|    }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE8iterator15unchecked_derefEv:
 2029|    105|    reference unchecked_deref() const { return PolicyTraits::element(slot_); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf14FileDescriptorENSt3__16vectorINS5_14DescriptorPool18DeferredValidation13LifetimesInfoENS9_9allocatorISD_EEEEEENS1_6HashEqIS8_vE4HashENSJ_2EqENSE_INS9_4pairIKS8_SG_EEEEEC2Ev:
 2088|      4|      std::is_nothrow_default_constructible<allocator_type>::value) {}
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf14FileDescriptorENSt3__16vectorINS5_14DescriptorPool18DeferredValidation13LifetimesInfoENS9_9allocatorISD_EEEEEENS1_6HashEqIS8_vE4HashENSJ_2EqENSE_INS9_4pairIKS8_SG_EEEEE5emptyEv:
 2286|      8|  bool empty() const { return !size(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf14FileDescriptorENSt3__16vectorINS5_14DescriptorPool18DeferredValidation13LifetimesInfoENS9_9allocatorISD_EEEEEENS1_6HashEqIS8_vE4HashENSJ_2EqENSE_INS9_4pairIKS8_SG_EEEEE4sizeEv:
 2287|      8|  size_t size() const { return common().size(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf14FileDescriptorENSt3__16vectorINS5_14DescriptorPool18DeferredValidation13LifetimesInfoENS9_9allocatorISD_EEEEEENS1_6HashEqIS8_vE4HashENSJ_2EqENSE_INS9_4pairIKS8_SG_EEEEE8capacityEv:
 2288|      4|  size_t capacity() const { return common().capacity(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf14FileDescriptorENSt3__16vectorINS5_14DescriptorPool18DeferredValidation13LifetimesInfoENS9_9allocatorISD_EEEEEENS1_6HashEqIS8_vE4HashENSJ_2EqENSE_INS9_4pairIKS8_SG_EEEEED2Ev:
 2264|      4|  ~raw_hash_set() { destructor_impl(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf14FileDescriptorENSt3__16vectorINS5_14DescriptorPool18DeferredValidation13LifetimesInfoENS9_9allocatorISD_EEEEEENS1_6HashEqIS8_vE4HashENSJ_2EqENSE_INS9_4pairIKS8_SG_EEEEE15destructor_implEv:
 2882|      4|  inline void destructor_impl() {
 2883|      4|    if (capacity() == 0) return;
  ------------------
  |  Branch (2883:9): [True: 4, False: 0]
  ------------------
 2884|      0|    destroy_slots();
 2885|      0|    dealloc();
 2886|      0|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE19prefetch_heap_blockEv:
 3187|      8|  void prefetch_heap_block() const {
 3188|      8|#if ABSL_HAVE_BUILTIN(__builtin_prefetch) || defined(__GNUC__)
 3189|      8|    __builtin_prefetch(control(), 0, 1);
 3190|      8|#endif
 3191|      8|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE4findINS0_11string_viewEEENSI_14const_iteratorERKT_:
 2718|     13|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2719|     13|    prefetch_heap_block();
 2720|     13|    return find(key, hash_ref()(key));
 2721|     13|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE19prefetch_heap_blockEv:
 3187|     17|  void prefetch_heap_block() const {
 3188|     17|#if ABSL_HAVE_BUILTIN(__builtin_prefetch) || defined(__GNUC__)
 3189|     17|    __builtin_prefetch(control(), 0, 1);
 3190|     17|#endif
 3191|     17|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE4findINS0_11string_viewEEENSI_14const_iteratorERKT_m:
 2713|     13|                      size_t hash) const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2714|     13|    return const_cast<raw_hash_set*>(this)->find(key, hash);
 2715|     13|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE4findINS0_11string_viewEEENSI_8iteratorERKT_m:
 2688|     13|                size_t hash) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2689|     13|    auto seq = probe(common(), hash);
 2690|     13|    slot_type* slot_ptr = slot_array();
 2691|     13|    const ctrl_t* ctrl = control();
 2692|     13|    while (true) {
  ------------------
  |  Branch (2692:12): [True: 13, Folded]
  ------------------
 2693|     13|      Group g{ctrl + seq.offset()};
 2694|     13|      for (uint32_t i : g.Match(H2(hash))) {
  ------------------
  |  Branch (2694:23): [True: 7, False: 8]
  ------------------
 2695|      7|        if (ABSL_PREDICT_TRUE(PolicyTraits::apply(
  ------------------
  |  |  179|      7|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 5, False: 2]
  |  |  |  Branch (179:48): [Folded, False: 7]
  |  |  |  Branch (179:57): [True: 5, False: 2]
  |  |  ------------------
  ------------------
 2696|      7|                EqualElement<K>{key, eq_ref()},
 2697|      7|                PolicyTraits::element(slot_ptr + seq.offset(i)))))
 2698|      5|          return iterator_at(seq.offset(i));
 2699|      7|      }
 2700|      8|      if (ABSL_PREDICT_TRUE(g.MaskEmpty())) return end();
  ------------------
  |  |  179|      8|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 8, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 8]
  |  |  |  Branch (179:57): [True: 8, False: 0]
  |  |  ------------------
  ------------------
 2701|      0|      seq.next();
 2702|       |      assert(seq.index() <= capacity() && "full table!");
 2703|      0|    }
 2704|     13|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE12EqualElementINS0_11string_viewEEclIS8_JRS8_EEEbRKT_DpOT0_:
 2813|      7|    bool operator()(const K2& lhs, Args&&...) const {
 2814|      7|      return eq(lhs, rhs);
 2815|      7|    }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE6eq_refEv:
 3204|      8|  key_equal& eq_ref() { return settings_.template get<2>(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE11iterator_atEm:
 3159|      9|  iterator iterator_at(size_t i) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3160|      9|    return {control() + i, slot_array() + i, common().generation_ptr()};
 3161|      9|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE8iteratorC2EPNS1_6ctrl_tEPS8_PKh:
 1984|      9|        : HashSetIteratorGenerationInfo(generation_ptr),
 1985|      9|          ctrl_(ctrl),
 1986|      9|          slot_(slot) {
 1987|       |      // This assumption helps the compiler know that any non-end iterator is
 1988|       |      // not equal to any end iterator.
 1989|      9|      ABSL_ASSUME(ctrl != nullptr);
  ------------------
  |  |  259|      9|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 1990|      9|    }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE3endEv:
 2271|      8|  iterator end() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2272|      8|    return iterator(common().generation_ptr());
 2273|      8|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE8iteratorC2EPKh:
 1993|     21|        : HashSetIteratorGenerationInfo(generation_ptr), ctrl_(nullptr) {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE14const_iteratorC2ENSI_8iteratorE:
 2047|     26|    const_iterator(iterator i) : inner_(std::move(i)) {}  // NOLINT
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE8hash_refEv:
 3203|     13|  const hasher& hash_ref() const { return settings_.template get<1>(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internaleqERKNS1_12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE14const_iteratorESL_:
 2058|     13|    friend bool operator==(const const_iterator& a, const const_iterator& b) {
 2059|     13|      return a.inner_ == b.inner_;
 2060|     13|    }
descriptor.cc:_ZN4absl12lts_2024011618container_internaleqERKNS1_12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE8iteratorESL_:
 1970|     13|    friend bool operator==(const iterator& a, const iterator& b) {
 1971|     13|      AssertIsValidForComparison(a.ctrl_, a.generation(), a.generation_ptr());
 1972|     13|      AssertIsValidForComparison(b.ctrl_, b.generation(), b.generation_ptr());
 1973|     13|      AssertSameContainer(a.ctrl_, b.ctrl_, a.slot_, b.slot_,
 1974|     13|                          a.generation_ptr(), b.generation_ptr());
 1975|     13|      return a.ctrl_ == b.ctrl_;
 1976|     13|    }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE3endEv:
 2278|     13|  const_iterator end() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2279|     13|    return iterator(common().generation_ptr());
 2280|     13|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE14const_iteratordeEv:
 2049|      5|    reference operator*() const { return *inner_; }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE8iteratordeEv:
 1944|      5|    reference operator*() const {
 1945|      5|      AssertIsFull(ctrl_, generation(), generation_ptr(), "operator*()");
 1946|      5|      return unchecked_deref();
 1947|      5|    }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE8iterator15unchecked_derefEv:
 2029|      5|    reference unchecked_deref() const { return PolicyTraits::element(slot_); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE19prefetch_heap_blockEv:
 3187|    108|  void prefetch_heap_block() const {
 3188|    108|#if ABSL_HAVE_BUILTIN(__builtin_prefetch) || defined(__GNUC__)
 3189|    108|    __builtin_prefetch(control(), 0, 1);
 3190|    108|#endif
 3191|    108|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE6eq_refEv:
 3204|      9|  key_equal& eq_ref() { return settings_.template get<2>(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE11iterator_atEm:
 3159|    108|  iterator iterator_at(size_t i) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3160|    108|    return {control() + i, slot_array() + i, common().generation_ptr()};
 3161|    108|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE8iteratorC2EPNS1_6ctrl_tEPS8_PKh:
 1984|    108|        : HashSetIteratorGenerationInfo(generation_ptr),
 1985|    108|          ctrl_(ctrl),
 1986|    108|          slot_(slot) {
 1987|       |      // This assumption helps the compiler know that any non-end iterator is
 1988|       |      // not equal to any end iterator.
 1989|    108|      ABSL_ASSUME(ctrl != nullptr);
  ------------------
  |  |  259|    108|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 1990|    108|    }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE19prefetch_heap_blockEv:
 3187|    688|  void prefetch_heap_block() const {
 3188|    688|#if ABSL_HAVE_BUILTIN(__builtin_prefetch) || defined(__GNUC__)
 3189|    688|    __builtin_prefetch(control(), 0, 1);
 3190|    688|#endif
 3191|    688|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE6eq_refEv:
 3204|     51|  key_equal& eq_ref() { return settings_.template get<2>(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE11iterator_atEm:
 3159|    688|  iterator iterator_at(size_t i) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3160|    688|    return {control() + i, slot_array() + i, common().generation_ptr()};
 3161|    688|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE8iteratorC2EPNS1_6ctrl_tEPS6_PKh:
 1984|    688|        : HashSetIteratorGenerationInfo(generation_ptr),
 1985|    688|          ctrl_(ctrl),
 1986|    688|          slot_(slot) {
 1987|       |      // This assumption helps the compiler know that any non-end iterator is
 1988|       |      // not equal to any end iterator.
 1989|    688|      ABSL_ASSUME(ctrl != nullptr);
  ------------------
  |  |  259|    688|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 1990|    688|    }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE19prefetch_heap_blockEv:
 3187|     95|  void prefetch_heap_block() const {
 3188|     95|#if ABSL_HAVE_BUILTIN(__builtin_prefetch) || defined(__GNUC__)
 3189|     95|    __builtin_prefetch(control(), 0, 1);
 3190|     95|#endif
 3191|     95|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE6eq_refEv:
 3204|      3|  key_equal& eq_ref() { return settings_.template get<2>(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE11iterator_atEm:
 3159|     95|  iterator iterator_at(size_t i) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3160|     95|    return {control() + i, slot_array() + i, common().generation_ptr()};
 3161|     95|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE8iteratorC2EPNS1_6ctrl_tEPS8_PKh:
 1984|     95|        : HashSetIteratorGenerationInfo(generation_ptr),
 1985|     95|          ctrl_(ctrl),
 1986|     95|          slot_(slot) {
 1987|       |      // This assumption helps the compiler know that any non-end iterator is
 1988|       |      // not equal to any end iterator.
 1989|     95|      ABSL_ASSUME(ctrl != nullptr);
  ------------------
  |  |  259|     95|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 1990|     95|    }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE8hash_refEv:
 3202|    207|  hasher& hash_ref() { return settings_.template get<1>(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIiEENS0_13hash_internal4HashIiEENSt3__18equal_toIiEENS8_9allocatorIiEEE6commonEv:
 3194|      4|  const CommonFields& common() const { return settings_.template get<0>(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIiEENS0_13hash_internal4HashIiEENSt3__18equal_toIiEENS8_9allocatorIiEEE8capacityEv:
 2288|      4|  size_t capacity() const { return common().capacity(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIiEENS0_13hash_internal4HashIiEENSt3__18equal_toIiEENS8_9allocatorIiEEED2Ev:
 2264|      4|  ~raw_hash_set() { destructor_impl(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIiEENS0_13hash_internal4HashIiEENSt3__18equal_toIiEENS8_9allocatorIiEEE15destructor_implEv:
 2882|      4|  inline void destructor_impl() {
 2883|      4|    if (capacity() == 0) return;
  ------------------
  |  Branch (2883:9): [True: 4, False: 0]
  ------------------
 2884|      0|    destroy_slots();
 2885|      0|    dealloc();
 2886|      0|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEED2Ev:
 2264|      8|  ~raw_hash_set() { destructor_impl(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE15destructor_implEv:
 2882|      8|  inline void destructor_impl() {
 2883|      8|    if (capacity() == 0) return;
  ------------------
  |  Branch (2883:9): [True: 8, False: 0]
  ------------------
 2884|      0|    destroy_slots();
 2885|      0|    dealloc();
 2886|      0|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE8capacityEv:
 2288|     16|  size_t capacity() const { return common().capacity(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE6commonEv:
 3194|    333|  const CommonFields& common() const { return settings_.template get<0>(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE7controlEv:
 3196|    208|  ctrl_t* control() const { return common().control(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE10slot_arrayEv:
 3197|    104|  slot_type* slot_array() const {
 3198|    104|    return static_cast<slot_type*>(common().slot_array());
 3199|    104|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE6commonEv:
 3193|    327|  CommonFields& common() { return settings_.template get<0>(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorENS5_17DescriptorBuilder12MessageHintsEEENS1_6HashEqIS8_vE4HashENSD_2EqENSt3__19allocatorINSG_4pairIKS8_SA_EEEEED2Ev:
 2264|      4|  ~raw_hash_set() { destructor_impl(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorENS5_17DescriptorBuilder12MessageHintsEEENS1_6HashEqIS8_vE4HashENSD_2EqENSt3__19allocatorINSG_4pairIKS8_SA_EEEEE15destructor_implEv:
 2882|      4|  inline void destructor_impl() {
 2883|      4|    if (capacity() == 0) return;
  ------------------
  |  Branch (2883:9): [True: 4, False: 0]
  ------------------
 2884|      0|    destroy_slots();
 2885|      0|    dealloc();
 2886|      0|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorENS5_17DescriptorBuilder12MessageHintsEEENS1_6HashEqIS8_vE4HashENSD_2EqENSt3__19allocatorINSG_4pairIKS8_SA_EEEEE8capacityEv:
 2288|      4|  size_t capacity() const { return common().capacity(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorENS5_17DescriptorBuilder12MessageHintsEEENS1_6HashEqIS8_vE4HashENSD_2EqENSt3__19allocatorINSG_4pairIKS8_SA_EEEEE6commonEv:
 3194|      8|  const CommonFields& common() const { return settings_.template get<0>(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEED2Ev:
 2264|     75|  ~raw_hash_set() { destructor_impl(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE15destructor_implEv:
 2882|     75|  inline void destructor_impl() {
 2883|     75|    if (capacity() == 0) return;
  ------------------
  |  Branch (2883:9): [True: 72, False: 3]
  ------------------
 2884|      3|    destroy_slots();
 2885|      3|    dealloc();
 2886|      3|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE8capacityEv:
 2288|     87|  size_t capacity() const { return common().capacity(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE6commonEv:
 3194|  1.82k|  const CommonFields& common() const { return settings_.template get<0>(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE13destroy_slotsEv:
 2861|      3|  inline void destroy_slots() {
 2862|      3|    const size_t cap = capacity();
 2863|      3|    const ctrl_t* ctrl = control();
 2864|      3|    slot_type* slot = slot_array();
 2865|      6|    for (size_t i = 0; i != cap; ++i) {
  ------------------
  |  Branch (2865:24): [True: 3, False: 3]
  ------------------
 2866|      3|      if (IsFull(ctrl[i])) {
  ------------------
  |  Branch (2866:11): [True: 3, False: 0]
  ------------------
 2867|      3|        destroy(slot + i);
 2868|      3|      }
 2869|      3|    }
 2870|      3|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE7controlEv:
 3196|    866|  ctrl_t* control() const { return common().control(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE10slot_arrayEv:
 3197|    439|  slot_type* slot_array() const {
 3198|    439|    return static_cast<slot_type*>(common().slot_array());
 3199|    439|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE7destroyEPS4_:
 2854|      3|  inline void destroy(slot_type* slot) {
 2855|      3|    PolicyTraits::destroy(&alloc_ref(), slot);
 2856|      3|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE9alloc_refEv:
 3206|     12|  allocator_type& alloc_ref() { return settings_.template get<3>(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE7deallocEv:
 2872|      3|  inline void dealloc() {
 2873|      3|    assert(capacity() != 0);
 2874|       |    // Unpoison before returning the memory to the allocator.
 2875|      3|    SanitizerUnpoisonMemoryRegion(slot_array(), sizeof(slot_type) * capacity());
 2876|      3|    infoz().Unregister();
 2877|      3|    Deallocate<BackingArrayAlignment(alignof(slot_type))>(
 2878|      3|        &alloc_ref(), common().backing_array_start(),
 2879|      3|        common().alloc_size(sizeof(slot_type), alignof(slot_type)));
 2880|      3|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE5infozEv:
 3200|      6|  HashtablezInfoHandle infoz() { return common().infoz(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE6commonEv:
 3193|    896|  CommonFields& common() { return settings_.template get<0>(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE6resizeEm:
 2905|      3|  ABSL_ATTRIBUTE_NOINLINE void resize(size_t new_capacity) {
 2906|      3|    assert(IsValidCapacity(new_capacity));
 2907|      3|    HashSetResizeHelper resize_helper(common());
 2908|      3|    auto* old_slots = slot_array();
 2909|      3|    common().set_capacity(new_capacity);
 2910|       |    // Note that `InitializeSlots` does different number initialization steps
 2911|       |    // depending on the values of `transfer_uses_memcpy` and capacities.
 2912|       |    // Refer to the comment in `InitializeSlots` for more details.
 2913|      3|    const bool grow_single_group =
 2914|      3|        resize_helper.InitializeSlots<CharAlloc, sizeof(slot_type),
 2915|      3|                                      PolicyTraits::transfer_uses_memcpy(),
 2916|      3|                                      alignof(slot_type)>(
 2917|      3|            common(), const_cast<std::remove_const_t<slot_type>*>(old_slots),
 2918|      3|            CharAlloc(alloc_ref()));
 2919|       |
 2920|      3|    if (resize_helper.old_capacity() == 0) {
  ------------------
  |  Branch (2920:9): [True: 3, False: 0]
  ------------------
 2921|       |      // InitializeSlots did all the work including infoz().RecordRehash().
 2922|      3|      return;
 2923|      3|    }
 2924|       |
 2925|      0|    if (grow_single_group) {
  ------------------
  |  Branch (2925:9): [True: 0, False: 0]
  ------------------
 2926|      0|      if (PolicyTraits::transfer_uses_memcpy()) {
  ------------------
  |  Branch (2926:11): [Folded, False: 0]
  ------------------
 2927|       |        // InitializeSlots did all the work.
 2928|      0|        return;
 2929|      0|      }
 2930|       |      // We want GrowSizeIntoSingleGroup to be called here in order to make
 2931|       |      // InitializeSlots not depend on PolicyTraits.
 2932|      0|      resize_helper.GrowSizeIntoSingleGroup<PolicyTraits>(common(), alloc_ref(),
 2933|      0|                                                          old_slots);
 2934|      0|    } else {
 2935|       |      // InitializeSlots prepares control bytes to correspond to empty table.
 2936|      0|      auto* new_slots = slot_array();
 2937|      0|      size_t total_probe_length = 0;
 2938|      0|      for (size_t i = 0; i != resize_helper.old_capacity(); ++i) {
  ------------------
  |  Branch (2938:26): [True: 0, False: 0]
  ------------------
 2939|      0|        if (IsFull(resize_helper.old_ctrl()[i])) {
  ------------------
  |  Branch (2939:13): [True: 0, False: 0]
  ------------------
 2940|      0|          size_t hash = PolicyTraits::apply(
 2941|      0|              HashElement{hash_ref()}, PolicyTraits::element(old_slots + i));
 2942|      0|          auto target = find_first_non_full(common(), hash);
 2943|      0|          size_t new_i = target.offset;
 2944|      0|          total_probe_length += target.probe_length;
 2945|      0|          SetCtrl(common(), new_i, H2(hash), sizeof(slot_type));
 2946|      0|          transfer(new_slots + new_i, old_slots + i);
 2947|      0|        }
 2948|      0|      }
 2949|      0|      infoz().RecordRehash(total_probe_length);
 2950|      0|    }
 2951|      0|    resize_helper.DeallocateOld<alignof(slot_type)>(
 2952|      0|        CharAlloc(alloc_ref()), sizeof(slot_type),
 2953|      0|        const_cast<std::remove_const_t<slot_type>*>(old_slots));
 2954|      0|  }
_ZN4absl12lts_2024011618container_internal19HashSetResizeHelper15InitializeSlotsINSt3__19allocatorIcEELm16ELb0ELm8EEEbRNS1_12CommonFieldsEPvT_:
 1595|      3|                                               Alloc alloc) {
 1596|      3|    assert(c.capacity());
 1597|       |    // Folks with custom allocators often make unwarranted assumptions about the
 1598|       |    // behavior of their classes vis-a-vis trivial destructability and what
 1599|       |    // calls they will or won't make.  Avoid sampling for people with custom
 1600|       |    // allocators to get us out of this mess.  This is not a hard guarantee but
 1601|       |    // a workaround while we plan the exact guarantee we want to provide.
 1602|      3|    const size_t sample_size =
 1603|      3|        (std::is_same<Alloc, std::allocator<char>>::value &&
  ------------------
  |  Branch (1603:10): [True: 3, Folded]
  ------------------
 1604|      3|         c.slot_array() == nullptr)
  ------------------
  |  Branch (1604:10): [True: 3, False: 0]
  ------------------
 1605|      3|            ? SizeOfSlot
 1606|      3|            : 0;
 1607|      3|    HashtablezInfoHandle infoz =
 1608|      3|        sample_size > 0 ? Sample(sample_size) : c.infoz();
  ------------------
  |  Branch (1608:9): [True: 3, False: 0]
  ------------------
 1609|       |
 1610|      3|    const bool has_infoz = infoz.IsSampled();
 1611|      3|    const size_t cap = c.capacity();
 1612|      3|    const size_t alloc_size =
 1613|      3|        AllocSize(cap, SizeOfSlot, AlignOfSlot, has_infoz);
 1614|      3|    char* mem = static_cast<char*>(
 1615|      3|        Allocate<BackingArrayAlignment(AlignOfSlot)>(&alloc, alloc_size));
 1616|      3|    const GenerationType old_generation = c.generation();
 1617|      3|    c.set_generation_ptr(reinterpret_cast<GenerationType*>(
 1618|      3|        mem + GenerationOffset(cap, has_infoz)));
 1619|      3|    c.set_generation(NextGeneration(old_generation));
 1620|      3|    c.set_control(reinterpret_cast<ctrl_t*>(mem + ControlOffset(has_infoz)));
 1621|      3|    c.set_slots(mem + SlotOffset(cap, AlignOfSlot, has_infoz));
 1622|      3|    ResetGrowthLeft(c);
 1623|       |
 1624|      3|    const bool grow_single_group =
 1625|      3|        IsGrowingIntoSingleGroupApplicable(old_capacity_, c.capacity());
 1626|      3|    if (old_capacity_ != 0 && grow_single_group) {
  ------------------
  |  Branch (1626:9): [True: 0, False: 3]
  |  Branch (1626:31): [True: 0, False: 0]
  ------------------
 1627|      0|      if (TransferUsesMemcpy) {
  ------------------
  |  Branch (1627:11): [Folded, False: 0]
  ------------------
 1628|      0|        GrowSizeIntoSingleGroupTransferable(c, old_slots, SizeOfSlot);
 1629|      0|        DeallocateOld<AlignOfSlot>(alloc, SizeOfSlot, old_slots);
 1630|      0|      } else {
 1631|      0|        GrowIntoSingleGroupShuffleControlBytes(c.control(), c.capacity());
 1632|      0|      }
 1633|      3|    } else {
 1634|      3|      ResetCtrl(c, SizeOfSlot);
 1635|      3|    }
 1636|       |
 1637|      3|    c.set_has_infoz(has_infoz);
 1638|      3|    if (has_infoz) {
  ------------------
  |  Branch (1638:9): [True: 0, False: 3]
  ------------------
 1639|      0|      infoz.RecordStorageChanged(c.size(), cap);
 1640|      0|      if (grow_single_group || old_capacity_ == 0) {
  ------------------
  |  Branch (1640:11): [True: 0, False: 0]
  |  Branch (1640:32): [True: 0, False: 0]
  ------------------
 1641|      0|        infoz.RecordRehash(0);
 1642|      0|      }
 1643|      0|      c.set_infoz(infoz);
 1644|      0|    }
 1645|      3|    return grow_single_group;
 1646|      3|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE8hash_refEv:
 3202|      3|  hasher& hash_ref() { return settings_.template get<1>(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE19prefetch_heap_blockEv:
 3187|    427|  void prefetch_heap_block() const {
 3188|    427|#if ABSL_HAVE_BUILTIN(__builtin_prefetch) || defined(__GNUC__)
 3189|    427|    __builtin_prefetch(control(), 0, 1);
 3190|    427|#endif
 3191|    427|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE14prepare_insertEm:
 3110|      3|  size_t prepare_insert(size_t hash) ABSL_ATTRIBUTE_NOINLINE {
 3111|      3|    const bool rehash_for_bug_detection =
 3112|      3|        common().should_rehash_for_bug_detection_on_insert();
 3113|      3|    if (rehash_for_bug_detection) {
  ------------------
  |  Branch (3113:9): [True: 0, False: 3]
  ------------------
 3114|       |      // Move to a different heap allocation in order to detect bugs.
 3115|      0|      const size_t cap = capacity();
 3116|      0|      resize(growth_left() > 0 ? cap : NextCapacity(cap));
  ------------------
  |  Branch (3116:14): [True: 0, False: 0]
  ------------------
 3117|      0|    }
 3118|      3|    auto target = find_first_non_full(common(), hash);
 3119|      3|    if (!rehash_for_bug_detection &&
  ------------------
  |  Branch (3119:9): [True: 3, False: 0]
  ------------------
 3120|      3|        ABSL_PREDICT_FALSE(growth_left() == 0 &&
  ------------------
  |  |  178|      6|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 3, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 3]
  |  |  |  Branch (178:59): [True: 3, False: 0]
  |  |  |  Branch (178:59): [True: 3, False: 0]
  |  |  ------------------
  ------------------
 3121|      3|                           !IsDeleted(control()[target.offset]))) {
 3122|      3|      size_t old_capacity = capacity();
 3123|      3|      rehash_and_grow_if_necessary();
 3124|       |      // NOTE: It is safe to use `FindFirstNonFullAfterResize`.
 3125|       |      // `FindFirstNonFullAfterResize` must be called right after resize.
 3126|       |      // `rehash_and_grow_if_necessary` may *not* call `resize`
 3127|       |      // and perform `drop_deletes_without_resize` instead. But this
 3128|       |      // could happen only on big tables.
 3129|       |      // For big tables `FindFirstNonFullAfterResize` will always
 3130|       |      // fallback to normal `find_first_non_full`, so it is safe to use it.
 3131|      3|      target = HashSetResizeHelper::FindFirstNonFullAfterResize(
 3132|      3|          common(), old_capacity, hash);
 3133|      3|    }
 3134|      3|    common().increment_size();
 3135|      3|    set_growth_left(growth_left() - IsEmpty(control()[target.offset]));
 3136|      3|    SetCtrl(common(), target.offset, H2(hash), sizeof(slot_type));
 3137|      3|    common().maybe_increment_generation_on_insert();
 3138|      3|    infoz().RecordInsert(hash, target.probe_length);
 3139|      3|    return target.offset;
 3140|      3|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE11growth_leftEv:
 3181|      6|  size_t growth_left() const { return common().growth_left(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE28rehash_and_grow_if_necessaryEv:
 2970|      3|  void rehash_and_grow_if_necessary() {
 2971|      3|    const size_t cap = capacity();
 2972|      3|    if (cap > Group::kWidth &&
  ------------------
  |  Branch (2972:9): [True: 0, False: 3]
  ------------------
 2973|       |        // Do these calculations in 64-bit to avoid overflow.
 2974|      0|        size() * uint64_t{32} <= cap * uint64_t{25}) {
  ------------------
  |  Branch (2974:9): [True: 0, False: 0]
  ------------------
 2975|       |      // Squash DELETED without growing if there is enough capacity.
 2976|       |      //
 2977|       |      // Rehash in place if the current size is <= 25/32 of capacity.
 2978|       |      // Rationale for such a high factor: 1) drop_deletes_without_resize() is
 2979|       |      // faster than resize, and 2) it takes quite a bit of work to add
 2980|       |      // tombstones.  In the worst case, seems to take approximately 4
 2981|       |      // insert/erase pairs to create a single tombstone and so if we are
 2982|       |      // rehashing because of tombstones, we can afford to rehash-in-place as
 2983|       |      // long as we are reclaiming at least 1/8 the capacity without doing more
 2984|       |      // than 2X the work.  (Where "work" is defined to be size() for rehashing
 2985|       |      // or rehashing in place, and 1 for an insert or erase.)  But rehashing in
 2986|       |      // place is faster per operation than inserting or even doubling the size
 2987|       |      // of the table, so we actually afford to reclaim even less space from a
 2988|       |      // resize-in-place.  The decision is to rehash in place if we can reclaim
 2989|       |      // at about 1/8th of the usable capacity (specifically 3/28 of the
 2990|       |      // capacity) which means that the total cost of rehashing will be a small
 2991|       |      // fraction of the total work.
 2992|       |      //
 2993|       |      // Here is output of an experiment using the BM_CacheInSteadyState
 2994|       |      // benchmark running the old case (where we rehash-in-place only if we can
 2995|       |      // reclaim at least 7/16*capacity) vs. this code (which rehashes in place
 2996|       |      // if we can recover 3/32*capacity).
 2997|       |      //
 2998|       |      // Note that although in the worst-case number of rehashes jumped up from
 2999|       |      // 15 to 190, but the number of operations per second is almost the same.
 3000|       |      //
 3001|       |      // Abridged output of running BM_CacheInSteadyState benchmark from
 3002|       |      // raw_hash_set_benchmark.   N is the number of insert/erase operations.
 3003|       |      //
 3004|       |      //      | OLD (recover >= 7/16        | NEW (recover >= 3/32)
 3005|       |      // size |    N/s LoadFactor NRehashes |    N/s LoadFactor NRehashes
 3006|       |      //  448 | 145284       0.44        18 | 140118       0.44        19
 3007|       |      //  493 | 152546       0.24        11 | 151417       0.48        28
 3008|       |      //  538 | 151439       0.26        11 | 151152       0.53        38
 3009|       |      //  583 | 151765       0.28        11 | 150572       0.57        50
 3010|       |      //  628 | 150241       0.31        11 | 150853       0.61        66
 3011|       |      //  672 | 149602       0.33        12 | 150110       0.66        90
 3012|       |      //  717 | 149998       0.35        12 | 149531       0.70       129
 3013|       |      //  762 | 149836       0.37        13 | 148559       0.74       190
 3014|       |      //  807 | 149736       0.39        14 | 151107       0.39        14
 3015|       |      //  852 | 150204       0.42        15 | 151019       0.42        15
 3016|      0|      drop_deletes_without_resize();
 3017|      3|    } else {
 3018|       |      // Otherwise grow the container.
 3019|      3|      resize(NextCapacity(cap));
 3020|      3|    }
 3021|      3|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE15set_growth_leftEm:
 3182|      3|  void set_growth_left(size_t gl) { return common().set_growth_left(gl); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE11iterator_atEm:
 3159|      3|  iterator iterator_at(size_t i) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3160|      3|    return {control() + i, slot_array() + i, common().generation_ptr()};
 3161|      3|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE8iteratorC2EPNS1_6ctrl_tEPS4_PKh:
 1984|      3|        : HashSetIteratorGenerationInfo(generation_ptr),
 1985|      3|          ctrl_(ctrl),
 1986|      3|          slot_(slot) {
 1987|       |      // This assumption helps the compiler know that any non-end iterator is
 1988|       |      // not equal to any end iterator.
 1989|      3|      ABSL_ASSUME(ctrl != nullptr);
  ------------------
  |  |  259|      3|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 1990|      3|    }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE3endEv:
 2271|    424|  iterator end() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2272|    424|    return iterator(common().generation_ptr());
 2273|    424|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE8iteratorC2EPKh:
 1993|    848|        : HashSetIteratorGenerationInfo(generation_ptr), ctrl_(nullptr) {}
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE14const_iteratorC2ENSB_8iteratorE:
 2047|    848|    const_iterator(iterator i) : inner_(std::move(i)) {}  // NOLINT
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE8hash_refEv:
 3203|    424|  const hasher& hash_ref() const { return settings_.template get<1>(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE14const_iterator16unchecked_equalsERKSC_:
 2075|    424|    bool unchecked_equals(const const_iterator& b) {
 2076|    424|      return inner_.unchecked_equals(b.inner_);
 2077|    424|    }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE8iterator16unchecked_equalsERKSC_:
 2025|    424|    bool unchecked_equals(const iterator& b) { return ctrl_ == b.control(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE8iterator7controlEv:
 2009|    424|    ctrl_t* control() const { return ctrl_; }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE3endEv:
 2278|    424|  const_iterator end() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2279|    424|    return iterator(common().generation_ptr());
 2280|    424|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE4findINS0_11string_viewEEENSF_8iteratorERKT_m:
 2688|      4|                size_t hash) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2689|      4|    auto seq = probe(common(), hash);
 2690|      4|    slot_type* slot_ptr = slot_array();
 2691|      4|    const ctrl_t* ctrl = control();
 2692|      4|    while (true) {
  ------------------
  |  Branch (2692:12): [True: 4, Folded]
  ------------------
 2693|      4|      Group g{ctrl + seq.offset()};
 2694|      4|      for (uint32_t i : g.Match(H2(hash))) {
  ------------------
  |  Branch (2694:23): [True: 0, False: 4]
  ------------------
 2695|      0|        if (ABSL_PREDICT_TRUE(PolicyTraits::apply(
  ------------------
  |  |  179|      0|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 0, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 0]
  |  |  |  Branch (179:57): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2696|      0|                EqualElement<K>{key, eq_ref()},
 2697|      0|                PolicyTraits::element(slot_ptr + seq.offset(i)))))
 2698|      0|          return iterator_at(seq.offset(i));
 2699|      0|      }
 2700|      4|      if (ABSL_PREDICT_TRUE(g.MaskEmpty())) return end();
  ------------------
  |  |  179|      4|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 4, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 4]
  |  |  |  Branch (179:57): [True: 4, False: 0]
  |  |  ------------------
  ------------------
 2701|      0|      seq.next();
 2702|       |      assert(seq.index() <= capacity() && "full table!");
 2703|      0|    }
 2704|      4|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE3endEv:
 2271|      8|  iterator end() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2272|      8|    return iterator(common().generation_ptr());
 2273|      8|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE8iteratorC2EPKh:
 1993|     16|        : HashSetIteratorGenerationInfo(generation_ptr), ctrl_(nullptr) {}
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__16vectorIiNS4_9allocatorIiEEEEiEENS0_13hash_internal4HashIS8_EENS4_8equal_toIS8_EENS6_INS4_4pairIKS8_iEEEEED2Ev:
 2264|      4|  ~raw_hash_set() { destructor_impl(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__16vectorIiNS4_9allocatorIiEEEEiEENS0_13hash_internal4HashIS8_EENS4_8equal_toIS8_EENS6_INS4_4pairIKS8_iEEEEE15destructor_implEv:
 2882|      4|  inline void destructor_impl() {
 2883|      4|    if (capacity() == 0) return;
  ------------------
  |  Branch (2883:9): [True: 4, False: 0]
  ------------------
 2884|      0|    destroy_slots();
 2885|      0|    dealloc();
 2886|      0|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__16vectorIiNS4_9allocatorIiEEEEiEENS0_13hash_internal4HashIS8_EENS4_8equal_toIS8_EENS6_INS4_4pairIKS8_iEEEEE8capacityEv:
 2288|      4|  size_t capacity() const { return common().capacity(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__16vectorIiNS4_9allocatorIiEEEEiEENS0_13hash_internal4HashIS8_EENS4_8equal_toIS8_EENS6_INS4_4pairIKS8_iEEEEE6commonEv:
 3194|      4|  const CommonFields& common() const { return settings_.template get<0>(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__16vectorIiNS4_9allocatorIiEEEES8_EENS0_13hash_internal4HashIS8_EENS4_8equal_toIS8_EENS6_INS4_4pairIKS8_S8_EEEEED2Ev:
 2264|      4|  ~raw_hash_set() { destructor_impl(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__16vectorIiNS4_9allocatorIiEEEES8_EENS0_13hash_internal4HashIS8_EENS4_8equal_toIS8_EENS6_INS4_4pairIKS8_S8_EEEEE15destructor_implEv:
 2882|      4|  inline void destructor_impl() {
 2883|      4|    if (capacity() == 0) return;
  ------------------
  |  Branch (2883:9): [True: 4, False: 0]
  ------------------
 2884|      0|    destroy_slots();
 2885|      0|    dealloc();
 2886|      0|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__16vectorIiNS4_9allocatorIiEEEES8_EENS0_13hash_internal4HashIS8_EENS4_8equal_toIS8_EENS6_INS4_4pairIKS8_S8_EEEEE8capacityEv:
 2288|      4|  size_t capacity() const { return common().capacity(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__16vectorIiNS4_9allocatorIiEEEES8_EENS0_13hash_internal4HashIS8_EENS4_8equal_toIS8_EENS6_INS4_4pairIKS8_S8_EEEEE6commonEv:
 3194|      4|  const CommonFields& common() const { return settings_.template get<0>(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEEC2Ev:
 2088|      4|      std::is_nothrow_default_constructible<allocator_type>::value) {}
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf10DescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEEC2Ev:
 2088|      2|      std::is_nothrow_default_constructible<allocator_type>::value) {}
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEEC2Ev:
 2088|      2|      std::is_nothrow_default_constructible<allocator_type>::value) {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEEC2Ev:
 2088|      2|      std::is_nothrow_default_constructible<allocator_type>::value) {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEEC2Ev:
 2088|      2|      std::is_nothrow_default_constructible<allocator_type>::value) {}
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEEC2Ev:
 2088|      2|      std::is_nothrow_default_constructible<allocator_type>::value) {}
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE6insertESt16initializer_listINSI_ISA_SE_EEE:
 2385|      2|  void insert(std::initializer_list<init_type> ilist) {
 2386|      2|    insert(ilist.begin(), ilist.end());
 2387|      2|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE6insertIPKNSI_ISA_SE_EEEEvT_SR_:
 2376|      2|  void insert(InputIt first, InputIt last) {
 2377|     34|    for (; first != last; ++first) emplace(*first);
  ------------------
  |  Branch (2377:12): [True: 32, False: 2]
  ------------------
 2378|      2|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE7emplaceIJRKNSI_ISA_SE_EEETnNS4_9enable_ifIXsr14IsDecomposableIDpT_EE5valueEiE4typeELi0EEENSI_INSM_8iteratorEbEEDpOSS_:
 2422|     32|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2423|     32|    return PolicyTraits::apply(EmplaceDecomposable{*this},
 2424|     32|                               std::forward<Args>(args)...);
 2425|     32|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE19EmplaceDecomposableclISA_JRKNS4_21piecewise_construct_tENS4_5tupleIJRSJ_EEENSS_IJRKSE_EEEEEENSI_INSM_8iteratorEbEERKT_DpOT0_:
 2822|     32|    std::pair<iterator, bool> operator()(const K& key, Args&&... args) const {
 2823|     32|      auto res = s.find_or_prepare_insert(key);
 2824|     32|      if (res.second) {
  ------------------
  |  Branch (2824:11): [True: 32, False: 0]
  ------------------
 2825|     32|        s.emplace_at(res.first, std::forward<Args>(args)...);
 2826|     32|      }
 2827|     32|      return {s.iterator_at(res.first), res.second};
 2828|     32|    }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE22find_or_prepare_insertISA_EENSI_ImbEERKT_:
 3086|     32|  std::pair<size_t, bool> find_or_prepare_insert(const K& key) {
 3087|     32|    prefetch_heap_block();
 3088|     32|    auto hash = hash_ref()(key);
 3089|     32|    auto seq = probe(common(), hash);
 3090|     32|    const ctrl_t* ctrl = control();
 3091|     32|    while (true) {
  ------------------
  |  Branch (3091:12): [True: 32, Folded]
  ------------------
 3092|     32|      Group g{ctrl + seq.offset()};
 3093|     32|      for (uint32_t i : g.Match(H2(hash))) {
  ------------------
  |  Branch (3093:23): [True: 3, False: 32]
  ------------------
 3094|      3|        if (ABSL_PREDICT_TRUE(PolicyTraits::apply(
  ------------------
  |  |  179|      3|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 0, False: 3]
  |  |  |  Branch (179:48): [Folded, False: 3]
  |  |  |  Branch (179:57): [True: 0, False: 3]
  |  |  ------------------
  ------------------
 3095|      3|                EqualElement<K>{key, eq_ref()},
 3096|      3|                PolicyTraits::element(slot_array() + seq.offset(i)))))
 3097|      0|          return {seq.offset(i), false};
 3098|      3|      }
 3099|     32|      if (ABSL_PREDICT_TRUE(g.MaskEmpty())) break;
  ------------------
  |  |  179|     32|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 32, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 32]
  |  |  |  Branch (179:57): [True: 32, False: 0]
  |  |  ------------------
  ------------------
 3100|      0|      seq.next();
 3101|      0|      assert(seq.index() <= capacity() && "full table!");
 3102|      0|    }
 3103|     32|    return {prepare_insert(hash), true};
 3104|     32|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE19prefetch_heap_blockEv:
 3187|     79|  void prefetch_heap_block() const {
 3188|     79|#if ABSL_HAVE_BUILTIN(__builtin_prefetch) || defined(__GNUC__)
 3189|     79|    __builtin_prefetch(control(), 0, 1);
 3190|     79|#endif
 3191|     79|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE8hash_refEv:
 3202|    107|  hasher& hash_ref() { return settings_.template get<1>(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE12EqualElementISA_EclISA_JRKNS4_21piecewise_construct_tENS4_5tupleIJRSJ_EEENST_IJRKSE_EEEEEEbRKT_DpOT0_:
 2813|      7|    bool operator()(const K2& lhs, Args&&...) const {
 2814|      7|      return eq(lhs, rhs);
 2815|      7|    }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE6eq_refEv:
 3204|      7|  key_equal& eq_ref() { return settings_.template get<2>(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE14prepare_insertEm:
 3110|     32|  size_t prepare_insert(size_t hash) ABSL_ATTRIBUTE_NOINLINE {
 3111|     32|    const bool rehash_for_bug_detection =
 3112|     32|        common().should_rehash_for_bug_detection_on_insert();
 3113|     32|    if (rehash_for_bug_detection) {
  ------------------
  |  Branch (3113:9): [True: 0, False: 32]
  ------------------
 3114|       |      // Move to a different heap allocation in order to detect bugs.
 3115|      0|      const size_t cap = capacity();
 3116|      0|      resize(growth_left() > 0 ? cap : NextCapacity(cap));
  ------------------
  |  Branch (3116:14): [True: 0, False: 0]
  ------------------
 3117|      0|    }
 3118|     32|    auto target = find_first_non_full(common(), hash);
 3119|     32|    if (!rehash_for_bug_detection &&
  ------------------
  |  Branch (3119:9): [True: 32, False: 0]
  ------------------
 3120|     32|        ABSL_PREDICT_FALSE(growth_left() == 0 &&
  ------------------
  |  |  178|     42|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 10, False: 22]
  |  |  |  Branch (178:49): [Folded, False: 32]
  |  |  |  Branch (178:59): [True: 10, False: 22]
  |  |  |  Branch (178:59): [True: 10, False: 0]
  |  |  ------------------
  ------------------
 3121|     32|                           !IsDeleted(control()[target.offset]))) {
 3122|     10|      size_t old_capacity = capacity();
 3123|     10|      rehash_and_grow_if_necessary();
 3124|       |      // NOTE: It is safe to use `FindFirstNonFullAfterResize`.
 3125|       |      // `FindFirstNonFullAfterResize` must be called right after resize.
 3126|       |      // `rehash_and_grow_if_necessary` may *not* call `resize`
 3127|       |      // and perform `drop_deletes_without_resize` instead. But this
 3128|       |      // could happen only on big tables.
 3129|       |      // For big tables `FindFirstNonFullAfterResize` will always
 3130|       |      // fallback to normal `find_first_non_full`, so it is safe to use it.
 3131|     10|      target = HashSetResizeHelper::FindFirstNonFullAfterResize(
 3132|     10|          common(), old_capacity, hash);
 3133|     10|    }
 3134|     32|    common().increment_size();
 3135|     32|    set_growth_left(growth_left() - IsEmpty(control()[target.offset]));
 3136|     32|    SetCtrl(common(), target.offset, H2(hash), sizeof(slot_type));
 3137|     32|    common().maybe_increment_generation_on_insert();
 3138|     32|    infoz().RecordInsert(hash, target.probe_length);
 3139|     32|    return target.offset;
 3140|     32|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE6resizeEm:
 2905|     10|  ABSL_ATTRIBUTE_NOINLINE void resize(size_t new_capacity) {
 2906|     10|    assert(IsValidCapacity(new_capacity));
 2907|     10|    HashSetResizeHelper resize_helper(common());
 2908|     10|    auto* old_slots = slot_array();
 2909|     10|    common().set_capacity(new_capacity);
 2910|       |    // Note that `InitializeSlots` does different number initialization steps
 2911|       |    // depending on the values of `transfer_uses_memcpy` and capacities.
 2912|       |    // Refer to the comment in `InitializeSlots` for more details.
 2913|     10|    const bool grow_single_group =
 2914|     10|        resize_helper.InitializeSlots<CharAlloc, sizeof(slot_type),
 2915|     10|                                      PolicyTraits::transfer_uses_memcpy(),
 2916|     10|                                      alignof(slot_type)>(
 2917|     10|            common(), const_cast<std::remove_const_t<slot_type>*>(old_slots),
 2918|     10|            CharAlloc(alloc_ref()));
 2919|       |
 2920|     10|    if (resize_helper.old_capacity() == 0) {
  ------------------
  |  Branch (2920:9): [True: 2, False: 8]
  ------------------
 2921|       |      // InitializeSlots did all the work including infoz().RecordRehash().
 2922|      2|      return;
 2923|      2|    }
 2924|       |
 2925|      8|    if (grow_single_group) {
  ------------------
  |  Branch (2925:9): [True: 6, False: 2]
  ------------------
 2926|      6|      if (PolicyTraits::transfer_uses_memcpy()) {
  ------------------
  |  Branch (2926:11): [Folded, False: 6]
  ------------------
 2927|       |        // InitializeSlots did all the work.
 2928|      0|        return;
 2929|      0|      }
 2930|       |      // We want GrowSizeIntoSingleGroup to be called here in order to make
 2931|       |      // InitializeSlots not depend on PolicyTraits.
 2932|      6|      resize_helper.GrowSizeIntoSingleGroup<PolicyTraits>(common(), alloc_ref(),
 2933|      6|                                                          old_slots);
 2934|      6|    } else {
 2935|       |      // InitializeSlots prepares control bytes to correspond to empty table.
 2936|      2|      auto* new_slots = slot_array();
 2937|      2|      size_t total_probe_length = 0;
 2938|     32|      for (size_t i = 0; i != resize_helper.old_capacity(); ++i) {
  ------------------
  |  Branch (2938:26): [True: 30, False: 2]
  ------------------
 2939|     30|        if (IsFull(resize_helper.old_ctrl()[i])) {
  ------------------
  |  Branch (2939:13): [True: 28, False: 2]
  ------------------
 2940|     28|          size_t hash = PolicyTraits::apply(
 2941|     28|              HashElement{hash_ref()}, PolicyTraits::element(old_slots + i));
 2942|     28|          auto target = find_first_non_full(common(), hash);
 2943|     28|          size_t new_i = target.offset;
 2944|     28|          total_probe_length += target.probe_length;
 2945|     28|          SetCtrl(common(), new_i, H2(hash), sizeof(slot_type));
 2946|     28|          transfer(new_slots + new_i, old_slots + i);
 2947|     28|        }
 2948|     30|      }
 2949|      2|      infoz().RecordRehash(total_probe_length);
 2950|      2|    }
 2951|      8|    resize_helper.DeallocateOld<alignof(slot_type)>(
 2952|      8|        CharAlloc(alloc_ref()), sizeof(slot_type),
 2953|      8|        const_cast<std::remove_const_t<slot_type>*>(old_slots));
 2954|      8|  }
_ZN4absl12lts_2024011618container_internal19HashSetResizeHelper15InitializeSlotsINSt3__19allocatorIcEELm32ELb0ELm8EEEbRNS1_12CommonFieldsEPvT_:
 1595|     13|                                               Alloc alloc) {
 1596|     13|    assert(c.capacity());
 1597|       |    // Folks with custom allocators often make unwarranted assumptions about the
 1598|       |    // behavior of their classes vis-a-vis trivial destructability and what
 1599|       |    // calls they will or won't make.  Avoid sampling for people with custom
 1600|       |    // allocators to get us out of this mess.  This is not a hard guarantee but
 1601|       |    // a workaround while we plan the exact guarantee we want to provide.
 1602|     13|    const size_t sample_size =
 1603|     13|        (std::is_same<Alloc, std::allocator<char>>::value &&
  ------------------
  |  Branch (1603:10): [True: 13, Folded]
  ------------------
 1604|     13|         c.slot_array() == nullptr)
  ------------------
  |  Branch (1604:10): [True: 3, False: 10]
  ------------------
 1605|     13|            ? SizeOfSlot
 1606|     13|            : 0;
 1607|     13|    HashtablezInfoHandle infoz =
 1608|     13|        sample_size > 0 ? Sample(sample_size) : c.infoz();
  ------------------
  |  Branch (1608:9): [True: 3, False: 10]
  ------------------
 1609|       |
 1610|     13|    const bool has_infoz = infoz.IsSampled();
 1611|     13|    const size_t cap = c.capacity();
 1612|     13|    const size_t alloc_size =
 1613|     13|        AllocSize(cap, SizeOfSlot, AlignOfSlot, has_infoz);
 1614|     13|    char* mem = static_cast<char*>(
 1615|     13|        Allocate<BackingArrayAlignment(AlignOfSlot)>(&alloc, alloc_size));
 1616|     13|    const GenerationType old_generation = c.generation();
 1617|     13|    c.set_generation_ptr(reinterpret_cast<GenerationType*>(
 1618|     13|        mem + GenerationOffset(cap, has_infoz)));
 1619|     13|    c.set_generation(NextGeneration(old_generation));
 1620|     13|    c.set_control(reinterpret_cast<ctrl_t*>(mem + ControlOffset(has_infoz)));
 1621|     13|    c.set_slots(mem + SlotOffset(cap, AlignOfSlot, has_infoz));
 1622|     13|    ResetGrowthLeft(c);
 1623|       |
 1624|     13|    const bool grow_single_group =
 1625|     13|        IsGrowingIntoSingleGroupApplicable(old_capacity_, c.capacity());
 1626|     13|    if (old_capacity_ != 0 && grow_single_group) {
  ------------------
  |  Branch (1626:9): [True: 10, False: 3]
  |  Branch (1626:31): [True: 8, False: 2]
  ------------------
 1627|      8|      if (TransferUsesMemcpy) {
  ------------------
  |  Branch (1627:11): [Folded, False: 8]
  ------------------
 1628|      0|        GrowSizeIntoSingleGroupTransferable(c, old_slots, SizeOfSlot);
 1629|      0|        DeallocateOld<AlignOfSlot>(alloc, SizeOfSlot, old_slots);
 1630|      8|      } else {
 1631|      8|        GrowIntoSingleGroupShuffleControlBytes(c.control(), c.capacity());
 1632|      8|      }
 1633|      8|    } else {
 1634|      5|      ResetCtrl(c, SizeOfSlot);
 1635|      5|    }
 1636|       |
 1637|     13|    c.set_has_infoz(has_infoz);
 1638|     13|    if (has_infoz) {
  ------------------
  |  Branch (1638:9): [True: 0, False: 13]
  ------------------
 1639|      0|      infoz.RecordStorageChanged(c.size(), cap);
 1640|      0|      if (grow_single_group || old_capacity_ == 0) {
  ------------------
  |  Branch (1640:11): [True: 0, False: 0]
  |  Branch (1640:32): [True: 0, False: 0]
  ------------------
 1641|      0|        infoz.RecordRehash(0);
 1642|      0|      }
 1643|      0|      c.set_infoz(infoz);
 1644|      0|    }
 1645|     13|    return grow_single_group;
 1646|     13|  }
_ZN4absl12lts_2024011618container_internal19HashSetResizeHelper23GrowSizeIntoSingleGroupINS1_18hash_policy_traitsINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEEvEENSA_INS6_4pairIKSC_SG_EEEEEEvRNS1_12CommonFieldsERT0_PNT_9slot_typeE:
 1655|      6|                               typename PolicyTraits::slot_type* old_slots) {
 1656|      6|    assert(old_capacity_ < Group::kWidth / 2);
 1657|      6|    assert(IsGrowingIntoSingleGroupApplicable(old_capacity_, c.capacity()));
 1658|      6|    using slot_type = typename PolicyTraits::slot_type;
 1659|      6|    assert(is_single_group(c.capacity()));
 1660|       |
 1661|      6|    auto* new_slots = reinterpret_cast<slot_type*>(c.slot_array());
 1662|       |
 1663|      6|    size_t shuffle_bit = old_capacity_ / 2 + 1;
 1664|     28|    for (size_t i = 0; i < old_capacity_; ++i) {
  ------------------
  |  Branch (1664:24): [True: 22, False: 6]
  ------------------
 1665|     22|      if (IsFull(old_ctrl_[i])) {
  ------------------
  |  Branch (1665:11): [True: 22, False: 0]
  ------------------
 1666|     22|        size_t new_i = i ^ shuffle_bit;
 1667|     22|        SanitizerUnpoisonMemoryRegion(new_slots + new_i, sizeof(slot_type));
 1668|     22|        PolicyTraits::transfer(&alloc_ref, new_slots + new_i, old_slots + i);
 1669|     22|      }
 1670|     22|    }
 1671|      6|    PoisonSingleGroupEmptySlots(c, sizeof(slot_type));
 1672|      6|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE11HashElementclISA_JRKNS4_21piecewise_construct_tENS4_5tupleIJRSJ_EEENSS_IJRKSE_EEEEEEmRKT_DpOT0_:
 2804|     28|    size_t operator()(const K& key, Args&&...) const {
 2805|     28|      return h(key);
 2806|     28|    }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE8transferEPNS1_13map_slot_typeISA_SE_EESP_:
 2857|     28|  inline void transfer(slot_type* to, slot_type* from) {
 2858|     28|    PolicyTraits::transfer(&alloc_ref(), to, from);
 2859|     28|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE11growth_leftEv:
 3181|     64|  size_t growth_left() const { return common().growth_left(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE28rehash_and_grow_if_necessaryEv:
 2970|     10|  void rehash_and_grow_if_necessary() {
 2971|     10|    const size_t cap = capacity();
 2972|     10|    if (cap > Group::kWidth &&
  ------------------
  |  Branch (2972:9): [True: 0, False: 10]
  ------------------
 2973|       |        // Do these calculations in 64-bit to avoid overflow.
 2974|      0|        size() * uint64_t{32} <= cap * uint64_t{25}) {
  ------------------
  |  Branch (2974:9): [True: 0, False: 0]
  ------------------
 2975|       |      // Squash DELETED without growing if there is enough capacity.
 2976|       |      //
 2977|       |      // Rehash in place if the current size is <= 25/32 of capacity.
 2978|       |      // Rationale for such a high factor: 1) drop_deletes_without_resize() is
 2979|       |      // faster than resize, and 2) it takes quite a bit of work to add
 2980|       |      // tombstones.  In the worst case, seems to take approximately 4
 2981|       |      // insert/erase pairs to create a single tombstone and so if we are
 2982|       |      // rehashing because of tombstones, we can afford to rehash-in-place as
 2983|       |      // long as we are reclaiming at least 1/8 the capacity without doing more
 2984|       |      // than 2X the work.  (Where "work" is defined to be size() for rehashing
 2985|       |      // or rehashing in place, and 1 for an insert or erase.)  But rehashing in
 2986|       |      // place is faster per operation than inserting or even doubling the size
 2987|       |      // of the table, so we actually afford to reclaim even less space from a
 2988|       |      // resize-in-place.  The decision is to rehash in place if we can reclaim
 2989|       |      // at about 1/8th of the usable capacity (specifically 3/28 of the
 2990|       |      // capacity) which means that the total cost of rehashing will be a small
 2991|       |      // fraction of the total work.
 2992|       |      //
 2993|       |      // Here is output of an experiment using the BM_CacheInSteadyState
 2994|       |      // benchmark running the old case (where we rehash-in-place only if we can
 2995|       |      // reclaim at least 7/16*capacity) vs. this code (which rehashes in place
 2996|       |      // if we can recover 3/32*capacity).
 2997|       |      //
 2998|       |      // Note that although in the worst-case number of rehashes jumped up from
 2999|       |      // 15 to 190, but the number of operations per second is almost the same.
 3000|       |      //
 3001|       |      // Abridged output of running BM_CacheInSteadyState benchmark from
 3002|       |      // raw_hash_set_benchmark.   N is the number of insert/erase operations.
 3003|       |      //
 3004|       |      //      | OLD (recover >= 7/16        | NEW (recover >= 3/32)
 3005|       |      // size |    N/s LoadFactor NRehashes |    N/s LoadFactor NRehashes
 3006|       |      //  448 | 145284       0.44        18 | 140118       0.44        19
 3007|       |      //  493 | 152546       0.24        11 | 151417       0.48        28
 3008|       |      //  538 | 151439       0.26        11 | 151152       0.53        38
 3009|       |      //  583 | 151765       0.28        11 | 150572       0.57        50
 3010|       |      //  628 | 150241       0.31        11 | 150853       0.61        66
 3011|       |      //  672 | 149602       0.33        12 | 150110       0.66        90
 3012|       |      //  717 | 149998       0.35        12 | 149531       0.70       129
 3013|       |      //  762 | 149836       0.37        13 | 148559       0.74       190
 3014|       |      //  807 | 149736       0.39        14 | 151107       0.39        14
 3015|       |      //  852 | 150204       0.42        15 | 151019       0.42        15
 3016|      0|      drop_deletes_without_resize();
 3017|     10|    } else {
 3018|       |      // Otherwise grow the container.
 3019|     10|      resize(NextCapacity(cap));
 3020|     10|    }
 3021|     10|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE15set_growth_leftEm:
 3182|     32|  void set_growth_left(size_t gl) { return common().set_growth_left(gl); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE10emplace_atIJRKNS4_21piecewise_construct_tENS4_5tupleIJRSJ_EEENSR_IJRKSE_EEEEEEvmDpOT_:
 3151|     32|  void emplace_at(size_t i, Args&&... args) {
 3152|     32|    construct(slot_array() + i, std::forward<Args>(args)...);
 3153|       |
 3154|       |    assert(PolicyTraits::apply(FindElement{*this}, *iterator_at(i)) ==
 3155|     32|               iterator_at(i) &&
 3156|     32|           "constructed value does not match the lookup key");
 3157|     32|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE9constructIJRKNS4_21piecewise_construct_tENS4_5tupleIJRSJ_EEENSR_IJRKSE_EEEEEEvPNS1_13map_slot_typeISA_SE_EEDpOT_:
 2851|     32|  inline void construct(slot_type* slot, Args&&... args) {
 2852|     32|    PolicyTraits::construct(&alloc_ref(), slot, std::forward<Args>(args)...);
 2853|     32|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE11iterator_atEm:
 3159|     33|  iterator iterator_at(size_t i) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3160|     33|    return {control() + i, slot_array() + i, common().generation_ptr()};
 3161|     33|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE8iteratorC2EPNS1_6ctrl_tEPNS1_13map_slot_typeISA_SE_EEPKh:
 1984|     33|        : HashSetIteratorGenerationInfo(generation_ptr),
 1985|     33|          ctrl_(ctrl),
 1986|     33|          slot_(slot) {
 1987|       |      // This assumption helps the compiler know that any non-end iterator is
 1988|       |      // not equal to any end iterator.
 1989|     33|      ABSL_ASSUME(ctrl != nullptr);
  ------------------
  |  |  259|     33|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 1990|     33|    }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEEC2Ev:
 2088|      4|      std::is_nothrow_default_constructible<allocator_type>::value) {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEEC2Ev:
 2088|      4|      std::is_nothrow_default_constructible<allocator_type>::value) {}
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEEC2Ev:
 2088|      8|      std::is_nothrow_default_constructible<allocator_type>::value) {}
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPKN6google8protobuf23SourceCodeInfo_LocationEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SF_EEEEEC2Ev:
 2088|      4|      std::is_nothrow_default_constructible<allocator_type>::value) {}
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE12EqualElementIS6_EclIS6_JRS6_EEEbRKT_DpOT0_:
 2813|     44|    bool operator()(const K2& lhs, Args&&...) const {
 2814|     44|      return eq(lhs, rhs);
 2815|     44|    }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE8hash_refEv:
 3202|  1.38k|  hasher& hash_ref() { return settings_.template get<1>(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE12EqualElementIS8_EclIS8_JRS8_EEEbRKT_DpOT0_:
 2813|      1|    bool operator()(const K2& lhs, Args&&...) const {
 2814|      1|      return eq(lhs, rhs);
 2815|      1|    }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE8hash_refEv:
 3202|      4|  hasher& hash_ref() { return settings_.template get<1>(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE5clearEv:
 2291|      8|  ABSL_ATTRIBUTE_REINITIALIZES void clear() {
 2292|       |    // Iterating over this container is O(bucket_count()). When bucket_count()
 2293|       |    // is much greater than size(), iteration becomes prohibitively expensive.
 2294|       |    // For clear() it is more important to reuse the allocated array when the
 2295|       |    // container is small because allocation takes comparatively long time
 2296|       |    // compared to destruction of the elements of the container. So we pick the
 2297|       |    // largest bucket_count() threshold for which iteration is still fast and
 2298|       |    // past that we simply deallocate the array.
 2299|      8|    const size_t cap = capacity();
 2300|      8|    if (cap == 0) {
  ------------------
  |  Branch (2300:9): [True: 8, False: 0]
  ------------------
 2301|       |      // Already guaranteed to be empty; so nothing to do.
 2302|      8|    } else {
 2303|      0|      destroy_slots();
 2304|      0|      ClearBackingArray(common(), GetPolicyFunctions(), /*reuse=*/cap < 128);
 2305|      0|    }
 2306|      8|    common().set_reserved_growth(0);
 2307|      8|    common().set_reservation_size(0);
 2308|      8|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE6insertIPS6_TnNSD_9enable_ifIXsr4absl11disjunctionINSD_14is_convertibleIRKT_S8_EENSG_22SameAsElementReferenceISN_EEEE5valueEiE4typeELi0ETnNSJ_IXsr14IsDecomposableISN_EE5valueEiE4typeELi0EEENSD_4pairINSG_8iteratorEbEESN_:
 2339|     95|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2340|     95|    return emplace(value);
 2341|     95|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE7emplaceIJRKPS6_ETnNSD_9enable_ifIXsr14IsDecomposableIDpT_EE5valueEiE4typeELi0EEENSD_4pairINSG_8iteratorEbEEDpOSM_:
 2422|     95|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2423|     95|    return PolicyTraits::apply(EmplaceDecomposable{*this},
 2424|     95|                               std::forward<Args>(args)...);
 2425|     95|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE19EmplaceDecomposableclIPS6_JRKSJ_EEENSD_4pairINSG_8iteratorEbEERKT_DpOT0_:
 2822|     95|    std::pair<iterator, bool> operator()(const K& key, Args&&... args) const {
 2823|     95|      auto res = s.find_or_prepare_insert(key);
 2824|     95|      if (res.second) {
  ------------------
  |  Branch (2824:11): [True: 95, False: 0]
  ------------------
 2825|     95|        s.emplace_at(res.first, std::forward<Args>(args)...);
 2826|     95|      }
 2827|     95|      return {s.iterator_at(res.first), res.second};
 2828|     95|    }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE22find_or_prepare_insertIPS6_EENSD_4pairImbEERKT_:
 3086|     95|  std::pair<size_t, bool> find_or_prepare_insert(const K& key) {
 3087|     95|    prefetch_heap_block();
 3088|     95|    auto hash = hash_ref()(key);
 3089|     95|    auto seq = probe(common(), hash);
 3090|     95|    const ctrl_t* ctrl = control();
 3091|     95|    while (true) {
  ------------------
  |  Branch (3091:12): [True: 95, Folded]
  ------------------
 3092|     95|      Group g{ctrl + seq.offset()};
 3093|     95|      for (uint32_t i : g.Match(H2(hash))) {
  ------------------
  |  Branch (3093:23): [True: 3, False: 95]
  ------------------
 3094|      3|        if (ABSL_PREDICT_TRUE(PolicyTraits::apply(
  ------------------
  |  |  179|      3|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 0, False: 3]
  |  |  |  Branch (179:48): [Folded, False: 3]
  |  |  |  Branch (179:57): [True: 0, False: 3]
  |  |  ------------------
  ------------------
 3095|      3|                EqualElement<K>{key, eq_ref()},
 3096|      3|                PolicyTraits::element(slot_array() + seq.offset(i)))))
 3097|      0|          return {seq.offset(i), false};
 3098|      3|      }
 3099|     95|      if (ABSL_PREDICT_TRUE(g.MaskEmpty())) break;
  ------------------
  |  |  179|     95|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 95, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 95]
  |  |  |  Branch (179:57): [True: 95, False: 0]
  |  |  ------------------
  ------------------
 3100|      0|      seq.next();
 3101|      0|      assert(seq.index() <= capacity() && "full table!");
 3102|      0|    }
 3103|     95|    return {prepare_insert(hash), true};
 3104|     95|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE12EqualElementIPS6_EclIS8_JRS8_EEEbRKT_DpOT0_:
 2813|      3|    bool operator()(const K2& lhs, Args&&...) const {
 2814|      3|      return eq(lhs, rhs);
 2815|      3|    }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE14prepare_insertEm:
 3110|     95|  size_t prepare_insert(size_t hash) ABSL_ATTRIBUTE_NOINLINE {
 3111|     95|    const bool rehash_for_bug_detection =
 3112|     95|        common().should_rehash_for_bug_detection_on_insert();
 3113|     95|    if (rehash_for_bug_detection) {
  ------------------
  |  Branch (3113:9): [True: 0, False: 95]
  ------------------
 3114|       |      // Move to a different heap allocation in order to detect bugs.
 3115|      0|      const size_t cap = capacity();
 3116|      0|      resize(growth_left() > 0 ? cap : NextCapacity(cap));
  ------------------
  |  Branch (3116:14): [True: 0, False: 0]
  ------------------
 3117|      0|    }
 3118|     95|    auto target = find_first_non_full(common(), hash);
 3119|     95|    if (!rehash_for_bug_detection &&
  ------------------
  |  Branch (3119:9): [True: 95, False: 0]
  ------------------
 3120|     95|        ABSL_PREDICT_FALSE(growth_left() == 0 &&
  ------------------
  |  |  178|    107|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 12, False: 83]
  |  |  |  Branch (178:49): [Folded, False: 95]
  |  |  |  Branch (178:59): [True: 12, False: 83]
  |  |  |  Branch (178:59): [True: 12, False: 0]
  |  |  ------------------
  ------------------
 3121|     95|                           !IsDeleted(control()[target.offset]))) {
 3122|     12|      size_t old_capacity = capacity();
 3123|     12|      rehash_and_grow_if_necessary();
 3124|       |      // NOTE: It is safe to use `FindFirstNonFullAfterResize`.
 3125|       |      // `FindFirstNonFullAfterResize` must be called right after resize.
 3126|       |      // `rehash_and_grow_if_necessary` may *not* call `resize`
 3127|       |      // and perform `drop_deletes_without_resize` instead. But this
 3128|       |      // could happen only on big tables.
 3129|       |      // For big tables `FindFirstNonFullAfterResize` will always
 3130|       |      // fallback to normal `find_first_non_full`, so it is safe to use it.
 3131|     12|      target = HashSetResizeHelper::FindFirstNonFullAfterResize(
 3132|     12|          common(), old_capacity, hash);
 3133|     12|    }
 3134|     95|    common().increment_size();
 3135|     95|    set_growth_left(growth_left() - IsEmpty(control()[target.offset]));
 3136|     95|    SetCtrl(common(), target.offset, H2(hash), sizeof(slot_type));
 3137|     95|    common().maybe_increment_generation_on_insert();
 3138|     95|    infoz().RecordInsert(hash, target.probe_length);
 3139|     95|    return target.offset;
 3140|     95|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE6resizeEm:
 2905|     12|  ABSL_ATTRIBUTE_NOINLINE void resize(size_t new_capacity) {
 2906|     12|    assert(IsValidCapacity(new_capacity));
 2907|     12|    HashSetResizeHelper resize_helper(common());
 2908|     12|    auto* old_slots = slot_array();
 2909|     12|    common().set_capacity(new_capacity);
 2910|       |    // Note that `InitializeSlots` does different number initialization steps
 2911|       |    // depending on the values of `transfer_uses_memcpy` and capacities.
 2912|       |    // Refer to the comment in `InitializeSlots` for more details.
 2913|     12|    const bool grow_single_group =
 2914|     12|        resize_helper.InitializeSlots<CharAlloc, sizeof(slot_type),
 2915|     12|                                      PolicyTraits::transfer_uses_memcpy(),
 2916|     12|                                      alignof(slot_type)>(
 2917|     12|            common(), const_cast<std::remove_const_t<slot_type>*>(old_slots),
 2918|     12|            CharAlloc(alloc_ref()));
 2919|       |
 2920|     12|    if (resize_helper.old_capacity() == 0) {
  ------------------
  |  Branch (2920:9): [True: 2, False: 10]
  ------------------
 2921|       |      // InitializeSlots did all the work including infoz().RecordRehash().
 2922|      2|      return;
 2923|      2|    }
 2924|       |
 2925|     10|    if (grow_single_group) {
  ------------------
  |  Branch (2925:9): [True: 6, False: 4]
  ------------------
 2926|      6|      if (PolicyTraits::transfer_uses_memcpy()) {
  ------------------
  |  Branch (2926:11): [Folded, False: 6]
  ------------------
 2927|       |        // InitializeSlots did all the work.
 2928|      0|        return;
 2929|      0|      }
 2930|       |      // We want GrowSizeIntoSingleGroup to be called here in order to make
 2931|       |      // InitializeSlots not depend on PolicyTraits.
 2932|      6|      resize_helper.GrowSizeIntoSingleGroup<PolicyTraits>(common(), alloc_ref(),
 2933|      6|                                                          old_slots);
 2934|      6|    } else {
 2935|       |      // InitializeSlots prepares control bytes to correspond to empty table.
 2936|      4|      auto* new_slots = slot_array();
 2937|      4|      size_t total_probe_length = 0;
 2938|    128|      for (size_t i = 0; i != resize_helper.old_capacity(); ++i) {
  ------------------
  |  Branch (2938:26): [True: 124, False: 4]
  ------------------
 2939|    124|        if (IsFull(resize_helper.old_ctrl()[i])) {
  ------------------
  |  Branch (2939:13): [True: 112, False: 12]
  ------------------
 2940|    112|          size_t hash = PolicyTraits::apply(
 2941|    112|              HashElement{hash_ref()}, PolicyTraits::element(old_slots + i));
 2942|    112|          auto target = find_first_non_full(common(), hash);
 2943|    112|          size_t new_i = target.offset;
 2944|    112|          total_probe_length += target.probe_length;
 2945|    112|          SetCtrl(common(), new_i, H2(hash), sizeof(slot_type));
 2946|    112|          transfer(new_slots + new_i, old_slots + i);
 2947|    112|        }
 2948|    124|      }
 2949|      4|      infoz().RecordRehash(total_probe_length);
 2950|      4|    }
 2951|     10|    resize_helper.DeallocateOld<alignof(slot_type)>(
 2952|     10|        CharAlloc(alloc_ref()), sizeof(slot_type),
 2953|     10|        const_cast<std::remove_const_t<slot_type>*>(old_slots));
 2954|     10|  }
_ZN4absl12lts_2024011618container_internal19HashSetResizeHelper15InitializeSlotsINSt3__19allocatorIcEELm8ELb0ELm8EEEbRNS1_12CommonFieldsEPvT_:
 1595|     66|                                               Alloc alloc) {
 1596|     66|    assert(c.capacity());
 1597|       |    // Folks with custom allocators often make unwarranted assumptions about the
 1598|       |    // behavior of their classes vis-a-vis trivial destructability and what
 1599|       |    // calls they will or won't make.  Avoid sampling for people with custom
 1600|       |    // allocators to get us out of this mess.  This is not a hard guarantee but
 1601|       |    // a workaround while we plan the exact guarantee we want to provide.
 1602|     66|    const size_t sample_size =
 1603|     66|        (std::is_same<Alloc, std::allocator<char>>::value &&
  ------------------
  |  Branch (1603:10): [True: 66, Folded]
  ------------------
 1604|     66|         c.slot_array() == nullptr)
  ------------------
  |  Branch (1604:10): [True: 13, False: 53]
  ------------------
 1605|     66|            ? SizeOfSlot
 1606|     66|            : 0;
 1607|     66|    HashtablezInfoHandle infoz =
 1608|     66|        sample_size > 0 ? Sample(sample_size) : c.infoz();
  ------------------
  |  Branch (1608:9): [True: 13, False: 53]
  ------------------
 1609|       |
 1610|     66|    const bool has_infoz = infoz.IsSampled();
 1611|     66|    const size_t cap = c.capacity();
 1612|     66|    const size_t alloc_size =
 1613|     66|        AllocSize(cap, SizeOfSlot, AlignOfSlot, has_infoz);
 1614|     66|    char* mem = static_cast<char*>(
 1615|     66|        Allocate<BackingArrayAlignment(AlignOfSlot)>(&alloc, alloc_size));
 1616|     66|    const GenerationType old_generation = c.generation();
 1617|     66|    c.set_generation_ptr(reinterpret_cast<GenerationType*>(
 1618|     66|        mem + GenerationOffset(cap, has_infoz)));
 1619|     66|    c.set_generation(NextGeneration(old_generation));
 1620|     66|    c.set_control(reinterpret_cast<ctrl_t*>(mem + ControlOffset(has_infoz)));
 1621|     66|    c.set_slots(mem + SlotOffset(cap, AlignOfSlot, has_infoz));
 1622|     66|    ResetGrowthLeft(c);
 1623|       |
 1624|     66|    const bool grow_single_group =
 1625|     66|        IsGrowingIntoSingleGroupApplicable(old_capacity_, c.capacity());
 1626|     66|    if (old_capacity_ != 0 && grow_single_group) {
  ------------------
  |  Branch (1626:9): [True: 53, False: 13]
  |  Branch (1626:31): [True: 30, False: 23]
  ------------------
 1627|     30|      if (TransferUsesMemcpy) {
  ------------------
  |  Branch (1627:11): [Folded, False: 30]
  ------------------
 1628|      0|        GrowSizeIntoSingleGroupTransferable(c, old_slots, SizeOfSlot);
 1629|      0|        DeallocateOld<AlignOfSlot>(alloc, SizeOfSlot, old_slots);
 1630|     30|      } else {
 1631|     30|        GrowIntoSingleGroupShuffleControlBytes(c.control(), c.capacity());
 1632|     30|      }
 1633|     36|    } else {
 1634|     36|      ResetCtrl(c, SizeOfSlot);
 1635|     36|    }
 1636|       |
 1637|     66|    c.set_has_infoz(has_infoz);
 1638|     66|    if (has_infoz) {
  ------------------
  |  Branch (1638:9): [True: 0, False: 66]
  ------------------
 1639|      0|      infoz.RecordStorageChanged(c.size(), cap);
 1640|      0|      if (grow_single_group || old_capacity_ == 0) {
  ------------------
  |  Branch (1640:11): [True: 0, False: 0]
  |  Branch (1640:32): [True: 0, False: 0]
  ------------------
 1641|      0|        infoz.RecordRehash(0);
 1642|      0|      }
 1643|      0|      c.set_infoz(infoz);
 1644|      0|    }
 1645|     66|    return grow_single_group;
 1646|     66|  }
_ZN4absl12lts_2024011618container_internal19HashSetResizeHelper23GrowSizeIntoSingleGroupINS1_18hash_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEEvEENSt3__19allocatorISA_EEEEvRNS1_12CommonFieldsERT0_PNT_9slot_typeE:
 1655|      6|                               typename PolicyTraits::slot_type* old_slots) {
 1656|      6|    assert(old_capacity_ < Group::kWidth / 2);
 1657|      6|    assert(IsGrowingIntoSingleGroupApplicable(old_capacity_, c.capacity()));
 1658|      6|    using slot_type = typename PolicyTraits::slot_type;
 1659|      6|    assert(is_single_group(c.capacity()));
 1660|       |
 1661|      6|    auto* new_slots = reinterpret_cast<slot_type*>(c.slot_array());
 1662|       |
 1663|      6|    size_t shuffle_bit = old_capacity_ / 2 + 1;
 1664|     28|    for (size_t i = 0; i < old_capacity_; ++i) {
  ------------------
  |  Branch (1664:24): [True: 22, False: 6]
  ------------------
 1665|     22|      if (IsFull(old_ctrl_[i])) {
  ------------------
  |  Branch (1665:11): [True: 22, False: 0]
  ------------------
 1666|     22|        size_t new_i = i ^ shuffle_bit;
 1667|     22|        SanitizerUnpoisonMemoryRegion(new_slots + new_i, sizeof(slot_type));
 1668|     22|        PolicyTraits::transfer(&alloc_ref, new_slots + new_i, old_slots + i);
 1669|     22|      }
 1670|     22|    }
 1671|      6|    PoisonSingleGroupEmptySlots(c, sizeof(slot_type));
 1672|      6|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE11HashElementclIS8_JRS8_EEEmRKT_DpOT0_:
 2804|    112|    size_t operator()(const K& key, Args&&...) const {
 2805|    112|      return h(key);
 2806|    112|    }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE8transferEPS8_SH_:
 2857|    112|  inline void transfer(slot_type* to, slot_type* from) {
 2858|    112|    PolicyTraits::transfer(&alloc_ref(), to, from);
 2859|    112|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE11growth_leftEv:
 3181|    190|  size_t growth_left() const { return common().growth_left(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE28rehash_and_grow_if_necessaryEv:
 2970|     12|  void rehash_and_grow_if_necessary() {
 2971|     12|    const size_t cap = capacity();
 2972|     12|    if (cap > Group::kWidth &&
  ------------------
  |  Branch (2972:9): [True: 2, False: 10]
  ------------------
 2973|       |        // Do these calculations in 64-bit to avoid overflow.
 2974|      2|        size() * uint64_t{32} <= cap * uint64_t{25}) {
  ------------------
  |  Branch (2974:9): [True: 0, False: 2]
  ------------------
 2975|       |      // Squash DELETED without growing if there is enough capacity.
 2976|       |      //
 2977|       |      // Rehash in place if the current size is <= 25/32 of capacity.
 2978|       |      // Rationale for such a high factor: 1) drop_deletes_without_resize() is
 2979|       |      // faster than resize, and 2) it takes quite a bit of work to add
 2980|       |      // tombstones.  In the worst case, seems to take approximately 4
 2981|       |      // insert/erase pairs to create a single tombstone and so if we are
 2982|       |      // rehashing because of tombstones, we can afford to rehash-in-place as
 2983|       |      // long as we are reclaiming at least 1/8 the capacity without doing more
 2984|       |      // than 2X the work.  (Where "work" is defined to be size() for rehashing
 2985|       |      // or rehashing in place, and 1 for an insert or erase.)  But rehashing in
 2986|       |      // place is faster per operation than inserting or even doubling the size
 2987|       |      // of the table, so we actually afford to reclaim even less space from a
 2988|       |      // resize-in-place.  The decision is to rehash in place if we can reclaim
 2989|       |      // at about 1/8th of the usable capacity (specifically 3/28 of the
 2990|       |      // capacity) which means that the total cost of rehashing will be a small
 2991|       |      // fraction of the total work.
 2992|       |      //
 2993|       |      // Here is output of an experiment using the BM_CacheInSteadyState
 2994|       |      // benchmark running the old case (where we rehash-in-place only if we can
 2995|       |      // reclaim at least 7/16*capacity) vs. this code (which rehashes in place
 2996|       |      // if we can recover 3/32*capacity).
 2997|       |      //
 2998|       |      // Note that although in the worst-case number of rehashes jumped up from
 2999|       |      // 15 to 190, but the number of operations per second is almost the same.
 3000|       |      //
 3001|       |      // Abridged output of running BM_CacheInSteadyState benchmark from
 3002|       |      // raw_hash_set_benchmark.   N is the number of insert/erase operations.
 3003|       |      //
 3004|       |      //      | OLD (recover >= 7/16        | NEW (recover >= 3/32)
 3005|       |      // size |    N/s LoadFactor NRehashes |    N/s LoadFactor NRehashes
 3006|       |      //  448 | 145284       0.44        18 | 140118       0.44        19
 3007|       |      //  493 | 152546       0.24        11 | 151417       0.48        28
 3008|       |      //  538 | 151439       0.26        11 | 151152       0.53        38
 3009|       |      //  583 | 151765       0.28        11 | 150572       0.57        50
 3010|       |      //  628 | 150241       0.31        11 | 150853       0.61        66
 3011|       |      //  672 | 149602       0.33        12 | 150110       0.66        90
 3012|       |      //  717 | 149998       0.35        12 | 149531       0.70       129
 3013|       |      //  762 | 149836       0.37        13 | 148559       0.74       190
 3014|       |      //  807 | 149736       0.39        14 | 151107       0.39        14
 3015|       |      //  852 | 150204       0.42        15 | 151019       0.42        15
 3016|      0|      drop_deletes_without_resize();
 3017|     12|    } else {
 3018|       |      // Otherwise grow the container.
 3019|     12|      resize(NextCapacity(cap));
 3020|     12|    }
 3021|     12|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE4sizeEv:
 2287|      2|  size_t size() const { return common().size(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE15set_growth_leftEm:
 3182|     95|  void set_growth_left(size_t gl) { return common().set_growth_left(gl); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE10emplace_atIJRKPS6_EEEvmDpOT_:
 3151|     95|  void emplace_at(size_t i, Args&&... args) {
 3152|     95|    construct(slot_array() + i, std::forward<Args>(args)...);
 3153|       |
 3154|       |    assert(PolicyTraits::apply(FindElement{*this}, *iterator_at(i)) ==
 3155|     95|               iterator_at(i) &&
 3156|     95|           "constructed value does not match the lookup key");
 3157|     95|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf19EnumValueDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE9constructIJRKPS6_EEEvPS8_DpOT_:
 2851|     95|  inline void construct(slot_type* slot, Args&&... args) {
 2852|     95|    PolicyTraits::construct(&alloc_ref(), slot, std::forward<Args>(args)...);
 2853|     95|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE6insertIS6_TnNSB_9enable_ifIXsr4absl11disjunctionINSB_14is_convertibleIRKT_S6_EENSE_22SameAsElementReferenceISK_EEEE5valueEiE4typeELi0ETnNSG_IXsr14IsDecomposableISK_EE5valueEiE4typeELi0EEENSB_4pairINSE_8iteratorEbEESK_:
 2339|    504|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2340|    504|    return emplace(value);
 2341|    504|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE7emplaceIJRKS6_ETnNSB_9enable_ifIXsr14IsDecomposableIDpT_EE5valueEiE4typeELi0EEENSB_4pairINSE_8iteratorEbEEDpOSJ_:
 2422|    504|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2423|    504|    return PolicyTraits::apply(EmplaceDecomposable{*this},
 2424|    504|                               std::forward<Args>(args)...);
 2425|    504|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE19EmplaceDecomposableclIS6_JRKS6_EEENSB_4pairINSE_8iteratorEbEERKT_DpOT0_:
 2822|    504|    std::pair<iterator, bool> operator()(const K& key, Args&&... args) const {
 2823|    504|      auto res = s.find_or_prepare_insert(key);
 2824|    504|      if (res.second) {
  ------------------
  |  Branch (2824:11): [True: 504, False: 0]
  ------------------
 2825|    504|        s.emplace_at(res.first, std::forward<Args>(args)...);
 2826|    504|      }
 2827|    504|      return {s.iterator_at(res.first), res.second};
 2828|    504|    }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE22find_or_prepare_insertIS6_EENSB_4pairImbEERKT_:
 3086|    504|  std::pair<size_t, bool> find_or_prepare_insert(const K& key) {
 3087|    504|    prefetch_heap_block();
 3088|    504|    auto hash = hash_ref()(key);
 3089|    504|    auto seq = probe(common(), hash);
 3090|    504|    const ctrl_t* ctrl = control();
 3091|    562|    while (true) {
  ------------------
  |  Branch (3091:12): [True: 562, Folded]
  ------------------
 3092|    562|      Group g{ctrl + seq.offset()};
 3093|    562|      for (uint32_t i : g.Match(H2(hash))) {
  ------------------
  |  Branch (3093:23): [True: 44, False: 562]
  ------------------
 3094|     44|        if (ABSL_PREDICT_TRUE(PolicyTraits::apply(
  ------------------
  |  |  179|     44|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 0, False: 44]
  |  |  |  Branch (179:48): [Folded, False: 44]
  |  |  |  Branch (179:57): [True: 0, False: 44]
  |  |  ------------------
  ------------------
 3095|     44|                EqualElement<K>{key, eq_ref()},
 3096|     44|                PolicyTraits::element(slot_array() + seq.offset(i)))))
 3097|      0|          return {seq.offset(i), false};
 3098|     44|      }
 3099|    562|      if (ABSL_PREDICT_TRUE(g.MaskEmpty())) break;
  ------------------
  |  |  179|    562|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 504, False: 58]
  |  |  |  Branch (179:48): [Folded, False: 562]
  |  |  |  Branch (179:57): [True: 504, False: 58]
  |  |  ------------------
  ------------------
 3100|     58|      seq.next();
 3101|     58|      assert(seq.index() <= capacity() && "full table!");
 3102|     58|    }
 3103|    504|    return {prepare_insert(hash), true};
 3104|    504|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE14prepare_insertEm:
 3110|    504|  size_t prepare_insert(size_t hash) ABSL_ATTRIBUTE_NOINLINE {
 3111|    504|    const bool rehash_for_bug_detection =
 3112|    504|        common().should_rehash_for_bug_detection_on_insert();
 3113|    504|    if (rehash_for_bug_detection) {
  ------------------
  |  Branch (3113:9): [True: 0, False: 504]
  ------------------
 3114|       |      // Move to a different heap allocation in order to detect bugs.
 3115|      0|      const size_t cap = capacity();
 3116|      0|      resize(growth_left() > 0 ? cap : NextCapacity(cap));
  ------------------
  |  Branch (3116:14): [True: 0, False: 0]
  ------------------
 3117|      0|    }
 3118|    504|    auto target = find_first_non_full(common(), hash);
 3119|    504|    if (!rehash_for_bug_detection &&
  ------------------
  |  Branch (3119:9): [True: 504, False: 0]
  ------------------
 3120|    504|        ABSL_PREDICT_FALSE(growth_left() == 0 &&
  ------------------
  |  |  178|    514|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 10, False: 494]
  |  |  |  Branch (178:49): [Folded, False: 504]
  |  |  |  Branch (178:59): [True: 10, False: 494]
  |  |  |  Branch (178:59): [True: 10, False: 0]
  |  |  ------------------
  ------------------
 3121|    504|                           !IsDeleted(control()[target.offset]))) {
 3122|     10|      size_t old_capacity = capacity();
 3123|     10|      rehash_and_grow_if_necessary();
 3124|       |      // NOTE: It is safe to use `FindFirstNonFullAfterResize`.
 3125|       |      // `FindFirstNonFullAfterResize` must be called right after resize.
 3126|       |      // `rehash_and_grow_if_necessary` may *not* call `resize`
 3127|       |      // and perform `drop_deletes_without_resize` instead. But this
 3128|       |      // could happen only on big tables.
 3129|       |      // For big tables `FindFirstNonFullAfterResize` will always
 3130|       |      // fallback to normal `find_first_non_full`, so it is safe to use it.
 3131|     10|      target = HashSetResizeHelper::FindFirstNonFullAfterResize(
 3132|     10|          common(), old_capacity, hash);
 3133|     10|    }
 3134|    504|    common().increment_size();
 3135|    504|    set_growth_left(growth_left() - IsEmpty(control()[target.offset]));
 3136|    504|    SetCtrl(common(), target.offset, H2(hash), sizeof(slot_type));
 3137|    504|    common().maybe_increment_generation_on_insert();
 3138|    504|    infoz().RecordInsert(hash, target.probe_length);
 3139|    504|    return target.offset;
 3140|    504|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE6resizeEm:
 2905|     10|  ABSL_ATTRIBUTE_NOINLINE void resize(size_t new_capacity) {
 2906|     10|    assert(IsValidCapacity(new_capacity));
 2907|     10|    HashSetResizeHelper resize_helper(common());
 2908|     10|    auto* old_slots = slot_array();
 2909|     10|    common().set_capacity(new_capacity);
 2910|       |    // Note that `InitializeSlots` does different number initialization steps
 2911|       |    // depending on the values of `transfer_uses_memcpy` and capacities.
 2912|       |    // Refer to the comment in `InitializeSlots` for more details.
 2913|     10|    const bool grow_single_group =
 2914|     10|        resize_helper.InitializeSlots<CharAlloc, sizeof(slot_type),
 2915|     10|                                      PolicyTraits::transfer_uses_memcpy(),
 2916|     10|                                      alignof(slot_type)>(
 2917|     10|            common(), const_cast<std::remove_const_t<slot_type>*>(old_slots),
 2918|     10|            CharAlloc(alloc_ref()));
 2919|       |
 2920|     10|    if (resize_helper.old_capacity() == 0) {
  ------------------
  |  Branch (2920:9): [True: 1, False: 9]
  ------------------
 2921|       |      // InitializeSlots did all the work including infoz().RecordRehash().
 2922|      1|      return;
 2923|      1|    }
 2924|       |
 2925|      9|    if (grow_single_group) {
  ------------------
  |  Branch (2925:9): [True: 3, False: 6]
  ------------------
 2926|      3|      if (PolicyTraits::transfer_uses_memcpy()) {
  ------------------
  |  Branch (2926:11): [Folded, False: 3]
  ------------------
 2927|       |        // InitializeSlots did all the work.
 2928|      0|        return;
 2929|      0|      }
 2930|       |      // We want GrowSizeIntoSingleGroup to be called here in order to make
 2931|       |      // InitializeSlots not depend on PolicyTraits.
 2932|      3|      resize_helper.GrowSizeIntoSingleGroup<PolicyTraits>(common(), alloc_ref(),
 2933|      3|                                                          old_slots);
 2934|      6|    } else {
 2935|       |      // InitializeSlots prepares control bytes to correspond to empty table.
 2936|      6|      auto* new_slots = slot_array();
 2937|      6|      size_t total_probe_length = 0;
 2938|  1.00k|      for (size_t i = 0; i != resize_helper.old_capacity(); ++i) {
  ------------------
  |  Branch (2938:26): [True: 1.00k, False: 6]
  ------------------
 2939|  1.00k|        if (IsFull(resize_helper.old_ctrl()[i])) {
  ------------------
  |  Branch (2939:13): [True: 882, False: 120]
  ------------------
 2940|    882|          size_t hash = PolicyTraits::apply(
 2941|    882|              HashElement{hash_ref()}, PolicyTraits::element(old_slots + i));
 2942|    882|          auto target = find_first_non_full(common(), hash);
 2943|    882|          size_t new_i = target.offset;
 2944|    882|          total_probe_length += target.probe_length;
 2945|    882|          SetCtrl(common(), new_i, H2(hash), sizeof(slot_type));
 2946|    882|          transfer(new_slots + new_i, old_slots + i);
 2947|    882|        }
 2948|  1.00k|      }
 2949|      6|      infoz().RecordRehash(total_probe_length);
 2950|      6|    }
 2951|      9|    resize_helper.DeallocateOld<alignof(slot_type)>(
 2952|      9|        CharAlloc(alloc_ref()), sizeof(slot_type),
 2953|      9|        const_cast<std::remove_const_t<slot_type>*>(old_slots));
 2954|      9|  }
_ZN4absl12lts_2024011618container_internal19HashSetResizeHelper23GrowSizeIntoSingleGroupINS1_18hash_policy_traitsINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEEvEENSt3__19allocatorIS8_EEEEvRNS1_12CommonFieldsERT0_PNT_9slot_typeE:
 1655|     13|                               typename PolicyTraits::slot_type* old_slots) {
 1656|     13|    assert(old_capacity_ < Group::kWidth / 2);
 1657|     13|    assert(IsGrowingIntoSingleGroupApplicable(old_capacity_, c.capacity()));
 1658|     13|    using slot_type = typename PolicyTraits::slot_type;
 1659|     13|    assert(is_single_group(c.capacity()));
 1660|       |
 1661|     13|    auto* new_slots = reinterpret_cast<slot_type*>(c.slot_array());
 1662|       |
 1663|     13|    size_t shuffle_bit = old_capacity_ / 2 + 1;
 1664|     58|    for (size_t i = 0; i < old_capacity_; ++i) {
  ------------------
  |  Branch (1664:24): [True: 45, False: 13]
  ------------------
 1665|     45|      if (IsFull(old_ctrl_[i])) {
  ------------------
  |  Branch (1665:11): [True: 45, False: 0]
  ------------------
 1666|     45|        size_t new_i = i ^ shuffle_bit;
 1667|     45|        SanitizerUnpoisonMemoryRegion(new_slots + new_i, sizeof(slot_type));
 1668|     45|        PolicyTraits::transfer(&alloc_ref, new_slots + new_i, old_slots + i);
 1669|     45|      }
 1670|     45|    }
 1671|     13|    PoisonSingleGroupEmptySlots(c, sizeof(slot_type));
 1672|     13|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE11HashElementclIS6_JRS6_EEEmRKT_DpOT0_:
 2804|    882|    size_t operator()(const K& key, Args&&...) const {
 2805|    882|      return h(key);
 2806|    882|    }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE8transferEPS6_SF_:
 2857|    882|  inline void transfer(slot_type* to, slot_type* from) {
 2858|    882|    PolicyTraits::transfer(&alloc_ref(), to, from);
 2859|    882|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE11growth_leftEv:
 3181|  1.00k|  size_t growth_left() const { return common().growth_left(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE28rehash_and_grow_if_necessaryEv:
 2970|     10|  void rehash_and_grow_if_necessary() {
 2971|     10|    const size_t cap = capacity();
 2972|     10|    if (cap > Group::kWidth &&
  ------------------
  |  Branch (2972:9): [True: 5, False: 5]
  ------------------
 2973|       |        // Do these calculations in 64-bit to avoid overflow.
 2974|      5|        size() * uint64_t{32} <= cap * uint64_t{25}) {
  ------------------
  |  Branch (2974:9): [True: 0, False: 5]
  ------------------
 2975|       |      // Squash DELETED without growing if there is enough capacity.
 2976|       |      //
 2977|       |      // Rehash in place if the current size is <= 25/32 of capacity.
 2978|       |      // Rationale for such a high factor: 1) drop_deletes_without_resize() is
 2979|       |      // faster than resize, and 2) it takes quite a bit of work to add
 2980|       |      // tombstones.  In the worst case, seems to take approximately 4
 2981|       |      // insert/erase pairs to create a single tombstone and so if we are
 2982|       |      // rehashing because of tombstones, we can afford to rehash-in-place as
 2983|       |      // long as we are reclaiming at least 1/8 the capacity without doing more
 2984|       |      // than 2X the work.  (Where "work" is defined to be size() for rehashing
 2985|       |      // or rehashing in place, and 1 for an insert or erase.)  But rehashing in
 2986|       |      // place is faster per operation than inserting or even doubling the size
 2987|       |      // of the table, so we actually afford to reclaim even less space from a
 2988|       |      // resize-in-place.  The decision is to rehash in place if we can reclaim
 2989|       |      // at about 1/8th of the usable capacity (specifically 3/28 of the
 2990|       |      // capacity) which means that the total cost of rehashing will be a small
 2991|       |      // fraction of the total work.
 2992|       |      //
 2993|       |      // Here is output of an experiment using the BM_CacheInSteadyState
 2994|       |      // benchmark running the old case (where we rehash-in-place only if we can
 2995|       |      // reclaim at least 7/16*capacity) vs. this code (which rehashes in place
 2996|       |      // if we can recover 3/32*capacity).
 2997|       |      //
 2998|       |      // Note that although in the worst-case number of rehashes jumped up from
 2999|       |      // 15 to 190, but the number of operations per second is almost the same.
 3000|       |      //
 3001|       |      // Abridged output of running BM_CacheInSteadyState benchmark from
 3002|       |      // raw_hash_set_benchmark.   N is the number of insert/erase operations.
 3003|       |      //
 3004|       |      //      | OLD (recover >= 7/16        | NEW (recover >= 3/32)
 3005|       |      // size |    N/s LoadFactor NRehashes |    N/s LoadFactor NRehashes
 3006|       |      //  448 | 145284       0.44        18 | 140118       0.44        19
 3007|       |      //  493 | 152546       0.24        11 | 151417       0.48        28
 3008|       |      //  538 | 151439       0.26        11 | 151152       0.53        38
 3009|       |      //  583 | 151765       0.28        11 | 150572       0.57        50
 3010|       |      //  628 | 150241       0.31        11 | 150853       0.61        66
 3011|       |      //  672 | 149602       0.33        12 | 150110       0.66        90
 3012|       |      //  717 | 149998       0.35        12 | 149531       0.70       129
 3013|       |      //  762 | 149836       0.37        13 | 148559       0.74       190
 3014|       |      //  807 | 149736       0.39        14 | 151107       0.39        14
 3015|       |      //  852 | 150204       0.42        15 | 151019       0.42        15
 3016|      0|      drop_deletes_without_resize();
 3017|     10|    } else {
 3018|       |      // Otherwise grow the container.
 3019|     10|      resize(NextCapacity(cap));
 3020|     10|    }
 3021|     10|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE4sizeEv:
 2287|      5|  size_t size() const { return common().size(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE15set_growth_leftEm:
 3182|    504|  void set_growth_left(size_t gl) { return common().set_growth_left(gl); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE10emplace_atIJRKS6_EEEvmDpOT_:
 3151|    504|  void emplace_at(size_t i, Args&&... args) {
 3152|    504|    construct(slot_array() + i, std::forward<Args>(args)...);
 3153|       |
 3154|       |    assert(PolicyTraits::apply(FindElement{*this}, *iterator_at(i)) ==
 3155|    504|               iterator_at(i) &&
 3156|    504|           "constructed value does not match the lookup key");
 3157|    504|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_120SymbolByFullNameHashENS8_18SymbolByFullNameEqENSt3__19allocatorIS6_EEE9constructIJRKS6_EEEvPS6_DpOT_:
 2851|    504|  inline void construct(slot_type* slot, Args&&... args) {
 2852|    504|    PolicyTraits::construct(&alloc_ref(), slot, std::forward<Args>(args)...);
 2853|    504|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE6insertIS6_TnNSB_9enable_ifIXsr4absl11disjunctionINSB_14is_convertibleIRKT_S6_EENSE_22SameAsElementReferenceISK_EEEE5valueEiE4typeELi0ETnNSG_IXsr14IsDecomposableISK_EE5valueEiE4typeELi0EEENSB_4pairINSE_8iteratorEbEESK_:
 2339|    688|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2340|    688|    return emplace(value);
 2341|    688|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE7emplaceIJRKS6_ETnNSB_9enable_ifIXsr14IsDecomposableIDpT_EE5valueEiE4typeELi0EEENSB_4pairINSE_8iteratorEbEEDpOSJ_:
 2422|    688|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2423|    688|    return PolicyTraits::apply(EmplaceDecomposable{*this},
 2424|    688|                               std::forward<Args>(args)...);
 2425|    688|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE19EmplaceDecomposableclIS6_JRKS6_EEENSB_4pairINSE_8iteratorEbEERKT_DpOT0_:
 2822|    688|    std::pair<iterator, bool> operator()(const K& key, Args&&... args) const {
 2823|    688|      auto res = s.find_or_prepare_insert(key);
 2824|    688|      if (res.second) {
  ------------------
  |  Branch (2824:11): [True: 688, False: 0]
  ------------------
 2825|    688|        s.emplace_at(res.first, std::forward<Args>(args)...);
 2826|    688|      }
 2827|    688|      return {s.iterator_at(res.first), res.second};
 2828|    688|    }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE22find_or_prepare_insertIS6_EENSB_4pairImbEERKT_:
 3086|    688|  std::pair<size_t, bool> find_or_prepare_insert(const K& key) {
 3087|    688|    prefetch_heap_block();
 3088|    688|    auto hash = hash_ref()(key);
 3089|    688|    auto seq = probe(common(), hash);
 3090|    688|    const ctrl_t* ctrl = control();
 3091|    739|    while (true) {
  ------------------
  |  Branch (3091:12): [True: 739, Folded]
  ------------------
 3092|    739|      Group g{ctrl + seq.offset()};
 3093|    739|      for (uint32_t i : g.Match(H2(hash))) {
  ------------------
  |  Branch (3093:23): [True: 51, False: 739]
  ------------------
 3094|     51|        if (ABSL_PREDICT_TRUE(PolicyTraits::apply(
  ------------------
  |  |  179|     51|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 0, False: 51]
  |  |  |  Branch (179:48): [Folded, False: 51]
  |  |  |  Branch (179:57): [True: 0, False: 51]
  |  |  ------------------
  ------------------
 3095|     51|                EqualElement<K>{key, eq_ref()},
 3096|     51|                PolicyTraits::element(slot_array() + seq.offset(i)))))
 3097|      0|          return {seq.offset(i), false};
 3098|     51|      }
 3099|    739|      if (ABSL_PREDICT_TRUE(g.MaskEmpty())) break;
  ------------------
  |  |  179|    739|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 688, False: 51]
  |  |  |  Branch (179:48): [Folded, False: 739]
  |  |  |  Branch (179:57): [True: 688, False: 51]
  |  |  ------------------
  ------------------
 3100|     51|      seq.next();
 3101|     51|      assert(seq.index() <= capacity() && "full table!");
 3102|     51|    }
 3103|    688|    return {prepare_insert(hash), true};
 3104|    688|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE8hash_refEv:
 3202|  1.55k|  hasher& hash_ref() { return settings_.template get<1>(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE12EqualElementIS6_EclIS6_JRS6_EEEbRKT_DpOT0_:
 2813|     51|    bool operator()(const K2& lhs, Args&&...) const {
 2814|     51|      return eq(lhs, rhs);
 2815|     51|    }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE14prepare_insertEm:
 3110|    688|  size_t prepare_insert(size_t hash) ABSL_ATTRIBUTE_NOINLINE {
 3111|    688|    const bool rehash_for_bug_detection =
 3112|    688|        common().should_rehash_for_bug_detection_on_insert();
 3113|    688|    if (rehash_for_bug_detection) {
  ------------------
  |  Branch (3113:9): [True: 0, False: 688]
  ------------------
 3114|       |      // Move to a different heap allocation in order to detect bugs.
 3115|      0|      const size_t cap = capacity();
 3116|      0|      resize(growth_left() > 0 ? cap : NextCapacity(cap));
  ------------------
  |  Branch (3116:14): [True: 0, False: 0]
  ------------------
 3117|      0|    }
 3118|    688|    auto target = find_first_non_full(common(), hash);
 3119|    688|    if (!rehash_for_bug_detection &&
  ------------------
  |  Branch (3119:9): [True: 688, False: 0]
  ------------------
 3120|    688|        ABSL_PREDICT_FALSE(growth_left() == 0 &&
  ------------------
  |  |  178|    712|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 24, False: 664]
  |  |  |  Branch (178:49): [Folded, False: 688]
  |  |  |  Branch (178:59): [True: 24, False: 664]
  |  |  |  Branch (178:59): [True: 24, False: 0]
  |  |  ------------------
  ------------------
 3121|    688|                           !IsDeleted(control()[target.offset]))) {
 3122|     24|      size_t old_capacity = capacity();
 3123|     24|      rehash_and_grow_if_necessary();
 3124|       |      // NOTE: It is safe to use `FindFirstNonFullAfterResize`.
 3125|       |      // `FindFirstNonFullAfterResize` must be called right after resize.
 3126|       |      // `rehash_and_grow_if_necessary` may *not* call `resize`
 3127|       |      // and perform `drop_deletes_without_resize` instead. But this
 3128|       |      // could happen only on big tables.
 3129|       |      // For big tables `FindFirstNonFullAfterResize` will always
 3130|       |      // fallback to normal `find_first_non_full`, so it is safe to use it.
 3131|     24|      target = HashSetResizeHelper::FindFirstNonFullAfterResize(
 3132|     24|          common(), old_capacity, hash);
 3133|     24|    }
 3134|    688|    common().increment_size();
 3135|    688|    set_growth_left(growth_left() - IsEmpty(control()[target.offset]));
 3136|    688|    SetCtrl(common(), target.offset, H2(hash), sizeof(slot_type));
 3137|    688|    common().maybe_increment_generation_on_insert();
 3138|    688|    infoz().RecordInsert(hash, target.probe_length);
 3139|    688|    return target.offset;
 3140|    688|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE6resizeEm:
 2905|     24|  ABSL_ATTRIBUTE_NOINLINE void resize(size_t new_capacity) {
 2906|     24|    assert(IsValidCapacity(new_capacity));
 2907|     24|    HashSetResizeHelper resize_helper(common());
 2908|     24|    auto* old_slots = slot_array();
 2909|     24|    common().set_capacity(new_capacity);
 2910|       |    // Note that `InitializeSlots` does different number initialization steps
 2911|       |    // depending on the values of `transfer_uses_memcpy` and capacities.
 2912|       |    // Refer to the comment in `InitializeSlots` for more details.
 2913|     24|    const bool grow_single_group =
 2914|     24|        resize_helper.InitializeSlots<CharAlloc, sizeof(slot_type),
 2915|     24|                                      PolicyTraits::transfer_uses_memcpy(),
 2916|     24|                                      alignof(slot_type)>(
 2917|     24|            common(), const_cast<std::remove_const_t<slot_type>*>(old_slots),
 2918|     24|            CharAlloc(alloc_ref()));
 2919|       |
 2920|     24|    if (resize_helper.old_capacity() == 0) {
  ------------------
  |  Branch (2920:9): [True: 4, False: 20]
  ------------------
 2921|       |      // InitializeSlots did all the work including infoz().RecordRehash().
 2922|      4|      return;
 2923|      4|    }
 2924|       |
 2925|     20|    if (grow_single_group) {
  ------------------
  |  Branch (2925:9): [True: 10, False: 10]
  ------------------
 2926|     10|      if (PolicyTraits::transfer_uses_memcpy()) {
  ------------------
  |  Branch (2926:11): [Folded, False: 10]
  ------------------
 2927|       |        // InitializeSlots did all the work.
 2928|      0|        return;
 2929|      0|      }
 2930|       |      // We want GrowSizeIntoSingleGroup to be called here in order to make
 2931|       |      // InitializeSlots not depend on PolicyTraits.
 2932|     10|      resize_helper.GrowSizeIntoSingleGroup<PolicyTraits>(common(), alloc_ref(),
 2933|     10|                                                          old_slots);
 2934|     10|    } else {
 2935|       |      // InitializeSlots prepares control bytes to correspond to empty table.
 2936|     10|      auto* new_slots = slot_array();
 2937|     10|      size_t total_probe_length = 0;
 2938|    992|      for (size_t i = 0; i != resize_helper.old_capacity(); ++i) {
  ------------------
  |  Branch (2938:26): [True: 982, False: 10]
  ------------------
 2939|    982|        if (IsFull(resize_helper.old_ctrl()[i])) {
  ------------------
  |  Branch (2939:13): [True: 868, False: 114]
  ------------------
 2940|    868|          size_t hash = PolicyTraits::apply(
 2941|    868|              HashElement{hash_ref()}, PolicyTraits::element(old_slots + i));
 2942|    868|          auto target = find_first_non_full(common(), hash);
 2943|    868|          size_t new_i = target.offset;
 2944|    868|          total_probe_length += target.probe_length;
 2945|    868|          SetCtrl(common(), new_i, H2(hash), sizeof(slot_type));
 2946|    868|          transfer(new_slots + new_i, old_slots + i);
 2947|    868|        }
 2948|    982|      }
 2949|     10|      infoz().RecordRehash(total_probe_length);
 2950|     10|    }
 2951|     20|    resize_helper.DeallocateOld<alignof(slot_type)>(
 2952|     20|        CharAlloc(alloc_ref()), sizeof(slot_type),
 2953|     20|        const_cast<std::remove_const_t<slot_type>*>(old_slots));
 2954|     20|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE11HashElementclIS6_JRS6_EEEmRKT_DpOT0_:
 2804|    868|    size_t operator()(const K& key, Args&&...) const {
 2805|    868|      return h(key);
 2806|    868|    }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE8transferEPS6_SF_:
 2857|    868|  inline void transfer(slot_type* to, slot_type* from) {
 2858|    868|    PolicyTraits::transfer(&alloc_ref(), to, from);
 2859|    868|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE11growth_leftEv:
 3181|  1.37k|  size_t growth_left() const { return common().growth_left(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE28rehash_and_grow_if_necessaryEv:
 2970|     24|  void rehash_and_grow_if_necessary() {
 2971|     24|    const size_t cap = capacity();
 2972|     24|    if (cap > Group::kWidth &&
  ------------------
  |  Branch (2972:9): [True: 8, False: 16]
  ------------------
 2973|       |        // Do these calculations in 64-bit to avoid overflow.
 2974|      8|        size() * uint64_t{32} <= cap * uint64_t{25}) {
  ------------------
  |  Branch (2974:9): [True: 0, False: 8]
  ------------------
 2975|       |      // Squash DELETED without growing if there is enough capacity.
 2976|       |      //
 2977|       |      // Rehash in place if the current size is <= 25/32 of capacity.
 2978|       |      // Rationale for such a high factor: 1) drop_deletes_without_resize() is
 2979|       |      // faster than resize, and 2) it takes quite a bit of work to add
 2980|       |      // tombstones.  In the worst case, seems to take approximately 4
 2981|       |      // insert/erase pairs to create a single tombstone and so if we are
 2982|       |      // rehashing because of tombstones, we can afford to rehash-in-place as
 2983|       |      // long as we are reclaiming at least 1/8 the capacity without doing more
 2984|       |      // than 2X the work.  (Where "work" is defined to be size() for rehashing
 2985|       |      // or rehashing in place, and 1 for an insert or erase.)  But rehashing in
 2986|       |      // place is faster per operation than inserting or even doubling the size
 2987|       |      // of the table, so we actually afford to reclaim even less space from a
 2988|       |      // resize-in-place.  The decision is to rehash in place if we can reclaim
 2989|       |      // at about 1/8th of the usable capacity (specifically 3/28 of the
 2990|       |      // capacity) which means that the total cost of rehashing will be a small
 2991|       |      // fraction of the total work.
 2992|       |      //
 2993|       |      // Here is output of an experiment using the BM_CacheInSteadyState
 2994|       |      // benchmark running the old case (where we rehash-in-place only if we can
 2995|       |      // reclaim at least 7/16*capacity) vs. this code (which rehashes in place
 2996|       |      // if we can recover 3/32*capacity).
 2997|       |      //
 2998|       |      // Note that although in the worst-case number of rehashes jumped up from
 2999|       |      // 15 to 190, but the number of operations per second is almost the same.
 3000|       |      //
 3001|       |      // Abridged output of running BM_CacheInSteadyState benchmark from
 3002|       |      // raw_hash_set_benchmark.   N is the number of insert/erase operations.
 3003|       |      //
 3004|       |      //      | OLD (recover >= 7/16        | NEW (recover >= 3/32)
 3005|       |      // size |    N/s LoadFactor NRehashes |    N/s LoadFactor NRehashes
 3006|       |      //  448 | 145284       0.44        18 | 140118       0.44        19
 3007|       |      //  493 | 152546       0.24        11 | 151417       0.48        28
 3008|       |      //  538 | 151439       0.26        11 | 151152       0.53        38
 3009|       |      //  583 | 151765       0.28        11 | 150572       0.57        50
 3010|       |      //  628 | 150241       0.31        11 | 150853       0.61        66
 3011|       |      //  672 | 149602       0.33        12 | 150110       0.66        90
 3012|       |      //  717 | 149998       0.35        12 | 149531       0.70       129
 3013|       |      //  762 | 149836       0.37        13 | 148559       0.74       190
 3014|       |      //  807 | 149736       0.39        14 | 151107       0.39        14
 3015|       |      //  852 | 150204       0.42        15 | 151019       0.42        15
 3016|      0|      drop_deletes_without_resize();
 3017|     24|    } else {
 3018|       |      // Otherwise grow the container.
 3019|     24|      resize(NextCapacity(cap));
 3020|     24|    }
 3021|     24|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE4sizeEv:
 2287|      8|  size_t size() const { return common().size(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE15set_growth_leftEm:
 3182|    688|  void set_growth_left(size_t gl) { return common().set_growth_left(gl); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE10emplace_atIJRKS6_EEEvmDpOT_:
 3151|    688|  void emplace_at(size_t i, Args&&... args) {
 3152|    688|    construct(slot_array() + i, std::forward<Args>(args)...);
 3153|       |
 3154|       |    assert(PolicyTraits::apply(FindElement{*this}, *iterator_at(i)) ==
 3155|    688|               iterator_at(i) &&
 3156|    688|           "constructed value does not match the lookup key");
 3157|    688|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIN6google8protobuf6SymbolEEENS5_12_GLOBAL__N_118SymbolByParentHashENS8_16SymbolByParentEqENSt3__19allocatorIS6_EEE9constructIJRKS6_EEEvPS6_DpOT_:
 2851|    688|  inline void construct(slot_type* slot, Args&&... args) {
 2852|    688|    PolicyTraits::construct(&alloc_ref(), slot, std::forward<Args>(args)...);
 2853|    688|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE6insertIS8_TnNSF_9enable_ifIXsr4absl11disjunctionINSF_14is_convertibleIRKT_S8_EENSI_22SameAsElementReferenceISO_EEEE5valueEiE4typeELi0ETnNSK_IXsr14IsDecomposableISO_EE5valueEiE4typeELi0EEENSF_4pairINSI_8iteratorEbEESO_:
 2339|      4|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2340|      4|    return emplace(value);
 2341|      4|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE7emplaceIJRKS8_ETnNSF_9enable_ifIXsr14IsDecomposableIDpT_EE5valueEiE4typeELi0EEENSF_4pairINSI_8iteratorEbEEDpOSN_:
 2422|      4|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2423|      4|    return PolicyTraits::apply(EmplaceDecomposable{*this},
 2424|      4|                               std::forward<Args>(args)...);
 2425|      4|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE19EmplaceDecomposableclIS8_JRKS8_EEENSF_4pairINSI_8iteratorEbEERKT_DpOT0_:
 2822|      4|    std::pair<iterator, bool> operator()(const K& key, Args&&... args) const {
 2823|      4|      auto res = s.find_or_prepare_insert(key);
 2824|      4|      if (res.second) {
  ------------------
  |  Branch (2824:11): [True: 4, False: 0]
  ------------------
 2825|      4|        s.emplace_at(res.first, std::forward<Args>(args)...);
 2826|      4|      }
 2827|      4|      return {s.iterator_at(res.first), res.second};
 2828|      4|    }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE22find_or_prepare_insertIS8_EENSF_4pairImbEERKT_:
 3086|      4|  std::pair<size_t, bool> find_or_prepare_insert(const K& key) {
 3087|      4|    prefetch_heap_block();
 3088|      4|    auto hash = hash_ref()(key);
 3089|      4|    auto seq = probe(common(), hash);
 3090|      4|    const ctrl_t* ctrl = control();
 3091|      4|    while (true) {
  ------------------
  |  Branch (3091:12): [True: 4, Folded]
  ------------------
 3092|      4|      Group g{ctrl + seq.offset()};
 3093|      4|      for (uint32_t i : g.Match(H2(hash))) {
  ------------------
  |  Branch (3093:23): [True: 1, False: 4]
  ------------------
 3094|      1|        if (ABSL_PREDICT_TRUE(PolicyTraits::apply(
  ------------------
  |  |  179|      1|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 0, False: 1]
  |  |  |  Branch (179:48): [Folded, False: 1]
  |  |  |  Branch (179:57): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 3095|      1|                EqualElement<K>{key, eq_ref()},
 3096|      1|                PolicyTraits::element(slot_array() + seq.offset(i)))))
 3097|      0|          return {seq.offset(i), false};
 3098|      1|      }
 3099|      4|      if (ABSL_PREDICT_TRUE(g.MaskEmpty())) break;
  ------------------
  |  |  179|      4|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 4, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 4]
  |  |  |  Branch (179:57): [True: 4, False: 0]
  |  |  ------------------
  ------------------
 3100|      0|      seq.next();
 3101|      0|      assert(seq.index() <= capacity() && "full table!");
 3102|      0|    }
 3103|      4|    return {prepare_insert(hash), true};
 3104|      4|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE14prepare_insertEm:
 3110|      4|  size_t prepare_insert(size_t hash) ABSL_ATTRIBUTE_NOINLINE {
 3111|      4|    const bool rehash_for_bug_detection =
 3112|      4|        common().should_rehash_for_bug_detection_on_insert();
 3113|      4|    if (rehash_for_bug_detection) {
  ------------------
  |  Branch (3113:9): [True: 0, False: 4]
  ------------------
 3114|       |      // Move to a different heap allocation in order to detect bugs.
 3115|      0|      const size_t cap = capacity();
 3116|      0|      resize(growth_left() > 0 ? cap : NextCapacity(cap));
  ------------------
  |  Branch (3116:14): [True: 0, False: 0]
  ------------------
 3117|      0|    }
 3118|      4|    auto target = find_first_non_full(common(), hash);
 3119|      4|    if (!rehash_for_bug_detection &&
  ------------------
  |  Branch (3119:9): [True: 4, False: 0]
  ------------------
 3120|      4|        ABSL_PREDICT_FALSE(growth_left() == 0 &&
  ------------------
  |  |  178|      7|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 3, False: 1]
  |  |  |  Branch (178:49): [Folded, False: 4]
  |  |  |  Branch (178:59): [True: 3, False: 1]
  |  |  |  Branch (178:59): [True: 3, False: 0]
  |  |  ------------------
  ------------------
 3121|      4|                           !IsDeleted(control()[target.offset]))) {
 3122|      3|      size_t old_capacity = capacity();
 3123|      3|      rehash_and_grow_if_necessary();
 3124|       |      // NOTE: It is safe to use `FindFirstNonFullAfterResize`.
 3125|       |      // `FindFirstNonFullAfterResize` must be called right after resize.
 3126|       |      // `rehash_and_grow_if_necessary` may *not* call `resize`
 3127|       |      // and perform `drop_deletes_without_resize` instead. But this
 3128|       |      // could happen only on big tables.
 3129|       |      // For big tables `FindFirstNonFullAfterResize` will always
 3130|       |      // fallback to normal `find_first_non_full`, so it is safe to use it.
 3131|      3|      target = HashSetResizeHelper::FindFirstNonFullAfterResize(
 3132|      3|          common(), old_capacity, hash);
 3133|      3|    }
 3134|      4|    common().increment_size();
 3135|      4|    set_growth_left(growth_left() - IsEmpty(control()[target.offset]));
 3136|      4|    SetCtrl(common(), target.offset, H2(hash), sizeof(slot_type));
 3137|      4|    common().maybe_increment_generation_on_insert();
 3138|      4|    infoz().RecordInsert(hash, target.probe_length);
 3139|      4|    return target.offset;
 3140|      4|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE6resizeEm:
 2905|      3|  ABSL_ATTRIBUTE_NOINLINE void resize(size_t new_capacity) {
 2906|      3|    assert(IsValidCapacity(new_capacity));
 2907|      3|    HashSetResizeHelper resize_helper(common());
 2908|      3|    auto* old_slots = slot_array();
 2909|      3|    common().set_capacity(new_capacity);
 2910|       |    // Note that `InitializeSlots` does different number initialization steps
 2911|       |    // depending on the values of `transfer_uses_memcpy` and capacities.
 2912|       |    // Refer to the comment in `InitializeSlots` for more details.
 2913|      3|    const bool grow_single_group =
 2914|      3|        resize_helper.InitializeSlots<CharAlloc, sizeof(slot_type),
 2915|      3|                                      PolicyTraits::transfer_uses_memcpy(),
 2916|      3|                                      alignof(slot_type)>(
 2917|      3|            common(), const_cast<std::remove_const_t<slot_type>*>(old_slots),
 2918|      3|            CharAlloc(alloc_ref()));
 2919|       |
 2920|      3|    if (resize_helper.old_capacity() == 0) {
  ------------------
  |  Branch (2920:9): [True: 1, False: 2]
  ------------------
 2921|       |      // InitializeSlots did all the work including infoz().RecordRehash().
 2922|      1|      return;
 2923|      1|    }
 2924|       |
 2925|      2|    if (grow_single_group) {
  ------------------
  |  Branch (2925:9): [True: 2, False: 0]
  ------------------
 2926|      2|      if (PolicyTraits::transfer_uses_memcpy()) {
  ------------------
  |  Branch (2926:11): [Folded, False: 2]
  ------------------
 2927|       |        // InitializeSlots did all the work.
 2928|      0|        return;
 2929|      0|      }
 2930|       |      // We want GrowSizeIntoSingleGroup to be called here in order to make
 2931|       |      // InitializeSlots not depend on PolicyTraits.
 2932|      2|      resize_helper.GrowSizeIntoSingleGroup<PolicyTraits>(common(), alloc_ref(),
 2933|      2|                                                          old_slots);
 2934|      2|    } else {
 2935|       |      // InitializeSlots prepares control bytes to correspond to empty table.
 2936|      0|      auto* new_slots = slot_array();
 2937|      0|      size_t total_probe_length = 0;
 2938|      0|      for (size_t i = 0; i != resize_helper.old_capacity(); ++i) {
  ------------------
  |  Branch (2938:26): [True: 0, False: 0]
  ------------------
 2939|      0|        if (IsFull(resize_helper.old_ctrl()[i])) {
  ------------------
  |  Branch (2939:13): [True: 0, False: 0]
  ------------------
 2940|      0|          size_t hash = PolicyTraits::apply(
 2941|      0|              HashElement{hash_ref()}, PolicyTraits::element(old_slots + i));
 2942|      0|          auto target = find_first_non_full(common(), hash);
 2943|      0|          size_t new_i = target.offset;
 2944|      0|          total_probe_length += target.probe_length;
 2945|      0|          SetCtrl(common(), new_i, H2(hash), sizeof(slot_type));
 2946|      0|          transfer(new_slots + new_i, old_slots + i);
 2947|      0|        }
 2948|      0|      }
 2949|      0|      infoz().RecordRehash(total_probe_length);
 2950|      0|    }
 2951|      2|    resize_helper.DeallocateOld<alignof(slot_type)>(
 2952|      2|        CharAlloc(alloc_ref()), sizeof(slot_type),
 2953|      2|        const_cast<std::remove_const_t<slot_type>*>(old_slots));
 2954|      2|  }
_ZN4absl12lts_2024011618container_internal19HashSetResizeHelper23GrowSizeIntoSingleGroupINS1_18hash_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEEvEENSt3__19allocatorISA_EEEEvRNS1_12CommonFieldsERT0_PNT_9slot_typeE:
 1655|      2|                               typename PolicyTraits::slot_type* old_slots) {
 1656|      2|    assert(old_capacity_ < Group::kWidth / 2);
 1657|      2|    assert(IsGrowingIntoSingleGroupApplicable(old_capacity_, c.capacity()));
 1658|      2|    using slot_type = typename PolicyTraits::slot_type;
 1659|      2|    assert(is_single_group(c.capacity()));
 1660|       |
 1661|      2|    auto* new_slots = reinterpret_cast<slot_type*>(c.slot_array());
 1662|       |
 1663|      2|    size_t shuffle_bit = old_capacity_ / 2 + 1;
 1664|      6|    for (size_t i = 0; i < old_capacity_; ++i) {
  ------------------
  |  Branch (1664:24): [True: 4, False: 2]
  ------------------
 1665|      4|      if (IsFull(old_ctrl_[i])) {
  ------------------
  |  Branch (1665:11): [True: 4, False: 0]
  ------------------
 1666|      4|        size_t new_i = i ^ shuffle_bit;
 1667|      4|        SanitizerUnpoisonMemoryRegion(new_slots + new_i, sizeof(slot_type));
 1668|      4|        PolicyTraits::transfer(&alloc_ref, new_slots + new_i, old_slots + i);
 1669|      4|      }
 1670|      4|    }
 1671|      2|    PoisonSingleGroupEmptySlots(c, sizeof(slot_type));
 1672|      2|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE11growth_leftEv:
 3181|      8|  size_t growth_left() const { return common().growth_left(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE28rehash_and_grow_if_necessaryEv:
 2970|      3|  void rehash_and_grow_if_necessary() {
 2971|      3|    const size_t cap = capacity();
 2972|      3|    if (cap > Group::kWidth &&
  ------------------
  |  Branch (2972:9): [True: 0, False: 3]
  ------------------
 2973|       |        // Do these calculations in 64-bit to avoid overflow.
 2974|      0|        size() * uint64_t{32} <= cap * uint64_t{25}) {
  ------------------
  |  Branch (2974:9): [True: 0, False: 0]
  ------------------
 2975|       |      // Squash DELETED without growing if there is enough capacity.
 2976|       |      //
 2977|       |      // Rehash in place if the current size is <= 25/32 of capacity.
 2978|       |      // Rationale for such a high factor: 1) drop_deletes_without_resize() is
 2979|       |      // faster than resize, and 2) it takes quite a bit of work to add
 2980|       |      // tombstones.  In the worst case, seems to take approximately 4
 2981|       |      // insert/erase pairs to create a single tombstone and so if we are
 2982|       |      // rehashing because of tombstones, we can afford to rehash-in-place as
 2983|       |      // long as we are reclaiming at least 1/8 the capacity without doing more
 2984|       |      // than 2X the work.  (Where "work" is defined to be size() for rehashing
 2985|       |      // or rehashing in place, and 1 for an insert or erase.)  But rehashing in
 2986|       |      // place is faster per operation than inserting or even doubling the size
 2987|       |      // of the table, so we actually afford to reclaim even less space from a
 2988|       |      // resize-in-place.  The decision is to rehash in place if we can reclaim
 2989|       |      // at about 1/8th of the usable capacity (specifically 3/28 of the
 2990|       |      // capacity) which means that the total cost of rehashing will be a small
 2991|       |      // fraction of the total work.
 2992|       |      //
 2993|       |      // Here is output of an experiment using the BM_CacheInSteadyState
 2994|       |      // benchmark running the old case (where we rehash-in-place only if we can
 2995|       |      // reclaim at least 7/16*capacity) vs. this code (which rehashes in place
 2996|       |      // if we can recover 3/32*capacity).
 2997|       |      //
 2998|       |      // Note that although in the worst-case number of rehashes jumped up from
 2999|       |      // 15 to 190, but the number of operations per second is almost the same.
 3000|       |      //
 3001|       |      // Abridged output of running BM_CacheInSteadyState benchmark from
 3002|       |      // raw_hash_set_benchmark.   N is the number of insert/erase operations.
 3003|       |      //
 3004|       |      //      | OLD (recover >= 7/16        | NEW (recover >= 3/32)
 3005|       |      // size |    N/s LoadFactor NRehashes |    N/s LoadFactor NRehashes
 3006|       |      //  448 | 145284       0.44        18 | 140118       0.44        19
 3007|       |      //  493 | 152546       0.24        11 | 151417       0.48        28
 3008|       |      //  538 | 151439       0.26        11 | 151152       0.53        38
 3009|       |      //  583 | 151765       0.28        11 | 150572       0.57        50
 3010|       |      //  628 | 150241       0.31        11 | 150853       0.61        66
 3011|       |      //  672 | 149602       0.33        12 | 150110       0.66        90
 3012|       |      //  717 | 149998       0.35        12 | 149531       0.70       129
 3013|       |      //  762 | 149836       0.37        13 | 148559       0.74       190
 3014|       |      //  807 | 149736       0.39        14 | 151107       0.39        14
 3015|       |      //  852 | 150204       0.42        15 | 151019       0.42        15
 3016|      0|      drop_deletes_without_resize();
 3017|      3|    } else {
 3018|       |      // Otherwise grow the container.
 3019|      3|      resize(NextCapacity(cap));
 3020|      3|    }
 3021|      3|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE15set_growth_leftEm:
 3182|      4|  void set_growth_left(size_t gl) { return common().set_growth_left(gl); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE10emplace_atIJRKS8_EEEvmDpOT_:
 3151|      4|  void emplace_at(size_t i, Args&&... args) {
 3152|      4|    construct(slot_array() + i, std::forward<Args>(args)...);
 3153|       |
 3154|       |    assert(PolicyTraits::apply(FindElement{*this}, *iterator_at(i)) ==
 3155|      4|               iterator_at(i) &&
 3156|      4|           "constructed value does not match the lookup key");
 3157|      4|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS5_12_GLOBAL__N_121DescriptorsByNameHashIS6_EENSA_19DescriptorsByNameEqIS6_EENSt3__19allocatorIS8_EEE9constructIJRKS8_EEEvPS8_DpOT_:
 2851|      4|  inline void construct(slot_type* slot, Args&&... args) {
 2852|      4|    PolicyTraits::construct(&alloc_ref(), slot, std::forward<Args>(args)...);
 2853|      4|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE6insertIPS6_TnNSD_9enable_ifIXsr4absl11disjunctionINSD_14is_convertibleIRKT_S8_EENSG_22SameAsElementReferenceISN_EEEE5valueEiE4typeELi0ETnNSJ_IXsr14IsDecomposableISN_EE5valueEiE4typeELi0EEENSD_4pairINSG_8iteratorEbEESN_:
 2339|    108|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2340|    108|    return emplace(value);
 2341|    108|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE7emplaceIJRKPS6_ETnNSD_9enable_ifIXsr14IsDecomposableIDpT_EE5valueEiE4typeELi0EEENSD_4pairINSG_8iteratorEbEEDpOSM_:
 2422|    108|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2423|    108|    return PolicyTraits::apply(EmplaceDecomposable{*this},
 2424|    108|                               std::forward<Args>(args)...);
 2425|    108|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE19EmplaceDecomposableclIPS6_JRKSJ_EEENSD_4pairINSG_8iteratorEbEERKT_DpOT0_:
 2822|    108|    std::pair<iterator, bool> operator()(const K& key, Args&&... args) const {
 2823|    108|      auto res = s.find_or_prepare_insert(key);
 2824|    108|      if (res.second) {
  ------------------
  |  Branch (2824:11): [True: 108, False: 0]
  ------------------
 2825|    108|        s.emplace_at(res.first, std::forward<Args>(args)...);
 2826|    108|      }
 2827|    108|      return {s.iterator_at(res.first), res.second};
 2828|    108|    }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE22find_or_prepare_insertIPS6_EENSD_4pairImbEERKT_:
 3086|    108|  std::pair<size_t, bool> find_or_prepare_insert(const K& key) {
 3087|    108|    prefetch_heap_block();
 3088|    108|    auto hash = hash_ref()(key);
 3089|    108|    auto seq = probe(common(), hash);
 3090|    108|    const ctrl_t* ctrl = control();
 3091|    111|    while (true) {
  ------------------
  |  Branch (3091:12): [True: 111, Folded]
  ------------------
 3092|    111|      Group g{ctrl + seq.offset()};
 3093|    111|      for (uint32_t i : g.Match(H2(hash))) {
  ------------------
  |  Branch (3093:23): [True: 9, False: 111]
  ------------------
 3094|      9|        if (ABSL_PREDICT_TRUE(PolicyTraits::apply(
  ------------------
  |  |  179|      9|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 0, False: 9]
  |  |  |  Branch (179:48): [Folded, False: 9]
  |  |  |  Branch (179:57): [True: 0, False: 9]
  |  |  ------------------
  ------------------
 3095|      9|                EqualElement<K>{key, eq_ref()},
 3096|      9|                PolicyTraits::element(slot_array() + seq.offset(i)))))
 3097|      0|          return {seq.offset(i), false};
 3098|      9|      }
 3099|    111|      if (ABSL_PREDICT_TRUE(g.MaskEmpty())) break;
  ------------------
  |  |  179|    111|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 108, False: 3]
  |  |  |  Branch (179:48): [Folded, False: 111]
  |  |  |  Branch (179:57): [True: 108, False: 3]
  |  |  ------------------
  ------------------
 3100|      3|      seq.next();
 3101|      3|      assert(seq.index() <= capacity() && "full table!");
 3102|      3|    }
 3103|    108|    return {prepare_insert(hash), true};
 3104|    108|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE8hash_refEv:
 3202|    206|  hasher& hash_ref() { return settings_.template get<1>(); }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE12EqualElementIPS6_EclIS8_JRS8_EEEbRKT_DpOT0_:
 2813|      9|    bool operator()(const K2& lhs, Args&&...) const {
 2814|      9|      return eq(lhs, rhs);
 2815|      9|    }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE14prepare_insertEm:
 3110|    108|  size_t prepare_insert(size_t hash) ABSL_ATTRIBUTE_NOINLINE {
 3111|    108|    const bool rehash_for_bug_detection =
 3112|    108|        common().should_rehash_for_bug_detection_on_insert();
 3113|    108|    if (rehash_for_bug_detection) {
  ------------------
  |  Branch (3113:9): [True: 0, False: 108]
  ------------------
 3114|       |      // Move to a different heap allocation in order to detect bugs.
 3115|      0|      const size_t cap = capacity();
 3116|      0|      resize(growth_left() > 0 ? cap : NextCapacity(cap));
  ------------------
  |  Branch (3116:14): [True: 0, False: 0]
  ------------------
 3117|      0|    }
 3118|    108|    auto target = find_first_non_full(common(), hash);
 3119|    108|    if (!rehash_for_bug_detection &&
  ------------------
  |  Branch (3119:9): [True: 108, False: 0]
  ------------------
 3120|    108|        ABSL_PREDICT_FALSE(growth_left() == 0 &&
  ------------------
  |  |  178|    120|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 12, False: 96]
  |  |  |  Branch (178:49): [Folded, False: 108]
  |  |  |  Branch (178:59): [True: 12, False: 96]
  |  |  |  Branch (178:59): [True: 12, False: 0]
  |  |  ------------------
  ------------------
 3121|    108|                           !IsDeleted(control()[target.offset]))) {
 3122|     12|      size_t old_capacity = capacity();
 3123|     12|      rehash_and_grow_if_necessary();
 3124|       |      // NOTE: It is safe to use `FindFirstNonFullAfterResize`.
 3125|       |      // `FindFirstNonFullAfterResize` must be called right after resize.
 3126|       |      // `rehash_and_grow_if_necessary` may *not* call `resize`
 3127|       |      // and perform `drop_deletes_without_resize` instead. But this
 3128|       |      // could happen only on big tables.
 3129|       |      // For big tables `FindFirstNonFullAfterResize` will always
 3130|       |      // fallback to normal `find_first_non_full`, so it is safe to use it.
 3131|     12|      target = HashSetResizeHelper::FindFirstNonFullAfterResize(
 3132|     12|          common(), old_capacity, hash);
 3133|     12|    }
 3134|    108|    common().increment_size();
 3135|    108|    set_growth_left(growth_left() - IsEmpty(control()[target.offset]));
 3136|    108|    SetCtrl(common(), target.offset, H2(hash), sizeof(slot_type));
 3137|    108|    common().maybe_increment_generation_on_insert();
 3138|    108|    infoz().RecordInsert(hash, target.probe_length);
 3139|    108|    return target.offset;
 3140|    108|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE6resizeEm:
 2905|     12|  ABSL_ATTRIBUTE_NOINLINE void resize(size_t new_capacity) {
 2906|     12|    assert(IsValidCapacity(new_capacity));
 2907|     12|    HashSetResizeHelper resize_helper(common());
 2908|     12|    auto* old_slots = slot_array();
 2909|     12|    common().set_capacity(new_capacity);
 2910|       |    // Note that `InitializeSlots` does different number initialization steps
 2911|       |    // depending on the values of `transfer_uses_memcpy` and capacities.
 2912|       |    // Refer to the comment in `InitializeSlots` for more details.
 2913|     12|    const bool grow_single_group =
 2914|     12|        resize_helper.InitializeSlots<CharAlloc, sizeof(slot_type),
 2915|     12|                                      PolicyTraits::transfer_uses_memcpy(),
 2916|     12|                                      alignof(slot_type)>(
 2917|     12|            common(), const_cast<std::remove_const_t<slot_type>*>(old_slots),
 2918|     12|            CharAlloc(alloc_ref()));
 2919|       |
 2920|     12|    if (resize_helper.old_capacity() == 0) {
  ------------------
  |  Branch (2920:9): [True: 3, False: 9]
  ------------------
 2921|       |      // InitializeSlots did all the work including infoz().RecordRehash().
 2922|      3|      return;
 2923|      3|    }
 2924|       |
 2925|      9|    if (grow_single_group) {
  ------------------
  |  Branch (2925:9): [True: 6, False: 3]
  ------------------
 2926|      6|      if (PolicyTraits::transfer_uses_memcpy()) {
  ------------------
  |  Branch (2926:11): [Folded, False: 6]
  ------------------
 2927|       |        // InitializeSlots did all the work.
 2928|      0|        return;
 2929|      0|      }
 2930|       |      // We want GrowSizeIntoSingleGroup to be called here in order to make
 2931|       |      // InitializeSlots not depend on PolicyTraits.
 2932|      6|      resize_helper.GrowSizeIntoSingleGroup<PolicyTraits>(common(), alloc_ref(),
 2933|      6|                                                          old_slots);
 2934|      6|    } else {
 2935|       |      // InitializeSlots prepares control bytes to correspond to empty table.
 2936|      3|      auto* new_slots = slot_array();
 2937|      3|      size_t total_probe_length = 0;
 2938|    112|      for (size_t i = 0; i != resize_helper.old_capacity(); ++i) {
  ------------------
  |  Branch (2938:26): [True: 109, False: 3]
  ------------------
 2939|    109|        if (IsFull(resize_helper.old_ctrl()[i])) {
  ------------------
  |  Branch (2939:13): [True: 98, False: 11]
  ------------------
 2940|     98|          size_t hash = PolicyTraits::apply(
 2941|     98|              HashElement{hash_ref()}, PolicyTraits::element(old_slots + i));
 2942|     98|          auto target = find_first_non_full(common(), hash);
 2943|     98|          size_t new_i = target.offset;
 2944|     98|          total_probe_length += target.probe_length;
 2945|     98|          SetCtrl(common(), new_i, H2(hash), sizeof(slot_type));
 2946|     98|          transfer(new_slots + new_i, old_slots + i);
 2947|     98|        }
 2948|    109|      }
 2949|      3|      infoz().RecordRehash(total_probe_length);
 2950|      3|    }
 2951|      9|    resize_helper.DeallocateOld<alignof(slot_type)>(
 2952|      9|        CharAlloc(alloc_ref()), sizeof(slot_type),
 2953|      9|        const_cast<std::remove_const_t<slot_type>*>(old_slots));
 2954|      9|  }
_ZN4absl12lts_2024011618container_internal19HashSetResizeHelper23GrowSizeIntoSingleGroupINS1_18hash_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEEvEENSt3__19allocatorISA_EEEEvRNS1_12CommonFieldsERT0_PNT_9slot_typeE:
 1655|      6|                               typename PolicyTraits::slot_type* old_slots) {
 1656|      6|    assert(old_capacity_ < Group::kWidth / 2);
 1657|      6|    assert(IsGrowingIntoSingleGroupApplicable(old_capacity_, c.capacity()));
 1658|      6|    using slot_type = typename PolicyTraits::slot_type;
 1659|      6|    assert(is_single_group(c.capacity()));
 1660|       |
 1661|      6|    auto* new_slots = reinterpret_cast<slot_type*>(c.slot_array());
 1662|       |
 1663|      6|    size_t shuffle_bit = old_capacity_ / 2 + 1;
 1664|     28|    for (size_t i = 0; i < old_capacity_; ++i) {
  ------------------
  |  Branch (1664:24): [True: 22, False: 6]
  ------------------
 1665|     22|      if (IsFull(old_ctrl_[i])) {
  ------------------
  |  Branch (1665:11): [True: 22, False: 0]
  ------------------
 1666|     22|        size_t new_i = i ^ shuffle_bit;
 1667|     22|        SanitizerUnpoisonMemoryRegion(new_slots + new_i, sizeof(slot_type));
 1668|     22|        PolicyTraits::transfer(&alloc_ref, new_slots + new_i, old_slots + i);
 1669|     22|      }
 1670|     22|    }
 1671|      6|    PoisonSingleGroupEmptySlots(c, sizeof(slot_type));
 1672|      6|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE11HashElementclIS8_JRS8_EEEmRKT_DpOT0_:
 2804|     98|    size_t operator()(const K& key, Args&&...) const {
 2805|     98|      return h(key);
 2806|     98|    }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE8transferEPS8_SH_:
 2857|     98|  inline void transfer(slot_type* to, slot_type* from) {
 2858|     98|    PolicyTraits::transfer(&alloc_ref(), to, from);
 2859|     98|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE11growth_leftEv:
 3181|    216|  size_t growth_left() const { return common().growth_left(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE28rehash_and_grow_if_necessaryEv:
 2970|     12|  void rehash_and_grow_if_necessary() {
 2971|     12|    const size_t cap = capacity();
 2972|     12|    if (cap > Group::kWidth &&
  ------------------
  |  Branch (2972:9): [True: 2, False: 10]
  ------------------
 2973|       |        // Do these calculations in 64-bit to avoid overflow.
 2974|      2|        size() * uint64_t{32} <= cap * uint64_t{25}) {
  ------------------
  |  Branch (2974:9): [True: 0, False: 2]
  ------------------
 2975|       |      // Squash DELETED without growing if there is enough capacity.
 2976|       |      //
 2977|       |      // Rehash in place if the current size is <= 25/32 of capacity.
 2978|       |      // Rationale for such a high factor: 1) drop_deletes_without_resize() is
 2979|       |      // faster than resize, and 2) it takes quite a bit of work to add
 2980|       |      // tombstones.  In the worst case, seems to take approximately 4
 2981|       |      // insert/erase pairs to create a single tombstone and so if we are
 2982|       |      // rehashing because of tombstones, we can afford to rehash-in-place as
 2983|       |      // long as we are reclaiming at least 1/8 the capacity without doing more
 2984|       |      // than 2X the work.  (Where "work" is defined to be size() for rehashing
 2985|       |      // or rehashing in place, and 1 for an insert or erase.)  But rehashing in
 2986|       |      // place is faster per operation than inserting or even doubling the size
 2987|       |      // of the table, so we actually afford to reclaim even less space from a
 2988|       |      // resize-in-place.  The decision is to rehash in place if we can reclaim
 2989|       |      // at about 1/8th of the usable capacity (specifically 3/28 of the
 2990|       |      // capacity) which means that the total cost of rehashing will be a small
 2991|       |      // fraction of the total work.
 2992|       |      //
 2993|       |      // Here is output of an experiment using the BM_CacheInSteadyState
 2994|       |      // benchmark running the old case (where we rehash-in-place only if we can
 2995|       |      // reclaim at least 7/16*capacity) vs. this code (which rehashes in place
 2996|       |      // if we can recover 3/32*capacity).
 2997|       |      //
 2998|       |      // Note that although in the worst-case number of rehashes jumped up from
 2999|       |      // 15 to 190, but the number of operations per second is almost the same.
 3000|       |      //
 3001|       |      // Abridged output of running BM_CacheInSteadyState benchmark from
 3002|       |      // raw_hash_set_benchmark.   N is the number of insert/erase operations.
 3003|       |      //
 3004|       |      //      | OLD (recover >= 7/16        | NEW (recover >= 3/32)
 3005|       |      // size |    N/s LoadFactor NRehashes |    N/s LoadFactor NRehashes
 3006|       |      //  448 | 145284       0.44        18 | 140118       0.44        19
 3007|       |      //  493 | 152546       0.24        11 | 151417       0.48        28
 3008|       |      //  538 | 151439       0.26        11 | 151152       0.53        38
 3009|       |      //  583 | 151765       0.28        11 | 150572       0.57        50
 3010|       |      //  628 | 150241       0.31        11 | 150853       0.61        66
 3011|       |      //  672 | 149602       0.33        12 | 150110       0.66        90
 3012|       |      //  717 | 149998       0.35        12 | 149531       0.70       129
 3013|       |      //  762 | 149836       0.37        13 | 148559       0.74       190
 3014|       |      //  807 | 149736       0.39        14 | 151107       0.39        14
 3015|       |      //  852 | 150204       0.42        15 | 151019       0.42        15
 3016|      0|      drop_deletes_without_resize();
 3017|     12|    } else {
 3018|       |      // Otherwise grow the container.
 3019|     12|      resize(NextCapacity(cap));
 3020|     12|    }
 3021|     12|  }
descriptor.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE4sizeEv:
 2287|      2|  size_t size() const { return common().size(); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE15set_growth_leftEm:
 3182|    108|  void set_growth_left(size_t gl) { return common().set_growth_left(gl); }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE10emplace_atIJRKPS6_EEEvmDpOT_:
 3151|    108|  void emplace_at(size_t i, Args&&... args) {
 3152|    108|    construct(slot_array() + i, std::forward<Args>(args)...);
 3153|       |
 3154|       |    assert(PolicyTraits::apply(FindElement{*this}, *iterator_at(i)) ==
 3155|    108|               iterator_at(i) &&
 3156|    108|           "constructed value does not match the lookup key");
 3157|    108|  }
descriptor.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf15FieldDescriptorEEENS5_12_GLOBAL__N_116ParentNumberHashENSA_14ParentNumberEqENSt3__19allocatorIS8_EEE9constructIJRKPS6_EEEvPS8_DpOT_:
 2851|    108|  inline void construct(slot_type* slot, Args&&... args) {
 2852|    108|    PolicyTraits::construct(&alloc_ref(), slot, std::forward<Args>(args)...);
 2853|    108|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE15unchecked_derefENSP_8iteratorE:
 3166|    239|  reference unchecked_deref(iterator it) { return it.unchecked_deref(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE8iterator15unchecked_derefEv:
 2029|    239|    reference unchecked_deref() const { return PolicyTraits::element(slot_); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE22find_or_prepare_insertISA_EENSL_ImbEERKT_:
 3086|    239|  std::pair<size_t, bool> find_or_prepare_insert(const K& key) {
 3087|    239|    prefetch_heap_block();
 3088|    239|    auto hash = hash_ref()(key);
 3089|    239|    auto seq = probe(common(), hash);
 3090|    239|    const ctrl_t* ctrl = control();
 3091|    239|    while (true) {
  ------------------
  |  Branch (3091:12): [True: 239, Folded]
  ------------------
 3092|    239|      Group g{ctrl + seq.offset()};
 3093|    239|      for (uint32_t i : g.Match(H2(hash))) {
  ------------------
  |  Branch (3093:23): [True: 235, False: 4]
  ------------------
 3094|    235|        if (ABSL_PREDICT_TRUE(PolicyTraits::apply(
  ------------------
  |  |  179|    235|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 235, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 235]
  |  |  |  Branch (179:57): [True: 235, False: 0]
  |  |  ------------------
  ------------------
 3095|    235|                EqualElement<K>{key, eq_ref()},
 3096|    235|                PolicyTraits::element(slot_array() + seq.offset(i)))))
 3097|    235|          return {seq.offset(i), false};
 3098|    235|      }
 3099|      4|      if (ABSL_PREDICT_TRUE(g.MaskEmpty())) break;
  ------------------
  |  |  179|      4|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 4, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 4]
  |  |  |  Branch (179:57): [True: 4, False: 0]
  |  |  ------------------
  ------------------
 3100|      0|      seq.next();
 3101|      0|      assert(seq.index() <= capacity() && "full table!");
 3102|      0|    }
 3103|      4|    return {prepare_insert(hash), true};
 3104|    239|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE19prefetch_heap_blockEv:
 3187|    239|  void prefetch_heap_block() const {
 3188|    239|#if ABSL_HAVE_BUILTIN(__builtin_prefetch) || defined(__GNUC__)
 3189|    239|    __builtin_prefetch(control(), 0, 1);
 3190|    239|#endif
 3191|    239|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE8hash_refEv:
 3202|    239|  hasher& hash_ref() { return settings_.template get<1>(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE12EqualElementISA_EclISA_JRKNS4_21piecewise_construct_tENS4_5tupleIJRSM_EEENSW_IJRKSH_EEEEEEbRKT_DpOT0_:
 2813|    235|    bool operator()(const K2& lhs, Args&&...) const {
 2814|    235|      return eq(lhs, rhs);
 2815|    235|    }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE6eq_refEv:
 3204|    235|  key_equal& eq_ref() { return settings_.template get<2>(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE14prepare_insertEm:
 3110|      4|  size_t prepare_insert(size_t hash) ABSL_ATTRIBUTE_NOINLINE {
 3111|      4|    const bool rehash_for_bug_detection =
 3112|      4|        common().should_rehash_for_bug_detection_on_insert();
 3113|      4|    if (rehash_for_bug_detection) {
  ------------------
  |  Branch (3113:9): [True: 0, False: 4]
  ------------------
 3114|       |      // Move to a different heap allocation in order to detect bugs.
 3115|      0|      const size_t cap = capacity();
 3116|      0|      resize(growth_left() > 0 ? cap : NextCapacity(cap));
  ------------------
  |  Branch (3116:14): [True: 0, False: 0]
  ------------------
 3117|      0|    }
 3118|      4|    auto target = find_first_non_full(common(), hash);
 3119|      4|    if (!rehash_for_bug_detection &&
  ------------------
  |  Branch (3119:9): [True: 4, False: 0]
  ------------------
 3120|      4|        ABSL_PREDICT_FALSE(growth_left() == 0 &&
  ------------------
  |  |  178|      7|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 3, False: 1]
  |  |  |  Branch (178:49): [Folded, False: 4]
  |  |  |  Branch (178:59): [True: 3, False: 1]
  |  |  |  Branch (178:59): [True: 3, False: 0]
  |  |  ------------------
  ------------------
 3121|      4|                           !IsDeleted(control()[target.offset]))) {
 3122|      3|      size_t old_capacity = capacity();
 3123|      3|      rehash_and_grow_if_necessary();
 3124|       |      // NOTE: It is safe to use `FindFirstNonFullAfterResize`.
 3125|       |      // `FindFirstNonFullAfterResize` must be called right after resize.
 3126|       |      // `rehash_and_grow_if_necessary` may *not* call `resize`
 3127|       |      // and perform `drop_deletes_without_resize` instead. But this
 3128|       |      // could happen only on big tables.
 3129|       |      // For big tables `FindFirstNonFullAfterResize` will always
 3130|       |      // fallback to normal `find_first_non_full`, so it is safe to use it.
 3131|      3|      target = HashSetResizeHelper::FindFirstNonFullAfterResize(
 3132|      3|          common(), old_capacity, hash);
 3133|      3|    }
 3134|      4|    common().increment_size();
 3135|      4|    set_growth_left(growth_left() - IsEmpty(control()[target.offset]));
 3136|      4|    SetCtrl(common(), target.offset, H2(hash), sizeof(slot_type));
 3137|      4|    common().maybe_increment_generation_on_insert();
 3138|      4|    infoz().RecordInsert(hash, target.probe_length);
 3139|      4|    return target.offset;
 3140|      4|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE6resizeEm:
 2905|      3|  ABSL_ATTRIBUTE_NOINLINE void resize(size_t new_capacity) {
 2906|      3|    assert(IsValidCapacity(new_capacity));
 2907|      3|    HashSetResizeHelper resize_helper(common());
 2908|      3|    auto* old_slots = slot_array();
 2909|      3|    common().set_capacity(new_capacity);
 2910|       |    // Note that `InitializeSlots` does different number initialization steps
 2911|       |    // depending on the values of `transfer_uses_memcpy` and capacities.
 2912|       |    // Refer to the comment in `InitializeSlots` for more details.
 2913|      3|    const bool grow_single_group =
 2914|      3|        resize_helper.InitializeSlots<CharAlloc, sizeof(slot_type),
 2915|      3|                                      PolicyTraits::transfer_uses_memcpy(),
 2916|      3|                                      alignof(slot_type)>(
 2917|      3|            common(), const_cast<std::remove_const_t<slot_type>*>(old_slots),
 2918|      3|            CharAlloc(alloc_ref()));
 2919|       |
 2920|      3|    if (resize_helper.old_capacity() == 0) {
  ------------------
  |  Branch (2920:9): [True: 1, False: 2]
  ------------------
 2921|       |      // InitializeSlots did all the work including infoz().RecordRehash().
 2922|      1|      return;
 2923|      1|    }
 2924|       |
 2925|      2|    if (grow_single_group) {
  ------------------
  |  Branch (2925:9): [True: 2, False: 0]
  ------------------
 2926|      2|      if (PolicyTraits::transfer_uses_memcpy()) {
  ------------------
  |  Branch (2926:11): [Folded, False: 2]
  ------------------
 2927|       |        // InitializeSlots did all the work.
 2928|      0|        return;
 2929|      0|      }
 2930|       |      // We want GrowSizeIntoSingleGroup to be called here in order to make
 2931|       |      // InitializeSlots not depend on PolicyTraits.
 2932|      2|      resize_helper.GrowSizeIntoSingleGroup<PolicyTraits>(common(), alloc_ref(),
 2933|      2|                                                          old_slots);
 2934|      2|    } else {
 2935|       |      // InitializeSlots prepares control bytes to correspond to empty table.
 2936|      0|      auto* new_slots = slot_array();
 2937|      0|      size_t total_probe_length = 0;
 2938|      0|      for (size_t i = 0; i != resize_helper.old_capacity(); ++i) {
  ------------------
  |  Branch (2938:26): [True: 0, False: 0]
  ------------------
 2939|      0|        if (IsFull(resize_helper.old_ctrl()[i])) {
  ------------------
  |  Branch (2939:13): [True: 0, False: 0]
  ------------------
 2940|      0|          size_t hash = PolicyTraits::apply(
 2941|      0|              HashElement{hash_ref()}, PolicyTraits::element(old_slots + i));
 2942|      0|          auto target = find_first_non_full(common(), hash);
 2943|      0|          size_t new_i = target.offset;
 2944|      0|          total_probe_length += target.probe_length;
 2945|      0|          SetCtrl(common(), new_i, H2(hash), sizeof(slot_type));
 2946|      0|          transfer(new_slots + new_i, old_slots + i);
 2947|      0|        }
 2948|      0|      }
 2949|      0|      infoz().RecordRehash(total_probe_length);
 2950|      0|    }
 2951|      2|    resize_helper.DeallocateOld<alignof(slot_type)>(
 2952|      2|        CharAlloc(alloc_ref()), sizeof(slot_type),
 2953|      2|        const_cast<std::remove_const_t<slot_type>*>(old_slots));
 2954|      2|  }
_ZN4absl12lts_2024011618container_internal19HashSetResizeHelper23GrowSizeIntoSingleGroupINS1_18hash_policy_traitsINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEENS6_10unique_ptrIN6google8protobuf10FeatureSetENS6_14default_deleteISG_EEEEEEvEENSA_INS6_4pairIKSC_SJ_EEEEEEvRNS1_12CommonFieldsERT0_PNT_9slot_typeE:
 1655|      2|                               typename PolicyTraits::slot_type* old_slots) {
 1656|      2|    assert(old_capacity_ < Group::kWidth / 2);
 1657|      2|    assert(IsGrowingIntoSingleGroupApplicable(old_capacity_, c.capacity()));
 1658|      2|    using slot_type = typename PolicyTraits::slot_type;
 1659|      2|    assert(is_single_group(c.capacity()));
 1660|       |
 1661|      2|    auto* new_slots = reinterpret_cast<slot_type*>(c.slot_array());
 1662|       |
 1663|      2|    size_t shuffle_bit = old_capacity_ / 2 + 1;
 1664|      6|    for (size_t i = 0; i < old_capacity_; ++i) {
  ------------------
  |  Branch (1664:24): [True: 4, False: 2]
  ------------------
 1665|      4|      if (IsFull(old_ctrl_[i])) {
  ------------------
  |  Branch (1665:11): [True: 4, False: 0]
  ------------------
 1666|      4|        size_t new_i = i ^ shuffle_bit;
 1667|      4|        SanitizerUnpoisonMemoryRegion(new_slots + new_i, sizeof(slot_type));
 1668|      4|        PolicyTraits::transfer(&alloc_ref, new_slots + new_i, old_slots + i);
 1669|      4|      }
 1670|      4|    }
 1671|      2|    PoisonSingleGroupEmptySlots(c, sizeof(slot_type));
 1672|      2|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE11growth_leftEv:
 3181|      8|  size_t growth_left() const { return common().growth_left(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE28rehash_and_grow_if_necessaryEv:
 2970|      3|  void rehash_and_grow_if_necessary() {
 2971|      3|    const size_t cap = capacity();
 2972|      3|    if (cap > Group::kWidth &&
  ------------------
  |  Branch (2972:9): [True: 0, False: 3]
  ------------------
 2973|       |        // Do these calculations in 64-bit to avoid overflow.
 2974|      0|        size() * uint64_t{32} <= cap * uint64_t{25}) {
  ------------------
  |  Branch (2974:9): [True: 0, False: 0]
  ------------------
 2975|       |      // Squash DELETED without growing if there is enough capacity.
 2976|       |      //
 2977|       |      // Rehash in place if the current size is <= 25/32 of capacity.
 2978|       |      // Rationale for such a high factor: 1) drop_deletes_without_resize() is
 2979|       |      // faster than resize, and 2) it takes quite a bit of work to add
 2980|       |      // tombstones.  In the worst case, seems to take approximately 4
 2981|       |      // insert/erase pairs to create a single tombstone and so if we are
 2982|       |      // rehashing because of tombstones, we can afford to rehash-in-place as
 2983|       |      // long as we are reclaiming at least 1/8 the capacity without doing more
 2984|       |      // than 2X the work.  (Where "work" is defined to be size() for rehashing
 2985|       |      // or rehashing in place, and 1 for an insert or erase.)  But rehashing in
 2986|       |      // place is faster per operation than inserting or even doubling the size
 2987|       |      // of the table, so we actually afford to reclaim even less space from a
 2988|       |      // resize-in-place.  The decision is to rehash in place if we can reclaim
 2989|       |      // at about 1/8th of the usable capacity (specifically 3/28 of the
 2990|       |      // capacity) which means that the total cost of rehashing will be a small
 2991|       |      // fraction of the total work.
 2992|       |      //
 2993|       |      // Here is output of an experiment using the BM_CacheInSteadyState
 2994|       |      // benchmark running the old case (where we rehash-in-place only if we can
 2995|       |      // reclaim at least 7/16*capacity) vs. this code (which rehashes in place
 2996|       |      // if we can recover 3/32*capacity).
 2997|       |      //
 2998|       |      // Note that although in the worst-case number of rehashes jumped up from
 2999|       |      // 15 to 190, but the number of operations per second is almost the same.
 3000|       |      //
 3001|       |      // Abridged output of running BM_CacheInSteadyState benchmark from
 3002|       |      // raw_hash_set_benchmark.   N is the number of insert/erase operations.
 3003|       |      //
 3004|       |      //      | OLD (recover >= 7/16        | NEW (recover >= 3/32)
 3005|       |      // size |    N/s LoadFactor NRehashes |    N/s LoadFactor NRehashes
 3006|       |      //  448 | 145284       0.44        18 | 140118       0.44        19
 3007|       |      //  493 | 152546       0.24        11 | 151417       0.48        28
 3008|       |      //  538 | 151439       0.26        11 | 151152       0.53        38
 3009|       |      //  583 | 151765       0.28        11 | 150572       0.57        50
 3010|       |      //  628 | 150241       0.31        11 | 150853       0.61        66
 3011|       |      //  672 | 149602       0.33        12 | 150110       0.66        90
 3012|       |      //  717 | 149998       0.35        12 | 149531       0.70       129
 3013|       |      //  762 | 149836       0.37        13 | 148559       0.74       190
 3014|       |      //  807 | 149736       0.39        14 | 151107       0.39        14
 3015|       |      //  852 | 150204       0.42        15 | 151019       0.42        15
 3016|      0|      drop_deletes_without_resize();
 3017|      3|    } else {
 3018|       |      // Otherwise grow the container.
 3019|      3|      resize(NextCapacity(cap));
 3020|      3|    }
 3021|      3|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE15set_growth_leftEm:
 3182|      4|  void set_growth_left(size_t gl) { return common().set_growth_left(gl); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE10emplace_atIJRKNS4_21piecewise_construct_tENS4_5tupleIJOSA_EEENSU_IJEEEEEEvmDpOT_:
 3151|      4|  void emplace_at(size_t i, Args&&... args) {
 3152|      4|    construct(slot_array() + i, std::forward<Args>(args)...);
 3153|       |
 3154|       |    assert(PolicyTraits::apply(FindElement{*this}, *iterator_at(i)) ==
 3155|      4|               iterator_at(i) &&
 3156|      4|           "constructed value does not match the lookup key");
 3157|      4|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE9constructIJRKNS4_21piecewise_construct_tENS4_5tupleIJOSA_EEENSU_IJEEEEEEvPNS1_13map_slot_typeISA_SH_EEDpOT_:
 2851|      4|  inline void construct(slot_type* slot, Args&&... args) {
 2852|      4|    PolicyTraits::construct(&alloc_ref(), slot, std::forward<Args>(args)...);
 2853|      4|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE11iterator_atEm:
 3159|    239|  iterator iterator_at(size_t i) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3160|    239|    return {control() + i, slot_array() + i, common().generation_ptr()};
 3161|    239|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS4_10unique_ptrIN6google8protobuf10FeatureSetENS4_14default_deleteISE_EEEEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SH_EEEEE8iteratorC2EPNS1_6ctrl_tEPNS1_13map_slot_typeISA_SH_EEPKh:
 1984|    239|        : HashSetIteratorGenerationInfo(generation_ptr),
 1985|    239|          ctrl_(ctrl),
 1986|    239|          slot_(slot) {
 1987|       |      // This assumption helps the compiler know that any non-end iterator is
 1988|       |      // not equal to any end iterator.
 1989|    239|      ABSL_ASSUME(ctrl != nullptr);
  ------------------
  |  |  259|    239|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 1990|    239|    }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEbEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_bEEEEEC2Ev:
 2088|      2|      std::is_nothrow_default_constructible<allocator_type>::value) {}
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE8containsINS0_11string_viewEEEbRKT_:
 2724|      4|  bool contains(const key_arg<K>& key) const {
 2725|       |    // Here neither the iterator returned by `find()` nor `end()` can be invalid
 2726|       |    // outside of potential thread-safety issues.
 2727|       |    // `find()`'s return value is constructed, used, and then destructed
 2728|       |    // all in this context.
 2729|      4|    return !find(key).unchecked_equals(end());
 2730|      4|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE4findINS0_11string_viewEEENSF_14const_iteratorERKT_:
 2718|      4|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2719|      4|    prefetch_heap_block();
 2720|      4|    return find(key, hash_ref()(key));
 2721|      4|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE4findINS0_11string_viewEEENSF_14const_iteratorERKT_m:
 2713|      4|                      size_t hash) const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2714|      4|    return const_cast<raw_hash_set*>(this)->find(key, hash);
 2715|      4|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE14const_iteratorC2ENSF_8iteratorE:
 2047|     16|    const_iterator(iterator i) : inner_(std::move(i)) {}  // NOLINT
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE8hash_refEv:
 3203|      8|  const hasher& hash_ref() const { return settings_.template get<1>(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE14const_iterator16unchecked_equalsERKSG_:
 2075|      8|    bool unchecked_equals(const const_iterator& b) {
 2076|      8|      return inner_.unchecked_equals(b.inner_);
 2077|      8|    }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE8iterator16unchecked_equalsERKSG_:
 2025|      8|    bool unchecked_equals(const iterator& b) { return ctrl_ == b.control(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE8iterator7controlEv:
 2009|      8|    ctrl_t* control() const { return ctrl_; }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE3endEv:
 2278|      8|  const_iterator end() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2279|      8|    return iterator(common().generation_ptr());
 2280|      8|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE8containsISA_EEbRKT_:
 2724|      4|  bool contains(const key_arg<K>& key) const {
 2725|       |    // Here neither the iterator returned by `find()` nor `end()` can be invalid
 2726|       |    // outside of potential thread-safety issues.
 2727|       |    // `find()`'s return value is constructed, used, and then destructed
 2728|       |    // all in this context.
 2729|      4|    return !find(key).unchecked_equals(end());
 2730|      4|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE4findISA_EENSF_14const_iteratorERKT_:
 2718|      4|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2719|      4|    prefetch_heap_block();
 2720|      4|    return find(key, hash_ref()(key));
 2721|      4|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE4findISA_EENSF_14const_iteratorERKT_m:
 2713|      4|                      size_t hash) const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2714|      4|    return const_cast<raw_hash_set*>(this)->find(key, hash);
 2715|      4|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_10StringHashENS1_8StringEqENS8_ISA_EEE4findISA_EENSF_8iteratorERKT_m:
 2688|      4|                size_t hash) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2689|      4|    auto seq = probe(common(), hash);
 2690|      4|    slot_type* slot_ptr = slot_array();
 2691|      4|    const ctrl_t* ctrl = control();
 2692|      4|    while (true) {
  ------------------
  |  Branch (2692:12): [True: 4, Folded]
  ------------------
 2693|      4|      Group g{ctrl + seq.offset()};
 2694|      4|      for (uint32_t i : g.Match(H2(hash))) {
  ------------------
  |  Branch (2694:23): [True: 0, False: 4]
  ------------------
 2695|      0|        if (ABSL_PREDICT_TRUE(PolicyTraits::apply(
  ------------------
  |  |  179|      0|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 0, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 0]
  |  |  |  Branch (179:57): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2696|      0|                EqualElement<K>{key, eq_ref()},
 2697|      0|                PolicyTraits::element(slot_ptr + seq.offset(i)))))
 2698|      0|          return iterator_at(seq.offset(i));
 2699|      0|      }
 2700|      4|      if (ABSL_PREDICT_TRUE(g.MaskEmpty())) return end();
  ------------------
  |  |  179|      4|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 4, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 4]
  |  |  |  Branch (179:57): [True: 4, False: 0]
  |  |  ------------------
  ------------------
 2701|      0|      seq.next();
 2702|       |      assert(seq.index() <= capacity() && "full table!");
 2703|      0|    }
 2704|      4|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEEC2Ev:
 2088|      8|      std::is_nothrow_default_constructible<allocator_type>::value) {}
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorENS5_17DescriptorBuilder12MessageHintsEEENS1_6HashEqIS8_vE4HashENSD_2EqENSt3__19allocatorINSG_4pairIKS8_SA_EEEEEC2Ev:
 2088|      4|      std::is_nothrow_default_constructible<allocator_type>::value) {}
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE19prefetch_heap_blockEv:
 3187|    104|  void prefetch_heap_block() const {
 3188|    104|#if ABSL_HAVE_BUILTIN(__builtin_prefetch) || defined(__GNUC__)
 3189|    104|    __builtin_prefetch(control(), 0, 1);
 3190|    104|#endif
 3191|    104|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE8hash_refEv:
 3202|    103|  hasher& hash_ref() { return settings_.template get<1>(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE4sizeEv:
 2287|      4|  size_t size() const { return common().size(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE8containsIS8_EEbRKT_:
 2724|      1|  bool contains(const key_arg<K>& key) const {
 2725|       |    // Here neither the iterator returned by `find()` nor `end()` can be invalid
 2726|       |    // outside of potential thread-safety issues.
 2727|       |    // `find()`'s return value is constructed, used, and then destructed
 2728|       |    // all in this context.
 2729|      1|    return !find(key).unchecked_equals(end());
 2730|      1|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE4findIS8_EENSH_14const_iteratorERKT_:
 2718|      1|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2719|      1|    prefetch_heap_block();
 2720|      1|    return find(key, hash_ref()(key));
 2721|      1|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE4findIS8_EENSH_14const_iteratorERKT_m:
 2713|      1|                      size_t hash) const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2714|      1|    return const_cast<raw_hash_set*>(this)->find(key, hash);
 2715|      1|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE4findIS8_EENSH_8iteratorERKT_m:
 2688|    104|                size_t hash) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2689|    104|    auto seq = probe(common(), hash);
 2690|    104|    slot_type* slot_ptr = slot_array();
 2691|    104|    const ctrl_t* ctrl = control();
 2692|    104|    while (true) {
  ------------------
  |  Branch (2692:12): [True: 104, Folded]
  ------------------
 2693|    104|      Group g{ctrl + seq.offset()};
 2694|    104|      for (uint32_t i : g.Match(H2(hash))) {
  ------------------
  |  Branch (2694:23): [True: 0, False: 104]
  ------------------
 2695|      0|        if (ABSL_PREDICT_TRUE(PolicyTraits::apply(
  ------------------
  |  |  179|      0|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 0, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 0]
  |  |  |  Branch (179:57): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2696|      0|                EqualElement<K>{key, eq_ref()},
 2697|      0|                PolicyTraits::element(slot_ptr + seq.offset(i)))))
 2698|      0|          return iterator_at(seq.offset(i));
 2699|      0|      }
 2700|    104|      if (ABSL_PREDICT_TRUE(g.MaskEmpty())) return end();
  ------------------
  |  |  179|    104|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 104, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 104]
  |  |  |  Branch (179:57): [True: 104, False: 0]
  |  |  ------------------
  ------------------
 2701|      0|      seq.next();
 2702|       |      assert(seq.index() <= capacity() && "full table!");
 2703|      0|    }
 2704|    104|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE14const_iteratorC2ENSH_8iteratorE:
 2047|      2|    const_iterator(iterator i) : inner_(std::move(i)) {}  // NOLINT
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE8hash_refEv:
 3203|      1|  const hasher& hash_ref() const { return settings_.template get<1>(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE14const_iterator16unchecked_equalsERKSI_:
 2075|      1|    bool unchecked_equals(const const_iterator& b) {
 2076|      1|      return inner_.unchecked_equals(b.inner_);
 2077|      1|    }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE8iterator16unchecked_equalsERKSI_:
 2025|      1|    bool unchecked_equals(const iterator& b) { return ctrl_ == b.control(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE8iterator7controlEv:
 2009|      1|    ctrl_t* control() const { return ctrl_; }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE3endEv:
 2278|      1|  const_iterator end() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2279|      1|    return iterator(common().generation_ptr());
 2280|      1|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE8iteratorC2EPKh:
 1993|    208|        : HashSetIteratorGenerationInfo(generation_ptr), ctrl_(nullptr) {}
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE5eraseIS8_EEmRKT_:
 2516|    103|  size_type erase(const key_arg<K>& key) {
 2517|    103|    auto it = find(key);
 2518|    103|    if (it == end()) return 0;
  ------------------
  |  Branch (2518:9): [True: 103, False: 0]
  ------------------
 2519|      0|    erase(it);
 2520|      0|    return 1;
 2521|    103|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE4findIS8_EENSH_8iteratorERKT_:
 2706|    103|  iterator find(const key_arg<K>& key) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2707|    103|    prefetch_heap_block();
 2708|    103|    return find(key, hash_ref()(key));
 2709|    103|  }
_ZN4absl12lts_2024011618container_internaleqERKNS1_12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE8iteratorESK_:
 1970|    103|    friend bool operator==(const iterator& a, const iterator& b) {
 1971|    103|      AssertIsValidForComparison(a.ctrl_, a.generation(), a.generation_ptr());
 1972|    103|      AssertIsValidForComparison(b.ctrl_, b.generation(), b.generation_ptr());
 1973|    103|      AssertSameContainer(a.ctrl_, b.ctrl_, a.slot_, b.slot_,
 1974|    103|                          a.generation_ptr(), b.generation_ptr());
 1975|    103|      return a.ctrl_ == b.ctrl_;
 1976|    103|    }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE3endEv:
 2271|    207|  iterator end() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2272|    207|    return iterator(common().generation_ptr());
 2273|    207|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEEC2Ev:
 2088|     75|      std::is_nothrow_default_constructible<allocator_type>::value) {}
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE5clearEv:
 2291|      8|  ABSL_ATTRIBUTE_REINITIALIZES void clear() {
 2292|       |    // Iterating over this container is O(bucket_count()). When bucket_count()
 2293|       |    // is much greater than size(), iteration becomes prohibitively expensive.
 2294|       |    // For clear() it is more important to reuse the allocated array when the
 2295|       |    // container is small because allocation takes comparatively long time
 2296|       |    // compared to destruction of the elements of the container. So we pick the
 2297|       |    // largest bucket_count() threshold for which iteration is still fast and
 2298|       |    // past that we simply deallocate the array.
 2299|      8|    const size_t cap = capacity();
 2300|      8|    if (cap == 0) {
  ------------------
  |  Branch (2300:9): [True: 8, False: 0]
  ------------------
 2301|       |      // Already guaranteed to be empty; so nothing to do.
 2302|      8|    } else {
 2303|      0|      destroy_slots();
 2304|      0|      ClearBackingArray(common(), GetPolicyFunctions(), /*reuse=*/cap < 128);
 2305|      0|    }
 2306|      8|    common().set_reserved_growth(0);
 2307|      8|    common().set_reservation_size(0);
 2308|      8|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIiEENS0_13hash_internal4HashIiEENSt3__18equal_toIiEENS8_9allocatorIiEEEC2Ev:
 2088|      4|      std::is_nothrow_default_constructible<allocator_type>::value) {}
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE6insertINS8_12basic_stringIcNS8_11char_traitsIcEENS9_IcEEEETnNS8_9enable_ifIXsr4absl11disjunctionINS8_14is_convertibleIRKT_S4_EENSB_22SameAsElementReferenceISM_EEEE5valueEiE4typeELi0ETnNSI_IXsr14IsDecomposableISM_EE5valueEiE4typeELi0EEENS8_4pairINSB_8iteratorEbEESM_:
 2339|      3|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2340|      3|    return emplace(value);
 2341|      3|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE7emplaceIJRKNS8_12basic_stringIcNS8_11char_traitsIcEENS9_IcEEEEETnNS8_9enable_ifIXsr14IsDecomposableIDpT_EE5valueEiE4typeELi0EEENS8_4pairINSB_8iteratorEbEEDpOSL_:
 2422|      3|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2423|      3|    return PolicyTraits::apply(EmplaceDecomposable{*this},
 2424|      3|                               std::forward<Args>(args)...);
 2425|      3|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE19EmplaceDecomposableclINS8_12basic_stringIcNS8_11char_traitsIcEENS9_IcEEEEJRKSI_EEENS8_4pairINSB_8iteratorEbEERKT_DpOT0_:
 2822|      3|    std::pair<iterator, bool> operator()(const K& key, Args&&... args) const {
 2823|      3|      auto res = s.find_or_prepare_insert(key);
 2824|      3|      if (res.second) {
  ------------------
  |  Branch (2824:11): [True: 3, False: 0]
  ------------------
 2825|      3|        s.emplace_at(res.first, std::forward<Args>(args)...);
 2826|      3|      }
 2827|      3|      return {s.iterator_at(res.first), res.second};
 2828|      3|    }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE22find_or_prepare_insertINS8_12basic_stringIcNS8_11char_traitsIcEENS9_IcEEEEEENS8_4pairImbEERKT_:
 3086|      3|  std::pair<size_t, bool> find_or_prepare_insert(const K& key) {
 3087|      3|    prefetch_heap_block();
 3088|      3|    auto hash = hash_ref()(key);
 3089|      3|    auto seq = probe(common(), hash);
 3090|      3|    const ctrl_t* ctrl = control();
 3091|      3|    while (true) {
  ------------------
  |  Branch (3091:12): [True: 3, Folded]
  ------------------
 3092|      3|      Group g{ctrl + seq.offset()};
 3093|      3|      for (uint32_t i : g.Match(H2(hash))) {
  ------------------
  |  Branch (3093:23): [True: 0, False: 3]
  ------------------
 3094|      0|        if (ABSL_PREDICT_TRUE(PolicyTraits::apply(
  ------------------
  |  |  179|      0|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 0, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 0]
  |  |  |  Branch (179:57): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3095|      0|                EqualElement<K>{key, eq_ref()},
 3096|      0|                PolicyTraits::element(slot_array() + seq.offset(i)))))
 3097|      0|          return {seq.offset(i), false};
 3098|      0|      }
 3099|      3|      if (ABSL_PREDICT_TRUE(g.MaskEmpty())) break;
  ------------------
  |  |  179|      3|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 3, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 3]
  |  |  |  Branch (179:57): [True: 3, False: 0]
  |  |  ------------------
  ------------------
 3100|      0|      seq.next();
 3101|      0|      assert(seq.index() <= capacity() && "full table!");
 3102|      0|    }
 3103|      3|    return {prepare_insert(hash), true};
 3104|      3|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE10emplace_atIJRKNS8_12basic_stringIcNS8_11char_traitsIcEENS9_IcEEEEEEEvmDpOT_:
 3151|      3|  void emplace_at(size_t i, Args&&... args) {
 3152|      3|    construct(slot_array() + i, std::forward<Args>(args)...);
 3153|       |
 3154|       |    assert(PolicyTraits::apply(FindElement{*this}, *iterator_at(i)) ==
 3155|      3|               iterator_at(i) &&
 3156|      3|           "constructed value does not match the lookup key");
 3157|      3|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE9constructIJRKNS8_12basic_stringIcNS8_11char_traitsIcEENS9_IcEEEEEEEvPS4_DpOT_:
 2851|      3|  inline void construct(slot_type* slot, Args&&... args) {
 2852|      3|    PolicyTraits::construct(&alloc_ref(), slot, std::forward<Args>(args)...);
 2853|      3|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorENS5_17DescriptorBuilder12MessageHintsEEENS1_6HashEqIS8_vE4HashENSD_2EqENSt3__19allocatorINSG_4pairIKS8_SA_EEEEE5emptyEv:
 2286|      4|  bool empty() const { return !size(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorENS5_17DescriptorBuilder12MessageHintsEEENS1_6HashEqIS8_vE4HashENSD_2EqENSt3__19allocatorINSG_4pairIKS8_SA_EEEEE4sizeEv:
 2287|      4|  size_t size() const { return common().size(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf14FileDescriptorEEENS1_6HashEqIS8_vE4HashENSB_2EqENSt3__19allocatorIS8_EEE5emptyEv:
 2286|      4|  bool empty() const { return !size(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE4findISA_EENSM_8iteratorERKT_:
 2706|     47|  iterator find(const key_arg<K>& key) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2707|     47|    prefetch_heap_block();
 2708|     47|    return find(key, hash_ref()(key));
 2709|     47|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE4findISA_EENSM_8iteratorERKT_m:
 2688|     47|                size_t hash) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2689|     47|    auto seq = probe(common(), hash);
 2690|     47|    slot_type* slot_ptr = slot_array();
 2691|     47|    const ctrl_t* ctrl = control();
 2692|     47|    while (true) {
  ------------------
  |  Branch (2692:12): [True: 47, Folded]
  ------------------
 2693|     47|      Group g{ctrl + seq.offset()};
 2694|     47|      for (uint32_t i : g.Match(H2(hash))) {
  ------------------
  |  Branch (2694:23): [True: 4, False: 46]
  ------------------
 2695|      4|        if (ABSL_PREDICT_TRUE(PolicyTraits::apply(
  ------------------
  |  |  179|      4|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 1, False: 3]
  |  |  |  Branch (179:48): [Folded, False: 4]
  |  |  |  Branch (179:57): [True: 1, False: 3]
  |  |  ------------------
  ------------------
 2696|      4|                EqualElement<K>{key, eq_ref()},
 2697|      4|                PolicyTraits::element(slot_ptr + seq.offset(i)))))
 2698|      1|          return iterator_at(seq.offset(i));
 2699|      4|      }
 2700|     46|      if (ABSL_PREDICT_TRUE(g.MaskEmpty())) return end();
  ------------------
  |  |  179|     46|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 46, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 46]
  |  |  |  Branch (179:57): [True: 46, False: 0]
  |  |  ------------------
  ------------------
 2701|      0|      seq.next();
 2702|       |      assert(seq.index() <= capacity() && "full table!");
 2703|      0|    }
 2704|     47|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE3endEv:
 2271|     93|  iterator end() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2272|     93|    return iterator(common().generation_ptr());
 2273|     93|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE8iteratorC2EPKh:
 1993|     93|        : HashSetIteratorGenerationInfo(generation_ptr), ctrl_(nullptr) {}
_ZN4absl12lts_2024011618container_internalneERKNS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE8iteratorESP_:
 1977|     47|    friend bool operator!=(const iterator& a, const iterator& b) {
 1978|     47|      return !(a == b);
 1979|     47|    }
_ZN4absl12lts_2024011618container_internaleqERKNS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE8iteratorESP_:
 1970|     47|    friend bool operator==(const iterator& a, const iterator& b) {
 1971|     47|      AssertIsValidForComparison(a.ctrl_, a.generation(), a.generation_ptr());
 1972|     47|      AssertIsValidForComparison(b.ctrl_, b.generation(), b.generation_ptr());
 1973|     47|      AssertSameContainer(a.ctrl_, b.ctrl_, a.slot_, b.slot_,
 1974|     47|                          a.generation_ptr(), b.generation_ptr());
 1975|     47|      return a.ctrl_ == b.ctrl_;
 1976|     47|    }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE8iteratorptEv:
 1950|      1|    pointer operator->() const {
 1951|      1|      AssertIsFull(ctrl_, generation(), generation_ptr(), "operator->");
 1952|      1|      return &operator*();
 1953|      1|    }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE8iteratordeEv:
 1944|      1|    reference operator*() const {
 1945|      1|      AssertIsFull(ctrl_, generation(), generation_ptr(), "operator*()");
 1946|      1|      return unchecked_deref();
 1947|      1|    }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEENS1_10StringHashENS1_8StringEqENS8_INS4_4pairIKSA_SE_EEEEE8iterator15unchecked_derefEv:
 2029|      1|    reference unchecked_deref() const { return PolicyTraits::element(slot_); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE8containsINS8_12basic_stringIcNS8_11char_traitsIcEENS9_IcEEEEEEbRKT_:
 2724|    424|  bool contains(const key_arg<K>& key) const {
 2725|       |    // Here neither the iterator returned by `find()` nor `end()` can be invalid
 2726|       |    // outside of potential thread-safety issues.
 2727|       |    // `find()`'s return value is constructed, used, and then destructed
 2728|       |    // all in this context.
 2729|    424|    return !find(key).unchecked_equals(end());
 2730|    424|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE4findINS8_12basic_stringIcNS8_11char_traitsIcEENS9_IcEEEEEENSB_14const_iteratorERKT_:
 2718|    424|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2719|    424|    prefetch_heap_block();
 2720|    424|    return find(key, hash_ref()(key));
 2721|    424|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE4findINS8_12basic_stringIcNS8_11char_traitsIcEENS9_IcEEEEEENSB_14const_iteratorERKT_m:
 2713|    424|                      size_t hash) const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2714|    424|    return const_cast<raw_hash_set*>(this)->find(key, hash);
 2715|    424|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyINS0_11string_viewEEENS1_10StringHashENS1_8StringEqENSt3__19allocatorIS4_EEE4findINS8_12basic_stringIcNS8_11char_traitsIcEENS9_IcEEEEEENSB_8iteratorERKT_m:
 2688|    424|                size_t hash) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2689|    424|    auto seq = probe(common(), hash);
 2690|    424|    slot_type* slot_ptr = slot_array();
 2691|    424|    const ctrl_t* ctrl = control();
 2692|    424|    while (true) {
  ------------------
  |  Branch (2692:12): [True: 424, Folded]
  ------------------
 2693|    424|      Group g{ctrl + seq.offset()};
 2694|    424|      for (uint32_t i : g.Match(H2(hash))) {
  ------------------
  |  Branch (2694:23): [True: 0, False: 424]
  ------------------
 2695|      0|        if (ABSL_PREDICT_TRUE(PolicyTraits::apply(
  ------------------
  |  |  179|      0|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 0, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 0]
  |  |  |  Branch (179:57): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2696|      0|                EqualElement<K>{key, eq_ref()},
 2697|      0|                PolicyTraits::element(slot_ptr + seq.offset(i)))))
 2698|      0|          return iterator_at(seq.offset(i));
 2699|      0|      }
 2700|    424|      if (ABSL_PREDICT_TRUE(g.MaskEmpty())) return end();
  ------------------
  |  |  179|    424|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 424, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 424]
  |  |  |  Branch (179:57): [True: 424, False: 0]
  |  |  ------------------
  ------------------
 2701|      0|      seq.next();
 2702|       |      assert(seq.index() <= capacity() && "full table!");
 2703|      0|    }
 2704|    424|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__16vectorIiNS4_9allocatorIiEEEES8_EENS0_13hash_internal4HashIS8_EENS4_8equal_toIS8_EENS6_INS4_4pairIKS8_S8_EEEEEC2Ev:
 2088|      4|      std::is_nothrow_default_constructible<allocator_type>::value) {}
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__16vectorIiNS4_9allocatorIiEEEEiEENS0_13hash_internal4HashIS8_EENS4_8equal_toIS8_EENS6_INS4_4pairIKS8_iEEEEEC2Ev:
 2088|      4|      std::is_nothrow_default_constructible<allocator_type>::value) {}
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorEPKNS5_21DynamicMessageFactory8TypeInfoEEENS1_6HashEqIS8_vE4HashENSF_2EqENSt3__19allocatorINSI_4pairIKS8_SC_EEEEED2Ev:
 2264|      4|  ~raw_hash_set() { destructor_impl(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorEPKNS5_21DynamicMessageFactory8TypeInfoEEENS1_6HashEqIS8_vE4HashENSF_2EqENSt3__19allocatorINSI_4pairIKS8_SC_EEEEE15destructor_implEv:
 2882|      4|  inline void destructor_impl() {
 2883|      4|    if (capacity() == 0) return;
  ------------------
  |  Branch (2883:9): [True: 4, False: 0]
  ------------------
 2884|      0|    destroy_slots();
 2885|      0|    dealloc();
 2886|      0|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorEPKNS5_21DynamicMessageFactory8TypeInfoEEENS1_6HashEqIS8_vE4HashENSF_2EqENSt3__19allocatorINSI_4pairIKS8_SC_EEEEE8capacityEv:
 2288|      4|  size_t capacity() const { return common().capacity(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorEPKNS5_21DynamicMessageFactory8TypeInfoEEENS1_6HashEqIS8_vE4HashENSF_2EqENSt3__19allocatorINSI_4pairIKS8_SC_EEEEE6commonEv:
 3194|     12|  const CommonFields& common() const { return settings_.template get<0>(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorEPKNS5_21DynamicMessageFactory8TypeInfoEEENS1_6HashEqIS8_vE4HashENSF_2EqENSt3__19allocatorINSI_4pairIKS8_SC_EEEEE7controlEv:
 3196|      4|  ctrl_t* control() const { return common().control(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorEPKNS5_21DynamicMessageFactory8TypeInfoEEENS1_6HashEqIS8_vE4HashENSF_2EqENSt3__19allocatorINSI_4pairIKS8_SC_EEEEE10slot_arrayEv:
 3197|      4|  slot_type* slot_array() const {
 3198|      4|    return static_cast<slot_type*>(common().slot_array());
 3199|      4|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorEPKNS5_21DynamicMessageFactory8TypeInfoEEENS1_6HashEqIS8_vE4HashENSF_2EqENSt3__19allocatorINSI_4pairIKS8_SC_EEEEE6commonEv:
 3193|      8|  CommonFields& common() { return settings_.template get<0>(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorEPKNS5_21DynamicMessageFactory8TypeInfoEEENS1_6HashEqIS8_vE4HashENSF_2EqENSt3__19allocatorINSI_4pairIKS8_SC_EEEEEC2Ev:
 2088|      6|      std::is_nothrow_default_constructible<allocator_type>::value) {}
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorEPKNS5_21DynamicMessageFactory8TypeInfoEEENS1_6HashEqIS8_vE4HashENSF_2EqENSt3__19allocatorINSI_4pairIKS8_SC_EEEEE5beginEv:
 2266|      4|  iterator begin() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2267|      4|    auto it = iterator_at(0);
 2268|      4|    it.skip_empty_or_deleted();
 2269|      4|    return it;
 2270|      4|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorEPKNS5_21DynamicMessageFactory8TypeInfoEEENS1_6HashEqIS8_vE4HashENSF_2EqENSt3__19allocatorINSI_4pairIKS8_SC_EEEEE11iterator_atEm:
 3159|      4|  iterator iterator_at(size_t i) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3160|      4|    return {control() + i, slot_array() + i, common().generation_ptr()};
 3161|      4|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorEPKNS5_21DynamicMessageFactory8TypeInfoEEENS1_6HashEqIS8_vE4HashENSF_2EqENSt3__19allocatorINSI_4pairIKS8_SC_EEEEE8iteratorC2EPNS1_6ctrl_tEPNS1_13map_slot_typeIS8_SC_EEPKh:
 1984|      4|        : HashSetIteratorGenerationInfo(generation_ptr),
 1985|      4|          ctrl_(ctrl),
 1986|      4|          slot_(slot) {
 1987|       |      // This assumption helps the compiler know that any non-end iterator is
 1988|       |      // not equal to any end iterator.
 1989|      4|      ABSL_ASSUME(ctrl != nullptr);
  ------------------
  |  |  259|      4|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 1990|      4|    }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorEPKNS5_21DynamicMessageFactory8TypeInfoEEENS1_6HashEqIS8_vE4HashENSF_2EqENSt3__19allocatorINSI_4pairIKS8_SC_EEEEE8iterator21skip_empty_or_deletedEv:
 1999|      4|    void skip_empty_or_deleted() {
 2000|      4|      while (IsEmptyOrDeleted(*ctrl_)) {
  ------------------
  |  Branch (2000:14): [True: 0, False: 4]
  ------------------
 2001|      0|        uint32_t shift =
 2002|      0|            GroupEmptyOrDeleted{ctrl_}.CountLeadingEmptyOrDeleted();
 2003|      0|        ctrl_ += shift;
 2004|      0|        slot_ += shift;
 2005|      0|      }
 2006|      4|      if (ABSL_PREDICT_FALSE(*ctrl_ == ctrl_t::kSentinel)) ctrl_ = nullptr;
  ------------------
  |  |  178|      4|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 4, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 4]
  |  |  |  Branch (178:58): [True: 4, False: 0]
  |  |  ------------------
  ------------------
 2007|      4|    }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorEPKNS5_21DynamicMessageFactory8TypeInfoEEENS1_6HashEqIS8_vE4HashENSF_2EqENSt3__19allocatorINSI_4pairIKS8_SC_EEEEE3endEv:
 2271|      4|  iterator end() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2272|      4|    return iterator(common().generation_ptr());
 2273|      4|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorEPKNS5_21DynamicMessageFactory8TypeInfoEEENS1_6HashEqIS8_vE4HashENSF_2EqENSt3__19allocatorINSI_4pairIKS8_SC_EEEEE8iteratorC2EPKh:
 1993|      4|        : HashSetIteratorGenerationInfo(generation_ptr), ctrl_(nullptr) {}
_ZN4absl12lts_2024011618container_internalneERKNS1_12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorEPKNS5_21DynamicMessageFactory8TypeInfoEEENS1_6HashEqIS8_vE4HashENSF_2EqENSt3__19allocatorINSI_4pairIKS8_SC_EEEEE8iteratorESR_:
 1977|      4|    friend bool operator!=(const iterator& a, const iterator& b) {
 1978|      4|      return !(a == b);
 1979|      4|    }
_ZN4absl12lts_2024011618container_internaleqERKNS1_12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorEPKNS5_21DynamicMessageFactory8TypeInfoEEENS1_6HashEqIS8_vE4HashENSF_2EqENSt3__19allocatorINSI_4pairIKS8_SC_EEEEE8iteratorESR_:
 1970|      4|    friend bool operator==(const iterator& a, const iterator& b) {
 1971|      4|      AssertIsValidForComparison(a.ctrl_, a.generation(), a.generation_ptr());
 1972|      4|      AssertIsValidForComparison(b.ctrl_, b.generation(), b.generation_ptr());
 1973|      4|      AssertSameContainer(a.ctrl_, b.ctrl_, a.slot_, b.slot_,
 1974|      4|                          a.generation_ptr(), b.generation_ptr());
 1975|      4|      return a.ctrl_ == b.ctrl_;
 1976|      4|    }
message.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE8capacityEv:
 2288|     10|  size_t capacity() const { return common().capacity(); }
message.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE6commonEv:
 3194|     70|  const CommonFields& common() const { return settings_.template get<0>(); }
message.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE7controlEv:
 3196|     29|  ctrl_t* control() const { return common().control(); }
message.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE10slot_arrayEv:
 3197|     19|  slot_type* slot_array() const {
 3198|     19|    return static_cast<slot_type*>(common().slot_array());
 3199|     19|  }
message.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE9alloc_refEv:
 3206|     17|  allocator_type& alloc_ref() { return settings_.template get<3>(); }
message.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE5infozEv:
 3200|      6|  HashtablezInfoHandle infoz() { return common().infoz(); }
message.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE6commonEv:
 3193|     77|  CommonFields& common() { return settings_.template get<0>(); }
message.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEEC2Ev:
 2088|      2|      std::is_nothrow_default_constructible<allocator_type>::value) {}
message.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyIPKN6google8protobuf10DescriptorENS5_12_GLOBAL__N_123GeneratedMessageFactory10MessagePtrEEENS1_6HashEqIS8_vE4HashENSE_2EqENSt3__19allocatorINSH_4pairIKS8_SB_EEEEEC2Ev:
 2088|      2|      std::is_nothrow_default_constructible<allocator_type>::value) {}
message.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE19prefetch_heap_blockEv:
 3187|      6|  void prefetch_heap_block() const {
 3188|      6|#if ABSL_HAVE_BUILTIN(__builtin_prefetch) || defined(__GNUC__)
 3189|      6|    __builtin_prefetch(control(), 0, 1);
 3190|      6|#endif
 3191|      6|  }
message.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE6eq_refEv:
 3204|      2|  key_equal& eq_ref() { return settings_.template get<2>(); }
message.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE11iterator_atEm:
 3159|      6|  iterator iterator_at(size_t i) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3160|      6|    return {control() + i, slot_array() + i, common().generation_ptr()};
 3161|      6|  }
message.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE8iteratorC2EPNS1_6ctrl_tEPS9_PKh:
 1984|      6|        : HashSetIteratorGenerationInfo(generation_ptr),
 1985|      6|          ctrl_(ctrl),
 1986|      6|          slot_(slot) {
 1987|       |      // This assumption helps the compiler know that any non-end iterator is
 1988|       |      // not equal to any end iterator.
 1989|      6|      ABSL_ASSUME(ctrl != nullptr);
  ------------------
  |  |  259|      6|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 1990|      6|    }
message.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE8hash_refEv:
 3202|      6|  hasher& hash_ref() { return settings_.template get<1>(); }
message.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE6insertIS9_TnNSF_9enable_ifIXsr4absl11disjunctionINSF_14is_convertibleIRKT_S9_EENSI_22SameAsElementReferenceISO_EEEE5valueEiE4typeELi0ETnNSK_IXsr14IsDecomposableISO_EE5valueEiE4typeELi0EEENSF_4pairINSI_8iteratorEbEESO_:
 2339|      6|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2340|      6|    return emplace(value);
 2341|      6|  }
message.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE7emplaceIJRKS9_ETnNSF_9enable_ifIXsr14IsDecomposableIDpT_EE5valueEiE4typeELi0EEENSF_4pairINSI_8iteratorEbEEDpOSN_:
 2422|      6|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2423|      6|    return PolicyTraits::apply(EmplaceDecomposable{*this},
 2424|      6|                               std::forward<Args>(args)...);
 2425|      6|  }
message.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE19EmplaceDecomposableclIS9_JRKS9_EEENSF_4pairINSI_8iteratorEbEERKT_DpOT0_:
 2822|      6|    std::pair<iterator, bool> operator()(const K& key, Args&&... args) const {
 2823|      6|      auto res = s.find_or_prepare_insert(key);
 2824|      6|      if (res.second) {
  ------------------
  |  Branch (2824:11): [True: 6, False: 0]
  ------------------
 2825|      6|        s.emplace_at(res.first, std::forward<Args>(args)...);
 2826|      6|      }
 2827|      6|      return {s.iterator_at(res.first), res.second};
 2828|      6|    }
message.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE22find_or_prepare_insertIS9_EENSF_4pairImbEERKT_:
 3086|      6|  std::pair<size_t, bool> find_or_prepare_insert(const K& key) {
 3087|      6|    prefetch_heap_block();
 3088|      6|    auto hash = hash_ref()(key);
 3089|      6|    auto seq = probe(common(), hash);
 3090|      6|    const ctrl_t* ctrl = control();
 3091|      6|    while (true) {
  ------------------
  |  Branch (3091:12): [True: 6, Folded]
  ------------------
 3092|      6|      Group g{ctrl + seq.offset()};
 3093|      6|      for (uint32_t i : g.Match(H2(hash))) {
  ------------------
  |  Branch (3093:23): [True: 2, False: 6]
  ------------------
 3094|      2|        if (ABSL_PREDICT_TRUE(PolicyTraits::apply(
  ------------------
  |  |  179|      2|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 0, False: 2]
  |  |  |  Branch (179:48): [Folded, False: 2]
  |  |  |  Branch (179:57): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 3095|      2|                EqualElement<K>{key, eq_ref()},
 3096|      2|                PolicyTraits::element(slot_array() + seq.offset(i)))))
 3097|      0|          return {seq.offset(i), false};
 3098|      2|      }
 3099|      6|      if (ABSL_PREDICT_TRUE(g.MaskEmpty())) break;
  ------------------
  |  |  179|      6|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 6, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 6]
  |  |  |  Branch (179:57): [True: 6, False: 0]
  |  |  ------------------
  ------------------
 3100|      0|      seq.next();
 3101|      0|      assert(seq.index() <= capacity() && "full table!");
 3102|      0|    }
 3103|      6|    return {prepare_insert(hash), true};
 3104|      6|  }
message.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE12EqualElementIS9_EclIS9_JRS9_EEEbRKT_DpOT0_:
 2813|      2|    bool operator()(const K2& lhs, Args&&...) const {
 2814|      2|      return eq(lhs, rhs);
 2815|      2|    }
message.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE14prepare_insertEm:
 3110|      6|  size_t prepare_insert(size_t hash) ABSL_ATTRIBUTE_NOINLINE {
 3111|      6|    const bool rehash_for_bug_detection =
 3112|      6|        common().should_rehash_for_bug_detection_on_insert();
 3113|      6|    if (rehash_for_bug_detection) {
  ------------------
  |  Branch (3113:9): [True: 0, False: 6]
  ------------------
 3114|       |      // Move to a different heap allocation in order to detect bugs.
 3115|      0|      const size_t cap = capacity();
 3116|      0|      resize(growth_left() > 0 ? cap : NextCapacity(cap));
  ------------------
  |  Branch (3116:14): [True: 0, False: 0]
  ------------------
 3117|      0|    }
 3118|      6|    auto target = find_first_non_full(common(), hash);
 3119|      6|    if (!rehash_for_bug_detection &&
  ------------------
  |  Branch (3119:9): [True: 6, False: 0]
  ------------------
 3120|      6|        ABSL_PREDICT_FALSE(growth_left() == 0 &&
  ------------------
  |  |  178|     11|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 5, False: 1]
  |  |  |  Branch (178:49): [Folded, False: 6]
  |  |  |  Branch (178:59): [True: 5, False: 1]
  |  |  |  Branch (178:59): [True: 5, False: 0]
  |  |  ------------------
  ------------------
 3121|      6|                           !IsDeleted(control()[target.offset]))) {
 3122|      5|      size_t old_capacity = capacity();
 3123|      5|      rehash_and_grow_if_necessary();
 3124|       |      // NOTE: It is safe to use `FindFirstNonFullAfterResize`.
 3125|       |      // `FindFirstNonFullAfterResize` must be called right after resize.
 3126|       |      // `rehash_and_grow_if_necessary` may *not* call `resize`
 3127|       |      // and perform `drop_deletes_without_resize` instead. But this
 3128|       |      // could happen only on big tables.
 3129|       |      // For big tables `FindFirstNonFullAfterResize` will always
 3130|       |      // fallback to normal `find_first_non_full`, so it is safe to use it.
 3131|      5|      target = HashSetResizeHelper::FindFirstNonFullAfterResize(
 3132|      5|          common(), old_capacity, hash);
 3133|      5|    }
 3134|      6|    common().increment_size();
 3135|      6|    set_growth_left(growth_left() - IsEmpty(control()[target.offset]));
 3136|      6|    SetCtrl(common(), target.offset, H2(hash), sizeof(slot_type));
 3137|      6|    common().maybe_increment_generation_on_insert();
 3138|      6|    infoz().RecordInsert(hash, target.probe_length);
 3139|      6|    return target.offset;
 3140|      6|  }
message.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE6resizeEm:
 2905|      5|  ABSL_ATTRIBUTE_NOINLINE void resize(size_t new_capacity) {
 2906|      5|    assert(IsValidCapacity(new_capacity));
 2907|      5|    HashSetResizeHelper resize_helper(common());
 2908|      5|    auto* old_slots = slot_array();
 2909|      5|    common().set_capacity(new_capacity);
 2910|       |    // Note that `InitializeSlots` does different number initialization steps
 2911|       |    // depending on the values of `transfer_uses_memcpy` and capacities.
 2912|       |    // Refer to the comment in `InitializeSlots` for more details.
 2913|      5|    const bool grow_single_group =
 2914|      5|        resize_helper.InitializeSlots<CharAlloc, sizeof(slot_type),
 2915|      5|                                      PolicyTraits::transfer_uses_memcpy(),
 2916|      5|                                      alignof(slot_type)>(
 2917|      5|            common(), const_cast<std::remove_const_t<slot_type>*>(old_slots),
 2918|      5|            CharAlloc(alloc_ref()));
 2919|       |
 2920|      5|    if (resize_helper.old_capacity() == 0) {
  ------------------
  |  Branch (2920:9): [True: 2, False: 3]
  ------------------
 2921|       |      // InitializeSlots did all the work including infoz().RecordRehash().
 2922|      2|      return;
 2923|      2|    }
 2924|       |
 2925|      3|    if (grow_single_group) {
  ------------------
  |  Branch (2925:9): [True: 3, False: 0]
  ------------------
 2926|      3|      if (PolicyTraits::transfer_uses_memcpy()) {
  ------------------
  |  Branch (2926:11): [Folded, False: 3]
  ------------------
 2927|       |        // InitializeSlots did all the work.
 2928|      0|        return;
 2929|      0|      }
 2930|       |      // We want GrowSizeIntoSingleGroup to be called here in order to make
 2931|       |      // InitializeSlots not depend on PolicyTraits.
 2932|      3|      resize_helper.GrowSizeIntoSingleGroup<PolicyTraits>(common(), alloc_ref(),
 2933|      3|                                                          old_slots);
 2934|      3|    } else {
 2935|       |      // InitializeSlots prepares control bytes to correspond to empty table.
 2936|      0|      auto* new_slots = slot_array();
 2937|      0|      size_t total_probe_length = 0;
 2938|      0|      for (size_t i = 0; i != resize_helper.old_capacity(); ++i) {
  ------------------
  |  Branch (2938:26): [True: 0, False: 0]
  ------------------
 2939|      0|        if (IsFull(resize_helper.old_ctrl()[i])) {
  ------------------
  |  Branch (2939:13): [True: 0, False: 0]
  ------------------
 2940|      0|          size_t hash = PolicyTraits::apply(
 2941|      0|              HashElement{hash_ref()}, PolicyTraits::element(old_slots + i));
 2942|      0|          auto target = find_first_non_full(common(), hash);
 2943|      0|          size_t new_i = target.offset;
 2944|      0|          total_probe_length += target.probe_length;
 2945|      0|          SetCtrl(common(), new_i, H2(hash), sizeof(slot_type));
 2946|      0|          transfer(new_slots + new_i, old_slots + i);
 2947|      0|        }
 2948|      0|      }
 2949|      0|      infoz().RecordRehash(total_probe_length);
 2950|      0|    }
 2951|      3|    resize_helper.DeallocateOld<alignof(slot_type)>(
 2952|      3|        CharAlloc(alloc_ref()), sizeof(slot_type),
 2953|      3|        const_cast<std::remove_const_t<slot_type>*>(old_slots));
 2954|      3|  }
_ZN4absl12lts_2024011618container_internal19HashSetResizeHelper23GrowSizeIntoSingleGroupINS1_18hash_policy_traitsINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEEvEENSt3__19allocatorISB_EEEEvRNS1_12CommonFieldsERT0_PNT_9slot_typeE:
 1655|      3|                               typename PolicyTraits::slot_type* old_slots) {
 1656|      3|    assert(old_capacity_ < Group::kWidth / 2);
 1657|      3|    assert(IsGrowingIntoSingleGroupApplicable(old_capacity_, c.capacity()));
 1658|      3|    using slot_type = typename PolicyTraits::slot_type;
 1659|      3|    assert(is_single_group(c.capacity()));
 1660|       |
 1661|      3|    auto* new_slots = reinterpret_cast<slot_type*>(c.slot_array());
 1662|       |
 1663|      3|    size_t shuffle_bit = old_capacity_ / 2 + 1;
 1664|      8|    for (size_t i = 0; i < old_capacity_; ++i) {
  ------------------
  |  Branch (1664:24): [True: 5, False: 3]
  ------------------
 1665|      5|      if (IsFull(old_ctrl_[i])) {
  ------------------
  |  Branch (1665:11): [True: 5, False: 0]
  ------------------
 1666|      5|        size_t new_i = i ^ shuffle_bit;
 1667|      5|        SanitizerUnpoisonMemoryRegion(new_slots + new_i, sizeof(slot_type));
 1668|      5|        PolicyTraits::transfer(&alloc_ref, new_slots + new_i, old_slots + i);
 1669|      5|      }
 1670|      5|    }
 1671|      3|    PoisonSingleGroupEmptySlots(c, sizeof(slot_type));
 1672|      3|  }
message.cc:_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE11growth_leftEv:
 3181|     12|  size_t growth_left() const { return common().growth_left(); }
message.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE28rehash_and_grow_if_necessaryEv:
 2970|      5|  void rehash_and_grow_if_necessary() {
 2971|      5|    const size_t cap = capacity();
 2972|      5|    if (cap > Group::kWidth &&
  ------------------
  |  Branch (2972:9): [True: 0, False: 5]
  ------------------
 2973|       |        // Do these calculations in 64-bit to avoid overflow.
 2974|      0|        size() * uint64_t{32} <= cap * uint64_t{25}) {
  ------------------
  |  Branch (2974:9): [True: 0, False: 0]
  ------------------
 2975|       |      // Squash DELETED without growing if there is enough capacity.
 2976|       |      //
 2977|       |      // Rehash in place if the current size is <= 25/32 of capacity.
 2978|       |      // Rationale for such a high factor: 1) drop_deletes_without_resize() is
 2979|       |      // faster than resize, and 2) it takes quite a bit of work to add
 2980|       |      // tombstones.  In the worst case, seems to take approximately 4
 2981|       |      // insert/erase pairs to create a single tombstone and so if we are
 2982|       |      // rehashing because of tombstones, we can afford to rehash-in-place as
 2983|       |      // long as we are reclaiming at least 1/8 the capacity without doing more
 2984|       |      // than 2X the work.  (Where "work" is defined to be size() for rehashing
 2985|       |      // or rehashing in place, and 1 for an insert or erase.)  But rehashing in
 2986|       |      // place is faster per operation than inserting or even doubling the size
 2987|       |      // of the table, so we actually afford to reclaim even less space from a
 2988|       |      // resize-in-place.  The decision is to rehash in place if we can reclaim
 2989|       |      // at about 1/8th of the usable capacity (specifically 3/28 of the
 2990|       |      // capacity) which means that the total cost of rehashing will be a small
 2991|       |      // fraction of the total work.
 2992|       |      //
 2993|       |      // Here is output of an experiment using the BM_CacheInSteadyState
 2994|       |      // benchmark running the old case (where we rehash-in-place only if we can
 2995|       |      // reclaim at least 7/16*capacity) vs. this code (which rehashes in place
 2996|       |      // if we can recover 3/32*capacity).
 2997|       |      //
 2998|       |      // Note that although in the worst-case number of rehashes jumped up from
 2999|       |      // 15 to 190, but the number of operations per second is almost the same.
 3000|       |      //
 3001|       |      // Abridged output of running BM_CacheInSteadyState benchmark from
 3002|       |      // raw_hash_set_benchmark.   N is the number of insert/erase operations.
 3003|       |      //
 3004|       |      //      | OLD (recover >= 7/16        | NEW (recover >= 3/32)
 3005|       |      // size |    N/s LoadFactor NRehashes |    N/s LoadFactor NRehashes
 3006|       |      //  448 | 145284       0.44        18 | 140118       0.44        19
 3007|       |      //  493 | 152546       0.24        11 | 151417       0.48        28
 3008|       |      //  538 | 151439       0.26        11 | 151152       0.53        38
 3009|       |      //  583 | 151765       0.28        11 | 150572       0.57        50
 3010|       |      //  628 | 150241       0.31        11 | 150853       0.61        66
 3011|       |      //  672 | 149602       0.33        12 | 150110       0.66        90
 3012|       |      //  717 | 149998       0.35        12 | 149531       0.70       129
 3013|       |      //  762 | 149836       0.37        13 | 148559       0.74       190
 3014|       |      //  807 | 149736       0.39        14 | 151107       0.39        14
 3015|       |      //  852 | 150204       0.42        15 | 151019       0.42        15
 3016|      0|      drop_deletes_without_resize();
 3017|      5|    } else {
 3018|       |      // Otherwise grow the container.
 3019|      5|      resize(NextCapacity(cap));
 3020|      5|    }
 3021|      5|  }
message.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE15set_growth_leftEm:
 3182|      6|  void set_growth_left(size_t gl) { return common().set_growth_left(gl); }
message.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE10emplace_atIJRKS9_EEEvmDpOT_:
 3151|      6|  void emplace_at(size_t i, Args&&... args) {
 3152|      6|    construct(slot_array() + i, std::forward<Args>(args)...);
 3153|       |
 3154|       |    assert(PolicyTraits::apply(FindElement{*this}, *iterator_at(i)) ==
 3155|      6|               iterator_at(i) &&
 3156|      6|           "constructed value does not match the lookup key");
 3157|      6|  }
message.cc:_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashSetPolicyIPKN6google8protobuf8internal15DescriptorTableEEENS5_12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashENSC_18DescriptorByNameEqENSt3__19allocatorIS9_EEE9constructIJRKS9_EEEvPS9_DpOT_:
 2851|      6|  inline void construct(slot_type* slot, Args&&... args) {
 2852|      6|    PolicyTraits::construct(&alloc_ref(), slot, std::forward<Args>(args)...);
 2853|      6|  }

_ZN4absl12lts_202401166HashOfITpTnRiJEJPKN6google8protobuf11MessageLiteEiEEEmDpRKT0_:
  267|      9|size_t HashOf(const Types&... values) {
  268|      9|  auto tuple = std::tie(values...);
  269|      9|  return absl::Hash<decltype(tuple)>{}(tuple);
  270|      9|}
_ZN4absl12lts_202401166HashOfITpTnRiJEJNS0_11string_viewEEEEmDpRKT0_:
  267|  1.51k|size_t HashOf(const Types&... values) {
  268|  1.51k|  auto tuple = std::tie(values...);
  269|  1.51k|  return absl::Hash<decltype(tuple)>{}(tuple);
  270|  1.51k|}
_ZN4absl12lts_202401166HashOfITpTnRiJEJNSt3__14pairIPKviEEEEEmDpRKT0_:
  267|    413|size_t HashOf(const Types&... values) {
  268|    413|  auto tuple = std::tie(values...);
  269|    413|  return absl::Hash<decltype(tuple)>{}(tuple);
  270|    413|}
_ZN4absl12lts_202401166HashOfITpTnRiJEJNSt3__14pairIPKvNS0_11string_viewEEEEEEmDpRKT0_:
  267|  1.55k|size_t HashOf(const Types&... values) {
  268|  1.55k|  auto tuple = std::tie(values...);
  269|  1.55k|  return absl::Hash<decltype(tuple)>{}(tuple);
  270|  1.55k|}
_ZN4absl12lts_202401166HashOfITpTnRiJEJNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEEmDpRKT0_:
  267|      4|size_t HashOf(const Types&... values) {
  268|      4|  auto tuple = std::tie(values...);
  269|      4|  return absl::Hash<decltype(tuple)>{}(tuple);
  270|      4|}

_ZN4absl12lts_2024011613hash_internal15MixingHashState16LowLevelHashImplEPKhm:
   63|  2.45k|                                           size_t len) {
   64|  2.45k|  return LowLevelHash(data, len, Seed(), kHashSalt);
   65|  2.45k|}

_ZN4absl12lts_2024011613hash_internal15MixingHashState18combine_contiguousES2_PKhm:
 1023|  12.3k|                                            size_t size) {
 1024|  12.3k|    return MixingHashState(
 1025|  12.3k|        CombineContiguousImpl(hash_state.state_, first, size,
 1026|  12.3k|                              std::integral_constant<int, sizeof(size_t)>{}));
 1027|  12.3k|  }
_ZN4absl12lts_2024011613hash_internal15MixingHashStateC2Ev:
 1052|  4.38k|  MixingHashState() : state_(Seed()) {}
_ZN4absl12lts_2024011613hash_internal15MixingHashStateC2Em:
 1085|  12.3k|  explicit MixingHashState(uint64_t state) : state_(state) {}
_ZN4absl12lts_2024011613hash_internal15MixingHashState9Read9To16EPKhm:
 1114|    874|                                                 size_t len) {
 1115|    874|    uint64_t low_mem = absl::base_internal::UnalignedLoad64(p);
 1116|    874|    uint64_t high_mem = absl::base_internal::UnalignedLoad64(p + len - 8);
 1117|    874|#ifdef ABSL_IS_LITTLE_ENDIAN
 1118|    874|    uint64_t most_significant = high_mem;
 1119|    874|    uint64_t least_significant = low_mem;
 1120|       |#else
 1121|       |    uint64_t most_significant = low_mem;
 1122|       |    uint64_t least_significant = high_mem;
 1123|       |#endif
 1124|    874|    return {least_significant, most_significant};
 1125|    874|  }
_ZN4absl12lts_2024011613hash_internal15MixingHashState8Read4To8EPKhm:
 1128|  8.94k|  static uint64_t Read4To8(const unsigned char* p, size_t len) {
 1129|  8.94k|    uint32_t low_mem = absl::base_internal::UnalignedLoad32(p);
 1130|  8.94k|    uint32_t high_mem = absl::base_internal::UnalignedLoad32(p + len - 4);
 1131|  8.94k|#ifdef ABSL_IS_LITTLE_ENDIAN
 1132|  8.94k|    uint32_t most_significant = high_mem;
 1133|  8.94k|    uint32_t least_significant = low_mem;
 1134|       |#else
 1135|       |    uint32_t most_significant = low_mem;
 1136|       |    uint32_t least_significant = high_mem;
 1137|       |#endif
 1138|  8.94k|    return (static_cast<uint64_t>(most_significant) << (len - 4) * 8) |
 1139|  8.94k|           least_significant;
 1140|  8.94k|  }
_ZN4absl12lts_2024011613hash_internal15MixingHashState8Read1To3EPKhm:
 1143|     28|  static uint32_t Read1To3(const unsigned char* p, size_t len) {
 1144|       |    // The trick used by this implementation is to avoid branches if possible.
 1145|     28|    unsigned char mem0 = p[0];
 1146|     28|    unsigned char mem1 = p[len / 2];
 1147|     28|    unsigned char mem2 = p[len - 1];
 1148|     28|#ifdef ABSL_IS_LITTLE_ENDIAN
 1149|     28|    unsigned char significant2 = mem2;
 1150|     28|    unsigned char significant1 = mem1;
 1151|     28|    unsigned char significant0 = mem0;
 1152|       |#else
 1153|       |    unsigned char significant2 = mem0;
 1154|       |    unsigned char significant1 = len == 2 ? mem0 : mem1;
 1155|       |    unsigned char significant0 = mem2;
 1156|       |#endif
 1157|     28|    return static_cast<uint32_t>(significant0 |                     //
 1158|     28|                                 (significant1 << (len / 2 * 8)) |  //
 1159|     28|                                 (significant2 << ((len - 1) * 8)));
 1160|     28|  }
_ZN4absl12lts_2024011613hash_internal15MixingHashState3MixEmm:
 1162|  11.4k|  ABSL_ATTRIBUTE_ALWAYS_INLINE static uint64_t Mix(uint64_t state, uint64_t v) {
 1163|       |    // Though the 128-bit product on AArch64 needs two instructions, it is
 1164|       |    // still a good balance between speed and hash quality.
 1165|  11.4k|    using MultType =
 1166|  11.4k|        absl::conditional_t<sizeof(size_t) == 4, uint64_t, uint128>;
 1167|       |    // We do the addition in 64-bit space to make sure the 128-bit
 1168|       |    // multiplication is fast. If we were to do it as MultType the compiler has
 1169|       |    // to assume that the high word is non-zero and needs to perform 2
 1170|       |    // multiplications instead of one.
 1171|  11.4k|    MultType m = state + v;
 1172|  11.4k|    m *= kMul;
 1173|  11.4k|    return static_cast<uint64_t>(m ^ (m >> (sizeof(m) * 8 / 2)));
 1174|  11.4k|  }
_ZN4absl12lts_2024011613hash_internal15MixingHashState6Hash64EPKhm:
 1181|  2.45k|                                                      size_t len) {
 1182|  2.45k|#ifdef ABSL_HAVE_INTRINSIC_INT128
 1183|  2.45k|    return LowLevelHashImpl(data, len);
 1184|       |#else
 1185|       |    return hash_internal::CityHash64(reinterpret_cast<const char*>(data), len);
 1186|       |#endif
 1187|  2.45k|  }
_ZN4absl12lts_2024011613hash_internal15MixingHashState4SeedEv:
 1205|  6.83k|  ABSL_ATTRIBUTE_ALWAYS_INLINE static uint64_t Seed() {
 1206|  6.83k|#if (!defined(__clang__) || __clang_major__ > 11) && \
 1207|  6.83k|    (!defined(__apple_build_version__) ||            \
 1208|  6.83k|     __apple_build_version__ >= 19558921)  // Xcode 12
 1209|  6.83k|    return static_cast<uint64_t>(reinterpret_cast<uintptr_t>(&kSeed));
 1210|       |#else
 1211|       |    // Workaround the absence of
 1212|       |    // https://github.com/llvm/llvm-project/commit/bc15bf66dcca76cc06fe71fca35b74dc4d521021.
 1213|       |    return static_cast<uint64_t>(reinterpret_cast<uintptr_t>(kSeed));
 1214|       |#endif
 1215|  6.83k|  }
_ZN4absl12lts_2024011613hash_internal18PiecewiseChunkSizeEv:
   82|  2.45k|constexpr size_t PiecewiseChunkSize() { return 1024; }
_ZN4absl12lts_2024011613hash_internal15MixingHashState21CombineContiguousImplEmPKhmNSt3__117integral_constantIiLi8EEE:
 1247|  12.3k|    std::integral_constant<int, 8> /* sizeof_size_t */) {
 1248|       |  // For large values we use LowLevelHash or CityHash depending on the platform,
 1249|       |  // for small ones we just use a multiplicative hash.
 1250|  12.3k|  uint64_t v;
 1251|  12.3k|  if (len > 16) {
  ------------------
  |  Branch (1251:7): [True: 2.45k, False: 9.84k]
  ------------------
 1252|  2.45k|    if (ABSL_PREDICT_FALSE(len > PiecewiseChunkSize())) {
  ------------------
  |  |  178|  2.45k|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 2.45k]
  |  |  |  Branch (178:49): [Folded, False: 2.45k]
  |  |  |  Branch (178:58): [True: 0, False: 2.45k]
  |  |  ------------------
  ------------------
 1253|      0|      return CombineLargeContiguousImpl64(state, first, len);
 1254|      0|    }
 1255|  2.45k|    v = Hash64(first, len);
 1256|  9.84k|  } else if (len > 8) {
  ------------------
  |  Branch (1256:14): [True: 874, False: 8.97k]
  ------------------
 1257|       |    // This hash function was constructed by the ML-driven algorithm discovery
 1258|       |    // using reinforcement learning. We fed the agent lots of inputs from
 1259|       |    // microbenchmarks, SMHasher, low hamming distance from generated inputs and
 1260|       |    // picked up the one that was good on micro and macrobenchmarks.
 1261|    874|    auto p = Read9To16(first, len);
 1262|    874|    uint64_t lo = p.first;
 1263|    874|    uint64_t hi = p.second;
 1264|       |    // Rotation by 53 was found to be most often useful when discovering these
 1265|       |    // hashing algorithms with ML techniques.
 1266|    874|    lo = absl::rotr(lo, 53);
 1267|    874|    state += kMul;
 1268|    874|    lo += state;
 1269|    874|    state ^= hi;
 1270|    874|    uint128 m = state;
 1271|    874|    m *= lo;
 1272|    874|    return static_cast<uint64_t>(m ^ (m >> 64));
 1273|  8.97k|  } else if (len >= 4) {
  ------------------
  |  Branch (1273:14): [True: 8.94k, False: 28]
  ------------------
 1274|  8.94k|    v = Read4To8(first, len);
 1275|  8.94k|  } else if (len > 0) {
  ------------------
  |  Branch (1275:14): [True: 28, False: 0]
  ------------------
 1276|     28|    v = Read1To3(first, len);
 1277|     28|  } else {
 1278|       |    // Empty ranges have no effect.
 1279|      0|    return state;
 1280|      0|  }
 1281|  11.4k|  return Mix(state, v);
 1282|  12.3k|}
_ZNK4absl12lts_2024011613hash_internal8HashImplINS0_11string_viewEEclERKS3_:
 1299|    781|  size_t operator()(const T& value) const {
 1300|    781|    return MixingHashState::hash(value);
 1301|    781|  }
_ZN4absl12lts_2024011613hash_internal15MixingHashState4hashINS0_11string_viewETnNSt3__19enable_ifIXntsr16IntegralFastPathIT_EE5valueEiE4typeELi0EEEmRKS7_:
 1045|    781|  static size_t hash(const T& value) {
 1046|    781|    return static_cast<size_t>(combine(MixingHashState{}, value).state_);
 1047|    781|  }
_ZN4absl12lts_2024011613hash_internal13HashStateBaseINS1_15MixingHashStateEE7combineINS0_11string_viewEJEEES3_S3_RKT_DpRKT0_:
 1310|  3.85k|H HashStateBase<H>::combine(H state, const T& value, const Ts&... values) {
 1311|  3.85k|  return H::combine(hash_internal::HashSelect::template Apply<T>::Invoke(
 1312|  3.85k|                        std::move(state), value),
 1313|  3.85k|                    values...);
 1314|  3.85k|}
_ZN4absl12lts_2024011613hash_internal10HashSelect14HashValueProbe6InvokeINS1_15MixingHashStateENS0_11string_viewEEENSt3__19enable_ifIXsr3std7is_sameIT_DTcl13AbslHashValueclsr3stdE4movefp_Efp0_EEEE5valueES9_E4typeES9_RKT0_:
  937|  3.85k|        H> {
  938|  3.85k|      return AbslHashValue(std::move(state), value);
  939|  3.85k|    }
_ZN4absl12lts_2024011613hash_internal13AbslHashValueINS1_15MixingHashStateEEET_S4_NS0_11string_viewE:
  557|  3.85k|H AbslHashValue(H hash_state, absl::string_view str) {
  558|  3.85k|  return H::combine(
  559|  3.85k|      H::combine_contiguous(std::move(hash_state), str.data(), str.size()),
  560|  3.85k|      str.size());
  561|  3.85k|}
_ZN4absl12lts_2024011613hash_internal13HashStateBaseINS1_15MixingHashStateEE18combine_contiguousIcEES3_S3_PKT_m:
 1319|  3.85k|H HashStateBase<H>::combine_contiguous(H state, const T* data, size_t size) {
 1320|  3.85k|  return hash_internal::hash_range_or_bytes(std::move(state), data, size);
 1321|  3.85k|}
_ZN4absl12lts_2024011613hash_internal19hash_range_or_bytesINS1_15MixingHashStateEcEENSt3__19enable_ifIXsr23is_uniquely_representedIT0_EE5valueET_E4typeES7_PKS6_m:
  885|  3.85k|hash_range_or_bytes(H hash_state, const T* data, size_t size) {
  886|  3.85k|  const auto* bytes = reinterpret_cast<const unsigned char*>(data);
  887|  3.85k|  return H::combine_contiguous(std::move(hash_state), bytes, sizeof(T) * size);
  888|  3.85k|}
_ZN4absl12lts_2024011613hash_internal13HashStateBaseINS1_15MixingHashStateEE7combineImJEEES3_S3_RKT_DpRKT0_:
 1310|  5.93k|H HashStateBase<H>::combine(H state, const T& value, const Ts&... values) {
 1311|  5.93k|  return H::combine(hash_internal::HashSelect::template Apply<T>::Invoke(
 1312|  5.93k|                        std::move(state), value),
 1313|  5.93k|                    values...);
 1314|  5.93k|}
_ZN4absl12lts_2024011613hash_internal10HashSelect24UniquelyRepresentedProbe6InvokeINS1_15MixingHashStateEmEENSt3__19enable_ifIXsr23is_uniquely_representedIT0_EE5valueET_E4typeES9_RKS8_:
  927|  8.02k|        -> absl::enable_if_t<is_uniquely_represented<T>::value, H> {
  928|  8.02k|      return hash_internal::hash_bytes(std::move(state), value);
  929|  8.02k|    }
_ZN4absl12lts_2024011613hash_internal10hash_bytesINS1_15MixingHashStateEmEET_S4_RKT0_:
  340|  8.02k|H hash_bytes(H hash_state, const T& value) {
  341|  8.02k|  const unsigned char* start = reinterpret_cast<const unsigned char*>(&value);
  342|  8.02k|  return H::combine_contiguous(std::move(hash_state), start, sizeof(value));
  343|  8.02k|}
_ZN4absl12lts_2024011613hash_internal13HashStateBaseINS1_15MixingHashStateEE7combineES3_:
  234|  15.7k|  static H combine(H state) { return state; }
_ZN4absl12lts_2024011613hash_internal13HashStateBaseINS1_15MixingHashStateEE7combineImJmEEES3_S3_RKT_DpRKT0_:
 1310|  2.08k|H HashStateBase<H>::combine(H state, const T& value, const Ts&... values) {
 1311|  2.08k|  return H::combine(hash_internal::HashSelect::template Apply<T>::Invoke(
 1312|  2.08k|                        std::move(state), value),
 1313|  2.08k|                    values...);
 1314|  2.08k|}
_ZN4absl12lts_2024011613hash_internal10HashSelect14HashValueProbe6InvokeINS1_15MixingHashStateEPKvEENSt3__19enable_ifIXsr3std7is_sameIT_DTcl13AbslHashValueclsr3stdE4movefp_Efp0_EEEE5valueESA_E4typeESA_RKT0_:
  937|  1.96k|        H> {
  938|  1.96k|      return AbslHashValue(std::move(state), value);
  939|  1.96k|    }
_ZN4absl12lts_2024011613hash_internal13AbslHashValueINS1_15MixingHashStateEPKvEENSt3__19enable_ifIXsr3std10is_pointerIT0_EE5valueET_E4typeES9_S8_:
  438|  1.96k|                                                             T ptr) {
  439|  1.96k|  auto v = reinterpret_cast<uintptr_t>(ptr);
  440|       |  // Due to alignment, pointers tend to have low bits as zero, and the next few
  441|       |  // bits follow a pattern since they are also multiples of some base value.
  442|       |  // Mixing the pointer twice helps prevent stuck low bits for certain alignment
  443|       |  // values.
  444|  1.96k|  return H::combine(std::move(hash_state), v, v);
  445|  1.96k|}
_ZNK4absl12lts_2024011613hash_internal8HashImplINSt3__15tupleIJRKPKN6google8protobuf11MessageLiteERKiEEEEclERKSE_:
 1299|      9|  size_t operator()(const T& value) const {
 1300|      9|    return MixingHashState::hash(value);
 1301|      9|  }
_ZN4absl12lts_2024011613hash_internal15MixingHashState4hashINSt3__15tupleIJRKPKN6google8protobuf11MessageLiteERKiEEETnNS4_9enable_ifIXntsr16IntegralFastPathIT_EE5valueEiE4typeELi0EEEmRKSH_:
 1045|      9|  static size_t hash(const T& value) {
 1046|      9|    return static_cast<size_t>(combine(MixingHashState{}, value).state_);
 1047|      9|  }
_ZN4absl12lts_2024011613hash_internal13HashStateBaseINS1_15MixingHashStateEE7combineINSt3__15tupleIJRKPKN6google8protobuf11MessageLiteERKiEEEJEEES3_S3_RKT_DpRKT0_:
 1310|      9|H HashStateBase<H>::combine(H state, const T& value, const Ts&... values) {
 1311|      9|  return H::combine(hash_internal::HashSelect::template Apply<T>::Invoke(
 1312|      9|                        std::move(state), value),
 1313|      9|                    values...);
 1314|      9|}
_ZN4absl12lts_2024011613hash_internal10HashSelect14HashValueProbe6InvokeINS1_15MixingHashStateENSt3__15tupleIJRKPKN6google8protobuf11MessageLiteERKiEEEEENS6_9enable_ifIXsr3std7is_sameIT_DTcl13AbslHashValueclsr3stdE4movefp_Efp0_EEEE5valueESJ_E4typeESJ_RKT0_:
  937|      9|        H> {
  938|      9|      return AbslHashValue(std::move(state), value);
  939|      9|    }
_ZN4absl12lts_2024011613hash_internal13AbslHashValueINS1_15MixingHashStateEJRKPKN6google8protobuf11MessageLiteERKiEEENSt3__19enable_ifIXsr4absl11conjunctionIDpNS1_11is_hashableIT0_EEEE5valueET_E4typeESJ_RKNSD_5tupleIJDpSG_EEE:
  516|      9|AbslHashValue(H hash_state, const std::tuple<Ts...>& t) {
  517|      9|  return hash_internal::hash_tuple(std::move(hash_state), t,
  518|      9|                                   absl::make_index_sequence<sizeof...(Ts)>());
  519|      9|}
_ZN4absl12lts_2024011613hash_internal10hash_tupleINS1_15MixingHashStateENSt3__15tupleIJRKPKN6google8protobuf11MessageLiteERKiEEEJLm0ELm1EEEET_SG_RKT0_NS4_16integer_sequenceImJXspT1_EEEE:
  503|      9|H hash_tuple(H hash_state, const Tuple& t, absl::index_sequence<Is...>) {
  504|      9|  return H::combine(std::move(hash_state), std::get<Is>(t)...);
  505|      9|}
_ZN4absl12lts_2024011613hash_internal13HashStateBaseINS1_15MixingHashStateEE7combineIPKN6google8protobuf11MessageLiteEJiEEES3_S3_RKT_DpRKT0_:
 1310|      9|H HashStateBase<H>::combine(H state, const T& value, const Ts&... values) {
 1311|      9|  return H::combine(hash_internal::HashSelect::template Apply<T>::Invoke(
 1312|      9|                        std::move(state), value),
 1313|      9|                    values...);
 1314|      9|}
_ZN4absl12lts_2024011613hash_internal13HashStateBaseINS1_15MixingHashStateEE7combineIiJEEES3_S3_RKT_DpRKT0_:
 1310|    422|H HashStateBase<H>::combine(H state, const T& value, const Ts&... values) {
 1311|    422|  return H::combine(hash_internal::HashSelect::template Apply<T>::Invoke(
 1312|    422|                        std::move(state), value),
 1313|    422|                    values...);
 1314|    422|}
_ZN4absl12lts_2024011613hash_internal10HashSelect24UniquelyRepresentedProbe6InvokeINS1_15MixingHashStateEiEENSt3__19enable_ifIXsr23is_uniquely_representedIT0_EE5valueET_E4typeES9_RKS8_:
  927|    422|        -> absl::enable_if_t<is_uniquely_represented<T>::value, H> {
  928|    422|      return hash_internal::hash_bytes(std::move(state), value);
  929|    422|    }
_ZN4absl12lts_2024011613hash_internal10hash_bytesINS1_15MixingHashStateEiEET_S4_RKT0_:
  340|    422|H hash_bytes(H hash_state, const T& value) {
  341|    422|  const unsigned char* start = reinterpret_cast<const unsigned char*>(&value);
  342|    422|  return H::combine_contiguous(std::move(hash_state), start, sizeof(value));
  343|    422|}
_ZN4absl12lts_2024011613hash_internal10HashSelect14HashValueProbe6InvokeINS1_15MixingHashStateEPKN6google8protobuf11MessageLiteEEENSt3__19enable_ifIXsr3std7is_sameIT_DTcl13AbslHashValueclsr3stdE4movefp_Efp0_EEEE5valueESD_E4typeESD_RKT0_:
  937|      9|        H> {
  938|      9|      return AbslHashValue(std::move(state), value);
  939|      9|    }
_ZN4absl12lts_2024011613hash_internal13AbslHashValueINS1_15MixingHashStateEPKN6google8protobuf11MessageLiteEEENSt3__19enable_ifIXsr3std10is_pointerIT0_EE5valueET_E4typeESC_SB_:
  438|      9|                                                             T ptr) {
  439|      9|  auto v = reinterpret_cast<uintptr_t>(ptr);
  440|       |  // Due to alignment, pointers tend to have low bits as zero, and the next few
  441|       |  // bits follow a pattern since they are also multiples of some base value.
  442|       |  // Mixing the pointer twice helps prevent stuck low bits for certain alignment
  443|       |  // values.
  444|      9|  return H::combine(std::move(hash_state), v, v);
  445|      9|}
_ZNK4absl12lts_2024011613hash_internal8HashImplIPKN6google8protobuf14FileDescriptorEEclERKS7_:
 1299|    104|  size_t operator()(const T& value) const {
 1300|    104|    return MixingHashState::hash(value);
 1301|    104|  }
_ZN4absl12lts_2024011613hash_internal15MixingHashState4hashIPKN6google8protobuf14FileDescriptorETnNSt3__19enable_ifIXntsr16IntegralFastPathIT_EE5valueEiE4typeELi0EEEmRKSB_:
 1045|    104|  static size_t hash(const T& value) {
 1046|    104|    return static_cast<size_t>(combine(MixingHashState{}, value).state_);
 1047|    104|  }
_ZN4absl12lts_2024011613hash_internal13HashStateBaseINS1_15MixingHashStateEE7combineIPKN6google8protobuf14FileDescriptorEJEEES3_S3_RKT_DpRKT0_:
 1310|    104|H HashStateBase<H>::combine(H state, const T& value, const Ts&... values) {
 1311|    104|  return H::combine(hash_internal::HashSelect::template Apply<T>::Invoke(
 1312|    104|                        std::move(state), value),
 1313|    104|                    values...);
 1314|    104|}
_ZN4absl12lts_2024011613hash_internal10HashSelect14HashValueProbe6InvokeINS1_15MixingHashStateEPKN6google8protobuf14FileDescriptorEEENSt3__19enable_ifIXsr3std7is_sameIT_DTcl13AbslHashValueclsr3stdE4movefp_Efp0_EEEE5valueESD_E4typeESD_RKT0_:
  937|    104|        H> {
  938|    104|      return AbslHashValue(std::move(state), value);
  939|    104|    }
_ZN4absl12lts_2024011613hash_internal13AbslHashValueINS1_15MixingHashStateEPKN6google8protobuf14FileDescriptorEEENSt3__19enable_ifIXsr3std10is_pointerIT0_EE5valueET_E4typeESC_SB_:
  438|    104|                                                             T ptr) {
  439|    104|  auto v = reinterpret_cast<uintptr_t>(ptr);
  440|       |  // Due to alignment, pointers tend to have low bits as zero, and the next few
  441|       |  // bits follow a pattern since they are also multiples of some base value.
  442|       |  // Mixing the pointer twice helps prevent stuck low bits for certain alignment
  443|       |  // values.
  444|    104|  return H::combine(std::move(hash_state), v, v);
  445|    104|}
_ZNK4absl12lts_2024011613hash_internal8HashImplINSt3__15tupleIJRKNS0_11string_viewEEEEEclERKS8_:
 1299|  1.51k|  size_t operator()(const T& value) const {
 1300|  1.51k|    return MixingHashState::hash(value);
 1301|  1.51k|  }
_ZN4absl12lts_2024011613hash_internal15MixingHashState4hashINSt3__15tupleIJRKNS0_11string_viewEEEETnNS4_9enable_ifIXntsr16IntegralFastPathIT_EE5valueEiE4typeELi0EEEmRKSB_:
 1045|  1.51k|  static size_t hash(const T& value) {
 1046|  1.51k|    return static_cast<size_t>(combine(MixingHashState{}, value).state_);
 1047|  1.51k|  }
_ZN4absl12lts_2024011613hash_internal13HashStateBaseINS1_15MixingHashStateEE7combineINSt3__15tupleIJRKNS0_11string_viewEEEEJEEES3_S3_RKT_DpRKT0_:
 1310|  1.51k|H HashStateBase<H>::combine(H state, const T& value, const Ts&... values) {
 1311|  1.51k|  return H::combine(hash_internal::HashSelect::template Apply<T>::Invoke(
 1312|  1.51k|                        std::move(state), value),
 1313|  1.51k|                    values...);
 1314|  1.51k|}
_ZN4absl12lts_2024011613hash_internal10HashSelect14HashValueProbe6InvokeINS1_15MixingHashStateENSt3__15tupleIJRKNS0_11string_viewEEEEEENS6_9enable_ifIXsr3std7is_sameIT_DTcl13AbslHashValueclsr3stdE4movefp_Efp0_EEEE5valueESD_E4typeESD_RKT0_:
  937|  1.51k|        H> {
  938|  1.51k|      return AbslHashValue(std::move(state), value);
  939|  1.51k|    }
_ZN4absl12lts_2024011613hash_internal13AbslHashValueINS1_15MixingHashStateEJRKNS0_11string_viewEEEENSt3__19enable_ifIXsr4absl11conjunctionIDpNS1_11is_hashableIT0_EEEE5valueET_E4typeESD_RKNS7_5tupleIJDpSA_EEE:
  516|  1.51k|AbslHashValue(H hash_state, const std::tuple<Ts...>& t) {
  517|  1.51k|  return hash_internal::hash_tuple(std::move(hash_state), t,
  518|  1.51k|                                   absl::make_index_sequence<sizeof...(Ts)>());
  519|  1.51k|}
_ZN4absl12lts_2024011613hash_internal10hash_tupleINS1_15MixingHashStateENSt3__15tupleIJRKNS0_11string_viewEEEEJLm0EEEET_SA_RKT0_NS4_16integer_sequenceImJXspT1_EEEE:
  503|  1.51k|H hash_tuple(H hash_state, const Tuple& t, absl::index_sequence<Is...>) {
  504|  1.51k|  return H::combine(std::move(hash_state), std::get<Is>(t)...);
  505|  1.51k|}
_ZNK4absl12lts_2024011613hash_internal8HashImplINSt3__15tupleIJRKNS3_4pairIPKviEEEEEEclERKSB_:
 1299|    413|  size_t operator()(const T& value) const {
 1300|    413|    return MixingHashState::hash(value);
 1301|    413|  }
_ZN4absl12lts_2024011613hash_internal15MixingHashState4hashINSt3__15tupleIJRKNS4_4pairIPKviEEEEETnNS4_9enable_ifIXntsr16IntegralFastPathIT_EE5valueEiE4typeELi0EEEmRKSE_:
 1045|    413|  static size_t hash(const T& value) {
 1046|    413|    return static_cast<size_t>(combine(MixingHashState{}, value).state_);
 1047|    413|  }
_ZN4absl12lts_2024011613hash_internal13HashStateBaseINS1_15MixingHashStateEE7combineINSt3__15tupleIJRKNS6_4pairIPKviEEEEEJEEES3_S3_RKT_DpRKT0_:
 1310|    413|H HashStateBase<H>::combine(H state, const T& value, const Ts&... values) {
 1311|    413|  return H::combine(hash_internal::HashSelect::template Apply<T>::Invoke(
 1312|    413|                        std::move(state), value),
 1313|    413|                    values...);
 1314|    413|}
_ZN4absl12lts_2024011613hash_internal10HashSelect14HashValueProbe6InvokeINS1_15MixingHashStateENSt3__15tupleIJRKNS6_4pairIPKviEEEEEEENS6_9enable_ifIXsr3std7is_sameIT_DTcl13AbslHashValueclsr3stdE4movefp_Efp0_EEEE5valueESG_E4typeESG_RKT0_:
  937|    413|        H> {
  938|    413|      return AbslHashValue(std::move(state), value);
  939|    413|    }
_ZN4absl12lts_2024011613hash_internal13AbslHashValueINS1_15MixingHashStateEJRKNSt3__14pairIPKviEEEEENS4_9enable_ifIXsr4absl11conjunctionIDpNS1_11is_hashableIT0_EEEE5valueET_E4typeESG_RKNS4_5tupleIJDpSD_EEE:
  516|    413|AbslHashValue(H hash_state, const std::tuple<Ts...>& t) {
  517|    413|  return hash_internal::hash_tuple(std::move(hash_state), t,
  518|    413|                                   absl::make_index_sequence<sizeof...(Ts)>());
  519|    413|}
_ZN4absl12lts_2024011613hash_internal10hash_tupleINS1_15MixingHashStateENSt3__15tupleIJRKNS4_4pairIPKviEEEEEJLm0EEEET_SD_RKT0_NS4_16integer_sequenceImJXspT1_EEEE:
  503|    413|H hash_tuple(H hash_state, const Tuple& t, absl::index_sequence<Is...>) {
  504|    413|  return H::combine(std::move(hash_state), std::get<Is>(t)...);
  505|    413|}
_ZN4absl12lts_2024011613hash_internal13HashStateBaseINS1_15MixingHashStateEE7combineINSt3__14pairIPKviEEJEEES3_S3_RKT_DpRKT0_:
 1310|    413|H HashStateBase<H>::combine(H state, const T& value, const Ts&... values) {
 1311|    413|  return H::combine(hash_internal::HashSelect::template Apply<T>::Invoke(
 1312|    413|                        std::move(state), value),
 1313|    413|                    values...);
 1314|    413|}
_ZN4absl12lts_2024011613hash_internal10HashSelect14HashValueProbe6InvokeINS1_15MixingHashStateENSt3__14pairIPKviEEEENS6_9enable_ifIXsr3std7is_sameIT_DTcl13AbslHashValueclsr3stdE4movefp_Efp0_EEEE5valueESC_E4typeESC_RKT0_:
  937|    413|        H> {
  938|    413|      return AbslHashValue(std::move(state), value);
  939|    413|    }
_ZN4absl12lts_2024011613hash_internal13AbslHashValueINS1_15MixingHashStateEPKviEENSt3__19enable_ifIXaasr11is_hashableIT0_EE5valuesr11is_hashableIT1_EE5valueET_E4typeESA_RKNS6_4pairIS8_S9_EE:
  494|    413|AbslHashValue(H hash_state, const std::pair<T1, T2>& p) {
  495|    413|  return H::combine(std::move(hash_state), p.first, p.second);
  496|    413|}
_ZN4absl12lts_2024011613hash_internal13HashStateBaseINS1_15MixingHashStateEE7combineIPKvJiEEES3_S3_RKT_DpRKT0_:
 1310|    413|H HashStateBase<H>::combine(H state, const T& value, const Ts&... values) {
 1311|    413|  return H::combine(hash_internal::HashSelect::template Apply<T>::Invoke(
 1312|    413|                        std::move(state), value),
 1313|    413|                    values...);
 1314|    413|}
_ZN4absl12lts_2024011613hash_internal13HashStateBaseINS1_15MixingHashStateEE7combineINSt3__14pairIPKvNS0_11string_viewEEEJEEES3_S3_RKT_DpRKT0_:
 1310|  1.55k|H HashStateBase<H>::combine(H state, const T& value, const Ts&... values) {
 1311|  1.55k|  return H::combine(hash_internal::HashSelect::template Apply<T>::Invoke(
 1312|  1.55k|                        std::move(state), value),
 1313|  1.55k|                    values...);
 1314|  1.55k|}
_ZN4absl12lts_2024011613hash_internal10HashSelect14HashValueProbe6InvokeINS1_15MixingHashStateENSt3__14pairIPKvNS0_11string_viewEEEEENS6_9enable_ifIXsr3std7is_sameIT_DTcl13AbslHashValueclsr3stdE4movefp_Efp0_EEEE5valueESD_E4typeESD_RKT0_:
  937|  1.55k|        H> {
  938|  1.55k|      return AbslHashValue(std::move(state), value);
  939|  1.55k|    }
_ZN4absl12lts_2024011613hash_internal13AbslHashValueINS1_15MixingHashStateEPKvNS0_11string_viewEEENSt3__19enable_ifIXaasr11is_hashableIT0_EE5valuesr11is_hashableIT1_EE5valueET_E4typeESB_RKNS7_4pairIS9_SA_EE:
  494|  1.55k|AbslHashValue(H hash_state, const std::pair<T1, T2>& p) {
  495|  1.55k|  return H::combine(std::move(hash_state), p.first, p.second);
  496|  1.55k|}
_ZN4absl12lts_2024011613hash_internal13HashStateBaseINS1_15MixingHashStateEE7combineIPKvJNS0_11string_viewEEEES3_S3_RKT_DpRKT0_:
 1310|  1.55k|H HashStateBase<H>::combine(H state, const T& value, const Ts&... values) {
 1311|  1.55k|  return H::combine(hash_internal::HashSelect::template Apply<T>::Invoke(
 1312|  1.55k|                        std::move(state), value),
 1313|  1.55k|                    values...);
 1314|  1.55k|}
_ZNK4absl12lts_2024011613hash_internal8HashImplINSt3__15tupleIJRKNS3_4pairIPKvNS0_11string_viewEEEEEEEclERKSC_:
 1299|  1.55k|  size_t operator()(const T& value) const {
 1300|  1.55k|    return MixingHashState::hash(value);
 1301|  1.55k|  }
_ZN4absl12lts_2024011613hash_internal15MixingHashState4hashINSt3__15tupleIJRKNS4_4pairIPKvNS0_11string_viewEEEEEETnNS4_9enable_ifIXntsr16IntegralFastPathIT_EE5valueEiE4typeELi0EEEmRKSF_:
 1045|  1.55k|  static size_t hash(const T& value) {
 1046|  1.55k|    return static_cast<size_t>(combine(MixingHashState{}, value).state_);
 1047|  1.55k|  }
_ZN4absl12lts_2024011613hash_internal13HashStateBaseINS1_15MixingHashStateEE7combineINSt3__15tupleIJRKNS6_4pairIPKvNS0_11string_viewEEEEEEJEEES3_S3_RKT_DpRKT0_:
 1310|  1.55k|H HashStateBase<H>::combine(H state, const T& value, const Ts&... values) {
 1311|  1.55k|  return H::combine(hash_internal::HashSelect::template Apply<T>::Invoke(
 1312|  1.55k|                        std::move(state), value),
 1313|  1.55k|                    values...);
 1314|  1.55k|}
_ZN4absl12lts_2024011613hash_internal10HashSelect14HashValueProbe6InvokeINS1_15MixingHashStateENSt3__15tupleIJRKNS6_4pairIPKvNS0_11string_viewEEEEEEEENS6_9enable_ifIXsr3std7is_sameIT_DTcl13AbslHashValueclsr3stdE4movefp_Efp0_EEEE5valueESH_E4typeESH_RKT0_:
  937|  1.55k|        H> {
  938|  1.55k|      return AbslHashValue(std::move(state), value);
  939|  1.55k|    }
_ZN4absl12lts_2024011613hash_internal13AbslHashValueINS1_15MixingHashStateEJRKNSt3__14pairIPKvNS0_11string_viewEEEEEENS4_9enable_ifIXsr4absl11conjunctionIDpNS1_11is_hashableIT0_EEEE5valueET_E4typeESH_RKNS4_5tupleIJDpSE_EEE:
  516|  1.55k|AbslHashValue(H hash_state, const std::tuple<Ts...>& t) {
  517|  1.55k|  return hash_internal::hash_tuple(std::move(hash_state), t,
  518|  1.55k|                                   absl::make_index_sequence<sizeof...(Ts)>());
  519|  1.55k|}
_ZN4absl12lts_2024011613hash_internal10hash_tupleINS1_15MixingHashStateENSt3__15tupleIJRKNS4_4pairIPKvNS0_11string_viewEEEEEEJLm0EEEET_SE_RKT0_NS4_16integer_sequenceImJXspT1_EEEE:
  503|  1.55k|H hash_tuple(H hash_state, const Tuple& t, absl::index_sequence<Is...>) {
  504|  1.55k|  return H::combine(std::move(hash_state), std::get<Is>(t)...);
  505|  1.55k|}
_ZNK4absl12lts_2024011613hash_internal8HashImplINSt3__15tupleIJRKNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEEEclERKSD_:
 1299|      4|  size_t operator()(const T& value) const {
 1300|      4|    return MixingHashState::hash(value);
 1301|      4|  }
_ZN4absl12lts_2024011613hash_internal15MixingHashState4hashINSt3__15tupleIJRKNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEEETnNS4_9enable_ifIXntsr16IntegralFastPathIT_EE5valueEiE4typeELi0EEEmRKSG_:
 1045|      4|  static size_t hash(const T& value) {
 1046|      4|    return static_cast<size_t>(combine(MixingHashState{}, value).state_);
 1047|      4|  }
_ZN4absl12lts_2024011613hash_internal13HashStateBaseINS1_15MixingHashStateEE7combineINSt3__15tupleIJRKNS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEEEEJEEES3_S3_RKT_DpRKT0_:
 1310|      4|H HashStateBase<H>::combine(H state, const T& value, const Ts&... values) {
 1311|      4|  return H::combine(hash_internal::HashSelect::template Apply<T>::Invoke(
 1312|      4|                        std::move(state), value),
 1313|      4|                    values...);
 1314|      4|}
_ZN4absl12lts_2024011613hash_internal10HashSelect14HashValueProbe6InvokeINS1_15MixingHashStateENSt3__15tupleIJRKNS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEEEEEENS6_9enable_ifIXsr3std7is_sameIT_DTcl13AbslHashValueclsr3stdE4movefp_Efp0_EEEE5valueESI_E4typeESI_RKT0_:
  937|      4|        H> {
  938|      4|      return AbslHashValue(std::move(state), value);
  939|      4|    }
_ZN4absl12lts_2024011613hash_internal13AbslHashValueINS1_15MixingHashStateEJRKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEEENS4_9enable_ifIXsr4absl11conjunctionIDpNS1_11is_hashableIT0_EEEE5valueET_E4typeESI_RKNS4_5tupleIJDpSF_EEE:
  516|      4|AbslHashValue(H hash_state, const std::tuple<Ts...>& t) {
  517|      4|  return hash_internal::hash_tuple(std::move(hash_state), t,
  518|      4|                                   absl::make_index_sequence<sizeof...(Ts)>());
  519|      4|}
_ZN4absl12lts_2024011613hash_internal10hash_tupleINS1_15MixingHashStateENSt3__15tupleIJRKNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEEEJLm0EEEET_SF_RKT0_NS4_16integer_sequenceImJXspT1_EEEE:
  503|      4|H hash_tuple(H hash_state, const Tuple& t, absl::index_sequence<Is...>) {
  504|      4|  return H::combine(std::move(hash_state), std::get<Is>(t)...);
  505|      4|}
_ZN4absl12lts_2024011613hash_internal13HashStateBaseINS1_15MixingHashStateEE7combineINSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEJEEES3_S3_RKT_DpRKT0_:
 1310|      4|H HashStateBase<H>::combine(H state, const T& value, const Ts&... values) {
 1311|      4|  return H::combine(hash_internal::HashSelect::template Apply<T>::Invoke(
 1312|      4|                        std::move(state), value),
 1313|      4|                    values...);
 1314|      4|}
_ZN4absl12lts_2024011613hash_internal10HashSelect14HashValueProbe6InvokeINS1_15MixingHashStateENSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEEENS6_9enable_ifIXsr3std7is_sameIT_DTcl13AbslHashValueclsr3stdE4movefp_Efp0_EEEE5valueESE_E4typeESE_RKT0_:
  937|      4|        H> {
  938|      4|      return AbslHashValue(std::move(state), value);
  939|      4|    }

_ZN4absl12lts_2024011613hash_internal12LowLevelHashEPKvmmPKm:
   32|  2.45k|                      const uint64_t salt[5]) {
   33|       |  // Prefetch the cacheline that data resides in.
   34|  2.45k|  PrefetchToLocalCache(data);
   35|  2.45k|  const uint8_t* ptr = static_cast<const uint8_t*>(data);
   36|  2.45k|  uint64_t starting_length = static_cast<uint64_t>(len);
   37|  2.45k|  uint64_t current_state = seed ^ salt[0];
   38|       |
   39|  2.45k|  if (len > 64) {
  ------------------
  |  Branch (39:7): [True: 14, False: 2.43k]
  ------------------
   40|       |    // If we have more than 64 bytes, we're going to handle chunks of 64
   41|       |    // bytes at a time. We're going to build up two separate hash states
   42|       |    // which we will then hash together.
   43|     14|    uint64_t duplicated_state = current_state;
   44|       |
   45|     14|    do {
   46|       |      // Always prefetch the next cacheline.
   47|     14|      PrefetchToLocalCache(ptr + ABSL_CACHELINE_SIZE);
  ------------------
  |  |   77|     14|#define ABSL_CACHELINE_SIZE 64
  ------------------
   48|       |
   49|     14|      uint64_t a = absl::base_internal::UnalignedLoad64(ptr);
   50|     14|      uint64_t b = absl::base_internal::UnalignedLoad64(ptr + 8);
   51|     14|      uint64_t c = absl::base_internal::UnalignedLoad64(ptr + 16);
   52|     14|      uint64_t d = absl::base_internal::UnalignedLoad64(ptr + 24);
   53|     14|      uint64_t e = absl::base_internal::UnalignedLoad64(ptr + 32);
   54|     14|      uint64_t f = absl::base_internal::UnalignedLoad64(ptr + 40);
   55|     14|      uint64_t g = absl::base_internal::UnalignedLoad64(ptr + 48);
   56|     14|      uint64_t h = absl::base_internal::UnalignedLoad64(ptr + 56);
   57|       |
   58|     14|      uint64_t cs0 = Mix(a ^ salt[1], b ^ current_state);
   59|     14|      uint64_t cs1 = Mix(c ^ salt[2], d ^ current_state);
   60|     14|      current_state = (cs0 ^ cs1);
   61|       |
   62|     14|      uint64_t ds0 = Mix(e ^ salt[3], f ^ duplicated_state);
   63|     14|      uint64_t ds1 = Mix(g ^ salt[4], h ^ duplicated_state);
   64|     14|      duplicated_state = (ds0 ^ ds1);
   65|       |
   66|     14|      ptr += 64;
   67|     14|      len -= 64;
   68|     14|    } while (len > 64);
  ------------------
  |  Branch (68:14): [True: 0, False: 14]
  ------------------
   69|       |
   70|     14|    current_state = current_state ^ duplicated_state;
   71|     14|  }
   72|       |
   73|       |  // We now have a data `ptr` with at most 64 bytes and the current state
   74|       |  // of the hashing state machine stored in current_state.
   75|  6.49k|  while (len > 16) {
  ------------------
  |  Branch (75:10): [True: 4.04k, False: 2.45k]
  ------------------
   76|  4.04k|    uint64_t a = absl::base_internal::UnalignedLoad64(ptr);
   77|  4.04k|    uint64_t b = absl::base_internal::UnalignedLoad64(ptr + 8);
   78|       |
   79|  4.04k|    current_state = Mix(a ^ salt[1], b ^ current_state);
   80|       |
   81|  4.04k|    ptr += 16;
   82|  4.04k|    len -= 16;
   83|  4.04k|  }
   84|       |
   85|       |  // We now have a data `ptr` with at most 16 bytes.
   86|  2.45k|  uint64_t a = 0;
   87|  2.45k|  uint64_t b = 0;
   88|  2.45k|  if (len > 8) {
  ------------------
  |  Branch (88:7): [True: 914, False: 1.53k]
  ------------------
   89|       |    // When we have at least 9 and at most 16 bytes, set A to the first 64
   90|       |    // bits of the input and B to the last 64 bits of the input. Yes, they will
   91|       |    // overlap in the middle if we are working with less than the full 16
   92|       |    // bytes.
   93|    914|    a = absl::base_internal::UnalignedLoad64(ptr);
   94|    914|    b = absl::base_internal::UnalignedLoad64(ptr + len - 8);
   95|  1.53k|  } else if (len > 3) {
  ------------------
  |  Branch (95:14): [True: 947, False: 592]
  ------------------
   96|       |    // If we have at least 4 and at most 8 bytes, set A to the first 32
   97|       |    // bits and B to the last 32 bits.
   98|    947|    a = absl::base_internal::UnalignedLoad32(ptr);
   99|    947|    b = absl::base_internal::UnalignedLoad32(ptr + len - 4);
  100|    947|  } else if (len > 0) {
  ------------------
  |  Branch (100:14): [True: 592, False: 0]
  ------------------
  101|       |    // If we have at least 1 and at most 3 bytes, read all of the provided
  102|       |    // bits into A, with some adjustments.
  103|    592|    a = static_cast<uint64_t>((ptr[0] << 16) | (ptr[len >> 1] << 8) |
  104|    592|                              ptr[len - 1]);
  105|    592|    b = 0;
  106|    592|  } else {
  107|      0|    a = 0;
  108|      0|    b = 0;
  109|      0|  }
  110|       |
  111|  2.45k|  uint64_t w = Mix(a ^ salt[1], b ^ current_state);
  112|  2.45k|  uint64_t z = salt[1] ^ starting_length;
  113|  2.45k|  return Mix(w, z);
  114|  2.45k|}
low_level_hash.cc:_ZN4absl12lts_2024011613hash_internalL3MixEmm:
   25|  9.00k|static uint64_t Mix(uint64_t v0, uint64_t v1) {
   26|  9.00k|  absl::uint128 p = v0;
   27|  9.00k|  p *= v1;
   28|  9.00k|  return absl::Uint128Low64(p) ^ absl::Uint128High64(p);
   29|  9.00k|}

_ZN4absl12lts_2024011612log_internal21GetReferenceableValueIN6google8protobuf8internal18EpsCopyInputStreamUt0_EEERKT_SA_:
  386|      2|inline constexpr const T& GetReferenceableValue(const T& t) {
  387|      2|  return t;
  388|      2|}
_ZN4absl12lts_2024011612log_internal12Check_LEImplIiN6google8protobuf8internal18EpsCopyInputStreamUt0_EEEPNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEERKT_RKT0_PKc:
  348|      2|                                             const char* exprtext) {     \
  349|      2|    using U1 = CheckOpStreamType<T1>;                                    \
  350|      2|    using U2 = CheckOpStreamType<T2>;                                    \
  351|      2|    return ABSL_PREDICT_TRUE(v1 op v2)                                   \
  ------------------
  |  |  179|      2|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 2, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 2]
  |  |  |  Branch (179:57): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  352|      2|               ? nullptr                                                 \
  353|      2|               : ABSL_LOG_INTERNAL_CHECK_OP_IMPL_RESULT(U1, U2, v1, v2,  \
  ------------------
  |  |  338|      0|  MakeCheckOpString<U1, U2>(v1, v2, exprtext)
  ------------------
  354|      2|                                                        exprtext);       \
  355|      2|  }                                                                      \
_ZN4absl12lts_2024011612log_internal12Check_EQImplIPKN6google8protobuf8internal9ClassDataES8_EEPNSt3__112basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEERKT_RKT0_PKc:
  348|    749|                                             const char* exprtext) {     \
  349|    749|    using U1 = CheckOpStreamType<T1>;                                    \
  350|    749|    using U2 = CheckOpStreamType<T2>;                                    \
  351|    749|    return ABSL_PREDICT_TRUE(v1 op v2)                                   \
  ------------------
  |  |  179|    749|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 749, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 749]
  |  |  |  Branch (179:57): [True: 749, False: 0]
  |  |  ------------------
  ------------------
  352|    749|               ? nullptr                                                 \
  353|    749|               : ABSL_LOG_INTERNAL_CHECK_OP_IMPL_RESULT(U1, U2, v1, v2,  \
  ------------------
  |  |  338|      0|  MakeCheckOpString<U1, U2>(v1, v2, exprtext)
  ------------------
  354|    749|                                                        exprtext);       \
  355|    749|  }                                                                      \
_ZN4absl12lts_2024011612log_internal21GetReferenceableValueIPKN6google8protobuf8internal9ClassDataEEERKT_SB_:
  386|  1.49k|inline constexpr const T& GetReferenceableValue(const T& t) {
  387|  1.49k|  return t;
  388|  1.49k|}
_ZN4absl12lts_2024011612log_internal12Check_EQImplIPKN6google8protobuf15FieldDescriptorES7_EEPNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEERKT_RKT0_PKc:
  348|      5|                                             const char* exprtext) {     \
  349|      5|    using U1 = CheckOpStreamType<T1>;                                    \
  350|      5|    using U2 = CheckOpStreamType<T2>;                                    \
  351|      5|    return ABSL_PREDICT_TRUE(v1 op v2)                                   \
  ------------------
  |  |  179|      5|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 5, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 5]
  |  |  |  Branch (179:57): [True: 5, False: 0]
  |  |  ------------------
  ------------------
  352|      5|               ? nullptr                                                 \
  353|      5|               : ABSL_LOG_INTERNAL_CHECK_OP_IMPL_RESULT(U1, U2, v1, v2,  \
  ------------------
  |  |  338|      0|  MakeCheckOpString<U1, U2>(v1, v2, exprtext)
  ------------------
  354|      5|                                                        exprtext);       \
  355|      5|  }                                                                      \
_ZN4absl12lts_2024011612log_internal21GetReferenceableValueIPKN6google8protobuf15FieldDescriptorEEERKT_SA_:
  386|     10|inline constexpr const T& GetReferenceableValue(const T& t) {
  387|     10|  return t;
  388|     10|}

_ZN4absl12lts_2024011611countr_zeroImEENSt3__19enable_ifIXsr3std11is_unsignedIT_EE5valueEiE4typeES4_:
  118|    520|    countr_zero(T x) noexcept {
  119|    520|  return numeric_internal::CountTrailingZeroes(x);
  120|    520|}
_ZN4absl12lts_202401164rotrImEENSt3__19enable_ifIXsr3std11is_unsignedIT_EE5valueES4_E4typeES4_i:
   75|    874|    rotr(T x, int s) noexcept {
   76|    874|  return numeric_internal::RotateRight(x, s);
   77|    874|}
_ZN4absl12lts_2024011611countr_zeroItEENSt3__19enable_ifIXsr3std11is_unsignedIT_EE5valueEiE4typeES4_:
  118|  3.93k|    countr_zero(T x) noexcept {
  119|  3.93k|  return numeric_internal::CountTrailingZeroes(x);
  120|  3.93k|}
_ZN4absl12lts_202401168popcountIjEENSt3__19enable_ifIXsr3std11is_unsignedIT_EE5valueEiE4typeES4_:
  133|  13.3k|    popcount(T x) noexcept {
  134|  13.3k|  return numeric_internal::Popcount(x);
  135|  13.3k|}

_ZN4absl12lts_202401167uint128mLES1_:
  628|  9.00k|inline uint128& uint128::operator*=(uint128 other) {
  629|  9.00k|  *this = *this * other;
  630|  9.00k|  return *this;
  631|  9.00k|}
_ZN4absl12lts_2024011612Uint128Low64ENS0_7uint128E:
  643|  9.00k|constexpr uint64_t Uint128Low64(uint128 v) { return v.lo_; }
_ZN4absl12lts_2024011613Uint128High64ENS0_7uint128E:
  645|  9.00k|constexpr uint64_t Uint128High64(uint128 v) { return v.hi_; }
_ZNK4absl12lts_202401167uint128cvoEv:
  776|  18.0k|constexpr uint128::operator unsigned __int128() const {
  777|  18.0k|  return (static_cast<unsigned __int128>(hi_) << 64) + lo_;
  778|  18.0k|}
_ZN4absl12lts_20240116mlENS0_7uint128ES1_:
  982|  9.00k|inline uint128 operator*(uint128 lhs, uint128 rhs) {
  983|  9.00k|#if defined(ABSL_HAVE_INTRINSIC_INT128)
  984|       |  // TODO(strel) Remove once alignment issues are resolved and unsigned __int128
  985|       |  // can be used for uint128 storage.
  986|  9.00k|  return static_cast<unsigned __int128>(lhs) *
  987|  9.00k|         static_cast<unsigned __int128>(rhs);
  988|       |#elif defined(_MSC_VER) && defined(_M_X64) && !defined(_M_ARM64EC)
  989|       |  uint64_t carry;
  990|       |  uint64_t low = _umul128(Uint128Low64(lhs), Uint128Low64(rhs), &carry);
  991|       |  return MakeUint128(Uint128Low64(lhs) * Uint128High64(rhs) +
  992|       |                         Uint128High64(lhs) * Uint128Low64(rhs) + carry,
  993|       |                     low);
  994|       |#else   // ABSL_HAVE_INTRINSIC128
  995|       |  uint64_t a32 = Uint128Low64(lhs) >> 32;
  996|       |  uint64_t a00 = Uint128Low64(lhs) & 0xffffffff;
  997|       |  uint64_t b32 = Uint128Low64(rhs) >> 32;
  998|       |  uint64_t b00 = Uint128Low64(rhs) & 0xffffffff;
  999|       |  uint128 result =
 1000|       |      MakeUint128(Uint128High64(lhs) * Uint128Low64(rhs) +
 1001|       |                      Uint128Low64(lhs) * Uint128High64(rhs) + a32 * b32,
 1002|       |                  a00 * b00);
 1003|       |  result += uint128(a32 * b00) << 32;
 1004|       |  result += uint128(a00 * b32) << 32;
 1005|       |  return result;
 1006|       |#endif  // ABSL_HAVE_INTRINSIC128
 1007|  9.00k|}
_ZN4absl12lts_202401167uint128C2Eo:
  674|  9.00k|    : lo_{static_cast<uint64_t>(v & ~uint64_t{0})},
  675|  9.00k|      hi_{static_cast<uint64_t>(v >> 64)} {}
_ZN4absl12lts_202401167uint128C2Em:
  665|  18.0k|constexpr uint128::uint128(unsigned long v) : lo_{v}, hi_{0} {}

_ZN4absl12lts_2024011616numeric_internal10Popcount32Ej:
   96|  13.3k|Popcount32(uint32_t x) noexcept {
   97|  13.3k|#if ABSL_NUMERIC_INTERNAL_HAVE_BUILTIN_OR_GCC(__builtin_popcount)
   98|  13.3k|  static_assert(sizeof(unsigned int) == sizeof(x),
   99|  13.3k|                "__builtin_popcount does not take 32-bit arg");
  100|  13.3k|  return __builtin_popcount(x);
  101|       |#else
  102|       |  x -= ((x >> 1) & 0x55555555);
  103|       |  x = ((x >> 2) & 0x33333333) + (x & 0x33333333);
  104|       |  return static_cast<int>((((x + (x >> 4)) & 0xF0F0F0F) * 0x1010101) >> 24);
  105|       |#endif
  106|  13.3k|}
_ZN4absl12lts_2024011616numeric_internal28CountTrailingZeroesNonzero64Em:
  273|    520|CountTrailingZeroesNonzero64(uint64_t x) {
  274|    520|#if ABSL_NUMERIC_INTERNAL_HAVE_BUILTIN_OR_GCC(__builtin_ctzll)
  275|    520|  static_assert(sizeof(unsigned long long) == sizeof(x),  // NOLINT(runtime/int)
  276|    520|                "__builtin_ctzll does not take 64-bit arg");
  277|    520|  return __builtin_ctzll(x);
  278|       |#elif defined(_MSC_VER) && !defined(__clang__) && \
  279|       |    (defined(_M_X64) || defined(_M_ARM64))
  280|       |  unsigned long result = 0;  // NOLINT(runtime/int)
  281|       |  _BitScanForward64(&result, x);
  282|       |  return result;
  283|       |#elif defined(_MSC_VER) && !defined(__clang__)
  284|       |  unsigned long result = 0;  // NOLINT(runtime/int)
  285|       |  if (static_cast<uint32_t>(x) == 0) {
  286|       |    _BitScanForward(&result, static_cast<unsigned long>(x >> 32));
  287|       |    return result + 32;
  288|       |  }
  289|       |  _BitScanForward(&result, static_cast<unsigned long>(x));
  290|       |  return result;
  291|       |#else
  292|       |  int c = 63;
  293|       |  x &= ~x + 1;
  294|       |  if (x & 0x00000000FFFFFFFF) c -= 32;
  295|       |  if (x & 0x0000FFFF0000FFFF) c -= 16;
  296|       |  if (x & 0x00FF00FF00FF00FF) c -= 8;
  297|       |  if (x & 0x0F0F0F0F0F0F0F0F) c -= 4;
  298|       |  if (x & 0x3333333333333333) c -= 2;
  299|       |  if (x & 0x5555555555555555) c -= 1;
  300|       |  return c;
  301|       |#endif
  302|    520|}
_ZN4absl12lts_2024011616numeric_internal28CountTrailingZeroesNonzero16Et:
  305|  3.93k|CountTrailingZeroesNonzero16(uint16_t x) {
  306|  3.93k|#if ABSL_HAVE_BUILTIN(__builtin_ctzs)
  307|  3.93k|  static_assert(sizeof(unsigned short) == sizeof(x),  // NOLINT(runtime/int)
  308|  3.93k|                "__builtin_ctzs does not take 16-bit arg");
  309|  3.93k|  return __builtin_ctzs(x);
  310|       |#else
  311|       |  return CountTrailingZeroesNonzero32(x);
  312|       |#endif
  313|  3.93k|}
_ZN4absl12lts_2024011616numeric_internal19CountTrailingZeroesImEEiT_:
  317|    520|CountTrailingZeroes(T x) noexcept {
  318|    520|  static_assert(std::is_unsigned<T>::value, "T must be unsigned");
  319|    520|  static_assert(IsPowerOf2(std::numeric_limits<T>::digits),
  320|    520|                "T must have a power-of-2 size");
  321|    520|  static_assert(sizeof(T) <= sizeof(uint64_t), "T too large");
  322|    520|  return x == 0 ? std::numeric_limits<T>::digits
  ------------------
  |  Branch (322:10): [True: 0, False: 520]
  ------------------
  323|    520|                : (sizeof(T) <= sizeof(uint16_t)
  ------------------
  |  Branch (323:20): [Folded, False: 520]
  ------------------
  324|    520|                       ? CountTrailingZeroesNonzero16(static_cast<uint16_t>(x))
  325|    520|                       : (sizeof(T) <= sizeof(uint32_t)
  ------------------
  |  Branch (325:27): [Folded, False: 520]
  ------------------
  326|    520|                              ? CountTrailingZeroesNonzero32(
  327|      0|                                    static_cast<uint32_t>(x))
  328|    520|                              : CountTrailingZeroesNonzero64(x)));
  329|    520|}
_ZN4absl12lts_2024011616numeric_internal11RotateRightImEET_S3_i:
   75|    874|    T x, int s) noexcept {
   76|    874|  static_assert(std::is_unsigned<T>::value, "T must be unsigned");
   77|    874|  static_assert(IsPowerOf2(std::numeric_limits<T>::digits),
   78|    874|                "T must have a power-of-2 size");
   79|       |
   80|    874|  return static_cast<T>(x >> (s & (std::numeric_limits<T>::digits - 1))) |
   81|    874|         static_cast<T>(x << ((-s) & (std::numeric_limits<T>::digits - 1)));
   82|    874|}
_ZN4absl12lts_2024011616numeric_internal19CountTrailingZeroesItEEiT_:
  317|  3.93k|CountTrailingZeroes(T x) noexcept {
  318|  3.93k|  static_assert(std::is_unsigned<T>::value, "T must be unsigned");
  319|  3.93k|  static_assert(IsPowerOf2(std::numeric_limits<T>::digits),
  320|  3.93k|                "T must have a power-of-2 size");
  321|  3.93k|  static_assert(sizeof(T) <= sizeof(uint64_t), "T too large");
  322|  3.93k|  return x == 0 ? std::numeric_limits<T>::digits
  ------------------
  |  Branch (322:10): [True: 0, False: 3.93k]
  ------------------
  323|  3.93k|                : (sizeof(T) <= sizeof(uint16_t)
  ------------------
  |  Branch (323:20): [True: 3.93k, Folded]
  ------------------
  324|  3.93k|                       ? CountTrailingZeroesNonzero16(static_cast<uint16_t>(x))
  325|  3.93k|                       : (sizeof(T) <= sizeof(uint32_t)
  ------------------
  |  Branch (325:27): [True: 0, Folded]
  ------------------
  326|      0|                              ? CountTrailingZeroesNonzero32(
  327|      0|                                    static_cast<uint32_t>(x))
  328|      0|                              : CountTrailingZeroesNonzero64(x)));
  329|  3.93k|}
_ZN4absl12lts_2024011616numeric_internal8PopcountIjEEiT_:
  124|  13.3k|Popcount(T x) noexcept {
  125|  13.3k|  static_assert(std::is_unsigned<T>::value, "T must be unsigned");
  126|  13.3k|  static_assert(IsPowerOf2(std::numeric_limits<T>::digits),
  127|  13.3k|                "T must have a power-of-2 size");
  128|  13.3k|  static_assert(sizeof(x) <= sizeof(uint64_t), "T is too large");
  129|  13.3k|  return sizeof(x) <= sizeof(uint32_t) ? Popcount32(x) : Popcount64(x);
  ------------------
  |  Branch (129:10): [True: 13.3k, Folded]
  ------------------
  130|  13.3k|}

_ZN4absl12lts_2024011617internal_statusor12StatusOrDataIN6google8protobuf15FeatureResolverEED2Ev:
  229|      4|  ~StatusOrData() {
  230|      4|    if (ok()) {
  ------------------
  |  Branch (230:9): [True: 4, False: 0]
  ------------------
  231|      4|      status_.~Status();
  232|      4|      data_.~T();
  233|      4|    } else {
  234|      0|      status_.~Status();
  235|      0|    }
  236|      4|  }
_ZNK4absl12lts_2024011617internal_statusor12StatusOrDataIN6google8protobuf15FeatureResolverEE2okEv:
  255|      4|  bool ok() const { return status_.ok(); }
_ZNK4absl12lts_2024011617internal_statusor12StatusOrDataIN6google8protobuf10FeatureSetEE8EnsureOkEv:
  280|    239|  void EnsureOk() const {
  281|    239|    if (ABSL_PREDICT_FALSE(!ok())) Helper::Crash(status_);
  ------------------
  |  |  178|    239|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 239]
  |  |  |  Branch (178:49): [Folded, False: 239]
  |  |  |  Branch (178:58): [True: 0, False: 239]
  |  |  ------------------
  ------------------
  282|    239|  }
_ZNK4absl12lts_2024011617internal_statusor12StatusOrDataIN6google8protobuf10FeatureSetEE2okEv:
  255|    478|  bool ok() const { return status_.ok(); }
_ZN4absl12lts_2024011617internal_statusor12StatusOrDataIN6google8protobuf10FeatureSetEED2Ev:
  229|    239|  ~StatusOrData() {
  230|    239|    if (ok()) {
  ------------------
  |  Branch (230:9): [True: 239, False: 0]
  ------------------
  231|    239|      status_.~Status();
  232|    239|      data_.~T();
  233|    239|    } else {
  234|      0|      status_.~Status();
  235|      0|    }
  236|    239|  }
_ZN4absl12lts_2024011617internal_statusor12StatusOrDataIN6google8protobuf10FeatureSetEE10MakeStatusIJEEEvDpOT_:
  298|    239|  void MakeStatus(Args&&... args) {
  299|    239|    internal_statusor::PlacementNew<Status>(&status_,
  300|    239|                                            std::forward<Args>(args)...);
  301|    239|  }
_ZN4absl12lts_2024011617internal_statusor12PlacementNewINS0_6StatusEJEEEvPvDpOT0_:
  138|    243|void PlacementNew(absl::Nonnull<void*> p, Args&&... args) {
  139|    243|  new (p) T(std::forward<Args>(args)...);
  140|    243|}
_ZN4absl12lts_2024011617internal_statusor12StatusOrDataIN6google8protobuf15FeatureResolverEE10MakeStatusIJEEEvDpOT_:
  298|      4|  void MakeStatus(Args&&... args) {
  299|      4|    internal_statusor::PlacementNew<Status>(&status_,
  300|      4|                                            std::forward<Args>(args)...);
  301|      4|  }
_ZN4absl12lts_2024011617internal_statusor12StatusOrDataIN6google8protobuf15FeatureResolverEEC2IJS5_EEENS0_10in_place_tEDpOT_:
  193|      4|      : data_(std::forward<Args>(args)...) {
  194|      4|    MakeStatus();
  195|      4|  }
_ZN4absl12lts_2024011617internal_statusor12StatusOrDataIN6google8protobuf10FeatureSetEEC2IJS5_EEENS0_10in_place_tEDpOT_:
  193|    239|      : data_(std::forward<Args>(args)...) {
  194|    239|    MakeStatus();
  195|    239|  }

_ZN4absl12lts_202401168OkStatusEv:
  924|    255|inline Status OkStatus() { return Status(); }
_ZN4absl12lts_202401166StatusC2Ev:
  772|    498|inline Status::Status() : Status(absl::StatusCode::kOk) {}
_ZN4absl12lts_202401166StatusC2ENS0_10StatusCodeE:
  774|    498|inline Status::Status(absl::StatusCode code) : Status(CodeToInlinedRep(code)) {}
_ZN4absl12lts_202401166Status16CodeToInlinedRepENS0_10StatusCodeE:
  892|  1.48k|constexpr uintptr_t Status::CodeToInlinedRep(absl::StatusCode code) {
  893|  1.48k|  return (static_cast<uintptr_t>(code) << 2) + 1;
  894|  1.48k|}
_ZN4absl12lts_202401166StatusC2Em:
  619|    498|  explicit Status(uintptr_t rep) : rep_(rep) {}
_ZNK4absl12lts_202401166Status2okEv:
  816|    984|inline bool Status::ok() const {
  817|    984|  return rep_ == CodeToInlinedRep(absl::StatusCode::kOk);
  818|    984|}
_ZN4absl12lts_202401166StatusD2Ev:
  814|    498|inline Status::~Status() { Unref(rep_); }
_ZN4absl12lts_202401166Status5UnrefEm:
  920|    498|inline void Status::Unref(uintptr_t rep) {
  921|    498|  if (!IsInlined(rep)) RepToPointer(rep)->Unref();
  ------------------
  |  Branch (921:7): [True: 0, False: 498]
  ------------------
  922|    498|}
_ZN4absl12lts_202401166Status9IsInlinedEm:
  888|    498|constexpr bool Status::IsInlined(uintptr_t rep) { return (rep & 1) != 0; }

_ZNK4absl12lts_202401168StatusOrIN6google8protobuf10FeatureSetEE2okEv:
  494|    239|  ABSL_MUST_USE_RESULT bool ok() const { return this->status_.ok(); }
_ZNO4absl12lts_202401168StatusOrIN6google8protobuf10FeatureSetEEdeEv:
  787|    239|T&& StatusOr<T>::operator*() && {
  788|    239|  this->EnsureOk();
  789|    239|  return std::move(this->data_);
  790|    239|}
_ZNK4absl12lts_202401168StatusOrIN6google8protobuf15FeatureResolverEE2okEv:
  494|      8|  ABSL_MUST_USE_RESULT bool ok() const { return this->status_.ok(); }
_ZNO4absl12lts_202401168StatusOrIN6google8protobuf15FeatureResolverEE5valueEv:
  761|      4|T&& StatusOr<T>::value() && {
  762|      4|  if (!this->ok()) {
  ------------------
  |  Branch (762:7): [True: 0, False: 4]
  ------------------
  763|      0|    internal_statusor::ThrowBadStatusOrAccess(std::move(this->status_));
  764|      0|  }
  765|      4|  return std::move(this->data_);
  766|      4|}
_ZN4absl12lts_202401168StatusOrIN6google8protobuf15FeatureResolverEEC2IS4_TnNSt3__19enable_ifIXsr4absl11conjunctionINS0_11disjunctionIJNS7_7is_sameIS4_NS0_12remove_cvrefIOT_E4typeEEENS0_8negationINS9_IJNSA_IS5_SF_EENSA_INS0_6StatusESF_EENSA_INS0_10in_place_tESF_EENS0_17internal_statusor31IsDirectInitializationAmbiguousIS4_SD_EEEEEEEEEENS7_16is_constructibleIS4_JSD_EEENS7_14is_convertibleISD_S4_EENS9_IJNSA_INSB_ISC_E4typeES4_EENS0_11conjunctionIJNSH_INSV_ISD_SJ_EEEENSH_INSN_31HasConversionOperatorToStatusOrIS4_SD_vEEEEEEEEEEEE5valueEiE4typeELi0EEESD_:
  460|      4|      : StatusOr(absl::in_place, std::forward<U>(u)) {}
_ZN4absl12lts_202401168StatusOrIN6google8protobuf15FeatureResolverEEC2IJS4_EEENS0_10in_place_tEDpOT_:
  723|      4|    : Base(absl::in_place, std::forward<Args>(args)...) {}
_ZN4absl12lts_202401168StatusOrIN6google8protobuf10FeatureSetEEC2IS4_TnNSt3__19enable_ifIXsr4absl11conjunctionINS0_11disjunctionIJNS7_7is_sameIS4_NS0_12remove_cvrefIOT_E4typeEEENS0_8negationINS9_IJNSA_IS5_SF_EENSA_INS0_6StatusESF_EENSA_INS0_10in_place_tESF_EENS0_17internal_statusor31IsDirectInitializationAmbiguousIS4_SD_EEEEEEEEEENS7_16is_constructibleIS4_JSD_EEENS7_14is_convertibleISD_S4_EENS9_IJNSA_INSB_ISC_E4typeES4_EENS0_11conjunctionIJNSH_INSV_ISD_SJ_EEEENSH_INSN_31HasConversionOperatorToStatusOrIS4_SD_vEEEEEEEEEEEE5valueEiE4typeELi0EEESD_:
  460|    239|      : StatusOr(absl::in_place, std::forward<U>(u)) {}
_ZN4absl12lts_202401168StatusOrIN6google8protobuf10FeatureSetEEC2IJS4_EEENS0_10in_place_tEDpOT_:
  723|    239|    : Base(absl::in_place, std::forward<Args>(args)...) {}

_ZN4absl12lts_2024011613ascii_tolowerEh:
  165|    125|inline char ascii_tolower(unsigned char c) {
  166|    125|  return ascii_internal::kToLower[c];
  167|    125|}
_ZN4absl12lts_2024011613ascii_toupperEh:
  183|    161|inline char ascii_toupper(unsigned char c) {
  184|    161|  return ascii_internal::kToUpper[c];
  185|    161|}

_ZN4absl12lts_2024011616strings_internal28STLStringResizeUninitializedINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEvEEvPT_m:
   67|  21.6k|inline void STLStringResizeUninitialized(string_type* s, size_t new_size) {
   68|  21.6k|  ResizeUninitializedTraits<string_type>::Resize(s, new_size);
   69|  21.6k|}
_ZN4absl12lts_2024011616strings_internal25ResizeUninitializedTraitsINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEvE6ResizeEPS9_m:
   47|  21.6k|  static void Resize(string_type* s, size_t new_size) {
   48|  21.6k|    s->__resize_default_init(new_size);
   49|  21.6k|  }
_ZN4absl12lts_2024011616strings_internal25AppendUninitializedTraitsINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEvE6AppendEPS9_m:
   96|    263|  static void Append(string_type* s, size_t n) {
   97|    263|    s->__append_default_init(n);
   98|    263|  }
_ZN4absl12lts_2024011616strings_internal37STLStringResizeUninitializedAmortizedINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEvPT_m:
  106|    258|void STLStringResizeUninitializedAmortized(string_type* s, size_t new_size) {
  107|    258|  const size_t size = s->size();
  108|    258|  if (new_size > size) {
  ------------------
  |  Branch (108:7): [True: 258, False: 0]
  ------------------
  109|    258|    AppendUninitializedTraits<string_type>::Append(s, new_size - size);
  110|    258|  } else {
  111|      0|    s->erase(new_size);
  112|      0|  }
  113|    258|}

_ZN4absl12lts_2024011611StrContainsENS0_11string_viewEc:
   51|    509|inline bool StrContains(absl::string_view haystack, char needle) noexcept {
   52|    509|  return haystack.find(needle) != haystack.npos;
   53|    509|}
_ZN4absl12lts_2024011610StartsWithENS0_11string_viewES1_:
   59|    110|                       absl::string_view prefix) noexcept {
   60|    110|  return prefix.empty() ||
  ------------------
  |  Branch (60:10): [True: 0, False: 110]
  ------------------
   61|    110|         (text.size() >= prefix.size() &&
  ------------------
  |  Branch (61:11): [True: 73, False: 37]
  ------------------
   62|     73|          memcmp(text.data(), prefix.data(), prefix.size()) == 0);
  ------------------
  |  Branch (62:11): [True: 1, False: 72]
  ------------------
   63|    110|}

_ZN4absl12lts_202401166StrCatERKNS0_8AlphaNumES3_:
   58|      4|std::string StrCat(const AlphaNum& a, const AlphaNum& b) {
   59|      4|  std::string result;
   60|      4|  absl::strings_internal::STLStringResizeUninitialized(&result,
   61|      4|                                                       a.size() + b.size());
   62|      4|  char* const begin = &result[0];
   63|      4|  char* out = begin;
   64|      4|  out = Append(out, a);
   65|      4|  out = Append(out, b);
   66|       |  assert(out == begin + result.size());
   67|      4|  return result;
   68|      4|}
_ZN4absl12lts_202401166StrCatERKNS0_8AlphaNumES3_S3_:
   70|    482|std::string StrCat(const AlphaNum& a, const AlphaNum& b, const AlphaNum& c) {
   71|    482|  std::string result;
   72|    482|  strings_internal::STLStringResizeUninitialized(
   73|    482|      &result, a.size() + b.size() + c.size());
   74|    482|  char* const begin = &result[0];
   75|    482|  char* out = begin;
   76|    482|  out = Append(out, a);
   77|    482|  out = Append(out, b);
   78|    482|  out = Append(out, c);
   79|       |  assert(out == begin + result.size());
   80|    482|  return result;
   81|    482|}
_ZN4absl12lts_2024011616strings_internal37STLStringAppendUninitializedAmortizedEPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEm:
  102|      5|                                           size_t to_append) {
  103|      5|  strings_internal::AppendUninitializedTraits<std::string>::Append(dest,
  104|      5|                                                                   to_append);
  105|      5|}
_ZN4absl12lts_202401169StrAppendEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS0_8AlphaNumESB_:
  288|      5|               const AlphaNum& b) {
  289|      5|  ASSERT_NO_OVERLAP(*dest, a);
  ------------------
  |  |  250|      5|  assert(((src).size() == 0) ||      \
  |  |  251|      5|         (uintptr_t((src).data() - (dest).data()) > uintptr_t((dest).size())))
  ------------------
  290|      5|  ASSERT_NO_OVERLAP(*dest, b);
  ------------------
  |  |  250|      5|  assert(((src).size() == 0) ||      \
  |  |  251|      5|         (uintptr_t((src).data() - (dest).data()) > uintptr_t((dest).size())))
  ------------------
  291|      5|  std::string::size_type old_size = dest->size();
  292|      5|  strings_internal::STLStringAppendUninitializedAmortized(dest,
  293|      5|                                                          a.size() + b.size());
  294|      5|  char* const begin = &(*dest)[0];
  295|      5|  char* out = begin + old_size;
  296|      5|  out = Append(out, a);
  297|      5|  out = Append(out, b);
  298|       |  assert(out == begin + dest->size());
  299|      5|}
str_cat.cc:_ZN4absl12lts_2024011612_GLOBAL__N_16AppendEPcRKNS0_8AlphaNumE:
   46|  1.46k|absl::Nonnull<char*> Append(absl::Nonnull<char*> out, const AlphaNum& x) {
   47|       |  // memcpy is allowed to overwrite arbitrary memory, so doing this after the
   48|       |  // call would force an extra fetch of x.size().
   49|  1.46k|  char* after = out + x.size();
   50|  1.46k|  if (x.size() != 0) {
  ------------------
  |  Branch (50:7): [True: 1.46k, False: 0]
  ------------------
   51|  1.46k|    memcpy(out, x.data(), x.size());
   52|  1.46k|  }
   53|  1.46k|  return after;
   54|  1.46k|}

_ZN4absl12lts_202401168AlphaNumC2EPKc:
  353|    491|      : piece_(NullSafeStringView(c_str)) {}
_ZN4absl12lts_202401168AlphaNumC2ENS0_11string_viewE:
  356|    969|      : piece_(pc) {}
_ZNK4absl12lts_202401168AlphaNum4sizeEv:
  377|  5.85k|  absl::string_view::size_type size() const { return piece_.size(); }
_ZNK4absl12lts_202401168AlphaNum4dataEv:
  378|  1.46k|  absl::Nullable<const char*> data() const { return piece_.data(); }
_ZN4absl12lts_202401168AlphaNumC2INSt3__19allocatorIcEEEERKNS3_12basic_stringIcNS3_11char_traitsIcEET_EE:
  369|      4|      : piece_(str) {}

_ZNK4absl12lts_2024011611string_view4findEcm:
  118|    514|string_view::size_type string_view::find(char c, size_type pos) const noexcept {
  119|    514|  if (empty() || pos >= length_) {
  ------------------
  |  Branch (119:7): [True: 0, False: 514]
  |  Branch (119:18): [True: 0, False: 514]
  ------------------
  120|      0|    return npos;
  121|      0|  }
  122|    514|  const char* result =
  123|    514|      static_cast<const char*>(memchr(ptr_ + pos, c, length_ - pos));
  124|    514|  return result != nullptr ? static_cast<size_type>(result - ptr_) : npos;
  ------------------
  |  Branch (124:10): [True: 0, False: 514]
  ------------------
  125|    514|}
_ZNK4absl12lts_2024011611string_view5rfindEcm:
  138|      6|                                          size_type pos) const noexcept {
  139|       |  // Note: memrchr() is not available on Windows.
  140|      6|  if (empty()) return npos;
  ------------------
  |  Branch (140:7): [True: 0, False: 6]
  ------------------
  141|     34|  for (size_type i = std::min(pos, length_ - 1);; --i) {
  142|     34|    if (ptr_[i] == c) {
  ------------------
  |  Branch (142:9): [True: 3, False: 31]
  ------------------
  143|      3|      return i;
  144|      3|    }
  145|     31|    if (i == 0) break;
  ------------------
  |  Branch (145:9): [True: 3, False: 28]
  ------------------
  146|     31|  }
  147|      3|  return npos;
  148|      6|}

_ZN4absl12lts_2024011611string_viewC2Ev:
  180|      5|  constexpr string_view() noexcept : ptr_(nullptr), length_(0) {}
_ZN4absl12lts_2024011611string_viewC2EPKcm:
  204|    935|      : ptr_(data), length_(CheckLengthInternal(len)) {}
_ZNK4absl12lts_2024011611string_view5beginEv:
  216|  1.16k|  constexpr const_iterator begin() const noexcept { return ptr_; }
_ZNK4absl12lts_2024011611string_view3endEv:
  223|  1.16k|  constexpr const_iterator end() const noexcept { return ptr_ + length_; }
_ZNK4absl12lts_2024011611string_view4sizeEv:
  273|  28.0k|  constexpr size_type size() const noexcept { return length_; }
_ZNK4absl12lts_2024011611string_view6lengthEv:
  278|  2.93k|  constexpr size_type length() const noexcept { return size(); }
_ZNK4absl12lts_2024011611string_view5emptyEv:
  288|  3.62k|  constexpr bool empty() const noexcept { return length_ == 0; }
_ZNK4absl12lts_2024011611string_viewixEm:
  294|    575|  constexpr const_reference operator[](size_type i) const {
  295|    575|    return ABSL_HARDENING_ASSERT(i < size()), ptr_[i];
  ------------------
  |  |  128|    575|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|    575|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 575]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  296|    575|  }
_ZNK4absl12lts_2024011611string_view4dataEv:
  332|  17.1k|  constexpr const_pointer data() const noexcept { return ptr_; }
_ZNK4absl12lts_2024011611string_view6substrEmm:
  395|    924|  constexpr string_view substr(size_type pos = 0, size_type n = npos) const {
  396|    924|    return ABSL_PREDICT_FALSE(pos > length_)
  ------------------
  |  |  178|    924|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 924]
  |  |  |  Branch (178:49): [Folded, False: 924]
  |  |  |  Branch (178:58): [True: 0, False: 924]
  |  |  ------------------
  ------------------
  397|    924|               ? (base_internal::ThrowStdOutOfRange(
  398|      0|                      "absl::string_view::substr"),
  399|      0|                  string_view())
  400|    924|               : string_view(ptr_ + pos, Min(n, length_ - pos));
  401|    924|  }
_ZNK4absl12lts_2024011611string_view7compareES1_:
  409|    752|  constexpr int compare(string_view x) const noexcept {
  410|    752|    return CompareImpl(length_, x.length_,
  411|    752|                       Min(length_, x.length_) == 0
  ------------------
  |  Branch (411:24): [True: 0, False: 752]
  ------------------
  412|    752|                           ? 0
  413|    752|                           : ABSL_INTERNAL_STRING_VIEW_MEMCMP(
  ------------------
  |  |   62|    752|#define ABSL_INTERNAL_STRING_VIEW_MEMCMP __builtin_memcmp
  ------------------
  414|    752|                                 ptr_, x.ptr_, Min(length_, x.length_)));
  415|    752|  }
_ZNK4absl12lts_2024011611string_view13find_first_ofEcm:
  509|      5|  size_type find_first_of(char c, size_type pos = 0) const noexcept {
  510|      5|    return find(c, pos);
  511|      5|  }
_ZNK4absl12lts_2024011611string_view12find_last_ofEcm:
  536|      6|  size_type find_last_of(char c, size_type pos = npos) const noexcept {
  537|      6|    return rfind(c, pos);
  538|      6|  }
_ZN4absl12lts_2024011611string_view19CheckLengthInternalEm:
  668|    935|  static constexpr size_type CheckLengthInternal(size_type len) {
  669|    935|    return ABSL_HARDENING_ASSERT(len <= kMaxSize), len;
  ------------------
  |  |  128|    935|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|    935|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 935]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|    935|  }
_ZN4absl12lts_2024011611string_view3MinEmm:
  690|  2.42k|  static constexpr size_t Min(size_type length_a, size_type length_b) {
  691|  2.42k|    return length_a < length_b ? length_a : length_b;
  ------------------
  |  Branch (691:12): [True: 409, False: 2.01k]
  ------------------
  692|  2.42k|  }
_ZN4absl12lts_2024011611string_view11CompareImplEmmi:
  695|    752|                                   int compare_result) {
  696|    752|    return compare_result == 0 ? static_cast<int>(length_a > length_b) -
  ------------------
  |  Branch (696:12): [True: 335, False: 417]
  ------------------
  697|    335|                                     static_cast<int>(length_a < length_b)
  698|    752|                               : (compare_result < 0 ? -1 : 1);
  ------------------
  |  Branch (698:35): [True: 258, False: 159]
  ------------------
  699|    752|  }
_ZN4absl12lts_20240116eqENS0_11string_viewES1_:
  708|    539|constexpr bool operator==(string_view x, string_view y) noexcept {
  709|    539|  return x.size() == y.size() &&
  ------------------
  |  Branch (709:10): [True: 365, False: 174]
  ------------------
  710|    365|         (x.empty() ||
  ------------------
  |  Branch (710:11): [True: 0, False: 365]
  ------------------
  711|    365|          ABSL_INTERNAL_STRING_VIEW_MEMCMP(x.data(), y.data(), x.size()) == 0);
  ------------------
  |  |   62|    365|#define ABSL_INTERNAL_STRING_VIEW_MEMCMP __builtin_memcmp
  ------------------
  |  Branch (711:11): [True: 352, False: 13]
  ------------------
  712|    539|}
_ZN4absl12lts_20240116neENS0_11string_viewES1_:
  714|      4|constexpr bool operator!=(string_view x, string_view y) noexcept {
  715|      4|  return !(x == y);
  716|      4|}
_ZN4absl12lts_20240116ltENS0_11string_viewES1_:
  718|    348|constexpr bool operator<(string_view x, string_view y) noexcept {
  719|    348|  return x.compare(y) < 0;
  720|    348|}
_ZN4absl12lts_2024011618NullSafeStringViewEPKc:
  762|    491|constexpr string_view NullSafeStringView(absl::Nullable<const char*> p) {
  763|    491|  return p ? string_view(p) : string_view();
  ------------------
  |  Branch (763:10): [True: 491, False: 0]
  ------------------
  764|    491|}
_ZNK4absl12lts_2024011611string_viewcvNSt3__112basic_stringIcNS2_11char_traitsIcEET_EEINS2_9allocatorIcEEEEv:
  368|    394|  explicit operator std::basic_string<char, traits_type, A>() const {
  369|    394|    if (!data()) return {};
  ------------------
  |  Branch (369:9): [True: 0, False: 394]
  ------------------
  370|    394|    return std::basic_string<char, traits_type, A>(data(), size());
  371|    394|  }

_ZN4absl12lts_2024011624synchronization_internal14InvalidGraphIdEv:
   58|     71|inline GraphId InvalidGraphId() {
   59|     71|  return GraphId{0};
   60|     71|}

_ZN4absl12lts_202401165Mutex4LockEv:
 1524|     71|void Mutex::Lock() {
 1525|     71|  ABSL_TSAN_MUTEX_PRE_LOCK(this, 0);
 1526|     71|  GraphId id = DebugOnlyDeadlockCheck(this);
 1527|     71|  intptr_t v = mu_.load(std::memory_order_relaxed);
 1528|       |  // try fast acquire, then spin loop
 1529|     71|  if (ABSL_PREDICT_FALSE((v & (kMuWriter | kMuReader | kMuEvent)) != 0) ||
  ------------------
  |  |  178|    142|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 71]
  |  |  |  Branch (178:49): [Folded, False: 71]
  |  |  |  Branch (178:58): [True: 0, False: 71]
  |  |  ------------------
  ------------------
 1530|     71|      ABSL_PREDICT_FALSE(!mu_.compare_exchange_strong(
  ------------------
  |  |  178|     71|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 71]
  |  |  |  Branch (178:49): [Folded, False: 71]
  |  |  |  Branch (178:58): [True: 0, False: 71]
  |  |  ------------------
  ------------------
 1531|     71|          v, kMuWriter | v, std::memory_order_acquire,
 1532|     71|          std::memory_order_relaxed))) {
 1533|       |    // try spin acquire, then slow loop
 1534|      0|    if (ABSL_PREDICT_FALSE(!TryAcquireWithSpinning(&this->mu_))) {
  ------------------
  |  |  178|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 0]
  |  |  |  Branch (178:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1535|      0|      this->LockSlow(kExclusive, nullptr, 0);
 1536|      0|    }
 1537|      0|  }
 1538|     71|  DebugOnlyLockEnter(this, id);
 1539|     71|  ABSL_TSAN_MUTEX_POST_LOCK(this, 0, 0);
 1540|     71|}
_ZN4absl12lts_202401165Mutex6UnlockEv:
 1702|     71|void Mutex::Unlock() {
 1703|     71|  ABSL_TSAN_MUTEX_PRE_UNLOCK(this, 0);
 1704|     71|  DebugOnlyLockLeave(this);
 1705|     71|  intptr_t v = mu_.load(std::memory_order_relaxed);
 1706|       |
 1707|     71|  if (kDebugMode && ((v & (kMuWriter | kMuReader)) != kMuWriter)) {
  ------------------
  |  Branch (1707:7): [Folded, False: 71]
  |  Branch (1707:21): [True: 0, False: 0]
  ------------------
 1708|      0|    ABSL_RAW_LOG(FATAL, "Mutex unlocked when destroyed or not locked: v=0x%x",
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1709|      0|                 static_cast<unsigned>(v));
 1710|      0|  }
 1711|       |
 1712|       |  // should_try_cas is whether we'll try a compare-and-swap immediately.
 1713|       |  // NOTE: optimized out when kDebugMode is false.
 1714|     71|  bool should_try_cas = ((v & (kMuEvent | kMuWriter)) == kMuWriter &&
  ------------------
  |  Branch (1714:26): [True: 71, False: 0]
  ------------------
 1715|     71|                         (v & (kMuWait | kMuDesig)) != kMuWait);
  ------------------
  |  Branch (1715:26): [True: 71, False: 0]
  ------------------
 1716|       |  // But, we can use an alternate computation of it, that compilers
 1717|       |  // currently don't find on their own.  When that changes, this function
 1718|       |  // can be simplified.
 1719|     71|  intptr_t x = (v ^ (kMuWriter | kMuWait)) & (kMuWriter | kMuEvent);
 1720|     71|  intptr_t y = (v ^ (kMuWriter | kMuWait)) & (kMuWait | kMuDesig);
 1721|       |  // Claim: "x == 0 && y > 0" is equal to should_try_cas.
 1722|       |  // Also, because kMuWriter and kMuEvent exceed kMuDesig and kMuWait,
 1723|       |  // all possible non-zero values for x exceed all possible values for y.
 1724|       |  // Therefore, (x == 0 && y > 0) == (x < y).
 1725|     71|  if (kDebugMode && should_try_cas != (x < y)) {
  ------------------
  |  Branch (1725:7): [Folded, False: 71]
  |  Branch (1725:21): [True: 0, False: 0]
  ------------------
 1726|       |    // We would usually use PRIdPTR here, but is not correctly implemented
 1727|       |    // within the android toolchain.
 1728|      0|    ABSL_RAW_LOG(FATAL, "internal logic error %llx %llx %llx\n",
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1729|      0|                 static_cast<long long>(v), static_cast<long long>(x),
 1730|      0|                 static_cast<long long>(y));
 1731|      0|  }
 1732|     71|  if (x < y && mu_.compare_exchange_strong(v, v & ~(kMuWrWait | kMuWriter),
  ------------------
  |  Branch (1732:7): [True: 71, False: 0]
  |  Branch (1732:16): [True: 71, False: 0]
  ------------------
 1733|     71|                                           std::memory_order_release,
 1734|     71|                                           std::memory_order_relaxed)) {
 1735|       |    // fast writer release (writer with no waiters or with designated waker)
 1736|     71|  } else {
 1737|      0|    this->UnlockSlow(nullptr /*no waitp*/);  // take slow path
 1738|      0|  }
 1739|     71|  ABSL_TSAN_MUTEX_POST_UNLOCK(this, 0);
 1740|     71|}
_ZNK4absl12lts_202401165Mutex10AssertHeldEv:
 2470|      4|void Mutex::AssertHeld() const {
 2471|      4|  if ((mu_.load(std::memory_order_relaxed) & kMuWriter) == 0) {
  ------------------
  |  Branch (2471:7): [True: 0, False: 4]
  ------------------
 2472|      0|    SynchEvent* e = GetSynchEvent(this);
 2473|       |    ABSL_RAW_LOG(FATAL, "thread should hold write lock on Mutex %p %s",
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |  ------------------
  |  |  |  Branch (50:38): [True: 0, False: 0]
  |  |  ------------------
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2474|      0|                 static_cast<const void*>(this), (e == nullptr ? "" : e->name));
 2475|      0|  }
 2476|      4|}
mutex.cc:_ZN4absl12lts_20240116L22DebugOnlyDeadlockCheckEPNS0_5MutexE:
 1466|     71|static inline GraphId DebugOnlyDeadlockCheck(Mutex* mu) {
 1467|     71|  if (kDebugMode && synch_deadlock_detection.load(std::memory_order_acquire) !=
  ------------------
  |  Branch (1467:7): [Folded, False: 71]
  |  Branch (1467:21): [True: 0, False: 0]
  ------------------
 1468|      0|                        OnDeadlockCycle::kIgnore) {
 1469|      0|    return DeadlockCheck(mu);
 1470|     71|  } else {
 1471|     71|    return InvalidGraphId();
 1472|     71|  }
 1473|     71|}
mutex.cc:_ZN4absl12lts_20240116L18DebugOnlyLockEnterEPNS0_5MutexENS0_24synchronization_internal7GraphIdE:
 1298|     71|static inline void DebugOnlyLockEnter(Mutex* mu, GraphId id) {
 1299|     71|  if (kDebugMode) {
  ------------------
  |  Branch (1299:7): [Folded, False: 71]
  ------------------
 1300|      0|    if (synch_deadlock_detection.load(std::memory_order_acquire) !=
  ------------------
  |  Branch (1300:9): [True: 0, False: 0]
  ------------------
 1301|      0|        OnDeadlockCycle::kIgnore) {
 1302|      0|      LockEnter(mu, id, Synch_GetAllLocks());
 1303|      0|    }
 1304|      0|  }
 1305|     71|}
mutex.cc:_ZN4absl12lts_20240116L18DebugOnlyLockLeaveEPNS0_5MutexE:
 1308|     71|static inline void DebugOnlyLockLeave(Mutex* mu) {
 1309|     71|  if (kDebugMode) {
  ------------------
  |  Branch (1309:7): [Folded, False: 71]
  ------------------
 1310|      0|    if (synch_deadlock_detection.load(std::memory_order_acquire) !=
  ------------------
  |  Branch (1310:9): [True: 0, False: 0]
  ------------------
 1311|      0|        OnDeadlockCycle::kIgnore) {
 1312|      0|      LockLeave(mu, GetGraphId(mu), Synch_GetAllLocks());
 1313|      0|    }
 1314|      0|  }
 1315|     71|}

_ZN4absl12lts_202401169MutexLockC2EPNS0_5MutexE:
  583|     57|  explicit MutexLock(Mutex* mu) ABSL_EXCLUSIVE_LOCK_FUNCTION(mu) : mu_(mu) {
  584|     57|    this->mu_->Lock();
  585|     57|  }
_ZN4absl12lts_202401169MutexLockD2Ev:
  601|     57|  ~MutexLock() ABSL_UNLOCK_FUNCTION() { this->mu_->Unlock(); }
_ZN4absl12lts_2024011614MutexLockMaybeC2EPNS0_5MutexE:
 1000|    114|      : mu_(mu) {
 1001|    114|    if (this->mu_ != nullptr) {
  ------------------
  |  Branch (1001:9): [True: 10, False: 104]
  ------------------
 1002|     10|      this->mu_->Lock();
 1003|     10|    }
 1004|    114|  }
_ZN4absl12lts_2024011614MutexLockMaybeD2Ev:
 1014|    114|  ~MutexLockMaybe() ABSL_UNLOCK_FUNCTION() {
 1015|    114|    if (this->mu_ != nullptr) {
  ------------------
  |  Branch (1015:9): [True: 10, False: 104]
  ------------------
 1016|     10|      this->mu_->Unlock();
 1017|     10|    }
 1018|    114|  }
_ZN4absl12lts_202401165Mutex4DtorEv:
 1079|      9|inline void Mutex::Dtor() {}
_ZN4absl12lts_202401165MutexC2Ev:
 1061|     20|inline Mutex::Mutex() : mu_(0) {
 1062|     20|  ABSL_TSAN_MUTEX_CREATE(this, __tsan_mutex_not_static);
 1063|     20|}
_ZN4absl12lts_202401165MutexD2Ev:
 1069|      9|inline Mutex::~Mutex() { Dtor(); }

_ZN4absl12lts_2024011616compare_internal27compare_result_as_less_thanIbTnNSt3__19enable_ifIXsr3std7is_sameIbT_EE5valueEiE4typeELi0EEEbS5_:
  454|    341|constexpr bool compare_result_as_less_than(const BoolT r) { return r; }

_ZN4absl12lts_2024011617optional_internal13optional_dataIN6google8protobuf15FeatureResolverELb0EEC2Ev:
  163|      4|  optional_data() = default;
_ZN4absl12lts_2024011617optional_internal23optional_data_dtor_baseIN6google8protobuf15FeatureResolverELb0EEC2Ev:
   80|      4|  constexpr optional_data_dtor_base() noexcept : engaged_(false), dummy_{{}} {}
_ZN4absl12lts_2024011617optional_internal23optional_data_dtor_baseIN6google8protobuf15FeatureResolverELb0EED2Ev:
   86|      4|  ~optional_data_dtor_base() { destruct(); }
_ZN4absl12lts_2024011617optional_internal23optional_data_dtor_baseIN6google8protobuf15FeatureResolverELb0EE8destructEv:
   64|      8|  void destruct() noexcept {
   65|      8|    if (engaged_) {
  ------------------
  |  Branch (65:9): [True: 4, False: 4]
  ------------------
   66|       |      // `data_` must be initialized if `engaged_` is true.
   67|       |#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(12, 0)
   68|       |#pragma GCC diagnostic push
   69|       |#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
   70|       |#endif
   71|      4|      data_.~T();
   72|       |#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(12, 0)
   73|       |#pragma GCC diagnostic pop
   74|       |#endif
   75|      4|      engaged_ = false;
   76|      4|    }
   77|      8|  }
_ZN4absl12lts_2024011617optional_internal18optional_data_baseIN6google8protobuf15FeatureResolverEE9constructIJS5_EEEvDpOT_:
  123|      4|  void construct(Args&&... args) {
  124|       |    // Use dummy_'s address to work around casting cv-qualified T* to void*.
  125|      4|    ::new (static_cast<void*>(&this->dummy_)) T(std::forward<Args>(args)...);
  126|      4|    this->engaged_ = true;
  127|      4|  }

_ZN4absl12lts_2024011613span_internal7GetDataIKNSt3__16vectorIiNS3_9allocatorIiEEEEEEDTcl11GetDataImplfp_Li0EEERT_:
   50|    516|    -> decltype(GetDataImpl(c, 0)) {
   51|    516|  return GetDataImpl(c, 0);
   52|    516|}
_ZN4absl12lts_2024011613span_internal11GetDataImplIKNSt3__16vectorIiNS3_9allocatorIiEEEEEEDTcldtfp_4dataEERT_c:
   38|    516|    -> decltype(c.data()) {
   39|    516|  return c.data();
   40|    516|}

_ZN4absl12lts_202401168optionalIN6google8protobuf15FeatureResolverEEC2ENS0_9nullopt_tE:
  137|      4|  constexpr optional(nullopt_t) noexcept {}  // NOLINT(runtime/explicit)
_ZNK4absl12lts_202401168optionalIN6google8protobuf15FeatureResolverEE9has_valueEv:
  463|    516|  constexpr bool has_value() const noexcept { return this->engaged_; }
_ZN4absl12lts_202401168optionalIN6google8protobuf15FeatureResolverEEptEv:
  423|    239|  absl::Nonnull<T*> operator->() ABSL_ATTRIBUTE_LIFETIME_BOUND {
  424|    239|    ABSL_HARDENING_ASSERT(this->engaged_);
  ------------------
  |  |  128|    239|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|    239|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 239]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  425|    239|    return std::addressof(this->data_);
  426|    239|  }
_ZN4absl12lts_202401168optionalIN6google8protobuf15FeatureResolverEE7emplaceIJS4_EvEERS4_DpOT_:
  361|      4|  T& emplace(Args&&... args) ABSL_ATTRIBUTE_LIFETIME_BOUND {
  362|      4|    this->destruct();
  363|      4|    this->construct(std::forward<Args>(args)...);
  364|      4|    return reference();
  365|      4|  }
_ZN4absl12lts_202401168optionalIN6google8protobuf15FeatureResolverEE9referenceEv:
  531|      4|  T& reference() { return this->data_; }

_ZN4absl12lts_202401164SpanIKiEC2INSt3__16vectorIiNS5_9allocatorIiEEEEvS9_iEERKT_:
  217|    516|      : Span(span_internal::GetData(v), v.size()) {}
_ZN4absl12lts_202401164SpanIKiEC2EPS2_m:
  193|    516|      : ptr_(array), len_(length) {}

_ZN4absl12lts_2024011616utility_internal15IfConstexprElseILb0EZN6google8protobuf5Arena6CreateINSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEEJEEEPT_PS5_DpOT0_EUlDpOT_E_ZNS6_ISD_JEEESF_SG_SJ_EUlSM_E0_JEEEDaOT0_OT1_DpOT2_:
   53|  6.58k|                     Args&&... args) {
   54|  6.58k|  return std::get<condition>(std::forward_as_tuple(
   55|  6.58k|      std::forward<FalseFunc>(false_func), std::forward<TrueFunc>(true_func)))(
   56|  6.58k|      std::forward<Args>(args)...);
   57|  6.58k|}
_ZN4absl12lts_2024011616utility_internal15IfConstexprElseILb1EZN6google8protobuf5Arena6CreateINS4_19FileDescriptorProtoEJEEEPT_PS5_DpOT0_EUlDpOT_E_ZNS6_IS7_JEEES9_SA_SD_EUlSG_E0_JEEEDaOT0_OT1_DpOT2_:
   53|      4|                     Args&&... args) {
   54|      4|  return std::get<condition>(std::forward_as_tuple(
   55|      4|      std::forward<FalseFunc>(false_func), std::forward<TrueFunc>(true_func)))(
   56|      4|      std::forward<Args>(args)...);
   57|      4|}

_ZN4absl12lts_202401167forwardINS0_18container_internal12CommonFieldsEEEOT_RNSt3__116remove_referenceIS4_E4typeE:
  149|    450|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|    450|  return static_cast<T&&>(t);
  151|    450|}
extension_set.cc:_ZN4absl12lts_202401167forwardIN6google8protobuf8internal12_GLOBAL__N_115ExtensionHasherEEEOT_RNSt3__116remove_referenceIS7_E4typeE:
  149|      3|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      3|  return static_cast<T&&>(t);
  151|      3|}
extension_set.cc:_ZN4absl12lts_202401167forwardIN6google8protobuf8internal12_GLOBAL__N_111ExtensionEqEEEOT_RNSt3__116remove_referenceIS7_E4typeE:
  149|      3|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      3|  return static_cast<T&&>(t);
  151|      3|}
_ZN4absl12lts_202401167forwardINSt3__19allocatorIN6google8protobuf8internal13ExtensionInfoEEEEEOT_RNS2_16remove_referenceIS9_E4typeE:
  149|      3|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      3|  return static_cast<T&&>(t);
  151|      3|}
_ZN4absl12lts_202401167forwardINS0_18container_internal6HashEqIPKN6google8protobuf14FileDescriptorEvE4HashEEEOT_RNSt3__116remove_referenceISB_E4typeE:
  149|     36|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     36|  return static_cast<T&&>(t);
  151|     36|}
_ZN4absl12lts_202401167forwardINS0_18container_internal6HashEqIPKN6google8protobuf14FileDescriptorEvE2EqEEEOT_RNSt3__116remove_referenceISB_E4typeE:
  149|     36|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     36|  return static_cast<T&&>(t);
  151|     36|}
_ZN4absl12lts_202401167forwardINSt3__19allocatorINS2_4pairIKPKN6google8protobuf14FileDescriptorENS2_6vectorINS6_14DescriptorPool18DeferredValidation13LifetimesInfoENS3_ISE_EEEEEEEEEEOT_RNS2_16remove_referenceISJ_E4typeE:
  149|     12|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     12|  return static_cast<T&&>(t);
  151|     12|}
_ZN4absl12lts_202401167forwardINS0_18container_internal10StringHashEEEOT_RNSt3__116remove_referenceIS4_E4typeE:
  149|    267|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|    267|  return static_cast<T&&>(t);
  151|    267|}
_ZN4absl12lts_202401167forwardINS0_18container_internal8StringEqEEEOT_RNSt3__116remove_referenceIS4_E4typeE:
  149|    267|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|    267|  return static_cast<T&&>(t);
  151|    267|}
_ZN4absl12lts_202401167forwardINSt3__19allocatorINS2_12basic_stringIcNS2_11char_traitsIcEENS3_IcEEEEEEEEOT_RNS2_16remove_referenceISA_E4typeE:
  149|     12|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     12|  return static_cast<T&&>(t);
  151|     12|}
_ZN4absl12lts_202401167forwardINS0_18container_internal6HashEqIPKN6google8protobuf10DescriptorEvE4HashEEEOT_RNSt3__116remove_referenceISB_E4typeE:
  149|     42|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     42|  return static_cast<T&&>(t);
  151|     42|}
_ZN4absl12lts_202401167forwardINS0_18container_internal6HashEqIPKN6google8protobuf10DescriptorEvE2EqEEEOT_RNSt3__116remove_referenceISB_E4typeE:
  149|     42|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     42|  return static_cast<T&&>(t);
  151|     42|}
_ZN4absl12lts_202401167forwardINSt3__19allocatorIPKN6google8protobuf10DescriptorEEEEEOT_RNS2_16remove_referenceISA_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
_ZN4absl12lts_202401167forwardINSt3__19allocatorINS2_4pairIKNS2_12basic_stringIcNS2_11char_traitsIcEENS3_IcEEEEN6google8protobuf10Descriptor13WellKnownTypeEEEEEEEOT_RNS2_16remove_referenceISH_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
descriptor.cc:_ZN4absl12lts_202401167forwardIN6google8protobuf12_GLOBAL__N_120SymbolByFullNameHashEEEOT_RNSt3__116remove_referenceIS6_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
descriptor.cc:_ZN4absl12lts_202401167forwardIN6google8protobuf12_GLOBAL__N_118SymbolByFullNameEqEEEOT_RNSt3__116remove_referenceIS6_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
_ZN4absl12lts_202401167forwardINSt3__19allocatorIN6google8protobuf6SymbolEEEEEOT_RNS2_16remove_referenceIS8_E4typeE:
  149|     18|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     18|  return static_cast<T&&>(t);
  151|     18|}
descriptor.cc:_ZN4absl12lts_202401167forwardIN6google8protobuf12_GLOBAL__N_121DescriptorsByNameHashINS3_14FileDescriptorEEEEEOT_RNSt3__116remove_referenceIS8_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
descriptor.cc:_ZN4absl12lts_202401167forwardIN6google8protobuf12_GLOBAL__N_119DescriptorsByNameEqINS3_14FileDescriptorEEEEEOT_RNSt3__116remove_referenceIS8_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
_ZN4absl12lts_202401167forwardINSt3__19allocatorIPKN6google8protobuf14FileDescriptorEEEEEOT_RNS2_16remove_referenceISA_E4typeE:
  149|     30|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     30|  return static_cast<T&&>(t);
  151|     30|}
_ZN4absl12lts_202401167forwardIRKNS0_18container_internal19key_compare_adapterINSt3__14lessINS4_4pairIPKN6google8protobuf10DescriptorEiEEEESC_E15checked_compareEEEOT_RNS4_16remove_referenceISI_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
_ZN4absl12lts_202401167forwardIRKNSt3__19allocatorINS2_4pairIKNS4_IPKN6google8protobuf10DescriptorEiEEPKNS6_15FieldDescriptorEEEEEEEOT_RNS2_16remove_referenceISJ_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
_ZN4absl12lts_202401167forwardIPNS0_18container_internal10btree_nodeINS2_10map_paramsINSt3__14pairIPKN6google8protobuf10DescriptorEiEEPKNS8_15FieldDescriptorENS5_4lessISC_EENS5_9allocatorINS6_IKSC_SF_EEEELi256ELb0EEEEEEEOT_RNS5_16remove_referenceISP_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
_ZN4absl12lts_202401167forwardINSt3__19allocatorINS2_4pairIKNS2_12basic_stringIcNS2_11char_traitsIcEENS3_IcEEEENS2_10unique_ptrIN6google8protobuf10FeatureSetENS2_14default_deleteISE_EEEEEEEEEEOT_RNS2_16remove_referenceISK_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
descriptor.cc:_ZN4absl12lts_202401167forwardIN6google8protobuf12_GLOBAL__N_118SymbolByParentHashEEEOT_RNSt3__116remove_referenceIS6_E4typeE:
  149|     12|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     12|  return static_cast<T&&>(t);
  151|     12|}
descriptor.cc:_ZN4absl12lts_202401167forwardIN6google8protobuf12_GLOBAL__N_116SymbolByParentEqEEEOT_RNSt3__116remove_referenceIS6_E4typeE:
  149|     12|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     12|  return static_cast<T&&>(t);
  151|     12|}
descriptor.cc:_ZN4absl12lts_202401167forwardIN6google8protobuf12_GLOBAL__N_116ParentNumberHashEEEOT_RNSt3__116remove_referenceIS6_E4typeE:
  149|     36|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     36|  return static_cast<T&&>(t);
  151|     36|}
descriptor.cc:_ZN4absl12lts_202401167forwardIN6google8protobuf12_GLOBAL__N_114ParentNumberEqEEEOT_RNSt3__116remove_referenceIS6_E4typeE:
  149|     36|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     36|  return static_cast<T&&>(t);
  151|     36|}
_ZN4absl12lts_202401167forwardINSt3__19allocatorIPKN6google8protobuf15FieldDescriptorEEEEEOT_RNS2_16remove_referenceISA_E4typeE:
  149|     12|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     12|  return static_cast<T&&>(t);
  151|     12|}
_ZN4absl12lts_202401167forwardINSt3__19allocatorIPKN6google8protobuf19EnumValueDescriptorEEEEEOT_RNS2_16remove_referenceISA_E4typeE:
  149|     24|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     24|  return static_cast<T&&>(t);
  151|     24|}
_ZN4absl12lts_202401167forwardINSt3__19allocatorINS2_4pairIKNS2_12basic_stringIcNS2_11char_traitsIcEENS3_IcEEEEPKN6google8protobuf23SourceCodeInfo_LocationEEEEEEEOT_RNS2_16remove_referenceISI_E4typeE:
  149|     12|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     12|  return static_cast<T&&>(t);
  151|     12|}
_ZN4absl12lts_202401167forwardINSt3__19allocatorINS2_4pairIKNS2_12basic_stringIcNS2_11char_traitsIcEENS3_IcEEEEbEEEEEEOT_RNS2_16remove_referenceISD_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
_ZN4absl12lts_202401167forwardINSt3__19allocatorINS2_4pairIKPKN6google8protobuf10DescriptorENS6_17DescriptorBuilder12MessageHintsEEEEEEEOT_RNS2_16remove_referenceISF_E4typeE:
  149|     12|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     12|  return static_cast<T&&>(t);
  151|     12|}
_ZN4absl12lts_202401167forwardINSt3__19allocatorINS0_11string_viewEEEEEOT_RNS2_16remove_referenceIS6_E4typeE:
  149|    225|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|    225|  return static_cast<T&&>(t);
  151|    225|}
_ZN4absl12lts_202401167forwardINS0_13hash_internal4HashIiEEEEOT_RNSt3__116remove_referenceIS5_E4typeE:
  149|     12|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     12|  return static_cast<T&&>(t);
  151|     12|}
_ZN4absl12lts_202401167forwardINSt3__18equal_toIiEEEEOT_RNS2_16remove_referenceIS5_E4typeE:
  149|     12|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     12|  return static_cast<T&&>(t);
  151|     12|}
_ZN4absl12lts_202401167forwardINSt3__19allocatorIiEEEEOT_RNS2_16remove_referenceIS5_E4typeE:
  149|     12|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     12|  return static_cast<T&&>(t);
  151|     12|}
_ZN4absl12lts_202401167forwardINS0_13hash_internal4HashINSt3__16vectorIiNS4_9allocatorIiEEEEEEEEOT_RNS4_16remove_referenceISA_E4typeE:
  149|     24|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     24|  return static_cast<T&&>(t);
  151|     24|}
_ZN4absl12lts_202401167forwardINSt3__18equal_toINS2_6vectorIiNS2_9allocatorIiEEEEEEEEOT_RNS2_16remove_referenceIS9_E4typeE:
  149|     24|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     24|  return static_cast<T&&>(t);
  151|     24|}
_ZN4absl12lts_202401167forwardINSt3__19allocatorINS2_4pairIKNS2_6vectorIiNS3_IiEEEES7_EEEEEEOT_RNS2_16remove_referenceISB_E4typeE:
  149|     12|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     12|  return static_cast<T&&>(t);
  151|     12|}
_ZN4absl12lts_202401167forwardINSt3__19allocatorINS2_4pairIKNS2_6vectorIiNS3_IiEEEEiEEEEEEOT_RNS2_16remove_referenceISB_E4typeE:
  149|     12|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     12|  return static_cast<T&&>(t);
  151|     12|}
_ZN4absl12lts_202401167forwardIRKNS0_18container_internal19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11FileCompareENS7_9FileEntryEE15checked_compareEEEOT_RNSt3__116remove_referenceISE_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
_ZN4absl12lts_202401167forwardIRKNSt3__19allocatorIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryEEEEEOT_RNS2_16remove_referenceISC_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
_ZN4absl12lts_202401167forwardIPNS0_18container_internal10btree_nodeINS2_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex9FileEntryENS8_11FileCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEEEOT_RNSB_16remove_referenceISH_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
_ZN4absl12lts_202401167forwardIRKNS0_18container_internal19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex13SymbolCompareENS7_11SymbolEntryEE15checked_compareEEEOT_RNSt3__116remove_referenceISE_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
_ZN4absl12lts_202401167forwardIRKNSt3__19allocatorIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryEEEEEOT_RNS2_16remove_referenceISC_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
_ZN4absl12lts_202401167forwardIPNS0_18container_internal10btree_nodeINS2_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex11SymbolEntryENS8_13SymbolCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEEEOT_RNSB_16remove_referenceISH_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
_ZN4absl12lts_202401167forwardIRKNS0_18container_internal19key_compare_adapterIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex16ExtensionCompareENS7_14ExtensionEntryEE15checked_compareEEEOT_RNSt3__116remove_referenceISE_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
_ZN4absl12lts_202401167forwardIRKNSt3__19allocatorIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryEEEEEOT_RNS2_16remove_referenceISC_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
_ZN4absl12lts_202401167forwardIPNS0_18container_internal10btree_nodeINS2_10set_paramsIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryENS8_16ExtensionCompareENSt3__19allocatorIS9_EELi256ELb0EEEEEEEOT_RNSB_16remove_referenceISH_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
_ZN4absl12lts_202401167forwardINSt3__19allocatorINS2_4pairIKPKN6google8protobuf10DescriptorEPKNS6_21DynamicMessageFactory8TypeInfoEEEEEEEOT_RNS2_16remove_referenceISH_E4typeE:
  149|     18|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|     18|  return static_cast<T&&>(t);
  151|     18|}
message.cc:_ZN4absl12lts_202401167forwardIN6google8protobuf12_GLOBAL__N_123GeneratedMessageFactory20DescriptorByNameHashEEEOT_RNSt3__116remove_referenceIS7_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
message.cc:_ZN4absl12lts_202401167forwardIN6google8protobuf12_GLOBAL__N_123GeneratedMessageFactory18DescriptorByNameEqEEEOT_RNSt3__116remove_referenceIS7_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
_ZN4absl12lts_202401167forwardINSt3__19allocatorIPKN6google8protobuf8internal15DescriptorTableEEEEEOT_RNS2_16remove_referenceISB_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
message.cc:_ZN4absl12lts_202401167forwardINSt3__19allocatorINS2_4pairIKPKN6google8protobuf10DescriptorENS6_12_GLOBAL__N_123GeneratedMessageFactory10MessagePtrEEEEEEEOT_RNS2_16remove_referenceISG_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}

_ZN16protobuf_mutator18ParseBinaryMessageEPKhmPN6google8protobuf7MessageE:
   21|  3.73k|bool ParseBinaryMessage(const uint8_t* data, size_t size, Message* output) {
   22|  3.73k|  return ParseBinaryMessage({reinterpret_cast<const char*>(data), size},
   23|  3.73k|                            output);
   24|  3.73k|}
_ZN16protobuf_mutator18ParseBinaryMessageERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPN6google8protobuf7MessageE:
   26|  3.73k|bool ParseBinaryMessage(const std::string& data, protobuf::Message* output) {
   27|  3.73k|  output->Clear();
   28|  3.73k|  if (!output->ParsePartialFromString(data)) {
  ------------------
  |  Branch (28:7): [True: 0, False: 3.73k]
  ------------------
   29|      0|    output->Clear();
   30|      0|    return false;
   31|      0|  }
   32|  3.73k|  return true;
   33|  3.73k|}

_ZN16protobuf_mutator7Mutator4SeedEj:
  622|  3.73k|void Mutator::Seed(uint32_t value) { random_.seed(value); }
_ZN16protobuf_mutator7Mutator3FixEPN6google8protobuf7MessageE:
  624|  3.73k|void Mutator::Fix(Message* message) {
  625|  3.73k|  UnpackedAny any;
  626|  3.73k|  UnpackAny(*message, &any);
  627|       |
  628|  3.73k|  PostProcessing(keep_initialized_, post_processors_, any, &random_)
  629|  3.73k|      .Run(message, kMaxInitializeDepth);
  630|       |  assert(IsInitialized(*message));
  631|  3.73k|}
_ZN16protobuf_mutator7Mutator21RegisterPostProcessorEPKN6google8protobuf10DescriptorENSt3__18functionIFvPNS2_7MessageEjEEE:
  680|      1|                                    PostProcess callback) {
  681|      1|  post_processors_.emplace(desc, callback);
  682|      1|}
mutator.cc:_ZN16protobuf_mutator12_GLOBAL__N_19UnpackAnyERKN6google8protobuf7MessageEPNSt3__113unordered_mapIPS4_NS6_10unique_ptrIS3_NS6_14default_deleteIS3_EEEENS6_4hashIS8_EENS6_8equal_toIS8_EENS6_9allocatorINS6_4pairIKS8_SC_EEEEEE:
  399|  26.8k|void UnpackAny(const Message& message, UnpackedAny* result) {
  400|  26.8k|  if (std::unique_ptr<Message> any = UnpackIfAny(message)) {
  ------------------
  |  Branch (400:32): [True: 0, False: 26.8k]
  ------------------
  401|      0|    UnpackAny(*any, result);
  402|      0|    result->emplace(&message, std::move(any));
  403|      0|    return;
  404|      0|  }
  405|       |
  406|  26.8k|  const Descriptor* descriptor = message.GetDescriptor();
  407|  26.8k|  const Reflection* reflection = message.GetReflection();
  408|       |
  409|   168k|  for (int i = 0; i < descriptor->field_count(); ++i) {
  ------------------
  |  Branch (409:19): [True: 141k, False: 26.8k]
  ------------------
  410|   141k|    const FieldDescriptor* field = descriptor->field(i);
  411|   141k|    if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
  ------------------
  |  Branch (411:9): [True: 37.5k, False: 104k]
  ------------------
  412|  37.5k|      if (field->is_repeated()) {
  ------------------
  |  Branch (412:11): [True: 12.9k, False: 24.6k]
  ------------------
  413|  12.9k|        const int field_size = reflection->FieldSize(message, field);
  414|  30.2k|        for (int j = 0; j < field_size; ++j) {
  ------------------
  |  Branch (414:25): [True: 17.2k, False: 12.9k]
  ------------------
  415|  17.2k|          UnpackAny(reflection->GetRepeatedMessage(message, field, j), result);
  416|  17.2k|        }
  417|  24.6k|      } else if (reflection->HasField(message, field)) {
  ------------------
  |  Branch (417:18): [True: 5.86k, False: 18.7k]
  ------------------
  418|  5.86k|        UnpackAny(reflection->GetMessage(message, field), result);
  419|  5.86k|      }
  420|  37.5k|    }
  421|   141k|  }
  422|  26.8k|}
mutator.cc:_ZN16protobuf_mutator12_GLOBAL__N_111UnpackIfAnyERKN6google8protobuf7MessageE:
  394|  26.8k|std::unique_ptr<Message> UnpackIfAny(const Message& message) {
  395|  26.8k|  if (const Any* any = CastToAny(&message)) return UnpackAny(*any);
  ------------------
  |  Branch (395:18): [True: 0, False: 26.8k]
  ------------------
  396|  26.8k|  return {};
  397|  26.8k|}
mutator.cc:_ZN16protobuf_mutator12_GLOBAL__N_19CastToAnyEPKN6google8protobuf7MessageE:
  382|  26.8k|const Any* CastToAny(const Message* message) {
  383|  26.8k|  return Any::descriptor() == message->GetDescriptor()
  ------------------
  |  Branch (383:10): [True: 0, False: 26.8k]
  ------------------
  384|  26.8k|             ? protobuf::DownCastMessage<Any>(message)
  385|  26.8k|             : nullptr;
  386|  26.8k|}
mutator.cc:_ZN16protobuf_mutator12_GLOBAL__N_114PostProcessingC2EbRKNSt3__118unordered_multimapIPKN6google8protobuf10DescriptorENS2_8functionIFvPNS5_7MessageEjEEENS2_4hashIS8_EENS2_8equal_toIS8_EENS2_9allocatorINS2_4pairIKS8_SD_EEEEEERKNS2_13unordered_mapIPKSA_NS2_10unique_ptrISA_NS2_14default_deleteISA_EEEENSE_ISS_EENSG_ISS_EENSI_INSJ_IKSS_SW_EEEEEEPNS2_26linear_congruential_engineImLm48271ELm0ELm2147483647EEE:
  431|  3.73k|      : keep_initialized_(keep_initialized),
  432|  3.73k|        post_processors_(post_processors),
  433|  3.73k|        any_(any),
  434|  3.73k|        random_(random) {}
mutator.cc:_ZN16protobuf_mutator12_GLOBAL__N_114PostProcessing3RunEPN6google8protobuf7MessageEi:
  436|  26.8k|  void Run(Message* message, int max_depth) {
  437|  26.8k|    --max_depth;
  438|  26.8k|    const Descriptor* descriptor = message->GetDescriptor();
  439|       |
  440|       |    // Apply custom mutators in nested messages before packing any.
  441|  26.8k|    const Reflection* reflection = message->GetReflection();
  442|   168k|    for (int i = 0; i < descriptor->field_count(); i++) {
  ------------------
  |  Branch (442:21): [True: 141k, False: 26.8k]
  ------------------
  443|   141k|      const FieldDescriptor* field = descriptor->field(i);
  444|   141k|      if (keep_initialized_ &&
  ------------------
  |  Branch (444:11): [True: 141k, False: 0]
  ------------------
  445|   141k|          (field->is_required() || descriptor->options().map_entry()) &&
  ------------------
  |  Branch (445:12): [True: 0, False: 141k]
  |  Branch (445:36): [True: 0, False: 141k]
  ------------------
  446|      0|          !reflection->HasField(*message, field)) {
  ------------------
  |  Branch (446:11): [True: 0, False: 0]
  ------------------
  447|      0|        CreateDefaultField()(FieldInstance(message, field));
  448|      0|      }
  449|       |
  450|   141k|      if (field->cpp_type() != FieldDescriptor::CPPTYPE_MESSAGE) continue;
  ------------------
  |  Branch (450:11): [True: 104k, False: 37.5k]
  ------------------
  451|       |
  452|  37.5k|      if (max_depth < 0 && !field->is_required()) {
  ------------------
  |  Branch (452:11): [True: 0, False: 37.5k]
  |  Branch (452:28): [True: 0, False: 0]
  ------------------
  453|       |        // Clear deep optional fields to avoid stack overflow.
  454|      0|        reflection->ClearField(message, field);
  455|      0|        if (field->is_repeated())
  ------------------
  |  Branch (455:13): [True: 0, False: 0]
  ------------------
  456|      0|          assert(!reflection->FieldSize(*message, field));
  457|      0|        else
  458|      0|          assert(!reflection->HasField(*message, field));
  459|      0|        continue;
  460|      0|      }
  461|       |
  462|  37.5k|      if (field->is_repeated()) {
  ------------------
  |  Branch (462:11): [True: 12.9k, False: 24.6k]
  ------------------
  463|  12.9k|        const int field_size = reflection->FieldSize(*message, field);
  464|  30.2k|        for (int j = 0; j < field_size; ++j) {
  ------------------
  |  Branch (464:25): [True: 17.2k, False: 12.9k]
  ------------------
  465|  17.2k|          Message* nested_message =
  466|  17.2k|              reflection->MutableRepeatedMessage(message, field, j);
  467|  17.2k|          Run(nested_message, max_depth);
  468|  17.2k|        }
  469|  24.6k|      } else if (reflection->HasField(*message, field)) {
  ------------------
  |  Branch (469:18): [True: 5.86k, False: 18.7k]
  ------------------
  470|  5.86k|        Message* nested_message = reflection->MutableMessage(message, field);
  471|  5.86k|        Run(nested_message, max_depth);
  472|  5.86k|      }
  473|  37.5k|    }
  474|       |
  475|  26.8k|    if (Any* any = CastToAny(message)) {
  ------------------
  |  Branch (475:14): [True: 0, False: 26.8k]
  ------------------
  476|      0|      if (max_depth < 0) {
  ------------------
  |  Branch (476:11): [True: 0, False: 0]
  ------------------
  477|       |        // Clear deep Any fields to avoid stack overflow.
  478|      0|        any->Clear();
  479|      0|      } else {
  480|      0|        auto It = any_.find(message);
  481|      0|        if (It != any_.end()) {
  ------------------
  |  Branch (481:13): [True: 0, False: 0]
  ------------------
  482|      0|          Run(It->second.get(), max_depth);
  483|      0|          std::string value;
  484|      0|          It->second->SerializePartialToString(&value);
  485|      0|          *any->mutable_value() = std::move(value);
  486|      0|        }
  487|      0|      }
  488|      0|    }
  489|       |
  490|       |    // Call user callback after message trimmed, initialized and packed.
  491|  26.8k|    auto range = post_processors_.equal_range(descriptor);
  492|  30.6k|    for (auto it = range.first; it != range.second; ++it)
  ------------------
  |  Branch (492:33): [True: 3.73k, False: 26.8k]
  ------------------
  493|  3.73k|      it->second(message, (*random_)());
  494|  26.8k|  }
mutator.cc:_ZN16protobuf_mutator12_GLOBAL__N_19CastToAnyEPN6google8protobuf7MessageE:
  388|  26.8k|Any* CastToAny(Message* message) {
  389|  26.8k|  return Any::descriptor() == message->GetDescriptor()
  ------------------
  |  Branch (389:10): [True: 0, False: 26.8k]
  ------------------
  390|  26.8k|             ? protobuf::DownCastMessage<Any>(message)
  391|  26.8k|             : nullptr;
  392|  26.8k|}

_ZN16protobuf_mutator7MutatorC2Ev:
   48|      1|  Mutator() = default;
_ZN16protobuf_mutator7MutatorD2Ev:
   49|      1|  virtual ~Mutator() = default;

nghttp2_buf_init:
   32|      6|void nghttp2_buf_init(nghttp2_buf *buf) { *buf = (nghttp2_buf){0}; }
nghttp2_buf_init2:
   34|      2|int nghttp2_buf_init2(nghttp2_buf *buf, size_t initial, nghttp2_mem *mem) {
   35|      2|  nghttp2_buf_init(buf);
   36|      2|  return nghttp2_buf_reserve(buf, initial, mem);
   37|      2|}
nghttp2_buf_free:
   39|      8|void nghttp2_buf_free(nghttp2_buf *buf, nghttp2_mem *mem) {
   40|      8|  if (buf == NULL) {
  ------------------
  |  Branch (40:7): [True: 0, False: 8]
  ------------------
   41|      0|    return;
   42|      0|  }
   43|       |
   44|      8|  nghttp2_mem_free(mem, buf->begin);
   45|       |  buf->begin = NULL;
   46|      8|}
nghttp2_buf_reserve:
   48|      2|int nghttp2_buf_reserve(nghttp2_buf *buf, size_t new_cap, nghttp2_mem *mem) {
   49|      2|  uint8_t *ptr;
   50|      2|  size_t cap;
   51|       |
   52|      2|  cap = nghttp2_buf_cap(buf);
  ------------------
  |  |   57|      2|#define nghttp2_buf_cap(BUF) ((size_t)((BUF)->end - (BUF)->begin))
  ------------------
   53|       |
   54|      2|  if (cap >= new_cap) {
  ------------------
  |  Branch (54:7): [True: 0, False: 2]
  ------------------
   55|      0|    return 0;
   56|      0|  }
   57|       |
   58|      2|  new_cap = nghttp2_max_size(new_cap, cap * 2);
   59|       |
   60|      2|  ptr = nghttp2_mem_realloc(mem, buf->begin, new_cap);
   61|      2|  if (ptr == NULL) {
  ------------------
  |  Branch (61:7): [True: 0, False: 2]
  ------------------
   62|      0|    return NGHTTP2_ERR_NOMEM;
   63|      0|  }
   64|       |
   65|      2|  buf->pos = ptr + (buf->pos - buf->begin);
   66|      2|  buf->last = ptr + (buf->last - buf->begin);
   67|      2|  buf->mark = ptr + (buf->mark - buf->begin);
   68|      2|  buf->begin = ptr;
   69|      2|  buf->end = ptr + new_cap;
   70|       |
   71|      2|  return 0;
   72|      2|}
nghttp2_buf_reset:
   74|     21|void nghttp2_buf_reset(nghttp2_buf *buf) {
   75|     21|  buf->pos = buf->last = buf->mark = buf->begin;
   76|     21|}
nghttp2_buf_wrap_init:
   78|     12|void nghttp2_buf_wrap_init(nghttp2_buf *buf, uint8_t *begin, size_t len) {
   79|     12|  buf->begin = buf->pos = buf->last = buf->mark = buf->end = begin;
   80|     12|  if (len) {
  ------------------
  |  Branch (80:7): [True: 6, False: 6]
  ------------------
   81|      6|    buf->end += len;
   82|      6|  }
   83|     12|}
nghttp2_bufs_init3:
  123|      2|                       nghttp2_mem *mem) {
  124|      2|  int rv;
  125|      2|  nghttp2_buf_chain *chain;
  126|       |
  127|      2|  if (chunk_keep == 0 || max_chunk < chunk_keep || chunk_length < offset) {
  ------------------
  |  Branch (127:7): [True: 0, False: 2]
  |  Branch (127:26): [True: 0, False: 2]
  |  Branch (127:52): [True: 0, False: 2]
  ------------------
  128|      0|    return NGHTTP2_ERR_INVALID_ARGUMENT;
  129|      0|  }
  130|       |
  131|      2|  rv = buf_chain_new(&chain, chunk_length, mem);
  132|      2|  if (rv != 0) {
  ------------------
  |  Branch (132:7): [True: 0, False: 2]
  ------------------
  133|      0|    return rv;
  134|      0|  }
  135|       |
  136|      2|  bufs->mem = mem;
  137|      2|  bufs->offset = offset;
  138|       |
  139|      2|  bufs->head = chain;
  140|      2|  bufs->cur = bufs->head;
  141|       |
  142|      2|  nghttp2_buf_shift_right(&bufs->cur->buf, offset);
  ------------------
  |  |   63|      2|  do {                                                                         \
  |  |   64|      2|    (BUF)->pos += AMT;                                                         \
  |  |   65|      2|    (BUF)->last += AMT;                                                        \
  |  |   66|      2|  } while (0)
  |  |  ------------------
  |  |  |  Branch (66:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  143|       |
  144|      2|  bufs->chunk_length = chunk_length;
  145|      2|  bufs->chunk_used = 1;
  146|      2|  bufs->max_chunk = max_chunk;
  147|      2|  bufs->chunk_keep = chunk_keep;
  148|       |
  149|      2|  return 0;
  150|      2|}
nghttp2_bufs_free:
  178|      2|void nghttp2_bufs_free(nghttp2_bufs *bufs) {
  179|      2|  nghttp2_buf_chain *chain, *next_chain;
  180|       |
  181|      2|  if (bufs == NULL) {
  ------------------
  |  Branch (181:7): [True: 0, False: 2]
  ------------------
  182|      0|    return;
  183|      0|  }
  184|       |
  185|      4|  for (chain = bufs->head; chain;) {
  ------------------
  |  Branch (185:28): [True: 2, False: 2]
  ------------------
  186|      2|    next_chain = chain->next;
  187|       |
  188|      2|    buf_chain_del(chain, bufs->mem);
  189|       |
  190|      2|    chain = next_chain;
  191|      2|  }
  192|       |
  193|       |  bufs->head = NULL;
  194|      2|}
nghttp2_bufs_len:
  282|      2|size_t nghttp2_bufs_len(nghttp2_bufs *bufs) {
  283|      2|  nghttp2_buf_chain *ci;
  284|      2|  size_t len;
  285|       |
  286|      2|  len = 0;
  287|      4|  for (ci = bufs->head; ci; ci = ci->next) {
  ------------------
  |  Branch (287:25): [True: 2, False: 2]
  ------------------
  288|      2|    len += nghttp2_buf_len(&ci->buf);
  ------------------
  |  |   54|      2|#define nghttp2_buf_len(BUF) ((size_t)((BUF)->last - (BUF)->pos))
  ------------------
  289|      2|  }
  290|       |
  291|      2|  return len;
  292|      2|}
nghttp2_bufs_add:
  326|     19|int nghttp2_bufs_add(nghttp2_bufs *bufs, const void *data, size_t len) {
  327|     19|  int rv;
  328|     19|  size_t nwrite;
  329|     19|  nghttp2_buf *buf;
  330|     19|  const uint8_t *p;
  331|       |
  332|     19|  p = data;
  333|       |
  334|     38|  while (len) {
  ------------------
  |  Branch (334:10): [True: 19, False: 19]
  ------------------
  335|     19|    buf = &bufs->cur->buf;
  336|       |
  337|     19|    nwrite = nghttp2_min_size(nghttp2_buf_avail(buf), len);
  ------------------
  |  |   55|     19|#define nghttp2_buf_avail(BUF) ((size_t)((BUF)->end - (BUF)->last))
  ------------------
  338|     19|    if (nwrite == 0) {
  ------------------
  |  Branch (338:9): [True: 0, False: 19]
  ------------------
  339|      0|      rv = bufs_alloc_chain(bufs);
  340|      0|      if (rv != 0) {
  ------------------
  |  Branch (340:11): [True: 0, False: 0]
  ------------------
  341|      0|        return rv;
  342|      0|      }
  343|      0|      continue;
  344|      0|    }
  345|       |
  346|     19|    buf->last = nghttp2_cpymem(buf->last, p, nwrite);
  347|     19|    p += nwrite;
  348|     19|    len -= nwrite;
  349|     19|  }
  350|       |
  351|     19|  return 0;
  352|     19|}
nghttp2_bufs_addb:
  372|      7|int nghttp2_bufs_addb(nghttp2_bufs *bufs, uint8_t b) {
  373|      7|  int rv;
  374|       |
  375|      7|  rv = bufs_ensure_addb(bufs);
  376|      7|  if (rv != 0) {
  ------------------
  |  Branch (376:7): [True: 0, False: 7]
  ------------------
  377|      0|    return rv;
  378|      0|  }
  379|       |
  380|      7|  *bufs->cur->buf.last++ = b;
  381|       |
  382|      7|  return 0;
  383|      7|}
nghttp2_bufs_reset:
  477|     19|void nghttp2_bufs_reset(nghttp2_bufs *bufs) {
  478|     19|  nghttp2_buf_chain *chain, *ci;
  479|     19|  size_t k;
  480|       |
  481|     19|  k = bufs->chunk_keep;
  482|       |
  483|     19|  for (ci = bufs->head; ci; ci = ci->next) {
  ------------------
  |  Branch (483:25): [True: 19, False: 0]
  ------------------
  484|     19|    nghttp2_buf_reset(&ci->buf);
  485|     19|    nghttp2_buf_shift_right(&ci->buf, bufs->offset);
  ------------------
  |  |   63|     19|  do {                                                                         \
  |  |   64|     19|    (BUF)->pos += AMT;                                                         \
  |  |   65|     19|    (BUF)->last += AMT;                                                        \
  |  |   66|     19|  } while (0)
  |  |  ------------------
  |  |  |  Branch (66:12): [Folded, False: 19]
  |  |  ------------------
  ------------------
  486|       |
  487|     19|    if (--k == 0) {
  ------------------
  |  Branch (487:9): [True: 19, False: 0]
  ------------------
  488|     19|      break;
  489|     19|    }
  490|     19|  }
  491|       |
  492|     19|  if (ci) {
  ------------------
  |  Branch (492:7): [True: 19, False: 0]
  ------------------
  493|     19|    chain = ci->next;
  494|     19|    ci->next = NULL;
  495|       |
  496|     19|    for (ci = chain; ci;) {
  ------------------
  |  Branch (496:22): [True: 0, False: 19]
  ------------------
  497|      0|      chain = ci->next;
  498|       |
  499|      0|      buf_chain_del(ci, bufs->mem);
  500|       |
  501|      0|      ci = chain;
  502|      0|    }
  503|       |
  504|     19|    bufs->chunk_used = bufs->chunk_keep;
  505|     19|  }
  506|       |
  507|     19|  bufs->cur = bufs->head;
  508|     19|}
nghttp2_bufs_next_present:
  512|      4|int nghttp2_bufs_next_present(nghttp2_bufs *bufs) {
  513|      4|  nghttp2_buf_chain *chain;
  514|       |
  515|      4|  chain = bufs->cur->next;
  516|       |
  517|      4|  return chain && nghttp2_buf_len(&chain->buf);
  ------------------
  |  |   54|      0|#define nghttp2_buf_len(BUF) ((size_t)((BUF)->last - (BUF)->pos))
  |  |  ------------------
  |  |  |  Branch (54:30): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (517:10): [True: 0, False: 4]
  ------------------
  518|      4|}
nghttp2_buf.c:buf_chain_new:
   86|      2|                         nghttp2_mem *mem) {
   87|      2|  int rv;
   88|       |
   89|      2|  *chain = nghttp2_mem_malloc(mem, sizeof(nghttp2_buf_chain));
   90|      2|  if (*chain == NULL) {
  ------------------
  |  Branch (90:7): [True: 0, False: 2]
  ------------------
   91|      0|    return NGHTTP2_ERR_NOMEM;
   92|      0|  }
   93|       |
   94|      2|  (*chain)->next = NULL;
   95|       |
   96|      2|  rv = nghttp2_buf_init2(&(*chain)->buf, chunk_length, mem);
   97|      2|  if (rv != 0) {
  ------------------
  |  Branch (97:7): [True: 0, False: 2]
  ------------------
   98|      0|    nghttp2_mem_free(mem, *chain);
   99|      0|    return NGHTTP2_ERR_NOMEM;
  100|      0|  }
  101|       |
  102|      2|  return 0;
  103|      2|}
nghttp2_buf.c:buf_chain_del:
  105|      2|static void buf_chain_del(nghttp2_buf_chain *chain, nghttp2_mem *mem) {
  106|      2|  nghttp2_buf_free(&chain->buf, mem);
  107|      2|  nghttp2_mem_free(mem, chain);
  108|      2|}
nghttp2_buf.c:bufs_ensure_addb:
  354|      7|static int bufs_ensure_addb(nghttp2_bufs *bufs) {
  355|      7|  int rv;
  356|      7|  nghttp2_buf *buf;
  357|       |
  358|      7|  buf = &bufs->cur->buf;
  359|       |
  360|      7|  if (nghttp2_buf_avail(buf) > 0) {
  ------------------
  |  |   55|      7|#define nghttp2_buf_avail(BUF) ((size_t)((BUF)->end - (BUF)->last))
  ------------------
  |  Branch (360:7): [True: 7, False: 0]
  ------------------
  361|      7|    return 0;
  362|      7|  }
  363|       |
  364|      0|  rv = bufs_alloc_chain(bufs);
  365|      0|  if (rv != 0) {
  ------------------
  |  Branch (365:7): [True: 0, False: 0]
  ------------------
  366|      0|    return rv;
  367|      0|  }
  368|       |
  369|      0|  return 0;
  370|      0|}

nghttp2_session_callbacks_new:
   29|      2|int nghttp2_session_callbacks_new(nghttp2_session_callbacks **callbacks_ptr) {
   30|      2|  *callbacks_ptr = calloc(1, sizeof(nghttp2_session_callbacks));
   31|       |
   32|      2|  if (*callbacks_ptr == NULL) {
  ------------------
  |  Branch (32:7): [True: 0, False: 2]
  ------------------
   33|      0|    return NGHTTP2_ERR_NOMEM;
   34|      0|  }
   35|       |
   36|      2|  return 0;
   37|      2|}
nghttp2_session_callbacks_del:
   39|      2|void nghttp2_session_callbacks_del(nghttp2_session_callbacks *callbacks) {
   40|      2|  free(callbacks);
   41|      2|}
nghttp2_session_callbacks_set_send_callback:
   44|      2|  nghttp2_session_callbacks *cbs, nghttp2_send_callback send_callback) {
   45|      2|  cbs->send_callback = send_callback;
   46|      2|}
nghttp2_session_callbacks_set_on_frame_recv_callback:
   65|      2|  nghttp2_on_frame_recv_callback on_frame_recv_callback) {
   66|      2|  cbs->on_frame_recv_callback = on_frame_recv_callback;
   67|      2|}
nghttp2_session_callbacks_set_on_invalid_frame_recv_callback:
   71|      2|  nghttp2_on_invalid_frame_recv_callback on_invalid_frame_recv_callback) {
   72|      2|  cbs->on_invalid_frame_recv_callback = on_invalid_frame_recv_callback;
   73|      2|}
nghttp2_session_callbacks_set_on_data_chunk_recv_callback:
   77|      2|  nghttp2_on_data_chunk_recv_callback on_data_chunk_recv_callback) {
   78|      2|  cbs->on_data_chunk_recv_callback = on_data_chunk_recv_callback;
   79|      2|}
nghttp2_session_callbacks_set_on_frame_send_callback:
   89|      2|  nghttp2_on_frame_send_callback on_frame_send_callback) {
   90|      2|  cbs->on_frame_send_callback = on_frame_send_callback;
   91|      2|}
nghttp2_session_callbacks_set_on_stream_close_callback:
  101|      2|  nghttp2_on_stream_close_callback on_stream_close_callback) {
  102|      2|  cbs->on_stream_close_callback = on_stream_close_callback;
  103|      2|}
nghttp2_session_callbacks_set_on_begin_headers_callback:
  107|      2|  nghttp2_on_begin_headers_callback on_begin_headers_callback) {
  108|      2|  cbs->on_begin_headers_callback = on_begin_headers_callback;
  109|      2|}
nghttp2_session_callbacks_set_on_header_callback:
  113|      2|  nghttp2_on_header_callback on_header_callback) {
  114|      2|  cbs->on_header_callback = on_header_callback;
  115|      2|}
nghttp2_session_callbacks_set_error_callback:
  196|      2|  nghttp2_session_callbacks *cbs, nghttp2_error_callback error_callback) {
  197|      2|  cbs->error_callback = error_callback;
  198|      2|}

nghttp2_frame_pack_frame_hd:
   37|     13|void nghttp2_frame_pack_frame_hd(uint8_t *buf, const nghttp2_frame_hd *hd) {
   38|     13|  nghttp2_put_uint32be(&buf[0], (uint32_t)(hd->length << 8));
   39|     13|  buf[3] = hd->type;
   40|     13|  buf[4] = hd->flags;
   41|     13|  nghttp2_put_uint32be(&buf[5], (uint32_t)hd->stream_id);
   42|       |  /* ignore hd->reserved for now */
   43|     13|}
nghttp2_frame_unpack_frame_hd:
   45|      3|void nghttp2_frame_unpack_frame_hd(nghttp2_frame_hd *hd, const uint8_t *buf) {
   46|      3|  *hd = (nghttp2_frame_hd){
   47|      3|    .length = nghttp2_get_uint32(&buf[0]) >> 8,
   48|      3|    .stream_id = nghttp2_get_uint32(&buf[5]) & NGHTTP2_STREAM_ID_MASK,
  ------------------
  |  |   36|      3|#define NGHTTP2_STREAM_ID_MASK ((1u << 31) - 1)
  ------------------
   49|      3|    .type = buf[3],
   50|      3|    .flags = buf[4],
   51|      3|  };
   52|      3|}
nghttp2_frame_hd_init:
   55|     13|                           uint8_t flags, int32_t stream_id) {
   56|     13|  *hd = (nghttp2_frame_hd){
   57|     13|    .length = length,
   58|     13|    .stream_id = stream_id,
   59|     13|    .type = type,
   60|     13|    .flags = flags,
   61|     13|  };
   62|     13|}
nghttp2_frame_headers_init:
   67|      2|                                nghttp2_nv *nva, size_t nvlen) {
   68|      2|  nghttp2_frame_hd_init(&frame->hd, 0, NGHTTP2_HEADERS, flags, stream_id);
   69|      2|  frame->padlen = 0;
   70|      2|  frame->nva = nva;
   71|      2|  frame->nvlen = nvlen;
   72|      2|  frame->cat = cat;
   73|       |
   74|      2|  if (pri_spec) {
  ------------------
  |  Branch (74:7): [True: 0, False: 2]
  ------------------
   75|      0|    frame->pri_spec = *pri_spec;
   76|      2|  } else {
   77|      2|    nghttp2_priority_spec_default_init(&frame->pri_spec);
   78|      2|  }
   79|      2|}
nghttp2_frame_headers_free:
   81|      3|void nghttp2_frame_headers_free(nghttp2_headers *frame, nghttp2_mem *mem) {
   82|      3|  nghttp2_nv_array_del(frame->nva, mem);
   83|      3|}
nghttp2_frame_rst_stream_init:
   95|      2|                                   uint32_t error_code) {
   96|      2|  nghttp2_frame_hd_init(&frame->hd, 4, NGHTTP2_RST_STREAM, NGHTTP2_FLAG_NONE,
   97|      2|                        stream_id);
   98|      2|  frame->error_code = error_code;
   99|      2|}
nghttp2_frame_rst_stream_free:
  101|      2|void nghttp2_frame_rst_stream_free(nghttp2_rst_stream *frame) { (void)frame; }
nghttp2_frame_settings_init:
  104|      3|                                 nghttp2_settings_entry *iv, size_t niv) {
  105|      3|  nghttp2_frame_hd_init(&frame->hd, niv * NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH,
  ------------------
  |  |   61|      3|#define NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH 6
  ------------------
  106|      3|                        NGHTTP2_SETTINGS, flags, 0);
  107|      3|  frame->niv = niv;
  108|      3|  frame->iv = iv;
  109|      3|}
nghttp2_frame_settings_free:
  111|      5|void nghttp2_frame_settings_free(nghttp2_settings *frame, nghttp2_mem *mem) {
  112|      5|  nghttp2_mem_free(mem, frame->iv);
  113|      5|}
nghttp2_frame_window_update_init:
  162|      6|                                      int32_t window_size_increment) {
  163|      6|  nghttp2_frame_hd_init(&frame->hd, 4, NGHTTP2_WINDOW_UPDATE, flags, stream_id);
  164|      6|  frame->window_size_increment = window_size_increment;
  165|      6|  frame->reserved = 0;
  166|      6|}
nghttp2_frame_window_update_free:
  168|      6|void nghttp2_frame_window_update_free(nghttp2_window_update *frame) {
  169|      6|  (void)frame;
  170|      6|}
nghttp2_frame_trail_padlen:
  172|      2|size_t nghttp2_frame_trail_padlen(nghttp2_frame *frame, size_t padlen) {
  173|       |  /* We have iframe->padlen == 0, but iframe->frame.hd.flags may have
  174|       |     NGHTTP2_FLAG_PADDED set.  This happens when receiving
  175|       |     CONTINUATION frame, since we don't reset flags after HEADERS was
  176|       |     received. */
  177|      2|  if (padlen == 0) {
  ------------------
  |  Branch (177:7): [True: 2, False: 0]
  ------------------
  178|      2|    return 0;
  179|      2|  }
  180|      0|  return padlen - ((frame->hd.flags & NGHTTP2_FLAG_PADDED) > 0);
  181|      2|}
nghttp2_frame_priority_len:
  282|      3|size_t nghttp2_frame_priority_len(uint8_t flags) {
  283|      3|  if (flags & NGHTTP2_FLAG_PRIORITY) {
  ------------------
  |  Branch (283:7): [True: 0, False: 3]
  ------------------
  284|      0|    return NGHTTP2_PRIORITY_SPECLEN;
  ------------------
  |  |   64|      0|#define NGHTTP2_PRIORITY_SPECLEN 5
  ------------------
  285|      0|  }
  286|       |
  287|      3|  return 0;
  288|      3|}
nghttp2_frame_headers_payload_nv_offset:
  290|      2|size_t nghttp2_frame_headers_payload_nv_offset(nghttp2_headers *frame) {
  291|      2|  return nghttp2_frame_priority_len(frame->hd.flags);
  292|      2|}
nghttp2_frame_pack_headers:
  363|      2|                               nghttp2_hd_deflater *deflater) {
  364|      2|  size_t nv_offset;
  365|      2|  int rv;
  366|      2|  nghttp2_buf *buf;
  367|       |
  368|      2|  assert(bufs->head == bufs->cur);
  ------------------
  |  Branch (368:3): [True: 0, False: 2]
  |  Branch (368:3): [True: 2, False: 0]
  ------------------
  369|       |
  370|      2|  nv_offset = nghttp2_frame_headers_payload_nv_offset(frame);
  371|       |
  372|      2|  buf = &bufs->cur->buf;
  373|       |
  374|      2|  buf->pos += nv_offset;
  375|      2|  buf->last = buf->pos;
  376|       |
  377|       |  /* This call will adjust buf->last to the correct position */
  378|      2|  rv = nghttp2_hd_deflate_hd_bufs(deflater, bufs, frame->nva, frame->nvlen);
  379|       |
  380|      2|  if (rv == NGHTTP2_ERR_BUFFER_ERROR) {
  ------------------
  |  Branch (380:7): [True: 0, False: 2]
  ------------------
  381|      0|    rv = NGHTTP2_ERR_HEADER_COMP;
  382|      0|  }
  383|       |
  384|      2|  buf->pos -= nv_offset;
  385|       |
  386|      2|  if (rv != 0) {
  ------------------
  |  Branch (386:7): [True: 0, False: 2]
  ------------------
  387|      0|    return rv;
  388|      0|  }
  389|       |
  390|      2|  if (frame->hd.flags & NGHTTP2_FLAG_PRIORITY) {
  ------------------
  |  Branch (390:7): [True: 0, False: 2]
  ------------------
  391|      0|    nghttp2_frame_pack_priority_spec(buf->pos, &frame->pri_spec);
  392|      0|  }
  393|       |
  394|      2|  frame->padlen = 0;
  395|      2|  frame->hd.length = nghttp2_bufs_len(bufs);
  396|       |
  397|      2|  return frame_pack_headers_shared(bufs, &frame->hd);
  398|      2|}
nghttp2_frame_unpack_headers_payload:
  423|      1|                                          const uint8_t *payload) {
  424|      1|  if (frame->hd.flags & NGHTTP2_FLAG_PRIORITY) {
  ------------------
  |  Branch (424:7): [True: 0, False: 1]
  ------------------
  425|      0|    nghttp2_frame_unpack_priority_spec(&frame->pri_spec, payload);
  426|      1|  } else {
  427|      1|    nghttp2_priority_spec_default_init(&frame->pri_spec);
  428|      1|  }
  429|       |
  430|       |  frame->nva = NULL;
  431|      1|  frame->nvlen = 0;
  432|      1|}
nghttp2_frame_pack_rst_stream:
  458|      2|                                   nghttp2_rst_stream *frame) {
  459|      2|  nghttp2_buf *buf;
  460|       |
  461|      2|  assert(bufs->head == bufs->cur);
  ------------------
  |  Branch (461:3): [True: 0, False: 2]
  |  Branch (461:3): [True: 2, False: 0]
  ------------------
  462|       |
  463|      2|  buf = &bufs->head->buf;
  464|       |
  465|      2|  assert(nghttp2_buf_avail(buf) >= 4);
  ------------------
  |  Branch (465:3): [True: 0, False: 2]
  |  Branch (465:3): [True: 2, False: 0]
  ------------------
  466|       |
  467|      2|  buf->pos -= NGHTTP2_FRAME_HDLEN;
  ------------------
  |  |   40|      2|#define NGHTTP2_FRAME_HDLEN 9
  ------------------
  468|       |
  469|      2|  nghttp2_frame_pack_frame_hd(buf->pos, &frame->hd);
  470|       |
  471|      2|  nghttp2_put_uint32be(buf->last, frame->error_code);
  472|      2|  buf->last += 4;
  473|      2|}
nghttp2_frame_pack_settings:
  480|      3|int nghttp2_frame_pack_settings(nghttp2_bufs *bufs, nghttp2_settings *frame) {
  481|      3|  nghttp2_buf *buf;
  482|       |
  483|      3|  assert(bufs->head == bufs->cur);
  ------------------
  |  Branch (483:3): [True: 0, False: 3]
  |  Branch (483:3): [True: 3, False: 0]
  ------------------
  484|       |
  485|      3|  buf = &bufs->head->buf;
  486|       |
  487|      3|  if (nghttp2_buf_avail(buf) < frame->hd.length) {
  ------------------
  |  |   55|      3|#define nghttp2_buf_avail(BUF) ((size_t)((BUF)->end - (BUF)->last))
  ------------------
  |  Branch (487:7): [True: 0, False: 3]
  ------------------
  488|      0|    return NGHTTP2_ERR_FRAME_SIZE_ERROR;
  489|      0|  }
  490|       |
  491|      3|  buf->pos -= NGHTTP2_FRAME_HDLEN;
  ------------------
  |  |   40|      3|#define NGHTTP2_FRAME_HDLEN 9
  ------------------
  492|       |
  493|      3|  nghttp2_frame_pack_frame_hd(buf->pos, &frame->hd);
  494|       |
  495|      3|  buf->last +=
  496|      3|    nghttp2_frame_pack_settings_payload(buf->last, frame->iv, frame->niv);
  497|       |
  498|      3|  return 0;
  499|      3|}
nghttp2_frame_pack_settings_payload:
  503|      3|                                           size_t niv) {
  504|      3|  size_t i;
  505|      9|  for (i = 0; i < niv; ++i, buf += NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH) {
  ------------------
  |  |   61|      6|#define NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH 6
  ------------------
  |  Branch (505:15): [True: 6, False: 3]
  ------------------
  506|      6|    nghttp2_put_uint16be(buf, (uint16_t)iv[i].settings_id);
  507|      6|    nghttp2_put_uint32be(buf + 2, iv[i].value);
  508|      6|  }
  509|      3|  return NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH * niv;
  ------------------
  |  |   61|      3|#define NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH 6
  ------------------
  510|      3|}
nghttp2_frame_unpack_settings_payload:
  514|      2|                                           size_t niv) {
  515|      2|  frame->iv = iv;
  516|      2|  frame->niv = niv;
  517|      2|}
nghttp2_frame_pack_window_update:
  695|      6|                                      nghttp2_window_update *frame) {
  696|      6|  nghttp2_buf *buf;
  697|       |
  698|      6|  assert(bufs->head == bufs->cur);
  ------------------
  |  Branch (698:3): [True: 0, False: 6]
  |  Branch (698:3): [True: 6, False: 0]
  ------------------
  699|       |
  700|      6|  buf = &bufs->head->buf;
  701|       |
  702|      6|  assert(nghttp2_buf_avail(buf) >= 4);
  ------------------
  |  Branch (702:3): [True: 0, False: 6]
  |  Branch (702:3): [True: 6, False: 0]
  ------------------
  703|       |
  704|      6|  buf->pos -= NGHTTP2_FRAME_HDLEN;
  ------------------
  |  |   40|      6|#define NGHTTP2_FRAME_HDLEN 9
  ------------------
  705|       |
  706|      6|  nghttp2_frame_pack_frame_hd(buf->pos, &frame->hd);
  707|       |
  708|      6|  nghttp2_put_uint32be(buf->last, (uint32_t)frame->window_size_increment);
  709|      6|  buf->last += 4;
  710|      6|}
nghttp2_frame_iv_copy:
  954|      4|                                              size_t niv, nghttp2_mem *mem) {
  955|      4|  nghttp2_settings_entry *iv_copy;
  956|      4|  size_t len = niv * sizeof(nghttp2_settings_entry);
  957|       |
  958|      4|  if (len == 0) {
  ------------------
  |  Branch (958:7): [True: 0, False: 4]
  ------------------
  959|      0|    return NULL;
  960|      0|  }
  961|       |
  962|      4|  iv_copy = nghttp2_mem_malloc(mem, len);
  963|       |
  964|      4|  if (iv_copy == NULL) {
  ------------------
  |  Branch (964:7): [True: 0, False: 4]
  ------------------
  965|      0|    return NULL;
  966|      0|  }
  967|       |
  968|      4|  memcpy(iv_copy, iv, len);
  969|       |
  970|      4|  return iv_copy;
  971|      4|}
nghttp2_nv_array_del:
  995|      3|void nghttp2_nv_array_del(nghttp2_nv *nva, nghttp2_mem *mem) {
  996|      3|  nghttp2_mem_free(mem, nva);
  997|      3|}
nghttp2_nv_array_copy:
 1049|      2|                          size_t nvlen, nghttp2_mem *mem) {
 1050|      2|  size_t i;
 1051|      2|  uint8_t *data = NULL;
 1052|      2|  size_t buflen = 0;
 1053|      2|  nghttp2_nv *p;
 1054|       |
 1055|      2|  if (nvlen == 0) {
  ------------------
  |  Branch (1055:7): [True: 0, False: 2]
  ------------------
 1056|      0|    *nva_ptr = NULL;
 1057|       |
 1058|      0|    return 0;
 1059|      0|  }
 1060|       |
 1061|     12|  for (i = 0; i < nvlen; ++i) {
  ------------------
  |  Branch (1061:15): [True: 10, False: 2]
  ------------------
 1062|       |    /* + 1 for null-termination */
 1063|     10|    if ((nva[i].flags & NGHTTP2_NV_FLAG_NO_COPY_NAME) == 0) {
  ------------------
  |  Branch (1063:9): [True: 10, False: 0]
  ------------------
 1064|     10|      buflen += nva[i].namelen + 1;
 1065|     10|    }
 1066|     10|    if ((nva[i].flags & NGHTTP2_NV_FLAG_NO_COPY_VALUE) == 0) {
  ------------------
  |  Branch (1066:9): [True: 10, False: 0]
  ------------------
 1067|     10|      buflen += nva[i].valuelen + 1;
 1068|     10|    }
 1069|     10|  }
 1070|       |
 1071|      2|  buflen += sizeof(nghttp2_nv) * nvlen;
 1072|       |
 1073|      2|  *nva_ptr = nghttp2_mem_malloc(mem, buflen);
 1074|       |
 1075|      2|  if (*nva_ptr == NULL) {
  ------------------
  |  Branch (1075:7): [True: 0, False: 2]
  ------------------
 1076|      0|    return NGHTTP2_ERR_NOMEM;
 1077|      0|  }
 1078|       |
 1079|      2|  p = *nva_ptr;
 1080|      2|  data = (uint8_t *)(*nva_ptr) + sizeof(nghttp2_nv) * nvlen;
 1081|       |
 1082|     12|  for (i = 0; i < nvlen; ++i) {
  ------------------
  |  Branch (1082:15): [True: 10, False: 2]
  ------------------
 1083|     10|    p->flags = nva[i].flags;
 1084|       |
 1085|     10|    if (nva[i].flags & NGHTTP2_NV_FLAG_NO_COPY_NAME) {
  ------------------
  |  Branch (1085:9): [True: 0, False: 10]
  ------------------
 1086|      0|      p->name = nva[i].name;
 1087|      0|      p->namelen = nva[i].namelen;
 1088|     10|    } else {
 1089|     10|      if (nva[i].namelen) {
  ------------------
  |  Branch (1089:11): [True: 10, False: 0]
  ------------------
 1090|     10|        memcpy(data, nva[i].name, nva[i].namelen);
 1091|     10|      }
 1092|     10|      p->name = data;
 1093|     10|      p->namelen = nva[i].namelen;
 1094|     10|      data[p->namelen] = '\0';
 1095|     10|      nghttp2_downcase(p->name, p->namelen);
 1096|     10|      data += nva[i].namelen + 1;
 1097|     10|    }
 1098|       |
 1099|     10|    if (nva[i].flags & NGHTTP2_NV_FLAG_NO_COPY_VALUE) {
  ------------------
  |  Branch (1099:9): [True: 0, False: 10]
  ------------------
 1100|      0|      p->value = nva[i].value;
 1101|      0|      p->valuelen = nva[i].valuelen;
 1102|     10|    } else {
 1103|     10|      if (nva[i].valuelen) {
  ------------------
  |  Branch (1103:11): [True: 10, False: 0]
  ------------------
 1104|     10|        memcpy(data, nva[i].value, nva[i].valuelen);
 1105|     10|      }
 1106|     10|      p->value = data;
 1107|     10|      p->valuelen = nva[i].valuelen;
 1108|     10|      data[p->valuelen] = '\0';
 1109|     10|      data += nva[i].valuelen + 1;
 1110|     10|    }
 1111|       |
 1112|     10|    ++p;
 1113|     10|  }
 1114|      2|  return 0;
 1115|      2|}
nghttp2_iv_check:
 1117|      3|int nghttp2_iv_check(const nghttp2_settings_entry *iv, size_t niv) {
 1118|      3|  size_t i;
 1119|      9|  for (i = 0; i < niv; ++i) {
  ------------------
  |  Branch (1119:15): [True: 6, False: 3]
  ------------------
 1120|      6|    switch (iv[i].settings_id) {
  ------------------
  |  Branch (1120:13): [True: 6, False: 0]
  ------------------
 1121|      0|    case NGHTTP2_SETTINGS_HEADER_TABLE_SIZE:
  ------------------
  |  Branch (1121:5): [True: 0, False: 6]
  ------------------
 1122|      0|      break;
 1123|      2|    case NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS:
  ------------------
  |  Branch (1123:5): [True: 2, False: 4]
  ------------------
 1124|      2|      break;
 1125|      2|    case NGHTTP2_SETTINGS_ENABLE_PUSH:
  ------------------
  |  Branch (1125:5): [True: 2, False: 4]
  ------------------
 1126|      2|      if (iv[i].value != 0 && iv[i].value != 1) {
  ------------------
  |  Branch (1126:11): [True: 0, False: 2]
  |  Branch (1126:31): [True: 0, False: 0]
  ------------------
 1127|      0|        return 0;
 1128|      0|      }
 1129|      2|      break;
 1130|      2|    case NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE:
  ------------------
  |  Branch (1130:5): [True: 2, False: 4]
  ------------------
 1131|      2|      if (iv[i].value > (uint32_t)NGHTTP2_MAX_WINDOW_SIZE) {
  ------------------
  |  |  224|      2|#define NGHTTP2_MAX_WINDOW_SIZE ((int32_t)((1U << 31) - 1))
  ------------------
  |  Branch (1131:11): [True: 0, False: 2]
  ------------------
 1132|      0|        return 0;
 1133|      0|      }
 1134|      2|      break;
 1135|      2|    case NGHTTP2_SETTINGS_MAX_FRAME_SIZE:
  ------------------
  |  Branch (1135:5): [True: 0, False: 6]
  ------------------
 1136|      0|      if (iv[i].value < NGHTTP2_MAX_FRAME_SIZE_MIN ||
  ------------------
  |  |   43|      0|#define NGHTTP2_MAX_FRAME_SIZE_MIN (1 << 14)
  ------------------
  |  Branch (1136:11): [True: 0, False: 0]
  ------------------
 1137|      0|          iv[i].value > NGHTTP2_MAX_FRAME_SIZE_MAX) {
  ------------------
  |  |   42|      0|#define NGHTTP2_MAX_FRAME_SIZE_MAX ((1 << 24) - 1)
  ------------------
  |  Branch (1137:11): [True: 0, False: 0]
  ------------------
 1138|      0|        return 0;
 1139|      0|      }
 1140|      0|      break;
 1141|      0|    case NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE:
  ------------------
  |  Branch (1141:5): [True: 0, False: 6]
  ------------------
 1142|      0|      break;
 1143|      0|    case NGHTTP2_SETTINGS_ENABLE_CONNECT_PROTOCOL:
  ------------------
  |  Branch (1143:5): [True: 0, False: 6]
  ------------------
 1144|      0|      if (iv[i].value != 0 && iv[i].value != 1) {
  ------------------
  |  Branch (1144:11): [True: 0, False: 0]
  |  Branch (1144:31): [True: 0, False: 0]
  ------------------
 1145|      0|        return 0;
 1146|      0|      }
 1147|      0|      break;
 1148|      0|    case NGHTTP2_SETTINGS_NO_RFC7540_PRIORITIES:
  ------------------
  |  Branch (1148:5): [True: 0, False: 6]
  ------------------
 1149|      0|      if (iv[i].value != 0 && iv[i].value != 1) {
  ------------------
  |  Branch (1149:11): [True: 0, False: 0]
  |  Branch (1149:31): [True: 0, False: 0]
  ------------------
 1150|      0|        return 0;
 1151|      0|      }
 1152|      0|      break;
 1153|      6|    }
 1154|      6|  }
 1155|      3|  return 1;
 1156|      3|}
nghttp2_frame_add_pad:
 1188|      2|                           size_t padlen, int framehd_only) {
 1189|      2|  nghttp2_buf *buf;
 1190|       |
 1191|      2|  if (padlen == 0) {
  ------------------
  |  Branch (1191:7): [True: 2, False: 0]
  ------------------
 1192|      2|    DEBUGF("send: padlen = 0, nothing to do\n");
  ------------------
  |  |   39|      2|    do {                                                                       \
  |  |   40|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 1193|       |
 1194|      2|    return;
 1195|      2|  }
 1196|       |
 1197|       |  /*
 1198|       |   * We have arranged bufs like this:
 1199|       |   *
 1200|       |   *  0                   1                   2                   3
 1201|       |   *  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 1202|       |   * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 1203|       |   * | |Frame header     | Frame payload...                          :
 1204|       |   * +-+-----------------+-------------------------------------------+
 1205|       |   * | |Frame header     | Frame payload...                          :
 1206|       |   * +-+-----------------+-------------------------------------------+
 1207|       |   * | |Frame header     | Frame payload...                          :
 1208|       |   * +-+-----------------+-------------------------------------------+
 1209|       |   *
 1210|       |   * We arranged padding so that it is included in the first frame
 1211|       |   * completely.  For padded frame, we are going to adjust buf->pos of
 1212|       |   * frame which includes padding and serialize (memmove) frame header
 1213|       |   * in the correct position.  Also extends buf->last to include
 1214|       |   * padding.
 1215|       |   */
 1216|       |
 1217|      0|  buf = &bufs->head->buf;
 1218|       |
 1219|      0|  assert(nghttp2_buf_avail(buf) >= padlen - 1);
  ------------------
  |  Branch (1219:3): [True: 0, False: 0]
  |  Branch (1219:3): [True: 0, False: 0]
  ------------------
 1220|       |
 1221|      0|  frame_set_pad(buf, padlen, framehd_only);
 1222|       |
 1223|      0|  hd->length += padlen;
 1224|      0|  hd->flags |= NGHTTP2_FLAG_PADDED;
 1225|       |
 1226|      0|  DEBUGF("send: final payloadlen=%zu, padlen=%zu\n", hd->length, padlen);
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1227|      0|}
nghttp2_frame.c:frame_pack_headers_shared:
  307|      2|                                     nghttp2_frame_hd *frame_hd) {
  308|      2|  nghttp2_buf *buf;
  309|      2|  nghttp2_buf_chain *ci, *ce;
  310|      2|  nghttp2_frame_hd hd;
  311|       |
  312|      2|  buf = &bufs->head->buf;
  313|       |
  314|      2|  hd = *frame_hd;
  315|      2|  hd.length = nghttp2_buf_len(buf);
  ------------------
  |  |   54|      2|#define nghttp2_buf_len(BUF) ((size_t)((BUF)->last - (BUF)->pos))
  ------------------
  316|       |
  317|      2|  DEBUGF("send: HEADERS/PUSH_PROMISE, payloadlen=%zu\n", hd.length);
  ------------------
  |  |   39|      2|    do {                                                                       \
  |  |   40|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
  318|       |
  319|       |  /* We have multiple frame buffers, which means one or more
  320|       |     CONTINUATION frame is involved. Remove END_HEADERS flag from the
  321|       |     first frame. */
  322|      2|  if (bufs->head != bufs->cur) {
  ------------------
  |  Branch (322:7): [True: 0, False: 2]
  ------------------
  323|      0|    hd.flags = (uint8_t)(hd.flags & ~NGHTTP2_FLAG_END_HEADERS);
  324|      0|  }
  325|       |
  326|      2|  buf->pos -= NGHTTP2_FRAME_HDLEN;
  ------------------
  |  |   40|      2|#define NGHTTP2_FRAME_HDLEN 9
  ------------------
  327|      2|  nghttp2_frame_pack_frame_hd(buf->pos, &hd);
  328|       |
  329|      2|  if (bufs->head != bufs->cur) {
  ------------------
  |  Branch (329:7): [True: 0, False: 2]
  ------------------
  330|       |    /* 2nd and later frames are CONTINUATION frames. */
  331|      0|    hd.type = NGHTTP2_CONTINUATION;
  332|       |    /* We don't have no flags except for last CONTINUATION */
  333|      0|    hd.flags = NGHTTP2_FLAG_NONE;
  334|       |
  335|      0|    ce = bufs->cur;
  336|       |
  337|      0|    for (ci = bufs->head->next; ci != ce; ci = ci->next) {
  ------------------
  |  Branch (337:33): [True: 0, False: 0]
  ------------------
  338|      0|      buf = &ci->buf;
  339|       |
  340|      0|      hd.length = nghttp2_buf_len(buf);
  ------------------
  |  |   54|      0|#define nghttp2_buf_len(BUF) ((size_t)((BUF)->last - (BUF)->pos))
  ------------------
  341|       |
  342|      0|      DEBUGF("send: int CONTINUATION, payloadlen=%zu\n", hd.length);
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  343|       |
  344|      0|      buf->pos -= NGHTTP2_FRAME_HDLEN;
  ------------------
  |  |   40|      0|#define NGHTTP2_FRAME_HDLEN 9
  ------------------
  345|      0|      nghttp2_frame_pack_frame_hd(buf->pos, &hd);
  346|      0|    }
  347|       |
  348|      0|    buf = &ci->buf;
  349|      0|    hd.length = nghttp2_buf_len(buf);
  ------------------
  |  |   54|      0|#define nghttp2_buf_len(BUF) ((size_t)((BUF)->last - (BUF)->pos))
  ------------------
  350|       |    /* Set END_HEADERS flag for last CONTINUATION */
  351|      0|    hd.flags = NGHTTP2_FLAG_END_HEADERS;
  352|       |
  353|      0|    DEBUGF("send: last CONTINUATION, payloadlen=%zu\n", hd.length);
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  354|       |
  355|      0|    buf->pos -= NGHTTP2_FRAME_HDLEN;
  ------------------
  |  |   40|      0|#define NGHTTP2_FRAME_HDLEN 9
  ------------------
  356|      0|    nghttp2_frame_pack_frame_hd(buf->pos, &hd);
  357|      0|  }
  358|       |
  359|      2|  return 0;
  360|      2|}

nghttp2_hd_entry_init:
  504|      4|void nghttp2_hd_entry_init(nghttp2_hd_entry *ent, nghttp2_hd_nv *nv) {
  505|      4|  *ent = (nghttp2_hd_entry){
  506|      4|    .nv = *nv,
  507|      4|    .cnv =
  508|      4|      {
  509|      4|        .name = nv->name->base,
  510|      4|        .value = nv->value->base,
  511|      4|        .namelen = nv->name->len,
  512|      4|        .valuelen = nv->value->len,
  513|      4|        .flags = nv->flags,
  514|      4|      },
  515|      4|  };
  516|       |
  517|      4|  nghttp2_rcbuf_incref(ent->nv.name);
  518|      4|  nghttp2_rcbuf_incref(ent->nv.value);
  519|      4|}
nghttp2_hd_entry_free:
  521|      4|void nghttp2_hd_entry_free(nghttp2_hd_entry *ent) {
  522|      4|  nghttp2_rcbuf_decref(ent->nv.value);
  523|      4|  nghttp2_rcbuf_decref(ent->nv.name);
  524|      4|}
nghttp2_hd_deflate_init2:
  732|      2|                             nghttp2_mem *mem) {
  733|      2|  int rv;
  734|      2|  rv = hd_context_init(&deflater->ctx, mem);
  735|      2|  if (rv != 0) {
  ------------------
  |  Branch (735:7): [True: 0, False: 2]
  ------------------
  736|      0|    return rv;
  737|      0|  }
  738|       |
  739|      2|  hd_map_init(&deflater->map);
  740|       |
  741|      2|  if (max_deflate_dynamic_table_size < NGHTTP2_HD_DEFAULT_MAX_BUFFER_SIZE) {
  ------------------
  |  |   39|      2|#define NGHTTP2_HD_DEFAULT_MAX_BUFFER_SIZE NGHTTP2_DEFAULT_HEADER_TABLE_SIZE
  |  |  ------------------
  |  |  |  |  244|      2|#define NGHTTP2_DEFAULT_HEADER_TABLE_SIZE (1 << 12)
  |  |  ------------------
  ------------------
  |  Branch (741:7): [True: 0, False: 2]
  ------------------
  742|      0|    deflater->notify_table_size_change = 1;
  743|      0|    deflater->ctx.hd_table_bufsize_max = max_deflate_dynamic_table_size;
  744|      2|  } else {
  745|      2|    deflater->notify_table_size_change = 0;
  746|      2|  }
  747|       |
  748|      2|  deflater->deflate_hd_table_bufsize_max = max_deflate_dynamic_table_size;
  749|      2|  deflater->min_hd_table_bufsize_max = UINT32_MAX;
  750|       |
  751|      2|  return 0;
  752|      2|}
nghttp2_hd_inflate_init:
  754|      2|int nghttp2_hd_inflate_init(nghttp2_hd_inflater *inflater, nghttp2_mem *mem) {
  755|      2|  int rv;
  756|       |
  757|      2|  rv = hd_context_init(&inflater->ctx, mem);
  758|      2|  if (rv != 0) {
  ------------------
  |  Branch (758:7): [True: 0, False: 2]
  ------------------
  759|      0|    goto fail;
  760|      0|  }
  761|       |
  762|      2|  inflater->settings_hd_table_bufsize_max = NGHTTP2_HD_DEFAULT_MAX_BUFFER_SIZE;
  ------------------
  |  |   39|      2|#define NGHTTP2_HD_DEFAULT_MAX_BUFFER_SIZE NGHTTP2_DEFAULT_HEADER_TABLE_SIZE
  |  |  ------------------
  |  |  |  |  244|      2|#define NGHTTP2_DEFAULT_HEADER_TABLE_SIZE (1 << 12)
  |  |  ------------------
  ------------------
  763|      2|  inflater->min_hd_table_bufsize_max = UINT32_MAX;
  764|       |
  765|      2|  inflater->nv_name_keep = NULL;
  766|      2|  inflater->nv_value_keep = NULL;
  767|       |
  768|      2|  inflater->opcode = NGHTTP2_HD_OPCODE_NONE;
  769|      2|  inflater->state = NGHTTP2_HD_STATE_INFLATE_START;
  770|       |
  771|      2|  nghttp2_buf_init(&inflater->namebuf);
  772|      2|  nghttp2_buf_init(&inflater->valuebuf);
  773|       |
  774|      2|  inflater->namercbuf = NULL;
  775|      2|  inflater->valuercbuf = NULL;
  776|       |
  777|      2|  inflater->huffman_encoded = 0;
  778|      2|  inflater->index = 0;
  779|      2|  inflater->left = 0;
  780|      2|  inflater->shift = 0;
  781|      2|  inflater->index_required = 0;
  782|      2|  inflater->no_index = 0;
  783|       |
  784|      2|  return 0;
  785|       |
  786|      0|fail:
  787|      0|  return rv;
  788|      2|}
nghttp2_hd_deflate_free:
  798|      2|void nghttp2_hd_deflate_free(nghttp2_hd_deflater *deflater) {
  799|      2|  hd_context_free(&deflater->ctx);
  800|      2|}
nghttp2_hd_inflate_free:
  802|      2|void nghttp2_hd_inflate_free(nghttp2_hd_inflater *inflater) {
  803|      2|  hd_inflate_keep_free(inflater);
  804|       |
  805|      2|  nghttp2_rcbuf_decref(inflater->valuercbuf);
  806|      2|  nghttp2_rcbuf_decref(inflater->namercbuf);
  807|       |
  808|      2|  hd_context_free(&inflater->ctx);
  809|      2|}
nghttp2_hd_table_get:
 1330|      5|nghttp2_hd_nv nghttp2_hd_table_get(nghttp2_hd_context *context, size_t idx) {
 1331|      5|  assert(INDEX_RANGE_VALID(context, idx));
  ------------------
  |  Branch (1331:3): [True: 0, False: 5]
  |  Branch (1331:3): [True: 5, False: 0]
  ------------------
 1332|      5|  if (idx >= NGHTTP2_STATIC_TABLE_LENGTH) {
  ------------------
  |  |   53|      5|#define NGHTTP2_STATIC_TABLE_LENGTH 61
  ------------------
  |  Branch (1332:7): [True: 0, False: 5]
  ------------------
 1333|      0|    return hd_ringbuf_get(&context->hd_table, idx - NGHTTP2_STATIC_TABLE_LENGTH)
  ------------------
  |  |   53|      0|#define NGHTTP2_STATIC_TABLE_LENGTH 61
  ------------------
 1334|      0|      ->nv;
 1335|      5|  } else {
 1336|      5|    const nghttp2_hd_static_entry *ent = &static_table[idx];
 1337|      5|    return (nghttp2_hd_nv){
 1338|      5|      .name = (nghttp2_rcbuf *)&ent->name,
 1339|      5|      .value = (nghttp2_rcbuf *)&ent->value,
 1340|      5|      .token = ent->token,
 1341|      5|      .flags = NGHTTP2_NV_FLAG_NONE,
 1342|      5|    };
 1343|      5|  }
 1344|      5|}
nghttp2_hd_deflate_hd_bufs:
 1471|      2|                               size_t nvlen) {
 1472|      2|  size_t i;
 1473|      2|  int rv = 0;
 1474|       |
 1475|      2|  if (deflater->ctx.bad) {
  ------------------
  |  Branch (1475:7): [True: 0, False: 2]
  ------------------
 1476|      0|    return NGHTTP2_ERR_HEADER_COMP;
 1477|      0|  }
 1478|       |
 1479|      2|  if (deflater->notify_table_size_change) {
  ------------------
  |  Branch (1479:7): [True: 0, False: 2]
  ------------------
 1480|      0|    size_t min_hd_table_bufsize_max;
 1481|       |
 1482|      0|    min_hd_table_bufsize_max = deflater->min_hd_table_bufsize_max;
 1483|       |
 1484|      0|    deflater->notify_table_size_change = 0;
 1485|      0|    deflater->min_hd_table_bufsize_max = UINT32_MAX;
 1486|       |
 1487|      0|    if (deflater->ctx.hd_table_bufsize_max > min_hd_table_bufsize_max) {
  ------------------
  |  Branch (1487:9): [True: 0, False: 0]
  ------------------
 1488|      0|      rv = emit_table_size(bufs, min_hd_table_bufsize_max);
 1489|       |
 1490|      0|      if (rv != 0) {
  ------------------
  |  Branch (1490:11): [True: 0, False: 0]
  ------------------
 1491|      0|        goto fail;
 1492|      0|      }
 1493|      0|    }
 1494|       |
 1495|      0|    rv = emit_table_size(bufs, deflater->ctx.hd_table_bufsize_max);
 1496|       |
 1497|      0|    if (rv != 0) {
  ------------------
  |  Branch (1497:9): [True: 0, False: 0]
  ------------------
 1498|      0|      goto fail;
 1499|      0|    }
 1500|      0|  }
 1501|       |
 1502|     12|  for (i = 0; i < nvlen; ++i) {
  ------------------
  |  Branch (1502:15): [True: 10, False: 2]
  ------------------
 1503|     10|    rv = deflate_nv(deflater, bufs, &nv[i]);
 1504|     10|    if (rv != 0) {
  ------------------
  |  Branch (1504:9): [True: 0, False: 10]
  ------------------
 1505|      0|      goto fail;
 1506|      0|    }
 1507|     10|  }
 1508|       |
 1509|      2|  DEBUGF("deflatehd: all input name/value pairs were deflated\n");
  ------------------
  |  |   39|      2|    do {                                                                       \
  |  |   40|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 1510|       |
 1511|      2|  return 0;
 1512|      0|fail:
 1513|      0|  DEBUGF("deflatehd: error return %d\n", rv);
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1514|       |
 1515|      0|  deflater->ctx.bad = 1;
 1516|      0|  return rv;
 1517|      2|}
nghttp2_hd_deflate_bound:
 1597|      2|                                const nghttp2_nv *nva, size_t nvlen) {
 1598|      2|  size_t n = 0;
 1599|      2|  size_t i;
 1600|      2|  (void)deflater;
 1601|       |
 1602|       |  /* Possible Maximum Header Table Size Change.  Encoding (1u << 31) -
 1603|       |     1 using 4 bit prefix requires 6 bytes.  We may emit this at most
 1604|       |     twice. */
 1605|      2|  n += 12;
 1606|       |
 1607|       |  /* Use Literal Header Field without indexing - New Name, since it is
 1608|       |     most space consuming format.  Also we choose the less one between
 1609|       |     non-huffman and huffman, so using literal byte count is
 1610|       |     sufficient for upper bound.
 1611|       |
 1612|       |     Encoding (1u << 31) - 1 using 7 bit prefix requires 6 bytes.  We
 1613|       |     need 2 of this for |nvlen| header fields. */
 1614|      2|  n += 6 * 2 * nvlen;
 1615|       |
 1616|     12|  for (i = 0; i < nvlen; ++i) {
  ------------------
  |  Branch (1616:15): [True: 10, False: 2]
  ------------------
 1617|     10|    n += nva[i].namelen + nva[i].valuelen;
 1618|     10|  }
 1619|       |
 1620|      2|  return n;
 1621|      2|}
nghttp2_hd_inflate_hd_nv:
 1922|      2|                                       size_t inlen, int in_final) {
 1923|      2|  nghttp2_ssize rv = 0;
 1924|      2|  const uint8_t *first = in;
 1925|      2|  const uint8_t *last = in + inlen;
 1926|      2|  int rfin = 0;
 1927|      2|  int busy = 0;
 1928|      2|  nghttp2_mem *mem;
 1929|       |
 1930|      2|  mem = inflater->ctx.mem;
 1931|       |
 1932|      2|  if (inflater->ctx.bad) {
  ------------------
  |  Branch (1932:7): [True: 0, False: 2]
  ------------------
 1933|      0|    return NGHTTP2_ERR_HEADER_COMP;
 1934|      0|  }
 1935|       |
 1936|      2|  DEBUGF("inflatehd: start state=%d\n", inflater->state);
  ------------------
  |  |   39|      2|    do {                                                                       \
  |  |   40|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 1937|      2|  hd_inflate_keep_free(inflater);
 1938|      2|  *inflate_flags = NGHTTP2_HD_INFLATE_NONE;
 1939|      3|  for (; in != last || busy;) {
  ------------------
  |  Branch (1939:10): [True: 2, False: 1]
  |  Branch (1939:24): [True: 0, False: 1]
  ------------------
 1940|      2|    busy = 0;
 1941|      2|    switch (inflater->state) {
  ------------------
  |  Branch (1941:13): [True: 2, False: 0]
  ------------------
 1942|      0|    case NGHTTP2_HD_STATE_EXPECT_TABLE_SIZE:
  ------------------
  |  Branch (1942:5): [True: 0, False: 2]
  ------------------
 1943|      0|      if ((*in & 0xE0U) != 0x20U) {
  ------------------
  |  Branch (1943:11): [True: 0, False: 0]
  ------------------
 1944|      0|        DEBUGF("inflatehd: header table size change was expected, but saw "
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1945|      0|               "0x%02x as first byte",
 1946|      0|               *in);
 1947|      0|        rv = NGHTTP2_ERR_HEADER_COMP;
 1948|      0|        goto fail;
 1949|      0|      }
 1950|       |    /* fall through */
 1951|      1|    case NGHTTP2_HD_STATE_INFLATE_START:
  ------------------
  |  Branch (1951:5): [True: 1, False: 1]
  ------------------
 1952|      1|    case NGHTTP2_HD_STATE_OPCODE:
  ------------------
  |  Branch (1952:5): [True: 0, False: 2]
  ------------------
 1953|      1|      if ((*in & 0xE0U) == 0x20U) {
  ------------------
  |  Branch (1953:11): [True: 0, False: 1]
  ------------------
 1954|      0|        DEBUGF("inflatehd: header table size change\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1955|      0|        if (inflater->state == NGHTTP2_HD_STATE_OPCODE) {
  ------------------
  |  Branch (1955:13): [True: 0, False: 0]
  ------------------
 1956|      0|          DEBUGF("inflatehd: header table size change must appear at the head "
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1957|      0|                 "of header block\n");
 1958|      0|          rv = NGHTTP2_ERR_HEADER_COMP;
 1959|      0|          goto fail;
 1960|      0|        }
 1961|      0|        inflater->opcode = NGHTTP2_HD_OPCODE_INDEXED;
 1962|      0|        inflater->state = NGHTTP2_HD_STATE_READ_TABLE_SIZE;
 1963|      1|      } else if (*in & 0x80U) {
  ------------------
  |  Branch (1963:18): [True: 1, False: 0]
  ------------------
 1964|      1|        DEBUGF("inflatehd: indexed repr\n");
  ------------------
  |  |   39|      1|    do {                                                                       \
  |  |   40|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
 1965|      1|        inflater->opcode = NGHTTP2_HD_OPCODE_INDEXED;
 1966|      1|        inflater->state = NGHTTP2_HD_STATE_READ_INDEX;
 1967|      1|      } else {
 1968|      0|        if (*in == 0x40U || *in == 0 || *in == 0x10U) {
  ------------------
  |  Branch (1968:13): [True: 0, False: 0]
  |  Branch (1968:29): [True: 0, False: 0]
  |  Branch (1968:41): [True: 0, False: 0]
  ------------------
 1969|      0|          DEBUGF("inflatehd: literal header repr - new name\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1970|      0|          inflater->opcode = NGHTTP2_HD_OPCODE_NEWNAME;
 1971|      0|          inflater->state = NGHTTP2_HD_STATE_NEWNAME_CHECK_NAMELEN;
 1972|      0|        } else {
 1973|      0|          DEBUGF("inflatehd: literal header repr - indexed name\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1974|      0|          inflater->opcode = NGHTTP2_HD_OPCODE_INDNAME;
 1975|      0|          inflater->state = NGHTTP2_HD_STATE_READ_INDEX;
 1976|      0|        }
 1977|      0|        inflater->index_required = (*in & 0x40) != 0;
 1978|      0|        inflater->no_index = (*in & 0xF0U) == 0x10U;
 1979|      0|        DEBUGF("inflatehd: indexing required=%d, no_index=%d\n",
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1980|      0|               inflater->index_required, inflater->no_index);
 1981|      0|        if (inflater->opcode == NGHTTP2_HD_OPCODE_NEWNAME) {
  ------------------
  |  Branch (1981:13): [True: 0, False: 0]
  ------------------
 1982|      0|          ++in;
 1983|      0|        }
 1984|      0|      }
 1985|      1|      inflater->left = 0;
 1986|      1|      inflater->shift = 0;
 1987|      1|      break;
 1988|      0|    case NGHTTP2_HD_STATE_READ_TABLE_SIZE:
  ------------------
  |  Branch (1988:5): [True: 0, False: 2]
  ------------------
 1989|      0|      rfin = 0;
 1990|      0|      rv = hd_inflate_read_len(
 1991|      0|        inflater, &rfin, in, last, 5,
 1992|      0|        nghttp2_min_size(inflater->min_hd_table_bufsize_max,
 1993|      0|                         inflater->settings_hd_table_bufsize_max));
 1994|      0|      if (rv < 0) {
  ------------------
  |  Branch (1994:11): [True: 0, False: 0]
  ------------------
 1995|      0|        goto fail;
 1996|      0|      }
 1997|      0|      in += rv;
 1998|      0|      if (!rfin) {
  ------------------
  |  Branch (1998:11): [True: 0, False: 0]
  ------------------
 1999|      0|        goto almost_ok;
 2000|      0|      }
 2001|      0|      DEBUGF("inflatehd: table_size=%zu\n", inflater->left);
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2002|      0|      inflater->min_hd_table_bufsize_max = UINT32_MAX;
 2003|      0|      inflater->ctx.hd_table_bufsize_max = inflater->left;
 2004|      0|      hd_context_shrink_table_size(&inflater->ctx, NULL);
 2005|      0|      inflater->state = NGHTTP2_HD_STATE_INFLATE_START;
 2006|      0|      break;
 2007|      1|    case NGHTTP2_HD_STATE_READ_INDEX: {
  ------------------
  |  Branch (2007:5): [True: 1, False: 1]
  ------------------
 2008|      1|      size_t prefixlen;
 2009|       |
 2010|      1|      if (inflater->opcode == NGHTTP2_HD_OPCODE_INDEXED) {
  ------------------
  |  Branch (2010:11): [True: 1, False: 0]
  ------------------
 2011|      1|        prefixlen = 7;
 2012|      1|      } else if (inflater->index_required) {
  ------------------
  |  Branch (2012:18): [True: 0, False: 0]
  ------------------
 2013|      0|        prefixlen = 6;
 2014|      0|      } else {
 2015|      0|        prefixlen = 4;
 2016|      0|      }
 2017|       |
 2018|      1|      rfin = 0;
 2019|      1|      rv = hd_inflate_read_len(inflater, &rfin, in, last, prefixlen,
 2020|      1|                               get_max_index(&inflater->ctx));
 2021|      1|      if (rv < 0) {
  ------------------
  |  Branch (2021:11): [True: 0, False: 1]
  ------------------
 2022|      0|        goto fail;
 2023|      0|      }
 2024|       |
 2025|      1|      in += rv;
 2026|       |
 2027|      1|      if (!rfin) {
  ------------------
  |  Branch (2027:11): [True: 0, False: 1]
  ------------------
 2028|      0|        goto almost_ok;
 2029|      0|      }
 2030|       |
 2031|      1|      if (inflater->left == 0) {
  ------------------
  |  Branch (2031:11): [True: 0, False: 1]
  ------------------
 2032|      0|        rv = NGHTTP2_ERR_HEADER_COMP;
 2033|      0|        goto fail;
 2034|      0|      }
 2035|       |
 2036|      1|      DEBUGF("inflatehd: index=%zu\n", inflater->left);
  ------------------
  |  |   39|      1|    do {                                                                       \
  |  |   40|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
 2037|      1|      if (inflater->opcode == NGHTTP2_HD_OPCODE_INDEXED) {
  ------------------
  |  Branch (2037:11): [True: 1, False: 0]
  ------------------
 2038|      1|        inflater->index = inflater->left;
 2039|      1|        --inflater->index;
 2040|       |
 2041|      1|        hd_inflate_commit_indexed(inflater, nv_out);
 2042|       |
 2043|      1|        inflater->state = NGHTTP2_HD_STATE_OPCODE;
 2044|      1|        *inflate_flags |= NGHTTP2_HD_INFLATE_EMIT;
 2045|      1|        return (nghttp2_ssize)(in - first);
 2046|      1|      } else {
 2047|      0|        inflater->index = inflater->left;
 2048|      0|        --inflater->index;
 2049|       |
 2050|      0|        inflater->state = NGHTTP2_HD_STATE_CHECK_VALUELEN;
 2051|      0|      }
 2052|      0|      break;
 2053|      1|    }
 2054|      0|    case NGHTTP2_HD_STATE_NEWNAME_CHECK_NAMELEN:
  ------------------
  |  Branch (2054:5): [True: 0, False: 2]
  ------------------
 2055|      0|      hd_inflate_set_huffman_encoded(inflater, in);
 2056|      0|      inflater->state = NGHTTP2_HD_STATE_NEWNAME_READ_NAMELEN;
 2057|      0|      inflater->left = 0;
 2058|      0|      inflater->shift = 0;
 2059|      0|      DEBUGF("inflatehd: huffman encoded=%d\n", inflater->huffman_encoded != 0);
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2060|       |    /* Fall through */
 2061|      0|    case NGHTTP2_HD_STATE_NEWNAME_READ_NAMELEN:
  ------------------
  |  Branch (2061:5): [True: 0, False: 2]
  ------------------
 2062|      0|      rfin = 0;
 2063|      0|      rv = hd_inflate_read_len(inflater, &rfin, in, last, 7, NGHTTP2_HD_MAX_NV);
  ------------------
  |  |   45|      0|#define NGHTTP2_HD_MAX_NV 65536
  ------------------
 2064|      0|      if (rv < 0) {
  ------------------
  |  Branch (2064:11): [True: 0, False: 0]
  ------------------
 2065|      0|        goto fail;
 2066|      0|      }
 2067|      0|      in += rv;
 2068|      0|      if (!rfin) {
  ------------------
  |  Branch (2068:11): [True: 0, False: 0]
  ------------------
 2069|      0|        DEBUGF("inflatehd: integer not fully decoded. current=%zu\n",
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2070|      0|               inflater->left);
 2071|       |
 2072|      0|        goto almost_ok;
 2073|      0|      }
 2074|       |
 2075|      0|      if (inflater->huffman_encoded) {
  ------------------
  |  Branch (2075:11): [True: 0, False: 0]
  ------------------
 2076|      0|        nghttp2_hd_huff_decode_context_init(&inflater->huff_decode_ctx);
 2077|       |
 2078|      0|        inflater->state = NGHTTP2_HD_STATE_NEWNAME_READ_NAMEHUFF;
 2079|       |
 2080|      0|        rv = nghttp2_rcbuf_new(
 2081|      0|          &inflater->namercbuf,
 2082|      0|          nghttp2_huff_estimate_decode_length(inflater->left) + 1, mem);
 2083|      0|      } else {
 2084|      0|        inflater->state = NGHTTP2_HD_STATE_NEWNAME_READ_NAME;
 2085|      0|        rv = nghttp2_rcbuf_new(&inflater->namercbuf, inflater->left + 1, mem);
 2086|      0|      }
 2087|       |
 2088|      0|      if (rv != 0) {
  ------------------
  |  Branch (2088:11): [True: 0, False: 0]
  ------------------
 2089|      0|        goto fail;
 2090|      0|      }
 2091|       |
 2092|      0|      nghttp2_buf_wrap_init(&inflater->namebuf, inflater->namercbuf->base,
 2093|      0|                            inflater->namercbuf->len);
 2094|       |
 2095|      0|      break;
 2096|      0|    case NGHTTP2_HD_STATE_NEWNAME_READ_NAMEHUFF:
  ------------------
  |  Branch (2096:5): [True: 0, False: 2]
  ------------------
 2097|      0|      rv = hd_inflate_read_huff(inflater, &inflater->namebuf, in, last);
 2098|      0|      if (rv < 0) {
  ------------------
  |  Branch (2098:11): [True: 0, False: 0]
  ------------------
 2099|      0|        goto fail;
 2100|      0|      }
 2101|       |
 2102|      0|      in += rv;
 2103|       |
 2104|      0|      DEBUGF("inflatehd: %td bytes read\n", rv);
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2105|       |
 2106|      0|      if (inflater->left) {
  ------------------
  |  Branch (2106:11): [True: 0, False: 0]
  ------------------
 2107|      0|        DEBUGF("inflatehd: still %zu bytes to go\n", inflater->left);
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2108|       |
 2109|      0|        goto almost_ok;
 2110|      0|      }
 2111|       |
 2112|      0|      *inflater->namebuf.last = '\0';
 2113|      0|      inflater->namercbuf->len = nghttp2_buf_len(&inflater->namebuf);
  ------------------
  |  |   54|      0|#define nghttp2_buf_len(BUF) ((size_t)((BUF)->last - (BUF)->pos))
  ------------------
 2114|       |
 2115|      0|      inflater->state = NGHTTP2_HD_STATE_CHECK_VALUELEN;
 2116|       |
 2117|      0|      break;
 2118|      0|    case NGHTTP2_HD_STATE_NEWNAME_READ_NAME:
  ------------------
  |  Branch (2118:5): [True: 0, False: 2]
  ------------------
 2119|      0|      rv = hd_inflate_read(inflater, &inflater->namebuf, in, last);
 2120|      0|      if (rv < 0) {
  ------------------
  |  Branch (2120:11): [True: 0, False: 0]
  ------------------
 2121|      0|        goto fail;
 2122|      0|      }
 2123|       |
 2124|      0|      in += rv;
 2125|       |
 2126|      0|      DEBUGF("inflatehd: %td bytes read\n", rv);
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2127|      0|      if (inflater->left) {
  ------------------
  |  Branch (2127:11): [True: 0, False: 0]
  ------------------
 2128|      0|        DEBUGF("inflatehd: still %zu bytes to go\n", inflater->left);
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2129|       |
 2130|      0|        goto almost_ok;
 2131|      0|      }
 2132|       |
 2133|      0|      *inflater->namebuf.last = '\0';
 2134|      0|      inflater->namercbuf->len = nghttp2_buf_len(&inflater->namebuf);
  ------------------
  |  |   54|      0|#define nghttp2_buf_len(BUF) ((size_t)((BUF)->last - (BUF)->pos))
  ------------------
 2135|       |
 2136|      0|      inflater->state = NGHTTP2_HD_STATE_CHECK_VALUELEN;
 2137|       |
 2138|      0|      break;
 2139|      0|    case NGHTTP2_HD_STATE_CHECK_VALUELEN:
  ------------------
  |  Branch (2139:5): [True: 0, False: 2]
  ------------------
 2140|      0|      hd_inflate_set_huffman_encoded(inflater, in);
 2141|      0|      inflater->state = NGHTTP2_HD_STATE_READ_VALUELEN;
 2142|      0|      inflater->left = 0;
 2143|      0|      inflater->shift = 0;
 2144|      0|      DEBUGF("inflatehd: huffman encoded=%d\n", inflater->huffman_encoded != 0);
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2145|       |    /* Fall through */
 2146|      0|    case NGHTTP2_HD_STATE_READ_VALUELEN:
  ------------------
  |  Branch (2146:5): [True: 0, False: 2]
  ------------------
 2147|      0|      rfin = 0;
 2148|      0|      rv = hd_inflate_read_len(inflater, &rfin, in, last, 7, NGHTTP2_HD_MAX_NV);
  ------------------
  |  |   45|      0|#define NGHTTP2_HD_MAX_NV 65536
  ------------------
 2149|      0|      if (rv < 0) {
  ------------------
  |  Branch (2149:11): [True: 0, False: 0]
  ------------------
 2150|      0|        goto fail;
 2151|      0|      }
 2152|       |
 2153|      0|      in += rv;
 2154|       |
 2155|      0|      if (!rfin) {
  ------------------
  |  Branch (2155:11): [True: 0, False: 0]
  ------------------
 2156|      0|        goto almost_ok;
 2157|      0|      }
 2158|       |
 2159|      0|      DEBUGF("inflatehd: valuelen=%zu\n", inflater->left);
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2160|       |
 2161|      0|      if (inflater->huffman_encoded) {
  ------------------
  |  Branch (2161:11): [True: 0, False: 0]
  ------------------
 2162|      0|        nghttp2_hd_huff_decode_context_init(&inflater->huff_decode_ctx);
 2163|       |
 2164|      0|        inflater->state = NGHTTP2_HD_STATE_READ_VALUEHUFF;
 2165|       |
 2166|      0|        rv = nghttp2_rcbuf_new(
 2167|      0|          &inflater->valuercbuf,
 2168|      0|          nghttp2_huff_estimate_decode_length(inflater->left) + 1, mem);
 2169|      0|      } else {
 2170|      0|        inflater->state = NGHTTP2_HD_STATE_READ_VALUE;
 2171|       |
 2172|      0|        rv = nghttp2_rcbuf_new(&inflater->valuercbuf, inflater->left + 1, mem);
 2173|      0|      }
 2174|       |
 2175|      0|      if (rv != 0) {
  ------------------
  |  Branch (2175:11): [True: 0, False: 0]
  ------------------
 2176|      0|        goto fail;
 2177|      0|      }
 2178|       |
 2179|      0|      nghttp2_buf_wrap_init(&inflater->valuebuf, inflater->valuercbuf->base,
 2180|      0|                            inflater->valuercbuf->len);
 2181|       |
 2182|      0|      busy = 1;
 2183|       |
 2184|      0|      break;
 2185|      0|    case NGHTTP2_HD_STATE_READ_VALUEHUFF:
  ------------------
  |  Branch (2185:5): [True: 0, False: 2]
  ------------------
 2186|      0|      rv = hd_inflate_read_huff(inflater, &inflater->valuebuf, in, last);
 2187|      0|      if (rv < 0) {
  ------------------
  |  Branch (2187:11): [True: 0, False: 0]
  ------------------
 2188|      0|        goto fail;
 2189|      0|      }
 2190|       |
 2191|      0|      in += rv;
 2192|       |
 2193|      0|      DEBUGF("inflatehd: %td bytes read\n", rv);
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2194|       |
 2195|      0|      if (inflater->left) {
  ------------------
  |  Branch (2195:11): [True: 0, False: 0]
  ------------------
 2196|      0|        DEBUGF("inflatehd: still %zu bytes to go\n", inflater->left);
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2197|       |
 2198|      0|        goto almost_ok;
 2199|      0|      }
 2200|       |
 2201|      0|      *inflater->valuebuf.last = '\0';
 2202|      0|      inflater->valuercbuf->len = nghttp2_buf_len(&inflater->valuebuf);
  ------------------
  |  |   54|      0|#define nghttp2_buf_len(BUF) ((size_t)((BUF)->last - (BUF)->pos))
  ------------------
 2203|       |
 2204|      0|      if (inflater->opcode == NGHTTP2_HD_OPCODE_NEWNAME) {
  ------------------
  |  Branch (2204:11): [True: 0, False: 0]
  ------------------
 2205|      0|        rv = hd_inflate_commit_newname(inflater, nv_out);
 2206|      0|      } else {
 2207|      0|        rv = hd_inflate_commit_indname(inflater, nv_out);
 2208|      0|      }
 2209|       |
 2210|      0|      if (rv != 0) {
  ------------------
  |  Branch (2210:11): [True: 0, False: 0]
  ------------------
 2211|      0|        goto fail;
 2212|      0|      }
 2213|       |
 2214|      0|      inflater->state = NGHTTP2_HD_STATE_OPCODE;
 2215|      0|      *inflate_flags |= NGHTTP2_HD_INFLATE_EMIT;
 2216|       |
 2217|      0|      return (nghttp2_ssize)(in - first);
 2218|      0|    case NGHTTP2_HD_STATE_READ_VALUE:
  ------------------
  |  Branch (2218:5): [True: 0, False: 2]
  ------------------
 2219|      0|      rv = hd_inflate_read(inflater, &inflater->valuebuf, in, last);
 2220|      0|      if (rv < 0) {
  ------------------
  |  Branch (2220:11): [True: 0, False: 0]
  ------------------
 2221|      0|        DEBUGF("inflatehd: value read failure %td: %s\n", rv,
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2222|      0|               nghttp2_strerror((int)rv));
 2223|      0|        goto fail;
 2224|      0|      }
 2225|       |
 2226|      0|      in += rv;
 2227|       |
 2228|      0|      DEBUGF("inflatehd: %td bytes read\n", rv);
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2229|       |
 2230|      0|      if (inflater->left) {
  ------------------
  |  Branch (2230:11): [True: 0, False: 0]
  ------------------
 2231|      0|        DEBUGF("inflatehd: still %zu bytes to go\n", inflater->left);
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2232|      0|        goto almost_ok;
 2233|      0|      }
 2234|       |
 2235|      0|      *inflater->valuebuf.last = '\0';
 2236|      0|      inflater->valuercbuf->len = nghttp2_buf_len(&inflater->valuebuf);
  ------------------
  |  |   54|      0|#define nghttp2_buf_len(BUF) ((size_t)((BUF)->last - (BUF)->pos))
  ------------------
 2237|       |
 2238|      0|      if (inflater->opcode == NGHTTP2_HD_OPCODE_NEWNAME) {
  ------------------
  |  Branch (2238:11): [True: 0, False: 0]
  ------------------
 2239|      0|        rv = hd_inflate_commit_newname(inflater, nv_out);
 2240|      0|      } else {
 2241|      0|        rv = hd_inflate_commit_indname(inflater, nv_out);
 2242|      0|      }
 2243|       |
 2244|      0|      if (rv != 0) {
  ------------------
  |  Branch (2244:11): [True: 0, False: 0]
  ------------------
 2245|      0|        goto fail;
 2246|      0|      }
 2247|       |
 2248|      0|      inflater->state = NGHTTP2_HD_STATE_OPCODE;
 2249|      0|      *inflate_flags |= NGHTTP2_HD_INFLATE_EMIT;
 2250|       |
 2251|      0|      return (nghttp2_ssize)(in - first);
 2252|      2|    }
 2253|      2|  }
 2254|       |
 2255|      2|  assert(in == last);
  ------------------
  |  Branch (2255:3): [True: 0, False: 1]
  |  Branch (2255:3): [True: 1, False: 0]
  ------------------
 2256|       |
 2257|      1|  DEBUGF("inflatehd: all input bytes were processed\n");
  ------------------
  |  |   39|      1|    do {                                                                       \
  |  |   40|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
 2258|       |
 2259|      1|  if (in_final) {
  ------------------
  |  Branch (2259:7): [True: 0, False: 1]
  ------------------
 2260|      0|    DEBUGF("inflatehd: in_final set\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2261|       |
 2262|      0|    if (inflater->state != NGHTTP2_HD_STATE_OPCODE &&
  ------------------
  |  Branch (2262:9): [True: 0, False: 0]
  ------------------
 2263|      0|        inflater->state != NGHTTP2_HD_STATE_INFLATE_START) {
  ------------------
  |  Branch (2263:9): [True: 0, False: 0]
  ------------------
 2264|      0|      DEBUGF("inflatehd: unacceptable state=%d\n", inflater->state);
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2265|      0|      rv = NGHTTP2_ERR_HEADER_COMP;
 2266|       |
 2267|      0|      goto fail;
 2268|      0|    }
 2269|      0|    *inflate_flags |= NGHTTP2_HD_INFLATE_FINAL;
 2270|      0|  }
 2271|      1|  return (nghttp2_ssize)(in - first);
 2272|       |
 2273|      0|almost_ok:
 2274|      0|  if (in_final) {
  ------------------
  |  Branch (2274:7): [True: 0, False: 0]
  ------------------
 2275|      0|    DEBUGF("inflatehd: input ended prematurely\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2276|       |
 2277|      0|    rv = NGHTTP2_ERR_HEADER_COMP;
 2278|       |
 2279|      0|    goto fail;
 2280|      0|  }
 2281|      0|  return (nghttp2_ssize)(in - first);
 2282|       |
 2283|      0|fail:
 2284|      0|  DEBUGF("inflatehd: error return %td\n", rv);
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2285|       |
 2286|      0|  inflater->ctx.bad = 1;
 2287|      0|  return rv;
 2288|      0|}
nghttp2_hd.c:hd_context_init:
  703|      4|static int hd_context_init(nghttp2_hd_context *context, nghttp2_mem *mem) {
  704|      4|  int rv;
  705|      4|  context->mem = mem;
  706|      4|  context->bad = 0;
  707|      4|  context->hd_table_bufsize_max = NGHTTP2_HD_DEFAULT_MAX_BUFFER_SIZE;
  ------------------
  |  |   39|      4|#define NGHTTP2_HD_DEFAULT_MAX_BUFFER_SIZE NGHTTP2_DEFAULT_HEADER_TABLE_SIZE
  |  |  ------------------
  |  |  |  |  244|      4|#define NGHTTP2_DEFAULT_HEADER_TABLE_SIZE (1 << 12)
  |  |  ------------------
  ------------------
  708|      4|  rv = hd_ringbuf_init(
  709|      4|    &context->hd_table,
  710|      4|    context->hd_table_bufsize_max / NGHTTP2_HD_ENTRY_OVERHEAD, mem);
  ------------------
  |  |   40|      4|#define NGHTTP2_HD_ENTRY_OVERHEAD 32
  ------------------
  711|      4|  if (rv != 0) {
  ------------------
  |  Branch (711:7): [True: 0, False: 4]
  ------------------
  712|      0|    return rv;
  713|      0|  }
  714|       |
  715|      4|  context->hd_table_bufsize = 0;
  716|      4|  context->next_seq = 0;
  717|       |
  718|      4|  return 0;
  719|      4|}
nghttp2_hd.c:hd_ringbuf_init:
  612|      4|                           nghttp2_mem *mem) {
  613|      4|  size_t size;
  614|      4|  const size_t max_size = SIZE_MAX / sizeof(nghttp2_hd_entry *);
  615|       |
  616|      4|  if (bufsize > max_size) {
  ------------------
  |  Branch (616:7): [True: 0, False: 4]
  ------------------
  617|      0|    return NGHTTP2_ERR_NOMEM;
  618|      0|  }
  619|       |
  620|     32|  for (size = 1; size < bufsize; size <<= 1)
  ------------------
  |  Branch (620:18): [True: 28, False: 4]
  ------------------
  621|     28|    ;
  622|       |
  623|      4|  if (size > max_size) {
  ------------------
  |  Branch (623:7): [True: 0, False: 4]
  ------------------
  624|      0|    return NGHTTP2_ERR_NOMEM;
  625|      0|  }
  626|       |
  627|      4|  ringbuf->buffer = nghttp2_mem_malloc(mem, sizeof(nghttp2_hd_entry *) * size);
  628|      4|  if (ringbuf->buffer == NULL) {
  ------------------
  |  Branch (628:7): [True: 0, False: 4]
  ------------------
  629|      0|    return NGHTTP2_ERR_NOMEM;
  630|      0|  }
  631|      4|  ringbuf->mask = size - 1;
  632|      4|  ringbuf->first = 0;
  633|      4|  ringbuf->len = 0;
  634|      4|  return 0;
  635|      4|}
nghttp2_hd.c:hd_map_init:
  549|      2|static void hd_map_init(nghttp2_hd_map *map) { *map = (nghttp2_hd_map){0}; }
nghttp2_hd.c:hd_context_free:
  721|      4|static void hd_context_free(nghttp2_hd_context *context) {
  722|      4|  hd_ringbuf_free(&context->hd_table, context->mem);
  723|      4|}
nghttp2_hd.c:hd_ringbuf_free:
  668|      4|static void hd_ringbuf_free(nghttp2_hd_ringbuf *ringbuf, nghttp2_mem *mem) {
  669|      4|  size_t i;
  670|      4|  if (ringbuf == NULL) {
  ------------------
  |  Branch (670:7): [True: 0, False: 4]
  ------------------
  671|      0|    return;
  672|      0|  }
  673|      8|  for (i = 0; i < ringbuf->len; ++i) {
  ------------------
  |  Branch (673:15): [True: 4, False: 4]
  ------------------
  674|      4|    nghttp2_hd_entry *ent = hd_ringbuf_get(ringbuf, i);
  675|       |
  676|      4|    nghttp2_hd_entry_free(ent);
  677|      4|    nghttp2_mem_free(mem, ent);
  678|      4|  }
  679|      4|  nghttp2_mem_free(mem, ringbuf->buffer);
  680|      4|}
nghttp2_hd.c:hd_inflate_keep_free:
  790|      4|static void hd_inflate_keep_free(nghttp2_hd_inflater *inflater) {
  791|      4|  nghttp2_rcbuf_decref(inflater->nv_value_keep);
  792|      4|  nghttp2_rcbuf_decref(inflater->nv_name_keep);
  793|       |
  794|      4|  inflater->nv_value_keep = NULL;
  795|       |  inflater->nv_name_keep = NULL;
  796|      4|}
nghttp2_hd.c:entry_room:
  811|     12|static size_t entry_room(size_t namelen, size_t valuelen) {
  812|     12|  return NGHTTP2_HD_ENTRY_OVERHEAD + namelen + valuelen;
  ------------------
  |  |   40|     12|#define NGHTTP2_HD_ENTRY_OVERHEAD 32
  ------------------
  813|     12|}
nghttp2_hd.c:hd_ringbuf_get:
  638|      4|                                        size_t idx) {
  639|      4|  assert(idx < ringbuf->len);
  ------------------
  |  Branch (639:3): [True: 0, False: 4]
  |  Branch (639:3): [True: 4, False: 0]
  ------------------
  640|      4|  return ringbuf->buffer[(ringbuf->first + idx) & ringbuf->mask];
  641|      4|}
nghttp2_hd.c:count_encoded_length:
  823|     15|static size_t count_encoded_length(size_t n, size_t prefix) {
  824|     15|  size_t k = (size_t)((1 << prefix) - 1);
  825|     15|  size_t len = 0;
  826|       |
  827|     15|  if (n < k) {
  ------------------
  |  Branch (827:7): [True: 15, False: 0]
  ------------------
  828|     15|    return 1;
  829|     15|  }
  830|       |
  831|      0|  n -= k;
  832|      0|  ++len;
  833|       |
  834|      0|  for (; n >= 128; n >>= 7, ++len)
  ------------------
  |  Branch (834:10): [True: 0, False: 0]
  ------------------
  835|      0|    ;
  836|       |
  837|      0|  return len + 1;
  838|     15|}
nghttp2_hd.c:encode_length:
  840|     15|static size_t encode_length(uint8_t *buf, size_t n, size_t prefix) {
  841|     15|  size_t k = (size_t)((1 << prefix) - 1);
  842|     15|  uint8_t *begin = buf;
  843|       |
  844|     15|  *buf = (uint8_t)(*buf & ~k);
  845|       |
  846|     15|  if (n < k) {
  ------------------
  |  Branch (846:7): [True: 15, False: 0]
  ------------------
  847|     15|    *buf = (uint8_t)(*buf | n);
  848|     15|    return 1;
  849|     15|  }
  850|       |
  851|      0|  *buf = (uint8_t)(*buf | k);
  852|      0|  ++buf;
  853|       |
  854|      0|  n -= k;
  855|       |
  856|      0|  for (; n >= 128; n >>= 7) {
  ------------------
  |  Branch (856:10): [True: 0, False: 0]
  ------------------
  857|      0|    *buf++ = (uint8_t)((1 << 7) | (n & 0x7F));
  858|      0|  }
  859|       |
  860|      0|  *buf++ = (uint8_t)n;
  861|       |
  862|      0|  return (size_t)(buf - begin);
  863|     15|}
nghttp2_hd.c:deflate_nv:
 1374|     10|                      const nghttp2_nv *nv) {
 1375|     10|  int rv;
 1376|     10|  search_result res;
 1377|     10|  nghttp2_ssize idx;
 1378|     10|  int indexing_mode;
 1379|     10|  int32_t token;
 1380|     10|  nghttp2_mem *mem;
 1381|     10|  uint32_t hash = 0;
 1382|       |
 1383|     10|  DEBUGF("deflatehd: deflating %.*s: %.*s\n", (int)nv->namelen, nv->name,
  ------------------
  |  |   39|     10|    do {                                                                       \
  |  |   40|     10|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 10]
  |  |  ------------------
  ------------------
 1384|     10|         (int)nv->valuelen, nv->value);
 1385|       |
 1386|     10|  mem = deflater->ctx.mem;
 1387|       |
 1388|     10|  token = lookup_token(nv->name, nv->namelen);
 1389|     10|  if (token == -1) {
  ------------------
  |  Branch (1389:7): [True: 0, False: 10]
  ------------------
 1390|      0|    hash = name_hash(nv);
 1391|     10|  } else if (token <= NGHTTP2_TOKEN_WWW_AUTHENTICATE) {
  ------------------
  |  Branch (1391:14): [True: 10, False: 0]
  ------------------
 1392|     10|    hash = static_table[token].hash;
 1393|     10|  }
 1394|       |
 1395|       |  /* Don't index authorization header field since it may contain low
 1396|       |     entropy secret data (e.g., id/password).  Also cookie header
 1397|       |     field with less than 20 bytes value is also never indexed.  This
 1398|       |     is the same criteria used in Firefox codebase. */
 1399|     10|  indexing_mode = token == NGHTTP2_TOKEN_AUTHORIZATION ||
  ------------------
  |  Branch (1399:19): [True: 0, False: 10]
  ------------------
 1400|     10|                      (token == NGHTTP2_TOKEN_COOKIE && nv->valuelen < 20) ||
  ------------------
  |  Branch (1400:24): [True: 0, False: 10]
  |  Branch (1400:57): [True: 0, False: 0]
  ------------------
 1401|     10|                      (nv->flags & NGHTTP2_NV_FLAG_NO_INDEX)
  ------------------
  |  Branch (1401:23): [True: 0, False: 10]
  ------------------
 1402|     10|                    ? NGHTTP2_HD_NEVER_INDEXING
 1403|     10|                    : hd_deflate_decide_indexing(deflater, nv, token);
 1404|       |
 1405|     10|  res = search_hd_table(&deflater->ctx, nv, token, indexing_mode,
 1406|     10|                        &deflater->map, hash);
 1407|       |
 1408|     10|  idx = res.index;
 1409|       |
 1410|     10|  if (res.name_value_match) {
  ------------------
  |  Branch (1410:7): [True: 5, False: 5]
  ------------------
 1411|      5|    DEBUGF("deflatehd: name/value match index=%td\n", idx);
  ------------------
  |  |   39|      5|    do {                                                                       \
  |  |   40|      5|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 5]
  |  |  ------------------
  ------------------
 1412|       |
 1413|      5|    rv = emit_indexed_block(bufs, (size_t)idx);
 1414|      5|    if (rv != 0) {
  ------------------
  |  Branch (1414:9): [True: 0, False: 5]
  ------------------
 1415|      0|      return rv;
 1416|      0|    }
 1417|       |
 1418|      5|    return 0;
 1419|      5|  }
 1420|       |
 1421|      5|  if (res.index != -1) {
  ------------------
  |  Branch (1421:7): [True: 5, False: 0]
  ------------------
 1422|      5|    DEBUGF("deflatehd: name match index=%td\n", res.index);
  ------------------
  |  |   39|      5|    do {                                                                       \
  |  |   40|      5|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 5]
  |  |  ------------------
  ------------------
 1423|      5|  }
 1424|       |
 1425|      5|  if (indexing_mode == NGHTTP2_HD_WITH_INDEXING) {
  ------------------
  |  Branch (1425:7): [True: 4, False: 1]
  ------------------
 1426|      4|    nghttp2_hd_nv hd_nv;
 1427|       |
 1428|      4|    if (idx != -1) {
  ------------------
  |  Branch (1428:9): [True: 4, False: 0]
  ------------------
 1429|      4|      hd_nv.name = nghttp2_hd_table_get(&deflater->ctx, (size_t)idx).name;
 1430|      4|      nghttp2_rcbuf_incref(hd_nv.name);
 1431|      4|    } else {
 1432|      0|      rv = nghttp2_rcbuf_new2(&hd_nv.name, nv->name, nv->namelen, mem);
 1433|      0|      if (rv != 0) {
  ------------------
  |  Branch (1433:11): [True: 0, False: 0]
  ------------------
 1434|      0|        return rv;
 1435|      0|      }
 1436|      0|    }
 1437|       |
 1438|      4|    rv = nghttp2_rcbuf_new2(&hd_nv.value, nv->value, nv->valuelen, mem);
 1439|       |
 1440|      4|    if (rv != 0) {
  ------------------
  |  Branch (1440:9): [True: 0, False: 4]
  ------------------
 1441|      0|      nghttp2_rcbuf_decref(hd_nv.name);
 1442|      0|      return rv;
 1443|      0|    }
 1444|       |
 1445|      4|    hd_nv.token = token;
 1446|      4|    hd_nv.flags = NGHTTP2_NV_FLAG_NONE;
 1447|       |
 1448|      4|    rv = add_hd_table_incremental(&deflater->ctx, &hd_nv, &deflater->map, hash);
 1449|       |
 1450|      4|    nghttp2_rcbuf_decref(hd_nv.value);
 1451|      4|    nghttp2_rcbuf_decref(hd_nv.name);
 1452|       |
 1453|      4|    if (rv != 0) {
  ------------------
  |  Branch (1453:9): [True: 0, False: 4]
  ------------------
 1454|      0|      return NGHTTP2_ERR_HEADER_COMP;
 1455|      0|    }
 1456|      4|  }
 1457|      5|  if (idx == -1) {
  ------------------
  |  Branch (1457:7): [True: 0, False: 5]
  ------------------
 1458|      0|    rv = emit_newname_block(bufs, nv, indexing_mode);
 1459|      5|  } else {
 1460|      5|    rv = emit_indname_block(bufs, (size_t)idx, nv, indexing_mode);
 1461|      5|  }
 1462|      5|  if (rv != 0) {
  ------------------
  |  Branch (1462:7): [True: 0, False: 5]
  ------------------
 1463|      0|    return rv;
 1464|      0|  }
 1465|       |
 1466|      5|  return 0;
 1467|      5|}
nghttp2_hd.c:lookup_token:
  137|     10|static int32_t lookup_token(const uint8_t *name, size_t namelen) {
  138|     10|  switch (namelen) {
  ------------------
  |  Branch (138:11): [True: 10, False: 0]
  ------------------
  139|      0|  case 2:
  ------------------
  |  Branch (139:3): [True: 0, False: 10]
  ------------------
  140|      0|    switch (name[1]) {
  ------------------
  |  Branch (140:13): [True: 0, False: 0]
  ------------------
  141|      0|    case 'e':
  ------------------
  |  Branch (141:5): [True: 0, False: 0]
  ------------------
  142|      0|      if (memeq("t", name, 1)) {
  ------------------
  |  Branch (142:11): [True: 0, False: 0]
  ------------------
  143|      0|        return NGHTTP2_TOKEN_TE;
  144|      0|      }
  145|      0|      break;
  146|      0|    }
  147|      0|    break;
  148|      0|  case 3:
  ------------------
  |  Branch (148:3): [True: 0, False: 10]
  ------------------
  149|      0|    switch (name[2]) {
  ------------------
  |  Branch (149:13): [True: 0, False: 0]
  ------------------
  150|      0|    case 'a':
  ------------------
  |  Branch (150:5): [True: 0, False: 0]
  ------------------
  151|      0|      if (memeq("vi", name, 2)) {
  ------------------
  |  Branch (151:11): [True: 0, False: 0]
  ------------------
  152|      0|        return NGHTTP2_TOKEN_VIA;
  153|      0|      }
  154|      0|      break;
  155|      0|    case 'e':
  ------------------
  |  Branch (155:5): [True: 0, False: 0]
  ------------------
  156|      0|      if (memeq("ag", name, 2)) {
  ------------------
  |  Branch (156:11): [True: 0, False: 0]
  ------------------
  157|      0|        return NGHTTP2_TOKEN_AGE;
  158|      0|      }
  159|      0|      break;
  160|      0|    }
  161|      0|    break;
  162|      0|  case 4:
  ------------------
  |  Branch (162:3): [True: 0, False: 10]
  ------------------
  163|      0|    switch (name[3]) {
  ------------------
  |  Branch (163:13): [True: 0, False: 0]
  ------------------
  164|      0|    case 'e':
  ------------------
  |  Branch (164:5): [True: 0, False: 0]
  ------------------
  165|      0|      if (memeq("dat", name, 3)) {
  ------------------
  |  Branch (165:11): [True: 0, False: 0]
  ------------------
  166|      0|        return NGHTTP2_TOKEN_DATE;
  167|      0|      }
  168|      0|      break;
  169|      0|    case 'g':
  ------------------
  |  Branch (169:5): [True: 0, False: 0]
  ------------------
  170|      0|      if (memeq("eta", name, 3)) {
  ------------------
  |  Branch (170:11): [True: 0, False: 0]
  ------------------
  171|      0|        return NGHTTP2_TOKEN_ETAG;
  172|      0|      }
  173|      0|      break;
  174|      0|    case 'k':
  ------------------
  |  Branch (174:5): [True: 0, False: 0]
  ------------------
  175|      0|      if (memeq("lin", name, 3)) {
  ------------------
  |  Branch (175:11): [True: 0, False: 0]
  ------------------
  176|      0|        return NGHTTP2_TOKEN_LINK;
  177|      0|      }
  178|      0|      break;
  179|      0|    case 'm':
  ------------------
  |  Branch (179:5): [True: 0, False: 0]
  ------------------
  180|      0|      if (memeq("fro", name, 3)) {
  ------------------
  |  Branch (180:11): [True: 0, False: 0]
  ------------------
  181|      0|        return NGHTTP2_TOKEN_FROM;
  182|      0|      }
  183|      0|      break;
  184|      0|    case 't':
  ------------------
  |  Branch (184:5): [True: 0, False: 0]
  ------------------
  185|      0|      if (memeq("hos", name, 3)) {
  ------------------
  |  Branch (185:11): [True: 0, False: 0]
  ------------------
  186|      0|        return NGHTTP2_TOKEN_HOST;
  187|      0|      }
  188|      0|      break;
  189|      0|    case 'y':
  ------------------
  |  Branch (189:5): [True: 0, False: 0]
  ------------------
  190|      0|      if (memeq("var", name, 3)) {
  ------------------
  |  Branch (190:11): [True: 0, False: 0]
  ------------------
  191|      0|        return NGHTTP2_TOKEN_VARY;
  192|      0|      }
  193|      0|      break;
  194|      0|    }
  195|      0|    break;
  196|      2|  case 5:
  ------------------
  |  Branch (196:3): [True: 2, False: 8]
  ------------------
  197|      2|    switch (name[4]) {
  ------------------
  |  Branch (197:13): [True: 2, False: 0]
  ------------------
  198|      0|    case 'e':
  ------------------
  |  Branch (198:5): [True: 0, False: 2]
  ------------------
  199|      0|      if (memeq("rang", name, 4)) {
  ------------------
  |  Branch (199:11): [True: 0, False: 0]
  ------------------
  200|      0|        return NGHTTP2_TOKEN_RANGE;
  201|      0|      }
  202|      0|      break;
  203|      2|    case 'h':
  ------------------
  |  Branch (203:5): [True: 2, False: 0]
  ------------------
  204|      2|      if (memeq(":pat", name, 4)) {
  ------------------
  |  Branch (204:11): [True: 2, False: 0]
  ------------------
  205|      2|        return NGHTTP2_TOKEN__PATH;
  206|      2|      }
  207|      0|      break;
  208|      0|    case 'w':
  ------------------
  |  Branch (208:5): [True: 0, False: 2]
  ------------------
  209|      0|      if (memeq("allo", name, 4)) {
  ------------------
  |  Branch (209:11): [True: 0, False: 0]
  ------------------
  210|      0|        return NGHTTP2_TOKEN_ALLOW;
  211|      0|      }
  212|      0|      break;
  213|      2|    }
  214|      0|    break;
  215|      2|  case 6:
  ------------------
  |  Branch (215:3): [True: 2, False: 8]
  ------------------
  216|      2|    switch (name[5]) {
  ------------------
  |  Branch (216:13): [True: 2, False: 0]
  ------------------
  217|      0|    case 'e':
  ------------------
  |  Branch (217:5): [True: 0, False: 2]
  ------------------
  218|      0|      if (memeq("cooki", name, 5)) {
  ------------------
  |  Branch (218:11): [True: 0, False: 0]
  ------------------
  219|      0|        return NGHTTP2_TOKEN_COOKIE;
  220|      0|      }
  221|      0|      break;
  222|      0|    case 'r':
  ------------------
  |  Branch (222:5): [True: 0, False: 2]
  ------------------
  223|      0|      if (memeq("serve", name, 5)) {
  ------------------
  |  Branch (223:11): [True: 0, False: 0]
  ------------------
  224|      0|        return NGHTTP2_TOKEN_SERVER;
  225|      0|      }
  226|      0|      break;
  227|      2|    case 't':
  ------------------
  |  Branch (227:5): [True: 2, False: 0]
  ------------------
  228|      2|      if (memeq("accep", name, 5)) {
  ------------------
  |  Branch (228:11): [True: 2, False: 0]
  ------------------
  229|      2|        return NGHTTP2_TOKEN_ACCEPT;
  230|      2|      }
  231|      0|      if (memeq("expec", name, 5)) {
  ------------------
  |  Branch (231:11): [True: 0, False: 0]
  ------------------
  232|      0|        return NGHTTP2_TOKEN_EXPECT;
  233|      0|      }
  234|      0|      break;
  235|      2|    }
  236|      0|    break;
  237|      4|  case 7:
  ------------------
  |  Branch (237:3): [True: 4, False: 6]
  ------------------
  238|      4|    switch (name[6]) {
  ------------------
  |  Branch (238:13): [True: 4, False: 0]
  ------------------
  239|      2|    case 'd':
  ------------------
  |  Branch (239:5): [True: 2, False: 2]
  ------------------
  240|      2|      if (memeq(":metho", name, 6)) {
  ------------------
  |  Branch (240:11): [True: 2, False: 0]
  ------------------
  241|      2|        return NGHTTP2_TOKEN__METHOD;
  242|      2|      }
  243|      0|      break;
  244|      2|    case 'e':
  ------------------
  |  Branch (244:5): [True: 2, False: 2]
  ------------------
  245|      2|      if (memeq(":schem", name, 6)) {
  ------------------
  |  Branch (245:11): [True: 2, False: 0]
  ------------------
  246|      2|        return NGHTTP2_TOKEN__SCHEME;
  247|      2|      }
  248|      0|      if (memeq("upgrad", name, 6)) {
  ------------------
  |  Branch (248:11): [True: 0, False: 0]
  ------------------
  249|      0|        return NGHTTP2_TOKEN_UPGRADE;
  250|      0|      }
  251|      0|      break;
  252|      0|    case 'h':
  ------------------
  |  Branch (252:5): [True: 0, False: 4]
  ------------------
  253|      0|      if (memeq("refres", name, 6)) {
  ------------------
  |  Branch (253:11): [True: 0, False: 0]
  ------------------
  254|      0|        return NGHTTP2_TOKEN_REFRESH;
  255|      0|      }
  256|      0|      break;
  257|      0|    case 'r':
  ------------------
  |  Branch (257:5): [True: 0, False: 4]
  ------------------
  258|      0|      if (memeq("refere", name, 6)) {
  ------------------
  |  Branch (258:11): [True: 0, False: 0]
  ------------------
  259|      0|        return NGHTTP2_TOKEN_REFERER;
  260|      0|      }
  261|      0|      break;
  262|      0|    case 's':
  ------------------
  |  Branch (262:5): [True: 0, False: 4]
  ------------------
  263|      0|      if (memeq(":statu", name, 6)) {
  ------------------
  |  Branch (263:11): [True: 0, False: 0]
  ------------------
  264|      0|        return NGHTTP2_TOKEN__STATUS;
  265|      0|      }
  266|      0|      if (memeq("expire", name, 6)) {
  ------------------
  |  Branch (266:11): [True: 0, False: 0]
  ------------------
  267|      0|        return NGHTTP2_TOKEN_EXPIRES;
  268|      0|      }
  269|      0|      break;
  270|      4|    }
  271|      0|    break;
  272|      0|  case 8:
  ------------------
  |  Branch (272:3): [True: 0, False: 10]
  ------------------
  273|      0|    switch (name[7]) {
  ------------------
  |  Branch (273:13): [True: 0, False: 0]
  ------------------
  274|      0|    case 'e':
  ------------------
  |  Branch (274:5): [True: 0, False: 0]
  ------------------
  275|      0|      if (memeq("if-rang", name, 7)) {
  ------------------
  |  Branch (275:11): [True: 0, False: 0]
  ------------------
  276|      0|        return NGHTTP2_TOKEN_IF_RANGE;
  277|      0|      }
  278|      0|      break;
  279|      0|    case 'h':
  ------------------
  |  Branch (279:5): [True: 0, False: 0]
  ------------------
  280|      0|      if (memeq("if-matc", name, 7)) {
  ------------------
  |  Branch (280:11): [True: 0, False: 0]
  ------------------
  281|      0|        return NGHTTP2_TOKEN_IF_MATCH;
  282|      0|      }
  283|      0|      break;
  284|      0|    case 'n':
  ------------------
  |  Branch (284:5): [True: 0, False: 0]
  ------------------
  285|      0|      if (memeq("locatio", name, 7)) {
  ------------------
  |  Branch (285:11): [True: 0, False: 0]
  ------------------
  286|      0|        return NGHTTP2_TOKEN_LOCATION;
  287|      0|      }
  288|      0|      break;
  289|      0|    case 'y':
  ------------------
  |  Branch (289:5): [True: 0, False: 0]
  ------------------
  290|      0|      if (memeq("priorit", name, 7)) {
  ------------------
  |  Branch (290:11): [True: 0, False: 0]
  ------------------
  291|      0|        return NGHTTP2_TOKEN_PRIORITY;
  292|      0|      }
  293|      0|      break;
  294|      0|    }
  295|      0|    break;
  296|      0|  case 9:
  ------------------
  |  Branch (296:3): [True: 0, False: 10]
  ------------------
  297|      0|    switch (name[8]) {
  ------------------
  |  Branch (297:13): [True: 0, False: 0]
  ------------------
  298|      0|    case 'l':
  ------------------
  |  Branch (298:5): [True: 0, False: 0]
  ------------------
  299|      0|      if (memeq(":protoco", name, 8)) {
  ------------------
  |  Branch (299:11): [True: 0, False: 0]
  ------------------
  300|      0|        return NGHTTP2_TOKEN__PROTOCOL;
  301|      0|      }
  302|      0|      break;
  303|      0|    }
  304|      0|    break;
  305|      2|  case 10:
  ------------------
  |  Branch (305:3): [True: 2, False: 8]
  ------------------
  306|      2|    switch (name[9]) {
  ------------------
  |  Branch (306:13): [True: 2, False: 0]
  ------------------
  307|      0|    case 'e':
  ------------------
  |  Branch (307:5): [True: 0, False: 2]
  ------------------
  308|      0|      if (memeq("keep-aliv", name, 9)) {
  ------------------
  |  Branch (308:11): [True: 0, False: 0]
  ------------------
  309|      0|        return NGHTTP2_TOKEN_KEEP_ALIVE;
  310|      0|      }
  311|      0|      if (memeq("set-cooki", name, 9)) {
  ------------------
  |  Branch (311:11): [True: 0, False: 0]
  ------------------
  312|      0|        return NGHTTP2_TOKEN_SET_COOKIE;
  313|      0|      }
  314|      0|      break;
  315|      0|    case 'n':
  ------------------
  |  Branch (315:5): [True: 0, False: 2]
  ------------------
  316|      0|      if (memeq("connectio", name, 9)) {
  ------------------
  |  Branch (316:11): [True: 0, False: 0]
  ------------------
  317|      0|        return NGHTTP2_TOKEN_CONNECTION;
  318|      0|      }
  319|      0|      break;
  320|      0|    case 't':
  ------------------
  |  Branch (320:5): [True: 0, False: 2]
  ------------------
  321|      0|      if (memeq("user-agen", name, 9)) {
  ------------------
  |  Branch (321:11): [True: 0, False: 0]
  ------------------
  322|      0|        return NGHTTP2_TOKEN_USER_AGENT;
  323|      0|      }
  324|      0|      break;
  325|      2|    case 'y':
  ------------------
  |  Branch (325:5): [True: 2, False: 0]
  ------------------
  326|      2|      if (memeq(":authorit", name, 9)) {
  ------------------
  |  Branch (326:11): [True: 2, False: 0]
  ------------------
  327|      2|        return NGHTTP2_TOKEN__AUTHORITY;
  328|      2|      }
  329|      0|      break;
  330|      2|    }
  331|      0|    break;
  332|      0|  case 11:
  ------------------
  |  Branch (332:3): [True: 0, False: 10]
  ------------------
  333|      0|    switch (name[10]) {
  ------------------
  |  Branch (333:13): [True: 0, False: 0]
  ------------------
  334|      0|    case 'r':
  ------------------
  |  Branch (334:5): [True: 0, False: 0]
  ------------------
  335|      0|      if (memeq("retry-afte", name, 10)) {
  ------------------
  |  Branch (335:11): [True: 0, False: 0]
  ------------------
  336|      0|        return NGHTTP2_TOKEN_RETRY_AFTER;
  337|      0|      }
  338|      0|      break;
  339|      0|    }
  340|      0|    break;
  341|      0|  case 12:
  ------------------
  |  Branch (341:3): [True: 0, False: 10]
  ------------------
  342|      0|    switch (name[11]) {
  ------------------
  |  Branch (342:13): [True: 0, False: 0]
  ------------------
  343|      0|    case 'e':
  ------------------
  |  Branch (343:5): [True: 0, False: 0]
  ------------------
  344|      0|      if (memeq("content-typ", name, 11)) {
  ------------------
  |  Branch (344:11): [True: 0, False: 0]
  ------------------
  345|      0|        return NGHTTP2_TOKEN_CONTENT_TYPE;
  346|      0|      }
  347|      0|      break;
  348|      0|    case 's':
  ------------------
  |  Branch (348:5): [True: 0, False: 0]
  ------------------
  349|      0|      if (memeq("max-forward", name, 11)) {
  ------------------
  |  Branch (349:11): [True: 0, False: 0]
  ------------------
  350|      0|        return NGHTTP2_TOKEN_MAX_FORWARDS;
  351|      0|      }
  352|      0|      break;
  353|      0|    }
  354|      0|    break;
  355|      0|  case 13:
  ------------------
  |  Branch (355:3): [True: 0, False: 10]
  ------------------
  356|      0|    switch (name[12]) {
  ------------------
  |  Branch (356:13): [True: 0, False: 0]
  ------------------
  357|      0|    case 'd':
  ------------------
  |  Branch (357:5): [True: 0, False: 0]
  ------------------
  358|      0|      if (memeq("last-modifie", name, 12)) {
  ------------------
  |  Branch (358:11): [True: 0, False: 0]
  ------------------
  359|      0|        return NGHTTP2_TOKEN_LAST_MODIFIED;
  360|      0|      }
  361|      0|      break;
  362|      0|    case 'e':
  ------------------
  |  Branch (362:5): [True: 0, False: 0]
  ------------------
  363|      0|      if (memeq("content-rang", name, 12)) {
  ------------------
  |  Branch (363:11): [True: 0, False: 0]
  ------------------
  364|      0|        return NGHTTP2_TOKEN_CONTENT_RANGE;
  365|      0|      }
  366|      0|      break;
  367|      0|    case 'h':
  ------------------
  |  Branch (367:5): [True: 0, False: 0]
  ------------------
  368|      0|      if (memeq("if-none-matc", name, 12)) {
  ------------------
  |  Branch (368:11): [True: 0, False: 0]
  ------------------
  369|      0|        return NGHTTP2_TOKEN_IF_NONE_MATCH;
  370|      0|      }
  371|      0|      break;
  372|      0|    case 'l':
  ------------------
  |  Branch (372:5): [True: 0, False: 0]
  ------------------
  373|      0|      if (memeq("cache-contro", name, 12)) {
  ------------------
  |  Branch (373:11): [True: 0, False: 0]
  ------------------
  374|      0|        return NGHTTP2_TOKEN_CACHE_CONTROL;
  375|      0|      }
  376|      0|      break;
  377|      0|    case 'n':
  ------------------
  |  Branch (377:5): [True: 0, False: 0]
  ------------------
  378|      0|      if (memeq("authorizatio", name, 12)) {
  ------------------
  |  Branch (378:11): [True: 0, False: 0]
  ------------------
  379|      0|        return NGHTTP2_TOKEN_AUTHORIZATION;
  380|      0|      }
  381|      0|      break;
  382|      0|    case 's':
  ------------------
  |  Branch (382:5): [True: 0, False: 0]
  ------------------
  383|      0|      if (memeq("accept-range", name, 12)) {
  ------------------
  |  Branch (383:11): [True: 0, False: 0]
  ------------------
  384|      0|        return NGHTTP2_TOKEN_ACCEPT_RANGES;
  385|      0|      }
  386|      0|      break;
  387|      0|    }
  388|      0|    break;
  389|      0|  case 14:
  ------------------
  |  Branch (389:3): [True: 0, False: 10]
  ------------------
  390|      0|    switch (name[13]) {
  ------------------
  |  Branch (390:13): [True: 0, False: 0]
  ------------------
  391|      0|    case 'h':
  ------------------
  |  Branch (391:5): [True: 0, False: 0]
  ------------------
  392|      0|      if (memeq("content-lengt", name, 13)) {
  ------------------
  |  Branch (392:11): [True: 0, False: 0]
  ------------------
  393|      0|        return NGHTTP2_TOKEN_CONTENT_LENGTH;
  394|      0|      }
  395|      0|      break;
  396|      0|    case 't':
  ------------------
  |  Branch (396:5): [True: 0, False: 0]
  ------------------
  397|      0|      if (memeq("accept-charse", name, 13)) {
  ------------------
  |  Branch (397:11): [True: 0, False: 0]
  ------------------
  398|      0|        return NGHTTP2_TOKEN_ACCEPT_CHARSET;
  399|      0|      }
  400|      0|      break;
  401|      0|    }
  402|      0|    break;
  403|      0|  case 15:
  ------------------
  |  Branch (403:3): [True: 0, False: 10]
  ------------------
  404|      0|    switch (name[14]) {
  ------------------
  |  Branch (404:13): [True: 0, False: 0]
  ------------------
  405|      0|    case 'e':
  ------------------
  |  Branch (405:5): [True: 0, False: 0]
  ------------------
  406|      0|      if (memeq("accept-languag", name, 14)) {
  ------------------
  |  Branch (406:11): [True: 0, False: 0]
  ------------------
  407|      0|        return NGHTTP2_TOKEN_ACCEPT_LANGUAGE;
  408|      0|      }
  409|      0|      break;
  410|      0|    case 'g':
  ------------------
  |  Branch (410:5): [True: 0, False: 0]
  ------------------
  411|      0|      if (memeq("accept-encodin", name, 14)) {
  ------------------
  |  Branch (411:11): [True: 0, False: 0]
  ------------------
  412|      0|        return NGHTTP2_TOKEN_ACCEPT_ENCODING;
  413|      0|      }
  414|      0|      break;
  415|      0|    }
  416|      0|    break;
  417|      0|  case 16:
  ------------------
  |  Branch (417:3): [True: 0, False: 10]
  ------------------
  418|      0|    switch (name[15]) {
  ------------------
  |  Branch (418:13): [True: 0, False: 0]
  ------------------
  419|      0|    case 'e':
  ------------------
  |  Branch (419:5): [True: 0, False: 0]
  ------------------
  420|      0|      if (memeq("content-languag", name, 15)) {
  ------------------
  |  Branch (420:11): [True: 0, False: 0]
  ------------------
  421|      0|        return NGHTTP2_TOKEN_CONTENT_LANGUAGE;
  422|      0|      }
  423|      0|      if (memeq("www-authenticat", name, 15)) {
  ------------------
  |  Branch (423:11): [True: 0, False: 0]
  ------------------
  424|      0|        return NGHTTP2_TOKEN_WWW_AUTHENTICATE;
  425|      0|      }
  426|      0|      break;
  427|      0|    case 'g':
  ------------------
  |  Branch (427:5): [True: 0, False: 0]
  ------------------
  428|      0|      if (memeq("content-encodin", name, 15)) {
  ------------------
  |  Branch (428:11): [True: 0, False: 0]
  ------------------
  429|      0|        return NGHTTP2_TOKEN_CONTENT_ENCODING;
  430|      0|      }
  431|      0|      break;
  432|      0|    case 'n':
  ------------------
  |  Branch (432:5): [True: 0, False: 0]
  ------------------
  433|      0|      if (memeq("content-locatio", name, 15)) {
  ------------------
  |  Branch (433:11): [True: 0, False: 0]
  ------------------
  434|      0|        return NGHTTP2_TOKEN_CONTENT_LOCATION;
  435|      0|      }
  436|      0|      if (memeq("proxy-connectio", name, 15)) {
  ------------------
  |  Branch (436:11): [True: 0, False: 0]
  ------------------
  437|      0|        return NGHTTP2_TOKEN_PROXY_CONNECTION;
  438|      0|      }
  439|      0|      break;
  440|      0|    }
  441|      0|    break;
  442|      0|  case 17:
  ------------------
  |  Branch (442:3): [True: 0, False: 10]
  ------------------
  443|      0|    switch (name[16]) {
  ------------------
  |  Branch (443:13): [True: 0, False: 0]
  ------------------
  444|      0|    case 'e':
  ------------------
  |  Branch (444:5): [True: 0, False: 0]
  ------------------
  445|      0|      if (memeq("if-modified-sinc", name, 16)) {
  ------------------
  |  Branch (445:11): [True: 0, False: 0]
  ------------------
  446|      0|        return NGHTTP2_TOKEN_IF_MODIFIED_SINCE;
  447|      0|      }
  448|      0|      break;
  449|      0|    case 'g':
  ------------------
  |  Branch (449:5): [True: 0, False: 0]
  ------------------
  450|      0|      if (memeq("transfer-encodin", name, 16)) {
  ------------------
  |  Branch (450:11): [True: 0, False: 0]
  ------------------
  451|      0|        return NGHTTP2_TOKEN_TRANSFER_ENCODING;
  452|      0|      }
  453|      0|      break;
  454|      0|    }
  455|      0|    break;
  456|      0|  case 18:
  ------------------
  |  Branch (456:3): [True: 0, False: 10]
  ------------------
  457|      0|    switch (name[17]) {
  ------------------
  |  Branch (457:13): [True: 0, False: 0]
  ------------------
  458|      0|    case 'e':
  ------------------
  |  Branch (458:5): [True: 0, False: 0]
  ------------------
  459|      0|      if (memeq("proxy-authenticat", name, 17)) {
  ------------------
  |  Branch (459:11): [True: 0, False: 0]
  ------------------
  460|      0|        return NGHTTP2_TOKEN_PROXY_AUTHENTICATE;
  461|      0|      }
  462|      0|      break;
  463|      0|    }
  464|      0|    break;
  465|      0|  case 19:
  ------------------
  |  Branch (465:3): [True: 0, False: 10]
  ------------------
  466|      0|    switch (name[18]) {
  ------------------
  |  Branch (466:13): [True: 0, False: 0]
  ------------------
  467|      0|    case 'e':
  ------------------
  |  Branch (467:5): [True: 0, False: 0]
  ------------------
  468|      0|      if (memeq("if-unmodified-sinc", name, 18)) {
  ------------------
  |  Branch (468:11): [True: 0, False: 0]
  ------------------
  469|      0|        return NGHTTP2_TOKEN_IF_UNMODIFIED_SINCE;
  470|      0|      }
  471|      0|      break;
  472|      0|    case 'n':
  ------------------
  |  Branch (472:5): [True: 0, False: 0]
  ------------------
  473|      0|      if (memeq("content-dispositio", name, 18)) {
  ------------------
  |  Branch (473:11): [True: 0, False: 0]
  ------------------
  474|      0|        return NGHTTP2_TOKEN_CONTENT_DISPOSITION;
  475|      0|      }
  476|      0|      if (memeq("proxy-authorizatio", name, 18)) {
  ------------------
  |  Branch (476:11): [True: 0, False: 0]
  ------------------
  477|      0|        return NGHTTP2_TOKEN_PROXY_AUTHORIZATION;
  478|      0|      }
  479|      0|      break;
  480|      0|    }
  481|      0|    break;
  482|      0|  case 25:
  ------------------
  |  Branch (482:3): [True: 0, False: 10]
  ------------------
  483|      0|    switch (name[24]) {
  ------------------
  |  Branch (483:13): [True: 0, False: 0]
  ------------------
  484|      0|    case 'y':
  ------------------
  |  Branch (484:5): [True: 0, False: 0]
  ------------------
  485|      0|      if (memeq("strict-transport-securit", name, 24)) {
  ------------------
  |  Branch (485:11): [True: 0, False: 0]
  ------------------
  486|      0|        return NGHTTP2_TOKEN_STRICT_TRANSPORT_SECURITY;
  487|      0|      }
  488|      0|      break;
  489|      0|    }
  490|      0|    break;
  491|      0|  case 27:
  ------------------
  |  Branch (491:3): [True: 0, False: 10]
  ------------------
  492|      0|    switch (name[26]) {
  ------------------
  |  Branch (492:13): [True: 0, False: 0]
  ------------------
  493|      0|    case 'n':
  ------------------
  |  Branch (493:5): [True: 0, False: 0]
  ------------------
  494|      0|      if (memeq("access-control-allow-origi", name, 26)) {
  ------------------
  |  Branch (494:11): [True: 0, False: 0]
  ------------------
  495|      0|        return NGHTTP2_TOKEN_ACCESS_CONTROL_ALLOW_ORIGIN;
  496|      0|      }
  497|      0|      break;
  498|      0|    }
  499|      0|    break;
  500|     10|  }
  501|      0|  return -1;
  502|     10|}
nghttp2_hd.c:memeq:
  129|     10|static int memeq(const void *s1, const void *s2, size_t n) {
  130|     10|  return memcmp(s1, s2, n) == 0;
  131|     10|}
nghttp2_hd.c:hd_deflate_decide_indexing:
 1359|     10|                                      const nghttp2_nv *nv, int32_t token) {
 1360|     10|  if (token == NGHTTP2_TOKEN__PATH || token == NGHTTP2_TOKEN_AGE ||
  ------------------
  |  Branch (1360:7): [True: 2, False: 8]
  |  Branch (1360:39): [True: 0, False: 8]
  ------------------
 1361|      8|      token == NGHTTP2_TOKEN_CONTENT_LENGTH || token == NGHTTP2_TOKEN_ETAG ||
  ------------------
  |  Branch (1361:7): [True: 0, False: 8]
  |  Branch (1361:48): [True: 0, False: 8]
  ------------------
 1362|      8|      token == NGHTTP2_TOKEN_IF_MODIFIED_SINCE ||
  ------------------
  |  Branch (1362:7): [True: 0, False: 8]
  ------------------
 1363|      8|      token == NGHTTP2_TOKEN_IF_NONE_MATCH || token == NGHTTP2_TOKEN_LOCATION ||
  ------------------
  |  Branch (1363:7): [True: 0, False: 8]
  |  Branch (1363:47): [True: 0, False: 8]
  ------------------
 1364|      8|      token == NGHTTP2_TOKEN_SET_COOKIE ||
  ------------------
  |  Branch (1364:7): [True: 0, False: 8]
  ------------------
 1365|      8|      entry_room(nv->namelen, nv->valuelen) >
  ------------------
  |  Branch (1365:7): [True: 0, False: 8]
  ------------------
 1366|      8|        deflater->ctx.hd_table_bufsize_max * 3 / 4) {
 1367|      2|    return NGHTTP2_HD_WITHOUT_INDEXING;
 1368|      2|  }
 1369|       |
 1370|      8|  return NGHTTP2_HD_WITH_INDEXING;
 1371|     10|}
nghttp2_hd.c:search_hd_table:
 1228|     10|                                     uint32_t hash) {
 1229|     10|  search_result res = {-1, 0};
 1230|     10|  const nghttp2_hd_entry *ent;
 1231|     10|  int exact_match;
 1232|     10|  int name_only = indexing_mode == NGHTTP2_HD_NEVER_INDEXING;
 1233|       |
 1234|     10|  exact_match = 0;
 1235|     10|  ent = hd_map_find(map, &exact_match, nv, token, hash, name_only);
 1236|       |
 1237|     10|  if (!exact_match && token >= 0 && token <= NGHTTP2_TOKEN_WWW_AUTHENTICATE) {
  ------------------
  |  Branch (1237:7): [True: 10, False: 0]
  |  Branch (1237:23): [True: 10, False: 0]
  |  Branch (1237:37): [True: 10, False: 0]
  ------------------
 1238|     10|    return search_static_table(nv, token, name_only);
 1239|     10|  }
 1240|       |
 1241|      0|  if (ent == NULL) {
  ------------------
  |  Branch (1241:7): [True: 0, False: 0]
  ------------------
 1242|      0|    return res;
 1243|      0|  }
 1244|       |
 1245|      0|  res.index = (nghttp2_ssize)(context->next_seq - 1 - ent->seq +
 1246|      0|                              NGHTTP2_STATIC_TABLE_LENGTH);
  ------------------
  |  |   53|      0|#define NGHTTP2_STATIC_TABLE_LENGTH 61
  ------------------
 1247|      0|  res.name_value_match = exact_match;
 1248|       |
 1249|      0|  return res;
 1250|      0|}
nghttp2_hd.c:hd_map_find:
  568|     10|                                     uint32_t hash, int name_only) {
  569|     10|  nghttp2_hd_entry *p;
  570|     10|  nghttp2_hd_entry *res = NULL;
  571|       |
  572|     10|  *exact_match = 0;
  573|       |
  574|     10|  for (p = map->table[hash & (HD_MAP_SIZE - 1)]; p; p = p->next) {
  ------------------
  |  |  214|     10|#define HD_MAP_SIZE 128
  ------------------
  |  Branch (574:50): [True: 0, False: 10]
  ------------------
  575|      0|    if (token != p->nv.token ||
  ------------------
  |  Branch (575:9): [True: 0, False: 0]
  ------------------
  576|      0|        (token == -1 && (hash != p->hash || !name_eq(&p->nv, nv)))) {
  ------------------
  |  Branch (576:10): [True: 0, False: 0]
  |  Branch (576:26): [True: 0, False: 0]
  |  Branch (576:45): [True: 0, False: 0]
  ------------------
  577|      0|      continue;
  578|      0|    }
  579|      0|    if (!res) {
  ------------------
  |  Branch (579:9): [True: 0, False: 0]
  ------------------
  580|      0|      res = p;
  581|      0|      if (name_only) {
  ------------------
  |  Branch (581:11): [True: 0, False: 0]
  ------------------
  582|      0|        break;
  583|      0|      }
  584|      0|    }
  585|      0|    if (value_eq(&p->nv, nv)) {
  ------------------
  |  Branch (585:9): [True: 0, False: 0]
  ------------------
  586|      0|      res = p;
  587|      0|      *exact_match = 1;
  588|      0|      break;
  589|      0|    }
  590|      0|  }
  591|       |
  592|     10|  return res;
  593|     10|}
nghttp2_hd.c:search_static_table:
 1202|     10|                                         int name_only) {
 1203|     10|  search_result res = {token, 0};
 1204|     10|  int i;
 1205|     10|  const nghttp2_hd_static_entry *ent;
 1206|       |
 1207|     10|  if (name_only) {
  ------------------
  |  Branch (1207:7): [True: 0, False: 10]
  ------------------
 1208|      0|    return res;
 1209|      0|  }
 1210|       |
 1211|     10|  for (i = token;
 1212|     18|       i <= NGHTTP2_TOKEN_WWW_AUTHENTICATE && static_table[i].token == token;
  ------------------
  |  Branch (1212:8): [True: 18, False: 0]
  |  Branch (1212:47): [True: 13, False: 5]
  ------------------
 1213|     13|       ++i) {
 1214|     13|    ent = &static_table[i];
 1215|     13|    if (ent->value.len == nv->valuelen &&
  ------------------
  |  Branch (1215:9): [True: 5, False: 8]
  ------------------
 1216|      5|        memcmp(ent->value.base, nv->value, nv->valuelen) == 0) {
  ------------------
  |  Branch (1216:9): [True: 5, False: 0]
  ------------------
 1217|      5|      res.index = i;
 1218|      5|      res.name_value_match = 1;
 1219|      5|      return res;
 1220|      5|    }
 1221|     13|  }
 1222|      5|  return res;
 1223|     10|}
nghttp2_hd.c:emit_indexed_block:
  975|      5|static int emit_indexed_block(nghttp2_bufs *bufs, size_t idx) {
  976|      5|  int rv;
  977|      5|  size_t blocklen;
  978|      5|  uint8_t sb[16];
  979|      5|  uint8_t *bufp;
  980|       |
  981|      5|  blocklen = count_encoded_length(idx + 1, 7);
  982|       |
  983|      5|  DEBUGF("deflatehd: emit indexed index=%zu, %zu bytes\n", idx, blocklen);
  ------------------
  |  |   39|      5|    do {                                                                       \
  |  |   40|      5|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 5]
  |  |  ------------------
  ------------------
  984|       |
  985|      5|  if (sizeof(sb) < blocklen) {
  ------------------
  |  Branch (985:7): [True: 0, False: 5]
  ------------------
  986|      0|    return NGHTTP2_ERR_HEADER_COMP;
  987|      0|  }
  988|       |
  989|      5|  bufp = sb;
  990|      5|  *bufp = 0x80U;
  991|      5|  encode_length(bufp, idx + 1, 7);
  992|       |
  993|      5|  rv = nghttp2_bufs_add(bufs, sb, blocklen);
  994|      5|  if (rv != 0) {
  ------------------
  |  Branch (994:7): [True: 0, False: 5]
  ------------------
  995|      0|    return rv;
  996|      0|  }
  997|       |
  998|      5|  return 0;
  999|      5|}
nghttp2_hd.c:add_hd_table_incremental:
 1132|      4|                                    uint32_t hash) {
 1133|      4|  int rv;
 1134|      4|  nghttp2_hd_entry *new_ent;
 1135|      4|  size_t room;
 1136|      4|  nghttp2_mem *mem;
 1137|       |
 1138|      4|  mem = context->mem;
 1139|      4|  room = entry_room(nv->name->len, nv->value->len);
 1140|       |
 1141|      4|  while (context->hd_table_bufsize + room > context->hd_table_bufsize_max &&
  ------------------
  |  Branch (1141:10): [True: 0, False: 4]
  ------------------
 1142|      0|         context->hd_table.len > 0) {
  ------------------
  |  Branch (1142:10): [True: 0, False: 0]
  ------------------
 1143|      0|    size_t idx = context->hd_table.len - 1;
 1144|      0|    nghttp2_hd_entry *ent = hd_ringbuf_get(&context->hd_table, idx);
 1145|       |
 1146|      0|    context->hd_table_bufsize -=
 1147|      0|      entry_room(ent->nv.name->len, ent->nv.value->len);
 1148|       |
 1149|      0|    DEBUGF("hpack: remove item from header table: %s: %s\n",
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1150|      0|           (char *)ent->nv.name->base, (char *)ent->nv.value->base);
 1151|       |
 1152|      0|    hd_ringbuf_pop_back(&context->hd_table);
 1153|      0|    if (map) {
  ------------------
  |  Branch (1153:9): [True: 0, False: 0]
  ------------------
 1154|      0|      hd_map_remove(map, ent);
 1155|      0|    }
 1156|       |
 1157|      0|    nghttp2_hd_entry_free(ent);
 1158|      0|    nghttp2_mem_free(mem, ent);
 1159|      0|  }
 1160|       |
 1161|      4|  if (room > context->hd_table_bufsize_max) {
  ------------------
  |  Branch (1161:7): [True: 0, False: 4]
  ------------------
 1162|       |    /* The entry taking more than NGHTTP2_HD_MAX_BUFFER_SIZE is
 1163|       |       immediately evicted.  So we don't allocate memory for it. */
 1164|      0|    return 0;
 1165|      0|  }
 1166|       |
 1167|      4|  new_ent = nghttp2_mem_malloc(mem, sizeof(nghttp2_hd_entry));
 1168|      4|  if (new_ent == NULL) {
  ------------------
  |  Branch (1168:7): [True: 0, False: 4]
  ------------------
 1169|      0|    return NGHTTP2_ERR_NOMEM;
 1170|      0|  }
 1171|       |
 1172|      4|  nghttp2_hd_entry_init(new_ent, nv);
 1173|       |
 1174|      4|  rv = hd_ringbuf_push_front(&context->hd_table, new_ent, mem);
 1175|       |
 1176|      4|  if (rv != 0) {
  ------------------
  |  Branch (1176:7): [True: 0, False: 4]
  ------------------
 1177|      0|    nghttp2_hd_entry_free(new_ent);
 1178|      0|    nghttp2_mem_free(mem, new_ent);
 1179|       |
 1180|      0|    return rv;
 1181|      0|  }
 1182|       |
 1183|      4|  new_ent->seq = context->next_seq++;
 1184|      4|  new_ent->hash = hash;
 1185|       |
 1186|      4|  if (map) {
  ------------------
  |  Branch (1186:7): [True: 4, False: 0]
  ------------------
 1187|      4|    hd_map_insert(map, new_ent);
 1188|      4|  }
 1189|       |
 1190|      4|  context->hd_table_bufsize += room;
 1191|       |
 1192|      4|  return 0;
 1193|      4|}
nghttp2_hd.c:hd_ringbuf_push_front:
  683|      4|                                 nghttp2_hd_entry *ent, nghttp2_mem *mem) {
  684|      4|  int rv;
  685|       |
  686|      4|  rv = hd_ringbuf_reserve(ringbuf, ringbuf->len + 1, mem);
  687|       |
  688|      4|  if (rv != 0) {
  ------------------
  |  Branch (688:7): [True: 0, False: 4]
  ------------------
  689|      0|    return rv;
  690|      0|  }
  691|       |
  692|      4|  ringbuf->buffer[--ringbuf->first & ringbuf->mask] = ent;
  693|      4|  ++ringbuf->len;
  694|       |
  695|      4|  return 0;
  696|      4|}
nghttp2_hd.c:hd_ringbuf_reserve:
  644|      4|                              nghttp2_mem *mem) {
  645|      4|  size_t i;
  646|      4|  size_t size;
  647|      4|  nghttp2_hd_entry **buffer;
  648|       |
  649|      4|  if (ringbuf->mask + 1 >= bufsize) {
  ------------------
  |  Branch (649:7): [True: 4, False: 0]
  ------------------
  650|      4|    return 0;
  651|      4|  }
  652|      0|  for (size = 1; size < bufsize; size <<= 1)
  ------------------
  |  Branch (652:18): [True: 0, False: 0]
  ------------------
  653|      0|    ;
  654|      0|  buffer = nghttp2_mem_malloc(mem, sizeof(nghttp2_hd_entry *) * size);
  655|      0|  if (buffer == NULL) {
  ------------------
  |  Branch (655:7): [True: 0, False: 0]
  ------------------
  656|      0|    return NGHTTP2_ERR_NOMEM;
  657|      0|  }
  658|      0|  for (i = 0; i < ringbuf->len; ++i) {
  ------------------
  |  Branch (658:15): [True: 0, False: 0]
  ------------------
  659|      0|    buffer[i] = hd_ringbuf_get(ringbuf, i);
  660|      0|  }
  661|      0|  nghttp2_mem_free(mem, ringbuf->buffer);
  662|      0|  ringbuf->buffer = buffer;
  663|      0|  ringbuf->mask = size - 1;
  664|      0|  ringbuf->first = 0;
  665|      0|  return 0;
  666|      0|}
nghttp2_hd.c:hd_map_insert:
  551|      4|static void hd_map_insert(nghttp2_hd_map *map, nghttp2_hd_entry *ent) {
  552|      4|  nghttp2_hd_entry **bucket;
  553|       |
  554|      4|  bucket = &map->table[ent->hash & (HD_MAP_SIZE - 1)];
  ------------------
  |  |  214|      4|#define HD_MAP_SIZE 128
  ------------------
  555|       |
  556|      4|  if (*bucket == NULL) {
  ------------------
  |  Branch (556:7): [True: 4, False: 0]
  ------------------
  557|      4|    *bucket = ent;
  558|      4|    return;
  559|      4|  }
  560|       |
  561|       |  /* lower index is linked near the root */
  562|      0|  ent->next = *bucket;
  563|      0|  *bucket = ent;
  564|      0|}
nghttp2_hd.c:hd_inflate_read_len:
 1689|      1|                                         size_t maxlen) {
 1690|      1|  nghttp2_ssize rv;
 1691|      1|  uint32_t out;
 1692|       |
 1693|      1|  *rfin = 0;
 1694|       |
 1695|      1|  rv = decode_length(&out, &inflater->shift, rfin, (uint32_t)inflater->left,
 1696|      1|                     inflater->shift, in, last, prefix);
 1697|       |
 1698|      1|  if (rv == -1) {
  ------------------
  |  Branch (1698:7): [True: 0, False: 1]
  ------------------
 1699|      0|    DEBUGF("inflatehd: integer decoding failed\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1700|      0|    return NGHTTP2_ERR_HEADER_COMP;
 1701|      0|  }
 1702|       |
 1703|      1|  if (out > maxlen) {
  ------------------
  |  Branch (1703:7): [True: 0, False: 1]
  ------------------
 1704|      0|    DEBUGF("inflatehd: integer exceeded the maximum value %zu\n", maxlen);
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1705|      0|    return NGHTTP2_ERR_HEADER_COMP;
 1706|      0|  }
 1707|       |
 1708|      1|  inflater->left = out;
 1709|       |
 1710|      1|  DEBUGF("inflatehd: decoded integer is %u\n", out);
  ------------------
  |  |   39|      1|    do {                                                                       \
  |  |   40|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
 1711|       |
 1712|      1|  return rv;
 1713|      1|}
nghttp2_hd.c:get_max_index:
 1326|      1|static size_t get_max_index(nghttp2_hd_context *context) {
 1327|      1|  return context->hd_table.len + NGHTTP2_STATIC_TABLE_LENGTH;
  ------------------
  |  |   53|      1|#define NGHTTP2_STATIC_TABLE_LENGTH 61
  ------------------
 1328|      1|}
nghttp2_hd.c:hd_inflate_commit_indexed:
 1781|      1|                                      nghttp2_hd_nv *nv_out) {
 1782|      1|  nghttp2_hd_nv nv = nghttp2_hd_table_get(&inflater->ctx, inflater->index);
 1783|       |
 1784|      1|  emit_header(nv_out, &nv);
 1785|      1|}
nghttp2_hd.c:emit_header:
  815|      1|static void emit_header(nghttp2_hd_nv *nv_out, nghttp2_hd_nv *nv) {
  816|      1|  DEBUGF("inflatehd: header emission: %s: %s\n", nv->name->base,
  ------------------
  |  |   39|      1|    do {                                                                       \
  |  |   40|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
  817|      1|         nv->value->base);
  818|       |  /* ent->ref may be 0. This happens if the encoder emits literal
  819|       |     block larger than header table capacity with indexing. */
  820|      1|  *nv_out = *nv;
  821|      1|}
nghttp2_hd.c:emit_indname_block:
 1063|      5|                              const nghttp2_nv *nv, int indexing_mode) {
 1064|      5|  int rv;
 1065|      5|  uint8_t *bufp;
 1066|      5|  size_t blocklen;
 1067|      5|  uint8_t sb[16];
 1068|      5|  size_t prefixlen;
 1069|       |
 1070|      5|  if (indexing_mode == NGHTTP2_HD_WITH_INDEXING) {
  ------------------
  |  Branch (1070:7): [True: 4, False: 1]
  ------------------
 1071|      4|    prefixlen = 6;
 1072|      4|  } else {
 1073|      1|    prefixlen = 4;
 1074|      1|  }
 1075|       |
 1076|      5|  DEBUGF("deflatehd: emit indname index=%zu, valuelen=%zu, indexing_mode=%d\n",
  ------------------
  |  |   39|      5|    do {                                                                       \
  |  |   40|      5|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 5]
  |  |  ------------------
  ------------------
 1077|      5|         idx, nv->valuelen, indexing_mode);
 1078|       |
 1079|      5|  blocklen = count_encoded_length(idx + 1, prefixlen);
 1080|       |
 1081|      5|  if (sizeof(sb) < blocklen) {
  ------------------
  |  Branch (1081:7): [True: 0, False: 5]
  ------------------
 1082|      0|    return NGHTTP2_ERR_HEADER_COMP;
 1083|      0|  }
 1084|       |
 1085|      5|  bufp = sb;
 1086|       |
 1087|      5|  *bufp = pack_first_byte(indexing_mode);
 1088|       |
 1089|      5|  encode_length(bufp, idx + 1, prefixlen);
 1090|       |
 1091|      5|  rv = nghttp2_bufs_add(bufs, sb, blocklen);
 1092|      5|  if (rv != 0) {
  ------------------
  |  Branch (1092:7): [True: 0, False: 5]
  ------------------
 1093|      0|    return rv;
 1094|      0|  }
 1095|       |
 1096|      5|  rv = emit_string(bufs, nv->value, nv->valuelen);
 1097|      5|  if (rv != 0) {
  ------------------
  |  Branch (1097:7): [True: 0, False: 5]
  ------------------
 1098|      0|    return rv;
 1099|      0|  }
 1100|       |
 1101|      5|  return 0;
 1102|      5|}
nghttp2_hd.c:pack_first_byte:
 1046|      5|static uint8_t pack_first_byte(int indexing_mode) {
 1047|      5|  switch (indexing_mode) {
 1048|      4|  case NGHTTP2_HD_WITH_INDEXING:
  ------------------
  |  Branch (1048:3): [True: 4, False: 1]
  ------------------
 1049|      4|    return 0x40U;
 1050|      1|  case NGHTTP2_HD_WITHOUT_INDEXING:
  ------------------
  |  Branch (1050:3): [True: 1, False: 4]
  ------------------
 1051|      1|    return 0;
 1052|      0|  case NGHTTP2_HD_NEVER_INDEXING:
  ------------------
  |  Branch (1052:3): [True: 0, False: 5]
  ------------------
 1053|      0|    return 0x10U;
 1054|      0|  default:
  ------------------
  |  Branch (1054:3): [True: 0, False: 5]
  ------------------
 1055|      0|    assert(0);
  ------------------
  |  Branch (1055:5): [Folded, False: 0]
  |  Branch (1055:5): [Folded, False: 0]
  ------------------
 1056|      5|  }
 1057|       |  /* This is required to compile with android NDK r10d +
 1058|       |     --enable-werror */
 1059|      0|  return 0;
 1060|      5|}
nghttp2_hd.c:emit_string:
 1001|      5|static int emit_string(nghttp2_bufs *bufs, const uint8_t *str, size_t len) {
 1002|      5|  int rv;
 1003|      5|  uint8_t sb[16];
 1004|      5|  uint8_t *bufp;
 1005|      5|  size_t blocklen;
 1006|      5|  size_t enclen;
 1007|      5|  int huffman = 0;
 1008|       |
 1009|      5|  enclen = nghttp2_hd_huff_encode_count(str, len);
 1010|       |
 1011|      5|  if (enclen < len) {
  ------------------
  |  Branch (1011:7): [True: 3, False: 2]
  ------------------
 1012|      3|    huffman = 1;
 1013|      3|  } else {
 1014|      2|    enclen = len;
 1015|      2|  }
 1016|       |
 1017|      5|  blocklen = count_encoded_length(enclen, 7);
 1018|       |
 1019|      5|  DEBUGF("deflatehd: emit string str=%.*s, length=%zu, huffman=%d, "
  ------------------
  |  |   39|      5|    do {                                                                       \
  |  |   40|      5|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 5]
  |  |  ------------------
  ------------------
 1020|      5|         "encoded_length=%zu\n",
 1021|      5|         (int)len, (const char *)str, len, huffman, enclen);
 1022|       |
 1023|      5|  if (sizeof(sb) < blocklen) {
  ------------------
  |  Branch (1023:7): [True: 0, False: 5]
  ------------------
 1024|      0|    return NGHTTP2_ERR_HEADER_COMP;
 1025|      0|  }
 1026|       |
 1027|      5|  bufp = sb;
 1028|      5|  *bufp = huffman ? 1 << 7 : 0;
  ------------------
  |  Branch (1028:11): [True: 3, False: 2]
  ------------------
 1029|      5|  encode_length(bufp, enclen, 7);
 1030|       |
 1031|      5|  rv = nghttp2_bufs_add(bufs, sb, blocklen);
 1032|      5|  if (rv != 0) {
  ------------------
  |  Branch (1032:7): [True: 0, False: 5]
  ------------------
 1033|      0|    return rv;
 1034|      0|  }
 1035|       |
 1036|      5|  if (huffman) {
  ------------------
  |  Branch (1036:7): [True: 3, False: 2]
  ------------------
 1037|      3|    rv = nghttp2_hd_huff_encode(bufs, str, len);
 1038|      3|  } else {
 1039|      2|    assert(enclen == len);
  ------------------
  |  Branch (1039:5): [True: 0, False: 2]
  |  Branch (1039:5): [True: 2, False: 0]
  ------------------
 1040|      2|    rv = nghttp2_bufs_add(bufs, str, len);
 1041|      2|  }
 1042|       |
 1043|      5|  return rv;
 1044|      5|}
nghttp2_hd.c:decode_length:
  885|      1|                                   size_t prefix) {
  886|      1|  uint32_t k = (uint8_t)((1 << prefix) - 1);
  887|      1|  uint32_t n = initial;
  888|      1|  const uint8_t *start = in;
  889|       |
  890|      1|  *shift_ptr = 0;
  891|      1|  *fin = 0;
  892|       |
  893|      1|  if (n == 0) {
  ------------------
  |  Branch (893:7): [True: 1, False: 0]
  ------------------
  894|      1|    if ((*in & k) != k) {
  ------------------
  |  Branch (894:9): [True: 1, False: 0]
  ------------------
  895|      1|      *res = (*in) & k;
  896|      1|      *fin = 1;
  897|      1|      return 1;
  898|      1|    }
  899|       |
  900|      0|    n = k;
  901|       |
  902|      0|    if (++in == last) {
  ------------------
  |  Branch (902:9): [True: 0, False: 0]
  ------------------
  903|      0|      *res = n;
  904|      0|      return (nghttp2_ssize)(in - start);
  905|      0|    }
  906|      0|  }
  907|       |
  908|      0|  for (; in != last; ++in, shift += 7) {
  ------------------
  |  Branch (908:10): [True: 0, False: 0]
  ------------------
  909|      0|    uint32_t add = *in & 0x7F;
  910|       |
  911|      0|    if (shift >= 32) {
  ------------------
  |  Branch (911:9): [True: 0, False: 0]
  ------------------
  912|      0|      DEBUGF("inflate: shift exponent overflow\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  913|      0|      return -1;
  914|      0|    }
  915|       |
  916|      0|    if ((UINT32_MAX >> shift) < add) {
  ------------------
  |  Branch (916:9): [True: 0, False: 0]
  ------------------
  917|      0|      DEBUGF("inflate: integer overflow on shift\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  918|      0|      return -1;
  919|      0|    }
  920|       |
  921|      0|    add <<= shift;
  922|       |
  923|      0|    if (UINT32_MAX - add < n) {
  ------------------
  |  Branch (923:9): [True: 0, False: 0]
  ------------------
  924|      0|      DEBUGF("inflate: integer overflow on addition\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  925|      0|      return -1;
  926|      0|    }
  927|       |
  928|      0|    n += add;
  929|       |
  930|      0|    if ((*in & (1 << 7)) == 0) {
  ------------------
  |  Branch (930:9): [True: 0, False: 0]
  ------------------
  931|      0|      break;
  932|      0|    }
  933|      0|  }
  934|       |
  935|      0|  *shift_ptr = shift;
  936|       |
  937|      0|  if (in == last) {
  ------------------
  |  Branch (937:7): [True: 0, False: 0]
  ------------------
  938|      0|    *res = n;
  939|      0|    return (nghttp2_ssize)(in - start);
  940|      0|  }
  941|       |
  942|      0|  *res = n;
  943|      0|  *fin = 1;
  944|      0|  return (nghttp2_ssize)(in + 1 - start);
  945|      0|}

nghttp2_hd_huff_encode_count:
   34|      5|size_t nghttp2_hd_huff_encode_count(const uint8_t *src, size_t len) {
   35|      5|  size_t i;
   36|      5|  size_t nbits = 0;
   37|       |
   38|     43|  for (i = 0; i < len; ++i) {
  ------------------
  |  Branch (38:15): [True: 38, False: 5]
  ------------------
   39|     38|    nbits += huff_sym_table[src[i]].nbits;
   40|     38|  }
   41|       |  /* pad the prefix of EOS (256) */
   42|      5|  return (nbits + 7) / 8;
   43|      5|}
nghttp2_hd_huff_encode:
   46|      3|                           size_t srclen) {
   47|      3|  const nghttp2_huff_sym *sym;
   48|      3|  const uint8_t *end = src + srclen;
   49|      3|  uint64_t code = 0;
   50|      3|  uint32_t x;
   51|      3|  size_t nbits = 0;
   52|      3|  size_t avail;
   53|      3|  int rv;
   54|       |
   55|      3|  avail = nghttp2_bufs_cur_avail(bufs);
  ------------------
  |  |  405|      3|#define nghttp2_bufs_cur_avail(BUFS) nghttp2_buf_avail(&(BUFS)->cur->buf)
  |  |  ------------------
  |  |  |  |   55|      3|#define nghttp2_buf_avail(BUF) ((size_t)((BUF)->end - (BUF)->last))
  |  |  ------------------
  ------------------
   56|       |
   57|     35|  for (; src != end;) {
  ------------------
  |  Branch (57:10): [True: 32, False: 3]
  ------------------
   58|     32|    sym = &huff_sym_table[*src++];
   59|     32|    code |= (uint64_t)sym->code << (32 - nbits);
   60|     32|    nbits += sym->nbits;
   61|     32|    if (nbits < 32) {
  ------------------
  |  Branch (61:9): [True: 28, False: 4]
  ------------------
   62|     28|      continue;
   63|     28|    }
   64|      4|    if (avail >= 4) {
  ------------------
  |  Branch (64:9): [True: 4, False: 0]
  ------------------
   65|      4|      x = htonl((uint32_t)(code >> 32));
   66|      4|      memcpy(bufs->cur->buf.last, &x, 4);
   67|      4|      bufs->cur->buf.last += 4;
   68|      4|      avail -= 4;
   69|      4|      code <<= 32;
   70|      4|      nbits -= 32;
   71|      4|      continue;
   72|      4|    }
   73|       |
   74|      0|    for (; nbits >= 8;) {
  ------------------
  |  Branch (74:12): [True: 0, False: 0]
  ------------------
   75|      0|      rv = nghttp2_bufs_addb(bufs, (uint8_t)(code >> 56));
   76|      0|      if (rv != 0) {
  ------------------
  |  Branch (76:11): [True: 0, False: 0]
  ------------------
   77|      0|        return rv;
   78|      0|      }
   79|      0|      code <<= 8;
   80|      0|      nbits -= 8;
   81|      0|    }
   82|       |
   83|      0|    avail = nghttp2_bufs_cur_avail(bufs);
  ------------------
  |  |  405|      0|#define nghttp2_bufs_cur_avail(BUFS) nghttp2_buf_avail(&(BUFS)->cur->buf)
  |  |  ------------------
  |  |  |  |   55|      0|#define nghttp2_buf_avail(BUF) ((size_t)((BUF)->end - (BUF)->last))
  |  |  ------------------
  ------------------
   84|      0|  }
   85|       |
   86|      8|  for (; nbits >= 8;) {
  ------------------
  |  Branch (86:10): [True: 5, False: 3]
  ------------------
   87|      5|    rv = nghttp2_bufs_addb(bufs, (uint8_t)(code >> 56));
   88|      5|    if (rv != 0) {
  ------------------
  |  Branch (88:9): [True: 0, False: 5]
  ------------------
   89|      0|      return rv;
   90|      0|    }
   91|      5|    code <<= 8;
   92|      5|    nbits -= 8;
   93|      5|  }
   94|       |
   95|      3|  if (nbits) {
  ------------------
  |  Branch (95:7): [True: 2, False: 1]
  ------------------
   96|      2|    rv = nghttp2_bufs_addb(
   97|      2|      bufs, (uint8_t)((uint8_t)(code >> 56) | ((1 << (8 - nbits)) - 1)));
   98|      2|    if (rv != 0) {
  ------------------
  |  Branch (98:9): [True: 0, False: 2]
  ------------------
   99|      0|      return rv;
  100|      0|    }
  101|      2|  }
  102|       |
  103|      3|  return 0;
  104|      3|}

nghttp2_put_uint16be:
   32|      6|void nghttp2_put_uint16be(uint8_t *buf, uint16_t n) {
   33|       |  uint16_t x = htons(n);
   34|      6|  memcpy(buf, &x, sizeof(uint16_t));
   35|      6|}
nghttp2_put_uint32be:
   37|     40|void nghttp2_put_uint32be(uint8_t *buf, uint32_t n) {
   38|       |  uint32_t x = htonl(n);
   39|     40|  memcpy(buf, &x, sizeof(uint32_t));
   40|     40|}
nghttp2_get_uint32:
   48|      6|uint32_t nghttp2_get_uint32(const uint8_t *data) {
   49|      6|  uint32_t n;
   50|      6|  memcpy(&n, data, sizeof(uint32_t));
   51|       |  return ntohl(n);
   52|      6|}
nghttp2_downcase:
  122|     10|void nghttp2_downcase(uint8_t *s, size_t len) {
  123|     10|  size_t i;
  124|     80|  for (i = 0; i < len; ++i) {
  ------------------
  |  Branch (124:15): [True: 70, False: 10]
  ------------------
  125|     70|    s[i] = nghttp2_downcase_byte(s[i]);
  126|     70|  }
  127|     10|}
nghttp2_adjust_local_window_size:
  158|      2|                                     int32_t *delta_ptr) {
  159|      2|  if (*delta_ptr > 0) {
  ------------------
  |  Branch (159:7): [True: 2, False: 0]
  ------------------
  160|      2|    int32_t recv_reduction_delta;
  161|      2|    int32_t delta;
  162|      2|    int32_t new_recv_window_size =
  163|      2|      nghttp2_max_int32(0, *recv_window_size_ptr) - *delta_ptr;
  164|       |
  165|      2|    if (new_recv_window_size >= 0) {
  ------------------
  |  Branch (165:9): [True: 0, False: 2]
  ------------------
  166|      0|      *recv_window_size_ptr = new_recv_window_size;
  167|      0|      return 0;
  168|      0|    }
  169|       |
  170|      2|    delta = -new_recv_window_size;
  171|       |
  172|       |    /* The delta size is strictly more than received bytes. Increase
  173|       |       local_window_size by that difference |delta|. */
  174|      2|    if (*local_window_size_ptr > NGHTTP2_MAX_WINDOW_SIZE - delta) {
  ------------------
  |  |  224|      2|#define NGHTTP2_MAX_WINDOW_SIZE ((int32_t)((1U << 31) - 1))
  ------------------
  |  Branch (174:9): [True: 0, False: 2]
  ------------------
  175|      0|      return NGHTTP2_ERR_FLOW_CONTROL;
  176|      0|    }
  177|      2|    *local_window_size_ptr += delta;
  178|       |    /* If there is recv_reduction due to earlier window_size
  179|       |       reduction, we have to adjust it too. */
  180|      2|    recv_reduction_delta = nghttp2_min_int32(*recv_reduction_ptr, delta);
  181|      2|    *recv_reduction_ptr -= recv_reduction_delta;
  182|      2|    if (*recv_window_size_ptr < 0) {
  ------------------
  |  Branch (182:9): [True: 0, False: 2]
  ------------------
  183|      0|      *recv_window_size_ptr += recv_reduction_delta;
  184|      2|    } else {
  185|       |      /* If *recv_window_size_ptr > 0, then those bytes are going to
  186|       |         be returned to the remote peer (by WINDOW_UPDATE with the
  187|       |         adjusted *delta_ptr), so it is effectively 0 now.  We set to
  188|       |         *recv_reduction_delta, because caller does not take into
  189|       |         account it in *delta_ptr. */
  190|      2|      *recv_window_size_ptr = recv_reduction_delta;
  191|      2|    }
  192|       |    /* recv_reduction_delta must be paid from *delta_ptr, since it was
  193|       |       added in window size reduction (see below). */
  194|      2|    *delta_ptr -= recv_reduction_delta;
  195|       |
  196|      2|    return 0;
  197|      2|  }
  198|       |
  199|      0|  if (*local_window_size_ptr + *delta_ptr < 0 ||
  ------------------
  |  Branch (199:7): [True: 0, False: 0]
  ------------------
  200|      0|      *recv_window_size_ptr < INT32_MIN - *delta_ptr ||
  ------------------
  |  Branch (200:7): [True: 0, False: 0]
  ------------------
  201|      0|      *recv_reduction_ptr > INT32_MAX + *delta_ptr) {
  ------------------
  |  Branch (201:7): [True: 0, False: 0]
  ------------------
  202|      0|    return NGHTTP2_ERR_FLOW_CONTROL;
  203|      0|  }
  204|       |  /* Decreasing local window size. Note that we achieve this without
  205|       |     noticing to the remote peer. To do this, we cut
  206|       |     recv_window_size by -delta. This means that we don't send
  207|       |     WINDOW_UPDATE for -delta bytes. */
  208|      0|  *local_window_size_ptr += *delta_ptr;
  209|      0|  *recv_window_size_ptr += *delta_ptr;
  210|      0|  *recv_reduction_ptr -= *delta_ptr;
  211|      0|  *delta_ptr = 0;
  212|       |
  213|      0|  return 0;
  214|      0|}
nghttp2_increase_local_window_size:
  219|      4|                                       int32_t *delta_ptr) {
  220|      4|  int32_t recv_reduction_delta;
  221|      4|  int32_t delta;
  222|       |
  223|      4|  delta = *delta_ptr;
  224|       |
  225|      4|  assert(delta >= 0);
  ------------------
  |  Branch (225:3): [True: 0, False: 4]
  |  Branch (225:3): [True: 4, False: 0]
  ------------------
  226|       |
  227|       |  /* The delta size is strictly more than received bytes. Increase
  228|       |     local_window_size by that difference |delta|. */
  229|      4|  if (*local_window_size_ptr > NGHTTP2_MAX_WINDOW_SIZE - delta) {
  ------------------
  |  |  224|      4|#define NGHTTP2_MAX_WINDOW_SIZE ((int32_t)((1U << 31) - 1))
  ------------------
  |  Branch (229:7): [True: 0, False: 4]
  ------------------
  230|      0|    return NGHTTP2_ERR_FLOW_CONTROL;
  231|      0|  }
  232|       |
  233|      4|  *local_window_size_ptr += delta;
  234|       |  /* If there is recv_reduction due to earlier window_size
  235|       |     reduction, we have to adjust it too. */
  236|      4|  recv_reduction_delta = nghttp2_min_int32(*recv_reduction_ptr, delta);
  237|      4|  *recv_reduction_ptr -= recv_reduction_delta;
  238|       |
  239|      4|  *recv_window_size_ptr += recv_reduction_delta;
  240|       |
  241|       |  /* recv_reduction_delta must be paid from *delta_ptr, since it was
  242|       |     added in window size reduction (see below). */
  243|      4|  *delta_ptr -= recv_reduction_delta;
  244|       |
  245|      4|  return 0;
  246|      4|}
nghttp2_should_send_window_update:
  249|      7|                                      int32_t recv_window_size) {
  250|      7|  return recv_window_size > 0 && recv_window_size >= local_window_size / 2;
  ------------------
  |  Branch (250:10): [True: 0, False: 7]
  |  Branch (250:34): [True: 0, False: 0]
  ------------------
  251|      7|}
nghttp2_cpymem:
  560|     29|uint8_t *nghttp2_cpymem(uint8_t *dest, const void *src, size_t len) {
  561|     29|  if (len == 0) {
  ------------------
  |  Branch (561:7): [True: 3, False: 26]
  ------------------
  562|      3|    return dest;
  563|      3|  }
  564|       |
  565|     26|  memcpy(dest, src, len);
  566|       |
  567|     26|  return dest + len;
  568|     29|}

nghttp2_session.c:nghttp2_min_size:
   52|      9|  static inline T nghttp2_min_##SUFFIX(T a, T b) { return a < b ? a : b; }
  ------------------
  |  Branch (52:59): [True: 1, False: 8]
  ------------------
nghttp2_session.c:nghttp2_min_int32:
   52|      7|  static inline T nghttp2_min_##SUFFIX(T a, T b) { return a < b ? a : b; }
  ------------------
  |  Branch (52:59): [True: 0, False: 7]
  ------------------
nghttp2_submit.c:nghttp2_max_int32:
   39|      2|  static inline T nghttp2_max_##SUFFIX(T a, T b) { return a < b ? b : a; }
  ------------------
  |  Branch (39:59): [True: 0, False: 2]
  ------------------
nghttp2_helper.c:nghttp2_downcase_byte:
  109|     70|static inline uint8_t nghttp2_downcase_byte(uint8_t c) {
  110|     70|  return nghttp2_downcase_tbl[c];
  111|     70|}
nghttp2_helper.c:nghttp2_max_int32:
   39|      2|  static inline T nghttp2_max_##SUFFIX(T a, T b) { return a < b ? b : a; }
  ------------------
  |  Branch (39:59): [True: 0, False: 2]
  ------------------
nghttp2_helper.c:nghttp2_min_int32:
   52|      6|  static inline T nghttp2_min_##SUFFIX(T a, T b) { return a < b ? a : b; }
  ------------------
  |  Branch (52:59): [True: 6, False: 0]
  ------------------
nghttp2_buf.c:nghttp2_max_size:
   39|      2|  static inline T nghttp2_max_##SUFFIX(T a, T b) { return a < b ? b : a; }
  ------------------
  |  Branch (39:59): [True: 0, False: 2]
  ------------------
nghttp2_buf.c:nghttp2_min_size:
   52|     19|  static inline T nghttp2_min_##SUFFIX(T a, T b) { return a < b ? a : b; }
  ------------------
  |  Branch (52:59): [True: 0, False: 19]
  ------------------

nghttp2_http_on_header:
  407|      1|                           int trailer) {
  408|       |  /* We are strict for pseudo header field.  One bad character should
  409|       |     lead to fail.  OTOH, we should be a bit forgiving for regular
  410|       |     headers, since existing public internet has so much illegal
  411|       |     headers floating around and if we kill the stream because of
  412|       |     this, we may disrupt many web sites and/or libraries.  So we
  413|       |     become conservative here, and just ignore those illegal regular
  414|       |     headers. */
  415|      1|  if (nv->name->len == 0) {
  ------------------
  |  Branch (415:7): [True: 0, False: 1]
  ------------------
  416|      0|    stream->http_flags |= NGHTTP2_HTTP_FLAG_PSEUDO_HEADER_DISALLOWED;
  ------------------
  |  |  114|      0|#define NGHTTP2_HTTP_FLAG_PSEUDO_HEADER_DISALLOWED 0x40U
  ------------------
  417|      0|    return NGHTTP2_ERR_IGN_HTTP_HEADER;
  418|      0|  }
  419|       |
  420|      1|  if (nv->name->base[0] == ':') {
  ------------------
  |  Branch (420:7): [True: 1, False: 0]
  ------------------
  421|       |    /* pseudo header must have a valid token. */
  422|      1|    if (nv->token == -1 || trailer ||
  ------------------
  |  Branch (422:9): [True: 0, False: 1]
  |  Branch (422:28): [True: 0, False: 1]
  ------------------
  423|      1|        (stream->http_flags & NGHTTP2_HTTP_FLAG_PSEUDO_HEADER_DISALLOWED)) {
  ------------------
  |  |  114|      1|#define NGHTTP2_HTTP_FLAG_PSEUDO_HEADER_DISALLOWED 0x40U
  ------------------
  |  Branch (423:9): [True: 0, False: 1]
  ------------------
  424|      0|      return NGHTTP2_ERR_HTTP_HEADER;
  425|      0|    }
  426|      1|  } else {
  427|      0|    stream->http_flags |= NGHTTP2_HTTP_FLAG_PSEUDO_HEADER_DISALLOWED;
  ------------------
  |  |  114|      0|#define NGHTTP2_HTTP_FLAG_PSEUDO_HEADER_DISALLOWED 0x40U
  ------------------
  428|       |
  429|      0|    switch (nghttp2_check_nonempty_header_name(nv->name->base, nv->name->len)) {
  ------------------
  |  Branch (429:13): [True: 0, False: 0]
  ------------------
  430|      0|    case 0:
  ------------------
  |  Branch (430:5): [True: 0, False: 0]
  ------------------
  431|      0|      return NGHTTP2_ERR_IGN_HTTP_HEADER;
  432|      0|    case 2:
  ------------------
  |  Branch (432:5): [True: 0, False: 0]
  ------------------
  433|       |      /* header field name must be lower-cased without exception */
  434|      0|      return NGHTTP2_ERR_HTTP_HEADER;
  435|      0|    }
  436|      0|  }
  437|       |
  438|      1|  assert(nv->name->len > 0);
  ------------------
  |  Branch (438:3): [True: 0, False: 1]
  |  Branch (438:3): [True: 1, False: 0]
  ------------------
  439|       |
  440|      1|  if (session->server || frame->hd.type == NGHTTP2_PUSH_PROMISE) {
  ------------------
  |  Branch (440:7): [True: 0, False: 1]
  |  Branch (440:26): [True: 0, False: 1]
  ------------------
  441|      0|    return http_request_on_header(stream, nv, trailer,
  442|      0|                                  session->server &&
  ------------------
  |  Branch (442:35): [True: 0, False: 0]
  ------------------
  443|      0|                                    session->pending_enable_connect_protocol);
  ------------------
  |  Branch (443:37): [True: 0, False: 0]
  ------------------
  444|      0|  }
  445|       |
  446|      1|  return http_response_on_header(stream, nv);
  447|      1|}
nghttp2_http_record_request_method:
  550|      2|                                        nghttp2_frame *frame) {
  551|      2|  const nghttp2_nv *nva;
  552|      2|  size_t nvlen;
  553|      2|  size_t i;
  554|       |
  555|      2|  switch (frame->hd.type) {
  556|      2|  case NGHTTP2_HEADERS:
  ------------------
  |  Branch (556:3): [True: 2, False: 0]
  ------------------
  557|      2|    nva = frame->headers.nva;
  558|      2|    nvlen = frame->headers.nvlen;
  559|      2|    break;
  560|      0|  case NGHTTP2_PUSH_PROMISE:
  ------------------
  |  Branch (560:3): [True: 0, False: 2]
  ------------------
  561|      0|    nva = frame->push_promise.nva;
  562|      0|    nvlen = frame->push_promise.nvlen;
  563|      0|    break;
  564|      0|  default:
  ------------------
  |  Branch (564:3): [True: 0, False: 2]
  ------------------
  565|      0|    return;
  566|      2|  }
  567|       |
  568|       |  /* TODO we should do this strictly. */
  569|      2|  for (i = 0; i < nvlen; ++i) {
  ------------------
  |  Branch (569:15): [True: 2, False: 0]
  ------------------
  570|      2|    const nghttp2_nv *nv = &nva[i];
  571|      2|    if (!(nv->namelen == 7 && nv->name[6] == 'd' &&
  ------------------
  |  Branch (571:11): [True: 2, False: 0]
  |  Branch (571:31): [True: 2, False: 0]
  ------------------
  572|      2|          memcmp(":metho", nv->name, nv->namelen - 1) == 0)) {
  ------------------
  |  Branch (572:11): [True: 2, False: 0]
  ------------------
  573|      0|      continue;
  574|      0|    }
  575|      2|    if (lstreq("CONNECT", nv->value, nv->valuelen)) {
  ------------------
  |  |   72|      2|  (nghttp2_strlen_lit((A)) == (N) && memcmp((A), (B), (N)) == 0)
  |  |  ------------------
  |  |  |  |   69|      2|#define nghttp2_strlen_lit(S) (sizeof(S) - 1)
  |  |  ------------------
  |  |  |  Branch (72:4): [True: 0, False: 2]
  |  |  |  Branch (72:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  576|      0|      stream->http_flags |= NGHTTP2_HTTP_FLAG_METH_CONNECT;
  ------------------
  |  |  116|      0|#define NGHTTP2_HTTP_FLAG_METH_CONNECT 0x80U
  ------------------
  577|      0|      return;
  578|      0|    }
  579|      2|    if (lstreq("HEAD", nv->value, nv->valuelen)) {
  ------------------
  |  |   72|      2|  (nghttp2_strlen_lit((A)) == (N) && memcmp((A), (B), (N)) == 0)
  |  |  ------------------
  |  |  |  |   69|      2|#define nghttp2_strlen_lit(S) (sizeof(S) - 1)
  |  |  ------------------
  |  |  |  Branch (72:4): [True: 0, False: 2]
  |  |  |  Branch (72:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  580|      0|      stream->http_flags |= NGHTTP2_HTTP_FLAG_METH_HEAD;
  ------------------
  |  |  117|      0|#define NGHTTP2_HTTP_FLAG_METH_HEAD 0x0100U
  ------------------
  581|      0|      return;
  582|      0|    }
  583|      2|    return;
  584|      2|  }
  585|      2|}
nghttp2_http.c:check_pseudo_header:
   92|      1|                               uint32_t flag) {
   93|      1|  if ((stream->http_flags & flag) || nv->value->len == 0) {
  ------------------
  |  Branch (93:7): [True: 0, False: 1]
  |  Branch (93:38): [True: 0, False: 1]
  ------------------
   94|      0|    return 0;
   95|      0|  }
   96|      1|  stream->http_flags = stream->http_flags | flag;
   97|      1|  return 1;
   98|      1|}
nghttp2_http.c:http_response_on_header:
  336|      1|static int http_response_on_header(nghttp2_stream *stream, nghttp2_hd_nv *nv) {
  337|      1|  switch (nv->token) {
  338|      1|  case NGHTTP2_TOKEN__STATUS: {
  ------------------
  |  Branch (338:3): [True: 1, False: 0]
  ------------------
  339|      1|    if (!check_pseudo_header(stream, nv, NGHTTP2_HTTP_FLAG__STATUS)) {
  ------------------
  |  |  108|      1|#define NGHTTP2_HTTP_FLAG__STATUS 0x20U
  ------------------
  |  Branch (339:9): [True: 0, False: 1]
  ------------------
  340|      0|      return NGHTTP2_ERR_HTTP_HEADER;
  341|      0|    }
  342|      1|    stream->status_code = parse_status_code(nv->value->base, nv->value->len);
  343|      1|    if (stream->status_code == -1 || stream->status_code == 101) {
  ------------------
  |  Branch (343:9): [True: 0, False: 1]
  |  Branch (343:38): [True: 0, False: 1]
  ------------------
  344|      0|      return NGHTTP2_ERR_HTTP_HEADER;
  345|      0|    }
  346|      1|    break;
  347|      1|  }
  348|      1|  case NGHTTP2_TOKEN_CONTENT_LENGTH: {
  ------------------
  |  Branch (348:3): [True: 0, False: 1]
  ------------------
  349|      0|    if (stream->status_code == 204) {
  ------------------
  |  Branch (349:9): [True: 0, False: 0]
  ------------------
  350|       |      /* content-length header field in 204 response is prohibited by
  351|       |         RFC 7230.  But some widely used servers send content-length:
  352|       |         0.  Until they get fixed, we ignore it. */
  353|      0|      if (stream->content_length != -1) {
  ------------------
  |  Branch (353:11): [True: 0, False: 0]
  ------------------
  354|       |        /* Found multiple content-length field */
  355|      0|        return NGHTTP2_ERR_HTTP_HEADER;
  356|      0|      }
  357|      0|      if (!lstrieq("0", nv->value->base, nv->value->len)) {
  ------------------
  |  |   54|      0|  (nghttp2_strlen_lit((A)) == (N) && memieq((A), (B), (N)))
  |  |  ------------------
  |  |  |  |   69|      0|#define nghttp2_strlen_lit(S) (sizeof(S) - 1)
  |  |  ------------------
  |  |  |  Branch (54:4): [True: 0, False: 0]
  |  |  |  Branch (54:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  358|      0|        return NGHTTP2_ERR_HTTP_HEADER;
  359|      0|      }
  360|      0|      stream->content_length = 0;
  361|      0|      return NGHTTP2_ERR_REMOVE_HTTP_HEADER;
  362|      0|    }
  363|      0|    if (stream->status_code / 100 == 1) {
  ------------------
  |  Branch (363:9): [True: 0, False: 0]
  ------------------
  364|      0|      return NGHTTP2_ERR_HTTP_HEADER;
  365|      0|    }
  366|       |    /* https://tools.ietf.org/html/rfc7230#section-3.3.3 */
  367|      0|    if (stream->status_code / 100 == 2 &&
  ------------------
  |  Branch (367:9): [True: 0, False: 0]
  ------------------
  368|      0|        (stream->http_flags & NGHTTP2_HTTP_FLAG_METH_CONNECT)) {
  ------------------
  |  |  116|      0|#define NGHTTP2_HTTP_FLAG_METH_CONNECT 0x80U
  ------------------
  |  Branch (368:9): [True: 0, False: 0]
  ------------------
  369|      0|      return NGHTTP2_ERR_REMOVE_HTTP_HEADER;
  370|      0|    }
  371|      0|    if (stream->content_length != -1) {
  ------------------
  |  Branch (371:9): [True: 0, False: 0]
  ------------------
  372|      0|      return NGHTTP2_ERR_HTTP_HEADER;
  373|      0|    }
  374|      0|    stream->content_length = parse_uint(nv->value->base, nv->value->len);
  375|      0|    if (stream->content_length == -1) {
  ------------------
  |  Branch (375:9): [True: 0, False: 0]
  ------------------
  376|      0|      return NGHTTP2_ERR_HTTP_HEADER;
  377|      0|    }
  378|      0|    break;
  379|      0|  }
  380|       |  /* disallowed header fields */
  381|      0|  case NGHTTP2_TOKEN_CONNECTION:
  ------------------
  |  Branch (381:3): [True: 0, False: 1]
  ------------------
  382|      0|  case NGHTTP2_TOKEN_KEEP_ALIVE:
  ------------------
  |  Branch (382:3): [True: 0, False: 1]
  ------------------
  383|      0|  case NGHTTP2_TOKEN_PROXY_CONNECTION:
  ------------------
  |  Branch (383:3): [True: 0, False: 1]
  ------------------
  384|      0|  case NGHTTP2_TOKEN_TRANSFER_ENCODING:
  ------------------
  |  Branch (384:3): [True: 0, False: 1]
  ------------------
  385|      0|  case NGHTTP2_TOKEN_UPGRADE:
  ------------------
  |  Branch (385:3): [True: 0, False: 1]
  ------------------
  386|      0|    return NGHTTP2_ERR_HTTP_HEADER;
  387|      0|  case NGHTTP2_TOKEN_TE:
  ------------------
  |  Branch (387:3): [True: 0, False: 1]
  ------------------
  388|      0|    if (!lstrieq("trailers", nv->value->base, nv->value->len)) {
  ------------------
  |  |   54|      0|  (nghttp2_strlen_lit((A)) == (N) && memieq((A), (B), (N)))
  |  |  ------------------
  |  |  |  |   69|      0|#define nghttp2_strlen_lit(S) (sizeof(S) - 1)
  |  |  ------------------
  |  |  |  Branch (54:4): [True: 0, False: 0]
  |  |  |  Branch (54:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  389|      0|      return NGHTTP2_ERR_HTTP_HEADER;
  390|      0|    }
  391|      0|    break;
  392|      0|  default:
  ------------------
  |  Branch (392:3): [True: 0, False: 1]
  ------------------
  393|      0|    if (nv->name->base[0] == ':') {
  ------------------
  |  Branch (393:9): [True: 0, False: 0]
  ------------------
  394|      0|      return NGHTTP2_ERR_HTTP_HEADER;
  395|      0|    }
  396|       |
  397|      0|    if (!check_header_value(stream, nv->value)) {
  ------------------
  |  Branch (397:9): [True: 0, False: 0]
  ------------------
  398|      0|      return NGHTTP2_ERR_IGN_HTTP_HEADER;
  399|      0|    }
  400|      1|  }
  401|       |
  402|      1|  return 0;
  403|      1|}
nghttp2_http.c:parse_status_code:
   56|      1|static int32_t parse_status_code(const uint8_t *s, size_t len) {
   57|      1|  if (len != 3 || '1' > s[0] || s[0] > '9' || '0' > s[1] || s[1] > '9' ||
  ------------------
  |  Branch (57:7): [True: 0, False: 1]
  |  Branch (57:19): [True: 0, False: 1]
  |  Branch (57:33): [True: 0, False: 1]
  |  Branch (57:47): [True: 0, False: 1]
  |  Branch (57:61): [True: 0, False: 1]
  ------------------
   58|      1|      '0' > s[2] || s[2] > '9') {
  ------------------
  |  Branch (58:7): [True: 0, False: 1]
  |  Branch (58:21): [True: 0, False: 1]
  ------------------
   59|      0|    return -1;
   60|      0|  }
   61|       |
   62|      1|  return (s[0] - '0') * 100 + (s[1] - '0') * 10 + (s[2] - '0');
   63|      1|}

nghttp2_map_init:
   36|      2|void nghttp2_map_init(nghttp2_map *map, uint64_t seed, nghttp2_mem *mem) {
   37|      2|  *map = (nghttp2_map){
   38|      2|    .mem = mem,
   39|      2|    .seed = seed,
   40|      2|  };
   41|      2|}
nghttp2_map_free:
   43|      2|void nghttp2_map_free(nghttp2_map *map) {
   44|      2|  if (!map) {
  ------------------
  |  Branch (44:7): [True: 0, False: 2]
  ------------------
   45|      0|    return;
   46|      0|  }
   47|       |
   48|      2|  nghttp2_mem_free(map->mem, map->keys);
   49|      2|}
nghttp2_map_each:
   52|      3|                     void *ptr) {
   53|      3|  int rv;
   54|      3|  size_t i;
   55|      3|  size_t tablelen;
   56|       |
   57|      3|  if (map->size == 0) {
  ------------------
  |  Branch (57:7): [True: 2, False: 1]
  ------------------
   58|      2|    return 0;
   59|      2|  }
   60|       |
   61|      1|  tablelen = (size_t)1 << map->hashbits;
   62|       |
   63|     17|  for (i = 0; i < tablelen; ++i) {
  ------------------
  |  Branch (63:15): [True: 16, False: 1]
  ------------------
   64|     16|    if (map->psl[i] == 0) {
  ------------------
  |  Branch (64:9): [True: 15, False: 1]
  ------------------
   65|     15|      continue;
   66|     15|    }
   67|       |
   68|      1|    rv = func(map->data[i], ptr);
   69|      1|    if (rv != 0) {
  ------------------
  |  Branch (69:9): [True: 0, False: 1]
  ------------------
   70|      0|      return rv;
   71|      0|    }
   72|      1|  }
   73|       |
   74|      1|  return 0;
   75|      1|}
nghttp2_map_insert:
  239|      2|int nghttp2_map_insert(nghttp2_map *map, nghttp2_map_key_type key, void *data) {
  240|      2|  int rv;
  241|      2|  size_t tablelen;
  242|      2|  nghttp2_ssize idx;
  243|       |
  244|      2|  assert(data);
  ------------------
  |  Branch (244:3): [True: 0, False: 2]
  |  Branch (244:3): [True: 2, False: 0]
  ------------------
  245|       |
  246|       |  /* tablelen is incorrect if map->hashbits == 0 which leads to
  247|       |     tablelen = 1, but it is only used to check the load factor, and
  248|       |     it works in this special case. */
  249|      2|  tablelen = (size_t)1 << map->hashbits;
  250|       |
  251|       |  /* Load factor is 7 / 8.  Because tablelen is power of 2, (tablelen
  252|       |     - (tablelen >> 3)) computes tablelen * 7 / 8. */
  253|      2|  if (map->size + 1 >= (tablelen - (tablelen >> 3))) {
  ------------------
  |  Branch (253:7): [True: 2, False: 0]
  ------------------
  254|      2|    rv = map_resize(map, map->hashbits ? map->hashbits + 1
  ------------------
  |  Branch (254:26): [True: 0, False: 2]
  ------------------
  255|      2|                                       : NGHTTP2_INITIAL_HASHBITS);
  ------------------
  |  |   34|      2|#define NGHTTP2_INITIAL_HASHBITS 4
  ------------------
  256|      2|    if (rv != 0) {
  ------------------
  |  Branch (256:9): [True: 0, False: 2]
  ------------------
  257|      0|      return rv;
  258|      0|    }
  259|       |
  260|      2|    idx = map_insert(map, key, data);
  261|      2|    if (idx < 0) {
  ------------------
  |  Branch (261:9): [True: 0, False: 2]
  ------------------
  262|      0|      return (int)idx;
  263|      0|    }
  264|       |
  265|      2|    return 0;
  266|      2|  }
  267|       |
  268|      0|  idx = map_insert(map, key, data);
  269|      0|  if (idx < 0) {
  ------------------
  |  Branch (269:7): [True: 0, False: 0]
  ------------------
  270|      0|    return (int)idx;
  271|      0|  }
  272|       |
  273|       |  /* Resize if psl reaches really large value which is almost
  274|       |     improbable, but just in case. */
  275|      0|  if (map->psl[idx] - 1 < NGHTTP2_MAX_PSL_RESIZE_THRESH) {
  ------------------
  |  |  237|      0|#define NGHTTP2_MAX_PSL_RESIZE_THRESH 128
  ------------------
  |  Branch (275:7): [True: 0, False: 0]
  ------------------
  276|      0|    return 0;
  277|      0|  }
  278|       |
  279|      0|  return map_resize(map, map->hashbits + 1);
  280|      0|}
nghttp2_map_find:
  282|     47|void *nghttp2_map_find(const nghttp2_map *map, nghttp2_map_key_type key) {
  283|     47|  size_t idx;
  284|     47|  size_t psl = 1;
  285|     47|  size_t mask;
  286|       |
  287|     47|  if (map->size == 0) {
  ------------------
  |  Branch (287:7): [True: 10, False: 37]
  ------------------
  288|     10|    return NULL;
  289|     10|  }
  290|       |
  291|     37|  idx = map_index(map, key);
  292|     37|  mask = ((size_t)1 << map->hashbits) - 1;
  293|       |
  294|     37|  for (;;) {
  295|     37|    if (psl > map->psl[idx]) {
  ------------------
  |  Branch (295:9): [True: 1, False: 36]
  ------------------
  296|      1|      return NULL;
  297|      1|    }
  298|       |
  299|     36|    if (map->keys[idx] == key) {
  ------------------
  |  Branch (299:9): [True: 36, False: 0]
  ------------------
  300|     36|      return map->data[idx];
  301|     36|    }
  302|       |
  303|      0|    ++psl;
  304|      0|    idx = (idx + 1) & mask;
  305|      0|  }
  306|     37|}
nghttp2_map_remove:
  308|      2|int nghttp2_map_remove(nghttp2_map *map, nghttp2_map_key_type key) {
  309|      2|  size_t idx;
  310|      2|  size_t dest;
  311|      2|  size_t psl = 1, kpsl;
  312|      2|  size_t mask;
  313|       |
  314|      2|  if (map->size == 0) {
  ------------------
  |  Branch (314:7): [True: 0, False: 2]
  ------------------
  315|      0|    return NGHTTP2_ERR_INVALID_ARGUMENT;
  316|      0|  }
  317|       |
  318|      2|  idx = map_index(map, key);
  319|      2|  mask = ((size_t)1 << map->hashbits) - 1;
  320|       |
  321|      2|  for (;;) {
  322|      2|    if (psl > map->psl[idx]) {
  ------------------
  |  Branch (322:9): [True: 0, False: 2]
  ------------------
  323|      0|      return NGHTTP2_ERR_INVALID_ARGUMENT;
  324|      0|    }
  325|       |
  326|      2|    if (map->keys[idx] == key) {
  ------------------
  |  Branch (326:9): [True: 2, False: 0]
  ------------------
  327|      2|      dest = idx;
  328|      2|      idx = (idx + 1) & mask;
  329|       |
  330|      2|      for (;;) {
  331|      2|        kpsl = map->psl[idx];
  332|      2|        if (kpsl <= 1) {
  ------------------
  |  Branch (332:13): [True: 2, False: 0]
  ------------------
  333|      2|          map->psl[dest] = 0;
  334|      2|          break;
  335|      2|        }
  336|       |
  337|      0|        map_set_entry(map, dest, map->keys[idx], map->data[idx], kpsl - 1);
  338|       |
  339|      0|        dest = idx;
  340|       |
  341|      0|        idx = (idx + 1) & mask;
  342|      0|      }
  343|       |
  344|      2|      --map->size;
  345|       |
  346|      2|      return 0;
  347|      2|    }
  348|       |
  349|      0|    ++psl;
  350|      0|    idx = (idx + 1) & mask;
  351|      0|  }
  352|      2|}
nghttp2_map_size:
  363|     22|size_t nghttp2_map_size(const nghttp2_map *map) { return map->size; }
nghttp2_map.c:map_index:
   85|     41|static size_t map_index(const nghttp2_map *map, nghttp2_map_key_type key32) {
   86|     41|  uint64_t key = (uint64_t)key32;
   87|       |
   88|     41|  key += map->seed;
   89|     41|  key *= NGHTTP2_MAP_HASHER;
  ------------------
  |  |   80|     41|#define NGHTTP2_MAP_HASHER 0xF1357AEA2E62A9C5ULL
  ------------------
   90|     41|  return (size_t)((key * NGHTTP2_MAP_FIBO) >> (64 - map->hashbits));
  ------------------
  |  |   83|     41|#define NGHTTP2_MAP_FIBO 0x9E3779B97F4A7C15ULL
  ------------------
   91|     41|}
nghttp2_map.c:map_resize:
  180|      2|static int map_resize(nghttp2_map *map, size_t new_hashbits) {
  181|      2|  size_t i;
  182|      2|  size_t tablelen;
  183|      2|  nghttp2_ssize idx;
  184|      2|  nghttp2_map new_map = {
  185|      2|    .mem = map->mem,
  186|      2|    .seed = map->seed,
  187|      2|    .hashbits = new_hashbits,
  188|      2|  };
  189|      2|  void *buf;
  190|      2|  (void)idx;
  191|       |
  192|      2|  if (new_hashbits > NGHTTP2_MAP_MAX_HASHBITS) {
  ------------------
  |  |  178|      2|#define NGHTTP2_MAP_MAX_HASHBITS (sizeof(size_t) * 8 - 1)
  ------------------
  |  Branch (192:7): [True: 0, False: 2]
  ------------------
  193|      0|    return NGHTTP2_ERR_NOMEM;
  194|      0|  }
  195|       |
  196|      2|  tablelen = (size_t)1 << new_hashbits;
  197|       |
  198|      2|  buf = nghttp2_mem_calloc(map->mem, tablelen,
  199|      2|                           sizeof(nghttp2_map_key_type) + sizeof(void *) +
  200|      2|                             sizeof(uint8_t));
  201|      2|  if (buf == NULL) {
  ------------------
  |  Branch (201:7): [True: 0, False: 2]
  ------------------
  202|      0|    return NGHTTP2_ERR_NOMEM;
  203|      0|  }
  204|       |
  205|      2|  new_map.keys = buf;
  206|      2|  new_map.data =
  207|      2|    (void *)((uint8_t *)new_map.keys + tablelen * sizeof(nghttp2_map_key_type));
  208|      2|  new_map.psl = (uint8_t *)new_map.data + tablelen * sizeof(void *);
  209|       |
  210|      2|  if (map->size) {
  ------------------
  |  Branch (210:7): [True: 0, False: 2]
  ------------------
  211|      0|    tablelen = (size_t)1 << map->hashbits;
  212|       |
  213|      0|    for (i = 0; i < tablelen; ++i) {
  ------------------
  |  Branch (213:17): [True: 0, False: 0]
  ------------------
  214|      0|      if (map->psl[i] == 0) {
  ------------------
  |  Branch (214:11): [True: 0, False: 0]
  ------------------
  215|      0|        continue;
  216|      0|      }
  217|       |
  218|      0|      idx = map_insert(&new_map, map->keys[i], map->data[i]);
  219|       |
  220|       |      /* map_insert must not fail because all keys are unique during
  221|       |         resize. */
  222|      0|      assert(idx >= 0);
  ------------------
  |  Branch (222:7): [True: 0, False: 0]
  |  Branch (222:7): [True: 0, False: 0]
  ------------------
  223|      0|    }
  224|      0|  }
  225|       |
  226|      2|  nghttp2_mem_free(map->mem, map->keys);
  227|      2|  map->keys = new_map.keys;
  228|      2|  map->data = new_map.data;
  229|      2|  map->psl = new_map.psl;
  230|      2|  map->hashbits = new_hashbits;
  231|       |
  232|      2|  return 0;
  233|      2|}
nghttp2_map.c:map_insert:
  142|      2|                                void *data) {
  143|      2|  size_t idx = map_index(map, key);
  144|      2|  size_t mask = ((size_t)1 << map->hashbits) - 1;
  145|      2|  size_t psl = 1;
  146|      2|  size_t kpsl;
  147|       |
  148|      2|  for (;;) {
  149|      2|    kpsl = map->psl[idx];
  150|       |
  151|      2|    if (kpsl == 0) {
  ------------------
  |  Branch (151:9): [True: 2, False: 0]
  ------------------
  152|      2|      map_set_entry(map, idx, key, data, psl);
  153|      2|      ++map->size;
  154|       |
  155|      2|      return (nghttp2_ssize)idx;
  156|      2|    }
  157|       |
  158|      0|    if (psl > kpsl) {
  ------------------
  |  Branch (158:9): [True: 0, False: 0]
  ------------------
  159|      0|      NGHTTP2_SWAP(nghttp2_map_key_type, &key, &map->keys[idx]);
  ------------------
  |  |  126|      0|  do {                                                                         \
  |  |  127|      0|    TYPE t = (TYPE) * (A);                                                     \
  |  |  128|      0|                                                                               \
  |  |  129|      0|    *(A) = *(B);                                                               \
  |  |  130|      0|    *(B) = t;                                                                  \
  |  |  131|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (131:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  160|      0|      NGHTTP2_SWAP(void *, &data, &map->data[idx]);
  ------------------
  |  |  126|      0|  do {                                                                         \
  |  |  127|      0|    TYPE t = (TYPE) * (A);                                                     \
  |  |  128|      0|                                                                               \
  |  |  129|      0|    *(A) = *(B);                                                               \
  |  |  130|      0|    *(B) = t;                                                                  \
  |  |  131|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (131:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  161|      0|      NGHTTP2_SWAP(uint8_t, &psl, &map->psl[idx]);
  ------------------
  |  |  126|      0|  do {                                                                         \
  |  |  127|      0|    TYPE t = (TYPE) * (A);                                                     \
  |  |  128|      0|                                                                               \
  |  |  129|      0|    *(A) = *(B);                                                               \
  |  |  130|      0|    *(B) = t;                                                                  \
  |  |  131|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (131:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  162|      0|    } else if (map->keys[idx] == key) {
  ------------------
  |  Branch (162:16): [True: 0, False: 0]
  ------------------
  163|       |      /* This check ensures that no duplicate keys are inserted.  But
  164|       |         it is just a waste after first swap or if this function is
  165|       |         called from map_resize.  That said, there is no difference
  166|       |         with or without this conditional in performance wise. */
  167|      0|      return NGHTTP2_ERR_INVALID_ARGUMENT;
  168|      0|    }
  169|       |
  170|      0|    ++psl;
  171|      0|    idx = (idx + 1) & mask;
  172|      0|  }
  173|      2|}
nghttp2_map.c:map_set_entry:
  119|      2|                          nghttp2_map_key_type key, void *data, size_t psl) {
  120|      2|  map->keys[idx] = key;
  121|      2|  map->data[idx] = data;
  122|      2|  map->psl[idx] = (uint8_t)psl;
  123|      2|}

nghttp2_mem_malloc:
   60|     37|void *nghttp2_mem_malloc(nghttp2_mem *mem, size_t size) {
   61|     37|  return mem->malloc(size, mem->mem_user_data);
   62|     37|}
nghttp2_mem_free:
   64|     75|void nghttp2_mem_free(nghttp2_mem *mem, void *ptr) {
   65|     75|  mem->free(ptr, mem->mem_user_data);
   66|     75|}
nghttp2_mem_free2:
   68|      4|void nghttp2_mem_free2(nghttp2_free free_func, void *ptr, void *mem_user_data) {
   69|      4|  free_func(ptr, mem_user_data);
   70|      4|}
nghttp2_mem_calloc:
   72|      4|void *nghttp2_mem_calloc(nghttp2_mem *mem, size_t nmemb, size_t size) {
   73|      4|  return mem->calloc(nmemb, size, mem->mem_user_data);
   74|      4|}
nghttp2_mem_realloc:
   76|      2|void *nghttp2_mem_realloc(nghttp2_mem *mem, void *ptr, size_t size) {
   77|      2|  return mem->realloc(ptr, size, mem->mem_user_data);
   78|      2|}

nghttp2_option_new:
   29|      2|int nghttp2_option_new(nghttp2_option **option_ptr) {
   30|      2|  *option_ptr = calloc(1, sizeof(nghttp2_option));
   31|       |
   32|      2|  if (*option_ptr == NULL) {
  ------------------
  |  Branch (32:7): [True: 0, False: 2]
  ------------------
   33|      0|    return NGHTTP2_ERR_NOMEM;
   34|      0|  }
   35|       |
   36|      2|  return 0;
   37|      2|}
nghttp2_option_del:
   39|      2|void nghttp2_option_del(nghttp2_option *option) { free(option); }
nghttp2_option_set_no_auto_window_update:
   41|      2|void nghttp2_option_set_no_auto_window_update(nghttp2_option *option, int val) {
   42|      2|  option->opt_set_mask |= NGHTTP2_OPT_NO_AUTO_WINDOW_UPDATE;
  ------------------
  |  |   45|      2|#define NGHTTP2_OPT_NO_AUTO_WINDOW_UPDATE 0x01U
  ------------------
   43|      2|  option->no_auto_window_update = val;
   44|      2|}
nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation:
  141|      2|  nghttp2_option *option, int val) {
  142|      2|  option->opt_set_mask |=
  143|      2|    NGHTTP2_OPT_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION;
  ------------------
  |  |   72|      2|#define NGHTTP2_OPT_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION 0x4000U
  ------------------
  144|      2|  option->no_rfc9113_leading_and_trailing_ws_validation = val;
  145|      2|}

nghttp2_data_provider_wrap_v1:
   32|      2|                              const nghttp2_data_provider *data_prd) {
   33|      2|  if (!data_prd) {
  ------------------
  |  Branch (33:7): [True: 2, False: 0]
  ------------------
   34|      2|    return NULL;
   35|      2|  }
   36|       |
   37|      0|  *dpw = (nghttp2_data_provider_wrap){
   38|      0|    .version = NGHTTP2_DATA_PROVIDER_V1,
  ------------------
  |  |   36|      0|#define NGHTTP2_DATA_PROVIDER_V1 1
  ------------------
   39|      0|    .data_prd.v1 = *data_prd,
   40|      0|  };
   41|       |
   42|      0|  return dpw;
   43|      2|}
nghttp2_data_provider_wrap_contains_read_callback:
   61|      2|  const nghttp2_data_provider_wrap *dpw) {
   62|      2|  switch (dpw->version) {
   63|      0|  case NGHTTP2_DATA_PROVIDER_V1:
  ------------------
  |  |   36|      0|#define NGHTTP2_DATA_PROVIDER_V1 1
  ------------------
  |  Branch (63:3): [True: 0, False: 2]
  ------------------
   64|      0|    return dpw->data_prd.v1.read_callback != NULL;
   65|      0|  case NGHTTP2_DATA_PROVIDER_V2:
  ------------------
  |  |   37|      0|#define NGHTTP2_DATA_PROVIDER_V2 2
  ------------------
  |  Branch (65:3): [True: 0, False: 2]
  ------------------
   66|      0|    return dpw->data_prd.v2.read_callback != NULL;
   67|      2|  default:
  ------------------
  |  Branch (67:3): [True: 2, False: 0]
  ------------------
   68|      2|    return 0;
   69|      2|  }
   70|      2|}
nghttp2_outbound_item_init:
   72|     13|void nghttp2_outbound_item_init(nghttp2_outbound_item *item) {
   73|     13|  item->cycle = 0;
   74|     13|  item->qnext = NULL;
   75|     13|  item->queued = 0;
   76|       |
   77|     13|  memset(&item->aux_data, 0, sizeof(nghttp2_aux_data));
   78|     13|}
nghttp2_outbound_item_free:
   80|     19|void nghttp2_outbound_item_free(nghttp2_outbound_item *item, nghttp2_mem *mem) {
   81|     19|  nghttp2_frame *frame;
   82|       |
   83|     19|  if (item == NULL) {
  ------------------
  |  Branch (83:7): [True: 6, False: 13]
  ------------------
   84|      6|    return;
   85|      6|  }
   86|       |
   87|     13|  frame = &item->frame;
   88|       |
   89|     13|  switch (frame->hd.type) {
   90|      0|  case NGHTTP2_DATA:
  ------------------
  |  Branch (90:3): [True: 0, False: 13]
  ------------------
   91|      0|    nghttp2_frame_data_free(&frame->data);
   92|      0|    break;
   93|      2|  case NGHTTP2_HEADERS:
  ------------------
  |  Branch (93:3): [True: 2, False: 11]
  ------------------
   94|      2|    nghttp2_frame_headers_free(&frame->headers, mem);
   95|      2|    break;
   96|      0|  case NGHTTP2_PRIORITY:
  ------------------
  |  Branch (96:3): [True: 0, False: 13]
  ------------------
   97|      0|    nghttp2_frame_priority_free(&frame->priority);
   98|      0|    break;
   99|      2|  case NGHTTP2_RST_STREAM:
  ------------------
  |  Branch (99:3): [True: 2, False: 11]
  ------------------
  100|      2|    nghttp2_frame_rst_stream_free(&frame->rst_stream);
  101|      2|    break;
  102|      3|  case NGHTTP2_SETTINGS:
  ------------------
  |  Branch (102:3): [True: 3, False: 10]
  ------------------
  103|      3|    nghttp2_frame_settings_free(&frame->settings, mem);
  104|      3|    break;
  105|      0|  case NGHTTP2_PUSH_PROMISE:
  ------------------
  |  Branch (105:3): [True: 0, False: 13]
  ------------------
  106|      0|    nghttp2_frame_push_promise_free(&frame->push_promise, mem);
  107|      0|    break;
  108|      0|  case NGHTTP2_PING:
  ------------------
  |  Branch (108:3): [True: 0, False: 13]
  ------------------
  109|      0|    nghttp2_frame_ping_free(&frame->ping);
  110|      0|    break;
  111|      0|  case NGHTTP2_GOAWAY:
  ------------------
  |  Branch (111:3): [True: 0, False: 13]
  ------------------
  112|      0|    nghttp2_frame_goaway_free(&frame->goaway, mem);
  113|      0|    break;
  114|      6|  case NGHTTP2_WINDOW_UPDATE:
  ------------------
  |  Branch (114:3): [True: 6, False: 7]
  ------------------
  115|      6|    nghttp2_frame_window_update_free(&frame->window_update);
  116|      6|    break;
  117|      0|  default: {
  ------------------
  |  Branch (117:3): [True: 0, False: 13]
  ------------------
  118|      0|    nghttp2_ext_aux_data *aux_data;
  119|       |
  120|      0|    aux_data = &item->aux_data.ext;
  121|       |
  122|      0|    if (aux_data->builtin == 0) {
  ------------------
  |  Branch (122:9): [True: 0, False: 0]
  ------------------
  123|      0|      nghttp2_frame_extension_free(&frame->ext);
  124|      0|      break;
  125|      0|    }
  126|       |
  127|      0|    switch (frame->hd.type) {
  128|      0|    case NGHTTP2_ALTSVC:
  ------------------
  |  Branch (128:5): [True: 0, False: 0]
  ------------------
  129|      0|      nghttp2_frame_altsvc_free(&frame->ext, mem);
  130|      0|      break;
  131|      0|    case NGHTTP2_ORIGIN:
  ------------------
  |  Branch (131:5): [True: 0, False: 0]
  ------------------
  132|      0|      nghttp2_frame_origin_free(&frame->ext, mem);
  133|      0|      break;
  134|      0|    case NGHTTP2_PRIORITY_UPDATE:
  ------------------
  |  Branch (134:5): [True: 0, False: 0]
  ------------------
  135|      0|      nghttp2_frame_priority_update_free(&frame->ext, mem);
  136|      0|      break;
  137|      0|    default:
  ------------------
  |  Branch (137:5): [True: 0, False: 0]
  ------------------
  138|      0|      assert(0);
  ------------------
  |  Branch (138:7): [Folded, False: 0]
  |  Branch (138:7): [Folded, False: 0]
  ------------------
  139|      0|      break;
  140|      0|    }
  141|      0|  }
  142|     13|  }
  143|     13|}
nghttp2_outbound_queue_push:
  150|     13|                                 nghttp2_outbound_item *item) {
  151|     13|  if (q->tail) {
  ------------------
  |  Branch (151:7): [True: 2, False: 11]
  ------------------
  152|      2|    q->tail = q->tail->qnext = item;
  153|     11|  } else {
  154|     11|    q->head = q->tail = item;
  155|     11|  }
  156|     13|  ++q->n;
  157|     13|}
nghttp2_outbound_queue_pop:
  159|     13|void nghttp2_outbound_queue_pop(nghttp2_outbound_queue *q) {
  160|     13|  nghttp2_outbound_item *item;
  161|     13|  if (!q->head) {
  ------------------
  |  Branch (161:7): [True: 0, False: 13]
  ------------------
  162|      0|    return;
  163|      0|  }
  164|     13|  item = q->head;
  165|     13|  q->head = q->head->qnext;
  166|     13|  item->qnext = NULL;
  167|     13|  if (!q->head) {
  ------------------
  |  Branch (167:7): [True: 11, False: 2]
  ------------------
  168|       |    q->tail = NULL;
  169|     11|  }
  170|     13|  --q->n;
  171|     13|}

nghttp2_pq_init:
   32|     16|void nghttp2_pq_init(nghttp2_pq *pq, nghttp2_less less, nghttp2_mem *mem) {
   33|     16|  *pq = (nghttp2_pq){
   34|     16|    .mem = mem,
   35|     16|    .less = less,
   36|     16|  };
   37|     16|}
nghttp2_pq_free:
   39|     16|void nghttp2_pq_free(nghttp2_pq *pq) {
   40|     16|  nghttp2_mem_free(pq->mem, pq->q);
   41|       |  pq->q = NULL;
   42|     16|}
nghttp2_pq_top:
   88|     72|nghttp2_pq_entry *nghttp2_pq_top(nghttp2_pq *pq) {
   89|     72|  if (pq->length == 0) {
  ------------------
  |  Branch (89:7): [True: 72, False: 0]
  ------------------
   90|     72|    return NULL;
   91|     72|  } else {
   92|      0|    return pq->q[0];
   93|      0|  }
   94|     72|}
nghttp2_pq_empty:
  150|     80|int nghttp2_pq_empty(nghttp2_pq *pq) { return pq->length == 0; }

nghttp2_priority_spec_init:
   29|      2|                                int exclusive) {
   30|      2|  *pri_spec = (nghttp2_priority_spec){
   31|      2|    .stream_id = stream_id,
   32|      2|    .weight = weight,
   33|      2|    .exclusive = exclusive != 0,
   34|      2|  };
   35|      2|}
nghttp2_priority_spec_default_init:
   37|      3|void nghttp2_priority_spec_default_init(nghttp2_priority_spec *pri_spec) {
   38|      3|  *pri_spec = (nghttp2_priority_spec){
   39|      3|    .weight = NGHTTP2_DEFAULT_WEIGHT,
  ------------------
  |  |  191|      3|#define NGHTTP2_DEFAULT_WEIGHT 16
  ------------------
   40|      3|  };
   41|      3|}

nghttp2_ratelim_init:
   28|      4|void nghttp2_ratelim_init(nghttp2_ratelim *rl, uint64_t burst, uint64_t rate) {
   29|      4|  *rl = (nghttp2_ratelim){
   30|      4|    .burst = burst,
   31|      4|    .rate = rate,
   32|      4|    .val = burst,
   33|      4|  };
   34|      4|}

nghttp2_rcbuf_new:
   34|      4|                      nghttp2_mem *mem) {
   35|      4|  uint8_t *p;
   36|       |
   37|      4|  p = nghttp2_mem_malloc(mem, sizeof(nghttp2_rcbuf) + size);
   38|      4|  if (p == NULL) {
  ------------------
  |  Branch (38:7): [True: 0, False: 4]
  ------------------
   39|      0|    return NGHTTP2_ERR_NOMEM;
   40|      0|  }
   41|       |
   42|      4|  *rcbuf_ptr = (void *)p;
   43|       |
   44|      4|  **rcbuf_ptr = (nghttp2_rcbuf){
   45|      4|    .mem_user_data = mem->mem_user_data,
   46|      4|    .free = mem->free,
   47|      4|    .base = p + sizeof(nghttp2_rcbuf),
   48|      4|    .len = size,
   49|      4|    .ref = 1,
   50|      4|  };
   51|       |
   52|      4|  return 0;
   53|      4|}
nghttp2_rcbuf_new2:
   56|      4|                       size_t srclen, nghttp2_mem *mem) {
   57|      4|  int rv;
   58|       |
   59|      4|  rv = nghttp2_rcbuf_new(rcbuf_ptr, srclen + 1, mem);
   60|      4|  if (rv != 0) {
  ------------------
  |  Branch (60:7): [True: 0, False: 4]
  ------------------
   61|      0|    return rv;
   62|      0|  }
   63|       |
   64|      4|  (*rcbuf_ptr)->len = srclen;
   65|      4|  *nghttp2_cpymem((*rcbuf_ptr)->base, src, srclen) = '\0';
   66|       |
   67|      4|  return 0;
   68|      4|}
nghttp2_rcbuf_del:
   73|      4|void nghttp2_rcbuf_del(nghttp2_rcbuf *rcbuf) {
   74|      4|  nghttp2_mem_free2(rcbuf->free, rcbuf, rcbuf->mem_user_data);
   75|      4|}
nghttp2_rcbuf_incref:
   77|     12|void nghttp2_rcbuf_incref(nghttp2_rcbuf *rcbuf) {
   78|     12|  if (rcbuf->ref == -1) {
  ------------------
  |  Branch (78:7): [True: 8, False: 4]
  ------------------
   79|      8|    return;
   80|      8|  }
   81|       |
   82|      4|  ++rcbuf->ref;
   83|      4|}
nghttp2_rcbuf_decref:
   85|     28|void nghttp2_rcbuf_decref(nghttp2_rcbuf *rcbuf) {
   86|     28|  if (rcbuf == NULL || rcbuf->ref == -1) {
  ------------------
  |  Branch (86:7): [True: 12, False: 16]
  |  Branch (86:24): [True: 8, False: 8]
  ------------------
   87|     20|    return;
   88|     20|  }
   89|       |
   90|     28|  assert(rcbuf->ref > 0);
  ------------------
  |  Branch (90:3): [True: 0, False: 8]
  |  Branch (90:3): [True: 8, False: 0]
  ------------------
   91|       |
   92|      8|  if (--rcbuf->ref == 0) {
  ------------------
  |  Branch (92:7): [True: 4, False: 4]
  ------------------
   93|      4|    nghttp2_rcbuf_del(rcbuf);
   94|      4|  }
   95|      8|}

nghttp2_is_fatal:
   86|     57|int nghttp2_is_fatal(int lib_error_code) {
   87|     57|  return lib_error_code < NGHTTP2_ERR_FATAL;
   88|     57|}
nghttp2_session_is_my_stream_id:
  272|     10|                                    int32_t stream_id) {
  273|     10|  int rem;
  274|     10|  if (stream_id == 0) {
  ------------------
  |  Branch (274:7): [True: 0, False: 10]
  ------------------
  275|      0|    return 0;
  276|      0|  }
  277|     10|  rem = stream_id & 0x1;
  278|     10|  if (session->server) {
  ------------------
  |  Branch (278:7): [True: 0, False: 10]
  ------------------
  279|      0|    return rem == 0;
  280|      0|  }
  281|     10|  return rem == 1;
  282|     10|}
nghttp2_session_get_stream:
  285|     45|                                           int32_t stream_id) {
  286|     45|  nghttp2_stream *stream;
  287|       |
  288|     45|  stream = (nghttp2_stream *)nghttp2_map_find(&session->streams, stream_id);
  289|       |
  290|     45|  if (stream == NULL || (stream->flags & NGHTTP2_STREAM_FLAG_CLOSED) ||
  ------------------
  |  |   82|     36|#define NGHTTP2_STREAM_FLAG_CLOSED 0x02U
  ------------------
  |  Branch (290:7): [True: 9, False: 36]
  |  Branch (290:25): [True: 0, False: 36]
  ------------------
  291|     36|      stream->state == NGHTTP2_STREAM_IDLE) {
  ------------------
  |  Branch (291:7): [True: 0, False: 36]
  ------------------
  292|      9|    return NULL;
  293|      9|  }
  294|       |
  295|     36|  return stream;
  296|     45|}
nghttp2_session_get_stream_raw:
  299|      2|                                               int32_t stream_id) {
  300|      2|  return (nghttp2_stream *)nghttp2_map_find(&session->streams, stream_id);
  301|      2|}
nghttp2_session_client_new3:
  675|      2|                                nghttp2_mem *mem) {
  676|      2|  int rv;
  677|      2|  nghttp2_session *session;
  678|       |
  679|      2|  rv = session_new(&session, callbacks, user_data, 0, option, mem);
  680|       |
  681|      2|  if (rv != 0) {
  ------------------
  |  Branch (681:7): [True: 0, False: 2]
  ------------------
  682|      0|    return rv;
  683|      0|  }
  684|       |  /* IDs for use in client */
  685|      2|  session->next_stream_id = 1;
  686|       |
  687|      2|  *session_ptr = session;
  688|       |
  689|      2|  return 0;
  690|      2|}
nghttp2_session_del:
  792|      2|void nghttp2_session_del(nghttp2_session *session) {
  793|      2|  nghttp2_mem *mem;
  794|      2|  nghttp2_inflight_settings *settings;
  795|      2|  size_t i;
  796|       |
  797|      2|  if (session == NULL) {
  ------------------
  |  Branch (797:7): [True: 0, False: 2]
  ------------------
  798|      0|    return;
  799|      0|  }
  800|       |
  801|      2|  mem = &session->mem;
  802|       |
  803|      3|  for (settings = session->inflight_settings_head; settings;) {
  ------------------
  |  Branch (803:52): [True: 1, False: 2]
  ------------------
  804|      1|    nghttp2_inflight_settings *next = settings->next;
  805|      1|    inflight_settings_del(settings, mem);
  806|      1|    settings = next;
  807|      1|  }
  808|       |
  809|     18|  for (i = 0; i < NGHTTP2_EXTPRI_URGENCY_LEVELS; ++i) {
  ------------------
  |  | 5028|     18|#define NGHTTP2_EXTPRI_URGENCY_LEVELS (NGHTTP2_EXTPRI_URGENCY_LOW + 1)
  |  |  ------------------
  |  |  |  | 5020|     18|#define NGHTTP2_EXTPRI_URGENCY_LOW 7
  |  |  ------------------
  ------------------
  |  Branch (809:15): [True: 16, False: 2]
  ------------------
  810|     16|    nghttp2_pq_free(&session->sched[i].ob_data);
  811|     16|  }
  812|       |
  813|       |  /* Have to free streams first, so that we can check
  814|       |     stream->item->queued */
  815|      2|  nghttp2_map_each(&session->streams, free_streams, session);
  816|      2|  nghttp2_map_free(&session->streams);
  817|       |
  818|      2|  ob_q_free(&session->ob_urgent, mem);
  819|      2|  ob_q_free(&session->ob_reg, mem);
  820|      2|  ob_q_free(&session->ob_syn, mem);
  821|       |
  822|      2|  active_outbound_item_reset(&session->aob, mem);
  823|      2|  session_inbound_frame_reset(session);
  824|      2|  nghttp2_hd_deflate_free(&session->hd_deflater);
  825|      2|  nghttp2_hd_inflate_free(&session->hd_inflater);
  826|      2|  nghttp2_bufs_free(&session->aob.framebufs);
  827|      2|  nghttp2_mem_free(mem, session);
  828|      2|}
nghttp2_session_add_item:
 1017|     13|                             nghttp2_outbound_item *item) {
 1018|       |  /* TODO Return error if stream is not found for the frame requiring
 1019|       |     stream presence. */
 1020|     13|  int rv = 0;
 1021|     13|  nghttp2_stream *stream;
 1022|     13|  nghttp2_frame *frame;
 1023|       |
 1024|     13|  frame = &item->frame;
 1025|     13|  stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
 1026|       |
 1027|     13|  switch (frame->hd.type) {
 1028|      0|  case NGHTTP2_DATA:
  ------------------
  |  Branch (1028:3): [True: 0, False: 13]
  ------------------
 1029|      0|    if (!stream) {
  ------------------
  |  Branch (1029:9): [True: 0, False: 0]
  ------------------
 1030|      0|      return NGHTTP2_ERR_STREAM_CLOSED;
 1031|      0|    }
 1032|       |
 1033|      0|    if (stream->item) {
  ------------------
  |  Branch (1033:9): [True: 0, False: 0]
  ------------------
 1034|      0|      return NGHTTP2_ERR_DATA_EXIST;
 1035|      0|    }
 1036|       |
 1037|      0|    rv = session_attach_stream_item(session, stream, item);
 1038|       |
 1039|      0|    if (rv != 0) {
  ------------------
  |  Branch (1039:9): [True: 0, False: 0]
  ------------------
 1040|      0|      return rv;
 1041|      0|    }
 1042|       |
 1043|      0|    return 0;
 1044|      2|  case NGHTTP2_HEADERS:
  ------------------
  |  Branch (1044:3): [True: 2, False: 11]
  ------------------
 1045|       |    /* We push request HEADERS and push response HEADERS to
 1046|       |       dedicated queue because their transmission is affected by
 1047|       |       SETTINGS_MAX_CONCURRENT_STREAMS */
 1048|       |    /* TODO If 2 HEADERS are submitted for reserved stream, then
 1049|       |       both of them are queued into ob_syn, which is not
 1050|       |       desirable. */
 1051|      2|    if (frame->headers.cat == NGHTTP2_HCAT_REQUEST ||
  ------------------
  |  Branch (1051:9): [True: 2, False: 0]
  ------------------
 1052|      2|        (stream && stream->state == NGHTTP2_STREAM_RESERVED)) {
  ------------------
  |  Branch (1052:10): [True: 0, False: 0]
  |  Branch (1052:20): [True: 0, False: 0]
  ------------------
 1053|      2|      nghttp2_outbound_queue_push(&session->ob_syn, item);
 1054|      2|      item->queued = 1;
 1055|      2|      return 0;
 1056|      2|    }
 1057|       |
 1058|      0|    nghttp2_outbound_queue_push(&session->ob_reg, item);
 1059|      0|    item->queued = 1;
 1060|      0|    return 0;
 1061|      3|  case NGHTTP2_SETTINGS:
  ------------------
  |  Branch (1061:3): [True: 3, False: 10]
  ------------------
 1062|      3|  case NGHTTP2_PING:
  ------------------
  |  Branch (1062:3): [True: 0, False: 13]
  ------------------
 1063|      3|    nghttp2_outbound_queue_push(&session->ob_urgent, item);
 1064|      3|    item->queued = 1;
 1065|      3|    return 0;
 1066|      2|  case NGHTTP2_RST_STREAM:
  ------------------
  |  Branch (1066:3): [True: 2, False: 11]
  ------------------
 1067|      2|    if (stream) {
  ------------------
  |  Branch (1067:9): [True: 2, False: 0]
  ------------------
 1068|      2|      stream->state = NGHTTP2_STREAM_CLOSING;
 1069|      2|    }
 1070|      2|    nghttp2_outbound_queue_push(&session->ob_reg, item);
 1071|      2|    item->queued = 1;
 1072|      2|    return 0;
 1073|      0|  case NGHTTP2_PUSH_PROMISE: {
  ------------------
  |  Branch (1073:3): [True: 0, False: 13]
  ------------------
 1074|      0|    nghttp2_headers_aux_data *aux_data;
 1075|       |
 1076|      0|    aux_data = &item->aux_data.headers;
 1077|       |
 1078|      0|    if (!stream) {
  ------------------
  |  Branch (1078:9): [True: 0, False: 0]
  ------------------
 1079|      0|      return NGHTTP2_ERR_STREAM_CLOSED;
 1080|      0|    }
 1081|       |
 1082|      0|    if (!nghttp2_session_open_stream(
  ------------------
  |  Branch (1082:9): [True: 0, False: 0]
  ------------------
 1083|      0|          session, frame->push_promise.promised_stream_id,
 1084|      0|          NGHTTP2_STREAM_FLAG_NONE, NGHTTP2_STREAM_RESERVED,
  ------------------
  |  |   78|      0|#define NGHTTP2_STREAM_FLAG_NONE 0x00U
  ------------------
 1085|      0|          aux_data->stream_user_data)) {
 1086|      0|      return NGHTTP2_ERR_NOMEM;
 1087|      0|    }
 1088|       |
 1089|      0|    nghttp2_outbound_queue_push(&session->ob_reg, item);
 1090|      0|    item->queued = 1;
 1091|       |
 1092|      0|    return 0;
 1093|      0|  }
 1094|      6|  case NGHTTP2_WINDOW_UPDATE:
  ------------------
  |  Branch (1094:3): [True: 6, False: 7]
  ------------------
 1095|      6|    if (stream) {
  ------------------
  |  Branch (1095:9): [True: 4, False: 2]
  ------------------
 1096|      4|      stream->window_update_queued = 1;
 1097|      4|    } else if (frame->hd.stream_id == 0) {
  ------------------
  |  Branch (1097:16): [True: 2, False: 0]
  ------------------
 1098|      2|      session->window_update_queued = 1;
 1099|      2|    }
 1100|      6|    nghttp2_outbound_queue_push(&session->ob_reg, item);
 1101|      6|    item->queued = 1;
 1102|      6|    return 0;
 1103|      0|  default:
  ------------------
  |  Branch (1103:3): [True: 0, False: 13]
  ------------------
 1104|      0|    nghttp2_outbound_queue_push(&session->ob_reg, item);
 1105|      0|    item->queued = 1;
 1106|      0|    return 0;
 1107|     13|  }
 1108|     13|}
nghttp2_session_add_rst_stream_continue:
 1120|      2|                                            int continue_without_stream) {
 1121|      2|  int rv;
 1122|      2|  nghttp2_outbound_item *item;
 1123|      2|  nghttp2_frame *frame;
 1124|      2|  nghttp2_stream *stream;
 1125|      2|  nghttp2_mem *mem;
 1126|       |
 1127|      2|  mem = &session->mem;
 1128|      2|  stream = nghttp2_session_get_stream(session, stream_id);
 1129|      2|  if (stream && stream->state == NGHTTP2_STREAM_CLOSING) {
  ------------------
  |  Branch (1129:7): [True: 2, False: 0]
  |  Branch (1129:17): [True: 0, False: 2]
  ------------------
 1130|      0|    return 0;
 1131|      0|  }
 1132|       |
 1133|       |  /* Sending RST_STREAM to an idle stream is subject to protocol
 1134|       |     violation.  Historically, nghttp2 allows this.  In order not to
 1135|       |     disrupt the existing applications, we don't error out this case
 1136|       |     and simply ignore it. */
 1137|      2|  if (nghttp2_session_is_my_stream_id(session, stream_id)) {
  ------------------
  |  Branch (1137:7): [True: 2, False: 0]
  ------------------
 1138|      2|    if ((uint32_t)stream_id >= session->next_stream_id) {
  ------------------
  |  Branch (1138:9): [True: 0, False: 2]
  ------------------
 1139|      0|      return 0;
 1140|      0|    }
 1141|      2|  } else if (session->last_recv_stream_id < stream_id) {
  ------------------
  |  Branch (1141:14): [True: 0, False: 0]
  ------------------
 1142|      0|    return 0;
 1143|      0|  }
 1144|       |
 1145|       |  /* Cancel pending request HEADERS in ob_syn if this RST_STREAM
 1146|       |     refers to that stream. */
 1147|      2|  if (!session->server && nghttp2_session_is_my_stream_id(session, stream_id) &&
  ------------------
  |  Branch (1147:7): [True: 2, False: 0]
  |  Branch (1147:27): [True: 2, False: 0]
  ------------------
 1148|      2|      nghttp2_outbound_queue_top(&session->ob_syn)) {
  ------------------
  |  |  192|      2|#define nghttp2_outbound_queue_top(Q) ((Q)->head)
  |  |  ------------------
  |  |  |  Branch (192:39): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 1149|      0|    nghttp2_headers_aux_data *aux_data;
 1150|      0|    nghttp2_frame *headers_frame;
 1151|       |
 1152|      0|    headers_frame = &nghttp2_outbound_queue_top(&session->ob_syn)->frame;
  ------------------
  |  |  192|      0|#define nghttp2_outbound_queue_top(Q) ((Q)->head)
  ------------------
 1153|      0|    assert(headers_frame->hd.type == NGHTTP2_HEADERS);
  ------------------
  |  Branch (1153:5): [True: 0, False: 0]
  |  Branch (1153:5): [True: 0, False: 0]
  ------------------
 1154|       |
 1155|      0|    if (headers_frame->hd.stream_id <= stream_id) {
  ------------------
  |  Branch (1155:9): [True: 0, False: 0]
  ------------------
 1156|      0|      for (item = session->ob_syn.head; item; item = item->qnext) {
  ------------------
  |  Branch (1156:41): [True: 0, False: 0]
  ------------------
 1157|      0|        aux_data = &item->aux_data.headers;
 1158|       |
 1159|      0|        if (item->frame.hd.stream_id < stream_id) {
  ------------------
  |  Branch (1159:13): [True: 0, False: 0]
  ------------------
 1160|      0|          continue;
 1161|      0|        }
 1162|       |
 1163|       |        /* stream_id in ob_syn queue must be strictly increasing.  If
 1164|       |           we found larger ID, then we can break here. */
 1165|      0|        if (item->frame.hd.stream_id > stream_id || aux_data->canceled) {
  ------------------
  |  Branch (1165:13): [True: 0, False: 0]
  |  Branch (1165:53): [True: 0, False: 0]
  ------------------
 1166|      0|          break;
 1167|      0|        }
 1168|       |
 1169|      0|        aux_data->error_code = error_code;
 1170|      0|        aux_data->canceled = 1;
 1171|       |
 1172|      0|        return 0;
 1173|      0|      }
 1174|      0|    }
 1175|      0|  }
 1176|       |
 1177|       |  /* To keep the old behaviour, do not fail if stream was not
 1178|       |     found. */
 1179|      2|  if (!continue_without_stream && !stream) {
  ------------------
  |  Branch (1179:7): [True: 2, False: 0]
  |  Branch (1179:35): [True: 0, False: 2]
  ------------------
 1180|      0|    return 0;
 1181|      0|  }
 1182|       |
 1183|      2|  item = nghttp2_mem_malloc(mem, sizeof(nghttp2_outbound_item));
 1184|      2|  if (item == NULL) {
  ------------------
  |  Branch (1184:7): [True: 0, False: 2]
  ------------------
 1185|      0|    return NGHTTP2_ERR_NOMEM;
 1186|      0|  }
 1187|       |
 1188|      2|  nghttp2_outbound_item_init(item);
 1189|       |
 1190|      2|  frame = &item->frame;
 1191|       |
 1192|      2|  nghttp2_frame_rst_stream_init(&frame->rst_stream, stream_id, error_code);
 1193|       |
 1194|      2|  item->aux_data.rst_stream.continue_without_stream =
 1195|      2|    (uint8_t)(continue_without_stream != 0);
 1196|       |
 1197|      2|  rv = nghttp2_session_add_item(session, item);
 1198|      2|  if (rv != 0) {
  ------------------
  |  Branch (1198:7): [True: 0, False: 2]
  ------------------
 1199|      0|    nghttp2_frame_rst_stream_free(&frame->rst_stream);
 1200|      0|    nghttp2_mem_free(mem, item);
 1201|      0|    return rv;
 1202|      0|  }
 1203|      2|  return 0;
 1204|      2|}
nghttp2_session_open_stream:
 1209|      2|                                            void *stream_user_data) {
 1210|      2|  int rv;
 1211|      2|  nghttp2_stream *stream;
 1212|      2|  int stream_alloc = 0;
 1213|      2|  nghttp2_mem *mem;
 1214|       |
 1215|      2|  mem = &session->mem;
 1216|      2|  stream = nghttp2_session_get_stream_raw(session, stream_id);
 1217|       |
 1218|      2|  if (session->opt_flags &
  ------------------
  |  Branch (1218:7): [True: 2, False: 0]
  ------------------
 1219|      2|      NGHTTP2_OPTMASK_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION) {
  ------------------
  |  |   57|      2|#define NGHTTP2_OPTMASK_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION 0x40U
  ------------------
 1220|      2|    flags |= NGHTTP2_STREAM_FLAG_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION;
  ------------------
  |  |   96|      2|#define NGHTTP2_STREAM_FLAG_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION 0x40U
  ------------------
 1221|      2|  }
 1222|       |
 1223|      2|  if (stream) {
  ------------------
  |  Branch (1223:7): [True: 0, False: 2]
  ------------------
 1224|      0|    assert(stream->state == NGHTTP2_STREAM_IDLE);
  ------------------
  |  Branch (1224:5): [True: 0, False: 0]
  |  Branch (1224:5): [True: 0, False: 0]
  ------------------
 1225|      0|    assert(initial_state != NGHTTP2_STREAM_IDLE);
  ------------------
  |  Branch (1225:5): [True: 0, False: 0]
  |  Branch (1225:5): [True: 0, False: 0]
  ------------------
 1226|       |
 1227|      0|    --session->num_idle_streams;
 1228|      2|  } else {
 1229|      2|    stream = nghttp2_mem_malloc(mem, sizeof(nghttp2_stream));
 1230|      2|    if (stream == NULL) {
  ------------------
  |  Branch (1230:9): [True: 0, False: 2]
  ------------------
 1231|      0|      return NULL;
 1232|      0|    }
 1233|       |
 1234|      2|    stream_alloc = 1;
 1235|      2|  }
 1236|       |
 1237|      2|  if (initial_state == NGHTTP2_STREAM_RESERVED) {
  ------------------
  |  Branch (1237:7): [True: 0, False: 2]
  ------------------
 1238|      0|    flags |= NGHTTP2_STREAM_FLAG_PUSH;
  ------------------
  |  |   80|      0|#define NGHTTP2_STREAM_FLAG_PUSH 0x01U
  ------------------
 1239|      0|  }
 1240|       |
 1241|      2|  if (stream_alloc) {
  ------------------
  |  Branch (1241:7): [True: 2, False: 0]
  ------------------
 1242|      2|    nghttp2_stream_init(stream, stream_id, flags, initial_state,
 1243|      2|                        (int32_t)session->remote_settings.initial_window_size,
 1244|      2|                        (int32_t)session->local_settings.initial_window_size,
 1245|      2|                        stream_user_data);
 1246|      2|    stream->seq = session->stream_seq++;
 1247|       |
 1248|      2|    rv = nghttp2_map_insert(&session->streams, stream_id, stream);
 1249|      2|    if (rv != 0) {
  ------------------
  |  Branch (1249:9): [True: 0, False: 2]
  ------------------
 1250|      0|      nghttp2_stream_free(stream);
 1251|      0|      nghttp2_mem_free(mem, stream);
 1252|      0|      return NULL;
 1253|      0|    }
 1254|      2|  } else {
 1255|      0|    stream->flags = flags;
 1256|      0|    stream->state = initial_state;
 1257|      0|    stream->stream_user_data = stream_user_data;
 1258|      0|  }
 1259|       |
 1260|      2|  switch (initial_state) {
 1261|      0|  case NGHTTP2_STREAM_RESERVED:
  ------------------
  |  Branch (1261:3): [True: 0, False: 2]
  ------------------
 1262|      0|    if (nghttp2_session_is_my_stream_id(session, stream_id)) {
  ------------------
  |  Branch (1262:9): [True: 0, False: 0]
  ------------------
 1263|       |      /* reserved (local) */
 1264|      0|      nghttp2_stream_shutdown(stream, NGHTTP2_SHUT_RD);
  ------------------
  |  |   71|      0|#define NGHTTP2_SHUT_RD 0x01U
  ------------------
 1265|      0|    } else {
 1266|       |      /* reserved (remote) */
 1267|      0|      nghttp2_stream_shutdown(stream, NGHTTP2_SHUT_WR);
  ------------------
  |  |   73|      0|#define NGHTTP2_SHUT_WR 0x02U
  ------------------
 1268|      0|      ++session->num_incoming_reserved_streams;
 1269|      0|    }
 1270|       |    /* Reserved stream does not count in the concurrent streams
 1271|       |       limit. That is one of the DOS vector. */
 1272|      0|    break;
 1273|      0|  case NGHTTP2_STREAM_IDLE:
  ------------------
  |  Branch (1273:3): [True: 0, False: 2]
  ------------------
 1274|      0|    ++session->num_idle_streams;
 1275|      0|    break;
 1276|      2|  default:
  ------------------
  |  Branch (1276:3): [True: 2, False: 0]
  ------------------
 1277|      2|    if (nghttp2_session_is_my_stream_id(session, stream_id)) {
  ------------------
  |  Branch (1277:9): [True: 2, False: 0]
  ------------------
 1278|      2|      ++session->num_outgoing_streams;
 1279|      2|    } else {
 1280|      0|      ++session->num_incoming_streams;
 1281|      0|    }
 1282|      2|  }
 1283|       |
 1284|      2|  return stream;
 1285|      2|}
nghttp2_session_close_stream:
 1288|      2|                                 uint32_t error_code) {
 1289|      2|  nghttp2_stream *stream;
 1290|      2|  nghttp2_mem *mem;
 1291|      2|  int is_my_stream_id;
 1292|       |
 1293|      2|  mem = &session->mem;
 1294|      2|  stream = nghttp2_session_get_stream(session, stream_id);
 1295|       |
 1296|      2|  if (!stream) {
  ------------------
  |  Branch (1296:7): [True: 0, False: 2]
  ------------------
 1297|      0|    return NGHTTP2_ERR_INVALID_ARGUMENT;
 1298|      0|  }
 1299|       |
 1300|      2|  DEBUGF("stream: stream(%p)=%d close\n", stream, stream->stream_id);
  ------------------
  |  |   39|      2|    do {                                                                       \
  |  |   40|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 1301|       |
 1302|       |  /* We call on_stream_close_callback even if stream->state is
 1303|       |     NGHTTP2_STREAM_INITIAL. This will happen while sending request
 1304|       |     HEADERS, a local endpoint receives RST_STREAM for that stream. It
 1305|       |     may be PROTOCOL_ERROR, but without notifying stream closure will
 1306|       |     hang the stream in a local endpoint.
 1307|       |  */
 1308|       |
 1309|      2|  if (session->callbacks.on_stream_close_callback) {
  ------------------
  |  Branch (1309:7): [True: 2, False: 0]
  ------------------
 1310|      2|    if (session->callbacks.on_stream_close_callback(
  ------------------
  |  Branch (1310:9): [True: 0, False: 2]
  ------------------
 1311|      2|          session, stream_id, error_code, session->user_data) != 0) {
 1312|      0|      return NGHTTP2_ERR_CALLBACK_FAILURE;
 1313|      0|    }
 1314|      2|  }
 1315|       |
 1316|      2|  if (stream->item) {
  ------------------
  |  Branch (1316:7): [True: 0, False: 2]
  ------------------
 1317|      0|    nghttp2_outbound_item *item;
 1318|       |
 1319|      0|    item = stream->item;
 1320|       |
 1321|      0|    session_detach_stream_item(session, stream);
 1322|       |
 1323|       |    /* If item is queued, it will be deleted when it is popped
 1324|       |       (nghttp2_session_prep_frame() will fail).  If session->aob.item
 1325|       |       points to this item, let active_outbound_item_reset()
 1326|       |       free the item. */
 1327|      0|    if (!item->queued && item != session->aob.item) {
  ------------------
  |  Branch (1327:9): [True: 0, False: 0]
  |  Branch (1327:26): [True: 0, False: 0]
  ------------------
 1328|      0|      nghttp2_outbound_item_free(item, mem);
 1329|      0|      nghttp2_mem_free(mem, item);
 1330|      0|    }
 1331|      0|  }
 1332|       |
 1333|      2|  is_my_stream_id = nghttp2_session_is_my_stream_id(session, stream_id);
 1334|       |
 1335|       |  /* pushed streams which is not opened yet is not counted toward max
 1336|       |     concurrent limits */
 1337|      2|  if ((stream->flags & NGHTTP2_STREAM_FLAG_PUSH)) {
  ------------------
  |  |   80|      2|#define NGHTTP2_STREAM_FLAG_PUSH 0x01U
  ------------------
  |  Branch (1337:7): [True: 0, False: 2]
  ------------------
 1338|      0|    if (!is_my_stream_id) {
  ------------------
  |  Branch (1338:9): [True: 0, False: 0]
  ------------------
 1339|      0|      --session->num_incoming_reserved_streams;
 1340|      0|    }
 1341|      2|  } else {
 1342|      2|    if (is_my_stream_id) {
  ------------------
  |  Branch (1342:9): [True: 2, False: 0]
  ------------------
 1343|      2|      --session->num_outgoing_streams;
 1344|      2|    } else {
 1345|      0|      --session->num_incoming_streams;
 1346|      0|    }
 1347|      2|  }
 1348|       |
 1349|       |  /* Closes both directions just in case they are not closed yet */
 1350|      2|  stream->flags |= NGHTTP2_STREAM_FLAG_CLOSED;
  ------------------
  |  |   82|      2|#define NGHTTP2_STREAM_FLAG_CLOSED 0x02U
  ------------------
 1351|       |
 1352|      2|  nghttp2_session_destroy_stream(session, stream);
 1353|       |
 1354|      2|  return 0;
 1355|      2|}
nghttp2_session_destroy_stream:
 1358|      2|                                    nghttp2_stream *stream) {
 1359|      2|  nghttp2_mem *mem;
 1360|       |
 1361|      2|  DEBUGF("stream: destroy closed stream(%p)=%d\n", stream, stream->stream_id);
  ------------------
  |  |   39|      2|    do {                                                                       \
  |  |   40|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 1362|       |
 1363|      2|  mem = &session->mem;
 1364|       |
 1365|      2|  if (stream->queued) {
  ------------------
  |  Branch (1365:7): [True: 0, False: 2]
  ------------------
 1366|      0|    session_ob_data_remove(session, stream);
 1367|      0|  }
 1368|       |
 1369|      2|  nghttp2_map_remove(&session->streams, stream->stream_id);
 1370|      2|  nghttp2_stream_free(stream);
 1371|      2|  nghttp2_mem_free(mem, stream);
 1372|      2|}
nghttp2_session_close_stream_if_shut_rdwr:
 1388|      2|                                              nghttp2_stream *stream) {
 1389|      2|  if ((stream->shut_flags & NGHTTP2_SHUT_RDWR) == NGHTTP2_SHUT_RDWR) {
  ------------------
  |  |   76|      2|#define NGHTTP2_SHUT_RDWR (NGHTTP2_SHUT_RD | NGHTTP2_SHUT_WR)
  |  |  ------------------
  |  |  |  |   71|      2|#define NGHTTP2_SHUT_RD 0x01U
  |  |  ------------------
  |  |               #define NGHTTP2_SHUT_RDWR (NGHTTP2_SHUT_RD | NGHTTP2_SHUT_WR)
  |  |  ------------------
  |  |  |  |   73|      2|#define NGHTTP2_SHUT_WR 0x02U
  |  |  ------------------
  ------------------
                if ((stream->shut_flags & NGHTTP2_SHUT_RDWR) == NGHTTP2_SHUT_RDWR) {
  ------------------
  |  |   76|      2|#define NGHTTP2_SHUT_RDWR (NGHTTP2_SHUT_RD | NGHTTP2_SHUT_WR)
  |  |  ------------------
  |  |  |  |   71|      2|#define NGHTTP2_SHUT_RD 0x01U
  |  |  ------------------
  |  |               #define NGHTTP2_SHUT_RDWR (NGHTTP2_SHUT_RD | NGHTTP2_SHUT_WR)
  |  |  ------------------
  |  |  |  |   73|      2|#define NGHTTP2_SHUT_WR 0x02U
  |  |  ------------------
  ------------------
  |  Branch (1389:7): [True: 0, False: 2]
  ------------------
 1390|      0|    return nghttp2_session_close_stream(session, stream->stream_id,
 1391|      0|                                        NGHTTP2_NO_ERROR);
 1392|      0|  }
 1393|      2|  return 0;
 1394|      2|}
nghttp2_session_check_request_allowed:
 1440|      3|int nghttp2_session_check_request_allowed(nghttp2_session *session) {
 1441|      3|  return !session->server && session->next_stream_id <= INT32_MAX &&
  ------------------
  |  Branch (1441:10): [True: 3, False: 0]
  |  Branch (1441:30): [True: 3, False: 0]
  ------------------
 1442|      3|         (session->goaway_flags & NGHTTP2_GOAWAY_RECV) == 0 &&
  ------------------
  |  |  186|      3|#define NGHTTP2_GOAWAY_RECV 0x08U
  ------------------
  |  Branch (1442:10): [True: 3, False: 0]
  ------------------
 1443|      3|         !session_is_closing(session);
  ------------------
  |  Branch (1443:10): [True: 3, False: 0]
  ------------------
 1444|      3|}
nghttp2_session_pop_next_ob_item:
 2329|     22|nghttp2_session_pop_next_ob_item(nghttp2_session *session) {
 2330|     22|  nghttp2_outbound_item *item;
 2331|       |
 2332|     22|  item = nghttp2_outbound_queue_top(&session->ob_urgent);
  ------------------
  |  |  192|     22|#define nghttp2_outbound_queue_top(Q) ((Q)->head)
  ------------------
 2333|     22|  if (item) {
  ------------------
  |  Branch (2333:7): [True: 3, False: 19]
  ------------------
 2334|      3|    nghttp2_outbound_queue_pop(&session->ob_urgent);
 2335|      3|    item->queued = 0;
 2336|      3|    return item;
 2337|      3|  }
 2338|       |
 2339|     19|  item = nghttp2_outbound_queue_top(&session->ob_reg);
  ------------------
  |  |  192|     19|#define nghttp2_outbound_queue_top(Q) ((Q)->head)
  ------------------
 2340|     19|  if (item) {
  ------------------
  |  Branch (2340:7): [True: 8, False: 11]
  ------------------
 2341|      8|    nghttp2_outbound_queue_pop(&session->ob_reg);
 2342|      8|    item->queued = 0;
 2343|      8|    return item;
 2344|      8|  }
 2345|       |
 2346|     11|  if (!session_is_outgoing_concurrent_streams_max(session)) {
  ------------------
  |  Branch (2346:7): [True: 11, False: 0]
  ------------------
 2347|     11|    item = nghttp2_outbound_queue_top(&session->ob_syn);
  ------------------
  |  |  192|     11|#define nghttp2_outbound_queue_top(Q) ((Q)->head)
  ------------------
 2348|     11|    if (item) {
  ------------------
  |  Branch (2348:9): [True: 2, False: 9]
  ------------------
 2349|      2|      nghttp2_outbound_queue_pop(&session->ob_syn);
 2350|      2|      item->queued = 0;
 2351|      2|      return item;
 2352|      2|    }
 2353|     11|  }
 2354|       |
 2355|      9|  if (session->remote_window_size > 0) {
  ------------------
  |  Branch (2355:7): [True: 9, False: 0]
  ------------------
 2356|      9|    return session_sched_get_next_outbound_item(session);
 2357|      9|  }
 2358|       |
 2359|      0|  return NULL;
 2360|      9|}
nghttp2_session_send:
 3156|      9|int nghttp2_session_send(nghttp2_session *session) {
 3157|      9|  const uint8_t *data = NULL;
 3158|      9|  nghttp2_ssize datalen;
 3159|      9|  nghttp2_ssize sentlen;
 3160|      9|  nghttp2_bufs *framebufs;
 3161|       |
 3162|      9|  framebufs = &session->aob.framebufs;
 3163|       |
 3164|     24|  for (;;) {
 3165|     24|    datalen = nghttp2_session_mem_send_internal(session, &data, 0);
 3166|     24|    if (datalen <= 0) {
  ------------------
  |  Branch (3166:9): [True: 9, False: 15]
  ------------------
 3167|      9|      return (int)datalen;
 3168|      9|    }
 3169|     15|    if (session->callbacks.send_callback2) {
  ------------------
  |  Branch (3169:9): [True: 0, False: 15]
  ------------------
 3170|      0|      sentlen = session->callbacks.send_callback2(
 3171|      0|        session, data, (size_t)datalen, 0, session->user_data);
 3172|     15|    } else {
 3173|     15|      sentlen = (nghttp2_ssize)session->callbacks.send_callback(
 3174|     15|        session, data, (size_t)datalen, 0, session->user_data);
 3175|     15|    }
 3176|     15|    if (sentlen < 0) {
  ------------------
  |  Branch (3176:9): [True: 0, False: 15]
  ------------------
 3177|      0|      if (sentlen == NGHTTP2_ERR_WOULDBLOCK) {
  ------------------
  |  Branch (3177:11): [True: 0, False: 0]
  ------------------
 3178|       |        /* Transmission canceled. Rewind the offset */
 3179|      0|        framebufs->cur->buf.pos -= datalen;
 3180|       |
 3181|      0|        return 0;
 3182|      0|      }
 3183|      0|      return NGHTTP2_ERR_CALLBACK_FAILURE;
 3184|      0|    }
 3185|       |    /* Rewind the offset to the amount of unsent bytes */
 3186|     15|    framebufs->cur->buf.pos -= datalen - sentlen;
 3187|     15|  }
 3188|      9|}
nghttp2_session_on_response_headers_received:
 3930|      1|                                                 nghttp2_stream *stream) {
 3931|      1|  int rv;
 3932|       |  /* This function is only called if stream->state ==
 3933|       |     NGHTTP2_STREAM_OPENING and stream_id is local side initiated. */
 3934|      1|  assert(stream->state == NGHTTP2_STREAM_OPENING &&
  ------------------
  |  Branch (3934:3): [True: 0, False: 1]
  |  Branch (3934:3): [True: 0, False: 0]
  |  Branch (3934:3): [True: 1, False: 0]
  |  Branch (3934:3): [True: 1, False: 0]
  ------------------
 3935|      1|         nghttp2_session_is_my_stream_id(session, frame->hd.stream_id));
 3936|      1|  if (frame->hd.stream_id == 0) {
  ------------------
  |  Branch (3936:7): [True: 0, False: 1]
  ------------------
 3937|      0|    return session_inflate_handle_invalid_connection(
 3938|      0|      session, frame, NGHTTP2_ERR_PROTO, "response HEADERS: stream_id == 0");
 3939|      0|  }
 3940|      1|  if (stream->shut_flags & NGHTTP2_SHUT_RD) {
  ------------------
  |  |   71|      1|#define NGHTTP2_SHUT_RD 0x01U
  ------------------
  |  Branch (3940:7): [True: 0, False: 1]
  ------------------
 3941|       |    /* half closed (remote): from the spec:
 3942|       |
 3943|       |       If an endpoint receives additional frames for a stream that is
 3944|       |       in this state it MUST respond with a stream error (Section
 3945|       |       5.4.2) of type STREAM_CLOSED.
 3946|       |
 3947|       |       We go further, and make it connection error.
 3948|       |    */
 3949|      0|    return session_inflate_handle_invalid_connection(
 3950|      0|      session, frame, NGHTTP2_ERR_STREAM_CLOSED, "HEADERS: stream closed");
 3951|      0|  }
 3952|      1|  stream->state = NGHTTP2_STREAM_OPENED;
 3953|      1|  rv = session_call_on_begin_headers(session, frame);
 3954|      1|  if (rv != 0) {
  ------------------
  |  Branch (3954:7): [True: 0, False: 1]
  ------------------
 3955|      0|    return rv;
 3956|      0|  }
 3957|      1|  return 0;
 3958|      1|}
nghttp2_session_update_local_settings:
 4264|      1|                                          size_t niv) {
 4265|      1|  int rv;
 4266|      1|  size_t i;
 4267|      1|  int32_t new_initial_window_size = -1;
 4268|      1|  uint32_t header_table_size = 0;
 4269|      1|  uint32_t min_header_table_size = UINT32_MAX;
 4270|      1|  uint8_t header_table_size_seen = 0;
 4271|       |  /* For NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE, use the value last
 4272|       |     seen.  For NGHTTP2_SETTINGS_HEADER_TABLE_SIZE, use both minimum
 4273|       |     value and last seen value. */
 4274|      4|  for (i = 0; i < niv; ++i) {
  ------------------
  |  Branch (4274:15): [True: 3, False: 1]
  ------------------
 4275|      3|    switch (iv[i].settings_id) {
  ------------------
  |  Branch (4275:13): [True: 1, False: 2]
  ------------------
 4276|      0|    case NGHTTP2_SETTINGS_HEADER_TABLE_SIZE:
  ------------------
  |  Branch (4276:5): [True: 0, False: 3]
  ------------------
 4277|      0|      header_table_size_seen = 1;
 4278|      0|      header_table_size = iv[i].value;
 4279|      0|      min_header_table_size =
 4280|      0|        nghttp2_min_uint32(min_header_table_size, iv[i].value);
 4281|      0|      break;
 4282|      1|    case NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE:
  ------------------
  |  Branch (4282:5): [True: 1, False: 2]
  ------------------
 4283|      1|      new_initial_window_size = (int32_t)iv[i].value;
 4284|      1|      break;
 4285|      3|    }
 4286|      3|  }
 4287|      1|  if (header_table_size_seen) {
  ------------------
  |  Branch (4287:7): [True: 0, False: 1]
  ------------------
 4288|      0|    if (min_header_table_size < header_table_size) {
  ------------------
  |  Branch (4288:9): [True: 0, False: 0]
  ------------------
 4289|      0|      rv = nghttp2_hd_inflate_change_table_size(&session->hd_inflater,
 4290|      0|                                                min_header_table_size);
 4291|      0|      if (rv != 0) {
  ------------------
  |  Branch (4291:11): [True: 0, False: 0]
  ------------------
 4292|      0|        return rv;
 4293|      0|      }
 4294|      0|    }
 4295|       |
 4296|      0|    rv = nghttp2_hd_inflate_change_table_size(&session->hd_inflater,
 4297|      0|                                              header_table_size);
 4298|      0|    if (rv != 0) {
  ------------------
  |  Branch (4298:9): [True: 0, False: 0]
  ------------------
 4299|      0|      return rv;
 4300|      0|    }
 4301|      0|  }
 4302|      1|  if (new_initial_window_size != -1) {
  ------------------
  |  Branch (4302:7): [True: 1, False: 0]
  ------------------
 4303|      1|    rv = session_update_local_initial_window_size(
 4304|      1|      session, new_initial_window_size,
 4305|      1|      (int32_t)session->local_settings.initial_window_size);
 4306|      1|    if (rv != 0) {
  ------------------
  |  Branch (4306:9): [True: 0, False: 1]
  ------------------
 4307|      0|      return rv;
 4308|      0|    }
 4309|      1|  }
 4310|       |
 4311|      4|  for (i = 0; i < niv; ++i) {
  ------------------
  |  Branch (4311:15): [True: 3, False: 1]
  ------------------
 4312|      3|    switch (iv[i].settings_id) {
  ------------------
  |  Branch (4312:13): [True: 3, False: 0]
  ------------------
 4313|      0|    case NGHTTP2_SETTINGS_HEADER_TABLE_SIZE:
  ------------------
  |  Branch (4313:5): [True: 0, False: 3]
  ------------------
 4314|      0|      session->local_settings.header_table_size = iv[i].value;
 4315|      0|      break;
 4316|      1|    case NGHTTP2_SETTINGS_ENABLE_PUSH:
  ------------------
  |  Branch (4316:5): [True: 1, False: 2]
  ------------------
 4317|      1|      session->local_settings.enable_push = iv[i].value;
 4318|      1|      break;
 4319|      1|    case NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS:
  ------------------
  |  Branch (4319:5): [True: 1, False: 2]
  ------------------
 4320|      1|      session->local_settings.max_concurrent_streams = iv[i].value;
 4321|      1|      break;
 4322|      1|    case NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE:
  ------------------
  |  Branch (4322:5): [True: 1, False: 2]
  ------------------
 4323|      1|      session->local_settings.initial_window_size = iv[i].value;
 4324|      1|      break;
 4325|      0|    case NGHTTP2_SETTINGS_MAX_FRAME_SIZE:
  ------------------
  |  Branch (4325:5): [True: 0, False: 3]
  ------------------
 4326|      0|      session->local_settings.max_frame_size = iv[i].value;
 4327|      0|      break;
 4328|      0|    case NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE:
  ------------------
  |  Branch (4328:5): [True: 0, False: 3]
  ------------------
 4329|      0|      session->local_settings.max_header_list_size = iv[i].value;
 4330|      0|      break;
 4331|      0|    case NGHTTP2_SETTINGS_ENABLE_CONNECT_PROTOCOL:
  ------------------
  |  Branch (4331:5): [True: 0, False: 3]
  ------------------
 4332|      0|      session->local_settings.enable_connect_protocol = iv[i].value;
 4333|      0|      break;
 4334|      0|    case NGHTTP2_SETTINGS_NO_RFC7540_PRIORITIES:
  ------------------
  |  Branch (4334:5): [True: 0, False: 3]
  ------------------
 4335|      0|      session->local_settings.no_rfc7540_priorities = iv[i].value;
 4336|      0|      break;
 4337|      3|    }
 4338|      3|  }
 4339|       |
 4340|      1|  return 0;
 4341|      1|}
nghttp2_session_on_settings_received:
 4344|      2|                                         nghttp2_frame *frame, int noack) {
 4345|      2|  int rv;
 4346|      2|  size_t i;
 4347|      2|  nghttp2_mem *mem;
 4348|      2|  nghttp2_inflight_settings *settings;
 4349|       |
 4350|      2|  mem = &session->mem;
 4351|       |
 4352|      2|  if (frame->hd.stream_id != 0) {
  ------------------
  |  Branch (4352:7): [True: 0, False: 2]
  ------------------
 4353|      0|    return session_handle_invalid_connection(session, frame, NGHTTP2_ERR_PROTO,
 4354|      0|                                             "SETTINGS: stream_id != 0");
 4355|      0|  }
 4356|      2|  if (frame->hd.flags & NGHTTP2_FLAG_ACK) {
  ------------------
  |  Branch (4356:7): [True: 1, False: 1]
  ------------------
 4357|      1|    if (frame->settings.niv != 0) {
  ------------------
  |  Branch (4357:9): [True: 0, False: 1]
  ------------------
 4358|      0|      return session_handle_invalid_connection(
 4359|      0|        session, frame, NGHTTP2_ERR_FRAME_SIZE_ERROR,
 4360|      0|        "SETTINGS: ACK and payload != 0");
 4361|      0|    }
 4362|       |
 4363|      1|    settings = session->inflight_settings_head;
 4364|       |
 4365|      1|    if (!settings) {
  ------------------
  |  Branch (4365:9): [True: 0, False: 1]
  ------------------
 4366|      0|      return session_handle_invalid_connection(
 4367|      0|        session, frame, NGHTTP2_ERR_PROTO, "SETTINGS: unexpected ACK");
 4368|      0|    }
 4369|       |
 4370|      1|    rv = nghttp2_session_update_local_settings(session, settings->iv,
 4371|      1|                                               settings->niv);
 4372|       |
 4373|      1|    session->inflight_settings_head = settings->next;
 4374|       |
 4375|      1|    inflight_settings_del(settings, mem);
 4376|       |
 4377|      1|    if (rv != 0) {
  ------------------
  |  Branch (4377:9): [True: 0, False: 1]
  ------------------
 4378|      0|      if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (4378:11): [True: 0, False: 0]
  ------------------
 4379|      0|        return rv;
 4380|      0|      }
 4381|      0|      return session_handle_invalid_connection(session, frame, rv, NULL);
 4382|      0|    }
 4383|      1|    return session_call_on_frame_received(session, frame);
 4384|      1|  }
 4385|       |
 4386|      1|  if (!session->remote_settings_received) {
  ------------------
  |  Branch (4386:7): [True: 1, False: 0]
  ------------------
 4387|      1|    session->remote_settings.max_concurrent_streams =
 4388|      1|      NGHTTP2_DEFAULT_MAX_CONCURRENT_STREAMS;
  ------------------
  |  |   99|      1|#define NGHTTP2_DEFAULT_MAX_CONCURRENT_STREAMS 0xFFFFFFFFU
  ------------------
 4389|      1|    session->remote_settings_received = 1;
 4390|      1|  }
 4391|       |
 4392|      1|  for (i = 0; i < frame->settings.niv; ++i) {
  ------------------
  |  Branch (4392:15): [True: 0, False: 1]
  ------------------
 4393|      0|    nghttp2_settings_entry *entry = &frame->settings.iv[i];
 4394|       |
 4395|      0|    switch (entry->settings_id) {
  ------------------
  |  Branch (4395:13): [True: 0, False: 0]
  ------------------
 4396|      0|    case NGHTTP2_SETTINGS_HEADER_TABLE_SIZE:
  ------------------
  |  Branch (4396:5): [True: 0, False: 0]
  ------------------
 4397|       |
 4398|      0|      rv = nghttp2_hd_deflate_change_table_size(&session->hd_deflater,
 4399|      0|                                                entry->value);
 4400|      0|      if (rv != 0) {
  ------------------
  |  Branch (4400:11): [True: 0, False: 0]
  ------------------
 4401|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (4401:13): [True: 0, False: 0]
  ------------------
 4402|      0|          return rv;
 4403|      0|        } else {
 4404|      0|          return session_handle_invalid_connection(
 4405|      0|            session, frame, NGHTTP2_ERR_HEADER_COMP, NULL);
 4406|      0|        }
 4407|      0|      }
 4408|       |
 4409|      0|      session->remote_settings.header_table_size = entry->value;
 4410|       |
 4411|      0|      break;
 4412|      0|    case NGHTTP2_SETTINGS_ENABLE_PUSH:
  ------------------
  |  Branch (4412:5): [True: 0, False: 0]
  ------------------
 4413|       |
 4414|      0|      if (entry->value != 0 && entry->value != 1) {
  ------------------
  |  Branch (4414:11): [True: 0, False: 0]
  |  Branch (4414:32): [True: 0, False: 0]
  ------------------
 4415|      0|        return session_handle_invalid_connection(
 4416|      0|          session, frame, NGHTTP2_ERR_PROTO,
 4417|      0|          "SETTINGS: invalid SETTINGS_ENBLE_PUSH");
 4418|      0|      }
 4419|       |
 4420|      0|      if (!session->server && entry->value != 0) {
  ------------------
  |  Branch (4420:11): [True: 0, False: 0]
  |  Branch (4420:31): [True: 0, False: 0]
  ------------------
 4421|      0|        return session_handle_invalid_connection(
 4422|      0|          session, frame, NGHTTP2_ERR_PROTO,
 4423|      0|          "SETTINGS: server attempted to enable push");
 4424|      0|      }
 4425|       |
 4426|      0|      session->remote_settings.enable_push = entry->value;
 4427|       |
 4428|      0|      break;
 4429|      0|    case NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS:
  ------------------
  |  Branch (4429:5): [True: 0, False: 0]
  ------------------
 4430|       |
 4431|      0|      session->remote_settings.max_concurrent_streams = entry->value;
 4432|       |
 4433|      0|      break;
 4434|      0|    case NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE:
  ------------------
  |  Branch (4434:5): [True: 0, False: 0]
  ------------------
 4435|       |
 4436|       |      /* Update the initial window size of the all active streams */
 4437|       |      /* Check that initial_window_size < (1u << 31) */
 4438|      0|      if (entry->value > NGHTTP2_MAX_WINDOW_SIZE) {
  ------------------
  |  |  224|      0|#define NGHTTP2_MAX_WINDOW_SIZE ((int32_t)((1U << 31) - 1))
  ------------------
  |  Branch (4438:11): [True: 0, False: 0]
  ------------------
 4439|      0|        return session_handle_invalid_connection(
 4440|      0|          session, frame, NGHTTP2_ERR_FLOW_CONTROL,
 4441|      0|          "SETTINGS: too large SETTINGS_INITIAL_WINDOW_SIZE");
 4442|      0|      }
 4443|       |
 4444|      0|      rv = session_update_remote_initial_window_size(session,
 4445|      0|                                                     (int32_t)entry->value);
 4446|       |
 4447|      0|      if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (4447:11): [True: 0, False: 0]
  ------------------
 4448|      0|        return rv;
 4449|      0|      }
 4450|       |
 4451|      0|      if (rv != 0) {
  ------------------
  |  Branch (4451:11): [True: 0, False: 0]
  ------------------
 4452|      0|        return session_handle_invalid_connection(
 4453|      0|          session, frame, NGHTTP2_ERR_FLOW_CONTROL, NULL);
 4454|      0|      }
 4455|       |
 4456|      0|      session->remote_settings.initial_window_size = entry->value;
 4457|       |
 4458|      0|      break;
 4459|      0|    case NGHTTP2_SETTINGS_MAX_FRAME_SIZE:
  ------------------
  |  Branch (4459:5): [True: 0, False: 0]
  ------------------
 4460|       |
 4461|      0|      if (entry->value < NGHTTP2_MAX_FRAME_SIZE_MIN ||
  ------------------
  |  |   43|      0|#define NGHTTP2_MAX_FRAME_SIZE_MIN (1 << 14)
  ------------------
  |  Branch (4461:11): [True: 0, False: 0]
  ------------------
 4462|      0|          entry->value > NGHTTP2_MAX_FRAME_SIZE_MAX) {
  ------------------
  |  |   42|      0|#define NGHTTP2_MAX_FRAME_SIZE_MAX ((1 << 24) - 1)
  ------------------
  |  Branch (4462:11): [True: 0, False: 0]
  ------------------
 4463|      0|        return session_handle_invalid_connection(
 4464|      0|          session, frame, NGHTTP2_ERR_PROTO,
 4465|      0|          "SETTINGS: invalid SETTINGS_MAX_FRAME_SIZE");
 4466|      0|      }
 4467|       |
 4468|      0|      session->remote_settings.max_frame_size = entry->value;
 4469|       |
 4470|      0|      break;
 4471|      0|    case NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE:
  ------------------
  |  Branch (4471:5): [True: 0, False: 0]
  ------------------
 4472|       |
 4473|      0|      session->remote_settings.max_header_list_size = entry->value;
 4474|       |
 4475|      0|      break;
 4476|      0|    case NGHTTP2_SETTINGS_ENABLE_CONNECT_PROTOCOL:
  ------------------
  |  Branch (4476:5): [True: 0, False: 0]
  ------------------
 4477|       |
 4478|      0|      if (entry->value != 0 && entry->value != 1) {
  ------------------
  |  Branch (4478:11): [True: 0, False: 0]
  |  Branch (4478:32): [True: 0, False: 0]
  ------------------
 4479|      0|        return session_handle_invalid_connection(
 4480|      0|          session, frame, NGHTTP2_ERR_PROTO,
 4481|      0|          "SETTINGS: invalid SETTINGS_ENABLE_CONNECT_PROTOCOL");
 4482|      0|      }
 4483|       |
 4484|      0|      if (!session->server &&
  ------------------
  |  Branch (4484:11): [True: 0, False: 0]
  ------------------
 4485|      0|          session->remote_settings.enable_connect_protocol &&
  ------------------
  |  Branch (4485:11): [True: 0, False: 0]
  ------------------
 4486|      0|          entry->value == 0) {
  ------------------
  |  Branch (4486:11): [True: 0, False: 0]
  ------------------
 4487|      0|        return session_handle_invalid_connection(
 4488|      0|          session, frame, NGHTTP2_ERR_PROTO,
 4489|      0|          "SETTINGS: server attempted to disable "
 4490|      0|          "SETTINGS_ENABLE_CONNECT_PROTOCOL");
 4491|      0|      }
 4492|       |
 4493|      0|      session->remote_settings.enable_connect_protocol = entry->value;
 4494|       |
 4495|      0|      break;
 4496|      0|    case NGHTTP2_SETTINGS_NO_RFC7540_PRIORITIES:
  ------------------
  |  Branch (4496:5): [True: 0, False: 0]
  ------------------
 4497|       |
 4498|      0|      if (entry->value != 0 && entry->value != 1) {
  ------------------
  |  Branch (4498:11): [True: 0, False: 0]
  |  Branch (4498:32): [True: 0, False: 0]
  ------------------
 4499|      0|        return session_handle_invalid_connection(
 4500|      0|          session, frame, NGHTTP2_ERR_PROTO,
 4501|      0|          "SETTINGS: invalid SETTINGS_NO_RFC7540_PRIORITIES");
 4502|      0|      }
 4503|       |
 4504|      0|      if (session->remote_settings.no_rfc7540_priorities != UINT32_MAX &&
  ------------------
  |  Branch (4504:11): [True: 0, False: 0]
  ------------------
 4505|      0|          session->remote_settings.no_rfc7540_priorities != entry->value) {
  ------------------
  |  Branch (4505:11): [True: 0, False: 0]
  ------------------
 4506|      0|        return session_handle_invalid_connection(
 4507|      0|          session, frame, NGHTTP2_ERR_PROTO,
 4508|      0|          "SETTINGS: SETTINGS_NO_RFC7540_PRIORITIES cannot be changed");
 4509|      0|      }
 4510|       |
 4511|      0|      session->remote_settings.no_rfc7540_priorities = entry->value;
 4512|       |
 4513|      0|      break;
 4514|      0|    }
 4515|      0|  }
 4516|       |
 4517|      1|  if (session->remote_settings.no_rfc7540_priorities == UINT32_MAX) {
  ------------------
  |  Branch (4517:7): [True: 1, False: 0]
  ------------------
 4518|      1|    session->remote_settings.no_rfc7540_priorities = 0;
 4519|      1|  }
 4520|       |
 4521|      1|  if (!noack && !session_is_closing(session)) {
  ------------------
  |  Branch (4521:7): [True: 1, False: 0]
  |  Branch (4521:17): [True: 1, False: 0]
  ------------------
 4522|      1|    rv = nghttp2_session_add_settings(session, NGHTTP2_FLAG_ACK, NULL, 0);
 4523|       |
 4524|      1|    if (rv != 0) {
  ------------------
  |  Branch (4524:9): [True: 0, False: 1]
  ------------------
 4525|      0|      if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (4525:11): [True: 0, False: 0]
  ------------------
 4526|      0|        return rv;
 4527|      0|      }
 4528|       |
 4529|      0|      return session_handle_invalid_connection(session, frame,
 4530|      0|                                               NGHTTP2_ERR_INTERNAL, NULL);
 4531|      0|    }
 4532|      1|  }
 4533|       |
 4534|      1|  return session_call_on_frame_received(session, frame);
 4535|      1|}
nghttp2_session_mem_recv:
 5422|      1|                                 size_t inlen) {
 5423|      1|  return (ssize_t)nghttp2_session_mem_recv2(session, in, inlen);
 5424|      1|}
nghttp2_session_mem_recv2:
 5427|      1|                                        const uint8_t *in, size_t inlen) {
 5428|      1|  const uint8_t *first, *last;
 5429|      1|  nghttp2_inbound_frame *iframe = &session->iframe;
 5430|      1|  size_t readlen;
 5431|      1|  nghttp2_ssize padlen;
 5432|      1|  int rv;
 5433|      1|  int busy = 0;
 5434|      1|  nghttp2_frame_hd cont_hd;
 5435|      1|  nghttp2_stream *stream;
 5436|      1|  size_t pri_fieldlen;
 5437|      1|  nghttp2_mem *mem;
 5438|       |
 5439|      1|  if (in == NULL) {
  ------------------
  |  Branch (5439:7): [True: 0, False: 1]
  ------------------
 5440|      0|    assert(inlen == 0);
  ------------------
  |  Branch (5440:5): [True: 0, False: 0]
  |  Branch (5440:5): [True: 0, False: 0]
  ------------------
 5441|      0|    in = static_in;
 5442|      0|  }
 5443|       |
 5444|      1|  first = in;
 5445|      1|  last = in + inlen;
 5446|       |
 5447|      1|  DEBUGF("recv: connection recv_window_size=%d, local_window=%d\n",
  ------------------
  |  |   39|      1|    do {                                                                       \
  |  |   40|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
 5448|      1|         session->recv_window_size, session->local_window_size);
 5449|       |
 5450|      1|  mem = &session->mem;
 5451|       |
 5452|      1|  if (!nghttp2_session_want_read(session)) {
  ------------------
  |  Branch (5452:7): [True: 0, False: 1]
  ------------------
 5453|      0|    return (nghttp2_ssize)inlen;
 5454|      0|  }
 5455|       |
 5456|      6|  for (;;) {
 5457|      6|    switch (iframe->state) {
  ------------------
  |  Branch (5457:13): [True: 6, False: 0]
  ------------------
 5458|      0|    case NGHTTP2_IB_READ_CLIENT_MAGIC:
  ------------------
  |  Branch (5458:5): [True: 0, False: 6]
  ------------------
 5459|      0|      readlen = nghttp2_min_size(inlen, iframe->payloadleft);
 5460|       |
 5461|      0|      if (memcmp(&NGHTTP2_CLIENT_MAGIC[NGHTTP2_CLIENT_MAGIC_LEN -
  ------------------
  |  |  252|      0|#define NGHTTP2_CLIENT_MAGIC "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"
  ------------------
                    if (memcmp(&NGHTTP2_CLIENT_MAGIC[NGHTTP2_CLIENT_MAGIC_LEN -
  ------------------
  |  |  259|      0|#define NGHTTP2_CLIENT_MAGIC_LEN 24
  ------------------
  |  Branch (5461:11): [True: 0, False: 0]
  ------------------
 5462|      0|                                       iframe->payloadleft],
 5463|      0|                 in, readlen) != 0) {
 5464|      0|        return NGHTTP2_ERR_BAD_CLIENT_MAGIC;
 5465|      0|      }
 5466|       |
 5467|      0|      iframe->payloadleft -= readlen;
 5468|      0|      in += readlen;
 5469|       |
 5470|      0|      if (iframe->payloadleft == 0) {
  ------------------
  |  Branch (5470:11): [True: 0, False: 0]
  ------------------
 5471|      0|        session_inbound_frame_reset(session);
 5472|      0|        iframe->state = NGHTTP2_IB_READ_FIRST_SETTINGS;
 5473|      0|      }
 5474|       |
 5475|      0|      break;
 5476|      1|    case NGHTTP2_IB_READ_FIRST_SETTINGS:
  ------------------
  |  Branch (5476:5): [True: 1, False: 5]
  ------------------
 5477|      1|      DEBUGF("recv: [IB_READ_FIRST_SETTINGS]\n");
  ------------------
  |  |   39|      1|    do {                                                                       \
  |  |   40|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
 5478|       |
 5479|      1|      readlen = inbound_frame_buf_read(iframe, in, last);
 5480|      1|      in += readlen;
 5481|       |
 5482|      1|      if (nghttp2_buf_mark_avail(&iframe->sbuf)) {
  ------------------
  |  |   56|      1|#define nghttp2_buf_mark_avail(BUF) ((size_t)((BUF)->mark - (BUF)->last))
  |  |  ------------------
  |  |  |  Branch (56:37): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 5483|      0|        return (nghttp2_ssize)(in - first);
 5484|      0|      }
 5485|       |
 5486|      1|      if (iframe->sbuf.pos[3] != NGHTTP2_SETTINGS ||
  ------------------
  |  Branch (5486:11): [True: 0, False: 1]
  ------------------
 5487|      1|          (iframe->sbuf.pos[4] & NGHTTP2_FLAG_ACK)) {
  ------------------
  |  Branch (5487:11): [True: 0, False: 1]
  ------------------
 5488|      0|        rv = session_call_error_callback(
 5489|      0|          session, NGHTTP2_ERR_SETTINGS_EXPECTED,
 5490|      0|          "Remote peer returned unexpected data while we expected "
 5491|      0|          "SETTINGS frame.  Perhaps, peer does not support HTTP/2 "
 5492|      0|          "properly.");
 5493|       |
 5494|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (5494:13): [True: 0, False: 0]
  ------------------
 5495|      0|          return rv;
 5496|      0|        }
 5497|       |
 5498|      0|        rv = nghttp2_session_terminate_session_with_reason(
 5499|      0|          session, NGHTTP2_PROTOCOL_ERROR, "SETTINGS expected");
 5500|       |
 5501|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (5501:13): [True: 0, False: 0]
  ------------------
 5502|      0|          return rv;
 5503|      0|        }
 5504|       |
 5505|      0|        return (nghttp2_ssize)inlen;
 5506|      0|      }
 5507|       |
 5508|      1|      iframe->state = NGHTTP2_IB_READ_HEAD;
 5509|       |
 5510|       |    /* Fall through */
 5511|      3|    case NGHTTP2_IB_READ_HEAD: {
  ------------------
  |  Branch (5511:5): [True: 2, False: 4]
  ------------------
 5512|      3|      int on_begin_frame_called = 0;
 5513|       |
 5514|      3|      DEBUGF("recv: [IB_READ_HEAD]\n");
  ------------------
  |  |   39|      3|    do {                                                                       \
  |  |   40|      3|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 3]
  |  |  ------------------
  ------------------
 5515|       |
 5516|      3|      readlen = inbound_frame_buf_read(iframe, in, last);
 5517|      3|      in += readlen;
 5518|       |
 5519|      3|      if (nghttp2_buf_mark_avail(&iframe->sbuf)) {
  ------------------
  |  |   56|      3|#define nghttp2_buf_mark_avail(BUF) ((size_t)((BUF)->mark - (BUF)->last))
  |  |  ------------------
  |  |  |  Branch (56:37): [True: 0, False: 3]
  |  |  ------------------
  ------------------
 5520|      0|        return (nghttp2_ssize)(in - first);
 5521|      0|      }
 5522|       |
 5523|      3|      nghttp2_frame_unpack_frame_hd(&iframe->frame.hd, iframe->sbuf.pos);
 5524|      3|      iframe->payloadleft = iframe->frame.hd.length;
 5525|       |
 5526|      3|      DEBUGF("recv: payloadlen=%zu, type=%u, flags=0x%02x, stream_id=%d\n",
  ------------------
  |  |   39|      3|    do {                                                                       \
  |  |   40|      3|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 3]
  |  |  ------------------
  ------------------
 5527|      3|             iframe->frame.hd.length, iframe->frame.hd.type,
 5528|      3|             iframe->frame.hd.flags, iframe->frame.hd.stream_id);
 5529|       |
 5530|      3|      if (iframe->frame.hd.length > session->local_settings.max_frame_size) {
  ------------------
  |  Branch (5530:11): [True: 0, False: 3]
  ------------------
 5531|      0|        DEBUGF("recv: length is too large %zu > %u\n", iframe->frame.hd.length,
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 5532|      0|               session->local_settings.max_frame_size);
 5533|       |
 5534|      0|        rv = nghttp2_session_terminate_session_with_reason(
 5535|      0|          session, NGHTTP2_FRAME_SIZE_ERROR, "too large frame size");
 5536|       |
 5537|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (5537:13): [True: 0, False: 0]
  ------------------
 5538|      0|          return rv;
 5539|      0|        }
 5540|       |
 5541|      0|        return (nghttp2_ssize)inlen;
 5542|      0|      }
 5543|       |
 5544|      3|      switch (iframe->frame.hd.type) {
 5545|      0|      case NGHTTP2_DATA: {
  ------------------
  |  Branch (5545:7): [True: 0, False: 3]
  ------------------
 5546|      0|        DEBUGF("recv: DATA\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 5547|       |
 5548|      0|        iframe->frame.hd.flags &=
 5549|      0|          (NGHTTP2_FLAG_END_STREAM | NGHTTP2_FLAG_PADDED);
 5550|       |        /* Check stream is open. If it is not open or closing,
 5551|       |           ignore payload. */
 5552|      0|        busy = 1;
 5553|       |
 5554|      0|        rv = session_on_data_received_fail_fast(session);
 5555|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (5555:13): [True: 0, False: 0]
  ------------------
 5556|      0|          return rv;
 5557|      0|        }
 5558|       |
 5559|      0|        if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (5559:13): [True: 0, False: 0]
  ------------------
 5560|      0|          return (nghttp2_ssize)inlen;
 5561|      0|        }
 5562|      0|        if (rv == NGHTTP2_ERR_IGN_PAYLOAD) {
  ------------------
  |  Branch (5562:13): [True: 0, False: 0]
  ------------------
 5563|      0|          DEBUGF("recv: DATA not allowed stream_id=%d\n",
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 5564|      0|                 iframe->frame.hd.stream_id);
 5565|       |
 5566|      0|          iframe->state = NGHTTP2_IB_IGN_DATA;
 5567|      0|          break;
 5568|      0|        }
 5569|       |
 5570|      0|        rv = inbound_frame_handle_pad(iframe, &iframe->frame.hd);
 5571|      0|        if (rv < 0) {
  ------------------
  |  Branch (5571:13): [True: 0, False: 0]
  ------------------
 5572|      0|          rv = nghttp2_session_terminate_session_with_reason(
 5573|      0|            session, NGHTTP2_PROTOCOL_ERROR,
 5574|      0|            "DATA: insufficient padding space");
 5575|       |
 5576|      0|          if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (5576:15): [True: 0, False: 0]
  ------------------
 5577|      0|            return rv;
 5578|      0|          }
 5579|      0|          return (nghttp2_ssize)inlen;
 5580|      0|        }
 5581|       |
 5582|      0|        if (rv == 1) {
  ------------------
  |  Branch (5582:13): [True: 0, False: 0]
  ------------------
 5583|      0|          iframe->state = NGHTTP2_IB_READ_PAD_DATA;
 5584|      0|          break;
 5585|      0|        }
 5586|       |
 5587|       |        /* Empty DATA frame without END_STREAM flag set is
 5588|       |           suspicious. */
 5589|      0|        if (iframe->payloadleft == 0 &&
  ------------------
  |  Branch (5589:13): [True: 0, False: 0]
  ------------------
 5590|      0|            (iframe->frame.hd.flags & NGHTTP2_FLAG_END_STREAM) == 0) {
  ------------------
  |  Branch (5590:13): [True: 0, False: 0]
  ------------------
 5591|      0|          rv = session_update_glitch_ratelim(session);
 5592|      0|          if (rv != 0) {
  ------------------
  |  Branch (5592:15): [True: 0, False: 0]
  ------------------
 5593|      0|            return rv;
 5594|      0|          }
 5595|       |
 5596|      0|          if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (5596:15): [True: 0, False: 0]
  ------------------
 5597|      0|            return (nghttp2_ssize)inlen;
 5598|      0|          }
 5599|      0|        }
 5600|       |
 5601|      0|        iframe->state = NGHTTP2_IB_READ_DATA;
 5602|      0|        break;
 5603|      0|      }
 5604|      1|      case NGHTTP2_HEADERS:
  ------------------
  |  Branch (5604:7): [True: 1, False: 2]
  ------------------
 5605|       |
 5606|      1|        DEBUGF("recv: HEADERS\n");
  ------------------
  |  |   39|      1|    do {                                                                       \
  |  |   40|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
 5607|       |
 5608|      1|        iframe->frame.hd.flags &=
 5609|      1|          (NGHTTP2_FLAG_END_STREAM | NGHTTP2_FLAG_END_HEADERS |
 5610|      1|           NGHTTP2_FLAG_PADDED | NGHTTP2_FLAG_PRIORITY);
 5611|       |
 5612|      1|        rv = inbound_frame_handle_pad(iframe, &iframe->frame.hd);
 5613|      1|        if (rv < 0) {
  ------------------
  |  Branch (5613:13): [True: 0, False: 1]
  ------------------
 5614|      0|          rv = nghttp2_session_terminate_session_with_reason(
 5615|      0|            session, NGHTTP2_PROTOCOL_ERROR,
 5616|      0|            "HEADERS: insufficient padding space");
 5617|      0|          if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (5617:15): [True: 0, False: 0]
  ------------------
 5618|      0|            return rv;
 5619|      0|          }
 5620|      0|          return (nghttp2_ssize)inlen;
 5621|      0|        }
 5622|       |
 5623|      1|        if (rv == 1) {
  ------------------
  |  Branch (5623:13): [True: 0, False: 1]
  ------------------
 5624|      0|          iframe->state = NGHTTP2_IB_READ_NBYTE;
 5625|      0|          break;
 5626|      0|        }
 5627|       |
 5628|      1|        pri_fieldlen = nghttp2_frame_priority_len(iframe->frame.hd.flags);
 5629|       |
 5630|      1|        if (pri_fieldlen > 0) {
  ------------------
  |  Branch (5630:13): [True: 0, False: 1]
  ------------------
 5631|      0|          if (iframe->payloadleft < pri_fieldlen) {
  ------------------
  |  Branch (5631:15): [True: 0, False: 0]
  ------------------
 5632|      0|            busy = 1;
 5633|      0|            iframe->state = NGHTTP2_IB_FRAME_SIZE_ERROR;
 5634|      0|            break;
 5635|      0|          }
 5636|       |
 5637|      0|          iframe->state = NGHTTP2_IB_READ_NBYTE;
 5638|       |
 5639|      0|          inbound_frame_set_mark(iframe, pri_fieldlen);
 5640|       |
 5641|      0|          break;
 5642|      0|        }
 5643|       |
 5644|       |        /* Call on_begin_frame_callback here because
 5645|       |           session_process_headers_frame() may call
 5646|       |           on_begin_headers_callback */
 5647|      1|        rv = session_call_on_begin_frame(session, &iframe->frame.hd);
 5648|       |
 5649|      1|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (5649:13): [True: 0, False: 1]
  ------------------
 5650|      0|          return rv;
 5651|      0|        }
 5652|       |
 5653|      1|        if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (5653:13): [True: 0, False: 1]
  ------------------
 5654|      0|          return (nghttp2_ssize)inlen;
 5655|      0|        }
 5656|       |
 5657|      1|        on_begin_frame_called = 1;
 5658|       |
 5659|      1|        rv = session_process_headers_frame(session);
 5660|      1|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (5660:13): [True: 0, False: 1]
  ------------------
 5661|      0|          return rv;
 5662|      0|        }
 5663|       |
 5664|      1|        busy = 1;
 5665|       |
 5666|      1|        if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (5666:13): [True: 0, False: 1]
  ------------------
 5667|      0|          return (nghttp2_ssize)inlen;
 5668|      0|        }
 5669|       |
 5670|      1|        if (rv == NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE) {
  ------------------
  |  Branch (5670:13): [True: 0, False: 1]
  ------------------
 5671|      0|          rv = session_handle_invalid_stream2(
 5672|      0|            session, iframe->frame.hd.stream_id, NULL, NGHTTP2_ERR_INTERNAL);
 5673|      0|          if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (5673:15): [True: 0, False: 0]
  ------------------
 5674|      0|            return rv;
 5675|      0|          }
 5676|      0|          iframe->state = NGHTTP2_IB_IGN_HEADER_BLOCK;
 5677|      0|          break;
 5678|      0|        }
 5679|       |
 5680|      1|        if (rv == NGHTTP2_ERR_IGN_HEADER_BLOCK) {
  ------------------
  |  Branch (5680:13): [True: 0, False: 1]
  ------------------
 5681|      0|          rv = session_update_glitch_ratelim(session);
 5682|      0|          if (rv != 0) {
  ------------------
  |  Branch (5682:15): [True: 0, False: 0]
  ------------------
 5683|      0|            return rv;
 5684|      0|          }
 5685|       |
 5686|      0|          if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (5686:15): [True: 0, False: 0]
  ------------------
 5687|      0|            return (nghttp2_ssize)inlen;
 5688|      0|          }
 5689|       |
 5690|      0|          iframe->state = NGHTTP2_IB_IGN_HEADER_BLOCK;
 5691|      0|          break;
 5692|      0|        }
 5693|       |
 5694|      1|        iframe->state = NGHTTP2_IB_READ_HEADER_BLOCK;
 5695|       |
 5696|      1|        break;
 5697|      0|      case NGHTTP2_PRIORITY:
  ------------------
  |  Branch (5697:7): [True: 0, False: 3]
  ------------------
 5698|      0|        DEBUGF("recv: PRIORITY\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 5699|       |
 5700|      0|        iframe->frame.hd.flags = NGHTTP2_FLAG_NONE;
 5701|       |
 5702|      0|        if (iframe->payloadleft != NGHTTP2_PRIORITY_SPECLEN) {
  ------------------
  |  |   64|      0|#define NGHTTP2_PRIORITY_SPECLEN 5
  ------------------
  |  Branch (5702:13): [True: 0, False: 0]
  ------------------
 5703|      0|          busy = 1;
 5704|       |
 5705|      0|          iframe->state = NGHTTP2_IB_FRAME_SIZE_ERROR;
 5706|       |
 5707|      0|          break;
 5708|      0|        }
 5709|       |
 5710|       |        /* This is deprecated RFC 7540 priorities mechanism which is
 5711|       |           very unpopular.  We do not expect it is received so
 5712|       |           frequently. */
 5713|      0|        rv = session_update_glitch_ratelim(session);
 5714|      0|        if (rv != 0) {
  ------------------
  |  Branch (5714:13): [True: 0, False: 0]
  ------------------
 5715|      0|          return rv;
 5716|      0|        }
 5717|       |
 5718|      0|        if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (5718:13): [True: 0, False: 0]
  ------------------
 5719|      0|          return (nghttp2_ssize)inlen;
 5720|      0|        }
 5721|       |
 5722|      0|        iframe->state = NGHTTP2_IB_READ_NBYTE;
 5723|       |
 5724|      0|        inbound_frame_set_mark(iframe, NGHTTP2_PRIORITY_SPECLEN);
  ------------------
  |  |   64|      0|#define NGHTTP2_PRIORITY_SPECLEN 5
  ------------------
 5725|       |
 5726|      0|        break;
 5727|      0|      case NGHTTP2_RST_STREAM:
  ------------------
  |  Branch (5727:7): [True: 0, False: 3]
  ------------------
 5728|      0|      case NGHTTP2_WINDOW_UPDATE:
  ------------------
  |  Branch (5728:7): [True: 0, False: 3]
  ------------------
 5729|       |#ifdef DEBUGBUILD
 5730|       |        switch (iframe->frame.hd.type) {
 5731|       |        case NGHTTP2_RST_STREAM:
 5732|       |          DEBUGF("recv: RST_STREAM\n");
 5733|       |          break;
 5734|       |        case NGHTTP2_WINDOW_UPDATE:
 5735|       |          DEBUGF("recv: WINDOW_UPDATE\n");
 5736|       |          break;
 5737|       |        }
 5738|       |#endif /* defined(DEBUGBUILD) */
 5739|       |
 5740|      0|        iframe->frame.hd.flags = NGHTTP2_FLAG_NONE;
 5741|       |
 5742|      0|        if (iframe->payloadleft != 4) {
  ------------------
  |  Branch (5742:13): [True: 0, False: 0]
  ------------------
 5743|      0|          busy = 1;
 5744|      0|          iframe->state = NGHTTP2_IB_FRAME_SIZE_ERROR;
 5745|      0|          break;
 5746|      0|        }
 5747|       |
 5748|      0|        iframe->state = NGHTTP2_IB_READ_NBYTE;
 5749|       |
 5750|      0|        inbound_frame_set_mark(iframe, 4);
 5751|       |
 5752|      0|        break;
 5753|      2|      case NGHTTP2_SETTINGS:
  ------------------
  |  Branch (5753:7): [True: 2, False: 1]
  ------------------
 5754|      2|        DEBUGF("recv: SETTINGS\n");
  ------------------
  |  |   39|      2|    do {                                                                       \
  |  |   40|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 5755|       |
 5756|      2|        iframe->frame.hd.flags &= NGHTTP2_FLAG_ACK;
 5757|       |
 5758|      2|        if ((iframe->frame.hd.length % NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH) ||
  ------------------
  |  |   61|      2|#define NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH 6
  ------------------
  |  Branch (5758:13): [True: 0, False: 2]
  ------------------
 5759|      2|            ((iframe->frame.hd.flags & NGHTTP2_FLAG_ACK) &&
  ------------------
  |  Branch (5759:14): [True: 1, False: 1]
  ------------------
 5760|      1|             iframe->payloadleft > 0)) {
  ------------------
  |  Branch (5760:14): [True: 0, False: 1]
  ------------------
 5761|      0|          busy = 1;
 5762|      0|          iframe->state = NGHTTP2_IB_FRAME_SIZE_ERROR;
 5763|      0|          break;
 5764|      0|        }
 5765|       |
 5766|       |        /* Check the settings flood counter early to be safe */
 5767|      2|        if (session->obq_flood_counter_ >= session->max_outbound_ack &&
  ------------------
  |  Branch (5767:13): [True: 0, False: 2]
  ------------------
 5768|      0|            !(iframe->frame.hd.flags & NGHTTP2_FLAG_ACK)) {
  ------------------
  |  Branch (5768:13): [True: 0, False: 0]
  ------------------
 5769|      0|          return NGHTTP2_ERR_FLOODED;
 5770|      0|        }
 5771|       |
 5772|      2|        iframe->state = NGHTTP2_IB_READ_SETTINGS;
 5773|       |
 5774|      2|        if (iframe->payloadleft) {
  ------------------
  |  Branch (5774:13): [True: 0, False: 2]
  ------------------
 5775|      0|          nghttp2_settings_entry *min_header_table_size_entry;
 5776|       |
 5777|       |          /* We allocate iv with additional one entry, to store the
 5778|       |             minimum header table size. */
 5779|      0|          iframe->max_niv =
 5780|      0|            iframe->frame.hd.length / NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH + 1;
  ------------------
  |  |   61|      0|#define NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH 6
  ------------------
 5781|       |
 5782|      0|          if (iframe->max_niv - 1 > session->max_settings) {
  ------------------
  |  Branch (5782:15): [True: 0, False: 0]
  ------------------
 5783|      0|            rv = nghttp2_session_terminate_session_with_reason(
 5784|      0|              session, NGHTTP2_ENHANCE_YOUR_CALM,
 5785|      0|              "SETTINGS: too many setting entries");
 5786|      0|            if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (5786:17): [True: 0, False: 0]
  ------------------
 5787|      0|              return rv;
 5788|      0|            }
 5789|      0|            return (nghttp2_ssize)inlen;
 5790|      0|          }
 5791|       |
 5792|      0|          iframe->iv = nghttp2_mem_malloc(mem, sizeof(nghttp2_settings_entry) *
 5793|      0|                                                 iframe->max_niv);
 5794|       |
 5795|      0|          if (!iframe->iv) {
  ------------------
  |  Branch (5795:15): [True: 0, False: 0]
  ------------------
 5796|      0|            return NGHTTP2_ERR_NOMEM;
 5797|      0|          }
 5798|       |
 5799|      0|          min_header_table_size_entry = &iframe->iv[iframe->max_niv - 1];
 5800|      0|          min_header_table_size_entry->settings_id =
 5801|      0|            NGHTTP2_SETTINGS_HEADER_TABLE_SIZE;
 5802|      0|          min_header_table_size_entry->value = UINT32_MAX;
 5803|       |
 5804|      0|          inbound_frame_set_mark(iframe, NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH);
  ------------------
  |  |   61|      0|#define NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH 6
  ------------------
 5805|      0|          break;
 5806|      0|        }
 5807|       |
 5808|      2|        busy = 1;
 5809|       |
 5810|      2|        inbound_frame_set_mark(iframe, 0);
 5811|       |
 5812|      2|        break;
 5813|      0|      case NGHTTP2_PUSH_PROMISE:
  ------------------
  |  Branch (5813:7): [True: 0, False: 3]
  ------------------
 5814|      0|        DEBUGF("recv: PUSH_PROMISE\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 5815|       |
 5816|      0|        iframe->frame.hd.flags &=
 5817|      0|          (NGHTTP2_FLAG_END_HEADERS | NGHTTP2_FLAG_PADDED);
 5818|       |
 5819|      0|        rv = inbound_frame_handle_pad(iframe, &iframe->frame.hd);
 5820|      0|        if (rv < 0) {
  ------------------
  |  Branch (5820:13): [True: 0, False: 0]
  ------------------
 5821|      0|          rv = nghttp2_session_terminate_session_with_reason(
 5822|      0|            session, NGHTTP2_PROTOCOL_ERROR,
 5823|      0|            "PUSH_PROMISE: insufficient padding space");
 5824|      0|          if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (5824:15): [True: 0, False: 0]
  ------------------
 5825|      0|            return rv;
 5826|      0|          }
 5827|      0|          return (nghttp2_ssize)inlen;
 5828|      0|        }
 5829|       |
 5830|      0|        if (rv == 1) {
  ------------------
  |  Branch (5830:13): [True: 0, False: 0]
  ------------------
 5831|      0|          iframe->state = NGHTTP2_IB_READ_NBYTE;
 5832|      0|          break;
 5833|      0|        }
 5834|       |
 5835|      0|        if (iframe->payloadleft < 4) {
  ------------------
  |  Branch (5835:13): [True: 0, False: 0]
  ------------------
 5836|      0|          busy = 1;
 5837|      0|          iframe->state = NGHTTP2_IB_FRAME_SIZE_ERROR;
 5838|      0|          break;
 5839|      0|        }
 5840|       |
 5841|      0|        iframe->state = NGHTTP2_IB_READ_NBYTE;
 5842|       |
 5843|      0|        inbound_frame_set_mark(iframe, 4);
 5844|       |
 5845|      0|        break;
 5846|      0|      case NGHTTP2_PING:
  ------------------
  |  Branch (5846:7): [True: 0, False: 3]
  ------------------
 5847|      0|        DEBUGF("recv: PING\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 5848|       |
 5849|      0|        iframe->frame.hd.flags &= NGHTTP2_FLAG_ACK;
 5850|       |
 5851|      0|        if (iframe->payloadleft != 8) {
  ------------------
  |  Branch (5851:13): [True: 0, False: 0]
  ------------------
 5852|      0|          busy = 1;
 5853|      0|          iframe->state = NGHTTP2_IB_FRAME_SIZE_ERROR;
 5854|      0|          break;
 5855|      0|        }
 5856|       |
 5857|      0|        iframe->state = NGHTTP2_IB_READ_NBYTE;
 5858|      0|        inbound_frame_set_mark(iframe, 8);
 5859|       |
 5860|      0|        break;
 5861|      0|      case NGHTTP2_GOAWAY:
  ------------------
  |  Branch (5861:7): [True: 0, False: 3]
  ------------------
 5862|      0|        DEBUGF("recv: GOAWAY\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 5863|       |
 5864|      0|        iframe->frame.hd.flags = NGHTTP2_FLAG_NONE;
 5865|       |
 5866|      0|        if (iframe->payloadleft < 8) {
  ------------------
  |  Branch (5866:13): [True: 0, False: 0]
  ------------------
 5867|      0|          busy = 1;
 5868|      0|          iframe->state = NGHTTP2_IB_FRAME_SIZE_ERROR;
 5869|      0|          break;
 5870|      0|        }
 5871|       |
 5872|      0|        iframe->state = NGHTTP2_IB_READ_NBYTE;
 5873|      0|        inbound_frame_set_mark(iframe, 8);
 5874|       |
 5875|      0|        break;
 5876|      0|      case NGHTTP2_CONTINUATION:
  ------------------
  |  Branch (5876:7): [True: 0, False: 3]
  ------------------
 5877|      0|        DEBUGF("recv: unexpected CONTINUATION\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 5878|       |
 5879|       |        /* Receiving CONTINUATION in this state are subject to
 5880|       |           connection error of type PROTOCOL_ERROR */
 5881|      0|        rv = nghttp2_session_terminate_session_with_reason(
 5882|      0|          session, NGHTTP2_PROTOCOL_ERROR, "CONTINUATION: unexpected");
 5883|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (5883:13): [True: 0, False: 0]
  ------------------
 5884|      0|          return rv;
 5885|      0|        }
 5886|       |
 5887|      0|        return (nghttp2_ssize)inlen;
 5888|      0|      default:
  ------------------
  |  Branch (5888:7): [True: 0, False: 3]
  ------------------
 5889|      0|        DEBUGF("recv: extension frame\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 5890|       |
 5891|      0|        if (check_ext_type_set(session->user_recv_ext_types,
  ------------------
  |  Branch (5891:13): [True: 0, False: 0]
  ------------------
 5892|      0|                               iframe->frame.hd.type)) {
 5893|      0|          if (!session->callbacks.unpack_extension_callback) {
  ------------------
  |  Branch (5893:15): [True: 0, False: 0]
  ------------------
 5894|       |            /* Receiving too frequent unknown frames is suspicious. */
 5895|      0|            rv = session_update_glitch_ratelim(session);
 5896|      0|            if (rv != 0) {
  ------------------
  |  Branch (5896:17): [True: 0, False: 0]
  ------------------
 5897|      0|              return rv;
 5898|      0|            }
 5899|       |
 5900|      0|            if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (5900:17): [True: 0, False: 0]
  ------------------
 5901|      0|              return (nghttp2_ssize)inlen;
 5902|      0|            }
 5903|       |
 5904|       |            /* Silently ignore unknown frame type. */
 5905|      0|            busy = 1;
 5906|       |
 5907|      0|            iframe->state = NGHTTP2_IB_IGN_PAYLOAD;
 5908|       |
 5909|      0|            break;
 5910|      0|          }
 5911|       |
 5912|      0|          busy = 1;
 5913|       |
 5914|      0|          iframe->state = NGHTTP2_IB_READ_EXTENSION_PAYLOAD;
 5915|       |
 5916|      0|          break;
 5917|      0|        } else {
 5918|      0|          switch (iframe->frame.hd.type) {
 5919|      0|          case NGHTTP2_ALTSVC:
  ------------------
  |  Branch (5919:11): [True: 0, False: 0]
  ------------------
 5920|      0|            if ((session->builtin_recv_ext_types & NGHTTP2_TYPEMASK_ALTSVC) ==
  ------------------
  |  |   64|      0|#define NGHTTP2_TYPEMASK_ALTSVC 0x01U
  ------------------
  |  Branch (5920:17): [True: 0, False: 0]
  ------------------
 5921|      0|                0) {
 5922|       |              /* Receiving too frequent unknown frames is suspicious. */
 5923|      0|              rv = session_update_glitch_ratelim(session);
 5924|      0|              if (rv != 0) {
  ------------------
  |  Branch (5924:19): [True: 0, False: 0]
  ------------------
 5925|      0|                return rv;
 5926|      0|              }
 5927|       |
 5928|      0|              if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (5928:19): [True: 0, False: 0]
  ------------------
 5929|      0|                return (nghttp2_ssize)inlen;
 5930|      0|              }
 5931|       |
 5932|      0|              busy = 1;
 5933|      0|              iframe->state = NGHTTP2_IB_IGN_PAYLOAD;
 5934|      0|              break;
 5935|      0|            }
 5936|       |
 5937|      0|            DEBUGF("recv: ALTSVC\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 5938|       |
 5939|      0|            iframe->frame.hd.flags = NGHTTP2_FLAG_NONE;
 5940|      0|            iframe->frame.ext.payload = &iframe->ext_frame_payload.altsvc;
 5941|       |
 5942|      0|            if (session->server) {
  ------------------
  |  Branch (5942:17): [True: 0, False: 0]
  ------------------
 5943|       |              /* Receiving too frequent ALTSVC from client is
 5944|       |                 suspicious. */
 5945|      0|              rv = session_update_glitch_ratelim(session);
 5946|      0|              if (rv != 0) {
  ------------------
  |  Branch (5946:19): [True: 0, False: 0]
  ------------------
 5947|      0|                return rv;
 5948|      0|              }
 5949|       |
 5950|      0|              if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (5950:19): [True: 0, False: 0]
  ------------------
 5951|      0|                return (nghttp2_ssize)inlen;
 5952|      0|              }
 5953|       |
 5954|      0|              busy = 1;
 5955|      0|              iframe->state = NGHTTP2_IB_IGN_PAYLOAD;
 5956|      0|              break;
 5957|      0|            }
 5958|       |
 5959|      0|            if (iframe->payloadleft < 2) {
  ------------------
  |  Branch (5959:17): [True: 0, False: 0]
  ------------------
 5960|      0|              busy = 1;
 5961|      0|              iframe->state = NGHTTP2_IB_FRAME_SIZE_ERROR;
 5962|      0|              break;
 5963|      0|            }
 5964|       |
 5965|      0|            busy = 1;
 5966|       |
 5967|      0|            iframe->state = NGHTTP2_IB_READ_NBYTE;
 5968|      0|            inbound_frame_set_mark(iframe, 2);
 5969|       |
 5970|      0|            break;
 5971|      0|          case NGHTTP2_ORIGIN:
  ------------------
  |  Branch (5971:11): [True: 0, False: 0]
  ------------------
 5972|      0|            if (!(session->builtin_recv_ext_types & NGHTTP2_TYPEMASK_ORIGIN)) {
  ------------------
  |  |   65|      0|#define NGHTTP2_TYPEMASK_ORIGIN 0x02U
  ------------------
  |  Branch (5972:17): [True: 0, False: 0]
  ------------------
 5973|       |              /* Receiving too frequent unknown frames is suspicious. */
 5974|      0|              rv = session_update_glitch_ratelim(session);
 5975|      0|              if (rv != 0) {
  ------------------
  |  Branch (5975:19): [True: 0, False: 0]
  ------------------
 5976|      0|                return rv;
 5977|      0|              }
 5978|       |
 5979|      0|              if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (5979:19): [True: 0, False: 0]
  ------------------
 5980|      0|                return (nghttp2_ssize)inlen;
 5981|      0|              }
 5982|       |
 5983|      0|              busy = 1;
 5984|      0|              iframe->state = NGHTTP2_IB_IGN_PAYLOAD;
 5985|      0|              break;
 5986|      0|            }
 5987|       |
 5988|      0|            DEBUGF("recv: ORIGIN\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 5989|       |
 5990|      0|            iframe->frame.ext.payload = &iframe->ext_frame_payload.origin;
 5991|       |
 5992|      0|            if (session->server || iframe->frame.hd.stream_id ||
  ------------------
  |  Branch (5992:17): [True: 0, False: 0]
  |  Branch (5992:36): [True: 0, False: 0]
  ------------------
 5993|      0|                (iframe->frame.hd.flags & 0xF0)) {
  ------------------
  |  Branch (5993:17): [True: 0, False: 0]
  ------------------
 5994|       |              /* Receiving too frequent invalid frames is
 5995|       |                 suspicious. */
 5996|      0|              rv = session_update_glitch_ratelim(session);
 5997|      0|              if (rv != 0) {
  ------------------
  |  Branch (5997:19): [True: 0, False: 0]
  ------------------
 5998|      0|                return rv;
 5999|      0|              }
 6000|       |
 6001|      0|              if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6001:19): [True: 0, False: 0]
  ------------------
 6002|      0|                return (nghttp2_ssize)inlen;
 6003|      0|              }
 6004|       |
 6005|      0|              busy = 1;
 6006|      0|              iframe->state = NGHTTP2_IB_IGN_PAYLOAD;
 6007|      0|              break;
 6008|      0|            }
 6009|       |
 6010|      0|            iframe->frame.hd.flags = NGHTTP2_FLAG_NONE;
 6011|       |
 6012|      0|            if (iframe->payloadleft) {
  ------------------
  |  Branch (6012:17): [True: 0, False: 0]
  ------------------
 6013|      0|              iframe->raw_lbuf = nghttp2_mem_malloc(mem, iframe->payloadleft);
 6014|       |
 6015|      0|              if (iframe->raw_lbuf == NULL) {
  ------------------
  |  Branch (6015:19): [True: 0, False: 0]
  ------------------
 6016|      0|                return NGHTTP2_ERR_NOMEM;
 6017|      0|              }
 6018|       |
 6019|      0|              nghttp2_buf_wrap_init(&iframe->lbuf, iframe->raw_lbuf,
 6020|      0|                                    iframe->payloadleft);
 6021|      0|            } else {
 6022|      0|              busy = 1;
 6023|      0|            }
 6024|       |
 6025|      0|            iframe->state = NGHTTP2_IB_READ_ORIGIN_PAYLOAD;
 6026|       |
 6027|      0|            break;
 6028|      0|          case NGHTTP2_PRIORITY_UPDATE:
  ------------------
  |  Branch (6028:11): [True: 0, False: 0]
  ------------------
 6029|      0|            if ((session->builtin_recv_ext_types &
  ------------------
  |  Branch (6029:17): [True: 0, False: 0]
  ------------------
 6030|      0|                 NGHTTP2_TYPEMASK_PRIORITY_UPDATE) == 0) {
  ------------------
  |  |   66|      0|#define NGHTTP2_TYPEMASK_PRIORITY_UPDATE 0x04U
  ------------------
 6031|       |              /* Receiving too frequent unknown frames is suspicious. */
 6032|      0|              rv = session_update_glitch_ratelim(session);
 6033|      0|              if (rv != 0) {
  ------------------
  |  Branch (6033:19): [True: 0, False: 0]
  ------------------
 6034|      0|                return rv;
 6035|      0|              }
 6036|       |
 6037|      0|              if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6037:19): [True: 0, False: 0]
  ------------------
 6038|      0|                return (nghttp2_ssize)inlen;
 6039|      0|              }
 6040|       |
 6041|      0|              busy = 1;
 6042|      0|              iframe->state = NGHTTP2_IB_IGN_PAYLOAD;
 6043|      0|              break;
 6044|      0|            }
 6045|       |
 6046|      0|            DEBUGF("recv: PRIORITY_UPDATE\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6047|       |
 6048|      0|            iframe->frame.hd.flags = NGHTTP2_FLAG_NONE;
 6049|      0|            iframe->frame.ext.payload =
 6050|      0|              &iframe->ext_frame_payload.priority_update;
 6051|       |
 6052|      0|            if (!session->server) {
  ------------------
  |  Branch (6052:17): [True: 0, False: 0]
  ------------------
 6053|      0|              rv = nghttp2_session_terminate_session_with_reason(
 6054|      0|                session, NGHTTP2_PROTOCOL_ERROR,
 6055|      0|                "PRIORITY_UPDATE is received from server");
 6056|      0|              if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6056:19): [True: 0, False: 0]
  ------------------
 6057|      0|                return rv;
 6058|      0|              }
 6059|      0|              return (nghttp2_ssize)inlen;
 6060|      0|            }
 6061|       |
 6062|      0|            if (iframe->payloadleft < 4) {
  ------------------
  |  Branch (6062:17): [True: 0, False: 0]
  ------------------
 6063|      0|              busy = 1;
 6064|      0|              iframe->state = NGHTTP2_IB_FRAME_SIZE_ERROR;
 6065|      0|              break;
 6066|      0|            }
 6067|       |
 6068|       |            /* Receiving too frequent PRIORITY_UPDATE is
 6069|       |               suspicious. */
 6070|      0|            rv = session_update_glitch_ratelim(session);
 6071|      0|            if (rv != 0) {
  ------------------
  |  Branch (6071:17): [True: 0, False: 0]
  ------------------
 6072|      0|              return rv;
 6073|      0|            }
 6074|       |
 6075|      0|            if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6075:17): [True: 0, False: 0]
  ------------------
 6076|      0|              return (nghttp2_ssize)inlen;
 6077|      0|            }
 6078|       |
 6079|      0|            if (iframe->payloadleft > sizeof(iframe->raw_sbuf)) {
  ------------------
  |  Branch (6079:17): [True: 0, False: 0]
  ------------------
 6080|      0|              busy = 1;
 6081|      0|              iframe->state = NGHTTP2_IB_IGN_PAYLOAD;
 6082|      0|              break;
 6083|      0|            }
 6084|       |
 6085|      0|            busy = 1;
 6086|       |
 6087|      0|            iframe->state = NGHTTP2_IB_READ_NBYTE;
 6088|      0|            inbound_frame_set_mark(iframe, iframe->payloadleft);
 6089|       |
 6090|      0|            break;
 6091|      0|          default:
  ------------------
  |  Branch (6091:11): [True: 0, False: 0]
  ------------------
 6092|       |            /* Receiving too frequent unknown frames is suspicious. */
 6093|      0|            rv = session_update_glitch_ratelim(session);
 6094|      0|            if (rv != 0) {
  ------------------
  |  Branch (6094:17): [True: 0, False: 0]
  ------------------
 6095|      0|              return rv;
 6096|      0|            }
 6097|       |
 6098|      0|            if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6098:17): [True: 0, False: 0]
  ------------------
 6099|      0|              return (nghttp2_ssize)inlen;
 6100|      0|            }
 6101|       |
 6102|      0|            busy = 1;
 6103|       |
 6104|      0|            iframe->state = NGHTTP2_IB_IGN_PAYLOAD;
 6105|       |
 6106|      0|            break;
 6107|      0|          }
 6108|      0|        }
 6109|      3|      }
 6110|       |
 6111|      3|      if (!on_begin_frame_called) {
  ------------------
  |  Branch (6111:11): [True: 2, False: 1]
  ------------------
 6112|      2|        switch (iframe->state) {
 6113|      0|        case NGHTTP2_IB_IGN_HEADER_BLOCK:
  ------------------
  |  Branch (6113:9): [True: 0, False: 2]
  ------------------
 6114|      0|        case NGHTTP2_IB_IGN_PAYLOAD:
  ------------------
  |  Branch (6114:9): [True: 0, False: 2]
  ------------------
 6115|      0|        case NGHTTP2_IB_FRAME_SIZE_ERROR:
  ------------------
  |  Branch (6115:9): [True: 0, False: 2]
  ------------------
 6116|      0|        case NGHTTP2_IB_IGN_DATA:
  ------------------
  |  Branch (6116:9): [True: 0, False: 2]
  ------------------
 6117|      0|        case NGHTTP2_IB_IGN_ALL:
  ------------------
  |  Branch (6117:9): [True: 0, False: 2]
  ------------------
 6118|      0|          break;
 6119|      2|        default:
  ------------------
  |  Branch (6119:9): [True: 2, False: 0]
  ------------------
 6120|      2|          rv = session_call_on_begin_frame(session, &iframe->frame.hd);
 6121|       |
 6122|      2|          if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6122:15): [True: 0, False: 2]
  ------------------
 6123|      0|            return rv;
 6124|      0|          }
 6125|       |
 6126|      2|          if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6126:15): [True: 0, False: 2]
  ------------------
 6127|      0|            return (nghttp2_ssize)inlen;
 6128|      0|          }
 6129|      2|        }
 6130|      2|      }
 6131|       |
 6132|      3|      break;
 6133|      3|    }
 6134|      3|    case NGHTTP2_IB_READ_NBYTE:
  ------------------
  |  Branch (6134:5): [True: 0, False: 6]
  ------------------
 6135|      0|      DEBUGF("recv: [IB_READ_NBYTE]\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6136|       |
 6137|      0|      readlen = inbound_frame_buf_read(iframe, in, last);
 6138|      0|      in += readlen;
 6139|      0|      iframe->payloadleft -= readlen;
 6140|       |
 6141|      0|      DEBUGF("recv: readlen=%zu, payloadleft=%zu, left=%zu\n", readlen,
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6142|      0|             iframe->payloadleft, nghttp2_buf_mark_avail(&iframe->sbuf));
 6143|       |
 6144|      0|      if (nghttp2_buf_mark_avail(&iframe->sbuf)) {
  ------------------
  |  |   56|      0|#define nghttp2_buf_mark_avail(BUF) ((size_t)((BUF)->mark - (BUF)->last))
  |  |  ------------------
  |  |  |  Branch (56:37): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 6145|      0|        return (nghttp2_ssize)(in - first);
 6146|      0|      }
 6147|       |
 6148|      0|      switch (iframe->frame.hd.type) {
 6149|      0|      case NGHTTP2_HEADERS:
  ------------------
  |  Branch (6149:7): [True: 0, False: 0]
  ------------------
 6150|      0|        if (iframe->padlen == 0 &&
  ------------------
  |  Branch (6150:13): [True: 0, False: 0]
  ------------------
 6151|      0|            (iframe->frame.hd.flags & NGHTTP2_FLAG_PADDED)) {
  ------------------
  |  Branch (6151:13): [True: 0, False: 0]
  ------------------
 6152|      0|          pri_fieldlen = nghttp2_frame_priority_len(iframe->frame.hd.flags);
 6153|      0|          padlen = inbound_frame_compute_pad(iframe);
 6154|      0|          if (padlen < 0 ||
  ------------------
  |  Branch (6154:15): [True: 0, False: 0]
  ------------------
 6155|      0|              (size_t)padlen + pri_fieldlen > 1 + iframe->payloadleft) {
  ------------------
  |  Branch (6155:15): [True: 0, False: 0]
  ------------------
 6156|      0|            rv = nghttp2_session_terminate_session_with_reason(
 6157|      0|              session, NGHTTP2_PROTOCOL_ERROR, "HEADERS: invalid padding");
 6158|      0|            if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6158:17): [True: 0, False: 0]
  ------------------
 6159|      0|              return rv;
 6160|      0|            }
 6161|      0|            return (nghttp2_ssize)inlen;
 6162|      0|          }
 6163|      0|          iframe->frame.headers.padlen = (size_t)padlen;
 6164|       |
 6165|      0|          if (pri_fieldlen > 0) {
  ------------------
  |  Branch (6165:15): [True: 0, False: 0]
  ------------------
 6166|      0|            if (iframe->payloadleft < pri_fieldlen) {
  ------------------
  |  Branch (6166:17): [True: 0, False: 0]
  ------------------
 6167|      0|              busy = 1;
 6168|      0|              iframe->state = NGHTTP2_IB_FRAME_SIZE_ERROR;
 6169|      0|              break;
 6170|      0|            }
 6171|      0|            iframe->state = NGHTTP2_IB_READ_NBYTE;
 6172|      0|            inbound_frame_set_mark(iframe, pri_fieldlen);
 6173|      0|            break;
 6174|      0|          } else {
 6175|       |            /* Truncate buffers used for padding spec */
 6176|      0|            inbound_frame_set_mark(iframe, 0);
 6177|      0|          }
 6178|      0|        }
 6179|       |
 6180|      0|        rv = session_process_headers_frame(session);
 6181|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6181:13): [True: 0, False: 0]
  ------------------
 6182|      0|          return rv;
 6183|      0|        }
 6184|       |
 6185|      0|        busy = 1;
 6186|       |
 6187|      0|        if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6187:13): [True: 0, False: 0]
  ------------------
 6188|      0|          return (nghttp2_ssize)inlen;
 6189|      0|        }
 6190|       |
 6191|      0|        if (rv == NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE) {
  ------------------
  |  Branch (6191:13): [True: 0, False: 0]
  ------------------
 6192|      0|          rv = session_handle_invalid_stream2(
 6193|      0|            session, iframe->frame.hd.stream_id, NULL, NGHTTP2_ERR_INTERNAL);
 6194|      0|          if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6194:15): [True: 0, False: 0]
  ------------------
 6195|      0|            return rv;
 6196|      0|          }
 6197|      0|          iframe->state = NGHTTP2_IB_IGN_HEADER_BLOCK;
 6198|      0|          break;
 6199|      0|        }
 6200|       |
 6201|      0|        if (rv == NGHTTP2_ERR_IGN_HEADER_BLOCK) {
  ------------------
  |  Branch (6201:13): [True: 0, False: 0]
  ------------------
 6202|      0|          rv = session_update_glitch_ratelim(session);
 6203|      0|          if (rv != 0) {
  ------------------
  |  Branch (6203:15): [True: 0, False: 0]
  ------------------
 6204|      0|            return rv;
 6205|      0|          }
 6206|       |
 6207|      0|          if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6207:15): [True: 0, False: 0]
  ------------------
 6208|      0|            return (nghttp2_ssize)inlen;
 6209|      0|          }
 6210|       |
 6211|      0|          iframe->state = NGHTTP2_IB_IGN_HEADER_BLOCK;
 6212|      0|          break;
 6213|      0|        }
 6214|       |
 6215|      0|        iframe->state = NGHTTP2_IB_READ_HEADER_BLOCK;
 6216|       |
 6217|      0|        break;
 6218|      0|      case NGHTTP2_PRIORITY:
  ------------------
  |  Branch (6218:7): [True: 0, False: 0]
  ------------------
 6219|      0|        session_inbound_frame_reset(session);
 6220|       |
 6221|      0|        break;
 6222|      0|      case NGHTTP2_RST_STREAM:
  ------------------
  |  Branch (6222:7): [True: 0, False: 0]
  ------------------
 6223|      0|        rv = session_process_rst_stream_frame(session);
 6224|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6224:13): [True: 0, False: 0]
  ------------------
 6225|      0|          return rv;
 6226|      0|        }
 6227|       |
 6228|      0|        if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6228:13): [True: 0, False: 0]
  ------------------
 6229|      0|          return (nghttp2_ssize)inlen;
 6230|      0|        }
 6231|       |
 6232|      0|        session_inbound_frame_reset(session);
 6233|       |
 6234|      0|        break;
 6235|      0|      case NGHTTP2_PUSH_PROMISE:
  ------------------
  |  Branch (6235:7): [True: 0, False: 0]
  ------------------
 6236|      0|        if (iframe->padlen == 0 &&
  ------------------
  |  Branch (6236:13): [True: 0, False: 0]
  ------------------
 6237|      0|            (iframe->frame.hd.flags & NGHTTP2_FLAG_PADDED)) {
  ------------------
  |  Branch (6237:13): [True: 0, False: 0]
  ------------------
 6238|      0|          padlen = inbound_frame_compute_pad(iframe);
 6239|      0|          if (padlen < 0 || (size_t)padlen + 4 /* promised stream id */
  ------------------
  |  Branch (6239:15): [True: 0, False: 0]
  |  Branch (6239:29): [True: 0, False: 0]
  ------------------
 6240|      0|                              > 1 + iframe->payloadleft) {
 6241|      0|            rv = nghttp2_session_terminate_session_with_reason(
 6242|      0|              session, NGHTTP2_PROTOCOL_ERROR, "PUSH_PROMISE: invalid padding");
 6243|      0|            if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6243:17): [True: 0, False: 0]
  ------------------
 6244|      0|              return rv;
 6245|      0|            }
 6246|      0|            return (nghttp2_ssize)inlen;
 6247|      0|          }
 6248|       |
 6249|      0|          iframe->frame.push_promise.padlen = (size_t)padlen;
 6250|       |
 6251|      0|          if (iframe->payloadleft < 4) {
  ------------------
  |  Branch (6251:15): [True: 0, False: 0]
  ------------------
 6252|      0|            busy = 1;
 6253|      0|            iframe->state = NGHTTP2_IB_FRAME_SIZE_ERROR;
 6254|      0|            break;
 6255|      0|          }
 6256|       |
 6257|      0|          iframe->state = NGHTTP2_IB_READ_NBYTE;
 6258|       |
 6259|      0|          inbound_frame_set_mark(iframe, 4);
 6260|       |
 6261|      0|          break;
 6262|      0|        }
 6263|       |
 6264|      0|        rv = session_process_push_promise_frame(session);
 6265|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6265:13): [True: 0, False: 0]
  ------------------
 6266|      0|          return rv;
 6267|      0|        }
 6268|       |
 6269|      0|        busy = 1;
 6270|       |
 6271|      0|        if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6271:13): [True: 0, False: 0]
  ------------------
 6272|      0|          return (nghttp2_ssize)inlen;
 6273|      0|        }
 6274|       |
 6275|      0|        if (rv == NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE) {
  ------------------
  |  Branch (6275:13): [True: 0, False: 0]
  ------------------
 6276|      0|          rv = session_handle_invalid_stream2(
 6277|      0|            session, iframe->frame.push_promise.promised_stream_id, NULL,
 6278|      0|            NGHTTP2_ERR_INTERNAL);
 6279|      0|          if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6279:15): [True: 0, False: 0]
  ------------------
 6280|      0|            return rv;
 6281|      0|          }
 6282|      0|          iframe->state = NGHTTP2_IB_IGN_HEADER_BLOCK;
 6283|      0|          break;
 6284|      0|        }
 6285|       |
 6286|      0|        if (rv == NGHTTP2_ERR_IGN_HEADER_BLOCK) {
  ------------------
  |  Branch (6286:13): [True: 0, False: 0]
  ------------------
 6287|      0|          iframe->state = NGHTTP2_IB_IGN_HEADER_BLOCK;
 6288|      0|          break;
 6289|      0|        }
 6290|       |
 6291|      0|        iframe->state = NGHTTP2_IB_READ_HEADER_BLOCK;
 6292|       |
 6293|      0|        break;
 6294|      0|      case NGHTTP2_PING:
  ------------------
  |  Branch (6294:7): [True: 0, False: 0]
  ------------------
 6295|      0|        rv = session_process_ping_frame(session);
 6296|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6296:13): [True: 0, False: 0]
  ------------------
 6297|      0|          return rv;
 6298|      0|        }
 6299|       |
 6300|      0|        if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6300:13): [True: 0, False: 0]
  ------------------
 6301|      0|          return (nghttp2_ssize)inlen;
 6302|      0|        }
 6303|       |
 6304|      0|        session_inbound_frame_reset(session);
 6305|       |
 6306|      0|        break;
 6307|      0|      case NGHTTP2_GOAWAY: {
  ------------------
  |  Branch (6307:7): [True: 0, False: 0]
  ------------------
 6308|      0|        size_t debuglen;
 6309|       |
 6310|       |        /* 8 is Last-stream-ID + Error Code */
 6311|      0|        debuglen = iframe->frame.hd.length - 8;
 6312|       |
 6313|      0|        if (debuglen > 0) {
  ------------------
  |  Branch (6313:13): [True: 0, False: 0]
  ------------------
 6314|      0|          iframe->raw_lbuf = nghttp2_mem_malloc(mem, debuglen);
 6315|       |
 6316|      0|          if (iframe->raw_lbuf == NULL) {
  ------------------
  |  Branch (6316:15): [True: 0, False: 0]
  ------------------
 6317|      0|            return NGHTTP2_ERR_NOMEM;
 6318|      0|          }
 6319|       |
 6320|      0|          nghttp2_buf_wrap_init(&iframe->lbuf, iframe->raw_lbuf, debuglen);
 6321|      0|        }
 6322|       |
 6323|      0|        busy = 1;
 6324|       |
 6325|      0|        iframe->state = NGHTTP2_IB_READ_GOAWAY_DEBUG;
 6326|       |
 6327|      0|        break;
 6328|      0|      }
 6329|      0|      case NGHTTP2_WINDOW_UPDATE:
  ------------------
  |  Branch (6329:7): [True: 0, False: 0]
  ------------------
 6330|      0|        rv = session_process_window_update_frame(session);
 6331|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6331:13): [True: 0, False: 0]
  ------------------
 6332|      0|          return rv;
 6333|      0|        }
 6334|       |
 6335|      0|        if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6335:13): [True: 0, False: 0]
  ------------------
 6336|      0|          return (nghttp2_ssize)inlen;
 6337|      0|        }
 6338|       |
 6339|      0|        session_inbound_frame_reset(session);
 6340|       |
 6341|      0|        break;
 6342|      0|      case NGHTTP2_ALTSVC: {
  ------------------
  |  Branch (6342:7): [True: 0, False: 0]
  ------------------
 6343|      0|        size_t origin_len;
 6344|       |
 6345|      0|        origin_len = nghttp2_get_uint16(iframe->sbuf.pos);
 6346|       |
 6347|      0|        DEBUGF("recv: origin_len=%zu\n", origin_len);
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6348|       |
 6349|      0|        if (origin_len > iframe->payloadleft) {
  ------------------
  |  Branch (6349:13): [True: 0, False: 0]
  ------------------
 6350|      0|          busy = 1;
 6351|      0|          iframe->state = NGHTTP2_IB_FRAME_SIZE_ERROR;
 6352|      0|          break;
 6353|      0|        }
 6354|       |
 6355|      0|        if (iframe->frame.hd.length > 2) {
  ------------------
  |  Branch (6355:13): [True: 0, False: 0]
  ------------------
 6356|      0|          iframe->raw_lbuf =
 6357|      0|            nghttp2_mem_malloc(mem, iframe->frame.hd.length - 2);
 6358|       |
 6359|      0|          if (iframe->raw_lbuf == NULL) {
  ------------------
  |  Branch (6359:15): [True: 0, False: 0]
  ------------------
 6360|      0|            return NGHTTP2_ERR_NOMEM;
 6361|      0|          }
 6362|       |
 6363|      0|          nghttp2_buf_wrap_init(&iframe->lbuf, iframe->raw_lbuf,
 6364|      0|                                iframe->frame.hd.length);
 6365|      0|        }
 6366|       |
 6367|      0|        busy = 1;
 6368|       |
 6369|      0|        iframe->state = NGHTTP2_IB_READ_ALTSVC_PAYLOAD;
 6370|       |
 6371|      0|        break;
 6372|      0|      case NGHTTP2_PRIORITY_UPDATE:
  ------------------
  |  Branch (6372:7): [True: 0, False: 0]
  ------------------
 6373|      0|        DEBUGF("recv: prioritized_stream_id=%d\n",
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6374|      0|               nghttp2_get_uint32(iframe->sbuf.pos) & NGHTTP2_STREAM_ID_MASK);
 6375|       |
 6376|      0|        rv = session_process_priority_update_frame(session);
 6377|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6377:13): [True: 0, False: 0]
  ------------------
 6378|      0|          return rv;
 6379|      0|        }
 6380|       |
 6381|      0|        if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6381:13): [True: 0, False: 0]
  ------------------
 6382|      0|          return (nghttp2_ssize)inlen;
 6383|      0|        }
 6384|       |
 6385|      0|        session_inbound_frame_reset(session);
 6386|       |
 6387|      0|        break;
 6388|      0|      }
 6389|      0|      default:
  ------------------
  |  Branch (6389:7): [True: 0, False: 0]
  ------------------
 6390|       |        /* This is unknown frame */
 6391|      0|        session_inbound_frame_reset(session);
 6392|       |
 6393|      0|        break;
 6394|      0|      }
 6395|      0|      break;
 6396|      1|    case NGHTTP2_IB_READ_HEADER_BLOCK:
  ------------------
  |  Branch (6396:5): [True: 1, False: 5]
  ------------------
 6397|      1|    case NGHTTP2_IB_IGN_HEADER_BLOCK: {
  ------------------
  |  Branch (6397:5): [True: 0, False: 6]
  ------------------
 6398|      1|      nghttp2_ssize data_readlen;
 6399|      1|      size_t trail_padlen;
 6400|      1|      int final;
 6401|       |#ifdef DEBUGBUILD
 6402|       |      if (iframe->state == NGHTTP2_IB_READ_HEADER_BLOCK) {
 6403|       |        DEBUGF("recv: [IB_READ_HEADER_BLOCK]\n");
 6404|       |      } else {
 6405|       |        DEBUGF("recv: [IB_IGN_HEADER_BLOCK]\n");
 6406|       |      }
 6407|       |#endif /* defined(DEBUGBUILD) */
 6408|       |
 6409|      1|      readlen = inbound_frame_payload_readlen(iframe, in, last);
 6410|       |
 6411|      1|      DEBUGF("recv: readlen=%zu, payloadleft=%zu\n", readlen,
  ------------------
  |  |   39|      1|    do {                                                                       \
  |  |   40|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
 6412|      1|             iframe->payloadleft - readlen);
 6413|       |
 6414|      1|      data_readlen = inbound_frame_effective_readlen(
 6415|      1|        iframe, iframe->payloadleft - readlen, readlen);
 6416|       |
 6417|      1|      if (data_readlen == -1) {
  ------------------
  |  Branch (6417:11): [True: 0, False: 1]
  ------------------
 6418|       |        /* everything is padding */
 6419|      0|        data_readlen = 0;
 6420|      0|      }
 6421|       |
 6422|      1|      trail_padlen = nghttp2_frame_trail_padlen(&iframe->frame, iframe->padlen);
 6423|       |
 6424|      1|      final = (iframe->frame.hd.flags & NGHTTP2_FLAG_END_HEADERS) &&
  ------------------
  |  Branch (6424:15): [True: 1, False: 0]
  ------------------
 6425|      1|              iframe->payloadleft - (size_t)data_readlen == trail_padlen;
  ------------------
  |  Branch (6425:15): [True: 0, False: 1]
  ------------------
 6426|       |
 6427|      1|      if (data_readlen > 0 || (data_readlen == 0 && final)) {
  ------------------
  |  Branch (6427:11): [True: 1, False: 0]
  |  Branch (6427:32): [True: 0, False: 0]
  |  Branch (6427:53): [True: 0, False: 0]
  ------------------
 6428|      1|        size_t hd_proclen = 0;
 6429|       |
 6430|      1|        DEBUGF("recv: block final=%d\n", final);
  ------------------
  |  |   39|      1|    do {                                                                       \
  |  |   40|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
 6431|       |
 6432|      1|        rv =
 6433|      1|          inflate_header_block(session, &iframe->frame, &hd_proclen,
 6434|      1|                               (uint8_t *)in, (size_t)data_readlen, final,
 6435|      1|                               iframe->state == NGHTTP2_IB_READ_HEADER_BLOCK);
 6436|       |
 6437|      1|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6437:13): [True: 0, False: 1]
  ------------------
 6438|      0|          return rv;
 6439|      0|        }
 6440|       |
 6441|      1|        if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6441:13): [True: 0, False: 1]
  ------------------
 6442|      0|          return (nghttp2_ssize)inlen;
 6443|      0|        }
 6444|       |
 6445|      1|        if (rv == NGHTTP2_ERR_PAUSE) {
  ------------------
  |  Branch (6445:13): [True: 0, False: 1]
  ------------------
 6446|      0|          in += hd_proclen;
 6447|      0|          iframe->payloadleft -= hd_proclen;
 6448|       |
 6449|      0|          return (nghttp2_ssize)(in - first);
 6450|      0|        }
 6451|       |
 6452|      1|        if (rv == NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE) {
  ------------------
  |  Branch (6452:13): [True: 0, False: 1]
  ------------------
 6453|       |          /* The application says no more headers. We decompress the
 6454|       |             rest of the header block but not invoke on_header_callback
 6455|       |             and on_frame_recv_callback. */
 6456|      0|          in += hd_proclen;
 6457|      0|          iframe->payloadleft -= hd_proclen;
 6458|       |
 6459|       |          /* Use promised stream ID for PUSH_PROMISE */
 6460|      0|          rv = session_handle_invalid_stream2(
 6461|      0|            session,
 6462|      0|            iframe->frame.hd.type == NGHTTP2_PUSH_PROMISE
  ------------------
  |  Branch (6462:13): [True: 0, False: 0]
  ------------------
 6463|      0|              ? iframe->frame.push_promise.promised_stream_id
 6464|      0|              : iframe->frame.hd.stream_id,
 6465|      0|            NULL, NGHTTP2_ERR_INTERNAL);
 6466|      0|          if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6466:15): [True: 0, False: 0]
  ------------------
 6467|      0|            return rv;
 6468|      0|          }
 6469|      0|          busy = 1;
 6470|      0|          iframe->state = NGHTTP2_IB_IGN_HEADER_BLOCK;
 6471|      0|          break;
 6472|      0|        }
 6473|       |
 6474|      1|        in += readlen;
 6475|      1|        iframe->payloadleft -= readlen;
 6476|       |
 6477|      1|        if (rv == NGHTTP2_ERR_HEADER_COMP) {
  ------------------
  |  Branch (6477:13): [True: 0, False: 1]
  ------------------
 6478|       |          /* GOAWAY is already issued */
 6479|      0|          if (iframe->payloadleft == 0) {
  ------------------
  |  Branch (6479:15): [True: 0, False: 0]
  ------------------
 6480|      0|            session_inbound_frame_reset(session);
 6481|      0|          } else {
 6482|      0|            busy = 1;
 6483|      0|            iframe->state = NGHTTP2_IB_IGN_PAYLOAD;
 6484|      0|          }
 6485|      0|          break;
 6486|      0|        }
 6487|      1|      } else {
 6488|      0|        in += readlen;
 6489|      0|        iframe->payloadleft -= readlen;
 6490|      0|      }
 6491|       |
 6492|      1|      if (iframe->payloadleft) {
  ------------------
  |  Branch (6492:11): [True: 1, False: 0]
  ------------------
 6493|      1|        break;
 6494|      1|      }
 6495|       |
 6496|      0|      if ((iframe->frame.hd.flags & NGHTTP2_FLAG_END_HEADERS) == 0) {
  ------------------
  |  Branch (6496:11): [True: 0, False: 0]
  ------------------
 6497|      0|        inbound_frame_set_mark(iframe, NGHTTP2_FRAME_HDLEN);
  ------------------
  |  |   40|      0|#define NGHTTP2_FRAME_HDLEN 9
  ------------------
 6498|       |
 6499|      0|        iframe->padlen = 0;
 6500|       |
 6501|      0|        if (iframe->state == NGHTTP2_IB_READ_HEADER_BLOCK) {
  ------------------
  |  Branch (6501:13): [True: 0, False: 0]
  ------------------
 6502|      0|          iframe->state = NGHTTP2_IB_EXPECT_CONTINUATION;
 6503|      0|        } else {
 6504|      0|          iframe->state = NGHTTP2_IB_IGN_CONTINUATION;
 6505|      0|        }
 6506|      0|      } else {
 6507|      0|        if (iframe->state == NGHTTP2_IB_READ_HEADER_BLOCK) {
  ------------------
  |  Branch (6507:13): [True: 0, False: 0]
  ------------------
 6508|      0|          rv = session_after_header_block_received(session);
 6509|      0|          if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6509:15): [True: 0, False: 0]
  ------------------
 6510|      0|            return rv;
 6511|      0|          }
 6512|       |
 6513|      0|          if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6513:15): [True: 0, False: 0]
  ------------------
 6514|      0|            return (nghttp2_ssize)inlen;
 6515|      0|          }
 6516|      0|        }
 6517|      0|        session_inbound_frame_reset(session);
 6518|       |
 6519|      0|        session->num_continuations = 0;
 6520|      0|      }
 6521|      0|      break;
 6522|      0|    }
 6523|      0|    case NGHTTP2_IB_IGN_PAYLOAD:
  ------------------
  |  Branch (6523:5): [True: 0, False: 6]
  ------------------
 6524|      0|      DEBUGF("recv: [IB_IGN_PAYLOAD]\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6525|       |
 6526|      0|      readlen = inbound_frame_payload_readlen(iframe, in, last);
 6527|      0|      iframe->payloadleft -= readlen;
 6528|      0|      in += readlen;
 6529|       |
 6530|      0|      DEBUGF("recv: readlen=%zu, payloadleft=%zu\n", readlen,
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6531|      0|             iframe->payloadleft);
 6532|       |
 6533|      0|      if (iframe->payloadleft) {
  ------------------
  |  Branch (6533:11): [True: 0, False: 0]
  ------------------
 6534|      0|        break;
 6535|      0|      }
 6536|       |
 6537|      0|      switch (iframe->frame.hd.type) {
 6538|      0|      case NGHTTP2_HEADERS:
  ------------------
  |  Branch (6538:7): [True: 0, False: 0]
  ------------------
 6539|      0|      case NGHTTP2_PUSH_PROMISE:
  ------------------
  |  Branch (6539:7): [True: 0, False: 0]
  ------------------
 6540|      0|      case NGHTTP2_CONTINUATION:
  ------------------
  |  Branch (6540:7): [True: 0, False: 0]
  ------------------
 6541|       |        /* Mark inflater bad so that we won't perform further decoding */
 6542|      0|        session->hd_inflater.ctx.bad = 1;
 6543|      0|        break;
 6544|      0|      default:
  ------------------
  |  Branch (6544:7): [True: 0, False: 0]
  ------------------
 6545|      0|        break;
 6546|      0|      }
 6547|       |
 6548|      0|      session_inbound_frame_reset(session);
 6549|       |
 6550|      0|      break;
 6551|      0|    case NGHTTP2_IB_FRAME_SIZE_ERROR:
  ------------------
  |  Branch (6551:5): [True: 0, False: 6]
  ------------------
 6552|      0|      DEBUGF("recv: [IB_FRAME_SIZE_ERROR]\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6553|       |
 6554|      0|      rv = session_handle_frame_size_error(session);
 6555|      0|      if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6555:11): [True: 0, False: 0]
  ------------------
 6556|      0|        return rv;
 6557|      0|      }
 6558|       |
 6559|      0|      assert(iframe->state == NGHTTP2_IB_IGN_ALL);
  ------------------
  |  Branch (6559:7): [True: 0, False: 0]
  |  Branch (6559:7): [True: 0, False: 0]
  ------------------
 6560|       |
 6561|      0|      return (nghttp2_ssize)inlen;
 6562|      2|    case NGHTTP2_IB_READ_SETTINGS:
  ------------------
  |  Branch (6562:5): [True: 2, False: 4]
  ------------------
 6563|      2|      DEBUGF("recv: [IB_READ_SETTINGS]\n");
  ------------------
  |  |   39|      2|    do {                                                                       \
  |  |   40|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 6564|       |
 6565|      2|      readlen = inbound_frame_buf_read(iframe, in, last);
 6566|      2|      iframe->payloadleft -= readlen;
 6567|      2|      in += readlen;
 6568|       |
 6569|      2|      DEBUGF("recv: readlen=%zu, payloadleft=%zu\n", readlen,
  ------------------
  |  |   39|      2|    do {                                                                       \
  |  |   40|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 6570|      2|             iframe->payloadleft);
 6571|       |
 6572|      2|      if (nghttp2_buf_mark_avail(&iframe->sbuf)) {
  ------------------
  |  |   56|      2|#define nghttp2_buf_mark_avail(BUF) ((size_t)((BUF)->mark - (BUF)->last))
  |  |  ------------------
  |  |  |  Branch (56:37): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 6573|      0|        break;
 6574|      0|      }
 6575|       |
 6576|      2|      if (readlen > 0) {
  ------------------
  |  Branch (6576:11): [True: 0, False: 2]
  ------------------
 6577|      0|        inbound_frame_set_settings_entry(iframe);
 6578|      0|      }
 6579|      2|      if (iframe->payloadleft) {
  ------------------
  |  Branch (6579:11): [True: 0, False: 2]
  ------------------
 6580|      0|        inbound_frame_set_mark(iframe, NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH);
  ------------------
  |  |   61|      0|#define NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH 6
  ------------------
 6581|      0|        break;
 6582|      0|      }
 6583|       |
 6584|      2|      rv = session_process_settings_frame(session);
 6585|       |
 6586|      2|      if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6586:11): [True: 0, False: 2]
  ------------------
 6587|      0|        return rv;
 6588|      0|      }
 6589|       |
 6590|      2|      if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6590:11): [True: 0, False: 2]
  ------------------
 6591|      0|        return (nghttp2_ssize)inlen;
 6592|      0|      }
 6593|       |
 6594|      2|      session_inbound_frame_reset(session);
 6595|       |
 6596|      2|      break;
 6597|      0|    case NGHTTP2_IB_READ_GOAWAY_DEBUG:
  ------------------
  |  Branch (6597:5): [True: 0, False: 6]
  ------------------
 6598|      0|      DEBUGF("recv: [IB_READ_GOAWAY_DEBUG]\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6599|       |
 6600|      0|      readlen = inbound_frame_payload_readlen(iframe, in, last);
 6601|       |
 6602|      0|      if (readlen > 0) {
  ------------------
  |  Branch (6602:11): [True: 0, False: 0]
  ------------------
 6603|      0|        iframe->lbuf.last = nghttp2_cpymem(iframe->lbuf.last, in, readlen);
 6604|       |
 6605|      0|        iframe->payloadleft -= readlen;
 6606|      0|        in += readlen;
 6607|      0|      }
 6608|       |
 6609|      0|      DEBUGF("recv: readlen=%zu, payloadleft=%zu\n", readlen,
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6610|      0|             iframe->payloadleft);
 6611|       |
 6612|      0|      if (iframe->payloadleft) {
  ------------------
  |  Branch (6612:11): [True: 0, False: 0]
  ------------------
 6613|      0|        assert(nghttp2_buf_avail(&iframe->lbuf) > 0);
  ------------------
  |  Branch (6613:9): [True: 0, False: 0]
  |  Branch (6613:9): [True: 0, False: 0]
  ------------------
 6614|       |
 6615|      0|        break;
 6616|      0|      }
 6617|       |
 6618|      0|      rv = session_process_goaway_frame(session);
 6619|       |
 6620|      0|      if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6620:11): [True: 0, False: 0]
  ------------------
 6621|      0|        return rv;
 6622|      0|      }
 6623|       |
 6624|      0|      if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6624:11): [True: 0, False: 0]
  ------------------
 6625|      0|        return (nghttp2_ssize)inlen;
 6626|      0|      }
 6627|       |
 6628|      0|      session_inbound_frame_reset(session);
 6629|       |
 6630|      0|      break;
 6631|      0|    case NGHTTP2_IB_EXPECT_CONTINUATION:
  ------------------
  |  Branch (6631:5): [True: 0, False: 6]
  ------------------
 6632|      0|    case NGHTTP2_IB_IGN_CONTINUATION:
  ------------------
  |  Branch (6632:5): [True: 0, False: 6]
  ------------------
 6633|       |#ifdef DEBUGBUILD
 6634|       |      if (iframe->state == NGHTTP2_IB_EXPECT_CONTINUATION) {
 6635|       |        fprintf(stderr, "recv: [IB_EXPECT_CONTINUATION]\n");
 6636|       |      } else {
 6637|       |        fprintf(stderr, "recv: [IB_IGN_CONTINUATION]\n");
 6638|       |      }
 6639|       |#endif /* defined(DEBUGBUILD) */
 6640|       |
 6641|      0|      readlen = inbound_frame_buf_read(iframe, in, last);
 6642|      0|      in += readlen;
 6643|       |
 6644|      0|      if (nghttp2_buf_mark_avail(&iframe->sbuf)) {
  ------------------
  |  |   56|      0|#define nghttp2_buf_mark_avail(BUF) ((size_t)((BUF)->mark - (BUF)->last))
  |  |  ------------------
  |  |  |  Branch (56:37): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 6645|      0|        return (nghttp2_ssize)(in - first);
 6646|      0|      }
 6647|       |
 6648|      0|      nghttp2_frame_unpack_frame_hd(&cont_hd, iframe->sbuf.pos);
 6649|      0|      iframe->payloadleft = cont_hd.length;
 6650|       |
 6651|      0|      DEBUGF("recv: payloadlen=%zu, type=%u, flags=0x%02x, stream_id=%d\n",
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6652|      0|             cont_hd.length, cont_hd.type, cont_hd.flags, cont_hd.stream_id);
 6653|       |
 6654|      0|      if (cont_hd.type != NGHTTP2_CONTINUATION ||
  ------------------
  |  Branch (6654:11): [True: 0, False: 0]
  ------------------
 6655|      0|          cont_hd.stream_id != iframe->frame.hd.stream_id) {
  ------------------
  |  Branch (6655:11): [True: 0, False: 0]
  ------------------
 6656|      0|        DEBUGF("recv: expected stream_id=%d, type=%d, but got stream_id=%d, "
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6657|      0|               "type=%u\n",
 6658|      0|               iframe->frame.hd.stream_id, NGHTTP2_CONTINUATION,
 6659|      0|               cont_hd.stream_id, cont_hd.type);
 6660|      0|        rv = nghttp2_session_terminate_session_with_reason(
 6661|      0|          session, NGHTTP2_PROTOCOL_ERROR,
 6662|      0|          "unexpected non-CONTINUATION frame or stream_id is invalid");
 6663|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6663:13): [True: 0, False: 0]
  ------------------
 6664|      0|          return rv;
 6665|      0|        }
 6666|       |
 6667|      0|        return (nghttp2_ssize)inlen;
 6668|      0|      }
 6669|       |
 6670|      0|      if (++session->num_continuations > session->max_continuations) {
  ------------------
  |  Branch (6670:11): [True: 0, False: 0]
  ------------------
 6671|      0|        return NGHTTP2_ERR_TOO_MANY_CONTINUATIONS;
 6672|      0|      }
 6673|       |
 6674|       |      /* CONTINUATION won't bear NGHTTP2_PADDED flag */
 6675|       |
 6676|      0|      iframe->frame.hd.flags =
 6677|      0|        (uint8_t)(iframe->frame.hd.flags |
 6678|      0|                  (cont_hd.flags & NGHTTP2_FLAG_END_HEADERS));
 6679|      0|      iframe->frame.hd.length += cont_hd.length;
 6680|       |
 6681|      0|      busy = 1;
 6682|       |
 6683|      0|      if (iframe->state == NGHTTP2_IB_EXPECT_CONTINUATION) {
  ------------------
  |  Branch (6683:11): [True: 0, False: 0]
  ------------------
 6684|      0|        iframe->state = NGHTTP2_IB_READ_HEADER_BLOCK;
 6685|       |
 6686|      0|        rv = session_call_on_begin_frame(session, &cont_hd);
 6687|       |
 6688|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6688:13): [True: 0, False: 0]
  ------------------
 6689|      0|          return rv;
 6690|      0|        }
 6691|       |
 6692|      0|        if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6692:13): [True: 0, False: 0]
  ------------------
 6693|      0|          return (nghttp2_ssize)inlen;
 6694|      0|        }
 6695|      0|      } else {
 6696|      0|        iframe->state = NGHTTP2_IB_IGN_HEADER_BLOCK;
 6697|      0|      }
 6698|       |
 6699|      0|      break;
 6700|      0|    case NGHTTP2_IB_READ_PAD_DATA:
  ------------------
  |  Branch (6700:5): [True: 0, False: 6]
  ------------------
 6701|      0|      DEBUGF("recv: [IB_READ_PAD_DATA]\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6702|       |
 6703|      0|      readlen = inbound_frame_buf_read(iframe, in, last);
 6704|      0|      in += readlen;
 6705|      0|      iframe->payloadleft -= readlen;
 6706|       |
 6707|      0|      DEBUGF("recv: readlen=%zu, payloadleft=%zu, left=%zu\n", readlen,
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6708|      0|             iframe->payloadleft, nghttp2_buf_mark_avail(&iframe->sbuf));
 6709|       |
 6710|      0|      if (nghttp2_buf_mark_avail(&iframe->sbuf)) {
  ------------------
  |  |   56|      0|#define nghttp2_buf_mark_avail(BUF) ((size_t)((BUF)->mark - (BUF)->last))
  |  |  ------------------
  |  |  |  Branch (56:37): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 6711|      0|        return (nghttp2_ssize)(in - first);
 6712|      0|      }
 6713|       |
 6714|       |      /* Pad Length field is subject to flow control */
 6715|      0|      rv = nghttp2_session_update_recv_connection_window_size(session, readlen);
 6716|      0|      if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6716:11): [True: 0, False: 0]
  ------------------
 6717|      0|        return rv;
 6718|      0|      }
 6719|       |
 6720|      0|      if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6720:11): [True: 0, False: 0]
  ------------------
 6721|      0|        return (nghttp2_ssize)inlen;
 6722|      0|      }
 6723|       |
 6724|       |      /* Pad Length field is consumed immediately */
 6725|      0|      rv =
 6726|      0|        nghttp2_session_consume(session, iframe->frame.hd.stream_id, readlen);
 6727|       |
 6728|      0|      if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6728:11): [True: 0, False: 0]
  ------------------
 6729|      0|        return rv;
 6730|      0|      }
 6731|       |
 6732|      0|      if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6732:11): [True: 0, False: 0]
  ------------------
 6733|      0|        return (nghttp2_ssize)inlen;
 6734|      0|      }
 6735|       |
 6736|      0|      stream = nghttp2_session_get_stream(session, iframe->frame.hd.stream_id);
 6737|      0|      if (stream) {
  ------------------
  |  Branch (6737:11): [True: 0, False: 0]
  ------------------
 6738|      0|        rv = nghttp2_session_update_recv_stream_window_size(
 6739|      0|          session, stream, readlen,
 6740|      0|          iframe->payloadleft ||
  ------------------
  |  Branch (6740:11): [True: 0, False: 0]
  ------------------
 6741|      0|            (iframe->frame.hd.flags & NGHTTP2_FLAG_END_STREAM) == 0);
  ------------------
  |  Branch (6741:13): [True: 0, False: 0]
  ------------------
 6742|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6742:13): [True: 0, False: 0]
  ------------------
 6743|      0|          return rv;
 6744|      0|        }
 6745|       |
 6746|      0|        if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6746:13): [True: 0, False: 0]
  ------------------
 6747|      0|          return (nghttp2_ssize)inlen;
 6748|      0|        }
 6749|      0|      }
 6750|       |
 6751|      0|      busy = 1;
 6752|       |
 6753|      0|      padlen = inbound_frame_compute_pad(iframe);
 6754|      0|      if (padlen < 0) {
  ------------------
  |  Branch (6754:11): [True: 0, False: 0]
  ------------------
 6755|      0|        rv = nghttp2_session_terminate_session_with_reason(
 6756|      0|          session, NGHTTP2_PROTOCOL_ERROR, "DATA: invalid padding");
 6757|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6757:13): [True: 0, False: 0]
  ------------------
 6758|      0|          return rv;
 6759|      0|        }
 6760|      0|        return (nghttp2_ssize)inlen;
 6761|      0|      }
 6762|       |
 6763|      0|      iframe->frame.data.padlen = (size_t)padlen;
 6764|       |
 6765|       |      /* Empty DATA frame without END_STREAM flag set is
 6766|       |         suspicious. */
 6767|      0|      if (iframe->payloadleft == 0 &&
  ------------------
  |  Branch (6767:11): [True: 0, False: 0]
  ------------------
 6768|      0|          (iframe->frame.hd.flags & NGHTTP2_FLAG_END_STREAM) == 0) {
  ------------------
  |  Branch (6768:11): [True: 0, False: 0]
  ------------------
 6769|      0|        rv = session_update_glitch_ratelim(session);
 6770|      0|        if (rv != 0) {
  ------------------
  |  Branch (6770:13): [True: 0, False: 0]
  ------------------
 6771|      0|          return rv;
 6772|      0|        }
 6773|       |
 6774|      0|        if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6774:13): [True: 0, False: 0]
  ------------------
 6775|      0|          return (nghttp2_ssize)inlen;
 6776|      0|        }
 6777|      0|      }
 6778|       |
 6779|      0|      iframe->state = NGHTTP2_IB_READ_DATA;
 6780|       |
 6781|      0|      break;
 6782|      0|    case NGHTTP2_IB_READ_DATA:
  ------------------
  |  Branch (6782:5): [True: 0, False: 6]
  ------------------
 6783|      0|      stream = nghttp2_session_get_stream(session, iframe->frame.hd.stream_id);
 6784|       |
 6785|      0|      if (!stream) {
  ------------------
  |  Branch (6785:11): [True: 0, False: 0]
  ------------------
 6786|      0|        busy = 1;
 6787|      0|        iframe->state = NGHTTP2_IB_IGN_DATA;
 6788|      0|        break;
 6789|      0|      }
 6790|       |
 6791|      0|      DEBUGF("recv: [IB_READ_DATA]\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6792|       |
 6793|      0|      readlen = inbound_frame_payload_readlen(iframe, in, last);
 6794|      0|      iframe->payloadleft -= readlen;
 6795|      0|      in += readlen;
 6796|       |
 6797|      0|      DEBUGF("recv: readlen=%zu, payloadleft=%zu\n", readlen,
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6798|      0|             iframe->payloadleft);
 6799|       |
 6800|      0|      if (readlen > 0) {
  ------------------
  |  Branch (6800:11): [True: 0, False: 0]
  ------------------
 6801|      0|        nghttp2_ssize data_readlen;
 6802|       |
 6803|      0|        rv =
 6804|      0|          nghttp2_session_update_recv_connection_window_size(session, readlen);
 6805|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6805:13): [True: 0, False: 0]
  ------------------
 6806|      0|          return rv;
 6807|      0|        }
 6808|       |
 6809|      0|        if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6809:13): [True: 0, False: 0]
  ------------------
 6810|      0|          return (nghttp2_ssize)inlen;
 6811|      0|        }
 6812|       |
 6813|      0|        rv = nghttp2_session_update_recv_stream_window_size(
 6814|      0|          session, stream, readlen,
 6815|      0|          iframe->payloadleft ||
  ------------------
  |  Branch (6815:11): [True: 0, False: 0]
  ------------------
 6816|      0|            (iframe->frame.hd.flags & NGHTTP2_FLAG_END_STREAM) == 0);
  ------------------
  |  Branch (6816:13): [True: 0, False: 0]
  ------------------
 6817|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6817:13): [True: 0, False: 0]
  ------------------
 6818|      0|          return rv;
 6819|      0|        }
 6820|       |
 6821|      0|        if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6821:13): [True: 0, False: 0]
  ------------------
 6822|      0|          return (nghttp2_ssize)inlen;
 6823|      0|        }
 6824|       |
 6825|      0|        data_readlen =
 6826|      0|          inbound_frame_effective_readlen(iframe, iframe->payloadleft, readlen);
 6827|       |
 6828|      0|        if (data_readlen == -1) {
  ------------------
  |  Branch (6828:13): [True: 0, False: 0]
  ------------------
 6829|       |          /* everything is padding */
 6830|      0|          data_readlen = 0;
 6831|      0|        }
 6832|       |
 6833|      0|        padlen = (nghttp2_ssize)readlen - data_readlen;
 6834|       |
 6835|      0|        if (padlen > 0) {
  ------------------
  |  Branch (6835:13): [True: 0, False: 0]
  ------------------
 6836|       |          /* Padding is considered as "consumed" immediately */
 6837|      0|          rv = nghttp2_session_consume(session, iframe->frame.hd.stream_id,
 6838|      0|                                       (size_t)padlen);
 6839|       |
 6840|      0|          if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6840:15): [True: 0, False: 0]
  ------------------
 6841|      0|            return rv;
 6842|      0|          }
 6843|       |
 6844|      0|          if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6844:15): [True: 0, False: 0]
  ------------------
 6845|      0|            return (nghttp2_ssize)inlen;
 6846|      0|          }
 6847|      0|        }
 6848|       |
 6849|      0|        DEBUGF("recv: data_readlen=%td\n", data_readlen);
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6850|       |
 6851|      0|        if (data_readlen > 0) {
  ------------------
  |  Branch (6851:13): [True: 0, False: 0]
  ------------------
 6852|      0|          if (session_enforce_http_messaging(session)) {
  ------------------
  |  Branch (6852:15): [True: 0, False: 0]
  ------------------
 6853|      0|            if (nghttp2_http_on_data_chunk(stream, (size_t)data_readlen) != 0) {
  ------------------
  |  Branch (6853:17): [True: 0, False: 0]
  ------------------
 6854|      0|              if (session->opt_flags & NGHTTP2_OPTMASK_NO_AUTO_WINDOW_UPDATE) {
  ------------------
  |  |   53|      0|#define NGHTTP2_OPTMASK_NO_AUTO_WINDOW_UPDATE 0x01U
  ------------------
  |  Branch (6854:19): [True: 0, False: 0]
  ------------------
 6855|       |                /* Consume all data for connection immediately here */
 6856|      0|                rv = session_update_connection_consumed_size(
 6857|      0|                  session, (size_t)data_readlen);
 6858|       |
 6859|      0|                if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6859:21): [True: 0, False: 0]
  ------------------
 6860|      0|                  return rv;
 6861|      0|                }
 6862|       |
 6863|      0|                if (iframe->state == NGHTTP2_IB_IGN_DATA) {
  ------------------
  |  Branch (6863:21): [True: 0, False: 0]
  ------------------
 6864|      0|                  return (nghttp2_ssize)inlen;
 6865|      0|                }
 6866|      0|              }
 6867|       |
 6868|      0|              rv = session_handle_invalid_stream2(
 6869|      0|                session, iframe->frame.hd.stream_id, &iframe->frame,
 6870|      0|                NGHTTP2_ERR_PROTO);
 6871|      0|              if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6871:19): [True: 0, False: 0]
  ------------------
 6872|      0|                return rv;
 6873|      0|              }
 6874|       |
 6875|      0|              rv = session_update_glitch_ratelim(session);
 6876|      0|              if (rv != 0) {
  ------------------
  |  Branch (6876:19): [True: 0, False: 0]
  ------------------
 6877|      0|                return rv;
 6878|      0|              }
 6879|       |
 6880|      0|              if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6880:19): [True: 0, False: 0]
  ------------------
 6881|      0|                return (nghttp2_ssize)inlen;
 6882|      0|              }
 6883|       |
 6884|      0|              busy = 1;
 6885|      0|              iframe->state = NGHTTP2_IB_IGN_DATA;
 6886|       |
 6887|      0|              break;
 6888|      0|            }
 6889|      0|          }
 6890|      0|          if (session->callbacks.on_data_chunk_recv_callback) {
  ------------------
  |  Branch (6890:15): [True: 0, False: 0]
  ------------------
 6891|      0|            rv = session->callbacks.on_data_chunk_recv_callback(
 6892|      0|              session, iframe->frame.hd.flags, iframe->frame.hd.stream_id,
 6893|      0|              in - readlen, (size_t)data_readlen, session->user_data);
 6894|      0|            if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6894:17): [True: 0, False: 0]
  ------------------
 6895|      0|              return NGHTTP2_ERR_CALLBACK_FAILURE;
 6896|      0|            }
 6897|       |
 6898|      0|            if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6898:17): [True: 0, False: 0]
  ------------------
 6899|      0|              return (nghttp2_ssize)inlen;
 6900|      0|            }
 6901|       |
 6902|      0|            if (rv == NGHTTP2_ERR_PAUSE) {
  ------------------
  |  Branch (6902:17): [True: 0, False: 0]
  ------------------
 6903|      0|              return (nghttp2_ssize)(in - first);
 6904|      0|            }
 6905|      0|          }
 6906|      0|        }
 6907|      0|      }
 6908|       |
 6909|      0|      if (iframe->payloadleft) {
  ------------------
  |  Branch (6909:11): [True: 0, False: 0]
  ------------------
 6910|      0|        break;
 6911|      0|      }
 6912|       |
 6913|      0|      rv = session_process_data_frame(session);
 6914|      0|      if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6914:11): [True: 0, False: 0]
  ------------------
 6915|      0|        return rv;
 6916|      0|      }
 6917|       |
 6918|      0|      if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6918:11): [True: 0, False: 0]
  ------------------
 6919|      0|        return (nghttp2_ssize)inlen;
 6920|      0|      }
 6921|       |
 6922|      0|      session_inbound_frame_reset(session);
 6923|       |
 6924|      0|      break;
 6925|      0|    case NGHTTP2_IB_IGN_DATA:
  ------------------
  |  Branch (6925:5): [True: 0, False: 6]
  ------------------
 6926|      0|      DEBUGF("recv: [IB_IGN_DATA]\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6927|       |
 6928|      0|      readlen = inbound_frame_payload_readlen(iframe, in, last);
 6929|      0|      iframe->payloadleft -= readlen;
 6930|      0|      in += readlen;
 6931|       |
 6932|      0|      DEBUGF("recv: readlen=%zu, payloadleft=%zu\n", readlen,
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6933|      0|             iframe->payloadleft);
 6934|       |
 6935|      0|      if (readlen > 0) {
  ------------------
  |  Branch (6935:11): [True: 0, False: 0]
  ------------------
 6936|       |        /* Update connection-level flow control window for ignored
 6937|       |           DATA frame too */
 6938|      0|        rv =
 6939|      0|          nghttp2_session_update_recv_connection_window_size(session, readlen);
 6940|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6940:13): [True: 0, False: 0]
  ------------------
 6941|      0|          return rv;
 6942|      0|        }
 6943|       |
 6944|      0|        if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6944:13): [True: 0, False: 0]
  ------------------
 6945|      0|          return (nghttp2_ssize)inlen;
 6946|      0|        }
 6947|       |
 6948|      0|        if (session->opt_flags & NGHTTP2_OPTMASK_NO_AUTO_WINDOW_UPDATE) {
  ------------------
  |  |   53|      0|#define NGHTTP2_OPTMASK_NO_AUTO_WINDOW_UPDATE 0x01U
  ------------------
  |  Branch (6948:13): [True: 0, False: 0]
  ------------------
 6949|       |          /* Ignored DATA is considered as "consumed" immediately. */
 6950|      0|          rv = session_update_connection_consumed_size(session, readlen);
 6951|       |
 6952|      0|          if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6952:15): [True: 0, False: 0]
  ------------------
 6953|      0|            return rv;
 6954|      0|          }
 6955|       |
 6956|      0|          if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6956:15): [True: 0, False: 0]
  ------------------
 6957|      0|            return (nghttp2_ssize)inlen;
 6958|      0|          }
 6959|      0|        }
 6960|      0|      }
 6961|       |
 6962|      0|      if (iframe->payloadleft) {
  ------------------
  |  Branch (6962:11): [True: 0, False: 0]
  ------------------
 6963|      0|        break;
 6964|      0|      }
 6965|       |
 6966|      0|      session_inbound_frame_reset(session);
 6967|       |
 6968|      0|      break;
 6969|      0|    case NGHTTP2_IB_IGN_ALL:
  ------------------
  |  Branch (6969:5): [True: 0, False: 6]
  ------------------
 6970|      0|      return (nghttp2_ssize)inlen;
 6971|      0|    case NGHTTP2_IB_READ_EXTENSION_PAYLOAD:
  ------------------
  |  Branch (6971:5): [True: 0, False: 6]
  ------------------
 6972|      0|      DEBUGF("recv: [IB_READ_EXTENSION_PAYLOAD]\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6973|       |
 6974|      0|      readlen = inbound_frame_payload_readlen(iframe, in, last);
 6975|      0|      iframe->payloadleft -= readlen;
 6976|      0|      in += readlen;
 6977|       |
 6978|      0|      DEBUGF("recv: readlen=%zu, payloadleft=%zu\n", readlen,
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6979|      0|             iframe->payloadleft);
 6980|       |
 6981|      0|      if (readlen > 0) {
  ------------------
  |  Branch (6981:11): [True: 0, False: 0]
  ------------------
 6982|      0|        rv = session_call_on_extension_chunk_recv_callback(
 6983|      0|          session, in - readlen, readlen);
 6984|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (6984:13): [True: 0, False: 0]
  ------------------
 6985|      0|          return rv;
 6986|      0|        }
 6987|       |
 6988|      0|        if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (6988:13): [True: 0, False: 0]
  ------------------
 6989|      0|          return (nghttp2_ssize)inlen;
 6990|      0|        }
 6991|       |
 6992|      0|        if (rv != 0) {
  ------------------
  |  Branch (6992:13): [True: 0, False: 0]
  ------------------
 6993|      0|          busy = 1;
 6994|       |
 6995|      0|          iframe->state = NGHTTP2_IB_IGN_PAYLOAD;
 6996|       |
 6997|      0|          break;
 6998|      0|        }
 6999|      0|      }
 7000|       |
 7001|      0|      if (iframe->payloadleft > 0) {
  ------------------
  |  Branch (7001:11): [True: 0, False: 0]
  ------------------
 7002|      0|        break;
 7003|      0|      }
 7004|       |
 7005|      0|      rv = session_process_extension_frame(session);
 7006|      0|      if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (7006:11): [True: 0, False: 0]
  ------------------
 7007|      0|        return rv;
 7008|      0|      }
 7009|       |
 7010|      0|      if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (7010:11): [True: 0, False: 0]
  ------------------
 7011|      0|        return (nghttp2_ssize)inlen;
 7012|      0|      }
 7013|       |
 7014|      0|      session_inbound_frame_reset(session);
 7015|       |
 7016|      0|      break;
 7017|      0|    case NGHTTP2_IB_READ_ALTSVC_PAYLOAD:
  ------------------
  |  Branch (7017:5): [True: 0, False: 6]
  ------------------
 7018|      0|      DEBUGF("recv: [IB_READ_ALTSVC_PAYLOAD]\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 7019|       |
 7020|      0|      readlen = inbound_frame_payload_readlen(iframe, in, last);
 7021|      0|      if (readlen > 0) {
  ------------------
  |  Branch (7021:11): [True: 0, False: 0]
  ------------------
 7022|      0|        iframe->lbuf.last = nghttp2_cpymem(iframe->lbuf.last, in, readlen);
 7023|       |
 7024|      0|        iframe->payloadleft -= readlen;
 7025|      0|        in += readlen;
 7026|      0|      }
 7027|       |
 7028|      0|      DEBUGF("recv: readlen=%zu, payloadleft=%zu\n", readlen,
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 7029|      0|             iframe->payloadleft);
 7030|       |
 7031|      0|      if (iframe->payloadleft) {
  ------------------
  |  Branch (7031:11): [True: 0, False: 0]
  ------------------
 7032|      0|        assert(nghttp2_buf_avail(&iframe->lbuf) > 0);
  ------------------
  |  Branch (7032:9): [True: 0, False: 0]
  |  Branch (7032:9): [True: 0, False: 0]
  ------------------
 7033|       |
 7034|      0|        break;
 7035|      0|      }
 7036|       |
 7037|      0|      rv = session_process_altsvc_frame(session);
 7038|      0|      if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (7038:11): [True: 0, False: 0]
  ------------------
 7039|      0|        return rv;
 7040|      0|      }
 7041|       |
 7042|      0|      if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (7042:11): [True: 0, False: 0]
  ------------------
 7043|      0|        return (nghttp2_ssize)inlen;
 7044|      0|      }
 7045|       |
 7046|      0|      session_inbound_frame_reset(session);
 7047|       |
 7048|      0|      break;
 7049|      0|    case NGHTTP2_IB_READ_ORIGIN_PAYLOAD:
  ------------------
  |  Branch (7049:5): [True: 0, False: 6]
  ------------------
 7050|      0|      DEBUGF("recv: [IB_READ_ORIGIN_PAYLOAD]\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 7051|       |
 7052|      0|      readlen = inbound_frame_payload_readlen(iframe, in, last);
 7053|       |
 7054|      0|      if (readlen > 0) {
  ------------------
  |  Branch (7054:11): [True: 0, False: 0]
  ------------------
 7055|      0|        iframe->lbuf.last = nghttp2_cpymem(iframe->lbuf.last, in, readlen);
 7056|       |
 7057|      0|        iframe->payloadleft -= readlen;
 7058|      0|        in += readlen;
 7059|      0|      }
 7060|       |
 7061|      0|      DEBUGF("recv: readlen=%zu, payloadleft=%zu\n", readlen,
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 7062|      0|             iframe->payloadleft);
 7063|       |
 7064|      0|      if (iframe->payloadleft) {
  ------------------
  |  Branch (7064:11): [True: 0, False: 0]
  ------------------
 7065|      0|        assert(nghttp2_buf_avail(&iframe->lbuf) > 0);
  ------------------
  |  Branch (7065:9): [True: 0, False: 0]
  |  Branch (7065:9): [True: 0, False: 0]
  ------------------
 7066|       |
 7067|      0|        break;
 7068|      0|      }
 7069|       |
 7070|      0|      rv = session_process_origin_frame(session);
 7071|       |
 7072|      0|      if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (7072:11): [True: 0, False: 0]
  ------------------
 7073|      0|        return rv;
 7074|      0|      }
 7075|       |
 7076|      0|      if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (7076:11): [True: 0, False: 0]
  ------------------
 7077|      0|        return (nghttp2_ssize)inlen;
 7078|      0|      }
 7079|       |
 7080|      0|      session_inbound_frame_reset(session);
 7081|       |
 7082|      0|      break;
 7083|      6|    }
 7084|       |
 7085|      6|    if (!busy && in == last) {
  ------------------
  |  Branch (7085:9): [True: 3, False: 3]
  |  Branch (7085:18): [True: 1, False: 2]
  ------------------
 7086|      1|      break;
 7087|      1|    }
 7088|       |
 7089|      5|    busy = 0;
 7090|      5|  }
 7091|       |
 7092|      1|  assert(in == last);
  ------------------
  |  Branch (7092:3): [True: 0, False: 1]
  |  Branch (7092:3): [True: 1, False: 0]
  ------------------
 7093|       |
 7094|      1|  return (nghttp2_ssize)(in - first);
 7095|      1|}
nghttp2_session_want_read:
 7128|     22|int nghttp2_session_want_read(nghttp2_session *session) {
 7129|     22|  size_t num_active_streams;
 7130|       |
 7131|       |  /* If this flag is set, we don't want to read. The application
 7132|       |     should drop the connection. */
 7133|     22|  if (session->goaway_flags & NGHTTP2_GOAWAY_TERM_SENT) {
  ------------------
  |  |  182|     22|#define NGHTTP2_GOAWAY_TERM_SENT 0x02U
  ------------------
  |  Branch (7133:7): [True: 0, False: 22]
  ------------------
 7134|      0|    return 0;
 7135|      0|  }
 7136|       |
 7137|     22|  num_active_streams = session_get_num_active_streams(session);
 7138|       |
 7139|       |  /* Unless termination GOAWAY is sent or received, we always want to
 7140|       |     read incoming frames. */
 7141|       |
 7142|     22|  if (num_active_streams > 0) {
  ------------------
  |  Branch (7142:7): [True: 18, False: 4]
  ------------------
 7143|     18|    return 1;
 7144|     18|  }
 7145|       |
 7146|       |  /* If there is no active streams and GOAWAY has been sent or
 7147|       |     received, we are done with this session. */
 7148|      4|  return (session->goaway_flags &
 7149|      4|          (NGHTTP2_GOAWAY_SENT | NGHTTP2_GOAWAY_RECV)) == 0;
  ------------------
  |  |  184|      4|#define NGHTTP2_GOAWAY_SENT 0x04U
  ------------------
                        (NGHTTP2_GOAWAY_SENT | NGHTTP2_GOAWAY_RECV)) == 0;
  ------------------
  |  |  186|      4|#define NGHTTP2_GOAWAY_RECV 0x08U
  ------------------
 7150|     22|}
nghttp2_session_want_write:
 7152|     15|int nghttp2_session_want_write(nghttp2_session *session) {
 7153|       |  /* If these flag is set, we don't want to write any data. The
 7154|       |     application should drop the connection. */
 7155|     15|  if (session->goaway_flags & NGHTTP2_GOAWAY_TERM_SENT) {
  ------------------
  |  |  182|     15|#define NGHTTP2_GOAWAY_TERM_SENT 0x02U
  ------------------
  |  Branch (7155:7): [True: 0, False: 15]
  ------------------
 7156|      0|    return 0;
 7157|      0|  }
 7158|       |
 7159|       |  /*
 7160|       |   * Unless termination GOAWAY is sent or received, we want to write
 7161|       |   * frames if there is pending ones. If pending frame is request/push
 7162|       |   * response HEADERS and concurrent stream limit is reached, we don't
 7163|       |   * want to write them.
 7164|       |   */
 7165|     15|  return session->aob.item || nghttp2_outbound_queue_top(&session->ob_urgent) ||
  ------------------
  |  |  192|     30|#define nghttp2_outbound_queue_top(Q) ((Q)->head)
  |  |  ------------------
  |  |  |  Branch (192:39): [True: 3, False: 12]
  |  |  ------------------
  ------------------
  |  Branch (7165:10): [True: 0, False: 15]
  ------------------
 7166|     12|         nghttp2_outbound_queue_top(&session->ob_reg) ||
  ------------------
  |  |  192|     27|#define nghttp2_outbound_queue_top(Q) ((Q)->head)
  |  |  ------------------
  |  |  |  Branch (192:39): [True: 2, False: 10]
  |  |  ------------------
  ------------------
 7167|     10|         (!session_sched_empty(session) && session->remote_window_size > 0) ||
  ------------------
  |  Branch (7167:11): [True: 0, False: 10]
  |  Branch (7167:44): [True: 0, False: 0]
  ------------------
 7168|     10|         (nghttp2_outbound_queue_top(&session->ob_syn) &&
  ------------------
  |  |  192|     20|#define nghttp2_outbound_queue_top(Q) ((Q)->head)
  |  |  ------------------
  |  |  |  Branch (192:39): [True: 2, False: 8]
  |  |  ------------------
  ------------------
 7169|      2|          !session_is_outgoing_concurrent_streams_max(session));
  ------------------
  |  Branch (7169:11): [True: 2, False: 0]
  ------------------
 7170|     15|}
nghttp2_session_add_window_update:
 7274|      6|                                      int32_t window_size_increment) {
 7275|      6|  int rv;
 7276|      6|  nghttp2_outbound_item *item;
 7277|      6|  nghttp2_frame *frame;
 7278|      6|  nghttp2_mem *mem;
 7279|       |
 7280|      6|  mem = &session->mem;
 7281|      6|  item = nghttp2_mem_malloc(mem, sizeof(nghttp2_outbound_item));
 7282|      6|  if (item == NULL) {
  ------------------
  |  Branch (7282:7): [True: 0, False: 6]
  ------------------
 7283|      0|    return NGHTTP2_ERR_NOMEM;
 7284|      0|  }
 7285|       |
 7286|      6|  nghttp2_outbound_item_init(item);
 7287|       |
 7288|      6|  frame = &item->frame;
 7289|       |
 7290|      6|  nghttp2_frame_window_update_init(&frame->window_update, flags, stream_id,
 7291|      6|                                   window_size_increment);
 7292|       |
 7293|      6|  rv = nghttp2_session_add_item(session, item);
 7294|       |
 7295|      6|  if (rv != 0) {
  ------------------
  |  Branch (7295:7): [True: 0, False: 6]
  ------------------
 7296|      0|    nghttp2_frame_window_update_free(&frame->window_update);
 7297|      0|    nghttp2_mem_free(mem, item);
 7298|      0|    return rv;
 7299|      0|  }
 7300|      6|  return 0;
 7301|      6|}
nghttp2_session_add_settings:
 7315|      3|                                 const nghttp2_settings_entry *iv, size_t niv) {
 7316|      3|  nghttp2_outbound_item *item;
 7317|      3|  nghttp2_frame *frame;
 7318|      3|  nghttp2_settings_entry *iv_copy;
 7319|      3|  size_t i;
 7320|      3|  int rv;
 7321|      3|  nghttp2_mem *mem;
 7322|      3|  nghttp2_inflight_settings *inflight_settings = NULL;
 7323|      3|  uint8_t no_rfc7540_pri = session->pending_no_rfc7540_priorities;
 7324|       |
 7325|      3|  mem = &session->mem;
 7326|       |
 7327|      3|  if (flags & NGHTTP2_FLAG_ACK) {
  ------------------
  |  Branch (7327:7): [True: 1, False: 2]
  ------------------
 7328|      1|    if (niv != 0) {
  ------------------
  |  Branch (7328:9): [True: 0, False: 1]
  ------------------
 7329|      0|      return NGHTTP2_ERR_INVALID_ARGUMENT;
 7330|      0|    }
 7331|       |
 7332|      1|    if (session->obq_flood_counter_ >= session->max_outbound_ack) {
  ------------------
  |  Branch (7332:9): [True: 0, False: 1]
  ------------------
 7333|      0|      return NGHTTP2_ERR_FLOODED;
 7334|      0|    }
 7335|      1|  }
 7336|       |
 7337|      3|  if (!nghttp2_iv_check(iv, niv)) {
  ------------------
  |  Branch (7337:7): [True: 0, False: 3]
  ------------------
 7338|      0|    return NGHTTP2_ERR_INVALID_ARGUMENT;
 7339|      0|  }
 7340|       |
 7341|      9|  for (i = 0; i < niv; ++i) {
  ------------------
  |  Branch (7341:15): [True: 6, False: 3]
  ------------------
 7342|      6|    if (iv[i].settings_id != NGHTTP2_SETTINGS_NO_RFC7540_PRIORITIES) {
  ------------------
  |  Branch (7342:9): [True: 6, False: 0]
  ------------------
 7343|      6|      continue;
 7344|      6|    }
 7345|       |
 7346|      0|    if (no_rfc7540_pri == UINT8_MAX) {
  ------------------
  |  Branch (7346:9): [True: 0, False: 0]
  ------------------
 7347|      0|      no_rfc7540_pri = (uint8_t)iv[i].value;
 7348|      0|      continue;
 7349|      0|    }
 7350|       |
 7351|      0|    if (iv[i].value != (uint32_t)no_rfc7540_pri) {
  ------------------
  |  Branch (7351:9): [True: 0, False: 0]
  ------------------
 7352|      0|      return NGHTTP2_ERR_INVALID_ARGUMENT;
 7353|      0|    }
 7354|      0|  }
 7355|       |
 7356|      3|  item = nghttp2_mem_malloc(mem, sizeof(nghttp2_outbound_item));
 7357|      3|  if (item == NULL) {
  ------------------
  |  Branch (7357:7): [True: 0, False: 3]
  ------------------
 7358|      0|    return NGHTTP2_ERR_NOMEM;
 7359|      0|  }
 7360|       |
 7361|      3|  if (niv > 0) {
  ------------------
  |  Branch (7361:7): [True: 2, False: 1]
  ------------------
 7362|      2|    iv_copy = nghttp2_frame_iv_copy(iv, niv, mem);
 7363|      2|    if (iv_copy == NULL) {
  ------------------
  |  Branch (7363:9): [True: 0, False: 2]
  ------------------
 7364|      0|      nghttp2_mem_free(mem, item);
 7365|      0|      return NGHTTP2_ERR_NOMEM;
 7366|      0|    }
 7367|      2|  } else {
 7368|      1|    iv_copy = NULL;
 7369|      1|  }
 7370|       |
 7371|      3|  if ((flags & NGHTTP2_FLAG_ACK) == 0) {
  ------------------
  |  Branch (7371:7): [True: 2, False: 1]
  ------------------
 7372|      2|    rv = inflight_settings_new(&inflight_settings, iv, niv, mem);
 7373|      2|    if (rv != 0) {
  ------------------
  |  Branch (7373:9): [True: 0, False: 2]
  ------------------
 7374|      0|      assert(nghttp2_is_fatal(rv));
  ------------------
  |  Branch (7374:7): [True: 0, False: 0]
  |  Branch (7374:7): [True: 0, False: 0]
  ------------------
 7375|      0|      nghttp2_mem_free(mem, iv_copy);
 7376|      0|      nghttp2_mem_free(mem, item);
 7377|      0|      return rv;
 7378|      0|    }
 7379|      2|  }
 7380|       |
 7381|      3|  nghttp2_outbound_item_init(item);
 7382|       |
 7383|      3|  frame = &item->frame;
 7384|       |
 7385|      3|  nghttp2_frame_settings_init(&frame->settings, flags, iv_copy, niv);
 7386|      3|  rv = nghttp2_session_add_item(session, item);
 7387|      3|  if (rv != 0) {
  ------------------
  |  Branch (7387:7): [True: 0, False: 3]
  ------------------
 7388|       |    /* The only expected error is fatal one */
 7389|      0|    assert(nghttp2_is_fatal(rv));
  ------------------
  |  Branch (7389:5): [True: 0, False: 0]
  |  Branch (7389:5): [True: 0, False: 0]
  ------------------
 7390|       |
 7391|      0|    inflight_settings_del(inflight_settings, mem);
 7392|       |
 7393|      0|    nghttp2_frame_settings_free(&frame->settings, mem);
 7394|      0|    nghttp2_mem_free(mem, item);
 7395|       |
 7396|      0|    return rv;
 7397|      0|  }
 7398|       |
 7399|      3|  if (flags & NGHTTP2_FLAG_ACK) {
  ------------------
  |  Branch (7399:7): [True: 1, False: 2]
  ------------------
 7400|      1|    ++session->obq_flood_counter_;
 7401|      2|  } else {
 7402|      2|    session_append_inflight_settings(session, inflight_settings);
 7403|      2|  }
 7404|       |
 7405|       |  /* Extract NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS and ENABLE_PUSH
 7406|       |     here.  We use it to refuse the incoming stream and PUSH_PROMISE
 7407|       |     with RST_STREAM. */
 7408|       |
 7409|      7|  for (i = niv; i > 0; --i) {
  ------------------
  |  Branch (7409:17): [True: 6, False: 1]
  ------------------
 7410|      6|    if (iv[i - 1].settings_id == NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS) {
  ------------------
  |  Branch (7410:9): [True: 2, False: 4]
  ------------------
 7411|      2|      session->pending_local_max_concurrent_stream = iv[i - 1].value;
 7412|      2|      break;
 7413|      2|    }
 7414|      6|  }
 7415|       |
 7416|      3|  for (i = niv; i > 0; --i) {
  ------------------
  |  Branch (7416:17): [True: 2, False: 1]
  ------------------
 7417|      2|    if (iv[i - 1].settings_id == NGHTTP2_SETTINGS_ENABLE_PUSH) {
  ------------------
  |  Branch (7417:9): [True: 2, False: 0]
  ------------------
 7418|      2|      session->pending_enable_push = (uint8_t)iv[i - 1].value;
 7419|      2|      break;
 7420|      2|    }
 7421|      2|  }
 7422|       |
 7423|      9|  for (i = niv; i > 0; --i) {
  ------------------
  |  Branch (7423:17): [True: 6, False: 3]
  ------------------
 7424|      6|    if (iv[i - 1].settings_id == NGHTTP2_SETTINGS_ENABLE_CONNECT_PROTOCOL) {
  ------------------
  |  Branch (7424:9): [True: 0, False: 6]
  ------------------
 7425|      0|      session->pending_enable_connect_protocol = (uint8_t)iv[i - 1].value;
 7426|      0|      break;
 7427|      0|    }
 7428|      6|  }
 7429|       |
 7430|      3|  if (no_rfc7540_pri == UINT8_MAX) {
  ------------------
  |  Branch (7430:7): [True: 2, False: 1]
  ------------------
 7431|      2|    session->pending_no_rfc7540_priorities = 0;
 7432|      2|  } else {
 7433|      1|    session->pending_no_rfc7540_priorities = no_rfc7540_pri;
 7434|      1|  }
 7435|       |
 7436|      3|  return 0;
 7437|      3|}
nghttp2_session_get_stream_user_data:
 7597|      4|                                           int32_t stream_id) {
 7598|      4|  nghttp2_stream *stream;
 7599|      4|  stream = nghttp2_session_get_stream(session, stream_id);
 7600|      4|  if (stream) {
  ------------------
  |  Branch (7600:7): [True: 4, False: 0]
  ------------------
 7601|      4|    return stream->stream_user_data;
 7602|      4|  } else {
 7603|       |    return NULL;
 7604|      0|  }
 7605|      4|}
nghttp2_session_set_stream_user_data:
 7609|      2|                                         void *stream_user_data) {
 7610|      2|  nghttp2_stream *stream;
 7611|      2|  nghttp2_frame *frame;
 7612|      2|  nghttp2_outbound_item *item;
 7613|       |
 7614|      2|  stream = nghttp2_session_get_stream(session, stream_id);
 7615|      2|  if (stream) {
  ------------------
  |  Branch (7615:7): [True: 2, False: 0]
  ------------------
 7616|      2|    stream->stream_user_data = stream_user_data;
 7617|      2|    return 0;
 7618|      2|  }
 7619|       |
 7620|      0|  if (session->server || !nghttp2_session_is_my_stream_id(session, stream_id) ||
  ------------------
  |  Branch (7620:7): [True: 0, False: 0]
  |  Branch (7620:26): [True: 0, False: 0]
  ------------------
 7621|      0|      !nghttp2_outbound_queue_top(&session->ob_syn)) {
  ------------------
  |  |  192|      0|#define nghttp2_outbound_queue_top(Q) ((Q)->head)
  ------------------
  |  Branch (7621:7): [True: 0, False: 0]
  ------------------
 7622|      0|    return NGHTTP2_ERR_INVALID_ARGUMENT;
 7623|      0|  }
 7624|       |
 7625|      0|  frame = &nghttp2_outbound_queue_top(&session->ob_syn)->frame;
  ------------------
  |  |  192|      0|#define nghttp2_outbound_queue_top(Q) ((Q)->head)
  ------------------
 7626|      0|  assert(frame->hd.type == NGHTTP2_HEADERS);
  ------------------
  |  Branch (7626:3): [True: 0, False: 0]
  |  Branch (7626:3): [True: 0, False: 0]
  ------------------
 7627|       |
 7628|      0|  if (frame->hd.stream_id > stream_id ||
  ------------------
  |  Branch (7628:7): [True: 0, False: 0]
  ------------------
 7629|      0|      (uint32_t)stream_id >= session->next_stream_id) {
  ------------------
  |  Branch (7629:7): [True: 0, False: 0]
  ------------------
 7630|      0|    return NGHTTP2_ERR_INVALID_ARGUMENT;
 7631|      0|  }
 7632|       |
 7633|      0|  for (item = session->ob_syn.head; item; item = item->qnext) {
  ------------------
  |  Branch (7633:37): [True: 0, False: 0]
  ------------------
 7634|      0|    if (item->frame.hd.stream_id < stream_id) {
  ------------------
  |  Branch (7634:9): [True: 0, False: 0]
  ------------------
 7635|      0|      continue;
 7636|      0|    }
 7637|       |
 7638|      0|    if (item->frame.hd.stream_id > stream_id) {
  ------------------
  |  Branch (7638:9): [True: 0, False: 0]
  ------------------
 7639|      0|      break;
 7640|      0|    }
 7641|       |
 7642|      0|    item->aux_data.headers.stream_user_data = stream_user_data;
 7643|      0|    return 0;
 7644|      0|  }
 7645|       |
 7646|      0|  return NGHTTP2_ERR_INVALID_ARGUMENT;
 7647|      0|}
nghttp2_session_resume_data:
 7649|      2|int nghttp2_session_resume_data(nghttp2_session *session, int32_t stream_id) {
 7650|      2|  int rv;
 7651|      2|  nghttp2_stream *stream;
 7652|      2|  stream = nghttp2_session_get_stream(session, stream_id);
 7653|      2|  if (stream == NULL || !nghttp2_stream_check_deferred_item(stream)) {
  ------------------
  |  Branch (7653:7): [True: 2, False: 0]
  |  Branch (7653:25): [True: 0, False: 0]
  ------------------
 7654|      2|    return NGHTTP2_ERR_INVALID_ARGUMENT;
 7655|      2|  }
 7656|       |
 7657|      0|  rv = session_resume_deferred_stream_item(session, stream,
 7658|      0|                                           NGHTTP2_STREAM_FLAG_DEFERRED_USER);
  ------------------
  |  |   86|      0|#define NGHTTP2_STREAM_FLAG_DEFERRED_USER 0x08U
  ------------------
 7659|       |
 7660|      0|  if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (7660:7): [True: 0, False: 0]
  ------------------
 7661|      0|    return rv;
 7662|      0|  }
 7663|       |
 7664|      0|  return 0;
 7665|      0|}
nghttp2_session_get_stream_effective_local_window_size:
 7687|      2|                                                       int32_t stream_id) {
 7688|      2|  nghttp2_stream *stream;
 7689|      2|  stream = nghttp2_session_get_stream(session, stream_id);
 7690|      2|  if (stream == NULL) {
  ------------------
  |  Branch (7690:7): [True: 0, False: 2]
  ------------------
 7691|      0|    return -1;
 7692|      0|  }
 7693|      2|  return stream->local_window_size;
 7694|      2|}
nghttp2_session_get_remote_settings:
 7749|      2|                                             nghttp2_settings_id id) {
 7750|      2|  switch (id) {
  ------------------
  |  Branch (7750:11): [True: 2, False: 0]
  ------------------
 7751|      0|  case NGHTTP2_SETTINGS_HEADER_TABLE_SIZE:
  ------------------
  |  Branch (7751:3): [True: 0, False: 2]
  ------------------
 7752|      0|    return session->remote_settings.header_table_size;
 7753|      1|  case NGHTTP2_SETTINGS_ENABLE_PUSH:
  ------------------
  |  Branch (7753:3): [True: 1, False: 1]
  ------------------
 7754|      1|    return session->remote_settings.enable_push;
 7755|      1|  case NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS:
  ------------------
  |  Branch (7755:3): [True: 1, False: 1]
  ------------------
 7756|      1|    return session->remote_settings.max_concurrent_streams;
 7757|      0|  case NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE:
  ------------------
  |  Branch (7757:3): [True: 0, False: 2]
  ------------------
 7758|      0|    return session->remote_settings.initial_window_size;
 7759|      0|  case NGHTTP2_SETTINGS_MAX_FRAME_SIZE:
  ------------------
  |  Branch (7759:3): [True: 0, False: 2]
  ------------------
 7760|      0|    return session->remote_settings.max_frame_size;
 7761|      0|  case NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE:
  ------------------
  |  Branch (7761:3): [True: 0, False: 2]
  ------------------
 7762|      0|    return session->remote_settings.max_header_list_size;
 7763|      0|  case NGHTTP2_SETTINGS_ENABLE_CONNECT_PROTOCOL:
  ------------------
  |  Branch (7763:3): [True: 0, False: 2]
  ------------------
 7764|      0|    return session->remote_settings.enable_connect_protocol;
 7765|      0|  case NGHTTP2_SETTINGS_NO_RFC7540_PRIORITIES:
  ------------------
  |  Branch (7765:3): [True: 0, False: 2]
  ------------------
 7766|      0|    return session->remote_settings.no_rfc7540_priorities;
 7767|      2|  }
 7768|       |
 7769|      2|  assert(0);
  ------------------
  |  Branch (7769:3): [Folded, False: 0]
  |  Branch (7769:3): [Folded, False: 0]
  ------------------
 7770|      0|  abort(); /* if NDEBUG is set */
 7771|      0|}
nghttp2_session.c:session_new:
  437|      2|                       const nghttp2_option *option, nghttp2_mem *mem) {
  438|      2|  int rv;
  439|      2|  size_t nbuffer;
  440|      2|  size_t max_deflate_dynamic_table_size =
  441|      2|    NGHTTP2_HD_DEFAULT_MAX_DEFLATE_BUFFER_SIZE;
  ------------------
  |  |   50|      2|#define NGHTTP2_HD_DEFAULT_MAX_DEFLATE_BUFFER_SIZE (1 << 12)
  ------------------
  442|      2|  size_t i;
  443|      2|  uint64_t map_seed;
  444|       |
  445|      2|  if (mem == NULL) {
  ------------------
  |  Branch (445:7): [True: 0, False: 2]
  ------------------
  446|      0|    mem = nghttp2_mem_default();
  447|      0|  }
  448|       |
  449|      2|  *session_ptr = nghttp2_mem_calloc(mem, 1, sizeof(nghttp2_session));
  450|      2|  if (*session_ptr == NULL) {
  ------------------
  |  Branch (450:7): [True: 0, False: 2]
  ------------------
  451|      0|    rv = NGHTTP2_ERR_NOMEM;
  452|      0|    goto fail_session;
  453|      0|  }
  454|       |
  455|      2|  (*session_ptr)->mem = *mem;
  456|      2|  mem = &(*session_ptr)->mem;
  457|       |
  458|       |  /* next_stream_id is initialized in either
  459|       |     nghttp2_session_client_new2 or nghttp2_session_server_new2 */
  460|       |
  461|      2|  (*session_ptr)->remote_window_size = NGHTTP2_INITIAL_CONNECTION_WINDOW_SIZE;
  ------------------
  |  |  237|      2|#define NGHTTP2_INITIAL_CONNECTION_WINDOW_SIZE ((1 << 16) - 1)
  ------------------
  462|      2|  (*session_ptr)->recv_window_size = 0;
  463|      2|  (*session_ptr)->consumed_size = 0;
  464|      2|  (*session_ptr)->recv_reduction = 0;
  465|      2|  (*session_ptr)->local_window_size = NGHTTP2_INITIAL_CONNECTION_WINDOW_SIZE;
  ------------------
  |  |  237|      2|#define NGHTTP2_INITIAL_CONNECTION_WINDOW_SIZE ((1 << 16) - 1)
  ------------------
  466|       |
  467|      2|  (*session_ptr)->goaway_flags = NGHTTP2_GOAWAY_NONE;
  ------------------
  |  |  177|      2|#define NGHTTP2_GOAWAY_NONE 0x00U
  ------------------
  468|      2|  (*session_ptr)->local_last_stream_id = (1u << 31) - 1;
  469|      2|  (*session_ptr)->remote_last_stream_id = (1u << 31) - 1;
  470|       |
  471|      2|  (*session_ptr)->pending_local_max_concurrent_stream =
  472|      2|    NGHTTP2_DEFAULT_MAX_CONCURRENT_STREAMS;
  ------------------
  |  |   99|      2|#define NGHTTP2_DEFAULT_MAX_CONCURRENT_STREAMS 0xFFFFFFFFU
  ------------------
  473|      2|  (*session_ptr)->pending_enable_push = 1;
  474|      2|  (*session_ptr)->pending_no_rfc7540_priorities = UINT8_MAX;
  475|       |
  476|      2|  nghttp2_ratelim_init(&(*session_ptr)->stream_reset_ratelim,
  477|      2|                       NGHTTP2_DEFAULT_STREAM_RESET_BURST,
  ------------------
  |  |  102|      2|#define NGHTTP2_DEFAULT_STREAM_RESET_BURST 1000
  ------------------
  478|      2|                       NGHTTP2_DEFAULT_STREAM_RESET_RATE);
  ------------------
  |  |  103|      2|#define NGHTTP2_DEFAULT_STREAM_RESET_RATE 33
  ------------------
  479|       |
  480|      2|  nghttp2_ratelim_init(&(*session_ptr)->glitch_ratelim,
  481|      2|                       NGHTTP2_DEFAULT_GLITCH_BURST,
  ------------------
  |  |  106|      2|#define NGHTTP2_DEFAULT_GLITCH_BURST 10000
  ------------------
  482|      2|                       NGHTTP2_DEFAULT_GLITCH_RATE);
  ------------------
  |  |  107|      2|#define NGHTTP2_DEFAULT_GLITCH_RATE 330
  ------------------
  483|       |
  484|      2|  if (server) {
  ------------------
  |  Branch (484:7): [True: 0, False: 2]
  ------------------
  485|      0|    (*session_ptr)->server = 1;
  486|      0|  }
  487|       |
  488|      2|  init_settings(&(*session_ptr)->remote_settings);
  489|      2|  init_settings(&(*session_ptr)->local_settings);
  490|       |
  491|      2|  (*session_ptr)->max_incoming_reserved_streams =
  492|      2|    NGHTTP2_MAX_INCOMING_RESERVED_STREAMS;
  ------------------
  |  |   86|      2|#define NGHTTP2_MAX_INCOMING_RESERVED_STREAMS 200
  ------------------
  493|       |
  494|       |  /* Limit max outgoing concurrent streams to sensible value */
  495|      2|  (*session_ptr)->remote_settings.max_concurrent_streams = 100;
  496|       |
  497|      2|  (*session_ptr)->max_send_header_block_length = NGHTTP2_MAX_HEADERSLEN;
  ------------------
  |  |   58|      2|#define NGHTTP2_MAX_HEADERSLEN 65536
  ------------------
  498|      2|  (*session_ptr)->max_outbound_ack = NGHTTP2_DEFAULT_MAX_OBQ_FLOOD_ITEM;
  ------------------
  |  |   96|      2|#define NGHTTP2_DEFAULT_MAX_OBQ_FLOOD_ITEM 1000
  ------------------
  499|      2|  (*session_ptr)->max_settings = NGHTTP2_DEFAULT_MAX_SETTINGS;
  ------------------
  |  |  266|      2|#define NGHTTP2_DEFAULT_MAX_SETTINGS 32
  ------------------
  500|      2|  (*session_ptr)->max_continuations = NGHTTP2_DEFAULT_MAX_CONTINUATIONS;
  ------------------
  |  |  111|      2|#define NGHTTP2_DEFAULT_MAX_CONTINUATIONS 8
  ------------------
  501|       |
  502|      2|  if (option) {
  ------------------
  |  Branch (502:7): [True: 2, False: 0]
  ------------------
  503|      2|    if ((option->opt_set_mask & NGHTTP2_OPT_NO_AUTO_WINDOW_UPDATE) &&
  ------------------
  |  |   45|      2|#define NGHTTP2_OPT_NO_AUTO_WINDOW_UPDATE 0x01U
  ------------------
  |  Branch (503:9): [True: 2, False: 0]
  ------------------
  504|      2|        option->no_auto_window_update) {
  ------------------
  |  Branch (504:9): [True: 2, False: 0]
  ------------------
  505|      2|      (*session_ptr)->opt_flags |= NGHTTP2_OPTMASK_NO_AUTO_WINDOW_UPDATE;
  ------------------
  |  |   53|      2|#define NGHTTP2_OPTMASK_NO_AUTO_WINDOW_UPDATE 0x01U
  ------------------
  506|      2|    }
  507|       |
  508|      2|    if (option->opt_set_mask & NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS) {
  ------------------
  |  |   59|      2|#define NGHTTP2_OPT_PEER_MAX_CONCURRENT_STREAMS 0x02U
  ------------------
  |  Branch (508:9): [True: 0, False: 2]
  ------------------
  509|      0|      (*session_ptr)->remote_settings.max_concurrent_streams =
  510|      0|        option->peer_max_concurrent_streams;
  511|      0|    }
  512|       |
  513|      2|    if (option->opt_set_mask & NGHTTP2_OPT_MAX_RESERVED_REMOTE_STREAMS) {
  ------------------
  |  |   62|      2|#define NGHTTP2_OPT_MAX_RESERVED_REMOTE_STREAMS 0x10U
  ------------------
  |  Branch (513:9): [True: 0, False: 2]
  ------------------
  514|      0|      (*session_ptr)->max_incoming_reserved_streams =
  515|      0|        option->max_reserved_remote_streams;
  516|      0|    }
  517|       |
  518|      2|    if ((option->opt_set_mask & NGHTTP2_OPT_NO_RECV_CLIENT_MAGIC) &&
  ------------------
  |  |   60|      2|#define NGHTTP2_OPT_NO_RECV_CLIENT_MAGIC 0x04U
  ------------------
  |  Branch (518:9): [True: 0, False: 2]
  ------------------
  519|      0|        option->no_recv_client_magic) {
  ------------------
  |  Branch (519:9): [True: 0, False: 0]
  ------------------
  520|      0|      (*session_ptr)->opt_flags |= NGHTTP2_OPTMASK_NO_RECV_CLIENT_MAGIC;
  ------------------
  |  |   54|      0|#define NGHTTP2_OPTMASK_NO_RECV_CLIENT_MAGIC 0x02U
  ------------------
  521|      0|    }
  522|       |
  523|      2|    if ((option->opt_set_mask & NGHTTP2_OPT_NO_HTTP_MESSAGING) &&
  ------------------
  |  |   61|      2|#define NGHTTP2_OPT_NO_HTTP_MESSAGING 0x08U
  ------------------
  |  Branch (523:9): [True: 0, False: 2]
  ------------------
  524|      0|        option->no_http_messaging) {
  ------------------
  |  Branch (524:9): [True: 0, False: 0]
  ------------------
  525|      0|      (*session_ptr)->opt_flags |= NGHTTP2_OPTMASK_NO_HTTP_MESSAGING;
  ------------------
  |  |   55|      0|#define NGHTTP2_OPTMASK_NO_HTTP_MESSAGING 0x04U
  ------------------
  526|      0|    }
  527|       |
  528|      2|    if (option->opt_set_mask & NGHTTP2_OPT_USER_RECV_EXT_TYPES) {
  ------------------
  |  |   63|      2|#define NGHTTP2_OPT_USER_RECV_EXT_TYPES 0x20U
  ------------------
  |  Branch (528:9): [True: 0, False: 2]
  ------------------
  529|      0|      memcpy((*session_ptr)->user_recv_ext_types, option->user_recv_ext_types,
  530|      0|             sizeof((*session_ptr)->user_recv_ext_types));
  531|      0|    }
  532|       |
  533|      2|    if (option->opt_set_mask & NGHTTP2_OPT_BUILTIN_RECV_EXT_TYPES) {
  ------------------
  |  |   65|      2|#define NGHTTP2_OPT_BUILTIN_RECV_EXT_TYPES 0x80U
  ------------------
  |  Branch (533:9): [True: 0, False: 2]
  ------------------
  534|      0|      (*session_ptr)->builtin_recv_ext_types = option->builtin_recv_ext_types;
  535|      0|    }
  536|       |
  537|      2|    if ((option->opt_set_mask & NGHTTP2_OPT_NO_AUTO_PING_ACK) &&
  ------------------
  |  |   64|      2|#define NGHTTP2_OPT_NO_AUTO_PING_ACK 0x40U
  ------------------
  |  Branch (537:9): [True: 0, False: 2]
  ------------------
  538|      0|        option->no_auto_ping_ack) {
  ------------------
  |  Branch (538:9): [True: 0, False: 0]
  ------------------
  539|      0|      (*session_ptr)->opt_flags |= NGHTTP2_OPTMASK_NO_AUTO_PING_ACK;
  ------------------
  |  |   56|      0|#define NGHTTP2_OPTMASK_NO_AUTO_PING_ACK 0x08U
  ------------------
  540|      0|    }
  541|       |
  542|      2|    if (option->opt_set_mask & NGHTTP2_OPT_MAX_SEND_HEADER_BLOCK_LENGTH) {
  ------------------
  |  |   66|      2|#define NGHTTP2_OPT_MAX_SEND_HEADER_BLOCK_LENGTH 0x0100U
  ------------------
  |  Branch (542:9): [True: 0, False: 2]
  ------------------
  543|      0|      (*session_ptr)->max_send_header_block_length =
  544|      0|        option->max_send_header_block_length;
  545|      0|    }
  546|       |
  547|      2|    if (option->opt_set_mask & NGHTTP2_OPT_MAX_DEFLATE_DYNAMIC_TABLE_SIZE) {
  ------------------
  |  |   67|      2|#define NGHTTP2_OPT_MAX_DEFLATE_DYNAMIC_TABLE_SIZE 0x0200U
  ------------------
  |  Branch (547:9): [True: 0, False: 2]
  ------------------
  548|      0|      max_deflate_dynamic_table_size = option->max_deflate_dynamic_table_size;
  549|      0|    }
  550|       |
  551|      2|    if (option->opt_set_mask & NGHTTP2_OPT_MAX_OUTBOUND_ACK) {
  ------------------
  |  |   69|      2|#define NGHTTP2_OPT_MAX_OUTBOUND_ACK 0x0800U
  ------------------
  |  Branch (551:9): [True: 0, False: 2]
  ------------------
  552|      0|      (*session_ptr)->max_outbound_ack = option->max_outbound_ack;
  553|      0|    }
  554|       |
  555|      2|    if ((option->opt_set_mask & NGHTTP2_OPT_MAX_SETTINGS) &&
  ------------------
  |  |   70|      2|#define NGHTTP2_OPT_MAX_SETTINGS 0x1000U
  ------------------
  |  Branch (555:9): [True: 0, False: 2]
  ------------------
  556|      0|        option->max_settings) {
  ------------------
  |  Branch (556:9): [True: 0, False: 0]
  ------------------
  557|      0|      (*session_ptr)->max_settings = option->max_settings;
  558|      0|    }
  559|       |
  560|      2|    if ((option->opt_set_mask &
  ------------------
  |  Branch (560:9): [True: 2, False: 0]
  ------------------
  561|      2|         NGHTTP2_OPT_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION) &&
  ------------------
  |  |   72|      2|#define NGHTTP2_OPT_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION 0x4000U
  ------------------
  562|      2|        option->no_rfc9113_leading_and_trailing_ws_validation) {
  ------------------
  |  Branch (562:9): [True: 2, False: 0]
  ------------------
  563|      2|      (*session_ptr)->opt_flags |=
  564|      2|        NGHTTP2_OPTMASK_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION;
  ------------------
  |  |   57|      2|#define NGHTTP2_OPTMASK_NO_RFC9113_LEADING_AND_TRAILING_WS_VALIDATION 0x40U
  ------------------
  565|      2|    }
  566|       |
  567|      2|    if (option->opt_set_mask & NGHTTP2_OPT_STREAM_RESET_RATE_LIMIT) {
  ------------------
  |  |   73|      2|#define NGHTTP2_OPT_STREAM_RESET_RATE_LIMIT 0x8000U
  ------------------
  |  Branch (567:9): [True: 0, False: 2]
  ------------------
  568|      0|      nghttp2_ratelim_init(&(*session_ptr)->stream_reset_ratelim,
  569|      0|                           option->stream_reset_burst,
  570|      0|                           option->stream_reset_rate);
  571|      0|    }
  572|       |
  573|      2|    if (option->opt_set_mask & NGHTTP2_OPT_MAX_CONTINUATIONS) {
  ------------------
  |  |   74|      2|#define NGHTTP2_OPT_MAX_CONTINUATIONS 0x010000U
  ------------------
  |  Branch (573:9): [True: 0, False: 2]
  ------------------
  574|      0|      (*session_ptr)->max_continuations = option->max_continuations;
  575|      0|    }
  576|       |
  577|      2|    if (option->opt_set_mask & NGHTTP2_OPT_GLITCH_RATE_LIMIT) {
  ------------------
  |  |   75|      2|#define NGHTTP2_OPT_GLITCH_RATE_LIMIT 0x020000U
  ------------------
  |  Branch (577:9): [True: 0, False: 2]
  ------------------
  578|      0|      nghttp2_ratelim_init(&(*session_ptr)->glitch_ratelim,
  579|      0|                           option->glitch_burst, option->glitch_rate);
  580|      0|    }
  581|      2|  }
  582|       |
  583|      2|  rv = nghttp2_hd_deflate_init2(&(*session_ptr)->hd_deflater,
  584|      2|                                max_deflate_dynamic_table_size, mem);
  585|      2|  if (rv != 0) {
  ------------------
  |  Branch (585:7): [True: 0, False: 2]
  ------------------
  586|      0|    goto fail_hd_deflater;
  587|      0|  }
  588|      2|  rv = nghttp2_hd_inflate_init(&(*session_ptr)->hd_inflater, mem);
  589|      2|  if (rv != 0) {
  ------------------
  |  Branch (589:7): [True: 0, False: 2]
  ------------------
  590|      0|    goto fail_hd_inflater;
  591|      0|  }
  592|       |
  593|      2|  nbuffer = ((*session_ptr)->max_send_header_block_length +
  594|      2|             NGHTTP2_FRAMEBUF_CHUNKLEN - 1) /
  ------------------
  |  |   50|      2|  (NGHTTP2_FRAME_HDLEN + 1 + NGHTTP2_MAX_PAYLOADLEN)
  |  |  ------------------
  |  |  |  |   40|      2|#define NGHTTP2_FRAME_HDLEN 9
  |  |  ------------------
  |  |                 (NGHTTP2_FRAME_HDLEN + 1 + NGHTTP2_MAX_PAYLOADLEN)
  |  |  ------------------
  |  |  |  |   45|      2|#define NGHTTP2_MAX_PAYLOADLEN 16384
  |  |  ------------------
  ------------------
  595|      2|            NGHTTP2_FRAMEBUF_CHUNKLEN;
  ------------------
  |  |   50|      2|  (NGHTTP2_FRAME_HDLEN + 1 + NGHTTP2_MAX_PAYLOADLEN)
  |  |  ------------------
  |  |  |  |   40|      2|#define NGHTTP2_FRAME_HDLEN 9
  |  |  ------------------
  |  |                 (NGHTTP2_FRAME_HDLEN + 1 + NGHTTP2_MAX_PAYLOADLEN)
  |  |  ------------------
  |  |  |  |   45|      2|#define NGHTTP2_MAX_PAYLOADLEN 16384
  |  |  ------------------
  ------------------
  596|       |
  597|      2|  if (nbuffer == 0) {
  ------------------
  |  Branch (597:7): [True: 0, False: 2]
  ------------------
  598|      0|    nbuffer = 1;
  599|      0|  }
  600|       |
  601|       |  /* 1 for Pad Field. */
  602|      2|  rv = nghttp2_bufs_init3(&(*session_ptr)->aob.framebufs,
  603|      2|                          NGHTTP2_FRAMEBUF_CHUNKLEN, nbuffer, 1,
  ------------------
  |  |   50|      2|  (NGHTTP2_FRAME_HDLEN + 1 + NGHTTP2_MAX_PAYLOADLEN)
  |  |  ------------------
  |  |  |  |   40|      2|#define NGHTTP2_FRAME_HDLEN 9
  |  |  ------------------
  |  |                 (NGHTTP2_FRAME_HDLEN + 1 + NGHTTP2_MAX_PAYLOADLEN)
  |  |  ------------------
  |  |  |  |   45|      2|#define NGHTTP2_MAX_PAYLOADLEN 16384
  |  |  ------------------
  ------------------
  604|      2|                          NGHTTP2_FRAME_HDLEN + 1, mem);
  ------------------
  |  |   40|      2|#define NGHTTP2_FRAME_HDLEN 9
  ------------------
  605|      2|  if (rv != 0) {
  ------------------
  |  Branch (605:7): [True: 0, False: 2]
  ------------------
  606|      0|    goto fail_aob_framebuf;
  607|      0|  }
  608|       |
  609|      2|  if (callbacks->rand_callback) {
  ------------------
  |  Branch (609:7): [True: 0, False: 2]
  ------------------
  610|      0|    callbacks->rand_callback((uint8_t *)&map_seed, sizeof(map_seed));
  611|      2|  } else {
  612|      2|    map_seed = 0;
  613|      2|  }
  614|       |
  615|      2|  nghttp2_map_init(&(*session_ptr)->streams, map_seed, mem);
  616|       |
  617|      2|  active_outbound_item_reset(&(*session_ptr)->aob, mem);
  618|       |
  619|      2|  (*session_ptr)->callbacks = *callbacks;
  620|      2|  (*session_ptr)->user_data = user_data;
  621|       |
  622|      2|  session_inbound_frame_reset(*session_ptr);
  623|       |
  624|      2|  if (nghttp2_enable_strict_preface) {
  ------------------
  |  Branch (624:7): [True: 2, False: 0]
  ------------------
  625|      2|    nghttp2_inbound_frame *iframe = &(*session_ptr)->iframe;
  626|       |
  627|      2|    if (server && ((*session_ptr)->opt_flags &
  ------------------
  |  Branch (627:9): [True: 0, False: 2]
  |  Branch (627:19): [True: 0, False: 0]
  ------------------
  628|      0|                   NGHTTP2_OPTMASK_NO_RECV_CLIENT_MAGIC) == 0) {
  ------------------
  |  |   54|      0|#define NGHTTP2_OPTMASK_NO_RECV_CLIENT_MAGIC 0x02U
  ------------------
  629|      0|      iframe->state = NGHTTP2_IB_READ_CLIENT_MAGIC;
  630|      0|      iframe->payloadleft = NGHTTP2_CLIENT_MAGIC_LEN;
  ------------------
  |  |  259|      0|#define NGHTTP2_CLIENT_MAGIC_LEN 24
  ------------------
  631|      2|    } else {
  632|      2|      iframe->state = NGHTTP2_IB_READ_FIRST_SETTINGS;
  633|      2|    }
  634|       |
  635|      2|    if (!server) {
  ------------------
  |  Branch (635:9): [True: 2, False: 0]
  ------------------
  636|      2|      (*session_ptr)->aob.state = NGHTTP2_OB_SEND_CLIENT_MAGIC;
  637|      2|      nghttp2_bufs_add(&(*session_ptr)->aob.framebufs, NGHTTP2_CLIENT_MAGIC,
  ------------------
  |  |  252|      2|#define NGHTTP2_CLIENT_MAGIC "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"
  ------------------
  638|      2|                       NGHTTP2_CLIENT_MAGIC_LEN);
  ------------------
  |  |  259|      2|#define NGHTTP2_CLIENT_MAGIC_LEN 24
  ------------------
  639|      2|    }
  640|      2|  }
  641|       |
  642|     18|  for (i = 0; i < NGHTTP2_EXTPRI_URGENCY_LEVELS; ++i) {
  ------------------
  |  | 5028|     18|#define NGHTTP2_EXTPRI_URGENCY_LEVELS (NGHTTP2_EXTPRI_URGENCY_LOW + 1)
  |  |  ------------------
  |  |  |  | 5020|     18|#define NGHTTP2_EXTPRI_URGENCY_LOW 7
  |  |  ------------------
  ------------------
  |  Branch (642:15): [True: 16, False: 2]
  ------------------
  643|     16|    nghttp2_pq_init(&(*session_ptr)->sched[i].ob_data, stream_less, mem);
  644|     16|  }
  645|       |
  646|      2|  return 0;
  647|       |
  648|      0|fail_aob_framebuf:
  649|      0|  nghttp2_hd_inflate_free(&(*session_ptr)->hd_inflater);
  650|      0|fail_hd_inflater:
  651|      0|  nghttp2_hd_deflate_free(&(*session_ptr)->hd_deflater);
  652|      0|fail_hd_deflater:
  653|      0|  nghttp2_mem_free(mem, *session_ptr);
  654|      0|fail_session:
  655|      0|  return rv;
  656|      0|}
nghttp2_session.c:init_settings:
  394|      4|static void init_settings(nghttp2_settings_storage *settings) {
  395|      4|  *settings = (nghttp2_settings_storage){
  396|      4|    .header_table_size = NGHTTP2_HD_DEFAULT_MAX_BUFFER_SIZE,
  ------------------
  |  |   39|      4|#define NGHTTP2_HD_DEFAULT_MAX_BUFFER_SIZE NGHTTP2_DEFAULT_HEADER_TABLE_SIZE
  |  |  ------------------
  |  |  |  |  244|      4|#define NGHTTP2_DEFAULT_HEADER_TABLE_SIZE (1 << 12)
  |  |  ------------------
  ------------------
  397|      4|    .enable_push = 1,
  398|      4|    .max_concurrent_streams = NGHTTP2_DEFAULT_MAX_CONCURRENT_STREAMS,
  ------------------
  |  |   99|      4|#define NGHTTP2_DEFAULT_MAX_CONCURRENT_STREAMS 0xFFFFFFFFU
  ------------------
  399|      4|    .initial_window_size = NGHTTP2_INITIAL_WINDOW_SIZE,
  ------------------
  |  |  231|      4|#define NGHTTP2_INITIAL_WINDOW_SIZE ((1 << 16) - 1)
  ------------------
  400|      4|    .max_frame_size = NGHTTP2_MAX_FRAME_SIZE_MIN,
  ------------------
  |  |   43|      4|#define NGHTTP2_MAX_FRAME_SIZE_MIN (1 << 14)
  ------------------
  401|      4|    .max_header_list_size = UINT32_MAX,
  402|       |    .no_rfc7540_priorities = UINT32_MAX,
  403|      4|  };
  404|      4|}
nghttp2_session.c:inflight_settings_del:
  783|      2|                                  nghttp2_mem *mem) {
  784|      2|  if (!settings) {
  ------------------
  |  Branch (784:7): [True: 0, False: 2]
  ------------------
  785|      0|    return;
  786|      0|  }
  787|       |
  788|      2|  nghttp2_mem_free(mem, settings->iv);
  789|      2|  nghttp2_mem_free(mem, settings);
  790|      2|}
nghttp2_session.c:ob_q_free:
  748|      6|static void ob_q_free(nghttp2_outbound_queue *q, nghttp2_mem *mem) {
  749|      6|  nghttp2_outbound_item *item, *next;
  750|      6|  for (item = q->head; item;) {
  ------------------
  |  Branch (750:24): [True: 0, False: 6]
  ------------------
  751|      0|    next = item->qnext;
  752|      0|    nghttp2_outbound_item_free(item, mem);
  753|      0|    nghttp2_mem_free(mem, item);
  754|      0|    item = next;
  755|      0|  }
  756|      6|}
nghttp2_session.c:active_outbound_item_reset:
  407|     19|                                       nghttp2_mem *mem) {
  408|     19|  DEBUGF("send: reset nghttp2_active_outbound_item\n");
  ------------------
  |  |   39|     19|    do {                                                                       \
  |  |   40|     19|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 19]
  |  |  ------------------
  ------------------
  409|     19|  DEBUGF("send: aob->item = %p\n", aob->item);
  ------------------
  |  |   39|     19|    do {                                                                       \
  |  |   40|     19|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 19]
  |  |  ------------------
  ------------------
  410|     19|  nghttp2_outbound_item_free(aob->item, mem);
  411|     19|  nghttp2_mem_free(mem, aob->item);
  412|       |  aob->item = NULL;
  413|     19|  nghttp2_bufs_reset(&aob->framebufs);
  414|     19|  aob->state = NGHTTP2_OB_POP_ITEM;
  415|     19|}
nghttp2_session.c:session_inbound_frame_reset:
  303|      6|static void session_inbound_frame_reset(nghttp2_session *session) {
  304|      6|  nghttp2_inbound_frame *iframe = &session->iframe;
  305|      6|  nghttp2_mem *mem = &session->mem;
  306|       |  /* A bit risky code, since if this function is called from
  307|       |     nghttp2_session_new(), we rely on the fact that
  308|       |     iframe->frame.hd.type is 0, so that no free is performed. */
  309|      6|  switch (iframe->frame.hd.type) {
  310|      3|  case NGHTTP2_DATA:
  ------------------
  |  Branch (310:3): [True: 3, False: 3]
  ------------------
  311|      3|    break;
  312|      1|  case NGHTTP2_HEADERS:
  ------------------
  |  Branch (312:3): [True: 1, False: 5]
  ------------------
  313|      1|    nghttp2_frame_headers_free(&iframe->frame.headers, mem);
  314|      1|    break;
  315|      0|  case NGHTTP2_PRIORITY:
  ------------------
  |  Branch (315:3): [True: 0, False: 6]
  ------------------
  316|      0|    nghttp2_frame_priority_free(&iframe->frame.priority);
  317|      0|    break;
  318|      0|  case NGHTTP2_RST_STREAM:
  ------------------
  |  Branch (318:3): [True: 0, False: 6]
  ------------------
  319|      0|    nghttp2_frame_rst_stream_free(&iframe->frame.rst_stream);
  320|      0|    break;
  321|      2|  case NGHTTP2_SETTINGS:
  ------------------
  |  Branch (321:3): [True: 2, False: 4]
  ------------------
  322|      2|    nghttp2_frame_settings_free(&iframe->frame.settings, mem);
  323|       |
  324|      2|    nghttp2_mem_free(mem, iframe->iv);
  325|       |
  326|      2|    iframe->iv = NULL;
  327|      2|    iframe->niv = 0;
  328|      2|    iframe->max_niv = 0;
  329|       |
  330|      2|    break;
  331|      0|  case NGHTTP2_PUSH_PROMISE:
  ------------------
  |  Branch (331:3): [True: 0, False: 6]
  ------------------
  332|      0|    nghttp2_frame_push_promise_free(&iframe->frame.push_promise, mem);
  333|      0|    break;
  334|      0|  case NGHTTP2_PING:
  ------------------
  |  Branch (334:3): [True: 0, False: 6]
  ------------------
  335|      0|    nghttp2_frame_ping_free(&iframe->frame.ping);
  336|      0|    break;
  337|      0|  case NGHTTP2_GOAWAY:
  ------------------
  |  Branch (337:3): [True: 0, False: 6]
  ------------------
  338|      0|    nghttp2_frame_goaway_free(&iframe->frame.goaway, mem);
  339|      0|    break;
  340|      0|  case NGHTTP2_WINDOW_UPDATE:
  ------------------
  |  Branch (340:3): [True: 0, False: 6]
  ------------------
  341|      0|    nghttp2_frame_window_update_free(&iframe->frame.window_update);
  342|      0|    break;
  343|      0|  default:
  ------------------
  |  Branch (343:3): [True: 0, False: 6]
  ------------------
  344|       |    /* extension frame */
  345|      0|    if (check_ext_type_set(session->user_recv_ext_types,
  ------------------
  |  Branch (345:9): [True: 0, False: 0]
  ------------------
  346|      0|                           iframe->frame.hd.type)) {
  347|      0|      nghttp2_frame_extension_free(&iframe->frame.ext);
  348|      0|    } else {
  349|      0|      switch (iframe->frame.hd.type) {
  ------------------
  |  Branch (349:15): [True: 0, False: 0]
  ------------------
  350|      0|      case NGHTTP2_ALTSVC:
  ------------------
  |  Branch (350:7): [True: 0, False: 0]
  ------------------
  351|      0|        if ((session->builtin_recv_ext_types & NGHTTP2_TYPEMASK_ALTSVC) == 0) {
  ------------------
  |  |   64|      0|#define NGHTTP2_TYPEMASK_ALTSVC 0x01U
  ------------------
  |  Branch (351:13): [True: 0, False: 0]
  ------------------
  352|      0|          break;
  353|      0|        }
  354|      0|        nghttp2_frame_altsvc_free(&iframe->frame.ext, mem);
  355|      0|        break;
  356|      0|      case NGHTTP2_ORIGIN:
  ------------------
  |  Branch (356:7): [True: 0, False: 0]
  ------------------
  357|      0|        if ((session->builtin_recv_ext_types & NGHTTP2_TYPEMASK_ORIGIN) == 0) {
  ------------------
  |  |   65|      0|#define NGHTTP2_TYPEMASK_ORIGIN 0x02U
  ------------------
  |  Branch (357:13): [True: 0, False: 0]
  ------------------
  358|      0|          break;
  359|      0|        }
  360|      0|        nghttp2_frame_origin_free(&iframe->frame.ext, mem);
  361|      0|        break;
  362|      0|      case NGHTTP2_PRIORITY_UPDATE:
  ------------------
  |  Branch (362:7): [True: 0, False: 0]
  ------------------
  363|      0|        if ((session->builtin_recv_ext_types &
  ------------------
  |  Branch (363:13): [True: 0, False: 0]
  ------------------
  364|      0|             NGHTTP2_TYPEMASK_PRIORITY_UPDATE) == 0) {
  ------------------
  |  |   66|      0|#define NGHTTP2_TYPEMASK_PRIORITY_UPDATE 0x04U
  ------------------
  365|      0|          break;
  366|      0|        }
  367|       |        /* Do not call nghttp2_frame_priority_update_free, because all
  368|       |           fields point to sbuf. */
  369|      0|        break;
  370|      0|      }
  371|      0|    }
  372|       |
  373|      0|    break;
  374|      6|  }
  375|       |
  376|      6|  memset(&iframe->frame, 0, sizeof(nghttp2_frame));
  377|      6|  memset(&iframe->ext_frame_payload, 0, sizeof(nghttp2_ext_frame_payload));
  378|       |
  379|      6|  iframe->state = NGHTTP2_IB_READ_HEAD;
  380|       |
  381|      6|  nghttp2_buf_wrap_init(&iframe->sbuf, iframe->raw_sbuf,
  382|      6|                        sizeof(iframe->raw_sbuf));
  383|      6|  iframe->sbuf.mark += NGHTTP2_FRAME_HDLEN;
  ------------------
  |  |   40|      6|#define NGHTTP2_FRAME_HDLEN 9
  ------------------
  384|       |
  385|      6|  nghttp2_buf_free(&iframe->lbuf, mem);
  386|      6|  nghttp2_buf_wrap_init(&iframe->lbuf, NULL, 0);
  387|       |
  388|      6|  iframe->raw_lbuf = NULL;
  389|       |
  390|      6|  iframe->payloadleft = 0;
  391|      6|  iframe->padlen = 0;
  392|      6|}
nghttp2_session.c:session_is_closing:
 1408|     15|static int session_is_closing(nghttp2_session *session) {
 1409|     15|  return (session->goaway_flags & NGHTTP2_GOAWAY_TERM_ON_SEND) != 0 ||
  ------------------
  |  |  180|     15|#define NGHTTP2_GOAWAY_TERM_ON_SEND 0x01U
  ------------------
  |  Branch (1409:10): [True: 0, False: 15]
  ------------------
 1410|     15|         (nghttp2_session_want_read(session) == 0 &&
  ------------------
  |  Branch (1410:11): [True: 0, False: 15]
  ------------------
 1411|      0|          nghttp2_session_want_write(session) == 0);
  ------------------
  |  Branch (1411:11): [True: 0, False: 0]
  ------------------
 1412|     15|}
nghttp2_session.c:session_is_outgoing_concurrent_streams_max:
   52|     13|session_is_outgoing_concurrent_streams_max(nghttp2_session *session) {
   53|     13|  return session->remote_settings.max_concurrent_streams <=
   54|     13|         session->num_outgoing_streams;
   55|     13|}
nghttp2_session.c:session_sched_get_next_outbound_item:
  939|      9|session_sched_get_next_outbound_item(nghttp2_session *session) {
  940|      9|  size_t i;
  941|      9|  nghttp2_pq_entry *ent;
  942|      9|  nghttp2_stream *stream;
  943|       |
  944|     81|  for (i = 0; i < NGHTTP2_EXTPRI_URGENCY_LEVELS; ++i) {
  ------------------
  |  | 5028|     81|#define NGHTTP2_EXTPRI_URGENCY_LEVELS (NGHTTP2_EXTPRI_URGENCY_LOW + 1)
  |  |  ------------------
  |  |  |  | 5020|     81|#define NGHTTP2_EXTPRI_URGENCY_LOW 7
  |  |  ------------------
  ------------------
  |  Branch (944:15): [True: 72, False: 9]
  ------------------
  945|     72|    ent = nghttp2_pq_top(&session->sched[i].ob_data);
  946|     72|    if (!ent) {
  ------------------
  |  Branch (946:9): [True: 72, False: 0]
  ------------------
  947|     72|      continue;
  948|     72|    }
  949|       |
  950|      0|    stream = nghttp2_struct_of(ent, nghttp2_stream, pq_entry);
  ------------------
  |  |   75|      0|  ((type *)(void *)((char *)(ptr) - offsetof(type, member)))
  ------------------
  951|      0|    return stream->item;
  952|     72|  }
  953|       |
  954|      9|  return NULL;
  955|      9|}
nghttp2_session.c:nghttp2_session_mem_send_internal:
 2828|     24|                                                       int fast_cb) {
 2829|     24|  int rv;
 2830|     24|  nghttp2_active_outbound_item *aob;
 2831|     24|  nghttp2_bufs *framebufs;
 2832|     24|  nghttp2_mem *mem;
 2833|       |
 2834|     24|  mem = &session->mem;
 2835|     24|  aob = &session->aob;
 2836|     24|  framebufs = &aob->framebufs;
 2837|       |
 2838|     52|  for (;;) {
 2839|     52|    switch (aob->state) {
  ------------------
  |  Branch (2839:13): [True: 52, False: 0]
  ------------------
 2840|     22|    case NGHTTP2_OB_POP_ITEM: {
  ------------------
  |  Branch (2840:5): [True: 22, False: 30]
  ------------------
 2841|     22|      nghttp2_outbound_item *item;
 2842|       |
 2843|     22|      item = nghttp2_session_pop_next_ob_item(session);
 2844|     22|      if (item == NULL) {
  ------------------
  |  Branch (2844:11): [True: 9, False: 13]
  ------------------
 2845|      9|        return 0;
 2846|      9|      }
 2847|       |
 2848|     13|      rv = session_prep_frame(session, item);
 2849|     13|      if (rv == NGHTTP2_ERR_PAUSE) {
  ------------------
  |  Branch (2849:11): [True: 0, False: 13]
  ------------------
 2850|      0|        return 0;
 2851|      0|      }
 2852|     13|      if (rv == NGHTTP2_ERR_DEFERRED) {
  ------------------
  |  Branch (2852:11): [True: 0, False: 13]
  ------------------
 2853|      0|        DEBUGF("send: frame transmission deferred\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2854|      0|        break;
 2855|      0|      }
 2856|     13|      if (rv < 0) {
  ------------------
  |  Branch (2856:11): [True: 0, False: 13]
  ------------------
 2857|      0|        int32_t opened_stream_id = 0;
 2858|      0|        uint32_t error_code = NGHTTP2_INTERNAL_ERROR;
 2859|      0|        int rv2 = 0;
 2860|       |
 2861|      0|        DEBUGF("send: frame preparation failed with %s\n",
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2862|      0|               nghttp2_strerror(rv));
 2863|       |        /* TODO If the error comes from compressor, the connection
 2864|       |           must be closed. */
 2865|      0|        if (item->frame.hd.type != NGHTTP2_DATA &&
  ------------------
  |  Branch (2865:13): [True: 0, False: 0]
  ------------------
 2866|      0|            session->callbacks.on_frame_not_send_callback && is_non_fatal(rv)) {
  ------------------
  |  Branch (2866:13): [True: 0, False: 0]
  |  Branch (2866:62): [True: 0, False: 0]
  ------------------
 2867|      0|          nghttp2_frame *frame = &item->frame;
 2868|       |          /* The library is responsible for the transmission of
 2869|       |             WINDOW_UPDATE frame, so we don't call error callback for
 2870|       |             it.  As for RST_STREAM, if it is not sent due to missing
 2871|       |             stream, we also do not call error callback because it may
 2872|       |             cause a lot of noises.*/
 2873|      0|          if (frame->hd.type != NGHTTP2_WINDOW_UPDATE &&
  ------------------
  |  Branch (2873:15): [True: 0, False: 0]
  ------------------
 2874|      0|              (frame->hd.type != NGHTTP2_RST_STREAM ||
  ------------------
  |  Branch (2874:16): [True: 0, False: 0]
  ------------------
 2875|      0|               rv != NGHTTP2_ERR_STREAM_CLOSED) &&
  ------------------
  |  Branch (2875:16): [True: 0, False: 0]
  ------------------
 2876|      0|              session->callbacks.on_frame_not_send_callback(
  ------------------
  |  Branch (2876:15): [True: 0, False: 0]
  ------------------
 2877|      0|                session, frame, rv, session->user_data) != 0) {
 2878|      0|            nghttp2_outbound_item_free(item, mem);
 2879|      0|            nghttp2_mem_free(mem, item);
 2880|       |
 2881|      0|            return NGHTTP2_ERR_CALLBACK_FAILURE;
 2882|      0|          }
 2883|      0|        }
 2884|       |        /* We have to close stream opened by failed request HEADERS
 2885|       |           or PUSH_PROMISE. */
 2886|      0|        switch (item->frame.hd.type) {
  ------------------
  |  Branch (2886:17): [True: 0, False: 0]
  ------------------
 2887|      0|        case NGHTTP2_HEADERS:
  ------------------
  |  Branch (2887:9): [True: 0, False: 0]
  ------------------
 2888|      0|          if (item->frame.headers.cat == NGHTTP2_HCAT_REQUEST) {
  ------------------
  |  Branch (2888:15): [True: 0, False: 0]
  ------------------
 2889|      0|            opened_stream_id = item->frame.hd.stream_id;
 2890|      0|            if (item->aux_data.headers.canceled) {
  ------------------
  |  Branch (2890:17): [True: 0, False: 0]
  ------------------
 2891|      0|              error_code = item->aux_data.headers.error_code;
 2892|      0|            } else {
 2893|       |              /* Set error_code to REFUSED_STREAM so that application
 2894|       |                 can send request again. */
 2895|      0|              error_code = NGHTTP2_REFUSED_STREAM;
 2896|      0|            }
 2897|      0|          }
 2898|      0|          break;
 2899|      0|        case NGHTTP2_PUSH_PROMISE:
  ------------------
  |  Branch (2899:9): [True: 0, False: 0]
  ------------------
 2900|      0|          opened_stream_id = item->frame.push_promise.promised_stream_id;
 2901|      0|          break;
 2902|      0|        }
 2903|      0|        if (opened_stream_id) {
  ------------------
  |  Branch (2903:13): [True: 0, False: 0]
  ------------------
 2904|       |          /* careful not to override rv */
 2905|      0|          rv2 =
 2906|      0|            nghttp2_session_close_stream(session, opened_stream_id, error_code);
 2907|      0|        }
 2908|       |
 2909|      0|        nghttp2_outbound_item_free(item, mem);
 2910|      0|        nghttp2_mem_free(mem, item);
 2911|      0|        active_outbound_item_reset(aob, mem);
 2912|       |
 2913|      0|        if (nghttp2_is_fatal(rv2)) {
  ------------------
  |  Branch (2913:13): [True: 0, False: 0]
  ------------------
 2914|      0|          return rv2;
 2915|      0|        }
 2916|       |
 2917|      0|        if (rv == NGHTTP2_ERR_HEADER_COMP) {
  ------------------
  |  Branch (2917:13): [True: 0, False: 0]
  ------------------
 2918|       |          /* If header compression error occurred, should terminate
 2919|       |             connection. */
 2920|      0|          rv =
 2921|      0|            nghttp2_session_terminate_session(session, NGHTTP2_INTERNAL_ERROR);
 2922|      0|        }
 2923|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (2923:13): [True: 0, False: 0]
  ------------------
 2924|      0|          return rv;
 2925|      0|        }
 2926|      0|        break;
 2927|      0|      }
 2928|       |
 2929|     13|      aob->item = item;
 2930|       |
 2931|     13|      nghttp2_bufs_rewind(framebufs);
  ------------------
  |  |  387|     13|  do {                                                                         \
  |  |  388|     13|    (BUFS)->cur = (BUFS)->head;                                                \
  |  |  389|     13|  } while (0)
  |  |  ------------------
  |  |  |  Branch (389:12): [Folded, False: 13]
  |  |  ------------------
  ------------------
 2932|       |
 2933|     13|      if (item->frame.hd.type != NGHTTP2_DATA) {
  ------------------
  |  Branch (2933:11): [True: 13, False: 0]
  ------------------
 2934|     13|        nghttp2_frame *frame;
 2935|       |
 2936|     13|        frame = &item->frame;
 2937|       |
 2938|     13|        DEBUGF("send: next frame: payloadlen=%zu, type=%u, flags=0x%02x, "
  ------------------
  |  |   39|     13|    do {                                                                       \
  |  |   40|     13|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 13]
  |  |  ------------------
  ------------------
 2939|     13|               "stream_id=%d\n",
 2940|     13|               frame->hd.length, frame->hd.type, frame->hd.flags,
 2941|     13|               frame->hd.stream_id);
 2942|       |
 2943|     13|        rv = session_call_before_frame_send(session, frame);
 2944|     13|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (2944:13): [True: 0, False: 13]
  ------------------
 2945|      0|          return rv;
 2946|      0|        }
 2947|       |
 2948|     13|        if (rv == NGHTTP2_ERR_CANCEL) {
  ------------------
  |  Branch (2948:13): [True: 0, False: 13]
  ------------------
 2949|      0|          int32_t opened_stream_id = 0;
 2950|      0|          uint32_t error_code = NGHTTP2_INTERNAL_ERROR;
 2951|       |
 2952|      0|          if (session->callbacks.on_frame_not_send_callback) {
  ------------------
  |  Branch (2952:15): [True: 0, False: 0]
  ------------------
 2953|      0|            if (session->callbacks.on_frame_not_send_callback(
  ------------------
  |  Branch (2953:17): [True: 0, False: 0]
  ------------------
 2954|      0|                  session, frame, rv, session->user_data) != 0) {
 2955|      0|              return NGHTTP2_ERR_CALLBACK_FAILURE;
 2956|      0|            }
 2957|      0|          }
 2958|       |
 2959|       |          /* We have to close stream opened by canceled request
 2960|       |             HEADERS or PUSH_PROMISE. */
 2961|      0|          switch (item->frame.hd.type) {
  ------------------
  |  Branch (2961:19): [True: 0, False: 0]
  ------------------
 2962|      0|          case NGHTTP2_HEADERS:
  ------------------
  |  Branch (2962:11): [True: 0, False: 0]
  ------------------
 2963|      0|            if (item->frame.headers.cat == NGHTTP2_HCAT_REQUEST) {
  ------------------
  |  Branch (2963:17): [True: 0, False: 0]
  ------------------
 2964|      0|              opened_stream_id = item->frame.hd.stream_id;
 2965|       |              /* We don't have to check
 2966|       |                 item->aux_data.headers.canceled since it has already
 2967|       |                 been checked. */
 2968|       |              /* Set error_code to REFUSED_STREAM so that application
 2969|       |                 can send request again. */
 2970|      0|              error_code = NGHTTP2_REFUSED_STREAM;
 2971|      0|            }
 2972|      0|            break;
 2973|      0|          case NGHTTP2_PUSH_PROMISE:
  ------------------
  |  Branch (2973:11): [True: 0, False: 0]
  ------------------
 2974|      0|            opened_stream_id = item->frame.push_promise.promised_stream_id;
 2975|      0|            break;
 2976|      0|          }
 2977|      0|          if (opened_stream_id) {
  ------------------
  |  Branch (2977:15): [True: 0, False: 0]
  ------------------
 2978|       |            /* careful not to override rv */
 2979|      0|            int rv2;
 2980|      0|            rv2 = nghttp2_session_close_stream(session, opened_stream_id,
 2981|      0|                                               error_code);
 2982|       |
 2983|      0|            if (nghttp2_is_fatal(rv2)) {
  ------------------
  |  Branch (2983:17): [True: 0, False: 0]
  ------------------
 2984|      0|              return rv2;
 2985|      0|            }
 2986|      0|          }
 2987|       |
 2988|      0|          active_outbound_item_reset(aob, mem);
 2989|       |
 2990|      0|          break;
 2991|      0|        }
 2992|     13|      } else {
 2993|      0|        DEBUGF("send: next frame: DATA\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2994|       |
 2995|      0|        if (item->aux_data.data.no_copy) {
  ------------------
  |  Branch (2995:13): [True: 0, False: 0]
  ------------------
 2996|      0|          aob->state = NGHTTP2_OB_SEND_NO_COPY;
 2997|      0|          break;
 2998|      0|        }
 2999|      0|      }
 3000|       |
 3001|     13|      DEBUGF("send: start transmitting frame type=%u, length=%td\n",
  ------------------
  |  |   39|     13|    do {                                                                       \
  |  |   40|     13|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 13]
  |  |  ------------------
  ------------------
 3002|     13|             framebufs->cur->buf.pos[3],
 3003|     13|             framebufs->cur->buf.last - framebufs->cur->buf.pos);
 3004|       |
 3005|     13|      aob->state = NGHTTP2_OB_SEND_DATA;
 3006|       |
 3007|     13|      break;
 3008|     13|    }
 3009|     26|    case NGHTTP2_OB_SEND_DATA: {
  ------------------
  |  Branch (3009:5): [True: 26, False: 26]
  ------------------
 3010|     26|      size_t datalen;
 3011|     26|      nghttp2_buf *buf;
 3012|       |
 3013|     26|      buf = &framebufs->cur->buf;
 3014|       |
 3015|     26|      if (buf->pos == buf->last) {
  ------------------
  |  Branch (3015:11): [True: 13, False: 13]
  ------------------
 3016|     13|        DEBUGF("send: end transmission of a frame\n");
  ------------------
  |  |   39|     13|    do {                                                                       \
  |  |   40|     13|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 13]
  |  |  ------------------
  ------------------
 3017|       |
 3018|       |        /* Frame has completely sent */
 3019|     13|        if (fast_cb) {
  ------------------
  |  Branch (3019:13): [True: 0, False: 13]
  ------------------
 3020|      0|          session_after_frame_sent2(session);
 3021|     13|        } else {
 3022|     13|          rv = session_after_frame_sent1(session);
 3023|     13|          if (rv < 0) {
  ------------------
  |  Branch (3023:15): [True: 0, False: 13]
  ------------------
 3024|       |            /* FATAL */
 3025|      0|            assert(nghttp2_is_fatal(rv));
  ------------------
  |  Branch (3025:13): [True: 0, False: 0]
  |  Branch (3025:13): [True: 0, False: 0]
  ------------------
 3026|      0|            return rv;
 3027|      0|          }
 3028|     13|          session_after_frame_sent2(session);
 3029|     13|        }
 3030|       |        /* We have already adjusted the next state */
 3031|     13|        break;
 3032|     13|      }
 3033|       |
 3034|     13|      *data_ptr = buf->pos;
 3035|     13|      datalen = nghttp2_buf_len(buf);
  ------------------
  |  |   54|     13|#define nghttp2_buf_len(BUF) ((size_t)((BUF)->last - (BUF)->pos))
  ------------------
 3036|       |
 3037|       |      /* We increment the offset here. If send_callback does not send
 3038|       |         everything, we will adjust it. */
 3039|     13|      buf->pos += datalen;
 3040|       |
 3041|     13|      return (nghttp2_ssize)datalen;
 3042|     26|    }
 3043|      0|    case NGHTTP2_OB_SEND_NO_COPY: {
  ------------------
  |  Branch (3043:5): [True: 0, False: 52]
  ------------------
 3044|      0|      nghttp2_stream *stream;
 3045|      0|      nghttp2_frame *frame;
 3046|      0|      int pause;
 3047|       |
 3048|      0|      DEBUGF("send: no copy DATA\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3049|       |
 3050|      0|      frame = &aob->item->frame;
 3051|       |
 3052|      0|      stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
 3053|      0|      if (stream == NULL) {
  ------------------
  |  Branch (3053:11): [True: 0, False: 0]
  ------------------
 3054|      0|        DEBUGF("send: no copy DATA cancelled because stream was closed\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3055|       |
 3056|      0|        active_outbound_item_reset(aob, mem);
 3057|       |
 3058|      0|        break;
 3059|      0|      }
 3060|       |
 3061|      0|      rv = session_call_send_data(session, aob->item, framebufs);
 3062|      0|      if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (3062:11): [True: 0, False: 0]
  ------------------
 3063|      0|        return rv;
 3064|      0|      }
 3065|       |
 3066|      0|      if (rv == NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE) {
  ------------------
  |  Branch (3066:11): [True: 0, False: 0]
  ------------------
 3067|      0|        session_detach_stream_item(session, stream);
 3068|       |
 3069|      0|        rv = nghttp2_session_add_rst_stream(session, frame->hd.stream_id,
 3070|      0|                                            NGHTTP2_INTERNAL_ERROR);
 3071|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (3071:13): [True: 0, False: 0]
  ------------------
 3072|      0|          return rv;
 3073|      0|        }
 3074|       |
 3075|      0|        active_outbound_item_reset(aob, mem);
 3076|       |
 3077|      0|        break;
 3078|      0|      }
 3079|       |
 3080|      0|      if (rv == NGHTTP2_ERR_WOULDBLOCK) {
  ------------------
  |  Branch (3080:11): [True: 0, False: 0]
  ------------------
 3081|      0|        return 0;
 3082|      0|      }
 3083|       |
 3084|      0|      pause = (rv == NGHTTP2_ERR_PAUSE);
 3085|       |
 3086|      0|      rv = session_after_frame_sent1(session);
 3087|      0|      if (rv < 0) {
  ------------------
  |  Branch (3087:11): [True: 0, False: 0]
  ------------------
 3088|      0|        assert(nghttp2_is_fatal(rv));
  ------------------
  |  Branch (3088:9): [True: 0, False: 0]
  |  Branch (3088:9): [True: 0, False: 0]
  ------------------
 3089|      0|        return rv;
 3090|      0|      }
 3091|      0|      session_after_frame_sent2(session);
 3092|       |
 3093|       |      /* We have already adjusted the next state */
 3094|       |
 3095|      0|      if (pause) {
  ------------------
  |  Branch (3095:11): [True: 0, False: 0]
  ------------------
 3096|      0|        return 0;
 3097|      0|      }
 3098|       |
 3099|      0|      break;
 3100|      0|    }
 3101|      4|    case NGHTTP2_OB_SEND_CLIENT_MAGIC: {
  ------------------
  |  Branch (3101:5): [True: 4, False: 48]
  ------------------
 3102|      4|      size_t datalen;
 3103|      4|      nghttp2_buf *buf;
 3104|       |
 3105|      4|      buf = &framebufs->cur->buf;
 3106|       |
 3107|      4|      if (buf->pos == buf->last) {
  ------------------
  |  Branch (3107:11): [True: 2, False: 2]
  ------------------
 3108|      2|        DEBUGF("send: end transmission of client magic\n");
  ------------------
  |  |   39|      2|    do {                                                                       \
  |  |   40|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 3109|      2|        active_outbound_item_reset(aob, mem);
 3110|      2|        break;
 3111|      2|      }
 3112|       |
 3113|      2|      *data_ptr = buf->pos;
 3114|      2|      datalen = nghttp2_buf_len(buf);
  ------------------
  |  |   54|      2|#define nghttp2_buf_len(BUF) ((size_t)((BUF)->last - (BUF)->pos))
  ------------------
 3115|       |
 3116|      2|      buf->pos += datalen;
 3117|       |
 3118|      2|      return (nghttp2_ssize)datalen;
 3119|      4|    }
 3120|     52|    }
 3121|     52|  }
 3122|     24|}
nghttp2_session.c:session_prep_frame:
 1963|     13|                              nghttp2_outbound_item *item) {
 1964|     13|  int rv;
 1965|     13|  nghttp2_frame *frame;
 1966|     13|  nghttp2_mem *mem;
 1967|       |
 1968|     13|  mem = &session->mem;
 1969|     13|  frame = &item->frame;
 1970|       |
 1971|     13|  switch (frame->hd.type) {
 1972|      0|  case NGHTTP2_DATA: {
  ------------------
  |  Branch (1972:3): [True: 0, False: 13]
  ------------------
 1973|      0|    size_t next_readmax;
 1974|      0|    nghttp2_stream *stream;
 1975|       |
 1976|      0|    stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
 1977|       |
 1978|      0|    if (stream) {
  ------------------
  |  Branch (1978:9): [True: 0, False: 0]
  ------------------
 1979|      0|      assert(stream->item == item);
  ------------------
  |  Branch (1979:7): [True: 0, False: 0]
  |  Branch (1979:7): [True: 0, False: 0]
  ------------------
 1980|      0|    }
 1981|       |
 1982|      0|    rv = nghttp2_session_predicate_data_send(session, stream);
 1983|      0|    if (rv != 0) {
  ------------------
  |  Branch (1983:9): [True: 0, False: 0]
  ------------------
 1984|       |      /* If stream was already closed, nghttp2_session_get_stream()
 1985|       |         returns NULL, but item is still attached to the stream.
 1986|       |         Search stream including closed again. */
 1987|      0|      stream = nghttp2_session_get_stream_raw(session, frame->hd.stream_id);
 1988|      0|      if (stream) {
  ------------------
  |  Branch (1988:11): [True: 0, False: 0]
  ------------------
 1989|      0|        session_detach_stream_item(session, stream);
 1990|      0|      }
 1991|       |
 1992|      0|      return rv;
 1993|      0|    }
 1994|       |    /* Assuming stream is not NULL */
 1995|      0|    assert(stream);
  ------------------
  |  Branch (1995:5): [True: 0, False: 0]
  |  Branch (1995:5): [True: 0, False: 0]
  ------------------
 1996|      0|    next_readmax = nghttp2_session_next_data_read(session, stream);
 1997|       |
 1998|      0|    if (next_readmax == 0) {
  ------------------
  |  Branch (1998:9): [True: 0, False: 0]
  ------------------
 1999|       |      /* This must be true since we only pop DATA frame item from
 2000|       |         queue when session->remote_window_size > 0 */
 2001|      0|      assert(session->remote_window_size > 0);
  ------------------
  |  Branch (2001:7): [True: 0, False: 0]
  |  Branch (2001:7): [True: 0, False: 0]
  ------------------
 2002|       |
 2003|      0|      session_defer_stream_item(session, stream,
 2004|      0|                                NGHTTP2_STREAM_FLAG_DEFERRED_FLOW_CONTROL);
  ------------------
  |  |   84|      0|#define NGHTTP2_STREAM_FLAG_DEFERRED_FLOW_CONTROL 0x04U
  ------------------
 2005|       |
 2006|      0|      session->aob.item = NULL;
 2007|      0|      active_outbound_item_reset(&session->aob, mem);
 2008|      0|      return NGHTTP2_ERR_DEFERRED;
 2009|      0|    }
 2010|       |
 2011|      0|    rv =
 2012|      0|      nghttp2_session_pack_data(session, &session->aob.framebufs, next_readmax,
 2013|      0|                                frame, &item->aux_data.data, stream);
 2014|      0|    if (rv == NGHTTP2_ERR_PAUSE) {
  ------------------
  |  Branch (2014:9): [True: 0, False: 0]
  ------------------
 2015|      0|      return rv;
 2016|      0|    }
 2017|      0|    if (rv == NGHTTP2_ERR_DEFERRED) {
  ------------------
  |  Branch (2017:9): [True: 0, False: 0]
  ------------------
 2018|      0|      session_defer_stream_item(session, stream,
 2019|      0|                                NGHTTP2_STREAM_FLAG_DEFERRED_USER);
  ------------------
  |  |   86|      0|#define NGHTTP2_STREAM_FLAG_DEFERRED_USER 0x08U
  ------------------
 2020|       |
 2021|      0|      session->aob.item = NULL;
 2022|      0|      active_outbound_item_reset(&session->aob, mem);
 2023|      0|      return NGHTTP2_ERR_DEFERRED;
 2024|      0|    }
 2025|      0|    if (rv == NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE) {
  ------------------
  |  Branch (2025:9): [True: 0, False: 0]
  ------------------
 2026|      0|      session_detach_stream_item(session, stream);
 2027|       |
 2028|      0|      rv = nghttp2_session_add_rst_stream(session, frame->hd.stream_id,
 2029|      0|                                          NGHTTP2_INTERNAL_ERROR);
 2030|      0|      if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (2030:11): [True: 0, False: 0]
  ------------------
 2031|      0|        return rv;
 2032|      0|      }
 2033|      0|      return NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE;
 2034|      0|    }
 2035|      0|    if (rv != 0) {
  ------------------
  |  Branch (2035:9): [True: 0, False: 0]
  ------------------
 2036|      0|      session_detach_stream_item(session, stream);
 2037|       |
 2038|      0|      return rv;
 2039|      0|    }
 2040|      0|    return 0;
 2041|      0|  }
 2042|      2|  case NGHTTP2_HEADERS: {
  ------------------
  |  Branch (2042:3): [True: 2, False: 11]
  ------------------
 2043|      2|    nghttp2_headers_aux_data *aux_data;
 2044|      2|    size_t estimated_payloadlen;
 2045|       |
 2046|      2|    aux_data = &item->aux_data.headers;
 2047|       |
 2048|      2|    if (frame->headers.cat == NGHTTP2_HCAT_REQUEST) {
  ------------------
  |  Branch (2048:9): [True: 2, False: 0]
  ------------------
 2049|       |      /* initial HEADERS, which opens stream */
 2050|      2|      nghttp2_stream *stream;
 2051|       |
 2052|      2|      stream = nghttp2_session_open_stream(
 2053|      2|        session, frame->hd.stream_id, NGHTTP2_STREAM_FLAG_NONE,
  ------------------
  |  |   78|      2|#define NGHTTP2_STREAM_FLAG_NONE 0x00U
  ------------------
 2054|      2|        NGHTTP2_STREAM_INITIAL, aux_data->stream_user_data);
 2055|       |
 2056|      2|      if (stream == NULL) {
  ------------------
  |  Branch (2056:11): [True: 0, False: 2]
  ------------------
 2057|      0|        return NGHTTP2_ERR_NOMEM;
 2058|      0|      }
 2059|       |
 2060|      2|      rv = session_predicate_request_headers_send(session, item);
 2061|      2|      if (rv != 0) {
  ------------------
  |  Branch (2061:11): [True: 0, False: 2]
  ------------------
 2062|      0|        return rv;
 2063|      0|      }
 2064|       |
 2065|      2|      if (session_enforce_http_messaging(session)) {
  ------------------
  |  Branch (2065:11): [True: 2, False: 0]
  ------------------
 2066|      2|        nghttp2_http_record_request_method(stream, frame);
 2067|      2|      }
 2068|      2|    } else {
 2069|      0|      nghttp2_stream *stream;
 2070|       |
 2071|      0|      stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
 2072|       |
 2073|      0|      if (stream && stream->state == NGHTTP2_STREAM_RESERVED) {
  ------------------
  |  Branch (2073:11): [True: 0, False: 0]
  |  Branch (2073:21): [True: 0, False: 0]
  ------------------
 2074|      0|        rv = session_predicate_push_response_headers_send(session, stream);
 2075|      0|        if (rv == 0) {
  ------------------
  |  Branch (2075:13): [True: 0, False: 0]
  ------------------
 2076|      0|          frame->headers.cat = NGHTTP2_HCAT_PUSH_RESPONSE;
 2077|       |
 2078|      0|          if (aux_data->stream_user_data) {
  ------------------
  |  Branch (2078:15): [True: 0, False: 0]
  ------------------
 2079|      0|            stream->stream_user_data = aux_data->stream_user_data;
 2080|      0|          }
 2081|      0|        }
 2082|      0|      } else if (session_predicate_response_headers_send(session, stream) ==
  ------------------
  |  Branch (2082:18): [True: 0, False: 0]
  ------------------
 2083|      0|                 0) {
 2084|      0|        frame->headers.cat = NGHTTP2_HCAT_RESPONSE;
 2085|      0|        rv = 0;
 2086|      0|      } else {
 2087|      0|        frame->headers.cat = NGHTTP2_HCAT_HEADERS;
 2088|       |
 2089|      0|        rv = session_predicate_headers_send(session, stream);
 2090|      0|      }
 2091|       |
 2092|      0|      if (rv != 0) {
  ------------------
  |  Branch (2092:11): [True: 0, False: 0]
  ------------------
 2093|      0|        return rv;
 2094|      0|      }
 2095|      0|    }
 2096|       |
 2097|      2|    estimated_payloadlen = session_estimate_headers_payload(
 2098|      2|      session, frame->headers.nva, frame->headers.nvlen,
 2099|      2|      NGHTTP2_PRIORITY_SPECLEN);
  ------------------
  |  |   64|      2|#define NGHTTP2_PRIORITY_SPECLEN 5
  ------------------
 2100|       |
 2101|      2|    if (estimated_payloadlen > session->max_send_header_block_length) {
  ------------------
  |  Branch (2101:9): [True: 0, False: 2]
  ------------------
 2102|      0|      return NGHTTP2_ERR_FRAME_SIZE_ERROR;
 2103|      0|    }
 2104|       |
 2105|      2|    rv = nghttp2_frame_pack_headers(&session->aob.framebufs, &frame->headers,
 2106|      2|                                    &session->hd_deflater);
 2107|       |
 2108|      2|    if (rv != 0) {
  ------------------
  |  Branch (2108:9): [True: 0, False: 2]
  ------------------
 2109|      0|      return rv;
 2110|      0|    }
 2111|       |
 2112|      2|    DEBUGF("send: before padding, HEADERS serialized in %zu bytes\n",
  ------------------
  |  |   39|      2|    do {                                                                       \
  |  |   40|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 2113|      2|           nghttp2_bufs_len(&session->aob.framebufs));
 2114|       |
 2115|      2|    rv = session_headers_add_pad(session, frame);
 2116|       |
 2117|      2|    if (rv != 0) {
  ------------------
  |  Branch (2117:9): [True: 0, False: 2]
  ------------------
 2118|      0|      return rv;
 2119|      0|    }
 2120|       |
 2121|      2|    DEBUGF("send: HEADERS finally serialized in %zu bytes\n",
  ------------------
  |  |   39|      2|    do {                                                                       \
  |  |   40|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 2122|      2|           nghttp2_bufs_len(&session->aob.framebufs));
 2123|       |
 2124|      2|    if (frame->headers.cat == NGHTTP2_HCAT_REQUEST) {
  ------------------
  |  Branch (2124:9): [True: 2, False: 0]
  ------------------
 2125|      2|      assert(session->last_sent_stream_id < frame->hd.stream_id);
  ------------------
  |  Branch (2125:7): [True: 0, False: 2]
  |  Branch (2125:7): [True: 2, False: 0]
  ------------------
 2126|      2|      session->last_sent_stream_id = frame->hd.stream_id;
 2127|      2|    }
 2128|       |
 2129|      2|    return 0;
 2130|      2|  }
 2131|      0|  case NGHTTP2_PRIORITY: {
  ------------------
  |  Branch (2131:3): [True: 0, False: 13]
  ------------------
 2132|      0|    if (session_is_closing(session)) {
  ------------------
  |  Branch (2132:9): [True: 0, False: 0]
  ------------------
 2133|      0|      return NGHTTP2_ERR_SESSION_CLOSING;
 2134|      0|    }
 2135|       |    /* PRIORITY frame can be sent at any time and to any stream
 2136|       |       ID. */
 2137|      0|    nghttp2_frame_pack_priority(&session->aob.framebufs, &frame->priority);
 2138|       |
 2139|       |    /* Peer can send PRIORITY frame against idle stream to create
 2140|       |       "anchor" in dependency tree.  Only client can do this in
 2141|       |       nghttp2.  In nghttp2, only server retains non-active (closed
 2142|       |       or idle) streams in memory, so we don't open stream here. */
 2143|      0|    return 0;
 2144|      0|  }
 2145|      2|  case NGHTTP2_RST_STREAM:
  ------------------
  |  Branch (2145:3): [True: 2, False: 11]
  ------------------
 2146|      2|    if (session_is_closing(session)) {
  ------------------
  |  Branch (2146:9): [True: 0, False: 2]
  ------------------
 2147|      0|      return NGHTTP2_ERR_SESSION_CLOSING;
 2148|      0|    }
 2149|       |
 2150|      2|    if (!item->aux_data.rst_stream.continue_without_stream &&
  ------------------
  |  Branch (2150:9): [True: 2, False: 0]
  ------------------
 2151|      2|        !nghttp2_session_get_stream(session, frame->rst_stream.hd.stream_id)) {
  ------------------
  |  Branch (2151:9): [True: 0, False: 2]
  ------------------
 2152|      0|      return NGHTTP2_ERR_STREAM_CLOSED;
 2153|      0|    }
 2154|       |
 2155|      2|    nghttp2_frame_pack_rst_stream(&session->aob.framebufs, &frame->rst_stream);
 2156|      2|    return 0;
 2157|      3|  case NGHTTP2_SETTINGS: {
  ------------------
  |  Branch (2157:3): [True: 3, False: 10]
  ------------------
 2158|      3|    if (frame->hd.flags & NGHTTP2_FLAG_ACK) {
  ------------------
  |  Branch (2158:9): [True: 1, False: 2]
  ------------------
 2159|      1|      assert(session->obq_flood_counter_ > 0);
  ------------------
  |  Branch (2159:7): [True: 0, False: 1]
  |  Branch (2159:7): [True: 1, False: 0]
  ------------------
 2160|      1|      --session->obq_flood_counter_;
 2161|       |      /* When session is about to close, don't send SETTINGS ACK.
 2162|       |         We are required to send SETTINGS without ACK though; for
 2163|       |         example, we have to send SETTINGS as a part of connection
 2164|       |         preface. */
 2165|      1|      if (session_is_closing(session)) {
  ------------------
  |  Branch (2165:11): [True: 0, False: 1]
  ------------------
 2166|      0|        return NGHTTP2_ERR_SESSION_CLOSING;
 2167|      0|      }
 2168|      1|    }
 2169|       |
 2170|      3|    rv = nghttp2_frame_pack_settings(&session->aob.framebufs, &frame->settings);
 2171|      3|    if (rv != 0) {
  ------------------
  |  Branch (2171:9): [True: 0, False: 3]
  ------------------
 2172|      0|      return rv;
 2173|      0|    }
 2174|      3|    return 0;
 2175|      3|  }
 2176|      0|  case NGHTTP2_PUSH_PROMISE: {
  ------------------
  |  Branch (2176:3): [True: 0, False: 13]
  ------------------
 2177|      0|    nghttp2_stream *stream;
 2178|      0|    size_t estimated_payloadlen;
 2179|       |
 2180|       |    /* stream could be NULL if associated stream was already
 2181|       |       closed. */
 2182|      0|    stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
 2183|       |
 2184|       |    /* predicate should fail if stream is NULL. */
 2185|      0|    rv = session_predicate_push_promise_send(session, stream);
 2186|      0|    if (rv != 0) {
  ------------------
  |  Branch (2186:9): [True: 0, False: 0]
  ------------------
 2187|      0|      return rv;
 2188|      0|    }
 2189|       |
 2190|      0|    assert(stream);
  ------------------
  |  Branch (2190:5): [True: 0, False: 0]
  |  Branch (2190:5): [True: 0, False: 0]
  ------------------
 2191|       |
 2192|      0|    estimated_payloadlen = session_estimate_headers_payload(
 2193|      0|      session, frame->push_promise.nva, frame->push_promise.nvlen, 0);
 2194|       |
 2195|      0|    if (estimated_payloadlen > session->max_send_header_block_length) {
  ------------------
  |  Branch (2195:9): [True: 0, False: 0]
  ------------------
 2196|      0|      return NGHTTP2_ERR_FRAME_SIZE_ERROR;
 2197|      0|    }
 2198|       |
 2199|      0|    rv = nghttp2_frame_pack_push_promise(
 2200|      0|      &session->aob.framebufs, &frame->push_promise, &session->hd_deflater);
 2201|      0|    if (rv != 0) {
  ------------------
  |  Branch (2201:9): [True: 0, False: 0]
  ------------------
 2202|      0|      return rv;
 2203|      0|    }
 2204|      0|    rv = session_headers_add_pad(session, frame);
 2205|      0|    if (rv != 0) {
  ------------------
  |  Branch (2205:9): [True: 0, False: 0]
  ------------------
 2206|      0|      return rv;
 2207|      0|    }
 2208|       |
 2209|      0|    assert(session->last_sent_stream_id + 2 <=
  ------------------
  |  Branch (2209:5): [True: 0, False: 0]
  |  Branch (2209:5): [True: 0, False: 0]
  ------------------
 2210|      0|           frame->push_promise.promised_stream_id);
 2211|      0|    session->last_sent_stream_id = frame->push_promise.promised_stream_id;
 2212|       |
 2213|      0|    return 0;
 2214|      0|  }
 2215|      0|  case NGHTTP2_PING:
  ------------------
  |  Branch (2215:3): [True: 0, False: 13]
  ------------------
 2216|      0|    if (frame->hd.flags & NGHTTP2_FLAG_ACK) {
  ------------------
  |  Branch (2216:9): [True: 0, False: 0]
  ------------------
 2217|      0|      assert(session->obq_flood_counter_ > 0);
  ------------------
  |  Branch (2217:7): [True: 0, False: 0]
  |  Branch (2217:7): [True: 0, False: 0]
  ------------------
 2218|      0|      --session->obq_flood_counter_;
 2219|      0|    }
 2220|       |    /* PING frame is allowed to be sent unless termination GOAWAY is
 2221|       |       sent */
 2222|      0|    if (session->goaway_flags & NGHTTP2_GOAWAY_TERM_ON_SEND) {
  ------------------
  |  |  180|      0|#define NGHTTP2_GOAWAY_TERM_ON_SEND 0x01U
  ------------------
  |  Branch (2222:9): [True: 0, False: 0]
  ------------------
 2223|      0|      return NGHTTP2_ERR_SESSION_CLOSING;
 2224|      0|    }
 2225|      0|    nghttp2_frame_pack_ping(&session->aob.framebufs, &frame->ping);
 2226|      0|    return 0;
 2227|      0|  case NGHTTP2_GOAWAY:
  ------------------
  |  Branch (2227:3): [True: 0, False: 13]
  ------------------
 2228|      0|    rv = nghttp2_frame_pack_goaway(&session->aob.framebufs, &frame->goaway);
 2229|      0|    if (rv != 0) {
  ------------------
  |  Branch (2229:9): [True: 0, False: 0]
  ------------------
 2230|      0|      return rv;
 2231|      0|    }
 2232|      0|    session->local_last_stream_id = frame->goaway.last_stream_id;
 2233|       |
 2234|      0|    return 0;
 2235|      6|  case NGHTTP2_WINDOW_UPDATE:
  ------------------
  |  Branch (2235:3): [True: 6, False: 7]
  ------------------
 2236|      6|    rv = session_predicate_window_update_send(session, frame->hd.stream_id);
 2237|      6|    if (rv != 0) {
  ------------------
  |  Branch (2237:9): [True: 0, False: 6]
  ------------------
 2238|      0|      return rv;
 2239|      0|    }
 2240|      6|    nghttp2_frame_pack_window_update(&session->aob.framebufs,
 2241|      6|                                     &frame->window_update);
 2242|      6|    return 0;
 2243|      0|  case NGHTTP2_CONTINUATION:
  ------------------
  |  Branch (2243:3): [True: 0, False: 13]
  ------------------
 2244|       |    /* We never handle CONTINUATION here. */
 2245|      0|    assert(0);
  ------------------
  |  Branch (2245:5): [Folded, False: 0]
  |  Branch (2245:5): [Folded, False: 0]
  ------------------
 2246|      0|    return 0;
 2247|      0|  default: {
  ------------------
  |  Branch (2247:3): [True: 0, False: 13]
  ------------------
 2248|      0|    nghttp2_ext_aux_data *aux_data;
 2249|       |
 2250|       |    /* extension frame */
 2251|       |
 2252|      0|    aux_data = &item->aux_data.ext;
 2253|       |
 2254|      0|    if (aux_data->builtin == 0) {
  ------------------
  |  Branch (2254:9): [True: 0, False: 0]
  ------------------
 2255|      0|      if (session_is_closing(session)) {
  ------------------
  |  Branch (2255:11): [True: 0, False: 0]
  ------------------
 2256|      0|        return NGHTTP2_ERR_SESSION_CLOSING;
 2257|      0|      }
 2258|       |
 2259|      0|      return session_pack_extension(session, &session->aob.framebufs, frame);
 2260|      0|    }
 2261|       |
 2262|      0|    switch (frame->hd.type) {
 2263|      0|    case NGHTTP2_ALTSVC:
  ------------------
  |  Branch (2263:5): [True: 0, False: 0]
  ------------------
 2264|      0|      rv = session_predicate_altsvc_send(session, frame->hd.stream_id);
 2265|      0|      if (rv != 0) {
  ------------------
  |  Branch (2265:11): [True: 0, False: 0]
  ------------------
 2266|      0|        return rv;
 2267|      0|      }
 2268|       |
 2269|      0|      nghttp2_frame_pack_altsvc(&session->aob.framebufs, &frame->ext);
 2270|       |
 2271|      0|      return 0;
 2272|      0|    case NGHTTP2_ORIGIN:
  ------------------
  |  Branch (2272:5): [True: 0, False: 0]
  ------------------
 2273|      0|      rv = session_predicate_origin_send(session);
 2274|      0|      if (rv != 0) {
  ------------------
  |  Branch (2274:11): [True: 0, False: 0]
  ------------------
 2275|      0|        return rv;
 2276|      0|      }
 2277|       |
 2278|      0|      rv = nghttp2_frame_pack_origin(&session->aob.framebufs, &frame->ext);
 2279|      0|      if (rv != 0) {
  ------------------
  |  Branch (2279:11): [True: 0, False: 0]
  ------------------
 2280|      0|        return rv;
 2281|      0|      }
 2282|       |
 2283|      0|      return 0;
 2284|      0|    case NGHTTP2_PRIORITY_UPDATE: {
  ------------------
  |  Branch (2284:5): [True: 0, False: 0]
  ------------------
 2285|      0|      nghttp2_ext_priority_update *priority_update = frame->ext.payload;
 2286|      0|      rv = session_predicate_priority_update_send(session,
 2287|      0|                                                  priority_update->stream_id);
 2288|      0|      if (rv != 0) {
  ------------------
  |  Branch (2288:11): [True: 0, False: 0]
  ------------------
 2289|      0|        return rv;
 2290|      0|      }
 2291|       |
 2292|      0|      nghttp2_frame_pack_priority_update(&session->aob.framebufs, &frame->ext);
 2293|       |
 2294|      0|      return 0;
 2295|      0|    }
 2296|      0|    default:
  ------------------
  |  Branch (2296:5): [True: 0, False: 0]
  ------------------
 2297|       |      /* Unreachable here */
 2298|      0|      assert(0);
  ------------------
  |  Branch (2298:7): [Folded, False: 0]
  |  Branch (2298:7): [Folded, False: 0]
  ------------------
 2299|      0|      return 0;
 2300|      0|    }
 2301|      0|  }
 2302|     13|  }
 2303|     13|}
nghttp2_session.c:session_predicate_request_headers_send:
 1461|      2|                                                  nghttp2_outbound_item *item) {
 1462|      2|  if (item->aux_data.headers.canceled) {
  ------------------
  |  Branch (1462:7): [True: 0, False: 2]
  ------------------
 1463|      0|    return NGHTTP2_ERR_STREAM_CLOSING;
 1464|      0|  }
 1465|       |  /* If we are terminating session (NGHTTP2_GOAWAY_TERM_ON_SEND),
 1466|       |     GOAWAY was received from peer, or session is about to close, new
 1467|       |     request is not allowed. */
 1468|      2|  if ((session->goaway_flags & NGHTTP2_GOAWAY_RECV) ||
  ------------------
  |  |  186|      2|#define NGHTTP2_GOAWAY_RECV 0x08U
  ------------------
  |  Branch (1468:7): [True: 0, False: 2]
  ------------------
 1469|      2|      session_is_closing(session)) {
  ------------------
  |  Branch (1469:7): [True: 0, False: 2]
  ------------------
 1470|      0|    return NGHTTP2_ERR_START_STREAM_NOT_ALLOWED;
 1471|      0|  }
 1472|      2|  return 0;
 1473|      2|}
nghttp2_session.c:session_estimate_headers_payload:
 1910|      2|                                               size_t additional) {
 1911|      2|  return nghttp2_hd_deflate_bound(&session->hd_deflater, nva, nvlen) +
 1912|      2|         additional;
 1913|      2|}
nghttp2_session.c:session_headers_add_pad:
 1875|      2|                                   nghttp2_frame *frame) {
 1876|      2|  nghttp2_ssize padded_payloadlen;
 1877|      2|  nghttp2_active_outbound_item *aob;
 1878|      2|  nghttp2_bufs *framebufs;
 1879|      2|  size_t padlen;
 1880|      2|  size_t max_payloadlen;
 1881|       |
 1882|      2|  aob = &session->aob;
 1883|      2|  framebufs = &aob->framebufs;
 1884|       |
 1885|      2|  max_payloadlen = nghttp2_min_size(NGHTTP2_MAX_PAYLOADLEN,
  ------------------
  |  |   45|      2|#define NGHTTP2_MAX_PAYLOADLEN 16384
  ------------------
 1886|      2|                                    frame->hd.length + NGHTTP2_MAX_PADLEN);
  ------------------
  |  |   67|      2|#define NGHTTP2_MAX_PADLEN 256
  ------------------
 1887|       |
 1888|      2|  padded_payloadlen =
 1889|      2|    session_call_select_padding(session, frame, max_payloadlen);
 1890|       |
 1891|      2|  if (nghttp2_is_fatal((int)padded_payloadlen)) {
  ------------------
  |  Branch (1891:7): [True: 0, False: 2]
  ------------------
 1892|      0|    return (int)padded_payloadlen;
 1893|      0|  }
 1894|       |
 1895|      2|  padlen = (size_t)padded_payloadlen - frame->hd.length;
 1896|       |
 1897|      2|  DEBUGF("send: padding selected: payloadlen=%td, padlen=%zu\n",
  ------------------
  |  |   39|      2|    do {                                                                       \
  |  |   40|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 1898|      2|         padded_payloadlen, padlen);
 1899|       |
 1900|      2|  nghttp2_frame_add_pad(framebufs, &frame->hd, padlen, 0);
 1901|       |
 1902|      2|  frame->headers.padlen = padlen;
 1903|       |
 1904|      2|  return 0;
 1905|      2|}
nghttp2_session.c:session_predicate_window_update_send:
 1681|      6|                                                int32_t stream_id) {
 1682|      6|  nghttp2_stream *stream;
 1683|       |
 1684|      6|  if (session_is_closing(session)) {
  ------------------
  |  Branch (1684:7): [True: 0, False: 6]
  ------------------
 1685|      0|    return NGHTTP2_ERR_SESSION_CLOSING;
 1686|      0|  }
 1687|       |
 1688|      6|  if (stream_id == 0) {
  ------------------
  |  Branch (1688:7): [True: 2, False: 4]
  ------------------
 1689|       |    /* Connection-level window update */
 1690|      2|    return 0;
 1691|      2|  }
 1692|      4|  stream = nghttp2_session_get_stream(session, stream_id);
 1693|      4|  if (stream == NULL) {
  ------------------
  |  Branch (1693:7): [True: 0, False: 4]
  ------------------
 1694|      0|    return NGHTTP2_ERR_STREAM_CLOSED;
 1695|      0|  }
 1696|      4|  if (stream->state == NGHTTP2_STREAM_CLOSING) {
  ------------------
  |  Branch (1696:7): [True: 0, False: 4]
  ------------------
 1697|      0|    return NGHTTP2_ERR_STREAM_CLOSING;
 1698|      0|  }
 1699|      4|  if (state_reserved_local(session, stream)) {
  ------------------
  |  Branch (1699:7): [True: 0, False: 4]
  ------------------
 1700|      0|    return NGHTTP2_ERR_INVALID_STREAM_STATE;
 1701|      0|  }
 1702|      4|  return 0;
 1703|      4|}
nghttp2_session.c:state_reserved_local:
  120|      4|                                nghttp2_stream *stream) {
  121|      4|  return stream->state == NGHTTP2_STREAM_RESERVED &&
  ------------------
  |  Branch (121:10): [True: 0, False: 4]
  ------------------
  122|      0|         nghttp2_session_is_my_stream_id(session, stream->stream_id);
  ------------------
  |  Branch (122:10): [True: 0, False: 0]
  ------------------
  123|      4|}
nghttp2_session.c:session_call_before_frame_send:
 2363|     13|                                          nghttp2_frame *frame) {
 2364|     13|  int rv;
 2365|     13|  if (session->callbacks.before_frame_send_callback) {
  ------------------
  |  Branch (2365:7): [True: 0, False: 13]
  ------------------
 2366|      0|    rv = session->callbacks.before_frame_send_callback(session, frame,
 2367|      0|                                                       session->user_data);
 2368|      0|    if (rv == NGHTTP2_ERR_CANCEL) {
  ------------------
  |  Branch (2368:9): [True: 0, False: 0]
  ------------------
 2369|      0|      return rv;
 2370|      0|    }
 2371|       |
 2372|      0|    if (rv != 0) {
  ------------------
  |  Branch (2372:9): [True: 0, False: 0]
  ------------------
 2373|      0|      return NGHTTP2_ERR_CALLBACK_FAILURE;
 2374|      0|    }
 2375|      0|  }
 2376|     13|  return 0;
 2377|     13|}
nghttp2_session.c:session_after_frame_sent2:
 2727|     13|static void session_after_frame_sent2(nghttp2_session *session) {
 2728|     13|  nghttp2_active_outbound_item *aob = &session->aob;
 2729|     13|  nghttp2_outbound_item *item = aob->item;
 2730|     13|  nghttp2_bufs *framebufs = &aob->framebufs;
 2731|     13|  nghttp2_frame *frame;
 2732|     13|  nghttp2_mem *mem;
 2733|     13|  nghttp2_stream *stream;
 2734|     13|  nghttp2_data_aux_data *aux_data;
 2735|       |
 2736|     13|  mem = &session->mem;
 2737|     13|  frame = &item->frame;
 2738|       |
 2739|     13|  if (frame->hd.type != NGHTTP2_DATA) {
  ------------------
  |  Branch (2739:7): [True: 13, False: 0]
  ------------------
 2740|     13|    if (frame->hd.type == NGHTTP2_HEADERS ||
  ------------------
  |  Branch (2740:9): [True: 2, False: 11]
  ------------------
 2741|     11|        frame->hd.type == NGHTTP2_PUSH_PROMISE) {
  ------------------
  |  Branch (2741:9): [True: 0, False: 11]
  ------------------
 2742|      2|      if (nghttp2_bufs_next_present(framebufs)) {
  ------------------
  |  Branch (2742:11): [True: 0, False: 2]
  ------------------
 2743|      0|        framebufs->cur = framebufs->cur->next;
 2744|       |
 2745|      0|        DEBUGF("send: next CONTINUATION frame, %zu bytes\n",
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2746|      0|               nghttp2_buf_len(&framebufs->cur->buf));
 2747|       |
 2748|      0|        return;
 2749|      0|      }
 2750|      2|    }
 2751|       |
 2752|     13|    active_outbound_item_reset(&session->aob, mem);
 2753|       |
 2754|     13|    return;
 2755|     13|  }
 2756|       |
 2757|       |  /* DATA frame */
 2758|       |
 2759|      0|  aux_data = &item->aux_data.data;
 2760|       |
 2761|       |  /* On EOF, we have already detached data.  Please note that
 2762|       |     application may issue nghttp2_submit_data2() in
 2763|       |     on_frame_send_callback (call from session_after_frame_sent1),
 2764|       |     which attach data to stream.  We don't want to detach it. */
 2765|      0|  if (aux_data->eof) {
  ------------------
  |  Branch (2765:7): [True: 0, False: 0]
  ------------------
 2766|      0|    active_outbound_item_reset(aob, mem);
 2767|       |
 2768|      0|    return;
 2769|      0|  }
 2770|       |
 2771|       |  /* Reset no_copy here because next write may not use this. */
 2772|      0|  aux_data->no_copy = 0;
 2773|       |
 2774|      0|  stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
 2775|       |
 2776|       |  /* If session is closed or RST_STREAM was queued, we won't send
 2777|       |     further data. */
 2778|      0|  if (nghttp2_session_predicate_data_send(session, stream) != 0) {
  ------------------
  |  Branch (2778:7): [True: 0, False: 0]
  ------------------
 2779|      0|    if (stream) {
  ------------------
  |  Branch (2779:9): [True: 0, False: 0]
  ------------------
 2780|      0|      session_detach_stream_item(session, stream);
 2781|      0|    }
 2782|       |
 2783|      0|    active_outbound_item_reset(aob, mem);
 2784|       |
 2785|      0|    return;
 2786|      0|  }
 2787|       |
 2788|      0|  aob->item = NULL;
 2789|      0|  active_outbound_item_reset(&session->aob, mem);
 2790|       |
 2791|      0|  return;
 2792|      0|}
nghttp2_session.c:session_after_frame_sent1:
 2497|     13|static int session_after_frame_sent1(nghttp2_session *session) {
 2498|     13|  int rv;
 2499|     13|  nghttp2_active_outbound_item *aob = &session->aob;
 2500|     13|  nghttp2_outbound_item *item = aob->item;
 2501|     13|  nghttp2_bufs *framebufs = &aob->framebufs;
 2502|     13|  nghttp2_frame *frame;
 2503|     13|  nghttp2_stream *stream;
 2504|       |
 2505|     13|  frame = &item->frame;
 2506|       |
 2507|     13|  if (frame->hd.type == NGHTTP2_DATA) {
  ------------------
  |  Branch (2507:7): [True: 0, False: 13]
  ------------------
 2508|      0|    nghttp2_data_aux_data *aux_data;
 2509|       |
 2510|      0|    aux_data = &item->aux_data.data;
 2511|       |
 2512|      0|    stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
 2513|       |    /* We update flow control window after a frame was completely
 2514|       |       sent. This is possible because we choose payload length not to
 2515|       |       exceed the window */
 2516|      0|    session->remote_window_size -= (int32_t)frame->hd.length;
 2517|      0|    if (stream) {
  ------------------
  |  Branch (2517:9): [True: 0, False: 0]
  ------------------
 2518|      0|      stream->remote_window_size -= (int32_t)frame->hd.length;
 2519|      0|    }
 2520|       |
 2521|      0|    if (stream && aux_data->eof) {
  ------------------
  |  Branch (2521:9): [True: 0, False: 0]
  |  Branch (2521:19): [True: 0, False: 0]
  ------------------
 2522|      0|      session_detach_stream_item(session, stream);
 2523|       |
 2524|       |      /* Call on_frame_send_callback after
 2525|       |         nghttp2_stream_detach_item(), so that application can issue
 2526|       |         nghttp2_submit_data2() in the callback. */
 2527|      0|      if (session->callbacks.on_frame_send_callback) {
  ------------------
  |  Branch (2527:11): [True: 0, False: 0]
  ------------------
 2528|      0|        rv = session_call_on_frame_send(session, frame);
 2529|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (2529:13): [True: 0, False: 0]
  ------------------
 2530|      0|          return rv;
 2531|      0|        }
 2532|      0|      }
 2533|       |
 2534|      0|      if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) {
  ------------------
  |  Branch (2534:11): [True: 0, False: 0]
  ------------------
 2535|      0|        int stream_closed;
 2536|       |
 2537|      0|        stream_closed =
 2538|      0|          (stream->shut_flags & NGHTTP2_SHUT_RDWR) == NGHTTP2_SHUT_RDWR;
  ------------------
  |  |   76|      0|#define NGHTTP2_SHUT_RDWR (NGHTTP2_SHUT_RD | NGHTTP2_SHUT_WR)
  |  |  ------------------
  |  |  |  |   71|      0|#define NGHTTP2_SHUT_RD 0x01U
  |  |  ------------------
  |  |               #define NGHTTP2_SHUT_RDWR (NGHTTP2_SHUT_RD | NGHTTP2_SHUT_WR)
  |  |  ------------------
  |  |  |  |   73|      0|#define NGHTTP2_SHUT_WR 0x02U
  |  |  ------------------
  ------------------
                        (stream->shut_flags & NGHTTP2_SHUT_RDWR) == NGHTTP2_SHUT_RDWR;
  ------------------
  |  |   76|      0|#define NGHTTP2_SHUT_RDWR (NGHTTP2_SHUT_RD | NGHTTP2_SHUT_WR)
  |  |  ------------------
  |  |  |  |   71|      0|#define NGHTTP2_SHUT_RD 0x01U
  |  |  ------------------
  |  |               #define NGHTTP2_SHUT_RDWR (NGHTTP2_SHUT_RD | NGHTTP2_SHUT_WR)
  |  |  ------------------
  |  |  |  |   73|      0|#define NGHTTP2_SHUT_WR 0x02U
  |  |  ------------------
  ------------------
 2539|       |
 2540|      0|        nghttp2_stream_shutdown(stream, NGHTTP2_SHUT_WR);
  ------------------
  |  |   73|      0|#define NGHTTP2_SHUT_WR 0x02U
  ------------------
 2541|       |
 2542|      0|        rv = nghttp2_session_close_stream_if_shut_rdwr(session, stream);
 2543|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (2543:13): [True: 0, False: 0]
  ------------------
 2544|      0|          return rv;
 2545|      0|        }
 2546|       |        /* stream may be NULL if it was closed */
 2547|      0|        if (stream_closed) {
  ------------------
  |  Branch (2547:13): [True: 0, False: 0]
  ------------------
 2548|      0|          stream = NULL;
 2549|      0|        }
 2550|      0|      }
 2551|      0|      return 0;
 2552|      0|    }
 2553|       |
 2554|      0|    if (session->callbacks.on_frame_send_callback) {
  ------------------
  |  Branch (2554:9): [True: 0, False: 0]
  ------------------
 2555|      0|      rv = session_call_on_frame_send(session, frame);
 2556|      0|      if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (2556:11): [True: 0, False: 0]
  ------------------
 2557|      0|        return rv;
 2558|      0|      }
 2559|      0|    }
 2560|       |
 2561|      0|    return 0;
 2562|      0|  }
 2563|       |
 2564|       |  /* non-DATA frame */
 2565|       |
 2566|     13|  if (frame->hd.type == NGHTTP2_HEADERS ||
  ------------------
  |  Branch (2566:7): [True: 2, False: 11]
  ------------------
 2567|     11|      frame->hd.type == NGHTTP2_PUSH_PROMISE) {
  ------------------
  |  Branch (2567:7): [True: 0, False: 11]
  ------------------
 2568|      2|    if (nghttp2_bufs_next_present(framebufs)) {
  ------------------
  |  Branch (2568:9): [True: 0, False: 2]
  ------------------
 2569|      0|      DEBUGF("send: CONTINUATION exists, just return\n");
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2570|      0|      return 0;
 2571|      0|    }
 2572|      2|  }
 2573|     13|  rv = session_call_on_frame_send(session, frame);
 2574|     13|  if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (2574:7): [True: 0, False: 13]
  ------------------
 2575|      0|    return rv;
 2576|      0|  }
 2577|     13|  switch (frame->hd.type) {
 2578|      2|  case NGHTTP2_HEADERS: {
  ------------------
  |  Branch (2578:3): [True: 2, False: 11]
  ------------------
 2579|      2|    nghttp2_headers_aux_data *aux_data;
 2580|       |
 2581|      2|    stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
 2582|      2|    if (!stream) {
  ------------------
  |  Branch (2582:9): [True: 0, False: 2]
  ------------------
 2583|      0|      return 0;
 2584|      0|    }
 2585|       |
 2586|      2|    switch (frame->headers.cat) {
 2587|      2|    case NGHTTP2_HCAT_REQUEST: {
  ------------------
  |  Branch (2587:5): [True: 2, False: 0]
  ------------------
 2588|      2|      stream->state = NGHTTP2_STREAM_OPENING;
 2589|      2|      if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) {
  ------------------
  |  Branch (2589:11): [True: 2, False: 0]
  ------------------
 2590|      2|        nghttp2_stream_shutdown(stream, NGHTTP2_SHUT_WR);
  ------------------
  |  |   73|      2|#define NGHTTP2_SHUT_WR 0x02U
  ------------------
 2591|      2|      }
 2592|      2|      rv = nghttp2_session_close_stream_if_shut_rdwr(session, stream);
 2593|      2|      if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (2593:11): [True: 0, False: 2]
  ------------------
 2594|      0|        return rv;
 2595|      0|      }
 2596|       |      /* We assume aux_data is a pointer to nghttp2_headers_aux_data */
 2597|      2|      aux_data = &item->aux_data.headers;
 2598|      2|      if (nghttp2_data_provider_wrap_contains_read_callback(&aux_data->dpw)) {
  ------------------
  |  Branch (2598:11): [True: 0, False: 2]
  ------------------
 2599|       |        /* nghttp2_submit_data_shared() makes a copy of
 2600|       |           aux_data->dpw */
 2601|      0|        rv = nghttp2_submit_data_shared(session, NGHTTP2_FLAG_END_STREAM,
 2602|      0|                                        frame->hd.stream_id, &aux_data->dpw);
 2603|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (2603:13): [True: 0, False: 0]
  ------------------
 2604|      0|          return rv;
 2605|      0|        }
 2606|       |        /* TODO nghttp2_submit_data_shared() may fail if stream has
 2607|       |           already DATA frame item.  We might have to handle it
 2608|       |           here. */
 2609|      0|      }
 2610|      2|      return 0;
 2611|      2|    }
 2612|      0|    case NGHTTP2_HCAT_PUSH_RESPONSE:
  ------------------
  |  Branch (2612:5): [True: 0, False: 2]
  ------------------
 2613|      0|      stream->flags = (uint8_t)(stream->flags & ~NGHTTP2_STREAM_FLAG_PUSH);
  ------------------
  |  |   80|      0|#define NGHTTP2_STREAM_FLAG_PUSH 0x01U
  ------------------
 2614|      0|      ++session->num_outgoing_streams;
 2615|       |    /* Fall through */
 2616|      0|    case NGHTTP2_HCAT_RESPONSE:
  ------------------
  |  Branch (2616:5): [True: 0, False: 2]
  ------------------
 2617|      0|      stream->state = NGHTTP2_STREAM_OPENED;
 2618|       |    /* Fall through */
 2619|      0|    case NGHTTP2_HCAT_HEADERS:
  ------------------
  |  Branch (2619:5): [True: 0, False: 2]
  ------------------
 2620|      0|      if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) {
  ------------------
  |  Branch (2620:11): [True: 0, False: 0]
  ------------------
 2621|      0|        nghttp2_stream_shutdown(stream, NGHTTP2_SHUT_WR);
  ------------------
  |  |   73|      0|#define NGHTTP2_SHUT_WR 0x02U
  ------------------
 2622|      0|      }
 2623|      0|      rv = nghttp2_session_close_stream_if_shut_rdwr(session, stream);
 2624|      0|      if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (2624:11): [True: 0, False: 0]
  ------------------
 2625|      0|        return rv;
 2626|      0|      }
 2627|       |      /* We assume aux_data is a pointer to nghttp2_headers_aux_data */
 2628|      0|      aux_data = &item->aux_data.headers;
 2629|      0|      if (nghttp2_data_provider_wrap_contains_read_callback(&aux_data->dpw)) {
  ------------------
  |  Branch (2629:11): [True: 0, False: 0]
  ------------------
 2630|      0|        rv = nghttp2_submit_data_shared(session, NGHTTP2_FLAG_END_STREAM,
 2631|      0|                                        frame->hd.stream_id, &aux_data->dpw);
 2632|      0|        if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (2632:13): [True: 0, False: 0]
  ------------------
 2633|      0|          return rv;
 2634|      0|        }
 2635|       |        /* TODO nghttp2_submit_data_shared() may fail if stream has
 2636|       |           already DATA frame item.  We might have to handle it
 2637|       |           here. */
 2638|      0|      }
 2639|      0|      return 0;
 2640|      0|    default:
  ------------------
  |  Branch (2640:5): [True: 0, False: 2]
  ------------------
 2641|       |      /* Unreachable */
 2642|      0|      assert(0);
  ------------------
  |  Branch (2642:7): [Folded, False: 0]
  |  Branch (2642:7): [Folded, False: 0]
  ------------------
 2643|      0|      return 0;
 2644|      2|    }
 2645|      2|  }
 2646|      0|  case NGHTTP2_PRIORITY:
  ------------------
  |  Branch (2646:3): [True: 0, False: 13]
  ------------------
 2647|      0|    return 0;
 2648|      2|  case NGHTTP2_RST_STREAM:
  ------------------
  |  Branch (2648:3): [True: 2, False: 11]
  ------------------
 2649|      2|    rv = nghttp2_session_close_stream(session, frame->hd.stream_id,
 2650|      2|                                      frame->rst_stream.error_code);
 2651|      2|    if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (2651:9): [True: 0, False: 2]
  ------------------
 2652|      0|      return rv;
 2653|      0|    }
 2654|      2|    return 0;
 2655|      0|  case NGHTTP2_GOAWAY: {
  ------------------
  |  Branch (2655:3): [True: 0, False: 13]
  ------------------
 2656|      0|    nghttp2_goaway_aux_data *aux_data;
 2657|       |
 2658|      0|    aux_data = &item->aux_data.goaway;
 2659|       |
 2660|      0|    if ((aux_data->flags & NGHTTP2_GOAWAY_AUX_SHUTDOWN_NOTICE) == 0) {
  ------------------
  |  Branch (2660:9): [True: 0, False: 0]
  ------------------
 2661|      0|      if (aux_data->flags & NGHTTP2_GOAWAY_AUX_TERM_ON_SEND) {
  ------------------
  |  Branch (2661:11): [True: 0, False: 0]
  ------------------
 2662|      0|        session->goaway_flags |= NGHTTP2_GOAWAY_TERM_SENT;
  ------------------
  |  |  182|      0|#define NGHTTP2_GOAWAY_TERM_SENT 0x02U
  ------------------
 2663|      0|      }
 2664|       |
 2665|      0|      session->goaway_flags |= NGHTTP2_GOAWAY_SENT;
  ------------------
  |  |  184|      0|#define NGHTTP2_GOAWAY_SENT 0x04U
  ------------------
 2666|       |
 2667|      0|      rv = session_close_stream_on_goaway(session, frame->goaway.last_stream_id,
 2668|      0|                                          1);
 2669|       |
 2670|      0|      if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (2670:11): [True: 0, False: 0]
  ------------------
 2671|      0|        return rv;
 2672|      0|      }
 2673|      0|    }
 2674|       |
 2675|      0|    return 0;
 2676|      0|  }
 2677|      6|  case NGHTTP2_WINDOW_UPDATE:
  ------------------
  |  Branch (2677:3): [True: 6, False: 7]
  ------------------
 2678|      6|    if (frame->hd.stream_id == 0) {
  ------------------
  |  Branch (2678:9): [True: 2, False: 4]
  ------------------
 2679|      2|      session->window_update_queued = 0;
 2680|      2|      if (session->opt_flags & NGHTTP2_OPTMASK_NO_AUTO_WINDOW_UPDATE) {
  ------------------
  |  |   53|      2|#define NGHTTP2_OPTMASK_NO_AUTO_WINDOW_UPDATE 0x01U
  ------------------
  |  Branch (2680:11): [True: 2, False: 0]
  ------------------
 2681|      2|        rv = session_update_connection_consumed_size(session, 0);
 2682|      2|      } else {
 2683|      0|        rv = nghttp2_session_update_recv_connection_window_size(session, 0);
 2684|      0|      }
 2685|       |
 2686|      2|      if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (2686:11): [True: 0, False: 2]
  ------------------
 2687|      0|        return rv;
 2688|      0|      }
 2689|       |
 2690|      2|      return 0;
 2691|      2|    }
 2692|       |
 2693|      4|    stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
 2694|      4|    if (!stream) {
  ------------------
  |  Branch (2694:9): [True: 0, False: 4]
  ------------------
 2695|      0|      return 0;
 2696|      0|    }
 2697|       |
 2698|      4|    stream->window_update_queued = 0;
 2699|       |
 2700|       |    /* We don't have to send WINDOW_UPDATE if END_STREAM from peer
 2701|       |       is seen. */
 2702|      4|    if (stream->shut_flags & NGHTTP2_SHUT_RD) {
  ------------------
  |  |   71|      4|#define NGHTTP2_SHUT_RD 0x01U
  ------------------
  |  Branch (2702:9): [True: 0, False: 4]
  ------------------
 2703|      0|      return 0;
 2704|      0|    }
 2705|       |
 2706|      4|    if (session->opt_flags & NGHTTP2_OPTMASK_NO_AUTO_WINDOW_UPDATE) {
  ------------------
  |  |   53|      4|#define NGHTTP2_OPTMASK_NO_AUTO_WINDOW_UPDATE 0x01U
  ------------------
  |  Branch (2706:9): [True: 4, False: 0]
  ------------------
 2707|      4|      rv = session_update_stream_consumed_size(session, stream, 0);
 2708|      4|    } else {
 2709|      0|      rv =
 2710|      0|        nghttp2_session_update_recv_stream_window_size(session, stream, 0, 1);
 2711|      0|    }
 2712|       |
 2713|      4|    if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (2713:9): [True: 0, False: 4]
  ------------------
 2714|      0|      return rv;
 2715|      0|    }
 2716|       |
 2717|      4|    return 0;
 2718|      3|  default:
  ------------------
  |  Branch (2718:3): [True: 3, False: 10]
  ------------------
 2719|      3|    return 0;
 2720|     13|  }
 2721|     13|}
nghttp2_session.c:session_call_on_frame_send:
 2380|     13|                                      nghttp2_frame *frame) {
 2381|     13|  int rv;
 2382|     13|  if (session->callbacks.on_frame_send_callback) {
  ------------------
  |  Branch (2382:7): [True: 13, False: 0]
  ------------------
 2383|     13|    rv = session->callbacks.on_frame_send_callback(session, frame,
 2384|     13|                                                   session->user_data);
 2385|     13|    if (rv != 0) {
  ------------------
  |  Branch (2385:9): [True: 0, False: 13]
  ------------------
 2386|      0|      return NGHTTP2_ERR_CALLBACK_FAILURE;
 2387|      0|    }
 2388|     13|  }
 2389|     13|  return 0;
 2390|     13|}
nghttp2_session.c:session_call_on_begin_headers:
 3241|      1|                                         nghttp2_frame *frame) {
 3242|      1|  int rv;
 3243|      1|  DEBUGF("recv: call on_begin_headers callback stream_id=%d\n",
  ------------------
  |  |   39|      1|    do {                                                                       \
  |  |   40|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
 3244|      1|         frame->hd.stream_id);
 3245|      1|  if (session->callbacks.on_begin_headers_callback) {
  ------------------
  |  Branch (3245:7): [True: 1, False: 0]
  ------------------
 3246|      1|    rv = session->callbacks.on_begin_headers_callback(session, frame,
 3247|      1|                                                      session->user_data);
 3248|      1|    if (rv == NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE) {
  ------------------
  |  Branch (3248:9): [True: 0, False: 1]
  ------------------
 3249|      0|      return rv;
 3250|      0|    }
 3251|      1|    if (rv != 0) {
  ------------------
  |  Branch (3251:9): [True: 0, False: 1]
  ------------------
 3252|      0|      return NGHTTP2_ERR_CALLBACK_FAILURE;
 3253|      0|    }
 3254|      1|  }
 3255|      1|  return 0;
 3256|      1|}
nghttp2_session.c:session_call_on_frame_received:
 3228|      2|                                          nghttp2_frame *frame) {
 3229|      2|  int rv;
 3230|      2|  if (session->callbacks.on_frame_recv_callback) {
  ------------------
  |  Branch (3230:7): [True: 2, False: 0]
  ------------------
 3231|      2|    rv = session->callbacks.on_frame_recv_callback(session, frame,
 3232|      2|                                                   session->user_data);
 3233|      2|    if (rv != 0) {
  ------------------
  |  Branch (3233:9): [True: 0, False: 2]
  ------------------
 3234|      0|      return NGHTTP2_ERR_CALLBACK_FAILURE;
 3235|      0|    }
 3236|      2|  }
 3237|      2|  return 0;
 3238|      2|}
nghttp2_session.c:session_update_local_initial_window_size:
 4239|      1|                                         int32_t old_initial_window_size) {
 4240|      1|  return nghttp2_map_each(&session->streams,
 4241|      1|                          update_local_initial_window_size_func,
 4242|      1|                          &(nghttp2_update_window_size_arg){
 4243|      1|                            .session = session,
 4244|      1|                            .new_window_size = new_initial_window_size,
 4245|      1|                            .old_window_size = old_initial_window_size,
 4246|      1|                          });
 4247|      1|}
nghttp2_session.c:update_local_initial_window_size_func:
 4190|      1|static int update_local_initial_window_size_func(void *entry, void *ptr) {
 4191|      1|  int rv;
 4192|      1|  nghttp2_update_window_size_arg *arg;
 4193|      1|  nghttp2_stream *stream;
 4194|      1|  arg = (nghttp2_update_window_size_arg *)ptr;
 4195|      1|  stream = (nghttp2_stream *)entry;
 4196|      1|  rv = nghttp2_stream_update_local_initial_window_size(
 4197|      1|    stream, arg->new_window_size, arg->old_window_size);
 4198|      1|  if (rv != 0) {
  ------------------
  |  Branch (4198:7): [True: 0, False: 1]
  ------------------
 4199|      0|    return NGHTTP2_ERR_FLOW_CONTROL;
 4200|      0|  }
 4201|       |
 4202|      1|  if (stream->window_update_queued) {
  ------------------
  |  Branch (4202:7): [True: 0, False: 1]
  ------------------
 4203|      0|    return 0;
 4204|      0|  }
 4205|       |
 4206|      1|  if (arg->session->opt_flags & NGHTTP2_OPTMASK_NO_AUTO_WINDOW_UPDATE) {
  ------------------
  |  |   53|      1|#define NGHTTP2_OPTMASK_NO_AUTO_WINDOW_UPDATE 0x01U
  ------------------
  |  Branch (4206:7): [True: 1, False: 0]
  ------------------
 4207|      1|    return session_update_stream_consumed_size(arg->session, stream, 0);
 4208|      1|  }
 4209|       |
 4210|      0|  if (nghttp2_should_send_window_update(stream->local_window_size,
  ------------------
  |  Branch (4210:7): [True: 0, False: 0]
  ------------------
 4211|      0|                                        stream->recv_window_size)) {
 4212|      0|    rv = nghttp2_session_add_window_update(arg->session, NGHTTP2_FLAG_NONE,
 4213|      0|                                           stream->stream_id,
 4214|      0|                                           stream->recv_window_size);
 4215|      0|    if (rv != 0) {
  ------------------
  |  Branch (4215:9): [True: 0, False: 0]
  ------------------
 4216|      0|      return rv;
 4217|      0|    }
 4218|       |
 4219|      0|    stream->recv_window_size = 0;
 4220|      0|  }
 4221|      0|  return 0;
 4222|      0|}
nghttp2_session.c:session_enforce_http_messaging:
   90|      3|static int session_enforce_http_messaging(nghttp2_session *session) {
   91|      3|  return (session->opt_flags & NGHTTP2_OPTMASK_NO_HTTP_MESSAGING) == 0;
  ------------------
  |  |   55|      3|#define NGHTTP2_OPTMASK_NO_HTTP_MESSAGING 0x04U
  ------------------
   92|      3|}
nghttp2_session.c:inbound_frame_buf_read:
 5296|      6|                                     const uint8_t *in, const uint8_t *last) {
 5297|      6|  size_t readlen;
 5298|       |
 5299|      6|  readlen = nghttp2_min_size((size_t)(last - in),
 5300|      6|                             nghttp2_buf_mark_avail(&iframe->sbuf));
  ------------------
  |  |   56|      6|#define nghttp2_buf_mark_avail(BUF) ((size_t)((BUF)->mark - (BUF)->last))
  ------------------
 5301|       |
 5302|      6|  iframe->sbuf.last = nghttp2_cpymem(iframe->sbuf.last, in, readlen);
 5303|       |
 5304|      6|  return readlen;
 5305|      6|}
nghttp2_session.c:inbound_frame_handle_pad:
 5362|      1|                                    nghttp2_frame_hd *hd) {
 5363|      1|  if (hd->flags & NGHTTP2_FLAG_PADDED) {
  ------------------
  |  Branch (5363:7): [True: 0, False: 1]
  ------------------
 5364|      0|    if (hd->length < 1) {
  ------------------
  |  Branch (5364:9): [True: 0, False: 0]
  ------------------
 5365|      0|      return -1;
 5366|      0|    }
 5367|      0|    inbound_frame_set_mark(iframe, 1);
 5368|      0|    return 1;
 5369|      0|  }
 5370|      1|  DEBUGF("recv: no padding in payload\n");
  ------------------
  |  |   39|      1|    do {                                                                       \
  |  |   40|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
 5371|      1|  return 0;
 5372|      1|}
nghttp2_session.c:inbound_frame_set_mark:
 5290|      2|static void inbound_frame_set_mark(nghttp2_inbound_frame *iframe, size_t left) {
 5291|      2|  nghttp2_buf_reset(&iframe->sbuf);
 5292|      2|  iframe->sbuf.mark += left;
 5293|      2|}
nghttp2_session.c:session_call_on_begin_frame:
 3212|      3|                                       const nghttp2_frame_hd *hd) {
 3213|      3|  int rv;
 3214|       |
 3215|      3|  if (session->callbacks.on_begin_frame_callback) {
  ------------------
  |  Branch (3215:7): [True: 0, False: 3]
  ------------------
 3216|      0|    rv = session->callbacks.on_begin_frame_callback(session, hd,
 3217|      0|                                                    session->user_data);
 3218|       |
 3219|      0|    if (rv != 0) {
  ------------------
  |  Branch (3219:9): [True: 0, False: 0]
  ------------------
 3220|      0|      return NGHTTP2_ERR_CALLBACK_FAILURE;
 3221|      0|    }
 3222|      0|  }
 3223|       |
 3224|      3|  return 0;
 3225|      3|}
nghttp2_session.c:session_process_headers_frame:
 4050|      1|static int session_process_headers_frame(nghttp2_session *session) {
 4051|      1|  nghttp2_inbound_frame *iframe = &session->iframe;
 4052|      1|  nghttp2_frame *frame = &iframe->frame;
 4053|      1|  nghttp2_stream *stream;
 4054|       |
 4055|      1|  nghttp2_frame_unpack_headers_payload(&frame->headers, iframe->sbuf.pos);
 4056|       |
 4057|      1|  stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
 4058|      1|  if (!stream) {
  ------------------
  |  Branch (4058:7): [True: 0, False: 1]
  ------------------
 4059|      0|    frame->headers.cat = NGHTTP2_HCAT_REQUEST;
 4060|      0|    return nghttp2_session_on_request_headers_received(session, frame);
 4061|      0|  }
 4062|       |
 4063|      1|  if (stream->state == NGHTTP2_STREAM_RESERVED) {
  ------------------
  |  Branch (4063:7): [True: 0, False: 1]
  ------------------
 4064|      0|    frame->headers.cat = NGHTTP2_HCAT_PUSH_RESPONSE;
 4065|      0|    return nghttp2_session_on_push_response_headers_received(session, frame,
 4066|      0|                                                             stream);
 4067|      0|  }
 4068|       |
 4069|      1|  if (stream->state == NGHTTP2_STREAM_OPENING &&
  ------------------
  |  Branch (4069:7): [True: 1, False: 0]
  ------------------
 4070|      1|      nghttp2_session_is_my_stream_id(session, frame->hd.stream_id)) {
  ------------------
  |  Branch (4070:7): [True: 1, False: 0]
  ------------------
 4071|      1|    frame->headers.cat = NGHTTP2_HCAT_RESPONSE;
 4072|      1|    return nghttp2_session_on_response_headers_received(session, frame, stream);
 4073|      1|  }
 4074|       |
 4075|      0|  frame->headers.cat = NGHTTP2_HCAT_HEADERS;
 4076|      0|  return nghttp2_session_on_headers_received(session, frame, stream);
 4077|      1|}
nghttp2_session.c:inbound_frame_payload_readlen:
 5283|      1|                                            const uint8_t *last) {
 5284|      1|  return nghttp2_min_size((size_t)(last - in), iframe->payloadleft);
 5285|      1|}
nghttp2_session.c:inbound_frame_effective_readlen:
 5404|      1|                                size_t payloadleft, size_t readlen) {
 5405|      1|  size_t trail_padlen =
 5406|      1|    nghttp2_frame_trail_padlen(&iframe->frame, iframe->padlen);
 5407|       |
 5408|      1|  if (trail_padlen > payloadleft) {
  ------------------
  |  Branch (5408:7): [True: 0, False: 1]
  ------------------
 5409|      0|    size_t padlen;
 5410|      0|    padlen = trail_padlen - payloadleft;
 5411|      0|    if (readlen < padlen) {
  ------------------
  |  Branch (5411:9): [True: 0, False: 0]
  ------------------
 5412|      0|      return -1;
 5413|      0|    }
 5414|      0|    return (nghttp2_ssize)(readlen - padlen);
 5415|      0|  }
 5416|      1|  return (nghttp2_ssize)(readlen);
 5417|      1|}
nghttp2_session.c:inflate_header_block:
 3521|      1|                                int final, int call_header_cb) {
 3522|      1|  nghttp2_inbound_frame *iframe = &session->iframe;
 3523|      1|  nghttp2_ssize proclen;
 3524|      1|  int rv;
 3525|      1|  int inflate_flags;
 3526|      1|  nghttp2_hd_nv nv;
 3527|      1|  nghttp2_stream *stream;
 3528|      1|  nghttp2_stream *subject_stream;
 3529|      1|  int trailer = 0;
 3530|       |
 3531|      1|  *readlen_ptr = 0;
 3532|      1|  stream = nghttp2_session_get_stream(session, frame->hd.stream_id);
 3533|       |
 3534|      1|  if (frame->hd.type == NGHTTP2_PUSH_PROMISE) {
  ------------------
  |  Branch (3534:7): [True: 0, False: 1]
  ------------------
 3535|      0|    subject_stream = nghttp2_session_get_stream(
 3536|      0|      session, frame->push_promise.promised_stream_id);
 3537|      1|  } else {
 3538|      1|    subject_stream = stream;
 3539|      1|    trailer = session_trailer_headers(session, stream, frame);
 3540|      1|  }
 3541|       |
 3542|      1|  DEBUGF("recv: decoding header block %zu bytes\n", inlen);
  ------------------
  |  |   39|      1|    do {                                                                       \
  |  |   40|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
 3543|      2|  for (;;) {
 3544|      2|    inflate_flags = 0;
 3545|      2|    proclen = nghttp2_hd_inflate_hd_nv(&session->hd_inflater, &nv,
 3546|      2|                                       &inflate_flags, in, inlen, final);
 3547|      2|    if (nghttp2_is_fatal((int)proclen)) {
  ------------------
  |  Branch (3547:9): [True: 0, False: 2]
  ------------------
 3548|      0|      return (int)proclen;
 3549|      0|    }
 3550|      2|    if (proclen < 0) {
  ------------------
  |  Branch (3550:9): [True: 0, False: 2]
  ------------------
 3551|      0|      if (session->iframe.state == NGHTTP2_IB_READ_HEADER_BLOCK) {
  ------------------
  |  Branch (3551:11): [True: 0, False: 0]
  ------------------
 3552|      0|        if (subject_stream && subject_stream->state != NGHTTP2_STREAM_CLOSING) {
  ------------------
  |  Branch (3552:13): [True: 0, False: 0]
  |  Branch (3552:31): [True: 0, False: 0]
  ------------------
 3553|       |          /* Adding RST_STREAM here is very important. It prevents
 3554|       |             from invoking subsequent callbacks for the same stream
 3555|       |             ID. */
 3556|      0|          rv = nghttp2_session_add_rst_stream(
 3557|      0|            session, subject_stream->stream_id, NGHTTP2_COMPRESSION_ERROR);
 3558|       |
 3559|      0|          if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (3559:15): [True: 0, False: 0]
  ------------------
 3560|      0|            return rv;
 3561|      0|          }
 3562|      0|        }
 3563|      0|      }
 3564|      0|      rv =
 3565|      0|        nghttp2_session_terminate_session(session, NGHTTP2_COMPRESSION_ERROR);
 3566|      0|      if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (3566:11): [True: 0, False: 0]
  ------------------
 3567|      0|        return rv;
 3568|      0|      }
 3569|       |
 3570|      0|      return NGHTTP2_ERR_HEADER_COMP;
 3571|      0|    }
 3572|      2|    in += proclen;
 3573|      2|    inlen -= (size_t)proclen;
 3574|      2|    *readlen_ptr += (size_t)proclen;
 3575|       |
 3576|      2|    DEBUGF("recv: proclen=%td\n", proclen);
  ------------------
  |  |   39|      2|    do {                                                                       \
  |  |   40|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 3577|       |
 3578|      2|    if (call_header_cb && (inflate_flags & NGHTTP2_HD_INFLATE_EMIT)) {
  ------------------
  |  Branch (3578:9): [True: 2, False: 0]
  |  Branch (3578:27): [True: 1, False: 1]
  ------------------
 3579|      1|      rv = 0;
 3580|      1|      if (subject_stream) {
  ------------------
  |  Branch (3580:11): [True: 1, False: 0]
  ------------------
 3581|      1|        if (session_enforce_http_messaging(session)) {
  ------------------
  |  Branch (3581:13): [True: 1, False: 0]
  ------------------
 3582|      1|          rv = nghttp2_http_on_header(session, subject_stream, frame, &nv,
 3583|      1|                                      trailer);
 3584|       |
 3585|      1|          if (rv == NGHTTP2_ERR_IGN_HTTP_HEADER) {
  ------------------
  |  Branch (3585:15): [True: 0, False: 1]
  ------------------
 3586|       |            /* Don't overwrite rv here */
 3587|      0|            int rv2;
 3588|       |
 3589|      0|            rv2 = session_call_on_invalid_header(session, frame, &nv);
 3590|      0|            if (rv2 == NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE) {
  ------------------
  |  Branch (3590:17): [True: 0, False: 0]
  ------------------
 3591|      0|              DEBUGF("recv: HTTP error: type=%u, id=%d, header %.*s: %.*s\n",
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3592|      0|                     frame->hd.type, frame->hd.stream_id, (int)nv.name->len,
 3593|      0|                     nv.name->base, (int)nv.value->len, nv.value->base);
 3594|       |
 3595|      0|              rv = session_call_error_callback(
 3596|      0|                session, NGHTTP2_ERR_HTTP_HEADER,
 3597|      0|                "Invalid HTTP header field was received: frame type: "
 3598|      0|                "%u, stream: %d, name: [%.*s], value: [%.*s]",
 3599|      0|                frame->hd.type, frame->hd.stream_id, (int)nv.name->len,
 3600|      0|                nv.name->base, (int)nv.value->len, nv.value->base);
 3601|       |
 3602|      0|              if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (3602:19): [True: 0, False: 0]
  ------------------
 3603|      0|                return rv;
 3604|      0|              }
 3605|       |
 3606|      0|              rv = session_handle_invalid_stream2(
 3607|      0|                session, subject_stream->stream_id, frame,
 3608|      0|                NGHTTP2_ERR_HTTP_HEADER);
 3609|      0|              if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (3609:19): [True: 0, False: 0]
  ------------------
 3610|      0|                return rv;
 3611|      0|              }
 3612|       |
 3613|      0|              return NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE;
 3614|      0|            } else {
 3615|      0|              if (rv2 != 0) {
  ------------------
  |  Branch (3615:19): [True: 0, False: 0]
  ------------------
 3616|      0|                return rv2;
 3617|      0|              }
 3618|       |
 3619|       |              /* header is ignored */
 3620|      0|              DEBUGF("recv: HTTP ignored: type=%u, id=%d, header %.*s: %.*s\n",
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3621|      0|                     frame->hd.type, frame->hd.stream_id, (int)nv.name->len,
 3622|      0|                     nv.name->base, (int)nv.value->len, nv.value->base);
 3623|       |
 3624|      0|              rv2 = session_call_error_callback(
 3625|      0|                session, NGHTTP2_ERR_HTTP_HEADER,
 3626|      0|                "Ignoring received invalid HTTP header field: frame type: "
 3627|      0|                "%u, stream: %d, name: [%.*s], value: [%.*s]",
 3628|      0|                frame->hd.type, frame->hd.stream_id, (int)nv.name->len,
 3629|      0|                nv.name->base, (int)nv.value->len, nv.value->base);
 3630|       |
 3631|      0|              if (nghttp2_is_fatal(rv2)) {
  ------------------
  |  Branch (3631:19): [True: 0, False: 0]
  ------------------
 3632|      0|                return rv2;
 3633|      0|              }
 3634|      0|            }
 3635|      0|          }
 3636|       |
 3637|      1|          if (rv == NGHTTP2_ERR_HTTP_HEADER) {
  ------------------
  |  Branch (3637:15): [True: 0, False: 1]
  ------------------
 3638|      0|            DEBUGF("recv: HTTP error: type=%u, id=%d, header %.*s: %.*s\n",
  ------------------
  |  |   39|      0|    do {                                                                       \
  |  |   40|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3639|      0|                   frame->hd.type, frame->hd.stream_id, (int)nv.name->len,
 3640|      0|                   nv.name->base, (int)nv.value->len, nv.value->base);
 3641|       |
 3642|      0|            rv = session_call_error_callback(
 3643|      0|              session, NGHTTP2_ERR_HTTP_HEADER,
 3644|      0|              "Invalid HTTP header field was received: frame type: "
 3645|      0|              "%u, stream: %d, name: [%.*s], value: [%.*s]",
 3646|      0|              frame->hd.type, frame->hd.stream_id, (int)nv.name->len,
 3647|      0|              nv.name->base, (int)nv.value->len, nv.value->base);
 3648|       |
 3649|      0|            if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (3649:17): [True: 0, False: 0]
  ------------------
 3650|      0|              return rv;
 3651|      0|            }
 3652|       |
 3653|      0|            rv =
 3654|      0|              session_handle_invalid_stream2(session, subject_stream->stream_id,
 3655|      0|                                             frame, NGHTTP2_ERR_HTTP_HEADER);
 3656|      0|            if (nghttp2_is_fatal(rv)) {
  ------------------
  |  Branch (3656:17): [True: 0, False: 0]
  ------------------
 3657|      0|              return rv;
 3658|      0|            }
 3659|       |
 3660|      0|            rv = session_update_glitch_ratelim(session);
 3661|      0|            if (rv != 0) {
  ------------------
  |  Branch (3661:17): [True: 0, False: 0]
  ------------------
 3662|      0|              return rv;
 3663|      0|            }
 3664|       |
 3665|      0|            if (iframe->state == NGHTTP2_IB_IGN_ALL) {
  ------------------
  |  Branch (3665:17): [True: 0, False: 0]
  ------------------
 3666|      0|              return 0;
 3667|      0|            }
 3668|       |
 3669|      0|            return NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE;
 3670|      0|          }
 3671|      1|        }
 3672|      1|        if (rv == 0) {
  ------------------
  |  Branch (3672:13): [True: 1, False: 0]
  ------------------
 3673|      1|          rv = session_call_on_header(session, frame, &nv);
 3674|       |          /* This handles NGHTTP2_ERR_PAUSE and
 3675|       |             NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE as well */
 3676|      1|          if (rv != 0) {
  ------------------
  |  Branch (3676:15): [True: 0, False: 1]
  ------------------
 3677|      0|            return rv;
 3678|      0|          }
 3679|      1|        }
 3680|      1|      }
 3681|      1|    }
 3682|      2|    if (inflate_flags & NGHTTP2_HD_INFLATE_FINAL) {
  ------------------
  |  Branch (3682:9): [True: 0, False: 2]
  ------------------
 3683|      0|      nghttp2_hd_inflate_end_headers(&session->hd_inflater);
 3684|      0|      break;
 3685|      0|    }
 3686|      2|    if ((inflate_flags & NGHTTP2_HD_INFLATE_EMIT) == 0 && inlen == 0) {
  ------------------
  |  Branch (3686:9): [True: 1, False: 1]
  |  Branch (3686:59): [True: 1, False: 0]
  ------------------
 3687|      1|      break;
 3688|      1|    }
 3689|      2|  }
 3690|      1|  return 0;
 3691|      1|}
nghttp2_session.c:session_trailer_headers:
   99|      1|                                   nghttp2_frame *frame) {
  100|      1|  if (!stream || frame->hd.type != NGHTTP2_HEADERS) {
  ------------------
  |  Branch (100:7): [True: 0, False: 1]
  |  Branch (100:18): [True: 0, False: 1]
  ------------------
  101|      0|    return 0;
  102|      0|  }
  103|      1|  if (session->server) {
  ------------------
  |  Branch (103:7): [True: 0, False: 1]
  ------------------
  104|      0|    return frame->headers.cat == NGHTTP2_HCAT_HEADERS;
  105|      0|  }
  106|       |
  107|      1|  return frame->headers.cat == NGHTTP2_HCAT_HEADERS &&
  ------------------
  |  Branch (107:10): [True: 0, False: 1]
  ------------------
  108|      0|         (stream->http_flags & NGHTTP2_HTTP_FLAG_EXPECT_FINAL_RESPONSE) == 0;
  ------------------
  |  |  132|      0|#define NGHTTP2_HTTP_FLAG_EXPECT_FINAL_RESPONSE 0x4000U
  ------------------
  |  Branch (108:10): [True: 0, False: 0]
  ------------------
  109|      1|}
nghttp2_session.c:session_call_on_header:
 3260|      1|                                  const nghttp2_hd_nv *nv) {
 3261|      1|  int rv = 0;
 3262|      1|  if (session->callbacks.on_header_callback2) {
  ------------------
  |  Branch (3262:7): [True: 0, False: 1]
  ------------------
 3263|      0|    rv = session->callbacks.on_header_callback2(
 3264|      0|      session, frame, nv->name, nv->value, nv->flags, session->user_data);
 3265|      1|  } else if (session->callbacks.on_header_callback) {
  ------------------
  |  Branch (3265:14): [True: 1, False: 0]
  ------------------
 3266|      1|    rv = session->callbacks.on_header_callback(
 3267|      1|      session, frame, nv->name->base, nv->name->len, nv->value->base,
 3268|      1|      nv->value->len, nv->flags, session->user_data);
 3269|      1|  }
 3270|       |
 3271|      1|  if (rv == NGHTTP2_ERR_PAUSE || rv == NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE) {
  ------------------
  |  Branch (3271:7): [True: 0, False: 1]
  |  Branch (3271:34): [True: 0, False: 1]
  ------------------
 3272|      0|    return rv;
 3273|      0|  }
 3274|      1|  if (rv != 0) {
  ------------------
  |  Branch (3274:7): [True: 0, False: 1]
  ------------------
 3275|      0|    return NGHTTP2_ERR_CALLBACK_FAILURE;
 3276|      0|  }
 3277|       |
 3278|      1|  return 0;
 3279|      1|}
nghttp2_session.c:session_process_settings_frame:
 4537|      2|static int session_process_settings_frame(nghttp2_session *session) {
 4538|      2|  nghttp2_inbound_frame *iframe = &session->iframe;
 4539|      2|  nghttp2_frame *frame = &iframe->frame;
 4540|      2|  size_t i;
 4541|      2|  nghttp2_settings_entry min_header_size_entry;
 4542|       |
 4543|      2|  if (iframe->max_niv) {
  ------------------
  |  Branch (4543:7): [True: 0, False: 2]
  ------------------
 4544|      0|    min_header_size_entry = iframe->iv[iframe->max_niv - 1];
 4545|       |
 4546|      0|    if (min_header_size_entry.value < UINT32_MAX) {
  ------------------
  |  Branch (4546:9): [True: 0, False: 0]
  ------------------
 4547|       |      /* If we have less value, then we must have
 4548|       |         SETTINGS_HEADER_TABLE_SIZE in i < iframe->niv */
 4549|      0|      for (i = 0; i < iframe->niv; ++i) {
  ------------------
  |  Branch (4549:19): [True: 0, False: 0]
  ------------------
 4550|      0|        if (iframe->iv[i].settings_id == NGHTTP2_SETTINGS_HEADER_TABLE_SIZE) {
  ------------------
  |  Branch (4550:13): [True: 0, False: 0]
  ------------------
 4551|      0|          break;
 4552|      0|        }
 4553|      0|      }
 4554|       |
 4555|      0|      assert(i < iframe->niv);
  ------------------
  |  Branch (4555:7): [True: 0, False: 0]
  |  Branch (4555:7): [True: 0, False: 0]
  ------------------
 4556|       |
 4557|      0|      if (min_header_size_entry.value != iframe->iv[i].value) {
  ------------------
  |  Branch (4557:11): [True: 0, False: 0]
  ------------------
 4558|      0|        iframe->iv[iframe->niv++] = iframe->iv[i];
 4559|      0|        iframe->iv[i] = min_header_size_entry;
 4560|      0|      }
 4561|      0|    }
 4562|      0|  }
 4563|       |
 4564|      2|  nghttp2_frame_unpack_settings_payload(&frame->settings, iframe->iv,
 4565|      2|                                        iframe->niv);
 4566|       |
 4567|      2|  iframe->iv = NULL;
 4568|      2|  iframe->niv = 0;
 4569|      2|  iframe->max_niv = 0;
 4570|       |
 4571|      2|  return nghttp2_session_on_settings_received(session, frame, 0 /* ACK */);
 4572|      2|}
nghttp2_session.c:session_update_connection_consumed_size:
 5189|      2|                                                   size_t delta_size) {
 5190|      2|  return session_update_consumed_size(
 5191|      2|    session, &session->consumed_size, &session->recv_window_size,
 5192|      2|    session->window_update_queued, 0, delta_size, session->local_window_size);
 5193|      2|}
nghttp2_session.c:session_update_consumed_size:
 5146|      7|                                        int32_t local_window_size) {
 5147|      7|  int32_t recv_size;
 5148|      7|  int rv;
 5149|       |
 5150|      7|  if ((size_t)*consumed_size_ptr > NGHTTP2_MAX_WINDOW_SIZE - delta_size) {
  ------------------
  |  |  224|      7|#define NGHTTP2_MAX_WINDOW_SIZE ((int32_t)((1U << 31) - 1))
  ------------------
  |  Branch (5150:7): [True: 0, False: 7]
  ------------------
 5151|      0|    return nghttp2_session_terminate_session(session,
 5152|      0|                                             NGHTTP2_FLOW_CONTROL_ERROR);
 5153|      0|  }
 5154|       |
 5155|      7|  *consumed_size_ptr += (int32_t)delta_size;
 5156|       |
 5157|      7|  if (window_update_queued == 0) {
  ------------------
  |  Branch (5157:7): [True: 7, False: 0]
  ------------------
 5158|       |    /* recv_window_size may be smaller than consumed_size, because it
 5159|       |       may be decreased by negative value with
 5160|       |       nghttp2_submit_window_update(). */
 5161|      7|    recv_size = nghttp2_min_int32(*consumed_size_ptr, *recv_window_size_ptr);
 5162|       |
 5163|      7|    if (nghttp2_should_send_window_update(local_window_size, recv_size)) {
  ------------------
  |  Branch (5163:9): [True: 0, False: 7]
  ------------------
 5164|      0|      rv = nghttp2_session_add_window_update(session, NGHTTP2_FLAG_NONE,
 5165|      0|                                             stream_id, recv_size);
 5166|       |
 5167|      0|      if (rv != 0) {
  ------------------
  |  Branch (5167:11): [True: 0, False: 0]
  ------------------
 5168|      0|        return rv;
 5169|      0|      }
 5170|       |
 5171|      0|      *recv_window_size_ptr -= recv_size;
 5172|      0|      *consumed_size_ptr -= recv_size;
 5173|      0|    }
 5174|      7|  }
 5175|       |
 5176|      7|  return 0;
 5177|      7|}
nghttp2_session.c:session_get_num_active_streams:
 7123|     22|static size_t session_get_num_active_streams(nghttp2_session *session) {
 7124|     22|  return nghttp2_map_size(&session->streams) - session->num_closed_streams -
 7125|     22|         session->num_idle_streams;
 7126|     22|}
nghttp2_session.c:session_sched_empty:
  957|     10|static int session_sched_empty(nghttp2_session *session) {
  958|     10|  size_t i;
  959|       |
  960|     90|  for (i = 0; i < NGHTTP2_EXTPRI_URGENCY_LEVELS; ++i) {
  ------------------
  |  | 5028|     90|#define NGHTTP2_EXTPRI_URGENCY_LEVELS (NGHTTP2_EXTPRI_URGENCY_LOW + 1)
  |  |  ------------------
  |  |  |  | 5020|     90|#define NGHTTP2_EXTPRI_URGENCY_LOW 7
  |  |  ------------------
  ------------------
  |  Branch (960:15): [True: 80, False: 10]
  ------------------
  961|     80|    if (!nghttp2_pq_empty(&session->sched[i].ob_data)) {
  ------------------
  |  Branch (961:9): [True: 0, False: 80]
  ------------------
  962|      0|      return 0;
  963|      0|    }
  964|     80|  }
  965|       |
  966|     10|  return 1;
  967|     10|}
nghttp2_session.c:inflight_settings_new:
  760|      2|                                 nghttp2_mem *mem) {
  761|      2|  *settings_ptr = nghttp2_mem_malloc(mem, sizeof(nghttp2_inflight_settings));
  762|      2|  if (!*settings_ptr) {
  ------------------
  |  Branch (762:7): [True: 0, False: 2]
  ------------------
  763|      0|    return NGHTTP2_ERR_NOMEM;
  764|      0|  }
  765|       |
  766|      2|  if (niv > 0) {
  ------------------
  |  Branch (766:7): [True: 2, False: 0]
  ------------------
  767|      2|    (*settings_ptr)->iv = nghttp2_frame_iv_copy(iv, niv, mem);
  768|      2|    if (!(*settings_ptr)->iv) {
  ------------------
  |  Branch (768:9): [True: 0, False: 2]
  ------------------
  769|      0|      nghttp2_mem_free(mem, *settings_ptr);
  770|      0|      return NGHTTP2_ERR_NOMEM;
  771|      0|    }
  772|      2|  } else {
  773|      0|    (*settings_ptr)->iv = NULL;
  774|      0|  }
  775|       |
  776|      2|  (*settings_ptr)->niv = niv;
  777|      2|  (*settings_ptr)->next = NULL;
  778|       |
  779|      2|  return 0;
  780|      2|}
nghttp2_session.c:session_append_inflight_settings:
 7305|      2|                                 nghttp2_inflight_settings *settings) {
 7306|      2|  nghttp2_inflight_settings **i;
 7307|       |
 7308|      2|  for (i = &session->inflight_settings_head; *i; i = &(*i)->next)
  ------------------
  |  Branch (7308:46): [True: 0, False: 2]
  ------------------
 7309|      0|    ;
 7310|       |
 7311|      2|  *i = settings;
 7312|      2|}
nghttp2_session.c:session_call_select_padding:
 1844|      2|                                                 size_t max_payloadlen) {
 1845|      2|  nghttp2_ssize rv;
 1846|      2|  size_t max_paddedlen;
 1847|       |
 1848|      2|  if (frame->hd.length >= max_payloadlen ||
  ------------------
  |  Branch (1848:7): [True: 0, False: 2]
  ------------------
 1849|      2|      (!session->callbacks.select_padding_callback2 &&
  ------------------
  |  Branch (1849:8): [True: 2, False: 0]
  ------------------
 1850|      2|       !session->callbacks.select_padding_callback)) {
  ------------------
  |  Branch (1850:8): [True: 2, False: 0]
  ------------------
 1851|      2|    return (nghttp2_ssize)frame->hd.length;
 1852|      2|  }
 1853|       |
 1854|      0|  max_paddedlen =
 1855|      0|    nghttp2_min_size(frame->hd.length + NGHTTP2_MAX_PADLEN, max_payloadlen);
  ------------------
  |  |   67|      0|#define NGHTTP2_MAX_PADLEN 256
  ------------------
 1856|       |
 1857|      0|  if (session->callbacks.select_padding_callback2) {
  ------------------
  |  Branch (1857:7): [True: 0, False: 0]
  ------------------
 1858|      0|    rv = session->callbacks.select_padding_callback2(
 1859|      0|      session, frame, max_paddedlen, session->user_data);
 1860|      0|  } else {
 1861|      0|    rv = (nghttp2_ssize)session->callbacks.select_padding_callback(
 1862|      0|      session, frame, max_paddedlen, session->user_data);
 1863|      0|  }
 1864|      0|  if (rv < (nghttp2_ssize)frame->hd.length ||
  ------------------
  |  Branch (1864:7): [True: 0, False: 0]
  ------------------
 1865|      0|      rv > (nghttp2_ssize)max_paddedlen) {
  ------------------
  |  Branch (1865:7): [True: 0, False: 0]
  ------------------
 1866|      0|    return NGHTTP2_ERR_CALLBACK_FAILURE;
 1867|      0|  }
 1868|      0|  return rv;
 1869|      0|}
nghttp2_session.c:session_update_stream_consumed_size:
 5181|      5|                                               size_t delta_size) {
 5182|      5|  return session_update_consumed_size(
 5183|      5|    session, &stream->consumed_size, &stream->recv_window_size,
 5184|      5|    stream->window_update_queued, stream->stream_id, delta_size,
 5185|      5|    stream->local_window_size);
 5186|      5|}

nghttp2_stream_init:
   38|      2|                         void *stream_user_data) {
   39|      2|  *stream = (nghttp2_stream){
   40|      2|    .state = initial_state,
   41|      2|    .content_length = -1,
   42|      2|    .stream_user_data = stream_user_data,
   43|      2|    .stream_id = stream_id,
   44|      2|    .remote_window_size = remote_initial_window_size,
   45|      2|    .local_window_size = local_initial_window_size,
   46|      2|    .status_code = -1,
   47|      2|    .http_flags = NGHTTP2_HTTP_FLAG_NONE,
  ------------------
  |  |   99|      2|#define NGHTTP2_HTTP_FLAG_NONE 0x00U
  ------------------
   48|      2|    .flags = flags,
   49|      2|    .shut_flags = NGHTTP2_SHUT_NONE,
  ------------------
  |  |   69|      2|#define NGHTTP2_SHUT_NONE 0x00U
  ------------------
   50|      2|    .extpri = NGHTTP2_EXTPRI_DEFAULT_URGENCY,
  ------------------
  |  | 5004|      2|#define NGHTTP2_EXTPRI_DEFAULT_URGENCY 3
  ------------------
   51|      2|    .http_extpri = NGHTTP2_EXTPRI_DEFAULT_URGENCY,
  ------------------
  |  | 5004|      2|#define NGHTTP2_EXTPRI_DEFAULT_URGENCY 3
  ------------------
   52|      2|  };
   53|      2|}
nghttp2_stream_free:
   55|      2|void nghttp2_stream_free(nghttp2_stream *stream) { (void)stream; }
nghttp2_stream_shutdown:
   57|      2|void nghttp2_stream_shutdown(nghttp2_stream *stream, uint8_t flag) {
   58|      2|  stream->shut_flags = (uint8_t)(stream->shut_flags | flag);
   59|      2|}
nghttp2_stream_update_local_initial_window_size:
  129|      1|  int32_t old_initial_window_size) {
  130|      1|  return update_initial_window_size(&stream->local_window_size,
  131|      1|                                    new_initial_window_size,
  132|      1|                                    old_initial_window_size);
  133|      1|}
nghttp2_stream.c:update_initial_window_size:
  108|      1|                                      int32_t old_initial_window_size) {
  109|      1|  int64_t new_window_size = (int64_t)(*window_size_ptr) +
  110|      1|                            new_initial_window_size - old_initial_window_size;
  111|      1|  if (INT32_MIN > new_window_size ||
  ------------------
  |  Branch (111:7): [True: 0, False: 1]
  ------------------
  112|      1|      new_window_size > NGHTTP2_MAX_WINDOW_SIZE) {
  ------------------
  |  |  224|      1|#define NGHTTP2_MAX_WINDOW_SIZE ((int32_t)((1U << 31) - 1))
  ------------------
  |  Branch (112:7): [True: 0, False: 1]
  ------------------
  113|      0|    return -1;
  114|      0|  }
  115|      1|  *window_size_ptr = (int32_t)new_window_size;
  116|      1|  return 0;
  117|      1|}

nghttp2_submit_rst_stream:
  181|      2|                              int32_t stream_id, uint32_t error_code) {
  182|      2|  (void)flags;
  183|       |
  184|      2|  if (stream_id == 0) {
  ------------------
  |  Branch (184:7): [True: 0, False: 2]
  ------------------
  185|      0|    return NGHTTP2_ERR_INVALID_ARGUMENT;
  186|      0|  }
  187|       |
  188|      2|  return nghttp2_session_add_rst_stream_continue(
  189|      2|    session, stream_id, error_code, /* continue_without_stream = */ 0);
  190|      2|}
nghttp2_submit_settings:
  218|      2|                            const nghttp2_settings_entry *iv, size_t niv) {
  219|      2|  (void)flags;
  220|      2|  return nghttp2_session_add_settings(session, NGHTTP2_FLAG_NONE, iv, niv);
  221|      2|}
nghttp2_submit_window_update:
  290|      2|                                 int32_t window_size_increment) {
  291|      2|  int rv;
  292|      2|  nghttp2_stream *stream = 0;
  293|      2|  (void)flags;
  294|       |
  295|      2|  if (window_size_increment == 0) {
  ------------------
  |  Branch (295:7): [True: 0, False: 2]
  ------------------
  296|      0|    return 0;
  297|      0|  }
  298|      2|  if (stream_id == 0) {
  ------------------
  |  Branch (298:7): [True: 0, False: 2]
  ------------------
  299|      0|    rv = nghttp2_adjust_local_window_size(
  300|      0|      &session->local_window_size, &session->recv_window_size,
  301|      0|      &session->recv_reduction, &window_size_increment);
  302|      0|    if (rv != 0) {
  ------------------
  |  Branch (302:9): [True: 0, False: 0]
  ------------------
  303|      0|      return rv;
  304|      0|    }
  305|      2|  } else {
  306|      2|    stream = nghttp2_session_get_stream(session, stream_id);
  307|      2|    if (!stream) {
  ------------------
  |  Branch (307:9): [True: 0, False: 2]
  ------------------
  308|      0|      return 0;
  309|      0|    }
  310|       |
  311|      2|    rv = nghttp2_adjust_local_window_size(
  312|      2|      &stream->local_window_size, &stream->recv_window_size,
  313|      2|      &stream->recv_reduction, &window_size_increment);
  314|      2|    if (rv != 0) {
  ------------------
  |  Branch (314:9): [True: 0, False: 2]
  ------------------
  315|      0|      return rv;
  316|      0|    }
  317|      2|  }
  318|       |
  319|      2|  if (window_size_increment > 0) {
  ------------------
  |  Branch (319:7): [True: 2, False: 0]
  ------------------
  320|      2|    if (stream_id == 0) {
  ------------------
  |  Branch (320:9): [True: 0, False: 2]
  ------------------
  321|      0|      session->consumed_size =
  322|      0|        nghttp2_max_int32(0, session->consumed_size - window_size_increment);
  323|      2|    } else {
  324|      2|      stream->consumed_size =
  325|      2|        nghttp2_max_int32(0, stream->consumed_size - window_size_increment);
  326|      2|    }
  327|       |
  328|      2|    return nghttp2_session_add_window_update(session, 0, stream_id,
  329|      2|                                             window_size_increment);
  330|      2|  }
  331|      0|  return 0;
  332|      2|}
nghttp2_session_set_local_window_size:
  336|      4|                                          int32_t window_size) {
  337|      4|  int32_t window_size_increment;
  338|      4|  nghttp2_stream *stream;
  339|      4|  int rv;
  340|      4|  (void)flags;
  341|       |
  342|      4|  if (window_size < 0) {
  ------------------
  |  Branch (342:7): [True: 0, False: 4]
  ------------------
  343|      0|    return NGHTTP2_ERR_INVALID_ARGUMENT;
  344|      0|  }
  345|       |
  346|      4|  if (stream_id == 0) {
  ------------------
  |  Branch (346:7): [True: 2, False: 2]
  ------------------
  347|      2|    window_size_increment = window_size - session->local_window_size;
  348|       |
  349|      2|    if (window_size_increment == 0) {
  ------------------
  |  Branch (349:9): [True: 0, False: 2]
  ------------------
  350|      0|      return 0;
  351|      0|    }
  352|       |
  353|      2|    if (window_size_increment < 0) {
  ------------------
  |  Branch (353:9): [True: 0, False: 2]
  ------------------
  354|      0|      return nghttp2_adjust_local_window_size(
  355|      0|        &session->local_window_size, &session->recv_window_size,
  356|      0|        &session->recv_reduction, &window_size_increment);
  357|      0|    }
  358|       |
  359|      2|    rv = nghttp2_increase_local_window_size(
  360|      2|      &session->local_window_size, &session->recv_window_size,
  361|      2|      &session->recv_reduction, &window_size_increment);
  362|       |
  363|      2|    if (rv != 0) {
  ------------------
  |  Branch (363:9): [True: 0, False: 2]
  ------------------
  364|      0|      return rv;
  365|      0|    }
  366|       |
  367|      2|    if (window_size_increment > 0) {
  ------------------
  |  Branch (367:9): [True: 2, False: 0]
  ------------------
  368|      2|      return nghttp2_session_add_window_update(session, 0, stream_id,
  369|      2|                                               window_size_increment);
  370|      2|    }
  371|       |
  372|      0|    return nghttp2_session_update_recv_connection_window_size(session, 0);
  373|      2|  } else {
  374|      2|    stream = nghttp2_session_get_stream(session, stream_id);
  375|       |
  376|      2|    if (stream == NULL) {
  ------------------
  |  Branch (376:9): [True: 0, False: 2]
  ------------------
  377|      0|      return 0;
  378|      0|    }
  379|       |
  380|      2|    window_size_increment = window_size - stream->local_window_size;
  381|       |
  382|      2|    if (window_size_increment == 0) {
  ------------------
  |  Branch (382:9): [True: 0, False: 2]
  ------------------
  383|      0|      return 0;
  384|      0|    }
  385|       |
  386|      2|    if (window_size_increment < 0) {
  ------------------
  |  Branch (386:9): [True: 0, False: 2]
  ------------------
  387|      0|      return nghttp2_adjust_local_window_size(
  388|      0|        &stream->local_window_size, &stream->recv_window_size,
  389|      0|        &stream->recv_reduction, &window_size_increment);
  390|      0|    }
  391|       |
  392|      2|    rv = nghttp2_increase_local_window_size(
  393|      2|      &stream->local_window_size, &stream->recv_window_size,
  394|      2|      &stream->recv_reduction, &window_size_increment);
  395|       |
  396|      2|    if (rv != 0) {
  ------------------
  |  Branch (396:9): [True: 0, False: 2]
  ------------------
  397|      0|      return rv;
  398|      0|    }
  399|       |
  400|      2|    if (window_size_increment > 0) {
  ------------------
  |  Branch (400:9): [True: 2, False: 0]
  ------------------
  401|      2|      return nghttp2_session_add_window_update(session, 0, stream_id,
  402|      2|                                               window_size_increment);
  403|      2|    }
  404|       |
  405|      0|    return nghttp2_session_update_recv_stream_window_size(session, stream, 0,
  406|      0|                                                          1);
  407|      2|  }
  408|      4|}
nghttp2_submit_request:
  679|      2|                               void *stream_user_data) {
  680|      2|  nghttp2_data_provider_wrap dpw;
  681|      2|  (void)pri_spec;
  682|       |
  683|      2|  return submit_request_shared(session, nva, nvlen,
  684|      2|                               nghttp2_data_provider_wrap_v1(&dpw, data_prd),
  685|      2|                               stream_user_data);
  686|      2|}
nghttp2_submit.c:submit_headers_shared_nva:
  116|      2|                                         void *stream_user_data) {
  117|      2|  int rv;
  118|      2|  nghttp2_nv *nva_copy;
  119|      2|  nghttp2_mem *mem;
  120|       |
  121|      2|  mem = &session->mem;
  122|       |
  123|      2|  rv = nghttp2_nv_array_copy(&nva_copy, nva, nvlen, mem);
  124|      2|  if (rv < 0) {
  ------------------
  |  Branch (124:7): [True: 0, False: 2]
  ------------------
  125|      0|    return rv;
  126|      0|  }
  127|       |
  128|      2|  return submit_headers_shared(session, flags, stream_id, nva_copy, nvlen, dpw,
  129|      2|                               stream_user_data);
  130|      2|}
nghttp2_submit.c:submit_headers_shared:
   42|      2|                                     void *stream_user_data) {
   43|      2|  int rv;
   44|      2|  uint8_t flags_copy;
   45|      2|  nghttp2_outbound_item *item = NULL;
   46|      2|  nghttp2_frame *frame = NULL;
   47|      2|  nghttp2_headers_category hcat;
   48|      2|  nghttp2_mem *mem;
   49|       |
   50|      2|  mem = &session->mem;
   51|       |
   52|      2|  item = nghttp2_mem_malloc(mem, sizeof(nghttp2_outbound_item));
   53|      2|  if (item == NULL) {
  ------------------
  |  Branch (53:7): [True: 0, False: 2]
  ------------------
   54|      0|    rv = NGHTTP2_ERR_NOMEM;
   55|      0|    goto fail;
   56|      0|  }
   57|       |
   58|      2|  nghttp2_outbound_item_init(item);
   59|       |
   60|      2|  if (dpw != NULL && nghttp2_data_provider_wrap_contains_read_callback(dpw)) {
  ------------------
  |  Branch (60:7): [True: 0, False: 2]
  |  Branch (60:22): [True: 0, False: 0]
  ------------------
   61|      0|    item->aux_data.headers.dpw = *dpw;
   62|      0|  }
   63|       |
   64|      2|  item->aux_data.headers.stream_user_data = stream_user_data;
   65|       |
   66|      2|  flags_copy =
   67|      2|    (uint8_t)((flags & (NGHTTP2_FLAG_END_STREAM | NGHTTP2_FLAG_PRIORITY)) |
   68|      2|              NGHTTP2_FLAG_END_HEADERS);
   69|       |
   70|      2|  if (stream_id == -1) {
  ------------------
  |  Branch (70:7): [True: 2, False: 0]
  ------------------
   71|      2|    if (session->next_stream_id > INT32_MAX) {
  ------------------
  |  Branch (71:9): [True: 0, False: 2]
  ------------------
   72|      0|      rv = NGHTTP2_ERR_STREAM_ID_NOT_AVAILABLE;
   73|      0|      goto fail;
   74|      0|    }
   75|       |
   76|      2|    stream_id = (int32_t)session->next_stream_id;
   77|      2|    session->next_stream_id += 2;
   78|       |
   79|      2|    hcat = NGHTTP2_HCAT_REQUEST;
   80|      2|  } else {
   81|       |    /* More specific categorization will be done later. */
   82|      0|    hcat = NGHTTP2_HCAT_HEADERS;
   83|      0|  }
   84|       |
   85|      2|  frame = &item->frame;
   86|       |
   87|      2|  nghttp2_frame_headers_init(&frame->headers, flags_copy, stream_id, hcat, NULL,
   88|      2|                             nva_copy, nvlen);
   89|       |
   90|      2|  rv = nghttp2_session_add_item(session, item);
   91|       |
   92|      2|  if (rv != 0) {
  ------------------
  |  Branch (92:7): [True: 0, False: 2]
  ------------------
   93|      0|    nghttp2_frame_headers_free(&frame->headers, mem);
   94|      0|    goto fail2;
   95|      0|  }
   96|       |
   97|      2|  if (hcat == NGHTTP2_HCAT_REQUEST) {
  ------------------
  |  Branch (97:7): [True: 2, False: 0]
  ------------------
   98|      2|    return stream_id;
   99|      2|  }
  100|       |
  101|      0|  return 0;
  102|       |
  103|      0|fail:
  104|       |  /* nghttp2_frame_headers_init() takes ownership of nva_copy. */
  105|      0|  nghttp2_nv_array_del(nva_copy, mem);
  106|      0|fail2:
  107|      0|  nghttp2_mem_free(mem, item);
  108|       |
  109|      0|  return rv;
  110|      0|}
nghttp2_submit.c:submit_request_shared:
  662|      2|                                     void *stream_user_data) {
  663|      2|  uint8_t flags;
  664|       |
  665|      2|  if (session->server) {
  ------------------
  |  Branch (665:7): [True: 0, False: 2]
  ------------------
  666|      0|    return NGHTTP2_ERR_PROTO;
  667|      0|  }
  668|       |
  669|      2|  flags = set_request_flags(dpw);
  670|       |
  671|      2|  return submit_headers_shared_nva(session, flags, -1, nva, nvlen, dpw,
  672|      2|                                   stream_user_data);
  673|      2|}
nghttp2_submit.c:set_request_flags:
  650|      2|static uint8_t set_request_flags(const nghttp2_data_provider_wrap *dpw) {
  651|      2|  uint8_t flags = NGHTTP2_FLAG_NONE;
  652|      2|  if (dpw == NULL || !nghttp2_data_provider_wrap_contains_read_callback(dpw)) {
  ------------------
  |  Branch (652:7): [True: 2, False: 0]
  |  Branch (652:22): [True: 0, False: 0]
  ------------------
  653|      2|    flags |= NGHTTP2_FLAG_END_STREAM;
  654|      2|  }
  655|       |
  656|      2|  return flags;
  657|      2|}

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

ossl_i2c_ASN1_BIT_STRING:
   43|   100k|{
   44|   100k|    int ret = 0, bits = 0, len;
   45|   100k|    unsigned char *p, *d;
   46|       |
   47|   100k|    if (a == NULL)
  ------------------
  |  Branch (47:9): [True: 0, False: 100k]
  ------------------
   48|      0|        goto err;
   49|       |
   50|   100k|    len = a->length;
   51|       |
   52|   100k|    if (len > INT_MAX - 1)
  ------------------
  |  Branch (52:9): [True: 0, False: 100k]
  ------------------
   53|      0|        goto err;
   54|       |
   55|   100k|    if ((len > 0) && (a->flags & ASN1_STRING_FLAG_BITS_LEFT))
  ------------------
  |  |   23|   100k|#define ASN1_STRING_FLAG_BITS_LEFT 0x08 /* Set if 0x07 has bits left value */
  ------------------
  |  Branch (55:9): [True: 100k, False: 0]
  |  Branch (55:22): [True: 100k, False: 0]
  ------------------
   56|   100k|        bits = (int)a->flags & 0x07;
   57|       |
   58|   100k|    if (pp == NULL)
  ------------------
  |  Branch (58:9): [True: 79.1k, False: 21.6k]
  ------------------
   59|  79.1k|        goto done;
   60|       |
   61|  21.6k|    p = *pp;
   62|       |
   63|  21.6k|    *(p++) = (unsigned char)bits;
   64|  21.6k|    d = a->data;
   65|  21.6k|    if (len > 0) {
  ------------------
  |  Branch (65:9): [True: 21.6k, False: 0]
  ------------------
   66|  21.6k|        memcpy(p, d, len);
   67|  21.6k|        p += len;
   68|  21.6k|        p[-1] &= (0xff << bits);
   69|  21.6k|    }
   70|  21.6k|    *pp = p;
   71|       |
   72|   100k|done:
   73|   100k|    ret = len + 1;
   74|       |
   75|   100k|err:
   76|   100k|    return ret;
   77|   100k|}
ossl_c2i_ASN1_BIT_STRING:
   81|  58.2k|{
   82|  58.2k|    ASN1_BIT_STRING *ret = NULL;
   83|  58.2k|    const unsigned char *p;
   84|  58.2k|    unsigned char *s;
   85|  58.2k|    int i = 0;
   86|       |
   87|  58.2k|    if (len < 1) {
  ------------------
  |  Branch (87:9): [True: 0, False: 58.2k]
  ------------------
   88|      0|        i = ASN1_R_STRING_TOO_SHORT;
  ------------------
  |  |  114|      0|#define ASN1_R_STRING_TOO_SHORT 152
  ------------------
   89|      0|        goto err;
   90|      0|    }
   91|       |
   92|  58.2k|    if (len > INT_MAX) {
  ------------------
  |  Branch (92:9): [True: 0, False: 58.2k]
  ------------------
   93|      0|        i = ASN1_R_STRING_TOO_LONG;
  ------------------
  |  |  113|      0|#define ASN1_R_STRING_TOO_LONG 151
  ------------------
   94|      0|        goto err;
   95|      0|    }
   96|       |
   97|  58.2k|    if ((a == NULL) || ((*a) == NULL)) {
  ------------------
  |  Branch (97:9): [True: 0, False: 58.2k]
  |  Branch (97:24): [True: 25.4k, False: 32.7k]
  ------------------
   98|  25.4k|        if ((ret = ASN1_BIT_STRING_new()) == NULL)
  ------------------
  |  Branch (98:13): [True: 0, False: 25.4k]
  ------------------
   99|      0|            return NULL;
  100|  25.4k|    } else
  101|  32.7k|        ret = (*a);
  102|       |
  103|  58.2k|    p = *pp;
  104|  58.2k|    i = *(p++);
  105|  58.2k|    if (i > 7) {
  ------------------
  |  Branch (105:9): [True: 0, False: 58.2k]
  ------------------
  106|      0|        i = ASN1_R_INVALID_BIT_STRING_BITS_LEFT;
  ------------------
  |  |   70|      0|#define ASN1_R_INVALID_BIT_STRING_BITS_LEFT 220
  ------------------
  107|      0|        goto err;
  108|      0|    }
  109|       |    /*
  110|       |     * We do this to preserve the settings.  If we modify the settings, via
  111|       |     * the _set_bit function, we will recalculate on output
  112|       |     */
  113|  58.2k|    ossl_asn1_string_set_bits_left(ret, i);
  114|       |
  115|  58.2k|    if (len-- > 1) { /* using one because of the bits left byte */
  ------------------
  |  Branch (115:9): [True: 58.2k, False: 0]
  ------------------
  116|  58.2k|        s = OPENSSL_malloc((int)len);
  ------------------
  |  |  107|  58.2k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  117|  58.2k|        if (s == NULL) {
  ------------------
  |  Branch (117:13): [True: 0, False: 58.2k]
  ------------------
  118|      0|            goto err;
  119|      0|        }
  120|  58.2k|        memcpy(s, p, (int)len);
  121|  58.2k|        s[len - 1] &= (0xff << i);
  122|  58.2k|        p += len;
  123|  58.2k|    } else
  124|      0|        s = NULL;
  125|       |
  126|  58.2k|    ASN1_STRING_set0(ret, s, (int)len);
  127|  58.2k|    ret->type = V_ASN1_BIT_STRING;
  ------------------
  |  |   67|  58.2k|#define V_ASN1_BIT_STRING 3
  ------------------
  128|  58.2k|    if (a != NULL)
  ------------------
  |  Branch (128:9): [True: 58.2k, False: 0]
  ------------------
  129|  58.2k|        (*a) = ret;
  130|  58.2k|    *pp = p;
  131|  58.2k|    return ret;
  132|      0|err:
  133|      0|    if (i != 0)
  ------------------
  |  Branch (133:9): [True: 0, False: 0]
  ------------------
  134|      0|        ERR_raise(ERR_LIB_ASN1, i);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  135|      0|    if ((a == NULL) || (*a != ret))
  ------------------
  |  Branch (135:9): [True: 0, False: 0]
  |  Branch (135:24): [True: 0, False: 0]
  ------------------
  136|      0|        ASN1_BIT_STRING_free(ret);
  137|       |    return NULL;
  138|  58.2k|}
ASN1_BIT_STRING_get_bit:
  198|     90|{
  199|     90|    int w, v;
  200|       |
  201|     90|    if (n < 0)
  ------------------
  |  Branch (201:9): [True: 0, False: 90]
  ------------------
  202|      0|        return 0;
  203|       |
  204|     90|    w = n / 8;
  205|     90|    v = 1 << (7 - (n & 0x07));
  206|     90|    if ((a == NULL) || (a->length < (w + 1)) || (a->data == NULL))
  ------------------
  |  Branch (206:9): [True: 0, False: 90]
  |  Branch (206:24): [True: 10, False: 80]
  |  Branch (206:49): [True: 0, False: 80]
  ------------------
  207|     10|        return 0;
  208|     80|    return ((a->data[w] & v) != 0);
  209|     90|}

asn1_d2i_read_bio:
  110|  25.5k|{
  111|  25.5k|    BUF_MEM *b;
  112|  25.5k|    unsigned char *p;
  113|  25.5k|    size_t want = HEADER_SIZE;
  ------------------
  |  |  107|  25.5k|#define HEADER_SIZE 2
  ------------------
  114|  25.5k|    uint32_t eos = 0;
  115|  25.5k|    size_t off = 0;
  116|  25.5k|    size_t len = 0;
  117|  25.5k|    size_t diff;
  118|       |
  119|  25.5k|    const unsigned char *q;
  120|  25.5k|    long slen;
  121|  25.5k|    int inf, tag, xclass;
  122|       |
  123|  25.5k|    b = BUF_MEM_new();
  124|  25.5k|    if (b == NULL) {
  ------------------
  |  Branch (124:9): [True: 0, False: 25.5k]
  ------------------
  125|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_BUF_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  126|      0|        return -1;
  127|      0|    }
  128|       |
  129|  25.5k|    ERR_set_mark();
  130|  29.3k|    for (;;) {
  131|  29.3k|        diff = len - off;
  132|  29.3k|        if (want >= diff) {
  ------------------
  |  Branch (132:13): [True: 29.3k, False: 0]
  ------------------
  133|  29.3k|            int i;
  134|       |
  135|  29.3k|            want -= diff;
  136|       |
  137|  29.3k|            if (len + want < len || !BUF_MEM_grow_clean(b, len + want)) {
  ------------------
  |  Branch (137:17): [True: 0, False: 29.3k]
  |  Branch (137:37): [True: 0, False: 29.3k]
  ------------------
  138|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_BUF_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  139|      0|                goto err;
  140|      0|            }
  141|  29.3k|            i = BIO_read(in, &(b->data[len]), (int)want);
  142|       |
  143|  29.3k|            if (i <= 0) {
  ------------------
  |  Branch (143:17): [True: 0, False: 29.3k]
  ------------------
  144|       |                /*
  145|       |                 * A read error (i < 0), an EOF in the middle of an object
  146|       |                 * (diff != 0, some bytes already buffered), or an EOF while
  147|       |                 * still inside an indefinite-length constructed value awaiting
  148|       |                 * its end-of-contents octets (eos != 0) all mean the input is
  149|       |                 * truncated.  Only a clean EOF at a top-level object boundary
  150|       |                 * (i == 0, diff == 0, eos == 0) is the normal end of input:
  151|       |                 * fail without queuing an error so that callers looping over
  152|       |                 * concatenated DER values (e.g. the libcrypto d2i_*_bio()
  153|       |                 * consumers in CPython's ssl module) terminate cleanly instead
  154|       |                 * of seeing a spurious ASN1_R_NOT_ENOUGH_DATA.
  155|       |                 */
  156|      0|                if (i < 0 || diff != 0 || eos != 0)
  ------------------
  |  Branch (156:21): [True: 0, False: 0]
  |  Branch (156:30): [True: 0, False: 0]
  |  Branch (156:43): [True: 0, False: 0]
  ------------------
  157|      0|                    ERR_raise(ERR_LIB_ASN1, ASN1_R_NOT_ENOUGH_DATA);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  158|      0|                goto err;
  159|      0|            }
  160|       |
  161|  29.3k|            if (i > 0) {
  ------------------
  |  Branch (161:17): [True: 29.3k, False: 0]
  ------------------
  162|  29.3k|                if (len + i < len) {
  ------------------
  |  Branch (162:21): [True: 0, False: 29.3k]
  ------------------
  163|      0|                    ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  164|      0|                    goto err;
  165|      0|                }
  166|  29.3k|                len += i;
  167|  29.3k|                if ((size_t)i < want)
  ------------------
  |  Branch (167:21): [True: 0, False: 29.3k]
  ------------------
  168|      0|                    continue;
  169|  29.3k|            }
  170|  29.3k|        }
  171|       |        /* else data already loaded */
  172|       |
  173|       |        /* make sure there is enough data for a complete header */
  174|  29.3k|        p = (unsigned char *)&(b->data[off]);
  175|  29.3k|        q = p;
  176|  29.3k|        diff = len - off;
  177|  29.3k|        if (diff < 2) {
  ------------------
  |  Branch (177:13): [True: 0, False: 29.3k]
  ------------------
  178|       |            /* Failed sanity check */
  179|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_NOT_ENOUGH_DATA);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  180|      0|            goto err;
  181|      0|        }
  182|       |
  183|  29.3k|        diff--;
  184|  29.3k|        if ((*(q++) & V_ASN1_PRIMITIVE_TAG) == V_ASN1_PRIMITIVE_TAG) {
  ------------------
  |  |   55|  29.3k|#define V_ASN1_PRIMITIVE_TAG 0x1f
  ------------------
                      if ((*(q++) & V_ASN1_PRIMITIVE_TAG) == V_ASN1_PRIMITIVE_TAG) {
  ------------------
  |  |   55|  29.3k|#define V_ASN1_PRIMITIVE_TAG 0x1f
  ------------------
  |  Branch (184:13): [True: 0, False: 29.3k]
  ------------------
  185|      0|            unsigned int i = 0;
  186|       |            /* Multi-byte tag.  See if we have the whole thing yet */
  187|      0|            do {
  188|      0|                if (i > 4) {
  ------------------
  |  Branch (188:21): [True: 0, False: 0]
  ------------------
  189|       |                    /* The tag value must fit into int */
  190|      0|                    ERR_raise(ERR_LIB_ASN1, ASN1_R_HEADER_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  191|      0|                    goto err;
  192|      0|                }
  193|      0|                ++i;
  194|      0|                diff--;
  195|      0|            } while (diff > 0 && *(q++) & 0x80);
  ------------------
  |  Branch (195:22): [True: 0, False: 0]
  |  Branch (195:34): [True: 0, False: 0]
  ------------------
  196|       |
  197|      0|            if (diff == 0) {
  ------------------
  |  Branch (197:17): [True: 0, False: 0]
  ------------------
  198|       |                /*
  199|       |                 * End of current data, will need at least 1 more byte for
  200|       |                 * length.  2 if the tag is still incomplete
  201|       |                 */
  202|      0|                want = q - p + 2;
  203|      0|                if (*q & 0x80) {
  ------------------
  |  Branch (203:21): [True: 0, False: 0]
  ------------------
  204|      0|                    want++;
  205|      0|                }
  206|      0|                continue;
  207|      0|            }
  208|      0|        }
  209|       |
  210|       |        /* Check the length.  This should also work for indefinite length */
  211|  29.3k|        diff--;
  212|  29.3k|        if (*q & 0x80) {
  ------------------
  |  Branch (212:13): [True: 7.46k, False: 21.8k]
  ------------------
  213|  7.46k|            unsigned int i = *q & 0x7f;
  214|       |
  215|  7.46k|            if (i > sizeof(long)) {
  ------------------
  |  Branch (215:17): [True: 0, False: 7.46k]
  ------------------
  216|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  217|      0|                goto err;
  218|      0|            }
  219|  7.46k|            if (i > diff) {
  ------------------
  |  Branch (219:17): [True: 3.73k, False: 3.73k]
  ------------------
  220|  3.73k|                want = q - p + i + 1;
  221|  3.73k|                continue;
  222|  3.73k|            }
  223|  7.46k|        }
  224|       |
  225|       |        /*
  226|       |         * We have a complete header now, assuming we didn't hit EOF. Parse the
  227|       |         * tag and length
  228|       |         */
  229|  25.5k|        q = p;
  230|  25.5k|        diff = len - off;
  231|  25.5k|        inf = ASN1_get_object(&q, &slen, &tag, &xclass, (int)diff);
  232|  25.5k|        if (inf & 0x80) {
  ------------------
  |  Branch (232:13): [True: 25.5k, False: 0]
  ------------------
  233|  25.5k|            unsigned long e;
  234|       |
  235|  25.5k|            e = ERR_GET_REASON(ERR_peek_last_error());
  236|  25.5k|            if (e != ASN1_R_TOO_LONG)
  ------------------
  |  |  118|  25.5k|#define ASN1_R_TOO_LONG 155
  ------------------
  |  Branch (236:17): [True: 0, False: 25.5k]
  ------------------
  237|      0|                goto err;
  238|  25.5k|            ERR_pop_to_mark();
  239|  25.5k|            ERR_set_mark();
  240|  25.5k|        }
  241|  25.5k|        off += q - p; /* end of data */
  242|       |
  243|  25.5k|        if (inf & 1) {
  ------------------
  |  Branch (243:13): [True: 0, False: 25.5k]
  ------------------
  244|       |            /* no data body so go round again */
  245|      0|            if (eos == UINT32_MAX) {
  ------------------
  |  Branch (245:17): [True: 0, False: 0]
  ------------------
  246|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_HEADER_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  247|      0|                goto err;
  248|      0|            }
  249|      0|            eos++;
  250|      0|            want = HEADER_SIZE;
  ------------------
  |  |  107|      0|#define HEADER_SIZE 2
  ------------------
  251|  25.5k|        } else if (eos && (slen == 0) && (tag == V_ASN1_EOC)) {
  ------------------
  |  |   64|      0|#define V_ASN1_EOC 0
  ------------------
  |  Branch (251:20): [True: 0, False: 25.5k]
  |  Branch (251:27): [True: 0, False: 0]
  |  Branch (251:42): [True: 0, False: 0]
  ------------------
  252|       |            /* eos value, so go back and read another header */
  253|      0|            eos--;
  254|      0|            if (eos == 0)
  ------------------
  |  Branch (254:17): [True: 0, False: 0]
  ------------------
  255|      0|                break;
  256|      0|            else
  257|      0|                want = HEADER_SIZE;
  ------------------
  |  |  107|      0|#define HEADER_SIZE 2
  ------------------
  258|  25.5k|        } else {
  259|       |            /* suck in slen bytes of data */
  260|  25.5k|            want = slen;
  261|  25.5k|            if (want > (len - off)) {
  ------------------
  |  Branch (261:17): [True: 25.5k, False: 0]
  ------------------
  262|  25.5k|                size_t chunk_max = ASN1_CHUNK_INITIAL_SIZE;
  ------------------
  |  |  108|  25.5k|#define ASN1_CHUNK_INITIAL_SIZE (16 * 1024)
  ------------------
  263|       |
  264|  25.5k|                want -= (len - off);
  265|  25.5k|                if (want > INT_MAX /* BIO_read takes an int length */ || len + want < len) {
  ------------------
  |  Branch (265:21): [True: 0, False: 25.5k]
  |  Branch (265:74): [True: 0, False: 25.5k]
  ------------------
  266|      0|                    ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  267|      0|                    goto err;
  268|      0|                }
  269|  51.1k|                while (want > 0) {
  ------------------
  |  Branch (269:24): [True: 25.5k, False: 25.5k]
  ------------------
  270|       |                    /*
  271|       |                     * Read content in chunks of increasing size
  272|       |                     * so we can return an error for EOF without
  273|       |                     * having to allocate the entire content length
  274|       |                     * in one go.
  275|       |                     */
  276|  25.5k|                    size_t chunk = want > chunk_max ? chunk_max : want;
  ------------------
  |  Branch (276:36): [True: 0, False: 25.5k]
  ------------------
  277|  25.5k|                    int i;
  278|       |
  279|  25.5k|                    if (!BUF_MEM_grow_clean(b, len + chunk)) {
  ------------------
  |  Branch (279:25): [True: 0, False: 25.5k]
  ------------------
  280|      0|                        ERR_raise(ERR_LIB_ASN1, ERR_R_BUF_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  281|      0|                        goto err;
  282|      0|                    }
  283|  25.5k|                    want -= chunk;
  284|  51.1k|                    while (chunk > 0) {
  ------------------
  |  Branch (284:28): [True: 25.5k, False: 25.5k]
  ------------------
  285|  25.5k|                        i = BIO_read(in, &(b->data[len]), (int)chunk);
  286|  25.5k|                        if (i <= 0) {
  ------------------
  |  Branch (286:29): [True: 0, False: 25.5k]
  ------------------
  287|      0|                            ERR_raise(ERR_LIB_ASN1, ASN1_R_NOT_ENOUGH_DATA);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  288|      0|                            goto err;
  289|      0|                        }
  290|       |                        /*
  291|       |                         * This can't overflow because |len+want| didn't
  292|       |                         * overflow.
  293|       |                         */
  294|  25.5k|                        len += i;
  295|  25.5k|                        chunk -= i;
  296|  25.5k|                    }
  297|  25.5k|                    if (chunk_max < INT_MAX / 2)
  ------------------
  |  Branch (297:25): [True: 25.5k, False: 0]
  ------------------
  298|  25.5k|                        chunk_max *= 2;
  299|  25.5k|                }
  300|  25.5k|            }
  301|  25.5k|            if (off + slen < off) {
  ------------------
  |  Branch (301:17): [True: 0, False: 25.5k]
  ------------------
  302|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  303|      0|                goto err;
  304|      0|            }
  305|  25.5k|            off += slen;
  306|  25.5k|            if (eos == 0) {
  ------------------
  |  Branch (306:17): [True: 25.5k, False: 0]
  ------------------
  307|  25.5k|                break;
  308|  25.5k|            } else
  309|      0|                want = HEADER_SIZE;
  ------------------
  |  |  107|      0|#define HEADER_SIZE 2
  ------------------
  310|  25.5k|        }
  311|  25.5k|    }
  312|       |
  313|  25.5k|    if (off > INT_MAX) {
  ------------------
  |  Branch (313:9): [True: 0, False: 25.5k]
  ------------------
  314|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  315|      0|        goto err;
  316|      0|    }
  317|       |
  318|  25.5k|    *pb = b;
  319|  25.5k|    ERR_clear_last_mark();
  320|  25.5k|    return (int)off;
  321|      0|err:
  322|      0|    ERR_clear_last_mark();
  323|      0|    BUF_MEM_free(b);
  324|      0|    return -1;
  325|  25.5k|}

ossl_asn1_item_digest_ex:
   53|  10.8k|{
   54|  10.8k|    int i, ret = 0;
   55|  10.8k|    unsigned char *str = NULL;
   56|  10.8k|    EVP_MD *fetched_md = (EVP_MD *)md;
   57|       |
   58|  10.8k|    i = ASN1_item_i2d(asn, &str, it);
   59|  10.8k|    if (i < 0 || str == NULL)
  ------------------
  |  Branch (59:9): [True: 0, False: 10.8k]
  |  Branch (59:18): [True: 0, False: 10.8k]
  ------------------
   60|      0|        return 0;
   61|       |
   62|  10.8k|    if (EVP_MD_get0_provider(md) == NULL)
  ------------------
  |  Branch (62:9): [True: 10.8k, False: 0]
  ------------------
   63|  10.8k|        fetched_md = EVP_MD_fetch(libctx, EVP_MD_get0_name(md), propq);
   64|  10.8k|    if (fetched_md == NULL)
  ------------------
  |  Branch (64:9): [True: 0, False: 10.8k]
  ------------------
   65|      0|        goto err;
   66|       |
   67|  10.8k|    ret = EVP_Digest(str, i, data, len, fetched_md, NULL);
   68|  10.8k|err:
   69|  10.8k|    OPENSSL_free(str);
  ------------------
  |  |  132|  10.8k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   70|  10.8k|    if (fetched_md != md)
  ------------------
  |  Branch (70:9): [True: 10.8k, False: 0]
  ------------------
   71|  10.8k|        EVP_MD_free(fetched_md);
   72|  10.8k|    return ret;
   73|  10.8k|}

ASN1_INTEGER_cmp:
   24|  3.55k|{
   25|  3.55k|    int neg, ret;
   26|       |    /* Compare signs */
   27|  3.55k|    neg = x->type & V_ASN1_NEG;
  ------------------
  |  |   99|  3.55k|#define V_ASN1_NEG 0x100
  ------------------
   28|  3.55k|    if (neg != (y->type & V_ASN1_NEG)) {
  ------------------
  |  |   99|  3.55k|#define V_ASN1_NEG 0x100
  ------------------
  |  Branch (28:9): [True: 0, False: 3.55k]
  ------------------
   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|  3.55k|    ret = ASN1_STRING_cmp(x, y);
   36|       |
   37|  3.55k|    if (neg)
  ------------------
  |  Branch (37:9): [True: 0, False: 3.55k]
  ------------------
   38|      0|        return -ret;
   39|  3.55k|    else
   40|  3.55k|        return ret;
   41|  3.55k|}
ossl_c2i_ASN1_INTEGER:
  301|  29.3k|{
  302|  29.3k|    ASN1_INTEGER *ret = NULL;
  303|  29.3k|    size_t r;
  304|  29.3k|    int neg;
  305|       |
  306|  29.3k|    r = c2i_ibuf(NULL, NULL, *pp, len);
  307|       |
  308|  29.3k|    if (r == 0)
  ------------------
  |  Branch (308:9): [True: 0, False: 29.3k]
  ------------------
  309|      0|        return NULL;
  310|       |
  311|  29.3k|    if ((a == NULL) || ((*a) == NULL)) {
  ------------------
  |  Branch (311:9): [True: 0, False: 29.3k]
  |  Branch (311:24): [True: 10.9k, False: 18.3k]
  ------------------
  312|  10.9k|        ret = ASN1_INTEGER_new();
  313|  10.9k|        if (ret == NULL)
  ------------------
  |  Branch (313:13): [True: 0, False: 10.9k]
  ------------------
  314|      0|            return NULL;
  315|  10.9k|        ret->type = V_ASN1_INTEGER;
  ------------------
  |  |   66|  10.9k|#define V_ASN1_INTEGER 2
  ------------------
  316|  10.9k|    } else
  317|  18.3k|        ret = *a;
  318|       |
  319|  29.3k|    if (r > INT_MAX || ASN1_STRING_set(ret, NULL, (int)r) == 0) {
  ------------------
  |  Branch (319:9): [True: 0, False: 29.3k]
  |  Branch (319:24): [True: 0, False: 29.3k]
  ------------------
  320|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  321|      0|        goto err;
  322|      0|    }
  323|       |
  324|  29.3k|    c2i_ibuf(ret->data, &neg, *pp, len);
  325|       |
  326|  29.3k|    if (neg != 0)
  ------------------
  |  Branch (326:9): [True: 0, False: 29.3k]
  ------------------
  327|      0|        ret->type |= V_ASN1_NEG;
  ------------------
  |  |   99|      0|#define V_ASN1_NEG 0x100
  ------------------
  328|  29.3k|    else
  329|  29.3k|        ret->type &= ~V_ASN1_NEG;
  ------------------
  |  |   99|  29.3k|#define V_ASN1_NEG 0x100
  ------------------
  330|       |
  331|  29.3k|    *pp += len;
  332|  29.3k|    if (a != NULL)
  ------------------
  |  Branch (332:9): [True: 29.3k, False: 0]
  ------------------
  333|  29.3k|        (*a) = ret;
  334|  29.3k|    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|  29.3k|}
ASN1_INTEGER_get_int64:
  539|  18.2k|{
  540|  18.2k|    return asn1_string_get_int64(pr, a, V_ASN1_INTEGER);
  ------------------
  |  |   66|  18.2k|#define V_ASN1_INTEGER 2
  ------------------
  541|  18.2k|}
ASN1_INTEGER_get:
  564|  18.2k|{
  565|  18.2k|    int i;
  566|  18.2k|    int64_t r;
  567|  18.2k|    if (a == NULL)
  ------------------
  |  Branch (567:9): [True: 0, False: 18.2k]
  ------------------
  568|      0|        return 0;
  569|  18.2k|    i = ASN1_INTEGER_get_int64(&r, a);
  570|  18.2k|    if (i == 0)
  ------------------
  |  Branch (570:9): [True: 0, False: 18.2k]
  ------------------
  571|      0|        return -1;
  572|  18.2k|    if (r > LONG_MAX || r < LONG_MIN)
  ------------------
  |  Branch (572:9): [True: 0, False: 18.2k]
  |  Branch (572:25): [True: 0, False: 18.2k]
  ------------------
  573|      0|        return -1;
  574|  18.2k|    return (long)r;
  575|  18.2k|}
ossl_c2i_uint64_int:
  633|  46.7k|{
  634|  46.7k|    unsigned char buf[sizeof(uint64_t)];
  635|  46.7k|    size_t buflen;
  636|       |
  637|  46.7k|    buflen = c2i_ibuf(NULL, NULL, *pp, len);
  638|  46.7k|    if (buflen == 0)
  ------------------
  |  Branch (638:9): [True: 0, False: 46.7k]
  ------------------
  639|      0|        return 0;
  640|  46.7k|    if (buflen > sizeof(uint64_t)) {
  ------------------
  |  Branch (640:9): [True: 0, False: 46.7k]
  ------------------
  641|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LARGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  642|      0|        return 0;
  643|      0|    }
  644|  46.7k|    (void)c2i_ibuf(buf, neg, *pp, len);
  645|  46.7k|    return asn1_get_uint64(ret, buf, buflen);
  646|  46.7k|}
ossl_i2c_uint64_int:
  649|   638k|{
  650|   638k|    unsigned char buf[sizeof(uint64_t)];
  651|   638k|    size_t off;
  652|       |
  653|   638k|    off = asn1_put_uint64(buf, r);
  654|   638k|    return (int)i2c_ibuf(buf + off, sizeof(buf) - off, neg, &p);
  655|   638k|}
a_int.c:i2c_ibuf:
   99|   638k|{
  100|   638k|    unsigned int pad = 0;
  101|   638k|    size_t ret, i;
  102|   638k|    unsigned char *p, pb = 0;
  103|       |
  104|   638k|    if (b != NULL && blen) {
  ------------------
  |  Branch (104:9): [True: 638k, False: 0]
  |  Branch (104:22): [True: 638k, False: 0]
  ------------------
  105|   638k|        ret = blen;
  106|   638k|        i = b[0];
  107|   638k|        if (!neg && (i > 127)) {
  ------------------
  |  Branch (107:13): [True: 638k, False: 0]
  |  Branch (107:21): [True: 53.1k, False: 585k]
  ------------------
  108|  53.1k|            pad = 1;
  109|  53.1k|            pb = 0;
  110|   585k|        } else if (neg) {
  ------------------
  |  Branch (110:20): [True: 0, False: 585k]
  ------------------
  111|      0|            pb = 0xFF;
  112|      0|            if (i > 128) {
  ------------------
  |  Branch (112:17): [True: 0, False: 0]
  ------------------
  113|      0|                pad = 1;
  114|      0|            } else if (i == 128) {
  ------------------
  |  Branch (114:24): [True: 0, False: 0]
  ------------------
  115|       |                /*
  116|       |                 * Special case [of minimal negative for given length]:
  117|       |                 * if any other bytes non zero we pad, otherwise we don't.
  118|       |                 */
  119|      0|                for (pad = 0, i = 1; i < blen; i++)
  ------------------
  |  Branch (119:38): [True: 0, False: 0]
  ------------------
  120|      0|                    pad |= b[i];
  121|      0|                pb = pad != 0 ? 0xffU : 0;
  ------------------
  |  Branch (121:22): [True: 0, False: 0]
  ------------------
  122|      0|                pad = pb & 1;
  123|      0|            }
  124|      0|        }
  125|   638k|        ret += pad;
  126|   638k|    } else {
  127|      0|        ret = 1;
  128|      0|        blen = 0; /* reduce '(b == NULL || blen == 0)' to '(blen == 0)' */
  129|      0|    }
  130|       |
  131|   638k|    if (pp == NULL || (p = *pp) == NULL)
  ------------------
  |  Branch (131:9): [True: 0, False: 638k]
  |  Branch (131:23): [True: 502k, False: 136k]
  ------------------
  132|   502k|        return ret;
  133|       |
  134|       |    /*
  135|       |     * This magically handles all corner cases, such as '(b == NULL ||
  136|       |     * blen == 0)', non-negative value, "negative" zero, 0x80 followed
  137|       |     * by any number of zeros...
  138|       |     */
  139|   136k|    *p = pb;
  140|   136k|    p += pad; /* yes, p[0] can be written twice, but it's little
  141|       |               * price to pay for eliminated branches */
  142|   136k|    twos_complement(p, b, blen, pb);
  143|       |
  144|   136k|    *pp += ret;
  145|   136k|    return ret;
  146|   638k|}
a_int.c:twos_complement:
   78|   183k|{
   79|   183k|    unsigned int carry = pad & 1;
   80|       |
   81|       |    /* Begin at the end of the encoding */
   82|   183k|    if (len != 0) {
  ------------------
  |  Branch (82:9): [True: 183k, False: 0]
  ------------------
   83|       |        /*
   84|       |         * if len == 0 then src/dst could be NULL, and this would be undefined
   85|       |         * behaviour.
   86|       |         */
   87|   183k|        dst += len;
   88|   183k|        src += len;
   89|   183k|    }
   90|       |    /* two's complement value: ~value + 1 */
   91|   838k|    while (len-- != 0) {
  ------------------
  |  Branch (91:12): [True: 655k, False: 183k]
  ------------------
   92|   655k|        *(--dst) = (unsigned char)(carry += *(--src) ^ pad);
   93|   655k|        carry >>= 8;
   94|   655k|    }
   95|   183k|}
a_int.c:c2i_ibuf:
  156|   152k|{
  157|   152k|    int neg, pad;
  158|       |    /* Zero content length is illegal */
  159|   152k|    if (plen == 0) {
  ------------------
  |  Branch (159:9): [True: 0, False: 152k]
  ------------------
  160|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_ZERO_CONTENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  161|      0|        return 0;
  162|      0|    }
  163|   152k|    neg = p[0] & 0x80;
  164|   152k|    if (pneg)
  ------------------
  |  Branch (164:9): [True: 76.0k, False: 76.0k]
  ------------------
  165|  76.0k|        *pneg = neg;
  166|       |    /* Handle common case where length is 1 octet separately */
  167|   152k|    if (plen == 1) {
  ------------------
  |  Branch (167:9): [True: 58.5k, False: 93.5k]
  ------------------
  168|  58.5k|        if (b != NULL) {
  ------------------
  |  Branch (168:13): [True: 29.2k, False: 29.2k]
  ------------------
  169|  29.2k|            if (neg)
  ------------------
  |  Branch (169:17): [True: 0, False: 29.2k]
  ------------------
  170|      0|                b[0] = (p[0] ^ 0xFF) + 1;
  171|  29.2k|            else
  172|  29.2k|                b[0] = p[0];
  173|  29.2k|        }
  174|  58.5k|        return 1;
  175|  58.5k|    }
  176|       |
  177|  93.5k|    pad = 0;
  178|  93.5k|    if (p[0] == 0) {
  ------------------
  |  Branch (178:9): [True: 7.08k, False: 86.4k]
  ------------------
  179|  7.08k|        pad = 1;
  180|  86.4k|    } else if (p[0] == 0xFF) {
  ------------------
  |  Branch (180:16): [True: 0, False: 86.4k]
  ------------------
  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|  93.5k|    if (pad && (neg == (p[1] & 0x80))) {
  ------------------
  |  Branch (192:9): [True: 7.08k, False: 86.4k]
  |  Branch (192:16): [True: 0, False: 7.08k]
  ------------------
  193|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_PADDING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  194|      0|        return 0;
  195|      0|    }
  196|       |
  197|       |    /* skip over pad */
  198|  93.5k|    p += pad;
  199|  93.5k|    plen -= pad;
  200|       |
  201|  93.5k|    if (b != NULL)
  ------------------
  |  Branch (201:9): [True: 46.7k, False: 46.7k]
  ------------------
  202|  46.7k|        twos_complement(b, p, plen, neg ? 0xffU : 0);
  ------------------
  |  Branch (202:37): [True: 0, False: 46.7k]
  ------------------
  203|       |
  204|  93.5k|    return plen;
  205|  93.5k|}
a_int.c:asn1_string_get_int64:
  342|  18.2k|{
  343|  18.2k|    if (a == NULL) {
  ------------------
  |  Branch (343:9): [True: 0, False: 18.2k]
  ------------------
  344|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  345|      0|        return 0;
  346|      0|    }
  347|  18.2k|    if ((a->type & ~V_ASN1_NEG) != itype) {
  ------------------
  |  |   99|  18.2k|#define V_ASN1_NEG 0x100
  ------------------
  |  Branch (347:9): [True: 0, False: 18.2k]
  ------------------
  348|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_WRONG_INTEGER_TYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  349|      0|        return 0;
  350|      0|    }
  351|  18.2k|    return asn1_get_int64(pr, a->data, a->length, a->type & V_ASN1_NEG);
  ------------------
  |  |   99|  18.2k|#define V_ASN1_NEG 0x100
  ------------------
  352|  18.2k|}
a_int.c:asn1_get_int64:
  266|  18.2k|{
  267|  18.2k|    uint64_t r;
  268|  18.2k|    if (asn1_get_uint64(&r, b, blen) == 0)
  ------------------
  |  Branch (268:9): [True: 0, False: 18.2k]
  ------------------
  269|      0|        return 0;
  270|  18.2k|    if (neg) {
  ------------------
  |  Branch (270:9): [True: 0, False: 18.2k]
  ------------------
  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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  285|      0|            return 0;
  286|      0|        }
  287|  18.2k|    } else {
  288|  18.2k|        if (r <= INT64_MAX) {
  ------------------
  |  Branch (288:13): [True: 18.2k, False: 0]
  ------------------
  289|  18.2k|            *pr = (int64_t)r;
  290|  18.2k|        } else {
  291|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LARGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  292|      0|            return 0;
  293|      0|        }
  294|  18.2k|    }
  295|  18.2k|    return 1;
  296|  18.2k|}
a_int.c:asn1_get_uint64:
  223|  65.0k|{
  224|  65.0k|    size_t i;
  225|  65.0k|    uint64_t r;
  226|       |
  227|  65.0k|    if (blen > sizeof(*pr)) {
  ------------------
  |  Branch (227:9): [True: 0, False: 65.0k]
  ------------------
  228|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LARGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  229|      0|        return 0;
  230|      0|    }
  231|  65.0k|    if (b == NULL)
  ------------------
  |  Branch (231:9): [True: 0, False: 65.0k]
  ------------------
  232|      0|        return 0;
  233|   194k|    for (r = 0, i = 0; i < blen; i++) {
  ------------------
  |  Branch (233:24): [True: 129k, False: 65.0k]
  ------------------
  234|   129k|        r <<= 8;
  235|   129k|        r |= b[i];
  236|   129k|    }
  237|  65.0k|    *pr = r;
  238|  65.0k|    return 1;
  239|  65.0k|}
a_int.c:asn1_put_uint64:
  247|   638k|{
  248|   638k|    size_t off = sizeof(uint64_t);
  249|       |
  250|  1.62M|    do {
  251|  1.62M|        b[--off] = (unsigned char)r;
  252|  1.62M|    } while (r >>= 8);
  ------------------
  |  Branch (252:14): [True: 981k, False: 638k]
  ------------------
  253|       |
  254|   638k|    return off;
  255|   638k|}

ASN1_mbstring_copy:
   40|  25.4k|{
   41|  25.4k|    return ASN1_mbstring_ncopy(out, in, len, inform, mask, 0, 0);
   42|  25.4k|}
ASN1_mbstring_ncopy:
   47|  25.4k|{
   48|  25.4k|    int str_type;
   49|  25.4k|    int ret;
   50|  25.4k|    char free_out;
   51|  25.4k|    int outform, outlen = 0;
   52|  25.4k|    ASN1_STRING *dest;
   53|  25.4k|    unsigned char *p;
   54|  25.4k|    int nchar;
   55|  25.4k|    int (*cpyfunc)(unsigned long, void *) = NULL;
   56|  25.4k|    if (len == -1) {
  ------------------
  |  Branch (56:9): [True: 0, False: 25.4k]
  ------------------
   57|      0|        size_t len_s = strlen((const char *)in);
   58|       |
   59|      0|        if (len_s >= INT_MAX) {
  ------------------
  |  Branch (59:13): [True: 0, False: 0]
  ------------------
   60|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_STRING_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   61|      0|            return -1;
   62|      0|        }
   63|      0|        len = (int)len_s;
   64|      0|    }
   65|  25.4k|    if (!mask)
  ------------------
  |  Branch (65:9): [True: 0, False: 25.4k]
  ------------------
   66|      0|        mask = DIRSTRING_TYPE;
  ------------------
  |  |  192|      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
  |  |  ------------------
  ------------------
   67|  25.4k|    if (len < 0) {
  ------------------
  |  Branch (67:9): [True: 0, False: 25.4k]
  ------------------
   68|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   69|      0|        return -1;
   70|  25.4k|    } else if (len >= INT_MAX) {
  ------------------
  |  Branch (70:16): [True: 0, False: 25.4k]
  ------------------
   71|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_STRING_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   72|      0|        return -1;
   73|      0|    }
   74|       |
   75|       |    /* First do a string check and work out the number of characters */
   76|  25.4k|    switch (inform) {
   77|       |
   78|      0|    case MBSTRING_BMP:
  ------------------
  |  |  127|      0|#define MBSTRING_BMP (MBSTRING_FLAG | 2)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (78:5): [True: 0, False: 25.4k]
  ------------------
   79|      0|        if (len & 1) {
  ------------------
  |  Branch (79:13): [True: 0, False: 0]
  ------------------
   80|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_BMPSTRING_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   81|      0|            return -1;
   82|      0|        }
   83|      0|        nchar = len >> 1;
   84|      0|        break;
   85|       |
   86|      0|    case MBSTRING_UNIV:
  ------------------
  |  |  128|      0|#define MBSTRING_UNIV (MBSTRING_FLAG | 4)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (86:5): [True: 0, False: 25.4k]
  ------------------
   87|      0|        if (len & 3) {
  ------------------
  |  Branch (87:13): [True: 0, False: 0]
  ------------------
   88|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_UNIVERSALSTRING_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   89|      0|            return -1;
   90|      0|        }
   91|      0|        nchar = len >> 2;
   92|      0|        break;
   93|       |
   94|      0|    case MBSTRING_UTF8:
  ------------------
  |  |  125|      0|#define MBSTRING_UTF8 (MBSTRING_FLAG)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (94:5): [True: 0, False: 25.4k]
  ------------------
   95|      0|        nchar = 0;
   96|       |        /* This counts the characters and does utf8 syntax checking */
   97|      0|        ret = traverse_string(in, len, MBSTRING_UTF8, in_utf8, &nchar);
  ------------------
  |  |  125|      0|#define MBSTRING_UTF8 (MBSTRING_FLAG)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
   98|      0|        if (ret < 0) {
  ------------------
  |  Branch (98:13): [True: 0, False: 0]
  ------------------
   99|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_UTF8STRING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  100|      0|            return -1;
  101|      0|        }
  102|      0|        break;
  103|       |
  104|  25.4k|    case MBSTRING_ASC:
  ------------------
  |  |  126|  25.4k|#define MBSTRING_ASC (MBSTRING_FLAG | 1)
  |  |  ------------------
  |  |  |  |  124|  25.4k|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (104:5): [True: 25.4k, False: 0]
  ------------------
  105|  25.4k|        nchar = len;
  106|  25.4k|        break;
  107|       |
  108|      0|    default:
  ------------------
  |  Branch (108:5): [True: 0, False: 25.4k]
  ------------------
  109|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_UNKNOWN_FORMAT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  110|      0|        return -1;
  111|  25.4k|    }
  112|       |
  113|  25.4k|    if ((minsize > 0) && (nchar < minsize)) {
  ------------------
  |  Branch (113:9): [True: 0, False: 25.4k]
  |  Branch (113:26): [True: 0, False: 0]
  ------------------
  114|      0|        ERR_raise_data(ERR_LIB_ASN1, ASN1_R_STRING_TOO_SHORT,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_ASN1, ASN1_R_STRING_TOO_SHORT,
  ------------------
  |  |   66|      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
  ------------------
  115|      0|            "minsize=%ld", minsize);
  116|      0|        return -1;
  117|      0|    }
  118|       |
  119|  25.4k|    if ((maxsize > 0) && (nchar > maxsize)) {
  ------------------
  |  Branch (119:9): [True: 0, False: 25.4k]
  |  Branch (119:26): [True: 0, False: 0]
  ------------------
  120|      0|        ERR_raise_data(ERR_LIB_ASN1, ASN1_R_STRING_TOO_LONG,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_ASN1, ASN1_R_STRING_TOO_LONG,
  ------------------
  |  |   66|      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
  ------------------
  121|      0|            "maxsize=%ld", maxsize);
  122|      0|        return -1;
  123|      0|    }
  124|       |
  125|       |    /* Now work out minimal type (if any) */
  126|  25.4k|    if (traverse_string(in, len, inform, type_str, &mask) < 0) {
  ------------------
  |  Branch (126:9): [True: 0, False: 25.4k]
  ------------------
  127|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_CHARACTERS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  128|      0|        return -1;
  129|      0|    }
  130|       |
  131|       |    /*
  132|       |     * Now work out output format and string type.
  133|       |     * These checks should be in sync with the checks in type_str.
  134|       |     */
  135|  25.4k|    outform = MBSTRING_ASC;
  ------------------
  |  |  126|  25.4k|#define MBSTRING_ASC (MBSTRING_FLAG | 1)
  |  |  ------------------
  |  |  |  |  124|  25.4k|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  136|  25.4k|    if (mask & B_ASN1_NUMERICSTRING)
  ------------------
  |  |  104|  25.4k|#define B_ASN1_NUMERICSTRING 0x0001
  ------------------
  |  Branch (136:9): [True: 0, False: 25.4k]
  ------------------
  137|      0|        str_type = V_ASN1_NUMERICSTRING;
  ------------------
  |  |   78|      0|#define V_ASN1_NUMERICSTRING 18
  ------------------
  138|  25.4k|    else if (mask & B_ASN1_PRINTABLESTRING)
  ------------------
  |  |  105|  25.4k|#define B_ASN1_PRINTABLESTRING 0x0002
  ------------------
  |  Branch (138:14): [True: 0, False: 25.4k]
  ------------------
  139|      0|        str_type = V_ASN1_PRINTABLESTRING;
  ------------------
  |  |   79|      0|#define V_ASN1_PRINTABLESTRING 19
  ------------------
  140|  25.4k|    else if (mask & B_ASN1_IA5STRING)
  ------------------
  |  |  109|  25.4k|#define B_ASN1_IA5STRING 0x0010
  ------------------
  |  Branch (140:14): [True: 0, False: 25.4k]
  ------------------
  141|      0|        str_type = V_ASN1_IA5STRING;
  ------------------
  |  |   83|      0|#define V_ASN1_IA5STRING 22
  ------------------
  142|  25.4k|    else if (mask & B_ASN1_T61STRING)
  ------------------
  |  |  106|  25.4k|#define B_ASN1_T61STRING 0x0004
  ------------------
  |  Branch (142:14): [True: 0, False: 25.4k]
  ------------------
  143|      0|        str_type = V_ASN1_T61STRING;
  ------------------
  |  |   80|      0|#define V_ASN1_T61STRING 20
  ------------------
  144|  25.4k|    else if (mask & B_ASN1_BMPSTRING) {
  ------------------
  |  |  117|  25.4k|#define B_ASN1_BMPSTRING 0x0800
  ------------------
  |  Branch (144:14): [True: 0, False: 25.4k]
  ------------------
  145|      0|        str_type = V_ASN1_BMPSTRING;
  ------------------
  |  |   91|      0|#define V_ASN1_BMPSTRING 30
  ------------------
  146|      0|        outform = MBSTRING_BMP;
  ------------------
  |  |  127|      0|#define MBSTRING_BMP (MBSTRING_FLAG | 2)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  147|  25.4k|    } else if (mask & B_ASN1_UNIVERSALSTRING) {
  ------------------
  |  |  114|  25.4k|#define B_ASN1_UNIVERSALSTRING 0x0100
  ------------------
  |  Branch (147:16): [True: 0, False: 25.4k]
  ------------------
  148|      0|        str_type = V_ASN1_UNIVERSALSTRING;
  ------------------
  |  |   90|      0|#define V_ASN1_UNIVERSALSTRING 28
  ------------------
  149|      0|        outform = MBSTRING_UNIV;
  ------------------
  |  |  128|      0|#define MBSTRING_UNIV (MBSTRING_FLAG | 4)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  150|  25.4k|    } else {
  151|  25.4k|        str_type = V_ASN1_UTF8STRING;
  ------------------
  |  |   75|  25.4k|#define V_ASN1_UTF8STRING 12
  ------------------
  152|  25.4k|        outform = MBSTRING_UTF8;
  ------------------
  |  |  125|  25.4k|#define MBSTRING_UTF8 (MBSTRING_FLAG)
  |  |  ------------------
  |  |  |  |  124|  25.4k|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  153|  25.4k|    }
  154|  25.4k|    if (!out)
  ------------------
  |  Branch (154:9): [True: 0, False: 25.4k]
  ------------------
  155|      0|        return str_type;
  156|  25.4k|    if (*out) {
  ------------------
  |  Branch (156:9): [True: 25.4k, False: 0]
  ------------------
  157|  25.4k|        free_out = 0;
  158|  25.4k|        dest = *out;
  159|  25.4k|        ASN1_STRING_set0(dest, NULL, 0);
  160|  25.4k|        dest->type = str_type;
  161|  25.4k|    } else {
  162|      0|        free_out = 1;
  163|      0|        dest = ASN1_STRING_type_new(str_type);
  164|      0|        if (dest == NULL) {
  ------------------
  |  Branch (164:13): [True: 0, False: 0]
  ------------------
  165|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  166|      0|            return -1;
  167|      0|        }
  168|      0|        *out = dest;
  169|      0|    }
  170|       |    /* If both the same type just copy across */
  171|  25.4k|    if (inform == outform) {
  ------------------
  |  Branch (171:9): [True: 0, False: 25.4k]
  ------------------
  172|      0|        if (!ASN1_STRING_set(dest, in, len)) {
  ------------------
  |  Branch (172:13): [True: 0, False: 0]
  ------------------
  173|      0|            if (free_out) {
  ------------------
  |  Branch (173:17): [True: 0, False: 0]
  ------------------
  174|      0|                ASN1_STRING_free(dest);
  175|      0|                *out = NULL;
  176|      0|            }
  177|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  178|      0|            return -1;
  179|      0|        }
  180|      0|        return str_type;
  181|      0|    }
  182|       |
  183|       |    /* Work out how much space the destination will need */
  184|  25.4k|    switch (outform) {
  ------------------
  |  Branch (184:13): [True: 25.4k, False: 0]
  ------------------
  185|      0|    case MBSTRING_ASC:
  ------------------
  |  |  126|      0|#define MBSTRING_ASC (MBSTRING_FLAG | 1)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (185:5): [True: 0, False: 25.4k]
  ------------------
  186|      0|        outlen = nchar;
  187|      0|        cpyfunc = cpy_asc;
  188|      0|        break;
  189|       |
  190|      0|    case MBSTRING_BMP:
  ------------------
  |  |  127|      0|#define MBSTRING_BMP (MBSTRING_FLAG | 2)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (190:5): [True: 0, False: 25.4k]
  ------------------
  191|      0|        if (nchar > INT_MAX / 2) {
  ------------------
  |  Branch (191:13): [True: 0, False: 0]
  ------------------
  192|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_STRING_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  193|      0|            if (free_out) {
  ------------------
  |  Branch (193:17): [True: 0, False: 0]
  ------------------
  194|      0|                ASN1_STRING_free(dest);
  195|      0|                *out = NULL;
  196|      0|            }
  197|      0|            return -1;
  198|      0|        }
  199|      0|        outlen = nchar << 1;
  200|      0|        cpyfunc = cpy_bmp;
  201|      0|        break;
  202|       |
  203|      0|    case MBSTRING_UNIV:
  ------------------
  |  |  128|      0|#define MBSTRING_UNIV (MBSTRING_FLAG | 4)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (203:5): [True: 0, False: 25.4k]
  ------------------
  204|      0|        if (nchar > INT_MAX / 4) {
  ------------------
  |  Branch (204:13): [True: 0, False: 0]
  ------------------
  205|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_STRING_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  206|      0|            if (free_out) {
  ------------------
  |  Branch (206:17): [True: 0, False: 0]
  ------------------
  207|      0|                ASN1_STRING_free(dest);
  208|      0|                *out = NULL;
  209|      0|            }
  210|      0|            return -1;
  211|      0|        }
  212|      0|        outlen = nchar << 2;
  213|      0|        cpyfunc = cpy_univ;
  214|      0|        break;
  215|       |
  216|  25.4k|    case MBSTRING_UTF8:
  ------------------
  |  |  125|  25.4k|#define MBSTRING_UTF8 (MBSTRING_FLAG)
  |  |  ------------------
  |  |  |  |  124|  25.4k|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (216:5): [True: 25.4k, False: 0]
  ------------------
  217|  25.4k|        outlen = 0;
  218|  25.4k|        ret = traverse_string(in, len, inform, out_utf8, &outlen);
  219|  25.4k|        if (ret < 0) { /* error already raised in out_utf8() */
  ------------------
  |  Branch (219:13): [True: 0, False: 25.4k]
  ------------------
  220|      0|            if (free_out) {
  ------------------
  |  Branch (220:17): [True: 0, False: 0]
  ------------------
  221|      0|                ASN1_STRING_free(dest);
  222|      0|                *out = NULL;
  223|      0|            }
  224|      0|            return -1;
  225|      0|        }
  226|  25.4k|        cpyfunc = cpy_utf8;
  227|  25.4k|        break;
  228|  25.4k|    }
  229|  25.4k|    if ((p = OPENSSL_malloc(outlen + 1)) == NULL) {
  ------------------
  |  |  107|  25.4k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (229:9): [True: 0, False: 25.4k]
  ------------------
  230|      0|        if (free_out) {
  ------------------
  |  Branch (230:13): [True: 0, False: 0]
  ------------------
  231|      0|            ASN1_STRING_free(dest);
  232|      0|            *out = NULL;
  233|      0|        }
  234|      0|        return -1;
  235|      0|    }
  236|  25.4k|    dest->length = outlen;
  237|  25.4k|    dest->data = p;
  238|  25.4k|    p[outlen] = 0;
  239|  25.4k|    traverse_string(in, len, inform, cpyfunc, &p);
  240|  25.4k|    return str_type;
  241|  25.4k|}
a_mbstr.c:traverse_string:
  251|  76.3k|{
  252|  76.3k|    unsigned long value;
  253|  76.3k|    int ret;
  254|   687k|    while (len) {
  ------------------
  |  Branch (254:12): [True: 611k, False: 76.3k]
  ------------------
  255|   611k|        if (inform == MBSTRING_ASC) {
  ------------------
  |  |  126|   611k|#define MBSTRING_ASC (MBSTRING_FLAG | 1)
  |  |  ------------------
  |  |  |  |  124|   611k|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (255:13): [True: 611k, False: 0]
  ------------------
  256|   611k|            value = *p++;
  257|   611k|            len--;
  258|   611k|        } else if (inform == MBSTRING_BMP) {
  ------------------
  |  |  127|      0|#define MBSTRING_BMP (MBSTRING_FLAG | 2)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (258:20): [True: 0, False: 0]
  ------------------
  259|      0|            value = *p++ << 8;
  260|      0|            value |= *p++;
  261|      0|            len -= 2;
  262|      0|        } else if (inform == MBSTRING_UNIV) {
  ------------------
  |  |  128|      0|#define MBSTRING_UNIV (MBSTRING_FLAG | 4)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (262:20): [True: 0, False: 0]
  ------------------
  263|      0|            value = ((unsigned long)*p++) << 24;
  264|      0|            value |= ((unsigned long)*p++) << 16;
  265|      0|            value |= *p++ << 8;
  266|      0|            value |= *p++;
  267|      0|            len -= 4;
  268|      0|        } else {
  269|      0|            ret = UTF8_getc(p, len, &value);
  270|      0|            if (ret < 0)
  ------------------
  |  Branch (270:17): [True: 0, False: 0]
  ------------------
  271|      0|                return -1;
  272|      0|            len -= ret;
  273|      0|            p += ret;
  274|      0|        }
  275|   611k|        if (rfunc) {
  ------------------
  |  Branch (275:13): [True: 611k, False: 0]
  ------------------
  276|   611k|            ret = rfunc(value, arg);
  277|   611k|            if (ret <= 0)
  ------------------
  |  Branch (277:17): [True: 0, False: 611k]
  ------------------
  278|      0|                return ret;
  279|   611k|        }
  280|   611k|    }
  281|  76.3k|    return 1;
  282|  76.3k|}
a_mbstr.c:out_utf8:
  302|   203k|{
  303|   203k|    int *outlen, len;
  304|       |
  305|   203k|    len = UTF8_putc(NULL, -1, value);
  306|   203k|    if (len <= 0) {
  ------------------
  |  Branch (306:9): [True: 0, False: 203k]
  ------------------
  307|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_UTF8STRING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  308|      0|        return len;
  309|      0|    }
  310|   203k|    outlen = arg;
  311|   203k|    if (*outlen >= INT_MAX - len) {
  ------------------
  |  Branch (311:9): [True: 0, False: 203k]
  ------------------
  312|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_STRING_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  313|      0|        return -1;
  314|      0|    }
  315|   203k|    *outlen += len;
  316|   203k|    return 1;
  317|   203k|}
a_mbstr.c:type_str:
  325|   203k|{
  326|   203k|    unsigned long usable_types = *((unsigned long *)arg);
  327|   203k|    unsigned long types = usable_types;
  328|   203k|    const int native = value > INT_MAX ? INT_MAX : ossl_fromascii(value);
  ------------------
  |  |   57|   407k|#define ossl_fromascii(c) (c)
  ------------------
  |  Branch (328:24): [True: 0, False: 203k]
  ------------------
  329|       |
  330|       |    /*
  331|       |     * Clear out all the types which are not checked later. If any of those
  332|       |     * is present in the mask, then the UTF8 type will be added and checked
  333|       |     * below.
  334|       |     */
  335|   203k|    types &= B_ASN1_NUMERICSTRING | B_ASN1_PRINTABLESTRING
  ------------------
  |  |  104|   203k|#define B_ASN1_NUMERICSTRING 0x0001
  ------------------
                  types &= B_ASN1_NUMERICSTRING | B_ASN1_PRINTABLESTRING
  ------------------
  |  |  105|   203k|#define B_ASN1_PRINTABLESTRING 0x0002
  ------------------
  336|   203k|        | B_ASN1_IA5STRING | B_ASN1_T61STRING | B_ASN1_BMPSTRING
  ------------------
  |  |  109|   203k|#define B_ASN1_IA5STRING 0x0010
  ------------------
                      | B_ASN1_IA5STRING | B_ASN1_T61STRING | B_ASN1_BMPSTRING
  ------------------
  |  |  106|   203k|#define B_ASN1_T61STRING 0x0004
  ------------------
                      | B_ASN1_IA5STRING | B_ASN1_T61STRING | B_ASN1_BMPSTRING
  ------------------
  |  |  117|   203k|#define B_ASN1_BMPSTRING 0x0800
  ------------------
  337|   203k|        | B_ASN1_UNIVERSALSTRING | B_ASN1_UTF8STRING;
  ------------------
  |  |  114|   203k|#define B_ASN1_UNIVERSALSTRING 0x0100
  ------------------
                      | B_ASN1_UNIVERSALSTRING | B_ASN1_UTF8STRING;
  ------------------
  |  |  119|   203k|#define B_ASN1_UTF8STRING 0x2000
  ------------------
  338|       |
  339|       |    /*
  340|       |     * If any other types were in the input mask, they're effectively treated
  341|       |     * as UTF8
  342|       |     */
  343|   203k|    if (types != usable_types)
  ------------------
  |  Branch (343:9): [True: 0, False: 203k]
  ------------------
  344|      0|        types |= B_ASN1_UTF8STRING;
  ------------------
  |  |  119|      0|#define B_ASN1_UTF8STRING 0x2000
  ------------------
  345|       |
  346|       |    /*
  347|       |     * These checks should be in sync with ASN1_mbstring_ncopy.
  348|       |     */
  349|   203k|    if ((types & B_ASN1_NUMERICSTRING) && !(ossl_isdigit(native) || native == ' '))
  ------------------
  |  |  104|   203k|#define B_ASN1_NUMERICSTRING 0x0001
  ------------------
  |  Branch (349:9): [True: 0, False: 203k]
  |  Branch (349:45): [True: 0, False: 0]
  |  Branch (349:69): [True: 0, False: 0]
  ------------------
  350|      0|        types &= ~B_ASN1_NUMERICSTRING;
  ------------------
  |  |  104|      0|#define B_ASN1_NUMERICSTRING 0x0001
  ------------------
  351|   203k|    if ((types & B_ASN1_PRINTABLESTRING) && !ossl_isasn1print(native))
  ------------------
  |  |  105|   203k|#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 (351:9): [True: 0, False: 203k]
  |  Branch (351:45): [True: 0, False: 0]
  ------------------
  352|      0|        types &= ~B_ASN1_PRINTABLESTRING;
  ------------------
  |  |  105|      0|#define B_ASN1_PRINTABLESTRING 0x0002
  ------------------
  353|   203k|    if ((types & B_ASN1_IA5STRING) && !ossl_isascii(native))
  ------------------
  |  |  109|   203k|#define B_ASN1_IA5STRING 0x0010
  ------------------
                  if ((types & B_ASN1_IA5STRING) && !ossl_isascii(native))
  ------------------
  |  |   75|      0|#define ossl_isascii(c) (((c) & ~127) == 0)
  ------------------
  |  Branch (353:9): [True: 0, False: 203k]
  |  Branch (353:39): [True: 0, False: 0]
  ------------------
  354|      0|        types &= ~B_ASN1_IA5STRING;
  ------------------
  |  |  109|      0|#define B_ASN1_IA5STRING 0x0010
  ------------------
  355|   203k|    if ((types & B_ASN1_T61STRING) && (value > 0xff))
  ------------------
  |  |  106|   203k|#define B_ASN1_T61STRING 0x0004
  ------------------
  |  Branch (355:9): [True: 0, False: 203k]
  |  Branch (355:39): [True: 0, False: 0]
  ------------------
  356|      0|        types &= ~B_ASN1_T61STRING;
  ------------------
  |  |  106|      0|#define B_ASN1_T61STRING 0x0004
  ------------------
  357|   203k|    if ((types & B_ASN1_BMPSTRING) && (value > 0xffff))
  ------------------
  |  |  117|   203k|#define B_ASN1_BMPSTRING 0x0800
  ------------------
  |  Branch (357:9): [True: 0, False: 203k]
  |  Branch (357:39): [True: 0, False: 0]
  ------------------
  358|      0|        types &= ~B_ASN1_BMPSTRING;
  ------------------
  |  |  117|      0|#define B_ASN1_BMPSTRING 0x0800
  ------------------
  359|   203k|    if ((types & B_ASN1_UTF8STRING) && !is_unicode_valid(value))
  ------------------
  |  |  119|   203k|#define B_ASN1_UTF8STRING 0x2000
  ------------------
  |  Branch (359:9): [True: 203k, False: 0]
  |  Branch (359:40): [True: 0, False: 203k]
  ------------------
  360|      0|        types &= ~B_ASN1_UTF8STRING;
  ------------------
  |  |  119|      0|#define B_ASN1_UTF8STRING 0x2000
  ------------------
  361|   203k|    if (!types)
  ------------------
  |  Branch (361:9): [True: 0, False: 203k]
  ------------------
  362|      0|        return -1;
  363|   203k|    *((unsigned long *)arg) = types;
  364|   203k|    return 1;
  365|   203k|}
a_mbstr.c:cpy_utf8:
  410|   203k|{
  411|   203k|    unsigned char **p;
  412|   203k|    int ret;
  413|   203k|    p = arg;
  414|       |    /* We already know there is enough room so pass 0xff as the length */
  415|   203k|    ret = UTF8_putc(*p, 0xff, value);
  416|   203k|    if (ret < 0)
  ------------------
  |  Branch (416:9): [True: 0, False: 203k]
  ------------------
  417|      0|        return ret;
  418|   203k|    *p += ret;
  419|   203k|    return 1;
  420|   203k|}

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

X509_NAME_print_ex:
  560|     20|{
  561|     20|    if (flags == XN_FLAG_COMPAT)
  ------------------
  |  |  329|     20|#define XN_FLAG_COMPAT 0 /* Traditional; use old X509_NAME_print */
  ------------------
  |  Branch (561:9): [True: 0, False: 20]
  ------------------
  562|      0|        return X509_NAME_print(out, nm, indent);
  563|     20|    return do_name_ex(send_bio_chars, out, nm, indent, flags);
  564|     20|}
ASN1_STRING_to_UTF8:
  602|  25.4k|{
  603|  25.4k|    ASN1_STRING stmp, *str = &stmp;
  604|  25.4k|    int mbflag, type, ret;
  605|  25.4k|    if (!in)
  ------------------
  |  Branch (605:9): [True: 0, False: 25.4k]
  ------------------
  606|      0|        return -1;
  607|  25.4k|    type = in->type;
  608|  25.4k|    if ((type < 0) || (type > 30))
  ------------------
  |  Branch (608:9): [True: 0, False: 25.4k]
  |  Branch (608:23): [True: 0, False: 25.4k]
  ------------------
  609|      0|        return -1;
  610|  25.4k|    mbflag = tag2nbyte[type];
  611|  25.4k|    if (mbflag == -1)
  ------------------
  |  Branch (611:9): [True: 0, False: 25.4k]
  ------------------
  612|      0|        return -1;
  613|  25.4k|    mbflag |= MBSTRING_FLAG;
  ------------------
  |  |  124|  25.4k|#define MBSTRING_FLAG 0x1000
  ------------------
  614|  25.4k|    stmp.data = NULL;
  615|  25.4k|    stmp.length = 0;
  616|  25.4k|    stmp.flags = 0;
  617|  25.4k|    ret = ASN1_mbstring_copy(&str, in->data, in->length, mbflag,
  618|  25.4k|        B_ASN1_UTF8STRING);
  ------------------
  |  |  119|  25.4k|#define B_ASN1_UTF8STRING 0x2000
  ------------------
  619|  25.4k|    if (ret < 0)
  ------------------
  |  Branch (619:9): [True: 0, False: 25.4k]
  ------------------
  620|      0|        return ret;
  621|  25.4k|    *out = stmp.data;
  622|  25.4k|    return stmp.length;
  623|  25.4k|}
a_strex.c:do_name_ex:
  422|     20|{
  423|     20|    int i, prev = -1, orflags, cnt;
  424|     20|    int fn_opt, fn_nid;
  425|     20|    const ASN1_OBJECT *fn;
  426|     20|    const ASN1_STRING *val;
  427|     20|    const X509_NAME_ENTRY *ent;
  428|     20|    char objtmp[80];
  429|     20|    const char *objbuf;
  430|     20|    int outlen, len;
  431|     20|    char *sep_dn, *sep_mv, *sep_eq;
  432|     20|    int sep_dn_len, sep_mv_len, sep_eq_len;
  433|     20|    if (indent < 0)
  ------------------
  |  Branch (433:9): [True: 0, False: 20]
  ------------------
  434|      0|        indent = 0;
  435|     20|    outlen = indent;
  436|     20|    if (!do_indent(io_ch, arg, indent))
  ------------------
  |  Branch (436:9): [True: 0, False: 20]
  ------------------
  437|      0|        return -1;
  438|     20|    switch (flags & XN_FLAG_SEP_MASK) {
  ------------------
  |  |  327|     20|#define XN_FLAG_SEP_MASK (0xf << 16)
  ------------------
  439|      0|    case XN_FLAG_SEP_MULTILINE:
  ------------------
  |  |  333|      0|#define XN_FLAG_SEP_MULTILINE (4 << 16) /* One line per field */
  ------------------
  |  Branch (439:5): [True: 0, False: 20]
  ------------------
  440|      0|        sep_dn = "\n";
  441|      0|        sep_dn_len = 1;
  442|      0|        sep_mv = " + ";
  443|      0|        sep_mv_len = 3;
  444|      0|        break;
  445|       |
  446|      0|    case XN_FLAG_SEP_COMMA_PLUS:
  ------------------
  |  |  330|      0|#define XN_FLAG_SEP_COMMA_PLUS (1 << 16) /* RFC2253 ,+ */
  ------------------
  |  Branch (446:5): [True: 0, False: 20]
  ------------------
  447|      0|        sep_dn = ",";
  448|      0|        sep_dn_len = 1;
  449|      0|        sep_mv = "+";
  450|      0|        sep_mv_len = 1;
  451|      0|        indent = 0;
  452|      0|        break;
  453|       |
  454|     20|    case XN_FLAG_SEP_CPLUS_SPC:
  ------------------
  |  |  331|     20|#define XN_FLAG_SEP_CPLUS_SPC (2 << 16) /* ,+ spaced: more readable */
  ------------------
  |  Branch (454:5): [True: 20, False: 0]
  ------------------
  455|     20|        sep_dn = ", ";
  456|     20|        sep_dn_len = 2;
  457|     20|        sep_mv = " + ";
  458|     20|        sep_mv_len = 3;
  459|     20|        indent = 0;
  460|     20|        break;
  461|       |
  462|      0|    case XN_FLAG_SEP_SPLUS_SPC:
  ------------------
  |  |  332|      0|#define XN_FLAG_SEP_SPLUS_SPC (3 << 16) /* ;+ spaced */
  ------------------
  |  Branch (462:5): [True: 0, False: 20]
  ------------------
  463|      0|        sep_dn = "; ";
  464|      0|        sep_dn_len = 2;
  465|      0|        sep_mv = " + ";
  466|      0|        sep_mv_len = 3;
  467|      0|        indent = 0;
  468|      0|        break;
  469|       |
  470|      0|    default:
  ------------------
  |  Branch (470:5): [True: 0, False: 20]
  ------------------
  471|      0|        return -1;
  472|     20|    }
  473|       |
  474|     20|    if (flags & XN_FLAG_SPC_EQ) {
  ------------------
  |  |  346|     20|#define XN_FLAG_SPC_EQ (1 << 23) /* Put spaces round '=' */
  ------------------
  |  Branch (474:9): [True: 20, False: 0]
  ------------------
  475|     20|        sep_eq = " = ";
  476|     20|        sep_eq_len = 3;
  477|     20|    } else {
  478|      0|        sep_eq = "=";
  479|      0|        sep_eq_len = 1;
  480|      0|    }
  481|       |
  482|     20|    fn_opt = flags & XN_FLAG_FN_MASK;
  ------------------
  |  |  339|     20|#define XN_FLAG_FN_MASK (0x3 << 21)
  ------------------
  483|       |
  484|     20|    cnt = X509_NAME_entry_count(n);
  485|     40|    for (i = 0; i < cnt; i++) {
  ------------------
  |  Branch (485:17): [True: 20, False: 20]
  ------------------
  486|     20|        if (flags & XN_FLAG_DN_REV)
  ------------------
  |  |  335|     20|#define XN_FLAG_DN_REV (1 << 20) /* Reverse DN order */
  ------------------
  |  Branch (486:13): [True: 0, False: 20]
  ------------------
  487|      0|            ent = X509_NAME_get_entry(n, cnt - i - 1);
  488|     20|        else
  489|     20|            ent = X509_NAME_get_entry(n, i);
  490|     20|        if (prev != -1) {
  ------------------
  |  Branch (490:13): [True: 0, False: 20]
  ------------------
  491|      0|            if (prev == X509_NAME_ENTRY_set(ent)) {
  ------------------
  |  Branch (491:17): [True: 0, False: 0]
  ------------------
  492|      0|                if (!io_ch(arg, sep_mv, sep_mv_len))
  ------------------
  |  Branch (492:21): [True: 0, False: 0]
  ------------------
  493|      0|                    return -1;
  494|      0|                outlen += sep_mv_len;
  495|      0|            } else {
  496|      0|                if (!io_ch(arg, sep_dn, sep_dn_len))
  ------------------
  |  Branch (496:21): [True: 0, False: 0]
  ------------------
  497|      0|                    return -1;
  498|      0|                outlen += sep_dn_len;
  499|      0|                if (!do_indent(io_ch, arg, indent))
  ------------------
  |  Branch (499:21): [True: 0, False: 0]
  ------------------
  500|      0|                    return -1;
  501|      0|                outlen += indent;
  502|      0|            }
  503|      0|        }
  504|     20|        prev = X509_NAME_ENTRY_set(ent);
  505|     20|        fn = X509_NAME_ENTRY_get_object(ent);
  506|     20|        val = X509_NAME_ENTRY_get_data(ent);
  507|     20|        fn_nid = OBJ_obj2nid(fn);
  508|     20|        if (fn_opt != XN_FLAG_FN_NONE) {
  ------------------
  |  |  344|     20|#define XN_FLAG_FN_NONE (3 << 21) /* No field names */
  ------------------
  |  Branch (508:13): [True: 20, False: 0]
  ------------------
  509|     20|            int objlen, fld_len;
  510|     20|            if ((fn_opt == XN_FLAG_FN_OID) || (fn_nid == NID_undef)) {
  ------------------
  |  |  343|     20|#define XN_FLAG_FN_OID (2 << 21) /* Always use OIDs */
  ------------------
                          if ((fn_opt == XN_FLAG_FN_OID) || (fn_nid == NID_undef)) {
  ------------------
  |  |   18|     20|#define NID_undef                       0
  ------------------
  |  Branch (510:17): [True: 0, False: 20]
  |  Branch (510:47): [True: 0, False: 20]
  ------------------
  511|      0|                OBJ_obj2txt(objtmp, sizeof(objtmp), fn, 1);
  512|      0|                fld_len = 0; /* XXX: what should this be? */
  513|      0|                objbuf = objtmp;
  514|     20|            } else {
  515|     20|                if (fn_opt == XN_FLAG_FN_SN) {
  ------------------
  |  |  341|     20|#define XN_FLAG_FN_SN 0 /* Object short name */
  ------------------
  |  Branch (515:21): [True: 20, False: 0]
  ------------------
  516|     20|                    fld_len = FN_WIDTH_SN;
  ------------------
  |  |  418|     20|#define FN_WIDTH_SN 10
  ------------------
  517|     20|                    objbuf = OBJ_nid2sn(fn_nid);
  518|     20|                } else if (fn_opt == XN_FLAG_FN_LN) {
  ------------------
  |  |  342|      0|#define XN_FLAG_FN_LN (1 << 21) /* Object long name */
  ------------------
  |  Branch (518:28): [True: 0, False: 0]
  ------------------
  519|      0|                    fld_len = FN_WIDTH_LN;
  ------------------
  |  |  417|      0|#define FN_WIDTH_LN 25
  ------------------
  520|      0|                    objbuf = OBJ_nid2ln(fn_nid);
  521|      0|                } else {
  522|      0|                    fld_len = 0; /* XXX: what should this be? */
  523|      0|                    objbuf = "";
  524|      0|                }
  525|     20|            }
  526|     20|            objlen = (int)strlen(objbuf);
  527|     20|            if (!io_ch(arg, objbuf, objlen))
  ------------------
  |  Branch (527:17): [True: 0, False: 20]
  ------------------
  528|      0|                return -1;
  529|     20|            if ((objlen < fld_len) && (flags & XN_FLAG_FN_ALIGN)) {
  ------------------
  |  |  355|     20|#define XN_FLAG_FN_ALIGN (1 << 25) /* Align field names to 20 \
  ------------------
  |  Branch (529:17): [True: 20, False: 0]
  |  Branch (529:39): [True: 0, False: 20]
  ------------------
  530|      0|                if (!do_indent(io_ch, arg, fld_len - objlen))
  ------------------
  |  Branch (530:21): [True: 0, False: 0]
  ------------------
  531|      0|                    return -1;
  532|      0|                outlen += fld_len - objlen;
  533|      0|            }
  534|     20|            if (!io_ch(arg, sep_eq, sep_eq_len))
  ------------------
  |  Branch (534:17): [True: 0, False: 20]
  ------------------
  535|      0|                return -1;
  536|     20|            outlen += objlen + sep_eq_len;
  537|     20|        }
  538|       |        /*
  539|       |         * If the field name is unknown then fix up the DER dump flag. We
  540|       |         * might want to limit this further so it will DER dump on anything
  541|       |         * other than a few 'standard' fields.
  542|       |         */
  543|     20|        if ((fn_nid == NID_undef) && (flags & XN_FLAG_DUMP_UNKNOWN_FIELDS))
  ------------------
  |  |   18|     20|#define NID_undef                       0
  ------------------
                      if ((fn_nid == NID_undef) && (flags & XN_FLAG_DUMP_UNKNOWN_FIELDS))
  ------------------
  |  |  353|      0|#define XN_FLAG_DUMP_UNKNOWN_FIELDS (1 << 24)
  ------------------
  |  Branch (543:13): [True: 0, False: 20]
  |  Branch (543:38): [True: 0, False: 0]
  ------------------
  544|      0|            orflags = ASN1_STRFLGS_DUMP_ALL;
  ------------------
  |  |  468|      0|#define ASN1_STRFLGS_DUMP_ALL 0x80
  ------------------
  545|     20|        else
  546|     20|            orflags = 0;
  547|       |
  548|     20|        len = do_print_ex(io_ch, arg, flags | orflags, val);
  549|     20|        if (len < 0)
  ------------------
  |  Branch (549:13): [True: 0, False: 20]
  ------------------
  550|      0|            return -1;
  551|     20|        outlen += len;
  552|     20|    }
  553|     20|    return outlen;
  554|     20|}
a_strex.c:do_indent:
  409|     20|{
  410|     20|    int i;
  411|     20|    for (i = 0; i < indent; i++)
  ------------------
  |  Branch (411:17): [True: 0, False: 20]
  ------------------
  412|      0|        if (!io_ch(arg, " ", 1))
  ------------------
  |  Branch (412:13): [True: 0, False: 0]
  ------------------
  413|      0|            return 0;
  414|     20|    return 1;
  415|     20|}
a_strex.c:send_bio_chars:
   36|    360|{
   37|    360|    if (!arg)
  ------------------
  |  Branch (37:9): [True: 160, False: 200]
  ------------------
   38|    160|        return 1;
   39|    200|    if (BIO_write(arg, buf, len) != len)
  ------------------
  |  Branch (39:9): [True: 0, False: 200]
  ------------------
   40|      0|        return 0;
   41|    200|    return 1;
   42|    200|}
a_strex.c:do_print_ex:
  327|     20|{
  328|     20|    int outlen, len;
  329|     20|    int type;
  330|     20|    char quotes;
  331|     20|    unsigned short flags;
  332|     20|    quotes = 0;
  333|       |    /* Keep a copy of escape flags */
  334|     20|    flags = (unsigned short)(lflags & ESC_FLAGS);
  ------------------
  |  |   29|     20|#define ESC_FLAGS (ASN1_STRFLGS_ESC_2253 | ASN1_STRFLGS_ESC_2254 | ASN1_STRFLGS_ESC_QUOTE | ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB)
  |  |  ------------------
  |  |  |  |  413|     20|#define ASN1_STRFLGS_ESC_2253 1
  |  |  ------------------
  |  |               #define ESC_FLAGS (ASN1_STRFLGS_ESC_2253 | ASN1_STRFLGS_ESC_2254 | ASN1_STRFLGS_ESC_QUOTE | ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB)
  |  |  ------------------
  |  |  |  |  481|     20|#define ASN1_STRFLGS_ESC_2254 0x400
  |  |  ------------------
  |  |               #define ESC_FLAGS (ASN1_STRFLGS_ESC_2253 | ASN1_STRFLGS_ESC_2254 | ASN1_STRFLGS_ESC_QUOTE | ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB)
  |  |  ------------------
  |  |  |  |  427|     20|#define ASN1_STRFLGS_ESC_QUOTE 8
  |  |  ------------------
  |  |               #define ESC_FLAGS (ASN1_STRFLGS_ESC_2253 | ASN1_STRFLGS_ESC_2254 | ASN1_STRFLGS_ESC_QUOTE | ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB)
  |  |  ------------------
  |  |  |  |  414|     20|#define ASN1_STRFLGS_ESC_CTRL 2
  |  |  ------------------
  |  |               #define ESC_FLAGS (ASN1_STRFLGS_ESC_2253 | ASN1_STRFLGS_ESC_2254 | ASN1_STRFLGS_ESC_QUOTE | ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB)
  |  |  ------------------
  |  |  |  |  415|     20|#define ASN1_STRFLGS_ESC_MSB 4
  |  |  ------------------
  ------------------
  335|       |
  336|     20|    type = str->type;
  337|       |
  338|     20|    outlen = 0;
  339|       |
  340|     20|    if (lflags & ASN1_STRFLGS_SHOW_TYPE) {
  ------------------
  |  |  458|     20|#define ASN1_STRFLGS_SHOW_TYPE 0x40
  ------------------
  |  Branch (340:9): [True: 0, False: 20]
  ------------------
  341|      0|        const char *tagname;
  342|       |
  343|      0|        tagname = ASN1_tag2str(type);
  344|       |        /* We can directly cast here as tagname will never be too large. */
  345|      0|        outlen += (int)strlen(tagname);
  346|      0|        if (!io_ch(arg, tagname, outlen) || !io_ch(arg, ":", 1))
  ------------------
  |  Branch (346:13): [True: 0, False: 0]
  |  Branch (346:45): [True: 0, False: 0]
  ------------------
  347|      0|            return -1;
  348|      0|        outlen++;
  349|      0|    }
  350|       |
  351|       |    /* Decide what to do with type, either dump content or display it */
  352|       |
  353|       |    /* Dump everything */
  354|     20|    if (lflags & ASN1_STRFLGS_DUMP_ALL)
  ------------------
  |  |  468|     20|#define ASN1_STRFLGS_DUMP_ALL 0x80
  ------------------
  |  Branch (354:9): [True: 0, False: 20]
  ------------------
  355|      0|        type = -1;
  356|       |    /* Ignore the string type */
  357|     20|    else if (lflags & ASN1_STRFLGS_IGNORE_TYPE)
  ------------------
  |  |  455|     20|#define ASN1_STRFLGS_IGNORE_TYPE 0x20
  ------------------
  |  Branch (357:14): [True: 0, False: 20]
  ------------------
  358|      0|        type = 1;
  359|     20|    else {
  360|       |        /* Else determine width based on type */
  361|     20|        if ((type > 0) && (type < 31))
  ------------------
  |  Branch (361:13): [True: 20, False: 0]
  |  Branch (361:27): [True: 20, False: 0]
  ------------------
  362|     20|            type = tag2nbyte[type];
  363|      0|        else
  364|      0|            type = -1;
  365|     20|        if ((type == -1) && !(lflags & ASN1_STRFLGS_DUMP_UNKNOWN))
  ------------------
  |  |  469|      0|#define ASN1_STRFLGS_DUMP_UNKNOWN 0x100
  ------------------
  |  Branch (365:13): [True: 0, False: 20]
  |  Branch (365:29): [True: 0, False: 0]
  ------------------
  366|      0|            type = 1;
  367|     20|    }
  368|       |
  369|     20|    if (type == -1) {
  ------------------
  |  Branch (369:9): [True: 0, False: 20]
  ------------------
  370|      0|        len = do_dump(lflags, io_ch, arg, str);
  371|      0|        if (len < 0 || len > INT_MAX - outlen)
  ------------------
  |  Branch (371:13): [True: 0, False: 0]
  |  Branch (371:24): [True: 0, False: 0]
  ------------------
  372|      0|            return -1;
  373|      0|        outlen += len;
  374|      0|        return outlen;
  375|      0|    }
  376|       |
  377|     20|    if (lflags & ASN1_STRFLGS_UTF8_CONVERT) {
  ------------------
  |  |  447|     20|#define ASN1_STRFLGS_UTF8_CONVERT 0x10
  ------------------
  |  Branch (377:9): [True: 20, False: 0]
  ------------------
  378|       |        /*
  379|       |         * Note: if string is UTF8 and we want to convert to UTF8 then we
  380|       |         * just interpret it as 1 byte per character to avoid converting
  381|       |         * twice.
  382|       |         */
  383|     20|        if (!type)
  ------------------
  |  Branch (383:13): [True: 0, False: 20]
  ------------------
  384|      0|            type = 1;
  385|     20|        else
  386|     20|            type |= BUF_TYPE_CONVUTF8;
  ------------------
  |  |  125|     20|#define BUF_TYPE_CONVUTF8 0x8
  ------------------
  387|     20|    }
  388|       |
  389|     20|    len = do_buf(str->data, str->length, type, flags, &quotes, io_ch, NULL);
  390|     20|    if (len < 0 || len > INT_MAX - 2 - outlen)
  ------------------
  |  Branch (390:9): [True: 0, False: 20]
  |  Branch (390:20): [True: 0, False: 20]
  ------------------
  391|      0|        return -1;
  392|     20|    outlen += len;
  393|     20|    if (quotes)
  ------------------
  |  Branch (393:9): [True: 0, False: 20]
  ------------------
  394|      0|        outlen += 2;
  395|     20|    if (!arg)
  ------------------
  |  Branch (395:9): [True: 0, False: 20]
  ------------------
  396|      0|        return outlen;
  397|     20|    if (quotes && !io_ch(arg, "\"", 1))
  ------------------
  |  Branch (397:9): [True: 0, False: 20]
  |  Branch (397:19): [True: 0, False: 0]
  ------------------
  398|      0|        return -1;
  399|     20|    if (do_buf(str->data, str->length, type, flags, NULL, io_ch, arg) < 0)
  ------------------
  |  Branch (399:9): [True: 0, False: 20]
  ------------------
  400|      0|        return -1;
  401|     20|    if (quotes && !io_ch(arg, "\"", 1))
  ------------------
  |  Branch (401:9): [True: 0, False: 20]
  |  Branch (401:19): [True: 0, False: 0]
  ------------------
  402|      0|        return -1;
  403|     20|    return outlen;
  404|     20|}
a_strex.c:do_buf:
  136|     40|{
  137|     40|    int i, outlen, len, charwidth;
  138|     40|    unsigned short orflags;
  139|     40|    unsigned char *p, *q;
  140|     40|    unsigned long c;
  141|       |
  142|     40|    p = buf;
  143|     40|    q = buf + buflen;
  144|     40|    outlen = 0;
  145|     40|    charwidth = type & BUF_TYPE_WIDTH_MASK;
  ------------------
  |  |  124|     40|#define BUF_TYPE_WIDTH_MASK 0x7
  ------------------
  146|       |
  147|     40|    switch (charwidth) {
  148|      0|    case 4:
  ------------------
  |  Branch (148:5): [True: 0, False: 40]
  ------------------
  149|      0|        if (buflen & 3) {
  ------------------
  |  Branch (149:13): [True: 0, False: 0]
  ------------------
  150|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_UNIVERSALSTRING_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  151|      0|            return -1;
  152|      0|        }
  153|      0|        break;
  154|      0|    case 2:
  ------------------
  |  Branch (154:5): [True: 0, False: 40]
  ------------------
  155|      0|        if (buflen & 1) {
  ------------------
  |  Branch (155:13): [True: 0, False: 0]
  ------------------
  156|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_BMPSTRING_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  157|      0|            return -1;
  158|      0|        }
  159|      0|        break;
  160|     40|    default:
  ------------------
  |  Branch (160:5): [True: 40, False: 0]
  ------------------
  161|     40|        break;
  162|     40|    }
  163|       |
  164|    360|    while (p != q) {
  ------------------
  |  Branch (164:12): [True: 320, False: 40]
  ------------------
  165|    320|        if (p == buf && flags & ASN1_STRFLGS_ESC_2253)
  ------------------
  |  |  413|     40|#define ASN1_STRFLGS_ESC_2253 1
  ------------------
  |  Branch (165:13): [True: 40, False: 280]
  |  Branch (165:25): [True: 40, False: 0]
  ------------------
  166|     40|            orflags = CHARTYPE_FIRST_ESC_2253;
  ------------------
  |  |  434|     40|#define CHARTYPE_FIRST_ESC_2253 0x20
  ------------------
  167|    280|        else
  168|    280|            orflags = 0;
  169|       |
  170|    320|        switch (charwidth) {
  171|      0|        case 4:
  ------------------
  |  Branch (171:9): [True: 0, False: 320]
  ------------------
  172|      0|            c = ((unsigned long)*p++) << 24;
  173|      0|            c |= ((unsigned long)*p++) << 16;
  174|      0|            c |= ((unsigned long)*p++) << 8;
  175|      0|            c |= *p++;
  176|      0|            break;
  177|       |
  178|      0|        case 2:
  ------------------
  |  Branch (178:9): [True: 0, False: 320]
  ------------------
  179|      0|            c = ((unsigned long)*p++) << 8;
  180|      0|            c |= *p++;
  181|      0|            break;
  182|       |
  183|    320|        case 1:
  ------------------
  |  Branch (183:9): [True: 320, False: 0]
  ------------------
  184|    320|            c = *p++;
  185|    320|            break;
  186|       |
  187|      0|        case 0:
  ------------------
  |  Branch (187:9): [True: 0, False: 320]
  ------------------
  188|      0|            i = UTF8_getc(p, buflen, &c);
  189|      0|            if (i < 0)
  ------------------
  |  Branch (189:17): [True: 0, False: 0]
  ------------------
  190|      0|                return -1; /* Invalid UTF8String */
  191|      0|            buflen -= i;
  192|      0|            p += i;
  193|      0|            break;
  194|      0|        default:
  ------------------
  |  Branch (194:9): [True: 0, False: 320]
  ------------------
  195|      0|            return -1; /* invalid width */
  196|    320|        }
  197|    320|        if (p == q && flags & ASN1_STRFLGS_ESC_2253)
  ------------------
  |  |  413|     40|#define ASN1_STRFLGS_ESC_2253 1
  ------------------
  |  Branch (197:13): [True: 40, False: 280]
  |  Branch (197:23): [True: 40, False: 0]
  ------------------
  198|     40|            orflags = CHARTYPE_LAST_ESC_2253;
  ------------------
  |  |  436|     40|#define CHARTYPE_LAST_ESC_2253 0x40
  ------------------
  199|    320|        if (type & BUF_TYPE_CONVUTF8) {
  ------------------
  |  |  125|    320|#define BUF_TYPE_CONVUTF8 0x8
  ------------------
  |  Branch (199:13): [True: 320, False: 0]
  ------------------
  200|    320|            unsigned char utfbuf[6];
  201|    320|            int utflen = UTF8_putc(utfbuf, sizeof(utfbuf), c);
  202|       |
  203|    320|            if (utflen < 0)
  ------------------
  |  Branch (203:17): [True: 0, False: 320]
  ------------------
  204|      0|                return -1; /* error happened with UTF8 */
  205|    640|            for (i = 0; i < utflen; i++) {
  ------------------
  |  Branch (205:25): [True: 320, False: 320]
  ------------------
  206|       |                /*
  207|       |                 * We don't need to worry about setting orflags correctly
  208|       |                 * because if utflen==1 its value will be correct anyway
  209|       |                 * otherwise each character will be > 0x7f and so the
  210|       |                 * character will never be escaped on first and last.
  211|       |                 */
  212|    320|                len = do_esc_char(utfbuf[i], flags | orflags, quotes,
  213|    320|                    io_ch, arg);
  214|    320|                if (len < 0)
  ------------------
  |  Branch (214:21): [True: 0, False: 320]
  ------------------
  215|      0|                    return -1;
  216|    320|                outlen += len;
  217|    320|            }
  218|    320|        } else {
  219|      0|            len = do_esc_char(c, flags | orflags, quotes,
  220|      0|                io_ch, arg);
  221|      0|            if (len < 0)
  ------------------
  |  Branch (221:17): [True: 0, False: 0]
  ------------------
  222|      0|                return -1;
  223|      0|            outlen += len;
  224|      0|        }
  225|    320|    }
  226|     40|    return outlen;
  227|     40|}
a_strex.c:do_esc_char:
   65|    320|{
   66|    320|    unsigned short chflgs;
   67|    320|    unsigned char chtmp;
   68|    320|    char tmphex[HEX_SIZE(long) + 3];
   69|       |
   70|    320|    if (c > 0xffffffffL)
  ------------------
  |  Branch (70:9): [True: 0, False: 320]
  ------------------
   71|      0|        return -1;
   72|    320|    if (c > 0xffff) {
  ------------------
  |  Branch (72:9): [True: 0, False: 320]
  ------------------
   73|      0|        BIO_snprintf(tmphex, sizeof(tmphex), "\\W%08lX", c);
   74|      0|        if (!io_ch(arg, tmphex, 10))
  ------------------
  |  Branch (74:13): [True: 0, False: 0]
  ------------------
   75|      0|            return -1;
   76|      0|        return 10;
   77|      0|    }
   78|    320|    if (c > 0xff) {
  ------------------
  |  Branch (78:9): [True: 0, False: 320]
  ------------------
   79|      0|        BIO_snprintf(tmphex, sizeof(tmphex), "\\U%04lX", c);
   80|      0|        if (!io_ch(arg, tmphex, 6))
  ------------------
  |  Branch (80:13): [True: 0, False: 0]
  ------------------
   81|      0|            return -1;
   82|      0|        return 6;
   83|      0|    }
   84|    320|    chtmp = (unsigned char)c;
   85|    320|    if (chtmp > 0x7f)
  ------------------
  |  Branch (85:9): [True: 0, False: 320]
  ------------------
   86|      0|        chflgs = flags & ASN1_STRFLGS_ESC_MSB;
  ------------------
  |  |  415|      0|#define ASN1_STRFLGS_ESC_MSB 4
  ------------------
   87|    320|    else
   88|    320|        chflgs = char_type[chtmp] & flags;
   89|    320|    if (chflgs & CHARTYPE_BS_ESC) {
  ------------------
  |  |   27|    320|#define CHARTYPE_BS_ESC (ASN1_STRFLGS_ESC_2253 | CHARTYPE_FIRST_ESC_2253 | CHARTYPE_LAST_ESC_2253)
  |  |  ------------------
  |  |  |  |  413|    320|#define ASN1_STRFLGS_ESC_2253 1
  |  |  ------------------
  |  |               #define CHARTYPE_BS_ESC (ASN1_STRFLGS_ESC_2253 | CHARTYPE_FIRST_ESC_2253 | CHARTYPE_LAST_ESC_2253)
  |  |  ------------------
  |  |  |  |  434|    320|#define CHARTYPE_FIRST_ESC_2253 0x20
  |  |  ------------------
  |  |               #define CHARTYPE_BS_ESC (ASN1_STRFLGS_ESC_2253 | CHARTYPE_FIRST_ESC_2253 | CHARTYPE_LAST_ESC_2253)
  |  |  ------------------
  |  |  |  |  436|    320|#define CHARTYPE_LAST_ESC_2253 0x40
  |  |  ------------------
  ------------------
  |  Branch (89:9): [True: 0, False: 320]
  ------------------
   90|       |        /* If we don't escape with quotes, signal we need quotes */
   91|      0|        if (chflgs & ASN1_STRFLGS_ESC_QUOTE) {
  ------------------
  |  |  427|      0|#define ASN1_STRFLGS_ESC_QUOTE 8
  ------------------
  |  Branch (91:13): [True: 0, False: 0]
  ------------------
   92|      0|            if (do_quotes)
  ------------------
  |  Branch (92:17): [True: 0, False: 0]
  ------------------
   93|      0|                *do_quotes = 1;
   94|      0|            if (!io_ch(arg, &chtmp, 1))
  ------------------
  |  Branch (94:17): [True: 0, False: 0]
  ------------------
   95|      0|                return -1;
   96|      0|            return 1;
   97|      0|        }
   98|      0|        if (!io_ch(arg, "\\", 1))
  ------------------
  |  Branch (98:13): [True: 0, False: 0]
  ------------------
   99|      0|            return -1;
  100|      0|        if (!io_ch(arg, &chtmp, 1))
  ------------------
  |  Branch (100:13): [True: 0, False: 0]
  ------------------
  101|      0|            return -1;
  102|      0|        return 2;
  103|      0|    }
  104|    320|    if (chflgs & (ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB | ASN1_STRFLGS_ESC_2254)) {
  ------------------
  |  |  414|    320|#define ASN1_STRFLGS_ESC_CTRL 2
  ------------------
                  if (chflgs & (ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB | ASN1_STRFLGS_ESC_2254)) {
  ------------------
  |  |  415|    320|#define ASN1_STRFLGS_ESC_MSB 4
  ------------------
                  if (chflgs & (ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB | ASN1_STRFLGS_ESC_2254)) {
  ------------------
  |  |  481|    320|#define ASN1_STRFLGS_ESC_2254 0x400
  ------------------
  |  Branch (104:9): [True: 0, False: 320]
  ------------------
  105|      0|        BIO_snprintf(tmphex, 11, "\\%02X", chtmp);
  106|      0|        if (!io_ch(arg, tmphex, 3))
  ------------------
  |  Branch (106:13): [True: 0, False: 0]
  ------------------
  107|      0|            return -1;
  108|      0|        return 3;
  109|      0|    }
  110|       |    /*
  111|       |     * If we get this far and do any escaping at all must escape the escape
  112|       |     * character itself: backslash.
  113|       |     */
  114|    320|    if (chtmp == '\\' && (flags & ESC_FLAGS)) {
  ------------------
  |  |   29|      0|#define ESC_FLAGS (ASN1_STRFLGS_ESC_2253 | ASN1_STRFLGS_ESC_2254 | ASN1_STRFLGS_ESC_QUOTE | ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB)
  |  |  ------------------
  |  |  |  |  413|      0|#define ASN1_STRFLGS_ESC_2253 1
  |  |  ------------------
  |  |               #define ESC_FLAGS (ASN1_STRFLGS_ESC_2253 | ASN1_STRFLGS_ESC_2254 | ASN1_STRFLGS_ESC_QUOTE | ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB)
  |  |  ------------------
  |  |  |  |  481|      0|#define ASN1_STRFLGS_ESC_2254 0x400
  |  |  ------------------
  |  |               #define ESC_FLAGS (ASN1_STRFLGS_ESC_2253 | ASN1_STRFLGS_ESC_2254 | ASN1_STRFLGS_ESC_QUOTE | ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB)
  |  |  ------------------
  |  |  |  |  427|      0|#define ASN1_STRFLGS_ESC_QUOTE 8
  |  |  ------------------
  |  |               #define ESC_FLAGS (ASN1_STRFLGS_ESC_2253 | ASN1_STRFLGS_ESC_2254 | ASN1_STRFLGS_ESC_QUOTE | ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB)
  |  |  ------------------
  |  |  |  |  414|      0|#define ASN1_STRFLGS_ESC_CTRL 2
  |  |  ------------------
  |  |               #define ESC_FLAGS (ASN1_STRFLGS_ESC_2253 | ASN1_STRFLGS_ESC_2254 | ASN1_STRFLGS_ESC_QUOTE | ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB)
  |  |  ------------------
  |  |  |  |  415|      0|#define ASN1_STRFLGS_ESC_MSB 4
  |  |  ------------------
  ------------------
  |  Branch (114:9): [True: 0, False: 320]
  |  Branch (114:26): [True: 0, False: 0]
  ------------------
  115|      0|        if (!io_ch(arg, "\\\\", 2))
  ------------------
  |  Branch (115:13): [True: 0, False: 0]
  ------------------
  116|      0|            return -1;
  117|      0|        return 2;
  118|      0|    }
  119|    320|    if (!io_ch(arg, &chtmp, 1))
  ------------------
  |  Branch (119:9): [True: 0, False: 320]
  ------------------
  120|      0|        return -1;
  121|    320|    return 1;
  122|    320|}

ossl_asn1_time_to_tm:
   77|  14.2k|{
   78|  14.2k|    static const int min[9] = { 0, 0, 1, 1, 0, 0, 0, 0, 0 };
   79|  14.2k|    static const int max[9] = { 99, 99, 12, 31, 23, 59, 59, 12, 59 };
   80|  14.2k|    static const int mdays[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
   81|  14.2k|    char *a;
   82|  14.2k|    int n, i, i2, l, o, min_l, end = 6, btz = 5, md;
   83|  14.2k|    struct tm tmp;
   84|       |#if defined(CHARSET_EBCDIC)
   85|       |    const char upper_z = 0x5A, num_zero = 0x30, period = 0x2E, minus = 0x2D, plus = 0x2B;
   86|       |#else
   87|  14.2k|    const char upper_z = 'Z', num_zero = '0', period = '.', minus = '-', plus = '+';
   88|  14.2k|#endif
   89|       |
   90|  14.2k|    if (d->type == V_ASN1_UTCTIME) {
  ------------------
  |  |   84|  14.2k|#define V_ASN1_UTCTIME 23
  ------------------
  |  Branch (90:9): [True: 7.11k, False: 7.11k]
  ------------------
   91|  7.11k|        min_l = 13;
   92|  7.11k|    } else if (d->type == V_ASN1_GENERALIZEDTIME) {
  ------------------
  |  |   85|  7.11k|#define V_ASN1_GENERALIZEDTIME 24
  ------------------
  |  Branch (92:16): [True: 7.11k, False: 0]
  ------------------
   93|  7.11k|        end = 7;
   94|  7.11k|        btz = 6;
   95|  7.11k|        min_l = 15;
   96|  7.11k|    } else {
   97|      0|        return 0;
   98|      0|    }
   99|       |
  100|  14.2k|    l = d->length;
  101|  14.2k|    a = (char *)d->data;
  102|  14.2k|    o = 0;
  103|  14.2k|    memset(&tmp, 0, sizeof(tmp));
  104|       |
  105|       |    /*
  106|       |     * GENERALIZEDTIME is similar to UTCTIME except the year is represented
  107|       |     * as YYYY. This stuff treats everything as a two digit field so make
  108|       |     * first two fields 00 to 99
  109|       |     */
  110|       |
  111|  14.2k|    if (l < min_l)
  ------------------
  |  Branch (111:9): [True: 0, False: 14.2k]
  ------------------
  112|      0|        goto err;
  113|   106k|    for (i = 0; i < end; i++) {
  ------------------
  |  Branch (113:17): [True: 92.5k, False: 14.2k]
  ------------------
  114|  92.5k|        if ((i == btz) && ((a[o] == upper_z) || (a[o] == plus) || (a[o] == minus))) {
  ------------------
  |  Branch (114:13): [True: 14.2k, False: 78.2k]
  |  Branch (114:28): [True: 0, False: 14.2k]
  |  Branch (114:49): [True: 0, False: 14.2k]
  |  Branch (114:67): [True: 0, False: 14.2k]
  ------------------
  115|      0|            i++;
  116|      0|            break;
  117|      0|        }
  118|  92.5k|        if (!ossl_ascii_isdigit(a[o]))
  ------------------
  |  Branch (118:13): [True: 0, False: 92.5k]
  ------------------
  119|      0|            goto err;
  120|  92.5k|        n = a[o] - num_zero;
  121|       |        /* incomplete 2-digital number */
  122|  92.5k|        if (++o == l)
  ------------------
  |  Branch (122:13): [True: 0, False: 92.5k]
  ------------------
  123|      0|            goto err;
  124|       |
  125|  92.5k|        if (!ossl_ascii_isdigit(a[o]))
  ------------------
  |  Branch (125:13): [True: 0, False: 92.5k]
  ------------------
  126|      0|            goto err;
  127|  92.5k|        n = (n * 10) + a[o] - num_zero;
  128|       |        /* no more bytes to read, but we haven't seen time-zone yet */
  129|  92.5k|        if (++o == l)
  ------------------
  |  Branch (129:13): [True: 0, False: 92.5k]
  ------------------
  130|      0|            goto err;
  131|       |
  132|  92.5k|        i2 = (d->type == V_ASN1_UTCTIME) ? i + 1 : i;
  ------------------
  |  |   84|  92.5k|#define V_ASN1_UTCTIME 23
  ------------------
  |  Branch (132:14): [True: 42.7k, False: 49.8k]
  ------------------
  133|       |
  134|  92.5k|        if ((n < min[i2]) || (n > max[i2]))
  ------------------
  |  Branch (134:13): [True: 0, False: 92.5k]
  |  Branch (134:30): [True: 0, False: 92.5k]
  ------------------
  135|      0|            goto err;
  136|  92.5k|        switch (i2) {
  ------------------
  |  Branch (136:17): [True: 92.5k, False: 0]
  ------------------
  137|  7.11k|        case 0:
  ------------------
  |  Branch (137:9): [True: 7.11k, False: 85.4k]
  ------------------
  138|       |            /* UTC will never be here */
  139|  7.11k|            tmp.tm_year = n * 100 - 1900;
  140|  7.11k|            break;
  141|  14.2k|        case 1:
  ------------------
  |  Branch (141:9): [True: 14.2k, False: 78.2k]
  ------------------
  142|  14.2k|            if (d->type == V_ASN1_UTCTIME)
  ------------------
  |  |   84|  14.2k|#define V_ASN1_UTCTIME 23
  ------------------
  |  Branch (142:17): [True: 7.11k, False: 7.11k]
  ------------------
  143|  7.11k|                tmp.tm_year = n < 50 ? n + 100 : n;
  ------------------
  |  Branch (143:31): [True: 7.11k, False: 0]
  ------------------
  144|  7.11k|            else
  145|  7.11k|                tmp.tm_year += n;
  146|  14.2k|            break;
  147|  14.2k|        case 2:
  ------------------
  |  Branch (147:9): [True: 14.2k, False: 78.2k]
  ------------------
  148|  14.2k|            tmp.tm_mon = n - 1;
  149|  14.2k|            break;
  150|  14.2k|        case 3:
  ------------------
  |  Branch (150:9): [True: 14.2k, False: 78.2k]
  ------------------
  151|       |            /* check if tm_mday is valid in tm_mon */
  152|  14.2k|            if (tmp.tm_mon == 1) {
  ------------------
  |  Branch (152:17): [True: 0, False: 14.2k]
  ------------------
  153|       |                /* it's February */
  154|      0|                md = mdays[1] + leap_year(tmp.tm_year + 1900);
  155|  14.2k|            } else {
  156|  14.2k|                md = mdays[tmp.tm_mon];
  157|  14.2k|            }
  158|  14.2k|            if (n > md)
  ------------------
  |  Branch (158:17): [True: 0, False: 14.2k]
  ------------------
  159|      0|                goto err;
  160|  14.2k|            tmp.tm_mday = n;
  161|  14.2k|            determine_days(&tmp);
  162|  14.2k|            break;
  163|  14.2k|        case 4:
  ------------------
  |  Branch (163:9): [True: 14.2k, False: 78.2k]
  ------------------
  164|  14.2k|            tmp.tm_hour = n;
  165|  14.2k|            break;
  166|  14.2k|        case 5:
  ------------------
  |  Branch (166:9): [True: 14.2k, False: 78.2k]
  ------------------
  167|  14.2k|            tmp.tm_min = n;
  168|  14.2k|            break;
  169|  14.2k|        case 6:
  ------------------
  |  Branch (169:9): [True: 14.2k, False: 78.2k]
  ------------------
  170|  14.2k|            tmp.tm_sec = n;
  171|  14.2k|            break;
  172|  92.5k|        }
  173|  92.5k|    }
  174|       |
  175|       |    /*
  176|       |     * Optional fractional seconds: decimal point followed by one or more
  177|       |     * digits.
  178|       |     */
  179|  14.2k|    if (d->type == V_ASN1_GENERALIZEDTIME && a[o] == period) {
  ------------------
  |  |   85|  28.4k|#define V_ASN1_GENERALIZEDTIME 24
  ------------------
  |  Branch (179:9): [True: 7.11k, False: 7.11k]
  |  Branch (179:46): [True: 0, False: 7.11k]
  ------------------
  180|      0|        if (++o == l)
  ------------------
  |  Branch (180:13): [True: 0, False: 0]
  ------------------
  181|      0|            goto err;
  182|      0|        i = o;
  183|      0|        while ((o < l) && ossl_ascii_isdigit(a[o]))
  ------------------
  |  Branch (183:16): [True: 0, False: 0]
  |  Branch (183:27): [True: 0, False: 0]
  ------------------
  184|      0|            o++;
  185|       |        /* Must have at least one digit after decimal point */
  186|      0|        if (i == o)
  ------------------
  |  Branch (186:13): [True: 0, False: 0]
  ------------------
  187|      0|            goto err;
  188|       |        /* no more bytes to read, but we haven't seen time-zone yet */
  189|      0|        if (o == l)
  ------------------
  |  Branch (189:13): [True: 0, False: 0]
  ------------------
  190|      0|            goto err;
  191|      0|    }
  192|       |
  193|       |    /*
  194|       |     * 'o' will never point to '\0' at this point, the only chance
  195|       |     * 'o' can point to '\0' is either the subsequent if or the first
  196|       |     * else if is true.
  197|       |     */
  198|  14.2k|    if (a[o] == upper_z) {
  ------------------
  |  Branch (198:9): [True: 14.2k, False: 0]
  ------------------
  199|  14.2k|        o++;
  200|  14.2k|    } else if (((a[o] == plus) || (a[o] == minus))) {
  ------------------
  |  Branch (200:17): [True: 0, False: 0]
  |  Branch (200:35): [True: 0, False: 0]
  ------------------
  201|      0|        int offsign = a[o] == minus ? 1 : -1;
  ------------------
  |  Branch (201:23): [True: 0, False: 0]
  ------------------
  202|      0|        int offset = 0;
  203|       |
  204|      0|        o++;
  205|       |        /*
  206|       |         * if not equal, no need to do subsequent checks
  207|       |         * since the following for-loop will add 'o' by 4
  208|       |         * and the final return statement will check if 'l'
  209|       |         * and 'o' are equal.
  210|       |         */
  211|      0|        if (o + 4 != l)
  ------------------
  |  Branch (211:13): [True: 0, False: 0]
  ------------------
  212|      0|            goto err;
  213|      0|        for (i = end; i < end + 2; i++) {
  ------------------
  |  Branch (213:23): [True: 0, False: 0]
  ------------------
  214|      0|            if (!ossl_ascii_isdigit(a[o]))
  ------------------
  |  Branch (214:17): [True: 0, False: 0]
  ------------------
  215|      0|                goto err;
  216|      0|            n = a[o] - num_zero;
  217|      0|            o++;
  218|      0|            if (!ossl_ascii_isdigit(a[o]))
  ------------------
  |  Branch (218:17): [True: 0, False: 0]
  ------------------
  219|      0|                goto err;
  220|      0|            n = (n * 10) + a[o] - num_zero;
  221|      0|            i2 = (d->type == V_ASN1_UTCTIME) ? i + 1 : i;
  ------------------
  |  |   84|      0|#define V_ASN1_UTCTIME 23
  ------------------
  |  Branch (221:18): [True: 0, False: 0]
  ------------------
  222|      0|            if ((n < min[i2]) || (n > max[i2]))
  ------------------
  |  Branch (222:17): [True: 0, False: 0]
  |  Branch (222:34): [True: 0, False: 0]
  ------------------
  223|      0|                goto err;
  224|       |            /* if tm is NULL, no need to adjust */
  225|      0|            if (tm != NULL) {
  ------------------
  |  Branch (225:17): [True: 0, False: 0]
  ------------------
  226|      0|                if (i == end)
  ------------------
  |  Branch (226:21): [True: 0, False: 0]
  ------------------
  227|      0|                    offset = n * 3600;
  228|      0|                else if (i == end + 1)
  ------------------
  |  Branch (228:26): [True: 0, False: 0]
  ------------------
  229|      0|                    offset += n * 60;
  230|      0|            }
  231|      0|            o++;
  232|      0|        }
  233|      0|        if (offset && !OPENSSL_gmtime_adj(&tmp, 0, offset * offsign))
  ------------------
  |  Branch (233:13): [True: 0, False: 0]
  |  Branch (233:23): [True: 0, False: 0]
  ------------------
  234|      0|            goto err;
  235|      0|    } else {
  236|       |        /* not Z, or not +/- */
  237|      0|        goto err;
  238|      0|    }
  239|  14.2k|    if (o == l) {
  ------------------
  |  Branch (239:9): [True: 14.2k, False: 0]
  ------------------
  240|       |        /* success, check if tm should be filled */
  241|  14.2k|        if (tm != NULL)
  ------------------
  |  Branch (241:13): [True: 14.2k, False: 0]
  ------------------
  242|  14.2k|            *tm = tmp;
  243|  14.2k|        return 1;
  244|  14.2k|    }
  245|      0|err:
  246|      0|    return 0;
  247|  14.2k|}
ASN1_TIME_to_tm:
  422|  14.2k|{
  423|  14.2k|    if (s == NULL) {
  ------------------
  |  Branch (423:9): [True: 0, False: 14.2k]
  ------------------
  424|      0|        time_t now_t;
  425|       |
  426|      0|        time(&now_t);
  427|      0|        memset(tm, 0, sizeof(*tm));
  428|      0|        if (OPENSSL_gmtime(&now_t, tm) != NULL)
  ------------------
  |  Branch (428:13): [True: 0, False: 0]
  ------------------
  429|      0|            return 1;
  430|      0|        return 0;
  431|      0|    }
  432|       |
  433|  14.2k|    return ossl_asn1_time_to_tm(tm, s);
  434|  14.2k|}
ASN1_TIME_print:
  455|     20|{
  456|     20|    return ASN1_TIME_print_ex(bp, tm, ASN1_DTFLGS_RFC822);
  ------------------
  |  |  419|     20|#define ASN1_DTFLGS_RFC822 0x00UL
  ------------------
  457|     20|}
ASN1_TIME_print_ex:
  461|     20|{
  462|     20|    return ossl_asn1_time_print_ex(bp, tm, flags) > 0;
  463|     20|}
ossl_asn1_time_print_ex:
  468|     20|{
  469|     20|    char *v;
  470|     20|    int l;
  471|     20|    struct tm stm;
  472|     20|    const char period = 0x2E;
  473|       |
  474|       |    /* ossl_asn1_time_to_tm will check the time type */
  475|     20|    if (!ossl_asn1_time_to_tm(&stm, tm))
  ------------------
  |  Branch (475:9): [True: 0, False: 20]
  ------------------
  476|      0|        return BIO_write(bp, "Bad time value", 14) ? -1 : 0;
  ------------------
  |  Branch (476:16): [True: 0, False: 0]
  ------------------
  477|       |
  478|     20|    l = tm->length;
  479|     20|    v = (char *)tm->data;
  480|       |
  481|     20|    if (tm->type == V_ASN1_GENERALIZEDTIME) {
  ------------------
  |  |   85|     20|#define V_ASN1_GENERALIZEDTIME 24
  ------------------
  |  Branch (481:9): [True: 10, False: 10]
  ------------------
  482|     10|        char *f = NULL;
  483|     10|        int f_len = 0;
  484|       |
  485|       |        /*
  486|       |         * Try to parse fractional seconds. '14' is the place of
  487|       |         * 'fraction point' in a GeneralizedTime string.
  488|       |         */
  489|     10|        if (tm->length > 15 && v[14] == period) {
  ------------------
  |  Branch (489:13): [True: 0, False: 10]
  |  Branch (489:32): [True: 0, False: 0]
  ------------------
  490|       |            /* exclude the . itself */
  491|      0|            f = &v[15];
  492|      0|            f_len = 0;
  493|      0|            while (15 + f_len < l && ossl_ascii_isdigit(f[f_len]))
  ------------------
  |  Branch (493:20): [True: 0, False: 0]
  |  Branch (493:38): [True: 0, False: 0]
  ------------------
  494|      0|                ++f_len;
  495|      0|        }
  496|       |
  497|     10|        if (f_len > 0) {
  ------------------
  |  Branch (497:13): [True: 0, False: 10]
  ------------------
  498|      0|            if ((flags & ASN1_DTFLGS_TYPE_MASK) == ASN1_DTFLGS_ISO8601) {
  ------------------
  |  |  418|      0|#define ASN1_DTFLGS_TYPE_MASK 0x0FUL
  ------------------
                          if ((flags & ASN1_DTFLGS_TYPE_MASK) == ASN1_DTFLGS_ISO8601) {
  ------------------
  |  |  420|      0|#define ASN1_DTFLGS_ISO8601 0x01UL
  ------------------
  |  Branch (498:17): [True: 0, False: 0]
  ------------------
  499|      0|                return BIO_printf(bp, "%4d-%02d-%02d %02d:%02d:%02d.%.*sZ",
  500|      0|                           stm.tm_year + 1900, stm.tm_mon + 1,
  501|      0|                           stm.tm_mday, stm.tm_hour,
  502|      0|                           stm.tm_min, stm.tm_sec, f_len, f)
  503|      0|                    > 0;
  504|      0|            } else {
  505|      0|                return BIO_printf(bp, "%s %2d %02d:%02d:%02d.%.*s %d GMT",
  506|      0|                           _asn1_mon[stm.tm_mon], stm.tm_mday, stm.tm_hour,
  507|      0|                           stm.tm_min, stm.tm_sec, f_len, f,
  508|      0|                           stm.tm_year + 1900)
  509|      0|                    > 0;
  510|      0|            }
  511|      0|        }
  512|     10|    }
  513|     20|    if ((flags & ASN1_DTFLGS_TYPE_MASK) == ASN1_DTFLGS_ISO8601) {
  ------------------
  |  |  418|     20|#define ASN1_DTFLGS_TYPE_MASK 0x0FUL
  ------------------
                  if ((flags & ASN1_DTFLGS_TYPE_MASK) == ASN1_DTFLGS_ISO8601) {
  ------------------
  |  |  420|     20|#define ASN1_DTFLGS_ISO8601 0x01UL
  ------------------
  |  Branch (513:9): [True: 0, False: 20]
  ------------------
  514|      0|        return BIO_printf(bp, "%4d-%02d-%02d %02d:%02d:%02dZ",
  515|      0|                   stm.tm_year + 1900, stm.tm_mon + 1,
  516|      0|                   stm.tm_mday, stm.tm_hour,
  517|      0|                   stm.tm_min, stm.tm_sec)
  518|      0|            > 0;
  519|     20|    } else {
  520|     20|        return BIO_printf(bp, "%s %2d %02d:%02d:%02d %d GMT",
  521|     20|                   _asn1_mon[stm.tm_mon], stm.tm_mday, stm.tm_hour,
  522|     20|                   stm.tm_min, stm.tm_sec, stm.tm_year + 1900)
  523|     20|            > 0;
  524|     20|    }
  525|     20|}
a_time.c:leap_year:
   38|  14.2k|{
   39|  14.2k|    if (year % 400 == 0 || (year % 100 != 0 && year % 4 == 0))
  ------------------
  |  Branch (39:9): [True: 0, False: 14.2k]
  |  Branch (39:29): [True: 14.2k, False: 0]
  |  Branch (39:48): [True: 0, False: 14.2k]
  ------------------
   40|      0|        return 1;
   41|  14.2k|    return 0;
   42|  14.2k|}
a_time.c:determine_days:
   51|  14.2k|{
   52|  14.2k|    static const int ydays[12] = {
   53|  14.2k|        0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334
   54|  14.2k|    };
   55|  14.2k|    int y = tm->tm_year + 1900;
   56|  14.2k|    int m = tm->tm_mon;
   57|  14.2k|    int d = tm->tm_mday;
   58|  14.2k|    int c;
   59|       |
   60|  14.2k|    tm->tm_yday = ydays[m] + d - 1;
   61|  14.2k|    if (m >= 2) {
  ------------------
  |  Branch (61:9): [True: 14.2k, False: 0]
  ------------------
   62|       |        /* March and onwards can be one day further into the year */
   63|  14.2k|        tm->tm_yday += leap_year(y);
   64|  14.2k|        m += 2;
   65|  14.2k|    } else {
   66|       |        /* Treat January and February as part of the previous year */
   67|      0|        m += 14;
   68|      0|        y--;
   69|      0|    }
   70|  14.2k|    c = y / 100;
   71|  14.2k|    y %= 100;
   72|       |    /* Zeller's congruence */
   73|  14.2k|    tm->tm_wday = (d + (13 * m) / 5 + y + y / 4 + c / 4 + 5 * c + 6) % 7;
   74|  14.2k|}

OPENSSL_tm_to_posix:
  159|  14.2k|{
  160|  14.2k|    return posix_time_from_utc(tm->tm_year + (int64_t)1900,
  161|  14.2k|        tm->tm_mon + (int64_t)1, tm->tm_mday,
  162|  14.2k|        tm->tm_hour, tm->tm_min, tm->tm_sec, out);
  163|  14.2k|}
a_time_posix.c:posix_time_from_utc:
   96|  14.2k|{
   97|  14.2k|    int64_t era, year_of_era, day_of_year, day_of_era, posix_days;
   98|       |
   99|  14.2k|    if (!is_valid_date(year, month, day) || !is_valid_time(hours, minutes, seconds))
  ------------------
  |  Branch (99:9): [True: 0, False: 14.2k]
  |  Branch (99:45): [True: 0, False: 14.2k]
  ------------------
  100|      0|        return 0;
  101|  14.2k|    if (month <= 2)
  ------------------
  |  Branch (101:9): [True: 0, False: 14.2k]
  ------------------
  102|      0|        year--; /* Start years on Mar 1, so leap days end a year. */
  103|       |
  104|       |    /* At this point year will be in the range -1 and 9999. */
  105|  14.2k|    era = (year >= 0 ? year : year - 399) / 400;
  ------------------
  |  Branch (105:12): [True: 14.2k, False: 0]
  ------------------
  106|  14.2k|    year_of_era = year - era * 400;
  107|  14.2k|    day_of_year = (153 * (month > 2 ? month - 3 : month + 9) + 2) / 5 + day - 1;
  ------------------
  |  Branch (107:27): [True: 14.2k, False: 0]
  ------------------
  108|  14.2k|    day_of_era = year_of_era * 365 + year_of_era / 4 - year_of_era / 100 + day_of_year;
  109|  14.2k|    posix_days = era * 146097 + day_of_era - 719468;
  110|  14.2k|    *out_time = posix_days * SECS_PER_DAY + hours * SECS_PER_HOUR + minutes * 60 + seconds;
  ------------------
  |  |   28|  14.2k|#define SECS_PER_DAY (int64_t)(24 * SECS_PER_HOUR)
  |  |  ------------------
  |  |  |  |   27|  14.2k|#define SECS_PER_HOUR (int64_t)(60 * 60)
  |  |  ------------------
  ------------------
                  *out_time = posix_days * SECS_PER_DAY + hours * SECS_PER_HOUR + minutes * 60 + seconds;
  ------------------
  |  |   27|  14.2k|#define SECS_PER_HOUR (int64_t)(60 * 60)
  ------------------
  111|       |
  112|  14.2k|    return 1;
  113|  14.2k|}
a_time_posix.c:is_valid_date:
   35|  14.2k|{
   36|  14.2k|    int days_in_month;
   37|       |
   38|  14.2k|    if (day < 1 || year < 0 || year > 9999)
  ------------------
  |  Branch (38:9): [True: 0, False: 14.2k]
  |  Branch (38:20): [True: 0, False: 14.2k]
  |  Branch (38:32): [True: 0, False: 14.2k]
  ------------------
   39|      0|        return 0;
   40|  14.2k|    switch (month) {
   41|      0|    case 1:
  ------------------
  |  Branch (41:5): [True: 0, False: 14.2k]
  ------------------
   42|      0|    case 3:
  ------------------
  |  Branch (42:5): [True: 0, False: 14.2k]
  ------------------
   43|      0|    case 5:
  ------------------
  |  Branch (43:5): [True: 0, False: 14.2k]
  ------------------
   44|      0|    case 7:
  ------------------
  |  Branch (44:5): [True: 0, False: 14.2k]
  ------------------
   45|  14.2k|    case 8:
  ------------------
  |  Branch (45:5): [True: 14.2k, False: 0]
  ------------------
   46|  14.2k|    case 10:
  ------------------
  |  Branch (46:5): [True: 0, False: 14.2k]
  ------------------
   47|  14.2k|    case 12:
  ------------------
  |  Branch (47:5): [True: 0, False: 14.2k]
  ------------------
   48|  14.2k|        days_in_month = 31;
   49|  14.2k|        break;
   50|      0|    case 4:
  ------------------
  |  Branch (50:5): [True: 0, False: 14.2k]
  ------------------
   51|      0|    case 6:
  ------------------
  |  Branch (51:5): [True: 0, False: 14.2k]
  ------------------
   52|      0|    case 9:
  ------------------
  |  Branch (52:5): [True: 0, False: 14.2k]
  ------------------
   53|      0|    case 11:
  ------------------
  |  Branch (53:5): [True: 0, False: 14.2k]
  ------------------
   54|      0|        days_in_month = 30;
   55|      0|        break;
   56|      0|    case 2:
  ------------------
  |  Branch (56:5): [True: 0, False: 14.2k]
  ------------------
   57|      0|        if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)
  ------------------
  |  Branch (57:14): [True: 0, False: 0]
  |  Branch (57:31): [True: 0, False: 0]
  |  Branch (57:51): [True: 0, False: 0]
  ------------------
   58|      0|            days_in_month = 29;
   59|      0|        else
   60|      0|            days_in_month = 28;
   61|      0|        break;
   62|      0|    default:
  ------------------
  |  Branch (62:5): [True: 0, False: 14.2k]
  ------------------
   63|      0|        return 0;
   64|  14.2k|    }
   65|  14.2k|    return day <= days_in_month;
   66|  14.2k|}
a_time_posix.c:is_valid_time:
   73|  14.2k|{
   74|  14.2k|    return hours >= 0 && minutes >= 0 && seconds >= 0 && hours <= 23 && minutes <= 59 && seconds <= 59;
  ------------------
  |  Branch (74:12): [True: 14.2k, False: 0]
  |  Branch (74:26): [True: 14.2k, False: 0]
  |  Branch (74:42): [True: 14.2k, False: 0]
  |  Branch (74:58): [True: 14.2k, False: 0]
  |  Branch (74:73): [True: 14.2k, False: 0]
  |  Branch (74:90): [True: 14.2k, False: 0]
  ------------------
   75|  14.2k|}

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

UTF8_putc:
   94|   407k|{
   95|   407k|    if (!str)
  ------------------
  |  Branch (95:9): [True: 203k, False: 204k]
  ------------------
   96|   203k|        len = 4; /* Maximum we will need */
   97|   204k|    else if (len <= 0)
  ------------------
  |  Branch (97:14): [True: 0, False: 204k]
  ------------------
   98|      0|        return -1;
   99|   407k|    if (value < 0x80) {
  ------------------
  |  Branch (99:9): [True: 407k, False: 0]
  ------------------
  100|   407k|        if (str)
  ------------------
  |  Branch (100:13): [True: 204k, False: 203k]
  ------------------
  101|   204k|            *str = (unsigned char)value;
  102|   407k|        return 1;
  103|   407k|    }
  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:
   34|   149k|{
   35|   149k|    int num = OSSL_NELEM(standard_methods);
  ------------------
  |  |   14|   149k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
   36|   149k|    return num;
   37|   149k|}
evp_pkey_asn1_get0:
   40|  1.67M|{
   41|  1.67M|    int num = OSSL_NELEM(standard_methods);
  ------------------
  |  |   14|  1.67M|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
   42|       |
   43|  1.67M|    if (idx < 0 || idx >= num)
  ------------------
  |  Branch (43:9): [True: 0, False: 1.67M]
  |  Branch (43:20): [True: 0, False: 1.67M]
  ------------------
   44|      0|        return NULL;
   45|       |
   46|  1.67M|    return standard_methods[idx];
   47|  1.67M|}
evp_pkey_asn1_find:
   67|   142k|{
   68|   142k|    const EVP_PKEY_ASN1_METHOD *t;
   69|       |
   70|   142k|    for (;;) {
   71|   142k|        t = pkey_asn1_find(type);
   72|   142k|        if (!t || !(t->pkey_flags & ASN1_PKEY_ALIAS))
  ------------------
  |  | 1501|  84.2k|#define ASN1_PKEY_ALIAS 0x1
  ------------------
  |  Branch (72:13): [True: 58.2k, False: 84.2k]
  |  Branch (72:19): [True: 84.2k, False: 0]
  ------------------
   73|   142k|            break;
   74|      0|        type = t->pkey_base_id;
   75|      0|    }
   76|   142k|    return t;
   77|   142k|}
evp_pkey_asn1_find_str:
   80|   149k|{
   81|   149k|    int i;
   82|   149k|    const EVP_PKEY_ASN1_METHOD *ameth = NULL;
   83|       |
   84|   149k|    if (len == -1)
  ------------------
  |  Branch (84:9): [True: 0, False: 149k]
  ------------------
   85|      0|        len = (int)strlen(str);
   86|  1.75M|    for (i = evp_pkey_asn1_get_count(); i-- > 0;) {
  ------------------
  |  Branch (86:41): [True: 1.67M, False: 83.7k]
  ------------------
   87|  1.67M|        ameth = evp_pkey_asn1_get0(i);
   88|  1.67M|        if (ameth->pkey_flags & ASN1_PKEY_ALIAS)
  ------------------
  |  | 1501|  1.67M|#define ASN1_PKEY_ALIAS 0x1
  ------------------
  |  Branch (88:13): [True: 484k, False: 1.18M]
  ------------------
   89|   484k|            continue;
   90|  1.18M|        if ((int)strlen(ameth->pem_str) == len
  ------------------
  |  Branch (90:13): [True: 72.8k, False: 1.11M]
  ------------------
   91|  72.8k|            && OPENSSL_strncasecmp(ameth->pem_str, str, len) == 0)
  ------------------
  |  Branch (91:16): [True: 65.5k, False: 7.25k]
  ------------------
   92|  65.5k|            return ameth;
   93|  1.18M|    }
   94|  83.7k|    return NULL;
   95|   149k|}
evp_pkey_asn1_get0_info:
  101|     15|{
  102|     15|    if (!ameth)
  ------------------
  |  Branch (102:9): [True: 0, False: 15]
  ------------------
  103|      0|        return 0;
  104|     15|    if (ppkey_id)
  ------------------
  |  Branch (104:9): [True: 15, False: 0]
  ------------------
  105|     15|        *ppkey_id = ameth->pkey_id;
  106|     15|    if (ppkey_base_id)
  ------------------
  |  Branch (106:9): [True: 15, False: 0]
  ------------------
  107|     15|        *ppkey_base_id = ameth->pkey_base_id;
  108|     15|    if (ppkey_flags)
  ------------------
  |  Branch (108:9): [True: 15, False: 0]
  ------------------
  109|     15|        *ppkey_flags = ameth->pkey_flags;
  110|     15|    if (pinfo)
  ------------------
  |  Branch (110:9): [True: 0, False: 15]
  ------------------
  111|      0|        *pinfo = ameth->info;
  112|     15|    if (ppem_str)
  ------------------
  |  Branch (112:9): [True: 15, False: 0]
  ------------------
  113|     15|        *ppem_str = ameth->pem_str;
  114|     15|    return 1;
  115|     15|}
ameth_lib.c:pkey_asn1_find:
   50|   142k|{
   51|   142k|    EVP_PKEY_ASN1_METHOD tmp;
   52|   142k|    const EVP_PKEY_ASN1_METHOD *t = &tmp, **ret;
   53|       |
   54|   142k|    tmp.pkey_id = type;
   55|   142k|    ret = OBJ_bsearch_ameth(&t, standard_methods, OSSL_NELEM(standard_methods));
  ------------------
  |  |   14|   142k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
   56|   142k|    if (ret == NULL || *ret == NULL)
  ------------------
  |  Branch (56:9): [True: 58.2k, False: 84.2k]
  |  Branch (56:24): [True: 0, False: 84.2k]
  ------------------
   57|  58.2k|        return NULL;
   58|  84.2k|    return *ret;
   59|   142k|}
ameth_lib.c:ameth_cmp:
   26|   420k|{
   27|   420k|    return ((*a)->pkey_id - (*b)->pkey_id);
   28|   420k|}

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

ASN1_get_object:
   48|   956k|{
   49|   956k|    int i, ret;
   50|   956k|    long len;
   51|   956k|    const unsigned char *p = *pp;
   52|   956k|    int tag, xclass, inf;
   53|   956k|    long max = omax;
   54|       |
   55|   956k|    if (omax <= 0) {
  ------------------
  |  Branch (55:9): [True: 0, False: 956k]
  ------------------
   56|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   57|      0|        return 0x80;
   58|      0|    }
   59|   956k|    ret = (*p & V_ASN1_CONSTRUCTED);
  ------------------
  |  |   54|   956k|#define V_ASN1_CONSTRUCTED 0x20
  ------------------
   60|   956k|    xclass = (*p & V_ASN1_PRIVATE);
  ------------------
  |  |   52|   956k|#define V_ASN1_PRIVATE 0xc0
  ------------------
   61|   956k|    i = *p & V_ASN1_PRIMITIVE_TAG;
  ------------------
  |  |   55|   956k|#define V_ASN1_PRIMITIVE_TAG 0x1f
  ------------------
   62|   956k|    if (i == V_ASN1_PRIMITIVE_TAG) { /* high-tag */
  ------------------
  |  |   55|   956k|#define V_ASN1_PRIMITIVE_TAG 0x1f
  ------------------
  |  Branch (62:9): [True: 0, False: 956k]
  ------------------
   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|   956k|    } else {
   81|   956k|        tag = i;
   82|   956k|        p++;
   83|   956k|        if (--max == 0)
  ------------------
  |  Branch (83:13): [True: 0, False: 956k]
  ------------------
   84|      0|            goto err;
   85|   956k|    }
   86|   956k|    *ptag = tag;
   87|   956k|    *pclass = xclass;
   88|   956k|    if (!asn1_get_length(&p, &inf, plength, max))
  ------------------
  |  Branch (88:9): [True: 0, False: 956k]
  ------------------
   89|      0|        goto err;
   90|       |
   91|   956k|    if (inf && !(ret & V_ASN1_CONSTRUCTED))
  ------------------
  |  |   54|      0|#define V_ASN1_CONSTRUCTED 0x20
  ------------------
  |  Branch (91:9): [True: 0, False: 956k]
  |  Branch (91:16): [True: 0, False: 0]
  ------------------
   92|      0|        goto err;
   93|       |
   94|   956k|    if (*plength > (omax - (p - *pp))) {
  ------------------
  |  Branch (94:9): [True: 25.5k, False: 930k]
  ------------------
   95|  25.5k|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  357|  25.5k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|  25.5k|    (ERR_new(),                                                  \
  |  |  |  |  360|  25.5k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|  25.5k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|  25.5k|        ERR_set_error)
  |  |  ------------------
  ------------------
   96|       |        /*
   97|       |         * Set this so that even if things are not long enough the values are
   98|       |         * set correctly
   99|       |         */
  100|  25.5k|        ret |= 0x80;
  101|  25.5k|    }
  102|   956k|    *pp = p;
  103|   956k|    return ret | inf;
  104|      0|err:
  105|       |    ERR_raise(ERR_LIB_ASN1, ASN1_R_HEADER_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  106|      0|    return 0x80;
  107|   956k|}
ASN1_put_object:
  162|   619k|{
  163|   619k|    unsigned char *p = *pp;
  164|   619k|    int i, ttag;
  165|       |
  166|   619k|    i = (constructed) ? V_ASN1_CONSTRUCTED : 0;
  ------------------
  |  |   54|   259k|#define V_ASN1_CONSTRUCTED 0x20
  ------------------
  |  Branch (166:9): [True: 259k, False: 360k]
  ------------------
  167|   619k|    i |= (xclass & V_ASN1_PRIVATE);
  ------------------
  |  |   52|   619k|#define V_ASN1_PRIVATE 0xc0
  ------------------
  168|   619k|    if (tag < 31) {
  ------------------
  |  Branch (168:9): [True: 619k, False: 0]
  ------------------
  169|   619k|        *(p++) = i | (tag & V_ASN1_PRIMITIVE_TAG);
  ------------------
  |  |   55|   619k|#define V_ASN1_PRIMITIVE_TAG 0x1f
  ------------------
  170|   619k|    } 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|   619k|    if (constructed == 2)
  ------------------
  |  Branch (183:9): [True: 0, False: 619k]
  ------------------
  184|      0|        *(p++) = 0x80;
  185|   619k|    else
  186|   619k|        asn1_put_length(&p, length);
  187|   619k|    *pp = p;
  188|   619k|}
ASN1_object_size:
  223|  2.01M|{
  224|  2.01M|    int ret = 1;
  225|       |
  226|  2.01M|    if (length < 0)
  ------------------
  |  Branch (226:9): [True: 0, False: 2.01M]
  ------------------
  227|      0|        return -1;
  228|  2.01M|    if (tag >= 31) {
  ------------------
  |  Branch (228:9): [True: 0, False: 2.01M]
  ------------------
  229|      0|        while (tag > 0) {
  ------------------
  |  Branch (229:16): [True: 0, False: 0]
  ------------------
  230|      0|            tag >>= 7;
  231|      0|            ret++;
  232|      0|        }
  233|      0|    }
  234|  2.01M|    if (constructed == 2) {
  ------------------
  |  Branch (234:9): [True: 0, False: 2.01M]
  ------------------
  235|      0|        ret += 3;
  236|  2.01M|    } else {
  237|  2.01M|        ret++;
  238|  2.01M|        if (length > 127) {
  ------------------
  |  Branch (238:13): [True: 172k, False: 1.84M]
  ------------------
  239|   172k|            int tmplen = length;
  240|   437k|            while (tmplen > 0) {
  ------------------
  |  Branch (240:20): [True: 265k, False: 172k]
  ------------------
  241|   265k|                tmplen >>= 8;
  242|   265k|                ret++;
  243|   265k|            }
  244|   172k|        }
  245|  2.01M|    }
  246|  2.01M|    if (ret >= INT_MAX - length)
  ------------------
  |  Branch (246:9): [True: 0, False: 2.01M]
  ------------------
  247|      0|        return -1;
  248|  2.01M|    return ret + length;
  249|  2.01M|}
ossl_asn1_string_set_bits_left:
  252|  58.2k|{
  253|  58.2k|    str->flags &= ~0x07;
  254|  58.2k|    str->flags |= ASN1_STRING_FLAG_BITS_LEFT | (num & 0x07);
  ------------------
  |  |   23|  58.2k|#define ASN1_STRING_FLAG_BITS_LEFT 0x08 /* Set if 0x07 has bits left value */
  ------------------
  255|  58.2k|}
ASN1_STRING_set:
  287|   196k|{
  288|   196k|    unsigned char *c;
  289|   196k|    const char *data = _data;
  290|   196k|    size_t len;
  291|       |
  292|   196k|    if (len_in < 0) {
  ------------------
  |  Branch (292:9): [True: 0, False: 196k]
  ------------------
  293|      0|        if (data == NULL)
  ------------------
  |  Branch (293:13): [True: 0, False: 0]
  ------------------
  294|      0|            return 0;
  295|      0|        len = strlen(data);
  296|   196k|    } else {
  297|   196k|        len = (size_t)len_in;
  298|   196k|    }
  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|   196k|    if (len > INT_MAX - 1) {
  ------------------
  |  Branch (304:9): [True: 0, False: 196k]
  ------------------
  305|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LARGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  306|      0|        return 0;
  307|      0|    }
  308|   196k|    if ((size_t)str->length <= len || str->data == NULL) {
  ------------------
  |  Branch (308:9): [True: 196k, False: 0]
  |  Branch (308:39): [True: 0, False: 0]
  ------------------
  309|   196k|        c = str->data;
  310|   196k|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
  311|       |        /* No NUL terminator in fuzzing builds */
  312|   196k|        str->data = OPENSSL_realloc(c, len != 0 ? len : 1);
  ------------------
  |  |  121|   392k|    CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (121:26): [True: 196k, False: 0]
  |  |  ------------------
  ------------------
  313|       |#else
  314|       |        str->data = OPENSSL_realloc(c, len + 1);
  315|       |#endif
  316|   196k|        if (str->data == NULL) {
  ------------------
  |  Branch (316:13): [True: 0, False: 196k]
  ------------------
  317|      0|            str->data = c;
  318|      0|            return 0;
  319|      0|        }
  320|   196k|    }
  321|   196k|    str->length = (int)len;
  322|   196k|    if (data != NULL) {
  ------------------
  |  Branch (322:9): [True: 166k, False: 29.3k]
  ------------------
  323|   166k|        memcpy(str->data, data, len);
  324|   166k|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
  325|       |        /* Set the unused byte to something non NUL and printable. */
  326|   166k|        if (len == 0)
  ------------------
  |  Branch (326:13): [True: 0, False: 166k]
  ------------------
  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|   166k|    }
  336|   196k|    return 1;
  337|   196k|}
ASN1_STRING_set0:
  340|  83.6k|{
  341|  83.6k|    OPENSSL_free(str->data);
  ------------------
  |  |  132|  83.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  342|  83.6k|    str->data = data;
  343|  83.6k|    str->length = len;
  344|  83.6k|}
ASN1_STRING_type_new:
  352|   203k|{
  353|   203k|    ASN1_STRING *ret;
  354|       |
  355|   203k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|   203k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  356|   203k|    if (ret == NULL)
  ------------------
  |  Branch (356:9): [True: 0, False: 203k]
  ------------------
  357|      0|        return NULL;
  358|   203k|    ret->type = type;
  359|   203k|    return ret;
  360|   203k|}
ossl_asn1_string_embed_free:
  363|   280k|{
  364|   280k|    if (a == NULL)
  ------------------
  |  Branch (364:9): [True: 0, False: 280k]
  ------------------
  365|      0|        return;
  366|   280k|    if (!(a->flags & ASN1_STRING_FLAG_NDEF))
  ------------------
  |  |   29|   280k|#define ASN1_STRING_FLAG_NDEF 0x010
  ------------------
  |  Branch (366:9): [True: 280k, False: 0]
  ------------------
  367|   280k|        OPENSSL_free(a->data);
  ------------------
  |  |  132|   280k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  368|   280k|    if (embed == 0)
  ------------------
  |  Branch (368:9): [True: 203k, False: 76.4k]
  ------------------
  369|   203k|        OPENSSL_free(a);
  ------------------
  |  |  132|   203k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  370|   280k|}
ASN1_STRING_free:
  373|  87.1k|{
  374|  87.1k|    if (a == NULL)
  ------------------
  |  Branch (374:9): [True: 43.6k, False: 43.4k]
  ------------------
  375|  43.6k|        return;
  376|  43.4k|    ossl_asn1_string_embed_free(a, a->flags & ASN1_STRING_FLAG_EMBED);
  ------------------
  |  |   44|  43.4k|#define ASN1_STRING_FLAG_EMBED 0x080
  ------------------
  377|  43.4k|}
ASN1_STRING_cmp:
  389|  3.55k|{
  390|  3.55k|    int i;
  391|       |
  392|  3.55k|    i = (a->length - b->length);
  393|  3.55k|    if (i == 0) {
  ------------------
  |  Branch (393:9): [True: 3.55k, False: 0]
  ------------------
  394|  3.55k|        if (a->length != 0)
  ------------------
  |  Branch (394:13): [True: 3.55k, False: 0]
  ------------------
  395|  3.55k|            i = memcmp(a->data, b->data, a->length);
  396|  3.55k|        if (i == 0)
  ------------------
  |  Branch (396:13): [True: 3.55k, False: 0]
  ------------------
  397|  3.55k|            return a->type - b->type;
  398|      0|        else
  399|      0|            return i;
  400|  3.55k|    } else {
  401|      0|        return i;
  402|      0|    }
  403|  3.55k|}
ASN1_STRING_length:
  406|  66.2k|{
  407|  66.2k|    return x->length;
  408|  66.2k|}
ASN1_STRING_type:
  418|  3.63k|{
  419|  3.63k|    return x->type;
  420|  3.63k|}
ASN1_STRING_get0_data:
  423|  65.3k|{
  424|  65.3k|    return x->data;
  425|  65.3k|}
asn1_lib.c:asn1_get_length:
  118|   956k|{
  119|   956k|    const unsigned char *p = *pp;
  120|   956k|    unsigned long ret = 0;
  121|   956k|    int i;
  122|       |
  123|   956k|    if (max-- < 1)
  ------------------
  |  Branch (123:9): [True: 0, False: 956k]
  ------------------
  124|      0|        return 0;
  125|   956k|    if (*p == 0x80) {
  ------------------
  |  Branch (125:9): [True: 0, False: 956k]
  ------------------
  126|      0|        *inf = 1;
  127|      0|        p++;
  128|   956k|    } else {
  129|   956k|        *inf = 0;
  130|   956k|        i = *p & 0x7f;
  131|   956k|        if (*p++ & 0x80) {
  ------------------
  |  Branch (131:13): [True: 43.9k, False: 912k]
  ------------------
  132|  43.9k|            if (max < i)
  ------------------
  |  Branch (132:17): [True: 0, False: 43.9k]
  ------------------
  133|      0|                return 0;
  134|       |            /* Skip leading zeroes */
  135|  43.9k|            while (i > 0 && *p == 0) {
  ------------------
  |  Branch (135:20): [True: 43.9k, False: 0]
  |  Branch (135:29): [True: 0, False: 43.9k]
  ------------------
  136|      0|                p++;
  137|      0|                i--;
  138|      0|            }
  139|  43.9k|            if (i > (int)sizeof(long))
  ------------------
  |  Branch (139:17): [True: 0, False: 43.9k]
  ------------------
  140|      0|                return 0;
  141|   109k|            while (i > 0) {
  ------------------
  |  Branch (141:20): [True: 65.7k, False: 43.9k]
  ------------------
  142|  65.7k|                ret <<= 8;
  143|  65.7k|                ret |= *p++;
  144|  65.7k|                i--;
  145|  65.7k|            }
  146|  43.9k|            if (ret > LONG_MAX)
  ------------------
  |  Branch (146:17): [True: 0, False: 43.9k]
  ------------------
  147|      0|                return 0;
  148|   912k|        } else {
  149|   912k|            ret = i;
  150|   912k|        }
  151|   956k|    }
  152|   956k|    *pp = p;
  153|   956k|    *rl = (long)ret;
  154|   956k|    return 1;
  155|   956k|}
asn1_lib.c:asn1_put_length:
  201|   619k|{
  202|   619k|    unsigned char *p = *pp;
  203|   619k|    int i, len;
  204|       |
  205|   619k|    if (length <= 127) {
  ------------------
  |  Branch (205:9): [True: 554k, False: 64.6k]
  ------------------
  206|   554k|        *(p++) = (unsigned char)length;
  207|   554k|    } else {
  208|  64.6k|        len = length;
  209|   165k|        for (i = 0; len > 0; i++)
  ------------------
  |  Branch (209:21): [True: 100k, False: 64.6k]
  ------------------
  210|   100k|            len >>= 8;
  211|  64.6k|        *(p++) = i | 0x80;
  212|  64.6k|        len = i;
  213|   165k|        while (i-- > 0) {
  ------------------
  |  Branch (213:16): [True: 100k, False: 64.6k]
  ------------------
  214|   100k|            p[i] = length & 0xff;
  215|   100k|            length >>= 8;
  216|   100k|        }
  217|  64.6k|        p += len;
  218|  64.6k|    }
  219|   619k|    *pp = p;
  220|   619k|}

PKCS8_pkey_get0:
   74|  11.2k|{
   75|  11.2k|    if (ppkalg)
  ------------------
  |  Branch (75:9): [True: 0, False: 11.2k]
  ------------------
   76|      0|        *ppkalg = p8->pkeyalg->algorithm;
   77|  11.2k|    if (pk) {
  ------------------
  |  Branch (77:9): [True: 3.73k, False: 7.46k]
  ------------------
   78|  3.73k|        *pk = ASN1_STRING_get0_data(p8->pkey);
   79|  3.73k|        *ppklen = ASN1_STRING_length(p8->pkey);
   80|  3.73k|    }
   81|  11.2k|    if (pa)
  ------------------
  |  Branch (81:9): [True: 11.2k, False: 0]
  ------------------
   82|  11.2k|        *pa = p8->pkeyalg;
   83|  11.2k|    return 1;
   84|  11.2k|}
p8_pkey.c:pkey_cb:
   19|  44.8k|{
   20|  44.8k|    PKCS8_PRIV_KEY_INFO *key;
   21|  44.8k|    int version;
   22|       |
   23|  44.8k|    switch (operation) {
  ------------------
  |  Branch (23:13): [True: 14.9k, False: 29.8k]
  ------------------
   24|  7.46k|    case ASN1_OP_FREE_PRE:
  ------------------
  |  |  733|  7.46k|#define ASN1_OP_FREE_PRE 2
  ------------------
  |  Branch (24:5): [True: 7.46k, False: 37.3k]
  ------------------
   25|       |        /* The structure is still valid during ASN1_OP_FREE_PRE */
   26|  7.46k|        key = (PKCS8_PRIV_KEY_INFO *)*pval;
   27|  7.46k|        if (key->pkey)
  ------------------
  |  Branch (27:13): [True: 7.46k, False: 0]
  ------------------
   28|  7.46k|            OPENSSL_cleanse(key->pkey->data, key->pkey->length);
   29|  7.46k|        break;
   30|  7.46k|    case ASN1_OP_D2I_POST:
  ------------------
  |  |  736|  7.46k|#define ASN1_OP_D2I_POST 5
  ------------------
  |  Branch (30:5): [True: 7.46k, False: 37.3k]
  ------------------
   31|       |        /* Insist on a valid version now that the structure is decoded */
   32|  7.46k|        key = (PKCS8_PRIV_KEY_INFO *)*pval;
   33|  7.46k|        version = ASN1_INTEGER_get(key->version);
   34|  7.46k|        if (version < 0 || version > 1)
  ------------------
  |  Branch (34:13): [True: 0, False: 7.46k]
  |  Branch (34:28): [True: 0, False: 7.46k]
  ------------------
   35|      0|            return 0;
   36|  7.46k|        if (version == 0 && key->kpub != NULL)
  ------------------
  |  Branch (36:13): [True: 7.46k, False: 0]
  |  Branch (36:29): [True: 0, False: 7.46k]
  ------------------
   37|      0|            return 0;
   38|  7.46k|        break;
   39|  44.8k|    }
   40|  44.8k|    return 1;
   41|  44.8k|}

ASN1_tag2bit:
  106|  65.5k|{
  107|  65.5k|    if ((tag < 0) || (tag > 30))
  ------------------
  |  Branch (107:9): [True: 0, False: 65.5k]
  |  Branch (107:22): [True: 0, False: 65.5k]
  ------------------
  108|      0|        return 0;
  109|  65.5k|    return tag2bit[tag];
  110|  65.5k|}
ASN1_item_ex_d2i:
  153|  21.8k|{
  154|  21.8k|    return asn1_item_ex_d2i_intern(pval, in, len, it, tag, aclass, opt, ctx,
  155|  21.8k|        NULL, NULL);
  156|  21.8k|}
ASN1_item_d2i_ex:
  162|   108k|{
  163|   108k|    ASN1_TLC c;
  164|   108k|    ASN1_VALUE *ptmpval = NULL;
  165|       |
  166|   108k|    if (pval == NULL)
  ------------------
  |  Branch (166:9): [True: 79.9k, False: 29.0k]
  ------------------
  167|  79.9k|        pval = &ptmpval;
  168|   108k|    asn1_tlc_clear_nc(&c);
  ------------------
  |  |  121|   108k|    do {                     \
  |  |  122|   108k|        (c)->valid = 0;      \
  |  |  123|   108k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (123:14): [Folded, False: 108k]
  |  |  ------------------
  ------------------
  169|   108k|    if (asn1_item_ex_d2i_intern(pval, in, len, it, -1, 0, 0, &c, libctx,
  ------------------
  |  Branch (169:9): [True: 105k, False: 3.73k]
  ------------------
  170|   108k|            propq)
  171|   108k|        > 0)
  172|   105k|        return *pval;
  173|  3.73k|    return NULL;
  174|   108k|}
ASN1_item_d2i:
  179|  98.0k|{
  180|  98.0k|    return ASN1_item_d2i_ex(pval, in, len, it, NULL, NULL);
  181|  98.0k|}
asn1_item_embed_d2i:
  193|   934k|{
  194|   934k|    const ASN1_TEMPLATE *tt, *errtt = NULL;
  195|   934k|    const ASN1_EXTERN_FUNCS *ef;
  196|   934k|    const ASN1_AUX *aux;
  197|   934k|    ASN1_aux_cb *asn1_cb;
  198|   934k|    const unsigned char *p = NULL, *q;
  199|   934k|    unsigned char oclass;
  200|   934k|    char seq_eoc, seq_nolen, cst, isopt;
  201|   934k|    long tmplen;
  202|   934k|    int i;
  203|   934k|    int otag;
  204|   934k|    int ret = 0;
  205|   934k|    ASN1_VALUE **pchptr;
  206|       |
  207|   934k|    if (pval == NULL || it == NULL) {
  ------------------
  |  Branch (207:9): [True: 0, False: 934k]
  |  Branch (207:25): [True: 0, False: 934k]
  ------------------
  208|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  209|      0|        return 0;
  210|      0|    }
  211|   934k|    if (len <= 0) {
  ------------------
  |  Branch (211:9): [True: 0, False: 934k]
  ------------------
  212|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  213|      0|        return 0;
  214|      0|    }
  215|   934k|    aux = it->funcs;
  216|   934k|    if (aux && aux->asn1_cb)
  ------------------
  |  Branch (216:9): [True: 119k, False: 815k]
  |  Branch (216:16): [True: 65.1k, False: 54.5k]
  ------------------
  217|  65.1k|        asn1_cb = aux->asn1_cb;
  218|   869k|    else
  219|   869k|        asn1_cb = 0;
  220|       |
  221|   934k|    if (++depth > ASN1_MAX_CONSTRUCTED_NEST) {
  ------------------
  |  |   27|   934k|#define ASN1_MAX_CONSTRUCTED_NEST 30
  ------------------
  |  Branch (221:9): [True: 0, False: 934k]
  ------------------
  222|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_NESTED_TOO_DEEP);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  223|      0|        goto err;
  224|      0|    }
  225|       |
  226|   934k|    switch (it->itype) {
  227|   595k|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|   595k|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (227:5): [True: 595k, False: 338k]
  ------------------
  228|   595k|        if (it->templates) {
  ------------------
  |  Branch (228:13): [True: 54.4k, False: 541k]
  ------------------
  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|  54.4k|            if ((tag != -1) || opt) {
  ------------------
  |  Branch (235:17): [True: 0, False: 54.4k]
  |  Branch (235:32): [True: 0, False: 54.4k]
  ------------------
  236|      0|                ERR_raise(ERR_LIB_ASN1,
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  237|      0|                    ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE);
  238|      0|                goto err;
  239|      0|            }
  240|  54.4k|            return asn1_template_ex_d2i(pval, in, len, it->templates, opt, ctx,
  241|  54.4k|                depth, libctx, propq);
  242|  54.4k|        }
  243|   541k|        return asn1_d2i_ex_primitive(pval, in, len, it,
  244|   541k|            tag, aclass, opt, ctx);
  245|       |
  246|  43.6k|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  43.6k|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (246:5): [True: 43.6k, False: 891k]
  ------------------
  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|  43.6k|        if (tag != -1) {
  ------------------
  |  Branch (251:13): [True: 0, False: 43.6k]
  ------------------
  252|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BAD_TEMPLATE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  253|      0|            goto err;
  254|      0|        }
  255|       |
  256|  43.6k|        p = *in;
  257|       |        /* Just read in tag and class */
  258|  43.6k|        ret = asn1_check_tlen(NULL, &otag, &oclass, NULL, NULL,
  259|  43.6k|            &p, len, -1, 0, 1, ctx);
  260|  43.6k|        if (!ret) {
  ------------------
  |  Branch (260:13): [True: 0, False: 43.6k]
  ------------------
  261|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  262|      0|            goto err;
  263|      0|        }
  264|       |
  265|       |        /* Must be UNIVERSAL class */
  266|  43.6k|        if (oclass != V_ASN1_UNIVERSAL) {
  ------------------
  |  |   49|  43.6k|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  |  Branch (266:13): [True: 0, False: 43.6k]
  ------------------
  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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  271|      0|            goto err;
  272|      0|        }
  273|       |
  274|       |        /* Check tag matches bit map */
  275|  43.6k|        if (!(ASN1_tag2bit(otag) & it->utype)) {
  ------------------
  |  Branch (275:13): [True: 0, False: 43.6k]
  ------------------
  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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  280|      0|            goto err;
  281|      0|        }
  282|  43.6k|        return asn1_d2i_ex_primitive(pval, in, len, it, otag, 0, 0, ctx);
  283|       |
  284|  43.6k|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|  43.6k|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (284:5): [True: 43.6k, False: 891k]
  ------------------
  285|       |        /* Use new style d2i */
  286|  43.6k|        ef = it->funcs;
  287|  43.6k|        if (ef->asn1_ex_d2i_ex != NULL)
  ------------------
  |  Branch (287:13): [True: 21.8k, False: 21.8k]
  ------------------
  288|  21.8k|            return ef->asn1_ex_d2i_ex(pval, in, len, it, tag, aclass, opt, ctx,
  289|  21.8k|                libctx, propq);
  290|  21.8k|        return ef->asn1_ex_d2i(pval, in, len, it, tag, aclass, opt, ctx);
  291|       |
  292|      0|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|      0|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (292:5): [True: 0, False: 934k]
  ------------------
  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|      0|        if (tag != -1) {
  ------------------
  |  Branch (297:13): [True: 0, False: 0]
  ------------------
  298|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BAD_TEMPLATE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  299|      0|            goto err;
  300|      0|        }
  301|       |
  302|      0|        if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL))
  ------------------
  |  |  735|      0|#define ASN1_OP_D2I_PRE 4
  ------------------
  |  Branch (302:13): [True: 0, False: 0]
  |  Branch (302:24): [True: 0, False: 0]
  ------------------
  303|      0|            goto auxerr;
  304|      0|        if (*pval) {
  ------------------
  |  Branch (304:13): [True: 0, False: 0]
  ------------------
  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|      0|        } else if (!ossl_asn1_item_ex_new_intern(pval, it, libctx, propq)) {
  ------------------
  |  Branch (313:20): [True: 0, False: 0]
  ------------------
  314|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  315|      0|            goto err;
  316|      0|        }
  317|       |        /* CHOICE type, try each possibility in turn */
  318|      0|        p = *in;
  319|      0|        for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
  ------------------
  |  Branch (319:41): [True: 0, False: 0]
  ------------------
  320|      0|            pchptr = ossl_asn1_get_field_ptr(pval, tt);
  321|       |            /*
  322|       |             * We mark field as OPTIONAL so its absence can be recognised.
  323|       |             */
  324|      0|            ret = asn1_template_ex_d2i(pchptr, &p, len, tt, 1, ctx, depth,
  325|      0|                libctx, propq);
  326|       |            /* If field not present, try the next one */
  327|      0|            if (ret == -1)
  ------------------
  |  Branch (327:17): [True: 0, False: 0]
  ------------------
  328|      0|                continue;
  329|       |            /* If positive return, read OK, break loop */
  330|      0|            if (ret > 0)
  ------------------
  |  Branch (330:17): [True: 0, False: 0]
  ------------------
  331|      0|                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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  339|      0|            goto err;
  340|      0|        }
  341|       |
  342|       |        /* Did we fall off the end without reading anything? */
  343|      0|        if (i == it->tcount) {
  ------------------
  |  Branch (343:13): [True: 0, False: 0]
  ------------------
  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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  351|      0|            goto err;
  352|      0|        }
  353|       |
  354|      0|        ossl_asn1_set_choice_selector(pval, i, it);
  355|       |
  356|      0|        if (asn1_cb && !asn1_cb(ASN1_OP_D2I_POST, pval, it, NULL))
  ------------------
  |  |  736|      0|#define ASN1_OP_D2I_POST 5
  ------------------
  |  Branch (356:13): [True: 0, False: 0]
  |  Branch (356:24): [True: 0, False: 0]
  ------------------
  357|      0|            goto auxerr;
  358|      0|        *in = p;
  359|      0|        return 1;
  360|       |
  361|      0|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|      0|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (361:5): [True: 0, False: 934k]
  ------------------
  362|   251k|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|   251k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (362:5): [True: 251k, False: 683k]
  ------------------
  363|   251k|        p = *in;
  364|   251k|        tmplen = len;
  365|       |
  366|       |        /* If no IMPLICIT tagging set to SEQUENCE, UNIVERSAL */
  367|   251k|        if (tag == -1) {
  ------------------
  |  Branch (367:13): [True: 251k, False: 0]
  ------------------
  368|   251k|            tag = V_ASN1_SEQUENCE;
  ------------------
  |  |   76|   251k|#define V_ASN1_SEQUENCE 16
  ------------------
  369|   251k|            aclass = V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|   251k|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  370|   251k|        }
  371|       |        /* Get SEQUENCE length and update len, p */
  372|   251k|        ret = asn1_check_tlen(&len, NULL, NULL, &seq_eoc, &cst,
  373|   251k|            &p, len, tag, aclass, opt, ctx);
  374|   251k|        if (!ret) {
  ------------------
  |  Branch (374:13): [True: 3.73k, False: 247k]
  ------------------
  375|  3.73k|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|  3.73k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|  3.73k|    (ERR_new(),                                                  \
  |  |  |  |  360|  3.73k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|  3.73k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|  3.73k|        ERR_set_error)
  |  |  ------------------
  ------------------
  376|  3.73k|            goto err;
  377|   247k|        } else if (ret == -1)
  ------------------
  |  Branch (377:20): [True: 0, False: 247k]
  ------------------
  378|      0|            return -1;
  379|   247k|        if (aux && (aux->flags & ASN1_AFLG_BROKEN)) {
  ------------------
  |  |  725|  29.3k|#define ASN1_AFLG_BROKEN 4
  ------------------
  |  Branch (379:13): [True: 29.3k, False: 218k]
  |  Branch (379:20): [True: 0, False: 29.3k]
  ------------------
  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|   247k|        else
  385|   247k|            seq_nolen = seq_eoc;
  386|   247k|        if (!cst) {
  ------------------
  |  Branch (386:13): [True: 0, False: 247k]
  ------------------
  387|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_SEQUENCE_NOT_CONSTRUCTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  388|      0|            goto err;
  389|      0|        }
  390|       |
  391|   247k|        if (*pval == NULL
  ------------------
  |  Branch (391:13): [True: 134k, False: 112k]
  ------------------
  392|   134k|            && !ossl_asn1_item_ex_new_intern(pval, it, libctx, propq)) {
  ------------------
  |  Branch (392:16): [True: 0, False: 134k]
  ------------------
  393|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  394|      0|            goto err;
  395|      0|        }
  396|       |
  397|   247k|        if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL))
  ------------------
  |  |  735|  18.3k|#define ASN1_OP_D2I_PRE 4
  ------------------
  |  Branch (397:13): [True: 18.3k, False: 229k]
  |  Branch (397:24): [True: 0, False: 18.3k]
  ------------------
  398|      0|            goto auxerr;
  399|       |
  400|       |        /* Free up and zero any ADB found */
  401|  1.10M|        for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
  ------------------
  |  Branch (401:41): [True: 861k, False: 247k]
  ------------------
  402|   861k|            if (tt->flags & ASN1_TFLG_ADB_MASK) {
  ------------------
  |  |  572|   861k|#define ASN1_TFLG_ADB_MASK (0x3 << 8)
  ------------------
  |  Branch (402:17): [True: 0, False: 861k]
  ------------------
  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|   861k|        }
  412|       |
  413|       |        /* Get each field entry */
  414|  1.02M|        for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
  ------------------
  |  Branch (414:41): [True: 838k, False: 185k]
  ------------------
  415|   838k|            const ASN1_TEMPLATE *seqtt;
  416|   838k|            ASN1_VALUE **pseqval;
  417|   838k|            seqtt = ossl_asn1_do_adb(*pval, tt, 1);
  418|   838k|            if (seqtt == NULL)
  ------------------
  |  Branch (418:17): [True: 0, False: 838k]
  ------------------
  419|      0|                goto err;
  420|   838k|            pseqval = ossl_asn1_get_field_ptr(pval, seqtt);
  421|       |            /* Have we ran out of data? */
  422|   838k|            if (!len)
  ------------------
  |  Branch (422:17): [True: 58.1k, False: 780k]
  ------------------
  423|  58.1k|                break;
  424|   780k|            q = p;
  425|   780k|            if (asn1_check_eoc(&p, len)) {
  ------------------
  |  Branch (425:17): [True: 0, False: 780k]
  ------------------
  426|      0|                if (!seq_eoc) {
  ------------------
  |  Branch (426:21): [True: 0, False: 0]
  ------------------
  427|      0|                    ERR_raise(ERR_LIB_ASN1, ASN1_R_UNEXPECTED_EOC);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      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|   780k|            if (i == (it->tcount - 1))
  ------------------
  |  Branch (440:17): [True: 185k, False: 594k]
  ------------------
  441|   185k|                isopt = 0;
  442|   594k|            else
  443|   594k|                isopt = (char)(seqtt->flags & ASN1_TFLG_OPTIONAL);
  ------------------
  |  |  512|   594k|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  444|       |            /*
  445|       |             * attempt to read in field, allowing each to be OPTIONAL
  446|       |             */
  447|       |
  448|   780k|            ret = asn1_template_ex_d2i(pseqval, &p, len, seqtt, isopt, ctx,
  449|   780k|                depth, libctx, propq);
  450|   780k|            if (!ret) {
  ------------------
  |  Branch (450:17): [True: 3.73k, False: 777k]
  ------------------
  451|  3.73k|                errtt = seqtt;
  452|  3.73k|                goto err;
  453|   777k|            } else if (ret == -1) {
  ------------------
  |  Branch (453:24): [True: 158k, False: 618k]
  ------------------
  454|       |                /*
  455|       |                 * OPTIONAL component absent. Free and zero the field.
  456|       |                 */
  457|   158k|                ossl_asn1_template_free(pseqval, seqtt);
  458|   158k|                continue;
  459|   158k|            }
  460|       |            /* Update length */
  461|   618k|            len -= (long)(p - q);
  462|   618k|        }
  463|       |
  464|       |        /* Check for EOC if expecting one */
  465|   243k|        if (seq_eoc && !asn1_check_eoc(&p, len)) {
  ------------------
  |  Branch (465:13): [True: 0, False: 243k]
  |  Branch (465:24): [True: 0, False: 0]
  ------------------
  466|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_MISSING_EOC);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  467|      0|            goto err;
  468|      0|        }
  469|       |        /* Check all data read */
  470|   243k|        if (!seq_nolen && len) {
  ------------------
  |  Branch (470:13): [True: 243k, False: 0]
  |  Branch (470:27): [True: 0, False: 243k]
  ------------------
  471|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_SEQUENCE_LENGTH_MISMATCH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      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|   320k|        for (; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (480:16): [True: 76.4k, False: 243k]
  ------------------
  481|  76.4k|            const ASN1_TEMPLATE *seqtt;
  482|  76.4k|            seqtt = ossl_asn1_do_adb(*pval, tt, 1);
  483|  76.4k|            if (seqtt == NULL)
  ------------------
  |  Branch (483:17): [True: 0, False: 76.4k]
  ------------------
  484|      0|                goto err;
  485|  76.4k|            if (seqtt->flags & ASN1_TFLG_OPTIONAL) {
  ------------------
  |  |  512|  76.4k|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (485:17): [True: 76.4k, False: 0]
  ------------------
  486|  76.4k|                ASN1_VALUE **pseqval;
  487|  76.4k|                pseqval = ossl_asn1_get_field_ptr(pval, seqtt);
  488|  76.4k|                ossl_asn1_template_free(pseqval, seqtt);
  489|  76.4k|            } else {
  490|      0|                errtt = seqtt;
  491|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_FIELD_MISSING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  492|      0|                goto err;
  493|      0|            }
  494|  76.4k|        }
  495|       |        /* Save encoding */
  496|   243k|        if (!ossl_asn1_enc_save(pval, *in, (long)(p - *in), it))
  ------------------
  |  Branch (496:13): [True: 0, False: 243k]
  ------------------
  497|      0|            goto auxerr;
  498|   243k|        if (asn1_cb && !asn1_cb(ASN1_OP_D2I_POST, pval, it, NULL))
  ------------------
  |  |  736|  18.3k|#define ASN1_OP_D2I_POST 5
  ------------------
  |  Branch (498:13): [True: 18.3k, False: 225k]
  |  Branch (498:24): [True: 0, False: 18.3k]
  ------------------
  499|      0|            goto auxerr;
  500|   243k|        *in = p;
  501|   243k|        return 1;
  502|       |
  503|      0|    default:
  ------------------
  |  Branch (503:5): [True: 0, False: 934k]
  ------------------
  504|      0|        return 0;
  505|   934k|    }
  506|      0|auxerr:
  507|      0|    ERR_raise(ERR_LIB_ASN1, ASN1_R_AUX_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  508|  7.46k|err:
  509|  7.46k|    if (errtt)
  ------------------
  |  Branch (509:9): [True: 3.73k, False: 3.73k]
  ------------------
  510|  3.73k|        ERR_add_error_data(4, "Field=", errtt->field_name,
  511|  3.73k|            ", Type=", it->sname);
  512|  3.73k|    else
  513|  3.73k|        ERR_add_error_data(2, "Type=", it->sname);
  514|  7.46k|    return 0;
  515|      0|}
tasn_dec.c:asn1_item_ex_d2i_intern:
  136|   130k|{
  137|   130k|    int rv;
  138|       |
  139|   130k|    if (pval == NULL || it == NULL) {
  ------------------
  |  Branch (139:9): [True: 0, False: 130k]
  |  Branch (139:25): [True: 0, False: 130k]
  ------------------
  140|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  141|      0|        return 0;
  142|      0|    }
  143|   130k|    rv = asn1_item_embed_d2i(pval, in, len, it, tag, aclass, opt, ctx, 0,
  144|   130k|        libctx, propq);
  145|   130k|    if (rv <= 0)
  ------------------
  |  Branch (145:9): [True: 3.73k, False: 127k]
  ------------------
  146|  3.73k|        ASN1_item_ex_free(pval, it);
  147|   130k|    return rv;
  148|   130k|}
tasn_dec.c:asn1_template_ex_d2i:
  527|   835k|{
  528|   835k|    int flags, aclass;
  529|   835k|    int ret;
  530|   835k|    long len;
  531|   835k|    const unsigned char *p, *q;
  532|   835k|    char exp_eoc;
  533|   835k|    if (!val)
  ------------------
  |  Branch (533:9): [True: 0, False: 835k]
  ------------------
  534|      0|        return 0;
  535|   835k|    flags = tt->flags;
  536|   835k|    aclass = flags & ASN1_TFLG_TAG_CLASS;
  ------------------
  |  |  564|   835k|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  537|       |
  538|   835k|    p = *in;
  539|       |
  540|       |    /* Check if EXPLICIT tag expected */
  541|   835k|    if (flags & ASN1_TFLG_EXPTAG) {
  ------------------
  |  |  539|   835k|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (541:9): [True: 165k, False: 669k]
  ------------------
  542|   165k|        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|   165k|        ret = asn1_check_tlen(&len, NULL, NULL, &exp_eoc, &cst,
  548|   165k|            &p, inlen, tt->tag, aclass, opt, ctx);
  549|   165k|        q = p;
  550|   165k|        if (!ret) {
  ------------------
  |  Branch (550:13): [True: 0, False: 165k]
  ------------------
  551|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  552|      0|            return 0;
  553|   165k|        } else if (ret == -1)
  ------------------
  |  Branch (553:20): [True: 96.9k, False: 68.5k]
  ------------------
  554|  96.9k|            return -1;
  555|  68.5k|        if (!cst) {
  ------------------
  |  Branch (555:13): [True: 0, False: 68.5k]
  ------------------
  556|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  557|      0|            return 0;
  558|      0|        }
  559|       |        /* We've found the field so it can't be OPTIONAL now */
  560|  68.5k|        ret = asn1_template_noexp_d2i(val, &p, len, tt, 0, ctx, depth, libctx,
  561|  68.5k|            propq);
  562|  68.5k|        if (!ret) {
  ------------------
  |  Branch (562:13): [True: 0, False: 68.5k]
  ------------------
  563|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  564|      0|            return 0;
  565|      0|        }
  566|       |        /* We read the field in OK so update length */
  567|  68.5k|        len -= (long)(p - q);
  568|  68.5k|        if (exp_eoc) {
  ------------------
  |  Branch (568:13): [True: 0, False: 68.5k]
  ------------------
  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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  572|      0|                goto err;
  573|      0|            }
  574|  68.5k|        } else {
  575|       |            /*
  576|       |             * Otherwise we must hit the EXPLICIT tag end or its an error
  577|       |             */
  578|  68.5k|            if (len) {
  ------------------
  |  Branch (578:17): [True: 0, False: 68.5k]
  ------------------
  579|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_EXPLICIT_LENGTH_MISMATCH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  580|      0|                goto err;
  581|      0|            }
  582|  68.5k|        }
  583|  68.5k|    } else
  584|   669k|        return asn1_template_noexp_d2i(val, in, inlen, tt, opt, ctx, depth,
  585|   669k|            libctx, propq);
  586|       |
  587|  68.5k|    *in = p;
  588|  68.5k|    return 1;
  589|       |
  590|      0|err:
  591|      0|    return 0;
  592|   835k|}
tasn_dec.c:asn1_template_noexp_d2i:
  599|   738k|{
  600|   738k|    int flags, aclass;
  601|   738k|    int ret;
  602|   738k|    ASN1_VALUE *tval;
  603|   738k|    const unsigned char *p, *q;
  604|   738k|    if (!val)
  ------------------
  |  Branch (604:9): [True: 0, False: 738k]
  ------------------
  605|      0|        return 0;
  606|   738k|    flags = tt->flags;
  607|   738k|    aclass = flags & ASN1_TFLG_TAG_CLASS;
  ------------------
  |  |  564|   738k|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  608|       |
  609|   738k|    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|   738k|    if (tt->flags & ASN1_TFLG_EMBED) {
  ------------------
  |  |  586|   738k|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  |  Branch (615:9): [True: 166k, False: 571k]
  ------------------
  616|   166k|        tval = (ASN1_VALUE *)val;
  617|   166k|        val = &tval;
  618|   166k|    }
  619|       |
  620|   738k|    if (flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|   738k|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (620:9): [True: 65.4k, False: 673k]
  ------------------
  621|       |        /* SET OF, SEQUENCE OF */
  622|  65.4k|        int sktag, skaclass;
  623|  65.4k|        char sk_eoc;
  624|       |        /* First work out expected inner tag value */
  625|  65.4k|        if (flags & ASN1_TFLG_IMPTAG) {
  ------------------
  |  |  536|  65.4k|#define ASN1_TFLG_IMPTAG (0x1 << 3)
  ------------------
  |  Branch (625:13): [True: 0, False: 65.4k]
  ------------------
  626|      0|            sktag = tt->tag;
  627|      0|            skaclass = aclass;
  628|  65.4k|        } else {
  629|  65.4k|            skaclass = V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  65.4k|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  630|  65.4k|            if (flags & ASN1_TFLG_SET_OF)
  ------------------
  |  |  515|  65.4k|#define ASN1_TFLG_SET_OF (0x1 << 1)
  ------------------
  |  Branch (630:17): [True: 21.8k, False: 43.5k]
  ------------------
  631|  21.8k|                sktag = V_ASN1_SET;
  ------------------
  |  |   77|  21.8k|#define V_ASN1_SET 17
  ------------------
  632|  43.5k|            else
  633|  43.5k|                sktag = V_ASN1_SEQUENCE;
  ------------------
  |  |   76|  43.5k|#define V_ASN1_SEQUENCE 16
  ------------------
  634|  65.4k|        }
  635|       |        /* Get the tag */
  636|  65.4k|        ret = asn1_check_tlen(&len, NULL, NULL, &sk_eoc, NULL,
  637|  65.4k|            &p, len, sktag, skaclass, opt, ctx);
  638|  65.4k|        if (!ret) {
  ------------------
  |  Branch (638:13): [True: 0, False: 65.4k]
  ------------------
  639|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  640|      0|            return 0;
  641|  65.4k|        } else if (ret == -1)
  ------------------
  |  Branch (641:20): [True: 0, False: 65.4k]
  ------------------
  642|      0|            return -1;
  643|  65.4k|        if (*val == NULL)
  ------------------
  |  Branch (643:13): [True: 65.4k, False: 0]
  ------------------
  644|  65.4k|            *val = (ASN1_VALUE *)sk_ASN1_VALUE_new_null();
  ------------------
  |  |  890|  65.4k|#define sk_ASN1_VALUE_new_null() ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_ASN1_VALUE_freefunc_thunk))
  ------------------
  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));
  ------------------
  |  |  394|      0|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  654|      0|            }
  655|      0|        }
  656|       |
  657|  65.4k|        if (*val == NULL) {
  ------------------
  |  Branch (657:13): [True: 0, False: 65.4k]
  ------------------
  658|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  659|      0|            goto err;
  660|      0|        }
  661|       |
  662|       |        /* Read as many items as we can */
  663|   174k|        while (len > 0) {
  ------------------
  |  Branch (663:16): [True: 109k, False: 65.4k]
  ------------------
  664|   109k|            ASN1_VALUE *skfield;
  665|   109k|            q = p;
  666|       |            /* See if EOC found */
  667|   109k|            if (asn1_check_eoc(&p, len)) {
  ------------------
  |  Branch (667:17): [True: 0, False: 109k]
  ------------------
  668|      0|                if (!sk_eoc) {
  ------------------
  |  Branch (668:21): [True: 0, False: 0]
  ------------------
  669|      0|                    ERR_raise(ERR_LIB_ASN1, ASN1_R_UNEXPECTED_EOC);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      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|   109k|            skfield = NULL;
  677|   109k|            if (asn1_item_embed_d2i(&skfield, &p, len,
  ------------------
  |  Branch (677:17): [True: 0, False: 109k]
  ------------------
  678|   109k|                    ASN1_ITEM_ptr(tt->item), -1, 0, 0, ctx,
  ------------------
  |  |  394|   109k|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  679|   109k|                    depth, libctx, propq)
  680|   109k|                <= 0) {
  681|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  682|       |                /* |skfield| may be partially allocated despite failure. */
  683|      0|                ASN1_item_free(skfield, ASN1_ITEM_ptr(tt->item));
  ------------------
  |  |  394|      0|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  684|      0|                goto err;
  685|      0|            }
  686|   109k|            len -= (long)(p - q);
  687|   109k|            if (!sk_ASN1_VALUE_push((STACK_OF(ASN1_VALUE) *)*val, skfield)) {
  ------------------
  |  |  897|   109k|#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: 109k]
  ------------------
  688|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  689|      0|                ASN1_item_free(skfield, ASN1_ITEM_ptr(tt->item));
  ------------------
  |  |  394|      0|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  690|      0|                goto err;
  691|      0|            }
  692|   109k|        }
  693|  65.4k|        if (sk_eoc) {
  ------------------
  |  Branch (693:13): [True: 0, False: 65.4k]
  ------------------
  694|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_MISSING_EOC);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  695|      0|            goto err;
  696|      0|        }
  697|   673k|    } else if (flags & ASN1_TFLG_IMPTAG) {
  ------------------
  |  |  536|   673k|#define ASN1_TFLG_IMPTAG (0x1 << 3)
  ------------------
  |  Branch (697:16): [True: 39.8k, False: 633k]
  ------------------
  698|       |        /* IMPLICIT tagging */
  699|  39.8k|        ret = asn1_item_embed_d2i(val, &p, len,
  700|  39.8k|            ASN1_ITEM_ptr(tt->item), tt->tag, aclass, opt,
  ------------------
  |  |  394|  39.8k|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  701|  39.8k|            ctx, depth, libctx, propq);
  702|  39.8k|        if (!ret) {
  ------------------
  |  Branch (702:13): [True: 0, False: 39.8k]
  ------------------
  703|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  704|      0|            goto err;
  705|  39.8k|        } else if (ret == -1)
  ------------------
  |  Branch (705:20): [True: 29.0k, False: 10.8k]
  ------------------
  706|  29.0k|            return -1;
  707|   633k|    } else {
  708|       |        /* Nothing special */
  709|   633k|        ret = asn1_item_embed_d2i(val, &p, len, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  394|   633k|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  710|   633k|            -1, 0, opt, ctx, depth, libctx, propq);
  711|   633k|        if (!ret) {
  ------------------
  |  Branch (711:13): [True: 3.73k, False: 629k]
  ------------------
  712|  3.73k|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|  3.73k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|  3.73k|    (ERR_new(),                                                  \
  |  |  |  |  360|  3.73k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|  3.73k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|  3.73k|        ERR_set_error)
  |  |  ------------------
  ------------------
  713|  3.73k|            goto err;
  714|   629k|        } else if (ret == -1)
  ------------------
  |  Branch (714:20): [True: 32.7k, False: 596k]
  ------------------
  715|  32.7k|            return -1;
  716|   633k|    }
  717|       |
  718|   672k|    *in = p;
  719|   672k|    return 1;
  720|       |
  721|  3.73k|err:
  722|  3.73k|    return 0;
  723|   738k|}
tasn_dec.c:asn1_d2i_ex_primitive:
  729|   585k|{
  730|   585k|    int ret = 0, utype;
  731|   585k|    long plen;
  732|   585k|    char cst, inf, free_cont = 0;
  733|   585k|    const unsigned char *p;
  734|   585k|    BUF_MEM buf = { 0, NULL, 0, 0 };
  735|   585k|    const unsigned char *cont = NULL;
  736|   585k|    long len;
  737|       |
  738|   585k|    if (pval == NULL) {
  ------------------
  |  Branch (738:9): [True: 0, False: 585k]
  ------------------
  739|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_NULL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  740|      0|        return 0; /* Should never happen */
  741|      0|    }
  742|       |
  743|   585k|    if (it->itype == ASN1_ITYPE_MSTRING) {
  ------------------
  |  |   87|   585k|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (743:9): [True: 43.6k, False: 541k]
  ------------------
  744|  43.6k|        utype = tag;
  745|  43.6k|        tag = -1;
  746|  43.6k|    } else
  747|   541k|        utype = it->utype;
  748|       |
  749|   585k|    if (utype == V_ASN1_ANY) {
  ------------------
  |  |   60|   585k|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (749:9): [True: 40.2k, False: 544k]
  ------------------
  750|       |        /* If type is ANY need to figure out type from tag */
  751|  40.2k|        unsigned char oclass;
  752|  40.2k|        if (tag >= 0) {
  ------------------
  |  Branch (752:13): [True: 0, False: 40.2k]
  ------------------
  753|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_TAGGED_ANY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  754|      0|            return 0;
  755|      0|        }
  756|  40.2k|        if (opt) {
  ------------------
  |  Branch (756:13): [True: 0, False: 40.2k]
  ------------------
  757|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_OPTIONAL_ANY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  758|      0|            return 0;
  759|      0|        }
  760|  40.2k|        p = *in;
  761|  40.2k|        ret = asn1_check_tlen(NULL, &utype, &oclass, NULL, NULL,
  762|  40.2k|            &p, inlen, -1, 0, 0, ctx);
  763|  40.2k|        if (!ret) {
  ------------------
  |  Branch (763:13): [True: 0, False: 40.2k]
  ------------------
  764|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  765|      0|            return 0;
  766|      0|        }
  767|  40.2k|        if (oclass != V_ASN1_UNIVERSAL)
  ------------------
  |  |   49|  40.2k|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  |  Branch (767:13): [True: 0, False: 40.2k]
  ------------------
  768|      0|            utype = V_ASN1_OTHER;
  ------------------
  |  |   59|      0|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  769|  40.2k|    }
  770|   585k|    if (tag == -1) {
  ------------------
  |  Branch (770:9): [True: 545k, False: 39.8k]
  ------------------
  771|   545k|        tag = utype;
  772|   545k|        aclass = V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|   545k|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  773|   545k|    }
  774|   585k|    p = *in;
  775|       |    /* Check header */
  776|   585k|    ret = asn1_check_tlen(&plen, NULL, NULL, &inf, &cst,
  777|   585k|        &p, inlen, tag, aclass, opt, ctx);
  778|   585k|    if (!ret) {
  ------------------
  |  Branch (778:9): [True: 0, False: 585k]
  ------------------
  779|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  780|      0|        return 0;
  781|   585k|    } else if (ret == -1)
  ------------------
  |  Branch (781:16): [True: 61.7k, False: 523k]
  ------------------
  782|  61.7k|        return -1;
  783|   523k|    ret = 0;
  784|       |    /* SEQUENCE, SET and "OTHER" are left in encoded form */
  785|   523k|    if ((utype == V_ASN1_SEQUENCE)
  ------------------
  |  |   76|   523k|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (785:9): [True: 0, False: 523k]
  ------------------
  786|   523k|        || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER)) {
  ------------------
  |  |   77|   523k|#define V_ASN1_SET 17
  ------------------
                      || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER)) {
  ------------------
  |  |   59|   523k|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  |  Branch (786:12): [True: 0, False: 523k]
  |  Branch (786:37): [True: 0, False: 523k]
  ------------------
  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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      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|   523k|    } else if (cst) {
  ------------------
  |  Branch (810:16): [True: 0, False: 523k]
  ------------------
  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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      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|   523k|    } else {
  838|   523k|        cont = p;
  839|   523k|        len = plen;
  840|   523k|        p += plen;
  841|   523k|    }
  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|   523k|    if (!asn1_ex_c2i(pval, cont, len, utype, &free_cont, it))
  ------------------
  |  Branch (845:9): [True: 0, False: 523k]
  ------------------
  846|      0|        goto err;
  847|       |
  848|   523k|    *in = p;
  849|   523k|    ret = 1;
  850|   523k|err:
  851|   523k|    if (free_cont)
  ------------------
  |  Branch (851:9): [True: 0, False: 523k]
  ------------------
  852|      0|        OPENSSL_free(buf.data);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  853|   523k|    return ret;
  854|   523k|}
tasn_dec.c:asn1_ex_c2i:
  860|   523k|{
  861|   523k|    ASN1_VALUE **opval = NULL;
  862|   523k|    ASN1_STRING *stmp;
  863|   523k|    ASN1_TYPE *typ = NULL;
  864|   523k|    int ret = 0;
  865|   523k|    int ilen = (int)len;
  866|   523k|    const ASN1_PRIMITIVE_FUNCS *pf;
  867|   523k|    ASN1_INTEGER **tint;
  868|   523k|    pf = it->funcs;
  869|       |
  870|   523k|    if (pf && pf->prim_c2i) {
  ------------------
  |  Branch (870:9): [True: 46.7k, False: 476k]
  |  Branch (870:15): [True: 46.7k, False: 0]
  ------------------
  871|  46.7k|        if (len == (long)ilen)
  ------------------
  |  Branch (871:13): [True: 46.7k, False: 0]
  ------------------
  872|  46.7k|            return pf->prim_c2i(pval, cont, ilen, utype, free_cont, it);
  873|  46.7k|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  874|      0|        return 0;
  875|  46.7k|    }
  876|       |    /* If ANY type clear type and set pointer to internal value */
  877|   476k|    if (it->utype == V_ASN1_ANY) {
  ------------------
  |  |   60|   476k|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (877:9): [True: 40.2k, False: 436k]
  ------------------
  878|  40.2k|        if (*pval == NULL) {
  ------------------
  |  Branch (878:13): [True: 40.2k, False: 0]
  ------------------
  879|  40.2k|            typ = ASN1_TYPE_new();
  880|  40.2k|            if (typ == NULL)
  ------------------
  |  Branch (880:17): [True: 0, False: 40.2k]
  ------------------
  881|      0|                goto err;
  882|  40.2k|            *pval = (ASN1_VALUE *)typ;
  883|  40.2k|        } else
  884|      0|            typ = (ASN1_TYPE *)*pval;
  885|       |
  886|  40.2k|        if (utype != typ->type)
  ------------------
  |  Branch (886:13): [True: 40.2k, False: 0]
  ------------------
  887|  40.2k|            ASN1_TYPE_set(typ, utype, NULL);
  888|  40.2k|        opval = pval;
  889|  40.2k|        pval = &typ->value.asn1_value;
  890|  40.2k|    }
  891|   476k|    switch (utype) {
  892|   189k|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|   189k|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (892:5): [True: 189k, False: 287k]
  ------------------
  893|   189k|        if (len != (long)ilen
  ------------------
  |  Branch (893:13): [True: 0, False: 189k]
  ------------------
  894|   189k|            || !ossl_c2i_ASN1_OBJECT((ASN1_OBJECT **)pval, &cont, ilen))
  ------------------
  |  Branch (894:16): [True: 0, False: 189k]
  ------------------
  895|      0|            goto err;
  896|   189k|        break;
  897|       |
  898|   189k|    case V_ASN1_NULL:
  ------------------
  |  |   69|      0|#define V_ASN1_NULL 5
  ------------------
  |  Branch (898:5): [True: 0, False: 476k]
  ------------------
  899|      0|        if (len) {
  ------------------
  |  Branch (899:13): [True: 0, False: 0]
  ------------------
  900|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_NULL_IS_WRONG_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  901|      0|            goto err;
  902|      0|        }
  903|      0|        *pval = (ASN1_VALUE *)1;
  904|      0|        break;
  905|       |
  906|  32.6k|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|  32.6k|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (906:5): [True: 32.6k, False: 443k]
  ------------------
  907|  32.6k|        if (len != 1) {
  ------------------
  |  Branch (907:13): [True: 0, False: 32.6k]
  ------------------
  908|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BOOLEAN_IS_WRONG_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  909|      0|            goto err;
  910|  32.6k|        } else {
  911|  32.6k|            ASN1_BOOLEAN *tbool;
  912|  32.6k|            tbool = (ASN1_BOOLEAN *)pval;
  913|  32.6k|            *tbool = *cont;
  914|  32.6k|        }
  915|  32.6k|        break;
  916|       |
  917|  58.2k|    case V_ASN1_BIT_STRING:
  ------------------
  |  |   67|  58.2k|#define V_ASN1_BIT_STRING 3
  ------------------
  |  Branch (917:5): [True: 58.2k, False: 418k]
  ------------------
  918|  58.2k|        if (!ossl_c2i_ASN1_BIT_STRING((ASN1_BIT_STRING **)pval, &cont, len))
  ------------------
  |  Branch (918:13): [True: 0, False: 58.2k]
  ------------------
  919|      0|            goto err;
  920|  58.2k|        break;
  921|       |
  922|  58.2k|    case V_ASN1_INTEGER:
  ------------------
  |  |   66|  29.3k|#define V_ASN1_INTEGER 2
  ------------------
  |  Branch (922:5): [True: 29.3k, False: 447k]
  ------------------
  923|  29.3k|    case V_ASN1_ENUMERATED:
  ------------------
  |  |   74|  29.3k|#define V_ASN1_ENUMERATED 10
  ------------------
  |  Branch (923:5): [True: 0, False: 476k]
  ------------------
  924|  29.3k|        tint = (ASN1_INTEGER **)pval;
  925|  29.3k|        if (!ossl_c2i_ASN1_INTEGER(tint, &cont, len))
  ------------------
  |  Branch (925:13): [True: 0, False: 29.3k]
  ------------------
  926|      0|            goto err;
  927|       |        /* Fixup type to match the expected form */
  928|  29.3k|        (*tint)->type = utype | ((*tint)->type & V_ASN1_NEG);
  ------------------
  |  |   99|  29.3k|#define V_ASN1_NEG 0x100
  ------------------
  929|  29.3k|        break;
  930|       |
  931|   123k|    case V_ASN1_OCTET_STRING:
  ------------------
  |  |   68|   123k|#define V_ASN1_OCTET_STRING 4
  ------------------
  |  Branch (931:5): [True: 123k, False: 353k]
  ------------------
  932|   123k|    case V_ASN1_NUMERICSTRING:
  ------------------
  |  |   78|   123k|#define V_ASN1_NUMERICSTRING 18
  ------------------
  |  Branch (932:5): [True: 0, False: 476k]
  ------------------
  933|   145k|    case V_ASN1_PRINTABLESTRING:
  ------------------
  |  |   79|   145k|#define V_ASN1_PRINTABLESTRING 19
  ------------------
  |  Branch (933:5): [True: 21.8k, False: 454k]
  ------------------
  934|   145k|    case V_ASN1_T61STRING:
  ------------------
  |  |   80|   145k|#define V_ASN1_T61STRING 20
  ------------------
  |  Branch (934:5): [True: 0, False: 476k]
  ------------------
  935|   145k|    case V_ASN1_VIDEOTEXSTRING:
  ------------------
  |  |   82|   145k|#define V_ASN1_VIDEOTEXSTRING 21
  ------------------
  |  Branch (935:5): [True: 0, False: 476k]
  ------------------
  936|   145k|    case V_ASN1_IA5STRING:
  ------------------
  |  |   83|   145k|#define V_ASN1_IA5STRING 22
  ------------------
  |  Branch (936:5): [True: 0, False: 476k]
  ------------------
  937|   156k|    case V_ASN1_UTCTIME:
  ------------------
  |  |   84|   156k|#define V_ASN1_UTCTIME 23
  ------------------
  |  Branch (937:5): [True: 10.9k, False: 465k]
  ------------------
  938|   166k|    case V_ASN1_GENERALIZEDTIME:
  ------------------
  |  |   85|   166k|#define V_ASN1_GENERALIZEDTIME 24
  ------------------
  |  Branch (938:5): [True: 10.9k, False: 465k]
  ------------------
  939|   166k|    case V_ASN1_GRAPHICSTRING:
  ------------------
  |  |   86|   166k|#define V_ASN1_GRAPHICSTRING 25
  ------------------
  |  Branch (939:5): [True: 0, False: 476k]
  ------------------
  940|   166k|    case V_ASN1_VISIBLESTRING:
  ------------------
  |  |   88|   166k|#define V_ASN1_VISIBLESTRING 26 /* alias */
  ------------------
  |  Branch (940:5): [True: 0, False: 476k]
  ------------------
  941|   166k|    case V_ASN1_GENERALSTRING:
  ------------------
  |  |   89|   166k|#define V_ASN1_GENERALSTRING 27
  ------------------
  |  Branch (941:5): [True: 0, False: 476k]
  ------------------
  942|   166k|    case V_ASN1_UNIVERSALSTRING:
  ------------------
  |  |   90|   166k|#define V_ASN1_UNIVERSALSTRING 28
  ------------------
  |  Branch (942:5): [True: 0, False: 476k]
  ------------------
  943|   166k|    case V_ASN1_BMPSTRING:
  ------------------
  |  |   91|   166k|#define V_ASN1_BMPSTRING 30
  ------------------
  |  Branch (943:5): [True: 0, False: 476k]
  ------------------
  944|   166k|    case V_ASN1_UTF8STRING:
  ------------------
  |  |   75|   166k|#define V_ASN1_UTF8STRING 12
  ------------------
  |  Branch (944:5): [True: 0, False: 476k]
  ------------------
  945|   166k|    case V_ASN1_OTHER:
  ------------------
  |  |   59|   166k|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  |  Branch (945:5): [True: 0, False: 476k]
  ------------------
  946|   166k|    case V_ASN1_SET:
  ------------------
  |  |   77|   166k|#define V_ASN1_SET 17
  ------------------
  |  Branch (946:5): [True: 0, False: 476k]
  ------------------
  947|   166k|    case V_ASN1_SEQUENCE:
  ------------------
  |  |   76|   166k|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (947:5): [True: 0, False: 476k]
  ------------------
  948|   166k|    default:
  ------------------
  |  Branch (948:5): [True: 0, False: 476k]
  ------------------
  949|   166k|        if (len != (long)ilen) {
  ------------------
  |  Branch (949:13): [True: 0, False: 166k]
  ------------------
  950|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  951|      0|            goto err;
  952|      0|        }
  953|   166k|        if (utype == V_ASN1_BMPSTRING && (len & 1)) {
  ------------------
  |  |   91|   333k|#define V_ASN1_BMPSTRING 30
  ------------------
  |  Branch (953:13): [True: 0, False: 166k]
  |  Branch (953:42): [True: 0, False: 0]
  ------------------
  954|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BMPSTRING_IS_WRONG_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  955|      0|            goto err;
  956|      0|        }
  957|   166k|        if (utype == V_ASN1_UNIVERSALSTRING && (len & 3)) {
  ------------------
  |  |   90|   333k|#define V_ASN1_UNIVERSALSTRING 28
  ------------------
  |  Branch (957:13): [True: 0, False: 166k]
  |  Branch (957:48): [True: 0, False: 0]
  ------------------
  958|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  959|      0|            goto err;
  960|      0|        }
  961|   166k|        if (utype == V_ASN1_GENERALIZEDTIME && (len < 15)) {
  ------------------
  |  |   85|   333k|#define V_ASN1_GENERALIZEDTIME 24
  ------------------
  |  Branch (961:13): [True: 10.9k, False: 156k]
  |  Branch (961:48): [True: 0, False: 10.9k]
  ------------------
  962|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_GENERALIZEDTIME_IS_TOO_SHORT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  963|      0|            goto err;
  964|      0|        }
  965|   166k|        if (utype == V_ASN1_UTCTIME && (len < 13)) {
  ------------------
  |  |   84|   333k|#define V_ASN1_UTCTIME 23
  ------------------
  |  Branch (965:13): [True: 10.9k, False: 156k]
  |  Branch (965:40): [True: 0, False: 10.9k]
  ------------------
  966|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_UTCTIME_IS_TOO_SHORT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  967|      0|            goto err;
  968|      0|        }
  969|       |        /* All based on ASN1_STRING and handled the same */
  970|   166k|        if (*pval == NULL) {
  ------------------
  |  Branch (970:13): [True: 35.9k, False: 130k]
  ------------------
  971|  35.9k|            stmp = ASN1_STRING_type_new(utype);
  972|  35.9k|            if (stmp == NULL) {
  ------------------
  |  Branch (972:17): [True: 0, False: 35.9k]
  ------------------
  973|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  974|      0|                goto err;
  975|      0|            }
  976|  35.9k|            *pval = (ASN1_VALUE *)stmp;
  977|   130k|        } else {
  978|   130k|            stmp = (ASN1_STRING *)*pval;
  979|   130k|            stmp->type = utype;
  980|   130k|        }
  981|       |        /* If we've already allocated a buffer use it */
  982|   166k|        if (*free_cont) {
  ------------------
  |  Branch (982:13): [True: 0, False: 166k]
  ------------------
  983|      0|            ASN1_STRING_set0(stmp, (unsigned char *)cont /* UGLY CAST! */, ilen);
  984|      0|            *free_cont = 0;
  985|   166k|        } else {
  986|   166k|            if (!ASN1_STRING_set(stmp, cont, ilen)) {
  ------------------
  |  Branch (986:17): [True: 0, False: 166k]
  ------------------
  987|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  988|      0|                ASN1_STRING_free(stmp);
  989|      0|                *pval = NULL;
  990|      0|                goto err;
  991|      0|            }
  992|   166k|        }
  993|   166k|        break;
  994|   476k|    }
  995|       |    /* If ASN1_ANY and NULL type fix up value */
  996|   476k|    if (typ && (utype == V_ASN1_NULL))
  ------------------
  |  |   69|  40.2k|#define V_ASN1_NULL 5
  ------------------
  |  Branch (996:9): [True: 40.2k, False: 436k]
  |  Branch (996:16): [True: 0, False: 40.2k]
  ------------------
  997|      0|        typ->value.ptr = NULL;
  998|       |
  999|   476k|    ret = 1;
 1000|   476k|err:
 1001|   476k|    if (!ret) {
  ------------------
  |  Branch (1001:9): [True: 0, False: 476k]
  ------------------
 1002|      0|        ASN1_TYPE_free(typ);
 1003|      0|        if (opval)
  ------------------
  |  Branch (1003:13): [True: 0, False: 0]
  ------------------
 1004|      0|            *opval = NULL;
 1005|      0|    }
 1006|   476k|    return ret;
 1007|   476k|}
tasn_dec.c:asn1_check_eoc:
 1163|   889k|{
 1164|   889k|    const unsigned char *p;
 1165|       |
 1166|   889k|    if (len < 2)
  ------------------
  |  Branch (1166:9): [True: 0, False: 889k]
  ------------------
 1167|      0|        return 0;
 1168|   889k|    p = *in;
 1169|   889k|    if (p[0] == '\0' && p[1] == '\0') {
  ------------------
  |  Branch (1169:9): [True: 0, False: 889k]
  |  Branch (1169:25): [True: 0, False: 0]
  ------------------
 1170|      0|        *in += 2;
 1171|      0|        return 1;
 1172|      0|    }
 1173|   889k|    return 0;
 1174|   889k|}
tasn_dec.c:asn1_check_tlen:
 1187|  1.15M|{
 1188|  1.15M|    int i;
 1189|  1.15M|    int ptag, pclass;
 1190|  1.15M|    long plen;
 1191|  1.15M|    const unsigned char *p, *q;
 1192|  1.15M|    p = *in;
 1193|  1.15M|    q = p;
 1194|       |
 1195|  1.15M|    if (len <= 0) {
  ------------------
  |  Branch (1195:9): [True: 0, False: 1.15M]
  ------------------
 1196|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1197|      0|        goto err;
 1198|      0|    }
 1199|  1.15M|    if (ctx != NULL && ctx->valid) {
  ------------------
  |  Branch (1199:9): [True: 1.15M, False: 0]
  |  Branch (1199:24): [True: 242k, False: 908k]
  ------------------
 1200|   242k|        i = ctx->ret;
 1201|   242k|        plen = ctx->plen;
 1202|   242k|        pclass = ctx->pclass;
 1203|   242k|        ptag = ctx->ptag;
 1204|   242k|        p += ctx->hdrlen;
 1205|   908k|    } else {
 1206|   908k|        i = ASN1_get_object(&p, &plen, &ptag, &pclass, len);
 1207|   908k|        if (ctx != NULL) {
  ------------------
  |  Branch (1207:13): [True: 908k, False: 0]
  ------------------
 1208|   908k|            ctx->ret = i;
 1209|   908k|            ctx->plen = plen;
 1210|   908k|            ctx->pclass = pclass;
 1211|   908k|            ctx->ptag = ptag;
 1212|   908k|            ctx->hdrlen = (int)(p - q);
 1213|   908k|            ctx->valid = 1;
 1214|       |            /*
 1215|       |             * If definite length, and no error, length + header can't exceed
 1216|       |             * total amount of data available.
 1217|       |             */
 1218|   908k|            if ((i & 0x81) == 0 && (plen + ctx->hdrlen) > len) {
  ------------------
  |  Branch (1218:17): [True: 908k, False: 0]
  |  Branch (1218:36): [True: 0, False: 908k]
  ------------------
 1219|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1220|      0|                goto err;
 1221|      0|            }
 1222|   908k|        }
 1223|   908k|    }
 1224|       |
 1225|  1.15M|    if ((i & 0x80) != 0) {
  ------------------
  |  Branch (1225:9): [True: 0, False: 1.15M]
  ------------------
 1226|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_BAD_OBJECT_HEADER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1227|      0|        goto err;
 1228|      0|    }
 1229|  1.15M|    if (exptag >= 0) {
  ------------------
  |  Branch (1229:9): [True: 1.06M, False: 83.8k]
  ------------------
 1230|  1.06M|        if (exptag != ptag || expclass != pclass) {
  ------------------
  |  Branch (1230:13): [True: 162k, False: 905k]
  |  Branch (1230:31): [True: 0, False: 905k]
  ------------------
 1231|       |            /*
 1232|       |             * If type is OPTIONAL, not an error: indicate missing type.
 1233|       |             */
 1234|   162k|            if (opt != 0)
  ------------------
  |  Branch (1234:17): [True: 158k, False: 3.73k]
  ------------------
 1235|   158k|                return -1;
 1236|   162k|            ERR_raise(ERR_LIB_ASN1, ASN1_R_WRONG_TAG);
  ------------------
  |  |  357|  3.73k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|  3.73k|    (ERR_new(),                                                  \
  |  |  |  |  360|  3.73k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|  3.73k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|  3.73k|        ERR_set_error)
  |  |  ------------------
  ------------------
 1237|  3.73k|            goto err;
 1238|   162k|        }
 1239|       |        /*
 1240|       |         * We have a tag and class match: assume we are going to do something
 1241|       |         * with it
 1242|       |         */
 1243|   905k|        asn1_tlc_clear(ctx);
  ------------------
  |  |  115|   905k|    do {                    \
  |  |  116|   905k|        if ((c) != NULL)    \
  |  |  ------------------
  |  |  |  Branch (116:13): [True: 905k, False: 0]
  |  |  ------------------
  |  |  117|   905k|            (c)->valid = 0; \
  |  |  118|   905k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (118:14): [Folded, False: 905k]
  |  |  ------------------
  ------------------
 1244|   905k|    }
 1245|       |
 1246|   988k|    if ((i & 1) != 0)
  ------------------
  |  Branch (1246:9): [True: 0, False: 988k]
  ------------------
 1247|      0|        plen = len - (long)(p - q);
 1248|       |
 1249|   988k|    if (inf != NULL)
  ------------------
  |  Branch (1249:9): [True: 905k, False: 83.8k]
  ------------------
 1250|   905k|        *inf = i & 1;
 1251|       |
 1252|   988k|    if (cst != NULL)
  ------------------
  |  Branch (1252:9): [True: 839k, False: 149k]
  ------------------
 1253|   839k|        *cst = i & V_ASN1_CONSTRUCTED;
  ------------------
  |  |   54|   839k|#define V_ASN1_CONSTRUCTED 0x20
  ------------------
 1254|       |
 1255|   988k|    if (olen != NULL)
  ------------------
  |  Branch (1255:9): [True: 905k, False: 83.8k]
  ------------------
 1256|   905k|        *olen = plen;
 1257|       |
 1258|   988k|    if (oclass != NULL)
  ------------------
  |  Branch (1258:9): [True: 83.8k, False: 905k]
  ------------------
 1259|  83.8k|        *oclass = pclass;
 1260|       |
 1261|   988k|    if (otag != NULL)
  ------------------
  |  Branch (1261:9): [True: 83.8k, False: 905k]
  ------------------
 1262|  83.8k|        *otag = ptag;
 1263|       |
 1264|   988k|    *in = p;
 1265|   988k|    return 1;
 1266|       |
 1267|  3.73k|err:
 1268|       |    asn1_tlc_clear(ctx);
  ------------------
  |  |  115|  3.73k|    do {                    \
  |  |  116|  3.73k|        if ((c) != NULL)    \
  |  |  ------------------
  |  |  |  Branch (116:13): [True: 3.73k, False: 0]
  |  |  ------------------
  |  |  117|  3.73k|            (c)->valid = 0; \
  |  |  118|  3.73k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (118:14): [Folded, False: 3.73k]
  |  |  ------------------
  ------------------
 1269|  3.73k|    return 0;
 1270|  1.15M|}

ASN1_item_i2d:
   44|  61.0k|{
   45|  61.0k|    return asn1_item_flags_i2d(val, out, it, 0);
   46|  61.0k|}
ASN1_item_ex_i2d:
   83|  2.62M|{
   84|  2.62M|    const ASN1_TEMPLATE *tt = NULL;
   85|  2.62M|    int i, seqcontlen, seqlen, ndef = 1;
   86|  2.62M|    const ASN1_EXTERN_FUNCS *ef;
   87|  2.62M|    const ASN1_AUX *aux = it->funcs;
   88|  2.62M|    ASN1_aux_const_cb *asn1_cb = NULL;
   89|       |
   90|  2.62M|    if ((it->itype != ASN1_ITYPE_PRIMITIVE) && *pval == NULL)
  ------------------
  |  |   82|  2.62M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (90:9): [True: 454k, False: 2.16M]
  |  Branch (90:48): [True: 43.0k, False: 411k]
  ------------------
   91|  43.0k|        return 0;
   92|       |
   93|  2.57M|    if (aux != NULL) {
  ------------------
  |  Branch (93:9): [True: 939k, False: 1.64M]
  ------------------
   94|   939k|        asn1_cb = ((aux->flags & ASN1_AFLG_CONST_CB) != 0) ? aux->asn1_const_cb
  ------------------
  |  |  727|   939k|#define ASN1_AFLG_CONST_CB 8
  ------------------
  |  Branch (94:19): [True: 0, False: 939k]
  ------------------
   95|   939k|                                                           : (ASN1_aux_const_cb *)aux->asn1_cb; /* backward compatibility */
   96|   939k|    }
   97|       |
   98|  2.57M|    switch (it->itype) {
   99|       |
  100|  2.16M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  2.16M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (100:5): [True: 2.16M, False: 411k]
  ------------------
  101|  2.16M|        if (it->templates)
  ------------------
  |  Branch (101:13): [True: 43.6k, False: 2.12M]
  ------------------
  102|  43.6k|            return asn1_template_ex_i2d(pval, out, it->templates,
  103|  43.6k|                tag, aclass);
  104|  2.12M|        return asn1_i2d_ex_primitive(pval, out, it, tag, aclass);
  105|       |
  106|  87.3k|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  87.3k|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (106:5): [True: 87.3k, False: 2.49M]
  ------------------
  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|  87.3k|        if (tag != -1) {
  ------------------
  |  Branch (111:13): [True: 0, False: 87.3k]
  ------------------
  112|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BAD_TEMPLATE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  113|      0|            return -1;
  114|      0|        }
  115|  87.3k|        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: 2.57M]
  ------------------
  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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      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: 2.57M]
  ------------------
  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: 2.57M]
  ------------------
  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|   324k|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|   324k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (152:5): [True: 324k, False: 2.25M]
  ------------------
  153|   324k|        i = ossl_asn1_enc_restore(&seqcontlen, out, pval, it);
  154|       |        /* An error occurred */
  155|   324k|        if (i < 0)
  ------------------
  |  Branch (155:13): [True: 0, False: 324k]
  ------------------
  156|      0|            return 0;
  157|       |        /* We have a valid cached encoding... */
  158|   324k|        if (i > 0)
  ------------------
  |  Branch (158:13): [True: 79.1k, False: 245k]
  ------------------
  159|  79.1k|            return seqcontlen;
  160|       |        /* Otherwise carry on */
  161|   245k|        seqcontlen = 0;
  162|       |        /* If no IMPLICIT tagging set to SEQUENCE, UNIVERSAL */
  163|   245k|        if (tag == -1) {
  ------------------
  |  Branch (163:13): [True: 245k, False: 0]
  ------------------
  164|   245k|            tag = V_ASN1_SEQUENCE;
  ------------------
  |  |   76|   245k|#define V_ASN1_SEQUENCE 16
  ------------------
  165|       |            /* Retain any other flags in aclass */
  166|   245k|            aclass = (aclass & ~ASN1_TFLG_TAG_CLASS)
  ------------------
  |  |  564|   245k|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  167|   245k|                | V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|   245k|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  168|   245k|        }
  169|   245k|        if (asn1_cb && !asn1_cb(ASN1_OP_I2D_PRE, pval, it, NULL))
  ------------------
  |  |  737|  57.5k|#define ASN1_OP_I2D_PRE 6
  ------------------
  |  Branch (169:13): [True: 57.5k, False: 187k]
  |  Branch (169:24): [True: 0, False: 57.5k]
  ------------------
  170|      0|            return 0;
  171|       |        /* First work out sequence content length */
  172|  1.82M|        for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (172:41): [True: 1.58M, False: 245k]
  ------------------
  173|  1.58M|            const ASN1_TEMPLATE *seqtt;
  174|  1.58M|            const ASN1_VALUE **pseqval;
  175|  1.58M|            int tmplen;
  176|  1.58M|            seqtt = ossl_asn1_do_adb(*pval, tt, 1);
  177|  1.58M|            if (!seqtt)
  ------------------
  |  Branch (177:17): [True: 0, False: 1.58M]
  ------------------
  178|      0|                return 0;
  179|  1.58M|            pseqval = ossl_asn1_get_const_field_ptr(pval, seqtt);
  180|  1.58M|            tmplen = asn1_template_ex_i2d(pseqval, NULL, seqtt, -1, aclass);
  181|  1.58M|            if (tmplen == -1 || (tmplen > INT_MAX - seqcontlen))
  ------------------
  |  Branch (181:17): [True: 0, False: 1.58M]
  |  Branch (181:33): [True: 0, False: 1.58M]
  ------------------
  182|      0|                return -1;
  183|  1.58M|            seqcontlen += tmplen;
  184|  1.58M|        }
  185|       |
  186|   245k|        seqlen = ASN1_object_size(ndef, seqcontlen, tag);
  187|   245k|        if (!out || seqlen == -1)
  ------------------
  |  Branch (187:13): [True: 158k, False: 86.5k]
  |  Branch (187:21): [True: 0, False: 86.5k]
  ------------------
  188|   158k|            return seqlen;
  189|       |        /* Output SEQUENCE header */
  190|  86.5k|        ASN1_put_object(out, ndef, seqcontlen, tag, aclass);
  191|   797k|        for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (191:41): [True: 710k, False: 86.5k]
  ------------------
  192|   710k|            const ASN1_TEMPLATE *seqtt;
  193|   710k|            const ASN1_VALUE **pseqval;
  194|   710k|            seqtt = ossl_asn1_do_adb(*pval, tt, 1);
  195|   710k|            if (!seqtt)
  ------------------
  |  Branch (195:17): [True: 0, False: 710k]
  ------------------
  196|      0|                return 0;
  197|   710k|            pseqval = ossl_asn1_get_const_field_ptr(pval, seqtt);
  198|       |            /* FIXME: check for errors in enhanced version */
  199|   710k|            asn1_template_ex_i2d(pseqval, out, seqtt, -1, aclass);
  200|   710k|        }
  201|  86.5k|        if (ndef == 2)
  ------------------
  |  Branch (201:13): [True: 0, False: 86.5k]
  ------------------
  202|      0|            ASN1_put_eoc(out);
  203|  86.5k|        if (asn1_cb && !asn1_cb(ASN1_OP_I2D_POST, pval, it, NULL))
  ------------------
  |  |  738|  21.6k|#define ASN1_OP_I2D_POST 7
  ------------------
  |  Branch (203:13): [True: 21.6k, False: 64.9k]
  |  Branch (203:24): [True: 0, False: 21.6k]
  ------------------
  204|      0|            return 0;
  205|  86.5k|        return seqlen;
  206|       |
  207|      0|    default:
  ------------------
  |  Branch (207:5): [True: 0, False: 2.57M]
  ------------------
  208|      0|        return 0;
  209|  2.57M|    }
  210|      0|    return 0;
  211|  2.57M|}
tasn_enc.c:asn1_item_flags_i2d:
   57|  61.0k|{
   58|  61.0k|    if (out != NULL && *out == NULL) {
  ------------------
  |  Branch (58:9): [True: 35.9k, False: 25.1k]
  |  Branch (58:24): [True: 10.8k, False: 25.1k]
  ------------------
   59|  10.8k|        unsigned char *p, *buf;
   60|  10.8k|        int len;
   61|       |
   62|  10.8k|        len = ASN1_item_ex_i2d(&val, NULL, it, -1, flags);
   63|  10.8k|        if (len <= 0)
  ------------------
  |  Branch (63:13): [True: 0, False: 10.8k]
  ------------------
   64|      0|            return len;
   65|  10.8k|        if ((buf = OPENSSL_malloc(len)) == NULL)
  ------------------
  |  |  107|  10.8k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (65:13): [True: 0, False: 10.8k]
  ------------------
   66|      0|            return -1;
   67|  10.8k|        p = buf;
   68|  10.8k|        ASN1_item_ex_i2d(&val, &p, it, -1, flags);
   69|  10.8k|        *out = buf;
   70|  10.8k|        return len;
   71|  10.8k|    }
   72|       |
   73|  50.2k|    return ASN1_item_ex_i2d(&val, out, it, -1, flags);
   74|  61.0k|}
tasn_enc.c:asn1_template_ex_i2d:
  215|  2.33M|{
  216|  2.33M|    const int flags = tt->flags;
  217|  2.33M|    int i, ret, ttag, tclass, ndef, len;
  218|  2.33M|    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|  2.33M|    if (flags & ASN1_TFLG_EMBED) {
  ------------------
  |  |  586|  2.33M|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  |  Branch (224:9): [True: 947k, False: 1.38M]
  ------------------
  225|   947k|        tval = (ASN1_VALUE *)pval;
  226|   947k|        pval = &tval;
  227|   947k|    }
  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|  2.33M|    if (flags & ASN1_TFLG_TAG_MASK) {
  ------------------
  |  |  541|  2.33M|#define ASN1_TFLG_TAG_MASK (0x3 << 3)
  ------------------
  |  Branch (235:9): [True: 1.35M, False: 980k]
  ------------------
  236|       |        /* Error if argument and template tagging */
  237|  1.35M|        if (tag != -1)
  ------------------
  |  Branch (237:13): [True: 0, False: 1.35M]
  ------------------
  238|       |            /* FIXME: error code here */
  239|      0|            return -1;
  240|       |        /* Get tagging from template */
  241|  1.35M|        ttag = tt->tag;
  242|  1.35M|        tclass = flags & ASN1_TFLG_TAG_CLASS;
  ------------------
  |  |  564|  1.35M|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  243|  1.35M|    } else if (tag != -1) {
  ------------------
  |  Branch (243:16): [True: 0, False: 980k]
  ------------------
  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|   980k|    } else {
  248|   980k|        ttag = -1;
  249|   980k|        tclass = 0;
  250|   980k|    }
  251|       |    /*
  252|       |     * Remove any class mask from iflag.
  253|       |     */
  254|  2.33M|    iclass &= ~ASN1_TFLG_TAG_CLASS;
  ------------------
  |  |  564|  2.33M|#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|  2.33M|    if ((flags & ASN1_TFLG_NDEF) && (iclass & ASN1_TFLG_NDEF))
  ------------------
  |  |  583|  2.33M|#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: 2.33M]
  |  Branch (262:37): [True: 0, False: 0]
  ------------------
  263|      0|        ndef = 2;
  264|  2.33M|    else
  265|  2.33M|        ndef = 1;
  266|       |
  267|  2.33M|    if (flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|  2.33M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (267:9): [True: 43.6k, False: 2.29M]
  ------------------
  268|       |        /* SET OF, SEQUENCE OF */
  269|  43.6k|        STACK_OF(const_ASN1_VALUE) *sk = (STACK_OF(const_ASN1_VALUE) *)*pval;
  ------------------
  |  |   33|  43.6k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  270|  43.6k|        int isset, sktag, skaclass;
  271|  43.6k|        int skcontlen, sklen;
  272|  43.6k|        const ASN1_VALUE *skitem;
  273|       |
  274|  43.6k|        if (*pval == NULL)
  ------------------
  |  Branch (274:13): [True: 0, False: 43.6k]
  ------------------
  275|      0|            return 0;
  276|       |
  277|  43.6k|        if (flags & ASN1_TFLG_SET_OF) {
  ------------------
  |  |  515|  43.6k|#define ASN1_TFLG_SET_OF (0x1 << 1)
  ------------------
  |  Branch (277:13): [True: 43.6k, False: 0]
  ------------------
  278|  43.6k|            isset = 1;
  279|       |            /* 2 means we reorder */
  280|  43.6k|            if (flags & ASN1_TFLG_SEQUENCE_OF)
  ------------------
  |  |  518|  43.6k|#define ASN1_TFLG_SEQUENCE_OF (0x2 << 1)
  ------------------
  |  Branch (280:17): [True: 0, False: 43.6k]
  ------------------
  281|      0|                isset = 2;
  282|  43.6k|        } else
  283|      0|            isset = 0;
  284|       |
  285|       |        /*
  286|       |         * Work out inner tag value: if EXPLICIT or no tagging use underlying
  287|       |         * type.
  288|       |         */
  289|  43.6k|        if ((ttag != -1) && !(flags & ASN1_TFLG_EXPTAG)) {
  ------------------
  |  |  539|      0|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (289:13): [True: 0, False: 43.6k]
  |  Branch (289:29): [True: 0, False: 0]
  ------------------
  290|      0|            sktag = ttag;
  291|      0|            skaclass = tclass;
  292|  43.6k|        } else {
  293|  43.6k|            skaclass = V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  43.6k|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  294|  43.6k|            if (isset)
  ------------------
  |  Branch (294:17): [True: 43.6k, False: 0]
  ------------------
  295|  43.6k|                sktag = V_ASN1_SET;
  ------------------
  |  |   77|  43.6k|#define V_ASN1_SET 17
  ------------------
  296|      0|            else
  297|      0|                sktag = V_ASN1_SEQUENCE;
  ------------------
  |  |   76|      0|#define V_ASN1_SEQUENCE 16
  ------------------
  298|  43.6k|        }
  299|       |
  300|       |        /* Determine total length of items */
  301|  43.6k|        skcontlen = 0;
  302|  87.3k|        for (i = 0; i < sk_const_ASN1_VALUE_num(sk); i++) {
  ------------------
  |  Branch (302:21): [True: 43.6k, False: 43.6k]
  ------------------
  303|  43.6k|            skitem = sk_const_ASN1_VALUE_value(sk, i);
  304|  43.6k|            len = ASN1_item_ex_i2d(&skitem, NULL, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  394|  43.6k|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  305|  43.6k|                -1, iclass);
  306|  43.6k|            if (len == -1 || (skcontlen > INT_MAX - len))
  ------------------
  |  Branch (306:17): [True: 0, False: 43.6k]
  |  Branch (306:30): [True: 0, False: 43.6k]
  ------------------
  307|      0|                return -1;
  308|  43.6k|            if (len == 0 && (tt->flags & ASN1_TFLG_OPTIONAL) == 0) {
  ------------------
  |  |  512|      0|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (308:17): [True: 0, False: 43.6k]
  |  Branch (308:29): [True: 0, False: 0]
  ------------------
  309|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_ZERO_CONTENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  310|      0|                return -1;
  311|      0|            }
  312|  43.6k|            skcontlen += len;
  313|  43.6k|        }
  314|  43.6k|        sklen = ASN1_object_size(ndef, skcontlen, sktag);
  315|  43.6k|        if (sklen == -1)
  ------------------
  |  Branch (315:13): [True: 0, False: 43.6k]
  ------------------
  316|      0|            return -1;
  317|       |        /* If EXPLICIT need length of surrounding tag */
  318|  43.6k|        if (flags & ASN1_TFLG_EXPTAG)
  ------------------
  |  |  539|  43.6k|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (318:13): [True: 0, False: 43.6k]
  ------------------
  319|      0|            ret = ASN1_object_size(ndef, sklen, ttag);
  320|  43.6k|        else
  321|  43.6k|            ret = sklen;
  322|       |
  323|  43.6k|        if (!out || ret == -1)
  ------------------
  |  Branch (323:13): [True: 21.8k, False: 21.8k]
  |  Branch (323:21): [True: 0, False: 21.8k]
  ------------------
  324|  21.8k|            return ret;
  325|       |
  326|       |        /* Now encode this lot... */
  327|       |        /* EXPLICIT tag */
  328|  21.8k|        if (flags & ASN1_TFLG_EXPTAG)
  ------------------
  |  |  539|  21.8k|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (328:13): [True: 0, False: 21.8k]
  ------------------
  329|      0|            ASN1_put_object(out, ndef, sklen, ttag, tclass);
  330|       |        /* SET or SEQUENCE and IMPLICIT tag */
  331|  21.8k|        ASN1_put_object(out, ndef, skcontlen, sktag, skaclass);
  332|       |        /* And the stuff itself */
  333|  21.8k|        asn1_set_seq_out(sk, out, skcontlen, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  394|  21.8k|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  334|  21.8k|            isset, iclass);
  335|  21.8k|        if (ndef == 2) {
  ------------------
  |  Branch (335:13): [True: 0, False: 21.8k]
  ------------------
  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|  21.8k|        return ret;
  342|  43.6k|    }
  343|       |
  344|  2.29M|    if (flags & ASN1_TFLG_EXPTAG) {
  ------------------
  |  |  539|  2.29M|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (344:9): [True: 1.29M, False: 1.00M]
  ------------------
  345|       |        /* EXPLICIT tagging */
  346|       |        /* Find length of tagged item */
  347|  1.29M|        i = ASN1_item_ex_i2d(pval, NULL, ASN1_ITEM_ptr(tt->item), -1, iclass);
  ------------------
  |  |  394|  1.29M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  348|  1.29M|        if (i == 0) {
  ------------------
  |  Branch (348:13): [True: 838k, False: 451k]
  ------------------
  349|   838k|            if ((tt->flags & ASN1_TFLG_OPTIONAL) == 0) {
  ------------------
  |  |  512|   838k|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (349:17): [True: 0, False: 838k]
  ------------------
  350|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_ZERO_CONTENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  351|      0|                return -1;
  352|      0|            }
  353|   838k|            return 0;
  354|   838k|        }
  355|       |        /* Find length of EXPLICIT tag */
  356|   451k|        ret = ASN1_object_size(ndef, i, ttag);
  357|   451k|        if (out && ret != -1) {
  ------------------
  |  Branch (357:13): [True: 150k, False: 301k]
  |  Branch (357:20): [True: 150k, False: 0]
  ------------------
  358|       |            /* Output tag and item */
  359|   150k|            ASN1_put_object(out, ndef, i, ttag, tclass);
  360|   150k|            ASN1_item_ex_i2d(pval, out, ASN1_ITEM_ptr(tt->item), -1, iclass);
  ------------------
  |  |  394|   150k|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  361|   150k|            if (ndef == 2)
  ------------------
  |  Branch (361:17): [True: 0, False: 150k]
  ------------------
  362|      0|                ASN1_put_eoc(out);
  363|   150k|        }
  364|   451k|        return ret;
  365|  1.29M|    }
  366|       |
  367|       |    /* Either normal or IMPLICIT tagging: combine class and flags */
  368|  1.00M|    len = ASN1_item_ex_i2d(pval, out, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  394|  1.00M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  369|  1.00M|        ttag, tclass | iclass);
  370|  1.00M|    if (len == 0 && (tt->flags & ASN1_TFLG_OPTIONAL) == 0) {
  ------------------
  |  |  512|   165k|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (370:9): [True: 165k, False: 835k]
  |  Branch (370:21): [True: 0, False: 165k]
  ------------------
  371|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_ZERO_CONTENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  372|      0|        return -1;
  373|      0|    }
  374|  1.00M|    return len;
  375|  1.00M|}
tasn_enc.c:asn1_set_seq_out:
  402|  21.8k|{
  403|  21.8k|    int i, ret = 0;
  404|  21.8k|    const ASN1_VALUE *skitem;
  405|  21.8k|    unsigned char *tmpdat = NULL, *p = NULL;
  406|  21.8k|    DER_ENC *derlst = NULL, *tder;
  407|       |
  408|  21.8k|    if (do_sort) {
  ------------------
  |  Branch (408:9): [True: 21.8k, False: 0]
  ------------------
  409|       |        /* Don't need to sort less than 2 items */
  410|  21.8k|        if (sk_const_ASN1_VALUE_num(sk) < 2)
  ------------------
  |  Branch (410:13): [True: 21.8k, False: 0]
  ------------------
  411|  21.8k|            do_sort = 0;
  412|      0|        else {
  413|      0|            derlst = OPENSSL_malloc(sk_const_ASN1_VALUE_num(sk)
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#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);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  418|      0|            if (tmpdat == NULL)
  ------------------
  |  Branch (418:17): [True: 0, False: 0]
  ------------------
  419|      0|                goto err;
  420|      0|        }
  421|  21.8k|    }
  422|       |    /* If not sorting just output each item */
  423|  21.8k|    if (!do_sort) {
  ------------------
  |  Branch (423:9): [True: 21.8k, False: 0]
  ------------------
  424|  43.6k|        for (i = 0; i < sk_const_ASN1_VALUE_num(sk); i++) {
  ------------------
  |  Branch (424:21): [True: 21.8k, False: 21.8k]
  ------------------
  425|  21.8k|            skitem = sk_const_ASN1_VALUE_value(sk, i);
  426|  21.8k|            ASN1_item_ex_i2d(&skitem, out, item, -1, iclass);
  427|  21.8k|        }
  428|  21.8k|        return 1;
  429|  21.8k|    }
  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);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  457|      0|    OPENSSL_free(tmpdat);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  458|      0|    return ret;
  459|      0|}
tasn_enc.c:asn1_i2d_ex_primitive:
  463|  2.21M|{
  464|  2.21M|    int len;
  465|  2.21M|    int utype;
  466|  2.21M|    int usetag;
  467|  2.21M|    int ndef = 0;
  468|       |
  469|  2.21M|    utype = it->utype;
  470|       |
  471|       |    /*
  472|       |     * Get length of content octets and maybe find out the underlying type.
  473|       |     */
  474|       |
  475|  2.21M|    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|  2.21M|    if ((utype == V_ASN1_SEQUENCE) || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER))
  ------------------
  |  |   76|  2.21M|#define V_ASN1_SEQUENCE 16
  ------------------
                  if ((utype == V_ASN1_SEQUENCE) || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER))
  ------------------
  |  |   77|  2.21M|#define V_ASN1_SET 17
  ------------------
                  if ((utype == V_ASN1_SEQUENCE) || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER))
  ------------------
  |  |   59|  2.21M|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  |  Branch (482:9): [True: 0, False: 2.21M]
  |  Branch (482:39): [True: 0, False: 2.21M]
  |  Branch (482:64): [True: 0, False: 2.21M]
  ------------------
  483|      0|        usetag = 0;
  484|  2.21M|    else
  485|  2.21M|        usetag = 1;
  486|       |
  487|       |    /* -1 means omit type */
  488|       |
  489|  2.21M|    if (len == -1)
  ------------------
  |  Branch (489:9): [True: 960k, False: 1.25M]
  ------------------
  490|   960k|        return 0;
  491|       |
  492|       |    /* -2 return is special meaning use ndef */
  493|  1.25M|    if (len == -2) {
  ------------------
  |  Branch (493:9): [True: 0, False: 1.25M]
  ------------------
  494|      0|        ndef = 2;
  495|      0|        len = 0;
  496|      0|    }
  497|       |
  498|       |    /* If not implicitly tagged get tag from underlying type */
  499|  1.25M|    if (tag == -1)
  ------------------
  |  Branch (499:9): [True: 1.25M, False: 0]
  ------------------
  500|  1.25M|        tag = utype;
  501|       |
  502|       |    /* Output tag+length followed by content octets */
  503|  1.25M|    if (out) {
  ------------------
  |  Branch (503:9): [True: 337k, False: 913k]
  ------------------
  504|   337k|        if (usetag)
  ------------------
  |  Branch (504:13): [True: 337k, False: 0]
  ------------------
  505|   337k|            ASN1_put_object(out, ndef, len, tag, aclass);
  506|   337k|        asn1_ex_i2c(pval, *out, &utype, it);
  507|   337k|        if (ndef)
  ------------------
  |  Branch (507:13): [True: 0, False: 337k]
  ------------------
  508|      0|            ASN1_put_eoc(out);
  509|   337k|        else
  510|   337k|            *out += len;
  511|   337k|    }
  512|       |
  513|  1.25M|    if (usetag)
  ------------------
  |  Branch (513:9): [True: 1.25M, False: 0]
  ------------------
  514|  1.25M|        return ASN1_object_size(ndef, len, tag);
  515|      0|    return len;
  516|  1.25M|}
tasn_enc.c:asn1_ex_i2c:
  522|  2.54M|{
  523|  2.54M|    ASN1_BOOLEAN *tbool = NULL;
  524|  2.54M|    ASN1_STRING *strtmp;
  525|  2.54M|    ASN1_OBJECT *otmp;
  526|  2.54M|    int utype;
  527|  2.54M|    const unsigned char *cont;
  528|  2.54M|    unsigned char c;
  529|  2.54M|    int len;
  530|  2.54M|    const ASN1_PRIMITIVE_FUNCS *pf;
  531|  2.54M|    pf = it->funcs;
  532|  2.54M|    if (pf && pf->prim_i2c)
  ------------------
  |  Branch (532:9): [True: 939k, False: 1.61M]
  |  Branch (532:15): [True: 939k, False: 0]
  ------------------
  533|   939k|        return pf->prim_i2c(pval, cout, putype, it);
  534|       |
  535|       |    /* Should type be omitted? */
  536|  1.61M|    if ((it->itype != ASN1_ITYPE_PRIMITIVE)
  ------------------
  |  |   82|  1.61M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (536:9): [True: 109k, False: 1.50M]
  ------------------
  537|  1.61M|        || (it->utype != V_ASN1_BOOLEAN)) {
  ------------------
  |  |   65|  1.50M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (537:12): [True: 1.50M, False: 0]
  ------------------
  538|  1.61M|        if (*pval == NULL)
  ------------------
  |  Branch (538:13): [True: 659k, False: 950k]
  ------------------
  539|   659k|            return -1;
  540|  1.61M|    }
  541|       |
  542|   950k|    if (it->itype == ASN1_ITYPE_MSTRING) {
  ------------------
  |  |   87|   950k|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (542:9): [True: 109k, False: 841k]
  ------------------
  543|       |        /* If MSTRING type set the underlying type */
  544|   109k|        strtmp = (ASN1_STRING *)*pval;
  545|   109k|        utype = strtmp->type;
  546|   109k|        *putype = utype;
  547|   841k|    } else if (it->utype == V_ASN1_ANY) {
  ------------------
  |  |   60|   841k|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (547:16): [True: 0, False: 841k]
  ------------------
  548|       |        /* If ANY set type and pointer to value */
  549|      0|        ASN1_TYPE *typ;
  550|      0|        typ = (ASN1_TYPE *)*pval;
  551|      0|        utype = typ->type;
  552|      0|        *putype = utype;
  553|      0|        pval = (const ASN1_VALUE **)&typ->value.asn1_value; /* actually is const */
  554|      0|    } else
  555|   841k|        utype = *putype;
  556|       |
  557|   950k|    switch (utype) {
  558|   231k|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|   231k|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (558:5): [True: 231k, False: 718k]
  ------------------
  559|   231k|        otmp = (ASN1_OBJECT *)*pval;
  560|   231k|        cont = otmp->data;
  561|   231k|        len = otmp->length;
  562|   231k|        if (cont == NULL || len == 0)
  ------------------
  |  Branch (562:13): [True: 0, False: 231k]
  |  Branch (562:29): [True: 0, False: 231k]
  ------------------
  563|      0|            return -1;
  564|   231k|        break;
  565|       |
  566|   231k|    case V_ASN1_UNDEF:
  ------------------
  |  |   62|      0|#define V_ASN1_UNDEF -1
  ------------------
  |  Branch (566:5): [True: 0, False: 950k]
  ------------------
  567|      0|        return -2;
  568|       |
  569|      0|    case V_ASN1_NULL:
  ------------------
  |  |   69|      0|#define V_ASN1_NULL 5
  ------------------
  |  Branch (569:5): [True: 0, False: 950k]
  ------------------
  570|      0|        cont = NULL;
  571|      0|        len = 0;
  572|      0|        break;
  573|       |
  574|      0|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|      0|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (574:5): [True: 0, False: 950k]
  ------------------
  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|   100k|    case V_ASN1_BIT_STRING:
  ------------------
  |  |   67|   100k|#define V_ASN1_BIT_STRING 3
  ------------------
  |  Branch (592:5): [True: 100k, False: 849k]
  ------------------
  593|   100k|        return ossl_i2c_ASN1_BIT_STRING((const ASN1_BIT_STRING *)*pval,
  594|   100k|            cout ? &cout : NULL);
  ------------------
  |  Branch (594:13): [True: 21.6k, False: 79.1k]
  ------------------
  595|       |
  596|      0|    case V_ASN1_INTEGER:
  ------------------
  |  |   66|      0|#define V_ASN1_INTEGER 2
  ------------------
  |  Branch (596:5): [True: 0, False: 950k]
  ------------------
  597|      0|    case V_ASN1_ENUMERATED:
  ------------------
  |  |   74|      0|#define V_ASN1_ENUMERATED 10
  ------------------
  |  Branch (597:5): [True: 0, False: 950k]
  ------------------
  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|   508k|    case V_ASN1_OCTET_STRING:
  ------------------
  |  |   68|   508k|#define V_ASN1_OCTET_STRING 4
  ------------------
  |  Branch (603:5): [True: 508k, False: 441k]
  ------------------
  604|   508k|    case V_ASN1_NUMERICSTRING:
  ------------------
  |  |   78|   508k|#define V_ASN1_NUMERICSTRING 18
  ------------------
  |  Branch (604:5): [True: 0, False: 950k]
  ------------------
  605|   508k|    case V_ASN1_PRINTABLESTRING:
  ------------------
  |  |   79|   508k|#define V_ASN1_PRINTABLESTRING 19
  ------------------
  |  Branch (605:5): [True: 0, False: 950k]
  ------------------
  606|   508k|    case V_ASN1_T61STRING:
  ------------------
  |  |   80|   508k|#define V_ASN1_T61STRING 20
  ------------------
  |  Branch (606:5): [True: 0, False: 950k]
  ------------------
  607|   508k|    case V_ASN1_VIDEOTEXSTRING:
  ------------------
  |  |   82|   508k|#define V_ASN1_VIDEOTEXSTRING 21
  ------------------
  |  Branch (607:5): [True: 0, False: 950k]
  ------------------
  608|   508k|    case V_ASN1_IA5STRING:
  ------------------
  |  |   83|   508k|#define V_ASN1_IA5STRING 22
  ------------------
  |  Branch (608:5): [True: 0, False: 950k]
  ------------------
  609|   508k|    case V_ASN1_UTCTIME:
  ------------------
  |  |   84|   508k|#define V_ASN1_UTCTIME 23
  ------------------
  |  Branch (609:5): [True: 0, False: 950k]
  ------------------
  610|   508k|    case V_ASN1_GENERALIZEDTIME:
  ------------------
  |  |   85|   508k|#define V_ASN1_GENERALIZEDTIME 24
  ------------------
  |  Branch (610:5): [True: 0, False: 950k]
  ------------------
  611|   508k|    case V_ASN1_GRAPHICSTRING:
  ------------------
  |  |   86|   508k|#define V_ASN1_GRAPHICSTRING 25
  ------------------
  |  Branch (611:5): [True: 0, False: 950k]
  ------------------
  612|   508k|    case V_ASN1_VISIBLESTRING:
  ------------------
  |  |   88|   508k|#define V_ASN1_VISIBLESTRING 26 /* alias */
  ------------------
  |  Branch (612:5): [True: 0, False: 950k]
  ------------------
  613|   508k|    case V_ASN1_GENERALSTRING:
  ------------------
  |  |   89|   508k|#define V_ASN1_GENERALSTRING 27
  ------------------
  |  Branch (613:5): [True: 0, False: 950k]
  ------------------
  614|   508k|    case V_ASN1_UNIVERSALSTRING:
  ------------------
  |  |   90|   508k|#define V_ASN1_UNIVERSALSTRING 28
  ------------------
  |  Branch (614:5): [True: 0, False: 950k]
  ------------------
  615|   508k|    case V_ASN1_BMPSTRING:
  ------------------
  |  |   91|   508k|#define V_ASN1_BMPSTRING 30
  ------------------
  |  Branch (615:5): [True: 0, False: 950k]
  ------------------
  616|   618k|    case V_ASN1_UTF8STRING:
  ------------------
  |  |   75|   618k|#define V_ASN1_UTF8STRING 12
  ------------------
  |  Branch (616:5): [True: 109k, False: 841k]
  ------------------
  617|   618k|    case V_ASN1_SEQUENCE:
  ------------------
  |  |   76|   618k|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (617:5): [True: 0, False: 950k]
  ------------------
  618|   618k|    case V_ASN1_SET:
  ------------------
  |  |   77|   618k|#define V_ASN1_SET 17
  ------------------
  |  Branch (618:5): [True: 0, False: 950k]
  ------------------
  619|   618k|    default:
  ------------------
  |  Branch (619:5): [True: 0, False: 950k]
  ------------------
  620|       |        /* All based on ASN1_STRING and handled the same */
  621|   618k|        strtmp = (ASN1_STRING *)*pval;
  622|       |        /* Special handling for NDEF */
  623|   618k|        if ((it->size == ASN1_TFLG_NDEF)
  ------------------
  |  |  583|   618k|#define ASN1_TFLG_NDEF (0x1 << 11)
  ------------------
  |  Branch (623:13): [True: 0, False: 618k]
  ------------------
  624|      0|            && (strtmp->flags & ASN1_STRING_FLAG_NDEF)) {
  ------------------
  |  |   29|      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|   618k|        cont = strtmp->data;
  633|   618k|        len = strtmp->length;
  634|       |
  635|   618k|        break;
  636|   950k|    }
  637|   849k|    if (cout && len)
  ------------------
  |  Branch (637:9): [True: 179k, False: 669k]
  |  Branch (637:17): [True: 172k, False: 7.16k]
  ------------------
  638|   172k|        memcpy(cout, cont, len);
  639|   849k|    return len;
  640|   950k|}

ASN1_item_free:
   19|   618k|{
   20|   618k|    ossl_asn1_item_embed_free(&val, it, 0);
   21|   618k|}
ASN1_item_ex_free:
   24|  3.73k|{
   25|  3.73k|    ossl_asn1_item_embed_free(pval, it, 0);
   26|  3.73k|}
ossl_asn1_item_embed_free:
   29|  1.73M|{
   30|  1.73M|    const ASN1_TEMPLATE *tt = NULL, *seqtt;
   31|  1.73M|    const ASN1_EXTERN_FUNCS *ef;
   32|  1.73M|    const ASN1_AUX *aux = it->funcs;
   33|  1.73M|    ASN1_aux_cb *asn1_cb;
   34|  1.73M|    int i;
   35|       |
   36|  1.73M|    if (pval == NULL)
  ------------------
  |  Branch (36:9): [True: 0, False: 1.73M]
  ------------------
   37|      0|        return;
   38|  1.73M|    if ((it->itype != ASN1_ITYPE_PRIMITIVE) && *pval == NULL)
  ------------------
  |  |   82|  1.73M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (38:9): [True: 818k, False: 913k]
  |  Branch (38:48): [True: 411k, False: 407k]
  ------------------
   39|   411k|        return;
   40|  1.32M|    if (aux && aux->asn1_cb)
  ------------------
  |  Branch (40:9): [True: 238k, False: 1.08M]
  |  Branch (40:16): [True: 183k, False: 54.5k]
  ------------------
   41|   183k|        asn1_cb = aux->asn1_cb;
   42|  1.13M|    else
   43|  1.13M|        asn1_cb = 0;
   44|       |
   45|  1.32M|    switch (it->itype) {
  ------------------
  |  Branch (45:13): [True: 1.32M, False: 0]
  ------------------
   46|       |
   47|   913k|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|   913k|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (47:5): [True: 913k, False: 407k]
  ------------------
   48|   913k|        if (it->templates)
  ------------------
  |  Branch (48:13): [True: 43.6k, False: 870k]
  ------------------
   49|  43.6k|            ossl_asn1_template_free(pval, it->templates);
   50|   870k|        else
   51|   870k|            ossl_asn1_primitive_free(pval, it, embed);
   52|   913k|        break;
   53|       |
   54|  65.5k|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  65.5k|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (54:5): [True: 65.5k, False: 1.25M]
  ------------------
   55|  65.5k|        ossl_asn1_primitive_free(pval, it, embed);
   56|  65.5k|        break;
   57|       |
   58|      0|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|      0|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (58:5): [True: 0, False: 1.32M]
  ------------------
   59|      0|        if (asn1_cb) {
  ------------------
  |  Branch (59:13): [True: 0, False: 0]
  ------------------
   60|      0|            i = asn1_cb(ASN1_OP_FREE_PRE, pval, it, NULL);
  ------------------
  |  |  733|      0|#define ASN1_OP_FREE_PRE 2
  ------------------
   61|      0|            if (i == 2)
  ------------------
  |  Branch (61:17): [True: 0, False: 0]
  ------------------
   62|      0|                return;
   63|      0|        }
   64|      0|        i = ossl_asn1_get_choice_selector(pval, it);
   65|      0|        if ((i >= 0) && (i < it->tcount)) {
  ------------------
  |  Branch (65:13): [True: 0, False: 0]
  |  Branch (65:25): [True: 0, False: 0]
  ------------------
   66|      0|            ASN1_VALUE **pchval;
   67|       |
   68|      0|            tt = it->templates + i;
   69|      0|            pchval = ossl_asn1_get_field_ptr(pval, tt);
   70|      0|            ossl_asn1_template_free(pchval, tt);
   71|      0|        }
   72|      0|        if (asn1_cb)
  ------------------
  |  Branch (72:13): [True: 0, False: 0]
  ------------------
   73|      0|            asn1_cb(ASN1_OP_FREE_POST, pval, it, NULL);
  ------------------
  |  |  734|      0|#define ASN1_OP_FREE_POST 3
  ------------------
   74|      0|        if (embed == 0) {
  ------------------
  |  Branch (74:13): [True: 0, False: 0]
  ------------------
   75|      0|            OPENSSL_free(*pval);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   76|      0|            *pval = NULL;
   77|      0|        }
   78|      0|        break;
   79|       |
   80|  43.6k|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|  43.6k|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (80:5): [True: 43.6k, False: 1.27M]
  ------------------
   81|  43.6k|        ef = it->funcs;
   82|  43.6k|        if (ef && ef->asn1_ex_free)
  ------------------
  |  Branch (82:13): [True: 43.6k, False: 0]
  |  Branch (82:19): [True: 43.6k, False: 0]
  ------------------
   83|  43.6k|            ef->asn1_ex_free(pval, it);
   84|  43.6k|        break;
   85|       |
   86|      0|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|      0|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (86:5): [True: 0, False: 1.32M]
  ------------------
   87|   298k|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|   298k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (87:5): [True: 298k, False: 1.02M]
  ------------------
   88|   298k|        if (ossl_asn1_do_lock(pval, -1, it) != 0) {
  ------------------
  |  Branch (88:13): [True: 46.9k, False: 251k]
  ------------------
   89|       |            /* if error or ref-counter > 0 */
   90|  46.9k|            OPENSSL_assert(embed == 0);
  ------------------
  |  |  477|  46.9k|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (477:12): [True: 46.9k, False: 0]
  |  |  ------------------
  ------------------
   91|  46.9k|            *pval = NULL;
   92|  46.9k|            return;
   93|  46.9k|        }
   94|   251k|        if (asn1_cb) {
  ------------------
  |  Branch (94:13): [True: 18.3k, False: 233k]
  ------------------
   95|  18.3k|            i = asn1_cb(ASN1_OP_FREE_PRE, pval, it, NULL);
  ------------------
  |  |  733|  18.3k|#define ASN1_OP_FREE_PRE 2
  ------------------
   96|  18.3k|            if (i == 2)
  ------------------
  |  Branch (96:17): [True: 0, False: 18.3k]
  ------------------
   97|      0|                return;
   98|  18.3k|        }
   99|   251k|        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|   251k|        tt = it->templates + it->tcount;
  106|  1.11M|        for (i = 0; i < it->tcount; i++) {
  ------------------
  |  Branch (106:21): [True: 868k, False: 251k]
  ------------------
  107|   868k|            ASN1_VALUE **pseqval;
  108|       |
  109|   868k|            tt--;
  110|   868k|            seqtt = ossl_asn1_do_adb(*pval, tt, 0);
  111|   868k|            if (!seqtt)
  ------------------
  |  Branch (111:17): [True: 0, False: 868k]
  ------------------
  112|      0|                continue;
  113|   868k|            pseqval = ossl_asn1_get_field_ptr(pval, seqtt);
  114|   868k|            ossl_asn1_template_free(pseqval, seqtt);
  115|   868k|        }
  116|   251k|        if (asn1_cb)
  ------------------
  |  Branch (116:13): [True: 18.3k, False: 233k]
  ------------------
  117|  18.3k|            asn1_cb(ASN1_OP_FREE_POST, pval, it, NULL);
  ------------------
  |  |  734|  18.3k|#define ASN1_OP_FREE_POST 3
  ------------------
  118|   251k|        if (embed == 0) {
  ------------------
  |  Branch (118:13): [True: 207k, False: 43.6k]
  ------------------
  119|   207k|            OPENSSL_free(*pval);
  ------------------
  |  |  132|   207k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  120|       |            *pval = NULL;
  121|   207k|        }
  122|   251k|        break;
  123|  1.32M|    }
  124|  1.32M|}
ossl_asn1_template_free:
  127|  1.14M|{
  128|  1.14M|    int embed = tt->flags & ASN1_TFLG_EMBED;
  ------------------
  |  |  586|  1.14M|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  129|  1.14M|    ASN1_VALUE *tval;
  130|  1.14M|    if (embed) {
  ------------------
  |  Branch (130:9): [True: 238k, False: 908k]
  ------------------
  131|   238k|        tval = (ASN1_VALUE *)pval;
  132|   238k|        pval = &tval;
  133|   238k|    }
  134|  1.14M|    if (tt->flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|  1.14M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (134:9): [True: 91.1k, False: 1.05M]
  ------------------
  135|  91.1k|        STACK_OF(ASN1_VALUE) *sk = (STACK_OF(ASN1_VALUE) *)*pval;
  ------------------
  |  |   33|  91.1k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  136|  91.1k|        int i;
  137|       |
  138|   145k|        for (i = 0; i < sk_ASN1_VALUE_num(sk); i++) {
  ------------------
  |  |  887|   145k|#define sk_ASN1_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_VALUE_sk_type(sk))
  ------------------
  |  Branch (138:21): [True: 54.5k, False: 91.1k]
  ------------------
  139|  54.5k|            ASN1_VALUE *vtmp = sk_ASN1_VALUE_value(sk, i);
  ------------------
  |  |  888|  54.5k|#define sk_ASN1_VALUE_value(sk, idx) ((ASN1_VALUE *)OPENSSL_sk_value(ossl_check_const_ASN1_VALUE_sk_type(sk), (idx)))
  ------------------
  140|       |
  141|  54.5k|            ossl_asn1_item_embed_free(&vtmp, ASN1_ITEM_ptr(tt->item), embed);
  ------------------
  |  |  394|  54.5k|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  142|  54.5k|        }
  143|  91.1k|        sk_ASN1_VALUE_free(sk);
  ------------------
  |  |  893|  91.1k|#define sk_ASN1_VALUE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_VALUE_sk_type(sk))
  ------------------
  144|  91.1k|        *pval = NULL;
  145|  1.05M|    } else {
  146|  1.05M|        ossl_asn1_item_embed_free(pval, ASN1_ITEM_ptr(tt->item), embed);
  ------------------
  |  |  394|  1.05M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  147|  1.05M|    }
  148|  1.14M|}
ossl_asn1_primitive_free:
  151|   975k|{
  152|   975k|    int utype;
  153|       |
  154|       |    /* Special case: if 'it' is a primitive with a free_func, use that. */
  155|   975k|    if (it) {
  ------------------
  |  Branch (155:9): [True: 935k, False: 40.2k]
  ------------------
  156|   935k|        const ASN1_PRIMITIVE_FUNCS *pf = it->funcs;
  157|       |
  158|   935k|        if (embed) {
  ------------------
  |  Branch (158:13): [True: 194k, False: 740k]
  ------------------
  159|   194k|            if (pf && pf->prim_clear) {
  ------------------
  |  Branch (159:17): [True: 118k, False: 76.4k]
  |  Branch (159:23): [True: 118k, False: 0]
  ------------------
  160|   118k|                pf->prim_clear(pval, it);
  161|   118k|                return;
  162|   118k|            }
  163|   740k|        } else if (pf && pf->prim_free) {
  ------------------
  |  Branch (163:20): [True: 0, False: 740k]
  |  Branch (163:26): [True: 0, False: 0]
  ------------------
  164|      0|            pf->prim_free(pval, it);
  165|      0|            return;
  166|      0|        }
  167|   935k|    }
  168|       |
  169|       |    /* Special case: if 'it' is NULL, free contents of ASN1_TYPE */
  170|   857k|    if (!it) {
  ------------------
  |  Branch (170:9): [True: 40.2k, False: 817k]
  ------------------
  171|  40.2k|        ASN1_TYPE *typ = (ASN1_TYPE *)*pval;
  172|       |
  173|  40.2k|        utype = typ->type;
  174|  40.2k|        pval = &typ->value.asn1_value;
  175|  40.2k|        if (*pval == NULL)
  ------------------
  |  Branch (175:13): [True: 0, False: 40.2k]
  ------------------
  176|      0|            return;
  177|   817k|    } else if (it->itype == ASN1_ITYPE_MSTRING) {
  ------------------
  |  |   87|   817k|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (177:16): [True: 65.5k, False: 751k]
  ------------------
  178|  65.5k|        utype = -1;
  179|  65.5k|        if (*pval == NULL)
  ------------------
  |  Branch (179:13): [True: 0, False: 65.5k]
  ------------------
  180|      0|            return;
  181|   751k|    } else {
  182|   751k|        utype = it->utype;
  183|   751k|        if ((utype != V_ASN1_BOOLEAN) && *pval == NULL)
  ------------------
  |  |   65|   751k|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (183:13): [True: 653k, False: 98.1k]
  |  Branch (183:42): [True: 278k, False: 375k]
  ------------------
  184|   278k|            return;
  185|   751k|    }
  186|       |
  187|   579k|    switch (utype) {
  188|   204k|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|   204k|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (188:5): [True: 204k, False: 374k]
  ------------------
  189|   204k|        ASN1_OBJECT_free((ASN1_OBJECT *)*pval);
  190|   204k|        break;
  191|       |
  192|  98.1k|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|  98.1k|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (192:5): [True: 98.1k, False: 481k]
  ------------------
  193|  98.1k|        if (it)
  ------------------
  |  Branch (193:13): [True: 98.1k, False: 0]
  ------------------
  194|  98.1k|            *(ASN1_BOOLEAN *)pval = it->size;
  195|      0|        else
  196|      0|            *(ASN1_BOOLEAN *)pval = -1;
  197|  98.1k|        return;
  198|       |
  199|      0|    case V_ASN1_NULL:
  ------------------
  |  |   69|      0|#define V_ASN1_NULL 5
  ------------------
  |  Branch (199:5): [True: 0, False: 579k]
  ------------------
  200|      0|        break;
  201|       |
  202|  40.2k|    case V_ASN1_ANY:
  ------------------
  |  |   60|  40.2k|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (202:5): [True: 40.2k, False: 538k]
  ------------------
  203|  40.2k|        ossl_asn1_primitive_free(pval, NULL, 0);
  204|  40.2k|        OPENSSL_free(*pval);
  ------------------
  |  |  132|  40.2k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  205|  40.2k|        break;
  206|       |
  207|   236k|    default:
  ------------------
  |  Branch (207:5): [True: 236k, False: 342k]
  ------------------
  208|   236k|        ossl_asn1_string_embed_free((ASN1_STRING *)*pval, embed);
  209|   236k|        break;
  210|   579k|    }
  211|   481k|    *pval = NULL;
  212|   481k|}

ASN1_item_new:
   30|  83.8k|{
   31|  83.8k|    ASN1_VALUE *ret = NULL;
   32|  83.8k|    if (ASN1_item_ex_new(&ret, it) > 0)
  ------------------
  |  Branch (32:9): [True: 83.8k, False: 0]
  ------------------
   33|  83.8k|        return ret;
   34|      0|    return NULL;
   35|  83.8k|}
ASN1_item_new_ex:
   39|  7.18k|{
   40|  7.18k|    ASN1_VALUE *ret = NULL;
   41|  7.18k|    if (asn1_item_embed_new(&ret, it, 0, libctx, propq) > 0)
  ------------------
  |  Branch (41:9): [True: 7.18k, False: 0]
  ------------------
   42|  7.18k|        return ret;
   43|      0|    return NULL;
   44|  7.18k|}
ossl_asn1_item_ex_new_intern:
   50|   134k|{
   51|   134k|    return asn1_item_embed_new(pval, it, 0, libctx, propq);
   52|   134k|}
ASN1_item_ex_new:
   55|  83.8k|{
   56|  83.8k|    return asn1_item_embed_new(pval, it, 0, NULL, NULL);
   57|  83.8k|}
tasn_new.c:asn1_item_embed_new:
   61|   681k|{
   62|   681k|    const ASN1_TEMPLATE *tt = NULL;
   63|   681k|    const ASN1_EXTERN_FUNCS *ef;
   64|   681k|    const ASN1_AUX *aux = it->funcs;
   65|   681k|    ASN1_aux_cb *asn1_cb;
   66|   681k|    ASN1_VALUE **pseqval;
   67|   681k|    int i;
   68|   681k|    if (aux && aux->asn1_cb)
  ------------------
  |  Branch (68:9): [True: 80.1k, False: 601k]
  |  Branch (68:16): [True: 36.4k, False: 43.6k]
  ------------------
   69|  36.4k|        asn1_cb = aux->asn1_cb;
   70|   644k|    else
   71|   644k|        asn1_cb = 0;
   72|       |
   73|   681k|    switch (it->itype) {
  ------------------
  |  Branch (73:13): [True: 681k, False: 0]
  ------------------
   74|       |
   75|  32.7k|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|  32.7k|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (75:5): [True: 32.7k, False: 648k]
  ------------------
   76|  32.7k|        ef = it->funcs;
   77|  32.7k|        if (ef != NULL) {
  ------------------
  |  Branch (77:13): [True: 32.7k, False: 0]
  ------------------
   78|  32.7k|            if (ef->asn1_ex_new_ex != NULL) {
  ------------------
  |  Branch (78:17): [True: 10.9k, False: 21.8k]
  ------------------
   79|  10.9k|                if (!ef->asn1_ex_new_ex(pval, it, libctx, propq))
  ------------------
  |  Branch (79:21): [True: 0, False: 10.9k]
  ------------------
   80|      0|                    goto asn1err;
   81|  21.8k|            } else if (ef->asn1_ex_new != NULL) {
  ------------------
  |  Branch (81:24): [True: 21.8k, False: 0]
  ------------------
   82|  21.8k|                if (!ef->asn1_ex_new(pval, it))
  ------------------
  |  Branch (82:21): [True: 0, False: 21.8k]
  ------------------
   83|      0|                    goto asn1err;
   84|  21.8k|            }
   85|  32.7k|        }
   86|  32.7k|        break;
   87|       |
   88|   342k|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|   342k|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (88:5): [True: 342k, False: 338k]
  ------------------
   89|   342k|        if (it->templates) {
  ------------------
  |  Branch (89:13): [True: 0, False: 342k]
  ------------------
   90|      0|            if (!asn1_template_new(pval, it->templates, libctx, propq))
  ------------------
  |  Branch (90:17): [True: 0, False: 0]
  ------------------
   91|      0|                goto asn1err;
   92|   342k|        } else if (!asn1_primitive_new(pval, it, embed))
  ------------------
  |  Branch (92:20): [True: 0, False: 342k]
  ------------------
   93|      0|            goto asn1err;
   94|   342k|        break;
   95|       |
   96|   342k|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  65.5k|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (96:5): [True: 65.5k, False: 615k]
  ------------------
   97|  65.5k|        if (!asn1_primitive_new(pval, it, embed))
  ------------------
  |  Branch (97:13): [True: 0, False: 65.5k]
  ------------------
   98|      0|            goto asn1err;
   99|  65.5k|        break;
  100|       |
  101|  65.5k|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|      0|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (101:5): [True: 0, False: 681k]
  ------------------
  102|      0|        if (asn1_cb) {
  ------------------
  |  Branch (102:13): [True: 0, False: 0]
  ------------------
  103|      0|            i = asn1_cb(ASN1_OP_NEW_PRE, pval, it, NULL);
  ------------------
  |  |  731|      0|#define ASN1_OP_NEW_PRE 0
  ------------------
  104|      0|            if (!i)
  ------------------
  |  Branch (104:17): [True: 0, False: 0]
  ------------------
  105|      0|                goto auxerr;
  106|      0|            if (i == 2) {
  ------------------
  |  Branch (106:17): [True: 0, False: 0]
  ------------------
  107|      0|                return 1;
  108|      0|            }
  109|      0|        }
  110|      0|        if (embed) {
  ------------------
  |  Branch (110:13): [True: 0, False: 0]
  ------------------
  111|      0|            memset(*pval, 0, it->size);
  112|      0|        } else {
  113|      0|            *pval = OPENSSL_zalloc(it->size);
  ------------------
  |  |  109|      0|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  114|      0|            if (*pval == NULL)
  ------------------
  |  Branch (114:17): [True: 0, False: 0]
  ------------------
  115|      0|                return 0;
  116|      0|        }
  117|      0|        ossl_asn1_set_choice_selector(pval, -1, it);
  118|      0|        if (asn1_cb && !asn1_cb(ASN1_OP_NEW_POST, pval, it, NULL))
  ------------------
  |  |  732|      0|#define ASN1_OP_NEW_POST 1
  ------------------
  |  Branch (118:13): [True: 0, False: 0]
  |  Branch (118:24): [True: 0, False: 0]
  ------------------
  119|      0|            goto auxerr2;
  120|      0|        break;
  121|       |
  122|      0|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|      0|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (122:5): [True: 0, False: 681k]
  ------------------
  123|   240k|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|   240k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (123:5): [True: 240k, False: 440k]
  ------------------
  124|   240k|        if (asn1_cb) {
  ------------------
  |  Branch (124:13): [True: 18.3k, False: 222k]
  ------------------
  125|  18.3k|            i = asn1_cb(ASN1_OP_NEW_PRE, pval, it, NULL);
  ------------------
  |  |  731|  18.3k|#define ASN1_OP_NEW_PRE 0
  ------------------
  126|  18.3k|            if (!i)
  ------------------
  |  Branch (126:17): [True: 0, False: 18.3k]
  ------------------
  127|      0|                goto auxerr;
  128|  18.3k|            if (i == 2) {
  ------------------
  |  Branch (128:17): [True: 0, False: 18.3k]
  ------------------
  129|      0|                return 1;
  130|      0|            }
  131|  18.3k|        }
  132|   240k|        if (embed) {
  ------------------
  |  Branch (132:13): [True: 43.6k, False: 196k]
  ------------------
  133|  43.6k|            memset(*pval, 0, it->size);
  134|   196k|        } else {
  135|   196k|            *pval = OPENSSL_zalloc(it->size);
  ------------------
  |  |  109|   196k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  136|   196k|            if (*pval == NULL)
  ------------------
  |  Branch (136:17): [True: 0, False: 196k]
  ------------------
  137|      0|                return 0;
  138|   196k|        }
  139|       |        /* 0 : init. lock */
  140|   240k|        if (ossl_asn1_do_lock(pval, 0, it) < 0) {
  ------------------
  |  Branch (140:13): [True: 0, False: 240k]
  ------------------
  141|      0|            if (!embed) {
  ------------------
  |  Branch (141:17): [True: 0, False: 0]
  ------------------
  142|      0|                OPENSSL_free(*pval);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  143|      0|                *pval = NULL;
  144|      0|            }
  145|      0|            goto asn1err;
  146|      0|        }
  147|   240k|        ossl_asn1_enc_init(pval, it);
  148|  1.08M|        for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (148:41): [True: 846k, False: 240k]
  ------------------
  149|   846k|            pseqval = ossl_asn1_get_field_ptr(pval, tt);
  150|   846k|            if (!asn1_template_new(pseqval, tt, libctx, propq))
  ------------------
  |  Branch (150:17): [True: 0, False: 846k]
  ------------------
  151|      0|                goto asn1err2;
  152|   846k|        }
  153|   240k|        if (asn1_cb && !asn1_cb(ASN1_OP_NEW_POST, pval, it, NULL))
  ------------------
  |  |  732|  18.3k|#define ASN1_OP_NEW_POST 1
  ------------------
  |  Branch (153:13): [True: 18.3k, False: 222k]
  |  Branch (153:24): [True: 0, False: 18.3k]
  ------------------
  154|      0|            goto auxerr2;
  155|   240k|        break;
  156|   681k|    }
  157|   681k|    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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  169|      0|    return 0;
  170|      0|}
tasn_new.c:asn1_template_new:
  207|   846k|{
  208|   846k|    const ASN1_ITEM *it = ASN1_ITEM_ptr(tt->item);
  ------------------
  |  |  394|   846k|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  209|   846k|    int embed = tt->flags & ASN1_TFLG_EMBED;
  ------------------
  |  |  586|   846k|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  210|   846k|    ASN1_VALUE *tval;
  211|   846k|    int ret;
  212|   846k|    if (embed) {
  ------------------
  |  Branch (212:9): [True: 202k, False: 643k]
  ------------------
  213|   202k|        tval = (ASN1_VALUE *)pval;
  214|   202k|        pval = &tval;
  215|   202k|    }
  216|   846k|    if (tt->flags & ASN1_TFLG_OPTIONAL) {
  ------------------
  |  |  512|   846k|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (216:9): [True: 391k, False: 455k]
  ------------------
  217|   391k|        asn1_template_clear(pval, tt);
  218|   391k|        return 1;
  219|   391k|    }
  220|       |    /* If ANY DEFINED BY nothing to do */
  221|       |
  222|   455k|    if (tt->flags & ASN1_TFLG_ADB_MASK) {
  ------------------
  |  |  572|   455k|#define ASN1_TFLG_ADB_MASK (0x3 << 8)
  ------------------
  |  Branch (222:9): [True: 0, False: 455k]
  ------------------
  223|      0|        *pval = NULL;
  224|      0|        return 1;
  225|      0|    }
  226|       |    /* If SET OF or SEQUENCE OF, its a STACK */
  227|   455k|    if (tt->flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|   455k|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (227:9): [True: 0, False: 455k]
  ------------------
  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_set_thunks(OPENSSL_sk_new_null(), sk_ASN1_VALUE_freefunc_thunk))
  ------------------
  230|      0|        if (!skval) {
  ------------------
  |  Branch (230:13): [True: 0, False: 0]
  ------------------
  231|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      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|   455k|    ret = asn1_item_embed_new(pval, it, embed, libctx, propq);
  241|   455k|done:
  242|   455k|    return ret;
  243|   455k|}
tasn_new.c:asn1_template_clear:
  246|   391k|{
  247|       |    /* If ADB or STACK just NULL the field */
  248|   391k|    if (tt->flags & (ASN1_TFLG_ADB_MASK | ASN1_TFLG_SK_MASK))
  ------------------
  |  |  572|   391k|#define ASN1_TFLG_ADB_MASK (0x3 << 8)
  ------------------
                  if (tt->flags & (ASN1_TFLG_ADB_MASK | ASN1_TFLG_SK_MASK))
  ------------------
  |  |  528|   391k|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (248:9): [True: 29.2k, False: 361k]
  ------------------
  249|  29.2k|        *pval = NULL;
  250|   361k|    else
  251|   361k|        asn1_item_clear(pval, ASN1_ITEM_ptr(tt->item));
  ------------------
  |  |  394|   361k|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  252|   391k|}
tasn_new.c:asn1_item_clear:
  173|   361k|{
  174|   361k|    const ASN1_EXTERN_FUNCS *ef;
  175|       |
  176|   361k|    switch (it->itype) {
  ------------------
  |  Branch (176:13): [True: 361k, False: 0]
  ------------------
  177|       |
  178|      0|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|      0|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (178:5): [True: 0, False: 361k]
  ------------------
  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|   350k|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|   350k|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (186:5): [True: 350k, False: 10.9k]
  ------------------
  187|   350k|        if (it->templates)
  ------------------
  |  Branch (187:13): [True: 0, False: 350k]
  ------------------
  188|      0|            asn1_template_clear(pval, it->templates);
  189|   350k|        else
  190|   350k|            asn1_primitive_clear(pval, it);
  191|   350k|        break;
  192|       |
  193|      0|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|      0|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (193:5): [True: 0, False: 361k]
  ------------------
  194|      0|        asn1_primitive_clear(pval, it);
  195|      0|        break;
  196|       |
  197|  3.73k|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|  3.73k|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (197:5): [True: 3.73k, False: 358k]
  ------------------
  198|  10.9k|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  10.9k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (198:5): [True: 7.16k, False: 354k]
  ------------------
  199|  10.9k|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|  10.9k|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (199:5): [True: 0, False: 361k]
  ------------------
  200|       |        *pval = NULL;
  201|  10.9k|        break;
  202|   361k|    }
  203|   361k|}
tasn_new.c:asn1_primitive_clear:
  326|   350k|{
  327|   350k|    int utype;
  328|   350k|    if (it && it->funcs) {
  ------------------
  |  Branch (328:9): [True: 350k, False: 0]
  |  Branch (328:15): [True: 64.5k, False: 286k]
  ------------------
  329|  64.5k|        const ASN1_PRIMITIVE_FUNCS *pf = it->funcs;
  330|  64.5k|        if (pf->prim_clear)
  ------------------
  |  Branch (330:13): [True: 64.5k, False: 0]
  ------------------
  331|  64.5k|            pf->prim_clear(pval, it);
  332|      0|        else
  333|      0|            *pval = NULL;
  334|  64.5k|        return;
  335|  64.5k|    }
  336|   286k|    if (!it || (it->itype == ASN1_ITYPE_MSTRING))
  ------------------
  |  |   87|   286k|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (336:9): [True: 0, False: 286k]
  |  Branch (336:16): [True: 0, False: 286k]
  ------------------
  337|      0|        utype = -1;
  338|   286k|    else
  339|   286k|        utype = it->utype;
  340|   286k|    if (utype == V_ASN1_BOOLEAN)
  ------------------
  |  |   65|   286k|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (340:9): [True: 65.4k, False: 221k]
  ------------------
  341|  65.4k|        *(ASN1_BOOLEAN *)pval = it->size;
  342|   221k|    else
  343|   221k|        *pval = NULL;
  344|   286k|}
tasn_new.c:asn1_primitive_new:
  261|   408k|{
  262|   408k|    ASN1_TYPE *typ;
  263|   408k|    ASN1_STRING *str;
  264|   408k|    int utype;
  265|       |
  266|   408k|    if (!it)
  ------------------
  |  Branch (266:9): [True: 0, False: 408k]
  ------------------
  267|      0|        return 0;
  268|       |
  269|   408k|    if (it->funcs) {
  ------------------
  |  Branch (269:9): [True: 18.0k, False: 390k]
  ------------------
  270|  18.0k|        const ASN1_PRIMITIVE_FUNCS *pf = it->funcs;
  271|  18.0k|        if (embed) {
  ------------------
  |  Branch (271:13): [True: 18.0k, False: 0]
  ------------------
  272|  18.0k|            if (pf->prim_clear) {
  ------------------
  |  Branch (272:17): [True: 18.0k, False: 0]
  ------------------
  273|  18.0k|                pf->prim_clear(pval, it);
  274|  18.0k|                return 1;
  275|  18.0k|            }
  276|  18.0k|        } else if (pf->prim_new) {
  ------------------
  |  Branch (276:20): [True: 0, False: 0]
  ------------------
  277|      0|            return pf->prim_new(pval, it);
  278|      0|        }
  279|  18.0k|    }
  280|       |
  281|   390k|    if (it->itype == ASN1_ITYPE_MSTRING)
  ------------------
  |  |   87|   390k|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (281:9): [True: 65.5k, False: 324k]
  ------------------
  282|  65.5k|        utype = -1;
  283|   324k|    else
  284|   324k|        utype = it->utype;
  285|   390k|    switch (utype) {
  286|   164k|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|   164k|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (286:5): [True: 164k, False: 226k]
  ------------------
  287|   164k|        *pval = (ASN1_VALUE *)OBJ_nid2obj(NID_undef);
  ------------------
  |  |   18|   164k|#define NID_undef                       0
  ------------------
  288|   164k|        return 1;
  289|       |
  290|      0|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|      0|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (290:5): [True: 0, False: 390k]
  ------------------
  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: 390k]
  ------------------
  295|      0|        *pval = (ASN1_VALUE *)1;
  296|      0|        return 1;
  297|       |
  298|  40.2k|    case V_ASN1_ANY:
  ------------------
  |  |   60|  40.2k|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (298:5): [True: 40.2k, False: 349k]
  ------------------
  299|  40.2k|        if ((typ = OPENSSL_malloc(sizeof(*typ))) == NULL)
  ------------------
  |  |  107|  40.2k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (299:13): [True: 0, False: 40.2k]
  ------------------
  300|      0|            return 0;
  301|  40.2k|        typ->value.ptr = NULL;
  302|  40.2k|        typ->type = -1;
  303|  40.2k|        *pval = (ASN1_VALUE *)typ;
  304|  40.2k|        break;
  305|       |
  306|   185k|    default:
  ------------------
  |  Branch (306:5): [True: 185k, False: 204k]
  ------------------
  307|   185k|        if (embed) {
  ------------------
  |  Branch (307:13): [True: 76.4k, False: 109k]
  ------------------
  308|  76.4k|            str = *(ASN1_STRING **)pval;
  309|  76.4k|            memset(str, 0, sizeof(*str));
  310|  76.4k|            str->type = utype;
  311|  76.4k|            str->flags = ASN1_STRING_FLAG_EMBED;
  ------------------
  |  |   44|  76.4k|#define ASN1_STRING_FLAG_EMBED 0x080
  ------------------
  312|   109k|        } else {
  313|   109k|            str = ASN1_STRING_type_new(utype);
  314|   109k|            *pval = (ASN1_VALUE *)str;
  315|   109k|        }
  316|   185k|        if (it->itype == ASN1_ITYPE_MSTRING && str)
  ------------------
  |  |   87|   371k|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (316:13): [True: 65.5k, False: 120k]
  |  Branch (316:48): [True: 65.5k, False: 0]
  ------------------
  317|  65.5k|            str->flags |= ASN1_STRING_FLAG_MSTRING;
  ------------------
  |  |   42|  65.5k|#define ASN1_STRING_FLAG_MSTRING 0x040
  ------------------
  318|   185k|        break;
  319|   390k|    }
  320|   226k|    if (*pval)
  ------------------
  |  Branch (320:9): [True: 226k, False: 0]
  ------------------
  321|   226k|        return 1;
  322|      0|    return 0;
  323|   226k|}

ASN1_OCTET_STRING_free:
   26|  54.4k|    {                                                          \
   27|  54.4k|        ASN1_STRING_free(x);                                   \
   28|  54.4k|    }
ASN1_INTEGER_new:
   22|  10.9k|    {                                                          \
   23|  10.9k|        return ASN1_STRING_type_new(V_##sname);                \
  ------------------
  |  |   66|  10.9k|#define V_ASN1_INTEGER 2
  ------------------
   24|  10.9k|    }                                                          \
ASN1_BIT_STRING_new:
   22|  47.3k|    {                                                          \
   23|  47.3k|        return ASN1_STRING_type_new(V_##sname);                \
  ------------------
  |  |   67|  47.3k|#define V_ASN1_BIT_STRING 3
  ------------------
   24|  47.3k|    }                                                          \
ASN1_BIT_STRING_free:
   26|  32.6k|    {                                                          \
   27|  32.6k|        ASN1_STRING_free(x);                                   \
   28|  32.6k|    }

ossl_asn1_do_lock:
   69|   538k|{
   70|   538k|    const ASN1_AUX *aux;
   71|   538k|    CRYPTO_RWLOCK **lock;
   72|   538k|    CRYPTO_REF_COUNT *refcnt;
   73|   538k|    int ret = -1;
   74|       |
   75|   538k|    if ((it->itype != ASN1_ITYPE_SEQUENCE)
  ------------------
  |  |   83|   538k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (75:9): [True: 0, False: 538k]
  ------------------
   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|   538k|    aux = it->funcs;
   79|   538k|    if (aux == NULL || (aux->flags & ASN1_AFLG_REFCOUNT) == 0)
  ------------------
  |  |  721|   105k|#define ASN1_AFLG_REFCOUNT 1
  ------------------
  |  Branch (79:9): [True: 433k, False: 105k]
  |  Branch (79:24): [True: 36.7k, False: 68.7k]
  ------------------
   80|   470k|        return 0;
   81|  68.7k|    lock = offset2ptr(*pval, aux->ref_lock);
  ------------------
  |  |   23|  68.7k|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
   82|  68.7k|    refcnt = offset2ptr(*pval, aux->ref_offset);
  ------------------
  |  |   23|  68.7k|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
   83|       |
   84|  68.7k|    switch (op) {
  ------------------
  |  Branch (84:13): [True: 68.7k, False: 0]
  ------------------
   85|  10.9k|    case 0:
  ------------------
  |  Branch (85:5): [True: 10.9k, False: 57.8k]
  ------------------
   86|  10.9k|        if (!CRYPTO_NEW_REF(refcnt, 1))
  ------------------
  |  Branch (86:13): [True: 0, False: 10.9k]
  ------------------
   87|      0|            return -1;
   88|  10.9k|        *lock = CRYPTO_THREAD_lock_new();
   89|  10.9k|        if (*lock == NULL) {
  ------------------
  |  Branch (89:13): [True: 0, False: 10.9k]
  ------------------
   90|      0|            CRYPTO_FREE_REF(refcnt);
   91|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   92|      0|            return -1;
   93|      0|        }
   94|  10.9k|        ret = 1;
   95|  10.9k|        break;
   96|      0|    case 1:
  ------------------
  |  Branch (96:5): [True: 0, False: 68.7k]
  ------------------
   97|      0|        if (!CRYPTO_UP_REF(refcnt, &ret))
  ------------------
  |  Branch (97:13): [True: 0, False: 0]
  ------------------
   98|      0|            return -1;
   99|      0|        break;
  100|  57.8k|    case -1:
  ------------------
  |  Branch (100:5): [True: 57.8k, False: 10.9k]
  ------------------
  101|  57.8k|        if (!CRYPTO_DOWN_REF(refcnt, &ret))
  ------------------
  |  Branch (101:13): [True: 0, False: 57.8k]
  ------------------
  102|      0|            return -1; /* failed */
  103|  57.8k|        REF_PRINT_EX(it->sname, ret, (void *)it);
  ------------------
  |  |  299|  57.8k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  ------------------
  |  |  |  |  295|  57.8k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|  57.8k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  104|  57.8k|        REF_ASSERT_ISNT(ret < 0);
  ------------------
  |  |  293|  57.8k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 57.8k]
  |  |  ------------------
  ------------------
  105|  57.8k|        if (ret == 0) {
  ------------------
  |  Branch (105:13): [True: 10.9k, False: 46.9k]
  ------------------
  106|  10.9k|            CRYPTO_THREAD_lock_free(*lock);
  107|  10.9k|            *lock = NULL;
  108|  10.9k|            CRYPTO_FREE_REF(refcnt);
  109|  10.9k|        }
  110|  57.8k|        break;
  111|  68.7k|    }
  112|       |
  113|  68.7k|    return ret;
  114|  68.7k|}
ossl_asn1_enc_init:
  142|   240k|{
  143|   240k|    ASN1_ENCODING *enc = asn1_get_enc_ptr(pval, it);
  144|       |
  145|   240k|    if (enc != NULL) {
  ------------------
  |  Branch (145:9): [True: 10.9k, False: 229k]
  ------------------
  146|       |        enc->enc = NULL;
  147|  10.9k|        enc->len = 0;
  148|  10.9k|        enc->modified = 1;
  149|  10.9k|    }
  150|   240k|}
ossl_asn1_enc_free:
  153|   251k|{
  154|   251k|    ASN1_ENCODING *enc = asn1_get_enc_ptr(pval, it);
  155|       |
  156|   251k|    if (enc != NULL) {
  ------------------
  |  Branch (156:9): [True: 10.9k, False: 240k]
  ------------------
  157|  10.9k|        OPENSSL_free(enc->enc);
  ------------------
  |  |  132|  10.9k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  158|       |        enc->enc = NULL;
  159|  10.9k|        enc->len = 0;
  160|  10.9k|        enc->modified = 1;
  161|  10.9k|    }
  162|   251k|}
ossl_asn1_enc_save:
  166|   243k|{
  167|   243k|    ASN1_ENCODING *enc = asn1_get_enc_ptr(pval, it);
  168|       |
  169|   243k|    if (enc == NULL)
  ------------------
  |  Branch (169:9): [True: 233k, False: 10.9k]
  ------------------
  170|   233k|        return 1;
  171|       |
  172|  10.9k|    OPENSSL_free(enc->enc);
  ------------------
  |  |  132|  10.9k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  173|  10.9k|    if (inlen <= 0) {
  ------------------
  |  Branch (173:9): [True: 0, False: 10.9k]
  ------------------
  174|      0|        enc->enc = NULL;
  175|      0|        return 0;
  176|      0|    }
  177|  10.9k|    if ((enc->enc = OPENSSL_malloc(inlen)) == NULL)
  ------------------
  |  |  107|  10.9k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (177:9): [True: 0, False: 10.9k]
  ------------------
  178|      0|        return 0;
  179|  10.9k|    memcpy(enc->enc, in, inlen);
  180|  10.9k|    enc->len = inlen;
  181|  10.9k|    enc->modified = 0;
  182|       |
  183|  10.9k|    return 1;
  184|  10.9k|}
ossl_asn1_enc_restore:
  188|   324k|{
  189|   324k|    const ASN1_ENCODING *enc = asn1_get_const_enc_ptr(pval, it);
  190|       |
  191|   324k|    if (enc == NULL || enc->modified)
  ------------------
  |  Branch (191:9): [True: 245k, False: 79.1k]
  |  Branch (191:24): [True: 0, False: 79.1k]
  ------------------
  192|   245k|        return 0;
  193|  79.1k|    if (out) {
  ------------------
  |  Branch (193:9): [True: 21.6k, False: 57.5k]
  ------------------
  194|  21.6k|        memcpy(*out, enc->enc, enc->len);
  195|  21.6k|        *out += enc->len;
  196|  21.6k|    }
  197|  79.1k|    if (len != NULL)
  ------------------
  |  Branch (197:9): [True: 79.1k, False: 0]
  ------------------
  198|  79.1k|        *len = enc->len;
  199|  79.1k|    return 1;
  200|   324k|}
ossl_asn1_get_field_ptr:
  204|  2.63M|{
  205|  2.63M|    ASN1_VALUE **pvaltmp = offset2ptr(*pval, tt->offset);
  ------------------
  |  |   23|  2.63M|#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|  2.63M|    return pvaltmp;
  212|  2.63M|}
ossl_asn1_get_const_field_ptr:
  217|  2.29M|{
  218|  2.29M|    return offset2ptr(*pval, tt->offset);
  ------------------
  |  |   23|  2.29M|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
  219|  2.29M|}
ossl_asn1_do_adb:
  229|  4.07M|{
  230|  4.07M|    const ASN1_ADB *adb;
  231|  4.07M|    const ASN1_ADB_TABLE *atbl;
  232|  4.07M|    long selector;
  233|  4.07M|    const ASN1_VALUE **sfld;
  234|  4.07M|    int i;
  235|       |
  236|  4.07M|    if ((tt->flags & ASN1_TFLG_ADB_MASK) == 0)
  ------------------
  |  |  572|  4.07M|#define ASN1_TFLG_ADB_MASK (0x3 << 8)
  ------------------
  |  Branch (236:9): [True: 4.07M, False: 0]
  ------------------
  237|  4.07M|        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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  289|       |    return NULL;
  290|      0|}
tasn_utl.c:asn1_get_enc_ptr:
  117|   735k|{
  118|   735k|    const ASN1_AUX *aux;
  119|       |
  120|   735k|    if (pval == NULL || *pval == NULL)
  ------------------
  |  Branch (120:9): [True: 0, False: 735k]
  |  Branch (120:25): [True: 0, False: 735k]
  ------------------
  121|      0|        return NULL;
  122|   735k|    aux = it->funcs;
  123|   735k|    if (aux == NULL || (aux->flags & ASN1_AFLG_ENCODING) == 0)
  ------------------
  |  |  723|  87.9k|#define ASN1_AFLG_ENCODING 2
  ------------------
  |  Branch (123:9): [True: 648k, False: 87.9k]
  |  Branch (123:24): [True: 55.1k, False: 32.7k]
  ------------------
  124|   703k|        return NULL;
  125|  32.7k|    return offset2ptr(*pval, aux->enc_offset);
  ------------------
  |  |   23|  32.7k|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
  126|   735k|}
tasn_utl.c:asn1_get_const_enc_ptr:
  130|   324k|{
  131|   324k|    const ASN1_AUX *aux;
  132|       |
  133|   324k|    if (pval == NULL || *pval == NULL)
  ------------------
  |  Branch (133:9): [True: 0, False: 324k]
  |  Branch (133:25): [True: 0, False: 324k]
  ------------------
  134|      0|        return NULL;
  135|   324k|    aux = it->funcs;
  136|   324k|    if (aux == NULL || (aux->flags & ASN1_AFLG_ENCODING) == 0)
  ------------------
  |  |  723|   136k|#define ASN1_AFLG_ENCODING 2
  ------------------
  |  Branch (136:9): [True: 187k, False: 136k]
  |  Branch (136:24): [True: 57.5k, False: 79.1k]
  ------------------
  137|   245k|        return NULL;
  138|  79.1k|    return offset2ptr(*pval, aux->enc_offset);
  ------------------
  |  |   23|  79.1k|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
  139|   324k|}

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

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

INT32_it:
  249|  97.2k|ASN1_ITEM_start(INT32)
  ------------------
  |  |   97|  97.2k|    {                                  \
  |  |   98|  97.2k|        static const ASN1_ITEM local_it = {
  ------------------
  250|  97.2k|    ASN1_ITYPE_PRIMITIVE,
  ------------------
  |  |   82|  97.2k|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  251|  97.2k|    V_ASN1_INTEGER, NULL, 0, &uint32_pf,
  ------------------
  |  |   66|  97.2k|#define V_ASN1_INTEGER 2
  ------------------
  252|  97.2k|    INTxx_FLAG_SIGNED, "INT32" ASN1_ITEM_end(INT32)
  ------------------
  |  |   27|  97.2k|#define INTxx_FLAG_SIGNED (1 << 1)
  ------------------
                  INTxx_FLAG_SIGNED, "INT32" ASN1_ITEM_end(INT32)
  ------------------
  |  |  104|  97.2k|    }                         \
  |  |  105|  97.2k|    ;                         \
  |  |  106|  97.2k|    return &local_it;         \
  |  |  107|  97.2k|    }
  ------------------
UINT32_it:
  254|   200k|                           ASN1_ITEM_start(UINT32) ASN1_ITYPE_PRIMITIVE,
  ------------------
  |  |   97|   200k|    {                                  \
  |  |   98|   200k|        static const ASN1_ITEM local_it = {
  ------------------
                                         ASN1_ITEM_start(UINT32) ASN1_ITYPE_PRIMITIVE,
  ------------------
  |  |   82|   200k|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  255|   200k|    V_ASN1_INTEGER, NULL, 0, &uint32_pf, 0, "UINT32" ASN1_ITEM_end(UINT32)
  ------------------
  |  |   66|   200k|#define V_ASN1_INTEGER 2
  ------------------
                  V_ASN1_INTEGER, NULL, 0, &uint32_pf, 0, "UINT32" ASN1_ITEM_end(UINT32)
  ------------------
  |  |  104|   200k|    }                         \
  |  |  105|   200k|    ;                         \
  |  |  106|   200k|    return &local_it;         \
  |  |  107|   200k|    }
  ------------------
ZINT32_it:
  264|  93.3k|                                                ASN1_ITEM_start(ZINT32) ASN1_ITYPE_PRIMITIVE,
  ------------------
  |  |   97|  93.3k|    {                                  \
  |  |   98|  93.3k|        static const ASN1_ITEM local_it = {
  ------------------
                                                              ASN1_ITEM_start(ZINT32) ASN1_ITYPE_PRIMITIVE,
  ------------------
  |  |   82|  93.3k|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  265|  93.3k|    V_ASN1_INTEGER, NULL, 0, &uint32_pf,
  ------------------
  |  |   66|  93.3k|#define V_ASN1_INTEGER 2
  ------------------
  266|  93.3k|    INTxx_FLAG_ZERO_DEFAULT | INTxx_FLAG_SIGNED, "ZINT32" ASN1_ITEM_end(ZINT32)
  ------------------
  |  |   26|  93.3k|#define INTxx_FLAG_ZERO_DEFAULT (1 << 0)
  ------------------
                  INTxx_FLAG_ZERO_DEFAULT | INTxx_FLAG_SIGNED, "ZINT32" ASN1_ITEM_end(ZINT32)
  ------------------
  |  |   27|  93.3k|#define INTxx_FLAG_SIGNED (1 << 1)
  ------------------
                  INTxx_FLAG_ZERO_DEFAULT | INTxx_FLAG_SIGNED, "ZINT32" ASN1_ITEM_end(ZINT32)
  ------------------
  |  |  104|  93.3k|    }                         \
  |  |  105|  93.3k|    ;                         \
  |  |  106|  93.3k|    return &local_it;         \
  |  |  107|  93.3k|    }
  ------------------
ZUINT32_it:
  268|   301k|                                                     ASN1_ITEM_start(ZUINT32) ASN1_ITYPE_PRIMITIVE,
  ------------------
  |  |   97|   301k|    {                                  \
  |  |   98|   301k|        static const ASN1_ITEM local_it = {
  ------------------
                                                                   ASN1_ITEM_start(ZUINT32) ASN1_ITYPE_PRIMITIVE,
  ------------------
  |  |   82|   301k|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  269|   301k|    V_ASN1_INTEGER, NULL, 0, &uint32_pf,
  ------------------
  |  |   66|   301k|#define V_ASN1_INTEGER 2
  ------------------
  270|   301k|    INTxx_FLAG_ZERO_DEFAULT, "ZUINT32" ASN1_ITEM_end(ZUINT32)
  ------------------
  |  |   26|   301k|#define INTxx_FLAG_ZERO_DEFAULT (1 << 0)
  ------------------
                  INTxx_FLAG_ZERO_DEFAULT, "ZUINT32" ASN1_ITEM_end(ZUINT32)
  ------------------
  |  |  104|   301k|    }                         \
  |  |  105|   301k|    ;                         \
  |  |  106|   301k|    return &local_it;         \
  |  |  107|   301k|    }
  ------------------
ZINT64_it:
  272|   229k|                                 ASN1_ITEM_start(ZINT64) ASN1_ITYPE_PRIMITIVE,
  ------------------
  |  |   97|   229k|    {                                  \
  |  |   98|   229k|        static const ASN1_ITEM local_it = {
  ------------------
                                               ASN1_ITEM_start(ZINT64) ASN1_ITYPE_PRIMITIVE,
  ------------------
  |  |   82|   229k|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  273|   229k|    V_ASN1_INTEGER, NULL, 0, &uint64_pf,
  ------------------
  |  |   66|   229k|#define V_ASN1_INTEGER 2
  ------------------
  274|   229k|    INTxx_FLAG_ZERO_DEFAULT | INTxx_FLAG_SIGNED, "ZINT64" ASN1_ITEM_end(ZINT64)
  ------------------
  |  |   26|   229k|#define INTxx_FLAG_ZERO_DEFAULT (1 << 0)
  ------------------
                  INTxx_FLAG_ZERO_DEFAULT | INTxx_FLAG_SIGNED, "ZINT64" ASN1_ITEM_end(ZINT64)
  ------------------
  |  |   27|   229k|#define INTxx_FLAG_SIGNED (1 << 1)
  ------------------
                  INTxx_FLAG_ZERO_DEFAULT | INTxx_FLAG_SIGNED, "ZINT64" ASN1_ITEM_end(ZINT64)
  ------------------
  |  |  104|   229k|    }                         \
  |  |  105|   229k|    ;                         \
  |  |  106|   229k|    return &local_it;         \
  |  |  107|   229k|    }
  ------------------
ZUINT64_it:
  276|   193k|                                                     ASN1_ITEM_start(ZUINT64) ASN1_ITYPE_PRIMITIVE,
  ------------------
  |  |   97|   193k|    {                                  \
  |  |   98|   193k|        static const ASN1_ITEM local_it = {
  ------------------
                                                                   ASN1_ITEM_start(ZUINT64) ASN1_ITYPE_PRIMITIVE,
  ------------------
  |  |   82|   193k|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  277|   193k|    V_ASN1_INTEGER, NULL, 0, &uint64_pf,
  ------------------
  |  |   66|   193k|#define V_ASN1_INTEGER 2
  ------------------
  278|   193k|    INTxx_FLAG_ZERO_DEFAULT, "ZUINT64" ASN1_ITEM_end(ZUINT64)
  ------------------
  |  |   26|   193k|#define INTxx_FLAG_ZERO_DEFAULT (1 << 0)
  ------------------
                  INTxx_FLAG_ZERO_DEFAULT, "ZUINT64" ASN1_ITEM_end(ZUINT64)
  ------------------
  |  |  104|   193k|    }                         \
  |  |  105|   193k|    ;                         \
  |  |  106|   193k|    return &local_it;         \
  |  |  107|   193k|    }
  ------------------
x_int64.c:uint32_clear:
  136|   129k|{
  137|   129k|    **(uint32_t **)pval = 0;
  138|   129k|}
x_int64.c:uint32_c2i:
  173|  32.4k|{
  174|  32.4k|    uint64_t utmp = 0;
  175|  32.4k|    uint32_t utmp2 = 0;
  176|  32.4k|    char *cp;
  177|  32.4k|    int neg = 0;
  178|       |
  179|  32.4k|    if (*pval == NULL && !uint64_new(pval, it))
  ------------------
  |  Branch (179:9): [True: 0, False: 32.4k]
  |  Branch (179:26): [True: 0, False: 0]
  ------------------
  180|      0|        return 0;
  181|       |
  182|  32.4k|    cp = (char *)*pval;
  183|       |
  184|       |    /*
  185|       |     * Strictly speaking, zero length is malformed.  However, long_c2i
  186|       |     * (x_long.c) encodes 0 as a zero length INTEGER (wrongly, of course),
  187|       |     * so for the sake of backward compatibility, we still decode zero
  188|       |     * length INTEGERs as the number zero.
  189|       |     */
  190|  32.4k|    if (len == 0)
  ------------------
  |  Branch (190:9): [True: 0, False: 32.4k]
  ------------------
  191|      0|        goto long_compat;
  192|       |
  193|  32.4k|    if (!ossl_c2i_uint64_int(&utmp, &neg, &cont, len))
  ------------------
  |  Branch (193:9): [True: 0, False: 32.4k]
  ------------------
  194|      0|        return 0;
  195|  32.4k|    if ((it->size & INTxx_FLAG_SIGNED) == 0 && neg) {
  ------------------
  |  |   27|  32.4k|#define INTxx_FLAG_SIGNED (1 << 1)
  ------------------
  |  Branch (195:9): [True: 21.5k, False: 10.9k]
  |  Branch (195:48): [True: 0, False: 21.5k]
  ------------------
  196|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_NEGATIVE_VALUE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  197|      0|        return 0;
  198|      0|    }
  199|  32.4k|    if (neg) {
  ------------------
  |  Branch (199:9): [True: 0, False: 32.4k]
  ------------------
  200|      0|        if (utmp > ABS_INT32_MIN) {
  ------------------
  |  |  169|      0|#define ABS_INT32_MIN ((uint32_t)INT32_MAX + 1)
  ------------------
  |  Branch (200:13): [True: 0, False: 0]
  ------------------
  201|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  202|      0|            return 0;
  203|      0|        }
  204|      0|        utmp = 0 - utmp;
  205|  32.4k|    } else {
  206|  32.4k|        if (((it->size & INTxx_FLAG_SIGNED) != 0 && utmp > INT32_MAX)
  ------------------
  |  |   27|  32.4k|#define INTxx_FLAG_SIGNED (1 << 1)
  ------------------
  |  Branch (206:14): [True: 10.9k, False: 21.5k]
  |  Branch (206:53): [True: 0, False: 10.9k]
  ------------------
  207|  32.4k|            || ((it->size & INTxx_FLAG_SIGNED) == 0 && utmp > UINT32_MAX)) {
  ------------------
  |  |   27|  32.4k|#define INTxx_FLAG_SIGNED (1 << 1)
  ------------------
  |  Branch (207:17): [True: 21.5k, False: 10.9k]
  |  Branch (207:56): [True: 0, False: 21.5k]
  ------------------
  208|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LARGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  209|      0|            return 0;
  210|      0|        }
  211|  32.4k|    }
  212|       |
  213|  32.4k|long_compat:
  214|  32.4k|    utmp2 = (uint32_t)utmp;
  215|  32.4k|    memcpy(cp, &utmp2, sizeof(utmp2));
  216|  32.4k|    return 1;
  217|  32.4k|}
x_int64.c:uint32_i2c:
  142|   580k|{
  143|   580k|    uint32_t utmp;
  144|   580k|    int neg = 0;
  145|       |    /* this exists to bypass broken gcc optimization */
  146|   580k|    char *cp = (char *)*pval;
  147|       |
  148|       |    /* use memcpy, because we may not be uint32_t aligned */
  149|   580k|    memcpy(&utmp, cp, sizeof(utmp));
  150|       |
  151|   580k|    if ((it->size & INTxx_FLAG_ZERO_DEFAULT) == INTxx_FLAG_ZERO_DEFAULT
  ------------------
  |  |   26|   580k|#define INTxx_FLAG_ZERO_DEFAULT (1 << 0)
  ------------------
                  if ((it->size & INTxx_FLAG_ZERO_DEFAULT) == INTxx_FLAG_ZERO_DEFAULT
  ------------------
  |  |   26|  1.16M|#define INTxx_FLAG_ZERO_DEFAULT (1 << 0)
  ------------------
  |  Branch (151:9): [True: 301k, False: 279k]
  ------------------
  152|   301k|        && utmp == 0)
  ------------------
  |  Branch (152:12): [True: 193k, False: 108k]
  ------------------
  153|   193k|        return -1;
  154|   387k|    if ((it->size & INTxx_FLAG_SIGNED) == INTxx_FLAG_SIGNED
  ------------------
  |  |   27|   387k|#define INTxx_FLAG_SIGNED (1 << 1)
  ------------------
                  if ((it->size & INTxx_FLAG_SIGNED) == INTxx_FLAG_SIGNED
  ------------------
  |  |   27|   775k|#define INTxx_FLAG_SIGNED (1 << 1)
  ------------------
  |  Branch (154:9): [True: 86.7k, False: 301k]
  ------------------
  155|  86.7k|        && (int32_t)utmp < 0) {
  ------------------
  |  Branch (155:12): [True: 0, False: 86.7k]
  ------------------
  156|       |        /* ossl_i2c_uint64_int() assumes positive values */
  157|      0|        utmp = 0 - utmp;
  158|      0|        neg = 1;
  159|      0|    }
  160|       |
  161|   387k|    return ossl_i2c_uint64_int(cont, (uint64_t)utmp, neg);
  162|   580k|}
x_int64.c:uint64_clear:
   43|  71.6k|{
   44|  71.6k|    **(uint64_t **)pval = 0;
   45|  71.6k|}
x_int64.c:uint64_c2i:
   73|  14.3k|{
   74|  14.3k|    uint64_t utmp = 0;
   75|  14.3k|    char *cp;
   76|  14.3k|    int neg = 0;
   77|       |
   78|  14.3k|    if (*pval == NULL && !uint64_new(pval, it))
  ------------------
  |  Branch (78:9): [True: 0, False: 14.3k]
  |  Branch (78:26): [True: 0, False: 0]
  ------------------
   79|      0|        return 0;
   80|       |
   81|  14.3k|    cp = (char *)*pval;
   82|       |
   83|       |    /*
   84|       |     * Strictly speaking, zero length is malformed.  However, long_c2i
   85|       |     * (x_long.c) encodes 0 as a zero length INTEGER (wrongly, of course),
   86|       |     * so for the sake of backward compatibility, we still decode zero
   87|       |     * length INTEGERs as the number zero.
   88|       |     */
   89|  14.3k|    if (len == 0)
  ------------------
  |  Branch (89:9): [True: 0, False: 14.3k]
  ------------------
   90|      0|        goto long_compat;
   91|       |
   92|  14.3k|    if (!ossl_c2i_uint64_int(&utmp, &neg, &cont, len))
  ------------------
  |  Branch (92:9): [True: 0, False: 14.3k]
  ------------------
   93|      0|        return 0;
   94|  14.3k|    if ((it->size & INTxx_FLAG_SIGNED) == 0 && neg) {
  ------------------
  |  |   27|  14.3k|#define INTxx_FLAG_SIGNED (1 << 1)
  ------------------
  |  Branch (94:9): [True: 0, False: 14.3k]
  |  Branch (94:48): [True: 0, False: 0]
  ------------------
   95|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_NEGATIVE_VALUE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   96|      0|        return 0;
   97|      0|    }
   98|  14.3k|    if ((it->size & INTxx_FLAG_SIGNED) == INTxx_FLAG_SIGNED
  ------------------
  |  |   27|  14.3k|#define INTxx_FLAG_SIGNED (1 << 1)
  ------------------
                  if ((it->size & INTxx_FLAG_SIGNED) == INTxx_FLAG_SIGNED
  ------------------
  |  |   27|  28.6k|#define INTxx_FLAG_SIGNED (1 << 1)
  ------------------
  |  Branch (98:9): [True: 14.3k, False: 0]
  ------------------
   99|  14.3k|        && !neg && utmp > INT64_MAX) {
  ------------------
  |  Branch (99:12): [True: 14.3k, False: 0]
  |  Branch (99:20): [True: 0, False: 14.3k]
  ------------------
  100|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LARGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  101|      0|        return 0;
  102|      0|    }
  103|  14.3k|    if (neg)
  ------------------
  |  Branch (103:9): [True: 0, False: 14.3k]
  ------------------
  104|       |        /* ossl_c2i_uint64_int() returns positive values */
  105|      0|        utmp = 0 - utmp;
  106|       |
  107|  14.3k|long_compat:
  108|  14.3k|    memcpy(cp, &utmp, sizeof(utmp));
  109|  14.3k|    return 1;
  110|  14.3k|}
x_int64.c:uint64_i2c:
   49|   358k|{
   50|   358k|    uint64_t utmp;
   51|   358k|    int neg = 0;
   52|       |    /* this exists to bypass broken gcc optimization */
   53|   358k|    char *cp = (char *)*pval;
   54|       |
   55|       |    /* use memcpy, because we may not be uint64_t aligned */
   56|   358k|    memcpy(&utmp, cp, sizeof(utmp));
   57|       |
   58|   358k|    if ((it->size & INTxx_FLAG_ZERO_DEFAULT) == INTxx_FLAG_ZERO_DEFAULT
  ------------------
  |  |   26|   358k|#define INTxx_FLAG_ZERO_DEFAULT (1 << 0)
  ------------------
                  if ((it->size & INTxx_FLAG_ZERO_DEFAULT) == INTxx_FLAG_ZERO_DEFAULT
  ------------------
  |  |   26|   716k|#define INTxx_FLAG_ZERO_DEFAULT (1 << 0)
  ------------------
  |  Branch (58:9): [True: 358k, False: 0]
  ------------------
   59|   358k|        && utmp == 0)
  ------------------
  |  Branch (59:12): [True: 107k, False: 250k]
  ------------------
   60|   107k|        return -1;
   61|   250k|    if ((it->size & INTxx_FLAG_SIGNED) == INTxx_FLAG_SIGNED
  ------------------
  |  |   27|   250k|#define INTxx_FLAG_SIGNED (1 << 1)
  ------------------
                  if ((it->size & INTxx_FLAG_SIGNED) == INTxx_FLAG_SIGNED
  ------------------
  |  |   27|   501k|#define INTxx_FLAG_SIGNED (1 << 1)
  ------------------
  |  Branch (61:9): [True: 215k, False: 35.8k]
  ------------------
   62|   215k|        && (int64_t)utmp < 0) {
  ------------------
  |  Branch (62:12): [True: 0, False: 215k]
  ------------------
   63|       |        /* ossl_i2c_uint64_int() assumes positive values */
   64|      0|        utmp = 0 - utmp;
   65|      0|        neg = 1;
   66|      0|    }
   67|       |
   68|   250k|    return ossl_i2c_uint64_int(cont, utmp, neg);
   69|   358k|}

X509_PKEY_free:
   36|  3.55k|{
   37|  3.55k|    if (x == NULL)
  ------------------
  |  Branch (37:9): [True: 3.55k, False: 0]
  ------------------
   38|  3.55k|        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);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   45|      0|    OPENSSL_free(x);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   46|      0|}

ossl_encode_der_length:
   40|   102k|{
   41|   102k|    if (cont_len > 0xffff)
  ------------------
  |  Branch (41:9): [True: 0, False: 102k]
  ------------------
   42|      0|        return 0; /* Too large for supported length encodings */
   43|       |
   44|   102k|    if (cont_len > 0xff) {
  ------------------
  |  Branch (44:9): [True: 0, False: 102k]
  ------------------
   45|      0|        if (!WPACKET_put_bytes_u8(pkt, 0x82)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (45:13): [True: 0, False: 0]
  ------------------
   46|      0|            || !WPACKET_put_bytes_u16(pkt, cont_len))
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (46:16): [True: 0, False: 0]
  ------------------
   47|      0|            return 0;
   48|   102k|    } else {
   49|   102k|        if (cont_len > 0x7f
  ------------------
  |  Branch (49:13): [True: 0, False: 102k]
  ------------------
   50|      0|            && !WPACKET_put_bytes_u8(pkt, 0x81))
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (50:16): [True: 0, False: 0]
  ------------------
   51|      0|            return 0;
   52|   102k|        if (!WPACKET_put_bytes_u8(pkt, cont_len))
  ------------------
  |  |  909|   102k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (52:13): [True: 0, False: 102k]
  ------------------
   53|      0|            return 0;
   54|   102k|    }
   55|       |
   56|   102k|    return 1;
   57|   102k|}
ossl_encode_der_integer:
   67|  72.8k|{
   68|  72.8k|    unsigned char *bnbytes;
   69|  72.8k|    size_t cont_len;
   70|       |
   71|  72.8k|    if (BN_is_negative(n))
  ------------------
  |  Branch (71:9): [True: 0, False: 72.8k]
  ------------------
   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|  72.8k|    cont_len = BN_num_bits(n) / 8 + 1;
   84|       |
   85|  72.8k|    if (!WPACKET_start_sub_packet(pkt)
  ------------------
  |  Branch (85:9): [True: 0, False: 72.8k]
  ------------------
   86|  72.8k|        || !WPACKET_put_bytes_u8(pkt, ID_INTEGER)
  ------------------
  |  |  909|   145k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (86:12): [True: 0, False: 72.8k]
  ------------------
   87|  72.8k|        || !ossl_encode_der_length(pkt, cont_len)
  ------------------
  |  Branch (87:12): [True: 0, False: 72.8k]
  ------------------
   88|  72.8k|        || !WPACKET_allocate_bytes(pkt, cont_len, &bnbytes)
  ------------------
  |  Branch (88:12): [True: 0, False: 72.8k]
  ------------------
   89|  72.8k|        || !WPACKET_close(pkt))
  ------------------
  |  Branch (89:12): [True: 0, False: 72.8k]
  ------------------
   90|      0|        return 0;
   91|       |
   92|  72.8k|    if (bnbytes != NULL
  ------------------
  |  Branch (92:9): [True: 14.5k, False: 58.3k]
  ------------------
   93|  14.5k|        && BN_bn2binpad(n, bnbytes, (int)cont_len) != (int)cont_len)
  ------------------
  |  Branch (93:12): [True: 0, False: 14.5k]
  ------------------
   94|      0|        return 0;
   95|       |
   96|  72.8k|    return 1;
   97|  72.8k|}
ossl_encode_der_dsa_sig:
  107|  29.1k|{
  108|  29.1k|    WPACKET tmppkt, *dummypkt;
  109|  29.1k|    size_t cont_len;
  110|  29.1k|    int isnull = WPACKET_is_null_buf(pkt);
  111|       |
  112|  29.1k|    if (!WPACKET_start_sub_packet(pkt))
  ------------------
  |  Branch (112:9): [True: 0, False: 29.1k]
  ------------------
  113|      0|        return 0;
  114|       |
  115|  29.1k|    if (!isnull) {
  ------------------
  |  Branch (115:9): [True: 7.25k, False: 21.9k]
  ------------------
  116|  7.25k|        if (!WPACKET_init_null(&tmppkt, 0))
  ------------------
  |  Branch (116:13): [True: 0, False: 7.25k]
  ------------------
  117|      0|            return 0;
  118|  7.25k|        dummypkt = &tmppkt;
  119|  21.9k|    } else {
  120|       |        /* If the input packet has a NULL buffer, we don't need a dummy packet */
  121|  21.9k|        dummypkt = pkt;
  122|  21.9k|    }
  123|       |
  124|       |    /* Calculate the content length */
  125|  29.1k|    if (!ossl_encode_der_integer(dummypkt, r)
  ------------------
  |  Branch (125:9): [True: 0, False: 29.1k]
  ------------------
  126|  29.1k|        || !ossl_encode_der_integer(dummypkt, s)
  ------------------
  |  Branch (126:12): [True: 0, False: 29.1k]
  ------------------
  127|  29.1k|        || !WPACKET_get_length(dummypkt, &cont_len)
  ------------------
  |  Branch (127:12): [True: 0, False: 29.1k]
  ------------------
  128|  29.1k|        || (!isnull && !WPACKET_finish(dummypkt))) {
  ------------------
  |  Branch (128:13): [True: 7.25k, False: 21.9k]
  |  Branch (128:24): [True: 0, False: 7.25k]
  ------------------
  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|  29.1k|    if (!WPACKET_put_bytes_u8(pkt, ID_SEQUENCE)
  ------------------
  |  |  909|  58.3k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (135:9): [True: 0, False: 29.1k]
  ------------------
  136|  29.1k|        || !ossl_encode_der_length(pkt, cont_len)
  ------------------
  |  Branch (136:12): [True: 0, False: 29.1k]
  ------------------
  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|  29.1k|        || (!isnull && !ossl_encode_der_integer(pkt, r))
  ------------------
  |  Branch (141:13): [True: 7.25k, False: 21.9k]
  |  Branch (141:24): [True: 0, False: 7.25k]
  ------------------
  142|  29.1k|        || (!isnull && !ossl_encode_der_integer(pkt, s))
  ------------------
  |  Branch (142:13): [True: 7.25k, False: 21.9k]
  |  Branch (142:24): [True: 0, False: 7.25k]
  ------------------
  143|  29.1k|        || !WPACKET_close(pkt))
  ------------------
  |  Branch (143:12): [True: 0, False: 29.1k]
  ------------------
  144|      0|        return 0;
  145|       |
  146|  29.1k|    return 1;
  147|  29.1k|}
ossl_decode_der_length:
  156|  10.8k|{
  157|  10.8k|    unsigned int byte;
  158|       |
  159|  10.8k|    if (!PACKET_get_1(pkt, &byte))
  ------------------
  |  Branch (159:9): [True: 0, False: 10.8k]
  ------------------
  160|      0|        return 0;
  161|       |
  162|  10.8k|    if (byte < 0x80)
  ------------------
  |  Branch (162:9): [True: 10.8k, False: 0]
  ------------------
  163|  10.8k|        return PACKET_get_sub_packet(pkt, subpkt, (size_t)byte);
  164|      0|    if (byte == 0x81)
  ------------------
  |  Branch (164:9): [True: 0, False: 0]
  ------------------
  165|      0|        return PACKET_get_length_prefixed_1(pkt, subpkt);
  166|      0|    if (byte == 0x82)
  ------------------
  |  Branch (166:9): [True: 0, False: 0]
  ------------------
  167|      0|        return PACKET_get_length_prefixed_2(pkt, subpkt);
  168|       |
  169|       |    /* Too large, invalid, or not DER. */
  170|      0|    return 0;
  171|      0|}
ossl_decode_der_integer:
  188|  7.25k|{
  189|  7.25k|    PACKET contpkt, tmppkt;
  190|  7.25k|    unsigned int tag, tmp;
  191|       |
  192|       |    /* Check we have an integer and get the content bytes */
  193|  7.25k|    if (!PACKET_get_1(pkt, &tag)
  ------------------
  |  Branch (193:9): [True: 0, False: 7.25k]
  ------------------
  194|  7.25k|        || tag != ID_INTEGER
  ------------------
  |  |   30|  14.5k|#define ID_INTEGER 0x02
  ------------------
  |  Branch (194:12): [True: 0, False: 7.25k]
  ------------------
  195|  7.25k|        || !ossl_decode_der_length(pkt, &contpkt))
  ------------------
  |  Branch (195:12): [True: 0, False: 7.25k]
  ------------------
  196|      0|        return 0;
  197|       |
  198|       |    /* Peek ahead at the first bytes to check for proper encoding */
  199|  7.25k|    tmppkt = contpkt;
  200|       |    /* The INTEGER must be positive */
  201|  7.25k|    if (!PACKET_get_1(&tmppkt, &tmp)
  ------------------
  |  Branch (201:9): [True: 0, False: 7.25k]
  ------------------
  202|  7.25k|        || (tmp & 0x80) != 0)
  ------------------
  |  Branch (202:12): [True: 0, False: 7.25k]
  ------------------
  203|      0|        return 0;
  204|       |    /* If there a zero padding byte the next byte must have the msb set */
  205|  7.25k|    if (PACKET_remaining(&tmppkt) > 0 && tmp == 0) {
  ------------------
  |  Branch (205:9): [True: 7.25k, False: 0]
  |  Branch (205:42): [True: 3.65k, False: 3.60k]
  ------------------
  206|  3.65k|        if (!PACKET_get_1(&tmppkt, &tmp)
  ------------------
  |  Branch (206:13): [True: 0, False: 3.65k]
  ------------------
  207|  3.65k|            || (tmp & 0x80) == 0)
  ------------------
  |  Branch (207:16): [True: 0, False: 3.65k]
  ------------------
  208|      0|            return 0;
  209|  3.65k|    }
  210|       |
  211|  7.25k|    if (BN_bin2bn(PACKET_data(&contpkt),
  ------------------
  |  Branch (211:9): [True: 0, False: 7.25k]
  ------------------
  212|  7.25k|            (int)PACKET_remaining(&contpkt), n)
  213|  7.25k|        == NULL)
  214|      0|        return 0;
  215|       |
  216|  7.25k|    return 1;
  217|  7.25k|}
ossl_decode_der_dsa_sig:
  236|  3.62k|{
  237|  3.62k|    size_t consumed;
  238|  3.62k|    PACKET pkt, contpkt;
  239|  3.62k|    unsigned int tag;
  240|       |
  241|  3.62k|    if (!PACKET_buf_init(&pkt, *ppin, len)
  ------------------
  |  Branch (241:9): [True: 0, False: 3.62k]
  ------------------
  242|  3.62k|        || !PACKET_get_1(&pkt, &tag)
  ------------------
  |  Branch (242:12): [True: 0, False: 3.62k]
  ------------------
  243|  3.62k|        || tag != ID_SEQUENCE
  ------------------
  |  |   29|  7.25k|#define ID_SEQUENCE 0x30
  ------------------
  |  Branch (243:12): [True: 0, False: 3.62k]
  ------------------
  244|  3.62k|        || !ossl_decode_der_length(&pkt, &contpkt)
  ------------------
  |  Branch (244:12): [True: 0, False: 3.62k]
  ------------------
  245|  3.62k|        || !ossl_decode_der_integer(&contpkt, r)
  ------------------
  |  Branch (245:12): [True: 0, False: 3.62k]
  ------------------
  246|  3.62k|        || !ossl_decode_der_integer(&contpkt, s)
  ------------------
  |  Branch (246:12): [True: 0, False: 3.62k]
  ------------------
  247|  3.62k|        || PACKET_remaining(&contpkt) != 0)
  ------------------
  |  Branch (247:12): [True: 0, False: 3.62k]
  ------------------
  248|      0|        return 0;
  249|       |
  250|  3.62k|    consumed = PACKET_data(&pkt) - *ppin;
  251|  3.62k|    *ppin += consumed;
  252|  3.62k|    return consumed;
  253|  3.62k|}

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

ASYNC_WAIT_CTX_free:
   21|  7.25k|{
   22|  7.25k|    struct fd_lookup_st *curr;
   23|  7.25k|    struct fd_lookup_st *next;
   24|       |
   25|  7.25k|    if (ctx == NULL)
  ------------------
  |  Branch (25:9): [True: 7.25k, False: 0]
  ------------------
   26|  7.25k|        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);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   38|      0|        curr = next;
   39|      0|    }
   40|       |
   41|      0|    OPENSSL_free(ctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   42|      0|}

BIO_f_buffer:
   41|  14.4k|{
   42|  14.4k|    return &methods_buffer;
   43|  14.4k|}
bf_buff.c:buffer_write:
  159|  39.8k|{
  160|  39.8k|    int i, num = 0;
  161|  39.8k|    BIO_F_BUFFER_CTX *ctx;
  162|       |
  163|  39.8k|    if ((in == NULL) || (inl <= 0))
  ------------------
  |  Branch (163:9): [True: 0, False: 39.8k]
  |  Branch (163:25): [True: 0, False: 39.8k]
  ------------------
  164|      0|        return 0;
  165|  39.8k|    ctx = (BIO_F_BUFFER_CTX *)b->ptr;
  166|  39.8k|    if ((ctx == NULL) || (b->next_bio == NULL))
  ------------------
  |  Branch (166:9): [True: 0, False: 39.8k]
  |  Branch (166:26): [True: 0, False: 39.8k]
  ------------------
  167|      0|        return 0;
  168|       |
  169|  39.8k|    BIO_clear_retry_flags(b);
  ------------------
  |  |  272|  39.8k|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  39.8k|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  39.8k|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  39.8k|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  39.8k|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  39.8k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  170|  39.8k|start:
  171|  39.8k|    i = ctx->obuf_size - (ctx->obuf_len + ctx->obuf_off);
  172|       |    /* add to buffer and return */
  173|  39.8k|    if (i >= inl) {
  ------------------
  |  Branch (173:9): [True: 39.8k, False: 0]
  ------------------
  174|  39.8k|        memcpy(&(ctx->obuf[ctx->obuf_off + ctx->obuf_len]), in, inl);
  175|  39.8k|        ctx->obuf_len += inl;
  176|  39.8k|        return (num + inl);
  177|  39.8k|    }
  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|  61.3k|{
  237|  61.3k|    BIO *dbio;
  238|  61.3k|    BIO_F_BUFFER_CTX *ctx;
  239|  61.3k|    long ret = 1;
  240|  61.3k|    char *p1, *p2;
  241|  61.3k|    int r, i, *ip;
  242|  61.3k|    int ibs, obs;
  243|       |
  244|  61.3k|    ctx = (BIO_F_BUFFER_CTX *)b->ptr;
  245|       |
  246|  61.3k|    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: 61.3k]
  ------------------
  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: 61.3k]
  ------------------
  257|      0|        if (ctx->ibuf_len > 0)
  ------------------
  |  Branch (257:13): [True: 0, False: 0]
  ------------------
  258|      0|            return 0;
  259|       |        /*
  260|       |         * If there is no next BIO, BIO_read() returns 0, which means EOF,
  261|       |         * BIO_eof() should return 1 in this case.
  262|       |         */
  263|      0|        if (b->next_bio == NULL)
  ------------------
  |  Branch (263:13): [True: 0, False: 0]
  ------------------
  264|      0|            return 1;
  265|      0|        ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  266|      0|        break;
  267|      0|    case BIO_CTRL_INFO:
  ------------------
  |  |   92|      0|#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
  ------------------
  |  Branch (267:5): [True: 0, False: 61.3k]
  ------------------
  268|      0|        ret = (long)ctx->obuf_len;
  269|      0|        break;
  270|      0|    case BIO_C_GET_BUFF_NUM_LINES:
  ------------------
  |  |  459|      0|#define BIO_C_GET_BUFF_NUM_LINES 116
  ------------------
  |  Branch (270:5): [True: 0, False: 61.3k]
  ------------------
  271|      0|        ret = 0;
  272|      0|        p1 = ctx->ibuf;
  273|      0|        for (i = 0; i < ctx->ibuf_len; i++) {
  ------------------
  |  Branch (273:21): [True: 0, False: 0]
  ------------------
  274|      0|            if (p1[ctx->ibuf_off + i] == '\n')
  ------------------
  |  Branch (274:17): [True: 0, False: 0]
  ------------------
  275|      0|                ret++;
  276|      0|        }
  277|      0|        break;
  278|      0|    case BIO_CTRL_WPENDING:
  ------------------
  |  |  102|      0|#define BIO_CTRL_WPENDING 13 /* opt - number of bytes still to write */
  ------------------
  |  Branch (278:5): [True: 0, False: 61.3k]
  ------------------
  279|      0|        ret = (long)ctx->obuf_len;
  280|      0|        if (ret == 0) {
  ------------------
  |  Branch (280:13): [True: 0, False: 0]
  ------------------
  281|      0|            if (b->next_bio == NULL)
  ------------------
  |  Branch (281:17): [True: 0, False: 0]
  ------------------
  282|      0|                return 0;
  283|      0|            ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  284|      0|        }
  285|      0|        break;
  286|      0|    case BIO_CTRL_PENDING:
  ------------------
  |  |   99|      0|#define BIO_CTRL_PENDING 10 /* opt - is their more data buffered */
  ------------------
  |  Branch (286:5): [True: 0, False: 61.3k]
  ------------------
  287|      0|        ret = (long)ctx->ibuf_len;
  288|      0|        if (ret == 0) {
  ------------------
  |  Branch (288:13): [True: 0, False: 0]
  ------------------
  289|      0|            if (b->next_bio == NULL)
  ------------------
  |  Branch (289:17): [True: 0, False: 0]
  ------------------
  290|      0|                return 0;
  291|      0|            ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  292|      0|        }
  293|      0|        break;
  294|      0|    case BIO_C_SET_BUFF_READ_DATA:
  ------------------
  |  |  465|      0|#define BIO_C_SET_BUFF_READ_DATA 122 /* data to read first */
  ------------------
  |  Branch (294:5): [True: 0, False: 61.3k]
  ------------------
  295|      0|        if (num > ctx->ibuf_size) {
  ------------------
  |  Branch (295:13): [True: 0, False: 0]
  ------------------
  296|      0|            if (num <= 0)
  ------------------
  |  Branch (296:17): [True: 0, False: 0]
  ------------------
  297|      0|                return 0;
  298|      0|            p1 = OPENSSL_malloc((size_t)num);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  299|      0|            if (p1 == NULL)
  ------------------
  |  Branch (299:17): [True: 0, False: 0]
  ------------------
  300|      0|                return 0;
  301|      0|            OPENSSL_free(ctx->ibuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  302|      0|            ctx->ibuf = p1;
  303|      0|        }
  304|      0|        ctx->ibuf_off = 0;
  305|      0|        ctx->ibuf_len = (int)num;
  306|      0|        memcpy(ctx->ibuf, ptr, (int)num);
  307|      0|        ret = 1;
  308|      0|        break;
  309|  14.4k|    case BIO_C_SET_BUFF_SIZE:
  ------------------
  |  |  460|  14.4k|#define BIO_C_SET_BUFF_SIZE 117
  ------------------
  |  Branch (309:5): [True: 14.4k, False: 46.9k]
  ------------------
  310|  14.4k|        if (ptr != NULL) {
  ------------------
  |  Branch (310:13): [True: 14.4k, False: 0]
  ------------------
  311|  14.4k|            ip = (int *)ptr;
  312|  14.4k|            if (*ip == 0) {
  ------------------
  |  Branch (312:17): [True: 14.4k, False: 0]
  ------------------
  313|  14.4k|                ibs = (int)num;
  314|  14.4k|                obs = ctx->obuf_size;
  315|  14.4k|            } else { /* if (*ip == 1) */
  316|       |
  317|      0|                ibs = ctx->ibuf_size;
  318|      0|                obs = (int)num;
  319|      0|            }
  320|  14.4k|        } else {
  321|      0|            ibs = (int)num;
  322|      0|            obs = (int)num;
  323|      0|        }
  324|  14.4k|        p1 = ctx->ibuf;
  325|  14.4k|        p2 = ctx->obuf;
  326|  14.4k|        if ((ibs > DEFAULT_BUFFER_SIZE) && (ibs != ctx->ibuf_size)) {
  ------------------
  |  |   23|  14.4k|#define DEFAULT_BUFFER_SIZE 4096
  ------------------
  |  Branch (326:13): [True: 0, False: 14.4k]
  |  Branch (326:44): [True: 0, False: 0]
  ------------------
  327|      0|            if (num <= 0)
  ------------------
  |  Branch (327:17): [True: 0, False: 0]
  ------------------
  328|      0|                return 0;
  329|      0|            p1 = OPENSSL_malloc((size_t)num);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  330|      0|            if (p1 == NULL)
  ------------------
  |  Branch (330:17): [True: 0, False: 0]
  ------------------
  331|      0|                return 0;
  332|      0|        }
  333|  14.4k|        if ((obs > DEFAULT_BUFFER_SIZE) && (obs != ctx->obuf_size)) {
  ------------------
  |  |   23|  14.4k|#define DEFAULT_BUFFER_SIZE 4096
  ------------------
  |  Branch (333:13): [True: 0, False: 14.4k]
  |  Branch (333:44): [True: 0, False: 0]
  ------------------
  334|      0|            p2 = OPENSSL_malloc((size_t)num);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  335|      0|            if (p2 == NULL) {
  ------------------
  |  Branch (335:17): [True: 0, False: 0]
  ------------------
  336|      0|                if (p1 != ctx->ibuf)
  ------------------
  |  Branch (336:21): [True: 0, False: 0]
  ------------------
  337|      0|                    OPENSSL_free(p1);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  338|      0|                return 0;
  339|      0|            }
  340|      0|        }
  341|  14.4k|        if (ctx->ibuf != p1) {
  ------------------
  |  Branch (341:13): [True: 0, False: 14.4k]
  ------------------
  342|      0|            OPENSSL_free(ctx->ibuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  343|      0|            ctx->ibuf = p1;
  344|      0|            ctx->ibuf_off = 0;
  345|      0|            ctx->ibuf_len = 0;
  346|      0|            ctx->ibuf_size = ibs;
  347|      0|        }
  348|  14.4k|        if (ctx->obuf != p2) {
  ------------------
  |  Branch (348:13): [True: 0, False: 14.4k]
  ------------------
  349|      0|            OPENSSL_free(ctx->obuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  350|      0|            ctx->obuf = p2;
  351|      0|            ctx->obuf_off = 0;
  352|      0|            ctx->obuf_len = 0;
  353|      0|            ctx->obuf_size = obs;
  354|      0|        }
  355|  14.4k|        break;
  356|      0|    case BIO_C_DO_STATE_MACHINE:
  ------------------
  |  |  444|      0|#define BIO_C_DO_STATE_MACHINE 101
  ------------------
  |  Branch (356:5): [True: 0, False: 61.3k]
  ------------------
  357|      0|        if (b->next_bio == NULL)
  ------------------
  |  Branch (357:13): [True: 0, False: 0]
  ------------------
  358|      0|            return 0;
  359|      0|        BIO_clear_retry_flags(b);
  ------------------
  |  |  272|      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
  |  |  ------------------
  ------------------
  360|      0|        ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  361|      0|        BIO_copy_next_retry(b);
  362|      0|        break;
  363|       |
  364|  18.0k|    case BIO_CTRL_FLUSH:
  ------------------
  |  |  100|  18.0k|#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
  ------------------
  |  Branch (364:5): [True: 18.0k, False: 43.2k]
  ------------------
  365|  18.0k|        if (b->next_bio == NULL)
  ------------------
  |  Branch (365:13): [True: 0, False: 18.0k]
  ------------------
  366|      0|            return 0;
  367|  18.0k|        if (ctx->obuf_len <= 0) {
  ------------------
  |  Branch (367:13): [True: 0, False: 18.0k]
  ------------------
  368|      0|            ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  369|      0|            BIO_copy_next_retry(b);
  370|      0|            break;
  371|      0|        }
  372|       |
  373|  36.1k|        for (;;) {
  374|  36.1k|            BIO_clear_retry_flags(b);
  ------------------
  |  |  272|  36.1k|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  36.1k|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  36.1k|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  36.1k|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  36.1k|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  36.1k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  375|  36.1k|            if (ctx->obuf_len > 0) {
  ------------------
  |  Branch (375:17): [True: 18.0k, False: 18.0k]
  ------------------
  376|  18.0k|                r = BIO_write(b->next_bio,
  377|  18.0k|                    &(ctx->obuf[ctx->obuf_off]), ctx->obuf_len);
  378|  18.0k|                BIO_copy_next_retry(b);
  379|  18.0k|                if (r <= 0)
  ------------------
  |  Branch (379:21): [True: 0, False: 18.0k]
  ------------------
  380|      0|                    return (long)r;
  381|  18.0k|                ctx->obuf_off += r;
  382|  18.0k|                ctx->obuf_len -= r;
  383|  18.0k|            } else {
  384|  18.0k|                ctx->obuf_len = 0;
  385|  18.0k|                ctx->obuf_off = 0;
  386|  18.0k|                break;
  387|  18.0k|            }
  388|  36.1k|        }
  389|  18.0k|        ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  390|  18.0k|        BIO_copy_next_retry(b);
  391|  18.0k|        break;
  392|      0|    case BIO_CTRL_DUP:
  ------------------
  |  |  101|      0|#define BIO_CTRL_DUP 12 /* man - extra stuff for 'duped' BIO */
  ------------------
  |  Branch (392:5): [True: 0, False: 61.3k]
  ------------------
  393|      0|        dbio = (BIO *)ptr;
  394|      0|        if (BIO_set_read_buffer_size(dbio, ctx->ibuf_size) <= 0 || BIO_set_write_buffer_size(dbio, ctx->obuf_size) <= 0)
  ------------------
  |  |  635|      0|#define BIO_set_read_buffer_size(b, size) BIO_int_ctrl(b, BIO_C_SET_BUFF_SIZE, size, 0)
  |  |  ------------------
  |  |  |  |  460|      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)
  ------------------
  |  |  636|      0|#define BIO_set_write_buffer_size(b, size) BIO_int_ctrl(b, BIO_C_SET_BUFF_SIZE, size, 1)
  |  |  ------------------
  |  |  |  |  460|      0|#define BIO_C_SET_BUFF_SIZE 117
  |  |  ------------------
  ------------------
  |  Branch (394:13): [True: 0, False: 0]
  |  Branch (394:68): [True: 0, False: 0]
  ------------------
  395|      0|            ret = 0;
  396|      0|        break;
  397|      0|    case BIO_CTRL_PEEK:
  ------------------
  |  |  106|      0|#define BIO_CTRL_PEEK 29 /* BIO_f_buffer special */
  ------------------
  |  Branch (397:5): [True: 0, False: 61.3k]
  ------------------
  398|       |        /* Ensure there's stuff in the input buffer */
  399|      0|        {
  400|      0|            char fake_buf[1];
  401|      0|            (void)buffer_read(b, fake_buf, 0);
  402|      0|        }
  403|      0|        if (num > ctx->ibuf_len)
  ------------------
  |  Branch (403:13): [True: 0, False: 0]
  ------------------
  404|      0|            num = ctx->ibuf_len;
  405|      0|        memcpy(ptr, &(ctx->ibuf[ctx->ibuf_off]), num);
  406|      0|        ret = num;
  407|      0|        break;
  408|  28.8k|    default:
  ------------------
  |  Branch (408:5): [True: 28.8k, False: 32.4k]
  ------------------
  409|  28.8k|        if (b->next_bio == NULL)
  ------------------
  |  Branch (409:13): [True: 0, False: 28.8k]
  ------------------
  410|      0|            return 0;
  411|  28.8k|        ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  412|  28.8k|        break;
  413|  61.3k|    }
  414|  61.3k|    return ret;
  415|  61.3k|}
bf_buff.c:buffer_new:
   46|  14.4k|{
   47|  14.4k|    BIO_F_BUFFER_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|  14.4k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   48|       |
   49|  14.4k|    if (ctx == NULL)
  ------------------
  |  Branch (49:9): [True: 0, False: 14.4k]
  ------------------
   50|      0|        return 0;
   51|  14.4k|    ctx->ibuf_size = DEFAULT_BUFFER_SIZE;
  ------------------
  |  |   23|  14.4k|#define DEFAULT_BUFFER_SIZE 4096
  ------------------
   52|  14.4k|    ctx->ibuf = OPENSSL_malloc(DEFAULT_BUFFER_SIZE);
  ------------------
  |  |  107|  14.4k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   53|  14.4k|    if (ctx->ibuf == NULL) {
  ------------------
  |  Branch (53:9): [True: 0, False: 14.4k]
  ------------------
   54|      0|        OPENSSL_free(ctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   55|      0|        return 0;
   56|      0|    }
   57|  14.4k|    ctx->obuf_size = DEFAULT_BUFFER_SIZE;
  ------------------
  |  |   23|  14.4k|#define DEFAULT_BUFFER_SIZE 4096
  ------------------
   58|  14.4k|    ctx->obuf = OPENSSL_malloc(DEFAULT_BUFFER_SIZE);
  ------------------
  |  |  107|  14.4k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   59|  14.4k|    if (ctx->obuf == NULL) {
  ------------------
  |  Branch (59:9): [True: 0, False: 14.4k]
  ------------------
   60|      0|        OPENSSL_free(ctx->ibuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   61|      0|        OPENSSL_free(ctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   62|      0|        return 0;
   63|      0|    }
   64|       |
   65|  14.4k|    bi->init = 1;
   66|  14.4k|    bi->ptr = (char *)ctx;
   67|  14.4k|    bi->flags = 0;
   68|  14.4k|    return 1;
   69|  14.4k|}
bf_buff.c:buffer_free:
   72|  14.4k|{
   73|  14.4k|    BIO_F_BUFFER_CTX *b;
   74|       |
   75|  14.4k|    if (a == NULL)
  ------------------
  |  Branch (75:9): [True: 0, False: 14.4k]
  ------------------
   76|      0|        return 0;
   77|  14.4k|    b = (BIO_F_BUFFER_CTX *)a->ptr;
   78|  14.4k|    OPENSSL_free(b->ibuf);
  ------------------
  |  |  132|  14.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   79|  14.4k|    OPENSSL_free(b->obuf);
  ------------------
  |  |  132|  14.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   80|  14.4k|    OPENSSL_free(a->ptr);
  ------------------
  |  |  132|  14.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   81|       |    a->ptr = NULL;
   82|  14.4k|    a->init = 0;
   83|  14.4k|    a->flags = 0;
   84|  14.4k|    return 1;
   85|  14.4k|}

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

BIO_new_ex:
   82|   160k|{
   83|   160k|    BIO *bio = OPENSSL_zalloc(sizeof(*bio));
  ------------------
  |  |  109|   160k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   84|       |
   85|   160k|    if (bio == NULL)
  ------------------
  |  Branch (85:9): [True: 0, False: 160k]
  ------------------
   86|      0|        return NULL;
   87|       |
   88|   160k|    bio->libctx = libctx;
   89|   160k|    bio->method = method;
   90|   160k|    bio->shutdown = 1;
   91|       |
   92|   160k|    if (!CRYPTO_NEW_REF(&bio->references, 1))
  ------------------
  |  Branch (92:9): [True: 0, False: 160k]
  ------------------
   93|      0|        goto err;
   94|       |
   95|   160k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_BIO, bio, &bio->ex_data))
  ------------------
  |  |  263|   160k|#define CRYPTO_EX_INDEX_BIO 12
  ------------------
  |  Branch (95:9): [True: 0, False: 160k]
  ------------------
   96|      0|        goto err;
   97|       |
   98|   160k|    if (method->create != NULL && !method->create(bio)) {
  ------------------
  |  Branch (98:9): [True: 160k, False: 0]
  |  Branch (98:35): [True: 0, False: 160k]
  ------------------
   99|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_INIT_FAIL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  100|      0|        CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, bio, &bio->ex_data);
  ------------------
  |  |  263|      0|#define CRYPTO_EX_INDEX_BIO 12
  ------------------
  101|      0|        goto err;
  102|      0|    }
  103|   160k|    if (method->create == NULL)
  ------------------
  |  Branch (103:9): [True: 0, False: 160k]
  ------------------
  104|      0|        bio->init = 1;
  105|       |
  106|   160k|    return bio;
  107|       |
  108|      0|err:
  109|      0|    CRYPTO_FREE_REF(&bio->references);
  110|      0|    OPENSSL_free(bio);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  111|       |    return NULL;
  112|   160k|}
BIO_new:
  115|   160k|{
  116|       |    return BIO_new_ex(NULL, method);
  117|   160k|}
BIO_free:
  120|   592k|{
  121|   592k|    int ret;
  122|       |
  123|   592k|    if (a == NULL)
  ------------------
  |  Branch (123:9): [True: 250k, False: 341k]
  ------------------
  124|   250k|        return 0;
  125|       |
  126|   341k|    if (CRYPTO_DOWN_REF(&a->references, &ret) <= 0)
  ------------------
  |  Branch (126:9): [True: 0, False: 341k]
  ------------------
  127|      0|        return 0;
  128|       |
  129|   341k|    REF_PRINT_COUNT("BIO", ret, a);
  ------------------
  |  |  301|   341k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   341k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|   341k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|   341k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  130|   341k|    if (ret > 0)
  ------------------
  |  Branch (130:9): [True: 181k, False: 160k]
  ------------------
  131|   181k|        return 1;
  132|   160k|    REF_ASSERT_ISNT(ret < 0);
  ------------------
  |  |  293|   160k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 160k]
  |  |  ------------------
  ------------------
  133|       |
  134|   160k|    if (HAS_CALLBACK(a)) {
  ------------------
  |  |   26|   160k|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 160k]
  |  |  |  Branch (26:51): [True: 0, False: 160k]
  |  |  ------------------
  ------------------
  135|      0|        ret = (int)bio_call_callback(a, BIO_CB_FREE, NULL, 0, 0, 0L, 1L, NULL);
  ------------------
  |  |  300|      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|   160k|    if ((a->method != NULL) && (a->method->destroy != NULL))
  ------------------
  |  Branch (140:9): [True: 160k, False: 0]
  |  Branch (140:32): [True: 160k, False: 0]
  ------------------
  141|   160k|        a->method->destroy(a);
  142|       |
  143|   160k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, a, &a->ex_data);
  ------------------
  |  |  263|   160k|#define CRYPTO_EX_INDEX_BIO 12
  ------------------
  144|       |
  145|   160k|    CRYPTO_FREE_REF(&a->references);
  146|       |
  147|   160k|    OPENSSL_free(a);
  ------------------
  |  |  132|   160k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  148|       |
  149|   160k|    return 1;
  150|   160k|}
BIO_set_data:
  153|  36.5k|{
  154|  36.5k|    a->ptr = ptr;
  155|  36.5k|}
BIO_get_data:
  158|   203k|{
  159|   203k|    return a->ptr;
  160|   203k|}
BIO_set_init:
  163|  62.2k|{
  164|  62.2k|    a->init = init;
  165|  62.2k|}
BIO_set_shutdown:
  173|  3.62k|{
  174|  3.62k|    a->shutdown = shut;
  175|  3.62k|}
BIO_up_ref:
  188|   181k|{
  189|   181k|    int i;
  190|       |
  191|   181k|    if (CRYPTO_UP_REF(&a->references, &i) <= 0)
  ------------------
  |  Branch (191:9): [True: 0, False: 181k]
  ------------------
  192|      0|        return 0;
  193|       |
  194|   181k|    REF_PRINT_COUNT("BIO", i, a);
  ------------------
  |  |  301|   181k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   181k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|   181k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|   181k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  195|   181k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|   181k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 181k]
  |  |  ------------------
  ------------------
  196|   181k|    return i > 1;
  197|   181k|}
BIO_clear_flags:
  200|   570k|{
  201|   570k|    b->flags &= ~flags;
  202|   570k|}
BIO_test_flags:
  205|  88.3k|{
  206|  88.3k|    return (b->flags & flags);
  207|  88.3k|}
BIO_set_flags:
  210|  69.4k|{
  211|  69.4k|    b->flags |= flags;
  212|  69.4k|}
BIO_read:
  318|   175k|{
  319|   175k|    size_t readbytes;
  320|   175k|    int ret;
  321|       |
  322|   175k|    if (dlen < 0) {
  ------------------
  |  Branch (322:9): [True: 0, False: 175k]
  ------------------
  323|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  324|      0|        return -1;
  325|      0|    }
  326|       |
  327|   175k|    ret = bio_read_intern(b, data, (size_t)dlen, &readbytes);
  328|       |
  329|   175k|    if (ret > 0) {
  ------------------
  |  Branch (329:9): [True: 141k, False: 33.3k]
  ------------------
  330|       |        /* *readbytes should always be <= dlen */
  331|   141k|        ret = (int)readbytes;
  332|   141k|    }
  333|       |
  334|   175k|    return ret;
  335|   175k|}
BIO_read_ex:
  338|  54.8k|{
  339|  54.8k|    return bio_read_intern(b, data, dlen, readbytes) > 0;
  340|  54.8k|}
BIO_write:
  385|  80.8k|{
  386|  80.8k|    size_t written;
  387|  80.8k|    int ret;
  388|       |
  389|  80.8k|    if (dlen <= 0)
  ------------------
  |  Branch (389:9): [True: 40, False: 80.8k]
  ------------------
  390|     40|        return 0;
  391|       |
  392|  80.8k|    ret = bio_write_intern(b, data, (size_t)dlen, &written);
  393|       |
  394|  80.8k|    if (ret > 0) {
  ------------------
  |  Branch (394:9): [True: 80.8k, False: 0]
  ------------------
  395|       |        /* written should always be <= dlen */
  396|  80.8k|        ret = (int)written;
  397|  80.8k|    }
  398|       |
  399|  80.8k|    return ret;
  400|  80.8k|}
BIO_write_ex:
  403|    444|{
  404|    444|    return bio_write_intern(b, data, dlen, written) > 0
  ------------------
  |  Branch (404:12): [True: 444, False: 0]
  ------------------
  405|      0|        || (b != NULL && dlen == 0); /* order is important for *written */
  ------------------
  |  Branch (405:13): [True: 0, False: 0]
  |  Branch (405:26): [True: 0, False: 0]
  ------------------
  406|    444|}
BIO_puts:
  513|  76.8k|{
  514|  76.8k|    int ret;
  515|  76.8k|    size_t written = 0;
  516|       |
  517|  76.8k|    if (b == NULL) {
  ------------------
  |  Branch (517:9): [True: 0, False: 76.8k]
  ------------------
  518|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  519|      0|        return -1;
  520|      0|    }
  521|  76.8k|    if (b->method == NULL || b->method->bputs == NULL) {
  ------------------
  |  Branch (521:9): [True: 0, False: 76.8k]
  |  Branch (521:30): [True: 0, False: 76.8k]
  ------------------
  522|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNSUPPORTED_METHOD);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  523|      0|        return -2;
  524|      0|    }
  525|       |
  526|  76.8k|    if (HAS_CALLBACK(b)) {
  ------------------
  |  |   26|  76.8k|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 76.8k]
  |  |  |  Branch (26:51): [True: 0, False: 76.8k]
  |  |  ------------------
  ------------------
  527|      0|        ret = (int)bio_call_callback(b, BIO_CB_PUTS, buf, 0, 0, 0L, 1L, NULL);
  ------------------
  |  |  303|      0|#define BIO_CB_PUTS 0x04
  ------------------
  528|      0|        if (ret <= 0)
  ------------------
  |  Branch (528:13): [True: 0, False: 0]
  ------------------
  529|      0|            return ret;
  530|      0|    }
  531|       |
  532|  76.8k|    if (!b->init) {
  ------------------
  |  Branch (532:9): [True: 0, False: 76.8k]
  ------------------
  533|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNINITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  534|      0|        return -1;
  535|      0|    }
  536|       |
  537|  76.8k|    ret = b->method->bputs(b, buf);
  538|       |
  539|  76.8k|    if (ret > 0) {
  ------------------
  |  Branch (539:9): [True: 76.8k, False: 0]
  ------------------
  540|  76.8k|        b->num_write += (uint64_t)ret;
  541|  76.8k|        written = ret;
  542|  76.8k|        ret = 1;
  543|  76.8k|    }
  544|       |
  545|  76.8k|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|  76.8k|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 76.8k]
  |  |  |  Branch (26:51): [True: 0, False: 76.8k]
  |  |  ------------------
  ------------------
  546|      0|        ret = (int)bio_call_callback(b, BIO_CB_PUTS | BIO_CB_RETURN, buf, 0, 0,
  ------------------
  |  |  303|      0|#define BIO_CB_PUTS 0x04
  ------------------
                      ret = (int)bio_call_callback(b, BIO_CB_PUTS | BIO_CB_RETURN, buf, 0, 0,
  ------------------
  |  |  313|      0|#define BIO_CB_RETURN 0x80
  ------------------
  547|      0|            0L, ret, &written);
  548|       |
  549|  76.8k|    if (ret > 0) {
  ------------------
  |  Branch (549:9): [True: 76.8k, False: 0]
  ------------------
  550|  76.8k|        if (written > INT_MAX) {
  ------------------
  |  Branch (550:13): [True: 0, False: 76.8k]
  ------------------
  551|      0|            ERR_raise(ERR_LIB_BIO, BIO_R_LENGTH_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  552|      0|            ret = -1;
  553|  76.8k|        } else {
  554|  76.8k|            ret = (int)written;
  555|  76.8k|        }
  556|  76.8k|    }
  557|       |
  558|  76.8k|    return ret;
  559|  76.8k|}
BIO_gets:
  562|   121k|{
  563|   121k|    int ret;
  564|   121k|    size_t readbytes = 0;
  565|       |
  566|   121k|    if (b == NULL) {
  ------------------
  |  Branch (566:9): [True: 0, False: 121k]
  ------------------
  567|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  568|      0|        return -1;
  569|      0|    }
  570|   121k|    if (b->method == NULL || b->method->bgets == NULL) {
  ------------------
  |  Branch (570:9): [True: 0, False: 121k]
  |  Branch (570:30): [True: 0, False: 121k]
  ------------------
  571|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNSUPPORTED_METHOD);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  572|      0|        return -2;
  573|      0|    }
  574|       |
  575|   121k|    if (size < 0) {
  ------------------
  |  Branch (575:9): [True: 0, False: 121k]
  ------------------
  576|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  577|      0|        return -1;
  578|      0|    }
  579|       |
  580|   121k|    if (HAS_CALLBACK(b)) {
  ------------------
  |  |   26|   121k|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 121k]
  |  |  |  Branch (26:51): [True: 0, False: 121k]
  |  |  ------------------
  ------------------
  581|      0|        ret = (int)bio_call_callback(b, BIO_CB_GETS, buf, size, 0, 0L, 1, NULL);
  ------------------
  |  |  304|      0|#define BIO_CB_GETS 0x05
  ------------------
  582|      0|        if (ret <= 0)
  ------------------
  |  Branch (582:13): [True: 0, False: 0]
  ------------------
  583|      0|            return ret;
  584|      0|    }
  585|       |
  586|   121k|    if (!b->init) {
  ------------------
  |  Branch (586:9): [True: 0, False: 121k]
  ------------------
  587|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNINITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  588|      0|        return -1;
  589|      0|    }
  590|       |
  591|   121k|    ret = b->method->bgets(b, buf, size);
  592|       |
  593|   121k|    if (ret > 0) {
  ------------------
  |  Branch (593:9): [True: 117k, False: 3.55k]
  ------------------
  594|   117k|        readbytes = ret;
  595|   117k|        ret = 1;
  596|   117k|    }
  597|       |
  598|   121k|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|   121k|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 121k]
  |  |  |  Branch (26:51): [True: 0, False: 121k]
  |  |  ------------------
  ------------------
  599|      0|        ret = (int)bio_call_callback(b, BIO_CB_GETS | BIO_CB_RETURN, buf, size,
  ------------------
  |  |  304|      0|#define BIO_CB_GETS 0x05
  ------------------
                      ret = (int)bio_call_callback(b, BIO_CB_GETS | BIO_CB_RETURN, buf, size,
  ------------------
  |  |  313|      0|#define BIO_CB_RETURN 0x80
  ------------------
  600|      0|            0, 0L, ret, &readbytes);
  601|       |
  602|   121k|    if (ret > 0) {
  ------------------
  |  Branch (602:9): [True: 117k, False: 3.55k]
  ------------------
  603|       |        /* Shouldn't happen */
  604|   117k|        if (readbytes > (size_t)size)
  ------------------
  |  Branch (604:13): [True: 0, False: 117k]
  ------------------
  605|      0|            ret = -1;
  606|   117k|        else
  607|   117k|            ret = (int)readbytes;
  608|   117k|    }
  609|       |
  610|   121k|    return ret;
  611|   121k|}
BIO_int_ctrl:
  657|  18.0k|{
  658|  18.0k|    int i;
  659|       |
  660|  18.0k|    i = iarg;
  661|  18.0k|    return BIO_ctrl(b, cmd, larg, (char *)&i);
  662|  18.0k|}
BIO_ctrl:
  675|   276k|{
  676|   276k|    long ret;
  677|       |
  678|   276k|    if (b == NULL)
  ------------------
  |  Branch (678:9): [True: 0, False: 276k]
  ------------------
  679|      0|        return -1;
  680|   276k|    if (b->method == NULL || b->method->ctrl == NULL) {
  ------------------
  |  Branch (680:9): [True: 0, False: 276k]
  |  Branch (680:30): [True: 0, False: 276k]
  ------------------
  681|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNSUPPORTED_METHOD);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  682|      0|        return -2;
  683|      0|    }
  684|       |
  685|   276k|    if (HAS_CALLBACK(b)) {
  ------------------
  |  |   26|   276k|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 276k]
  |  |  |  Branch (26:51): [True: 0, False: 276k]
  |  |  ------------------
  ------------------
  686|      0|        ret = bio_call_callback(b, BIO_CB_CTRL, parg, 0, cmd, larg, 1L, NULL);
  ------------------
  |  |  305|      0|#define BIO_CB_CTRL 0x06
  ------------------
  687|      0|        if (ret <= 0)
  ------------------
  |  Branch (687:13): [True: 0, False: 0]
  ------------------
  688|      0|            return ret;
  689|      0|    }
  690|       |
  691|   276k|    ret = b->method->ctrl(b, cmd, larg, parg);
  692|       |
  693|   276k|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|   276k|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 276k]
  |  |  |  Branch (26:51): [True: 0, False: 276k]
  |  |  ------------------
  ------------------
  694|      0|        ret = bio_call_callback(b, BIO_CB_CTRL | BIO_CB_RETURN, parg, 0, cmd,
  ------------------
  |  |  305|      0|#define BIO_CB_CTRL 0x06
  ------------------
                      ret = bio_call_callback(b, BIO_CB_CTRL | BIO_CB_RETURN, parg, 0, cmd,
  ------------------
  |  |  313|      0|#define BIO_CB_RETURN 0x80
  ------------------
  695|      0|            larg, ret, NULL);
  696|       |
  697|   276k|    return ret;
  698|   276k|}
BIO_push:
  768|  14.4k|{
  769|  14.4k|    BIO *lb;
  770|       |
  771|  14.4k|    if (b == NULL)
  ------------------
  |  Branch (771:9): [True: 0, False: 14.4k]
  ------------------
  772|      0|        return bio;
  773|  14.4k|    lb = b;
  774|  14.4k|    while (lb->next_bio != NULL)
  ------------------
  |  Branch (774:12): [True: 0, False: 14.4k]
  ------------------
  775|      0|        lb = lb->next_bio;
  776|  14.4k|    lb->next_bio = bio;
  777|  14.4k|    if (bio != NULL)
  ------------------
  |  Branch (777:9): [True: 14.4k, False: 0]
  ------------------
  778|  14.4k|        bio->prev_bio = lb;
  779|       |    /* called to do internal processing */
  780|  14.4k|    BIO_ctrl(b, BIO_CTRL_PUSH, 0, lb);
  ------------------
  |  |   95|  14.4k|#define BIO_CTRL_PUSH 6 /* opt - internal, used to signify change */
  ------------------
  781|  14.4k|    return b;
  782|  14.4k|}
BIO_pop:
  786|  14.4k|{
  787|  14.4k|    BIO *ret;
  788|       |
  789|  14.4k|    if (b == NULL)
  ------------------
  |  Branch (789:9): [True: 0, False: 14.4k]
  ------------------
  790|      0|        return NULL;
  791|  14.4k|    ret = b->next_bio;
  792|       |
  793|  14.4k|    BIO_ctrl(b, BIO_CTRL_POP, 0, b);
  ------------------
  |  |   96|  14.4k|#define BIO_CTRL_POP 7 /* opt - internal, used to signify change */
  ------------------
  794|       |
  795|  14.4k|    if (b->prev_bio != NULL)
  ------------------
  |  Branch (795:9): [True: 0, False: 14.4k]
  ------------------
  796|      0|        b->prev_bio->next_bio = b->next_bio;
  797|  14.4k|    if (b->next_bio != NULL)
  ------------------
  |  Branch (797:9): [True: 14.4k, False: 0]
  ------------------
  798|  14.4k|        b->next_bio->prev_bio = b->prev_bio;
  799|       |
  800|  14.4k|    b->next_bio = NULL;
  801|       |    b->prev_bio = NULL;
  802|  14.4k|    return ret;
  803|  14.4k|}
BIO_free_all:
  871|   217k|{
  872|   217k|    BIO *b;
  873|   217k|    int ref;
  874|       |
  875|   224k|    while (bio != NULL) {
  ------------------
  |  Branch (875:12): [True: 108k, False: 116k]
  ------------------
  876|   108k|        b = bio;
  877|   108k|        CRYPTO_GET_REF(&b->references, &ref);
  878|   108k|        bio = bio->next_bio;
  879|   108k|        BIO_free(b);
  880|       |        /* Since ref count > 1, don't free anyone else. */
  881|   108k|        if (ref > 1)
  ------------------
  |  Branch (881:13): [True: 101k, False: 7.25k]
  ------------------
  882|   101k|            break;
  883|   108k|    }
  884|   217k|}
BIO_copy_next_retry:
  933|  36.1k|{
  934|  36.1k|    BIO_set_flags(b, BIO_get_retry_flags(b->next_bio));
  ------------------
  |  |  274|  36.1k|    BIO_test_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  36.1k|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  36.1k|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  36.1k|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  36.1k|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_test_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  36.1k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  935|  36.1k|    b->retry_reason = b->next_bio->retry_reason;
  936|  36.1k|}
bio_lib.c:bio_read_intern:
  272|   230k|{
  273|   230k|    int ret;
  274|       |
  275|   230k|    if (b == NULL) {
  ------------------
  |  Branch (275:9): [True: 0, False: 230k]
  ------------------
  276|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  277|      0|        return -1;
  278|      0|    }
  279|   230k|    if (b->method == NULL || b->method->bread == NULL) {
  ------------------
  |  Branch (279:9): [True: 0, False: 230k]
  |  Branch (279:30): [True: 0, False: 230k]
  ------------------
  280|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNSUPPORTED_METHOD);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  281|      0|        return -2;
  282|      0|    }
  283|       |
  284|   230k|    if (HAS_CALLBACK(b) && ((ret = (int)bio_call_callback(b, BIO_CB_READ, data, dlen, 0, 0L, 1L, NULL)) <= 0))
  ------------------
  |  |   26|   460k|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 230k]
  |  |  |  Branch (26:51): [True: 0, False: 230k]
  |  |  ------------------
  ------------------
                  if (HAS_CALLBACK(b) && ((ret = (int)bio_call_callback(b, BIO_CB_READ, data, dlen, 0, 0L, 1L, NULL)) <= 0))
  ------------------
  |  |  301|      0|#define BIO_CB_READ 0x02
  ------------------
  |  Branch (284:28): [True: 0, False: 0]
  ------------------
  285|      0|        return ret;
  286|       |
  287|   230k|    if (!b->init) {
  ------------------
  |  Branch (287:9): [True: 0, False: 230k]
  ------------------
  288|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNINITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  289|      0|        return -1;
  290|      0|    }
  291|       |
  292|   230k|    ret = b->method->bread(b, data, dlen, readbytes);
  293|       |
  294|   230k|    if (ret > 0)
  ------------------
  |  Branch (294:9): [True: 196k, False: 33.3k]
  ------------------
  295|   196k|        b->num_read += (uint64_t)*readbytes;
  296|       |
  297|       |    /*
  298|       |     * If method->bread() returned 0 when dlen>0, it can be either EOF or
  299|       |     * an error, and we should distinguish them
  300|       |     */
  301|   230k|    if (ret == 0 && dlen > 0 && BIO_eof(b) == 0)
  ------------------
  |  Branch (301:9): [True: 0, False: 230k]
  |  Branch (301:21): [True: 0, False: 0]
  |  Branch (301:33): [True: 0, False: 0]
  ------------------
  302|      0|        ret = -1;
  303|       |
  304|   230k|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|   230k|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 230k]
  |  |  |  Branch (26:51): [True: 0, False: 230k]
  |  |  ------------------
  ------------------
  305|      0|        ret = (int)bio_call_callback(b, BIO_CB_READ | BIO_CB_RETURN, data,
  ------------------
  |  |  301|      0|#define BIO_CB_READ 0x02
  ------------------
                      ret = (int)bio_call_callback(b, BIO_CB_READ | BIO_CB_RETURN, data,
  ------------------
  |  |  313|      0|#define BIO_CB_RETURN 0x80
  ------------------
  306|      0|            dlen, 0, 0L, ret, readbytes);
  307|       |
  308|       |    /* Shouldn't happen */
  309|   230k|    if (ret > 0 && *readbytes > dlen) {
  ------------------
  |  Branch (309:9): [True: 196k, False: 33.3k]
  |  Branch (309:20): [True: 0, False: 196k]
  ------------------
  310|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  311|      0|        return -1;
  312|      0|    }
  313|       |
  314|   230k|    return ret;
  315|   230k|}
bio_lib.c:bio_write_intern:
  344|  81.2k|{
  345|  81.2k|    size_t local_written;
  346|  81.2k|    int ret;
  347|       |
  348|  81.2k|    if (written != NULL)
  ------------------
  |  Branch (348:9): [True: 81.2k, False: 0]
  ------------------
  349|  81.2k|        *written = 0;
  350|       |    /*
  351|       |     * b == NULL is not an error but just means that zero bytes are written.
  352|       |     * Do not raise an error here.
  353|       |     */
  354|  81.2k|    if (b == NULL)
  ------------------
  |  Branch (354:9): [True: 0, False: 81.2k]
  ------------------
  355|      0|        return 0;
  356|       |
  357|  81.2k|    if (b->method == NULL || b->method->bwrite == NULL) {
  ------------------
  |  Branch (357:9): [True: 0, False: 81.2k]
  |  Branch (357:30): [True: 0, False: 81.2k]
  ------------------
  358|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNSUPPORTED_METHOD);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  359|      0|        return -2;
  360|      0|    }
  361|       |
  362|  81.2k|    if (HAS_CALLBACK(b) && ((ret = (int)bio_call_callback(b, BIO_CB_WRITE, data, dlen, 0, 0L, 1L, NULL)) <= 0))
  ------------------
  |  |   26|   162k|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 81.2k]
  |  |  |  Branch (26:51): [True: 0, False: 81.2k]
  |  |  ------------------
  ------------------
                  if (HAS_CALLBACK(b) && ((ret = (int)bio_call_callback(b, BIO_CB_WRITE, data, dlen, 0, 0L, 1L, NULL)) <= 0))
  ------------------
  |  |  302|      0|#define BIO_CB_WRITE 0x03
  ------------------
  |  Branch (362:28): [True: 0, False: 0]
  ------------------
  363|      0|        return ret;
  364|       |
  365|  81.2k|    if (!b->init) {
  ------------------
  |  Branch (365:9): [True: 0, False: 81.2k]
  ------------------
  366|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNINITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  367|      0|        return -1;
  368|      0|    }
  369|       |
  370|  81.2k|    ret = b->method->bwrite(b, data, dlen, &local_written);
  371|       |
  372|  81.2k|    if (ret > 0)
  ------------------
  |  Branch (372:9): [True: 81.2k, False: 0]
  ------------------
  373|  81.2k|        b->num_write += (uint64_t)local_written;
  374|       |
  375|  81.2k|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|  81.2k|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 81.2k]
  |  |  |  Branch (26:51): [True: 0, False: 81.2k]
  |  |  ------------------
  ------------------
  376|      0|        ret = (int)bio_call_callback(b, BIO_CB_WRITE | BIO_CB_RETURN, data,
  ------------------
  |  |  302|      0|#define BIO_CB_WRITE 0x03
  ------------------
                      ret = (int)bio_call_callback(b, BIO_CB_WRITE | BIO_CB_RETURN, data,
  ------------------
  |  |  313|      0|#define BIO_CB_RETURN 0x80
  ------------------
  377|      0|            dlen, 0, 0L, ret, &local_written);
  378|       |
  379|  81.2k|    if (written != NULL)
  ------------------
  |  Branch (379:9): [True: 81.2k, False: 0]
  ------------------
  380|  81.2k|        *written = local_written;
  381|  81.2k|    return ret;
  382|  81.2k|}

BIO_meth_new:
   38|  3.63k|{
   39|  3.63k|    BIO_METHOD *biom = OPENSSL_zalloc(sizeof(BIO_METHOD));
  ------------------
  |  |  109|  3.63k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   40|       |
   41|  3.63k|    if (biom == NULL
  ------------------
  |  Branch (41:9): [True: 0, False: 3.63k]
  ------------------
   42|  3.63k|        || (biom->name = OPENSSL_strdup(name)) == NULL) {
  ------------------
  |  |  136|  3.63k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (42:12): [True: 0, False: 3.63k]
  ------------------
   43|      0|        OPENSSL_free(biom);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   44|      0|        return NULL;
   45|      0|    }
   46|  3.63k|    biom->type = type;
   47|  3.63k|    return biom;
   48|  3.63k|}
BIO_meth_free:
   51|  3.62k|{
   52|  3.62k|    if (biom != NULL) {
  ------------------
  |  Branch (52:9): [True: 3.62k, False: 0]
  ------------------
   53|  3.62k|        OPENSSL_free(biom->name);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   54|  3.62k|        OPENSSL_free(biom);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   55|  3.62k|    }
   56|  3.62k|}
bwrite_conv:
   73|  81.2k|{
   74|  81.2k|    int ret;
   75|       |
   76|  81.2k|    if (datal > INT_MAX)
  ------------------
  |  Branch (76:9): [True: 0, False: 81.2k]
  ------------------
   77|      0|        datal = INT_MAX;
   78|       |
   79|  81.2k|    ret = bio->method->bwrite_old(bio, data, (int)datal);
   80|       |
   81|  81.2k|    if (ret <= 0) {
  ------------------
  |  Branch (81:9): [True: 0, False: 81.2k]
  ------------------
   82|      0|        *written = 0;
   83|      0|        return ret;
   84|      0|    }
   85|       |
   86|  81.2k|    *written = (size_t)ret;
   87|       |
   88|  81.2k|    return 1;
   89|  81.2k|}
BIO_meth_set_write:
   93|  3.62k|{
   94|  3.62k|    biom->bwrite_old = bwrite;
   95|  3.62k|    biom->bwrite = bwrite_conv;
   96|  3.62k|    return 1;
   97|  3.62k|}
BIO_meth_set_write_ex:
  101|      1|{
  102|       |    biom->bwrite_old = NULL;
  103|      1|    biom->bwrite = bwrite;
  104|      1|    return 1;
  105|      1|}
bread_conv:
  121|   175k|{
  122|   175k|    int ret;
  123|       |
  124|   175k|    if (datal == 0) {
  ------------------
  |  Branch (124:9): [True: 0, False: 175k]
  ------------------
  125|      0|        *readbytes = 0;
  126|      0|        return 1;
  127|      0|    }
  128|       |
  129|   175k|    if (datal > INT_MAX)
  ------------------
  |  Branch (129:9): [True: 0, False: 175k]
  ------------------
  130|      0|        datal = INT_MAX;
  131|       |
  132|   175k|    ret = bio->method->bread_old(bio, data, (int)datal);
  133|       |
  134|   175k|    bio->flags &= ~BIO_FLAGS_AUTO_EOF;
  ------------------
  |  |   49|   175k|#define BIO_FLAGS_AUTO_EOF 0x80
  ------------------
  135|   175k|    if (ret == 0) {
  ------------------
  |  Branch (135:9): [True: 0, False: 175k]
  ------------------
  136|      0|        if (BIO_ctrl(bio, BIO_CTRL_EOF, 0, NULL) == 0)
  ------------------
  |  |   91|      0|#define BIO_CTRL_EOF 2 /* opt - are we at the eof */
  ------------------
  |  Branch (136:13): [True: 0, False: 0]
  ------------------
  137|      0|            bio->flags |= BIO_FLAGS_AUTO_EOF;
  ------------------
  |  |   49|      0|#define BIO_FLAGS_AUTO_EOF 0x80
  ------------------
  138|      0|        *readbytes = 0;
  139|      0|        return 0;
  140|      0|    }
  141|       |
  142|   175k|    if (ret < 0) {
  ------------------
  |  Branch (142:9): [True: 33.3k, False: 141k]
  ------------------
  143|  33.3k|        *readbytes = 0;
  144|  33.3k|        return ret;
  145|  33.3k|    }
  146|       |
  147|   141k|    *readbytes = (size_t)ret;
  148|       |
  149|   141k|    return 1;
  150|   175k|}
BIO_meth_set_read:
  154|  3.62k|{
  155|  3.62k|    biom->bread_old = bread;
  156|  3.62k|    biom->bread = bread_conv;
  157|  3.62k|    return 1;
  158|  3.62k|}
BIO_meth_set_read_ex:
  162|      1|{
  163|       |    biom->bread_old = NULL;
  164|      1|    biom->bread = bread;
  165|      1|    return 1;
  166|      1|}
BIO_meth_set_puts:
  177|      1|{
  178|      1|    biom->bputs = bputs;
  179|      1|    return 1;
  180|      1|}
BIO_meth_set_gets:
  191|      1|{
  192|      1|    biom->bgets = bgets;
  193|      1|    return 1;
  194|      1|}
BIO_meth_set_ctrl:
  205|  3.63k|{
  206|  3.63k|    biom->ctrl = ctrl;
  207|  3.63k|    return 1;
  208|  3.63k|}
BIO_meth_set_create:
  218|  3.63k|{
  219|  3.63k|    biom->create = create;
  220|  3.63k|    return 1;
  221|  3.63k|}
BIO_meth_set_destroy:
  231|  3.63k|{
  232|  3.63k|    biom->destroy = destroy;
  233|  3.63k|    return 1;
  234|  3.63k|}

BIO_printf:
   19|  1.00k|{
   20|  1.00k|    va_list args;
   21|  1.00k|    int ret;
   22|       |
   23|  1.00k|    va_start(args, format);
   24|       |
   25|  1.00k|    ret = BIO_vprintf(bio, format, args);
   26|       |
   27|       |    va_end(args);
   28|  1.00k|    return ret;
   29|  1.00k|}
BIO_vprintf:
  195|  1.00k|{
  196|  1.00k|    va_list cp_args;
  197|  1.00k|#if !defined(_MSC_VER) || _MSC_VER >= 1900
  198|  1.00k|    int sz;
  199|  1.00k|#endif
  200|  1.00k|    int ret = -1;
  201|       |
  202|  1.00k|    va_copy(cp_args, args);
  203|       |#if defined(_MSC_VER) && _MSC_VER < 1900
  204|       |    ret = msvc_bio_vprintf(bio, format, cp_args);
  205|       |#else
  206|  1.00k|    char buf[512];
  207|  1.00k|    char *abuf;
  208|       |    /*
  209|       |     * some compilers modify va_list, hence each call to v*printf()
  210|       |     * should operate with its own instance of va_list. The first
  211|       |     * call to vsnprintf() here uses args we got in function argument.
  212|       |     * The second call is going to use cp_args we made earlier.
  213|       |     */
  214|  1.00k|    sz = vsnprintf(buf, sizeof(buf), format, args);
  215|  1.00k|    if (sz >= 0) {
  ------------------
  |  Branch (215:9): [True: 1.00k, False: 0]
  ------------------
  216|  1.00k|        if ((size_t)sz >= sizeof(buf)) {
  ------------------
  |  Branch (216:13): [True: 0, False: 1.00k]
  ------------------
  217|      0|            sz += 1;
  218|      0|            abuf = (char *)OPENSSL_malloc(sz);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  219|      0|            if (abuf == NULL) {
  ------------------
  |  Branch (219:17): [True: 0, False: 0]
  ------------------
  220|      0|                ret = -1;
  221|      0|            } else {
  222|      0|                sz = vsnprintf(abuf, sz, format, cp_args);
  223|      0|                ret = BIO_write(bio, abuf, sz);
  224|      0|                OPENSSL_free(abuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  225|      0|            }
  226|  1.00k|        } else {
  227|       |            /* vsnprintf returns length not including nul-terminator */
  228|  1.00k|            ret = BIO_write(bio, buf, sz);
  229|  1.00k|        }
  230|  1.00k|    }
  231|  1.00k|#endif
  232|       |    va_end(cp_args);
  233|  1.00k|    return ret;
  234|  1.00k|}
BIO_snprintf:
  244|  1.36k|{
  245|  1.36k|    va_list args;
  246|  1.36k|    int ret;
  247|       |
  248|  1.36k|    va_start(args, format);
  249|  1.36k|    ret = BIO_vsnprintf(buf, n, format, args);
  250|  1.36k|    va_end(args);
  251|       |
  252|  1.36k|    return ret;
  253|  1.36k|}
BIO_vsnprintf:
  256|   119k|{
  257|       |#if defined(_MSC_VER) && _MSC_VER < 1900
  258|       |    char *fmt_alloc;
  259|       |    const char *fmt;
  260|       |#endif
  261|   119k|    int ret;
  262|       |
  263|       |#if defined(_MSC_VER) && _MSC_VER < 1900
  264|       |    if (!msvc_translate_printf_format(format, &fmt, &fmt_alloc))
  265|       |        return -1;
  266|       |    ret = _vsnprintf_s(buf, n, _TRUNCATE, fmt, args);
  267|       |    OPENSSL_free(fmt_alloc);
  268|       |#else
  269|   119k|    ret = vsnprintf(buf, n, format, args);
  270|   119k|    if ((size_t)ret >= n)
  ------------------
  |  Branch (270:9): [True: 0, False: 119k]
  ------------------
  271|      0|        ret = -1;
  272|   119k|#endif
  273|   119k|    return ret;
  274|   119k|}

ossl_bio_core_globals_new:
   31|      2|{
   32|      2|    return OPENSSL_zalloc(sizeof(BIO_CORE_GLOBALS));
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   33|      2|}

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

BIO_s_mem:
   73|  94.7k|{
   74|  94.7k|    return &mem_method;
   75|  94.7k|}
BIO_new_mem_buf:
   83|  36.5k|{
   84|  36.5k|    BIO *ret;
   85|  36.5k|    BUF_MEM *b;
   86|  36.5k|    BIO_BUF_MEM *bb;
   87|  36.5k|    size_t sz;
   88|       |
   89|  36.5k|    if (buf == NULL) {
  ------------------
  |  Branch (89:9): [True: 0, False: 36.5k]
  ------------------
   90|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   91|      0|        return NULL;
   92|      0|    }
   93|  36.5k|    sz = (len < 0) ? strlen(buf) : (size_t)len;
  ------------------
  |  Branch (93:10): [True: 7.46k, False: 29.1k]
  ------------------
   94|  36.5k|    if ((ret = BIO_new(BIO_s_mem())) == NULL)
  ------------------
  |  Branch (94:9): [True: 0, False: 36.5k]
  ------------------
   95|      0|        return NULL;
   96|  36.5k|    bb = (BIO_BUF_MEM *)ret->ptr;
   97|  36.5k|    b = bb->buf;
   98|       |    /* Cast away const and trust in the MEM_RDONLY flag. */
   99|  36.5k|    b->data = (void *)buf;
  100|  36.5k|    b->length = sz;
  101|  36.5k|    b->max = sz;
  102|  36.5k|    *bb->readp = *bb->buf;
  103|  36.5k|    ret->flags |= BIO_FLAGS_MEM_RDONLY;
  ------------------
  |  |  250|  36.5k|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  104|       |    /* Since this is static data retrying won't help */
  105|  36.5k|    ret->num = 0;
  106|  36.5k|    return ret;
  107|  36.5k|}
bss_mem.c:mem_write:
  216|  89.4k|{
  217|  89.4k|    int ret = -1;
  218|  89.4k|    size_t blen;
  219|  89.4k|    BIO_BUF_MEM *bbm = (BIO_BUF_MEM *)b->ptr;
  220|       |
  221|  89.4k|    if (b->flags & BIO_FLAGS_MEM_RDONLY) {
  ------------------
  |  |  250|  89.4k|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (221:9): [True: 0, False: 89.4k]
  ------------------
  222|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_WRITE_TO_READ_ONLY_BIO);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  223|      0|        goto end;
  224|      0|    }
  225|  89.4k|    BIO_clear_retry_flags(b);
  ------------------
  |  |  272|  89.4k|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  89.4k|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  89.4k|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  89.4k|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  89.4k|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  89.4k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  226|  89.4k|    if (inl <= 0)
  ------------------
  |  Branch (226:9): [True: 0, False: 89.4k]
  ------------------
  227|      0|        return 0;
  228|  89.4k|    if (in == NULL) {
  ------------------
  |  Branch (228:9): [True: 0, False: 89.4k]
  ------------------
  229|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  230|      0|        goto end;
  231|      0|    }
  232|  89.4k|    blen = bbm->readp->length;
  233|  89.4k|    mem_buf_sync(b);
  234|  89.4k|    if (BUF_MEM_grow_clean(bbm->buf, blen + inl) == 0)
  ------------------
  |  Branch (234:9): [True: 0, False: 89.4k]
  ------------------
  235|      0|        goto end;
  236|  89.4k|    memcpy(bbm->buf->data + blen, in, inl);
  237|  89.4k|    *bbm->readp = *bbm->buf;
  238|  89.4k|    ret = inl;
  239|  89.4k|end:
  240|  89.4k|    return ret;
  241|  89.4k|}
bss_mem.c:mem_buf_sync:
  179|   100k|{
  180|   100k|    if (b != NULL && b->init != 0 && b->ptr != NULL) {
  ------------------
  |  Branch (180:9): [True: 100k, False: 0]
  |  Branch (180:22): [True: 100k, False: 0]
  |  Branch (180:38): [True: 100k, False: 0]
  ------------------
  181|   100k|        BIO_BUF_MEM *bbm = (BIO_BUF_MEM *)b->ptr;
  182|       |
  183|   100k|        if (bbm->readp->data != bbm->buf->data) {
  ------------------
  |  Branch (183:13): [True: 0, False: 100k]
  ------------------
  184|      0|            memmove(bbm->buf->data, bbm->readp->data, bbm->readp->length);
  185|      0|            bbm->buf->length = bbm->readp->length;
  186|      0|            bbm->readp->data = bbm->buf->data;
  187|      0|        }
  188|   100k|    }
  189|   100k|    return 0;
  190|   100k|}
bss_mem.c:mem_read:
  193|   179k|{
  194|   179k|    int ret = -1;
  195|   179k|    BIO_BUF_MEM *bbm = (BIO_BUF_MEM *)b->ptr;
  196|   179k|    BUF_MEM *bm = bbm->readp;
  197|       |
  198|   179k|    if (b->flags & BIO_FLAGS_MEM_RDONLY)
  ------------------
  |  |  250|   179k|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (198:9): [True: 153k, False: 25.4k]
  ------------------
  199|   153k|        bm = bbm->buf;
  200|   179k|    BIO_clear_retry_flags(b);
  ------------------
  |  |  272|   179k|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|   179k|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|   179k|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|   179k|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|   179k|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|   179k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  201|   179k|    ret = (outl >= 0 && (size_t)outl > bm->length) ? (int)bm->length : outl;
  ------------------
  |  Branch (201:12): [True: 179k, False: 0]
  |  Branch (201:25): [True: 14.4k, False: 164k]
  ------------------
  202|   179k|    if ((out != NULL) && (ret > 0)) {
  ------------------
  |  Branch (202:9): [True: 179k, False: 0]
  |  Branch (202:26): [True: 164k, False: 14.4k]
  ------------------
  203|   164k|        memcpy(out, bm->data, ret);
  204|   164k|        bm->length -= ret;
  205|   164k|        bm->max -= ret;
  206|   164k|        bm->data += ret;
  207|   164k|    } else if (bm->length == 0) {
  ------------------
  |  Branch (207:16): [True: 14.4k, False: 0]
  ------------------
  208|  14.4k|        ret = b->num;
  209|  14.4k|        if (ret != 0)
  ------------------
  |  Branch (209:13): [True: 14.4k, False: 0]
  ------------------
  210|  14.4k|            BIO_set_retry_read(b);
  ------------------
  |  |  266|  14.4k|    BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  222|  14.4k|#define BIO_FLAGS_READ 0x01
  |  |  ------------------
  |  |                   BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  14.4k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  211|  14.4k|    }
  212|   179k|    return ret;
  213|   179k|}
bss_mem.c:mem_puts:
  387|  76.8k|{
  388|  76.8k|    int ret;
  389|  76.8k|    size_t n = strlen(str);
  390|       |
  391|  76.8k|    if (n > INT_MAX)
  ------------------
  |  Branch (391:9): [True: 0, False: 76.8k]
  ------------------
  392|      0|        return -1;
  393|  76.8k|    ret = mem_write(bp, str, (int)n);
  394|       |    /* memory semantics is that it will always work */
  395|  76.8k|    return ret;
  396|  76.8k|}
bss_mem.c:mem_gets:
  349|   102k|{
  350|   102k|    int i, j;
  351|   102k|    int ret = -1;
  352|   102k|    char *p;
  353|   102k|    BIO_BUF_MEM *bbm = (BIO_BUF_MEM *)bp->ptr;
  354|   102k|    BUF_MEM *bm = bbm->readp;
  355|       |
  356|   102k|    if (bp->flags & BIO_FLAGS_MEM_RDONLY)
  ------------------
  |  |  250|   102k|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (356:9): [True: 102k, False: 0]
  ------------------
  357|   102k|        bm = bbm->buf;
  358|   102k|    BIO_clear_retry_flags(bp);
  ------------------
  |  |  272|   102k|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|   102k|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|   102k|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|   102k|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|   102k|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|   102k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  359|   102k|    j = bm->length < INT_MAX ? (int)bm->length : INT_MAX;
  ------------------
  |  Branch (359:9): [True: 102k, False: 0]
  ------------------
  360|   102k|    if ((size - 1) < j)
  ------------------
  |  Branch (360:9): [True: 51.0k, False: 51.3k]
  ------------------
  361|  51.0k|        j = size - 1;
  362|   102k|    if (j <= 0) {
  ------------------
  |  Branch (362:9): [True: 3.55k, False: 98.8k]
  ------------------
  363|  3.55k|        *buf = '\0';
  364|  3.55k|        return 0;
  365|  3.55k|    }
  366|  98.8k|    p = bm->data;
  367|  5.46M|    for (i = 0; i < j; i++) {
  ------------------
  |  Branch (367:17): [True: 5.46M, False: 0]
  ------------------
  368|  5.46M|        if (p[i] == '\n') {
  ------------------
  |  Branch (368:13): [True: 98.8k, False: 5.37M]
  ------------------
  369|  98.8k|            i++;
  370|  98.8k|            break;
  371|  98.8k|        }
  372|  5.46M|    }
  373|       |
  374|       |    /*
  375|       |     * i is now the max num of bytes to copy, either j or up to
  376|       |     * and including the first newline
  377|       |     */
  378|       |
  379|  98.8k|    i = mem_read(bp, buf, i);
  380|  98.8k|    if (i > 0)
  ------------------
  |  Branch (380:9): [True: 98.8k, False: 0]
  ------------------
  381|  98.8k|        buf[i] = '\0';
  382|  98.8k|    ret = i;
  383|  98.8k|    return ret;
  384|   102k|}
bss_mem.c:mem_ctrl:
  244|   157k|{
  245|   157k|    long ret = 1;
  246|   157k|    char **pptr;
  247|   157k|    BIO_BUF_MEM *bbm = (BIO_BUF_MEM *)b->ptr;
  248|   157k|    BUF_MEM *bm, *bo; /* bio_mem, bio_other */
  249|   157k|    ossl_ssize_t off, remain;
  250|       |
  251|   157k|    if (b->flags & BIO_FLAGS_MEM_RDONLY) {
  ------------------
  |  |  250|   157k|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (251:9): [True: 120k, False: 36.8k]
  ------------------
  252|   120k|        bm = bbm->buf;
  253|   120k|        bo = bbm->readp;
  254|   120k|    } else {
  255|  36.8k|        bm = bbm->readp;
  256|  36.8k|        bo = bbm->buf;
  257|  36.8k|    }
  258|   157k|    off = (bm->data == bo->data) ? 0 : bm->data - bo->data;
  ------------------
  |  Branch (258:11): [True: 146k, False: 10.9k]
  ------------------
  259|   157k|    remain = bm->length;
  260|       |
  261|   157k|    switch (cmd) {
  262|    100|    case BIO_CTRL_RESET:
  ------------------
  |  |   90|    100|#define BIO_CTRL_RESET 1 /* opt - rewind/zero etc */
  ------------------
  |  Branch (262:5): [True: 100, False: 157k]
  ------------------
  263|    100|        bm = bbm->buf;
  264|    100|        if (bm->data != NULL) {
  ------------------
  |  Branch (264:13): [True: 100, False: 0]
  ------------------
  265|    100|            if (!(b->flags & BIO_FLAGS_MEM_RDONLY)) {
  ------------------
  |  |  250|    100|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (265:17): [True: 100, False: 0]
  ------------------
  266|    100|                if (!(b->flags & BIO_FLAGS_NONCLEAR_RST)) {
  ------------------
  |  |  251|    100|#define BIO_FLAGS_NONCLEAR_RST 0x400
  ------------------
  |  Branch (266:21): [True: 100, False: 0]
  ------------------
  267|    100|                    memset(bm->data, 0, bm->max);
  268|    100|                    bm->length = 0;
  269|    100|                }
  270|    100|                *bbm->readp = *bbm->buf;
  271|    100|            } else {
  272|       |                /* For read only case just reset to the start again */
  273|      0|                *bbm->buf = *bbm->readp;
  274|      0|            }
  275|    100|        }
  276|    100|        break;
  277|  29.3k|    case BIO_C_FILE_SEEK:
  ------------------
  |  |  471|  29.3k|#define BIO_C_FILE_SEEK 128
  ------------------
  |  Branch (277:5): [True: 29.3k, False: 128k]
  ------------------
  278|  29.3k|        if (num < 0 || num > off + remain)
  ------------------
  |  Branch (278:13): [True: 0, False: 29.3k]
  |  Branch (278:24): [True: 0, False: 29.3k]
  ------------------
  279|      0|            return -1; /* Can't see outside of the current buffer */
  280|       |
  281|  29.3k|        bm->data = (num != 0) ? bo->data + num : bo->data;
  ------------------
  |  Branch (281:20): [True: 0, False: 29.3k]
  ------------------
  282|  29.3k|        bm->length = bo->length - num;
  283|  29.3k|        bm->max = bo->max - num;
  284|  29.3k|        off = (ossl_ssize_t)num;
  285|       |        /* FALLTHRU */
  286|   110k|    case BIO_C_FILE_TELL:
  ------------------
  |  |  477|   110k|#define BIO_C_FILE_TELL 133
  ------------------
  |  Branch (286:5): [True: 80.7k, False: 77.0k]
  ------------------
  287|   110k|        ret = (long)off;
  288|   110k|        if (off > LONG_MAX)
  ------------------
  |  Branch (288:13): [True: 0, False: 110k]
  ------------------
  289|      0|            ret = -1;
  290|   110k|        break;
  291|      0|    case BIO_CTRL_EOF:
  ------------------
  |  |   91|      0|#define BIO_CTRL_EOF 2 /* opt - are we at the eof */
  ------------------
  |  Branch (291:5): [True: 0, False: 157k]
  ------------------
  292|      0|        if (b->num == 0 || (b->flags & BIO_FLAGS_MEM_LEGACY_EOF) != 0)
  ------------------
  |  |   55|      0|#define BIO_FLAGS_MEM_LEGACY_EOF 0x1000
  ------------------
  |  Branch (292:13): [True: 0, False: 0]
  |  Branch (292:28): [True: 0, False: 0]
  ------------------
  293|      0|            ret = (long)(bm->length == 0);
  294|      0|        else
  295|      0|            ret = 0;
  296|      0|        break;
  297|      0|    case BIO_C_SET_BUF_MEM_EOF_RETURN:
  ------------------
  |  |  473|      0|#define BIO_C_SET_BUF_MEM_EOF_RETURN 130 /* return end of input \
  ------------------
  |  Branch (297:5): [True: 0, False: 157k]
  ------------------
  298|      0|        b->num = (int)num;
  299|      0|        b->flags &= ~BIO_FLAGS_MEM_LEGACY_EOF;
  ------------------
  |  |   55|      0|#define BIO_FLAGS_MEM_LEGACY_EOF 0x1000
  ------------------
  300|      0|        break;
  301|  29.2k|    case BIO_CTRL_INFO:
  ------------------
  |  |   92|  29.2k|#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
  ------------------
  |  Branch (301:5): [True: 29.2k, False: 128k]
  ------------------
  302|  29.2k|        ret = (long)bm->length;
  303|  29.2k|        if (ptr != NULL) {
  ------------------
  |  Branch (303:13): [True: 18.2k, False: 11.0k]
  ------------------
  304|  18.2k|            pptr = (char **)ptr;
  305|  18.2k|            *pptr = (char *)(bm->data);
  306|  18.2k|        }
  307|  29.2k|        break;
  308|      0|    case BIO_C_SET_BUF_MEM:
  ------------------
  |  |  457|      0|#define BIO_C_SET_BUF_MEM 114
  ------------------
  |  Branch (308:5): [True: 0, False: 157k]
  ------------------
  309|      0|        mem_buf_free(b);
  310|      0|        b->shutdown = (int)num;
  311|      0|        bbm->buf = ptr;
  312|      0|        *bbm->readp = *bbm->buf;
  313|      0|        break;
  314|  11.0k|    case BIO_C_GET_BUF_MEM_PTR:
  ------------------
  |  |  458|  11.0k|#define BIO_C_GET_BUF_MEM_PTR 115
  ------------------
  |  Branch (314:5): [True: 11.0k, False: 146k]
  ------------------
  315|  11.0k|        if (ptr != NULL) {
  ------------------
  |  Branch (315:13): [True: 11.0k, False: 0]
  ------------------
  316|  11.0k|            if (!(b->flags & BIO_FLAGS_MEM_RDONLY))
  ------------------
  |  |  250|  11.0k|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (316:17): [True: 11.0k, False: 0]
  ------------------
  317|  11.0k|                mem_buf_sync(b);
  318|  11.0k|            bm = bbm->buf;
  319|  11.0k|            pptr = (char **)ptr;
  320|  11.0k|            *pptr = (char *)bm;
  321|  11.0k|        }
  322|  11.0k|        break;
  323|      0|    case BIO_CTRL_GET_CLOSE:
  ------------------
  |  |   97|      0|#define BIO_CTRL_GET_CLOSE 8 /* man - set the 'close' on free */
  ------------------
  |  Branch (323:5): [True: 0, False: 157k]
  ------------------
  324|      0|        ret = (long)b->shutdown;
  325|      0|        break;
  326|  7.25k|    case BIO_CTRL_SET_CLOSE:
  ------------------
  |  |   98|  7.25k|#define BIO_CTRL_SET_CLOSE 9 /* man - set the 'close' on free */
  ------------------
  |  Branch (326:5): [True: 7.25k, False: 150k]
  ------------------
  327|  7.25k|        b->shutdown = (int)num;
  328|  7.25k|        break;
  329|      0|    case BIO_CTRL_WPENDING:
  ------------------
  |  |  102|      0|#define BIO_CTRL_WPENDING 13 /* opt - number of bytes still to write */
  ------------------
  |  Branch (329:5): [True: 0, False: 157k]
  ------------------
  330|      0|        ret = 0L;
  331|      0|        break;
  332|      0|    case BIO_CTRL_PENDING:
  ------------------
  |  |   99|      0|#define BIO_CTRL_PENDING 10 /* opt - is their more data buffered */
  ------------------
  |  Branch (332:5): [True: 0, False: 157k]
  ------------------
  333|      0|        ret = (long)bm->length;
  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: 157k]
  ------------------
  336|      0|    case BIO_CTRL_FLUSH:
  ------------------
  |  |  100|      0|#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
  ------------------
  |  Branch (336:5): [True: 0, False: 157k]
  ------------------
  337|      0|        ret = 1;
  338|      0|        break;
  339|      0|    case BIO_CTRL_PUSH:
  ------------------
  |  |   95|      0|#define BIO_CTRL_PUSH 6 /* opt - internal, used to signify change */
  ------------------
  |  Branch (339:5): [True: 0, False: 157k]
  ------------------
  340|      0|    case BIO_CTRL_POP:
  ------------------
  |  |   96|      0|#define BIO_CTRL_POP 7 /* opt - internal, used to signify change */
  ------------------
  |  Branch (340:5): [True: 0, False: 157k]
  ------------------
  341|      0|    default:
  ------------------
  |  Branch (341:5): [True: 0, False: 157k]
  ------------------
  342|      0|        ret = 0;
  343|      0|        break;
  344|   157k|    }
  345|   157k|    return ret;
  346|   157k|}
bss_mem.c:mem_buf_free:
  159|   109k|{
  160|   109k|    if (a == NULL)
  ------------------
  |  Branch (160:9): [True: 0, False: 109k]
  ------------------
  161|      0|        return 0;
  162|       |
  163|   109k|    if (a->shutdown && a->init && a->ptr != NULL) {
  ------------------
  |  Branch (163:9): [True: 109k, False: 0]
  |  Branch (163:24): [True: 109k, False: 0]
  |  Branch (163:35): [True: 109k, False: 0]
  ------------------
  164|   109k|        BIO_BUF_MEM *bb = (BIO_BUF_MEM *)a->ptr;
  165|   109k|        BUF_MEM *b = bb->buf;
  166|       |
  167|   109k|        if (a->flags & BIO_FLAGS_MEM_RDONLY)
  ------------------
  |  |  250|   109k|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (167:13): [True: 36.5k, False: 72.7k]
  ------------------
  168|  36.5k|            b->data = NULL;
  169|   109k|        BUF_MEM_free(b);
  170|   109k|    }
  171|   109k|    return 1;
  172|   109k|}
bss_mem.c:mem_new:
  134|   109k|{
  135|   109k|    return mem_init(bi, 0L);
  136|   109k|}
bss_mem.c:mem_init:
  110|   109k|{
  111|   109k|    BIO_BUF_MEM *bb = OPENSSL_zalloc(sizeof(*bb));
  ------------------
  |  |  109|   109k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  112|       |
  113|   109k|    if (bb == NULL)
  ------------------
  |  Branch (113:9): [True: 0, False: 109k]
  ------------------
  114|      0|        return 0;
  115|   109k|    if ((bb->buf = BUF_MEM_new_ex(flags)) == NULL) {
  ------------------
  |  Branch (115:9): [True: 0, False: 109k]
  ------------------
  116|      0|        OPENSSL_free(bb);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  117|      0|        return 0;
  118|      0|    }
  119|   109k|    if ((bb->readp = OPENSSL_zalloc(sizeof(*bb->readp))) == NULL) {
  ------------------
  |  |  109|   109k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (119:9): [True: 0, False: 109k]
  ------------------
  120|      0|        BUF_MEM_free(bb->buf);
  121|      0|        OPENSSL_free(bb);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  122|      0|        return 0;
  123|      0|    }
  124|   109k|    *bb->readp = *bb->buf;
  125|   109k|    bi->shutdown = 1;
  126|   109k|    bi->init = 1;
  127|   109k|    bi->num = -1;
  128|   109k|    bi->flags |= BIO_FLAGS_MEM_LEGACY_EOF;
  ------------------
  |  |   55|   109k|#define BIO_FLAGS_MEM_LEGACY_EOF 0x1000
  ------------------
  129|   109k|    bi->ptr = (char *)bb;
  130|   109k|    return 1;
  131|   109k|}
bss_mem.c:mem_free:
  144|   109k|{
  145|   109k|    BIO_BUF_MEM *bb;
  146|       |
  147|   109k|    if (a == NULL)
  ------------------
  |  Branch (147:9): [True: 0, False: 109k]
  ------------------
  148|      0|        return 0;
  149|       |
  150|   109k|    bb = (BIO_BUF_MEM *)a->ptr;
  151|   109k|    if (!mem_buf_free(a))
  ------------------
  |  Branch (151:9): [True: 0, False: 109k]
  ------------------
  152|      0|        return 0;
  153|   109k|    OPENSSL_free(bb->readp);
  ------------------
  |  |  132|   109k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  154|   109k|    OPENSSL_free(bb);
  ------------------
  |  |  132|   109k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  155|   109k|    return 1;
  156|   109k|}

BIO_s_socket:
   64|  3.62k|{
   65|  3.62k|    return &methods_sockp;
   66|  3.62k|}
BIO_sock_should_retry:
  299|  11.5k|{
  300|  11.5k|    int err;
  301|       |
  302|  11.5k|    if ((i == 0) || (i == -1)) {
  ------------------
  |  Branch (302:9): [True: 0, False: 11.5k]
  |  Branch (302:21): [True: 11.5k, False: 0]
  ------------------
  303|  11.5k|        err = get_last_socket_error();
  ------------------
  |  |  166|  11.5k|#define get_last_socket_error() errno
  ------------------
  304|       |
  305|  11.5k|        return BIO_sock_non_fatal_error(err);
  306|  11.5k|    }
  307|      0|    return 0;
  308|  11.5k|}
BIO_sock_non_fatal_error:
  311|  11.5k|{
  312|       |#if defined(OPENSSL_SYS_WINDOWS)
  313|       |    return err == WSAEWOULDBLOCK
  314|       |        || err == WSAENOTCONN
  315|       |        || err == WSAEINTR
  316|       |        || err == WSAEINPROGRESS
  317|       |        || err == WSAEALREADY;
  318|       |#else /* POSIX.1-2001 */
  319|  11.5k|    return err == EWOULDBLOCK
  ------------------
  |  Branch (319:12): [True: 11.5k, False: 0]
  ------------------
  320|      0|        || err == EAGAIN
  ------------------
  |  Branch (320:12): [True: 0, False: 0]
  ------------------
  321|      0|        || err == ENOTCONN
  ------------------
  |  Branch (321:12): [True: 0, False: 0]
  ------------------
  322|      0|        || err == EINTR
  ------------------
  |  Branch (322:12): [True: 0, False: 0]
  ------------------
  323|      0|#if !defined(__DJGPP__) && !defined(OPENSSL_SYS_TANDEM)
  324|      0|        || err == EPROTO
  ------------------
  |  Branch (324:12): [True: 0, False: 0]
  ------------------
  325|      0|#endif
  326|       |#ifdef __FreeBSD__
  327|       |        || err == EBUSY
  328|       |#endif
  329|      0|        || err == EINPROGRESS
  ------------------
  |  Branch (329:12): [True: 0, False: 0]
  ------------------
  330|      0|        || err == EALREADY;
  ------------------
  |  Branch (330:12): [True: 0, False: 0]
  ------------------
  331|  11.5k|#endif
  332|  11.5k|}
bss_sock.c:sock_write:
  131|  14.9k|{
  132|  14.9k|    int ret = 0;
  133|  14.9k|    struct bss_sock_st *data = (struct bss_sock_st *)b->ptr;
  134|       |
  135|  14.9k|    clear_socket_error();
  ------------------
  |  |  167|  14.9k|#define clear_socket_error() errno = 0
  ------------------
  136|       |#ifndef OPENSSL_NO_KTLS
  137|       |    if (BIO_should_ktls_ctrl_msg_flag(b)) {
  138|       |        unsigned char record_type = data->ktls_record_type;
  139|       |        ret = ktls_send_ctrl_message(b->num, record_type, in, inl, data->sflags);
  140|       |        if (ret >= 0) {
  141|       |            ret = inl;
  142|       |            BIO_clear_ktls_ctrl_msg_flag(b);
  143|       |        }
  144|       |    } else
  145|       |#endif
  146|       |#if defined(OSSL_TFO_SENDTO)
  147|       |        if (data->tfo_first) {
  148|       |        socklen_t peerlen = BIO_ADDR_sockaddr_size(&data->tfo_peer);
  149|       |
  150|       |        ret = sendto(b->num, in, inl, OSSL_TFO_SENDTO | data->sflags,
  151|       |            BIO_ADDR_sockaddr(&data->tfo_peer), peerlen);
  152|       |        data->tfo_first = 0;
  153|       |    } else
  154|       |#endif
  155|  14.9k|        ret = writesocket_ex(b->num, in, inl, data->sflags);
  ------------------
  |  |  220|  14.9k|#define writesocket_ex(s, b, n, f) ((f) == 0) ? write((s), (b), (n)) : send((s), (b), (n), (f))
  |  |  ------------------
  |  |  |  Branch (220:36): [True: 14.9k, False: 0]
  |  |  ------------------
  ------------------
  156|  14.9k|    BIO_clear_retry_flags(b);
  ------------------
  |  |  272|  14.9k|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  14.9k|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  14.9k|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  14.9k|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  14.9k|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  14.9k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  157|  14.9k|    if (ret <= 0) {
  ------------------
  |  Branch (157:9): [True: 0, False: 14.9k]
  ------------------
  158|      0|        if (BIO_sock_should_retry(ret))
  ------------------
  |  Branch (158:13): [True: 0, False: 0]
  ------------------
  159|      0|            BIO_set_retry_write(b);
  ------------------
  |  |  268|      0|    BIO_set_flags(b, (BIO_FLAGS_WRITE | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  223|      0|#define BIO_FLAGS_WRITE 0x02
  |  |  ------------------
  |  |                   BIO_set_flags(b, (BIO_FLAGS_WRITE | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  160|      0|    }
  161|  14.9k|    return ret;
  162|  14.9k|}
bss_sock.c:sock_read:
  107|  40.3k|{
  108|  40.3k|    int ret = 0;
  109|       |
  110|  40.3k|    if (out != NULL && outl > 0) {
  ------------------
  |  Branch (110:9): [True: 40.3k, False: 0]
  |  Branch (110:24): [True: 40.3k, False: 0]
  ------------------
  111|  40.3k|        clear_socket_error();
  ------------------
  |  |  167|  40.3k|#define clear_socket_error() errno = 0
  ------------------
  112|  40.3k|        b->flags &= ~BIO_FLAGS_IN_EOF;
  ------------------
  |  |  252|  40.3k|#define BIO_FLAGS_IN_EOF 0x800
  ------------------
  113|       |#ifndef OPENSSL_NO_KTLS
  114|       |        if (BIO_get_ktls_recv(b))
  115|       |            ret = ktls_read_record(b->num, out, outl);
  116|       |        else
  117|       |#endif
  118|  40.3k|            ret = readsocket(b->num, out, outl);
  ------------------
  |  |  218|  40.3k|#define readsocket(s, b, n) read((s), (b), (n))
  ------------------
  119|  40.3k|        BIO_clear_retry_flags(b);
  ------------------
  |  |  272|  40.3k|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  40.3k|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  40.3k|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  40.3k|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  40.3k|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  40.3k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  120|  40.3k|        if (ret <= 0) {
  ------------------
  |  Branch (120:13): [True: 11.5k, False: 28.8k]
  ------------------
  121|  11.5k|            if (BIO_sock_should_retry(ret))
  ------------------
  |  Branch (121:17): [True: 11.5k, False: 0]
  ------------------
  122|  11.5k|                BIO_set_retry_read(b);
  ------------------
  |  |  266|  11.5k|    BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  222|  11.5k|#define BIO_FLAGS_READ 0x01
  |  |  ------------------
  |  |                   BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  11.5k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  123|      0|            else if (ret == 0)
  ------------------
  |  Branch (123:22): [True: 0, False: 0]
  ------------------
  124|      0|                b->flags |= BIO_FLAGS_IN_EOF;
  ------------------
  |  |  252|      0|#define BIO_FLAGS_IN_EOF 0x800
  ------------------
  125|  11.5k|        }
  126|  40.3k|    }
  127|  40.3k|    return ret;
  128|  40.3k|}
bss_sock.c:sock_ctrl:
  165|  25.1k|{
  166|  25.1k|    long ret = 1;
  167|  25.1k|    int *ip;
  168|  25.1k|    struct bss_sock_st *data = (struct bss_sock_st *)b->ptr;
  169|       |#ifndef OPENSSL_NO_KTLS
  170|       |    ktls_crypto_info_t *crypto_info;
  171|       |#endif
  172|       |
  173|  25.1k|    switch (cmd) {
  174|  3.62k|    case BIO_C_SET_FD:
  ------------------
  |  |  447|  3.62k|#define BIO_C_SET_FD 104
  ------------------
  |  Branch (174:5): [True: 3.62k, False: 21.5k]
  ------------------
  175|       |        /* minimal sock_free() */
  176|  3.62k|        if (b->shutdown) {
  ------------------
  |  Branch (176:13): [True: 3.62k, False: 0]
  ------------------
  177|  3.62k|            if (b->init)
  ------------------
  |  Branch (177:17): [True: 0, False: 3.62k]
  ------------------
  178|      0|                BIO_closesocket(b->num);
  179|  3.62k|            b->flags = 0;
  180|  3.62k|        }
  181|  3.62k|        b->num = *((int *)ptr);
  182|  3.62k|        b->shutdown = (int)num;
  183|  3.62k|        b->init = 1;
  184|  3.62k|        data->tfo_first = 0;
  185|  3.62k|        memset(&data->tfo_peer, 0, sizeof(data->tfo_peer));
  186|  3.62k|        break;
  187|      0|    case BIO_C_GET_FD:
  ------------------
  |  |  448|      0|#define BIO_C_GET_FD 105
  ------------------
  |  Branch (187:5): [True: 0, False: 25.1k]
  ------------------
  188|      0|        if (b->init) {
  ------------------
  |  Branch (188:13): [True: 0, False: 0]
  ------------------
  189|      0|            ip = (int *)ptr;
  190|      0|            if (ip != NULL)
  ------------------
  |  Branch (190:17): [True: 0, False: 0]
  ------------------
  191|      0|                *ip = b->num;
  192|      0|            ret = b->num;
  193|      0|        } else
  194|      0|            ret = -1;
  195|      0|        break;
  196|      0|    case BIO_CTRL_GET_CLOSE:
  ------------------
  |  |   97|      0|#define BIO_CTRL_GET_CLOSE 8 /* man - set the 'close' on free */
  ------------------
  |  Branch (196:5): [True: 0, False: 25.1k]
  ------------------
  197|      0|        ret = b->shutdown;
  198|      0|        break;
  199|      0|    case BIO_CTRL_SET_CLOSE:
  ------------------
  |  |   98|      0|#define BIO_CTRL_SET_CLOSE 9 /* man - set the 'close' on free */
  ------------------
  |  Branch (199:5): [True: 0, False: 25.1k]
  ------------------
  200|      0|        b->shutdown = (int)num;
  201|      0|        break;
  202|      0|    case BIO_CTRL_DUP:
  ------------------
  |  |  101|      0|#define BIO_CTRL_DUP 12 /* man - extra stuff for 'duped' BIO */
  ------------------
  |  Branch (202:5): [True: 0, False: 25.1k]
  ------------------
  203|  14.2k|    case BIO_CTRL_FLUSH:
  ------------------
  |  |  100|  14.2k|#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
  ------------------
  |  Branch (203:5): [True: 14.2k, False: 10.8k]
  ------------------
  204|  14.2k|        ret = 1;
  205|  14.2k|        break;
  206|      0|    case BIO_CTRL_GET_RPOLL_DESCRIPTOR:
  ------------------
  |  |  195|      0|#define BIO_CTRL_GET_RPOLL_DESCRIPTOR 91
  ------------------
  |  Branch (206:5): [True: 0, False: 25.1k]
  ------------------
  207|      0|    case BIO_CTRL_GET_WPOLL_DESCRIPTOR: {
  ------------------
  |  |  196|      0|#define BIO_CTRL_GET_WPOLL_DESCRIPTOR 92
  ------------------
  |  Branch (207:5): [True: 0, False: 25.1k]
  ------------------
  208|      0|        BIO_POLL_DESCRIPTOR *pd = ptr;
  209|       |
  210|      0|        if (!b->init) {
  ------------------
  |  Branch (210:13): [True: 0, False: 0]
  ------------------
  211|      0|            ret = 0;
  212|      0|            break;
  213|      0|        }
  214|       |
  215|      0|        pd->type = BIO_POLL_DESCRIPTOR_TYPE_SOCK_FD;
  ------------------
  |  |  425|      0|#define BIO_POLL_DESCRIPTOR_TYPE_SOCK_FD 1
  ------------------
  216|      0|        pd->value.fd = b->num;
  217|      0|    } break;
  218|       |#ifndef OPENSSL_NO_KTLS
  219|       |    case BIO_CTRL_SET_KTLS:
  220|       |        crypto_info = (ktls_crypto_info_t *)ptr;
  221|       |        ret = ktls_start(b->num, crypto_info, num);
  222|       |        if (ret)
  223|       |            BIO_set_ktls_flag(b, num);
  224|       |        break;
  225|       |    case BIO_CTRL_GET_KTLS_SEND:
  226|       |        return BIO_should_ktls_flag(b, 1) != 0;
  227|       |    case BIO_CTRL_GET_KTLS_RECV:
  228|       |        return BIO_should_ktls_flag(b, 0) != 0;
  229|       |    case BIO_CTRL_SET_KTLS_TX_SEND_CTRL_MSG:
  230|       |        BIO_set_ktls_ctrl_msg_flag(b);
  231|       |        data->ktls_record_type = (unsigned char)num;
  232|       |        ret = 0;
  233|       |        break;
  234|       |    case BIO_CTRL_CLEAR_KTLS_TX_CTRL_MSG:
  235|       |        BIO_clear_ktls_ctrl_msg_flag(b);
  236|       |        ret = 0;
  237|       |        break;
  238|       |    case BIO_CTRL_SET_KTLS_TX_ZEROCOPY_SENDFILE:
  239|       |        ret = ktls_enable_tx_zerocopy_sendfile(b->num);
  240|       |        if (ret)
  241|       |            BIO_set_ktls_zerocopy_sendfile_flag(b);
  242|       |        break;
  243|       |#endif
  244|      0|    case BIO_CTRL_EOF:
  ------------------
  |  |   91|      0|#define BIO_CTRL_EOF 2 /* opt - are we at the eof */
  ------------------
  |  Branch (244:5): [True: 0, False: 25.1k]
  ------------------
  245|      0|        ret = (b->flags & BIO_FLAGS_IN_EOF) != 0;
  ------------------
  |  |  252|      0|#define BIO_FLAGS_IN_EOF 0x800
  ------------------
  246|      0|        break;
  247|      0|    case BIO_C_GET_CONNECT:
  ------------------
  |  |  466|      0|#define BIO_C_GET_CONNECT 123
  ------------------
  |  Branch (247:5): [True: 0, False: 25.1k]
  ------------------
  248|      0|        if (ptr != NULL && num == 2) {
  ------------------
  |  Branch (248:13): [True: 0, False: 0]
  |  Branch (248:28): [True: 0, False: 0]
  ------------------
  249|      0|            const char **pptr = (const char **)ptr;
  250|       |
  251|      0|            *pptr = (const char *)&data->tfo_peer;
  252|      0|        } else {
  253|      0|            ret = 0;
  254|      0|        }
  255|      0|        break;
  256|      0|    case BIO_C_SET_CONNECT:
  ------------------
  |  |  443|      0|#define BIO_C_SET_CONNECT 100
  ------------------
  |  Branch (256:5): [True: 0, False: 25.1k]
  ------------------
  257|      0|        if (ptr != NULL && num == 2) {
  ------------------
  |  Branch (257:13): [True: 0, False: 0]
  |  Branch (257:28): [True: 0, False: 0]
  ------------------
  258|      0|            ret = BIO_ADDR_make(&data->tfo_peer,
  259|      0|                BIO_ADDR_sockaddr((const BIO_ADDR *)ptr));
  260|      0|            if (ret)
  ------------------
  |  Branch (260:17): [True: 0, False: 0]
  ------------------
  261|      0|                data->tfo_first = 1;
  262|      0|        } else {
  263|      0|            ret = 0;
  264|      0|        }
  265|      0|        break;
  266|      0|    case BIO_C_SET_SEND_FLAGS:
  ------------------
  |  |  510|      0|#define BIO_C_SET_SEND_FLAGS 160
  ------------------
  |  Branch (266:5): [True: 0, False: 25.1k]
  ------------------
  267|      0|        if (num > INT_MAX || num < INT_MIN) {
  ------------------
  |  Branch (267:13): [True: 0, False: 0]
  |  Branch (267:30): [True: 0, False: 0]
  ------------------
  268|      0|            ERR_raise(ERR_LIB_BIO, BIO_R_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  269|      0|            return 0;
  270|      0|        }
  271|       |#if defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_TANDEM)
  272|       |        if (num != 0) {
  273|       |            ERR_raise(ERR_LIB_BIO, BIO_R_INVALID_ARGUMENT);
  274|       |            return 0;
  275|       |        }
  276|       |#endif
  277|      0|        data->sflags = (int)num;
  278|      0|        ret = 1;
  279|      0|        break;
  280|  7.25k|    default:
  ------------------
  |  Branch (280:5): [True: 7.25k, False: 17.8k]
  ------------------
  281|  7.25k|        ret = 0;
  282|  7.25k|        break;
  283|  25.1k|    }
  284|  25.1k|    return ret;
  285|  25.1k|}
bss_sock.c:sock_new:
   80|  3.62k|{
   81|  3.62k|    bi->init = 0;
   82|  3.62k|    bi->num = 0;
   83|  3.62k|    bi->flags = 0;
   84|  3.62k|    bi->ptr = OPENSSL_zalloc(sizeof(struct bss_sock_st));
  ------------------
  |  |  109|  3.62k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   85|  3.62k|    if (bi->ptr == NULL)
  ------------------
  |  Branch (85:9): [True: 0, False: 3.62k]
  ------------------
   86|      0|        return 0;
   87|  3.62k|    return 1;
   88|  3.62k|}
bss_sock.c:sock_free:
   91|  3.62k|{
   92|  3.62k|    if (a == NULL)
  ------------------
  |  Branch (92:9): [True: 0, False: 3.62k]
  ------------------
   93|      0|        return 0;
   94|  3.62k|    if (a->shutdown) {
  ------------------
  |  Branch (94:9): [True: 0, False: 3.62k]
  ------------------
   95|      0|        if (a->init) {
  ------------------
  |  Branch (95:13): [True: 0, False: 0]
  ------------------
   96|      0|            BIO_closesocket(a->num);
   97|      0|        }
   98|      0|        a->init = 0;
   99|      0|        a->flags = 0;
  100|      0|    }
  101|  3.62k|    OPENSSL_free(a->ptr);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  102|       |    a->ptr = NULL;
  103|  3.62k|    return 1;
  104|  3.62k|}

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

bn_mul_add_words:
  116|   229k|{
  117|   229k|    BN_ULONG c1 = 0;
  118|       |
  119|   229k|    if (num <= 0)
  ------------------
  |  Branch (119:9): [True: 0, False: 229k]
  ------------------
  120|      0|        return c1;
  121|       |
  122|   459k|    while (num & ~3) {
  ------------------
  |  Branch (122:12): [True: 229k, False: 229k]
  ------------------
  123|   229k|        mul_add(rp[0], ap[0], w, c1);
  ------------------
  |  |   77|   229k|    do {                              \
  |  |   78|   229k|        register BN_ULONG high, low;  \
  |  |   79|   229k|        asm("mulq %3"                 \
  |  |   80|   229k|            : "=a"(low), "=d"(high)   \
  |  |   81|   229k|            : "a"(word), "m"(a)       \
  |  |   82|   229k|            : "cc");                  \
  |  |   83|   229k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   84|   229k|            : "+r"(carry), "+d"(high) \
  |  |   85|   229k|            : "a"(low), "g"(0)        \
  |  |   86|   229k|            : "cc");                  \
  |  |   87|   229k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   88|   229k|            : "+m"(r), "+d"(high)     \
  |  |   89|   229k|            : "r"(carry), "g"(0)      \
  |  |   90|   229k|            : "cc");                  \
  |  |   91|   229k|        carry = high;                 \
  |  |   92|   229k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (92:14): [Folded, False: 229k]
  |  |  ------------------
  ------------------
  124|   229k|        mul_add(rp[1], ap[1], w, c1);
  ------------------
  |  |   77|   229k|    do {                              \
  |  |   78|   229k|        register BN_ULONG high, low;  \
  |  |   79|   229k|        asm("mulq %3"                 \
  |  |   80|   229k|            : "=a"(low), "=d"(high)   \
  |  |   81|   229k|            : "a"(word), "m"(a)       \
  |  |   82|   229k|            : "cc");                  \
  |  |   83|   229k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   84|   229k|            : "+r"(carry), "+d"(high) \
  |  |   85|   229k|            : "a"(low), "g"(0)        \
  |  |   86|   229k|            : "cc");                  \
  |  |   87|   229k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   88|   229k|            : "+m"(r), "+d"(high)     \
  |  |   89|   229k|            : "r"(carry), "g"(0)      \
  |  |   90|   229k|            : "cc");                  \
  |  |   91|   229k|        carry = high;                 \
  |  |   92|   229k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (92:14): [Folded, False: 229k]
  |  |  ------------------
  ------------------
  125|   229k|        mul_add(rp[2], ap[2], w, c1);
  ------------------
  |  |   77|   229k|    do {                              \
  |  |   78|   229k|        register BN_ULONG high, low;  \
  |  |   79|   229k|        asm("mulq %3"                 \
  |  |   80|   229k|            : "=a"(low), "=d"(high)   \
  |  |   81|   229k|            : "a"(word), "m"(a)       \
  |  |   82|   229k|            : "cc");                  \
  |  |   83|   229k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   84|   229k|            : "+r"(carry), "+d"(high) \
  |  |   85|   229k|            : "a"(low), "g"(0)        \
  |  |   86|   229k|            : "cc");                  \
  |  |   87|   229k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   88|   229k|            : "+m"(r), "+d"(high)     \
  |  |   89|   229k|            : "r"(carry), "g"(0)      \
  |  |   90|   229k|            : "cc");                  \
  |  |   91|   229k|        carry = high;                 \
  |  |   92|   229k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (92:14): [Folded, False: 229k]
  |  |  ------------------
  ------------------
  126|   229k|        mul_add(rp[3], ap[3], w, c1);
  ------------------
  |  |   77|   229k|    do {                              \
  |  |   78|   229k|        register BN_ULONG high, low;  \
  |  |   79|   229k|        asm("mulq %3"                 \
  |  |   80|   229k|            : "=a"(low), "=d"(high)   \
  |  |   81|   229k|            : "a"(word), "m"(a)       \
  |  |   82|   229k|            : "cc");                  \
  |  |   83|   229k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   84|   229k|            : "+r"(carry), "+d"(high) \
  |  |   85|   229k|            : "a"(low), "g"(0)        \
  |  |   86|   229k|            : "cc");                  \
  |  |   87|   229k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   88|   229k|            : "+m"(r), "+d"(high)     \
  |  |   89|   229k|            : "r"(carry), "g"(0)      \
  |  |   90|   229k|            : "cc");                  \
  |  |   91|   229k|        carry = high;                 \
  |  |   92|   229k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (92:14): [Folded, False: 229k]
  |  |  ------------------
  ------------------
  127|   229k|        ap += 4;
  128|   229k|        rp += 4;
  129|   229k|        num -= 4;
  130|   229k|    }
  131|   229k|    if (num) {
  ------------------
  |  Branch (131:9): [True: 0, False: 229k]
  ------------------
  132|      0|        mul_add(rp[0], ap[0], w, c1);
  ------------------
  |  |   77|      0|    do {                              \
  |  |   78|      0|        register BN_ULONG high, low;  \
  |  |   79|      0|        asm("mulq %3"                 \
  |  |   80|      0|            : "=a"(low), "=d"(high)   \
  |  |   81|      0|            : "a"(word), "m"(a)       \
  |  |   82|      0|            : "cc");                  \
  |  |   83|      0|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   84|      0|            : "+r"(carry), "+d"(high) \
  |  |   85|      0|            : "a"(low), "g"(0)        \
  |  |   86|      0|            : "cc");                  \
  |  |   87|      0|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   88|      0|            : "+m"(r), "+d"(high)     \
  |  |   89|      0|            : "r"(carry), "g"(0)      \
  |  |   90|      0|            : "cc");                  \
  |  |   91|      0|        carry = high;                 \
  |  |   92|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (92:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  133|      0|        if (--num == 0)
  ------------------
  |  Branch (133:13): [True: 0, False: 0]
  ------------------
  134|      0|            return c1;
  135|      0|        mul_add(rp[1], ap[1], w, c1);
  ------------------
  |  |   77|      0|    do {                              \
  |  |   78|      0|        register BN_ULONG high, low;  \
  |  |   79|      0|        asm("mulq %3"                 \
  |  |   80|      0|            : "=a"(low), "=d"(high)   \
  |  |   81|      0|            : "a"(word), "m"(a)       \
  |  |   82|      0|            : "cc");                  \
  |  |   83|      0|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   84|      0|            : "+r"(carry), "+d"(high) \
  |  |   85|      0|            : "a"(low), "g"(0)        \
  |  |   86|      0|            : "cc");                  \
  |  |   87|      0|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   88|      0|            : "+m"(r), "+d"(high)     \
  |  |   89|      0|            : "r"(carry), "g"(0)      \
  |  |   90|      0|            : "cc");                  \
  |  |   91|      0|        carry = high;                 \
  |  |   92|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (92:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  136|      0|        if (--num == 0)
  ------------------
  |  Branch (136:13): [True: 0, False: 0]
  ------------------
  137|      0|            return c1;
  138|      0|        mul_add(rp[2], ap[2], w, c1);
  ------------------
  |  |   77|      0|    do {                              \
  |  |   78|      0|        register BN_ULONG high, low;  \
  |  |   79|      0|        asm("mulq %3"                 \
  |  |   80|      0|            : "=a"(low), "=d"(high)   \
  |  |   81|      0|            : "a"(word), "m"(a)       \
  |  |   82|      0|            : "cc");                  \
  |  |   83|      0|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   84|      0|            : "+r"(carry), "+d"(high) \
  |  |   85|      0|            : "a"(low), "g"(0)        \
  |  |   86|      0|            : "cc");                  \
  |  |   87|      0|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   88|      0|            : "+m"(r), "+d"(high)     \
  |  |   89|      0|            : "r"(carry), "g"(0)      \
  |  |   90|      0|            : "cc");                  \
  |  |   91|      0|        carry = high;                 \
  |  |   92|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (92:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  139|      0|        return c1;
  140|      0|    }
  141|       |
  142|   229k|    return c1;
  143|   229k|}
bn_mul_words:
  146|   182k|{
  147|   182k|    BN_ULONG c1 = 0;
  148|       |
  149|   182k|    if (num <= 0)
  ------------------
  |  Branch (149:9): [True: 0, False: 182k]
  ------------------
  150|      0|        return c1;
  151|       |
  152|   365k|    while (num & ~3) {
  ------------------
  |  Branch (152:12): [True: 182k, False: 182k]
  ------------------
  153|   182k|        mul(rp[0], ap[0], w, c1);
  ------------------
  |  |   95|   182k|    do {                              \
  |  |   96|   182k|        register BN_ULONG high, low;  \
  |  |   97|   182k|        asm("mulq %3"                 \
  |  |   98|   182k|            : "=a"(low), "=d"(high)   \
  |  |   99|   182k|            : "a"(word), "g"(a)       \
  |  |  100|   182k|            : "cc");                  \
  |  |  101|   182k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |  102|   182k|            : "+r"(carry), "+d"(high) \
  |  |  103|   182k|            : "a"(low), "g"(0)        \
  |  |  104|   182k|            : "cc");                  \
  |  |  105|   182k|        (r) = carry, carry = high;    \
  |  |  106|   182k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (106:14): [Folded, False: 182k]
  |  |  ------------------
  ------------------
  154|   182k|        mul(rp[1], ap[1], w, c1);
  ------------------
  |  |   95|   182k|    do {                              \
  |  |   96|   182k|        register BN_ULONG high, low;  \
  |  |   97|   182k|        asm("mulq %3"                 \
  |  |   98|   182k|            : "=a"(low), "=d"(high)   \
  |  |   99|   182k|            : "a"(word), "g"(a)       \
  |  |  100|   182k|            : "cc");                  \
  |  |  101|   182k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |  102|   182k|            : "+r"(carry), "+d"(high) \
  |  |  103|   182k|            : "a"(low), "g"(0)        \
  |  |  104|   182k|            : "cc");                  \
  |  |  105|   182k|        (r) = carry, carry = high;    \
  |  |  106|   182k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (106:14): [Folded, False: 182k]
  |  |  ------------------
  ------------------
  155|   182k|        mul(rp[2], ap[2], w, c1);
  ------------------
  |  |   95|   182k|    do {                              \
  |  |   96|   182k|        register BN_ULONG high, low;  \
  |  |   97|   182k|        asm("mulq %3"                 \
  |  |   98|   182k|            : "=a"(low), "=d"(high)   \
  |  |   99|   182k|            : "a"(word), "g"(a)       \
  |  |  100|   182k|            : "cc");                  \
  |  |  101|   182k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |  102|   182k|            : "+r"(carry), "+d"(high) \
  |  |  103|   182k|            : "a"(low), "g"(0)        \
  |  |  104|   182k|            : "cc");                  \
  |  |  105|   182k|        (r) = carry, carry = high;    \
  |  |  106|   182k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (106:14): [Folded, False: 182k]
  |  |  ------------------
  ------------------
  156|   182k|        mul(rp[3], ap[3], w, c1);
  ------------------
  |  |   95|   182k|    do {                              \
  |  |   96|   182k|        register BN_ULONG high, low;  \
  |  |   97|   182k|        asm("mulq %3"                 \
  |  |   98|   182k|            : "=a"(low), "=d"(high)   \
  |  |   99|   182k|            : "a"(word), "g"(a)       \
  |  |  100|   182k|            : "cc");                  \
  |  |  101|   182k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |  102|   182k|            : "+r"(carry), "+d"(high) \
  |  |  103|   182k|            : "a"(low), "g"(0)        \
  |  |  104|   182k|            : "cc");                  \
  |  |  105|   182k|        (r) = carry, carry = high;    \
  |  |  106|   182k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (106:14): [Folded, False: 182k]
  |  |  ------------------
  ------------------
  157|   182k|        ap += 4;
  158|   182k|        rp += 4;
  159|   182k|        num -= 4;
  160|   182k|    }
  161|   182k|    if (num) {
  ------------------
  |  Branch (161:9): [True: 0, False: 182k]
  ------------------
  162|      0|        mul(rp[0], ap[0], 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]
  |  |  ------------------
  ------------------
  163|      0|        if (--num == 0)
  ------------------
  |  Branch (163:13): [True: 0, False: 0]
  ------------------
  164|      0|            return c1;
  165|      0|        mul(rp[1], ap[1], 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]
  |  |  ------------------
  ------------------
  166|      0|        if (--num == 0)
  ------------------
  |  Branch (166:13): [True: 0, False: 0]
  ------------------
  167|      0|            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|   182k|    return c1;
  171|   182k|}
bn_div_words:
  199|   160k|{
  200|   160k|    BN_ULONG ret, waste;
  201|       |
  202|   160k|    asm("divq      %4" : "=a"(ret), "=d"(waste)
  203|   160k|        : "a"(l), "d"(h), "r"(d)
  204|   160k|        : "cc");
  205|       |
  206|   160k|    return ret;
  207|   160k|}
bn_add_words:
  211|   160k|{
  212|   160k|    BN_ULONG ret;
  213|   160k|    size_t i = 0;
  214|       |
  215|   160k|    if (n <= 0)
  ------------------
  |  Branch (215:9): [True: 0, False: 160k]
  ------------------
  216|      0|        return 0;
  217|       |
  218|   160k|    asm volatile("       subq    %0,%0           \n" /* clear carry */
  219|   160k|                 "       jmp     1f              \n"
  220|   160k|                 ".p2align 4                     \n"
  221|   160k|                 "1:     movq    (%4,%2,8),%0    \n"
  222|   160k|                 "       adcq    (%5,%2,8),%0    \n"
  223|   160k|                 "       movq    %0,(%3,%2,8)    \n"
  224|   160k|                 "       lea     1(%2),%2        \n"
  225|   160k|                 "       dec     %1              \n"
  226|   160k|                 "       jnz     1b              \n"
  227|   160k|                 "       sbbq    %0,%0           \n"
  228|   160k|        : "=&r"(ret), "+c"(n), "+r"(i)
  229|   160k|        : "r"(rp), "r"(ap), "r"(bp)
  230|   160k|        : "cc", "memory");
  231|       |
  232|   160k|    return ret & 1;
  233|   160k|}
bn_sub_words:
  238|   274k|{
  239|   274k|    BN_ULONG ret;
  240|   274k|    size_t i = 0;
  241|       |
  242|   274k|    if (n <= 0)
  ------------------
  |  Branch (242:9): [True: 0, False: 274k]
  ------------------
  243|      0|        return 0;
  244|       |
  245|   274k|    asm volatile("       subq    %0,%0           \n" /* clear borrow */
  246|   274k|                 "       jmp     1f              \n"
  247|   274k|                 ".p2align 4                     \n"
  248|   274k|                 "1:     movq    (%4,%2,8),%0    \n"
  249|   274k|                 "       sbbq    (%5,%2,8),%0    \n"
  250|   274k|                 "       movq    %0,(%3,%2,8)    \n"
  251|   274k|                 "       lea     1(%2),%2        \n"
  252|   274k|                 "       dec     %1              \n"
  253|   274k|                 "       jnz     1b              \n"
  254|   274k|                 "       sbbq    %0,%0           \n"
  255|   274k|        : "=&r"(ret), "+c"(n), "+r"(i)
  256|   274k|        : "r"(rp), "r"(ap), "r"(bp)
  257|   274k|        : "cc", "memory");
  258|       |
  259|   274k|    return ret & 1;
  260|   274k|}

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

BN_div:
  213|   131k|{
  214|   131k|    int ret;
  215|       |
  216|   131k|    if (BN_is_zero(divisor)) {
  ------------------
  |  Branch (216:9): [True: 0, False: 131k]
  ------------------
  217|      0|        ERR_raise(ERR_LIB_BN, BN_R_DIV_BY_ZERO);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      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|   131k|    if (divisor->d[divisor->top - 1] == 0) {
  ------------------
  |  Branch (226:9): [True: 0, False: 131k]
  ------------------
  227|      0|        ERR_raise(ERR_LIB_BN, BN_R_NOT_INITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  228|      0|        return 0;
  229|      0|    }
  230|       |
  231|   131k|    ret = bn_div_fixed_top(dv, rm, num, divisor, ctx);
  232|       |
  233|   131k|    if (ret) {
  ------------------
  |  Branch (233:9): [True: 131k, False: 0]
  ------------------
  234|   131k|        if (dv != NULL)
  ------------------
  |  Branch (234:13): [True: 0, False: 131k]
  ------------------
  235|      0|            bn_correct_top(dv);
  236|   131k|        if (rm != NULL)
  ------------------
  |  Branch (236:13): [True: 131k, False: 0]
  ------------------
  237|   131k|            bn_correct_top(rm);
  238|   131k|    }
  239|       |
  240|   131k|    return ret;
  241|   131k|}
bn_div_fixed_top:
  268|   131k|{
  269|   131k|    int norm_shift, i, j, loop;
  270|   131k|    BIGNUM *tmp, *snum, *sdiv, *res;
  271|   131k|    BN_ULONG *resp, *wnum, *wnumtop;
  272|   131k|    BN_ULONG d0, d1;
  273|   131k|    int num_n, div_n, num_neg;
  274|       |
  275|   131k|    assert(divisor->top > 0 && divisor->d[divisor->top - 1] != 0);
  ------------------
  |  Branch (275:5): [True: 0, False: 131k]
  |  Branch (275:5): [True: 0, False: 0]
  |  Branch (275:5): [True: 131k, False: 0]
  |  Branch (275:5): [True: 131k, False: 0]
  ------------------
  276|       |
  277|   131k|    bn_check_top(num);
  278|   131k|    bn_check_top(divisor);
  279|   131k|    bn_check_top(dv);
  280|   131k|    bn_check_top(rm);
  281|       |
  282|   131k|    BN_CTX_start(ctx);
  283|   131k|    res = (dv == NULL) ? BN_CTX_get(ctx) : dv;
  ------------------
  |  Branch (283:11): [True: 131k, False: 0]
  ------------------
  284|   131k|    tmp = BN_CTX_get(ctx);
  285|   131k|    snum = BN_CTX_get(ctx);
  286|   131k|    sdiv = BN_CTX_get(ctx);
  287|   131k|    if (sdiv == NULL)
  ------------------
  |  Branch (287:9): [True: 0, False: 131k]
  ------------------
  288|      0|        goto err;
  289|       |
  290|       |    /* First we normalise the numbers */
  291|   131k|    if (!BN_copy(sdiv, divisor))
  ------------------
  |  Branch (291:9): [True: 0, False: 131k]
  ------------------
  292|      0|        goto err;
  293|   131k|    norm_shift = bn_left_align(sdiv);
  294|   131k|    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|   131k|    if (!(bn_lshift_fixed_top(snum, num, norm_shift)))
  ------------------
  |  Branch (302:9): [True: 0, False: 131k]
  ------------------
  303|      0|        goto err;
  304|       |
  305|   131k|    div_n = sdiv->top;
  306|   131k|    num_n = snum->top;
  307|       |
  308|   131k|    if (num_n <= div_n) {
  ------------------
  |  Branch (308:9): [True: 29.3k, False: 102k]
  ------------------
  309|       |        /* caller didn't pad dividend -> no constant-time guarantee... */
  310|  29.3k|        if (bn_wexpand(snum, div_n + 1) == NULL)
  ------------------
  |  Branch (310:13): [True: 0, False: 29.3k]
  ------------------
  311|      0|            goto err;
  312|  29.3k|        memset(&(snum->d[num_n]), 0, (div_n - num_n + 1) * sizeof(BN_ULONG));
  313|  29.3k|        snum->top = num_n = div_n + 1;
  314|  29.3k|    }
  315|       |
  316|   131k|    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|   131k|    wnum = &(snum->d[loop]);
  322|   131k|    wnumtop = &(snum->d[num_n - 1]);
  323|       |
  324|       |    /* Get the top 2 words of sdiv */
  325|   131k|    d0 = sdiv->d[div_n - 1];
  326|   131k|    d1 = (div_n == 1) ? 0 : sdiv->d[div_n - 2];
  ------------------
  |  Branch (326:10): [True: 0, False: 131k]
  ------------------
  327|       |
  328|       |    /* Setup quotient */
  329|   131k|    if (!bn_wexpand(res, loop))
  ------------------
  |  Branch (329:9): [True: 0, False: 131k]
  ------------------
  330|      0|        goto err;
  331|   131k|    num_neg = num->neg;
  332|   131k|    res->neg = (num_neg ^ divisor->neg);
  333|   131k|    res->top = loop;
  334|   131k|    res->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|   131k|#define BN_FLG_FIXED_TOP 0
  ------------------
  335|   131k|    resp = &(res->d[loop]);
  336|       |
  337|       |    /* space for temp */
  338|   131k|    if (!bn_wexpand(tmp, (div_n + 1)))
  ------------------
  |  Branch (338:9): [True: 0, False: 131k]
  ------------------
  339|      0|        goto err;
  340|       |
  341|   292k|    for (i = 0; i < loop; i++, wnumtop--) {
  ------------------
  |  Branch (341:17): [True: 160k, False: 131k]
  ------------------
  342|   160k|        BN_ULONG q, l0;
  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|   160k|        BN_ULONG n0, n1, rem = 0;
  351|       |
  352|   160k|        n0 = wnumtop[0];
  353|   160k|        n1 = wnumtop[-1];
  354|   160k|        if (n0 == d0)
  ------------------
  |  Branch (354:13): [True: 0, False: 160k]
  ------------------
  355|      0|            q = BN_MASK2;
  ------------------
  |  |   77|      0|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  356|   160k|        else { /* n0 < d0 */
  357|   160k|            BN_ULONG n2 = (wnumtop == wnum) ? 0 : wnumtop[-2];
  ------------------
  |  Branch (357:27): [True: 0, False: 160k]
  ------------------
  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|   160k|            BN_ULONG t2l, t2h;
  387|       |
  388|   160k|            q = bn_div_words(n0, n1, d0);
  389|   160k|#ifndef REMAINDER_IS_ALREADY_CALCULATED
  390|   160k|            rem = (n1 - q * d0) & BN_MASK2;
  ------------------
  |  |   77|   160k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  391|   160k|#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|   160k|            {
  400|   160k|                BN_ULONG ql, qh;
  401|   160k|                t2l = LBITS(d1);
  ------------------
  |  |  560|   160k|#define LBITS(a) ((a) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   78|   160k|#define BN_MASK2l (0xffffffffL)
  |  |  ------------------
  ------------------
  402|   160k|                t2h = HBITS(d1);
  ------------------
  |  |  561|   160k|#define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   76|   160k|#define BN_BITS4 32
  |  |  ------------------
  |  |               #define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   78|   160k|#define BN_MASK2l (0xffffffffL)
  |  |  ------------------
  ------------------
  403|   160k|                ql = LBITS(q);
  ------------------
  |  |  560|   160k|#define LBITS(a) ((a) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   78|   160k|#define BN_MASK2l (0xffffffffL)
  |  |  ------------------
  ------------------
  404|   160k|                qh = HBITS(q);
  ------------------
  |  |  561|   160k|#define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   76|   160k|#define BN_BITS4 32
  |  |  ------------------
  |  |               #define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  ------------------
  |  |  |  |   78|   160k|#define BN_MASK2l (0xffffffffL)
  |  |  ------------------
  ------------------
  405|   160k|                mul64(t2l, t2h, ql, qh); /* t2=(BN_ULLONG)d1*q; */
  ------------------
  |  |  569|   160k|    {                                      \
  |  |  570|   160k|        BN_ULONG m, m1, lt, ht;            \
  |  |  571|   160k|                                           \
  |  |  572|   160k|        lt = l;                            \
  |  |  573|   160k|        ht = h;                            \
  |  |  574|   160k|        m = (bh) * (lt);                   \
  |  |  575|   160k|        lt = (bl) * (lt);                  \
  |  |  576|   160k|        m1 = (bl) * (ht);                  \
  |  |  577|   160k|        ht = (bh) * (ht);                  \
  |  |  578|   160k|        m = (m + m1) & BN_MASK2;           \
  |  |  ------------------
  |  |  |  |   77|   160k|#define BN_MASK2 (0xffffffffffffffffL)
  |  |  ------------------
  |  |  579|   160k|        ht += L2HBITS((BN_ULONG)(m < m1)); \
  |  |  ------------------
  |  |  |  |  562|   160k|#define L2HBITS(a) (((a) << BN_BITS4) & BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|   160k|#define BN_BITS4 32
  |  |  |  |  ------------------
  |  |  |  |               #define L2HBITS(a) (((a) << BN_BITS4) & BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|   160k|#define BN_MASK2 (0xffffffffffffffffL)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  580|   160k|        ht += HBITS(m);                    \
  |  |  ------------------
  |  |  |  |  561|   160k|#define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|   160k|#define BN_BITS4 32
  |  |  |  |  ------------------
  |  |  |  |               #define HBITS(a) (((a) >> BN_BITS4) & BN_MASK2l)
  |  |  |  |  ------------------
  |  |  |  |  |  |   78|   160k|#define BN_MASK2l (0xffffffffL)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  581|   160k|        m1 = L2HBITS(m);                   \
  |  |  ------------------
  |  |  |  |  562|   160k|#define L2HBITS(a) (((a) << BN_BITS4) & BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|   160k|#define BN_BITS4 32
  |  |  |  |  ------------------
  |  |  |  |               #define L2HBITS(a) (((a) << BN_BITS4) & BN_MASK2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|   160k|#define BN_MASK2 (0xffffffffffffffffL)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  582|   160k|        lt = (lt + m1) & BN_MASK2;         \
  |  |  ------------------
  |  |  |  |   77|   160k|#define BN_MASK2 (0xffffffffffffffffL)
  |  |  ------------------
  |  |  583|   160k|        ht += (lt < m1);                   \
  |  |  584|   160k|        (l) = lt;                          \
  |  |  585|   160k|        (h) = ht;                          \
  |  |  586|   160k|    }
  ------------------
  406|   160k|            }
  407|   160k|#endif
  408|       |
  409|   160k|            for (;;) {
  410|   160k|                if ((t2h < rem) || ((t2h == rem) && (t2l <= n2)))
  ------------------
  |  Branch (410:21): [True: 104k, False: 56.6k]
  |  Branch (410:37): [True: 43.9k, False: 12.7k]
  |  Branch (410:53): [True: 43.9k, False: 0]
  ------------------
  411|   148k|                    break;
  412|  12.7k|                q--;
  413|  12.7k|                rem += d0;
  414|  12.7k|                if (rem < d0)
  ------------------
  |  Branch (414:21): [True: 12.7k, False: 0]
  ------------------
  415|  12.7k|                    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|   160k|#endif /* !BN_LLONG */
  421|   160k|        }
  422|   160k|#endif /* !BN_DIV3W */
  423|       |
  424|   160k|        l0 = bn_mul_words(tmp->d, sdiv->d, div_n, q);
  425|   160k|        tmp->d[div_n] = l0;
  426|   160k|        wnum--;
  427|       |        /*
  428|       |         * ignore top values of the bignums just sub the two BN_ULONG arrays
  429|       |         * with bn_sub_words
  430|       |         */
  431|   160k|        l0 = bn_sub_words(wnum, wnum, tmp->d, div_n + 1);
  432|   160k|        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|   803k|        for (l0 = 0 - l0, j = 0; j < div_n; j++)
  ------------------
  |  Branch (438:34): [True: 643k, False: 160k]
  ------------------
  439|   643k|            tmp->d[j] = sdiv->d[j] & l0;
  440|   160k|        l0 = bn_add_words(wnum, wnum, tmp->d, div_n);
  441|   160k|        (*wnumtop) += l0;
  442|   160k|        assert((*wnumtop) == 0);
  ------------------
  |  Branch (442:9): [True: 0, False: 160k]
  |  Branch (442:9): [True: 160k, False: 0]
  ------------------
  443|       |
  444|       |        /* store part of the result */
  445|   160k|        *--resp = q;
  446|   160k|    }
  447|       |    /* snum holds remainder, it's as wide as divisor */
  448|   131k|    snum->neg = num_neg;
  449|   131k|    snum->top = div_n;
  450|   131k|    snum->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|   131k|#define BN_FLG_FIXED_TOP 0
  ------------------
  451|       |
  452|   131k|    if (rm != NULL && bn_rshift_fixed_top(rm, snum, norm_shift) == 0)
  ------------------
  |  Branch (452:9): [True: 131k, False: 0]
  |  Branch (452:23): [True: 0, False: 131k]
  ------------------
  453|      0|        goto err;
  454|       |
  455|   131k|    BN_CTX_end(ctx);
  456|   131k|    return 1;
  457|      0|err:
  458|      0|    bn_check_top(rm);
  459|      0|    BN_CTX_end(ctx);
  460|      0|    return 0;
  461|   131k|}
bn_div.c:bn_left_align:
  142|   131k|{
  143|   131k|    BN_ULONG *d = num->d, n, m, rmask;
  144|   131k|    int top = num->top;
  145|   131k|    int rshift = BN_num_bits_word(d[top - 1]), lshift, i;
  146|       |
  147|   131k|    lshift = BN_BITS2 - rshift;
  ------------------
  |  |   54|   131k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   131k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  148|   131k|    rshift %= BN_BITS2; /* say no to undefined behaviour */
  ------------------
  |  |   54|   131k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   131k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  149|   131k|    rmask = (BN_ULONG)0 - rshift; /* rmask = 0 - (rshift != 0) */
  150|   131k|    rmask |= rmask >> 8;
  151|       |
  152|   658k|    for (i = 0, m = 0; i < top; i++) {
  ------------------
  |  Branch (152:24): [True: 526k, False: 131k]
  ------------------
  153|   526k|        n = d[i];
  154|   526k|        d[i] = ((n << lshift) | m) & BN_MASK2;
  ------------------
  |  |   77|   526k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  155|   526k|        m = (n >> rshift) & rmask;
  156|   526k|    }
  157|       |
  158|   131k|    return lshift;
  159|   131k|}

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

bn_get_top:
  138|  83.4k|{
  139|  83.4k|    return a->top;
  140|  83.4k|}
bn_copy_words:
  156|  51.1k|{
  157|  51.1k|    if (in->top > size)
  ------------------
  |  Branch (157:9): [True: 0, False: 51.1k]
  ------------------
  158|      0|        return 0;
  159|       |
  160|  51.1k|    memset(out, 0, sizeof(*out) * size);
  161|  51.1k|    if (in->d != NULL)
  ------------------
  |  Branch (161:9): [True: 51.1k, False: 0]
  ------------------
  162|  51.1k|        memcpy(out, in->d, sizeof(*out) * in->top);
  163|  51.1k|    return 1;
  164|  51.1k|}
bn_get_words:
  167|  72.5k|{
  168|  72.5k|    return a->d;
  169|  72.5k|}
bn_set_words:
  185|  43.7k|{
  186|  43.7k|    if (bn_wexpand(a, num_words) == NULL) {
  ------------------
  |  Branch (186:9): [True: 0, False: 43.7k]
  ------------------
  187|      0|        ERR_raise(ERR_LIB_BN, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  188|      0|        return 0;
  189|      0|    }
  190|       |
  191|  43.7k|    memcpy(a->d, words, sizeof(BN_ULONG) * num_words);
  192|  43.7k|    a->top = num_words;
  193|  43.7k|    bn_correct_top(a);
  194|  43.7k|    return 1;
  195|  43.7k|}

BN_value_one:
   83|  43.9k|{
   84|  43.9k|    static const BN_ULONG data_one = 1L;
   85|  43.9k|    static const BIGNUM const_one = {
   86|  43.9k|        (BN_ULONG *)&data_one, 1, 1, 0, BN_FLG_STATIC_DATA
  ------------------
  |  |   59|  43.9k|#define BN_FLG_STATIC_DATA 0x02
  ------------------
   87|  43.9k|    };
   88|       |
   89|  43.9k|    return &const_one;
   90|  43.9k|}
BN_num_bits_word:
  102|   387k|{
  103|   387k|    BN_ULONG x, mask;
  104|   387k|    int bits = (l != 0);
  105|       |
  106|   387k|#if BN_BITS2 > 32
  107|   387k|    x = l >> 32;
  108|   387k|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|   387k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  109|   387k|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|   387k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   387k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  110|   387k|    bits += 32 & mask;
  111|   387k|    l ^= (x ^ l) & mask;
  112|   387k|#endif
  113|       |
  114|   387k|    x = l >> 16;
  115|   387k|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|   387k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  116|   387k|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|   387k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   387k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  117|   387k|    bits += 16 & mask;
  118|   387k|    l ^= (x ^ l) & mask;
  119|       |
  120|   387k|    x = l >> 8;
  121|   387k|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|   387k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  122|   387k|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|   387k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   387k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  123|   387k|    bits += 8 & mask;
  124|   387k|    l ^= (x ^ l) & mask;
  125|       |
  126|   387k|    x = l >> 4;
  127|   387k|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|   387k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  128|   387k|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|   387k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   387k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  129|   387k|    bits += 4 & mask;
  130|   387k|    l ^= (x ^ l) & mask;
  131|       |
  132|   387k|    x = l >> 2;
  133|   387k|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|   387k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  134|   387k|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|   387k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   387k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  135|   387k|    bits += 2 & mask;
  136|   387k|    l ^= (x ^ l) & mask;
  137|       |
  138|   387k|    x = l >> 1;
  139|   387k|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   77|   387k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  140|   387k|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|   387k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   387k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  141|   387k|    bits += 1 & mask;
  142|       |
  143|   387k|    return bits;
  144|   387k|}
BN_num_bits:
  179|   226k|{
  180|   226k|    int i = a->top - 1;
  181|   226k|    bn_check_top(a);
  182|       |
  183|   226k|    if (a->flags & BN_FLG_CONSTTIME) {
  ------------------
  |  |   67|   226k|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (183:9): [True: 7.25k, False: 219k]
  ------------------
  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|  7.25k|        return bn_num_bits_consttime(a);
  194|  7.25k|    }
  195|       |
  196|   219k|    if (ossl_unlikely(BN_is_zero(a)))
  ------------------
  |  |   23|   219k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 219k]
  |  |  ------------------
  ------------------
  197|      0|        return 0;
  198|       |
  199|   219k|    return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));
  ------------------
  |  |   54|   219k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   219k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  200|   219k|}
BN_clear_free:
  213|   560k|{
  214|   560k|    if (a == NULL)
  ------------------
  |  Branch (214:9): [True: 65.4k, False: 495k]
  ------------------
  215|  65.4k|        return;
  216|   495k|    if (a->d != NULL && !BN_get_flags(a, BN_FLG_STATIC_DATA))
  ------------------
  |  |   59|   433k|#define BN_FLG_STATIC_DATA 0x02
  ------------------
  |  Branch (216:9): [True: 433k, False: 62.2k]
  |  Branch (216:25): [True: 433k, False: 0]
  ------------------
  217|   433k|        bn_free_d(a, 1);
  218|   495k|    if (BN_get_flags(a, BN_FLG_MALLOCED)) {
  ------------------
  |  |   58|   495k|#define BN_FLG_MALLOCED 0x01
  ------------------
  |  Branch (218:9): [True: 32.7k, False: 462k]
  ------------------
  219|  32.7k|        OPENSSL_cleanse(a, sizeof(*a));
  220|  32.7k|        OPENSSL_free(a);
  ------------------
  |  |  132|  32.7k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  221|  32.7k|    }
  222|   495k|}
BN_free:
  225|   904k|{
  226|   904k|    if (a == NULL)
  ------------------
  |  Branch (226:9): [True: 443k, False: 461k]
  ------------------
  227|   443k|        return;
  228|   461k|    if (!BN_get_flags(a, BN_FLG_STATIC_DATA))
  ------------------
  |  |   59|   461k|#define BN_FLG_STATIC_DATA 0x02
  ------------------
  |  Branch (228:9): [True: 461k, False: 0]
  ------------------
  229|   461k|        bn_free_d(a, 0);
  230|   461k|    if (a->flags & BN_FLG_MALLOCED)
  ------------------
  |  |   58|   461k|#define BN_FLG_MALLOCED 0x01
  ------------------
  |  Branch (230:9): [True: 461k, False: 0]
  ------------------
  231|   461k|        OPENSSL_free(a);
  ------------------
  |  |  132|   461k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  232|   461k|}
bn_init:
  235|   940k|{
  236|   940k|    static BIGNUM nilbn;
  237|       |
  238|   940k|    *a = nilbn;
  239|   940k|    bn_check_top(a);
  240|   940k|}
BN_new:
  243|   494k|{
  244|   494k|    BIGNUM *ret;
  245|       |
  246|   494k|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  109|   494k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (246:9): [True: 0, False: 494k]
  ------------------
  247|      0|        return NULL;
  248|   494k|    ret->flags = BN_FLG_MALLOCED;
  ------------------
  |  |   58|   494k|#define BN_FLG_MALLOCED 0x01
  ------------------
  249|   494k|    bn_check_top(ret);
  250|   494k|    return ret;
  251|   494k|}
BN_secure_new:
  254|  7.36k|{
  255|  7.36k|    BIGNUM *ret = BN_new();
  256|       |
  257|  7.36k|    if (ret != NULL)
  ------------------
  |  Branch (257:9): [True: 7.36k, False: 0]
  ------------------
  258|  7.36k|        ret->flags |= BN_FLG_SECURE;
  ------------------
  |  |   68|  7.36k|#define BN_FLG_SECURE 0x08
  ------------------
  259|  7.36k|    return ret;
  260|  7.36k|}
bn_expand2:
  299|   949k|{
  300|   949k|    if (ossl_likely(words > b->dmax)) {
  ------------------
  |  |   22|   949k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 949k, False: 0]
  |  |  ------------------
  ------------------
  301|   949k|        BN_ULONG *a = bn_expand_internal(b, words);
  302|       |
  303|   949k|        if (ossl_unlikely(!a))
  ------------------
  |  |   23|   949k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 949k]
  |  |  ------------------
  ------------------
  304|      0|            return NULL;
  305|   949k|        if (b->d != NULL)
  ------------------
  |  Branch (305:13): [True: 55.1k, False: 894k]
  ------------------
  306|  55.1k|            bn_free_d(b, 1);
  307|   949k|        b->d = a;
  308|   949k|        b->dmax = words;
  309|   949k|    }
  310|       |
  311|   949k|    return b;
  312|   949k|}
BN_dup:
  315|  14.6k|{
  316|  14.6k|    BIGNUM *t;
  317|       |
  318|  14.6k|    if (a == NULL)
  ------------------
  |  Branch (318:9): [True: 0, False: 14.6k]
  ------------------
  319|      0|        return NULL;
  320|  14.6k|    bn_check_top(a);
  321|       |
  322|  14.6k|    t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();
  ------------------
  |  |   68|  14.6k|#define BN_FLG_SECURE 0x08
  ------------------
  |  Branch (322:9): [True: 0, False: 14.6k]
  ------------------
  323|  14.6k|    if (t == NULL)
  ------------------
  |  Branch (323:9): [True: 0, False: 14.6k]
  ------------------
  324|      0|        return NULL;
  325|  14.6k|    if (!BN_copy(t, a)) {
  ------------------
  |  Branch (325:9): [True: 0, False: 14.6k]
  ------------------
  326|      0|        BN_free(t);
  327|      0|        return NULL;
  328|      0|    }
  329|  14.6k|    bn_check_top(t);
  330|  14.6k|    return t;
  331|  14.6k|}
BN_copy:
  334|   543k|{
  335|   543k|    int bn_words;
  336|       |
  337|   543k|    bn_check_top(b);
  338|       |
  339|   543k|    bn_words = BN_get_flags(b, BN_FLG_CONSTTIME) ? b->dmax : b->top;
  ------------------
  |  |   67|   543k|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (339:16): [True: 0, False: 543k]
  ------------------
  340|       |
  341|   543k|    if (ossl_unlikely(a == b))
  ------------------
  |  |   23|   543k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 543k]
  |  |  ------------------
  ------------------
  342|      0|        return a;
  343|   543k|    if (ossl_unlikely(bn_wexpand(a, bn_words) == NULL))
  ------------------
  |  |   23|   543k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 543k]
  |  |  ------------------
  ------------------
  344|      0|        return NULL;
  345|       |
  346|   543k|    if (ossl_likely(b->top > 0))
  ------------------
  |  |   22|   543k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 513k, False: 29.3k]
  |  |  ------------------
  ------------------
  347|   513k|        memcpy(a->d, b->d, sizeof(b->d[0]) * bn_words);
  348|       |
  349|   543k|    a->neg = b->neg;
  350|   543k|    a->top = b->top;
  351|   543k|    a->flags |= b->flags & BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|   543k|#define BN_FLG_FIXED_TOP 0
  ------------------
  352|   543k|    bn_check_top(a);
  353|   543k|    return a;
  354|   543k|}
BN_set_word:
  415|  29.3k|{
  416|  29.3k|    bn_check_top(a);
  417|  29.3k|    if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
  ------------------
  |  Branch (417:9): [True: 0, False: 29.3k]
  ------------------
  418|      0|        return 0;
  419|  29.3k|    a->neg = 0;
  420|  29.3k|    a->d[0] = w;
  421|  29.3k|    a->top = (w ? 1 : 0);
  ------------------
  |  Branch (421:15): [True: 29.3k, False: 0]
  ------------------
  422|  29.3k|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  29.3k|#define BN_FLG_FIXED_TOP 0
  ------------------
  423|  29.3k|    bn_check_top(a);
  424|  29.3k|    return 1;
  425|  29.3k|}
BN_bin2bn:
  535|   168k|{
  536|   168k|    return bin2bn(s, len, ret, BIG, UNSIGNED);
  537|   168k|}
BN_bn2binpad:
  628|  40.5k|{
  629|  40.5k|    if (tolen < 0)
  ------------------
  |  Branch (629:9): [True: 0, False: 40.5k]
  ------------------
  630|      0|        return -1;
  631|  40.5k|    return bn2binpad(a, to, tolen, BIG, UNSIGNED);
  632|  40.5k|}
BN_ucmp:
  707|  73.1k|{
  708|  73.1k|    int i;
  709|  73.1k|    BN_ULONG t1, t2, *ap, *bp;
  710|       |
  711|       |    /*
  712|       |     * As it is a public API function, we should handle NULL parameters in
  713|       |     * some way. The function can’t return an error, so let’s define that NULL
  714|       |     * is less than any BIGNUM.
  715|       |     */
  716|  73.1k|    if (!ossl_assert(a != NULL && b != NULL))
  ------------------
  |  |   52|   146k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 73.1k, False: 0]
  |  |  |  Branch (52:41): [True: 73.1k, False: 0]
  |  |  ------------------
  |  |   53|  73.1k|    __FILE__, __LINE__)
  ------------------
  |  Branch (716:9): [True: 0, False: 73.1k]
  ------------------
  717|      0|        return (b == NULL) - (a == NULL);
  718|       |
  719|  73.1k|    ap = a->d;
  720|  73.1k|    bp = b->d;
  721|       |
  722|  73.1k|    if (BN_get_flags(a, BN_FLG_CONSTTIME)
  ------------------
  |  |   67|  73.1k|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (722:9): [True: 3.62k, False: 69.4k]
  ------------------
  723|  69.4k|        || BN_get_flags(b, BN_FLG_CONSTTIME)) {
  ------------------
  |  |   67|  69.4k|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (723:12): [True: 0, False: 69.4k]
  ------------------
  724|  3.62k|        int res = 0;
  725|  3.62k|        int min_top = a->top < b->top ? a->top : b->top;
  ------------------
  |  Branch (725:23): [True: 0, False: 3.62k]
  ------------------
  726|       |
  727|  18.1k|        for (i = 0; i < min_top; i++) {
  ------------------
  |  Branch (727:21): [True: 14.5k, False: 3.62k]
  ------------------
  728|  14.5k|            res = constant_time_select_int((int)constant_time_lt_bn(ap[i], bp[i]),
  729|  14.5k|                -1, res);
  730|  14.5k|            res = constant_time_select_int((int)constant_time_lt_bn(bp[i], ap[i]),
  731|  14.5k|                1, res);
  732|  14.5k|        }
  733|       |
  734|  3.62k|        for (i = min_top; i < a->top; ++i)
  ------------------
  |  Branch (734:27): [True: 0, False: 3.62k]
  ------------------
  735|      0|            res = constant_time_select_int((int)constant_time_is_zero_bn(ap[i]),
  736|      0|                res, 1);
  737|       |
  738|  3.62k|        for (i = min_top; i < b->top; ++i)
  ------------------
  |  Branch (738:27): [True: 0, False: 3.62k]
  ------------------
  739|      0|            res = constant_time_select_int((int)constant_time_is_zero_bn(bp[i]),
  740|      0|                res, -1);
  741|       |
  742|  3.62k|        return res;
  743|  3.62k|    }
  744|       |
  745|  69.4k|    bn_check_top(a);
  746|  69.4k|    bn_check_top(b);
  747|       |
  748|  69.4k|    i = a->top - b->top;
  749|  69.4k|    if (i != 0)
  ------------------
  |  Branch (749:9): [True: 0, False: 69.4k]
  ------------------
  750|      0|        return i;
  751|       |
  752|   201k|    for (i = a->top - 1; i >= 0; i--) {
  ------------------
  |  Branch (752:26): [True: 168k, False: 32.9k]
  ------------------
  753|   168k|        t1 = ap[i];
  754|   168k|        t2 = bp[i];
  755|   168k|        if (t1 != t2)
  ------------------
  |  Branch (755:13): [True: 36.5k, False: 131k]
  ------------------
  756|  36.5k|            return ((t1 > t2) ? 1 : -1);
  ------------------
  |  Branch (756:21): [True: 0, False: 36.5k]
  ------------------
  757|   168k|    }
  758|  32.9k|    return 0;
  759|  69.4k|}
BN_cmp:
  762|  81.8k|{
  763|  81.8k|    int i;
  764|  81.8k|    int gt, lt;
  765|  81.8k|    BN_ULONG t1, t2;
  766|       |
  767|  81.8k|    if ((a == NULL) || (b == NULL)) {
  ------------------
  |  Branch (767:9): [True: 0, False: 81.8k]
  |  Branch (767:24): [True: 0, False: 81.8k]
  ------------------
  768|      0|        if (a != NULL)
  ------------------
  |  Branch (768:13): [True: 0, False: 0]
  ------------------
  769|      0|            return -1;
  770|      0|        else if (b != NULL)
  ------------------
  |  Branch (770:18): [True: 0, False: 0]
  ------------------
  771|      0|            return 1;
  772|      0|        else
  773|      0|            return 0;
  774|      0|    }
  775|       |
  776|  81.8k|    bn_check_top(a);
  777|  81.8k|    bn_check_top(b);
  778|       |
  779|  81.8k|    if (a->neg != b->neg) {
  ------------------
  |  Branch (779:9): [True: 0, False: 81.8k]
  ------------------
  780|      0|        if (a->neg)
  ------------------
  |  Branch (780:13): [True: 0, False: 0]
  ------------------
  781|      0|            return -1;
  782|      0|        else
  783|      0|            return 1;
  784|      0|    }
  785|  81.8k|    if (a->neg == 0) {
  ------------------
  |  Branch (785:9): [True: 81.8k, False: 0]
  ------------------
  786|  81.8k|        gt = 1;
  787|  81.8k|        lt = -1;
  788|  81.8k|    } else {
  789|      0|        gt = -1;
  790|      0|        lt = 1;
  791|      0|    }
  792|       |
  793|  81.8k|    if (a->top > b->top)
  ------------------
  |  Branch (793:9): [True: 0, False: 81.8k]
  ------------------
  794|      0|        return gt;
  795|  81.8k|    if (a->top < b->top)
  ------------------
  |  Branch (795:9): [True: 0, False: 81.8k]
  ------------------
  796|      0|        return lt;
  797|   386k|    for (i = a->top - 1; i >= 0; i--) {
  ------------------
  |  Branch (797:26): [True: 305k, False: 81.8k]
  ------------------
  798|   305k|        t1 = a->d[i];
  799|   305k|        t2 = b->d[i];
  800|   305k|        if (t1 > t2)
  ------------------
  |  Branch (800:13): [True: 0, False: 305k]
  ------------------
  801|      0|            return gt;
  802|   305k|        if (t1 < t2)
  ------------------
  |  Branch (802:13): [True: 0, False: 305k]
  ------------------
  803|      0|            return lt;
  804|   305k|    }
  805|  81.8k|    return 0;
  806|  81.8k|}
BN_set_bit:
  809|  10.8k|{
  810|  10.8k|    int i, j, k;
  811|       |
  812|  10.8k|    if (n < 0)
  ------------------
  |  Branch (812:9): [True: 0, False: 10.8k]
  ------------------
  813|      0|        return 0;
  814|       |
  815|  10.8k|    i = n / BN_BITS2;
  ------------------
  |  |   54|  10.8k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  10.8k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  816|  10.8k|    j = n % BN_BITS2;
  ------------------
  |  |   54|  10.8k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  10.8k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  817|  10.8k|    if (a->top <= i) {
  ------------------
  |  Branch (817:9): [True: 10.8k, False: 0]
  ------------------
  818|  10.8k|        if (bn_wexpand(a, i + 1) == NULL)
  ------------------
  |  Branch (818:13): [True: 0, False: 10.8k]
  ------------------
  819|      0|            return 0;
  820|  65.3k|        for (k = a->top; k < i + 1; k++)
  ------------------
  |  Branch (820:26): [True: 54.4k, False: 10.8k]
  ------------------
  821|  54.4k|            a->d[k] = 0;
  822|  10.8k|        a->top = i + 1;
  823|  10.8k|        a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  10.8k|#define BN_FLG_FIXED_TOP 0
  ------------------
  824|  10.8k|    }
  825|       |
  826|  10.8k|    a->d[i] |= (((BN_ULONG)1) << j);
  827|  10.8k|    bn_check_top(a);
  828|  10.8k|    return 1;
  829|  10.8k|}
ossl_bn_mask_bits_fixed_top:
  864|  3.62k|{
  865|  3.62k|    int b, w;
  866|       |
  867|  3.62k|    if (n < 0)
  ------------------
  |  Branch (867:9): [True: 0, False: 3.62k]
  ------------------
  868|      0|        return 0;
  869|       |
  870|  3.62k|    w = n / BN_BITS2;
  ------------------
  |  |   54|  3.62k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  3.62k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  871|  3.62k|    b = n % BN_BITS2;
  ------------------
  |  |   54|  3.62k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  3.62k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  872|  3.62k|    if (w >= a->top)
  ------------------
  |  Branch (872:9): [True: 0, False: 3.62k]
  ------------------
  873|      0|        return 0;
  874|  3.62k|    if (b == 0)
  ------------------
  |  Branch (874:9): [True: 3.62k, False: 0]
  ------------------
  875|  3.62k|        a->top = w;
  876|      0|    else {
  877|      0|        a->top = w + 1;
  878|      0|        a->d[w] &= ~(BN_MASK2 << b);
  ------------------
  |  |   77|      0|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  879|      0|    }
  880|  3.62k|    a->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  3.62k|#define BN_FLG_FIXED_TOP 0
  ------------------
  881|  3.62k|    return 1;
  882|  3.62k|}
BN_set_negative:
  896|  14.6k|{
  897|  14.6k|    if (b && !BN_is_zero(a))
  ------------------
  |  Branch (897:9): [True: 0, False: 14.6k]
  |  Branch (897:14): [True: 0, False: 0]
  ------------------
  898|      0|        a->neg = 1;
  899|  14.6k|    else
  900|  14.6k|        a->neg = 0;
  901|  14.6k|}
BN_zero_ex:
 1042|   829k|{
 1043|   829k|    a->neg = 0;
 1044|   829k|    a->top = 0;
 1045|   829k|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|   829k|#define BN_FLG_FIXED_TOP 0
  ------------------
 1046|   829k|}
BN_abs_is_word:
 1049|  33.0k|{
 1050|  33.0k|    return ((a->top == 1) && (a->d[0] == w)) || ((w == 0) && (a->top == 0));
  ------------------
  |  Branch (1050:13): [True: 33.0k, False: 0]
  |  Branch (1050:30): [True: 33.0k, False: 0]
  |  Branch (1050:50): [True: 0, False: 0]
  |  Branch (1050:62): [True: 0, False: 0]
  ------------------
 1051|  33.0k|}
BN_is_zero:
 1054|   483k|{
 1055|   483k|    return a->top == 0;
 1056|   483k|}
BN_is_one:
 1059|  29.3k|{
 1060|  29.3k|    return BN_abs_is_word(a, 1) && !a->neg;
  ------------------
  |  Branch (1060:12): [True: 29.3k, False: 0]
  |  Branch (1060:36): [True: 29.3k, False: 0]
  ------------------
 1061|  29.3k|}
BN_is_word:
 1064|  3.73k|{
 1065|  3.73k|    return BN_abs_is_word(a, w) && (!w || !a->neg);
  ------------------
  |  Branch (1065:12): [True: 3.73k, False: 0]
  |  Branch (1065:37): [True: 0, False: 3.73k]
  |  Branch (1065:43): [True: 3.73k, False: 0]
  ------------------
 1066|  3.73k|}
ossl_bn_is_word_fixed_top:
 1069|  3.62k|{
 1070|  3.62k|    int res, i;
 1071|  3.62k|    const BN_ULONG *ap = a->d;
 1072|       |
 1073|  3.62k|    if (a->neg || a->top == 0)
  ------------------
  |  Branch (1073:9): [True: 0, False: 3.62k]
  |  Branch (1073:19): [True: 0, False: 3.62k]
  ------------------
 1074|      0|        return 0;
 1075|       |
 1076|  3.62k|    res = constant_time_select_int((int)constant_time_eq_bn(ap[0], w), 1, 0);
 1077|       |
 1078|  14.5k|    for (i = 1; i < a->top; i++)
  ------------------
  |  Branch (1078:17): [True: 10.8k, False: 3.62k]
  ------------------
 1079|  10.8k|        res = constant_time_select_int((int)constant_time_is_zero_bn(ap[i]),
 1080|  10.8k|            res, 0);
 1081|  3.62k|    return res;
 1082|  3.62k|}
BN_is_odd:
 1085|  14.6k|{
 1086|  14.6k|    return (a->top > 0) && (a->d[0] & 1);
  ------------------
  |  Branch (1086:12): [True: 14.6k, False: 0]
  |  Branch (1086:28): [True: 14.6k, False: 0]
  ------------------
 1087|  14.6k|}
BN_is_negative:
 1090|  98.2k|{
 1091|  98.2k|    return (a->neg != 0);
 1092|  98.2k|}
BN_to_montgomery:
 1096|   102k|{
 1097|   102k|    return BN_mod_mul_montgomery(r, a, &(mont->RR), mont, ctx);
 1098|   102k|}
BN_set_flags:
 1129|  3.62k|{
 1130|  3.62k|    b->flags |= n;
 1131|  3.62k|}
BN_get_flags:
 1134|  4.93M|{
 1135|  4.93M|    return b->flags & n;
 1136|  4.93M|}
bn_wexpand:
 1164|  1.70M|{
 1165|  1.70M|    return (words <= a->dmax) ? a : bn_expand2(a, words);
  ------------------
  |  Branch (1165:12): [True: 773k, False: 934k]
  ------------------
 1166|  1.70M|}
bn_correct_top:
 1191|   641k|{
 1192|   641k|    BN_ULONG *ftl;
 1193|   641k|    int tmp_top = a->top;
 1194|       |
 1195|   641k|    if (ossl_likely(tmp_top > 0)) {
  ------------------
  |  |   22|   641k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 641k, False: 0]
  |  |  ------------------
  ------------------
 1196|   729k|        for (ftl = &(a->d[tmp_top]); tmp_top > 0; tmp_top--) {
  ------------------
  |  Branch (1196:38): [True: 729k, False: 0]
  ------------------
 1197|   729k|            ftl--;
 1198|   729k|            if (*ftl != 0)
  ------------------
  |  Branch (1198:17): [True: 641k, False: 87.9k]
  ------------------
 1199|   641k|                break;
 1200|   729k|        }
 1201|   641k|        a->top = tmp_top;
 1202|   641k|    }
 1203|   641k|    if (a->top == 0)
  ------------------
  |  Branch (1203:9): [True: 0, False: 641k]
  ------------------
 1204|      0|        a->neg = 0;
 1205|   641k|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|   641k|#define BN_FLG_FIXED_TOP 0
  ------------------
 1206|   641k|    bn_pollute(a);
 1207|   641k|}
bn_lib.c:bn_num_bits_consttime:
  154|  7.25k|{
  155|  7.25k|    int j, ret;
  156|  7.25k|    unsigned int mask, past_i;
  157|  7.25k|    int i = a->top - 1;
  158|  7.25k|    bn_check_top(a);
  159|       |
  160|  43.5k|    for (j = 0, past_i = 0, ret = 0; j < a->dmax; j++) {
  ------------------
  |  Branch (160:38): [True: 36.2k, False: 7.25k]
  ------------------
  161|  36.2k|        mask = constant_time_eq_int(i, j); /* 0xff..ff if i==j, 0x0 otherwise */
  162|       |
  163|  36.2k|        ret += BN_BITS2 & (~mask & ~past_i);
  ------------------
  |  |   54|  36.2k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  36.2k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  164|  36.2k|        ret += BN_num_bits_word(a->d[j]) & mask;
  165|       |
  166|  36.2k|        past_i |= mask; /* past_i will become 0xff..ff after i==j */
  167|  36.2k|    }
  168|       |
  169|       |    /*
  170|       |     * if BN_is_zero(a) => i is -1 and ret contains garbage, so we mask the
  171|       |     * final result.
  172|       |     */
  173|  7.25k|    mask = ~(constant_time_eq_int(i, ((int)-1)));
  174|       |
  175|  7.25k|    return ret & mask;
  176|  7.25k|}
bn_lib.c:bn_free_d:
  203|   949k|{
  204|   949k|    if (BN_get_flags(a, BN_FLG_SECURE))
  ------------------
  |  |   68|   949k|#define BN_FLG_SECURE 0x08
  ------------------
  |  Branch (204:9): [True: 7.36k, False: 942k]
  ------------------
  205|  7.36k|        OPENSSL_secure_clear_free(a->d, a->dmax * sizeof(a->d[0]));
  ------------------
  |  |  150|  7.36k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  206|   942k|    else if (clear != 0)
  ------------------
  |  Branch (206:14): [True: 480k, False: 461k]
  ------------------
  207|   480k|        OPENSSL_clear_free(a->d, a->dmax * sizeof(a->d[0]));
  ------------------
  |  |  130|   480k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  208|   461k|    else
  209|   461k|        OPENSSL_free(a->d);
  ------------------
  |  |  132|   461k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  210|   949k|}
bn_lib.c:bn_expand_internal:
  265|   949k|{
  266|   949k|    BN_ULONG *a = NULL;
  267|       |
  268|   949k|    if (ossl_unlikely(words > (INT_MAX / (4 * BN_BITS2)))) {
  ------------------
  |  |   23|   949k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 949k]
  |  |  ------------------
  ------------------
  269|      0|        ERR_raise(ERR_LIB_BN, BN_R_BIGNUM_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  270|      0|        return NULL;
  271|      0|    }
  272|   949k|    if (ossl_unlikely(BN_get_flags(b, BN_FLG_STATIC_DATA))) {
  ------------------
  |  |   23|   949k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 949k]
  |  |  ------------------
  ------------------
  273|      0|        ERR_raise(ERR_LIB_BN, BN_R_EXPAND_ON_STATIC_BIGNUM_DATA);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  274|      0|        return NULL;
  275|      0|    }
  276|   949k|    if (BN_get_flags(b, BN_FLG_SECURE))
  ------------------
  |  |   68|   949k|#define BN_FLG_SECURE 0x08
  ------------------
  |  Branch (276:9): [True: 7.36k, False: 942k]
  ------------------
  277|  7.36k|        a = OPENSSL_secure_calloc(words, sizeof(*a));
  ------------------
  |  |  146|  7.36k|    CRYPTO_secure_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  278|   942k|    else
  279|   942k|        a = OPENSSL_calloc(words, sizeof(*a));
  ------------------
  |  |  113|   942k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  280|   949k|    if (ossl_unlikely(a == NULL))
  ------------------
  |  |   23|   949k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 949k]
  |  |  ------------------
  ------------------
  281|      0|        return NULL;
  282|       |
  283|   949k|    assert(b->top <= words);
  ------------------
  |  Branch (283:5): [True: 0, False: 949k]
  |  Branch (283:5): [True: 949k, False: 0]
  ------------------
  284|   949k|    if (b->top > 0)
  ------------------
  |  Branch (284:9): [True: 25.8k, False: 923k]
  ------------------
  285|  25.8k|        memcpy(a, b->d, sizeof(*a) * b->top);
  286|       |
  287|   949k|    return a;
  288|   949k|}
bn_lib.c:bin2bn:
  434|   168k|{
  435|   168k|    int inc;
  436|   168k|    const unsigned char *s2;
  437|   168k|    int inc2;
  438|   168k|    int neg = 0, xor = 0, carry = 0;
  439|   168k|    unsigned int i;
  440|   168k|    unsigned int n;
  441|   168k|    BIGNUM *bn = NULL;
  442|       |
  443|       |    /* Negative length is not acceptable */
  444|   168k|    if (len < 0)
  ------------------
  |  Branch (444:9): [True: 0, False: 168k]
  ------------------
  445|      0|        return NULL;
  446|       |
  447|   168k|    if (ret == NULL)
  ------------------
  |  Branch (447:9): [True: 87.9k, False: 80.4k]
  ------------------
  448|  87.9k|        ret = bn = BN_new();
  449|   168k|    if (ret == NULL)
  ------------------
  |  Branch (449:9): [True: 0, False: 168k]
  ------------------
  450|      0|        return NULL;
  451|   168k|    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|   168k|    if (len == 0) {
  ------------------
  |  Branch (457:9): [True: 0, False: 168k]
  ------------------
  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|   168k|    if (endianness == LITTLE) {
  ------------------
  |  Branch (467:9): [True: 0, False: 168k]
  ------------------
  468|      0|        s2 = s + len - 1;
  469|      0|        inc2 = -1;
  470|      0|        inc = 1;
  471|   168k|    } else {
  472|   168k|        s2 = s;
  473|   168k|        inc2 = 1;
  474|   168k|        inc = -1;
  475|   168k|        s += len - 1;
  476|   168k|    }
  477|       |
  478|       |    /* Take note of the signedness of the input bytes*/
  479|   168k|    if (signedness == SIGNED) {
  ------------------
  |  Branch (479:9): [True: 0, False: 168k]
  ------------------
  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|   216k|    for (; len > 0 && *s2 == xor; s2 += inc2, len--)
  ------------------
  |  Branch (489:12): [True: 216k, False: 0]
  |  Branch (489:23): [True: 47.6k, False: 168k]
  ------------------
  490|  47.6k|        continue;
  491|       |
  492|       |    /*
  493|       |     * If there was a set of 0xff, we backtrack one byte unless the next
  494|       |     * one has a sign bit, as the last 0xff is then part of the actual
  495|       |     * number, rather then a mere sign extension.
  496|       |     */
  497|   168k|    if (xor == 0xff) {
  ------------------
  |  Branch (497:9): [True: 0, False: 168k]
  ------------------
  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|   168k|    if (len == 0) {
  ------------------
  |  Branch (502:9): [True: 0, False: 168k]
  ------------------
  503|      0|        ret->top = 0;
  504|      0|        return ret;
  505|      0|    }
  506|   168k|    n = ((len - 1) / BN_BYTES) + 1; /* Number of resulting bignum chunks */
  ------------------
  |  |   38|   168k|#define BN_BYTES 8
  ------------------
  507|   168k|    if (bn_wexpand(ret, (int)n) == NULL) {
  ------------------
  |  Branch (507:9): [True: 0, False: 168k]
  ------------------
  508|      0|        BN_free(bn);
  509|      0|        return NULL;
  510|      0|    }
  511|   168k|    ret->top = n;
  512|   168k|    ret->neg = neg;
  513|   845k|    for (i = 0; n-- > 0; i++) {
  ------------------
  |  Branch (513:17): [True: 677k, False: 168k]
  ------------------
  514|   677k|        BN_ULONG l = 0; /* Accumulator */
  515|   677k|        unsigned int m = 0; /* Offset in a bignum chunk, in bits */
  516|       |
  517|  6.02M|        for (; len > 0 && m < BN_BYTES * 8; len--, s += inc, m += 8) {
  ------------------
  |  |   38|  5.85M|#define BN_BYTES 8
  ------------------
  |  Branch (517:16): [True: 5.85M, False: 168k]
  |  Branch (517:27): [True: 5.34M, False: 508k]
  ------------------
  518|  5.34M|            BN_ULONG byte_xored = *s ^ xor;
  519|  5.34M|            BN_ULONG byte = (byte_xored + carry) & 0xff;
  520|       |
  521|  5.34M|            carry = byte_xored > byte; /* Implicit 1 or 0 */
  522|  5.34M|            l |= (byte << m);
  523|  5.34M|        }
  524|   677k|        ret->d[i] = l;
  525|   677k|    }
  526|       |    /*
  527|       |     * need to call this due to clear byte at top if avoiding having the top
  528|       |     * bit set (-ve number)
  529|       |     */
  530|   168k|    bn_correct_top(ret);
  531|   168k|    return ret;
  532|   168k|}
bn_lib.c:bn2binpad:
  546|  40.5k|{
  547|  40.5k|    int inc;
  548|  40.5k|    int n, n8;
  549|  40.5k|    int xor = 0, carry = 0, ext = 0;
  550|  40.5k|    size_t i, lasti, j, atop, mask;
  551|  40.5k|    BN_ULONG l;
  552|       |
  553|       |    /*
  554|       |     * In case |a| is fixed-top, BN_num_bits can return bogus length,
  555|       |     * but it's assumed that fixed-top inputs ought to be "nominated"
  556|       |     * even for padded output, so it works out...
  557|       |     */
  558|  40.5k|    n8 = BN_num_bits(a);
  559|  40.5k|    n = (n8 + 7) / 8; /* This is what BN_num_bytes() does */
  560|       |
  561|       |    /* Take note of the signedness of the bignum */
  562|  40.5k|    if (signedness == SIGNED) {
  ------------------
  |  Branch (562:9): [True: 0, False: 40.5k]
  ------------------
  563|      0|        xor = a->neg ? 0xff : 0x00;
  ------------------
  |  Branch (563:15): [True: 0, False: 0]
  ------------------
  564|      0|        carry = a->neg;
  565|       |
  566|       |        /*
  567|       |         * if |n * 8 == n|, then the MSbit is set, otherwise unset.
  568|       |         * We must compensate with one extra byte if that doesn't
  569|       |         * correspond to the signedness of the bignum with regards
  570|       |         * to 2's complement.
  571|       |         */
  572|      0|        ext = (n * 8 == n8)
  ------------------
  |  Branch (572:15): [True: 0, False: 0]
  ------------------
  573|      0|            ? !a->neg /* MSbit set on nonnegative bignum */
  574|      0|            : a->neg; /* MSbit unset on negative bignum */
  575|      0|    }
  576|       |
  577|  40.5k|    if (tolen == -1) {
  ------------------
  |  Branch (577:9): [True: 0, False: 40.5k]
  ------------------
  578|      0|        tolen = n + ext;
  579|  40.5k|    } else if (tolen < n + ext) { /* uncommon/unlike case */
  ------------------
  |  Branch (579:16): [True: 0, False: 40.5k]
  ------------------
  580|      0|        BIGNUM temp = *a;
  581|       |
  582|      0|        bn_correct_top(&temp);
  583|      0|        n8 = BN_num_bits(&temp);
  584|      0|        n = (n8 + 7) / 8; /* This is what BN_num_bytes() does */
  585|      0|        if (tolen < n + ext)
  ------------------
  |  Branch (585:13): [True: 0, False: 0]
  ------------------
  586|      0|            return -1;
  587|      0|    }
  588|       |
  589|       |    /* Swipe through whole available data and don't give away padded zero. */
  590|  40.5k|    atop = a->dmax * BN_BYTES;
  ------------------
  |  |   38|  40.5k|#define BN_BYTES 8
  ------------------
  591|  40.5k|    if (atop == 0) {
  ------------------
  |  Branch (591:9): [True: 0, False: 40.5k]
  ------------------
  592|      0|        if (tolen != 0)
  ------------------
  |  Branch (592:13): [True: 0, False: 0]
  ------------------
  593|      0|            memset(to, '\0', tolen);
  594|      0|        return tolen;
  595|      0|    }
  596|       |
  597|       |    /*
  598|       |     * The loop that does the work iterates from least significant
  599|       |     * to most significant BIGNUM limb, so we adapt parameters to
  600|       |     * transfer output bytes accordingly.
  601|       |     */
  602|  40.5k|    if (endianness == LITTLE) {
  ------------------
  |  Branch (602:9): [True: 0, False: 40.5k]
  ------------------
  603|      0|        inc = 1;
  604|  40.5k|    } else {
  605|  40.5k|        inc = -1;
  606|  40.5k|        to += tolen - 1; /* Move to the last byte, not beyond */
  607|  40.5k|    }
  608|       |
  609|  40.5k|    lasti = atop - 1;
  610|  40.5k|    atop = a->top * BN_BYTES;
  ------------------
  |  |   38|  40.5k|#define BN_BYTES 8
  ------------------
  611|  1.57M|    for (i = 0, j = 0; j < (size_t)tolen; j++) {
  ------------------
  |  Branch (611:24): [True: 1.53M, False: 40.5k]
  ------------------
  612|  1.53M|        unsigned char byte, byte_xored;
  613|       |
  614|  1.53M|        l = a->d[i / BN_BYTES];
  ------------------
  |  |   38|  1.53M|#define BN_BYTES 8
  ------------------
  615|  1.53M|        mask = 0 - ((j - atop) >> (8 * sizeof(i) - 1));
  616|  1.53M|        byte = (unsigned char)(l >> (8 * (i % BN_BYTES)) & mask);
  ------------------
  |  |   38|  1.53M|#define BN_BYTES 8
  ------------------
  617|  1.53M|        byte_xored = byte ^ xor;
  618|  1.53M|        *to = (unsigned char)(byte_xored + carry);
  619|  1.53M|        carry = byte_xored > *to; /* Implicit 1 or 0 */
  620|  1.53M|        to += inc;
  621|  1.53M|        i += (i - lasti) >> (8 * sizeof(i) - 1); /* stay on last limb */
  622|  1.53M|    }
  623|       |
  624|  40.5k|    return tolen;
  625|  40.5k|}

bn_lib.c:bn_expand:
  672|  29.3k|{
  673|  29.3k|    if (bits > (INT_MAX - BN_BITS2 + 1))
  ------------------
  |  |   54|  29.3k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  29.3k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (673:9): [True: 0, False: 29.3k]
  ------------------
  674|      0|        return NULL;
  675|       |
  676|  29.3k|    if (((bits + BN_BITS2 - 1) / BN_BITS2) <= (a)->dmax)
  ------------------
  |  |   54|  29.3k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  29.3k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
                  if (((bits + BN_BITS2 - 1) / BN_BITS2) <= (a)->dmax)
  ------------------
  |  |   54|  29.3k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  29.3k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (676:9): [True: 14.6k, False: 14.6k]
  ------------------
  677|  14.6k|        return a;
  678|       |
  679|  14.6k|    return bn_expand2((a), (bits + BN_BITS2 - 1) / BN_BITS2);
  ------------------
  |  |   54|  14.6k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  14.6k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
                  return bn_expand2((a), (bits + BN_BITS2 - 1) / BN_BITS2);
  ------------------
  |  |   54|  14.6k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  14.6k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  680|  29.3k|}

BN_nnmod:
   15|   131k|{
   16|       |    /*
   17|       |     * like BN_mod, but returns non-negative remainder (i.e., 0 <= r < |m|
   18|       |     * always holds)
   19|       |     */
   20|       |
   21|   131k|    if (r == m) {
  ------------------
  |  Branch (21:9): [True: 0, False: 131k]
  ------------------
   22|      0|        ERR_raise(ERR_LIB_BN, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   23|      0|        return 0;
   24|      0|    }
   25|       |
   26|   131k|    if (!(BN_mod(r, a, m, ctx)))
  ------------------
  |  |  276|   131k|#define BN_mod(rem, a, m, ctx) BN_div(NULL, (rem), (a), (m), (ctx))
  ------------------
  |  Branch (26:9): [True: 0, False: 131k]
  ------------------
   27|      0|        return 0;
   28|   131k|    if (!r->neg)
  ------------------
  |  Branch (28:9): [True: 131k, False: 0]
  ------------------
   29|   131k|        return 1;
   30|       |    /* now   -|m| < r < 0,  so we have to set  r := r + |m| */
   31|      0|    return (m->neg ? BN_sub : BN_add)(r, r, m);
  ------------------
  |  Branch (31:13): [True: 0, False: 0]
  ------------------
   32|   131k|}
bn_mod_add_fixed_top:
   56|  62.2k|{
   57|  62.2k|    size_t i, ai, bi, mtop = m->top;
   58|  62.2k|    BN_ULONG storage[1024 / BN_BITS2];
   59|  62.2k|    BN_ULONG carry, temp, mask, *rp, *tp = storage;
   60|  62.2k|    const BN_ULONG *ap, *bp;
   61|       |
   62|  62.2k|    if (bn_wexpand(r, (int)mtop) == NULL)
  ------------------
  |  Branch (62:9): [True: 0, False: 62.2k]
  ------------------
   63|      0|        return 0;
   64|       |
   65|  62.2k|    if (mtop > OSSL_NELEM(storage)) {
  ------------------
  |  |   14|  62.2k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (65:9): [True: 0, False: 62.2k]
  ------------------
   66|      0|        tp = OPENSSL_malloc_array(mtop, sizeof(BN_ULONG));
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   67|      0|        if (tp == NULL)
  ------------------
  |  Branch (67:13): [True: 0, False: 0]
  ------------------
   68|      0|            return 0;
   69|      0|    }
   70|       |
   71|  62.2k|    ap = a->d != NULL ? a->d : tp;
  ------------------
  |  Branch (71:10): [True: 62.2k, False: 0]
  ------------------
   72|  62.2k|    bp = b->d != NULL ? b->d : tp;
  ------------------
  |  Branch (72:10): [True: 62.2k, False: 0]
  ------------------
   73|       |
   74|   311k|    for (i = 0, ai = 0, bi = 0, carry = 0; i < mtop;) {
  ------------------
  |  Branch (74:44): [True: 248k, False: 62.2k]
  ------------------
   75|   248k|        mask = (BN_ULONG)0 - ((i - a->top) >> (8 * sizeof(i) - 1));
   76|   248k|        temp = ((ap[ai] & mask) + carry) & BN_MASK2;
  ------------------
  |  |   77|   248k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
   77|   248k|        carry = (temp < carry);
   78|       |
   79|   248k|        mask = (BN_ULONG)0 - ((i - b->top) >> (8 * sizeof(i) - 1));
   80|   248k|        tp[i] = ((bp[bi] & mask) + temp) & BN_MASK2;
  ------------------
  |  |   77|   248k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
   81|   248k|        carry += (tp[i] < temp);
   82|       |
   83|   248k|        i++;
   84|   248k|        ai += (i - a->dmax) >> (8 * sizeof(i) - 1);
   85|   248k|        bi += (i - b->dmax) >> (8 * sizeof(i) - 1);
   86|   248k|    }
   87|  62.2k|    rp = r->d;
   88|  62.2k|    carry -= bn_sub_words(rp, tp, m->d, (int)mtop);
   89|   311k|    for (i = 0; i < mtop; i++) {
  ------------------
  |  Branch (89:17): [True: 248k, False: 62.2k]
  ------------------
   90|   248k|        rp[i] = (carry & tp[i]) | (~carry & rp[i]);
   91|   248k|        ((volatile BN_ULONG *)tp)[i] = 0;
   92|   248k|    }
   93|  62.2k|    r->top = (int)mtop;
   94|  62.2k|    r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  62.2k|#define BN_FLG_FIXED_TOP 0
  ------------------
   95|  62.2k|    r->neg = 0;
   96|       |
   97|  62.2k|    if (tp != storage)
  ------------------
  |  Branch (97:9): [True: 0, False: 62.2k]
  ------------------
   98|      0|        OPENSSL_free(tp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   99|       |
  100|  62.2k|    return 1;
  101|  62.2k|}
BN_mod_add_quick:
  105|  58.6k|{
  106|  58.6k|    int ret = bn_mod_add_fixed_top(r, a, b, m);
  107|       |
  108|  58.6k|    if (ret)
  ------------------
  |  Branch (108:9): [True: 58.6k, False: 0]
  ------------------
  109|  58.6k|        bn_correct_top(r);
  110|       |
  111|  58.6k|    return ret;
  112|  58.6k|}
BN_mod_mul:
  208|  7.25k|{
  209|  7.25k|    BIGNUM *t;
  210|  7.25k|    int ret = 0;
  211|       |
  212|  7.25k|    bn_check_top(a);
  213|  7.25k|    bn_check_top(b);
  214|  7.25k|    bn_check_top(m);
  215|       |
  216|  7.25k|    BN_CTX_start(ctx);
  217|  7.25k|    if ((t = BN_CTX_get(ctx)) == NULL)
  ------------------
  |  Branch (217:9): [True: 0, False: 7.25k]
  ------------------
  218|      0|        goto err;
  219|  7.25k|    if (a == b) {
  ------------------
  |  Branch (219:9): [True: 0, False: 7.25k]
  ------------------
  220|      0|        if (!BN_sqr(t, a, ctx))
  ------------------
  |  Branch (220:13): [True: 0, False: 0]
  ------------------
  221|      0|            goto err;
  222|  7.25k|    } else {
  223|  7.25k|        if (!BN_mul(t, a, b, ctx))
  ------------------
  |  Branch (223:13): [True: 0, False: 7.25k]
  ------------------
  224|      0|            goto err;
  225|  7.25k|    }
  226|  7.25k|    if (!BN_nnmod(r, t, m, ctx))
  ------------------
  |  Branch (226:9): [True: 0, False: 7.25k]
  ------------------
  227|      0|        goto err;
  228|  7.25k|    bn_check_top(r);
  229|  7.25k|    ret = 1;
  230|  7.25k|err:
  231|  7.25k|    BN_CTX_end(ctx);
  232|  7.25k|    return ret;
  233|  7.25k|}

BN_mod_mul_montgomery:
   27|   194k|{
   28|   194k|    int ret = bn_mul_mont_fixed_top(r, a, b, mont, ctx);
   29|       |
   30|   194k|    bn_correct_top(r);
   31|   194k|    bn_check_top(r);
   32|       |
   33|   194k|    return ret;
   34|   194k|}
bn_mul_mont_fixed_top:
   38|   204k|{
   39|   204k|    BIGNUM *tmp;
   40|   204k|    int ret = 0;
   41|   204k|    int num = mont->N.top;
   42|       |
   43|   204k|#if defined(OPENSSL_BN_ASM_MONT) && defined(MONT_WORD)
   44|   204k|    if (num > 1 && num <= BN_SOFT_LIMIT && a->top == num && b->top == num) {
  ------------------
  |  |   52|   409k|#define BN_SOFT_LIMIT (4096 / BN_BYTES)
  |  |  ------------------
  |  |  |  |   38|   204k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (44:9): [True: 204k, False: 0]
  |  Branch (44:20): [True: 204k, False: 0]
  |  Branch (44:44): [True: 190k, False: 14.6k]
  |  Branch (44:61): [True: 190k, False: 0]
  ------------------
   45|   190k|        if (bn_wexpand(r, num) == NULL)
  ------------------
  |  Branch (45:13): [True: 0, False: 190k]
  ------------------
   46|      0|            return 0;
   47|   190k|        if (bn_mul_mont(r->d, a->d, b->d, mont->N.d, mont->n0, num)) {
  ------------------
  |  Branch (47:13): [True: 190k, False: 0]
  ------------------
   48|   190k|            r->neg = a->neg ^ b->neg;
   49|   190k|            r->top = num;
   50|   190k|            r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|   190k|#define BN_FLG_FIXED_TOP 0
  ------------------
   51|   190k|            return 1;
   52|   190k|        }
   53|   190k|    }
   54|  14.6k|#endif
   55|       |
   56|  14.6k|    if ((a->top + b->top) > 2 * num)
  ------------------
  |  Branch (56:9): [True: 0, False: 14.6k]
  ------------------
   57|      0|        return 0;
   58|       |
   59|  14.6k|    BN_CTX_start(ctx);
   60|  14.6k|    tmp = BN_CTX_get(ctx);
   61|  14.6k|    if (tmp == NULL)
  ------------------
  |  Branch (61:9): [True: 0, False: 14.6k]
  ------------------
   62|      0|        goto err;
   63|       |
   64|  14.6k|    bn_check_top(tmp);
   65|  14.6k|    if (a == b) {
  ------------------
  |  Branch (65:9): [True: 0, False: 14.6k]
  ------------------
   66|      0|        if (!bn_sqr_fixed_top(tmp, a, ctx))
  ------------------
  |  Branch (66:13): [True: 0, False: 0]
  ------------------
   67|      0|            goto err;
   68|  14.6k|    } else {
   69|  14.6k|        if (!bn_mul_fixed_top(tmp, a, b, ctx))
  ------------------
  |  Branch (69:13): [True: 0, False: 14.6k]
  ------------------
   70|      0|            goto err;
   71|  14.6k|    }
   72|       |    /* reduce from aRR to aR */
   73|  14.6k|#ifdef MONT_WORD
   74|  14.6k|    if (!bn_from_montgomery_word(r, tmp, mont))
  ------------------
  |  Branch (74:9): [True: 0, False: 14.6k]
  ------------------
   75|      0|        goto err;
   76|       |#else
   77|       |    if (!BN_from_montgomery(r, tmp, mont, ctx))
   78|       |        goto err;
   79|       |#endif
   80|  14.6k|    ret = 1;
   81|  14.6k|err:
   82|  14.6k|    BN_CTX_end(ctx);
   83|  14.6k|    return ret;
   84|  14.6k|}
BN_from_montgomery:
  163|  37.3k|{
  164|  37.3k|    int retn;
  165|       |
  166|  37.3k|    retn = bn_from_mont_fixed_top(ret, a, mont, ctx);
  167|  37.3k|    bn_correct_top(ret);
  168|  37.3k|    bn_check_top(ret);
  169|       |
  170|  37.3k|    return retn;
  171|  37.3k|}
bn_from_mont_fixed_top:
  175|  37.3k|{
  176|  37.3k|    int retn = 0;
  177|  37.3k|#ifdef MONT_WORD
  178|  37.3k|    BIGNUM *t;
  179|       |
  180|  37.3k|    BN_CTX_start(ctx);
  181|  37.3k|    if ((t = BN_CTX_get(ctx)) && BN_copy(t, a)) {
  ------------------
  |  Branch (181:9): [True: 37.3k, False: 0]
  |  Branch (181:34): [True: 37.3k, False: 0]
  ------------------
  182|  37.3k|        retn = bn_from_montgomery_word(ret, t, mont);
  183|  37.3k|    }
  184|  37.3k|    BN_CTX_end(ctx);
  185|       |#else /* !MONT_WORD */
  186|       |    BIGNUM *t1, *t2;
  187|       |
  188|       |    BN_CTX_start(ctx);
  189|       |    t1 = BN_CTX_get(ctx);
  190|       |    t2 = BN_CTX_get(ctx);
  191|       |    if (t2 == NULL)
  192|       |        goto err;
  193|       |
  194|       |    if (!BN_copy(t1, a))
  195|       |        goto err;
  196|       |    BN_mask_bits(t1, mont->ri);
  197|       |
  198|       |    if (!BN_mul(t2, t1, &mont->Ni, ctx))
  199|       |        goto err;
  200|       |    BN_mask_bits(t2, mont->ri);
  201|       |
  202|       |    if (!BN_mul(t1, t2, &mont->N, ctx))
  203|       |        goto err;
  204|       |    if (!BN_add(t2, a, t1))
  205|       |        goto err;
  206|       |    if (!BN_rshift(ret, t2, mont->ri))
  207|       |        goto err;
  208|       |
  209|       |    if (BN_ucmp(ret, &(mont->N)) >= 0) {
  210|       |        if (!BN_usub(ret, ret, &(mont->N)))
  211|       |            goto err;
  212|       |    }
  213|       |    retn = 1;
  214|       |    bn_check_top(ret);
  215|       |err:
  216|       |    BN_CTX_end(ctx);
  217|       |#endif /* MONT_WORD */
  218|  37.3k|    return retn;
  219|  37.3k|}
bn_to_mont_fixed_top:
  223|  7.25k|{
  224|  7.25k|    return bn_mul_mont_fixed_top(r, a, &(mont->RR), mont, ctx);
  225|  7.25k|}
BN_MONT_CTX_new:
  228|  58.6k|{
  229|  58.6k|    BN_MONT_CTX *ret;
  230|       |
  231|  58.6k|    if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  107|  58.6k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (231:9): [True: 0, False: 58.6k]
  ------------------
  232|      0|        return NULL;
  233|       |
  234|  58.6k|    BN_MONT_CTX_init(ret);
  235|  58.6k|    ret->flags = BN_FLG_MALLOCED;
  ------------------
  |  |   58|  58.6k|#define BN_FLG_MALLOCED 0x01
  ------------------
  236|  58.6k|    return ret;
  237|  58.6k|}
BN_MONT_CTX_init:
  240|  58.6k|{
  241|  58.6k|    ctx->ri = 0;
  242|  58.6k|    bn_init(&ctx->RR);
  243|  58.6k|    bn_init(&ctx->N);
  244|  58.6k|    bn_init(&ctx->Ni);
  245|  58.6k|    ctx->n0[0] = ctx->n0[1] = 0;
  246|  58.6k|    ctx->flags = 0;
  247|  58.6k|}
BN_MONT_CTX_free:
  250|   102k|{
  251|   102k|    if (mont == NULL)
  ------------------
  |  Branch (251:9): [True: 43.9k, False: 58.6k]
  ------------------
  252|  43.9k|        return;
  253|  58.6k|    BN_clear_free(&mont->RR);
  254|  58.6k|    BN_clear_free(&mont->N);
  255|  58.6k|    BN_clear_free(&mont->Ni);
  256|  58.6k|    if (mont->flags & BN_FLG_MALLOCED)
  ------------------
  |  |   58|  58.6k|#define BN_FLG_MALLOCED 0x01
  ------------------
  |  Branch (256:9): [True: 58.6k, False: 0]
  ------------------
  257|  58.6k|        OPENSSL_free(mont);
  ------------------
  |  |  132|  58.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  258|  58.6k|}
BN_MONT_CTX_copy:
  409|  29.3k|{
  410|  29.3k|    if (to == from)
  ------------------
  |  Branch (410:9): [True: 0, False: 29.3k]
  ------------------
  411|      0|        return to;
  412|       |
  413|  29.3k|    if (!BN_copy(&(to->RR), &(from->RR)))
  ------------------
  |  Branch (413:9): [True: 0, False: 29.3k]
  ------------------
  414|      0|        return NULL;
  415|  29.3k|    if (!BN_copy(&(to->N), &(from->N)))
  ------------------
  |  Branch (415:9): [True: 0, False: 29.3k]
  ------------------
  416|      0|        return NULL;
  417|  29.3k|    if (!BN_copy(&(to->Ni), &(from->Ni)))
  ------------------
  |  Branch (417:9): [True: 0, False: 29.3k]
  ------------------
  418|      0|        return NULL;
  419|  29.3k|    to->ri = from->ri;
  420|  29.3k|    to->n0[0] = from->n0[0];
  421|  29.3k|    to->n0[1] = from->n0[1];
  422|  29.3k|    return to;
  423|  29.3k|}
ossl_bn_mont_ctx_set:
  470|  29.3k|{
  471|  29.3k|    if (BN_copy(&ctx->N, modulus) == NULL)
  ------------------
  |  Branch (471:9): [True: 0, False: 29.3k]
  ------------------
  472|      0|        return 0;
  473|  29.3k|    if (BN_bin2bn(rr, rrlen, &ctx->RR) == NULL)
  ------------------
  |  Branch (473:9): [True: 0, False: 29.3k]
  ------------------
  474|      0|        return 0;
  475|  29.3k|    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|  29.3k|    ctx->n0[0] = ((BN_ULONG)nhi << 32) | nlo;
  484|  29.3k|    ctx->n0[1] = 0;
  485|  29.3k|#endif
  486|       |
  487|  29.3k|    return 1;
  488|  29.3k|}
bn_mont.c:bn_from_montgomery_word:
   88|  51.9k|{
   89|  51.9k|    BIGNUM *n;
   90|  51.9k|    BN_ULONG *ap, *np, *rp, n0, v, carry;
   91|  51.9k|    int nl, max, i;
   92|  51.9k|    unsigned int rtop;
   93|       |
   94|  51.9k|    n = &(mont->N);
   95|  51.9k|    nl = n->top;
   96|  51.9k|    if (nl == 0) {
  ------------------
  |  Branch (96:9): [True: 0, False: 51.9k]
  ------------------
   97|      0|        ret->top = 0;
   98|      0|        return 1;
   99|      0|    }
  100|       |
  101|  51.9k|    max = (2 * nl); /* carry is stored separately */
  102|  51.9k|    if (bn_wexpand(r, max) == NULL)
  ------------------
  |  Branch (102:9): [True: 0, False: 51.9k]
  ------------------
  103|      0|        return 0;
  104|       |
  105|  51.9k|    r->neg ^= n->neg;
  106|  51.9k|    np = n->d;
  107|  51.9k|    rp = r->d;
  108|       |
  109|       |    /* clear the top words of T */
  110|   467k|    for (rtop = r->top, i = 0; i < max; i++) {
  ------------------
  |  Branch (110:32): [True: 415k, False: 51.9k]
  ------------------
  111|   415k|        v = (BN_ULONG)0 - ((i - rtop) >> (8 * sizeof(rtop) - 1));
  112|   415k|        rp[i] &= v;
  113|   415k|    }
  114|       |
  115|  51.9k|    r->top = max;
  116|  51.9k|    r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  51.9k|#define BN_FLG_FIXED_TOP 0
  ------------------
  117|  51.9k|    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|   259k|    for (carry = 0, i = 0; i < nl; i++, rp++) {
  ------------------
  |  Branch (124:28): [True: 207k, False: 51.9k]
  ------------------
  125|   207k|        v = bn_mul_add_words(rp, np, nl, (rp[0] * n0) & BN_MASK2);
  ------------------
  |  |   77|   207k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  126|   207k|        v = (v + carry + rp[nl]) & BN_MASK2;
  ------------------
  |  |   77|   207k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  127|   207k|        carry |= (v != rp[nl]);
  128|   207k|        carry &= (v <= rp[nl]);
  129|   207k|        rp[nl] = v;
  130|   207k|    }
  131|       |
  132|  51.9k|    if (bn_wexpand(ret, nl) == NULL)
  ------------------
  |  Branch (132:9): [True: 0, False: 51.9k]
  ------------------
  133|      0|        return 0;
  134|  51.9k|    ret->top = nl;
  135|  51.9k|    ret->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  213|  51.9k|#define BN_FLG_FIXED_TOP 0
  ------------------
  136|  51.9k|    ret->neg = r->neg;
  137|       |
  138|  51.9k|    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|  51.9k|    ap = &(r->d[nl]);
  145|       |
  146|  51.9k|    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|   259k|    for (i = 0; i < nl; i++) {
  ------------------
  |  Branch (152:17): [True: 207k, False: 51.9k]
  ------------------
  153|   207k|        rp[i] = (carry & ap[i]) | (~carry & rp[i]);
  154|   207k|        ap[i] = 0;
  155|   207k|    }
  156|       |
  157|  51.9k|    return 1;
  158|  51.9k|}

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

ossl_bn_gen_dsa_nonce_fixed_top:
  297|  3.62k|{
  298|  3.62k|    EVP_MD_CTX *mdctx = EVP_MD_CTX_new();
  299|       |    /*
  300|       |     * We use 512 bits of random data per iteration to ensure that we have at
  301|       |     * least |range| bits of randomness.
  302|       |     */
  303|  3.62k|    unsigned char random_bytes[64];
  304|  3.62k|    unsigned char digest[SHA512_DIGEST_LENGTH];
  305|  3.62k|    unsigned done, todo;
  306|       |    /* We generate |range|+1 bytes of random output. */
  307|  3.62k|    const unsigned num_k_bytes = BN_num_bytes(range) + 1;
  ------------------
  |  |  188|  3.62k|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
  308|  3.62k|    unsigned char private_bytes[96];
  309|  3.62k|    unsigned char *k_bytes = NULL;
  310|  3.62k|    const int max_n = 64; /* Pr(failure to generate) < 2^max_n */
  311|  3.62k|    int n;
  312|  3.62k|    int ret = 0;
  313|  3.62k|    EVP_MD *md = NULL;
  314|  3.62k|    OSSL_LIB_CTX *libctx = ossl_bn_get_libctx(ctx);
  315|       |
  316|  3.62k|    if (mdctx == NULL)
  ------------------
  |  Branch (316:9): [True: 0, False: 3.62k]
  ------------------
  317|      0|        goto end;
  318|       |
  319|  3.62k|    k_bytes = OPENSSL_malloc(num_k_bytes);
  ------------------
  |  |  107|  3.62k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  320|  3.62k|    if (k_bytes == NULL)
  ------------------
  |  Branch (320:9): [True: 0, False: 3.62k]
  ------------------
  321|      0|        goto end;
  322|       |    /* Ensure top byte is set to avoid non-constant time in bin2bn */
  323|  3.62k|    k_bytes[0] = 0xff;
  324|       |
  325|       |    /* We copy |priv| into a local buffer to avoid exposing its length. */
  326|  3.62k|    if (BN_bn2binpad(priv, private_bytes, sizeof(private_bytes)) < 0) {
  ------------------
  |  Branch (326:9): [True: 0, False: 3.62k]
  ------------------
  327|       |        /*
  328|       |         * No reasonable DSA or ECDSA key should have a private key this
  329|       |         * large and we don't handle this case in order to avoid leaking the
  330|       |         * length of the private key.
  331|       |         */
  332|      0|        ERR_raise(ERR_LIB_BN, BN_R_PRIVATE_KEY_TOO_LARGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  333|      0|        goto end;
  334|      0|    }
  335|       |
  336|  3.62k|    md = EVP_MD_fetch(libctx, "SHA512", NULL);
  337|  3.62k|    if (md == NULL) {
  ------------------
  |  Branch (337:9): [True: 0, False: 3.62k]
  ------------------
  338|      0|        ERR_raise(ERR_LIB_BN, BN_R_NO_SUITABLE_DIGEST);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  339|      0|        goto end;
  340|      0|    }
  341|  3.62k|    for (n = 0; n < max_n; n++) {
  ------------------
  |  Branch (341:17): [True: 3.62k, False: 0]
  ------------------
  342|  3.62k|        unsigned char i = 0;
  343|       |
  344|  7.25k|        for (done = 1; done < num_k_bytes;) {
  ------------------
  |  Branch (344:24): [True: 3.62k, False: 3.62k]
  ------------------
  345|  3.62k|            if (RAND_priv_bytes_ex(libctx, random_bytes, sizeof(random_bytes),
  ------------------
  |  Branch (345:17): [True: 0, False: 3.62k]
  ------------------
  346|  3.62k|                    0)
  347|  3.62k|                <= 0)
  348|      0|                goto end;
  349|       |
  350|  3.62k|            if (!EVP_DigestInit_ex(mdctx, md, NULL)
  ------------------
  |  Branch (350:17): [True: 0, False: 3.62k]
  ------------------
  351|  3.62k|                || !EVP_DigestUpdate(mdctx, &i, sizeof(i))
  ------------------
  |  Branch (351:20): [True: 0, False: 3.62k]
  ------------------
  352|  3.62k|                || !EVP_DigestUpdate(mdctx, private_bytes,
  ------------------
  |  Branch (352:20): [True: 0, False: 3.62k]
  ------------------
  353|  3.62k|                    sizeof(private_bytes))
  354|  3.62k|                || !EVP_DigestUpdate(mdctx, message, message_len)
  ------------------
  |  Branch (354:20): [True: 0, False: 3.62k]
  ------------------
  355|  3.62k|                || !EVP_DigestUpdate(mdctx, random_bytes,
  ------------------
  |  Branch (355:20): [True: 0, False: 3.62k]
  ------------------
  356|  3.62k|                    sizeof(random_bytes))
  357|  3.62k|                || !EVP_DigestFinal_ex(mdctx, digest, NULL))
  ------------------
  |  Branch (357:20): [True: 0, False: 3.62k]
  ------------------
  358|      0|                goto end;
  359|       |
  360|  3.62k|            todo = num_k_bytes - done;
  361|  3.62k|            if (todo > SHA512_DIGEST_LENGTH)
  ------------------
  |  |   89|  3.62k|#define SHA512_DIGEST_LENGTH 64
  ------------------
  |  Branch (361:17): [True: 0, False: 3.62k]
  ------------------
  362|      0|                todo = SHA512_DIGEST_LENGTH;
  ------------------
  |  |   89|      0|#define SHA512_DIGEST_LENGTH 64
  ------------------
  363|  3.62k|            memcpy(k_bytes + done, digest, todo);
  364|  3.62k|            done += todo;
  365|  3.62k|            ++i;
  366|  3.62k|        }
  367|       |
  368|  3.62k|        if (!BN_bin2bn(k_bytes, num_k_bytes, out))
  ------------------
  |  Branch (368:13): [True: 0, False: 3.62k]
  ------------------
  369|      0|            goto end;
  370|       |
  371|       |        /* Clear out the top bits and rejection filter into range */
  372|  3.62k|        BN_set_flags(out, BN_FLG_CONSTTIME);
  ------------------
  |  |   67|  3.62k|#define BN_FLG_CONSTTIME 0x04
  ------------------
  373|  3.62k|        ossl_bn_mask_bits_fixed_top(out, BN_num_bits(range));
  374|       |
  375|  3.62k|        if (BN_ucmp(out, range) < 0) {
  ------------------
  |  Branch (375:13): [True: 3.62k, False: 0]
  ------------------
  376|  3.62k|            ret = 1;
  377|       |#ifdef BN_DEBUG
  378|       |            /* With BN_DEBUG on a fixed top number cannot be returned */
  379|       |            bn_correct_top(out);
  380|       |#endif
  381|  3.62k|            goto end;
  382|  3.62k|        }
  383|  3.62k|    }
  384|       |    /* Failed to generate anything */
  385|  3.62k|    ERR_raise(ERR_LIB_BN, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  386|       |
  387|  3.62k|end:
  388|  3.62k|    EVP_MD_CTX_free(mdctx);
  389|  3.62k|    EVP_MD_free(md);
  390|  3.62k|    OPENSSL_clear_free(k_bytes, num_k_bytes);
  ------------------
  |  |  130|  3.62k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  391|  3.62k|    OPENSSL_cleanse(digest, sizeof(digest));
  392|  3.62k|    OPENSSL_cleanse(random_bytes, sizeof(random_bytes));
  393|  3.62k|    OPENSSL_cleanse(private_bytes, sizeof(private_bytes));
  394|  3.62k|    return ret;
  395|      0|}

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

BN_add_word:
   98|  14.6k|{
   99|  14.6k|    BN_ULONG l;
  100|  14.6k|    int i;
  101|       |
  102|  14.6k|    bn_check_top(a);
  103|  14.6k|    w &= BN_MASK2;
  ------------------
  |  |   77|  14.6k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  104|       |
  105|       |    /* degenerate case: w is zero */
  106|  14.6k|    if (!w)
  ------------------
  |  Branch (106:9): [True: 0, False: 14.6k]
  ------------------
  107|      0|        return 1;
  108|       |    /* degenerate case: a is zero */
  109|  14.6k|    if (BN_is_zero(a))
  ------------------
  |  Branch (109:9): [True: 0, False: 14.6k]
  ------------------
  110|      0|        return BN_set_word(a, w);
  111|       |    /* handle 'a' when negative */
  112|  14.6k|    if (a->neg) {
  ------------------
  |  Branch (112:9): [True: 0, False: 14.6k]
  ------------------
  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|  29.3k|    for (i = 0; w != 0 && i < a->top; i++) {
  ------------------
  |  Branch (119:17): [True: 14.6k, False: 14.6k]
  |  Branch (119:27): [True: 14.6k, False: 0]
  ------------------
  120|  14.6k|        a->d[i] = l = (a->d[i] + w) & BN_MASK2;
  ------------------
  |  |   77|  14.6k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  121|  14.6k|        w = (w > l) ? 1 : 0;
  ------------------
  |  Branch (121:13): [True: 0, False: 14.6k]
  ------------------
  122|  14.6k|    }
  123|  14.6k|    if (w && i == a->top) {
  ------------------
  |  Branch (123:9): [True: 0, False: 14.6k]
  |  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|  14.6k|    bn_check_top(a);
  130|  14.6k|    return 1;
  131|  14.6k|}

ossl_bsearch:
   18|  1.18M|{
   19|  1.18M|    const char *base_ = base;
   20|  1.18M|    int l, h, i = 0, c = 0;
   21|  1.18M|    const char *p = NULL;
   22|       |
   23|  1.18M|    if (num == 0)
  ------------------
  |  Branch (23:9): [True: 0, False: 1.18M]
  ------------------
   24|      0|        return NULL;
   25|  1.18M|    l = 0;
   26|  1.18M|    h = num;
   27|  9.20M|    while (l < h) {
  ------------------
  |  Branch (27:12): [True: 8.82M, False: 383k]
  ------------------
   28|  8.82M|        i = l + (h - l) / 2;
   29|  8.82M|        p = &(base_[i * size]);
   30|  8.82M|        if (cmp_thunk != NULL)
  ------------------
  |  Branch (30:13): [True: 10.9k, False: 8.81M]
  ------------------
   31|  10.9k|            c = cmp_thunk((cmpthunk_fn)cmp, key, (const void *)p);
   32|  8.81M|        else
   33|  8.81M|            c = cmp(key, p);
   34|  8.82M|        if (c < 0)
  ------------------
  |  Branch (34:13): [True: 5.28M, False: 3.53M]
  ------------------
   35|  5.28M|            h = i;
   36|  3.53M|        else if (c > 0)
  ------------------
  |  Branch (36:18): [True: 2.73M, False: 799k]
  ------------------
   37|  2.73M|            l = i + 1;
   38|   799k|        else
   39|   799k|            break;
   40|  8.82M|    }
   41|  1.18M|    if (c != 0 && !(flags & OSSL_BSEARCH_VALUE_ON_NOMATCH))
  ------------------
  |  |  149|   383k|#define OSSL_BSEARCH_VALUE_ON_NOMATCH 0x01
  ------------------
  |  Branch (41:9): [True: 383k, False: 799k]
  |  Branch (41:19): [True: 383k, False: 0]
  ------------------
   42|   383k|        p = NULL;
   43|   799k|    else if (c == 0 && (flags & OSSL_BSEARCH_FIRST_VALUE_ON_MATCH)) {
  ------------------
  |  |  150|   799k|#define OSSL_BSEARCH_FIRST_VALUE_ON_MATCH 0x02
  ------------------
  |  Branch (43:14): [True: 799k, False: 0]
  |  Branch (43:24): [True: 14.5k, False: 785k]
  ------------------
   44|  14.5k|        while (i > 0) {
  ------------------
  |  Branch (44:16): [True: 3.62k, False: 10.9k]
  ------------------
   45|  3.62k|            if (cmp_thunk != NULL) {
  ------------------
  |  Branch (45:17): [True: 0, False: 3.62k]
  ------------------
   46|      0|                if (cmp_thunk((cmpthunk_fn)cmp, key, (const void *)&(base_[(i - 1) * size])))
  ------------------
  |  Branch (46:21): [True: 0, False: 0]
  ------------------
   47|      0|                    break;
   48|  3.62k|            } else {
   49|  3.62k|                if (cmp(key, &(base_[(i - 1) * size])))
  ------------------
  |  Branch (49:21): [True: 3.62k, False: 0]
  ------------------
   50|  3.62k|                    break;
   51|  3.62k|            }
   52|      0|            i--;
   53|      0|        }
   54|  14.5k|        p = &(base_[i * size]);
   55|  14.5k|    }
   56|  1.18M|    return p;
   57|  1.18M|}

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

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

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

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

COMP_zlib:
  310|      2|{
  311|      2|    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|      2|    return meth;
  319|      2|}

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

COMP_get_type:
   41|      2|{
   42|      2|    if (meth == NULL)
  ------------------
  |  Branch (42:9): [True: 2, False: 0]
  ------------------
   43|      2|        return NID_undef;
  ------------------
  |  |   18|      2|#define NID_undef                       0
  ------------------
   44|      0|    return meth->type;
   45|      2|}
COMP_CTX_free:
   55|  72.5k|{
   56|  72.5k|    if (ctx == NULL)
  ------------------
  |  Branch (56:9): [True: 72.5k, False: 0]
  ------------------
   57|  72.5k|        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);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   62|      0|}

ossl_load_builtin_compressions:
   29|      2|{
   30|      2|    STACK_OF(SSL_COMP) *comp_methods = NULL;
  ------------------
  |  |   33|      2|#define STACK_OF(type) struct stack_st_##type
  ------------------
   31|      2|#ifndef OPENSSL_NO_COMP
   32|      2|    SSL_COMP *comp = NULL;
   33|      2|    COMP_METHOD *method = COMP_zlib();
   34|       |
   35|      2|    comp_methods = sk_SSL_COMP_new(sk_comp_cmp);
  ------------------
  |  |   72|      2|#define sk_SSL_COMP_new(cmp) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new(ossl_check_SSL_COMP_compfunc_type(cmp)), sk_SSL_COMP_cmpfunc_thunk))
  ------------------
   36|       |
   37|      2|    if (COMP_get_type(method) != NID_undef && comp_methods != NULL) {
  ------------------
  |  |   18|      4|#define NID_undef                       0
  ------------------
  |  Branch (37:9): [True: 0, False: 2]
  |  Branch (37:47): [True: 0, False: 0]
  ------------------
   38|      0|        comp = OPENSSL_malloc(sizeof(*comp));
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#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);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   45|      0|        }
   46|      0|    }
   47|      2|#endif
   48|      2|    return comp_methods;
   49|      2|}

_CONF_free_data:
  137|      2|{
  138|      2|    if (conf == NULL)
  ------------------
  |  Branch (138:9): [True: 0, False: 2]
  ------------------
  139|      0|        return;
  140|       |
  141|      2|    OPENSSL_free(conf->includedir);
  ------------------
  |  |  132|      2|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  142|      2|    if (conf->data == NULL)
  ------------------
  |  Branch (142:9): [True: 2, False: 0]
  ------------------
  143|      2|        return;
  144|       |
  145|       |    /* evil thing to make sure the 'OPENSSL_free()' works as expected */
  146|      0|    lh_CONF_VALUE_set_down_load(conf->data, 0);
  ------------------
  |  |   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|      2|{
   88|      2|    return &default_method;
   89|      2|}
conf_def.c:def_create:
  112|      2|{
  113|      2|    CONF *ret;
  114|       |
  115|      2|    ret = OPENSSL_malloc(sizeof(*ret));
  ------------------
  |  |  107|      2|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  116|      2|    if (ret != NULL)
  ------------------
  |  Branch (116:9): [True: 2, False: 0]
  ------------------
  117|      2|        if (meth->init(ret) == 0) {
  ------------------
  |  Branch (117:13): [True: 0, False: 2]
  ------------------
  118|      0|            OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  119|       |            ret = NULL;
  120|      0|        }
  121|      2|    return ret;
  122|      2|}
conf_def.c:def_init_default:
  125|      2|{
  126|      2|    if (conf == NULL)
  ------------------
  |  Branch (126:9): [True: 0, False: 2]
  ------------------
  127|      0|        return 0;
  128|       |
  129|      2|    memset(conf, 0, sizeof(*conf));
  130|      2|    conf->meth = &default_method;
  131|      2|    conf->meth_data = (void *)CONF_type_default;
  132|       |
  133|      2|    return 1;
  134|      2|}
conf_def.c:def_destroy:
  151|      2|{
  152|      2|    if (def_destroy_data(conf)) {
  ------------------
  |  Branch (152:9): [True: 2, False: 0]
  ------------------
  153|      2|        OPENSSL_free(conf);
  ------------------
  |  |  132|      2|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  154|      2|        return 1;
  155|      2|    }
  156|      0|    return 0;
  157|      2|}
conf_def.c:def_destroy_data:
  160|      2|{
  161|      2|    if (conf == NULL)
  ------------------
  |  Branch (161:9): [True: 0, False: 2]
  ------------------
  162|      0|        return 0;
  163|      2|    _CONF_free_data(conf);
  164|      2|    return 1;
  165|      2|}
conf_def.c:def_load:
  168|      2|{
  169|      2|    int ret;
  170|      2|    BIO *in = NULL;
  171|       |
  172|       |#ifdef OPENSSL_SYS_VMS
  173|       |    in = BIO_new_file(name, "r");
  174|       |#else
  175|      2|    in = BIO_new_file(name, "rb");
  176|      2|#endif
  177|      2|    if (in == NULL) {
  ------------------
  |  Branch (177:9): [True: 2, False: 0]
  ------------------
  178|      2|        if (ERR_GET_REASON(ERR_peek_last_error()) == BIO_R_NO_SUCH_FILE)
  ------------------
  |  |   46|      2|#define BIO_R_NO_SUCH_FILE 128
  ------------------
  |  Branch (178:13): [True: 2, False: 0]
  ------------------
  179|      2|            ERR_raise(ERR_LIB_CONF, CONF_R_NO_SUCH_FILE);
  ------------------
  |  |  357|      2|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      2|    (ERR_new(),                                                  \
  |  |  |  |  360|      2|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      2|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      2|        ERR_set_error)
  |  |  ------------------
  ------------------
  180|      0|        else
  181|      2|            ERR_raise(ERR_LIB_CONF, ERR_R_SYS_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  182|      2|        return 0;
  183|      2|    }
  184|       |
  185|      0|    ret = def_load_bio(conf, in, line);
  186|      0|    BIO_free(in);
  187|       |
  188|      0|    return ret;
  189|      2|}

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

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

CONF_modules_load_file_ex:
  156|      2|{
  157|      2|    char *file = NULL;
  158|      2|    CONF *conf = NULL;
  159|      2|    int ret = 0, diagnostics = OSSL_LIB_CTX_get_conf_diagnostics(libctx);
  160|       |
  161|      2|    ERR_set_mark();
  162|       |
  163|      2|    if (filename == NULL) {
  ------------------
  |  Branch (163:9): [True: 2, False: 0]
  ------------------
  164|      2|        file = CONF_get1_default_config_file();
  165|      2|        if (file == NULL)
  ------------------
  |  Branch (165:13): [True: 0, False: 2]
  ------------------
  166|      0|            goto err;
  167|      2|        if (*file == '\0') {
  ------------------
  |  Branch (167:13): [True: 0, False: 2]
  ------------------
  168|       |            /* Do not try to load an empty file name but do not error out */
  169|      0|            ret = 1;
  170|      0|            goto err;
  171|      0|        }
  172|      2|    } else {
  173|      0|        file = (char *)filename;
  174|      0|    }
  175|       |
  176|      2|    conf = NCONF_new_ex(libctx, NULL);
  177|      2|    if (conf == NULL)
  ------------------
  |  Branch (177:9): [True: 0, False: 2]
  ------------------
  178|      0|        goto err;
  179|       |
  180|      2|    if (NCONF_load(conf, file, NULL) <= 0) {
  ------------------
  |  Branch (180:9): [True: 2, False: 0]
  ------------------
  181|      2|        if ((flags & CONF_MFLAGS_IGNORE_MISSING_FILE) && (ERR_GET_REASON(ERR_peek_last_error()) == CONF_R_NO_SUCH_FILE)) {
  ------------------
  |  |  114|      2|#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|      2|#define CONF_R_NO_SUCH_FILE 114
  ------------------
  |  Branch (181:13): [True: 2, False: 0]
  |  Branch (181:58): [True: 2, False: 0]
  ------------------
  182|      2|            ret = 1;
  183|      2|        }
  184|      2|        goto err;
  185|      2|    }
  186|       |
  187|      0|    ret = CONF_modules_load(conf, appname, flags);
  188|       |    /* CONF_modules_load() might change the diagnostics setting, reread it. */
  189|      0|    diagnostics = OSSL_LIB_CTX_get_conf_diagnostics(libctx);
  190|       |
  191|      2|err:
  192|      2|    if (filename == NULL)
  ------------------
  |  Branch (192:9): [True: 2, False: 0]
  ------------------
  193|      2|        OPENSSL_free(file);
  ------------------
  |  |  132|      2|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  194|      2|    NCONF_free(conf);
  195|       |
  196|      2|    if ((flags & CONF_MFLAGS_IGNORE_RETURN_CODES) != 0 && !diagnostics)
  ------------------
  |  |  111|      2|#define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2
  ------------------
  |  Branch (196:9): [True: 2, False: 0]
  |  Branch (196:59): [True: 2, False: 0]
  ------------------
  197|      2|        ret = 1;
  198|       |
  199|      2|    if (ret > 0)
  ------------------
  |  Branch (199:9): [True: 2, False: 0]
  ------------------
  200|      2|        ERR_pop_to_mark();
  201|      0|    else
  202|      0|        ERR_clear_last_mark();
  203|       |
  204|      2|    return ret;
  205|      0|}
CONF_get1_default_config_file:
  646|      2|{
  647|      2|    const char *t;
  648|      2|    char *file, *sep = "";
  649|      2|    size_t size;
  650|       |
  651|      2|    if ((file = ossl_safe_getenv("OPENSSL_CONF")) != NULL)
  ------------------
  |  Branch (651:9): [True: 0, False: 2]
  ------------------
  652|      0|        return OPENSSL_strdup(file);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  653|       |
  654|      2|    t = X509_get_default_cert_area();
  655|       |    /*
  656|       |     * On windows systems with -DOSSL_WINCTX set, if the needed registry
  657|       |     * keys are not yet set, openssl applets will return, due to an inability
  658|       |     * to locate various directories, like the default cert area.  In that
  659|       |     * event, clone an empty string here, so that commands like openssl version
  660|       |     * continue to operate properly without needing to set OPENSSL_CONF.
  661|       |     * Applets like cms will fail gracefully later when they try to parse an
  662|       |     * empty config file
  663|       |     */
  664|      2|    if (t == NULL)
  ------------------
  |  Branch (664:9): [True: 0, False: 2]
  ------------------
  665|      0|        return OPENSSL_strdup("");
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  666|       |
  667|      2|#ifndef OPENSSL_SYS_VMS
  668|      2|    sep = "/";
  669|      2|#endif
  670|      2|    size = strlen(t) + strlen(sep) + strlen(OPENSSL_CONF) + 1;
  ------------------
  |  |   80|      2|#define OPENSSL_CONF "openssl.cnf"
  ------------------
  671|      2|    file = OPENSSL_malloc(size);
  ------------------
  |  |  107|      2|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  672|       |
  673|      2|    if (file == NULL)
  ------------------
  |  Branch (673:9): [True: 0, False: 2]
  ------------------
  674|      0|        return NULL;
  675|      2|    BIO_snprintf(file, size, "%s%s%s", t, sep, OPENSSL_CONF);
  ------------------
  |  |   80|      2|#define OPENSSL_CONF "openssl.cnf"
  ------------------
  676|       |
  677|      2|    return file;
  678|      2|}
CONF_parse_list:
  690|  51.5k|{
  691|  51.5k|    int ret;
  692|  51.5k|    const char *lstart, *tmpend, *p;
  693|       |
  694|  51.5k|    if (list_ == NULL) {
  ------------------
  |  Branch (694:9): [True: 0, False: 51.5k]
  ------------------
  695|      0|        ERR_raise(ERR_LIB_CONF, CONF_R_LIST_CANNOT_BE_NULL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  696|      0|        return 0;
  697|      0|    }
  698|       |
  699|  51.5k|    lstart = list_;
  700|   139k|    for (;;) {
  701|   139k|        if (nospc) {
  ------------------
  |  Branch (701:13): [True: 139k, False: 0]
  ------------------
  702|   169k|            while (*lstart && isspace((unsigned char)*lstart))
  ------------------
  |  Branch (702:20): [True: 169k, False: 0]
  |  Branch (702:31): [True: 29.4k, False: 139k]
  ------------------
  703|  29.4k|                lstart++;
  704|   139k|        }
  705|   139k|        p = strchr(lstart, sep);
  706|   139k|        if (p == lstart || *lstart == '\0')
  ------------------
  |  Branch (706:13): [True: 0, False: 139k]
  |  Branch (706:28): [True: 0, False: 139k]
  ------------------
  707|      0|            ret = list_cb(NULL, 0, arg);
  708|   139k|        else {
  709|   139k|            if (p)
  ------------------
  |  Branch (709:17): [True: 88.3k, False: 51.5k]
  ------------------
  710|  88.3k|                tmpend = p - 1;
  711|  51.5k|            else
  712|  51.5k|                tmpend = lstart + strlen(lstart) - 1;
  713|   139k|            if (nospc) {
  ------------------
  |  Branch (713:17): [True: 139k, False: 0]
  ------------------
  714|   139k|                while (isspace((unsigned char)*tmpend))
  ------------------
  |  Branch (714:24): [True: 29.4k, False: 139k]
  ------------------
  715|  29.4k|                    tmpend--;
  716|   139k|            }
  717|   139k|            ret = list_cb(lstart, (int)(tmpend - lstart + 1), arg);
  718|   139k|        }
  719|   139k|        if (ret <= 0)
  ------------------
  |  Branch (719:13): [True: 0, False: 139k]
  ------------------
  720|      0|            return ret;
  721|   139k|        if (p == NULL)
  ------------------
  |  Branch (721:13): [True: 51.5k, False: 88.3k]
  ------------------
  722|  51.5k|            return 1;
  723|  88.3k|        lstart = p + 1;
  724|  88.3k|    }
  725|  51.5k|}

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

conf_ssl_name_find:
  154|  7.36k|{
  155|  7.36k|    SSL_MODULE *ssl = md != NULL ? CONF_imodule_get_usr_data(md) : NULL;
  ------------------
  |  Branch (155:23): [True: 0, False: 7.36k]
  ------------------
  156|  7.36k|    const struct ssl_conf_name_st *nm;
  157|  7.36k|    size_t i;
  158|       |
  159|  7.36k|    if (ssl == NULL || ssl->names == NULL)
  ------------------
  |  Branch (159:9): [True: 7.36k, False: 0]
  |  Branch (159:24): [True: 0, False: 0]
  ------------------
  160|  7.36k|        return 0;
  161|       |
  162|      0|    for (i = 0, nm = ssl->names; i < ssl->names_count; i++, nm++) {
  ------------------
  |  Branch (162:34): [True: 0, False: 0]
  ------------------
  163|      0|        if (strcmp(nm->name, name) == 0) {
  ------------------
  |  Branch (163:13): [True: 0, False: 0]
  ------------------
  164|      0|            *idx = i;
  165|      0|            return 1;
  166|      0|        }
  167|      0|    }
  168|      0|    return 0;
  169|      0|}

ossl_lib_ctx_write_lock:
   59|     16|{
   60|     16|    if ((ctx = ossl_lib_ctx_get_concrete(ctx)) == NULL)
  ------------------
  |  Branch (60:9): [True: 0, False: 16]
  ------------------
   61|      0|        return 0;
   62|     16|    return CRYPTO_THREAD_write_lock(ctx->lock);
   63|     16|}
ossl_lib_ctx_read_lock:
   66|    391|{
   67|    391|    if ((ctx = ossl_lib_ctx_get_concrete(ctx)) == NULL)
  ------------------
  |  Branch (67:9): [True: 0, False: 391]
  ------------------
   68|      0|        return 0;
   69|    391|    return CRYPTO_THREAD_read_lock(ctx->lock);
   70|    391|}
ossl_lib_ctx_unlock:
   73|    407|{
   74|    407|    if ((ctx = ossl_lib_ctx_get_concrete(ctx)) == NULL)
  ------------------
  |  Branch (74:9): [True: 0, False: 407]
  ------------------
   75|      0|        return 0;
   76|    407|    return CRYPTO_THREAD_unlock(ctx->lock);
   77|    407|}
OSSL_LIB_CTX_free:
  536|  7.46k|{
  537|  7.46k|    if (ctx == NULL || ossl_lib_ctx_is_default_nocreate(ctx))
  ------------------
  |  Branch (537:9): [True: 7.46k, False: 0]
  |  Branch (537:24): [True: 0, False: 0]
  ------------------
  538|  7.46k|        return;
  539|       |
  540|      0|#ifndef FIPS_MODULE
  541|      0|    if (ctx->ischild)
  ------------------
  |  Branch (541:9): [True: 0, False: 0]
  ------------------
  542|      0|        ossl_provider_deinit_child(ctx);
  543|      0|#endif
  544|      0|    context_deinit(ctx);
  545|      0|    OPENSSL_free(ctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  546|      0|}
OSSL_LIB_CTX_get0_global_default:
  550|  7.36k|{
  551|  7.36k|    if (!RUN_ONCE(&default_context_thread_key_init, default_context_do_thread_key_init))
  ------------------
  |  |  130|  7.36k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 7.36k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (551:9): [True: 0, False: 7.36k]
  ------------------
  552|      0|        return NULL;
  553|       |
  554|  7.36k|    if (!RUN_ONCE(&default_context_init, default_context_do_init))
  ------------------
  |  |  130|  7.36k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 7.36k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (554:9): [True: 0, False: 7.36k]
  ------------------
  555|      0|        return NULL;
  556|       |
  557|  7.36k|    return &default_context_int;
  558|  7.36k|}
OSSL_LIB_CTX_set0_default:
  561|  7.36k|{
  562|  7.36k|    OSSL_LIB_CTX *current_defctx;
  563|       |
  564|  7.36k|    if ((current_defctx = get_default_context()) != NULL) {
  ------------------
  |  Branch (564:9): [True: 7.36k, False: 0]
  ------------------
  565|  7.36k|        if (libctx != NULL)
  ------------------
  |  Branch (565:13): [True: 0, False: 7.36k]
  ------------------
  566|      0|            set_default_context(libctx);
  567|  7.36k|        return current_defctx;
  568|  7.36k|    }
  569|       |
  570|      0|    return NULL;
  571|  7.36k|}
ossl_lib_ctx_get_concrete:
  584|  4.87M|{
  585|  4.87M|#ifndef FIPS_MODULE
  586|  4.87M|    if (ctx == NULL)
  ------------------
  |  Branch (586:9): [True: 3.50M, False: 1.36M]
  ------------------
  587|  3.50M|        return get_default_context();
  588|  1.36M|#endif
  589|  1.36M|    return ctx;
  590|  4.87M|}
ossl_lib_ctx_is_default:
  593|   169k|{
  594|   169k|#ifndef FIPS_MODULE
  595|   169k|    if (ctx == NULL || ctx == get_default_context())
  ------------------
  |  Branch (595:9): [True: 132k, False: 36.8k]
  |  Branch (595:24): [True: 36.8k, False: 0]
  ------------------
  596|   169k|        return 1;
  597|      0|#endif
  598|      0|    return 0;
  599|   169k|}
ossl_lib_ctx_is_global_default:
  611|   117k|{
  612|   117k|#ifndef FIPS_MODULE
  613|   117k|    if (ossl_lib_ctx_get_concrete(ctx) == &default_context_int)
  ------------------
  |  Branch (613:9): [True: 117k, False: 0]
  ------------------
  614|   117k|        return 1;
  615|      0|#endif
  616|      0|    return 0;
  617|   117k|}
ossl_lib_ctx_get_data:
  620|  3.88M|{
  621|  3.88M|    ctx = ossl_lib_ctx_get_concrete(ctx);
  622|  3.88M|    if (ctx == NULL)
  ------------------
  |  Branch (622:9): [True: 0, False: 3.88M]
  ------------------
  623|      0|        return NULL;
  624|       |
  625|  3.88M|    switch (index) {
  626|  1.03k|    case OSSL_LIB_CTX_PROPERTY_STRING_INDEX:
  ------------------
  |  |   98|  1.03k|#define OSSL_LIB_CTX_PROPERTY_STRING_INDEX 3
  ------------------
  |  Branch (626:5): [True: 1.03k, False: 3.88M]
  ------------------
  627|  1.03k|        return ctx->property_string_data;
  628|  1.60M|    case OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX:
  ------------------
  |  |   95|  1.60M|#define OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX 0
  ------------------
  |  Branch (628:5): [True: 1.60M, False: 2.28M]
  ------------------
  629|  1.60M|        return ctx->evp_method_store;
  630|   132k|    case OSSL_LIB_CTX_PROVIDER_STORE_INDEX:
  ------------------
  |  |   96|   132k|#define OSSL_LIB_CTX_PROVIDER_STORE_INDEX 1
  ------------------
  |  Branch (630:5): [True: 132k, False: 3.75M]
  ------------------
  631|   132k|        return ctx->provider_store;
  632|  1.96M|    case OSSL_LIB_CTX_NAMEMAP_INDEX:
  ------------------
  |  |   99|  1.96M|#define OSSL_LIB_CTX_NAMEMAP_INDEX 4
  ------------------
  |  Branch (632:5): [True: 1.96M, False: 1.92M]
  ------------------
  633|  1.96M|        return ctx->namemap;
  634|    407|    case OSSL_LIB_CTX_PROPERTY_DEFN_INDEX:
  ------------------
  |  |   97|    407|#define OSSL_LIB_CTX_PROPERTY_DEFN_INDEX 2
  ------------------
  |  Branch (634:5): [True: 407, False: 3.88M]
  ------------------
  635|    407|        return ctx->property_defns;
  636|     64|    case OSSL_LIB_CTX_GLOBAL_PROPERTIES:
  ------------------
  |  |  111|     64|#define OSSL_LIB_CTX_GLOBAL_PROPERTIES 14
  ------------------
  |  Branch (636:5): [True: 64, False: 3.88M]
  ------------------
  637|     64|        return ctx->global_properties;
  638|   149k|    case OSSL_LIB_CTX_DRBG_INDEX:
  ------------------
  |  |  100|   149k|#define OSSL_LIB_CTX_DRBG_INDEX 5
  ------------------
  |  Branch (638:5): [True: 149k, False: 3.73M]
  ------------------
  639|   149k|        return ctx->drbg;
  640|      0|    case OSSL_LIB_CTX_DRBG_NONCE_INDEX:
  ------------------
  |  |  101|      0|#define OSSL_LIB_CTX_DRBG_NONCE_INDEX 6
  ------------------
  |  Branch (640:5): [True: 0, False: 3.88M]
  ------------------
  641|      0|        return ctx->drbg_nonce;
  642|      0|#ifndef FIPS_MODULE
  643|      0|    case OSSL_LIB_CTX_PROVIDER_CONF_INDEX:
  ------------------
  |  |  113|      0|#define OSSL_LIB_CTX_PROVIDER_CONF_INDEX 16
  ------------------
  |  Branch (643:5): [True: 0, False: 3.88M]
  ------------------
  644|      0|        return ctx->provider_conf;
  645|      0|    case OSSL_LIB_CTX_BIO_CORE_INDEX:
  ------------------
  |  |  114|      0|#define OSSL_LIB_CTX_BIO_CORE_INDEX 17
  ------------------
  |  Branch (645:5): [True: 0, False: 3.88M]
  ------------------
  646|      0|        return ctx->bio_core;
  647|      0|    case OSSL_LIB_CTX_CHILD_PROVIDER_INDEX:
  ------------------
  |  |  115|      0|#define OSSL_LIB_CTX_CHILD_PROVIDER_INDEX 18
  ------------------
  |  Branch (647:5): [True: 0, False: 3.88M]
  ------------------
  648|      0|        return ctx->child_provider;
  649|     92|    case OSSL_LIB_CTX_DECODER_STORE_INDEX:
  ------------------
  |  |  108|     92|#define OSSL_LIB_CTX_DECODER_STORE_INDEX 11
  ------------------
  |  Branch (649:5): [True: 92, False: 3.88M]
  ------------------
  650|     92|        return ctx->decoder_store;
  651|  14.6k|    case OSSL_LIB_CTX_DECODER_CACHE_INDEX:
  ------------------
  |  |  117|  14.6k|#define OSSL_LIB_CTX_DECODER_CACHE_INDEX 20
  ------------------
  |  Branch (651:5): [True: 14.6k, False: 3.87M]
  ------------------
  652|  14.6k|        return ctx->decoder_cache;
  653|      0|    case OSSL_LIB_CTX_ENCODER_STORE_INDEX:
  ------------------
  |  |  107|      0|#define OSSL_LIB_CTX_ENCODER_STORE_INDEX 10
  ------------------
  |  Branch (653:5): [True: 0, False: 3.88M]
  ------------------
  654|      0|        return ctx->encoder_store;
  655|      0|    case OSSL_LIB_CTX_STORE_LOADER_STORE_INDEX:
  ------------------
  |  |  112|      0|#define OSSL_LIB_CTX_STORE_LOADER_STORE_INDEX 15
  ------------------
  |  Branch (655:5): [True: 0, False: 3.88M]
  ------------------
  656|      0|        return ctx->store_loader_store;
  657|      0|    case OSSL_LIB_CTX_SELF_TEST_CB_INDEX:
  ------------------
  |  |  109|      0|#define OSSL_LIB_CTX_SELF_TEST_CB_INDEX 12
  ------------------
  |  Branch (657:5): [True: 0, False: 3.88M]
  ------------------
  658|      0|        return ctx->self_test_cb;
  659|      0|    case OSSL_LIB_CTX_INDICATOR_CB_INDEX:
  ------------------
  |  |  119|      0|#define OSSL_LIB_CTX_INDICATOR_CB_INDEX 22
  ------------------
  |  Branch (659:5): [True: 0, False: 3.88M]
  ------------------
  660|      0|        return ctx->indicator_cb;
  661|      0|#endif
  662|      0|#ifndef OPENSSL_NO_THREAD_POOL
  663|      0|    case OSSL_LIB_CTX_THREAD_INDEX:
  ------------------
  |  |  116|      0|#define OSSL_LIB_CTX_THREAD_INDEX 19
  ------------------
  |  Branch (663:5): [True: 0, False: 3.88M]
  ------------------
  664|      0|        return ctx->threads;
  665|      0|#endif
  666|       |
  667|       |#ifdef FIPS_MODULE
  668|       |    case OSSL_LIB_CTX_FIPS_PROV_INDEX:
  669|       |        return ctx->fips_prov;
  670|       |#endif
  671|       |
  672|  7.36k|    case OSSL_LIB_CTX_COMP_METHODS:
  ------------------
  |  |  118|  7.36k|#define OSSL_LIB_CTX_COMP_METHODS 21
  ------------------
  |  Branch (672:5): [True: 7.36k, False: 3.88M]
  ------------------
  673|  7.36k|        return (void *)&ctx->comp_methods;
  674|       |
  675|  14.7k|    case OSSL_LIB_CTX_SSL_CONF_IMODULE:
  ------------------
  |  |  120|  14.7k|#define OSSL_LIB_CTX_SSL_CONF_IMODULE 23
  ------------------
  |  Branch (675:5): [True: 14.7k, False: 3.87M]
  ------------------
  676|  14.7k|        return (void *)ctx->ssl_imod;
  677|       |
  678|      0|    default:
  ------------------
  |  Branch (678:5): [True: 0, False: 3.88M]
  ------------------
  679|       |        return NULL;
  680|  3.88M|    }
  681|  3.88M|}
OSSL_LIB_CTX_get_data:
  684|  22.0k|{
  685|  22.0k|    return ossl_lib_ctx_get_data(ctx, index);
  686|  22.0k|}
ossl_lib_ctx_get_ex_data_global:
  689|   640k|{
  690|   640k|    ctx = ossl_lib_ctx_get_concrete(ctx);
  691|   640k|    if (ctx == NULL)
  ------------------
  |  Branch (691:9): [True: 0, False: 640k]
  ------------------
  692|      0|        return NULL;
  693|   640k|    return &ctx->global;
  694|   640k|}
ossl_lib_ctx_get_descriptor:
  697|   117k|{
  698|       |#ifdef FIPS_MODULE
  699|       |    return "FIPS internal library context";
  700|       |#else
  701|   117k|    if (ossl_lib_ctx_is_global_default(libctx))
  ------------------
  |  Branch (701:9): [True: 117k, False: 0]
  ------------------
  702|   117k|        return "Global default library context";
  703|      0|    if (ossl_lib_ctx_is_default(libctx))
  ------------------
  |  Branch (703:9): [True: 0, False: 0]
  ------------------
  704|      0|        return "Thread-local default library context";
  705|      0|    return "Non-default library context";
  706|      0|#endif
  707|      0|}
OSSL_LIB_CTX_get_conf_diagnostics:
  710|      2|{
  711|      2|    libctx = ossl_lib_ctx_get_concrete(libctx);
  712|      2|    if (libctx == NULL)
  ------------------
  |  Branch (712:9): [True: 0, False: 2]
  ------------------
  713|      0|        return 0;
  714|      2|    return libctx->conf_diagnostics;
  715|      2|}
context.c:context_init:
  119|      2|{
  120|      2|    int exdata_done = 0;
  121|       |
  122|      2|    ctx->lock = CRYPTO_THREAD_lock_new();
  123|      2|    if (ctx->lock == NULL)
  ------------------
  |  Branch (123:9): [True: 0, False: 2]
  ------------------
  124|      0|        goto err;
  125|       |
  126|       |    /* Initialize ex_data. */
  127|      2|    if (!ossl_do_ex_data_init(ctx))
  ------------------
  |  Branch (127:9): [True: 0, False: 2]
  ------------------
  128|      0|        goto err;
  129|      2|    exdata_done = 1;
  130|       |
  131|       |    /* P2. We want evp_method_store to be cleaned up before the provider store */
  132|      2|    ctx->evp_method_store = ossl_method_store_new(ctx);
  133|      2|    if (ctx->evp_method_store == NULL)
  ------------------
  |  Branch (133:9): [True: 0, False: 2]
  ------------------
  134|      0|        goto err;
  135|      2|    OSSL_TRACE1(QUERY, "context_init: allocating store %p\n", ctx->evp_method_store);
  ------------------
  |  |  291|      2|    OSSL_TRACEV(category, (trc_out, format, arg1))
  |  |  ------------------
  |  |  |  |  283|      2|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  136|       |
  137|      2|#ifndef FIPS_MODULE
  138|       |    /* P2. Must be freed before the provider store is freed */
  139|      2|    ctx->provider_conf = ossl_prov_conf_ctx_new(ctx);
  140|      2|    if (ctx->provider_conf == NULL)
  ------------------
  |  Branch (140:9): [True: 0, False: 2]
  ------------------
  141|      0|        goto err;
  142|      2|#endif
  143|       |
  144|       |    /* P2. */
  145|      2|    ctx->drbg = ossl_rand_ctx_new(ctx);
  146|      2|    if (ctx->drbg == NULL)
  ------------------
  |  Branch (146:9): [True: 0, False: 2]
  ------------------
  147|      0|        goto err;
  148|       |
  149|      2|#ifndef FIPS_MODULE
  150|       |    /*
  151|       |     * P2. We want decoder_store/decoder_cache to be cleaned up before the
  152|       |     * provider store
  153|       |     */
  154|      2|    ctx->decoder_store = ossl_method_store_new(ctx);
  155|      2|    if (ctx->decoder_store == NULL)
  ------------------
  |  Branch (155:9): [True: 0, False: 2]
  ------------------
  156|      0|        goto err;
  157|      2|    ctx->decoder_cache = ossl_decoder_cache_new(ctx);
  158|      2|    if (ctx->decoder_cache == NULL)
  ------------------
  |  Branch (158:9): [True: 0, False: 2]
  ------------------
  159|      0|        goto err;
  160|       |
  161|       |    /* P2. We want encoder_store to be cleaned up before the provider store */
  162|      2|    ctx->encoder_store = ossl_method_store_new(ctx);
  163|      2|    if (ctx->encoder_store == NULL)
  ------------------
  |  Branch (163:9): [True: 0, False: 2]
  ------------------
  164|      0|        goto err;
  165|       |
  166|       |    /* P2. We want loader_store to be cleaned up before the provider store */
  167|      2|    ctx->store_loader_store = ossl_method_store_new(ctx);
  168|      2|    if (ctx->store_loader_store == NULL)
  ------------------
  |  Branch (168:9): [True: 0, False: 2]
  ------------------
  169|      0|        goto err;
  170|      2|#endif
  171|       |
  172|       |    /* P1. Needs to be freed before the child provider data is freed */
  173|      2|    ctx->provider_store = ossl_provider_store_new(ctx);
  174|      2|    if (ctx->provider_store == NULL)
  ------------------
  |  Branch (174:9): [True: 0, False: 2]
  ------------------
  175|      0|        goto err;
  176|       |
  177|       |    /* Default priority. */
  178|      2|    ctx->property_string_data = ossl_property_string_data_new(ctx);
  179|      2|    if (ctx->property_string_data == NULL)
  ------------------
  |  Branch (179:9): [True: 0, False: 2]
  ------------------
  180|      0|        goto err;
  181|       |
  182|      2|    ctx->namemap = ossl_stored_namemap_new(ctx);
  183|      2|    if (ctx->namemap == NULL)
  ------------------
  |  Branch (183:9): [True: 0, False: 2]
  ------------------
  184|      0|        goto err;
  185|       |
  186|      2|    ctx->property_defns = ossl_property_defns_new(ctx);
  187|      2|    if (ctx->property_defns == NULL)
  ------------------
  |  Branch (187:9): [True: 0, False: 2]
  ------------------
  188|      0|        goto err;
  189|       |
  190|      2|    ctx->global_properties = ossl_ctx_global_properties_new(ctx);
  191|      2|    if (ctx->global_properties == NULL)
  ------------------
  |  Branch (191:9): [True: 0, False: 2]
  ------------------
  192|      0|        goto err;
  193|       |
  194|      2|#ifndef FIPS_MODULE
  195|      2|    ctx->bio_core = ossl_bio_core_globals_new(ctx);
  196|      2|    if (ctx->bio_core == NULL)
  ------------------
  |  Branch (196:9): [True: 0, False: 2]
  ------------------
  197|      0|        goto err;
  198|      2|#endif
  199|       |
  200|      2|    ctx->drbg_nonce = ossl_prov_drbg_nonce_ctx_new(ctx);
  201|      2|    if (ctx->drbg_nonce == NULL)
  ------------------
  |  Branch (201:9): [True: 0, False: 2]
  ------------------
  202|      0|        goto err;
  203|       |
  204|      2|#ifndef FIPS_MODULE
  205|      2|    ctx->self_test_cb = ossl_self_test_set_callback_new(ctx);
  206|      2|    if (ctx->self_test_cb == NULL)
  ------------------
  |  Branch (206:9): [True: 0, False: 2]
  ------------------
  207|      0|        goto err;
  208|      2|    ctx->indicator_cb = ossl_indicator_set_callback_new(ctx);
  209|      2|    if (ctx->indicator_cb == NULL)
  ------------------
  |  Branch (209:9): [True: 0, False: 2]
  ------------------
  210|      0|        goto err;
  211|      2|#endif
  212|       |
  213|       |#ifdef FIPS_MODULE
  214|       |    if (!ossl_thread_event_ctx_new(ctx))
  215|       |        goto err;
  216|       |
  217|       |    ctx->fips_prov = ossl_fips_prov_ossl_ctx_new(ctx);
  218|       |    if (ctx->fips_prov == NULL)
  219|       |        goto err;
  220|       |#endif
  221|       |
  222|      2|#ifndef OPENSSL_NO_THREAD_POOL
  223|      2|    ctx->threads = ossl_threads_ctx_new(ctx);
  224|      2|    if (ctx->threads == NULL)
  ------------------
  |  Branch (224:9): [True: 0, False: 2]
  ------------------
  225|      0|        goto err;
  226|      2|#endif
  227|       |
  228|       |    /* Low priority. */
  229|      2|#ifndef FIPS_MODULE
  230|      2|    ctx->child_provider = ossl_child_prov_ctx_new(ctx);
  231|      2|    if (ctx->child_provider == NULL)
  ------------------
  |  Branch (231:9): [True: 0, False: 2]
  ------------------
  232|      0|        goto err;
  233|      2|#endif
  234|       |
  235|       |    /* Everything depends on properties, so we also pre-initialise that */
  236|      2|    if (!ossl_property_parse_init(ctx))
  ------------------
  |  Branch (236:9): [True: 0, False: 2]
  ------------------
  237|      0|        goto err;
  238|       |
  239|      2|#ifndef FIPS_MODULE
  240|      2|    ctx->comp_methods = ossl_load_builtin_compressions();
  241|      2|#endif
  242|       |
  243|      2|    return 1;
  244|       |
  245|      0|err:
  246|      0|    context_deinit_objs(ctx);
  247|       |
  248|      0|    if (exdata_done)
  ------------------
  |  Branch (248:9): [True: 0, False: 0]
  ------------------
  249|      0|        ossl_crypto_cleanup_all_ex_data_int(ctx);
  250|       |
  251|      0|    CRYPTO_THREAD_lock_free(ctx->lock);
  252|      0|    memset(ctx, '\0', sizeof(*ctx));
  253|      0|    return 0;
  254|      2|}
context.c:default_context_do_thread_key_init:
  414|      2|{
  415|      2|    if (!CRYPTO_THREAD_init_local(&default_context_thread_local, NULL))
  ------------------
  |  Branch (415:9): [True: 0, False: 2]
  ------------------
  416|      0|        return 0;
  417|      2|    return 1;
  418|      2|}
context.c:default_context_do_init:
  421|      2|{
  422|      2|    if (!context_init(&default_context_int))
  ------------------
  |  Branch (422:9): [True: 0, False: 2]
  ------------------
  423|      0|        return 0;
  424|       |
  425|      2|    default_context_inited = 1;
  426|      2|    return 1;
  427|      2|}
context.c:get_default_context:
  458|  3.55M|{
  459|  3.55M|    OSSL_LIB_CTX *current_defctx = get_thread_default_context();
  460|       |
  461|  3.55M|    if (current_defctx == NULL && default_context_inited)
  ------------------
  |  Branch (461:9): [True: 3.55M, False: 0]
  |  Branch (461:35): [True: 3.55M, False: 0]
  ------------------
  462|  3.55M|        current_defctx = &default_context_int;
  463|  3.55M|    return current_defctx;
  464|  3.55M|}
context.c:get_thread_default_context:
  439|  3.55M|{
  440|  3.55M|    if (!RUN_ONCE(&default_context_thread_key_init, default_context_do_thread_key_init))
  ------------------
  |  |  130|  3.55M|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 3.55M, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (440:9): [True: 0, False: 3.55M]
  ------------------
  441|      0|        return NULL;
  442|       |
  443|  3.55M|    if (!RUN_ONCE(&default_context_init, default_context_do_init))
  ------------------
  |  |  130|  3.55M|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 3.55M, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (443:9): [True: 0, False: 3.55M]
  ------------------
  444|      0|        return NULL;
  445|       |
  446|  3.55M|    return CRYPTO_THREAD_get_local(&default_context_thread_local);
  447|  3.55M|}

ossl_algorithm_do_all:
  149|   117k|{
  150|   117k|    struct algorithm_data_st cbdata = {
  151|   117k|        0,
  152|   117k|    };
  153|       |
  154|   117k|    cbdata.libctx = libctx;
  155|   117k|    cbdata.operation_id = operation_id;
  156|   117k|    cbdata.pre = pre;
  157|   117k|    cbdata.reserve_store = reserve_store;
  158|   117k|    cbdata.fn = fn;
  159|   117k|    cbdata.unreserve_store = unreserve_store;
  160|   117k|    cbdata.post = post;
  161|   117k|    cbdata.data = data;
  162|       |
  163|   117k|    if (provider == NULL) {
  ------------------
  |  Branch (163:9): [True: 117k, False: 0]
  ------------------
  164|   117k|        ossl_provider_doall_activated(libctx, algorithm_do_this, &cbdata);
  165|   117k|    } else {
  166|      0|        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|      0|        if (!ossl_assert(ossl_lib_ctx_get_concrete(libctx)
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (173:13): [True: 0, False: 0]
  ------------------
  174|      0|                == ossl_lib_ctx_get_concrete(libctx2)))
  175|      0|            return;
  176|       |
  177|      0|        cbdata.libctx = libctx2;
  178|      0|        algorithm_do_this(provider, &cbdata);
  179|      0|    }
  180|   117k|}
ossl_algorithm_get1_first_name:
  183|    391|{
  184|    391|    const char *first_name_end = NULL;
  185|    391|    size_t first_name_len = 0;
  186|    391|    char *ret;
  187|       |
  188|    391|    if (algo->algorithm_names == NULL)
  ------------------
  |  Branch (188:9): [True: 0, False: 391]
  ------------------
  189|      0|        return NULL;
  190|       |
  191|    391|    first_name_end = strchr(algo->algorithm_names, ':');
  192|    391|    if (first_name_end == NULL)
  ------------------
  |  Branch (192:9): [True: 184, False: 207]
  ------------------
  193|    184|        first_name_len = strlen(algo->algorithm_names);
  194|    207|    else
  195|    207|        first_name_len = first_name_end - algo->algorithm_names;
  196|       |
  197|    391|    ret = OPENSSL_strndup(algo->algorithm_names, first_name_len);
  ------------------
  |  |  138|    391|    CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  198|    391|    return ret;
  199|    391|}
core_algorithm.c:algorithm_do_this:
  103|   117k|{
  104|   117k|    struct algorithm_data_st *data = cbdata;
  105|   117k|    int first_operation = 1;
  106|   117k|    int last_operation = OSSL_OP__HIGHEST;
  ------------------
  |  |  299|   117k|#define OSSL_OP__HIGHEST 22
  ------------------
  107|   117k|    int cur_operation;
  108|   117k|    int ok = 1;
  109|       |
  110|   117k|    if (data->operation_id != 0)
  ------------------
  |  Branch (110:9): [True: 117k, False: 0]
  ------------------
  111|   117k|        first_operation = last_operation = data->operation_id;
  112|       |
  113|   117k|    for (cur_operation = first_operation;
  114|   235k|        cur_operation <= last_operation;
  ------------------
  |  Branch (114:9): [True: 117k, False: 117k]
  ------------------
  115|   117k|        cur_operation++) {
  116|   117k|        int no_store = 0; /* Assume caching is ok */
  117|   117k|        const OSSL_ALGORITHM *map = NULL;
  118|   117k|        int ret = 0;
  119|       |
  120|   117k|        map = ossl_provider_query_operation(provider, cur_operation,
  121|   117k|            &no_store);
  122|   117k|        ret = algorithm_do_map(provider, map, cur_operation, no_store, data);
  123|   117k|        ossl_provider_unquery_operation(provider, cur_operation, map);
  124|       |
  125|   117k|        if (ret < 0)
  ------------------
  |  Branch (125:13): [True: 0, False: 117k]
  ------------------
  126|       |            /* Hard error, bail out immediately! */
  127|      0|            return 0;
  128|       |
  129|       |        /* If post-condition not fulfilled, set general failure */
  130|   117k|        if (!ret)
  ------------------
  |  Branch (130:13): [True: 0, False: 117k]
  ------------------
  131|      0|            ok = 0;
  132|   117k|    }
  133|       |
  134|   117k|    return ok;
  135|   117k|}
core_algorithm.c:algorithm_do_map:
   44|   117k|{
   45|   117k|    struct algorithm_data_st *data = cbdata;
   46|   117k|    int ret = 0;
   47|       |
   48|   117k|    if (!data->reserve_store(no_store, data->data))
  ------------------
  |  Branch (48:9): [True: 0, False: 117k]
  ------------------
   49|       |        /* Error, bail out! */
   50|      0|        return -1;
   51|       |
   52|       |    /* Do we fulfill pre-conditions? */
   53|   117k|    if (data->pre == NULL) {
  ------------------
  |  Branch (53:9): [True: 0, False: 117k]
  ------------------
   54|       |        /* If there is no pre-condition function, assume "yes" */
   55|      0|        ret = 1;
   56|   117k|    } else if (!data->pre(provider, cur_operation, no_store, data->data,
  ------------------
  |  Branch (56:16): [True: 0, False: 117k]
  ------------------
   57|   117k|                   &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|   117k|    if (ret == 0) {
  ------------------
  |  Branch (68:9): [True: 117k, False: 10]
  ------------------
   69|   117k|        ret = 1;
   70|   117k|        goto end;
   71|   117k|    }
   72|       |
   73|     10|    if (map != NULL) {
  ------------------
  |  Branch (73:9): [True: 10, False: 0]
  ------------------
   74|     10|        const OSSL_ALGORITHM *thismap;
   75|       |
   76|    401|        for (thismap = map; thismap->algorithm_names != NULL; thismap++)
  ------------------
  |  Branch (76:29): [True: 391, False: 10]
  ------------------
   77|    391|            data->fn(provider, thismap, no_store, data->data);
   78|     10|    }
   79|       |
   80|       |    /* Do we fulfill post-conditions? */
   81|     10|    if (data->post == NULL) {
  ------------------
  |  Branch (81:9): [True: 0, False: 10]
  ------------------
   82|       |        /* If there is no post-condition function, assume "yes" */
   83|      0|        ret = 1;
   84|     10|    } else if (!data->post(provider, cur_operation, no_store, data->data,
  ------------------
  |  Branch (84:16): [True: 0, False: 10]
  ------------------
   85|     10|                   &ret)) {
   86|       |        /* Error, bail out! */
   87|      0|        ret = -1;
   88|      0|    }
   89|       |
   90|   117k|end:
   91|   117k|    data->unreserve_store(data->data);
   92|       |
   93|   117k|    return ret;
   94|     10|}

ossl_method_construct:
  137|   117k|{
  138|   117k|    void *method = NULL;
  139|   117k|    OSSL_PROVIDER *provider = provider_rw != NULL ? *provider_rw : NULL;
  ------------------
  |  Branch (139:31): [True: 117k, False: 0]
  ------------------
  140|   117k|    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|   117k|    cbdata.store = NULL;
  154|   117k|    cbdata.force_store = force_store;
  155|   117k|    cbdata.mcm = mcm;
  156|   117k|    cbdata.mcm_data = mcm_data;
  157|   117k|    ossl_algorithm_do_all(libctx, operation_id, provider,
  158|   117k|        ossl_method_construct_precondition,
  159|   117k|        ossl_method_construct_reserve_store,
  160|   117k|        ossl_method_construct_this,
  161|   117k|        ossl_method_construct_unreserve_store,
  162|   117k|        ossl_method_construct_postcondition,
  163|   117k|        &cbdata);
  164|       |
  165|       |    /* If there is a temporary store, try there first */
  166|   117k|    if (cbdata.store != NULL)
  ------------------
  |  Branch (166:9): [True: 0, False: 117k]
  ------------------
  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|   117k|    if (method == NULL)
  ------------------
  |  Branch (171:9): [True: 117k, False: 0]
  ------------------
  172|   117k|        method = mcm->get(NULL, (const OSSL_PROVIDER **)provider_rw, mcm_data);
  173|       |
  174|   117k|    return method;
  175|   117k|}
core_fetch.c:ossl_method_construct_precondition:
   63|   117k|{
   64|   117k|    if (!ossl_assert(result != NULL)) {
  ------------------
  |  |   52|   117k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   117k|    __FILE__, __LINE__)
  ------------------
  |  Branch (64:9): [True: 0, False: 117k]
  ------------------
   65|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   66|      0|        return 0;
   67|      0|    }
   68|       |
   69|       |    /* Assume that no bits are set */
   70|   117k|    *result = 0;
   71|       |
   72|       |    /* No flag bits for temporary stores */
   73|   117k|    if (!is_temporary_method_store(no_store, cbdata)
  ------------------
  |  Branch (73:9): [True: 117k, False: 0]
  ------------------
   74|   117k|        && !ossl_provider_test_operation_bit(provider, operation_id, result))
  ------------------
  |  Branch (74:12): [True: 0, False: 117k]
  ------------------
   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|   117k|    *result = !*result;
   83|       |
   84|   117k|    return 1;
   85|   117k|}
core_fetch.c:is_temporary_method_store:
   29|   235k|{
   30|   235k|    struct construct_data_st *data = cbdata;
   31|       |
   32|   235k|    return no_store && !data->force_store;
  ------------------
  |  Branch (32:12): [True: 0, False: 235k]
  |  Branch (32:24): [True: 0, False: 0]
  ------------------
   33|   235k|}
core_fetch.c:ossl_method_construct_reserve_store:
   36|   117k|{
   37|   117k|    struct construct_data_st *data = cbdata;
   38|       |
   39|   117k|    if (is_temporary_method_store(no_store, data) && data->store == NULL) {
  ------------------
  |  Branch (39:9): [True: 0, False: 117k]
  |  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|   117k|    return data->mcm->lock_store(data->store, data->mcm_data);
   51|   117k|}
core_fetch.c:ossl_method_construct_this:
  106|    391|{
  107|    391|    struct construct_data_st *data = cbdata;
  108|    391|    void *method = NULL;
  109|       |
  110|    391|    if ((method = data->mcm->construct(algo, provider, data->mcm_data))
  ------------------
  |  Branch (110:9): [True: 0, False: 391]
  ------------------
  111|    391|        == NULL)
  112|      0|        return;
  113|       |
  114|    391|    OSSL_TRACE2(QUERY,
  ------------------
  |  |  293|    391|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  283|    391|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  115|    391|        "ossl_method_construct_this: putting an algo to the store %p with no_store %d\n",
  116|    391|        (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|    391|    data->mcm->put(no_store ? data->store : NULL, method, provider, algo->algorithm_names,
  ------------------
  |  Branch (127:20): [True: 0, False: 391]
  ------------------
  128|    391|        algo->property_definition, data->mcm_data);
  129|       |
  130|       |    /* refcnt-- because we're dropping the reference */
  131|    391|    data->mcm->destruct(method, data->mcm_data);
  132|    391|}
core_fetch.c:ossl_method_construct_unreserve_store:
   54|   117k|{
   55|   117k|    struct construct_data_st *data = cbdata;
   56|       |
   57|   117k|    return data->mcm->unlock_store(data->store, data->mcm_data);
   58|   117k|}
core_fetch.c:ossl_method_construct_postcondition:
   90|     10|{
   91|     10|    if (!ossl_assert(result != NULL)) {
  ------------------
  |  |   52|     10|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|     10|    __FILE__, __LINE__)
  ------------------
  |  Branch (91:9): [True: 0, False: 10]
  ------------------
   92|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   93|      0|        return 0;
   94|      0|    }
   95|       |
   96|     10|    *result = 1;
   97|       |
   98|       |    /* No flag bits for temporary stores */
   99|     10|    return is_temporary_method_store(no_store, cbdata)
  ------------------
  |  Branch (99:12): [True: 0, False: 10]
  ------------------
  100|     10|        || ossl_provider_set_operation_bit(provider, operation_id);
  ------------------
  |  Branch (100:12): [True: 10, False: 0]
  ------------------
  101|     10|}

ossl_stored_namemap_new:
   58|      2|{
   59|      2|    OSSL_NAMEMAP *namemap = ossl_namemap_new(libctx);
   60|       |
   61|      2|    if (namemap != NULL)
  ------------------
  |  Branch (61:9): [True: 2, False: 0]
  ------------------
   62|      2|        namemap->stored = 1;
   63|       |
   64|      2|    return namemap;
   65|      2|}
ossl_namemap_empty:
   84|  1.96M|{
   85|       |#ifdef TSAN_REQUIRES_LOCKING
   86|       |    /* No TSAN support */
   87|       |    int rv;
   88|       |
   89|       |    if (namemap == NULL)
   90|       |        return 1;
   91|       |
   92|       |    if (!CRYPTO_THREAD_read_lock(namemap->lock))
   93|       |        return -1;
   94|       |    rv = namemap->max_number == 0;
   95|       |    CRYPTO_THREAD_unlock(namemap->lock);
   96|       |    return rv;
   97|       |#else
   98|       |    /* Have TSAN support */
   99|  1.96M|    return namemap == NULL || tsan_load(&namemap->max_number) == 0;
  ------------------
  |  |   61|  1.96M|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
  |  Branch (99:12): [True: 0, False: 1.96M]
  |  Branch (99:31): [True: 1, False: 1.96M]
  ------------------
  100|  1.96M|#endif
  101|  1.96M|}
ossl_namemap_doall_names:
  111|  47.5k|{
  112|  47.5k|    int i;
  113|  47.5k|    NAMES *names;
  114|       |
  115|  47.5k|    if (namemap == NULL || number <= 0)
  ------------------
  |  Branch (115:9): [True: 0, False: 47.5k]
  |  Branch (115:28): [True: 0, False: 47.5k]
  ------------------
  116|      0|        return 0;
  117|       |
  118|       |    /*
  119|       |     * We duplicate the NAMES stack under a read lock. Subsequently we call
  120|       |     * the user function, so that we're not holding the read lock when in user
  121|       |     * code. This could lead to deadlocks.
  122|       |     */
  123|  47.5k|    if (!CRYPTO_THREAD_read_lock(namemap->lock))
  ------------------
  |  Branch (123:9): [True: 0, False: 47.5k]
  ------------------
  124|      0|        return 0;
  125|       |
  126|  47.5k|    names = sk_NAMES_value(namemap->numnames, number - 1);
  127|  47.5k|    if (names != NULL)
  ------------------
  |  Branch (127:9): [True: 47.5k, False: 0]
  ------------------
  128|  47.5k|        names = sk_OPENSSL_STRING_dup(names);
  ------------------
  |  |  278|  47.5k|#define sk_OPENSSL_STRING_dup(sk) ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_dup(ossl_check_const_OPENSSL_STRING_sk_type(sk)))
  ------------------
  129|       |
  130|  47.5k|    CRYPTO_THREAD_unlock(namemap->lock);
  131|       |
  132|  47.5k|    if (names == NULL)
  ------------------
  |  Branch (132:9): [True: 0, False: 47.5k]
  ------------------
  133|      0|        return 0;
  134|       |
  135|   164k|    for (i = 0; i < sk_OPENSSL_STRING_num(names); i++)
  ------------------
  |  |  256|   164k|#define sk_OPENSSL_STRING_num(sk) OPENSSL_sk_num(ossl_check_const_OPENSSL_STRING_sk_type(sk))
  ------------------
  |  Branch (135:17): [True: 116k, False: 47.5k]
  ------------------
  136|   116k|        fn(sk_OPENSSL_STRING_value(names, i), data);
  ------------------
  |  |  257|   116k|#define sk_OPENSSL_STRING_value(sk, idx) ((char *)OPENSSL_sk_value(ossl_check_const_OPENSSL_STRING_sk_type(sk), (idx)))
  ------------------
  137|       |
  138|  47.5k|    sk_OPENSSL_STRING_free(names);
  ------------------
  |  |  262|  47.5k|#define sk_OPENSSL_STRING_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_STRING_sk_type(sk))
  ------------------
  139|  47.5k|    return i > 0;
  140|  47.5k|}
ossl_namemap_name2num:
  143|  1.84M|{
  144|  1.84M|    int number = 0;
  145|  1.84M|    HT_VALUE *val;
  146|  1.84M|    NAMENUM_KEY key;
  147|       |
  148|  1.84M|#ifndef FIPS_MODULE
  149|  1.84M|    if (namemap == NULL)
  ------------------
  |  Branch (149:9): [True: 0, False: 1.84M]
  ------------------
  150|      0|        namemap = ossl_namemap_stored(NULL);
  151|  1.84M|#endif
  152|       |
  153|  1.84M|    if (namemap == NULL || name == NULL)
  ------------------
  |  Branch (153:9): [True: 0, False: 1.84M]
  |  Branch (153:28): [True: 2, False: 1.84M]
  ------------------
  154|      2|        return 0;
  155|       |
  156|  1.84M|    HT_INIT_RAW_KEY(&key);
  ------------------
  |  |  130|  1.84M|    do {                               \
  |  |  131|  1.84M|        HT_INIT_KEY((key));            \
  |  |  ------------------
  |  |  |  |  112|  1.84M|    do {                                                                                           \
  |  |  |  |  113|  1.84M|        memset((key), 0, sizeof(*(key)));                                                          \
  |  |  |  |  114|  1.84M|        (key)->key_header.keysize = (key)->key_header.bufsize = (sizeof(*(key)) - sizeof(HT_KEY)); \
  |  |  |  |  115|  1.84M|        (key)->key_header.keybuf = (((uint8_t *)key) + sizeof(HT_KEY));                            \
  |  |  |  |  116|  1.84M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (116:14): [Folded, False: 1.84M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  132|  1.84M|        (key)->key_header.keysize = 0; \
  |  |  133|  1.84M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (133:14): [Folded, False: 1.84M]
  |  |  ------------------
  ------------------
  157|  1.84M|    HT_COPY_RAW_KEY_CASE(TO_HT_KEY(&key), name, strlen(name));
  ------------------
  |  |  164|  1.84M|    do {                                                                               \
  |  |  165|  1.84M|        size_t tmplen = (size_t)(len);                                                 \
  |  |  166|  1.84M|        if (tmplen > (key)->bufsize - (key)->keysize)                                  \
  |  |  ------------------
  |  |  |  Branch (166:13): [True: 0, False: 1.84M]
  |  |  ------------------
  |  |  167|  1.84M|            tmplen = (key)->bufsize - (key)->keysize;                                  \
  |  |  168|  1.84M|        ossl_ht_strcase((key), (char *)&((key)->keybuf[(key)->keysize]), buf, tmplen); \
  |  |  169|  1.84M|        (key)->keysize += tmplen;                                                      \
  |  |  170|  1.84M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (170:14): [Folded, False: 1.84M]
  |  |  ------------------
  ------------------
  158|       |
  159|  1.84M|    val = ossl_ht_get(namemap->namenum_ht, TO_HT_KEY(&key));
  ------------------
  |  |  237|  1.84M|#define TO_HT_KEY(key) &(key)->key_header
  ------------------
  160|       |
  161|  1.84M|    if (val != NULL)
  ------------------
  |  Branch (161:9): [True: 1.76M, False: 82.3k]
  ------------------
  162|       |        /* We store a (small) int directly instead of a pointer to it. */
  163|  1.76M|        number = (int)(intptr_t)val->value;
  164|       |
  165|  1.84M|    return number;
  166|  1.84M|}
ossl_namemap_name2num_n:
  170|  81.3k|{
  171|  81.3k|    int number = 0;
  172|  81.3k|    HT_VALUE *val;
  173|  81.3k|    NAMENUM_KEY key;
  174|       |
  175|  81.3k|#ifndef FIPS_MODULE
  176|  81.3k|    if (namemap == NULL)
  ------------------
  |  Branch (176:9): [True: 0, False: 81.3k]
  ------------------
  177|      0|        namemap = ossl_namemap_stored(NULL);
  178|  81.3k|#endif
  179|       |
  180|  81.3k|    if (namemap == NULL)
  ------------------
  |  Branch (180:9): [True: 0, False: 81.3k]
  ------------------
  181|      0|        return 0;
  182|       |
  183|  81.3k|    if (name_len > NAMEMAP_NAME_LEN)
  ------------------
  |  |   19|  81.3k|#define NAMEMAP_NAME_LEN 64
  ------------------
  |  Branch (183:9): [True: 0, False: 81.3k]
  ------------------
  184|      0|        name_len = NAMEMAP_NAME_LEN;
  ------------------
  |  |   19|      0|#define NAMEMAP_NAME_LEN 64
  ------------------
  185|       |
  186|  81.3k|    HT_INIT_RAW_KEY(&key);
  ------------------
  |  |  130|  81.3k|    do {                               \
  |  |  131|  81.3k|        HT_INIT_KEY((key));            \
  |  |  ------------------
  |  |  |  |  112|  81.3k|    do {                                                                                           \
  |  |  |  |  113|  81.3k|        memset((key), 0, sizeof(*(key)));                                                          \
  |  |  |  |  114|  81.3k|        (key)->key_header.keysize = (key)->key_header.bufsize = (sizeof(*(key)) - sizeof(HT_KEY)); \
  |  |  |  |  115|  81.3k|        (key)->key_header.keybuf = (((uint8_t *)key) + sizeof(HT_KEY));                            \
  |  |  |  |  116|  81.3k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (116:14): [Folded, False: 81.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  132|  81.3k|        (key)->key_header.keysize = 0; \
  |  |  133|  81.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (133:14): [Folded, False: 81.3k]
  |  |  ------------------
  ------------------
  187|  81.3k|    HT_COPY_RAW_KEY_CASE(TO_HT_KEY(&key), name, name_len);
  ------------------
  |  |  164|  81.3k|    do {                                                                               \
  |  |  165|  81.3k|        size_t tmplen = (size_t)(len);                                                 \
  |  |  166|  81.3k|        if (tmplen > (key)->bufsize - (key)->keysize)                                  \
  |  |  ------------------
  |  |  |  Branch (166:13): [True: 0, False: 81.3k]
  |  |  ------------------
  |  |  167|  81.3k|            tmplen = (key)->bufsize - (key)->keysize;                                  \
  |  |  168|  81.3k|        ossl_ht_strcase((key), (char *)&((key)->keybuf[(key)->keysize]), buf, tmplen); \
  |  |  169|  81.3k|        (key)->keysize += tmplen;                                                      \
  |  |  170|  81.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (170:14): [Folded, False: 81.3k]
  |  |  ------------------
  ------------------
  188|       |
  189|  81.3k|    val = ossl_ht_get(namemap->namenum_ht, TO_HT_KEY(&key));
  ------------------
  |  |  237|  81.3k|#define TO_HT_KEY(key) &(key)->key_header
  ------------------
  190|       |
  191|  81.3k|    if (val != NULL)
  ------------------
  |  Branch (191:9): [True: 394, False: 80.9k]
  ------------------
  192|       |        /* We store a (small) int directly instead of a pointer to it. */
  193|    394|        number = (int)(intptr_t)val->value;
  194|       |
  195|  81.3k|    return number;
  196|  81.3k|}
ossl_namemap_add_name:
  296|    649|{
  297|    649|    int tmp_number;
  298|       |
  299|    649|#ifndef FIPS_MODULE
  300|    649|    if (namemap == NULL)
  ------------------
  |  Branch (300:9): [True: 0, False: 649]
  ------------------
  301|      0|        namemap = ossl_namemap_stored(NULL);
  302|    649|#endif
  303|       |
  304|    649|    if (name == NULL || *name == 0 || namemap == NULL)
  ------------------
  |  Branch (304:9): [True: 0, False: 649]
  |  Branch (304:25): [True: 0, False: 649]
  |  Branch (304:39): [True: 0, False: 649]
  ------------------
  305|      0|        return 0;
  306|       |
  307|    649|    if (!CRYPTO_THREAD_write_lock(namemap->lock))
  ------------------
  |  Branch (307:9): [True: 0, False: 649]
  ------------------
  308|      0|        return 0;
  309|    649|    tmp_number = namemap_add_name(namemap, number, name);
  310|    649|    CRYPTO_THREAD_unlock(namemap->lock);
  311|    649|    return tmp_number;
  312|    649|}
ossl_namemap_add_names:
  316|    391|{
  317|    391|    char *tmp, *p, *q, *endp;
  318|       |
  319|       |    /* Check that we have a namemap */
  320|    391|    if (!ossl_assert(namemap != NULL)) {
  ------------------
  |  |   52|    391|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|    391|    __FILE__, __LINE__)
  ------------------
  |  Branch (320:9): [True: 0, False: 391]
  ------------------
  321|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  322|      0|        return 0;
  323|      0|    }
  324|       |
  325|    391|    if ((tmp = OPENSSL_strdup(names)) == NULL)
  ------------------
  |  |  136|    391|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (325:9): [True: 0, False: 391]
  ------------------
  326|      0|        return 0;
  327|       |
  328|    391|    if (!CRYPTO_THREAD_write_lock(namemap->lock)) {
  ------------------
  |  Branch (328:9): [True: 0, False: 391]
  ------------------
  329|      0|        OPENSSL_free(tmp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#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|  1.17k|    for (p = tmp; *p != '\0'; p = q) {
  ------------------
  |  Branch (336:19): [True: 783, False: 391]
  ------------------
  337|    783|        int this_number;
  338|    783|        size_t l;
  339|       |
  340|    783|        if ((q = strchr(p, separator)) == NULL) {
  ------------------
  |  Branch (340:13): [True: 391, False: 392]
  ------------------
  341|    391|            l = strlen(p); /* offset to \0 */
  342|    391|            q = p + l;
  343|    392|        } else {
  344|    392|            l = q - p; /* offset to the next separator */
  345|    392|            *q++ = '\0';
  346|    392|        }
  347|       |
  348|    783|        if (*p == '\0') {
  ------------------
  |  Branch (348:13): [True: 0, False: 783]
  ------------------
  349|      0|            ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_BAD_ALGORITHM_NAME);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  350|      0|            number = 0;
  351|      0|            goto end;
  352|      0|        }
  353|       |
  354|    783|        this_number = ossl_namemap_name2num(namemap, p);
  355|       |
  356|    783|        if (number == 0) {
  ------------------
  |  Branch (356:13): [True: 580, False: 203]
  ------------------
  357|    580|            number = this_number;
  358|    580|        } else if (this_number != 0 && this_number != number) {
  ------------------
  |  Branch (358:20): [True: 178, False: 25]
  |  Branch (358:40): [True: 0, False: 178]
  ------------------
  359|      0|            ERR_raise_data(ERR_LIB_CRYPTO, CRYPTO_R_CONFLICTING_NAMES,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, CRYPTO_R_CONFLICTING_NAMES,
  ------------------
  |  |   68|      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|    783|    }
  366|    391|    endp = p;
  367|       |
  368|       |    /* Now that we have checked, register all names */
  369|  1.17k|    for (p = tmp; p < endp; p = q) {
  ------------------
  |  Branch (369:19): [True: 783, False: 391]
  ------------------
  370|    783|        int this_number;
  371|       |
  372|    783|        q = p + strlen(p) + 1;
  373|       |
  374|    783|        this_number = namemap_add_name(namemap, number, p);
  375|    783|        if (number == 0) {
  ------------------
  |  Branch (375:13): [True: 164, False: 619]
  ------------------
  376|    164|            number = this_number;
  377|    619|        } else if (this_number != number) {
  ------------------
  |  Branch (377:20): [True: 0, False: 619]
  ------------------
  378|      0|            ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      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|    783|    }
  385|       |
  386|    391|end:
  387|    391|    CRYPTO_THREAD_unlock(namemap->lock);
  388|    391|    OPENSSL_free(tmp);
  ------------------
  |  |  132|    391|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  389|    391|    return number;
  390|    391|}
ossl_namemap_stored:
  490|  1.96M|{
  491|  1.96M|#ifndef FIPS_MODULE
  492|  1.96M|    int nms;
  493|  1.96M|#endif
  494|  1.96M|    OSSL_NAMEMAP *namemap = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_NAMEMAP_INDEX);
  ------------------
  |  |   99|  1.96M|#define OSSL_LIB_CTX_NAMEMAP_INDEX 4
  ------------------
  495|       |
  496|  1.96M|    if (namemap == NULL)
  ------------------
  |  Branch (496:9): [True: 0, False: 1.96M]
  ------------------
  497|      0|        return NULL;
  498|       |
  499|  1.96M|#ifndef FIPS_MODULE
  500|  1.96M|    nms = ossl_namemap_empty(namemap);
  501|  1.96M|    if (nms < 0) {
  ------------------
  |  Branch (501:9): [True: 0, False: 1.96M]
  ------------------
  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|  1.96M|    if (nms == 1) {
  ------------------
  |  Branch (508:9): [True: 1, False: 1.96M]
  ------------------
  509|      1|        int num;
  510|       |
  511|       |        /* Before pilfering, we make sure the legacy database is populated */
  512|      1|        OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS
  ------------------
  |  |  507|      1|#define OPENSSL_INIT_ADD_ALL_CIPHERS 0x00000004L
  ------------------
  513|      1|                | OPENSSL_INIT_ADD_ALL_DIGESTS,
  ------------------
  |  |  508|      1|#define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
  ------------------
  514|      1|            NULL);
  515|       |
  516|      1|        OBJ_NAME_do_all(OBJ_NAME_TYPE_CIPHER_METH,
  ------------------
  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  ------------------
  517|      1|            get_legacy_cipher_names, namemap);
  518|      1|        OBJ_NAME_do_all(OBJ_NAME_TYPE_MD_METH,
  ------------------
  |  |   25|      1|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
  519|      1|            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|      1|        num = ossl_namemap_add_name(namemap, 0, "RSA-PSS");
  526|      1|        if (num != 0) {
  ------------------
  |  Branch (526:13): [True: 1, False: 0]
  ------------------
  527|      1|            ossl_namemap_add_name(namemap, num, "rsassaPss");
  528|       |            /* Add other RSA-PSS aliases as well */
  529|      1|            ossl_namemap_add_name(namemap, num, "RSASSA-PSS");
  530|      1|            ossl_namemap_add_name(namemap, num, "1.2.840.113549.1.1.10");
  531|      1|        }
  532|      1|#ifndef OPENSSL_NO_DEPRECATED_3_6
  533|      1|        {
  534|      1|            int i, end;
  535|       |
  536|       |            /* We also pilfer data from the legacy EVP_PKEY_ASN1_METHODs */
  537|     16|            for (i = 0, end = evp_pkey_asn1_get_count(); i < end; i++)
  ------------------
  |  Branch (537:58): [True: 15, False: 1]
  ------------------
  538|     15|                get_legacy_pkey_meth_names(evp_pkey_asn1_get0(i), namemap);
  539|      1|        }
  540|      1|#endif
  541|      1|    }
  542|  1.96M|#endif
  543|       |
  544|  1.96M|    return namemap;
  545|  1.96M|}
ossl_namemap_new:
  548|      2|{
  549|      2|    OSSL_NAMEMAP *namemap;
  550|      2|    HT_CONFIG htconf = { NULL, NULL, NULL, NAMEMAP_HT_BUCKETS, 1, 1, 0 };
  ------------------
  |  |   17|      2|#define NAMEMAP_HT_BUCKETS 512
  ------------------
  551|       |
  552|      2|    htconf.ctx = libctx;
  553|       |
  554|      2|    if ((namemap = OPENSSL_zalloc(sizeof(*namemap))) == NULL)
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (554:9): [True: 0, False: 2]
  ------------------
  555|      0|        goto err;
  556|       |
  557|      2|    if ((namemap->lock = CRYPTO_THREAD_lock_new()) == NULL)
  ------------------
  |  Branch (557:9): [True: 0, False: 2]
  ------------------
  558|      0|        goto err;
  559|       |
  560|      2|    if ((namemap->namenum_ht = ossl_ht_new(&htconf)) == NULL)
  ------------------
  |  Branch (560:9): [True: 0, False: 2]
  ------------------
  561|      0|        goto err;
  562|       |
  563|      2|    if ((namemap->numnames = sk_NAMES_new_null()) == NULL)
  ------------------
  |  Branch (563:9): [True: 0, False: 2]
  ------------------
  564|      0|        goto err;
  565|       |
  566|      2|    return namemap;
  567|       |
  568|      0|err:
  569|      0|    ossl_namemap_free(namemap);
  570|       |    return NULL;
  571|      2|}
core_namemap.c:namemap_add_name:
  263|  1.43k|{
  264|  1.43k|    int ret;
  265|  1.43k|    HT_VALUE val = { 0 };
  266|  1.43k|    NAMENUM_KEY key;
  267|       |
  268|       |    /* If it already exists, we don't add it */
  269|  1.43k|    if ((ret = ossl_namemap_name2num(namemap, name)) != 0)
  ------------------
  |  Branch (269:9): [True: 794, False: 638]
  ------------------
  270|    794|        return ret;
  271|       |
  272|    638|    if ((number = numname_insert(namemap, number, name)) == 0)
  ------------------
  |  Branch (272:9): [True: 0, False: 638]
  ------------------
  273|      0|        return 0;
  274|       |
  275|       |    /* Using tsan_store alone here is safe since we're under lock */
  276|    638|    tsan_store(&namemap->max_number, number);
  ------------------
  |  |   62|    638|#define tsan_store(ptr, val) atomic_store_explicit((ptr), (val), memory_order_relaxed)
  ------------------
  277|       |
  278|    638|    HT_INIT_RAW_KEY(&key);
  ------------------
  |  |  130|    638|    do {                               \
  |  |  131|    638|        HT_INIT_KEY((key));            \
  |  |  ------------------
  |  |  |  |  112|    638|    do {                                                                                           \
  |  |  |  |  113|    638|        memset((key), 0, sizeof(*(key)));                                                          \
  |  |  |  |  114|    638|        (key)->key_header.keysize = (key)->key_header.bufsize = (sizeof(*(key)) - sizeof(HT_KEY)); \
  |  |  |  |  115|    638|        (key)->key_header.keybuf = (((uint8_t *)key) + sizeof(HT_KEY));                            \
  |  |  |  |  116|    638|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (116:14): [Folded, False: 638]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  132|    638|        (key)->key_header.keysize = 0; \
  |  |  133|    638|    } while (0)
  |  |  ------------------
  |  |  |  Branch (133:14): [Folded, False: 638]
  |  |  ------------------
  ------------------
  279|    638|    HT_COPY_RAW_KEY_CASE(TO_HT_KEY(&key), name, strlen(name));
  ------------------
  |  |  164|    638|    do {                                                                               \
  |  |  165|    638|        size_t tmplen = (size_t)(len);                                                 \
  |  |  166|    638|        if (tmplen > (key)->bufsize - (key)->keysize)                                  \
  |  |  ------------------
  |  |  |  Branch (166:13): [True: 0, False: 638]
  |  |  ------------------
  |  |  167|    638|            tmplen = (key)->bufsize - (key)->keysize;                                  \
  |  |  168|    638|        ossl_ht_strcase((key), (char *)&((key)->keybuf[(key)->keysize]), buf, tmplen); \
  |  |  169|    638|        (key)->keysize += tmplen;                                                      \
  |  |  170|    638|    } while (0)
  |  |  ------------------
  |  |  |  Branch (170:14): [Folded, False: 638]
  |  |  ------------------
  ------------------
  280|       |
  281|    638|    val.value = (void *)(intptr_t)number;
  282|    638|    ret = ossl_ht_insert(namemap->namenum_ht, TO_HT_KEY(&key), &val, NULL);
  ------------------
  |  |  237|    638|#define TO_HT_KEY(key) &(key)->key_header
  ------------------
  283|    638|    if (ret <= 0) {
  ------------------
  |  Branch (283:9): [True: 0, False: 638]
  ------------------
  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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  |  |  |  Branch (357:55): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  289|      0|        return 0;
  290|      0|    }
  291|    638|    return number;
  292|    638|}
core_namemap.c:numname_insert:
  222|    638|{
  223|    638|    NAMES *names;
  224|    638|    char *tmpname;
  225|       |
  226|    638|    if (number > 0) {
  ------------------
  |  Branch (226:9): [True: 355, False: 283]
  ------------------
  227|    355|        names = sk_NAMES_value(namemap->numnames, number - 1);
  228|    355|        if (!ossl_assert(names != NULL)) {
  ------------------
  |  |   52|    355|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|    355|    __FILE__, __LINE__)
  ------------------
  |  Branch (228:13): [True: 0, False: 355]
  ------------------
  229|       |            /* cannot happen */
  230|      0|            return 0;
  231|      0|        }
  232|    355|    } else {
  233|       |        /* a completely new entry */
  234|    283|        names = sk_OPENSSL_STRING_new_null();
  ------------------
  |  |  259|    283|#define sk_OPENSSL_STRING_new_null() ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_OPENSSL_STRING_freefunc_thunk))
  ------------------
  235|    283|        if (names == NULL)
  ------------------
  |  Branch (235:13): [True: 0, False: 283]
  ------------------
  236|      0|            return 0;
  237|    283|    }
  238|       |
  239|    638|    if ((tmpname = OPENSSL_strdup(name)) == NULL)
  ------------------
  |  |  136|    638|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (239:9): [True: 0, False: 638]
  ------------------
  240|      0|        goto err;
  241|       |
  242|    638|    if (!sk_OPENSSL_STRING_push(names, tmpname))
  ------------------
  |  |  266|    638|#define sk_OPENSSL_STRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_type(ptr))
  ------------------
  |  Branch (242:9): [True: 0, False: 638]
  ------------------
  243|      0|        goto err;
  244|    638|    tmpname = NULL;
  245|       |
  246|    638|    if (number <= 0) {
  ------------------
  |  Branch (246:9): [True: 283, False: 355]
  ------------------
  247|    283|        if (!sk_NAMES_push(namemap->numnames, names))
  ------------------
  |  Branch (247:13): [True: 0, False: 283]
  ------------------
  248|      0|            goto err;
  249|    283|        number = sk_NAMES_num(namemap->numnames);
  250|    283|    }
  251|    638|    return number;
  252|       |
  253|      0|err:
  254|      0|    if (number <= 0)
  ------------------
  |  Branch (254:9): [True: 0, False: 0]
  ------------------
  255|      0|        sk_OPENSSL_STRING_pop_free(names, name_string_free);
  ------------------
  |  |  270|      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))
  ------------------
  256|      0|    OPENSSL_free(tmpname);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  257|      0|    return 0;
  258|    638|}
core_namemap.c:get_legacy_cipher_names:
  427|    183|{
  428|    183|    const EVP_CIPHER *cipher = (void *)OBJ_NAME_get(on->name, on->type);
  429|       |
  430|    183|    if (cipher != NULL)
  ------------------
  |  Branch (430:9): [True: 183, False: 0]
  ------------------
  431|    183|        get_legacy_evp_names(NID_undef, EVP_CIPHER_get_type(cipher), NULL, arg);
  ------------------
  |  |   18|    183|#define NID_undef                       0
  ------------------
  432|    183|}
core_namemap.c:get_legacy_evp_names:
  403|    258|{
  404|    258|    int num = 0;
  405|    258|    ASN1_OBJECT *obj;
  406|       |
  407|    258|    if (base_nid != NID_undef) {
  ------------------
  |  |   18|    258|#define NID_undef                       0
  ------------------
  |  Branch (407:9): [True: 4, False: 254]
  ------------------
  408|      4|        num = ossl_namemap_add_name(arg, num, OBJ_nid2sn(base_nid));
  409|      4|        num = ossl_namemap_add_name(arg, num, OBJ_nid2ln(base_nid));
  410|      4|    }
  411|       |
  412|    258|    if (nid != NID_undef) {
  ------------------
  |  |   18|    258|#define NID_undef                       0
  ------------------
  |  Branch (412:9): [True: 210, False: 48]
  ------------------
  413|    210|        num = ossl_namemap_add_name(arg, num, OBJ_nid2sn(nid));
  414|    210|        num = ossl_namemap_add_name(arg, num, OBJ_nid2ln(nid));
  415|    210|        if ((obj = OBJ_nid2obj(nid)) != NULL) {
  ------------------
  |  Branch (415:13): [True: 210, False: 0]
  ------------------
  416|    210|            char txtoid[OSSL_MAX_NAME_SIZE];
  417|       |
  418|    210|            if (OBJ_obj2txt(txtoid, sizeof(txtoid), obj, 1) > 0)
  ------------------
  |  Branch (418:17): [True: 206, False: 4]
  ------------------
  419|    206|                num = ossl_namemap_add_name(arg, num, txtoid);
  420|    210|        }
  421|    210|    }
  422|    258|    if (pem_name != NULL)
  ------------------
  |  Branch (422:9): [True: 11, False: 247]
  ------------------
  423|     11|        num = ossl_namemap_add_name(arg, num, pem_name);
  424|    258|}
core_namemap.c:get_legacy_md_names:
  435|     59|{
  436|     59|    const EVP_MD *md = (void *)OBJ_NAME_get(on->name, on->type);
  437|       |
  438|     59|    if (md != NULL)
  ------------------
  |  Branch (438:9): [True: 59, False: 0]
  ------------------
  439|     59|        get_legacy_evp_names(NID_undef, EVP_MD_get_type(md), NULL, arg);
  ------------------
  |  |   18|     59|#define NID_undef                       0
  ------------------
  440|     59|}
core_namemap.c:get_legacy_pkey_meth_names:
  445|     15|{
  446|     15|    int nid = 0, base_nid = 0, flags = 0;
  447|     15|    const char *pem_name = NULL;
  448|       |
  449|     15|    evp_pkey_asn1_get0_info(&nid, &base_nid, &flags, NULL, &pem_name, ameth);
  450|     15|    if (nid != NID_undef) {
  ------------------
  |  |   18|     15|#define NID_undef                       0
  ------------------
  |  Branch (450:9): [True: 15, False: 0]
  ------------------
  451|     15|        if ((flags & ASN1_PKEY_ALIAS) == 0) {
  ------------------
  |  | 1501|     15|#define ASN1_PKEY_ALIAS 0x1
  ------------------
  |  Branch (451:13): [True: 10, False: 5]
  ------------------
  452|     10|            switch (nid) {
  453|      1|            case EVP_PKEY_DHX:
  ------------------
  |  |   72|      1|#define EVP_PKEY_DHX NID_dhpublicnumber
  |  |  ------------------
  |  |  |  | 5526|      1|#define NID_dhpublicnumber              920
  |  |  ------------------
  ------------------
  |  Branch (453:13): [True: 1, False: 9]
  ------------------
  454|       |                /* We know that the name "DHX" is used too */
  455|      1|                get_legacy_evp_names(0, nid, "DHX", arg);
  456|       |                /* FALLTHRU */
  457|     10|            default:
  ------------------
  |  Branch (457:13): [True: 9, False: 1]
  ------------------
  458|     10|                get_legacy_evp_names(0, nid, pem_name, arg);
  459|     10|            }
  460|     10|        } else {
  461|       |            /*
  462|       |             * Treat aliases carefully, some of them are undesirable, or
  463|       |             * should not be treated as such for providers.
  464|       |             */
  465|       |
  466|      5|            switch (nid) {
  467|      1|            case EVP_PKEY_SM2:
  ------------------
  |  |   74|      1|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1259|      1|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (467:13): [True: 1, False: 4]
  ------------------
  468|       |                /*
  469|       |                 * SM2 is a separate keytype with providers, not an alias for
  470|       |                 * EC.
  471|       |                 */
  472|      1|                get_legacy_evp_names(0, nid, pem_name, arg);
  473|      1|                break;
  474|      4|            default:
  ------------------
  |  Branch (474:13): [True: 4, False: 1]
  ------------------
  475|       |                /* Use the short name of the base nid as the common reference */
  476|      4|                get_legacy_evp_names(base_nid, nid, pem_name, arg);
  477|      5|            }
  478|      5|        }
  479|     15|    }
  480|     15|}

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

OPENSSL_cpuid_setup:
   95|      4|{
   96|      4|    static int trigger = 0;
   97|      4|    IA32CAP OPENSSL_ia32_cpuid(unsigned int *);
   98|      4|    IA32CAP vec;
   99|      4|    const variant_char *env;
  100|      4|    int index = 2;
  101|       |
  102|      4|    if (trigger)
  ------------------
  |  Branch (102:9): [True: 2, False: 2]
  ------------------
  103|      2|        return;
  104|       |
  105|      2|    trigger = 1;
  106|      2|    if ((env = ossl_getenv("OPENSSL_ia32cap")) != NULL) {
  ------------------
  |  |   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:
   80|      2|{
   81|      2|#ifndef OPENSSL_NO_ERR
   82|      2|    if (ERR_reason_error_string(CRMF_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (82:9): [True: 2, False: 0]
  ------------------
   83|      2|        ERR_load_strings_const(CRMF_str_reasons);
   84|      2|#endif
   85|      2|    return 1;
   86|      2|}

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

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

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

ossl_ctype_check:
  253|   228k|{
  254|   228k|    const int max = sizeof(ctype_char_map) / sizeof(*ctype_char_map);
  255|   228k|    const int a = ossl_toascii(c);
  ------------------
  |  |   56|   228k|#define ossl_toascii(c) (c)
  ------------------
  256|       |
  257|   228k|    return a >= 0 && a < max && (ctype_char_map[a] & mask) != 0;
  ------------------
  |  Branch (257:12): [True: 228k, False: 0]
  |  Branch (257:22): [True: 228k, False: 0]
  |  Branch (257:33): [True: 5.39k, False: 223k]
  ------------------
  258|   228k|}
ossl_isdigit:
  270|   618k|{
  271|   618k|    int a = ossl_toascii(c);
  ------------------
  |  |   56|   618k|#define ossl_toascii(c) (c)
  ------------------
  272|       |
  273|   618k|    return ASCII_IS_DIGIT(a);
  ------------------
  |  |  265|   618k|#define ASCII_IS_DIGIT(c) (c >= 0x30 && c <= 0x39)
  |  |  ------------------
  |  |  |  Branch (265:28): [True: 618k, False: 0]
  |  |  |  Branch (265:41): [True: 618k, False: 359]
  |  |  ------------------
  ------------------
  274|   618k|}
ossl_tolower:
  297|  30.7M|{
  298|  30.7M|    int a = ossl_toascii(c);
  ------------------
  |  |   56|  30.7M|#define ossl_toascii(c) (c)
  ------------------
  299|       |
  300|  30.7M|    return ASCII_IS_UPPER(a) ? c ^ case_change : c;
  ------------------
  |  |  266|  30.7M|#define ASCII_IS_UPPER(c) (c >= 0x41 && c <= 0x5A)
  |  |  ------------------
  |  |  |  Branch (266:28): [True: 27.4M, False: 3.28M]
  |  |  |  Branch (266:41): [True: 19.1M, False: 8.33M]
  |  |  ------------------
  ------------------
  301|  30.7M|}
ossl_ascii_isdigit:
  311|   369k|{
  312|   369k|    return ASCII_IS_DIGIT(c);
  ------------------
  |  |  265|   369k|#define ASCII_IS_DIGIT(c) (c >= 0x30 && c <= 0x39)
  |  |  ------------------
  |  |  |  Branch (265:28): [True: 369k, False: 0]
  |  |  |  Branch (265:41): [True: 369k, False: 0]
  |  |  ------------------
  ------------------
  313|   369k|}

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

ossl_DER_w_precompiled:
   54|  10.8k|{
   55|  10.8k|    return int_start_context(pkt, tag)
  ------------------
  |  Branch (55:12): [True: 10.8k, False: 0]
  ------------------
   56|  10.8k|        && WPACKET_memcpy(pkt, precompiled, precompiled_n)
  ------------------
  |  Branch (56:12): [True: 10.8k, False: 0]
  ------------------
   57|  10.8k|        && int_end_context(pkt, tag);
  ------------------
  |  Branch (57:12): [True: 10.8k, False: 0]
  ------------------
   58|  10.8k|}
ossl_DER_w_begin_sequence:
  171|  10.8k|{
  172|  10.8k|    return int_start_context(pkt, tag)
  ------------------
  |  Branch (172:12): [True: 10.8k, False: 0]
  ------------------
  173|  10.8k|        && WPACKET_start_sub_packet(pkt);
  ------------------
  |  Branch (173:12): [True: 10.8k, False: 0]
  ------------------
  174|  10.8k|}
ossl_DER_w_end_sequence:
  177|  10.8k|{
  178|       |    /*
  179|       |     * If someone set the flag WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH on this
  180|       |     * sub-packet and this sub-packet has nothing written to it, the DER length
  181|       |     * will not be written, and the total written size will be unchanged before
  182|       |     * and after WPACKET_close().  We use size1 and size2 to determine if
  183|       |     * anything was written, and only write our tag if it has.
  184|       |     *
  185|       |     * Because we know that int_end_context() needs to do the same check,
  186|       |     * we reproduce this flag if the written length was unchanged, or we will
  187|       |     * have an erroneous context tag.
  188|       |     */
  189|  10.8k|    size_t size1, size2;
  190|       |
  191|  10.8k|    return WPACKET_get_total_written(pkt, &size1)
  ------------------
  |  Branch (191:12): [True: 10.8k, False: 0]
  ------------------
  192|  10.8k|        && WPACKET_close(pkt)
  ------------------
  |  Branch (192:12): [True: 10.8k, False: 0]
  ------------------
  193|  10.8k|        && WPACKET_get_total_written(pkt, &size2)
  ------------------
  |  Branch (193:12): [True: 10.8k, False: 0]
  ------------------
  194|  10.8k|        && (size1 == size2
  ------------------
  |  Branch (194:12): [True: 10.8k, False: 0]
  |  Branch (194:13): [True: 0, False: 10.8k]
  ------------------
  195|  10.8k|                ? WPACKET_set_flags(pkt, WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH)
  ------------------
  |  |  723|      0|#define WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH 2
  ------------------
  196|  10.8k|                : WPACKET_put_bytes_u8(pkt, DER_F_CONSTRUCTED | DER_P_SEQUENCE))
  ------------------
  |  |  909|  10.8k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  197|  10.8k|        && int_end_context(pkt, tag);
  ------------------
  |  Branch (197:12): [True: 10.8k, False: 0]
  ------------------
  198|  10.8k|}
der_writer.c:int_start_context:
   17|  21.7k|{
   18|  21.7k|    if (tag < 0)
  ------------------
  |  Branch (18:9): [True: 21.7k, False: 0]
  ------------------
   19|  21.7k|        return 1;
   20|      0|    if (!ossl_assert(tag <= 30))
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (20:9): [True: 0, False: 0]
  ------------------
   21|      0|        return 0;
   22|      0|    return WPACKET_start_sub_packet(pkt);
   23|      0|}
der_writer.c:int_end_context:
   26|  21.7k|{
   27|       |    /*
   28|       |     * If someone set the flag WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH on this
   29|       |     * sub-packet and this sub-packet has nothing written to it, the DER length
   30|       |     * will not be written, and the total written size will be unchanged before
   31|       |     * and after WPACKET_close().  We use size1 and size2 to determine if
   32|       |     * anything was written, and only write our tag if it has.
   33|       |     *
   34|       |     */
   35|  21.7k|    size_t size1, size2;
   36|       |
   37|  21.7k|    if (tag < 0)
  ------------------
  |  Branch (37:9): [True: 21.7k, False: 0]
  ------------------
   38|  21.7k|        return 1;
   39|      0|    if (!ossl_assert(tag <= 30))
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (39:9): [True: 0, False: 0]
  ------------------
   40|      0|        return 0;
   41|       |
   42|       |    /* Context specific are normally (?) constructed */
   43|      0|    tag |= DER_F_CONSTRUCTED | DER_C_CONTEXT;
  ------------------
  |  |   58|      0|#define DER_F_CONSTRUCTED 0x20
  ------------------
                  tag |= DER_F_CONSTRUCTED | DER_C_CONTEXT;
  ------------------
  |  |   63|      0|#define DER_C_CONTEXT 0x80
  ------------------
   44|       |
   45|      0|    return WPACKET_get_total_written(pkt, &size1)
  ------------------
  |  Branch (45:12): [True: 0, False: 0]
  ------------------
   46|      0|        && WPACKET_close(pkt)
  ------------------
  |  Branch (46:12): [True: 0, False: 0]
  ------------------
   47|      0|        && WPACKET_get_total_written(pkt, &size2)
  ------------------
  |  Branch (47:12): [True: 0, False: 0]
  ------------------
   48|      0|        && (size1 == size2 || WPACKET_put_bytes_u8(pkt, tag));
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  |  |  ------------------
  |  |  |  Branch (909:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (48:13): [True: 0, False: 0]
  ------------------
   49|      0|}

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

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

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

DSA_free:
  186|  7.36k|{
  187|  7.36k|    int i;
  188|       |
  189|  7.36k|    if (r == NULL)
  ------------------
  |  Branch (189:9): [True: 7.36k, False: 0]
  ------------------
  190|  7.36k|        return;
  191|       |
  192|      0|    CRYPTO_DOWN_REF(&r->references, &i);
  193|      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));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|      0|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  194|      0|    if (i > 0)
  ------------------
  |  Branch (194:9): [True: 0, False: 0]
  ------------------
  195|      0|        return;
  196|      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]
  |  |  ------------------
  ------------------
  197|       |
  198|      0|    if (r->meth != NULL && r->meth->finish != NULL)
  ------------------
  |  Branch (198:9): [True: 0, False: 0]
  |  Branch (198:28): [True: 0, False: 0]
  ------------------
  199|      0|        r->meth->finish(r);
  200|       |
  201|      0|#ifndef FIPS_MODULE
  202|      0|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_DSA, r, &r->ex_data);
  ------------------
  |  |  258|      0|#define CRYPTO_EX_INDEX_DSA 7
  ------------------
  203|      0|#endif
  204|       |
  205|      0|    CRYPTO_THREAD_lock_free(r->lock);
  206|      0|    CRYPTO_FREE_REF(&r->references);
  207|       |
  208|      0|    ossl_ffc_params_cleanup(&r->params);
  209|      0|    BN_clear_free(r->pub_key);
  210|      0|    BN_clear_free(r->priv_key);
  211|      0|    OPENSSL_free(r);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  212|      0|}

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

ossl_x25519:
 5846|  7.25k|{
 5847|  7.25k|    static const uint8_t kZeros[32] = { 0 };
 5848|  7.25k|    x25519_scalar_mult(out_shared_key, private_key, peer_public_value);
 5849|       |    /* The all-zero output results when the input is a point of small order. */
 5850|  7.25k|    return CRYPTO_memcmp(kZeros, out_shared_key, 32) != 0;
 5851|  7.25k|}
ossl_x25519_public_from_private:
 5855|  10.8k|{
 5856|  10.8k|    uint8_t e[32];
 5857|  10.8k|    ge_p3 A;
 5858|  10.8k|    fe zplusy, zminusy, zminusy_inv;
 5859|       |
 5860|  10.8k|    memcpy(e, private_key, 32);
 5861|  10.8k|    e[0] &= 248;
 5862|  10.8k|    e[31] &= 127;
 5863|  10.8k|    e[31] |= 64;
 5864|       |
 5865|  10.8k|    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|  10.8k|    fe_add(zplusy, A.Z, A.Y);
 5873|  10.8k|    fe_sub(zminusy, A.Z, A.Y);
 5874|  10.8k|    fe_invert(zminusy_inv, zminusy);
 5875|  10.8k|    fe_mul(zplusy, zplusy, zminusy_inv);
 5876|  10.8k|    fe_tobytes(out_public_value, zplusy);
 5877|       |
 5878|  10.8k|    OPENSSL_cleanse(e, sizeof(e));
 5879|  10.8k|}
curve25519.c:ge_scalarmult_base:
 4366|  10.8k|{
 4367|  10.8k|    signed char e[64];
 4368|  10.8k|    signed char carry;
 4369|  10.8k|    ge_p1p1 r;
 4370|  10.8k|    ge_p2 s;
 4371|  10.8k|    ge_precomp t;
 4372|  10.8k|    int i;
 4373|       |
 4374|   359k|    for (i = 0; i < 32; ++i) {
  ------------------
  |  Branch (4374:17): [True: 348k, False: 10.8k]
  ------------------
 4375|   348k|        e[2 * i + 0] = (a[i] >> 0) & 15;
 4376|   348k|        e[2 * i + 1] = (a[i] >> 4) & 15;
 4377|   348k|    }
 4378|       |    /* each e[i] is between 0 and 15 */
 4379|       |    /* e[63] is between 0 and 7 */
 4380|       |
 4381|  10.8k|    carry = 0;
 4382|   696k|    for (i = 0; i < 63; ++i) {
  ------------------
  |  Branch (4382:17): [True: 685k, False: 10.8k]
  ------------------
 4383|   685k|        e[i] += carry;
 4384|   685k|        carry = e[i] + 8;
 4385|   685k|        carry >>= 4;
 4386|   685k|        e[i] -= carry << 4;
 4387|   685k|    }
 4388|  10.8k|    e[63] += carry;
 4389|       |    /* each e[i] is between -8 and 8 */
 4390|       |
 4391|  10.8k|    ge_p3_0(h);
 4392|   359k|    for (i = 1; i < 64; i += 2) {
  ------------------
  |  Branch (4392:17): [True: 348k, False: 10.8k]
  ------------------
 4393|   348k|        table_select(&t, i / 2, e[i]);
 4394|   348k|        ge_madd(&r, h, &t);
 4395|   348k|        ge_p1p1_to_p3(h, &r);
 4396|   348k|    }
 4397|       |
 4398|  10.8k|    ge_p3_dbl(&r, h);
 4399|  10.8k|    ge_p1p1_to_p2(&s, &r);
 4400|  10.8k|    ge_p2_dbl(&r, &s);
 4401|  10.8k|    ge_p1p1_to_p2(&s, &r);
 4402|  10.8k|    ge_p2_dbl(&r, &s);
 4403|  10.8k|    ge_p1p1_to_p2(&s, &r);
 4404|  10.8k|    ge_p2_dbl(&r, &s);
 4405|  10.8k|    ge_p1p1_to_p3(h, &r);
 4406|       |
 4407|   359k|    for (i = 0; i < 64; i += 2) {
  ------------------
  |  Branch (4407:17): [True: 348k, False: 10.8k]
  ------------------
 4408|   348k|        table_select(&t, i / 2, e[i]);
 4409|   348k|        ge_madd(&r, h, &t);
 4410|   348k|        ge_p1p1_to_p3(h, &r);
 4411|   348k|    }
 4412|       |
 4413|  10.8k|    OPENSSL_cleanse(e, sizeof(e));
 4414|  10.8k|}
curve25519.c:ge_p3_0:
 2046|  10.8k|{
 2047|  10.8k|    fe_0(h->X);
 2048|  10.8k|    fe_1(h->Y);
 2049|  10.8k|    fe_1(h->Z);
 2050|  10.8k|    fe_0(h->T);
 2051|  10.8k|}
curve25519.c:fe_0:
 1022|   718k|{
 1023|   718k|    memset(h, 0, sizeof(int32_t) * 10);
 1024|   718k|}
curve25519.c:fe_1:
 1028|  1.41M|{
 1029|  1.41M|    memset(h, 0, sizeof(int32_t) * 10);
 1030|  1.41M|    h[0] = 1;
 1031|  1.41M|}
curve25519.c:table_select:
 4336|   696k|{
 4337|   696k|    ge_precomp minust;
 4338|   696k|    uint8_t bnegative = negative(b);
 4339|   696k|    uint8_t babs = b - ((uint8_t)((-bnegative) & b) << 1);
 4340|       |
 4341|   696k|    ge_precomp_0(t);
 4342|   696k|    cmov(t, &k25519Precomp[pos][0], equal(babs, 1));
 4343|   696k|    cmov(t, &k25519Precomp[pos][1], equal(babs, 2));
 4344|   696k|    cmov(t, &k25519Precomp[pos][2], equal(babs, 3));
 4345|   696k|    cmov(t, &k25519Precomp[pos][3], equal(babs, 4));
 4346|   696k|    cmov(t, &k25519Precomp[pos][4], equal(babs, 5));
 4347|   696k|    cmov(t, &k25519Precomp[pos][5], equal(babs, 6));
 4348|   696k|    cmov(t, &k25519Precomp[pos][6], equal(babs, 7));
 4349|   696k|    cmov(t, &k25519Precomp[pos][7], equal(babs, 8));
 4350|   696k|    fe_copy(minust.yplusx, t->yminusx);
 4351|   696k|    fe_copy(minust.yminusx, t->yplusx);
 4352|   696k|    fe_neg(minust.xy2d, t->xy2d);
 4353|   696k|    cmov(t, &minust, bnegative);
 4354|   696k|}
curve25519.c:negative:
 4328|   696k|{
 4329|   696k|    uint32_t x = b;
 4330|       |
 4331|   696k|    x >>= 31; /* 1: yes; 0: no */
 4332|   696k|    return x;
 4333|   696k|}
curve25519.c:ge_precomp_0:
 2054|   696k|{
 2055|   696k|    fe_1(h->yplusx);
 2056|   696k|    fe_1(h->yminusx);
 2057|   696k|    fe_0(h->xy2d);
 2058|   696k|}
curve25519.c:cmov:
 2205|  6.27M|{
 2206|  6.27M|    fe_cmov(t->yplusx, u->yplusx, b);
 2207|  6.27M|    fe_cmov(t->yminusx, u->yminusx, b);
 2208|  6.27M|    fe_cmov(t->xy2d, u->xy2d, b);
 2209|  6.27M|}
curve25519.c:fe_cmov:
 1636|  18.8M|{
 1637|  18.8M|    size_t i;
 1638|       |
 1639|  18.8M|    b = 0 - b;
 1640|   206M|    for (i = 0; i < 10; i++) {
  ------------------
  |  Branch (1640:17): [True: 188M, False: 18.8M]
  ------------------
 1641|   188M|        int32_t x = f[i] ^ g[i];
 1642|   188M|        x &= b;
 1643|   188M|        f[i] ^= x;
 1644|   188M|    }
 1645|  18.8M|}
curve25519.c:equal:
 2194|  5.57M|{
 2195|  5.57M|    uint8_t ub = b;
 2196|  5.57M|    uint8_t uc = c;
 2197|  5.57M|    uint8_t x = ub ^ uc; /* 0: yes; 1..255: no */
 2198|  5.57M|    uint32_t y = x; /* 0: yes; 1..255: no */
 2199|  5.57M|    y -= 1; /* 4294967295: yes; 0..254: no */
 2200|  5.57M|    y >>= 31; /* 1: yes; 0: no */
 2201|  5.57M|    return y;
 2202|  5.57M|}
curve25519.c:fe_copy:
 1016|  1.42M|{
 1017|  1.42M|    memmove(h, f, sizeof(int32_t) * 10);
 1018|  1.42M|}
curve25519.c:ge_madd:
 2125|   696k|{
 2126|   696k|    fe t0;
 2127|       |
 2128|   696k|    fe_add(r->X, p->Y, p->X);
 2129|   696k|    fe_sub(r->Y, p->Y, p->X);
 2130|   696k|    fe_mul(r->Z, r->X, q->yplusx);
 2131|   696k|    fe_mul(r->Y, r->Y, q->yminusx);
 2132|   696k|    fe_mul(r->T, q->xy2d, p->T);
 2133|   696k|    fe_add(t0, p->Z, p->Z);
 2134|   696k|    fe_sub(r->X, r->Z, r->Y);
 2135|   696k|    fe_add(r->Y, r->Z, r->Y);
 2136|   696k|    fe_add(r->Z, t0, r->T);
 2137|   696k|    fe_sub(r->T, t0, r->T);
 2138|   696k|}
curve25519.c:ge_p1p1_to_p3:
 2092|   707k|{
 2093|   707k|    fe_mul(r->X, p->X, p->T);
 2094|   707k|    fe_mul(r->Y, p->Y, p->Z);
 2095|   707k|    fe_mul(r->Z, p->Z, p->T);
 2096|   707k|    fe_mul(r->T, p->X, p->Y);
 2097|   707k|}
curve25519.c:ge_p3_dbl:
 2117|  10.8k|{
 2118|  10.8k|    ge_p2 q;
 2119|  10.8k|    ge_p3_to_p2(&q, p);
 2120|  10.8k|    ge_p2_dbl(r, &q);
 2121|  10.8k|}
curve25519.c:ge_p3_to_p2:
 2062|  10.8k|{
 2063|  10.8k|    fe_copy(r->X, p->X);
 2064|  10.8k|    fe_copy(r->Y, p->Y);
 2065|  10.8k|    fe_copy(r->Z, p->Z);
 2066|  10.8k|}
curve25519.c:ge_p1p1_to_p2:
 2084|  32.6k|{
 2085|  32.6k|    fe_mul(r->X, p->X, p->T);
 2086|  32.6k|    fe_mul(r->Y, p->Y, p->Z);
 2087|  32.6k|    fe_mul(r->Z, p->Z, p->T);
 2088|  32.6k|}
curve25519.c:ge_p2_dbl:
 2101|  43.5k|{
 2102|  43.5k|    fe t0;
 2103|       |
 2104|  43.5k|    fe_sq(r->X, p->X);
 2105|  43.5k|    fe_sq(r->Z, p->Y);
 2106|  43.5k|    fe_sq2(r->T, p->Z);
 2107|  43.5k|    fe_add(r->Y, p->X, p->Y);
 2108|  43.5k|    fe_sq(t0, r->Y);
 2109|  43.5k|    fe_add(r->Y, r->Z, r->X);
 2110|  43.5k|    fe_sub(r->Z, r->Z, r->X);
 2111|  43.5k|    fe_sub(r->X, t0, r->Y);
 2112|  43.5k|    fe_sub(r->T, r->T, r->Z);
 2113|  43.5k|}
curve25519.c:fe_sq:
 1360|  2.89M|{
 1361|  2.89M|    int32_t f0 = f[0];
 1362|  2.89M|    int32_t f1 = f[1];
 1363|  2.89M|    int32_t f2 = f[2];
 1364|  2.89M|    int32_t f3 = f[3];
 1365|  2.89M|    int32_t f4 = f[4];
 1366|  2.89M|    int32_t f5 = f[5];
 1367|  2.89M|    int32_t f6 = f[6];
 1368|  2.89M|    int32_t f7 = f[7];
 1369|  2.89M|    int32_t f8 = f[8];
 1370|  2.89M|    int32_t f9 = f[9];
 1371|  2.89M|    int32_t f0_2 = 2 * f0;
 1372|  2.89M|    int32_t f1_2 = 2 * f1;
 1373|  2.89M|    int32_t f2_2 = 2 * f2;
 1374|  2.89M|    int32_t f3_2 = 2 * f3;
 1375|  2.89M|    int32_t f4_2 = 2 * f4;
 1376|  2.89M|    int32_t f5_2 = 2 * f5;
 1377|  2.89M|    int32_t f6_2 = 2 * f6;
 1378|  2.89M|    int32_t f7_2 = 2 * f7;
 1379|  2.89M|    int32_t f5_38 = 38 * f5; /* 1.959375*2^30 */
 1380|  2.89M|    int32_t f6_19 = 19 * f6; /* 1.959375*2^30 */
 1381|  2.89M|    int32_t f7_38 = 38 * f7; /* 1.959375*2^30 */
 1382|  2.89M|    int32_t f8_19 = 19 * f8; /* 1.959375*2^30 */
 1383|  2.89M|    int32_t f9_38 = 38 * f9; /* 1.959375*2^30 */
 1384|  2.89M|    int64_t f0f0 = f0 * (int64_t)f0;
 1385|  2.89M|    int64_t f0f1_2 = f0_2 * (int64_t)f1;
 1386|  2.89M|    int64_t f0f2_2 = f0_2 * (int64_t)f2;
 1387|  2.89M|    int64_t f0f3_2 = f0_2 * (int64_t)f3;
 1388|  2.89M|    int64_t f0f4_2 = f0_2 * (int64_t)f4;
 1389|  2.89M|    int64_t f0f5_2 = f0_2 * (int64_t)f5;
 1390|  2.89M|    int64_t f0f6_2 = f0_2 * (int64_t)f6;
 1391|  2.89M|    int64_t f0f7_2 = f0_2 * (int64_t)f7;
 1392|  2.89M|    int64_t f0f8_2 = f0_2 * (int64_t)f8;
 1393|  2.89M|    int64_t f0f9_2 = f0_2 * (int64_t)f9;
 1394|  2.89M|    int64_t f1f1_2 = f1_2 * (int64_t)f1;
 1395|  2.89M|    int64_t f1f2_2 = f1_2 * (int64_t)f2;
 1396|  2.89M|    int64_t f1f3_4 = f1_2 * (int64_t)f3_2;
 1397|  2.89M|    int64_t f1f4_2 = f1_2 * (int64_t)f4;
 1398|  2.89M|    int64_t f1f5_4 = f1_2 * (int64_t)f5_2;
 1399|  2.89M|    int64_t f1f6_2 = f1_2 * (int64_t)f6;
 1400|  2.89M|    int64_t f1f7_4 = f1_2 * (int64_t)f7_2;
 1401|  2.89M|    int64_t f1f8_2 = f1_2 * (int64_t)f8;
 1402|  2.89M|    int64_t f1f9_76 = f1_2 * (int64_t)f9_38;
 1403|  2.89M|    int64_t f2f2 = f2 * (int64_t)f2;
 1404|  2.89M|    int64_t f2f3_2 = f2_2 * (int64_t)f3;
 1405|  2.89M|    int64_t f2f4_2 = f2_2 * (int64_t)f4;
 1406|  2.89M|    int64_t f2f5_2 = f2_2 * (int64_t)f5;
 1407|  2.89M|    int64_t f2f6_2 = f2_2 * (int64_t)f6;
 1408|  2.89M|    int64_t f2f7_2 = f2_2 * (int64_t)f7;
 1409|  2.89M|    int64_t f2f8_38 = f2_2 * (int64_t)f8_19;
 1410|  2.89M|    int64_t f2f9_38 = f2 * (int64_t)f9_38;
 1411|  2.89M|    int64_t f3f3_2 = f3_2 * (int64_t)f3;
 1412|  2.89M|    int64_t f3f4_2 = f3_2 * (int64_t)f4;
 1413|  2.89M|    int64_t f3f5_4 = f3_2 * (int64_t)f5_2;
 1414|  2.89M|    int64_t f3f6_2 = f3_2 * (int64_t)f6;
 1415|  2.89M|    int64_t f3f7_76 = f3_2 * (int64_t)f7_38;
 1416|  2.89M|    int64_t f3f8_38 = f3_2 * (int64_t)f8_19;
 1417|  2.89M|    int64_t f3f9_76 = f3_2 * (int64_t)f9_38;
 1418|  2.89M|    int64_t f4f4 = f4 * (int64_t)f4;
 1419|  2.89M|    int64_t f4f5_2 = f4_2 * (int64_t)f5;
 1420|  2.89M|    int64_t f4f6_38 = f4_2 * (int64_t)f6_19;
 1421|  2.89M|    int64_t f4f7_38 = f4 * (int64_t)f7_38;
 1422|  2.89M|    int64_t f4f8_38 = f4_2 * (int64_t)f8_19;
 1423|  2.89M|    int64_t f4f9_38 = f4 * (int64_t)f9_38;
 1424|  2.89M|    int64_t f5f5_38 = f5 * (int64_t)f5_38;
 1425|  2.89M|    int64_t f5f6_38 = f5_2 * (int64_t)f6_19;
 1426|  2.89M|    int64_t f5f7_76 = f5_2 * (int64_t)f7_38;
 1427|  2.89M|    int64_t f5f8_38 = f5_2 * (int64_t)f8_19;
 1428|  2.89M|    int64_t f5f9_76 = f5_2 * (int64_t)f9_38;
 1429|  2.89M|    int64_t f6f6_19 = f6 * (int64_t)f6_19;
 1430|  2.89M|    int64_t f6f7_38 = f6 * (int64_t)f7_38;
 1431|  2.89M|    int64_t f6f8_38 = f6_2 * (int64_t)f8_19;
 1432|  2.89M|    int64_t f6f9_38 = f6 * (int64_t)f9_38;
 1433|  2.89M|    int64_t f7f7_38 = f7 * (int64_t)f7_38;
 1434|  2.89M|    int64_t f7f8_38 = f7_2 * (int64_t)f8_19;
 1435|  2.89M|    int64_t f7f9_76 = f7_2 * (int64_t)f9_38;
 1436|  2.89M|    int64_t f8f8_19 = f8 * (int64_t)f8_19;
 1437|  2.89M|    int64_t f8f9_38 = f8 * (int64_t)f9_38;
 1438|  2.89M|    int64_t f9f9_38 = f9 * (int64_t)f9_38;
 1439|  2.89M|    int64_t h0 = f0f0 + f1f9_76 + f2f8_38 + f3f7_76 + f4f6_38 + f5f5_38;
 1440|  2.89M|    int64_t h1 = f0f1_2 + f2f9_38 + f3f8_38 + f4f7_38 + f5f6_38;
 1441|  2.89M|    int64_t h2 = f0f2_2 + f1f1_2 + f3f9_76 + f4f8_38 + f5f7_76 + f6f6_19;
 1442|  2.89M|    int64_t h3 = f0f3_2 + f1f2_2 + f4f9_38 + f5f8_38 + f6f7_38;
 1443|  2.89M|    int64_t h4 = f0f4_2 + f1f3_4 + f2f2 + f5f9_76 + f6f8_38 + f7f7_38;
 1444|  2.89M|    int64_t h5 = f0f5_2 + f1f4_2 + f2f3_2 + f6f9_38 + f7f8_38;
 1445|  2.89M|    int64_t h6 = f0f6_2 + f1f5_4 + f2f4_2 + f3f3_2 + f7f9_76 + f8f8_19;
 1446|  2.89M|    int64_t h7 = f0f7_2 + f1f6_2 + f2f5_2 + f3f4_2 + f8f9_38;
 1447|  2.89M|    int64_t h8 = f0f8_2 + f1f7_4 + f2f6_2 + f3f5_4 + f4f4 + f9f9_38;
 1448|  2.89M|    int64_t h9 = f0f9_2 + f1f8_2 + f2f7_2 + f3f6_2 + f4f5_2;
 1449|  2.89M|    int64_t carry0;
 1450|  2.89M|    int64_t carry1;
 1451|  2.89M|    int64_t carry2;
 1452|  2.89M|    int64_t carry3;
 1453|  2.89M|    int64_t carry4;
 1454|  2.89M|    int64_t carry5;
 1455|  2.89M|    int64_t carry6;
 1456|  2.89M|    int64_t carry7;
 1457|  2.89M|    int64_t carry8;
 1458|  2.89M|    int64_t carry9;
 1459|       |
 1460|  2.89M|    carry0 = h0 + (1 << 25);
 1461|  2.89M|    h1 += carry0 >> 26;
 1462|  2.89M|    h0 -= carry0 & kTop38Bits;
 1463|  2.89M|    carry4 = h4 + (1 << 25);
 1464|  2.89M|    h5 += carry4 >> 26;
 1465|  2.89M|    h4 -= carry4 & kTop38Bits;
 1466|       |
 1467|  2.89M|    carry1 = h1 + (1 << 24);
 1468|  2.89M|    h2 += carry1 >> 25;
 1469|  2.89M|    h1 -= carry1 & kTop39Bits;
 1470|  2.89M|    carry5 = h5 + (1 << 24);
 1471|  2.89M|    h6 += carry5 >> 25;
 1472|  2.89M|    h5 -= carry5 & kTop39Bits;
 1473|       |
 1474|  2.89M|    carry2 = h2 + (1 << 25);
 1475|  2.89M|    h3 += carry2 >> 26;
 1476|  2.89M|    h2 -= carry2 & kTop38Bits;
 1477|  2.89M|    carry6 = h6 + (1 << 25);
 1478|  2.89M|    h7 += carry6 >> 26;
 1479|  2.89M|    h6 -= carry6 & kTop38Bits;
 1480|       |
 1481|  2.89M|    carry3 = h3 + (1 << 24);
 1482|  2.89M|    h4 += carry3 >> 25;
 1483|  2.89M|    h3 -= carry3 & kTop39Bits;
 1484|  2.89M|    carry7 = h7 + (1 << 24);
 1485|  2.89M|    h8 += carry7 >> 25;
 1486|  2.89M|    h7 -= carry7 & kTop39Bits;
 1487|       |
 1488|  2.89M|    carry4 = h4 + (1 << 25);
 1489|  2.89M|    h5 += carry4 >> 26;
 1490|  2.89M|    h4 -= carry4 & kTop38Bits;
 1491|  2.89M|    carry8 = h8 + (1 << 25);
 1492|  2.89M|    h9 += carry8 >> 26;
 1493|  2.89M|    h8 -= carry8 & kTop38Bits;
 1494|       |
 1495|  2.89M|    carry9 = h9 + (1 << 24);
 1496|  2.89M|    h0 += (carry9 >> 25) * 19;
 1497|  2.89M|    h9 -= carry9 & kTop39Bits;
 1498|       |
 1499|  2.89M|    carry0 = h0 + (1 << 25);
 1500|  2.89M|    h1 += carry0 >> 26;
 1501|  2.89M|    h0 -= carry0 & kTop38Bits;
 1502|       |
 1503|  2.89M|    h[0] = (int32_t)h0;
 1504|  2.89M|    h[1] = (int32_t)h1;
 1505|  2.89M|    h[2] = (int32_t)h2;
 1506|  2.89M|    h[3] = (int32_t)h3;
 1507|  2.89M|    h[4] = (int32_t)h4;
 1508|  2.89M|    h[5] = (int32_t)h5;
 1509|  2.89M|    h[6] = (int32_t)h6;
 1510|  2.89M|    h[7] = (int32_t)h7;
 1511|  2.89M|    h[8] = (int32_t)h8;
 1512|  2.89M|    h[9] = (int32_t)h9;
 1513|  2.89M|}
curve25519.c:fe_sq2:
 1693|  43.5k|{
 1694|  43.5k|    int32_t f0 = f[0];
 1695|  43.5k|    int32_t f1 = f[1];
 1696|  43.5k|    int32_t f2 = f[2];
 1697|  43.5k|    int32_t f3 = f[3];
 1698|  43.5k|    int32_t f4 = f[4];
 1699|  43.5k|    int32_t f5 = f[5];
 1700|  43.5k|    int32_t f6 = f[6];
 1701|  43.5k|    int32_t f7 = f[7];
 1702|  43.5k|    int32_t f8 = f[8];
 1703|  43.5k|    int32_t f9 = f[9];
 1704|  43.5k|    int32_t f0_2 = 2 * f0;
 1705|  43.5k|    int32_t f1_2 = 2 * f1;
 1706|  43.5k|    int32_t f2_2 = 2 * f2;
 1707|  43.5k|    int32_t f3_2 = 2 * f3;
 1708|  43.5k|    int32_t f4_2 = 2 * f4;
 1709|  43.5k|    int32_t f5_2 = 2 * f5;
 1710|  43.5k|    int32_t f6_2 = 2 * f6;
 1711|  43.5k|    int32_t f7_2 = 2 * f7;
 1712|  43.5k|    int32_t f5_38 = 38 * f5; /* 1.959375*2^30 */
 1713|  43.5k|    int32_t f6_19 = 19 * f6; /* 1.959375*2^30 */
 1714|  43.5k|    int32_t f7_38 = 38 * f7; /* 1.959375*2^30 */
 1715|  43.5k|    int32_t f8_19 = 19 * f8; /* 1.959375*2^30 */
 1716|  43.5k|    int32_t f9_38 = 38 * f9; /* 1.959375*2^30 */
 1717|  43.5k|    int64_t f0f0 = f0 * (int64_t)f0;
 1718|  43.5k|    int64_t f0f1_2 = f0_2 * (int64_t)f1;
 1719|  43.5k|    int64_t f0f2_2 = f0_2 * (int64_t)f2;
 1720|  43.5k|    int64_t f0f3_2 = f0_2 * (int64_t)f3;
 1721|  43.5k|    int64_t f0f4_2 = f0_2 * (int64_t)f4;
 1722|  43.5k|    int64_t f0f5_2 = f0_2 * (int64_t)f5;
 1723|  43.5k|    int64_t f0f6_2 = f0_2 * (int64_t)f6;
 1724|  43.5k|    int64_t f0f7_2 = f0_2 * (int64_t)f7;
 1725|  43.5k|    int64_t f0f8_2 = f0_2 * (int64_t)f8;
 1726|  43.5k|    int64_t f0f9_2 = f0_2 * (int64_t)f9;
 1727|  43.5k|    int64_t f1f1_2 = f1_2 * (int64_t)f1;
 1728|  43.5k|    int64_t f1f2_2 = f1_2 * (int64_t)f2;
 1729|  43.5k|    int64_t f1f3_4 = f1_2 * (int64_t)f3_2;
 1730|  43.5k|    int64_t f1f4_2 = f1_2 * (int64_t)f4;
 1731|  43.5k|    int64_t f1f5_4 = f1_2 * (int64_t)f5_2;
 1732|  43.5k|    int64_t f1f6_2 = f1_2 * (int64_t)f6;
 1733|  43.5k|    int64_t f1f7_4 = f1_2 * (int64_t)f7_2;
 1734|  43.5k|    int64_t f1f8_2 = f1_2 * (int64_t)f8;
 1735|  43.5k|    int64_t f1f9_76 = f1_2 * (int64_t)f9_38;
 1736|  43.5k|    int64_t f2f2 = f2 * (int64_t)f2;
 1737|  43.5k|    int64_t f2f3_2 = f2_2 * (int64_t)f3;
 1738|  43.5k|    int64_t f2f4_2 = f2_2 * (int64_t)f4;
 1739|  43.5k|    int64_t f2f5_2 = f2_2 * (int64_t)f5;
 1740|  43.5k|    int64_t f2f6_2 = f2_2 * (int64_t)f6;
 1741|  43.5k|    int64_t f2f7_2 = f2_2 * (int64_t)f7;
 1742|  43.5k|    int64_t f2f8_38 = f2_2 * (int64_t)f8_19;
 1743|  43.5k|    int64_t f2f9_38 = f2 * (int64_t)f9_38;
 1744|  43.5k|    int64_t f3f3_2 = f3_2 * (int64_t)f3;
 1745|  43.5k|    int64_t f3f4_2 = f3_2 * (int64_t)f4;
 1746|  43.5k|    int64_t f3f5_4 = f3_2 * (int64_t)f5_2;
 1747|  43.5k|    int64_t f3f6_2 = f3_2 * (int64_t)f6;
 1748|  43.5k|    int64_t f3f7_76 = f3_2 * (int64_t)f7_38;
 1749|  43.5k|    int64_t f3f8_38 = f3_2 * (int64_t)f8_19;
 1750|  43.5k|    int64_t f3f9_76 = f3_2 * (int64_t)f9_38;
 1751|  43.5k|    int64_t f4f4 = f4 * (int64_t)f4;
 1752|  43.5k|    int64_t f4f5_2 = f4_2 * (int64_t)f5;
 1753|  43.5k|    int64_t f4f6_38 = f4_2 * (int64_t)f6_19;
 1754|  43.5k|    int64_t f4f7_38 = f4 * (int64_t)f7_38;
 1755|  43.5k|    int64_t f4f8_38 = f4_2 * (int64_t)f8_19;
 1756|  43.5k|    int64_t f4f9_38 = f4 * (int64_t)f9_38;
 1757|  43.5k|    int64_t f5f5_38 = f5 * (int64_t)f5_38;
 1758|  43.5k|    int64_t f5f6_38 = f5_2 * (int64_t)f6_19;
 1759|  43.5k|    int64_t f5f7_76 = f5_2 * (int64_t)f7_38;
 1760|  43.5k|    int64_t f5f8_38 = f5_2 * (int64_t)f8_19;
 1761|  43.5k|    int64_t f5f9_76 = f5_2 * (int64_t)f9_38;
 1762|  43.5k|    int64_t f6f6_19 = f6 * (int64_t)f6_19;
 1763|  43.5k|    int64_t f6f7_38 = f6 * (int64_t)f7_38;
 1764|  43.5k|    int64_t f6f8_38 = f6_2 * (int64_t)f8_19;
 1765|  43.5k|    int64_t f6f9_38 = f6 * (int64_t)f9_38;
 1766|  43.5k|    int64_t f7f7_38 = f7 * (int64_t)f7_38;
 1767|  43.5k|    int64_t f7f8_38 = f7_2 * (int64_t)f8_19;
 1768|  43.5k|    int64_t f7f9_76 = f7_2 * (int64_t)f9_38;
 1769|  43.5k|    int64_t f8f8_19 = f8 * (int64_t)f8_19;
 1770|  43.5k|    int64_t f8f9_38 = f8 * (int64_t)f9_38;
 1771|  43.5k|    int64_t f9f9_38 = f9 * (int64_t)f9_38;
 1772|  43.5k|    int64_t h0 = f0f0 + f1f9_76 + f2f8_38 + f3f7_76 + f4f6_38 + f5f5_38;
 1773|  43.5k|    int64_t h1 = f0f1_2 + f2f9_38 + f3f8_38 + f4f7_38 + f5f6_38;
 1774|  43.5k|    int64_t h2 = f0f2_2 + f1f1_2 + f3f9_76 + f4f8_38 + f5f7_76 + f6f6_19;
 1775|  43.5k|    int64_t h3 = f0f3_2 + f1f2_2 + f4f9_38 + f5f8_38 + f6f7_38;
 1776|  43.5k|    int64_t h4 = f0f4_2 + f1f3_4 + f2f2 + f5f9_76 + f6f8_38 + f7f7_38;
 1777|  43.5k|    int64_t h5 = f0f5_2 + f1f4_2 + f2f3_2 + f6f9_38 + f7f8_38;
 1778|  43.5k|    int64_t h6 = f0f6_2 + f1f5_4 + f2f4_2 + f3f3_2 + f7f9_76 + f8f8_19;
 1779|  43.5k|    int64_t h7 = f0f7_2 + f1f6_2 + f2f5_2 + f3f4_2 + f8f9_38;
 1780|  43.5k|    int64_t h8 = f0f8_2 + f1f7_4 + f2f6_2 + f3f5_4 + f4f4 + f9f9_38;
 1781|  43.5k|    int64_t h9 = f0f9_2 + f1f8_2 + f2f7_2 + f3f6_2 + f4f5_2;
 1782|  43.5k|    int64_t carry0;
 1783|  43.5k|    int64_t carry1;
 1784|  43.5k|    int64_t carry2;
 1785|  43.5k|    int64_t carry3;
 1786|  43.5k|    int64_t carry4;
 1787|  43.5k|    int64_t carry5;
 1788|  43.5k|    int64_t carry6;
 1789|  43.5k|    int64_t carry7;
 1790|  43.5k|    int64_t carry8;
 1791|  43.5k|    int64_t carry9;
 1792|       |
 1793|  43.5k|    h0 += h0;
 1794|  43.5k|    h1 += h1;
 1795|  43.5k|    h2 += h2;
 1796|  43.5k|    h3 += h3;
 1797|  43.5k|    h4 += h4;
 1798|  43.5k|    h5 += h5;
 1799|  43.5k|    h6 += h6;
 1800|  43.5k|    h7 += h7;
 1801|  43.5k|    h8 += h8;
 1802|  43.5k|    h9 += h9;
 1803|       |
 1804|  43.5k|    carry0 = h0 + (1 << 25);
 1805|  43.5k|    h1 += carry0 >> 26;
 1806|  43.5k|    h0 -= carry0 & kTop38Bits;
 1807|  43.5k|    carry4 = h4 + (1 << 25);
 1808|  43.5k|    h5 += carry4 >> 26;
 1809|  43.5k|    h4 -= carry4 & kTop38Bits;
 1810|       |
 1811|  43.5k|    carry1 = h1 + (1 << 24);
 1812|  43.5k|    h2 += carry1 >> 25;
 1813|  43.5k|    h1 -= carry1 & kTop39Bits;
 1814|  43.5k|    carry5 = h5 + (1 << 24);
 1815|  43.5k|    h6 += carry5 >> 25;
 1816|  43.5k|    h5 -= carry5 & kTop39Bits;
 1817|       |
 1818|  43.5k|    carry2 = h2 + (1 << 25);
 1819|  43.5k|    h3 += carry2 >> 26;
 1820|  43.5k|    h2 -= carry2 & kTop38Bits;
 1821|  43.5k|    carry6 = h6 + (1 << 25);
 1822|  43.5k|    h7 += carry6 >> 26;
 1823|  43.5k|    h6 -= carry6 & kTop38Bits;
 1824|       |
 1825|  43.5k|    carry3 = h3 + (1 << 24);
 1826|  43.5k|    h4 += carry3 >> 25;
 1827|  43.5k|    h3 -= carry3 & kTop39Bits;
 1828|  43.5k|    carry7 = h7 + (1 << 24);
 1829|  43.5k|    h8 += carry7 >> 25;
 1830|  43.5k|    h7 -= carry7 & kTop39Bits;
 1831|       |
 1832|  43.5k|    carry4 = h4 + (1 << 25);
 1833|  43.5k|    h5 += carry4 >> 26;
 1834|  43.5k|    h4 -= carry4 & kTop38Bits;
 1835|  43.5k|    carry8 = h8 + (1 << 25);
 1836|  43.5k|    h9 += carry8 >> 26;
 1837|  43.5k|    h8 -= carry8 & kTop38Bits;
 1838|       |
 1839|  43.5k|    carry9 = h9 + (1 << 24);
 1840|  43.5k|    h0 += (carry9 >> 25) * 19;
 1841|  43.5k|    h9 -= carry9 & kTop39Bits;
 1842|       |
 1843|  43.5k|    carry0 = h0 + (1 << 25);
 1844|  43.5k|    h1 += carry0 >> 26;
 1845|  43.5k|    h0 -= carry0 & kTop38Bits;
 1846|       |
 1847|  43.5k|    h[0] = (int32_t)h0;
 1848|  43.5k|    h[1] = (int32_t)h1;
 1849|  43.5k|    h[2] = (int32_t)h2;
 1850|  43.5k|    h[3] = (int32_t)h3;
 1851|  43.5k|    h[4] = (int32_t)h4;
 1852|  43.5k|    h[5] = (int32_t)h5;
 1853|  43.5k|    h[6] = (int32_t)h6;
 1854|  43.5k|    h[7] = (int32_t)h7;
 1855|  43.5k|    h[8] = (int32_t)h8;
 1856|  43.5k|    h[9] = (int32_t)h9;
 1857|  43.5k|}
curve25519.c:fe_neg:
 1621|   696k|{
 1622|   696k|    unsigned i;
 1623|       |
 1624|  7.66M|    for (i = 0; i < 10; i++) {
  ------------------
  |  Branch (1624:17): [True: 6.96M, False: 696k]
  ------------------
 1625|  6.96M|        h[i] = -f[i];
 1626|  6.96M|    }
 1627|   696k|}
curve25519.c:x25519_scalar_mult:
  729|  7.25k|{
  730|  7.25k|    fe51 x1, x2, z2, x3, z3, tmp0, tmp1;
  731|  7.25k|    uint8_t e[32];
  732|  7.25k|    unsigned swap = 0;
  733|  7.25k|    int pos;
  734|       |
  735|  7.25k|#ifdef BASE_2_64_IMPLEMENTED
  736|  7.25k|    if (x25519_fe64_eligible()) {
  ------------------
  |  Branch (736:9): [True: 7.25k, False: 0]
  ------------------
  737|  7.25k|        x25519_scalar_mulx(out, scalar, point);
  738|  7.25k|        return;
  739|  7.25k|    }
  740|      0|#endif
  741|       |
  742|      0|    memcpy(e, scalar, 32);
  743|      0|    e[0] &= 0xf8;
  744|      0|    e[31] &= 0x7f;
  745|      0|    e[31] |= 0x40;
  746|      0|    fe51_frombytes(x1, point);
  747|      0|    fe51_1(x2);
  748|      0|    fe51_0(z2);
  749|      0|    fe51_copy(x3, x1);
  750|      0|    fe51_1(z3);
  751|       |
  752|      0|    for (pos = 254; pos >= 0; --pos) {
  ------------------
  |  Branch (752:21): [True: 0, False: 0]
  ------------------
  753|      0|        unsigned int b = 1 & (e[pos / 8] >> (pos & 7));
  754|       |
  755|      0|        swap ^= b;
  756|      0|        fe51_cswap(x2, x3, swap);
  757|      0|        fe51_cswap(z2, z3, swap);
  758|      0|        swap = b;
  759|      0|        fe51_sub(tmp0, x3, z3);
  760|      0|        fe51_sub(tmp1, x2, z2);
  761|      0|        fe51_add(x2, x2, z2);
  762|      0|        fe51_add(z2, x3, z3);
  763|      0|        fe51_mul(z3, tmp0, x2);
  ------------------
  |  |  400|      0|#define fe51_mul x25519_fe51_mul
  ------------------
  764|      0|        fe51_mul(z2, z2, tmp1);
  ------------------
  |  |  400|      0|#define fe51_mul x25519_fe51_mul
  ------------------
  765|      0|        fe51_sq(tmp0, tmp1);
  ------------------
  |  |  401|      0|#define fe51_sq x25519_fe51_sqr
  ------------------
  766|      0|        fe51_sq(tmp1, x2);
  ------------------
  |  |  401|      0|#define fe51_sq x25519_fe51_sqr
  ------------------
  767|      0|        fe51_add(x3, z3, z2);
  768|      0|        fe51_sub(z2, z3, z2);
  769|      0|        fe51_mul(x2, tmp1, tmp0);
  ------------------
  |  |  400|      0|#define fe51_mul x25519_fe51_mul
  ------------------
  770|      0|        fe51_sub(tmp1, tmp1, tmp0);
  771|      0|        fe51_sq(z2, z2);
  ------------------
  |  |  401|      0|#define fe51_sq x25519_fe51_sqr
  ------------------
  772|      0|        fe51_mul121666(z3, tmp1);
  ------------------
  |  |  402|      0|#define fe51_mul121666 x25519_fe51_mul121666
  ------------------
  773|      0|        fe51_sq(x3, x3);
  ------------------
  |  |  401|      0|#define fe51_sq x25519_fe51_sqr
  ------------------
  774|      0|        fe51_add(tmp0, tmp0, z3);
  775|      0|        fe51_mul(z3, x1, z2);
  ------------------
  |  |  400|      0|#define fe51_mul x25519_fe51_mul
  ------------------
  776|      0|        fe51_mul(z2, tmp1, tmp0);
  ------------------
  |  |  400|      0|#define fe51_mul x25519_fe51_mul
  ------------------
  777|      0|    }
  778|       |
  779|      0|    fe51_invert(z2, z2);
  780|      0|    fe51_mul(x2, x2, z2);
  ------------------
  |  |  400|      0|#define fe51_mul x25519_fe51_mul
  ------------------
  781|      0|    fe51_tobytes(out, x2);
  782|       |
  783|      0|    OPENSSL_cleanse(e, sizeof(e));
  784|      0|}
curve25519.c:x25519_scalar_mulx:
  212|  7.25k|{
  213|  7.25k|    fe64 x1, x2, z2, x3, z3, tmp0, tmp1;
  214|  7.25k|    uint8_t e[32];
  215|  7.25k|    unsigned swap = 0;
  216|  7.25k|    int pos;
  217|       |
  218|  7.25k|    memcpy(e, scalar, 32);
  219|  7.25k|    e[0] &= 0xf8;
  220|  7.25k|    e[31] &= 0x7f;
  221|  7.25k|    e[31] |= 0x40;
  222|  7.25k|    fe64_frombytes(x1, point);
  223|  7.25k|    fe64_1(x2);
  224|  7.25k|    fe64_0(z2);
  225|  7.25k|    fe64_copy(x3, x1);
  226|  7.25k|    fe64_1(z3);
  227|       |
  228|  1.85M|    for (pos = 254; pos >= 0; --pos) {
  ------------------
  |  Branch (228:21): [True: 1.85M, False: 7.25k]
  ------------------
  229|  1.85M|        unsigned int b = 1 & (e[pos / 8] >> (pos & 7));
  230|       |
  231|  1.85M|        swap ^= b;
  232|  1.85M|        fe64_cswap(x2, x3, swap);
  233|  1.85M|        fe64_cswap(z2, z3, swap);
  234|  1.85M|        swap = b;
  235|  1.85M|        fe64_sub(tmp0, x3, z3);
  ------------------
  |  |   51|  1.85M|#define fe64_sub x25519_fe64_sub
  ------------------
  236|  1.85M|        fe64_sub(tmp1, x2, z2);
  ------------------
  |  |   51|  1.85M|#define fe64_sub x25519_fe64_sub
  ------------------
  237|  1.85M|        fe64_add(x2, x2, z2);
  ------------------
  |  |   50|  1.85M|#define fe64_add x25519_fe64_add
  ------------------
  238|  1.85M|        fe64_add(z2, x3, z3);
  ------------------
  |  |   50|  1.85M|#define fe64_add x25519_fe64_add
  ------------------
  239|  1.85M|        fe64_mul(z3, x2, tmp0);
  ------------------
  |  |   47|  1.85M|#define fe64_mul x25519_fe64_mul
  ------------------
  240|  1.85M|        fe64_mul(z2, z2, tmp1);
  ------------------
  |  |   47|  1.85M|#define fe64_mul x25519_fe64_mul
  ------------------
  241|  1.85M|        fe64_sqr(tmp0, tmp1);
  ------------------
  |  |   48|  1.85M|#define fe64_sqr x25519_fe64_sqr
  ------------------
  242|  1.85M|        fe64_sqr(tmp1, x2);
  ------------------
  |  |   48|  1.85M|#define fe64_sqr x25519_fe64_sqr
  ------------------
  243|  1.85M|        fe64_add(x3, z3, z2);
  ------------------
  |  |   50|  1.85M|#define fe64_add x25519_fe64_add
  ------------------
  244|  1.85M|        fe64_sub(z2, z3, z2);
  ------------------
  |  |   51|  1.85M|#define fe64_sub x25519_fe64_sub
  ------------------
  245|  1.85M|        fe64_mul(x2, tmp1, tmp0);
  ------------------
  |  |   47|  1.85M|#define fe64_mul x25519_fe64_mul
  ------------------
  246|  1.85M|        fe64_sub(tmp1, tmp1, tmp0);
  ------------------
  |  |   51|  1.85M|#define fe64_sub x25519_fe64_sub
  ------------------
  247|  1.85M|        fe64_sqr(z2, z2);
  ------------------
  |  |   48|  1.85M|#define fe64_sqr x25519_fe64_sqr
  ------------------
  248|  1.85M|        fe64_mul121666(z3, tmp1);
  ------------------
  |  |   49|  1.85M|#define fe64_mul121666 x25519_fe64_mul121666
  ------------------
  249|  1.85M|        fe64_sqr(x3, x3);
  ------------------
  |  |   48|  1.85M|#define fe64_sqr x25519_fe64_sqr
  ------------------
  250|  1.85M|        fe64_add(tmp0, tmp0, z3);
  ------------------
  |  |   50|  1.85M|#define fe64_add x25519_fe64_add
  ------------------
  251|  1.85M|        fe64_mul(z3, x1, z2);
  ------------------
  |  |   47|  1.85M|#define fe64_mul x25519_fe64_mul
  ------------------
  252|  1.85M|        fe64_mul(z2, tmp1, tmp0);
  ------------------
  |  |   47|  1.85M|#define fe64_mul x25519_fe64_mul
  ------------------
  253|  1.85M|    }
  254|       |
  255|  7.25k|    fe64_invert(z2, z2);
  256|  7.25k|    fe64_mul(x2, x2, z2);
  ------------------
  |  |   47|  7.25k|#define fe64_mul x25519_fe64_mul
  ------------------
  257|  7.25k|    fe64_tobytes(out, x2);
  ------------------
  |  |   52|  7.25k|#define fe64_tobytes x25519_fe64_tobytes
  ------------------
  258|       |
  259|  7.25k|    OPENSSL_cleanse(e, sizeof(e));
  260|  7.25k|}
curve25519.c:fe64_frombytes:
   71|  7.25k|{
   72|  7.25k|    h[0] = load_8(s);
   73|  7.25k|    h[1] = load_8(s + 8);
   74|  7.25k|    h[2] = load_8(s + 16);
   75|  7.25k|    h[3] = load_8(s + 24) & 0x7fffffffffffffff;
   76|  7.25k|}
curve25519.c:load_8:
   55|  29.0k|{
   56|  29.0k|    uint64_t result;
   57|       |
   58|  29.0k|    result = in[0];
   59|  29.0k|    result |= ((uint64_t)in[1]) << 8;
   60|  29.0k|    result |= ((uint64_t)in[2]) << 16;
   61|  29.0k|    result |= ((uint64_t)in[3]) << 24;
   62|  29.0k|    result |= ((uint64_t)in[4]) << 32;
   63|  29.0k|    result |= ((uint64_t)in[5]) << 40;
   64|  29.0k|    result |= ((uint64_t)in[6]) << 48;
   65|  29.0k|    result |= ((uint64_t)in[7]) << 56;
   66|       |
   67|  29.0k|    return result;
   68|  29.0k|}
curve25519.c:fe64_1:
   87|  14.5k|{
   88|  14.5k|    h[0] = 1;
   89|  14.5k|    h[1] = 0;
   90|  14.5k|    h[2] = 0;
   91|  14.5k|    h[3] = 0;
   92|  14.5k|}
curve25519.c:fe64_0:
   79|  7.25k|{
   80|  7.25k|    h[0] = 0;
   81|  7.25k|    h[1] = 0;
   82|  7.25k|    h[2] = 0;
   83|  7.25k|    h[3] = 0;
   84|  7.25k|}
curve25519.c:fe64_copy:
   95|  7.25k|{
   96|  7.25k|    h[0] = f[0];
   97|  7.25k|    h[1] = f[1];
   98|  7.25k|    h[2] = f[2];
   99|  7.25k|    h[3] = f[3];
  100|  7.25k|}
curve25519.c:fe64_cswap:
  103|  3.70M|{
  104|  3.70M|    int i;
  105|  3.70M|    uint64_t mask = 0 - (uint64_t)b;
  106|       |
  107|  18.5M|    for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (107:17): [True: 14.8M, False: 3.70M]
  ------------------
  108|  14.8M|        uint64_t x = f[i] ^ g[i];
  109|  14.8M|        x &= mask;
  110|  14.8M|        f[i] ^= x;
  111|  14.8M|        g[i] ^= x;
  112|  14.8M|    }
  113|  3.70M|}
curve25519.c:fe64_invert:
  116|  7.25k|{
  117|  7.25k|    fe64 t0;
  118|  7.25k|    fe64 t1;
  119|  7.25k|    fe64 t2;
  120|  7.25k|    fe64 t3;
  121|  7.25k|    int i;
  122|       |
  123|       |    /*
  124|       |     * Compute z ** -1 = z ** (2 ** 255 - 19 - 2) with the exponent as
  125|       |     * 2 ** 255 - 21 = (2 ** 5) * (2 ** 250 - 1) + 11.
  126|       |     */
  127|       |
  128|       |    /* t0 = z ** 2 */
  129|  7.25k|    fe64_sqr(t0, z);
  ------------------
  |  |   48|  7.25k|#define fe64_sqr x25519_fe64_sqr
  ------------------
  130|       |
  131|       |    /* t1 = t0 ** (2 ** 2) = z ** 8 */
  132|  7.25k|    fe64_sqr(t1, t0);
  ------------------
  |  |   48|  7.25k|#define fe64_sqr x25519_fe64_sqr
  ------------------
  133|  7.25k|    fe64_sqr(t1, t1);
  ------------------
  |  |   48|  7.25k|#define fe64_sqr x25519_fe64_sqr
  ------------------
  134|       |
  135|       |    /* t1 = z * t1 = z ** 9 */
  136|  7.25k|    fe64_mul(t1, z, t1);
  ------------------
  |  |   47|  7.25k|#define fe64_mul x25519_fe64_mul
  ------------------
  137|       |    /* t0 = t0 * t1 = z ** 11 -- stash t0 away for the end. */
  138|  7.25k|    fe64_mul(t0, t0, t1);
  ------------------
  |  |   47|  7.25k|#define fe64_mul x25519_fe64_mul
  ------------------
  139|       |
  140|       |    /* t2 = t0 ** 2 = z ** 22 */
  141|  7.25k|    fe64_sqr(t2, t0);
  ------------------
  |  |   48|  7.25k|#define fe64_sqr x25519_fe64_sqr
  ------------------
  142|       |
  143|       |    /* t1 = t1 * t2 = z ** (2 ** 5 - 1) */
  144|  7.25k|    fe64_mul(t1, t1, t2);
  ------------------
  |  |   47|  7.25k|#define fe64_mul x25519_fe64_mul
  ------------------
  145|       |
  146|       |    /* t2 = t1 ** (2 ** 5) = z ** ((2 ** 5) * (2 ** 5 - 1)) */
  147|  7.25k|    fe64_sqr(t2, t1);
  ------------------
  |  |   48|  7.25k|#define fe64_sqr x25519_fe64_sqr
  ------------------
  148|  36.2k|    for (i = 1; i < 5; ++i)
  ------------------
  |  Branch (148:17): [True: 29.0k, False: 7.25k]
  ------------------
  149|  29.0k|        fe64_sqr(t2, t2);
  ------------------
  |  |   48|  29.0k|#define fe64_sqr x25519_fe64_sqr
  ------------------
  150|       |
  151|       |    /* t1 = t1 * t2 = z ** ((2 ** 5 + 1) * (2 ** 5 - 1)) = z ** (2 ** 10 - 1) */
  152|  7.25k|    fe64_mul(t1, t2, t1);
  ------------------
  |  |   47|  7.25k|#define fe64_mul x25519_fe64_mul
  ------------------
  153|       |
  154|       |    /* Continuing similarly... */
  155|       |
  156|       |    /* t2 = z ** (2 ** 20 - 1) */
  157|  7.25k|    fe64_sqr(t2, t1);
  ------------------
  |  |   48|  7.25k|#define fe64_sqr x25519_fe64_sqr
  ------------------
  158|  72.5k|    for (i = 1; i < 10; ++i)
  ------------------
  |  Branch (158:17): [True: 65.3k, False: 7.25k]
  ------------------
  159|  65.3k|        fe64_sqr(t2, t2);
  ------------------
  |  |   48|  65.3k|#define fe64_sqr x25519_fe64_sqr
  ------------------
  160|       |
  161|  7.25k|    fe64_mul(t2, t2, t1);
  ------------------
  |  |   47|  7.25k|#define fe64_mul x25519_fe64_mul
  ------------------
  162|       |
  163|       |    /* t2 = z ** (2 ** 40 - 1) */
  164|  7.25k|    fe64_sqr(t3, t2);
  ------------------
  |  |   48|  7.25k|#define fe64_sqr x25519_fe64_sqr
  ------------------
  165|   145k|    for (i = 1; i < 20; ++i)
  ------------------
  |  Branch (165:17): [True: 137k, False: 7.25k]
  ------------------
  166|   137k|        fe64_sqr(t3, t3);
  ------------------
  |  |   48|   137k|#define fe64_sqr x25519_fe64_sqr
  ------------------
  167|       |
  168|  7.25k|    fe64_mul(t2, t3, t2);
  ------------------
  |  |   47|  7.25k|#define fe64_mul x25519_fe64_mul
  ------------------
  169|       |
  170|       |    /* t2 = z ** (2 ** 10) * (2 ** 40 - 1) */
  171|  79.8k|    for (i = 0; i < 10; ++i)
  ------------------
  |  Branch (171:17): [True: 72.5k, False: 7.25k]
  ------------------
  172|  72.5k|        fe64_sqr(t2, t2);
  ------------------
  |  |   48|  72.5k|#define fe64_sqr x25519_fe64_sqr
  ------------------
  173|       |
  174|       |    /* t1 = z ** (2 ** 50 - 1) */
  175|  7.25k|    fe64_mul(t1, t2, t1);
  ------------------
  |  |   47|  7.25k|#define fe64_mul x25519_fe64_mul
  ------------------
  176|       |
  177|       |    /* t2 = z ** (2 ** 100 - 1) */
  178|  7.25k|    fe64_sqr(t2, t1);
  ------------------
  |  |   48|  7.25k|#define fe64_sqr x25519_fe64_sqr
  ------------------
  179|   362k|    for (i = 1; i < 50; ++i)
  ------------------
  |  Branch (179:17): [True: 355k, False: 7.25k]
  ------------------
  180|   355k|        fe64_sqr(t2, t2);
  ------------------
  |  |   48|   355k|#define fe64_sqr x25519_fe64_sqr
  ------------------
  181|       |
  182|  7.25k|    fe64_mul(t2, t2, t1);
  ------------------
  |  |   47|  7.25k|#define fe64_mul x25519_fe64_mul
  ------------------
  183|       |
  184|       |    /* t2 = z ** (2 ** 200 - 1) */
  185|  7.25k|    fe64_sqr(t3, t2);
  ------------------
  |  |   48|  7.25k|#define fe64_sqr x25519_fe64_sqr
  ------------------
  186|   725k|    for (i = 1; i < 100; ++i)
  ------------------
  |  Branch (186:17): [True: 718k, False: 7.25k]
  ------------------
  187|   718k|        fe64_sqr(t3, t3);
  ------------------
  |  |   48|   718k|#define fe64_sqr x25519_fe64_sqr
  ------------------
  188|       |
  189|  7.25k|    fe64_mul(t2, t3, t2);
  ------------------
  |  |   47|  7.25k|#define fe64_mul x25519_fe64_mul
  ------------------
  190|       |
  191|       |    /* t2 = z ** ((2 ** 50) * (2 ** 200 - 1) */
  192|   370k|    for (i = 0; i < 50; ++i)
  ------------------
  |  Branch (192:17): [True: 362k, False: 7.25k]
  ------------------
  193|   362k|        fe64_sqr(t2, t2);
  ------------------
  |  |   48|   362k|#define fe64_sqr x25519_fe64_sqr
  ------------------
  194|       |
  195|       |    /* t1 = z ** (2 ** 250 - 1) */
  196|  7.25k|    fe64_mul(t1, t2, t1);
  ------------------
  |  |   47|  7.25k|#define fe64_mul x25519_fe64_mul
  ------------------
  197|       |
  198|       |    /* t1 = z ** ((2 ** 5) * (2 ** 250 - 1)) */
  199|  43.5k|    for (i = 0; i < 5; ++i)
  ------------------
  |  Branch (199:17): [True: 36.2k, False: 7.25k]
  ------------------
  200|  36.2k|        fe64_sqr(t1, t1);
  ------------------
  |  |   48|  36.2k|#define fe64_sqr x25519_fe64_sqr
  ------------------
  201|       |
  202|       |    /* Recall t0 = z ** 11; out = z ** (2 ** 255 - 21) */
  203|  7.25k|    fe64_mul(out, t1, t0);
  ------------------
  |  |   47|  7.25k|#define fe64_mul x25519_fe64_mul
  ------------------
  204|  7.25k|}
curve25519.c:fe_add:
 1046|  2.88M|{
 1047|  2.88M|    unsigned i;
 1048|       |
 1049|  31.7M|    for (i = 0; i < 10; i++) {
  ------------------
  |  Branch (1049:17): [True: 28.8M, False: 2.88M]
  ------------------
 1050|  28.8M|        h[i] = f[i] + g[i];
 1051|  28.8M|    }
 1052|  2.88M|}
curve25519.c:fe_sub:
 1067|  2.23M|{
 1068|  2.23M|    unsigned i;
 1069|       |
 1070|  24.5M|    for (i = 0; i < 10; i++) {
  ------------------
  |  Branch (1070:17): [True: 22.3M, False: 2.23M]
  ------------------
 1071|  22.3M|        h[i] = f[i] - g[i];
 1072|  22.3M|    }
 1073|  2.23M|}
curve25519.c:fe_invert:
 1516|  10.8k|{
 1517|  10.8k|    fe t0;
 1518|  10.8k|    fe t1;
 1519|  10.8k|    fe t2;
 1520|  10.8k|    fe t3;
 1521|  10.8k|    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|  10.8k|    fe_sq(t0, z);
 1530|       |
 1531|       |    /* t1 = t0 ** (2 ** 2) = z ** 8 */
 1532|  10.8k|    fe_sq(t1, t0);
 1533|  10.8k|    fe_sq(t1, t1);
 1534|       |
 1535|       |    /* t1 = z * t1 = z ** 9 */
 1536|  10.8k|    fe_mul(t1, z, t1);
 1537|       |    /* t0 = t0 * t1 = z ** 11 -- stash t0 away for the end. */
 1538|  10.8k|    fe_mul(t0, t0, t1);
 1539|       |
 1540|       |    /* t2 = t0 ** 2 = z ** 22 */
 1541|  10.8k|    fe_sq(t2, t0);
 1542|       |
 1543|       |    /* t1 = t1 * t2 = z ** (2 ** 5 - 1) */
 1544|  10.8k|    fe_mul(t1, t1, t2);
 1545|       |
 1546|       |    /* t2 = t1 ** (2 ** 5) = z ** ((2 ** 5) * (2 ** 5 - 1)) */
 1547|  10.8k|    fe_sq(t2, t1);
 1548|  54.4k|    for (i = 1; i < 5; ++i) {
  ------------------
  |  Branch (1548:17): [True: 43.5k, False: 10.8k]
  ------------------
 1549|  43.5k|        fe_sq(t2, t2);
 1550|  43.5k|    }
 1551|       |
 1552|       |    /* t1 = t1 * t2 = z ** ((2 ** 5 + 1) * (2 ** 5 - 1)) = z ** (2 ** 10 - 1) */
 1553|  10.8k|    fe_mul(t1, t2, t1);
 1554|       |
 1555|       |    /* Continuing similarly... */
 1556|       |
 1557|       |    /* t2 = z ** (2 ** 20 - 1) */
 1558|  10.8k|    fe_sq(t2, t1);
 1559|   108k|    for (i = 1; i < 10; ++i) {
  ------------------
  |  Branch (1559:17): [True: 97.9k, False: 10.8k]
  ------------------
 1560|  97.9k|        fe_sq(t2, t2);
 1561|  97.9k|    }
 1562|  10.8k|    fe_mul(t2, t2, t1);
 1563|       |
 1564|       |    /* t2 = z ** (2 ** 40 - 1) */
 1565|  10.8k|    fe_sq(t3, t2);
 1566|   217k|    for (i = 1; i < 20; ++i) {
  ------------------
  |  Branch (1566:17): [True: 206k, False: 10.8k]
  ------------------
 1567|   206k|        fe_sq(t3, t3);
 1568|   206k|    }
 1569|  10.8k|    fe_mul(t2, t3, t2);
 1570|       |
 1571|       |    /* t2 = z ** (2 ** 10) * (2 ** 40 - 1) */
 1572|   119k|    for (i = 0; i < 10; ++i) {
  ------------------
  |  Branch (1572:17): [True: 108k, False: 10.8k]
  ------------------
 1573|   108k|        fe_sq(t2, t2);
 1574|   108k|    }
 1575|       |    /* t1 = z ** (2 ** 50 - 1) */
 1576|  10.8k|    fe_mul(t1, t2, t1);
 1577|       |
 1578|       |    /* t2 = z ** (2 ** 100 - 1) */
 1579|  10.8k|    fe_sq(t2, t1);
 1580|   544k|    for (i = 1; i < 50; ++i) {
  ------------------
  |  Branch (1580:17): [True: 533k, False: 10.8k]
  ------------------
 1581|   533k|        fe_sq(t2, t2);
 1582|   533k|    }
 1583|  10.8k|    fe_mul(t2, t2, t1);
 1584|       |
 1585|       |    /* t2 = z ** (2 ** 200 - 1) */
 1586|  10.8k|    fe_sq(t3, t2);
 1587|  1.08M|    for (i = 1; i < 100; ++i) {
  ------------------
  |  Branch (1587:17): [True: 1.07M, False: 10.8k]
  ------------------
 1588|  1.07M|        fe_sq(t3, t3);
 1589|  1.07M|    }
 1590|  10.8k|    fe_mul(t2, t3, t2);
 1591|       |
 1592|       |    /* t2 = z ** ((2 ** 50) * (2 ** 200 - 1) */
 1593|  10.8k|    fe_sq(t2, t2);
 1594|   544k|    for (i = 1; i < 50; ++i) {
  ------------------
  |  Branch (1594:17): [True: 533k, False: 10.8k]
  ------------------
 1595|   533k|        fe_sq(t2, t2);
 1596|   533k|    }
 1597|       |
 1598|       |    /* t1 = z ** (2 ** 250 - 1) */
 1599|  10.8k|    fe_mul(t1, t2, t1);
 1600|       |
 1601|       |    /* t1 = z ** ((2 ** 5) * (2 ** 250 - 1)) */
 1602|  10.8k|    fe_sq(t1, t1);
 1603|  54.4k|    for (i = 1; i < 5; ++i) {
  ------------------
  |  Branch (1603:17): [True: 43.5k, False: 10.8k]
  ------------------
 1604|  43.5k|        fe_sq(t1, t1);
 1605|  43.5k|    }
 1606|       |
 1607|       |    /* Recall t0 = z ** 11; out = z ** (2 ** 255 - 21) */
 1608|  10.8k|    fe_mul(out, t1, t0);
 1609|  10.8k|}
curve25519.c:fe_mul:
 1106|  5.14M|{
 1107|  5.14M|    int32_t f0 = f[0];
 1108|  5.14M|    int32_t f1 = f[1];
 1109|  5.14M|    int32_t f2 = f[2];
 1110|  5.14M|    int32_t f3 = f[3];
 1111|  5.14M|    int32_t f4 = f[4];
 1112|  5.14M|    int32_t f5 = f[5];
 1113|  5.14M|    int32_t f6 = f[6];
 1114|  5.14M|    int32_t f7 = f[7];
 1115|  5.14M|    int32_t f8 = f[8];
 1116|  5.14M|    int32_t f9 = f[9];
 1117|  5.14M|    int32_t g0 = g[0];
 1118|  5.14M|    int32_t g1 = g[1];
 1119|  5.14M|    int32_t g2 = g[2];
 1120|  5.14M|    int32_t g3 = g[3];
 1121|  5.14M|    int32_t g4 = g[4];
 1122|  5.14M|    int32_t g5 = g[5];
 1123|  5.14M|    int32_t g6 = g[6];
 1124|  5.14M|    int32_t g7 = g[7];
 1125|  5.14M|    int32_t g8 = g[8];
 1126|  5.14M|    int32_t g9 = g[9];
 1127|  5.14M|    int32_t g1_19 = 19 * g1; /* 1.959375*2^29 */
 1128|  5.14M|    int32_t g2_19 = 19 * g2; /* 1.959375*2^30; still ok */
 1129|  5.14M|    int32_t g3_19 = 19 * g3;
 1130|  5.14M|    int32_t g4_19 = 19 * g4;
 1131|  5.14M|    int32_t g5_19 = 19 * g5;
 1132|  5.14M|    int32_t g6_19 = 19 * g6;
 1133|  5.14M|    int32_t g7_19 = 19 * g7;
 1134|  5.14M|    int32_t g8_19 = 19 * g8;
 1135|  5.14M|    int32_t g9_19 = 19 * g9;
 1136|  5.14M|    int32_t f1_2 = 2 * f1;
 1137|  5.14M|    int32_t f3_2 = 2 * f3;
 1138|  5.14M|    int32_t f5_2 = 2 * f5;
 1139|  5.14M|    int32_t f7_2 = 2 * f7;
 1140|  5.14M|    int32_t f9_2 = 2 * f9;
 1141|  5.14M|    int64_t f0g0 = f0 * (int64_t)g0;
 1142|  5.14M|    int64_t f0g1 = f0 * (int64_t)g1;
 1143|  5.14M|    int64_t f0g2 = f0 * (int64_t)g2;
 1144|  5.14M|    int64_t f0g3 = f0 * (int64_t)g3;
 1145|  5.14M|    int64_t f0g4 = f0 * (int64_t)g4;
 1146|  5.14M|    int64_t f0g5 = f0 * (int64_t)g5;
 1147|  5.14M|    int64_t f0g6 = f0 * (int64_t)g6;
 1148|  5.14M|    int64_t f0g7 = f0 * (int64_t)g7;
 1149|  5.14M|    int64_t f0g8 = f0 * (int64_t)g8;
 1150|  5.14M|    int64_t f0g9 = f0 * (int64_t)g9;
 1151|  5.14M|    int64_t f1g0 = f1 * (int64_t)g0;
 1152|  5.14M|    int64_t f1g1_2 = f1_2 * (int64_t)g1;
 1153|  5.14M|    int64_t f1g2 = f1 * (int64_t)g2;
 1154|  5.14M|    int64_t f1g3_2 = f1_2 * (int64_t)g3;
 1155|  5.14M|    int64_t f1g4 = f1 * (int64_t)g4;
 1156|  5.14M|    int64_t f1g5_2 = f1_2 * (int64_t)g5;
 1157|  5.14M|    int64_t f1g6 = f1 * (int64_t)g6;
 1158|  5.14M|    int64_t f1g7_2 = f1_2 * (int64_t)g7;
 1159|  5.14M|    int64_t f1g8 = f1 * (int64_t)g8;
 1160|  5.14M|    int64_t f1g9_38 = f1_2 * (int64_t)g9_19;
 1161|  5.14M|    int64_t f2g0 = f2 * (int64_t)g0;
 1162|  5.14M|    int64_t f2g1 = f2 * (int64_t)g1;
 1163|  5.14M|    int64_t f2g2 = f2 * (int64_t)g2;
 1164|  5.14M|    int64_t f2g3 = f2 * (int64_t)g3;
 1165|  5.14M|    int64_t f2g4 = f2 * (int64_t)g4;
 1166|  5.14M|    int64_t f2g5 = f2 * (int64_t)g5;
 1167|  5.14M|    int64_t f2g6 = f2 * (int64_t)g6;
 1168|  5.14M|    int64_t f2g7 = f2 * (int64_t)g7;
 1169|  5.14M|    int64_t f2g8_19 = f2 * (int64_t)g8_19;
 1170|  5.14M|    int64_t f2g9_19 = f2 * (int64_t)g9_19;
 1171|  5.14M|    int64_t f3g0 = f3 * (int64_t)g0;
 1172|  5.14M|    int64_t f3g1_2 = f3_2 * (int64_t)g1;
 1173|  5.14M|    int64_t f3g2 = f3 * (int64_t)g2;
 1174|  5.14M|    int64_t f3g3_2 = f3_2 * (int64_t)g3;
 1175|  5.14M|    int64_t f3g4 = f3 * (int64_t)g4;
 1176|  5.14M|    int64_t f3g5_2 = f3_2 * (int64_t)g5;
 1177|  5.14M|    int64_t f3g6 = f3 * (int64_t)g6;
 1178|  5.14M|    int64_t f3g7_38 = f3_2 * (int64_t)g7_19;
 1179|  5.14M|    int64_t f3g8_19 = f3 * (int64_t)g8_19;
 1180|  5.14M|    int64_t f3g9_38 = f3_2 * (int64_t)g9_19;
 1181|  5.14M|    int64_t f4g0 = f4 * (int64_t)g0;
 1182|  5.14M|    int64_t f4g1 = f4 * (int64_t)g1;
 1183|  5.14M|    int64_t f4g2 = f4 * (int64_t)g2;
 1184|  5.14M|    int64_t f4g3 = f4 * (int64_t)g3;
 1185|  5.14M|    int64_t f4g4 = f4 * (int64_t)g4;
 1186|  5.14M|    int64_t f4g5 = f4 * (int64_t)g5;
 1187|  5.14M|    int64_t f4g6_19 = f4 * (int64_t)g6_19;
 1188|  5.14M|    int64_t f4g7_19 = f4 * (int64_t)g7_19;
 1189|  5.14M|    int64_t f4g8_19 = f4 * (int64_t)g8_19;
 1190|  5.14M|    int64_t f4g9_19 = f4 * (int64_t)g9_19;
 1191|  5.14M|    int64_t f5g0 = f5 * (int64_t)g0;
 1192|  5.14M|    int64_t f5g1_2 = f5_2 * (int64_t)g1;
 1193|  5.14M|    int64_t f5g2 = f5 * (int64_t)g2;
 1194|  5.14M|    int64_t f5g3_2 = f5_2 * (int64_t)g3;
 1195|  5.14M|    int64_t f5g4 = f5 * (int64_t)g4;
 1196|  5.14M|    int64_t f5g5_38 = f5_2 * (int64_t)g5_19;
 1197|  5.14M|    int64_t f5g6_19 = f5 * (int64_t)g6_19;
 1198|  5.14M|    int64_t f5g7_38 = f5_2 * (int64_t)g7_19;
 1199|  5.14M|    int64_t f5g8_19 = f5 * (int64_t)g8_19;
 1200|  5.14M|    int64_t f5g9_38 = f5_2 * (int64_t)g9_19;
 1201|  5.14M|    int64_t f6g0 = f6 * (int64_t)g0;
 1202|  5.14M|    int64_t f6g1 = f6 * (int64_t)g1;
 1203|  5.14M|    int64_t f6g2 = f6 * (int64_t)g2;
 1204|  5.14M|    int64_t f6g3 = f6 * (int64_t)g3;
 1205|  5.14M|    int64_t f6g4_19 = f6 * (int64_t)g4_19;
 1206|  5.14M|    int64_t f6g5_19 = f6 * (int64_t)g5_19;
 1207|  5.14M|    int64_t f6g6_19 = f6 * (int64_t)g6_19;
 1208|  5.14M|    int64_t f6g7_19 = f6 * (int64_t)g7_19;
 1209|  5.14M|    int64_t f6g8_19 = f6 * (int64_t)g8_19;
 1210|  5.14M|    int64_t f6g9_19 = f6 * (int64_t)g9_19;
 1211|  5.14M|    int64_t f7g0 = f7 * (int64_t)g0;
 1212|  5.14M|    int64_t f7g1_2 = f7_2 * (int64_t)g1;
 1213|  5.14M|    int64_t f7g2 = f7 * (int64_t)g2;
 1214|  5.14M|    int64_t f7g3_38 = f7_2 * (int64_t)g3_19;
 1215|  5.14M|    int64_t f7g4_19 = f7 * (int64_t)g4_19;
 1216|  5.14M|    int64_t f7g5_38 = f7_2 * (int64_t)g5_19;
 1217|  5.14M|    int64_t f7g6_19 = f7 * (int64_t)g6_19;
 1218|  5.14M|    int64_t f7g7_38 = f7_2 * (int64_t)g7_19;
 1219|  5.14M|    int64_t f7g8_19 = f7 * (int64_t)g8_19;
 1220|  5.14M|    int64_t f7g9_38 = f7_2 * (int64_t)g9_19;
 1221|  5.14M|    int64_t f8g0 = f8 * (int64_t)g0;
 1222|  5.14M|    int64_t f8g1 = f8 * (int64_t)g1;
 1223|  5.14M|    int64_t f8g2_19 = f8 * (int64_t)g2_19;
 1224|  5.14M|    int64_t f8g3_19 = f8 * (int64_t)g3_19;
 1225|  5.14M|    int64_t f8g4_19 = f8 * (int64_t)g4_19;
 1226|  5.14M|    int64_t f8g5_19 = f8 * (int64_t)g5_19;
 1227|  5.14M|    int64_t f8g6_19 = f8 * (int64_t)g6_19;
 1228|  5.14M|    int64_t f8g7_19 = f8 * (int64_t)g7_19;
 1229|  5.14M|    int64_t f8g8_19 = f8 * (int64_t)g8_19;
 1230|  5.14M|    int64_t f8g9_19 = f8 * (int64_t)g9_19;
 1231|  5.14M|    int64_t f9g0 = f9 * (int64_t)g0;
 1232|  5.14M|    int64_t f9g1_38 = f9_2 * (int64_t)g1_19;
 1233|  5.14M|    int64_t f9g2_19 = f9 * (int64_t)g2_19;
 1234|  5.14M|    int64_t f9g3_38 = f9_2 * (int64_t)g3_19;
 1235|  5.14M|    int64_t f9g4_19 = f9 * (int64_t)g4_19;
 1236|  5.14M|    int64_t f9g5_38 = f9_2 * (int64_t)g5_19;
 1237|  5.14M|    int64_t f9g6_19 = f9 * (int64_t)g6_19;
 1238|  5.14M|    int64_t f9g7_38 = f9_2 * (int64_t)g7_19;
 1239|  5.14M|    int64_t f9g8_19 = f9 * (int64_t)g8_19;
 1240|  5.14M|    int64_t f9g9_38 = f9_2 * (int64_t)g9_19;
 1241|  5.14M|    int64_t h0 = f0g0 + f1g9_38 + f2g8_19 + f3g7_38 + f4g6_19 + f5g5_38 + f6g4_19 + f7g3_38 + f8g2_19 + f9g1_38;
 1242|  5.14M|    int64_t h1 = f0g1 + f1g0 + f2g9_19 + f3g8_19 + f4g7_19 + f5g6_19 + f6g5_19 + f7g4_19 + f8g3_19 + f9g2_19;
 1243|  5.14M|    int64_t h2 = f0g2 + f1g1_2 + f2g0 + f3g9_38 + f4g8_19 + f5g7_38 + f6g6_19 + f7g5_38 + f8g4_19 + f9g3_38;
 1244|  5.14M|    int64_t h3 = f0g3 + f1g2 + f2g1 + f3g0 + f4g9_19 + f5g8_19 + f6g7_19 + f7g6_19 + f8g5_19 + f9g4_19;
 1245|  5.14M|    int64_t h4 = f0g4 + f1g3_2 + f2g2 + f3g1_2 + f4g0 + f5g9_38 + f6g8_19 + f7g7_38 + f8g6_19 + f9g5_38;
 1246|  5.14M|    int64_t h5 = f0g5 + f1g4 + f2g3 + f3g2 + f4g1 + f5g0 + f6g9_19 + f7g8_19 + f8g7_19 + f9g6_19;
 1247|  5.14M|    int64_t h6 = f0g6 + f1g5_2 + f2g4 + f3g3_2 + f4g2 + f5g1_2 + f6g0 + f7g9_38 + f8g8_19 + f9g7_38;
 1248|  5.14M|    int64_t h7 = f0g7 + f1g6 + f2g5 + f3g4 + f4g3 + f5g2 + f6g1 + f7g0 + f8g9_19 + f9g8_19;
 1249|  5.14M|    int64_t h8 = f0g8 + f1g7_2 + f2g6 + f3g5_2 + f4g4 + f5g3_2 + f6g2 + f7g1_2 + f8g0 + f9g9_38;
 1250|  5.14M|    int64_t h9 = f0g9 + f1g8 + f2g7 + f3g6 + f4g5 + f5g4 + f6g3 + f7g2 + f8g1 + f9g0;
 1251|  5.14M|    int64_t carry0;
 1252|  5.14M|    int64_t carry1;
 1253|  5.14M|    int64_t carry2;
 1254|  5.14M|    int64_t carry3;
 1255|  5.14M|    int64_t carry4;
 1256|  5.14M|    int64_t carry5;
 1257|  5.14M|    int64_t carry6;
 1258|  5.14M|    int64_t carry7;
 1259|  5.14M|    int64_t carry8;
 1260|  5.14M|    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|  5.14M|    carry0 = h0 + (1 << 25);
 1268|  5.14M|    h1 += carry0 >> 26;
 1269|  5.14M|    h0 -= carry0 & kTop38Bits;
 1270|  5.14M|    carry4 = h4 + (1 << 25);
 1271|  5.14M|    h5 += carry4 >> 26;
 1272|  5.14M|    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|  5.14M|    carry1 = h1 + (1 << 24);
 1279|  5.14M|    h2 += carry1 >> 25;
 1280|  5.14M|    h1 -= carry1 & kTop39Bits;
 1281|  5.14M|    carry5 = h5 + (1 << 24);
 1282|  5.14M|    h6 += carry5 >> 25;
 1283|  5.14M|    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|  5.14M|    carry2 = h2 + (1 << 25);
 1290|  5.14M|    h3 += carry2 >> 26;
 1291|  5.14M|    h2 -= carry2 & kTop38Bits;
 1292|  5.14M|    carry6 = h6 + (1 << 25);
 1293|  5.14M|    h7 += carry6 >> 26;
 1294|  5.14M|    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|  5.14M|    carry3 = h3 + (1 << 24);
 1301|  5.14M|    h4 += carry3 >> 25;
 1302|  5.14M|    h3 -= carry3 & kTop39Bits;
 1303|  5.14M|    carry7 = h7 + (1 << 24);
 1304|  5.14M|    h8 += carry7 >> 25;
 1305|  5.14M|    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|  5.14M|    carry4 = h4 + (1 << 25);
 1312|  5.14M|    h5 += carry4 >> 26;
 1313|  5.14M|    h4 -= carry4 & kTop38Bits;
 1314|  5.14M|    carry8 = h8 + (1 << 25);
 1315|  5.14M|    h9 += carry8 >> 26;
 1316|  5.14M|    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|  5.14M|    carry9 = h9 + (1 << 24);
 1323|  5.14M|    h0 += (carry9 >> 25) * 19;
 1324|  5.14M|    h9 -= carry9 & kTop39Bits;
 1325|       |    /* |h9| <= 2^24; from now on fits into int32 unchanged */
 1326|       |    /* |h0| <= 1.1*2^39 */
 1327|       |
 1328|  5.14M|    carry0 = h0 + (1 << 25);
 1329|  5.14M|    h1 += carry0 >> 26;
 1330|  5.14M|    h0 -= carry0 & kTop38Bits;
 1331|       |    /* |h0| <= 2^25; from now on fits into int32 unchanged */
 1332|       |    /* |h1| <= 1.01*2^24 */
 1333|       |
 1334|  5.14M|    h[0] = (int32_t)h0;
 1335|  5.14M|    h[1] = (int32_t)h1;
 1336|  5.14M|    h[2] = (int32_t)h2;
 1337|  5.14M|    h[3] = (int32_t)h3;
 1338|  5.14M|    h[4] = (int32_t)h4;
 1339|  5.14M|    h[5] = (int32_t)h5;
 1340|  5.14M|    h[6] = (int32_t)h6;
 1341|  5.14M|    h[7] = (int32_t)h7;
 1342|  5.14M|    h[8] = (int32_t)h8;
 1343|  5.14M|    h[9] = (int32_t)h9;
 1344|  5.14M|}
curve25519.c:fe_tobytes:
  924|  10.8k|{
  925|  10.8k|    int32_t h0 = h[0];
  926|  10.8k|    int32_t h1 = h[1];
  927|  10.8k|    int32_t h2 = h[2];
  928|  10.8k|    int32_t h3 = h[3];
  929|  10.8k|    int32_t h4 = h[4];
  930|  10.8k|    int32_t h5 = h[5];
  931|  10.8k|    int32_t h6 = h[6];
  932|  10.8k|    int32_t h7 = h[7];
  933|  10.8k|    int32_t h8 = h[8];
  934|  10.8k|    int32_t h9 = h[9];
  935|  10.8k|    int32_t q;
  936|       |
  937|  10.8k|    q = (19 * h9 + (((int32_t)1) << 24)) >> 25;
  938|  10.8k|    q = (h0 + q) >> 26;
  939|  10.8k|    q = (h1 + q) >> 25;
  940|  10.8k|    q = (h2 + q) >> 26;
  941|  10.8k|    q = (h3 + q) >> 25;
  942|  10.8k|    q = (h4 + q) >> 26;
  943|  10.8k|    q = (h5 + q) >> 25;
  944|  10.8k|    q = (h6 + q) >> 26;
  945|  10.8k|    q = (h7 + q) >> 25;
  946|  10.8k|    q = (h8 + q) >> 26;
  947|  10.8k|    q = (h9 + q) >> 25;
  948|       |
  949|       |    /* Goal: Output h-(2^255-19)q, which is between 0 and 2^255-20. */
  950|  10.8k|    h0 += 19 * q;
  951|       |    /* Goal: Output h-2^255 q, which is between 0 and 2^255-20. */
  952|       |
  953|  10.8k|    h1 += h0 >> 26;
  954|  10.8k|    h0 &= kBottom26Bits;
  955|  10.8k|    h2 += h1 >> 25;
  956|  10.8k|    h1 &= kBottom25Bits;
  957|  10.8k|    h3 += h2 >> 26;
  958|  10.8k|    h2 &= kBottom26Bits;
  959|  10.8k|    h4 += h3 >> 25;
  960|  10.8k|    h3 &= kBottom25Bits;
  961|  10.8k|    h5 += h4 >> 26;
  962|  10.8k|    h4 &= kBottom26Bits;
  963|  10.8k|    h6 += h5 >> 25;
  964|  10.8k|    h5 &= kBottom25Bits;
  965|  10.8k|    h7 += h6 >> 26;
  966|  10.8k|    h6 &= kBottom26Bits;
  967|  10.8k|    h8 += h7 >> 25;
  968|  10.8k|    h7 &= kBottom25Bits;
  969|  10.8k|    h9 += h8 >> 26;
  970|  10.8k|    h8 &= kBottom26Bits;
  971|  10.8k|    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|  10.8k|    s[0] = (uint8_t)(h0 >> 0);
  981|  10.8k|    s[1] = (uint8_t)(h0 >> 8);
  982|  10.8k|    s[2] = (uint8_t)(h0 >> 16);
  983|  10.8k|    s[3] = (uint8_t)((h0 >> 24) | ((uint32_t)(h1) << 2));
  984|  10.8k|    s[4] = (uint8_t)(h1 >> 6);
  985|  10.8k|    s[5] = (uint8_t)(h1 >> 14);
  986|  10.8k|    s[6] = (uint8_t)((h1 >> 22) | ((uint32_t)(h2) << 3));
  987|  10.8k|    s[7] = (uint8_t)(h2 >> 5);
  988|  10.8k|    s[8] = (uint8_t)(h2 >> 13);
  989|  10.8k|    s[9] = (uint8_t)((h2 >> 21) | ((uint32_t)(h3) << 5));
  990|  10.8k|    s[10] = (uint8_t)(h3 >> 3);
  991|  10.8k|    s[11] = (uint8_t)(h3 >> 11);
  992|  10.8k|    s[12] = (uint8_t)((h3 >> 19) | ((uint32_t)(h4) << 6));
  993|  10.8k|    s[13] = (uint8_t)(h4 >> 2);
  994|  10.8k|    s[14] = (uint8_t)(h4 >> 10);
  995|  10.8k|    s[15] = (uint8_t)(h4 >> 18);
  996|  10.8k|    s[16] = (uint8_t)(h5 >> 0);
  997|  10.8k|    s[17] = (uint8_t)(h5 >> 8);
  998|  10.8k|    s[18] = (uint8_t)(h5 >> 16);
  999|  10.8k|    s[19] = (uint8_t)((h5 >> 24) | ((uint32_t)(h6) << 1));
 1000|  10.8k|    s[20] = (uint8_t)(h6 >> 7);
 1001|  10.8k|    s[21] = (uint8_t)(h6 >> 15);
 1002|  10.8k|    s[22] = (uint8_t)((h6 >> 23) | ((uint32_t)(h7) << 3));
 1003|  10.8k|    s[23] = (uint8_t)(h7 >> 5);
 1004|  10.8k|    s[24] = (uint8_t)(h7 >> 13);
 1005|  10.8k|    s[25] = (uint8_t)((h7 >> 21) | ((uint32_t)(h8) << 4));
 1006|  10.8k|    s[26] = (uint8_t)(h8 >> 4);
 1007|  10.8k|    s[27] = (uint8_t)(h8 >> 12);
 1008|  10.8k|    s[28] = (uint8_t)((h8 >> 20) | ((uint32_t)(h9) << 6));
 1009|  10.8k|    s[29] = (uint8_t)(h9 >> 2);
 1010|  10.8k|    s[30] = (uint8_t)(h9 >> 10);
 1011|  10.8k|    s[31] = (uint8_t)(h9 >> 18);
 1012|  10.8k|}

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

d2i_ECPrivateKey:
  930|  3.73k|{
  931|  3.73k|    EC_KEY *ret = NULL;
  932|  3.73k|    EC_PRIVATEKEY *priv_key = NULL;
  933|  3.73k|    const unsigned char *p = *in;
  934|       |
  935|  3.73k|    if ((priv_key = d2i_EC_PRIVATEKEY(NULL, &p, len)) == NULL)
  ------------------
  |  Branch (935:9): [True: 0, False: 3.73k]
  ------------------
  936|      0|        return NULL;
  937|       |
  938|  3.73k|    if (a == NULL || *a == NULL) {
  ------------------
  |  Branch (938:9): [True: 0, False: 3.73k]
  |  Branch (938:22): [True: 0, False: 3.73k]
  ------------------
  939|      0|        if ((ret = EC_KEY_new()) == NULL) {
  ------------------
  |  Branch (939:13): [True: 0, False: 0]
  ------------------
  940|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  941|      0|            goto err;
  942|      0|        }
  943|      0|    } else
  944|  3.73k|        ret = *a;
  945|       |
  946|  3.73k|    if (priv_key->parameters) {
  ------------------
  |  Branch (946:9): [True: 0, False: 3.73k]
  ------------------
  947|      0|        EC_GROUP_free(ret->group);
  948|      0|        ret->group = EC_GROUP_new_from_ecpkparameters(priv_key->parameters);
  949|      0|        if (ret->group != NULL
  ------------------
  |  Branch (949:13): [True: 0, False: 0]
  ------------------
  950|      0|            && priv_key->parameters->type == ECPKPARAMETERS_TYPE_EXPLICIT)
  ------------------
  |  Branch (950:16): [True: 0, False: 0]
  ------------------
  951|      0|            ret->group->decoded_from_explicit_params = 1;
  952|      0|    }
  953|       |
  954|  3.73k|    if (ret->group == NULL) {
  ------------------
  |  Branch (954:9): [True: 0, False: 3.73k]
  ------------------
  955|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  956|      0|        goto err;
  957|      0|    }
  958|       |
  959|  3.73k|#ifdef OPENSSL_NO_EC_EXPLICIT_CURVES
  960|  3.73k|    if (EC_GROUP_check_named_curve(ret->group, 0, NULL) == NID_undef) {
  ------------------
  |  |   18|  3.73k|#define NID_undef                       0
  ------------------
  |  Branch (960:9): [True: 0, False: 3.73k]
  ------------------
  961|      0|        ERR_raise(ERR_LIB_EC, EC_R_UNKNOWN_GROUP);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  962|      0|        goto err;
  963|      0|    }
  964|  3.73k|#endif
  965|       |
  966|  3.73k|    ret->version = priv_key->version;
  967|       |
  968|  3.73k|    if (priv_key->privateKey) {
  ------------------
  |  Branch (968:9): [True: 3.73k, False: 0]
  ------------------
  969|  3.73k|        ASN1_OCTET_STRING *pkey = priv_key->privateKey;
  970|  3.73k|        if (EC_KEY_oct2priv(ret, ASN1_STRING_get0_data(pkey),
  ------------------
  |  Branch (970:13): [True: 0, False: 3.73k]
  ------------------
  971|  3.73k|                ASN1_STRING_length(pkey))
  972|  3.73k|            == 0)
  973|      0|            goto err;
  974|  3.73k|    } else {
  975|      0|        ERR_raise(ERR_LIB_EC, EC_R_MISSING_PRIVATE_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  976|      0|        goto err;
  977|      0|    }
  978|       |
  979|  3.73k|    if (EC_GROUP_get_curve_name(ret->group) == NID_sm2)
  ------------------
  |  | 1259|  3.73k|#define NID_sm2         1172
  ------------------
  |  Branch (979:9): [True: 0, False: 3.73k]
  ------------------
  980|      0|        EC_KEY_set_flags(ret, EC_FLAG_SM2_RANGE);
  ------------------
  |  |  962|      0|#define EC_FLAG_SM2_RANGE 0x0004
  ------------------
  981|       |
  982|  3.73k|    EC_POINT_clear_free(ret->pub_key);
  983|  3.73k|    ret->pub_key = EC_POINT_new(ret->group);
  984|  3.73k|    if (ret->pub_key == NULL) {
  ------------------
  |  Branch (984:9): [True: 0, False: 3.73k]
  ------------------
  985|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  986|      0|        goto err;
  987|      0|    }
  988|       |
  989|  3.73k|    if (priv_key->publicKey) {
  ------------------
  |  Branch (989:9): [True: 3.73k, False: 0]
  ------------------
  990|  3.73k|        const unsigned char *pub_oct;
  991|  3.73k|        int pub_oct_len;
  992|       |
  993|  3.73k|        pub_oct = ASN1_STRING_get0_data(priv_key->publicKey);
  994|  3.73k|        pub_oct_len = ASN1_STRING_length(priv_key->publicKey);
  995|  3.73k|        if (!EC_KEY_oct2key(ret, pub_oct, pub_oct_len, NULL)) {
  ------------------
  |  Branch (995:13): [True: 0, False: 3.73k]
  ------------------
  996|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  997|      0|            goto err;
  998|      0|        }
  999|  3.73k|    } else {
 1000|      0|        if (ret->group->meth->keygenpub == NULL
  ------------------
  |  Branch (1000:13): [True: 0, False: 0]
  ------------------
 1001|      0|            || ret->group->meth->keygenpub(ret) == 0)
  ------------------
  |  Branch (1001:16): [True: 0, False: 0]
  ------------------
 1002|      0|            goto err;
 1003|       |        /* Remember the original private-key-only encoding. */
 1004|      0|        ret->enc_flag |= EC_PKEY_NO_PUBKEY;
  ------------------
  |  |  959|      0|#define EC_PKEY_NO_PUBKEY 0x002
  ------------------
 1005|      0|    }
 1006|       |
 1007|  3.73k|    if (a)
  ------------------
  |  Branch (1007:9): [True: 3.73k, False: 0]
  ------------------
 1008|  3.73k|        *a = ret;
 1009|  3.73k|    EC_PRIVATEKEY_free(priv_key);
 1010|  3.73k|    *in = p;
 1011|  3.73k|    ret->dirty_cnt++;
 1012|  3.73k|    return ret;
 1013|       |
 1014|      0|err:
 1015|      0|    if (a == NULL || *a != ret)
  ------------------
  |  Branch (1015:9): [True: 0, False: 0]
  |  Branch (1015:22): [True: 0, False: 0]
  ------------------
 1016|      0|        EC_KEY_free(ret);
 1017|      0|    EC_PRIVATEKEY_free(priv_key);
 1018|       |    return NULL;
 1019|  3.73k|}
o2i_ECPublicKey:
 1137|  10.9k|{
 1138|  10.9k|    EC_KEY *ret = NULL;
 1139|       |
 1140|  10.9k|    if (a == NULL || (*a) == NULL || (*a)->group == NULL) {
  ------------------
  |  Branch (1140:9): [True: 0, False: 10.9k]
  |  Branch (1140:22): [True: 0, False: 10.9k]
  |  Branch (1140:38): [True: 0, False: 10.9k]
  ------------------
 1141|       |        /*
 1142|       |         * sorry, but a EC_GROUP-structure is necessary to set the public key
 1143|       |         */
 1144|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1145|      0|        return 0;
 1146|      0|    }
 1147|  10.9k|    ret = *a;
 1148|       |    /* EC_KEY_opt2key updates dirty_cnt */
 1149|  10.9k|    if (!EC_KEY_oct2key(ret, *in, len, NULL)) {
  ------------------
  |  Branch (1149:9): [True: 0, False: 10.9k]
  ------------------
 1150|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1151|      0|        return 0;
 1152|      0|    }
 1153|  10.9k|    *in += len;
 1154|  10.9k|    return ret;
 1155|  10.9k|}
ECDSA_SIG_new:
 1203|  7.25k|{
 1204|  7.25k|    ECDSA_SIG *sig = OPENSSL_zalloc(sizeof(*sig));
  ------------------
  |  |  109|  7.25k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1205|       |
 1206|  7.25k|    return sig;
 1207|  7.25k|}
ECDSA_SIG_free:
 1210|  7.25k|{
 1211|  7.25k|    if (sig == NULL)
  ------------------
  |  Branch (1211:9): [True: 0, False: 7.25k]
  ------------------
 1212|      0|        return;
 1213|  7.25k|    BN_clear_free(sig->r);
 1214|  7.25k|    BN_clear_free(sig->s);
 1215|  7.25k|    OPENSSL_free(sig);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1216|  7.25k|}
d2i_ECDSA_SIG:
 1219|  3.62k|{
 1220|  3.62k|    ECDSA_SIG *sig;
 1221|       |
 1222|  3.62k|    if (len < 0)
  ------------------
  |  Branch (1222:9): [True: 0, False: 3.62k]
  ------------------
 1223|      0|        return NULL;
 1224|  3.62k|    if (psig != NULL && *psig != NULL) {
  ------------------
  |  Branch (1224:9): [True: 3.62k, False: 0]
  |  Branch (1224:25): [True: 3.62k, False: 0]
  ------------------
 1225|  3.62k|        sig = *psig;
 1226|  3.62k|    } else {
 1227|      0|        sig = ECDSA_SIG_new();
 1228|      0|        if (sig == NULL)
  ------------------
  |  Branch (1228:13): [True: 0, False: 0]
  ------------------
 1229|      0|            return NULL;
 1230|      0|    }
 1231|  3.62k|    if (sig->r == NULL)
  ------------------
  |  Branch (1231:9): [True: 3.62k, False: 0]
  ------------------
 1232|  3.62k|        sig->r = BN_new();
 1233|  3.62k|    if (sig->s == NULL)
  ------------------
  |  Branch (1233:9): [True: 3.62k, False: 0]
  ------------------
 1234|  3.62k|        sig->s = BN_new();
 1235|  3.62k|    if (sig->r == NULL || sig->s == NULL
  ------------------
  |  Branch (1235:9): [True: 0, False: 3.62k]
  |  Branch (1235:27): [True: 0, False: 3.62k]
  ------------------
 1236|  3.62k|        || ossl_decode_der_dsa_sig(sig->r, sig->s, ppin, (size_t)len) == 0) {
  ------------------
  |  Branch (1236:12): [True: 0, False: 3.62k]
  ------------------
 1237|      0|        if (psig == NULL || *psig == NULL)
  ------------------
  |  Branch (1237:13): [True: 0, False: 0]
  |  Branch (1237:29): [True: 0, False: 0]
  ------------------
 1238|      0|            ECDSA_SIG_free(sig);
 1239|      0|        return NULL;
 1240|      0|    }
 1241|  3.62k|    if (psig != NULL && *psig == NULL)
  ------------------
  |  Branch (1241:9): [True: 3.62k, False: 0]
  |  Branch (1241:25): [True: 0, False: 3.62k]
  ------------------
 1242|      0|        *psig = sig;
 1243|  3.62k|    return sig;
 1244|  3.62k|}
i2d_ECDSA_SIG:
 1247|  29.1k|{
 1248|  29.1k|    BUF_MEM *buf = NULL;
 1249|  29.1k|    size_t encoded_len;
 1250|  29.1k|    WPACKET pkt;
 1251|       |
 1252|  29.1k|    if (ppout == NULL) {
  ------------------
  |  Branch (1252:9): [True: 21.9k, False: 7.25k]
  ------------------
 1253|  21.9k|        if (!WPACKET_init_null(&pkt, 0))
  ------------------
  |  Branch (1253:13): [True: 0, False: 21.9k]
  ------------------
 1254|      0|            return -1;
 1255|  21.9k|    } else if (*ppout == NULL) {
  ------------------
  |  Branch (1255:16): [True: 3.62k, False: 3.62k]
  ------------------
 1256|  3.62k|        if ((buf = BUF_MEM_new()) == NULL
  ------------------
  |  Branch (1256:13): [True: 0, False: 3.62k]
  ------------------
 1257|  3.62k|            || !WPACKET_init_len(&pkt, buf, 0)) {
  ------------------
  |  Branch (1257:16): [True: 0, False: 3.62k]
  ------------------
 1258|      0|            BUF_MEM_free(buf);
 1259|      0|            return -1;
 1260|      0|        }
 1261|  3.62k|    } else {
 1262|  3.62k|        if (!WPACKET_init_static_len(&pkt, *ppout, SIZE_MAX, 0))
  ------------------
  |  Branch (1262:13): [True: 0, False: 3.62k]
  ------------------
 1263|      0|            return -1;
 1264|  3.62k|    }
 1265|       |
 1266|  29.1k|    if (!ossl_encode_der_dsa_sig(&pkt, sig->r, sig->s)
  ------------------
  |  Branch (1266:9): [True: 0, False: 29.1k]
  ------------------
 1267|  29.1k|        || !WPACKET_get_total_written(&pkt, &encoded_len)
  ------------------
  |  Branch (1267:12): [True: 0, False: 29.1k]
  ------------------
 1268|  29.1k|        || !WPACKET_finish(&pkt)) {
  ------------------
  |  Branch (1268:12): [True: 0, False: 29.1k]
  ------------------
 1269|      0|        BUF_MEM_free(buf);
 1270|      0|        WPACKET_cleanup(&pkt);
 1271|      0|        return -1;
 1272|      0|    }
 1273|       |
 1274|  29.1k|    if (ppout != NULL) {
  ------------------
  |  Branch (1274:9): [True: 7.25k, False: 21.9k]
  ------------------
 1275|  7.25k|        if (*ppout == NULL) {
  ------------------
  |  Branch (1275:13): [True: 3.62k, False: 3.62k]
  ------------------
 1276|  3.62k|            *ppout = (unsigned char *)buf->data;
 1277|  3.62k|            buf->data = NULL;
 1278|  3.62k|            BUF_MEM_free(buf);
 1279|  3.62k|        } else {
 1280|  3.62k|            *ppout += encoded_len;
 1281|  3.62k|        }
 1282|  7.25k|    }
 1283|       |
 1284|  29.1k|    return (int)encoded_len;
 1285|  29.1k|}
ECDSA_size:
 1317|  21.9k|{
 1318|  21.9k|    int ret;
 1319|  21.9k|    ECDSA_SIG sig;
 1320|  21.9k|    const EC_GROUP *group;
 1321|  21.9k|    const BIGNUM *bn;
 1322|       |
 1323|  21.9k|    if (ec == NULL)
  ------------------
  |  Branch (1323:9): [True: 0, False: 21.9k]
  ------------------
 1324|      0|        return 0;
 1325|  21.9k|    group = EC_KEY_get0_group(ec);
 1326|  21.9k|    if (group == NULL)
  ------------------
  |  Branch (1326:9): [True: 0, False: 21.9k]
  ------------------
 1327|      0|        return 0;
 1328|       |
 1329|  21.9k|    bn = EC_GROUP_get0_order(group);
 1330|  21.9k|    if (bn == NULL)
  ------------------
  |  Branch (1330:9): [True: 0, False: 21.9k]
  ------------------
 1331|      0|        return 0;
 1332|       |
 1333|  21.9k|    sig.r = sig.s = (BIGNUM *)bn;
 1334|  21.9k|    ret = i2d_ECDSA_SIG(&sig, NULL);
 1335|       |
 1336|  21.9k|    if (ret < 0)
  ------------------
  |  Branch (1336:9): [True: 0, False: 21.9k]
  ------------------
 1337|      0|        ret = 0;
 1338|  21.9k|    return ret;
 1339|  21.9k|}

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

EC_GROUP_check_named_curve:
   21|  3.73k|{
   22|  3.73k|    int nid;
   23|  3.73k|    BN_CTX *new_ctx = NULL;
   24|       |
   25|  3.73k|    if (group == NULL) {
  ------------------
  |  Branch (25:9): [True: 0, False: 3.73k]
  ------------------
   26|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   27|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
   28|      0|    }
   29|       |
   30|  3.73k|    if (ctx == NULL) {
  ------------------
  |  Branch (30:9): [True: 3.73k, False: 0]
  ------------------
   31|  3.73k|        ctx = new_ctx = BN_CTX_new_ex(NULL);
   32|  3.73k|        if (ctx == NULL) {
  ------------------
  |  Branch (32:13): [True: 0, False: 3.73k]
  ------------------
   33|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   34|      0|            return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
   35|      0|        }
   36|  3.73k|    }
   37|       |
   38|  3.73k|    nid = ossl_ec_curve_nid_from_params(group, ctx);
   39|  3.73k|    if (nid > 0 && nist_only && EC_curve_nid2nist(nid) == NULL)
  ------------------
  |  Branch (39:9): [True: 3.73k, False: 0]
  |  Branch (39:20): [True: 0, False: 3.73k]
  |  Branch (39:33): [True: 0, False: 0]
  ------------------
   40|      0|        nid = NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
   41|       |
   42|  3.73k|    BN_CTX_free(new_ctx);
   43|  3.73k|    return nid;
   44|  3.73k|}

EC_GROUP_new_by_curve_name_ex:
 3020|  14.6k|{
 3021|  14.6k|    EC_GROUP *ret = NULL;
 3022|  14.6k|    const ec_list_element *curve;
 3023|       |
 3024|  14.6k|    if ((curve = ec_curve_nid2curve(nid)) == NULL
  ------------------
  |  Branch (3024:9): [True: 0, False: 14.6k]
  ------------------
 3025|  14.6k|        || (ret = ec_group_new_from_data(libctx, propq, *curve)) == NULL) {
  ------------------
  |  Branch (3025:12): [True: 0, False: 14.6k]
  ------------------
 3026|      0|#ifndef FIPS_MODULE
 3027|      0|        ERR_raise_data(ERR_LIB_EC, EC_R_UNKNOWN_GROUP,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EC, EC_R_UNKNOWN_GROUP,
  ------------------
  |  |   69|      0|#define ERR_LIB_EC 16
  ------------------
                      ERR_raise_data(ERR_LIB_EC, EC_R_UNKNOWN_GROUP,
  ------------------
  |  |   95|      0|#define EC_R_UNKNOWN_GROUP 129
  ------------------
 3028|      0|            "name=%s", OBJ_nid2sn(nid));
 3029|       |#else
 3030|       |        ERR_raise(ERR_LIB_EC, EC_R_UNKNOWN_GROUP);
 3031|       |#endif
 3032|      0|        return NULL;
 3033|      0|    }
 3034|       |
 3035|  14.6k|    return ret;
 3036|  14.6k|}
ossl_ec_curve_nid_from_params:
 3082|  3.73k|{
 3083|  3.73k|    int ret = -1, nid, len, field_type, param_len;
 3084|  3.73k|    size_t i, seed_len;
 3085|  3.73k|    const unsigned char *seed, *params_seed, *params;
 3086|  3.73k|    unsigned char *param_bytes = NULL;
 3087|  3.73k|    const EC_CURVE_DATA *data;
 3088|  3.73k|    const EC_POINT *generator = NULL;
 3089|  3.73k|    const BIGNUM *cofactor = NULL;
 3090|       |    /* An array of BIGNUMs for (p, a, b, x, y, order) */
 3091|  3.73k|    BIGNUM *bn[NUM_BN_FIELDS] = { NULL, NULL, NULL, NULL, NULL, NULL };
 3092|       |
 3093|       |    /* Use the optional named curve nid as a search field */
 3094|  3.73k|    nid = EC_GROUP_get_curve_name(group);
 3095|  3.73k|    field_type = EC_GROUP_get_field_type(group);
 3096|  3.73k|    seed_len = EC_GROUP_get_seed_len(group);
 3097|  3.73k|    seed = EC_GROUP_get0_seed(group);
 3098|  3.73k|    cofactor = EC_GROUP_get0_cofactor(group);
 3099|       |
 3100|  3.73k|    BN_CTX_start(ctx);
 3101|       |
 3102|       |    /*
 3103|       |     * The built-in curves contains data fields (p, a, b, x, y, order) that are
 3104|       |     * all zero-padded to be the same size. The size of the padding is
 3105|       |     * determined by either the number of bytes in the field modulus (p) or the
 3106|       |     * EC group order, whichever is larger.
 3107|       |     */
 3108|  3.73k|    param_len = BN_num_bytes(group->order);
  ------------------
  |  |  188|  3.73k|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
 3109|  3.73k|    len = BN_num_bytes(group->field);
  ------------------
  |  |  188|  3.73k|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
 3110|  3.73k|    if (len > param_len)
  ------------------
  |  Branch (3110:9): [True: 0, False: 3.73k]
  ------------------
 3111|      0|        param_len = len;
 3112|       |
 3113|       |    /* Allocate space to store the padded data for (p, a, b, x, y, order)  */
 3114|  3.73k|    param_bytes = OPENSSL_malloc_array(NUM_BN_FIELDS, param_len);
  ------------------
  |  |  111|  3.73k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3115|  3.73k|    if (param_bytes == NULL)
  ------------------
  |  Branch (3115:9): [True: 0, False: 3.73k]
  ------------------
 3116|      0|        goto end;
 3117|       |
 3118|       |    /* Create the bignums */
 3119|  26.1k|    for (i = 0; i < NUM_BN_FIELDS; ++i) {
  ------------------
  |  | 3072|  26.1k|#define NUM_BN_FIELDS 6
  ------------------
  |  Branch (3119:17): [True: 22.4k, False: 3.73k]
  ------------------
 3120|  22.4k|        if ((bn[i] = BN_CTX_get(ctx)) == NULL)
  ------------------
  |  Branch (3120:13): [True: 0, False: 22.4k]
  ------------------
 3121|      0|            goto end;
 3122|  22.4k|    }
 3123|       |    /*
 3124|       |     * Fill in the bn array with the same values as the internal curves
 3125|       |     * i.e. the values are p, a, b, x, y, order.
 3126|       |     */
 3127|       |    /* Get p, a & b */
 3128|  3.73k|    if (!(EC_GROUP_get_curve(group, bn[0], bn[1], bn[2], ctx)
  ------------------
  |  Branch (3128:11): [True: 3.73k, False: 0]
  ------------------
 3129|  3.73k|            && ((generator = EC_GROUP_get0_generator(group)) != NULL)
  ------------------
  |  Branch (3129:16): [True: 3.73k, False: 0]
  ------------------
 3130|       |            /* Get x & y */
 3131|  3.73k|            && EC_POINT_get_affine_coordinates(group, generator, bn[3], bn[4], ctx)
  ------------------
  |  Branch (3131:16): [True: 3.73k, False: 0]
  ------------------
 3132|       |            /* Get order */
 3133|  3.73k|            && EC_GROUP_get_order(group, bn[5], ctx)))
  ------------------
  |  Branch (3133:16): [True: 3.73k, False: 0]
  ------------------
 3134|      0|        goto end;
 3135|       |
 3136|       |    /*
 3137|       |     * Convert the bignum array to bytes that are joined together to form
 3138|       |     * a single buffer that contains data for all fields.
 3139|       |     * (p, a, b, x, y, order) are all zero padded to be the same size.
 3140|       |     */
 3141|  26.1k|    for (i = 0; i < NUM_BN_FIELDS; ++i) {
  ------------------
  |  | 3072|  26.1k|#define NUM_BN_FIELDS 6
  ------------------
  |  Branch (3141:17): [True: 22.4k, False: 3.73k]
  ------------------
 3142|  22.4k|        if (BN_bn2binpad(bn[i], &param_bytes[i * param_len], param_len) <= 0)
  ------------------
  |  Branch (3142:13): [True: 0, False: 22.4k]
  ------------------
 3143|      0|            goto end;
 3144|  22.4k|    }
 3145|       |
 3146|  74.6k|    for (i = 0; i < curve_list_length; i++) {
  ------------------
  |  | 2840|  74.6k|#define curve_list_length OSSL_NELEM(curve_list)
  |  |  ------------------
  |  |  |  |   14|  74.6k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
  |  Branch (3146:17): [True: 74.6k, False: 0]
  ------------------
 3147|  74.6k|        const ec_list_element curve = curve_list[i];
 3148|       |
 3149|  74.6k|        data = curve.data;
 3150|       |        /* Get the raw order byte data */
 3151|  74.6k|        params_seed = (const unsigned char *)(data + 1); /* skip header */
 3152|  74.6k|        params = params_seed + data->seed_len;
 3153|       |
 3154|       |        /* Look for unique fields in the fixed curve data */
 3155|  74.6k|        if (data->field_type == field_type
  ------------------
  |  Branch (3155:13): [True: 74.6k, False: 0]
  ------------------
 3156|  74.6k|            && param_len == data->param_len
  ------------------
  |  Branch (3156:16): [True: 7.46k, False: 67.2k]
  ------------------
 3157|  7.46k|            && (nid <= 0 || nid == curve.nid)
  ------------------
  |  Branch (3157:17): [True: 0, False: 7.46k]
  |  Branch (3157:29): [True: 3.73k, False: 3.73k]
  ------------------
 3158|       |            /* check the optional cofactor (ignore if its zero) */
 3159|  3.73k|            && (cofactor == NULL || BN_is_zero(cofactor)
  ------------------
  |  Branch (3159:17): [True: 0, False: 3.73k]
  |  Branch (3159:37): [True: 0, False: 3.73k]
  ------------------
 3160|  3.73k|                || BN_is_word(cofactor, (const BN_ULONG)curve.data->cofactor))
  ------------------
  |  Branch (3160:20): [True: 3.73k, False: 0]
  ------------------
 3161|       |            /* Check the optional seed (ignore if its not set) */
 3162|  3.73k|            && (data->seed_len == 0 || seed_len == 0
  ------------------
  |  Branch (3162:17): [True: 0, False: 3.73k]
  |  Branch (3162:40): [True: 0, False: 3.73k]
  ------------------
 3163|  3.73k|                || ((size_t)data->seed_len == seed_len
  ------------------
  |  Branch (3163:21): [True: 3.73k, False: 0]
  ------------------
 3164|  3.73k|                    && memcmp(params_seed, seed, seed_len) == 0))
  ------------------
  |  Branch (3164:24): [True: 3.73k, False: 0]
  ------------------
 3165|       |            /* Check that the groups params match the built-in curve params */
 3166|  3.73k|            && memcmp(param_bytes, params, param_len * NUM_BN_FIELDS)
  ------------------
  |  | 3072|  3.73k|#define NUM_BN_FIELDS 6
  ------------------
  |  Branch (3166:16): [True: 3.73k, False: 0]
  ------------------
 3167|  3.73k|                == 0) {
 3168|  3.73k|            ret = curve.nid;
 3169|  3.73k|            goto end;
 3170|  3.73k|        }
 3171|  74.6k|    }
 3172|       |    /* Gets here if the group was not found */
 3173|      0|    ret = NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
 3174|  3.73k|end:
 3175|  3.73k|    OPENSSL_free(param_bytes);
  ------------------
  |  |  132|  3.73k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3176|  3.73k|    BN_CTX_end(ctx);
 3177|  3.73k|    return ret;
 3178|      0|}
ec_curve.c:ec_curve_nid2curve:
 2843|  14.6k|{
 2844|  14.6k|    size_t i;
 2845|       |
 2846|  14.6k|    if (nid <= 0)
  ------------------
  |  Branch (2846:9): [True: 0, False: 14.6k]
  ------------------
 2847|      0|        return NULL;
 2848|       |
 2849|   293k|    for (i = 0; i < curve_list_length; i++) {
  ------------------
  |  | 2840|   293k|#define curve_list_length OSSL_NELEM(curve_list)
  |  |  ------------------
  |  |  |  |   14|   293k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
  |  Branch (2849:17): [True: 293k, False: 0]
  ------------------
 2850|   293k|        if (curve_list[i].nid == nid)
  ------------------
  |  Branch (2850:13): [True: 14.6k, False: 278k]
  ------------------
 2851|  14.6k|            return &curve_list[i];
 2852|   293k|    }
 2853|      0|    return NULL;
 2854|  14.6k|}
ec_curve.c:ec_group_new_from_data:
 2859|  14.6k|{
 2860|  14.6k|    EC_GROUP *group = NULL;
 2861|  14.6k|    EC_POINT *P = NULL;
 2862|  14.6k|    BN_CTX *ctx = NULL;
 2863|  14.6k|    BIGNUM *p = NULL, *a = NULL, *b = NULL, *x = NULL, *y = NULL, *order = NULL;
 2864|  14.6k|    int ok = 0;
 2865|  14.6k|    int seed_len, param_len;
 2866|  14.6k|    const EC_METHOD *meth;
 2867|  14.6k|    const EC_CURVE_DATA *data;
 2868|  14.6k|    const unsigned char *params;
 2869|       |
 2870|       |    /* If no curve data curve method must handle everything */
 2871|  14.6k|    if (curve.data == NULL)
  ------------------
  |  Branch (2871:9): [True: 0, False: 14.6k]
  ------------------
 2872|      0|        return ossl_ec_group_new_ex(libctx, propq,
 2873|      0|            curve.meth != NULL ? curve.meth() : NULL);
  ------------------
  |  Branch (2873:13): [True: 0, False: 0]
  ------------------
 2874|       |
 2875|  14.6k|    if ((ctx = BN_CTX_new_ex(libctx)) == NULL) {
  ------------------
  |  Branch (2875:9): [True: 0, False: 14.6k]
  ------------------
 2876|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2877|      0|        goto err;
 2878|      0|    }
 2879|       |
 2880|  14.6k|    data = curve.data;
 2881|  14.6k|    seed_len = data->seed_len;
 2882|  14.6k|    param_len = data->param_len;
 2883|  14.6k|    params = (const unsigned char *)(data + 1); /* skip header */
 2884|       |
 2885|  14.6k|    if (curve.meth != NULL) {
  ------------------
  |  Branch (2885:9): [True: 14.6k, False: 0]
  ------------------
 2886|  14.6k|        meth = curve.meth();
 2887|  14.6k|        if ((group = ossl_ec_group_new_ex(libctx, propq, meth)) == NULL) {
  ------------------
  |  Branch (2887:13): [True: 0, False: 14.6k]
  ------------------
 2888|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2889|      0|            goto err;
 2890|      0|        }
 2891|  14.6k|        if (group->meth->group_full_init != NULL) {
  ------------------
  |  Branch (2891:13): [True: 14.6k, False: 0]
  ------------------
 2892|  14.6k|            if (!group->meth->group_full_init(group, params)) {
  ------------------
  |  Branch (2892:17): [True: 0, False: 14.6k]
  ------------------
 2893|      0|                ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2894|      0|                goto err;
 2895|      0|            }
 2896|  14.6k|            EC_GROUP_set_curve_name(group, curve.nid);
 2897|  14.6k|            BN_CTX_free(ctx);
 2898|  14.6k|            return group;
 2899|  14.6k|        }
 2900|  14.6k|    }
 2901|       |
 2902|      0|    params += seed_len; /* skip seed */
 2903|       |
 2904|      0|    if ((p = BN_bin2bn(params + 0 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (2904:9): [True: 0, False: 0]
  ------------------
 2905|      0|        || (a = BN_bin2bn(params + 1 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (2905:12): [True: 0, False: 0]
  ------------------
 2906|      0|        || (b = BN_bin2bn(params + 2 * param_len, param_len, NULL)) == NULL) {
  ------------------
  |  Branch (2906:12): [True: 0, False: 0]
  ------------------
 2907|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2908|      0|        goto err;
 2909|      0|    }
 2910|       |
 2911|      0|    if (group != NULL) {
  ------------------
  |  Branch (2911:9): [True: 0, False: 0]
  ------------------
 2912|      0|        if (group->meth->group_set_curve(group, p, a, b, ctx) == 0) {
  ------------------
  |  Branch (2912:13): [True: 0, False: 0]
  ------------------
 2913|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2914|      0|            goto err;
 2915|      0|        }
 2916|      0|    } else if (data->field_type == NID_X9_62_prime_field) {
  ------------------
  |  |  152|      0|#define NID_X9_62_prime_field           406
  ------------------
  |  Branch (2916:16): [True: 0, False: 0]
  ------------------
 2917|      0|        if ((group = EC_GROUP_new_curve_GFp(p, a, b, ctx)) == NULL) {
  ------------------
  |  Branch (2917:13): [True: 0, False: 0]
  ------------------
 2918|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2919|      0|            goto err;
 2920|      0|        }
 2921|      0|    }
 2922|      0|#ifndef OPENSSL_NO_EC2M
 2923|      0|    else { /* field_type ==
 2924|       |            * NID_X9_62_characteristic_two_field */
 2925|       |
 2926|      0|        if ((group = EC_GROUP_new_curve_GF2m(p, a, b, ctx)) == NULL) {
  ------------------
  |  Branch (2926:13): [True: 0, False: 0]
  ------------------
 2927|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2928|      0|            goto err;
 2929|      0|        }
 2930|      0|    }
 2931|      0|#endif
 2932|       |
 2933|      0|    EC_GROUP_set_curve_name(group, curve.nid);
 2934|       |
 2935|      0|    if ((P = EC_POINT_new(group)) == NULL) {
  ------------------
  |  Branch (2935:9): [True: 0, False: 0]
  ------------------
 2936|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2937|      0|        goto err;
 2938|      0|    }
 2939|       |
 2940|      0|    if ((x = BN_bin2bn(params + 3 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (2940:9): [True: 0, False: 0]
  ------------------
 2941|      0|        || (y = BN_bin2bn(params + 4 * param_len, param_len, NULL)) == NULL) {
  ------------------
  |  Branch (2941:12): [True: 0, False: 0]
  ------------------
 2942|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2943|      0|        goto err;
 2944|      0|    }
 2945|      0|    if (!EC_POINT_set_affine_coordinates(group, P, x, y, ctx)) {
  ------------------
  |  Branch (2945:9): [True: 0, False: 0]
  ------------------
 2946|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2947|      0|        goto err;
 2948|      0|    }
 2949|      0|    if ((order = BN_bin2bn(params + 5 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (2949:9): [True: 0, False: 0]
  ------------------
 2950|      0|        || !BN_set_word(x, (BN_ULONG)data->cofactor)) {
  ------------------
  |  Branch (2950:12): [True: 0, False: 0]
  ------------------
 2951|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2952|      0|        goto err;
 2953|      0|    }
 2954|      0|    if (!EC_GROUP_set_generator(group, P, order, x)) {
  ------------------
  |  Branch (2954:9): [True: 0, False: 0]
  ------------------
 2955|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2956|      0|        goto err;
 2957|      0|    }
 2958|      0|    if (seed_len) {
  ------------------
  |  Branch (2958:9): [True: 0, False: 0]
  ------------------
 2959|      0|        if (!EC_GROUP_set_seed(group, params - seed_len, seed_len)) {
  ------------------
  |  Branch (2959:13): [True: 0, False: 0]
  ------------------
 2960|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2961|      0|            goto err;
 2962|      0|        }
 2963|      0|    }
 2964|       |
 2965|      0|#ifndef FIPS_MODULE
 2966|      0|    if (EC_GROUP_get_asn1_flag(group) == OPENSSL_EC_NAMED_CURVE) {
  ------------------
  |  |   31|      0|#define OPENSSL_EC_NAMED_CURVE 0x001
  ------------------
  |  Branch (2966:9): [True: 0, False: 0]
  ------------------
 2967|       |        /*
 2968|       |         * Some curves don't have an associated OID: for those we should not
 2969|       |         * default to `OPENSSL_EC_NAMED_CURVE` encoding of parameters and
 2970|       |         * instead set the ASN1 flag to `OPENSSL_EC_EXPLICIT_CURVE`.
 2971|       |         *
 2972|       |         * Note that `OPENSSL_EC_NAMED_CURVE` is set as the default ASN1 flag on
 2973|       |         * `EC_GROUP_new()`, when we don't have enough elements to determine if
 2974|       |         * an OID for the curve name actually exists.
 2975|       |         * We could implement this check on `EC_GROUP_set_curve_name()` but
 2976|       |         * overloading the simple setter with this lookup could have a negative
 2977|       |         * performance impact and unexpected consequences.
 2978|       |         */
 2979|      0|        ASN1_OBJECT *asn1obj = OBJ_nid2obj(curve.nid);
 2980|       |
 2981|      0|        if (asn1obj == NULL) {
  ------------------
  |  Branch (2981:13): [True: 0, False: 0]
  ------------------
 2982|      0|            ERR_raise(ERR_LIB_EC, ERR_R_OBJ_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2983|      0|            goto err;
 2984|      0|        }
 2985|      0|        if (OBJ_length(asn1obj) == 0)
  ------------------
  |  Branch (2985:13): [True: 0, False: 0]
  ------------------
 2986|      0|            EC_GROUP_set_asn1_flag(group, OPENSSL_EC_EXPLICIT_CURVE);
  ------------------
  |  |   30|      0|#define OPENSSL_EC_EXPLICIT_CURVE 0x000
  ------------------
 2987|       |
 2988|      0|        ASN1_OBJECT_free(asn1obj);
 2989|      0|    }
 2990|       |#else
 2991|       |    /*
 2992|       |     * Inside the FIPS module we do not support explicit curves anyway
 2993|       |     * so the above check is not necessary.
 2994|       |     *
 2995|       |     * Skipping it is also necessary because `OBJ_length()` and
 2996|       |     * `ASN1_OBJECT_free()` are not available within the FIPS module
 2997|       |     * boundaries.
 2998|       |     */
 2999|       |#endif
 3000|       |
 3001|      0|    ok = 1;
 3002|      0|err:
 3003|      0|    if (!ok) {
  ------------------
  |  Branch (3003:9): [True: 0, False: 0]
  ------------------
 3004|      0|        EC_GROUP_free(group);
 3005|       |        group = NULL;
 3006|      0|    }
 3007|      0|    EC_POINT_free(P);
 3008|      0|    BN_CTX_free(ctx);
 3009|      0|    BN_free(p);
 3010|      0|    BN_free(a);
 3011|      0|    BN_free(b);
 3012|      0|    BN_free(order);
 3013|      0|    BN_free(x);
 3014|      0|    BN_free(y);
 3015|      0|    return group;
 3016|      0|}

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

EC_KEY_new_ex:
   38|  14.6k|{
   39|  14.6k|    return ossl_ec_key_new_method_int(ctx, propq);
   40|  14.6k|}
EC_KEY_free:
   69|  69.2k|{
   70|  69.2k|    int i;
   71|       |
   72|  69.2k|    if (r == NULL)
  ------------------
  |  Branch (72:9): [True: 25.5k, False: 43.7k]
  ------------------
   73|  25.5k|        return;
   74|       |
   75|  43.7k|    CRYPTO_DOWN_REF(&r->references, &i);
   76|  43.7k|    REF_PRINT_COUNT("EC_KEY", i, r);
  ------------------
  |  |  301|  43.7k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  43.7k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  43.7k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  43.7k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   77|  43.7k|    if (i > 0)
  ------------------
  |  Branch (77:9): [True: 29.0k, False: 14.6k]
  ------------------
   78|  29.0k|        return;
   79|  14.6k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  14.6k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 14.6k]
  |  |  ------------------
  ------------------
   80|       |
   81|  14.6k|    if (r->meth != NULL && r->meth->finish != NULL)
  ------------------
  |  Branch (81:9): [True: 14.6k, False: 0]
  |  Branch (81:28): [True: 0, False: 14.6k]
  ------------------
   82|      0|        r->meth->finish(r);
   83|       |
   84|  14.6k|    if (r->group && r->group->meth->keyfinish)
  ------------------
  |  Branch (84:9): [True: 14.6k, False: 0]
  |  Branch (84:21): [True: 0, False: 14.6k]
  ------------------
   85|      0|        r->group->meth->keyfinish(r);
   86|       |
   87|  14.6k|#ifndef FIPS_MODULE
   88|  14.6k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_EC_KEY, r, &r->ex_data);
  ------------------
  |  |  259|  14.6k|#define CRYPTO_EX_INDEX_EC_KEY 8
  ------------------
   89|  14.6k|#endif
   90|  14.6k|    CRYPTO_FREE_REF(&r->references);
   91|  14.6k|    EC_GROUP_free(r->group);
   92|  14.6k|    EC_POINT_free(r->pub_key);
   93|  14.6k|    BN_clear_free(r->priv_key);
   94|  14.6k|    OPENSSL_free(r->propq);
  ------------------
  |  |  132|  14.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   95|       |
   96|  14.6k|    OPENSSL_clear_free((void *)r, sizeof(EC_KEY));
  ------------------
  |  |  130|  14.6k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   97|  14.6k|}
EC_KEY_up_ref:
  176|  29.0k|{
  177|  29.0k|    int i;
  178|       |
  179|  29.0k|    if (CRYPTO_UP_REF(&r->references, &i) <= 0)
  ------------------
  |  Branch (179:9): [True: 0, False: 29.0k]
  ------------------
  180|      0|        return 0;
  181|       |
  182|  29.0k|    REF_PRINT_COUNT("EC_KEY", i, r);
  ------------------
  |  |  301|  29.0k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  29.0k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  29.0k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  29.0k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  183|  29.0k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|  29.0k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 29.0k]
  |  |  ------------------
  ------------------
  184|  29.0k|    return ((i > 1) ? 1 : 0);
  ------------------
  |  Branch (184:13): [True: 29.0k, False: 0]
  ------------------
  185|  29.0k|}
ossl_ec_key_get_libctx:
  674|  58.5k|{
  675|  58.5k|    return key->libctx;
  676|  58.5k|}
ossl_ec_key_get0_propq:
  679|  25.5k|{
  680|  25.5k|    return key->propq;
  681|  25.5k|}
ossl_ec_key_set0_libctx:
  684|  14.6k|{
  685|  14.6k|    key->libctx = libctx;
  686|       |    /* Do we need to propagate this to the group? */
  687|  14.6k|}
EC_KEY_get0_group:
  690|   135k|{
  691|   135k|    return key->group;
  692|   135k|}
EC_KEY_set_group:
  695|  14.6k|{
  696|  14.6k|    if (key->meth->set_group != NULL && key->meth->set_group(key, group) == 0)
  ------------------
  |  Branch (696:9): [True: 0, False: 14.6k]
  |  Branch (696:41): [True: 0, False: 0]
  ------------------
  697|      0|        return 0;
  698|  14.6k|    EC_GROUP_free(key->group);
  699|  14.6k|    key->group = EC_GROUP_dup(group);
  700|  14.6k|    if (key->group != NULL && EC_GROUP_get_curve_name(key->group) == NID_sm2)
  ------------------
  |  | 1259|  14.6k|#define NID_sm2         1172
  ------------------
  |  Branch (700:9): [True: 14.6k, False: 0]
  |  Branch (700:31): [True: 0, False: 14.6k]
  ------------------
  701|      0|        EC_KEY_set_flags(key, EC_FLAG_SM2_RANGE);
  ------------------
  |  |  962|      0|#define EC_FLAG_SM2_RANGE 0x0004
  ------------------
  702|       |
  703|  14.6k|    key->dirty_cnt++;
  704|  14.6k|    return (key->group == NULL) ? 0 : 1;
  ------------------
  |  Branch (704:12): [True: 0, False: 14.6k]
  ------------------
  705|  14.6k|}
EC_KEY_get0_private_key:
  708|  36.5k|{
  709|  36.5k|    return key->priv_key;
  710|  36.5k|}
EC_KEY_get0_public_key:
  808|  59.0k|{
  809|  59.0k|    return key->pub_key;
  810|  59.0k|}
EC_KEY_get_enc_flags:
  824|  25.5k|{
  825|  25.5k|    return key->enc_flag;
  826|  25.5k|}
EC_KEY_get_conv_form:
  834|  25.5k|{
  835|  25.5k|    return key->conv_form;
  836|  25.5k|}
EC_KEY_get_flags:
  861|  80.3k|{
  862|  80.3k|    return key->flags;
  863|  80.3k|}
EC_KEY_oct2key:
  894|  14.6k|{
  895|  14.6k|    if (key == NULL || key->group == NULL)
  ------------------
  |  Branch (895:9): [True: 0, False: 14.6k]
  |  Branch (895:24): [True: 0, False: 14.6k]
  ------------------
  896|      0|        return 0;
  897|  14.6k|    if (key->pub_key == NULL)
  ------------------
  |  Branch (897:9): [True: 10.9k, False: 3.73k]
  ------------------
  898|  10.9k|        key->pub_key = EC_POINT_new(key->group);
  899|  14.6k|    if (key->pub_key == NULL)
  ------------------
  |  Branch (899:9): [True: 0, False: 14.6k]
  ------------------
  900|      0|        return 0;
  901|  14.6k|    if (EC_POINT_oct2point(key->group, key->pub_key, buf, len, ctx) == 0)
  ------------------
  |  Branch (901:9): [True: 0, False: 14.6k]
  ------------------
  902|      0|        return 0;
  903|  14.6k|    key->dirty_cnt++;
  904|       |    /*
  905|       |     * Save the point conversion form.
  906|       |     * For non-custom curves the first octet of the buffer (excluding
  907|       |     * the last significant bit) contains the point conversion form.
  908|       |     * EC_POINT_oct2point() has already performed sanity checking of
  909|       |     * the buffer so we know it is valid.
  910|       |     */
  911|  14.6k|    if ((key->group->meth->flags & EC_FLAGS_CUSTOM_CURVE) == 0)
  ------------------
  |  |   29|  14.6k|#define EC_FLAGS_CUSTOM_CURVE 0x2
  ------------------
  |  Branch (911:9): [True: 14.6k, False: 0]
  ------------------
  912|  14.6k|        key->conv_form = (point_conversion_form_t)(buf[0] & ~0x01);
  913|  14.6k|    return 1;
  914|  14.6k|}
EC_KEY_oct2priv:
  953|  3.73k|{
  954|  3.73k|    int ret;
  955|       |
  956|  3.73k|    if (eckey->group == NULL || eckey->group->meth == NULL)
  ------------------
  |  Branch (956:9): [True: 0, False: 3.73k]
  |  Branch (956:33): [True: 0, False: 3.73k]
  ------------------
  957|      0|        return 0;
  958|  3.73k|    if (eckey->group->meth->oct2priv == NULL) {
  ------------------
  |  Branch (958:9): [True: 0, False: 3.73k]
  ------------------
  959|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  960|      0|        return 0;
  961|      0|    }
  962|  3.73k|    ret = eckey->group->meth->oct2priv(eckey, buf, len);
  963|  3.73k|    if (ret == 1)
  ------------------
  |  Branch (963:9): [True: 3.73k, False: 0]
  ------------------
  964|  3.73k|        eckey->dirty_cnt++;
  965|  3.73k|    return ret;
  966|  3.73k|}
ossl_ec_key_simple_oct2priv:
  970|  3.73k|{
  971|  3.73k|    if (len > INT_MAX) {
  ------------------
  |  Branch (971:9): [True: 0, False: 3.73k]
  ------------------
  972|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  973|      0|        return 0;
  974|      0|    }
  975|  3.73k|    if (eckey->priv_key == NULL)
  ------------------
  |  Branch (975:9): [True: 3.73k, False: 0]
  ------------------
  976|  3.73k|        eckey->priv_key = BN_secure_new();
  977|  3.73k|    if (eckey->priv_key == NULL) {
  ------------------
  |  Branch (977:9): [True: 0, False: 3.73k]
  ------------------
  978|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  979|      0|        return 0;
  980|      0|    }
  981|  3.73k|    if (BN_bin2bn(buf, (int)len, eckey->priv_key) == NULL) {
  ------------------
  |  Branch (981:9): [True: 0, False: 3.73k]
  ------------------
  982|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  983|      0|        return 0;
  984|      0|    }
  985|  3.73k|    eckey->dirty_cnt++;
  986|  3.73k|    return 1;
  987|  3.73k|}
EC_KEY_can_sign:
 1009|  10.8k|{
 1010|  10.8k|    if (eckey->group == NULL || eckey->group->meth == NULL
  ------------------
  |  Branch (1010:9): [True: 0, False: 10.8k]
  |  Branch (1010:33): [True: 0, False: 10.8k]
  ------------------
 1011|  10.8k|        || (eckey->group->meth->flags & EC_FLAGS_NO_SIGN))
  ------------------
  |  |   32|  10.8k|#define EC_FLAGS_NO_SIGN 0x4
  ------------------
  |  Branch (1011:12): [True: 0, False: 10.8k]
  ------------------
 1012|      0|        return 0;
 1013|  10.8k|    return 1;
 1014|  10.8k|}

EC_KEY_OpenSSL:
   37|  10.9k|{
   38|  10.9k|    return &openssl_ec_key_method;
   39|  10.9k|}
EC_KEY_get_default_method:
   42|  14.6k|{
   43|  14.6k|    return default_ec_key_meth;
   44|  14.6k|}
EC_KEY_get_method:
   55|  10.9k|{
   56|  10.9k|    return key->meth;
   57|  10.9k|}
ossl_ec_key_new_method_int:
   73|  14.6k|{
   74|  14.6k|    EC_KEY *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  14.6k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   75|       |
   76|  14.6k|    if (ret == NULL)
  ------------------
  |  Branch (76:9): [True: 0, False: 14.6k]
  ------------------
   77|      0|        return NULL;
   78|       |
   79|  14.6k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (79:9): [True: 0, False: 14.6k]
  ------------------
   80|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   81|      0|        return NULL;
   82|      0|    }
   83|       |
   84|  14.6k|    ret->libctx = libctx;
   85|  14.6k|    if (propq != NULL) {
  ------------------
  |  Branch (85:9): [True: 3.73k, False: 10.9k]
  ------------------
   86|  3.73k|        ret->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  136|  3.73k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   87|  3.73k|        if (ret->propq == NULL)
  ------------------
  |  Branch (87:13): [True: 0, False: 3.73k]
  ------------------
   88|      0|            goto err;
   89|  3.73k|    }
   90|       |
   91|  14.6k|    ret->meth = EC_KEY_get_default_method();
   92|  14.6k|    ret->version = 1;
   93|  14.6k|    ret->conv_form = POINT_CONVERSION_UNCOMPRESSED;
   94|       |
   95|       |/* No ex_data inside the FIPS provider */
   96|  14.6k|#ifndef FIPS_MODULE
   97|  14.6k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_EC_KEY, ret, &ret->ex_data)) {
  ------------------
  |  |  259|  14.6k|#define CRYPTO_EX_INDEX_EC_KEY 8
  ------------------
  |  Branch (97:9): [True: 0, False: 14.6k]
  ------------------
   98|      0|        ERR_raise(ERR_LIB_EC, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   99|      0|        goto err;
  100|      0|    }
  101|  14.6k|#endif
  102|       |
  103|  14.6k|    if (ret->meth->init != NULL && ret->meth->init(ret) == 0) {
  ------------------
  |  Branch (103:9): [True: 0, False: 14.6k]
  |  Branch (103:36): [True: 0, False: 0]
  ------------------
  104|      0|        ERR_raise(ERR_LIB_EC, ERR_R_INIT_FAIL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  105|      0|        goto err;
  106|      0|    }
  107|  14.6k|    return ret;
  108|       |
  109|      0|err:
  110|      0|    EC_KEY_free(ret);
  111|       |    return NULL;
  112|  14.6k|}

ossl_ec_group_new_ex:
   32|  29.3k|{
   33|  29.3k|    EC_GROUP *ret;
   34|       |
   35|  29.3k|    if (meth == NULL) {
  ------------------
  |  Branch (35:9): [True: 0, False: 29.3k]
  ------------------
   36|      0|        ERR_raise(ERR_LIB_EC, EC_R_SLOT_FULL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   37|      0|        return NULL;
   38|      0|    }
   39|  29.3k|    if (meth->group_init == 0) {
  ------------------
  |  Branch (39:9): [True: 0, False: 29.3k]
  ------------------
   40|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   41|      0|        return NULL;
   42|      0|    }
   43|       |
   44|  29.3k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  29.3k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   45|  29.3k|    if (ret == NULL)
  ------------------
  |  Branch (45:9): [True: 0, False: 29.3k]
  ------------------
   46|      0|        return NULL;
   47|       |
   48|  29.3k|    ret->libctx = libctx;
   49|  29.3k|    if (propq != NULL) {
  ------------------
  |  Branch (49:9): [True: 7.46k, False: 21.8k]
  ------------------
   50|  7.46k|        ret->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  136|  7.46k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   51|  7.46k|        if (ret->propq == NULL)
  ------------------
  |  Branch (51:13): [True: 0, False: 7.46k]
  ------------------
   52|      0|            goto err;
   53|  7.46k|    }
   54|  29.3k|    ret->meth = meth;
   55|  29.3k|    if ((ret->meth->flags & EC_FLAGS_CUSTOM_CURVE) == 0) {
  ------------------
  |  |   29|  29.3k|#define EC_FLAGS_CUSTOM_CURVE 0x2
  ------------------
  |  Branch (55:9): [True: 29.3k, False: 0]
  ------------------
   56|  29.3k|        ret->order = BN_new();
   57|  29.3k|        if (ret->order == NULL)
  ------------------
  |  Branch (57:13): [True: 0, False: 29.3k]
  ------------------
   58|      0|            goto err;
   59|  29.3k|        ret->cofactor = BN_new();
   60|  29.3k|        if (ret->cofactor == NULL)
  ------------------
  |  Branch (60:13): [True: 0, False: 29.3k]
  ------------------
   61|      0|            goto err;
   62|  29.3k|    }
   63|  29.3k|    ret->asn1_flag = OPENSSL_EC_EXPLICIT_CURVE;
  ------------------
  |  |   30|  29.3k|#define OPENSSL_EC_EXPLICIT_CURVE 0x000
  ------------------
   64|  29.3k|    ret->asn1_form = POINT_CONVERSION_UNCOMPRESSED;
   65|  29.3k|    if (!meth->group_init(ret))
  ------------------
  |  Branch (65:9): [True: 0, False: 29.3k]
  ------------------
   66|      0|        goto err;
   67|  29.3k|    return ret;
   68|       |
   69|      0|err:
   70|      0|    BN_free(ret->order);
   71|      0|    BN_free(ret->cofactor);
   72|      0|    OPENSSL_free(ret->propq);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   73|      0|    OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   74|       |    return NULL;
   75|  29.3k|}
EC_pre_comp_free:
   87|  43.9k|{
   88|  43.9k|    switch (group->pre_comp_type) {
  ------------------
  |  Branch (88:13): [True: 43.9k, False: 0]
  ------------------
   89|  43.9k|    case PCT_none:
  ------------------
  |  Branch (89:5): [True: 43.9k, False: 0]
  ------------------
   90|  43.9k|        break;
   91|      0|    case PCT_nistz256:
  ------------------
  |  Branch (91:5): [True: 0, False: 43.9k]
  ------------------
   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: 43.9k]
  ------------------
   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: 43.9k]
  ------------------
  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: 43.9k]
  ------------------
  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: 43.9k]
  ------------------
  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: 43.9k]
  ------------------
  117|      0|        EC_ec_pre_comp_free(group->pre_comp.ec);
  118|      0|        break;
  119|  43.9k|    }
  120|  43.9k|    group->pre_comp.ec = NULL;
  121|  43.9k|}
EC_GROUP_free:
  124|  43.9k|{
  125|  43.9k|    if (!group)
  ------------------
  |  Branch (125:9): [True: 14.6k, False: 29.3k]
  ------------------
  126|  14.6k|        return;
  127|       |
  128|  29.3k|    if (group->meth->group_finish != 0)
  ------------------
  |  Branch (128:9): [True: 29.3k, False: 0]
  ------------------
  129|  29.3k|        group->meth->group_finish(group);
  130|       |
  131|  29.3k|    EC_pre_comp_free(group);
  132|  29.3k|    BN_MONT_CTX_free(group->mont_data);
  133|  29.3k|    EC_POINT_free(group->generator);
  134|  29.3k|    BN_free(group->order);
  135|  29.3k|    BN_free(group->cofactor);
  136|  29.3k|    OPENSSL_free(group->seed);
  ------------------
  |  |  132|  29.3k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  137|  29.3k|    OPENSSL_free(group->propq);
  ------------------
  |  |  132|  29.3k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  138|  29.3k|    OPENSSL_free(group);
  ------------------
  |  |  132|  29.3k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  139|  29.3k|}
EC_GROUP_copy:
  163|  14.6k|{
  164|  14.6k|    if (dest->meth->group_copy == 0) {
  ------------------
  |  Branch (164:9): [True: 0, False: 14.6k]
  ------------------
  165|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  166|      0|        return 0;
  167|      0|    }
  168|  14.6k|    if (dest->meth != src->meth) {
  ------------------
  |  Branch (168:9): [True: 0, False: 14.6k]
  ------------------
  169|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  170|      0|        return 0;
  171|      0|    }
  172|  14.6k|    if (dest == src)
  ------------------
  |  Branch (172:9): [True: 0, False: 14.6k]
  ------------------
  173|      0|        return 1;
  174|       |
  175|  14.6k|    dest->libctx = src->libctx;
  176|  14.6k|    dest->curve_name = src->curve_name;
  177|       |
  178|  14.6k|    EC_pre_comp_free(dest);
  179|       |
  180|       |    /* Copy precomputed */
  181|  14.6k|    dest->pre_comp_type = src->pre_comp_type;
  182|  14.6k|    switch (src->pre_comp_type) {
  ------------------
  |  Branch (182:13): [True: 14.6k, False: 0]
  ------------------
  183|  14.6k|    case PCT_none:
  ------------------
  |  Branch (183:5): [True: 14.6k, False: 0]
  ------------------
  184|  14.6k|        dest->pre_comp.ec = NULL;
  185|  14.6k|        break;
  186|      0|    case PCT_nistz256:
  ------------------
  |  Branch (186:5): [True: 0, False: 14.6k]
  ------------------
  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: 14.6k]
  ------------------
  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: 14.6k]
  ------------------
  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: 14.6k]
  ------------------
  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: 14.6k]
  ------------------
  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: 14.6k]
  ------------------
  212|      0|        dest->pre_comp.ec = EC_ec_pre_comp_dup(src->pre_comp.ec);
  213|      0|        break;
  214|  14.6k|    }
  215|       |
  216|  14.6k|    if (src->mont_data != NULL) {
  ------------------
  |  Branch (216:9): [True: 14.6k, False: 0]
  ------------------
  217|  14.6k|        if (dest->mont_data == NULL) {
  ------------------
  |  Branch (217:13): [True: 14.6k, False: 0]
  ------------------
  218|  14.6k|            dest->mont_data = BN_MONT_CTX_new();
  219|  14.6k|            if (dest->mont_data == NULL)
  ------------------
  |  Branch (219:17): [True: 0, False: 14.6k]
  ------------------
  220|      0|                return 0;
  221|  14.6k|        }
  222|  14.6k|        if (!BN_MONT_CTX_copy(dest->mont_data, src->mont_data))
  ------------------
  |  Branch (222:13): [True: 0, False: 14.6k]
  ------------------
  223|      0|            return 0;
  224|  14.6k|    } else {
  225|       |        /* src->generator == NULL */
  226|      0|        BN_MONT_CTX_free(dest->mont_data);
  227|      0|        dest->mont_data = NULL;
  228|      0|    }
  229|       |
  230|  14.6k|    if (src->generator != NULL) {
  ------------------
  |  Branch (230:9): [True: 14.6k, False: 0]
  ------------------
  231|  14.6k|        if (dest->generator == NULL) {
  ------------------
  |  Branch (231:13): [True: 14.6k, False: 0]
  ------------------
  232|  14.6k|            dest->generator = EC_POINT_new(dest);
  233|  14.6k|            if (dest->generator == NULL)
  ------------------
  |  Branch (233:17): [True: 0, False: 14.6k]
  ------------------
  234|      0|                return 0;
  235|  14.6k|        }
  236|  14.6k|        if (!EC_POINT_copy(dest->generator, src->generator))
  ------------------
  |  Branch (236:13): [True: 0, False: 14.6k]
  ------------------
  237|      0|            return 0;
  238|  14.6k|    } else {
  239|       |        /* src->generator == NULL */
  240|      0|        EC_POINT_clear_free(dest->generator);
  241|      0|        dest->generator = NULL;
  242|      0|    }
  243|       |
  244|  14.6k|    if ((src->meth->flags & EC_FLAGS_CUSTOM_CURVE) == 0) {
  ------------------
  |  |   29|  14.6k|#define EC_FLAGS_CUSTOM_CURVE 0x2
  ------------------
  |  Branch (244:9): [True: 14.6k, False: 0]
  ------------------
  245|  14.6k|        if (!BN_copy(dest->order, src->order))
  ------------------
  |  Branch (245:13): [True: 0, False: 14.6k]
  ------------------
  246|      0|            return 0;
  247|  14.6k|        if (!BN_copy(dest->cofactor, src->cofactor))
  ------------------
  |  Branch (247:13): [True: 0, False: 14.6k]
  ------------------
  248|      0|            return 0;
  249|  14.6k|    }
  250|       |
  251|  14.6k|    dest->asn1_flag = src->asn1_flag;
  252|  14.6k|    dest->asn1_form = src->asn1_form;
  253|  14.6k|    dest->decoded_from_explicit_params = src->decoded_from_explicit_params;
  254|       |
  255|  14.6k|    if (src->seed) {
  ------------------
  |  Branch (255:9): [True: 14.6k, False: 0]
  ------------------
  256|  14.6k|        OPENSSL_free(dest->seed);
  ------------------
  |  |  132|  14.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  257|  14.6k|        if ((dest->seed = OPENSSL_malloc(src->seed_len)) == NULL)
  ------------------
  |  |  107|  14.6k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (257:13): [True: 0, False: 14.6k]
  ------------------
  258|      0|            return 0;
  259|  14.6k|        if (!memcpy(dest->seed, src->seed, src->seed_len))
  ------------------
  |  Branch (259:13): [True: 0, False: 14.6k]
  ------------------
  260|      0|            return 0;
  261|  14.6k|        dest->seed_len = src->seed_len;
  262|  14.6k|    } else {
  263|      0|        OPENSSL_free(dest->seed);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  264|      0|        dest->seed = NULL;
  265|      0|        dest->seed_len = 0;
  266|      0|    }
  267|       |
  268|  14.6k|    return dest->meth->group_copy(dest, src);
  269|  14.6k|}
EC_GROUP_dup:
  272|  14.6k|{
  273|  14.6k|    EC_GROUP *t = NULL;
  274|  14.6k|    int ok = 0;
  275|       |
  276|  14.6k|    if (a == NULL)
  ------------------
  |  Branch (276:9): [True: 0, False: 14.6k]
  ------------------
  277|      0|        return NULL;
  278|       |
  279|  14.6k|    if ((t = ossl_ec_group_new_ex(a->libctx, a->propq, a->meth)) == NULL)
  ------------------
  |  Branch (279:9): [True: 0, False: 14.6k]
  ------------------
  280|      0|        return NULL;
  281|  14.6k|    if (!EC_GROUP_copy(t, a))
  ------------------
  |  Branch (281:9): [True: 0, False: 14.6k]
  ------------------
  282|      0|        goto err;
  283|       |
  284|  14.6k|    ok = 1;
  285|       |
  286|  14.6k|err:
  287|  14.6k|    if (!ok) {
  ------------------
  |  Branch (287:9): [True: 0, False: 14.6k]
  ------------------
  288|      0|        EC_GROUP_free(t);
  289|      0|        return NULL;
  290|      0|    }
  291|  14.6k|    return t;
  292|  14.6k|}
EC_GROUP_get0_generator:
  441|  25.9k|{
  442|  25.9k|    return group->generator;
  443|  25.9k|}
EC_GROUP_get_order:
  451|  3.73k|{
  452|  3.73k|    if (group->order == NULL)
  ------------------
  |  Branch (452:9): [True: 0, False: 3.73k]
  ------------------
  453|      0|        return 0;
  454|  3.73k|    if (!BN_copy(order, group->order))
  ------------------
  |  Branch (454:9): [True: 0, False: 3.73k]
  ------------------
  455|      0|        return 0;
  456|       |
  457|  3.73k|    return !BN_is_zero(order);
  458|  3.73k|}
EC_GROUP_get0_order:
  461|  47.7k|{
  462|  47.7k|    return group->order;
  463|  47.7k|}
EC_GROUP_order_bits:
  466|  25.6k|{
  467|  25.6k|    return group->meth->group_order_bits(group);
  468|  25.6k|}
EC_GROUP_security_bits:
  471|  14.6k|{
  472|  14.6k|    int ecbits = group->meth->group_order_bits(group);
  473|       |
  474|       |    /*
  475|       |     * The following estimates are based on the values published in Table 2 of
  476|       |     * "NIST Special Publication 800-57 Part 1 Revision 4" at
  477|       |     * http://dx.doi.org/10.6028/NIST.SP.800-57pt1r4 .
  478|       |     *
  479|       |     * Note that the above reference explicitly categorizes algorithms in a
  480|       |     * discrete set of values {80, 112, 128, 192, 256}, and that it is relevant
  481|       |     * only for NIST approved Elliptic Curves, while OpenSSL applies the same
  482|       |     * logic also to other curves.
  483|       |     */
  484|  14.6k|    if (ecbits >= 512)
  ------------------
  |  Branch (484:9): [True: 0, False: 14.6k]
  ------------------
  485|      0|        return 256;
  486|  14.6k|    if (ecbits >= 384)
  ------------------
  |  Branch (486:9): [True: 0, False: 14.6k]
  ------------------
  487|      0|        return 192;
  488|  14.6k|    if (ecbits >= 256)
  ------------------
  |  Branch (488:9): [True: 14.6k, False: 0]
  ------------------
  489|  14.6k|        return 128;
  490|      0|    if (ecbits >= 224)
  ------------------
  |  Branch (490:9): [True: 0, False: 0]
  ------------------
  491|      0|        return 112;
  492|      0|    if (ecbits >= 160)
  ------------------
  |  Branch (492:9): [True: 0, False: 0]
  ------------------
  493|      0|        return 80;
  494|      0|    return ecbits / 2;
  495|      0|}
EC_GROUP_get0_cofactor:
  509|  18.6k|{
  510|  18.6k|    return group->cofactor;
  511|  18.6k|}
EC_GROUP_set_curve_name:
  514|  14.6k|{
  515|  14.6k|    group->curve_name = nid;
  516|  14.6k|    group->asn1_flag = (nid != NID_undef)
  ------------------
  |  |   18|  14.6k|#define NID_undef                       0
  ------------------
  |  Branch (516:24): [True: 14.6k, False: 0]
  ------------------
  517|  14.6k|        ? OPENSSL_EC_NAMED_CURVE
  ------------------
  |  |   31|  14.6k|#define OPENSSL_EC_NAMED_CURVE 0x001
  ------------------
  518|  14.6k|        : OPENSSL_EC_EXPLICIT_CURVE;
  ------------------
  |  |   30|  14.6k|#define OPENSSL_EC_EXPLICIT_CURVE 0x000
  ------------------
  519|  14.6k|}
EC_GROUP_get_curve_name:
  522|   103k|{
  523|   103k|    return group->curve_name;
  524|   103k|}
EC_GROUP_get_field_type:
  532|  69.7k|{
  533|  69.7k|    return group->meth->field_type;
  534|  69.7k|}
EC_GROUP_set_asn1_flag:
  537|  14.6k|{
  538|  14.6k|    group->asn1_flag = flag;
  539|  14.6k|}
EC_GROUP_get_asn1_flag:
  542|  25.5k|{
  543|  25.5k|    return group->asn1_flag;
  544|  25.5k|}
EC_GROUP_get_point_conversion_form:
  554|  25.5k|{
  555|  25.5k|    return group->asn1_form;
  556|  25.5k|}
EC_GROUP_set_seed:
  559|  14.6k|{
  560|  14.6k|    OPENSSL_free(group->seed);
  ------------------
  |  |  132|  14.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  561|  14.6k|    group->seed = NULL;
  562|  14.6k|    group->seed_len = 0;
  563|       |
  564|  14.6k|    if (!len || !p)
  ------------------
  |  Branch (564:9): [True: 0, False: 14.6k]
  |  Branch (564:17): [True: 0, False: 14.6k]
  ------------------
  565|      0|        return 1;
  566|       |
  567|  14.6k|    if ((group->seed = OPENSSL_malloc(len)) == NULL)
  ------------------
  |  |  107|  14.6k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (567:9): [True: 0, False: 14.6k]
  ------------------
  568|      0|        return 0;
  569|  14.6k|    memcpy(group->seed, p, len);
  570|  14.6k|    group->seed_len = len;
  571|       |
  572|  14.6k|    return len;
  573|  14.6k|}
EC_GROUP_get0_seed:
  576|  3.73k|{
  577|  3.73k|    return group->seed;
  578|  3.73k|}
EC_GROUP_get_seed_len:
  581|  3.73k|{
  582|  3.73k|    return group->seed_len;
  583|  3.73k|}
EC_GROUP_get_curve:
  597|  3.73k|{
  598|  3.73k|    if (group->meth->group_get_curve == NULL) {
  ------------------
  |  Branch (598:9): [True: 0, False: 3.73k]
  ------------------
  599|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  600|      0|        return 0;
  601|      0|    }
  602|  3.73k|    return group->meth->group_get_curve(group, p, a, b, ctx);
  603|  3.73k|}
EC_GROUP_cmp:
  652|  7.46k|{
  653|  7.46k|    int r = 0;
  654|  7.46k|    BIGNUM *a1, *a2, *a3, *b1, *b2, *b3;
  655|  7.46k|#ifndef FIPS_MODULE
  656|  7.46k|    BN_CTX *ctx_new = NULL;
  657|  7.46k|#endif
  658|       |
  659|       |    /* compare the field types */
  660|  7.46k|    if (EC_GROUP_get_field_type(a) != EC_GROUP_get_field_type(b))
  ------------------
  |  Branch (660:9): [True: 0, False: 7.46k]
  ------------------
  661|      0|        return 1;
  662|       |    /* compare the curve name (if present in both) */
  663|  7.46k|    if (EC_GROUP_get_curve_name(a) && EC_GROUP_get_curve_name(b) && EC_GROUP_get_curve_name(a) != EC_GROUP_get_curve_name(b))
  ------------------
  |  Branch (663:9): [True: 7.46k, False: 0]
  |  Branch (663:39): [True: 7.46k, False: 0]
  |  Branch (663:69): [True: 0, False: 7.46k]
  ------------------
  664|      0|        return 1;
  665|  7.46k|    if (a->meth->flags & EC_FLAGS_CUSTOM_CURVE)
  ------------------
  |  |   29|  7.46k|#define EC_FLAGS_CUSTOM_CURVE 0x2
  ------------------
  |  Branch (665:9): [True: 0, False: 7.46k]
  ------------------
  666|      0|        return 0;
  667|       |
  668|  7.46k|#ifndef FIPS_MODULE
  669|  7.46k|    if (ctx == NULL)
  ------------------
  |  Branch (669:9): [True: 0, False: 7.46k]
  ------------------
  670|      0|        ctx_new = ctx = BN_CTX_new();
  671|  7.46k|#endif
  672|  7.46k|    if (ctx == NULL)
  ------------------
  |  Branch (672:9): [True: 0, False: 7.46k]
  ------------------
  673|      0|        return -1;
  674|       |
  675|  7.46k|    BN_CTX_start(ctx);
  676|  7.46k|    a1 = BN_CTX_get(ctx);
  677|  7.46k|    a2 = BN_CTX_get(ctx);
  678|  7.46k|    a3 = BN_CTX_get(ctx);
  679|  7.46k|    b1 = BN_CTX_get(ctx);
  680|  7.46k|    b2 = BN_CTX_get(ctx);
  681|  7.46k|    b3 = BN_CTX_get(ctx);
  682|  7.46k|    if (b3 == NULL) {
  ------------------
  |  Branch (682:9): [True: 0, False: 7.46k]
  ------------------
  683|      0|        BN_CTX_end(ctx);
  684|      0|#ifndef FIPS_MODULE
  685|      0|        BN_CTX_free(ctx_new);
  686|      0|#endif
  687|      0|        return -1;
  688|      0|    }
  689|       |
  690|       |    /*
  691|       |     * XXX This approach assumes that the external representation of curves
  692|       |     * over the same field type is the same.
  693|       |     */
  694|  7.46k|    if (!a->meth->group_get_curve(a, a1, a2, a3, ctx) || !b->meth->group_get_curve(b, b1, b2, b3, ctx))
  ------------------
  |  Branch (694:9): [True: 0, False: 7.46k]
  |  Branch (694:58): [True: 0, False: 7.46k]
  ------------------
  695|      0|        r = 1;
  696|       |
  697|       |    /* return 1 if the curve parameters are different */
  698|  7.46k|    if (r || BN_cmp(a1, b1) != 0 || BN_cmp(a2, b2) != 0 || BN_cmp(a3, b3) != 0)
  ------------------
  |  Branch (698:9): [True: 0, False: 7.46k]
  |  Branch (698:14): [True: 0, False: 7.46k]
  |  Branch (698:37): [True: 0, False: 7.46k]
  |  Branch (698:60): [True: 0, False: 7.46k]
  ------------------
  699|      0|        r = 1;
  700|       |
  701|       |    /* XXX EC_POINT_cmp() assumes that the methods are equal */
  702|       |    /* return 1 if the generators are different */
  703|  7.46k|    if (r || EC_POINT_cmp(a, EC_GROUP_get0_generator(a), EC_GROUP_get0_generator(b), ctx) != 0)
  ------------------
  |  Branch (703:9): [True: 0, False: 7.46k]
  |  Branch (703:14): [True: 0, False: 7.46k]
  ------------------
  704|      0|        r = 1;
  705|       |
  706|  7.46k|    if (!r) {
  ------------------
  |  Branch (706:9): [True: 7.46k, False: 0]
  ------------------
  707|  7.46k|        const BIGNUM *ao, *bo, *ac, *bc;
  708|       |        /* compare the orders */
  709|  7.46k|        ao = EC_GROUP_get0_order(a);
  710|  7.46k|        bo = EC_GROUP_get0_order(b);
  711|  7.46k|        if (ao == NULL || bo == NULL) {
  ------------------
  |  Branch (711:13): [True: 0, False: 7.46k]
  |  Branch (711:27): [True: 0, False: 7.46k]
  ------------------
  712|       |            /* return an error if either order is NULL */
  713|      0|            r = -1;
  714|      0|            goto end;
  715|      0|        }
  716|  7.46k|        if (BN_cmp(ao, bo) != 0) {
  ------------------
  |  Branch (716:13): [True: 0, False: 7.46k]
  ------------------
  717|       |            /* return 1 if orders are different */
  718|      0|            r = 1;
  719|      0|            goto end;
  720|      0|        }
  721|       |        /*
  722|       |         * It gets here if the curve parameters and generator matched.
  723|       |         * Now check the optional cofactors (if both are present).
  724|       |         */
  725|  7.46k|        ac = EC_GROUP_get0_cofactor(a);
  726|  7.46k|        bc = EC_GROUP_get0_cofactor(b);
  727|       |        /* Returns 1 (mismatch) if both cofactors are specified and different */
  728|  7.46k|        if (!BN_is_zero(ac) && !BN_is_zero(bc) && BN_cmp(ac, bc) != 0)
  ------------------
  |  Branch (728:13): [True: 7.46k, False: 0]
  |  Branch (728:32): [True: 7.46k, False: 0]
  |  Branch (728:51): [True: 0, False: 7.46k]
  ------------------
  729|      0|            r = 1;
  730|       |        /* Returns 0 if the parameters matched */
  731|  7.46k|    }
  732|  7.46k|end:
  733|  7.46k|    BN_CTX_end(ctx);
  734|  7.46k|#ifndef FIPS_MODULE
  735|  7.46k|    BN_CTX_free(ctx_new);
  736|  7.46k|#endif
  737|  7.46k|    return r;
  738|  7.46k|}
EC_POINT_new:
  743|  65.8k|{
  744|  65.8k|    EC_POINT *ret;
  745|       |
  746|  65.8k|    if (group == NULL) {
  ------------------
  |  Branch (746:9): [True: 0, False: 65.8k]
  ------------------
  747|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  748|      0|        return NULL;
  749|      0|    }
  750|  65.8k|    if (group->meth->point_init == NULL) {
  ------------------
  |  Branch (750:9): [True: 0, False: 65.8k]
  ------------------
  751|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  752|      0|        return NULL;
  753|      0|    }
  754|       |
  755|  65.8k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  65.8k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  756|  65.8k|    if (ret == NULL)
  ------------------
  |  Branch (756:9): [True: 0, False: 65.8k]
  ------------------
  757|      0|        return NULL;
  758|       |
  759|  65.8k|    ret->meth = group->meth;
  760|  65.8k|    ret->curve_name = group->curve_name;
  761|       |
  762|  65.8k|    if (!ret->meth->point_init(ret)) {
  ------------------
  |  Branch (762:9): [True: 0, False: 65.8k]
  ------------------
  763|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  764|      0|        return NULL;
  765|      0|    }
  766|       |
  767|  65.8k|    return ret;
  768|  65.8k|}
EC_POINT_free:
  771|  65.8k|{
  772|  65.8k|    if (point == NULL)
  ------------------
  |  Branch (772:9): [True: 0, False: 65.8k]
  ------------------
  773|      0|        return;
  774|       |
  775|       |#ifdef OPENSSL_PEDANTIC_ZEROIZATION
  776|       |    EC_POINT_clear_free(point);
  777|       |#else
  778|  65.8k|    if (point->meth->point_finish != 0)
  ------------------
  |  Branch (778:9): [True: 65.8k, False: 0]
  ------------------
  779|  65.8k|        point->meth->point_finish(point);
  780|  65.8k|    OPENSSL_free(point);
  ------------------
  |  |  132|  65.8k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  781|  65.8k|#endif
  782|  65.8k|}
EC_POINT_clear_free:
  785|  3.73k|{
  786|  3.73k|    if (point == NULL)
  ------------------
  |  Branch (786:9): [True: 3.73k, False: 0]
  ------------------
  787|  3.73k|        return;
  788|       |
  789|      0|    if (point->meth->point_clear_finish != 0)
  ------------------
  |  Branch (789:9): [True: 0, False: 0]
  ------------------
  790|      0|        point->meth->point_clear_finish(point);
  791|      0|    else if (point->meth->point_finish != 0)
  ------------------
  |  Branch (791:14): [True: 0, False: 0]
  ------------------
  792|      0|        point->meth->point_finish(point);
  793|      0|    OPENSSL_clear_free(point, sizeof(*point));
  ------------------
  |  |  130|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  794|      0|}
EC_POINT_copy:
  797|  29.3k|{
  798|  29.3k|    if (dest->meth->point_copy == 0) {
  ------------------
  |  Branch (798:9): [True: 0, False: 29.3k]
  ------------------
  799|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  800|      0|        return 0;
  801|      0|    }
  802|  29.3k|    if (dest->meth != src->meth
  ------------------
  |  Branch (802:9): [True: 0, False: 29.3k]
  ------------------
  803|  29.3k|        || (dest->curve_name != src->curve_name
  ------------------
  |  Branch (803:13): [True: 14.6k, False: 14.6k]
  ------------------
  804|  14.6k|            && dest->curve_name != 0
  ------------------
  |  Branch (804:16): [True: 14.6k, False: 0]
  ------------------
  805|  14.6k|            && src->curve_name != 0)) {
  ------------------
  |  Branch (805:16): [True: 0, False: 14.6k]
  ------------------
  806|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  807|      0|        return 0;
  808|      0|    }
  809|  29.3k|    if (dest == src)
  ------------------
  |  Branch (809:9): [True: 0, False: 29.3k]
  ------------------
  810|      0|        return 1;
  811|  29.3k|    return dest->meth->point_copy(dest, src);
  812|  29.3k|}
EC_POINT_set_Jprojective_coordinates_GFp:
  858|  29.3k|{
  859|  29.3k|    if (group->meth->field_type != NID_X9_62_prime_field) {
  ------------------
  |  |  152|  29.3k|#define NID_X9_62_prime_field           406
  ------------------
  |  Branch (859:9): [True: 0, False: 29.3k]
  ------------------
  860|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  861|      0|        return 0;
  862|      0|    }
  863|  29.3k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (863:9): [True: 0, False: 29.3k]
  ------------------
  864|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  865|      0|        return 0;
  866|      0|    }
  867|  29.3k|    return ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp(group, point,
  868|  29.3k|        x, y, z, ctx);
  869|  29.3k|}
EC_POINT_set_affine_coordinates:
  892|  29.3k|{
  893|  29.3k|    if (group->meth->point_set_affine_coordinates == NULL) {
  ------------------
  |  Branch (893:9): [True: 0, False: 29.3k]
  ------------------
  894|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  895|      0|        return 0;
  896|      0|    }
  897|  29.3k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (897:9): [True: 0, False: 29.3k]
  ------------------
  898|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  899|      0|        return 0;
  900|      0|    }
  901|  29.3k|    if (!group->meth->point_set_affine_coordinates(group, point, x, y, ctx))
  ------------------
  |  Branch (901:9): [True: 0, False: 29.3k]
  ------------------
  902|      0|        return 0;
  903|       |
  904|  29.3k|    if (EC_POINT_is_on_curve(group, point, ctx) <= 0) {
  ------------------
  |  Branch (904:9): [True: 0, False: 29.3k]
  ------------------
  905|      0|        ERR_raise(ERR_LIB_EC, EC_R_POINT_IS_NOT_ON_CURVE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  906|      0|        return 0;
  907|      0|    }
  908|  29.3k|    return 1;
  909|  29.3k|}
EC_POINT_get_affine_coordinates:
  932|  10.9k|{
  933|  10.9k|    if (group->meth->point_get_affine_coordinates == NULL) {
  ------------------
  |  Branch (933:9): [True: 0, False: 10.9k]
  ------------------
  934|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  935|      0|        return 0;
  936|      0|    }
  937|  10.9k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (937:9): [True: 0, False: 10.9k]
  ------------------
  938|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  939|      0|        return 0;
  940|      0|    }
  941|  10.9k|    if (EC_POINT_is_at_infinity(group, point)) {
  ------------------
  |  Branch (941:9): [True: 0, False: 10.9k]
  ------------------
  942|      0|        ERR_raise(ERR_LIB_EC, EC_R_POINT_AT_INFINITY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  943|      0|        return 0;
  944|      0|    }
  945|  10.9k|    return group->meth->point_get_affine_coordinates(group, point, x, y, ctx);
  946|  10.9k|}
EC_POINT_is_at_infinity:
 1009|  81.1k|{
 1010|  81.1k|    if (group->meth->is_at_infinity == 0) {
  ------------------
  |  Branch (1010:9): [True: 0, False: 81.1k]
  ------------------
 1011|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1012|      0|        return 0;
 1013|      0|    }
 1014|  81.1k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (1014:9): [True: 0, False: 81.1k]
  ------------------
 1015|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1016|      0|        return 0;
 1017|      0|    }
 1018|  81.1k|    return group->meth->is_at_infinity(group, point);
 1019|  81.1k|}
EC_POINT_is_on_curve:
 1030|  29.3k|{
 1031|  29.3k|    if (group->meth->is_on_curve == 0) {
  ------------------
  |  Branch (1031:9): [True: 0, False: 29.3k]
  ------------------
 1032|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1033|      0|        return 0;
 1034|      0|    }
 1035|  29.3k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (1035:9): [True: 0, False: 29.3k]
  ------------------
 1036|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1037|      0|        return 0;
 1038|      0|    }
 1039|  29.3k|    return group->meth->is_on_curve(group, point, ctx);
 1040|  29.3k|}
EC_POINT_cmp:
 1044|  14.9k|{
 1045|  14.9k|    if (group->meth->point_cmp == 0) {
  ------------------
  |  Branch (1045:9): [True: 0, False: 14.9k]
  ------------------
 1046|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1047|      0|        return -1;
 1048|      0|    }
 1049|  14.9k|    if (!ec_point_is_compat(a, group) || !ec_point_is_compat(b, group)) {
  ------------------
  |  Branch (1049:9): [True: 0, False: 14.9k]
  |  Branch (1049:42): [True: 0, False: 14.9k]
  ------------------
 1050|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1051|      0|        return -1;
 1052|      0|    }
 1053|  14.9k|    return group->meth->point_cmp(group, a, b, ctx);
 1054|  14.9k|}
EC_POINT_mul:
 1145|  7.25k|{
 1146|  7.25k|    int ret = 0;
 1147|  7.25k|    size_t num;
 1148|  7.25k|#ifndef FIPS_MODULE
 1149|  7.25k|    BN_CTX *new_ctx = NULL;
 1150|  7.25k|#endif
 1151|       |
 1152|  7.25k|    if (!ec_point_is_compat(r, group)
  ------------------
  |  Branch (1152:9): [True: 0, False: 7.25k]
  ------------------
 1153|  7.25k|        || (point != NULL && !ec_point_is_compat(point, group))) {
  ------------------
  |  Branch (1153:13): [True: 3.62k, False: 3.62k]
  |  Branch (1153:30): [True: 0, False: 3.62k]
  ------------------
 1154|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1155|      0|        return 0;
 1156|      0|    }
 1157|       |
 1158|  7.25k|    if (g_scalar == NULL && p_scalar == NULL)
  ------------------
  |  Branch (1158:9): [True: 0, False: 7.25k]
  |  Branch (1158:29): [True: 0, False: 0]
  ------------------
 1159|      0|        return EC_POINT_set_to_infinity(group, r);
 1160|       |
 1161|  7.25k|#ifndef FIPS_MODULE
 1162|  7.25k|    if (ctx == NULL)
  ------------------
  |  Branch (1162:9): [True: 0, False: 7.25k]
  ------------------
 1163|      0|        ctx = new_ctx = BN_CTX_secure_new();
 1164|  7.25k|#endif
 1165|  7.25k|    if (ctx == NULL) {
  ------------------
  |  Branch (1165:9): [True: 0, False: 7.25k]
  ------------------
 1166|      0|        ERR_raise(ERR_LIB_EC, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1167|      0|        return 0;
 1168|      0|    }
 1169|       |
 1170|  7.25k|    num = (point != NULL && p_scalar != NULL) ? 1 : 0;
  ------------------
  |  Branch (1170:12): [True: 3.62k, False: 3.62k]
  |  Branch (1170:29): [True: 3.62k, False: 0]
  ------------------
 1171|  7.25k|    if (group->meth->mul != NULL)
  ------------------
  |  Branch (1171:9): [True: 7.25k, False: 0]
  ------------------
 1172|  7.25k|        ret = group->meth->mul(group, r, g_scalar, num, &point, &p_scalar, ctx);
 1173|      0|    else
 1174|       |        /* use default */
 1175|      0|        ret = ossl_ec_wNAF_mul(group, r, g_scalar, num, &point, &p_scalar, ctx);
 1176|       |
 1177|  7.25k|#ifndef FIPS_MODULE
 1178|  7.25k|    BN_CTX_free(new_ctx);
 1179|  7.25k|#endif
 1180|  7.25k|    return ret;
 1181|  7.25k|}
ossl_ec_group_simple_order_bits:
 1256|  40.2k|{
 1257|  40.2k|    if (group->order == NULL)
  ------------------
  |  Branch (1257:9): [True: 0, False: 40.2k]
  ------------------
 1258|      0|        return 0;
 1259|  40.2k|    return BN_num_bits(group->order);
 1260|  40.2k|}
ossl_ec_group_do_inverse_ord:
 1325|  7.25k|{
 1326|  7.25k|    if (group->meth->field_inverse_mod_ord != NULL)
  ------------------
  |  Branch (1326:9): [True: 7.25k, False: 0]
  ------------------
 1327|  7.25k|        return group->meth->field_inverse_mod_ord(group, res, x, ctx);
 1328|      0|    else
 1329|      0|        return ec_field_inverse_mod_ord(group, res, x, ctx);
 1330|  7.25k|}

ec_lib.c:ec_point_is_compat:
  332|   220k|{
  333|   220k|    return group->meth == point->meth
  ------------------
  |  Branch (333:12): [True: 220k, False: 0]
  ------------------
  334|   220k|        && (group->curve_name == 0
  ------------------
  |  Branch (334:13): [True: 58.6k, False: 162k]
  ------------------
  335|   162k|            || point->curve_name == 0
  ------------------
  |  Branch (335:16): [True: 41.0k, False: 121k]
  ------------------
  336|   121k|            || group->curve_name == point->curve_name);
  ------------------
  |  Branch (336:16): [True: 121k, False: 0]
  ------------------
  337|   220k|}
ec_oct.c:ec_point_is_compat:
  332|  14.6k|{
  333|  14.6k|    return group->meth == point->meth
  ------------------
  |  Branch (333:12): [True: 14.6k, False: 0]
  ------------------
  334|  14.6k|        && (group->curve_name == 0
  ------------------
  |  Branch (334:13): [True: 0, False: 14.6k]
  ------------------
  335|  14.6k|            || point->curve_name == 0
  ------------------
  |  Branch (335:16): [True: 0, False: 14.6k]
  ------------------
  336|  14.6k|            || group->curve_name == point->curve_name);
  ------------------
  |  Branch (336:16): [True: 14.6k, False: 0]
  ------------------
  337|  14.6k|}

EC_POINT_oct2point:
  111|  14.6k|{
  112|  14.6k|    if (group->meth->oct2point == 0
  ------------------
  |  Branch (112:9): [True: 14.6k, False: 0]
  ------------------
  113|  14.6k|        && !(group->meth->flags & EC_FLAGS_DEFAULT_OCT)) {
  ------------------
  |  |   26|  14.6k|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
  |  Branch (113:12): [True: 0, False: 14.6k]
  ------------------
  114|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  115|      0|        return 0;
  116|      0|    }
  117|  14.6k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (117:9): [True: 0, False: 14.6k]
  ------------------
  118|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  119|      0|        return 0;
  120|      0|    }
  121|  14.6k|    if (group->meth->flags & EC_FLAGS_DEFAULT_OCT) {
  ------------------
  |  |   26|  14.6k|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
  |  Branch (121:9): [True: 14.6k, False: 0]
  ------------------
  122|  14.6k|        if (group->meth->field_type == NID_X9_62_prime_field)
  ------------------
  |  |  152|  14.6k|#define NID_X9_62_prime_field           406
  ------------------
  |  Branch (122:13): [True: 14.6k, False: 0]
  ------------------
  123|  14.6k|            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|  14.6k|#endif
  133|  14.6k|    }
  134|      0|    return group->meth->oct2point(group, point, buf, len, ctx);
  135|  14.6k|}

ossl_ecdsa_sign_sig:
   53|  3.62k|{
   54|  3.62k|    if (eckey->group->meth->ecdsa_sign_sig == NULL) {
  ------------------
  |  Branch (54:9): [True: 0, False: 3.62k]
  ------------------
   55|      0|        ERR_raise(ERR_LIB_EC, EC_R_CURVE_DOES_NOT_SUPPORT_ECDSA);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   56|      0|        return NULL;
   57|      0|    }
   58|       |
   59|  3.62k|    return eckey->group->meth->ecdsa_sign_sig(dgst, dgst_len,
   60|  3.62k|        in_kinv, in_r, eckey);
   61|  3.62k|}
ossl_ecdsa_verify_sig:
   65|  3.62k|{
   66|  3.62k|    if (eckey->group->meth->ecdsa_verify_sig == NULL) {
  ------------------
  |  Branch (66:9): [True: 0, False: 3.62k]
  ------------------
   67|      0|        ERR_raise(ERR_LIB_EC, EC_R_CURVE_DOES_NOT_SUPPORT_ECDSA);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   68|      0|        return 0;
   69|      0|    }
   70|       |
   71|  3.62k|    return eckey->group->meth->ecdsa_verify_sig(dgst, dgst_len, sig, eckey);
   72|  3.62k|}
ossl_ecdsa_sign:
   77|  3.62k|{
   78|  3.62k|    ECDSA_SIG *s;
   79|       |
   80|  3.62k|    if (sig == NULL && (kinv == NULL || r == NULL)) {
  ------------------
  |  Branch (80:9): [True: 0, False: 3.62k]
  |  Branch (80:25): [True: 0, False: 0]
  |  Branch (80:41): [True: 0, False: 0]
  ------------------
   81|      0|        *siglen = ECDSA_size(eckey);
   82|      0|        return 1;
   83|      0|    }
   84|       |
   85|  3.62k|    s = ECDSA_do_sign_ex(dgst, dlen, kinv, r, eckey);
   86|  3.62k|    if (s == NULL) {
  ------------------
  |  Branch (86:9): [True: 0, False: 3.62k]
  ------------------
   87|      0|        *siglen = 0;
   88|      0|        return 0;
   89|      0|    }
   90|  3.62k|    *siglen = i2d_ECDSA_SIG(s, sig != NULL ? &sig : NULL);
  ------------------
  |  Branch (90:32): [True: 3.62k, False: 0]
  ------------------
   91|  3.62k|    ECDSA_SIG_free(s);
   92|  3.62k|    return 1;
   93|  3.62k|}
ossl_ecdsa_simple_sign_sig:
  271|  3.62k|{
  272|  3.62k|    int ok = 0, i;
  273|  3.62k|    int retries = 0;
  274|  3.62k|    BIGNUM *kinv = NULL, *s, *m = NULL;
  275|  3.62k|    const BIGNUM *order, *ckinv;
  276|  3.62k|    BN_CTX *ctx = NULL;
  277|  3.62k|    const EC_GROUP *group;
  278|  3.62k|    ECDSA_SIG *ret;
  279|  3.62k|    const BIGNUM *priv_key;
  280|       |
  281|  3.62k|    group = EC_KEY_get0_group(eckey);
  282|  3.62k|    priv_key = EC_KEY_get0_private_key(eckey);
  283|       |
  284|  3.62k|    if (group == NULL) {
  ------------------
  |  Branch (284:9): [True: 0, False: 3.62k]
  ------------------
  285|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  286|      0|        return NULL;
  287|      0|    }
  288|  3.62k|    if (priv_key == NULL) {
  ------------------
  |  Branch (288:9): [True: 0, False: 3.62k]
  ------------------
  289|      0|        ERR_raise(ERR_LIB_EC, EC_R_MISSING_PRIVATE_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  290|      0|        return NULL;
  291|      0|    }
  292|       |
  293|  3.62k|    if (!EC_KEY_can_sign(eckey)) {
  ------------------
  |  Branch (293:9): [True: 0, False: 3.62k]
  ------------------
  294|      0|        ERR_raise(ERR_LIB_EC, EC_R_CURVE_DOES_NOT_SUPPORT_SIGNING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  295|      0|        return NULL;
  296|      0|    }
  297|       |
  298|  3.62k|    ret = ECDSA_SIG_new();
  299|  3.62k|    if (ret == NULL) {
  ------------------
  |  Branch (299:9): [True: 0, False: 3.62k]
  ------------------
  300|      0|        ERR_raise(ERR_LIB_EC, ERR_R_ECDSA_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  301|      0|        return NULL;
  302|      0|    }
  303|  3.62k|    ret->r = BN_new();
  304|  3.62k|    ret->s = BN_new();
  305|  3.62k|    if (ret->r == NULL || ret->s == NULL) {
  ------------------
  |  Branch (305:9): [True: 0, False: 3.62k]
  |  Branch (305:27): [True: 0, False: 3.62k]
  ------------------
  306|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  307|      0|        goto err;
  308|      0|    }
  309|  3.62k|    s = ret->s;
  310|       |
  311|  3.62k|    if ((ctx = BN_CTX_new_ex(eckey->libctx)) == NULL
  ------------------
  |  Branch (311:9): [True: 0, False: 3.62k]
  ------------------
  312|  3.62k|        || (m = BN_new()) == NULL) {
  ------------------
  |  Branch (312:12): [True: 0, False: 3.62k]
  ------------------
  313|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  314|      0|        goto err;
  315|      0|    }
  316|       |
  317|  3.62k|    if ((order = EC_GROUP_get0_order(group)) == NULL) {
  ------------------
  |  Branch (317:9): [True: 0, False: 3.62k]
  ------------------
  318|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  319|      0|        goto err;
  320|      0|    }
  321|       |
  322|  3.62k|    i = BN_num_bits(order);
  323|       |    /*
  324|       |     * Need to truncate digest if it is too long: first truncate whole bytes.
  325|       |     */
  326|  3.62k|    if (8 * dgst_len > i)
  ------------------
  |  Branch (326:9): [True: 0, False: 3.62k]
  ------------------
  327|      0|        dgst_len = (i + 7) / 8;
  328|  3.62k|    if (!BN_bin2bn(dgst, dgst_len, m)) {
  ------------------
  |  Branch (328:9): [True: 0, False: 3.62k]
  ------------------
  329|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  330|      0|        goto err;
  331|      0|    }
  332|       |    /* If still too long, truncate remaining bits with a shift */
  333|  3.62k|    if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) {
  ------------------
  |  Branch (333:9): [True: 0, False: 3.62k]
  |  Branch (333:31): [True: 0, False: 0]
  ------------------
  334|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  335|      0|        goto err;
  336|      0|    }
  337|  3.62k|    do {
  338|  3.62k|        if (in_kinv == NULL || in_r == NULL) {
  ------------------
  |  Branch (338:13): [True: 3.62k, False: 0]
  |  Branch (338:32): [True: 0, False: 0]
  ------------------
  339|  3.62k|            if (!ecdsa_sign_setup(eckey, ctx, &kinv, &ret->r, dgst, dgst_len,
  ------------------
  |  Branch (339:17): [True: 0, False: 3.62k]
  ------------------
  340|  3.62k|                    0, NULL, NULL, NULL)) {
  341|      0|                ERR_raise(ERR_LIB_EC, ERR_R_ECDSA_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  342|      0|                goto err;
  343|      0|            }
  344|  3.62k|            ckinv = kinv;
  345|  3.62k|        } else {
  346|      0|            ckinv = in_kinv;
  347|      0|            if (BN_copy(ret->r, in_r) == NULL) {
  ------------------
  |  Branch (347:17): [True: 0, False: 0]
  ------------------
  348|      0|                ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  349|      0|                goto err;
  350|      0|            }
  351|      0|        }
  352|       |
  353|       |        /*
  354|       |         * With only one multiplicant being in Montgomery domain
  355|       |         * multiplication yields real result without post-conversion.
  356|       |         * Also note that all operations but last are performed with
  357|       |         * zero-padded vectors. Last operation, BN_mod_mul_montgomery
  358|       |         * below, returns user-visible value with removed zero padding.
  359|       |         */
  360|  3.62k|        if (!bn_to_mont_fixed_top(s, ret->r, group->mont_data, ctx)
  ------------------
  |  Branch (360:13): [True: 0, False: 3.62k]
  ------------------
  361|  3.62k|            || !bn_mul_mont_fixed_top(s, s, priv_key, group->mont_data, ctx)) {
  ------------------
  |  Branch (361:16): [True: 0, False: 3.62k]
  ------------------
  362|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  363|      0|            goto err;
  364|      0|        }
  365|  3.62k|        if (!bn_mod_add_fixed_top(s, s, m, order)) {
  ------------------
  |  Branch (365:13): [True: 0, False: 3.62k]
  ------------------
  366|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  367|      0|            goto err;
  368|      0|        }
  369|       |        /*
  370|       |         * |s| can still be larger than modulus, because |m| can be. In
  371|       |         * such case we count on Montgomery reduction to tie it up.
  372|       |         */
  373|  3.62k|        if (!bn_to_mont_fixed_top(s, s, group->mont_data, ctx)
  ------------------
  |  Branch (373:13): [True: 0, False: 3.62k]
  ------------------
  374|  3.62k|            || !BN_mod_mul_montgomery(s, s, ckinv, group->mont_data, ctx)) {
  ------------------
  |  Branch (374:16): [True: 0, False: 3.62k]
  ------------------
  375|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  376|      0|            goto err;
  377|      0|        }
  378|       |
  379|  3.62k|        if (BN_is_zero(s)) {
  ------------------
  |  Branch (379:13): [True: 0, False: 3.62k]
  ------------------
  380|       |            /*
  381|       |             * if kinv and r have been supplied by the caller, don't
  382|       |             * generate new kinv and r values
  383|       |             */
  384|      0|            if (in_kinv != NULL && in_r != NULL) {
  ------------------
  |  Branch (384:17): [True: 0, False: 0]
  |  Branch (384:36): [True: 0, False: 0]
  ------------------
  385|      0|                ERR_raise(ERR_LIB_EC, EC_R_NEED_NEW_SETUP_VALUES);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  386|      0|                goto err;
  387|      0|            }
  388|       |            /* Avoid infinite loops cause by invalid group parameters */
  389|      0|            if (retries++ > MAX_ECDSA_SIGN_RETRIES) {
  ------------------
  |  |   31|      0|#define MAX_ECDSA_SIGN_RETRIES 8
  ------------------
  |  Branch (389:17): [True: 0, False: 0]
  ------------------
  390|      0|                ERR_raise(ERR_LIB_EC, EC_R_TOO_MANY_RETRIES);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  391|      0|                goto err;
  392|      0|            }
  393|  3.62k|        } else {
  394|       |            /* s != 0 => we have a valid signature */
  395|  3.62k|            break;
  396|  3.62k|        }
  397|  3.62k|    } while (1);
  ------------------
  |  Branch (397:14): [True: 0, Folded]
  ------------------
  398|       |
  399|  3.62k|    ok = 1;
  400|  3.62k|err:
  401|  3.62k|    if (!ok) {
  ------------------
  |  Branch (401:9): [True: 0, False: 3.62k]
  ------------------
  402|      0|        ECDSA_SIG_free(ret);
  403|       |        ret = NULL;
  404|      0|    }
  405|  3.62k|    BN_CTX_free(ctx);
  406|  3.62k|    BN_clear_free(m);
  407|  3.62k|    BN_clear_free(kinv);
  408|  3.62k|    return ret;
  409|  3.62k|}
ossl_ecdsa_verify:
  419|  3.62k|{
  420|  3.62k|    ECDSA_SIG *s;
  421|  3.62k|    const unsigned char *p = sigbuf;
  422|  3.62k|    unsigned char *der = NULL;
  423|  3.62k|    int derlen = -1;
  424|  3.62k|    int ret = -1;
  425|       |
  426|  3.62k|    s = ECDSA_SIG_new();
  427|  3.62k|    if (s == NULL)
  ------------------
  |  Branch (427:9): [True: 0, False: 3.62k]
  ------------------
  428|      0|        return ret;
  429|  3.62k|    if (d2i_ECDSA_SIG(&s, &p, sig_len) == NULL)
  ------------------
  |  Branch (429:9): [True: 0, False: 3.62k]
  ------------------
  430|      0|        goto err;
  431|       |    /* Ensure signature uses DER and doesn't have trailing garbage */
  432|  3.62k|    derlen = i2d_ECDSA_SIG(s, &der);
  433|  3.62k|    if (derlen != sig_len || memcmp(sigbuf, der, derlen) != 0)
  ------------------
  |  Branch (433:9): [True: 0, False: 3.62k]
  |  Branch (433:30): [True: 0, False: 3.62k]
  ------------------
  434|      0|        goto err;
  435|  3.62k|    ret = ECDSA_do_verify(dgst, dgst_len, s, eckey);
  436|  3.62k|err:
  437|  3.62k|    OPENSSL_free(der);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  438|  3.62k|    ECDSA_SIG_free(s);
  439|  3.62k|    return ret;
  440|  3.62k|}
ossl_ecdsa_simple_verify_sig:
  444|  3.62k|{
  445|  3.62k|    int ret = -1, i;
  446|  3.62k|    BN_CTX *ctx;
  447|  3.62k|    const BIGNUM *order;
  448|  3.62k|    BIGNUM *u1, *u2, *m, *X;
  449|  3.62k|    EC_POINT *point = NULL;
  450|  3.62k|    const EC_GROUP *group;
  451|  3.62k|    const EC_POINT *pub_key;
  452|       |
  453|       |    /* check input values */
  454|  3.62k|    if (eckey == NULL || (group = EC_KEY_get0_group(eckey)) == NULL || (pub_key = EC_KEY_get0_public_key(eckey)) == NULL || sig == NULL) {
  ------------------
  |  Branch (454:9): [True: 0, False: 3.62k]
  |  Branch (454:26): [True: 0, False: 3.62k]
  |  Branch (454:72): [True: 0, False: 3.62k]
  |  Branch (454:125): [True: 0, False: 3.62k]
  ------------------
  455|      0|        ERR_raise(ERR_LIB_EC, EC_R_MISSING_PARAMETERS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  456|      0|        return -1;
  457|      0|    }
  458|       |
  459|  3.62k|    if (!EC_KEY_can_sign(eckey)) {
  ------------------
  |  Branch (459:9): [True: 0, False: 3.62k]
  ------------------
  460|      0|        ERR_raise(ERR_LIB_EC, EC_R_CURVE_DOES_NOT_SUPPORT_SIGNING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  461|      0|        return -1;
  462|      0|    }
  463|       |
  464|  3.62k|    ctx = BN_CTX_new_ex(eckey->libctx);
  465|  3.62k|    if (ctx == NULL) {
  ------------------
  |  Branch (465:9): [True: 0, False: 3.62k]
  ------------------
  466|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  467|      0|        return -1;
  468|      0|    }
  469|  3.62k|    BN_CTX_start(ctx);
  470|  3.62k|    u1 = BN_CTX_get(ctx);
  471|  3.62k|    u2 = BN_CTX_get(ctx);
  472|  3.62k|    m = BN_CTX_get(ctx);
  473|  3.62k|    X = BN_CTX_get(ctx);
  474|  3.62k|    if (X == NULL) {
  ------------------
  |  Branch (474:9): [True: 0, False: 3.62k]
  ------------------
  475|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  476|      0|        goto err;
  477|      0|    }
  478|       |
  479|  3.62k|    order = EC_GROUP_get0_order(group);
  480|  3.62k|    if (order == NULL) {
  ------------------
  |  Branch (480:9): [True: 0, False: 3.62k]
  ------------------
  481|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  482|      0|        goto err;
  483|      0|    }
  484|       |
  485|  3.62k|    if (BN_is_zero(sig->r) || BN_is_negative(sig->r) || BN_ucmp(sig->r, order) >= 0 || BN_is_zero(sig->s) || BN_is_negative(sig->s) || BN_ucmp(sig->s, order) >= 0) {
  ------------------
  |  Branch (485:9): [True: 0, False: 3.62k]
  |  Branch (485:31): [True: 0, False: 3.62k]
  |  Branch (485:57): [True: 0, False: 3.62k]
  |  Branch (485:88): [True: 0, False: 3.62k]
  |  Branch (485:110): [True: 0, False: 3.62k]
  |  Branch (485:136): [True: 0, False: 3.62k]
  ------------------
  486|      0|        ERR_raise(ERR_LIB_EC, EC_R_BAD_SIGNATURE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  487|      0|        ret = 0; /* signature is invalid */
  488|      0|        goto err;
  489|      0|    }
  490|       |    /* calculate tmp1 = inv(S) mod order */
  491|  3.62k|    if (!ossl_ec_group_do_inverse_ord(group, u2, sig->s, ctx)) {
  ------------------
  |  Branch (491:9): [True: 0, False: 3.62k]
  ------------------
  492|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  493|      0|        goto err;
  494|      0|    }
  495|       |    /* digest -> m */
  496|  3.62k|    i = BN_num_bits(order);
  497|       |    /*
  498|       |     * Need to truncate digest if it is too long: first truncate whole bytes.
  499|       |     */
  500|  3.62k|    if (8 * dgst_len > i)
  ------------------
  |  Branch (500:9): [True: 0, False: 3.62k]
  ------------------
  501|      0|        dgst_len = (i + 7) / 8;
  502|  3.62k|    if (!BN_bin2bn(dgst, dgst_len, m)) {
  ------------------
  |  Branch (502:9): [True: 0, False: 3.62k]
  ------------------
  503|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  504|      0|        goto err;
  505|      0|    }
  506|       |    /* If still too long truncate remaining bits with a shift */
  507|  3.62k|    if ((8 * dgst_len > i) && !BN_rshift(m, m, 8 - (i & 0x7))) {
  ------------------
  |  Branch (507:9): [True: 0, False: 3.62k]
  |  Branch (507:31): [True: 0, False: 0]
  ------------------
  508|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  509|      0|        goto err;
  510|      0|    }
  511|       |    /* u1 = m * tmp mod order */
  512|  3.62k|    if (!BN_mod_mul(u1, m, u2, order, ctx)) {
  ------------------
  |  Branch (512:9): [True: 0, False: 3.62k]
  ------------------
  513|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  514|      0|        goto err;
  515|      0|    }
  516|       |    /* u2 = r * w mod q */
  517|  3.62k|    if (!BN_mod_mul(u2, sig->r, u2, order, ctx)) {
  ------------------
  |  Branch (517:9): [True: 0, False: 3.62k]
  ------------------
  518|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  519|      0|        goto err;
  520|      0|    }
  521|       |
  522|  3.62k|    if ((point = EC_POINT_new(group)) == NULL) {
  ------------------
  |  Branch (522:9): [True: 0, False: 3.62k]
  ------------------
  523|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  524|      0|        goto err;
  525|      0|    }
  526|  3.62k|    if (!EC_POINT_mul(group, point, u1, pub_key, u2, ctx)) {
  ------------------
  |  Branch (526:9): [True: 0, False: 3.62k]
  ------------------
  527|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  528|      0|        goto err;
  529|      0|    }
  530|       |
  531|  3.62k|    if (!EC_POINT_get_affine_coordinates(group, point, X, NULL, ctx)) {
  ------------------
  |  Branch (531:9): [True: 0, False: 3.62k]
  ------------------
  532|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  533|      0|        goto err;
  534|      0|    }
  535|       |
  536|  3.62k|    if (!BN_nnmod(u1, X, order, ctx)) {
  ------------------
  |  Branch (536:9): [True: 0, False: 3.62k]
  ------------------
  537|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  538|      0|        goto err;
  539|      0|    }
  540|       |    /*  if the signature is correct u1 is equal to sig->r */
  541|  3.62k|    ret = (BN_ucmp(u1, sig->r) == 0);
  542|  3.62k|err:
  543|  3.62k|    BN_CTX_end(ctx);
  544|  3.62k|    BN_CTX_free(ctx);
  545|  3.62k|    EC_POINT_free(point);
  546|  3.62k|    return ret;
  547|  3.62k|}
ecdsa_ossl.c:ecdsa_sign_setup:
  137|  3.62k|{
  138|  3.62k|    BN_CTX *ctx = NULL;
  139|  3.62k|    BIGNUM *k = NULL, *r = NULL, *X = NULL;
  140|  3.62k|    const BIGNUM *order;
  141|  3.62k|    EC_POINT *tmp_point = NULL;
  142|  3.62k|    const EC_GROUP *group;
  143|  3.62k|    int ret = 0;
  144|  3.62k|    int order_bits;
  145|  3.62k|    const BIGNUM *priv_key;
  146|       |
  147|  3.62k|    if (eckey == NULL || (group = EC_KEY_get0_group(eckey)) == NULL) {
  ------------------
  |  Branch (147:9): [True: 0, False: 3.62k]
  |  Branch (147:26): [True: 0, False: 3.62k]
  ------------------
  148|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  149|      0|        return 0;
  150|      0|    }
  151|  3.62k|    if ((priv_key = EC_KEY_get0_private_key(eckey)) == NULL) {
  ------------------
  |  Branch (151:9): [True: 0, False: 3.62k]
  ------------------
  152|      0|        ERR_raise(ERR_LIB_EC, EC_R_MISSING_PRIVATE_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  153|      0|        return 0;
  154|      0|    }
  155|       |
  156|  3.62k|    if (!EC_KEY_can_sign(eckey)) {
  ------------------
  |  Branch (156:9): [True: 0, False: 3.62k]
  ------------------
  157|      0|        ERR_raise(ERR_LIB_EC, EC_R_CURVE_DOES_NOT_SUPPORT_SIGNING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  158|      0|        return 0;
  159|      0|    }
  160|       |
  161|  3.62k|    if ((ctx = ctx_in) == NULL) {
  ------------------
  |  Branch (161:9): [True: 0, False: 3.62k]
  ------------------
  162|      0|        if ((ctx = BN_CTX_new_ex(eckey->libctx)) == NULL) {
  ------------------
  |  Branch (162:13): [True: 0, False: 0]
  ------------------
  163|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  164|      0|            return 0;
  165|      0|        }
  166|      0|    }
  167|       |
  168|  3.62k|    k = BN_secure_new(); /* this value is later returned in *kinvp */
  169|  3.62k|    r = BN_new(); /* this value is later returned in *rp */
  170|  3.62k|    X = BN_new();
  171|  3.62k|    if (k == NULL || r == NULL || X == NULL) {
  ------------------
  |  Branch (171:9): [True: 0, False: 3.62k]
  |  Branch (171:22): [True: 0, False: 3.62k]
  |  Branch (171:35): [True: 0, False: 3.62k]
  ------------------
  172|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  173|      0|        goto err;
  174|      0|    }
  175|  3.62k|    if ((tmp_point = EC_POINT_new(group)) == NULL) {
  ------------------
  |  Branch (175:9): [True: 0, False: 3.62k]
  ------------------
  176|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  177|      0|        goto err;
  178|      0|    }
  179|       |
  180|  3.62k|    if ((order = EC_GROUP_get0_order(group)) == NULL) {
  ------------------
  |  Branch (180:9): [True: 0, False: 3.62k]
  ------------------
  181|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  182|      0|        goto err;
  183|      0|    }
  184|       |
  185|       |    /* Preallocate space */
  186|  3.62k|    order_bits = BN_num_bits(order);
  187|       |    /* Check the number of bits here so that an infinite loop is not possible */
  188|  3.62k|    if (order_bits < MIN_ECDSA_SIGN_ORDERBITS
  ------------------
  |  |   24|  7.25k|#define MIN_ECDSA_SIGN_ORDERBITS 64
  ------------------
  |  Branch (188:9): [True: 0, False: 3.62k]
  ------------------
  189|  3.62k|        || !BN_set_bit(k, order_bits)
  ------------------
  |  Branch (189:12): [True: 0, False: 3.62k]
  ------------------
  190|  3.62k|        || !BN_set_bit(r, order_bits)
  ------------------
  |  Branch (190:12): [True: 0, False: 3.62k]
  ------------------
  191|  3.62k|        || !BN_set_bit(X, order_bits))
  ------------------
  |  Branch (191:12): [True: 0, False: 3.62k]
  ------------------
  192|      0|        goto err;
  193|       |
  194|  3.62k|    do {
  195|       |        /* get random or deterministic value of k */
  196|  3.62k|        do {
  197|  3.62k|            int res = 0;
  198|       |
  199|  3.62k|            if (dgst != NULL) {
  ------------------
  |  Branch (199:17): [True: 3.62k, False: 0]
  ------------------
  200|  3.62k|                if (nonce_type == 1) {
  ------------------
  |  Branch (200:21): [True: 0, False: 3.62k]
  ------------------
  201|      0|                    res = ossl_gen_deterministic_nonce_rfc6979(k, order,
  202|      0|                        priv_key,
  203|      0|                        dgst, dlen,
  204|      0|                        digestname,
  205|      0|                        libctx, propq);
  206|  3.62k|                } else {
  207|  3.62k|                    res = ossl_bn_gen_dsa_nonce_fixed_top(k, order, priv_key,
  208|  3.62k|                        dgst, dlen, ctx);
  209|  3.62k|                }
  210|  3.62k|            } else {
  211|      0|                res = ossl_bn_priv_rand_range_fixed_top(k, order, 0, ctx);
  212|      0|            }
  213|  3.62k|            if (!res) {
  ------------------
  |  Branch (213:17): [True: 0, False: 3.62k]
  ------------------
  214|      0|                ERR_raise(ERR_LIB_EC, EC_R_RANDOM_NUMBER_GENERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  215|      0|                goto err;
  216|      0|            }
  217|  3.62k|        } while (ossl_bn_is_word_fixed_top(k, 0));
  ------------------
  |  Branch (217:18): [True: 0, False: 3.62k]
  ------------------
  218|       |
  219|       |        /* compute r the x-coordinate of generator * k */
  220|  3.62k|        if (!EC_POINT_mul(group, tmp_point, k, NULL, NULL, ctx)) {
  ------------------
  |  Branch (220:13): [True: 0, False: 3.62k]
  ------------------
  221|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  222|      0|            goto err;
  223|      0|        }
  224|       |
  225|  3.62k|        if (!EC_POINT_get_affine_coordinates(group, tmp_point, X, NULL, ctx)) {
  ------------------
  |  Branch (225:13): [True: 0, False: 3.62k]
  ------------------
  226|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  227|      0|            goto err;
  228|      0|        }
  229|       |
  230|  3.62k|        if (!BN_nnmod(r, X, order, ctx)) {
  ------------------
  |  Branch (230:13): [True: 0, False: 3.62k]
  ------------------
  231|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  232|      0|            goto err;
  233|      0|        }
  234|  3.62k|    } while (BN_is_zero(r));
  ------------------
  |  Branch (234:14): [True: 0, False: 3.62k]
  ------------------
  235|       |
  236|       |    /* compute the inverse of k */
  237|  3.62k|    if (!ossl_ec_group_do_inverse_ord(group, k, k, ctx)) {
  ------------------
  |  Branch (237:9): [True: 0, False: 3.62k]
  ------------------
  238|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  239|      0|        goto err;
  240|      0|    }
  241|       |
  242|       |    /* clear old values if necessary */
  243|  3.62k|    BN_clear_free(*rp);
  244|  3.62k|    BN_clear_free(*kinvp);
  245|       |    /* save the pre-computed values  */
  246|  3.62k|    *rp = r;
  247|  3.62k|    *kinvp = k;
  248|  3.62k|    ret = 1;
  249|  3.62k|err:
  250|  3.62k|    if (!ret) {
  ------------------
  |  Branch (250:9): [True: 0, False: 3.62k]
  ------------------
  251|      0|        BN_clear_free(k);
  252|      0|        BN_clear_free(r);
  253|      0|    }
  254|  3.62k|    if (ctx != ctx_in)
  ------------------
  |  Branch (254:9): [True: 0, False: 3.62k]
  ------------------
  255|      0|        BN_CTX_free(ctx);
  256|  3.62k|    EC_POINT_free(tmp_point);
  257|  3.62k|    BN_clear_free(X);
  258|  3.62k|    return ret;
  259|  3.62k|}

ECDSA_do_sign_ex:
   28|  3.62k|{
   29|  3.62k|    if (eckey->meth->sign_sig != NULL)
  ------------------
  |  Branch (29:9): [True: 3.62k, False: 0]
  ------------------
   30|  3.62k|        return eckey->meth->sign_sig(dgst, dlen, kinv, rp, eckey);
   31|  3.62k|    ERR_raise(ERR_LIB_EC, EC_R_OPERATION_NOT_SUPPORTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   32|       |    return NULL;
   33|  3.62k|}
ECDSA_sign_ex:
   43|  3.62k|{
   44|  3.62k|    if (eckey->meth->sign != NULL)
  ------------------
  |  Branch (44:9): [True: 3.62k, False: 0]
  ------------------
   45|  3.62k|        return eckey->meth->sign(type, dgst, dlen, sig, siglen, kinv, r, eckey);
   46|  3.62k|    ERR_raise(ERR_LIB_EC, EC_R_OPERATION_NOT_SUPPORTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   47|      0|    return 0;
   48|  3.62k|}

ECDSA_do_verify:
   28|  3.62k|{
   29|  3.62k|    if (eckey->meth->verify_sig != NULL)
  ------------------
  |  Branch (29:9): [True: 3.62k, False: 0]
  ------------------
   30|  3.62k|        return eckey->meth->verify_sig(dgst, dgst_len, sig, eckey);
   31|  3.62k|    ERR_raise(ERR_LIB_EC, EC_R_OPERATION_NOT_SUPPORTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   32|      0|    return -1;
   33|  3.62k|}
ECDSA_verify:
   43|  3.62k|{
   44|  3.62k|    if (eckey->meth->verify != NULL)
  ------------------
  |  Branch (44:9): [True: 3.62k, False: 0]
  ------------------
   45|  3.62k|        return eckey->meth->verify(type, dgst, dgst_len, sigbuf, sig_len,
   46|  3.62k|            eckey);
   47|  3.62k|    ERR_raise(ERR_LIB_EC, EC_R_OPERATION_NOT_SUPPORTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   48|      0|    return -1;
   49|  3.62k|}

ossl_ec_GFp_mont_group_init:
   84|  29.3k|{
   85|  29.3k|    int ok;
   86|       |
   87|  29.3k|    ok = ossl_ec_GFp_simple_group_init(group);
   88|  29.3k|    group->field_data1 = NULL;
   89|       |    group->field_data2 = NULL;
   90|  29.3k|    return ok;
   91|  29.3k|}
ossl_ec_GFp_mont_group_finish:
   94|  29.3k|{
   95|  29.3k|    BN_MONT_CTX_free(group->field_data1);
   96|  29.3k|    group->field_data1 = NULL;
   97|  29.3k|    BN_free(group->field_data2);
   98|       |    group->field_data2 = NULL;
   99|  29.3k|    ossl_ec_GFp_simple_group_finish(group);
  100|  29.3k|}
ossl_ec_GFp_mont_group_copy:
  112|  14.6k|{
  113|  14.6k|    BN_MONT_CTX_free(dest->field_data1);
  114|  14.6k|    dest->field_data1 = NULL;
  115|  14.6k|    BN_clear_free(dest->field_data2);
  116|  14.6k|    dest->field_data2 = NULL;
  117|       |
  118|  14.6k|    if (!ossl_ec_GFp_simple_group_copy(dest, src))
  ------------------
  |  Branch (118:9): [True: 0, False: 14.6k]
  ------------------
  119|      0|        return 0;
  120|       |
  121|  14.6k|    if (src->field_data1 != NULL) {
  ------------------
  |  Branch (121:9): [True: 14.6k, False: 0]
  ------------------
  122|  14.6k|        dest->field_data1 = BN_MONT_CTX_new();
  123|  14.6k|        if (dest->field_data1 == NULL)
  ------------------
  |  Branch (123:13): [True: 0, False: 14.6k]
  ------------------
  124|      0|            return 0;
  125|  14.6k|        if (!BN_MONT_CTX_copy(dest->field_data1, src->field_data1))
  ------------------
  |  Branch (125:13): [True: 0, False: 14.6k]
  ------------------
  126|      0|            goto err;
  127|  14.6k|    }
  128|  14.6k|    if (src->field_data2 != NULL) {
  ------------------
  |  Branch (128:9): [True: 14.6k, False: 0]
  ------------------
  129|  14.6k|        dest->field_data2 = BN_dup(src->field_data2);
  130|  14.6k|        if (dest->field_data2 == NULL)
  ------------------
  |  Branch (130:13): [True: 0, False: 14.6k]
  ------------------
  131|      0|            goto err;
  132|  14.6k|    }
  133|       |
  134|  14.6k|    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|  14.6k|}
ossl_ec_GFp_mont_field_mul:
  198|  29.3k|{
  199|  29.3k|    if (group->field_data1 == NULL) {
  ------------------
  |  Branch (199:9): [True: 0, False: 29.3k]
  ------------------
  200|      0|        ERR_raise(ERR_LIB_EC, EC_R_NOT_INITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  201|      0|        return 0;
  202|      0|    }
  203|       |
  204|  29.3k|    return BN_mod_mul_montgomery(r, a, b, group->field_data1, ctx);
  205|  29.3k|}
ossl_ec_GFp_mont_field_sqr:
  209|  58.6k|{
  210|  58.6k|    if (group->field_data1 == NULL) {
  ------------------
  |  Branch (210:9): [True: 0, False: 58.6k]
  ------------------
  211|      0|        ERR_raise(ERR_LIB_EC, EC_R_NOT_INITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  212|      0|        return 0;
  213|      0|    }
  214|       |
  215|  58.6k|    return BN_mod_mul_montgomery(r, a, a, group->field_data1, ctx);
  216|  58.6k|}
ossl_ec_GFp_mont_field_encode:
  269|  87.9k|{
  270|  87.9k|    if (group->field_data1 == NULL) {
  ------------------
  |  Branch (270:9): [True: 0, False: 87.9k]
  ------------------
  271|      0|        ERR_raise(ERR_LIB_EC, EC_R_NOT_INITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  272|      0|        return 0;
  273|      0|    }
  274|       |
  275|  87.9k|    return BN_to_montgomery(r, a, (BN_MONT_CTX *)group->field_data1, ctx);
  276|  87.9k|}
ossl_ec_GFp_mont_field_decode:
  280|  37.3k|{
  281|  37.3k|    if (group->field_data1 == NULL) {
  ------------------
  |  Branch (281:9): [True: 0, False: 37.3k]
  ------------------
  282|      0|        ERR_raise(ERR_LIB_EC, EC_R_NOT_INITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  283|      0|        return 0;
  284|      0|    }
  285|       |
  286|  37.3k|    return BN_from_montgomery(r, a, group->field_data1, ctx);
  287|  37.3k|}
ossl_ec_GFp_mont_field_set_to_one:
  291|  29.3k|{
  292|  29.3k|    if (group->field_data2 == NULL) {
  ------------------
  |  Branch (292:9): [True: 0, False: 29.3k]
  ------------------
  293|      0|        ERR_raise(ERR_LIB_EC, EC_R_NOT_INITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  294|      0|        return 0;
  295|      0|    }
  296|       |
  297|  29.3k|    if (!BN_copy(r, group->field_data2))
  ------------------
  |  Branch (297:9): [True: 0, False: 29.3k]
  ------------------
  298|      0|        return 0;
  299|  29.3k|    return 1;
  300|  29.3k|}

EC_GFp_nistz256_method:
 1570|  14.6k|{
 1571|  14.6k|    static const EC_METHOD ret = {
 1572|  14.6k|        EC_FLAGS_DEFAULT_OCT,
  ------------------
  |  |   26|  14.6k|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
 1573|  14.6k|        NID_X9_62_prime_field,
  ------------------
  |  |  152|  14.6k|#define NID_X9_62_prime_field           406
  ------------------
 1574|  14.6k|        ossl_ec_GFp_mont_group_init,
 1575|  14.6k|        ossl_ec_GFp_mont_group_finish,
 1576|  14.6k|        ossl_ec_GFp_mont_group_clear_finish,
 1577|  14.6k|        ossl_ec_GFp_mont_group_copy,
 1578|  14.6k|        ossl_ec_GFp_mont_group_set_curve,
 1579|  14.6k|        ossl_ec_GFp_simple_group_get_curve,
 1580|  14.6k|        ossl_ec_GFp_simple_group_get_degree,
 1581|  14.6k|        ossl_ec_group_simple_order_bits,
 1582|  14.6k|        ossl_ec_GFp_simple_group_check_discriminant,
 1583|  14.6k|        ossl_ec_GFp_simple_point_init,
 1584|  14.6k|        ossl_ec_GFp_simple_point_finish,
 1585|  14.6k|        ossl_ec_GFp_simple_point_clear_finish,
 1586|  14.6k|        ossl_ec_GFp_simple_point_copy,
 1587|  14.6k|        ossl_ec_GFp_simple_point_set_to_infinity,
 1588|  14.6k|        ossl_ec_GFp_simple_point_set_affine_coordinates,
 1589|  14.6k|        ecp_nistz256_get_affine,
 1590|  14.6k|        0, 0, 0,
 1591|  14.6k|        ossl_ec_GFp_simple_add,
 1592|  14.6k|        ossl_ec_GFp_simple_dbl,
 1593|  14.6k|        ossl_ec_GFp_simple_invert,
 1594|  14.6k|        ossl_ec_GFp_simple_is_at_infinity,
 1595|  14.6k|        ossl_ec_GFp_simple_is_on_curve,
 1596|  14.6k|        ossl_ec_GFp_simple_cmp,
 1597|  14.6k|        ossl_ec_GFp_simple_make_affine,
 1598|  14.6k|        ossl_ec_GFp_simple_points_make_affine,
 1599|  14.6k|        ecp_nistz256_points_mul, /* mul */
 1600|  14.6k|        ecp_nistz256_mult_precompute, /* precompute_mult */
 1601|  14.6k|        ecp_nistz256_window_have_precompute_mult, /* have_precompute_mult */
 1602|  14.6k|        ossl_ec_GFp_mont_field_mul,
 1603|  14.6k|        ossl_ec_GFp_mont_field_sqr,
 1604|  14.6k|        0, /* field_div */
 1605|  14.6k|        ossl_ec_GFp_mont_field_inv,
 1606|  14.6k|        ossl_ec_GFp_mont_field_encode,
 1607|  14.6k|        ossl_ec_GFp_mont_field_decode,
 1608|  14.6k|        ossl_ec_GFp_mont_field_set_to_one,
 1609|  14.6k|        ossl_ec_key_simple_priv2oct,
 1610|  14.6k|        ossl_ec_key_simple_oct2priv,
 1611|  14.6k|        0, /* set private */
 1612|  14.6k|        ossl_ec_key_simple_generate_key,
 1613|  14.6k|        ossl_ec_key_simple_check_key,
 1614|  14.6k|        ossl_ec_key_simple_generate_public_key,
 1615|  14.6k|        0, /* keycopy */
 1616|  14.6k|        0, /* keyfinish */
 1617|  14.6k|        ossl_ecdh_simple_compute_key,
 1618|  14.6k|        ossl_ecdsa_simple_sign_setup,
 1619|  14.6k|        ossl_ecdsa_simple_sign_sig,
 1620|  14.6k|        ossl_ecdsa_simple_verify_sig,
 1621|  14.6k|        ecp_nistz256_inv_mod_ord, /* can be #define-d NULL */
 1622|  14.6k|        0, /* blind_coordinates */
 1623|  14.6k|        0, /* ladder_pre */
 1624|  14.6k|        0, /* ladder_step */
 1625|  14.6k|        0, /* ladder_post */
 1626|  14.6k|        ecp_nistz256group_full_init
 1627|  14.6k|    };
 1628|       |
 1629|  14.6k|    return &ret;
 1630|  14.6k|}
ecp_nistz256.c:ecp_nistz256_get_affine:
 1149|  10.9k|{
 1150|  10.9k|    BN_ULONG z_inv2[P256_LIMBS];
 1151|  10.9k|    BN_ULONG z_inv3[P256_LIMBS];
 1152|  10.9k|    BN_ULONG x_aff[P256_LIMBS];
 1153|  10.9k|    BN_ULONG y_aff[P256_LIMBS];
 1154|  10.9k|    BN_ULONG point_x[P256_LIMBS], point_y[P256_LIMBS], point_z[P256_LIMBS];
 1155|  10.9k|    BN_ULONG x_ret[P256_LIMBS], y_ret[P256_LIMBS];
 1156|       |
 1157|  10.9k|    if (EC_POINT_is_at_infinity(group, point)) {
  ------------------
  |  Branch (1157:9): [True: 0, False: 10.9k]
  ------------------
 1158|      0|        ERR_raise(ERR_LIB_EC, EC_R_POINT_AT_INFINITY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1159|      0|        return 0;
 1160|      0|    }
 1161|       |
 1162|  10.9k|    if (!ecp_nistz256_bignum_to_field_elem(point_x, point->X) || !ecp_nistz256_bignum_to_field_elem(point_y, point->Y) || !ecp_nistz256_bignum_to_field_elem(point_z, point->Z)) {
  ------------------
  |  Branch (1162:9): [True: 0, False: 10.9k]
  |  Branch (1162:66): [True: 0, False: 10.9k]
  |  Branch (1162:123): [True: 0, False: 10.9k]
  ------------------
 1163|      0|        ERR_raise(ERR_LIB_EC, EC_R_COORDINATES_OUT_OF_RANGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1164|      0|        return 0;
 1165|      0|    }
 1166|       |
 1167|  10.9k|    ecp_nistz256_mod_inverse(z_inv3, point_z);
 1168|  10.9k|    ecp_nistz256_sqr_mont(z_inv2, z_inv3);
 1169|  10.9k|    ecp_nistz256_mul_mont(x_aff, z_inv2, point_x);
 1170|       |
 1171|  10.9k|    if (x != NULL) {
  ------------------
  |  Branch (1171:9): [True: 10.9k, False: 0]
  ------------------
 1172|  10.9k|        ecp_nistz256_from_mont(x_ret, x_aff);
 1173|  10.9k|        if (!bn_set_words(x, x_ret, P256_LIMBS))
  ------------------
  |  |   40|  10.9k|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|  10.9k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  10.9k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1173:13): [True: 0, False: 10.9k]
  ------------------
 1174|      0|            return 0;
 1175|  10.9k|    }
 1176|       |
 1177|  10.9k|    if (y != NULL) {
  ------------------
  |  Branch (1177:9): [True: 3.73k, False: 7.25k]
  ------------------
 1178|  3.73k|        ecp_nistz256_mul_mont(z_inv3, z_inv3, z_inv2);
 1179|  3.73k|        ecp_nistz256_mul_mont(y_aff, z_inv3, point_y);
 1180|  3.73k|        ecp_nistz256_from_mont(y_ret, y_aff);
 1181|  3.73k|        if (!bn_set_words(y, y_ret, P256_LIMBS))
  ------------------
  |  |   40|  3.73k|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|  3.73k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  3.73k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1181:13): [True: 0, False: 3.73k]
  ------------------
 1182|      0|            return 0;
 1183|  3.73k|    }
 1184|       |
 1185|  10.9k|    return 1;
 1186|  10.9k|}
ecp_nistz256.c:ecp_nistz256_bignum_to_field_elem:
  599|  51.1k|{
  600|  51.1k|    return bn_copy_words(out, in, P256_LIMBS);
  ------------------
  |  |   40|  51.1k|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|  51.1k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  51.1k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  601|  51.1k|}
ecp_nistz256.c:ecp_nistz256_mod_inverse:
  519|  10.9k|{
  520|       |    /*
  521|       |     * The poly is ffffffff 00000001 00000000 00000000 00000000 ffffffff
  522|       |     * ffffffff ffffffff We use FLT and used poly-2 as exponent
  523|       |     */
  524|  10.9k|    BN_ULONG p2[P256_LIMBS];
  525|  10.9k|    BN_ULONG p4[P256_LIMBS];
  526|  10.9k|    BN_ULONG p8[P256_LIMBS];
  527|  10.9k|    BN_ULONG p16[P256_LIMBS];
  528|  10.9k|    BN_ULONG p32[P256_LIMBS];
  529|  10.9k|    BN_ULONG res[P256_LIMBS];
  530|  10.9k|    int i;
  531|       |
  532|  10.9k|    ecp_nistz256_sqr_mont(res, in);
  533|  10.9k|    ecp_nistz256_mul_mont(p2, res, in); /* 3*p */
  534|       |
  535|  10.9k|    ecp_nistz256_sqr_mont(res, p2);
  536|  10.9k|    ecp_nistz256_sqr_mont(res, res);
  537|  10.9k|    ecp_nistz256_mul_mont(p4, res, p2); /* f*p */
  538|       |
  539|  10.9k|    ecp_nistz256_sqr_mont(res, p4);
  540|  10.9k|    ecp_nistz256_sqr_mont(res, res);
  541|  10.9k|    ecp_nistz256_sqr_mont(res, res);
  542|  10.9k|    ecp_nistz256_sqr_mont(res, res);
  543|  10.9k|    ecp_nistz256_mul_mont(p8, res, p4); /* ff*p */
  544|       |
  545|  10.9k|    ecp_nistz256_sqr_mont(res, p8);
  546|  87.9k|    for (i = 0; i < 7; i++)
  ------------------
  |  Branch (546:17): [True: 76.9k, False: 10.9k]
  ------------------
  547|  76.9k|        ecp_nistz256_sqr_mont(res, res);
  548|  10.9k|    ecp_nistz256_mul_mont(p16, res, p8); /* ffff*p */
  549|       |
  550|  10.9k|    ecp_nistz256_sqr_mont(res, p16);
  551|   175k|    for (i = 0; i < 15; i++)
  ------------------
  |  Branch (551:17): [True: 164k, False: 10.9k]
  ------------------
  552|   164k|        ecp_nistz256_sqr_mont(res, res);
  553|  10.9k|    ecp_nistz256_mul_mont(p32, res, p16); /* ffffffff*p */
  554|       |
  555|  10.9k|    ecp_nistz256_sqr_mont(res, p32);
  556|   351k|    for (i = 0; i < 31; i++)
  ------------------
  |  Branch (556:17): [True: 340k, False: 10.9k]
  ------------------
  557|   340k|        ecp_nistz256_sqr_mont(res, res);
  558|  10.9k|    ecp_nistz256_mul_mont(res, res, in);
  559|       |
  560|  1.41M|    for (i = 0; i < 32 * 4; i++)
  ------------------
  |  Branch (560:17): [True: 1.40M, False: 10.9k]
  ------------------
  561|  1.40M|        ecp_nistz256_sqr_mont(res, res);
  562|  10.9k|    ecp_nistz256_mul_mont(res, res, p32);
  563|       |
  564|   362k|    for (i = 0; i < 32; i++)
  ------------------
  |  Branch (564:17): [True: 351k, False: 10.9k]
  ------------------
  565|   351k|        ecp_nistz256_sqr_mont(res, res);
  566|  10.9k|    ecp_nistz256_mul_mont(res, res, p32);
  567|       |
  568|   186k|    for (i = 0; i < 16; i++)
  ------------------
  |  Branch (568:17): [True: 175k, False: 10.9k]
  ------------------
  569|   175k|        ecp_nistz256_sqr_mont(res, res);
  570|  10.9k|    ecp_nistz256_mul_mont(res, res, p16);
  571|       |
  572|  98.9k|    for (i = 0; i < 8; i++)
  ------------------
  |  Branch (572:17): [True: 87.9k, False: 10.9k]
  ------------------
  573|  87.9k|        ecp_nistz256_sqr_mont(res, res);
  574|  10.9k|    ecp_nistz256_mul_mont(res, res, p8);
  575|       |
  576|  10.9k|    ecp_nistz256_sqr_mont(res, res);
  577|  10.9k|    ecp_nistz256_sqr_mont(res, res);
  578|  10.9k|    ecp_nistz256_sqr_mont(res, res);
  579|  10.9k|    ecp_nistz256_sqr_mont(res, res);
  580|  10.9k|    ecp_nistz256_mul_mont(res, res, p4);
  581|       |
  582|  10.9k|    ecp_nistz256_sqr_mont(res, res);
  583|  10.9k|    ecp_nistz256_sqr_mont(res, res);
  584|  10.9k|    ecp_nistz256_mul_mont(res, res, p2);
  585|       |
  586|  10.9k|    ecp_nistz256_sqr_mont(res, res);
  587|  10.9k|    ecp_nistz256_sqr_mont(res, res);
  588|  10.9k|    ecp_nistz256_mul_mont(res, res, in);
  589|       |
  590|  10.9k|    memcpy(r, res, sizeof(res));
  591|  10.9k|}
ecp_nistz256.c:ecp_nistz256_points_mul:
  936|  7.25k|{
  937|  7.25k|    int i = 0, ret = 0, no_precomp_for_generator = 0, p_is_infinity = 0;
  938|  7.25k|    unsigned char p_str[33] = { 0 };
  939|  7.25k|    const PRECOMP256_ROW *preComputedTable = NULL;
  940|  7.25k|    const NISTZ256_PRE_COMP *pre_comp = NULL;
  941|  7.25k|    const EC_POINT *generator = NULL;
  942|  7.25k|    const BIGNUM **new_scalars = NULL;
  943|  7.25k|    const EC_POINT **new_points = NULL;
  944|  7.25k|    unsigned int idx = 0;
  945|  7.25k|    const unsigned int window_size = 7;
  946|  7.25k|    const unsigned int mask = (1 << (window_size + 1)) - 1;
  947|  7.25k|    unsigned int wvalue;
  948|  7.25k|    ALIGN32 union {
  ------------------
  |  |   30|  7.25k|#define ALIGN32 __attribute((aligned(32)))
  ------------------
  949|  7.25k|        P256_POINT p;
  950|  7.25k|        P256_POINT_AFFINE a;
  951|  7.25k|    } t, p;
  952|  7.25k|    BIGNUM *tmp_scalar;
  953|       |
  954|  7.25k|    if ((num + 1) == 0 || (num + 1) > OPENSSL_MALLOC_MAX_NELEMS(void *)) {
  ------------------
  |  |  169|  7.25k|#define OPENSSL_MALLOC_MAX_NELEMS(type) (((1U << (sizeof(int) * 8 - 1)) - 1) / sizeof(type))
  ------------------
  |  Branch (954:9): [True: 0, False: 7.25k]
  |  Branch (954:27): [True: 0, False: 7.25k]
  ------------------
  955|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  956|      0|        return 0;
  957|      0|    }
  958|       |
  959|  7.25k|    memset(&p, 0, sizeof(p));
  960|  7.25k|    BN_CTX_start(ctx);
  961|       |
  962|  7.25k|    if (scalar) {
  ------------------
  |  Branch (962:9): [True: 7.25k, False: 0]
  ------------------
  963|  7.25k|        generator = EC_GROUP_get0_generator(group);
  964|  7.25k|        if (generator == NULL) {
  ------------------
  |  Branch (964:13): [True: 0, False: 7.25k]
  ------------------
  965|      0|            ERR_raise(ERR_LIB_EC, EC_R_UNDEFINED_GENERATOR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  966|      0|            goto err;
  967|      0|        }
  968|       |
  969|       |        /* look if we can use precomputed multiples of generator */
  970|  7.25k|        pre_comp = group->pre_comp.nistz256;
  971|       |
  972|  7.25k|        if (pre_comp) {
  ------------------
  |  Branch (972:13): [True: 0, False: 7.25k]
  ------------------
  973|       |            /*
  974|       |             * If there is a precomputed table for the generator, check that
  975|       |             * it was generated with the same generator.
  976|       |             */
  977|      0|            EC_POINT *pre_comp_generator = EC_POINT_new(group);
  978|      0|            if (pre_comp_generator == NULL)
  ------------------
  |  Branch (978:17): [True: 0, False: 0]
  ------------------
  979|      0|                goto err;
  980|       |
  981|      0|            ecp_nistz256_gather_w7(&p.a, pre_comp->precomp[0], 1);
  982|      0|            if (!ecp_nistz256_set_from_affine(pre_comp_generator,
  ------------------
  |  Branch (982:17): [True: 0, False: 0]
  ------------------
  983|      0|                    group, &p.a, ctx)) {
  984|      0|                EC_POINT_free(pre_comp_generator);
  985|      0|                goto err;
  986|      0|            }
  987|       |
  988|      0|            if (0 == EC_POINT_cmp(group, generator, pre_comp_generator, ctx))
  ------------------
  |  Branch (988:17): [True: 0, False: 0]
  ------------------
  989|      0|                preComputedTable = (const PRECOMP256_ROW *)pre_comp->precomp;
  990|       |
  991|      0|            EC_POINT_free(pre_comp_generator);
  992|      0|        }
  993|       |
  994|  7.25k|        if (preComputedTable == NULL && ecp_nistz256_is_affine_G(generator)) {
  ------------------
  |  Branch (994:13): [True: 7.25k, False: 0]
  |  Branch (994:41): [True: 7.25k, False: 0]
  ------------------
  995|       |            /*
  996|       |             * If there is no precomputed data, but the generator is the
  997|       |             * default, a hardcoded table of precomputed data is used. This
  998|       |             * is because applications, such as Apache, do not use
  999|       |             * EC_KEY_precompute_mult.
 1000|       |             */
 1001|  7.25k|            preComputedTable = ecp_nistz256_precomputed;
 1002|  7.25k|        }
 1003|       |
 1004|  7.25k|        if (preComputedTable) {
  ------------------
  |  Branch (1004:13): [True: 7.25k, False: 0]
  ------------------
 1005|  7.25k|            BN_ULONG infty;
 1006|       |
 1007|  7.25k|            if ((BN_num_bits(scalar) > 256)
  ------------------
  |  Branch (1007:17): [True: 0, False: 7.25k]
  ------------------
 1008|  7.25k|                || BN_is_negative(scalar)) {
  ------------------
  |  Branch (1008:20): [True: 0, False: 7.25k]
  ------------------
 1009|      0|                if ((tmp_scalar = BN_CTX_get(ctx)) == NULL)
  ------------------
  |  Branch (1009:21): [True: 0, False: 0]
  ------------------
 1010|      0|                    goto err;
 1011|       |
 1012|      0|                if (!BN_nnmod(tmp_scalar, scalar, group->order, ctx)) {
  ------------------
  |  Branch (1012:21): [True: 0, False: 0]
  ------------------
 1013|      0|                    ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1014|      0|                    goto err;
 1015|      0|                }
 1016|      0|                scalar = tmp_scalar;
 1017|      0|            }
 1018|       |
 1019|  36.2k|            for (i = 0; i < bn_get_top(scalar) * BN_BYTES; i += BN_BYTES) {
  ------------------
  |  |   38|  36.2k|#define BN_BYTES 8
  ------------------
                          for (i = 0; i < bn_get_top(scalar) * BN_BYTES; i += BN_BYTES) {
  ------------------
  |  |   38|  29.0k|#define BN_BYTES 8
  ------------------
  |  Branch (1019:25): [True: 29.0k, False: 7.25k]
  ------------------
 1020|  29.0k|                BN_ULONG d = bn_get_words(scalar)[i / BN_BYTES];
  ------------------
  |  |   38|  29.0k|#define BN_BYTES 8
  ------------------
 1021|       |
 1022|  29.0k|                p_str[i + 0] = (unsigned char)d;
 1023|  29.0k|                p_str[i + 1] = (unsigned char)(d >> 8);
 1024|  29.0k|                p_str[i + 2] = (unsigned char)(d >> 16);
 1025|  29.0k|                p_str[i + 3] = (unsigned char)(d >>= 24);
 1026|  29.0k|                if (BN_BYTES == 8) {
  ------------------
  |  |   38|  29.0k|#define BN_BYTES 8
  ------------------
  |  Branch (1026:21): [True: 29.0k, Folded]
  ------------------
 1027|  29.0k|                    d >>= 8;
 1028|  29.0k|                    p_str[i + 4] = (unsigned char)d;
 1029|  29.0k|                    p_str[i + 5] = (unsigned char)(d >> 8);
 1030|  29.0k|                    p_str[i + 6] = (unsigned char)(d >> 16);
 1031|  29.0k|                    p_str[i + 7] = (unsigned char)(d >> 24);
 1032|  29.0k|                }
 1033|  29.0k|            }
 1034|       |
 1035|  14.5k|            for (; i < 33; i++)
  ------------------
  |  Branch (1035:20): [True: 7.25k, False: 7.25k]
  ------------------
 1036|  7.25k|                p_str[i] = 0;
 1037|       |
 1038|       |            /* First window */
 1039|  7.25k|            wvalue = (p_str[0] << 1) & mask;
 1040|  7.25k|            idx += window_size;
 1041|       |
 1042|  7.25k|            wvalue = _booth_recode_w7(wvalue);
 1043|       |
 1044|  7.25k|            ecp_nistz256_gather_w7(&p.a, preComputedTable[0],
 1045|  7.25k|                wvalue >> 1);
 1046|       |
 1047|  7.25k|            ecp_nistz256_neg(p.p.Z, p.p.Y);
 1048|  7.25k|            copy_conditional(p.p.Y, p.p.Z, wvalue & 1);
 1049|       |
 1050|       |            /*
 1051|       |             * Since affine infinity is encoded as (0,0) and
 1052|       |             * Jacobian is (,,0), we need to harmonize them
 1053|       |             * by assigning "one" or zero to Z.
 1054|       |             */
 1055|  7.25k|            infty = (p.p.X[0] | p.p.X[1] | p.p.X[2] | p.p.X[3] | p.p.Y[0] | p.p.Y[1] | p.p.Y[2] | p.p.Y[3]);
 1056|  7.25k|            if (P256_LIMBS == 8)
  ------------------
  |  |   40|  7.25k|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|  7.25k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  7.25k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1056:17): [Folded, False: 7.25k]
  ------------------
 1057|      0|                infty |= (p.p.X[4] | p.p.X[5] | p.p.X[6] | p.p.X[7] | p.p.Y[4] | p.p.Y[5] | p.p.Y[6] | p.p.Y[7]);
 1058|       |
 1059|  7.25k|            infty = 0 - is_zero(infty);
 1060|  7.25k|            infty = ~infty;
 1061|       |
 1062|  7.25k|            p.p.Z[0] = ONE[0] & infty;
 1063|  7.25k|            p.p.Z[1] = ONE[1] & infty;
 1064|  7.25k|            p.p.Z[2] = ONE[2] & infty;
 1065|  7.25k|            p.p.Z[3] = ONE[3] & infty;
 1066|  7.25k|            if (P256_LIMBS == 8) {
  ------------------
  |  |   40|  7.25k|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|  7.25k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  7.25k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1066:17): [Folded, False: 7.25k]
  ------------------
 1067|      0|                p.p.Z[4] = ONE[4] & infty;
 1068|      0|                p.p.Z[5] = ONE[5] & infty;
 1069|      0|                p.p.Z[6] = ONE[6] & infty;
 1070|      0|                p.p.Z[7] = ONE[7] & infty;
 1071|      0|            }
 1072|       |
 1073|   268k|            for (i = 1; i < 37; i++) {
  ------------------
  |  Branch (1073:25): [True: 261k, False: 7.25k]
  ------------------
 1074|   261k|                unsigned int off = (idx - 1) / 8;
 1075|   261k|                wvalue = p_str[off] | p_str[off + 1] << 8;
 1076|   261k|                wvalue = (wvalue >> ((idx - 1) % 8)) & mask;
 1077|   261k|                idx += window_size;
 1078|       |
 1079|   261k|                wvalue = _booth_recode_w7(wvalue);
 1080|       |
 1081|   261k|                ecp_nistz256_gather_w7(&t.a,
 1082|   261k|                    preComputedTable[i], wvalue >> 1);
 1083|       |
 1084|   261k|                ecp_nistz256_neg(t.p.Z, t.a.Y);
 1085|   261k|                copy_conditional(t.a.Y, t.p.Z, wvalue & 1);
 1086|       |
 1087|   261k|                ecp_nistz256_point_add_affine(&p.p, &p.p, &t.a);
 1088|   261k|            }
 1089|  7.25k|        } else {
 1090|      0|            p_is_infinity = 1;
 1091|      0|            no_precomp_for_generator = 1;
 1092|      0|        }
 1093|  7.25k|    } else
 1094|      0|        p_is_infinity = 1;
 1095|       |
 1096|  7.25k|    if (no_precomp_for_generator) {
  ------------------
  |  Branch (1096:9): [True: 0, False: 7.25k]
  ------------------
 1097|       |        /*
 1098|       |         * Without a precomputed table for the generator, it has to be
 1099|       |         * handled like a normal point.
 1100|       |         */
 1101|      0|        new_scalars = OPENSSL_malloc_array(num + 1, sizeof(BIGNUM *));
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1102|      0|        if (new_scalars == NULL)
  ------------------
  |  Branch (1102:13): [True: 0, False: 0]
  ------------------
 1103|      0|            goto err;
 1104|       |
 1105|      0|        new_points = OPENSSL_malloc_array(num + 1, sizeof(EC_POINT *));
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1106|      0|        if (new_points == NULL)
  ------------------
  |  Branch (1106:13): [True: 0, False: 0]
  ------------------
 1107|      0|            goto err;
 1108|       |
 1109|      0|        memcpy(new_scalars, scalars, num * sizeof(BIGNUM *));
 1110|      0|        new_scalars[num] = scalar;
 1111|      0|        memcpy(new_points, points, num * sizeof(EC_POINT *));
 1112|      0|        new_points[num] = generator;
 1113|       |
 1114|      0|        scalars = new_scalars;
 1115|      0|        points = new_points;
 1116|      0|        num++;
 1117|      0|    }
 1118|       |
 1119|  7.25k|    if (num) {
  ------------------
  |  Branch (1119:9): [True: 3.62k, False: 3.62k]
  ------------------
 1120|  3.62k|        P256_POINT *out = &t.p;
 1121|  3.62k|        if (p_is_infinity)
  ------------------
  |  Branch (1121:13): [True: 0, False: 3.62k]
  ------------------
 1122|      0|            out = &p.p;
 1123|       |
 1124|  3.62k|        if (!ecp_nistz256_windowed_mul(group, out, scalars, points, num, ctx))
  ------------------
  |  Branch (1124:13): [True: 0, False: 3.62k]
  ------------------
 1125|      0|            goto err;
 1126|       |
 1127|  3.62k|        if (!p_is_infinity)
  ------------------
  |  Branch (1127:13): [True: 3.62k, False: 0]
  ------------------
 1128|  3.62k|            ecp_nistz256_point_add(&p.p, &p.p, out);
 1129|  3.62k|    }
 1130|       |
 1131|       |    /* Not constant-time, but we're only operating on the public output. */
 1132|  7.25k|    if (!bn_set_words(r->X, p.p.X, P256_LIMBS) || !bn_set_words(r->Y, p.p.Y, P256_LIMBS) || !bn_set_words(r->Z, p.p.Z, P256_LIMBS)) {
  ------------------
  |  |   40|  7.25k|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|  7.25k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  7.25k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (!bn_set_words(r->X, p.p.X, P256_LIMBS) || !bn_set_words(r->Y, p.p.Y, P256_LIMBS) || !bn_set_words(r->Z, p.p.Z, P256_LIMBS)) {
  ------------------
  |  |   40|  7.25k|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|  7.25k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  7.25k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (!bn_set_words(r->X, p.p.X, P256_LIMBS) || !bn_set_words(r->Y, p.p.Y, P256_LIMBS) || !bn_set_words(r->Z, p.p.Z, P256_LIMBS)) {
  ------------------
  |  |   40|  7.25k|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|  7.25k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  7.25k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1132:9): [True: 0, False: 7.25k]
  |  Branch (1132:51): [True: 0, False: 7.25k]
  |  Branch (1132:93): [True: 0, False: 7.25k]
  ------------------
 1133|      0|        goto err;
 1134|      0|    }
 1135|  7.25k|    r->Z_is_one = is_one(r->Z) & 1;
 1136|       |
 1137|  7.25k|    ret = 1;
 1138|       |
 1139|  7.25k|err:
 1140|  7.25k|    BN_CTX_end(ctx);
 1141|  7.25k|    OPENSSL_free(new_points);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1142|  7.25k|    OPENSSL_free(new_scalars);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1143|  7.25k|    return ret;
 1144|  7.25k|}
ecp_nistz256.c:ecp_nistz256_is_affine_G:
  791|  7.25k|{
  792|  7.25k|    return (bn_get_top(generator->X) == P256_LIMBS) && (bn_get_top(generator->Y) == P256_LIMBS) && is_equal(bn_get_words(generator->X), def_xG) && is_equal(bn_get_words(generator->Y), def_yG) && is_one(generator->Z);
  ------------------
  |  |   40|  7.25k|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|  7.25k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  7.25k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  return (bn_get_top(generator->X) == P256_LIMBS) && (bn_get_top(generator->Y) == P256_LIMBS) && is_equal(bn_get_words(generator->X), def_xG) && is_equal(bn_get_words(generator->Y), def_yG) && is_one(generator->Z);
  ------------------
  |  |   40|  7.25k|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|  7.25k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  7.25k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (792:12): [True: 7.25k, False: 0]
  |  Branch (792:56): [True: 7.25k, False: 0]
  |  Branch (792:100): [True: 7.25k, False: 0]
  |  Branch (792:148): [True: 7.25k, False: 0]
  |  Branch (792:196): [True: 7.25k, False: 0]
  ------------------
  793|  7.25k|}
ecp_nistz256.c:is_equal:
  195|  14.5k|{
  196|  14.5k|    BN_ULONG res;
  197|       |
  198|  14.5k|    res = a[0] ^ b[0];
  199|  14.5k|    res |= a[1] ^ b[1];
  200|  14.5k|    res |= a[2] ^ b[2];
  201|  14.5k|    res |= a[3] ^ b[3];
  202|  14.5k|    if (P256_LIMBS == 8) {
  ------------------
  |  |   40|  14.5k|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|  14.5k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  14.5k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (202:9): [Folded, False: 14.5k]
  ------------------
  203|      0|        res |= a[4] ^ b[4];
  204|      0|        res |= a[5] ^ b[5];
  205|      0|        res |= a[6] ^ b[6];
  206|      0|        res |= a[7] ^ b[7];
  207|      0|    }
  208|       |
  209|  14.5k|    return is_zero(res);
  210|  14.5k|}
ecp_nistz256.c:_booth_recode_w7:
  156|   268k|{
  157|   268k|    unsigned int s, d;
  158|       |
  159|   268k|    s = ~((in >> 7) - 1);
  160|   268k|    d = (1 << 8) - in - 1;
  161|   268k|    d = (d & s) | (in & ~s);
  162|   268k|    d = (d >> 1) + (d & 1);
  163|       |
  164|   268k|    return (d << 1) + (s & 1);
  165|   268k|}
ecp_nistz256.c:copy_conditional:
  169|   453k|{
  170|   453k|    BN_ULONG mask1 = 0 - move;
  171|   453k|    BN_ULONG mask2 = ~mask1;
  172|       |
  173|   453k|    dst[0] = (src[0] & mask1) ^ (dst[0] & mask2);
  174|   453k|    dst[1] = (src[1] & mask1) ^ (dst[1] & mask2);
  175|   453k|    dst[2] = (src[2] & mask1) ^ (dst[2] & mask2);
  176|   453k|    dst[3] = (src[3] & mask1) ^ (dst[3] & mask2);
  177|   453k|    if (P256_LIMBS == 8) {
  ------------------
  |  |   40|   453k|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|   453k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   453k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (177:9): [Folded, False: 453k]
  ------------------
  178|      0|        dst[4] = (src[4] & mask1) ^ (dst[4] & mask2);
  179|      0|        dst[5] = (src[5] & mask1) ^ (dst[5] & mask2);
  180|      0|        dst[6] = (src[6] & mask1) ^ (dst[6] & mask2);
  181|      0|        dst[7] = (src[7] & mask1) ^ (dst[7] & mask2);
  182|      0|    }
  183|   453k|}
ecp_nistz256.c:is_zero:
  186|  36.2k|{
  187|  36.2k|    in |= (0 - in);
  188|  36.2k|    in = ~in;
  189|  36.2k|    in >>= BN_BITS2 - 1;
  ------------------
  |  |   54|  36.2k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  36.2k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  190|  36.2k|    return in;
  191|  36.2k|}
ecp_nistz256.c:ecp_nistz256_windowed_mul:
  609|  3.62k|{
  610|  3.62k|    size_t i;
  611|  3.62k|    int j, ret = 0;
  612|  3.62k|    unsigned int idx;
  613|  3.62k|    unsigned char (*p_str)[33] = NULL;
  614|  3.62k|    const unsigned int window_size = 5;
  615|  3.62k|    const unsigned int mask = (1 << (window_size + 1)) - 1;
  616|  3.62k|    unsigned int wvalue;
  617|  3.62k|    P256_POINT *temp; /* place for 5 temporary points */
  618|  3.62k|    const BIGNUM **scalars = NULL;
  619|  3.62k|    P256_POINT(*table)
  620|  3.62k|    [16] = NULL;
  621|  3.62k|    void *table_storage = NULL;
  622|       |
  623|  3.62k|    if ((num * 16 + 6) > OPENSSL_MALLOC_MAX_NELEMS(P256_POINT)
  ------------------
  |  |  169|  7.25k|#define OPENSSL_MALLOC_MAX_NELEMS(type) (((1U << (sizeof(int) * 8 - 1)) - 1) / sizeof(type))
  ------------------
  |  Branch (623:9): [True: 0, False: 3.62k]
  ------------------
  624|  3.62k|        || (table = OPENSSL_aligned_alloc_array(num * 16 + 5, sizeof(P256_POINT), 64,
  ------------------
  |  |  118|  3.62k|    CRYPTO_aligned_alloc_array(num, size, alignment, freeptr,      \
  |  |  119|  3.62k|        OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (624:12): [True: 0, False: 3.62k]
  ------------------
  625|  3.62k|                &table_storage))
  626|  3.62k|            == NULL
  627|  3.62k|        || (p_str = OPENSSL_malloc_array(num, 33)) == NULL
  ------------------
  |  |  111|  3.62k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (627:12): [True: 0, False: 3.62k]
  ------------------
  628|  3.62k|        || (scalars = OPENSSL_malloc_array(num, sizeof(BIGNUM *))) == NULL)
  ------------------
  |  |  111|  3.62k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (628:12): [True: 0, False: 3.62k]
  ------------------
  629|      0|        goto err;
  630|       |
  631|  3.62k|    temp = (P256_POINT *)(table + num);
  632|       |
  633|  7.25k|    for (i = 0; i < num; i++) {
  ------------------
  |  Branch (633:17): [True: 3.62k, False: 3.62k]
  ------------------
  634|  3.62k|        P256_POINT *row = table[i];
  635|       |
  636|       |        /* This is an unusual input, we don't guarantee constant-timeness. */
  637|  3.62k|        if ((BN_num_bits(scalar[i]) > 256) || BN_is_negative(scalar[i])) {
  ------------------
  |  Branch (637:13): [True: 0, False: 3.62k]
  |  Branch (637:47): [True: 0, False: 3.62k]
  ------------------
  638|      0|            BIGNUM *mod;
  639|       |
  640|      0|            if ((mod = BN_CTX_get(ctx)) == NULL)
  ------------------
  |  Branch (640:17): [True: 0, False: 0]
  ------------------
  641|      0|                goto err;
  642|      0|            if (!BN_nnmod(mod, scalar[i], group->order, ctx)) {
  ------------------
  |  Branch (642:17): [True: 0, False: 0]
  ------------------
  643|      0|                ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  644|      0|                goto err;
  645|      0|            }
  646|      0|            scalars[i] = mod;
  647|      0|        } else
  648|  3.62k|            scalars[i] = scalar[i];
  649|       |
  650|  18.1k|        for (j = 0; j < bn_get_top(scalars[i]) * BN_BYTES; j += BN_BYTES) {
  ------------------
  |  |   38|  18.1k|#define BN_BYTES 8
  ------------------
                      for (j = 0; j < bn_get_top(scalars[i]) * BN_BYTES; j += BN_BYTES) {
  ------------------
  |  |   38|  14.5k|#define BN_BYTES 8
  ------------------
  |  Branch (650:21): [True: 14.5k, False: 3.62k]
  ------------------
  651|  14.5k|            BN_ULONG d = bn_get_words(scalars[i])[j / BN_BYTES];
  ------------------
  |  |   38|  14.5k|#define BN_BYTES 8
  ------------------
  652|       |
  653|  14.5k|            p_str[i][j + 0] = (unsigned char)d;
  654|  14.5k|            p_str[i][j + 1] = (unsigned char)(d >> 8);
  655|  14.5k|            p_str[i][j + 2] = (unsigned char)(d >> 16);
  656|  14.5k|            p_str[i][j + 3] = (unsigned char)(d >>= 24);
  657|  14.5k|            if (BN_BYTES == 8) {
  ------------------
  |  |   38|  14.5k|#define BN_BYTES 8
  ------------------
  |  Branch (657:17): [True: 14.5k, Folded]
  ------------------
  658|  14.5k|                d >>= 8;
  659|  14.5k|                p_str[i][j + 4] = (unsigned char)d;
  660|  14.5k|                p_str[i][j + 5] = (unsigned char)(d >> 8);
  661|  14.5k|                p_str[i][j + 6] = (unsigned char)(d >> 16);
  662|  14.5k|                p_str[i][j + 7] = (unsigned char)(d >> 24);
  663|  14.5k|            }
  664|  14.5k|        }
  665|  7.25k|        for (; j < 33; j++)
  ------------------
  |  Branch (665:16): [True: 3.62k, False: 3.62k]
  ------------------
  666|  3.62k|            p_str[i][j] = 0;
  667|       |
  668|  3.62k|        if (!ecp_nistz256_bignum_to_field_elem(temp[0].X, point[i]->X)
  ------------------
  |  Branch (668:13): [True: 0, False: 3.62k]
  ------------------
  669|  3.62k|            || !ecp_nistz256_bignum_to_field_elem(temp[0].Y, point[i]->Y)
  ------------------
  |  Branch (669:16): [True: 0, False: 3.62k]
  ------------------
  670|  3.62k|            || !ecp_nistz256_bignum_to_field_elem(temp[0].Z, point[i]->Z)) {
  ------------------
  |  Branch (670:16): [True: 0, False: 3.62k]
  ------------------
  671|      0|            ERR_raise(ERR_LIB_EC, EC_R_COORDINATES_OUT_OF_RANGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  672|      0|            goto err;
  673|      0|        }
  674|       |
  675|       |        /*
  676|       |         * row[0] is implicitly (0,0,0) (the point at infinity), therefore it
  677|       |         * is not stored. All other values are actually stored with an offset
  678|       |         * of -1 in table.
  679|       |         */
  680|       |
  681|  3.62k|        ecp_nistz256_scatter_w5(row, &temp[0], 1);
  682|  3.62k|        ecp_nistz256_point_double(&temp[1], &temp[0]); /*1+1=2  */
  683|  3.62k|        ecp_nistz256_scatter_w5(row, &temp[1], 2);
  684|  3.62k|        ecp_nistz256_point_add(&temp[2], &temp[1], &temp[0]); /*2+1=3  */
  685|  3.62k|        ecp_nistz256_scatter_w5(row, &temp[2], 3);
  686|  3.62k|        ecp_nistz256_point_double(&temp[1], &temp[1]); /*2*2=4  */
  687|  3.62k|        ecp_nistz256_scatter_w5(row, &temp[1], 4);
  688|  3.62k|        ecp_nistz256_point_double(&temp[2], &temp[2]); /*2*3=6  */
  689|  3.62k|        ecp_nistz256_scatter_w5(row, &temp[2], 6);
  690|  3.62k|        ecp_nistz256_point_add(&temp[3], &temp[1], &temp[0]); /*4+1=5  */
  691|  3.62k|        ecp_nistz256_scatter_w5(row, &temp[3], 5);
  692|  3.62k|        ecp_nistz256_point_add(&temp[4], &temp[2], &temp[0]); /*6+1=7  */
  693|  3.62k|        ecp_nistz256_scatter_w5(row, &temp[4], 7);
  694|  3.62k|        ecp_nistz256_point_double(&temp[1], &temp[1]); /*2*4=8  */
  695|  3.62k|        ecp_nistz256_scatter_w5(row, &temp[1], 8);
  696|  3.62k|        ecp_nistz256_point_double(&temp[2], &temp[2]); /*2*6=12 */
  697|  3.62k|        ecp_nistz256_scatter_w5(row, &temp[2], 12);
  698|  3.62k|        ecp_nistz256_point_double(&temp[3], &temp[3]); /*2*5=10 */
  699|  3.62k|        ecp_nistz256_scatter_w5(row, &temp[3], 10);
  700|  3.62k|        ecp_nistz256_point_double(&temp[4], &temp[4]); /*2*7=14 */
  701|  3.62k|        ecp_nistz256_scatter_w5(row, &temp[4], 14);
  702|  3.62k|        ecp_nistz256_point_add(&temp[2], &temp[2], &temp[0]); /*12+1=13*/
  703|  3.62k|        ecp_nistz256_scatter_w5(row, &temp[2], 13);
  704|  3.62k|        ecp_nistz256_point_add(&temp[3], &temp[3], &temp[0]); /*10+1=11*/
  705|  3.62k|        ecp_nistz256_scatter_w5(row, &temp[3], 11);
  706|  3.62k|        ecp_nistz256_point_add(&temp[4], &temp[4], &temp[0]); /*14+1=15*/
  707|  3.62k|        ecp_nistz256_scatter_w5(row, &temp[4], 15);
  708|  3.62k|        ecp_nistz256_point_add(&temp[2], &temp[1], &temp[0]); /*8+1=9  */
  709|  3.62k|        ecp_nistz256_scatter_w5(row, &temp[2], 9);
  710|  3.62k|        ecp_nistz256_point_double(&temp[1], &temp[1]); /*2*8=16 */
  711|  3.62k|        ecp_nistz256_scatter_w5(row, &temp[1], 16);
  712|  3.62k|    }
  713|       |
  714|  3.62k|    idx = 255;
  715|       |
  716|  3.62k|    wvalue = p_str[0][(idx - 1) / 8];
  717|  3.62k|    wvalue = (wvalue >> ((idx - 1) % 8)) & mask;
  718|       |
  719|       |    /*
  720|       |     * We gather to temp[0], because we know it's position relative
  721|       |     * to table
  722|       |     */
  723|  3.62k|    ecp_nistz256_gather_w5(&temp[0], table[0], _booth_recode_w5(wvalue) >> 1);
  724|  3.62k|    memcpy(r, &temp[0], sizeof(temp[0]));
  725|       |
  726|   188k|    while (idx >= 5) {
  ------------------
  |  Branch (726:12): [True: 185k, False: 3.62k]
  ------------------
  727|   366k|        for (i = (idx == 255 ? 1 : 0); i < num; i++) {
  ------------------
  |  Branch (727:19): [True: 3.62k, False: 181k]
  |  Branch (727:40): [True: 181k, False: 185k]
  ------------------
  728|   181k|            unsigned int off = (idx - 1) / 8;
  729|       |
  730|   181k|            wvalue = p_str[i][off] | p_str[i][off + 1] << 8;
  731|   181k|            wvalue = (wvalue >> ((idx - 1) % 8)) & mask;
  732|       |
  733|   181k|            wvalue = _booth_recode_w5(wvalue);
  734|       |
  735|   181k|            ecp_nistz256_gather_w5(&temp[0], table[i], wvalue >> 1);
  736|       |
  737|   181k|            ecp_nistz256_neg(temp[1].Y, temp[0].Y);
  738|   181k|            copy_conditional(temp[0].Y, temp[1].Y, (wvalue & 1));
  739|       |
  740|   181k|            ecp_nistz256_point_add(r, r, &temp[0]);
  741|   181k|        }
  742|       |
  743|   185k|        idx -= window_size;
  744|       |
  745|   185k|        ecp_nistz256_point_double(r, r);
  746|   185k|        ecp_nistz256_point_double(r, r);
  747|   185k|        ecp_nistz256_point_double(r, r);
  748|   185k|        ecp_nistz256_point_double(r, r);
  749|   185k|        ecp_nistz256_point_double(r, r);
  750|   185k|    }
  751|       |
  752|       |    /* Final window */
  753|  7.25k|    for (i = 0; i < num; i++) {
  ------------------
  |  Branch (753:17): [True: 3.62k, False: 3.62k]
  ------------------
  754|  3.62k|        wvalue = p_str[i][0];
  755|  3.62k|        wvalue = (wvalue << 1) & mask;
  756|       |
  757|  3.62k|        wvalue = _booth_recode_w5(wvalue);
  758|       |
  759|  3.62k|        ecp_nistz256_gather_w5(&temp[0], table[i], wvalue >> 1);
  760|       |
  761|  3.62k|        ecp_nistz256_neg(temp[1].Y, temp[0].Y);
  762|  3.62k|        copy_conditional(temp[0].Y, temp[1].Y, wvalue & 1);
  763|       |
  764|  3.62k|        ecp_nistz256_point_add(r, r, &temp[0]);
  765|  3.62k|    }
  766|       |
  767|  3.62k|    ret = 1;
  768|  3.62k|err:
  769|  3.62k|    OPENSSL_free(table_storage);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  770|  3.62k|    OPENSSL_free(p_str);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  771|  3.62k|    OPENSSL_free(scalars);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  772|  3.62k|    return ret;
  773|  3.62k|}
ecp_nistz256.c:_booth_recode_w5:
  144|   188k|{
  145|   188k|    unsigned int s, d;
  146|       |
  147|   188k|    s = ~((in >> 5) - 1);
  148|   188k|    d = (1 << 6) - in - 1;
  149|   188k|    d = (d & s) | (in & ~s);
  150|   188k|    d = (d >> 1) + (d & 1);
  151|       |
  152|   188k|    return (d << 1) + (s & 1);
  153|   188k|}
ecp_nistz256.c:is_one:
  213|  14.5k|{
  214|  14.5k|    BN_ULONG res = 0;
  215|  14.5k|    BN_ULONG *a = bn_get_words(z);
  216|       |
  217|  14.5k|    if (bn_get_top(z) == (P256_LIMBS - P256_LIMBS / 8)) {
  ------------------
  |  |   40|  14.5k|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|  14.5k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  14.5k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  if (bn_get_top(z) == (P256_LIMBS - P256_LIMBS / 8)) {
  ------------------
  |  |   40|  14.5k|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|  14.5k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  14.5k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (217:9): [True: 14.5k, False: 0]
  ------------------
  218|  14.5k|        res = a[0] ^ ONE[0];
  219|  14.5k|        res |= a[1] ^ ONE[1];
  220|  14.5k|        res |= a[2] ^ ONE[2];
  221|  14.5k|        res |= a[3] ^ ONE[3];
  222|  14.5k|        if (P256_LIMBS == 8) {
  ------------------
  |  |   40|  14.5k|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|  14.5k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  14.5k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (222:13): [Folded, False: 14.5k]
  ------------------
  223|      0|            res |= a[4] ^ ONE[4];
  224|      0|            res |= a[5] ^ ONE[5];
  225|      0|            res |= a[6] ^ ONE[6];
  226|       |            /*
  227|       |             * no check for a[7] (being zero) on 32-bit platforms,
  228|       |             * because value of "one" takes only 7 limbs.
  229|       |             */
  230|      0|        }
  231|  14.5k|        res = is_zero(res);
  232|  14.5k|    }
  233|       |
  234|  14.5k|    return res;
  235|  14.5k|}
ecp_nistz256.c:ecp_nistz256_inv_mod_ord:
 1262|  7.25k|{
 1263|       |    /* RR = 2^512 mod ord(p256) */
 1264|  7.25k|    static const BN_ULONG RR[P256_LIMBS] = {
 1265|  7.25k|        TOBN(0x83244c95, 0xbe79eea2), TOBN(0x4699799c, 0x49bd6fa6),
  ------------------
  |  |   37|  7.25k|#define TOBN(hi, lo) ((BN_ULONG)hi << 32 | lo)
  ------------------
                      TOBN(0x83244c95, 0xbe79eea2), TOBN(0x4699799c, 0x49bd6fa6),
  ------------------
  |  |   37|  7.25k|#define TOBN(hi, lo) ((BN_ULONG)hi << 32 | lo)
  ------------------
 1266|  7.25k|        TOBN(0x2845b239, 0x2b6bec59), TOBN(0x66e12d94, 0xf3d95620)
  ------------------
  |  |   37|  7.25k|#define TOBN(hi, lo) ((BN_ULONG)hi << 32 | lo)
  ------------------
                      TOBN(0x2845b239, 0x2b6bec59), TOBN(0x66e12d94, 0xf3d95620)
  ------------------
  |  |   37|  7.25k|#define TOBN(hi, lo) ((BN_ULONG)hi << 32 | lo)
  ------------------
 1267|  7.25k|    };
 1268|       |    /* The constant 1 (unlike ONE that is one in Montgomery representation) */
 1269|  7.25k|    static const BN_ULONG one[P256_LIMBS] = {
 1270|  7.25k|        TOBN(0, 1), TOBN(0, 0), TOBN(0, 0), TOBN(0, 0)
  ------------------
  |  |   37|  7.25k|#define TOBN(hi, lo) ((BN_ULONG)hi << 32 | lo)
  ------------------
                      TOBN(0, 1), TOBN(0, 0), TOBN(0, 0), TOBN(0, 0)
  ------------------
  |  |   37|  7.25k|#define TOBN(hi, lo) ((BN_ULONG)hi << 32 | lo)
  ------------------
                      TOBN(0, 1), TOBN(0, 0), TOBN(0, 0), TOBN(0, 0)
  ------------------
  |  |   37|  7.25k|#define TOBN(hi, lo) ((BN_ULONG)hi << 32 | lo)
  ------------------
                      TOBN(0, 1), TOBN(0, 0), TOBN(0, 0), TOBN(0, 0)
  ------------------
  |  |   37|  7.25k|#define TOBN(hi, lo) ((BN_ULONG)hi << 32 | lo)
  ------------------
 1271|  7.25k|    };
 1272|       |    /*
 1273|       |     * We don't use entry 0 in the table, so we omit it and address
 1274|       |     * with -1 offset.
 1275|       |     */
 1276|  7.25k|    BN_ULONG table[15][P256_LIMBS];
 1277|  7.25k|    BN_ULONG out[P256_LIMBS], t[P256_LIMBS];
 1278|  7.25k|    int i, ret = 0;
 1279|  7.25k|    enum {
 1280|  7.25k|        i_1 = 0,
 1281|  7.25k|        i_10,
 1282|  7.25k|        i_11,
 1283|  7.25k|        i_101,
 1284|  7.25k|        i_111,
 1285|  7.25k|        i_1010,
 1286|  7.25k|        i_1111,
 1287|  7.25k|        i_10101,
 1288|  7.25k|        i_101010,
 1289|  7.25k|        i_101111,
 1290|  7.25k|        i_x6,
 1291|  7.25k|        i_x8,
 1292|  7.25k|        i_x16,
 1293|  7.25k|        i_x32
 1294|  7.25k|    };
 1295|       |
 1296|       |    /*
 1297|       |     * Catch allocation failure early.
 1298|       |     */
 1299|  7.25k|    if (bn_wexpand(r, P256_LIMBS) == NULL) {
  ------------------
  |  |   40|  7.25k|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|  7.25k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  7.25k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1299:9): [True: 0, False: 7.25k]
  ------------------
 1300|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1301|      0|        goto err;
 1302|      0|    }
 1303|       |
 1304|  7.25k|    if ((BN_num_bits(x) > 256) || BN_is_negative(x)) {
  ------------------
  |  Branch (1304:9): [True: 0, False: 7.25k]
  |  Branch (1304:35): [True: 0, False: 7.25k]
  ------------------
 1305|      0|        BIGNUM *tmp;
 1306|       |
 1307|      0|        if ((tmp = BN_CTX_get(ctx)) == NULL
  ------------------
  |  Branch (1307:13): [True: 0, False: 0]
  ------------------
 1308|      0|            || !BN_nnmod(tmp, x, group->order, ctx)) {
  ------------------
  |  Branch (1308:16): [True: 0, False: 0]
  ------------------
 1309|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1310|      0|            goto err;
 1311|      0|        }
 1312|      0|        x = tmp;
 1313|      0|    }
 1314|       |
 1315|  7.25k|    if (!ecp_nistz256_bignum_to_field_elem(t, x)) {
  ------------------
  |  Branch (1315:9): [True: 0, False: 7.25k]
  ------------------
 1316|      0|        ERR_raise(ERR_LIB_EC, EC_R_COORDINATES_OUT_OF_RANGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1317|      0|        goto err;
 1318|      0|    }
 1319|       |
 1320|  7.25k|    ecp_nistz256_ord_mul_mont(table[0], t, RR);
 1321|       |#if 0
 1322|       |    /*
 1323|       |     * Original sparse-then-fixed-window algorithm, retained for reference.
 1324|       |     */
 1325|       |    for (i = 2; i < 16; i += 2) {
 1326|       |        ecp_nistz256_ord_sqr_mont(table[i-1], table[i/2-1], 1);
 1327|       |        ecp_nistz256_ord_mul_mont(table[i], table[i-1], table[0]);
 1328|       |    }
 1329|       |
 1330|       |    /*
 1331|       |     * The top 128bit of the exponent are highly redudndant, so we
 1332|       |     * perform an optimized flow
 1333|       |     */
 1334|       |    ecp_nistz256_ord_sqr_mont(t, table[15-1], 4);   /* f0 */
 1335|       |    ecp_nistz256_ord_mul_mont(t, t, table[15-1]);   /* ff */
 1336|       |
 1337|       |    ecp_nistz256_ord_sqr_mont(out, t, 8);           /* ff00 */
 1338|       |    ecp_nistz256_ord_mul_mont(out, out, t);         /* ffff */
 1339|       |
 1340|       |    ecp_nistz256_ord_sqr_mont(t, out, 16);          /* ffff0000 */
 1341|       |    ecp_nistz256_ord_mul_mont(t, t, out);           /* ffffffff */
 1342|       |
 1343|       |    ecp_nistz256_ord_sqr_mont(out, t, 64);          /* ffffffff0000000000000000 */
 1344|       |    ecp_nistz256_ord_mul_mont(out, out, t);         /* ffffffff00000000ffffffff */
 1345|       |
 1346|       |    ecp_nistz256_ord_sqr_mont(out, out, 32);        /* ffffffff00000000ffffffff00000000 */
 1347|       |    ecp_nistz256_ord_mul_mont(out, out, t);         /* ffffffff00000000ffffffffffffffff */
 1348|       |
 1349|       |    /*
 1350|       |     * The bottom 128 bit of the exponent are processed with fixed 4-bit window
 1351|       |     */
 1352|       |    for (i = 0; i < 32; i++) {
 1353|       |        /* expLo - the low 128 bits of the exponent we use (ord(p256) - 2),
 1354|       |         * split into nibbles */
 1355|       |        static const unsigned char expLo[32]  = {
 1356|       |            0xb,0xc,0xe,0x6,0xf,0xa,0xa,0xd,0xa,0x7,0x1,0x7,0x9,0xe,0x8,0x4,
 1357|       |            0xf,0x3,0xb,0x9,0xc,0xa,0xc,0x2,0xf,0xc,0x6,0x3,0x2,0x5,0x4,0xf
 1358|       |        };
 1359|       |
 1360|       |        ecp_nistz256_ord_sqr_mont(out, out, 4);
 1361|       |        /* The exponent is public, no need in constant-time access */
 1362|       |        ecp_nistz256_ord_mul_mont(out, out, table[expLo[i]-1]);
 1363|       |    }
 1364|       |#else
 1365|       |    /*
 1366|       |     * https://briansmith.org/ecc-inversion-addition-chains-01#p256_scalar_inversion
 1367|       |     *
 1368|       |     * Even though this code path spares 12 squarings, 4.5%, and 13
 1369|       |     * multiplications, 25%, on grand scale sign operation is not that
 1370|       |     * much faster, not more that 2%...
 1371|       |     */
 1372|       |
 1373|       |    /* pre-calculate powers */
 1374|  7.25k|    ecp_nistz256_ord_sqr_mont(table[i_10], table[i_1], 1);
 1375|       |
 1376|  7.25k|    ecp_nistz256_ord_mul_mont(table[i_11], table[i_1], table[i_10]);
 1377|       |
 1378|  7.25k|    ecp_nistz256_ord_mul_mont(table[i_101], table[i_11], table[i_10]);
 1379|       |
 1380|  7.25k|    ecp_nistz256_ord_mul_mont(table[i_111], table[i_101], table[i_10]);
 1381|       |
 1382|  7.25k|    ecp_nistz256_ord_sqr_mont(table[i_1010], table[i_101], 1);
 1383|       |
 1384|  7.25k|    ecp_nistz256_ord_mul_mont(table[i_1111], table[i_1010], table[i_101]);
 1385|       |
 1386|  7.25k|    ecp_nistz256_ord_sqr_mont(table[i_10101], table[i_1010], 1);
 1387|  7.25k|    ecp_nistz256_ord_mul_mont(table[i_10101], table[i_10101], table[i_1]);
 1388|       |
 1389|  7.25k|    ecp_nistz256_ord_sqr_mont(table[i_101010], table[i_10101], 1);
 1390|       |
 1391|  7.25k|    ecp_nistz256_ord_mul_mont(table[i_101111], table[i_101010], table[i_101]);
 1392|       |
 1393|  7.25k|    ecp_nistz256_ord_mul_mont(table[i_x6], table[i_101010], table[i_10101]);
 1394|       |
 1395|  7.25k|    ecp_nistz256_ord_sqr_mont(table[i_x8], table[i_x6], 2);
 1396|  7.25k|    ecp_nistz256_ord_mul_mont(table[i_x8], table[i_x8], table[i_11]);
 1397|       |
 1398|  7.25k|    ecp_nistz256_ord_sqr_mont(table[i_x16], table[i_x8], 8);
 1399|  7.25k|    ecp_nistz256_ord_mul_mont(table[i_x16], table[i_x16], table[i_x8]);
 1400|       |
 1401|  7.25k|    ecp_nistz256_ord_sqr_mont(table[i_x32], table[i_x16], 16);
 1402|  7.25k|    ecp_nistz256_ord_mul_mont(table[i_x32], table[i_x32], table[i_x16]);
 1403|       |
 1404|       |    /* calculations */
 1405|  7.25k|    ecp_nistz256_ord_sqr_mont(out, table[i_x32], 64);
 1406|  7.25k|    ecp_nistz256_ord_mul_mont(out, out, table[i_x32]);
 1407|       |
 1408|   203k|    for (i = 0; i < 27; i++) {
  ------------------
  |  Branch (1408:17): [True: 195k, False: 7.25k]
  ------------------
 1409|   195k|        static const struct {
 1410|   195k|            unsigned char p, i;
 1411|   195k|        } chain[27] = {
 1412|   195k|            { 32, i_x32 }, { 6, i_101111 }, { 5, i_111 },
 1413|   195k|            { 4, i_11 }, { 5, i_1111 }, { 5, i_10101 },
 1414|   195k|            { 4, i_101 }, { 3, i_101 }, { 3, i_101 },
 1415|   195k|            { 5, i_111 }, { 9, i_101111 }, { 6, i_1111 },
 1416|   195k|            { 2, i_1 }, { 5, i_1 }, { 6, i_1111 },
 1417|   195k|            { 5, i_111 }, { 4, i_111 }, { 5, i_111 },
 1418|   195k|            { 5, i_101 }, { 3, i_11 }, { 10, i_101111 },
 1419|   195k|            { 2, i_11 }, { 5, i_11 }, { 5, i_11 },
 1420|   195k|            { 3, i_1 }, { 7, i_10101 }, { 6, i_1111 }
 1421|   195k|        };
 1422|       |
 1423|   195k|        ecp_nistz256_ord_sqr_mont(out, out, chain[i].p);
 1424|   195k|        ecp_nistz256_ord_mul_mont(out, out, table[chain[i].i]);
 1425|   195k|    }
 1426|  7.25k|#endif
 1427|  7.25k|    ecp_nistz256_ord_mul_mont(out, out, one);
 1428|       |
 1429|       |    /*
 1430|       |     * Can't fail, but check return code to be consistent anyway.
 1431|       |     */
 1432|  7.25k|    if (!bn_set_words(r, out, P256_LIMBS))
  ------------------
  |  |   40|  7.25k|#define P256_LIMBS (256 / BN_BITS2)
  |  |  ------------------
  |  |  |  |   54|  7.25k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  7.25k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1432:9): [True: 0, False: 7.25k]
  ------------------
 1433|      0|        goto err;
 1434|       |
 1435|  7.25k|    ret = 1;
 1436|  7.25k|err:
 1437|  7.25k|    return ret;
 1438|  7.25k|}
ecp_nistz256.c:ecp_nistz256group_full_init:
 1445|  14.6k|{
 1446|  14.6k|    BN_CTX *ctx = NULL;
 1447|  14.6k|    BN_MONT_CTX *mont = NULL, *ordmont = NULL;
 1448|  14.6k|    const int param_len = 32;
 1449|  14.6k|    const int seed_len = 20;
 1450|  14.6k|    int ok = 0;
 1451|  14.6k|    uint32_t hi_order_n = 0xccd1c8aa;
 1452|  14.6k|    uint32_t lo_order_n = 0xee00bc4f;
 1453|  14.6k|    BIGNUM *p = NULL, *a = NULL, *b = NULL, *x = NULL, *y = NULL, *one = NULL,
 1454|  14.6k|           *order = NULL;
 1455|  14.6k|    EC_POINT *P = NULL;
 1456|       |
 1457|  14.6k|    if ((ctx = BN_CTX_new_ex(group->libctx)) == NULL) {
  ------------------
  |  Branch (1457:9): [True: 0, False: 14.6k]
  ------------------
 1458|      0|        ERR_raise(ERR_LIB_EC, ERR_R_MALLOC_FAILURE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1459|      0|        return 0;
 1460|      0|    }
 1461|       |
 1462|  14.6k|    if (!EC_GROUP_set_seed(group, params, seed_len)) {
  ------------------
  |  Branch (1462:9): [True: 0, False: 14.6k]
  ------------------
 1463|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1464|      0|        goto err;
 1465|      0|    }
 1466|  14.6k|    params += seed_len;
 1467|       |
 1468|  14.6k|    if ((p = BN_bin2bn(params + 0 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (1468:9): [True: 0, False: 14.6k]
  ------------------
 1469|  14.6k|        || (a = BN_bin2bn(params + 1 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (1469:12): [True: 0, False: 14.6k]
  ------------------
 1470|  14.6k|        || (b = BN_bin2bn(params + 2 * param_len, param_len, NULL)) == NULL) {
  ------------------
  |  Branch (1470:12): [True: 0, False: 14.6k]
  ------------------
 1471|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      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|  14.6k|    mont = BN_MONT_CTX_new();
 1480|  14.6k|    if (mont == NULL)
  ------------------
  |  Branch (1480:9): [True: 0, False: 14.6k]
  ------------------
 1481|      0|        goto err;
 1482|       |
 1483|  14.6k|    if (!ossl_bn_mont_ctx_set(mont, p, 256, params + 6 * param_len, param_len,
  ------------------
  |  Branch (1483:9): [True: 0, False: 14.6k]
  ------------------
 1484|  14.6k|            1, 0))
 1485|      0|        goto err;
 1486|       |
 1487|  14.6k|    one = BN_new();
 1488|  14.6k|    if (one == NULL) {
  ------------------
  |  Branch (1488:9): [True: 0, False: 14.6k]
  ------------------
 1489|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1490|      0|        goto err;
 1491|      0|    }
 1492|  14.6k|    if (!BN_to_montgomery(one, BN_value_one(), mont, ctx)) {
  ------------------
  |  Branch (1492:9): [True: 0, False: 14.6k]
  ------------------
 1493|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1494|      0|        goto err;
 1495|      0|    }
 1496|  14.6k|    group->field_data1 = mont;
 1497|  14.6k|    mont = NULL;
 1498|  14.6k|    group->field_data2 = one;
 1499|  14.6k|    one = NULL;
 1500|       |
 1501|  14.6k|    if (!ossl_ec_GFp_simple_group_set_curve(group, p, a, b, ctx)) {
  ------------------
  |  Branch (1501:9): [True: 0, False: 14.6k]
  ------------------
 1502|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1503|      0|        goto err;
 1504|      0|    }
 1505|       |
 1506|  14.6k|    if ((P = EC_POINT_new(group)) == NULL) {
  ------------------
  |  Branch (1506:9): [True: 0, False: 14.6k]
  ------------------
 1507|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1508|      0|        goto err;
 1509|      0|    }
 1510|       |
 1511|  14.6k|    if ((x = BN_bin2bn(params + 3 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (1511:9): [True: 0, False: 14.6k]
  ------------------
 1512|  14.6k|        || (y = BN_bin2bn(params + 4 * param_len, param_len, NULL)) == NULL) {
  ------------------
  |  Branch (1512:12): [True: 0, False: 14.6k]
  ------------------
 1513|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1514|      0|        goto err;
 1515|      0|    }
 1516|  14.6k|    if (!EC_POINT_set_affine_coordinates(group, P, x, y, ctx)) {
  ------------------
  |  Branch (1516:9): [True: 0, False: 14.6k]
  ------------------
 1517|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1518|      0|        goto err;
 1519|      0|    }
 1520|  14.6k|    if ((order = BN_bin2bn(params + 5 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (1520:9): [True: 0, False: 14.6k]
  ------------------
 1521|  14.6k|        || !BN_set_word(x, (BN_ULONG)1)) { /* cofactor is 1 */
  ------------------
  |  Branch (1521:12): [True: 0, False: 14.6k]
  ------------------
 1522|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1523|      0|        goto err;
 1524|      0|    }
 1525|       |
 1526|       |    /*
 1527|       |     * Set up generator and order and montgomery data
 1528|       |     */
 1529|  14.6k|    group->generator = EC_POINT_new(group);
 1530|  14.6k|    if (group->generator == NULL) {
  ------------------
  |  Branch (1530:9): [True: 0, False: 14.6k]
  ------------------
 1531|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1532|      0|        goto err;
 1533|      0|    }
 1534|  14.6k|    if (!EC_POINT_copy(group->generator, P))
  ------------------
  |  Branch (1534:9): [True: 0, False: 14.6k]
  ------------------
 1535|      0|        goto err;
 1536|  14.6k|    if (!BN_copy(group->order, order))
  ------------------
  |  Branch (1536:9): [True: 0, False: 14.6k]
  ------------------
 1537|      0|        goto err;
 1538|  14.6k|    if (!BN_set_word(group->cofactor, 1))
  ------------------
  |  Branch (1538:9): [True: 0, False: 14.6k]
  ------------------
 1539|      0|        goto err;
 1540|       |
 1541|  14.6k|    ordmont = BN_MONT_CTX_new();
 1542|  14.6k|    if (ordmont == NULL)
  ------------------
  |  Branch (1542:9): [True: 0, False: 14.6k]
  ------------------
 1543|      0|        goto err;
 1544|  14.6k|    if (!ossl_bn_mont_ctx_set(ordmont, order, 256, params + 7 * param_len,
  ------------------
  |  Branch (1544:9): [True: 0, False: 14.6k]
  ------------------
 1545|  14.6k|            param_len, lo_order_n, hi_order_n))
 1546|      0|        goto err;
 1547|       |
 1548|  14.6k|    group->mont_data = ordmont;
 1549|  14.6k|    ordmont = NULL;
 1550|       |
 1551|  14.6k|    ok = 1;
 1552|       |
 1553|  14.6k|err:
 1554|  14.6k|    EC_POINT_free(P);
 1555|  14.6k|    BN_CTX_free(ctx);
 1556|  14.6k|    BN_MONT_CTX_free(mont);
 1557|  14.6k|    BN_MONT_CTX_free(ordmont);
 1558|  14.6k|    BN_free(p);
 1559|  14.6k|    BN_free(one);
 1560|  14.6k|    BN_free(a);
 1561|  14.6k|    BN_free(b);
 1562|  14.6k|    BN_free(order);
 1563|  14.6k|    BN_free(x);
 1564|  14.6k|    BN_free(y);
 1565|       |
 1566|  14.6k|    return ok;
 1567|  14.6k|}

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

ossl_ec_GFp_simple_group_init:
   99|  29.3k|{
  100|  29.3k|    group->field = BN_new();
  101|  29.3k|    group->a = BN_new();
  102|  29.3k|    group->b = BN_new();
  103|  29.3k|    if (group->field == NULL || group->a == NULL || group->b == NULL) {
  ------------------
  |  Branch (103:9): [True: 0, False: 29.3k]
  |  Branch (103:33): [True: 0, False: 29.3k]
  |  Branch (103:53): [True: 0, False: 29.3k]
  ------------------
  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|  29.3k|    group->a_is_minus3 = 0;
  110|  29.3k|    return 1;
  111|  29.3k|}
ossl_ec_GFp_simple_group_finish:
  114|  29.3k|{
  115|  29.3k|    BN_free(group->field);
  116|  29.3k|    BN_free(group->a);
  117|  29.3k|    BN_free(group->b);
  118|  29.3k|}
ossl_ec_GFp_simple_group_copy:
  128|  14.6k|{
  129|  14.6k|    if (!BN_copy(dest->field, src->field))
  ------------------
  |  Branch (129:9): [True: 0, False: 14.6k]
  ------------------
  130|      0|        return 0;
  131|  14.6k|    if (!BN_copy(dest->a, src->a))
  ------------------
  |  Branch (131:9): [True: 0, False: 14.6k]
  ------------------
  132|      0|        return 0;
  133|  14.6k|    if (!BN_copy(dest->b, src->b))
  ------------------
  |  Branch (133:9): [True: 0, False: 14.6k]
  ------------------
  134|      0|        return 0;
  135|       |
  136|  14.6k|    dest->a_is_minus3 = src->a_is_minus3;
  137|       |
  138|  14.6k|    return 1;
  139|  14.6k|}
ossl_ec_GFp_simple_group_set_curve:
  144|  14.6k|{
  145|  14.6k|    int ret = 0;
  146|  14.6k|    BN_CTX *new_ctx = NULL;
  147|  14.6k|    BIGNUM *tmp_a;
  148|       |
  149|       |    /* p must be a prime > 3 */
  150|  14.6k|    if (BN_num_bits(p) <= 2 || !BN_is_odd(p)) {
  ------------------
  |  Branch (150:9): [True: 0, False: 14.6k]
  |  Branch (150:32): [True: 0, False: 14.6k]
  ------------------
  151|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_FIELD);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  152|      0|        return 0;
  153|      0|    }
  154|       |
  155|  14.6k|    if (ctx == NULL) {
  ------------------
  |  Branch (155:9): [True: 0, False: 14.6k]
  ------------------
  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|  14.6k|    BN_CTX_start(ctx);
  162|  14.6k|    tmp_a = BN_CTX_get(ctx);
  163|  14.6k|    if (tmp_a == NULL)
  ------------------
  |  Branch (163:9): [True: 0, False: 14.6k]
  ------------------
  164|      0|        goto err;
  165|       |
  166|       |    /* group->field */
  167|  14.6k|    if (!BN_copy(group->field, p))
  ------------------
  |  Branch (167:9): [True: 0, False: 14.6k]
  ------------------
  168|      0|        goto err;
  169|  14.6k|    BN_set_negative(group->field, 0);
  170|       |
  171|       |    /* group->a */
  172|  14.6k|    if (!BN_nnmod(tmp_a, a, p, ctx))
  ------------------
  |  Branch (172:9): [True: 0, False: 14.6k]
  ------------------
  173|      0|        goto err;
  174|  14.6k|    if (group->meth->field_encode != NULL) {
  ------------------
  |  Branch (174:9): [True: 14.6k, False: 0]
  ------------------
  175|  14.6k|        if (!group->meth->field_encode(group, group->a, tmp_a, ctx))
  ------------------
  |  Branch (175:13): [True: 0, False: 14.6k]
  ------------------
  176|      0|            goto err;
  177|  14.6k|    } else if (!BN_copy(group->a, tmp_a))
  ------------------
  |  Branch (177:16): [True: 0, False: 0]
  ------------------
  178|      0|        goto err;
  179|       |
  180|       |    /* group->b */
  181|  14.6k|    if (!BN_nnmod(group->b, b, p, ctx))
  ------------------
  |  Branch (181:9): [True: 0, False: 14.6k]
  ------------------
  182|      0|        goto err;
  183|  14.6k|    if (group->meth->field_encode != NULL)
  ------------------
  |  Branch (183:9): [True: 14.6k, False: 0]
  ------------------
  184|  14.6k|        if (!group->meth->field_encode(group, group->b, group->b, ctx))
  ------------------
  |  Branch (184:13): [True: 0, False: 14.6k]
  ------------------
  185|      0|            goto err;
  186|       |
  187|       |    /* group->a_is_minus3 */
  188|  14.6k|    if (!BN_add_word(tmp_a, 3))
  ------------------
  |  Branch (188:9): [True: 0, False: 14.6k]
  ------------------
  189|      0|        goto err;
  190|  14.6k|    group->a_is_minus3 = (0 == BN_cmp(tmp_a, group->field));
  191|       |
  192|  14.6k|    ret = 1;
  193|       |
  194|  14.6k|err:
  195|  14.6k|    BN_CTX_end(ctx);
  196|  14.6k|    BN_CTX_free(new_ctx);
  197|  14.6k|    return ret;
  198|  14.6k|}
ossl_ec_GFp_simple_group_get_curve:
  202|  18.6k|{
  203|  18.6k|    int ret = 0;
  204|  18.6k|    BN_CTX *new_ctx = NULL;
  205|       |
  206|  18.6k|    if (p != NULL) {
  ------------------
  |  Branch (206:9): [True: 18.6k, False: 0]
  ------------------
  207|  18.6k|        if (!BN_copy(p, group->field))
  ------------------
  |  Branch (207:13): [True: 0, False: 18.6k]
  ------------------
  208|      0|            return 0;
  209|  18.6k|    }
  210|       |
  211|  18.6k|    if (a != NULL || b != NULL) {
  ------------------
  |  Branch (211:9): [True: 18.6k, False: 0]
  |  Branch (211:22): [True: 0, False: 0]
  ------------------
  212|  18.6k|        if (group->meth->field_decode != NULL) {
  ------------------
  |  Branch (212:13): [True: 18.6k, False: 0]
  ------------------
  213|  18.6k|            if (ctx == NULL) {
  ------------------
  |  Branch (213:17): [True: 0, False: 18.6k]
  ------------------
  214|      0|                ctx = new_ctx = BN_CTX_new_ex(group->libctx);
  215|      0|                if (ctx == NULL)
  ------------------
  |  Branch (215:21): [True: 0, False: 0]
  ------------------
  216|      0|                    return 0;
  217|      0|            }
  218|  18.6k|            if (a != NULL) {
  ------------------
  |  Branch (218:17): [True: 18.6k, False: 0]
  ------------------
  219|  18.6k|                if (!group->meth->field_decode(group, a, group->a, ctx))
  ------------------
  |  Branch (219:21): [True: 0, False: 18.6k]
  ------------------
  220|      0|                    goto err;
  221|  18.6k|            }
  222|  18.6k|            if (b != NULL) {
  ------------------
  |  Branch (222:17): [True: 18.6k, False: 0]
  ------------------
  223|  18.6k|                if (!group->meth->field_decode(group, b, group->b, ctx))
  ------------------
  |  Branch (223:21): [True: 0, False: 18.6k]
  ------------------
  224|      0|                    goto err;
  225|  18.6k|            }
  226|  18.6k|        } else {
  227|      0|            if (a != NULL) {
  ------------------
  |  Branch (227:17): [True: 0, False: 0]
  ------------------
  228|      0|                if (!BN_copy(a, group->a))
  ------------------
  |  Branch (228:21): [True: 0, False: 0]
  ------------------
  229|      0|                    goto err;
  230|      0|            }
  231|      0|            if (b != NULL) {
  ------------------
  |  Branch (231:17): [True: 0, False: 0]
  ------------------
  232|      0|                if (!BN_copy(b, group->b))
  ------------------
  |  Branch (232:21): [True: 0, False: 0]
  ------------------
  233|      0|                    goto err;
  234|      0|            }
  235|      0|        }
  236|  18.6k|    }
  237|       |
  238|  18.6k|    ret = 1;
  239|       |
  240|  18.6k|err:
  241|  18.6k|    BN_CTX_free(new_ctx);
  242|  18.6k|    return ret;
  243|  18.6k|}
ossl_ec_GFp_simple_point_init:
  323|  65.8k|{
  324|  65.8k|    point->X = BN_new();
  325|  65.8k|    point->Y = BN_new();
  326|  65.8k|    point->Z = BN_new();
  327|  65.8k|    point->Z_is_one = 0;
  328|       |
  329|  65.8k|    if (point->X == NULL || point->Y == NULL || point->Z == NULL) {
  ------------------
  |  Branch (329:9): [True: 0, False: 65.8k]
  |  Branch (329:29): [True: 0, False: 65.8k]
  |  Branch (329:49): [True: 0, False: 65.8k]
  ------------------
  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|  65.8k|    return 1;
  336|  65.8k|}
ossl_ec_GFp_simple_point_finish:
  339|  65.8k|{
  340|  65.8k|    BN_free(point->X);
  341|  65.8k|    BN_free(point->Y);
  342|  65.8k|    BN_free(point->Z);
  343|  65.8k|}
ossl_ec_GFp_simple_point_copy:
  354|  29.3k|{
  355|  29.3k|    if (!BN_copy(dest->X, src->X))
  ------------------
  |  Branch (355:9): [True: 0, False: 29.3k]
  ------------------
  356|      0|        return 0;
  357|  29.3k|    if (!BN_copy(dest->Y, src->Y))
  ------------------
  |  Branch (357:9): [True: 0, False: 29.3k]
  ------------------
  358|      0|        return 0;
  359|  29.3k|    if (!BN_copy(dest->Z, src->Z))
  ------------------
  |  Branch (359:9): [True: 0, False: 29.3k]
  ------------------
  360|      0|        return 0;
  361|  29.3k|    dest->Z_is_one = src->Z_is_one;
  362|  29.3k|    dest->curve_name = src->curve_name;
  363|       |
  364|  29.3k|    return 1;
  365|  29.3k|}
ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp:
  381|  29.3k|{
  382|  29.3k|    BN_CTX *new_ctx = NULL;
  383|  29.3k|    int ret = 0;
  384|       |
  385|  29.3k|    if (ctx == NULL) {
  ------------------
  |  Branch (385:9): [True: 0, False: 29.3k]
  ------------------
  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|  29.3k|    if (x != NULL) {
  ------------------
  |  Branch (391:9): [True: 29.3k, False: 0]
  ------------------
  392|  29.3k|        if (!BN_nnmod(point->X, x, group->field, ctx))
  ------------------
  |  Branch (392:13): [True: 0, False: 29.3k]
  ------------------
  393|      0|            goto err;
  394|  29.3k|        if (group->meth->field_encode) {
  ------------------
  |  Branch (394:13): [True: 29.3k, False: 0]
  ------------------
  395|  29.3k|            if (!group->meth->field_encode(group, point->X, point->X, ctx))
  ------------------
  |  Branch (395:17): [True: 0, False: 29.3k]
  ------------------
  396|      0|                goto err;
  397|  29.3k|        }
  398|  29.3k|    }
  399|       |
  400|  29.3k|    if (y != NULL) {
  ------------------
  |  Branch (400:9): [True: 29.3k, False: 0]
  ------------------
  401|  29.3k|        if (!BN_nnmod(point->Y, y, group->field, ctx))
  ------------------
  |  Branch (401:13): [True: 0, False: 29.3k]
  ------------------
  402|      0|            goto err;
  403|  29.3k|        if (group->meth->field_encode) {
  ------------------
  |  Branch (403:13): [True: 29.3k, False: 0]
  ------------------
  404|  29.3k|            if (!group->meth->field_encode(group, point->Y, point->Y, ctx))
  ------------------
  |  Branch (404:17): [True: 0, False: 29.3k]
  ------------------
  405|      0|                goto err;
  406|  29.3k|        }
  407|  29.3k|    }
  408|       |
  409|  29.3k|    if (z != NULL) {
  ------------------
  |  Branch (409:9): [True: 29.3k, False: 0]
  ------------------
  410|  29.3k|        int Z_is_one;
  411|       |
  412|  29.3k|        if (!BN_nnmod(point->Z, z, group->field, ctx))
  ------------------
  |  Branch (412:13): [True: 0, False: 29.3k]
  ------------------
  413|      0|            goto err;
  414|  29.3k|        Z_is_one = BN_is_one(point->Z);
  415|  29.3k|        if (group->meth->field_encode) {
  ------------------
  |  Branch (415:13): [True: 29.3k, False: 0]
  ------------------
  416|  29.3k|            if (Z_is_one && (group->meth->field_set_to_one != 0)) {
  ------------------
  |  Branch (416:17): [True: 29.3k, False: 0]
  |  Branch (416:29): [True: 29.3k, False: 0]
  ------------------
  417|  29.3k|                if (!group->meth->field_set_to_one(group, point->Z, ctx))
  ------------------
  |  Branch (417:21): [True: 0, False: 29.3k]
  ------------------
  418|      0|                    goto err;
  419|  29.3k|            } 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|  29.3k|        }
  424|  29.3k|        point->Z_is_one = Z_is_one;
  425|  29.3k|    }
  426|       |
  427|  29.3k|    ret = 1;
  428|       |
  429|  29.3k|err:
  430|  29.3k|    BN_CTX_free(new_ctx);
  431|  29.3k|    return ret;
  432|  29.3k|}
ossl_ec_GFp_simple_point_set_affine_coordinates:
  487|  29.3k|{
  488|  29.3k|    if (x == NULL || y == NULL) {
  ------------------
  |  Branch (488:9): [True: 0, False: 29.3k]
  |  Branch (488:22): [True: 0, False: 29.3k]
  ------------------
  489|       |        /*
  490|       |         * unlike for projective coordinates, we do not tolerate this
  491|       |         */
  492|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  493|      0|        return 0;
  494|      0|    }
  495|       |
  496|  29.3k|    return EC_POINT_set_Jprojective_coordinates_GFp(group, point, x, y,
  497|  29.3k|        BN_value_one(), ctx);
  498|  29.3k|}
ossl_ec_GFp_simple_is_at_infinity:
  951|  81.1k|{
  952|  81.1k|    return BN_is_zero(point->Z);
  953|  81.1k|}
ossl_ec_GFp_simple_is_on_curve:
  957|  29.3k|{
  958|  29.3k|    int (*field_mul)(const EC_GROUP *, BIGNUM *, const BIGNUM *,
  959|  29.3k|        const BIGNUM *, BN_CTX *);
  960|  29.3k|    int (*field_sqr)(const EC_GROUP *, BIGNUM *, const BIGNUM *, BN_CTX *);
  961|  29.3k|    const BIGNUM *p;
  962|  29.3k|    BN_CTX *new_ctx = NULL;
  963|  29.3k|    BIGNUM *rh, *tmp, *Z4, *Z6;
  964|  29.3k|    int ret = -1;
  965|       |
  966|  29.3k|    if (EC_POINT_is_at_infinity(group, point))
  ------------------
  |  Branch (966:9): [True: 0, False: 29.3k]
  ------------------
  967|      0|        return 1;
  968|       |
  969|  29.3k|    field_mul = group->meth->field_mul;
  970|  29.3k|    field_sqr = group->meth->field_sqr;
  971|  29.3k|    p = group->field;
  972|       |
  973|  29.3k|    if (ctx == NULL) {
  ------------------
  |  Branch (973:9): [True: 0, False: 29.3k]
  ------------------
  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|  29.3k|    BN_CTX_start(ctx);
  980|  29.3k|    rh = BN_CTX_get(ctx);
  981|  29.3k|    tmp = BN_CTX_get(ctx);
  982|  29.3k|    Z4 = BN_CTX_get(ctx);
  983|  29.3k|    Z6 = BN_CTX_get(ctx);
  984|  29.3k|    if (Z6 == NULL)
  ------------------
  |  Branch (984:9): [True: 0, False: 29.3k]
  ------------------
  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|  29.3k|    if (!field_sqr(group, rh, point->X, ctx))
  ------------------
  |  Branch (998:9): [True: 0, False: 29.3k]
  ------------------
  999|      0|        goto err;
 1000|       |
 1001|  29.3k|    if (!point->Z_is_one) {
  ------------------
  |  Branch (1001:9): [True: 0, False: 29.3k]
  ------------------
 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|  29.3k|    } else {
 1034|       |        /* point->Z_is_one */
 1035|       |
 1036|       |        /* rh := (rh + a)*X */
 1037|  29.3k|        if (!BN_mod_add_quick(rh, rh, group->a, p))
  ------------------
  |  Branch (1037:13): [True: 0, False: 29.3k]
  ------------------
 1038|      0|            goto err;
 1039|  29.3k|        if (!field_mul(group, rh, rh, point->X, ctx))
  ------------------
  |  Branch (1039:13): [True: 0, False: 29.3k]
  ------------------
 1040|      0|            goto err;
 1041|       |        /* rh := rh + b */
 1042|  29.3k|        if (!BN_mod_add_quick(rh, rh, group->b, p))
  ------------------
  |  Branch (1042:13): [True: 0, False: 29.3k]
  ------------------
 1043|      0|            goto err;
 1044|  29.3k|    }
 1045|       |
 1046|       |    /* 'lh' := Y^2 */
 1047|  29.3k|    if (!field_sqr(group, tmp, point->Y, ctx))
  ------------------
  |  Branch (1047:9): [True: 0, False: 29.3k]
  ------------------
 1048|      0|        goto err;
 1049|       |
 1050|  29.3k|    ret = (0 == BN_ucmp(tmp, rh));
 1051|       |
 1052|  29.3k|err:
 1053|  29.3k|    BN_CTX_end(ctx);
 1054|  29.3k|    BN_CTX_free(new_ctx);
 1055|  29.3k|    return ret;
 1056|  29.3k|}
ossl_ec_GFp_simple_cmp:
 1060|  14.9k|{
 1061|       |    /*-
 1062|       |     * return values:
 1063|       |     *  -1   error
 1064|       |     *   0   equal (in affine coordinates)
 1065|       |     *   1   not equal
 1066|       |     */
 1067|       |
 1068|  14.9k|    int (*field_mul)(const EC_GROUP *, BIGNUM *, const BIGNUM *,
 1069|  14.9k|        const BIGNUM *, BN_CTX *);
 1070|  14.9k|    int (*field_sqr)(const EC_GROUP *, BIGNUM *, const BIGNUM *, BN_CTX *);
 1071|  14.9k|    BN_CTX *new_ctx = NULL;
 1072|  14.9k|    BIGNUM *tmp1, *tmp2, *Za23, *Zb23;
 1073|  14.9k|    const BIGNUM *tmp1_, *tmp2_;
 1074|  14.9k|    int ret = -1;
 1075|       |
 1076|  14.9k|    if (EC_POINT_is_at_infinity(group, a)) {
  ------------------
  |  Branch (1076:9): [True: 0, False: 14.9k]
  ------------------
 1077|      0|        return EC_POINT_is_at_infinity(group, b) ? 0 : 1;
  ------------------
  |  Branch (1077:16): [True: 0, False: 0]
  ------------------
 1078|      0|    }
 1079|       |
 1080|  14.9k|    if (EC_POINT_is_at_infinity(group, b))
  ------------------
  |  Branch (1080:9): [True: 0, False: 14.9k]
  ------------------
 1081|      0|        return 1;
 1082|       |
 1083|  14.9k|    if (a->Z_is_one && b->Z_is_one) {
  ------------------
  |  Branch (1083:9): [True: 14.9k, False: 0]
  |  Branch (1083:24): [True: 14.9k, False: 0]
  ------------------
 1084|  14.9k|        return ((BN_cmp(a->X, b->X) == 0) && BN_cmp(a->Y, b->Y) == 0) ? 0 : 1;
  ------------------
  |  Branch (1084:17): [True: 14.9k, False: 0]
  |  Branch (1084:46): [True: 14.9k, False: 0]
  ------------------
 1085|  14.9k|    }
 1086|       |
 1087|      0|    field_mul = group->meth->field_mul;
 1088|      0|    field_sqr = group->meth->field_sqr;
 1089|       |
 1090|      0|    if (ctx == NULL) {
  ------------------
  |  Branch (1090:9): [True: 0, False: 0]
  ------------------
 1091|      0|        ctx = new_ctx = BN_CTX_new_ex(group->libctx);
 1092|      0|        if (ctx == NULL)
  ------------------
  |  Branch (1092:13): [True: 0, False: 0]
  ------------------
 1093|      0|            return -1;
 1094|      0|    }
 1095|       |
 1096|      0|    BN_CTX_start(ctx);
 1097|      0|    tmp1 = BN_CTX_get(ctx);
 1098|      0|    tmp2 = BN_CTX_get(ctx);
 1099|      0|    Za23 = BN_CTX_get(ctx);
 1100|      0|    Zb23 = BN_CTX_get(ctx);
 1101|      0|    if (Zb23 == NULL)
  ------------------
  |  Branch (1101:9): [True: 0, False: 0]
  ------------------
 1102|      0|        goto end;
 1103|       |
 1104|       |    /*-
 1105|       |     * We have to decide whether
 1106|       |     *     (X_a/Z_a^2, Y_a/Z_a^3) = (X_b/Z_b^2, Y_b/Z_b^3),
 1107|       |     * or equivalently, whether
 1108|       |     *     (X_a*Z_b^2, Y_a*Z_b^3) = (X_b*Z_a^2, Y_b*Z_a^3).
 1109|       |     */
 1110|       |
 1111|      0|    if (!b->Z_is_one) {
  ------------------
  |  Branch (1111:9): [True: 0, False: 0]
  ------------------
 1112|      0|        if (!field_sqr(group, Zb23, b->Z, ctx))
  ------------------
  |  Branch (1112:13): [True: 0, False: 0]
  ------------------
 1113|      0|            goto end;
 1114|      0|        if (!field_mul(group, tmp1, a->X, Zb23, ctx))
  ------------------
  |  Branch (1114:13): [True: 0, False: 0]
  ------------------
 1115|      0|            goto end;
 1116|      0|        tmp1_ = tmp1;
 1117|      0|    } else
 1118|      0|        tmp1_ = a->X;
 1119|      0|    if (!a->Z_is_one) {
  ------------------
  |  Branch (1119:9): [True: 0, False: 0]
  ------------------
 1120|      0|        if (!field_sqr(group, Za23, a->Z, ctx))
  ------------------
  |  Branch (1120:13): [True: 0, False: 0]
  ------------------
 1121|      0|            goto end;
 1122|      0|        if (!field_mul(group, tmp2, b->X, Za23, ctx))
  ------------------
  |  Branch (1122:13): [True: 0, False: 0]
  ------------------
 1123|      0|            goto end;
 1124|      0|        tmp2_ = tmp2;
 1125|      0|    } else
 1126|      0|        tmp2_ = b->X;
 1127|       |
 1128|       |    /* compare  X_a*Z_b^2  with  X_b*Z_a^2 */
 1129|      0|    if (BN_cmp(tmp1_, tmp2_) != 0) {
  ------------------
  |  Branch (1129:9): [True: 0, False: 0]
  ------------------
 1130|      0|        ret = 1; /* points differ */
 1131|      0|        goto end;
 1132|      0|    }
 1133|       |
 1134|      0|    if (!b->Z_is_one) {
  ------------------
  |  Branch (1134:9): [True: 0, False: 0]
  ------------------
 1135|      0|        if (!field_mul(group, Zb23, Zb23, b->Z, ctx))
  ------------------
  |  Branch (1135:13): [True: 0, False: 0]
  ------------------
 1136|      0|            goto end;
 1137|      0|        if (!field_mul(group, tmp1, a->Y, Zb23, ctx))
  ------------------
  |  Branch (1137:13): [True: 0, False: 0]
  ------------------
 1138|      0|            goto end;
 1139|       |        /* tmp1_ = tmp1 */
 1140|      0|    } else
 1141|      0|        tmp1_ = a->Y;
 1142|      0|    if (!a->Z_is_one) {
  ------------------
  |  Branch (1142:9): [True: 0, False: 0]
  ------------------
 1143|      0|        if (!field_mul(group, Za23, Za23, a->Z, ctx))
  ------------------
  |  Branch (1143:13): [True: 0, False: 0]
  ------------------
 1144|      0|            goto end;
 1145|      0|        if (!field_mul(group, tmp2, b->Y, Za23, ctx))
  ------------------
  |  Branch (1145:13): [True: 0, False: 0]
  ------------------
 1146|      0|            goto end;
 1147|       |        /* tmp2_ = tmp2 */
 1148|      0|    } else
 1149|      0|        tmp2_ = b->Y;
 1150|       |
 1151|       |    /* compare  Y_a*Z_b^3  with  Y_b*Z_a^3 */
 1152|      0|    if (BN_cmp(tmp1_, tmp2_) != 0) {
  ------------------
  |  Branch (1152:9): [True: 0, False: 0]
  ------------------
 1153|      0|        ret = 1; /* points differ */
 1154|      0|        goto end;
 1155|      0|    }
 1156|       |
 1157|       |    /* points are equal */
 1158|      0|    ret = 0;
 1159|       |
 1160|      0|end:
 1161|      0|    BN_CTX_end(ctx);
 1162|      0|    BN_CTX_free(new_ctx);
 1163|      0|    return ret;
 1164|      0|}

ossl_ecx_key_fromdata:
   58|  3.62k|{
   59|  3.62k|    size_t privkeylen = 0, pubkeylen = 0;
   60|  3.62k|    unsigned char *pubkey;
   61|       |
   62|  3.62k|    if (ecx == NULL)
  ------------------
  |  Branch (62:9): [True: 0, False: 3.62k]
  ------------------
   63|      0|        return 0;
   64|       |
   65|  3.62k|    if (param_pub_key == NULL && param_priv_key == NULL)
  ------------------
  |  Branch (65:9): [True: 0, False: 3.62k]
  |  Branch (65:34): [True: 0, False: 0]
  ------------------
   66|      0|        return 0;
   67|       |
   68|  3.62k|    if (include_private && param_priv_key != NULL) {
  ------------------
  |  Branch (68:9): [True: 3.62k, False: 0]
  |  Branch (68:28): [True: 0, False: 3.62k]
  ------------------
   69|      0|        if (!OSSL_PARAM_get_octet_string(param_priv_key,
  ------------------
  |  Branch (69:13): [True: 0, False: 0]
  ------------------
   70|      0|                (void **)&ecx->privkey, ecx->keylen,
   71|      0|                &privkeylen))
   72|      0|            return 0;
   73|      0|        if (privkeylen != ecx->keylen) {
  ------------------
  |  Branch (73:13): [True: 0, False: 0]
  ------------------
   74|       |            /*
   75|       |             * Invalid key length. We will clear what we've received now. We
   76|       |             * can't leave it to ossl_ecx_key_free() because that will call
   77|       |             * OPENSSL_secure_clear_free() and assume the correct key length
   78|       |             */
   79|      0|            OPENSSL_secure_clear_free(ecx->privkey, privkeylen);
  ------------------
  |  |  150|      0|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   80|      0|            ecx->privkey = NULL;
   81|      0|            return 0;
   82|      0|        }
   83|      0|    }
   84|       |
   85|  3.62k|    pubkey = ecx->pubkey;
   86|  3.62k|    if (param_pub_key != NULL
  ------------------
  |  Branch (86:9): [True: 3.62k, False: 0]
  ------------------
   87|  3.62k|        && !OSSL_PARAM_get_octet_string(param_pub_key,
  ------------------
  |  Branch (87:12): [True: 0, False: 3.62k]
  ------------------
   88|  3.62k|            (void **)&pubkey,
   89|  3.62k|            sizeof(ecx->pubkey), &pubkeylen))
   90|      0|        return 0;
   91|       |
   92|  3.62k|    if ((param_pub_key != NULL && pubkeylen != ecx->keylen))
  ------------------
  |  Branch (92:10): [True: 3.62k, False: 0]
  |  Branch (92:35): [True: 0, False: 3.62k]
  ------------------
   93|      0|        return 0;
   94|       |
   95|  3.62k|    if (param_pub_key == NULL && !ossl_ecx_public_from_private(ecx))
  ------------------
  |  Branch (95:9): [True: 0, False: 3.62k]
  |  Branch (95:34): [True: 0, False: 0]
  ------------------
   96|      0|        return 0;
   97|       |
   98|  3.62k|    ecx->haspubkey = 1;
   99|       |
  100|  3.62k|    return 1;
  101|  3.62k|}
ossl_ecx_key_dup:
  104|  3.62k|{
  105|  3.62k|    ECX_KEY *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  3.62k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  106|       |
  107|  3.62k|    if (ret == NULL)
  ------------------
  |  Branch (107:9): [True: 0, False: 3.62k]
  ------------------
  108|      0|        return NULL;
  109|       |
  110|  3.62k|    ret->libctx = key->libctx;
  111|  3.62k|    ret->haspubkey = 0;
  112|  3.62k|    ret->keylen = key->keylen;
  113|  3.62k|    ret->type = key->type;
  114|       |
  115|  3.62k|    if (!CRYPTO_NEW_REF(&ret->references, 1))
  ------------------
  |  Branch (115:9): [True: 0, False: 3.62k]
  ------------------
  116|      0|        goto err;
  117|       |
  118|  3.62k|    if (key->propq != NULL) {
  ------------------
  |  Branch (118:9): [True: 0, False: 3.62k]
  ------------------
  119|      0|        ret->propq = OPENSSL_strdup(key->propq);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  120|      0|        if (ret->propq == NULL)
  ------------------
  |  Branch (120:13): [True: 0, False: 0]
  ------------------
  121|      0|            goto err;
  122|      0|    }
  123|       |
  124|  3.62k|    if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0
  ------------------
  |  |  647|  3.62k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (124:9): [True: 0, False: 3.62k]
  ------------------
  125|      0|        && key->haspubkey == 1) {
  ------------------
  |  Branch (125:12): [True: 0, False: 0]
  ------------------
  126|      0|        memcpy(ret->pubkey, key->pubkey, sizeof(ret->pubkey));
  127|      0|        ret->haspubkey = 1;
  128|      0|    }
  129|       |
  130|  3.62k|    if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0
  ------------------
  |  |  646|  3.62k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (130:9): [True: 0, False: 3.62k]
  ------------------
  131|      0|        && key->privkey != NULL) {
  ------------------
  |  Branch (131:12): [True: 0, False: 0]
  ------------------
  132|      0|        if (ossl_ecx_key_allocate_privkey(ret) == NULL) {
  ------------------
  |  Branch (132:13): [True: 0, False: 0]
  ------------------
  133|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  134|      0|            goto err;
  135|      0|        }
  136|      0|        memcpy(ret->privkey, key->privkey, ret->keylen);
  137|      0|    }
  138|       |
  139|  3.62k|    return ret;
  140|       |
  141|      0|err:
  142|      0|    CRYPTO_FREE_REF(&ret->references);
  143|      0|    ossl_ecx_key_free(ret);
  144|       |    return NULL;
  145|  3.62k|}

ossl_ecx_key_new:
   22|  14.5k|{
   23|  14.5k|    ECX_KEY *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  14.5k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   24|       |
   25|  14.5k|    if (ret == NULL)
  ------------------
  |  Branch (25:9): [True: 0, False: 14.5k]
  ------------------
   26|      0|        return NULL;
   27|       |
   28|  14.5k|    ret->libctx = libctx;
   29|  14.5k|    ret->haspubkey = haspubkey;
   30|  14.5k|    switch (type) {
  ------------------
  |  Branch (30:13): [True: 14.5k, False: 0]
  ------------------
   31|  14.5k|    case ECX_KEY_TYPE_X25519:
  ------------------
  |  Branch (31:5): [True: 14.5k, False: 0]
  ------------------
   32|  14.5k|        ret->keylen = X25519_KEYLEN;
  ------------------
  |  |   26|  14.5k|#define X25519_KEYLEN 32
  ------------------
   33|  14.5k|        break;
   34|      0|    case ECX_KEY_TYPE_X448:
  ------------------
  |  Branch (34:5): [True: 0, False: 14.5k]
  ------------------
   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: 14.5k]
  ------------------
   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: 14.5k]
  ------------------
   41|      0|        ret->keylen = ED448_KEYLEN;
  ------------------
  |  |   29|      0|#define ED448_KEYLEN 57
  ------------------
   42|      0|        break;
   43|  14.5k|    }
   44|  14.5k|    ret->type = type;
   45|       |
   46|  14.5k|    if (!CRYPTO_NEW_REF(&ret->references, 1))
  ------------------
  |  Branch (46:9): [True: 0, False: 14.5k]
  ------------------
   47|      0|        goto err;
   48|       |
   49|  14.5k|    if (propq != NULL) {
  ------------------
  |  Branch (49:9): [True: 0, False: 14.5k]
  ------------------
   50|      0|        ret->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   51|      0|        if (ret->propq == NULL)
  ------------------
  |  Branch (51:13): [True: 0, False: 0]
  ------------------
   52|      0|            goto err;
   53|      0|    }
   54|  14.5k|    return ret;
   55|      0|err:
   56|      0|    if (ret != NULL) {
  ------------------
  |  Branch (56:9): [True: 0, False: 0]
  ------------------
   57|      0|        OPENSSL_free(ret->propq);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   58|      0|        CRYPTO_FREE_REF(&ret->references);
   59|      0|    }
   60|      0|    OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   61|       |    return NULL;
   62|  14.5k|}
ossl_ecx_key_free:
   65|  47.1k|{
   66|  47.1k|    int i;
   67|       |
   68|  47.1k|    if (key == NULL)
  ------------------
  |  Branch (68:9): [True: 14.5k, False: 32.6k]
  ------------------
   69|  14.5k|        return;
   70|       |
   71|  32.6k|    CRYPTO_DOWN_REF(&key->references, &i);
   72|  32.6k|    REF_PRINT_COUNT("ECX_KEY", i, key);
  ------------------
  |  |  301|  32.6k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  32.6k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  32.6k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  32.6k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   73|  32.6k|    if (i > 0)
  ------------------
  |  Branch (73:9): [True: 14.5k, False: 18.1k]
  ------------------
   74|  14.5k|        return;
   75|  18.1k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  18.1k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 18.1k]
  |  |  ------------------
  ------------------
   76|       |
   77|  18.1k|    OPENSSL_free(key->propq);
  ------------------
  |  |  132|  18.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   78|       |#ifdef OPENSSL_PEDANTIC_ZEROIZATION
   79|       |    OPENSSL_cleanse(&key->pubkey, sizeof(key->pubkey));
   80|       |#endif
   81|  18.1k|    OPENSSL_secure_clear_free(key->privkey, key->keylen);
  ------------------
  |  |  150|  18.1k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   82|  18.1k|    CRYPTO_FREE_REF(&key->references);
   83|  18.1k|    OPENSSL_free(key);
  ------------------
  |  |  132|  18.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   84|  18.1k|}
ossl_ecx_key_up_ref:
   92|  14.5k|{
   93|  14.5k|    int i;
   94|       |
   95|  14.5k|    if (CRYPTO_UP_REF(&key->references, &i) <= 0)
  ------------------
  |  Branch (95:9): [True: 0, False: 14.5k]
  ------------------
   96|      0|        return 0;
   97|       |
   98|  14.5k|    REF_PRINT_COUNT("ECX_KEY", i, key);
  ------------------
  |  |  301|  14.5k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  14.5k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  14.5k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  14.5k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   99|  14.5k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|  14.5k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 14.5k]
  |  |  ------------------
  ------------------
  100|  14.5k|    return ((i > 1) ? 1 : 0);
  ------------------
  |  Branch (100:13): [True: 14.5k, False: 0]
  ------------------
  101|  14.5k|}
ossl_ecx_key_allocate_privkey:
  104|  10.8k|{
  105|  10.8k|    key->privkey = OPENSSL_secure_zalloc(key->keylen);
  ------------------
  |  |  142|  10.8k|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  106|       |
  107|  10.8k|    return key->privkey;
  108|  10.8k|}
ossl_ecx_compute_key:
  112|  7.25k|{
  113|  7.25k|    if (priv == NULL
  ------------------
  |  Branch (113:9): [True: 0, False: 7.25k]
  ------------------
  114|  7.25k|        || priv->privkey == NULL
  ------------------
  |  Branch (114:12): [True: 0, False: 7.25k]
  ------------------
  115|  7.25k|        || peer == NULL) {
  ------------------
  |  Branch (115:12): [True: 0, False: 7.25k]
  ------------------
  116|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  117|      0|        return 0;
  118|      0|    }
  119|       |
  120|  7.25k|    if (!ossl_assert(keylen == X25519_KEYLEN
  ------------------
  |  |   52|  7.25k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 7.25k, False: 0]
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|  7.25k|    __FILE__, __LINE__)
  ------------------
  |  Branch (120:9): [True: 0, False: 7.25k]
  ------------------
  121|  7.25k|            || keylen == X448_KEYLEN)) {
  122|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  123|      0|        return 0;
  124|      0|    }
  125|       |
  126|  7.25k|    if (secret == NULL) {
  ------------------
  |  Branch (126:9): [True: 0, False: 7.25k]
  ------------------
  127|      0|        *secretlen = keylen;
  128|      0|        return 1;
  129|      0|    }
  130|  7.25k|    if (outlen < keylen) {
  ------------------
  |  Branch (130:9): [True: 0, False: 7.25k]
  ------------------
  131|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  132|      0|        return 0;
  133|      0|    }
  134|       |
  135|  7.25k|    if (keylen == X25519_KEYLEN) {
  ------------------
  |  |   26|  7.25k|#define X25519_KEYLEN 32
  ------------------
  |  Branch (135:9): [True: 7.25k, False: 0]
  ------------------
  136|       |#ifdef S390X_EC_ASM
  137|       |        if (OPENSSL_s390xcap_P.pcc[1]
  138|       |            & S390X_CAPBIT(S390X_SCALAR_MULTIPLY_X25519)) {
  139|       |            if (s390x_x25519_mul(secret, peer->pubkey, priv->privkey) == 0) {
  140|       |                ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_DURING_DERIVATION);
  141|       |                return 0;
  142|       |            }
  143|       |        } else
  144|       |#endif
  145|  7.25k|            if (ossl_x25519(secret, priv->privkey, peer->pubkey) == 0) {
  ------------------
  |  Branch (145:17): [True: 0, False: 7.25k]
  ------------------
  146|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_DURING_DERIVATION);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  147|      0|            return 0;
  148|      0|        }
  149|  7.25k|    } else {
  150|       |#ifdef S390X_EC_ASM
  151|       |        if (OPENSSL_s390xcap_P.pcc[1]
  152|       |            & S390X_CAPBIT(S390X_SCALAR_MULTIPLY_X448)) {
  153|       |            if (s390x_x448_mul(secret, peer->pubkey, priv->privkey) == 0) {
  154|       |                ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_DURING_DERIVATION);
  155|       |                return 0;
  156|       |            }
  157|       |        } else
  158|       |#endif
  159|      0|            if (ossl_x448(secret, priv->privkey, peer->pubkey) == 0) {
  ------------------
  |  Branch (159:17): [True: 0, False: 0]
  ------------------
  160|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_DURING_DERIVATION);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  161|      0|            return 0;
  162|      0|        }
  163|      0|    }
  164|  7.25k|    *secretlen = keylen;
  165|  7.25k|    return 1;
  166|  7.25k|}

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

OSSL_DECODER_up_ref:
   53|   200k|{
   54|   200k|    int ref = 0;
   55|       |
   56|   200k|    CRYPTO_UP_REF(&decoder->base.refcnt, &ref);
   57|   200k|    return 1;
   58|   200k|}
OSSL_DECODER_free:
   61|   200k|{
   62|   200k|    int ref = 0;
   63|       |
   64|   200k|    if (decoder == NULL)
  ------------------
  |  Branch (64:9): [True: 0, False: 200k]
  ------------------
   65|      0|        return;
   66|       |
   67|   200k|    CRYPTO_DOWN_REF(&decoder->base.refcnt, &ref);
   68|   200k|    if (ref > 0)
  ------------------
  |  Branch (68:9): [True: 200k, False: 0]
  ------------------
   69|   200k|        return;
   70|      0|    OPENSSL_free(decoder->base.name);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   71|      0|    ossl_property_free(decoder->base.parsed_propdef);
   72|      0|    ossl_provider_free(decoder->base.prov);
   73|      0|    CRYPTO_FREE_REF(&decoder->base.refcnt);
   74|      0|    OPENSSL_free(decoder);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   75|      0|}
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:
  ------------------
  |  |  992|     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:
  ------------------
  |  |  993|     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:
  ------------------
  |  |  994|      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:
  ------------------
  |  |  995|      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:
  ------------------
  |  |  996|     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:
  ------------------
  |  |  997|     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:
  ------------------
  |  |  998|     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:
  ------------------
  |  |  999|     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:
  ------------------
  |  | 1000|     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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      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_get0_provider:
  461|   236k|{
  462|   236k|    if (!ossl_assert(decoder != NULL)) {
  ------------------
  |  |   52|   236k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   236k|    __FILE__, __LINE__)
  ------------------
  |  Branch (462:9): [True: 0, False: 236k]
  ------------------
  463|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  464|      0|        return 0;
  465|      0|    }
  466|       |
  467|   236k|    return decoder->base.prov;
  468|   236k|}
ossl_decoder_parsed_properties:
  482|    124|{
  483|    124|    if (!ossl_assert(decoder != NULL)) {
  ------------------
  |  |   52|    124|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|    124|    __FILE__, __LINE__)
  ------------------
  |  Branch (483:9): [True: 0, False: 124]
  ------------------
  484|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  485|      0|        return 0;
  486|      0|    }
  487|       |
  488|    124|    return decoder->base.parsed_propdef;
  489|    124|}
ossl_decoder_get_number:
  492|   132k|{
  493|   132k|    if (!ossl_assert(decoder != NULL)) {
  ------------------
  |  |   52|   132k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   132k|    __FILE__, __LINE__)
  ------------------
  |  Branch (493:9): [True: 0, False: 132k]
  ------------------
  494|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  495|      0|        return 0;
  496|      0|    }
  497|       |
  498|   132k|    return decoder->base.id;
  499|   132k|}
OSSL_DECODER_is_a:
  512|   126k|{
  513|   126k|    if (decoder->base.prov != NULL) {
  ------------------
  |  Branch (513:9): [True: 126k, False: 0]
  ------------------
  514|   126k|        OSSL_LIB_CTX *libctx = ossl_provider_libctx(decoder->base.prov);
  515|   126k|        OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  516|       |
  517|   126k|        return ossl_namemap_name2num(namemap, name) == decoder->base.id;
  518|   126k|    }
  519|      0|    return 0;
  520|   126k|}
ossl_decoder_fast_is_a:
  531|   133k|{
  532|   133k|    int id = *id_cache;
  533|       |
  534|   133k|    if (id <= 0)
  ------------------
  |  Branch (534:9): [True: 119k, False: 13.7k]
  ------------------
  535|   119k|        *id_cache = id = resolve_name(decoder, name);
  536|       |
  537|   133k|    return id > 0 && ossl_decoder_get_number(decoder) == id;
  ------------------
  |  Branch (537:12): [True: 132k, False: 344]
  |  Branch (537:22): [True: 126k, False: 6.13k]
  ------------------
  538|   133k|}
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|  14.6k|{
  630|  14.6k|    OSSL_DECODER_CTX *ctx;
  631|       |
  632|  14.6k|    ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|  14.6k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  633|  14.6k|    return ctx;
  634|  14.6k|}
OSSL_DECODER_CTX_free:
  666|  25.5k|{
  667|  25.5k|    if (ctx != NULL) {
  ------------------
  |  Branch (667:9): [True: 14.6k, False: 10.9k]
  ------------------
  668|  14.6k|        if (ctx->cleanup != NULL)
  ------------------
  |  Branch (668:13): [True: 14.6k, False: 0]
  ------------------
  669|  14.6k|            ctx->cleanup(ctx->construct_data);
  670|  14.6k|        sk_OSSL_DECODER_INSTANCE_pop_free(ctx->decoder_insts,
  671|  14.6k|            ossl_decoder_instance_free);
  672|  14.6k|        ossl_pw_clear_passphrase_data(&ctx->pwdata);
  673|  14.6k|        OPENSSL_free(ctx);
  ------------------
  |  |  132|  14.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  674|  14.6k|    }
  675|  25.5k|}
decoder_meth.c:ossl_decoder_new:
   39|     76|{
   40|     76|    OSSL_DECODER *decoder = NULL;
   41|       |
   42|     76|    if ((decoder = OPENSSL_zalloc(sizeof(*decoder))) == NULL)
  ------------------
  |  |  109|     76|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      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;
  ------------------
  |  |  317|      0|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      int code = unsupported ? ERR_R_UNSUPPORTED : ERR_R_FETCH_FAILED;
  ------------------
  |  |  318|      0|#define ERR_R_FETCH_FAILED (269 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      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,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_OSSL_DECODER, code,
  ------------------
  |  |  104|      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: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|     92|{
  113|     92|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DECODER_STORE_INDEX);
  ------------------
  |  |  108|     92|#define OSSL_LIB_CTX_DECODER_STORE_INDEX 11
  ------------------
  114|     92|}
decoder_meth.c:resolve_name:
  523|   119k|{
  524|   119k|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(decoder->base.prov);
  525|   119k|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  526|       |
  527|   119k|    return ossl_namemap_name2num(namemap, name);
  528|   119k|}
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_CTX_set_pem_password_cb:
   42|  3.73k|{
   43|  3.73k|    return ossl_pw_set_pem_password_cb(&ctx->pwdata, cb, cbarg);
   44|  3.73k|}
ossl_decoder_cache_new:
  774|      2|{
  775|      2|    DECODER_CACHE *cache = OPENSSL_malloc(sizeof(*cache));
  ------------------
  |  |  107|      2|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  776|       |
  777|      2|    if (cache == NULL)
  ------------------
  |  Branch (777:9): [True: 0, False: 2]
  ------------------
  778|      0|        return NULL;
  779|       |
  780|      2|    cache->lock = CRYPTO_THREAD_lock_new();
  781|      2|    if (cache->lock == NULL) {
  ------------------
  |  Branch (781:9): [True: 0, False: 2]
  ------------------
  782|      0|        OPENSSL_free(cache);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  783|      0|        return NULL;
  784|      0|    }
  785|      2|    cache->hashtable = lh_DECODER_CACHE_ENTRY_new(decoder_cache_entry_hash,
  786|      2|        decoder_cache_entry_cmp);
  787|      2|    if (cache->hashtable == NULL) {
  ------------------
  |  Branch (787:9): [True: 0, False: 2]
  ------------------
  788|      0|        CRYPTO_THREAD_lock_free(cache->lock);
  789|      0|        OPENSSL_free(cache);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  790|      0|        return NULL;
  791|      0|    }
  792|       |
  793|      2|    return cache;
  794|      2|}
OSSL_DECODER_CTX_new_for_pkey:
  836|  14.6k|{
  837|  14.6k|    OSSL_DECODER_CTX *ctx = NULL;
  838|  14.6k|    OSSL_PARAM decoder_params[] = {
  839|  14.6k|        OSSL_PARAM_END,
  ------------------
  |  |   25|  14.6k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  840|  14.6k|        OSSL_PARAM_END,
  ------------------
  |  |   25|  14.6k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  841|  14.6k|        OSSL_PARAM_END
  ------------------
  |  |   25|  14.6k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  842|  14.6k|    };
  843|  14.6k|    DECODER_CACHE *cache
  844|  14.6k|        = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DECODER_CACHE_INDEX);
  ------------------
  |  |  117|  14.6k|#define OSSL_LIB_CTX_DECODER_CACHE_INDEX 20
  ------------------
  845|  14.6k|    DECODER_CACHE_ENTRY cacheent, *res, *newcache = NULL;
  846|  14.6k|    int i = 0;
  847|       |
  848|  14.6k|    if (cache == NULL) {
  ------------------
  |  Branch (848:9): [True: 0, False: 14.6k]
  ------------------
  849|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  850|      0|        return NULL;
  851|      0|    }
  852|  14.6k|    if (input_structure != NULL)
  ------------------
  |  Branch (852:9): [True: 10.9k, False: 3.73k]
  ------------------
  853|  10.9k|        decoder_params[i++] = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_STRUCTURE,
  ------------------
  |  |  365|  10.9k|# define OSSL_OBJECT_PARAM_DATA_STRUCTURE "data-structure"
  ------------------
  854|  10.9k|            (char *)input_structure, 0);
  855|  14.6k|    if (propquery != NULL)
  ------------------
  |  Branch (855:9): [True: 0, False: 14.6k]
  ------------------
  856|      0|        decoder_params[i++] = OSSL_PARAM_construct_utf8_string(OSSL_DECODER_PARAM_PROPERTIES,
  ------------------
  |  |  221|      0|# define OSSL_DECODER_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
  |  |  ------------------
  |  |  |  |  130|      0|# define OSSL_ALG_PARAM_PROPERTIES "properties"
  |  |  ------------------
  ------------------
  857|      0|            (char *)propquery, 0);
  858|       |
  859|       |    /* It is safe to cast away the const here */
  860|  14.6k|    cacheent.input_type = (char *)input_type;
  861|  14.6k|    cacheent.input_structure = (char *)input_structure;
  862|  14.6k|    cacheent.keytype = (char *)keytype;
  863|  14.6k|    cacheent.selection = selection;
  864|  14.6k|    cacheent.propquery = (char *)propquery;
  865|       |
  866|  14.6k|    if (!CRYPTO_THREAD_read_lock(cache->lock)) {
  ------------------
  |  Branch (866:9): [True: 0, False: 14.6k]
  ------------------
  867|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  868|      0|        return NULL;
  869|      0|    }
  870|       |
  871|       |    /* First see if we have a template OSSL_DECODER_CTX */
  872|  14.6k|    res = lh_DECODER_CACHE_ENTRY_retrieve(cache->hashtable, &cacheent);
  873|       |
  874|  14.6k|    if (res == NULL) {
  ------------------
  |  Branch (874:9): [True: 2, False: 14.6k]
  ------------------
  875|       |        /*
  876|       |         * There is no template so we will have to construct one. This will be
  877|       |         * time consuming so release the lock and we will later upgrade it to a
  878|       |         * write lock.
  879|       |         */
  880|      2|        CRYPTO_THREAD_unlock(cache->lock);
  881|       |
  882|      2|        if ((ctx = OSSL_DECODER_CTX_new()) == NULL) {
  ------------------
  |  Branch (882:13): [True: 0, False: 2]
  ------------------
  883|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  884|      0|            return NULL;
  885|      0|        }
  886|       |
  887|      2|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|      2|    do {                           \
  |  |  220|      2|        BIO *trc_out = NULL;       \
  |  |  221|      2|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 2]
  |  |  ------------------
  ------------------
  888|      0|        {
  889|      0|            BIO_printf(trc_out,
  890|      0|                "(ctx %p) Looking for %s decoders with selection %d\n",
  891|      0|                (void *)ctx, keytype, selection);
  892|      0|            BIO_printf(trc_out, "    input type: %s, input structure: %s\n",
  893|      0|                input_type, input_structure);
  894|      0|        }
  895|      2|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|      2|    }                            \
  |  |  225|      2|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  896|       |
  897|      2|        if (OSSL_DECODER_CTX_set_input_type(ctx, input_type)
  ------------------
  |  Branch (897:13): [True: 2, False: 0]
  ------------------
  898|      2|            && OSSL_DECODER_CTX_set_input_structure(ctx, input_structure)
  ------------------
  |  Branch (898:16): [True: 2, False: 0]
  ------------------
  899|      2|            && OSSL_DECODER_CTX_set_selection(ctx, selection)
  ------------------
  |  Branch (899:16): [True: 2, False: 0]
  ------------------
  900|      2|            && ossl_decoder_ctx_setup_for_pkey(ctx, keytype, libctx, propquery)
  ------------------
  |  Branch (900:16): [True: 2, False: 0]
  ------------------
  901|      2|            && OSSL_DECODER_CTX_add_extra(ctx, libctx, propquery)
  ------------------
  |  Branch (901:16): [True: 2, False: 0]
  ------------------
  902|      2|            && (propquery == NULL
  ------------------
  |  Branch (902:17): [True: 2, False: 0]
  ------------------
  903|      2|                || OSSL_DECODER_CTX_set_params(ctx, decoder_params))) {
  ------------------
  |  Branch (903:20): [True: 0, False: 0]
  ------------------
  904|      2|            ctx->frozen = 1;
  905|      2|            OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|      2|    do {                           \
  |  |  220|      2|        BIO *trc_out = NULL;       \
  |  |  221|      2|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 2]
  |  |  ------------------
  ------------------
  906|      0|            {
  907|      0|                BIO_printf(trc_out, "(ctx %p) Got %d decoders\n",
  908|      0|                    (void *)ctx, OSSL_DECODER_CTX_get_num_decoders(ctx));
  909|      0|            }
  910|      2|            OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|      2|    }                            \
  |  |  225|      2|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  911|      2|        } else {
  912|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  913|      0|            OSSL_DECODER_CTX_free(ctx);
  914|      0|            return NULL;
  915|      0|        }
  916|       |
  917|      2|        newcache = OPENSSL_zalloc(sizeof(*newcache));
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  918|      2|        if (newcache == NULL) {
  ------------------
  |  Branch (918:13): [True: 0, False: 2]
  ------------------
  919|      0|            OSSL_DECODER_CTX_free(ctx);
  920|      0|            return NULL;
  921|      0|        }
  922|       |
  923|      2|        if (input_type != NULL) {
  ------------------
  |  Branch (923:13): [True: 2, False: 0]
  ------------------
  924|      2|            newcache->input_type = OPENSSL_strdup(input_type);
  ------------------
  |  |  136|      2|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  925|      2|            if (newcache->input_type == NULL)
  ------------------
  |  Branch (925:17): [True: 0, False: 2]
  ------------------
  926|      0|                goto err;
  927|      2|        }
  928|      2|        if (input_structure != NULL) {
  ------------------
  |  Branch (928:13): [True: 1, False: 1]
  ------------------
  929|      1|            newcache->input_structure = OPENSSL_strdup(input_structure);
  ------------------
  |  |  136|      1|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  930|      1|            if (newcache->input_structure == NULL)
  ------------------
  |  Branch (930:17): [True: 0, False: 1]
  ------------------
  931|      0|                goto err;
  932|      1|        }
  933|      2|        if (keytype != NULL) {
  ------------------
  |  Branch (933:13): [True: 1, False: 1]
  ------------------
  934|      1|            newcache->keytype = OPENSSL_strdup(keytype);
  ------------------
  |  |  136|      1|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  935|      1|            if (newcache->keytype == NULL)
  ------------------
  |  Branch (935:17): [True: 0, False: 1]
  ------------------
  936|      0|                goto err;
  937|      1|        }
  938|      2|        if (propquery != NULL) {
  ------------------
  |  Branch (938:13): [True: 0, False: 2]
  ------------------
  939|      0|            newcache->propquery = OPENSSL_strdup(propquery);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  940|      0|            if (newcache->propquery == NULL)
  ------------------
  |  Branch (940:17): [True: 0, False: 0]
  ------------------
  941|      0|                goto err;
  942|      0|        }
  943|      2|        newcache->selection = selection;
  944|      2|        newcache->template = ctx;
  945|       |
  946|      2|        if (!CRYPTO_THREAD_write_lock(cache->lock)) {
  ------------------
  |  Branch (946:13): [True: 0, False: 2]
  ------------------
  947|      0|            ctx = NULL;
  948|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  949|      0|            goto err;
  950|      0|        }
  951|      2|        res = lh_DECODER_CACHE_ENTRY_retrieve(cache->hashtable, &cacheent);
  952|      2|        if (res == NULL) {
  ------------------
  |  Branch (952:13): [True: 2, False: 0]
  ------------------
  953|      2|            (void)lh_DECODER_CACHE_ENTRY_insert(cache->hashtable, newcache);
  954|      2|            if (lh_DECODER_CACHE_ENTRY_error(cache->hashtable)) {
  ------------------
  |  Branch (954:17): [True: 0, False: 2]
  ------------------
  955|      0|                ctx = NULL;
  956|      0|                CRYPTO_THREAD_unlock(cache->lock);
  957|      0|                ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  958|      0|                goto err;
  959|      0|            }
  960|      2|        } else {
  961|       |            /*
  962|       |             * We raced with another thread to construct this and lost. Free
  963|       |             * what we just created and use the entry from the hashtable instead
  964|       |             */
  965|      0|            decoder_cache_entry_free(newcache);
  966|      0|            ctx = res->template;
  967|      0|        }
  968|  14.6k|    } else {
  969|  14.6k|        ctx = res->template;
  970|  14.6k|    }
  971|       |
  972|  14.6k|    ctx = ossl_decoder_ctx_for_pkey_dup(ctx, pkey, input_type, input_structure);
  973|  14.6k|    CRYPTO_THREAD_unlock(cache->lock);
  974|       |
  975|  14.6k|    return ctx;
  976|      0|err:
  977|      0|    decoder_cache_entry_free(newcache);
  978|      0|    OSSL_DECODER_CTX_free(ctx);
  979|       |    return NULL;
  980|  14.6k|}
decoder_pkey.c:decoder_cache_entry_hash:
  704|  14.6k|{
  705|  14.6k|    unsigned long hash = 17;
  706|       |
  707|  14.6k|    hash = (hash * 23)
  708|  14.6k|        + (cache->propquery == NULL
  ------------------
  |  Branch (708:12): [True: 14.6k, False: 0]
  ------------------
  709|  14.6k|                ? 0
  710|  14.6k|                : ossl_lh_strcasehash(cache->propquery));
  711|  14.6k|    hash = (hash * 23)
  712|  14.6k|        + (cache->input_structure == NULL
  ------------------
  |  Branch (712:12): [True: 3.73k, False: 10.9k]
  ------------------
  713|  14.6k|                ? 0
  714|  14.6k|                : ossl_lh_strcasehash(cache->input_structure));
  715|  14.6k|    hash = (hash * 23)
  716|  14.6k|        + (cache->input_type == NULL
  ------------------
  |  Branch (716:12): [True: 0, False: 14.6k]
  ------------------
  717|  14.6k|                ? 0
  718|  14.6k|                : ossl_lh_strcasehash(cache->input_type));
  719|  14.6k|    hash = (hash * 23)
  720|  14.6k|        + (cache->keytype == NULL
  ------------------
  |  Branch (720:12): [True: 3.73k, False: 10.9k]
  ------------------
  721|  14.6k|                ? 0
  722|  14.6k|                : ossl_lh_strcasehash(cache->keytype));
  723|       |
  724|  14.6k|    hash ^= cache->selection;
  725|       |
  726|  14.6k|    return hash;
  727|  14.6k|}
decoder_pkey.c:decoder_cache_entry_cmp:
  750|  14.6k|{
  751|  14.6k|    int cmp;
  752|       |
  753|  14.6k|    if (a->selection != b->selection)
  ------------------
  |  Branch (753:9): [True: 0, False: 14.6k]
  ------------------
  754|      0|        return (a->selection < b->selection) ? -1 : 1;
  ------------------
  |  Branch (754:16): [True: 0, False: 0]
  ------------------
  755|       |
  756|  14.6k|    cmp = nullstrcmp(a->keytype, b->keytype, 1);
  757|  14.6k|    if (cmp != 0)
  ------------------
  |  Branch (757:9): [True: 0, False: 14.6k]
  ------------------
  758|      0|        return cmp;
  759|       |
  760|  14.6k|    cmp = nullstrcmp(a->input_type, b->input_type, 1);
  761|  14.6k|    if (cmp != 0)
  ------------------
  |  Branch (761:9): [True: 0, False: 14.6k]
  ------------------
  762|      0|        return cmp;
  763|       |
  764|  14.6k|    cmp = nullstrcmp(a->input_structure, b->input_structure, 1);
  765|  14.6k|    if (cmp != 0)
  ------------------
  |  Branch (765:9): [True: 0, False: 14.6k]
  ------------------
  766|      0|        return cmp;
  767|       |
  768|  14.6k|    cmp = nullstrcmp(a->propquery, b->propquery, 0);
  769|       |
  770|  14.6k|    return cmp;
  771|  14.6k|}
decoder_pkey.c:nullstrcmp:
  730|  58.5k|{
  731|  58.5k|    if (a == NULL || b == NULL) {
  ------------------
  |  Branch (731:9): [True: 22.1k, False: 36.4k]
  |  Branch (731:22): [True: 0, False: 36.4k]
  ------------------
  732|  22.1k|        if (a == NULL) {
  ------------------
  |  Branch (732:13): [True: 22.1k, False: 0]
  ------------------
  733|  22.1k|            if (b == NULL)
  ------------------
  |  Branch (733:17): [True: 22.1k, False: 0]
  ------------------
  734|  22.1k|                return 0;
  735|      0|            else
  736|      0|                return 1;
  737|  22.1k|        } else {
  738|      0|            return -1;
  739|      0|        }
  740|  36.4k|    } else {
  741|  36.4k|        if (casecmp)
  ------------------
  |  Branch (741:13): [True: 36.4k, False: 0]
  ------------------
  742|  36.4k|            return OPENSSL_strcasecmp(a, b);
  743|      0|        else
  744|      0|            return strcmp(a, b);
  745|  36.4k|    }
  746|  58.5k|}
decoder_pkey.c:ossl_decoder_ctx_setup_for_pkey:
  444|      2|{
  445|      2|    int ok = 0;
  446|      2|    struct decoder_pkey_data_st *process_data = NULL;
  447|      2|    struct collect_data_st collect_data = { NULL };
  448|      2|    STACK_OF(EVP_KEYMGMT) *keymgmts = NULL;
  ------------------
  |  |   33|      2|#define STACK_OF(type) struct stack_st_##type
  ------------------
  449|      2|    OSSL_PROPERTY_LIST **plp;
  450|      2|    OSSL_PROPERTY_LIST *pq = NULL, *p2 = NULL;
  451|       |
  452|      2|    OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|      2|    do {                           \
  |  |  220|      2|        BIO *trc_out = NULL;       \
  |  |  221|      2|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 2]
  |  |  ------------------
  ------------------
  453|      0|    {
  454|      0|        const char *input_type = ctx->start_input_type;
  455|      0|        const char *input_structure = ctx->input_structure;
  456|       |
  457|      0|        BIO_printf(trc_out,
  458|      0|            "(ctx %p) Looking for decoders producing %s%s%s%s%s%s\n",
  459|      0|            (void *)ctx,
  460|      0|            keytype != NULL ? keytype : "",
  ------------------
  |  Branch (460:13): [True: 0, False: 0]
  ------------------
  461|      0|            keytype != NULL ? " keys" : "keys of any type",
  ------------------
  |  Branch (461:13): [True: 0, False: 0]
  ------------------
  462|      0|            input_type != NULL ? " from " : "",
  ------------------
  |  Branch (462:13): [True: 0, False: 0]
  ------------------
  463|      0|            input_type != NULL ? input_type : "",
  ------------------
  |  Branch (463:13): [True: 0, False: 0]
  ------------------
  464|      0|            input_structure != NULL ? " with " : "",
  ------------------
  |  Branch (464:13): [True: 0, False: 0]
  ------------------
  465|      0|            input_structure != NULL ? input_structure : "");
  ------------------
  |  Branch (465:13): [True: 0, False: 0]
  ------------------
  466|      0|    }
  467|      2|    OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|      2|    }                            \
  |  |  225|      2|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  468|       |
  469|       |    /* Allocate data. */
  470|      2|    if ((process_data = OPENSSL_zalloc(sizeof(*process_data))) == NULL)
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (470:9): [True: 0, False: 2]
  ------------------
  471|      0|        goto err;
  472|      2|    if ((propquery != NULL
  ------------------
  |  Branch (472:10): [True: 0, False: 2]
  ------------------
  473|      0|            && (process_data->propq = OPENSSL_strdup(propquery)) == NULL))
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (473:16): [True: 0, False: 0]
  ------------------
  474|      0|        goto err;
  475|       |
  476|       |    /* Allocate our list of EVP_KEYMGMTs. */
  477|      2|    keymgmts = sk_EVP_KEYMGMT_new_null();
  478|      2|    if (keymgmts == NULL) {
  ------------------
  |  Branch (478:9): [True: 0, False: 2]
  ------------------
  479|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  480|      0|        goto err;
  481|      0|    }
  482|       |
  483|      2|    process_data->object = NULL;
  484|      2|    process_data->libctx = libctx;
  485|      2|    process_data->selection = ctx->selection;
  486|      2|    process_data->keymgmts = keymgmts;
  487|       |
  488|       |    /*
  489|       |     * Collect passed and default properties to prioritize the decoders.
  490|       |     */
  491|      2|    if (propquery != NULL)
  ------------------
  |  Branch (491:9): [True: 0, False: 2]
  ------------------
  492|      0|        p2 = pq = ossl_parse_query(libctx, propquery, 1);
  493|       |
  494|      2|    plp = ossl_ctx_global_properties(libctx, 0);
  495|      2|    if (plp != NULL && *plp != NULL) {
  ------------------
  |  Branch (495:9): [True: 2, False: 0]
  |  Branch (495:24): [True: 0, False: 2]
  ------------------
  496|      0|        if (pq == NULL) {
  ------------------
  |  Branch (496:13): [True: 0, False: 0]
  ------------------
  497|      0|            pq = *plp;
  498|      0|        } else {
  499|      0|            p2 = ossl_property_merge(pq, *plp);
  500|      0|            ossl_property_free(pq);
  501|      0|            if (p2 == NULL)
  ------------------
  |  Branch (501:17): [True: 0, False: 0]
  ------------------
  502|      0|                goto err;
  503|      0|            pq = p2;
  504|      0|        }
  505|      0|    }
  506|       |
  507|       |    /*
  508|       |     * Enumerate all keymgmts into a stack.
  509|       |     *
  510|       |     * We could nest EVP_KEYMGMT_do_all_provided inside
  511|       |     * OSSL_DECODER_do_all_provided or vice versa but these functions become
  512|       |     * bottlenecks if called repeatedly, which is why we collect the
  513|       |     * EVP_KEYMGMTs into a stack here and call both functions only once.
  514|       |     *
  515|       |     * We resolve the keytype string to a name ID so we don't have to resolve it
  516|       |     * multiple times, avoiding repeated calls to EVP_KEYMGMT_is_a, which is a
  517|       |     * performance bottleneck. However, we do this lazily on the first call to
  518|       |     * collect_keymgmt made by EVP_KEYMGMT_do_all_provided, rather than do it
  519|       |     * upfront, as this ensures that the names for all loaded providers have
  520|       |     * been registered by the time we try to resolve the keytype string.
  521|       |     */
  522|      2|    collect_data.ctx = ctx;
  523|      2|    collect_data.libctx = libctx;
  524|      2|    collect_data.keymgmts = keymgmts;
  525|      2|    collect_data.keytype = keytype;
  526|      2|    collect_data.pq = pq;
  527|      2|    EVP_KEYMGMT_do_all_provided(libctx, collect_keymgmt, &collect_data);
  528|       |
  529|      2|    if (collect_data.error_occurred)
  ------------------
  |  Branch (529:9): [True: 0, False: 2]
  ------------------
  530|      0|        goto err;
  531|       |
  532|       |    /* Enumerate all matching decoders. */
  533|      2|    OSSL_DECODER_do_all_provided(libctx, collect_decoder, &collect_data);
  534|       |
  535|      2|    if (collect_data.error_occurred)
  ------------------
  |  Branch (535:9): [True: 0, False: 2]
  ------------------
  536|      0|        goto err;
  537|       |
  538|      2|    OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|      2|    do {                           \
  |  |  220|      2|        BIO *trc_out = NULL;       \
  |  |  221|      2|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 2]
  |  |  ------------------
  ------------------
  539|      0|    {
  540|      0|        BIO_printf(trc_out,
  541|      0|            "(ctx %p) Got %d decoders producing keys\n",
  542|      0|            (void *)ctx, collect_data.total);
  543|      0|    }
  544|      2|    OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|      2|    }                            \
  |  |  225|      2|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  545|       |
  546|       |    /*
  547|       |     * Finish initializing the decoder context. If one or more decoders matched
  548|       |     * above then the number of decoders attached to the OSSL_DECODER_CTX will
  549|       |     * be nonzero. Else nothing was found and we do nothing.
  550|       |     */
  551|      2|    if (OSSL_DECODER_CTX_get_num_decoders(ctx) != 0) {
  ------------------
  |  Branch (551:9): [True: 2, False: 0]
  ------------------
  552|      2|        if (!OSSL_DECODER_CTX_set_construct(ctx, decoder_construct_pkey)
  ------------------
  |  Branch (552:13): [True: 0, False: 2]
  ------------------
  553|      2|            || !OSSL_DECODER_CTX_set_construct_data(ctx, process_data)
  ------------------
  |  Branch (553:16): [True: 0, False: 2]
  ------------------
  554|      2|            || !OSSL_DECODER_CTX_set_cleanup(ctx,
  ------------------
  |  Branch (554:16): [True: 0, False: 2]
  ------------------
  555|      2|                decoder_clean_pkey_construct_arg))
  556|      0|            goto err;
  557|       |
  558|      2|        process_data = NULL; /* Avoid it being freed */
  559|      2|    }
  560|       |
  561|      2|    ok = 1;
  562|      2|err:
  563|      2|    decoder_clean_pkey_construct_arg(process_data);
  564|      2|    ossl_property_free(p2);
  565|      2|    return ok;
  566|      2|}
decoder_pkey.c:collect_keymgmt:
  406|     84|{
  407|     84|    struct collect_data_st *data = arg;
  408|       |
  409|     84|    if (!check_keymgmt(keymgmt, data))
  ------------------
  |  Branch (409:9): [True: 40, False: 44]
  ------------------
  410|     40|        return;
  411|       |
  412|       |    /*
  413|       |     * We have to ref EVP_KEYMGMT here because in the success case,
  414|       |     * data->keymgmts is referenced by the constructor we register in the
  415|       |     * OSSL_DECODER_CTX. The registered cleanup function
  416|       |     * (decoder_clean_pkey_construct_arg) unrefs every element of the stack and
  417|       |     * frees it.
  418|       |     */
  419|     44|    if (!EVP_KEYMGMT_up_ref(keymgmt))
  ------------------
  |  Branch (419:9): [True: 0, False: 44]
  ------------------
  420|      0|        return;
  421|       |
  422|     44|    OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|     44|    do {                           \
  |  |  220|     44|        BIO *trc_out = NULL;       \
  |  |  221|     44|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 44]
  |  |  ------------------
  ------------------
  423|      0|    {
  424|      0|        BIO_printf(trc_out,
  425|      0|            "(Collecting KeyManager %s %s [id %d]:\n",
  426|      0|            keymgmt->description, keymgmt->type_name, keymgmt->id);
  427|      0|    }
  428|     44|    OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|     44|    }                            \
  |  |  225|     44|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 44]
  |  |  ------------------
  ------------------
  429|     44|    if (sk_EVP_KEYMGMT_push(data->keymgmts, keymgmt) <= 0) {
  ------------------
  |  Branch (429:9): [True: 0, False: 44]
  ------------------
  430|      0|        EVP_KEYMGMT_free(keymgmt);
  431|      0|        data->error_occurred = 1;
  432|      0|    }
  433|     44|}
decoder_pkey.c:check_keymgmt:
  367|     84|{
  368|       |    /* If no keytype was specified, everything matches. */
  369|     84|    if (data->keytype == NULL)
  ------------------
  |  Branch (369:9): [True: 42, False: 42]
  ------------------
  370|     42|        return 1;
  371|       |
  372|     42|    if (!data->keytype_resolved) {
  ------------------
  |  Branch (372:9): [True: 1, False: 41]
  ------------------
  373|       |        /* We haven't cached the IDs from the keytype string yet. */
  374|      1|        OSSL_NAMEMAP *namemap = ossl_namemap_stored(data->libctx);
  375|      1|        data->keytype_id = ossl_namemap_name2num(namemap, data->keytype);
  376|       |
  377|       |        /*
  378|       |         * If keytype is a value ambiguously used for both EC and SM2,
  379|       |         * collect the ID for SM2 as well.
  380|       |         */
  381|      1|        if (data->keytype_id != 0
  ------------------
  |  Branch (381:13): [True: 1, False: 0]
  ------------------
  382|      1|            && (strcmp(data->keytype, "id-ecPublicKey") == 0
  ------------------
  |  Branch (382:17): [True: 1, False: 0]
  ------------------
  383|      0|                || strcmp(data->keytype, "1.2.840.10045.2.1") == 0))
  ------------------
  |  Branch (383:20): [True: 0, False: 0]
  ------------------
  384|      1|            data->sm2_id = ossl_namemap_name2num(namemap, "SM2");
  385|       |
  386|       |        /*
  387|       |         * If keytype_id is zero the name was not found, but we still
  388|       |         * set keytype_resolved to avoid trying all this again.
  389|       |         */
  390|      1|        data->keytype_resolved = 1;
  391|      1|    }
  392|       |
  393|       |    /* Specified keytype could not be resolved, so nothing matches. */
  394|     42|    if (data->keytype_id == 0)
  ------------------
  |  Branch (394:9): [True: 0, False: 42]
  ------------------
  395|      0|        return 0;
  396|       |
  397|       |    /* Does not match the keytype specified, so skip. */
  398|     42|    if (keymgmt->name_id != data->keytype_id
  ------------------
  |  Branch (398:9): [True: 41, False: 1]
  ------------------
  399|     41|        && keymgmt->name_id != data->sm2_id)
  ------------------
  |  Branch (399:12): [True: 40, False: 1]
  ------------------
  400|     40|        return 0;
  401|       |
  402|      2|    return 1;
  403|     42|}
decoder_pkey.c:collect_decoder:
  315|    152|{
  316|    152|    struct collect_data_st *data = arg;
  317|    152|    STACK_OF(EVP_KEYMGMT) *keymgmts = data->keymgmts;
  ------------------
  |  |   33|    152|#define STACK_OF(type) struct stack_st_##type
  ------------------
  318|    152|    int i, end_i;
  319|    152|    EVP_KEYMGMT *keymgmt;
  320|    152|    const OSSL_PROVIDER *prov;
  321|    152|    void *provctx;
  322|       |
  323|    152|    if (data->error_occurred)
  ------------------
  |  Branch (323:9): [True: 0, False: 152]
  ------------------
  324|      0|        return;
  325|       |
  326|    152|    prov = OSSL_DECODER_get0_provider(decoder);
  327|    152|    provctx = OSSL_PROVIDER_get0_provider_ctx(prov);
  328|       |
  329|       |    /*
  330|       |     * Either the caller didn't give us a selection, or if they did, the decoder
  331|       |     * must tell us if it supports that selection to be accepted. If the decoder
  332|       |     * doesn't have |does_selection|, it's seen as taking anything.
  333|       |     */
  334|    152|    if (decoder->does_selection != NULL
  ------------------
  |  Branch (334:9): [True: 146, False: 6]
  ------------------
  335|    146|        && !decoder->does_selection(provctx, data->ctx->selection))
  ------------------
  |  Branch (335:12): [True: 71, False: 75]
  ------------------
  336|     71|        return;
  337|       |
  338|     81|    OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|     81|    do {                           \
  |  |  220|     81|        BIO *trc_out = NULL;       \
  |  |  221|     81|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 81]
  |  |  ------------------
  ------------------
  339|      0|    {
  340|      0|        BIO_printf(trc_out,
  341|      0|            "(ctx %p) Checking out decoder %p (%s):\n"
  342|      0|            "    %s with %s\n",
  343|      0|            (void *)data->ctx, (void *)decoder,
  344|      0|            OSSL_DECODER_get0_description(decoder),
  345|      0|            OSSL_DECODER_get0_name(decoder),
  346|      0|            OSSL_DECODER_get0_properties(decoder));
  347|      0|    }
  348|     81|    OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|     81|    }                            \
  |  |  225|     81|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 81]
  |  |  ------------------
  ------------------
  349|       |
  350|     81|    end_i = sk_EVP_KEYMGMT_num(keymgmts);
  351|    952|    for (i = 0; i < end_i; ++i) {
  ------------------
  |  Branch (351:17): [True: 909, False: 43]
  ------------------
  352|    909|        keymgmt = sk_EVP_KEYMGMT_value(keymgmts, i);
  353|       |
  354|       |        /* Only add this decoder once */
  355|    909|        if (collect_decoder_keymgmt(keymgmt, decoder, provctx, data))
  ------------------
  |  Branch (355:13): [True: 38, False: 871]
  ------------------
  356|     38|            break;
  357|    871|        if (data->error_occurred)
  ------------------
  |  Branch (357:13): [True: 0, False: 871]
  ------------------
  358|      0|            return;
  359|    871|    }
  360|     81|}
decoder_pkey.c:collect_decoder_keymgmt:
  237|    909|{
  238|    909|    void *decoderctx = NULL;
  239|    909|    OSSL_DECODER_INSTANCE *di = NULL;
  240|    909|    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|    909|    if (keymgmt->name_id != decoder->base.id)
  ------------------
  |  Branch (247:9): [True: 867, False: 42]
  ------------------
  248|       |        /* Mismatch is not an error, continue. */
  249|    867|        return 0;
  250|       |
  251|     42|    if ((decoderctx = decoder->newctx(provctx)) == NULL) {
  ------------------
  |  Branch (251:9): [True: 0, False: 42]
  ------------------
  252|      0|        data->error_occurred = 1;
  253|      0|        return 0;
  254|      0|    }
  255|       |
  256|     42|    if ((di = ossl_decoder_instance_new(decoder, decoderctx)) == NULL) {
  ------------------
  |  Branch (256:9): [True: 0, False: 42]
  ------------------
  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|     42|    if (data->ctx->start_input_type != NULL
  ------------------
  |  Branch (266:9): [True: 42, False: 0]
  ------------------
  267|     42|        && di->input_type != NULL
  ------------------
  |  Branch (267:12): [True: 42, False: 0]
  ------------------
  268|     42|        && OPENSSL_strcasecmp(di->input_type, data->ctx->start_input_type) != 0
  ------------------
  |  Branch (268:12): [True: 40, False: 2]
  ------------------
  269|     40|        && (OPENSSL_strcasecmp(di->input_type, "DER") != 0
  ------------------
  |  Branch (269:13): [True: 4, False: 36]
  ------------------
  270|     36|            || OPENSSL_strcasecmp(data->ctx->start_input_type, "PEM") != 0)) {
  ------------------
  |  Branch (270:16): [True: 0, False: 36]
  ------------------
  271|       |        /* Mismatch is not an error, continue. */
  272|      4|        ossl_decoder_instance_free(di);
  273|      4|        return 0;
  274|      4|    }
  275|       |
  276|     38|    OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  219|     38|    do {                           \
  |  |  220|     38|        BIO *trc_out = NULL;       \
  |  |  221|     38|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 38]
  |  |  ------------------
  ------------------
  277|      0|    {
  278|      0|        BIO_printf(trc_out,
  279|      0|            "(ctx %p) Checking out decoder %p (%s):\n"
  280|      0|            "    %s with %s\n",
  281|      0|            (void *)data->ctx, (void *)decoder,
  282|      0|            OSSL_DECODER_get0_description(decoder),
  283|      0|            OSSL_DECODER_get0_name(decoder),
  284|      0|            OSSL_DECODER_get0_properties(decoder));
  285|      0|    }
  286|     38|    OSSL_TRACE_END(DECODER);
  ------------------
  |  |  224|     38|    }                            \
  |  |  225|     38|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 38]
  |  |  ------------------
  ------------------
  287|       |
  288|       |    /*
  289|       |     * Get the property match score so the decoders can be prioritized later.
  290|       |     */
  291|     38|    props = ossl_decoder_parsed_properties(decoder);
  292|     38|    if (data->pq != NULL && props != NULL) {
  ------------------
  |  Branch (292:9): [True: 0, False: 38]
  |  Branch (292:29): [True: 0, False: 0]
  ------------------
  293|      0|        di->score = ossl_property_match_count(data->pq, props);
  294|       |        /*
  295|       |         * Mismatch of mandatory properties is not an error, the decoder is just
  296|       |         * ignored, continue.
  297|       |         */
  298|      0|        if (di->score < 0) {
  ------------------
  |  Branch (298:13): [True: 0, False: 0]
  ------------------
  299|      0|            ossl_decoder_instance_free(di);
  300|      0|            return 0;
  301|      0|        }
  302|      0|    }
  303|       |
  304|     38|    if (!ossl_decoder_ctx_add_decoder_inst(data->ctx, di)) {
  ------------------
  |  Branch (304:9): [True: 0, False: 38]
  ------------------
  305|      0|        ossl_decoder_instance_free(di);
  306|      0|        data->error_occurred = 1;
  307|      0|        return 0;
  308|      0|    }
  309|       |
  310|     38|    ++data->total;
  311|     38|    return 1;
  312|     38|}
decoder_pkey.c:decoder_construct_pkey:
   74|  29.3k|{
   75|  29.3k|    struct decoder_pkey_data_st *data = construct_data;
   76|  29.3k|    OSSL_DECODER *decoder = OSSL_DECODER_INSTANCE_get_decoder(decoder_inst);
   77|  29.3k|    void *decoderctx = OSSL_DECODER_INSTANCE_get_decoder_ctx(decoder_inst);
   78|  29.3k|    const OSSL_PROVIDER *decoder_prov = OSSL_DECODER_get0_provider(decoder);
   79|  29.3k|    EVP_KEYMGMT *keymgmt = NULL;
   80|  29.3k|    const OSSL_PROVIDER *keymgmt_prov = NULL;
   81|  29.3k|    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|  29.3k|    void *object_ref = NULL;
   91|  29.3k|    size_t object_ref_sz = 0;
   92|  29.3k|    const OSSL_PARAM *p;
   93|       |
   94|  29.3k|    p = OSSL_PARAM_locate_const(params, OSSL_OBJECT_PARAM_DATA_TYPE);
  ------------------
  |  |  366|  29.3k|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
   95|  29.3k|    if (p != NULL) {
  ------------------
  |  Branch (95:9): [True: 29.3k, False: 0]
  ------------------
   96|  29.3k|        char *object_type = NULL;
   97|       |
   98|  29.3k|        if (!OSSL_PARAM_get_utf8_string(p, &object_type, 0))
  ------------------
  |  Branch (98:13): [True: 0, False: 29.3k]
  ------------------
   99|      0|            return 0;
  100|  29.3k|        OPENSSL_free(data->object_type);
  ------------------
  |  |  132|  29.3k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  101|  29.3k|        data->object_type = object_type;
  102|  29.3k|    }
  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|  29.3k|    p = OSSL_PARAM_locate_const(params, OSSL_OBJECT_PARAM_REFERENCE);
  ------------------
  |  |  369|  29.3k|# define OSSL_OBJECT_PARAM_REFERENCE "reference"
  ------------------
  110|  29.3k|    if (p == NULL || p->data_type != OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|  14.6k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (110:9): [True: 14.6k, False: 14.6k]
  |  Branch (110:22): [True: 0, False: 14.6k]
  ------------------
  111|  14.6k|        return 0;
  112|  14.6k|    object_ref = p->data;
  113|  14.6k|    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|  14.6k|    end = sk_EVP_KEYMGMT_num(data->keymgmts);
  120|  29.5k|    for (i = 0; i < end; i++) {
  ------------------
  |  Branch (120:17): [True: 29.5k, False: 0]
  ------------------
  121|  29.5k|        keymgmt = sk_EVP_KEYMGMT_value(data->keymgmts, i);
  122|  29.5k|        keymgmt_prov = EVP_KEYMGMT_get0_provider(keymgmt);
  123|       |
  124|  29.5k|        if (keymgmt_prov == decoder_prov
  ------------------
  |  Branch (124:13): [True: 29.5k, False: 0]
  ------------------
  125|  29.5k|            && evp_keymgmt_has_load(keymgmt)
  ------------------
  |  Branch (125:16): [True: 29.5k, False: 0]
  ------------------
  126|  29.5k|            && EVP_KEYMGMT_is_a(keymgmt, data->object_type))
  ------------------
  |  Branch (126:16): [True: 14.6k, False: 14.9k]
  ------------------
  127|  14.6k|            break;
  128|  29.5k|    }
  129|  14.6k|    if (i < end) {
  ------------------
  |  Branch (129:9): [True: 14.6k, False: 0]
  ------------------
  130|       |        /* To allow it to be freed further down */
  131|  14.6k|        if (!EVP_KEYMGMT_up_ref(keymgmt))
  ------------------
  |  Branch (131:13): [True: 0, False: 14.6k]
  ------------------
  132|      0|            return 0;
  133|  14.6k|    } 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|  14.6k|    if (keymgmt != NULL) {
  ------------------
  |  Branch (140:9): [True: 14.6k, False: 0]
  ------------------
  141|  14.6k|        EVP_PKEY *pkey = NULL;
  142|  14.6k|        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|  14.6k|        if (keymgmt_prov == decoder_prov) {
  ------------------
  |  Branch (152:13): [True: 14.6k, False: 0]
  ------------------
  153|  14.6k|            keydata = evp_keymgmt_load(keymgmt, object_ref, object_ref_sz);
  154|  14.6k|        } 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;
  ------------------
  |  |  658|      0|    (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  ------------------
  |  |  |  |  656|      0|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  |  |  ------------------
  |  |  |  |  |  |  646|      0|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  |  |  ------------------
  |  |  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  |  |  ------------------
  |  |  |  |  |  |  647|      0|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  ------------------
  |  |  |  |  653|      0|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  |  |  ------------------
  |  |  |  |  |  |  648|      0|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  |  |  ------------------
  |  |  |  |  654|      0|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  649|      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|  14.6k|        if (keydata == NULL)
  ------------------
  |  Branch (182:13): [True: 0, False: 14.6k]
  ------------------
  183|      0|            ossl_decoder_ctx_set_harderr(data->ctx);
  184|       |
  185|  14.6k|        if (keydata != NULL
  ------------------
  |  Branch (185:13): [True: 14.6k, False: 0]
  ------------------
  186|  14.6k|            && (pkey = evp_keymgmt_util_make_pkey(keymgmt, keydata)) == NULL)
  ------------------
  |  Branch (186:16): [True: 0, False: 14.6k]
  ------------------
  187|      0|            evp_keymgmt_freedata(keymgmt, keydata);
  188|       |
  189|  14.6k|        *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|  14.6k|        EVP_KEYMGMT_free(keymgmt);
  196|  14.6k|    }
  197|       |    /*
  198|       |     * We successfully looked through, |*ctx->object| determines if we
  199|       |     * actually found something.
  200|       |     */
  201|       |    return (*data->object != NULL);
  202|  14.6k|}
decoder_pkey.c:decoder_clean_pkey_construct_arg:
  205|  14.6k|{
  206|  14.6k|    struct decoder_pkey_data_st *data = construct_data;
  207|       |
  208|  14.6k|    if (data != NULL) {
  ------------------
  |  Branch (208:9): [True: 14.6k, False: 2]
  ------------------
  209|  14.6k|        sk_EVP_KEYMGMT_pop_free(data->keymgmts, EVP_KEYMGMT_free);
  210|  14.6k|        OPENSSL_free(data->propq);
  ------------------
  |  |  132|  14.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  211|  14.6k|        OPENSSL_free(data->object_type);
  ------------------
  |  |  132|  14.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  212|  14.6k|        OPENSSL_free(data);
  ------------------
  |  |  132|  14.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  213|  14.6k|    }
  214|  14.6k|}
decoder_pkey.c:ossl_decoder_ctx_for_pkey_dup:
  588|  14.6k|{
  589|  14.6k|    OSSL_DECODER_CTX *dest;
  590|  14.6k|    struct decoder_pkey_data_st *process_data_src, *process_data_dest = NULL;
  591|       |
  592|  14.6k|    if (src == NULL)
  ------------------
  |  Branch (592:9): [True: 0, False: 14.6k]
  ------------------
  593|      0|        return NULL;
  594|       |
  595|  14.6k|    if ((dest = OSSL_DECODER_CTX_new()) == NULL) {
  ------------------
  |  Branch (595:9): [True: 0, False: 14.6k]
  ------------------
  596|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  597|      0|        return NULL;
  598|      0|    }
  599|       |
  600|  14.6k|    if (!OSSL_DECODER_CTX_set_input_type(dest, input_type)
  ------------------
  |  Branch (600:9): [True: 0, False: 14.6k]
  ------------------
  601|  14.6k|        || !OSSL_DECODER_CTX_set_input_structure(dest, input_structure)) {
  ------------------
  |  Branch (601:12): [True: 0, False: 14.6k]
  ------------------
  602|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  603|      0|        goto err;
  604|      0|    }
  605|  14.6k|    dest->selection = src->selection;
  606|       |
  607|  14.6k|    if (src->decoder_insts != NULL) {
  ------------------
  |  Branch (607:9): [True: 14.6k, False: 0]
  ------------------
  608|  14.6k|        dest->decoder_insts
  609|  14.6k|            = sk_OSSL_DECODER_INSTANCE_deep_copy(src->decoder_insts,
  610|  14.6k|                ossl_decoder_instance_dup,
  611|  14.6k|                ossl_decoder_instance_free);
  612|  14.6k|        if (dest->decoder_insts == NULL) {
  ------------------
  |  Branch (612:13): [True: 0, False: 14.6k]
  ------------------
  613|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  614|      0|            goto err;
  615|      0|        }
  616|  14.6k|    }
  617|       |
  618|  14.6k|    if (!OSSL_DECODER_CTX_set_construct(dest,
  ------------------
  |  Branch (618:9): [True: 0, False: 14.6k]
  ------------------
  619|  14.6k|            OSSL_DECODER_CTX_get_construct(src))) {
  620|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  621|      0|        goto err;
  622|      0|    }
  623|       |
  624|  14.6k|    process_data_src = OSSL_DECODER_CTX_get_construct_data(src);
  625|  14.6k|    if (process_data_src != NULL) {
  ------------------
  |  Branch (625:9): [True: 14.6k, False: 0]
  ------------------
  626|  14.6k|        process_data_dest = OPENSSL_zalloc(sizeof(*process_data_dest));
  ------------------
  |  |  109|  14.6k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  627|  14.6k|        if (process_data_dest == NULL) {
  ------------------
  |  Branch (627:13): [True: 0, False: 14.6k]
  ------------------
  628|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  629|      0|            goto err;
  630|      0|        }
  631|  14.6k|        if (process_data_src->propq != NULL) {
  ------------------
  |  Branch (631:13): [True: 0, False: 14.6k]
  ------------------
  632|      0|            process_data_dest->propq = OPENSSL_strdup(process_data_src->propq);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  633|      0|            if (process_data_dest->propq == NULL) {
  ------------------
  |  Branch (633:17): [True: 0, False: 0]
  ------------------
  634|      0|                ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  635|      0|                goto err;
  636|      0|            }
  637|      0|        }
  638|       |
  639|  14.6k|        if (process_data_src->keymgmts != NULL) {
  ------------------
  |  Branch (639:13): [True: 14.6k, False: 0]
  ------------------
  640|  14.6k|            process_data_dest->keymgmts
  641|  14.6k|                = sk_EVP_KEYMGMT_deep_copy(process_data_src->keymgmts,
  642|  14.6k|                    keymgmt_dup,
  643|  14.6k|                    EVP_KEYMGMT_free);
  644|  14.6k|            if (process_data_dest->keymgmts == NULL) {
  ------------------
  |  Branch (644:17): [True: 0, False: 14.6k]
  ------------------
  645|      0|                ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  646|      0|                goto err;
  647|      0|            }
  648|  14.6k|        }
  649|       |
  650|  14.6k|        process_data_dest->object = (void **)pkey;
  651|  14.6k|        process_data_dest->libctx = process_data_src->libctx;
  652|  14.6k|        process_data_dest->selection = process_data_src->selection;
  653|  14.6k|        process_data_dest->ctx = dest;
  654|  14.6k|        if (!OSSL_DECODER_CTX_set_construct_data(dest, process_data_dest)) {
  ------------------
  |  Branch (654:13): [True: 0, False: 14.6k]
  ------------------
  655|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  656|      0|            goto err;
  657|      0|        }
  658|  14.6k|        process_data_dest = NULL;
  659|  14.6k|    }
  660|       |
  661|  14.6k|    if (!OSSL_DECODER_CTX_set_cleanup(dest,
  ------------------
  |  Branch (661:9): [True: 0, False: 14.6k]
  ------------------
  662|  14.6k|            OSSL_DECODER_CTX_get_cleanup(src))) {
  663|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  664|      0|        goto err;
  665|      0|    }
  666|       |
  667|  14.6k|    dest->frozen = src->frozen;
  668|  14.6k|    return dest;
  669|      0|err:
  670|      0|    decoder_clean_pkey_construct_arg(process_data_dest);
  671|      0|    OSSL_DECODER_CTX_free(dest);
  672|       |    return NULL;
  673|  14.6k|}
decoder_pkey.c:keymgmt_dup:
  570|   178k|{
  571|   178k|    if (!EVP_KEYMGMT_up_ref((EVP_KEYMGMT *)keymgmt))
  ------------------
  |  Branch (571:9): [True: 0, False: 178k]
  ------------------
  572|      0|        return NULL;
  573|       |
  574|   178k|    return (EVP_KEYMGMT *)keymgmt;
  575|   178k|}

ossl_err_load_ERR_strings:
  267|     71|{
  268|     71|#ifndef OPENSSL_NO_ERR
  269|     71|    if (!RUN_ONCE(&err_string_init, do_err_strings_init))
  ------------------
  |  |  130|     71|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 71, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (269:9): [True: 0, False: 71]
  ------------------
  270|      0|        return 0;
  271|       |
  272|     71|    err_load_strings(ERR_str_libraries);
  273|     71|    err_load_strings(ERR_str_reasons);
  274|     71|#endif
  275|     71|    return 1;
  276|     71|}
ERR_load_strings_const:
  292|     69|{
  293|     69|#ifndef OPENSSL_NO_ERR
  294|     69|    if (ossl_err_load_ERR_strings() == 0)
  ------------------
  |  Branch (294:9): [True: 0, False: 69]
  ------------------
  295|      0|        return 0;
  296|     69|    err_load_strings(str);
  297|     69|#endif
  298|       |
  299|     69|    return 1;
  300|     69|}
ERR_clear_error:
  330|   105k|{
  331|   105k|    int i;
  332|   105k|    ERR_STATE *es;
  333|       |
  334|   105k|    es = ossl_err_get_state_int();
  335|   105k|    if (es == NULL)
  ------------------
  |  Branch (335:9): [True: 0, False: 105k]
  ------------------
  336|      0|        return;
  337|       |
  338|  1.80M|    for (i = 0; i < ERR_NUM_ERRORS; i++) {
  ------------------
  |  |   14|  1.80M|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (338:17): [True: 1.69M, False: 105k]
  ------------------
  339|  1.69M|        err_clear(es, i, 0);
  340|  1.69M|    }
  341|   105k|    es->top = es->bottom = 0;
  342|   105k|}
ERR_peek_last_error:
  405|  43.7k|{
  406|  43.7k|    return get_error_values(EV_PEEK_LAST, NULL, NULL, NULL, NULL, NULL);
  407|  43.7k|}
ERR_reason_error_string:
  607|     69|{
  608|     69|#ifndef OPENSSL_NO_ERR
  609|     69|    ERR_STRING_DATA d, *p = NULL;
  610|     69|    unsigned long l, r;
  611|       |
  612|     69|    if (!RUN_ONCE(&err_string_init, do_err_strings_init)) {
  ------------------
  |  |  130|     69|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 69, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (612:9): [True: 0, False: 69]
  ------------------
  613|      0|        return NULL;
  614|      0|    }
  615|       |
  616|       |    /*
  617|       |     * ERR_reason_error_string() can't safely return system error strings,
  618|       |     * since openssl_strerror_r() needs a buffer for thread safety, and we
  619|       |     * haven't got one that would serve any sensible purpose.
  620|       |     */
  621|     69|    if (ERR_SYSTEM_ERROR(e))
  ------------------
  |  |  222|     69|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|     69|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 69]
  |  |  ------------------
  ------------------
  622|      0|        return NULL;
  623|       |
  624|     69|    l = ERR_GET_LIB(e);
  625|     69|    r = ERR_GET_REASON(e);
  626|     69|    d.error = ERR_PACK(l, 0, r);
  ------------------
  |  |  262|     69|    ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  210|     69|#define ERR_LIB_MASK 0xFF
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  209|     69|#define ERR_LIB_OFFSET 23L
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  213|     69|#define ERR_REASON_MASK 0X7FFFFF
  |  |  ------------------
  ------------------
  627|     69|    p = int_err_get_item(&d);
  628|     69|    if (p == NULL) {
  ------------------
  |  Branch (628:9): [True: 69, False: 0]
  ------------------
  629|     69|        d.error = ERR_PACK(0, 0, r);
  ------------------
  |  |  262|     69|    ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  210|     69|#define ERR_LIB_MASK 0xFF
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  209|     69|#define ERR_LIB_OFFSET 23L
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  213|     69|#define ERR_REASON_MASK 0X7FFFFF
  |  |  ------------------
  ------------------
  630|     69|        p = int_err_get_item(&d);
  631|     69|    }
  632|     69|    return ((p == NULL) ? NULL : p->string);
  ------------------
  |  Branch (632:13): [True: 69, False: 0]
  ------------------
  633|       |#else
  634|       |    return NULL;
  635|       |#endif
  636|     69|}
ossl_err_get_state_int:
  652|  2.82M|{
  653|  2.82M|    ERR_STATE *state;
  654|  2.82M|    int saveerrno = get_last_sys_error();
  ------------------
  |  |   30|  2.82M|#define get_last_sys_error() errno
  ------------------
  655|       |
  656|  2.82M|    if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL))
  ------------------
  |  |   31|  2.82M|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  |  Branch (656:9): [True: 0, False: 2.82M]
  ------------------
  657|      0|        return NULL;
  658|       |
  659|  2.82M|    state = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  660|  2.82M|        CRYPTO_THREAD_NO_CONTEXT);
  ------------------
  |  |   42|  2.82M|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  661|  2.82M|    if (state == (ERR_STATE *)-1)
  ------------------
  |  Branch (661:9): [True: 0, False: 2.82M]
  ------------------
  662|      0|        return NULL;
  663|       |
  664|  2.82M|    if (state == NULL) {
  ------------------
  |  Branch (664:9): [True: 2, False: 2.82M]
  ------------------
  665|      2|        if (!CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  ------------------
  |  Branch (665:13): [True: 0, False: 2]
  ------------------
  666|      2|                CRYPTO_THREAD_NO_CONTEXT, (ERR_STATE *)-1))
  ------------------
  |  |   42|      2|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  667|      0|            return NULL;
  668|       |
  669|      2|        state = OSSL_ERR_STATE_new();
  670|      2|        if (state == NULL) {
  ------------------
  |  Branch (670:13): [True: 0, False: 2]
  ------------------
  671|      0|            CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  672|      0|                CRYPTO_THREAD_NO_CONTEXT, NULL);
  ------------------
  |  |   42|      0|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  673|      0|            return NULL;
  674|      0|        }
  675|       |
  676|      2|        if (!ossl_init_thread_start(NULL, NULL, err_delete_thread_state)
  ------------------
  |  Branch (676:13): [True: 0, False: 2]
  ------------------
  677|      2|            || !CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  ------------------
  |  Branch (677:16): [True: 0, False: 2]
  ------------------
  678|      2|                CRYPTO_THREAD_NO_CONTEXT, state)) {
  ------------------
  |  |   42|      2|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  679|      0|            OSSL_ERR_STATE_free(state);
  680|      0|            CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  681|      0|                CRYPTO_THREAD_NO_CONTEXT, NULL);
  ------------------
  |  |   42|      0|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  682|      0|            return NULL;
  683|      0|        }
  684|       |
  685|       |        /* Ignore failures from these */
  686|      2|        OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
  ------------------
  |  |  506|      2|#define OPENSSL_INIT_LOAD_CRYPTO_STRINGS 0x00000002L
  ------------------
  687|      2|    }
  688|       |
  689|  2.82M|    set_sys_error(saveerrno);
  ------------------
  |  |   32|  2.82M|#define set_sys_error(e) errno = (e)
  ------------------
  690|  2.82M|    return state;
  691|  2.82M|}
err_shelve_state:
  698|      2|{
  699|      2|    int saveerrno = get_last_sys_error();
  ------------------
  |  |   30|      2|#define get_last_sys_error() errno
  ------------------
  700|       |
  701|       |    /*
  702|       |     * Note, at present our only caller is OPENSSL_init_crypto(), indirectly
  703|       |     * via ossl_init_load_crypto_nodelete(), by which point the requested
  704|       |     * "base" initialization has already been performed, so the below call is a
  705|       |     * NOOP, that re-enters OPENSSL_init_crypto() only to quickly return.
  706|       |     *
  707|       |     * If are no other valid callers of this function, the call below can be
  708|       |     * removed, avoiding the re-entry into OPENSSL_init_crypto().  If there are
  709|       |     * potential uses that are not from inside OPENSSL_init_crypto(), then this
  710|       |     * call is needed, but some care is required to make sure that the re-entry
  711|       |     * remains a NOOP.
  712|       |     */
  713|      2|    if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL))
  ------------------
  |  |   31|      2|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  |  Branch (713:9): [True: 0, False: 2]
  ------------------
  714|      0|        return 0;
  715|       |
  716|      2|    *state = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  717|      2|        CRYPTO_THREAD_NO_CONTEXT);
  ------------------
  |  |   42|      2|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  718|      2|    if (!CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  ------------------
  |  Branch (718:9): [True: 0, False: 2]
  ------------------
  719|      2|            CRYPTO_THREAD_NO_CONTEXT, (ERR_STATE *)-1))
  ------------------
  |  |   42|      2|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  720|      0|        return 0;
  721|       |
  722|      2|    set_sys_error(saveerrno);
  ------------------
  |  |   32|      2|#define set_sys_error(e) errno = (e)
  ------------------
  723|      2|    return 1;
  724|      2|}
err_unshelve_state:
  731|      2|{
  732|      2|    if (state != (void *)-1)
  ------------------
  |  Branch (732:9): [True: 2, False: 0]
  ------------------
  733|      2|        CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  734|      2|            CRYPTO_THREAD_NO_CONTEXT, (ERR_STATE *)state);
  ------------------
  |  |   42|      2|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  735|      2|}
ERR_get_next_error_library:
  738|      1|{
  739|      1|    int ret;
  740|       |
  741|      1|    if (!RUN_ONCE(&err_string_init, do_err_strings_init))
  ------------------
  |  |  130|      1|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (741:9): [True: 0, False: 1]
  ------------------
  742|      0|        return 0;
  743|       |
  744|      1|    if (!CRYPTO_THREAD_write_lock(err_string_lock))
  ------------------
  |  Branch (744:9): [True: 0, False: 1]
  ------------------
  745|      0|        return 0;
  746|      1|    ret = int_err_library_number++;
  747|      1|    CRYPTO_THREAD_unlock(err_string_lock);
  748|      1|    return ret;
  749|      1|}
ERR_add_error_data:
  786|  7.46k|{
  787|  7.46k|    va_list args;
  788|  7.46k|    va_start(args, num);
  789|  7.46k|    ERR_add_error_vdata(num, args);
  790|       |    va_end(args);
  791|  7.46k|}
ERR_add_error_vdata:
  794|  7.46k|{
  795|  7.46k|    int i;
  796|  7.46k|    size_t len, size;
  797|  7.46k|    int flags = ERR_TXT_MALLOCED | ERR_TXT_STRING;
  ------------------
  |  |   50|  7.46k|#define ERR_TXT_MALLOCED 0x01
  ------------------
                  int flags = ERR_TXT_MALLOCED | ERR_TXT_STRING;
  ------------------
  |  |   51|  7.46k|#define ERR_TXT_STRING 0x02
  ------------------
  798|  7.46k|    char *str, *arg;
  799|  7.46k|    ERR_STATE *es;
  800|       |
  801|       |    /* Get the current error data; if an allocated string get it. */
  802|  7.46k|    es = ossl_err_get_state_int();
  803|  7.46k|    if (es == NULL)
  ------------------
  |  Branch (803:9): [True: 0, False: 7.46k]
  ------------------
  804|      0|        return;
  805|  7.46k|    i = es->top;
  806|       |
  807|       |    /*
  808|       |     * If err_data is allocated already, reuse the space.
  809|       |     * Otherwise, allocate a small new buffer.
  810|       |     */
  811|  7.46k|    if ((es->err_data_flags[i] & flags) == flags
  ------------------
  |  Branch (811:9): [True: 0, False: 7.46k]
  ------------------
  812|      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__)
  ------------------
  813|      0|        str = es->err_data[i];
  814|      0|        size = es->err_data_size[i];
  815|       |
  816|       |        /*
  817|       |         * To protect the string we just grabbed from tampering by other
  818|       |         * functions we may call, or to protect them from freeing a pointer
  819|       |         * that may no longer be valid at that point, we clear away the
  820|       |         * data pointer and the flags.  We will set them again at the end
  821|       |         * of this function.
  822|       |         */
  823|      0|        es->err_data[i] = NULL;
  824|      0|        es->err_data_flags[i] = 0;
  825|  7.46k|    } else if ((str = OPENSSL_malloc(size = 81)) == NULL) {
  ------------------
  |  |  107|  7.46k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (825:16): [True: 0, False: 7.46k]
  ------------------
  826|      0|        return;
  827|  7.46k|    } else {
  828|  7.46k|        str[0] = '\0';
  829|  7.46k|    }
  830|  7.46k|    len = strlen(str);
  831|       |
  832|  29.8k|    while (--num >= 0) {
  ------------------
  |  Branch (832:12): [True: 22.4k, False: 7.46k]
  ------------------
  833|  22.4k|        arg = va_arg(args, char *);
  834|  22.4k|        if (arg == NULL)
  ------------------
  |  Branch (834:13): [True: 0, False: 22.4k]
  ------------------
  835|      0|            arg = "<NULL>";
  836|  22.4k|        len += strlen(arg);
  837|  22.4k|        if (len >= size) {
  ------------------
  |  Branch (837:13): [True: 0, False: 22.4k]
  ------------------
  838|      0|            char *p;
  839|       |
  840|      0|            size = len + 20;
  841|      0|            p = OPENSSL_realloc(str, size);
  ------------------
  |  |  121|      0|    CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  842|      0|            if (p == NULL) {
  ------------------
  |  Branch (842:17): [True: 0, False: 0]
  ------------------
  843|      0|                OPENSSL_free(str);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  844|      0|                return;
  845|      0|            }
  846|      0|            str = p;
  847|      0|        }
  848|  22.4k|        OPENSSL_strlcat(str, arg, size);
  849|  22.4k|    }
  850|  7.46k|    if (!err_set_error_data_int(str, size, flags, 0))
  ------------------
  |  Branch (850:9): [True: 0, False: 7.46k]
  ------------------
  851|      0|        OPENSSL_free(str);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  852|  7.46k|}
err.c:do_err_strings_init:
  211|      2|{
  212|      2|    if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL))
  ------------------
  |  |   31|      2|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  |  Branch (212:9): [True: 0, False: 2]
  ------------------
  213|      0|        return 0;
  214|      2|    err_string_lock = CRYPTO_THREAD_lock_new();
  215|      2|    if (err_string_lock == NULL)
  ------------------
  |  Branch (215:9): [True: 0, False: 2]
  ------------------
  216|      0|        return 0;
  217|      2|#ifndef OPENSSL_NO_ERR
  218|      2|    int_error_hash = lh_ERR_STRING_DATA_new(err_string_data_hash,
  ------------------
  |  |  330|      2|#define lh_ERR_STRING_DATA_new(hfn, cmp) ((LHASH_OF(ERR_STRING_DATA) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new(ossl_check_ERR_STRING_DATA_lh_hashfunc_type(hfn), ossl_check_ERR_STRING_DATA_lh_compfunc_type(cmp)), lh_ERR_STRING_DATA_hash_thunk, lh_ERR_STRING_DATA_comp_thunk, lh_ERR_STRING_DATA_doall_thunk, lh_ERR_STRING_DATA_doall_arg_thunk))
  ------------------
  219|      2|        err_string_data_cmp);
  220|      2|    if (int_error_hash == NULL) {
  ------------------
  |  Branch (220:9): [True: 0, False: 2]
  ------------------
  221|      0|        CRYPTO_THREAD_lock_free(err_string_lock);
  222|      0|        err_string_lock = NULL;
  223|      0|        return 0;
  224|      0|    }
  225|      2|#endif
  226|      2|    return 1;
  227|      2|}
err.c:err_string_data_hash:
  169|  9.19k|{
  170|  9.19k|    unsigned long ret, l;
  171|       |
  172|  9.19k|    l = a->error;
  173|  9.19k|    ret = l ^ ERR_GET_LIB(l);
  174|  9.19k|    return (ret ^ ret % 19 * 13);
  175|  9.19k|}
err.c:err_string_data_cmp:
  179|  6.02k|{
  180|  6.02k|    if (a->error == b->error)
  ------------------
  |  Branch (180:9): [True: 5.66k, False: 364]
  ------------------
  181|  5.66k|        return 0;
  182|    364|    return a->error > b->error ? 1 : -1;
  ------------------
  |  Branch (182:12): [True: 194, False: 170]
  ------------------
  183|  6.02k|}
err.c:err_load_strings:
  255|    211|{
  256|    211|    if (!CRYPTO_THREAD_write_lock(err_string_lock))
  ------------------
  |  Branch (256:9): [True: 0, False: 211]
  ------------------
  257|      0|        return 0;
  258|  9.27k|    for (; str->error; str++)
  ------------------
  |  Branch (258:12): [True: 9.06k, False: 211]
  ------------------
  259|  9.06k|        (void)lh_ERR_STRING_DATA_insert(int_error_hash,
  ------------------
  |  |  333|  9.27k|#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)))
  ------------------
  260|    211|            (ERR_STRING_DATA *)str);
  261|    211|    CRYPTO_THREAD_unlock(err_string_lock);
  262|    211|    return 1;
  263|    211|}
err.c:get_error_values:
  443|  43.7k|{
  444|  43.7k|    int i = 0;
  445|  43.7k|    ERR_STATE *es;
  446|  43.7k|    unsigned long ret;
  447|       |
  448|  43.7k|    es = ossl_err_get_state_int();
  449|  43.7k|    if (es == NULL)
  ------------------
  |  Branch (449:9): [True: 0, False: 43.7k]
  ------------------
  450|      0|        return 0;
  451|       |
  452|       |    /*
  453|       |     * Clear anything that should have been cleared earlier. We do this
  454|       |     * here because this doesn't have constant-time issues.
  455|       |     */
  456|  43.7k|    while (es->bottom != es->top) {
  ------------------
  |  Branch (456:12): [True: 29.1k, False: 14.6k]
  ------------------
  457|  29.1k|        if (es->err_flags[es->top] & ERR_FLAG_CLEAR) {
  ------------------
  |  |   16|  29.1k|#define ERR_FLAG_CLEAR 0x02
  ------------------
  |  Branch (457:13): [True: 0, False: 29.1k]
  ------------------
  458|      0|            err_clear(es, es->top, 0);
  459|      0|            es->top = es->top > 0 ? es->top - 1 : ERR_NUM_ERRORS - 1;
  ------------------
  |  |   14|      0|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (459:23): [True: 0, False: 0]
  ------------------
  460|      0|            continue;
  461|      0|        }
  462|  29.1k|        i = (es->bottom + 1) % ERR_NUM_ERRORS;
  ------------------
  |  |   14|  29.1k|#define ERR_NUM_ERRORS 16
  ------------------
  463|  29.1k|        if (es->err_flags[i] & ERR_FLAG_CLEAR) {
  ------------------
  |  |   16|  29.1k|#define ERR_FLAG_CLEAR 0x02
  ------------------
  |  Branch (463:13): [True: 0, False: 29.1k]
  ------------------
  464|      0|            es->bottom = i;
  465|      0|            err_clear(es, es->bottom, 0);
  466|      0|            continue;
  467|      0|        }
  468|  29.1k|        break;
  469|  29.1k|    }
  470|       |
  471|       |    /* If everything has been cleared, the stack is empty. */
  472|  43.7k|    if (es->bottom == es->top)
  ------------------
  |  Branch (472:9): [True: 14.6k, False: 29.1k]
  ------------------
  473|  14.6k|        return 0;
  474|       |
  475|       |    /* Which error, the top of stack (latest one) or the first one? */
  476|  29.1k|    if (g == EV_PEEK_LAST)
  ------------------
  |  Branch (476:9): [True: 29.1k, False: 0]
  ------------------
  477|  29.1k|        i = es->top;
  478|      0|    else
  479|      0|        i = (es->bottom + 1) % ERR_NUM_ERRORS;
  ------------------
  |  |   14|      0|#define ERR_NUM_ERRORS 16
  ------------------
  480|       |
  481|  29.1k|    ret = es->err_buffer[i];
  482|  29.1k|    if (g == EV_POP) {
  ------------------
  |  Branch (482:9): [True: 0, False: 29.1k]
  ------------------
  483|      0|        es->bottom = i;
  484|      0|        es->err_buffer[i] = 0;
  485|      0|    }
  486|       |
  487|  29.1k|    if (file != NULL) {
  ------------------
  |  Branch (487:9): [True: 0, False: 29.1k]
  ------------------
  488|      0|        *file = es->err_file[i];
  489|      0|        if (*file == NULL)
  ------------------
  |  Branch (489:13): [True: 0, False: 0]
  ------------------
  490|      0|            *file = "";
  491|      0|    }
  492|  29.1k|    if (line != NULL)
  ------------------
  |  Branch (492:9): [True: 0, False: 29.1k]
  ------------------
  493|      0|        *line = es->err_line[i];
  494|  29.1k|    if (func != NULL) {
  ------------------
  |  Branch (494:9): [True: 0, False: 29.1k]
  ------------------
  495|      0|        *func = es->err_func[i];
  496|      0|        if (*func == NULL)
  ------------------
  |  Branch (496:13): [True: 0, False: 0]
  ------------------
  497|      0|            *func = "";
  498|      0|    }
  499|  29.1k|    if (flags != NULL)
  ------------------
  |  Branch (499:9): [True: 0, False: 29.1k]
  ------------------
  500|      0|        *flags = es->err_data_flags[i];
  501|  29.1k|    if (data == NULL) {
  ------------------
  |  Branch (501:9): [True: 29.1k, False: 0]
  ------------------
  502|  29.1k|        if (g == EV_POP) {
  ------------------
  |  Branch (502:13): [True: 0, False: 29.1k]
  ------------------
  503|      0|            err_clear_data(es, i, 0);
  504|      0|        }
  505|  29.1k|    } else {
  506|      0|        *data = es->err_data[i];
  507|      0|        if (*data == NULL) {
  ------------------
  |  Branch (507:13): [True: 0, False: 0]
  ------------------
  508|      0|            *data = "";
  509|      0|            if (flags != NULL)
  ------------------
  |  Branch (509:17): [True: 0, False: 0]
  ------------------
  510|      0|                *flags = 0;
  511|      0|        }
  512|      0|    }
  513|  29.1k|    return ret;
  514|  43.7k|}
err.c:int_err_get_item:
  186|    138|{
  187|    138|    ERR_STRING_DATA *p = NULL;
  188|       |
  189|    138|    if (!CRYPTO_THREAD_read_lock(err_string_lock))
  ------------------
  |  Branch (189:9): [True: 0, False: 138]
  ------------------
  190|      0|        return NULL;
  191|    138|    p = lh_ERR_STRING_DATA_retrieve(int_error_hash, d);
  ------------------
  |  |  335|    138|#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)))
  ------------------
  192|    138|    CRYPTO_THREAD_unlock(err_string_lock);
  193|       |
  194|    138|    return p;
  195|    138|}
err.c:err_set_error_data_int:
  753|  7.46k|{
  754|  7.46k|    ERR_STATE *es;
  755|       |
  756|  7.46k|    es = ossl_err_get_state_int();
  757|  7.46k|    if (es == NULL)
  ------------------
  |  Branch (757:9): [True: 0, False: 7.46k]
  ------------------
  758|      0|        return 0;
  759|       |
  760|  7.46k|    err_clear_data(es, es->top, deallocate);
  761|  7.46k|    err_set_data(es, es->top, data, size, flags);
  762|       |
  763|  7.46k|    return 1;
  764|  7.46k|}

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

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

err.c:err_clear:
  103|  1.69M|{
  104|  1.69M|    err_clear_data(es, i, (deall));
  105|  1.69M|    es->err_marks[i] = 0;
  106|  1.69M|    es->err_flags[i] = 0;
  107|  1.69M|    es->err_buffer[i] = 0;
  108|  1.69M|    es->err_line[i] = -1;
  109|  1.69M|    OPENSSL_free(es->err_file[i]);
  ------------------
  |  |  132|  1.69M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  110|  1.69M|    es->err_file[i] = NULL;
  111|  1.69M|    OPENSSL_free(es->err_func[i]);
  ------------------
  |  |  132|  1.69M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  112|       |    es->err_func[i] = NULL;
  113|  1.69M|}
err.c:err_clear_data:
   39|  1.70M|{
   40|  1.70M|    if (es->err_data_flags[i] & ERR_TXT_MALLOCED) {
  ------------------
  |  |   50|  1.70M|#define ERR_TXT_MALLOCED 0x01
  ------------------
  |  Branch (40:9): [True: 325k, False: 1.37M]
  ------------------
   41|   325k|        if (deall) {
  ------------------
  |  Branch (41:13): [True: 0, False: 325k]
  ------------------
   42|      0|            OPENSSL_free(es->err_data[i]);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   43|      0|            es->err_data[i] = NULL;
   44|      0|            es->err_data_size[i] = 0;
   45|      0|            es->err_data_flags[i] = 0;
   46|   325k|        } else if (es->err_data[i] != NULL) {
  ------------------
  |  Branch (46:20): [True: 325k, False: 0]
  ------------------
   47|   325k|            es->err_data[i][0] = '\0';
   48|   325k|            es->err_data_flags[i] = ERR_TXT_MALLOCED;
  ------------------
  |  |   50|   325k|#define ERR_TXT_MALLOCED 0x01
  ------------------
   49|   325k|        }
   50|  1.37M|    } else {
   51|       |        es->err_data[i] = NULL;
   52|  1.37M|        es->err_data_size[i] = 0;
   53|  1.37M|        es->err_data_flags[i] = 0;
   54|  1.37M|    }
   55|  1.70M|}
err.c:err_set_data:
   94|  7.46k|{
   95|  7.46k|    if ((es->err_data_flags[i] & ERR_TXT_MALLOCED) != 0)
  ------------------
  |  |   50|  7.46k|#define ERR_TXT_MALLOCED 0x01
  ------------------
  |  Branch (95:9): [True: 7.46k, False: 2]
  ------------------
   96|  7.46k|        OPENSSL_free(es->err_data[i]);
  ------------------
  |  |  132|  7.46k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   97|  7.46k|    es->err_data[i] = data;
   98|  7.46k|    es->err_data_size[i] = datasz;
   99|  7.46k|    es->err_data_flags[i] = flags;
  100|  7.46k|}
err_blocks.c:err_get_slot:
   32|   271k|{
   33|   271k|    es->top = (es->top + 1) % ERR_NUM_ERRORS;
  ------------------
  |  |   14|   271k|#define ERR_NUM_ERRORS 16
  ------------------
   34|   271k|    if (es->top == es->bottom)
  ------------------
  |  Branch (34:9): [True: 0, False: 271k]
  ------------------
   35|      0|        es->bottom = (es->bottom + 1) % ERR_NUM_ERRORS;
  ------------------
  |  |   14|      0|#define ERR_NUM_ERRORS 16
  ------------------
   36|   271k|}
err_blocks.c:err_clear:
  103|   271k|{
  104|   271k|    err_clear_data(es, i, (deall));
  105|   271k|    es->err_marks[i] = 0;
  106|   271k|    es->err_flags[i] = 0;
  107|   271k|    es->err_buffer[i] = 0;
  108|   271k|    es->err_line[i] = -1;
  109|   271k|    OPENSSL_free(es->err_file[i]);
  ------------------
  |  |  132|   271k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  110|   271k|    es->err_file[i] = NULL;
  111|   271k|    OPENSSL_free(es->err_func[i]);
  ------------------
  |  |  132|   271k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  112|       |    es->err_func[i] = NULL;
  113|   271k|}
err_blocks.c:err_set_debug:
   68|   271k|{
   69|       |    /*
   70|       |     * We dup the file and fn strings because they may be provider owned. If the
   71|       |     * provider gets unloaded, they may not be valid anymore.
   72|       |     */
   73|   271k|    OPENSSL_free(es->err_file[i]);
  ------------------
  |  |  132|   271k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   74|   271k|    if (file == NULL || file[0] == '\0')
  ------------------
  |  Branch (74:9): [True: 0, False: 271k]
  |  Branch (74:25): [True: 0, False: 271k]
  ------------------
   75|      0|        es->err_file[i] = NULL;
   76|   271k|    else if ((es->err_file[i] = CRYPTO_malloc(strlen(file) + 1,
  ------------------
  |  Branch (76:14): [True: 271k, False: 0]
  ------------------
   77|   271k|                  NULL, 0))
   78|   271k|        != NULL)
   79|       |        /* We cannot use OPENSSL_strdup due to possible recursion */
   80|   271k|        strcpy(es->err_file[i], file);
   81|       |
   82|   271k|    es->err_line[i] = line;
   83|   271k|    OPENSSL_free(es->err_func[i]);
  ------------------
  |  |  132|   271k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   84|   271k|    if (fn == NULL || fn[0] == '\0')
  ------------------
  |  Branch (84:9): [True: 0, False: 271k]
  |  Branch (84:23): [True: 0, False: 271k]
  ------------------
   85|      0|        es->err_func[i] = NULL;
   86|   271k|    else if ((es->err_func[i] = CRYPTO_malloc(strlen(fn) + 1,
  ------------------
  |  Branch (86:14): [True: 271k, False: 0]
  ------------------
   87|   271k|                  NULL, 0))
   88|   271k|        != NULL)
   89|   271k|        strcpy(es->err_func[i], fn);
   90|   271k|}
err_blocks.c:err_clear_data:
   39|   542k|{
   40|   542k|    if (es->err_data_flags[i] & ERR_TXT_MALLOCED) {
  ------------------
  |  |   50|   542k|#define ERR_TXT_MALLOCED 0x01
  ------------------
  |  Branch (40:9): [True: 424k, False: 117k]
  ------------------
   41|   424k|        if (deall) {
  ------------------
  |  Branch (41:13): [True: 0, False: 424k]
  ------------------
   42|      0|            OPENSSL_free(es->err_data[i]);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   43|      0|            es->err_data[i] = NULL;
   44|      0|            es->err_data_size[i] = 0;
   45|      0|            es->err_data_flags[i] = 0;
   46|   424k|        } else if (es->err_data[i] != NULL) {
  ------------------
  |  Branch (46:20): [True: 424k, False: 0]
  ------------------
   47|   424k|            es->err_data[i][0] = '\0';
   48|   424k|            es->err_data_flags[i] = ERR_TXT_MALLOCED;
  ------------------
  |  |   50|   424k|#define ERR_TXT_MALLOCED 0x01
  ------------------
   49|   424k|        }
   50|   424k|    } else {
   51|       |        es->err_data[i] = NULL;
   52|   117k|        es->err_data_size[i] = 0;
   53|   117k|        es->err_data_flags[i] = 0;
   54|   117k|    }
   55|   542k|}
err_blocks.c:err_set_error:
   59|   271k|{
   60|   271k|    es->err_buffer[i] = lib == ERR_LIB_SYS
  ------------------
  |  |   55|   271k|#define ERR_LIB_SYS 2
  ------------------
  |  Branch (60:25): [True: 2, False: 271k]
  ------------------
   61|   271k|        ? (unsigned int)(ERR_SYSTEM_FLAG | reason)
  ------------------
  |  |  201|      2|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  ------------------
   62|   271k|        : ERR_PACK(lib, 0, reason);
  ------------------
  |  |  262|   542k|    ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  210|   271k|#define ERR_LIB_MASK 0xFF
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  209|   271k|#define ERR_LIB_OFFSET 23L
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  213|   271k|#define ERR_REASON_MASK 0X7FFFFF
  |  |  ------------------
  ------------------
   63|   271k|}
err_blocks.c:err_set_data:
   94|   117k|{
   95|   117k|    if ((es->err_data_flags[i] & ERR_TXT_MALLOCED) != 0)
  ------------------
  |  |   50|   117k|#define ERR_TXT_MALLOCED 0x01
  ------------------
  |  Branch (95:9): [True: 0, False: 117k]
  ------------------
   96|      0|        OPENSSL_free(es->err_data[i]);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   97|   117k|    es->err_data[i] = data;
   98|   117k|    es->err_data_size[i] = datasz;
   99|   117k|    es->err_data_flags[i] = flags;
  100|   117k|}
err_mark.c:err_clear:
  103|   271k|{
  104|   271k|    err_clear_data(es, i, (deall));
  105|   271k|    es->err_marks[i] = 0;
  106|   271k|    es->err_flags[i] = 0;
  107|   271k|    es->err_buffer[i] = 0;
  108|   271k|    es->err_line[i] = -1;
  109|   271k|    OPENSSL_free(es->err_file[i]);
  ------------------
  |  |  132|   271k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  110|   271k|    es->err_file[i] = NULL;
  111|   271k|    OPENSSL_free(es->err_func[i]);
  ------------------
  |  |  132|   271k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  112|       |    es->err_func[i] = NULL;
  113|   271k|}
err_mark.c:err_clear_data:
   39|   271k|{
   40|   271k|    if (es->err_data_flags[i] & ERR_TXT_MALLOCED) {
  ------------------
  |  |   50|   271k|#define ERR_TXT_MALLOCED 0x01
  ------------------
  |  Branch (40:9): [True: 271k, False: 4]
  ------------------
   41|   271k|        if (deall) {
  ------------------
  |  Branch (41:13): [True: 0, False: 271k]
  ------------------
   42|      0|            OPENSSL_free(es->err_data[i]);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   43|      0|            es->err_data[i] = NULL;
   44|      0|            es->err_data_size[i] = 0;
   45|      0|            es->err_data_flags[i] = 0;
   46|   271k|        } else if (es->err_data[i] != NULL) {
  ------------------
  |  Branch (46:20): [True: 271k, False: 0]
  ------------------
   47|   271k|            es->err_data[i][0] = '\0';
   48|   271k|            es->err_data_flags[i] = ERR_TXT_MALLOCED;
  ------------------
  |  |   50|   271k|#define ERR_TXT_MALLOCED 0x01
  ------------------
   49|   271k|        }
   50|   271k|    } else {
   51|       |        es->err_data[i] = NULL;
   52|      4|        es->err_data_size[i] = 0;
   53|      4|        es->err_data_flags[i] = 0;
   54|      4|    }
   55|   271k|}

ERR_set_mark:
   14|   919k|{
   15|   919k|    ERR_STATE *es;
   16|       |
   17|   919k|    es = ossl_err_get_state_int();
   18|   919k|    if (es == NULL)
  ------------------
  |  Branch (18:9): [True: 0, False: 919k]
  ------------------
   19|      0|        return 0;
   20|       |
   21|   919k|    if (es->bottom == es->top)
  ------------------
  |  Branch (21:9): [True: 919k, False: 0]
  ------------------
   22|   919k|        return 0;
   23|      0|    es->err_marks[es->top]++;
   24|      0|    return 1;
   25|   919k|}
ERR_pop_to_mark:
   41|   781k|{
   42|   781k|    ERR_STATE *es;
   43|       |
   44|   781k|    es = ossl_err_get_state_int();
   45|   781k|    if (es == NULL)
  ------------------
  |  Branch (45:9): [True: 0, False: 781k]
  ------------------
   46|      0|        return 0;
   47|       |
   48|  1.05M|    while (es->bottom != es->top
  ------------------
  |  Branch (48:12): [True: 271k, False: 781k]
  ------------------
   49|   271k|        && es->err_marks[es->top] == 0) {
  ------------------
  |  Branch (49:12): [True: 271k, False: 0]
  ------------------
   50|   271k|        err_clear(es, es->top, 0);
   51|   271k|        es->top = es->top > 0 ? es->top - 1 : ERR_NUM_ERRORS - 1;
  ------------------
  |  |   14|      0|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (51:19): [True: 271k, False: 0]
  ------------------
   52|   271k|    }
   53|       |
   54|   781k|    if (es->bottom == es->top)
  ------------------
  |  Branch (54:9): [True: 781k, False: 0]
  ------------------
   55|   781k|        return 0;
   56|      0|    es->err_marks[es->top]--;
   57|      0|    return 1;
   58|   781k|}
ERR_clear_last_mark:
   80|   145k|{
   81|   145k|    ERR_STATE *es;
   82|   145k|    int top;
   83|       |
   84|   145k|    es = ossl_err_get_state_int();
   85|   145k|    if (es == NULL)
  ------------------
  |  Branch (85:9): [True: 0, False: 145k]
  ------------------
   86|      0|        return 0;
   87|       |
   88|   145k|    top = es->top;
   89|   145k|    while (es->bottom != top
  ------------------
  |  Branch (89:12): [True: 0, False: 145k]
  ------------------
   90|      0|        && es->err_marks[top] == 0) {
  ------------------
  |  Branch (90:12): [True: 0, False: 0]
  ------------------
   91|      0|        top = top > 0 ? top - 1 : ERR_NUM_ERRORS - 1;
  ------------------
  |  |   14|      0|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (91:15): [True: 0, False: 0]
  ------------------
   92|      0|    }
   93|       |
   94|   145k|    if (es->bottom == top)
  ------------------
  |  Branch (94:9): [True: 145k, False: 0]
  ------------------
   95|   145k|        return 0;
   96|      0|    es->err_marks[top]--;
   97|      0|    return 1;
   98|   145k|}

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

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

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

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

evp_md_ctx_clear_digest:
   27|  1.57M|{
   28|  1.57M|    if (ctx->algctx != NULL) {
  ------------------
  |  Branch (28:9): [True: 716k, False: 854k]
  ------------------
   29|   716k|        if (ctx->digest != NULL && ctx->digest->freectx != NULL)
  ------------------
  |  Branch (29:13): [True: 716k, False: 0]
  |  Branch (29:36): [True: 716k, False: 0]
  ------------------
   30|   716k|            ctx->digest->freectx(ctx->algctx);
   31|   716k|        ctx->algctx = NULL;
   32|   716k|        EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_CLEANED);
  ------------------
  |  |  173|   716k|#define EVP_MD_CTX_FLAG_CLEANED 0x0002 /* context has already been \
  ------------------
   33|   716k|    }
   34|       |
   35|       |    /* Code below to be removed when legacy support is dropped. */
   36|       |
   37|       |    /*
   38|       |     * Don't assume ctx->md_data was cleaned in EVP_Digest_Final, because
   39|       |     * sometimes only copies of the context are ever finalised.
   40|       |     */
   41|  1.57M|    if (force)
  ------------------
  |  Branch (41:9): [True: 10.8k, False: 1.56M]
  ------------------
   42|  10.8k|        ctx->digest = NULL;
   43|       |
   44|       |    /* Non legacy code, this has to be later than the ctx->digest cleaning */
   45|  1.57M|    if (!keep_fetched) {
  ------------------
  |  Branch (45:9): [True: 1.30M, False: 267k]
  ------------------
   46|  1.30M|        EVP_MD_free(ctx->fetched_digest);
   47|  1.30M|        ctx->fetched_digest = NULL;
   48|       |        ctx->reqdigest = NULL;
   49|  1.30M|    }
   50|  1.57M|}
EVP_MD_CTX_reset:
   75|  1.85M|{
   76|  1.85M|    return evp_md_ctx_reset_ex(ctx, 0);
   77|  1.85M|}
EVP_MD_CTX_new:
  106|   727k|{
  107|   727k|    return OPENSSL_zalloc(sizeof(EVP_MD_CTX));
  ------------------
  |  |  109|   727k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  108|   727k|}
EVP_MD_CTX_free:
  111|   861k|{
  112|   861k|    if (ctx == NULL)
  ------------------
  |  Branch (112:9): [True: 134k, False: 727k]
  ------------------
  113|   134k|        return;
  114|       |
  115|   727k|    EVP_MD_CTX_reset(ctx);
  116|   727k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|   727k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  117|   727k|}
evp_md_ctx_free_algctx:
  120|   485k|{
  121|   485k|    if (ctx->algctx != NULL) {
  ------------------
  |  Branch (121:9): [True: 25.4k, False: 459k]
  ------------------
  122|  25.4k|        if (!ossl_assert(ctx->digest != NULL)) {
  ------------------
  |  |   52|  25.4k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  25.4k|    __FILE__, __LINE__)
  ------------------
  |  Branch (122:13): [True: 0, False: 25.4k]
  ------------------
  123|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  124|      0|            return 0;
  125|      0|        }
  126|  25.4k|        if (ctx->digest->freectx != NULL)
  ------------------
  |  Branch (126:13): [True: 25.4k, False: 0]
  ------------------
  127|  25.4k|            ctx->digest->freectx(ctx->algctx);
  128|  25.4k|        ctx->algctx = NULL;
  129|  25.4k|    }
  130|   485k|    return 1;
  131|   485k|}
EVP_DigestInit_ex2:
  226|  10.8k|{
  227|  10.8k|    return evp_md_init_internal(ctx, type, params);
  228|  10.8k|}
EVP_DigestInit_ex:
  237|   583k|{
  238|   583k|    if (!ossl_assert(impl == NULL))
  ------------------
  |  |   52|   583k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   583k|    __FILE__, __LINE__)
  ------------------
  |  Branch (238:9): [True: 0, False: 583k]
  ------------------
  239|      0|        return 0;
  240|   583k|    return evp_md_init_internal(ctx, type, NULL);
  241|   583k|}
EVP_DigestUpdate:
  244|  1.16M|{
  245|  1.16M|    if (ossl_unlikely(count == 0))
  ------------------
  |  |   23|  1.16M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.16M]
  |  |  ------------------
  ------------------
  246|      0|        return 1;
  247|       |
  248|  1.16M|    if (ossl_unlikely((ctx->flags & EVP_MD_CTX_FLAG_FINALISED) != 0)) {
  ------------------
  |  |   23|  1.16M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.16M]
  |  |  ------------------
  ------------------
  249|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  250|      0|        return 0;
  251|      0|    }
  252|       |
  253|  1.16M|    if (ossl_unlikely(ctx->pctx != NULL)
  ------------------
  |  |   23|  2.33M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.16M]
  |  |  ------------------
  ------------------
  254|      0|        && EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx->pctx)
  ------------------
  |  |  473|  1.16M|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1547|      0|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1531|      0|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1541|      0|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1548|      0|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1532|      0|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1542|      0|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1549|      0|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1533|      0|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1550|      0|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1534|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1535|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (473:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  255|      0|        && ctx->pctx->op.sig.algctx != NULL) {
  ------------------
  |  Branch (255:12): [True: 0, False: 0]
  ------------------
  256|      0|#ifndef FIPS_MODULE
  257|       |        /*
  258|       |         * Prior to OpenSSL 3.0 EVP_DigestSignUpdate() and
  259|       |         * EVP_DigestVerifyUpdate() were just macros for EVP_DigestUpdate().
  260|       |         * Some code calls EVP_DigestUpdate() directly even when initialised
  261|       |         * with EVP_DigestSignInit_ex() or
  262|       |         * EVP_DigestVerifyInit_ex(), so we detect that and redirect to
  263|       |         * the correct EVP_Digest*Update() function
  264|       |         */
  265|      0|        if (ctx->pctx->operation == EVP_PKEY_OP_SIGNCTX)
  ------------------
  |  | 1534|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  ------------------
  |  Branch (265:13): [True: 0, False: 0]
  ------------------
  266|      0|            return EVP_DigestSignUpdate(ctx, data, count);
  267|      0|        if (ctx->pctx->operation == EVP_PKEY_OP_VERIFYCTX)
  ------------------
  |  | 1535|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  ------------------
  |  Branch (267:13): [True: 0, False: 0]
  ------------------
  268|      0|            return EVP_DigestVerifyUpdate(ctx, data, count);
  269|      0|#endif
  270|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  271|      0|        return 0;
  272|      0|    }
  273|       |
  274|  1.16M|    if (ctx->digest == NULL || ctx->digest->prov == NULL) {
  ------------------
  |  Branch (274:9): [True: 0, False: 1.16M]
  |  Branch (274:32): [True: 0, False: 1.16M]
  ------------------
  275|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  276|      0|        return 0;
  277|      0|    }
  278|       |
  279|  1.16M|    if (ossl_unlikely(ctx->digest->dupdate == NULL)) {
  ------------------
  |  |   23|  1.16M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.16M]
  |  |  ------------------
  ------------------
  280|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  281|      0|        return 0;
  282|      0|    }
  283|  1.16M|    return ctx->digest->dupdate(ctx->algctx, data, count);
  284|  1.16M|}
EVP_DigestFinal_ex:
  297|   506k|{
  298|   506k|    int ret, sz;
  299|   506k|    size_t size = 0;
  300|   506k|    size_t mdsize = 0;
  301|       |
  302|   506k|    if (ossl_unlikely(ctx->digest == NULL))
  ------------------
  |  |   23|   506k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 506k]
  |  |  ------------------
  ------------------
  303|      0|        return 0;
  304|       |
  305|   506k|    sz = EVP_MD_CTX_get_size(ctx);
  ------------------
  |  |  482|   506k|#define EVP_MD_CTX_get_size(e) EVP_MD_CTX_get_size_ex(e)
  ------------------
  306|   506k|    if (ossl_unlikely(sz < 0))
  ------------------
  |  |   23|   506k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 506k]
  |  |  ------------------
  ------------------
  307|      0|        return 0;
  308|   506k|    mdsize = sz;
  309|   506k|    if (ossl_unlikely(ctx->digest->prov == NULL)) {
  ------------------
  |  |   23|   506k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 506k]
  |  |  ------------------
  ------------------
  310|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  311|      0|        return 0;
  312|      0|    }
  313|       |
  314|   506k|    if (ossl_unlikely(ctx->digest->dfinal == NULL)) {
  ------------------
  |  |   23|   506k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 506k]
  |  |  ------------------
  ------------------
  315|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  316|      0|        return 0;
  317|      0|    }
  318|       |
  319|   506k|    if (ossl_unlikely((ctx->flags & EVP_MD_CTX_FLAG_FINALISED) != 0)) {
  ------------------
  |  |   23|   506k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 506k]
  |  |  ------------------
  ------------------
  320|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  321|      0|        return 0;
  322|      0|    }
  323|       |
  324|   506k|    ret = ctx->digest->dfinal(ctx->algctx, md, &size, mdsize);
  325|       |
  326|   506k|    ctx->flags |= EVP_MD_CTX_FLAG_FINALISED;
  ------------------
  |  |   33|   506k|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  327|       |
  328|   506k|    if (isize != NULL) {
  ------------------
  |  Branch (328:9): [True: 264k, False: 242k]
  ------------------
  329|   264k|        if (ossl_likely(size <= UINT_MAX)) {
  ------------------
  |  |   22|   264k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 264k, False: 0]
  |  |  ------------------
  ------------------
  330|   264k|            *isize = (unsigned int)size;
  331|   264k|        } else {
  332|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  333|      0|            ret = 0;
  334|      0|        }
  335|   264k|    }
  336|       |
  337|   506k|    return ret;
  338|   506k|}
EVP_DigestFinalXOF:
  342|  76.2k|{
  343|  76.2k|    int ret = 0;
  344|  76.2k|    OSSL_PARAM params[2];
  345|  76.2k|    size_t i = 0;
  346|       |
  347|  76.2k|    if (ossl_unlikely(ctx->digest == NULL)) {
  ------------------
  |  |   23|  76.2k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 76.2k]
  |  |  ------------------
  ------------------
  348|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_NULL_ALGORITHM);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  349|      0|        return 0;
  350|      0|    }
  351|       |
  352|  76.2k|    if (ossl_unlikely(ctx->digest->prov == NULL)) {
  ------------------
  |  |   23|  76.2k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 76.2k]
  |  |  ------------------
  ------------------
  353|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  354|      0|        return 0;
  355|      0|    }
  356|       |
  357|  76.2k|    if (ossl_unlikely(ctx->digest->dfinal == NULL)) {
  ------------------
  |  |   23|  76.2k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 76.2k]
  |  |  ------------------
  ------------------
  358|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  359|      0|        return 0;
  360|      0|    }
  361|       |
  362|  76.2k|    if (ossl_unlikely((ctx->flags & EVP_MD_CTX_FLAG_FINALISED) != 0)) {
  ------------------
  |  |   23|  76.2k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 76.2k]
  |  |  ------------------
  ------------------
  363|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  364|      0|        return 0;
  365|      0|    }
  366|       |
  367|       |    /*
  368|       |     * For backward compatibility we pass the XOFLEN via a param here so that
  369|       |     * older providers can use the supplied value. Ideally we should have just
  370|       |     * used the size passed into ctx->digest->dfinal().
  371|       |     */
  372|  76.2k|    params[i++] = OSSL_PARAM_construct_size_t(OSSL_DIGEST_PARAM_XOFLEN, &size);
  ------------------
  |  |  236|  76.2k|# define OSSL_DIGEST_PARAM_XOFLEN "xoflen"
  ------------------
  373|  76.2k|    params[i++] = OSSL_PARAM_construct_end();
  374|       |
  375|  76.2k|    if (ossl_likely(EVP_MD_CTX_set_params(ctx, params) >= 0))
  ------------------
  |  |   22|  76.2k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 76.2k, False: 0]
  |  |  ------------------
  ------------------
  376|  76.2k|        ret = ctx->digest->dfinal(ctx->algctx, md, &size, size);
  377|       |
  378|  76.2k|    ctx->flags |= EVP_MD_CTX_FLAG_FINALISED;
  ------------------
  |  |   33|  76.2k|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  379|       |
  380|  76.2k|    return ret;
  381|  76.2k|}
EVP_DigestSqueeze:
  385|   196k|{
  386|   196k|    if (ctx->digest == NULL) {
  ------------------
  |  Branch (386:9): [True: 0, False: 196k]
  ------------------
  387|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_NULL_ALGORITHM);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  388|      0|        return 0;
  389|      0|    }
  390|       |
  391|   196k|    if (ctx->digest->prov == NULL) {
  ------------------
  |  Branch (391:9): [True: 0, False: 196k]
  ------------------
  392|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_OPERATION);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  393|      0|        return 0;
  394|      0|    }
  395|       |
  396|   196k|    if (ctx->digest->dsqueeze == NULL) {
  ------------------
  |  Branch (396:9): [True: 0, False: 196k]
  ------------------
  397|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_METHOD_NOT_SUPPORTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  398|      0|        return 0;
  399|      0|    }
  400|       |
  401|   196k|    return ctx->digest->dsqueeze(ctx->algctx, md, &size, size);
  402|   196k|}
EVP_MD_CTX_copy_ex:
  473|   456k|{
  474|   456k|    int digest_change = 0;
  475|       |
  476|   456k|    if (in == NULL) {
  ------------------
  |  Branch (476:9): [True: 0, False: 456k]
  ------------------
  477|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  478|      0|        return 0;
  479|      0|    }
  480|       |
  481|   456k|    if (in->digest == NULL) {
  ------------------
  |  Branch (481:9): [True: 0, False: 456k]
  ------------------
  482|       |        /* copying uninitialized digest context */
  483|      0|        EVP_MD_CTX_reset(out);
  484|      0|        if (out->fetched_digest != NULL)
  ------------------
  |  Branch (484:13): [True: 0, False: 0]
  ------------------
  485|      0|            EVP_MD_free(out->fetched_digest);
  486|      0|        *out = *in;
  487|      0|        goto clone_pkey;
  488|      0|    }
  489|       |
  490|   456k|    if (in->digest->prov == NULL || in->digest->dupctx == NULL) {
  ------------------
  |  Branch (490:9): [True: 0, False: 456k]
  |  Branch (490:37): [True: 0, False: 456k]
  ------------------
  491|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NOT_ABLE_TO_COPY_CTX);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  492|      0|        return 0;
  493|      0|    }
  494|       |
  495|   456k|    if (out->digest == in->digest && in->digest->copyctx != NULL) {
  ------------------
  |  Branch (495:9): [True: 188k, False: 267k]
  |  Branch (495:38): [True: 188k, False: 0]
  ------------------
  496|       |
  497|   188k|        in->digest->copyctx(out->algctx, in->algctx);
  498|       |
  499|   188k|        EVP_PKEY_CTX_free(out->pctx);
  500|   188k|        out->pctx = NULL;
  501|       |
  502|   188k|        out->flags = in->flags;
  503|   267k|    } else {
  504|   267k|        evp_md_ctx_reset_ex(out, 1);
  505|   267k|        digest_change = (out->fetched_digest != in->fetched_digest);
  506|       |
  507|   267k|        if (digest_change && in->fetched_digest != NULL
  ------------------
  |  Branch (507:13): [True: 267k, False: 0]
  |  Branch (507:30): [True: 267k, False: 0]
  ------------------
  508|   267k|            && !EVP_MD_up_ref(in->fetched_digest))
  ------------------
  |  Branch (508:16): [True: 0, False: 267k]
  ------------------
  509|      0|            return 0;
  510|   267k|        if (digest_change && out->fetched_digest != NULL)
  ------------------
  |  Branch (510:13): [True: 267k, False: 0]
  |  Branch (510:30): [True: 0, False: 267k]
  ------------------
  511|      0|            EVP_MD_free(out->fetched_digest);
  512|   267k|        *out = *in;
  513|       |        /* NULL out pointers in case of error */
  514|   267k|        out->pctx = NULL;
  515|   267k|        out->algctx = NULL;
  516|       |
  517|   267k|        if (in->algctx != NULL) {
  ------------------
  |  Branch (517:13): [True: 267k, False: 0]
  ------------------
  518|   267k|            out->algctx = in->digest->dupctx(in->algctx);
  519|   267k|            if (out->algctx == NULL) {
  ------------------
  |  Branch (519:17): [True: 0, False: 267k]
  ------------------
  520|      0|                ERR_raise(ERR_LIB_EVP, EVP_R_NOT_ABLE_TO_COPY_CTX);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  521|      0|                return 0;
  522|      0|            }
  523|   267k|        }
  524|   267k|    }
  525|       |
  526|   456k|clone_pkey:
  527|       |    /* copied EVP_MD_CTX should free the copied EVP_PKEY_CTX */
  528|   456k|    EVP_MD_CTX_clear_flags(out, EVP_MD_CTX_FLAG_KEEP_PKEY_CTX);
  ------------------
  |  |   32|   456k|#define EVP_MD_CTX_FLAG_KEEP_PKEY_CTX 0x0400
  ------------------
  529|   456k|#ifndef FIPS_MODULE
  530|   456k|    if (in->pctx != NULL) {
  ------------------
  |  Branch (530:9): [True: 0, False: 456k]
  ------------------
  531|      0|        out->pctx = EVP_PKEY_CTX_dup(in->pctx);
  532|      0|        if (out->pctx == NULL) {
  ------------------
  |  Branch (532:13): [True: 0, False: 0]
  ------------------
  533|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_NOT_ABLE_TO_COPY_CTX);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  534|      0|            EVP_MD_CTX_reset(out);
  535|      0|            return 0;
  536|      0|        }
  537|      0|    }
  538|   456k|#endif
  539|       |
  540|   456k|    return 1;
  541|   456k|}
EVP_Digest:
  546|  17.9k|{
  547|  17.9k|    EVP_MD_CTX *ctx;
  548|  17.9k|    int ret;
  549|       |
  550|  17.9k|    if (!ossl_assert(impl == NULL))
  ------------------
  |  |   52|  17.9k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  17.9k|    __FILE__, __LINE__)
  ------------------
  |  Branch (550:9): [True: 0, False: 17.9k]
  ------------------
  551|      0|        return 0;
  552|       |
  553|  17.9k|    ctx = EVP_MD_CTX_new();
  554|  17.9k|    if (ctx == NULL)
  ------------------
  |  Branch (554:9): [True: 0, False: 17.9k]
  ------------------
  555|      0|        return 0;
  556|  17.9k|    EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_ONESHOT);
  ------------------
  |  |  171|  17.9k|#define EVP_MD_CTX_FLAG_ONESHOT 0x0001 /* digest update will be \
  ------------------
  557|  17.9k|    ret = EVP_DigestInit_ex(ctx, type, NULL)
  ------------------
  |  Branch (557:11): [True: 17.9k, False: 0]
  ------------------
  558|  17.9k|        && EVP_DigestUpdate(ctx, data, count)
  ------------------
  |  Branch (558:12): [True: 17.9k, False: 0]
  ------------------
  559|  17.9k|        && EVP_DigestFinal_ex(ctx, md, size);
  ------------------
  |  Branch (559:12): [True: 17.9k, False: 0]
  ------------------
  560|  17.9k|    EVP_MD_CTX_free(ctx);
  561|       |
  562|  17.9k|    return ret;
  563|  17.9k|}
EVP_MD_CTX_set_params:
  598|  76.2k|{
  599|  76.2k|    EVP_PKEY_CTX *pctx = ctx->pctx;
  600|       |
  601|       |    /* If we have a pctx then we should try that first */
  602|  76.2k|    if (ossl_unlikely(pctx != NULL)
  ------------------
  |  |   23|   152k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 76.2k]
  |  |  ------------------
  ------------------
  603|      0|        && (pctx->operation == EVP_PKEY_OP_VERIFYCTX
  ------------------
  |  | 1535|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  ------------------
  |  Branch (603:13): [True: 0, False: 0]
  ------------------
  604|      0|            || pctx->operation == EVP_PKEY_OP_SIGNCTX)
  ------------------
  |  | 1534|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  ------------------
  |  Branch (604:16): [True: 0, False: 0]
  ------------------
  605|      0|        && pctx->op.sig.algctx != NULL
  ------------------
  |  Branch (605:12): [True: 0, False: 0]
  ------------------
  606|      0|        && pctx->op.sig.signature->set_ctx_md_params != NULL)
  ------------------
  |  Branch (606:12): [True: 0, False: 0]
  ------------------
  607|      0|        return pctx->op.sig.signature->set_ctx_md_params(pctx->op.sig.algctx,
  608|      0|            params);
  609|       |
  610|  76.2k|    if (ossl_likely(ctx->digest != NULL && ctx->digest->set_ctx_params != NULL))
  ------------------
  |  |   22|   152k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 76.2k, False: 0]
  |  |  |  Branch (22:44): [True: 76.2k, False: 0]
  |  |  |  Branch (22:44): [True: 76.2k, False: 0]
  |  |  ------------------
  ------------------
  611|  76.2k|        return ctx->digest->set_ctx_params(ctx->algctx, params);
  612|       |
  613|      0|    return 0;
  614|  76.2k|}
EVP_MD_CTX_gettable_params:
  684|   571k|{
  685|   571k|    EVP_PKEY_CTX *pctx;
  686|   571k|    void *provctx;
  687|       |
  688|   571k|    if (ossl_unlikely(ctx == NULL))
  ------------------
  |  |   23|   571k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 571k]
  |  |  ------------------
  ------------------
  689|      0|        return NULL;
  690|       |
  691|       |    /* If we have a pctx then we should try that first */
  692|   571k|    pctx = ctx->pctx;
  693|   571k|    if (ossl_unlikely(pctx != NULL)
  ------------------
  |  |   23|  1.14M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 571k]
  |  |  ------------------
  ------------------
  694|      0|        && (pctx->operation == EVP_PKEY_OP_VERIFYCTX
  ------------------
  |  | 1535|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  ------------------
  |  Branch (694:13): [True: 0, False: 0]
  ------------------
  695|      0|            || pctx->operation == EVP_PKEY_OP_SIGNCTX)
  ------------------
  |  | 1534|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  ------------------
  |  Branch (695:16): [True: 0, False: 0]
  ------------------
  696|      0|        && pctx->op.sig.signature != NULL
  ------------------
  |  Branch (696:12): [True: 0, False: 0]
  ------------------
  697|      0|        && pctx->op.sig.signature->gettable_ctx_md_params != NULL
  ------------------
  |  Branch (697:12): [True: 0, False: 0]
  ------------------
  698|      0|        && pctx->op.sig.algctx != NULL)
  ------------------
  |  Branch (698:12): [True: 0, False: 0]
  ------------------
  699|      0|        return pctx->op.sig.signature->gettable_ctx_md_params(
  700|      0|            pctx->op.sig.algctx);
  701|       |
  702|   571k|    if (ossl_unlikely(ctx->digest != NULL
  ------------------
  |  |   23|  1.14M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 571k]
  |  |  |  Branch (23:46): [True: 571k, False: 0]
  |  |  |  Branch (23:46): [True: 0, False: 571k]
  |  |  ------------------
  ------------------
  703|   571k|            && ctx->digest->gettable_ctx_params != NULL)) {
  704|      0|        provctx = ossl_provider_ctx(EVP_MD_get0_provider(ctx->digest));
  705|      0|        return ctx->digest->gettable_ctx_params(ctx->algctx, provctx);
  706|      0|    }
  707|   571k|    return NULL;
  708|   571k|}
evp_md_new:
  757|     30|{
  758|     30|    EVP_MD *md = OPENSSL_zalloc(sizeof(*md));
  ------------------
  |  |  109|     30|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  759|       |
  760|     30|    if (md != NULL && !CRYPTO_NEW_REF(&md->refcnt, 1)) {
  ------------------
  |  Branch (760:9): [True: 30, False: 0]
  |  Branch (760:23): [True: 0, False: 30]
  ------------------
  761|      0|        OPENSSL_free(md);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  762|      0|        return NULL;
  763|      0|    }
  764|     30|    return md;
  765|     30|}
EVP_MD_fetch:
  984|   396k|{
  985|   396k|    EVP_MD *md = evp_generic_fetch(ctx, OSSL_OP_DIGEST, algorithm, properties,
  ------------------
  |  |  283|   396k|#define OSSL_OP_DIGEST 1
  ------------------
  986|   396k|        evp_md_from_algorithm, evp_md_up_ref, evp_md_free);
  987|       |
  988|   396k|    return md;
  989|   396k|}
EVP_MD_up_ref:
  992|  1.09M|{
  993|  1.09M|    int ref = 0;
  994|       |
  995|  1.09M|    if (md->origin == EVP_ORIG_DYNAMIC)
  ------------------
  |  |  186|  1.09M|#define EVP_ORIG_DYNAMIC 0
  ------------------
  |  Branch (995:9): [True: 1.09M, False: 0]
  ------------------
  996|  1.09M|        CRYPTO_UP_REF(&md->refcnt, &ref);
  997|  1.09M|    return 1;
  998|  1.09M|}
EVP_MD_free:
 1001|  2.32M|{
 1002|  2.32M|    int i;
 1003|       |
 1004|  2.32M|    if (md == NULL || md->origin != EVP_ORIG_DYNAMIC)
  ------------------
  |  |  186|  1.09M|#define EVP_ORIG_DYNAMIC 0
  ------------------
  |  Branch (1004:9): [True: 1.23M, False: 1.09M]
  |  Branch (1004:23): [True: 0, False: 1.09M]
  ------------------
 1005|  1.23M|        return;
 1006|       |
 1007|  1.09M|    CRYPTO_DOWN_REF(&md->refcnt, &i);
 1008|  1.09M|    if (i > 0)
  ------------------
  |  Branch (1008:9): [True: 1.09M, False: 0]
  ------------------
 1009|  1.09M|        return;
 1010|       |
 1011|      0|    OPENSSL_free(md->type_name);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1012|      0|    ossl_provider_free(md->prov);
 1013|      0|    CRYPTO_FREE_REF(&md->refcnt);
 1014|      0|    OPENSSL_free(md);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1015|      0|}
digest.c:evp_md_ctx_reset_ex:
   53|  2.12M|{
   54|  2.12M|    if (ctx == NULL)
  ------------------
  |  Branch (54:9): [True: 564k, False: 1.56M]
  ------------------
   55|   564k|        return 1;
   56|       |
   57|       |    /*
   58|       |     * pctx should be freed by the user of EVP_MD_CTX
   59|       |     * if EVP_MD_CTX_FLAG_KEEP_PKEY_CTX is set
   60|       |     */
   61|  1.56M|    if (!EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_KEEP_PKEY_CTX)) {
  ------------------
  |  |   32|  1.56M|#define EVP_MD_CTX_FLAG_KEEP_PKEY_CTX 0x0400
  ------------------
  |  Branch (61:9): [True: 1.56M, False: 0]
  ------------------
   62|  1.56M|        EVP_PKEY_CTX_free(ctx->pctx);
   63|  1.56M|        ctx->pctx = NULL;
   64|  1.56M|    }
   65|       |
   66|  1.56M|    evp_md_ctx_clear_digest(ctx, 0, keep_fetched);
   67|  1.56M|    if (!keep_fetched)
  ------------------
  |  Branch (67:9): [True: 1.29M, False: 267k]
  ------------------
   68|  1.29M|        OPENSSL_cleanse(ctx, sizeof(*ctx));
   69|       |
   70|  1.56M|    return 1;
   71|  2.12M|}
digest.c:evp_md_init_internal:
  135|   593k|{
  136|   593k|#if !defined(FIPS_MODULE)
  137|   593k|    if (ctx->pctx != NULL
  ------------------
  |  Branch (137:9): [True: 0, False: 593k]
  ------------------
  138|      0|        && EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx->pctx)
  ------------------
  |  |  473|   593k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1547|      0|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1531|      0|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1541|      0|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1548|      0|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1532|      0|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1542|      0|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1549|      0|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1533|      0|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1550|      0|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1534|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1535|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (473:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  139|      0|        && ctx->pctx->op.sig.algctx != NULL) {
  ------------------
  |  Branch (139:12): [True: 0, False: 0]
  ------------------
  140|       |        /*
  141|       |         * Prior to OpenSSL 3.0 calling EVP_DigestInit_ex() on an mdctx
  142|       |         * previously initialised with EVP_DigestSignInit() would retain
  143|       |         * information about the key, and re-initialise for another sign
  144|       |         * operation. So in that case we redirect to EVP_DigestSignInit()
  145|       |         */
  146|      0|        if (ctx->pctx->operation == EVP_PKEY_OP_SIGNCTX)
  ------------------
  |  | 1534|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  ------------------
  |  Branch (146:13): [True: 0, False: 0]
  ------------------
  147|      0|            return EVP_DigestSignInit(ctx, NULL, type, NULL, NULL);
  148|      0|        if (ctx->pctx->operation == EVP_PKEY_OP_VERIFYCTX)
  ------------------
  |  | 1535|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  ------------------
  |  Branch (148:13): [True: 0, False: 0]
  ------------------
  149|      0|            return EVP_DigestVerifyInit(ctx, NULL, type, NULL, NULL);
  150|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  151|      0|        return 0;
  152|      0|    }
  153|   593k|#endif
  154|       |
  155|   593k|    EVP_MD_CTX_clear_flags(ctx, EVP_MD_CTX_FLAG_CLEANED | EVP_MD_CTX_FLAG_FINALISED);
  ------------------
  |  |  173|   593k|#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|   593k|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  156|       |
  157|   593k|    if (type != NULL) {
  ------------------
  |  Branch (157:9): [True: 593k, False: 0]
  ------------------
  158|   593k|        ctx->reqdigest = type;
  159|   593k|    } else {
  160|      0|        if (ossl_unlikely(ctx->digest == NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  161|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_NO_DIGEST_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  162|      0|            return 0;
  163|      0|        }
  164|      0|        type = ctx->digest;
  165|      0|    }
  166|       |
  167|   593k|    if (ossl_likely(ctx->digest == type)) {
  ------------------
  |  |   22|   593k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 119k, False: 474k]
  |  |  ------------------
  ------------------
  168|   119k|        if (ossl_unlikely(!ossl_assert(type->prov != NULL))) {
  ------------------
  |  |   23|   119k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 119k]
  |  |  ------------------
  ------------------
  169|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  170|      0|            return 0;
  171|      0|        }
  172|   474k|    } else {
  173|   474k|        if (!evp_md_ctx_free_algctx(ctx))
  ------------------
  |  Branch (173:13): [True: 0, False: 474k]
  ------------------
  174|      0|            return 0;
  175|   474k|    }
  176|       |
  177|   593k|    if (ossl_unlikely(type->prov == NULL)) {
  ------------------
  |  |   23|   593k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 3.56k, False: 590k]
  |  |  ------------------
  ------------------
  178|       |#ifdef FIPS_MODULE
  179|       |        /* We only do explicit fetches inside the FIPS module */
  180|       |        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  181|       |        return 0;
  182|       |#else
  183|       |        /* The NULL digest is a special case */
  184|  3.56k|        EVP_MD *provmd = EVP_MD_fetch(NULL,
  185|  3.56k|            type->type != NID_undef ? OBJ_nid2sn(type->type)
  ------------------
  |  |   18|  3.56k|#define NID_undef                       0
  ------------------
  |  Branch (185:13): [True: 3.56k, False: 0]
  ------------------
  186|  3.56k|                                    : "NULL",
  187|  3.56k|            "");
  188|       |
  189|  3.56k|        if (provmd == NULL) {
  ------------------
  |  Branch (189:13): [True: 0, False: 3.56k]
  ------------------
  190|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  191|      0|            return 0;
  192|      0|        }
  193|  3.56k|        type = provmd;
  194|  3.56k|        EVP_MD_free(ctx->fetched_digest);
  195|  3.56k|        ctx->fetched_digest = provmd;
  196|  3.56k|#endif
  197|  3.56k|    }
  198|       |
  199|   593k|    if (ossl_unlikely(type->prov != NULL && ctx->fetched_digest != type)) {
  ------------------
  |  |   23|  1.18M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 470k, False: 123k]
  |  |  |  Branch (23:46): [True: 593k, False: 0]
  |  |  |  Branch (23:46): [True: 470k, False: 123k]
  |  |  ------------------
  ------------------
  200|   470k|        if (ossl_unlikely(!EVP_MD_up_ref((EVP_MD *)type))) {
  ------------------
  |  |   23|   470k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 470k]
  |  |  ------------------
  ------------------
  201|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  202|      0|            return 0;
  203|      0|        }
  204|   470k|        EVP_MD_free(ctx->fetched_digest);
  205|   470k|        ctx->fetched_digest = (EVP_MD *)type;
  206|   470k|    }
  207|   593k|    ctx->digest = type;
  208|   593k|    if (ctx->algctx == NULL) {
  ------------------
  |  Branch (208:9): [True: 474k, False: 119k]
  ------------------
  209|   474k|        ctx->algctx = ctx->digest->newctx(ossl_provider_ctx(type->prov));
  210|   474k|        if (ctx->algctx == NULL) {
  ------------------
  |  Branch (210:13): [True: 0, False: 474k]
  ------------------
  211|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  212|      0|            return 0;
  213|      0|        }
  214|   474k|    }
  215|       |
  216|   593k|    if (ctx->digest->dinit == NULL) {
  ------------------
  |  Branch (216:9): [True: 0, False: 593k]
  ------------------
  217|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  218|      0|        return 0;
  219|      0|    }
  220|       |
  221|   593k|    return ctx->digest->dinit(ctx->algctx, params);
  222|   593k|}
digest.c:evp_md_from_algorithm:
  833|     30|{
  834|     30|    const OSSL_DISPATCH *fns = algodef->implementation;
  835|     30|    EVP_MD *md = NULL;
  836|     30|    int fncnt = 0;
  837|       |
  838|       |    /* EVP_MD_fetch() will set the legacy NID if available */
  839|     30|    if ((md = evp_md_new()) == NULL) {
  ------------------
  |  Branch (839:9): [True: 0, False: 30]
  ------------------
  840|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  841|      0|        return NULL;
  842|      0|    }
  843|       |
  844|     30|#ifndef FIPS_MODULE
  845|     30|    md->type = NID_undef;
  ------------------
  |  |   18|     30|#define NID_undef                       0
  ------------------
  846|     30|    if (!evp_names_do_all(prov, name_id, set_legacy_nid, &md->type)
  ------------------
  |  Branch (846:9): [True: 0, False: 30]
  ------------------
  847|     30|        || md->type == -1) {
  ------------------
  |  Branch (847:12): [True: 0, False: 30]
  ------------------
  848|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  849|      0|        goto err;
  850|      0|    }
  851|     30|#endif
  852|       |
  853|     30|    md->name_id = name_id;
  854|     30|    if ((md->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL)
  ------------------
  |  Branch (854:9): [True: 0, False: 30]
  ------------------
  855|      0|        goto err;
  856|       |
  857|     30|    md->description = algodef->algorithm_description;
  858|       |
  859|    381|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (859:12): [True: 351, False: 30]
  ------------------
  860|    351|        switch (fns->function_id) {
  ------------------
  |  Branch (860:17): [True: 351, False: 0]
  ------------------
  861|     30|        case OSSL_FUNC_DIGEST_NEWCTX:
  ------------------
  |  |  303|     30|#define OSSL_FUNC_DIGEST_NEWCTX 1
  ------------------
  |  Branch (861:9): [True: 30, False: 321]
  ------------------
  862|     30|            if (md->newctx == NULL) {
  ------------------
  |  Branch (862:17): [True: 30, False: 0]
  ------------------
  863|     30|                md->newctx = OSSL_FUNC_digest_newctx(fns);
  864|     30|                fncnt++;
  865|     30|            }
  866|     30|            break;
  867|     30|        case OSSL_FUNC_DIGEST_INIT:
  ------------------
  |  |  304|     30|#define OSSL_FUNC_DIGEST_INIT 2
  ------------------
  |  Branch (867:9): [True: 30, False: 321]
  ------------------
  868|     30|            if (md->dinit == NULL) {
  ------------------
  |  Branch (868:17): [True: 30, False: 0]
  ------------------
  869|     30|                md->dinit = OSSL_FUNC_digest_init(fns);
  870|     30|                fncnt++;
  871|     30|            }
  872|     30|            break;
  873|     30|        case OSSL_FUNC_DIGEST_UPDATE:
  ------------------
  |  |  305|     30|#define OSSL_FUNC_DIGEST_UPDATE 3
  ------------------
  |  Branch (873:9): [True: 30, False: 321]
  ------------------
  874|     30|            if (md->dupdate == NULL) {
  ------------------
  |  Branch (874:17): [True: 30, False: 0]
  ------------------
  875|     30|                md->dupdate = OSSL_FUNC_digest_update(fns);
  876|     30|                fncnt++;
  877|     30|            }
  878|     30|            break;
  879|     30|        case OSSL_FUNC_DIGEST_FINAL:
  ------------------
  |  |  306|     30|#define OSSL_FUNC_DIGEST_FINAL 4
  ------------------
  |  Branch (879:9): [True: 30, False: 321]
  ------------------
  880|     30|            if (md->dfinal == NULL) {
  ------------------
  |  Branch (880:17): [True: 30, False: 0]
  ------------------
  881|     30|                md->dfinal = OSSL_FUNC_digest_final(fns);
  882|     30|                fncnt++;
  883|     30|            }
  884|     30|            break;
  885|      6|        case OSSL_FUNC_DIGEST_SQUEEZE:
  ------------------
  |  |  316|      6|#define OSSL_FUNC_DIGEST_SQUEEZE 14
  ------------------
  |  Branch (885:9): [True: 6, False: 345]
  ------------------
  886|      6|            if (md->dsqueeze == NULL) {
  ------------------
  |  Branch (886:17): [True: 6, False: 0]
  ------------------
  887|      6|                md->dsqueeze = OSSL_FUNC_digest_squeeze(fns);
  888|      6|                fncnt++;
  889|      6|            }
  890|      6|            break;
  891|      0|        case OSSL_FUNC_DIGEST_DIGEST:
  ------------------
  |  |  307|      0|#define OSSL_FUNC_DIGEST_DIGEST 5
  ------------------
  |  Branch (891:9): [True: 0, False: 351]
  ------------------
  892|      0|            if (md->digest == NULL)
  ------------------
  |  Branch (892:17): [True: 0, False: 0]
  ------------------
  893|      0|                md->digest = OSSL_FUNC_digest_digest(fns);
  894|       |            /* We don't increment fnct for this as it is stand alone */
  895|      0|            break;
  896|     30|        case OSSL_FUNC_DIGEST_FREECTX:
  ------------------
  |  |  308|     30|#define OSSL_FUNC_DIGEST_FREECTX 6
  ------------------
  |  Branch (896:9): [True: 30, False: 321]
  ------------------
  897|     30|            if (md->freectx == NULL) {
  ------------------
  |  Branch (897:17): [True: 30, False: 0]
  ------------------
  898|     30|                md->freectx = OSSL_FUNC_digest_freectx(fns);
  899|     30|                fncnt++;
  900|     30|            }
  901|     30|            break;
  902|     30|        case OSSL_FUNC_DIGEST_DUPCTX:
  ------------------
  |  |  309|     30|#define OSSL_FUNC_DIGEST_DUPCTX 7
  ------------------
  |  Branch (902:9): [True: 30, False: 321]
  ------------------
  903|     30|            if (md->dupctx == NULL)
  ------------------
  |  Branch (903:17): [True: 30, False: 0]
  ------------------
  904|     30|                md->dupctx = OSSL_FUNC_digest_dupctx(fns);
  905|     30|            break;
  906|     30|        case OSSL_FUNC_DIGEST_GET_PARAMS:
  ------------------
  |  |  310|     30|#define OSSL_FUNC_DIGEST_GET_PARAMS 8
  ------------------
  |  Branch (906:9): [True: 30, False: 321]
  ------------------
  907|     30|            if (md->get_params == NULL)
  ------------------
  |  Branch (907:17): [True: 30, False: 0]
  ------------------
  908|     30|                md->get_params = OSSL_FUNC_digest_get_params(fns);
  909|     30|            break;
  910|     11|        case OSSL_FUNC_DIGEST_SET_CTX_PARAMS:
  ------------------
  |  |  311|     11|#define OSSL_FUNC_DIGEST_SET_CTX_PARAMS 9
  ------------------
  |  Branch (910:9): [True: 11, False: 340]
  ------------------
  911|     11|            if (md->set_ctx_params == NULL)
  ------------------
  |  Branch (911:17): [True: 11, False: 0]
  ------------------
  912|     11|                md->set_ctx_params = OSSL_FUNC_digest_set_ctx_params(fns);
  913|     11|            break;
  914|      9|        case OSSL_FUNC_DIGEST_GET_CTX_PARAMS:
  ------------------
  |  |  312|      9|#define OSSL_FUNC_DIGEST_GET_CTX_PARAMS 10
  ------------------
  |  Branch (914:9): [True: 9, False: 342]
  ------------------
  915|      9|            if (md->get_ctx_params == NULL)
  ------------------
  |  Branch (915:17): [True: 9, False: 0]
  ------------------
  916|      9|                md->get_ctx_params = OSSL_FUNC_digest_get_ctx_params(fns);
  917|      9|            break;
  918|     30|        case OSSL_FUNC_DIGEST_GETTABLE_PARAMS:
  ------------------
  |  |  313|     30|#define OSSL_FUNC_DIGEST_GETTABLE_PARAMS 11
  ------------------
  |  Branch (918:9): [True: 30, False: 321]
  ------------------
  919|     30|            if (md->gettable_params == NULL)
  ------------------
  |  Branch (919:17): [True: 30, False: 0]
  ------------------
  920|     30|                md->gettable_params = OSSL_FUNC_digest_gettable_params(fns);
  921|     30|            break;
  922|     11|        case OSSL_FUNC_DIGEST_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  314|     11|#define OSSL_FUNC_DIGEST_SETTABLE_CTX_PARAMS 12
  ------------------
  |  Branch (922:9): [True: 11, False: 340]
  ------------------
  923|     11|            if (md->settable_ctx_params == NULL)
  ------------------
  |  Branch (923:17): [True: 11, False: 0]
  ------------------
  924|     11|                md->settable_ctx_params = OSSL_FUNC_digest_settable_ctx_params(fns);
  925|     11|            break;
  926|      9|        case OSSL_FUNC_DIGEST_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  315|      9|#define OSSL_FUNC_DIGEST_GETTABLE_CTX_PARAMS 13
  ------------------
  |  Branch (926:9): [True: 9, False: 342]
  ------------------
  927|      9|            if (md->gettable_ctx_params == NULL)
  ------------------
  |  Branch (927:17): [True: 9, False: 0]
  ------------------
  928|      9|                md->gettable_ctx_params = OSSL_FUNC_digest_gettable_ctx_params(fns);
  929|      9|            break;
  930|     27|        case OSSL_FUNC_DIGEST_COPYCTX:
  ------------------
  |  |  317|     27|#define OSSL_FUNC_DIGEST_COPYCTX 15
  ------------------
  |  Branch (930:9): [True: 27, False: 324]
  ------------------
  931|     27|            if (md->copyctx == NULL)
  ------------------
  |  Branch (931:17): [True: 27, False: 0]
  ------------------
  932|     27|                md->copyctx = OSSL_FUNC_digest_copyctx(fns);
  933|     27|            break;
  934|     19|        case OSSL_FUNC_DIGEST_SERIALIZE:
  ------------------
  |  |  318|     19|#define OSSL_FUNC_DIGEST_SERIALIZE 16
  ------------------
  |  Branch (934:9): [True: 19, False: 332]
  ------------------
  935|     19|            if (md->serialize == NULL)
  ------------------
  |  Branch (935:17): [True: 19, False: 0]
  ------------------
  936|     19|                md->serialize = OSSL_FUNC_digest_serialize(fns);
  937|     19|            break;
  938|     19|        case OSSL_FUNC_DIGEST_DESERIALIZE:
  ------------------
  |  |  319|     19|#define OSSL_FUNC_DIGEST_DESERIALIZE 17
  ------------------
  |  Branch (938:9): [True: 19, False: 332]
  ------------------
  939|     19|            if (md->deserialize == NULL)
  ------------------
  |  Branch (939:17): [True: 19, False: 0]
  ------------------
  940|     19|                md->deserialize = OSSL_FUNC_digest_deserialize(fns);
  941|     19|            break;
  942|    351|        }
  943|    351|    }
  944|     30|    if ((fncnt != 0 && fncnt != 5 && fncnt != 6)
  ------------------
  |  Branch (944:10): [True: 30, False: 0]
  |  Branch (944:24): [True: 6, False: 24]
  |  Branch (944:38): [True: 0, False: 6]
  ------------------
  945|     30|        || (fncnt == 0 && md->digest == NULL)) {
  ------------------
  |  Branch (945:13): [True: 0, False: 30]
  |  Branch (945:27): [True: 0, False: 0]
  ------------------
  946|       |        /*
  947|       |         * In order to be a consistent set of functions we either need the
  948|       |         * whole set of init/update/final etc functions or none of them.
  949|       |         * The "digest" function can standalone. We at least need one way to
  950|       |         * generate digests.
  951|       |         */
  952|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  953|      0|        goto err;
  954|      0|    }
  955|     30|    if (prov != NULL && !ossl_provider_up_ref(prov))
  ------------------
  |  Branch (955:9): [True: 30, False: 0]
  |  Branch (955:25): [True: 0, False: 30]
  ------------------
  956|      0|        goto err;
  957|       |
  958|     30|    md->prov = prov;
  959|       |
  960|     30|    if (!evp_md_cache_constants(md)) {
  ------------------
  |  Branch (960:9): [True: 0, False: 30]
  ------------------
  961|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_CACHE_CONSTANTS_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  962|      0|        goto err;
  963|      0|    }
  964|       |
  965|     30|    return md;
  966|       |
  967|      0|err:
  968|      0|    EVP_MD_free(md);
  969|       |    return NULL;
  970|     30|}
digest.c:set_legacy_nid:
  774|     78|{
  775|     78|    int nid;
  776|     78|    int *legacy_nid = vlegacy_nid;
  777|       |    /*
  778|       |     * We use lowest level function to get the associated method, because
  779|       |     * higher level functions such as EVP_get_digestbyname() have changed
  780|       |     * to look at providers too.
  781|       |     */
  782|     78|    const void *legacy_method = OBJ_NAME_get(name, OBJ_NAME_TYPE_MD_METH);
  ------------------
  |  |   25|     78|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
  783|       |
  784|     78|    if (*legacy_nid == -1) /* We found a clash already */
  ------------------
  |  Branch (784:9): [True: 0, False: 78]
  ------------------
  785|      0|        return;
  786|       |
  787|     78|    if (legacy_method == NULL)
  ------------------
  |  Branch (787:9): [True: 55, False: 23]
  ------------------
  788|     55|        return;
  789|     23|    nid = EVP_MD_nid(legacy_method);
  ------------------
  |  |  453|     23|#define EVP_MD_nid EVP_MD_get_type
  ------------------
  790|     23|    if (*legacy_nid != NID_undef && *legacy_nid != nid) {
  ------------------
  |  |   18|     46|#define NID_undef                       0
  ------------------
  |  Branch (790:9): [True: 4, False: 19]
  |  Branch (790:37): [True: 0, False: 4]
  ------------------
  791|      0|        *legacy_nid = -1;
  792|      0|        return;
  793|      0|    }
  794|     23|    *legacy_nid = nid;
  795|     23|}
digest.c:evp_md_cache_constants:
  799|     30|{
  800|     30|    int ok, xof = 0, algid_absent = 0;
  801|     30|    size_t blksz = 0;
  802|     30|    size_t mdsize = 0;
  803|     30|    OSSL_PARAM params[5];
  804|       |
  805|       |    /*
  806|       |     * Note that these parameters are 'constants' that are only set up
  807|       |     * during the EVP_MD_fetch(). For this reason the XOF functions set the
  808|       |     * md_size to 0, since the output size is unknown.
  809|       |     */
  810|     30|    params[0] = OSSL_PARAM_construct_size_t(OSSL_DIGEST_PARAM_BLOCK_SIZE, &blksz);
  ------------------
  |  |  223|     30|# define OSSL_DIGEST_PARAM_BLOCK_SIZE "blocksize"
  ------------------
  811|     30|    params[1] = OSSL_PARAM_construct_size_t(OSSL_DIGEST_PARAM_SIZE, &mdsize);
  ------------------
  |  |  233|     30|# define OSSL_DIGEST_PARAM_SIZE "size"
  ------------------
  812|     30|    params[2] = OSSL_PARAM_construct_int(OSSL_DIGEST_PARAM_XOF, &xof);
  ------------------
  |  |  235|     30|# define OSSL_DIGEST_PARAM_XOF "xof"
  ------------------
  813|     30|    params[3] = OSSL_PARAM_construct_int(OSSL_DIGEST_PARAM_ALGID_ABSENT,
  ------------------
  |  |  222|     30|# define OSSL_DIGEST_PARAM_ALGID_ABSENT "algid-absent"
  ------------------
  814|     30|        &algid_absent);
  815|     30|    params[4] = OSSL_PARAM_construct_end();
  816|     30|    ok = evp_do_md_getparams(md, params) > 0;
  817|     30|    if (mdsize > INT_MAX || blksz > INT_MAX)
  ------------------
  |  Branch (817:9): [True: 0, False: 30]
  |  Branch (817:29): [True: 0, False: 30]
  ------------------
  818|      0|        ok = 0;
  819|     30|    if (ok) {
  ------------------
  |  Branch (819:9): [True: 30, False: 0]
  ------------------
  820|     30|        md->block_size = (int)blksz;
  821|     30|        md->md_size = (int)mdsize;
  822|     30|        if (xof)
  ------------------
  |  Branch (822:13): [True: 6, False: 24]
  ------------------
  823|      6|            md->flags |= EVP_MD_FLAG_XOF;
  ------------------
  |  |  135|      6|#define EVP_MD_FLAG_XOF 0x0002
  ------------------
  824|     30|        if (algid_absent)
  ------------------
  |  Branch (824:13): [True: 21, False: 9]
  ------------------
  825|     21|            md->flags |= EVP_MD_FLAG_DIGALGID_ABSENT;
  ------------------
  |  |  147|     21|#define EVP_MD_FLAG_DIGALGID_ABSENT 0x0008
  ------------------
  826|     30|    }
  827|     30|    return ok;
  828|     30|}
digest.c:evp_md_up_ref:
  973|   345k|{
  974|   345k|    return EVP_MD_up_ref(md);
  975|   345k|}
digest.c:evp_md_free:
  978|     30|{
  979|     30|    EVP_MD_free(md);
  980|     30|}

EVP_aes_128_cbc:
   22|      2|    {                                                                                 \
   23|      2|        return &aes_##keylen##_##mode;                                                \
   24|      2|    }
EVP_aes_128_ecb:
   22|      2|    {                                                                                 \
   23|      2|        return &aes_##keylen##_##mode;                                                \
   24|      2|    }
EVP_aes_128_ofb:
   22|      2|    {                                                                                 \
   23|      2|        return &aes_##keylen##_##mode;                                                \
   24|      2|    }
EVP_aes_128_cfb128:
   22|      2|    {                                                                                 \
   23|      2|        return &aes_##keylen##_##mode;                                                \
   24|      2|    }
EVP_aes_128_cfb1:
   22|      2|    {                                                                                 \
   23|      2|        return &aes_##keylen##_##mode;                                                \
   24|      2|    }
EVP_aes_128_cfb8:
   22|      2|    {                                                                                 \
   23|      2|        return &aes_##keylen##_##mode;                                                \
   24|      2|    }
EVP_aes_128_ctr:
   22|      2|    {                                                                                 \
   23|      2|        return &aes_##keylen##_##mode;                                                \
   24|      2|    }
EVP_aes_192_cbc:
   22|      2|    {                                                                                 \
   23|      2|        return &aes_##keylen##_##mode;                                                \
   24|      2|    }
EVP_aes_192_ecb:
   22|      2|    {                                                                                 \
   23|      2|        return &aes_##keylen##_##mode;                                                \
   24|      2|    }
EVP_aes_192_ofb:
   22|      2|    {                                                                                 \
   23|      2|        return &aes_##keylen##_##mode;                                                \
   24|      2|    }
EVP_aes_192_cfb128:
   22|      2|    {                                                                                 \
   23|      2|        return &aes_##keylen##_##mode;                                                \
   24|      2|    }
EVP_aes_192_cfb1:
   22|      2|    {                                                                                 \
   23|      2|        return &aes_##keylen##_##mode;                                                \
   24|      2|    }
EVP_aes_192_cfb8:
   22|      2|    {                                                                                 \
   23|      2|        return &aes_##keylen##_##mode;                                                \
   24|      2|    }
EVP_aes_192_ctr:
   22|      2|    {                                                                                 \
   23|      2|        return &aes_##keylen##_##mode;                                                \
   24|      2|    }
EVP_aes_256_cbc:
   22|      2|    {                                                                                 \
   23|      2|        return &aes_##keylen##_##mode;                                                \
   24|      2|    }
EVP_aes_256_ecb:
   22|      2|    {                                                                                 \
   23|      2|        return &aes_##keylen##_##mode;                                                \
   24|      2|    }
EVP_aes_256_ofb:
   22|      2|    {                                                                                 \
   23|      2|        return &aes_##keylen##_##mode;                                                \
   24|      2|    }
EVP_aes_256_cfb128:
   22|      2|    {                                                                                 \
   23|      2|        return &aes_##keylen##_##mode;                                                \
   24|      2|    }
EVP_aes_256_cfb1:
   22|      2|    {                                                                                 \
   23|      2|        return &aes_##keylen##_##mode;                                                \
   24|      2|    }
EVP_aes_256_cfb8:
   22|      2|    {                                                                                 \
   23|      2|        return &aes_##keylen##_##mode;                                                \
   24|      2|    }
EVP_aes_256_ctr:
   22|      2|    {                                                                                 \
   23|      2|        return &aes_##keylen##_##mode;                                                \
   24|      2|    }
EVP_aes_128_gcm:
   36|      2|    {                                                                                                                      \
   37|      2|        return &aes_##keylen##_##mode;                                                                                     \
   38|      2|    }
EVP_aes_192_gcm:
   36|      2|    {                                                                                                                      \
   37|      2|        return &aes_##keylen##_##mode;                                                                                     \
   38|      2|    }
EVP_aes_256_gcm:
   36|      2|    {                                                                                                                      \
   37|      2|        return &aes_##keylen##_##mode;                                                                                     \
   38|      2|    }
EVP_aes_128_xts:
   36|      2|    {                                                                                                                      \
   37|      2|        return &aes_##keylen##_##mode;                                                                                     \
   38|      2|    }
EVP_aes_256_xts:
   36|      2|    {                                                                                                                      \
   37|      2|        return &aes_##keylen##_##mode;                                                                                     \
   38|      2|    }
EVP_aes_128_ccm:
   36|      2|    {                                                                                                                      \
   37|      2|        return &aes_##keylen##_##mode;                                                                                     \
   38|      2|    }
EVP_aes_192_ccm:
   36|      2|    {                                                                                                                      \
   37|      2|        return &aes_##keylen##_##mode;                                                                                     \
   38|      2|    }
EVP_aes_256_ccm:
   36|      2|    {                                                                                                                      \
   37|      2|        return &aes_##keylen##_##mode;                                                                                     \
   38|      2|    }
EVP_aes_128_wrap:
   89|      2|{
   90|      2|    return &aes_128_wrap;
   91|      2|}
EVP_aes_192_wrap:
   99|      2|{
  100|      2|    return &aes_192_wrap;
  101|      2|}
EVP_aes_256_wrap:
  109|      2|{
  110|      2|    return &aes_256_wrap;
  111|      2|}
EVP_aes_128_wrap_pad:
  119|      2|{
  120|      2|    return &aes_128_wrap_pad;
  121|      2|}
EVP_aes_192_wrap_pad:
  129|      2|{
  130|      2|    return &aes_192_wrap_pad;
  131|      2|}
EVP_aes_256_wrap_pad:
  139|      2|{
  140|      2|    return &aes_256_wrap_pad;
  141|      2|}
EVP_aes_128_ocb:
   36|      2|    {                                                                                                                      \
   37|      2|        return &aes_##keylen##_##mode;                                                                                     \
   38|      2|    }
EVP_aes_192_ocb:
   36|      2|    {                                                                                                                      \
   37|      2|        return &aes_##keylen##_##mode;                                                                                     \
   38|      2|    }
EVP_aes_256_ocb:
   36|      2|    {                                                                                                                      \
   37|      2|        return &aes_##keylen##_##mode;                                                                                     \
   38|      2|    }

EVP_aes_128_cbc_hmac_sha1:
   41|      2|{
   42|      2|    return (OPENSSL_ia32cap_P[1] & AESNI_CAPABLE ? &aesni_128_cbc_hmac_sha1_cipher : NULL);
  ------------------
  |  |   16|      2|#define AESNI_CAPABLE (1 << (57 - 32))
  ------------------
  |  Branch (42:13): [True: 2, False: 0]
  ------------------
   43|      2|}
EVP_aes_256_cbc_hmac_sha1:
   46|      2|{
   47|      2|    return (OPENSSL_ia32cap_P[1] & AESNI_CAPABLE ? &aesni_256_cbc_hmac_sha1_cipher : NULL);
  ------------------
  |  |   16|      2|#define AESNI_CAPABLE (1 << (57 - 32))
  ------------------
  |  Branch (47:13): [True: 2, False: 0]
  ------------------
   48|      2|}

EVP_aes_128_cbc_hmac_sha256:
   53|      2|{
   54|      2|    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);
  ------------------
  |  |   24|      2|#define AESNI_CAPABLE (1 << (57 - 32))
  ------------------
  |  Branch (54:13): [True: 2, False: 0]
  |  Branch (54:55): [True: 2, False: 0]
  ------------------
   55|      2|}
EVP_aes_256_cbc_hmac_sha256:
   58|      2|{
   59|      2|    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);
  ------------------
  |  |   24|      2|#define AESNI_CAPABLE (1 << (57 - 32))
  ------------------
  |  Branch (59:13): [True: 2, False: 0]
  |  Branch (59:55): [True: 2, False: 0]
  ------------------
   60|      2|}

EVP_aria_128_ctr:
   42|      2|    {                                                                                 \
   43|      2|        return &aria_##keylen##_##mode;                                               \
   44|      2|    }
EVP_aria_192_ctr:
   42|      2|    {                                                                                 \
   43|      2|        return &aria_##keylen##_##mode;                                               \
   44|      2|    }
EVP_aria_256_ctr:
   42|      2|    {                                                                                 \
   43|      2|        return &aria_##keylen##_##mode;                                               \
   44|      2|    }
EVP_aria_128_gcm:
   64|      2|    {                                                  \
   65|      2|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
   66|      2|    }
EVP_aria_192_gcm:
   64|      2|    {                                                  \
   65|      2|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
   66|      2|    }
EVP_aria_256_gcm:
   64|      2|    {                                                  \
   65|      2|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
   66|      2|    }
EVP_aria_128_ccm:
   64|      2|    {                                                  \
   65|      2|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
   66|      2|    }
EVP_aria_192_ccm:
   64|      2|    {                                                  \
   65|      2|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
   66|      2|    }
EVP_aria_256_ccm:
   64|      2|    {                                                  \
   65|      2|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
   66|      2|    }

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

EVP_chacha20:
   27|      2|{
   28|      2|    return &chacha20;
   29|      2|}
EVP_chacha20_poly1305:
   43|      2|{
   44|      2|    return (&chacha20_poly1305);
   45|      2|}

EVP_des_ede:
   28|      2|{
   29|      2|    return &des_ede_ecb;
   30|      2|}
EVP_des_ede3:
   33|      2|{
   34|      2|    return &des_ede3_ecb;
   35|      2|}
EVP_des_ede3_wrap:
   46|      2|{
   47|      2|    return &des3_wrap;
   48|      2|}

EVP_rc2_64_cbc:
   35|      2|{
   36|      2|    return &r2_64_cbc_cipher;
   37|      2|}
EVP_rc2_40_cbc:
   40|      2|{
   41|      2|    return &r2_40_cbc_cipher;
   42|      2|}

EVP_rc4:
   30|      2|{
   31|      2|    return &r4_cipher;
   32|      2|}
EVP_rc4_40:
   35|      2|{
   36|      2|    return &r4_40_cipher;
   37|      2|}

EVP_rc4_hmac_md5:
   27|      2|{
   28|      2|    return &r4_hmac_md5_cipher;
   29|      2|}

EVP_sm4_cbc:
   24|      2|    {                                                                         \
   25|      2|        return &sm4_##mode;                                                   \
   26|      2|    }
EVP_sm4_ecb:
   24|      2|    {                                                                         \
   25|      2|        return &sm4_##mode;                                                   \
   26|      2|    }
EVP_sm4_ofb:
   24|      2|    {                                                                         \
   25|      2|        return &sm4_##mode;                                                   \
   26|      2|    }
EVP_sm4_cfb128:
   24|      2|    {                                                                         \
   25|      2|        return &sm4_##mode;                                                   \
   26|      2|    }
EVP_sm4_ctr:
   24|      2|    {                                                                         \
   25|      2|        return &sm4_##mode;                                                   \
   26|      2|    }

EVP_desx_cbc:
   23|      2|{
   24|      2|    return &d_xcbc_cipher;
   25|      2|}

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

encode_base64_avx2:
  484|     10|{
  485|     10|    const uint8_t *input = (const uint8_t *)src;
  486|     10|    uint8_t *out = (uint8_t *)dst;
  487|     10|    int i = 0;
  488|     10|    int stride = (ctx == NULL) ? 0 : ctx_length / 3 * 4;
  ------------------
  |  Branch (488:18): [True: 0, False: 10]
  ------------------
  489|     10|    int wrap_cnt = 0;
  490|     10|    const int use_srp = (ctx != NULL
  ------------------
  |  Branch (490:26): [True: 10, False: 0]
  ------------------
  491|     10|        && (ctx->flags & EVP_ENCODE_CTX_USE_SRP_ALPHABET) != 0);
  ------------------
  |  |  627|     10|#define EVP_ENCODE_CTX_USE_SRP_ALPHABET 2
  ------------------
  |  Branch (491:12): [True: 0, False: 10]
  ------------------
  492|     10|    const __m256i shuf = _mm256_set_epi8(10, 11, 9, 10, 7, 8, 6, 7, 4, 5, 3, 4, 1, 2, 0, 1,
  493|     10|        10, 11, 9, 10, 7, 8, 6, 7, 4, 5, 3, 4, 1, 2, 0, 1);
  494|     10|    int base = 0;
  495|       |
  496|       |    /* Process 96 bytes at a time */
  497|     40|    for (; i + 100 <= srclen; i += 96) {
  ------------------
  |  Branch (497:12): [True: 30, False: 10]
  ------------------
  498|     30|        _mm_prefetch((const char *)(input + i + 192), _MM_HINT_T0);
  499|       |        /*
  500|       |         * Interleaved for each vector: load, shuffle, bit-split, lookup
  501|       |         * before starting the next, giving the OoO engine independent work chains
  502|       |         * across execution ports.
  503|       |         */
  504|     30|        const __m128i lo0 = _mm_loadu_si128((const __m128i *)(input + i + 4 * 3 * 0));
  505|     30|        const __m128i hi0 = _mm_loadu_si128((const __m128i *)(input + i + 4 * 3 * 1));
  506|     30|        __m256i in0 = _mm256_shuffle_epi8(_mm256_set_m128i(hi0, lo0), shuf);
  507|     30|        const __m256i t0_0 = _mm256_and_si256(in0, _mm256_set1_epi32(0x0fc0fc00));
  508|     30|        const __m256i t1_0 = _mm256_mulhi_epu16(t0_0, _mm256_set1_epi32(0x04000040));
  509|     30|        const __m256i t2_0 = _mm256_and_si256(in0, _mm256_set1_epi32(0x003f03f0));
  510|     30|        const __m256i t3_0 = _mm256_mullo_epi16(t2_0, _mm256_set1_epi32(0x01000010));
  511|     30|        const __m256i input0 = _mm256_or_si256(t1_0, t3_0);
  512|       |
  513|     30|        const __m128i lo1 = _mm_loadu_si128((const __m128i *)(input + i + 4 * 3 * 2));
  514|     30|        const __m128i hi1 = _mm_loadu_si128((const __m128i *)(input + i + 4 * 3 * 3));
  515|     30|        __m256i in1 = _mm256_shuffle_epi8(_mm256_set_m128i(hi1, lo1), shuf);
  516|     30|        const __m256i t0_1 = _mm256_and_si256(in1, _mm256_set1_epi32(0x0fc0fc00));
  517|     30|        const __m256i t1_1 = _mm256_mulhi_epu16(t0_1, _mm256_set1_epi32(0x04000040));
  518|     30|        const __m256i t2_1 = _mm256_and_si256(in1, _mm256_set1_epi32(0x003f03f0));
  519|     30|        const __m256i t3_1 = _mm256_mullo_epi16(t2_1, _mm256_set1_epi32(0x01000010));
  520|     30|        const __m256i input1 = _mm256_or_si256(t1_1, t3_1);
  521|       |
  522|     30|        const __m128i lo2 = _mm_loadu_si128((const __m128i *)(input + i + 4 * 3 * 4));
  523|     30|        const __m128i hi2 = _mm_loadu_si128((const __m128i *)(input + i + 4 * 3 * 5));
  524|     30|        __m256i in2 = _mm256_shuffle_epi8(_mm256_set_m128i(hi2, lo2), shuf);
  525|     30|        const __m256i t0_2 = _mm256_and_si256(in2, _mm256_set1_epi32(0x0fc0fc00));
  526|     30|        const __m256i t1_2 = _mm256_mulhi_epu16(t0_2, _mm256_set1_epi32(0x04000040));
  527|     30|        const __m256i t2_2 = _mm256_and_si256(in2, _mm256_set1_epi32(0x003f03f0));
  528|     30|        const __m256i t3_2 = _mm256_mullo_epi16(t2_2, _mm256_set1_epi32(0x01000010));
  529|     30|        const __m256i input2 = _mm256_or_si256(t1_2, t3_2);
  530|       |
  531|     30|        const __m128i lo3 = _mm_loadu_si128((const __m128i *)(input + i + 4 * 3 * 6));
  532|     30|        const __m128i hi3 = _mm_loadu_si128((const __m128i *)(input + i + 4 * 3 * 7));
  533|     30|        __m256i in3 = _mm256_shuffle_epi8(_mm256_set_m128i(hi3, lo3), shuf);
  534|     30|        const __m256i t0_3 = _mm256_and_si256(in3, _mm256_set1_epi32(0x0fc0fc00));
  535|     30|        const __m256i t1_3 = _mm256_mulhi_epu16(t0_3, _mm256_set1_epi32(0x04000040));
  536|     30|        const __m256i t2_3 = _mm256_and_si256(in3, _mm256_set1_epi32(0x003f03f0));
  537|     30|        const __m256i t3_3 = _mm256_mullo_epi16(t2_3, _mm256_set1_epi32(0x01000010));
  538|     30|        const __m256i input3 = _mm256_or_si256(t1_3, t3_3);
  539|       |
  540|     30|        __m256i vec0;
  541|     30|        __m256i vec1;
  542|     30|        __m256i vec2;
  543|     30|        __m256i vec3;
  544|       |
  545|     30|        if (use_srp) {
  ------------------
  |  Branch (545:13): [True: 0, False: 30]
  ------------------
  546|      0|            vec0 = lookup_pshufb_srp(input0);
  547|      0|            vec1 = lookup_pshufb_srp(input1);
  548|      0|            vec2 = lookup_pshufb_srp(input2);
  549|      0|            vec3 = lookup_pshufb_srp(input3);
  550|       |
  551|     30|        } else {
  552|     30|            vec0 = lookup_pshufb_std(input0);
  553|     30|            vec1 = lookup_pshufb_std(input1);
  554|     30|            vec2 = lookup_pshufb_std(input2);
  555|     30|            vec3 = lookup_pshufb_std(input3);
  556|     30|        }
  557|       |
  558|     30|        if (stride == 0) {
  ------------------
  |  Branch (558:13): [True: 0, False: 30]
  ------------------
  559|      0|            _mm256_storeu_si256((__m256i *)out, vec0);
  560|       |
  561|      0|            out += 32;
  562|      0|            _mm256_storeu_si256((__m256i *)out, vec1);
  563|       |
  564|      0|            out += 32;
  565|      0|            _mm256_storeu_si256((__m256i *)out, vec2);
  566|       |
  567|      0|            out += 32;
  568|      0|            _mm256_storeu_si256((__m256i *)out, vec3);
  569|       |
  570|      0|            out += 32;
  571|     30|        } else if (stride == 64) {
  ------------------
  |  Branch (571:20): [True: 30, False: 0]
  ------------------
  572|     30|            _mm256_storeu_si256((__m256i *)out, vec0);
  573|       |
  574|     30|            out += 32;
  575|     30|            _mm256_storeu_si256((__m256i *)out, vec1);
  576|       |
  577|     30|            out += 32;
  578|     30|            *(out++) = '\n';
  579|       |
  580|     30|            _mm256_storeu_si256((__m256i *)out, vec2);
  581|     30|            out += 32;
  582|       |
  583|     30|            _mm256_storeu_si256((__m256i *)out, vec3);
  584|     30|            out += 32;
  585|       |
  586|     30|            *(out++) = '\n';
  587|     30|        } else if (stride == 4) {
  ------------------
  |  Branch (587:20): [True: 0, False: 0]
  ------------------
  588|      0|            int out_idx = 0;
  589|       |
  590|      0|            out_idx += (int)insert_nl_str4(vec0, out + out_idx);
  591|      0|            out_idx += (int)insert_nl_str4(vec1, out + out_idx);
  592|      0|            out_idx += (int)insert_nl_str4(vec2, out + out_idx);
  593|      0|            out_idx += (int)insert_nl_str4(vec3, out + out_idx);
  594|       |
  595|      0|            out += out_idx;
  596|      0|        } else if (stride == 8) {
  ------------------
  |  Branch (596:20): [True: 0, False: 0]
  ------------------
  597|       |
  598|      0|            out += insert_nl_str8(vec0, out);
  599|      0|            out += insert_nl_str8(vec1, out);
  600|      0|            out += insert_nl_str8(vec2, out);
  601|      0|            out += insert_nl_str8(vec3, out);
  602|       |
  603|      0|        } else if (stride == 12) {
  ------------------
  |  Branch (603:20): [True: 0, False: 0]
  ------------------
  604|      0|            switch (base) {
  605|      0|            case 0:
  ------------------
  |  Branch (605:13): [True: 0, False: 0]
  ------------------
  606|       |
  607|      0|                out += insert_nl_gt16(vec0, out, stride, &wrap_cnt);
  608|      0|                out += insert_nl_2nd_vec_stride_12(vec1, out, stride, &wrap_cnt);
  609|      0|                out += insert_nl_gt16(vec2, out, stride, &wrap_cnt);
  610|      0|                out += insert_nl_gt16(vec3, out, stride, &wrap_cnt);
  611|      0|                break;
  612|      0|            case 1:
  ------------------
  |  Branch (612:13): [True: 0, False: 0]
  ------------------
  613|      0|                out += insert_nl_2nd_vec_stride_12(vec0, out, stride, &wrap_cnt);
  614|      0|                out += insert_nl_gt16(vec1, out, stride, &wrap_cnt);
  615|      0|                out += insert_nl_gt16(vec2, out, stride, &wrap_cnt);
  616|      0|                out += insert_nl_2nd_vec_stride_12(vec3, out, stride, &wrap_cnt);
  617|      0|                break;
  618|      0|            default: /* base == 2 */
  ------------------
  |  Branch (618:13): [True: 0, False: 0]
  ------------------
  619|      0|                out += insert_nl_gt16(vec0, out, stride, &wrap_cnt);
  620|      0|                out += insert_nl_gt16(vec1, out, stride, &wrap_cnt);
  621|      0|                out += insert_nl_2nd_vec_stride_12(vec2, out, stride, &wrap_cnt);
  622|      0|                out += insert_nl_gt16(vec3, out, stride, &wrap_cnt);
  623|      0|                break;
  624|      0|            }
  625|       |
  626|      0|            if (++base == 3)
  ------------------
  |  Branch (626:17): [True: 0, False: 0]
  ------------------
  627|      0|                base = 0;
  628|      0|        } else if (stride >= 32) {
  ------------------
  |  Branch (628:20): [True: 0, False: 0]
  ------------------
  629|      0|            out += ins_nl_gt32(vec0, out, stride, &wrap_cnt);
  630|      0|            out += ins_nl_gt32(vec1, out, stride, &wrap_cnt);
  631|      0|            out += ins_nl_gt32(vec2, out, stride, &wrap_cnt);
  632|      0|            out += ins_nl_gt32(vec3, out, stride, &wrap_cnt);
  633|      0|        } else if (stride >= 16) {
  ------------------
  |  Branch (633:20): [True: 0, False: 0]
  ------------------
  634|      0|            out += insert_nl_gt16(vec0, out, stride, &wrap_cnt);
  635|      0|            out += insert_nl_gt16(vec1, out, stride, &wrap_cnt);
  636|      0|            out += insert_nl_gt16(vec2, out, stride, &wrap_cnt);
  637|      0|            out += insert_nl_gt16(vec3, out, stride, &wrap_cnt);
  638|      0|        }
  639|     30|    }
  640|       |
  641|     10|    if (stride == 0) {
  ------------------
  |  Branch (641:9): [True: 0, False: 10]
  ------------------
  642|      0|        for (; i + 28 <= srclen; i += 24) {
  ------------------
  |  Branch (642:16): [True: 0, False: 0]
  ------------------
  643|       |            /* lo = [xxxx|DDDC|CCBB|BAAA] */
  644|       |            /* hi = [xxxx|HHHG|GGFF|FEEE] */
  645|      0|            const __m128i lo = _mm_loadu_si128((const __m128i *)(input + i));
  646|      0|            const __m128i hi = _mm_loadu_si128((const __m128i *)(input + i + 4 * 3));
  647|       |            /*
  648|       |             * bytes from groups A, B and C are needed in separate 32-bit lanes
  649|       |             * in = [0HHH|0GGG|0FFF|0EEE[0DDD|0CCC|0BBB|0AAA]
  650|       |             */
  651|      0|            __m256i in = _mm256_shuffle_epi8(_mm256_set_m128i(hi, lo), shuf);
  652|      0|            const __m256i t0 = _mm256_and_si256(in, _mm256_set1_epi32(0x0fc0fc00));
  653|      0|            const __m256i t1 = _mm256_mulhi_epu16(t0, _mm256_set1_epi32(0x04000040));
  654|      0|            const __m256i t2 = _mm256_and_si256(in, _mm256_set1_epi32(0x003f03f0));
  655|      0|            const __m256i t3 = _mm256_mullo_epi16(t2, _mm256_set1_epi32(0x01000010));
  656|      0|            const __m256i indices = _mm256_or_si256(t1, t3);
  657|      0|            _mm256_storeu_si256((__m256i *)out, (use_srp ? lookup_pshufb_srp : lookup_pshufb_std)(indices));
  ------------------
  |  Branch (657:50): [True: 0, False: 0]
  ------------------
  658|       |
  659|      0|            out += 32;
  660|      0|        }
  661|      0|    }
  662|     10|    *final_wrap_cnt = wrap_cnt;
  663|       |
  664|     10|    if (stride >= 32 && wrap_cnt == stride) {
  ------------------
  |  Branch (664:9): [True: 10, False: 0]
  |  Branch (664:25): [True: 0, False: 10]
  ------------------
  665|      0|        wrap_cnt = 0;
  666|      0|        *out++ = '\n';
  667|      0|    }
  668|       |
  669|     10|    return (size_t)(out - (uint8_t *)dst) + evp_encodeblock_int(ctx, out, src + i, srclen - i, final_wrap_cnt);
  670|     10|}
enc_b64_avx2.c:lookup_pshufb_std:
   53|    120|{
   54|    120|    __m256i result = _mm256_subs_epu8(input, _mm256_set1_epi8(51));
   55|    120|    const __m256i less = _mm256_cmpgt_epi8(_mm256_set1_epi8(26), input);
   56|       |
   57|    120|    result = _mm256_or_si256(result, _mm256_and_si256(less, _mm256_set1_epi8(13)));
   58|    120|    __m256i shift_LUT = _mm256_setr_epi8('a' - 26, '0' - 52, '0' - 52, '0' - 52, '0' - 52,
   59|    120|        '0' - 52, '0' - 52,
   60|    120|        '0' - 52, '0' - 52, '0' - 52, '0' - 52, '+' - 62,
   61|    120|        '/' - 63, 'A', 0, 0,
   62|    120|        'a' - 26, '0' - 52, '0' - 52, '0' - 52, '0' - 52,
   63|    120|        '0' - 52, '0' - 52,
   64|    120|        '0' - 52, '0' - 52, '0' - 52, '0' - 52, '+' - 62,
   65|    120|        '/' - 63, 'A', 0, 0);
   66|       |
   67|    120|    result = _mm256_shuffle_epi8(shift_LUT, result);
   68|    120|    return _mm256_add_epi8(result, input);
   69|    120|}

evp_encodeblock_int:
  129|     20|{
  130|     20|    int i = 0;
  131|     20|    size_t ret = 0;
  132|     20|    uint8_t t1, t2, t3;
  133|     20|    const unsigned char *e0, *e1, *e2;
  134|     20|    int srp = (ctx != NULL
  ------------------
  |  Branch (134:16): [True: 20, False: 0]
  ------------------
  135|     20|        && (ctx->flags & EVP_ENCODE_CTX_USE_SRP_ALPHABET) != 0);
  ------------------
  |  |  627|     20|#define EVP_ENCODE_CTX_USE_SRP_ALPHABET 2
  ------------------
  |  Branch (135:12): [True: 0, False: 20]
  ------------------
  136|     20|    int wrap_cnt_by_input = *wrap_cnt / 4 * 3;
  137|     20|    const int ctx_length = (ctx != NULL) ? EVP_ENCODE_B64_LENGTH : 0;
  ------------------
  |  |   19|     20|#define EVP_ENCODE_B64_LENGTH 48
  ------------------
  |  Branch (137:28): [True: 20, False: 0]
  ------------------
  138|       |
  139|     20|    if (srp) {
  ------------------
  |  Branch (139:9): [True: 0, False: 20]
  ------------------
  140|      0|        e0 = base64_srp_bin2ascii_0;
  141|      0|        e1 = base64_srp_bin2ascii_1;
  142|      0|        e2 = base64_srp_bin2ascii_2;
  143|     20|    } else {
  144|     20|        e0 = base64_std_bin2ascii_0;
  145|     20|        e1 = base64_std_bin2ascii_1;
  146|     20|        e2 = base64_std_bin2ascii_2;
  147|     20|    }
  148|       |
  149|     20|    if (ctx_length == 1) {
  ------------------
  |  Branch (149:9): [True: 0, False: 20]
  ------------------
  150|      0|        while (i < dlen && ctx != NULL) {
  ------------------
  |  Branch (150:16): [True: 0, False: 0]
  |  Branch (150:28): [True: 0, False: 0]
  ------------------
  151|      0|            t1 = f[i];
  152|      0|            *(t++) = e0[t1];
  153|      0|            *(t++) = e1[(t1 & 0x03) << 4];
  154|      0|            *(t++) = '=';
  155|      0|            *(t++) = '=';
  156|      0|            *(t++) = '\n';
  157|       |
  158|      0|            ret += 5;
  159|      0|            i++;
  160|      0|        }
  161|       |
  162|      0|        *t = '\0';
  163|      0|        ret--;
  164|       |
  165|      0|        return ret;
  166|     20|    } else if (ctx_length % 3 != 0) {
  ------------------
  |  Branch (166:16): [True: 0, False: 20]
  ------------------
  167|      0|        i = 0;
  168|      0|        int wrap_cnt_nm3 = 0;
  169|      0|        while (i + 2 < dlen) {
  ------------------
  |  Branch (169:16): [True: 0, False: 0]
  ------------------
  170|      0|            if (ctx != NULL) {
  ------------------
  |  Branch (170:17): [True: 0, False: 0]
  ------------------
  171|      0|                if ((wrap_cnt_nm3 < EVP_ENCODE_B64_LENGTH
  ------------------
  |  |   19|      0|#define EVP_ENCODE_B64_LENGTH 48
  ------------------
  |  Branch (171:22): [True: 0, False: 0]
  ------------------
  172|      0|                        && (wrap_cnt_nm3 + 3 + wrap_cnt_by_input) > EVP_ENCODE_B64_LENGTH)
  ------------------
  |  |   19|      0|#define EVP_ENCODE_B64_LENGTH 48
  ------------------
  |  Branch (172:28): [True: 0, False: 0]
  ------------------
  173|      0|                    && ((ctx->flags & EVP_ENCODE_CTX_NO_NEWLINES) == 0)) {
  ------------------
  |  |  625|      0|#define EVP_ENCODE_CTX_NO_NEWLINES 1
  ------------------
  |  Branch (173:24): [True: 0, False: 0]
  ------------------
  174|       |
  175|      0|                    switch (EVP_ENCODE_B64_LENGTH % 3) {
  ------------------
  |  |   19|      0|#define EVP_ENCODE_B64_LENGTH 48
  ------------------
  |  Branch (175:29): [Folded, False: 0]
  ------------------
  176|      0|                    case 0:
  ------------------
  |  Branch (176:21): [True: 0, False: 0]
  ------------------
  177|      0|                        break;
  178|      0|                    case 1:
  ------------------
  |  Branch (178:21): [True: 0, False: 0]
  ------------------
  179|      0|                        t1 = f[i];
  180|      0|                        *(t++) = e0[t1];
  181|      0|                        *(t++) = e1[(t1 & 0x03) << 4];
  182|      0|                        *(t++) = '=';
  183|      0|                        *(t++) = '=';
  184|       |
  185|      0|                        ret += 4;
  186|      0|                        i++;
  187|      0|                        break;
  188|      0|                    case 2:
  ------------------
  |  Branch (188:21): [True: 0, False: 0]
  ------------------
  189|      0|                        t1 = f[i];
  190|      0|                        t2 = f[i + 1];
  191|      0|                        *(t++) = e0[t1];
  192|      0|                        *(t++) = e1[((t1 & 0x03) << 4) | ((t2 >> 4) & 0x0F)];
  193|      0|                        *(t++) = e2[(t2 & 0x0F) << 2];
  194|      0|                        *(t++) = '=';
  195|      0|                        i += 2;
  196|      0|                        ret += 4;
  197|      0|                        break;
  198|      0|                    }
  199|      0|                    *(t++) = '\n';
  200|      0|                    ret++;
  201|      0|                    wrap_cnt_nm3 = 0;
  202|      0|                }
  203|      0|            }
  204|       |
  205|      0|            if (ctx_length >= 4 && i + 2 < dlen) {
  ------------------
  |  Branch (205:17): [True: 0, False: 0]
  |  Branch (205:36): [True: 0, False: 0]
  ------------------
  206|      0|                t1 = f[i];
  207|      0|                t2 = f[i + 1];
  208|      0|                t3 = f[i + 2];
  209|      0|                *(t++) = e0[t1];
  210|      0|                *(t++) = e1[((t1 & 0x03) << 4) | ((t2 >> 4) & 0x0F)];
  211|      0|                *(t++) = e1[((t2 & 0x0F) << 2) | ((t3 >> 6) & 0x03)];
  212|      0|                *(t++) = e2[t3];
  213|      0|                ret += 4;
  214|      0|                wrap_cnt_nm3 += 3;
  215|      0|                i += 3;
  216|      0|            }
  217|      0|        }
  218|     20|    } else {
  219|    460|        for (i = 0; i + 2 < dlen; i += 3) {
  ------------------
  |  Branch (219:21): [True: 440, False: 20]
  ------------------
  220|       |
  221|    440|            t1 = f[i];
  222|    440|            t2 = f[i + 1];
  223|    440|            t3 = f[i + 2];
  224|    440|            *(t++) = e0[t1];
  225|    440|            *(t++) = e1[((t1 & 0x03) << 4) | ((t2 >> 4) & 0x0F)];
  226|    440|            *(t++) = e1[((t2 & 0x0F) << 2) | ((t3 >> 6) & 0x03)];
  227|    440|            *(t++) = e2[t3];
  228|    440|            ret += 4;
  229|       |
  230|    440|            if (ctx != NULL) {
  ------------------
  |  Branch (230:17): [True: 440, False: 0]
  ------------------
  231|    440|                if ((i + 3 + wrap_cnt_by_input) % EVP_ENCODE_B64_LENGTH == 0
  ------------------
  |  |   19|    440|#define EVP_ENCODE_B64_LENGTH 48
  ------------------
  |  Branch (231:21): [True: 20, False: 420]
  ------------------
  232|     20|                    && ((ctx->flags & EVP_ENCODE_CTX_NO_NEWLINES) == 0)
  ------------------
  |  |  625|     20|#define EVP_ENCODE_CTX_NO_NEWLINES 1
  ------------------
  |  Branch (232:24): [True: 20, False: 0]
  ------------------
  233|     20|                    && EVP_ENCODE_B64_LENGTH % 3 == 0) {
  ------------------
  |  |   19|      0|#define EVP_ENCODE_B64_LENGTH 48
  ------------------
  |  Branch (233:24): [True: 0, Folded]
  ------------------
  234|     20|                    *(t++) = '\n';
  235|     20|                    ret++;
  236|     20|                }
  237|    440|            }
  238|    440|        }
  239|     20|    }
  240|       |
  241|     20|    switch (dlen - i) {
  ------------------
  |  Branch (241:13): [True: 20, False: 0]
  ------------------
  242|     10|    case 0:
  ------------------
  |  Branch (242:5): [True: 10, False: 10]
  ------------------
  243|     10|        break;
  244|     10|    case 1:
  ------------------
  |  Branch (244:5): [True: 10, False: 10]
  ------------------
  245|     10|        t1 = f[i];
  246|     10|        *(t++) = e0[t1];
  247|     10|        *(t++) = e1[(t1 & 0x03) << 4];
  248|     10|        *(t++) = '=';
  249|     10|        *(t++) = '=';
  250|       |
  251|     10|        ret += 4;
  252|       |
  253|     10|        if (ctx != NULL) {
  ------------------
  |  Branch (253:13): [True: 10, False: 0]
  ------------------
  254|     10|            if ((i + 1 + wrap_cnt_by_input) % EVP_ENCODE_B64_LENGTH == 0
  ------------------
  |  |   19|     10|#define EVP_ENCODE_B64_LENGTH 48
  ------------------
  |  Branch (254:17): [True: 0, False: 10]
  ------------------
  255|      0|                && ((ctx->flags & EVP_ENCODE_CTX_NO_NEWLINES) == 0)
  ------------------
  |  |  625|      0|#define EVP_ENCODE_CTX_NO_NEWLINES 1
  ------------------
  |  Branch (255:20): [True: 0, False: 0]
  ------------------
  256|      0|                && EVP_ENCODE_B64_LENGTH % 3 == 0) {
  ------------------
  |  |   19|      0|#define EVP_ENCODE_B64_LENGTH 48
  ------------------
  |  Branch (256:20): [True: 0, Folded]
  ------------------
  257|      0|                *(t++) = '\n';
  258|      0|                ret++;
  259|      0|            }
  260|     10|        }
  261|       |
  262|     10|        break;
  263|      0|    case 2:
  ------------------
  |  Branch (263:5): [True: 0, False: 20]
  ------------------
  264|      0|        t1 = f[i];
  265|      0|        t2 = f[i + 1];
  266|      0|        *(t++) = e0[t1];
  267|      0|        *(t++) = e1[((t1 & 0x03) << 4) | ((t2 >> 4) & 0x0F)];
  268|      0|        *(t++) = e2[(t2 & 0x0F) << 2];
  269|      0|        *(t++) = '=';
  270|      0|        ret += 4;
  271|       |
  272|      0|        if (ctx != NULL) {
  ------------------
  |  Branch (272:13): [True: 0, False: 0]
  ------------------
  273|      0|            if ((i + 2 + wrap_cnt_by_input) % EVP_ENCODE_B64_LENGTH == 0
  ------------------
  |  |   19|      0|#define EVP_ENCODE_B64_LENGTH 48
  ------------------
  |  Branch (273:17): [True: 0, False: 0]
  ------------------
  274|      0|                && ((ctx->flags & EVP_ENCODE_CTX_NO_NEWLINES) == 0)
  ------------------
  |  |  625|      0|#define EVP_ENCODE_CTX_NO_NEWLINES 1
  ------------------
  |  Branch (274:20): [True: 0, False: 0]
  ------------------
  275|      0|                && EVP_ENCODE_B64_LENGTH % 3 == 0) {
  ------------------
  |  |   19|      0|#define EVP_ENCODE_B64_LENGTH 48
  ------------------
  |  Branch (275:20): [True: 0, Folded]
  ------------------
  276|      0|                *(t++) = '\n';
  277|      0|                ret++;
  278|      0|            }
  279|      0|        }
  280|      0|        break;
  281|     20|    }
  282|       |
  283|     20|    *t = '\0';
  284|       |
  285|     20|    return ret;
  286|     20|}

EVP_ENCODE_CTX_new:
  111|  11.0k|{
  112|  11.0k|    return OPENSSL_zalloc(sizeof(EVP_ENCODE_CTX));
  ------------------
  |  |  109|  11.0k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  113|  11.0k|}
EVP_ENCODE_CTX_free:
  116|  14.5k|{
  117|  14.5k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|  14.5k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  118|  14.5k|}
EVP_EncodeInit:
  138|     10|{
  139|     10|    ctx->num = 0;
  140|     10|    ctx->line_num = 0;
  141|     10|    ctx->flags = 0;
  142|     10|}
EVP_EncodeUpdate:
  146|     10|{
  147|     10|    int i;
  148|     10|    size_t j;
  149|     10|    size_t total = 0;
  150|       |
  151|     10|    *outl = 0;
  152|     10|    if (inl <= 0)
  ------------------
  |  Branch (152:9): [True: 0, False: 10]
  ------------------
  153|      0|        return 0;
  154|     10|    assert(EVP_ENCODE_B64_LENGTH <= (int)sizeof(ctx->enc_data));
  ------------------
  |  Branch (154:5): [True: 0, Folded]
  |  Branch (154:5): [True: 10, Folded]
  ------------------
  155|     10|    if (EVP_ENCODE_B64_LENGTH - ctx->num > inl) {
  ------------------
  |  |   19|     10|#define EVP_ENCODE_B64_LENGTH 48
  ------------------
  |  Branch (155:9): [True: 0, False: 10]
  ------------------
  156|      0|        memcpy(&(ctx->enc_data[ctx->num]), in, inl);
  157|      0|        ctx->num += inl;
  158|      0|        return 1;
  159|      0|    }
  160|     10|    if (ctx->num != 0) {
  ------------------
  |  Branch (160:9): [True: 0, False: 10]
  ------------------
  161|      0|        i = EVP_ENCODE_B64_LENGTH - ctx->num;
  ------------------
  |  |   19|      0|#define EVP_ENCODE_B64_LENGTH 48
  ------------------
  162|      0|        memcpy(&(ctx->enc_data[ctx->num]), in, i);
  163|      0|        in += i;
  164|      0|        inl -= i;
  165|      0|        int wrap_cnt = 0;
  166|      0|        j = evp_encodeblock_int(ctx, out, ctx->enc_data, EVP_ENCODE_B64_LENGTH,
  ------------------
  |  |   19|      0|#define EVP_ENCODE_B64_LENGTH 48
  ------------------
  167|      0|            &wrap_cnt);
  168|      0|        ctx->num = 0;
  169|      0|        out += j;
  170|      0|        total = j;
  171|      0|        *out = '\0';
  172|      0|    }
  173|     10|    int wrap_cnt = 0;
  174|     10|    if (EVP_ENCODE_B64_LENGTH % 3 != 0) {
  ------------------
  |  |   19|     10|#define EVP_ENCODE_B64_LENGTH 48
  ------------------
  |  Branch (174:9): [Folded, False: 10]
  ------------------
  175|      0|        j = evp_encodeblock_int(ctx, out, in, inl - (inl % EVP_ENCODE_B64_LENGTH),
  ------------------
  |  |   19|      0|#define EVP_ENCODE_B64_LENGTH 48
  ------------------
  176|      0|            &wrap_cnt);
  177|     10|    } else {
  178|       |#if defined(__AVX2__) && defined(HAVE_AVX2_INTRINSICS)
  179|       |        const int newlines = !(ctx->flags & EVP_ENCODE_CTX_NO_NEWLINES) ? EVP_ENCODE_B64_LENGTH : 0;
  180|       |
  181|       |        j = encode_base64_avx2(ctx,
  182|       |            (unsigned char *)out,
  183|       |            (const unsigned char *)in,
  184|       |            inl - (inl % EVP_ENCODE_B64_LENGTH), newlines, &wrap_cnt);
  185|       |#elif defined(HAS_IA32CAP_IS_64) && defined(HAVE_AVX2_INTRINSICS)
  186|     10|        if ((OPENSSL_ia32cap_P[2] & (1u << 5)) != 0) {
  ------------------
  |  Branch (186:13): [True: 10, False: 0]
  ------------------
  187|     10|            const int newlines = !(ctx->flags & EVP_ENCODE_CTX_NO_NEWLINES) ? EVP_ENCODE_B64_LENGTH : 0;
  ------------------
  |  |  625|     10|#define EVP_ENCODE_CTX_NO_NEWLINES 1
  ------------------
                          const int newlines = !(ctx->flags & EVP_ENCODE_CTX_NO_NEWLINES) ? EVP_ENCODE_B64_LENGTH : 0;
  ------------------
  |  |   19|     10|#define EVP_ENCODE_B64_LENGTH 48
  ------------------
  |  Branch (187:34): [True: 10, False: 0]
  ------------------
  188|       |
  189|     10|            j = encode_base64_avx2(ctx,
  190|     10|                (unsigned char *)out,
  191|     10|                (const unsigned char *)in,
  192|     10|                inl - (inl % EVP_ENCODE_B64_LENGTH), newlines, &wrap_cnt);
  ------------------
  |  |   19|     10|#define EVP_ENCODE_B64_LENGTH 48
  ------------------
  193|     10|        } else {
  194|      0|            j = evp_encodeblock_int(ctx, out, in, inl - (inl % EVP_ENCODE_B64_LENGTH),
  ------------------
  |  |   19|      0|#define EVP_ENCODE_B64_LENGTH 48
  ------------------
  195|      0|                &wrap_cnt);
  196|      0|        }
  197|       |#else
  198|       |        j = evp_encodeblock_int(ctx, out, in, inl - (inl % EVP_ENCODE_B64_LENGTH),
  199|       |            &wrap_cnt);
  200|       |#endif
  201|     10|    }
  202|     10|    in += inl - (inl % EVP_ENCODE_B64_LENGTH);
  ------------------
  |  |   19|     10|#define EVP_ENCODE_B64_LENGTH 48
  ------------------
  203|     10|    inl -= inl - (inl % EVP_ENCODE_B64_LENGTH);
  ------------------
  |  |   19|     10|#define EVP_ENCODE_B64_LENGTH 48
  ------------------
  204|     10|    out += j;
  205|     10|    total += j;
  206|     10|    if ((ctx->flags & EVP_ENCODE_CTX_NO_NEWLINES) == 0 && EVP_ENCODE_B64_LENGTH % 3 != 0) {
  ------------------
  |  |  625|     10|#define EVP_ENCODE_CTX_NO_NEWLINES 1
  ------------------
                  if ((ctx->flags & EVP_ENCODE_CTX_NO_NEWLINES) == 0 && EVP_ENCODE_B64_LENGTH % 3 != 0) {
  ------------------
  |  |   19|     10|#define EVP_ENCODE_B64_LENGTH 48
  ------------------
  |  Branch (206:9): [True: 10, False: 0]
  |  Branch (206:59): [Folded, False: 10]
  ------------------
  207|      0|        *(out++) = '\n';
  208|      0|        total++;
  209|      0|    }
  210|     10|    *out = '\0';
  211|     10|    if (total > INT_MAX) {
  ------------------
  |  Branch (211:9): [True: 0, False: 10]
  ------------------
  212|       |        /* Too much output data! */
  213|      0|        *outl = 0;
  214|      0|        return 0;
  215|      0|    }
  216|     10|    if (inl != 0)
  ------------------
  |  Branch (216:9): [True: 10, False: 0]
  ------------------
  217|     10|        memcpy(&(ctx->enc_data[0]), in, inl);
  218|     10|    ctx->num = inl;
  219|     10|    *outl = (int)total;
  220|       |
  221|     10|    return 1;
  222|     10|}
EVP_EncodeFinal:
  225|     10|{
  226|     10|    size_t ret = 0;
  227|     10|    int wrap_cnt = 0;
  228|       |
  229|     10|    if (ctx->num != 0) {
  ------------------
  |  Branch (229:9): [True: 10, False: 0]
  ------------------
  230|     10|        ret = evp_encodeblock_int(ctx, out, ctx->enc_data, ctx->num,
  231|     10|            &wrap_cnt);
  232|     10|        if (ret > 0) {
  ------------------
  |  Branch (232:13): [True: 10, False: 0]
  ------------------
  233|     10|            if ((ctx->flags & EVP_ENCODE_CTX_NO_NEWLINES) == 0)
  ------------------
  |  |  625|     10|#define EVP_ENCODE_CTX_NO_NEWLINES 1
  ------------------
  |  Branch (233:17): [True: 10, False: 0]
  ------------------
  234|     10|                out[ret++] = '\n';
  235|     10|            out[ret] = '\0';
  236|     10|            ctx->num = 0;
  237|     10|        }
  238|     10|    }
  239|     10|    *outl = (int)ret;
  240|     10|}
EVP_DecodeInit:
  259|  11.0k|{
  260|       |    /* Only ctx->num and ctx->flags are used during decoding. */
  261|  11.0k|    ctx->num = 0;
  262|  11.0k|    ctx->line_num = 0;
  263|  11.0k|    ctx->flags = 0;
  264|  11.0k|}
EVP_DecodeUpdate:
  288|  11.0k|{
  289|  11.0k|    int seof = 0, eof = 0, rv = -1, ret = 0, i, v, tmp, n, decoded_len;
  290|  11.0k|    unsigned char *d;
  291|  11.0k|    const unsigned char *table;
  292|       |
  293|  11.0k|    n = ctx->num;
  294|  11.0k|    d = ctx->enc_data;
  295|       |
  296|  11.0k|    if (n > 0 && d[n - 1] == '=') {
  ------------------
  |  Branch (296:9): [True: 0, False: 11.0k]
  |  Branch (296:18): [True: 0, False: 0]
  ------------------
  297|      0|        eof++;
  298|      0|        if (n > 1 && d[n - 2] == '=')
  ------------------
  |  Branch (298:13): [True: 0, False: 0]
  |  Branch (298:22): [True: 0, False: 0]
  ------------------
  299|      0|            eof++;
  300|      0|    }
  301|       |
  302|       |    /* Legacy behaviour: an empty input chunk signals end of input. */
  303|  11.0k|    if (inl == 0) {
  ------------------
  |  Branch (303:9): [True: 0, False: 11.0k]
  ------------------
  304|      0|        rv = 0;
  305|      0|        goto end;
  306|      0|    }
  307|       |
  308|  11.0k|    if ((ctx->flags & EVP_ENCODE_CTX_USE_SRP_ALPHABET) != 0)
  ------------------
  |  |  627|  11.0k|#define EVP_ENCODE_CTX_USE_SRP_ALPHABET 2
  ------------------
  |  Branch (308:9): [True: 0, False: 11.0k]
  ------------------
  309|      0|        table = srpdata_ascii2bin;
  310|  11.0k|    else
  311|  11.0k|        table = data_ascii2bin;
  312|       |
  313|  4.88M|    for (i = 0; i < inl; i++) {
  ------------------
  |  Branch (313:17): [True: 4.87M, False: 11.0k]
  ------------------
  314|  4.87M|        tmp = *(in++);
  315|  4.87M|        v = conv_ascii2bin(tmp, table);
  316|  4.87M|        if (v == B64_ERROR) {
  ------------------
  |  |   57|  4.87M|#define B64_ERROR 0xFF
  ------------------
  |  Branch (316:13): [True: 0, False: 4.87M]
  ------------------
  317|      0|            rv = -1;
  318|      0|            goto end;
  319|      0|        }
  320|       |
  321|  4.87M|        if (tmp == '=') {
  ------------------
  |  Branch (321:13): [True: 14.5k, False: 4.85M]
  ------------------
  322|  14.5k|            eof++;
  323|  4.85M|        } else if (eof > 0 && B64_BASE64(v)) {
  ------------------
  |  |   59|  7.28k|#define B64_BASE64(a) (!B64_NOT_BASE64(a))
  |  |  ------------------
  |  |  |  |   58|  7.28k|#define B64_NOT_BASE64(a) (((a) | 0x13) == 0xF3)
  |  |  ------------------
  |  |  |  Branch (59:23): [True: 0, False: 7.28k]
  |  |  ------------------
  ------------------
  |  Branch (323:20): [True: 7.28k, False: 4.85M]
  ------------------
  324|       |            /* More data after padding. */
  325|      0|            rv = -1;
  326|      0|            goto end;
  327|      0|        }
  328|       |
  329|  4.87M|        if (eof > 2) {
  ------------------
  |  Branch (329:13): [True: 0, False: 4.87M]
  ------------------
  330|      0|            rv = -1;
  331|      0|            goto end;
  332|      0|        }
  333|       |
  334|  4.87M|        if (v == B64_EOF) {
  ------------------
  |  |   55|  4.87M|#define B64_EOF 0xF2
  ------------------
  |  Branch (334:13): [True: 0, False: 4.87M]
  ------------------
  335|      0|            seof = 1;
  336|      0|            goto tail;
  337|      0|        }
  338|       |
  339|       |        /* Only save valid base64 characters. */
  340|  4.87M|        if (B64_BASE64(v)) {
  ------------------
  |  |   59|  4.87M|#define B64_BASE64(a) (!B64_NOT_BASE64(a))
  |  |  ------------------
  |  |  |  |   58|  4.87M|#define B64_NOT_BASE64(a) (((a) | 0x13) == 0xF3)
  |  |  ------------------
  |  |  |  Branch (59:23): [True: 4.79M, False: 76.7k]
  |  |  ------------------
  ------------------
  341|  4.79M|            if (n >= 64) {
  ------------------
  |  Branch (341:17): [True: 0, False: 4.79M]
  ------------------
  342|       |                /*
  343|       |                 * We increment n once per loop, and empty the buffer as soon as
  344|       |                 * we reach 64 characters, so this can only happen if someone's
  345|       |                 * manually messed with the ctx. Refuse to write any more data.
  346|       |                 */
  347|      0|                rv = -1;
  348|      0|                goto end;
  349|      0|            }
  350|  4.79M|            OPENSSL_assert(n < (int)sizeof(ctx->enc_data));
  ------------------
  |  |  477|  4.79M|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (477:12): [True: 4.79M, False: 0]
  |  |  ------------------
  ------------------
  351|  4.79M|            d[n++] = tmp;
  352|  4.79M|        }
  353|       |
  354|  4.87M|        if (n == 64) {
  ------------------
  |  Branch (354:13): [True: 65.7k, False: 4.80M]
  ------------------
  355|  65.7k|            decoded_len = evp_decodeblock_int(ctx, out, d, n, eof);
  356|  65.7k|            n = 0;
  357|  65.7k|            if (decoded_len < 0 || (decoded_len == 0 && eof > 0)) {
  ------------------
  |  Branch (357:17): [True: 0, False: 65.7k]
  |  Branch (357:37): [True: 0, False: 65.7k]
  |  Branch (357:57): [True: 0, False: 0]
  ------------------
  358|      0|                rv = -1;
  359|      0|                goto end;
  360|      0|            }
  361|  65.7k|            ret += decoded_len;
  362|  65.7k|            out += decoded_len;
  363|  65.7k|        }
  364|  4.87M|    }
  365|       |
  366|       |    /*
  367|       |     * Legacy behaviour: if the current line is a full base64-block (i.e., has
  368|       |     * 0 mod 4 base64 characters), it is processed immediately. We keep this
  369|       |     * behaviour as applications may not be calling EVP_DecodeFinal properly.
  370|       |     */
  371|  11.0k|tail:
  372|  11.0k|    if (n > 0) {
  ------------------
  |  Branch (372:9): [True: 11.0k, False: 0]
  ------------------
  373|  11.0k|        if ((n & 3) == 0) {
  ------------------
  |  Branch (373:13): [True: 11.0k, False: 0]
  ------------------
  374|  11.0k|            decoded_len = evp_decodeblock_int(ctx, out, d, n, eof);
  375|  11.0k|            n = 0;
  376|  11.0k|            if (decoded_len < 0 || (decoded_len == 0 && eof > 0)) {
  ------------------
  |  Branch (376:17): [True: 0, False: 11.0k]
  |  Branch (376:37): [True: 0, False: 11.0k]
  |  Branch (376:57): [True: 0, False: 0]
  ------------------
  377|      0|                rv = -1;
  378|      0|                goto end;
  379|      0|            }
  380|  11.0k|            ret += decoded_len;
  381|  11.0k|        } else if (seof) {
  ------------------
  |  Branch (381:20): [True: 0, False: 0]
  ------------------
  382|       |            /* EOF in the middle of a base64 block. */
  383|      0|            rv = -1;
  384|      0|            goto end;
  385|      0|        }
  386|  11.0k|    }
  387|       |
  388|  11.0k|    rv = seof || (n == 0 && eof) ? 0 : 1;
  ------------------
  |  Branch (388:10): [True: 0, False: 11.0k]
  |  Branch (388:19): [True: 11.0k, False: 0]
  |  Branch (388:29): [True: 7.28k, False: 3.73k]
  ------------------
  389|  11.0k|end:
  390|       |    /* Legacy behaviour. This should probably rather be zeroed on error. */
  391|  11.0k|    *outl = ret;
  392|  11.0k|    ctx->num = n;
  393|  11.0k|    return rv;
  394|  11.0k|}
EVP_DecodeFinal:
  482|  11.0k|{
  483|  11.0k|    int i;
  484|       |
  485|  11.0k|    *outl = 0;
  486|  11.0k|    if (ctx->num != 0) {
  ------------------
  |  Branch (486:9): [True: 0, False: 11.0k]
  ------------------
  487|      0|        i = evp_decodeblock_int(ctx, out, ctx->enc_data, ctx->num, -1);
  488|      0|        if (i < 0)
  ------------------
  |  Branch (488:13): [True: 0, False: 0]
  ------------------
  489|      0|            return -1;
  490|      0|        ctx->num = 0;
  491|      0|        *outl = i;
  492|      0|        return 1;
  493|      0|    } else
  494|  11.0k|        return 1;
  495|  11.0k|}
encode.c:conv_ascii2bin:
   95|  9.82M|{
   96|  9.82M|    if (a & 0x80)
  ------------------
  |  Branch (96:9): [True: 0, False: 9.82M]
  ------------------
   97|      0|        return B64_ERROR;
  ------------------
  |  |   57|      0|#define B64_ERROR 0xFF
  ------------------
   98|  9.82M|    return table[a];
   99|  9.82M|}
encode.c:evp_decodeblock_int:
  399|  76.7k|{
  400|  76.7k|    int i, ret = 0, a, b, c, d;
  401|  76.7k|    unsigned long l;
  402|  76.7k|    const unsigned char *table;
  403|       |
  404|  76.7k|    if (eof < -1 || eof > 2)
  ------------------
  |  Branch (404:9): [True: 0, False: 76.7k]
  |  Branch (404:21): [True: 0, False: 76.7k]
  ------------------
  405|      0|        return -1;
  406|       |
  407|  76.7k|    if (ctx != NULL && (ctx->flags & EVP_ENCODE_CTX_USE_SRP_ALPHABET) != 0)
  ------------------
  |  |  627|  76.7k|#define EVP_ENCODE_CTX_USE_SRP_ALPHABET 2
  ------------------
  |  Branch (407:9): [True: 76.7k, False: 0]
  |  Branch (407:24): [True: 0, False: 76.7k]
  ------------------
  408|      0|        table = srpdata_ascii2bin;
  409|  76.7k|    else
  410|  76.7k|        table = data_ascii2bin;
  411|       |
  412|       |    /* trim whitespace from the start of the line. */
  413|  76.7k|    while ((n > 0) && (conv_ascii2bin(*f, table) == B64_WS)) {
  ------------------
  |  |   56|  76.7k|#define B64_WS 0xE0
  ------------------
  |  Branch (413:12): [True: 76.7k, False: 0]
  |  Branch (413:23): [True: 0, False: 76.7k]
  ------------------
  414|      0|        f++;
  415|      0|        n--;
  416|      0|    }
  417|       |
  418|       |    /*
  419|       |     * strip off stuff at the end of the line ascii2bin values B64_WS,
  420|       |     * B64_EOLN, B64_EOLN and B64_EOF
  421|       |     */
  422|  76.7k|    while ((n > 3) && (B64_NOT_BASE64(conv_ascii2bin(f[n - 1], table))))
  ------------------
  |  |   58|  76.7k|#define B64_NOT_BASE64(a) (((a) | 0x13) == 0xF3)
  ------------------
  |  Branch (422:12): [True: 76.7k, False: 0]
  |  Branch (422:23): [True: 0, False: 76.7k]
  ------------------
  423|      0|        n--;
  424|       |
  425|  76.7k|    if (n % 4 != 0)
  ------------------
  |  Branch (425:9): [True: 0, False: 76.7k]
  ------------------
  426|      0|        return -1;
  427|  76.7k|    if (n == 0)
  ------------------
  |  Branch (427:9): [True: 0, False: 76.7k]
  ------------------
  428|      0|        return 0;
  429|       |
  430|       |    /* all 4-byte blocks except the last one do not have padding. */
  431|  1.19M|    for (i = 0; i < n - 4; i += 4) {
  ------------------
  |  Branch (431:17): [True: 1.12M, False: 76.7k]
  ------------------
  432|  1.12M|        a = conv_ascii2bin(*(f++), table);
  433|  1.12M|        b = conv_ascii2bin(*(f++), table);
  434|  1.12M|        c = conv_ascii2bin(*(f++), table);
  435|  1.12M|        d = conv_ascii2bin(*(f++), table);
  436|  1.12M|        if ((a | b | c | d) & 0x80)
  ------------------
  |  Branch (436:13): [True: 0, False: 1.12M]
  ------------------
  437|      0|            return -1;
  438|  1.12M|        l = ((((unsigned long)a) << 18L) | (((unsigned long)b) << 12L) | (((unsigned long)c) << 6L) | (((unsigned long)d)));
  439|  1.12M|        *(t++) = (unsigned char)(l >> 16L) & 0xff;
  440|  1.12M|        *(t++) = (unsigned char)(l >> 8L) & 0xff;
  441|  1.12M|        *(t++) = (unsigned char)(l) & 0xff;
  442|  1.12M|        ret += 3;
  443|  1.12M|    }
  444|       |
  445|       |    /* process the last block that may have padding. */
  446|  76.7k|    a = conv_ascii2bin(*(f++), table);
  447|  76.7k|    b = conv_ascii2bin(*(f++), table);
  448|  76.7k|    c = conv_ascii2bin(*(f++), table);
  449|  76.7k|    d = conv_ascii2bin(*(f++), table);
  450|  76.7k|    if ((a | b | c | d) & 0x80)
  ------------------
  |  Branch (450:9): [True: 0, False: 76.7k]
  ------------------
  451|      0|        return -1;
  452|  76.7k|    l = ((((unsigned long)a) << 18L) | (((unsigned long)b) << 12L) | (((unsigned long)c) << 6L) | (((unsigned long)d)));
  453|       |
  454|  76.7k|    if (eof == -1)
  ------------------
  |  Branch (454:9): [True: 0, False: 76.7k]
  ------------------
  455|      0|        eof = (c == '=') + (d == '=');
  456|       |
  457|  76.7k|    switch (eof) {
  ------------------
  |  Branch (457:13): [True: 76.7k, False: 0]
  ------------------
  458|  7.28k|    case 2:
  ------------------
  |  Branch (458:5): [True: 7.28k, False: 69.5k]
  ------------------
  459|  7.28k|        *t = (unsigned char)(l >> 16L) & 0xff;
  460|  7.28k|        break;
  461|      0|    case 1:
  ------------------
  |  Branch (461:5): [True: 0, False: 76.7k]
  ------------------
  462|      0|        *(t++) = (unsigned char)(l >> 16L) & 0xff;
  463|      0|        *t = (unsigned char)(l >> 8L) & 0xff;
  464|      0|        break;
  465|  69.5k|    case 0:
  ------------------
  |  Branch (465:5): [True: 69.5k, False: 7.28k]
  ------------------
  466|  69.5k|        *(t++) = (unsigned char)(l >> 16L) & 0xff;
  467|  69.5k|        *(t++) = (unsigned char)(l >> 8L) & 0xff;
  468|  69.5k|        *t = (unsigned char)(l) & 0xff;
  469|  69.5k|        break;
  470|  76.7k|    }
  471|  76.7k|    ret += 3 - eof;
  472|       |
  473|  76.7k|    return ret;
  474|  76.7k|}

EVP_CIPHER_CTX_reset:
   29|  36.1k|{
   30|  36.1k|    if (ctx == NULL)
  ------------------
  |  Branch (30:9): [True: 0, False: 36.1k]
  ------------------
   31|      0|        return 1;
   32|       |
   33|  36.1k|    if (ctx->cipher == NULL || ctx->cipher->prov == NULL)
  ------------------
  |  Branch (33:9): [True: 0, False: 36.1k]
  |  Branch (33:32): [True: 0, False: 36.1k]
  ------------------
   34|      0|        return 1;
   35|       |
   36|  36.1k|    if (ctx->algctx != NULL) {
  ------------------
  |  Branch (36:9): [True: 36.1k, False: 0]
  ------------------
   37|  36.1k|        if (ctx->cipher->freectx != NULL)
  ------------------
  |  Branch (37:13): [True: 36.1k, False: 0]
  ------------------
   38|  36.1k|            ctx->cipher->freectx(ctx->algctx);
   39|  36.1k|        ctx->algctx = NULL;
   40|  36.1k|    }
   41|  36.1k|    if (ctx->fetched_cipher != NULL)
  ------------------
  |  Branch (41:9): [True: 36.1k, False: 0]
  ------------------
   42|  36.1k|        EVP_CIPHER_free(ctx->fetched_cipher);
   43|  36.1k|    memset(ctx, 0, sizeof(*ctx));
   44|  36.1k|    ctx->iv_len = -1;
   45|       |
   46|  36.1k|    return 1;
   47|  36.1k|}
EVP_CIPHER_CTX_new:
   50|  36.1k|{
   51|  36.1k|    EVP_CIPHER_CTX *ctx;
   52|       |
   53|  36.1k|    ctx = OPENSSL_zalloc(sizeof(EVP_CIPHER_CTX));
  ------------------
  |  |  109|  36.1k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   54|  36.1k|    if (ctx == NULL)
  ------------------
  |  Branch (54:9): [True: 0, False: 36.1k]
  ------------------
   55|      0|        return NULL;
   56|       |
   57|  36.1k|    ctx->iv_len = -1;
   58|  36.1k|    return ctx;
   59|  36.1k|}
EVP_CIPHER_CTX_free:
   62|  79.7k|{
   63|  79.7k|    if (ctx == NULL)
  ------------------
  |  Branch (63:9): [True: 43.5k, False: 36.1k]
  ------------------
   64|  43.5k|        return;
   65|  36.1k|    EVP_CIPHER_CTX_reset(ctx);
   66|  36.1k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|  36.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   67|  36.1k|}
EVP_CipherInit_ex:
  411|   477k|{
  412|   477k|    if (!ossl_assert(impl == NULL))
  ------------------
  |  |   52|   477k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   477k|    __FILE__, __LINE__)
  ------------------
  |  Branch (412:9): [True: 0, False: 477k]
  ------------------
  413|      0|        return 0;
  414|   477k|    return evp_cipher_init_internal(ctx, cipher, key, iv, enc, 0, NULL);
  415|   477k|}
EVP_CipherUpdate:
  479|   366k|{
  480|   366k|    if (ctx->encrypt)
  ------------------
  |  Branch (480:9): [True: 301k, False: 65.0k]
  ------------------
  481|   301k|        return EVP_EncryptUpdate(ctx, out, outl, in, inl);
  482|  65.0k|    else
  483|  65.0k|        return EVP_DecryptUpdate(ctx, out, outl, in, inl);
  484|   366k|}
EVP_CipherFinal_ex:
  522|  68.6k|{
  523|  68.6k|    if (ctx->encrypt)
  ------------------
  |  Branch (523:9): [True: 36.1k, False: 32.5k]
  ------------------
  524|  36.1k|        return EVP_EncryptFinal_ex(ctx, out, outl);
  525|  32.5k|    else
  526|  32.5k|        return EVP_DecryptFinal_ex(ctx, out, outl);
  527|  68.6k|}
EVP_EncryptInit_ex:
  579|  7.16k|{
  580|  7.16k|    if (!ossl_assert(impl == NULL))
  ------------------
  |  |   52|  7.16k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  7.16k|    __FILE__, __LINE__)
  ------------------
  |  Branch (580:9): [True: 0, False: 7.16k]
  ------------------
  581|      0|        return 0;
  582|  7.16k|    return EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, 1);
  583|  7.16k|}
EVP_EncryptUpdate:
  652|   308k|{
  653|   308k|    int ret;
  654|   308k|    size_t soutl, inl_ = (size_t)inl;
  655|   308k|    int blocksize;
  656|       |
  657|   308k|    if (inl < 0) {
  ------------------
  |  Branch (657:9): [True: 0, False: 308k]
  ------------------
  658|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  659|      0|        return 0;
  660|      0|    }
  661|       |
  662|   308k|    if (ossl_likely(outl != NULL)) {
  ------------------
  |  |   22|   308k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 308k, False: 0]
  |  |  ------------------
  ------------------
  663|   308k|        *outl = 0;
  664|   308k|    } else {
  665|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  666|      0|        return 0;
  667|      0|    }
  668|       |
  669|       |    /* Prevent accidental use of decryption context when encrypting */
  670|   308k|    if (ossl_unlikely(!ctx->encrypt)) {
  ------------------
  |  |   23|   308k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 308k]
  |  |  ------------------
  ------------------
  671|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_OPERATION);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  672|      0|        return 0;
  673|      0|    }
  674|       |
  675|   308k|    if (ossl_unlikely(ctx->cipher == NULL)) {
  ------------------
  |  |   23|   308k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 308k]
  |  |  ------------------
  ------------------
  676|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NO_CIPHER_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  677|      0|        return 0;
  678|      0|    }
  679|       |
  680|   308k|    if (ossl_unlikely(ctx->cipher->prov == NULL))
  ------------------
  |  |   23|   308k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 308k]
  |  |  ------------------
  ------------------
  681|      0|        return 0;
  682|       |
  683|   308k|    blocksize = ctx->cipher->block_size;
  684|       |
  685|   308k|    if (ossl_unlikely(ctx->cipher->cupdate == NULL || blocksize < 1)) {
  ------------------
  |  |   23|   617k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 308k]
  |  |  |  Branch (23:46): [True: 0, False: 308k]
  |  |  |  Branch (23:46): [True: 0, False: 308k]
  |  |  ------------------
  ------------------
  686|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  687|      0|        return 0;
  688|      0|    }
  689|       |
  690|   308k|    ret = ctx->cipher->cupdate(ctx->algctx, out, &soutl,
  691|   308k|        inl_ + (size_t)(blocksize == 1 ? 0 : blocksize),
  ------------------
  |  Branch (691:25): [True: 186k, False: 121k]
  ------------------
  692|   308k|        in, inl_);
  693|       |
  694|   308k|    if (ossl_likely(ret)) {
  ------------------
  |  |   22|   308k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 308k, False: 0]
  |  |  ------------------
  ------------------
  695|   308k|        if (ossl_unlikely(soutl > INT_MAX)) {
  ------------------
  |  |   23|   308k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 308k]
  |  |  ------------------
  ------------------
  696|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  697|      0|            return 0;
  698|      0|        }
  699|   308k|        *outl = (int)soutl;
  700|   308k|    }
  701|       |
  702|   308k|    return ret;
  703|   308k|}
EVP_EncryptFinal:
  706|  7.16k|{
  707|  7.16k|    int ret;
  708|  7.16k|    ret = EVP_EncryptFinal_ex(ctx, out, outl);
  709|  7.16k|    return ret;
  710|  7.16k|}
EVP_EncryptFinal_ex:
  713|  43.3k|{
  714|  43.3k|    int ret;
  715|  43.3k|    size_t soutl;
  716|  43.3k|    int blocksize;
  717|       |
  718|  43.3k|    if (outl != NULL) {
  ------------------
  |  Branch (718:9): [True: 43.3k, False: 0]
  ------------------
  719|  43.3k|        *outl = 0;
  720|  43.3k|    } else {
  721|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  722|      0|        return 0;
  723|      0|    }
  724|       |
  725|       |    /* Prevent accidental use of decryption context when encrypting */
  726|  43.3k|    if (!ctx->encrypt) {
  ------------------
  |  Branch (726:9): [True: 0, False: 43.3k]
  ------------------
  727|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_OPERATION);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  728|      0|        return 0;
  729|      0|    }
  730|       |
  731|  43.3k|    if (ctx->cipher == NULL) {
  ------------------
  |  Branch (731:9): [True: 0, False: 43.3k]
  ------------------
  732|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NO_CIPHER_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  733|      0|        return 0;
  734|      0|    }
  735|  43.3k|    if (ctx->cipher->prov == NULL) {
  ------------------
  |  Branch (735:9): [True: 0, False: 43.3k]
  ------------------
  736|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NO_CIPHER_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  737|      0|        return 0;
  738|      0|    }
  739|       |
  740|  43.3k|    blocksize = EVP_CIPHER_CTX_get_block_size(ctx);
  741|       |
  742|  43.3k|    if (blocksize < 1 || ctx->cipher->cfinal == NULL) {
  ------------------
  |  Branch (742:9): [True: 0, False: 43.3k]
  |  Branch (742:26): [True: 0, False: 43.3k]
  ------------------
  743|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  744|      0|        return 0;
  745|      0|    }
  746|       |
  747|  43.3k|    ret = ctx->cipher->cfinal(ctx->algctx, out, &soutl,
  748|  43.3k|        blocksize == 1 ? 0 : blocksize);
  ------------------
  |  Branch (748:9): [True: 36.1k, False: 7.16k]
  ------------------
  749|       |
  750|  43.3k|    if (ret) {
  ------------------
  |  Branch (750:9): [True: 43.3k, False: 0]
  ------------------
  751|  43.3k|        if (soutl > INT_MAX) {
  ------------------
  |  Branch (751:13): [True: 0, False: 43.3k]
  ------------------
  752|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  753|      0|            return 0;
  754|      0|        }
  755|  43.3k|        *outl = (int)soutl;
  756|  43.3k|    }
  757|       |
  758|  43.3k|    return ret;
  759|  43.3k|}
EVP_DecryptUpdate:
  763|  65.0k|{
  764|  65.0k|    int ret;
  765|  65.0k|    size_t soutl, inl_ = (size_t)inl;
  766|  65.0k|    int blocksize;
  767|       |
  768|  65.0k|    if (inl < 0) {
  ------------------
  |  Branch (768:9): [True: 0, False: 65.0k]
  ------------------
  769|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  770|      0|        return 0;
  771|      0|    }
  772|       |
  773|  65.0k|    if (ossl_likely(outl != NULL)) {
  ------------------
  |  |   22|  65.0k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 65.0k, False: 0]
  |  |  ------------------
  ------------------
  774|  65.0k|        *outl = 0;
  775|  65.0k|    } else {
  776|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  777|      0|        return 0;
  778|      0|    }
  779|       |
  780|       |    /* Prevent accidental use of encryption context when decrypting */
  781|  65.0k|    if (ossl_unlikely(ctx->encrypt)) {
  ------------------
  |  |   23|  65.0k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 65.0k]
  |  |  ------------------
  ------------------
  782|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_OPERATION);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  783|      0|        return 0;
  784|      0|    }
  785|       |
  786|  65.0k|    if (ossl_unlikely(ctx->cipher == NULL)) {
  ------------------
  |  |   23|  65.0k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 65.0k]
  |  |  ------------------
  ------------------
  787|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NO_CIPHER_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  788|      0|        return 0;
  789|      0|    }
  790|  65.0k|    if (ossl_unlikely(ctx->cipher->prov == NULL)) {
  ------------------
  |  |   23|  65.0k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 65.0k]
  |  |  ------------------
  ------------------
  791|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NO_CIPHER_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  792|      0|        return 0;
  793|      0|    }
  794|       |
  795|  65.0k|    blocksize = EVP_CIPHER_CTX_get_block_size(ctx);
  796|       |
  797|  65.0k|    if (ossl_unlikely(ctx->cipher->cupdate == NULL || blocksize < 1)) {
  ------------------
  |  |   23|   130k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 65.0k]
  |  |  |  Branch (23:46): [True: 0, False: 65.0k]
  |  |  |  Branch (23:46): [True: 0, False: 65.0k]
  |  |  ------------------
  ------------------
  798|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  799|      0|        return 0;
  800|      0|    }
  801|  65.0k|    ret = ctx->cipher->cupdate(ctx->algctx, out, &soutl,
  802|  65.0k|        inl_ + (size_t)(blocksize == 1 ? 0 : blocksize),
  ------------------
  |  Branch (802:25): [True: 65.0k, False: 0]
  ------------------
  803|  65.0k|        in, inl_);
  804|       |
  805|  65.0k|    if (ossl_likely(ret)) {
  ------------------
  |  |   22|  65.0k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 65.0k, False: 0]
  |  |  ------------------
  ------------------
  806|  65.0k|        if (ossl_unlikely(soutl > INT_MAX)) {
  ------------------
  |  |   23|  65.0k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 65.0k]
  |  |  ------------------
  ------------------
  807|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  808|      0|            return 0;
  809|      0|        }
  810|  65.0k|        *outl = (int)soutl;
  811|  65.0k|    }
  812|       |
  813|  65.0k|    return ret;
  814|  65.0k|}
EVP_DecryptFinal_ex:
  824|  32.5k|{
  825|  32.5k|    size_t soutl;
  826|  32.5k|    int ret;
  827|  32.5k|    int blocksize;
  828|       |
  829|  32.5k|    if (outl != NULL) {
  ------------------
  |  Branch (829:9): [True: 32.5k, False: 0]
  ------------------
  830|  32.5k|        *outl = 0;
  831|  32.5k|    } else {
  832|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  833|      0|        return 0;
  834|      0|    }
  835|       |
  836|       |    /* Prevent accidental use of encryption context when decrypting */
  837|  32.5k|    if (ctx->encrypt) {
  ------------------
  |  Branch (837:9): [True: 0, False: 32.5k]
  ------------------
  838|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_OPERATION);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  839|      0|        return 0;
  840|      0|    }
  841|       |
  842|  32.5k|    if (ctx->cipher == NULL) {
  ------------------
  |  Branch (842:9): [True: 0, False: 32.5k]
  ------------------
  843|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NO_CIPHER_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  844|      0|        return 0;
  845|      0|    }
  846|       |
  847|  32.5k|    if (ctx->cipher->prov == NULL) {
  ------------------
  |  Branch (847:9): [True: 0, False: 32.5k]
  ------------------
  848|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NO_CIPHER_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  849|      0|        return 0;
  850|      0|    }
  851|       |
  852|  32.5k|    blocksize = EVP_CIPHER_CTX_get_block_size(ctx);
  853|       |
  854|  32.5k|    if (blocksize < 1 || ctx->cipher->cfinal == NULL) {
  ------------------
  |  Branch (854:9): [True: 0, False: 32.5k]
  |  Branch (854:26): [True: 0, False: 32.5k]
  ------------------
  855|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  856|      0|        return 0;
  857|      0|    }
  858|       |
  859|  32.5k|    ret = ctx->cipher->cfinal(ctx->algctx, out, &soutl,
  860|  32.5k|        blocksize == 1 ? 0 : blocksize);
  ------------------
  |  Branch (860:9): [True: 32.5k, False: 0]
  ------------------
  861|       |
  862|  32.5k|    if (ret) {
  ------------------
  |  Branch (862:9): [True: 32.5k, False: 0]
  ------------------
  863|  32.5k|        if (soutl > INT_MAX) {
  ------------------
  |  Branch (863:13): [True: 0, False: 32.5k]
  ------------------
  864|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  865|      0|            return 0;
  866|      0|        }
  867|  32.5k|        *outl = (int)soutl;
  868|  32.5k|    }
  869|       |
  870|  32.5k|    return ret;
  871|  32.5k|}
EVP_CIPHER_CTX_ctrl:
  925|  97.6k|{
  926|  97.6k|    int ret = EVP_CTRL_RET_UNSUPPORTED;
  ------------------
  |  |   13|  97.6k|#define EVP_CTRL_RET_UNSUPPORTED -1
  ------------------
  927|  97.6k|    int set_params = 1;
  928|  97.6k|    size_t sz = arg;
  929|  97.6k|    unsigned int i;
  930|  97.6k|    OSSL_PARAM params[4] = {
  931|  97.6k|        OSSL_PARAM_END, OSSL_PARAM_END, OSSL_PARAM_END, OSSL_PARAM_END
  ------------------
  |  |   25|  97.6k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                      OSSL_PARAM_END, OSSL_PARAM_END, OSSL_PARAM_END, OSSL_PARAM_END
  ------------------
  |  |   25|  97.6k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                      OSSL_PARAM_END, OSSL_PARAM_END, OSSL_PARAM_END, OSSL_PARAM_END
  ------------------
  |  |   25|  97.6k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                      OSSL_PARAM_END, OSSL_PARAM_END, OSSL_PARAM_END, OSSL_PARAM_END
  ------------------
  |  |   25|  97.6k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  932|  97.6k|    };
  933|       |
  934|  97.6k|    if (ctx == NULL || ctx->cipher == NULL) {
  ------------------
  |  Branch (934:9): [True: 0, False: 97.6k]
  |  Branch (934:24): [True: 0, False: 97.6k]
  ------------------
  935|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NO_CIPHER_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  936|      0|        return 0;
  937|      0|    }
  938|       |
  939|  97.6k|    if (ctx->cipher->prov == NULL) {
  ------------------
  |  Branch (939:9): [True: 0, False: 97.6k]
  ------------------
  940|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_CTRL_NOT_IMPLEMENTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  941|      0|        return 0;
  942|      0|    }
  943|       |
  944|  97.6k|    switch (type) {
  945|      0|    case EVP_CTRL_SET_KEY_LENGTH:
  ------------------
  |  |  279|      0|#define EVP_CTRL_SET_KEY_LENGTH 0x1
  ------------------
  |  Branch (945:5): [True: 0, False: 97.6k]
  ------------------
  946|      0|        if (arg < 0)
  ------------------
  |  Branch (946:13): [True: 0, False: 0]
  ------------------
  947|      0|            return 0;
  948|      0|        if (ctx->key_len == arg)
  ------------------
  |  Branch (948:13): [True: 0, False: 0]
  ------------------
  949|       |            /* Skip calling into provider if unchanged. */
  950|      0|            return 1;
  951|      0|        params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_KEYLEN, &sz);
  ------------------
  |  |  197|      0|# define OSSL_CIPHER_PARAM_KEYLEN "keylen"
  ------------------
  952|      0|        ctx->key_len = -1;
  953|      0|        break;
  954|      0|    case EVP_CTRL_RAND_KEY: /* Used by DES */
  ------------------
  |  |  284|      0|#define EVP_CTRL_RAND_KEY 0x6
  ------------------
  |  Branch (954:5): [True: 0, False: 97.6k]
  ------------------
  955|      0|        set_params = 0;
  956|      0|        params[0] = OSSL_PARAM_construct_octet_string(OSSL_CIPHER_PARAM_RANDOM_KEY,
  ------------------
  |  |  202|      0|# define OSSL_CIPHER_PARAM_RANDOM_KEY "randkey"
  ------------------
  957|      0|            ptr, sz);
  958|      0|        break;
  959|       |
  960|      0|    case EVP_CTRL_INIT:
  ------------------
  |  |  278|      0|#define EVP_CTRL_INIT 0x0
  ------------------
  |  Branch (960:5): [True: 0, False: 97.6k]
  ------------------
  961|       |        /*
  962|       |         * EVP_CTRL_INIT is purely legacy, no provider counterpart.
  963|       |         * As a matter of fact, this should be dead code, but some caller
  964|       |         * might still do a direct control call with this command, so...
  965|       |         * Legacy methods return 1 except for exceptional circumstances, so
  966|       |         * we do the same here to not be disruptive.
  967|       |         */
  968|      0|        return 1;
  969|      0|    case EVP_CTRL_SET_PIPELINE_OUTPUT_BUFS: /* Used by DASYNC */
  ------------------
  |  |  335|      0|#define EVP_CTRL_SET_PIPELINE_OUTPUT_BUFS 0x22
  ------------------
  |  Branch (969:5): [True: 0, False: 97.6k]
  ------------------
  970|      0|    default:
  ------------------
  |  Branch (970:5): [True: 0, False: 97.6k]
  ------------------
  971|      0|        goto end;
  972|  28.9k|    case EVP_CTRL_AEAD_SET_IVLEN:
  ------------------
  |  |  287|  28.9k|#define EVP_CTRL_AEAD_SET_IVLEN 0x9
  ------------------
  |  Branch (972:5): [True: 28.9k, False: 68.6k]
  ------------------
  973|  28.9k|        if (arg < 0)
  ------------------
  |  Branch (973:13): [True: 0, False: 28.9k]
  ------------------
  974|      0|            return 0;
  975|  28.9k|        if (ctx->iv_len == arg)
  ------------------
  |  Branch (975:13): [True: 0, False: 28.9k]
  ------------------
  976|       |            /* Skip calling into provider if unchanged. */
  977|      0|            return 1;
  978|  28.9k|        params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_IVLEN, &sz);
  ------------------
  |  |  196|  28.9k|# define OSSL_CIPHER_PARAM_IVLEN "ivlen"
  ------------------
  979|  28.9k|        ctx->iv_len = -1;
  980|  28.9k|        break;
  981|      0|    case EVP_CTRL_CCM_SET_L:
  ------------------
  |  |  300|      0|#define EVP_CTRL_CCM_SET_L 0x14
  ------------------
  |  Branch (981:5): [True: 0, False: 97.6k]
  ------------------
  982|      0|        if (arg < 2 || arg > 8)
  ------------------
  |  Branch (982:13): [True: 0, False: 0]
  |  Branch (982:24): [True: 0, False: 0]
  ------------------
  983|      0|            return 0;
  984|      0|        sz = 15 - arg;
  985|      0|        params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_IVLEN, &sz);
  ------------------
  |  |  196|      0|# define OSSL_CIPHER_PARAM_IVLEN "ivlen"
  ------------------
  986|      0|        ctx->iv_len = -1;
  987|      0|        break;
  988|      0|    case EVP_CTRL_AEAD_SET_IV_FIXED:
  ------------------
  |  |  290|      0|#define EVP_CTRL_AEAD_SET_IV_FIXED 0x12
  ------------------
  |  Branch (988:5): [True: 0, False: 97.6k]
  ------------------
  989|      0|        params[0] = OSSL_PARAM_construct_octet_string(
  990|      0|            OSSL_CIPHER_PARAM_AEAD_TLS1_IV_FIXED, ptr, sz);
  ------------------
  |  |  181|      0|# define OSSL_CIPHER_PARAM_AEAD_TLS1_IV_FIXED "tlsivfixed"
  ------------------
  991|      0|        break;
  992|      0|    case EVP_CTRL_GCM_IV_GEN:
  ------------------
  |  |  295|      0|#define EVP_CTRL_GCM_IV_GEN 0x13
  ------------------
  |  Branch (992:5): [True: 0, False: 97.6k]
  ------------------
  993|      0|        set_params = 0;
  994|      0|        if (arg < 0)
  ------------------
  |  Branch (994:13): [True: 0, False: 0]
  ------------------
  995|      0|            sz = 0; /* special case that uses the iv length */
  996|      0|        params[0] = OSSL_PARAM_construct_octet_string(
  997|      0|            OSSL_CIPHER_PARAM_AEAD_TLS1_GET_IV_GEN, ptr, sz);
  ------------------
  |  |  180|      0|# define OSSL_CIPHER_PARAM_AEAD_TLS1_GET_IV_GEN "tlsivgen"
  ------------------
  998|      0|        break;
  999|      0|    case EVP_CTRL_GCM_SET_IV_INV:
  ------------------
  |  |  311|      0|#define EVP_CTRL_GCM_SET_IV_INV 0x18
  ------------------
  |  Branch (999:5): [True: 0, False: 97.6k]
  ------------------
 1000|      0|        if (arg < 0)
  ------------------
  |  Branch (1000:13): [True: 0, False: 0]
  ------------------
 1001|      0|            return 0;
 1002|      0|        params[0] = OSSL_PARAM_construct_octet_string(
 1003|      0|            OSSL_CIPHER_PARAM_AEAD_TLS1_SET_IV_INV, ptr, sz);
  ------------------
  |  |  182|      0|# define OSSL_CIPHER_PARAM_AEAD_TLS1_SET_IV_INV "tlsivinv"
  ------------------
 1004|      0|        break;
 1005|      0|    case EVP_CTRL_GET_RC5_ROUNDS:
  ------------------
  |  |  282|      0|#define EVP_CTRL_GET_RC5_ROUNDS 0x4
  ------------------
  |  Branch (1005:5): [True: 0, False: 97.6k]
  ------------------
 1006|      0|        set_params = 0; /* Fall thru */
 1007|      0|    case EVP_CTRL_SET_RC5_ROUNDS:
  ------------------
  |  |  283|      0|#define EVP_CTRL_SET_RC5_ROUNDS 0x5
  ------------------
  |  Branch (1007:5): [True: 0, False: 97.6k]
  ------------------
 1008|      0|        if (arg < 0)
  ------------------
  |  Branch (1008:13): [True: 0, False: 0]
  ------------------
 1009|      0|            return 0;
 1010|      0|        i = (unsigned int)arg;
 1011|      0|        params[0] = OSSL_PARAM_construct_uint(OSSL_CIPHER_PARAM_ROUNDS, &i);
  ------------------
  |  |  204|      0|# define OSSL_CIPHER_PARAM_ROUNDS "rounds"
  ------------------
 1012|      0|        break;
 1013|      0|    case EVP_CTRL_SET_SPEED:
  ------------------
  |  |  344|      0|#define EVP_CTRL_SET_SPEED 0x27
  ------------------
  |  Branch (1013:5): [True: 0, False: 97.6k]
  ------------------
 1014|      0|        if (arg < 0)
  ------------------
  |  Branch (1014:13): [True: 0, False: 0]
  ------------------
 1015|      0|            return 0;
 1016|      0|        i = (unsigned int)arg;
 1017|      0|        params[0] = OSSL_PARAM_construct_uint(OSSL_CIPHER_PARAM_SPEED, &i);
  ------------------
  |  |  205|      0|# define OSSL_CIPHER_PARAM_SPEED "speed"
  ------------------
 1018|      0|        break;
 1019|  36.1k|    case EVP_CTRL_AEAD_GET_TAG:
  ------------------
  |  |  288|  36.1k|#define EVP_CTRL_AEAD_GET_TAG 0x10
  ------------------
  |  Branch (1019:5): [True: 36.1k, False: 61.5k]
  ------------------
 1020|  36.1k|        set_params = 0; /* Fall thru */
 1021|  68.6k|    case EVP_CTRL_AEAD_SET_TAG:
  ------------------
  |  |  289|  68.6k|#define EVP_CTRL_AEAD_SET_TAG 0x11
  ------------------
  |  Branch (1021:5): [True: 32.5k, False: 65.1k]
  ------------------
 1022|  68.6k|        params[0] = OSSL_PARAM_construct_octet_string(OSSL_CIPHER_PARAM_AEAD_TAG,
  ------------------
  |  |  176|  68.6k|# define OSSL_CIPHER_PARAM_AEAD_TAG "tag"
  ------------------
 1023|  68.6k|            ptr, sz);
 1024|  68.6k|        break;
 1025|      0|    case EVP_CTRL_AEAD_TLS1_AAD:
  ------------------
  |  |  307|      0|#define EVP_CTRL_AEAD_TLS1_AAD 0x16
  ------------------
  |  Branch (1025:5): [True: 0, False: 97.6k]
  ------------------
 1026|       |        /* This one does a set and a get - since it returns a size */
 1027|      0|        params[0] = OSSL_PARAM_construct_octet_string(OSSL_CIPHER_PARAM_AEAD_TLS1_AAD,
  ------------------
  |  |  178|      0|# define OSSL_CIPHER_PARAM_AEAD_TLS1_AAD "tlsaad"
  ------------------
 1028|      0|            ptr, sz);
 1029|      0|        ret = evp_do_ciph_ctx_setparams(ctx->cipher, ctx->algctx, params);
 1030|      0|        if (ret <= 0)
  ------------------
  |  Branch (1030:13): [True: 0, False: 0]
  ------------------
 1031|      0|            goto end;
 1032|      0|        params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_AEAD_TLS1_AAD_PAD, &sz);
  ------------------
  |  |  179|      0|# define OSSL_CIPHER_PARAM_AEAD_TLS1_AAD_PAD "tlsaadpad"
  ------------------
 1033|      0|        ret = evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params);
 1034|      0|        if (ret <= 0)
  ------------------
  |  Branch (1034:13): [True: 0, False: 0]
  ------------------
 1035|      0|            goto end;
 1036|      0|        if (sz > INT_MAX)
  ------------------
  |  Branch (1036:13): [True: 0, False: 0]
  ------------------
 1037|      0|            return 0;
 1038|      0|        return (int)sz;
 1039|      0|#ifndef OPENSSL_NO_RC2
 1040|      0|    case EVP_CTRL_GET_RC2_KEY_BITS:
  ------------------
  |  |  280|      0|#define EVP_CTRL_GET_RC2_KEY_BITS 0x2
  ------------------
  |  Branch (1040:5): [True: 0, False: 97.6k]
  ------------------
 1041|      0|        set_params = 0; /* Fall thru */
 1042|      0|    case EVP_CTRL_SET_RC2_KEY_BITS:
  ------------------
  |  |  281|      0|#define EVP_CTRL_SET_RC2_KEY_BITS 0x3
  ------------------
  |  Branch (1042:5): [True: 0, False: 97.6k]
  ------------------
 1043|      0|        params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_RC2_KEYBITS, &sz);
  ------------------
  |  |  203|      0|# define OSSL_CIPHER_PARAM_RC2_KEYBITS "keybits"
  ------------------
 1044|      0|        break;
 1045|      0|#endif /* OPENSSL_NO_RC2 */
 1046|      0|#if !defined(OPENSSL_NO_MULTIBLOCK)
 1047|      0|    case EVP_CTRL_TLS1_1_MULTIBLOCK_MAX_BUFSIZE:
  ------------------
  |  |  316|      0|#define EVP_CTRL_TLS1_1_MULTIBLOCK_MAX_BUFSIZE 0x1c
  ------------------
  |  Branch (1047:5): [True: 0, False: 97.6k]
  ------------------
 1048|      0|        params[0] = OSSL_PARAM_construct_size_t(
 1049|      0|            OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_SEND_FRAGMENT, &sz);
  ------------------
  |  |  214|      0|# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_SEND_FRAGMENT "tls1multi_maxsndfrag"
  ------------------
 1050|      0|        ret = evp_do_ciph_ctx_setparams(ctx->cipher, ctx->algctx, params);
 1051|      0|        if (ret <= 0)
  ------------------
  |  Branch (1051:13): [True: 0, False: 0]
  ------------------
 1052|      0|            return 0;
 1053|       |
 1054|      0|        params[0] = OSSL_PARAM_construct_size_t(
 1055|      0|            OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_BUFSIZE, &sz);
  ------------------
  |  |  213|      0|# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_BUFSIZE "tls1multi_maxbufsz"
  ------------------
 1056|      0|        params[1] = OSSL_PARAM_construct_end();
 1057|      0|        ret = evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params);
 1058|      0|        if (ret <= 0 || sz > INT_MAX)
  ------------------
  |  Branch (1058:13): [True: 0, False: 0]
  |  Branch (1058:25): [True: 0, False: 0]
  ------------------
 1059|      0|            return 0;
 1060|      0|        return (int)sz;
 1061|      0|    case EVP_CTRL_TLS1_1_MULTIBLOCK_AAD: {
  ------------------
  |  |  313|      0|#define EVP_CTRL_TLS1_1_MULTIBLOCK_AAD 0x19
  ------------------
  |  Branch (1061:5): [True: 0, False: 97.6k]
  ------------------
 1062|      0|        EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM *p = (EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM *)ptr;
 1063|       |
 1064|      0|        if (arg < (int)sizeof(EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM))
  ------------------
  |  Branch (1064:13): [True: 0, False: 0]
  ------------------
 1065|      0|            return 0;
 1066|       |
 1067|      0|        params[0] = OSSL_PARAM_construct_octet_string(
 1068|      0|            OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD, (void *)p->inp, p->len);
  ------------------
  |  |  207|      0|# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD "tls1multi_aad"
  ------------------
 1069|      0|        params[1] = OSSL_PARAM_construct_uint(
 1070|      0|            OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_INTERLEAVE, &p->interleave);
  ------------------
  |  |  212|      0|# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_INTERLEAVE "tls1multi_interleave"
  ------------------
 1071|      0|        ret = evp_do_ciph_ctx_setparams(ctx->cipher, ctx->algctx, params);
 1072|      0|        if (ret <= 0)
  ------------------
  |  Branch (1072:13): [True: 0, False: 0]
  ------------------
 1073|      0|            return ret;
 1074|       |        /* Retrieve the return values changed by the set */
 1075|      0|        params[0] = OSSL_PARAM_construct_size_t(
 1076|      0|            OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD_PACKLEN, &sz);
  ------------------
  |  |  208|      0|# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD_PACKLEN "tls1multi_aadpacklen"
  ------------------
 1077|      0|        params[1] = OSSL_PARAM_construct_uint(
 1078|      0|            OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_INTERLEAVE, &p->interleave);
  ------------------
  |  |  212|      0|# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_INTERLEAVE "tls1multi_interleave"
  ------------------
 1079|      0|        params[2] = OSSL_PARAM_construct_end();
 1080|      0|        ret = evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params);
 1081|      0|        if (ret <= 0 || sz > INT_MAX)
  ------------------
  |  Branch (1081:13): [True: 0, False: 0]
  |  Branch (1081:25): [True: 0, False: 0]
  ------------------
 1082|      0|            return 0;
 1083|      0|        return (int)sz;
 1084|      0|    }
 1085|      0|    case EVP_CTRL_TLS1_1_MULTIBLOCK_ENCRYPT: {
  ------------------
  |  |  314|      0|#define EVP_CTRL_TLS1_1_MULTIBLOCK_ENCRYPT 0x1a
  ------------------
  |  Branch (1085:5): [True: 0, False: 97.6k]
  ------------------
 1086|      0|        EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM *p = (EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM *)ptr;
 1087|       |
 1088|      0|        params[0] = OSSL_PARAM_construct_octet_string(
 1089|      0|            OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC, p->out, p->len);
  ------------------
  |  |  209|      0|# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC "tls1multi_enc"
  ------------------
 1090|       |
 1091|      0|        params[1] = OSSL_PARAM_construct_octet_string(
 1092|      0|            OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_IN, (void *)p->inp,
  ------------------
  |  |  210|      0|# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_IN "tls1multi_encin"
  ------------------
 1093|      0|            p->len);
 1094|      0|        params[2] = OSSL_PARAM_construct_uint(
 1095|      0|            OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_INTERLEAVE, &p->interleave);
  ------------------
  |  |  212|      0|# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_INTERLEAVE "tls1multi_interleave"
  ------------------
 1096|      0|        ret = evp_do_ciph_ctx_setparams(ctx->cipher, ctx->algctx, params);
 1097|      0|        if (ret <= 0)
  ------------------
  |  Branch (1097:13): [True: 0, False: 0]
  ------------------
 1098|      0|            return ret;
 1099|      0|        params[0] = OSSL_PARAM_construct_size_t(
 1100|      0|            OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_LEN, &sz);
  ------------------
  |  |  211|      0|# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_LEN "tls1multi_enclen"
  ------------------
 1101|      0|        params[1] = OSSL_PARAM_construct_end();
 1102|      0|        ret = evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params);
 1103|      0|        if (ret <= 0 || sz > INT_MAX)
  ------------------
  |  Branch (1103:13): [True: 0, False: 0]
  |  Branch (1103:25): [True: 0, False: 0]
  ------------------
 1104|      0|            return 0;
 1105|      0|        return (int)sz;
 1106|      0|    }
 1107|      0|#endif /* OPENSSL_NO_MULTIBLOCK */
 1108|      0|    case EVP_CTRL_AEAD_SET_MAC_KEY:
  ------------------
  |  |  309|      0|#define EVP_CTRL_AEAD_SET_MAC_KEY 0x17
  ------------------
  |  Branch (1108:5): [True: 0, False: 97.6k]
  ------------------
 1109|      0|        if (arg < 0)
  ------------------
  |  Branch (1109:13): [True: 0, False: 0]
  ------------------
 1110|      0|            return -1;
 1111|      0|        params[0] = OSSL_PARAM_construct_octet_string(
 1112|      0|            OSSL_CIPHER_PARAM_AEAD_MAC_KEY, ptr, sz);
  ------------------
  |  |  175|      0|# define OSSL_CIPHER_PARAM_AEAD_MAC_KEY "mackey"
  ------------------
 1113|      0|        break;
 1114|  97.6k|    }
 1115|       |
 1116|  97.6k|    if (set_params)
  ------------------
  |  Branch (1116:9): [True: 61.5k, False: 36.1k]
  ------------------
 1117|  61.5k|        ret = evp_do_ciph_ctx_setparams(ctx->cipher, ctx->algctx, params);
 1118|  36.1k|    else
 1119|  36.1k|        ret = evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params);
 1120|       |
 1121|  97.6k|end:
 1122|  97.6k|    if (ret == EVP_CTRL_RET_UNSUPPORTED) {
  ------------------
  |  |   13|  97.6k|#define EVP_CTRL_RET_UNSUPPORTED -1
  ------------------
  |  Branch (1122:9): [True: 0, False: 97.6k]
  ------------------
 1123|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1124|      0|        return 0;
 1125|      0|    }
 1126|  97.6k|    return ret;
 1127|  97.6k|}
EVP_CIPHER_get_params:
 1130|   117k|{
 1131|   117k|    if (cipher != NULL && cipher->get_params != NULL)
  ------------------
  |  Branch (1131:9): [True: 117k, False: 0]
  |  Branch (1131:27): [True: 117k, False: 0]
  ------------------
 1132|   117k|        return cipher->get_params(params);
 1133|      0|    return 0;
 1134|   117k|}
EVP_CIPHER_gettable_ctx_params:
 1188|    130|{
 1189|    130|    void *provctx;
 1190|       |
 1191|    130|    if (cipher != NULL && cipher->gettable_ctx_params != NULL) {
  ------------------
  |  Branch (1191:9): [True: 130, False: 0]
  |  Branch (1191:27): [True: 130, False: 0]
  ------------------
 1192|    130|        provctx = ossl_provider_ctx(EVP_CIPHER_get0_provider(cipher));
 1193|    130|        return cipher->gettable_ctx_params(NULL, provctx);
 1194|    130|    }
 1195|      0|    return NULL;
 1196|    130|}
evp_cipher_new:
 1302|    130|{
 1303|    130|    EVP_CIPHER *cipher = OPENSSL_zalloc(sizeof(EVP_CIPHER));
  ------------------
  |  |  109|    130|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1304|       |
 1305|    130|    if (cipher != NULL && !CRYPTO_NEW_REF(&cipher->refcnt, 1)) {
  ------------------
  |  Branch (1305:9): [True: 130, False: 0]
  |  Branch (1305:27): [True: 0, False: 130]
  ------------------
 1306|      0|        OPENSSL_free(cipher);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1307|      0|        return NULL;
 1308|      0|    }
 1309|    130|    return cipher;
 1310|    130|}
EVP_CIPHER_fetch:
 1530|   191k|{
 1531|   191k|    EVP_CIPHER *cipher = evp_generic_fetch(ctx, OSSL_OP_CIPHER, algorithm, properties,
  ------------------
  |  |  284|   191k|#define OSSL_OP_CIPHER 2 /* Symmetric Ciphers */
  ------------------
 1532|   191k|        evp_cipher_from_algorithm, evp_cipher_up_ref,
 1533|   191k|        evp_cipher_free);
 1534|       |
 1535|   191k|    return cipher;
 1536|   191k|}
EVP_CIPHER_up_ref:
 1559|   168k|{
 1560|   168k|    int ref = 0;
 1561|       |
 1562|   168k|    if (cipher->origin == EVP_ORIG_DYNAMIC)
  ------------------
  |  |  186|   168k|#define EVP_ORIG_DYNAMIC 0
  ------------------
  |  Branch (1562:9): [True: 168k, False: 0]
  ------------------
 1563|   168k|        CRYPTO_UP_REF(&cipher->refcnt, &ref);
 1564|   168k|    return 1;
 1565|   168k|}
EVP_CIPHER_free:
 1576|   204k|{
 1577|   204k|    int i;
 1578|       |
 1579|   204k|    if (cipher == NULL || cipher->origin != EVP_ORIG_DYNAMIC)
  ------------------
  |  |  186|   168k|#define EVP_ORIG_DYNAMIC 0
  ------------------
  |  Branch (1579:9): [True: 36.1k, False: 168k]
  |  Branch (1579:27): [True: 0, False: 168k]
  ------------------
 1580|  36.1k|        return;
 1581|       |
 1582|   168k|    CRYPTO_DOWN_REF(&cipher->refcnt, &i);
 1583|   168k|    if (i > 0)
  ------------------
  |  Branch (1583:9): [True: 168k, False: 0]
  ------------------
 1584|   168k|        return;
 1585|      0|    evp_cipher_free_int(cipher);
 1586|      0|}
evp_enc.c:evp_cipher_init_internal:
   75|   477k|{
   76|       |    /*
   77|       |     * enc == 1 means we are encrypting.
   78|       |     * enc == 0 means we are decrypting.
   79|       |     * enc == -1 means, use the previously initialised value for encrypt/decrypt
   80|       |     */
   81|   477k|    if (enc == -1) {
  ------------------
  |  Branch (81:9): [True: 343k, False: 133k]
  ------------------
   82|   343k|        enc = ctx->encrypt;
   83|   343k|    } else {
   84|   133k|        if (enc)
  ------------------
  |  Branch (84:13): [True: 72.3k, False: 61.4k]
  ------------------
   85|  72.3k|            enc = 1;
   86|   133k|        ctx->encrypt = enc;
   87|   133k|    }
   88|       |
   89|   477k|    if (cipher == NULL && ctx->cipher == NULL) {
  ------------------
  |  Branch (89:9): [True: 441k, False: 36.1k]
  |  Branch (89:27): [True: 0, False: 441k]
  ------------------
   90|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NO_CIPHER_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   91|      0|        return 0;
   92|      0|    }
   93|       |
   94|       |    /* Ensure a context left lying around from last time is cleared */
   95|   477k|    if (cipher != NULL && ctx->cipher != NULL) {
  ------------------
  |  Branch (95:9): [True: 36.1k, False: 441k]
  |  Branch (95:27): [True: 0, False: 36.1k]
  ------------------
   96|      0|        unsigned long flags = ctx->flags;
   97|       |
   98|      0|        EVP_CIPHER_CTX_reset(ctx);
   99|       |        /* Restore encrypt and flags */
  100|      0|        ctx->encrypt = enc;
  101|      0|        ctx->flags = flags;
  102|      0|    }
  103|       |
  104|   477k|    if (cipher == NULL)
  ------------------
  |  Branch (104:9): [True: 441k, False: 36.1k]
  ------------------
  105|   441k|        cipher = ctx->cipher;
  106|       |
  107|   477k|    if (cipher->prov == NULL) {
  ------------------
  |  Branch (107:9): [True: 0, False: 477k]
  ------------------
  108|       |#ifdef FIPS_MODULE
  109|       |        /* We only do explicit fetches inside the FIPS module */
  110|       |        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  111|       |        return 0;
  112|       |#else
  113|      0|        EVP_CIPHER *provciph = EVP_CIPHER_fetch(NULL,
  114|      0|            cipher->nid == NID_undef ? "NULL"
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (114:13): [True: 0, False: 0]
  ------------------
  115|      0|                                     : OBJ_nid2sn(cipher->nid),
  116|      0|            "");
  117|       |
  118|      0|        if (provciph == NULL)
  ------------------
  |  Branch (118:13): [True: 0, False: 0]
  ------------------
  119|      0|            return 0;
  120|      0|        cipher = provciph;
  121|      0|        EVP_CIPHER_free(ctx->fetched_cipher);
  122|      0|        ctx->fetched_cipher = provciph;
  123|      0|#endif
  124|      0|    }
  125|       |
  126|   477k|    if (!ossl_assert(cipher->prov != NULL)) {
  ------------------
  |  |   52|   477k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   477k|    __FILE__, __LINE__)
  ------------------
  |  Branch (126:9): [True: 0, False: 477k]
  ------------------
  127|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  128|      0|        return 0;
  129|      0|    }
  130|       |
  131|   477k|    if (cipher != ctx->fetched_cipher) {
  ------------------
  |  Branch (131:9): [True: 36.1k, False: 441k]
  ------------------
  132|  36.1k|        if (!EVP_CIPHER_up_ref((EVP_CIPHER *)cipher)) {
  ------------------
  |  Branch (132:13): [True: 0, False: 36.1k]
  ------------------
  133|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  134|      0|            return 0;
  135|      0|        }
  136|  36.1k|        EVP_CIPHER_free(ctx->fetched_cipher);
  137|       |        /* Coverity false positive, the reference counting is confusing it */
  138|       |        /* coverity[use_after_free] */
  139|  36.1k|        ctx->fetched_cipher = (EVP_CIPHER *)cipher;
  140|  36.1k|    }
  141|   477k|    ctx->cipher = cipher;
  142|       |
  143|   477k|    if (is_pipeline && !EVP_CIPHER_can_pipeline(cipher, enc)) {
  ------------------
  |  Branch (143:9): [True: 0, False: 477k]
  |  Branch (143:24): [True: 0, False: 0]
  ------------------
  144|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_PIPELINE_NOT_SUPPORTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  145|      0|        return 0;
  146|      0|    }
  147|       |
  148|   477k|    if (ctx->algctx == NULL) {
  ------------------
  |  Branch (148:9): [True: 36.1k, False: 441k]
  ------------------
  149|  36.1k|        ctx->algctx = ctx->cipher->newctx(ossl_provider_ctx(cipher->prov));
  150|  36.1k|        if (ctx->algctx == NULL) {
  ------------------
  |  Branch (150:13): [True: 0, False: 36.1k]
  ------------------
  151|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  152|      0|            return 0;
  153|      0|        }
  154|  36.1k|    }
  155|       |
  156|   477k|    if ((ctx->flags & EVP_CIPH_NO_PADDING) != 0) {
  ------------------
  |  |  234|   477k|#define EVP_CIPH_NO_PADDING 0x100
  ------------------
  |  Branch (156:9): [True: 0, False: 477k]
  ------------------
  157|       |        /*
  158|       |         * If this ctx was already set up for no padding then we need to tell
  159|       |         * the new cipher about it.
  160|       |         */
  161|      0|        if (!EVP_CIPHER_CTX_set_padding(ctx, 0))
  ------------------
  |  Branch (161:13): [True: 0, False: 0]
  ------------------
  162|      0|            return 0;
  163|      0|    }
  164|       |
  165|   477k|#ifndef FIPS_MODULE
  166|       |    /*
  167|       |     * Fix for CVE-2023-5363
  168|       |     * Passing in a size as part of the init call takes effect late
  169|       |     * so, force such to occur before the initialisation.
  170|       |     *
  171|       |     * The FIPS provider's internal library context is used in a manner
  172|       |     * such that this is not an issue.
  173|       |     */
  174|   477k|    if (params != NULL) {
  ------------------
  |  Branch (174:9): [True: 0, False: 477k]
  ------------------
  175|      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 }
  ------------------
  176|      0|            OSSL_PARAM_END };
  ------------------
  |  |   25|      0|    { NULL, 0, NULL, 0, 0 }
  ------------------
  177|      0|        OSSL_PARAM *q = param_lens;
  178|      0|        const OSSL_PARAM *p;
  179|       |
  180|      0|        p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_KEYLEN);
  ------------------
  |  |  197|      0|# define OSSL_CIPHER_PARAM_KEYLEN "keylen"
  ------------------
  181|      0|        if (p != NULL)
  ------------------
  |  Branch (181:13): [True: 0, False: 0]
  ------------------
  182|      0|            memcpy(q++, p, sizeof(*q));
  183|       |
  184|       |        /*
  185|       |         * Note that OSSL_CIPHER_PARAM_AEAD_IVLEN is a synonym for
  186|       |         * OSSL_CIPHER_PARAM_IVLEN so both are covered here.
  187|       |         */
  188|      0|        p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_IVLEN);
  ------------------
  |  |  196|      0|# define OSSL_CIPHER_PARAM_IVLEN "ivlen"
  ------------------
  189|      0|        if (p != NULL)
  ------------------
  |  Branch (189:13): [True: 0, False: 0]
  ------------------
  190|      0|            memcpy(q++, p, sizeof(*q));
  191|       |
  192|      0|        if (q != param_lens) {
  ------------------
  |  Branch (192:13): [True: 0, False: 0]
  ------------------
  193|      0|            if (!EVP_CIPHER_CTX_set_params(ctx, param_lens)) {
  ------------------
  |  Branch (193:17): [True: 0, False: 0]
  ------------------
  194|      0|                ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  195|      0|                return 0;
  196|      0|            }
  197|      0|        }
  198|      0|    }
  199|   477k|#endif
  200|       |
  201|   477k|    if (is_pipeline)
  ------------------
  |  Branch (201:9): [True: 0, False: 477k]
  ------------------
  202|      0|        return 1;
  203|       |
  204|   477k|    if (enc) {
  ------------------
  |  Branch (204:9): [True: 416k, False: 61.4k]
  ------------------
  205|   416k|        if (ctx->cipher->einit == NULL) {
  ------------------
  |  Branch (205:13): [True: 0, False: 416k]
  ------------------
  206|       |            /*
  207|       |             * We still should be able to set the IV using the new API
  208|       |             * if the key is not specified and old API is not available
  209|       |             */
  210|      0|            if (key == NULL && ctx->cipher->einit_skey != NULL) {
  ------------------
  |  Branch (210:17): [True: 0, False: 0]
  |  Branch (210:32): [True: 0, False: 0]
  ------------------
  211|      0|                return ctx->cipher->einit_skey(ctx->algctx, NULL,
  212|      0|                    iv,
  213|      0|                    iv == NULL ? 0
  ------------------
  |  Branch (213:21): [True: 0, False: 0]
  ------------------
  214|      0|                               : EVP_CIPHER_CTX_get_iv_length(ctx),
  215|      0|                    params);
  216|      0|            }
  217|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  218|      0|            return 0;
  219|      0|        }
  220|       |
  221|   416k|        return ctx->cipher->einit(ctx->algctx,
  222|   416k|            key,
  223|   416k|            key == NULL ? 0
  ------------------
  |  Branch (223:13): [True: 165k, False: 251k]
  ------------------
  224|   416k|                        : EVP_CIPHER_CTX_get_key_length(ctx),
  225|   416k|            iv,
  226|   416k|            iv == NULL ? 0
  ------------------
  |  Branch (226:13): [True: 258k, False: 157k]
  ------------------
  227|   416k|                       : EVP_CIPHER_CTX_get_iv_length(ctx),
  228|   416k|            params);
  229|   416k|    }
  230|       |
  231|  61.4k|    if (ctx->cipher->dinit == NULL) {
  ------------------
  |  Branch (231:9): [True: 0, False: 61.4k]
  ------------------
  232|       |        /*
  233|       |         * We still should be able to set the IV using the new API
  234|       |         * if the key is not specified and old API is not available
  235|       |         */
  236|      0|        if (key == NULL && ctx->cipher->dinit_skey != NULL) {
  ------------------
  |  Branch (236:13): [True: 0, False: 0]
  |  Branch (236:28): [True: 0, False: 0]
  ------------------
  237|      0|            return ctx->cipher->dinit_skey(ctx->algctx, NULL,
  238|      0|                iv,
  239|      0|                iv == NULL ? 0
  ------------------
  |  Branch (239:17): [True: 0, False: 0]
  ------------------
  240|      0|                           : EVP_CIPHER_CTX_get_iv_length(ctx),
  241|      0|                params);
  242|      0|        }
  243|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  244|      0|        return 0;
  245|      0|    }
  246|       |
  247|  61.4k|    return ctx->cipher->dinit(ctx->algctx,
  248|  61.4k|        key,
  249|  61.4k|        key == NULL ? 0
  ------------------
  |  Branch (249:9): [True: 46.9k, False: 14.4k]
  ------------------
  250|  61.4k|                    : EVP_CIPHER_CTX_get_key_length(ctx),
  251|  61.4k|        iv,
  252|  61.4k|        iv == NULL ? 0
  ------------------
  |  Branch (252:9): [True: 28.9k, False: 32.5k]
  ------------------
  253|  61.4k|                   : EVP_CIPHER_CTX_get_iv_length(ctx),
  254|  61.4k|        params);
  255|  61.4k|}
evp_enc.c:evp_cipher_from_algorithm:
 1346|    130|{
 1347|    130|    const OSSL_DISPATCH *fns = algodef->implementation;
 1348|    130|    EVP_CIPHER *cipher = NULL;
 1349|    130|    int fnciphcnt = 0, encinit = 0, decinit = 0, fnpipecnt = 0, fnctxcnt = 0;
 1350|       |
 1351|    130|    if ((cipher = evp_cipher_new()) == NULL) {
  ------------------
  |  Branch (1351:9): [True: 0, False: 130]
  ------------------
 1352|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1353|      0|        return NULL;
 1354|      0|    }
 1355|       |
 1356|    130|#ifndef FIPS_MODULE
 1357|    130|    cipher->nid = NID_undef;
  ------------------
  |  |   18|    130|#define NID_undef                       0
  ------------------
 1358|    130|    if (!evp_names_do_all(prov, name_id, set_legacy_nid, &cipher->nid)
  ------------------
  |  Branch (1358:9): [True: 0, False: 130]
  ------------------
 1359|    130|        || cipher->nid == -1) {
  ------------------
  |  Branch (1359:12): [True: 0, False: 130]
  ------------------
 1360|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1361|      0|        goto err;
 1362|      0|    }
 1363|    130|#endif
 1364|       |
 1365|    130|    cipher->name_id = name_id;
 1366|    130|    if ((cipher->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL)
  ------------------
  |  Branch (1366:9): [True: 0, False: 130]
  ------------------
 1367|      0|        goto err;
 1368|       |
 1369|    130|    cipher->description = algodef->algorithm_description;
 1370|       |
 1371|  2.07k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (1371:12): [True: 1.94k, False: 130]
  ------------------
 1372|  1.94k|        switch (fns->function_id) {
  ------------------
  |  Branch (1372:17): [True: 1.94k, False: 0]
  ------------------
 1373|    130|        case OSSL_FUNC_CIPHER_NEWCTX:
  ------------------
  |  |  357|    130|#define OSSL_FUNC_CIPHER_NEWCTX 1
  ------------------
  |  Branch (1373:9): [True: 130, False: 1.81k]
  ------------------
 1374|    130|            if (cipher->newctx != NULL)
  ------------------
  |  Branch (1374:17): [True: 0, False: 130]
  ------------------
 1375|      0|                break;
 1376|    130|            cipher->newctx = OSSL_FUNC_cipher_newctx(fns);
 1377|    130|            fnctxcnt++;
 1378|    130|            break;
 1379|    130|        case OSSL_FUNC_CIPHER_ENCRYPT_INIT:
  ------------------
  |  |  358|    130|#define OSSL_FUNC_CIPHER_ENCRYPT_INIT 2
  ------------------
  |  Branch (1379:9): [True: 130, False: 1.81k]
  ------------------
 1380|    130|            if (cipher->einit != NULL)
  ------------------
  |  Branch (1380:17): [True: 0, False: 130]
  ------------------
 1381|      0|                break;
 1382|    130|            cipher->einit = OSSL_FUNC_cipher_encrypt_init(fns);
 1383|    130|            encinit = 1;
 1384|    130|            break;
 1385|    130|        case OSSL_FUNC_CIPHER_DECRYPT_INIT:
  ------------------
  |  |  359|    130|#define OSSL_FUNC_CIPHER_DECRYPT_INIT 3
  ------------------
  |  Branch (1385:9): [True: 130, False: 1.81k]
  ------------------
 1386|    130|            if (cipher->dinit != NULL)
  ------------------
  |  Branch (1386:17): [True: 0, False: 130]
  ------------------
 1387|      0|                break;
 1388|    130|            cipher->dinit = OSSL_FUNC_cipher_decrypt_init(fns);
 1389|    130|            decinit = 1;
 1390|    130|            break;
 1391|     68|        case OSSL_FUNC_CIPHER_ENCRYPT_SKEY_INIT:
  ------------------
  |  |  375|     68|#define OSSL_FUNC_CIPHER_ENCRYPT_SKEY_INIT 19
  ------------------
  |  Branch (1391:9): [True: 68, False: 1.87k]
  ------------------
 1392|     68|            if (cipher->einit_skey != NULL)
  ------------------
  |  Branch (1392:17): [True: 0, False: 68]
  ------------------
 1393|      0|                break;
 1394|     68|            cipher->einit_skey = OSSL_FUNC_cipher_encrypt_skey_init(fns);
 1395|     68|            encinit = 1;
 1396|     68|            break;
 1397|     68|        case OSSL_FUNC_CIPHER_DECRYPT_SKEY_INIT:
  ------------------
  |  |  376|     68|#define OSSL_FUNC_CIPHER_DECRYPT_SKEY_INIT 20
  ------------------
  |  Branch (1397:9): [True: 68, False: 1.87k]
  ------------------
 1398|     68|            if (cipher->dinit_skey != NULL)
  ------------------
  |  Branch (1398:17): [True: 0, False: 68]
  ------------------
 1399|      0|                break;
 1400|     68|            cipher->dinit_skey = OSSL_FUNC_cipher_decrypt_skey_init(fns);
 1401|     68|            decinit = 1;
 1402|     68|            break;
 1403|    130|        case OSSL_FUNC_CIPHER_UPDATE:
  ------------------
  |  |  360|    130|#define OSSL_FUNC_CIPHER_UPDATE 4
  ------------------
  |  Branch (1403:9): [True: 130, False: 1.81k]
  ------------------
 1404|    130|            if (cipher->cupdate != NULL)
  ------------------
  |  Branch (1404:17): [True: 0, False: 130]
  ------------------
 1405|      0|                break;
 1406|    130|            cipher->cupdate = OSSL_FUNC_cipher_update(fns);
 1407|    130|            fnciphcnt++;
 1408|    130|            break;
 1409|    130|        case OSSL_FUNC_CIPHER_FINAL:
  ------------------
  |  |  361|    130|#define OSSL_FUNC_CIPHER_FINAL 5
  ------------------
  |  Branch (1409:9): [True: 130, False: 1.81k]
  ------------------
 1410|    130|            if (cipher->cfinal != NULL)
  ------------------
  |  Branch (1410:17): [True: 0, False: 130]
  ------------------
 1411|      0|                break;
 1412|    130|            cipher->cfinal = OSSL_FUNC_cipher_final(fns);
 1413|    130|            fnciphcnt++;
 1414|    130|            break;
 1415|    118|        case OSSL_FUNC_CIPHER_CIPHER:
  ------------------
  |  |  362|    118|#define OSSL_FUNC_CIPHER_CIPHER 6
  ------------------
  |  Branch (1415:9): [True: 118, False: 1.82k]
  ------------------
 1416|    118|            if (cipher->ccipher != NULL)
  ------------------
  |  Branch (1416:17): [True: 0, False: 118]
  ------------------
 1417|      0|                break;
 1418|    118|            cipher->ccipher = OSSL_FUNC_cipher_cipher(fns);
 1419|    118|            break;
 1420|      0|        case OSSL_FUNC_CIPHER_PIPELINE_ENCRYPT_INIT:
  ------------------
  |  |  371|      0|#define OSSL_FUNC_CIPHER_PIPELINE_ENCRYPT_INIT 15
  ------------------
  |  Branch (1420:9): [True: 0, False: 1.94k]
  ------------------
 1421|      0|            if (cipher->p_einit != NULL)
  ------------------
  |  Branch (1421:17): [True: 0, False: 0]
  ------------------
 1422|      0|                break;
 1423|      0|            cipher->p_einit = OSSL_FUNC_cipher_pipeline_encrypt_init(fns);
 1424|      0|            fnpipecnt++;
 1425|      0|            break;
 1426|      0|        case OSSL_FUNC_CIPHER_PIPELINE_DECRYPT_INIT:
  ------------------
  |  |  372|      0|#define OSSL_FUNC_CIPHER_PIPELINE_DECRYPT_INIT 16
  ------------------
  |  Branch (1426:9): [True: 0, False: 1.94k]
  ------------------
 1427|      0|            if (cipher->p_dinit != NULL)
  ------------------
  |  Branch (1427:17): [True: 0, False: 0]
  ------------------
 1428|      0|                break;
 1429|      0|            cipher->p_dinit = OSSL_FUNC_cipher_pipeline_decrypt_init(fns);
 1430|      0|            fnpipecnt++;
 1431|      0|            break;
 1432|      0|        case OSSL_FUNC_CIPHER_PIPELINE_UPDATE:
  ------------------
  |  |  373|      0|#define OSSL_FUNC_CIPHER_PIPELINE_UPDATE 17
  ------------------
  |  Branch (1432:9): [True: 0, False: 1.94k]
  ------------------
 1433|      0|            if (cipher->p_cupdate != NULL)
  ------------------
  |  Branch (1433:17): [True: 0, False: 0]
  ------------------
 1434|      0|                break;
 1435|      0|            cipher->p_cupdate = OSSL_FUNC_cipher_pipeline_update(fns);
 1436|      0|            fnpipecnt++;
 1437|      0|            break;
 1438|      0|        case OSSL_FUNC_CIPHER_PIPELINE_FINAL:
  ------------------
  |  |  374|      0|#define OSSL_FUNC_CIPHER_PIPELINE_FINAL 18
  ------------------
  |  Branch (1438:9): [True: 0, False: 1.94k]
  ------------------
 1439|      0|            if (cipher->p_cfinal != NULL)
  ------------------
  |  Branch (1439:17): [True: 0, False: 0]
  ------------------
 1440|      0|                break;
 1441|      0|            cipher->p_cfinal = OSSL_FUNC_cipher_pipeline_final(fns);
 1442|      0|            fnpipecnt++;
 1443|      0|            break;
 1444|    130|        case OSSL_FUNC_CIPHER_FREECTX:
  ------------------
  |  |  363|    130|#define OSSL_FUNC_CIPHER_FREECTX 7
  ------------------
  |  Branch (1444:9): [True: 130, False: 1.81k]
  ------------------
 1445|    130|            if (cipher->freectx != NULL)
  ------------------
  |  Branch (1445:17): [True: 0, False: 130]
  ------------------
 1446|      0|                break;
 1447|    130|            cipher->freectx = OSSL_FUNC_cipher_freectx(fns);
 1448|    130|            fnctxcnt++;
 1449|    130|            break;
 1450|    129|        case OSSL_FUNC_CIPHER_DUPCTX:
  ------------------
  |  |  364|    129|#define OSSL_FUNC_CIPHER_DUPCTX 8
  ------------------
  |  Branch (1450:9): [True: 129, False: 1.81k]
  ------------------
 1451|    129|            if (cipher->dupctx != NULL)
  ------------------
  |  Branch (1451:17): [True: 0, False: 129]
  ------------------
 1452|      0|                break;
 1453|    129|            cipher->dupctx = OSSL_FUNC_cipher_dupctx(fns);
 1454|    129|            break;
 1455|    130|        case OSSL_FUNC_CIPHER_GET_PARAMS:
  ------------------
  |  |  365|    130|#define OSSL_FUNC_CIPHER_GET_PARAMS 9
  ------------------
  |  Branch (1455:9): [True: 130, False: 1.81k]
  ------------------
 1456|    130|            if (cipher->get_params != NULL)
  ------------------
  |  Branch (1456:17): [True: 0, False: 130]
  ------------------
 1457|      0|                break;
 1458|    130|            cipher->get_params = OSSL_FUNC_cipher_get_params(fns);
 1459|    130|            break;
 1460|    130|        case OSSL_FUNC_CIPHER_GET_CTX_PARAMS:
  ------------------
  |  |  366|    130|#define OSSL_FUNC_CIPHER_GET_CTX_PARAMS 10
  ------------------
  |  Branch (1460:9): [True: 130, False: 1.81k]
  ------------------
 1461|    130|            if (cipher->get_ctx_params != NULL)
  ------------------
  |  Branch (1461:17): [True: 0, False: 130]
  ------------------
 1462|      0|                break;
 1463|    130|            cipher->get_ctx_params = OSSL_FUNC_cipher_get_ctx_params(fns);
 1464|    130|            break;
 1465|    130|        case OSSL_FUNC_CIPHER_SET_CTX_PARAMS:
  ------------------
  |  |  367|    130|#define OSSL_FUNC_CIPHER_SET_CTX_PARAMS 11
  ------------------
  |  Branch (1465:9): [True: 130, False: 1.81k]
  ------------------
 1466|    130|            if (cipher->set_ctx_params != NULL)
  ------------------
  |  Branch (1466:17): [True: 0, False: 130]
  ------------------
 1467|      0|                break;
 1468|    130|            cipher->set_ctx_params = OSSL_FUNC_cipher_set_ctx_params(fns);
 1469|    130|            break;
 1470|    130|        case OSSL_FUNC_CIPHER_GETTABLE_PARAMS:
  ------------------
  |  |  368|    130|#define OSSL_FUNC_CIPHER_GETTABLE_PARAMS 12
  ------------------
  |  Branch (1470:9): [True: 130, False: 1.81k]
  ------------------
 1471|    130|            if (cipher->gettable_params != NULL)
  ------------------
  |  Branch (1471:17): [True: 0, False: 130]
  ------------------
 1472|      0|                break;
 1473|    130|            cipher->gettable_params = OSSL_FUNC_cipher_gettable_params(fns);
 1474|    130|            break;
 1475|    130|        case OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  369|    130|#define OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS 13
  ------------------
  |  Branch (1475:9): [True: 130, False: 1.81k]
  ------------------
 1476|    130|            if (cipher->gettable_ctx_params != NULL)
  ------------------
  |  Branch (1476:17): [True: 0, False: 130]
  ------------------
 1477|      0|                break;
 1478|    130|            cipher->gettable_ctx_params = OSSL_FUNC_cipher_gettable_ctx_params(fns);
 1479|    130|            break;
 1480|    130|        case OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  370|    130|#define OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS 14
  ------------------
  |  Branch (1480:9): [True: 130, False: 1.81k]
  ------------------
 1481|    130|            if (cipher->settable_ctx_params != NULL)
  ------------------
  |  Branch (1481:17): [True: 0, False: 130]
  ------------------
 1482|      0|                break;
 1483|    130|            cipher->settable_ctx_params = OSSL_FUNC_cipher_settable_ctx_params(fns);
 1484|    130|            break;
 1485|  1.94k|        }
 1486|  1.94k|    }
 1487|    130|    fnciphcnt += encinit + decinit;
 1488|    130|    if ((fnciphcnt != 0 && fnciphcnt != 3 && fnciphcnt != 4)
  ------------------
  |  Branch (1488:10): [True: 130, False: 0]
  |  Branch (1488:28): [True: 130, False: 0]
  |  Branch (1488:46): [True: 0, False: 130]
  ------------------
 1489|    130|        || (fnciphcnt == 0 && cipher->ccipher == NULL && fnpipecnt == 0)
  ------------------
  |  Branch (1489:13): [True: 0, False: 130]
  |  Branch (1489:31): [True: 0, False: 0]
  |  Branch (1489:58): [True: 0, False: 0]
  ------------------
 1490|    130|        || (fnpipecnt != 0 && (fnpipecnt < 3 || cipher->p_cupdate == NULL || cipher->p_cfinal == NULL))
  ------------------
  |  Branch (1490:13): [True: 0, False: 130]
  |  Branch (1490:32): [True: 0, False: 0]
  |  Branch (1490:49): [True: 0, False: 0]
  |  Branch (1490:78): [True: 0, False: 0]
  ------------------
 1491|    130|        || fnctxcnt != 2) {
  ------------------
  |  Branch (1491:12): [True: 0, False: 130]
  ------------------
 1492|       |        /*
 1493|       |         * In order to be a consistent set of functions we must have at least
 1494|       |         * a complete set of "encrypt" functions, or a complete set of "decrypt"
 1495|       |         * functions, or a single "cipher" function. In all cases we need both
 1496|       |         * the "newctx" and "freectx" functions.
 1497|       |         */
 1498|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1499|      0|        goto err;
 1500|      0|    }
 1501|    130|    if (prov != NULL && !ossl_provider_up_ref(prov))
  ------------------
  |  Branch (1501:9): [True: 130, False: 0]
  |  Branch (1501:25): [True: 0, False: 130]
  ------------------
 1502|      0|        goto err;
 1503|       |
 1504|    130|    cipher->prov = prov;
 1505|       |
 1506|    130|    if (!evp_cipher_cache_constants(cipher)) {
  ------------------
  |  Branch (1506:9): [True: 0, False: 130]
  ------------------
 1507|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_CACHE_CONSTANTS_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1508|      0|        goto err;
 1509|      0|    }
 1510|       |
 1511|    130|    return cipher;
 1512|       |
 1513|      0|err:
 1514|      0|    EVP_CIPHER_free(cipher);
 1515|       |    return NULL;
 1516|    130|}
evp_enc.c:set_legacy_nid:
 1320|    243|{
 1321|    243|    int nid;
 1322|    243|    int *legacy_nid = vlegacy_nid;
 1323|       |    /*
 1324|       |     * We use lowest level function to get the associated method, because
 1325|       |     * higher level functions such as EVP_get_cipherbyname() have changed
 1326|       |     * to look at providers too.
 1327|       |     */
 1328|    243|    const void *legacy_method = OBJ_NAME_get(name, OBJ_NAME_TYPE_CIPHER_METH);
  ------------------
  |  |   26|    243|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  ------------------
 1329|       |
 1330|    243|    if (*legacy_nid == -1) /* We found a clash already */
  ------------------
  |  Branch (1330:9): [True: 0, False: 243]
  ------------------
 1331|      0|        return;
 1332|    243|    if (legacy_method == NULL)
  ------------------
  |  Branch (1332:9): [True: 109, False: 134]
  ------------------
 1333|    109|        return;
 1334|    134|    nid = EVP_CIPHER_get_nid(legacy_method);
 1335|    134|    if (*legacy_nid != NID_undef && *legacy_nid != nid) {
  ------------------
  |  |   18|    268|#define NID_undef                       0
  ------------------
  |  Branch (1335:9): [True: 26, False: 108]
  |  Branch (1335:37): [True: 0, False: 26]
  ------------------
 1336|      0|        *legacy_nid = -1;
 1337|      0|        return;
 1338|      0|    }
 1339|    134|    *legacy_nid = nid;
 1340|    134|}
evp_enc.c:evp_cipher_up_ref:
 1519|   125k|{
 1520|   125k|    return EVP_CIPHER_up_ref(cipher);
 1521|   125k|}
evp_enc.c:evp_cipher_free:
 1524|    130|{
 1525|    130|    EVP_CIPHER_free(cipher);
 1526|    130|}

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

evp_generic_fetch:
  398|  1.29M|{
  399|  1.29M|    struct evp_method_data_st methdata;
  400|  1.29M|    void *method;
  401|       |
  402|  1.29M|    methdata.libctx = libctx;
  403|  1.29M|    methdata.tmp_store = NULL;
  404|       |    method = inner_evp_generic_fetch(&methdata, NULL, operation_id,
  405|  1.29M|        name, properties,
  406|  1.29M|        new_method, up_ref_method, free_method);
  407|  1.29M|    dealloc_tmp_evp_method_store(methdata.tmp_store);
  408|  1.29M|    return method;
  409|  1.29M|}
evp_generic_fetch_from_prov:
  424|  39.9k|{
  425|  39.9k|    struct evp_method_data_st methdata;
  426|  39.9k|    void *method;
  427|       |
  428|  39.9k|    methdata.libctx = ossl_provider_libctx(prov);
  429|       |    methdata.tmp_store = NULL;
  430|  39.9k|    method = inner_evp_generic_fetch(&methdata, prov, operation_id,
  431|  39.9k|        name, properties,
  432|  39.9k|        new_method, up_ref_method, free_method);
  433|  39.9k|    dealloc_tmp_evp_method_store(methdata.tmp_store);
  434|  39.9k|    return method;
  435|  39.9k|}
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|   252k|{
  661|       |    /*
  662|       |     * For a |prov| that is NULL, the library context will be NULL
  663|       |     */
  664|   252k|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  665|   252k|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  666|       |
  667|   252k|    if (prov == NULL)
  ------------------
  |  Branch (667:9): [True: 10.8k, False: 241k]
  ------------------
  668|  10.8k|        number = ossl_namemap_name2num(namemap, legacy_name);
  669|   252k|    return ossl_namemap_name2num(namemap, name) == number;
  670|   252k|}
evp_names_do_all:
  675|  47.5k|{
  676|  47.5k|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  677|  47.5k|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  678|       |
  679|  47.5k|    return ossl_namemap_doall_names(namemap, number, fn, data);
  680|  47.5k|}
evp_fetch.c:inner_evp_generic_fetch:
  259|  1.33M|{
  260|  1.33M|    OSSL_METHOD_STORE *store = get_evp_method_store(methdata->libctx);
  261|  1.33M|    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|  1.33M|    const char *const propq = properties != NULL ? properties : "";
  ------------------
  |  Branch (271:31): [True: 10.8k, False: 1.32M]
  ------------------
  272|  1.33M|#endif /* FIPS_MODULE */
  273|  1.33M|    uint32_t meth_id = 0;
  274|  1.33M|    void *method = NULL;
  275|  1.33M|    int unsupported, name_id;
  276|       |
  277|  1.33M|    if (store == NULL || namemap == NULL) {
  ------------------
  |  Branch (277:9): [True: 0, False: 1.33M]
  |  Branch (277:26): [True: 0, False: 1.33M]
  ------------------
  278|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      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|  1.33M|    if (!ossl_assert(operation_id > 0)) {
  ------------------
  |  |   52|  1.33M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.33M|    __FILE__, __LINE__)
  ------------------
  |  Branch (286:9): [True: 0, False: 1.33M]
  ------------------
  287|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      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|  1.33M|    name_id = ossl_namemap_name2num(namemap, name);
  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|  1.33M|    if (name_id != 0 && (meth_id = evp_method_id(name_id, operation_id)) == 0) {
  ------------------
  |  Branch (302:9): [True: 1.25M, False: 80.9k]
  |  Branch (302:25): [True: 0, False: 1.25M]
  ------------------
  303|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      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|  1.33M|    unsupported = name_id == 0;
  312|       |
  313|  1.33M|    if (meth_id == 0
  ------------------
  |  Branch (313:9): [True: 80.9k, False: 1.25M]
  ------------------
  314|  1.25M|        || !ossl_method_store_cache_get(store, prov, meth_id, propq, &method)) {
  ------------------
  |  Branch (314:12): [True: 36.8k, False: 1.21M]
  ------------------
  315|   117k|        OSSL_METHOD_CONSTRUCT_METHOD mcm = {
  316|   117k|            get_tmp_evp_method_store,
  317|   117k|            reserve_evp_method_store,
  318|   117k|            unreserve_evp_method_store,
  319|   117k|            get_evp_method_from_store,
  320|   117k|            put_evp_method_in_store,
  321|   117k|            construct_evp_method,
  322|   117k|            destruct_evp_method
  323|   117k|        };
  324|       |
  325|   117k|        methdata->operation_id = operation_id;
  326|   117k|        methdata->name_id = name_id;
  327|   117k|        methdata->names = name;
  328|   117k|        methdata->propquery = propq;
  329|   117k|        methdata->method_from_algorithm = new_method;
  330|   117k|        methdata->refcnt_up_method = up_ref_method;
  331|   117k|        methdata->destruct_method = free_method;
  332|   117k|        methdata->flag_construct_error_occurred = 0;
  333|   117k|        if ((method = ossl_method_construct(methdata->libctx, operation_id,
  ------------------
  |  Branch (333:13): [True: 60, False: 117k]
  ------------------
  334|   117k|                 &prov, 0 /* !force_cache */,
  335|   117k|                 &mcm, methdata))
  336|   117k|            != 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|     60|            if (name_id == 0)
  ------------------
  |  Branch (349:17): [True: 3, False: 57]
  ------------------
  350|      3|                name_id = ossl_namemap_name2num(namemap, name);
  351|     60|            if (name_id == 0) {
  ------------------
  |  Branch (351:17): [True: 0, False: 60]
  ------------------
  352|      0|                ERR_raise_data(ERR_LIB_EVP, ERR_R_FETCH_FAILED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                              ERR_raise_data(ERR_LIB_EVP, ERR_R_FETCH_FAILED,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                              ERR_raise_data(ERR_LIB_EVP, ERR_R_FETCH_FAILED,
  ------------------
  |  |  318|      0|#define ERR_R_FETCH_FAILED (269 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  353|      0|                    "Algorithm %s cannot be found", name != NULL ? name : "<null>");
  ------------------
  |  Branch (353:53): [True: 0, False: 0]
  ------------------
  354|      0|                free_method(method);
  355|      0|                method = NULL;
  356|     60|            } else {
  357|     60|                meth_id = evp_method_id(name_id, operation_id);
  358|     60|                if (meth_id != 0)
  ------------------
  |  Branch (358:21): [True: 60, False: 0]
  ------------------
  359|     60|                    ossl_method_store_cache_set(store, prov, meth_id, propq,
  360|     60|                        method, up_ref_method, free_method);
  361|     60|            }
  362|     60|        }
  363|       |
  364|       |        /*
  365|       |         * If we never were in the constructor, the algorithm to be fetched
  366|       |         * is unsupported.
  367|       |         */
  368|   117k|        unsupported = !methdata->flag_construct_error_occurred;
  369|   117k|    }
  370|       |
  371|  1.33M|    if ((name_id != 0 || name != NULL) && method == NULL) {
  ------------------
  |  Branch (371:10): [True: 1.25M, False: 80.9k]
  |  Branch (371:26): [True: 80.9k, False: 2]
  |  Branch (371:43): [True: 117k, False: 1.21M]
  ------------------
  372|   117k|        int code = unsupported ? ERR_R_UNSUPPORTED : ERR_R_FETCH_FAILED;
  ------------------
  |  |  317|   117k|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|   117k|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|   117k|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      int code = unsupported ? ERR_R_UNSUPPORTED : ERR_R_FETCH_FAILED;
  ------------------
  |  |  318|      0|#define ERR_R_FETCH_FAILED (269 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (372:20): [True: 117k, False: 0]
  ------------------
  373|       |
  374|   117k|        if (name == NULL)
  ------------------
  |  Branch (374:13): [True: 0, False: 117k]
  ------------------
  375|      0|            name = ossl_namemap_num2name(namemap, name_id, 0);
  376|   117k|        ERR_raise_data(ERR_LIB_EVP, code,
  ------------------
  |  |  359|   117k|    (ERR_new(),                                                  \
  |  |  360|   117k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|   117k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|   117k|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, code,
  ------------------
  |  |   59|   117k|#define ERR_LIB_EVP 6
  ------------------
  377|   117k|            "%s, Algorithm (%s : %d), Properties (%s)",
  378|   117k|            ossl_lib_ctx_get_descriptor(methdata->libctx),
  379|   117k|            name == NULL ? "<null>" : name, name_id,
  ------------------
  |  Branch (379:13): [True: 0, False: 117k]
  ------------------
  380|   117k|            properties == NULL ? "<null>" : properties);
  ------------------
  |  Branch (380:13): [True: 117k, False: 0]
  ------------------
  381|  1.21M|    } else {
  382|  1.21M|        OSSL_TRACE4(QUERY, "%s, Algorithm (%s : %d), Properties (%s)\n",
  ------------------
  |  |  297|  1.21M|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4))
  |  |  ------------------
  |  |  |  |  283|  1.21M|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  383|  1.21M|            ossl_lib_ctx_get_descriptor(methdata->libctx),
  384|  1.21M|            name == NULL ? "<null>" : name, name_id,
  385|  1.21M|            properties == NULL ? "<null>" : properties);
  386|  1.21M|    }
  387|       |
  388|  1.33M|    return method;
  389|  1.33M|}
evp_fetch.c:evp_method_id:
  117|  1.29M|{
  118|  1.29M|    if (!ossl_assert(name_id > 0 && name_id <= METHOD_ID_NAME_MAX)
  ------------------
  |  |   52|  2.58M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 1.29M, False: 0]
  |  |  |  Branch (52:41): [True: 1.29M, False: 0]
  |  |  ------------------
  |  |   53|  2.58M|    __FILE__, __LINE__)
  ------------------
  |  Branch (118:9): [True: 0, False: 1.29M]
  ------------------
  119|  1.29M|        || !ossl_assert(operation_id > 0
  ------------------
  |  |   52|  2.58M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 1.29M, False: 0]
  |  |  |  Branch (52:41): [True: 1.29M, False: 0]
  |  |  ------------------
  |  |   53|  1.29M|    __FILE__, __LINE__)
  ------------------
  |  Branch (119:12): [True: 0, False: 1.29M]
  ------------------
  120|  1.29M|            && operation_id <= METHOD_ID_OPERATION_MAX))
  121|      0|        return 0;
  122|  1.29M|    return (((name_id << METHOD_ID_NAME_OFFSET) & METHOD_ID_NAME_MASK)
  ------------------
  |  |  114|  1.29M|#define METHOD_ID_NAME_OFFSET 8
  ------------------
                  return (((name_id << METHOD_ID_NAME_OFFSET) & METHOD_ID_NAME_MASK)
  ------------------
  |  |  113|  1.29M|#define METHOD_ID_NAME_MASK 0x7FFFFF00
  ------------------
  123|  1.29M|        | (operation_id & METHOD_ID_OPERATION_MASK));
  ------------------
  |  |  111|  1.29M|#define METHOD_ID_OPERATION_MASK 0x000000FF
  ------------------
  124|  1.29M|}
evp_fetch.c:reserve_evp_method_store:
   73|   117k|{
   74|   117k|    struct evp_method_data_st *methdata = data;
   75|       |
   76|   117k|    if (store == NULL
  ------------------
  |  Branch (76:9): [True: 117k, False: 0]
  ------------------
   77|   117k|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (77:12): [True: 0, False: 117k]
  ------------------
   78|      0|        return 0;
   79|       |
   80|   117k|    return ossl_method_lock_store(store);
   81|   117k|}
evp_fetch.c:unreserve_evp_method_store:
   84|   117k|{
   85|   117k|    struct evp_method_data_st *methdata = data;
   86|       |
   87|   117k|    if (store == NULL
  ------------------
  |  Branch (87:9): [True: 117k, False: 0]
  ------------------
   88|   117k|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (88:12): [True: 0, False: 117k]
  ------------------
   89|      0|        return 0;
   90|       |
   91|   117k|    return ossl_method_unlock_store(store);
   92|   117k|}
evp_fetch.c:get_evp_method_from_store:
  128|   117k|{
  129|   117k|    struct evp_method_data_st *methdata = data;
  130|   117k|    void *method = NULL;
  131|   117k|    int name_id;
  132|   117k|    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|   117k|    if ((name_id = methdata->name_id) == 0 && methdata->names != NULL) {
  ------------------
  |  Branch (139:9): [True: 80.9k, False: 36.8k]
  |  Branch (139:47): [True: 80.9k, False: 2]
  ------------------
  140|  80.9k|        OSSL_NAMEMAP *namemap = ossl_namemap_stored(methdata->libctx);
  141|  80.9k|        const char *names = methdata->names;
  142|  80.9k|        const char *q = strchr(names, NAME_SEPARATOR);
  ------------------
  |  |   24|  80.9k|#define NAME_SEPARATOR ':'
  ------------------
  143|  80.9k|        size_t l = (q == NULL ? strlen(names) : (size_t)(q - names));
  ------------------
  |  Branch (143:21): [True: 80.9k, False: 0]
  ------------------
  144|       |
  145|  80.9k|        if (namemap == 0)
  ------------------
  |  Branch (145:13): [True: 0, False: 80.9k]
  ------------------
  146|      0|            return NULL;
  147|  80.9k|        name_id = ossl_namemap_name2num_n(namemap, names, l);
  148|  80.9k|    }
  149|       |
  150|   117k|    if (name_id == 0
  ------------------
  |  Branch (150:9): [True: 80.9k, False: 36.8k]
  ------------------
  151|  36.8k|        || (meth_id = evp_method_id(name_id, methdata->operation_id)) == 0)
  ------------------
  |  Branch (151:12): [True: 0, False: 36.8k]
  ------------------
  152|  80.9k|        return NULL;
  153|       |
  154|  36.8k|    if (store == NULL
  ------------------
  |  Branch (154:9): [True: 36.8k, False: 0]
  ------------------
  155|  36.8k|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (155:12): [True: 0, False: 36.8k]
  ------------------
  156|      0|        return NULL;
  157|       |
  158|  36.8k|    if (!ossl_method_store_fetch(store, meth_id, methdata->propquery, prov,
  ------------------
  |  Branch (158:9): [True: 36.8k, False: 60]
  ------------------
  159|  36.8k|            &method))
  160|  36.8k|        return NULL;
  161|     60|    return method;
  162|  36.8k|}
evp_fetch.c:put_evp_method_in_store:
  168|    315|{
  169|    315|    struct evp_method_data_st *methdata = data;
  170|    315|    OSSL_NAMEMAP *namemap;
  171|    315|    int name_id;
  172|    315|    uint32_t meth_id;
  173|    315|    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|    315|    if (names != NULL) {
  ------------------
  |  Branch (181:9): [True: 315, False: 0]
  ------------------
  182|    315|        const char *q = strchr(names, NAME_SEPARATOR);
  ------------------
  |  |   24|    315|#define NAME_SEPARATOR ':'
  ------------------
  183|       |
  184|    315|        l = (q == NULL ? strlen(names) : (size_t)(q - names));
  ------------------
  |  Branch (184:14): [True: 108, False: 207]
  ------------------
  185|    315|    }
  186|       |
  187|    315|    if ((namemap = ossl_namemap_stored(methdata->libctx)) == NULL
  ------------------
  |  Branch (187:9): [True: 0, False: 315]
  ------------------
  188|    315|        || (name_id = ossl_namemap_name2num_n(namemap, names, l)) == 0
  ------------------
  |  Branch (188:12): [True: 0, False: 315]
  ------------------
  189|    315|        || (meth_id = evp_method_id(name_id, methdata->operation_id)) == 0)
  ------------------
  |  Branch (189:12): [True: 0, False: 315]
  ------------------
  190|      0|        return 0;
  191|       |
  192|    315|    OSSL_TRACE1(QUERY, "put_evp_method_in_store: original store: %p\n", store);
  ------------------
  |  |  291|    315|    OSSL_TRACEV(category, (trc_out, format, arg1))
  |  |  ------------------
  |  |  |  |  283|    315|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  193|    315|    if (store == NULL
  ------------------
  |  Branch (193:9): [True: 315, False: 0]
  ------------------
  194|    315|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (194:12): [True: 0, False: 315]
  ------------------
  195|      0|        return 0;
  196|       |
  197|    315|    OSSL_TRACE5(QUERY,
  ------------------
  |  |  299|    315|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5))
  |  |  ------------------
  |  |  |  |  283|    315|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  198|    315|        "put_evp_method_in_store: "
  199|    315|        "store: %p, names: %s, operation_id %d, method_id: %d, properties: %s\n",
  200|    315|        store, names, methdata->operation_id, meth_id, propdef ? propdef : "<null>");
  201|    315|    return ossl_method_store_add(store, prov, meth_id, propdef, method,
  202|    315|        methdata->refcnt_up_method,
  203|    315|        methdata->destruct_method);
  204|    315|}
evp_fetch.c:construct_evp_method:
  212|    315|{
  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|    315|    struct evp_method_data_st *methdata = data;
  221|    315|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  222|    315|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  223|    315|    const char *names = algodef->algorithm_names;
  224|    315|    int name_id = ossl_namemap_add_names(namemap, 0, names, NAME_SEPARATOR);
  ------------------
  |  |   24|    315|#define NAME_SEPARATOR ':'
  ------------------
  225|    315|    void *method;
  226|       |
  227|    315|    if (name_id == 0)
  ------------------
  |  Branch (227:9): [True: 0, False: 315]
  ------------------
  228|      0|        return NULL;
  229|       |
  230|    315|    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|    315|    if (method == NULL)
  ------------------
  |  Branch (237:9): [True: 0, False: 315]
  ------------------
  238|      0|        methdata->flag_construct_error_occurred = 1;
  239|       |
  240|    315|    return method;
  241|    315|}
evp_fetch.c:destruct_evp_method:
  244|    315|{
  245|    315|    struct evp_method_data_st *methdata = data;
  246|       |
  247|    315|    methdata->destruct_method(method);
  248|    315|}
evp_fetch.c:dealloc_tmp_evp_method_store:
   61|  1.33M|{
   62|  1.33M|    OSSL_TRACE1(QUERY, "Deallocating the tmp_store %p\n", store);
  ------------------
  |  |  291|  1.33M|    OSSL_TRACEV(category, (trc_out, format, arg1))
  |  |  ------------------
  |  |  |  |  283|  1.33M|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   63|  1.33M|    if (store != NULL)
  ------------------
  |  Branch (63:9): [True: 0, False: 1.33M]
  ------------------
   64|      0|        ossl_method_store_free(store);
   65|  1.33M|}
evp_fetch.c:get_evp_method_store:
   68|  1.60M|{
   69|  1.60M|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX);
  ------------------
  |  |   95|  1.60M|#define OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX 0
  ------------------
   70|  1.60M|}
evp_fetch.c:filter_on_operation_id:
  623|    546|{
  624|    546|    struct filter_data_st *data = arg;
  625|       |
  626|    546|    if ((id & METHOD_ID_OPERATION_MASK) == data->operation_id)
  ------------------
  |  |  111|    546|#define METHOD_ID_OPERATION_MASK 0x000000FF
  ------------------
  |  Branch (626:9): [True: 84, False: 462]
  ------------------
  627|     84|        data->user_fn(method, data->user_arg);
  628|    546|}

EVP_CIPHER_get_type:
  241|    183|{
  242|    183|    int nid;
  243|    183|    nid = EVP_CIPHER_get_nid(cipher);
  244|       |
  245|    183|    switch (nid) {
  246|       |
  247|      3|    case NID_rc2_cbc:
  ------------------
  |  | 1307|      3|#define NID_rc2_cbc             37
  ------------------
  |  Branch (247:5): [True: 3, False: 180]
  ------------------
  248|      5|    case NID_rc2_64_cbc:
  ------------------
  |  | 1328|      5|#define NID_rc2_64_cbc          166
  ------------------
  |  Branch (248:5): [True: 2, False: 181]
  ------------------
  249|      7|    case NID_rc2_40_cbc:
  ------------------
  |  | 1324|      7|#define NID_rc2_40_cbc          98
  ------------------
  |  Branch (249:5): [True: 2, False: 181]
  ------------------
  250|       |
  251|      7|        return NID_rc2_cbc;
  ------------------
  |  | 1307|      7|#define NID_rc2_cbc             37
  ------------------
  252|       |
  253|      1|    case NID_rc4:
  ------------------
  |  | 1332|      1|#define NID_rc4         5
  ------------------
  |  Branch (253:5): [True: 1, False: 182]
  ------------------
  254|      2|    case NID_rc4_40:
  ------------------
  |  | 1337|      2|#define NID_rc4_40              97
  ------------------
  |  Branch (254:5): [True: 1, False: 182]
  ------------------
  255|       |
  256|      2|        return NID_rc4;
  ------------------
  |  | 1332|      2|#define NID_rc4         5
  ------------------
  257|       |
  258|      1|    case NID_aes_128_cfb128:
  ------------------
  |  | 3116|      1|#define NID_aes_128_cfb128              421
  ------------------
  |  Branch (258:5): [True: 1, False: 182]
  ------------------
  259|      2|    case NID_aes_128_cfb8:
  ------------------
  |  | 3237|      2|#define NID_aes_128_cfb8                653
  ------------------
  |  Branch (259:5): [True: 1, False: 182]
  ------------------
  260|      3|    case NID_aes_128_cfb1:
  ------------------
  |  | 3225|      3|#define NID_aes_128_cfb1                650
  ------------------
  |  Branch (260:5): [True: 1, False: 182]
  ------------------
  261|       |
  262|      3|        return NID_aes_128_cfb128;
  ------------------
  |  | 3116|      3|#define NID_aes_128_cfb128              421
  ------------------
  263|       |
  264|      1|    case NID_aes_192_cfb128:
  ------------------
  |  | 3154|      1|#define NID_aes_192_cfb128              425
  ------------------
  |  Branch (264:5): [True: 1, False: 182]
  ------------------
  265|      2|    case NID_aes_192_cfb8:
  ------------------
  |  | 3241|      2|#define NID_aes_192_cfb8                654
  ------------------
  |  Branch (265:5): [True: 1, False: 182]
  ------------------
  266|      3|    case NID_aes_192_cfb1:
  ------------------
  |  | 3229|      3|#define NID_aes_192_cfb1                651
  ------------------
  |  Branch (266:5): [True: 1, False: 182]
  ------------------
  267|       |
  268|      3|        return NID_aes_192_cfb128;
  ------------------
  |  | 3154|      3|#define NID_aes_192_cfb128              425
  ------------------
  269|       |
  270|      1|    case NID_aes_256_cfb128:
  ------------------
  |  | 3192|      1|#define NID_aes_256_cfb128              429
  ------------------
  |  Branch (270:5): [True: 1, False: 182]
  ------------------
  271|      2|    case NID_aes_256_cfb8:
  ------------------
  |  | 3245|      2|#define NID_aes_256_cfb8                655
  ------------------
  |  Branch (271:5): [True: 1, False: 182]
  ------------------
  272|      3|    case NID_aes_256_cfb1:
  ------------------
  |  | 3233|      3|#define NID_aes_256_cfb1                652
  ------------------
  |  Branch (272:5): [True: 1, False: 182]
  ------------------
  273|       |
  274|      3|        return NID_aes_256_cfb128;
  ------------------
  |  | 3192|      3|#define NID_aes_256_cfb128              429
  ------------------
  275|       |
  276|      1|    case NID_des_cfb64:
  ------------------
  |  | 2286|      1|#define NID_des_cfb64           30
  ------------------
  |  Branch (276:5): [True: 1, False: 182]
  ------------------
  277|      2|    case NID_des_cfb8:
  ------------------
  |  | 3277|      2|#define NID_des_cfb8            657
  ------------------
  |  Branch (277:5): [True: 1, False: 182]
  ------------------
  278|      3|    case NID_des_cfb1:
  ------------------
  |  | 3273|      3|#define NID_des_cfb1            656
  ------------------
  |  Branch (278:5): [True: 1, False: 182]
  ------------------
  279|       |
  280|      3|        return NID_des_cfb64;
  ------------------
  |  | 2286|      3|#define NID_des_cfb64           30
  ------------------
  281|       |
  282|      1|    case NID_des_ede3_cfb64:
  ------------------
  |  | 2327|      1|#define NID_des_ede3_cfb64              61
  ------------------
  |  Branch (282:5): [True: 1, False: 182]
  ------------------
  283|      2|    case NID_des_ede3_cfb8:
  ------------------
  |  | 3285|      2|#define NID_des_ede3_cfb8               659
  ------------------
  |  Branch (283:5): [True: 1, False: 182]
  ------------------
  284|      3|    case NID_des_ede3_cfb1:
  ------------------
  |  | 3281|      3|#define NID_des_ede3_cfb1               658
  ------------------
  |  Branch (284:5): [True: 1, False: 182]
  ------------------
  285|       |
  286|      3|        return NID_des_ede3_cfb64;
  ------------------
  |  | 2327|      3|#define NID_des_ede3_cfb64              61
  ------------------
  287|       |
  288|    159|    default:
  ------------------
  |  Branch (288:5): [True: 159, False: 24]
  ------------------
  289|       |#ifdef FIPS_MODULE
  290|       |        return NID_undef;
  291|       |#else
  292|    159|    {
  293|       |        /* Check it has an OID and it is valid */
  294|    159|        ASN1_OBJECT *otmp = OBJ_nid2obj(nid);
  295|       |
  296|    159|        if (OBJ_get0_data(otmp) == NULL)
  ------------------
  |  Branch (296:13): [True: 48, False: 111]
  ------------------
  297|     48|            nid = NID_undef;
  ------------------
  |  |   18|     48|#define NID_undef                       0
  ------------------
  298|    159|        ASN1_OBJECT_free(otmp);
  299|    159|        return nid;
  300|      2|    }
  301|    183|#endif
  302|    183|    }
  303|    183|}
evp_cipher_cache_constants:
  306|    130|{
  307|    130|    int ok, aead = 0, custom_iv = 0, cts = 0, multiblock = 0, randkey = 0;
  308|    130|    int encrypt_then_mac = 0;
  309|    130|    size_t ivlen = 0;
  310|    130|    size_t blksz = 0;
  311|    130|    size_t keylen = 0;
  312|    130|    unsigned int mode = 0;
  313|    130|    OSSL_PARAM params[11];
  314|       |
  315|    130|    params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_BLOCK_SIZE, &blksz);
  ------------------
  |  |  186|    130|# define OSSL_CIPHER_PARAM_BLOCK_SIZE "blocksize"
  ------------------
  316|    130|    params[1] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_IVLEN, &ivlen);
  ------------------
  |  |  196|    130|# define OSSL_CIPHER_PARAM_IVLEN "ivlen"
  ------------------
  317|    130|    params[2] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_KEYLEN, &keylen);
  ------------------
  |  |  197|    130|# define OSSL_CIPHER_PARAM_KEYLEN "keylen"
  ------------------
  318|    130|    params[3] = OSSL_PARAM_construct_uint(OSSL_CIPHER_PARAM_MODE, &mode);
  ------------------
  |  |  198|    130|# define OSSL_CIPHER_PARAM_MODE "mode"
  ------------------
  319|    130|    params[4] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_AEAD, &aead);
  ------------------
  |  |  172|    130|# define OSSL_CIPHER_PARAM_AEAD "aead"
  ------------------
  320|    130|    params[5] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_CUSTOM_IV,
  ------------------
  |  |  189|    130|# define OSSL_CIPHER_PARAM_CUSTOM_IV "custom-iv"
  ------------------
  321|    130|        &custom_iv);
  322|    130|    params[6] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_CTS, &cts);
  ------------------
  |  |  187|    130|# define OSSL_CIPHER_PARAM_CTS "cts"
  ------------------
  323|    130|    params[7] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK,
  ------------------
  |  |  206|    130|# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK "tls-multi"
  ------------------
  324|    130|        &multiblock);
  325|    130|    params[8] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_HAS_RAND_KEY,
  ------------------
  |  |  194|    130|# define OSSL_CIPHER_PARAM_HAS_RAND_KEY "has-randkey"
  ------------------
  326|    130|        &randkey);
  327|    130|    params[9] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_ENCRYPT_THEN_MAC,
  ------------------
  |  |  191|    130|# define OSSL_CIPHER_PARAM_ENCRYPT_THEN_MAC "encrypt-then-mac"
  ------------------
  328|    130|        &encrypt_then_mac);
  329|    130|    params[10] = OSSL_PARAM_construct_end();
  330|    130|    ok = evp_do_ciph_getparams(cipher, params) > 0;
  331|    130|    if (ok) {
  ------------------
  |  Branch (331:9): [True: 130, False: 0]
  ------------------
  332|    130|        cipher->block_size = (int)blksz;
  333|    130|        cipher->iv_len = (int)ivlen;
  334|    130|        cipher->key_len = (int)keylen;
  335|    130|        cipher->flags = mode;
  336|    130|        if (aead)
  ------------------
  |  Branch (336:13): [True: 28, False: 102]
  ------------------
  337|     28|            cipher->flags |= EVP_CIPH_FLAG_AEAD_CIPHER;
  ------------------
  |  |  256|     28|#define EVP_CIPH_FLAG_AEAD_CIPHER 0x200000
  ------------------
  338|    130|        if (custom_iv)
  ------------------
  |  Branch (338:13): [True: 41, False: 89]
  ------------------
  339|     41|            cipher->flags |= EVP_CIPH_CUSTOM_IV;
  ------------------
  |  |  226|     41|#define EVP_CIPH_CUSTOM_IV 0x10
  ------------------
  340|    130|        if (cts)
  ------------------
  |  Branch (340:13): [True: 6, False: 124]
  ------------------
  341|      6|            cipher->flags |= EVP_CIPH_FLAG_CTS;
  ------------------
  |  |  254|      6|#define EVP_CIPH_FLAG_CTS 0x4000
  ------------------
  342|    130|        if (multiblock)
  ------------------
  |  Branch (342:13): [True: 4, False: 126]
  ------------------
  343|      4|            cipher->flags |= EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK;
  ------------------
  |  |  257|      4|#define EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK 0x400000
  ------------------
  344|    130|        if (cipher->ccipher != NULL)
  ------------------
  |  Branch (344:13): [True: 118, False: 12]
  ------------------
  345|    118|            cipher->flags |= EVP_CIPH_FLAG_CUSTOM_CIPHER;
  ------------------
  |  |  255|    118|#define EVP_CIPH_FLAG_CUSTOM_CIPHER 0x100000
  ------------------
  346|    130|        if (randkey)
  ------------------
  |  Branch (346:13): [True: 11, False: 119]
  ------------------
  347|     11|            cipher->flags |= EVP_CIPH_RAND_KEY;
  ------------------
  |  |  236|     11|#define EVP_CIPH_RAND_KEY 0x200
  ------------------
  348|    130|        if (encrypt_then_mac)
  ------------------
  |  Branch (348:13): [True: 0, False: 130]
  ------------------
  349|      0|            cipher->flags |= EVP_CIPH_FLAG_ENC_THEN_MAC;
  ------------------
  |  |  267|      0|#define EVP_CIPH_FLAG_ENC_THEN_MAC 0x10000000
  ------------------
  350|    130|        if (OSSL_PARAM_locate_const(EVP_CIPHER_gettable_ctx_params(cipher),
  ------------------
  |  Branch (350:13): [True: 0, False: 130]
  ------------------
  351|    130|                OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS))
  ------------------
  |  |  184|    130|# define OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS OSSL_ALG_PARAM_ALGORITHM_ID_PARAMS
  |  |  ------------------
  |  |  |  |  125|    130|# define OSSL_ALG_PARAM_ALGORITHM_ID_PARAMS "algorithm-id-params"
  |  |  ------------------
  ------------------
  352|      0|            cipher->flags |= EVP_CIPH_FLAG_CUSTOM_ASN1;
  ------------------
  |  |  261|      0|#define EVP_CIPH_FLAG_CUSTOM_ASN1 0x1000000
  ------------------
  353|    130|    }
  354|    130|    return ok;
  355|    130|}
EVP_CIPHER_get_block_size:
  358|   140k|{
  359|   140k|    return (cipher == NULL) ? 0 : cipher->block_size;
  ------------------
  |  Branch (359:12): [True: 0, False: 140k]
  ------------------
  360|   140k|}
EVP_CIPHER_CTX_get_block_size:
  363|   140k|{
  364|   140k|    return (ctx == NULL) ? 0 : EVP_CIPHER_get_block_size(ctx->cipher);
  ------------------
  |  Branch (364:12): [True: 0, False: 140k]
  ------------------
  365|   140k|}
EVP_CIPHER_CTX_get0_cipher:
  419|  68.6k|{
  420|  68.6k|    if (ctx == NULL)
  ------------------
  |  Branch (420:9): [True: 0, False: 68.6k]
  ------------------
  421|      0|        return NULL;
  422|  68.6k|    return ctx->cipher;
  423|  68.6k|}
EVP_CIPHER_get_flags:
  443|   133k|{
  444|   133k|    return cipher == NULL ? 0 : cipher->flags;
  ------------------
  |  Branch (444:12): [True: 0, False: 133k]
  ------------------
  445|   133k|}
EVP_CIPHER_get_iv_length:
  473|  72.1k|{
  474|  72.1k|    return (cipher == NULL) ? 0 : cipher->iv_len;
  ------------------
  |  Branch (474:12): [True: 0, False: 72.1k]
  ------------------
  475|  72.1k|}
EVP_CIPHER_CTX_get_iv_length:
  478|   259k|{
  479|   259k|    if (ctx->cipher == NULL)
  ------------------
  |  Branch (479:9): [True: 0, False: 259k]
  ------------------
  480|      0|        return 0;
  481|       |
  482|   259k|    if (ctx->iv_len < 0) {
  ------------------
  |  Branch (482:9): [True: 36.0k, False: 223k]
  ------------------
  483|  36.0k|        int rv, len = EVP_CIPHER_get_iv_length(ctx->cipher);
  484|  36.0k|        size_t v = len;
  485|  36.0k|        OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  36.0k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                      OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  36.0k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  486|       |
  487|  36.0k|        if (ctx->cipher->get_ctx_params != NULL) {
  ------------------
  |  Branch (487:13): [True: 36.0k, False: 0]
  ------------------
  488|  36.0k|            params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_IVLEN,
  ------------------
  |  |  196|  36.0k|# define OSSL_CIPHER_PARAM_IVLEN "ivlen"
  ------------------
  489|  36.0k|                &v);
  490|  36.0k|            rv = evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params);
  491|  36.0k|            if (rv > 0) {
  ------------------
  |  Branch (491:17): [True: 36.0k, False: 0]
  ------------------
  492|  36.0k|                if (OSSL_PARAM_modified(params)
  ------------------
  |  Branch (492:21): [True: 36.0k, False: 0]
  ------------------
  493|  36.0k|                    && !OSSL_PARAM_get_int(params, &len))
  ------------------
  |  Branch (493:24): [True: 0, False: 36.0k]
  ------------------
  494|      0|                    return -1;
  495|  36.0k|            } else if (rv != EVP_CTRL_RET_UNSUPPORTED) {
  ------------------
  |  |   13|      0|#define EVP_CTRL_RET_UNSUPPORTED -1
  ------------------
  |  Branch (495:24): [True: 0, False: 0]
  ------------------
  496|      0|                return -1;
  497|      0|            }
  498|  36.0k|        }
  499|       |        /* Code below to be removed when legacy support is dropped. */
  500|      0|        else if ((EVP_CIPHER_get_flags(ctx->cipher)
  ------------------
  |  Branch (500:18): [True: 0, False: 0]
  ------------------
  501|      0|                     & EVP_CIPH_CUSTOM_IV_LENGTH)
  ------------------
  |  |  240|      0|#define EVP_CIPH_CUSTOM_IV_LENGTH 0x800
  ------------------
  502|      0|            != 0) {
  503|      0|            rv = EVP_CIPHER_CTX_ctrl((EVP_CIPHER_CTX *)ctx, EVP_CTRL_GET_IVLEN,
  ------------------
  |  |  341|      0|#define EVP_CTRL_GET_IVLEN 0x25
  ------------------
  504|      0|                0, &len);
  505|      0|            if (rv <= 0)
  ------------------
  |  Branch (505:17): [True: 0, False: 0]
  ------------------
  506|      0|                return -1;
  507|      0|        }
  508|       |        /*-
  509|       |         * Casting away the const is annoying but required here.  We need to
  510|       |         * cache the result for performance reasons.
  511|       |         */
  512|  36.0k|        ((EVP_CIPHER_CTX *)ctx)->iv_len = len;
  513|  36.0k|    }
  514|   259k|    return ctx->iv_len;
  515|   259k|}
EVP_CIPHER_get_key_length:
  620|  28.9k|{
  621|  28.9k|    return cipher->key_len;
  622|  28.9k|}
EVP_CIPHER_CTX_get_key_length:
  625|   265k|{
  626|   265k|    if (ctx->cipher == NULL)
  ------------------
  |  Branch (626:9): [True: 0, False: 265k]
  ------------------
  627|      0|        return 0;
  628|       |
  629|   265k|    if (ctx->key_len <= 0 && ctx->cipher->prov != NULL) {
  ------------------
  |  Branch (629:9): [True: 36.1k, False: 229k]
  |  Branch (629:30): [True: 36.1k, False: 0]
  ------------------
  630|  36.1k|        int ok;
  631|  36.1k|        OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  36.1k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                      OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  36.1k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  632|  36.1k|        size_t len;
  633|       |
  634|  36.1k|        params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_KEYLEN, &len);
  ------------------
  |  |  197|  36.1k|# define OSSL_CIPHER_PARAM_KEYLEN "keylen"
  ------------------
  635|  36.1k|        ok = evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params);
  636|  36.1k|        if (ok <= 0)
  ------------------
  |  Branch (636:13): [True: 0, False: 36.1k]
  ------------------
  637|      0|            return EVP_CTRL_RET_UNSUPPORTED;
  ------------------
  |  |   13|      0|#define EVP_CTRL_RET_UNSUPPORTED -1
  ------------------
  638|       |
  639|       |        /*-
  640|       |         * The if branch should never be taken since EVP_MAX_KEY_LENGTH is
  641|       |         * less than INT_MAX but best to be safe.
  642|       |         *
  643|       |         * Casting away the const is annoying but required here.  We need to
  644|       |         * cache the result for performance reasons.
  645|       |         */
  646|  36.1k|        if (!OSSL_PARAM_get_int(params, &((EVP_CIPHER_CTX *)ctx)->key_len))
  ------------------
  |  Branch (646:13): [True: 0, False: 36.1k]
  ------------------
  647|      0|            return -1;
  648|  36.1k|        ((EVP_CIPHER_CTX *)ctx)->key_len = (int)len;
  649|  36.1k|    }
  650|   265k|    return ctx->key_len;
  651|   265k|}
EVP_CIPHER_get_nid:
  654|    317|{
  655|    317|    return (cipher == NULL) ? NID_undef : cipher->nid;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (655:12): [True: 0, False: 317]
  ------------------
  656|    317|}
EVP_CIPHER_is_a:
  664|  57.9k|{
  665|  57.9k|    if (cipher == NULL)
  ------------------
  |  Branch (665:9): [True: 0, False: 57.9k]
  ------------------
  666|      0|        return 0;
  667|  57.9k|    if (cipher->prov != NULL)
  ------------------
  |  Branch (667:9): [True: 57.9k, False: 0]
  ------------------
  668|  57.9k|        return evp_is_a(cipher->prov, cipher->name_id, NULL, name);
  669|      0|    return evp_is_a(NULL, 0, EVP_CIPHER_get0_name(cipher), name);
  670|  57.9k|}
EVP_CIPHER_get0_provider:
  710|   132k|{
  711|   132k|    return cipher->prov;
  712|   132k|}
EVP_CIPHER_get_mode:
  715|   126k|{
  716|   126k|    return EVP_CIPHER_get_flags(cipher) & EVP_CIPH_MODE;
  ------------------
  |  |  222|   126k|#define EVP_CIPH_MODE 0xF0007
  ------------------
  717|   126k|}
EVP_MD_is_a:
  720|  43.4k|{
  721|  43.4k|    if (md == NULL)
  ------------------
  |  Branch (721:9): [True: 0, False: 43.4k]
  ------------------
  722|      0|        return 0;
  723|  43.4k|    if (md->prov != NULL)
  ------------------
  |  Branch (723:9): [True: 32.6k, False: 10.8k]
  ------------------
  724|  32.6k|        return evp_is_a(md->prov, md->name_id, NULL, name);
  725|  10.8k|    return evp_is_a(NULL, 0, EVP_MD_get0_name(md), name);
  726|  43.4k|}
EVP_MD_get0_name:
  745|   224k|{
  746|   224k|    if (md == NULL)
  ------------------
  |  Branch (746:9): [True: 0, False: 224k]
  ------------------
  747|      0|        return NULL;
  748|   224k|    if (md->type_name != NULL)
  ------------------
  |  Branch (748:9): [True: 202k, False: 21.6k]
  ------------------
  749|   202k|        return md->type_name;
  750|  21.6k|#ifndef FIPS_MODULE
  751|  21.6k|    return OBJ_nid2sn(EVP_MD_nid(md));
  ------------------
  |  |  453|  21.6k|#define EVP_MD_nid EVP_MD_get_type
  ------------------
  752|       |#else
  753|       |    return NULL;
  754|       |#endif
  755|   224k|}
EVP_MD_get0_provider:
  768|  84.4k|{
  769|  84.4k|    return md->prov;
  770|  84.4k|}
EVP_MD_get_type:
  773|   290k|{
  774|   290k|    return md->type;
  775|   290k|}
EVP_MD_get_block_size:
  783|   564k|{
  784|   564k|    if (md == NULL) {
  ------------------
  |  Branch (784:9): [True: 0, False: 564k]
  ------------------
  785|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_MESSAGE_DIGEST_IS_NULL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  786|      0|        return -1;
  787|      0|    }
  788|   564k|    return md->block_size;
  789|   564k|}
EVP_MD_get_size:
  792|  1.38M|{
  793|  1.38M|    if (md == NULL) {
  ------------------
  |  Branch (793:9): [True: 0, False: 1.38M]
  ------------------
  794|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_MESSAGE_DIGEST_IS_NULL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  795|      0|        return -1;
  796|      0|    }
  797|  1.38M|    return md->md_size;
  798|  1.38M|}
EVP_MD_xof:
  801|   434k|{
  802|   434k|    return md != NULL && ((EVP_MD_get_flags(md) & EVP_MD_FLAG_XOF) != 0);
  ------------------
  |  |  135|   434k|#define EVP_MD_FLAG_XOF 0x0002
  ------------------
  |  Branch (802:12): [True: 434k, False: 0]
  |  Branch (802:26): [True: 72.5k, False: 362k]
  ------------------
  803|   434k|}
EVP_MD_get_flags:
  806|   434k|{
  807|   434k|    return md->flags;
  808|   434k|}
EVP_MD_CTX_get0_md:
  820|   687k|{
  821|   687k|    if (ctx == NULL)
  ------------------
  |  Branch (821:9): [True: 32.5k, False: 655k]
  ------------------
  822|  32.5k|        return NULL;
  823|   655k|    return ctx->reqdigest;
  824|   687k|}
EVP_MD_CTX_get_size_ex:
  839|   571k|{
  840|   571k|    EVP_MD_CTX *c = (EVP_MD_CTX *)ctx;
  841|   571k|    const OSSL_PARAM *gettables;
  842|       |
  843|   571k|    gettables = EVP_MD_CTX_gettable_params(c);
  844|   571k|    if (gettables != NULL
  ------------------
  |  Branch (844:9): [True: 0, False: 571k]
  ------------------
  845|      0|        && OSSL_PARAM_locate_const(gettables,
  ------------------
  |  Branch (845:12): [True: 0, False: 0]
  ------------------
  846|      0|               OSSL_DIGEST_PARAM_SIZE)
  ------------------
  |  |  233|      0|# define OSSL_DIGEST_PARAM_SIZE "size"
  ------------------
  847|      0|            != NULL) {
  848|      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 }
  ------------------
  849|      0|        size_t sz = 0;
  850|       |
  851|       |        /*
  852|       |         * For XOF's EVP_MD_get_size() returns 0
  853|       |         * So try to get the xoflen instead. This will return -1 if the
  854|       |         * xof length has not been set.
  855|       |         */
  856|      0|        params[0] = OSSL_PARAM_construct_size_t(OSSL_DIGEST_PARAM_SIZE, &sz);
  ------------------
  |  |  233|      0|# define OSSL_DIGEST_PARAM_SIZE "size"
  ------------------
  857|      0|        if (EVP_MD_CTX_get_params(c, params) != 1
  ------------------
  |  Branch (857:13): [True: 0, False: 0]
  ------------------
  858|      0|            || sz > INT_MAX
  ------------------
  |  Branch (858:16): [True: 0, False: 0]
  ------------------
  859|      0|            || sz == 0)
  ------------------
  |  Branch (859:16): [True: 0, False: 0]
  ------------------
  860|      0|            return -1;
  861|      0|        return (int)sz;
  862|      0|    }
  863|       |    /* Normal digests have a constant fixed size output */
  864|   571k|    return EVP_MD_get_size(EVP_MD_CTX_get0_md(ctx));
  865|   571k|}
EVP_MD_CTX_set_flags:
  901|   734k|{
  902|   734k|    ctx->flags |= flags;
  903|   734k|}
EVP_MD_CTX_clear_flags:
  906|  1.06M|{
  907|  1.06M|    ctx->flags &= ~flags;
  908|  1.06M|}
EVP_MD_CTX_test_flags:
  911|  1.56M|{
  912|  1.56M|    return (ctx->flags & flags);
  913|  1.56M|}
EVP_PKEY_CTX_set_group_name:
  950|  10.8k|{
  951|  10.8k|    OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  10.8k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  10.8k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  952|       |
  953|  10.8k|    if (ctx == NULL || !EVP_PKEY_CTX_IS_GEN_OP(ctx)) {
  ------------------
  |  |  482|  10.8k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_GEN) != 0)
  |  |  ------------------
  |  |  |  | 1565|  10.8k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1528|  10.8k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1529|  10.8k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (953:9): [True: 0, False: 10.8k]
  |  Branch (953:24): [True: 0, False: 10.8k]
  ------------------
  954|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_COMMAND_NOT_SUPPORTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  955|       |        /* Uses the same return values as EVP_PKEY_CTX_ctrl */
  956|      0|        return -2;
  957|      0|    }
  958|       |
  959|  10.8k|    if (name == NULL)
  ------------------
  |  Branch (959:9): [True: 0, False: 10.8k]
  ------------------
  960|      0|        return -1;
  961|       |
  962|  10.8k|    params[0] = OSSL_PARAM_construct_utf8_string(OSSL_PKEY_PARAM_GROUP_NAME,
  ------------------
  |  |  428|  10.8k|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
  963|  10.8k|        (char *)name, 0);
  964|  10.8k|    return EVP_PKEY_CTX_set_params(ctx, params);
  965|  10.8k|}
EVP_PKEY_Q_keygen:
 1016|  7.25k|{
 1017|  7.25k|    va_list args;
 1018|  7.25k|    size_t bits;
 1019|  7.25k|    char *name;
 1020|  7.25k|    OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  7.25k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  7.25k|    { NULL, 0, NULL, 0, 0 }
  ------------------
 1021|  7.25k|    EVP_PKEY *ret = NULL;
 1022|       |
 1023|  7.25k|    va_start(args, type);
 1024|       |
 1025|  7.25k|    if (OPENSSL_strcasecmp(type, "RSA") == 0) {
  ------------------
  |  Branch (1025:9): [True: 0, False: 7.25k]
  ------------------
 1026|      0|        bits = va_arg(args, size_t);
 1027|      0|        params[0] = OSSL_PARAM_construct_size_t(OSSL_PKEY_PARAM_RSA_BITS, &bits);
  ------------------
  |  |  453|      0|# define OSSL_PKEY_PARAM_RSA_BITS OSSL_PKEY_PARAM_BITS
  |  |  ------------------
  |  |  |  |  374|      0|# define OSSL_PKEY_PARAM_BITS "bits"
  |  |  ------------------
  ------------------
 1028|  7.25k|    } else if (OPENSSL_strcasecmp(type, "EC") == 0) {
  ------------------
  |  Branch (1028:16): [True: 0, False: 7.25k]
  ------------------
 1029|      0|        name = va_arg(args, char *);
 1030|      0|        params[0] = OSSL_PARAM_construct_utf8_string(OSSL_PKEY_PARAM_GROUP_NAME,
  ------------------
  |  |  428|      0|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
 1031|      0|            name, 0);
 1032|      0|    }
 1033|       |
 1034|  7.25k|    ret = evp_pkey_keygen(libctx, type, propq, params);
 1035|       |
 1036|       |    va_end(args);
 1037|  7.25k|    return ret;
 1038|  7.25k|}
evp_lib.c:evp_pkey_keygen:
 1001|  7.25k|{
 1002|  7.25k|    EVP_PKEY *pkey = NULL;
 1003|  7.25k|    EVP_PKEY_CTX *ctx = EVP_PKEY_CTX_new_from_name(libctx, name, propq);
 1004|       |
 1005|  7.25k|    if (ctx != NULL
  ------------------
  |  Branch (1005:9): [True: 7.25k, False: 0]
  ------------------
 1006|  7.25k|        && EVP_PKEY_keygen_init(ctx) > 0
  ------------------
  |  Branch (1006:12): [True: 7.25k, False: 0]
  ------------------
 1007|  7.25k|        && EVP_PKEY_CTX_set_params(ctx, params))
  ------------------
  |  Branch (1007:12): [True: 7.25k, False: 0]
  ------------------
 1008|  7.25k|        (void)EVP_PKEY_generate(ctx, &pkey);
 1009|       |
 1010|  7.25k|    EVP_PKEY_CTX_free(ctx);
 1011|  7.25k|    return pkey;
 1012|  7.25k|}

EVP_PKEY_type:
   63|  80.0k|{
   64|  80.0k|#ifndef OPENSSL_NO_DEPRECATED_3_6
   65|  80.0k|    int ret;
   66|  80.0k|    const EVP_PKEY_ASN1_METHOD *ameth;
   67|       |
   68|  80.0k|    ameth = evp_pkey_asn1_find(type);
   69|  80.0k|    if (ameth)
  ------------------
  |  Branch (69:9): [True: 21.8k, False: 58.2k]
  ------------------
   70|  21.8k|        ret = ameth->pkey_id;
   71|  58.2k|    else
   72|  58.2k|        ret = NID_undef;
  ------------------
  |  |   18|  58.2k|#define NID_undef                       0
  ------------------
   73|  80.0k|    return ret;
   74|       |#else
   75|       |    size_t i;
   76|       |
   77|       |    for (i = 0; i < OSSL_NELEM(base_id_conversion); i++) {
   78|       |        if (type == base_id_conversion[i].pkey_id)
   79|       |            return base_id_conversion[i].pkey_base_id;
   80|       |    }
   81|       |    return NID_undef;
   82|       |#endif
   83|  80.0k|}

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

EVP_KEYEXCH_free:
  162|  29.2k|{
  163|  29.2k|    int i;
  164|       |
  165|  29.2k|    if (exchange == NULL)
  ------------------
  |  Branch (165:9): [True: 7.25k, False: 21.9k]
  ------------------
  166|  7.25k|        return;
  167|  21.9k|    CRYPTO_DOWN_REF(&exchange->refcnt, &i);
  168|  21.9k|    if (i > 0)
  ------------------
  |  Branch (168:9): [True: 21.9k, False: 0]
  ------------------
  169|  21.9k|        return;
  170|      0|    OPENSSL_free(exchange->type_name);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  171|      0|    ossl_provider_free(exchange->prov);
  172|      0|    CRYPTO_FREE_REF(&exchange->refcnt);
  173|      0|    OPENSSL_free(exchange);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  174|      0|}
EVP_KEYEXCH_up_ref:
  177|  21.9k|{
  178|  21.9k|    int ref = 0;
  179|       |
  180|  21.9k|    CRYPTO_UP_REF(&exchange->refcnt, &ref);
  181|  21.9k|    return 1;
  182|  21.9k|}
EVP_KEYEXCH_get0_provider:
  185|  14.5k|{
  186|  14.5k|    return exchange->prov;
  187|  14.5k|}
EVP_KEYEXCH_fetch:
  191|  21.9k|{
  192|  21.9k|    return evp_generic_fetch(ctx, OSSL_OP_KEYEXCH, algorithm, properties,
  ------------------
  |  |  289|  21.9k|#define OSSL_OP_KEYEXCH 11
  ------------------
  193|  21.9k|        evp_keyexch_from_algorithm,
  194|  21.9k|        evp_keyexch_up_ref,
  195|  21.9k|        evp_keyexch_free);
  196|  21.9k|}
EVP_PKEY_derive_init:
  210|  7.25k|{
  211|       |    return EVP_PKEY_derive_init_ex(ctx, NULL);
  212|  7.25k|}
EVP_PKEY_derive_init_ex:
  215|  7.25k|{
  216|  7.25k|    int ret;
  217|  7.25k|    void *provkey = NULL;
  218|  7.25k|    EVP_KEYEXCH *exchange = NULL;
  219|  7.25k|    EVP_KEYMGMT *tmp_keymgmt = NULL;
  220|  7.25k|    const OSSL_PROVIDER *tmp_prov = NULL;
  221|  7.25k|    const char *supported_exch = NULL;
  222|  7.25k|    int iter;
  223|       |
  224|  7.25k|    if (ctx == NULL) {
  ------------------
  |  Branch (224:9): [True: 0, False: 7.25k]
  ------------------
  225|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  226|      0|        return -2;
  227|      0|    }
  228|       |
  229|  7.25k|    evp_pkey_ctx_free_old_ops(ctx);
  230|  7.25k|    ctx->operation = EVP_PKEY_OP_DERIVE;
  ------------------
  |  | 1538|  7.25k|#define EVP_PKEY_OP_DERIVE (1 << 11)
  ------------------
  231|       |
  232|  7.25k|    ERR_set_mark();
  233|       |
  234|  7.25k|    if (evp_pkey_ctx_is_legacy(ctx))
  ------------------
  |  |   36|  7.25k|    ((ctx)->keymgmt == NULL)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 0, False: 7.25k]
  |  |  ------------------
  ------------------
  235|      0|        goto err;
  236|       |
  237|       |    /*
  238|       |     * Some algorithms (e.g. legacy KDFs) don't have a pkey - so we create
  239|       |     * a blank one.
  240|       |     */
  241|  7.25k|    if (ctx->pkey == NULL) {
  ------------------
  |  Branch (241:9): [True: 0, False: 7.25k]
  ------------------
  242|      0|        EVP_PKEY *pkey = EVP_PKEY_new();
  243|       |
  244|      0|        if (pkey == NULL
  ------------------
  |  Branch (244:13): [True: 0, False: 0]
  ------------------
  245|      0|            || !EVP_PKEY_set_type_by_keymgmt(pkey, ctx->keymgmt)
  ------------------
  |  Branch (245:16): [True: 0, False: 0]
  ------------------
  246|      0|            || (pkey->keydata = evp_keymgmt_newdata(ctx->keymgmt, NULL)) == NULL) {
  ------------------
  |  Branch (246:16): [True: 0, False: 0]
  ------------------
  247|      0|            ERR_clear_last_mark();
  248|      0|            EVP_PKEY_free(pkey);
  249|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  250|      0|            goto err;
  251|      0|        }
  252|      0|        ctx->pkey = pkey;
  253|      0|    }
  254|       |
  255|       |    /*
  256|       |     * Try to derive the supported exch from |ctx->keymgmt|.
  257|       |     */
  258|  7.25k|    if (!ossl_assert(ctx->pkey->keymgmt == NULL
  ------------------
  |  |   52|  14.5k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 0, False: 7.25k]
  |  |  |  Branch (52:41): [True: 7.25k, False: 0]
  |  |  ------------------
  |  |   53|  7.25k|    __FILE__, __LINE__)
  ------------------
  |  Branch (258:9): [True: 0, False: 7.25k]
  ------------------
  259|  7.25k|            || ctx->pkey->keymgmt == ctx->keymgmt)) {
  260|      0|        ERR_clear_last_mark();
  261|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  262|      0|        goto err;
  263|      0|    }
  264|  7.25k|    supported_exch = evp_keymgmt_util_query_operation_name(ctx->keymgmt,
  265|  7.25k|        OSSL_OP_KEYEXCH);
  ------------------
  |  |  289|  7.25k|#define OSSL_OP_KEYEXCH 11
  ------------------
  266|  7.25k|    if (supported_exch == NULL) {
  ------------------
  |  Branch (266:9): [True: 0, False: 7.25k]
  ------------------
  267|      0|        ERR_clear_last_mark();
  268|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  269|      0|        goto err;
  270|      0|    }
  271|       |
  272|       |    /*
  273|       |     * We perform two iterations:
  274|       |     *
  275|       |     * 1.  Do the normal exchange fetch, using the fetching data given by
  276|       |     *     the EVP_PKEY_CTX.
  277|       |     * 2.  Do the provider specific exchange fetch, from the same provider
  278|       |     *     as |ctx->keymgmt|
  279|       |     *
  280|       |     * We then try to fetch the keymgmt from the same provider as the
  281|       |     * exchange, and try to export |ctx->pkey| to that keymgmt (when
  282|       |     * this keymgmt happens to be the same as |ctx->keymgmt|, the export
  283|       |     * is a no-op, but we call it anyway to not complicate the code even
  284|       |     * more).
  285|       |     * If the export call succeeds (returns a non-NULL provider key pointer),
  286|       |     * we're done and can perform the operation itself.  If not, we perform
  287|       |     * the second iteration, or jump to legacy.
  288|       |     */
  289|  14.5k|    for (iter = 1, provkey = NULL; iter < 3 && provkey == NULL; iter++) {
  ------------------
  |  Branch (289:36): [True: 14.5k, False: 0]
  |  Branch (289:48): [True: 7.25k, False: 7.25k]
  ------------------
  290|  7.25k|        EVP_KEYMGMT *tmp_keymgmt_tofree = NULL;
  291|       |
  292|       |        /*
  293|       |         * If we're on the second iteration, free the results from the first.
  294|       |         * They are NULL on the first iteration, so no need to check what
  295|       |         * iteration we're on.
  296|       |         */
  297|  7.25k|        EVP_KEYEXCH_free(exchange);
  298|  7.25k|        exchange = NULL;
  299|  7.25k|        EVP_KEYMGMT_free(tmp_keymgmt);
  300|  7.25k|        tmp_keymgmt = NULL;
  301|       |
  302|  7.25k|        switch (iter) {
  ------------------
  |  Branch (302:17): [True: 7.25k, False: 0]
  ------------------
  303|  7.25k|        case 1:
  ------------------
  |  Branch (303:9): [True: 7.25k, False: 0]
  ------------------
  304|  7.25k|            exchange = EVP_KEYEXCH_fetch(ctx->libctx, supported_exch, ctx->propquery);
  305|  7.25k|            if (exchange != NULL)
  ------------------
  |  Branch (305:17): [True: 7.25k, False: 0]
  ------------------
  306|  7.25k|                tmp_prov = EVP_KEYEXCH_get0_provider(exchange);
  307|  7.25k|            break;
  308|      0|        case 2:
  ------------------
  |  Branch (308:9): [True: 0, False: 7.25k]
  ------------------
  309|      0|            tmp_prov = EVP_KEYMGMT_get0_provider(ctx->keymgmt);
  310|      0|            exchange = evp_keyexch_fetch_from_prov((OSSL_PROVIDER *)tmp_prov,
  311|      0|                supported_exch, ctx->propquery);
  312|      0|            if (exchange == NULL) {
  ------------------
  |  Branch (312:17): [True: 0, False: 0]
  ------------------
  313|      0|                ERR_pop_to_mark();
  314|      0|                ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  315|      0|                return -2;
  316|      0|            }
  317|      0|            break;
  318|  7.25k|        }
  319|  7.25k|        if (exchange == NULL)
  ------------------
  |  Branch (319:13): [True: 0, False: 7.25k]
  ------------------
  320|      0|            continue;
  321|       |
  322|       |        /*
  323|       |         * Ensure that the key is provided, either natively, or as a cached
  324|       |         * export.  We start by fetching the keymgmt with the same name as
  325|       |         * |ctx->keymgmt|, but from the provider of the exchange method, using
  326|       |         * the same property query as when fetching the exchange method.
  327|       |         * With the keymgmt we found (if we did), we try to export |ctx->pkey|
  328|       |         * to it (evp_pkey_export_to_provider() is smart enough to only actually
  329|       |         * export it if |tmp_keymgmt| is different from |ctx->pkey|'s keymgmt)
  330|       |         */
  331|  7.25k|        tmp_keymgmt_tofree = tmp_keymgmt = evp_keymgmt_fetch_from_prov((OSSL_PROVIDER *)tmp_prov,
  332|  7.25k|            EVP_KEYMGMT_get0_name(ctx->keymgmt),
  333|  7.25k|            ctx->propquery);
  334|  7.25k|        if (tmp_keymgmt != NULL)
  ------------------
  |  Branch (334:13): [True: 7.25k, False: 0]
  ------------------
  335|  7.25k|            provkey = evp_pkey_export_to_provider(ctx->pkey, ctx->libctx,
  336|  7.25k|                &tmp_keymgmt, ctx->propquery);
  337|  7.25k|        if (tmp_keymgmt == NULL)
  ------------------
  |  Branch (337:13): [True: 0, False: 7.25k]
  ------------------
  338|      0|            EVP_KEYMGMT_free(tmp_keymgmt_tofree);
  339|  7.25k|    }
  340|       |
  341|  7.25k|    if (provkey == NULL) {
  ------------------
  |  Branch (341:9): [True: 0, False: 7.25k]
  ------------------
  342|      0|        ERR_pop_to_mark();
  343|      0|        EVP_KEYEXCH_free(exchange);
  344|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  345|      0|        return -2;
  346|      0|    }
  347|       |
  348|  7.25k|    ERR_pop_to_mark();
  349|       |
  350|       |    /* A Coverity false positive with up_ref/down_ref and free */
  351|       |    /* coverity[use_after_free] */
  352|  7.25k|    ctx->op.kex.exchange = exchange;
  353|       |    /* A Coverity false positive with up_ref/down_ref and free */
  354|       |    /* coverity[deref_arg] */
  355|  7.25k|    ctx->op.kex.algctx = exchange->newctx(ossl_provider_ctx(exchange->prov));
  356|  7.25k|    if (ctx->op.kex.algctx == NULL) {
  ------------------
  |  Branch (356:9): [True: 0, False: 7.25k]
  ------------------
  357|       |        /* The provider key can stay in the cache */
  358|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  359|      0|        goto err;
  360|      0|    }
  361|  7.25k|    ret = exchange->init(ctx->op.kex.algctx, provkey, params);
  362|       |
  363|  7.25k|    EVP_KEYMGMT_free(tmp_keymgmt);
  364|  7.25k|    return ret ? 1 : 0;
  ------------------
  |  Branch (364:12): [True: 7.25k, False: 0]
  ------------------
  365|      0|err:
  366|      0|    evp_pkey_ctx_free_old_ops(ctx);
  367|      0|    ctx->operation = EVP_PKEY_OP_UNDEFINED;
  ------------------
  |  | 1527|      0|#define EVP_PKEY_OP_UNDEFINED 0
  ------------------
  368|      0|    EVP_KEYMGMT_free(tmp_keymgmt);
  369|      0|    return 0;
  370|  7.25k|}
EVP_PKEY_derive_set_peer_ex:
  374|  7.25k|{
  375|  7.25k|    int ret = 0, check;
  376|  7.25k|    void *provkey = NULL;
  377|  7.25k|    EVP_PKEY_CTX *check_ctx = NULL;
  378|  7.25k|    EVP_KEYMGMT *tmp_keymgmt = NULL, *tmp_keymgmt_tofree = NULL;
  379|       |
  380|  7.25k|    if (ctx == NULL) {
  ------------------
  |  Branch (380:9): [True: 0, False: 7.25k]
  ------------------
  381|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  382|      0|        return -1;
  383|      0|    }
  384|       |
  385|  7.25k|    if (!EVP_PKEY_CTX_IS_DERIVE_OP(ctx) || ctx->op.kex.algctx == NULL) {
  ------------------
  |  |  476|  14.5k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_DERIVE) != 0)
  |  |  ------------------
  |  |  |  | 1556|  7.25k|    (EVP_PKEY_OP_DERIVE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1538|  7.25k|#define EVP_PKEY_OP_DERIVE (1 << 11)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 0, False: 7.25k]
  |  Branch (385:44): [True: 0, False: 7.25k]
  ------------------
  386|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  387|      0|        return -2;
  388|      0|    }
  389|       |
  390|  7.25k|    if (ctx->op.kex.exchange->set_peer == NULL) {
  ------------------
  |  Branch (390:9): [True: 0, False: 7.25k]
  ------------------
  391|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  392|      0|        return -2;
  393|      0|    }
  394|       |
  395|  7.25k|    if (validate_peer) {
  ------------------
  |  Branch (395:9): [True: 7.25k, False: 0]
  ------------------
  396|  7.25k|        check_ctx = EVP_PKEY_CTX_new_from_pkey(ctx->libctx, peer, ctx->propquery);
  397|  7.25k|        if (check_ctx == NULL)
  ------------------
  |  Branch (397:13): [True: 0, False: 7.25k]
  ------------------
  398|      0|            return -1;
  399|  7.25k|        check = EVP_PKEY_public_check(check_ctx);
  400|  7.25k|        EVP_PKEY_CTX_free(check_ctx);
  401|  7.25k|        if (check <= 0)
  ------------------
  |  Branch (401:13): [True: 0, False: 7.25k]
  ------------------
  402|      0|            return -1;
  403|  7.25k|    }
  404|       |
  405|       |    /*
  406|       |     * Ensure that the |peer| is provided, either natively, or as a cached
  407|       |     * export.  We start by fetching the keymgmt with the same name as
  408|       |     * |ctx->keymgmt|, but from the provider of the exchange method, using
  409|       |     * the same property query as when fetching the exchange method.
  410|       |     * With the keymgmt we found (if we did), we try to export |peer|
  411|       |     * to it (evp_pkey_export_to_provider() is smart enough to only actually
  412|       |     * export it if |tmp_keymgmt| is different from |peer|'s keymgmt)
  413|       |     */
  414|  7.25k|    tmp_keymgmt_tofree = tmp_keymgmt = evp_keymgmt_fetch_from_prov((OSSL_PROVIDER *)
  415|  7.25k|                                                                       EVP_KEYEXCH_get0_provider(ctx->op.kex.exchange),
  416|  7.25k|        EVP_KEYMGMT_get0_name(ctx->keymgmt),
  417|  7.25k|        ctx->propquery);
  418|  7.25k|    if (tmp_keymgmt == NULL) {
  ------------------
  |  Branch (418:9): [True: 0, False: 7.25k]
  ------------------
  419|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NO_KEYMGMT_AVAILABLE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  420|      0|        return -1;
  421|      0|    }
  422|       |    /* A Coverity issue with up_ref/down_ref and free */
  423|       |    /* coverity[pass_freed_arg] */
  424|  7.25k|    provkey = evp_pkey_export_to_provider(peer, ctx->libctx,
  425|  7.25k|        &tmp_keymgmt, ctx->propquery);
  426|  7.25k|    EVP_KEYMGMT_free(tmp_keymgmt_tofree);
  427|       |
  428|  7.25k|    if (provkey == NULL) {
  ------------------
  |  Branch (428:9): [True: 0, False: 7.25k]
  ------------------
  429|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  430|      0|        return -1;
  431|      0|    }
  432|  7.25k|    ret = ctx->op.kex.exchange->set_peer(ctx->op.kex.algctx, provkey);
  433|  7.25k|    if (ret <= 0)
  ------------------
  |  Branch (433:9): [True: 0, False: 7.25k]
  ------------------
  434|      0|        return ret;
  435|       |
  436|  7.25k|    if (!EVP_PKEY_up_ref(peer))
  ------------------
  |  Branch (436:9): [True: 0, False: 7.25k]
  ------------------
  437|      0|        return -1;
  438|       |
  439|  7.25k|    EVP_PKEY_free(ctx->peerkey);
  440|  7.25k|    ctx->peerkey = peer;
  441|       |
  442|  7.25k|    return 1;
  443|  7.25k|}
EVP_PKEY_derive_set_peer:
  446|  7.25k|{
  447|  7.25k|    return EVP_PKEY_derive_set_peer_ex(ctx, peer, 1);
  448|  7.25k|}
EVP_PKEY_derive:
  451|  7.25k|{
  452|  7.25k|    int ret;
  453|       |
  454|  7.25k|    if (ctx == NULL || pkeylen == NULL) {
  ------------------
  |  Branch (454:9): [True: 0, False: 7.25k]
  |  Branch (454:24): [True: 0, False: 7.25k]
  ------------------
  455|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  456|      0|        return -1;
  457|      0|    }
  458|       |
  459|  7.25k|    if (!EVP_PKEY_CTX_IS_DERIVE_OP(ctx)) {
  ------------------
  |  |  476|  7.25k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_DERIVE) != 0)
  |  |  ------------------
  |  |  |  | 1556|  7.25k|    (EVP_PKEY_OP_DERIVE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1538|  7.25k|#define EVP_PKEY_OP_DERIVE (1 << 11)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (459:9): [True: 0, False: 7.25k]
  ------------------
  460|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  461|      0|        return -1;
  462|      0|    }
  463|       |
  464|  7.25k|    if (ctx->op.kex.algctx == NULL) {
  ------------------
  |  Branch (464:9): [True: 0, False: 7.25k]
  ------------------
  465|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  466|      0|        return -2;
  467|      0|    }
  468|       |
  469|  7.25k|    ret = ctx->op.kex.exchange->derive(ctx->op.kex.algctx, key, pkeylen,
  470|  7.25k|        key != NULL ? *pkeylen : 0);
  ------------------
  |  Branch (470:9): [True: 7.25k, False: 0]
  ------------------
  471|       |
  472|  7.25k|    return ret;
  473|  7.25k|}
exchange.c:evp_keyexch_from_algorithm:
   53|      7|{
   54|      7|    const OSSL_DISPATCH *fns = algodef->implementation;
   55|      7|    EVP_KEYEXCH *exchange = NULL;
   56|      7|    int fncnt = 0, sparamfncnt = 0, gparamfncnt = 0, derive_found = 0;
   57|       |
   58|      7|    if ((exchange = evp_keyexch_new(prov)) == NULL) {
  ------------------
  |  Branch (58:9): [True: 0, False: 7]
  ------------------
   59|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   60|      0|        goto err;
   61|      0|    }
   62|       |
   63|      7|    exchange->name_id = name_id;
   64|      7|    if ((exchange->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL)
  ------------------
  |  Branch (64:9): [True: 0, False: 7]
  ------------------
   65|      0|        goto err;
   66|      7|    exchange->description = algodef->algorithm_description;
   67|       |
   68|     71|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (68:12): [True: 64, False: 7]
  ------------------
   69|     64|        switch (fns->function_id) {
  ------------------
  |  Branch (69:17): [True: 64, False: 0]
  ------------------
   70|      7|        case OSSL_FUNC_KEYEXCH_NEWCTX:
  ------------------
  |  |  769|      7|#define OSSL_FUNC_KEYEXCH_NEWCTX 1
  ------------------
  |  Branch (70:9): [True: 7, False: 57]
  ------------------
   71|      7|            if (exchange->newctx != NULL)
  ------------------
  |  Branch (71:17): [True: 0, False: 7]
  ------------------
   72|      0|                break;
   73|      7|            exchange->newctx = OSSL_FUNC_keyexch_newctx(fns);
   74|      7|            fncnt++;
   75|      7|            break;
   76|      7|        case OSSL_FUNC_KEYEXCH_INIT:
  ------------------
  |  |  770|      7|#define OSSL_FUNC_KEYEXCH_INIT 2
  ------------------
  |  Branch (76:9): [True: 7, False: 57]
  ------------------
   77|      7|            if (exchange->init != NULL)
  ------------------
  |  Branch (77:17): [True: 0, False: 7]
  ------------------
   78|      0|                break;
   79|      7|            exchange->init = OSSL_FUNC_keyexch_init(fns);
   80|      7|            fncnt++;
   81|      7|            break;
   82|      4|        case OSSL_FUNC_KEYEXCH_SET_PEER:
  ------------------
  |  |  772|      4|#define OSSL_FUNC_KEYEXCH_SET_PEER 4
  ------------------
  |  Branch (82:9): [True: 4, False: 60]
  ------------------
   83|      4|            if (exchange->set_peer != NULL)
  ------------------
  |  Branch (83:17): [True: 0, False: 4]
  ------------------
   84|      0|                break;
   85|      4|            exchange->set_peer = OSSL_FUNC_keyexch_set_peer(fns);
   86|      4|            break;
   87|      7|        case OSSL_FUNC_KEYEXCH_DERIVE:
  ------------------
  |  |  771|      7|#define OSSL_FUNC_KEYEXCH_DERIVE 3
  ------------------
  |  Branch (87:9): [True: 7, False: 57]
  ------------------
   88|      7|            if (exchange->derive != NULL)
  ------------------
  |  Branch (88:17): [True: 0, False: 7]
  ------------------
   89|      0|                break;
   90|      7|            exchange->derive = OSSL_FUNC_keyexch_derive(fns);
   91|      7|            derive_found = 1;
   92|      7|            break;
   93|      7|        case OSSL_FUNC_KEYEXCH_FREECTX:
  ------------------
  |  |  773|      7|#define OSSL_FUNC_KEYEXCH_FREECTX 5
  ------------------
  |  Branch (93:9): [True: 7, False: 57]
  ------------------
   94|      7|            if (exchange->freectx != NULL)
  ------------------
  |  Branch (94:17): [True: 0, False: 7]
  ------------------
   95|      0|                break;
   96|      7|            exchange->freectx = OSSL_FUNC_keyexch_freectx(fns);
   97|      7|            fncnt++;
   98|      7|            break;
   99|      7|        case OSSL_FUNC_KEYEXCH_DUPCTX:
  ------------------
  |  |  774|      7|#define OSSL_FUNC_KEYEXCH_DUPCTX 6
  ------------------
  |  Branch (99:9): [True: 7, False: 57]
  ------------------
  100|      7|            if (exchange->dupctx != NULL)
  ------------------
  |  Branch (100:17): [True: 0, False: 7]
  ------------------
  101|      0|                break;
  102|      7|            exchange->dupctx = OSSL_FUNC_keyexch_dupctx(fns);
  103|      7|            break;
  104|      7|        case OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS:
  ------------------
  |  |  777|      7|#define OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS 9
  ------------------
  |  Branch (104:9): [True: 7, False: 57]
  ------------------
  105|      7|            if (exchange->get_ctx_params != NULL)
  ------------------
  |  Branch (105:17): [True: 0, False: 7]
  ------------------
  106|      0|                break;
  107|      7|            exchange->get_ctx_params = OSSL_FUNC_keyexch_get_ctx_params(fns);
  108|      7|            gparamfncnt++;
  109|      7|            break;
  110|      7|        case OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  778|      7|#define OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS 10
  ------------------
  |  Branch (110:9): [True: 7, False: 57]
  ------------------
  111|      7|            if (exchange->gettable_ctx_params != NULL)
  ------------------
  |  Branch (111:17): [True: 0, False: 7]
  ------------------
  112|      0|                break;
  113|      7|            exchange->gettable_ctx_params
  114|      7|                = OSSL_FUNC_keyexch_gettable_ctx_params(fns);
  115|      7|            gparamfncnt++;
  116|      7|            break;
  117|      5|        case OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS:
  ------------------
  |  |  775|      5|#define OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS 7
  ------------------
  |  Branch (117:9): [True: 5, False: 59]
  ------------------
  118|      5|            if (exchange->set_ctx_params != NULL)
  ------------------
  |  Branch (118:17): [True: 0, False: 5]
  ------------------
  119|      0|                break;
  120|      5|            exchange->set_ctx_params = OSSL_FUNC_keyexch_set_ctx_params(fns);
  121|      5|            sparamfncnt++;
  122|      5|            break;
  123|      5|        case OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  776|      5|#define OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS 8
  ------------------
  |  Branch (123:9): [True: 5, False: 59]
  ------------------
  124|      5|            if (exchange->settable_ctx_params != NULL)
  ------------------
  |  Branch (124:17): [True: 0, False: 5]
  ------------------
  125|      0|                break;
  126|      5|            exchange->settable_ctx_params
  127|      5|                = OSSL_FUNC_keyexch_settable_ctx_params(fns);
  128|      5|            sparamfncnt++;
  129|      5|            break;
  130|      1|        case OSSL_FUNC_KEYEXCH_DERIVE_SKEY:
  ------------------
  |  |  779|      1|#define OSSL_FUNC_KEYEXCH_DERIVE_SKEY 11
  ------------------
  |  Branch (130:9): [True: 1, False: 63]
  ------------------
  131|      1|            if (exchange->derive_skey != NULL)
  ------------------
  |  Branch (131:17): [True: 0, False: 1]
  ------------------
  132|      0|                break;
  133|      1|            exchange->derive_skey = OSSL_FUNC_keyexch_derive_skey(fns);
  134|      1|            derive_found = 1;
  135|      1|            break;
  136|     64|        }
  137|     64|    }
  138|      7|    fncnt += derive_found;
  139|      7|    if (fncnt != 4
  ------------------
  |  Branch (139:9): [True: 0, False: 7]
  ------------------
  140|      7|        || (gparamfncnt != 0 && gparamfncnt != 2)
  ------------------
  |  Branch (140:13): [True: 7, False: 0]
  |  Branch (140:33): [True: 0, False: 7]
  ------------------
  141|      7|        || (sparamfncnt != 0 && sparamfncnt != 2)) {
  ------------------
  |  Branch (141:13): [True: 5, False: 2]
  |  Branch (141:33): [True: 0, False: 5]
  ------------------
  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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  151|      0|        goto err;
  152|      0|    }
  153|       |
  154|      7|    return exchange;
  155|       |
  156|      0|err:
  157|      0|    EVP_KEYEXCH_free(exchange);
  158|       |    return NULL;
  159|      7|}
exchange.c:evp_keyexch_new:
   33|      7|{
   34|      7|    EVP_KEYEXCH *exchange = OPENSSL_zalloc(sizeof(EVP_KEYEXCH));
  ------------------
  |  |  109|      7|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   35|       |
   36|      7|    if (exchange == NULL)
  ------------------
  |  Branch (36:9): [True: 0, False: 7]
  ------------------
   37|      0|        return NULL;
   38|       |
   39|      7|    if (!CRYPTO_NEW_REF(&exchange->refcnt, 1)
  ------------------
  |  Branch (39:9): [True: 0, False: 7]
  ------------------
   40|      7|        || !ossl_provider_up_ref(prov)) {
  ------------------
  |  Branch (40:12): [True: 0, False: 7]
  ------------------
   41|      0|        CRYPTO_FREE_REF(&exchange->refcnt);
   42|      0|        OPENSSL_free(exchange);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   43|      0|        return NULL;
   44|      0|    }
   45|      7|    exchange->prov = prov;
   46|       |
   47|      7|    return exchange;
   48|      7|}
exchange.c:evp_keyexch_up_ref:
   28|  21.9k|{
   29|  21.9k|    return EVP_KEYEXCH_up_ref(data);
   30|  21.9k|}
exchange.c:evp_keyexch_free:
   23|      7|{
   24|      7|    EVP_KEYEXCH_free(data);
   25|      7|}

EVP_KDF_CTX_new:
   25|   152k|{
   26|   152k|    EVP_KDF_CTX *ctx = NULL;
   27|       |
   28|   152k|    if (kdf == NULL)
  ------------------
  |  Branch (28:9): [True: 0, False: 152k]
  ------------------
   29|      0|        return NULL;
   30|       |
   31|   152k|    ctx = OPENSSL_zalloc(sizeof(EVP_KDF_CTX));
  ------------------
  |  |  109|   152k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   32|   152k|    if (ctx == NULL
  ------------------
  |  Branch (32:9): [True: 0, False: 152k]
  ------------------
   33|   152k|        || (ctx->algctx = kdf->newctx(ossl_provider_ctx(kdf->prov))) == NULL
  ------------------
  |  Branch (33:12): [True: 0, False: 152k]
  ------------------
   34|   152k|        || !EVP_KDF_up_ref(kdf)) {
  ------------------
  |  Branch (34:12): [True: 0, False: 152k]
  ------------------
   35|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   36|      0|        if (ctx != NULL)
  ------------------
  |  Branch (36:13): [True: 0, False: 0]
  ------------------
   37|      0|            kdf->freectx(ctx->algctx);
   38|      0|        OPENSSL_free(ctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   39|      0|        ctx = NULL;
   40|   152k|    } else {
   41|   152k|        ctx->meth = kdf;
   42|   152k|    }
   43|   152k|    return ctx;
   44|   152k|}
EVP_KDF_CTX_free:
   47|   152k|{
   48|   152k|    if (ctx == NULL)
  ------------------
  |  Branch (48:9): [True: 0, False: 152k]
  ------------------
   49|      0|        return;
   50|   152k|    ctx->meth->freectx(ctx->algctx);
   51|   152k|    ctx->algctx = NULL;
   52|   152k|    EVP_KDF_free(ctx->meth);
   53|   152k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|   152k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   54|   152k|}
EVP_KDF_derive:
  141|   152k|{
  142|   152k|    if (ctx == NULL)
  ------------------
  |  Branch (142:9): [True: 0, False: 152k]
  ------------------
  143|      0|        return 0;
  144|       |
  145|   152k|    return ctx->meth->derive(ctx->algctx, key, keylen, params);
  146|   152k|}

EVP_KDF_fetch:
  171|   152k|{
  172|   152k|    return evp_generic_fetch(libctx, OSSL_OP_KDF, algorithm, properties,
  ------------------
  |  |  286|   152k|#define OSSL_OP_KDF 4
  ------------------
  173|   152k|        evp_kdf_from_algorithm, evp_kdf_up_ref,
  174|   152k|        evp_kdf_free);
  175|   152k|}
EVP_KDF_up_ref:
  178|   152k|{
  179|   152k|    return evp_kdf_up_ref(kdf);
  180|   152k|}
EVP_KDF_free:
  183|   304k|{
  184|   304k|    evp_kdf_free(kdf);
  185|   304k|}
kdf_meth.c:evp_kdf_from_algorithm:
   61|     21|{
   62|     21|    const OSSL_DISPATCH *fns = algodef->implementation;
   63|     21|    EVP_KDF *kdf = NULL;
   64|     21|    int fnkdfcnt = 0, fnctxcnt = 0;
   65|       |
   66|     21|    if ((kdf = evp_kdf_new()) == NULL) {
  ------------------
  |  Branch (66:9): [True: 0, False: 21]
  ------------------
   67|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   68|      0|        return NULL;
   69|      0|    }
   70|     21|    kdf->name_id = name_id;
   71|     21|    if ((kdf->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL)
  ------------------
  |  Branch (71:9): [True: 0, False: 21]
  ------------------
   72|      0|        goto err;
   73|       |
   74|     21|    kdf->description = algodef->algorithm_description;
   75|       |
   76|    207|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (76:12): [True: 186, False: 21]
  ------------------
   77|    186|        switch (fns->function_id) {
  ------------------
  |  Branch (77:17): [True: 186, False: 0]
  ------------------
   78|     21|        case OSSL_FUNC_KDF_NEWCTX:
  ------------------
  |  |  506|     21|#define OSSL_FUNC_KDF_NEWCTX 1
  ------------------
  |  Branch (78:9): [True: 21, False: 165]
  ------------------
   79|     21|            if (kdf->newctx != NULL)
  ------------------
  |  Branch (79:17): [True: 0, False: 21]
  ------------------
   80|      0|                break;
   81|     21|            kdf->newctx = OSSL_FUNC_kdf_newctx(fns);
   82|     21|            fnctxcnt++;
   83|     21|            break;
   84|     18|        case OSSL_FUNC_KDF_DUPCTX:
  ------------------
  |  |  507|     18|#define OSSL_FUNC_KDF_DUPCTX 2
  ------------------
  |  Branch (84:9): [True: 18, False: 168]
  ------------------
   85|     18|            if (kdf->dupctx != NULL)
  ------------------
  |  Branch (85:17): [True: 0, False: 18]
  ------------------
   86|      0|                break;
   87|     18|            kdf->dupctx = OSSL_FUNC_kdf_dupctx(fns);
   88|     18|            break;
   89|     21|        case OSSL_FUNC_KDF_FREECTX:
  ------------------
  |  |  508|     21|#define OSSL_FUNC_KDF_FREECTX 3
  ------------------
  |  Branch (89:9): [True: 21, False: 165]
  ------------------
   90|     21|            if (kdf->freectx != NULL)
  ------------------
  |  Branch (90:17): [True: 0, False: 21]
  ------------------
   91|      0|                break;
   92|     21|            kdf->freectx = OSSL_FUNC_kdf_freectx(fns);
   93|     21|            fnctxcnt++;
   94|     21|            break;
   95|     21|        case OSSL_FUNC_KDF_RESET:
  ------------------
  |  |  509|     21|#define OSSL_FUNC_KDF_RESET 4
  ------------------
  |  Branch (95:9): [True: 21, False: 165]
  ------------------
   96|     21|            if (kdf->reset != NULL)
  ------------------
  |  Branch (96:17): [True: 0, False: 21]
  ------------------
   97|      0|                break;
   98|     21|            kdf->reset = OSSL_FUNC_kdf_reset(fns);
   99|     21|            break;
  100|     21|        case OSSL_FUNC_KDF_DERIVE:
  ------------------
  |  |  510|     21|#define OSSL_FUNC_KDF_DERIVE 5
  ------------------
  |  Branch (100:9): [True: 21, False: 165]
  ------------------
  101|     21|            if (kdf->derive != NULL)
  ------------------
  |  Branch (101:17): [True: 0, False: 21]
  ------------------
  102|      0|                break;
  103|     21|            kdf->derive = OSSL_FUNC_kdf_derive(fns);
  104|     21|            fnkdfcnt++;
  105|     21|            break;
  106|      0|        case OSSL_FUNC_KDF_GETTABLE_PARAMS:
  ------------------
  |  |  511|      0|#define OSSL_FUNC_KDF_GETTABLE_PARAMS 6
  ------------------
  |  Branch (106:9): [True: 0, False: 186]
  ------------------
  107|      0|            if (kdf->gettable_params != NULL)
  ------------------
  |  Branch (107:17): [True: 0, False: 0]
  ------------------
  108|      0|                break;
  109|      0|            kdf->gettable_params = OSSL_FUNC_kdf_gettable_params(fns);
  110|      0|            break;
  111|     21|        case OSSL_FUNC_KDF_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  512|     21|#define OSSL_FUNC_KDF_GETTABLE_CTX_PARAMS 7
  ------------------
  |  Branch (111:9): [True: 21, False: 165]
  ------------------
  112|     21|            if (kdf->gettable_ctx_params != NULL)
  ------------------
  |  Branch (112:17): [True: 0, False: 21]
  ------------------
  113|      0|                break;
  114|     21|            kdf->gettable_ctx_params = OSSL_FUNC_kdf_gettable_ctx_params(fns);
  115|     21|            break;
  116|     21|        case OSSL_FUNC_KDF_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  513|     21|#define OSSL_FUNC_KDF_SETTABLE_CTX_PARAMS 8
  ------------------
  |  Branch (116:9): [True: 21, False: 165]
  ------------------
  117|     21|            if (kdf->settable_ctx_params != NULL)
  ------------------
  |  Branch (117:17): [True: 0, False: 21]
  ------------------
  118|      0|                break;
  119|     21|            kdf->settable_ctx_params = OSSL_FUNC_kdf_settable_ctx_params(fns);
  120|     21|            break;
  121|      0|        case OSSL_FUNC_KDF_GET_PARAMS:
  ------------------
  |  |  514|      0|#define OSSL_FUNC_KDF_GET_PARAMS 9
  ------------------
  |  Branch (121:9): [True: 0, False: 186]
  ------------------
  122|      0|            if (kdf->get_params != NULL)
  ------------------
  |  Branch (122:17): [True: 0, False: 0]
  ------------------
  123|      0|                break;
  124|      0|            kdf->get_params = OSSL_FUNC_kdf_get_params(fns);
  125|      0|            break;
  126|     21|        case OSSL_FUNC_KDF_GET_CTX_PARAMS:
  ------------------
  |  |  515|     21|#define OSSL_FUNC_KDF_GET_CTX_PARAMS 10
  ------------------
  |  Branch (126:9): [True: 21, False: 165]
  ------------------
  127|     21|            if (kdf->get_ctx_params != NULL)
  ------------------
  |  Branch (127:17): [True: 0, False: 21]
  ------------------
  128|      0|                break;
  129|     21|            kdf->get_ctx_params = OSSL_FUNC_kdf_get_ctx_params(fns);
  130|     21|            break;
  131|     21|        case OSSL_FUNC_KDF_SET_CTX_PARAMS:
  ------------------
  |  |  516|     21|#define OSSL_FUNC_KDF_SET_CTX_PARAMS 11
  ------------------
  |  Branch (131:9): [True: 21, False: 165]
  ------------------
  132|     21|            if (kdf->set_ctx_params != NULL)
  ------------------
  |  Branch (132:17): [True: 0, False: 21]
  ------------------
  133|      0|                break;
  134|     21|            kdf->set_ctx_params = OSSL_FUNC_kdf_set_ctx_params(fns);
  135|     21|            break;
  136|      0|        case OSSL_FUNC_KDF_SET_SKEY:
  ------------------
  |  |  517|      0|#define OSSL_FUNC_KDF_SET_SKEY 12
  ------------------
  |  Branch (136:9): [True: 0, False: 186]
  ------------------
  137|      0|            if (kdf->set_skey != NULL)
  ------------------
  |  Branch (137:17): [True: 0, False: 0]
  ------------------
  138|      0|                break;
  139|      0|            kdf->set_skey = OSSL_FUNC_kdf_set_skey(fns);
  140|      0|            break;
  141|      0|        case OSSL_FUNC_KDF_DERIVE_SKEY:
  ------------------
  |  |  518|      0|#define OSSL_FUNC_KDF_DERIVE_SKEY 13
  ------------------
  |  Branch (141:9): [True: 0, False: 186]
  ------------------
  142|      0|            if (kdf->derive_skey != NULL)
  ------------------
  |  Branch (142:17): [True: 0, False: 0]
  ------------------
  143|      0|                break;
  144|      0|            kdf->derive_skey = OSSL_FUNC_kdf_derive_skey(fns);
  145|      0|            break;
  146|    186|        }
  147|    186|    }
  148|     21|    if (fnkdfcnt != 1 || fnctxcnt != 2) {
  ------------------
  |  Branch (148:9): [True: 0, False: 21]
  |  Branch (148:26): [True: 0, False: 21]
  ------------------
  149|       |        /*
  150|       |         * In order to be a consistent set of functions we must have at least
  151|       |         * a derive function, and a complete set of context management
  152|       |         * functions.
  153|       |         */
  154|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  155|      0|        goto err;
  156|      0|    }
  157|     21|    if (prov != NULL && !ossl_provider_up_ref(prov))
  ------------------
  |  Branch (157:9): [True: 21, False: 0]
  |  Branch (157:25): [True: 0, False: 21]
  ------------------
  158|      0|        goto err;
  159|       |
  160|     21|    kdf->prov = prov;
  161|       |
  162|     21|    return kdf;
  163|       |
  164|      0|err:
  165|      0|    evp_kdf_free(kdf);
  166|       |    return NULL;
  167|     21|}
kdf_meth.c:evp_kdf_new:
   47|     21|{
   48|     21|    EVP_KDF *kdf = NULL;
   49|       |
   50|     21|    if ((kdf = OPENSSL_zalloc(sizeof(*kdf))) == NULL
  ------------------
  |  |  109|     21|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (50:9): [True: 0, False: 21]
  ------------------
   51|     21|        || !CRYPTO_NEW_REF(&kdf->refcnt, 1)) {
  ------------------
  |  Branch (51:12): [True: 0, False: 21]
  ------------------
   52|      0|        OPENSSL_free(kdf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   53|      0|        return NULL;
   54|      0|    }
   55|     21|    return kdf;
   56|     21|}
kdf_meth.c:evp_kdf_up_ref:
   21|   304k|{
   22|   304k|    EVP_KDF *kdf = (EVP_KDF *)vkdf;
   23|   304k|    int ref = 0;
   24|       |
   25|   304k|    CRYPTO_UP_REF(&kdf->refcnt, &ref);
   26|   304k|    return 1;
   27|   304k|}
kdf_meth.c:evp_kdf_free:
   30|   304k|{
   31|   304k|    EVP_KDF *kdf = (EVP_KDF *)vkdf;
   32|   304k|    int ref = 0;
   33|       |
   34|   304k|    if (kdf == NULL)
  ------------------
  |  Branch (34:9): [True: 0, False: 304k]
  ------------------
   35|      0|        return;
   36|       |
   37|   304k|    CRYPTO_DOWN_REF(&kdf->refcnt, &ref);
   38|   304k|    if (ref > 0)
  ------------------
  |  Branch (38:9): [True: 304k, False: 0]
  ------------------
   39|   304k|        return;
   40|      0|    OPENSSL_free(kdf->type_name);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   41|      0|    ossl_provider_free(kdf->prov);
   42|      0|    CRYPTO_FREE_REF(&kdf->refcnt);
   43|      0|    OPENSSL_free(kdf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   44|      0|}

EVP_PKEY_encapsulate_init:
  222|  7.25k|{
  223|  7.25k|    return evp_kem_init(ctx, EVP_PKEY_OP_ENCAPSULATE, params, NULL);
  ------------------
  |  | 1539|  7.25k|#define EVP_PKEY_OP_ENCAPSULATE (1 << 12)
  ------------------
  224|  7.25k|}
EVP_PKEY_encapsulate:
  229|  10.8k|{
  230|  10.8k|    if (ctx == NULL)
  ------------------
  |  Branch (230:9): [True: 0, False: 10.8k]
  ------------------
  231|      0|        return 0;
  232|       |
  233|  10.8k|    if (ctx->operation != EVP_PKEY_OP_ENCAPSULATE) {
  ------------------
  |  | 1539|  10.8k|#define EVP_PKEY_OP_ENCAPSULATE (1 << 12)
  ------------------
  |  Branch (233:9): [True: 0, False: 10.8k]
  ------------------
  234|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  235|      0|        return -1;
  236|      0|    }
  237|       |
  238|  10.8k|    if (ctx->op.encap.algctx == NULL) {
  ------------------
  |  Branch (238:9): [True: 0, False: 10.8k]
  ------------------
  239|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  240|      0|        return -2;
  241|      0|    }
  242|       |
  243|  10.8k|    if (out != NULL && secret == NULL)
  ------------------
  |  Branch (243:9): [True: 7.25k, False: 3.62k]
  |  Branch (243:24): [True: 0, False: 7.25k]
  ------------------
  244|      0|        return 0;
  245|       |
  246|  10.8k|    return ctx->op.encap.kem->encapsulate(ctx->op.encap.algctx,
  247|  10.8k|        out, outlen, secret, secretlen);
  248|  10.8k|}
EVP_PKEY_decapsulate_init:
  251|  7.25k|{
  252|  7.25k|    return evp_kem_init(ctx, EVP_PKEY_OP_DECAPSULATE, params, NULL);
  ------------------
  |  | 1540|  7.25k|#define EVP_PKEY_OP_DECAPSULATE (1 << 13)
  ------------------
  253|  7.25k|}
EVP_PKEY_decapsulate:
  266|  10.8k|{
  267|  10.8k|    if (ctx == NULL
  ------------------
  |  Branch (267:9): [True: 0, False: 10.8k]
  ------------------
  268|  10.8k|        || (in == NULL || inlen == 0)
  ------------------
  |  Branch (268:13): [True: 0, False: 10.8k]
  |  Branch (268:27): [True: 0, False: 10.8k]
  ------------------
  269|  10.8k|        || (secret == NULL && secretlen == NULL))
  ------------------
  |  Branch (269:13): [True: 3.62k, False: 7.25k]
  |  Branch (269:31): [True: 0, False: 3.62k]
  ------------------
  270|      0|        return 0;
  271|       |
  272|  10.8k|    if (ctx->operation != EVP_PKEY_OP_DECAPSULATE) {
  ------------------
  |  | 1540|  10.8k|#define EVP_PKEY_OP_DECAPSULATE (1 << 13)
  ------------------
  |  Branch (272:9): [True: 0, False: 10.8k]
  ------------------
  273|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  274|      0|        return -1;
  275|      0|    }
  276|       |
  277|  10.8k|    if (ctx->op.encap.algctx == NULL) {
  ------------------
  |  Branch (277:9): [True: 0, False: 10.8k]
  ------------------
  278|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  279|      0|        return -2;
  280|      0|    }
  281|  10.8k|    return ctx->op.encap.kem->decapsulate(ctx->op.encap.algctx,
  282|  10.8k|        secret, secretlen, in, inlen);
  283|  10.8k|}
EVP_KEM_free:
  434|  29.0k|{
  435|  29.0k|    int i;
  436|       |
  437|  29.0k|    if (kem == NULL)
  ------------------
  |  Branch (437:9): [True: 14.5k, False: 14.5k]
  ------------------
  438|  14.5k|        return;
  439|       |
  440|  14.5k|    CRYPTO_DOWN_REF(&kem->refcnt, &i);
  441|  14.5k|    if (i > 0)
  ------------------
  |  Branch (441:9): [True: 14.5k, False: 0]
  ------------------
  442|  14.5k|        return;
  443|      0|    OPENSSL_free(kem->type_name);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  444|      0|    ossl_provider_free(kem->prov);
  445|      0|    CRYPTO_FREE_REF(&kem->refcnt);
  446|      0|    OPENSSL_free(kem);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  447|      0|}
EVP_KEM_up_ref:
  450|  14.5k|{
  451|  14.5k|    int ref = 0;
  452|       |
  453|  14.5k|    CRYPTO_UP_REF(&kem->refcnt, &ref);
  454|  14.5k|    return 1;
  455|  14.5k|}
EVP_KEM_get0_provider:
  458|  14.5k|{
  459|  14.5k|    return kem->prov;
  460|  14.5k|}
EVP_KEM_fetch:
  464|  14.5k|{
  465|  14.5k|    return evp_generic_fetch(ctx, OSSL_OP_KEM, algorithm, properties,
  ------------------
  |  |  292|  14.5k|#define OSSL_OP_KEM 14
  ------------------
  466|  14.5k|        evp_kem_from_algorithm,
  467|  14.5k|        evp_kem_up_ref,
  468|  14.5k|        evp_kem_free);
  469|  14.5k|}
kem.c:evp_kem_init:
   32|  14.5k|{
   33|  14.5k|    int ret = 0;
   34|  14.5k|    EVP_KEM *kem = NULL;
   35|  14.5k|    EVP_KEYMGMT *tmp_keymgmt = NULL;
   36|  14.5k|    const OSSL_PROVIDER *tmp_prov = NULL;
   37|  14.5k|    void *provkey = NULL, *provauthkey = NULL;
   38|  14.5k|    const char *supported_kem = NULL;
   39|  14.5k|    int iter;
   40|       |
   41|  14.5k|    if (ctx == NULL || ctx->keytype == NULL) {
  ------------------
  |  Branch (41:9): [True: 0, False: 14.5k]
  |  Branch (41:24): [True: 0, False: 14.5k]
  ------------------
   42|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   43|      0|        return 0;
   44|      0|    }
   45|       |
   46|  14.5k|    evp_pkey_ctx_free_old_ops(ctx);
   47|  14.5k|    ctx->operation = operation;
   48|       |
   49|  14.5k|    if (ctx->pkey == NULL) {
  ------------------
  |  Branch (49:9): [True: 0, False: 14.5k]
  ------------------
   50|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NO_KEY_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   51|      0|        goto err;
   52|      0|    }
   53|  14.5k|    if (authkey != NULL && authkey->type != ctx->pkey->type) {
  ------------------
  |  Branch (53:9): [True: 0, False: 14.5k]
  |  Branch (53:28): [True: 0, False: 0]
  ------------------
   54|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_DIFFERENT_KEY_TYPES);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   55|      0|        return 0;
   56|      0|    }
   57|       |    /*
   58|       |     * Try to derive the supported kem from |ctx->keymgmt|.
   59|       |     */
   60|  14.5k|    if (!ossl_assert(ctx->pkey->keymgmt == NULL
  ------------------
  |  |   52|  29.0k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 0, False: 14.5k]
  |  |  |  Branch (52:41): [True: 14.5k, False: 0]
  |  |  ------------------
  |  |   53|  14.5k|    __FILE__, __LINE__)
  ------------------
  |  Branch (60:9): [True: 0, False: 14.5k]
  ------------------
   61|  14.5k|            || ctx->pkey->keymgmt == ctx->keymgmt)) {
   62|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   63|      0|        goto err;
   64|      0|    }
   65|  14.5k|    supported_kem = evp_keymgmt_util_query_operation_name(ctx->keymgmt,
   66|  14.5k|        OSSL_OP_KEM);
  ------------------
  |  |  292|  14.5k|#define OSSL_OP_KEM 14
  ------------------
   67|  14.5k|    if (supported_kem == NULL) {
  ------------------
  |  Branch (67:9): [True: 0, False: 14.5k]
  ------------------
   68|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   69|      0|        goto err;
   70|      0|    }
   71|       |
   72|       |    /*
   73|       |     * Because we cleared out old ops, we shouldn't need to worry about
   74|       |     * checking if kem is already there.
   75|       |     * We perform two iterations:
   76|       |     *
   77|       |     * 1.  Do the normal kem fetch, using the fetching data given by
   78|       |     *     the EVP_PKEY_CTX.
   79|       |     * 2.  Do the provider specific kem fetch, from the same provider
   80|       |     *     as |ctx->keymgmt|
   81|       |     *
   82|       |     * We then try to fetch the keymgmt from the same provider as the
   83|       |     * kem, and try to export |ctx->pkey| to that keymgmt (when this
   84|       |     * keymgmt happens to be the same as |ctx->keymgmt|, the export is
   85|       |     * a no-op, but we call it anyway to not complicate the code even
   86|       |     * more).
   87|       |     * If the export call succeeds (returns a non-NULL provider key pointer),
   88|       |     * we're done and can perform the operation itself.  If not, we perform
   89|       |     * the second iteration, or jump to legacy.
   90|       |     */
   91|  29.0k|    for (iter = 1, provkey = NULL; iter < 3 && provkey == NULL; iter++) {
  ------------------
  |  Branch (91:36): [True: 29.0k, False: 0]
  |  Branch (91:48): [True: 14.5k, False: 14.5k]
  ------------------
   92|  14.5k|        EVP_KEYMGMT *tmp_keymgmt_tofree = NULL;
   93|       |
   94|       |        /*
   95|       |         * If we're on the second iteration, free the results from the first.
   96|       |         * They are NULL on the first iteration, so no need to check what
   97|       |         * iteration we're on.
   98|       |         */
   99|  14.5k|        EVP_KEM_free(kem);
  100|  14.5k|        kem = NULL;
  101|  14.5k|        EVP_KEYMGMT_free(tmp_keymgmt);
  102|  14.5k|        tmp_keymgmt = NULL;
  103|       |
  104|  14.5k|        switch (iter) {
  ------------------
  |  Branch (104:17): [True: 14.5k, False: 0]
  ------------------
  105|  14.5k|        case 1:
  ------------------
  |  Branch (105:9): [True: 14.5k, False: 0]
  ------------------
  106|  14.5k|            kem = EVP_KEM_fetch(ctx->libctx, supported_kem, ctx->propquery);
  107|  14.5k|            if (kem != NULL)
  ------------------
  |  Branch (107:17): [True: 14.5k, False: 0]
  ------------------
  108|  14.5k|                tmp_prov = EVP_KEM_get0_provider(kem);
  109|  14.5k|            break;
  110|      0|        case 2:
  ------------------
  |  Branch (110:9): [True: 0, False: 14.5k]
  ------------------
  111|      0|            tmp_prov = EVP_KEYMGMT_get0_provider(ctx->keymgmt);
  112|      0|            kem = evp_kem_fetch_from_prov((OSSL_PROVIDER *)tmp_prov,
  113|      0|                supported_kem, ctx->propquery);
  114|       |
  115|      0|            if (kem == NULL) {
  ------------------
  |  Branch (115:17): [True: 0, False: 0]
  ------------------
  116|      0|                ERR_raise(ERR_LIB_EVP,
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  117|      0|                    EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
  118|      0|                ret = -2;
  119|      0|                goto err;
  120|      0|            }
  121|  14.5k|        }
  122|  14.5k|        if (kem == NULL)
  ------------------
  |  Branch (122:13): [True: 0, False: 14.5k]
  ------------------
  123|      0|            continue;
  124|       |
  125|       |        /*
  126|       |         * Ensure that the key is provided, either natively, or as a cached
  127|       |         * export.  We start by fetching the keymgmt with the same name as
  128|       |         * |ctx->pkey|, but from the provider of the kem method, using the
  129|       |         * same property query as when fetching the kem method.
  130|       |         * With the keymgmt we found (if we did), we try to export |ctx->pkey|
  131|       |         * to it (evp_pkey_export_to_provider() is smart enough to only actually
  132|       |         * export it if |tmp_keymgmt| is different from |ctx->pkey|'s keymgmt)
  133|       |         */
  134|  14.5k|        tmp_keymgmt_tofree = tmp_keymgmt = evp_keymgmt_fetch_from_prov((OSSL_PROVIDER *)tmp_prov,
  135|  14.5k|            EVP_KEYMGMT_get0_name(ctx->keymgmt),
  136|  14.5k|            ctx->propquery);
  137|  14.5k|        if (tmp_keymgmt != NULL) {
  ------------------
  |  Branch (137:13): [True: 14.5k, False: 0]
  ------------------
  138|  14.5k|            provkey = evp_pkey_export_to_provider(ctx->pkey, ctx->libctx,
  139|  14.5k|                &tmp_keymgmt, ctx->propquery);
  140|  14.5k|            if (provkey != NULL && authkey != NULL) {
  ------------------
  |  Branch (140:17): [True: 14.5k, False: 0]
  |  Branch (140:36): [True: 0, False: 14.5k]
  ------------------
  141|      0|                provauthkey = evp_pkey_export_to_provider(authkey, ctx->libctx,
  142|      0|                    &tmp_keymgmt,
  143|      0|                    ctx->propquery);
  144|      0|                if (provauthkey == NULL) {
  ------------------
  |  Branch (144:21): [True: 0, False: 0]
  ------------------
  145|      0|                    EVP_KEM_free(kem);
  146|      0|                    ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  147|      0|                    goto err;
  148|      0|                }
  149|      0|            }
  150|  14.5k|        }
  151|  14.5k|        if (tmp_keymgmt == NULL)
  ------------------
  |  Branch (151:13): [True: 0, False: 14.5k]
  ------------------
  152|      0|            EVP_KEYMGMT_free(tmp_keymgmt_tofree);
  153|  14.5k|    }
  154|       |
  155|  14.5k|    if (provkey == NULL) {
  ------------------
  |  Branch (155:9): [True: 0, False: 14.5k]
  ------------------
  156|      0|        EVP_KEM_free(kem);
  157|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  158|      0|        goto err;
  159|      0|    }
  160|       |
  161|  14.5k|    ctx->op.encap.kem = kem;
  162|  14.5k|    ctx->op.encap.algctx = kem->newctx(ossl_provider_ctx(kem->prov));
  163|  14.5k|    if (ctx->op.encap.algctx == NULL) {
  ------------------
  |  Branch (163:9): [True: 0, False: 14.5k]
  ------------------
  164|       |        /* The provider key can stay in the cache */
  165|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  166|      0|        goto err;
  167|      0|    }
  168|       |
  169|  14.5k|    switch (operation) {
  170|  7.25k|    case EVP_PKEY_OP_ENCAPSULATE:
  ------------------
  |  | 1539|  7.25k|#define EVP_PKEY_OP_ENCAPSULATE (1 << 12)
  ------------------
  |  Branch (170:5): [True: 7.25k, False: 7.25k]
  ------------------
  171|  7.25k|        if (provauthkey != NULL && kem->auth_encapsulate_init != NULL) {
  ------------------
  |  Branch (171:13): [True: 0, False: 7.25k]
  |  Branch (171:36): [True: 0, False: 0]
  ------------------
  172|      0|            ret = kem->auth_encapsulate_init(ctx->op.encap.algctx, provkey,
  173|      0|                provauthkey, params);
  174|  7.25k|        } else if (provauthkey == NULL && kem->encapsulate_init != NULL) {
  ------------------
  |  Branch (174:20): [True: 7.25k, False: 0]
  |  Branch (174:43): [True: 7.25k, False: 0]
  ------------------
  175|  7.25k|            ret = kem->encapsulate_init(ctx->op.encap.algctx, provkey, params);
  176|  7.25k|        } else {
  177|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  178|      0|            ret = -2;
  179|      0|            goto err;
  180|      0|        }
  181|  7.25k|        break;
  182|  7.25k|    case EVP_PKEY_OP_DECAPSULATE:
  ------------------
  |  | 1540|  7.25k|#define EVP_PKEY_OP_DECAPSULATE (1 << 13)
  ------------------
  |  Branch (182:5): [True: 7.25k, False: 7.25k]
  ------------------
  183|  7.25k|        if (provauthkey != NULL && kem->auth_decapsulate_init != NULL) {
  ------------------
  |  Branch (183:13): [True: 0, False: 7.25k]
  |  Branch (183:36): [True: 0, False: 0]
  ------------------
  184|      0|            ret = kem->auth_decapsulate_init(ctx->op.encap.algctx, provkey,
  185|      0|                provauthkey, params);
  186|  7.25k|        } else if (provauthkey == NULL && kem->decapsulate_init != NULL) {
  ------------------
  |  Branch (186:20): [True: 7.25k, False: 0]
  |  Branch (186:43): [True: 7.25k, False: 0]
  ------------------
  187|  7.25k|            ret = kem->decapsulate_init(ctx->op.encap.algctx, provkey, params);
  188|  7.25k|        } else {
  189|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  190|      0|            ret = -2;
  191|      0|            goto err;
  192|      0|        }
  193|  7.25k|        break;
  194|  7.25k|    default:
  ------------------
  |  Branch (194:5): [True: 0, False: 14.5k]
  ------------------
  195|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  196|      0|        goto err;
  197|  14.5k|    }
  198|       |
  199|  14.5k|    EVP_KEYMGMT_free(tmp_keymgmt);
  200|  14.5k|    tmp_keymgmt = NULL;
  201|       |
  202|  14.5k|    if (ret > 0)
  ------------------
  |  Branch (202:9): [True: 14.5k, False: 0]
  ------------------
  203|  14.5k|        return 1;
  204|      0|err:
  205|      0|    if (ret <= 0) {
  ------------------
  |  Branch (205:9): [True: 0, False: 0]
  ------------------
  206|      0|        evp_pkey_ctx_free_old_ops(ctx);
  207|      0|        ctx->operation = EVP_PKEY_OP_UNDEFINED;
  ------------------
  |  | 1527|      0|#define EVP_PKEY_OP_UNDEFINED 0
  ------------------
  208|      0|    }
  209|      0|    EVP_KEYMGMT_free(tmp_keymgmt);
  210|      0|    return ret;
  211|  14.5k|}
kem.c:evp_kem_from_algorithm:
  305|     12|{
  306|     12|    const OSSL_DISPATCH *fns = algodef->implementation;
  307|     12|    EVP_KEM *kem = NULL;
  308|     12|    int ctxfncnt = 0, encfncnt = 0, decfncnt = 0;
  309|     12|    int gparamfncnt = 0, sparamfncnt = 0;
  310|       |
  311|     12|    if ((kem = evp_kem_new(prov)) == NULL) {
  ------------------
  |  Branch (311:9): [True: 0, False: 12]
  ------------------
  312|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  313|      0|        goto err;
  314|      0|    }
  315|       |
  316|     12|    kem->name_id = name_id;
  317|     12|    if ((kem->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL)
  ------------------
  |  Branch (317:9): [True: 0, False: 12]
  ------------------
  318|      0|        goto err;
  319|     12|    kem->description = algodef->algorithm_description;
  320|       |
  321|    117|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (321:12): [True: 105, False: 12]
  ------------------
  322|    105|        switch (fns->function_id) {
  ------------------
  |  Branch (322:17): [True: 105, False: 0]
  ------------------
  323|     12|        case OSSL_FUNC_KEM_NEWCTX:
  ------------------
  |  |  928|     12|#define OSSL_FUNC_KEM_NEWCTX 1
  ------------------
  |  Branch (323:9): [True: 12, False: 93]
  ------------------
  324|     12|            if (kem->newctx != NULL)
  ------------------
  |  Branch (324:17): [True: 0, False: 12]
  ------------------
  325|      0|                break;
  326|     12|            kem->newctx = OSSL_FUNC_kem_newctx(fns);
  327|     12|            ctxfncnt++;
  328|     12|            break;
  329|     12|        case OSSL_FUNC_KEM_ENCAPSULATE_INIT:
  ------------------
  |  |  929|     12|#define OSSL_FUNC_KEM_ENCAPSULATE_INIT 2
  ------------------
  |  Branch (329:9): [True: 12, False: 93]
  ------------------
  330|     12|            if (kem->encapsulate_init != NULL)
  ------------------
  |  Branch (330:17): [True: 0, False: 12]
  ------------------
  331|      0|                break;
  332|     12|            kem->encapsulate_init = OSSL_FUNC_kem_encapsulate_init(fns);
  333|     12|            encfncnt++;
  334|     12|            break;
  335|      3|        case OSSL_FUNC_KEM_AUTH_ENCAPSULATE_INIT:
  ------------------
  |  |  939|      3|#define OSSL_FUNC_KEM_AUTH_ENCAPSULATE_INIT 12
  ------------------
  |  Branch (335:9): [True: 3, False: 102]
  ------------------
  336|      3|            if (kem->auth_encapsulate_init != NULL)
  ------------------
  |  Branch (336:17): [True: 0, False: 3]
  ------------------
  337|      0|                break;
  338|      3|            kem->auth_encapsulate_init = OSSL_FUNC_kem_auth_encapsulate_init(fns);
  339|      3|            encfncnt++;
  340|      3|            break;
  341|     12|        case OSSL_FUNC_KEM_ENCAPSULATE:
  ------------------
  |  |  930|     12|#define OSSL_FUNC_KEM_ENCAPSULATE 3
  ------------------
  |  Branch (341:9): [True: 12, False: 93]
  ------------------
  342|     12|            if (kem->encapsulate != NULL)
  ------------------
  |  Branch (342:17): [True: 0, False: 12]
  ------------------
  343|      0|                break;
  344|     12|            kem->encapsulate = OSSL_FUNC_kem_encapsulate(fns);
  345|     12|            encfncnt++;
  346|     12|            break;
  347|     12|        case OSSL_FUNC_KEM_DECAPSULATE_INIT:
  ------------------
  |  |  931|     12|#define OSSL_FUNC_KEM_DECAPSULATE_INIT 4
  ------------------
  |  Branch (347:9): [True: 12, False: 93]
  ------------------
  348|     12|            if (kem->decapsulate_init != NULL)
  ------------------
  |  Branch (348:17): [True: 0, False: 12]
  ------------------
  349|      0|                break;
  350|     12|            kem->decapsulate_init = OSSL_FUNC_kem_decapsulate_init(fns);
  351|     12|            decfncnt++;
  352|     12|            break;
  353|      3|        case OSSL_FUNC_KEM_AUTH_DECAPSULATE_INIT:
  ------------------
  |  |  940|      3|#define OSSL_FUNC_KEM_AUTH_DECAPSULATE_INIT 13
  ------------------
  |  Branch (353:9): [True: 3, False: 102]
  ------------------
  354|      3|            if (kem->auth_decapsulate_init != NULL)
  ------------------
  |  Branch (354:17): [True: 0, False: 3]
  ------------------
  355|      0|                break;
  356|      3|            kem->auth_decapsulate_init = OSSL_FUNC_kem_auth_decapsulate_init(fns);
  357|      3|            decfncnt++;
  358|      3|            break;
  359|     12|        case OSSL_FUNC_KEM_DECAPSULATE:
  ------------------
  |  |  932|     12|#define OSSL_FUNC_KEM_DECAPSULATE 5
  ------------------
  |  Branch (359:9): [True: 12, False: 93]
  ------------------
  360|     12|            if (kem->decapsulate != NULL)
  ------------------
  |  Branch (360:17): [True: 0, False: 12]
  ------------------
  361|      0|                break;
  362|     12|            kem->decapsulate = OSSL_FUNC_kem_decapsulate(fns);
  363|     12|            decfncnt++;
  364|     12|            break;
  365|     12|        case OSSL_FUNC_KEM_FREECTX:
  ------------------
  |  |  933|     12|#define OSSL_FUNC_KEM_FREECTX 6
  ------------------
  |  Branch (365:9): [True: 12, False: 93]
  ------------------
  366|     12|            if (kem->freectx != NULL)
  ------------------
  |  Branch (366:17): [True: 0, False: 12]
  ------------------
  367|      0|                break;
  368|     12|            kem->freectx = OSSL_FUNC_kem_freectx(fns);
  369|     12|            ctxfncnt++;
  370|     12|            break;
  371|      1|        case OSSL_FUNC_KEM_DUPCTX:
  ------------------
  |  |  934|      1|#define OSSL_FUNC_KEM_DUPCTX 7
  ------------------
  |  Branch (371:9): [True: 1, False: 104]
  ------------------
  372|      1|            if (kem->dupctx != NULL)
  ------------------
  |  Branch (372:17): [True: 0, False: 1]
  ------------------
  373|      0|                break;
  374|      1|            kem->dupctx = OSSL_FUNC_kem_dupctx(fns);
  375|      1|            break;
  376|      1|        case OSSL_FUNC_KEM_GET_CTX_PARAMS:
  ------------------
  |  |  935|      1|#define OSSL_FUNC_KEM_GET_CTX_PARAMS 8
  ------------------
  |  Branch (376:9): [True: 1, False: 104]
  ------------------
  377|      1|            if (kem->get_ctx_params != NULL)
  ------------------
  |  Branch (377:17): [True: 0, False: 1]
  ------------------
  378|      0|                break;
  379|      1|            kem->get_ctx_params
  380|      1|                = OSSL_FUNC_kem_get_ctx_params(fns);
  381|      1|            gparamfncnt++;
  382|      1|            break;
  383|      1|        case OSSL_FUNC_KEM_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  936|      1|#define OSSL_FUNC_KEM_GETTABLE_CTX_PARAMS 9
  ------------------
  |  Branch (383:9): [True: 1, False: 104]
  ------------------
  384|      1|            if (kem->gettable_ctx_params != NULL)
  ------------------
  |  Branch (384:17): [True: 0, False: 1]
  ------------------
  385|      0|                break;
  386|      1|            kem->gettable_ctx_params
  387|      1|                = OSSL_FUNC_kem_gettable_ctx_params(fns);
  388|      1|            gparamfncnt++;
  389|      1|            break;
  390|     12|        case OSSL_FUNC_KEM_SET_CTX_PARAMS:
  ------------------
  |  |  937|     12|#define OSSL_FUNC_KEM_SET_CTX_PARAMS 10
  ------------------
  |  Branch (390:9): [True: 12, False: 93]
  ------------------
  391|     12|            if (kem->set_ctx_params != NULL)
  ------------------
  |  Branch (391:17): [True: 0, False: 12]
  ------------------
  392|      0|                break;
  393|     12|            kem->set_ctx_params
  394|     12|                = OSSL_FUNC_kem_set_ctx_params(fns);
  395|     12|            sparamfncnt++;
  396|     12|            break;
  397|     12|        case OSSL_FUNC_KEM_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  938|     12|#define OSSL_FUNC_KEM_SETTABLE_CTX_PARAMS 11
  ------------------
  |  Branch (397:9): [True: 12, False: 93]
  ------------------
  398|     12|            if (kem->settable_ctx_params != NULL)
  ------------------
  |  Branch (398:17): [True: 0, False: 12]
  ------------------
  399|      0|                break;
  400|     12|            kem->settable_ctx_params
  401|     12|                = OSSL_FUNC_kem_settable_ctx_params(fns);
  402|     12|            sparamfncnt++;
  403|     12|            break;
  404|    105|        }
  405|    105|    }
  406|     12|    if (ctxfncnt != 2
  ------------------
  |  Branch (406:9): [True: 0, False: 12]
  ------------------
  407|     12|        || (encfncnt != 0 && encfncnt != 2 && encfncnt != 3)
  ------------------
  |  Branch (407:13): [True: 12, False: 0]
  |  Branch (407:30): [True: 3, False: 9]
  |  Branch (407:47): [True: 0, False: 3]
  ------------------
  408|     12|        || (decfncnt != 0 && decfncnt != 2 && decfncnt != 3)
  ------------------
  |  Branch (408:13): [True: 12, False: 0]
  |  Branch (408:30): [True: 3, False: 9]
  |  Branch (408:47): [True: 0, False: 3]
  ------------------
  409|     12|        || (encfncnt != decfncnt)
  ------------------
  |  Branch (409:12): [True: 0, False: 12]
  ------------------
  410|     12|        || (gparamfncnt != 0 && gparamfncnt != 2)
  ------------------
  |  Branch (410:13): [True: 1, False: 11]
  |  Branch (410:33): [True: 0, False: 1]
  ------------------
  411|     12|        || (sparamfncnt != 0 && sparamfncnt != 2)) {
  ------------------
  |  Branch (411:13): [True: 12, False: 0]
  |  Branch (411:33): [True: 0, False: 12]
  ------------------
  412|       |        /*
  413|       |         * In order to be a consistent set of functions we must have at least
  414|       |         * a set of context functions (newctx and freectx) as well as a pair
  415|       |         * (or triplet) of "kem" functions:
  416|       |         * (encapsulate_init, (and/or auth_encapsulate_init), encapsulate) or
  417|       |         * (decapsulate_init, (and/or auth_decapsulate_init), decapsulate).
  418|       |         * set_ctx_params and settable_ctx_params are optional, but if one of
  419|       |         * them is present then the other one must also be present. The same
  420|       |         * applies to get_ctx_params and gettable_ctx_params.
  421|       |         * The dupctx function is optional.
  422|       |         */
  423|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  424|      0|        goto err;
  425|      0|    }
  426|       |
  427|     12|    return kem;
  428|      0|err:
  429|      0|    EVP_KEM_free(kem);
  430|       |    return NULL;
  431|     12|}
kem.c:evp_kem_new:
  286|     12|{
  287|     12|    EVP_KEM *kem = OPENSSL_zalloc(sizeof(EVP_KEM));
  ------------------
  |  |  109|     12|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  288|       |
  289|     12|    if (kem == NULL)
  ------------------
  |  Branch (289:9): [True: 0, False: 12]
  ------------------
  290|      0|        return NULL;
  291|       |
  292|     12|    if (!CRYPTO_NEW_REF(&kem->refcnt, 1)
  ------------------
  |  Branch (292:9): [True: 0, False: 12]
  ------------------
  293|     12|        || !ossl_provider_up_ref(prov)) {
  ------------------
  |  Branch (293:12): [True: 0, False: 12]
  ------------------
  294|      0|        CRYPTO_FREE_REF(&kem->refcnt);
  295|      0|        OPENSSL_free(kem);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  296|      0|        return NULL;
  297|      0|    }
  298|     12|    kem->prov = prov;
  299|       |
  300|     12|    return kem;
  301|     12|}
kem.c:evp_kem_up_ref:
   26|  14.5k|{
   27|  14.5k|    return EVP_KEM_up_ref(data);
   28|  14.5k|}
kem.c:evp_kem_free:
   21|     12|{
   22|     12|    EVP_KEM_free(data);
   23|     12|}

evp_keymgmt_util_assign_pkey:
   62|  43.6k|{
   63|  43.6k|    if (pkey == NULL || keymgmt == NULL || keydata == NULL
  ------------------
  |  Branch (63:9): [True: 0, False: 43.6k]
  |  Branch (63:25): [True: 0, False: 43.6k]
  |  Branch (63:44): [True: 0, False: 43.6k]
  ------------------
   64|  43.6k|        || !EVP_PKEY_set_type_by_keymgmt(pkey, keymgmt)) {
  ------------------
  |  Branch (64:12): [True: 0, False: 43.6k]
  ------------------
   65|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   66|      0|        return 0;
   67|      0|    }
   68|  43.6k|    pkey->keydata = keydata;
   69|  43.6k|    evp_keymgmt_util_cache_keyinfo(pkey);
   70|  43.6k|    return 1;
   71|  43.6k|}
evp_keymgmt_util_make_pkey:
   74|  14.6k|{
   75|  14.6k|    EVP_PKEY *pkey = NULL;
   76|       |
   77|  14.6k|    if (keymgmt == NULL
  ------------------
  |  Branch (77:9): [True: 0, False: 14.6k]
  ------------------
   78|  14.6k|        || keydata == NULL
  ------------------
  |  Branch (78:12): [True: 0, False: 14.6k]
  ------------------
   79|  14.6k|        || (pkey = EVP_PKEY_new()) == NULL
  ------------------
  |  Branch (79:12): [True: 0, False: 14.6k]
  ------------------
   80|  14.6k|        || !evp_keymgmt_util_assign_pkey(pkey, keymgmt, keydata)) {
  ------------------
  |  Branch (80:12): [True: 0, False: 14.6k]
  ------------------
   81|      0|        EVP_PKEY_free(pkey);
   82|      0|        return NULL;
   83|      0|    }
   84|  14.6k|    return pkey;
   85|  14.6k|}
evp_keymgmt_util_export:
   89|  7.25k|{
   90|  7.25k|    if (pk == NULL || export_cb == NULL)
  ------------------
  |  Branch (90:9): [True: 0, False: 7.25k]
  |  Branch (90:23): [True: 0, False: 7.25k]
  ------------------
   91|      0|        return 0;
   92|  7.25k|    return evp_keymgmt_export(pk->keymgmt, pk->keydata, selection,
   93|  7.25k|        export_cb, export_cbarg);
   94|  7.25k|}
evp_keymgmt_util_export_to_provider:
   98|  50.8k|{
   99|  50.8k|    struct evp_keymgmt_util_try_import_data_st import_data;
  100|  50.8k|    OP_CACHE_ELEM *op;
  101|       |
  102|       |    /* Export to where? */
  103|  50.8k|    if (keymgmt == NULL)
  ------------------
  |  Branch (103:9): [True: 0, False: 50.8k]
  ------------------
  104|      0|        return NULL;
  105|       |
  106|       |    /* If we have an unassigned key, give up */
  107|  50.8k|    if (pk->keydata == NULL)
  ------------------
  |  Branch (107:9): [True: 0, False: 50.8k]
  ------------------
  108|      0|        return NULL;
  109|       |
  110|       |    /*
  111|       |     * If |keymgmt| matches the "origin" |keymgmt|, there is no more to do.
  112|       |     * The "origin" is determined by the |keymgmt| pointers being identical
  113|       |     * or when the provider and the name ID match.  The latter case handles the
  114|       |     * situation where the fetch cache is flushed and a "new" key manager is
  115|       |     * created.
  116|       |     */
  117|  50.8k|    if (pk->keymgmt == keymgmt
  ------------------
  |  Branch (117:9): [True: 50.8k, False: 0]
  ------------------
  118|      0|        || (pk->keymgmt->name_id == keymgmt->name_id
  ------------------
  |  Branch (118:13): [True: 0, False: 0]
  ------------------
  119|      0|            && pk->keymgmt->prov == keymgmt->prov))
  ------------------
  |  Branch (119:16): [True: 0, False: 0]
  ------------------
  120|  50.8k|        return pk->keydata;
  121|       |
  122|      0|    if (!CRYPTO_THREAD_read_lock(pk->lock))
  ------------------
  |  Branch (122:9): [True: 0, False: 0]
  ------------------
  123|      0|        return NULL;
  124|       |    /*
  125|       |     * If the provider native "origin" hasn't changed since last time, we
  126|       |     * try to find our keymgmt in the operation cache.  If it has changed
  127|       |     * and our keymgmt isn't found, we will clear the cache further down.
  128|       |     */
  129|      0|    if (pk->dirty_cnt == pk->dirty_cnt_copy) {
  ------------------
  |  Branch (129:9): [True: 0, False: 0]
  ------------------
  130|       |        /* If this key is already exported to |keymgmt|, no more to do */
  131|      0|        op = evp_keymgmt_util_find_operation_cache(pk, keymgmt, selection);
  132|      0|        if (op != NULL && op->keymgmt != NULL) {
  ------------------
  |  Branch (132:13): [True: 0, False: 0]
  |  Branch (132:27): [True: 0, False: 0]
  ------------------
  133|      0|            void *ret = op->keydata;
  134|       |
  135|      0|            CRYPTO_THREAD_unlock(pk->lock);
  136|      0|            return ret;
  137|      0|        }
  138|      0|    }
  139|      0|    CRYPTO_THREAD_unlock(pk->lock);
  140|       |
  141|       |    /* If the "origin" |keymgmt| doesn't support exporting, give up */
  142|      0|    if (pk->keymgmt->export == NULL)
  ------------------
  |  Branch (142:9): [True: 0, False: 0]
  ------------------
  143|      0|        return NULL;
  144|       |
  145|       |    /*
  146|       |     * Make sure that the type of the keymgmt to export to matches the type
  147|       |     * of the "origin"
  148|       |     */
  149|      0|    if (!ossl_assert(match_type(pk->keymgmt, keymgmt)))
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (149:9): [True: 0, False: 0]
  ------------------
  150|      0|        return NULL;
  151|       |
  152|       |    /*
  153|       |     * We look at the already cached provider keys, and import from the
  154|       |     * first that supports it (i.e. use its export function), and export
  155|       |     * the imported data to the new provider.
  156|       |     */
  157|       |
  158|       |    /* Setup for the export callback */
  159|      0|    import_data.keydata = NULL; /* evp_keymgmt_util_try_import will create it */
  160|      0|    import_data.keymgmt = keymgmt;
  161|      0|    import_data.selection = selection;
  162|       |
  163|       |    /*
  164|       |     * The export function calls the callback (evp_keymgmt_util_try_import),
  165|       |     * which does the import for us.  If successful, we're done.
  166|       |     */
  167|      0|    if (!evp_keymgmt_util_export(pk, selection,
  ------------------
  |  Branch (167:9): [True: 0, False: 0]
  ------------------
  168|      0|            &evp_keymgmt_util_try_import, &import_data))
  169|       |        /* If there was an error, bail out */
  170|      0|        return NULL;
  171|       |
  172|      0|    if (!CRYPTO_THREAD_write_lock(pk->lock)) {
  ------------------
  |  Branch (172:9): [True: 0, False: 0]
  ------------------
  173|      0|        evp_keymgmt_freedata(keymgmt, import_data.keydata);
  174|      0|        return NULL;
  175|      0|    }
  176|       |    /* Check to make sure some other thread didn't get there first */
  177|      0|    op = evp_keymgmt_util_find_operation_cache(pk, keymgmt, selection);
  178|      0|    if (op != NULL && op->keydata != NULL) {
  ------------------
  |  Branch (178:9): [True: 0, False: 0]
  |  Branch (178:23): [True: 0, False: 0]
  ------------------
  179|      0|        void *ret = op->keydata;
  180|       |
  181|      0|        CRYPTO_THREAD_unlock(pk->lock);
  182|       |
  183|       |        /*
  184|       |         * Another thread seemms to have already exported this so we abandon
  185|       |         * all the work we just did.
  186|       |         */
  187|      0|        evp_keymgmt_freedata(keymgmt, import_data.keydata);
  188|       |
  189|      0|        return ret;
  190|      0|    }
  191|       |
  192|       |    /*
  193|       |     * If the dirty counter changed since last time, then clear the
  194|       |     * operation cache.  In that case, we know that |i| is zero.
  195|       |     */
  196|      0|    if (pk->dirty_cnt != pk->dirty_cnt_copy)
  ------------------
  |  Branch (196:9): [True: 0, False: 0]
  ------------------
  197|      0|        evp_keymgmt_util_clear_operation_cache(pk);
  198|       |
  199|       |    /* Add the new export to the operation cache */
  200|      0|    if (!evp_keymgmt_util_cache_keydata(pk, keymgmt, import_data.keydata,
  ------------------
  |  Branch (200:9): [True: 0, False: 0]
  ------------------
  201|      0|            selection)) {
  202|      0|        CRYPTO_THREAD_unlock(pk->lock);
  203|      0|        evp_keymgmt_freedata(keymgmt, import_data.keydata);
  204|      0|        return NULL;
  205|      0|    }
  206|       |
  207|       |    /* Synchronize the dirty count */
  208|      0|    pk->dirty_cnt_copy = pk->dirty_cnt;
  209|       |
  210|      0|    CRYPTO_THREAD_unlock(pk->lock);
  211|       |
  212|      0|    return import_data.keydata;
  213|      0|}
evp_keymgmt_util_clear_operation_cache:
  223|  65.5k|{
  224|  65.5k|    if (pk == NULL)
  ------------------
  |  Branch (224:9): [True: 0, False: 65.5k]
  ------------------
  225|      0|        return;
  226|       |
  227|  65.5k|    sk_OP_CACHE_ELEM_pop_free(pk->operation_cache, op_cache_free);
  228|       |    pk->operation_cache = NULL;
  229|  65.5k|}
evp_keymgmt_util_cache_keyinfo:
  289|  47.3k|{
  290|       |    /*
  291|       |     * Cache information about the provider "origin" key.
  292|       |     *
  293|       |     * This services functions like EVP_PKEY_get_size, EVP_PKEY_get_bits, etc
  294|       |     */
  295|  47.3k|    if (pk->keydata != NULL) {
  ------------------
  |  Branch (295:9): [True: 47.3k, False: 0]
  ------------------
  296|  47.3k|        int bits = 0;
  297|  47.3k|        int security_bits = 0;
  298|  47.3k|        int security_category = -1;
  299|  47.3k|        int size = 0;
  300|  47.3k|        OSSL_PARAM params[5];
  301|       |
  302|  47.3k|        params[0] = OSSL_PARAM_construct_int(OSSL_PKEY_PARAM_BITS, &bits);
  ------------------
  |  |  374|  47.3k|# define OSSL_PKEY_PARAM_BITS "bits"
  ------------------
  303|  47.3k|        params[1] = OSSL_PARAM_construct_int(OSSL_PKEY_PARAM_SECURITY_BITS,
  ------------------
  |  |  506|  47.3k|# define OSSL_PKEY_PARAM_SECURITY_BITS "security-bits"
  ------------------
  304|  47.3k|            &security_bits);
  305|  47.3k|        params[2] = OSSL_PARAM_construct_int(OSSL_PKEY_PARAM_SECURITY_CATEGORY,
  ------------------
  |  |  507|  47.3k|# define OSSL_PKEY_PARAM_SECURITY_CATEGORY OSSL_ALG_PARAM_SECURITY_CATEGORY
  |  |  ------------------
  |  |  |  |  131|  47.3k|# define OSSL_ALG_PARAM_SECURITY_CATEGORY "security-category"
  |  |  ------------------
  ------------------
  306|  47.3k|            &security_category);
  307|  47.3k|        params[3] = OSSL_PARAM_construct_int(OSSL_PKEY_PARAM_MAX_SIZE, &size);
  ------------------
  |  |  432|  47.3k|# define OSSL_PKEY_PARAM_MAX_SIZE "max-size"
  ------------------
  308|  47.3k|        params[4] = OSSL_PARAM_construct_end();
  309|  47.3k|        if (evp_keymgmt_get_params(pk->keymgmt, pk->keydata, params)) {
  ------------------
  |  Branch (309:13): [True: 47.3k, False: 0]
  ------------------
  310|  47.3k|            pk->cache.size = size;
  311|  47.3k|            pk->cache.bits = bits;
  312|  47.3k|            pk->cache.security_bits = security_bits;
  313|  47.3k|            pk->cache.security_category = security_category;
  314|  47.3k|        }
  315|  47.3k|    }
  316|  47.3k|}
evp_keymgmt_util_fromdata:
  320|  7.25k|{
  321|  7.25k|    void *keydata = NULL;
  322|       |
  323|  7.25k|    if ((keydata = evp_keymgmt_newdata(keymgmt, NULL)) == NULL
  ------------------
  |  Branch (323:9): [True: 0, False: 7.25k]
  ------------------
  324|  7.25k|        || !evp_keymgmt_import(keymgmt, keydata, selection, params)
  ------------------
  |  Branch (324:12): [True: 0, False: 7.25k]
  ------------------
  325|  7.25k|        || !evp_keymgmt_util_assign_pkey(target, keymgmt, keydata)) {
  ------------------
  |  Branch (325:12): [True: 0, False: 7.25k]
  ------------------
  326|      0|        evp_keymgmt_freedata(keymgmt, keydata);
  327|       |        keydata = NULL;
  328|      0|    }
  329|  7.25k|    return keydata;
  330|  7.25k|}
evp_keymgmt_util_has:
  333|  33.1k|{
  334|       |    /* Check if key is even assigned */
  335|  33.1k|    if (pk->keymgmt == NULL)
  ------------------
  |  Branch (335:9): [True: 0, False: 33.1k]
  ------------------
  336|      0|        return 0;
  337|       |
  338|  33.1k|    return evp_keymgmt_has(pk->keymgmt, pk->keydata, selection);
  339|  33.1k|}
evp_keymgmt_util_match:
  355|  7.46k|{
  356|  7.46k|    EVP_KEYMGMT *keymgmt1 = NULL, *keymgmt2 = NULL;
  357|  7.46k|    void *keydata1 = NULL, *keydata2 = NULL;
  358|       |
  359|  7.46k|    if (pk1 == NULL || pk2 == NULL) {
  ------------------
  |  Branch (359:9): [True: 0, False: 7.46k]
  |  Branch (359:24): [True: 0, False: 7.46k]
  ------------------
  360|      0|        if (pk1 == NULL && pk2 == NULL)
  ------------------
  |  Branch (360:13): [True: 0, False: 0]
  |  Branch (360:28): [True: 0, False: 0]
  ------------------
  361|      0|            return 1;
  362|      0|        return 0;
  363|      0|    }
  364|       |
  365|  7.46k|    keymgmt1 = pk1->keymgmt;
  366|  7.46k|    keydata1 = pk1->keydata;
  367|  7.46k|    keymgmt2 = pk2->keymgmt;
  368|  7.46k|    keydata2 = pk2->keydata;
  369|       |
  370|  7.46k|    if (keymgmt1 != keymgmt2) {
  ------------------
  |  Branch (370:9): [True: 0, False: 7.46k]
  ------------------
  371|       |        /*
  372|       |         * The condition for a successful cross export is that the
  373|       |         * keydata to be exported is NULL (typed, but otherwise empty
  374|       |         * EVP_PKEY), or that it was possible to export it with
  375|       |         * evp_keymgmt_util_export_to_provider().
  376|       |         *
  377|       |         * We use |ok| to determine if it's ok to cross export one way,
  378|       |         * but also to determine if we should attempt a cross export
  379|       |         * the other way.  There's no point doing it both ways.
  380|       |         */
  381|      0|        int ok = 0;
  382|       |
  383|       |        /* Complex case, where the keymgmt differ */
  384|      0|        if (keymgmt1 != NULL
  ------------------
  |  Branch (384:13): [True: 0, False: 0]
  ------------------
  385|      0|            && keymgmt2 != NULL
  ------------------
  |  Branch (385:16): [True: 0, False: 0]
  ------------------
  386|      0|            && !match_type(keymgmt1, keymgmt2)) {
  ------------------
  |  Branch (386:16): [True: 0, False: 0]
  ------------------
  387|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_DIFFERENT_KEY_TYPES);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  388|      0|            return -1; /* Not the same type */
  389|      0|        }
  390|       |
  391|       |        /*
  392|       |         * The key types are determined to match, so we try cross export,
  393|       |         * but only to keymgmt's that supply a matching function.
  394|       |         */
  395|      0|        if (keymgmt2 != NULL
  ------------------
  |  Branch (395:13): [True: 0, False: 0]
  ------------------
  396|      0|            && keymgmt2->match != NULL) {
  ------------------
  |  Branch (396:16): [True: 0, False: 0]
  ------------------
  397|      0|            void *tmp_keydata = NULL;
  398|       |
  399|      0|            ok = 1;
  400|      0|            if (keydata1 != NULL) {
  ------------------
  |  Branch (400:17): [True: 0, False: 0]
  ------------------
  401|      0|                tmp_keydata = evp_keymgmt_util_export_to_provider(pk1, keymgmt2,
  402|      0|                    selection);
  403|      0|                ok = (tmp_keydata != NULL);
  404|      0|            }
  405|      0|            if (ok) {
  ------------------
  |  Branch (405:17): [True: 0, False: 0]
  ------------------
  406|      0|                keymgmt1 = keymgmt2;
  407|      0|                keydata1 = tmp_keydata;
  408|      0|            }
  409|      0|        }
  410|       |        /*
  411|       |         * If we've successfully cross exported one way, there's no point
  412|       |         * doing it the other way, hence the |!ok| check.
  413|       |         */
  414|      0|        if (!ok
  ------------------
  |  Branch (414:13): [True: 0, False: 0]
  ------------------
  415|      0|            && keymgmt1 != NULL
  ------------------
  |  Branch (415:16): [True: 0, False: 0]
  ------------------
  416|      0|            && keymgmt1->match != NULL) {
  ------------------
  |  Branch (416:16): [True: 0, False: 0]
  ------------------
  417|      0|            void *tmp_keydata = NULL;
  418|       |
  419|      0|            ok = 1;
  420|      0|            if (keydata2 != NULL) {
  ------------------
  |  Branch (420:17): [True: 0, False: 0]
  ------------------
  421|      0|                tmp_keydata = evp_keymgmt_util_export_to_provider(pk2, keymgmt1,
  422|      0|                    selection);
  423|      0|                ok = (tmp_keydata != NULL);
  424|      0|            }
  425|      0|            if (ok) {
  ------------------
  |  Branch (425:17): [True: 0, False: 0]
  ------------------
  426|      0|                keymgmt2 = keymgmt1;
  427|      0|                keydata2 = tmp_keydata;
  428|      0|            }
  429|      0|        }
  430|      0|    }
  431|       |
  432|       |    /* If we still don't have matching keymgmt implementations, we give up */
  433|  7.46k|    if (keymgmt1 != keymgmt2)
  ------------------
  |  Branch (433:9): [True: 0, False: 7.46k]
  ------------------
  434|      0|        return -2;
  435|       |
  436|       |    /* If both keydata are NULL, then they're the same key */
  437|  7.46k|    if (keydata1 == NULL && keydata2 == NULL)
  ------------------
  |  Branch (437:9): [True: 0, False: 7.46k]
  |  Branch (437:29): [True: 0, False: 0]
  ------------------
  438|      0|        return 1;
  439|       |    /* If only one of the keydata is NULL, then they're different keys */
  440|  7.46k|    if (keydata1 == NULL || keydata2 == NULL)
  ------------------
  |  Branch (440:9): [True: 0, False: 7.46k]
  |  Branch (440:29): [True: 0, False: 7.46k]
  ------------------
  441|      0|        return 0;
  442|       |    /* If both keydata are non-NULL, we let the backend decide */
  443|  7.46k|    return evp_keymgmt_match(keymgmt1, keydata1, keydata2, selection);
  444|  7.46k|}
evp_keymgmt_util_copy:
  447|  3.62k|{
  448|       |    /* Save copies of pointers we want to play with without affecting |to| */
  449|  3.62k|    EVP_KEYMGMT *to_keymgmt = to->keymgmt;
  450|  3.62k|    void *to_keydata = to->keydata, *alloc_keydata = NULL;
  451|       |
  452|       |    /* An unassigned key can't be copied */
  453|  3.62k|    if (from == NULL || from->keydata == NULL)
  ------------------
  |  Branch (453:9): [True: 0, False: 3.62k]
  |  Branch (453:25): [True: 0, False: 3.62k]
  ------------------
  454|      0|        return 0;
  455|       |
  456|       |    /*
  457|       |     * If |to| is unassigned, ensure it gets the same KEYMGMT as |from|,
  458|       |     * Note that the final setting of KEYMGMT is done further down, with
  459|       |     * EVP_PKEY_set_type_by_keymgmt(); we don't want to do that prematurely.
  460|       |     */
  461|  3.62k|    if (to_keymgmt == NULL)
  ------------------
  |  Branch (461:9): [True: 0, False: 3.62k]
  ------------------
  462|      0|        to_keymgmt = from->keymgmt;
  463|       |
  464|  3.62k|    if (to_keymgmt == from->keymgmt && to_keymgmt->dup != NULL
  ------------------
  |  Branch (464:9): [True: 3.62k, False: 0]
  |  Branch (464:40): [True: 3.62k, False: 0]
  ------------------
  465|  3.62k|        && to_keydata == NULL) {
  ------------------
  |  Branch (465:12): [True: 3.62k, False: 0]
  ------------------
  466|  3.62k|        to_keydata = alloc_keydata = evp_keymgmt_dup(to_keymgmt,
  467|  3.62k|            from->keydata,
  468|  3.62k|            selection);
  469|  3.62k|        if (to_keydata == NULL)
  ------------------
  |  Branch (469:13): [True: 0, False: 3.62k]
  ------------------
  470|      0|            return 0;
  471|  3.62k|    } else if (match_type(to_keymgmt, from->keymgmt)) {
  ------------------
  |  Branch (471:16): [True: 0, False: 0]
  ------------------
  472|      0|        struct evp_keymgmt_util_try_import_data_st import_data;
  473|       |
  474|      0|        import_data.keymgmt = to_keymgmt;
  475|      0|        import_data.keydata = to_keydata;
  476|      0|        import_data.selection = selection;
  477|       |
  478|      0|        if (!evp_keymgmt_util_export(from, selection,
  ------------------
  |  Branch (478:13): [True: 0, False: 0]
  ------------------
  479|      0|                &evp_keymgmt_util_try_import,
  480|      0|                &import_data))
  481|      0|            return 0;
  482|       |
  483|       |        /*
  484|       |         * In case to_keydata was previously unallocated,
  485|       |         * evp_keymgmt_util_try_import() may have created it for us.
  486|       |         */
  487|      0|        if (to_keydata == NULL)
  ------------------
  |  Branch (487:13): [True: 0, False: 0]
  ------------------
  488|      0|            to_keydata = alloc_keydata = import_data.keydata;
  489|      0|    } else {
  490|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_DIFFERENT_KEY_TYPES);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  491|      0|        return 0;
  492|      0|    }
  493|       |
  494|       |    /*
  495|       |     * We only need to set the |to| type when its |keymgmt| isn't set.
  496|       |     * We can then just set its |keydata| to what we have, which might
  497|       |     * be exactly what it had when entering this function.
  498|       |     * This is a bit different from using evp_keymgmt_util_assign_pkey(),
  499|       |     * which isn't as careful with |to|'s original |keymgmt|, since it's
  500|       |     * meant to forcibly reassign an EVP_PKEY no matter what, which is
  501|       |     * why we don't use that one here.
  502|       |     */
  503|  3.62k|    if (to->keymgmt == NULL
  ------------------
  |  Branch (503:9): [True: 0, False: 3.62k]
  ------------------
  504|      0|        && !EVP_PKEY_set_type_by_keymgmt(to, to_keymgmt)) {
  ------------------
  |  Branch (504:12): [True: 0, False: 0]
  ------------------
  505|      0|        evp_keymgmt_freedata(to_keymgmt, alloc_keydata);
  506|      0|        return 0;
  507|      0|    }
  508|  3.62k|    to->keydata = to_keydata;
  509|  3.62k|    evp_keymgmt_util_cache_keyinfo(to);
  510|       |
  511|  3.62k|    return 1;
  512|  3.62k|}
evp_keymgmt_util_gen:
  516|  21.7k|{
  517|  21.7k|    void *keydata = NULL;
  518|       |
  519|  21.7k|    if ((keydata = evp_keymgmt_gen(keymgmt, genctx, cb, cbarg)) == NULL
  ------------------
  |  Branch (519:9): [True: 0, False: 21.7k]
  ------------------
  520|  21.7k|        || !evp_keymgmt_util_assign_pkey(target, keymgmt, keydata)) {
  ------------------
  |  Branch (520:12): [True: 0, False: 21.7k]
  ------------------
  521|      0|        evp_keymgmt_freedata(keymgmt, keydata);
  522|      0|        keydata = NULL;
  523|      0|    }
  524|       |
  525|  21.7k|    return keydata;
  526|  21.7k|}
evp_keymgmt_util_query_operation_name:
  579|  36.3k|{
  580|  36.3k|    const char *name = NULL;
  581|       |
  582|  36.3k|    if (keymgmt != NULL) {
  ------------------
  |  Branch (582:9): [True: 36.3k, False: 0]
  ------------------
  583|  36.3k|        if (keymgmt->query_operation_name != NULL)
  ------------------
  |  Branch (583:13): [True: 14.6k, False: 21.7k]
  ------------------
  584|  14.6k|            name = keymgmt->query_operation_name(op_id);
  585|  36.3k|        if (name == NULL)
  ------------------
  |  Branch (585:13): [True: 21.7k, False: 14.6k]
  ------------------
  586|  21.7k|            name = EVP_KEYMGMT_get0_name(keymgmt);
  587|  36.3k|    }
  588|  36.3k|    return name;
  589|  36.3k|}

evp_keymgmt_fetch_from_prov:
  277|  39.9k|{
  278|  39.9k|    return evp_generic_fetch_from_prov(prov, OSSL_OP_KEYMGMT,
  ------------------
  |  |  288|  39.9k|#define OSSL_OP_KEYMGMT 10
  ------------------
  279|  39.9k|        name, properties,
  280|  39.9k|        keymgmt_from_algorithm,
  281|  39.9k|        evp_keymgmt_up_ref,
  282|  39.9k|        evp_keymgmt_free);
  283|  39.9k|}
EVP_KEYMGMT_fetch:
  287|   445k|{
  288|   445k|    return evp_generic_fetch(ctx, OSSL_OP_KEYMGMT, algorithm, properties,
  ------------------
  |  |  288|   445k|#define OSSL_OP_KEYMGMT 10
  ------------------
  289|   445k|        keymgmt_from_algorithm,
  290|   445k|        evp_keymgmt_up_ref,
  291|   445k|        evp_keymgmt_free);
  292|   445k|}
EVP_KEYMGMT_up_ref:
  295|   776k|{
  296|   776k|    int ref = 0;
  297|       |
  298|   776k|    CRYPTO_UP_REF(&keymgmt->refcnt, &ref);
  299|   776k|    return 1;
  300|   776k|}
EVP_KEYMGMT_free:
  303|   859k|{
  304|   859k|    int ref = 0;
  305|       |
  306|   859k|    if (keymgmt == NULL)
  ------------------
  |  Branch (306:9): [True: 83.4k, False: 776k]
  ------------------
  307|  83.4k|        return;
  308|       |
  309|   776k|    CRYPTO_DOWN_REF(&keymgmt->refcnt, &ref);
  310|   776k|    if (ref > 0)
  ------------------
  |  Branch (310:9): [True: 776k, False: 0]
  ------------------
  311|   776k|        return;
  312|      0|    OPENSSL_free(keymgmt->type_name);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  313|      0|    ossl_provider_free(keymgmt->prov);
  314|      0|    CRYPTO_FREE_REF(&keymgmt->refcnt);
  315|      0|    OPENSSL_free(keymgmt);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  316|      0|}
EVP_KEYMGMT_get0_provider:
  319|  91.8k|{
  320|  91.8k|    return keymgmt->prov;
  321|  91.8k|}
evp_keymgmt_get_legacy_alg:
  329|   260k|{
  330|   260k|    return keymgmt->legacy_alg;
  331|   260k|}
EVP_KEYMGMT_get0_name:
  339|   105k|{
  340|   105k|    return keymgmt->type_name;
  341|   105k|}
EVP_KEYMGMT_is_a:
  344|   150k|{
  345|   150k|    return keymgmt != NULL
  ------------------
  |  Branch (345:12): [True: 150k, False: 0]
  ------------------
  346|   150k|        && evp_is_a(keymgmt->prov, keymgmt->name_id, NULL, name);
  ------------------
  |  Branch (346:12): [True: 40.1k, False: 110k]
  ------------------
  347|   150k|}
EVP_KEYMGMT_do_all_provided:
  352|      2|{
  353|      2|    evp_generic_do_all(libctx, OSSL_OP_KEYMGMT,
  ------------------
  |  |  288|      2|#define OSSL_OP_KEYMGMT 10
  ------------------
  354|      2|        (void (*)(void *, void *))fn, arg,
  355|      2|        keymgmt_from_algorithm,
  356|      2|        evp_keymgmt_up_ref,
  357|      2|        evp_keymgmt_free);
  358|      2|}
EVP_KEYMGMT_names_do_all:
  363|  47.3k|{
  364|  47.3k|    if (keymgmt->prov != NULL)
  ------------------
  |  Branch (364:9): [True: 47.3k, False: 0]
  ------------------
  365|  47.3k|        return evp_names_do_all(keymgmt->prov, keymgmt->name_id, fn, data);
  366|       |
  367|      0|    return 1;
  368|  47.3k|}
evp_keymgmt_newdata:
  374|  7.25k|{
  375|  7.25k|    void *provctx = ossl_provider_ctx(EVP_KEYMGMT_get0_provider(keymgmt));
  376|       |
  377|       |    /*
  378|       |     * Some providers may have a new_ex which accepts parameters. Otherwise we
  379|       |     * fall back to the old "new" which doesn't accept params.
  380|       |     */
  381|  7.25k|    if (keymgmt->new_ex == NULL) {
  ------------------
  |  Branch (381:9): [True: 7.25k, False: 0]
  ------------------
  382|  7.25k|        if (keymgmt->new == NULL)
  ------------------
  |  Branch (382:13): [True: 0, False: 7.25k]
  ------------------
  383|      0|            return NULL;
  384|  7.25k|        return keymgmt->new(provctx);
  385|  7.25k|    }
  386|      0|    return keymgmt->new_ex(provctx, params);
  387|  7.25k|}
evp_keymgmt_freedata:
  390|  47.3k|{
  391|       |    /* This is mandatory, no need to check for its presence */
  392|  47.3k|    keymgmt->free(keydata);
  393|  47.3k|}
evp_keymgmt_gen_init:
  397|  21.7k|{
  398|  21.7k|    void *provctx = ossl_provider_ctx(EVP_KEYMGMT_get0_provider(keymgmt));
  399|       |
  400|  21.7k|    if (keymgmt->gen_init == NULL)
  ------------------
  |  Branch (400:9): [True: 0, False: 21.7k]
  ------------------
  401|      0|        return NULL;
  402|  21.7k|    return keymgmt->gen_init(provctx, selection, params);
  403|  21.7k|}
evp_keymgmt_gen_set_template:
  407|  3.62k|{
  408|       |    /*
  409|       |     * It's arguable if we actually should return success in this case, as
  410|       |     * it allows the caller to set a template key, which is then ignored.
  411|       |     * However, this is how the legacy methods used to operate, so we do this in
  412|       |     * the interest of backward compatibility.
  413|       |     */
  414|  3.62k|    if (keymgmt->gen_set_template == NULL)
  ------------------
  |  Branch (414:9): [True: 3.62k, False: 0]
  ------------------
  415|  3.62k|        return 1;
  416|      0|    return keymgmt->gen_set_template(genctx, templ);
  417|  3.62k|}
evp_keymgmt_gen_set_params:
  421|  18.1k|{
  422|  18.1k|    if (keymgmt->gen_set_params == NULL)
  ------------------
  |  Branch (422:9): [True: 0, False: 18.1k]
  ------------------
  423|      0|        return 0;
  424|  18.1k|    return keymgmt->gen_set_params(genctx, params);
  425|  18.1k|}
evp_keymgmt_gen:
  455|  21.7k|{
  456|  21.7k|    void *ret;
  457|  21.7k|    const char *desc = keymgmt->description != NULL ? keymgmt->description : "";
  ------------------
  |  Branch (457:24): [True: 21.7k, False: 0]
  ------------------
  458|       |
  459|  21.7k|    if (keymgmt->gen == NULL) {
  ------------------
  |  Branch (459:9): [True: 0, False: 21.7k]
  ------------------
  460|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_NOT_SUPPORTED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_NOT_SUPPORTED,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_NOT_SUPPORTED,
  ------------------
  |  |  110|      0|#define EVP_R_PROVIDER_KEYMGMT_NOT_SUPPORTED 236
  ------------------
  461|      0|            "%s key generation:%s", keymgmt->type_name, desc);
  462|      0|        return NULL;
  463|      0|    }
  464|       |
  465|  21.7k|    ERR_set_mark();
  466|  21.7k|    ret = keymgmt->gen(genctx, cb, cbarg);
  467|  21.7k|    if (ret == NULL && ERR_count_to_mark() == 0)
  ------------------
  |  Branch (467:9): [True: 0, False: 21.7k]
  |  Branch (467:24): [True: 0, False: 0]
  ------------------
  468|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_FAILURE,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_FAILURE,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_FAILURE,
  ------------------
  |  |  109|      0|#define EVP_R_PROVIDER_KEYMGMT_FAILURE 233
  ------------------
  469|      0|            "%s key generation:%s", keymgmt->type_name, desc);
  470|  21.7k|    ERR_clear_last_mark();
  471|  21.7k|    return ret;
  472|  21.7k|}
evp_keymgmt_gen_cleanup:
  475|  21.7k|{
  476|  21.7k|    if (keymgmt->gen_cleanup != NULL)
  ------------------
  |  Branch (476:9): [True: 21.7k, False: 0]
  ------------------
  477|  21.7k|        keymgmt->gen_cleanup(genctx);
  478|  21.7k|}
evp_keymgmt_has_load:
  481|  44.2k|{
  482|  44.2k|    return keymgmt != NULL && keymgmt->load != NULL;
  ------------------
  |  Branch (482:12): [True: 44.2k, False: 0]
  |  Branch (482:31): [True: 44.2k, False: 0]
  ------------------
  483|  44.2k|}
evp_keymgmt_load:
  487|  14.6k|{
  488|  14.6k|    if (evp_keymgmt_has_load(keymgmt))
  ------------------
  |  Branch (488:9): [True: 14.6k, False: 0]
  ------------------
  489|  14.6k|        return keymgmt->load(objref, objref_sz);
  490|      0|    return NULL;
  491|  14.6k|}
evp_keymgmt_get_params:
  495|  76.3k|{
  496|  76.3k|    if (keymgmt->get_params == NULL)
  ------------------
  |  Branch (496:9): [True: 0, False: 76.3k]
  ------------------
  497|      0|        return 1;
  498|  76.3k|    return keymgmt->get_params(keydata, params);
  499|  76.3k|}
evp_keymgmt_set_params:
  512|  7.25k|{
  513|  7.25k|    if (keymgmt->set_params == NULL)
  ------------------
  |  Branch (513:9): [True: 0, False: 7.25k]
  ------------------
  514|      0|        return 1;
  515|  7.25k|    return keymgmt->set_params(keydata, params);
  516|  7.25k|}
evp_keymgmt_has:
  528|  33.1k|{
  529|       |    /* This is mandatory, no need to check for its presence */
  530|  33.1k|    return keymgmt->has(keydata, selection);
  531|  33.1k|}
evp_keymgmt_validate:
  535|  7.25k|{
  536|       |    /* We assume valid if the implementation doesn't have a function */
  537|  7.25k|    if (keymgmt->validate == NULL)
  ------------------
  |  Branch (537:9): [True: 0, False: 7.25k]
  ------------------
  538|      0|        return 1;
  539|  7.25k|    return keymgmt->validate(keydata, selection, checktype);
  540|  7.25k|}
evp_keymgmt_match:
  545|  7.46k|{
  546|       |    /* We assume no match if the implementation doesn't have a function */
  547|  7.46k|    if (keymgmt->match == NULL)
  ------------------
  |  Branch (547:9): [True: 0, False: 7.46k]
  ------------------
  548|      0|        return 0;
  549|  7.46k|    return keymgmt->match(keydata1, keydata2, selection);
  550|  7.46k|}
evp_keymgmt_import:
  554|  7.25k|{
  555|  7.25k|    if (keymgmt->import == NULL)
  ------------------
  |  Branch (555:9): [True: 0, False: 7.25k]
  ------------------
  556|      0|        return 0;
  557|  7.25k|    return keymgmt->import(keydata, selection, params);
  558|  7.25k|}
evp_keymgmt_export:
  574|  7.25k|{
  575|  7.25k|    if (keymgmt->export == NULL)
  ------------------
  |  Branch (575:9): [True: 0, False: 7.25k]
  ------------------
  576|      0|        return 0;
  577|  7.25k|    return keymgmt->export(keydata, selection, param_cb, cbarg);
  578|  7.25k|}
evp_keymgmt_dup:
  594|  3.62k|{
  595|       |    /* We assume no dup if the implementation doesn't have a function */
  596|  3.62k|    if (keymgmt->dup == NULL)
  ------------------
  |  Branch (596:9): [True: 0, False: 3.62k]
  ------------------
  597|      0|        return NULL;
  598|  3.62k|    return keymgmt->dup(keydata_from, selection);
  599|  3.62k|}
keymgmt_meth.c:keymgmt_from_algorithm:
   66|     42|{
   67|     42|    const OSSL_DISPATCH *fns = algodef->implementation;
   68|     42|    EVP_KEYMGMT *keymgmt = NULL;
   69|     42|    int setparamfncnt = 0, getparamfncnt = 0;
   70|     42|    int setgenparamfncnt = 0;
   71|     42|    int importfncnt = 0, exportfncnt = 0;
   72|     42|    int importtypesfncnt = 0, exporttypesfncnt = 0;
   73|     42|    int getgenparamfncnt = 0;
   74|       |
   75|     42|    if ((keymgmt = keymgmt_new()) == NULL)
  ------------------
  |  Branch (75:9): [True: 0, False: 42]
  ------------------
   76|      0|        return NULL;
   77|       |
   78|     42|    keymgmt->name_id = name_id;
   79|     42|    if ((keymgmt->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL) {
  ------------------
  |  Branch (79:9): [True: 0, False: 42]
  ------------------
   80|      0|        EVP_KEYMGMT_free(keymgmt);
   81|      0|        return NULL;
   82|      0|    }
   83|     42|    keymgmt->description = algodef->algorithm_description;
   84|       |
   85|    794|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (85:12): [True: 752, False: 42]
  ------------------
   86|    752|        switch (fns->function_id) {
  ------------------
  |  Branch (86:17): [True: 752, False: 0]
  ------------------
   87|     42|        case OSSL_FUNC_KEYMGMT_NEW:
  ------------------
  |  |  664|     42|#define OSSL_FUNC_KEYMGMT_NEW 1
  ------------------
  |  Branch (87:9): [True: 42, False: 710]
  ------------------
   88|     42|            if (keymgmt->new == NULL)
  ------------------
  |  Branch (88:17): [True: 42, False: 0]
  ------------------
   89|     42|                keymgmt->new = OSSL_FUNC_keymgmt_new(fns);
   90|     42|            break;
   91|      6|        case OSSL_FUNC_KEYMGMT_NEW_EX:
  ------------------
  |  |  666|      6|#define OSSL_FUNC_KEYMGMT_NEW_EX 17
  ------------------
  |  Branch (91:9): [True: 6, False: 746]
  ------------------
   92|      6|            if (keymgmt->new_ex == NULL)
  ------------------
  |  Branch (92:17): [True: 6, False: 0]
  ------------------
   93|      6|                keymgmt->new_ex = OSSL_FUNC_keymgmt_new_ex(fns);
   94|      6|            break;
   95|     39|        case OSSL_FUNC_KEYMGMT_GEN_INIT:
  ------------------
  |  |  670|     39|#define OSSL_FUNC_KEYMGMT_GEN_INIT 2
  ------------------
  |  Branch (95:9): [True: 39, False: 713]
  ------------------
   96|     39|            if (keymgmt->gen_init == NULL)
  ------------------
  |  Branch (96:17): [True: 39, False: 0]
  ------------------
   97|     39|                keymgmt->gen_init = OSSL_FUNC_keymgmt_gen_init(fns);
   98|     39|            break;
   99|      6|        case OSSL_FUNC_KEYMGMT_GEN_SET_TEMPLATE:
  ------------------
  |  |  671|      6|#define OSSL_FUNC_KEYMGMT_GEN_SET_TEMPLATE 3
  ------------------
  |  Branch (99:9): [True: 6, False: 746]
  ------------------
  100|      6|            if (keymgmt->gen_set_template == NULL)
  ------------------
  |  Branch (100:17): [True: 6, False: 0]
  ------------------
  101|      6|                keymgmt->gen_set_template = OSSL_FUNC_keymgmt_gen_set_template(fns);
  102|      6|            break;
  103|     39|        case OSSL_FUNC_KEYMGMT_GEN_SET_PARAMS:
  ------------------
  |  |  672|     39|#define OSSL_FUNC_KEYMGMT_GEN_SET_PARAMS 4
  ------------------
  |  Branch (103:9): [True: 39, False: 713]
  ------------------
  104|     39|            if (keymgmt->gen_set_params == NULL) {
  ------------------
  |  Branch (104:17): [True: 39, False: 0]
  ------------------
  105|     39|                setgenparamfncnt++;
  106|     39|                keymgmt->gen_set_params = OSSL_FUNC_keymgmt_gen_set_params(fns);
  107|     39|            }
  108|     39|            break;
  109|     39|        case OSSL_FUNC_KEYMGMT_GEN_SETTABLE_PARAMS:
  ------------------
  |  |  673|     39|#define OSSL_FUNC_KEYMGMT_GEN_SETTABLE_PARAMS 5
  ------------------
  |  Branch (109:9): [True: 39, False: 713]
  ------------------
  110|     39|            if (keymgmt->gen_settable_params == NULL) {
  ------------------
  |  Branch (110:17): [True: 39, False: 0]
  ------------------
  111|     39|                setgenparamfncnt++;
  112|     39|                keymgmt->gen_settable_params = OSSL_FUNC_keymgmt_gen_settable_params(fns);
  113|     39|            }
  114|     39|            break;
  115|      2|        case OSSL_FUNC_KEYMGMT_GEN_GET_PARAMS:
  ------------------
  |  |  676|      2|#define OSSL_FUNC_KEYMGMT_GEN_GET_PARAMS 15
  ------------------
  |  Branch (115:9): [True: 2, False: 750]
  ------------------
  116|      2|            if (keymgmt->gen_get_params == NULL) {
  ------------------
  |  Branch (116:17): [True: 2, False: 0]
  ------------------
  117|      2|                getgenparamfncnt++;
  118|      2|                keymgmt->gen_get_params = OSSL_FUNC_keymgmt_gen_get_params(fns);
  119|      2|            }
  120|      2|            break;
  121|      2|        case OSSL_FUNC_KEYMGMT_GEN_GETTABLE_PARAMS:
  ------------------
  |  |  677|      2|#define OSSL_FUNC_KEYMGMT_GEN_GETTABLE_PARAMS 16
  ------------------
  |  Branch (121:9): [True: 2, False: 750]
  ------------------
  122|      2|            if (keymgmt->gen_gettable_params == NULL) {
  ------------------
  |  Branch (122:17): [True: 2, False: 0]
  ------------------
  123|      2|                getgenparamfncnt++;
  124|      2|                keymgmt->gen_gettable_params = OSSL_FUNC_keymgmt_gen_gettable_params(fns);
  125|      2|            }
  126|      2|            break;
  127|     39|        case OSSL_FUNC_KEYMGMT_GEN:
  ------------------
  |  |  674|     39|#define OSSL_FUNC_KEYMGMT_GEN 6
  ------------------
  |  Branch (127:9): [True: 39, False: 713]
  ------------------
  128|     39|            if (keymgmt->gen == NULL)
  ------------------
  |  Branch (128:17): [True: 39, False: 0]
  ------------------
  129|     39|                keymgmt->gen = OSSL_FUNC_keymgmt_gen(fns);
  130|     39|            break;
  131|     39|        case OSSL_FUNC_KEYMGMT_GEN_CLEANUP:
  ------------------
  |  |  675|     39|#define OSSL_FUNC_KEYMGMT_GEN_CLEANUP 7
  ------------------
  |  Branch (131:9): [True: 39, False: 713]
  ------------------
  132|     39|            if (keymgmt->gen_cleanup == NULL)
  ------------------
  |  Branch (132:17): [True: 39, False: 0]
  ------------------
  133|     39|                keymgmt->gen_cleanup = OSSL_FUNC_keymgmt_gen_cleanup(fns);
  134|     39|            break;
  135|     42|        case OSSL_FUNC_KEYMGMT_FREE:
  ------------------
  |  |  702|     42|#define OSSL_FUNC_KEYMGMT_FREE 10
  ------------------
  |  Branch (135:9): [True: 42, False: 710]
  ------------------
  136|     42|            if (keymgmt->free == NULL)
  ------------------
  |  Branch (136:17): [True: 42, False: 0]
  ------------------
  137|     42|                keymgmt->free = OSSL_FUNC_keymgmt_free(fns);
  138|     42|            break;
  139|     30|        case OSSL_FUNC_KEYMGMT_LOAD:
  ------------------
  |  |  697|     30|#define OSSL_FUNC_KEYMGMT_LOAD 8
  ------------------
  |  Branch (139:9): [True: 30, False: 722]
  ------------------
  140|     30|            if (keymgmt->load == NULL)
  ------------------
  |  Branch (140:17): [True: 30, False: 0]
  ------------------
  141|     30|                keymgmt->load = OSSL_FUNC_keymgmt_load(fns);
  142|     30|            break;
  143|     39|        case OSSL_FUNC_KEYMGMT_GET_PARAMS:
  ------------------
  |  |  706|     39|#define OSSL_FUNC_KEYMGMT_GET_PARAMS 11
  ------------------
  |  Branch (143:9): [True: 39, False: 713]
  ------------------
  144|     39|            if (keymgmt->get_params == NULL) {
  ------------------
  |  Branch (144:17): [True: 39, False: 0]
  ------------------
  145|     39|                getparamfncnt++;
  146|     39|                keymgmt->get_params = OSSL_FUNC_keymgmt_get_params(fns);
  147|     39|            }
  148|     39|            break;
  149|     39|        case OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS:
  ------------------
  |  |  707|     39|#define OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS 12
  ------------------
  |  Branch (149:9): [True: 39, False: 713]
  ------------------
  150|     39|            if (keymgmt->gettable_params == NULL) {
  ------------------
  |  Branch (150:17): [True: 39, False: 0]
  ------------------
  151|     39|                getparamfncnt++;
  152|     39|                keymgmt->gettable_params = OSSL_FUNC_keymgmt_gettable_params(fns);
  153|     39|            }
  154|     39|            break;
  155|     21|        case OSSL_FUNC_KEYMGMT_SET_PARAMS:
  ------------------
  |  |  713|     21|#define OSSL_FUNC_KEYMGMT_SET_PARAMS 13
  ------------------
  |  Branch (155:9): [True: 21, False: 731]
  ------------------
  156|     21|            if (keymgmt->set_params == NULL) {
  ------------------
  |  Branch (156:17): [True: 21, False: 0]
  ------------------
  157|     21|                setparamfncnt++;
  158|     21|                keymgmt->set_params = OSSL_FUNC_keymgmt_set_params(fns);
  159|     21|            }
  160|     21|            break;
  161|     21|        case OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS:
  ------------------
  |  |  714|     21|#define OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS 14
  ------------------
  |  Branch (161:9): [True: 21, False: 731]
  ------------------
  162|     21|            if (keymgmt->settable_params == NULL) {
  ------------------
  |  Branch (162:17): [True: 21, False: 0]
  ------------------
  163|     21|                setparamfncnt++;
  164|     21|                keymgmt->settable_params = OSSL_FUNC_keymgmt_settable_params(fns);
  165|     21|            }
  166|     21|            break;
  167|      5|        case OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME:
  ------------------
  |  |  721|      5|#define OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME 20
  ------------------
  |  Branch (167:9): [True: 5, False: 747]
  ------------------
  168|      5|            if (keymgmt->query_operation_name == NULL)
  ------------------
  |  Branch (168:17): [True: 5, False: 0]
  ------------------
  169|      5|                keymgmt->query_operation_name = OSSL_FUNC_keymgmt_query_operation_name(fns);
  170|      5|            break;
  171|     42|        case OSSL_FUNC_KEYMGMT_HAS:
  ------------------
  |  |  726|     42|#define OSSL_FUNC_KEYMGMT_HAS 21
  ------------------
  |  Branch (171:9): [True: 42, False: 710]
  ------------------
  172|     42|            if (keymgmt->has == NULL)
  ------------------
  |  Branch (172:17): [True: 42, False: 0]
  ------------------
  173|     42|                keymgmt->has = OSSL_FUNC_keymgmt_has(fns);
  174|     42|            break;
  175|     35|        case OSSL_FUNC_KEYMGMT_DUP:
  ------------------
  |  |  755|     35|#define OSSL_FUNC_KEYMGMT_DUP 44
  ------------------
  |  Branch (175:9): [True: 35, False: 717]
  ------------------
  176|     35|            if (keymgmt->dup == NULL)
  ------------------
  |  Branch (176:17): [True: 35, False: 0]
  ------------------
  177|     35|                keymgmt->dup = OSSL_FUNC_keymgmt_dup(fns);
  178|     35|            break;
  179|     30|        case OSSL_FUNC_KEYMGMT_VALIDATE:
  ------------------
  |  |  730|     30|#define OSSL_FUNC_KEYMGMT_VALIDATE 22
  ------------------
  |  Branch (179:9): [True: 30, False: 722]
  ------------------
  180|     30|            if (keymgmt->validate == NULL)
  ------------------
  |  Branch (180:17): [True: 30, False: 0]
  ------------------
  181|     30|                keymgmt->validate = OSSL_FUNC_keymgmt_validate(fns);
  182|     30|            break;
  183|     39|        case OSSL_FUNC_KEYMGMT_MATCH:
  ------------------
  |  |  734|     39|#define OSSL_FUNC_KEYMGMT_MATCH 23
  ------------------
  |  Branch (183:9): [True: 39, False: 713]
  ------------------
  184|     39|            if (keymgmt->match == NULL)
  ------------------
  |  Branch (184:17): [True: 39, False: 0]
  ------------------
  185|     39|                keymgmt->match = OSSL_FUNC_keymgmt_match(fns);
  186|     39|            break;
  187|     39|        case OSSL_FUNC_KEYMGMT_IMPORT:
  ------------------
  |  |  740|     39|#define OSSL_FUNC_KEYMGMT_IMPORT 40
  ------------------
  |  Branch (187:9): [True: 39, False: 713]
  ------------------
  188|     39|            if (keymgmt->import == NULL) {
  ------------------
  |  Branch (188:17): [True: 39, False: 0]
  ------------------
  189|     39|                importfncnt++;
  190|     39|                keymgmt->import = OSSL_FUNC_keymgmt_import(fns);
  191|     39|            }
  192|     39|            break;
  193|     39|        case OSSL_FUNC_KEYMGMT_IMPORT_TYPES:
  ------------------
  |  |  741|     39|#define OSSL_FUNC_KEYMGMT_IMPORT_TYPES 41
  ------------------
  |  Branch (193:9): [True: 39, False: 713]
  ------------------
  194|     39|            if (keymgmt->import_types == NULL) {
  ------------------
  |  Branch (194:17): [True: 39, False: 0]
  ------------------
  195|     39|                if (importtypesfncnt == 0)
  ------------------
  |  Branch (195:21): [True: 39, False: 0]
  ------------------
  196|     39|                    importfncnt++;
  197|     39|                importtypesfncnt++;
  198|     39|                keymgmt->import_types = OSSL_FUNC_keymgmt_import_types(fns);
  199|     39|            }
  200|     39|            break;
  201|      0|        case OSSL_FUNC_KEYMGMT_IMPORT_TYPES_EX:
  ------------------
  |  |  760|      0|#define OSSL_FUNC_KEYMGMT_IMPORT_TYPES_EX 45
  ------------------
  |  Branch (201:9): [True: 0, False: 752]
  ------------------
  202|      0|            if (keymgmt->import_types_ex == NULL) {
  ------------------
  |  Branch (202:17): [True: 0, False: 0]
  ------------------
  203|      0|                if (importtypesfncnt == 0)
  ------------------
  |  Branch (203:21): [True: 0, False: 0]
  ------------------
  204|      0|                    importfncnt++;
  205|      0|                importtypesfncnt++;
  206|      0|                keymgmt->import_types_ex = OSSL_FUNC_keymgmt_import_types_ex(fns);
  207|      0|            }
  208|      0|            break;
  209|     39|        case OSSL_FUNC_KEYMGMT_EXPORT:
  ------------------
  |  |  742|     39|#define OSSL_FUNC_KEYMGMT_EXPORT 42
  ------------------
  |  Branch (209:9): [True: 39, False: 713]
  ------------------
  210|     39|            if (keymgmt->export == NULL) {
  ------------------
  |  Branch (210:17): [True: 39, False: 0]
  ------------------
  211|     39|                exportfncnt++;
  212|     39|                keymgmt->export = OSSL_FUNC_keymgmt_export(fns);
  213|     39|            }
  214|     39|            break;
  215|     39|        case OSSL_FUNC_KEYMGMT_EXPORT_TYPES:
  ------------------
  |  |  743|     39|#define OSSL_FUNC_KEYMGMT_EXPORT_TYPES 43
  ------------------
  |  Branch (215:9): [True: 39, False: 713]
  ------------------
  216|     39|            if (keymgmt->export_types == NULL) {
  ------------------
  |  Branch (216:17): [True: 39, False: 0]
  ------------------
  217|     39|                if (exporttypesfncnt == 0)
  ------------------
  |  Branch (217:21): [True: 39, False: 0]
  ------------------
  218|     39|                    exportfncnt++;
  219|     39|                exporttypesfncnt++;
  220|     39|                keymgmt->export_types = OSSL_FUNC_keymgmt_export_types(fns);
  221|     39|            }
  222|     39|            break;
  223|      0|        case OSSL_FUNC_KEYMGMT_EXPORT_TYPES_EX:
  ------------------
  |  |  761|      0|#define OSSL_FUNC_KEYMGMT_EXPORT_TYPES_EX 46
  ------------------
  |  Branch (223:9): [True: 0, False: 752]
  ------------------
  224|      0|            if (keymgmt->export_types_ex == NULL) {
  ------------------
  |  Branch (224:17): [True: 0, False: 0]
  ------------------
  225|      0|                if (exporttypesfncnt == 0)
  ------------------
  |  Branch (225:21): [True: 0, False: 0]
  ------------------
  226|      0|                    exportfncnt++;
  227|      0|                exporttypesfncnt++;
  228|      0|                keymgmt->export_types_ex = OSSL_FUNC_keymgmt_export_types_ex(fns);
  229|      0|            }
  230|      0|            break;
  231|    752|        }
  232|    752|    }
  233|       |    /*
  234|       |     * Try to check that the method is sensible.
  235|       |     * At least one constructor and the destructor are MANDATORY
  236|       |     * The functions 'has' is MANDATORY
  237|       |     * It makes no sense being able to free stuff if you can't create it.
  238|       |     * It makes no sense providing OSSL_PARAM descriptors for import and
  239|       |     * export if you can't import or export.
  240|       |     */
  241|     42|    if (keymgmt->free == NULL
  ------------------
  |  Branch (241:9): [True: 0, False: 42]
  ------------------
  242|     42|        || (keymgmt->new == NULL
  ------------------
  |  Branch (242:13): [True: 0, False: 42]
  ------------------
  243|      0|            && keymgmt->new_ex == NULL
  ------------------
  |  Branch (243:16): [True: 0, False: 0]
  ------------------
  244|      0|            && keymgmt->gen == NULL
  ------------------
  |  Branch (244:16): [True: 0, False: 0]
  ------------------
  245|      0|            && keymgmt->load == NULL)
  ------------------
  |  Branch (245:16): [True: 0, False: 0]
  ------------------
  246|     42|        || keymgmt->has == NULL
  ------------------
  |  Branch (246:12): [True: 0, False: 42]
  ------------------
  247|     42|        || (getparamfncnt != 0 && getparamfncnt != 2)
  ------------------
  |  Branch (247:13): [True: 39, False: 3]
  |  Branch (247:35): [True: 0, False: 39]
  ------------------
  248|     42|        || (setparamfncnt != 0 && setparamfncnt != 2)
  ------------------
  |  Branch (248:13): [True: 21, False: 21]
  |  Branch (248:35): [True: 0, False: 21]
  ------------------
  249|     42|        || (setgenparamfncnt != 0 && setgenparamfncnt != 2)
  ------------------
  |  Branch (249:13): [True: 39, False: 3]
  |  Branch (249:38): [True: 0, False: 39]
  ------------------
  250|     42|        || (getgenparamfncnt != 0 && getgenparamfncnt != 2)
  ------------------
  |  Branch (250:13): [True: 2, False: 40]
  |  Branch (250:38): [True: 0, False: 2]
  ------------------
  251|     42|        || (importfncnt != 0 && importfncnt != 2)
  ------------------
  |  Branch (251:13): [True: 39, False: 3]
  |  Branch (251:33): [True: 0, False: 39]
  ------------------
  252|     42|        || (exportfncnt != 0 && exportfncnt != 2)
  ------------------
  |  Branch (252:13): [True: 39, False: 3]
  |  Branch (252:33): [True: 0, False: 39]
  ------------------
  253|     42|        || (keymgmt->gen != NULL
  ------------------
  |  Branch (253:13): [True: 39, False: 3]
  ------------------
  254|     39|            && (keymgmt->gen_init == NULL
  ------------------
  |  Branch (254:17): [True: 0, False: 39]
  ------------------
  255|     39|                || keymgmt->gen_cleanup == NULL))) {
  ------------------
  |  Branch (255:20): [True: 0, False: 39]
  ------------------
  256|      0|        EVP_KEYMGMT_free(keymgmt);
  257|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  258|      0|        return NULL;
  259|      0|    }
  260|     42|    keymgmt->prov = prov;
  261|     42|    if (prov != NULL && !ossl_provider_up_ref(prov)) {
  ------------------
  |  Branch (261:9): [True: 42, False: 0]
  |  Branch (261:25): [True: 0, False: 42]
  ------------------
  262|      0|        EVP_KEYMGMT_free(keymgmt);
  263|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  264|      0|        return NULL;
  265|      0|    }
  266|       |
  267|     42|#ifndef FIPS_MODULE
  268|     42|    keymgmt->legacy_alg = get_legacy_alg_type_from_keymgmt(keymgmt);
  269|     42|#endif
  270|       |
  271|     42|    return keymgmt;
  272|     42|}
keymgmt_meth.c:keymgmt_new:
   31|     42|{
   32|     42|    EVP_KEYMGMT *keymgmt = NULL;
   33|       |
   34|     42|    if ((keymgmt = OPENSSL_zalloc(sizeof(*keymgmt))) == NULL)
  ------------------
  |  |  109|     42|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (34:9): [True: 0, False: 42]
  ------------------
   35|      0|        return NULL;
   36|     42|    if (!CRYPTO_NEW_REF(&keymgmt->refcnt, 1)) {
  ------------------
  |  Branch (36:9): [True: 0, False: 42]
  ------------------
   37|      0|        EVP_KEYMGMT_free(keymgmt);
   38|      0|        return NULL;
   39|      0|    }
   40|     42|    return keymgmt;
   41|     42|}
keymgmt_meth.c:get_legacy_alg_type_from_keymgmt:
   54|     42|{
   55|     42|    int type = NID_undef;
  ------------------
  |  |   18|     42|#define NID_undef                       0
  ------------------
   56|       |
   57|     42|    EVP_KEYMGMT_names_do_all(keymgmt, help_get_legacy_alg_type_from_keymgmt,
   58|     42|        &type);
   59|     42|    return type;
   60|     42|}
keymgmt_meth.c:help_get_legacy_alg_type_from_keymgmt:
   46|    109|{
   47|    109|    int *type = arg;
   48|       |
   49|    109|    if (*type == NID_undef)
  ------------------
  |  |   18|    109|#define NID_undef                       0
  ------------------
  |  Branch (49:9): [True: 86, False: 23]
  ------------------
   50|     86|        *type = evp_pkey_name2type(keytype);
   51|    109|}
keymgmt_meth.c:evp_keymgmt_up_ref:
   26|   485k|{
   27|   485k|    return EVP_KEYMGMT_up_ref(data);
   28|   485k|}
keymgmt_meth.c:evp_keymgmt_free:
   21|     42|{
   22|     42|    EVP_KEYMGMT_free(data);
   23|     42|}

EVP_blake2b512:
   23|      2|{
   24|      2|    return &blake2b_md;
   25|      2|}
EVP_blake2s256:
   37|      2|{
   38|      2|    return &blake2s_md;
   39|      2|}

EVP_md4:
   29|      2|{
   30|      2|    return &md4_md;
   31|      2|}

EVP_md5:
   29|      2|{
   30|      2|    return &md5_md;
   31|      2|}

EVP_md5_sha1:
   30|      2|{
   31|      2|    return &md5_sha1_md;
   32|      2|}

EVP_mdc2:
   29|      2|{
   30|      2|    return &mdc2_md;
   31|      2|}

EVP_ripemd160:
   29|      2|{
   30|      2|    return &ripemd160_md;
   31|      2|}

EVP_sha1:
   30|  10.8k|{
   31|  10.8k|    return &sha1_md;
   32|  10.8k|}
EVP_sha224:
   44|      2|{
   45|      2|    return &sha224_md;
   46|      2|}
EVP_sha256:
   58|  3.56k|{
   59|  3.56k|    return &sha256_md;
   60|  3.56k|}
EVP_sha512_224:
   72|      2|{
   73|      2|    return &sha512_224_md;
   74|      2|}
EVP_sha512_256:
   86|      2|{
   87|      2|    return &sha512_256_md;
   88|      2|}
EVP_sha384:
  100|      2|{
  101|      2|    return &sha384_md;
  102|      2|}
EVP_sha512:
  114|      2|{
  115|      2|    return &sha512_md;
  116|      2|}
EVP_sha3_224:
  120|      2|    {                                              \
  121|      2|        static const EVP_MD sha3_##bitlen##_md = { \
  122|      2|            NID_sha3_##bitlen,                     \
  ------------------
  |  | 3321|      2|#define NID_sha3_224            1096
  ------------------
  123|      2|            NID_RSA_SHA3_##bitlen,                 \
  ------------------
  |  | 3443|      2|#define NID_RSA_SHA3_224                1116
  ------------------
  124|      2|            bitlen / 8,                            \
  125|      2|            EVP_MD_FLAG_DIGALGID_ABSENT,           \
  ------------------
  |  |  147|      2|#define EVP_MD_FLAG_DIGALGID_ABSENT 0x0008
  ------------------
  126|      2|            EVP_ORIG_GLOBAL,                       \
  ------------------
  |  |  187|      2|#define EVP_ORIG_GLOBAL 1
  ------------------
  127|      2|            (KECCAK1600_WIDTH - bitlen * 2) / 8    \
  ------------------
  |  |   18|      2|#define KECCAK1600_WIDTH 1600
  ------------------
  128|      2|        };                                         \
  129|      2|        return &sha3_##bitlen##_md;                \
  130|      2|    }
EVP_sha3_256:
  120|      2|    {                                              \
  121|      2|        static const EVP_MD sha3_##bitlen##_md = { \
  122|      2|            NID_sha3_##bitlen,                     \
  ------------------
  |  | 3326|      2|#define NID_sha3_256            1097
  ------------------
  123|      2|            NID_RSA_SHA3_##bitlen,                 \
  ------------------
  |  | 3448|      2|#define NID_RSA_SHA3_256                1117
  ------------------
  124|      2|            bitlen / 8,                            \
  125|      2|            EVP_MD_FLAG_DIGALGID_ABSENT,           \
  ------------------
  |  |  147|      2|#define EVP_MD_FLAG_DIGALGID_ABSENT 0x0008
  ------------------
  126|      2|            EVP_ORIG_GLOBAL,                       \
  ------------------
  |  |  187|      2|#define EVP_ORIG_GLOBAL 1
  ------------------
  127|      2|            (KECCAK1600_WIDTH - bitlen * 2) / 8    \
  ------------------
  |  |   18|      2|#define KECCAK1600_WIDTH 1600
  ------------------
  128|      2|        };                                         \
  129|      2|        return &sha3_##bitlen##_md;                \
  130|      2|    }
EVP_sha3_384:
  120|      2|    {                                              \
  121|      2|        static const EVP_MD sha3_##bitlen##_md = { \
  122|      2|            NID_sha3_##bitlen,                     \
  ------------------
  |  | 3331|      2|#define NID_sha3_384            1098
  ------------------
  123|      2|            NID_RSA_SHA3_##bitlen,                 \
  ------------------
  |  | 3453|      2|#define NID_RSA_SHA3_384                1118
  ------------------
  124|      2|            bitlen / 8,                            \
  125|      2|            EVP_MD_FLAG_DIGALGID_ABSENT,           \
  ------------------
  |  |  147|      2|#define EVP_MD_FLAG_DIGALGID_ABSENT 0x0008
  ------------------
  126|      2|            EVP_ORIG_GLOBAL,                       \
  ------------------
  |  |  187|      2|#define EVP_ORIG_GLOBAL 1
  ------------------
  127|      2|            (KECCAK1600_WIDTH - bitlen * 2) / 8    \
  ------------------
  |  |   18|      2|#define KECCAK1600_WIDTH 1600
  ------------------
  128|      2|        };                                         \
  129|      2|        return &sha3_##bitlen##_md;                \
  130|      2|    }
EVP_sha3_512:
  120|      2|    {                                              \
  121|      2|        static const EVP_MD sha3_##bitlen##_md = { \
  122|      2|            NID_sha3_##bitlen,                     \
  ------------------
  |  | 3336|      2|#define NID_sha3_512            1099
  ------------------
  123|      2|            NID_RSA_SHA3_##bitlen,                 \
  ------------------
  |  | 3458|      2|#define NID_RSA_SHA3_512                1119
  ------------------
  124|      2|            bitlen / 8,                            \
  125|      2|            EVP_MD_FLAG_DIGALGID_ABSENT,           \
  ------------------
  |  |  147|      2|#define EVP_MD_FLAG_DIGALGID_ABSENT 0x0008
  ------------------
  126|      2|            EVP_ORIG_GLOBAL,                       \
  ------------------
  |  |  187|      2|#define EVP_ORIG_GLOBAL 1
  ------------------
  127|      2|            (KECCAK1600_WIDTH - bitlen * 2) / 8    \
  ------------------
  |  |   18|      2|#define KECCAK1600_WIDTH 1600
  ------------------
  128|      2|        };                                         \
  129|      2|        return &sha3_##bitlen##_md;                \
  130|      2|    }
EVP_shake128:
  133|      2|    {                                                      \
  134|      2|        static const EVP_MD shake##bitlen##_md = {         \
  135|      2|            NID_shake##bitlen,                             \
  ------------------
  |  | 3341|      2|#define NID_shake128            1100
  ------------------
  136|      2|            0,                                             \
  137|      2|            bitlen / 8,                                    \
  138|      2|            EVP_MD_FLAG_XOF | EVP_MD_FLAG_DIGALGID_ABSENT, \
  ------------------
  |  |  135|      2|#define EVP_MD_FLAG_XOF 0x0002
  ------------------
                          EVP_MD_FLAG_XOF | EVP_MD_FLAG_DIGALGID_ABSENT, \
  ------------------
  |  |  147|      2|#define EVP_MD_FLAG_DIGALGID_ABSENT 0x0008
  ------------------
  139|      2|            EVP_ORIG_GLOBAL,                               \
  ------------------
  |  |  187|      2|#define EVP_ORIG_GLOBAL 1
  ------------------
  140|      2|            (KECCAK1600_WIDTH - bitlen * 2) / 8            \
  ------------------
  |  |   18|      2|#define KECCAK1600_WIDTH 1600
  ------------------
  141|      2|        };                                                 \
  142|      2|        return &shake##bitlen##_md;                        \
  143|      2|    }
EVP_shake256:
  133|      2|    {                                                      \
  134|      2|        static const EVP_MD shake##bitlen##_md = {         \
  135|      2|            NID_shake##bitlen,                             \
  ------------------
  |  | 3346|      2|#define NID_shake256            1101
  ------------------
  136|      2|            0,                                             \
  137|      2|            bitlen / 8,                                    \
  138|      2|            EVP_MD_FLAG_XOF | EVP_MD_FLAG_DIGALGID_ABSENT, \
  ------------------
  |  |  135|      2|#define EVP_MD_FLAG_XOF 0x0002
  ------------------
                          EVP_MD_FLAG_XOF | EVP_MD_FLAG_DIGALGID_ABSENT, \
  ------------------
  |  |  147|      2|#define EVP_MD_FLAG_DIGALGID_ABSENT 0x0008
  ------------------
  139|      2|            EVP_ORIG_GLOBAL,                               \
  ------------------
  |  |  187|      2|#define EVP_ORIG_GLOBAL 1
  ------------------
  140|      2|            (KECCAK1600_WIDTH - bitlen * 2) / 8            \
  ------------------
  |  |   18|      2|#define KECCAK1600_WIDTH 1600
  ------------------
  141|      2|        };                                                 \
  142|      2|        return &shake##bitlen##_md;                        \
  143|      2|    }

EVP_whirlpool:
   29|      2|{
   30|      2|    return &whirlpool_md;
   31|      2|}

EVP_DigestSignInit_ex:
  296|  7.25k|{
  297|       |    return do_sigver_init(ctx, pctx, NULL, mdname, libctx, props, pkey, 0,
  298|  7.25k|        params);
  299|  7.25k|}
EVP_DigestVerifyInit_ex:
  314|  3.62k|{
  315|       |    return do_sigver_init(ctx, pctx, NULL, mdname, libctx, props, pkey, 1,
  316|  3.62k|        params);
  317|  3.62k|}
EVP_DigestSignUpdate:
  329|  3.62k|{
  330|  3.62k|    EVP_SIGNATURE *signature;
  331|  3.62k|    const char *desc;
  332|  3.62k|    EVP_PKEY_CTX *pctx = ctx->pctx;
  333|  3.62k|    int ret;
  334|       |
  335|  3.62k|    if ((ctx->flags & EVP_MD_CTX_FLAG_FINALISED) != 0) {
  ------------------
  |  |   33|  3.62k|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  |  Branch (335:9): [True: 0, False: 3.62k]
  ------------------
  336|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  337|      0|        return 0;
  338|      0|    }
  339|       |
  340|  3.62k|    if (pctx == NULL)
  ------------------
  |  Branch (340:9): [True: 0, False: 3.62k]
  ------------------
  341|      0|        return EVP_DigestUpdate(ctx, data, dsize);
  342|       |
  343|  3.62k|    if (pctx->operation != EVP_PKEY_OP_SIGNCTX
  ------------------
  |  | 1534|  7.25k|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  ------------------
  |  Branch (343:9): [True: 0, False: 3.62k]
  ------------------
  344|  3.62k|        || pctx->op.sig.algctx == NULL
  ------------------
  |  Branch (344:12): [True: 0, False: 3.62k]
  ------------------
  345|  3.62k|        || pctx->op.sig.signature == NULL) {
  ------------------
  |  Branch (345:12): [True: 0, False: 3.62k]
  ------------------
  346|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  347|      0|        return 0;
  348|      0|    }
  349|       |
  350|  3.62k|    signature = pctx->op.sig.signature;
  351|  3.62k|    desc = signature->description != NULL ? signature->description : "";
  ------------------
  |  Branch (351:12): [True: 0, False: 3.62k]
  ------------------
  352|  3.62k|    if (signature->digest_sign_update == NULL) {
  ------------------
  |  Branch (352:9): [True: 0, False: 3.62k]
  ------------------
  353|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED,
  ------------------
  |  |  112|      0|#define EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED 237
  ------------------
  354|      0|            "%s digest_sign_update:%s", signature->type_name, desc);
  355|      0|        return 0;
  356|      0|    }
  357|       |
  358|  3.62k|    ERR_set_mark();
  359|  3.62k|    ret = signature->digest_sign_update(pctx->op.sig.algctx, data, dsize);
  360|  3.62k|    if (ret <= 0 && ERR_count_to_mark() == 0)
  ------------------
  |  Branch (360:9): [True: 0, False: 3.62k]
  |  Branch (360:21): [True: 0, False: 0]
  ------------------
  361|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_FAILURE,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_FAILURE,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_FAILURE,
  ------------------
  |  |  111|      0|#define EVP_R_PROVIDER_SIGNATURE_FAILURE 234
  ------------------
  362|      0|            "%s digest_sign_update:%s", signature->type_name, desc);
  363|  3.62k|    ERR_clear_last_mark();
  364|  3.62k|    return ret;
  365|  3.62k|}
EVP_DigestVerifyUpdate:
  368|  3.62k|{
  369|  3.62k|    EVP_SIGNATURE *signature;
  370|  3.62k|    const char *desc;
  371|  3.62k|    EVP_PKEY_CTX *pctx = ctx->pctx;
  372|  3.62k|    int ret;
  373|       |
  374|  3.62k|    if ((ctx->flags & EVP_MD_CTX_FLAG_FINALISED) != 0) {
  ------------------
  |  |   33|  3.62k|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  |  Branch (374:9): [True: 0, False: 3.62k]
  ------------------
  375|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  376|      0|        return 0;
  377|      0|    }
  378|       |
  379|  3.62k|    if (pctx == NULL
  ------------------
  |  Branch (379:9): [True: 0, False: 3.62k]
  ------------------
  380|  3.62k|        || pctx->operation != EVP_PKEY_OP_VERIFYCTX
  ------------------
  |  | 1535|  7.25k|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  ------------------
  |  Branch (380:12): [True: 0, False: 3.62k]
  ------------------
  381|  3.62k|        || pctx->op.sig.algctx == NULL
  ------------------
  |  Branch (381:12): [True: 0, False: 3.62k]
  ------------------
  382|  3.62k|        || pctx->op.sig.signature == NULL)
  ------------------
  |  Branch (382:12): [True: 0, False: 3.62k]
  ------------------
  383|      0|        return EVP_DigestUpdate(ctx, data, dsize);
  384|       |
  385|  3.62k|    signature = pctx->op.sig.signature;
  386|  3.62k|    desc = signature->description != NULL ? signature->description : "";
  ------------------
  |  Branch (386:12): [True: 0, False: 3.62k]
  ------------------
  387|  3.62k|    if (signature->digest_verify_update == NULL) {
  ------------------
  |  Branch (387:9): [True: 0, False: 3.62k]
  ------------------
  388|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED,
  ------------------
  |  |  112|      0|#define EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED 237
  ------------------
  389|      0|            "%s digest_verify_update:%s", signature->type_name, desc);
  390|      0|        return 0;
  391|      0|    }
  392|       |
  393|  3.62k|    ERR_set_mark();
  394|  3.62k|    ret = signature->digest_verify_update(pctx->op.sig.algctx, data, dsize);
  395|  3.62k|    if (ret <= 0 && ERR_count_to_mark() == 0)
  ------------------
  |  Branch (395:9): [True: 0, False: 3.62k]
  |  Branch (395:21): [True: 0, False: 0]
  ------------------
  396|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_FAILURE,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_FAILURE,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_FAILURE,
  ------------------
  |  |  111|      0|#define EVP_R_PROVIDER_SIGNATURE_FAILURE 234
  ------------------
  397|      0|            "%s digest_verify_update:%s", signature->type_name, desc);
  398|  3.62k|    ERR_clear_last_mark();
  399|  3.62k|    return ret;
  400|  3.62k|}
EVP_DigestSignFinal:
  404|  7.25k|{
  405|  7.25k|    EVP_SIGNATURE *signature;
  406|  7.25k|    const char *desc;
  407|  7.25k|    int r = 0;
  408|  7.25k|    EVP_PKEY_CTX *dctx = NULL, *pctx = ctx->pctx;
  409|       |
  410|  7.25k|    if ((ctx->flags & EVP_MD_CTX_FLAG_FINALISED) != 0) {
  ------------------
  |  |   33|  7.25k|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  |  Branch (410:9): [True: 0, False: 7.25k]
  ------------------
  411|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  412|      0|        return 0;
  413|      0|    }
  414|       |
  415|  7.25k|    if (pctx == NULL
  ------------------
  |  Branch (415:9): [True: 0, False: 7.25k]
  ------------------
  416|  7.25k|        || pctx->operation != EVP_PKEY_OP_SIGNCTX
  ------------------
  |  | 1534|  14.5k|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  ------------------
  |  Branch (416:12): [True: 0, False: 7.25k]
  ------------------
  417|  7.25k|        || pctx->op.sig.algctx == NULL
  ------------------
  |  Branch (417:12): [True: 0, False: 7.25k]
  ------------------
  418|  7.25k|        || pctx->op.sig.signature == NULL) {
  ------------------
  |  Branch (418:12): [True: 0, False: 7.25k]
  ------------------
  419|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  420|      0|        return 0;
  421|      0|    }
  422|       |
  423|  7.25k|    signature = pctx->op.sig.signature;
  424|  7.25k|    desc = signature->description != NULL ? signature->description : "";
  ------------------
  |  Branch (424:12): [True: 0, False: 7.25k]
  ------------------
  425|  7.25k|    if (signature->digest_sign_final == NULL) {
  ------------------
  |  Branch (425:9): [True: 0, False: 7.25k]
  ------------------
  426|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED,
  ------------------
  |  |  112|      0|#define EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED 237
  ------------------
  427|      0|            "%s digest_sign_final:%s", signature->type_name, desc);
  428|      0|        return 0;
  429|      0|    }
  430|       |
  431|  7.25k|    if (sigret != NULL && (ctx->flags & EVP_MD_CTX_FLAG_FINALISE) == 0) {
  ------------------
  |  |  202|  3.62k|#define EVP_MD_CTX_FLAG_FINALISE 0x0200
  ------------------
  |  Branch (431:9): [True: 3.62k, False: 3.62k]
  |  Branch (431:27): [True: 3.62k, False: 0]
  ------------------
  432|       |        /* try dup */
  433|  3.62k|        dctx = EVP_PKEY_CTX_dup(pctx);
  434|  3.62k|        if (dctx != NULL)
  ------------------
  |  Branch (434:13): [True: 3.62k, False: 0]
  ------------------
  435|  3.62k|            pctx = dctx;
  436|  3.62k|    }
  437|       |
  438|  7.25k|    ERR_set_mark();
  439|  7.25k|    r = signature->digest_sign_final(pctx->op.sig.algctx, sigret, siglen,
  440|  7.25k|        sigret == NULL ? 0 : *siglen);
  ------------------
  |  Branch (440:9): [True: 3.62k, False: 3.62k]
  ------------------
  441|  7.25k|    if (!r && ERR_count_to_mark() == 0)
  ------------------
  |  Branch (441:9): [True: 0, False: 7.25k]
  |  Branch (441:15): [True: 0, False: 0]
  ------------------
  442|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_FAILURE,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_FAILURE,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_FAILURE,
  ------------------
  |  |  111|      0|#define EVP_R_PROVIDER_SIGNATURE_FAILURE 234
  ------------------
  443|      0|            "%s digest_sign_final:%s", signature->type_name, desc);
  444|  7.25k|    ERR_clear_last_mark();
  445|  7.25k|    if (dctx == NULL && sigret != NULL)
  ------------------
  |  Branch (445:9): [True: 3.62k, False: 3.62k]
  |  Branch (445:25): [True: 0, False: 3.62k]
  ------------------
  446|      0|        ctx->flags |= EVP_MD_CTX_FLAG_FINALISED;
  ------------------
  |  |   33|      0|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  447|  7.25k|    else
  448|  7.25k|        EVP_PKEY_CTX_free(dctx);
  449|  7.25k|    return r;
  450|  7.25k|}
EVP_DigestSign:
  454|  7.25k|{
  455|  7.25k|    EVP_PKEY_CTX *pctx = ctx->pctx;
  456|  7.25k|    int ret;
  457|       |
  458|  7.25k|    if (pctx == NULL) {
  ------------------
  |  Branch (458:9): [True: 0, False: 7.25k]
  ------------------
  459|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  460|      0|        return 0;
  461|      0|    }
  462|       |
  463|  7.25k|    if ((ctx->flags & EVP_MD_CTX_FLAG_FINALISED) != 0) {
  ------------------
  |  |   33|  7.25k|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  |  Branch (463:9): [True: 0, False: 7.25k]
  ------------------
  464|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  465|      0|        return 0;
  466|      0|    }
  467|       |
  468|  7.25k|    if (pctx->operation == EVP_PKEY_OP_SIGNCTX
  ------------------
  |  | 1534|  14.5k|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  ------------------
  |  Branch (468:9): [True: 7.25k, False: 0]
  ------------------
  469|  7.25k|        && pctx->op.sig.algctx != NULL
  ------------------
  |  Branch (469:12): [True: 7.25k, False: 0]
  ------------------
  470|  7.25k|        && pctx->op.sig.signature != NULL) {
  ------------------
  |  Branch (470:12): [True: 7.25k, False: 0]
  ------------------
  471|  7.25k|        EVP_SIGNATURE *signature = pctx->op.sig.signature;
  472|       |
  473|  7.25k|        if (signature->digest_sign != NULL) {
  ------------------
  |  Branch (473:13): [True: 0, False: 7.25k]
  ------------------
  474|      0|            const char *desc = signature->description != NULL ? signature->description : "";
  ------------------
  |  Branch (474:32): [True: 0, False: 0]
  ------------------
  475|       |
  476|      0|            if (sigret != NULL)
  ------------------
  |  Branch (476:17): [True: 0, False: 0]
  ------------------
  477|      0|                ctx->flags |= EVP_MD_CTX_FLAG_FINALISED;
  ------------------
  |  |   33|      0|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  478|      0|            ERR_set_mark();
  479|      0|            ret = signature->digest_sign(pctx->op.sig.algctx, sigret, siglen,
  480|      0|                sigret == NULL ? 0 : *siglen, tbs, tbslen);
  ------------------
  |  Branch (480:17): [True: 0, False: 0]
  ------------------
  481|      0|            if (ret <= 0 && ERR_count_to_mark() == 0)
  ------------------
  |  Branch (481:17): [True: 0, False: 0]
  |  Branch (481:29): [True: 0, False: 0]
  ------------------
  482|      0|                ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_FAILURE,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                              ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_FAILURE,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                              ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_FAILURE,
  ------------------
  |  |  111|      0|#define EVP_R_PROVIDER_SIGNATURE_FAILURE 234
  ------------------
  483|      0|                    "%s digest_sign:%s", signature->type_name, desc);
  484|      0|            ERR_clear_last_mark();
  485|      0|            return ret;
  486|      0|        }
  487|  7.25k|    }
  488|       |
  489|  7.25k|    if (sigret != NULL && EVP_DigestSignUpdate(ctx, tbs, tbslen) <= 0)
  ------------------
  |  Branch (489:9): [True: 3.62k, False: 3.62k]
  |  Branch (489:27): [True: 0, False: 3.62k]
  ------------------
  490|      0|        return 0;
  491|  7.25k|    return EVP_DigestSignFinal(ctx, sigret, siglen);
  492|  7.25k|}
EVP_DigestVerifyFinal:
  496|  3.62k|{
  497|  3.62k|    EVP_SIGNATURE *signature;
  498|  3.62k|    const char *desc;
  499|  3.62k|    int r = 0;
  500|  3.62k|    EVP_PKEY_CTX *dctx = NULL, *pctx = ctx->pctx;
  501|       |
  502|  3.62k|    if ((ctx->flags & EVP_MD_CTX_FLAG_FINALISED) != 0) {
  ------------------
  |  |   33|  3.62k|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  |  Branch (502:9): [True: 0, False: 3.62k]
  ------------------
  503|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  504|      0|        return 0;
  505|      0|    }
  506|       |
  507|  3.62k|    if (pctx == NULL
  ------------------
  |  Branch (507:9): [True: 0, False: 3.62k]
  ------------------
  508|  3.62k|        || pctx->operation != EVP_PKEY_OP_VERIFYCTX
  ------------------
  |  | 1535|  7.25k|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  ------------------
  |  Branch (508:12): [True: 0, False: 3.62k]
  ------------------
  509|  3.62k|        || pctx->op.sig.algctx == NULL
  ------------------
  |  Branch (509:12): [True: 0, False: 3.62k]
  ------------------
  510|  3.62k|        || pctx->op.sig.signature == NULL) {
  ------------------
  |  Branch (510:12): [True: 0, False: 3.62k]
  ------------------
  511|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  512|      0|        return 0;
  513|      0|    }
  514|       |
  515|  3.62k|    signature = pctx->op.sig.signature;
  516|  3.62k|    desc = signature->description != NULL ? signature->description : "";
  ------------------
  |  Branch (516:12): [True: 0, False: 3.62k]
  ------------------
  517|  3.62k|    if (signature->digest_verify_final == NULL) {
  ------------------
  |  Branch (517:9): [True: 0, False: 3.62k]
  ------------------
  518|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED,
  ------------------
  |  |  112|      0|#define EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED 237
  ------------------
  519|      0|            "%s digest_verify_final:%s", signature->type_name, desc);
  520|      0|        return 0;
  521|      0|    }
  522|       |
  523|  3.62k|    if ((ctx->flags & EVP_MD_CTX_FLAG_FINALISE) == 0) {
  ------------------
  |  |  202|  3.62k|#define EVP_MD_CTX_FLAG_FINALISE 0x0200
  ------------------
  |  Branch (523:9): [True: 3.62k, False: 0]
  ------------------
  524|       |        /* try dup */
  525|  3.62k|        dctx = EVP_PKEY_CTX_dup(pctx);
  526|  3.62k|        if (dctx != NULL)
  ------------------
  |  Branch (526:13): [True: 3.62k, False: 0]
  ------------------
  527|  3.62k|            pctx = dctx;
  528|  3.62k|    }
  529|       |
  530|  3.62k|    ERR_set_mark();
  531|  3.62k|    r = signature->digest_verify_final(pctx->op.sig.algctx, sig, siglen);
  532|  3.62k|    if (!r && ERR_count_to_mark() == 0)
  ------------------
  |  Branch (532:9): [True: 0, False: 3.62k]
  |  Branch (532:15): [True: 0, False: 0]
  ------------------
  533|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_FAILURE,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_FAILURE,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_FAILURE,
  ------------------
  |  |  111|      0|#define EVP_R_PROVIDER_SIGNATURE_FAILURE 234
  ------------------
  534|      0|            "%s digest_verify_final:%s", signature->type_name, desc);
  535|  3.62k|    ERR_clear_last_mark();
  536|  3.62k|    if (dctx == NULL)
  ------------------
  |  Branch (536:9): [True: 0, False: 3.62k]
  ------------------
  537|      0|        ctx->flags |= EVP_MD_CTX_FLAG_FINALISED;
  ------------------
  |  |   33|      0|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  538|  3.62k|    else
  539|  3.62k|        EVP_PKEY_CTX_free(dctx);
  540|  3.62k|    return r;
  541|  3.62k|}
EVP_DigestVerify:
  545|  3.62k|{
  546|  3.62k|    EVP_PKEY_CTX *pctx = ctx->pctx;
  547|       |
  548|  3.62k|    if (pctx == NULL) {
  ------------------
  |  Branch (548:9): [True: 0, False: 3.62k]
  ------------------
  549|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  550|      0|        return -1;
  551|      0|    }
  552|       |
  553|  3.62k|    if ((ctx->flags & EVP_MD_CTX_FLAG_FINALISED) != 0) {
  ------------------
  |  |   33|  3.62k|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  |  Branch (553:9): [True: 0, False: 3.62k]
  ------------------
  554|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  555|      0|        return 0;
  556|      0|    }
  557|       |
  558|  3.62k|    if (pctx->operation == EVP_PKEY_OP_VERIFYCTX
  ------------------
  |  | 1535|  7.25k|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  ------------------
  |  Branch (558:9): [True: 3.62k, False: 0]
  ------------------
  559|  3.62k|        && pctx->op.sig.algctx != NULL
  ------------------
  |  Branch (559:12): [True: 3.62k, False: 0]
  ------------------
  560|  3.62k|        && pctx->op.sig.signature != NULL) {
  ------------------
  |  Branch (560:12): [True: 3.62k, False: 0]
  ------------------
  561|  3.62k|        if (pctx->op.sig.signature->digest_verify != NULL) {
  ------------------
  |  Branch (561:13): [True: 0, False: 3.62k]
  ------------------
  562|      0|            EVP_SIGNATURE *signature = pctx->op.sig.signature;
  563|      0|            const char *desc = signature->description != NULL ? signature->description : "";
  ------------------
  |  Branch (563:32): [True: 0, False: 0]
  ------------------
  564|      0|            int ret;
  565|       |
  566|      0|            ctx->flags |= EVP_MD_CTX_FLAG_FINALISED;
  ------------------
  |  |   33|      0|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  567|      0|            ERR_set_mark();
  568|      0|            ret = signature->digest_verify(pctx->op.sig.algctx, sigret, siglen, tbs, tbslen);
  569|      0|            if (ret <= 0 && ERR_count_to_mark() == 0)
  ------------------
  |  Branch (569:17): [True: 0, False: 0]
  |  Branch (569:29): [True: 0, False: 0]
  ------------------
  570|      0|                ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_FAILURE,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                              ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_FAILURE,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                              ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_FAILURE,
  ------------------
  |  |  111|      0|#define EVP_R_PROVIDER_SIGNATURE_FAILURE 234
  ------------------
  571|      0|                    "%s digest_verify:%s", signature->type_name, desc);
  572|      0|            ERR_clear_last_mark();
  573|      0|            return ret;
  574|      0|        }
  575|  3.62k|    }
  576|       |
  577|  3.62k|    if (EVP_DigestVerifyUpdate(ctx, tbs, tbslen) <= 0)
  ------------------
  |  Branch (577:9): [True: 0, False: 3.62k]
  ------------------
  578|      0|        return -1;
  579|  3.62k|    return EVP_DigestVerifyFinal(ctx, sigret, siglen);
  580|  3.62k|}
m_sigver.c:do_sigver_init:
   37|  10.8k|{
   38|  10.8k|    EVP_PKEY_CTX *locpctx = NULL;
   39|  10.8k|    EVP_SIGNATURE *signature = NULL;
   40|  10.8k|    const char *desc;
   41|  10.8k|    EVP_KEYMGMT *tmp_keymgmt = NULL;
   42|  10.8k|    const OSSL_PROVIDER *tmp_prov = NULL;
   43|  10.8k|    const char *supported_sig = NULL;
   44|  10.8k|    char locmdname[80] = ""; /* 80 chars should be enough */
   45|  10.8k|    void *provkey = NULL;
   46|  10.8k|    int ret, iter, reinit = 1;
   47|       |
   48|  10.8k|    if (!evp_md_ctx_free_algctx(ctx))
  ------------------
  |  Branch (48:9): [True: 0, False: 10.8k]
  ------------------
   49|      0|        return 0;
   50|       |
   51|  10.8k|    if (ctx->pctx == NULL) {
  ------------------
  |  Branch (51:9): [True: 10.8k, False: 0]
  ------------------
   52|  10.8k|        reinit = 0;
   53|  10.8k|        ctx->pctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, props);
   54|  10.8k|    }
   55|  10.8k|    if (ctx->pctx == NULL)
  ------------------
  |  Branch (55:9): [True: 0, False: 10.8k]
  ------------------
   56|      0|        return 0;
   57|       |
   58|  10.8k|    EVP_MD_CTX_clear_flags(ctx, EVP_MD_CTX_FLAG_FINALISED);
  ------------------
  |  |   33|  10.8k|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
   59|       |
   60|  10.8k|    locpctx = ctx->pctx;
   61|  10.8k|    ERR_set_mark();
   62|       |
   63|  10.8k|    if (evp_pkey_ctx_is_legacy(locpctx))
  ------------------
  |  |   36|  10.8k|    ((ctx)->keymgmt == NULL)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 0, False: 10.8k]
  |  |  ------------------
  ------------------
   64|      0|        goto notsupported;
   65|       |
   66|       |    /* do not reinitialize if pkey is set or operation is different */
   67|  10.8k|    if (reinit
  ------------------
  |  Branch (67:9): [True: 0, False: 10.8k]
  ------------------
   68|      0|        && (pkey != NULL
  ------------------
  |  Branch (68:13): [True: 0, False: 0]
  ------------------
   69|      0|            || locpctx->operation != (ver ? EVP_PKEY_OP_VERIFYCTX : EVP_PKEY_OP_SIGNCTX)
  ------------------
  |  | 1535|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  ------------------
                          || locpctx->operation != (ver ? EVP_PKEY_OP_VERIFYCTX : EVP_PKEY_OP_SIGNCTX)
  ------------------
  |  | 1534|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  ------------------
  |  Branch (69:16): [True: 0, False: 0]
  |  Branch (69:39): [True: 0, False: 0]
  ------------------
   70|      0|            || (signature = locpctx->op.sig.signature) == NULL
  ------------------
  |  Branch (70:16): [True: 0, False: 0]
  ------------------
   71|      0|            || locpctx->op.sig.algctx == NULL))
  ------------------
  |  Branch (71:16): [True: 0, False: 0]
  ------------------
   72|      0|        reinit = 0;
   73|       |
   74|  10.8k|    if (props == NULL)
  ------------------
  |  Branch (74:9): [True: 10.8k, False: 0]
  ------------------
   75|  10.8k|        props = locpctx->propquery;
   76|       |
   77|  10.8k|    if (locpctx->pkey == NULL) {
  ------------------
  |  Branch (77:9): [True: 0, False: 10.8k]
  ------------------
   78|      0|        ERR_clear_last_mark();
   79|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NO_KEY_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   80|      0|        goto err;
   81|      0|    }
   82|       |
   83|  10.8k|    if (!reinit) {
  ------------------
  |  Branch (83:9): [True: 10.8k, False: 0]
  ------------------
   84|  10.8k|        evp_pkey_ctx_free_old_ops(locpctx);
   85|  10.8k|    } else {
   86|      0|        if (mdname == NULL && type == NULL)
  ------------------
  |  Branch (86:13): [True: 0, False: 0]
  |  Branch (86:31): [True: 0, False: 0]
  ------------------
   87|      0|            mdname = canon_mdname(EVP_MD_get0_name(ctx->reqdigest));
   88|      0|        goto reinitialize;
   89|      0|    }
   90|       |
   91|       |    /*
   92|       |     * Try to derive the supported signature from |locpctx->keymgmt|.
   93|       |     */
   94|  10.8k|    if (!ossl_assert(locpctx->pkey->keymgmt == NULL
  ------------------
  |  |   52|  21.7k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 0, False: 10.8k]
  |  |  |  Branch (52:41): [True: 10.8k, False: 0]
  |  |  ------------------
  |  |   53|  10.8k|    __FILE__, __LINE__)
  ------------------
  |  Branch (94:9): [True: 0, False: 10.8k]
  ------------------
   95|  10.8k|            || locpctx->pkey->keymgmt == locpctx->keymgmt)) {
   96|      0|        ERR_clear_last_mark();
   97|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   98|      0|        goto err;
   99|      0|    }
  100|  10.8k|    supported_sig = evp_keymgmt_util_query_operation_name(locpctx->keymgmt,
  101|  10.8k|        OSSL_OP_SIGNATURE);
  ------------------
  |  |  290|  10.8k|#define OSSL_OP_SIGNATURE 12
  ------------------
  102|  10.8k|    if (supported_sig == NULL) {
  ------------------
  |  Branch (102:9): [True: 0, False: 10.8k]
  ------------------
  103|      0|        ERR_clear_last_mark();
  104|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  105|      0|        goto err;
  106|      0|    }
  107|       |
  108|       |    /*
  109|       |     * We perform two iterations:
  110|       |     *
  111|       |     * 1.  Do the normal signature fetch, using the fetching data given by
  112|       |     *     the EVP_PKEY_CTX.
  113|       |     * 2.  Do the provider specific signature fetch, from the same provider
  114|       |     *     as |ctx->keymgmt|
  115|       |     *
  116|       |     * We then try to fetch the keymgmt from the same provider as the
  117|       |     * signature, and try to export |ctx->pkey| to that keymgmt (when
  118|       |     * this keymgmt happens to be the same as |ctx->keymgmt|, the export
  119|       |     * is a no-op, but we call it anyway to not complicate the code even
  120|       |     * more).
  121|       |     * If the export call succeeds (returns a non-NULL provider key pointer),
  122|       |     * we're done and can perform the operation itself.  If not, we perform
  123|       |     * the second iteration, or jump to legacy.
  124|       |     */
  125|  21.7k|    for (iter = 1, provkey = NULL; iter < 3 && provkey == NULL; iter++) {
  ------------------
  |  Branch (125:36): [True: 21.7k, False: 0]
  |  Branch (125:48): [True: 10.8k, False: 10.8k]
  ------------------
  126|  10.8k|        EVP_KEYMGMT *tmp_keymgmt_tofree = NULL;
  127|       |
  128|       |        /*
  129|       |         * If we're on the second iteration, free the results from the first.
  130|       |         * They are NULL on the first iteration, so no need to check what
  131|       |         * iteration we're on.
  132|       |         */
  133|  10.8k|        EVP_SIGNATURE_free(signature);
  134|  10.8k|        signature = NULL;
  135|  10.8k|        EVP_KEYMGMT_free(tmp_keymgmt);
  136|  10.8k|        tmp_keymgmt = NULL;
  137|       |
  138|  10.8k|        switch (iter) {
  ------------------
  |  Branch (138:17): [True: 10.8k, False: 0]
  ------------------
  139|  10.8k|        case 1:
  ------------------
  |  Branch (139:9): [True: 10.8k, False: 0]
  ------------------
  140|  10.8k|            signature = EVP_SIGNATURE_fetch(locpctx->libctx, supported_sig,
  141|  10.8k|                locpctx->propquery);
  142|  10.8k|            if (signature != NULL)
  ------------------
  |  Branch (142:17): [True: 10.8k, False: 0]
  ------------------
  143|  10.8k|                tmp_prov = EVP_SIGNATURE_get0_provider(signature);
  144|  10.8k|            break;
  145|      0|        case 2:
  ------------------
  |  Branch (145:9): [True: 0, False: 10.8k]
  ------------------
  146|      0|            tmp_prov = EVP_KEYMGMT_get0_provider(locpctx->keymgmt);
  147|      0|            signature = evp_signature_fetch_from_prov((OSSL_PROVIDER *)tmp_prov,
  148|      0|                supported_sig, locpctx->propquery);
  149|      0|            if (signature == NULL)
  ------------------
  |  Branch (149:17): [True: 0, False: 0]
  ------------------
  150|      0|                goto notsupported;
  151|      0|            break;
  152|  10.8k|        }
  153|  10.8k|        if (signature == NULL)
  ------------------
  |  Branch (153:13): [True: 0, False: 10.8k]
  ------------------
  154|      0|            continue;
  155|       |
  156|       |        /*
  157|       |         * Ensure that the key is provided, either natively, or as a cached
  158|       |         * export.  We start by fetching the keymgmt with the same name as
  159|       |         * |locpctx->pkey|, but from the provider of the signature method, using
  160|       |         * the same property query as when fetching the signature method.
  161|       |         * With the keymgmt we found (if we did), we try to export |locpctx->pkey|
  162|       |         * to it (evp_pkey_export_to_provider() is smart enough to only actually
  163|       |
  164|       |         * export it if |tmp_keymgmt| is different from |locpctx->pkey|'s keymgmt)
  165|       |         */
  166|  10.8k|        tmp_keymgmt_tofree = tmp_keymgmt = evp_keymgmt_fetch_from_prov((OSSL_PROVIDER *)tmp_prov,
  167|  10.8k|            EVP_KEYMGMT_get0_name(locpctx->keymgmt),
  168|  10.8k|            locpctx->propquery);
  169|  10.8k|        if (tmp_keymgmt != NULL)
  ------------------
  |  Branch (169:13): [True: 10.8k, False: 0]
  ------------------
  170|  10.8k|            provkey = evp_pkey_export_to_provider(locpctx->pkey, locpctx->libctx,
  171|  10.8k|                &tmp_keymgmt, locpctx->propquery);
  172|  10.8k|        if (tmp_keymgmt == NULL)
  ------------------
  |  Branch (172:13): [True: 0, False: 10.8k]
  ------------------
  173|      0|            EVP_KEYMGMT_free(tmp_keymgmt_tofree);
  174|  10.8k|    }
  175|       |
  176|  10.8k|    if (provkey == NULL) {
  ------------------
  |  Branch (176:9): [True: 0, False: 10.8k]
  ------------------
  177|      0|        EVP_SIGNATURE_free(signature);
  178|      0|        ERR_clear_last_mark();
  179|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  180|      0|        goto err;
  181|      0|    }
  182|       |
  183|  10.8k|    ERR_pop_to_mark();
  184|       |
  185|       |    /* No more legacy from here down to legacy: */
  186|       |
  187|  10.8k|    locpctx->op.sig.signature = signature;
  188|  10.8k|    locpctx->operation = ver ? EVP_PKEY_OP_VERIFYCTX
  ------------------
  |  | 1535|  3.62k|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  ------------------
  |  Branch (188:26): [True: 3.62k, False: 7.25k]
  ------------------
  189|  10.8k|                             : EVP_PKEY_OP_SIGNCTX;
  ------------------
  |  | 1534|  18.1k|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  ------------------
  190|  10.8k|    locpctx->op.sig.algctx
  191|  10.8k|        = signature->newctx(ossl_provider_ctx(signature->prov), props);
  192|  10.8k|    if (locpctx->op.sig.algctx == NULL) {
  ------------------
  |  Branch (192:9): [True: 0, False: 10.8k]
  ------------------
  193|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  194|      0|        goto err;
  195|      0|    }
  196|       |
  197|  10.8k|reinitialize:
  198|  10.8k|    if (pctx != NULL)
  ------------------
  |  Branch (198:9): [True: 7.25k, False: 3.62k]
  ------------------
  199|  7.25k|        *pctx = locpctx;
  200|       |
  201|  10.8k|    if (type != NULL) {
  ------------------
  |  Branch (201:9): [True: 0, False: 10.8k]
  ------------------
  202|      0|        ctx->reqdigest = type;
  203|      0|        if (mdname == NULL)
  ------------------
  |  Branch (203:13): [True: 0, False: 0]
  ------------------
  204|      0|            mdname = canon_mdname(EVP_MD_get0_name(type));
  205|  10.8k|    } else {
  206|  10.8k|        if (mdname == NULL && !reinit) {
  ------------------
  |  Branch (206:13): [True: 0, False: 10.8k]
  |  Branch (206:31): [True: 0, False: 0]
  ------------------
  207|      0|            if (evp_keymgmt_util_get_deflt_digest_name(tmp_keymgmt, provkey,
  ------------------
  |  Branch (207:17): [True: 0, False: 0]
  ------------------
  208|      0|                    locmdname,
  209|      0|                    sizeof(locmdname))
  210|      0|                > 0) {
  211|      0|                mdname = canon_mdname(locmdname);
  212|      0|            }
  213|      0|        }
  214|       |
  215|  10.8k|        if (mdname != NULL) {
  ------------------
  |  Branch (215:13): [True: 10.8k, False: 0]
  ------------------
  216|       |            /*
  217|       |             * We're about to get a new digest so clear anything associated with
  218|       |             * an old digest.
  219|       |             */
  220|  10.8k|            evp_md_ctx_clear_digest(ctx, 1, 0);
  221|       |
  222|       |            /*
  223|       |             * This might be requested by a later call to EVP_MD_CTX_get0_md().
  224|       |             * In that case the "explicit fetch" rules apply for that
  225|       |             * function (as per man pages), i.e. the ref count is not updated
  226|       |             * so the EVP_MD should not be used beyond the lifetime of the
  227|       |             * EVP_MD_CTX.
  228|       |             */
  229|  10.8k|            ctx->fetched_digest = EVP_MD_fetch(locpctx->libctx, mdname, props);
  230|  10.8k|            if (ctx->fetched_digest != NULL) {
  ------------------
  |  Branch (230:17): [True: 10.8k, False: 0]
  ------------------
  231|  10.8k|                ctx->digest = ctx->reqdigest = ctx->fetched_digest;
  232|  10.8k|                if (ctx->digest == NULL) {
  ------------------
  |  Branch (232:21): [True: 0, False: 10.8k]
  ------------------
  233|      0|                    ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  234|      0|                    goto err;
  235|      0|                }
  236|  10.8k|            }
  237|  10.8k|        }
  238|  10.8k|    }
  239|       |
  240|  10.8k|    desc = signature->description != NULL ? signature->description : "";
  ------------------
  |  Branch (240:12): [True: 0, False: 10.8k]
  ------------------
  241|  10.8k|    if (ver) {
  ------------------
  |  Branch (241:9): [True: 3.62k, False: 7.25k]
  ------------------
  242|  3.62k|        if (signature->digest_verify_init == NULL) {
  ------------------
  |  Branch (242:13): [True: 0, False: 3.62k]
  ------------------
  243|      0|            ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                          ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED,
  ------------------
  |  |  112|      0|#define EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED 237
  ------------------
  244|      0|                "%s digest_verify_init:%s", signature->type_name, desc);
  245|      0|            goto err;
  246|      0|        }
  247|  3.62k|        ret = signature->digest_verify_init(locpctx->op.sig.algctx,
  248|  3.62k|            mdname, provkey, params);
  249|  7.25k|    } else {
  250|  7.25k|        if (signature->digest_sign_init == NULL) {
  ------------------
  |  Branch (250:13): [True: 0, False: 7.25k]
  ------------------
  251|      0|            ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                          ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED,
  ------------------
  |  |  112|      0|#define EVP_R_PROVIDER_SIGNATURE_NOT_SUPPORTED 237
  ------------------
  252|      0|                "%s digest_sign_init:%s", signature->type_name, desc);
  253|      0|            goto err;
  254|      0|        }
  255|  7.25k|        ret = signature->digest_sign_init(locpctx->op.sig.algctx,
  256|  7.25k|            mdname, provkey, params);
  257|  7.25k|    }
  258|       |
  259|       |    /*
  260|       |     * If the operation was not a success and no digest was found, an error
  261|       |     * needs to be raised.
  262|       |     */
  263|  10.8k|    if (ret > 0 || mdname != NULL) {
  ------------------
  |  Branch (263:9): [True: 10.8k, False: 0]
  |  Branch (263:20): [True: 0, False: 0]
  ------------------
  264|  10.8k|        if (ret > 0)
  ------------------
  |  Branch (264:13): [True: 10.8k, False: 0]
  ------------------
  265|  10.8k|            ret = evp_pkey_ctx_use_cached_data(locpctx);
  266|       |
  267|  10.8k|        EVP_KEYMGMT_free(tmp_keymgmt);
  268|  10.8k|        return ret > 0 ? 1 : 0;
  ------------------
  |  Branch (268:16): [True: 10.8k, False: 0]
  ------------------
  269|  10.8k|    }
  270|      0|    if (type == NULL) /* This check is redundant but clarifies matters */
  ------------------
  |  Branch (270:9): [True: 0, False: 0]
  ------------------
  271|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NO_DEFAULT_DIGEST);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  272|      0|    ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_FAILURE,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                  ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_FAILURE,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                  ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_SIGNATURE_FAILURE,
  ------------------
  |  |  111|      0|#define EVP_R_PROVIDER_SIGNATURE_FAILURE 234
  ------------------
  273|      0|        ver ? "%s digest_verify_init:%s" : "%s digest_sign_init:%s",
  ------------------
  |  Branch (273:9): [True: 0, False: 0]
  ------------------
  274|      0|        signature->type_name, desc);
  275|       |
  276|      0|err:
  277|      0|    evp_pkey_ctx_free_old_ops(locpctx);
  278|      0|    locpctx->operation = EVP_PKEY_OP_UNDEFINED;
  ------------------
  |  | 1527|      0|#define EVP_PKEY_OP_UNDEFINED 0
  ------------------
  279|      0|    EVP_KEYMGMT_free(tmp_keymgmt);
  280|      0|    return 0;
  281|       |
  282|      0|notsupported:
  283|      0|    ERR_pop_to_mark();
  284|      0|    EVP_KEYMGMT_free(tmp_keymgmt);
  285|       |
  286|      0|    ERR_raise_data(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                  ERR_raise_data(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                  ERR_raise_data(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE,
  ------------------
  |  |   96|      0|#define EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE 150
  ------------------
  287|      0|        ver ? "%s digest_verify_init" : "%s digest_sign_init",
  ------------------
  |  Branch (287:9): [True: 0, False: 0]
  ------------------
  288|      0|        EVP_PKEY_get0_type_name(locpctx->pkey));
  289|      0|    return 0;
  290|      0|}

EVP_MAC_CTX_new:
   23|  43.4k|{
   24|  43.4k|    EVP_MAC_CTX *ctx = OPENSSL_zalloc(sizeof(EVP_MAC_CTX));
  ------------------
  |  |  109|  43.4k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   25|       |
   26|  43.4k|    if (ctx != NULL) {
  ------------------
  |  Branch (26:9): [True: 43.4k, False: 0]
  ------------------
   27|  43.4k|        ctx->meth = mac;
   28|  43.4k|        if ((ctx->algctx = mac->newctx(ossl_provider_ctx(mac->prov))) == NULL
  ------------------
  |  Branch (28:13): [True: 0, False: 43.4k]
  ------------------
   29|  43.4k|            || !EVP_MAC_up_ref(mac)) {
  ------------------
  |  Branch (29:16): [True: 0, False: 43.4k]
  ------------------
   30|      0|            mac->freectx(ctx->algctx);
   31|      0|            ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   32|      0|            OPENSSL_free(ctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   33|       |            ctx = NULL;
   34|      0|        }
   35|  43.4k|    }
   36|  43.4k|    return ctx;
   37|  43.4k|}
EVP_MAC_CTX_free:
   40|   115k|{
   41|   115k|    if (ctx == NULL)
  ------------------
  |  Branch (41:9): [True: 72.5k, False: 43.4k]
  ------------------
   42|  72.5k|        return;
   43|  43.4k|    ctx->meth->freectx(ctx->algctx);
   44|  43.4k|    ctx->algctx = NULL;
   45|       |    /* refcnt-- */
   46|  43.4k|    EVP_MAC_free(ctx->meth);
   47|  43.4k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|  43.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   48|  43.4k|}
EVP_MAC_CTX_get_mac_size:
  106|  43.4k|{
  107|  43.4k|    return get_size_t_ctx_param(ctx, OSSL_MAC_PARAM_SIZE);
  ------------------
  |  |  361|  43.4k|# define OSSL_MAC_PARAM_SIZE "size"
  ------------------
  108|  43.4k|}
EVP_MAC_init:
  117|  43.4k|{
  118|  43.4k|    if (ctx->meth->init == NULL) {
  ------------------
  |  Branch (118:9): [True: 0, False: 43.4k]
  ------------------
  119|      0|        ERR_raise(ERR_R_EVP_LIB, ERR_R_UNSUPPORTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  120|      0|        return 0;
  121|      0|    }
  122|  43.4k|    return ctx->meth->init(ctx->algctx, key, keylen, params);
  123|  43.4k|}
EVP_MAC_update:
  137|  43.4k|{
  138|  43.4k|    return ctx->meth->update(ctx->algctx, data, datalen);
  139|  43.4k|}
EVP_MAC_final:
  188|  43.4k|{
  189|  43.4k|    return evp_mac_final(ctx, 0, out, outl, outsize);
  190|  43.4k|}
EVP_MAC_CTX_set_params:
  218|  72.4k|{
  219|  72.4k|    if (ctx->meth->set_ctx_params != NULL)
  ------------------
  |  Branch (219:9): [True: 72.4k, False: 0]
  ------------------
  220|  72.4k|        return ctx->meth->set_ctx_params(ctx->algctx, params);
  221|      0|    return 1;
  222|  72.4k|}
EVP_Q_mac:
  260|  36.2k|{
  261|  36.2k|    EVP_MAC *mac = EVP_MAC_fetch(libctx, name, propq);
  262|  36.2k|    OSSL_PARAM subalg_param[3];
  263|  36.2k|    OSSL_PARAM *p = subalg_param;
  264|  36.2k|    EVP_MAC_CTX *ctx = NULL;
  265|  36.2k|    size_t len = 0;
  266|  36.2k|    unsigned char *res = NULL;
  267|       |
  268|  36.2k|    if (outlen != NULL)
  ------------------
  |  Branch (268:9): [True: 14.4k, False: 21.7k]
  ------------------
  269|  14.4k|        *outlen = 0;
  270|  36.2k|    if (mac == NULL)
  ------------------
  |  Branch (270:9): [True: 0, False: 36.2k]
  ------------------
  271|      0|        return NULL;
  272|  36.2k|    if (subalg != NULL) {
  ------------------
  |  Branch (272:9): [True: 36.2k, False: 0]
  ------------------
  273|  36.2k|        const OSSL_PARAM *defined_params = EVP_MAC_settable_ctx_params(mac);
  274|  36.2k|        const char *param_name = OSSL_MAC_PARAM_DIGEST;
  ------------------
  |  |  350|  36.2k|# define OSSL_MAC_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
  |  |  ------------------
  |  |  |  |  127|  36.2k|# define OSSL_ALG_PARAM_DIGEST "digest"
  |  |  ------------------
  ------------------
  275|       |
  276|       |        /*
  277|       |         * The underlying algorithm may be a cipher or a digest.
  278|       |         * We don't know which it is, but we can ask the MAC what it
  279|       |         * should be and bet on that.
  280|       |         */
  281|  36.2k|        if (OSSL_PARAM_locate_const(defined_params, param_name) == NULL) {
  ------------------
  |  Branch (281:13): [True: 0, False: 36.2k]
  ------------------
  282|      0|            param_name = OSSL_MAC_PARAM_CIPHER;
  ------------------
  |  |  347|      0|# define OSSL_MAC_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
  |  |  ------------------
  |  |  |  |  126|      0|# define OSSL_ALG_PARAM_CIPHER "cipher"
  |  |  ------------------
  ------------------
  283|      0|            if (OSSL_PARAM_locate_const(defined_params, param_name) == NULL) {
  ------------------
  |  Branch (283:17): [True: 0, False: 0]
  ------------------
  284|      0|                ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  285|      0|                goto err;
  286|      0|            }
  287|      0|        }
  288|  36.2k|        *p++ = OSSL_PARAM_construct_utf8_string(param_name, (char *)subalg, 0);
  289|  36.2k|    }
  290|       |
  291|       |    /*
  292|       |     * If we passed in a property query, make sure the underlying algorithm uses it.
  293|       |     * Compound algorithms may fetch other underlying algorithms (i.e. a MAC algorithm
  294|       |     * may use a digest algorithm as part of its internal work), and the MAC decides which
  295|       |     * implementation of the underlying digest to use based on the
  296|       |     * OSSL_ALG_PARAM_PROPERTIES parameter, rather than the propq value passed in the
  297|       |     * EVP_MAC_fetch call above.
  298|       |     * If we don't set this parameter, then the MAC alg may use the default provider
  299|       |     * to allocate an underlying digest, rather than the one that we would have gotten
  300|       |     * by using the propq value here.
  301|       |     */
  302|  36.2k|    if (propq != NULL)
  ------------------
  |  Branch (302:9): [True: 0, False: 36.2k]
  ------------------
  303|      0|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_ALG_PARAM_PROPERTIES,
  ------------------
  |  |  130|      0|# define OSSL_ALG_PARAM_PROPERTIES "properties"
  ------------------
  304|      0|            (char *)propq, 0);
  305|       |
  306|  36.2k|    *p = OSSL_PARAM_construct_end();
  307|       |
  308|       |    /* Single-shot - on NULL key input, set dummy key value for EVP_MAC_Init. */
  309|  36.2k|    if (key == NULL && keylen == 0)
  ------------------
  |  Branch (309:9): [True: 0, False: 36.2k]
  |  Branch (309:24): [True: 0, False: 0]
  ------------------
  310|      0|        key = data;
  311|  36.2k|    if ((ctx = EVP_MAC_CTX_new(mac)) != NULL
  ------------------
  |  Branch (311:9): [True: 36.2k, False: 0]
  ------------------
  312|  36.2k|        && EVP_MAC_CTX_set_params(ctx, subalg_param)
  ------------------
  |  Branch (312:12): [True: 36.2k, False: 0]
  ------------------
  313|  36.2k|        && EVP_MAC_CTX_set_params(ctx, params)
  ------------------
  |  Branch (313:12): [True: 36.2k, False: 0]
  ------------------
  314|  36.2k|        && EVP_MAC_init(ctx, key, keylen, params)
  ------------------
  |  Branch (314:12): [True: 36.2k, False: 0]
  ------------------
  315|  36.2k|        && EVP_MAC_update(ctx, data, datalen)
  ------------------
  |  Branch (315:12): [True: 36.2k, False: 0]
  ------------------
  316|  36.2k|        && EVP_MAC_final(ctx, out, &len, outsize)) {
  ------------------
  |  Branch (316:12): [True: 36.2k, False: 0]
  ------------------
  317|  36.2k|        if (out == NULL) {
  ------------------
  |  Branch (317:13): [True: 0, False: 36.2k]
  ------------------
  318|      0|            out = OPENSSL_malloc(len);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  319|      0|            if (out != NULL && !EVP_MAC_final(ctx, out, NULL, len)) {
  ------------------
  |  Branch (319:17): [True: 0, False: 0]
  |  Branch (319:32): [True: 0, False: 0]
  ------------------
  320|      0|                OPENSSL_free(out);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  321|      0|                out = NULL;
  322|      0|            }
  323|      0|        }
  324|  36.2k|        res = out;
  325|  36.2k|        if (res != NULL && outlen != NULL)
  ------------------
  |  Branch (325:13): [True: 36.2k, False: 0]
  |  Branch (325:28): [True: 14.4k, False: 21.7k]
  ------------------
  326|  14.4k|            *outlen = len;
  327|  36.2k|    }
  328|       |
  329|  36.2k|err:
  330|  36.2k|    EVP_MAC_CTX_free(ctx);
  331|  36.2k|    EVP_MAC_free(mac);
  332|  36.2k|    return res;
  333|  36.2k|}
mac_lib.c:get_size_t_ctx_param:
   83|  43.4k|{
   84|  43.4k|    size_t sz = 0;
   85|       |
   86|  43.4k|    if (ctx->algctx != NULL) {
  ------------------
  |  Branch (86:9): [True: 43.4k, False: 0]
  ------------------
   87|  43.4k|        OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  43.4k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                      OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  43.4k|    { NULL, 0, NULL, 0, 0 }
  ------------------
   88|       |
   89|  43.4k|        params[0] = OSSL_PARAM_construct_size_t(name, &sz);
   90|  43.4k|        if (ctx->meth->get_ctx_params != NULL) {
  ------------------
  |  Branch (90:13): [True: 43.4k, False: 0]
  ------------------
   91|  43.4k|            if (ctx->meth->get_ctx_params(ctx->algctx, params))
  ------------------
  |  Branch (91:17): [True: 43.4k, False: 0]
  ------------------
   92|  43.4k|                return sz;
   93|  43.4k|        } else if (ctx->meth->get_params != NULL) {
  ------------------
  |  Branch (93:20): [True: 0, False: 0]
  ------------------
   94|      0|            if (ctx->meth->get_params(params))
  ------------------
  |  Branch (94:17): [True: 0, False: 0]
  ------------------
   95|      0|                return sz;
   96|      0|        }
   97|  43.4k|    }
   98|       |    /*
   99|       |     * If the MAC hasn't been initialized yet, or there is no size to get,
  100|       |     * we return zero
  101|       |     */
  102|      0|    return 0;
  103|  43.4k|}
mac_lib.c:evp_mac_final:
  143|  43.4k|{
  144|  43.4k|    size_t l;
  145|  43.4k|    int res;
  146|  43.4k|    OSSL_PARAM params[2];
  147|  43.4k|    size_t macsize;
  148|       |
  149|  43.4k|    if (ctx == NULL || ctx->meth == NULL) {
  ------------------
  |  Branch (149:9): [True: 0, False: 43.4k]
  |  Branch (149:24): [True: 0, False: 43.4k]
  ------------------
  150|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_NULL_ALGORITHM);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  151|      0|        return 0;
  152|      0|    }
  153|  43.4k|    if (ctx->meth->final == NULL) {
  ------------------
  |  Branch (153:9): [True: 0, False: 43.4k]
  ------------------
  154|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  155|      0|        return 0;
  156|      0|    }
  157|       |
  158|  43.4k|    macsize = EVP_MAC_CTX_get_mac_size(ctx);
  159|  43.4k|    if (out == NULL) {
  ------------------
  |  Branch (159:9): [True: 0, False: 43.4k]
  ------------------
  160|      0|        if (outl == NULL) {
  ------------------
  |  Branch (160:13): [True: 0, False: 0]
  ------------------
  161|      0|            ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  162|      0|            return 0;
  163|      0|        }
  164|      0|        *outl = macsize;
  165|      0|        return 1;
  166|      0|    }
  167|  43.4k|    if (outsize < macsize) {
  ------------------
  |  Branch (167:9): [True: 0, False: 43.4k]
  ------------------
  168|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_BUFFER_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  169|      0|        return 0;
  170|      0|    }
  171|  43.4k|    if (xof) {
  ------------------
  |  Branch (171:9): [True: 0, False: 43.4k]
  ------------------
  172|      0|        params[0] = OSSL_PARAM_construct_int(OSSL_MAC_PARAM_XOF, &xof);
  ------------------
  |  |  363|      0|# define OSSL_MAC_PARAM_XOF "xof"
  ------------------
  173|      0|        params[1] = OSSL_PARAM_construct_end();
  174|       |
  175|      0|        if (EVP_MAC_CTX_set_params(ctx, params) <= 0) {
  ------------------
  |  Branch (175:13): [True: 0, False: 0]
  ------------------
  176|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_SETTING_XOF_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  177|      0|            return 0;
  178|      0|        }
  179|      0|    }
  180|  43.4k|    res = ctx->meth->final(ctx->algctx, out, &l, outsize);
  181|  43.4k|    if (outl != NULL)
  ------------------
  |  Branch (181:9): [True: 43.4k, False: 0]
  ------------------
  182|  43.4k|        *outl = l;
  183|  43.4k|    return res;
  184|  43.4k|}

EVP_MAC_fetch:
  177|  43.4k|{
  178|  43.4k|    return evp_generic_fetch(libctx, OSSL_OP_MAC, algorithm, properties,
  ------------------
  |  |  285|  43.4k|#define OSSL_OP_MAC 3
  ------------------
  179|  43.4k|        evp_mac_from_algorithm, evp_mac_up_ref,
  180|  43.4k|        evp_mac_free);
  181|  43.4k|}
EVP_MAC_up_ref:
  184|  43.4k|{
  185|  43.4k|    return evp_mac_up_ref(mac);
  186|  43.4k|}
EVP_MAC_free:
  189|  86.8k|{
  190|  86.8k|    evp_mac_free(mac);
  191|  86.8k|}
EVP_MAC_get0_provider:
  194|  36.2k|{
  195|  36.2k|    return mac->prov;
  196|  36.2k|}
EVP_MAC_settable_ctx_params:
  216|  36.2k|{
  217|  36.2k|    void *alg;
  218|       |
  219|  36.2k|    if (mac->settable_ctx_params == NULL)
  ------------------
  |  Branch (219:9): [True: 0, False: 36.2k]
  ------------------
  220|      0|        return NULL;
  221|  36.2k|    alg = ossl_provider_ctx(EVP_MAC_get0_provider(mac));
  222|       |    return mac->settable_ctx_params(NULL, alg);
  223|  36.2k|}
mac_meth.c:evp_mac_from_algorithm:
   60|      9|{
   61|      9|    const OSSL_DISPATCH *fns = algodef->implementation;
   62|      9|    EVP_MAC *mac = NULL;
   63|      9|    int fnmaccnt = 0, fnctxcnt = 0, mac_init_found = 0;
   64|       |
   65|      9|    if ((mac = evp_mac_new()) == NULL) {
  ------------------
  |  Branch (65:9): [True: 0, False: 9]
  ------------------
   66|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   67|      0|        goto err;
   68|      0|    }
   69|      9|    mac->name_id = name_id;
   70|       |
   71|      9|    if ((mac->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL)
  ------------------
  |  Branch (71:9): [True: 0, False: 9]
  ------------------
   72|      0|        goto err;
   73|       |
   74|      9|    mac->description = algodef->algorithm_description;
   75|       |
   76|     99|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (76:12): [True: 90, False: 9]
  ------------------
   77|     90|        switch (fns->function_id) {
  ------------------
  |  Branch (77:17): [True: 90, False: 0]
  ------------------
   78|      9|        case OSSL_FUNC_MAC_NEWCTX:
  ------------------
  |  |  425|      9|#define OSSL_FUNC_MAC_NEWCTX 1
  ------------------
  |  Branch (78:9): [True: 9, False: 81]
  ------------------
   79|      9|            if (mac->newctx != NULL)
  ------------------
  |  Branch (79:17): [True: 0, False: 9]
  ------------------
   80|      0|                break;
   81|      9|            mac->newctx = OSSL_FUNC_mac_newctx(fns);
   82|      9|            fnctxcnt++;
   83|      9|            break;
   84|      9|        case OSSL_FUNC_MAC_DUPCTX:
  ------------------
  |  |  426|      9|#define OSSL_FUNC_MAC_DUPCTX 2
  ------------------
  |  Branch (84:9): [True: 9, False: 81]
  ------------------
   85|      9|            if (mac->dupctx != NULL)
  ------------------
  |  Branch (85:17): [True: 0, False: 9]
  ------------------
   86|      0|                break;
   87|      9|            mac->dupctx = OSSL_FUNC_mac_dupctx(fns);
   88|      9|            break;
   89|      9|        case OSSL_FUNC_MAC_FREECTX:
  ------------------
  |  |  427|      9|#define OSSL_FUNC_MAC_FREECTX 3
  ------------------
  |  Branch (89:9): [True: 9, False: 81]
  ------------------
   90|      9|            if (mac->freectx != NULL)
  ------------------
  |  Branch (90:17): [True: 0, False: 9]
  ------------------
   91|      0|                break;
   92|      9|            mac->freectx = OSSL_FUNC_mac_freectx(fns);
   93|      9|            fnctxcnt++;
   94|      9|            break;
   95|      9|        case OSSL_FUNC_MAC_INIT:
  ------------------
  |  |  428|      9|#define OSSL_FUNC_MAC_INIT 4
  ------------------
  |  Branch (95:9): [True: 9, False: 81]
  ------------------
   96|      9|            if (mac->init != NULL)
  ------------------
  |  Branch (96:17): [True: 0, False: 9]
  ------------------
   97|      0|                break;
   98|      9|            mac->init = OSSL_FUNC_mac_init(fns);
   99|      9|            mac_init_found = 1;
  100|      9|            break;
  101|      9|        case OSSL_FUNC_MAC_UPDATE:
  ------------------
  |  |  429|      9|#define OSSL_FUNC_MAC_UPDATE 5
  ------------------
  |  Branch (101:9): [True: 9, False: 81]
  ------------------
  102|      9|            if (mac->update != NULL)
  ------------------
  |  Branch (102:17): [True: 0, False: 9]
  ------------------
  103|      0|                break;
  104|      9|            mac->update = OSSL_FUNC_mac_update(fns);
  105|      9|            fnmaccnt++;
  106|      9|            break;
  107|      9|        case OSSL_FUNC_MAC_FINAL:
  ------------------
  |  |  430|      9|#define OSSL_FUNC_MAC_FINAL 6
  ------------------
  |  Branch (107:9): [True: 9, False: 81]
  ------------------
  108|      9|            if (mac->final != NULL)
  ------------------
  |  Branch (108:17): [True: 0, False: 9]
  ------------------
  109|      0|                break;
  110|      9|            mac->final = OSSL_FUNC_mac_final(fns);
  111|      9|            fnmaccnt++;
  112|      9|            break;
  113|      2|        case OSSL_FUNC_MAC_GETTABLE_PARAMS:
  ------------------
  |  |  434|      2|#define OSSL_FUNC_MAC_GETTABLE_PARAMS 10
  ------------------
  |  Branch (113:9): [True: 2, False: 88]
  ------------------
  114|      2|            if (mac->gettable_params != NULL)
  ------------------
  |  Branch (114:17): [True: 0, False: 2]
  ------------------
  115|      0|                break;
  116|      2|            mac->gettable_params = OSSL_FUNC_mac_gettable_params(fns);
  117|      2|            break;
  118|      7|        case OSSL_FUNC_MAC_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  435|      7|#define OSSL_FUNC_MAC_GETTABLE_CTX_PARAMS 11
  ------------------
  |  Branch (118:9): [True: 7, False: 83]
  ------------------
  119|      7|            if (mac->gettable_ctx_params != NULL)
  ------------------
  |  Branch (119:17): [True: 0, False: 7]
  ------------------
  120|      0|                break;
  121|      7|            mac->gettable_ctx_params = OSSL_FUNC_mac_gettable_ctx_params(fns);
  122|      7|            break;
  123|      9|        case OSSL_FUNC_MAC_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  436|      9|#define OSSL_FUNC_MAC_SETTABLE_CTX_PARAMS 12
  ------------------
  |  Branch (123:9): [True: 9, False: 81]
  ------------------
  124|      9|            if (mac->settable_ctx_params != NULL)
  ------------------
  |  Branch (124:17): [True: 0, False: 9]
  ------------------
  125|      0|                break;
  126|      9|            mac->settable_ctx_params = OSSL_FUNC_mac_settable_ctx_params(fns);
  127|      9|            break;
  128|      2|        case OSSL_FUNC_MAC_GET_PARAMS:
  ------------------
  |  |  431|      2|#define OSSL_FUNC_MAC_GET_PARAMS 7
  ------------------
  |  Branch (128:9): [True: 2, False: 88]
  ------------------
  129|      2|            if (mac->get_params != NULL)
  ------------------
  |  Branch (129:17): [True: 0, False: 2]
  ------------------
  130|      0|                break;
  131|      2|            mac->get_params = OSSL_FUNC_mac_get_params(fns);
  132|      2|            break;
  133|      7|        case OSSL_FUNC_MAC_GET_CTX_PARAMS:
  ------------------
  |  |  432|      7|#define OSSL_FUNC_MAC_GET_CTX_PARAMS 8
  ------------------
  |  Branch (133:9): [True: 7, False: 83]
  ------------------
  134|      7|            if (mac->get_ctx_params != NULL)
  ------------------
  |  Branch (134:17): [True: 0, False: 7]
  ------------------
  135|      0|                break;
  136|      7|            mac->get_ctx_params = OSSL_FUNC_mac_get_ctx_params(fns);
  137|      7|            break;
  138|      9|        case OSSL_FUNC_MAC_SET_CTX_PARAMS:
  ------------------
  |  |  433|      9|#define OSSL_FUNC_MAC_SET_CTX_PARAMS 9
  ------------------
  |  Branch (138:9): [True: 9, False: 81]
  ------------------
  139|      9|            if (mac->set_ctx_params != NULL)
  ------------------
  |  Branch (139:17): [True: 0, False: 9]
  ------------------
  140|      0|                break;
  141|      9|            mac->set_ctx_params = OSSL_FUNC_mac_set_ctx_params(fns);
  142|      9|            break;
  143|      0|        case OSSL_FUNC_MAC_INIT_SKEY:
  ------------------
  |  |  437|      0|#define OSSL_FUNC_MAC_INIT_SKEY 13
  ------------------
  |  Branch (143:9): [True: 0, False: 90]
  ------------------
  144|      0|            if (mac->init_skey != NULL)
  ------------------
  |  Branch (144:17): [True: 0, False: 0]
  ------------------
  145|      0|                break;
  146|      0|            mac->init_skey = OSSL_FUNC_mac_init_skey(fns);
  147|      0|            mac_init_found = 1;
  148|      0|            break;
  149|     90|        }
  150|     90|    }
  151|      9|    fnmaccnt += mac_init_found;
  152|      9|    if (fnmaccnt != 3
  ------------------
  |  Branch (152:9): [True: 0, False: 9]
  ------------------
  153|      9|        || fnctxcnt != 2) {
  ------------------
  |  Branch (153:12): [True: 0, False: 9]
  ------------------
  154|       |        /*
  155|       |         * In order to be a consistent set of functions we must have at least
  156|       |         * a complete set of "mac" functions, and a complete set of context
  157|       |         * management functions, as well as the size function.
  158|       |         */
  159|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  160|      0|        goto err;
  161|      0|    }
  162|       |
  163|      9|    if (prov != NULL && !ossl_provider_up_ref(prov))
  ------------------
  |  Branch (163:9): [True: 9, False: 0]
  |  Branch (163:25): [True: 0, False: 9]
  ------------------
  164|      0|        goto err;
  165|       |
  166|      9|    mac->prov = prov;
  167|       |
  168|      9|    return mac;
  169|       |
  170|      0|err:
  171|      0|    evp_mac_free(mac);
  172|       |    return NULL;
  173|      9|}
mac_meth.c:evp_mac_new:
   46|      9|{
   47|      9|    EVP_MAC *mac = NULL;
   48|       |
   49|      9|    if ((mac = OPENSSL_zalloc(sizeof(*mac))) == NULL
  ------------------
  |  |  109|      9|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (49:9): [True: 0, False: 9]
  ------------------
   50|      9|        || !CRYPTO_NEW_REF(&mac->refcnt, 1)) {
  ------------------
  |  Branch (50:12): [True: 0, False: 9]
  ------------------
   51|      0|        evp_mac_free(mac);
   52|      0|        return NULL;
   53|      0|    }
   54|      9|    return mac;
   55|      9|}
mac_meth.c:evp_mac_up_ref:
   20|  86.8k|{
   21|  86.8k|    EVP_MAC *mac = vmac;
   22|  86.8k|    int ref = 0;
   23|       |
   24|  86.8k|    CRYPTO_UP_REF(&mac->refcnt, &ref);
   25|  86.8k|    return 1;
   26|  86.8k|}
mac_meth.c:evp_mac_free:
   29|  86.8k|{
   30|  86.8k|    EVP_MAC *mac = vmac;
   31|  86.8k|    int ref = 0;
   32|       |
   33|  86.8k|    if (mac == NULL)
  ------------------
  |  Branch (33:9): [True: 0, False: 86.8k]
  ------------------
   34|      0|        return;
   35|       |
   36|  86.8k|    CRYPTO_DOWN_REF(&mac->refcnt, &ref);
   37|  86.8k|    if (ref > 0)
  ------------------
  |  Branch (37:9): [True: 86.8k, False: 0]
  ------------------
   38|  86.8k|        return;
   39|      0|    OPENSSL_free(mac->type_name);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   40|      0|    ossl_provider_free(mac->prov);
   41|      0|    CRYPTO_FREE_REF(&mac->refcnt);
   42|      0|    OPENSSL_free(mac);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   43|      0|}

EVP_add_cipher:
   20|    288|{
   21|    288|    int r;
   22|       |
   23|    288|    if (c == NULL)
  ------------------
  |  Branch (23:9): [True: 0, False: 288]
  ------------------
   24|      0|        return 0;
   25|       |
   26|    288|    r = OBJ_NAME_add(OBJ_nid2sn(c->nid), OBJ_NAME_TYPE_CIPHER_METH,
  ------------------
  |  |   26|    288|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  ------------------
   27|    288|        (const char *)c);
   28|    288|    if (r == 0)
  ------------------
  |  Branch (28:9): [True: 0, False: 288]
  ------------------
   29|      0|        return 0;
   30|    288|    r = OBJ_NAME_add(OBJ_nid2ln(c->nid), OBJ_NAME_TYPE_CIPHER_METH,
  ------------------
  |  |   26|    288|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  ------------------
   31|    288|        (const char *)c);
   32|    288|    return r;
   33|    288|}
EVP_add_digest:
   36|     44|{
   37|     44|    int r;
   38|     44|    const char *name;
   39|       |
   40|     44|    name = OBJ_nid2sn(md->type);
   41|     44|    r = OBJ_NAME_add(name, OBJ_NAME_TYPE_MD_METH, (const char *)md);
  ------------------
  |  |   25|     44|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
   42|     44|    if (r == 0)
  ------------------
  |  Branch (42:9): [True: 0, False: 44]
  ------------------
   43|      0|        return 0;
   44|     44|    r = OBJ_NAME_add(OBJ_nid2ln(md->type), OBJ_NAME_TYPE_MD_METH,
  ------------------
  |  |   25|     44|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
   45|     44|        (const char *)md);
   46|     44|    if (r == 0)
  ------------------
  |  Branch (46:9): [True: 0, False: 44]
  ------------------
   47|      0|        return 0;
   48|       |
   49|     44|    if (md->pkey_type && md->type != md->pkey_type) {
  ------------------
  |  Branch (49:9): [True: 34, False: 10]
  |  Branch (49:26): [True: 32, False: 2]
  ------------------
   50|     32|        r = OBJ_NAME_add(OBJ_nid2sn(md->pkey_type),
   51|     32|            OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, name);
  ------------------
  |  |   25|     32|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
                          OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, name);
  ------------------
  |  |   33|     32|#define OBJ_NAME_ALIAS 0x8000
  ------------------
   52|     32|        if (r == 0)
  ------------------
  |  Branch (52:13): [True: 0, False: 32]
  ------------------
   53|      0|            return 0;
   54|     32|        r = OBJ_NAME_add(OBJ_nid2ln(md->pkey_type),
   55|     32|            OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, name);
  ------------------
  |  |   25|     32|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
                          OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, name);
  ------------------
  |  |   33|     32|#define OBJ_NAME_ALIAS 0x8000
  ------------------
   56|     32|    }
   57|     44|    return r;
   58|     44|}
EVP_get_digestbyname:
  131|  10.8k|{
  132|       |    return evp_get_digestbyname_ex(NULL, name);
  133|  10.8k|}
evp_get_digestbyname_ex:
  136|  10.8k|{
  137|  10.8k|    const EVP_MD *dp;
  138|  10.8k|    OSSL_NAMEMAP *namemap;
  139|  10.8k|    int id;
  140|  10.8k|    int do_retry = 1;
  141|       |
  142|  10.8k|    if (!OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_DIGESTS, NULL))
  ------------------
  |  |  508|  10.8k|#define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
  ------------------
  |  Branch (142:9): [True: 0, False: 10.8k]
  ------------------
  143|      0|        return NULL;
  144|       |
  145|  10.8k|    dp = (const EVP_MD *)OBJ_NAME_get(name, OBJ_NAME_TYPE_MD_METH);
  ------------------
  |  |   25|  10.8k|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
  146|       |
  147|  10.8k|    if (dp != NULL)
  ------------------
  |  Branch (147:9): [True: 10.8k, False: 0]
  ------------------
  148|  10.8k|        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_pkey_get0_EC_KEY_int:
   77|  10.9k|{
   78|  10.9k|    if (EVP_PKEY_get_base_id(pkey) != EVP_PKEY_EC) {
  ------------------
  |  |   73|  10.9k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|  10.9k|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
  |  Branch (78:9): [True: 0, False: 10.9k]
  ------------------
   79|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_EXPECTING_A_EC_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   80|      0|        return NULL;
   81|      0|    }
   82|  10.9k|    return evp_pkey_get_legacy((EVP_PKEY *)pkey);
   83|  10.9k|}
EVP_PKEY_get1_EC_KEY:
   91|  10.9k|{
   92|  10.9k|    EC_KEY *ret = evp_pkey_get0_EC_KEY_int(pkey);
   93|       |
   94|  10.9k|    if (ret != NULL && !EC_KEY_up_ref(ret))
  ------------------
  |  Branch (94:9): [True: 10.9k, False: 0]
  |  Branch (94:24): [True: 0, False: 10.9k]
  ------------------
   95|      0|        ret = NULL;
   96|  10.9k|    return ret;
   97|  10.9k|}

EVP_PKEY_get_security_bits:
   77|  10.9k|{
   78|  10.9k|    int size = 0;
   79|       |
   80|  10.9k|    if (pkey != NULL) {
  ------------------
  |  Branch (80:9): [True: 10.9k, False: 0]
  ------------------
   81|  10.9k|        size = pkey->cache.security_bits;
   82|  10.9k|        if (pkey->ameth != NULL && pkey->ameth->pkey_security_bits != NULL)
  ------------------
  |  Branch (82:13): [True: 0, False: 10.9k]
  |  Branch (82:36): [True: 0, False: 0]
  ------------------
   83|      0|            size = pkey->ameth->pkey_security_bits(pkey);
   84|  10.9k|    }
   85|  10.9k|    if (size <= 0) {
  ------------------
  |  Branch (85:9): [True: 0, False: 10.9k]
  ------------------
   86|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UNKNOWN_SECURITY_BITS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   87|      0|        return 0;
   88|      0|    }
   89|  10.9k|    return size;
   90|  10.9k|}
EVP_PKEY_copy_parameters:
  132|  3.62k|{
  133|       |    /*
  134|       |     * Clean up legacy stuff from this function when legacy support is gone.
  135|       |     */
  136|       |
  137|  3.62k|    EVP_PKEY *downgraded_from = NULL;
  138|  3.62k|    int ok = 0;
  139|       |
  140|  3.62k|#ifndef FIPS_MODULE
  141|       |    /*
  142|       |     * If |to| is a legacy key and |from| isn't, we must make a downgraded
  143|       |     * copy of |from|.  If that fails, this function fails.
  144|       |     */
  145|  3.62k|    if (evp_pkey_is_legacy(to) && evp_pkey_is_provided(from)) {
  ------------------
  |  |  381|  7.25k|    ((pk)->type != EVP_PKEY_NONE && (pk)->keymgmt == NULL)
  |  |  ------------------
  |  |  |  |   62|  3.62k|#define EVP_PKEY_NONE NID_undef
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  7.25k|#define NID_undef                       0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (381:6): [True: 0, False: 3.62k]
  |  |  |  Branch (381:37): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                  if (evp_pkey_is_legacy(to) && evp_pkey_is_provided(from)) {
  ------------------
  |  |  383|      0|    ((pk)->keymgmt != NULL)
  |  |  ------------------
  |  |  |  Branch (383:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  146|      0|        if (!evp_pkey_copy_downgraded(&downgraded_from, from))
  ------------------
  |  Branch (146:13): [True: 0, False: 0]
  ------------------
  147|      0|            goto end;
  148|      0|        from = downgraded_from;
  149|      0|    }
  150|  3.62k|#endif /* !FIPS_MODULE */
  151|       |
  152|       |    /*
  153|       |     * Make sure |to| is typed.  Content is less important at this early
  154|       |     * stage.
  155|       |     *
  156|       |     * 1.  If |to| is untyped, assign |from|'s key type to it.
  157|       |     * 2.  If |to| contains a legacy key, compare its |type| to |from|'s.
  158|       |     *     (|from| was already downgraded above)
  159|       |     *
  160|       |     * If |to| is a provided key, there's nothing more to do here, functions
  161|       |     * like evp_keymgmt_util_copy() and evp_pkey_export_to_provider() called
  162|       |     * further down help us find out if they are the same or not.
  163|       |     */
  164|  3.62k|    if (evp_pkey_is_blank(to)) {
  ------------------
  |  |  370|  3.62k|    ((pk)->type == EVP_PKEY_NONE && (pk)->keymgmt == NULL)
  |  |  ------------------
  |  |  |  |   62|  3.62k|#define EVP_PKEY_NONE NID_undef
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  7.25k|#define NID_undef                       0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (370:6): [True: 3.62k, False: 0]
  |  |  |  Branch (370:37): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  165|  3.62k|#ifndef FIPS_MODULE
  166|  3.62k|        if (evp_pkey_is_legacy(from)) {
  ------------------
  |  |  381|  3.62k|    ((pk)->type != EVP_PKEY_NONE && (pk)->keymgmt == NULL)
  |  |  ------------------
  |  |  |  |   62|  3.62k|#define EVP_PKEY_NONE NID_undef
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  7.25k|#define NID_undef                       0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (381:6): [True: 3.62k, False: 0]
  |  |  |  Branch (381:37): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  167|      0|            if (EVP_PKEY_set_type(to, from->type) == 0)
  ------------------
  |  Branch (167:17): [True: 0, False: 0]
  ------------------
  168|      0|                goto end;
  169|      0|        } else
  170|  3.62k|#endif /* !FIPS_MODULE */
  171|  3.62k|        {
  172|  3.62k|            if (EVP_PKEY_set_type_by_keymgmt(to, from->keymgmt) == 0)
  ------------------
  |  Branch (172:17): [True: 0, False: 3.62k]
  ------------------
  173|      0|                goto end;
  174|  3.62k|        }
  175|  3.62k|    }
  176|      0|#ifndef FIPS_MODULE
  177|      0|    else if (evp_pkey_is_legacy(to)) {
  ------------------
  |  |  381|      0|    ((pk)->type != EVP_PKEY_NONE && (pk)->keymgmt == NULL)
  |  |  ------------------
  |  |  |  |   62|      0|#define EVP_PKEY_NONE NID_undef
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|      0|#define NID_undef                       0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (381:6): [True: 0, False: 0]
  |  |  |  Branch (381:37): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  178|      0|        if (to->type != from->type) {
  ------------------
  |  Branch (178:13): [True: 0, False: 0]
  ------------------
  179|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_DIFFERENT_KEY_TYPES);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  180|      0|            goto end;
  181|      0|        }
  182|      0|    }
  183|  3.62k|#endif /* !FIPS_MODULE */
  184|       |
  185|  3.62k|    if (EVP_PKEY_missing_parameters(from)) {
  ------------------
  |  Branch (185:9): [True: 0, False: 3.62k]
  ------------------
  186|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_MISSING_PARAMETERS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  187|      0|        goto end;
  188|      0|    }
  189|       |
  190|  3.62k|    if (!EVP_PKEY_missing_parameters(to)) {
  ------------------
  |  Branch (190:9): [True: 0, False: 3.62k]
  ------------------
  191|      0|        if (EVP_PKEY_parameters_eq(to, from) == 1)
  ------------------
  |  Branch (191:13): [True: 0, False: 0]
  ------------------
  192|      0|            ok = 1;
  193|      0|        else
  194|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_DIFFERENT_PARAMETERS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  195|      0|        goto end;
  196|      0|    }
  197|       |
  198|       |    /* For purely provided keys, we just call the keymgmt utility */
  199|  3.62k|    if (to->keymgmt != NULL && from->keymgmt != NULL) {
  ------------------
  |  Branch (199:9): [True: 3.62k, False: 0]
  |  Branch (199:32): [True: 3.62k, False: 0]
  ------------------
  200|  3.62k|        ok = evp_keymgmt_util_copy(to, (EVP_PKEY *)from, SELECT_PARAMETERS);
  ------------------
  |  |   57|  3.62k|#define SELECT_PARAMETERS OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS
  |  |  ------------------
  |  |  |  |  648|  3.62k|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  ------------------
  ------------------
  201|  3.62k|        goto end;
  202|  3.62k|    }
  203|       |
  204|      0|#ifndef FIPS_MODULE
  205|       |    /*
  206|       |     * If |to| is provided, we know that |from| is legacy at this point.
  207|       |     * Try exporting |from| to |to|'s keymgmt, then use evp_keymgmt_dup()
  208|       |     * to copy the appropriate data to |to|'s keydata.
  209|       |     * We cannot override existing data so do it only if there is no keydata
  210|       |     * in |to| yet.
  211|       |     */
  212|      0|    if (to->keymgmt != NULL && to->keydata == NULL) {
  ------------------
  |  Branch (212:9): [True: 0, False: 0]
  |  Branch (212:32): [True: 0, False: 0]
  ------------------
  213|      0|        EVP_KEYMGMT *to_keymgmt = to->keymgmt;
  214|      0|        void *from_keydata = evp_pkey_export_to_provider((EVP_PKEY *)from, NULL, &to_keymgmt,
  215|      0|            NULL);
  216|       |
  217|       |        /*
  218|       |         * If we get a NULL, it could be an internal error, or it could be
  219|       |         * that there's a key mismatch.  We're pretending the latter...
  220|       |         */
  221|      0|        if (from_keydata == NULL)
  ------------------
  |  Branch (221:13): [True: 0, False: 0]
  ------------------
  222|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_DIFFERENT_KEY_TYPES);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  223|      0|        else
  224|      0|            ok = (to->keydata = evp_keymgmt_dup(to->keymgmt,
  225|      0|                      from_keydata,
  226|      0|                      SELECT_PARAMETERS))
  ------------------
  |  |   57|      0|#define SELECT_PARAMETERS OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS
  |  |  ------------------
  |  |  |  |  648|      0|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  ------------------
  ------------------
  227|      0|                != NULL;
  228|      0|        goto end;
  229|      0|    }
  230|       |
  231|       |    /* Both keys are legacy */
  232|      0|    if (from->ameth != NULL && from->ameth->param_copy != NULL)
  ------------------
  |  Branch (232:9): [True: 0, False: 0]
  |  Branch (232:32): [True: 0, False: 0]
  ------------------
  233|      0|        ok = from->ameth->param_copy(to, from);
  234|      0|#endif /* !FIPS_MODULE */
  235|  3.62k|end:
  236|  3.62k|    EVP_PKEY_free(downgraded_from);
  237|  3.62k|    return ok;
  238|      0|}
EVP_PKEY_missing_parameters:
  241|  14.4k|{
  242|  14.4k|    if (pkey != NULL) {
  ------------------
  |  Branch (242:9): [True: 14.4k, False: 0]
  ------------------
  243|       |#ifdef FIPS_MODULE
  244|       |        return !evp_keymgmt_util_has((EVP_PKEY *)pkey, SELECT_PARAMETERS);
  245|       |#else
  246|  14.4k|        if (pkey->keymgmt != NULL)
  ------------------
  |  Branch (246:13): [True: 14.4k, False: 0]
  ------------------
  247|  14.4k|            return !evp_keymgmt_util_has((EVP_PKEY *)pkey, SELECT_PARAMETERS);
  ------------------
  |  |   57|  14.4k|#define SELECT_PARAMETERS OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS
  |  |  ------------------
  |  |  |  |  648|  14.4k|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  ------------------
  ------------------
  248|      0|        if (pkey->ameth != NULL && pkey->ameth->param_missing != NULL)
  ------------------
  |  Branch (248:13): [True: 0, False: 0]
  |  Branch (248:36): [True: 0, False: 0]
  ------------------
  249|      0|            return pkey->ameth->param_missing(pkey);
  250|      0|#endif /* FIPS_MODULE */
  251|      0|    }
  252|      0|    return 0;
  253|  14.4k|}
EVP_PKEY_eq:
  366|  7.46k|{
  367|       |    /*
  368|       |     * This will just call evp_keymgmt_util_match when legacy support
  369|       |     * is gone.
  370|       |     */
  371|       |
  372|       |    /* Trivial shortcuts */
  373|  7.46k|    if (a == b)
  ------------------
  |  Branch (373:9): [True: 0, False: 7.46k]
  ------------------
  374|      0|        return 1;
  375|  7.46k|    if (a == NULL || b == NULL)
  ------------------
  |  Branch (375:9): [True: 0, False: 7.46k]
  |  Branch (375:22): [True: 0, False: 7.46k]
  ------------------
  376|      0|        return 0;
  377|       |
  378|  7.46k|#ifndef FIPS_MODULE
  379|  7.46k|    if (a->keymgmt != NULL || b->keymgmt != NULL)
  ------------------
  |  Branch (379:9): [True: 7.46k, False: 0]
  |  Branch (379:31): [True: 0, False: 0]
  ------------------
  380|  7.46k|#endif /* !FIPS_MODULE */
  381|  7.46k|    {
  382|  7.46k|        int selection = SELECT_PARAMETERS;
  ------------------
  |  |   57|  7.46k|#define SELECT_PARAMETERS OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS
  |  |  ------------------
  |  |  |  |  648|  7.46k|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  ------------------
  ------------------
  383|       |
  384|  7.46k|        if (evp_keymgmt_util_has((EVP_PKEY *)a, OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  ------------------
  |  |  647|  7.46k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (384:13): [True: 7.46k, False: 0]
  ------------------
  385|  7.46k|            && evp_keymgmt_util_has((EVP_PKEY *)b, OSSL_KEYMGMT_SELECT_PUBLIC_KEY))
  ------------------
  |  |  647|  7.46k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (385:16): [True: 7.46k, False: 0]
  ------------------
  386|  7.46k|            selection |= OSSL_KEYMGMT_SELECT_PUBLIC_KEY;
  ------------------
  |  |  647|  7.46k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  387|      0|        else
  388|      0|            selection |= OSSL_KEYMGMT_SELECT_KEYPAIR;
  ------------------
  |  |  656|      0|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|      0|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|      0|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  389|  7.46k|        return evp_pkey_cmp_any(a, b, selection);
  390|  7.46k|    }
  391|       |
  392|      0|#ifndef FIPS_MODULE
  393|       |    /* All legacy keys */
  394|      0|    if (a->type != b->type)
  ------------------
  |  Branch (394:9): [True: 0, False: 0]
  ------------------
  395|      0|        return -1;
  396|       |
  397|      0|    if (a->ameth != NULL) {
  ------------------
  |  Branch (397:9): [True: 0, False: 0]
  ------------------
  398|      0|        int ret;
  399|       |        /* Compare parameters if the algorithm has them */
  400|      0|        if (a->ameth->param_cmp != NULL) {
  ------------------
  |  Branch (400:13): [True: 0, False: 0]
  ------------------
  401|      0|            ret = a->ameth->param_cmp(a, b);
  402|      0|            if (ret <= 0)
  ------------------
  |  Branch (402:17): [True: 0, False: 0]
  ------------------
  403|      0|                return ret;
  404|      0|        }
  405|       |
  406|      0|        if (a->ameth->pub_cmp != NULL)
  ------------------
  |  Branch (406:13): [True: 0, False: 0]
  ------------------
  407|      0|            return a->ameth->pub_cmp(a, b);
  408|      0|    }
  409|       |
  410|      0|    return -2;
  411|      0|#endif /* !FIPS_MODULE */
  412|      0|}
EVP_PKEY_set_type:
  693|   213k|{
  694|   213k|    return pkey_set_type(pkey, type, NULL, -1, NULL);
  695|   213k|}
EVP_PKEY_assign:
  738|  10.9k|{
  739|  10.9k|#ifndef OPENSSL_NO_EC
  740|  10.9k|    int pktype;
  741|       |
  742|  10.9k|    pktype = EVP_PKEY_type(type);
  743|  10.9k|    if ((key != NULL) && (pktype == EVP_PKEY_EC || pktype == EVP_PKEY_SM2)) {
  ------------------
  |  |   73|  10.9k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|  21.8k|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
                  if ((key != NULL) && (pktype == EVP_PKEY_EC || pktype == EVP_PKEY_SM2)) {
  ------------------
  |  |   74|      0|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1259|      0|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (743:9): [True: 10.9k, False: 0]
  |  Branch (743:27): [True: 10.9k, False: 0]
  |  Branch (743:52): [True: 0, False: 0]
  ------------------
  744|  10.9k|        const EC_GROUP *group = EC_KEY_get0_group(key);
  745|       |
  746|  10.9k|        if (group != NULL) {
  ------------------
  |  Branch (746:13): [True: 10.9k, False: 0]
  ------------------
  747|  10.9k|            int curve = EC_GROUP_get_curve_name(group);
  748|       |
  749|       |            /*
  750|       |             * Regardless of what is requested the SM2 curve must be SM2 type,
  751|       |             * and non SM2 curves are EC type.
  752|       |             */
  753|  10.9k|            if (curve == NID_sm2 && pktype == EVP_PKEY_EC)
  ------------------
  |  | 1259|  21.8k|#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 (753:17): [True: 0, False: 10.9k]
  |  Branch (753:37): [True: 0, False: 0]
  ------------------
  754|      0|                type = EVP_PKEY_SM2;
  ------------------
  |  |   74|      0|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1259|      0|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  755|  10.9k|            else if (curve != NID_sm2 && pktype == EVP_PKEY_SM2)
  ------------------
  |  | 1259|  21.8k|#define NID_sm2         1172
  ------------------
                          else if (curve != NID_sm2 && pktype == EVP_PKEY_SM2)
  ------------------
  |  |   74|  10.9k|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1259|  10.9k|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (755:22): [True: 10.9k, False: 0]
  |  Branch (755:42): [True: 0, False: 10.9k]
  ------------------
  756|      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
  |  |  ------------------
  ------------------
  757|  10.9k|        }
  758|  10.9k|    }
  759|  10.9k|#endif
  760|       |
  761|  10.9k|    if (pkey == NULL || !EVP_PKEY_set_type(pkey, type))
  ------------------
  |  Branch (761:9): [True: 0, False: 10.9k]
  |  Branch (761:25): [True: 0, False: 10.9k]
  ------------------
  762|      0|        return 0;
  763|       |
  764|  10.9k|    pkey->pkey.ptr = key;
  765|  10.9k|    detect_foreign_key(pkey);
  766|       |
  767|       |    return (key != NULL);
  768|  10.9k|}
EVP_PKEY_get_id:
  970|  18.1k|{
  971|  18.1k|    return pkey->type;
  972|  18.1k|}
EVP_PKEY_get_base_id:
  975|  10.9k|{
  976|  10.9k|    return EVP_PKEY_type(pkey->type);
  977|  10.9k|}
evp_pkey_name2type:
 1007|  69.0k|{
 1008|  69.0k|    int type;
 1009|  69.0k|    size_t i;
 1010|       |
 1011|   585k|    for (i = 0; i < OSSL_NELEM(standard_name2type); i++) {
  ------------------
  |  |   14|   585k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1011:17): [True: 556k, False: 29.1k]
  ------------------
 1012|   556k|        if (OPENSSL_strcasecmp(name, standard_name2type[i].ptr) == 0)
  ------------------
  |  Branch (1012:13): [True: 39.9k, False: 516k]
  ------------------
 1013|  39.9k|            return (int)standard_name2type[i].id;
 1014|   556k|    }
 1015|       |
 1016|  29.1k|    if ((type = EVP_PKEY_type(OBJ_sn2nid(name))) != NID_undef)
  ------------------
  |  |   18|  29.1k|#define NID_undef                       0
  ------------------
  |  Branch (1016:9): [True: 4, False: 29.1k]
  ------------------
 1017|      4|        return type;
 1018|  29.1k|    return EVP_PKEY_type(OBJ_ln2nid(name));
 1019|  29.1k|}
EVP_PKEY_is_a:
 1034|   121k|{
 1035|   121k|    if (pkey == NULL)
  ------------------
  |  Branch (1035:9): [True: 0, False: 121k]
  ------------------
 1036|      0|        return 0;
 1037|   121k|    if (pkey->keymgmt == NULL)
  ------------------
  |  Branch (1037:9): [True: 0, False: 121k]
  ------------------
 1038|      0|        return pkey->type == evp_pkey_name2type(name);
 1039|   121k|    return EVP_KEYMGMT_is_a(pkey->keymgmt, name);
 1040|   121k|}
EVP_PKEY_can_sign:
 1059|  3.73k|{
 1060|  3.73k|    if (pkey->keymgmt == NULL) {
  ------------------
  |  Branch (1060:9): [True: 0, False: 3.73k]
  ------------------
 1061|      0|        switch (EVP_PKEY_get_base_id(pkey)) {
 1062|      0|        case EVP_PKEY_RSA:
  ------------------
  |  |   63|      0|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|      0|#define NID_rsaEncryption               6
  |  |  ------------------
  ------------------
  |  Branch (1062:9): [True: 0, False: 0]
  ------------------
 1063|      0|        case EVP_PKEY_RSA_PSS:
  ------------------
  |  |   65|      0|#define EVP_PKEY_RSA_PSS NID_rsassaPss
  |  |  ------------------
  |  |  |  |  583|      0|#define NID_rsassaPss           912
  |  |  ------------------
  ------------------
  |  Branch (1063:9): [True: 0, False: 0]
  ------------------
 1064|      0|            return 1;
 1065|      0|#ifndef OPENSSL_NO_DSA
 1066|      0|        case EVP_PKEY_DSA:
  ------------------
  |  |   66|      0|#define EVP_PKEY_DSA NID_dsa
  |  |  ------------------
  |  |  |  |  136|      0|#define NID_dsa         116
  |  |  ------------------
  ------------------
  |  Branch (1066:9): [True: 0, False: 0]
  ------------------
 1067|      0|            return 1;
 1068|      0|#endif
 1069|      0|#ifndef OPENSSL_NO_EC
 1070|      0|        case EVP_PKEY_ED25519:
  ------------------
  |  |   83|      0|#define EVP_PKEY_ED25519 NID_ED25519
  |  |  ------------------
  |  |  |  | 5731|      0|#define NID_ED25519             1087
  |  |  ------------------
  ------------------
  |  Branch (1070:9): [True: 0, False: 0]
  ------------------
 1071|      0|        case EVP_PKEY_ED448:
  ------------------
  |  |   85|      0|#define EVP_PKEY_ED448 NID_ED448
  |  |  ------------------
  |  |  |  | 5735|      0|#define NID_ED448               1088
  |  |  ------------------
  ------------------
  |  Branch (1071:9): [True: 0, False: 0]
  ------------------
 1072|      0|            return 1;
 1073|      0|        case EVP_PKEY_EC: /* Including SM2 */
  ------------------
  |  |   73|      0|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|      0|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
  |  Branch (1073:9): [True: 0, False: 0]
  ------------------
 1074|      0|            return EC_KEY_can_sign(pkey->pkey.ec);
 1075|      0|#endif
 1076|      0|        default:
  ------------------
  |  Branch (1076:9): [True: 0, False: 0]
  ------------------
 1077|      0|            break;
 1078|      0|        }
 1079|  3.73k|    } else {
 1080|  3.73k|        const OSSL_PROVIDER *prov = EVP_KEYMGMT_get0_provider(pkey->keymgmt);
 1081|  3.73k|        OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
 1082|  3.73k|        EVP_SIGNATURE *sig;
 1083|  3.73k|        const char *name;
 1084|       |
 1085|  3.73k|        name = evp_keymgmt_util_query_operation_name(pkey->keymgmt,
 1086|  3.73k|            OSSL_OP_SIGNATURE);
  ------------------
  |  |  290|  3.73k|#define OSSL_OP_SIGNATURE 12
  ------------------
 1087|  3.73k|        sig = EVP_SIGNATURE_fetch(libctx, name, NULL);
 1088|  3.73k|        if (sig != NULL) {
  ------------------
  |  Branch (1088:13): [True: 3.73k, False: 0]
  ------------------
 1089|  3.73k|            EVP_SIGNATURE_free(sig);
 1090|  3.73k|            return 1;
 1091|  3.73k|        }
 1092|  3.73k|    }
 1093|      0|    return 0;
 1094|  3.73k|}
EVP_PKEY_get_group_name:
 1339|  10.8k|{
 1340|  10.8k|    return EVP_PKEY_get_utf8_string_param(pkey, OSSL_PKEY_PARAM_GROUP_NAME,
  ------------------
  |  |  428|  10.8k|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
 1341|  10.8k|        gname, gname_sz, gname_len);
 1342|  10.8k|}
EVP_PKEY_digestsign_supports_digest:
 1346|  3.62k|{
 1347|  3.62k|    int rv;
 1348|  3.62k|    EVP_MD_CTX *ctx = NULL;
 1349|       |
 1350|  3.62k|    if ((ctx = EVP_MD_CTX_new()) == NULL)
  ------------------
  |  Branch (1350:9): [True: 0, False: 3.62k]
  ------------------
 1351|      0|        return -1;
 1352|       |
 1353|  3.62k|    ERR_set_mark();
 1354|  3.62k|    rv = EVP_DigestSignInit_ex(ctx, NULL, name, libctx,
 1355|  3.62k|        propq, pkey, NULL);
 1356|  3.62k|    ERR_pop_to_mark();
 1357|       |
 1358|  3.62k|    EVP_MD_CTX_free(ctx);
 1359|  3.62k|    return rv;
 1360|  3.62k|}
EVP_PKEY_set1_encoded_public_key:
 1365|  7.25k|{
 1366|  7.25k|    if (pkey == NULL)
  ------------------
  |  Branch (1366:9): [True: 0, False: 7.25k]
  ------------------
 1367|      0|        return 0;
 1368|  7.25k|#ifndef FIPS_MODULE
 1369|  7.25k|    if (evp_pkey_is_provided(pkey))
  ------------------
  |  |  383|  7.25k|    ((pk)->keymgmt != NULL)
  |  |  ------------------
  |  |  |  Branch (383:5): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
 1370|  7.25k|#endif /* !FIPS_MODULE */
 1371|  7.25k|        return EVP_PKEY_set_octet_string_param(pkey,
 1372|  7.25k|            OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY,
  ------------------
  |  |  407|  7.25k|# define OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY "encoded-pub-key"
  ------------------
 1373|  7.25k|            (unsigned char *)pub, publen);
 1374|       |
 1375|      0|#ifndef FIPS_MODULE
 1376|      0|    if (publen > INT_MAX)
  ------------------
  |  Branch (1376:9): [True: 0, False: 0]
  ------------------
 1377|      0|        return 0;
 1378|       |    /* Historically this function was EVP_PKEY_set1_tls_encodedpoint */
 1379|      0|    if (evp_pkey_asn1_ctrl(pkey, ASN1_PKEY_CTRL_SET1_TLS_ENCPT, (int)publen,
  ------------------
  |  | 1512|      0|#define ASN1_PKEY_CTRL_SET1_TLS_ENCPT 0x9
  ------------------
  |  Branch (1379:9): [True: 0, False: 0]
  ------------------
 1380|      0|            (void *)pub)
 1381|      0|        <= 0)
 1382|      0|        return 0;
 1383|      0|    return 1;
 1384|      0|#endif /* !FIPS_MODULE */
 1385|      0|}
EVP_PKEY_get1_encoded_public_key:
 1388|  7.25k|{
 1389|  7.25k|    if (pkey == NULL)
  ------------------
  |  Branch (1389:9): [True: 0, False: 7.25k]
  ------------------
 1390|      0|        return 0;
 1391|  7.25k|#ifndef FIPS_MODULE
 1392|  7.25k|    if (evp_pkey_is_provided(pkey))
  ------------------
  |  |  383|  7.25k|    ((pk)->keymgmt != NULL)
  |  |  ------------------
  |  |  |  Branch (383:5): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
 1393|  7.25k|#endif
 1394|  7.25k|    {
 1395|  7.25k|        size_t return_size = OSSL_PARAM_UNMODIFIED;
  ------------------
  |  |   22|  7.25k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
 1396|  7.25k|        unsigned char *buf;
 1397|       |
 1398|       |        /*
 1399|       |         * We know that this is going to fail, but it will give us a size
 1400|       |         * to allocate.
 1401|       |         */
 1402|  7.25k|        EVP_PKEY_get_octet_string_param(pkey,
 1403|  7.25k|            OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY,
  ------------------
  |  |  407|  7.25k|# define OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY "encoded-pub-key"
  ------------------
 1404|  7.25k|            NULL, 0, &return_size);
 1405|  7.25k|        if (return_size == OSSL_PARAM_UNMODIFIED)
  ------------------
  |  |   22|  7.25k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
  |  Branch (1405:13): [True: 0, False: 7.25k]
  ------------------
 1406|      0|            return 0;
 1407|       |
 1408|  7.25k|        *ppub = NULL;
 1409|  7.25k|        buf = OPENSSL_malloc(return_size);
  ------------------
  |  |  107|  7.25k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1410|  7.25k|        if (buf == NULL)
  ------------------
  |  Branch (1410:13): [True: 0, False: 7.25k]
  ------------------
 1411|      0|            return 0;
 1412|       |
 1413|  7.25k|        if (!EVP_PKEY_get_octet_string_param(pkey,
  ------------------
  |  Branch (1413:13): [True: 0, False: 7.25k]
  ------------------
 1414|  7.25k|                OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY,
  ------------------
  |  |  407|  7.25k|# define OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY "encoded-pub-key"
  ------------------
 1415|  7.25k|                buf, return_size, NULL)) {
 1416|      0|            OPENSSL_free(buf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1417|      0|            return 0;
 1418|      0|        }
 1419|  7.25k|        *ppub = buf;
 1420|  7.25k|        return return_size;
 1421|  7.25k|    }
 1422|       |
 1423|      0|#ifndef FIPS_MODULE
 1424|      0|    {
 1425|      0|        int rv = evp_pkey_asn1_ctrl(pkey, ASN1_PKEY_CTRL_GET1_TLS_ENCPT, 0, ppub);
  ------------------
  |  | 1513|      0|#define ASN1_PKEY_CTRL_GET1_TLS_ENCPT 0xa
  ------------------
 1426|      0|        if (rv <= 0)
  ------------------
  |  Branch (1426:13): [True: 0, False: 0]
  ------------------
 1427|      0|            return 0;
 1428|      0|        return rv;
 1429|      0|    }
 1430|      0|#endif /* !FIPS_MODULE */
 1431|      0|}
EVP_PKEY_new:
 1436|  65.5k|{
 1437|  65.5k|    EVP_PKEY *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  65.5k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1438|       |
 1439|  65.5k|    if (ret == NULL)
  ------------------
  |  Branch (1439:9): [True: 0, False: 65.5k]
  ------------------
 1440|      0|        return NULL;
 1441|       |
 1442|  65.5k|    ret->type = EVP_PKEY_NONE;
  ------------------
  |  |   62|  65.5k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|  65.5k|#define NID_undef                       0
  |  |  ------------------
  ------------------
 1443|  65.5k|    ret->save_type = EVP_PKEY_NONE;
  ------------------
  |  |   62|  65.5k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|  65.5k|#define NID_undef                       0
  |  |  ------------------
  ------------------
 1444|       |
 1445|  65.5k|    if (!CRYPTO_NEW_REF(&ret->references, 1))
  ------------------
  |  Branch (1445:9): [True: 0, False: 65.5k]
  ------------------
 1446|      0|        goto err;
 1447|       |
 1448|  65.5k|    ret->lock = CRYPTO_THREAD_lock_new();
 1449|  65.5k|    if (ret->lock == NULL) {
  ------------------
  |  Branch (1449:9): [True: 0, False: 65.5k]
  ------------------
 1450|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1451|      0|        goto err;
 1452|      0|    }
 1453|       |
 1454|  65.5k|#ifndef FIPS_MODULE
 1455|  65.5k|    ret->save_parameters = 1;
 1456|  65.5k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_EVP_PKEY, ret, &ret->ex_data)) {
  ------------------
  |  |  269|  65.5k|#define CRYPTO_EX_INDEX_EVP_PKEY 17
  ------------------
  |  Branch (1456:9): [True: 0, False: 65.5k]
  ------------------
 1457|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1458|      0|        goto err;
 1459|      0|    }
 1460|  65.5k|#endif
 1461|  65.5k|    return ret;
 1462|       |
 1463|      0|err:
 1464|      0|    CRYPTO_FREE_REF(&ret->references);
 1465|      0|    CRYPTO_THREAD_lock_free(ret->lock);
 1466|      0|    OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1467|       |    return NULL;
 1468|  65.5k|}
EVP_PKEY_set_type_by_keymgmt:
 1601|  47.3k|{
 1602|  47.3k|#ifndef FIPS_MODULE
 1603|  47.3k|#define EVP_PKEY_TYPE_STR str[0]
 1604|  47.3k|#define EVP_PKEY_TYPE_STRLEN (str[0] == NULL ? -1 : (int)strlen(str[0]))
 1605|       |    /*
 1606|       |     * Find at most two strings that have an associated EVP_PKEY_ASN1_METHOD
 1607|       |     * Ideally, only one should be found.  If two (or more) are found, the
 1608|       |     * match is ambiguous.  This should never happen, but...
 1609|       |     */
 1610|  47.3k|    const char *str[2] = { NULL, NULL };
 1611|       |
 1612|  47.3k|    if (!EVP_KEYMGMT_names_do_all(keymgmt, find_ameth, &str)
  ------------------
  |  Branch (1612:9): [True: 0, False: 47.3k]
  ------------------
 1613|  47.3k|        || str[1] != NULL) {
  ------------------
  |  Branch (1613:12): [True: 0, False: 47.3k]
  ------------------
 1614|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1615|      0|        return 0;
 1616|      0|    }
 1617|       |#else
 1618|       |#define EVP_PKEY_TYPE_STR NULL
 1619|       |#define EVP_PKEY_TYPE_STRLEN -1
 1620|       |#endif
 1621|  47.3k|    return pkey_set_type(pkey, EVP_PKEY_NONE,
  ------------------
  |  |   62|  47.3k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|  47.3k|#define NID_undef                       0
  |  |  ------------------
  ------------------
 1622|  47.3k|        EVP_PKEY_TYPE_STR, EVP_PKEY_TYPE_STRLEN,
  ------------------
  |  | 1603|  47.3k|#define EVP_PKEY_TYPE_STR str[0]
  ------------------
                      EVP_PKEY_TYPE_STR, EVP_PKEY_TYPE_STRLEN,
  ------------------
  |  | 1604|  47.3k|#define EVP_PKEY_TYPE_STRLEN (str[0] == NULL ? -1 : (int)strlen(str[0]))
  |  |  ------------------
  |  |  |  Branch (1604:31): [True: 14.5k, False: 32.7k]
  |  |  ------------------
  ------------------
 1623|  47.3k|        keymgmt);
 1624|       |
 1625|  47.3k|#undef EVP_PKEY_TYPE_STR
 1626|  47.3k|#undef EVP_PKEY_TYPE_STRLEN
 1627|  47.3k|}
EVP_PKEY_up_ref:
 1630|   267k|{
 1631|   267k|    int i;
 1632|       |
 1633|   267k|    if (CRYPTO_UP_REF(&pkey->references, &i) <= 0)
  ------------------
  |  Branch (1633:9): [True: 0, False: 267k]
  ------------------
 1634|      0|        return 0;
 1635|       |
 1636|   267k|    REF_PRINT_COUNT("EVP_PKEY", i, pkey);
  ------------------
  |  |  301|   267k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   267k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|   267k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|   267k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1637|   267k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|   267k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 267k]
  |  |  ------------------
  ------------------
 1638|   267k|    return ((i > 1) ? 1 : 0);
  ------------------
  |  Branch (1638:13): [True: 267k, False: 0]
  ------------------
 1639|   267k|}
evp_pkey_free_legacy:
 1704|  87.3k|{
 1705|  87.3k|    const EVP_PKEY_ASN1_METHOD *ameth = x->ameth;
 1706|       |
 1707|  87.3k|    if (ameth == NULL && x->legacy_cache_pkey.ptr != NULL)
  ------------------
  |  Branch (1707:9): [True: 69.0k, False: 18.2k]
  |  Branch (1707:26): [True: 0, False: 69.0k]
  ------------------
 1708|      0|        ameth = evp_pkey_asn1_find(x->type);
 1709|       |
 1710|  87.3k|    if (ameth != NULL) {
  ------------------
  |  Branch (1710:9): [True: 18.2k, False: 69.0k]
  ------------------
 1711|  18.2k|        if (x->legacy_cache_pkey.ptr != NULL) {
  ------------------
  |  Branch (1711:13): [True: 0, False: 18.2k]
  ------------------
 1712|       |            /*
 1713|       |             * We should never have both a legacy origin key, and a key in the
 1714|       |             * legacy cache.
 1715|       |             */
 1716|      0|            assert(x->pkey.ptr == NULL);
  ------------------
  |  Branch (1716:13): [True: 0, False: 0]
  |  Branch (1716:13): [True: 0, False: 0]
  ------------------
 1717|       |            /*
 1718|       |             * For the purposes of freeing we make the legacy cache look like
 1719|       |             * a legacy origin key.
 1720|       |             */
 1721|      0|            x->pkey = x->legacy_cache_pkey;
 1722|      0|            x->legacy_cache_pkey.ptr = NULL;
 1723|      0|        }
 1724|  18.2k|        if (ameth->pkey_free != NULL)
  ------------------
  |  Branch (1724:13): [True: 18.2k, False: 0]
  ------------------
 1725|  18.2k|            ameth->pkey_free(x);
 1726|       |        x->pkey.ptr = NULL;
 1727|  18.2k|    }
 1728|  87.3k|}
EVP_PKEY_free:
 1749|   921k|{
 1750|   921k|    int i;
 1751|       |
 1752|   921k|    if (x == NULL)
  ------------------
  |  Branch (1752:9): [True: 588k, False: 333k]
  ------------------
 1753|   588k|        return;
 1754|       |
 1755|   333k|    CRYPTO_DOWN_REF(&x->references, &i);
 1756|   333k|    REF_PRINT_COUNT("EVP_PKEY", i, x);
  ------------------
  |  |  301|   333k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   333k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|   333k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|   333k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1757|   333k|    if (i > 0)
  ------------------
  |  Branch (1757:9): [True: 267k, False: 65.5k]
  ------------------
 1758|   267k|        return;
 1759|  65.5k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  65.5k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 65.5k]
  |  |  ------------------
  ------------------
 1760|  65.5k|    evp_pkey_free_it(x);
 1761|  65.5k|#ifndef FIPS_MODULE
 1762|  65.5k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_EVP_PKEY, x, &x->ex_data);
  ------------------
  |  |  269|  65.5k|#define CRYPTO_EX_INDEX_EVP_PKEY 17
  ------------------
 1763|  65.5k|#endif
 1764|  65.5k|    CRYPTO_THREAD_lock_free(x->lock);
 1765|  65.5k|    CRYPTO_FREE_REF(&x->references);
 1766|  65.5k|#ifndef FIPS_MODULE
 1767|  65.5k|    sk_X509_ATTRIBUTE_pop_free(x->attributes, X509_ATTRIBUTE_free);
  ------------------
  |  |  287|  65.5k|#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))
  ------------------
 1768|  65.5k|#endif
 1769|  65.5k|    OPENSSL_free(x);
  ------------------
  |  |  132|  65.5k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1770|  65.5k|}
evp_pkey_export_to_provider:
 1807|  50.8k|{
 1808|  50.8k|    EVP_KEYMGMT *allocated_keymgmt = NULL;
 1809|  50.8k|    EVP_KEYMGMT *tmp_keymgmt = NULL;
 1810|  50.8k|    int selection = OSSL_KEYMGMT_SELECT_ALL;
  ------------------
  |  |  658|  50.8k|    (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  ------------------
  |  |  |  |  656|  50.8k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  |  |  ------------------
  |  |  |  |  |  |  646|  50.8k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  |  |  ------------------
  |  |  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  |  |  ------------------
  |  |  |  |  |  |  647|  50.8k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  ------------------
  |  |  |  |  653|  50.8k|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  |  |  ------------------
  |  |  |  |  |  |  648|  50.8k|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  |  |  ------------------
  |  |  |  |  654|  50.8k|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  649|  50.8k|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1811|  50.8k|    void *keydata = NULL;
 1812|  50.8k|    int check;
 1813|       |
 1814|  50.8k|    if (pk == NULL)
  ------------------
  |  Branch (1814:9): [True: 0, False: 50.8k]
  ------------------
 1815|      0|        return NULL;
 1816|       |
 1817|       |    /* No key data => nothing to export */
 1818|  50.8k|    check = 1;
 1819|  50.8k|#ifndef FIPS_MODULE
 1820|  50.8k|    check = check && pk->pkey.ptr == NULL;
  ------------------
  |  Branch (1820:13): [True: 50.8k, False: 0]
  |  Branch (1820:22): [True: 50.8k, False: 0]
  ------------------
 1821|  50.8k|#endif
 1822|  50.8k|    check = check && pk->keydata == NULL;
  ------------------
  |  Branch (1822:13): [True: 50.8k, False: 0]
  |  Branch (1822:22): [True: 0, False: 50.8k]
  ------------------
 1823|  50.8k|    if (check)
  ------------------
  |  Branch (1823:9): [True: 0, False: 50.8k]
  ------------------
 1824|      0|        return NULL;
 1825|       |
 1826|  50.8k|#ifndef FIPS_MODULE
 1827|  50.8k|    if (pk->pkey.ptr != NULL) {
  ------------------
  |  Branch (1827:9): [True: 0, False: 50.8k]
  ------------------
 1828|       |        /*
 1829|       |         * If the legacy key doesn't have an dirty counter or export function,
 1830|       |         * give up
 1831|       |         */
 1832|      0|        if (pk->ameth->dirty_cnt == NULL || pk->ameth->export_to == NULL)
  ------------------
  |  Branch (1832:13): [True: 0, False: 0]
  |  Branch (1832:45): [True: 0, False: 0]
  ------------------
 1833|      0|            return NULL;
 1834|      0|    }
 1835|  50.8k|#endif
 1836|       |
 1837|  50.8k|    if (keymgmt != NULL) {
  ------------------
  |  Branch (1837:9): [True: 50.8k, False: 0]
  ------------------
 1838|  50.8k|        tmp_keymgmt = *keymgmt;
 1839|  50.8k|        *keymgmt = NULL;
 1840|  50.8k|    }
 1841|       |
 1842|       |    /*
 1843|       |     * If no keymgmt was given or found, get a default keymgmt.  We do so by
 1844|       |     * letting EVP_PKEY_CTX_new_from_pkey() do it for us, then we steal it.
 1845|       |     */
 1846|  50.8k|    if (tmp_keymgmt == NULL) {
  ------------------
  |  Branch (1846:9): [True: 0, False: 50.8k]
  ------------------
 1847|      0|        EVP_PKEY_CTX *ctx = EVP_PKEY_CTX_new_from_pkey(libctx, pk, propquery);
 1848|       |
 1849|      0|        if (ctx == NULL)
  ------------------
  |  Branch (1849:13): [True: 0, False: 0]
  ------------------
 1850|      0|            goto end;
 1851|      0|        allocated_keymgmt = tmp_keymgmt = ctx->keymgmt;
 1852|      0|        ctx->keymgmt = NULL;
 1853|      0|        EVP_PKEY_CTX_free(ctx);
 1854|      0|    }
 1855|       |
 1856|       |    /* If there's still no keymgmt to be had, give up */
 1857|  50.8k|    if (tmp_keymgmt == NULL)
  ------------------
  |  Branch (1857:9): [True: 0, False: 50.8k]
  ------------------
 1858|      0|        goto end;
 1859|       |
 1860|  50.8k|#ifndef FIPS_MODULE
 1861|  50.8k|    if (pk->pkey.ptr != NULL) {
  ------------------
  |  Branch (1861:9): [True: 0, False: 50.8k]
  ------------------
 1862|      0|        OP_CACHE_ELEM *op;
 1863|      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 }
  ------------------
 1864|      0|        OSSL_PARAM *p = NULL;
 1865|       |
 1866|       |        /*
 1867|       |         * If the legacy "origin" hasn't changed since last time, we try
 1868|       |         * to find our keymgmt in the operation cache.  If it has changed,
 1869|       |         * |i| remains zero, and we will clear the cache further down.
 1870|       |         */
 1871|      0|        if (pk->ameth->dirty_cnt(pk) == pk->dirty_cnt_copy) {
  ------------------
  |  Branch (1871:13): [True: 0, False: 0]
  ------------------
 1872|      0|            if (!CRYPTO_THREAD_read_lock(pk->lock))
  ------------------
  |  Branch (1872:17): [True: 0, False: 0]
  ------------------
 1873|      0|                goto end;
 1874|      0|            op = evp_keymgmt_util_find_operation_cache(pk, tmp_keymgmt,
 1875|      0|                selection);
 1876|       |
 1877|       |            /*
 1878|       |             * If |tmp_keymgmt| is present in the operation cache, it means
 1879|       |             * that export doesn't need to be redone.  In that case, we take
 1880|       |             * token copies of the cached pointers, to have token success
 1881|       |             * values to return. It is possible (e.g. in a no-cached-fetch
 1882|       |             * build), for op->keymgmt to be a different pointer to tmp_keymgmt
 1883|       |             * even though the name/provider must be the same. In other words
 1884|       |             * the keymgmt instance may be different but still equivalent, i.e.
 1885|       |             * same algorithm/provider instance - but we make the simplifying
 1886|       |             * assumption that the keydata can be used with either keymgmt
 1887|       |             * instance. Not doing so introduces significant complexity and
 1888|       |             * probably requires refactoring - since we would have to ripple
 1889|       |             * the change in keymgmt instance up the call chain.
 1890|       |             */
 1891|      0|            if (op != NULL && op->keymgmt != NULL) {
  ------------------
  |  Branch (1891:17): [True: 0, False: 0]
  |  Branch (1891:31): [True: 0, False: 0]
  ------------------
 1892|      0|                keydata = op->keydata;
 1893|      0|                CRYPTO_THREAD_unlock(pk->lock);
 1894|      0|                goto end;
 1895|      0|            }
 1896|      0|            CRYPTO_THREAD_unlock(pk->lock);
 1897|      0|        }
 1898|       |
 1899|       |        /* Make sure that the keymgmt key type matches the legacy NID */
 1900|      0|        if (!EVP_KEYMGMT_is_a(tmp_keymgmt, OBJ_nid2sn(pk->type)))
  ------------------
  |  Branch (1900:13): [True: 0, False: 0]
  ------------------
 1901|      0|            goto end;
 1902|       |
 1903|      0|        if (strcmp(OSSL_PROVIDER_get0_name(EVP_KEYMGMT_get0_provider(tmp_keymgmt)), "default") == 0) {
  ------------------
  |  Branch (1903:13): [True: 0, False: 0]
  ------------------
 1904|       |            /*
 1905|       |             * We attempt to pass the low-level object to the keymgmt. We only
 1906|       |             * support this via an internal use only parameter. We break the
 1907|       |             * normal rules that prevent passing complex objects via OSSL_PARAM,
 1908|       |             * but this is only for the default provider where we can get away
 1909|       |             * with this. This is necessary here for backwards compatibility
 1910|       |             * reasons.
 1911|       |             */
 1912|      0|            params[0] = OSSL_PARAM_construct_octet_ptr("legacy-object",
 1913|      0|                &pk->pkey.ptr, sizeof(pk->pkey.ptr));
 1914|      0|            p = params;
 1915|      0|        }
 1916|      0|        keydata = evp_keymgmt_newdata(tmp_keymgmt, p);
 1917|      0|        if (keydata == NULL)
  ------------------
  |  Branch (1917:13): [True: 0, False: 0]
  ------------------
 1918|      0|            goto end;
 1919|       |
 1920|       |        /*
 1921|       |         * We skip the export if the key data we got back is actually the same
 1922|       |         * as the low level object we passed in
 1923|       |         */
 1924|      0|        if (keydata != pk->pkey.ptr
  ------------------
  |  Branch (1924:13): [True: 0, False: 0]
  ------------------
 1925|      0|            && !pk->ameth->export_to(pk, keydata, tmp_keymgmt->import, libctx, propquery)) {
  ------------------
  |  Branch (1925:16): [True: 0, False: 0]
  ------------------
 1926|      0|            evp_keymgmt_freedata(tmp_keymgmt, keydata);
 1927|      0|            keydata = NULL;
 1928|      0|            goto end;
 1929|      0|        }
 1930|       |
 1931|       |        /*
 1932|       |         * If the dirty counter changed since last time, then clear the
 1933|       |         * operation cache.  In that case, we know that |i| is zero.  Just
 1934|       |         * in case this is a re-export, we increment then decrement the
 1935|       |         * keymgmt reference counter.
 1936|       |         */
 1937|      0|        if (!EVP_KEYMGMT_up_ref(tmp_keymgmt)) { /* refcnt++ */
  ------------------
  |  Branch (1937:13): [True: 0, False: 0]
  ------------------
 1938|      0|            evp_keymgmt_freedata(tmp_keymgmt, keydata);
 1939|      0|            keydata = NULL;
 1940|      0|            goto end;
 1941|      0|        }
 1942|       |
 1943|      0|        if (!CRYPTO_THREAD_write_lock(pk->lock))
  ------------------
  |  Branch (1943:13): [True: 0, False: 0]
  ------------------
 1944|      0|            goto end;
 1945|       |
 1946|      0|        if (pk->ameth->dirty_cnt(pk) != pk->dirty_cnt_copy)
  ------------------
  |  Branch (1946:13): [True: 0, False: 0]
  ------------------
 1947|      0|            evp_keymgmt_util_clear_operation_cache(pk);
 1948|       |
 1949|      0|        EVP_KEYMGMT_free(tmp_keymgmt); /* refcnt-- */
 1950|       |
 1951|       |        /* Check to make sure some other thread didn't get there first */
 1952|      0|        op = evp_keymgmt_util_find_operation_cache(pk, tmp_keymgmt, selection);
 1953|      0|        if (op != NULL && op->keymgmt != NULL) {
  ------------------
  |  Branch (1953:13): [True: 0, False: 0]
  |  Branch (1953:27): [True: 0, False: 0]
  ------------------
 1954|      0|            void *tmp_keydata = op->keydata;
 1955|       |
 1956|      0|            CRYPTO_THREAD_unlock(pk->lock);
 1957|      0|            evp_keymgmt_freedata(tmp_keymgmt, keydata);
 1958|      0|            keydata = tmp_keydata;
 1959|      0|            goto end;
 1960|      0|        }
 1961|       |
 1962|       |        /* Add the new export to the operation cache */
 1963|      0|        if (!evp_keymgmt_util_cache_keydata(pk, tmp_keymgmt, keydata,
  ------------------
  |  Branch (1963:13): [True: 0, False: 0]
  ------------------
 1964|      0|                selection)) {
 1965|      0|            CRYPTO_THREAD_unlock(pk->lock);
 1966|      0|            evp_keymgmt_freedata(tmp_keymgmt, keydata);
 1967|      0|            keydata = NULL;
 1968|      0|            goto end;
 1969|      0|        }
 1970|       |
 1971|       |        /* Synchronize the dirty count */
 1972|      0|        pk->dirty_cnt_copy = pk->ameth->dirty_cnt(pk);
 1973|       |
 1974|      0|        CRYPTO_THREAD_unlock(pk->lock);
 1975|      0|        goto end;
 1976|      0|    }
 1977|  50.8k|#endif /* FIPS_MODULE */
 1978|       |
 1979|  50.8k|    keydata = evp_keymgmt_util_export_to_provider(pk, tmp_keymgmt, selection);
 1980|       |
 1981|  50.8k|end:
 1982|       |    /*
 1983|       |     * If nothing was exported, |tmp_keymgmt| might point at a freed
 1984|       |     * EVP_KEYMGMT, so we clear it to be safe.  It shouldn't be useful for
 1985|       |     * the caller either way in that case.
 1986|       |     */
 1987|  50.8k|    if (keydata == NULL)
  ------------------
  |  Branch (1987:9): [True: 0, False: 50.8k]
  ------------------
 1988|      0|        tmp_keymgmt = NULL;
 1989|       |
 1990|  50.8k|    if (keymgmt != NULL && tmp_keymgmt != NULL) {
  ------------------
  |  Branch (1990:9): [True: 50.8k, False: 0]
  |  Branch (1990:28): [True: 50.8k, False: 0]
  ------------------
 1991|  50.8k|        *keymgmt = tmp_keymgmt;
 1992|  50.8k|        allocated_keymgmt = NULL;
 1993|  50.8k|    }
 1994|       |
 1995|  50.8k|    EVP_KEYMGMT_free(allocated_keymgmt);
 1996|  50.8k|    return keydata;
 1997|  50.8k|}
evp_pkey_get_legacy:
 2089|  10.9k|{
 2090|  10.9k|    EVP_PKEY *tmp_copy = NULL;
 2091|  10.9k|    void *ret = NULL;
 2092|       |
 2093|  10.9k|    if (!ossl_assert(pk != NULL))
  ------------------
  |  |   52|  10.9k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  10.9k|    __FILE__, __LINE__)
  ------------------
  |  Branch (2093:9): [True: 0, False: 10.9k]
  ------------------
 2094|      0|        return NULL;
 2095|       |
 2096|       |    /*
 2097|       |     * If this isn't an assigned provider side key, we just use any existing
 2098|       |     * origin legacy key.
 2099|       |     */
 2100|  10.9k|    if (!evp_pkey_is_assigned(pk))
  ------------------
  |  |  375|  10.9k|    ((pk)->pkey.ptr != NULL || (pk)->keydata != NULL)
  |  |  ------------------
  |  |  |  Branch (375:6): [True: 10.9k, False: 0]
  |  |  |  Branch (375:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2101|      0|        return NULL;
 2102|  10.9k|    if (!evp_pkey_is_provided(pk))
  ------------------
  |  |  383|  10.9k|    ((pk)->keymgmt != NULL)
  ------------------
  |  Branch (2102:9): [True: 10.9k, False: 0]
  ------------------
 2103|  10.9k|        return pk->pkey.ptr;
 2104|       |
 2105|      0|    if (!CRYPTO_THREAD_read_lock(pk->lock))
  ------------------
  |  Branch (2105:9): [True: 0, False: 0]
  ------------------
 2106|      0|        return NULL;
 2107|       |
 2108|      0|    ret = pk->legacy_cache_pkey.ptr;
 2109|       |
 2110|      0|    if (!CRYPTO_THREAD_unlock(pk->lock))
  ------------------
  |  Branch (2110:9): [True: 0, False: 0]
  ------------------
 2111|      0|        return NULL;
 2112|       |
 2113|      0|    if (ret != NULL)
  ------------------
  |  Branch (2113:9): [True: 0, False: 0]
  ------------------
 2114|      0|        return ret;
 2115|       |
 2116|      0|    if (!evp_pkey_copy_downgraded(&tmp_copy, pk))
  ------------------
  |  Branch (2116:9): [True: 0, False: 0]
  ------------------
 2117|      0|        goto err;
 2118|       |
 2119|      0|    if (!CRYPTO_THREAD_write_lock(pk->lock))
  ------------------
  |  Branch (2119:9): [True: 0, False: 0]
  ------------------
 2120|      0|        goto err;
 2121|       |
 2122|       |    /* Check again in case some other thread has updated it in the meantime */
 2123|      0|    ret = pk->legacy_cache_pkey.ptr;
 2124|      0|    if (ret == NULL) {
  ------------------
  |  Branch (2124:9): [True: 0, False: 0]
  ------------------
 2125|       |        /* Steal the legacy key reference from the temporary copy */
 2126|      0|        ret = pk->legacy_cache_pkey.ptr = tmp_copy->pkey.ptr;
 2127|      0|        tmp_copy->pkey.ptr = NULL;
 2128|      0|    }
 2129|       |
 2130|      0|    if (!CRYPTO_THREAD_unlock(pk->lock)) {
  ------------------
  |  Branch (2130:9): [True: 0, False: 0]
  ------------------
 2131|      0|        ret = NULL;
 2132|      0|        goto err;
 2133|      0|    }
 2134|       |
 2135|      0|err:
 2136|      0|    EVP_PKEY_free(tmp_copy);
 2137|       |
 2138|      0|    return ret;
 2139|      0|}
EVP_PKEY_get_octet_string_param:
 2194|  18.1k|{
 2195|  18.1k|    OSSL_PARAM params[2];
 2196|  18.1k|    int ret1 = 0, ret2 = 0;
 2197|       |
 2198|  18.1k|    if (key_name == NULL)
  ------------------
  |  Branch (2198:9): [True: 0, False: 18.1k]
  ------------------
 2199|      0|        return 0;
 2200|       |
 2201|  18.1k|    params[0] = OSSL_PARAM_construct_octet_string(key_name, buf, max_buf_sz);
 2202|  18.1k|    params[1] = OSSL_PARAM_construct_end();
 2203|  18.1k|    if ((ret1 = EVP_PKEY_get_params(pkey, params)))
  ------------------
  |  Branch (2203:9): [True: 18.1k, False: 0]
  ------------------
 2204|  18.1k|        ret2 = OSSL_PARAM_modified(params);
 2205|  18.1k|    if (ret2 && out_len != NULL)
  ------------------
  |  Branch (2205:9): [True: 18.1k, False: 0]
  |  Branch (2205:17): [True: 10.8k, False: 7.25k]
  ------------------
 2206|  10.8k|        *out_len = params[0].return_size;
 2207|  18.1k|    return ret1 && ret2;
  ------------------
  |  Branch (2207:12): [True: 18.1k, False: 0]
  |  Branch (2207:20): [True: 18.1k, False: 0]
  ------------------
 2208|  18.1k|}
EVP_PKEY_get_utf8_string_param:
 2213|  10.8k|{
 2214|  10.8k|    OSSL_PARAM params[2];
 2215|  10.8k|    int ret1 = 0, ret2 = 0;
 2216|       |
 2217|  10.8k|    if (key_name == NULL)
  ------------------
  |  Branch (2217:9): [True: 0, False: 10.8k]
  ------------------
 2218|      0|        return 0;
 2219|       |
 2220|  10.8k|    params[0] = OSSL_PARAM_construct_utf8_string(key_name, str, max_buf_sz);
 2221|  10.8k|    params[1] = OSSL_PARAM_construct_end();
 2222|  10.8k|    if ((ret1 = EVP_PKEY_get_params(pkey, params)))
  ------------------
  |  Branch (2222:9): [True: 10.8k, False: 0]
  ------------------
 2223|  10.8k|        ret2 = OSSL_PARAM_modified(params);
 2224|  10.8k|    if (ret2 && out_len != NULL)
  ------------------
  |  Branch (2224:9): [True: 10.8k, False: 0]
  |  Branch (2224:17): [True: 0, False: 10.8k]
  ------------------
 2225|      0|        *out_len = params[0].return_size;
 2226|       |
 2227|  10.8k|    if (ret2 && params[0].return_size == max_buf_sz)
  ------------------
  |  Branch (2227:9): [True: 10.8k, False: 0]
  |  Branch (2227:17): [True: 0, False: 10.8k]
  ------------------
 2228|       |        /* There was no space for a NUL byte */
 2229|      0|        return 0;
 2230|       |    /* Add a terminating NUL byte for good measure */
 2231|  10.8k|    if (ret2 && str != NULL)
  ------------------
  |  Branch (2231:9): [True: 10.8k, False: 0]
  |  Branch (2231:17): [True: 10.8k, False: 0]
  ------------------
 2232|  10.8k|        str[params[0].return_size] = '\0';
 2233|       |
 2234|  10.8k|    return ret1 && ret2;
  ------------------
  |  Branch (2234:12): [True: 10.8k, False: 0]
  |  Branch (2234:20): [True: 10.8k, False: 0]
  ------------------
 2235|  10.8k|}
EVP_PKEY_set_octet_string_param:
 2328|  7.25k|{
 2329|  7.25k|    OSSL_PARAM params[2];
 2330|       |
 2331|  7.25k|    if (key_name == NULL)
  ------------------
  |  Branch (2331:9): [True: 0, False: 7.25k]
  ------------------
 2332|      0|        return 0;
 2333|       |
 2334|  7.25k|    params[0] = OSSL_PARAM_construct_octet_string(key_name,
 2335|  7.25k|        (unsigned char *)buf, bsize);
 2336|  7.25k|    params[1] = OSSL_PARAM_construct_end();
 2337|  7.25k|    return EVP_PKEY_set_params(pkey, params);
 2338|  7.25k|}
EVP_PKEY_set_params:
 2348|  7.25k|{
 2349|  7.25k|    if (pkey != NULL) {
  ------------------
  |  Branch (2349:9): [True: 7.25k, False: 0]
  ------------------
 2350|  7.25k|        if (evp_pkey_is_provided(pkey)) {
  ------------------
  |  |  383|  7.25k|    ((pk)->keymgmt != NULL)
  |  |  ------------------
  |  |  |  Branch (383:5): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
 2351|  7.25k|            pkey->dirty_cnt++;
 2352|  7.25k|            return evp_keymgmt_set_params(pkey->keymgmt, pkey->keydata, params);
 2353|  7.25k|        }
 2354|  7.25k|#ifndef FIPS_MODULE
 2355|       |        /*
 2356|       |         * We will hopefully never find the need to set individual data in
 2357|       |         * EVP_PKEYs with a legacy internal key, but we can't be entirely
 2358|       |         * sure.  This bit of code can be enabled if we find the need.  If
 2359|       |         * not, it can safely be removed when #legacy support is removed.
 2360|       |         */
 2361|       |#if 0
 2362|       |        else if (evp_pkey_is_legacy(pkey)) {
 2363|       |            return evp_pkey_set_params_to_ctrl(pkey, params);
 2364|       |        }
 2365|       |#endif
 2366|  7.25k|#endif
 2367|  7.25k|    }
 2368|  7.25k|    ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2369|      0|    return 0;
 2370|  7.25k|}
EVP_PKEY_get_params:
 2380|  29.0k|{
 2381|  29.0k|    if (pkey != NULL) {
  ------------------
  |  Branch (2381:9): [True: 29.0k, False: 0]
  ------------------
 2382|  29.0k|        if (evp_pkey_is_provided(pkey))
  ------------------
  |  |  383|  29.0k|    ((pk)->keymgmt != NULL)
  |  |  ------------------
  |  |  |  Branch (383:5): [True: 29.0k, False: 0]
  |  |  ------------------
  ------------------
 2383|  29.0k|            return evp_keymgmt_get_params(pkey->keymgmt, pkey->keydata, params) > 0;
 2384|      0|#ifndef FIPS_MODULE
 2385|      0|        else if (evp_pkey_is_legacy(pkey))
  ------------------
  |  |  381|      0|    ((pk)->type != EVP_PKEY_NONE && (pk)->keymgmt == NULL)
  |  |  ------------------
  |  |  |  |   62|      0|#define EVP_PKEY_NONE NID_undef
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|      0|#define NID_undef                       0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (381:6): [True: 0, False: 0]
  |  |  |  Branch (381:37): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2386|      0|            return evp_pkey_get_params_to_ctrl(pkey, params) > 0;
 2387|  29.0k|#endif
 2388|  29.0k|    }
 2389|  29.0k|    ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2390|      0|    return 0;
 2391|  29.0k|}
p_lib.c:evp_pkey_cmp_any:
  262|  7.46k|{
  263|       |#ifdef FIPS_MODULE
  264|       |    return evp_keymgmt_util_match((EVP_PKEY *)a, (EVP_PKEY *)b, selection);
  265|       |#else
  266|  7.46k|    EVP_KEYMGMT *keymgmt1 = NULL, *keymgmt2 = NULL;
  267|  7.46k|    void *keydata1 = NULL, *keydata2 = NULL, *tmp_keydata = NULL;
  268|       |
  269|       |    /* If none of them are provided, this function shouldn't have been called */
  270|  7.46k|    if (!ossl_assert(evp_pkey_is_provided(a) || evp_pkey_is_provided(b)))
  ------------------
  |  |   52|  7.46k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 7.46k, False: 0]
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|  7.46k|    __FILE__, __LINE__)
  ------------------
  |  Branch (270:9): [True: 0, False: 7.46k]
  ------------------
  271|      0|        return -2;
  272|       |
  273|       |    /* For purely provided keys, we just call the keymgmt utility */
  274|  7.46k|    if (evp_pkey_is_provided(a) && evp_pkey_is_provided(b))
  ------------------
  |  |  383|  14.9k|    ((pk)->keymgmt != NULL)
  |  |  ------------------
  |  |  |  Branch (383:5): [True: 7.46k, False: 0]
  |  |  ------------------
  ------------------
                  if (evp_pkey_is_provided(a) && evp_pkey_is_provided(b))
  ------------------
  |  |  383|  7.46k|    ((pk)->keymgmt != NULL)
  |  |  ------------------
  |  |  |  Branch (383:5): [True: 7.46k, False: 0]
  |  |  ------------------
  ------------------
  275|  7.46k|        return evp_keymgmt_util_match((EVP_PKEY *)a, (EVP_PKEY *)b, selection);
  276|       |
  277|       |    /*
  278|       |     * At this point, one of them is provided, the other not.  This allows
  279|       |     * us to compare types using legacy NIDs.
  280|       |     */
  281|      0|    if (evp_pkey_is_legacy(a)
  ------------------
  |  |  381|      0|    ((pk)->type != EVP_PKEY_NONE && (pk)->keymgmt == NULL)
  |  |  ------------------
  |  |  |  |   62|      0|#define EVP_PKEY_NONE NID_undef
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|      0|#define NID_undef                       0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (381:6): [True: 0, False: 0]
  |  |  |  Branch (381:37): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  282|      0|        && !EVP_KEYMGMT_is_a(b->keymgmt, OBJ_nid2sn(a->type)))
  ------------------
  |  Branch (282:12): [True: 0, False: 0]
  ------------------
  283|      0|        return -1; /* not the same key type */
  284|      0|    if (evp_pkey_is_legacy(b)
  ------------------
  |  |  381|      0|    ((pk)->type != EVP_PKEY_NONE && (pk)->keymgmt == NULL)
  |  |  ------------------
  |  |  |  |   62|      0|#define EVP_PKEY_NONE NID_undef
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|      0|#define NID_undef                       0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (381:6): [True: 0, False: 0]
  |  |  |  Branch (381:37): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  285|      0|        && !EVP_KEYMGMT_is_a(a->keymgmt, OBJ_nid2sn(b->type)))
  ------------------
  |  Branch (285:12): [True: 0, False: 0]
  ------------------
  286|      0|        return -1; /* not the same key type */
  287|       |
  288|       |    /*
  289|       |     * We've determined that they both are the same keytype, so the next
  290|       |     * step is to do a bit of cross export to ensure we have keydata for
  291|       |     * both keys in the same keymgmt.
  292|       |     */
  293|      0|    keymgmt1 = a->keymgmt;
  294|      0|    keydata1 = a->keydata;
  295|      0|    keymgmt2 = b->keymgmt;
  296|      0|    keydata2 = b->keydata;
  297|       |
  298|      0|    if (keymgmt2 != NULL && keymgmt2->match != NULL) {
  ------------------
  |  Branch (298:9): [True: 0, False: 0]
  |  Branch (298:29): [True: 0, False: 0]
  ------------------
  299|      0|        tmp_keydata = evp_pkey_export_to_provider((EVP_PKEY *)a, NULL, &keymgmt2, NULL);
  300|      0|        if (tmp_keydata != NULL) {
  ------------------
  |  Branch (300:13): [True: 0, False: 0]
  ------------------
  301|      0|            keymgmt1 = keymgmt2;
  302|      0|            keydata1 = tmp_keydata;
  303|      0|        }
  304|      0|    }
  305|      0|    if (tmp_keydata == NULL && keymgmt1 != NULL && keymgmt1->match != NULL) {
  ------------------
  |  Branch (305:9): [True: 0, False: 0]
  |  Branch (305:32): [True: 0, False: 0]
  |  Branch (305:52): [True: 0, False: 0]
  ------------------
  306|      0|        tmp_keydata = evp_pkey_export_to_provider((EVP_PKEY *)b, NULL, &keymgmt1, NULL);
  307|      0|        if (tmp_keydata != NULL) {
  ------------------
  |  Branch (307:13): [True: 0, False: 0]
  ------------------
  308|      0|            keymgmt2 = keymgmt1;
  309|      0|            keydata2 = tmp_keydata;
  310|      0|        }
  311|      0|    }
  312|       |
  313|       |    /* If we still don't have matching keymgmt implementations, we give up */
  314|      0|    if (keymgmt1 != keymgmt2)
  ------------------
  |  Branch (314:9): [True: 0, False: 0]
  ------------------
  315|      0|        return -2;
  316|       |
  317|       |    /* If the keymgmt implementations are NULL, the export failed */
  318|      0|    if (keymgmt1 == NULL)
  ------------------
  |  Branch (318:9): [True: 0, False: 0]
  ------------------
  319|      0|        return -2;
  320|       |
  321|      0|    return evp_keymgmt_match(keymgmt1, keydata1, keydata2, selection);
  322|      0|#endif /* FIPS_MODULE */
  323|      0|}
p_lib.c:detect_foreign_key:
  704|  10.9k|{
  705|  10.9k|    switch (pkey->type) {
  706|      0|    case EVP_PKEY_RSA:
  ------------------
  |  |   63|      0|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|      0|#define NID_rsaEncryption               6
  |  |  ------------------
  ------------------
  |  Branch (706:5): [True: 0, False: 10.9k]
  ------------------
  707|      0|    case EVP_PKEY_RSA_PSS:
  ------------------
  |  |   65|      0|#define EVP_PKEY_RSA_PSS NID_rsassaPss
  |  |  ------------------
  |  |  |  |  583|      0|#define NID_rsassaPss           912
  |  |  ------------------
  ------------------
  |  Branch (707:5): [True: 0, False: 10.9k]
  ------------------
  708|      0|        pkey->foreign = pkey->pkey.rsa != NULL
  ------------------
  |  Branch (708:25): [True: 0, False: 0]
  ------------------
  709|      0|            && ossl_rsa_is_foreign(pkey->pkey.rsa);
  ------------------
  |  Branch (709:16): [True: 0, False: 0]
  ------------------
  710|      0|        break;
  711|      0|#ifndef OPENSSL_NO_EC
  712|      0|    case EVP_PKEY_SM2:
  ------------------
  |  |   74|      0|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1259|      0|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (712:5): [True: 0, False: 10.9k]
  ------------------
  713|      0|        break;
  714|  10.9k|    case EVP_PKEY_EC:
  ------------------
  |  |   73|  10.9k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|  10.9k|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
  |  Branch (714:5): [True: 10.9k, False: 0]
  ------------------
  715|  10.9k|        pkey->foreign = pkey->pkey.ec != NULL
  ------------------
  |  Branch (715:25): [True: 10.9k, False: 0]
  ------------------
  716|  10.9k|            && ossl_ec_key_is_foreign(pkey->pkey.ec);
  ------------------
  |  Branch (716:16): [True: 0, False: 10.9k]
  ------------------
  717|  10.9k|        break;
  718|      0|#endif
  719|      0|#ifndef OPENSSL_NO_DSA
  720|      0|    case EVP_PKEY_DSA:
  ------------------
  |  |   66|      0|#define EVP_PKEY_DSA NID_dsa
  |  |  ------------------
  |  |  |  |  136|      0|#define NID_dsa         116
  |  |  ------------------
  ------------------
  |  Branch (720:5): [True: 0, False: 10.9k]
  ------------------
  721|      0|        pkey->foreign = pkey->pkey.dsa != NULL
  ------------------
  |  Branch (721:25): [True: 0, False: 0]
  ------------------
  722|      0|            && ossl_dsa_is_foreign(pkey->pkey.dsa);
  ------------------
  |  Branch (722:16): [True: 0, False: 0]
  ------------------
  723|      0|        break;
  724|      0|#endif
  725|      0|#ifndef OPENSSL_NO_DH
  726|      0|    case EVP_PKEY_DH:
  ------------------
  |  |   71|      0|#define EVP_PKEY_DH NID_dhKeyAgreement
  |  |  ------------------
  |  |  |  |  621|      0|#define NID_dhKeyAgreement              28
  |  |  ------------------
  ------------------
  |  Branch (726:5): [True: 0, False: 10.9k]
  ------------------
  727|      0|        pkey->foreign = pkey->pkey.dh != NULL
  ------------------
  |  Branch (727:25): [True: 0, False: 0]
  ------------------
  728|      0|            && ossl_dh_is_foreign(pkey->pkey.dh);
  ------------------
  |  Branch (728:16): [True: 0, False: 0]
  ------------------
  729|      0|        break;
  730|      0|#endif
  731|      0|    default:
  ------------------
  |  Branch (731:5): [True: 0, False: 10.9k]
  ------------------
  732|      0|        pkey->foreign = 0;
  733|      0|        break;
  734|  10.9k|    }
  735|  10.9k|}
p_lib.c:pkey_set_type:
 1485|   377k|{
 1486|   377k|#ifndef FIPS_MODULE
 1487|   377k|    const EVP_PKEY_ASN1_METHOD *ameth = NULL;
 1488|   377k|#endif
 1489|       |
 1490|       |    /*
 1491|       |     * The setups can't set both legacy and provider side methods.
 1492|       |     * It is forbidden
 1493|       |     */
 1494|   377k|    if (!ossl_assert(type == EVP_PKEY_NONE || keymgmt == NULL)) {
  ------------------
  |  |   52|   590k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 163k, False: 213k]
  |  |  |  Branch (52:41): [True: 213k, False: 0]
  |  |  ------------------
  |  |   53|   377k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1494:9): [True: 0, False: 377k]
  ------------------
 1495|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1496|      0|        return 0;
 1497|      0|    }
 1498|       |
 1499|   377k|    if (pkey != NULL) {
  ------------------
  |  Branch (1499:9): [True: 260k, False: 116k]
  ------------------
 1500|   260k|        int free_it = 0;
 1501|       |
 1502|   260k|#ifndef FIPS_MODULE
 1503|   260k|        free_it = free_it || pkey->pkey.ptr != NULL;
  ------------------
  |  Branch (1503:19): [True: 0, False: 260k]
  |  Branch (1503:30): [True: 0, False: 260k]
  ------------------
 1504|   260k|#endif
 1505|   260k|        free_it = free_it || pkey->keydata != NULL;
  ------------------
  |  Branch (1505:19): [True: 0, False: 260k]
  |  Branch (1505:30): [True: 0, False: 260k]
  ------------------
 1506|   260k|        if (free_it)
  ------------------
  |  Branch (1506:13): [True: 0, False: 260k]
  ------------------
 1507|      0|            evp_pkey_free_it(pkey);
 1508|   260k|#ifndef FIPS_MODULE
 1509|       |        /*
 1510|       |         * If key type matches and a method exists then this lookup has
 1511|       |         * succeeded once so just indicate success.
 1512|       |         */
 1513|   260k|        if (pkey->type != EVP_PKEY_NONE
  ------------------
  |  |   62|   260k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   521k|#define NID_undef                       0
  |  |  ------------------
  ------------------
  |  Branch (1513:13): [True: 194k, False: 65.5k]
  ------------------
 1514|   194k|            && type == pkey->save_type
  ------------------
  |  Branch (1514:16): [True: 150k, False: 44.1k]
  ------------------
 1515|   150k|            && pkey->ameth != NULL)
  ------------------
  |  Branch (1515:16): [True: 150k, False: 0]
  ------------------
 1516|   150k|            return 1;
 1517|   260k|#endif
 1518|   260k|    }
 1519|   226k|#ifndef FIPS_MODULE
 1520|   226k|    if (str != NULL)
  ------------------
  |  Branch (1520:9): [True: 149k, False: 76.9k]
  ------------------
 1521|   149k|        ameth = evp_pkey_asn1_find_str(str, len);
 1522|  76.9k|    else if (type != EVP_PKEY_NONE)
  ------------------
  |  |   62|  76.9k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|  76.9k|#define NID_undef                       0
  |  |  ------------------
  ------------------
  |  Branch (1522:14): [True: 62.4k, False: 14.5k]
  ------------------
 1523|  62.4k|        ameth = evp_pkey_asn1_find(type);
 1524|   226k|#endif
 1525|       |
 1526|   226k|    {
 1527|   226k|        int check = 1;
 1528|       |
 1529|   226k|#ifndef FIPS_MODULE
 1530|   226k|        check = check && ameth == NULL;
  ------------------
  |  Branch (1530:17): [True: 226k, False: 0]
  |  Branch (1530:26): [True: 98.2k, False: 128k]
  ------------------
 1531|   226k|#endif
 1532|   226k|        check = check && keymgmt == NULL;
  ------------------
  |  Branch (1532:17): [True: 98.2k, False: 128k]
  |  Branch (1532:26): [True: 83.7k, False: 14.5k]
  ------------------
 1533|   226k|        if (check) {
  ------------------
  |  Branch (1533:13): [True: 83.7k, False: 142k]
  ------------------
 1534|  83.7k|            ERR_raise(ERR_LIB_EVP, EVP_R_UNSUPPORTED_ALGORITHM);
  ------------------
  |  |  357|  83.7k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|  83.7k|    (ERR_new(),                                                  \
  |  |  |  |  360|  83.7k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|  83.7k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|  83.7k|        ERR_set_error)
  |  |  ------------------
  ------------------
 1535|  83.7k|            return 0;
 1536|  83.7k|        }
 1537|   226k|    }
 1538|   142k|    if (pkey != NULL) {
  ------------------
  |  Branch (1538:9): [True: 109k, False: 32.7k]
  ------------------
 1539|   109k|        if (keymgmt != NULL && !EVP_KEYMGMT_up_ref(keymgmt)) {
  ------------------
  |  Branch (1539:13): [True: 47.3k, False: 62.4k]
  |  Branch (1539:32): [True: 0, False: 47.3k]
  ------------------
 1540|      0|            ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1541|      0|            return 0;
 1542|      0|        }
 1543|       |
 1544|   109k|        pkey->keymgmt = keymgmt;
 1545|       |
 1546|   109k|        pkey->save_type = type;
 1547|   109k|        pkey->type = type;
 1548|       |
 1549|   109k|#ifndef FIPS_MODULE
 1550|       |        /*
 1551|       |         * If the internal "origin" key is provider side, don't save |ameth|.
 1552|       |         * The main reason is that |ameth| is one factor to detect that the
 1553|       |         * internal "origin" key is a legacy one.
 1554|       |         */
 1555|   109k|        if (keymgmt == NULL)
  ------------------
  |  Branch (1555:13): [True: 62.4k, False: 47.3k]
  ------------------
 1556|  62.4k|            pkey->ameth = ameth;
 1557|       |
 1558|       |        /*
 1559|       |         * The EVP_PKEY_ASN1_METHOD |pkey_id| retains its legacy key purpose
 1560|       |         * for any key type that has a legacy implementation, regardless of
 1561|       |         * if the internal key is a legacy or a provider side one.  When
 1562|       |         * there is no legacy implementation for the key, the type becomes
 1563|       |         * EVP_PKEY_KEYMGMT, which indicates that one should be cautious
 1564|       |         * with functions that expect legacy internal keys.
 1565|       |         */
 1566|   109k|        if (ameth != NULL) {
  ------------------
  |  Branch (1566:13): [True: 95.2k, False: 14.5k]
  ------------------
 1567|  95.2k|            if (type == EVP_PKEY_NONE)
  ------------------
  |  |   62|  95.2k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|  95.2k|#define NID_undef                       0
  |  |  ------------------
  ------------------
  |  Branch (1567:17): [True: 32.7k, False: 62.4k]
  ------------------
 1568|  32.7k|                pkey->type = ameth->pkey_id;
 1569|  95.2k|        } else {
 1570|  14.5k|            pkey->type = EVP_PKEY_KEYMGMT;
  ------------------
  |  |  104|  14.5k|#define EVP_PKEY_KEYMGMT -1
  ------------------
 1571|  14.5k|        }
 1572|   109k|#endif
 1573|   109k|    }
 1574|   142k|    return 1;
 1575|   142k|}
p_lib.c:find_ameth:
 1579|   116k|{
 1580|   116k|    const char **str = data;
 1581|       |
 1582|       |    /*
 1583|       |     * The error messages from pkey_set_type() are uninteresting here,
 1584|       |     * and misleading.
 1585|       |     */
 1586|   116k|    ERR_set_mark();
 1587|       |
 1588|   116k|    if (pkey_set_type(NULL, EVP_PKEY_NONE, name, (int)strlen(name),
  ------------------
  |  |   62|   116k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   116k|#define NID_undef                       0
  |  |  ------------------
  ------------------
  |  Branch (1588:9): [True: 32.7k, False: 83.7k]
  ------------------
 1589|   116k|            NULL)) {
 1590|  32.7k|        if (str[0] == NULL)
  ------------------
  |  Branch (1590:13): [True: 32.7k, False: 0]
  ------------------
 1591|  32.7k|            str[0] = name;
 1592|      0|        else if (str[1] == NULL)
  ------------------
  |  Branch (1592:18): [True: 0, False: 0]
  ------------------
 1593|      0|            str[1] = name;
 1594|  32.7k|    }
 1595|       |
 1596|   116k|    ERR_pop_to_mark();
 1597|   116k|}
p_lib.c:evp_pkey_free_it:
 1732|  65.5k|{
 1733|       |    /* internal function; x is never NULL */
 1734|  65.5k|    evp_keymgmt_util_clear_operation_cache(x);
 1735|  65.5k|#ifndef FIPS_MODULE
 1736|  65.5k|    evp_pkey_free_legacy(x);
 1737|  65.5k|#endif
 1738|       |
 1739|  65.5k|    if (x->keymgmt != NULL) {
  ------------------
  |  Branch (1739:9): [True: 47.3k, False: 18.2k]
  ------------------
 1740|  47.3k|        evp_keymgmt_freedata(x->keymgmt, x->keydata);
 1741|  47.3k|        EVP_KEYMGMT_free(x->keymgmt);
 1742|  47.3k|        x->keymgmt = NULL;
 1743|  47.3k|        x->keydata = NULL;
 1744|  47.3k|    }
 1745|  65.5k|    x->type = EVP_PKEY_NONE;
  ------------------
  |  |   62|  65.5k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|  65.5k|#define NID_undef                       0
  |  |  ------------------
  ------------------
 1746|  65.5k|}

EVP_PKEY_public_check:
   67|  7.25k|{
   68|  7.25k|    return evp_pkey_public_check_combined(ctx, OSSL_KEYMGMT_VALIDATE_FULL_CHECK);
  ------------------
  |  |  660|  7.25k|#define OSSL_KEYMGMT_VALIDATE_FULL_CHECK 0
  ------------------
   69|  7.25k|}
pmeth_check.c:evp_pkey_public_check_combined:
   48|  7.25k|{
   49|  7.25k|    EVP_PKEY *pkey = ctx->pkey;
   50|  7.25k|    int ok;
   51|       |
   52|  7.25k|    if (pkey == NULL) {
  ------------------
  |  Branch (52:9): [True: 0, False: 7.25k]
  ------------------
   53|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NO_KEY_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   54|      0|        return 0;
   55|      0|    }
   56|       |
   57|  7.25k|    if ((ok = try_provided_check(ctx, OSSL_KEYMGMT_SELECT_PUBLIC_KEY,
  ------------------
  |  |  647|  7.25k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (57:9): [True: 7.25k, False: 0]
  ------------------
   58|  7.25k|             checktype))
   59|  7.25k|        != -1)
   60|  7.25k|        return ok;
   61|       |
   62|  7.25k|    ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   63|      0|    return -2;
   64|  7.25k|}
pmeth_check.c:try_provided_check:
   29|  7.25k|{
   30|  7.25k|    EVP_KEYMGMT *keymgmt;
   31|  7.25k|    void *keydata;
   32|       |
   33|  7.25k|    if (evp_pkey_ctx_is_legacy(ctx))
  ------------------
  |  |   36|  7.25k|    ((ctx)->keymgmt == NULL)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 0, False: 7.25k]
  |  |  ------------------
  ------------------
   34|      0|        return -1;
   35|       |
   36|  7.25k|    keymgmt = ctx->keymgmt;
   37|  7.25k|    keydata = evp_pkey_export_to_provider(ctx->pkey, ctx->libctx,
   38|  7.25k|        &keymgmt, ctx->propquery);
   39|  7.25k|    if (keydata == NULL) {
  ------------------
  |  Branch (39:9): [True: 0, False: 7.25k]
  ------------------
   40|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   41|      0|        return 0;
   42|      0|    }
   43|       |
   44|  7.25k|    return evp_keymgmt_validate(keymgmt, keydata, selection, checktype);
   45|  7.25k|}

EVP_PKEY_paramgen_init:
   70|  3.62k|{
   71|  3.62k|    return gen_init(ctx, EVP_PKEY_OP_PARAMGEN);
  ------------------
  |  | 1528|  3.62k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  ------------------
   72|  3.62k|}
EVP_PKEY_keygen_init:
   75|  18.1k|{
   76|  18.1k|    return gen_init(ctx, EVP_PKEY_OP_KEYGEN);
  ------------------
  |  | 1529|  18.1k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  ------------------
   77|  18.1k|}
EVP_PKEY_generate:
  104|  21.7k|{
  105|  21.7k|    int ret = 0;
  106|  21.7k|    EVP_PKEY *allocated_pkey = NULL;
  107|       |    /* Legacy compatible keygen callback info, only used with provider impls */
  108|  21.7k|    int gentmp[2];
  109|       |
  110|  21.7k|    if (ppkey == NULL)
  ------------------
  |  Branch (110:9): [True: 0, False: 21.7k]
  ------------------
  111|      0|        return -1;
  112|       |
  113|  21.7k|    if (ctx == NULL)
  ------------------
  |  Branch (113:9): [True: 0, False: 21.7k]
  ------------------
  114|      0|        goto not_supported;
  115|       |
  116|  21.7k|    if ((ctx->operation & EVP_PKEY_OP_TYPE_GEN) == 0)
  ------------------
  |  | 1565|  21.7k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  ------------------
  |  |  |  | 1528|  21.7k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  ------------------
  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  ------------------
  |  |  |  | 1529|  21.7k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  ------------------
  ------------------
  |  Branch (116:9): [True: 0, False: 21.7k]
  ------------------
  117|      0|        goto not_initialized;
  118|       |
  119|  21.7k|    if (*ppkey == NULL)
  ------------------
  |  Branch (119:9): [True: 21.7k, False: 0]
  ------------------
  120|  21.7k|        *ppkey = allocated_pkey = EVP_PKEY_new();
  121|       |
  122|  21.7k|    if (*ppkey == NULL) {
  ------------------
  |  Branch (122:9): [True: 0, False: 21.7k]
  ------------------
  123|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  124|      0|        return -1;
  125|      0|    }
  126|       |
  127|  21.7k|    if (ctx->op.keymgmt.genctx == NULL)
  ------------------
  |  Branch (127:9): [True: 0, False: 21.7k]
  ------------------
  128|      0|        goto not_supported;
  129|       |
  130|       |    /*
  131|       |     * Assigning gentmp to ctx->keygen_info is something our legacy
  132|       |     * implementations do.  Because the provider implementations aren't
  133|       |     * allowed to reach into our EVP_PKEY_CTX, we need to provide similar
  134|       |     * space for backward compatibility.  It's ok that we attach a local
  135|       |     * variable, as it should only be useful in the calls down from here.
  136|       |     * This is cleared as soon as it isn't useful any more, i.e. directly
  137|       |     * after the evp_keymgmt_util_gen() call.
  138|       |     */
  139|  21.7k|    ctx->keygen_info = gentmp;
  140|  21.7k|    ctx->keygen_info_count = 2;
  141|       |
  142|  21.7k|    ret = 1;
  143|  21.7k|    if (ctx->pkey != NULL) {
  ------------------
  |  Branch (143:9): [True: 3.62k, False: 18.1k]
  ------------------
  144|  3.62k|        EVP_KEYMGMT *tmp_keymgmt = ctx->keymgmt;
  145|  3.62k|        void *keydata = evp_pkey_export_to_provider(ctx->pkey, ctx->libctx,
  146|  3.62k|            &tmp_keymgmt, ctx->propquery);
  147|       |
  148|  3.62k|        if (tmp_keymgmt == NULL)
  ------------------
  |  Branch (148:13): [True: 0, False: 3.62k]
  ------------------
  149|      0|            goto not_supported;
  150|       |        /*
  151|       |         * It's ok if keydata is NULL here.  The backend is expected to deal
  152|       |         * with that as it sees fit.
  153|       |         */
  154|  3.62k|        ret = evp_keymgmt_gen_set_template(ctx->keymgmt,
  155|  3.62k|            ctx->op.keymgmt.genctx, keydata);
  156|  3.62k|    }
  157|       |
  158|       |    /*
  159|       |     * the returned value from evp_keymgmt_util_gen() is cached in *ppkey,
  160|       |     * so we do not need to save it, just check it.
  161|       |     */
  162|  21.7k|    ret = ret
  ------------------
  |  Branch (162:11): [True: 21.7k, False: 0]
  ------------------
  163|  21.7k|        && (evp_keymgmt_util_gen(*ppkey, ctx->keymgmt, ctx->op.keymgmt.genctx,
  ------------------
  |  Branch (163:12): [True: 21.7k, False: 0]
  ------------------
  164|  21.7k|                ossl_callback_to_pkey_gencb, ctx)
  165|  21.7k|            != NULL);
  166|       |
  167|  21.7k|    ctx->keygen_info = NULL;
  168|       |
  169|  21.7k|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_DEPRECATED_3_6)
  170|       |    /* In case |*ppkey| was originally a legacy key */
  171|  21.7k|    if (ret)
  ------------------
  |  Branch (171:9): [True: 21.7k, False: 0]
  ------------------
  172|  21.7k|        evp_pkey_free_legacy(*ppkey);
  173|  21.7k|#endif
  174|       |
  175|       |    /*
  176|       |     * Because we still have legacy keys
  177|       |     */
  178|  21.7k|    (*ppkey)->type = ctx->legacy_keytype;
  179|       |
  180|  21.7k|    goto end;
  181|       |
  182|  21.7k|end:
  183|  21.7k|    if (ret <= 0) {
  ------------------
  |  Branch (183:9): [True: 0, False: 21.7k]
  ------------------
  184|      0|        if (allocated_pkey != NULL)
  ------------------
  |  Branch (184:13): [True: 0, False: 0]
  ------------------
  185|      0|            *ppkey = NULL;
  186|      0|        EVP_PKEY_free(allocated_pkey);
  187|      0|    }
  188|  21.7k|    return ret;
  189|       |
  190|      0|not_supported:
  191|      0|    ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  192|      0|    ret = -2;
  193|      0|    goto end;
  194|      0|not_initialized:
  195|       |    ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  196|      0|    ret = -1;
  197|      0|    goto end;
  198|  21.7k|}
EVP_PKEY_paramgen:
  201|  3.62k|{
  202|  3.62k|    if (ctx->operation != EVP_PKEY_OP_PARAMGEN) {
  ------------------
  |  | 1528|  3.62k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  ------------------
  |  Branch (202:9): [True: 0, False: 3.62k]
  ------------------
  203|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  204|      0|        return -1;
  205|      0|    }
  206|  3.62k|    return EVP_PKEY_generate(ctx, ppkey);
  207|  3.62k|}
EVP_PKEY_keygen:
  210|  10.8k|{
  211|  10.8k|    if (ctx->operation != EVP_PKEY_OP_KEYGEN) {
  ------------------
  |  | 1529|  10.8k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  ------------------
  |  Branch (211:9): [True: 0, False: 10.8k]
  ------------------
  212|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  213|      0|        return -1;
  214|      0|    }
  215|  10.8k|    return EVP_PKEY_generate(ctx, ppkey);
  216|  10.8k|}
EVP_PKEY_fromdata_init:
  303|  7.25k|{
  304|  7.25k|    return fromdata_init(ctx, EVP_PKEY_OP_FROMDATA);
  ------------------
  |  | 1530|  7.25k|#define EVP_PKEY_OP_FROMDATA (1 << 3)
  ------------------
  305|  7.25k|}
EVP_PKEY_fromdata:
  309|  7.25k|{
  310|  7.25k|    void *keydata = NULL;
  311|  7.25k|    EVP_PKEY *allocated_pkey = NULL;
  312|       |
  313|  7.25k|    if (ctx == NULL || (ctx->operation & EVP_PKEY_OP_FROMDATA) == 0) {
  ------------------
  |  | 1530|  7.25k|#define EVP_PKEY_OP_FROMDATA (1 << 3)
  ------------------
  |  Branch (313:9): [True: 0, False: 7.25k]
  |  Branch (313:24): [True: 0, False: 7.25k]
  ------------------
  314|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  315|      0|        return -2;
  316|      0|    }
  317|       |
  318|  7.25k|    if (ppkey == NULL)
  ------------------
  |  Branch (318:9): [True: 0, False: 7.25k]
  ------------------
  319|      0|        return -1;
  320|       |
  321|  7.25k|    if (*ppkey == NULL)
  ------------------
  |  Branch (321:9): [True: 7.25k, False: 0]
  ------------------
  322|  7.25k|        allocated_pkey = *ppkey = EVP_PKEY_new();
  323|       |
  324|  7.25k|    if (*ppkey == NULL) {
  ------------------
  |  Branch (324:9): [True: 0, False: 7.25k]
  ------------------
  325|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  326|      0|        return -1;
  327|      0|    }
  328|       |
  329|  7.25k|    keydata = evp_keymgmt_util_fromdata(*ppkey, ctx->keymgmt, selection, params);
  330|  7.25k|    if (keydata == NULL) {
  ------------------
  |  Branch (330:9): [True: 0, False: 7.25k]
  ------------------
  331|      0|        if (allocated_pkey != NULL) {
  ------------------
  |  Branch (331:13): [True: 0, False: 0]
  ------------------
  332|      0|            *ppkey = NULL;
  333|      0|            EVP_PKEY_free(allocated_pkey);
  334|      0|        }
  335|      0|        return 0;
  336|      0|    }
  337|       |    /* keydata is cached in *ppkey, so we need not bother with it further */
  338|  7.25k|    return 1;
  339|  7.25k|}
EVP_PKEY_export:
  384|  7.25k|{
  385|  7.25k|    if (pkey == NULL) {
  ------------------
  |  Branch (385:9): [True: 0, False: 7.25k]
  ------------------
  386|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  387|      0|        return 0;
  388|      0|    }
  389|  7.25k|#ifndef FIPS_MODULE
  390|  7.25k|    if (evp_pkey_is_legacy(pkey)) {
  ------------------
  |  |  381|  7.25k|    ((pk)->type != EVP_PKEY_NONE && (pk)->keymgmt == NULL)
  |  |  ------------------
  |  |  |  |   62|  7.25k|#define EVP_PKEY_NONE NID_undef
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  14.5k|#define NID_undef                       0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (381:6): [True: 7.25k, False: 0]
  |  |  |  Branch (381:37): [True: 0, False: 7.25k]
  |  |  ------------------
  ------------------
  391|      0|        struct fake_import_data_st data;
  392|       |
  393|      0|        data.export_cb = export_cb;
  394|      0|        data.export_cbarg = export_cbarg;
  395|       |
  396|       |        /*
  397|       |         * We don't need to care about libctx or propq here, as we're only
  398|       |         * interested in the resulting OSSL_PARAM array.
  399|       |         */
  400|      0|        return pkey->ameth->export_to(pkey, &data, pkey_fake_import,
  401|      0|            NULL, NULL);
  402|      0|    }
  403|  7.25k|#endif
  404|  7.25k|    return evp_keymgmt_util_export(pkey, selection, export_cb, export_cbarg);
  405|  7.25k|}
pmeth_gn.c:gen_init:
   27|  21.7k|{
   28|  21.7k|    int ret = 0;
   29|       |
   30|  21.7k|    if (ctx == NULL)
  ------------------
  |  Branch (30:9): [True: 0, False: 21.7k]
  ------------------
   31|      0|        goto not_supported;
   32|       |
   33|  21.7k|    evp_pkey_ctx_free_old_ops(ctx);
   34|  21.7k|    ctx->operation = operation;
   35|       |
   36|  21.7k|    if (ctx->keymgmt == NULL || ctx->keymgmt->gen_init == NULL)
  ------------------
  |  Branch (36:9): [True: 0, False: 21.7k]
  |  Branch (36:33): [True: 0, False: 21.7k]
  ------------------
   37|      0|        goto not_supported;
   38|       |
   39|  21.7k|    switch (operation) {
  ------------------
  |  Branch (39:13): [True: 21.7k, False: 0]
  ------------------
   40|  3.62k|    case EVP_PKEY_OP_PARAMGEN:
  ------------------
  |  | 1528|  3.62k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  ------------------
  |  Branch (40:5): [True: 3.62k, False: 18.1k]
  ------------------
   41|  3.62k|        ctx->op.keymgmt.genctx = evp_keymgmt_gen_init(ctx->keymgmt,
   42|  3.62k|            OSSL_KEYMGMT_SELECT_ALL_PARAMETERS, NULL);
  ------------------
  |  |  653|  3.62k|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  ------------------
  |  |  |  |  648|  3.62k|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  ------------------
  |  |  654|  3.62k|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  ------------------
  |  |  |  |  649|  3.62k|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  ------------------
  ------------------
   43|  3.62k|        break;
   44|  18.1k|    case EVP_PKEY_OP_KEYGEN:
  ------------------
  |  | 1529|  18.1k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  ------------------
  |  Branch (44:5): [True: 18.1k, False: 3.62k]
  ------------------
   45|  18.1k|        ctx->op.keymgmt.genctx = evp_keymgmt_gen_init(ctx->keymgmt, OSSL_KEYMGMT_SELECT_KEYPAIR,
  ------------------
  |  |  656|  18.1k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  18.1k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  18.1k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
   46|  18.1k|            NULL);
   47|  18.1k|        break;
   48|  21.7k|    }
   49|       |
   50|  21.7k|    if (ctx->op.keymgmt.genctx == NULL)
  ------------------
  |  Branch (50:9): [True: 0, False: 21.7k]
  ------------------
   51|  21.7k|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   52|  21.7k|    else
   53|  21.7k|        ret = 1;
   54|  21.7k|    goto end;
   55|       |
   56|  21.7k|end:
   57|  21.7k|    if (ret <= 0 && ctx != NULL) {
  ------------------
  |  Branch (57:9): [True: 0, False: 21.7k]
  |  Branch (57:21): [True: 0, False: 0]
  ------------------
   58|      0|        evp_pkey_ctx_free_old_ops(ctx);
   59|      0|        ctx->operation = EVP_PKEY_OP_UNDEFINED;
  ------------------
  |  | 1527|      0|#define EVP_PKEY_OP_UNDEFINED 0
  ------------------
   60|      0|    }
   61|  21.7k|    return ret;
   62|       |
   63|      0|not_supported:
   64|       |    ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   65|      0|    ret = -2;
   66|      0|    goto end;
   67|  21.7k|}
pmeth_gn.c:fromdata_init:
  284|  7.25k|{
  285|  7.25k|    if (ctx == NULL || ctx->keytype == NULL)
  ------------------
  |  Branch (285:9): [True: 0, False: 7.25k]
  |  Branch (285:24): [True: 0, False: 7.25k]
  ------------------
  286|      0|        goto not_supported;
  287|       |
  288|  7.25k|    evp_pkey_ctx_free_old_ops(ctx);
  289|  7.25k|    if (ctx->keymgmt == NULL)
  ------------------
  |  Branch (289:9): [True: 0, False: 7.25k]
  ------------------
  290|      0|        goto not_supported;
  291|       |
  292|  7.25k|    ctx->operation = operation;
  293|  7.25k|    return 1;
  294|       |
  295|      0|not_supported:
  296|      0|    if (ctx != NULL)
  ------------------
  |  Branch (296:9): [True: 0, False: 0]
  ------------------
  297|      0|        ctx->operation = EVP_PKEY_OP_UNDEFINED;
  ------------------
  |  | 1527|      0|#define EVP_PKEY_OP_UNDEFINED 0
  ------------------
  298|       |    ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  299|      0|    return -2;
  300|  7.25k|}

evp_pkey_ctx_state:
   49|  18.1k|{
   50|  18.1k|    if (ctx->operation == EVP_PKEY_OP_UNDEFINED)
  ------------------
  |  | 1527|  18.1k|#define EVP_PKEY_OP_UNDEFINED 0
  ------------------
  |  Branch (50:9): [True: 0, False: 18.1k]
  ------------------
   51|      0|        return EVP_PKEY_STATE_UNKNOWN;
  ------------------
  |  |  678|      0|#define EVP_PKEY_STATE_UNKNOWN 0
  ------------------
   52|       |
   53|  18.1k|    if ((EVP_PKEY_CTX_IS_DERIVE_OP(ctx)
  ------------------
  |  |  476|  36.2k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_DERIVE) != 0)
  |  |  ------------------
  |  |  |  | 1556|  18.1k|    (EVP_PKEY_OP_DERIVE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1538|  18.1k|#define EVP_PKEY_OP_DERIVE (1 << 11)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (476:5): [True: 0, False: 18.1k]
  |  |  ------------------
  ------------------
   54|      0|            && ctx->op.kex.algctx != NULL)
  ------------------
  |  Branch (54:16): [True: 0, False: 0]
  ------------------
   55|  18.1k|        || (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx)
  ------------------
  |  |  473|  36.2k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1547|  18.1k|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1531|  18.1k|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1541|  18.1k|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1548|  18.1k|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1532|  18.1k|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1542|  18.1k|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1549|  18.1k|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1533|  18.1k|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1550|  18.1k|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1534|  18.1k|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1535|  18.1k|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (473:5): [True: 0, False: 18.1k]
  |  |  ------------------
  ------------------
   56|      0|            && ctx->op.sig.algctx != NULL)
  ------------------
  |  Branch (56:16): [True: 0, False: 0]
  ------------------
   57|  18.1k|        || (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx)
  ------------------
  |  |  479|  36.2k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_CRYPT) != 0)
  |  |  ------------------
  |  |  |  | 1553|  18.1k|    (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1536|  18.1k|#define EVP_PKEY_OP_ENCRYPT (1 << 9)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1537|  18.1k|#define EVP_PKEY_OP_DECRYPT (1 << 10)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (479:5): [True: 0, False: 18.1k]
  |  |  ------------------
  ------------------
   58|      0|            && ctx->op.ciph.algctx != NULL)
  ------------------
  |  Branch (58:16): [True: 0, False: 0]
  ------------------
   59|  18.1k|        || (EVP_PKEY_CTX_IS_GEN_OP(ctx)
  ------------------
  |  |  482|  36.2k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_GEN) != 0)
  |  |  ------------------
  |  |  |  | 1565|  18.1k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1528|  18.1k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1529|  18.1k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (482:5): [True: 18.1k, False: 0]
  |  |  ------------------
  ------------------
   60|  18.1k|            && ctx->op.keymgmt.genctx != NULL)
  ------------------
  |  Branch (60:16): [True: 18.1k, False: 0]
  ------------------
   61|      0|        || (EVP_PKEY_CTX_IS_KEM_OP(ctx)
  ------------------
  |  |  488|      0|    (((ctx)->operation & EVP_PKEY_OP_TYPE_KEM) != 0)
  |  |  ------------------
  |  |  |  | 1562|      0|    (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1539|      0|#define EVP_PKEY_OP_ENCAPSULATE (1 << 12)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1540|      0|#define EVP_PKEY_OP_DECAPSULATE (1 << 13)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (488:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   62|      0|            && ctx->op.encap.algctx != NULL))
  ------------------
  |  Branch (62:16): [True: 0, False: 0]
  ------------------
   63|  18.1k|        return EVP_PKEY_STATE_PROVIDER;
  ------------------
  |  |  680|  18.1k|#define EVP_PKEY_STATE_PROVIDER 2
  ------------------
   64|       |
   65|      0|    return EVP_PKEY_STATE_LEGACY;
  ------------------
  |  |  679|      0|#define EVP_PKEY_STATE_LEGACY 1
  ------------------
   66|  18.1k|}
EVP_PKEY_CTX_new_from_name:
  194|  25.4k|{
  195|       |    return int_ctx_new(libctx, NULL, name, propquery, -1);
  196|  25.4k|}
EVP_PKEY_CTX_new_from_pkey:
  200|   234k|{
  201|       |    return int_ctx_new(libctx, pkey, NULL, propquery, -1);
  202|   234k|}
evp_pkey_ctx_free_old_ops:
  205|   329k|{
  206|   329k|    if (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx)) {
  ------------------
  |  |  473|   329k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1547|   329k|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1531|   329k|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1541|   329k|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1548|   329k|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1532|   329k|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1542|   329k|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1549|   329k|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1533|   329k|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1550|   329k|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1534|   329k|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1535|   329k|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (473:5): [True: 18.1k, False: 311k]
  |  |  ------------------
  ------------------
  207|  18.1k|        if (ctx->op.sig.algctx != NULL && ctx->op.sig.signature != NULL)
  ------------------
  |  Branch (207:13): [True: 18.1k, False: 0]
  |  Branch (207:43): [True: 18.1k, False: 0]
  ------------------
  208|  18.1k|            ctx->op.sig.signature->freectx(ctx->op.sig.algctx);
  209|  18.1k|        EVP_SIGNATURE_free(ctx->op.sig.signature);
  210|  18.1k|        ctx->op.sig.algctx = NULL;
  211|  18.1k|        ctx->op.sig.signature = NULL;
  212|   311k|    } else if (EVP_PKEY_CTX_IS_DERIVE_OP(ctx)) {
  ------------------
  |  |  476|   311k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_DERIVE) != 0)
  |  |  ------------------
  |  |  |  | 1556|   311k|    (EVP_PKEY_OP_DERIVE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1538|   311k|#define EVP_PKEY_OP_DERIVE (1 << 11)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (476:5): [True: 7.25k, False: 303k]
  |  |  ------------------
  ------------------
  213|  7.25k|        if (ctx->op.kex.algctx != NULL && ctx->op.kex.exchange != NULL)
  ------------------
  |  Branch (213:13): [True: 7.25k, False: 0]
  |  Branch (213:43): [True: 7.25k, False: 0]
  ------------------
  214|  7.25k|            ctx->op.kex.exchange->freectx(ctx->op.kex.algctx);
  215|  7.25k|        EVP_KEYEXCH_free(ctx->op.kex.exchange);
  216|  7.25k|        ctx->op.kex.algctx = NULL;
  217|  7.25k|        ctx->op.kex.exchange = NULL;
  218|   303k|    } else if (EVP_PKEY_CTX_IS_KEM_OP(ctx)) {
  ------------------
  |  |  488|   303k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_KEM) != 0)
  |  |  ------------------
  |  |  |  | 1562|   303k|    (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1539|   303k|#define EVP_PKEY_OP_ENCAPSULATE (1 << 12)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1540|   303k|#define EVP_PKEY_OP_DECAPSULATE (1 << 13)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (488:5): [True: 14.5k, False: 289k]
  |  |  ------------------
  ------------------
  219|  14.5k|        if (ctx->op.encap.algctx != NULL && ctx->op.encap.kem != NULL)
  ------------------
  |  Branch (219:13): [True: 14.5k, False: 0]
  |  Branch (219:45): [True: 14.5k, False: 0]
  ------------------
  220|  14.5k|            ctx->op.encap.kem->freectx(ctx->op.encap.algctx);
  221|  14.5k|        EVP_KEM_free(ctx->op.encap.kem);
  222|  14.5k|        ctx->op.encap.algctx = NULL;
  223|  14.5k|        ctx->op.encap.kem = NULL;
  224|   289k|    } else if (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx)) {
  ------------------
  |  |  479|   289k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_CRYPT) != 0)
  |  |  ------------------
  |  |  |  | 1553|   289k|    (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1536|   289k|#define EVP_PKEY_OP_ENCRYPT (1 << 9)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1537|   289k|#define EVP_PKEY_OP_DECRYPT (1 << 10)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (479:5): [True: 0, False: 289k]
  |  |  ------------------
  ------------------
  225|      0|        if (ctx->op.ciph.algctx != NULL && ctx->op.ciph.cipher != NULL)
  ------------------
  |  Branch (225:13): [True: 0, False: 0]
  |  Branch (225:44): [True: 0, False: 0]
  ------------------
  226|      0|            ctx->op.ciph.cipher->freectx(ctx->op.ciph.algctx);
  227|      0|        EVP_ASYM_CIPHER_free(ctx->op.ciph.cipher);
  228|      0|        ctx->op.ciph.algctx = NULL;
  229|      0|        ctx->op.ciph.cipher = NULL;
  230|   289k|    } else if (EVP_PKEY_CTX_IS_GEN_OP(ctx)) {
  ------------------
  |  |  482|   289k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_GEN) != 0)
  |  |  ------------------
  |  |  |  | 1565|   289k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1528|   289k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1529|   289k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (482:5): [True: 21.7k, False: 267k]
  |  |  ------------------
  ------------------
  231|  21.7k|        if (ctx->op.keymgmt.genctx != NULL && ctx->keymgmt != NULL)
  ------------------
  |  Branch (231:13): [True: 21.7k, False: 0]
  |  Branch (231:47): [True: 21.7k, False: 0]
  ------------------
  232|  21.7k|            evp_keymgmt_gen_cleanup(ctx->keymgmt, ctx->op.keymgmt.genctx);
  233|  21.7k|    }
  234|   329k|}
EVP_PKEY_CTX_free:
  237|  2.00M|{
  238|  2.00M|    if (ctx == NULL)
  ------------------
  |  Branch (238:9): [True: 1.74M, False: 267k]
  ------------------
  239|  1.74M|        return;
  240|       |
  241|   267k|    evp_pkey_ctx_free_old_ops(ctx);
  242|   267k|#ifndef FIPS_MODULE
  243|   267k|    evp_pkey_ctx_free_all_cached_data(ctx);
  244|   267k|#endif
  245|   267k|    EVP_KEYMGMT_free(ctx->keymgmt);
  246|       |
  247|   267k|    OPENSSL_free(ctx->propquery);
  ------------------
  |  |  132|   267k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  248|   267k|    EVP_PKEY_free(ctx->pkey);
  249|   267k|    EVP_PKEY_free(ctx->peerkey);
  250|   267k|    BN_free(ctx->rsa_pubexp);
  251|   267k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|   267k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  252|   267k|}
EVP_PKEY_CTX_dup:
  270|  7.25k|{
  271|  7.25k|    EVP_PKEY_CTX *rctx;
  272|       |
  273|  7.25k|    rctx = OPENSSL_zalloc(sizeof(*rctx));
  ------------------
  |  |  109|  7.25k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  274|  7.25k|    if (rctx == NULL)
  ------------------
  |  Branch (274:9): [True: 0, False: 7.25k]
  ------------------
  275|      0|        return NULL;
  276|       |
  277|  7.25k|    if (pctx->pkey != NULL && !EVP_PKEY_up_ref(pctx->pkey))
  ------------------
  |  Branch (277:9): [True: 7.25k, False: 0]
  |  Branch (277:31): [True: 0, False: 7.25k]
  ------------------
  278|      0|        goto err;
  279|       |
  280|  7.25k|    rctx->pkey = pctx->pkey;
  281|  7.25k|    rctx->operation = pctx->operation;
  282|  7.25k|    rctx->libctx = pctx->libctx;
  283|  7.25k|    rctx->keytype = pctx->keytype;
  284|  7.25k|    rctx->propquery = NULL;
  285|  7.25k|    if (pctx->propquery != NULL) {
  ------------------
  |  Branch (285:9): [True: 0, False: 7.25k]
  ------------------
  286|      0|        rctx->propquery = OPENSSL_strdup(pctx->propquery);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  287|      0|        if (rctx->propquery == NULL)
  ------------------
  |  Branch (287:13): [True: 0, False: 0]
  ------------------
  288|      0|            goto err;
  289|      0|    }
  290|  7.25k|    rctx->legacy_keytype = pctx->legacy_keytype;
  291|       |
  292|  7.25k|    if (pctx->keymgmt != NULL) {
  ------------------
  |  Branch (292:9): [True: 7.25k, False: 0]
  ------------------
  293|  7.25k|        if (!EVP_KEYMGMT_up_ref(pctx->keymgmt))
  ------------------
  |  Branch (293:13): [True: 0, False: 7.25k]
  ------------------
  294|      0|            goto err;
  295|  7.25k|        rctx->keymgmt = pctx->keymgmt;
  296|  7.25k|    }
  297|       |
  298|  7.25k|    if (EVP_PKEY_CTX_IS_DERIVE_OP(pctx)) {
  ------------------
  |  |  476|  7.25k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_DERIVE) != 0)
  |  |  ------------------
  |  |  |  | 1556|  7.25k|    (EVP_PKEY_OP_DERIVE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1538|  7.25k|#define EVP_PKEY_OP_DERIVE (1 << 11)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (476:5): [True: 0, False: 7.25k]
  |  |  ------------------
  ------------------
  299|      0|        if (pctx->op.kex.exchange != NULL) {
  ------------------
  |  Branch (299:13): [True: 0, False: 0]
  ------------------
  300|      0|            rctx->op.kex.exchange = pctx->op.kex.exchange;
  301|      0|            if (!EVP_KEYEXCH_up_ref(rctx->op.kex.exchange))
  ------------------
  |  Branch (301:17): [True: 0, False: 0]
  ------------------
  302|      0|                goto err;
  303|      0|        }
  304|      0|        if (pctx->op.kex.algctx != NULL) {
  ------------------
  |  Branch (304:13): [True: 0, False: 0]
  ------------------
  305|      0|            if (!ossl_assert(pctx->op.kex.exchange != NULL))
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (305:17): [True: 0, False: 0]
  ------------------
  306|      0|                goto err;
  307|       |
  308|      0|            if (pctx->op.kex.exchange->dupctx != NULL)
  ------------------
  |  Branch (308:17): [True: 0, False: 0]
  ------------------
  309|      0|                rctx->op.kex.algctx
  310|      0|                    = pctx->op.kex.exchange->dupctx(pctx->op.kex.algctx);
  311|       |
  312|      0|            if (rctx->op.kex.algctx == NULL) {
  ------------------
  |  Branch (312:17): [True: 0, False: 0]
  ------------------
  313|      0|                EVP_KEYEXCH_free(rctx->op.kex.exchange);
  314|      0|                rctx->op.kex.exchange = NULL;
  315|      0|                goto err;
  316|      0|            }
  317|      0|            return rctx;
  318|      0|        }
  319|  7.25k|    } else if (EVP_PKEY_CTX_IS_SIGNATURE_OP(pctx)) {
  ------------------
  |  |  473|  7.25k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1547|  7.25k|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1531|  7.25k|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1541|  7.25k|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1548|  7.25k|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1532|  7.25k|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1542|  7.25k|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1549|  7.25k|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1533|  7.25k|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1550|  7.25k|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1534|  7.25k|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1535|  7.25k|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (473:5): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
  320|  7.25k|        if (pctx->op.sig.signature != NULL) {
  ------------------
  |  Branch (320:13): [True: 7.25k, False: 0]
  ------------------
  321|  7.25k|            rctx->op.sig.signature = pctx->op.sig.signature;
  322|  7.25k|            if (!EVP_SIGNATURE_up_ref(rctx->op.sig.signature))
  ------------------
  |  Branch (322:17): [True: 0, False: 7.25k]
  ------------------
  323|      0|                goto err;
  324|  7.25k|        }
  325|  7.25k|        if (pctx->op.sig.algctx != NULL) {
  ------------------
  |  Branch (325:13): [True: 7.25k, False: 0]
  ------------------
  326|  7.25k|            if (!ossl_assert(pctx->op.sig.signature != NULL))
  ------------------
  |  |   52|  7.25k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  7.25k|    __FILE__, __LINE__)
  ------------------
  |  Branch (326:17): [True: 0, False: 7.25k]
  ------------------
  327|      0|                goto err;
  328|       |
  329|  7.25k|            if (pctx->op.sig.signature->dupctx != NULL)
  ------------------
  |  Branch (329:17): [True: 7.25k, False: 0]
  ------------------
  330|  7.25k|                rctx->op.sig.algctx
  331|  7.25k|                    = pctx->op.sig.signature->dupctx(pctx->op.sig.algctx);
  332|       |
  333|  7.25k|            if (rctx->op.sig.algctx == NULL) {
  ------------------
  |  Branch (333:17): [True: 0, False: 7.25k]
  ------------------
  334|      0|                EVP_SIGNATURE_free(rctx->op.sig.signature);
  335|      0|                rctx->op.sig.signature = NULL;
  336|      0|                goto err;
  337|      0|            }
  338|  7.25k|            return rctx;
  339|  7.25k|        }
  340|  7.25k|    } else if (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(pctx)) {
  ------------------
  |  |  479|      0|    (((ctx)->operation & EVP_PKEY_OP_TYPE_CRYPT) != 0)
  |  |  ------------------
  |  |  |  | 1553|      0|    (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1536|      0|#define EVP_PKEY_OP_ENCRYPT (1 << 9)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1537|      0|#define EVP_PKEY_OP_DECRYPT (1 << 10)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (479:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  341|      0|        if (pctx->op.ciph.cipher != NULL) {
  ------------------
  |  Branch (341:13): [True: 0, False: 0]
  ------------------
  342|      0|            rctx->op.ciph.cipher = pctx->op.ciph.cipher;
  343|      0|            if (!EVP_ASYM_CIPHER_up_ref(rctx->op.ciph.cipher))
  ------------------
  |  Branch (343:17): [True: 0, False: 0]
  ------------------
  344|      0|                goto err;
  345|      0|        }
  346|      0|        if (pctx->op.ciph.algctx != NULL) {
  ------------------
  |  Branch (346:13): [True: 0, False: 0]
  ------------------
  347|      0|            if (!ossl_assert(pctx->op.ciph.cipher != NULL))
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (347:17): [True: 0, False: 0]
  ------------------
  348|      0|                goto err;
  349|       |
  350|      0|            if (pctx->op.ciph.cipher->dupctx != NULL)
  ------------------
  |  Branch (350:17): [True: 0, False: 0]
  ------------------
  351|      0|                rctx->op.ciph.algctx
  352|      0|                    = pctx->op.ciph.cipher->dupctx(pctx->op.ciph.algctx);
  353|       |
  354|      0|            if (rctx->op.ciph.algctx == NULL) {
  ------------------
  |  Branch (354:17): [True: 0, False: 0]
  ------------------
  355|      0|                EVP_ASYM_CIPHER_free(rctx->op.ciph.cipher);
  356|      0|                rctx->op.ciph.cipher = NULL;
  357|      0|                goto err;
  358|      0|            }
  359|      0|            return rctx;
  360|      0|        }
  361|      0|    } else if (EVP_PKEY_CTX_IS_KEM_OP(pctx)) {
  ------------------
  |  |  488|      0|    (((ctx)->operation & EVP_PKEY_OP_TYPE_KEM) != 0)
  |  |  ------------------
  |  |  |  | 1562|      0|    (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1539|      0|#define EVP_PKEY_OP_ENCAPSULATE (1 << 12)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1540|      0|#define EVP_PKEY_OP_DECAPSULATE (1 << 13)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (488:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  362|      0|        if (pctx->op.encap.kem != NULL) {
  ------------------
  |  Branch (362:13): [True: 0, False: 0]
  ------------------
  363|      0|            rctx->op.encap.kem = pctx->op.encap.kem;
  364|      0|            if (!EVP_KEM_up_ref(rctx->op.encap.kem))
  ------------------
  |  Branch (364:17): [True: 0, False: 0]
  ------------------
  365|      0|                goto err;
  366|      0|        }
  367|      0|        if (pctx->op.encap.algctx != NULL) {
  ------------------
  |  Branch (367:13): [True: 0, False: 0]
  ------------------
  368|      0|            if (!ossl_assert(pctx->op.encap.kem != NULL))
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (368:17): [True: 0, False: 0]
  ------------------
  369|      0|                goto err;
  370|       |
  371|      0|            if (pctx->op.encap.kem->dupctx != NULL)
  ------------------
  |  Branch (371:17): [True: 0, False: 0]
  ------------------
  372|      0|                rctx->op.encap.algctx
  373|      0|                    = pctx->op.encap.kem->dupctx(pctx->op.encap.algctx);
  374|       |
  375|      0|            if (rctx->op.encap.algctx == NULL) {
  ------------------
  |  Branch (375:17): [True: 0, False: 0]
  ------------------
  376|      0|                EVP_KEM_free(rctx->op.encap.kem);
  377|      0|                rctx->op.encap.kem = NULL;
  378|      0|                goto err;
  379|      0|            }
  380|      0|            return rctx;
  381|      0|        }
  382|      0|    } else if (EVP_PKEY_CTX_IS_GEN_OP(pctx)) {
  ------------------
  |  |  482|      0|    (((ctx)->operation & EVP_PKEY_OP_TYPE_GEN) != 0)
  |  |  ------------------
  |  |  |  | 1565|      0|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1528|      0|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1529|      0|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (482:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  383|       |        /* Not supported - This would need a gen_dupctx() to work */
  384|      0|        goto err;
  385|      0|    }
  386|       |
  387|      0|    if (pctx->peerkey != NULL && !EVP_PKEY_up_ref(pctx->peerkey))
  ------------------
  |  Branch (387:9): [True: 0, False: 0]
  |  Branch (387:34): [True: 0, False: 0]
  ------------------
  388|      0|        goto err;
  389|       |
  390|      0|    rctx->peerkey = pctx->peerkey;
  391|       |
  392|      0|    if (rctx->operation == EVP_PKEY_OP_UNDEFINED) {
  ------------------
  |  | 1527|      0|#define EVP_PKEY_OP_UNDEFINED 0
  ------------------
  |  Branch (392:9): [True: 0, False: 0]
  ------------------
  393|      0|        EVP_KEYMGMT *tmp_keymgmt = pctx->keymgmt;
  394|      0|        void *provkey;
  395|       |
  396|      0|        if (pctx->pkey == NULL)
  ------------------
  |  Branch (396:13): [True: 0, False: 0]
  ------------------
  397|      0|            return rctx;
  398|       |
  399|      0|        provkey = evp_pkey_export_to_provider(pctx->pkey, pctx->libctx,
  400|      0|            &tmp_keymgmt, pctx->propquery);
  401|      0|        if (provkey == NULL)
  ------------------
  |  Branch (401:13): [True: 0, False: 0]
  ------------------
  402|      0|            goto err;
  403|      0|        if (!EVP_KEYMGMT_up_ref(tmp_keymgmt))
  ------------------
  |  Branch (403:13): [True: 0, False: 0]
  ------------------
  404|      0|            goto err;
  405|      0|        EVP_KEYMGMT_free(rctx->keymgmt);
  406|      0|        rctx->keymgmt = tmp_keymgmt;
  407|      0|        return rctx;
  408|      0|    }
  409|      0|err:
  410|      0|    EVP_PKEY_CTX_free(rctx);
  411|       |    return NULL;
  412|      0|}
EVP_PKEY_CTX_set_params:
  425|  18.1k|{
  426|  18.1k|    switch (evp_pkey_ctx_state(ctx)) {
  ------------------
  |  Branch (426:13): [True: 18.1k, False: 0]
  ------------------
  427|  18.1k|    case EVP_PKEY_STATE_PROVIDER:
  ------------------
  |  |  680|  18.1k|#define EVP_PKEY_STATE_PROVIDER 2
  ------------------
  |  Branch (427:5): [True: 18.1k, False: 0]
  ------------------
  428|  18.1k|        if (EVP_PKEY_CTX_IS_DERIVE_OP(ctx)
  ------------------
  |  |  476|  36.2k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_DERIVE) != 0)
  |  |  ------------------
  |  |  |  | 1556|  18.1k|    (EVP_PKEY_OP_DERIVE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1538|  18.1k|#define EVP_PKEY_OP_DERIVE (1 << 11)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (476:5): [True: 0, False: 18.1k]
  |  |  ------------------
  ------------------
  429|      0|            && ctx->op.kex.exchange != NULL
  ------------------
  |  Branch (429:16): [True: 0, False: 0]
  ------------------
  430|      0|            && ctx->op.kex.exchange->set_ctx_params != NULL)
  ------------------
  |  Branch (430:16): [True: 0, False: 0]
  ------------------
  431|      0|            return ctx->op.kex.exchange->set_ctx_params(ctx->op.kex.algctx,
  432|      0|                params);
  433|  18.1k|        if (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx)
  ------------------
  |  |  473|  36.2k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1547|  18.1k|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1531|  18.1k|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1541|  18.1k|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1548|  18.1k|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1532|  18.1k|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1542|  18.1k|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1549|  18.1k|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1533|  18.1k|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1550|  18.1k|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1534|  18.1k|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1535|  18.1k|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (473:5): [True: 0, False: 18.1k]
  |  |  ------------------
  ------------------
  434|      0|            && ctx->op.sig.signature != NULL
  ------------------
  |  Branch (434:16): [True: 0, False: 0]
  ------------------
  435|      0|            && ctx->op.sig.signature->set_ctx_params != NULL)
  ------------------
  |  Branch (435:16): [True: 0, False: 0]
  ------------------
  436|      0|            return ctx->op.sig.signature->set_ctx_params(ctx->op.sig.algctx,
  437|      0|                params);
  438|  18.1k|        if (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx)
  ------------------
  |  |  479|  36.2k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_CRYPT) != 0)
  |  |  ------------------
  |  |  |  | 1553|  18.1k|    (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1536|  18.1k|#define EVP_PKEY_OP_ENCRYPT (1 << 9)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1537|  18.1k|#define EVP_PKEY_OP_DECRYPT (1 << 10)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (479:5): [True: 0, False: 18.1k]
  |  |  ------------------
  ------------------
  439|      0|            && ctx->op.ciph.cipher != NULL
  ------------------
  |  Branch (439:16): [True: 0, False: 0]
  ------------------
  440|      0|            && ctx->op.ciph.cipher->set_ctx_params != NULL)
  ------------------
  |  Branch (440:16): [True: 0, False: 0]
  ------------------
  441|      0|            return ctx->op.ciph.cipher->set_ctx_params(ctx->op.ciph.algctx,
  442|      0|                params);
  443|  18.1k|        if (EVP_PKEY_CTX_IS_GEN_OP(ctx)
  ------------------
  |  |  482|  36.2k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_GEN) != 0)
  |  |  ------------------
  |  |  |  | 1565|  18.1k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1528|  18.1k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1529|  18.1k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (482:5): [True: 18.1k, False: 0]
  |  |  ------------------
  ------------------
  444|  18.1k|            && ctx->keymgmt != NULL
  ------------------
  |  Branch (444:16): [True: 18.1k, False: 0]
  ------------------
  445|  18.1k|            && ctx->keymgmt->gen_set_params != NULL)
  ------------------
  |  Branch (445:16): [True: 18.1k, False: 0]
  ------------------
  446|  18.1k|            return evp_keymgmt_gen_set_params(ctx->keymgmt, ctx->op.keymgmt.genctx,
  447|  18.1k|                params);
  448|      0|        if (EVP_PKEY_CTX_IS_KEM_OP(ctx)
  ------------------
  |  |  488|      0|    (((ctx)->operation & EVP_PKEY_OP_TYPE_KEM) != 0)
  |  |  ------------------
  |  |  |  | 1562|      0|    (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1539|      0|#define EVP_PKEY_OP_ENCAPSULATE (1 << 12)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1540|      0|#define EVP_PKEY_OP_DECAPSULATE (1 << 13)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (488:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  449|      0|            && ctx->op.encap.kem != NULL
  ------------------
  |  Branch (449:16): [True: 0, False: 0]
  ------------------
  450|      0|            && ctx->op.encap.kem->set_ctx_params != NULL)
  ------------------
  |  Branch (450:16): [True: 0, False: 0]
  ------------------
  451|      0|            return ctx->op.encap.kem->set_ctx_params(ctx->op.encap.algctx,
  452|      0|                params);
  453|      0|        break;
  454|      0|    case EVP_PKEY_STATE_UNKNOWN:
  ------------------
  |  |  678|      0|#define EVP_PKEY_STATE_UNKNOWN 0
  ------------------
  |  Branch (454:5): [True: 0, False: 18.1k]
  ------------------
  455|      0|        break;
  456|      0|#ifndef FIPS_MODULE
  457|      0|    case EVP_PKEY_STATE_LEGACY:
  ------------------
  |  |  679|      0|#define EVP_PKEY_STATE_LEGACY 1
  ------------------
  |  Branch (457:5): [True: 0, False: 18.1k]
  ------------------
  458|      0|        return evp_pkey_ctx_set_params_to_ctrl(ctx, params);
  459|  18.1k|#endif
  460|  18.1k|    }
  461|      0|    return 0;
  462|  18.1k|}
evp_pkey_ctx_use_cached_data:
 1251|  10.8k|{
 1252|  10.8k|    int ret = 1;
 1253|       |
 1254|  10.8k|    if (ret && ctx->cached_parameters.dist_id_set) {
  ------------------
  |  Branch (1254:9): [True: 10.8k, False: 0]
  |  Branch (1254:16): [True: 0, False: 10.8k]
  ------------------
 1255|      0|        const char *name = ctx->cached_parameters.dist_id_name;
 1256|      0|        const void *val = ctx->cached_parameters.dist_id;
 1257|      0|        size_t len = ctx->cached_parameters.dist_id_len;
 1258|       |
 1259|      0|        if (name != NULL)
  ------------------
  |  Branch (1259:13): [True: 0, False: 0]
  ------------------
 1260|      0|            ret = evp_pkey_ctx_ctrl_str_int(ctx, name, val);
 1261|      0|        else
 1262|      0|            ret = evp_pkey_ctx_ctrl_int(ctx, -1, ctx->operation,
 1263|      0|                EVP_PKEY_CTRL_SET1_ID,
  ------------------
  |  | 1590|      0|#define EVP_PKEY_CTRL_SET1_ID 15
  ------------------
 1264|      0|                (int)len, (void *)val);
 1265|      0|    }
 1266|       |
 1267|  10.8k|    return ret;
 1268|  10.8k|}
pmeth_lib.c:int_ctx_new:
   71|   260k|{
   72|   260k|    EVP_PKEY_CTX *ret = NULL;
   73|   260k|    EVP_KEYMGMT *keymgmt = NULL;
   74|       |
   75|       |    /* Code below to be removed when legacy support is dropped. */
   76|       |    /* BEGIN legacy */
   77|   260k|    if (id == -1) {
  ------------------
  |  Branch (77:9): [True: 260k, False: 0]
  ------------------
   78|   260k|        if (pkey != NULL && !evp_pkey_is_provided(pkey)) {
  ------------------
  |  |  383|   234k|    ((pk)->keymgmt != NULL)
  ------------------
  |  Branch (78:13): [True: 234k, False: 25.4k]
  |  Branch (78:29): [True: 191k, False: 43.5k]
  ------------------
   79|   191k|            id = pkey->type;
   80|   191k|        } else {
   81|  68.9k|            if (pkey != NULL) {
  ------------------
  |  Branch (81:17): [True: 43.5k, False: 25.4k]
  ------------------
   82|       |                /* Must be provided if we get here */
   83|  43.5k|                keytype = EVP_KEYMGMT_get0_name(pkey->keymgmt);
   84|  43.5k|            }
   85|  68.9k|#ifndef FIPS_MODULE
   86|  68.9k|            if (keytype != NULL) {
  ------------------
  |  Branch (86:17): [True: 68.9k, False: 0]
  ------------------
   87|  68.9k|                id = evp_pkey_name2type(keytype);
   88|  68.9k|                if (id == NID_undef)
  ------------------
  |  |   18|  68.9k|#define NID_undef                       0
  ------------------
  |  Branch (88:21): [True: 29.0k, False: 39.9k]
  ------------------
   89|  29.0k|                    id = -1;
   90|  68.9k|            }
   91|  68.9k|#endif
   92|  68.9k|        }
   93|   260k|    }
   94|       |
   95|   260k|#ifndef FIPS_MODULE
   96|       |    /*
   97|       |     * Here, we extract what information we can for the purpose of
   98|       |     * supporting usage with implementations from providers, to make
   99|       |     * for a smooth transition from legacy stuff to provider based stuff.
  100|       |     */
  101|   260k|    if (id != -1)
  ------------------
  |  Branch (101:9): [True: 231k, False: 29.0k]
  ------------------
  102|   231k|        keytype = OBJ_nid2sn(id);
  103|       |
  104|       |    /* END legacy */
  105|   260k|#endif /* FIPS_MODULE */
  106|       |    /* We try fetching a provider implementation. */
  107|   260k|    if (keytype != NULL) {
  ------------------
  |  Branch (107:9): [True: 260k, False: 0]
  ------------------
  108|       |        /*
  109|       |         * If |pkey| is given and is provided, we take a reference to its
  110|       |         * keymgmt.  Otherwise, we fetch one for the keytype we got. This
  111|       |         * is to ensure that operation init functions can access what they
  112|       |         * need through this single pointer.
  113|       |         */
  114|   260k|        if (pkey != NULL && pkey->keymgmt != NULL) {
  ------------------
  |  Branch (114:13): [True: 234k, False: 25.4k]
  |  Branch (114:29): [True: 43.5k, False: 191k]
  ------------------
  115|  43.5k|            if (!EVP_KEYMGMT_up_ref(pkey->keymgmt))
  ------------------
  |  Branch (115:17): [True: 0, False: 43.5k]
  ------------------
  116|  43.5k|                ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  117|  43.5k|            else
  118|  43.5k|                keymgmt = pkey->keymgmt;
  119|   216k|        } else {
  120|   216k|            keymgmt = EVP_KEYMGMT_fetch(libctx, keytype, propquery);
  121|   216k|        }
  122|   260k|        if (keymgmt == NULL)
  ------------------
  |  Branch (122:13): [True: 0, False: 260k]
  ------------------
  123|      0|            return NULL; /* EVP_KEYMGMT_fetch() recorded an error */
  124|       |
  125|   260k|#ifndef FIPS_MODULE
  126|       |        /*
  127|       |         * Chase down the legacy NID, as that might be needed for diverse
  128|       |         * purposes, such as ensure that EVP_PKEY_type() can return sensible
  129|       |         * values. We go through all keymgmt names, because the keytype
  130|       |         * that's passed to this function doesn't necessarily translate
  131|       |         * directly.
  132|       |         */
  133|   260k|        if (keymgmt != NULL) {
  ------------------
  |  Branch (133:13): [True: 260k, False: 0]
  ------------------
  134|   260k|            int tmp_id = evp_keymgmt_get_legacy_alg(keymgmt);
  135|       |
  136|   260k|            if (tmp_id != NID_undef) {
  ------------------
  |  |   18|   260k|#define NID_undef                       0
  ------------------
  |  Branch (136:17): [True: 231k, False: 29.0k]
  ------------------
  137|   231k|                if (id == -1) {
  ------------------
  |  Branch (137:21): [True: 0, False: 231k]
  ------------------
  138|      0|                    id = tmp_id;
  139|   231k|                } else {
  140|       |                    /*
  141|       |                     * It really really shouldn't differ.  If it still does,
  142|       |                     * something is very wrong.
  143|       |                     */
  144|   231k|                    if (!ossl_assert(id == tmp_id)) {
  ------------------
  |  |   52|   231k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   231k|    __FILE__, __LINE__)
  ------------------
  |  Branch (144:25): [True: 0, False: 231k]
  ------------------
  145|      0|                        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  146|      0|                        EVP_KEYMGMT_free(keymgmt);
  147|      0|                        return NULL;
  148|      0|                    }
  149|   231k|                }
  150|   231k|            }
  151|   260k|        }
  152|   260k|#endif
  153|   260k|    }
  154|       |
  155|   260k|    if (keymgmt == NULL) {
  ------------------
  |  Branch (155:9): [True: 0, False: 260k]
  ------------------
  156|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UNSUPPORTED_ALGORITHM);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  157|   260k|    } else {
  158|   260k|        ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|   260k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  159|   260k|    }
  160|       |
  161|   260k|    if (ret == NULL) {
  ------------------
  |  Branch (161:9): [True: 0, False: 260k]
  ------------------
  162|      0|        EVP_KEYMGMT_free(keymgmt);
  163|      0|        return NULL;
  164|      0|    }
  165|   260k|    if (propquery != NULL) {
  ------------------
  |  Branch (165:9): [True: 0, False: 260k]
  ------------------
  166|      0|        ret->propquery = OPENSSL_strdup(propquery);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  167|      0|        if (ret->propquery == NULL) {
  ------------------
  |  Branch (167:13): [True: 0, False: 0]
  ------------------
  168|      0|            OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  169|      0|            EVP_KEYMGMT_free(keymgmt);
  170|      0|            return NULL;
  171|      0|        }
  172|      0|    }
  173|   260k|    ret->libctx = libctx;
  174|   260k|    ret->keytype = keytype;
  175|   260k|    ret->keymgmt = keymgmt;
  176|   260k|    ret->legacy_keytype = id;
  177|   260k|    ret->operation = EVP_PKEY_OP_UNDEFINED;
  ------------------
  |  | 1527|   260k|#define EVP_PKEY_OP_UNDEFINED 0
  ------------------
  178|       |
  179|   260k|    if (pkey != NULL && !EVP_PKEY_up_ref(pkey)) {
  ------------------
  |  Branch (179:9): [True: 234k, False: 25.4k]
  |  Branch (179:25): [True: 0, False: 234k]
  ------------------
  180|      0|        EVP_PKEY_CTX_free(ret);
  181|      0|        return NULL;
  182|      0|    }
  183|       |
  184|   260k|    ret->pkey = pkey;
  185|       |
  186|   260k|    return ret;
  187|   260k|}
pmeth_lib.c:decode_cmd:
 1154|   267k|{
 1155|   267k|    if (cmd == -1) {
  ------------------
  |  Branch (1155:9): [True: 0, False: 267k]
  ------------------
 1156|       |        /*
 1157|       |         * The consequence of the assertion not being true is that this
 1158|       |         * function will return -1, which will cause the calling functions
 1159|       |         * to signal that the command is unsupported...  in non-debug mode.
 1160|       |         */
 1161|      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__)
  ------------------
 1162|      0|            if (strcmp(name, "distid") == 0 || strcmp(name, "hexdistid") == 0)
  ------------------
  |  Branch (1162:17): [True: 0, False: 0]
  |  Branch (1162:48): [True: 0, False: 0]
  ------------------
 1163|      0|                cmd = EVP_PKEY_CTRL_SET1_ID;
  ------------------
  |  | 1590|      0|#define EVP_PKEY_CTRL_SET1_ID 15
  ------------------
 1164|      0|    }
 1165|       |
 1166|   267k|    return cmd;
 1167|   267k|}
pmeth_lib.c:evp_pkey_ctx_free_cached_data:
 1233|   267k|{
 1234|   267k|    cmd = decode_cmd(cmd, name);
 1235|   267k|    switch (cmd) {
  ------------------
  |  Branch (1235:13): [True: 267k, False: 0]
  ------------------
 1236|   267k|    case EVP_PKEY_CTRL_SET1_ID:
  ------------------
  |  | 1590|   267k|#define EVP_PKEY_CTRL_SET1_ID 15
  ------------------
  |  Branch (1236:5): [True: 267k, False: 0]
  ------------------
 1237|   267k|        OPENSSL_free(ctx->cached_parameters.dist_id);
  ------------------
  |  |  132|   267k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1238|   267k|        OPENSSL_free(ctx->cached_parameters.dist_id_name);
  ------------------
  |  |  132|   267k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1239|   267k|        ctx->cached_parameters.dist_id = NULL;
 1240|       |        ctx->cached_parameters.dist_id_name = NULL;
 1241|   267k|        break;
 1242|   267k|    }
 1243|   267k|}
pmeth_lib.c:evp_pkey_ctx_free_all_cached_data:
 1246|   267k|{
 1247|   267k|    evp_pkey_ctx_free_cached_data(ctx, EVP_PKEY_CTRL_SET1_ID, NULL);
  ------------------
  |  | 1590|   267k|#define EVP_PKEY_CTRL_SET1_ID 15
  ------------------
 1248|   267k|}

EVP_SIGNATURE_free:
  456|  47.5k|{
  457|  47.5k|    int i;
  458|       |
  459|  47.5k|    if (signature == NULL)
  ------------------
  |  Branch (459:9): [True: 10.8k, False: 36.6k]
  ------------------
  460|  10.8k|        return;
  461|  36.6k|    CRYPTO_DOWN_REF(&signature->refcnt, &i);
  462|  36.6k|    if (i > 0)
  ------------------
  |  Branch (462:9): [True: 36.6k, False: 0]
  ------------------
  463|  36.6k|        return;
  464|      0|    OPENSSL_free(signature->type_name);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  465|      0|    ossl_provider_free(signature->prov);
  466|      0|    CRYPTO_FREE_REF(&signature->refcnt);
  467|      0|    OPENSSL_free(signature);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  468|      0|}
EVP_SIGNATURE_up_ref:
  471|  36.6k|{
  472|  36.6k|    int ref = 0;
  473|       |
  474|  36.6k|    CRYPTO_UP_REF(&signature->refcnt, &ref);
  475|  36.6k|    return 1;
  476|  36.6k|}
EVP_SIGNATURE_get0_provider:
  479|  10.8k|{
  480|  10.8k|    return signature->prov;
  481|  10.8k|}
EVP_SIGNATURE_fetch:
  485|  29.3k|{
  486|  29.3k|    return evp_generic_fetch(ctx, OSSL_OP_SIGNATURE, algorithm, properties,
  ------------------
  |  |  290|  29.3k|#define OSSL_OP_SIGNATURE 12
  ------------------
  487|  29.3k|        evp_signature_from_algorithm,
  488|  29.3k|        evp_signature_up_ref,
  489|  29.3k|        evp_signature_free);
  490|  29.3k|}
signature.c:evp_signature_from_algorithm:
   55|     59|{
   56|     59|    const OSSL_DISPATCH *fns = algodef->implementation;
   57|     59|    EVP_SIGNATURE *signature = NULL;
   58|     59|    const char *desc;
   59|       |    /* Counts newctx / freectx */
   60|     59|    int ctxfncnt = 0;
   61|       |    /* Counts all init functions  */
   62|     59|    int initfncnt = 0;
   63|       |    /* Counts all parameter functions */
   64|     59|    int gparamfncnt = 0, sparamfncnt = 0, gmdparamfncnt = 0, smdparamfncnt = 0;
   65|     59|    int valid = 0;
   66|       |
   67|     59|    if ((signature = evp_signature_new(prov)) == NULL) {
  ------------------
  |  Branch (67:9): [True: 0, False: 59]
  ------------------
   68|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   69|      0|        goto err;
   70|      0|    }
   71|       |
   72|     59|    signature->name_id = name_id;
   73|     59|    if ((signature->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL)
  ------------------
  |  Branch (73:9): [True: 0, False: 59]
  ------------------
   74|      0|        goto err;
   75|     59|    signature->description = algodef->algorithm_description;
   76|     59|    desc = signature->description != NULL ? signature->description : "";
  ------------------
  |  Branch (76:12): [True: 12, False: 47]
  ------------------
   77|       |
   78|  1.08k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (78:12): [True: 1.02k, False: 59]
  ------------------
   79|  1.02k|        switch (fns->function_id) {
  ------------------
  |  Branch (79:17): [True: 1.02k, False: 0]
  ------------------
   80|     59|        case OSSL_FUNC_SIGNATURE_NEWCTX:
  ------------------
  |  |  797|     59|#define OSSL_FUNC_SIGNATURE_NEWCTX 1
  ------------------
  |  Branch (80:9): [True: 59, False: 962]
  ------------------
   81|     59|            if (signature->newctx != NULL)
  ------------------
  |  Branch (81:17): [True: 0, False: 59]
  ------------------
   82|      0|                break;
   83|     59|            signature->newctx = OSSL_FUNC_signature_newctx(fns);
   84|     59|            ctxfncnt++;
   85|     59|            break;
   86|     42|        case OSSL_FUNC_SIGNATURE_SIGN_INIT:
  ------------------
  |  |  798|     42|#define OSSL_FUNC_SIGNATURE_SIGN_INIT 2
  ------------------
  |  Branch (86:9): [True: 42, False: 979]
  ------------------
   87|     42|            if (signature->sign_init != NULL)
  ------------------
  |  Branch (87:17): [True: 2, False: 40]
  ------------------
   88|      2|                break;
   89|     40|            signature->sign_init = OSSL_FUNC_signature_sign_init(fns);
   90|     40|            initfncnt++;
   91|     40|            break;
   92|     55|        case OSSL_FUNC_SIGNATURE_SIGN:
  ------------------
  |  |  799|     55|#define OSSL_FUNC_SIGNATURE_SIGN 3
  ------------------
  |  Branch (92:9): [True: 55, False: 966]
  ------------------
   93|     55|            if (signature->sign != NULL)
  ------------------
  |  Branch (93:17): [True: 0, False: 55]
  ------------------
   94|      0|                break;
   95|     55|            signature->sign = OSSL_FUNC_signature_sign(fns);
   96|     55|            break;
   97|     51|        case OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_INIT:
  ------------------
  |  |  823|     51|#define OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_INIT 27
  ------------------
  |  Branch (97:9): [True: 51, False: 970]
  ------------------
   98|     51|            if (signature->sign_message_init != NULL)
  ------------------
  |  Branch (98:17): [True: 0, False: 51]
  ------------------
   99|      0|                break;
  100|     51|            signature->sign_message_init
  101|     51|                = OSSL_FUNC_signature_sign_message_init(fns);
  102|     51|            initfncnt++;
  103|     51|            break;
  104|     34|        case OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_UPDATE:
  ------------------
  |  |  824|     34|#define OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_UPDATE 28
  ------------------
  |  Branch (104:9): [True: 34, False: 987]
  ------------------
  105|     34|            if (signature->sign_message_update != NULL)
  ------------------
  |  Branch (105:17): [True: 0, False: 34]
  ------------------
  106|      0|                break;
  107|     34|            signature->sign_message_update
  108|     34|                = OSSL_FUNC_signature_sign_message_update(fns);
  109|     34|            break;
  110|     34|        case OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_FINAL:
  ------------------
  |  |  825|     34|#define OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_FINAL 29
  ------------------
  |  Branch (110:9): [True: 34, False: 987]
  ------------------
  111|     34|            if (signature->sign_message_final != NULL)
  ------------------
  |  Branch (111:17): [True: 0, False: 34]
  ------------------
  112|      0|                break;
  113|     34|            signature->sign_message_final
  114|     34|                = OSSL_FUNC_signature_sign_message_final(fns);
  115|     34|            break;
  116|     42|        case OSSL_FUNC_SIGNATURE_VERIFY_INIT:
  ------------------
  |  |  800|     42|#define OSSL_FUNC_SIGNATURE_VERIFY_INIT 4
  ------------------
  |  Branch (116:9): [True: 42, False: 979]
  ------------------
  117|     42|            if (signature->verify_init != NULL)
  ------------------
  |  Branch (117:17): [True: 2, False: 40]
  ------------------
  118|      2|                break;
  119|     40|            signature->verify_init = OSSL_FUNC_signature_verify_init(fns);
  120|     40|            initfncnt++;
  121|     40|            break;
  122|     55|        case OSSL_FUNC_SIGNATURE_VERIFY:
  ------------------
  |  |  801|     55|#define OSSL_FUNC_SIGNATURE_VERIFY 5
  ------------------
  |  Branch (122:9): [True: 55, False: 966]
  ------------------
  123|     55|            if (signature->verify != NULL)
  ------------------
  |  Branch (123:17): [True: 0, False: 55]
  ------------------
  124|      0|                break;
  125|     55|            signature->verify = OSSL_FUNC_signature_verify(fns);
  126|     55|            break;
  127|     51|        case OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_INIT:
  ------------------
  |  |  826|     51|#define OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_INIT 30
  ------------------
  |  Branch (127:9): [True: 51, False: 970]
  ------------------
  128|     51|            if (signature->verify_message_init != NULL)
  ------------------
  |  Branch (128:17): [True: 0, False: 51]
  ------------------
  129|      0|                break;
  130|     51|            signature->verify_message_init
  131|     51|                = OSSL_FUNC_signature_verify_message_init(fns);
  132|     51|            initfncnt++;
  133|     51|            break;
  134|     34|        case OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_UPDATE:
  ------------------
  |  |  827|     34|#define OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_UPDATE 31
  ------------------
  |  Branch (134:9): [True: 34, False: 987]
  ------------------
  135|     34|            if (signature->verify_message_update != NULL)
  ------------------
  |  Branch (135:17): [True: 0, False: 34]
  ------------------
  136|      0|                break;
  137|     34|            signature->verify_message_update
  138|     34|                = OSSL_FUNC_signature_verify_message_update(fns);
  139|     34|            break;
  140|     34|        case OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_FINAL:
  ------------------
  |  |  828|     34|#define OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_FINAL 32
  ------------------
  |  Branch (140:9): [True: 34, False: 987]
  ------------------
  141|     34|            if (signature->verify_message_final != NULL)
  ------------------
  |  Branch (141:17): [True: 0, False: 34]
  ------------------
  142|      0|                break;
  143|     34|            signature->verify_message_final
  144|     34|                = OSSL_FUNC_signature_verify_message_final(fns);
  145|     34|            break;
  146|     14|        case OSSL_FUNC_SIGNATURE_VERIFY_RECOVER_INIT:
  ------------------
  |  |  802|     14|#define OSSL_FUNC_SIGNATURE_VERIFY_RECOVER_INIT 6
  ------------------
  |  Branch (146:9): [True: 14, False: 1.00k]
  ------------------
  147|     14|            if (signature->verify_recover_init != NULL)
  ------------------
  |  Branch (147:17): [True: 0, False: 14]
  ------------------
  148|      0|                break;
  149|     14|            signature->verify_recover_init
  150|     14|                = OSSL_FUNC_signature_verify_recover_init(fns);
  151|     14|            initfncnt++;
  152|     14|            break;
  153|     14|        case OSSL_FUNC_SIGNATURE_VERIFY_RECOVER:
  ------------------
  |  |  803|     14|#define OSSL_FUNC_SIGNATURE_VERIFY_RECOVER 7
  ------------------
  |  Branch (153:9): [True: 14, False: 1.00k]
  ------------------
  154|     14|            if (signature->verify_recover != NULL)
  ------------------
  |  Branch (154:17): [True: 0, False: 14]
  ------------------
  155|      0|                break;
  156|     14|            signature->verify_recover
  157|     14|                = OSSL_FUNC_signature_verify_recover(fns);
  158|     14|            break;
  159|     25|        case OSSL_FUNC_SIGNATURE_DIGEST_SIGN_INIT:
  ------------------
  |  |  804|     25|#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_INIT 8
  ------------------
  |  Branch (159:9): [True: 25, False: 996]
  ------------------
  160|     25|            if (signature->digest_sign_init != NULL)
  ------------------
  |  Branch (160:17): [True: 0, False: 25]
  ------------------
  161|      0|                break;
  162|     25|            signature->digest_sign_init
  163|     25|                = OSSL_FUNC_signature_digest_sign_init(fns);
  164|     25|            initfncnt++;
  165|     25|            break;
  166|      8|        case OSSL_FUNC_SIGNATURE_DIGEST_SIGN_UPDATE:
  ------------------
  |  |  805|      8|#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_UPDATE 9
  ------------------
  |  Branch (166:9): [True: 8, False: 1.01k]
  ------------------
  167|      8|            if (signature->digest_sign_update != NULL)
  ------------------
  |  Branch (167:17): [True: 0, False: 8]
  ------------------
  168|      0|                break;
  169|      8|            signature->digest_sign_update
  170|      8|                = OSSL_FUNC_signature_digest_sign_update(fns);
  171|      8|            break;
  172|      8|        case OSSL_FUNC_SIGNATURE_DIGEST_SIGN_FINAL:
  ------------------
  |  |  806|      8|#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_FINAL 10
  ------------------
  |  Branch (172:9): [True: 8, False: 1.01k]
  ------------------
  173|      8|            if (signature->digest_sign_final != NULL)
  ------------------
  |  Branch (173:17): [True: 0, False: 8]
  ------------------
  174|      0|                break;
  175|      8|            signature->digest_sign_final
  176|      8|                = OSSL_FUNC_signature_digest_sign_final(fns);
  177|      8|            break;
  178|     17|        case OSSL_FUNC_SIGNATURE_DIGEST_SIGN:
  ------------------
  |  |  807|     17|#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN 11
  ------------------
  |  Branch (178:9): [True: 17, False: 1.00k]
  ------------------
  179|     17|            if (signature->digest_sign != NULL)
  ------------------
  |  Branch (179:17): [True: 0, False: 17]
  ------------------
  180|      0|                break;
  181|     17|            signature->digest_sign
  182|     17|                = OSSL_FUNC_signature_digest_sign(fns);
  183|     17|            break;
  184|     21|        case OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_INIT:
  ------------------
  |  |  808|     21|#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_INIT 12
  ------------------
  |  Branch (184:9): [True: 21, False: 1.00k]
  ------------------
  185|     21|            if (signature->digest_verify_init != NULL)
  ------------------
  |  Branch (185:17): [True: 0, False: 21]
  ------------------
  186|      0|                break;
  187|     21|            signature->digest_verify_init
  188|     21|                = OSSL_FUNC_signature_digest_verify_init(fns);
  189|     21|            initfncnt++;
  190|     21|            break;
  191|      4|        case OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_UPDATE:
  ------------------
  |  |  809|      4|#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_UPDATE 13
  ------------------
  |  Branch (191:9): [True: 4, False: 1.01k]
  ------------------
  192|      4|            if (signature->digest_verify_update != NULL)
  ------------------
  |  Branch (192:17): [True: 0, False: 4]
  ------------------
  193|      0|                break;
  194|      4|            signature->digest_verify_update
  195|      4|                = OSSL_FUNC_signature_digest_verify_update(fns);
  196|      4|            break;
  197|      4|        case OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_FINAL:
  ------------------
  |  |  810|      4|#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_FINAL 14
  ------------------
  |  Branch (197:9): [True: 4, False: 1.01k]
  ------------------
  198|      4|            if (signature->digest_verify_final != NULL)
  ------------------
  |  Branch (198:17): [True: 0, False: 4]
  ------------------
  199|      0|                break;
  200|      4|            signature->digest_verify_final
  201|      4|                = OSSL_FUNC_signature_digest_verify_final(fns);
  202|      4|            break;
  203|     17|        case OSSL_FUNC_SIGNATURE_DIGEST_VERIFY:
  ------------------
  |  |  811|     17|#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY 15
  ------------------
  |  Branch (203:9): [True: 17, False: 1.00k]
  ------------------
  204|     17|            if (signature->digest_verify != NULL)
  ------------------
  |  Branch (204:17): [True: 0, False: 17]
  ------------------
  205|      0|                break;
  206|     17|            signature->digest_verify
  207|     17|                = OSSL_FUNC_signature_digest_verify(fns);
  208|     17|            break;
  209|     59|        case OSSL_FUNC_SIGNATURE_FREECTX:
  ------------------
  |  |  812|     59|#define OSSL_FUNC_SIGNATURE_FREECTX 16
  ------------------
  |  Branch (209:9): [True: 59, False: 962]
  ------------------
  210|     59|            if (signature->freectx != NULL)
  ------------------
  |  Branch (210:17): [True: 0, False: 59]
  ------------------
  211|      0|                break;
  212|     59|            signature->freectx = OSSL_FUNC_signature_freectx(fns);
  213|     59|            ctxfncnt++;
  214|     59|            break;
  215|     59|        case OSSL_FUNC_SIGNATURE_DUPCTX:
  ------------------
  |  |  813|     59|#define OSSL_FUNC_SIGNATURE_DUPCTX 17
  ------------------
  |  Branch (215:9): [True: 59, False: 962]
  ------------------
  216|     59|            if (signature->dupctx != NULL)
  ------------------
  |  Branch (216:17): [True: 0, False: 59]
  ------------------
  217|      0|                break;
  218|     59|            signature->dupctx = OSSL_FUNC_signature_dupctx(fns);
  219|     59|            break;
  220|     55|        case OSSL_FUNC_SIGNATURE_GET_CTX_PARAMS:
  ------------------
  |  |  814|     55|#define OSSL_FUNC_SIGNATURE_GET_CTX_PARAMS 18
  ------------------
  |  Branch (220:9): [True: 55, False: 966]
  ------------------
  221|     55|            if (signature->get_ctx_params != NULL)
  ------------------
  |  Branch (221:17): [True: 0, False: 55]
  ------------------
  222|      0|                break;
  223|     55|            signature->get_ctx_params
  224|     55|                = OSSL_FUNC_signature_get_ctx_params(fns);
  225|     55|            gparamfncnt++;
  226|     55|            break;
  227|     55|        case OSSL_FUNC_SIGNATURE_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  815|     55|#define OSSL_FUNC_SIGNATURE_GETTABLE_CTX_PARAMS 19
  ------------------
  |  Branch (227:9): [True: 55, False: 966]
  ------------------
  228|     55|            if (signature->gettable_ctx_params != NULL)
  ------------------
  |  Branch (228:17): [True: 0, False: 55]
  ------------------
  229|      0|                break;
  230|     55|            signature->gettable_ctx_params
  231|     55|                = OSSL_FUNC_signature_gettable_ctx_params(fns);
  232|     55|            gparamfncnt++;
  233|     55|            break;
  234|     59|        case OSSL_FUNC_SIGNATURE_SET_CTX_PARAMS:
  ------------------
  |  |  816|     59|#define OSSL_FUNC_SIGNATURE_SET_CTX_PARAMS 20
  ------------------
  |  Branch (234:9): [True: 59, False: 962]
  ------------------
  235|     59|            if (signature->set_ctx_params != NULL)
  ------------------
  |  Branch (235:17): [True: 0, False: 59]
  ------------------
  236|      0|                break;
  237|     59|            signature->set_ctx_params
  238|     59|                = OSSL_FUNC_signature_set_ctx_params(fns);
  239|     59|            sparamfncnt++;
  240|     59|            break;
  241|     59|        case OSSL_FUNC_SIGNATURE_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  817|     59|#define OSSL_FUNC_SIGNATURE_SETTABLE_CTX_PARAMS 21
  ------------------
  |  Branch (241:9): [True: 59, False: 962]
  ------------------
  242|     59|            if (signature->settable_ctx_params != NULL)
  ------------------
  |  Branch (242:17): [True: 0, False: 59]
  ------------------
  243|      0|                break;
  244|     59|            signature->settable_ctx_params
  245|     59|                = OSSL_FUNC_signature_settable_ctx_params(fns);
  246|     59|            sparamfncnt++;
  247|     59|            break;
  248|      4|        case OSSL_FUNC_SIGNATURE_GET_CTX_MD_PARAMS:
  ------------------
  |  |  818|      4|#define OSSL_FUNC_SIGNATURE_GET_CTX_MD_PARAMS 22
  ------------------
  |  Branch (248:9): [True: 4, False: 1.01k]
  ------------------
  249|      4|            if (signature->get_ctx_md_params != NULL)
  ------------------
  |  Branch (249:17): [True: 0, False: 4]
  ------------------
  250|      0|                break;
  251|      4|            signature->get_ctx_md_params
  252|      4|                = OSSL_FUNC_signature_get_ctx_md_params(fns);
  253|      4|            gmdparamfncnt++;
  254|      4|            break;
  255|      4|        case OSSL_FUNC_SIGNATURE_GETTABLE_CTX_MD_PARAMS:
  ------------------
  |  |  819|      4|#define OSSL_FUNC_SIGNATURE_GETTABLE_CTX_MD_PARAMS 23
  ------------------
  |  Branch (255:9): [True: 4, False: 1.01k]
  ------------------
  256|      4|            if (signature->gettable_ctx_md_params != NULL)
  ------------------
  |  Branch (256:17): [True: 0, False: 4]
  ------------------
  257|      0|                break;
  258|      4|            signature->gettable_ctx_md_params
  259|      4|                = OSSL_FUNC_signature_gettable_ctx_md_params(fns);
  260|      4|            gmdparamfncnt++;
  261|      4|            break;
  262|      4|        case OSSL_FUNC_SIGNATURE_SET_CTX_MD_PARAMS:
  ------------------
  |  |  820|      4|#define OSSL_FUNC_SIGNATURE_SET_CTX_MD_PARAMS 24
  ------------------
  |  Branch (262:9): [True: 4, False: 1.01k]
  ------------------
  263|      4|            if (signature->set_ctx_md_params != NULL)
  ------------------
  |  Branch (263:17): [True: 0, False: 4]
  ------------------
  264|      0|                break;
  265|      4|            signature->set_ctx_md_params
  266|      4|                = OSSL_FUNC_signature_set_ctx_md_params(fns);
  267|      4|            smdparamfncnt++;
  268|      4|            break;
  269|      4|        case OSSL_FUNC_SIGNATURE_SETTABLE_CTX_MD_PARAMS:
  ------------------
  |  |  821|      4|#define OSSL_FUNC_SIGNATURE_SETTABLE_CTX_MD_PARAMS 25
  ------------------
  |  Branch (269:9): [True: 4, False: 1.01k]
  ------------------
  270|      4|            if (signature->settable_ctx_md_params != NULL)
  ------------------
  |  Branch (270:17): [True: 0, False: 4]
  ------------------
  271|      0|                break;
  272|      4|            signature->settable_ctx_md_params
  273|      4|                = OSSL_FUNC_signature_settable_ctx_md_params(fns);
  274|      4|            smdparamfncnt++;
  275|      4|            break;
  276|     36|        case OSSL_FUNC_SIGNATURE_QUERY_KEY_TYPES:
  ------------------
  |  |  822|     36|#define OSSL_FUNC_SIGNATURE_QUERY_KEY_TYPES 26
  ------------------
  |  Branch (276:9): [True: 36, False: 985]
  ------------------
  277|     36|            if (signature->query_key_types != NULL)
  ------------------
  |  Branch (277:17): [True: 0, False: 36]
  ------------------
  278|      0|                break;
  279|     36|            signature->query_key_types
  280|     36|                = OSSL_FUNC_signature_query_key_types(fns);
  281|     36|            break;
  282|  1.02k|        }
  283|  1.02k|    }
  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|     59|    valid = 1;
  294|       |    /* Start with the ones where counters say enough */
  295|     59|    if (ctxfncnt != 2) {
  ------------------
  |  Branch (295:9): [True: 0, False: 59]
  ------------------
  296|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      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|     59|    if (valid
  ------------------
  |  Branch (300:9): [True: 59, False: 0]
  ------------------
  301|     59|        && ((gparamfncnt != 0 && gparamfncnt != 2)
  ------------------
  |  Branch (301:14): [True: 55, False: 4]
  |  Branch (301:34): [True: 0, False: 55]
  ------------------
  302|     59|            || (sparamfncnt != 0 && sparamfncnt != 2)
  ------------------
  |  Branch (302:17): [True: 59, False: 0]
  |  Branch (302:37): [True: 0, False: 59]
  ------------------
  303|     59|            || (gmdparamfncnt != 0 && gmdparamfncnt != 2)
  ------------------
  |  Branch (303:17): [True: 4, False: 55]
  |  Branch (303:39): [True: 0, False: 4]
  ------------------
  304|     59|            || (smdparamfncnt != 0 && smdparamfncnt != 2))) {
  ------------------
  |  Branch (304:17): [True: 4, False: 55]
  |  Branch (304:39): [True: 0, False: 4]
  ------------------
  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,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      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|     59|    if (valid && initfncnt == 0) {
  ------------------
  |  Branch (314:9): [True: 59, False: 0]
  |  Branch (314:18): [True: 0, False: 59]
  ------------------
  315|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      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|     59|    if (valid
  ------------------
  |  Branch (321:9): [True: 59, False: 0]
  ------------------
  322|     59|        && ((signature->sign_init != NULL
  ------------------
  |  Branch (322:14): [True: 40, False: 19]
  ------------------
  323|     40|                && signature->sign == NULL)
  ------------------
  |  Branch (323:20): [True: 0, False: 40]
  ------------------
  324|     59|            || (signature->sign_message_init != NULL
  ------------------
  |  Branch (324:17): [True: 51, False: 8]
  ------------------
  325|     51|                && signature->sign == NULL
  ------------------
  |  Branch (325:20): [True: 0, False: 51]
  ------------------
  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,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      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|     59|    if (valid
  ------------------
  |  Branch (333:9): [True: 59, False: 0]
  ------------------
  334|     59|        && (signature->sign != NULL
  ------------------
  |  Branch (334:13): [True: 55, False: 4]
  ------------------
  335|      4|            || signature->sign_message_update != NULL
  ------------------
  |  Branch (335:16): [True: 0, False: 4]
  ------------------
  336|      4|            || signature->sign_message_final != NULL)
  ------------------
  |  Branch (336:16): [True: 0, False: 4]
  ------------------
  337|     55|        && signature->sign_init == NULL
  ------------------
  |  Branch (337:12): [True: 15, False: 40]
  ------------------
  338|     15|        && signature->sign_message_init == NULL) {
  ------------------
  |  Branch (338:12): [True: 0, False: 15]
  ------------------
  339|       |        /* signing function(s) with no sign_init? That's odd */
  340|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      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|     59|    if (valid
  ------------------
  |  Branch (345:9): [True: 59, False: 0]
  ------------------
  346|     59|        && ((signature->verify_init != NULL
  ------------------
  |  Branch (346:14): [True: 40, False: 19]
  ------------------
  347|     40|                && signature->verify == NULL)
  ------------------
  |  Branch (347:20): [True: 0, False: 40]
  ------------------
  348|     59|            || (signature->verify_message_init != NULL
  ------------------
  |  Branch (348:17): [True: 51, False: 8]
  ------------------
  349|     51|                && signature->verify == NULL
  ------------------
  |  Branch (349:20): [True: 0, False: 51]
  ------------------
  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,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      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|     59|    if (valid
  ------------------
  |  Branch (357:9): [True: 59, False: 0]
  ------------------
  358|     59|        && (signature->verify != NULL
  ------------------
  |  Branch (358:13): [True: 55, False: 4]
  ------------------
  359|      4|            || signature->verify_message_update != NULL
  ------------------
  |  Branch (359:16): [True: 0, False: 4]
  ------------------
  360|      4|            || signature->verify_message_final != NULL)
  ------------------
  |  Branch (360:16): [True: 0, False: 4]
  ------------------
  361|     55|        && signature->verify_init == NULL
  ------------------
  |  Branch (361:12): [True: 15, False: 40]
  ------------------
  362|     15|        && signature->verify_message_init == NULL) {
  ------------------
  |  Branch (362:12): [True: 0, False: 15]
  ------------------
  363|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      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|     59|    if (valid
  ------------------
  |  Branch (370:9): [True: 59, False: 0]
  ------------------
  371|     59|        && (signature->verify_recover_init != NULL)
  ------------------
  |  Branch (371:12): [True: 14, False: 45]
  ------------------
  372|     14|        && (signature->verify_recover == NULL)) {
  ------------------
  |  Branch (372:12): [True: 0, False: 14]
  ------------------
  373|       |        /* verify_recover_init function with no verify_recover?  How quaint */
  374|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      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|     59|    if (valid
  ------------------
  |  Branch (379:9): [True: 59, False: 0]
  ------------------
  380|     59|        && (signature->digest_sign_init != NULL
  ------------------
  |  Branch (380:13): [True: 25, False: 34]
  ------------------
  381|     25|            && signature->digest_sign == NULL
  ------------------
  |  Branch (381:16): [True: 8, False: 17]
  ------------------
  382|      8|            && (signature->digest_sign_update == NULL
  ------------------
  |  Branch (382:17): [True: 0, False: 8]
  ------------------
  383|      8|                || signature->digest_sign_final == NULL))) {
  ------------------
  |  Branch (383:20): [True: 0, False: 8]
  ------------------
  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,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      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|     59|    if (valid
  ------------------
  |  Branch (390:9): [True: 59, False: 0]
  ------------------
  391|     59|        && ((signature->digest_verify_init != NULL
  ------------------
  |  Branch (391:14): [True: 21, False: 38]
  ------------------
  392|     21|            && signature->digest_verify == NULL
  ------------------
  |  Branch (392:16): [True: 4, False: 17]
  ------------------
  393|      4|            && (signature->digest_verify_update == NULL
  ------------------
  |  Branch (393:17): [True: 0, False: 4]
  ------------------
  394|      4|                || signature->digest_verify_final == NULL)))) {
  ------------------
  |  Branch (394:20): [True: 0, False: 4]
  ------------------
  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,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      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|     59|    if (!valid)
  ------------------
  |  Branch (401:9): [True: 0, False: 59]
  ------------------
  402|      0|        goto err;
  403|       |
  404|     59|    if ((signature->digest_sign != NULL
  ------------------
  |  Branch (404:10): [True: 17, False: 42]
  ------------------
  405|     42|            || signature->digest_sign_update != NULL
  ------------------
  |  Branch (405:16): [True: 8, False: 34]
  ------------------
  406|     34|            || signature->digest_sign_final != NULL)
  ------------------
  |  Branch (406:16): [True: 0, False: 34]
  ------------------
  407|     25|        && signature->digest_sign_init == NULL) {
  ------------------
  |  Branch (407:12): [True: 0, False: 25]
  ------------------
  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,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      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|     59|    if ((signature->digest_verify != NULL
  ------------------
  |  Branch (414:10): [True: 17, False: 42]
  ------------------
  415|     42|            || signature->digest_verify_update != NULL
  ------------------
  |  Branch (415:16): [True: 4, False: 38]
  ------------------
  416|     38|            || signature->digest_verify_final != NULL)
  ------------------
  |  Branch (416:16): [True: 0, False: 38]
  ------------------
  417|     21|        && signature->digest_verify_init == NULL) {
  ------------------
  |  Branch (417:12): [True: 0, False: 21]
  ------------------
  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,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      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|     59|    if ((signature->sign_message_update == NULL) != (signature->sign_message_final == NULL)) {
  ------------------
  |  Branch (424:9): [True: 0, False: 59]
  ------------------
  425|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      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|     59|    if ((signature->verify_message_update == NULL) != (signature->verify_message_final == NULL)) {
  ------------------
  |  Branch (430:9): [True: 0, False: 59]
  ------------------
  431|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      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|     59|    if ((signature->digest_sign_update == NULL) != (signature->digest_sign_final == NULL)) {
  ------------------
  |  Branch (436:9): [True: 0, False: 59]
  ------------------
  437|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      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|     59|    if ((signature->digest_verify_update == NULL) != (signature->digest_verify_final == NULL)) {
  ------------------
  |  Branch (442:9): [True: 0, False: 59]
  ------------------
  443|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   59|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   71|      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|     59|    return signature;
  450|      0|err:
  451|      0|    EVP_SIGNATURE_free(signature);
  452|       |    return NULL;
  453|     59|}
signature.c:evp_signature_new:
   34|     59|{
   35|     59|    EVP_SIGNATURE *signature = OPENSSL_zalloc(sizeof(EVP_SIGNATURE));
  ------------------
  |  |  109|     59|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   36|       |
   37|     59|    if (signature == NULL)
  ------------------
  |  Branch (37:9): [True: 0, False: 59]
  ------------------
   38|      0|        return NULL;
   39|       |
   40|     59|    if (!CRYPTO_NEW_REF(&signature->refcnt, 1)
  ------------------
  |  Branch (40:9): [True: 0, False: 59]
  ------------------
   41|     59|        || !ossl_provider_up_ref(prov)) {
  ------------------
  |  Branch (41:12): [True: 0, False: 59]
  ------------------
   42|      0|        CRYPTO_FREE_REF(&signature->refcnt);
   43|      0|        OPENSSL_free(signature);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   44|      0|        return NULL;
   45|      0|    }
   46|       |
   47|     59|    signature->prov = prov;
   48|       |
   49|     59|    return signature;
   50|     59|}
signature.c:evp_signature_up_ref:
   29|  29.4k|{
   30|  29.4k|    return EVP_SIGNATURE_up_ref(data);
   31|  29.4k|}
signature.c:evp_signature_free:
   24|     59|{
   25|     59|    EVP_SIGNATURE_free(data);
   26|     59|}

ossl_do_ex_data_init:
   15|      2|{
   16|      2|    OSSL_EX_DATA_GLOBAL *global = ossl_lib_ctx_get_ex_data_global(ctx);
   17|       |
   18|      2|    if (global == NULL)
  ------------------
  |  Branch (18:9): [True: 0, False: 2]
  ------------------
   19|      0|        return 0;
   20|       |
   21|      2|    global->ex_data_lock = CRYPTO_THREAD_lock_new();
   22|       |    return global->ex_data_lock != NULL;
   23|      2|}
ossl_crypto_get_ex_new_index_ex:
  154|      1|{
  155|      1|    int toret = -1;
  156|      1|    EX_CALLBACK *a;
  157|      1|    EX_CALLBACKS *ip;
  158|      1|    OSSL_EX_DATA_GLOBAL *global = ossl_lib_ctx_get_ex_data_global(ctx);
  159|       |
  160|      1|    if (global == NULL)
  ------------------
  |  Branch (160:9): [True: 0, False: 1]
  ------------------
  161|      0|        return -1;
  162|       |
  163|      1|    ip = get_and_lock(global, class_index, 0);
  164|      1|    if (ip == NULL)
  ------------------
  |  Branch (164:9): [True: 0, False: 1]
  ------------------
  165|      0|        return -1;
  166|       |
  167|      1|    if (ip->meth == NULL) {
  ------------------
  |  Branch (167:9): [True: 1, False: 0]
  ------------------
  168|      1|        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|      1|        if (ip->meth == NULL
  ------------------
  |  Branch (171:13): [True: 0, False: 1]
  ------------------
  172|      1|            || !sk_EX_CALLBACK_push(ip->meth, NULL)) {
  ------------------
  |  Branch (172:16): [True: 0, False: 1]
  ------------------
  173|      0|            sk_EX_CALLBACK_free(ip->meth);
  174|      0|            ip->meth = NULL;
  175|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  176|      0|            goto err;
  177|      0|        }
  178|      1|    }
  179|       |
  180|      1|    a = (EX_CALLBACK *)OPENSSL_malloc(sizeof(*a));
  ------------------
  |  |  107|      1|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  181|      1|    if (a == NULL)
  ------------------
  |  Branch (181:9): [True: 0, False: 1]
  ------------------
  182|      0|        goto err;
  183|      1|    a->argl = argl;
  184|      1|    a->argp = argp;
  185|      1|    a->new_func = new_func;
  186|      1|    a->dup_func = dup_func;
  187|      1|    a->free_func = free_func;
  188|      1|    a->priority = priority;
  189|       |
  190|      1|    if (!sk_EX_CALLBACK_push(ip->meth, NULL)) {
  ------------------
  |  Branch (190:9): [True: 0, False: 1]
  ------------------
  191|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  192|      0|        OPENSSL_free(a);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  193|      0|        goto err;
  194|      0|    }
  195|      1|    toret = sk_EX_CALLBACK_num(ip->meth) - 1;
  196|      1|    (void)sk_EX_CALLBACK_set(ip->meth, toret, a);
  197|       |
  198|      1|err:
  199|      1|    CRYPTO_THREAD_unlock(global->ex_data_lock);
  200|      1|    return toret;
  201|      1|}
CRYPTO_get_ex_new_index:
  206|      1|{
  207|       |    return ossl_crypto_get_ex_new_index_ex(NULL, class_index, argl, argp,
  208|      1|        new_func, dup_func, free_func, 0);
  209|      1|}
ossl_crypto_new_ex_data_ex:
  220|   316k|{
  221|   316k|    int mx, i;
  222|   316k|    void *ptr;
  223|   316k|    EX_CALLBACK **storage = NULL;
  224|   316k|    EX_CALLBACK *stack[10];
  225|   316k|    EX_CALLBACKS *ip;
  226|   316k|    OSSL_EX_DATA_GLOBAL *global = ossl_lib_ctx_get_ex_data_global(ctx);
  227|       |
  228|   316k|    if (global == NULL)
  ------------------
  |  Branch (228:9): [True: 0, False: 316k]
  ------------------
  229|      0|        return 0;
  230|       |
  231|   316k|    ip = get_and_lock(global, class_index, 1);
  232|   316k|    if (ip == NULL)
  ------------------
  |  Branch (232:9): [True: 0, False: 316k]
  ------------------
  233|      0|        return 0;
  234|       |
  235|   316k|    ad->ctx = ctx;
  236|   316k|    ad->sk = NULL;
  237|   316k|    mx = sk_EX_CALLBACK_num(ip->meth);
  238|   316k|    if (mx > 0) {
  ------------------
  |  Branch (238:9): [True: 7.25k, False: 309k]
  ------------------
  239|  7.25k|        if (mx < (int)OSSL_NELEM(stack))
  ------------------
  |  |   14|  7.25k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (239:13): [True: 7.25k, False: 0]
  ------------------
  240|  7.25k|            storage = stack;
  241|      0|        else
  242|      0|            storage = OPENSSL_malloc_array(mx, sizeof(*storage));
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  243|  7.25k|        if (storage != NULL)
  ------------------
  |  Branch (243:13): [True: 7.25k, False: 0]
  ------------------
  244|  21.7k|            for (i = 0; i < mx; i++)
  ------------------
  |  Branch (244:25): [True: 14.5k, False: 7.25k]
  ------------------
  245|  14.5k|                storage[i] = sk_EX_CALLBACK_value(ip->meth, i);
  246|  7.25k|    }
  247|   316k|    CRYPTO_THREAD_unlock(global->ex_data_lock);
  248|       |
  249|   316k|    if (mx > 0 && storage == NULL)
  ------------------
  |  Branch (249:9): [True: 7.25k, False: 309k]
  |  Branch (249:19): [True: 0, False: 7.25k]
  ------------------
  250|      0|        return 0;
  251|   331k|    for (i = 0; i < mx; i++) {
  ------------------
  |  Branch (251:17): [True: 14.5k, False: 316k]
  ------------------
  252|  14.5k|        if (storage[i] != NULL && storage[i]->new_func != NULL) {
  ------------------
  |  Branch (252:13): [True: 7.25k, False: 7.25k]
  |  Branch (252:35): [True: 0, False: 7.25k]
  ------------------
  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|  14.5k|    }
  258|   316k|    if (storage != stack)
  ------------------
  |  Branch (258:9): [True: 309k, False: 7.25k]
  ------------------
  259|   309k|        OPENSSL_free(storage);
  ------------------
  |  |  132|   309k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  260|   316k|    return 1;
  261|   316k|}
CRYPTO_new_ex_data:
  264|   316k|{
  265|       |    return ossl_crypto_new_ex_data_ex(NULL, class_index, obj, ad);
  266|   316k|}
CRYPTO_dup_ex_data:
  274|  10.7k|{
  275|  10.7k|    int mx, j, i;
  276|  10.7k|    void *ptr;
  277|  10.7k|    EX_CALLBACK *stack[10];
  278|  10.7k|    EX_CALLBACK **storage = NULL;
  279|  10.7k|    EX_CALLBACKS *ip;
  280|  10.7k|    int toret = 0;
  281|  10.7k|    OSSL_EX_DATA_GLOBAL *global;
  282|       |
  283|  10.7k|    to->ctx = from->ctx;
  284|  10.7k|    if (from->sk == NULL)
  ------------------
  |  Branch (284:9): [True: 10.7k, False: 0]
  ------------------
  285|       |        /* Nothing to copy over */
  286|  10.7k|        return 1;
  287|       |
  288|      0|    global = ossl_lib_ctx_get_ex_data_global(from->ctx);
  289|      0|    if (global == NULL)
  ------------------
  |  Branch (289:9): [True: 0, False: 0]
  ------------------
  290|      0|        return 0;
  291|       |
  292|      0|    ip = get_and_lock(global, class_index, 1);
  293|      0|    if (ip == NULL)
  ------------------
  |  Branch (293:9): [True: 0, False: 0]
  ------------------
  294|      0|        return 0;
  295|       |
  296|      0|    mx = sk_EX_CALLBACK_num(ip->meth);
  297|      0|    j = sk_void_num(from->sk);
  ------------------
  |  |  220|      0|#define sk_void_num(sk) OPENSSL_sk_num(ossl_check_const_void_sk_type(sk))
  ------------------
  298|      0|    if (j < mx)
  ------------------
  |  Branch (298:9): [True: 0, False: 0]
  ------------------
  299|      0|        mx = j;
  300|      0|    if (mx > 0) {
  ------------------
  |  Branch (300:9): [True: 0, False: 0]
  ------------------
  301|      0|        if (mx < (int)OSSL_NELEM(stack))
  ------------------
  |  |   14|      0|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (301:13): [True: 0, False: 0]
  ------------------
  302|      0|            storage = stack;
  303|      0|        else
  304|      0|            storage = OPENSSL_malloc_array(mx, sizeof(*storage));
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  305|      0|        if (storage != NULL)
  ------------------
  |  Branch (305:13): [True: 0, False: 0]
  ------------------
  306|      0|            for (i = 0; i < mx; i++)
  ------------------
  |  Branch (306:25): [True: 0, False: 0]
  ------------------
  307|      0|                storage[i] = sk_EX_CALLBACK_value(ip->meth, i);
  308|      0|    }
  309|      0|    CRYPTO_THREAD_unlock(global->ex_data_lock);
  310|       |
  311|      0|    if (mx == 0)
  ------------------
  |  Branch (311:9): [True: 0, False: 0]
  ------------------
  312|      0|        return 1;
  313|      0|    if (storage == NULL)
  ------------------
  |  Branch (313:9): [True: 0, False: 0]
  ------------------
  314|      0|        return 0;
  315|       |    /*
  316|       |     * Make sure the ex_data stack is at least |mx| elements long to avoid
  317|       |     * issues in the for loop that follows; so go get the |mx|'th element
  318|       |     * (if it does not exist CRYPTO_get_ex_data() returns NULL), and assign
  319|       |     * to itself. This is normally a no-op; but ensures the stack is the
  320|       |     * proper size
  321|       |     */
  322|      0|    if (!CRYPTO_set_ex_data(to, mx - 1, CRYPTO_get_ex_data(to, mx - 1)))
  ------------------
  |  Branch (322:9): [True: 0, False: 0]
  ------------------
  323|      0|        goto err;
  324|       |
  325|      0|    for (i = 0; i < mx; i++) {
  ------------------
  |  Branch (325:17): [True: 0, False: 0]
  ------------------
  326|      0|        ptr = CRYPTO_get_ex_data(from, i);
  327|      0|        if (storage[i] != NULL && storage[i]->dup_func != NULL)
  ------------------
  |  Branch (327:13): [True: 0, False: 0]
  |  Branch (327:35): [True: 0, False: 0]
  ------------------
  328|      0|            if (!storage[i]->dup_func(to, from, &ptr, i,
  ------------------
  |  Branch (328:17): [True: 0, False: 0]
  ------------------
  329|      0|                    storage[i]->argl, storage[i]->argp))
  330|      0|                goto err;
  331|      0|        CRYPTO_set_ex_data(to, i, ptr);
  332|      0|    }
  333|      0|    toret = 1;
  334|      0|err:
  335|      0|    if (storage != stack)
  ------------------
  |  Branch (335:9): [True: 0, False: 0]
  ------------------
  336|      0|        OPENSSL_free(storage);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  337|      0|    return toret;
  338|      0|}
CRYPTO_free_ex_data:
  367|   324k|{
  368|   324k|    int mx, i;
  369|   324k|    EX_CALLBACKS *ip;
  370|   324k|    void *ptr;
  371|   324k|    const EX_CALLBACK *f;
  372|   324k|    struct ex_callback_entry stack[10];
  373|   324k|    struct ex_callback_entry *storage = NULL;
  374|   324k|    OSSL_EX_DATA_GLOBAL *global = ossl_lib_ctx_get_ex_data_global(ad->ctx);
  375|       |
  376|   324k|    if (global == NULL)
  ------------------
  |  Branch (376:9): [True: 0, False: 324k]
  ------------------
  377|      0|        goto err;
  378|       |
  379|   324k|    ip = get_and_lock(global, class_index, 1);
  380|   324k|    if (ip == NULL)
  ------------------
  |  Branch (380:9): [True: 0, False: 324k]
  ------------------
  381|      0|        goto err;
  382|       |
  383|   324k|    mx = sk_EX_CALLBACK_num(ip->meth);
  384|   324k|    if (mx > 0) {
  ------------------
  |  Branch (384:9): [True: 14.5k, False: 309k]
  ------------------
  385|  14.5k|        if (mx < (int)OSSL_NELEM(stack))
  ------------------
  |  |   14|  14.5k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (385:13): [True: 14.5k, False: 0]
  ------------------
  386|  14.5k|            storage = stack;
  387|      0|        else
  388|      0|            storage = OPENSSL_malloc_array(mx, sizeof(*storage));
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  389|  14.5k|        if (storage != NULL)
  ------------------
  |  Branch (389:13): [True: 14.5k, False: 0]
  ------------------
  390|  43.5k|            for (i = 0; i < mx; i++) {
  ------------------
  |  Branch (390:25): [True: 29.0k, False: 14.5k]
  ------------------
  391|  29.0k|                storage[i].excb = sk_EX_CALLBACK_value(ip->meth, i);
  392|  29.0k|                storage[i].index = i;
  393|  29.0k|            }
  394|  14.5k|    }
  395|   324k|    CRYPTO_THREAD_unlock(global->ex_data_lock);
  396|       |
  397|   324k|    if (storage != NULL) {
  ------------------
  |  Branch (397:9): [True: 14.5k, False: 309k]
  ------------------
  398|       |        /* Sort according to priority. High priority first */
  399|  14.5k|        qsort(storage, mx, sizeof(*storage), ex_callback_compare);
  400|  43.5k|        for (i = 0; i < mx; i++) {
  ------------------
  |  Branch (400:21): [True: 29.0k, False: 14.5k]
  ------------------
  401|  29.0k|            f = storage[i].excb;
  402|       |
  403|  29.0k|            if (f != NULL && f->free_func != NULL) {
  ------------------
  |  Branch (403:17): [True: 14.5k, False: 14.5k]
  |  Branch (403:30): [True: 0, False: 14.5k]
  ------------------
  404|      0|                ptr = CRYPTO_get_ex_data(ad, storage[i].index);
  405|      0|                f->free_func(obj, ptr, ad, storage[i].index, f->argl, f->argp);
  406|      0|            }
  407|  29.0k|        }
  408|  14.5k|    }
  409|       |
  410|   324k|    if (storage != stack)
  ------------------
  |  Branch (410:9): [True: 309k, False: 14.5k]
  ------------------
  411|   309k|        OPENSSL_free(storage);
  ------------------
  |  |  132|   309k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  412|   324k|err:
  413|   324k|    sk_void_free(ad->sk);
  ------------------
  |  |  226|   324k|#define sk_void_free(sk) OPENSSL_sk_free(ossl_check_void_sk_type(sk))
  ------------------
  414|   324k|    ad->sk = NULL;
  415|       |    ad->ctx = NULL;
  416|   324k|}
CRYPTO_set_ex_data:
  469|  7.25k|{
  470|  7.25k|    int i;
  471|       |
  472|  7.25k|    if (ad->sk == NULL) {
  ------------------
  |  Branch (472:9): [True: 7.25k, False: 0]
  ------------------
  473|  7.25k|        if ((ad->sk = sk_void_new_null()) == NULL) {
  ------------------
  |  |  223|  7.25k|#define sk_void_new_null() ((STACK_OF(void) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_void_freefunc_thunk))
  ------------------
  |  Branch (473:13): [True: 0, False: 7.25k]
  ------------------
  474|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  475|      0|            return 0;
  476|      0|        }
  477|  7.25k|    }
  478|       |
  479|  18.1k|    for (i = sk_void_num(ad->sk); i <= idx; ++i) {
  ------------------
  |  |  220|  7.25k|#define sk_void_num(sk) OPENSSL_sk_num(ossl_check_const_void_sk_type(sk))
  ------------------
  |  Branch (479:35): [True: 10.8k, False: 7.25k]
  ------------------
  480|  10.8k|        if (!sk_void_push(ad->sk, NULL)) {
  ------------------
  |  |  230|  10.8k|#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: 10.8k]
  ------------------
  481|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  482|      0|            return 0;
  483|      0|        }
  484|  10.8k|    }
  485|  7.25k|    if (sk_void_set(ad->sk, idx, val) != val) {
  ------------------
  |  |  236|  7.25k|#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: 7.25k]
  ------------------
  486|       |        /* Probably the index is out of bounds */
  487|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  488|      0|        return 0;
  489|      0|    }
  490|  7.25k|    return 1;
  491|  7.25k|}
CRYPTO_get_ex_data:
  498|  7.16k|{
  499|  7.16k|    if (ad->sk == NULL || idx >= sk_void_num(ad->sk))
  ------------------
  |  |  220|  7.16k|#define sk_void_num(sk) OPENSSL_sk_num(ossl_check_const_void_sk_type(sk))
  ------------------
  |  Branch (499:9): [True: 0, False: 7.16k]
  |  Branch (499:27): [True: 0, False: 7.16k]
  ------------------
  500|      0|        return NULL;
  501|  7.16k|    return sk_void_value(ad->sk, idx);
  ------------------
  |  |  221|  7.16k|#define sk_void_value(sk, idx) ((void *)OPENSSL_sk_value(ossl_check_const_void_sk_type(sk), (idx)))
  ------------------
  502|  7.16k|}
ex_data.c:get_and_lock:
   33|   640k|{
   34|   640k|    EX_CALLBACKS *ip;
   35|       |
   36|   640k|    if (class_index < 0 || class_index >= CRYPTO_EX_INDEX__COUNT) {
  ------------------
  |  |  270|   640k|#define CRYPTO_EX_INDEX__COUNT 18
  ------------------
  |  Branch (36:9): [True: 0, False: 640k]
  |  Branch (36:28): [True: 0, False: 640k]
  ------------------
   37|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   38|      0|        return NULL;
   39|      0|    }
   40|       |
   41|   640k|    if (global->ex_data_lock == NULL) {
  ------------------
  |  Branch (41:9): [True: 0, False: 640k]
  ------------------
   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|   640k|    if (read) {
  ------------------
  |  Branch (49:9): [True: 640k, False: 1]
  ------------------
   50|   640k|        if (!CRYPTO_THREAD_read_lock(global->ex_data_lock))
  ------------------
  |  Branch (50:13): [True: 0, False: 640k]
  ------------------
   51|      0|            return NULL;
   52|   640k|    } else {
   53|      1|        if (!CRYPTO_THREAD_write_lock(global->ex_data_lock))
  ------------------
  |  Branch (53:13): [True: 0, False: 1]
  ------------------
   54|      0|            return NULL;
   55|      1|    }
   56|       |
   57|   640k|    ip = &global->ex_data[class_index];
   58|   640k|    return ip;
   59|   640k|}
ex_data.c:ex_callback_compare:
  346|  14.5k|{
  347|  14.5k|    const struct ex_callback_entry *ap = (const struct ex_callback_entry *)a;
  348|  14.5k|    const struct ex_callback_entry *bp = (const struct ex_callback_entry *)b;
  349|       |
  350|  14.5k|    if (ap->excb == bp->excb)
  ------------------
  |  Branch (350:9): [True: 0, False: 14.5k]
  ------------------
  351|      0|        return 0;
  352|       |
  353|  14.5k|    if (ap->excb == NULL)
  ------------------
  |  Branch (353:9): [True: 14.5k, False: 0]
  ------------------
  354|  14.5k|        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|      2|{
   20|       |#if defined(_WIN32) && defined(CP_UTF8) && !defined(_WIN32_WCE)
   21|       |    if (GetEnvironmentVariableW(L"OPENSSL_WIN32_UTF8", NULL, 0) != 0) {
   22|       |        char *val = NULL;
   23|       |        int vallen = 0;
   24|       |        WCHAR *namew = NULL;
   25|       |        WCHAR *valw = NULL;
   26|       |        DWORD envlen = 0;
   27|       |        DWORD dwFlags = MB_ERR_INVALID_CHARS;
   28|       |        int rsize, fsize;
   29|       |        UINT curacp;
   30|       |
   31|       |        curacp = GetACP();
   32|       |
   33|       |        /*
   34|       |         * For the code pages listed below, dwFlags must be set to 0.
   35|       |         * Otherwise, the function fails with ERROR_INVALID_FLAGS.
   36|       |         */
   37|       |        if (curacp == 50220 || curacp == 50221 || curacp == 50222 || 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|      2|#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
   90|      2|#if __GLIBC_PREREQ(2, 17)
   91|      2|#define SECURE_GETENV
   92|      2|    return secure_getenv(name);
   93|      2|#endif
   94|      2|#endif
   95|       |
   96|       |#ifndef SECURE_GETENV
   97|       |    if (OPENSSL_issetugid())
   98|       |        return NULL;
   99|       |    return getenv(name);
  100|       |#endif
  101|      2|}

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

ossl_ht_new:
  185|  7.36k|{
  186|  7.36k|    HT *new = OPENSSL_zalloc(sizeof(*new));
  ------------------
  |  |  109|  7.36k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  187|       |
  188|  7.36k|    if (new == NULL)
  ------------------
  |  Branch (188:9): [True: 0, False: 7.36k]
  ------------------
  189|      0|        return NULL;
  190|       |
  191|  7.36k|    if (conf->lockless_reads && conf->no_rcu)
  ------------------
  |  Branch (191:9): [True: 2, False: 7.36k]
  |  Branch (191:33): [True: 0, False: 2]
  ------------------
  192|      0|        goto err;
  193|       |
  194|  7.36k|    if (!conf->no_rcu) {
  ------------------
  |  Branch (194:9): [True: 2, False: 7.36k]
  ------------------
  195|      2|        new->atomic_lock = CRYPTO_THREAD_lock_new();
  196|      2|        if (new->atomic_lock == NULL)
  ------------------
  |  Branch (196:13): [True: 0, False: 2]
  ------------------
  197|      0|            goto err;
  198|      2|    }
  199|  7.36k|    memcpy(&new->config, conf, sizeof(*conf));
  200|       |
  201|  7.36k|    if (new->config.init_neighborhoods != 0) {
  ------------------
  |  Branch (201:9): [True: 7.36k, False: 0]
  ------------------
  202|  7.36k|        new->wpd.neighborhood_len = new->config.init_neighborhoods;
  203|       |        /* round up to the next power of 2 */
  204|  7.36k|        new->wpd.neighborhood_len--;
  205|  7.36k|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 1;
  206|  7.36k|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 2;
  207|  7.36k|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 4;
  208|  7.36k|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 8;
  209|  7.36k|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 16;
  210|  7.36k|        new->wpd.neighborhood_len++;
  211|  7.36k|    } else {
  212|      0|        new->wpd.neighborhood_len = DEFAULT_NEIGH_LEN;
  ------------------
  |  |   96|      0|#define DEFAULT_NEIGH_LEN (1 << DEFAULT_NEIGH_LEN_LOG)
  |  |  ------------------
  |  |  |  |   95|      0|#define DEFAULT_NEIGH_LEN_LOG 4
  |  |  ------------------
  ------------------
  213|      0|    }
  214|       |
  215|  7.36k|    if (new->config.ht_free_fn == NULL)
  ------------------
  |  Branch (215:9): [True: 2, False: 7.36k]
  ------------------
  216|      2|        new->config.ht_free_fn = internal_free_nop;
  217|       |
  218|  7.36k|    new->md = OPENSSL_zalloc(sizeof(*new->md));
  ------------------
  |  |  109|  7.36k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  219|  7.36k|    if (new->md == NULL)
  ------------------
  |  Branch (219:9): [True: 0, False: 7.36k]
  ------------------
  220|      0|        goto err;
  221|       |
  222|  7.36k|    new->md->neighborhoods = alloc_new_neighborhood_list(new->wpd.neighborhood_len,
  223|  7.36k|        &new->md->neighborhood_ptr_to_free);
  224|  7.36k|    if (new->md->neighborhoods == NULL)
  ------------------
  |  Branch (224:9): [True: 0, False: 7.36k]
  ------------------
  225|      0|        goto err;
  226|  7.36k|    new->md->neighborhood_mask = new->wpd.neighborhood_len - 1;
  227|       |
  228|  7.36k|    if (!conf->no_rcu) {
  ------------------
  |  Branch (228:9): [True: 2, False: 7.36k]
  ------------------
  229|      2|        new->lock = ossl_rcu_lock_new(1, conf->ctx);
  230|      2|        if (new->lock == NULL)
  ------------------
  |  Branch (230:13): [True: 0, False: 2]
  ------------------
  231|      0|            goto err;
  232|      2|    }
  233|  7.36k|    if (new->config.ht_hash_fn == NULL)
  ------------------
  |  Branch (233:9): [True: 2, False: 7.36k]
  ------------------
  234|      2|        new->config.ht_hash_fn = internal_ht_hash_fn;
  235|       |
  236|  7.36k|    return new;
  237|       |
  238|      0|err:
  239|      0|    if (!conf->no_rcu) {
  ------------------
  |  Branch (239:9): [True: 0, False: 0]
  ------------------
  240|      0|        CRYPTO_THREAD_lock_free(new->atomic_lock);
  241|      0|        ossl_rcu_lock_free(new->lock);
  242|      0|    }
  243|      0|    if (new->md != NULL)
  ------------------
  |  Branch (243:9): [True: 0, False: 0]
  ------------------
  244|      0|        OPENSSL_free(new->md->neighborhood_ptr_to_free);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  245|      0|    OPENSSL_free(new->md);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  246|      0|    OPENSSL_free(new);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  247|       |    return NULL;
  248|  7.36k|}
ossl_ht_write_lock:
  267|  7.36k|{
  268|  7.36k|    if (htable->config.no_rcu)
  ------------------
  |  Branch (268:9): [True: 7.36k, False: 0]
  ------------------
  269|  7.36k|        return;
  270|       |
  271|      0|    ossl_rcu_write_lock(htable->lock);
  272|      0|    htable->wpd.need_sync = 0;
  273|      0|}
ossl_ht_write_unlock:
  276|  7.36k|{
  277|  7.36k|    int need_sync = htable->wpd.need_sync;
  278|       |
  279|  7.36k|    if (htable->config.no_rcu)
  ------------------
  |  Branch (279:9): [True: 7.36k, False: 0]
  ------------------
  280|  7.36k|        return;
  281|       |
  282|      0|    htable->wpd.need_sync = 0;
  283|      0|    ossl_rcu_write_unlock(htable->lock);
  284|      0|    if (need_sync)
  ------------------
  |  Branch (284:9): [True: 0, False: 0]
  ------------------
  285|      0|        ossl_synchronize_rcu(htable->lock);
  286|      0|}
ossl_ht_free:
  365|  7.36k|{
  366|  7.36k|    int flush_ok;
  367|       |
  368|  7.36k|    if (h == NULL)
  ------------------
  |  Branch (368:9): [True: 0, False: 7.36k]
  ------------------
  369|      0|        return;
  370|       |
  371|  7.36k|    ossl_ht_write_lock(h);
  372|  7.36k|    flush_ok = ossl_ht_flush_internal(h);
  373|  7.36k|    ossl_ht_write_unlock(h);
  374|       |    /* Freeing the lock does a final sync for us */
  375|  7.36k|    if (!h->config.no_rcu) {
  ------------------
  |  Branch (375:9): [True: 0, False: 7.36k]
  ------------------
  376|      0|        CRYPTO_THREAD_lock_free(h->atomic_lock);
  377|      0|        ossl_rcu_lock_free(h->lock);
  378|      0|    }
  379|  7.36k|    if (flush_ok) {
  ------------------
  |  Branch (379:9): [True: 7.36k, False: 0]
  ------------------
  380|  7.36k|        OPENSSL_free(h->md->neighborhood_ptr_to_free);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  381|  7.36k|        OPENSSL_free(h->md);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  382|  7.36k|    } else {
  383|      0|        free_oldmd(h->md);
  384|      0|    }
  385|  7.36k|    OPENSSL_free(h);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  386|  7.36k|    return;
  387|  7.36k|}
ossl_ht_insert:
  719|  4.19k|{
  720|  4.19k|    struct ht_internal_value_st *newval = NULL;
  721|  4.19k|    uint64_t hash;
  722|  4.19k|    int rc = 0;
  723|  4.19k|    int i;
  724|       |
  725|  4.19k|    if (data->value == NULL)
  ------------------
  |  Branch (725:9): [True: 0, False: 4.19k]
  ------------------
  726|      0|        goto out;
  727|       |
  728|  4.19k|    rc = -1;
  729|  4.19k|    newval = alloc_new_value(h, key, data->value, data->type_id);
  730|  4.19k|    if (newval == NULL)
  ------------------
  |  Branch (730:9): [True: 0, False: 4.19k]
  ------------------
  731|      0|        goto out;
  732|       |
  733|       |    /*
  734|       |     * we have to take our lock here to prevent other changes
  735|       |     * to the bucket list
  736|       |     */
  737|  4.19k|    hash = h->config.ht_hash_fn(key);
  738|       |
  739|  4.19k|    for (i = 0;
  740|  4.19k|        (rc = ossl_ht_insert_locked(h, hash, newval, olddata)) == -1
  ------------------
  |  Branch (740:9): [True: 0, False: 4.19k]
  ------------------
  741|      0|        && i <= (int)NEIGHBORHOOD_LEN;
  ------------------
  |  |  104|      0|#define NEIGHBORHOOD_LEN (CACHE_LINE_BYTES / sizeof(struct ht_neighborhood_entry_st))
  |  |  ------------------
  |  |  |  |  101|      0|#define CACHE_LINE_BYTES 64
  |  |  ------------------
  ------------------
  |  Branch (741:12): [True: 0, False: 0]
  ------------------
  742|  4.19k|        ++i)
  743|      0|        if (!grow_hashtable(h, h->wpd.neighborhood_len)) {
  ------------------
  |  Branch (743:13): [True: 0, False: 0]
  ------------------
  744|      0|            rc = -1;
  745|      0|            break;
  746|      0|        }
  747|       |
  748|  4.19k|    if (rc <= 0)
  ------------------
  |  Branch (748:9): [True: 0, False: 4.19k]
  ------------------
  749|      0|        free_value(newval);
  750|       |
  751|  4.19k|out:
  752|  4.19k|    return rc;
  753|  4.19k|}
ossl_ht_get:
  756|  1.93M|{
  757|  1.93M|    struct ht_mutable_data_st *md;
  758|  1.93M|    uint64_t hash;
  759|  1.93M|    uint64_t neigh_idx_start;
  760|  1.93M|    uint64_t neigh_idx;
  761|  1.93M|    struct ht_internal_value_st *ival = NULL;
  762|  1.93M|    size_t j;
  763|  1.93M|    uint64_t ehash;
  764|  1.93M|    int lockless_reads = h->config.lockless_reads;
  765|       |
  766|  1.93M|    hash = h->config.ht_hash_fn(key);
  767|       |
  768|  1.93M|    if (!h->config.no_rcu)
  ------------------
  |  Branch (768:9): [True: 1.92M, False: 10.8k]
  ------------------
  769|  1.92M|        md = ossl_rcu_deref(&h->md);
  ------------------
  |  |   35|  1.92M|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  770|  10.8k|    else
  771|  10.8k|        md = h->md;
  772|  1.93M|    neigh_idx = neigh_idx_start = hash & md->neighborhood_mask;
  773|  1.93M|    do {
  774|  1.93M|        PREFETCH_NEIGHBORHOOD(md->neighborhoods[neigh_idx]);
  ------------------
  |  |   82|  1.93M|#define PREFETCH_NEIGHBORHOOD(x) __builtin_prefetch(x.entries)
  ------------------
  775|  2.80M|        for (j = 0; j < NEIGHBORHOOD_LEN; j++) {
  ------------------
  |  |  104|  2.80M|#define NEIGHBORHOOD_LEN (CACHE_LINE_BYTES / sizeof(struct ht_neighborhood_entry_st))
  |  |  ------------------
  |  |  |  |  101|  2.80M|#define CACHE_LINE_BYTES 64
  |  |  ------------------
  ------------------
  |  Branch (775:21): [True: 2.79M, False: 7.34k]
  ------------------
  776|  2.79M|            if (!h->config.no_rcu)
  ------------------
  |  Branch (776:17): [True: 2.74M, False: 43.5k]
  ------------------
  777|  2.74M|                ival = ossl_rcu_deref(&md->neighborhoods[neigh_idx].entries[j].value);
  ------------------
  |  |   35|  2.74M|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  778|  43.5k|            else
  779|  43.5k|                ival = md->neighborhoods[neigh_idx].entries[j].value;
  780|  2.79M|            if (ival == NULL) {
  ------------------
  |  Branch (780:17): [True: 203k, False: 2.59M]
  ------------------
  781|   203k|                if (lockless_reads)
  ------------------
  |  Branch (781:21): [True: 163k, False: 39.9k]
  ------------------
  782|       |                    /* lockless_reads implies no deletion, we can break out */
  783|   163k|                    return NULL;
  784|  39.9k|                continue;
  785|   203k|            }
  786|  2.59M|            if (!h->config.no_rcu) {
  ------------------
  |  Branch (786:17): [True: 2.58M, False: 3.55k]
  ------------------
  787|  2.58M|                if (!CRYPTO_atomic_load(&md->neighborhoods[neigh_idx].entries[j].hash,
  ------------------
  |  Branch (787:21): [True: 0, False: 2.58M]
  ------------------
  788|  2.58M|                        &ehash, h->atomic_lock))
  789|      0|                    return NULL;
  790|  2.58M|            } else {
  791|  3.55k|                ehash = md->neighborhoods[neigh_idx].entries[j].hash;
  792|  3.55k|            }
  793|  2.59M|            if (compare_hash(hash, ehash) && match_key(&ival->value.key, key))
  ------------------
  |  Branch (793:17): [True: 1.76M, False: 823k]
  |  Branch (793:46): [True: 1.76M, False: 0]
  ------------------
  794|  1.76M|                return (HT_VALUE *)ival;
  795|  2.59M|        }
  796|  7.34k|        if (!lockless_reads)
  ------------------
  |  Branch (796:13): [True: 7.33k, False: 12]
  ------------------
  797|  7.33k|            break;
  798|       |        /* Continue search in subsequent neighborhoods */
  799|     12|        neigh_idx = (neigh_idx + 1) & md->neighborhood_mask;
  800|     12|    } while (neigh_idx != neigh_idx_start);
  ------------------
  |  Branch (800:14): [True: 12, False: 0]
  ------------------
  801|       |
  802|  7.33k|    return NULL;
  803|  1.93M|}
hashtable.c:alloc_new_neighborhood_list:
  155|  14.7k|{
  156|  14.7k|    struct ht_neighborhood_st *ret;
  157|       |
  158|  14.7k|#if !defined(OPENSSL_SMALL_FOOTPRINT)
  159|  14.7k|    ret = OPENSSL_aligned_alloc_array(len, sizeof(struct ht_neighborhood_st),
  ------------------
  |  |  118|  14.7k|    CRYPTO_aligned_alloc_array(num, size, alignment, freeptr,      \
  |  |  119|  14.7k|        OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  160|  14.7k|        CACHE_LINE_BYTES, freeptr);
  161|       |
  162|       |    /* fall back to regular malloc */
  163|  14.7k|    if (ret == NULL)
  ------------------
  |  Branch (163:9): [True: 0, False: 14.7k]
  ------------------
  164|      0|#endif
  165|      0|    {
  166|      0|        ret = *freeptr = OPENSSL_malloc_array(len, sizeof(struct ht_neighborhood_st));
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  167|      0|        if (ret == NULL)
  ------------------
  |  Branch (167:13): [True: 0, False: 0]
  ------------------
  168|      0|            return NULL;
  169|      0|    }
  170|  14.7k|    memset(ret, 0, sizeof(struct ht_neighborhood_st) * len);
  171|  14.7k|    return ret;
  172|  14.7k|}
hashtable.c:internal_ht_hash_fn:
  180|  1.92M|{
  181|  1.92M|    return ossl_fnv1a_hash(key->keybuf, key->keysize);
  182|  1.92M|}
hashtable.c:ossl_ht_flush_internal:
  311|  7.36k|{
  312|  7.36k|    struct ht_mutable_data_st *newmd = NULL;
  313|  7.36k|    struct ht_mutable_data_st *oldmd = NULL;
  314|  7.36k|    CRYPTO_RCU_CB_ITEM *cbi = NULL;
  315|       |
  316|  7.36k|    newmd = OPENSSL_zalloc(sizeof(*newmd));
  ------------------
  |  |  109|  7.36k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  317|  7.36k|    if (newmd == NULL)
  ------------------
  |  Branch (317:9): [True: 0, False: 7.36k]
  ------------------
  318|      0|        return 0;
  319|       |
  320|  7.36k|    newmd->neighborhoods = alloc_new_neighborhood_list(DEFAULT_NEIGH_LEN,
  ------------------
  |  |   96|  7.36k|#define DEFAULT_NEIGH_LEN (1 << DEFAULT_NEIGH_LEN_LOG)
  |  |  ------------------
  |  |  |  |   95|  7.36k|#define DEFAULT_NEIGH_LEN_LOG 4
  |  |  ------------------
  ------------------
  321|  7.36k|        &newmd->neighborhood_ptr_to_free);
  322|  7.36k|    if (newmd->neighborhoods == NULL) {
  ------------------
  |  Branch (322:9): [True: 0, False: 7.36k]
  ------------------
  323|      0|        OPENSSL_free(newmd);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  324|      0|        return 0;
  325|      0|    }
  326|       |
  327|  7.36k|    newmd->neighborhood_mask = DEFAULT_NEIGH_LEN - 1;
  ------------------
  |  |   96|  7.36k|#define DEFAULT_NEIGH_LEN (1 << DEFAULT_NEIGH_LEN_LOG)
  |  |  ------------------
  |  |  |  |   95|  7.36k|#define DEFAULT_NEIGH_LEN_LOG 4
  |  |  ------------------
  ------------------
  328|       |
  329|  7.36k|    if (!h->config.no_rcu) {
  ------------------
  |  Branch (329:9): [True: 0, False: 7.36k]
  ------------------
  330|      0|        cbi = ossl_rcu_cb_item_new();
  331|      0|        if (cbi == NULL) {
  ------------------
  |  Branch (331:13): [True: 0, False: 0]
  ------------------
  332|      0|            OPENSSL_free(newmd->neighborhood_ptr_to_free);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  333|      0|            OPENSSL_free(newmd);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  334|      0|            return 0;
  335|      0|        }
  336|       |
  337|       |        /* Swap the old and new mutable data sets */
  338|      0|        oldmd = ossl_rcu_deref(&h->md);
  ------------------
  |  |   35|      0|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  339|      0|        ossl_rcu_assign_ptr(&h->md, &newmd);
  ------------------
  |  |   36|      0|#define ossl_rcu_assign_ptr(p, v) ossl_rcu_assign_uptr((void **)p, (void **)v)
  ------------------
  340|  7.36k|    } else {
  341|  7.36k|        oldmd = h->md;
  342|  7.36k|        h->md = newmd;
  343|  7.36k|    }
  344|       |
  345|       |    /* Set the number of entries to 0 */
  346|  7.36k|    h->wpd.value_count = 0;
  347|  7.36k|    h->wpd.neighborhood_len = DEFAULT_NEIGH_LEN;
  ------------------
  |  |   96|  7.36k|#define DEFAULT_NEIGH_LEN (1 << DEFAULT_NEIGH_LEN_LOG)
  |  |  ------------------
  |  |  |  |   95|  7.36k|#define DEFAULT_NEIGH_LEN_LOG 4
  |  |  ------------------
  ------------------
  348|       |
  349|  7.36k|    if (!h->config.no_rcu) {
  ------------------
  |  Branch (349:9): [True: 0, False: 7.36k]
  ------------------
  350|      0|        ossl_rcu_call(h->lock, cbi, free_oldmd, oldmd);
  351|      0|        h->wpd.need_sync = 1;
  352|  7.36k|    } else {
  353|  7.36k|        free_oldmd(oldmd);
  354|  7.36k|    }
  355|       |
  356|  7.36k|    return 1;
  357|  7.36k|}
hashtable.c:free_oldmd:
  289|  7.36k|{
  290|  7.36k|    struct ht_mutable_data_st *oldmd = arg;
  291|  7.36k|    size_t i, j;
  292|  7.36k|    size_t neighborhood_len = (size_t)oldmd->neighborhood_mask + 1;
  293|  7.36k|    struct ht_internal_value_st *v;
  294|       |
  295|  66.2k|    for (i = 0; i < neighborhood_len; i++) {
  ------------------
  |  Branch (295:17): [True: 58.9k, False: 7.36k]
  ------------------
  296|  58.9k|        PREFETCH_NEIGHBORHOOD(oldmd->neighborhoods[i + 1]);
  ------------------
  |  |   82|  58.9k|#define PREFETCH_NEIGHBORHOOD(x) __builtin_prefetch(x.entries)
  ------------------
  297|   294k|        for (j = 0; j < NEIGHBORHOOD_LEN; j++) {
  ------------------
  |  |  104|   294k|#define NEIGHBORHOOD_LEN (CACHE_LINE_BYTES / sizeof(struct ht_neighborhood_entry_st))
  |  |  ------------------
  |  |  |  |  101|   294k|#define CACHE_LINE_BYTES 64
  |  |  ------------------
  ------------------
  |  Branch (297:21): [True: 235k, False: 58.9k]
  ------------------
  298|   235k|            if (oldmd->neighborhoods[i].entries[j].value != NULL) {
  ------------------
  |  Branch (298:17): [True: 3.55k, False: 232k]
  ------------------
  299|  3.55k|                v = oldmd->neighborhoods[i].entries[j].value;
  300|  3.55k|                v->ht->config.ht_free_fn((HT_VALUE *)v);
  301|  3.55k|                free_value(v);
  302|  3.55k|            }
  303|   235k|        }
  304|  58.9k|    }
  305|       |
  306|  7.36k|    OPENSSL_free(oldmd->neighborhood_ptr_to_free);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  307|  7.36k|    OPENSSL_free(oldmd);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  308|  7.36k|}
hashtable.c:alloc_new_value:
  688|  4.19k|{
  689|  4.19k|    struct ht_internal_value_st *tmp;
  690|  4.19k|    size_t nvsize = sizeof(*tmp);
  691|       |
  692|  4.19k|    if (h->config.collision_check == 1)
  ------------------
  |  Branch (692:9): [True: 638, False: 3.55k]
  ------------------
  693|    638|        nvsize += key->keysize;
  694|       |
  695|  4.19k|    tmp = OPENSSL_malloc(nvsize);
  ------------------
  |  |  107|  4.19k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  696|       |
  697|  4.19k|    if (tmp == NULL)
  ------------------
  |  Branch (697:9): [True: 0, False: 4.19k]
  ------------------
  698|      0|        return NULL;
  699|       |
  700|  4.19k|    tmp->ht = h;
  701|  4.19k|    tmp->value.value = data;
  702|  4.19k|    tmp->value.type_id = type;
  703|  4.19k|    tmp->value.key.keybuf = NULL;
  704|  4.19k|    if (h->config.collision_check) {
  ------------------
  |  Branch (704:9): [True: 638, False: 3.55k]
  ------------------
  705|    638|        tmp->value.key.keybuf = (uint8_t *)(tmp + 1);
  706|    638|        tmp->value.key.keysize = key->keysize;
  707|    638|        memcpy(tmp->value.key.keybuf, key->keybuf, key->keysize);
  708|    638|    }
  709|       |
  710|  4.19k|    return tmp;
  711|  4.19k|}
hashtable.c:ossl_ht_insert_locked:
  601|  4.19k|{
  602|  4.19k|    struct ht_mutable_data_st *md = h->md;
  603|  4.19k|    uint64_t neigh_idx_start = hash & md->neighborhood_mask;
  604|  4.19k|    uint64_t neigh_idx = neigh_idx_start;
  605|  4.19k|    size_t j;
  606|  4.19k|    uint64_t ihash;
  607|  4.19k|    HT_VALUE *ival;
  608|  4.19k|    size_t empty_idx = SIZE_MAX;
  609|  4.19k|    int lockless_reads = h->config.lockless_reads;
  610|       |
  611|  4.19k|    do {
  612|  4.19k|        PREFETCH_NEIGHBORHOOD(md->neighborhoods[neigh_idx]);
  ------------------
  |  |   82|  4.19k|#define PREFETCH_NEIGHBORHOOD(x) __builtin_prefetch(x.entries)
  ------------------
  613|       |
  614|  18.8k|        for (j = 0; j < NEIGHBORHOOD_LEN; j++) {
  ------------------
  |  |  104|  18.8k|#define NEIGHBORHOOD_LEN (CACHE_LINE_BYTES / sizeof(struct ht_neighborhood_entry_st))
  |  |  ------------------
  |  |  |  |  101|  18.8k|#define CACHE_LINE_BYTES 64
  |  |  ------------------
  ------------------
  |  Branch (614:21): [True: 15.2k, False: 3.55k]
  ------------------
  615|  15.2k|            if (!h->config.no_rcu)
  ------------------
  |  Branch (615:17): [True: 1.03k, False: 14.2k]
  ------------------
  616|  1.03k|                ival = ossl_rcu_deref(&md->neighborhoods[neigh_idx].entries[j].value);
  ------------------
  |  |   35|  1.03k|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  617|  14.2k|            else
  618|  14.2k|                ival = (HT_VALUE *)md->neighborhoods[neigh_idx].entries[j].value;
  619|  15.2k|            if (ival == NULL) {
  ------------------
  |  Branch (619:17): [True: 14.8k, False: 395]
  ------------------
  620|  14.8k|                empty_idx = j;
  621|       |                /* lockless_reads implies no deletion, we can break out */
  622|  14.8k|                if (lockless_reads)
  ------------------
  |  Branch (622:21): [True: 638, False: 14.2k]
  ------------------
  623|    638|                    goto not_found;
  624|  14.2k|                continue;
  625|  14.8k|            }
  626|    395|            if (!h->config.no_rcu) {
  ------------------
  |  Branch (626:17): [True: 395, False: 0]
  ------------------
  627|    395|                if (!CRYPTO_atomic_load(&md->neighborhoods[neigh_idx].entries[j].hash,
  ------------------
  |  Branch (627:21): [True: 0, False: 395]
  ------------------
  628|    395|                        &ihash, h->atomic_lock))
  629|      0|                    return 0;
  630|    395|            } else {
  631|      0|                ihash = md->neighborhoods[neigh_idx].entries[j].hash;
  632|      0|            }
  633|    395|            if (compare_hash(hash, ihash) && match_key(&newval->value.key, &ival->key)) {
  ------------------
  |  Branch (633:17): [True: 0, False: 395]
  |  Branch (633:46): [True: 0, False: 0]
  ------------------
  634|      0|                if (olddata == NULL) {
  ------------------
  |  Branch (634:21): [True: 0, False: 0]
  ------------------
  635|       |                    /* This would insert a duplicate -> fail */
  636|      0|                    return 0;
  637|      0|                }
  638|       |                /* Do a replacement */
  639|      0|                if (!h->config.no_rcu) {
  ------------------
  |  Branch (639:21): [True: 0, False: 0]
  ------------------
  640|      0|                    CRYPTO_RCU_CB_ITEM *cbi = ossl_rcu_cb_item_new();
  641|      0|                    if (cbi == NULL)
  ------------------
  |  Branch (641:25): [True: 0, False: 0]
  ------------------
  642|      0|                        return 0;
  643|      0|                    if (!CRYPTO_atomic_store(&md->neighborhoods[neigh_idx].entries[j].hash,
  ------------------
  |  Branch (643:25): [True: 0, False: 0]
  ------------------
  644|      0|                            hash, h->atomic_lock)) {
  645|      0|                        ossl_rcu_cb_item_free(cbi);
  646|      0|                        return 0;
  647|      0|                    }
  648|      0|                    *olddata = (HT_VALUE *)md->neighborhoods[neigh_idx].entries[j].value;
  649|      0|                    ossl_rcu_assign_ptr(&md->neighborhoods[neigh_idx].entries[j].value,
  ------------------
  |  |   36|      0|#define ossl_rcu_assign_ptr(p, v) ossl_rcu_assign_uptr((void **)p, (void **)v)
  ------------------
  650|      0|                        &newval);
  651|      0|                    ossl_rcu_call(h->lock, cbi, free_old_ht_value, *olddata);
  652|      0|                } else {
  653|      0|                    md->neighborhoods[neigh_idx].entries[j].hash = hash;
  654|      0|                    *olddata = (HT_VALUE *)md->neighborhoods[neigh_idx].entries[j].value;
  655|      0|                    md->neighborhoods[neigh_idx].entries[j].value = newval;
  656|      0|                }
  657|      0|                h->wpd.need_sync = 1;
  658|      0|                return 1;
  659|      0|            }
  660|    395|        }
  661|  3.55k|        if (!lockless_reads)
  ------------------
  |  Branch (661:13): [True: 3.55k, False: 5]
  ------------------
  662|  3.55k|            break;
  663|       |        /* Continue search in subsequent neighborhoods */
  664|      5|        neigh_idx = (neigh_idx + 1) & md->neighborhood_mask;
  665|      5|    } while (neigh_idx != neigh_idx_start);
  ------------------
  |  Branch (665:14): [True: 5, False: 0]
  ------------------
  666|       |
  667|  4.19k|not_found:
  668|       |    /* If we get to here, its just an insert */
  669|  4.19k|    if (empty_idx == SIZE_MAX)
  ------------------
  |  Branch (669:9): [True: 0, False: 4.19k]
  ------------------
  670|      0|        return -1; /* out of space */
  671|  4.19k|    if (!h->config.no_rcu) {
  ------------------
  |  Branch (671:9): [True: 638, False: 3.55k]
  ------------------
  672|    638|        if (!CRYPTO_atomic_store(&md->neighborhoods[neigh_idx].entries[empty_idx].hash,
  ------------------
  |  Branch (672:13): [True: 0, False: 638]
  ------------------
  673|    638|                hash, h->atomic_lock))
  674|      0|            return 0;
  675|    638|        ossl_rcu_assign_ptr(&md->neighborhoods[neigh_idx].entries[empty_idx].value,
  ------------------
  |  |   36|    638|#define ossl_rcu_assign_ptr(p, v) ossl_rcu_assign_uptr((void **)p, (void **)v)
  ------------------
  676|    638|            &newval);
  677|  3.55k|    } else {
  678|  3.55k|        md->neighborhoods[neigh_idx].entries[empty_idx].hash = hash;
  679|  3.55k|        md->neighborhoods[neigh_idx].entries[empty_idx].value = newval;
  680|  3.55k|    }
  681|  4.19k|    h->wpd.value_count++;
  682|  4.19k|    return 1;
  683|  4.19k|}
hashtable.c:free_value:
  714|  3.55k|{
  715|  3.55k|    OPENSSL_free(v);
  ------------------
  |  |  132|  3.55k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  716|  3.55k|}
hashtable.c:compare_hash:
  458|  2.59M|{
  459|  2.59M|    return (hash1 == hash2);
  460|  2.59M|}
hashtable.c:match_key:
  585|  1.76M|{
  586|       |    /*
  587|       |     * keys match if they are both present, the same size
  588|       |     * and compare equal in memory
  589|       |     */
  590|  1.76M|    PREFETCH(a->keybuf);
  ------------------
  |  |   83|  1.76M|#define PREFETCH(x) __builtin_prefetch(x)
  ------------------
  591|  1.76M|    PREFETCH(b->keybuf);
  ------------------
  |  |   83|  1.76M|#define PREFETCH(x) __builtin_prefetch(x)
  ------------------
  592|  1.76M|    if (a->keybuf != NULL && b->keybuf != NULL && a->keysize == b->keysize)
  ------------------
  |  Branch (592:9): [True: 1.76M, False: 3.55k]
  |  Branch (592:30): [True: 1.76M, False: 0]
  |  Branch (592:51): [True: 1.76M, False: 0]
  ------------------
  593|  1.76M|        return !memcmp(a->keybuf, b->keybuf, a->keysize);
  594|       |
  595|  3.55k|    return 1;
  596|  1.76M|}

HMAC_Init_ex:
   27|   188k|{
   28|   188k|    int rv = 0, reset = 0;
   29|   188k|    int i, j;
   30|   188k|    unsigned char pad[HMAC_MAX_MD_CBLOCK_SIZE];
   31|   188k|    unsigned int keytmp_length;
   32|   188k|    unsigned char keytmp[HMAC_MAX_MD_CBLOCK_SIZE];
   33|       |
   34|       |    /* If we are changing MD then we must have a key */
   35|   188k|    if (md != NULL && md != ctx->md && (key == NULL || len < 0))
  ------------------
  |  Branch (35:9): [True: 188k, False: 0]
  |  Branch (35:23): [True: 188k, False: 0]
  |  Branch (35:41): [True: 0, False: 188k]
  |  Branch (35:56): [True: 0, False: 188k]
  ------------------
   36|      0|        return 0;
   37|       |
   38|   188k|    if (impl != NULL)
  ------------------
  |  Branch (38:9): [True: 0, False: 188k]
  ------------------
   39|      0|        return 0;
   40|       |
   41|   188k|    if (md != NULL)
  ------------------
  |  Branch (41:9): [True: 188k, False: 0]
  ------------------
   42|   188k|        ctx->md = md;
   43|      0|    else if (ctx->md != NULL)
  ------------------
  |  Branch (43:14): [True: 0, False: 0]
  ------------------
   44|      0|        md = ctx->md;
   45|      0|    else
   46|      0|        return 0;
   47|       |
   48|       |    /*
   49|       |     * The HMAC construction is not allowed to be used with the
   50|       |     * extendable-output functions (XOF) shake128 and shake256.
   51|       |     */
   52|   188k|    if (EVP_MD_xof(md))
  ------------------
  |  Branch (52:9): [True: 0, False: 188k]
  ------------------
   53|      0|        return 0;
   54|       |
   55|       |#ifdef OPENSSL_HMAC_S390X
   56|       |    {
   57|       |        int ret = s390x_HMAC_init(ctx, key, len);
   58|       |        if (ret != -1) /* -1 means SW fallback */
   59|       |            return ret;
   60|       |    }
   61|       |#endif
   62|       |
   63|   188k|    if (key != NULL) {
  ------------------
  |  Branch (63:9): [True: 188k, False: 0]
  ------------------
   64|   188k|        reset = 1;
   65|       |
   66|   188k|        j = EVP_MD_get_block_size(md);
   67|   188k|        if (!ossl_assert(j <= (int)sizeof(keytmp)))
  ------------------
  |  |   52|   188k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   188k|    __FILE__, __LINE__)
  ------------------
  |  Branch (67:13): [True: 0, False: 188k]
  ------------------
   68|      0|            return 0;
   69|   188k|        if (j < 0)
  ------------------
  |  Branch (69:13): [True: 0, False: 188k]
  ------------------
   70|      0|            return 0;
   71|   188k|        if (j < len) {
  ------------------
  |  Branch (71:13): [True: 0, False: 188k]
  ------------------
   72|      0|            if (!EVP_DigestInit_ex(ctx->md_ctx, md, NULL)
  ------------------
  |  Branch (72:17): [True: 0, False: 0]
  ------------------
   73|      0|                || !EVP_DigestUpdate(ctx->md_ctx, key, len)
  ------------------
  |  Branch (73:20): [True: 0, False: 0]
  ------------------
   74|      0|                || !EVP_DigestFinal_ex(ctx->md_ctx, keytmp,
  ------------------
  |  Branch (74:20): [True: 0, False: 0]
  ------------------
   75|      0|                    &keytmp_length))
   76|      0|                return 0;
   77|   188k|        } else {
   78|   188k|            if (len < 0 || len > (int)sizeof(keytmp))
  ------------------
  |  Branch (78:17): [True: 0, False: 188k]
  |  Branch (78:28): [True: 0, False: 188k]
  ------------------
   79|      0|                return 0;
   80|   188k|            memcpy(keytmp, key, len);
   81|   188k|            keytmp_length = len;
   82|   188k|        }
   83|   188k|        if (keytmp_length != HMAC_MAX_MD_CBLOCK_SIZE)
  ------------------
  |  |   18|   188k|#define HMAC_MAX_MD_CBLOCK_SIZE 144
  ------------------
  |  Branch (83:13): [True: 188k, False: 0]
  ------------------
   84|   188k|            memset(&keytmp[keytmp_length], 0,
   85|   188k|                HMAC_MAX_MD_CBLOCK_SIZE - keytmp_length);
  ------------------
  |  |   18|   188k|#define HMAC_MAX_MD_CBLOCK_SIZE 144
  ------------------
   86|       |
   87|  27.2M|        for (i = 0; i < HMAC_MAX_MD_CBLOCK_SIZE; i++)
  ------------------
  |  |   18|  27.2M|#define HMAC_MAX_MD_CBLOCK_SIZE 144
  ------------------
  |  Branch (87:21): [True: 27.1M, False: 188k]
  ------------------
   88|  27.1M|            pad[i] = 0x36 ^ keytmp[i];
   89|   188k|        if (!EVP_DigestInit_ex(ctx->i_ctx, md, NULL)
  ------------------
  |  Branch (89:13): [True: 0, False: 188k]
  ------------------
   90|   188k|            || !EVP_DigestUpdate(ctx->i_ctx, pad,
  ------------------
  |  Branch (90:16): [True: 0, False: 188k]
  ------------------
   91|   188k|                EVP_MD_get_block_size(md)))
   92|      0|            goto err;
   93|       |
   94|  27.2M|        for (i = 0; i < HMAC_MAX_MD_CBLOCK_SIZE; i++)
  ------------------
  |  |   18|  27.2M|#define HMAC_MAX_MD_CBLOCK_SIZE 144
  ------------------
  |  Branch (94:21): [True: 27.1M, False: 188k]
  ------------------
   95|  27.1M|            pad[i] = 0x5c ^ keytmp[i];
   96|   188k|        if (!EVP_DigestInit_ex(ctx->o_ctx, md, NULL)
  ------------------
  |  Branch (96:13): [True: 0, False: 188k]
  ------------------
   97|   188k|            || !EVP_DigestUpdate(ctx->o_ctx, pad,
  ------------------
  |  Branch (97:16): [True: 0, False: 188k]
  ------------------
   98|   188k|                EVP_MD_get_block_size(md)))
   99|      0|            goto err;
  100|   188k|    }
  101|   188k|    if (!EVP_MD_CTX_copy_ex(ctx->md_ctx, ctx->i_ctx))
  ------------------
  |  Branch (101:9): [True: 0, False: 188k]
  ------------------
  102|      0|        goto err;
  103|   188k|    rv = 1;
  104|   188k|err:
  105|   188k|    if (reset) {
  ------------------
  |  Branch (105:9): [True: 188k, False: 0]
  ------------------
  106|   188k|        OPENSSL_cleanse(keytmp, sizeof(keytmp));
  107|   188k|        OPENSSL_cleanse(pad, sizeof(pad));
  108|   188k|    }
  109|   188k|    return rv;
  110|   188k|}
HMAC_Update:
  122|   333k|{
  123|   333k|    if (!ctx->md)
  ------------------
  |  Branch (123:9): [True: 0, False: 333k]
  ------------------
  124|      0|        return 0;
  125|       |
  126|       |#ifdef OPENSSL_HMAC_S390X
  127|       |    if (ctx->plat.s390x.fc)
  128|       |        return s390x_HMAC_update(ctx, data, len);
  129|       |#endif
  130|       |
  131|   333k|    return EVP_DigestUpdate(ctx->md_ctx, data, len);
  132|   333k|}
HMAC_Final:
  135|   188k|{
  136|   188k|    unsigned int i;
  137|   188k|    unsigned char buf[EVP_MAX_MD_SIZE];
  138|       |
  139|   188k|    if (!ctx->md)
  ------------------
  |  Branch (139:9): [True: 0, False: 188k]
  ------------------
  140|      0|        goto err;
  141|       |
  142|       |#ifdef OPENSSL_HMAC_S390X
  143|       |    if (ctx->plat.s390x.fc)
  144|       |        return s390x_HMAC_final(ctx, md, len);
  145|       |#endif
  146|       |
  147|   188k|    if (!EVP_DigestFinal_ex(ctx->md_ctx, buf, &i))
  ------------------
  |  Branch (147:9): [True: 0, False: 188k]
  ------------------
  148|      0|        goto err;
  149|   188k|    if (!EVP_MD_CTX_copy_ex(ctx->md_ctx, ctx->o_ctx))
  ------------------
  |  Branch (149:9): [True: 0, False: 188k]
  ------------------
  150|      0|        goto err;
  151|   188k|    if (!EVP_DigestUpdate(ctx->md_ctx, buf, i))
  ------------------
  |  Branch (151:9): [True: 0, False: 188k]
  ------------------
  152|      0|        goto err;
  153|   188k|    if (!EVP_DigestFinal_ex(ctx->md_ctx, md, len))
  ------------------
  |  Branch (153:9): [True: 0, False: 188k]
  ------------------
  154|      0|        goto err;
  155|   188k|    return 1;
  156|      0|err:
  157|      0|    return 0;
  158|   188k|}
HMAC_size:
  161|  43.4k|{
  162|  43.4k|    int size = EVP_MD_get_size((ctx)->md);
  163|       |
  164|  43.4k|    return (size < 0) ? 0 : size;
  ------------------
  |  Branch (164:12): [True: 0, False: 43.4k]
  ------------------
  165|  43.4k|}
HMAC_CTX_new:
  168|   188k|{
  169|   188k|    HMAC_CTX *ctx = OPENSSL_zalloc(sizeof(HMAC_CTX));
  ------------------
  |  |  109|   188k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  170|       |
  171|   188k|    if (ctx != NULL) {
  ------------------
  |  Branch (171:9): [True: 188k, False: 0]
  ------------------
  172|   188k|        if (!HMAC_CTX_reset(ctx)) {
  ------------------
  |  Branch (172:13): [True: 0, False: 188k]
  ------------------
  173|      0|            HMAC_CTX_free(ctx);
  174|      0|            return NULL;
  175|      0|        }
  176|   188k|    }
  177|   188k|    return ctx;
  178|   188k|}
HMAC_CTX_free:
  193|   195k|{
  194|   195k|    if (ctx != NULL) {
  ------------------
  |  Branch (194:9): [True: 188k, False: 7.16k]
  ------------------
  195|   188k|        hmac_ctx_cleanup(ctx);
  196|   188k|        EVP_MD_CTX_free(ctx->i_ctx);
  197|   188k|        EVP_MD_CTX_free(ctx->o_ctx);
  198|   188k|        EVP_MD_CTX_free(ctx->md_ctx);
  199|   188k|        OPENSSL_free(ctx);
  ------------------
  |  |  132|   188k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  200|   188k|    }
  201|   195k|}
HMAC_CTX_reset:
  221|   188k|{
  222|   188k|    hmac_ctx_cleanup(ctx);
  223|   188k|    if (!hmac_ctx_alloc_mds(ctx)) {
  ------------------
  |  Branch (223:9): [True: 0, False: 188k]
  ------------------
  224|      0|        hmac_ctx_cleanup(ctx);
  225|      0|        return 0;
  226|      0|    }
  227|   188k|    return 1;
  228|   188k|}
hmac.c:hmac_ctx_cleanup:
  181|   376k|{
  182|   376k|    EVP_MD_CTX_reset(ctx->i_ctx);
  183|   376k|    EVP_MD_CTX_reset(ctx->o_ctx);
  184|   376k|    EVP_MD_CTX_reset(ctx->md_ctx);
  185|   376k|    ctx->md = NULL;
  186|       |
  187|       |#ifdef OPENSSL_HMAC_S390X
  188|       |    s390x_HMAC_CTX_cleanup(ctx);
  189|       |#endif
  190|   376k|}
hmac.c:hmac_ctx_alloc_mds:
  204|   188k|{
  205|   188k|    if (ctx->i_ctx == NULL)
  ------------------
  |  Branch (205:9): [True: 188k, False: 0]
  ------------------
  206|   188k|        ctx->i_ctx = EVP_MD_CTX_new();
  207|   188k|    if (ctx->i_ctx == NULL)
  ------------------
  |  Branch (207:9): [True: 0, False: 188k]
  ------------------
  208|      0|        return 0;
  209|   188k|    if (ctx->o_ctx == NULL)
  ------------------
  |  Branch (209:9): [True: 188k, False: 0]
  ------------------
  210|   188k|        ctx->o_ctx = EVP_MD_CTX_new();
  211|   188k|    if (ctx->o_ctx == NULL)
  ------------------
  |  Branch (211:9): [True: 0, False: 188k]
  ------------------
  212|      0|        return 0;
  213|   188k|    if (ctx->md_ctx == NULL)
  ------------------
  |  Branch (213:9): [True: 188k, False: 0]
  ------------------
  214|   188k|        ctx->md_ctx = EVP_MD_CTX_new();
  215|   188k|    if (ctx->md_ctx == NULL)
  ------------------
  |  Branch (215:9): [True: 0, False: 188k]
  ------------------
  216|      0|        return 0;
  217|   188k|    return 1;
  218|   188k|}

OSSL_HPKE_CTX_free:
  863|  7.25k|{
  864|  7.25k|    if (ctx == NULL)
  ------------------
  |  Branch (864:9): [True: 7.25k, False: 0]
  ------------------
  865|  7.25k|        return;
  866|      0|    EVP_CIPHER_free(ctx->aead_ciph);
  867|      0|    OPENSSL_free(ctx->propq);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  868|      0|    OPENSSL_clear_free(ctx->exportersec, ctx->exporterseclen);
  ------------------
  |  |  130|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  869|      0|    OPENSSL_free(ctx->pskid);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  870|      0|    OPENSSL_clear_free(ctx->psk, ctx->psklen);
  ------------------
  |  |  130|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  871|      0|    OPENSSL_clear_free(ctx->key, ctx->keylen);
  ------------------
  |  |  130|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  872|      0|    OPENSSL_clear_free(ctx->nonce, ctx->noncelen);
  ------------------
  |  |  130|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  873|      0|    OPENSSL_clear_free(ctx->shared_secret, ctx->shared_secretlen);
  ------------------
  |  |  130|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  874|      0|    OPENSSL_clear_free(ctx->ikme, ctx->ikmelen);
  ------------------
  |  |  130|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  875|      0|    EVP_PKEY_free(ctx->authpriv);
  876|      0|    OPENSSL_free(ctx->authpub);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  877|       |
  878|      0|    OPENSSL_free(ctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  879|      0|    return;
  880|  7.25k|}

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

ossl_indicator_set_callback_new:
   21|      2|{
   22|      2|    INDICATOR_CB *cb;
   23|       |
   24|      2|    cb = OPENSSL_zalloc(sizeof(*cb));
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   25|      2|    return cb;
   26|      2|}

OPENSSL_init_crypto:
  349|  3.24M|{
  350|  3.24M|    uint64_t tmp;
  351|  3.24M|    int aloaddone = 0;
  352|       |
  353|       |    /* Applications depend on 0 being returned when cleanup was already done */
  354|  3.24M|    if (ossl_unlikely(stopped)) {
  ------------------
  |  |   23|  3.24M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3.24M]
  |  |  ------------------
  ------------------
  355|      0|        if (!(opts & OPENSSL_INIT_BASE_ONLY))
  ------------------
  |  |   31|      0|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  |  Branch (355:13): [True: 0, False: 0]
  ------------------
  356|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_INIT_FAIL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  357|      0|        return 0;
  358|      0|    }
  359|       |
  360|       |    /*
  361|       |     * We ignore failures from this function. It is probably because we are
  362|       |     * on a platform that doesn't support lockless atomic loads (we may not
  363|       |     * have created optsdone_lock yet so we can't use it). This is just an
  364|       |     * optimisation to skip the full checks in this function if we don't need
  365|       |     * to, so we carry on regardless in the event of failure.
  366|       |     *
  367|       |     * There could be a race here with other threads, so that optsdone has not
  368|       |     * been updated yet, even though the options have in fact been initialised.
  369|       |     * This doesn't matter - it just means we will run the full function
  370|       |     * unnecessarily - but all the critical code is contained in RUN_ONCE
  371|       |     * functions anyway so we are safe.
  372|       |     */
  373|  3.24M|    if (ossl_likely(CRYPTO_atomic_load(&optsdone, &tmp, NULL))) {
  ------------------
  |  |   22|  3.24M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3.24M, False: 0]
  |  |  ------------------
  ------------------
  374|  3.24M|        if ((tmp & opts) == opts)
  ------------------
  |  Branch (374:13): [True: 422k, False: 2.82M]
  ------------------
  375|   422k|            return 1;
  376|  2.82M|        aloaddone = 1;
  377|  2.82M|    }
  378|       |
  379|       |    /*
  380|       |     * At some point we should look at this function with a view to moving
  381|       |     * most/all of this into OSSL_LIB_CTX.
  382|       |     *
  383|       |     * When the caller specifies OPENSSL_INIT_BASE_ONLY, that should be the
  384|       |     * *only* option specified.  With that option we return immediately after
  385|       |     * doing the requested limited initialization.
  386|       |     *
  387|       |     * If we remain the only caller of err_shelve_state() the recursion should
  388|       |     * perhaps be removed, but if in doubt, it can be left in place.
  389|       |     */
  390|  2.82M|    if (ossl_unlikely(!RUN_ONCE(&base, ossl_init_base)))
  ------------------
  |  |   23|  5.65M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.82M]
  |  |  |  Branch (23:46): [True: 2.82M, False: 0]
  |  |  ------------------
  ------------------
  391|      0|        return 0;
  392|       |
  393|  2.82M|    if (opts & OPENSSL_INIT_BASE_ONLY)
  ------------------
  |  |   31|  2.82M|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  |  Branch (393:9): [True: 2.82M, False: 5]
  ------------------
  394|  2.82M|        return 1;
  395|       |
  396|       |    /*
  397|       |     * optsdone_lock should definitely be set up now, so we can now repeat the
  398|       |     * same check from above but be sure that it will work even on platforms
  399|       |     * without lockless CRYPTO_atomic_load
  400|       |     */
  401|      5|    if (!aloaddone) {
  ------------------
  |  Branch (401:9): [True: 0, False: 5]
  ------------------
  402|      0|        if (!CRYPTO_atomic_load(&optsdone, &tmp, optsdone_lock))
  ------------------
  |  Branch (402:13): [True: 0, False: 0]
  ------------------
  403|      0|            return 0;
  404|      0|        if ((tmp & opts) == opts)
  ------------------
  |  Branch (404:13): [True: 0, False: 0]
  ------------------
  405|      0|            return 1;
  406|      0|    }
  407|       |
  408|      5|    if ((opts & OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS)
  ------------------
  |  |  505|      5|#define OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS 0x00000001L
  ------------------
  |  Branch (408:9): [True: 0, False: 5]
  ------------------
  409|      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 (409:12): [True: 0, False: 0]
  ------------------
  410|      5|            ossl_init_no_load_crypto_strings,
  411|      5|            ossl_init_load_crypto_strings))
  412|      0|        return 0;
  413|       |
  414|      5|    if ((opts & OPENSSL_INIT_LOAD_CRYPTO_STRINGS)
  ------------------
  |  |  506|      5|#define OPENSSL_INIT_LOAD_CRYPTO_STRINGS 0x00000002L
  ------------------
  |  Branch (414:9): [True: 2, False: 3]
  ------------------
  415|      2|        && !RUN_ONCE(&load_crypto_strings, ossl_init_load_crypto_strings))
  ------------------
  |  |  130|      2|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (415:12): [True: 0, False: 2]
  ------------------
  416|      0|        return 0;
  417|       |
  418|      5|    if ((opts & OPENSSL_INIT_NO_LOAD_SSL_STRINGS)
  ------------------
  |  | 2817|      5|#define OPENSSL_INIT_NO_LOAD_SSL_STRINGS 0x00100000L
  ------------------
  |  Branch (418:9): [True: 0, False: 5]
  ------------------
  419|      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 (419:12): [True: 0, False: 0]
  ------------------
  420|      5|            ossl_init_load_ssl_strings))
  421|      0|        return 0;
  422|       |
  423|      5|    if ((opts & OPENSSL_INIT_LOAD_SSL_STRINGS)
  ------------------
  |  | 2818|      5|#define OPENSSL_INIT_LOAD_SSL_STRINGS 0x00200000L
  ------------------
  |  Branch (423:9): [True: 1, False: 4]
  ------------------
  424|      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 (424:12): [True: 0, False: 1]
  ------------------
  425|      0|        return 0;
  426|       |
  427|      5|    if ((opts & OPENSSL_INIT_NO_ADD_ALL_CIPHERS)
  ------------------
  |  |  509|      5|#define OPENSSL_INIT_NO_ADD_ALL_CIPHERS 0x00000010L
  ------------------
  |  Branch (427:9): [True: 0, False: 5]
  ------------------
  428|      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 (428:12): [True: 0, False: 0]
  ------------------
  429|      5|            ossl_init_add_all_ciphers))
  430|      0|        return 0;
  431|       |
  432|      5|    if ((opts & OPENSSL_INIT_ADD_ALL_CIPHERS)
  ------------------
  |  |  507|      5|#define OPENSSL_INIT_ADD_ALL_CIPHERS 0x00000004L
  ------------------
  |  Branch (432:9): [True: 3, False: 2]
  ------------------
  433|      3|        && !RUN_ONCE(&add_all_ciphers, ossl_init_add_all_ciphers))
  ------------------
  |  |  130|      3|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 3, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (433:12): [True: 0, False: 3]
  ------------------
  434|      0|        return 0;
  435|       |
  436|      5|    if ((opts & OPENSSL_INIT_NO_ADD_ALL_DIGESTS)
  ------------------
  |  |  510|      5|#define OPENSSL_INIT_NO_ADD_ALL_DIGESTS 0x00000020L
  ------------------
  |  Branch (436:9): [True: 0, False: 5]
  ------------------
  437|      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 (437:12): [True: 0, False: 0]
  ------------------
  438|      5|            ossl_init_add_all_digests))
  439|      0|        return 0;
  440|       |
  441|      5|    if ((opts & OPENSSL_INIT_ADD_ALL_DIGESTS)
  ------------------
  |  |  508|      5|#define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
  ------------------
  |  Branch (441:9): [True: 3, False: 2]
  ------------------
  442|      3|        && !RUN_ONCE(&add_all_digests, ossl_init_add_all_digests))
  ------------------
  |  |  130|      3|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 3, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (442:12): [True: 0, False: 3]
  ------------------
  443|      0|        return 0;
  444|       |
  445|      5|    if ((opts & OPENSSL_INIT_ATFORK)
  ------------------
  |  |  515|      5|#define OPENSSL_INIT_ATFORK 0x00020000L
  ------------------
  |  Branch (445:9): [True: 0, False: 5]
  ------------------
  446|      0|        && !openssl_init_fork_handlers())
  ------------------
  |  Branch (446:12): [True: 0, False: 0]
  ------------------
  447|      0|        return 0;
  448|       |
  449|      5|    if ((opts & OPENSSL_INIT_NO_LOAD_CONFIG)
  ------------------
  |  |  512|      5|#define OPENSSL_INIT_NO_LOAD_CONFIG 0x00000080L
  ------------------
  |  Branch (449:9): [True: 0, False: 5]
  ------------------
  450|      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 (450:12): [True: 0, False: 0]
  ------------------
  451|      0|        return 0;
  452|       |
  453|      5|    if (opts & OPENSSL_INIT_LOAD_CONFIG) {
  ------------------
  |  |  511|      5|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
  |  Branch (453:9): [True: 3, False: 2]
  ------------------
  454|      3|        int loading = CRYPTO_THREAD_get_local(&in_init_config_local) != NULL;
  455|       |
  456|       |        /* If called recursively from OBJ_ calls, just skip it. */
  457|      3|        if (!loading) {
  ------------------
  |  Branch (457:13): [True: 2, False: 1]
  ------------------
  458|      2|            int ret;
  459|       |
  460|      2|            if (!CRYPTO_THREAD_set_local(&in_init_config_local, (void *)-1))
  ------------------
  |  Branch (460:17): [True: 0, False: 2]
  ------------------
  461|      0|                return 0;
  462|      2|            if (settings == NULL) {
  ------------------
  |  Branch (462:17): [True: 2, False: 0]
  ------------------
  463|      2|                ret = RUN_ONCE(&config, ossl_init_config);
  ------------------
  |  |  130|      2|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  464|      2|            } else {
  465|      0|                if (!CRYPTO_THREAD_write_lock(init_lock))
  ------------------
  |  Branch (465:21): [True: 0, False: 0]
  ------------------
  466|      0|                    return 0;
  467|      0|                conf_settings = settings;
  468|      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]
  |  |  ------------------
  ------------------
  469|      0|                    ossl_init_config);
  470|      0|                conf_settings = NULL;
  471|      0|                CRYPTO_THREAD_unlock(init_lock);
  472|      0|            }
  473|       |
  474|      2|            if (ret <= 0)
  ------------------
  |  Branch (474:17): [True: 0, False: 2]
  ------------------
  475|      0|                return 0;
  476|      2|        }
  477|      3|    }
  478|       |
  479|      5|    if ((opts & OPENSSL_INIT_ASYNC)
  ------------------
  |  |  513|      5|#define OPENSSL_INIT_ASYNC 0x00000100L
  ------------------
  |  Branch (479:9): [True: 0, False: 5]
  ------------------
  480|      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 (480:12): [True: 0, False: 0]
  ------------------
  481|      0|        return 0;
  482|       |
  483|      5|    if (!CRYPTO_atomic_or(&optsdone, opts, &tmp, optsdone_lock))
  ------------------
  |  Branch (483:9): [True: 0, False: 5]
  ------------------
  484|      0|        return 0;
  485|       |
  486|      5|    return 1;
  487|      5|}
init.c:ossl_init_base:
   53|      2|{
   54|       |    /* no need to init trace */
   55|       |
   56|      2|    OSSL_TRACE(INIT, "ossl_init_base: setting up stop handlers\n");
  ------------------
  |  |  288|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      2|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   57|       |#ifndef OPENSSL_NO_CRYPTO_MDEBUG
   58|       |    ossl_malloc_setup_failures();
   59|       |#endif
   60|       |
   61|      2|    if ((optsdone_lock = CRYPTO_THREAD_lock_new()) == NULL
  ------------------
  |  Branch (61:9): [True: 0, False: 2]
  ------------------
   62|      2|        || (init_lock = CRYPTO_THREAD_lock_new()) == NULL)
  ------------------
  |  Branch (62:12): [True: 0, False: 2]
  ------------------
   63|      0|        goto err;
   64|       |
   65|      2|    OPENSSL_cpuid_setup();
   66|       |
   67|      2|    if (!ossl_init_thread())
  ------------------
  |  Branch (67:9): [True: 0, False: 2]
  ------------------
   68|      0|        goto err;
   69|       |
   70|      2|    if (!CRYPTO_THREAD_init_local(&in_init_config_local, NULL))
  ------------------
  |  Branch (70:9): [True: 0, False: 2]
  ------------------
   71|      0|        goto err;
   72|       |
   73|      2|    base_inited = 1;
   74|      2|    return 1;
   75|       |
   76|      0|err:
   77|      0|    OSSL_TRACE(INIT, "ossl_init_base failed!\n");
  ------------------
  |  |  288|      0|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   78|      0|    CRYPTO_THREAD_lock_free(optsdone_lock);
   79|      0|    optsdone_lock = NULL;
   80|      0|    CRYPTO_THREAD_lock_free(init_lock);
   81|      0|    init_lock = NULL;
   82|       |
   83|      0|    return 0;
   84|      2|}
init.c:ossl_init_load_crypto_strings:
   89|      2|{
   90|      2|    int ret = 1;
   91|       |    /*
   92|       |     * OPENSSL_NO_AUTOERRINIT is provided here to prevent at compile time
   93|       |     * pulling in all the error strings during static linking
   94|       |     */
   95|      2|#if !defined(OPENSSL_NO_ERR) && !defined(OPENSSL_NO_AUTOERRINIT)
   96|      2|    void *err;
   97|       |
   98|      2|    if (!err_shelve_state(&err))
  ------------------
  |  Branch (98:9): [True: 0, False: 2]
  ------------------
   99|      0|        return 0;
  100|       |
  101|      2|    OSSL_TRACE(INIT, "ossl_err_load_crypto_strings()\n");
  ------------------
  |  |  288|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      2|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  102|      2|    ret = ossl_err_load_crypto_strings();
  103|       |
  104|      2|    err_unshelve_state(err);
  105|      2|#endif
  106|      2|    return ret;
  107|      2|}
init.c:ossl_init_load_ssl_strings:
  119|      1|{
  120|       |    /*
  121|       |     * OPENSSL_NO_AUTOERRINIT is provided here to prevent at compile time
  122|       |     * pulling in all the error strings during static linking
  123|       |     */
  124|      1|#if !defined(OPENSSL_NO_ERR) && !defined(OPENSSL_NO_AUTOERRINIT)
  125|      1|    OSSL_TRACE(INIT, "ossl_init_load_ssl_strings: ossl_err_load_SSL_strings()\n");
  ------------------
  |  |  288|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  126|      1|    ossl_err_load_SSL_strings();
  127|      1|#endif
  128|      1|    return 1;
  129|      1|}
init.c:ossl_init_add_all_ciphers:
  140|      2|{
  141|       |    /*
  142|       |     * OPENSSL_NO_AUTOALGINIT is provided here to prevent at compile time
  143|       |     * pulling in all the ciphers during static linking
  144|       |     */
  145|      2|#ifndef OPENSSL_NO_AUTOALGINIT
  146|      2|    OSSL_TRACE(INIT, "openssl_add_all_ciphers_int()\n");
  ------------------
  |  |  288|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      2|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  147|      2|    openssl_add_all_ciphers_int();
  148|      2|#endif
  149|      2|    return 1;
  150|      2|}
init.c:ossl_init_add_all_digests:
  161|      2|{
  162|       |    /*
  163|       |     * OPENSSL_NO_AUTOALGINIT is provided here to prevent at compile time
  164|       |     * pulling in all the ciphers during static linking
  165|       |     */
  166|      2|#ifndef OPENSSL_NO_AUTOALGINIT
  167|      2|    OSSL_TRACE(INIT, "openssl_add_all_digests()\n");
  ------------------
  |  |  288|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      2|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  168|      2|    openssl_add_all_digests_int();
  169|      2|#endif
  170|      2|    return 1;
  171|      2|}
init.c:ossl_init_config:
  183|      2|{
  184|      2|    int ret = ossl_config_int(NULL);
  185|       |
  186|      2|    return ret;
  187|      2|}

ossl_init_thread:
  240|      2|{
  241|      2|    if (!CRYPTO_THREAD_init_local(&destructor_key.value,
  ------------------
  |  Branch (241:9): [True: 0, False: 2]
  ------------------
  242|      2|            init_thread_destructor))
  243|      0|        return 0;
  244|       |
  245|      2|    return 1;
  246|      2|}
ossl_init_thread_start:
  392|      3|{
  393|      3|    THREAD_EVENT_HANDLER **hands;
  394|      3|    THREAD_EVENT_HANDLER *hand;
  395|      3|    OSSL_LIB_CTX *ctx = NULL;
  396|       |#ifdef FIPS_MODULE
  397|       |    /*
  398|       |     * In FIPS mode the list of THREAD_EVENT_HANDLERs is unique per combination
  399|       |     * of OSSL_LIB_CTX and thread. This is because in FIPS mode each
  400|       |     * OSSL_LIB_CTX gets informed about thread stop events individually.
  401|       |     */
  402|       |
  403|       |    ctx = arg;
  404|       |#endif
  405|       |
  406|      3|    hands = alloc_thread_local(ctx);
  407|       |
  408|      3|    if (hands == NULL)
  ------------------
  |  Branch (408:9): [True: 0, False: 3]
  ------------------
  409|      0|        return 0;
  410|       |
  411|       |#ifdef FIPS_MODULE
  412|       |    if (*hands == NULL) {
  413|       |        /*
  414|       |         * We've not yet registered any handlers for this thread. We need to get
  415|       |         * libcrypto to tell us about later thread stop events. c_thread_start
  416|       |         * is a callback to libcrypto defined in fipsprov.c
  417|       |         */
  418|       |        if (!ossl_thread_register_fips(ctx))
  419|       |            return 0;
  420|       |    }
  421|       |#endif
  422|       |
  423|      3|    hand = OPENSSL_malloc(sizeof(*hand));
  ------------------
  |  |  107|      3|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  424|      3|    if (hand == NULL)
  ------------------
  |  Branch (424:9): [True: 0, False: 3]
  ------------------
  425|      0|        return 0;
  426|       |
  427|      3|    hand->handfn = handfn;
  428|      3|    hand->arg = arg;
  429|      3|#ifndef FIPS_MODULE
  430|      3|    hand->index = index;
  431|      3|#endif
  432|      3|    hand->next = *hands;
  433|      3|    *hands = hand;
  434|       |
  435|      3|    return 1;
  436|      3|}
initthread.c:manage_thread_local:
  137|      3|{
  138|      3|    THREAD_EVENT_HANDLER **hands = get_thread_event_handler(ctx);
  139|       |
  140|      3|    if (alloc) {
  ------------------
  |  Branch (140:9): [True: 3, False: 0]
  ------------------
  141|      3|        if (hands == NULL) {
  ------------------
  |  Branch (141:13): [True: 2, False: 1]
  ------------------
  142|       |
  143|      2|            if ((hands = OPENSSL_zalloc(sizeof(*hands))) == NULL)
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (143:17): [True: 0, False: 2]
  ------------------
  144|      0|                return NULL;
  145|       |
  146|      2|            if (!set_thread_event_handler(ctx, hands)) {
  ------------------
  |  Branch (146:17): [True: 0, False: 2]
  ------------------
  147|      0|                OPENSSL_free(hands);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  148|      0|                return NULL;
  149|      0|            }
  150|      2|#ifndef FIPS_MODULE
  151|      2|            if (!init_thread_push_handlers(hands)) {
  ------------------
  |  Branch (151:17): [True: 0, False: 2]
  ------------------
  152|      0|                set_thread_event_handler(ctx, NULL);
  153|      0|                OPENSSL_free(hands);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  154|      0|                return NULL;
  155|      0|            }
  156|      2|#endif
  157|      2|        }
  158|      3|    } else if (!keep) {
  ------------------
  |  Branch (158:16): [True: 0, False: 0]
  ------------------
  159|      0|        set_thread_event_handler(ctx, NULL);
  160|      0|    }
  161|       |
  162|      3|    return hands;
  163|      3|}
initthread.c:get_thread_event_handler:
  114|      3|{
  115|       |#ifdef FIPS_MODULE
  116|       |    return CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_TEVENT_KEY, ctx);
  117|       |#else
  118|      3|    if (destructor_key.sane != -1)
  ------------------
  |  Branch (118:9): [True: 3, False: 0]
  ------------------
  119|      3|        return CRYPTO_THREAD_get_local(&destructor_key.value);
  120|      0|    return NULL;
  121|      3|#endif
  122|      3|}
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|      2|{
  193|      2|    int ret;
  194|      2|    GLOBAL_TEVENT_REGISTER *gtr;
  195|       |
  196|      2|    gtr = get_global_tevent_register();
  197|      2|    if (gtr == NULL)
  ------------------
  |  Branch (197:9): [True: 0, False: 2]
  ------------------
  198|      0|        return 0;
  199|       |
  200|      2|    if (!CRYPTO_THREAD_write_lock(gtr->lock))
  ------------------
  |  Branch (200:9): [True: 0, False: 2]
  ------------------
  201|      0|        return 0;
  202|      2|    ret = (sk_THREAD_EVENT_HANDLER_PTR_push(gtr->skhands, hands) != 0);
  203|      2|    CRYPTO_THREAD_unlock(gtr->lock);
  204|       |
  205|      2|    return ret;
  206|      2|}
initthread.c:get_global_tevent_register:
   79|      2|{
   80|      2|    if (!RUN_ONCE(&tevent_register_runonce, create_global_tevent_register))
  ------------------
  |  |  130|      2|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (80:9): [True: 0, False: 2]
  ------------------
   81|      0|        return NULL;
   82|      2|    return glob_tevent_reg;
   83|      2|}
initthread.c:create_global_tevent_register:
   60|      2|{
   61|      2|    glob_tevent_reg = OPENSSL_zalloc(sizeof(*glob_tevent_reg));
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   62|      2|    if (glob_tevent_reg == NULL)
  ------------------
  |  Branch (62:9): [True: 0, False: 2]
  ------------------
   63|      0|        return 0;
   64|       |
   65|      2|    glob_tevent_reg->skhands = sk_THREAD_EVENT_HANDLER_PTR_new_null();
   66|      2|    glob_tevent_reg->lock = CRYPTO_THREAD_lock_new();
   67|      2|    if (glob_tevent_reg->skhands == NULL || glob_tevent_reg->lock == NULL) {
  ------------------
  |  Branch (67:9): [True: 0, False: 2]
  |  Branch (67:45): [True: 0, False: 2]
  ------------------
   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);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   71|      0|        glob_tevent_reg = NULL;
   72|      0|        return 0;
   73|      0|    }
   74|       |
   75|      2|    return 1;
   76|      2|}
initthread.c:alloc_thread_local:
  176|      3|{
  177|      3|    return manage_thread_local(ctx, 1, 0);
  178|      3|}

OPENSSL_LH_set_thunks:
   52|  7.72k|{
   53|       |
   54|  7.72k|    if (lh == NULL)
  ------------------
  |  Branch (54:9): [True: 0, False: 7.72k]
  ------------------
   55|      0|        return NULL;
   56|  7.72k|    lh->compw = cw;
   57|  7.72k|    lh->hashw = hw;
   58|  7.72k|    lh->daw = daw;
   59|  7.72k|    lh->daaw = daaw;
   60|  7.72k|    return lh;
   61|  7.72k|}
OPENSSL_LH_new:
   64|  7.72k|{
   65|  7.72k|    OPENSSL_LHASH *ret;
   66|       |
   67|  7.72k|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  109|  7.72k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (67:9): [True: 0, False: 7.72k]
  ------------------
   68|      0|        return NULL;
   69|  7.72k|    if ((ret->b = OPENSSL_calloc(MIN_NODES, sizeof(*ret->b))) == NULL)
  ------------------
  |  |  113|  7.72k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (69:9): [True: 0, False: 7.72k]
  ------------------
   70|      0|        goto err;
   71|  7.72k|    ret->comp = ((c == NULL) ? (OPENSSL_LH_COMPFUNC)strcmp : c);
  ------------------
  |  Branch (71:18): [True: 0, False: 7.72k]
  ------------------
   72|  7.72k|    ret->hash = ((h == NULL) ? (OPENSSL_LH_HASHFUNC)OPENSSL_LH_strhash : h);
  ------------------
  |  Branch (72:18): [True: 0, False: 7.72k]
  ------------------
   73|  7.72k|    ret->num_nodes = MIN_NODES / 2;
  ------------------
  |  |   39|  7.72k|#define MIN_NODES 16
  ------------------
   74|  7.72k|    ret->num_alloc_nodes = MIN_NODES;
  ------------------
  |  |   39|  7.72k|#define MIN_NODES 16
  ------------------
   75|  7.72k|    ret->pmax = MIN_NODES / 2;
  ------------------
  |  |   39|  7.72k|#define MIN_NODES 16
  ------------------
   76|  7.72k|    ret->up_load = UP_LOAD;
  ------------------
  |  |   40|  7.72k|#define UP_LOAD (2 * LH_LOAD_MULT) /* load times 256 (default 2) */
  |  |  ------------------
  |  |  |  |   92|  7.72k|#define LH_LOAD_MULT 256
  |  |  ------------------
  ------------------
   77|  7.72k|    ret->down_load = DOWN_LOAD;
  ------------------
  |  |   41|  7.72k|#define DOWN_LOAD (LH_LOAD_MULT) /* load times 256 (default 1) */
  |  |  ------------------
  |  |  |  |   92|  7.72k|#define LH_LOAD_MULT 256
  |  |  ------------------
  ------------------
   78|  7.72k|    return ret;
   79|       |
   80|      0|err:
   81|      0|    OPENSSL_free(ret->b);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   82|      0|    OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   83|       |    return NULL;
   84|  7.72k|}
OPENSSL_LH_free:
   87|  7.36k|{
   88|  7.36k|    if (lh == NULL)
  ------------------
  |  Branch (88:9): [True: 0, False: 7.36k]
  ------------------
   89|      0|        return;
   90|       |
   91|  7.36k|    OPENSSL_LH_flush(lh);
   92|  7.36k|    OPENSSL_free(lh->b);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   93|  7.36k|    OPENSSL_free(lh);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   94|  7.36k|}
OPENSSL_LH_flush:
   97|  7.40k|{
   98|  7.40k|    unsigned int i;
   99|  7.40k|    OPENSSL_LH_NODE *n, *nn;
  100|       |
  101|  7.40k|    if (lh == NULL)
  ------------------
  |  Branch (101:9): [True: 0, False: 7.40k]
  ------------------
  102|      0|        return;
  103|       |
  104|  66.6k|    for (i = 0; i < lh->num_nodes; i++) {
  ------------------
  |  Branch (104:17): [True: 59.2k, False: 7.40k]
  ------------------
  105|  59.2k|        n = lh->b[i];
  106|  59.2k|        while (n != NULL) {
  ------------------
  |  Branch (106:16): [True: 0, False: 59.2k]
  ------------------
  107|      0|            nn = n->next;
  108|      0|            OPENSSL_free(n);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  109|      0|            n = nn;
  110|      0|        }
  111|  59.2k|        lh->b[i] = NULL;
  112|  59.2k|    }
  113|       |
  114|  7.40k|    lh->num_items = 0;
  115|  7.40k|}
OPENSSL_LH_insert:
  118|  10.0k|{
  119|  10.0k|    unsigned long hash;
  120|  10.0k|    OPENSSL_LH_NODE *nn, **rn;
  121|  10.0k|    void *ret;
  122|       |
  123|  10.0k|    lh->error = 0;
  124|  10.0k|    if ((lh->up_load <= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)) && !expand(lh))
  ------------------
  |  |   92|  10.0k|#define LH_LOAD_MULT 256
  ------------------
  |  Branch (124:9): [True: 1.91k, False: 8.10k]
  |  Branch (124:76): [True: 0, False: 1.91k]
  ------------------
  125|      0|        return NULL; /* 'lh->error++' already done in 'expand' */
  126|       |
  127|  10.0k|    rn = getrn(lh, data, &hash);
  128|       |
  129|  10.0k|    if (*rn == NULL) {
  ------------------
  |  Branch (129:9): [True: 3.99k, False: 6.02k]
  ------------------
  130|  3.99k|        if ((nn = OPENSSL_malloc(sizeof(*nn))) == NULL) {
  ------------------
  |  |  107|  3.99k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (130:13): [True: 0, False: 3.99k]
  ------------------
  131|      0|            lh->error++;
  132|      0|            return NULL;
  133|      0|        }
  134|  3.99k|        nn->data = data;
  135|  3.99k|        nn->next = NULL;
  136|  3.99k|        nn->hash = hash;
  137|  3.99k|        *rn = nn;
  138|  3.99k|        ret = NULL;
  139|  3.99k|        lh->num_items++;
  140|  6.02k|    } else { /* replace same key */
  141|  6.02k|        ret = (*rn)->data;
  142|  6.02k|        (*rn)->data = data;
  143|  6.02k|    }
  144|  10.0k|    return ret;
  145|  10.0k|}
OPENSSL_LH_retrieve:
  173|  1.47M|{
  174|  1.47M|    unsigned long hash;
  175|  1.47M|    OPENSSL_LH_NODE **rn;
  176|       |
  177|  1.47M|    if (lh->error != 0)
  ------------------
  |  Branch (177:9): [True: 0, False: 1.47M]
  ------------------
  178|      0|        lh->error = 0;
  179|       |
  180|  1.47M|    rn = getrn(lh, data, &hash);
  181|       |
  182|  1.47M|    return *rn == NULL ? NULL : (*rn)->data;
  ------------------
  |  Branch (182:12): [True: 235k, False: 1.24M]
  ------------------
  183|  1.47M|}
OPENSSL_LH_doall:
  216|     46|{
  217|     46|    if (lh == NULL)
  ------------------
  |  Branch (217:9): [True: 0, False: 46]
  ------------------
  218|      0|        return;
  219|       |
  220|     46|    doall_util_fn(lh, 0, lh->daw, func, (OPENSSL_LH_DOALL_FUNCARG)NULL,
  221|     46|        (OPENSSL_LH_DOALL_FUNCARG_THUNK)NULL, NULL);
  222|     46|}
OPENSSL_LH_doall_arg_thunk:
  237|      2|{
  238|      2|    doall_util_fn(lh, 1, (OPENSSL_LH_DOALL_FUNC_THUNK)NULL,
  239|       |        (OPENSSL_LH_DOALL_FUNC)NULL, fn, daaw, arg);
  240|      2|}
OPENSSL_LH_strhash:
  360|  1.43M|{
  361|  1.43M|    unsigned long ret = 0;
  362|  1.43M|    long n;
  363|  1.43M|    unsigned long v;
  364|  1.43M|    int r;
  365|       |
  366|  1.43M|    if ((c == NULL) || (*c == '\0'))
  ------------------
  |  Branch (366:9): [True: 0, False: 1.43M]
  |  Branch (366:24): [True: 1.21M, False: 221k]
  ------------------
  367|  1.21M|        return ret;
  368|       |
  369|   221k|    n = 0x100;
  370|  2.38M|    while (*c) {
  ------------------
  |  Branch (370:12): [True: 2.16M, False: 221k]
  ------------------
  371|  2.16M|        v = n | (*c);
  372|  2.16M|        n += 0x100;
  373|  2.16M|        r = (int)((v >> 2) ^ v) & 0x0f;
  374|       |        /* cast to uint64_t to avoid 32 bit shift of 32 bit value */
  375|  2.16M|        ret = (ret << r) | (unsigned long)((uint64_t)ret >> (32 - r));
  376|  2.16M|        ret &= 0xFFFFFFFFL;
  377|  2.16M|        ret ^= v * v;
  378|  2.16M|        c++;
  379|  2.16M|    }
  380|   221k|    return (ret >> 16) ^ ret;
  381|  1.43M|}
ossl_lh_strcasehash:
  398|  48.8k|{
  399|  48.8k|    unsigned long ret = 0;
  400|  48.8k|    long n;
  401|  48.8k|    unsigned long v;
  402|  48.8k|    int r;
  403|       |#if defined(CHARSET_EBCDIC) && !defined(CHARSET_EBCDIC_TEST)
  404|       |    const long int case_adjust = ~0x40;
  405|       |#else
  406|  48.8k|    const long int case_adjust = ~0x20;
  407|  48.8k|#endif
  408|       |
  409|  48.8k|    if (c == NULL || *c == '\0')
  ------------------
  |  Branch (409:9): [True: 0, False: 48.8k]
  |  Branch (409:22): [True: 0, False: 48.8k]
  ------------------
  410|      0|        return ret;
  411|       |
  412|   546k|    for (n = 0x100; *c != '\0'; n += 0x100) {
  ------------------
  |  Branch (412:21): [True: 497k, False: 48.8k]
  ------------------
  413|   497k|        v = n | (case_adjust & *c);
  414|   497k|        r = (int)((v >> 2) ^ v) & 0x0f;
  415|       |        /* cast to uint64_t to avoid 32 bit shift of 32 bit value */
  416|   497k|        ret = (ret << r) | (unsigned long)((uint64_t)ret >> (32 - r));
  417|   497k|        ret &= 0xFFFFFFFFL;
  418|   497k|        ret ^= v * v;
  419|   497k|        c++;
  420|   497k|    }
  421|  48.8k|    return (ret >> 16) ^ ret;
  422|  48.8k|}
OPENSSL_LH_num_items:
  425|     46|{
  426|     46|    return lh ? lh->num_items : 0;
  ------------------
  |  Branch (426:12): [True: 46, False: 0]
  ------------------
  427|     46|}
OPENSSL_LH_get_down_load:
  430|  7.36k|{
  431|  7.36k|    return lh->down_load;
  432|  7.36k|}
OPENSSL_LH_set_down_load:
  435|  14.7k|{
  436|  14.7k|    lh->down_load = down_load;
  437|  14.7k|}
OPENSSL_LH_error:
  440|    592|{
  441|    592|    return lh->error;
  442|    592|}
lhash.c:doall_util_fn:
  191|     48|{
  192|     48|    int i;
  193|     48|    OPENSSL_LH_NODE *a, *n;
  194|       |
  195|     48|    if (lh == NULL)
  ------------------
  |  Branch (195:9): [True: 0, False: 48]
  ------------------
  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|    660|    for (i = lh->num_nodes - 1; i >= 0; i--) {
  ------------------
  |  Branch (202:33): [True: 612, False: 48]
  ------------------
  203|    612|        a = lh->b[i];
  204|  1.09k|        while (a != NULL) {
  ------------------
  |  Branch (204:16): [True: 484, False: 612]
  ------------------
  205|    484|            n = a->next;
  206|    484|            if (use_arg)
  ------------------
  |  Branch (206:17): [True: 484, False: 0]
  ------------------
  207|    484|                wfunc_arg(a->data, arg, func_arg);
  208|      0|            else
  209|      0|                wfunc(a->data, func);
  210|    484|            a = n;
  211|    484|        }
  212|    612|    }
  213|     48|}
lhash.c:expand:
  243|  1.91k|{
  244|  1.91k|    OPENSSL_LH_NODE **n, **n1, **n2, *np;
  245|  1.91k|    unsigned int p, pmax, nni, j;
  246|  1.91k|    unsigned long hash;
  247|       |
  248|  1.91k|    nni = lh->num_alloc_nodes;
  249|  1.91k|    p = lh->p;
  250|  1.91k|    pmax = lh->pmax;
  251|  1.91k|    if (p + 1 >= pmax) {
  ------------------
  |  Branch (251:9): [True: 18, False: 1.89k]
  ------------------
  252|     18|        j = nni * 2;
  253|     18|        n = OPENSSL_realloc_array(lh->b, j, sizeof(OPENSSL_LH_NODE *));
  ------------------
  |  |  125|     18|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  254|     18|        if (n == NULL) {
  ------------------
  |  Branch (254:13): [True: 0, False: 18]
  ------------------
  255|      0|            lh->error++;
  256|      0|            return 0;
  257|      0|        }
  258|     18|        lh->b = n;
  259|     18|        memset(n + nni, 0, sizeof(*n) * (j - nni));
  260|     18|        lh->pmax = nni;
  261|     18|        lh->num_alloc_nodes = j;
  262|     18|        lh->p = 0;
  263|  1.89k|    } else {
  264|  1.89k|        lh->p++;
  265|  1.89k|    }
  266|       |
  267|  1.91k|    lh->num_nodes++;
  268|  1.91k|    n1 = &(lh->b[p]);
  269|  1.91k|    n2 = &(lh->b[p + pmax]);
  270|  1.91k|    *n2 = NULL;
  271|       |
  272|  8.18k|    for (np = *n1; np != NULL;) {
  ------------------
  |  Branch (272:20): [True: 6.27k, False: 1.91k]
  ------------------
  273|  6.27k|        hash = np->hash;
  274|  6.27k|        if ((hash % nni) != p) { /* move it */
  ------------------
  |  Branch (274:13): [True: 1.10k, False: 5.16k]
  ------------------
  275|  1.10k|            *n1 = (*n1)->next;
  276|  1.10k|            np->next = *n2;
  277|  1.10k|            *n2 = np;
  278|  1.10k|        } else
  279|  5.16k|            n1 = &((*n1)->next);
  280|  6.27k|        np = *n1;
  281|  6.27k|    }
  282|       |
  283|  1.91k|    return 1;
  284|  1.91k|}
lhash.c:getrn:
  320|  1.48M|{
  321|  1.48M|    OPENSSL_LH_NODE **ret, *n1;
  322|  1.48M|    unsigned long hash, nn;
  323|       |
  324|  1.48M|    if (lh->hashw != NULL)
  ------------------
  |  Branch (324:9): [True: 1.48M, False: 0]
  ------------------
  325|  1.48M|        hash = lh->hashw(data, lh->hash);
  326|      0|    else
  327|      0|        hash = lh->hash(data);
  328|       |
  329|  1.48M|    *rhash = hash;
  330|       |
  331|  1.48M|    nn = hash % lh->pmax;
  332|  1.48M|    if (nn < lh->p)
  ------------------
  |  Branch (332:9): [True: 16.1k, False: 1.47M]
  ------------------
  333|  16.1k|        nn = hash % lh->num_alloc_nodes;
  334|       |
  335|  1.48M|    ret = &(lh->b[(int)nn]);
  336|  1.52M|    for (n1 = *ret; n1 != NULL; n1 = n1->next) {
  ------------------
  |  Branch (336:21): [True: 1.28M, False: 239k]
  ------------------
  337|  1.28M|        if (n1->hash != hash) {
  ------------------
  |  Branch (337:13): [True: 39.5k, False: 1.24M]
  ------------------
  338|  39.5k|            ret = &(n1->next);
  339|  39.5k|            continue;
  340|  39.5k|        }
  341|       |
  342|  1.24M|        if (lh->compw != NULL) {
  ------------------
  |  Branch (342:13): [True: 1.24M, False: 0]
  ------------------
  343|  1.24M|            if (lh->compw(n1->data, data, lh->comp) == 0)
  ------------------
  |  Branch (343:17): [True: 1.24M, False: 364]
  ------------------
  344|  1.24M|                break;
  345|  1.24M|        } else {
  346|      0|            if (lh->comp(n1->data, data) == 0)
  ------------------
  |  Branch (346:17): [True: 0, False: 0]
  ------------------
  347|      0|                break;
  348|      0|        }
  349|    364|        ret = &(n1->next);
  350|    364|    }
  351|  1.48M|    return ret;
  352|  1.48M|}

CRYPTO_malloc:
  190|  11.2M|{
  191|  11.2M|    void *ptr;
  192|       |
  193|  11.2M|    INCREMENT(malloc_count);
  194|  11.2M|    if (malloc_impl != CRYPTO_malloc) {
  ------------------
  |  Branch (194:9): [True: 0, False: 11.2M]
  ------------------
  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|  11.2M|    if (ossl_unlikely(num == 0))
  ------------------
  |  |   23|  11.2M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 11.2M]
  |  |  ------------------
  ------------------
  202|      0|        return NULL;
  203|       |
  204|  11.2M|    FAILTEST();
  205|  11.2M|    if (allow_customize) {
  ------------------
  |  Branch (205:9): [True: 2, False: 11.2M]
  ------------------
  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|      2|        allow_customize = 0;
  212|      2|    }
  213|       |
  214|  11.2M|    ptr = malloc(num);
  215|  11.2M|    if (ossl_likely(ptr != NULL))
  ------------------
  |  |   22|  11.2M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 11.2M, False: 0]
  |  |  ------------------
  ------------------
  216|  11.2M|        return ptr;
  217|      0|err:
  218|      0|    ossl_report_alloc_err(file, line);
  219|       |    return NULL;
  220|  11.2M|}
CRYPTO_zalloc:
  223|  7.82M|{
  224|  7.82M|    void *ret;
  225|       |
  226|  7.82M|    ret = CRYPTO_malloc(num, file, line);
  227|  7.82M|    if (ret != NULL)
  ------------------
  |  Branch (227:9): [True: 7.82M, False: 0]
  ------------------
  228|  7.82M|        memset(ret, 0, num);
  229|       |
  230|  7.82M|    return ret;
  231|  7.82M|}
CRYPTO_aligned_alloc:
  235|  18.3k|{
  236|  18.3k|    *freeptr = NULL;
  237|       |
  238|       |    /* Ensure that alignment is a power of two no larger than 65536 */
  239|  18.3k|    if (alignment == 0 || (alignment & (alignment - 1)) != 0
  ------------------
  |  Branch (239:9): [True: 0, False: 18.3k]
  |  Branch (239:27): [True: 0, False: 18.3k]
  ------------------
  240|  18.3k|        || alignment > 65536) {
  ------------------
  |  Branch (240:12): [True: 0, False: 18.3k]
  ------------------
  241|      0|        ossl_report_alloc_err_inv(file, line);
  242|      0|        return NULL;
  243|      0|    }
  244|       |
  245|       |    /* Allow non-malloc() allocations as long as no malloc_impl is provided. */
  246|  18.3k|    if (malloc_impl == CRYPTO_malloc) {
  ------------------
  |  Branch (246:9): [True: 18.3k, False: 0]
  ------------------
  247|  18.3k|#if defined(_BSD_SOURCE) || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L)
  248|  18.3k|        void *ret;
  249|       |
  250|       |        /* posix_memalign() requires alignment to be at least sizeof(void *) */
  251|  18.3k|        if (alignment < sizeof(void *))
  ------------------
  |  Branch (251:13): [True: 0, False: 18.3k]
  ------------------
  252|      0|            alignment = sizeof(void *);
  253|       |
  254|  18.3k|        if (posix_memalign(&ret, alignment, num) == 0) {
  ------------------
  |  Branch (254:13): [True: 18.3k, False: 0]
  ------------------
  255|  18.3k|            *freeptr = ret;
  256|  18.3k|            return ret;
  257|  18.3k|        }
  258|  18.3k|#endif
  259|  18.3k|    }
  260|       |
  261|      0|    return ossl_malloc_align(num, alignment, freeptr, file, line);
  262|  18.3k|}
CRYPTO_realloc:
  265|   621k|{
  266|   621k|    void *ret;
  267|       |
  268|   621k|    INCREMENT(realloc_count);
  269|   621k|    if (realloc_impl != CRYPTO_realloc) {
  ------------------
  |  Branch (269:9): [True: 0, False: 621k]
  ------------------
  270|      0|        ret = realloc_impl(str, num, file, line);
  271|       |
  272|      0|        if (num == 0 || ret != NULL)
  ------------------
  |  Branch (272:13): [True: 0, False: 0]
  |  Branch (272:25): [True: 0, False: 0]
  ------------------
  273|      0|            return ret;
  274|       |
  275|      0|        goto err;
  276|      0|    }
  277|       |
  278|   621k|    if (str == NULL)
  ------------------
  |  Branch (278:9): [True: 236k, False: 385k]
  ------------------
  279|   236k|        return CRYPTO_malloc(num, file, line);
  280|       |
  281|   385k|    if (num == 0) {
  ------------------
  |  Branch (281:9): [True: 0, False: 385k]
  ------------------
  282|      0|        CRYPTO_free(str, file, line);
  283|      0|        return NULL;
  284|      0|    }
  285|       |
  286|   385k|    FAILTEST();
  287|   385k|    ret = realloc(str, num);
  288|       |
  289|   385k|err:
  290|   385k|    if (num != 0 && ret == NULL)
  ------------------
  |  Branch (290:9): [True: 385k, False: 0]
  |  Branch (290:21): [True: 0, False: 385k]
  ------------------
  291|      0|        ossl_report_alloc_err(file, line);
  292|       |
  293|   385k|    return ret;
  294|   385k|}
CRYPTO_clear_realloc:
  298|   110k|{
  299|   110k|    void *ret = NULL;
  300|       |
  301|   110k|    if (str == NULL)
  ------------------
  |  Branch (301:9): [True: 44.3k, False: 65.9k]
  ------------------
  302|  44.3k|        return CRYPTO_malloc(num, file, line);
  303|       |
  304|  65.9k|    if (num == 0) {
  ------------------
  |  Branch (304:9): [True: 0, False: 65.9k]
  ------------------
  305|      0|        CRYPTO_clear_free(str, old_len, file, line);
  306|      0|        return NULL;
  307|      0|    }
  308|       |
  309|       |    /* Can't shrink the buffer since memcpy below copies |old_len| bytes. */
  310|  65.9k|    if (num < old_len) {
  ------------------
  |  Branch (310:9): [True: 0, False: 65.9k]
  ------------------
  311|      0|        OPENSSL_cleanse((char *)str + num, old_len - num);
  312|      0|        return str;
  313|      0|    }
  314|       |
  315|  65.9k|    ret = CRYPTO_malloc(num, file, line);
  316|  65.9k|    if (ret != NULL) {
  ------------------
  |  Branch (316:9): [True: 65.9k, False: 0]
  ------------------
  317|  65.9k|        memcpy(ret, str, old_len);
  318|  65.9k|        CRYPTO_clear_free(str, old_len, file, line);
  319|  65.9k|    }
  320|  65.9k|    return ret;
  321|  65.9k|}
CRYPTO_free:
  324|  22.7M|{
  325|  22.7M|    INCREMENT(free_count);
  326|  22.7M|    if (free_impl != CRYPTO_free) {
  ------------------
  |  Branch (326:9): [True: 0, False: 22.7M]
  ------------------
  327|      0|        free_impl(str, file, line);
  328|      0|        return;
  329|      0|    }
  330|       |
  331|  22.7M|    free(str);
  332|  22.7M|}
CRYPTO_clear_free:
  335|  2.26M|{
  336|  2.26M|    if (str == NULL)
  ------------------
  |  Branch (336:9): [True: 590k, False: 1.67M]
  ------------------
  337|   590k|        return;
  338|  1.67M|    if (num)
  ------------------
  |  Branch (338:9): [True: 1.67M, False: 0]
  ------------------
  339|  1.67M|        OPENSSL_cleanse(str, num);
  340|  1.67M|    CRYPTO_free(str, file, line);
  341|  1.67M|}

CRYPTO_secure_malloc:
  154|  3.63k|{
  155|  3.63k|#ifndef OPENSSL_NO_SECURE_MEMORY
  156|  3.63k|    void *ret = NULL;
  157|  3.63k|    size_t actual_size;
  158|  3.63k|    int reason = CRYPTO_R_SECURE_MALLOC_FAILURE;
  ------------------
  |  |   45|  3.63k|#define CRYPTO_R_SECURE_MALLOC_FAILURE 111
  ------------------
  159|       |
  160|  3.63k|    if (!secure_mem_initialized) {
  ------------------
  |  Branch (160:9): [True: 3.63k, False: 0]
  ------------------
  161|  3.63k|        return CRYPTO_malloc(num, file, line);
  162|  3.63k|    }
  163|      0|    if (!CRYPTO_THREAD_write_lock(sec_malloc_lock)) {
  ------------------
  |  Branch (163:9): [True: 0, False: 0]
  ------------------
  164|      0|        reason = ERR_R_CRYPTO_LIB;
  ------------------
  |  |  281|      0|#define ERR_R_CRYPTO_LIB (ERR_LIB_CRYPTO /* 15 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  |  |  ------------------
  |  |               #define ERR_R_CRYPTO_LIB (ERR_LIB_CRYPTO /* 15 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      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);
  ------------------
  |  |   68|      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|  25.6k|{
  185|  25.6k|#ifndef OPENSSL_NO_SECURE_MEMORY
  186|  25.6k|    if (secure_mem_initialized)
  ------------------
  |  Branch (186:9): [True: 0, False: 25.6k]
  ------------------
  187|       |        /* CRYPTO_secure_malloc() zeroes allocations when it is implemented */
  188|      0|        return CRYPTO_secure_malloc(num, file, line);
  189|  25.6k|#endif
  190|  25.6k|    return CRYPTO_zalloc(num, file, line);
  191|  25.6k|}
CRYPTO_secure_clear_free:
  218|  51.0k|{
  219|  51.0k|#ifndef OPENSSL_NO_SECURE_MEMORY
  220|  51.0k|    size_t actual_size;
  221|       |
  222|  51.0k|    if (ptr == NULL)
  ------------------
  |  Branch (222:9): [True: 21.7k, False: 29.2k]
  ------------------
  223|  21.7k|        return;
  224|  29.2k|    if (!CRYPTO_secure_allocated(ptr)) {
  ------------------
  |  Branch (224:9): [True: 29.2k, False: 0]
  ------------------
  225|  29.2k|        OPENSSL_cleanse(ptr, num);
  226|  29.2k|        CRYPTO_free(ptr, file, line);
  227|  29.2k|        return;
  228|  29.2k|    }
  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|  36.5k|{
  246|  36.5k|#ifndef OPENSSL_NO_SECURE_MEMORY
  247|  36.5k|    if (!secure_mem_initialized)
  ------------------
  |  Branch (247:9): [True: 36.5k, False: 0]
  ------------------
  248|  36.5k|        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|  36.5k|}

ossl_ml_kem_key_reset:
 1622|  7.25k|{
 1623|       |    /*
 1624|       |     * seedbuf can be allocated and contain |z| and |d| if the key is
 1625|       |     * being created from a private key encoding.  Similarly a pending
 1626|       |     * serialised (encoded) private key may be queued up to load.
 1627|       |     * Clear and free that data now.
 1628|       |     */
 1629|  7.25k|    if (key->seedbuf != NULL)
  ------------------
  |  Branch (1629:9): [True: 0, False: 7.25k]
  ------------------
 1630|      0|        OPENSSL_secure_clear_free(key->seedbuf, ML_KEM_SEED_BYTES);
  ------------------
  |  |  150|      0|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1631|  7.25k|    if (ossl_ml_kem_have_dkenc(key))
  ------------------
  |  |  210|  7.25k|#define ossl_ml_kem_have_dkenc(key) ((key)->encoded_dk != NULL)
  |  |  ------------------
  |  |  |  Branch (210:37): [True: 0, False: 7.25k]
  |  |  ------------------
  ------------------
 1632|      0|        OPENSSL_secure_clear_free(key->encoded_dk, key->vinfo->prvkey_bytes);
  ------------------
  |  |  150|      0|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1633|       |
 1634|       |    /*-
 1635|       |     * Cleanse any sensitive data:
 1636|       |     * - The private vector |s| is immediately followed by the FO failure
 1637|       |     *   secret |z|, and seed |d|, we can cleanse all three in one call.
 1638|       |     */
 1639|  7.25k|    if (key->t != NULL) {
  ------------------
  |  Branch (1639:9): [True: 7.25k, False: 0]
  ------------------
 1640|  7.25k|        if (ossl_ml_kem_have_prvkey(key))
  ------------------
  |  |  208|  7.25k|#define ossl_ml_kem_have_prvkey(key) ((key)->s != NULL)
  |  |  ------------------
  |  |  |  Branch (208:38): [True: 3.62k, False: 3.62k]
  |  |  ------------------
  ------------------
 1641|  3.62k|            OPENSSL_secure_clear_free(key->s, key->vinfo->prvalloc);
  ------------------
  |  |  150|  3.62k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1642|  7.25k|        OPENSSL_free(key->t);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1643|  7.25k|    }
 1644|       |    key->d = key->z = key->seedbuf = key->encoded_dk = (uint8_t *)(key->s = key->m = key->t = NULL);
 1645|  7.25k|}
ossl_ml_kem_get_vinfo:
 1656|  14.5k|{
 1657|  14.5k|    switch (evp_type) {
  ------------------
  |  Branch (1657:13): [True: 14.5k, False: 0]
  ------------------
 1658|      0|    case EVP_PKEY_ML_KEM_512:
  ------------------
  |  |   93|      0|#define EVP_PKEY_ML_KEM_512 NID_ML_KEM_512
  |  |  ------------------
  |  |  |  | 6640|      0|#define NID_ML_KEM_512          1454
  |  |  ------------------
  ------------------
  |  Branch (1658:5): [True: 0, False: 14.5k]
  ------------------
 1659|      0|        return &vinfo_map[ML_KEM_512_VINFO];
  ------------------
  |  |  177|      0|#define ML_KEM_512_VINFO 0
  ------------------
 1660|  14.5k|    case EVP_PKEY_ML_KEM_768:
  ------------------
  |  |  103|  14.5k|#define EVP_PKEY_ML_KEM_768 NID_ML_KEM_768
  |  |  ------------------
  |  |  |  | 6645|  14.5k|#define NID_ML_KEM_768          1455
  |  |  ------------------
  ------------------
  |  Branch (1660:5): [True: 14.5k, False: 0]
  ------------------
 1661|  14.5k|        return &vinfo_map[ML_KEM_768_VINFO];
  ------------------
  |  |  178|  14.5k|#define ML_KEM_768_VINFO 1
  ------------------
 1662|      0|    case EVP_PKEY_ML_KEM_1024:
  ------------------
  |  |  113|      0|#define EVP_PKEY_ML_KEM_1024 NID_ML_KEM_1024
  |  |  ------------------
  |  |  |  | 6650|      0|#define NID_ML_KEM_1024         1456
  |  |  ------------------
  ------------------
  |  Branch (1662:5): [True: 0, False: 14.5k]
  ------------------
 1663|      0|        return &vinfo_map[ML_KEM_1024_VINFO];
  ------------------
  |  |  179|      0|#define ML_KEM_1024_VINFO 2
  ------------------
 1664|  14.5k|    }
 1665|      0|    return NULL;
 1666|  14.5k|}
ossl_ml_kem_key_new:
 1670|  7.25k|{
 1671|  7.25k|    const ML_KEM_VINFO *vinfo = ossl_ml_kem_get_vinfo(evp_type);
 1672|  7.25k|    ML_KEM_KEY *key;
 1673|       |
 1674|  7.25k|    if (vinfo == NULL) {
  ------------------
  |  Branch (1674:9): [True: 0, False: 7.25k]
  ------------------
 1675|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  311|      0|#define ERR_R_PASSED_INVALID_ARGUMENT (262 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|      0|            "unsupported ML-KEM key type: %d", evp_type);
 1677|      0|        return NULL;
 1678|      0|    }
 1679|       |
 1680|  7.25k|    if ((key = OPENSSL_malloc(sizeof(*key))) == NULL)
  ------------------
  |  |  107|  7.25k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (1680:9): [True: 0, False: 7.25k]
  ------------------
 1681|      0|        return NULL;
 1682|       |
 1683|  7.25k|    key->vinfo = vinfo;
 1684|  7.25k|    key->libctx = libctx;
 1685|  7.25k|    key->prov_flags = ML_KEM_KEY_PROV_FLAGS_DEFAULT;
  ------------------
  |  |  132|  7.25k|    (ML_KEM_KEY_RANDOM_PCT | ML_KEM_KEY_PREFER_SEED | ML_KEM_KEY_RETAIN_SEED)
  |  |  ------------------
  |  |  |  |  123|  7.25k|#define ML_KEM_KEY_RANDOM_PCT (1 << 0)
  |  |  ------------------
  |  |                   (ML_KEM_KEY_RANDOM_PCT | ML_KEM_KEY_PREFER_SEED | ML_KEM_KEY_RETAIN_SEED)
  |  |  ------------------
  |  |  |  |  125|  7.25k|#define ML_KEM_KEY_PREFER_SEED (1 << 2)
  |  |  ------------------
  |  |                   (ML_KEM_KEY_RANDOM_PCT | ML_KEM_KEY_PREFER_SEED | ML_KEM_KEY_RETAIN_SEED)
  |  |  ------------------
  |  |  |  |  126|  7.25k|#define ML_KEM_KEY_RETAIN_SEED (1 << 3)
  |  |  ------------------
  ------------------
 1686|  7.25k|    key->shake128_md = EVP_MD_fetch(libctx, "SHAKE128", properties);
 1687|  7.25k|    key->shake256_md = EVP_MD_fetch(libctx, "SHAKE256", properties);
 1688|  7.25k|    key->sha3_256_md = EVP_MD_fetch(libctx, "SHA3-256", properties);
 1689|  7.25k|    key->sha3_512_md = EVP_MD_fetch(libctx, "SHA3-512", properties);
 1690|  7.25k|    key->d = key->z = key->rho = key->pkhash = key->encoded_dk = key->seedbuf = NULL;
 1691|  7.25k|    key->s = key->m = key->t = NULL;
 1692|       |
 1693|  7.25k|    if (key->shake128_md != NULL
  ------------------
  |  Branch (1693:9): [True: 7.25k, False: 0]
  ------------------
 1694|  7.25k|        && key->shake256_md != NULL
  ------------------
  |  Branch (1694:12): [True: 7.25k, False: 0]
  ------------------
 1695|  7.25k|        && key->sha3_256_md != NULL
  ------------------
  |  Branch (1695:12): [True: 7.25k, False: 0]
  ------------------
 1696|  7.25k|        && key->sha3_512_md != NULL)
  ------------------
  |  Branch (1696:12): [True: 7.25k, False: 0]
  ------------------
 1697|  7.25k|        return key;
 1698|       |
 1699|      0|    ossl_ml_kem_key_free(key);
 1700|      0|    ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                  ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                  ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1701|      0|        "missing SHA3 digest algorithms while creating %s key",
 1702|      0|        vinfo->algorithm_name);
 1703|       |    return NULL;
 1704|  7.25k|}
ossl_ml_kem_key_free:
 1769|  7.25k|{
 1770|  7.25k|    if (key == NULL)
  ------------------
  |  Branch (1770:9): [True: 0, False: 7.25k]
  ------------------
 1771|      0|        return;
 1772|       |
 1773|  7.25k|    EVP_MD_free(key->shake128_md);
 1774|  7.25k|    EVP_MD_free(key->shake256_md);
 1775|  7.25k|    EVP_MD_free(key->sha3_256_md);
 1776|  7.25k|    EVP_MD_free(key->sha3_512_md);
 1777|       |
 1778|  7.25k|    ossl_ml_kem_key_reset(key);
 1779|  7.25k|    OPENSSL_free(key);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1780|  7.25k|}
ossl_ml_kem_encode_public_key:
 1785|  3.62k|{
 1786|  3.62k|    if (!ossl_ml_kem_have_pubkey(key)
  ------------------
  |  |  207|  7.25k|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  ------------------
  |  Branch (1786:9): [True: 0, False: 3.62k]
  ------------------
 1787|  3.62k|        || len != key->vinfo->pubkey_bytes)
  ------------------
  |  Branch (1787:12): [True: 0, False: 3.62k]
  ------------------
 1788|      0|        return 0;
 1789|  3.62k|    encode_pubkey(out, key);
 1790|  3.62k|    return 1;
 1791|  3.62k|}
ossl_ml_kem_parse_public_key:
 1848|  3.62k|{
 1849|  3.62k|    EVP_MD_CTX *mdctx = NULL;
 1850|  3.62k|    const ML_KEM_VINFO *vinfo;
 1851|  3.62k|    int ret = 0;
 1852|       |
 1853|       |    /* Keys with key material are immutable */
 1854|  3.62k|    if (key == NULL
  ------------------
  |  Branch (1854:9): [True: 0, False: 3.62k]
  ------------------
 1855|  3.62k|        || ossl_ml_kem_have_pubkey(key)
  ------------------
  |  |  207|  7.25k|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  |  |  ------------------
  |  |  |  Branch (207:38): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
 1856|  3.62k|        || ossl_ml_kem_have_dkenc(key))
  ------------------
  |  |  210|  3.62k|#define ossl_ml_kem_have_dkenc(key) ((key)->encoded_dk != NULL)
  |  |  ------------------
  |  |  |  Branch (210:37): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
 1857|      0|        return 0;
 1858|  3.62k|    vinfo = key->vinfo;
 1859|       |
 1860|  3.62k|    if (len != vinfo->pubkey_bytes
  ------------------
  |  Branch (1860:9): [True: 0, False: 3.62k]
  ------------------
 1861|  3.62k|        || (mdctx = EVP_MD_CTX_new()) == NULL)
  ------------------
  |  Branch (1861:12): [True: 0, False: 3.62k]
  ------------------
 1862|      0|        return 0;
 1863|       |
 1864|  3.62k|    if (add_storage(OPENSSL_malloc(vinfo->puballoc), NULL, 0, 0, key))
  ------------------
  |  |  107|  3.62k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (1864:9): [True: 3.62k, False: 0]
  ------------------
 1865|  3.62k|        ret = parse_pubkey(in, mdctx, key);
 1866|       |
 1867|  3.62k|    if (!ret)
  ------------------
  |  Branch (1867:9): [True: 0, False: 3.62k]
  ------------------
 1868|      0|        ossl_ml_kem_key_reset(key);
 1869|  3.62k|    EVP_MD_CTX_free(mdctx);
 1870|  3.62k|    return ret;
 1871|  3.62k|}
ossl_ml_kem_genkey:
 1910|  3.62k|{
 1911|  3.62k|    uint8_t seed[ML_KEM_SEED_BYTES];
 1912|  3.62k|    EVP_MD_CTX *mdctx = NULL;
 1913|  3.62k|    const ML_KEM_VINFO *vinfo;
 1914|  3.62k|    int ret = 0;
 1915|       |
 1916|  3.62k|    if (key == NULL
  ------------------
  |  Branch (1916:9): [True: 0, False: 3.62k]
  ------------------
 1917|  3.62k|        || ossl_ml_kem_have_pubkey(key)
  ------------------
  |  |  207|  7.25k|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  |  |  ------------------
  |  |  |  Branch (207:38): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
 1918|  3.62k|        || ossl_ml_kem_have_dkenc(key))
  ------------------
  |  |  210|  3.62k|#define ossl_ml_kem_have_dkenc(key) ((key)->encoded_dk != NULL)
  |  |  ------------------
  |  |  |  Branch (210:37): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
 1919|      0|        return 0;
 1920|  3.62k|    vinfo = key->vinfo;
 1921|       |
 1922|  3.62k|    if (pubenc != NULL && publen != vinfo->pubkey_bytes)
  ------------------
  |  Branch (1922:9): [True: 0, False: 3.62k]
  |  Branch (1922:27): [True: 0, False: 0]
  ------------------
 1923|      0|        return 0;
 1924|       |
 1925|  3.62k|    if (key->seedbuf != NULL) {
  ------------------
  |  Branch (1925:9): [True: 0, False: 3.62k]
  ------------------
 1926|      0|        if (!ossl_ml_kem_encode_seed(seed, sizeof(seed), key))
  ------------------
  |  Branch (1926:13): [True: 0, False: 0]
  ------------------
 1927|      0|            return 0;
 1928|      0|        ossl_ml_kem_key_reset(key);
 1929|  3.62k|    } else if (RAND_priv_bytes_ex(key->libctx, seed, sizeof(seed),
  ------------------
  |  Branch (1929:16): [True: 0, False: 3.62k]
  ------------------
 1930|  3.62k|                   key->vinfo->secbits)
 1931|  3.62k|        <= 0) {
 1932|      0|        return 0;
 1933|      0|    }
 1934|       |
 1935|  3.62k|    if ((mdctx = EVP_MD_CTX_new()) == NULL)
  ------------------
  |  Branch (1935:9): [True: 0, False: 3.62k]
  ------------------
 1936|      0|        return 0;
 1937|       |
 1938|       |    /*
 1939|       |     * Data derived from (d, z) defaults secret, and to avoid side-channel
 1940|       |     * leaks should not influence control flow.
 1941|       |     */
 1942|  3.62k|    CONSTTIME_SECRET(seed, ML_KEM_SEED_BYTES);
 1943|       |
 1944|  3.62k|    if (add_storage(OPENSSL_malloc(vinfo->puballoc),
  ------------------
  |  |  107|  3.62k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (1944:9): [True: 3.62k, False: 0]
  ------------------
 1945|  3.62k|            OPENSSL_secure_malloc(vinfo->prvalloc), 1, 0, key))
  ------------------
  |  |  140|  3.62k|    CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1946|  3.62k|        ret = genkey(seed, mdctx, pubenc, key);
 1947|  3.62k|    OPENSSL_cleanse(seed, sizeof(seed));
 1948|       |
 1949|       |    /* Declassify secret inputs and derived outputs before returning control */
 1950|  3.62k|    CONSTTIME_DECLASSIFY(seed, ML_KEM_SEED_BYTES);
 1951|       |
 1952|  3.62k|    EVP_MD_CTX_free(mdctx);
 1953|  3.62k|    if (!ret) {
  ------------------
  |  Branch (1953:9): [True: 0, False: 3.62k]
  ------------------
 1954|       |        /* Erase any partial public key output */
 1955|      0|        if (pubenc != NULL)
  ------------------
  |  Branch (1955:13): [True: 0, False: 0]
  ------------------
 1956|      0|            OPENSSL_cleanse(pubenc, vinfo->pubkey_bytes);
 1957|      0|        ossl_ml_kem_key_reset(key);
 1958|      0|        return 0;
 1959|      0|    }
 1960|       |
 1961|       |    /* The public components are already declassified */
 1962|  3.62k|    CONSTTIME_DECLASSIFY(key->s, vinfo->rank * sizeof(scalar));
 1963|  3.62k|    CONSTTIME_DECLASSIFY(key->z, 2 * ML_KEM_RANDOM_BYTES);
 1964|  3.62k|    return 1;
 1965|  3.62k|}
ossl_ml_kem_encap_seed:
 1975|  3.62k|{
 1976|  3.62k|    const ML_KEM_VINFO *vinfo;
 1977|  3.62k|    EVP_MD_CTX *mdctx;
 1978|  3.62k|    int ret = 0;
 1979|       |
 1980|  3.62k|    if (key == NULL || !ossl_ml_kem_have_pubkey(key))
  ------------------
  |  |  207|  3.62k|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  ------------------
  |  Branch (1980:9): [True: 0, False: 3.62k]
  |  Branch (1980:24): [True: 0, False: 3.62k]
  ------------------
 1981|      0|        return 0;
 1982|  3.62k|    vinfo = key->vinfo;
 1983|       |
 1984|  3.62k|    if (ctext == NULL || clen != vinfo->ctext_bytes
  ------------------
  |  Branch (1984:9): [True: 0, False: 3.62k]
  |  Branch (1984:26): [True: 0, False: 3.62k]
  ------------------
 1985|  3.62k|        || shared_secret == NULL || slen != ML_KEM_SHARED_SECRET_BYTES
  ------------------
  |  |   51|  7.25k|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
  |  Branch (1985:12): [True: 0, False: 3.62k]
  |  Branch (1985:37): [True: 0, False: 3.62k]
  ------------------
 1986|  3.62k|        || entropy == NULL || elen != ML_KEM_RANDOM_BYTES
  ------------------
  |  |   47|  7.25k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  |  Branch (1986:12): [True: 0, False: 3.62k]
  |  Branch (1986:31): [True: 0, False: 3.62k]
  ------------------
 1987|  3.62k|        || (mdctx = EVP_MD_CTX_new()) == NULL)
  ------------------
  |  Branch (1987:12): [True: 0, False: 3.62k]
  ------------------
 1988|      0|        return 0;
 1989|       |    /*
 1990|       |     * Data derived from the encap entropy defaults secret, and to avoid
 1991|       |     * side-channel leaks should not influence control flow.
 1992|       |     */
 1993|  3.62k|    CONSTTIME_SECRET(entropy, elen);
 1994|       |
 1995|       |    /*-
 1996|       |     * This avoids the need to handle allocation failures for two (max 2KB
 1997|       |     * each) vectors, that are never retained on return from this function.
 1998|       |     * We stack-allocate these.
 1999|       |     */
 2000|  3.62k|#define case_encap_seed(bits)                                        \
 2001|  3.62k|    {                                                                \
 2002|  3.62k|        scalar tmp[2 * ML_KEM_##bits##_RANK];                        \
 2003|  3.62k|                                                                     \
 2004|  3.62k|        ret = encap(ctext, shared_secret, entropy, tmp, mdctx, key); \
 2005|  3.62k|        OPENSSL_cleanse((void *)tmp, sizeof(tmp));                   \
 2006|  3.62k|    }
 2007|  3.62k|    switch (vinfo->evp_type) {
  ------------------
  |  Branch (2007:13): [True: 3.62k, False: 0]
  ------------------
 2008|      0|    case EVP_PKEY_ML_KEM_512:
  ------------------
  |  |   93|      0|#define EVP_PKEY_ML_KEM_512 NID_ML_KEM_512
  |  |  ------------------
  |  |  |  | 6640|      0|#define NID_ML_KEM_512          1454
  |  |  ------------------
  ------------------
  |  Branch (2008:5): [True: 0, False: 3.62k]
  ------------------
 2009|      0|        case_encap_seed(512);
  ------------------
  |  | 2001|      0|    {                                                                \
  |  | 2002|      0|        scalar tmp[2 * ML_KEM_##bits##_RANK];                        \
  |  | 2003|      0|                                                                     \
  |  | 2004|      0|        ret = encap(ctext, shared_secret, entropy, tmp, mdctx, key); \
  |  | 2005|      0|        OPENSSL_cleanse((void *)tmp, sizeof(tmp));                   \
  |  | 2006|      0|    }
  ------------------
 2010|      0|        break;
 2011|  3.62k|    case EVP_PKEY_ML_KEM_768:
  ------------------
  |  |  103|  3.62k|#define EVP_PKEY_ML_KEM_768 NID_ML_KEM_768
  |  |  ------------------
  |  |  |  | 6645|  3.62k|#define NID_ML_KEM_768          1455
  |  |  ------------------
  ------------------
  |  Branch (2011:5): [True: 3.62k, False: 0]
  ------------------
 2012|  3.62k|        case_encap_seed(768);
  ------------------
  |  | 2001|  3.62k|    {                                                                \
  |  | 2002|  3.62k|        scalar tmp[2 * ML_KEM_##bits##_RANK];                        \
  |  | 2003|  3.62k|                                                                     \
  |  | 2004|  3.62k|        ret = encap(ctext, shared_secret, entropy, tmp, mdctx, key); \
  |  | 2005|  3.62k|        OPENSSL_cleanse((void *)tmp, sizeof(tmp));                   \
  |  | 2006|  3.62k|    }
  ------------------
 2013|  3.62k|        break;
 2014|      0|    case EVP_PKEY_ML_KEM_1024:
  ------------------
  |  |  113|      0|#define EVP_PKEY_ML_KEM_1024 NID_ML_KEM_1024
  |  |  ------------------
  |  |  |  | 6650|      0|#define NID_ML_KEM_1024         1456
  |  |  ------------------
  ------------------
  |  Branch (2014:5): [True: 0, False: 3.62k]
  ------------------
 2015|      0|        case_encap_seed(1024);
  ------------------
  |  | 2001|      0|    {                                                                \
  |  | 2002|      0|        scalar tmp[2 * ML_KEM_##bits##_RANK];                        \
  |  | 2003|      0|                                                                     \
  |  | 2004|      0|        ret = encap(ctext, shared_secret, entropy, tmp, mdctx, key); \
  |  | 2005|      0|        OPENSSL_cleanse((void *)tmp, sizeof(tmp));                   \
  |  | 2006|      0|    }
  ------------------
 2016|      0|        break;
 2017|  3.62k|    }
 2018|  3.62k|#undef case_encap_seed
 2019|       |
 2020|       |    /* Erase any partial ciphertext output on failure */
 2021|  3.62k|    if (!ret)
  ------------------
  |  Branch (2021:9): [True: 0, False: 3.62k]
  ------------------
 2022|      0|        OPENSSL_cleanse(ctext, clen);
 2023|       |
 2024|       |    /* Declassify secret inputs and derived outputs before returning control */
 2025|  3.62k|    CONSTTIME_DECLASSIFY(entropy, elen);
 2026|  3.62k|    CONSTTIME_DECLASSIFY(ctext, clen);
 2027|  3.62k|    CONSTTIME_DECLASSIFY(shared_secret, slen);
 2028|       |
 2029|  3.62k|    EVP_MD_CTX_free(mdctx);
 2030|  3.62k|    return ret;
 2031|  3.62k|}
ossl_ml_kem_encap_rand:
 2036|  3.62k|{
 2037|  3.62k|    uint8_t r[ML_KEM_RANDOM_BYTES];
 2038|  3.62k|    int ret;
 2039|       |
 2040|  3.62k|    if (key == NULL)
  ------------------
  |  Branch (2040:9): [True: 0, False: 3.62k]
  ------------------
 2041|      0|        return 0;
 2042|       |
 2043|  3.62k|    if (RAND_bytes_ex(key->libctx, r, ML_KEM_RANDOM_BYTES,
  ------------------
  |  |   47|  3.62k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  |  Branch (2043:9): [True: 0, False: 3.62k]
  ------------------
 2044|  3.62k|            key->vinfo->secbits)
 2045|  3.62k|        < 1)
 2046|      0|        return 0;
 2047|       |
 2048|  3.62k|    ret = ossl_ml_kem_encap_seed(ctext, clen, shared_secret, slen,
 2049|  3.62k|        r, sizeof(r), key);
 2050|       |
 2051|  3.62k|    OPENSSL_cleanse((void *)r, sizeof(r));
 2052|  3.62k|    return ret;
 2053|  3.62k|}
ossl_ml_kem_decap:
 2058|  3.62k|{
 2059|  3.62k|    const ML_KEM_VINFO *vinfo;
 2060|  3.62k|    EVP_MD_CTX *mdctx;
 2061|  3.62k|    int ret = 0;
 2062|       |#if defined(OPENSSL_CONSTANT_TIME_VALIDATION)
 2063|       |    int classify_bytes = 2 * sizeof(scalar) + ML_KEM_RANDOM_BYTES;
 2064|       |#endif
 2065|       |
 2066|       |    /* Need a private key here */
 2067|  3.62k|    if (!ossl_ml_kem_have_prvkey(key)
  ------------------
  |  |  208|  7.25k|#define ossl_ml_kem_have_prvkey(key) ((key)->s != NULL)
  ------------------
  |  Branch (2067:9): [True: 0, False: 3.62k]
  ------------------
 2068|  3.62k|        || shared_secret == NULL
  ------------------
  |  Branch (2068:12): [True: 0, False: 3.62k]
  ------------------
 2069|  3.62k|        || slen < ML_KEM_SHARED_SECRET_BYTES)
  ------------------
  |  |   51|  3.62k|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
  |  Branch (2069:12): [True: 0, False: 3.62k]
  ------------------
 2070|      0|        return 0;
 2071|  3.62k|    vinfo = key->vinfo;
 2072|       |
 2073|  3.62k|    if (slen != ML_KEM_SHARED_SECRET_BYTES
  ------------------
  |  |   51|  7.25k|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
  |  Branch (2073:9): [True: 0, False: 3.62k]
  ------------------
 2074|  3.62k|        || ctext == NULL || clen != vinfo->ctext_bytes
  ------------------
  |  Branch (2074:12): [True: 0, False: 3.62k]
  |  Branch (2074:29): [True: 0, False: 3.62k]
  ------------------
 2075|  3.62k|        || (mdctx = EVP_MD_CTX_new()) == NULL) {
  ------------------
  |  Branch (2075:12): [True: 0, False: 3.62k]
  ------------------
 2076|      0|        (void)RAND_bytes_ex(key->libctx, shared_secret,
 2077|      0|            ML_KEM_SHARED_SECRET_BYTES, vinfo->secbits);
  ------------------
  |  |   51|      0|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
 2078|      0|        return 0;
 2079|      0|    }
 2080|       |    /*
 2081|       |     * Data derived from |s| and |z| defaults secret, and to avoid side-channel
 2082|       |     * leaks should not influence control flow.
 2083|       |     */
 2084|  3.62k|    CONSTTIME_SECRET(key->s, classify_bytes);
 2085|       |
 2086|       |    /*-
 2087|       |     * This avoids the need to handle allocation failures for two (max 2KB
 2088|       |     * each) vectors and an encoded ciphertext (max 1568 bytes), that are never
 2089|       |     * retained on return from this function.
 2090|       |     * We stack-allocate these.
 2091|       |     */
 2092|  3.62k|#define case_decap(bits)                                          \
 2093|  3.62k|    {                                                             \
 2094|  3.62k|        uint8_t cbuf[CTEXT_BYTES(bits)];                          \
 2095|  3.62k|        scalar tmp[2 * ML_KEM_##bits##_RANK];                     \
 2096|  3.62k|                                                                  \
 2097|  3.62k|        ret = decap(shared_secret, ctext, cbuf, tmp, mdctx, key); \
 2098|  3.62k|        OPENSSL_cleanse((void *)tmp, sizeof(tmp));                \
 2099|  3.62k|        OPENSSL_cleanse((void *)cbuf, sizeof(cbuf));              \
 2100|  3.62k|    }
 2101|  3.62k|    switch (vinfo->evp_type) {
  ------------------
  |  Branch (2101:13): [True: 3.62k, False: 0]
  ------------------
 2102|      0|    case EVP_PKEY_ML_KEM_512:
  ------------------
  |  |   93|      0|#define EVP_PKEY_ML_KEM_512 NID_ML_KEM_512
  |  |  ------------------
  |  |  |  | 6640|      0|#define NID_ML_KEM_512          1454
  |  |  ------------------
  ------------------
  |  Branch (2102:5): [True: 0, False: 3.62k]
  ------------------
 2103|      0|        case_decap(512);
  ------------------
  |  | 2093|      0|    {                                                             \
  |  | 2094|      0|        uint8_t cbuf[CTEXT_BYTES(bits)];                          \
  |  | 2095|      0|        scalar tmp[2 * ML_KEM_##bits##_RANK];                     \
  |  | 2096|      0|                                                                  \
  |  | 2097|      0|        ret = decap(shared_secret, ctext, cbuf, tmp, mdctx, key); \
  |  | 2098|      0|        OPENSSL_cleanse((void *)tmp, sizeof(tmp));                \
  |  | 2099|      0|        OPENSSL_cleanse((void *)cbuf, sizeof(cbuf));              \
  |  | 2100|      0|    }
  ------------------
 2104|      0|        break;
 2105|  3.62k|    case EVP_PKEY_ML_KEM_768:
  ------------------
  |  |  103|  3.62k|#define EVP_PKEY_ML_KEM_768 NID_ML_KEM_768
  |  |  ------------------
  |  |  |  | 6645|  3.62k|#define NID_ML_KEM_768          1455
  |  |  ------------------
  ------------------
  |  Branch (2105:5): [True: 3.62k, False: 0]
  ------------------
 2106|  3.62k|        case_decap(768);
  ------------------
  |  | 2093|  3.62k|    {                                                             \
  |  | 2094|  3.62k|        uint8_t cbuf[CTEXT_BYTES(bits)];                          \
  |  | 2095|  3.62k|        scalar tmp[2 * ML_KEM_##bits##_RANK];                     \
  |  | 2096|  3.62k|                                                                  \
  |  | 2097|  3.62k|        ret = decap(shared_secret, ctext, cbuf, tmp, mdctx, key); \
  |  | 2098|  3.62k|        OPENSSL_cleanse((void *)tmp, sizeof(tmp));                \
  |  | 2099|  3.62k|        OPENSSL_cleanse((void *)cbuf, sizeof(cbuf));              \
  |  | 2100|  3.62k|    }
  ------------------
 2107|  3.62k|        break;
 2108|      0|    case EVP_PKEY_ML_KEM_1024:
  ------------------
  |  |  113|      0|#define EVP_PKEY_ML_KEM_1024 NID_ML_KEM_1024
  |  |  ------------------
  |  |  |  | 6650|      0|#define NID_ML_KEM_1024         1456
  |  |  ------------------
  ------------------
  |  Branch (2108:5): [True: 0, False: 3.62k]
  ------------------
 2109|      0|        case_decap(1024);
  ------------------
  |  | 2093|      0|    {                                                             \
  |  | 2094|      0|        uint8_t cbuf[CTEXT_BYTES(bits)];                          \
  |  | 2095|      0|        scalar tmp[2 * ML_KEM_##bits##_RANK];                     \
  |  | 2096|      0|                                                                  \
  |  | 2097|      0|        ret = decap(shared_secret, ctext, cbuf, tmp, mdctx, key); \
  |  | 2098|      0|        OPENSSL_cleanse((void *)tmp, sizeof(tmp));                \
  |  | 2099|      0|        OPENSSL_cleanse((void *)cbuf, sizeof(cbuf));              \
  |  | 2100|      0|    }
  ------------------
 2110|      0|        break;
 2111|  3.62k|    }
 2112|  3.62k|#undef case_decap
 2113|       |
 2114|       |    /* Declassify secret inputs and derived outputs before returning control */
 2115|  3.62k|    CONSTTIME_DECLASSIFY(key->s, classify_bytes);
 2116|  3.62k|    CONSTTIME_DECLASSIFY(shared_secret, slen);
 2117|  3.62k|    EVP_MD_CTX_free(mdctx);
 2118|       |
 2119|  3.62k|    return ret;
 2120|  3.62k|}
ml_kem.c:add_storage:
 1579|  7.25k|{
 1580|  7.25k|    int rank = key->vinfo->rank;
 1581|       |
 1582|  7.25k|    if (pub == NULL || (private && priv == NULL)) {
  ------------------
  |  Branch (1582:9): [True: 0, False: 7.25k]
  |  Branch (1582:25): [True: 3.62k, False: 3.62k]
  |  Branch (1582:36): [True: 0, False: 3.62k]
  ------------------
 1583|       |        /*
 1584|       |         * One of these could be allocated correctly. It is legal to call free with a NULL
 1585|       |         * pointer, so always attempt to free both allocations here
 1586|       |         */
 1587|      0|        OPENSSL_free(pub);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1588|      0|        OPENSSL_secure_free(priv);
  ------------------
  |  |  148|      0|    CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1589|      0|        return 0;
 1590|      0|    }
 1591|       |
 1592|       |    /*
 1593|       |     * We're adding key material, set up rho and pkhash to point to the
 1594|       |     * rho_pkhash buffer.  Zero the key hash when creating fresh keys.
 1595|       |     */
 1596|  7.25k|    if (dup == 0)
  ------------------
  |  Branch (1596:9): [True: 7.25k, False: 0]
  ------------------
 1597|  7.25k|        memset(key->rho_pkhash, 0, sizeof(key->rho_pkhash));
 1598|  7.25k|    key->rho = key->rho_pkhash;
 1599|  7.25k|    key->pkhash = key->rho_pkhash + ML_KEM_RANDOM_BYTES;
  ------------------
  |  |   47|  7.25k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1600|  7.25k|    key->d = key->z = NULL;
 1601|       |
 1602|       |    /* A public key needs space for |t| and |m| */
 1603|  7.25k|    key->m = (key->t = pub) + rank;
 1604|       |
 1605|       |    /*
 1606|       |     * A private key also needs space for |s| and |z|.
 1607|       |     * The |z| buffer always includes additional space for |d|, but a key's |d|
 1608|       |     * pointer is left NULL when parsed from the NIST format, which omits that
 1609|       |     * information.  Only keys generated from a (d, z) seed pair will have a
 1610|       |     * non-NULL |d| pointer.
 1611|       |     */
 1612|  7.25k|    if (private)
  ------------------
  |  Branch (1612:9): [True: 3.62k, False: 3.62k]
  ------------------
 1613|  3.62k|        key->z = (uint8_t *)(rank + (key->s = priv));
 1614|  7.25k|    return 1;
 1615|  7.25k|}
ml_kem.c:encode_pubkey:
 1265|  3.62k|{
 1266|  3.62k|    const uint8_t *rho = key->rho;
 1267|  3.62k|    const ML_KEM_VINFO *vinfo = key->vinfo;
 1268|       |
 1269|  3.62k|    vector_encode(out, key->t, 12, vinfo->rank);
 1270|  3.62k|    memcpy(out + vinfo->vector_bytes, rho, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  3.62k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1271|  3.62k|}
ml_kem.c:vector_encode:
  885|  10.8k|{
  886|  10.8k|    int stride = bits * DEGREE / 8;
  ------------------
  |  |   41|  10.8k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  10.8k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  887|       |
  888|  43.5k|    for (; rank-- > 0; out += stride)
  ------------------
  |  Branch (888:12): [True: 32.6k, False: 10.8k]
  ------------------
  889|  32.6k|        scalar_encode(out, a++, bits);
  890|  10.8k|}
ml_kem.c:scalar_encode:
  637|  50.8k|{
  638|  50.8k|    const uint16_t *curr = s->c, *end = curr + DEGREE;
  ------------------
  |  |   41|  50.8k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  50.8k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  639|  50.8k|    uint64_t accum = 0, element;
  640|  50.8k|    int used = 0;
  641|       |
  642|  13.0M|    do {
  643|  13.0M|        element = *curr++;
  644|  13.0M|        if (used + bits < 64) {
  ------------------
  |  Branch (644:13): [True: 10.9M, False: 2.03M]
  ------------------
  645|  10.9M|            accum |= element << used;
  646|  10.9M|            used += bits;
  647|  10.9M|        } else if (used + bits > 64) {
  ------------------
  |  Branch (647:20): [True: 1.39M, False: 638k]
  ------------------
  648|  1.39M|            out = OPENSSL_store_u64_le(out, accum | (element << used));
  649|  1.39M|            accum = element >> (64 - used);
  650|  1.39M|            used = (used + bits) - 64;
  651|  1.39M|        } else {
  652|   638k|            out = OPENSSL_store_u64_le(out, accum | (element << used));
  653|   638k|            accum = 0;
  654|   638k|            used = 0;
  655|   638k|        }
  656|  13.0M|    } while (curr < end);
  ------------------
  |  Branch (656:14): [True: 12.9M, False: 50.8k]
  ------------------
  657|  50.8k|}
ml_kem.c:parse_pubkey:
 1301|  3.62k|{
 1302|  3.62k|    const ML_KEM_VINFO *vinfo = key->vinfo;
 1303|       |
 1304|       |    /* Decode and check |t| */
 1305|  3.62k|    if (!vector_decode_12(key->t, in, vinfo->rank)) {
  ------------------
  |  Branch (1305:9): [True: 0, False: 3.62k]
  ------------------
 1306|      0|        ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_KEY,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_KEY,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_KEY,
  ------------------
  |  |   76|      0|#define PROV_R_INVALID_KEY 158
  ------------------
 1307|      0|            "%s invalid public 't' vector",
 1308|      0|            vinfo->algorithm_name);
 1309|      0|        return 0;
 1310|      0|    }
 1311|       |    /* Save the matrix |m| recovery seed |rho| */
 1312|  3.62k|    memcpy(key->rho, in + vinfo->vector_bytes, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  3.62k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1313|       |    /*
 1314|       |     * Pre-compute the public key hash, needed for both encap and decap.
 1315|       |     * Also pre-compute the matrix expansion, stored with the public key.
 1316|       |     */
 1317|  3.62k|    if (!hash_h(key->pkhash, in, vinfo->pubkey_bytes, mdctx, key)
  ------------------
  |  Branch (1317:9): [True: 0, False: 3.62k]
  ------------------
 1318|  3.62k|        || !matrix_expand(mdctx, key)) {
  ------------------
  |  Branch (1318:12): [True: 0, False: 3.62k]
  ------------------
 1319|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1320|      0|            "internal error while parsing %s public key",
 1321|      0|            vinfo->algorithm_name);
 1322|      0|        return 0;
 1323|      0|    }
 1324|  3.62k|    return 1;
 1325|  3.62k|}
ml_kem.c:vector_decode_12:
  915|  3.62k|{
  916|  3.62k|    int stride = 3 * DEGREE / 2;
  ------------------
  |  |   41|  3.62k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  3.62k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  917|       |
  918|  14.5k|    for (; rank-- > 0; in += stride)
  ------------------
  |  Branch (918:12): [True: 10.8k, False: 3.62k]
  ------------------
  919|  10.8k|        if (!scalar_decode_12(out++, in))
  ------------------
  |  Branch (919:13): [True: 0, False: 10.8k]
  ------------------
  920|      0|            return 0;
  921|  3.62k|    return 1;
  922|  3.62k|}
ml_kem.c:scalar_decode_12:
  730|  10.8k|{
  731|  10.8k|    int i;
  732|  10.8k|    uint16_t *c = out->c;
  733|       |
  734|  1.40M|    for (i = 0; i < DEGREE / 2; ++i) {
  ------------------
  |  |   41|  1.40M|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  1.40M|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  |  Branch (734:17): [True: 1.39M, False: 10.8k]
  ------------------
  735|  1.39M|        uint8_t b1 = *in++;
  736|  1.39M|        uint8_t b2 = *in++;
  737|  1.39M|        uint8_t b3 = *in++;
  738|  1.39M|        int outOfRange1 = (*c++ = b1 | ((b2 & 0x0f) << 8)) >= kPrime;
  739|  1.39M|        int outOfRange2 = (*c++ = (b2 >> 4) | (b3 << 4)) >= kPrime;
  740|       |
  741|  1.39M|        if (outOfRange1 | outOfRange2)
  ------------------
  |  Branch (741:13): [True: 0, False: 1.39M]
  ------------------
  742|      0|            return 0;
  743|  1.39M|    }
  744|  10.8k|    return 1;
  745|  10.8k|}
ml_kem.c:hash_h:
  364|  3.62k|{
  365|  3.62k|    return EVP_DigestInit_ex(mdctx, key->sha3_256_md, NULL)
  ------------------
  |  Branch (365:12): [True: 3.62k, False: 0]
  ------------------
  366|  3.62k|        && single_keccak(out, ML_KEM_PKHASH_BYTES, in, len, mdctx);
  ------------------
  |  |   50|  3.62k|#define ML_KEM_PKHASH_BYTES 32 /* Salts the shared-secret */
  ------------------
  |  Branch (366:12): [True: 3.62k, False: 0]
  ------------------
  367|  3.62k|}
ml_kem.c:single_keccak:
  336|  83.4k|{
  337|  83.4k|    unsigned int sz = (unsigned int)outlen;
  338|       |
  339|  83.4k|    if (!EVP_DigestUpdate(mdctx, in, inlen))
  ------------------
  |  Branch (339:9): [True: 0, False: 83.4k]
  ------------------
  340|      0|        return 0;
  341|  83.4k|    if (EVP_MD_xof(EVP_MD_CTX_get0_md(mdctx)))
  ------------------
  |  Branch (341:9): [True: 72.5k, False: 10.8k]
  ------------------
  342|  72.5k|        return EVP_DigestFinalXOF(mdctx, out, outlen);
  343|  10.8k|    return EVP_DigestFinal_ex(mdctx, out, &sz)
  ------------------
  |  Branch (343:12): [True: 10.8k, False: 0]
  ------------------
  344|  10.8k|        && ossl_assert((size_t)sz == outlen);
  ------------------
  |  |   52|  10.8k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:24): [True: 10.8k, False: 0]
  |  |  ------------------
  |  |   53|  10.8k|    __FILE__, __LINE__)
  ------------------
  345|  83.4k|}
ml_kem.c:matrix_expand:
  981|  7.25k|{
  982|  7.25k|    scalar *out = key->m;
  983|  7.25k|    uint8_t input[ML_KEM_RANDOM_BYTES + 2];
  984|  7.25k|    int rank = key->vinfo->rank;
  985|  7.25k|    int i, j;
  986|       |
  987|       |    /*
  988|       |     * The seeds derived below and the sampling buffers in sample_scalar()
  989|       |     * are not cleansed: per FIPS 203 section 3.3 the matrix A is easily
  990|       |     * computed from the public encapsulation key and does not require any
  991|       |     * special protections.
  992|       |     */
  993|  7.25k|    memcpy(input, key->rho, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  7.25k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  994|  29.0k|    for (i = 0; i < rank; i++) {
  ------------------
  |  Branch (994:17): [True: 21.7k, False: 7.25k]
  ------------------
  995|  87.0k|        for (j = 0; j < rank; j++) {
  ------------------
  |  Branch (995:21): [True: 65.3k, False: 21.7k]
  ------------------
  996|  65.3k|            input[ML_KEM_RANDOM_BYTES] = i;
  ------------------
  |  |   47|  65.3k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  997|  65.3k|            input[ML_KEM_RANDOM_BYTES + 1] = j;
  ------------------
  |  |   47|  65.3k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  998|  65.3k|            if (!EVP_DigestInit_ex(mdctx, key->shake128_md, NULL)
  ------------------
  |  Branch (998:17): [True: 0, False: 65.3k]
  ------------------
  999|  65.3k|                || !EVP_DigestUpdate(mdctx, input, sizeof(input))
  ------------------
  |  Branch (999:20): [True: 0, False: 65.3k]
  ------------------
 1000|  65.3k|                || !sample_scalar(out++, mdctx))
  ------------------
  |  Branch (1000:20): [True: 0, False: 65.3k]
  ------------------
 1001|      0|                return 0;
 1002|  65.3k|        }
 1003|  21.7k|    }
 1004|  7.25k|    return 1;
 1005|  7.25k|}
ml_kem.c:sample_scalar:
  431|  65.3k|{
  432|  65.3k|    uint16_t *curr = out->c, *endout = curr + DEGREE;
  ------------------
  |  |   41|  65.3k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  65.3k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  433|  65.3k|    uint8_t buf[SCALAR_SAMPLING_BUFSIZE], *in;
  434|  65.3k|    uint8_t *endin = buf + sizeof(buf);
  435|  65.3k|    uint16_t d;
  436|  65.3k|    uint8_t b1, b2, b3;
  437|       |
  438|   196k|    do {
  439|   196k|        if (!EVP_DigestSqueeze(mdctx, in = buf, sizeof(buf)))
  ------------------
  |  Branch (439:13): [True: 0, False: 196k]
  ------------------
  440|      0|            return 0;
  441|  10.3M|        do {
  442|  10.3M|            b1 = *in++;
  443|  10.3M|            b2 = *in++;
  444|  10.3M|            b3 = *in++;
  445|       |
  446|  10.3M|            if (curr >= endout)
  ------------------
  |  Branch (446:17): [True: 32.4k, False: 10.3M]
  ------------------
  447|  32.4k|                break;
  448|  10.3M|            if ((d = ((b2 & 0x0f) << 8) + b1) < kPrime)
  ------------------
  |  Branch (448:17): [True: 8.37M, False: 1.93M]
  ------------------
  449|  8.37M|                *curr++ = d;
  450|  10.3M|            if (curr >= endout)
  ------------------
  |  Branch (450:17): [True: 32.6k, False: 10.2M]
  ------------------
  451|  32.6k|                break;
  452|  10.2M|            if ((d = (b3 << 4) + (b2 >> 4)) < kPrime)
  ------------------
  |  Branch (452:17): [True: 8.34M, False: 1.92M]
  ------------------
  453|  8.34M|                *curr++ = d;
  454|  10.2M|        } while (in < endin);
  ------------------
  |  Branch (454:18): [True: 10.1M, False: 131k]
  ------------------
  455|   196k|    } while (curr < endout);
  ------------------
  |  Branch (455:14): [True: 131k, False: 65.3k]
  ------------------
  456|  65.3k|    return 1;
  457|  65.3k|}
ml_kem.c:genkey:
 1390|  3.62k|{
 1391|  3.62k|    uint8_t hashed[2 * ML_KEM_RANDOM_BYTES];
 1392|  3.62k|    const uint8_t *const sigma = hashed + ML_KEM_RANDOM_BYTES;
  ------------------
  |  |   47|  3.62k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1393|  3.62k|    uint8_t augmented_seed[ML_KEM_RANDOM_BYTES + 1];
 1394|  3.62k|    const ML_KEM_VINFO *vinfo = key->vinfo;
 1395|  3.62k|    CBD_FUNC cbd_1 = CBD1(vinfo->evp_type);
  ------------------
  |  | 1158|  3.62k|#define CBD1(evp_type) ((evp_type) == EVP_PKEY_ML_KEM_512 ? cbd_3 : cbd_2)
  |  |  ------------------
  |  |  |  |   93|  3.62k|#define EVP_PKEY_ML_KEM_512 NID_ML_KEM_512
  |  |  |  |  ------------------
  |  |  |  |  |  | 6640|  3.62k|#define NID_ML_KEM_512          1454
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (1158:25): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
 1396|  3.62k|    int rank = vinfo->rank;
 1397|  3.62k|    uint8_t counter = 0;
 1398|  3.62k|    int ret = 0;
 1399|       |
 1400|       |    /*
 1401|       |     * Use the "d" seed salted with the rank to derive the public and private
 1402|       |     * seeds rho and sigma.
 1403|       |     */
 1404|  3.62k|    memcpy(augmented_seed, seed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  3.62k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1405|  3.62k|    augmented_seed[ML_KEM_RANDOM_BYTES] = (uint8_t)rank;
  ------------------
  |  |   47|  3.62k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1406|  3.62k|    if (!hash_g(hashed, augmented_seed, sizeof(augmented_seed), mdctx, key))
  ------------------
  |  Branch (1406:9): [True: 0, False: 3.62k]
  ------------------
 1407|      0|        goto end;
 1408|  3.62k|    memcpy(key->rho, hashed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  3.62k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1409|       |    /* The |rho| matrix seed is public */
 1410|  3.62k|    CONSTTIME_DECLASSIFY(key->rho, ML_KEM_RANDOM_BYTES);
 1411|       |
 1412|       |    /* FIPS 203 |e| vector is initial value of key->t */
 1413|  3.62k|    if (!matrix_expand(mdctx, key)
  ------------------
  |  Branch (1413:9): [True: 0, False: 3.62k]
  ------------------
 1414|  3.62k|        || !gencbd_vector_ntt(key->s, cbd_1, &counter, sigma, rank, mdctx, key)
  ------------------
  |  Branch (1414:12): [True: 0, False: 3.62k]
  ------------------
 1415|  3.62k|        || !gencbd_vector_ntt(key->t, cbd_1, &counter, sigma, rank, mdctx, key))
  ------------------
  |  Branch (1415:12): [True: 0, False: 3.62k]
  ------------------
 1416|      0|        goto end;
 1417|       |
 1418|       |    /* To |e| we now add the product of transpose |m| and |s|, giving |t|. */
 1419|  3.62k|    matrix_mult_transpose_add(key->t, key->m, key->s, rank);
 1420|       |    /* The |t| vector is public */
 1421|  3.62k|    CONSTTIME_DECLASSIFY(key->t, vinfo->rank * sizeof(scalar));
 1422|       |
 1423|  3.62k|    if (pubenc == NULL) {
  ------------------
  |  Branch (1423:9): [True: 3.62k, False: 0]
  ------------------
 1424|       |        /* Incremental digest of public key without in-full serialisation. */
 1425|  3.62k|        if (!hash_h_pubkey(key->pkhash, mdctx, key))
  ------------------
  |  Branch (1425:13): [True: 0, False: 3.62k]
  ------------------
 1426|      0|            goto end;
 1427|  3.62k|    } else {
 1428|      0|        encode_pubkey(pubenc, key);
 1429|      0|        if (!hash_h(key->pkhash, pubenc, vinfo->pubkey_bytes, mdctx, key))
  ------------------
  |  Branch (1429:13): [True: 0, False: 0]
  ------------------
 1430|      0|            goto end;
 1431|      0|    }
 1432|       |
 1433|       |    /* Save |z| portion of seed for "implicit rejection" on failure. */
 1434|  3.62k|    memcpy(key->z, seed + ML_KEM_RANDOM_BYTES, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  3.62k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
                  memcpy(key->z, seed + ML_KEM_RANDOM_BYTES, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  3.62k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1435|       |
 1436|       |    /* Save the |d| portion of the seed */
 1437|  3.62k|    key->d = key->z + ML_KEM_RANDOM_BYTES;
  ------------------
  |  |   47|  3.62k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1438|  3.62k|    memcpy(key->d, seed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  3.62k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1439|       |
 1440|  3.62k|    ret = 1;
 1441|  3.62k|end:
 1442|  3.62k|    OPENSSL_cleanse((void *)augmented_seed, sizeof(augmented_seed));
 1443|  3.62k|    OPENSSL_cleanse((void *)hashed, sizeof(hashed));
 1444|  3.62k|    if (ret == 0) {
  ------------------
  |  Branch (1444:9): [True: 0, False: 3.62k]
  ------------------
 1445|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1446|      0|            "internal error while generating %s private key",
 1447|      0|            vinfo->algorithm_name);
 1448|      0|    }
 1449|  3.62k|    return ret;
 1450|  3.62k|}
ml_kem.c:prf:
  353|  72.5k|{
  354|  72.5k|    return EVP_DigestInit_ex(mdctx, key->shake256_md, NULL)
  ------------------
  |  Branch (354:12): [True: 72.5k, False: 0]
  ------------------
  355|  72.5k|        && single_keccak(out, len, in, ML_KEM_RANDOM_BYTES + 1, mdctx);
  ------------------
  |  |   47|  72.5k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  |  Branch (355:12): [True: 72.5k, False: 0]
  ------------------
  356|  72.5k|}
ml_kem.c:cbd_2:
 1017|  72.5k|{
 1018|  72.5k|    uint16_t *curr = out->c, *end = curr + DEGREE;
  ------------------
  |  |   41|  72.5k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  72.5k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
 1019|  72.5k|    uint8_t randbuf[4 * DEGREE / 8], *r = randbuf; /* 64 * eta slots */
 1020|  72.5k|    uint16_t value, mask;
 1021|  72.5k|    uint8_t b;
 1022|       |
 1023|  72.5k|    if (!prf(randbuf, sizeof(randbuf), in, mdctx, key)) {
  ------------------
  |  Branch (1023:9): [True: 0, False: 72.5k]
  ------------------
 1024|      0|        OPENSSL_cleanse((void *)randbuf, sizeof(randbuf));
 1025|      0|        return 0;
 1026|      0|    }
 1027|       |
 1028|  9.29M|    do {
 1029|  9.29M|        b = *r++;
 1030|       |
 1031|       |        /*
 1032|       |         * Add |kPrime| if |value| underflowed.  See |constish_time_non_zero|
 1033|       |         * for a discussion on why the value barrier is by default omitted.
 1034|       |         * While this could have been written reduce_once(value + kPrime), this
 1035|       |         * is one extra addition and small range of |value| tempts some
 1036|       |         * versions of Clang to emit a branch.
 1037|       |         */
 1038|  9.29M|        value = bit0(b) + bitn(1, b);
  ------------------
  |  |   34|  9.29M|#define bit0(b) ((b) & 1)
  ------------------
                      value = bit0(b) + bitn(1, b);
  ------------------
  |  |   35|  9.29M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1039|  9.29M|        value -= bitn(2, b) + bitn(3, b);
  ------------------
  |  |   35|  9.29M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value -= bitn(2, b) + bitn(3, b);
  ------------------
  |  |   35|  9.29M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1040|  9.29M|        mask = constish_time_non_zero(value >> 15);
  ------------------
  |  |   70|  9.29M|#define constish_time_non_zero(b) (0u - (b))
  ------------------
 1041|  9.29M|        *curr++ = value + (kPrime & mask);
 1042|       |
 1043|  9.29M|        value = bitn(4, b) + bitn(5, b);
  ------------------
  |  |   35|  9.29M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value = bitn(4, b) + bitn(5, b);
  ------------------
  |  |   35|  9.29M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1044|  9.29M|        value -= bitn(6, b) + bitn(7, b);
  ------------------
  |  |   35|  9.29M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value -= bitn(6, b) + bitn(7, b);
  ------------------
  |  |   35|  9.29M|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1045|  9.29M|        mask = constish_time_non_zero(value >> 15);
  ------------------
  |  |   70|  9.29M|#define constish_time_non_zero(b) (0u - (b))
  ------------------
 1046|  9.29M|        *curr++ = value + (kPrime & mask);
 1047|  9.29M|    } while (curr < end);
  ------------------
  |  Branch (1047:14): [True: 9.21M, False: 72.5k]
  ------------------
 1048|       |
 1049|  72.5k|    OPENSSL_cleanse((void *)randbuf, sizeof(randbuf));
 1050|  72.5k|    return 1;
 1051|  72.5k|}
ml_kem.c:hash_g:
  402|  7.25k|{
  403|  7.25k|    return EVP_DigestInit_ex(mdctx, key->sha3_512_md, NULL)
  ------------------
  |  Branch (403:12): [True: 7.25k, False: 0]
  ------------------
  404|  7.25k|        && single_keccak(out, ML_KEM_SEED_BYTES, in, len, mdctx);
  ------------------
  |  |   48|  7.25k|#define ML_KEM_SEED_BYTES (ML_KEM_RANDOM_BYTES * 2) /* Keygen (d, z) */
  |  |  ------------------
  |  |  |  |   47|  7.25k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  |  |  ------------------
  ------------------
  |  Branch (404:12): [True: 7.25k, False: 0]
  ------------------
  405|  7.25k|}
ml_kem.c:gencbd_vector_ntt:
 1139|  14.5k|{
 1140|  14.5k|    uint8_t input[ML_KEM_RANDOM_BYTES + 1];
 1141|  14.5k|    int ret = 0;
 1142|       |
 1143|  14.5k|    memcpy(input, seed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  14.5k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1144|  43.5k|    do {
 1145|  43.5k|        input[ML_KEM_RANDOM_BYTES] = (*counter)++;
  ------------------
  |  |   47|  43.5k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1146|  43.5k|        if (!cbd(out, input, mdctx, key))
  ------------------
  |  Branch (1146:13): [True: 0, False: 43.5k]
  ------------------
 1147|      0|            goto end;
 1148|  43.5k|        scalar_ntt(out++);
 1149|  43.5k|    } while (--rank > 0);
  ------------------
  |  Branch (1149:14): [True: 29.0k, False: 14.5k]
  ------------------
 1150|  14.5k|    ret = 1;
 1151|       |
 1152|  14.5k|end:
 1153|  14.5k|    OPENSSL_cleanse((void *)input, sizeof(input));
 1154|  14.5k|    return ret;
 1155|  14.5k|}
ml_kem.c:scalar_ntt:
  510|  54.4k|{
  511|  54.4k|    const uint16_t *roots = kNTTRoots;
  512|  54.4k|    uint16_t *end = s->c + DEGREE;
  ------------------
  |  |   41|  54.4k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  54.4k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  513|  54.4k|    int offset = DEGREE / 2;
  ------------------
  |  |   41|  54.4k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  54.4k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  514|       |
  515|   381k|    do {
  516|   381k|        uint16_t *curr = s->c, *peer;
  517|       |
  518|  6.91M|        do {
  519|  6.91M|            uint16_t *pause = curr + offset, even, odd;
  520|  6.91M|            uint32_t zeta = *++roots;
  521|       |
  522|  6.91M|            peer = pause;
  523|  48.7M|            do {
  524|  48.7M|                even = *curr;
  525|  48.7M|                odd = reduce(*peer * zeta);
  526|  48.7M|                *peer++ = reduce_once(even - odd + kPrime);
  527|  48.7M|                *curr++ = reduce_once(odd + even);
  528|  48.7M|            } while (curr < pause);
  ------------------
  |  Branch (528:22): [True: 41.8M, False: 6.91M]
  ------------------
  529|  6.91M|        } while ((curr = peer) < end);
  ------------------
  |  Branch (529:18): [True: 6.53M, False: 381k]
  ------------------
  530|   381k|    } while ((offset >>= 1) >= 2);
  ------------------
  |  Branch (530:14): [True: 326k, False: 54.4k]
  ------------------
  531|  54.4k|}
ml_kem.c:reduce:
  481|   136M|{
  482|   136M|    uint64_t product = (uint64_t)x * kBarrettMultiplier;
  483|   136M|    uint32_t quotient = (uint32_t)(product >> kBarrettShift);
  484|   136M|    uint32_t remainder = x - quotient * kPrime;
  485|       |
  486|   136M|    return reduce_once(remainder);
  487|   136M|}
ml_kem.c:reduce_once:
  467|   273M|{
  468|   273M|    const uint16_t subtracted = x - kPrime;
  469|   273M|    uint16_t mask = constish_time_non_zero(subtracted >> 15);
  ------------------
  |  |   70|   273M|#define constish_time_non_zero(b) (0u - (b))
  ------------------
  470|       |
  471|   273M|    return (mask & x) | (~mask & subtracted);
  472|   273M|}
ml_kem.c:matrix_mult_transpose_add:
  962|  3.62k|{
  963|  3.62k|    const scalar *mc = m, *mr, *ar;
  964|  3.62k|    int i, j;
  965|       |
  966|  14.5k|    for (i = rank; i-- > 0; ++out) {
  ------------------
  |  Branch (966:20): [True: 10.8k, False: 3.62k]
  ------------------
  967|  10.8k|        scalar_mult_add(out, mr = mc++, ar = a);
  968|  32.6k|        for (j = rank; --j > 0;)
  ------------------
  |  Branch (968:24): [True: 21.7k, False: 10.8k]
  ------------------
  969|  21.7k|            scalar_mult_add(out, (mr += rank), ++ar);
  970|  10.8k|    }
  971|  3.62k|}
ml_kem.c:scalar_mult_add:
  615|  97.9k|{
  616|  97.9k|    uint16_t *curr = out->c, *end = curr + DEGREE;
  ------------------
  |  |   41|  97.9k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  97.9k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  617|  97.9k|    const uint16_t *lc = lhs->c, *rc = rhs->c;
  618|  97.9k|    const uint16_t *roots = kModRoots;
  619|       |
  620|  12.5M|    do {
  621|  12.5M|        uint32_t l0 = *lc++, r0 = *rc++;
  622|  12.5M|        uint32_t l1 = *lc++, r1 = *rc++;
  623|  12.5M|        uint16_t *c0 = curr++;
  624|  12.5M|        uint16_t *c1 = curr++;
  625|  12.5M|        uint32_t zetapow = *roots++;
  626|       |
  627|  12.5M|        *c0 = reduce(*c0 + l0 * r0 + reduce(l1 * r1) * zetapow);
  628|  12.5M|        *c1 = reduce(*c1 + l0 * r1 + l1 * r0);
  629|  12.5M|    } while (curr < end);
  ------------------
  |  Branch (629:14): [True: 12.4M, False: 97.9k]
  ------------------
  630|  97.9k|}
ml_kem.c:hash_h_pubkey:
  373|  3.62k|{
  374|  3.62k|    const ML_KEM_VINFO *vinfo = key->vinfo;
  375|  3.62k|    const scalar *t = key->t, *end = t + vinfo->rank;
  376|  3.62k|    unsigned int sz;
  377|       |
  378|  3.62k|    if (!EVP_DigestInit_ex(mdctx, key->sha3_256_md, NULL))
  ------------------
  |  Branch (378:9): [True: 0, False: 3.62k]
  ------------------
  379|      0|        return 0;
  380|       |
  381|  10.8k|    do {
  382|  10.8k|        uint8_t buf[3 * DEGREE / 2];
  383|       |
  384|  10.8k|        scalar_encode(buf, t++, 12);
  385|  10.8k|        if (!EVP_DigestUpdate(mdctx, buf, sizeof(buf)))
  ------------------
  |  Branch (385:13): [True: 0, False: 10.8k]
  ------------------
  386|      0|            return 0;
  387|  10.8k|    } while (t < end);
  ------------------
  |  Branch (387:14): [True: 7.25k, False: 3.62k]
  ------------------
  388|       |
  389|  3.62k|    if (!EVP_DigestUpdate(mdctx, key->rho, ML_KEM_RANDOM_BYTES))
  ------------------
  |  |   47|  3.62k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  |  Branch (389:9): [True: 0, False: 3.62k]
  ------------------
  390|      0|        return 0;
  391|  3.62k|    return EVP_DigestFinal_ex(mdctx, pkhash, &sz)
  ------------------
  |  Branch (391:12): [True: 3.62k, False: 0]
  ------------------
  392|  3.62k|        && ossl_assert(sz == ML_KEM_PKHASH_BYTES);
  ------------------
  |  |   52|  3.62k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:24): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |   53|  3.62k|    __FILE__, __LINE__)
  ------------------
  393|  3.62k|}
ml_kem.c:encap:
 1463|  3.62k|{
 1464|  3.62k|    uint8_t input[ML_KEM_RANDOM_BYTES + ML_KEM_PKHASH_BYTES];
 1465|  3.62k|    uint8_t Kr[ML_KEM_SHARED_SECRET_BYTES + ML_KEM_RANDOM_BYTES];
 1466|  3.62k|    uint8_t *r = Kr + ML_KEM_SHARED_SECRET_BYTES;
  ------------------
  |  |   51|  3.62k|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
 1467|  3.62k|    int ret;
 1468|       |
 1469|  3.62k|    memcpy(input, entropy, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  3.62k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1470|  3.62k|    memcpy(input + ML_KEM_RANDOM_BYTES, key->pkhash, ML_KEM_PKHASH_BYTES);
  ------------------
  |  |   47|  3.62k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
                  memcpy(input + ML_KEM_RANDOM_BYTES, key->pkhash, ML_KEM_PKHASH_BYTES);
  ------------------
  |  |   50|  3.62k|#define ML_KEM_PKHASH_BYTES 32 /* Salts the shared-secret */
  ------------------
 1471|  3.62k|    ret = hash_g(Kr, input, sizeof(input), mdctx, key)
  ------------------
  |  Branch (1471:11): [True: 3.62k, False: 0]
  ------------------
 1472|  3.62k|        && encrypt_cpa(ctext, entropy, r, tmp, mdctx, key);
  ------------------
  |  Branch (1472:12): [True: 3.62k, False: 0]
  ------------------
 1473|  3.62k|    OPENSSL_cleanse((void *)input, sizeof(input));
 1474|       |
 1475|  3.62k|    if (ret)
  ------------------
  |  Branch (1475:9): [True: 3.62k, False: 0]
  ------------------
 1476|  3.62k|        memcpy(secret, Kr, ML_KEM_SHARED_SECRET_BYTES);
  ------------------
  |  |   51|  3.62k|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
 1477|      0|    else
 1478|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      0|            "internal error while performing %s encapsulation",
 1480|      0|            key->vinfo->algorithm_name);
 1481|  3.62k|    OPENSSL_cleanse((void *)Kr, sizeof(Kr));
 1482|  3.62k|    return ret;
 1483|  3.62k|}
ml_kem.c:encrypt_cpa:
 1180|  7.25k|{
 1181|  7.25k|    const ML_KEM_VINFO *vinfo = key->vinfo;
 1182|  7.25k|    CBD_FUNC cbd_1 = CBD1(vinfo->evp_type);
  ------------------
  |  | 1158|  7.25k|#define CBD1(evp_type) ((evp_type) == EVP_PKEY_ML_KEM_512 ? cbd_3 : cbd_2)
  |  |  ------------------
  |  |  |  |   93|  7.25k|#define EVP_PKEY_ML_KEM_512 NID_ML_KEM_512
  |  |  |  |  ------------------
  |  |  |  |  |  | 6640|  7.25k|#define NID_ML_KEM_512          1454
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (1158:25): [True: 0, False: 7.25k]
  |  |  ------------------
  ------------------
 1183|  7.25k|    int rank = vinfo->rank;
 1184|       |    /* We can use tmp[0..rank-1] as storage for |y|, then |e1|, ... */
 1185|  7.25k|    scalar *y = &tmp[0], *e1 = y, *e2 = y;
 1186|       |    /* We can use tmp[rank]..tmp[2*rank - 1] for |u| */
 1187|  7.25k|    scalar *u = &tmp[rank];
 1188|  7.25k|    scalar v;
 1189|  7.25k|    uint8_t input[ML_KEM_RANDOM_BYTES + 1];
 1190|  7.25k|    uint8_t counter = 0;
 1191|  7.25k|    int du = vinfo->du;
 1192|  7.25k|    int dv = vinfo->dv;
 1193|  7.25k|    int ret = 0;
 1194|       |
 1195|       |    /* FIPS 203 "y" vector */
 1196|  7.25k|    if (!gencbd_vector_ntt(y, cbd_1, &counter, r, rank, mdctx, key))
  ------------------
  |  Branch (1196:9): [True: 0, False: 7.25k]
  ------------------
 1197|      0|        goto end;
 1198|       |    /* FIPS 203 "v" scalar */
 1199|  7.25k|    inner_product(&v, key->t, y, rank);
 1200|  7.25k|    scalar_inverse_ntt(&v);
 1201|       |    /* FIPS 203 "u" vector */
 1202|  7.25k|    matrix_mult_intt(u, key->m, y, rank);
 1203|       |
 1204|       |    /* All done with |y|, now free to reuse tmp[0] for FIPS 203 |e1| */
 1205|  7.25k|    if (!gencbd_vector(e1, cbd_2, &counter, r, rank, mdctx, key))
  ------------------
  |  Branch (1205:9): [True: 0, False: 7.25k]
  ------------------
 1206|      0|        goto end;
 1207|  7.25k|    vector_add(u, e1, rank);
 1208|  7.25k|    vector_compress(u, du, rank);
 1209|  7.25k|    vector_encode(out, u, du, rank);
 1210|       |
 1211|       |    /* All done with |e1|, now free to reuse tmp[0] for FIPS 203 |e2| */
 1212|  7.25k|    memcpy(input, r, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  7.25k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1213|  7.25k|    input[ML_KEM_RANDOM_BYTES] = counter;
  ------------------
  |  |   47|  7.25k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1214|  7.25k|    if (!cbd_2(e2, input, mdctx, key))
  ------------------
  |  Branch (1214:9): [True: 0, False: 7.25k]
  ------------------
 1215|      0|        goto end;
 1216|  7.25k|    scalar_add(&v, e2);
 1217|       |
 1218|       |    /* Combine message with |v| */
 1219|  7.25k|    scalar_decode_decompress_add(&v, message);
 1220|  7.25k|    scalar_compress(&v, dv);
 1221|  7.25k|    scalar_encode(out + vinfo->u_vector_bytes, &v, dv);
 1222|  7.25k|    ret = 1;
 1223|       |
 1224|  7.25k|end:
 1225|  7.25k|    OPENSSL_cleanse((void *)input, sizeof(input));
 1226|  7.25k|    OPENSSL_cleanse((void *)&v, sizeof(v));
 1227|  7.25k|    return ret;
 1228|  7.25k|}
ml_kem.c:inner_product:
  935|  10.8k|{
  936|  10.8k|    scalar_mult(out, lhs, rhs);
  937|  32.6k|    while (--rank > 0)
  ------------------
  |  Branch (937:12): [True: 21.7k, False: 10.8k]
  ------------------
  938|  21.7k|        scalar_mult_add(out, ++lhs, ++rhs);
  939|  10.8k|}
ml_kem.c:scalar_mult:
  597|  32.6k|{
  598|  32.6k|    uint16_t *curr = out->c, *end = curr + DEGREE;
  ------------------
  |  |   41|  32.6k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  32.6k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  599|  32.6k|    const uint16_t *lc = lhs->c, *rc = rhs->c;
  600|  32.6k|    const uint16_t *roots = kModRoots;
  601|       |
  602|  4.18M|    do {
  603|  4.18M|        uint32_t l0 = *lc++, r0 = *rc++;
  604|  4.18M|        uint32_t l1 = *lc++, r1 = *rc++;
  605|  4.18M|        uint32_t zetapow = *roots++;
  606|       |
  607|  4.18M|        *curr++ = reduce(l0 * r0 + reduce(l1 * r1) * zetapow);
  608|  4.18M|        *curr++ = reduce(l0 * r1 + l1 * r0);
  609|  4.18M|    } while (curr < end);
  ------------------
  |  Branch (609:14): [True: 4.14M, False: 32.6k]
  ------------------
  610|  32.6k|}
ml_kem.c:scalar_inverse_ntt:
  542|  32.6k|{
  543|  32.6k|    const uint16_t *roots = kInverseNTTRoots;
  544|  32.6k|    uint16_t *end = s->c + DEGREE;
  ------------------
  |  |   41|  32.6k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  32.6k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  545|  32.6k|    int offset = 2;
  546|       |
  547|   228k|    do {
  548|   228k|        uint16_t *curr = s->c, *peer;
  549|       |
  550|  4.14M|        do {
  551|  4.14M|            uint16_t *pause = curr + offset, even, odd;
  552|  4.14M|            uint32_t zeta = *++roots;
  553|       |
  554|  4.14M|            peer = pause;
  555|  29.2M|            do {
  556|  29.2M|                even = *curr;
  557|  29.2M|                odd = *peer;
  558|  29.2M|                *peer++ = reduce(zeta * (even - odd + kPrime));
  559|  29.2M|                *curr++ = reduce_once(odd + even);
  560|  29.2M|            } while (curr < pause);
  ------------------
  |  Branch (560:22): [True: 25.1M, False: 4.14M]
  ------------------
  561|  4.14M|        } while ((curr = peer) < end);
  ------------------
  |  Branch (561:18): [True: 3.91M, False: 228k]
  ------------------
  562|   228k|    } while ((offset <<= 1) < DEGREE);
  ------------------
  |  |   41|   228k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|   228k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  |  Branch (562:14): [True: 195k, False: 32.6k]
  ------------------
  563|  32.6k|    scalar_mult_const(s, kInverseDegree);
  564|  32.6k|}
ml_kem.c:scalar_mult_const:
  491|  32.6k|{
  492|  32.6k|    uint16_t *curr = s->c, *end = curr + DEGREE, tmp;
  ------------------
  |  |   41|  32.6k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  32.6k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  493|       |
  494|  8.36M|    do {
  495|  8.36M|        tmp = reduce(*curr * a);
  496|  8.36M|        *curr++ = tmp;
  497|  8.36M|    } while (curr < end);
  ------------------
  |  Branch (497:14): [True: 8.32M, False: 32.6k]
  ------------------
  498|  32.6k|}
ml_kem.c:matrix_mult_intt:
  947|  7.25k|{
  948|  7.25k|    const scalar *ar;
  949|  7.25k|    int i, j;
  950|       |
  951|  29.0k|    for (i = rank; i-- > 0; ++out) {
  ------------------
  |  Branch (951:20): [True: 21.7k, False: 7.25k]
  ------------------
  952|  21.7k|        scalar_mult(out, m++, ar = a);
  953|  65.3k|        for (j = rank - 1; j > 0; --j)
  ------------------
  |  Branch (953:28): [True: 43.5k, False: 21.7k]
  ------------------
  954|  43.5k|            scalar_mult_add(out, m++, ++ar);
  955|  21.7k|        scalar_inverse_ntt(out);
  956|  21.7k|    }
  957|  7.25k|}
ml_kem.c:gencbd_vector:
 1116|  7.25k|{
 1117|  7.25k|    uint8_t input[ML_KEM_RANDOM_BYTES + 1];
 1118|  7.25k|    int ret = 0;
 1119|       |
 1120|  7.25k|    memcpy(input, seed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  7.25k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1121|  21.7k|    do {
 1122|  21.7k|        input[ML_KEM_RANDOM_BYTES] = (*counter)++;
  ------------------
  |  |   47|  21.7k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1123|  21.7k|        if (!cbd(out++, input, mdctx, key))
  ------------------
  |  Branch (1123:13): [True: 0, False: 21.7k]
  ------------------
 1124|      0|            goto end;
 1125|  21.7k|    } while (--rank > 0);
  ------------------
  |  Branch (1125:14): [True: 14.5k, False: 7.25k]
  ------------------
 1126|  7.25k|    ret = 1;
 1127|       |
 1128|  7.25k|end:
 1129|  7.25k|    OPENSSL_cleanse((void *)input, sizeof(input));
 1130|  7.25k|    return ret;
 1131|  7.25k|}
ml_kem.c:vector_add:
  873|  7.25k|{
  874|  21.7k|    do {
  875|  21.7k|        scalar_add(lhs++, rhs++);
  876|  21.7k|    } while (--rank > 0);
  ------------------
  |  Branch (876:14): [True: 14.5k, False: 7.25k]
  ------------------
  877|  7.25k|}
ml_kem.c:vector_compress:
  926|  7.25k|{
  927|  21.7k|    do {
  928|  21.7k|        scalar_compress(a++, bits);
  929|  21.7k|    } while (--rank > 0);
  ------------------
  |  Branch (929:14): [True: 14.5k, False: 7.25k]
  ------------------
  930|  7.25k|}
ml_kem.c:scalar_add:
  568|  29.0k|{
  569|  29.0k|    int i;
  570|       |
  571|  7.46M|    for (i = 0; i < DEGREE; i++)
  ------------------
  |  |   41|  7.46M|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  7.46M|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  |  Branch (571:17): [True: 7.43M, False: 29.0k]
  ------------------
  572|  7.43M|        lhs->c[i] = reduce_once(lhs->c[i] + rhs->c[i]);
  573|  29.0k|}
ml_kem.c:scalar_decode_decompress_add:
  761|  7.25k|{
  762|  7.25k|    static const uint16_t half_q_plus_1 = (ML_KEM_PRIME >> 1) + 1;
  ------------------
  |  |   26|  7.25k|#define ML_KEM_PRIME (ML_KEM_DEGREE * 13 + 1)
  |  |  ------------------
  |  |  |  |   19|  7.25k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  763|  7.25k|    uint16_t *curr = out->c, *end = curr + DEGREE;
  ------------------
  |  |   41|  7.25k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  7.25k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  764|  7.25k|    uint16_t mask;
  765|  7.25k|    uint8_t b;
  766|       |
  767|       |    /*
  768|       |     * Add |half_q_plus_1| if the bit is set, without exposing a side-channel,
  769|       |     * avoiding the "clangover" attack.  See |constish_time_non_zero| for a
  770|       |     * discussion on why the value barrier is by default omitted.
  771|       |     */
  772|  7.25k|#define decode_decompress_add_bit                        \
  773|  7.25k|    mask = constish_time_non_zero(bit0(b));              \
  774|  7.25k|    *curr = reduce_once(*curr + (mask & half_q_plus_1)); \
  775|  7.25k|    curr++;                                              \
  776|  7.25k|    b >>= 1
  777|       |
  778|       |    /* Unrolled to process each byte in one iteration */
  779|   232k|    do {
  780|   232k|        b = *in++;
  781|   232k|        decode_decompress_add_bit;
  ------------------
  |  |  773|   232k|    mask = constish_time_non_zero(bit0(b));              \
  |  |  ------------------
  |  |  |  |   70|   232k|#define constish_time_non_zero(b) (0u - (b))
  |  |  ------------------
  |  |  774|   232k|    *curr = reduce_once(*curr + (mask & half_q_plus_1)); \
  |  |  775|   232k|    curr++;                                              \
  |  |  776|   232k|    b >>= 1
  ------------------
  782|   232k|        decode_decompress_add_bit;
  ------------------
  |  |  773|   232k|    mask = constish_time_non_zero(bit0(b));              \
  |  |  ------------------
  |  |  |  |   70|   232k|#define constish_time_non_zero(b) (0u - (b))
  |  |  ------------------
  |  |  774|   232k|    *curr = reduce_once(*curr + (mask & half_q_plus_1)); \
  |  |  775|   232k|    curr++;                                              \
  |  |  776|   232k|    b >>= 1
  ------------------
  783|   232k|        decode_decompress_add_bit;
  ------------------
  |  |  773|   232k|    mask = constish_time_non_zero(bit0(b));              \
  |  |  ------------------
  |  |  |  |   70|   232k|#define constish_time_non_zero(b) (0u - (b))
  |  |  ------------------
  |  |  774|   232k|    *curr = reduce_once(*curr + (mask & half_q_plus_1)); \
  |  |  775|   232k|    curr++;                                              \
  |  |  776|   232k|    b >>= 1
  ------------------
  784|   232k|        decode_decompress_add_bit;
  ------------------
  |  |  773|   232k|    mask = constish_time_non_zero(bit0(b));              \
  |  |  ------------------
  |  |  |  |   70|   232k|#define constish_time_non_zero(b) (0u - (b))
  |  |  ------------------
  |  |  774|   232k|    *curr = reduce_once(*curr + (mask & half_q_plus_1)); \
  |  |  775|   232k|    curr++;                                              \
  |  |  776|   232k|    b >>= 1
  ------------------
  785|       |
  786|   232k|        decode_decompress_add_bit;
  ------------------
  |  |  773|   232k|    mask = constish_time_non_zero(bit0(b));              \
  |  |  ------------------
  |  |  |  |   70|   232k|#define constish_time_non_zero(b) (0u - (b))
  |  |  ------------------
  |  |  774|   232k|    *curr = reduce_once(*curr + (mask & half_q_plus_1)); \
  |  |  775|   232k|    curr++;                                              \
  |  |  776|   232k|    b >>= 1
  ------------------
  787|   232k|        decode_decompress_add_bit;
  ------------------
  |  |  773|   232k|    mask = constish_time_non_zero(bit0(b));              \
  |  |  ------------------
  |  |  |  |   70|   232k|#define constish_time_non_zero(b) (0u - (b))
  |  |  ------------------
  |  |  774|   232k|    *curr = reduce_once(*curr + (mask & half_q_plus_1)); \
  |  |  775|   232k|    curr++;                                              \
  |  |  776|   232k|    b >>= 1
  ------------------
  788|   232k|        decode_decompress_add_bit;
  ------------------
  |  |  773|   232k|    mask = constish_time_non_zero(bit0(b));              \
  |  |  ------------------
  |  |  |  |   70|   232k|#define constish_time_non_zero(b) (0u - (b))
  |  |  ------------------
  |  |  774|   232k|    *curr = reduce_once(*curr + (mask & half_q_plus_1)); \
  |  |  775|   232k|    curr++;                                              \
  |  |  776|   232k|    b >>= 1
  ------------------
  789|   232k|        decode_decompress_add_bit;
  ------------------
  |  |  773|   232k|    mask = constish_time_non_zero(bit0(b));              \
  |  |  ------------------
  |  |  |  |   70|   232k|#define constish_time_non_zero(b) (0u - (b))
  |  |  ------------------
  |  |  774|   232k|    *curr = reduce_once(*curr + (mask & half_q_plus_1)); \
  |  |  775|   232k|    curr++;                                              \
  |  |  776|   232k|    b >>= 1
  ------------------
  790|   232k|    } while (curr < end);
  ------------------
  |  Branch (790:14): [True: 224k, False: 7.25k]
  ------------------
  791|  7.25k|#undef decode_decompress_add_bit
  792|  7.25k|}
ml_kem.c:scalar_compress:
  852|  32.6k|{
  853|  32.6k|    int i;
  854|       |
  855|  8.39M|    for (i = 0; i < DEGREE; i++)
  ------------------
  |  |   41|  8.39M|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  8.39M|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  |  Branch (855:17): [True: 8.36M, False: 32.6k]
  ------------------
  856|  8.36M|        s->c[i] = compress(s->c[i], bits);
  857|  32.6k|}
ml_kem.c:compress:
  805|  8.36M|{
  806|  8.36M|    uint32_t shifted = (uint32_t)x << bits;
  807|  8.36M|    uint64_t product = (uint64_t)shifted * kBarrettMultiplier;
  808|  8.36M|    uint32_t quotient = (uint32_t)(product >> kBarrettShift);
  809|  8.36M|    uint32_t remainder = shifted - quotient * kPrime;
  810|       |
  811|       |    /*
  812|       |     * Adjust the quotient to round correctly:
  813|       |     *   0 <= remainder <= kHalfPrime round to 0
  814|       |     *   kHalfPrime < remainder <= kPrime + kHalfPrime round to 1
  815|       |     *   kPrime + kHalfPrime < remainder < 2 * kPrime round to 2
  816|       |     */
  817|  8.36M|    quotient += 1 & constant_time_lt_32(kHalfPrime, remainder);
  818|  8.36M|    quotient += 1 & constant_time_lt_32(kPrime + kHalfPrime, remainder);
  819|  8.36M|    return quotient & ((1 << bits) - 1);
  820|  8.36M|}
ml_kem.c:decap:
 1523|  3.62k|{
 1524|  3.62k|    uint8_t buf[DECAP_BUFFER_SZ];
 1525|  3.62k|    uint8_t *failure_key = buf; /* Kbar */
 1526|  3.62k|    uint8_t *Kr = failure_key + ML_KEM_SHARED_SECRET_BYTES;
  ------------------
  |  |   51|  3.62k|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
 1527|  3.62k|    uint8_t *r = Kr + ML_KEM_SHARED_SECRET_BYTES;
  ------------------
  |  |   51|  3.62k|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
 1528|  3.62k|    uint8_t *m = r + ML_KEM_RANDOM_BYTES; /* m' */
  ------------------
  |  |   47|  3.62k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1529|  3.62k|    const ML_KEM_VINFO *vinfo = key->vinfo;
 1530|  3.62k|    int i;
 1531|  3.62k|    uint8_t mask;
 1532|       |
 1533|       |    /*
 1534|       |     * If our KDF is unavailable, fail early! Otherwise, keep going ignoring
 1535|       |     * any further errors, returning success, and whatever we got for a shared
 1536|       |     * secret.  The decrypt_cpa() function is just arithmetic on secret data,
 1537|       |     * so should not be subject to failure that makes its output predictable.
 1538|       |     *
 1539|       |     * We guard against "should never happen" catastrophic failure of the
 1540|       |     * "pure" function |hash_g| by overwriting the shared secret with the
 1541|       |     * content of the failure key and returning early, if nevertheless hash_g
 1542|       |     * fails.  This is not constant-time, but a failure of |hash_g| already
 1543|       |     * implies loss of side-channel resistance.
 1544|       |     *
 1545|       |     * The same action is taken, if also |encrypt_cpa| should catastrophically
 1546|       |     * fail, due to failure of the |PRF| underlying the CBD functions.
 1547|       |     */
 1548|  3.62k|    if (!kdf(failure_key, key->z, ctext, vinfo->ctext_bytes, mdctx, key)) {
  ------------------
  |  Branch (1548:9): [True: 0, False: 3.62k]
  ------------------
 1549|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1550|      0|            "internal error while performing %s decapsulation",
 1551|      0|            vinfo->algorithm_name);
 1552|      0|        OPENSSL_cleanse(buf, DECAP_BUFFER_SZ);
  ------------------
  |  | 1507|      0|#define DECAP_BUFFER_SZ (2 * ML_KEM_SHARED_SECRET_BYTES + 2 * ML_KEM_RANDOM_BYTES)
  |  |  ------------------
  |  |  |  |   51|      0|#define ML_KEM_SHARED_SECRET_BYTES 32
  |  |  ------------------
  |  |               #define DECAP_BUFFER_SZ (2 * ML_KEM_SHARED_SECRET_BYTES + 2 * ML_KEM_RANDOM_BYTES)
  |  |  ------------------
  |  |  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  |  |  ------------------
  ------------------
 1553|      0|        return 0;
 1554|      0|    }
 1555|  3.62k|    decrypt_cpa(m, ctext, tmp, key);
 1556|  3.62k|    if (!hash_kr(Kr, m, mdctx, key)
  ------------------
  |  Branch (1556:9): [True: 0, False: 3.62k]
  ------------------
 1557|  3.62k|        || !encrypt_cpa(tmp_ctext, m, r, tmp, mdctx, key)) {
  ------------------
  |  Branch (1557:12): [True: 0, False: 3.62k]
  ------------------
 1558|      0|        memcpy(secret, failure_key, ML_KEM_SHARED_SECRET_BYTES);
  ------------------
  |  |   51|      0|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
 1559|      0|        goto end;
 1560|      0|    }
 1561|  3.62k|    mask = constant_time_eq_int_8(0,
 1562|  3.62k|        CRYPTO_memcmp(ctext, tmp_ctext, vinfo->ctext_bytes));
  ------------------
  |  |  332|  3.62k|#define CRYPTO_memcmp memcmp
  ------------------
 1563|   119k|    for (i = 0; i < ML_KEM_SHARED_SECRET_BYTES; i++)
  ------------------
  |  |   51|   119k|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
  |  Branch (1563:17): [True: 116k, False: 3.62k]
  ------------------
 1564|   116k|        secret[i] = constant_time_select_8(mask, Kr[i], failure_key[i]);
 1565|  3.62k|end:
 1566|  3.62k|    OPENSSL_cleanse(buf, DECAP_BUFFER_SZ);
  ------------------
  |  | 1507|  3.62k|#define DECAP_BUFFER_SZ (2 * ML_KEM_SHARED_SECRET_BYTES + 2 * ML_KEM_RANDOM_BYTES)
  |  |  ------------------
  |  |  |  |   51|  3.62k|#define ML_KEM_SHARED_SECRET_BYTES 32
  |  |  ------------------
  |  |               #define DECAP_BUFFER_SZ (2 * ML_KEM_SHARED_SECRET_BYTES + 2 * ML_KEM_RANDOM_BYTES)
  |  |  ------------------
  |  |  |  |   47|  3.62k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  |  |  ------------------
  ------------------
 1567|  3.62k|    return 1;
 1568|  3.62k|}
ml_kem.c:kdf:
  417|  3.62k|{
  418|  3.62k|    return EVP_DigestInit_ex(mdctx, key->shake256_md, NULL)
  ------------------
  |  Branch (418:12): [True: 3.62k, False: 0]
  ------------------
  419|  3.62k|        && EVP_DigestUpdate(mdctx, z, ML_KEM_RANDOM_BYTES)
  ------------------
  |  |   47|  3.62k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  |  Branch (419:12): [True: 3.62k, False: 0]
  ------------------
  420|  3.62k|        && EVP_DigestUpdate(mdctx, ctext, len)
  ------------------
  |  Branch (420:12): [True: 3.62k, False: 0]
  ------------------
  421|  3.62k|        && EVP_DigestFinalXOF(mdctx, out, ML_KEM_SHARED_SECRET_BYTES);
  ------------------
  |  |   51|  3.62k|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
  |  Branch (421:12): [True: 3.62k, False: 0]
  ------------------
  422|  3.62k|}
ml_kem.c:decrypt_cpa:
 1236|  3.62k|{
 1237|  3.62k|    const ML_KEM_VINFO *vinfo = key->vinfo;
 1238|  3.62k|    scalar v, mask;
 1239|  3.62k|    int rank = vinfo->rank;
 1240|  3.62k|    int du = vinfo->du;
 1241|  3.62k|    int dv = vinfo->dv;
 1242|       |
 1243|  3.62k|    vector_decode_decompress_ntt(u, ctext, du, rank);
 1244|  3.62k|    scalar_decode(&v, ctext + vinfo->u_vector_bytes, dv);
 1245|  3.62k|    scalar_decompress(&v, dv);
 1246|  3.62k|    inner_product(&mask, key->s, u, rank);
 1247|  3.62k|    scalar_inverse_ntt(&mask);
 1248|  3.62k|    scalar_sub(&v, &mask);
 1249|  3.62k|    scalar_compress(&v, 1);
 1250|  3.62k|    scalar_encode_1(out, &v);
 1251|       |
 1252|  3.62k|    OPENSSL_cleanse((void *)&v, sizeof(v));
 1253|  3.62k|    OPENSSL_cleanse((void *)&mask, sizeof(mask));
 1254|  3.62k|}
ml_kem.c:vector_decode_decompress_ntt:
  903|  3.62k|{
  904|  3.62k|    int stride = bits * DEGREE / 8;
  ------------------
  |  |   41|  3.62k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  3.62k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  905|       |
  906|  14.5k|    for (; rank-- > 0; in += stride, ++out) {
  ------------------
  |  Branch (906:12): [True: 10.8k, False: 3.62k]
  ------------------
  907|  10.8k|        scalar_decode(out, in, bits);
  908|  10.8k|        scalar_decompress(out, bits);
  909|  10.8k|        scalar_ntt(out);
  910|  10.8k|    }
  911|  3.62k|}
ml_kem.c:scalar_decode:
  685|  14.5k|{
  686|  14.5k|    uint16_t *curr = out->c, *end = curr + DEGREE;
  ------------------
  |  |   41|  14.5k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  14.5k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  687|  14.5k|    uint64_t accum = 0;
  688|  14.5k|    int accum_bits = 0, todo = bits;
  689|  14.5k|    uint16_t bitmask = (((uint16_t)1) << bits) - 1, mask = bitmask;
  690|  14.5k|    uint16_t element = 0;
  691|       |
  692|  4.06M|    do {
  693|  4.06M|        if (accum_bits == 0) {
  ------------------
  |  Branch (693:13): [True: 493k, False: 3.57M]
  ------------------
  694|   493k|            in = OPENSSL_load_u64_le(&accum, in);
  695|   493k|            accum_bits = 64;
  696|   493k|        }
  697|  4.06M|        if (todo == bits && accum_bits >= bits) {
  ------------------
  |  Branch (697:13): [True: 3.71M, False: 348k]
  |  Branch (697:29): [True: 3.36M, False: 348k]
  ------------------
  698|       |            /* No partial "element", and all the required bits available */
  699|  3.36M|            *curr++ = ((uint16_t)accum) & mask;
  700|  3.36M|            accum >>= bits;
  701|  3.36M|            accum_bits -= bits;
  702|  3.36M|        } else if (accum_bits >= todo) {
  ------------------
  |  Branch (702:20): [True: 348k, False: 348k]
  ------------------
  703|       |            /* A partial "element", and all the required bits available */
  704|   348k|            *curr++ = element | ((((uint16_t)accum) & mask) << (bits - todo));
  705|   348k|            accum >>= todo;
  706|   348k|            accum_bits -= todo;
  707|   348k|            element = 0;
  708|   348k|            todo = bits;
  709|   348k|            mask = bitmask;
  710|   348k|        } else {
  711|       |            /*
  712|       |             * Only some of the requisite bits accumulated, store |accum_bits|
  713|       |             * of these in |element|.  The accumulated bitcount becomes 0, but
  714|       |             * as soon as we have more bits we'll want to merge accum_bits
  715|       |             * fewer of them into the final |element|.
  716|       |             *
  717|       |             * Note that with a 64-bit accumulator and |bits| always 12 or
  718|       |             * less, if we're here, the previous iteration had all the
  719|       |             * requisite bits, and so there are no kept bits in |element|.
  720|       |             */
  721|   348k|            element = ((uint16_t)accum) & mask;
  722|   348k|            todo -= accum_bits;
  723|   348k|            mask = bitmask >> accum_bits;
  724|   348k|            accum_bits = 0;
  725|   348k|        }
  726|  4.06M|    } while (curr < end);
  ------------------
  |  Branch (726:14): [True: 4.04M, False: 14.5k]
  ------------------
  727|  14.5k|}
ml_kem.c:scalar_decompress:
  864|  14.5k|{
  865|  14.5k|    int i;
  866|       |
  867|  3.73M|    for (i = 0; i < DEGREE; i++)
  ------------------
  |  |   41|  3.73M|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  3.73M|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  |  Branch (867:17): [True: 3.71M, False: 14.5k]
  ------------------
  868|  3.71M|        s->c[i] = decompress(s->c[i], bits);
  869|  14.5k|}
ml_kem.c:decompress:
  830|  3.71M|{
  831|  3.71M|    uint32_t product = (uint32_t)x * kPrime;
  832|  3.71M|    uint32_t power = 1 << bits;
  833|       |    /* This is |product| % power, since |power| is a power of 2. */
  834|  3.71M|    uint32_t remainder = product & (power - 1);
  835|       |    /* This is |product| / power, since |power| is a power of 2. */
  836|  3.71M|    uint32_t lower = product >> bits;
  837|       |
  838|       |    /*
  839|       |     * The rounding logic works since the first half of numbers mod |power|
  840|       |     * have a 0 as first bit, and the second half has a 1 as first bit, since
  841|       |     * |power| is a power of 2. As a 12 bit number, |remainder| is always
  842|       |     * positive, so we will shift in 0s for a right shift.
  843|       |     */
  844|  3.71M|    return lower + (remainder >> (bits - 1));
  845|  3.71M|}
ml_kem.c:scalar_sub:
  577|  3.62k|{
  578|  3.62k|    int i;
  579|       |
  580|   932k|    for (i = 0; i < DEGREE; i++)
  ------------------
  |  |   41|   932k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|   932k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  |  Branch (580:17): [True: 929k, False: 3.62k]
  ------------------
  581|   929k|        lhs->c[i] = reduce_once(lhs->c[i] - rhs->c[i] + kPrime);
  582|  3.62k|}
ml_kem.c:scalar_encode_1:
  663|  3.62k|{
  664|  3.62k|    int i, j;
  665|  3.62k|    uint8_t out_byte;
  666|       |
  667|   119k|    for (i = 0; i < DEGREE; i += 8) {
  ------------------
  |  |   41|   119k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|   119k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  |  Branch (667:17): [True: 116k, False: 3.62k]
  ------------------
  668|   116k|        out_byte = 0;
  669|  1.04M|        for (j = 0; j < 8; j++)
  ------------------
  |  Branch (669:21): [True: 929k, False: 116k]
  ------------------
  670|   929k|            out_byte |= bit0(s->c[i + j]) << j;
  ------------------
  |  |   34|   929k|#define bit0(b) ((b) & 1)
  ------------------
  671|   116k|        *out = out_byte;
  672|   116k|        out++;
  673|   116k|    }
  674|  3.62k|}
ml_kem.c:hash_kr:
 1491|  3.62k|{
 1492|  3.62k|    unsigned int sz, wanted;
 1493|       |
 1494|  3.62k|    wanted = ML_KEM_SHARED_SECRET_BYTES + ML_KEM_RANDOM_BYTES;
  ------------------
  |  |   51|  3.62k|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
                  wanted = ML_KEM_SHARED_SECRET_BYTES + ML_KEM_RANDOM_BYTES;
  ------------------
  |  |   47|  3.62k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1495|  3.62k|    return (EVP_DigestInit_ex(mdctx, key->sha3_512_md, NULL)
  ------------------
  |  Branch (1495:13): [True: 3.62k, False: 0]
  ------------------
 1496|  3.62k|        && EVP_DigestUpdate(mdctx, in, ML_KEM_RANDOM_BYTES)
  ------------------
  |  |   47|  3.62k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  |  Branch (1496:12): [True: 3.62k, False: 0]
  ------------------
 1497|  3.62k|        && EVP_DigestUpdate(mdctx, key->pkhash, ML_KEM_PKHASH_BYTES)
  ------------------
  |  |   50|  3.62k|#define ML_KEM_PKHASH_BYTES 32 /* Salts the shared-secret */
  ------------------
  |  Branch (1497:12): [True: 3.62k, False: 0]
  ------------------
 1498|  3.62k|        && EVP_DigestFinal_ex(mdctx, out, &sz)
  ------------------
  |  Branch (1498:12): [True: 3.62k, False: 0]
  ------------------
 1499|  3.62k|        && ossl_assert(sz == wanted));
  ------------------
  |  |   52|  3.62k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:24): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |   53|  3.62k|    __FILE__, __LINE__)
  ------------------
 1500|  3.62k|}

CRYPTO_ctr128_encrypt_ctr32:
  155|   114k|{
  156|   114k|    unsigned int n, ctr32;
  157|       |
  158|   114k|    n = *num;
  159|       |
  160|   114k|    while (n && len) {
  ------------------
  |  Branch (160:12): [True: 0, False: 114k]
  |  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|   114k|    ctr32 = GETU32(ivec + 12);
  ------------------
  |  |   98|   114k|#define GETU32(p) ((u32)(p)[0] << 24 | (u32)(p)[1] << 16 | (u32)(p)[2] << 8 | (u32)(p)[3])
  ------------------
  167|   191k|    while (len >= 16) {
  ------------------
  |  Branch (167:12): [True: 76.4k, False: 114k]
  ------------------
  168|  76.4k|        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|  76.4k|        if (sizeof(size_t) > sizeof(unsigned int) && blocks > (1U << 28))
  ------------------
  |  Branch (174:13): [True: 76.4k, Folded]
  |  Branch (174:54): [True: 0, False: 76.4k]
  ------------------
  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|  76.4k|        ctr32 += (u32)blocks;
  183|  76.4k|        if (ctr32 < blocks) {
  ------------------
  |  Branch (183:13): [True: 0, False: 76.4k]
  ------------------
  184|      0|            blocks -= ctr32;
  185|      0|            ctr32 = 0;
  186|      0|        }
  187|  76.4k|        (*func)(in, out, blocks, key, ivec);
  188|       |        /* (*ctr) does not update ivec, caller does: */
  189|  76.4k|        PUTU32(ivec + 12, ctr32);
  ------------------
  |  |   99|  76.4k|#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|  76.4k|        if (ctr32 == 0)
  ------------------
  |  Branch (191:13): [True: 0, False: 76.4k]
  ------------------
  192|      0|            ctr96_inc(ivec);
  193|  76.4k|        blocks *= 16;
  194|  76.4k|        len -= blocks;
  195|  76.4k|        out += blocks;
  196|  76.4k|        in += blocks;
  197|  76.4k|    }
  198|   114k|    if (len) {
  ------------------
  |  Branch (198:9): [True: 38.1k, False: 76.4k]
  ------------------
  199|  38.1k|        memset(ecount_buf, 0, 16);
  200|  38.1k|        (*func)(ecount_buf, ecount_buf, 1, key, ivec);
  201|  38.1k|        ++ctr32;
  202|  38.1k|        PUTU32(ivec + 12, ctr32);
  ------------------
  |  |   99|  38.1k|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
  203|  38.1k|        if (ctr32 == 0)
  ------------------
  |  Branch (203:13): [True: 0, False: 38.1k]
  ------------------
  204|      0|            ctr96_inc(ivec);
  205|   190k|        while (len--) {
  ------------------
  |  Branch (205:16): [True: 152k, False: 38.1k]
  ------------------
  206|   152k|            out[n] = in[n] ^ ecount_buf[n];
  207|   152k|            ++n;
  208|   152k|        }
  209|  38.1k|    }
  210|       |
  211|   114k|    *num = n;
  212|   114k|}

CRYPTO_gcm128_init:
  601|  28.9k|{
  602|  28.9k|    DECLARE_IS_ENDIAN;
  ------------------
  |  |   25|  28.9k|#define DECLARE_IS_ENDIAN const int ossl_is_little_endian = __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
  ------------------
  603|       |
  604|  28.9k|    memset(ctx, 0, sizeof(*ctx));
  605|  28.9k|    ctx->block = block;
  606|  28.9k|    ctx->key = key;
  607|       |
  608|  28.9k|    (*block)(ctx->H.c, ctx->H.c, key);
  609|       |
  610|  28.9k|    if (IS_LITTLE_ENDIAN) {
  ------------------
  |  |   26|  28.9k|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 28.9k, Folded]
  |  |  ------------------
  ------------------
  611|       |        /* H is stored in host byte order */
  612|       |#ifdef BSWAP8
  613|       |        ctx->H.u[0] = BSWAP8(ctx->H.u[0]);
  614|       |        ctx->H.u[1] = BSWAP8(ctx->H.u[1]);
  615|       |#else
  616|  28.9k|        u8 *p = ctx->H.c;
  617|  28.9k|        u64 hi, lo;
  618|  28.9k|        hi = (u64)GETU32(p) << 32 | GETU32(p + 4);
  ------------------
  |  |   98|  28.9k|#define GETU32(p) ((u32)(p)[0] << 24 | (u32)(p)[1] << 16 | (u32)(p)[2] << 8 | (u32)(p)[3])
  ------------------
                      hi = (u64)GETU32(p) << 32 | GETU32(p + 4);
  ------------------
  |  |   98|  28.9k|#define GETU32(p) ((u32)(p)[0] << 24 | (u32)(p)[1] << 16 | (u32)(p)[2] << 8 | (u32)(p)[3])
  ------------------
  619|  28.9k|        lo = (u64)GETU32(p + 8) << 32 | GETU32(p + 12);
  ------------------
  |  |   98|  28.9k|#define GETU32(p) ((u32)(p)[0] << 24 | (u32)(p)[1] << 16 | (u32)(p)[2] << 8 | (u32)(p)[3])
  ------------------
                      lo = (u64)GETU32(p + 8) << 32 | GETU32(p + 12);
  ------------------
  |  |   98|  28.9k|#define GETU32(p) ((u32)(p)[0] << 24 | (u32)(p)[1] << 16 | (u32)(p)[2] << 8 | (u32)(p)[3])
  ------------------
  620|  28.9k|        ctx->H.u[0] = hi;
  621|  28.9k|        ctx->H.u[1] = lo;
  622|  28.9k|#endif
  623|  28.9k|    }
  624|       |
  625|  28.9k|    gcm_get_funcs(&ctx->funcs);
  626|  28.9k|    ctx->funcs.ginit(ctx->Htable, ctx->H.u);
  627|  28.9k|}
CRYPTO_gcm128_setiv:
  631|  68.6k|{
  632|  68.6k|    DECLARE_IS_ENDIAN;
  ------------------
  |  |   25|  68.6k|#define DECLARE_IS_ENDIAN const int ossl_is_little_endian = __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
  ------------------
  633|  68.6k|    unsigned int ctr;
  634|       |
  635|  68.6k|    ctx->len.u[0] = 0; /* AAD length */
  636|  68.6k|    ctx->len.u[1] = 0; /* message length */
  637|  68.6k|    ctx->ares = 0;
  638|  68.6k|    ctx->mres = 0;
  639|       |
  640|  68.6k|    if (len == 12) {
  ------------------
  |  Branch (640:9): [True: 68.6k, False: 0]
  ------------------
  641|  68.6k|        memcpy(ctx->Yi.c, iv, 12);
  642|  68.6k|        ctx->Yi.c[12] = 0;
  643|  68.6k|        ctx->Yi.c[13] = 0;
  644|  68.6k|        ctx->Yi.c[14] = 0;
  645|  68.6k|        ctx->Yi.c[15] = 1;
  646|  68.6k|        ctr = 1;
  647|  68.6k|    } else {
  648|      0|        size_t i;
  649|      0|        u64 len0 = len;
  650|       |
  651|       |        /* Borrow ctx->Xi to calculate initial Yi */
  652|      0|        ctx->Xi.u[0] = 0;
  653|      0|        ctx->Xi.u[1] = 0;
  654|       |
  655|      0|        while (len >= 16) {
  ------------------
  |  Branch (655:16): [True: 0, False: 0]
  ------------------
  656|      0|            for (i = 0; i < 16; ++i)
  ------------------
  |  Branch (656:25): [True: 0, False: 0]
  ------------------
  657|      0|                ctx->Xi.c[i] ^= iv[i];
  658|      0|            GCM_MUL(ctx);
  ------------------
  |  |  329|      0|#define GCM_MUL(ctx) ctx->funcs.gmult(ctx->Xi.u, ctx->Htable)
  ------------------
  659|      0|            iv += 16;
  660|      0|            len -= 16;
  661|      0|        }
  662|      0|        if (len) {
  ------------------
  |  Branch (662:13): [True: 0, False: 0]
  ------------------
  663|      0|            for (i = 0; i < len; ++i)
  ------------------
  |  Branch (663:25): [True: 0, False: 0]
  ------------------
  664|      0|                ctx->Xi.c[i] ^= iv[i];
  665|      0|            GCM_MUL(ctx);
  ------------------
  |  |  329|      0|#define GCM_MUL(ctx) ctx->funcs.gmult(ctx->Xi.u, ctx->Htable)
  ------------------
  666|      0|        }
  667|      0|        len0 <<= 3;
  668|      0|        if (IS_LITTLE_ENDIAN) {
  ------------------
  |  |   26|      0|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, Folded]
  |  |  ------------------
  ------------------
  669|       |#ifdef BSWAP8
  670|       |            ctx->Xi.u[1] ^= BSWAP8(len0);
  671|       |#else
  672|      0|            ctx->Xi.c[8] ^= (u8)(len0 >> 56);
  673|      0|            ctx->Xi.c[9] ^= (u8)(len0 >> 48);
  674|      0|            ctx->Xi.c[10] ^= (u8)(len0 >> 40);
  675|      0|            ctx->Xi.c[11] ^= (u8)(len0 >> 32);
  676|      0|            ctx->Xi.c[12] ^= (u8)(len0 >> 24);
  677|      0|            ctx->Xi.c[13] ^= (u8)(len0 >> 16);
  678|      0|            ctx->Xi.c[14] ^= (u8)(len0 >> 8);
  679|      0|            ctx->Xi.c[15] ^= (u8)(len0);
  680|      0|#endif
  681|      0|        } else {
  682|      0|            ctx->Xi.u[1] ^= len0;
  683|      0|        }
  684|       |
  685|      0|        GCM_MUL(ctx);
  ------------------
  |  |  329|      0|#define GCM_MUL(ctx) ctx->funcs.gmult(ctx->Xi.u, ctx->Htable)
  ------------------
  686|       |
  687|      0|        if (IS_LITTLE_ENDIAN)
  ------------------
  |  |   26|      0|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, Folded]
  |  |  ------------------
  ------------------
  688|       |#ifdef BSWAP4
  689|       |            ctr = BSWAP4(ctx->Xi.d[3]);
  690|       |#else
  691|      0|            ctr = GETU32(ctx->Xi.c + 12);
  ------------------
  |  |   98|      0|#define GETU32(p) ((u32)(p)[0] << 24 | (u32)(p)[1] << 16 | (u32)(p)[2] << 8 | (u32)(p)[3])
  ------------------
  692|      0|#endif
  693|      0|        else
  694|      0|            ctr = ctx->Xi.d[3];
  695|       |
  696|       |        /* Copy borrowed Xi to Yi */
  697|      0|        ctx->Yi.u[0] = ctx->Xi.u[0];
  698|      0|        ctx->Yi.u[1] = ctx->Xi.u[1];
  699|      0|    }
  700|       |
  701|  68.6k|    ctx->Xi.u[0] = 0;
  702|  68.6k|    ctx->Xi.u[1] = 0;
  703|       |
  704|  68.6k|    (*ctx->block)(ctx->Yi.c, ctx->EK0.c, ctx->key);
  705|  68.6k|    ++ctr;
  706|  68.6k|    if (IS_LITTLE_ENDIAN)
  ------------------
  |  |   26|  68.6k|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 68.6k, Folded]
  |  |  ------------------
  ------------------
  707|       |#ifdef BSWAP4
  708|       |        ctx->Yi.d[3] = BSWAP4(ctr);
  709|       |#else
  710|  68.6k|        PUTU32(ctx->Yi.c + 12, ctr);
  ------------------
  |  |   99|  68.6k|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
  711|      0|#endif
  712|      0|    else
  713|      0|        ctx->Yi.d[3] = ctr;
  714|  68.6k|}
CRYPTO_gcm128_aad:
  718|  68.6k|{
  719|  68.6k|    size_t i;
  720|  68.6k|    unsigned int n;
  721|  68.6k|    u64 alen = ctx->len.u[0];
  722|       |
  723|  68.6k|    if (ctx->len.u[1])
  ------------------
  |  Branch (723:9): [True: 0, False: 68.6k]
  ------------------
  724|      0|        return -2;
  725|       |
  726|  68.6k|    alen += len;
  727|  68.6k|    if (alen > (U64(1) << 61) || (sizeof(len) == 8 && alen < len))
  ------------------
  |  |   24|  68.6k|#define U64(C) C##ULL
  ------------------
  |  Branch (727:9): [True: 0, False: 68.6k]
  |  Branch (727:35): [True: 68.6k, Folded]
  |  Branch (727:55): [True: 0, False: 68.6k]
  ------------------
  728|      0|        return -1;
  729|  68.6k|    ctx->len.u[0] = alen;
  730|       |
  731|  68.6k|    n = ctx->ares;
  732|  68.6k|    if (n) {
  ------------------
  |  Branch (732:9): [True: 0, False: 68.6k]
  ------------------
  733|      0|        while (n && len) {
  ------------------
  |  Branch (733:16): [True: 0, False: 0]
  |  Branch (733:21): [True: 0, False: 0]
  ------------------
  734|      0|            ctx->Xi.c[n] ^= *(aad++);
  735|      0|            --len;
  736|      0|            n = (n + 1) % 16;
  737|      0|        }
  738|      0|        if (n == 0)
  ------------------
  |  Branch (738:13): [True: 0, False: 0]
  ------------------
  739|      0|            GCM_MUL(ctx);
  ------------------
  |  |  329|      0|#define GCM_MUL(ctx) ctx->funcs.gmult(ctx->Xi.u, ctx->Htable)
  ------------------
  740|      0|        else {
  741|      0|            ctx->ares = n;
  742|      0|            return 0;
  743|      0|        }
  744|      0|    }
  745|  68.6k|#ifdef GHASH
  746|  68.6k|    if ((i = (len & (size_t)-16))) {
  ------------------
  |  Branch (746:9): [True: 0, False: 68.6k]
  ------------------
  747|      0|        GHASH(ctx, aad, i);
  ------------------
  |  |  331|      0|#define GHASH(ctx, in, len) ctx->funcs.ghash((ctx)->Xi.u, (ctx)->Htable, in, len)
  ------------------
  748|      0|        aad += i;
  749|      0|        len -= i;
  750|      0|    }
  751|       |#else
  752|       |    while (len >= 16) {
  753|       |        for (i = 0; i < 16; ++i)
  754|       |            ctx->Xi.c[i] ^= aad[i];
  755|       |        GCM_MUL(ctx);
  756|       |        aad += 16;
  757|       |        len -= 16;
  758|       |    }
  759|       |#endif
  760|  68.6k|    if (len) {
  ------------------
  |  Branch (760:9): [True: 68.6k, False: 0]
  ------------------
  761|  68.6k|        n = (unsigned int)len;
  762|   411k|        for (i = 0; i < len; ++i)
  ------------------
  |  Branch (762:21): [True: 343k, False: 68.6k]
  ------------------
  763|   343k|            ctx->Xi.c[i] ^= aad[i];
  764|  68.6k|    }
  765|       |
  766|  68.6k|    ctx->ares = n;
  767|  68.6k|    return 0;
  768|  68.6k|}
CRYPTO_gcm128_encrypt:
  773|  25.4k|{
  774|  25.4k|    DECLARE_IS_ENDIAN;
  ------------------
  |  |   25|  25.4k|#define DECLARE_IS_ENDIAN const int ossl_is_little_endian = __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
  ------------------
  775|  25.4k|    unsigned int n, ctr, mres;
  776|  25.4k|    size_t i;
  777|  25.4k|    u64 mlen = ctx->len.u[1];
  778|  25.4k|    block128_f block = ctx->block;
  779|  25.4k|    void *key = ctx->key;
  780|       |
  781|  25.4k|    mlen += len;
  782|  25.4k|    if (mlen > ((U64(1) << 36) - 32) || (sizeof(len) == 8 && mlen < len))
  ------------------
  |  |   24|  25.4k|#define U64(C) C##ULL
  ------------------
  |  Branch (782:9): [True: 0, False: 25.4k]
  |  Branch (782:42): [True: 25.4k, Folded]
  |  Branch (782:62): [True: 0, False: 25.4k]
  ------------------
  783|      0|        return -1;
  784|  25.4k|    ctx->len.u[1] = mlen;
  785|       |
  786|  25.4k|    mres = ctx->mres;
  787|       |
  788|  25.4k|    if (ctx->ares) {
  ------------------
  |  Branch (788:9): [True: 25.4k, False: 0]
  ------------------
  789|       |        /* First call to encrypt finalizes GHASH(AAD) */
  790|  25.4k|#if defined(GHASH) && !defined(OPENSSL_SMALL_FOOTPRINT)
  791|  25.4k|        if (len == 0) {
  ------------------
  |  Branch (791:13): [True: 25.4k, False: 0]
  ------------------
  792|  25.4k|            GCM_MUL(ctx);
  ------------------
  |  |  329|  25.4k|#define GCM_MUL(ctx) ctx->funcs.gmult(ctx->Xi.u, ctx->Htable)
  ------------------
  793|  25.4k|            ctx->ares = 0;
  794|  25.4k|            return 0;
  795|  25.4k|        }
  796|      0|        memcpy(ctx->Xn, ctx->Xi.c, sizeof(ctx->Xi));
  797|      0|        ctx->Xi.u[0] = 0;
  798|      0|        ctx->Xi.u[1] = 0;
  799|      0|        mres = sizeof(ctx->Xi);
  800|       |#else
  801|       |        GCM_MUL(ctx);
  802|       |#endif
  803|      0|        ctx->ares = 0;
  804|      0|    }
  805|       |
  806|      0|    if (IS_LITTLE_ENDIAN)
  ------------------
  |  |   26|      0|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, Folded]
  |  |  ------------------
  ------------------
  807|       |#ifdef BSWAP4
  808|       |        ctr = BSWAP4(ctx->Yi.d[3]);
  809|       |#else
  810|      0|        ctr = GETU32(ctx->Yi.c + 12);
  ------------------
  |  |   98|      0|#define GETU32(p) ((u32)(p)[0] << 24 | (u32)(p)[1] << 16 | (u32)(p)[2] << 8 | (u32)(p)[3])
  ------------------
  811|      0|#endif
  812|      0|    else
  813|      0|        ctr = ctx->Yi.d[3];
  814|       |
  815|      0|    n = mres % 16;
  816|      0|#if !defined(OPENSSL_SMALL_FOOTPRINT)
  817|      0|    if (16 % sizeof(size_t) == 0) { /* always true actually */
  ------------------
  |  Branch (817:9): [True: 0, Folded]
  ------------------
  818|      0|        do {
  819|      0|            if (n) {
  ------------------
  |  Branch (819:17): [True: 0, False: 0]
  ------------------
  820|      0|#if defined(GHASH)
  821|      0|                while (n && len) {
  ------------------
  |  Branch (821:24): [True: 0, False: 0]
  |  Branch (821:29): [True: 0, False: 0]
  ------------------
  822|      0|                    ctx->Xn[mres++] = *(out++) = *(in++) ^ ctx->EKi.c[n];
  823|      0|                    --len;
  824|      0|                    n = (n + 1) % 16;
  825|      0|                }
  826|      0|                if (n == 0) {
  ------------------
  |  Branch (826:21): [True: 0, False: 0]
  ------------------
  827|      0|                    GHASH(ctx, ctx->Xn, mres);
  ------------------
  |  |  331|      0|#define GHASH(ctx, in, len) ctx->funcs.ghash((ctx)->Xi.u, (ctx)->Htable, in, len)
  ------------------
  828|      0|                    mres = 0;
  829|      0|                } else {
  830|      0|                    ctx->mres = mres;
  831|      0|                    return 0;
  832|      0|                }
  833|       |#else
  834|       |                while (n && len) {
  835|       |                    ctx->Xi.c[n] ^= *(out++) = *(in++) ^ ctx->EKi.c[n];
  836|       |                    --len;
  837|       |                    n = (n + 1) % 16;
  838|       |                }
  839|       |                if (n == 0) {
  840|       |                    GCM_MUL(ctx);
  841|       |                    mres = 0;
  842|       |                } else {
  843|       |                    ctx->mres = n;
  844|       |                    return 0;
  845|       |                }
  846|       |#endif
  847|      0|            }
  848|      0|#if defined(STRICT_ALIGNMENT)
  849|      0|            if (((size_t)in | (size_t)out) % sizeof(size_t) != 0)
  ------------------
  |  Branch (849:17): [True: 0, False: 0]
  ------------------
  850|      0|                break;
  851|      0|#endif
  852|      0|#if defined(GHASH)
  853|      0|            if (len >= 16 && mres) {
  ------------------
  |  Branch (853:17): [True: 0, False: 0]
  |  Branch (853:30): [True: 0, False: 0]
  ------------------
  854|      0|                GHASH(ctx, ctx->Xn, mres);
  ------------------
  |  |  331|      0|#define GHASH(ctx, in, len) ctx->funcs.ghash((ctx)->Xi.u, (ctx)->Htable, in, len)
  ------------------
  855|      0|                mres = 0;
  856|      0|            }
  857|      0|#if defined(GHASH_CHUNK)
  858|      0|            while (len >= GHASH_CHUNK) {
  ------------------
  |  |  337|      0|#define GHASH_CHUNK (3 * 1024)
  ------------------
  |  Branch (858:20): [True: 0, False: 0]
  ------------------
  859|      0|                size_t j = GHASH_CHUNK;
  ------------------
  |  |  337|      0|#define GHASH_CHUNK (3 * 1024)
  ------------------
  860|       |
  861|      0|                while (j) {
  ------------------
  |  Branch (861:24): [True: 0, False: 0]
  ------------------
  862|      0|                    size_t_aX *out_t = (size_t_aX *)out;
  863|      0|                    const size_t_aX *in_t = (const size_t_aX *)in;
  864|       |
  865|      0|                    (*block)(ctx->Yi.c, ctx->EKi.c, key);
  866|      0|                    ++ctr;
  867|      0|                    if (IS_LITTLE_ENDIAN)
  ------------------
  |  |   26|      0|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, Folded]
  |  |  ------------------
  ------------------
  868|       |#ifdef BSWAP4
  869|       |                        ctx->Yi.d[3] = BSWAP4(ctr);
  870|       |#else
  871|      0|                        PUTU32(ctx->Yi.c + 12, ctr);
  ------------------
  |  |   99|      0|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
  872|      0|#endif
  873|      0|                    else
  874|      0|                        ctx->Yi.d[3] = ctr;
  875|      0|                    for (i = 0; i < 16 / sizeof(size_t); ++i)
  ------------------
  |  Branch (875:33): [True: 0, False: 0]
  ------------------
  876|      0|                        out_t[i] = in_t[i] ^ ctx->EKi.t[i];
  877|      0|                    out += 16;
  878|      0|                    in += 16;
  879|      0|                    j -= 16;
  880|      0|                }
  881|      0|                GHASH(ctx, out - GHASH_CHUNK, GHASH_CHUNK);
  ------------------
  |  |  331|      0|#define GHASH(ctx, in, len) ctx->funcs.ghash((ctx)->Xi.u, (ctx)->Htable, in, len)
  ------------------
  882|      0|                len -= GHASH_CHUNK;
  ------------------
  |  |  337|      0|#define GHASH_CHUNK (3 * 1024)
  ------------------
  883|      0|            }
  884|      0|#endif
  885|      0|            if ((i = (len & (size_t)-16))) {
  ------------------
  |  Branch (885:17): [True: 0, False: 0]
  ------------------
  886|      0|                size_t j = i;
  887|       |
  888|      0|                while (len >= 16) {
  ------------------
  |  Branch (888:24): [True: 0, False: 0]
  ------------------
  889|      0|                    size_t_aX *out_t = (size_t_aX *)out;
  890|      0|                    const size_t_aX *in_t = (const size_t_aX *)in;
  891|       |
  892|      0|                    (*block)(ctx->Yi.c, ctx->EKi.c, key);
  893|      0|                    ++ctr;
  894|      0|                    if (IS_LITTLE_ENDIAN)
  ------------------
  |  |   26|      0|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, Folded]
  |  |  ------------------
  ------------------
  895|       |#ifdef BSWAP4
  896|       |                        ctx->Yi.d[3] = BSWAP4(ctr);
  897|       |#else
  898|      0|                        PUTU32(ctx->Yi.c + 12, ctr);
  ------------------
  |  |   99|      0|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
  899|      0|#endif
  900|      0|                    else
  901|      0|                        ctx->Yi.d[3] = ctr;
  902|      0|                    for (i = 0; i < 16 / sizeof(size_t); ++i)
  ------------------
  |  Branch (902:33): [True: 0, False: 0]
  ------------------
  903|      0|                        out_t[i] = in_t[i] ^ ctx->EKi.t[i];
  904|      0|                    out += 16;
  905|      0|                    in += 16;
  906|      0|                    len -= 16;
  907|      0|                }
  908|      0|                GHASH(ctx, out - j, j);
  ------------------
  |  |  331|      0|#define GHASH(ctx, in, len) ctx->funcs.ghash((ctx)->Xi.u, (ctx)->Htable, in, len)
  ------------------
  909|      0|            }
  910|       |#else
  911|       |            while (len >= 16) {
  912|       |                size_t *out_t = (size_t *)out;
  913|       |                const size_t *in_t = (const size_t *)in;
  914|       |
  915|       |                (*block)(ctx->Yi.c, ctx->EKi.c, key);
  916|       |                ++ctr;
  917|       |                if (IS_LITTLE_ENDIAN)
  918|       |#ifdef BSWAP4
  919|       |                    ctx->Yi.d[3] = BSWAP4(ctr);
  920|       |#else
  921|       |                    PUTU32(ctx->Yi.c + 12, ctr);
  922|       |#endif
  923|       |                else
  924|       |                    ctx->Yi.d[3] = ctr;
  925|       |                for (i = 0; i < 16 / sizeof(size_t); ++i)
  926|       |                    ctx->Xi.t[i] ^= out_t[i] = in_t[i] ^ ctx->EKi.t[i];
  927|       |                GCM_MUL(ctx);
  928|       |                out += 16;
  929|       |                in += 16;
  930|       |                len -= 16;
  931|       |            }
  932|       |#endif
  933|      0|            if (len) {
  ------------------
  |  Branch (933:17): [True: 0, False: 0]
  ------------------
  934|      0|                (*block)(ctx->Yi.c, ctx->EKi.c, key);
  935|      0|                ++ctr;
  936|      0|                if (IS_LITTLE_ENDIAN)
  ------------------
  |  |   26|      0|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, Folded]
  |  |  ------------------
  ------------------
  937|       |#ifdef BSWAP4
  938|       |                    ctx->Yi.d[3] = BSWAP4(ctr);
  939|       |#else
  940|      0|                    PUTU32(ctx->Yi.c + 12, ctr);
  ------------------
  |  |   99|      0|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
  941|      0|#endif
  942|      0|                else
  943|      0|                    ctx->Yi.d[3] = ctr;
  944|      0|#if defined(GHASH)
  945|      0|                while (len--) {
  ------------------
  |  Branch (945:24): [True: 0, False: 0]
  ------------------
  946|      0|                    ctx->Xn[mres++] = out[n] = in[n] ^ ctx->EKi.c[n];
  947|      0|                    ++n;
  948|      0|                }
  949|       |#else
  950|       |                while (len--) {
  951|       |                    ctx->Xi.c[n] ^= out[n] = in[n] ^ ctx->EKi.c[n];
  952|       |                    ++n;
  953|       |                }
  954|       |                mres = n;
  955|       |#endif
  956|      0|            }
  957|       |
  958|      0|            ctx->mres = mres;
  959|      0|            return 0;
  960|      0|        } while (0);
  ------------------
  |  Branch (960:18): [Folded, False: 0]
  ------------------
  961|      0|    }
  962|      0|#endif
  963|      0|    for (i = 0; i < len; ++i) {
  ------------------
  |  Branch (963:17): [True: 0, False: 0]
  ------------------
  964|      0|        if (n == 0) {
  ------------------
  |  Branch (964:13): [True: 0, False: 0]
  ------------------
  965|      0|            (*block)(ctx->Yi.c, ctx->EKi.c, key);
  966|      0|            ++ctr;
  967|      0|            if (IS_LITTLE_ENDIAN)
  ------------------
  |  |   26|      0|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, Folded]
  |  |  ------------------
  ------------------
  968|       |#ifdef BSWAP4
  969|       |                ctx->Yi.d[3] = BSWAP4(ctr);
  970|       |#else
  971|      0|                PUTU32(ctx->Yi.c + 12, ctr);
  ------------------
  |  |   99|      0|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
  972|      0|#endif
  973|      0|            else
  974|      0|                ctx->Yi.d[3] = ctr;
  975|      0|        }
  976|      0|#if defined(GHASH) && !defined(OPENSSL_SMALL_FOOTPRINT)
  977|      0|        ctx->Xn[mres++] = out[i] = in[i] ^ ctx->EKi.c[n];
  978|      0|        n = (n + 1) % 16;
  979|      0|        if (mres == sizeof(ctx->Xn)) {
  ------------------
  |  Branch (979:13): [True: 0, False: 0]
  ------------------
  980|      0|            GHASH(ctx, ctx->Xn, sizeof(ctx->Xn));
  ------------------
  |  |  331|      0|#define GHASH(ctx, in, len) ctx->funcs.ghash((ctx)->Xi.u, (ctx)->Htable, in, len)
  ------------------
  981|      0|            mres = 0;
  982|      0|        }
  983|       |#else
  984|       |        ctx->Xi.c[n] ^= out[i] = in[i] ^ ctx->EKi.c[n];
  985|       |        mres = n = (n + 1) % 16;
  986|       |        if (n == 0)
  987|       |            GCM_MUL(ctx);
  988|       |#endif
  989|      0|    }
  990|       |
  991|      0|    ctx->mres = mres;
  992|      0|    return 0;
  993|      0|}
CRYPTO_gcm128_decrypt:
  998|  29.0k|{
  999|  29.0k|    DECLARE_IS_ENDIAN;
  ------------------
  |  |   25|  29.0k|#define DECLARE_IS_ENDIAN const int ossl_is_little_endian = __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
  ------------------
 1000|  29.0k|    unsigned int n, ctr, mres;
 1001|  29.0k|    size_t i;
 1002|  29.0k|    u64 mlen = ctx->len.u[1];
 1003|  29.0k|    block128_f block = ctx->block;
 1004|  29.0k|    void *key = ctx->key;
 1005|       |
 1006|  29.0k|    mlen += len;
 1007|  29.0k|    if (mlen > ((U64(1) << 36) - 32) || (sizeof(len) == 8 && mlen < len))
  ------------------
  |  |   24|  29.0k|#define U64(C) C##ULL
  ------------------
  |  Branch (1007:9): [True: 0, False: 29.0k]
  |  Branch (1007:42): [True: 29.0k, Folded]
  |  Branch (1007:62): [True: 0, False: 29.0k]
  ------------------
 1008|      0|        return -1;
 1009|  29.0k|    ctx->len.u[1] = mlen;
 1010|       |
 1011|  29.0k|    mres = ctx->mres;
 1012|       |
 1013|  29.0k|    if (ctx->ares) {
  ------------------
  |  Branch (1013:9): [True: 29.0k, False: 0]
  ------------------
 1014|       |        /* First call to decrypt finalizes GHASH(AAD) */
 1015|  29.0k|#if defined(GHASH) && !defined(OPENSSL_SMALL_FOOTPRINT)
 1016|  29.0k|        if (len == 0) {
  ------------------
  |  Branch (1016:13): [True: 29.0k, False: 0]
  ------------------
 1017|  29.0k|            GCM_MUL(ctx);
  ------------------
  |  |  329|  29.0k|#define GCM_MUL(ctx) ctx->funcs.gmult(ctx->Xi.u, ctx->Htable)
  ------------------
 1018|  29.0k|            ctx->ares = 0;
 1019|  29.0k|            return 0;
 1020|  29.0k|        }
 1021|      0|        memcpy(ctx->Xn, ctx->Xi.c, sizeof(ctx->Xi));
 1022|      0|        ctx->Xi.u[0] = 0;
 1023|      0|        ctx->Xi.u[1] = 0;
 1024|      0|        mres = sizeof(ctx->Xi);
 1025|       |#else
 1026|       |        GCM_MUL(ctx);
 1027|       |#endif
 1028|      0|        ctx->ares = 0;
 1029|      0|    }
 1030|       |
 1031|      0|    if (IS_LITTLE_ENDIAN)
  ------------------
  |  |   26|      0|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, Folded]
  |  |  ------------------
  ------------------
 1032|       |#ifdef BSWAP4
 1033|       |        ctr = BSWAP4(ctx->Yi.d[3]);
 1034|       |#else
 1035|      0|        ctr = GETU32(ctx->Yi.c + 12);
  ------------------
  |  |   98|      0|#define GETU32(p) ((u32)(p)[0] << 24 | (u32)(p)[1] << 16 | (u32)(p)[2] << 8 | (u32)(p)[3])
  ------------------
 1036|      0|#endif
 1037|      0|    else
 1038|      0|        ctr = ctx->Yi.d[3];
 1039|       |
 1040|      0|    n = mres % 16;
 1041|      0|#if !defined(OPENSSL_SMALL_FOOTPRINT)
 1042|      0|    if (16 % sizeof(size_t) == 0) { /* always true actually */
  ------------------
  |  Branch (1042:9): [True: 0, Folded]
  ------------------
 1043|      0|        do {
 1044|      0|            if (n) {
  ------------------
  |  Branch (1044:17): [True: 0, False: 0]
  ------------------
 1045|      0|#if defined(GHASH)
 1046|      0|                while (n && len) {
  ------------------
  |  Branch (1046:24): [True: 0, False: 0]
  |  Branch (1046:29): [True: 0, False: 0]
  ------------------
 1047|      0|                    *(out++) = (ctx->Xn[mres++] = *(in++)) ^ ctx->EKi.c[n];
 1048|      0|                    --len;
 1049|      0|                    n = (n + 1) % 16;
 1050|      0|                }
 1051|      0|                if (n == 0) {
  ------------------
  |  Branch (1051:21): [True: 0, False: 0]
  ------------------
 1052|      0|                    GHASH(ctx, ctx->Xn, mres);
  ------------------
  |  |  331|      0|#define GHASH(ctx, in, len) ctx->funcs.ghash((ctx)->Xi.u, (ctx)->Htable, in, len)
  ------------------
 1053|      0|                    mres = 0;
 1054|      0|                } else {
 1055|      0|                    ctx->mres = mres;
 1056|      0|                    return 0;
 1057|      0|                }
 1058|       |#else
 1059|       |                while (n && len) {
 1060|       |                    u8 c = *(in++);
 1061|       |                    *(out++) = c ^ ctx->EKi.c[n];
 1062|       |                    ctx->Xi.c[n] ^= c;
 1063|       |                    --len;
 1064|       |                    n = (n + 1) % 16;
 1065|       |                }
 1066|       |                if (n == 0) {
 1067|       |                    GCM_MUL(ctx);
 1068|       |                    mres = 0;
 1069|       |                } else {
 1070|       |                    ctx->mres = n;
 1071|       |                    return 0;
 1072|       |                }
 1073|       |#endif
 1074|      0|            }
 1075|      0|#if defined(STRICT_ALIGNMENT)
 1076|      0|            if (((size_t)in | (size_t)out) % sizeof(size_t) != 0)
  ------------------
  |  Branch (1076:17): [True: 0, False: 0]
  ------------------
 1077|      0|                break;
 1078|      0|#endif
 1079|      0|#if defined(GHASH)
 1080|      0|            if (len >= 16 && mres) {
  ------------------
  |  Branch (1080:17): [True: 0, False: 0]
  |  Branch (1080:30): [True: 0, False: 0]
  ------------------
 1081|      0|                GHASH(ctx, ctx->Xn, mres);
  ------------------
  |  |  331|      0|#define GHASH(ctx, in, len) ctx->funcs.ghash((ctx)->Xi.u, (ctx)->Htable, in, len)
  ------------------
 1082|      0|                mres = 0;
 1083|      0|            }
 1084|      0|#if defined(GHASH_CHUNK)
 1085|      0|            while (len >= GHASH_CHUNK) {
  ------------------
  |  |  337|      0|#define GHASH_CHUNK (3 * 1024)
  ------------------
  |  Branch (1085:20): [True: 0, False: 0]
  ------------------
 1086|      0|                size_t j = GHASH_CHUNK;
  ------------------
  |  |  337|      0|#define GHASH_CHUNK (3 * 1024)
  ------------------
 1087|       |
 1088|      0|                GHASH(ctx, in, GHASH_CHUNK);
  ------------------
  |  |  331|      0|#define GHASH(ctx, in, len) ctx->funcs.ghash((ctx)->Xi.u, (ctx)->Htable, in, len)
  ------------------
 1089|      0|                while (j) {
  ------------------
  |  Branch (1089:24): [True: 0, False: 0]
  ------------------
 1090|      0|                    size_t_aX *out_t = (size_t_aX *)out;
 1091|      0|                    const size_t_aX *in_t = (const size_t_aX *)in;
 1092|       |
 1093|      0|                    (*block)(ctx->Yi.c, ctx->EKi.c, key);
 1094|      0|                    ++ctr;
 1095|      0|                    if (IS_LITTLE_ENDIAN)
  ------------------
  |  |   26|      0|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, Folded]
  |  |  ------------------
  ------------------
 1096|       |#ifdef BSWAP4
 1097|       |                        ctx->Yi.d[3] = BSWAP4(ctr);
 1098|       |#else
 1099|      0|                        PUTU32(ctx->Yi.c + 12, ctr);
  ------------------
  |  |   99|      0|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
 1100|      0|#endif
 1101|      0|                    else
 1102|      0|                        ctx->Yi.d[3] = ctr;
 1103|      0|                    for (i = 0; i < 16 / sizeof(size_t); ++i)
  ------------------
  |  Branch (1103:33): [True: 0, False: 0]
  ------------------
 1104|      0|                        out_t[i] = in_t[i] ^ ctx->EKi.t[i];
 1105|      0|                    out += 16;
 1106|      0|                    in += 16;
 1107|      0|                    j -= 16;
 1108|      0|                }
 1109|      0|                len -= GHASH_CHUNK;
  ------------------
  |  |  337|      0|#define GHASH_CHUNK (3 * 1024)
  ------------------
 1110|      0|            }
 1111|      0|#endif
 1112|      0|            if ((i = (len & (size_t)-16))) {
  ------------------
  |  Branch (1112:17): [True: 0, False: 0]
  ------------------
 1113|      0|                GHASH(ctx, in, i);
  ------------------
  |  |  331|      0|#define GHASH(ctx, in, len) ctx->funcs.ghash((ctx)->Xi.u, (ctx)->Htable, in, len)
  ------------------
 1114|      0|                while (len >= 16) {
  ------------------
  |  Branch (1114:24): [True: 0, False: 0]
  ------------------
 1115|      0|                    size_t_aX *out_t = (size_t_aX *)out;
 1116|      0|                    const size_t_aX *in_t = (const size_t_aX *)in;
 1117|       |
 1118|      0|                    (*block)(ctx->Yi.c, ctx->EKi.c, key);
 1119|      0|                    ++ctr;
 1120|      0|                    if (IS_LITTLE_ENDIAN)
  ------------------
  |  |   26|      0|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, Folded]
  |  |  ------------------
  ------------------
 1121|       |#ifdef BSWAP4
 1122|       |                        ctx->Yi.d[3] = BSWAP4(ctr);
 1123|       |#else
 1124|      0|                        PUTU32(ctx->Yi.c + 12, ctr);
  ------------------
  |  |   99|      0|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
 1125|      0|#endif
 1126|      0|                    else
 1127|      0|                        ctx->Yi.d[3] = ctr;
 1128|      0|                    for (i = 0; i < 16 / sizeof(size_t); ++i)
  ------------------
  |  Branch (1128:33): [True: 0, False: 0]
  ------------------
 1129|      0|                        out_t[i] = in_t[i] ^ ctx->EKi.t[i];
 1130|      0|                    out += 16;
 1131|      0|                    in += 16;
 1132|      0|                    len -= 16;
 1133|      0|                }
 1134|      0|            }
 1135|       |#else
 1136|       |            while (len >= 16) {
 1137|       |                size_t *out_t = (size_t *)out;
 1138|       |                const size_t *in_t = (const size_t *)in;
 1139|       |
 1140|       |                (*block)(ctx->Yi.c, ctx->EKi.c, key);
 1141|       |                ++ctr;
 1142|       |                if (IS_LITTLE_ENDIAN)
 1143|       |#ifdef BSWAP4
 1144|       |                    ctx->Yi.d[3] = BSWAP4(ctr);
 1145|       |#else
 1146|       |                    PUTU32(ctx->Yi.c + 12, ctr);
 1147|       |#endif
 1148|       |                else
 1149|       |                    ctx->Yi.d[3] = ctr;
 1150|       |                for (i = 0; i < 16 / sizeof(size_t); ++i) {
 1151|       |                    size_t c = in_t[i];
 1152|       |                    out_t[i] = c ^ ctx->EKi.t[i];
 1153|       |                    ctx->Xi.t[i] ^= c;
 1154|       |                }
 1155|       |                GCM_MUL(ctx);
 1156|       |                out += 16;
 1157|       |                in += 16;
 1158|       |                len -= 16;
 1159|       |            }
 1160|       |#endif
 1161|      0|            if (len) {
  ------------------
  |  Branch (1161:17): [True: 0, False: 0]
  ------------------
 1162|      0|                (*block)(ctx->Yi.c, ctx->EKi.c, key);
 1163|      0|                ++ctr;
 1164|      0|                if (IS_LITTLE_ENDIAN)
  ------------------
  |  |   26|      0|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, Folded]
  |  |  ------------------
  ------------------
 1165|       |#ifdef BSWAP4
 1166|       |                    ctx->Yi.d[3] = BSWAP4(ctr);
 1167|       |#else
 1168|      0|                    PUTU32(ctx->Yi.c + 12, ctr);
  ------------------
  |  |   99|      0|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
 1169|      0|#endif
 1170|      0|                else
 1171|      0|                    ctx->Yi.d[3] = ctr;
 1172|      0|#if defined(GHASH)
 1173|      0|                while (len--) {
  ------------------
  |  Branch (1173:24): [True: 0, False: 0]
  ------------------
 1174|      0|                    out[n] = (ctx->Xn[mres++] = in[n]) ^ ctx->EKi.c[n];
 1175|      0|                    ++n;
 1176|      0|                }
 1177|       |#else
 1178|       |                while (len--) {
 1179|       |                    u8 c = in[n];
 1180|       |                    ctx->Xi.c[n] ^= c;
 1181|       |                    out[n] = c ^ ctx->EKi.c[n];
 1182|       |                    ++n;
 1183|       |                }
 1184|       |                mres = n;
 1185|       |#endif
 1186|      0|            }
 1187|       |
 1188|      0|            ctx->mres = mres;
 1189|      0|            return 0;
 1190|      0|        } while (0);
  ------------------
  |  Branch (1190:18): [Folded, False: 0]
  ------------------
 1191|      0|    }
 1192|      0|#endif
 1193|      0|    for (i = 0; i < len; ++i) {
  ------------------
  |  Branch (1193:17): [True: 0, False: 0]
  ------------------
 1194|      0|        u8 c;
 1195|      0|        if (n == 0) {
  ------------------
  |  Branch (1195:13): [True: 0, False: 0]
  ------------------
 1196|      0|            (*block)(ctx->Yi.c, ctx->EKi.c, key);
 1197|      0|            ++ctr;
 1198|      0|            if (IS_LITTLE_ENDIAN)
  ------------------
  |  |   26|      0|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, Folded]
  |  |  ------------------
  ------------------
 1199|       |#ifdef BSWAP4
 1200|       |                ctx->Yi.d[3] = BSWAP4(ctr);
 1201|       |#else
 1202|      0|                PUTU32(ctx->Yi.c + 12, ctr);
  ------------------
  |  |   99|      0|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
 1203|      0|#endif
 1204|      0|            else
 1205|      0|                ctx->Yi.d[3] = ctr;
 1206|      0|        }
 1207|      0|#if defined(GHASH) && !defined(OPENSSL_SMALL_FOOTPRINT)
 1208|      0|        out[i] = (ctx->Xn[mres++] = c = in[i]) ^ ctx->EKi.c[n];
 1209|      0|        n = (n + 1) % 16;
 1210|      0|        if (mres == sizeof(ctx->Xn)) {
  ------------------
  |  Branch (1210:13): [True: 0, False: 0]
  ------------------
 1211|      0|            GHASH(ctx, ctx->Xn, sizeof(ctx->Xn));
  ------------------
  |  |  331|      0|#define GHASH(ctx, in, len) ctx->funcs.ghash((ctx)->Xi.u, (ctx)->Htable, in, len)
  ------------------
 1212|      0|            mres = 0;
 1213|      0|        }
 1214|       |#else
 1215|       |        c = in[i];
 1216|       |        out[i] = c ^ ctx->EKi.c[n];
 1217|       |        ctx->Xi.c[n] ^= c;
 1218|       |        mres = n = (n + 1) % 16;
 1219|       |        if (n == 0)
 1220|       |            GCM_MUL(ctx);
 1221|       |#endif
 1222|      0|    }
 1223|       |
 1224|      0|    ctx->mres = mres;
 1225|      0|    return 0;
 1226|      0|}
CRYPTO_gcm128_encrypt_ctr32:
 1231|  36.1k|{
 1232|       |#if defined(OPENSSL_SMALL_FOOTPRINT)
 1233|       |    return CRYPTO_gcm128_encrypt(ctx, in, out, len);
 1234|       |#else
 1235|  36.1k|    DECLARE_IS_ENDIAN;
  ------------------
  |  |   25|  36.1k|#define DECLARE_IS_ENDIAN const int ossl_is_little_endian = __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
  ------------------
 1236|  36.1k|    unsigned int n, ctr, mres;
 1237|  36.1k|    size_t i;
 1238|  36.1k|    u64 mlen = ctx->len.u[1];
 1239|  36.1k|    void *key = ctx->key;
 1240|       |
 1241|  36.1k|    mlen += len;
 1242|  36.1k|    if (mlen > ((U64(1) << 36) - 32) || (sizeof(len) == 8 && mlen < len))
  ------------------
  |  |   24|  36.1k|#define U64(C) C##ULL
  ------------------
  |  Branch (1242:9): [True: 0, False: 36.1k]
  |  Branch (1242:42): [True: 36.1k, Folded]
  |  Branch (1242:62): [True: 0, False: 36.1k]
  ------------------
 1243|      0|        return -1;
 1244|  36.1k|    ctx->len.u[1] = mlen;
 1245|       |
 1246|  36.1k|    mres = ctx->mres;
 1247|       |
 1248|  36.1k|    if (ctx->ares) {
  ------------------
  |  Branch (1248:9): [True: 10.6k, False: 25.4k]
  ------------------
 1249|       |        /* First call to encrypt finalizes GHASH(AAD) */
 1250|  10.6k|#if defined(GHASH)
 1251|  10.6k|        if (len == 0) {
  ------------------
  |  Branch (1251:13): [True: 0, False: 10.6k]
  ------------------
 1252|      0|            GCM_MUL(ctx);
  ------------------
  |  |  329|      0|#define GCM_MUL(ctx) ctx->funcs.gmult(ctx->Xi.u, ctx->Htable)
  ------------------
 1253|      0|            ctx->ares = 0;
 1254|      0|            return 0;
 1255|      0|        }
 1256|  10.6k|        memcpy(ctx->Xn, ctx->Xi.c, sizeof(ctx->Xi));
 1257|  10.6k|        ctx->Xi.u[0] = 0;
 1258|  10.6k|        ctx->Xi.u[1] = 0;
 1259|  10.6k|        mres = sizeof(ctx->Xi);
 1260|       |#else
 1261|       |        GCM_MUL(ctx);
 1262|       |#endif
 1263|  10.6k|        ctx->ares = 0;
 1264|  10.6k|    }
 1265|       |
 1266|  36.1k|    if (IS_LITTLE_ENDIAN)
  ------------------
  |  |   26|  36.1k|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 36.1k, Folded]
  |  |  ------------------
  ------------------
 1267|       |#ifdef BSWAP4
 1268|       |        ctr = BSWAP4(ctx->Yi.d[3]);
 1269|       |#else
 1270|  36.1k|        ctr = GETU32(ctx->Yi.c + 12);
  ------------------
  |  |   98|  36.1k|#define GETU32(p) ((u32)(p)[0] << 24 | (u32)(p)[1] << 16 | (u32)(p)[2] << 8 | (u32)(p)[3])
  ------------------
 1271|      0|#endif
 1272|      0|    else
 1273|      0|        ctr = ctx->Yi.d[3];
 1274|       |
 1275|  36.1k|    n = mres % 16;
 1276|  36.1k|    if (n) {
  ------------------
  |  Branch (1276:9): [True: 0, False: 36.1k]
  ------------------
 1277|      0|#if defined(GHASH)
 1278|      0|        while (n && len) {
  ------------------
  |  Branch (1278:16): [True: 0, False: 0]
  |  Branch (1278:21): [True: 0, False: 0]
  ------------------
 1279|      0|            ctx->Xn[mres++] = *(out++) = *(in++) ^ ctx->EKi.c[n];
 1280|      0|            --len;
 1281|      0|            n = (n + 1) % 16;
 1282|      0|        }
 1283|      0|        if (n == 0) {
  ------------------
  |  Branch (1283:13): [True: 0, False: 0]
  ------------------
 1284|      0|            GHASH(ctx, ctx->Xn, mres);
  ------------------
  |  |  331|      0|#define GHASH(ctx, in, len) ctx->funcs.ghash((ctx)->Xi.u, (ctx)->Htable, in, len)
  ------------------
 1285|      0|            mres = 0;
 1286|      0|        } else {
 1287|      0|            ctx->mres = mres;
 1288|      0|            return 0;
 1289|      0|        }
 1290|       |#else
 1291|       |        while (n && len) {
 1292|       |            ctx->Xi.c[n] ^= *(out++) = *(in++) ^ ctx->EKi.c[n];
 1293|       |            --len;
 1294|       |            n = (n + 1) % 16;
 1295|       |        }
 1296|       |        if (n == 0) {
 1297|       |            GCM_MUL(ctx);
 1298|       |            mres = 0;
 1299|       |        } else {
 1300|       |            ctx->mres = n;
 1301|       |            return 0;
 1302|       |        }
 1303|       |#endif
 1304|      0|    }
 1305|  36.1k|#if defined(GHASH)
 1306|  36.1k|    if (len >= 16 && mres) {
  ------------------
  |  Branch (1306:9): [True: 29.0k, False: 7.07k]
  |  Branch (1306:22): [True: 3.69k, False: 25.3k]
  ------------------
 1307|  3.69k|        GHASH(ctx, ctx->Xn, mres);
  ------------------
  |  |  331|  3.69k|#define GHASH(ctx, in, len) ctx->funcs.ghash((ctx)->Xi.u, (ctx)->Htable, in, len)
  ------------------
 1308|  3.69k|        mres = 0;
 1309|  3.69k|    }
 1310|  36.1k|#if defined(GHASH_CHUNK)
 1311|  36.1k|    while (len >= GHASH_CHUNK) {
  ------------------
  |  |  337|  36.1k|#define GHASH_CHUNK (3 * 1024)
  ------------------
  |  Branch (1311:12): [True: 0, False: 36.1k]
  ------------------
 1312|      0|        (*stream)(in, out, GHASH_CHUNK / 16, key, ctx->Yi.c);
  ------------------
  |  |  337|      0|#define GHASH_CHUNK (3 * 1024)
  ------------------
 1313|      0|        ctr += GHASH_CHUNK / 16;
  ------------------
  |  |  337|      0|#define GHASH_CHUNK (3 * 1024)
  ------------------
 1314|      0|        if (IS_LITTLE_ENDIAN)
  ------------------
  |  |   26|      0|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, Folded]
  |  |  ------------------
  ------------------
 1315|       |#ifdef BSWAP4
 1316|       |            ctx->Yi.d[3] = BSWAP4(ctr);
 1317|       |#else
 1318|      0|            PUTU32(ctx->Yi.c + 12, ctr);
  ------------------
  |  |   99|      0|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
 1319|      0|#endif
 1320|      0|        else
 1321|      0|            ctx->Yi.d[3] = ctr;
 1322|      0|        GHASH(ctx, out, GHASH_CHUNK);
  ------------------
  |  |  331|      0|#define GHASH(ctx, in, len) ctx->funcs.ghash((ctx)->Xi.u, (ctx)->Htable, in, len)
  ------------------
 1323|      0|        out += GHASH_CHUNK;
  ------------------
  |  |  337|      0|#define GHASH_CHUNK (3 * 1024)
  ------------------
 1324|      0|        in += GHASH_CHUNK;
  ------------------
  |  |  337|      0|#define GHASH_CHUNK (3 * 1024)
  ------------------
 1325|      0|        len -= GHASH_CHUNK;
  ------------------
  |  |  337|      0|#define GHASH_CHUNK (3 * 1024)
  ------------------
 1326|      0|    }
 1327|  36.1k|#endif
 1328|  36.1k|#endif
 1329|  36.1k|    if ((i = (len & (size_t)-16))) {
  ------------------
  |  Branch (1329:9): [True: 29.0k, False: 7.07k]
  ------------------
 1330|  29.0k|        size_t j = i / 16;
 1331|       |
 1332|  29.0k|        (*stream)(in, out, j, key, ctx->Yi.c);
 1333|  29.0k|        ctr += (unsigned int)j;
 1334|  29.0k|        if (IS_LITTLE_ENDIAN)
  ------------------
  |  |   26|  29.0k|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 29.0k, Folded]
  |  |  ------------------
  ------------------
 1335|       |#ifdef BSWAP4
 1336|       |            ctx->Yi.d[3] = BSWAP4(ctr);
 1337|       |#else
 1338|  29.0k|            PUTU32(ctx->Yi.c + 12, ctr);
  ------------------
  |  |   99|  29.0k|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
 1339|      0|#endif
 1340|      0|        else
 1341|      0|            ctx->Yi.d[3] = ctr;
 1342|  29.0k|        in += i;
 1343|  29.0k|        len -= i;
 1344|  29.0k|#if defined(GHASH)
 1345|  29.0k|        GHASH(ctx, out, i);
  ------------------
  |  |  331|  29.0k|#define GHASH(ctx, in, len) ctx->funcs.ghash((ctx)->Xi.u, (ctx)->Htable, in, len)
  ------------------
 1346|  29.0k|        out += i;
 1347|       |#else
 1348|       |        while (j--) {
 1349|       |            for (i = 0; i < 16; ++i)
 1350|       |                ctx->Xi.c[i] ^= out[i];
 1351|       |            GCM_MUL(ctx);
 1352|       |            out += 16;
 1353|       |        }
 1354|       |#endif
 1355|  29.0k|    }
 1356|  36.1k|    if (len) {
  ------------------
  |  Branch (1356:9): [True: 32.0k, False: 4.12k]
  ------------------
 1357|  32.0k|        (*ctx->block)(ctx->Yi.c, ctx->EKi.c, key);
 1358|  32.0k|        ++ctr;
 1359|  32.0k|        if (IS_LITTLE_ENDIAN)
  ------------------
  |  |   26|  32.0k|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 32.0k, Folded]
  |  |  ------------------
  ------------------
 1360|       |#ifdef BSWAP4
 1361|       |            ctx->Yi.d[3] = BSWAP4(ctr);
 1362|       |#else
 1363|  32.0k|            PUTU32(ctx->Yi.c + 12, ctr);
  ------------------
  |  |   99|  32.0k|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
 1364|      0|#endif
 1365|      0|        else
 1366|      0|            ctx->Yi.d[3] = ctr;
 1367|   221k|        while (len--) {
  ------------------
  |  Branch (1367:16): [True: 189k, False: 32.0k]
  ------------------
 1368|   189k|#if defined(GHASH)
 1369|   189k|            ctx->Xn[mres++] = out[n] = in[n] ^ ctx->EKi.c[n];
 1370|       |#else
 1371|       |            ctx->Xi.c[mres++] ^= out[n] = in[n] ^ ctx->EKi.c[n];
 1372|       |#endif
 1373|   189k|            ++n;
 1374|   189k|        }
 1375|  32.0k|    }
 1376|       |
 1377|  36.1k|    ctx->mres = mres;
 1378|  36.1k|    return 0;
 1379|  36.1k|#endif
 1380|  36.1k|}
CRYPTO_gcm128_decrypt_ctr32:
 1385|  32.5k|{
 1386|       |#if defined(OPENSSL_SMALL_FOOTPRINT)
 1387|       |    return CRYPTO_gcm128_decrypt(ctx, in, out, len);
 1388|       |#else
 1389|  32.5k|    DECLARE_IS_ENDIAN;
  ------------------
  |  |   25|  32.5k|#define DECLARE_IS_ENDIAN const int ossl_is_little_endian = __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
  ------------------
 1390|  32.5k|    unsigned int n, ctr, mres;
 1391|  32.5k|    size_t i;
 1392|  32.5k|    u64 mlen = ctx->len.u[1];
 1393|  32.5k|    void *key = ctx->key;
 1394|       |
 1395|  32.5k|    mlen += len;
 1396|  32.5k|    if (mlen > ((U64(1) << 36) - 32) || (sizeof(len) == 8 && mlen < len))
  ------------------
  |  |   24|  32.5k|#define U64(C) C##ULL
  ------------------
  |  Branch (1396:9): [True: 0, False: 32.5k]
  |  Branch (1396:42): [True: 32.5k, Folded]
  |  Branch (1396:62): [True: 0, False: 32.5k]
  ------------------
 1397|      0|        return -1;
 1398|  32.5k|    ctx->len.u[1] = mlen;
 1399|       |
 1400|  32.5k|    mres = ctx->mres;
 1401|       |
 1402|  32.5k|    if (ctx->ares) {
  ------------------
  |  Branch (1402:9): [True: 3.42k, False: 29.0k]
  ------------------
 1403|       |        /* First call to decrypt finalizes GHASH(AAD) */
 1404|  3.42k|#if defined(GHASH)
 1405|  3.42k|        if (len == 0) {
  ------------------
  |  Branch (1405:13): [True: 0, False: 3.42k]
  ------------------
 1406|      0|            GCM_MUL(ctx);
  ------------------
  |  |  329|      0|#define GCM_MUL(ctx) ctx->funcs.gmult(ctx->Xi.u, ctx->Htable)
  ------------------
 1407|      0|            ctx->ares = 0;
 1408|      0|            return 0;
 1409|      0|        }
 1410|  3.42k|        memcpy(ctx->Xn, ctx->Xi.c, sizeof(ctx->Xi));
 1411|  3.42k|        ctx->Xi.u[0] = 0;
 1412|  3.42k|        ctx->Xi.u[1] = 0;
 1413|  3.42k|        mres = sizeof(ctx->Xi);
 1414|       |#else
 1415|       |        GCM_MUL(ctx);
 1416|       |#endif
 1417|  3.42k|        ctx->ares = 0;
 1418|  3.42k|    }
 1419|       |
 1420|  32.5k|    if (IS_LITTLE_ENDIAN)
  ------------------
  |  |   26|  32.5k|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 32.5k, Folded]
  |  |  ------------------
  ------------------
 1421|       |#ifdef BSWAP4
 1422|       |        ctr = BSWAP4(ctx->Yi.d[3]);
 1423|       |#else
 1424|  32.5k|        ctr = GETU32(ctx->Yi.c + 12);
  ------------------
  |  |   98|  32.5k|#define GETU32(p) ((u32)(p)[0] << 24 | (u32)(p)[1] << 16 | (u32)(p)[2] << 8 | (u32)(p)[3])
  ------------------
 1425|      0|#endif
 1426|      0|    else
 1427|      0|        ctr = ctx->Yi.d[3];
 1428|       |
 1429|  32.5k|    n = mres % 16;
 1430|  32.5k|    if (n) {
  ------------------
  |  Branch (1430:9): [True: 0, False: 32.5k]
  ------------------
 1431|      0|#if defined(GHASH)
 1432|      0|        while (n && len) {
  ------------------
  |  Branch (1432:16): [True: 0, False: 0]
  |  Branch (1432:21): [True: 0, False: 0]
  ------------------
 1433|      0|            *(out++) = (ctx->Xn[mres++] = *(in++)) ^ ctx->EKi.c[n];
 1434|      0|            --len;
 1435|      0|            n = (n + 1) % 16;
 1436|      0|        }
 1437|      0|        if (n == 0) {
  ------------------
  |  Branch (1437:13): [True: 0, False: 0]
  ------------------
 1438|      0|            GHASH(ctx, ctx->Xn, mres);
  ------------------
  |  |  331|      0|#define GHASH(ctx, in, len) ctx->funcs.ghash((ctx)->Xi.u, (ctx)->Htable, in, len)
  ------------------
 1439|      0|            mres = 0;
 1440|      0|        } else {
 1441|      0|            ctx->mres = mres;
 1442|      0|            return 0;
 1443|      0|        }
 1444|       |#else
 1445|       |        while (n && len) {
 1446|       |            u8 c = *(in++);
 1447|       |            *(out++) = c ^ ctx->EKi.c[n];
 1448|       |            ctx->Xi.c[n] ^= c;
 1449|       |            --len;
 1450|       |            n = (n + 1) % 16;
 1451|       |        }
 1452|       |        if (n == 0) {
 1453|       |            GCM_MUL(ctx);
 1454|       |            mres = 0;
 1455|       |        } else {
 1456|       |            ctx->mres = n;
 1457|       |            return 0;
 1458|       |        }
 1459|       |#endif
 1460|      0|    }
 1461|  32.5k|#if defined(GHASH)
 1462|  32.5k|    if (len >= 16 && mres) {
  ------------------
  |  Branch (1462:9): [True: 28.9k, False: 3.59k]
  |  Branch (1462:22): [True: 0, False: 28.9k]
  ------------------
 1463|      0|        GHASH(ctx, ctx->Xn, mres);
  ------------------
  |  |  331|      0|#define GHASH(ctx, in, len) ctx->funcs.ghash((ctx)->Xi.u, (ctx)->Htable, in, len)
  ------------------
 1464|      0|        mres = 0;
 1465|      0|    }
 1466|  32.5k|#if defined(GHASH_CHUNK)
 1467|  32.5k|    while (len >= GHASH_CHUNK) {
  ------------------
  |  |  337|  32.5k|#define GHASH_CHUNK (3 * 1024)
  ------------------
  |  Branch (1467:12): [True: 0, False: 32.5k]
  ------------------
 1468|      0|        GHASH(ctx, in, GHASH_CHUNK);
  ------------------
  |  |  331|      0|#define GHASH(ctx, in, len) ctx->funcs.ghash((ctx)->Xi.u, (ctx)->Htable, in, len)
  ------------------
 1469|      0|        (*stream)(in, out, GHASH_CHUNK / 16, key, ctx->Yi.c);
  ------------------
  |  |  337|      0|#define GHASH_CHUNK (3 * 1024)
  ------------------
 1470|      0|        ctr += GHASH_CHUNK / 16;
  ------------------
  |  |  337|      0|#define GHASH_CHUNK (3 * 1024)
  ------------------
 1471|      0|        if (IS_LITTLE_ENDIAN)
  ------------------
  |  |   26|      0|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, Folded]
  |  |  ------------------
  ------------------
 1472|       |#ifdef BSWAP4
 1473|       |            ctx->Yi.d[3] = BSWAP4(ctr);
 1474|       |#else
 1475|      0|            PUTU32(ctx->Yi.c + 12, ctr);
  ------------------
  |  |   99|      0|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
 1476|      0|#endif
 1477|      0|        else
 1478|      0|            ctx->Yi.d[3] = ctr;
 1479|      0|        out += GHASH_CHUNK;
  ------------------
  |  |  337|      0|#define GHASH_CHUNK (3 * 1024)
  ------------------
 1480|      0|        in += GHASH_CHUNK;
  ------------------
  |  |  337|      0|#define GHASH_CHUNK (3 * 1024)
  ------------------
 1481|      0|        len -= GHASH_CHUNK;
  ------------------
  |  |  337|      0|#define GHASH_CHUNK (3 * 1024)
  ------------------
 1482|      0|    }
 1483|  32.5k|#endif
 1484|  32.5k|#endif
 1485|  32.5k|    if ((i = (len & (size_t)-16))) {
  ------------------
  |  Branch (1485:9): [True: 28.9k, False: 3.59k]
  ------------------
 1486|  28.9k|        size_t j = i / 16;
 1487|       |
 1488|  28.9k|#if defined(GHASH)
 1489|  28.9k|        GHASH(ctx, in, i);
  ------------------
  |  |  331|  28.9k|#define GHASH(ctx, in, len) ctx->funcs.ghash((ctx)->Xi.u, (ctx)->Htable, in, len)
  ------------------
 1490|       |#else
 1491|       |        while (j--) {
 1492|       |            size_t k;
 1493|       |            for (k = 0; k < 16; ++k)
 1494|       |                ctx->Xi.c[k] ^= in[k];
 1495|       |            GCM_MUL(ctx);
 1496|       |            in += 16;
 1497|       |        }
 1498|       |        j = i / 16;
 1499|       |        in -= i;
 1500|       |#endif
 1501|  28.9k|        (*stream)(in, out, j, key, ctx->Yi.c);
 1502|  28.9k|        ctr += (unsigned int)j;
 1503|  28.9k|        if (IS_LITTLE_ENDIAN)
  ------------------
  |  |   26|  28.9k|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 28.9k, Folded]
  |  |  ------------------
  ------------------
 1504|       |#ifdef BSWAP4
 1505|       |            ctx->Yi.d[3] = BSWAP4(ctr);
 1506|       |#else
 1507|  28.9k|            PUTU32(ctx->Yi.c + 12, ctr);
  ------------------
  |  |   99|  28.9k|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
 1508|      0|#endif
 1509|      0|        else
 1510|      0|            ctx->Yi.d[3] = ctr;
 1511|  28.9k|        out += i;
 1512|  28.9k|        in += i;
 1513|  28.9k|        len -= i;
 1514|  28.9k|    }
 1515|  32.5k|    if (len) {
  ------------------
  |  Branch (1515:9): [True: 28.3k, False: 4.12k]
  ------------------
 1516|  28.3k|        (*ctx->block)(ctx->Yi.c, ctx->EKi.c, key);
 1517|  28.3k|        ++ctr;
 1518|  28.3k|        if (IS_LITTLE_ENDIAN)
  ------------------
  |  |   26|  28.3k|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 28.3k, Folded]
  |  |  ------------------
  ------------------
 1519|       |#ifdef BSWAP4
 1520|       |            ctx->Yi.d[3] = BSWAP4(ctr);
 1521|       |#else
 1522|  28.3k|            PUTU32(ctx->Yi.c + 12, ctr);
  ------------------
  |  |   99|  28.3k|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
 1523|      0|#endif
 1524|      0|        else
 1525|      0|            ctx->Yi.d[3] = ctr;
 1526|   206k|        while (len--) {
  ------------------
  |  Branch (1526:16): [True: 177k, False: 28.3k]
  ------------------
 1527|   177k|#if defined(GHASH)
 1528|   177k|            out[n] = (ctx->Xn[mres++] = in[n]) ^ ctx->EKi.c[n];
 1529|       |#else
 1530|       |            u8 c = in[n];
 1531|       |            ctx->Xi.c[mres++] ^= c;
 1532|       |            out[n] = c ^ ctx->EKi.c[n];
 1533|       |#endif
 1534|   177k|            ++n;
 1535|   177k|        }
 1536|  28.3k|    }
 1537|       |
 1538|  32.5k|    ctx->mres = mres;
 1539|  32.5k|    return 0;
 1540|  32.5k|#endif
 1541|  32.5k|}
CRYPTO_gcm128_finish:
 1545|  68.6k|{
 1546|  68.6k|    DECLARE_IS_ENDIAN;
  ------------------
  |  |   25|  68.6k|#define DECLARE_IS_ENDIAN const int ossl_is_little_endian = __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
  ------------------
 1547|  68.6k|    u64 alen = ctx->len.u[0] << 3;
 1548|  68.6k|    u64 clen = ctx->len.u[1] << 3;
 1549|       |
 1550|  68.6k|#if defined(GHASH) && !defined(OPENSSL_SMALL_FOOTPRINT)
 1551|  68.6k|    u128 bitlen;
 1552|  68.6k|    unsigned int mres = ctx->mres;
 1553|       |
 1554|  68.6k|    if (mres) {
  ------------------
  |  Branch (1554:9): [True: 60.4k, False: 8.24k]
  ------------------
 1555|  60.4k|        unsigned blocks = (mres + 15) & -16;
 1556|       |
 1557|  60.4k|        memset(ctx->Xn + mres, 0, blocks - mres);
 1558|  60.4k|        mres = blocks;
 1559|  60.4k|        if (mres == sizeof(ctx->Xn)) {
  ------------------
  |  Branch (1559:13): [True: 0, False: 60.4k]
  ------------------
 1560|      0|            GHASH(ctx, ctx->Xn, mres);
  ------------------
  |  |  331|      0|#define GHASH(ctx, in, len) ctx->funcs.ghash((ctx)->Xi.u, (ctx)->Htable, in, len)
  ------------------
 1561|      0|            mres = 0;
 1562|      0|        }
 1563|  60.4k|    } else if (ctx->ares) {
  ------------------
  |  Branch (1563:16): [True: 0, False: 8.24k]
  ------------------
 1564|      0|        GCM_MUL(ctx);
  ------------------
  |  |  329|      0|#define GCM_MUL(ctx) ctx->funcs.gmult(ctx->Xi.u, ctx->Htable)
  ------------------
 1565|      0|    }
 1566|       |#else
 1567|       |    if (ctx->mres || ctx->ares)
 1568|       |        GCM_MUL(ctx);
 1569|       |#endif
 1570|       |
 1571|  68.6k|    if (IS_LITTLE_ENDIAN) {
  ------------------
  |  |   26|  68.6k|#define IS_LITTLE_ENDIAN (ossl_is_little_endian)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 68.6k, Folded]
  |  |  ------------------
  ------------------
 1572|       |#ifdef BSWAP8
 1573|       |        alen = BSWAP8(alen);
 1574|       |        clen = BSWAP8(clen);
 1575|       |#else
 1576|  68.6k|        u8 *p = ctx->len.c;
 1577|       |
 1578|  68.6k|        ctx->len.u[0] = alen;
 1579|  68.6k|        ctx->len.u[1] = clen;
 1580|       |
 1581|  68.6k|        alen = (u64)GETU32(p) << 32 | GETU32(p + 4);
  ------------------
  |  |   98|  68.6k|#define GETU32(p) ((u32)(p)[0] << 24 | (u32)(p)[1] << 16 | (u32)(p)[2] << 8 | (u32)(p)[3])
  ------------------
                      alen = (u64)GETU32(p) << 32 | GETU32(p + 4);
  ------------------
  |  |   98|  68.6k|#define GETU32(p) ((u32)(p)[0] << 24 | (u32)(p)[1] << 16 | (u32)(p)[2] << 8 | (u32)(p)[3])
  ------------------
 1582|  68.6k|        clen = (u64)GETU32(p + 8) << 32 | GETU32(p + 12);
  ------------------
  |  |   98|  68.6k|#define GETU32(p) ((u32)(p)[0] << 24 | (u32)(p)[1] << 16 | (u32)(p)[2] << 8 | (u32)(p)[3])
  ------------------
                      clen = (u64)GETU32(p + 8) << 32 | GETU32(p + 12);
  ------------------
  |  |   98|  68.6k|#define GETU32(p) ((u32)(p)[0] << 24 | (u32)(p)[1] << 16 | (u32)(p)[2] << 8 | (u32)(p)[3])
  ------------------
 1583|  68.6k|#endif
 1584|  68.6k|    }
 1585|       |
 1586|  68.6k|#if defined(GHASH) && !defined(OPENSSL_SMALL_FOOTPRINT)
 1587|  68.6k|    bitlen.hi = alen;
 1588|  68.6k|    bitlen.lo = clen;
 1589|  68.6k|    memcpy(ctx->Xn + mres, &bitlen, sizeof(bitlen));
 1590|  68.6k|    mres += sizeof(bitlen);
 1591|  68.6k|    GHASH(ctx, ctx->Xn, mres);
  ------------------
  |  |  331|  68.6k|#define GHASH(ctx, in, len) ctx->funcs.ghash((ctx)->Xi.u, (ctx)->Htable, in, len)
  ------------------
 1592|       |#else
 1593|       |    ctx->Xi.u[0] ^= alen;
 1594|       |    ctx->Xi.u[1] ^= clen;
 1595|       |    GCM_MUL(ctx);
 1596|       |#endif
 1597|       |
 1598|  68.6k|    ctx->Xi.u[0] ^= ctx->EK0.u[0];
 1599|  68.6k|    ctx->Xi.u[1] ^= ctx->EK0.u[1];
 1600|       |
 1601|  68.6k|    if (tag && len <= sizeof(ctx->Xi))
  ------------------
  |  Branch (1601:9): [True: 32.5k, False: 36.1k]
  |  Branch (1601:16): [True: 32.5k, False: 0]
  ------------------
 1602|  32.5k|        return CRYPTO_memcmp(ctx->Xi.c, tag, len);
  ------------------
  |  |  332|  32.5k|#define CRYPTO_memcmp memcmp
  ------------------
 1603|  36.1k|    else
 1604|  36.1k|        return -1;
 1605|  68.6k|}
CRYPTO_gcm128_tag:
 1608|  36.1k|{
 1609|  36.1k|    CRYPTO_gcm128_finish(ctx, NULL, 0);
 1610|  36.1k|    memcpy(tag, ctx->Xi.c,
 1611|  36.1k|        len <= sizeof(ctx->Xi.c) ? len : sizeof(ctx->Xi.c));
  ------------------
  |  Branch (1611:9): [True: 36.1k, False: 0]
  ------------------
 1612|  36.1k|}
gcm128.c:gcm_get_funcs:
  429|  28.9k|{
  430|       |    /* set defaults -- overridden below as needed */
  431|  28.9k|    ctx->ginit = gcm_init_4bit;
  432|       |#if !defined(GHASH_ASM)
  433|       |    ctx->gmult = gcm_gmult_4bit;
  434|       |#else
  435|  28.9k|    ctx->gmult = NULL;
  436|  28.9k|#endif
  437|       |#if !defined(GHASH_ASM) && !defined(OPENSSL_SMALL_FOOTPRINT)
  438|       |    ctx->ghash = gcm_ghash_4bit;
  439|       |#else
  440|  28.9k|    ctx->ghash = NULL;
  441|  28.9k|#endif
  442|       |
  443|  28.9k|#if defined(GHASH_ASM_X86_OR_64)
  444|  28.9k|#if !defined(GHASH_ASM_X86) || defined(OPENSSL_IA32_SSE2)
  445|       |    /* x86_64 */
  446|  28.9k|    if (OPENSSL_ia32cap_P[1] & (1 << 1)) { /* check PCLMULQDQ bit */
  ------------------
  |  Branch (446:9): [True: 28.9k, False: 0]
  ------------------
  447|  28.9k|        if (((OPENSSL_ia32cap_P[1] >> 22) & 0x41) == 0x41) { /* AVX+MOVBE */
  ------------------
  |  Branch (447:13): [True: 28.9k, False: 0]
  ------------------
  448|  28.9k|            ctx->ginit = gcm_init_avx;
  449|  28.9k|            ctx->gmult = gcm_gmult_avx;
  450|  28.9k|            ctx->ghash = gcm_ghash_avx;
  451|  28.9k|        } else {
  452|      0|            ctx->ginit = gcm_init_clmul;
  453|      0|            ctx->gmult = gcm_gmult_clmul;
  454|      0|            ctx->ghash = gcm_ghash_clmul;
  455|      0|        }
  456|  28.9k|        return;
  457|  28.9k|    }
  458|      0|#endif
  459|       |#if defined(GHASH_ASM_X86)
  460|       |    /* x86 only */
  461|       |#if defined(OPENSSL_IA32_SSE2)
  462|       |    if (OPENSSL_ia32cap_P[0] & (1 << 25)) { /* check SSE bit */
  463|       |        ctx->gmult = gcm_gmult_4bit_mmx;
  464|       |        ctx->ghash = gcm_ghash_4bit_mmx;
  465|       |        return;
  466|       |    }
  467|       |#else
  468|       |    if (OPENSSL_ia32cap_P[0] & (1 << 23)) { /* check MMX bit */
  469|       |        ctx->gmult = gcm_gmult_4bit_mmx;
  470|       |        ctx->ghash = gcm_ghash_4bit_mmx;
  471|       |        return;
  472|       |    }
  473|       |#endif
  474|       |    ctx->gmult = gcm_gmult_4bit_x86;
  475|       |    ctx->ghash = gcm_ghash_4bit_x86;
  476|       |    return;
  477|       |#else
  478|       |    /* x86_64 fallback defaults */
  479|      0|    ctx->gmult = gcm_gmult_4bit;
  480|      0|    ctx->ghash = gcm_ghash_4bit;
  481|      0|    return;
  482|  28.9k|#endif
  483|       |#elif defined(GHASH_ASM_ARM)
  484|       |    /* ARM defaults */
  485|       |    ctx->gmult = gcm_gmult_4bit;
  486|       |#if !defined(OPENSSL_SMALL_FOOTPRINT)
  487|       |    ctx->ghash = gcm_ghash_4bit;
  488|       |#else
  489|       |    ctx->ghash = NULL;
  490|       |#endif
  491|       |#ifdef PMULL_CAPABLE
  492|       |    if (PMULL_CAPABLE) {
  493|       |        ctx->ginit = (gcm_init_fn)gcm_init_v8;
  494|       |        ctx->gmult = gcm_gmult_v8;
  495|       |        ctx->ghash = gcm_ghash_v8;
  496|       |    }
  497|       |#elif defined(NEON_CAPABLE)
  498|       |    if (NEON_CAPABLE) {
  499|       |        ctx->ginit = gcm_init_neon;
  500|       |        ctx->gmult = gcm_gmult_neon;
  501|       |        ctx->ghash = gcm_ghash_neon;
  502|       |    }
  503|       |#endif
  504|       |    return;
  505|       |#elif defined(GHASH_ASM_SPARC)
  506|       |    /* SPARC defaults */
  507|       |    ctx->gmult = gcm_gmult_4bit;
  508|       |    ctx->ghash = gcm_ghash_4bit;
  509|       |    if (OPENSSL_sparcv9cap_P[0] & SPARCV9_VIS3) {
  510|       |        ctx->ginit = gcm_init_vis3;
  511|       |        ctx->gmult = gcm_gmult_vis3;
  512|       |        ctx->ghash = gcm_ghash_vis3;
  513|       |    }
  514|       |    return;
  515|       |#elif defined(GHASH_ASM_PPC)
  516|       |    /* PowerPC does not define GHASH_ASM; defaults set above */
  517|       |    if (OPENSSL_ppccap_P & PPC_CRYPTO207) {
  518|       |        ctx->ginit = gcm_init_p8;
  519|       |        ctx->gmult = gcm_gmult_p8;
  520|       |        ctx->ghash = gcm_ghash_p8;
  521|       |    }
  522|       |    return;
  523|       |#elif defined(GHASH_ASM_RV64I)
  524|       |    /* RISCV defaults */
  525|       |    ctx->gmult = gcm_gmult_4bit;
  526|       |    ctx->ghash = gcm_ghash_4bit;
  527|       |
  528|       |    if (RISCV_HAS_ZVKG() && riscv_vlen() >= 128) {
  529|       |        if (RISCV_HAS_ZVKB())
  530|       |            ctx->ginit = gcm_init_rv64i_zvkg_zvkb;
  531|       |        else
  532|       |            ctx->ginit = gcm_init_rv64i_zvkg;
  533|       |        ctx->gmult = gcm_gmult_rv64i_zvkg;
  534|       |        ctx->ghash = gcm_ghash_rv64i_zvkg;
  535|       |    } else if (RISCV_HAS_ZVKB() && RISCV_HAS_ZVBC() && riscv_vlen() >= 128) {
  536|       |        ctx->ginit = gcm_init_rv64i_zvkb_zvbc;
  537|       |        ctx->gmult = gcm_gmult_rv64i_zvkb_zvbc;
  538|       |        ctx->ghash = gcm_ghash_rv64i_zvkb_zvbc;
  539|       |    } else if (RISCV_HAS_ZBC()) {
  540|       |        if (RISCV_HAS_ZBKB()) {
  541|       |            ctx->ginit = gcm_init_rv64i_zbc__zbkb;
  542|       |            ctx->gmult = gcm_gmult_rv64i_zbc__zbkb;
  543|       |            ctx->ghash = gcm_ghash_rv64i_zbc__zbkb;
  544|       |        } else if (RISCV_HAS_ZBB()) {
  545|       |            ctx->ginit = gcm_init_rv64i_zbc__zbb;
  546|       |            ctx->gmult = gcm_gmult_rv64i_zbc;
  547|       |            ctx->ghash = gcm_ghash_rv64i_zbc;
  548|       |        } else {
  549|       |            ctx->ginit = gcm_init_rv64i_zbc;
  550|       |            ctx->gmult = gcm_gmult_rv64i_zbc;
  551|       |            ctx->ghash = gcm_ghash_rv64i_zbc;
  552|       |        }
  553|       |    }
  554|       |    return;
  555|       |#elif defined(GHASH_ASM)
  556|       |    /* all other architectures use the generic names */
  557|       |    ctx->gmult = gcm_gmult_4bit;
  558|       |    ctx->ghash = gcm_ghash_4bit;
  559|       |    return;
  560|       |#endif
  561|  28.9k|}

openssl_fopen:
   39|      2|{
   40|      2|    FILE *file = NULL;
   41|       |#if defined(_WIN32) && defined(CP_UTF8)
   42|       |    int sz, len_0;
   43|       |    DWORD flags;
   44|       |#endif
   45|       |
   46|      2|    if (filename == NULL)
  ------------------
  |  Branch (46:9): [True: 0, False: 2]
  ------------------
   47|      0|        return NULL;
   48|       |#if defined(_WIN32) && defined(CP_UTF8)
   49|       |    len_0 = (int)strlen(filename) + 1;
   50|       |
   51|       |    /*
   52|       |     * Basically there are three cases to cover: a) filename is
   53|       |     * pure ASCII string; b) actual UTF-8 encoded string and
   54|       |     * c) locale-ized string, i.e. one containing 8-bit
   55|       |     * characters that are meaningful in current system locale.
   56|       |     * If filename is pure ASCII or real UTF-8 encoded string,
   57|       |     * MultiByteToWideChar succeeds and _wfopen works. If
   58|       |     * filename is locale-ized string, chances are that
   59|       |     * MultiByteToWideChar fails reporting
   60|       |     * ERROR_NO_UNICODE_TRANSLATION, in which case we fall
   61|       |     * back to fopen...
   62|       |     */
   63|       |    if ((sz = MultiByteToWideChar(CP_UTF8, (flags = MB_ERR_INVALID_CHARS),
   64|       |             filename, len_0, NULL, 0))
   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|    file = fopen(filename, mode);
  115|      2|#endif
  116|      2|    return file;
  117|      2|}

CRYPTO_strdup:
   23|   704k|{
   24|   704k|    char *ret;
   25|   704k|    size_t len;
   26|       |
   27|   704k|    if (str == NULL)
  ------------------
  |  Branch (27:9): [True: 0, False: 704k]
  ------------------
   28|      0|        return NULL;
   29|       |
   30|   704k|    len = strlen(str) + 1;
   31|   704k|    ret = CRYPTO_malloc(len, file, line);
   32|   704k|    if (ret != NULL)
  ------------------
  |  Branch (32:9): [True: 704k, False: 0]
  ------------------
   33|   704k|        memcpy(ret, str, len);
   34|   704k|    return ret;
   35|   704k|}
CRYPTO_strndup:
   38|  7.60k|{
   39|  7.60k|    size_t maxlen;
   40|  7.60k|    char *ret;
   41|       |
   42|  7.60k|    if (str == NULL)
  ------------------
  |  Branch (42:9): [True: 0, False: 7.60k]
  ------------------
   43|      0|        return NULL;
   44|       |
   45|  7.60k|    maxlen = OPENSSL_strnlen(str, s);
   46|       |
   47|  7.60k|    ret = CRYPTO_malloc(maxlen + 1, file, line);
   48|  7.60k|    if (ret) {
  ------------------
  |  Branch (48:9): [True: 7.60k, False: 0]
  ------------------
   49|  7.60k|        memcpy(ret, str, maxlen);
   50|  7.60k|        ret[maxlen] = CH_ZERO;
  ------------------
  |  |   20|  7.60k|#define CH_ZERO '\0'
  ------------------
   51|  7.60k|    }
   52|  7.60k|    return ret;
   53|  7.60k|}
CRYPTO_memdup:
   56|  69.3k|{
   57|  69.3k|    void *ret;
   58|       |
   59|  69.3k|    if (data == NULL || siz >= INT_MAX)
  ------------------
  |  Branch (59:9): [True: 0, False: 69.3k]
  |  Branch (59:25): [True: 0, False: 69.3k]
  ------------------
   60|      0|        return NULL;
   61|       |
   62|  69.3k|    ret = CRYPTO_malloc(siz, file, line);
   63|  69.3k|    if (ret == NULL)
  ------------------
  |  Branch (63:9): [True: 0, False: 69.3k]
  ------------------
   64|      0|        return NULL;
   65|  69.3k|    return memcpy(ret, data, siz);
   66|  69.3k|}
OPENSSL_strnlen:
   69|  7.60k|{
   70|  7.60k|    const char *p;
   71|       |
   72|  91.5k|    for (p = str; maxlen-- != 0 && *p != CH_ZERO; ++p)
  ------------------
  |  |   20|  83.9k|#define CH_ZERO '\0'
  ------------------
  |  Branch (72:19): [True: 83.9k, False: 7.60k]
  |  Branch (72:36): [True: 83.9k, False: 0]
  ------------------
   73|  83.9k|        ;
   74|       |
   75|  7.60k|    return p - str;
   76|  7.60k|}
OPENSSL_strlcpy:
   79|  60.3k|{
   80|  60.3k|    size_t l = 0;
   81|   656k|    for (; size > 1 && *src; size--) {
  ------------------
  |  Branch (81:12): [True: 656k, False: 0]
  |  Branch (81:24): [True: 596k, False: 60.3k]
  ------------------
   82|   596k|        *dst++ = *src++;
   83|   596k|        l++;
   84|   596k|    }
   85|  60.3k|    if (size)
  ------------------
  |  Branch (85:9): [True: 60.3k, False: 0]
  ------------------
   86|  60.3k|        *dst = CH_ZERO;
  ------------------
  |  |   20|  60.3k|#define CH_ZERO '\0'
  ------------------
   87|  60.3k|    return l + strlen(src);
   88|  60.3k|}
OPENSSL_strlcat:
   91|  22.4k|{
   92|  22.4k|    size_t l = 0;
   93|   171k|    for (; size > 0 && *dst; size--, dst++)
  ------------------
  |  Branch (93:12): [True: 171k, False: 0]
  |  Branch (93:24): [True: 149k, False: 22.4k]
  ------------------
   94|   149k|        l++;
   95|  22.4k|    return l + OPENSSL_strlcpy(dst, src, size);
   96|  22.4k|}
ossl_buf2hexstr_sep:
  343|     20|{
  344|     20|    char *tmp;
  345|     20|    size_t tmp_n;
  346|       |
  347|     20|    if (buflen < 0)
  ------------------
  |  Branch (347:9): [True: 0, False: 20]
  ------------------
  348|      0|        return NULL;
  349|     20|    if (buflen == 0)
  ------------------
  |  Branch (349:9): [True: 0, False: 20]
  ------------------
  350|      0|        return OPENSSL_zalloc(1);
  ------------------
  |  |  109|      0|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  351|       |
  352|     20|    if ((sep != CH_ZERO && (size_t)buflen > SIZE_MAX / 3)
  ------------------
  |  |   20|     40|#define CH_ZERO '\0'
  ------------------
  |  Branch (352:10): [True: 20, False: 0]
  |  Branch (352:28): [True: 0, False: 20]
  ------------------
  353|     20|        || (sep == CH_ZERO && (size_t)buflen > (SIZE_MAX - 1) / 2)) {
  ------------------
  |  |   20|     40|#define CH_ZERO '\0'
  ------------------
  |  Branch (353:13): [True: 0, False: 20]
  |  Branch (353:31): [True: 0, False: 0]
  ------------------
  354|      0|        ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_MANY_BYTES);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  355|      0|        return NULL;
  356|      0|    }
  357|       |
  358|     20|    tmp_n = (sep != CH_ZERO) ? (size_t)buflen * 3 : 1 + (size_t)buflen * 2;
  ------------------
  |  |   20|     20|#define CH_ZERO '\0'
  ------------------
  |  Branch (358:13): [True: 20, False: 0]
  ------------------
  359|     20|    if ((tmp = OPENSSL_malloc(tmp_n)) == NULL)
  ------------------
  |  |  107|     20|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (359:9): [True: 0, False: 20]
  ------------------
  360|      0|        return NULL;
  361|       |
  362|     20|    if (buf2hexstr_sep(tmp, tmp_n, NULL, buf, buflen, sep))
  ------------------
  |  Branch (362:9): [True: 20, False: 0]
  ------------------
  363|     20|        return tmp;
  364|      0|    OPENSSL_free(tmp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  365|       |    return NULL;
  366|     20|}
OPENSSL_buf2hexstr:
  374|     20|{
  375|     20|    return ossl_buf2hexstr_sep(buf, buflen, DEFAULT_SEPARATOR);
  ------------------
  |  |   19|     20|#define DEFAULT_SEPARATOR ':'
  ------------------
  376|     20|}
OPENSSL_strcasecmp:
  426|  2.39M|{
  427|  2.39M|    int t;
  428|       |
  429|  6.29M|    while ((t = ossl_tolower(*s1) - ossl_tolower(*s2++)) == 0)
  ------------------
  |  Branch (429:12): [True: 4.16M, False: 2.12M]
  ------------------
  430|  4.16M|        if (*s1++ == '\0')
  ------------------
  |  Branch (430:13): [True: 275k, False: 3.89M]
  ------------------
  431|   275k|            return 0;
  432|  2.12M|    return t;
  433|  2.39M|}
OPENSSL_strncasecmp:
  436|  7.94M|{
  437|  7.94M|    int t;
  438|  7.94M|    size_t i;
  439|       |
  440|  9.07M|    for (i = 0; i < n; i++)
  ------------------
  |  Branch (440:17): [True: 8.98M, False: 87.6k]
  ------------------
  441|  8.98M|        if ((t = ossl_tolower(*s1) - ossl_tolower(*s2++)) != 0)
  ------------------
  |  Branch (441:13): [True: 7.85M, False: 1.13M]
  ------------------
  442|  7.85M|            return t;
  443|  1.13M|        else if (*s1++ == '\0')
  ------------------
  |  Branch (443:18): [True: 0, False: 1.13M]
  ------------------
  444|      0|            return 0;
  445|  87.6k|    return 0;
  446|  7.94M|}
ossl_to_hex:
  449|    400|{
  450|    400|    static const char hexdig[] = "0123456789ABCDEF";
  451|       |
  452|    400|    return to_hex(buf, n, hexdig);
  453|    400|}
o_str.c:buf2hexstr_sep:
  297|     20|{
  298|     20|    char *q;
  299|     20|    int has_sep = (sep != CH_ZERO);
  ------------------
  |  |   20|     20|#define CH_ZERO '\0'
  ------------------
  300|     20|    size_t i, len = has_sep ? buflen * 3 : 1 + buflen * 2;
  ------------------
  |  Branch (300:21): [True: 20, False: 0]
  ------------------
  301|       |
  302|     20|    if (buflen > (has_sep ? SIZE_MAX / 3 : (SIZE_MAX - 1) / 2)) {
  ------------------
  |  Branch (302:9): [True: 0, False: 20]
  |  Branch (302:19): [True: 20, False: 0]
  ------------------
  303|      0|        ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_MANY_BYTES);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  304|      0|        return 0;
  305|      0|    }
  306|       |
  307|     20|    if (len == 0)
  ------------------
  |  Branch (307:9): [True: 0, False: 20]
  ------------------
  308|      0|        ++len;
  309|     20|    if (strlength != NULL)
  ------------------
  |  Branch (309:9): [True: 0, False: 20]
  ------------------
  310|      0|        *strlength = len;
  311|     20|    if (str == NULL)
  ------------------
  |  Branch (311:9): [True: 0, False: 20]
  ------------------
  312|      0|        return 1;
  313|       |
  314|     20|    if (str_n < len) {
  ------------------
  |  Branch (314:9): [True: 0, False: 20]
  ------------------
  315|      0|        ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_SMALL_BUFFER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  316|      0|        return 0;
  317|      0|    }
  318|       |
  319|     20|    q = str;
  320|    420|    for (i = 0; i < buflen; i++) {
  ------------------
  |  Branch (320:17): [True: 400, False: 20]
  ------------------
  321|    400|        q += ossl_to_hex(q, buf[i]);
  322|    400|        if (has_sep)
  ------------------
  |  Branch (322:13): [True: 400, False: 0]
  ------------------
  323|    400|            *q++ = sep;
  324|    400|    }
  325|     20|    if (has_sep && buflen > 0)
  ------------------
  |  Branch (325:9): [True: 20, False: 0]
  |  Branch (325:20): [True: 20, False: 0]
  ------------------
  326|     20|        --q;
  327|     20|    *q = CH_ZERO;
  ------------------
  |  |   20|     20|#define CH_ZERO '\0'
  ------------------
  328|       |
  329|       |#ifdef CHARSET_EBCDIC
  330|       |    ebcdic2ascii(str, str, q - str);
  331|       |#endif
  332|     20|    return 1;
  333|     20|}

OBJ_NAME_init:
   64|  12.2k|{
   65|  12.2k|    return RUN_ONCE(&init, o_names_init);
  ------------------
  |  |  130|  12.2k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 12.2k, False: 0]
  |  |  ------------------
  ------------------
   66|  12.2k|}
OBJ_NAME_get:
  153|  11.3k|{
  154|  11.3k|    OBJ_NAME on, *ret;
  155|  11.3k|    int num = 0, alias;
  156|  11.3k|    const char *value = NULL;
  157|       |
  158|  11.3k|    if (name == NULL)
  ------------------
  |  Branch (158:9): [True: 0, False: 11.3k]
  ------------------
  159|      0|        return NULL;
  160|  11.3k|    if (!OBJ_NAME_init())
  ------------------
  |  Branch (160:9): [True: 0, False: 11.3k]
  ------------------
  161|      0|        return NULL;
  162|  11.3k|    if (!CRYPTO_THREAD_read_lock(obj_lock))
  ------------------
  |  Branch (162:9): [True: 0, False: 11.3k]
  ------------------
  163|      0|        return NULL;
  164|       |
  165|  11.3k|    alias = type & OBJ_NAME_ALIAS;
  ------------------
  |  |   33|  11.3k|#define OBJ_NAME_ALIAS 0x8000
  ------------------
  166|  11.3k|    type &= ~OBJ_NAME_ALIAS;
  ------------------
  |  |   33|  11.3k|#define OBJ_NAME_ALIAS 0x8000
  ------------------
  167|       |
  168|  11.3k|    on.name = name;
  169|  11.3k|    on.type = type;
  170|       |
  171|  11.4k|    for (;;) {
  172|  11.4k|        ret = lh_OBJ_NAME_retrieve(names_lh, &on);
  173|  11.4k|        if (ret == NULL)
  ------------------
  |  Branch (173:13): [True: 164, False: 11.3k]
  ------------------
  174|    164|            break;
  175|  11.3k|        if ((ret->alias) && !alias) {
  ------------------
  |  Branch (175:13): [True: 95, False: 11.2k]
  |  Branch (175:29): [True: 95, False: 0]
  ------------------
  176|     95|            if (++num > 10)
  ------------------
  |  Branch (176:17): [True: 0, False: 95]
  ------------------
  177|      0|                break;
  178|     95|            on.name = ret->data;
  179|  11.2k|        } else {
  180|  11.2k|            value = ret->data;
  181|  11.2k|            break;
  182|  11.2k|        }
  183|  11.3k|    }
  184|       |
  185|  11.3k|    CRYPTO_THREAD_unlock(obj_lock);
  186|  11.3k|    return value;
  187|  11.3k|}
OBJ_NAME_add:
  190|    848|{
  191|    848|    OBJ_NAME *onp, *ret;
  192|    848|    int alias, ok = 0;
  193|       |
  194|    848|    if (!OBJ_NAME_init())
  ------------------
  |  Branch (194:9): [True: 0, False: 848]
  ------------------
  195|      0|        return 0;
  196|       |
  197|    848|    alias = type & OBJ_NAME_ALIAS;
  ------------------
  |  |   33|    848|#define OBJ_NAME_ALIAS 0x8000
  ------------------
  198|    848|    type &= ~OBJ_NAME_ALIAS;
  ------------------
  |  |   33|    848|#define OBJ_NAME_ALIAS 0x8000
  ------------------
  199|       |
  200|    848|    onp = OPENSSL_malloc(sizeof(*onp));
  ------------------
  |  |  107|    848|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  201|    848|    if (onp == NULL)
  ------------------
  |  Branch (201:9): [True: 0, False: 848]
  ------------------
  202|      0|        return 0;
  203|       |
  204|    848|    onp->name = name;
  205|    848|    onp->alias = alias;
  206|    848|    onp->type = type;
  207|    848|    onp->data = data;
  208|       |
  209|    848|    if (!CRYPTO_THREAD_write_lock(obj_lock)) {
  ------------------
  |  Branch (209:9): [True: 0, False: 848]
  ------------------
  210|      0|        OPENSSL_free(onp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  211|      0|        return 0;
  212|      0|    }
  213|       |
  214|    848|    ret = lh_OBJ_NAME_insert(names_lh, onp);
  215|    848|    if (ret != NULL) {
  ------------------
  |  Branch (215:9): [True: 364, False: 484]
  ------------------
  216|       |        /* free things */
  217|    364|        if ((name_funcs_stack != NULL)
  ------------------
  |  Branch (217:13): [True: 0, False: 364]
  ------------------
  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|    364|        OPENSSL_free(ret);
  ------------------
  |  |  132|    364|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  229|    484|    } else {
  230|    484|        if (lh_OBJ_NAME_error(names_lh)) {
  ------------------
  |  Branch (230:13): [True: 0, False: 484]
  ------------------
  231|       |            /* ERROR */
  232|      0|            OPENSSL_free(onp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  233|      0|            goto unlock;
  234|      0|        }
  235|    484|    }
  236|       |
  237|    848|    ok = 1;
  238|       |
  239|    848|unlock:
  240|    848|    CRYPTO_THREAD_unlock(obj_lock);
  241|    848|    return ok;
  242|    848|}
OBJ_NAME_do_all:
  296|      2|{
  297|      2|    OBJ_DOALL d;
  298|       |
  299|      2|    d.type = type;
  300|      2|    d.fn = fn;
  301|      2|    d.arg = arg;
  302|       |
  303|      2|    lh_OBJ_NAME_doall_OBJ_DOALL(names_lh, do_all_fn, &d);
  304|      2|}
o_names.c:o_names_init:
   51|      2|{
   52|      2|    names_lh = NULL;
   53|      2|    obj_lock = CRYPTO_THREAD_lock_new();
   54|      2|    if (obj_lock != NULL)
  ------------------
  |  Branch (54:9): [True: 2, False: 0]
  ------------------
   55|      2|        names_lh = lh_OBJ_NAME_new(obj_name_hash, obj_name_cmp);
   56|      2|    if (names_lh == NULL) {
  ------------------
  |  Branch (56:9): [True: 0, False: 2]
  ------------------
   57|      0|        CRYPTO_THREAD_lock_free(obj_lock);
   58|      0|        obj_lock = NULL;
   59|      0|    }
   60|      2|    return names_lh != NULL && obj_lock != NULL;
  ------------------
  |  Branch (60:12): [True: 2, False: 0]
  |  Branch (60:32): [True: 2, False: 0]
  ------------------
   61|      2|}
o_names.c:obj_name_hash:
  137|  12.3k|{
  138|  12.3k|    unsigned long ret;
  139|       |
  140|  12.3k|    if ((name_funcs_stack != NULL)
  ------------------
  |  Branch (140:9): [True: 0, False: 12.3k]
  ------------------
  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|  12.3k|    } else {
  146|  12.3k|        ret = ossl_lh_strcasehash(a->name);
  147|  12.3k|    }
  148|  12.3k|    ret ^= a->type;
  149|  12.3k|    return ret;
  150|  12.3k|}
o_names.c:obj_name_cmp:
  120|  11.6k|{
  121|  11.6k|    int ret;
  122|       |
  123|  11.6k|    ret = a->type - b->type;
  124|  11.6k|    if (ret == 0) {
  ------------------
  |  Branch (124:9): [True: 11.6k, False: 0]
  ------------------
  125|  11.6k|        if ((name_funcs_stack != NULL)
  ------------------
  |  Branch (125:13): [True: 0, False: 11.6k]
  ------------------
  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|  11.6k|            ret = OPENSSL_strcasecmp(a->name, b->name);
  132|  11.6k|    }
  133|  11.6k|    return ret;
  134|  11.6k|}
o_names.c:do_all_fn:
  287|    484|{
  288|    484|    if (name->type == d->type)
  ------------------
  |  Branch (288:9): [True: 242, False: 242]
  ------------------
  289|    242|        d->fn(name, d->arg);
  290|    484|}

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

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

OBJ_dup:
   18|  21.8k|{
   19|  21.8k|    ASN1_OBJECT *r;
   20|       |
   21|  21.8k|    if (o == NULL)
  ------------------
  |  Branch (21:9): [True: 0, False: 21.8k]
  ------------------
   22|      0|        return NULL;
   23|       |    /* If object isn't dynamic it's an internal OID which is never freed */
   24|  21.8k|    if (!(o->flags & ASN1_OBJECT_FLAG_DYNAMIC))
  ------------------
  |  |  146|  21.8k|#define ASN1_OBJECT_FLAG_DYNAMIC 0x01 /* internal use */
  ------------------
  |  Branch (24:9): [True: 21.8k, False: 0]
  ------------------
   25|  21.8k|        return (ASN1_OBJECT *)o;
   26|       |
   27|      0|    r = ossl_asn1_object_new();
   28|      0|    if (r == NULL) {
  ------------------
  |  Branch (28:9): [True: 0, False: 0]
  ------------------
   29|      0|        ERR_raise(ERR_LIB_OBJ, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   30|      0|        return NULL;
   31|      0|    }
   32|       |
   33|       |    /* Set dynamic flags so everything gets freed up on error */
   34|       |
   35|      0|    r->flags = o->flags | (ASN1_OBJECT_FLAG_DYNAMIC | ASN1_OBJECT_FLAG_DYNAMIC_STRINGS | ASN1_OBJECT_FLAG_DYNAMIC_DATA);
  ------------------
  |  |  146|      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);
  ------------------
  |  |  148|      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);
  ------------------
  |  |  149|      0|#define ASN1_OBJECT_FLAG_DYNAMIC_DATA 0x08 /* internal use */
  ------------------
   36|       |
   37|      0|    if (o->length > 0 && (r->data = OPENSSL_memdup(o->data, o->length)) == NULL)
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (37:9): [True: 0, False: 0]
  |  Branch (37:26): [True: 0, False: 0]
  ------------------
   38|      0|        goto err;
   39|       |
   40|      0|    r->length = o->length;
   41|      0|    r->nid = o->nid;
   42|       |
   43|      0|    if (o->ln != NULL && (r->ln = OPENSSL_strdup(o->ln)) == NULL)
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (43:9): [True: 0, False: 0]
  |  Branch (43:26): [True: 0, False: 0]
  ------------------
   44|      0|        goto err;
   45|       |
   46|      0|    if (o->sn != NULL && (r->sn = OPENSSL_strdup(o->sn)) == NULL)
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (46:9): [True: 0, False: 0]
  |  Branch (46:26): [True: 0, False: 0]
  ------------------
   47|      0|        goto err;
   48|       |
   49|      0|    return r;
   50|      0|err:
   51|      0|    ASN1_OBJECT_free(r);
   52|       |    return NULL;
   53|      0|}
OBJ_cmp:
   56|  3.62k|{
   57|  3.62k|    int ret;
   58|       |
   59|  3.62k|    ret = (a->length - b->length);
   60|  3.62k|    if (ret)
  ------------------
  |  Branch (60:9): [True: 0, False: 3.62k]
  ------------------
   61|      0|        return ret;
   62|  3.62k|    if (a->length == 0)
  ------------------
  |  Branch (62:9): [True: 0, False: 3.62k]
  ------------------
   63|      0|        return 0;
   64|  3.62k|    return memcmp(a->data, b->data, a->length);
   65|  3.62k|}

OBJ_find_sigid_algs:
  104|  21.6k|{
  105|  21.6k|    return ossl_obj_find_sigid_algs(signid, pdig_nid, ppkey_nid, 1);
  106|  21.6k|}
OBJ_add_sigid:
  148|  29.4k|{
  149|  29.4k|    nid_triple *ntr;
  150|  29.4k|    int dnid = NID_undef, pnid = NID_undef, ret = 0;
  ------------------
  |  |   18|  29.4k|#define NID_undef                       0
  ------------------
                  int dnid = NID_undef, pnid = NID_undef, ret = 0;
  ------------------
  |  |   18|  29.4k|#define NID_undef                       0
  ------------------
  151|       |
  152|  29.4k|    if (signid == NID_undef || pkey_id == NID_undef)
  ------------------
  |  |   18|  58.9k|#define NID_undef                       0
  ------------------
                  if (signid == NID_undef || pkey_id == NID_undef)
  ------------------
  |  |   18|  29.4k|#define NID_undef                       0
  ------------------
  |  Branch (152:9): [True: 0, False: 29.4k]
  |  Branch (152:32): [True: 0, False: 29.4k]
  ------------------
  153|      0|        return 0;
  154|       |
  155|  29.4k|    if (!obj_sig_init())
  ------------------
  |  Branch (155:9): [True: 0, False: 29.4k]
  ------------------
  156|      0|        return 0;
  157|       |
  158|  29.4k|    if ((ntr = OPENSSL_malloc(sizeof(*ntr))) == NULL)
  ------------------
  |  |  107|  29.4k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (158:9): [True: 0, False: 29.4k]
  ------------------
  159|      0|        return 0;
  160|  29.4k|    ntr->sign_id = signid;
  161|  29.4k|    ntr->hash_id = dig_id;
  162|  29.4k|    ntr->pkey_id = pkey_id;
  163|       |
  164|  29.4k|    if (!CRYPTO_THREAD_write_lock(sig_lock)) {
  ------------------
  |  Branch (164:9): [True: 0, False: 29.4k]
  ------------------
  165|      0|        ERR_raise(ERR_LIB_OBJ, ERR_R_UNABLE_TO_GET_WRITE_LOCK);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  166|      0|        OPENSSL_free(ntr);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  167|      0|        return 0;
  168|      0|    }
  169|       |
  170|       |    /* Check that the entry doesn't exist or exists as desired */
  171|  29.4k|    if (ossl_obj_find_sigid_algs(signid, &dnid, &pnid, 0)) {
  ------------------
  |  Branch (171:9): [True: 29.4k, False: 1]
  ------------------
  172|  29.4k|        ret = dnid == dig_id && pnid == pkey_id;
  ------------------
  |  Branch (172:15): [True: 29.4k, False: 0]
  |  Branch (172:33): [True: 29.4k, False: 0]
  ------------------
  173|  29.4k|        goto err;
  174|  29.4k|    }
  175|       |
  176|      1|    if (sig_app == NULL) {
  ------------------
  |  Branch (176:9): [True: 1, False: 0]
  ------------------
  177|      1|        sig_app = sk_nid_triple_new(sig_sk_cmp);
  178|      1|        if (sig_app == NULL)
  ------------------
  |  Branch (178:13): [True: 0, False: 1]
  ------------------
  179|      0|            goto err;
  180|      1|    }
  181|      1|    if (sigx_app == NULL) {
  ------------------
  |  Branch (181:9): [True: 1, False: 0]
  ------------------
  182|      1|        sigx_app = sk_nid_triple_new(sigx_cmp);
  183|      1|        if (sigx_app == NULL)
  ------------------
  |  Branch (183:13): [True: 0, False: 1]
  ------------------
  184|      0|            goto err;
  185|      1|    }
  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|      1|    if (!sk_nid_triple_push(sig_app, ntr))
  ------------------
  |  Branch (191:9): [True: 0, False: 1]
  ------------------
  192|      0|        goto err;
  193|      1|    if (!sk_nid_triple_push(sigx_app, ntr)) {
  ------------------
  |  Branch (193:9): [True: 0, False: 1]
  ------------------
  194|      0|        ntr = NULL; /* This is referenced by sig_app still */
  195|      0|        goto err;
  196|      0|    }
  197|       |
  198|      1|    sk_nid_triple_sort(sig_app);
  199|      1|    sk_nid_triple_sort(sigx_app);
  200|       |
  201|      1|    ntr = NULL;
  202|      1|    ret = 1;
  203|  29.4k|err:
  204|  29.4k|    OPENSSL_free(ntr);
  ------------------
  |  |  132|  29.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  205|  29.4k|    CRYPTO_THREAD_unlock(sig_lock);
  206|  29.4k|    return ret;
  207|      1|}
obj_xref.c:ossl_obj_find_sigid_algs:
   68|  51.0k|{
   69|  51.0k|    nid_triple tmp;
   70|  51.0k|    const nid_triple *rv;
   71|  51.0k|    int idx;
   72|       |
   73|  51.0k|    if (signid == NID_undef)
  ------------------
  |  |   18|  51.0k|#define NID_undef                       0
  ------------------
  |  Branch (73:9): [True: 0, False: 51.0k]
  ------------------
   74|      0|        return 0;
   75|       |
   76|  51.0k|    tmp.sign_id = signid;
   77|  51.0k|    rv = OBJ_bsearch_sig(&tmp, sigoid_srt, OSSL_NELEM(sigoid_srt));
  ------------------
  |  |   14|  51.0k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
   78|  51.0k|    if (rv == NULL) {
  ------------------
  |  Branch (78:9): [True: 7.36k, False: 43.7k]
  ------------------
   79|  7.36k|        if (!obj_sig_init())
  ------------------
  |  Branch (79:13): [True: 0, False: 7.36k]
  ------------------
   80|      0|            return 0;
   81|  7.36k|        if (lock && !CRYPTO_THREAD_read_lock(sig_lock)) {
  ------------------
  |  Branch (81:13): [True: 0, False: 7.36k]
  |  Branch (81:21): [True: 0, False: 0]
  ------------------
   82|      0|            ERR_raise(ERR_LIB_OBJ, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   83|      0|            return 0;
   84|      0|        }
   85|  7.36k|        if (sig_app != NULL) {
  ------------------
  |  Branch (85:13): [True: 7.36k, False: 1]
  ------------------
   86|  7.36k|            idx = sk_nid_triple_find(sig_app, &tmp);
   87|  7.36k|            if (idx >= 0)
  ------------------
  |  Branch (87:17): [True: 7.36k, False: 0]
  ------------------
   88|  7.36k|                rv = sk_nid_triple_value(sig_app, idx);
   89|  7.36k|        }
   90|  7.36k|        if (lock)
  ------------------
  |  Branch (90:13): [True: 0, False: 7.36k]
  ------------------
   91|      0|            CRYPTO_THREAD_unlock(sig_lock);
   92|  7.36k|        if (rv == NULL)
  ------------------
  |  Branch (92:13): [True: 1, False: 7.36k]
  ------------------
   93|      1|            return 0;
   94|  7.36k|    }
   95|       |
   96|  51.0k|    if (pdig_nid != NULL)
  ------------------
  |  Branch (96:9): [True: 40.2k, False: 10.8k]
  ------------------
   97|  40.2k|        *pdig_nid = rv->hash_id;
   98|  51.0k|    if (ppkey_nid != NULL)
  ------------------
  |  Branch (98:9): [True: 51.0k, False: 0]
  ------------------
   99|  51.0k|        *ppkey_nid = rv->pkey_id;
  100|  51.0k|    return 1;
  101|  51.0k|}
obj_xref.c:sig_cmp:
   20|   284k|{
   21|   284k|    return a->sign_id - b->sign_id;
   22|   284k|}
obj_xref.c:obj_sig_init:
   62|  36.8k|{
   63|  36.8k|    return RUN_ONCE(&sig_init, o_sig_init);
  ------------------
  |  |  130|  36.8k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 36.8k, False: 0]
  |  |  ------------------
  ------------------
   64|  36.8k|}
obj_xref.c:o_sig_init:
   56|      1|{
   57|      1|    sig_lock = CRYPTO_THREAD_lock_new();
   58|       |    return sig_lock != NULL;
   59|      1|}
obj_xref.c:sig_sk_cmp:
   28|  7.36k|{
   29|  7.36k|    return (*a)->sign_id - (*b)->sign_id;
   30|  7.36k|}

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

WPACKET_allocate_bytes:
   20|  2.34M|{
   21|  2.34M|    if (!WPACKET_reserve_bytes(pkt, len, allocbytes))
  ------------------
  |  Branch (21:9): [True: 0, False: 2.34M]
  ------------------
   22|      0|        return 0;
   23|       |
   24|  2.34M|    pkt->written += len;
   25|  2.34M|    pkt->curr += len;
   26|  2.34M|    return 1;
   27|  2.34M|}
WPACKET_sub_allocate_bytes__:
   31|  3.62k|{
   32|  3.62k|    if (!WPACKET_start_sub_packet_len__(pkt, lenbytes)
  ------------------
  |  Branch (32:9): [True: 0, False: 3.62k]
  ------------------
   33|  3.62k|        || !WPACKET_allocate_bytes(pkt, len, allocbytes)
  ------------------
  |  Branch (33:12): [True: 0, False: 3.62k]
  ------------------
   34|  3.62k|        || !WPACKET_close(pkt))
  ------------------
  |  Branch (34:12): [True: 0, False: 3.62k]
  ------------------
   35|      0|        return 0;
   36|       |
   37|  3.62k|    return 1;
   38|  3.62k|}
WPACKET_reserve_bytes:
   47|  2.44M|{
   48|       |    /* Internal API, so should not fail */
   49|  2.44M|    if (!ossl_assert(pkt->subs != NULL && len != 0))
  ------------------
  |  |   52|  4.89M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 2.44M, False: 0]
  |  |  |  Branch (52:41): [True: 2.44M, False: 0]
  |  |  ------------------
  |  |   53|  2.44M|    __FILE__, __LINE__)
  ------------------
  |  Branch (49:9): [True: 0, False: 2.44M]
  ------------------
   50|      0|        return 0;
   51|       |
   52|  2.44M|    if (pkt->maxsize - pkt->written < len)
  ------------------
  |  Branch (52:9): [True: 0, False: 2.44M]
  ------------------
   53|      0|        return 0;
   54|       |
   55|  2.44M|    if (pkt->buf != NULL && (pkt->buf->length - pkt->written < len)) {
  ------------------
  |  Branch (55:9): [True: 753k, False: 1.69M]
  |  Branch (55:29): [True: 10.7k, False: 742k]
  ------------------
   56|  10.7k|        size_t newlen;
   57|  10.7k|        size_t reflen;
   58|       |
   59|  10.7k|        reflen = (len > pkt->buf->length) ? len : pkt->buf->length;
  ------------------
  |  Branch (59:18): [True: 3.62k, False: 7.16k]
  ------------------
   60|       |
   61|  10.7k|        if (reflen > SIZE_MAX / 2) {
  ------------------
  |  Branch (61:13): [True: 0, False: 10.7k]
  ------------------
   62|      0|            newlen = SIZE_MAX;
   63|  10.7k|        } else {
   64|  10.7k|            newlen = reflen * 2;
   65|  10.7k|            if (newlen < DEFAULT_BUF_SIZE)
  ------------------
  |  |   17|  10.7k|#define DEFAULT_BUF_SIZE 256
  ------------------
  |  Branch (65:17): [True: 7.21k, False: 3.58k]
  ------------------
   66|  7.21k|                newlen = DEFAULT_BUF_SIZE;
  ------------------
  |  |   17|  7.21k|#define DEFAULT_BUF_SIZE 256
  ------------------
   67|  10.7k|        }
   68|  10.7k|        if (BUF_MEM_grow(pkt->buf, newlen) == 0)
  ------------------
  |  Branch (68:13): [True: 0, False: 10.7k]
  ------------------
   69|      0|            return 0;
   70|  10.7k|    }
   71|  2.44M|    if (allocbytes != NULL) {
  ------------------
  |  Branch (71:9): [True: 2.32M, False: 122k]
  ------------------
   72|  2.32M|        *allocbytes = WPACKET_get_curr(pkt);
   73|  2.32M|        if (pkt->endfirst && *allocbytes != NULL)
  ------------------
  |  Branch (73:13): [True: 32.6k, False: 2.29M]
  |  Branch (73:30): [True: 32.6k, False: 0]
  ------------------
   74|  32.6k|            *allocbytes -= len;
   75|  2.32M|    }
   76|       |
   77|  2.44M|    return 1;
   78|  2.44M|}
WPACKET_init_static_len:
  131|   267k|{
  132|   267k|    size_t max = maxmaxsize(lenbytes);
  133|       |
  134|       |    /* Internal API, so should not fail */
  135|   267k|    if (!ossl_assert(buf != NULL && len > 0))
  ------------------
  |  |   52|   535k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 267k, False: 0]
  |  |  |  Branch (52:41): [True: 267k, False: 0]
  |  |  ------------------
  |  |   53|   267k|    __FILE__, __LINE__)
  ------------------
  |  Branch (135:9): [True: 0, False: 267k]
  ------------------
  136|      0|        return 0;
  137|       |
  138|   267k|    pkt->staticbuf = buf;
  139|   267k|    pkt->buf = NULL;
  140|   267k|    pkt->maxsize = (max < len) ? max : len;
  ------------------
  |  Branch (140:20): [True: 0, False: 267k]
  ------------------
  141|   267k|    pkt->endfirst = 0;
  142|       |
  143|   267k|    return wpacket_intern_init_len(pkt, lenbytes);
  144|   267k|}
WPACKET_init_der:
  147|  10.8k|{
  148|       |    /* Internal API, so should not fail */
  149|  10.8k|    if (!ossl_assert(buf != NULL && len > 0))
  ------------------
  |  |   52|  21.7k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 10.8k, False: 0]
  |  |  |  Branch (52:41): [True: 10.8k, False: 0]
  |  |  ------------------
  |  |   53|  10.8k|    __FILE__, __LINE__)
  ------------------
  |  Branch (149:9): [True: 0, False: 10.8k]
  ------------------
  150|      0|        return 0;
  151|       |
  152|  10.8k|    pkt->staticbuf = buf;
  153|  10.8k|    pkt->buf = NULL;
  154|  10.8k|    pkt->maxsize = len;
  155|  10.8k|    pkt->endfirst = 1;
  156|       |
  157|  10.8k|    return wpacket_intern_init_len(pkt, 0);
  158|  10.8k|}
WPACKET_init_len:
  161|  43.4k|{
  162|       |    /* Internal API, so should not fail */
  163|  43.4k|    if (!ossl_assert(buf != NULL))
  ------------------
  |  |   52|  43.4k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  43.4k|    __FILE__, __LINE__)
  ------------------
  |  Branch (163:9): [True: 0, False: 43.4k]
  ------------------
  164|      0|        return 0;
  165|       |
  166|  43.4k|    pkt->staticbuf = NULL;
  167|  43.4k|    pkt->buf = buf;
  168|  43.4k|    pkt->maxsize = maxmaxsize(lenbytes);
  169|  43.4k|    pkt->endfirst = 0;
  170|       |
  171|  43.4k|    return wpacket_intern_init_len(pkt, lenbytes);
  172|  43.4k|}
WPACKET_init:
  175|  39.8k|{
  176|  39.8k|    return WPACKET_init_len(pkt, buf, 0);
  177|  39.8k|}
WPACKET_init_null:
  180|  29.1k|{
  181|  29.1k|    pkt->staticbuf = NULL;
  182|  29.1k|    pkt->buf = NULL;
  183|  29.1k|    pkt->maxsize = maxmaxsize(lenbytes);
  184|  29.1k|    pkt->endfirst = 0;
  185|       |
  186|  29.1k|    return wpacket_intern_init_len(pkt, 0);
  187|  29.1k|}
WPACKET_set_flags:
  200|  7.25k|{
  201|       |    /* Internal API, so should not fail */
  202|  7.25k|    if (!ossl_assert(pkt->subs != NULL))
  ------------------
  |  |   52|  7.25k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  7.25k|    __FILE__, __LINE__)
  ------------------
  |  Branch (202:9): [True: 0, False: 7.25k]
  ------------------
  203|      0|        return 0;
  204|       |
  205|  7.25k|    pkt->subs->flags = flags;
  206|       |
  207|  7.25k|    return 1;
  208|  7.25k|}
WPACKET_close:
  336|   645k|{
  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|   645k|    if (pkt->subs == NULL || pkt->subs->parent == NULL)
  ------------------
  |  Branch (341:9): [True: 0, False: 645k]
  |  Branch (341:30): [True: 0, False: 645k]
  ------------------
  342|      0|        return 0;
  343|       |
  344|   645k|    return wpacket_intern_close(pkt, pkt->subs, 1);
  345|   645k|}
WPACKET_finish:
  348|   351k|{
  349|   351k|    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|   351k|    if (pkt->subs == NULL || pkt->subs->parent != NULL)
  ------------------
  |  Branch (355:9): [True: 0, False: 351k]
  |  Branch (355:30): [True: 0, False: 351k]
  ------------------
  356|      0|        return 0;
  357|       |
  358|   351k|    ret = wpacket_intern_close(pkt, pkt->subs, 1);
  359|   351k|    if (ret) {
  ------------------
  |  Branch (359:9): [True: 351k, False: 0]
  ------------------
  360|   351k|        OPENSSL_free(pkt->subs);
  ------------------
  |  |  132|   351k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  361|   351k|        pkt->subs = NULL;
  362|   351k|    }
  363|       |
  364|   351k|    return ret;
  365|   351k|}
WPACKET_start_sub_packet_len__:
  368|   645k|{
  369|   645k|    WPACKET_SUB *sub;
  370|   645k|    unsigned char *lenchars;
  371|       |
  372|       |    /* Internal API, so should not fail */
  373|   645k|    if (!ossl_assert(pkt->subs != NULL))
  ------------------
  |  |   52|   645k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   645k|    __FILE__, __LINE__)
  ------------------
  |  Branch (373:9): [True: 0, False: 645k]
  ------------------
  374|      0|        return 0;
  375|       |
  376|       |    /* We don't support lenbytes greater than 0 when doing endfirst writing */
  377|   645k|    if (lenbytes > 0 && pkt->endfirst)
  ------------------
  |  Branch (377:9): [True: 532k, False: 112k]
  |  Branch (377:25): [True: 0, False: 532k]
  ------------------
  378|      0|        return 0;
  379|       |
  380|   645k|    if ((sub = OPENSSL_zalloc(sizeof(*sub))) == NULL)
  ------------------
  |  |  109|   645k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (380:9): [True: 0, False: 645k]
  ------------------
  381|      0|        return 0;
  382|       |
  383|   645k|    sub->parent = pkt->subs;
  384|   645k|    pkt->subs = sub;
  385|   645k|    sub->pwritten = pkt->written + lenbytes;
  386|   645k|    sub->lenbytes = lenbytes;
  387|       |
  388|   645k|    if (lenbytes == 0) {
  ------------------
  |  Branch (388:9): [True: 112k, False: 532k]
  ------------------
  389|   112k|        sub->packet_len = 0;
  390|   112k|        return 1;
  391|   112k|    }
  392|       |
  393|   532k|    sub->packet_len = pkt->written;
  394|       |
  395|   532k|    if (!WPACKET_allocate_bytes(pkt, lenbytes, &lenchars))
  ------------------
  |  Branch (395:9): [True: 0, False: 532k]
  ------------------
  396|      0|        return 0;
  397|       |
  398|   532k|    return 1;
  399|   532k|}
WPACKET_start_sub_packet:
  402|   112k|{
  403|   112k|    return WPACKET_start_sub_packet_len__(pkt, 0);
  404|   112k|}
WPACKET_put_bytes__:
  407|  1.13M|{
  408|  1.13M|    unsigned char *data;
  409|       |
  410|       |    /* Internal API, so should not fail */
  411|  1.13M|    if (!ossl_assert(size <= sizeof(uint64_t))
  ------------------
  |  |   52|  2.26M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  2.26M|    __FILE__, __LINE__)
  ------------------
  |  Branch (411:9): [True: 0, False: 1.13M]
  ------------------
  412|  1.13M|        || !WPACKET_allocate_bytes(pkt, size, &data)
  ------------------
  |  Branch (412:12): [True: 0, False: 1.13M]
  ------------------
  413|  1.13M|        || !put_value(data, val, size))
  ------------------
  |  Branch (413:12): [True: 0, False: 1.13M]
  ------------------
  414|      0|        return 0;
  415|       |
  416|  1.13M|    return 1;
  417|  1.13M|}
WPACKET_memcpy:
  461|   568k|{
  462|   568k|    unsigned char *dest;
  463|       |
  464|   568k|    if (len == 0)
  ------------------
  |  Branch (464:9): [True: 72.4k, False: 495k]
  ------------------
  465|  72.4k|        return 1;
  466|       |
  467|   495k|    if (!WPACKET_allocate_bytes(pkt, len, &dest))
  ------------------
  |  Branch (467:9): [True: 0, False: 495k]
  ------------------
  468|      0|        return 0;
  469|       |
  470|   495k|    if (dest != NULL)
  ------------------
  |  Branch (470:9): [True: 495k, False: 0]
  ------------------
  471|   495k|        memcpy(dest, src, len);
  472|       |
  473|   495k|    return 1;
  474|   495k|}
WPACKET_sub_memcpy__:
  478|   184k|{
  479|   184k|    if (!WPACKET_start_sub_packet_len__(pkt, lenbytes)
  ------------------
  |  Branch (479:9): [True: 0, False: 184k]
  ------------------
  480|   184k|        || !WPACKET_memcpy(pkt, src, len)
  ------------------
  |  Branch (480:12): [True: 0, False: 184k]
  ------------------
  481|   184k|        || !WPACKET_close(pkt))
  ------------------
  |  Branch (481:12): [True: 0, False: 184k]
  ------------------
  482|      0|        return 0;
  483|       |
  484|   184k|    return 1;
  485|   184k|}
WPACKET_get_total_written:
  488|   293k|{
  489|       |    /* Internal API, so should not fail */
  490|   293k|    if (!ossl_assert(written != NULL))
  ------------------
  |  |   52|   293k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   293k|    __FILE__, __LINE__)
  ------------------
  |  Branch (490:9): [True: 0, False: 293k]
  ------------------
  491|      0|        return 0;
  492|       |
  493|   293k|    *written = pkt->written;
  494|       |
  495|   293k|    return 1;
  496|   293k|}
WPACKET_get_length:
  499|   206k|{
  500|       |    /* Internal API, so should not fail */
  501|   206k|    if (!ossl_assert(pkt->subs != NULL && len != NULL))
  ------------------
  |  |   52|   412k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 206k, False: 0]
  |  |  |  Branch (52:41): [True: 206k, False: 0]
  |  |  ------------------
  |  |   53|   206k|    __FILE__, __LINE__)
  ------------------
  |  Branch (501:9): [True: 0, False: 206k]
  ------------------
  502|      0|        return 0;
  503|       |
  504|   206k|    *len = pkt->written - pkt->subs->pwritten;
  505|       |
  506|   206k|    return 1;
  507|   206k|}
WPACKET_get_curr:
  510|  2.37M|{
  511|  2.37M|    unsigned char *buf = GETBUF(pkt);
  ------------------
  |  |   40|  2.37M|#define GETBUF(p) (((p)->staticbuf != NULL)         \
  |  |  ------------------
  |  |  |  Branch (40:20): [True: 1.40M, False: 972k]
  |  |  ------------------
  |  |   41|  2.37M|        ? (p)->staticbuf                            \
  |  |   42|  2.37M|        : ((p)->buf != NULL                         \
  |  |  ------------------
  |  |  |  Branch (42:12): [True: 753k, False: 218k]
  |  |  ------------------
  |  |   43|   972k|                  ? (unsigned char *)(p)->buf->data \
  |  |   44|   972k|                  : NULL))
  ------------------
  512|       |
  513|  2.37M|    if (buf == NULL)
  ------------------
  |  Branch (513:9): [True: 218k, False: 2.15M]
  ------------------
  514|   218k|        return NULL;
  515|       |
  516|  2.15M|    if (pkt->endfirst)
  ------------------
  |  Branch (516:9): [True: 43.5k, False: 2.11M]
  ------------------
  517|  43.5k|        return buf + pkt->maxsize - pkt->curr;
  518|       |
  519|  2.11M|    return buf + pkt->curr;
  520|  2.15M|}
WPACKET_is_null_buf:
  523|  29.1k|{
  524|  29.1k|    return pkt->buf == NULL && pkt->staticbuf == NULL;
  ------------------
  |  Branch (524:12): [True: 25.5k, False: 3.62k]
  |  Branch (524:32): [True: 21.9k, False: 3.62k]
  ------------------
  525|  29.1k|}
WPACKET_cleanup:
  528|  61.5k|{
  529|  61.5k|    WPACKET_SUB *sub, *parent;
  530|       |
  531|  61.5k|    for (sub = pkt->subs; sub != NULL; sub = parent) {
  ------------------
  |  Branch (531:27): [True: 0, False: 61.5k]
  ------------------
  532|      0|        parent = sub->parent;
  533|      0|        OPENSSL_free(sub);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  534|      0|    }
  535|       |    pkt->subs = NULL;
  536|  61.5k|}
packet.c:maxmaxsize:
   96|   340k|{
   97|   340k|    if (lenbytes >= sizeof(size_t) || lenbytes == 0)
  ------------------
  |  Branch (97:9): [True: 0, False: 340k]
  |  Branch (97:39): [True: 340k, False: 0]
  ------------------
   98|   340k|        return SIZE_MAX;
   99|       |
  100|      0|    return ((size_t)1 << (lenbytes * 8)) - 1 + lenbytes;
  101|   340k|}
packet.c:wpacket_intern_init_len:
  104|   351k|{
  105|   351k|    unsigned char *lenchars;
  106|       |
  107|   351k|    pkt->curr = 0;
  108|   351k|    pkt->written = 0;
  109|       |
  110|   351k|    if ((pkt->subs = OPENSSL_zalloc(sizeof(*pkt->subs))) == NULL)
  ------------------
  |  |  109|   351k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (110:9): [True: 0, False: 351k]
  ------------------
  111|      0|        return 0;
  112|       |
  113|   351k|    if (lenbytes == 0)
  ------------------
  |  Branch (113:9): [True: 351k, False: 0]
  ------------------
  114|   351k|        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);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#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|   996k|{
  252|   996k|    size_t packlen = pkt->written - sub->pwritten;
  253|       |
  254|   996k|    if (packlen == 0
  ------------------
  |  Branch (254:9): [True: 86.9k, False: 909k]
  ------------------
  255|  86.9k|        && (sub->flags & WPACKET_FLAGS_NON_ZERO_LENGTH) != 0)
  ------------------
  |  |  717|  86.9k|#define WPACKET_FLAGS_NON_ZERO_LENGTH 1
  ------------------
  |  Branch (255:12): [True: 0, False: 86.9k]
  ------------------
  256|      0|        return 0;
  257|       |
  258|   996k|    if (packlen == 0
  ------------------
  |  Branch (258:9): [True: 86.9k, False: 909k]
  ------------------
  259|  86.9k|        && sub->flags & WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH) {
  ------------------
  |  |  723|  86.9k|#define WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH 2
  ------------------
  |  Branch (259:12): [True: 0, False: 86.9k]
  ------------------
  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|   996k|    if (sub->lenbytes > 0) {
  ------------------
  |  Branch (276:9): [True: 532k, False: 464k]
  ------------------
  277|   532k|        unsigned char *buf = GETBUF(pkt);
  ------------------
  |  |   40|   532k|#define GETBUF(p) (((p)->staticbuf != NULL)         \
  |  |  ------------------
  |  |  |  Branch (40:20): [True: 340k, False: 191k]
  |  |  ------------------
  |  |   41|   532k|        ? (p)->staticbuf                            \
  |  |   42|   532k|        : ((p)->buf != NULL                         \
  |  |  ------------------
  |  |  |  Branch (42:12): [True: 191k, False: 0]
  |  |  ------------------
  |  |   43|   191k|                  ? (unsigned char *)(p)->buf->data \
  |  |   44|   191k|                  : NULL))
  ------------------
  278|       |
  279|   532k|        if (buf != NULL) {
  ------------------
  |  Branch (279:13): [True: 532k, False: 0]
  ------------------
  280|   532k|#if !defined OPENSSL_NO_QUIC && !defined FIPS_MODULE
  281|   532k|            if ((sub->flags & WPACKET_FLAGS_QUIC_VLINT) == 0) {
  ------------------
  |  |  726|   532k|#define WPACKET_FLAGS_QUIC_VLINT 4
  ------------------
  |  Branch (281:17): [True: 532k, False: 0]
  ------------------
  282|   532k|                if (!put_value(&buf[sub->packet_len], packlen, sub->lenbytes))
  ------------------
  |  Branch (282:21): [True: 0, False: 532k]
  ------------------
  283|      0|                    return 0;
  284|   532k|            } 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|   532k|        }
  293|   532k|    } else if (pkt->endfirst && sub->parent != NULL
  ------------------
  |  Branch (293:16): [True: 21.7k, False: 442k]
  |  Branch (293:33): [True: 10.8k, False: 10.8k]
  ------------------
  294|  10.8k|        && (packlen != 0
  ------------------
  |  Branch (294:13): [True: 10.8k, False: 0]
  ------------------
  295|      0|            || (sub->flags
  ------------------
  |  Branch (295:16): [True: 0, False: 0]
  ------------------
  296|      0|                   & WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH)
  ------------------
  |  |  723|      0|#define WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH 2
  ------------------
  297|  10.8k|                == 0)) {
  298|  10.8k|        size_t tmplen = packlen;
  299|  10.8k|        size_t numlenbytes = 1;
  300|       |
  301|  10.8k|        while ((tmplen = tmplen >> 8) > 0)
  ------------------
  |  Branch (301:16): [True: 0, False: 10.8k]
  ------------------
  302|      0|            numlenbytes++;
  303|  10.8k|        if (!WPACKET_put_bytes__(pkt, packlen, numlenbytes))
  ------------------
  |  Branch (303:13): [True: 0, False: 10.8k]
  ------------------
  304|      0|            return 0;
  305|  10.8k|        if (packlen > 0x7f) {
  ------------------
  |  Branch (305:13): [True: 0, False: 10.8k]
  ------------------
  306|      0|            numlenbytes |= 0x80;
  307|      0|            if (!WPACKET_put_bytes_u8(pkt, numlenbytes))
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (307:17): [True: 0, False: 0]
  ------------------
  308|      0|                return 0;
  309|      0|        }
  310|  10.8k|    }
  311|       |
  312|   996k|    if (doclose) {
  ------------------
  |  Branch (312:9): [True: 996k, False: 0]
  ------------------
  313|   996k|        pkt->subs = sub->parent;
  314|   996k|        OPENSSL_free(sub);
  ------------------
  |  |  132|   996k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  315|   996k|    }
  316|       |
  317|   996k|    return 1;
  318|   996k|}
packet.c:put_value:
  212|  1.66M|{
  213|  1.66M|    if (data == NULL)
  ------------------
  |  Branch (213:9): [True: 160k, False: 1.50M]
  ------------------
  214|   160k|        return 1;
  215|       |
  216|  3.98M|    for (data += len - 1; len > 0; len--) {
  ------------------
  |  Branch (216:27): [True: 2.47M, False: 1.50M]
  ------------------
  217|  2.47M|        *data = (unsigned char)(value & 0xff);
  218|  2.47M|        data--;
  219|  2.47M|        value >>= 8;
  220|  2.47M|    }
  221|       |
  222|       |    /* Check whether we could fit the value in the assigned number of bytes */
  223|  1.50M|    if (value > 0)
  ------------------
  |  Branch (223:9): [True: 0, False: 1.50M]
  ------------------
  224|      0|        return 0;
  225|       |
  226|  1.50M|    return 1;
  227|  1.50M|}

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

ossl_param_build_set_int:
   24|  51.0k|{
   25|  51.0k|    if (bld != NULL)
  ------------------
  |  Branch (25:9): [True: 0, False: 51.0k]
  ------------------
   26|      0|        return OSSL_PARAM_BLD_push_int(bld, key, num);
   27|  51.0k|    p = OSSL_PARAM_locate(p, key);
   28|  51.0k|    if (p != NULL)
  ------------------
  |  Branch (28:9): [True: 0, False: 51.0k]
  ------------------
   29|      0|        return OSSL_PARAM_set_int(p, num);
   30|  51.0k|    return 1;
   31|  51.0k|}
ossl_param_build_set_utf8_string:
   46|   127k|{
   47|   127k|    if (bld != NULL)
  ------------------
  |  Branch (47:9): [True: 0, False: 127k]
  ------------------
   48|      0|        return OSSL_PARAM_BLD_push_utf8_string(bld, key, buf, 0);
   49|   127k|    p = OSSL_PARAM_locate(p, key);
   50|   127k|    if (p != NULL)
  ------------------
  |  Branch (50:9): [True: 10.8k, False: 116k]
  ------------------
   51|  10.8k|        return OSSL_PARAM_set_utf8_string(p, buf);
   52|   116k|    return 1;
   53|   127k|}
ossl_param_build_set_octet_string:
   59|  58.0k|{
   60|  58.0k|    if (bld != NULL)
  ------------------
  |  Branch (60:9): [True: 7.25k, False: 50.8k]
  ------------------
   61|  7.25k|        return OSSL_PARAM_BLD_push_octet_string(bld, key, data, data_len);
   62|       |
   63|  50.8k|    p = OSSL_PARAM_locate(p, key);
   64|  50.8k|    if (p != NULL)
  ------------------
  |  Branch (64:9): [True: 0, False: 50.8k]
  ------------------
   65|      0|        return OSSL_PARAM_set_octet_string(p, data, data_len);
   66|  50.8k|    return 1;
   67|  50.8k|}
ossl_param_build_set_bn_pad:
   71|  10.9k|{
   72|  10.9k|    if (bld != NULL)
  ------------------
  |  Branch (72:9): [True: 0, False: 10.9k]
  ------------------
   73|      0|        return OSSL_PARAM_BLD_push_BN_pad(bld, key, bn, sz);
   74|  10.9k|    p = OSSL_PARAM_locate(p, key);
   75|  10.9k|    if (p != NULL) {
  ------------------
  |  Branch (75:9): [True: 0, False: 10.9k]
  ------------------
   76|       |        /* Size probe: NULL data means "report the required size". */
   77|      0|        if (p->data == NULL) {
  ------------------
  |  Branch (77:13): [True: 0, False: 0]
  ------------------
   78|      0|            p->return_size = sz;
   79|      0|            return 1;
   80|      0|        }
   81|      0|        if (sz > p->data_size) {
  ------------------
  |  Branch (81:13): [True: 0, False: 0]
  ------------------
   82|      0|            ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_SMALL_BUFFER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   83|      0|            return 0;
   84|      0|        }
   85|      0|        p->data_size = sz;
   86|      0|        return OSSL_PARAM_set_BN(p, bn);
   87|      0|    }
   88|  10.9k|    return 1;
   89|  10.9k|}

OSSL_PARAM_locate:
   55|  3.68M|{
   56|  3.68M|    if (ossl_likely(p != NULL && key != NULL))
  ------------------
  |  |   22|  7.32M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3.63M, False: 50.8k]
  |  |  |  Branch (22:44): [True: 3.63M, False: 50.8k]
  |  |  |  Branch (22:44): [True: 3.63M, False: 0]
  |  |  ------------------
  ------------------
   57|  17.6M|        for (; p->key != NULL; p++)
  ------------------
  |  Branch (57:16): [True: 16.7M, False: 902k]
  ------------------
   58|  16.7M|            if (strcmp(key, p->key) == 0)
  ------------------
  |  Branch (58:17): [True: 2.73M, False: 13.9M]
  ------------------
   59|  2.73M|                return p;
   60|   953k|    return NULL;
   61|  3.68M|}
OSSL_PARAM_locate_const:
   64|  3.06M|{
   65|  3.06M|    return OSSL_PARAM_locate((OSSL_PARAM *)p, key);
   66|  3.06M|}
OSSL_PARAM_modified:
   82|  86.8k|{
   83|  86.8k|    return p != NULL && p->return_size != OSSL_PARAM_UNMODIFIED;
  ------------------
  |  |   22|  86.8k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
  |  Branch (83:12): [True: 86.8k, False: 0]
  |  Branch (83:25): [True: 65.0k, False: 21.7k]
  ------------------
   84|  86.8k|}
OSSL_PARAM_get_int:
  268|  1.14M|{
  269|  1.14M|#ifndef OPENSSL_SMALL_FOOTPRINT
  270|  1.14M|    switch (sizeof(int)) {
  ------------------
  |  Branch (270:13): [True: 1.14M, Folded]
  ------------------
  271|  1.14M|    case sizeof(int32_t):
  ------------------
  |  Branch (271:5): [True: 1.14M, False: 0]
  ------------------
  272|  1.14M|        return OSSL_PARAM_get_int32(p, (int32_t *)val);
  273|      0|    case sizeof(int64_t):
  ------------------
  |  Branch (273:5): [True: 0, False: 1.14M]
  ------------------
  274|      0|        return OSSL_PARAM_get_int64(p, (int64_t *)val);
  275|  1.14M|    }
  276|      0|#endif
  277|      0|    return general_get_int(p, val, sizeof(*val));
  278|  1.14M|}
OSSL_PARAM_set_int:
  281|   203k|{
  282|   203k|#ifndef OPENSSL_SMALL_FOOTPRINT
  283|   203k|    switch (sizeof(int)) {
  ------------------
  |  Branch (283:13): [True: 203k, Folded]
  ------------------
  284|   203k|    case sizeof(int32_t):
  ------------------
  |  Branch (284:5): [True: 203k, False: 0]
  ------------------
  285|   203k|        return OSSL_PARAM_set_int32(p, (int32_t)val);
  286|      0|    case sizeof(int64_t):
  ------------------
  |  Branch (286:5): [True: 0, False: 203k]
  ------------------
  287|      0|        return OSSL_PARAM_set_int64(p, (int64_t)val);
  288|   203k|    }
  289|      0|#endif
  290|      0|    return general_set_int(p, &val, sizeof(val));
  291|   203k|}
OSSL_PARAM_construct_int:
  294|   567k|{
  295|   567k|    return ossl_param_construct(key, OSSL_PARAM_INTEGER, buf, sizeof(int));
  ------------------
  |  |  106|   567k|#define OSSL_PARAM_INTEGER 1
  ------------------
  296|   567k|}
OSSL_PARAM_get_uint:
  299|   655k|{
  300|   655k|#ifndef OPENSSL_SMALL_FOOTPRINT
  301|   655k|    switch (sizeof(unsigned int)) {
  ------------------
  |  Branch (301:13): [True: 655k, Folded]
  ------------------
  302|   655k|    case sizeof(uint32_t):
  ------------------
  |  Branch (302:5): [True: 655k, False: 0]
  ------------------
  303|   655k|        return OSSL_PARAM_get_uint32(p, (uint32_t *)val);
  304|      0|    case sizeof(uint64_t):
  ------------------
  |  Branch (304:5): [True: 0, False: 655k]
  ------------------
  305|      0|        return OSSL_PARAM_get_uint64(p, (uint64_t *)val);
  306|   655k|    }
  307|      0|#endif
  308|      0|    return general_get_uint(p, val, sizeof(*val));
  309|   655k|}
OSSL_PARAM_set_uint:
  312|   114k|{
  313|   114k|#ifndef OPENSSL_SMALL_FOOTPRINT
  314|   114k|    switch (sizeof(unsigned int)) {
  ------------------
  |  Branch (314:13): [True: 114k, Folded]
  ------------------
  315|   114k|    case sizeof(uint32_t):
  ------------------
  |  Branch (315:5): [True: 114k, False: 0]
  ------------------
  316|   114k|        return OSSL_PARAM_set_uint32(p, (uint32_t)val);
  317|      0|    case sizeof(uint64_t):
  ------------------
  |  Branch (317:5): [True: 0, False: 114k]
  ------------------
  318|      0|        return OSSL_PARAM_set_uint64(p, (uint64_t)val);
  319|   114k|    }
  320|      0|#endif
  321|      0|    return general_set_uint(p, &val, sizeof(val));
  322|   114k|}
OSSL_PARAM_construct_uint:
  325|   114k|{
  326|   114k|    return ossl_param_construct(key, OSSL_PARAM_UNSIGNED_INTEGER, buf,
  ------------------
  |  |  107|   114k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  327|   114k|        sizeof(unsigned int));
  328|   114k|}
OSSL_PARAM_get_int32:
  394|  1.14M|{
  395|  1.14M|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (395:9): [True: 0, False: 1.14M]
  |  Branch (395:24): [True: 0, False: 1.14M]
  ------------------
  396|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  397|      0|        return 0;
  398|      0|    }
  399|       |
  400|  1.14M|    if (p->data == NULL) {
  ------------------
  |  Branch (400:9): [True: 0, False: 1.14M]
  ------------------
  401|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  402|      0|        return 0;
  403|      0|    }
  404|       |
  405|  1.14M|    if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|  1.14M|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (405:9): [True: 1.07M, False: 72.1k]
  ------------------
  406|  1.07M|#ifndef OPENSSL_SMALL_FOOTPRINT
  407|  1.07M|        int64_t i64;
  408|       |
  409|  1.07M|        switch (p->data_size) {
  ------------------
  |  Branch (409:17): [True: 1.07M, False: 0]
  ------------------
  410|  1.07M|        case sizeof(int32_t):
  ------------------
  |  Branch (410:9): [True: 1.07M, False: 0]
  ------------------
  411|  1.07M|            *val = *(const int32_t *)p->data;
  412|  1.07M|            return 1;
  413|      0|        case sizeof(int64_t):
  ------------------
  |  Branch (413:9): [True: 0, False: 1.07M]
  ------------------
  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, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  420|      0|            return 0;
  421|  1.07M|        }
  422|      0|#endif
  423|      0|        return general_get_int(p, val, sizeof(*val));
  424|       |
  425|  1.07M|    } else if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER) {
  ------------------
  |  |  107|  72.1k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (425:16): [True: 72.1k, False: 0]
  ------------------
  426|  72.1k|#ifndef OPENSSL_SMALL_FOOTPRINT
  427|  72.1k|        uint32_t u32;
  428|  72.1k|        uint64_t u64;
  429|       |
  430|  72.1k|        switch (p->data_size) {
  ------------------
  |  Branch (430:17): [True: 72.1k, False: 0]
  ------------------
  431|      0|        case sizeof(uint32_t):
  ------------------
  |  Branch (431:9): [True: 0, False: 72.1k]
  ------------------
  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, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  438|      0|            return 0;
  439|  72.1k|        case sizeof(uint64_t):
  ------------------
  |  Branch (439:9): [True: 72.1k, False: 0]
  ------------------
  440|  72.1k|            u64 = *(const uint64_t *)p->data;
  441|  72.1k|            if (u64 <= INT32_MAX) {
  ------------------
  |  Branch (441:17): [True: 72.1k, False: 0]
  ------------------
  442|  72.1k|                *val = (int32_t)u64;
  443|  72.1k|                return 1;
  444|  72.1k|            }
  445|      0|            err_out_of_range;
  ------------------
  |  |   26|  72.1k|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  446|      0|            return 0;
  447|  72.1k|        }
  448|      0|#endif
  449|      0|        return general_get_int(p, val, sizeof(*val));
  450|       |
  451|  72.1k|    } 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, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      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)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  466|      0|        return 0;
  467|      0|#endif
  468|      0|    }
  469|      0|    err_bad_type;
  ------------------
  |  |   36|  1.14M|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  470|      0|    return 0;
  471|  1.14M|}
OSSL_PARAM_set_int32:
  474|   203k|{
  475|   203k|    if (p == NULL) {
  ------------------
  |  Branch (475:9): [True: 0, False: 203k]
  ------------------
  476|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|      0|        return 0;
  478|      0|    }
  479|   203k|    p->return_size = 0;
  480|   203k|    if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|   203k|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (480:9): [True: 203k, False: 7]
  ------------------
  481|   203k|#ifndef OPENSSL_SMALL_FOOTPRINT
  482|   203k|        p->return_size = sizeof(int32_t); /* Minimum expected size */
  483|   203k|        if (p->data == NULL)
  ------------------
  |  Branch (483:13): [True: 0, False: 203k]
  ------------------
  484|      0|            return 1;
  485|   203k|        switch (p->data_size) {
  ------------------
  |  Branch (485:17): [True: 203k, False: 0]
  ------------------
  486|   203k|        case sizeof(int32_t):
  ------------------
  |  Branch (486:9): [True: 203k, False: 0]
  ------------------
  487|   203k|            *(int32_t *)p->data = val;
  488|   203k|            return 1;
  489|      0|        case sizeof(int64_t):
  ------------------
  |  Branch (489:9): [True: 0, False: 203k]
  ------------------
  490|      0|            p->return_size = sizeof(int64_t);
  491|      0|            *(int64_t *)p->data = (int64_t)val;
  492|      0|            return 1;
  493|   203k|        }
  494|      0|#endif
  495|      0|        return general_set_int(p, &val, sizeof(val));
  496|   203k|    } else if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER && val >= 0) {
  ------------------
  |  |  107|     14|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (496:16): [True: 7, False: 0]
  |  Branch (496:63): [True: 7, False: 0]
  ------------------
  497|      7|#ifndef OPENSSL_SMALL_FOOTPRINT
  498|      7|        p->return_size = sizeof(uint32_t); /* Minimum expected size */
  499|      7|        if (p->data == NULL)
  ------------------
  |  Branch (499:13): [True: 0, False: 7]
  ------------------
  500|      0|            return 1;
  501|      7|        switch (p->data_size) {
  ------------------
  |  Branch (501:17): [True: 7, False: 0]
  ------------------
  502|      7|        case sizeof(uint32_t):
  ------------------
  |  Branch (502:9): [True: 7, False: 0]
  ------------------
  503|      7|            *(uint32_t *)p->data = (uint32_t)val;
  504|      7|            return 1;
  505|      0|        case sizeof(uint64_t):
  ------------------
  |  Branch (505:9): [True: 0, False: 7]
  ------------------
  506|      0|            p->return_size = sizeof(uint64_t);
  507|      0|            *(uint64_t *)p->data = (uint64_t)val;
  508|      0|            return 1;
  509|      7|        }
  510|      0|#endif
  511|      0|        return general_set_int(p, &val, sizeof(val));
  512|      7|    } 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, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      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)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  534|      0|        return 0;
  535|      0|#endif
  536|      0|    }
  537|      0|    err_bad_type;
  ------------------
  |  |   36|   203k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  538|      0|    return 0;
  539|   203k|}
OSSL_PARAM_get_uint32:
  548|   735k|{
  549|   735k|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (549:9): [True: 0, False: 735k]
  |  Branch (549:24): [True: 0, False: 735k]
  ------------------
  550|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  551|      0|        return 0;
  552|      0|    }
  553|       |
  554|   735k|    if (p->data == NULL) {
  ------------------
  |  Branch (554:9): [True: 0, False: 735k]
  ------------------
  555|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  556|      0|        return 0;
  557|      0|    }
  558|       |
  559|   735k|    if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER) {
  ------------------
  |  |  107|   735k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (559:9): [True: 536k, False: 198k]
  ------------------
  560|   536k|#ifndef OPENSSL_SMALL_FOOTPRINT
  561|   536k|        uint64_t u64;
  562|       |
  563|   536k|        switch (p->data_size) {
  ------------------
  |  Branch (563:17): [True: 536k, False: 0]
  ------------------
  564|   536k|        case sizeof(uint32_t):
  ------------------
  |  Branch (564:9): [True: 536k, False: 0]
  ------------------
  565|   536k|            *val = *(const uint32_t *)p->data;
  566|   536k|            return 1;
  567|      0|        case sizeof(uint64_t):
  ------------------
  |  Branch (567:9): [True: 0, False: 536k]
  ------------------
  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, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  574|      0|            return 0;
  575|   536k|        }
  576|      0|#endif
  577|      0|        return general_get_uint(p, val, sizeof(*val));
  578|   536k|    } else if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|   198k|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (578:16): [True: 198k, False: 0]
  ------------------
  579|   198k|#ifndef OPENSSL_SMALL_FOOTPRINT
  580|   198k|        int32_t i32;
  581|   198k|        int64_t i64;
  582|       |
  583|   198k|        switch (p->data_size) {
  ------------------
  |  Branch (583:17): [True: 198k, False: 0]
  ------------------
  584|   198k|        case sizeof(int32_t):
  ------------------
  |  Branch (584:9): [True: 198k, False: 0]
  ------------------
  585|   198k|            i32 = *(const int32_t *)p->data;
  586|   198k|            if (i32 >= 0) {
  ------------------
  |  Branch (586:17): [True: 198k, False: 0]
  ------------------
  587|   198k|                *val = i32;
  588|   198k|                return 1;
  589|   198k|            }
  590|      0|            err_unsigned_negative;
  ------------------
  |  |   23|   198k|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      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: 198k]
  ------------------
  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, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      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, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  602|      0|            return 0;
  603|   198k|        }
  604|      0|#endif
  605|      0|        return general_get_uint(p, val, sizeof(*val));
  606|   198k|    } 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, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      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)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  621|      0|        return 0;
  622|      0|#endif
  623|      0|    }
  624|      0|    err_bad_type;
  ------------------
  |  |   36|   735k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  625|      0|    return 0;
  626|   735k|}
OSSL_PARAM_set_uint32:
  629|   114k|{
  630|   114k|    if (p == NULL) {
  ------------------
  |  Branch (630:9): [True: 0, False: 114k]
  ------------------
  631|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  632|      0|        return 0;
  633|      0|    }
  634|   114k|    p->return_size = 0;
  635|       |
  636|   114k|    if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER) {
  ------------------
  |  |  107|   114k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (636:9): [True: 114k, False: 0]
  ------------------
  637|   114k|#ifndef OPENSSL_SMALL_FOOTPRINT
  638|   114k|        p->return_size = sizeof(uint32_t); /* Minimum expected size */
  639|   114k|        if (p->data == NULL)
  ------------------
  |  Branch (639:13): [True: 0, False: 114k]
  ------------------
  640|      0|            return 1;
  641|   114k|        switch (p->data_size) {
  ------------------
  |  Branch (641:17): [True: 114k, False: 0]
  ------------------
  642|   114k|        case sizeof(uint32_t):
  ------------------
  |  Branch (642:9): [True: 114k, False: 0]
  ------------------
  643|   114k|            *(uint32_t *)p->data = val;
  644|   114k|            return 1;
  645|      0|        case sizeof(uint64_t):
  ------------------
  |  Branch (645:9): [True: 0, False: 114k]
  ------------------
  646|      0|            p->return_size = sizeof(uint64_t);
  647|      0|            *(uint64_t *)p->data = val;
  648|      0|            return 1;
  649|   114k|        }
  650|      0|#endif
  651|      0|        return general_set_uint(p, &val, sizeof(val));
  652|   114k|    } 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, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      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, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      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)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  692|      0|        return 0;
  693|      0|#endif
  694|      0|    }
  695|      0|    err_bad_type;
  ------------------
  |  |   36|   114k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  696|      0|    return 0;
  697|   114k|}
OSSL_PARAM_construct_uint32:
  700|  79.7k|{
  701|  79.7k|    return ossl_param_construct(key, OSSL_PARAM_UNSIGNED_INTEGER, buf,
  ------------------
  |  |  107|  79.7k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  702|  79.7k|        sizeof(uint32_t));
  703|  79.7k|}
OSSL_PARAM_get_int64:
  706|      3|{
  707|      3|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (707:9): [True: 0, False: 3]
  |  Branch (707:24): [True: 0, False: 3]
  ------------------
  708|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  709|      0|        return 0;
  710|      0|    }
  711|       |
  712|      3|    if (p->data == NULL) {
  ------------------
  |  Branch (712:9): [True: 0, False: 3]
  ------------------
  713|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  714|      0|        return 0;
  715|      0|    }
  716|       |
  717|      3|    if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|      3|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (717:9): [True: 3, False: 0]
  ------------------
  718|      3|#ifndef OPENSSL_SMALL_FOOTPRINT
  719|      3|        switch (p->data_size) {
  ------------------
  |  Branch (719:17): [True: 3, False: 0]
  ------------------
  720|      0|        case sizeof(int32_t):
  ------------------
  |  Branch (720:9): [True: 0, False: 3]
  ------------------
  721|      0|            *val = *(const int32_t *)p->data;
  722|      0|            return 1;
  723|      3|        case sizeof(int64_t):
  ------------------
  |  Branch (723:9): [True: 3, False: 0]
  ------------------
  724|      3|            *val = *(const int64_t *)p->data;
  725|      3|            return 1;
  726|      3|        }
  727|      0|#endif
  728|      0|        return general_get_int(p, val, sizeof(*val));
  729|      3|    } 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, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      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, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      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)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  770|      0|        return 0;
  771|      0|#endif
  772|      0|    }
  773|      0|    err_bad_type;
  ------------------
  |  |   36|      3|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  774|      0|    return 0;
  775|      3|}
OSSL_PARAM_get_uint64:
  861|   286k|{
  862|   286k|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (862:9): [True: 0, False: 286k]
  |  Branch (862:24): [True: 0, False: 286k]
  ------------------
  863|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  864|      0|        return 0;
  865|      0|    }
  866|       |
  867|   286k|    if (p->data == NULL) {
  ------------------
  |  Branch (867:9): [True: 0, False: 286k]
  ------------------
  868|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  869|      0|        return 0;
  870|      0|    }
  871|       |
  872|   286k|    if (ossl_likely(p->data_type == OSSL_PARAM_UNSIGNED_INTEGER)) {
  ------------------
  |  |   22|   286k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 286k, False: 0]
  |  |  ------------------
  ------------------
  873|   286k|#ifndef OPENSSL_SMALL_FOOTPRINT
  874|   286k|        switch (p->data_size) {
  ------------------
  |  Branch (874:17): [True: 286k, False: 0]
  ------------------
  875|      0|        case sizeof(uint32_t):
  ------------------
  |  Branch (875:9): [True: 0, False: 286k]
  ------------------
  876|      0|            *val = *(const uint32_t *)p->data;
  877|      0|            return 1;
  878|   286k|        case sizeof(uint64_t):
  ------------------
  |  Branch (878:9): [True: 286k, False: 0]
  ------------------
  879|   286k|            *val = *(const uint64_t *)p->data;
  880|   286k|            return 1;
  881|   286k|        }
  882|      0|#endif
  883|      0|        return general_get_uint(p, val, sizeof(*val));
  884|   286k|    } 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, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      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, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      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, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      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)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  931|      0|        return 0;
  932|      0|#endif
  933|      0|    }
  934|      0|    err_bad_type;
  ------------------
  |  |   36|   286k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  935|      0|    return 0;
  936|   286k|}
OSSL_PARAM_set_uint64:
  939|   259k|{
  940|   259k|    if (p == NULL) {
  ------------------
  |  Branch (940:9): [True: 0, False: 259k]
  ------------------
  941|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  942|      0|        return 0;
  943|      0|    }
  944|   259k|    p->return_size = 0;
  945|       |
  946|   259k|    if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER) {
  ------------------
  |  |  107|   259k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (946:9): [True: 230k, False: 29.0k]
  ------------------
  947|   230k|#ifndef OPENSSL_SMALL_FOOTPRINT
  948|   230k|        if (p->data == NULL) {
  ------------------
  |  Branch (948:13): [True: 0, False: 230k]
  ------------------
  949|      0|            p->return_size = sizeof(uint64_t); /* Expected size */
  950|      0|            return 1;
  951|      0|        }
  952|   230k|        switch (p->data_size) {
  ------------------
  |  Branch (952:17): [True: 230k, False: 0]
  ------------------
  953|      0|        case sizeof(uint32_t):
  ------------------
  |  Branch (953:9): [True: 0, False: 230k]
  ------------------
  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, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  960|      0|            return 0;
  961|   230k|        case sizeof(uint64_t):
  ------------------
  |  Branch (961:9): [True: 230k, False: 0]
  ------------------
  962|   230k|            p->return_size = sizeof(uint64_t);
  963|   230k|            *(uint64_t *)p->data = val;
  964|   230k|            return 1;
  965|   230k|        }
  966|      0|#endif
  967|      0|        return general_set_uint(p, &val, sizeof(val));
  968|   230k|    } else if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|  29.0k|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (968:16): [True: 29.0k, False: 0]
  ------------------
  969|  29.0k|#ifndef OPENSSL_SMALL_FOOTPRINT
  970|  29.0k|        if (p->data == NULL) {
  ------------------
  |  Branch (970:13): [True: 0, False: 29.0k]
  ------------------
  971|      0|            p->return_size = sizeof(int64_t); /* Expected size */
  972|      0|            return 1;
  973|      0|        }
  974|  29.0k|        switch (p->data_size) {
  ------------------
  |  Branch (974:17): [True: 29.0k, False: 0]
  ------------------
  975|  29.0k|        case sizeof(int32_t):
  ------------------
  |  Branch (975:9): [True: 29.0k, False: 0]
  ------------------
  976|  29.0k|            if (val <= INT32_MAX) {
  ------------------
  |  Branch (976:17): [True: 29.0k, False: 0]
  ------------------
  977|  29.0k|                p->return_size = sizeof(int32_t);
  978|  29.0k|                *(int32_t *)p->data = (int32_t)val;
  979|  29.0k|                return 1;
  980|  29.0k|            }
  981|      0|            err_out_of_range;
  ------------------
  |  |   26|  29.0k|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      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: 29.0k]
  ------------------
  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, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  990|      0|            return 0;
  991|  29.0k|        }
  992|      0|#endif
  993|      0|        return general_set_uint(p, &val, sizeof(val));
  994|  29.0k|    } 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, \
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      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)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1007|      0|        return 0;
 1008|      0|#endif
 1009|      0|    }
 1010|      0|    err_bad_type;
  ------------------
  |  |   36|   259k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1011|      0|    return 0;
 1012|   259k|}
OSSL_PARAM_construct_uint64:
 1015|  72.5k|{
 1016|  72.5k|    return ossl_param_construct(key, OSSL_PARAM_UNSIGNED_INTEGER, buf,
  ------------------
  |  |  107|  72.5k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
 1017|  72.5k|        sizeof(uint64_t));
 1018|  72.5k|}
OSSL_PARAM_get_size_t:
 1021|   214k|{
 1022|   214k|#ifndef OPENSSL_SMALL_FOOTPRINT
 1023|   214k|    switch (sizeof(size_t)) {
  ------------------
  |  Branch (1023:13): [True: 214k, Folded]
  ------------------
 1024|      0|    case sizeof(uint32_t):
  ------------------
  |  Branch (1024:5): [True: 0, False: 214k]
  ------------------
 1025|      0|        return OSSL_PARAM_get_uint32(p, (uint32_t *)val);
 1026|   214k|    case sizeof(uint64_t):
  ------------------
  |  Branch (1026:5): [True: 214k, False: 0]
  ------------------
 1027|   214k|        return OSSL_PARAM_get_uint64(p, (uint64_t *)val);
 1028|   214k|    }
 1029|      0|#endif
 1030|      0|    return general_get_uint(p, val, sizeof(*val));
 1031|   214k|}
OSSL_PARAM_set_size_t:
 1034|   259k|{
 1035|   259k|#ifndef OPENSSL_SMALL_FOOTPRINT
 1036|   259k|    switch (sizeof(size_t)) {
  ------------------
  |  Branch (1036:13): [True: 259k, Folded]
  ------------------
 1037|      0|    case sizeof(uint32_t):
  ------------------
  |  Branch (1037:5): [True: 0, False: 259k]
  ------------------
 1038|      0|        return OSSL_PARAM_set_uint32(p, (uint32_t)val);
 1039|   259k|    case sizeof(uint64_t):
  ------------------
  |  Branch (1039:5): [True: 259k, False: 0]
  ------------------
 1040|   259k|        return OSSL_PARAM_set_uint64(p, (uint64_t)val);
 1041|   259k|    }
 1042|      0|#endif
 1043|      0|    return general_set_uint(p, &val, sizeof(val));
 1044|   259k|}
OSSL_PARAM_construct_size_t:
 1047|   444k|{
 1048|   444k|    return ossl_param_construct(key, OSSL_PARAM_UNSIGNED_INTEGER, buf,
  ------------------
  |  |  107|   444k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
 1049|   444k|        sizeof(size_t));
 1050|   444k|}
OSSL_PARAM_get_time_t:
 1053|      3|{
 1054|      3|#ifndef OPENSSL_SMALL_FOOTPRINT
 1055|      3|    switch (sizeof(time_t)) {
  ------------------
  |  Branch (1055:13): [True: 3, Folded]
  ------------------
 1056|      0|    case sizeof(int32_t):
  ------------------
  |  Branch (1056:5): [True: 0, False: 3]
  ------------------
 1057|      0|        return OSSL_PARAM_get_int32(p, (int32_t *)val);
 1058|      3|    case sizeof(int64_t):
  ------------------
  |  Branch (1058:5): [True: 3, False: 0]
  ------------------
 1059|      3|        return OSSL_PARAM_get_int64(p, (int64_t *)val);
 1060|      3|    }
 1061|      0|#endif
 1062|      0|    return general_get_int(p, val, sizeof(*val));
 1063|      3|}
OSSL_PARAM_construct_time_t:
 1079|      3|{
 1080|      3|    return ossl_param_construct(key, OSSL_PARAM_INTEGER, buf, sizeof(time_t));
  ------------------
  |  |  106|      3|#define OSSL_PARAM_INTEGER 1
  ------------------
 1081|      3|}
OSSL_PARAM_get_utf8_string:
 1381|  36.5k|{
 1382|  36.5k|    int ret = get_string_internal(p, (void **)val, &max_len, NULL,
 1383|  36.5k|        OSSL_PARAM_UTF8_STRING);
  ------------------
  |  |  117|  36.5k|#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|  36.5k|    size_t data_length = p->data_size;
 1397|       |
 1398|  36.5k|    if (ret == 0)
  ------------------
  |  Branch (1398:9): [True: 0, False: 36.5k]
  ------------------
 1399|      0|        return 0;
 1400|  36.5k|    if (data_length >= max_len)
  ------------------
  |  Branch (1400:9): [True: 0, False: 36.5k]
  ------------------
 1401|      0|        data_length = OPENSSL_strnlen(p->data, data_length);
 1402|  36.5k|    if (data_length >= max_len) {
  ------------------
  |  Branch (1402:9): [True: 0, False: 36.5k]
  ------------------
 1403|      0|        ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_NO_SPACE_FOR_TERMINATING_NULL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1404|      0|        return 0; /* No space for a terminating NUL byte */
 1405|      0|    }
 1406|  36.5k|    (*val)[data_length] = '\0';
 1407|       |
 1408|  36.5k|    return ret;
 1409|  36.5k|}
OSSL_PARAM_get_octet_string:
 1413|   564k|{
 1414|   564k|    return get_string_internal(p, val, &max_len, used_len,
 1415|   564k|        OSSL_PARAM_OCTET_STRING);
  ------------------
  |  |  123|   564k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
 1416|   564k|}
OSSL_PARAM_set_utf8_string:
 1441|  10.8k|{
 1442|  10.8k|    if (p == NULL || val == NULL) {
  ------------------
  |  Branch (1442:9): [True: 0, False: 10.8k]
  |  Branch (1442:22): [True: 0, False: 10.8k]
  ------------------
 1443|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1444|      0|        return 0;
 1445|      0|    }
 1446|  10.8k|    p->return_size = 0;
 1447|  10.8k|    return set_string_internal(p, val, strlen(val), OSSL_PARAM_UTF8_STRING);
  ------------------
  |  |  117|  10.8k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
 1448|  10.8k|}
OSSL_PARAM_set_octet_string:
 1452|  47.0k|{
 1453|  47.0k|    if (p == NULL || val == NULL) {
  ------------------
  |  Branch (1453:9): [True: 0, False: 47.0k]
  |  Branch (1453:22): [True: 0, False: 47.0k]
  ------------------
 1454|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|      0|        return 0;
 1456|      0|    }
 1457|  47.0k|    p->return_size = 0;
 1458|  47.0k|    return set_string_internal(p, val, len, OSSL_PARAM_OCTET_STRING);
  ------------------
  |  |  123|  47.0k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
 1459|  47.0k|}
OSSL_PARAM_construct_utf8_string:
 1463|   294k|{
 1464|   294k|    if (buf != NULL && bsize == 0)
  ------------------
  |  Branch (1464:9): [True: 294k, False: 0]
  |  Branch (1464:24): [True: 283k, False: 10.8k]
  ------------------
 1465|   283k|        bsize = strlen(buf);
 1466|   294k|    return ossl_param_construct(key, OSSL_PARAM_UTF8_STRING, buf, bsize);
  ------------------
  |  |  117|   294k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
 1467|   294k|}
OSSL_PARAM_construct_octet_string:
 1471|   648k|{
 1472|   648k|    return ossl_param_construct(key, OSSL_PARAM_OCTET_STRING, buf, bsize);
  ------------------
  |  |  123|   648k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
 1473|   648k|}
ossl_param_get1_concat_octet_string:
 1628|   152k|{
 1629|   152k|    unsigned char *res;
 1630|   152k|    size_t sz = 0;
 1631|       |
 1632|   152k|    if (n == 0)
  ------------------
  |  Branch (1632:9): [True: 152k, False: 0]
  ------------------
 1633|   152k|        return 1;
 1634|       |
 1635|       |    /* Calculate the total size */
 1636|      0|    if (!setbuf_fromparams(n, params, NULL, &sz))
  ------------------
  |  Branch (1636:9): [True: 0, False: 0]
  ------------------
 1637|      0|        return 0;
 1638|       |
 1639|       |    /* Special case zero length */
 1640|      0|    if (sz == 0) {
  ------------------
  |  Branch (1640:9): [True: 0, False: 0]
  ------------------
 1641|      0|        if ((res = OPENSSL_zalloc(1)) == NULL)
  ------------------
  |  |  109|      0|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (1641:13): [True: 0, False: 0]
  ------------------
 1642|      0|            return 0;
 1643|      0|        goto fin;
 1644|      0|    }
 1645|       |
 1646|       |    /* Allocate the buffer */
 1647|      0|    res = OPENSSL_malloc(sz);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1648|      0|    if (res == NULL)
  ------------------
  |  Branch (1648:9): [True: 0, False: 0]
  ------------------
 1649|      0|        return 0;
 1650|       |
 1651|       |    /* Concat one or more OSSL_KDF_PARAM_INFO fields */
 1652|      0|    if (!setbuf_fromparams(n, params, res, &sz)) {
  ------------------
  |  Branch (1652:9): [True: 0, False: 0]
  ------------------
 1653|      0|        OPENSSL_clear_free(res, sz);
  ------------------
  |  |  130|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1654|      0|        return 0;
 1655|      0|    }
 1656|       |
 1657|      0|fin:
 1658|      0|    OPENSSL_clear_free(*out, *out_len);
  ------------------
  |  |  130|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1659|      0|    *out = res;
 1660|      0|    *out_len = sz;
 1661|      0|    return 1;
 1662|      0|}
OSSL_PARAM_construct_end:
 1665|   683k|{
 1666|   683k|    OSSL_PARAM end = OSSL_PARAM_END;
  ------------------
  |  |   25|   683k|    { NULL, 0, NULL, 0, 0 }
  ------------------
 1667|       |
 1668|   683k|    return end;
 1669|   683k|}
OSSL_PARAM_get_utf8_string_ptr:
 1694|  43.9k|{
 1695|  43.9k|    return get_string_ptr_internal(p, (const void **)val, NULL,
 1696|  43.9k|        OSSL_PARAM_UTF8_PTR,
  ------------------
  |  |  141|  43.9k|#define OSSL_PARAM_UTF8_PTR 6
  ------------------
 1697|  43.9k|        OSSL_PARAM_UTF8_STRING);
  ------------------
  |  |  117|  43.9k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
 1698|  43.9k|}
OSSL_PARAM_get_octet_string_ptr:
 1702|  7.25k|{
 1703|  7.25k|    return get_string_ptr_internal(p, (const void **)val, used_len,
 1704|  7.25k|        OSSL_PARAM_OCTET_PTR,
  ------------------
  |  |  160|  7.25k|#define OSSL_PARAM_OCTET_PTR 7
  ------------------
 1705|  7.25k|        OSSL_PARAM_OCTET_STRING);
  ------------------
  |  |  123|  7.25k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
 1706|  7.25k|}
params.c:ossl_param_construct:
   70|  2.22M|{
   71|  2.22M|    OSSL_PARAM res;
   72|       |
   73|  2.22M|    res.key = key;
   74|  2.22M|    res.data_type = data_type;
   75|  2.22M|    res.data = data;
   76|  2.22M|    res.data_size = data_size;
   77|  2.22M|    res.return_size = OSSL_PARAM_UNMODIFIED;
  ------------------
  |  |   22|  2.22M|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
   78|  2.22M|    return res;
   79|  2.22M|}
params.c:get_string_internal:
 1333|   601k|{
 1334|   601k|    size_t sz, alloc_sz;
 1335|       |
 1336|   601k|    if ((val == NULL && used_len == NULL) || p == NULL) {
  ------------------
  |  Branch (1336:10): [True: 0, False: 601k]
  |  Branch (1336:25): [True: 0, False: 0]
  |  Branch (1336:46): [True: 0, False: 601k]
  ------------------
 1337|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1338|      0|        return 0;
 1339|      0|    }
 1340|   601k|    if (p->data_type != type) {
  ------------------
  |  Branch (1340:9): [True: 0, False: 601k]
  ------------------
 1341|      0|        err_bad_type;
  ------------------
  |  |   36|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1342|      0|        return 0;
 1343|      0|    }
 1344|       |
 1345|   601k|    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|   601k|    alloc_sz = sz + (type == OSSL_PARAM_UTF8_STRING || sz == 0);
  ------------------
  |  |  117|  1.20M|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1350:22): [True: 36.5k, False: 564k]
  |  Branch (1350:56): [True: 0, False: 564k]
  ------------------
 1351|       |
 1352|   601k|    if (used_len != NULL)
  ------------------
  |  Branch (1352:9): [True: 560k, False: 40.1k]
  ------------------
 1353|   560k|        *used_len = sz;
 1354|       |
 1355|   601k|    if (p->data == NULL) {
  ------------------
  |  Branch (1355:9): [True: 0, False: 601k]
  ------------------
 1356|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1357|      0|        return 0;
 1358|      0|    }
 1359|       |
 1360|   601k|    if (val == NULL)
  ------------------
  |  Branch (1360:9): [True: 0, False: 601k]
  ------------------
 1361|      0|        return 1;
 1362|       |
 1363|   601k|    if (*val == NULL) {
  ------------------
  |  Branch (1363:9): [True: 546k, False: 54.2k]
  ------------------
 1364|   546k|        char *const q = OPENSSL_malloc(alloc_sz);
  ------------------
  |  |  107|   546k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1365|       |
 1366|   546k|        if (q == NULL)
  ------------------
  |  Branch (1366:13): [True: 0, False: 546k]
  ------------------
 1367|      0|            return 0;
 1368|   546k|        *val = q;
 1369|   546k|        *max_len = alloc_sz;
 1370|   546k|    }
 1371|       |
 1372|   601k|    if (*max_len < sz) {
  ------------------
  |  Branch (1372:9): [True: 0, False: 601k]
  ------------------
 1373|      0|        err_too_small;
  ------------------
  |  |   34|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_SMALL_BUFFER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1374|      0|        return 0;
 1375|      0|    }
 1376|   601k|    memcpy(*val, p->data, sz);
 1377|   601k|    return 1;
 1378|   601k|}
params.c:set_string_internal:
 1420|  57.9k|{
 1421|  57.9k|    if (p->data_type != type) {
  ------------------
  |  Branch (1421:9): [True: 0, False: 57.9k]
  ------------------
 1422|      0|        err_bad_type;
  ------------------
  |  |   36|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1423|      0|        return 0;
 1424|      0|    }
 1425|  57.9k|    p->return_size = len;
 1426|  57.9k|    if (p->data == NULL)
  ------------------
  |  Branch (1426:9): [True: 3.62k, False: 54.2k]
  ------------------
 1427|  3.62k|        return 1;
 1428|  54.2k|    if (p->data_size < len) {
  ------------------
  |  Branch (1428:9): [True: 0, False: 54.2k]
  ------------------
 1429|      0|        err_too_small;
  ------------------
  |  |   34|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_SMALL_BUFFER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1430|      0|        return 0;
 1431|      0|    }
 1432|       |
 1433|  54.2k|    memcpy(p->data, val, len);
 1434|       |    /* If possible within the size of p->data, add a NUL terminator byte */
 1435|  54.2k|    if (type == OSSL_PARAM_UTF8_STRING && p->data_size > len)
  ------------------
  |  |  117|   108k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1435:9): [True: 10.8k, False: 43.3k]
  |  Branch (1435:43): [True: 10.8k, False: 0]
  ------------------
 1436|  10.8k|        ((char *)p->data)[len] = '\0';
 1437|  54.2k|    return 1;
 1438|  54.2k|}
params.c:get_string_ptr_internal:
 1674|  51.2k|{
 1675|  51.2k|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (1675:9): [True: 0, False: 51.2k]
  |  Branch (1675:24): [True: 0, False: 51.2k]
  ------------------
 1676|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1677|      0|        return 0;
 1678|      0|    }
 1679|       |
 1680|  51.2k|    if (p->data_type == ref_type)
  ------------------
  |  Branch (1680:9): [True: 0, False: 51.2k]
  ------------------
 1681|      0|        return get_ptr_internal_skip_checks(p, (const void **)val, used_len);
 1682|       |
 1683|  51.2k|    if (p->data_type != type) {
  ------------------
  |  Branch (1683:9): [True: 0, False: 51.2k]
  ------------------
 1684|      0|        err_bad_type;
  ------------------
  |  |   36|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  361|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1685|      0|        return 0;
 1686|      0|    }
 1687|  51.2k|    if (used_len != NULL)
  ------------------
  |  Branch (1687:9): [True: 7.25k, False: 43.9k]
  ------------------
 1688|  7.25k|        *used_len = p->data_size;
 1689|  51.2k|    *val = p->data;
 1690|  51.2k|    return 1;
 1691|  51.2k|}

ossl_param_bytes_to_blocks:
   31|  14.5k|{
   32|  14.5k|    return (bytes + OSSL_PARAM_ALIGN_SIZE - 1) / OSSL_PARAM_ALIGN_SIZE;
  ------------------
  |  |   22|  14.5k|#define OSSL_PARAM_ALIGN_SIZE sizeof(OSSL_PARAM_ALIGNED_BLOCK)
  ------------------
                  return (bytes + OSSL_PARAM_ALIGN_SIZE - 1) / OSSL_PARAM_ALIGN_SIZE;
  ------------------
  |  |   22|  14.5k|#define OSSL_PARAM_ALIGN_SIZE sizeof(OSSL_PARAM_ALIGNED_BLOCK)
  ------------------
   33|  14.5k|}
ossl_param_set_secure_block:
   56|  7.25k|{
   57|  7.25k|    last->key = NULL;
   58|  7.25k|    last->data_size = secure_buffer_sz;
   59|  7.25k|    last->data = secure_buffer;
   60|  7.25k|    last->data_type = OSSL_PARAM_ALLOCATED_END;
  ------------------
  |  |   16|  7.25k|#define OSSL_PARAM_ALLOCATED_END 127
  ------------------
   61|  7.25k|}
OSSL_PARAM_clear_free:
  247|  7.25k|{
  248|  7.25k|    if (params != NULL) {
  ------------------
  |  Branch (248:9): [True: 7.25k, False: 0]
  ------------------
  249|  7.25k|        OSSL_PARAM *p;
  250|       |
  251|  14.5k|        for (p = params; p->key != NULL; p++)
  ------------------
  |  Branch (251:26): [True: 7.25k, False: 7.25k]
  ------------------
  252|  7.25k|            ;
  253|  7.25k|        if (p->data_type == OSSL_PARAM_ALLOCATED_END)
  ------------------
  |  |   16|  7.25k|#define OSSL_PARAM_ALLOCATED_END 127
  ------------------
  |  Branch (253:13): [True: 7.25k, False: 0]
  ------------------
  254|  7.25k|            OPENSSL_secure_clear_free(p->data, p->data_size);
  ------------------
  |  |  150|  7.25k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  255|  7.25k|        if (p->return_size > 0 && p->return_size != OSSL_PARAM_UNMODIFIED)
  ------------------
  |  |   22|  7.25k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
  |  Branch (255:13): [True: 7.25k, False: 0]
  |  Branch (255:35): [True: 7.25k, False: 0]
  ------------------
  256|  7.25k|            OPENSSL_cleanse(params, p->return_size);
  257|  7.25k|        OPENSSL_free(params);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  258|  7.25k|    }
  259|  7.25k|}

ossl_pw_clear_passphrase_data:
   17|  25.8k|{
   18|  25.8k|    if (data != NULL) {
  ------------------
  |  Branch (18:9): [True: 25.8k, False: 0]
  ------------------
   19|  25.8k|        if (data->type == is_expl_passphrase)
  ------------------
  |  Branch (19:13): [True: 0, False: 25.8k]
  ------------------
   20|      0|            OPENSSL_clear_free(data->_.expl_passphrase.passphrase_copy,
  ------------------
  |  |  130|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   21|  25.8k|                data->_.expl_passphrase.passphrase_len);
   22|  25.8k|        ossl_pw_clear_passphrase_cache(data);
   23|  25.8k|        memset(data, 0, sizeof(*data));
   24|  25.8k|    }
   25|  25.8k|}
ossl_pw_clear_passphrase_cache:
   28|  40.5k|{
   29|  40.5k|    OPENSSL_clear_free(data->cached_passphrase, data->cached_passphrase_len);
  ------------------
  |  |  130|  40.5k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   30|       |    data->cached_passphrase = NULL;
   31|  40.5k|}
ossl_pw_set_pem_password_cb:
   53|  7.46k|{
   54|  7.46k|    if (!ossl_assert(data != NULL && cb != NULL)) {
  ------------------
  |  |   52|  14.9k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 7.46k, False: 0]
  |  |  |  Branch (52:41): [True: 7.46k, False: 0]
  |  |  ------------------
  |  |   53|  7.46k|    __FILE__, __LINE__)
  ------------------
  |  Branch (54:9): [True: 0, False: 7.46k]
  ------------------
   55|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   56|      0|        return 0;
   57|      0|    }
   58|  7.46k|    ossl_pw_clear_passphrase_data(data);
   59|  7.46k|    data->type = is_pem_password;
   60|  7.46k|    data->_.pem_password.password_cb = cb;
   61|  7.46k|    data->_.pem_password.password_cbarg = cbarg;
   62|  7.46k|    return 1;
   63|  7.46k|}
ossl_pw_enable_passphrase_caching:
   94|  18.3k|{
   95|  18.3k|    data->flag_cache_passphrase = 1;
   96|  18.3k|    return 1;
   97|  18.3k|}

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

PEM_X509_INFO_read_bio_ex:
   56|  3.55k|{
   57|  3.55k|    X509_INFO *xi = NULL;
   58|  3.55k|    char *name = NULL, *header = NULL, *str;
   59|  3.55k|    void *pp;
   60|  3.55k|    unsigned char *data = NULL;
   61|  3.55k|    const unsigned char *p;
   62|  3.55k|    long len, error = 0;
   63|  3.55k|    int ok = 0;
   64|  3.55k|    STACK_OF(X509_INFO) *ret = NULL;
  ------------------
  |  |   33|  3.55k|#define STACK_OF(type) struct stack_st_##type
  ------------------
   65|  3.55k|    unsigned int i, raw, ptype;
   66|  3.55k|    d2i_of_void *d2i = 0;
   67|       |
   68|  3.55k|    if (sk == NULL) {
  ------------------
  |  Branch (68:9): [True: 3.55k, False: 0]
  ------------------
   69|  3.55k|        if ((ret = sk_X509_INFO_new_null()) == NULL) {
  ------------------
  |  |  400|  3.55k|#define sk_X509_INFO_new_null() ((STACK_OF(X509_INFO) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_X509_INFO_freefunc_thunk))
  ------------------
  |  Branch (69:13): [True: 0, False: 3.55k]
  ------------------
   70|      0|            ERR_raise(ERR_LIB_PEM, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   71|      0|            goto err;
   72|      0|        }
   73|  3.55k|    } else
   74|      0|        ret = sk;
   75|       |
   76|  3.55k|    if ((xi = X509_INFO_new()) == NULL)
  ------------------
  |  Branch (76:9): [True: 0, False: 3.55k]
  ------------------
   77|      0|        goto err;
   78|  7.10k|    for (;;) {
   79|  7.10k|        raw = 0;
   80|  7.10k|        ptype = 0;
   81|  7.10k|        ERR_set_mark();
   82|  7.10k|        i = PEM_read_bio(bp, &name, &header, &data, &len);
   83|  7.10k|        if (i == 0) {
  ------------------
  |  Branch (83:13): [True: 3.55k, False: 3.55k]
  ------------------
   84|  3.55k|            error = ERR_GET_REASON(ERR_peek_last_error());
   85|  3.55k|            if (error == PEM_R_NO_START_LINE) {
  ------------------
  |  |   44|  3.55k|#define PEM_R_NO_START_LINE 108
  ------------------
  |  Branch (85:17): [True: 3.55k, False: 0]
  ------------------
   86|  3.55k|                ERR_pop_to_mark();
   87|  3.55k|                break;
   88|  3.55k|            }
   89|      0|            ERR_clear_last_mark();
   90|      0|            goto err;
   91|  3.55k|        }
   92|  3.55k|        ERR_clear_last_mark();
   93|  3.55k|    start:
   94|  3.55k|        if (strcmp(name, PEM_STRING_X509) == 0
  ------------------
  |  |   36|  3.55k|#define PEM_STRING_X509 "CERTIFICATE"
  ------------------
  |  Branch (94:13): [True: 3.55k, 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|  3.55k|            || strcmp(name, PEM_STRING_X509_TRUSTED) == 0) {
  ------------------
  |  |   37|      0|#define PEM_STRING_X509_TRUSTED "TRUSTED CERTIFICATE"
  ------------------
  |  Branch (96:16): [True: 0, False: 0]
  ------------------
   97|  3.55k|            if (xi->x509 != NULL) {
  ------------------
  |  Branch (97:17): [True: 0, False: 3.55k]
  ------------------
   98|      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 (98:21): [True: 0, False: 0]
  ------------------
   99|      0|                    goto err;
  100|      0|                if ((xi = X509_INFO_new()) == NULL)
  ------------------
  |  Branch (100:21): [True: 0, False: 0]
  ------------------
  101|      0|                    goto err;
  102|      0|                goto start;
  103|      0|            }
  104|  3.55k|            if ((strcmp(name, PEM_STRING_X509_TRUSTED) == 0))
  ------------------
  |  |   37|  3.55k|#define PEM_STRING_X509_TRUSTED "TRUSTED CERTIFICATE"
  ------------------
  |  Branch (104:17): [True: 0, False: 3.55k]
  ------------------
  105|      0|                d2i = (D2I_OF(void))d2i_X509_AUX;
  106|  3.55k|            else
  107|  3.55k|                d2i = (D2I_OF(void))d2i_X509;
  108|  3.55k|            xi->x509 = X509_new_ex(libctx, propq);
  109|  3.55k|            if (xi->x509 == NULL)
  ------------------
  |  Branch (109:17): [True: 0, False: 3.55k]
  ------------------
  110|      0|                goto err;
  111|  3.55k|            pp = &(xi->x509);
  112|  3.55k|        } 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|  3.55k|        if (d2i != NULL) {
  ------------------
  |  Branch (153:13): [True: 3.55k, False: 0]
  ------------------
  154|  3.55k|            if (!raw) {
  ------------------
  |  Branch (154:17): [True: 3.55k, False: 0]
  ------------------
  155|  3.55k|                EVP_CIPHER_INFO cipher;
  156|       |
  157|  3.55k|                if (!PEM_get_EVP_CIPHER_INFO(header, &cipher))
  ------------------
  |  Branch (157:21): [True: 0, False: 3.55k]
  ------------------
  158|      0|                    goto err;
  159|  3.55k|                if (!PEM_do_header(&cipher, data, &len, cb, u))
  ------------------
  |  Branch (159:21): [True: 0, False: 3.55k]
  ------------------
  160|      0|                    goto err;
  161|  3.55k|                p = data;
  162|  3.55k|                if (ptype) {
  ------------------
  |  Branch (162:21): [True: 0, False: 3.55k]
  ------------------
  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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  167|      0|                        goto err;
  168|      0|                    }
  169|  3.55k|                } else if (d2i(pp, &p, len) == NULL) {
  ------------------
  |  Branch (169:28): [True: 0, False: 3.55k]
  ------------------
  170|      0|                    ERR_raise(ERR_LIB_PEM, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  171|      0|                    goto err;
  172|      0|                }
  173|  3.55k|            } 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|  3.55k|        }
  181|  3.55k|        OPENSSL_free(name);
  ------------------
  |  |  132|  3.55k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  182|  3.55k|        name = NULL;
  183|  3.55k|        OPENSSL_free(header);
  ------------------
  |  |  132|  3.55k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  184|  3.55k|        header = NULL;
  185|  3.55k|        OPENSSL_free(data);
  ------------------
  |  |  132|  3.55k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  186|  3.55k|        data = NULL;
  187|  3.55k|    }
  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|  3.55k|    if ((xi->x509 != NULL) || (xi->crl != NULL) || (xi->x_pkey != NULL) || (xi->enc_data != NULL)) {
  ------------------
  |  Branch (193:9): [True: 3.55k, False: 0]
  |  Branch (193:31): [True: 0, False: 0]
  |  Branch (193:52): [True: 0, False: 0]
  |  Branch (193:76): [True: 0, False: 0]
  ------------------
  194|  3.55k|        if (!sk_X509_INFO_push(ret, xi))
  ------------------
  |  |  407|  3.55k|#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: 3.55k]
  ------------------
  195|      0|            goto err;
  196|  3.55k|        xi = NULL;
  197|  3.55k|    }
  198|  3.55k|    ok = 1;
  199|  3.55k|err:
  200|  3.55k|    X509_INFO_free(xi);
  201|  3.55k|    if (!ok) {
  ------------------
  |  Branch (201:9): [True: 0, False: 3.55k]
  ------------------
  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|  3.55k|    OPENSSL_free(name);
  ------------------
  |  |  132|  3.55k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  212|  3.55k|    OPENSSL_free(header);
  ------------------
  |  |  132|  3.55k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  213|  3.55k|    OPENSSL_free(data);
  ------------------
  |  |  132|  3.55k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  214|  3.55k|    return ret;
  215|  3.55k|}
PEM_X509_INFO_read_bio:
  219|  3.55k|{
  220|  3.55k|    return PEM_X509_INFO_read_bio_ex(bp, sk, cb, u, NULL, NULL);
  221|  3.55k|}

PEM_bytes_read_bio:
  285|  3.73k|{
  286|  3.73k|    return pem_bytes_read_bio_flags(pdata, plen, pnm, name, bp, cb, u,
  287|  3.73k|        PEM_FLAG_EAY_COMPATIBLE);
  ------------------
  |  |  383|  3.73k|#define PEM_FLAG_EAY_COMPATIBLE 0x2
  ------------------
  288|  3.73k|}
PEM_ASN1_write_bio:
  427|     10|{
  428|     10|    return PEM_ASN1_write_bio_internal(i2d, NULL, NULL, name, bp, x, enc,
  429|     10|        kstr, klen, callback, u);
  430|     10|}
PEM_do_header:
  443|  7.28k|{
  444|  7.28k|    int ok;
  445|  7.28k|    int keylen;
  446|  7.28k|    long len = *plen;
  447|  7.28k|    int ilen = (int)len; /* EVP_DecryptUpdate etc. take int lengths */
  448|  7.28k|    EVP_CIPHER_CTX *ctx;
  449|  7.28k|    unsigned char key[EVP_MAX_KEY_LENGTH];
  450|  7.28k|    char buf[PEM_BUFSIZE];
  451|       |
  452|  7.28k|#if LONG_MAX > INT_MAX
  453|       |    /* Check that we did not truncate the length */
  454|  7.28k|    if (len > INT_MAX) {
  ------------------
  |  Branch (454:9): [True: 0, False: 7.28k]
  ------------------
  455|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_HEADER_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  456|      0|        return 0;
  457|      0|    }
  458|  7.28k|#endif
  459|       |
  460|  7.28k|    if (cipher->cipher == NULL)
  ------------------
  |  Branch (460:9): [True: 7.28k, False: 0]
  ------------------
  461|  7.28k|        return 1;
  462|      0|    if (callback == NULL)
  ------------------
  |  Branch (462:9): [True: 0, False: 0]
  ------------------
  463|      0|        keylen = PEM_def_callback(buf, PEM_BUFSIZE, 0, u);
  ------------------
  |  |   33|      0|#define PEM_BUFSIZE 1024
  ------------------
  464|      0|    else
  465|      0|        keylen = callback(buf, PEM_BUFSIZE, 0, u);
  ------------------
  |  |   33|      0|#define PEM_BUFSIZE 1024
  ------------------
  466|      0|    if (keylen < 0) {
  ------------------
  |  Branch (466:9): [True: 0, False: 0]
  ------------------
  467|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_BAD_PASSWORD_READ);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  468|      0|        return 0;
  469|      0|    }
  470|       |#ifdef CHARSET_EBCDIC
  471|       |    /* Convert the pass phrase from EBCDIC */
  472|       |    ebcdic2ascii(buf, buf, keylen);
  473|       |#endif
  474|       |
  475|      0|    if (!EVP_BytesToKey(cipher->cipher, EVP_md5(), &(cipher->iv[0]),
  ------------------
  |  Branch (475:9): [True: 0, False: 0]
  ------------------
  476|      0|            (unsigned char *)buf, keylen, 1, key, NULL))
  477|      0|        return 0;
  478|       |
  479|      0|    ctx = EVP_CIPHER_CTX_new();
  480|      0|    if (ctx == NULL)
  ------------------
  |  Branch (480:9): [True: 0, False: 0]
  ------------------
  481|      0|        return 0;
  482|       |
  483|      0|    ok = EVP_DecryptInit_ex(ctx, cipher->cipher, NULL, key, &(cipher->iv[0]));
  484|      0|    if (ok)
  ------------------
  |  Branch (484:9): [True: 0, False: 0]
  ------------------
  485|      0|        ok = EVP_DecryptUpdate(ctx, data, &ilen, data, ilen);
  486|      0|    if (ok) {
  ------------------
  |  Branch (486:9): [True: 0, False: 0]
  ------------------
  487|       |        /* Squirrel away the length of data decrypted so far. */
  488|      0|        *plen = ilen;
  489|      0|        ok = EVP_DecryptFinal_ex(ctx, &(data[ilen]), &ilen);
  490|      0|    }
  491|      0|    if (ok)
  ------------------
  |  Branch (491:9): [True: 0, False: 0]
  ------------------
  492|      0|        *plen += ilen;
  493|      0|    else
  494|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_BAD_DECRYPT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  495|       |
  496|      0|    EVP_CIPHER_CTX_free(ctx);
  497|      0|    OPENSSL_cleanse((char *)buf, sizeof(buf));
  498|      0|    OPENSSL_cleanse((char *)key, sizeof(key));
  499|      0|    return ok;
  500|      0|}
PEM_get_EVP_CIPHER_INFO:
  518|  7.28k|{
  519|  7.28k|    const EVP_CIPHER *enc = NULL;
  520|  7.28k|    int ivlen;
  521|  7.28k|    char *dekinfostart, c;
  522|       |
  523|  7.28k|    cipher->cipher = NULL;
  524|  7.28k|    memset(cipher->iv, 0, sizeof(cipher->iv));
  525|  7.28k|    if ((header == NULL) || (*header == '\0') || (*header == '\n'))
  ------------------
  |  Branch (525:9): [True: 0, False: 7.28k]
  |  Branch (525:29): [True: 7.28k, False: 0]
  |  Branch (525:50): [True: 0, False: 0]
  ------------------
  526|  7.28k|        return 1;
  527|       |
  528|      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 (528:9): [True: 0, False: 0]
  ------------------
  529|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_NOT_PROC_TYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  530|      0|        return 0;
  531|      0|    }
  532|      0|    header += strspn(header, " \t");
  533|       |
  534|      0|    if (*header++ != '4' || *header++ != ',')
  ------------------
  |  Branch (534:9): [True: 0, False: 0]
  |  Branch (534:29): [True: 0, False: 0]
  ------------------
  535|      0|        return 0;
  536|      0|    header += strspn(header, " \t");
  537|       |
  538|       |    /* We expect "ENCRYPTED" followed by optional white-space + line break */
  539|      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 (539:9): [True: 0, False: 0]
  |  Branch (539:54): [True: 0, False: 0]
  ------------------
  540|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_NOT_ENCRYPTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  541|      0|        return 0;
  542|      0|    }
  543|      0|    header += strspn(header, " \t\r");
  544|      0|    if (*header++ != '\n') {
  ------------------
  |  Branch (544:9): [True: 0, False: 0]
  ------------------
  545|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_SHORT_HEADER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  546|      0|        return 0;
  547|      0|    }
  548|       |
  549|       |    /*-
  550|       |     * https://tools.ietf.org/html/rfc1421#section-4.6.1.3
  551|       |     * We expect "DEK-Info: algo[,hex-parameters]"
  552|       |     */
  553|      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 (553:9): [True: 0, False: 0]
  ------------------
  554|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_NOT_DEK_INFO);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  555|      0|        return 0;
  556|      0|    }
  557|      0|    header += strspn(header, " \t");
  558|       |
  559|       |    /*
  560|       |     * DEK-INFO is a comma-separated combination of algorithm name and optional
  561|       |     * parameters.
  562|       |     */
  563|      0|    dekinfostart = header;
  564|      0|    header += strcspn(header, " \t,");
  565|      0|    c = *header;
  566|      0|    *header = '\0';
  567|      0|    cipher->cipher = enc = EVP_get_cipherbyname(dekinfostart);
  568|      0|    *header = c;
  569|      0|    header += strspn(header, " \t");
  570|       |
  571|      0|    if (enc == NULL) {
  ------------------
  |  Branch (571:9): [True: 0, False: 0]
  ------------------
  572|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_UNSUPPORTED_ENCRYPTION);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  573|      0|        return 0;
  574|      0|    }
  575|      0|    ivlen = EVP_CIPHER_get_iv_length(enc);
  576|      0|    if (ivlen > 0 && *header++ != ',') {
  ------------------
  |  Branch (576:9): [True: 0, False: 0]
  |  Branch (576:22): [True: 0, False: 0]
  ------------------
  577|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_MISSING_DEK_IV);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  578|      0|        return 0;
  579|      0|    } else if (ivlen == 0 && *header == ',') {
  ------------------
  |  Branch (579:16): [True: 0, False: 0]
  |  Branch (579:30): [True: 0, False: 0]
  ------------------
  580|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_UNEXPECTED_DEK_IV);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  581|      0|        return 0;
  582|      0|    }
  583|       |
  584|      0|    if (!load_iv(&header, cipher->iv, EVP_CIPHER_get_iv_length(enc)))
  ------------------
  |  Branch (584:9): [True: 0, False: 0]
  ------------------
  585|      0|        return 0;
  586|       |
  587|      0|    return 1;
  588|      0|}
PEM_write_bio:
  633|     10|{
  634|     10|    int nlen, n, i, j, outl;
  635|     10|    unsigned char *buf = NULL;
  636|     10|    EVP_ENCODE_CTX *ctx = EVP_ENCODE_CTX_new();
  637|     10|    int reason = 0;
  638|     10|    int retval = 0;
  639|       |
  640|     10|    if (ctx == NULL) {
  ------------------
  |  Branch (640:9): [True: 0, False: 10]
  ------------------
  641|      0|        reason = ERR_R_EVP_LIB;
  ------------------
  |  |  273|      0|#define ERR_R_EVP_LIB (ERR_LIB_EVP /* 6 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |   59|      0|#define ERR_LIB_EVP 6
  |  |  ------------------
  |  |               #define ERR_R_EVP_LIB (ERR_LIB_EVP /* 6 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  642|      0|        goto err;
  643|      0|    }
  644|       |
  645|     10|    EVP_EncodeInit(ctx);
  646|     10|    nlen = (int)strlen(name);
  647|       |
  648|     10|    if ((BIO_write(bp, "-----BEGIN ", 11) != 11) || (BIO_write(bp, name, nlen) != nlen) || (BIO_write(bp, "-----\n", 6) != 6)) {
  ------------------
  |  Branch (648:9): [True: 0, False: 10]
  |  Branch (648:53): [True: 0, False: 10]
  |  Branch (648:92): [True: 0, False: 10]
  ------------------
  649|      0|        reason = ERR_R_BIO_LIB;
  ------------------
  |  |  284|      0|#define ERR_R_BIO_LIB (ERR_LIB_BIO /* 32 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |   76|      0|#define ERR_LIB_BIO 32
  |  |  ------------------
  |  |               #define ERR_R_BIO_LIB (ERR_LIB_BIO /* 32 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  650|      0|        goto err;
  651|      0|    }
  652|       |
  653|     10|    i = header != NULL ? (int)strlen(header) : 0;
  ------------------
  |  Branch (653:9): [True: 10, False: 0]
  ------------------
  654|     10|    if (i > 0) {
  ------------------
  |  Branch (654:9): [True: 0, False: 10]
  ------------------
  655|      0|        if ((BIO_write(bp, header, i) != i) || (BIO_write(bp, "\n", 1) != 1)) {
  ------------------
  |  Branch (655:13): [True: 0, False: 0]
  |  Branch (655:48): [True: 0, False: 0]
  ------------------
  656|      0|            reason = ERR_R_BIO_LIB;
  ------------------
  |  |  284|      0|#define ERR_R_BIO_LIB (ERR_LIB_BIO /* 32 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |   76|      0|#define ERR_LIB_BIO 32
  |  |  ------------------
  |  |               #define ERR_R_BIO_LIB (ERR_LIB_BIO /* 32 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  657|      0|            goto err;
  658|      0|        }
  659|      0|    }
  660|       |
  661|     10|    buf = OPENSSL_malloc_array(PEM_BUFSIZE, 8);
  ------------------
  |  |  111|     10|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  662|     10|    if (buf == NULL)
  ------------------
  |  Branch (662:9): [True: 0, False: 10]
  ------------------
  663|      0|        goto err;
  664|       |
  665|     10|    i = j = 0;
  666|     20|    while (len > 0) {
  ------------------
  |  Branch (666:12): [True: 10, False: 10]
  ------------------
  667|     10|        n = (int)((len > (PEM_BUFSIZE * 5)) ? (PEM_BUFSIZE * 5) : len);
  ------------------
  |  |   33|     10|#define PEM_BUFSIZE 1024
  ------------------
                      n = (int)((len > (PEM_BUFSIZE * 5)) ? (PEM_BUFSIZE * 5) : len);
  ------------------
  |  |   33|      0|#define PEM_BUFSIZE 1024
  ------------------
  |  Branch (667:19): [True: 0, False: 10]
  ------------------
  668|     10|        if (!EVP_EncodeUpdate(ctx, buf, &outl, &(data[j]), n)) {
  ------------------
  |  Branch (668:13): [True: 0, False: 10]
  ------------------
  669|      0|            reason = ERR_R_EVP_LIB;
  ------------------
  |  |  273|      0|#define ERR_R_EVP_LIB (ERR_LIB_EVP /* 6 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |   59|      0|#define ERR_LIB_EVP 6
  |  |  ------------------
  |  |               #define ERR_R_EVP_LIB (ERR_LIB_EVP /* 6 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|      0|            goto err;
  671|      0|        }
  672|     10|        if ((outl) && (BIO_write(bp, (char *)buf, outl) != outl)) {
  ------------------
  |  Branch (672:13): [True: 10, False: 0]
  |  Branch (672:23): [True: 0, False: 10]
  ------------------
  673|      0|            reason = ERR_R_BIO_LIB;
  ------------------
  |  |  284|      0|#define ERR_R_BIO_LIB (ERR_LIB_BIO /* 32 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |   76|      0|#define ERR_LIB_BIO 32
  |  |  ------------------
  |  |               #define ERR_R_BIO_LIB (ERR_LIB_BIO /* 32 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  674|      0|            goto err;
  675|      0|        }
  676|     10|        i += outl;
  677|     10|        len -= n;
  678|     10|        j += n;
  679|     10|    }
  680|     10|    EVP_EncodeFinal(ctx, buf, &outl);
  681|     10|    if ((outl > 0) && (BIO_write(bp, (char *)buf, outl) != outl)) {
  ------------------
  |  Branch (681:9): [True: 10, False: 0]
  |  Branch (681:23): [True: 0, False: 10]
  ------------------
  682|      0|        reason = ERR_R_BIO_LIB;
  ------------------
  |  |  284|      0|#define ERR_R_BIO_LIB (ERR_LIB_BIO /* 32 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |   76|      0|#define ERR_LIB_BIO 32
  |  |  ------------------
  |  |               #define ERR_R_BIO_LIB (ERR_LIB_BIO /* 32 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  683|      0|        goto err;
  684|      0|    }
  685|     10|    if ((BIO_write(bp, "-----END ", 9) != 9) || (BIO_write(bp, name, nlen) != nlen) || (BIO_write(bp, "-----\n", 6) != 6)) {
  ------------------
  |  Branch (685:9): [True: 0, False: 10]
  |  Branch (685:49): [True: 0, False: 10]
  |  Branch (685:88): [True: 0, False: 10]
  ------------------
  686|      0|        reason = ERR_R_BIO_LIB;
  ------------------
  |  |  284|      0|#define ERR_R_BIO_LIB (ERR_LIB_BIO /* 32 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |   76|      0|#define ERR_LIB_BIO 32
  |  |  ------------------
  |  |               #define ERR_R_BIO_LIB (ERR_LIB_BIO /* 32 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|      0|        goto err;
  688|      0|    }
  689|     10|    retval = i + outl;
  690|       |
  691|     10|err:
  692|     10|    if (retval == 0 && reason != 0)
  ------------------
  |  Branch (692:9): [True: 0, False: 10]
  |  Branch (692:24): [True: 0, False: 0]
  ------------------
  693|     10|        ERR_raise(ERR_LIB_PEM, reason);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  694|     10|    EVP_ENCODE_CTX_free(ctx);
  695|     10|    OPENSSL_clear_free(buf, PEM_BUFSIZE * 8);
  ------------------
  |  |  130|     10|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  696|     10|    return retval;
  697|     10|}
PEM_read_bio_ex:
  942|  14.5k|{
  943|  14.5k|    EVP_ENCODE_CTX *ctx = NULL;
  944|  14.5k|    const BIO_METHOD *bmeth;
  945|  14.5k|    BIO *headerB = NULL, *dataB = NULL;
  946|  14.5k|    char *name = NULL;
  947|  14.5k|    int len, taillen, headerlen, ret = 0;
  948|  14.5k|    BUF_MEM *buf_mem;
  949|       |
  950|  14.5k|    *len_out = 0;
  951|  14.5k|    *name_out = *header = NULL;
  952|  14.5k|    *data = NULL;
  953|  14.5k|    if ((flags & PEM_FLAG_EAY_COMPATIBLE) && (flags & PEM_FLAG_ONLY_B64)) {
  ------------------
  |  |  383|  14.5k|#define PEM_FLAG_EAY_COMPATIBLE 0x2
  ------------------
                  if ((flags & PEM_FLAG_EAY_COMPATIBLE) && (flags & PEM_FLAG_ONLY_B64)) {
  ------------------
  |  |  384|  14.5k|#define PEM_FLAG_ONLY_B64 0x4
  ------------------
  |  Branch (953:9): [True: 14.5k, False: 0]
  |  Branch (953:46): [True: 0, False: 14.5k]
  ------------------
  954|       |        /* These two are mutually incompatible; bail out. */
  955|      0|        ERR_raise(ERR_LIB_PEM, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  956|      0|        goto end;
  957|      0|    }
  958|  14.5k|    bmeth = (flags & PEM_FLAG_SECURE) ? BIO_s_secmem() : BIO_s_mem();
  ------------------
  |  |  382|  14.5k|#define PEM_FLAG_SECURE 0x1
  ------------------
  |  Branch (958:13): [True: 0, False: 14.5k]
  ------------------
  959|       |
  960|  14.5k|    headerB = BIO_new(bmeth);
  961|  14.5k|    dataB = BIO_new(bmeth);
  962|  14.5k|    if (headerB == NULL || dataB == NULL) {
  ------------------
  |  Branch (962:9): [True: 0, False: 14.5k]
  |  Branch (962:28): [True: 0, False: 14.5k]
  ------------------
  963|      0|        ERR_raise(ERR_LIB_PEM, ERR_R_BIO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  964|      0|        goto end;
  965|      0|    }
  966|       |
  967|  14.5k|    if (!get_name(bp, &name, flags))
  ------------------
  |  Branch (967:9): [True: 3.55k, False: 11.0k]
  ------------------
  968|  3.55k|        goto end;
  969|  11.0k|    if (!get_header_and_data(bp, &headerB, &dataB, name, flags))
  ------------------
  |  Branch (969:9): [True: 0, False: 11.0k]
  ------------------
  970|      0|        goto end;
  971|       |
  972|  11.0k|    BIO_get_mem_ptr(dataB, &buf_mem);
  ------------------
  |  |  627|  11.0k|#define BIO_get_mem_ptr(b, pp) BIO_ctrl(b, BIO_C_GET_BUF_MEM_PTR, 0, \
  |  |  ------------------
  |  |  |  |  458|  11.0k|#define BIO_C_GET_BUF_MEM_PTR 115
  |  |  ------------------
  |  |  628|  11.0k|    (char *)(pp))
  ------------------
  973|  11.0k|    if (buf_mem->length > INT_MAX) {
  ------------------
  |  Branch (973:9): [True: 0, False: 11.0k]
  ------------------
  974|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_BAD_BASE64_DECODE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  975|      0|        goto end;
  976|      0|    }
  977|  11.0k|    len = (int)buf_mem->length;
  978|       |
  979|       |    /* There was no data in the PEM file */
  980|  11.0k|    if (len == 0)
  ------------------
  |  Branch (980:9): [True: 0, False: 11.0k]
  ------------------
  981|      0|        goto end;
  982|       |
  983|  11.0k|    ctx = EVP_ENCODE_CTX_new();
  984|  11.0k|    if (ctx == NULL) {
  ------------------
  |  Branch (984:9): [True: 0, False: 11.0k]
  ------------------
  985|      0|        ERR_raise(ERR_LIB_PEM, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  986|      0|        goto end;
  987|      0|    }
  988|       |
  989|  11.0k|    EVP_DecodeInit(ctx);
  990|  11.0k|    if (EVP_DecodeUpdate(ctx, (unsigned char *)buf_mem->data, &len,
  ------------------
  |  Branch (990:9): [True: 0, False: 11.0k]
  ------------------
  991|  11.0k|            (unsigned char *)buf_mem->data, len)
  992|  11.0k|            < 0
  993|  11.0k|        || EVP_DecodeFinal(ctx, (unsigned char *)&(buf_mem->data[len]),
  ------------------
  |  Branch (993:12): [True: 0, False: 11.0k]
  ------------------
  994|  11.0k|               &taillen)
  995|  11.0k|            < 0) {
  996|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_BAD_BASE64_DECODE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  997|      0|        goto end;
  998|      0|    }
  999|  11.0k|    len += taillen;
 1000|  11.0k|    buf_mem->length = len;
 1001|       |
 1002|  11.0k|    headerlen = BIO_get_mem_data(headerB, NULL);
  ------------------
  |  |  625|  11.0k|#define BIO_get_mem_data(b, pp) BIO_ctrl(b, BIO_CTRL_INFO, 0, (char *)(pp))
  |  |  ------------------
  |  |  |  |   92|  11.0k|#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
  |  |  ------------------
  ------------------
 1003|  11.0k|    *header = PEM_MALLOC(headerlen + 1, flags);
  ------------------
  |  |  231|  11.0k|    pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1004|  11.0k|    *data = PEM_MALLOC(len, flags);
  ------------------
  |  |  231|  11.0k|    pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1005|  11.0k|    if (*header == NULL || *data == NULL)
  ------------------
  |  Branch (1005:9): [True: 0, False: 11.0k]
  |  Branch (1005:28): [True: 0, False: 11.0k]
  ------------------
 1006|      0|        goto out_free;
 1007|  11.0k|    if (headerlen != 0 && BIO_read(headerB, *header, headerlen) != headerlen)
  ------------------
  |  Branch (1007:9): [True: 0, False: 11.0k]
  |  Branch (1007:27): [True: 0, False: 0]
  ------------------
 1008|      0|        goto out_free;
 1009|  11.0k|    (*header)[headerlen] = '\0';
 1010|  11.0k|    if (BIO_read(dataB, *data, len) != len)
  ------------------
  |  Branch (1010:9): [True: 0, False: 11.0k]
  ------------------
 1011|      0|        goto out_free;
 1012|  11.0k|    *len_out = len;
 1013|  11.0k|    *name_out = name;
 1014|  11.0k|    name = NULL;
 1015|  11.0k|    ret = 1;
 1016|  11.0k|    goto end;
 1017|       |
 1018|      0|out_free:
 1019|      0|    PEM_FREE(*header, flags, 0);
  ------------------
  |  |  220|      0|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1020|      0|    *header = NULL;
 1021|      0|    PEM_FREE(*data, flags, 0);
  ------------------
  |  |  220|      0|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1022|      0|    *data = NULL;
 1023|  14.5k|end:
 1024|  14.5k|    EVP_ENCODE_CTX_free(ctx);
 1025|  14.5k|    PEM_FREE(name, flags, 0);
  ------------------
  |  |  220|  14.5k|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1026|  14.5k|    BIO_free(headerB);
 1027|  14.5k|    BIO_free(dataB);
 1028|  14.5k|    return ret;
 1029|      0|}
PEM_read_bio:
 1033|  10.8k|{
 1034|  10.8k|    return PEM_read_bio_ex(bp, name, header, data, len, PEM_FLAG_EAY_COMPATIBLE);
  ------------------
  |  |  383|  10.8k|#define PEM_FLAG_EAY_COMPATIBLE 0x2
  ------------------
 1035|  10.8k|}
pem_lib.c:pem_bytes_read_bio_flags:
  243|  3.73k|{
  244|  3.73k|    EVP_CIPHER_INFO cipher;
  245|  3.73k|    char *nm = NULL, *header = NULL;
  246|  3.73k|    unsigned char *data = NULL;
  247|  3.73k|    long len = 0;
  248|  3.73k|    int ret = 0;
  249|       |
  250|  3.73k|    do {
  251|  3.73k|        PEM_FREE(nm, flags, 0);
  ------------------
  |  |  220|  3.73k|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  252|  3.73k|        PEM_FREE(header, flags, 0);
  ------------------
  |  |  220|  3.73k|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  253|  3.73k|        PEM_FREE(data, flags, len);
  ------------------
  |  |  220|  3.73k|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  254|  3.73k|        if (!PEM_read_bio_ex(bp, &nm, &header, &data, &len, flags)) {
  ------------------
  |  Branch (254:13): [True: 0, False: 3.73k]
  ------------------
  255|      0|            if (ERR_GET_REASON(ERR_peek_error()) == PEM_R_NO_START_LINE)
  ------------------
  |  |   44|      0|#define PEM_R_NO_START_LINE 108
  ------------------
  |  Branch (255:17): [True: 0, False: 0]
  ------------------
  256|      0|                ERR_add_error_data(2, "Expecting: ", name);
  257|      0|            return 0;
  258|      0|        }
  259|  3.73k|    } while (!check_pem(nm, name));
  ------------------
  |  Branch (259:14): [True: 0, False: 3.73k]
  ------------------
  260|  3.73k|    if (!PEM_get_EVP_CIPHER_INFO(header, &cipher))
  ------------------
  |  Branch (260:9): [True: 0, False: 3.73k]
  ------------------
  261|      0|        goto err;
  262|  3.73k|    if (!PEM_do_header(&cipher, data, &len, cb, u))
  ------------------
  |  Branch (262:9): [True: 0, False: 3.73k]
  ------------------
  263|      0|        goto err;
  264|       |
  265|  3.73k|    *pdata = data;
  266|  3.73k|    *plen = len;
  267|       |
  268|  3.73k|    if (pnm != NULL)
  ------------------
  |  Branch (268:9): [True: 0, False: 3.73k]
  ------------------
  269|      0|        *pnm = nm;
  270|       |
  271|  3.73k|    ret = 1;
  272|       |
  273|  3.73k|err:
  274|  3.73k|    if (!ret || pnm == NULL)
  ------------------
  |  Branch (274:9): [True: 0, False: 3.73k]
  |  Branch (274:17): [True: 3.73k, False: 0]
  ------------------
  275|  3.73k|        PEM_FREE(nm, flags, 0);
  ------------------
  |  |  220|  3.73k|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  276|  3.73k|    PEM_FREE(header, flags, 0);
  ------------------
  |  |  220|  3.73k|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  277|  3.73k|    if (!ret)
  ------------------
  |  Branch (277:9): [True: 0, False: 3.73k]
  ------------------
  278|      0|        PEM_FREE(data, flags, len);
  ------------------
  |  |  220|      0|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  279|  3.73k|    return ret;
  280|  3.73k|}
pem_lib.c:check_pem:
  129|  3.73k|{
  130|       |    /* Normal matching nm and name */
  131|  3.73k|    if (strcmp(nm, name) == 0)
  ------------------
  |  Branch (131:9): [True: 3.73k, False: 0]
  ------------------
  132|  3.73k|        return 1;
  133|       |
  134|       |    /* Make PEM_STRING_EVP_PKEY match any private key */
  135|       |
  136|      0|    if (strcmp(name, PEM_STRING_EVP_PKEY) == 0) {
  ------------------
  |  |   41|      0|#define PEM_STRING_EVP_PKEY "ANY PRIVATE KEY"
  ------------------
  |  Branch (136:9): [True: 0, False: 0]
  ------------------
  137|      0|        int slen;
  138|      0|        const EVP_PKEY_ASN1_METHOD *ameth;
  139|      0|        if (strcmp(nm, PEM_STRING_PKCS8) == 0)
  ------------------
  |  |   49|      0|#define PEM_STRING_PKCS8 "ENCRYPTED PRIVATE KEY"
  ------------------
  |  Branch (139:13): [True: 0, False: 0]
  ------------------
  140|      0|            return 1;
  141|      0|        if (strcmp(nm, PEM_STRING_PKCS8INF) == 0)
  ------------------
  |  |   50|      0|#define PEM_STRING_PKCS8INF "PRIVATE KEY"
  ------------------
  |  Branch (141:13): [True: 0, False: 0]
  ------------------
  142|      0|            return 1;
  143|      0|        slen = ossl_pem_check_suffix(nm, "PRIVATE KEY");
  144|      0|        if (slen > 0) {
  ------------------
  |  Branch (144:13): [True: 0, False: 0]
  ------------------
  145|       |            /*
  146|       |             * NB: ENGINE implementations won't contain a deprecated old
  147|       |             * private key decode function so don't look for them.
  148|       |             */
  149|      0|            ameth = evp_pkey_asn1_find_str(nm, slen);
  150|      0|            if (ameth && ameth->old_priv_decode)
  ------------------
  |  Branch (150:17): [True: 0, False: 0]
  |  Branch (150:26): [True: 0, False: 0]
  ------------------
  151|      0|                return 1;
  152|      0|        }
  153|      0|        return 0;
  154|      0|    }
  155|       |
  156|      0|    if (strcmp(name, PEM_STRING_PARAMETERS) == 0) {
  ------------------
  |  |   58|      0|#define PEM_STRING_PARAMETERS "PARAMETERS"
  ------------------
  |  Branch (156:9): [True: 0, False: 0]
  ------------------
  157|      0|        int slen;
  158|      0|        const EVP_PKEY_ASN1_METHOD *ameth;
  159|      0|        slen = ossl_pem_check_suffix(nm, "PARAMETERS");
  160|      0|        if (slen > 0) {
  ------------------
  |  Branch (160:13): [True: 0, False: 0]
  ------------------
  161|      0|            ameth = evp_pkey_asn1_find_str(nm, slen);
  162|      0|            if (ameth) {
  ------------------
  |  Branch (162:17): [True: 0, False: 0]
  ------------------
  163|      0|                int r;
  164|      0|                if (ameth->param_decode)
  ------------------
  |  Branch (164:21): [True: 0, False: 0]
  ------------------
  165|      0|                    r = 1;
  166|      0|                else
  167|      0|                    r = 0;
  168|      0|                return r;
  169|      0|            }
  170|      0|        }
  171|      0|        return 0;
  172|      0|    }
  173|       |    /* If reading DH parameters handle X9.42 DH format too */
  174|      0|    if (strcmp(nm, PEM_STRING_DHXPARAMS) == 0
  ------------------
  |  |   52|      0|#define PEM_STRING_DHXPARAMS "X9.42 DH PARAMETERS"
  ------------------
  |  Branch (174:9): [True: 0, False: 0]
  ------------------
  175|      0|        && strcmp(name, PEM_STRING_DHPARAMS) == 0)
  ------------------
  |  |   51|      0|#define PEM_STRING_DHPARAMS "DH PARAMETERS"
  ------------------
  |  Branch (175:12): [True: 0, False: 0]
  ------------------
  176|      0|        return 1;
  177|       |
  178|       |    /* Permit older strings */
  179|       |
  180|      0|    if (strcmp(nm, PEM_STRING_X509_OLD) == 0
  ------------------
  |  |   35|      0|#define PEM_STRING_X509_OLD "X509 CERTIFICATE"
  ------------------
  |  Branch (180:9): [True: 0, False: 0]
  ------------------
  181|      0|        && strcmp(name, PEM_STRING_X509) == 0)
  ------------------
  |  |   36|      0|#define PEM_STRING_X509 "CERTIFICATE"
  ------------------
  |  Branch (181:12): [True: 0, False: 0]
  ------------------
  182|      0|        return 1;
  183|       |
  184|      0|    if (strcmp(nm, PEM_STRING_X509_REQ_OLD) == 0
  ------------------
  |  |   38|      0|#define PEM_STRING_X509_REQ_OLD "NEW CERTIFICATE REQUEST"
  ------------------
  |  Branch (184:9): [True: 0, False: 0]
  ------------------
  185|      0|        && strcmp(name, PEM_STRING_X509_REQ) == 0)
  ------------------
  |  |   39|      0|#define PEM_STRING_X509_REQ "CERTIFICATE REQUEST"
  ------------------
  |  Branch (185:12): [True: 0, False: 0]
  ------------------
  186|      0|        return 1;
  187|       |
  188|       |    /* Allow normal certs to be read as trusted certs */
  189|      0|    if (strcmp(nm, PEM_STRING_X509) == 0
  ------------------
  |  |   36|      0|#define PEM_STRING_X509 "CERTIFICATE"
  ------------------
  |  Branch (189:9): [True: 0, False: 0]
  ------------------
  190|      0|        && strcmp(name, PEM_STRING_X509_TRUSTED) == 0)
  ------------------
  |  |   37|      0|#define PEM_STRING_X509_TRUSTED "TRUSTED CERTIFICATE"
  ------------------
  |  Branch (190:12): [True: 0, False: 0]
  ------------------
  191|      0|        return 1;
  192|       |
  193|      0|    if (strcmp(nm, PEM_STRING_X509_OLD) == 0
  ------------------
  |  |   35|      0|#define PEM_STRING_X509_OLD "X509 CERTIFICATE"
  ------------------
  |  Branch (193:9): [True: 0, False: 0]
  ------------------
  194|      0|        && strcmp(name, PEM_STRING_X509_TRUSTED) == 0)
  ------------------
  |  |   37|      0|#define PEM_STRING_X509_TRUSTED "TRUSTED CERTIFICATE"
  ------------------
  |  Branch (194:12): [True: 0, False: 0]
  ------------------
  195|      0|        return 1;
  196|       |
  197|       |    /* Some CAs use PKCS#7 with CERTIFICATE headers */
  198|      0|    if (strcmp(nm, PEM_STRING_X509) == 0
  ------------------
  |  |   36|      0|#define PEM_STRING_X509 "CERTIFICATE"
  ------------------
  |  Branch (198:9): [True: 0, False: 0]
  ------------------
  199|      0|        && strcmp(name, PEM_STRING_PKCS7) == 0)
  ------------------
  |  |   47|      0|#define PEM_STRING_PKCS7 "PKCS7"
  ------------------
  |  Branch (199:12): [True: 0, False: 0]
  ------------------
  200|      0|        return 1;
  201|       |
  202|      0|    if (strcmp(nm, PEM_STRING_PKCS7_SIGNED) == 0
  ------------------
  |  |   48|      0|#define PEM_STRING_PKCS7_SIGNED "PKCS #7 SIGNED DATA"
  ------------------
  |  Branch (202:9): [True: 0, False: 0]
  ------------------
  203|      0|        && strcmp(name, PEM_STRING_PKCS7) == 0)
  ------------------
  |  |   47|      0|#define PEM_STRING_PKCS7 "PKCS7"
  ------------------
  |  Branch (203:12): [True: 0, False: 0]
  ------------------
  204|      0|        return 1;
  205|       |
  206|      0|#ifndef OPENSSL_NO_CMS
  207|      0|    if (strcmp(nm, PEM_STRING_X509) == 0
  ------------------
  |  |   36|      0|#define PEM_STRING_X509 "CERTIFICATE"
  ------------------
  |  Branch (207:9): [True: 0, False: 0]
  ------------------
  208|      0|        && strcmp(name, PEM_STRING_CMS) == 0)
  ------------------
  |  |   59|      0|#define PEM_STRING_CMS "CMS"
  ------------------
  |  Branch (208:12): [True: 0, False: 0]
  ------------------
  209|      0|        return 1;
  210|       |    /* Allow CMS to be read from PKCS#7 headers */
  211|      0|    if (strcmp(nm, PEM_STRING_PKCS7) == 0
  ------------------
  |  |   47|      0|#define PEM_STRING_PKCS7 "PKCS7"
  ------------------
  |  Branch (211:9): [True: 0, False: 0]
  ------------------
  212|      0|        && strcmp(name, PEM_STRING_CMS) == 0)
  ------------------
  |  |   59|      0|#define PEM_STRING_CMS "CMS"
  ------------------
  |  Branch (212:12): [True: 0, False: 0]
  ------------------
  213|      0|        return 1;
  214|      0|#endif
  215|       |
  216|      0|    return 0;
  217|      0|}
pem_lib.c:PEM_ASN1_write_bio_internal:
  323|     10|{
  324|     10|    EVP_CIPHER_CTX *ctx = NULL;
  325|     10|    int dsize = 0, i = 0, j = 0, ret = 0;
  326|     10|    unsigned char *p, *data = NULL;
  327|     10|    const char *objstr = NULL;
  328|     10|    char buf[PEM_BUFSIZE];
  329|     10|    unsigned char key[EVP_MAX_KEY_LENGTH];
  330|     10|    unsigned char iv[EVP_MAX_IV_LENGTH];
  331|       |
  332|     10|    if (enc != NULL) {
  ------------------
  |  Branch (332:9): [True: 0, False: 10]
  ------------------
  333|      0|        objstr = EVP_CIPHER_get0_name(enc);
  334|      0|        if (objstr == NULL || EVP_CIPHER_get_iv_length(enc) == 0
  ------------------
  |  Branch (334:13): [True: 0, False: 0]
  |  Branch (334:31): [True: 0, False: 0]
  ------------------
  335|      0|            || EVP_CIPHER_get_iv_length(enc) > (int)sizeof(iv)
  ------------------
  |  Branch (335:16): [True: 0, False: 0]
  ------------------
  336|       |            /*
  337|       |             * Check "Proc-Type: 4,Encrypted\nDEK-Info: objstr,hex-iv\n"
  338|       |             * fits into buf
  339|       |             */
  340|      0|            || strlen(objstr) + 23 + 2 * EVP_CIPHER_get_iv_length(enc) + 13
  ------------------
  |  Branch (340:16): [True: 0, False: 0]
  ------------------
  341|      0|                > sizeof(buf)) {
  342|      0|            ERR_raise(ERR_LIB_PEM, PEM_R_UNSUPPORTED_CIPHER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  343|      0|            goto err;
  344|      0|        }
  345|      0|    }
  346|       |
  347|     10|    if (i2d == NULL && i2d_ctx == NULL) {
  ------------------
  |  Branch (347:9): [True: 0, False: 10]
  |  Branch (347:24): [True: 0, False: 0]
  ------------------
  348|      0|        ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_INVALID_NULL_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  349|      0|        dsize = 0;
  350|      0|        goto err;
  351|      0|    }
  352|     10|    dsize = i2d != NULL ? i2d(x, NULL) : i2d_ctx(x, NULL, vctx);
  ------------------
  |  Branch (352:13): [True: 10, False: 0]
  ------------------
  353|     10|    if (dsize <= 0) {
  ------------------
  |  Branch (353:9): [True: 0, False: 10]
  ------------------
  354|      0|        ERR_raise(ERR_LIB_PEM, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  355|      0|        dsize = 0;
  356|      0|        goto err;
  357|      0|    }
  358|       |    /* Allocate enough space for one extra cipher block */
  359|     10|    data = OPENSSL_malloc((unsigned int)dsize + EVP_MAX_BLOCK_LENGTH);
  ------------------
  |  |  107|     10|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  360|     10|    if (data == NULL)
  ------------------
  |  Branch (360:9): [True: 0, False: 10]
  ------------------
  361|      0|        goto err;
  362|     10|    p = data;
  363|     10|    i = i2d != NULL ? i2d(x, &p) : i2d_ctx(x, &p, vctx);
  ------------------
  |  Branch (363:9): [True: 10, False: 0]
  ------------------
  364|       |
  365|     10|    if (enc != NULL) {
  ------------------
  |  Branch (365:9): [True: 0, False: 10]
  ------------------
  366|      0|        if (kstr == NULL) {
  ------------------
  |  Branch (366:13): [True: 0, False: 0]
  ------------------
  367|      0|            if (callback == NULL)
  ------------------
  |  Branch (367:17): [True: 0, False: 0]
  ------------------
  368|      0|                klen = PEM_def_callback(buf, PEM_BUFSIZE, 1, u);
  ------------------
  |  |   33|      0|#define PEM_BUFSIZE 1024
  ------------------
  369|      0|            else
  370|      0|                klen = (*callback)(buf, PEM_BUFSIZE, 1, u);
  ------------------
  |  |   33|      0|#define PEM_BUFSIZE 1024
  ------------------
  371|      0|            if (klen <= 0) {
  ------------------
  |  Branch (371:17): [True: 0, False: 0]
  ------------------
  372|      0|                ERR_raise(ERR_LIB_PEM, PEM_R_READ_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  373|      0|                goto err;
  374|      0|            }
  375|       |#ifdef CHARSET_EBCDIC
  376|       |            /* Convert the pass phrase from EBCDIC */
  377|       |            ebcdic2ascii(buf, buf, klen);
  378|       |#endif
  379|      0|            kstr = (unsigned char *)buf;
  380|      0|        }
  381|       |        /* Generate a salt */
  382|      0|        if (RAND_bytes(iv, EVP_CIPHER_get_iv_length(enc)) <= 0)
  ------------------
  |  Branch (382:13): [True: 0, False: 0]
  ------------------
  383|      0|            goto err;
  384|       |        /*
  385|       |         * The 'iv' is used as the iv and as a salt.  It is NOT taken from
  386|       |         * the BytesToKey function
  387|       |         */
  388|      0|        if (!EVP_BytesToKey(enc, EVP_md5(), iv, kstr, klen, 1, key, NULL))
  ------------------
  |  Branch (388:13): [True: 0, False: 0]
  ------------------
  389|      0|            goto err;
  390|       |
  391|      0|        if (kstr == (unsigned char *)buf)
  ------------------
  |  Branch (391:13): [True: 0, False: 0]
  ------------------
  392|      0|            OPENSSL_cleanse(buf, PEM_BUFSIZE);
  ------------------
  |  |   33|      0|#define PEM_BUFSIZE 1024
  ------------------
  393|       |
  394|      0|        buf[0] = '\0';
  395|      0|        PEM_proc_type(buf, PEM_TYPE_ENCRYPTED);
  ------------------
  |  |   65|      0|#define PEM_TYPE_ENCRYPTED 10
  ------------------
  396|      0|        PEM_dek_info(buf, objstr, EVP_CIPHER_get_iv_length(enc), (char *)iv);
  397|       |        /* k=strlen(buf); */
  398|       |
  399|      0|        ret = 1;
  400|      0|        if ((ctx = EVP_CIPHER_CTX_new()) == NULL
  ------------------
  |  Branch (400:13): [True: 0, False: 0]
  ------------------
  401|      0|            || !EVP_EncryptInit_ex(ctx, enc, NULL, key, iv)
  ------------------
  |  Branch (401:16): [True: 0, False: 0]
  ------------------
  402|      0|            || !EVP_EncryptUpdate(ctx, data, &j, data, i)
  ------------------
  |  Branch (402:16): [True: 0, False: 0]
  ------------------
  403|      0|            || !EVP_EncryptFinal_ex(ctx, &(data[j]), &i))
  ------------------
  |  Branch (403:16): [True: 0, False: 0]
  ------------------
  404|      0|            ret = 0;
  405|      0|        if (ret == 0)
  ------------------
  |  Branch (405:13): [True: 0, False: 0]
  ------------------
  406|      0|            goto err;
  407|      0|        i += j;
  408|     10|    } else {
  409|     10|        ret = 1;
  410|     10|        buf[0] = '\0';
  411|     10|    }
  412|     10|    i = PEM_write_bio(bp, name, buf, data, i);
  413|     10|    if (i <= 0)
  ------------------
  |  Branch (413:9): [True: 0, False: 10]
  ------------------
  414|      0|        ret = 0;
  415|     10|err:
  416|     10|    OPENSSL_cleanse(key, sizeof(key));
  417|     10|    OPENSSL_cleanse(iv, sizeof(iv));
  418|     10|    EVP_CIPHER_CTX_free(ctx);
  419|     10|    OPENSSL_cleanse(buf, PEM_BUFSIZE);
  ------------------
  |  |   33|     10|#define PEM_BUFSIZE 1024
  ------------------
  420|     10|    OPENSSL_clear_free(data, (unsigned int)dsize);
  ------------------
  |  |  130|     10|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  421|     10|    return ret;
  422|     10|}
pem_lib.c:get_name:
  772|  14.5k|{
  773|  14.5k|    char *linebuf;
  774|  14.5k|    int ret = 0;
  775|  14.5k|    int len;
  776|  14.5k|    int first_call = 1;
  777|       |
  778|       |    /*
  779|       |     * Need to hold trailing NUL (accounted for by BIO_gets() and the newline
  780|       |     * that will be added by sanitize_line() (the extra '1').
  781|       |     */
  782|  14.5k|    linebuf = PEM_MALLOC(LINESIZE + 1, flags);
  ------------------
  |  |  231|  14.5k|    pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  783|  14.5k|    if (linebuf == NULL)
  ------------------
  |  Branch (783:9): [True: 0, False: 14.5k]
  ------------------
  784|      0|        return 0;
  785|       |
  786|  14.5k|    do {
  787|  14.5k|        len = BIO_gets(bp, linebuf, LINESIZE);
  ------------------
  |  |  763|  14.5k|#define LINESIZE 255
  ------------------
  788|       |
  789|  14.5k|        if (len <= 0) {
  ------------------
  |  Branch (789:13): [True: 3.55k, False: 11.0k]
  ------------------
  790|  3.55k|            ERR_raise(ERR_LIB_PEM, PEM_R_NO_START_LINE);
  ------------------
  |  |  357|  3.55k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|  3.55k|    (ERR_new(),                                                  \
  |  |  |  |  360|  3.55k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|  3.55k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|  3.55k|        ERR_set_error)
  |  |  ------------------
  ------------------
  791|  3.55k|            goto err;
  792|  3.55k|        }
  793|       |
  794|       |        /* Strip trailing garbage and standardize ending. */
  795|  11.0k|        len = sanitize_line(linebuf, len, flags & ~PEM_FLAG_ONLY_B64, first_call);
  ------------------
  |  |  384|  11.0k|#define PEM_FLAG_ONLY_B64 0x4
  ------------------
  796|  11.0k|        first_call = 0;
  797|       |
  798|       |        /* Allow leading empty or non-matching lines. */
  799|  11.0k|    } while (!HAS_PREFIX(linebuf, BEGINSTR)
  ------------------
  |  |   58|  22.0k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  ------------------
  |  Branch (799:14): [True: 0, False: 11.0k]
  ------------------
  800|  11.0k|        || len < TAILLEN
  ------------------
  |  |  770|  22.0k|#define TAILLEN ((int)(sizeof(TAILSTR) - 1))
  |  |  ------------------
  |  |  |  |  767|  11.0k|#define TAILSTR "-----\n"
  |  |  ------------------
  ------------------
  |  Branch (800:12): [True: 0, False: 11.0k]
  ------------------
  801|  11.0k|        || !HAS_PREFIX(linebuf + len - TAILLEN, TAILSTR));
  ------------------
  |  |   58|  11.0k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  ------------------
  |  Branch (801:12): [True: 0, False: 11.0k]
  ------------------
  802|  11.0k|    linebuf[len - TAILLEN] = '\0';
  ------------------
  |  |  770|  11.0k|#define TAILLEN ((int)(sizeof(TAILSTR) - 1))
  |  |  ------------------
  |  |  |  |  767|  11.0k|#define TAILSTR "-----\n"
  |  |  ------------------
  ------------------
  803|  11.0k|    len = len - BEGINLEN - TAILLEN + 1;
  ------------------
  |  |  768|  11.0k|#define BEGINLEN ((int)(sizeof(BEGINSTR) - 1))
  |  |  ------------------
  |  |  |  |  765|  11.0k|#define BEGINSTR "-----BEGIN "
  |  |  ------------------
  ------------------
                  len = len - BEGINLEN - TAILLEN + 1;
  ------------------
  |  |  770|  11.0k|#define TAILLEN ((int)(sizeof(TAILSTR) - 1))
  |  |  ------------------
  |  |  |  |  767|  11.0k|#define TAILSTR "-----\n"
  |  |  ------------------
  ------------------
  804|  11.0k|    *name = PEM_MALLOC(len, flags);
  ------------------
  |  |  231|  11.0k|    pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  805|  11.0k|    if (*name == NULL)
  ------------------
  |  Branch (805:9): [True: 0, False: 11.0k]
  ------------------
  806|      0|        goto err;
  807|  11.0k|    memcpy(*name, linebuf + BEGINLEN, len);
  ------------------
  |  |  768|  11.0k|#define BEGINLEN ((int)(sizeof(BEGINSTR) - 1))
  |  |  ------------------
  |  |  |  |  765|  11.0k|#define BEGINSTR "-----BEGIN "
  |  |  ------------------
  ------------------
  808|  11.0k|    ret = 1;
  809|       |
  810|  14.5k|err:
  811|  14.5k|    PEM_FREE(linebuf, flags, LINESIZE + 1);
  ------------------
  |  |  220|  14.5k|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  812|  14.5k|    return ret;
  813|  11.0k|}
pem_lib.c:sanitize_line:
  719|  98.8k|{
  720|  98.8k|    int i;
  721|  98.8k|    if (first_call) {
  ------------------
  |  Branch (721:9): [True: 11.0k, False: 87.8k]
  ------------------
  722|       |        /* Other BOMs imply unsupported multibyte encoding,
  723|       |         * so don't strip them and let the error raise */
  724|  11.0k|        const unsigned char utf8_bom[3] = { 0xEF, 0xBB, 0xBF };
  725|       |
  726|  11.0k|        if (len > 3 && memcmp(linebuf, utf8_bom, 3) == 0) {
  ------------------
  |  Branch (726:13): [True: 11.0k, False: 0]
  |  Branch (726:24): [True: 0, False: 11.0k]
  ------------------
  727|      0|            memmove(linebuf, linebuf + 3, len - 3);
  728|      0|            linebuf[len - 3] = 0;
  729|      0|            len -= 3;
  730|      0|        }
  731|  11.0k|    }
  732|       |
  733|  98.8k|    if (flags & PEM_FLAG_EAY_COMPATIBLE) {
  ------------------
  |  |  383|  98.8k|#define PEM_FLAG_EAY_COMPATIBLE 0x2
  ------------------
  |  Branch (733:9): [True: 98.8k, False: 0]
  ------------------
  734|       |        /* Strip trailing whitespace */
  735|   296k|        while ((len >= 0) && (linebuf[len] <= ' '))
  ------------------
  |  Branch (735:16): [True: 296k, False: 0]
  |  Branch (735:30): [True: 197k, False: 98.8k]
  ------------------
  736|   197k|            len--;
  737|       |        /* Go back to whitespace before applying uniform line ending. */
  738|  98.8k|        len++;
  739|  98.8k|    } else if (flags & PEM_FLAG_ONLY_B64) {
  ------------------
  |  |  384|      0|#define PEM_FLAG_ONLY_B64 0x4
  ------------------
  |  Branch (739:16): [True: 0, False: 0]
  ------------------
  740|      0|        for (i = 0; i < len; ++i) {
  ------------------
  |  Branch (740:21): [True: 0, False: 0]
  ------------------
  741|      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 (741:17): [True: 0, False: 0]
  |  Branch (741:47): [True: 0, False: 0]
  ------------------
  742|      0|                || linebuf[i] == '\r')
  ------------------
  |  Branch (742:20): [True: 0, False: 0]
  ------------------
  743|      0|                break;
  744|      0|        }
  745|      0|        len = i;
  746|      0|    } else {
  747|       |        /* EVP_DecodeBlock strips leading and trailing whitespace, so just strip
  748|       |         * control characters in-place and let everything through. */
  749|      0|        for (i = 0; i < len; ++i) {
  ------------------
  |  Branch (749:21): [True: 0, False: 0]
  ------------------
  750|      0|            if (linebuf[i] == '\n' || linebuf[i] == '\r')
  ------------------
  |  Branch (750:17): [True: 0, False: 0]
  |  Branch (750:39): [True: 0, False: 0]
  ------------------
  751|      0|                break;
  752|      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]
  |  |  ------------------
  ------------------
  753|      0|                linebuf[i] = ' ';
  754|      0|        }
  755|      0|        len = i;
  756|      0|    }
  757|       |    /* The caller allocated LINESIZE+1, so this is safe. */
  758|  98.8k|    linebuf[len++] = '\n';
  759|  98.8k|    linebuf[len] = '\0';
  760|  98.8k|    return len;
  761|  98.8k|}
pem_lib.c:get_header_and_data:
  835|  11.0k|{
  836|  11.0k|    BIO *tmp = *header;
  837|  11.0k|    char *linebuf, *p;
  838|  11.0k|    int len, ret = 0, end = 0, prev_partial_line_read = 0, partial_line_read = 0;
  839|       |    /* 0 if not seen (yet), 1 if reading header, 2 if finished header */
  840|  11.0k|    enum header_status got_header = MAYBE_HEADER;
  841|  11.0k|    unsigned int flags_mask;
  842|  11.0k|    size_t namelen;
  843|       |
  844|       |    /* Need to hold trailing NUL (accounted for by BIO_gets() and the newline
  845|       |     * that will be added by sanitize_line() (the extra '1'). */
  846|  11.0k|    linebuf = PEM_MALLOC(LINESIZE + 1, flags);
  ------------------
  |  |  231|  11.0k|    pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  847|  11.0k|    if (linebuf == NULL)
  ------------------
  |  Branch (847:9): [True: 0, False: 11.0k]
  ------------------
  848|      0|        return 0;
  849|       |
  850|  87.8k|    while (1) {
  ------------------
  |  Branch (850:12): [True: 87.8k, Folded]
  ------------------
  851|  87.8k|        flags_mask = ~0u;
  852|  87.8k|        len = BIO_gets(bp, linebuf, LINESIZE);
  ------------------
  |  |  763|  87.8k|#define LINESIZE 255
  ------------------
  853|  87.8k|        if (len <= 0) {
  ------------------
  |  Branch (853:13): [True: 0, False: 87.8k]
  ------------------
  854|      0|            ERR_raise(ERR_LIB_PEM, PEM_R_BAD_END_LINE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  855|      0|            goto err;
  856|      0|        }
  857|       |
  858|       |        /*
  859|       |         * Check if line has been read completely or if only part of the line
  860|       |         * has been read. Keep the previous value to ignore newlines that
  861|       |         * appear due to reading a line up until the char before the newline.
  862|       |         */
  863|  87.8k|        prev_partial_line_read = partial_line_read;
  864|  87.8k|        partial_line_read = len == LINESIZE - 1 && linebuf[LINESIZE - 2] != '\n';
  ------------------
  |  |  763|  87.8k|#define LINESIZE 255
  ------------------
                      partial_line_read = len == LINESIZE - 1 && linebuf[LINESIZE - 2] != '\n';
  ------------------
  |  |  763|      0|#define LINESIZE 255
  ------------------
  |  Branch (864:29): [True: 0, False: 87.8k]
  |  Branch (864:52): [True: 0, False: 0]
  ------------------
  865|       |
  866|  87.8k|        if (got_header == MAYBE_HEADER) {
  ------------------
  |  Branch (866:13): [True: 87.8k, False: 0]
  ------------------
  867|  87.8k|            if (memchr(linebuf, ':', len) != NULL)
  ------------------
  |  Branch (867:17): [True: 0, False: 87.8k]
  ------------------
  868|      0|                got_header = IN_HEADER;
  869|  87.8k|        }
  870|  87.8k|        if (HAS_PREFIX(linebuf, ENDSTR) || got_header == IN_HEADER)
  ------------------
  |  |   58|   175k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 11.0k, False: 76.7k]
  |  |  ------------------
  ------------------
  |  Branch (870:44): [True: 0, False: 76.7k]
  ------------------
  871|  11.0k|            flags_mask &= ~PEM_FLAG_ONLY_B64;
  ------------------
  |  |  384|  11.0k|#define PEM_FLAG_ONLY_B64 0x4
  ------------------
  872|  87.8k|        len = sanitize_line(linebuf, len, flags & flags_mask, 0);
  873|       |
  874|       |        /* Check for end of header. */
  875|  87.8k|        if (linebuf[0] == '\n') {
  ------------------
  |  Branch (875:13): [True: 0, False: 87.8k]
  ------------------
  876|       |            /*
  877|       |             * If previous line has been read only partially this newline is a
  878|       |             * regular newline at the end of a line and not an empty line.
  879|       |             */
  880|      0|            if (!prev_partial_line_read) {
  ------------------
  |  Branch (880:17): [True: 0, False: 0]
  ------------------
  881|      0|                if (got_header == POST_HEADER) {
  ------------------
  |  Branch (881:21): [True: 0, False: 0]
  ------------------
  882|       |                    /* Another blank line is an error. */
  883|      0|                    ERR_raise(ERR_LIB_PEM, PEM_R_BAD_END_LINE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  884|      0|                    goto err;
  885|      0|                }
  886|      0|                got_header = POST_HEADER;
  887|      0|                tmp = *data;
  888|      0|            }
  889|      0|            continue;
  890|      0|        }
  891|       |
  892|       |        /* Check for end of stream (which means there is no header). */
  893|  87.8k|        p = linebuf;
  894|  87.8k|        if (CHECK_AND_SKIP_PREFIX(p, ENDSTR)) {
  ------------------
  |  |   61|  87.8k|    (HAS_PREFIX(str, pre) ? ((str) += sizeof(pre) - 1, 1) : 0)
  |  |  ------------------
  |  |  |  |   58|  87.8k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (58:30): [True: 11.0k, False: 76.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (61:5): [True: 11.0k, False: 76.7k]
  |  |  ------------------
  ------------------
  895|  11.0k|            namelen = strlen(name);
  896|  11.0k|            if (strncmp(p, name, namelen) != 0 || !HAS_PREFIX(p + namelen, TAILSTR)) {
  ------------------
  |  |   58|  11.0k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  ------------------
  |  Branch (896:17): [True: 0, False: 11.0k]
  |  Branch (896:51): [True: 0, False: 11.0k]
  ------------------
  897|      0|                ERR_raise(ERR_LIB_PEM, PEM_R_BAD_END_LINE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  898|      0|                goto err;
  899|      0|            }
  900|  11.0k|            if (got_header == MAYBE_HEADER) {
  ------------------
  |  Branch (900:17): [True: 11.0k, False: 0]
  ------------------
  901|  11.0k|                *header = *data;
  902|  11.0k|                *data = tmp;
  903|  11.0k|            }
  904|  11.0k|            break;
  905|  76.7k|        } else if (end) {
  ------------------
  |  Branch (905:20): [True: 0, False: 76.7k]
  ------------------
  906|       |            /* Malformed input; short line not at end of data. */
  907|      0|            ERR_raise(ERR_LIB_PEM, PEM_R_BAD_END_LINE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  908|      0|            goto err;
  909|      0|        }
  910|       |        /*
  911|       |         * Else, a line of text -- could be header or data; we don't
  912|       |         * know yet.  Just pass it through.
  913|       |         */
  914|  76.7k|        if (BIO_puts(tmp, linebuf) < 0)
  ------------------
  |  Branch (914:13): [True: 0, False: 76.7k]
  ------------------
  915|      0|            goto err;
  916|       |        /*
  917|       |         * Only encrypted files need the line length check applied.
  918|       |         */
  919|  76.7k|        if (got_header == POST_HEADER) {
  ------------------
  |  Branch (919:13): [True: 0, False: 76.7k]
  ------------------
  920|       |            /* 65 includes the trailing newline */
  921|      0|            if (len > 65)
  ------------------
  |  Branch (921:17): [True: 0, False: 0]
  ------------------
  922|      0|                goto err;
  923|      0|            if (len < 65)
  ------------------
  |  Branch (923:17): [True: 0, False: 0]
  ------------------
  924|      0|                end = 1;
  925|      0|        }
  926|  76.7k|    }
  927|       |
  928|  11.0k|    ret = 1;
  929|  11.0k|err:
  930|  11.0k|    PEM_FREE(linebuf, flags, LINESIZE + 1);
  ------------------
  |  |  220|  11.0k|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  931|  11.0k|    return ret;
  932|  11.0k|}
pem_lib.c:pem_malloc:
  234|  58.6k|{
  235|  58.6k|    return (flags & PEM_FLAG_SECURE) ? CRYPTO_secure_malloc(num, file, line)
  ------------------
  |  |  382|  58.6k|#define PEM_FLAG_SECURE 0x1
  ------------------
  |  Branch (235:12): [True: 0, False: 58.6k]
  ------------------
  236|  58.6k|                                     : CRYPTO_malloc(num, file, line);
  237|  58.6k|}
pem_lib.c:pem_free:
  223|  58.8k|{
  224|  58.8k|    if (flags & PEM_FLAG_SECURE)
  ------------------
  |  |  382|  58.8k|#define PEM_FLAG_SECURE 0x1
  ------------------
  |  Branch (224:9): [True: 0, False: 58.8k]
  ------------------
  225|      0|        CRYPTO_secure_clear_free(p, num, file, line);
  226|  58.8k|    else
  227|  58.8k|        CRYPTO_free(p, file, line);
  228|  58.8k|}

PEM_ASN1_read_bio:
   22|  3.73k|{
   23|  3.73k|    const unsigned char *p = NULL;
   24|  3.73k|    unsigned char *data = NULL;
   25|  3.73k|    long len;
   26|  3.73k|    char *ret = NULL;
   27|       |
   28|  3.73k|    if (!PEM_bytes_read_bio(&data, &len, NULL, name, bp, cb, u))
  ------------------
  |  Branch (28:9): [True: 0, False: 3.73k]
  ------------------
   29|      0|        return NULL;
   30|  3.73k|    p = data;
   31|  3.73k|    ret = d2i(x, &p, len);
   32|  3.73k|    if (ret == NULL)
  ------------------
  |  Branch (32:9): [True: 0, False: 3.73k]
  ------------------
   33|  3.73k|        ERR_raise(ERR_LIB_PEM, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   34|  3.73k|    OPENSSL_free(data);
  ------------------
  |  |  132|  3.73k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   35|  3.73k|    return ret;
   36|  3.73k|}

PEM_read_bio_PrivateKey_ex:
  305|  3.73k|{
  306|  3.73k|    return pem_read_bio_key(bp, x, cb, u, libctx, propq,
  307|       |        /* we also want the public key, if available */
  308|  3.73k|        EVP_PKEY_KEYPAIR);
  ------------------
  |  |  114|  3.73k|    (EVP_PKEY_PUBLIC_KEY | OSSL_KEYMGMT_SELECT_PRIVATE_KEY)
  |  |  ------------------
  |  |  |  |  112|  3.73k|    (EVP_PKEY_KEY_PARAMETERS | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  |  |  ------------------
  |  |  |  |  |  |  108|  3.73k|    (OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  653|  3.73k|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  648|  3.73k|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  654|  3.73k|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  649|  3.73k|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_KEY_PARAMETERS | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  |  |  ------------------
  |  |  |  |  |  |  647|  3.73k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   (EVP_PKEY_PUBLIC_KEY | OSSL_KEYMGMT_SELECT_PRIVATE_KEY)
  |  |  ------------------
  |  |  |  |  646|  3.73k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  ------------------
  309|  3.73k|}
PEM_read_bio_PrivateKey:
  313|  3.73k|{
  314|  3.73k|    return PEM_read_bio_PrivateKey_ex(bp, x, cb, u, NULL, NULL);
  315|  3.73k|}
pem_pkey.c:pem_read_bio_key:
  220|  3.73k|{
  221|  3.73k|    EVP_PKEY *ret = NULL;
  222|  3.73k|    BIO *new_bio = NULL;
  223|  3.73k|    int pos;
  224|  3.73k|    struct ossl_passphrase_data_st pwdata = { 0 };
  225|       |
  226|  3.73k|    if ((pos = BIO_tell(bp)) < 0) {
  ------------------
  |  |  583|  3.73k|#define BIO_tell(b) (int)BIO_ctrl(b, BIO_C_FILE_TELL, 0, NULL)
  |  |  ------------------
  |  |  |  |  477|  3.73k|#define BIO_C_FILE_TELL 133
  |  |  ------------------
  ------------------
  |  Branch (226:9): [True: 0, False: 3.73k]
  ------------------
  227|      0|        new_bio = BIO_new(BIO_f_readbuffer());
  228|      0|        if (new_bio == NULL)
  ------------------
  |  Branch (228:13): [True: 0, False: 0]
  ------------------
  229|      0|            return NULL;
  230|      0|        bp = BIO_push(new_bio, bp);
  231|      0|        pos = BIO_tell(bp);
  ------------------
  |  |  583|      0|#define BIO_tell(b) (int)BIO_ctrl(b, BIO_C_FILE_TELL, 0, NULL)
  |  |  ------------------
  |  |  |  |  477|      0|#define BIO_C_FILE_TELL 133
  |  |  ------------------
  ------------------
  232|      0|    }
  233|       |
  234|  3.73k|    if (cb == NULL)
  ------------------
  |  Branch (234:9): [True: 3.73k, False: 0]
  ------------------
  235|  3.73k|        cb = PEM_def_callback;
  236|       |
  237|  3.73k|    if (!ossl_pw_set_pem_password_cb(&pwdata, cb, u)
  ------------------
  |  Branch (237:9): [True: 0, False: 3.73k]
  ------------------
  238|  3.73k|        || !ossl_pw_enable_passphrase_caching(&pwdata))
  ------------------
  |  Branch (238:12): [True: 0, False: 3.73k]
  ------------------
  239|      0|        goto err;
  240|       |
  241|  3.73k|    ERR_set_mark();
  242|  3.73k|    ret = pem_read_bio_key_decoder(bp, x, ossl_pw_pem_password, &pwdata,
  243|  3.73k|        libctx, propq, selection);
  244|  3.73k|    if (ret == NULL
  ------------------
  |  Branch (244:9): [True: 0, False: 3.73k]
  ------------------
  245|      0|        && (BIO_seek(bp, pos) < 0
  ------------------
  |  |  582|      0|#define BIO_seek(b, ofs) (int)BIO_ctrl(b, BIO_C_FILE_SEEK, ofs, NULL)
  |  |  ------------------
  |  |  |  |  471|      0|#define BIO_C_FILE_SEEK 128
  |  |  ------------------
  ------------------
  |  Branch (245:13): [True: 0, False: 0]
  ------------------
  246|      0|            || (ret = pem_read_bio_key_legacy(bp, x,
  ------------------
  |  Branch (246:16): [True: 0, False: 0]
  ------------------
  247|      0|                    ossl_pw_pem_password, &pwdata,
  248|      0|                    libctx, propq,
  249|      0|                    selection))
  250|      0|                == NULL))
  251|      0|        ERR_clear_last_mark();
  252|  3.73k|    else
  253|  3.73k|        ERR_pop_to_mark();
  254|       |
  255|  3.73k|err:
  256|  3.73k|    ossl_pw_clear_passphrase_data(&pwdata);
  257|  3.73k|    if (new_bio != NULL) {
  ------------------
  |  Branch (257:9): [True: 0, False: 3.73k]
  ------------------
  258|      0|        BIO_pop(new_bio);
  259|      0|        BIO_free(new_bio);
  260|      0|    }
  261|  3.73k|    return ret;
  262|  3.73k|}
pem_pkey.c:pem_read_bio_key_decoder:
   39|  3.73k|{
   40|  3.73k|    EVP_PKEY *pkey = NULL;
   41|  3.73k|    OSSL_DECODER_CTX *dctx = NULL;
   42|  3.73k|    int pos, newpos;
   43|       |
   44|  3.73k|    if ((pos = BIO_tell(bp)) < 0)
  ------------------
  |  |  583|  3.73k|#define BIO_tell(b) (int)BIO_ctrl(b, BIO_C_FILE_TELL, 0, NULL)
  |  |  ------------------
  |  |  |  |  477|  3.73k|#define BIO_C_FILE_TELL 133
  |  |  ------------------
  ------------------
  |  Branch (44:9): [True: 0, False: 3.73k]
  ------------------
   45|       |        /* We can depend on BIO_tell() thanks to the BIO_f_readbuffer() */
   46|      0|        return NULL;
   47|       |
   48|  3.73k|    dctx = OSSL_DECODER_CTX_new_for_pkey(&pkey, "PEM", NULL, NULL,
   49|  3.73k|        selection, libctx, propq);
   50|       |
   51|  3.73k|    if (dctx == NULL)
  ------------------
  |  Branch (51:9): [True: 0, False: 3.73k]
  ------------------
   52|      0|        return NULL;
   53|       |
   54|  3.73k|    if (cb == NULL)
  ------------------
  |  Branch (54:9): [True: 0, False: 3.73k]
  ------------------
   55|      0|        cb = PEM_def_callback;
   56|       |
   57|  3.73k|    if (!OSSL_DECODER_CTX_set_pem_password_cb(dctx, cb, u))
  ------------------
  |  Branch (57:9): [True: 0, False: 3.73k]
  ------------------
   58|      0|        goto err;
   59|       |
   60|  3.73k|    ERR_set_mark();
   61|  3.73k|    while (!OSSL_DECODER_from_bio(dctx, bp) || pkey == NULL)
  ------------------
  |  Branch (61:12): [True: 0, False: 3.73k]
  |  Branch (61:48): [True: 0, False: 3.73k]
  ------------------
   62|      0|        if (BIO_eof(bp) != 0 || (newpos = BIO_tell(bp)) < 0 || newpos <= pos) {
  ------------------
  |  |  583|      0|#define BIO_tell(b) (int)BIO_ctrl(b, BIO_C_FILE_TELL, 0, NULL)
  |  |  ------------------
  |  |  |  |  477|      0|#define BIO_C_FILE_TELL 133
  |  |  ------------------
  ------------------
  |  Branch (62:13): [True: 0, False: 0]
  |  Branch (62:33): [True: 0, False: 0]
  |  Branch (62:64): [True: 0, False: 0]
  ------------------
   63|      0|            ERR_clear_last_mark();
   64|      0|            goto err;
   65|      0|        } else {
   66|      0|            if (ERR_GET_REASON(ERR_peek_error()) == ERR_R_UNSUPPORTED) {
  ------------------
  |  |  317|      0|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (66:17): [True: 0, False: 0]
  ------------------
   67|       |                /* unsupported PEM data, try again */
   68|      0|                ERR_pop_to_mark();
   69|      0|                ERR_set_mark();
   70|      0|            } else {
   71|       |                /* other error, bail out */
   72|      0|                ERR_clear_last_mark();
   73|      0|                goto err;
   74|      0|            }
   75|      0|            pos = newpos;
   76|      0|        }
   77|  3.73k|    ERR_pop_to_mark();
   78|       |
   79|       |    /* if we were asked for private key, the public key is optional */
   80|  3.73k|    if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0)
  ------------------
  |  |  646|  3.73k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (80:9): [True: 3.73k, False: 0]
  ------------------
   81|  3.73k|        selection = selection & ~OSSL_KEYMGMT_SELECT_PUBLIC_KEY;
  ------------------
  |  |  647|  3.73k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
   82|       |
   83|  3.73k|    if (!evp_keymgmt_util_has(pkey, selection)) {
  ------------------
  |  Branch (83:9): [True: 0, False: 3.73k]
  ------------------
   84|      0|        EVP_PKEY_free(pkey);
   85|      0|        pkey = NULL;
   86|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_UNSUPPORTED_KEY_COMPONENTS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   87|      0|        goto err;
   88|      0|    }
   89|       |
   90|  3.73k|    if (x != NULL) {
  ------------------
  |  Branch (90:9): [True: 0, False: 3.73k]
  ------------------
   91|      0|        EVP_PKEY_free(*x);
   92|      0|        *x = pkey;
   93|      0|    }
   94|       |
   95|  3.73k|err:
   96|  3.73k|    OSSL_DECODER_CTX_free(dctx);
   97|  3.73k|    return pkey;
   98|  3.73k|}

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

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

ossl_property_defns_new:
   63|      2|{
   64|      2|    return lh_PROPERTY_DEFN_ELEM_new(&property_defn_hash, &property_defn_cmp);
   65|      2|}
ossl_prop_defn_get:
   68|    391|{
   69|    391|    PROPERTY_DEFN_ELEM elem, *r;
   70|    391|    LHASH_OF(PROPERTY_DEFN_ELEM) *property_defns;
  ------------------
  |  |  156|    391|#define LHASH_OF(type) struct lhash_st_##type
  ------------------
   71|       |
   72|    391|    property_defns = ossl_lib_ctx_get_data(ctx,
   73|    391|        OSSL_LIB_CTX_PROPERTY_DEFN_INDEX);
  ------------------
  |  |   97|    391|#define OSSL_LIB_CTX_PROPERTY_DEFN_INDEX 2
  ------------------
   74|    391|    if (!ossl_assert(property_defns != NULL) || !ossl_lib_ctx_read_lock(ctx))
  ------------------
  |  |   52|    782|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|    782|    __FILE__, __LINE__)
  ------------------
  |  Branch (74:9): [True: 0, False: 391]
  |  Branch (74:49): [True: 0, False: 391]
  ------------------
   75|      0|        return NULL;
   76|       |
   77|    391|    elem.prop = prop;
   78|    391|    r = lh_PROPERTY_DEFN_ELEM_retrieve(property_defns, &elem);
   79|    391|    ossl_lib_ctx_unlock(ctx);
   80|    391|    if (r == NULL || !ossl_assert(r->defn != NULL))
  ------------------
  |  |   52|    375|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|    375|    __FILE__, __LINE__)
  ------------------
  |  Branch (80:9): [True: 16, False: 375]
  |  Branch (80:22): [True: 0, False: 375]
  ------------------
   81|     16|        return NULL;
   82|    375|    return r->defn;
   83|    391|}
ossl_prop_defn_set:
   92|     16|{
   93|     16|    PROPERTY_DEFN_ELEM elem, *old, *p = NULL;
   94|     16|    size_t len;
   95|     16|    LHASH_OF(PROPERTY_DEFN_ELEM) *property_defns;
  ------------------
  |  |  156|     16|#define LHASH_OF(type) struct lhash_st_##type
  ------------------
   96|     16|    int res = 1;
   97|       |
   98|     16|    property_defns = ossl_lib_ctx_get_data(ctx,
   99|     16|        OSSL_LIB_CTX_PROPERTY_DEFN_INDEX);
  ------------------
  |  |   97|     16|#define OSSL_LIB_CTX_PROPERTY_DEFN_INDEX 2
  ------------------
  100|     16|    if (property_defns == NULL)
  ------------------
  |  Branch (100:9): [True: 0, False: 16]
  ------------------
  101|      0|        return 0;
  102|       |
  103|     16|    if (prop == NULL)
  ------------------
  |  Branch (103:9): [True: 0, False: 16]
  ------------------
  104|      0|        return 1;
  105|       |
  106|     16|    if (!ossl_lib_ctx_write_lock(ctx))
  ------------------
  |  Branch (106:9): [True: 0, False: 16]
  ------------------
  107|      0|        return 0;
  108|     16|    elem.prop = prop;
  109|     16|    if (pl == NULL) {
  ------------------
  |  Branch (109:9): [True: 0, False: 16]
  ------------------
  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|     16|    if ((p = lh_PROPERTY_DEFN_ELEM_retrieve(property_defns, &elem)) != NULL) {
  ------------------
  |  Branch (114:9): [True: 0, False: 16]
  ------------------
  115|      0|        ossl_property_free(*pl);
  116|      0|        *pl = p->defn;
  117|      0|        goto end;
  118|      0|    }
  119|     16|    len = strlen(prop);
  120|     16|    p = OPENSSL_malloc(sizeof(*p) + len);
  ------------------
  |  |  107|     16|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  121|     16|    if (p != NULL) {
  ------------------
  |  Branch (121:9): [True: 16, False: 0]
  ------------------
  122|     16|        p->prop = p->body;
  123|     16|        p->defn = *pl;
  124|     16|        memcpy(p->body, prop, len + 1);
  125|     16|        old = lh_PROPERTY_DEFN_ELEM_insert(property_defns, p);
  126|     16|        if (!ossl_assert(old == NULL))
  ------------------
  |  |   52|     16|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|     16|    __FILE__, __LINE__)
  ------------------
  |  Branch (126:13): [True: 0, False: 16]
  ------------------
  127|       |            /* This should not happen. An existing entry is handled above. */
  128|      0|            goto end;
  129|     16|        if (!lh_PROPERTY_DEFN_ELEM_error(property_defns))
  ------------------
  |  Branch (129:13): [True: 16, False: 0]
  ------------------
  130|     16|            goto end;
  131|     16|    }
  132|      0|    OPENSSL_free(p);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  133|      0|    res = 0;
  134|     16|end:
  135|     16|    ossl_lib_ctx_unlock(ctx);
  136|     16|    return res;
  137|      0|}
defn_cache.c:property_defn_hash:
   35|    423|{
   36|    423|    return OPENSSL_LH_strhash(a->prop);
   37|    423|}
defn_cache.c:property_defn_cmp:
   41|    375|{
   42|    375|    return strcmp(a->prop, b->prop);
   43|    375|}

ossl_ctx_global_properties_new:
  142|      2|{
  143|      2|    return OPENSSL_zalloc(sizeof(OSSL_GLOBAL_PROPERTIES));
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  144|      2|}
ossl_ctx_global_properties:
  148|     64|{
  149|     64|    OSSL_GLOBAL_PROPERTIES *globp;
  150|       |
  151|     64|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_AUTOLOAD_CONFIG)
  152|     64|    if (loadconfig && !OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL))
  ------------------
  |  |  511|      0|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
  |  Branch (152:9): [True: 0, False: 64]
  |  Branch (152:23): [True: 0, False: 0]
  ------------------
  153|      0|        return NULL;
  154|     64|#endif
  155|     64|    globp = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_GLOBAL_PROPERTIES);
  ------------------
  |  |  111|     64|#define OSSL_LIB_CTX_GLOBAL_PROPERTIES 14
  ------------------
  156|       |
  157|     64|    return globp != NULL ? &globp->list : NULL;
  ------------------
  |  Branch (157:12): [True: 64, False: 0]
  ------------------
  158|     64|}
ossl_method_store_new:
  301|      8|{
  302|      8|    OSSL_METHOD_STORE *res;
  303|       |
  304|      8|    res = OPENSSL_zalloc(sizeof(*res));
  ------------------
  |  |  109|      8|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  305|      8|    if (res != NULL) {
  ------------------
  |  Branch (305:9): [True: 8, False: 0]
  ------------------
  306|      8|        res->ctx = ctx;
  307|      8|        if ((res->algs = stored_algs_new()) == NULL
  ------------------
  |  Branch (307:13): [True: 0, False: 8]
  ------------------
  308|      8|            || (res->biglock = CRYPTO_THREAD_lock_new()) == NULL) {
  ------------------
  |  Branch (308:16): [True: 0, False: 8]
  ------------------
  309|      0|            ossl_method_store_free(res);
  310|      0|            return NULL;
  311|      0|        }
  312|      8|    }
  313|      8|    return res;
  314|      8|}
ossl_method_lock_store:
  327|   117k|{
  328|   117k|    return store != NULL ? CRYPTO_THREAD_write_lock(store->biglock) : 0;
  ------------------
  |  Branch (328:12): [True: 117k, False: 0]
  ------------------
  329|   117k|}
ossl_method_unlock_store:
  332|   117k|{
  333|   117k|    return store != NULL ? CRYPTO_THREAD_unlock(store->biglock) : 0;
  ------------------
  |  Branch (333:12): [True: 117k, False: 0]
  ------------------
  334|   117k|}
ossl_method_store_add:
  375|    391|{
  376|    391|    STORED_ALGORITHMS *sa;
  377|    391|    ALGORITHM *alg = NULL;
  378|    391|    IMPLEMENTATION *impl;
  379|    391|    int ret = 0;
  380|    391|    int i;
  381|       |
  382|    391|    if (nid <= 0 || method == NULL || store == NULL)
  ------------------
  |  Branch (382:9): [True: 0, False: 391]
  |  Branch (382:21): [True: 0, False: 391]
  |  Branch (382:39): [True: 0, False: 391]
  ------------------
  383|      0|        return 0;
  384|       |
  385|    391|    if (properties == NULL)
  ------------------
  |  Branch (385:9): [True: 0, False: 391]
  ------------------
  386|      0|        properties = "";
  387|       |
  388|    391|    if (!ossl_assert(prov != NULL))
  ------------------
  |  |   52|    391|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|    391|    __FILE__, __LINE__)
  ------------------
  |  Branch (388:9): [True: 0, False: 391]
  ------------------
  389|      0|        return 0;
  390|       |
  391|       |    /* Create new entry */
  392|    391|    impl = OPENSSL_malloc(sizeof(*impl));
  ------------------
  |  |  107|    391|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  393|    391|    if (impl == NULL)
  ------------------
  |  Branch (393:9): [True: 0, False: 391]
  ------------------
  394|      0|        return 0;
  395|    391|    impl->method.method = method;
  396|    391|    impl->method.up_ref = method_up_ref;
  397|    391|    impl->method.free = method_destruct;
  398|    391|    if (!ossl_method_up_ref(&impl->method)) {
  ------------------
  |  Branch (398:9): [True: 0, False: 391]
  ------------------
  399|      0|        OPENSSL_free(impl);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  400|      0|        return 0;
  401|      0|    }
  402|    391|    impl->provider = prov;
  403|       |
  404|    391|    sa = stored_algs_shard(store, nid);
  ------------------
  |  |  124|    391|#define stored_algs_shard(store, nid) (&(store)->algs[(nid) & (NUM_SHARDS - 1)])
  |  |  ------------------
  |  |  |  |   32|    391|#define NUM_SHARDS 4
  |  |  ------------------
  ------------------
  405|       |
  406|       |    /* Insert into the hash table if required */
  407|    391|    if (!ossl_property_write_lock(sa)) {
  ------------------
  |  Branch (407:9): [True: 0, False: 391]
  ------------------
  408|      0|        impl_free(impl);
  409|      0|        return 0;
  410|      0|    }
  411|       |
  412|       |    /*
  413|       |     * Flush the alg cache of any implementation that already exists
  414|       |     * for this id.
  415|       |     * This is done to ensure that on the next lookup we go through the
  416|       |     * provider comparison in ossl_method_store_fetch.  If we don't do this
  417|       |     * then this new method won't be given a chance to get selected.
  418|       |     * NOTE: This doesn't actually remove the method from the backing store
  419|       |     * It just ensures that we query the backing store when (re)-adding a
  420|       |     * method to the algorithm cache, in case the one selected by the next
  421|       |     * query selects a different implementation
  422|       |     */
  423|    391|    ossl_method_cache_flush(sa, nid);
  424|       |
  425|       |    /*
  426|       |     * Parse the properties associated with this method, and convert it to a
  427|       |     * property list stored against the implementation for later comparison
  428|       |     * during fetch operations
  429|       |     */
  430|    391|    if ((impl->properties = ossl_prop_defn_get(store->ctx, properties)) == NULL) {
  ------------------
  |  Branch (430:9): [True: 16, False: 375]
  ------------------
  431|     16|        impl->properties = ossl_parse_property(store->ctx, properties);
  432|     16|        if (impl->properties == NULL)
  ------------------
  |  Branch (432:13): [True: 0, False: 16]
  ------------------
  433|      0|            goto err;
  434|     16|        if (!ossl_prop_defn_set(store->ctx, properties, &impl->properties)) {
  ------------------
  |  Branch (434:13): [True: 0, False: 16]
  ------------------
  435|      0|            ossl_property_free(impl->properties);
  436|      0|            impl->properties = NULL;
  437|      0|            goto err;
  438|      0|        }
  439|     16|    }
  440|       |
  441|       |    /*
  442|       |     * Check if we have an algorithm cache already for this nid.  If so use
  443|       |     * it, otherwise, create it, and insert it into the store
  444|       |     */
  445|    391|    alg = ossl_method_store_retrieve(sa, nid);
  446|    391|    if (alg == NULL) {
  ------------------
  |  Branch (446:9): [True: 345, False: 46]
  ------------------
  447|    345|        if ((alg = OPENSSL_zalloc(sizeof(*alg))) == NULL
  ------------------
  |  |  109|    345|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (447:13): [True: 0, False: 345]
  ------------------
  448|    345|            || (alg->impls = sk_IMPLEMENTATION_new_null()) == NULL
  ------------------
  |  Branch (448:16): [True: 0, False: 345]
  ------------------
  449|    345|            || (alg->cache = lh_QUERY_new(&query_hash, &query_cmp)) == NULL)
  ------------------
  |  Branch (449:16): [True: 0, False: 345]
  ------------------
  450|      0|            goto err;
  451|    345|        alg->nid = nid;
  452|    345|        if (!ossl_method_store_insert(sa, alg))
  ------------------
  |  Branch (452:13): [True: 0, False: 345]
  ------------------
  453|      0|            goto err;
  454|    345|        OSSL_TRACE2(QUERY, "Inserted an alg with nid %d into the stored algorithms %p\n",
  ------------------
  |  |  293|    345|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  283|    345|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  455|    345|            nid, (void *)sa);
  456|    345|    }
  457|       |
  458|       |    /* Push onto stack if there isn't one there already */
  459|    468|    for (i = 0; i < sk_IMPLEMENTATION_num(alg->impls); i++) {
  ------------------
  |  Branch (459:17): [True: 77, False: 391]
  ------------------
  460|     77|        const IMPLEMENTATION *tmpimpl = sk_IMPLEMENTATION_value(alg->impls, i);
  461|       |
  462|     77|        if (tmpimpl->provider == impl->provider
  ------------------
  |  Branch (462:13): [True: 77, False: 0]
  ------------------
  463|     77|            && tmpimpl->properties == impl->properties)
  ------------------
  |  Branch (463:16): [True: 0, False: 77]
  ------------------
  464|      0|            break;
  465|     77|    }
  466|       |
  467|    391|    if (i == sk_IMPLEMENTATION_num(alg->impls)
  ------------------
  |  Branch (467:9): [True: 391, False: 0]
  ------------------
  468|    391|        && sk_IMPLEMENTATION_push(alg->impls, impl)) {
  ------------------
  |  Branch (468:12): [True: 391, False: 0]
  ------------------
  469|    391|        ret = 1;
  470|    391|#ifndef FIPS_MODULE
  471|    391|        OSSL_TRACE_BEGIN(QUERY)
  ------------------
  |  |  219|    391|    do {                           \
  |  |  220|    391|        BIO *trc_out = NULL;       \
  |  |  221|    391|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 391]
  |  |  ------------------
  ------------------
  472|      0|        {
  473|      0|            BIO_printf(trc_out, "Adding to method store "
  474|      0|                                "nid: %d\nproperties: %s\nprovider: %s\n",
  475|      0|                nid, properties,
  476|      0|                ossl_provider_name(prov) == NULL ? "none" : ossl_provider_name(prov));
  ------------------
  |  Branch (476:17): [True: 0, False: 0]
  ------------------
  477|      0|        }
  478|    391|        OSSL_TRACE_END(QUERY);
  ------------------
  |  |  224|    391|    }                            \
  |  |  225|    391|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 391]
  |  |  ------------------
  ------------------
  479|    391|#endif
  480|    391|    }
  481|    391|    ossl_property_unlock(sa);
  482|    391|    if (ret == 0)
  ------------------
  |  Branch (482:9): [True: 0, False: 391]
  ------------------
  483|      0|        impl_free(impl);
  484|    391|    return ret;
  485|       |
  486|      0|err:
  487|      0|    ossl_property_unlock(sa);
  488|       |    alg_cleanup(0, alg, NULL);
  489|      0|    impl_free(impl);
  490|      0|    return 0;
  491|    391|}
ossl_method_store_do_all:
  645|      6|{
  646|      6|    int i, j;
  647|      6|    int numalgs, numimps;
  648|      6|    STACK_OF(ALGORITHM) *tmpalgs;
  ------------------
  |  |   33|      6|#define STACK_OF(type) struct stack_st_##type
  ------------------
  649|      6|    ALGORITHM *alg;
  650|       |
  651|      6|    if (store == NULL)
  ------------------
  |  Branch (651:9): [True: 0, False: 6]
  ------------------
  652|      0|        return;
  653|       |
  654|     30|    for (int k = 0; k < NUM_SHARDS; ++k) {
  ------------------
  |  |   32|     30|#define NUM_SHARDS 4
  ------------------
  |  Branch (654:21): [True: 24, False: 6]
  ------------------
  655|     24|        STORED_ALGORITHMS *sa = &store->algs[k];
  656|       |
  657|     24|        if (!ossl_property_read_lock(sa))
  ------------------
  |  Branch (657:13): [True: 0, False: 24]
  ------------------
  658|      0|            return;
  659|       |
  660|     24|        tmpalgs = sk_ALGORITHM_new_reserve(NULL,
  661|     24|            (int)ossl_sa_ALGORITHM_num(sa->algs));
  662|     24|        if (tmpalgs == NULL) {
  ------------------
  |  Branch (662:13): [True: 0, False: 24]
  ------------------
  663|      0|            ossl_property_unlock(sa);
  664|      0|            return;
  665|      0|        }
  666|       |
  667|     24|        ossl_sa_ALGORITHM_doall_arg(sa->algs, alg_copy, tmpalgs);
  668|     24|        ossl_property_unlock(sa);
  669|     24|        numalgs = sk_ALGORITHM_num(tmpalgs);
  670|    690|        for (i = 0; i < numalgs; i++) {
  ------------------
  |  Branch (670:21): [True: 666, False: 24]
  ------------------
  671|    666|            alg = sk_ALGORITHM_value(tmpalgs, i);
  672|    666|            numimps = sk_IMPLEMENTATION_num(alg->impls);
  673|  1.51k|            for (j = 0; j < numimps; j++)
  ------------------
  |  Branch (673:25): [True: 850, False: 666]
  ------------------
  674|    850|                alg_do_one(alg, sk_IMPLEMENTATION_value(alg->impls, j), fn, fnarg);
  675|    666|        }
  676|     24|        sk_ALGORITHM_pop_free(tmpalgs, del_tmpalg);
  677|     24|    }
  678|      6|}
ossl_method_store_fetch:
  706|  36.8k|{
  707|  36.8k|    OSSL_PROPERTY_LIST **plp;
  708|  36.8k|    ALGORITHM *alg;
  709|  36.8k|    IMPLEMENTATION *impl, *best_impl = NULL;
  710|  36.8k|    OSSL_PROPERTY_LIST *pq = NULL, *p2 = NULL;
  711|  36.8k|    const OSSL_PROVIDER *prov = prov_rw != NULL ? *prov_rw : NULL;
  ------------------
  |  Branch (711:33): [True: 36.8k, False: 0]
  ------------------
  712|  36.8k|    int ret = 0;
  713|  36.8k|    int j, best = -1, score, optional;
  714|  36.8k|    STORED_ALGORITHMS *sa;
  715|       |
  716|  36.8k|    if (nid <= 0 || method == NULL || store == NULL)
  ------------------
  |  Branch (716:9): [True: 0, False: 36.8k]
  |  Branch (716:21): [True: 0, False: 36.8k]
  |  Branch (716:39): [True: 0, False: 36.8k]
  ------------------
  717|      0|        return 0;
  718|       |
  719|  36.8k|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_AUTOLOAD_CONFIG)
  720|  36.8k|    if (ossl_lib_ctx_is_default(store->ctx)
  ------------------
  |  Branch (720:9): [True: 36.8k, False: 0]
  ------------------
  721|  36.8k|        && !OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL))
  ------------------
  |  |  511|  36.8k|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
  |  Branch (721:12): [True: 0, False: 36.8k]
  ------------------
  722|      0|        return 0;
  723|  36.8k|#endif
  724|       |
  725|  36.8k|    sa = stored_algs_shard(store, nid);
  ------------------
  |  |  124|  36.8k|#define stored_algs_shard(store, nid) (&(store)->algs[(nid) & (NUM_SHARDS - 1)])
  |  |  ------------------
  |  |  |  |   32|  36.8k|#define NUM_SHARDS 4
  |  |  ------------------
  ------------------
  726|       |
  727|       |    /* This only needs to be a read lock, because the query won't create anything */
  728|  36.8k|    if (!ossl_property_read_lock(sa))
  ------------------
  |  Branch (728:9): [True: 0, False: 36.8k]
  ------------------
  729|      0|        return 0;
  730|       |
  731|  36.8k|    OSSL_TRACE2(QUERY, "Retrieving by nid %d from stored algorithms %p\n",
  ------------------
  |  |  293|  36.8k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  283|  36.8k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  732|  36.8k|        nid, (void *)sa);
  733|  36.8k|    alg = ossl_method_store_retrieve(sa, nid);
  734|  36.8k|    if (alg == NULL) {
  ------------------
  |  Branch (734:9): [True: 36.8k, False: 60]
  ------------------
  735|  36.8k|        ossl_property_unlock(sa);
  736|  36.8k|        OSSL_TRACE2(QUERY, "Failed to retrieve by nid %d from stored algorithms %p\n",
  ------------------
  |  |  293|  36.8k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  283|  36.8k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  737|  36.8k|            nid, (void *)sa);
  738|  36.8k|        return 0;
  739|  36.8k|    }
  740|     60|    OSSL_TRACE2(QUERY, "Retrieved by nid %d from stored algorithms %p\n",
  ------------------
  |  |  293|     60|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  283|     60|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  741|     60|        nid, (void *)sa);
  742|       |
  743|       |    /*
  744|       |     * If a property query string is provided, convert it to an
  745|       |     * OSSL_PROPERTY_LIST structure
  746|       |     */
  747|     60|    if (prop_query != NULL)
  ------------------
  |  Branch (747:9): [True: 60, False: 0]
  ------------------
  748|     60|        p2 = pq = ossl_parse_query(store->ctx, prop_query, 0);
  749|       |
  750|       |    /*
  751|       |     * If the library context has default properties specified
  752|       |     * then merge those with the properties passed to this function
  753|       |     */
  754|     60|    plp = ossl_ctx_global_properties(store->ctx, 0);
  755|     60|    if (plp != NULL && *plp != NULL) {
  ------------------
  |  Branch (755:9): [True: 60, False: 0]
  |  Branch (755:24): [True: 0, False: 60]
  ------------------
  756|      0|        if (pq == NULL) {
  ------------------
  |  Branch (756:13): [True: 0, False: 0]
  ------------------
  757|      0|            pq = *plp;
  758|      0|        } else {
  759|      0|            p2 = ossl_property_merge(pq, *plp);
  760|      0|            ossl_property_free(pq);
  761|      0|            if (p2 == NULL)
  ------------------
  |  Branch (761:17): [True: 0, False: 0]
  ------------------
  762|      0|                goto fin;
  763|      0|            pq = p2;
  764|      0|        }
  765|      0|    }
  766|       |
  767|       |    /*
  768|       |     * Search for a provider that provides this implementation.
  769|       |     * If the requested provider is NULL, then any provider will do,
  770|       |     * otherwise we should try to find the one that matches the requested
  771|       |     * provider.  Note that providers are given implicit preference via the
  772|       |     * ordering of the implementation stack
  773|       |     */
  774|     60|    if (pq == NULL) {
  ------------------
  |  Branch (774:9): [True: 0, False: 60]
  ------------------
  775|      0|        for (j = 0; j < sk_IMPLEMENTATION_num(alg->impls); j++) {
  ------------------
  |  Branch (775:21): [True: 0, False: 0]
  ------------------
  776|      0|            impl = sk_IMPLEMENTATION_value(alg->impls, j);
  777|      0|            if (impl != NULL
  ------------------
  |  Branch (777:17): [True: 0, False: 0]
  ------------------
  778|      0|                && (prov == NULL || impl->provider == prov)) {
  ------------------
  |  Branch (778:21): [True: 0, False: 0]
  |  Branch (778:37): [True: 0, False: 0]
  ------------------
  779|      0|                best_impl = impl;
  780|      0|                ret = 1;
  781|      0|                break;
  782|      0|            }
  783|      0|        }
  784|      0|        goto fin;
  785|      0|    }
  786|       |
  787|       |    /*
  788|       |     * If there are optional properties specified
  789|       |     * then run the search again, and select the provider that matches the
  790|       |     * most options
  791|       |     */
  792|     60|    optional = ossl_property_has_optional(pq);
  793|     60|    for (j = 0; j < sk_IMPLEMENTATION_num(alg->impls); j++) {
  ------------------
  |  Branch (793:17): [True: 60, False: 0]
  ------------------
  794|     60|        impl = sk_IMPLEMENTATION_value(alg->impls, j);
  795|     60|        if (impl != NULL
  ------------------
  |  Branch (795:13): [True: 60, False: 0]
  ------------------
  796|     60|            && (prov == NULL || impl->provider == prov)) {
  ------------------
  |  Branch (796:17): [True: 60, False: 0]
  |  Branch (796:33): [True: 0, False: 0]
  ------------------
  797|     60|            score = ossl_property_match_count(pq, impl->properties);
  798|     60|            if (score > best) {
  ------------------
  |  Branch (798:17): [True: 60, False: 0]
  ------------------
  799|     60|                best_impl = impl;
  800|     60|                best = score;
  801|     60|                ret = 1;
  802|     60|                if (!optional)
  ------------------
  |  Branch (802:21): [True: 60, False: 0]
  ------------------
  803|     60|                    goto fin;
  804|     60|            }
  805|     60|        }
  806|     60|    }
  807|     60|fin:
  808|     60|    if (ret && ossl_method_up_ref(&best_impl->method)) {
  ------------------
  |  Branch (808:9): [True: 60, False: 0]
  |  Branch (808:16): [True: 60, False: 0]
  ------------------
  809|     60|        *method = best_impl->method.method;
  810|     60|        if (prov_rw != NULL)
  ------------------
  |  Branch (810:13): [True: 60, False: 0]
  ------------------
  811|     60|            *prov_rw = best_impl->provider;
  812|     60|    } else {
  813|      0|        ret = 0;
  814|      0|    }
  815|       |
  816|     60|#ifndef FIPS_MODULE
  817|     60|    OSSL_TRACE_BEGIN(QUERY)
  ------------------
  |  |  219|     60|    do {                           \
  |  |  220|     60|        BIO *trc_out = NULL;       \
  |  |  221|     60|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 60]
  |  |  ------------------
  ------------------
  818|      0|    {
  819|      0|        char buf[512];
  820|      0|        size_t size;
  821|       |
  822|      0|        size = ossl_property_list_to_string(NULL, pq, buf, 512);
  823|      0|        BIO_printf(trc_out, "method store query with properties %s "
  824|      0|                            "resolves to provider %s\n",
  825|      0|            size == 0 ? "none" : buf,
  ------------------
  |  Branch (825:13): [True: 0, False: 0]
  ------------------
  826|      0|            best_impl == NULL ? "none" : ossl_provider_name(best_impl->provider));
  ------------------
  |  Branch (826:13): [True: 0, False: 0]
  ------------------
  827|      0|    }
  828|     60|    OSSL_TRACE_END(QUERY);
  ------------------
  |  |  224|     60|    }                            \
  |  |  225|     60|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 60]
  |  |  ------------------
  ------------------
  829|     60|#endif
  830|       |
  831|     60|    ossl_property_unlock(sa);
  832|     60|    ossl_property_free(p2);
  833|     60|    return ret;
  834|     60|}
ossl_method_store_cache_get:
  944|  1.25M|{
  945|  1.25M|    ALGORITHM *alg;
  946|  1.25M|    QUERY elem, *r;
  947|  1.25M|    int res = 0;
  948|  1.25M|    STORED_ALGORITHMS *sa;
  949|       |
  950|  1.25M|    if (nid <= 0 || store == NULL || prop_query == NULL)
  ------------------
  |  Branch (950:9): [True: 0, False: 1.25M]
  |  Branch (950:21): [True: 0, False: 1.25M]
  |  Branch (950:38): [True: 0, False: 1.25M]
  ------------------
  951|      0|        return 0;
  952|       |
  953|  1.25M|    sa = stored_algs_shard(store, nid);
  ------------------
  |  |  124|  1.25M|#define stored_algs_shard(store, nid) (&(store)->algs[(nid) & (NUM_SHARDS - 1)])
  |  |  ------------------
  |  |  |  |   32|  1.25M|#define NUM_SHARDS 4
  |  |  ------------------
  ------------------
  954|  1.25M|    if (!ossl_property_read_lock(sa))
  ------------------
  |  Branch (954:9): [True: 0, False: 1.25M]
  ------------------
  955|      0|        return 0;
  956|  1.25M|    alg = ossl_method_store_retrieve(sa, nid);
  957|  1.25M|    if (alg == NULL)
  ------------------
  |  Branch (957:9): [True: 36.8k, False: 1.21M]
  ------------------
  958|  36.8k|        goto err;
  959|       |
  960|  1.21M|    elem.query = prop_query;
  961|  1.21M|    elem.provider = prov;
  962|  1.21M|    r = lh_QUERY_retrieve(alg->cache, &elem);
  963|  1.21M|    if (r == NULL)
  ------------------
  |  Branch (963:9): [True: 52, False: 1.21M]
  ------------------
  964|     52|        goto err;
  965|  1.21M|    if (ossl_method_up_ref(&r->method)) {
  ------------------
  |  Branch (965:9): [True: 1.21M, False: 0]
  ------------------
  966|  1.21M|        *method = r->method.method;
  967|  1.21M|        res = 1;
  968|  1.21M|    }
  969|  1.25M|err:
  970|  1.25M|    ossl_property_unlock(sa);
  971|  1.25M|    return res;
  972|  1.21M|}
ossl_method_store_cache_set:
  978|     60|{
  979|     60|    QUERY elem, *old, *p = NULL;
  980|     60|    ALGORITHM *alg;
  981|     60|    STORED_ALGORITHMS *sa;
  982|     60|    size_t len;
  983|     60|    int res = 1;
  984|       |
  985|     60|    if (nid <= 0 || store == NULL || prop_query == NULL)
  ------------------
  |  Branch (985:9): [True: 0, False: 60]
  |  Branch (985:21): [True: 0, False: 60]
  |  Branch (985:38): [True: 0, False: 60]
  ------------------
  986|      0|        return 0;
  987|       |
  988|     60|    if (!ossl_assert(prov != NULL))
  ------------------
  |  |   52|     60|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|     60|    __FILE__, __LINE__)
  ------------------
  |  Branch (988:9): [True: 0, False: 60]
  ------------------
  989|      0|        return 0;
  990|       |
  991|     60|    sa = stored_algs_shard(store, nid);
  ------------------
  |  |  124|     60|#define stored_algs_shard(store, nid) (&(store)->algs[(nid) & (NUM_SHARDS - 1)])
  |  |  ------------------
  |  |  |  |   32|     60|#define NUM_SHARDS 4
  |  |  ------------------
  ------------------
  992|     60|    if (!ossl_property_write_lock(sa))
  ------------------
  |  Branch (992:9): [True: 0, False: 60]
  ------------------
  993|      0|        return 0;
  994|     60|    if (sa->cache_need_flush)
  ------------------
  |  Branch (994:9): [True: 0, False: 60]
  ------------------
  995|      0|        ossl_method_cache_flush_some(sa);
  996|     60|    alg = ossl_method_store_retrieve(sa, nid);
  997|     60|    if (alg == NULL)
  ------------------
  |  Branch (997:9): [True: 0, False: 60]
  ------------------
  998|      0|        goto err;
  999|       |
 1000|     60|    if (method == NULL) {
  ------------------
  |  Branch (1000:9): [True: 0, False: 60]
  ------------------
 1001|      0|        elem.query = prop_query;
 1002|      0|        elem.provider = prov;
 1003|      0|        if ((old = lh_QUERY_delete(alg->cache, &elem)) != NULL) {
  ------------------
  |  Branch (1003:13): [True: 0, False: 0]
  ------------------
 1004|      0|            impl_cache_free(old);
 1005|      0|            sa->cache_nelem--;
 1006|      0|        }
 1007|      0|        goto end;
 1008|      0|    }
 1009|     60|    p = OPENSSL_malloc(sizeof(*p) + (len = strlen(prop_query)));
  ------------------
  |  |  107|     60|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1010|     60|    if (p != NULL) {
  ------------------
  |  Branch (1010:9): [True: 60, False: 0]
  ------------------
 1011|     60|        p->query = p->body;
 1012|     60|        p->provider = prov;
 1013|     60|        p->method.method = method;
 1014|     60|        p->method.up_ref = method_up_ref;
 1015|     60|        p->method.free = method_destruct;
 1016|     60|        if (!ossl_method_up_ref(&p->method))
  ------------------
  |  Branch (1016:13): [True: 0, False: 60]
  ------------------
 1017|      0|            goto err;
 1018|     60|        memcpy((char *)p->query, prop_query, len + 1);
 1019|     60|        if ((old = lh_QUERY_insert(alg->cache, p)) != NULL) {
  ------------------
  |  Branch (1019:13): [True: 0, False: 60]
  ------------------
 1020|      0|            impl_cache_free(old);
 1021|      0|            goto end;
 1022|      0|        }
 1023|     60|        if (!lh_QUERY_error(alg->cache)) {
  ------------------
  |  Branch (1023:13): [True: 60, False: 0]
  ------------------
 1024|     60|            if (++sa->cache_nelem >= IMPL_CACHE_FLUSH_THRESHOLD)
  ------------------
  |  |   44|     60|#define IMPL_CACHE_FLUSH_THRESHOLD (CACHE_SIZE / NUM_SHARDS)
  |  |  ------------------
  |  |  |  |   36|     60|#define CACHE_SIZE 512
  |  |  ------------------
  |  |               #define IMPL_CACHE_FLUSH_THRESHOLD (CACHE_SIZE / NUM_SHARDS)
  |  |  ------------------
  |  |  |  |   32|     60|#define NUM_SHARDS 4
  |  |  ------------------
  ------------------
  |  Branch (1024:17): [True: 0, False: 60]
  ------------------
 1025|      0|                sa->cache_need_flush = 1;
 1026|     60|            goto end;
 1027|     60|        }
 1028|      0|        ossl_method_free(&p->method);
 1029|      0|    }
 1030|      0|err:
 1031|      0|    res = 0;
 1032|      0|    OPENSSL_free(p);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1033|     60|end:
 1034|     60|    ossl_property_unlock(sa);
 1035|     60|    return res;
 1036|      0|}
property.c:stored_algs_new:
  271|      8|{
  272|      8|    STORED_ALGORITHMS *ret;
  273|       |
  274|      8|    ret = OPENSSL_calloc(NUM_SHARDS, sizeof(STORED_ALGORITHMS));
  ------------------
  |  |  113|      8|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  275|      8|    if (ret == NULL)
  ------------------
  |  Branch (275:9): [True: 0, False: 8]
  ------------------
  276|      0|        return NULL;
  277|       |
  278|     40|    for (int i = 0; i < NUM_SHARDS; ++i) {
  ------------------
  |  |   32|     40|#define NUM_SHARDS 4
  ------------------
  |  Branch (278:21): [True: 32, False: 8]
  ------------------
  279|     32|        ret[i].algs = ossl_sa_ALGORITHM_new();
  280|     32|        if (ret[i].algs == NULL)
  ------------------
  |  Branch (280:13): [True: 0, False: 32]
  ------------------
  281|      0|            goto err;
  282|       |
  283|     32|        ret[i].lock = CRYPTO_THREAD_lock_new();
  284|     32|        if (ret[i].lock == NULL)
  ------------------
  |  Branch (284:13): [True: 0, False: 32]
  ------------------
  285|      0|            goto err;
  286|     32|    }
  287|       |
  288|      8|    return ret;
  289|       |
  290|      0|err:
  291|      0|    stored_algs_free(ret);
  292|       |
  293|       |    return NULL;
  294|      8|}
property.c:ossl_method_up_ref:
  180|  1.21M|{
  181|  1.21M|    return (*method->up_ref)(method->method);
  182|  1.21M|}
property.c:ossl_property_write_lock:
  195|    451|{
  196|    451|    return p != NULL ? CRYPTO_THREAD_write_lock(p->lock) : 0;
  ------------------
  |  Branch (196:12): [True: 451, False: 0]
  ------------------
  197|    451|}
property.c:ossl_method_store_retrieve:
  337|  1.29M|{
  338|  1.29M|    return ossl_sa_ALGORITHM_get(sa->algs, nid);
  339|  1.29M|}
property.c:query_hash:
  205|  1.21M|{
  206|  1.21M|    return OPENSSL_LH_strhash(a->query);
  207|  1.21M|}
property.c:query_cmp:
  210|  1.21M|{
  211|  1.21M|    int res = strcmp(a->query, b->query);
  212|       |
  213|  1.21M|    if (res == 0 && a->provider != NULL && b->provider != NULL)
  ------------------
  |  Branch (213:9): [True: 1.21M, False: 0]
  |  Branch (213:21): [True: 1.21M, False: 0]
  |  Branch (213:44): [True: 39.9k, False: 1.17M]
  ------------------
  214|  39.9k|        res = b->provider > a->provider ? 1
  ------------------
  |  Branch (214:15): [True: 0, False: 39.9k]
  ------------------
  215|  39.9k|            : b->provider < a->provider ? -1
  ------------------
  |  Branch (215:15): [True: 0, False: 39.9k]
  ------------------
  216|  39.9k|                                        : 0;
  217|  1.21M|    return res;
  218|  1.21M|}
property.c:ossl_method_store_insert:
  342|    345|{
  343|    345|    return ossl_sa_ALGORITHM_set(sa->algs, alg->nid, alg);
  344|    345|}
property.c:ossl_property_unlock:
  200|  1.29M|{
  201|  1.29M|    return p != 0 ? CRYPTO_THREAD_unlock(p->lock) : 0;
  ------------------
  |  Branch (201:12): [True: 1.29M, False: 0]
  ------------------
  202|  1.29M|}
property.c:ossl_method_cache_flush_alg:
  838|     46|{
  839|     46|    sa->cache_nelem -= lh_QUERY_num_items(alg->cache);
  840|     46|    impl_cache_flush_alg(0, alg);
  841|     46|}
property.c:ossl_property_read_lock:
  190|  1.29M|{
  191|  1.29M|    return p != NULL ? CRYPTO_THREAD_read_lock(p->lock) : 0;
  ------------------
  |  Branch (191:12): [True: 1.29M, False: 0]
  ------------------
  192|  1.29M|}
property.c:alg_copy:
  624|    666|{
  625|    666|    STACK_OF(ALGORITHM) *newalg = arg;
  ------------------
  |  |   33|    666|#define STACK_OF(type) struct stack_st_##type
  ------------------
  626|       |
  627|    666|    alg = OPENSSL_memdup(alg, sizeof(ALGORITHM));
  ------------------
  |  |  134|    666|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  628|    666|    if (alg == NULL)
  ------------------
  |  Branch (628:9): [True: 0, False: 666]
  ------------------
  629|      0|        return;
  630|       |
  631|    666|    alg->impls = sk_IMPLEMENTATION_dup(alg->impls);
  632|       |
  633|    666|    (void)sk_ALGORITHM_push(newalg, alg);
  634|    666|}
property.c:alg_do_one:
  619|    850|{
  620|    850|    fn(alg->nid, impl->method.method, fnarg);
  621|    850|}
property.c:del_tmpalg:
  637|    666|{
  638|    666|    sk_IMPLEMENTATION_free(alg->impls);
  639|    666|    OPENSSL_free(alg);
  ------------------
  |  |  132|    666|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  640|    666|}
property.c:ossl_method_cache_flush:
  844|    391|{
  845|    391|    ALGORITHM *alg = ossl_method_store_retrieve(sa, nid);
  846|       |
  847|    391|    if (alg != NULL)
  ------------------
  |  Branch (847:9): [True: 46, False: 345]
  ------------------
  848|     46|        ossl_method_cache_flush_alg(sa, alg);
  849|    391|}
property.c:impl_cache_flush_alg:
  237|     46|{
  238|     46|    lh_QUERY_doall(alg->cache, &impl_cache_free);
  239|     46|    lh_QUERY_flush(alg->cache);
  240|     46|}

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

ossl_parse_property:
  346|     92|{
  347|     92|    OSSL_PROPERTY_DEFINITION *prop = NULL;
  348|     92|    OSSL_PROPERTY_LIST *res = NULL;
  349|     92|    STACK_OF(OSSL_PROPERTY_DEFINITION) *sk;
  ------------------
  |  |   33|     92|#define STACK_OF(type) struct stack_st_##type
  ------------------
  350|     92|    const char *s = defn;
  351|     92|    int done;
  352|       |
  353|     92|    if (s == NULL || (sk = sk_OSSL_PROPERTY_DEFINITION_new(&pd_compare)) == NULL)
  ------------------
  |  Branch (353:9): [True: 0, False: 92]
  |  Branch (353:22): [True: 0, False: 92]
  ------------------
  354|      0|        return NULL;
  355|       |
  356|     92|    s = skip_space(s);
  357|     92|    done = *s == '\0';
  358|    449|    while (!done) {
  ------------------
  |  Branch (358:12): [True: 357, False: 92]
  ------------------
  359|    357|        const char *start = s;
  360|       |
  361|    357|        prop = OPENSSL_malloc(sizeof(*prop));
  ------------------
  |  |  107|    357|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  362|    357|        if (prop == NULL)
  ------------------
  |  Branch (362:13): [True: 0, False: 357]
  ------------------
  363|      0|            goto err;
  364|    357|        memset(&prop->v, 0, sizeof(prop->v));
  365|    357|        prop->optional = 0;
  366|    357|        if (!parse_name(ctx, &s, 1, &prop->name_idx))
  ------------------
  |  Branch (366:13): [True: 0, False: 357]
  ------------------
  367|      0|            goto err;
  368|    357|        prop->oper = OSSL_PROPERTY_OPER_EQ;
  369|    357|        if (prop->name_idx == 0) {
  ------------------
  |  Branch (369:13): [True: 0, False: 357]
  ------------------
  370|      0|            ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   99|      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|    357|        if (match_ch(&s, '=')) {
  ------------------
  |  Branch (374:13): [True: 357, False: 0]
  ------------------
  375|    357|            if (!parse_value(ctx, &s, prop, 1)) {
  ------------------
  |  Branch (375:17): [True: 0, False: 357]
  ------------------
  376|      0|                ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_VALUE,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                              ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_VALUE,
  ------------------
  |  |   99|      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|    357|        } 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|    357|        if (!sk_OSSL_PROPERTY_DEFINITION_push(sk, prop))
  ------------------
  |  Branch (386:13): [True: 0, False: 357]
  ------------------
  387|      0|            goto err;
  388|    357|        prop = NULL;
  389|    357|        done = !match_ch(&s, ',');
  390|    357|    }
  391|     92|    if (*s != '\0') {
  ------------------
  |  Branch (391:9): [True: 0, False: 92]
  ------------------
  392|      0|        ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |   99|      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|     92|    res = stack_to_property_list(ctx, sk);
  397|       |
  398|     92|err:
  399|     92|    OPENSSL_free(prop);
  ------------------
  |  |  132|     92|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  400|     92|    sk_OSSL_PROPERTY_DEFINITION_pop_free(sk, &pd_free);
  401|     92|    return res;
  402|     92|}
ossl_parse_query:
  406|     60|{
  407|     60|    STACK_OF(OSSL_PROPERTY_DEFINITION) *sk;
  ------------------
  |  |   33|     60|#define STACK_OF(type) struct stack_st_##type
  ------------------
  408|     60|    OSSL_PROPERTY_LIST *res = NULL;
  409|     60|    OSSL_PROPERTY_DEFINITION *prop = NULL;
  410|     60|    int done;
  411|       |
  412|     60|    if (s == NULL || (sk = sk_OSSL_PROPERTY_DEFINITION_new(&pd_compare)) == NULL)
  ------------------
  |  Branch (412:9): [True: 0, False: 60]
  |  Branch (412:22): [True: 0, False: 60]
  ------------------
  413|      0|        return NULL;
  414|       |
  415|     60|    s = skip_space(s);
  416|     60|    done = *s == '\0';
  417|     62|    while (!done) {
  ------------------
  |  Branch (417:12): [True: 2, False: 60]
  ------------------
  418|      2|        prop = OPENSSL_malloc(sizeof(*prop));
  ------------------
  |  |  107|      2|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  419|      2|        if (prop == NULL)
  ------------------
  |  Branch (419:13): [True: 0, False: 2]
  ------------------
  420|      0|            goto err;
  421|      2|        memset(&prop->v, 0, sizeof(prop->v));
  422|       |
  423|      2|        if (match_ch(&s, '-')) {
  ------------------
  |  Branch (423:13): [True: 0, False: 2]
  ------------------
  424|      0|            prop->oper = OSSL_PROPERTY_OVERRIDE;
  425|      0|            prop->optional = 0;
  426|      0|            if (!parse_name(ctx, &s, 1, &prop->name_idx))
  ------------------
  |  Branch (426:17): [True: 0, False: 0]
  ------------------
  427|      0|                goto err;
  428|      0|            goto skip_value;
  429|      0|        }
  430|      2|        prop->optional = match_ch(&s, '?');
  431|      2|        if (!parse_name(ctx, &s, 1, &prop->name_idx))
  ------------------
  |  Branch (431:13): [True: 0, False: 2]
  ------------------
  432|      0|            goto err;
  433|       |
  434|      2|        if (match_ch(&s, '=')) {
  ------------------
  |  Branch (434:13): [True: 2, False: 0]
  ------------------
  435|      2|            prop->oper = OSSL_PROPERTY_OPER_EQ;
  436|      2|        } else if (MATCH(&s, "!=")) {
  ------------------
  |  |   43|      0|#define MATCH(s, m) match(s, m, sizeof(m) - 1)
  |  |  ------------------
  |  |  |  Branch (43:21): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  437|      0|            prop->oper = OSSL_PROPERTY_OPER_NE;
  438|      0|        } else {
  439|       |            /* A name alone is a Boolean comparison for true */
  440|      0|            prop->oper = OSSL_PROPERTY_OPER_EQ;
  441|      0|            prop->type = OSSL_PROPERTY_TYPE_STRING;
  442|      0|            prop->v.str_val = OSSL_PROPERTY_TRUE;
  ------------------
  |  |   39|      0|#define OSSL_PROPERTY_TRUE 1
  ------------------
  443|      0|            goto skip_value;
  444|      0|        }
  445|      2|        if (!parse_value(ctx, &s, prop, create_values))
  ------------------
  |  Branch (445:13): [True: 0, False: 2]
  ------------------
  446|      0|            prop->type = OSSL_PROPERTY_TYPE_VALUE_UNDEFINED;
  447|       |
  448|      2|    skip_value:
  449|      2|        if (!sk_OSSL_PROPERTY_DEFINITION_push(sk, prop))
  ------------------
  |  Branch (449:13): [True: 0, False: 2]
  ------------------
  450|      0|            goto err;
  451|      2|        prop = NULL;
  452|      2|        done = !match_ch(&s, ',');
  453|      2|    }
  454|     60|    if (*s != '\0') {
  ------------------
  |  Branch (454:9): [True: 0, False: 60]
  ------------------
  455|      0|        ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |   99|      0|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |   37|      0|#define PROP_R_TRAILING_CHARACTERS 110
  ------------------
  456|      0|            "HERE-->%s", s);
  457|      0|        goto err;
  458|      0|    }
  459|     60|    res = stack_to_property_list(ctx, sk);
  460|       |
  461|     60|err:
  462|     60|    OPENSSL_free(prop);
  ------------------
  |  |  132|     60|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  463|     60|    sk_OSSL_PROPERTY_DEFINITION_pop_free(sk, &pd_free);
  464|     60|    return res;
  465|     60|}
ossl_property_match_count:
  473|     60|{
  474|     60|    const OSSL_PROPERTY_DEFINITION *const q = query->properties;
  475|     60|    const OSSL_PROPERTY_DEFINITION *const d = defn->properties;
  476|     60|    int i = 0, j = 0, matches = 0;
  477|     60|    OSSL_PROPERTY_OPER oper;
  478|       |
  479|     62|    while (i < query->num_properties) {
  ------------------
  |  Branch (479:12): [True: 2, False: 60]
  ------------------
  480|      2|        if ((oper = q[i].oper) == OSSL_PROPERTY_OVERRIDE) {
  ------------------
  |  Branch (480:13): [True: 0, False: 2]
  ------------------
  481|      0|            i++;
  482|      0|            continue;
  483|      0|        }
  484|      2|        if (j < defn->num_properties) {
  ------------------
  |  Branch (484:13): [True: 2, False: 0]
  ------------------
  485|      2|            if (q[i].name_idx > d[j].name_idx) { /* skip defn, not in query */
  ------------------
  |  Branch (485:17): [True: 0, False: 2]
  ------------------
  486|      0|                j++;
  487|      0|                continue;
  488|      0|            }
  489|      2|            if (q[i].name_idx == d[j].name_idx) { /* both in defn and query */
  ------------------
  |  Branch (489:17): [True: 2, False: 0]
  ------------------
  490|      2|                const int eq = q[i].type == d[j].type
  ------------------
  |  Branch (490:32): [True: 2, False: 0]
  ------------------
  491|      2|                    && memcmp(&q[i].v, &d[j].v, sizeof(q[i].v)) == 0;
  ------------------
  |  Branch (491:24): [True: 2, False: 0]
  ------------------
  492|       |
  493|      2|                if ((eq && oper == OSSL_PROPERTY_OPER_EQ)
  ------------------
  |  Branch (493:22): [True: 2, False: 0]
  |  Branch (493:28): [True: 2, 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|      2|                    matches++;
  496|      0|                else if (!q[i].optional)
  ------------------
  |  Branch (496:26): [True: 0, False: 0]
  ------------------
  497|      0|                    return -1;
  498|      2|                i++;
  499|      2|                j++;
  500|      2|                continue;
  501|      2|            }
  502|      2|        }
  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|      0|        if (q[i].type == OSSL_PROPERTY_TYPE_VALUE_UNDEFINED) {
  ------------------
  |  Branch (509:13): [True: 0, False: 0]
  ------------------
  510|      0|            if (oper == OSSL_PROPERTY_OPER_NE)
  ------------------
  |  Branch (510:17): [True: 0, False: 0]
  ------------------
  511|      0|                matches++;
  512|      0|            else if (!q[i].optional)
  ------------------
  |  Branch (512:22): [True: 0, False: 0]
  ------------------
  513|      0|                return -1;
  514|      0|        } else if (q[i].type != OSSL_PROPERTY_TYPE_STRING
  ------------------
  |  Branch (514:20): [True: 0, False: 0]
  ------------------
  515|      0|            || (oper == OSSL_PROPERTY_OPER_EQ
  ------------------
  |  Branch (515:17): [True: 0, False: 0]
  ------------------
  516|      0|                && q[i].v.str_val != OSSL_PROPERTY_FALSE)
  ------------------
  |  |   40|      0|#define OSSL_PROPERTY_FALSE 2
  ------------------
  |  Branch (516:20): [True: 0, False: 0]
  ------------------
  517|      0|            || (oper == OSSL_PROPERTY_OPER_NE
  ------------------
  |  Branch (517:17): [True: 0, False: 0]
  ------------------
  518|      0|                && q[i].v.str_val == OSSL_PROPERTY_FALSE)) {
  ------------------
  |  |   40|      0|#define OSSL_PROPERTY_FALSE 2
  ------------------
  |  Branch (518:20): [True: 0, False: 0]
  ------------------
  519|      0|            if (!q[i].optional)
  ------------------
  |  Branch (519:17): [True: 0, False: 0]
  ------------------
  520|      0|                return -1;
  521|      0|        } else {
  522|      0|            matches++;
  523|      0|        }
  524|      0|        i++;
  525|      0|    }
  526|     60|    return matches;
  527|     60|}
ossl_property_free:
  530|     62|{
  531|     62|    OPENSSL_free(p);
  ------------------
  |  |  132|     62|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  532|     62|}
ossl_property_parse_init:
  575|      2|{
  576|      2|    static const char *const predefined_names[] = {
  577|      2|        "provider", /* Name of provider (default, legacy, fips) */
  578|      2|        "version", /* Version number of this provider */
  579|      2|        "fips", /* FIPS validated or FIPS supporting algorithm */
  580|      2|        "output", /* Output type for encoders */
  581|      2|        "input", /* Input type for decoders */
  582|      2|        "structure", /* Structure name for encoders and decoders */
  583|      2|    };
  584|      2|    size_t i;
  585|       |
  586|     14|    for (i = 0; i < OSSL_NELEM(predefined_names); i++)
  ------------------
  |  |   14|     14|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (586:17): [True: 12, False: 2]
  ------------------
  587|     12|        if (ossl_property_name(ctx, predefined_names[i], 1) == 0)
  ------------------
  |  Branch (587:13): [True: 0, False: 12]
  ------------------
  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|      2|    if ((ossl_property_value(ctx, "yes", 1) != OSSL_PROPERTY_TRUE)
  ------------------
  |  |   39|      2|#define OSSL_PROPERTY_TRUE 1
  ------------------
  |  Branch (595:9): [True: 0, False: 2]
  ------------------
  596|      2|        || (ossl_property_value(ctx, "no", 1) != OSSL_PROPERTY_FALSE))
  ------------------
  |  |   40|      2|#define OSSL_PROPERTY_FALSE 2
  ------------------
  |  Branch (596:12): [True: 0, False: 2]
  ------------------
  597|      0|        goto err;
  598|       |
  599|      2|    return 1;
  600|      0|err:
  601|      0|    return 0;
  602|      2|}
property_parse.c:pd_compare:
  289|    265|{
  290|    265|    const OSSL_PROPERTY_DEFINITION *pd1 = *p1;
  291|    265|    const OSSL_PROPERTY_DEFINITION *pd2 = *p2;
  292|       |
  293|    265|    if (pd1->name_idx < pd2->name_idx)
  ------------------
  |  Branch (293:9): [True: 265, False: 0]
  ------------------
  294|    265|        return -1;
  295|      0|    if (pd1->name_idx > pd2->name_idx)
  ------------------
  |  Branch (295:9): [True: 0, False: 0]
  ------------------
  296|      0|        return 1;
  297|      0|    return 0;
  298|      0|}
property_parse.c:skip_space:
   26|  1.49k|{
   27|  1.49k|    while (ossl_isspace(*s))
  ------------------
  |  |   82|  1.49k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  1.49k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  |  |  |  Branch (82:25): [True: 0, False: 1.49k]
  |  |  ------------------
  ------------------
   28|      0|        s++;
   29|  1.49k|    return s;
   30|  1.49k|}
property_parse.c:parse_name:
   58|    359|{
   59|    359|    char name[100];
   60|    359|    int err = 0;
   61|    359|    size_t i = 0;
   62|    359|    const char *s = *t;
   63|    359|    int user_name = 0;
   64|       |
   65|    359|    for (;;) {
   66|    359|        if (!ossl_isalpha(*s)) {
  ------------------
  |  |   71|    359|#define ossl_isalpha(c) (ossl_ctype_check((c), CTYPE_MASK_alpha))
  |  |  ------------------
  |  |  |  |   40|    359|#define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    359|#define CTYPE_MASK_lower 0x1
  |  |  |  |  ------------------
  |  |  |  |               #define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|    359|#define CTYPE_MASK_upper 0x2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (66:13): [True: 0, False: 359]
  ------------------
   67|      0|            ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_IDENTIFIER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_IDENTIFIER,
  ------------------
  |  |   99|      0|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_IDENTIFIER,
  ------------------
  |  |   30|      0|#define PROP_R_NOT_AN_IDENTIFIER 103
  ------------------
   68|      0|                "HERE-->%s", *t);
   69|      0|            return 0;
   70|      0|        }
   71|  2.31k|        do {
   72|  2.31k|            if (i < sizeof(name) - 1)
  ------------------
  |  Branch (72:17): [True: 2.31k, False: 0]
  ------------------
   73|  2.31k|                name[i++] = ossl_tolower(*s);
   74|      0|            else
   75|      0|                err = 1;
   76|  2.31k|        } while (*++s == '_' || ossl_isalnum(*s));
  ------------------
  |  |   70|  2.31k|#define ossl_isalnum(c) (ossl_ctype_check((c), CTYPE_MASK_alnum))
  |  |  ------------------
  |  |  |  |   41|  2.31k|#define CTYPE_MASK_alnum (CTYPE_MASK_alpha | CTYPE_MASK_digit)
  |  |  |  |  ------------------
  |  |  |  |  |  |   40|  2.31k|#define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   27|  2.31k|#define CTYPE_MASK_lower 0x1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   28|  2.31k|#define CTYPE_MASK_upper 0x2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define CTYPE_MASK_alnum (CTYPE_MASK_alpha | CTYPE_MASK_digit)
  |  |  |  |  ------------------
  |  |  |  |  |  |   29|  2.31k|#define CTYPE_MASK_digit 0x4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (70:25): [True: 1.95k, False: 359]
  |  |  ------------------
  ------------------
  |  Branch (76:18): [True: 0, False: 2.31k]
  ------------------
   77|    359|        if (*s != '.')
  ------------------
  |  Branch (77:13): [True: 359, False: 0]
  ------------------
   78|    359|            break;
   79|      0|        user_name = 1;
   80|      0|        if (i < sizeof(name) - 1)
  ------------------
  |  Branch (80:13): [True: 0, False: 0]
  ------------------
   81|      0|            name[i++] = *s;
   82|      0|        else
   83|      0|            err = 1;
   84|      0|        s++;
   85|      0|    }
   86|    359|    name[i] = '\0';
   87|    359|    if (err) {
  ------------------
  |  Branch (87:9): [True: 0, False: 359]
  ------------------
   88|      0|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NAME_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NAME_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   99|      0|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NAME_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   27|      0|#define PROP_R_NAME_TOO_LONG 100
  ------------------
   89|      0|        return 0;
   90|      0|    }
   91|    359|    *t = skip_space(s);
   92|    359|    *idx = ossl_property_name(ctx, name, user_name && create);
  ------------------
  |  Branch (92:42): [True: 0, False: 359]
  |  Branch (92:55): [True: 0, False: 0]
  ------------------
   93|    359|    return 1;
   94|    359|}
property_parse.c:match_ch:
   33|    722|{
   34|    722|    const char *s = *t;
   35|       |
   36|    722|    if (*s == m) {
  ------------------
  |  Branch (36:9): [True: 624, False: 98]
  ------------------
   37|    624|        *t = skip_space(s + 1);
   38|    624|        return 1;
   39|    624|    }
   40|     98|    return 0;
   41|    722|}
property_parse.c:parse_value:
  258|    359|{
  259|    359|    const char *s = *t;
  260|    359|    int r = 0;
  261|       |
  262|    359|    if (*s == '"' || *s == '\'') {
  ------------------
  |  Branch (262:9): [True: 0, False: 359]
  |  Branch (262:22): [True: 0, False: 359]
  ------------------
  263|      0|        s++;
  264|      0|        r = parse_string(ctx, &s, s[-1], res, create);
  265|    359|    } else if (*s == '+') {
  ------------------
  |  Branch (265:16): [True: 0, False: 359]
  ------------------
  266|      0|        s++;
  267|      0|        r = parse_number(&s, res);
  268|    359|    } else if (*s == '-') {
  ------------------
  |  Branch (268:16): [True: 0, False: 359]
  ------------------
  269|      0|        s++;
  270|      0|        r = parse_number(&s, res);
  271|      0|        res->v.int_val = -res->v.int_val;
  272|    359|    } else if (*s == '0' && s[1] == 'x') {
  ------------------
  |  Branch (272:16): [True: 0, False: 359]
  |  Branch (272:29): [True: 0, False: 0]
  ------------------
  273|      0|        s += 2;
  274|      0|        r = parse_hex(&s, res);
  275|    359|    } else if (*s == '0' && ossl_isdigit(s[1])) {
  ------------------
  |  Branch (275:16): [True: 0, False: 359]
  |  Branch (275:29): [True: 0, False: 0]
  ------------------
  276|      0|        s++;
  277|      0|        r = parse_oct(&s, res);
  278|    359|    } else if (ossl_isdigit(*s)) {
  ------------------
  |  Branch (278:16): [True: 0, False: 359]
  ------------------
  279|      0|        return parse_number(t, res);
  280|    359|    } else if (ossl_isalpha(*s))
  ------------------
  |  |   71|    359|#define ossl_isalpha(c) (ossl_ctype_check((c), CTYPE_MASK_alpha))
  |  |  ------------------
  |  |  |  |   40|    359|#define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    359|#define CTYPE_MASK_lower 0x1
  |  |  |  |  ------------------
  |  |  |  |               #define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|    359|#define CTYPE_MASK_upper 0x2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (71:25): [True: 359, False: 0]
  |  |  ------------------
  ------------------
  281|    359|        return parse_unquoted(ctx, t, res, create);
  282|      0|    if (r)
  ------------------
  |  Branch (282:9): [True: 0, False: 0]
  ------------------
  283|      0|        *t = s;
  284|      0|    return r;
  285|    359|}
property_parse.c:parse_unquoted:
  226|    359|{
  227|    359|    char v[1000];
  228|    359|    const char *s = *t;
  229|    359|    size_t i = 0;
  230|    359|    int err = 0;
  231|       |
  232|    359|    if (*s == '\0' || *s == ',')
  ------------------
  |  Branch (232:9): [True: 0, False: 359]
  |  Branch (232:23): [True: 0, False: 359]
  ------------------
  233|      0|        return 0;
  234|  2.81k|    while (ossl_isprint(*s) && !ossl_isspace(*s) && *s != ',') {
  ------------------
  |  |   80|  5.63k|#define ossl_isprint(c) (ossl_ctype_check((c), CTYPE_MASK_print))
  |  |  ------------------
  |  |  |  |   35|  2.81k|#define CTYPE_MASK_print 0x100
  |  |  ------------------
  |  |  |  Branch (80:25): [True: 2.72k, False: 94]
  |  |  ------------------
  ------------------
                  while (ossl_isprint(*s) && !ossl_isspace(*s) && *s != ',') {
  ------------------
  |  |   82|  5.53k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  2.72k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (234:32): [True: 2.72k, False: 0]
  |  Branch (234:53): [True: 2.45k, False: 265]
  ------------------
  235|  2.45k|        if (i < sizeof(v) - 1)
  ------------------
  |  Branch (235:13): [True: 2.45k, False: 0]
  ------------------
  236|  2.45k|            v[i++] = ossl_tolower(*s);
  237|      0|        else
  238|      0|            err = 1;
  239|  2.45k|        s++;
  240|  2.45k|    }
  241|    359|    if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
  ------------------
  |  |   82|    718|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|    359|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (241:9): [True: 359, False: 0]
  |  Branch (241:30): [True: 265, False: 94]
  |  Branch (241:44): [True: 0, False: 265]
  ------------------
  242|      0|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_ASCII_CHARACTER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_ASCII_CHARACTER,
  ------------------
  |  |   99|      0|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_ASCII_CHARACTER,
  ------------------
  |  |   28|      0|#define PROP_R_NOT_AN_ASCII_CHARACTER 101
  ------------------
  243|      0|            "HERE-->%s", s);
  244|      0|        return 0;
  245|      0|    }
  246|    359|    v[i] = 0;
  247|    359|    if (err)
  ------------------
  |  Branch (247:9): [True: 0, False: 359]
  ------------------
  248|      0|        ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   99|      0|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   36|      0|#define PROP_R_STRING_TOO_LONG 109
  ------------------
  249|    359|    else if ((res->v.str_val = ossl_property_value(ctx, v, create)) == 0)
  ------------------
  |  Branch (249:14): [True: 0, False: 359]
  ------------------
  250|      0|        err = 1;
  251|    359|    *t = skip_space(s);
  252|    359|    res->type = OSSL_PROPERTY_TYPE_STRING;
  253|    359|    return !err;
  254|    359|}
property_parse.c:stack_to_property_list:
  314|    152|{
  315|    152|    const int n = sk_OSSL_PROPERTY_DEFINITION_num(sk);
  316|    152|    OSSL_PROPERTY_LIST *r;
  317|    152|    OSSL_PROPERTY_IDX prev_name_idx = 0;
  318|    152|    int i;
  319|       |
  320|    152|    r = OPENSSL_malloc(sizeof(*r)
  ------------------
  |  |  107|    304|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (107:19): [True: 58, False: 94]
  |  |  ------------------
  ------------------
  321|    152|        + (n <= 0 ? 0 : n - 1) * sizeof(r->properties[0]));
  322|    152|    if (r != NULL) {
  ------------------
  |  Branch (322:9): [True: 152, False: 0]
  ------------------
  323|    152|        sk_OSSL_PROPERTY_DEFINITION_sort(sk);
  324|       |
  325|    152|        r->has_optional = 0;
  326|    511|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (326:21): [True: 359, False: 152]
  ------------------
  327|    359|            r->properties[i] = *sk_OSSL_PROPERTY_DEFINITION_value(sk, i);
  328|    359|            r->has_optional |= r->properties[i].optional;
  329|       |
  330|       |            /* Check for duplicated names */
  331|    359|            if (i > 0 && r->properties[i].name_idx == prev_name_idx) {
  ------------------
  |  Branch (331:17): [True: 265, False: 94]
  |  Branch (331:26): [True: 0, False: 265]
  ------------------
  332|      0|                OPENSSL_free(r);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  333|      0|                ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                              ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   99|      0|#define ERR_LIB_PROP 55
  ------------------
                              ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|      0|#define PROP_R_PARSE_FAILED 108
  ------------------
  334|      0|                    "Duplicated name `%s'",
  335|      0|                    ossl_property_name_str(ctx, prev_name_idx));
  336|      0|                return NULL;
  337|      0|            }
  338|    359|            prev_name_idx = r->properties[i].name_idx;
  339|    359|        }
  340|    152|        r->num_properties = n;
  341|    152|    }
  342|    152|    return r;
  343|    152|}
property_parse.c:pd_free:
  301|    359|{
  302|    359|    OPENSSL_free(pd);
  ------------------
  |  |  132|    359|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  303|    359|}

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

ossl_property_string_data_new:
   97|      2|{
   98|      2|    PROPERTY_STRING_DATA *propdata = OPENSSL_zalloc(sizeof(*propdata));
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   99|       |
  100|      2|    if (propdata == NULL)
  ------------------
  |  Branch (100:9): [True: 0, False: 2]
  ------------------
  101|      0|        return NULL;
  102|       |
  103|      2|    propdata->lock = CRYPTO_THREAD_lock_new();
  104|      2|    propdata->prop_names = lh_PROPERTY_STRING_new(&property_hash,
  105|      2|        &property_cmp);
  106|      2|    propdata->prop_values = lh_PROPERTY_STRING_new(&property_hash,
  107|      2|        &property_cmp);
  108|      2|#ifndef OPENSSL_SMALL_FOOTPRINT
  109|      2|    propdata->prop_namelist = sk_OPENSSL_CSTRING_new_null();
  ------------------
  |  |  285|      2|#define sk_OPENSSL_CSTRING_new_null() ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_OPENSSL_CSTRING_freefunc_thunk))
  ------------------
  110|      2|    propdata->prop_valuelist = sk_OPENSSL_CSTRING_new_null();
  ------------------
  |  |  285|      2|#define sk_OPENSSL_CSTRING_new_null() ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_OPENSSL_CSTRING_freefunc_thunk))
  ------------------
  111|      2|#endif
  112|      2|    if (propdata->lock == NULL
  ------------------
  |  Branch (112:9): [True: 0, False: 2]
  ------------------
  113|      2|#ifndef OPENSSL_SMALL_FOOTPRINT
  114|      2|        || propdata->prop_namelist == NULL
  ------------------
  |  Branch (114:12): [True: 0, False: 2]
  ------------------
  115|      2|        || propdata->prop_valuelist == NULL
  ------------------
  |  Branch (115:12): [True: 0, False: 2]
  ------------------
  116|      2|#endif
  117|      2|        || propdata->prop_names == NULL
  ------------------
  |  Branch (117:12): [True: 0, False: 2]
  ------------------
  118|      2|        || propdata->prop_values == NULL) {
  ------------------
  |  Branch (118:12): [True: 0, False: 2]
  ------------------
  119|      0|        ossl_property_string_data_free(propdata);
  120|      0|        return NULL;
  121|      0|    }
  122|      2|    return propdata;
  123|      2|}
ossl_property_name:
  255|    543|{
  256|    543|    return ossl_property_string(ctx, 1, create, s);
  257|    543|}
ossl_property_value:
  266|    363|{
  267|    363|    return ossl_property_string(ctx, 0, create, s);
  268|    363|}
ossl_property_value_str:
  271|    128|{
  272|    128|    return ossl_property_str(0, ctx, idx);
  273|    128|}
property_string.c:property_hash:
   51|    966|{
   52|    966|    return OPENSSL_LH_strhash(a->s);
   53|    966|}
property_string.c:property_cmp:
   56|    876|{
   57|    876|    return strcmp(a->s, b->s);
   58|    876|}
property_string.c:ossl_property_string:
  145|    906|{
  146|    906|    PROPERTY_STRING p, *ps, *ps_new;
  147|    906|    PROP_TABLE *t;
  148|    906|    OSSL_PROPERTY_IDX *pidx;
  149|    906|    PROPERTY_STRING_DATA *propdata
  150|    906|        = ossl_lib_ctx_get_data(ctx, OSSL_LIB_CTX_PROPERTY_STRING_INDEX);
  ------------------
  |  |   98|    906|#define OSSL_LIB_CTX_PROPERTY_STRING_INDEX 3
  ------------------
  151|       |
  152|    906|    if (propdata == NULL)
  ------------------
  |  Branch (152:9): [True: 0, False: 906]
  ------------------
  153|      0|        return 0;
  154|       |
  155|    906|    t = name ? propdata->prop_names : propdata->prop_values;
  ------------------
  |  Branch (155:9): [True: 543, False: 363]
  ------------------
  156|    906|    p.s = s;
  157|    906|    if (!CRYPTO_THREAD_read_lock(propdata->lock)) {
  ------------------
  |  Branch (157:9): [True: 0, False: 906]
  ------------------
  158|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  159|      0|        return 0;
  160|      0|    }
  161|    906|    ps = lh_PROPERTY_STRING_retrieve(t, &p);
  162|    906|    if (ps == NULL && create) {
  ------------------
  |  Branch (162:9): [True: 30, False: 876]
  |  Branch (162:23): [True: 30, False: 0]
  ------------------
  163|     30|        CRYPTO_THREAD_unlock(propdata->lock);
  164|     30|        if (!CRYPTO_THREAD_write_lock(propdata->lock)) {
  ------------------
  |  Branch (164:13): [True: 0, False: 30]
  ------------------
  165|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_UNABLE_TO_GET_WRITE_LOCK);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  166|      0|            return 0;
  167|      0|        }
  168|     30|        pidx = name ? &propdata->prop_name_idx : &propdata->prop_value_idx;
  ------------------
  |  Branch (168:16): [True: 12, False: 18]
  ------------------
  169|     30|        ps = lh_PROPERTY_STRING_retrieve(t, &p);
  170|     30|        if (ps == NULL && (ps_new = new_property_string(s, pidx)) != NULL) {
  ------------------
  |  Branch (170:13): [True: 30, False: 0]
  |  Branch (170:27): [True: 30, False: 0]
  ------------------
  171|     30|#ifndef OPENSSL_SMALL_FOOTPRINT
  172|     30|            STACK_OF(OPENSSL_CSTRING) *slist;
  ------------------
  |  |   33|     30|#define STACK_OF(type) struct stack_st_##type
  ------------------
  173|       |
  174|     30|            slist = name ? propdata->prop_namelist : propdata->prop_valuelist;
  ------------------
  |  Branch (174:21): [True: 12, False: 18]
  ------------------
  175|     30|            if (sk_OPENSSL_CSTRING_push(slist, ps_new->s) <= 0) {
  ------------------
  |  |  292|     30|#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: 30]
  ------------------
  176|      0|                property_free(ps_new);
  177|      0|                CRYPTO_THREAD_unlock(propdata->lock);
  178|      0|                return 0;
  179|      0|            }
  180|     30|#endif
  181|     30|            lh_PROPERTY_STRING_insert(t, ps_new);
  182|     30|            if (lh_PROPERTY_STRING_error(t)) {
  ------------------
  |  Branch (182:17): [True: 0, False: 30]
  ------------------
  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);
  ------------------
  |  |  294|      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|     30|            ps = ps_new;
  196|     30|        }
  197|     30|    }
  198|    906|    CRYPTO_THREAD_unlock(propdata->lock);
  199|    906|    return ps != NULL ? ps->idx : 0;
  ------------------
  |  Branch (199:12): [True: 906, False: 0]
  ------------------
  200|    906|}
property_string.c:new_property_string:
  127|     30|{
  128|     30|    const size_t l = strlen(s);
  129|     30|    PROPERTY_STRING *ps = OPENSSL_malloc(sizeof(*ps) + l);
  ------------------
  |  |  107|     30|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  130|       |
  131|     30|    if (ps != NULL) {
  ------------------
  |  Branch (131:9): [True: 30, False: 0]
  ------------------
  132|     30|        memcpy(ps->body, s, l + 1);
  133|     30|        ps->s = ps->body;
  134|     30|        ps->idx = ++*pidx;
  135|     30|        if (ps->idx == 0) {
  ------------------
  |  Branch (135:13): [True: 0, False: 30]
  ------------------
  136|      0|            OPENSSL_free(ps);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  137|      0|            return NULL;
  138|      0|        }
  139|     30|    }
  140|     30|    return ps;
  141|     30|}
property_string.c:ossl_property_str:
  219|    128|{
  220|    128|    const char *r;
  221|    128|    PROPERTY_STRING_DATA *propdata
  222|    128|        = ossl_lib_ctx_get_data(ctx, OSSL_LIB_CTX_PROPERTY_STRING_INDEX);
  ------------------
  |  |   98|    128|#define OSSL_LIB_CTX_PROPERTY_STRING_INDEX 3
  ------------------
  223|       |
  224|    128|    if (propdata == NULL)
  ------------------
  |  Branch (224:9): [True: 0, False: 128]
  ------------------
  225|      0|        return NULL;
  226|       |
  227|    128|    if (!CRYPTO_THREAD_read_lock(propdata->lock)) {
  ------------------
  |  Branch (227:9): [True: 0, False: 128]
  ------------------
  228|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      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|    128|    r = sk_OPENSSL_CSTRING_value(name ? propdata->prop_namelist
  ------------------
  |  |  283|    256|#define sk_OPENSSL_CSTRING_value(sk, idx) ((const char *)OPENSSL_sk_value(ossl_check_const_OPENSSL_CSTRING_sk_type(sk), (idx)))
  |  |  ------------------
  |  |  |  Branch (283:116): [True: 0, False: 128]
  |  |  ------------------
  ------------------
  245|    128|                                      : propdata->prop_valuelist,
  246|    128|        idx - 1);
  247|    128|#endif
  248|    128|    CRYPTO_THREAD_unlock(propdata->lock);
  249|       |
  250|    128|    return r;
  251|    128|}

OSSL_PROVIDER_get0_provider_ctx:
  104|   207k|{
  105|   207k|    return ossl_provider_ctx(prov);
  106|   207k|}
OSSL_PROVIDER_get_capabilities:
  122|  14.7k|{
  123|  14.7k|    return ossl_provider_get_capabilities(prov, capability, cb, arg);
  124|  14.7k|}
OSSL_PROVIDER_do_all:
  156|  14.7k|{
  157|  14.7k|    return ossl_provider_doall_activated(ctx, cb, cbdata);
  158|  14.7k|}

ossl_child_prov_ctx_new:
   38|      2|{
   39|      2|    return OPENSSL_zalloc(sizeof(struct child_prov_globals));
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   40|      2|}

ossl_prov_conf_ctx_new:
   31|      2|{
   32|      2|    PROVIDER_CONF_GLOBAL *pcgbl = OPENSSL_zalloc(sizeof(*pcgbl));
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   33|       |
   34|      2|    if (pcgbl == NULL)
  ------------------
  |  Branch (34:9): [True: 0, False: 2]
  ------------------
   35|      0|        return NULL;
   36|       |
   37|      2|    pcgbl->lock = CRYPTO_THREAD_lock_new();
   38|      2|    if (pcgbl->lock == NULL) {
  ------------------
  |  Branch (38:9): [True: 0, False: 2]
  ------------------
   39|      0|        OPENSSL_free(pcgbl);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   40|      0|        return NULL;
   41|      0|    }
   42|       |
   43|      2|    return pcgbl;
   44|      2|}

ossl_provider_store_new:
  310|      2|{
  311|      2|    struct provider_store_st *store = OPENSSL_zalloc(sizeof(*store));
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  312|       |
  313|      2|    if (store == NULL
  ------------------
  |  Branch (313:9): [True: 0, False: 2]
  ------------------
  314|      2|        || (store->providers = sk_OSSL_PROVIDER_new(ossl_provider_cmp)) == NULL
  ------------------
  |  Branch (314:12): [True: 0, False: 2]
  ------------------
  315|      2|        || (store->default_path_lock = CRYPTO_THREAD_lock_new()) == NULL
  ------------------
  |  Branch (315:12): [True: 0, False: 2]
  ------------------
  316|      2|#ifndef FIPS_MODULE
  317|      2|        || (store->child_cbs = sk_OSSL_PROVIDER_CHILD_CB_new_null()) == NULL
  ------------------
  |  Branch (317:12): [True: 0, False: 2]
  ------------------
  318|      2|#endif
  319|      2|        || (store->lock = CRYPTO_THREAD_lock_new()) == NULL) {
  ------------------
  |  Branch (319:12): [True: 0, False: 2]
  ------------------
  320|      0|        ossl_provider_store_free(store);
  321|      0|        return NULL;
  322|      0|    }
  323|      2|    store->libctx = ctx;
  324|      2|    store->use_fallbacks = 1;
  325|       |
  326|      2|    return store;
  327|      2|}
ossl_provider_up_ref:
  486|    391|{
  487|    391|    int ref = 0;
  488|       |
  489|    391|    if (CRYPTO_UP_REF(&prov->refcnt, &ref) <= 0)
  ------------------
  |  Branch (489:9): [True: 0, False: 391]
  ------------------
  490|      0|        return 0;
  491|       |
  492|    391|#ifndef FIPS_MODULE
  493|    391|    if (prov->ischild) {
  ------------------
  |  Branch (493:9): [True: 0, False: 391]
  ------------------
  494|      0|        if (!ossl_provider_up_ref_parent(prov, 0)) {
  ------------------
  |  Branch (494:13): [True: 0, False: 0]
  ------------------
  495|      0|            ossl_provider_free(prov);
  496|      0|            return 0;
  497|      0|        }
  498|      0|    }
  499|    391|#endif
  500|       |
  501|    391|    return ref;
  502|    391|}
OSSL_PROVIDER_get_conf_parameters:
  845|  21.7k|{
  846|  21.7k|    int i;
  847|       |
  848|  21.7k|    if (prov->parameters == NULL)
  ------------------
  |  Branch (848:9): [True: 0, False: 21.7k]
  ------------------
  849|      0|        return 1;
  850|       |
  851|  21.7k|    for (i = 0; i < sk_INFOPAIR_num(prov->parameters); i++) {
  ------------------
  |  Branch (851:17): [True: 0, False: 21.7k]
  ------------------
  852|      0|        INFOPAIR *pair = sk_INFOPAIR_value(prov->parameters, i);
  853|      0|        OSSL_PARAM *p = OSSL_PARAM_locate(params, pair->name);
  854|       |
  855|      0|        if (p != NULL
  ------------------
  |  Branch (855:13): [True: 0, False: 0]
  ------------------
  856|      0|            && !OSSL_PARAM_set_utf8_ptr(p, pair->value))
  ------------------
  |  Branch (856:16): [True: 0, False: 0]
  ------------------
  857|      0|            return 0;
  858|      0|    }
  859|  21.7k|    return 1;
  860|  21.7k|}
ossl_provider_ctx:
 1432|  1.01M|{
 1433|  1.01M|    return prov != NULL ? prov->provctx : NULL;
  ------------------
  |  Branch (1433:12): [True: 1.01M, False: 0]
  ------------------
 1434|  1.01M|}
ossl_provider_doall_activated:
 1533|   132k|{
 1534|   132k|    int ret = 0, curr, max, ref = 0;
 1535|   132k|    struct provider_store_st *store = get_provider_store(ctx);
 1536|   132k|    STACK_OF(OSSL_PROVIDER) *provs = NULL;
  ------------------
  |  |   33|   132k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1537|       |
 1538|   132k|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_AUTOLOAD_CONFIG)
 1539|       |    /*
 1540|       |     * Make sure any providers are loaded from config before we try to use
 1541|       |     * them.
 1542|       |     */
 1543|   132k|    if (ossl_lib_ctx_is_default(ctx))
  ------------------
  |  Branch (1543:9): [True: 132k, False: 0]
  ------------------
 1544|   132k|        OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL);
  ------------------
  |  |  511|   132k|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
 1545|   132k|#endif
 1546|       |
 1547|   132k|    if (store == NULL)
  ------------------
  |  Branch (1547:9): [True: 0, False: 132k]
  ------------------
 1548|      0|        return 1;
 1549|   132k|    if (!provider_activate_fallbacks(store))
  ------------------
  |  Branch (1549:9): [True: 0, False: 132k]
  ------------------
 1550|      0|        return 0;
 1551|       |
 1552|       |    /*
 1553|       |     * Under lock, grab a copy of the provider list and up_ref each
 1554|       |     * provider so that they don't disappear underneath us.
 1555|       |     */
 1556|   132k|    if (!CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (1556:9): [True: 0, False: 132k]
  ------------------
 1557|      0|        return 0;
 1558|   132k|    provs = sk_OSSL_PROVIDER_dup(store->providers);
 1559|   132k|    if (provs == NULL) {
  ------------------
  |  Branch (1559:9): [True: 0, False: 132k]
  ------------------
 1560|      0|        CRYPTO_THREAD_unlock(store->lock);
 1561|      0|        return 0;
 1562|      0|    }
 1563|   132k|    max = sk_OSSL_PROVIDER_num(provs);
 1564|       |    /*
 1565|       |     * We work backwards through the stack so that we can safely delete items
 1566|       |     * as we go.
 1567|       |     */
 1568|   265k|    for (curr = max - 1; curr >= 0; curr--) {
  ------------------
  |  Branch (1568:26): [True: 132k, False: 132k]
  ------------------
 1569|   132k|        OSSL_PROVIDER *prov = sk_OSSL_PROVIDER_value(provs, curr);
 1570|       |
 1571|   132k|        if (!CRYPTO_THREAD_read_lock(prov->flag_lock))
  ------------------
  |  Branch (1571:13): [True: 0, False: 132k]
  ------------------
 1572|      0|            goto err_unlock;
 1573|   132k|        if (prov->flag_activated) {
  ------------------
  |  Branch (1573:13): [True: 132k, False: 0]
  ------------------
 1574|       |            /*
 1575|       |             * We call CRYPTO_UP_REF directly rather than ossl_provider_up_ref
 1576|       |             * to avoid upping the ref count on the parent provider, which we
 1577|       |             * must not do while holding locks.
 1578|       |             */
 1579|   132k|            if (CRYPTO_UP_REF(&prov->refcnt, &ref) <= 0) {
  ------------------
  |  Branch (1579:17): [True: 0, False: 132k]
  ------------------
 1580|      0|                CRYPTO_THREAD_unlock(prov->flag_lock);
 1581|      0|                goto err_unlock;
 1582|      0|            }
 1583|       |            /*
 1584|       |             * It's already activated, but we up the activated count to ensure
 1585|       |             * it remains activated until after we've called the user callback.
 1586|       |             * In theory this could mean the parent provider goes inactive,
 1587|       |             * whilst still activated in the child for a short period. That's ok.
 1588|       |             */
 1589|   132k|            if (!CRYPTO_atomic_add(&prov->activatecnt, 1, &ref,
  ------------------
  |  Branch (1589:17): [True: 0, False: 132k]
  ------------------
 1590|   132k|                    prov->activatecnt_lock)) {
 1591|      0|                CRYPTO_DOWN_REF(&prov->refcnt, &ref);
 1592|      0|                CRYPTO_THREAD_unlock(prov->flag_lock);
 1593|      0|                goto err_unlock;
 1594|      0|            }
 1595|   132k|        } else {
 1596|      0|            sk_OSSL_PROVIDER_delete(provs, curr);
 1597|      0|            max--;
 1598|      0|        }
 1599|   132k|        CRYPTO_THREAD_unlock(prov->flag_lock);
 1600|   132k|    }
 1601|   132k|    CRYPTO_THREAD_unlock(store->lock);
 1602|       |
 1603|       |    /*
 1604|       |     * Now, we sweep through all providers not under lock
 1605|       |     */
 1606|   265k|    for (curr = 0; curr < max; curr++) {
  ------------------
  |  Branch (1606:20): [True: 132k, False: 132k]
  ------------------
 1607|   132k|        OSSL_PROVIDER *prov = sk_OSSL_PROVIDER_value(provs, curr);
 1608|       |
 1609|   132k|        if (!cb(prov, cbdata)) {
  ------------------
  |  Branch (1609:13): [True: 0, False: 132k]
  ------------------
 1610|      0|            curr = -1;
 1611|      0|            goto finish;
 1612|      0|        }
 1613|   132k|    }
 1614|   132k|    curr = -1;
 1615|       |
 1616|   132k|    ret = 1;
 1617|   132k|    goto finish;
 1618|       |
 1619|      0|err_unlock:
 1620|      0|    CRYPTO_THREAD_unlock(store->lock);
 1621|   132k|finish:
 1622|       |    /*
 1623|       |     * The pop_free call doesn't do what we want on an error condition. We
 1624|       |     * either start from the first item in the stack, or part way through if
 1625|       |     * we only processed some of the items.
 1626|       |     */
 1627|   265k|    for (curr++; curr < max; curr++) {
  ------------------
  |  Branch (1627:18): [True: 132k, False: 132k]
  ------------------
 1628|   132k|        OSSL_PROVIDER *prov = sk_OSSL_PROVIDER_value(provs, curr);
 1629|       |
 1630|   132k|        if (!CRYPTO_atomic_add(&prov->activatecnt, -1, &ref,
  ------------------
  |  Branch (1630:13): [True: 0, False: 132k]
  ------------------
 1631|   132k|                prov->activatecnt_lock)) {
 1632|      0|            ret = 0;
 1633|      0|            continue;
 1634|      0|        }
 1635|   132k|        if (ref < 1) {
  ------------------
  |  Branch (1635:13): [True: 0, False: 132k]
  ------------------
 1636|       |            /*
 1637|       |             * Looks like we need to deactivate properly. We could just have
 1638|       |             * done this originally, but it involves taking a write lock so
 1639|       |             * we avoid it. We up the count again and do a full deactivation
 1640|       |             */
 1641|      0|            if (CRYPTO_atomic_add(&prov->activatecnt, 1, &ref,
  ------------------
  |  Branch (1641:17): [True: 0, False: 0]
  ------------------
 1642|      0|                    prov->activatecnt_lock))
 1643|      0|                provider_deactivate(prov, 0, 1);
 1644|      0|            else
 1645|      0|                ret = 0;
 1646|      0|        }
 1647|       |        /*
 1648|       |         * As above where we did the up-ref, we don't call ossl_provider_free
 1649|       |         * to avoid making upcalls. There should always be at least one ref
 1650|       |         * to the provider in the store, so this should never drop to 0.
 1651|       |         */
 1652|   132k|        if (!CRYPTO_DOWN_REF(&prov->refcnt, &ref)) {
  ------------------
  |  Branch (1652:13): [True: 0, False: 132k]
  ------------------
 1653|      0|            ret = 0;
 1654|      0|            continue;
 1655|      0|        }
 1656|       |        /*
 1657|       |         * Not much we can do if this assert ever fails. So we don't use
 1658|       |         * ossl_assert here.
 1659|       |         */
 1660|   132k|        assert(ref > 0);
  ------------------
  |  Branch (1660:9): [True: 0, False: 132k]
  |  Branch (1660:9): [True: 132k, False: 0]
  ------------------
 1661|   132k|    }
 1662|   132k|    sk_OSSL_PROVIDER_free(provs);
 1663|   132k|    return ret;
 1664|   132k|}
ossl_provider_libctx:
 1725|   589k|{
 1726|   589k|    return prov != NULL ? prov->libctx : NULL;
  ------------------
  |  Branch (1726:12): [True: 578k, False: 10.8k]
  ------------------
 1727|   589k|}
ossl_provider_get_capabilities:
 1913|  14.7k|{
 1914|  14.7k|    if (prov->get_capabilities != NULL) {
  ------------------
  |  Branch (1914:9): [True: 14.7k, False: 0]
  ------------------
 1915|  14.7k|#ifndef FIPS_MODULE
 1916|  14.7k|        OSSL_TRACE_BEGIN(PROVIDER)
  ------------------
  |  |  219|  14.7k|    do {                           \
  |  |  220|  14.7k|        BIO *trc_out = NULL;       \
  |  |  221|  14.7k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 14.7k]
  |  |  ------------------
  ------------------
 1917|      0|        {
 1918|      0|            BIO_printf(trc_out,
 1919|      0|                "(provider %s) Calling get_capabilities "
 1920|      0|                "with capabilities %s\n",
 1921|      0|                prov->name,
 1922|      0|                capability == NULL ? "none" : capability);
  ------------------
  |  Branch (1922:17): [True: 0, False: 0]
  ------------------
 1923|      0|        }
 1924|  14.7k|        OSSL_TRACE_END(PROVIDER);
  ------------------
  |  |  224|  14.7k|    }                            \
  |  |  225|  14.7k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 14.7k]
  |  |  ------------------
  ------------------
 1925|  14.7k|#endif
 1926|  14.7k|        return prov->get_capabilities(prov->provctx, capability, cb, arg);
 1927|  14.7k|    }
 1928|      0|    return 1;
 1929|  14.7k|}
ossl_provider_query_operation:
 1952|   117k|{
 1953|   117k|    const OSSL_ALGORITHM *res;
 1954|       |
 1955|   117k|    if (prov->query_operation == NULL) {
  ------------------
  |  Branch (1955:9): [True: 0, False: 117k]
  ------------------
 1956|      0|#ifndef FIPS_MODULE
 1957|      0|        OSSL_TRACE_BEGIN(PROVIDER)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1958|      0|        {
 1959|      0|            BIO_printf(trc_out, "provider %s lacks query operation!\n",
 1960|      0|                prov->name);
 1961|      0|        }
 1962|      0|        OSSL_TRACE_END(PROVIDER);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1963|      0|#endif
 1964|      0|        return NULL;
 1965|      0|    }
 1966|       |
 1967|   117k|    res = prov->query_operation(prov->provctx, operation_id, no_cache);
 1968|   117k|#ifndef FIPS_MODULE
 1969|   117k|    OSSL_TRACE_BEGIN(PROVIDER)
  ------------------
  |  |  219|   117k|    do {                           \
  |  |  220|   117k|        BIO *trc_out = NULL;       \
  |  |  221|   117k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 117k]
  |  |  ------------------
  ------------------
 1970|      0|    {
 1971|      0|        const OSSL_ALGORITHM *idx;
 1972|      0|        if (res != NULL) {
  ------------------
  |  Branch (1972:13): [True: 0, False: 0]
  ------------------
 1973|      0|            BIO_printf(trc_out,
 1974|      0|                "(provider %s) Calling query, available algs are:\n", prov->name);
 1975|       |
 1976|      0|            for (idx = res; idx->algorithm_names != NULL; idx++) {
  ------------------
  |  Branch (1976:29): [True: 0, False: 0]
  ------------------
 1977|      0|                BIO_printf(trc_out,
 1978|      0|                    "(provider %s) names %s, prop_def %s, desc %s\n",
 1979|      0|                    prov->name,
 1980|      0|                    idx->algorithm_names == NULL ? "none" : idx->algorithm_names,
  ------------------
  |  Branch (1980:21): [True: 0, False: 0]
  ------------------
 1981|      0|                    idx->property_definition == NULL ? "none" : idx->property_definition,
  ------------------
  |  Branch (1981:21): [True: 0, False: 0]
  ------------------
 1982|      0|                    idx->algorithm_description == NULL ? "none" : idx->algorithm_description);
  ------------------
  |  Branch (1982:21): [True: 0, False: 0]
  ------------------
 1983|      0|            }
 1984|      0|        } else {
 1985|      0|            BIO_printf(trc_out, "(provider %s) query_operation failed\n", prov->name);
 1986|      0|        }
 1987|      0|    }
 1988|   117k|    OSSL_TRACE_END(PROVIDER);
  ------------------
  |  |  224|   117k|    }                            \
  |  |  225|   117k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 117k]
  |  |  ------------------
  ------------------
 1989|   117k|#endif
 1990|       |
 1991|       |#if defined(OPENSSL_NO_CACHED_FETCH)
 1992|       |    /* Forcing the non-caching of queries */
 1993|       |    if (no_cache != NULL)
 1994|       |        *no_cache = 1;
 1995|       |#endif
 1996|   117k|    return res;
 1997|   117k|}
ossl_provider_unquery_operation:
 2016|   117k|{
 2017|   117k|    if (prov->unquery_operation != NULL) {
  ------------------
  |  Branch (2017:9): [True: 0, False: 117k]
  ------------------
 2018|      0|#ifndef FIPS_MODULE
 2019|      0|        OSSL_TRACE_BEGIN(PROVIDER)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2020|      0|        {
 2021|      0|            BIO_printf(trc_out,
 2022|      0|                "(provider %s) Calling unquery"
 2023|      0|                " with operation %d\n",
 2024|      0|                prov->name,
 2025|      0|                operation_id);
 2026|      0|        }
 2027|      0|        OSSL_TRACE_END(PROVIDER);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2028|      0|#endif
 2029|      0|        prov->unquery_operation(prov->provctx, operation_id, algs);
 2030|      0|    }
 2031|   117k|}
ossl_provider_set_operation_bit:
 2034|     10|{
 2035|     10|    size_t byte = bitnum / 8;
 2036|     10|    unsigned char bit = (1 << (bitnum % 8)) & 0xFF;
 2037|       |
 2038|     10|    if (!CRYPTO_THREAD_write_lock(provider->opbits_lock))
  ------------------
  |  Branch (2038:9): [True: 0, False: 10]
  ------------------
 2039|      0|        return 0;
 2040|     10|    if (provider->operation_bits_sz <= byte) {
  ------------------
  |  Branch (2040:9): [True: 3, False: 7]
  ------------------
 2041|      3|        unsigned char *tmp = OPENSSL_realloc(provider->operation_bits,
  ------------------
  |  |  121|      3|    CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2042|      3|            byte + 1);
 2043|       |
 2044|      3|        if (tmp == NULL) {
  ------------------
  |  Branch (2044:13): [True: 0, False: 3]
  ------------------
 2045|      0|            CRYPTO_THREAD_unlock(provider->opbits_lock);
 2046|      0|            return 0;
 2047|      0|        }
 2048|      3|        provider->operation_bits = tmp;
 2049|      3|        memset(provider->operation_bits + provider->operation_bits_sz,
 2050|      3|            '\0', byte + 1 - provider->operation_bits_sz);
 2051|      3|        provider->operation_bits_sz = byte + 1;
 2052|      3|    }
 2053|     10|    provider->operation_bits[byte] |= bit;
 2054|     10|    CRYPTO_THREAD_unlock(provider->opbits_lock);
 2055|     10|    return 1;
 2056|     10|}
ossl_provider_test_operation_bit:
 2060|   117k|{
 2061|   117k|    size_t byte = bitnum / 8;
 2062|   117k|    unsigned char bit = (1 << (bitnum % 8)) & 0xFF;
 2063|       |
 2064|   117k|    if (!ossl_assert(result != NULL)) {
  ------------------
  |  |   52|   117k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   117k|    __FILE__, __LINE__)
  ------------------
  |  Branch (2064:9): [True: 0, False: 117k]
  ------------------
 2065|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2066|      0|        return 0;
 2067|      0|    }
 2068|       |
 2069|   117k|    *result = 0;
 2070|   117k|    if (!CRYPTO_THREAD_read_lock(provider->opbits_lock))
  ------------------
  |  Branch (2070:9): [True: 0, False: 117k]
  ------------------
 2071|      0|        return 0;
 2072|   117k|    if (provider->operation_bits_sz > byte)
  ------------------
  |  Branch (2072:9): [True: 117k, False: 3]
  ------------------
 2073|   117k|        *result = ((provider->operation_bits[byte] & bit) != 0);
 2074|   117k|    CRYPTO_THREAD_unlock(provider->opbits_lock);
 2075|   117k|    return 1;
 2076|   117k|}
provider_core.c:get_provider_store:
  330|   132k|{
  331|   132k|    struct provider_store_st *store = NULL;
  332|       |
  333|   132k|    store = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_PROVIDER_STORE_INDEX);
  ------------------
  |  |   96|   132k|#define OSSL_LIB_CTX_PROVIDER_STORE_INDEX 1
  ------------------
  334|   132k|    if (store == NULL)
  ------------------
  |  Branch (334:9): [True: 0, False: 132k]
  ------------------
  335|       |        ERR_raise(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  336|   132k|    return store;
  337|   132k|}
provider_core.c:provider_new:
  450|      1|{
  451|      1|    OSSL_PROVIDER *prov = NULL;
  452|       |
  453|      1|    if ((prov = OPENSSL_zalloc(sizeof(*prov))) == NULL)
  ------------------
  |  |  109|      1|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (453:9): [True: 0, False: 1]
  ------------------
  454|      0|        return NULL;
  455|      1|    if (!CRYPTO_NEW_REF(&prov->refcnt, 1)) {
  ------------------
  |  Branch (455:9): [True: 0, False: 1]
  ------------------
  456|      0|        OPENSSL_free(prov);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  457|      0|        return NULL;
  458|      0|    }
  459|      1|    if ((prov->activatecnt_lock = CRYPTO_THREAD_lock_new()) == NULL) {
  ------------------
  |  Branch (459:9): [True: 0, False: 1]
  ------------------
  460|      0|        ossl_provider_free(prov);
  461|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  462|      0|        return NULL;
  463|      0|    }
  464|       |
  465|      1|    if ((prov->opbits_lock = CRYPTO_THREAD_lock_new()) == NULL
  ------------------
  |  Branch (465:9): [True: 0, False: 1]
  ------------------
  466|      1|        || (prov->flag_lock = CRYPTO_THREAD_lock_new()) == NULL
  ------------------
  |  Branch (466:12): [True: 0, False: 1]
  ------------------
  467|      1|        || (prov->parameters = sk_INFOPAIR_deep_copy(parameters,
  ------------------
  |  Branch (467:12): [True: 0, False: 1]
  ------------------
  468|      1|                infopair_copy,
  469|      1|                infopair_free))
  470|      1|            == NULL) {
  471|      0|        ossl_provider_free(prov);
  472|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  473|      0|        return NULL;
  474|      0|    }
  475|      1|    if ((prov->name = OPENSSL_strdup(name)) == NULL) {
  ------------------
  |  |  136|      1|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (475:9): [True: 0, False: 1]
  ------------------
  476|      0|        ossl_provider_free(prov);
  477|      0|        return NULL;
  478|      0|    }
  479|       |
  480|      1|    prov->init_function = init_function;
  481|       |
  482|      1|    return prov;
  483|      1|}
provider_core.c:provider_activate:
 1262|      1|{
 1263|      1|    int count = -1;
 1264|      1|    struct provider_store_st *store;
 1265|      1|    int ret = 1;
 1266|       |
 1267|      1|    store = prov->store;
 1268|       |    /*
 1269|       |     * If the provider hasn't been added to the store, then we don't need
 1270|       |     * any locks because we've not shared it with other threads.
 1271|       |     */
 1272|      1|    if (store == NULL) {
  ------------------
  |  Branch (1272:9): [True: 1, False: 0]
  ------------------
 1273|      1|        lock = 0;
 1274|      1|        if (!provider_init(prov))
  ------------------
  |  Branch (1274:13): [True: 0, False: 1]
  ------------------
 1275|      0|            return -1;
 1276|      1|    }
 1277|       |
 1278|      1|#ifndef FIPS_MODULE
 1279|      1|    if (prov->random_bytes != NULL
  ------------------
  |  Branch (1279:9): [True: 0, False: 1]
  ------------------
 1280|      0|        && !ossl_rand_check_random_provider_on_load(prov->libctx, prov))
  ------------------
  |  Branch (1280:12): [True: 0, False: 0]
  ------------------
 1281|      0|        return -1;
 1282|       |
 1283|      1|    if (prov->ischild && upcalls && !ossl_provider_up_ref_parent(prov, 1))
  ------------------
  |  Branch (1283:9): [True: 0, False: 1]
  |  Branch (1283:26): [True: 0, False: 0]
  |  Branch (1283:37): [True: 0, False: 0]
  ------------------
 1284|      0|        return -1;
 1285|      1|#endif
 1286|       |
 1287|      1|    if (lock && !CRYPTO_THREAD_read_lock(store->lock)) {
  ------------------
  |  Branch (1287:9): [True: 0, False: 1]
  |  Branch (1287:17): [True: 0, False: 0]
  ------------------
 1288|      0|#ifndef FIPS_MODULE
 1289|      0|        if (prov->ischild && upcalls)
  ------------------
  |  Branch (1289:13): [True: 0, False: 0]
  |  Branch (1289:30): [True: 0, False: 0]
  ------------------
 1290|      0|            ossl_provider_free_parent(prov, 1);
 1291|      0|#endif
 1292|      0|        return -1;
 1293|      0|    }
 1294|       |
 1295|      1|    if (lock && !CRYPTO_THREAD_write_lock(prov->flag_lock)) {
  ------------------
  |  Branch (1295:9): [True: 0, False: 1]
  |  Branch (1295:17): [True: 0, False: 0]
  ------------------
 1296|      0|        CRYPTO_THREAD_unlock(store->lock);
 1297|      0|#ifndef FIPS_MODULE
 1298|      0|        if (prov->ischild && upcalls)
  ------------------
  |  Branch (1298:13): [True: 0, False: 0]
  |  Branch (1298:30): [True: 0, False: 0]
  ------------------
 1299|      0|            ossl_provider_free_parent(prov, 1);
 1300|      0|#endif
 1301|      0|        return -1;
 1302|      0|    }
 1303|      1|    if (CRYPTO_atomic_add(&prov->activatecnt, 1, &count, prov->activatecnt_lock)) {
  ------------------
  |  Branch (1303:9): [True: 1, False: 0]
  ------------------
 1304|      1|        prov->flag_activated = 1;
 1305|       |
 1306|      1|        if (count == 1 && store != NULL) {
  ------------------
  |  Branch (1306:13): [True: 1, False: 0]
  |  Branch (1306:27): [True: 0, False: 1]
  ------------------
 1307|      0|            ret = create_provider_children(prov);
 1308|      0|        }
 1309|      1|    }
 1310|      1|    if (lock) {
  ------------------
  |  Branch (1310:9): [True: 0, False: 1]
  ------------------
 1311|      0|        CRYPTO_THREAD_unlock(prov->flag_lock);
 1312|      0|        CRYPTO_THREAD_unlock(store->lock);
 1313|       |        /*
 1314|       |         * This can be done outside the lock. We tolerate other threads getting
 1315|       |         * the wrong result briefly when creating OSSL_DECODER_CTXs.
 1316|       |         */
 1317|      0|#ifndef FIPS_MODULE
 1318|      0|        if (count == 1)
  ------------------
  |  Branch (1318:13): [True: 0, False: 0]
  ------------------
 1319|      0|            ossl_decoder_cache_flush(prov->libctx);
 1320|      0|#endif
 1321|      0|    }
 1322|       |
 1323|      1|    if (!ret)
  ------------------
  |  Branch (1323:9): [True: 0, False: 1]
  ------------------
 1324|      0|        return -1;
 1325|       |
 1326|      1|    return count;
 1327|      1|}
provider_core.c:provider_init:
  954|      1|{
  955|      1|    const OSSL_DISPATCH *provider_dispatch = NULL;
  956|      1|    void *tmp_provctx = NULL; /* safety measure */
  957|      1|#ifndef OPENSSL_NO_ERR
  958|      1|#ifndef FIPS_MODULE
  959|      1|    OSSL_FUNC_provider_get_reason_strings_fn *p_get_reason_strings = NULL;
  960|      1|#endif
  961|      1|#endif
  962|      1|    int ok = 0;
  963|       |
  964|      1|    if (!ossl_assert(!prov->flag_initialized)) {
  ------------------
  |  |   52|      1|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      1|    __FILE__, __LINE__)
  ------------------
  |  Branch (964:9): [True: 0, False: 1]
  ------------------
  965|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  966|      0|        goto end;
  967|      0|    }
  968|       |
  969|       |    /*
  970|       |     * If the init function isn't set, it indicates that this provider is
  971|       |     * a loadable module.
  972|       |     */
  973|      1|    if (prov->init_function == NULL) {
  ------------------
  |  Branch (973:9): [True: 0, False: 1]
  ------------------
  974|       |#ifdef FIPS_MODULE
  975|       |        goto end;
  976|       |#else
  977|      0|        if (prov->module == NULL) {
  ------------------
  |  Branch (977:13): [True: 0, False: 0]
  ------------------
  978|      0|            char *allocated_path = NULL;
  979|      0|            const char *module_path = NULL;
  980|      0|            char *merged_path = NULL;
  981|      0|            const char *load_dir = NULL;
  982|      0|            char *allocated_load_dir = NULL;
  983|      0|            struct provider_store_st *store;
  984|       |
  985|      0|            if ((prov->module = DSO_new()) == NULL) {
  ------------------
  |  Branch (985:17): [True: 0, False: 0]
  ------------------
  986|       |                /* DSO_new() generates an error already */
  987|      0|                goto end;
  988|      0|            }
  989|       |
  990|      0|            if ((store = get_provider_store(prov->libctx)) == NULL
  ------------------
  |  Branch (990:17): [True: 0, False: 0]
  ------------------
  991|      0|                || !CRYPTO_THREAD_read_lock(store->default_path_lock))
  ------------------
  |  Branch (991:20): [True: 0, False: 0]
  ------------------
  992|      0|                goto end;
  993|       |
  994|      0|            if (store->default_path != NULL) {
  ------------------
  |  Branch (994:17): [True: 0, False: 0]
  ------------------
  995|      0|                allocated_load_dir = OPENSSL_strdup(store->default_path);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  996|      0|                CRYPTO_THREAD_unlock(store->default_path_lock);
  997|      0|                if (allocated_load_dir == NULL)
  ------------------
  |  Branch (997:21): [True: 0, False: 0]
  ------------------
  998|      0|                    goto end;
  999|      0|                load_dir = allocated_load_dir;
 1000|      0|            } else {
 1001|      0|                CRYPTO_THREAD_unlock(store->default_path_lock);
 1002|      0|            }
 1003|       |
 1004|      0|            if (load_dir == NULL) {
  ------------------
  |  Branch (1004:17): [True: 0, False: 0]
  ------------------
 1005|      0|                load_dir = ossl_safe_getenv("OPENSSL_MODULES");
 1006|      0|                if (load_dir == NULL)
  ------------------
  |  Branch (1006:21): [True: 0, False: 0]
  ------------------
 1007|      0|                    load_dir = ossl_get_modulesdir();
 1008|      0|            }
 1009|       |
 1010|      0|            DSO_ctrl(prov->module, DSO_CTRL_SET_FLAGS,
  ------------------
  |  |   19|      0|#define DSO_CTRL_SET_FLAGS 2
  ------------------
 1011|      0|                DSO_FLAG_NAME_TRANSLATION_EXT_ONLY, NULL);
  ------------------
  |  |   41|      0|#define DSO_FLAG_NAME_TRANSLATION_EXT_ONLY 0x02
  ------------------
 1012|       |
 1013|      0|            module_path = prov->path;
 1014|      0|            if (module_path == NULL)
  ------------------
  |  Branch (1014:17): [True: 0, False: 0]
  ------------------
 1015|      0|                module_path = allocated_path = DSO_convert_filename(prov->module, prov->name);
 1016|      0|            if (module_path != NULL)
  ------------------
  |  Branch (1016:17): [True: 0, False: 0]
  ------------------
 1017|      0|                merged_path = DSO_merge(prov->module, module_path, load_dir);
 1018|       |
 1019|      0|            if (merged_path == NULL
  ------------------
  |  Branch (1019:17): [True: 0, False: 0]
  ------------------
 1020|      0|                || (DSO_load(prov->module, merged_path, NULL, 0)) == NULL) {
  ------------------
  |  Branch (1020:20): [True: 0, False: 0]
  ------------------
 1021|      0|                DSO_free(prov->module);
 1022|      0|                prov->module = NULL;
 1023|      0|            }
 1024|       |
 1025|      0|            OPENSSL_free(merged_path);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1026|      0|            OPENSSL_free(allocated_path);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1027|      0|            OPENSSL_free(allocated_load_dir);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1028|      0|        }
 1029|       |
 1030|      0|        if (prov->module == NULL) {
  ------------------
  |  Branch (1030:13): [True: 0, False: 0]
  ------------------
 1031|       |            /* DSO has already recorded errors, this is just a tracepoint */
 1032|      0|            ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_DSO_LIB,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_DSO_LIB,
  ------------------
  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_DSO_LIB,
  ------------------
  |  |  289|      0|#define ERR_R_DSO_LIB (ERR_LIB_DSO /* 37 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |   81|      0|#define ERR_LIB_DSO 37
  |  |  ------------------
  |  |               #define ERR_R_DSO_LIB (ERR_LIB_DSO /* 37 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1033|      0|                "name=%s", prov->name);
 1034|      0|            goto end;
 1035|      0|        }
 1036|       |
 1037|      0|        prov->init_function = (OSSL_provider_init_fn *)
 1038|      0|            DSO_bind_func(prov->module, "OSSL_provider_init");
 1039|      0|#endif
 1040|      0|    }
 1041|       |
 1042|       |    /* Check for and call the initialise function for the provider. */
 1043|      1|    if (prov->init_function == NULL) {
  ------------------
  |  Branch (1043:9): [True: 0, False: 1]
  ------------------
 1044|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_UNSUPPORTED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_UNSUPPORTED,
  ------------------
  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_UNSUPPORTED,
  ------------------
  |  |  317|      0|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1045|      0|            "name=%s, provider has no provider init function",
 1046|      0|            prov->name);
 1047|      0|        goto end;
 1048|      0|    }
 1049|      1|#ifndef FIPS_MODULE
 1050|      1|    OSSL_TRACE_BEGIN(PROVIDER)
  ------------------
  |  |  219|      1|    do {                           \
  |  |  220|      1|        BIO *trc_out = NULL;       \
  |  |  221|      1|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 1]
  |  |  ------------------
  ------------------
 1051|      0|    {
 1052|      0|        BIO_printf(trc_out,
 1053|      0|            "(provider %s) initializing\n", prov->name);
 1054|      0|    }
 1055|      1|    OSSL_TRACE_END(PROVIDER);
  ------------------
  |  |  224|      1|    }                            \
  |  |  225|      1|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 1]
  |  |  ------------------
  ------------------
 1056|      1|#endif
 1057|       |
 1058|      1|    if (!prov->init_function((OSSL_CORE_HANDLE *)prov, core_dispatch,
  ------------------
  |  Branch (1058:9): [True: 0, False: 1]
  ------------------
 1059|      1|            &provider_dispatch, &tmp_provctx)) {
 1060|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INIT_FAIL,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INIT_FAIL,
  ------------------
  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INIT_FAIL,
  ------------------
  |  |  310|      0|#define ERR_R_INIT_FAIL (261 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1061|      0|            "name=%s", prov->name);
 1062|      0|        goto end;
 1063|      0|    }
 1064|      1|    prov->provctx = tmp_provctx;
 1065|      1|    prov->dispatch = provider_dispatch;
 1066|       |
 1067|      1|    if (provider_dispatch != NULL) {
  ------------------
  |  Branch (1067:9): [True: 1, False: 0]
  ------------------
 1068|      6|        for (; provider_dispatch->function_id != 0; provider_dispatch++) {
  ------------------
  |  Branch (1068:16): [True: 5, False: 1]
  ------------------
 1069|      5|            switch (provider_dispatch->function_id) {
  ------------------
  |  Branch (1069:21): [True: 5, False: 0]
  ------------------
 1070|      1|            case OSSL_FUNC_PROVIDER_TEARDOWN:
  ------------------
  |  |  234|      1|#define OSSL_FUNC_PROVIDER_TEARDOWN 1024
  ------------------
  |  Branch (1070:13): [True: 1, False: 4]
  ------------------
 1071|      1|                prov->teardown = OSSL_FUNC_provider_teardown(provider_dispatch);
 1072|      1|                break;
 1073|      1|            case OSSL_FUNC_PROVIDER_GETTABLE_PARAMS:
  ------------------
  |  |  236|      1|#define OSSL_FUNC_PROVIDER_GETTABLE_PARAMS 1025
  ------------------
  |  Branch (1073:13): [True: 1, False: 4]
  ------------------
 1074|      1|                prov->gettable_params = OSSL_FUNC_provider_gettable_params(provider_dispatch);
 1075|      1|                break;
 1076|      1|            case OSSL_FUNC_PROVIDER_GET_PARAMS:
  ------------------
  |  |  239|      1|#define OSSL_FUNC_PROVIDER_GET_PARAMS 1026
  ------------------
  |  Branch (1076:13): [True: 1, False: 4]
  ------------------
 1077|      1|                prov->get_params = OSSL_FUNC_provider_get_params(provider_dispatch);
 1078|      1|                break;
 1079|      0|            case OSSL_FUNC_PROVIDER_SELF_TEST:
  ------------------
  |  |  252|      0|#define OSSL_FUNC_PROVIDER_SELF_TEST 1031
  ------------------
  |  Branch (1079:13): [True: 0, False: 5]
  ------------------
 1080|      0|                prov->self_test = OSSL_FUNC_provider_self_test(provider_dispatch);
 1081|      0|                break;
 1082|      0|            case OSSL_FUNC_PROVIDER_RANDOM_BYTES:
  ------------------
  |  |  254|      0|#define OSSL_FUNC_PROVIDER_RANDOM_BYTES 1032
  ------------------
  |  Branch (1082:13): [True: 0, False: 5]
  ------------------
 1083|      0|                prov->random_bytes = OSSL_FUNC_provider_random_bytes(provider_dispatch);
 1084|      0|                break;
 1085|      1|            case OSSL_FUNC_PROVIDER_GET_CAPABILITIES:
  ------------------
  |  |  250|      1|#define OSSL_FUNC_PROVIDER_GET_CAPABILITIES 1030
  ------------------
  |  Branch (1085:13): [True: 1, False: 4]
  ------------------
 1086|      1|                prov->get_capabilities = OSSL_FUNC_provider_get_capabilities(provider_dispatch);
 1087|      1|                break;
 1088|      1|            case OSSL_FUNC_PROVIDER_QUERY_OPERATION:
  ------------------
  |  |  241|      1|#define OSSL_FUNC_PROVIDER_QUERY_OPERATION 1027
  ------------------
  |  Branch (1088:13): [True: 1, False: 4]
  ------------------
 1089|      1|                prov->query_operation = OSSL_FUNC_provider_query_operation(provider_dispatch);
 1090|      1|                break;
 1091|      0|            case OSSL_FUNC_PROVIDER_UNQUERY_OPERATION:
  ------------------
  |  |  244|      0|#define OSSL_FUNC_PROVIDER_UNQUERY_OPERATION 1028
  ------------------
  |  Branch (1091:13): [True: 0, False: 5]
  ------------------
 1092|      0|                prov->unquery_operation = OSSL_FUNC_provider_unquery_operation(provider_dispatch);
 1093|      0|                break;
 1094|      0|#ifndef OPENSSL_NO_ERR
 1095|      0|#ifndef FIPS_MODULE
 1096|      0|            case OSSL_FUNC_PROVIDER_GET_REASON_STRINGS:
  ------------------
  |  |  247|      0|#define OSSL_FUNC_PROVIDER_GET_REASON_STRINGS 1029
  ------------------
  |  Branch (1096:13): [True: 0, False: 5]
  ------------------
 1097|      0|                p_get_reason_strings = OSSL_FUNC_provider_get_reason_strings(provider_dispatch);
 1098|      0|                break;
 1099|      5|#endif
 1100|      5|#endif
 1101|      5|            }
 1102|      5|        }
 1103|      1|    }
 1104|       |
 1105|      1|#ifndef OPENSSL_NO_ERR
 1106|      1|#ifndef FIPS_MODULE
 1107|      1|    if (p_get_reason_strings != NULL) {
  ------------------
  |  Branch (1107:9): [True: 0, False: 1]
  ------------------
 1108|      0|        const OSSL_ITEM *reasonstrings = p_get_reason_strings(prov->provctx);
 1109|      0|        size_t cnt, cnt2;
 1110|       |
 1111|       |        /*
 1112|       |         * ERR_load_strings() handles ERR_STRING_DATA rather than OSSL_ITEM,
 1113|       |         * although they are essentially the same type.
 1114|       |         * Furthermore, ERR_load_strings() patches the array's error number
 1115|       |         * with the error library number, so we need to make a copy of that
 1116|       |         * array either way.
 1117|       |         */
 1118|      0|        cnt = 0;
 1119|      0|        while (reasonstrings[cnt].id != 0) {
  ------------------
  |  Branch (1119:16): [True: 0, False: 0]
  ------------------
 1120|      0|            if (ERR_GET_LIB(reasonstrings[cnt].id) != 0)
  ------------------
  |  Branch (1120:17): [True: 0, False: 0]
  ------------------
 1121|      0|                goto end;
 1122|      0|            cnt++;
 1123|      0|        }
 1124|      0|        cnt++; /* One for the terminating item */
 1125|       |
 1126|       |        /* Allocate one extra item for the "library" name */
 1127|      0|        prov->error_strings = OPENSSL_calloc(cnt + 1, sizeof(ERR_STRING_DATA));
  ------------------
  |  |  113|      0|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1128|      0|        if (prov->error_strings == NULL)
  ------------------
  |  Branch (1128:13): [True: 0, False: 0]
  ------------------
 1129|      0|            goto end;
 1130|       |
 1131|       |        /*
 1132|       |         * Set the "library" name.
 1133|       |         */
 1134|      0|        prov->error_strings[0].error = ERR_PACK(prov->error_lib, 0, 0);
  ------------------
  |  |  262|      0|    ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  210|      0|#define ERR_LIB_MASK 0xFF
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  209|      0|#define ERR_LIB_OFFSET 23L
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  213|      0|#define ERR_REASON_MASK 0X7FFFFF
  |  |  ------------------
  ------------------
 1135|      0|        prov->error_strings[0].string = prov->name;
 1136|       |        /*
 1137|       |         * Copy reasonstrings item 0..cnt-1 to prov->error_trings positions
 1138|       |         * 1..cnt.
 1139|       |         */
 1140|      0|        for (cnt2 = 1; cnt2 <= cnt; cnt2++) {
  ------------------
  |  Branch (1140:24): [True: 0, False: 0]
  ------------------
 1141|      0|            prov->error_strings[cnt2].error = (int)reasonstrings[cnt2 - 1].id;
 1142|      0|            prov->error_strings[cnt2].string = reasonstrings[cnt2 - 1].ptr;
 1143|      0|        }
 1144|       |
 1145|      0|        ERR_load_strings(prov->error_lib, prov->error_strings);
 1146|      0|    }
 1147|      1|#endif
 1148|      1|#endif
 1149|       |
 1150|       |    /* With this flag set, this provider has become fully "loaded". */
 1151|      1|    prov->flag_initialized = 1;
 1152|      1|    ok = 1;
 1153|       |
 1154|      1|end:
 1155|      1|    return ok;
 1156|      1|}
provider_core.c:core_get_params:
 2328|  21.7k|{
 2329|  21.7k|    OSSL_PARAM *p;
 2330|       |    /*
 2331|       |     * We created this object originally and we know it is actually an
 2332|       |     * OSSL_PROVIDER *, so the cast is safe
 2333|       |     */
 2334|  21.7k|    OSSL_PROVIDER *prov = (OSSL_PROVIDER *)handle;
 2335|       |
 2336|  21.7k|    if ((p = OSSL_PARAM_locate(params, OSSL_PROV_PARAM_CORE_VERSION)) != NULL)
  ------------------
  |  |  514|  21.7k|# define OSSL_PROV_PARAM_CORE_VERSION "openssl-version"
  ------------------
  |  Branch (2336:9): [True: 0, False: 21.7k]
  ------------------
 2337|      0|        OSSL_PARAM_set_utf8_ptr(p, OPENSSL_VERSION_STR);
  ------------------
  |  |   90|      0|# define OPENSSL_VERSION_STR "4.0.2"
  ------------------
 2338|  21.7k|    if ((p = OSSL_PARAM_locate(params, OSSL_PROV_PARAM_CORE_PROV_NAME)) != NULL)
  ------------------
  |  |  513|  21.7k|# define OSSL_PROV_PARAM_CORE_PROV_NAME "provider-name"
  ------------------
  |  Branch (2338:9): [True: 0, False: 21.7k]
  ------------------
 2339|      0|        OSSL_PARAM_set_utf8_ptr(p, prov->name);
 2340|       |
 2341|  21.7k|#ifndef FIPS_MODULE
 2342|  21.7k|    if ((p = OSSL_PARAM_locate(params,
  ------------------
  |  Branch (2342:9): [True: 0, False: 21.7k]
  ------------------
 2343|  21.7k|             OSSL_PROV_PARAM_CORE_MODULE_FILENAME))
  ------------------
  |  |  512|  21.7k|# define OSSL_PROV_PARAM_CORE_MODULE_FILENAME "module-filename"
  ------------------
 2344|  21.7k|        != NULL)
 2345|      0|        OSSL_PARAM_set_utf8_ptr(p, ossl_provider_module_path(prov));
 2346|  21.7k|#endif
 2347|       |
 2348|  21.7k|    return OSSL_PROVIDER_get_conf_parameters(prov, params);
 2349|  21.7k|}
provider_core.c:core_get_libctx:
 2352|      1|{
 2353|       |    /*
 2354|       |     * We created this object originally and we know it is actually an
 2355|       |     * OSSL_PROVIDER *, so the cast is safe
 2356|       |     */
 2357|      1|    OSSL_PROVIDER *prov = (OSSL_PROVIDER *)handle;
 2358|       |
 2359|       |    /*
 2360|       |     * Using ossl_provider_libctx would be wrong as that returns
 2361|       |     * NULL for |prov| == NULL and NULL libctx has a special meaning
 2362|       |     * that does not apply here. Here |prov| == NULL can happen only in
 2363|       |     * case of a coding error.
 2364|       |     */
 2365|      1|    assert(prov != NULL);
  ------------------
  |  Branch (2365:5): [True: 0, False: 1]
  |  Branch (2365:5): [True: 1, False: 0]
  ------------------
 2366|      1|    return (OPENSSL_CORE_CTX *)prov->libctx;
 2367|      1|}
provider_core.c:provider_activate_fallbacks:
 1442|   132k|{
 1443|   132k|    int use_fallbacks;
 1444|   132k|    int activated_fallback_count = 0;
 1445|   132k|    int ret = 0;
 1446|   132k|    const OSSL_PROVIDER_INFO *p;
 1447|       |
 1448|   132k|    if (!CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (1448:9): [True: 0, False: 132k]
  ------------------
 1449|      0|        return 0;
 1450|   132k|    use_fallbacks = store->use_fallbacks;
 1451|   132k|    CRYPTO_THREAD_unlock(store->lock);
 1452|   132k|    if (!use_fallbacks)
  ------------------
  |  Branch (1452:9): [True: 132k, False: 1]
  ------------------
 1453|   132k|        return 1;
 1454|       |
 1455|      1|    if (!CRYPTO_THREAD_write_lock(store->lock))
  ------------------
  |  Branch (1455:9): [True: 0, False: 1]
  ------------------
 1456|      0|        return 0;
 1457|       |    /* Check again, just in case another thread changed it */
 1458|      1|    use_fallbacks = store->use_fallbacks;
 1459|      1|    if (!use_fallbacks) {
  ------------------
  |  Branch (1459:9): [True: 0, False: 1]
  ------------------
 1460|      0|        CRYPTO_THREAD_unlock(store->lock);
 1461|      0|        return 1;
 1462|      0|    }
 1463|       |
 1464|      4|    for (p = ossl_predefined_providers; p->name != NULL; p++) {
  ------------------
  |  Branch (1464:41): [True: 3, False: 1]
  ------------------
 1465|      3|        OSSL_PROVIDER *prov = NULL;
 1466|      3|        OSSL_PROVIDER_INFO *info = store->provinfo;
 1467|      3|        STACK_OF(INFOPAIR) *params = NULL;
  ------------------
  |  |   33|      3|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1468|      3|        size_t i;
 1469|       |
 1470|      3|        if (!p->is_fallback)
  ------------------
  |  Branch (1470:13): [True: 2, False: 1]
  ------------------
 1471|      2|            continue;
 1472|       |
 1473|      1|        for (i = 0; i < store->numprovinfo; info++, i++) {
  ------------------
  |  Branch (1473:21): [True: 0, False: 1]
  ------------------
 1474|      0|            if (strcmp(info->name, p->name) != 0)
  ------------------
  |  Branch (1474:17): [True: 0, False: 0]
  ------------------
 1475|      0|                continue;
 1476|      0|            params = info->parameters;
 1477|      0|            break;
 1478|      0|        }
 1479|       |
 1480|       |        /*
 1481|       |         * We use the internal constructor directly here,
 1482|       |         * otherwise we get a call loop
 1483|       |         */
 1484|      1|        prov = provider_new(p->name, p->init, params);
 1485|      1|        if (prov == NULL)
  ------------------
  |  Branch (1485:13): [True: 0, False: 1]
  ------------------
 1486|      0|            goto err;
 1487|      1|        prov->libctx = store->libctx;
 1488|      1|#ifndef FIPS_MODULE
 1489|      1|        prov->error_lib = ERR_get_next_error_library();
 1490|      1|#endif
 1491|       |
 1492|       |        /*
 1493|       |         * We are calling provider_activate while holding the store lock. This
 1494|       |         * means the init function will be called while holding a lock. Normally
 1495|       |         * we try to avoid calling a user callback while holding a lock.
 1496|       |         * However, fallbacks are never third party providers so we accept this.
 1497|       |         */
 1498|      1|        if (provider_activate(prov, 0, 0) < 0) {
  ------------------
  |  Branch (1498:13): [True: 0, False: 1]
  ------------------
 1499|      0|            ossl_provider_free(prov);
 1500|      0|            goto err;
 1501|      0|        }
 1502|      1|        prov->store = store;
 1503|      1|        if (sk_OSSL_PROVIDER_push(store->providers, prov) == 0) {
  ------------------
  |  Branch (1503:13): [True: 0, False: 1]
  ------------------
 1504|      0|            ossl_provider_free(prov);
 1505|      0|            goto err;
 1506|      0|        }
 1507|      1|        activated_fallback_count++;
 1508|      1|    }
 1509|       |
 1510|      1|    if (activated_fallback_count > 0) {
  ------------------
  |  Branch (1510:9): [True: 1, False: 0]
  ------------------
 1511|      1|        store->use_fallbacks = 0;
 1512|      1|        ret = 1;
 1513|      1|    }
 1514|      1|err:
 1515|      1|    CRYPTO_THREAD_unlock(store->lock);
 1516|      1|    return ret;
 1517|      1|}

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

RAND_get_rand_method:
  249|   149k|{
  250|   149k|    const RAND_METHOD *tmp_meth = NULL;
  251|       |
  252|   149k|    if (!RUN_ONCE(&rand_init, do_rand_init))
  ------------------
  |  |  130|   149k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 149k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (252:9): [True: 0, False: 149k]
  ------------------
  253|      0|        return NULL;
  254|       |
  255|   149k|    if (rand_meth_lock == NULL)
  ------------------
  |  Branch (255:9): [True: 0, False: 149k]
  ------------------
  256|      0|        return NULL;
  257|       |
  258|   149k|    if (!CRYPTO_THREAD_read_lock(rand_meth_lock))
  ------------------
  |  Branch (258:9): [True: 0, False: 149k]
  ------------------
  259|      0|        return NULL;
  260|   149k|    tmp_meth = default_RAND_meth;
  261|   149k|    CRYPTO_THREAD_unlock(rand_meth_lock);
  262|   149k|    if (tmp_meth != NULL)
  ------------------
  |  Branch (262:9): [True: 149k, False: 1]
  ------------------
  263|   149k|        return tmp_meth;
  264|       |
  265|      1|    if (!CRYPTO_THREAD_write_lock(rand_meth_lock))
  ------------------
  |  Branch (265:9): [True: 0, False: 1]
  ------------------
  266|      0|        return NULL;
  267|      1|    if (default_RAND_meth == NULL)
  ------------------
  |  Branch (267:9): [True: 1, False: 0]
  ------------------
  268|      1|        default_RAND_meth = &ossl_rand_meth;
  269|      1|    tmp_meth = default_RAND_meth;
  270|      1|    CRYPTO_THREAD_unlock(rand_meth_lock);
  271|      1|    return tmp_meth;
  272|      1|}
RAND_status:
  327|  34.6k|{
  328|  34.6k|    EVP_RAND_CTX *rand;
  329|  34.6k|#ifndef OPENSSL_NO_DEPRECATED_3_0
  330|  34.6k|    const RAND_METHOD *meth = RAND_get_rand_method();
  331|       |
  332|  34.6k|    if (meth != NULL && meth != RAND_OpenSSL())
  ------------------
  |  Branch (332:9): [True: 34.6k, False: 0]
  |  Branch (332:25): [True: 0, False: 34.6k]
  ------------------
  333|      0|        return meth->status != NULL ? meth->status() : 0;
  ------------------
  |  Branch (333:16): [True: 0, False: 0]
  ------------------
  334|  34.6k|#endif
  335|       |
  336|  34.6k|    if ((rand = RAND_get0_primary(NULL)) == NULL)
  ------------------
  |  Branch (336:9): [True: 0, False: 34.6k]
  ------------------
  337|      0|        return 0;
  338|  34.6k|    return EVP_RAND_get_state(rand) == EVP_RAND_STATE_READY;
  ------------------
  |  | 1250|  34.6k|#define EVP_RAND_STATE_READY 1
  ------------------
  339|  34.6k|}
RAND_priv_bytes_ex:
  357|  40.2k|{
  358|  40.2k|    RAND_GLOBAL *dgbl;
  359|  40.2k|    EVP_RAND_CTX *rand;
  360|  40.2k|#if !defined(OPENSSL_NO_DEPRECATED_3_0) && !defined(FIPS_MODULE)
  361|  40.2k|    const RAND_METHOD *meth = RAND_get_rand_method();
  362|       |
  363|  40.2k|    if (meth != NULL && meth != RAND_OpenSSL()) {
  ------------------
  |  Branch (363:9): [True: 40.2k, False: 0]
  |  Branch (363:25): [True: 0, False: 40.2k]
  ------------------
  364|      0|        if (num > INT_MAX) {
  ------------------
  |  Branch (364:13): [True: 0, False: 0]
  ------------------
  365|      0|            ERR_raise(ERR_LIB_RAND, RAND_R_ARGUMENT_OUT_OF_RANGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  366|      0|            return -1;
  367|      0|        }
  368|      0|        if (meth->bytes != NULL)
  ------------------
  |  Branch (368:13): [True: 0, False: 0]
  ------------------
  369|      0|            return meth->bytes(buf, (int)num);
  370|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_FUNC_NOT_IMPLEMENTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  371|      0|        return -1;
  372|      0|    }
  373|  40.2k|#endif
  374|       |
  375|  40.2k|    dgbl = rand_get_global(ctx);
  376|  40.2k|    if (dgbl == NULL)
  ------------------
  |  Branch (376:9): [True: 0, False: 40.2k]
  ------------------
  377|      0|        return 0;
  378|  40.2k|#ifndef FIPS_MODULE
  379|  40.2k|    if (dgbl->random_provider != NULL)
  ------------------
  |  Branch (379:9): [True: 0, False: 40.2k]
  ------------------
  380|      0|        return ossl_provider_random_bytes(dgbl->random_provider,
  381|      0|            OSSL_PROV_RANDOM_PRIVATE,
  ------------------
  |  |  124|      0|#define OSSL_PROV_RANDOM_PRIVATE 1
  ------------------
  382|      0|            buf, num, strength);
  383|  40.2k|#endif /* !FIPS_MODULE */
  384|  40.2k|    rand = rand_get0_private(ctx, dgbl);
  385|  40.2k|    if (rand != NULL)
  ------------------
  |  Branch (385:9): [True: 40.2k, False: 0]
  ------------------
  386|  40.2k|        return EVP_RAND_generate(rand, buf, num, strength, 0, NULL, 0);
  387|       |
  388|      0|    return 0;
  389|  40.2k|}
RAND_bytes_ex:
  400|  74.4k|{
  401|  74.4k|    RAND_GLOBAL *dgbl;
  402|  74.4k|    EVP_RAND_CTX *rand;
  403|  74.4k|#if !defined(OPENSSL_NO_DEPRECATED_3_0) && !defined(FIPS_MODULE)
  404|  74.4k|    const RAND_METHOD *meth = RAND_get_rand_method();
  405|       |
  406|  74.4k|    if (meth != NULL && meth != RAND_OpenSSL()) {
  ------------------
  |  Branch (406:9): [True: 74.4k, False: 0]
  |  Branch (406:25): [True: 0, False: 74.4k]
  ------------------
  407|      0|        if (num > INT_MAX) {
  ------------------
  |  Branch (407:13): [True: 0, False: 0]
  ------------------
  408|      0|            ERR_raise(ERR_LIB_RAND, RAND_R_ARGUMENT_OUT_OF_RANGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  409|      0|            return -1;
  410|      0|        }
  411|      0|        if (meth->bytes != NULL)
  ------------------
  |  Branch (411:13): [True: 0, False: 0]
  ------------------
  412|      0|            return meth->bytes(buf, (int)num);
  413|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_FUNC_NOT_IMPLEMENTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  414|      0|        return -1;
  415|      0|    }
  416|  74.4k|#endif
  417|       |
  418|  74.4k|    dgbl = rand_get_global(ctx);
  419|  74.4k|    if (dgbl == NULL)
  ------------------
  |  Branch (419:9): [True: 0, False: 74.4k]
  ------------------
  420|      0|        return 0;
  421|  74.4k|#ifndef FIPS_MODULE
  422|  74.4k|    if (dgbl->random_provider != NULL)
  ------------------
  |  Branch (422:9): [True: 0, False: 74.4k]
  ------------------
  423|      0|        return ossl_provider_random_bytes(dgbl->random_provider,
  424|      0|            OSSL_PROV_RANDOM_PUBLIC,
  ------------------
  |  |  123|      0|#define OSSL_PROV_RANDOM_PUBLIC 0
  ------------------
  425|      0|            buf, num, strength);
  426|  74.4k|#endif /* !FIPS_MODULE */
  427|       |
  428|  74.4k|    rand = rand_get0_public(ctx, dgbl);
  429|  74.4k|    if (rand != NULL)
  ------------------
  |  Branch (429:9): [True: 74.4k, False: 0]
  ------------------
  430|  74.4k|        return EVP_RAND_generate(rand, buf, num, strength, 0, NULL, 0);
  431|       |
  432|      0|    return 0;
  433|  74.4k|}
RAND_bytes:
  436|  31.0k|{
  437|  31.0k|    if (num < 0)
  ------------------
  |  Branch (437:9): [True: 0, False: 31.0k]
  ------------------
  438|      0|        return 0;
  439|  31.0k|    return RAND_bytes_ex(NULL, buf, (size_t)num, 0);
  440|  31.0k|}
ossl_rand_ctx_new:
  447|      2|{
  448|      2|    RAND_GLOBAL *dgbl = OPENSSL_zalloc(sizeof(*dgbl));
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  449|       |
  450|      2|    if (dgbl == NULL)
  ------------------
  |  Branch (450:9): [True: 0, False: 2]
  ------------------
  451|      0|        return NULL;
  452|       |
  453|      2|#ifndef FIPS_MODULE
  454|       |    /*
  455|       |     * We need to ensure that base libcrypto thread handling has been
  456|       |     * initialised.
  457|       |     */
  458|      2|    OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL);
  ------------------
  |  |   31|      2|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  459|       |
  460|       |    /* Prepopulate the random provider name */
  461|      2|    dgbl->random_provider_name = OPENSSL_strdup(random_provider_fips_name);
  ------------------
  |  |  136|      2|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  462|      2|    if (dgbl->random_provider_name == NULL)
  ------------------
  |  Branch (462:9): [True: 0, False: 2]
  ------------------
  463|      0|        goto err0;
  464|      2|#endif
  465|       |
  466|      2|    dgbl->lock = CRYPTO_THREAD_lock_new();
  467|      2|    if (dgbl->lock == NULL)
  ------------------
  |  Branch (467:9): [True: 0, False: 2]
  ------------------
  468|      0|        goto err1;
  469|       |
  470|      2|    return dgbl;
  471|       |
  472|      0|err1:
  473|      0|    CRYPTO_THREAD_lock_free(dgbl->lock);
  474|      0|#ifndef FIPS_MODULE
  475|      0|err0:
  476|      0|    OPENSSL_free(dgbl->random_provider_name);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  477|      0|#endif
  478|      0|    OPENSSL_free(dgbl);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  479|       |    return NULL;
  480|      0|}
RAND_get0_primary:
  785|  34.6k|{
  786|  34.6k|    RAND_GLOBAL *dgbl = rand_get_global(ctx);
  787|       |
  788|  34.6k|    return dgbl == NULL ? NULL : rand_get0_primary(ctx, dgbl);
  ------------------
  |  Branch (788:12): [True: 0, False: 34.6k]
  ------------------
  789|  34.6k|}
rand_lib.c:do_rand_init:
  126|      1|{
  127|      1|#ifndef OPENSSL_NO_DEPRECATED_3_0
  128|      1|    rand_meth_lock = CRYPTO_THREAD_lock_new();
  129|      1|    if (rand_meth_lock == NULL)
  ------------------
  |  Branch (129:9): [True: 0, False: 1]
  ------------------
  130|      0|        goto err;
  131|      1|#endif /* !OPENSSL_NO_DEPRECATED_3_0 */
  132|       |
  133|      1|    if (!ossl_rand_pool_init())
  ------------------
  |  Branch (133:9): [True: 0, False: 1]
  ------------------
  134|      0|        goto err;
  135|       |
  136|      1|    rand_inited = 1;
  137|      1|    return 1;
  138|       |
  139|      0|err:
  140|      0|#ifndef OPENSSL_NO_DEPRECATED_3_0
  141|      0|    CRYPTO_THREAD_lock_free(rand_meth_lock);
  142|       |    rand_meth_lock = NULL;
  143|      0|#endif /* !OPENSSL_NO_DEPRECATED_3_0 */
  144|      0|    return 0;
  145|      1|}
rand_lib.c:rand_get_global:
   84|   149k|{
   85|   149k|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DRBG_INDEX);
  ------------------
  |  |  100|   149k|#define OSSL_LIB_CTX_DRBG_INDEX 5
  ------------------
   86|   149k|}
rand_lib.c:rand_get0_primary:
  715|  34.6k|{
  716|  34.6k|    EVP_RAND_CTX *ret, *seed = NULL, *primary;
  717|       |
  718|  34.6k|    if (dgbl == NULL)
  ------------------
  |  Branch (718:9): [True: 0, False: 34.6k]
  ------------------
  719|      0|        return NULL;
  720|       |
  721|  34.6k|    if (!CRYPTO_THREAD_read_lock(dgbl->lock))
  ------------------
  |  Branch (721:9): [True: 0, False: 34.6k]
  ------------------
  722|      0|        return NULL;
  723|       |
  724|  34.6k|    ret = dgbl->primary;
  725|  34.6k|    CRYPTO_THREAD_unlock(dgbl->lock);
  726|       |
  727|  34.6k|    if (ret != NULL)
  ------------------
  |  Branch (727:9): [True: 34.6k, False: 1]
  ------------------
  728|  34.6k|        return ret;
  729|       |
  730|      1|#if !defined(FIPS_MODULE) || !defined(OPENSSL_NO_FIPS_JITTER)
  731|       |    /* Create a seed source for libcrypto or jitter enabled FIPS provider */
  732|      1|    ERR_set_mark();
  733|      1|    seed = rand_get0_seed(ctx, dgbl);
  734|      1|    if (seed == NULL && ERR_count_to_mark() > 0) {
  ------------------
  |  Branch (734:9): [True: 0, False: 1]
  |  Branch (734:25): [True: 0, False: 0]
  ------------------
  735|      0|        ERR_clear_last_mark();
  736|      0|        return NULL;
  737|      0|    }
  738|      1|    ERR_pop_to_mark();
  739|      1|#endif /* !FIPS_MODULE || !OPENSSL_NO_FIPS_JITTER */
  740|       |
  741|       |#if defined(FIPS_MODULE)
  742|       |    /* The FIPS provider has entropy health tests instead of the primary */
  743|       |    ret = rand_new_crngt(ctx, seed);
  744|       |#else /* FIPS_MODULE */
  745|      1|    ret = rand_new_drbg(ctx, seed, PRIMARY_RESEED_INTERVAL,
  ------------------
  |  |   23|      1|#define PRIMARY_RESEED_INTERVAL (1 << 8)
  ------------------
  746|      1|        PRIMARY_RESEED_TIME_INTERVAL);
  ------------------
  |  |   25|      1|#define PRIMARY_RESEED_TIME_INTERVAL (60 * 60) /* 1 hour */
  ------------------
  747|      1|#endif /* FIPS_MODULE */
  748|       |
  749|      1|    if (ret == NULL)
  ------------------
  |  Branch (749:9): [True: 0, False: 1]
  ------------------
  750|      0|        return NULL;
  751|       |
  752|       |    /*
  753|       |     * The primary DRBG may be shared between multiple threads so we must
  754|       |     * enable locking.
  755|       |     */
  756|      1|    if (!EVP_RAND_enable_locking(ret)) {
  ------------------
  |  Branch (756:9): [True: 0, False: 1]
  ------------------
  757|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UNABLE_TO_ENABLE_LOCKING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  758|      0|        EVP_RAND_CTX_free(ret);
  759|      0|        return NULL;
  760|      0|    }
  761|       |
  762|      1|    if (!CRYPTO_THREAD_write_lock(dgbl->lock)) {
  ------------------
  |  Branch (762:9): [True: 0, False: 1]
  ------------------
  763|      0|        EVP_RAND_CTX_free(ret);
  764|      0|        return NULL;
  765|      0|    }
  766|       |
  767|      1|    primary = dgbl->primary;
  768|      1|    if (primary != NULL) {
  ------------------
  |  Branch (768:9): [True: 0, False: 1]
  ------------------
  769|      0|        CRYPTO_THREAD_unlock(dgbl->lock);
  770|      0|        EVP_RAND_CTX_free(ret);
  771|      0|        return primary;
  772|      0|    }
  773|      1|    dgbl->primary = ret;
  774|      1|    CRYPTO_THREAD_unlock(dgbl->lock);
  775|       |
  776|      1|    return ret;
  777|      1|}
rand_lib.c:rand_get0_seed:
  578|      1|{
  579|      1|    EVP_RAND_CTX *ret, *seed;
  580|       |
  581|      1|    if (!CRYPTO_THREAD_read_lock(dgbl->lock))
  ------------------
  |  Branch (581:9): [True: 0, False: 1]
  ------------------
  582|      0|        return NULL;
  583|      1|    ret = dgbl->seed;
  584|      1|    CRYPTO_THREAD_unlock(dgbl->lock);
  585|      1|    if (ret != NULL)
  ------------------
  |  Branch (585:9): [True: 0, False: 1]
  ------------------
  586|      0|        return ret;
  587|       |
  588|      1|    seed = rand_new_seed(ctx);
  589|      1|    if (seed == NULL)
  ------------------
  |  Branch (589:9): [True: 0, False: 1]
  ------------------
  590|      0|        return NULL;
  591|       |
  592|      1|    if (!CRYPTO_THREAD_write_lock(dgbl->lock)) {
  ------------------
  |  Branch (592:9): [True: 0, False: 1]
  ------------------
  593|      0|        EVP_RAND_CTX_free(seed);
  594|      0|        return NULL;
  595|      0|    }
  596|      1|    if (dgbl->seed == NULL) {
  ------------------
  |  Branch (596:9): [True: 1, False: 0]
  ------------------
  597|      1|        dgbl->seed = seed;
  598|      1|        seed = NULL;
  599|      1|    }
  600|      1|    ret = dgbl->seed;
  601|      1|    CRYPTO_THREAD_unlock(dgbl->lock);
  602|       |    /* Free the instance that lost a creation race */
  603|      1|    EVP_RAND_CTX_free(seed);
  604|      1|    return ret;
  605|      1|}
rand_lib.c:rand_new_seed:
  525|      1|{
  526|      1|    EVP_RAND *rand;
  527|      1|    const char *propq;
  528|      1|    char *name;
  529|      1|    EVP_RAND_CTX *ctx = NULL;
  530|      1|    int fallback = 0;
  531|      1|#ifdef OPENSSL_NO_FIPS_JITTER
  532|      1|    RAND_GLOBAL *dgbl = rand_get_global(libctx);
  533|       |
  534|      1|    if (dgbl == NULL)
  ------------------
  |  Branch (534:9): [True: 0, False: 1]
  ------------------
  535|      0|        return NULL;
  536|      1|    propq = dgbl->seed_propq;
  537|      1|    if (dgbl->seed_name != NULL) {
  ------------------
  |  Branch (537:9): [True: 0, False: 1]
  ------------------
  538|      0|        name = dgbl->seed_name;
  539|      1|    } else {
  540|      1|        fallback = 1;
  541|      1|        name = OPENSSL_MSTR(OPENSSL_DEFAULT_SEED_SRC);
  ------------------
  |  |   19|      1|#define OPENSSL_MSTR(x) OPENSSL_MSTR_HELPER(x)
  |  |  ------------------
  |  |  |  |   18|      1|#define OPENSSL_MSTR_HELPER(x) #x
  |  |  ------------------
  ------------------
  542|      1|    }
  543|       |#else /* !OPENSSL_NO_FIPS_JITTER */
  544|       |    name = "JITTER";
  545|       |    propq = "";
  546|       |#endif /* OPENSSL_NO_FIPS_JITTER */
  547|       |
  548|      1|    ERR_set_mark();
  549|      1|    rand = EVP_RAND_fetch(libctx, name, propq);
  550|      1|    ERR_pop_to_mark();
  551|      1|    if (rand == NULL) {
  ------------------
  |  Branch (551:9): [True: 0, False: 1]
  ------------------
  552|      0|        if (!fallback)
  ------------------
  |  Branch (552:13): [True: 0, False: 0]
  ------------------
  553|      0|            ERR_raise(ERR_LIB_RAND, RAND_R_UNABLE_TO_FETCH_DRBG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  554|      0|        goto err;
  555|      0|    }
  556|      1|    ctx = EVP_RAND_CTX_new(rand, NULL);
  557|      1|    EVP_RAND_free(rand);
  558|      1|    if (ctx == NULL) {
  ------------------
  |  Branch (558:9): [True: 0, False: 1]
  ------------------
  559|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_UNABLE_TO_CREATE_DRBG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  560|      0|        goto err;
  561|      0|    }
  562|      1|    if (!EVP_RAND_instantiate(ctx, 0, 0, NULL, 0, NULL)) {
  ------------------
  |  Branch (562:9): [True: 0, False: 1]
  ------------------
  563|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_ERROR_INSTANTIATING_DRBG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  564|      0|        goto err;
  565|      0|    }
  566|      1|    return ctx;
  567|      0|err:
  568|      0|    EVP_RAND_CTX_free(ctx);
  569|       |    return NULL;
  570|      1|}
rand_lib.c:rand_new_drbg:
  628|      3|{
  629|      3|    EVP_RAND *rand;
  630|      3|    RAND_GLOBAL *dgbl = rand_get_global(libctx);
  631|      3|    EVP_RAND_CTX *ctx;
  632|      3|    OSSL_PARAM params[9], *p = params;
  633|      3|    const OSSL_PARAM *settables;
  634|      3|    char *name, *cipher;
  635|      3|    int use_df = 1;
  636|       |
  637|      3|    if (dgbl == NULL)
  ------------------
  |  Branch (637:9): [True: 0, False: 3]
  ------------------
  638|      0|        return NULL;
  639|      3|    name = dgbl->rng_name != NULL ? dgbl->rng_name : "CTR-DRBG";
  ------------------
  |  Branch (639:12): [True: 0, False: 3]
  ------------------
  640|      3|    rand = EVP_RAND_fetch(libctx, name, dgbl->rng_propq);
  641|      3|    if (rand == NULL) {
  ------------------
  |  Branch (641:9): [True: 0, False: 3]
  ------------------
  642|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_UNABLE_TO_FETCH_DRBG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  643|      0|        return NULL;
  644|      0|    }
  645|      3|    ctx = EVP_RAND_CTX_new(rand, parent);
  646|      3|    EVP_RAND_free(rand);
  647|      3|    if (ctx == NULL) {
  ------------------
  |  Branch (647:9): [True: 0, False: 3]
  ------------------
  648|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_UNABLE_TO_CREATE_DRBG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  649|      0|        return NULL;
  650|      0|    }
  651|       |
  652|      3|    settables = EVP_RAND_CTX_settable_params(ctx);
  653|      3|    if (OSSL_PARAM_locate_const(settables, OSSL_DRBG_PARAM_CIPHER)) {
  ------------------
  |  |  237|      3|# define OSSL_DRBG_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
  |  |  ------------------
  |  |  |  |  126|      3|# define OSSL_ALG_PARAM_CIPHER "cipher"
  |  |  ------------------
  ------------------
  |  Branch (653:9): [True: 3, False: 0]
  ------------------
  654|      3|        cipher = dgbl->rng_cipher != NULL ? dgbl->rng_cipher : "AES-256-CTR";
  ------------------
  |  Branch (654:18): [True: 0, False: 3]
  ------------------
  655|      3|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_DRBG_PARAM_CIPHER,
  ------------------
  |  |  237|      3|# define OSSL_DRBG_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
  |  |  ------------------
  |  |  |  |  126|      3|# define OSSL_ALG_PARAM_CIPHER "cipher"
  |  |  ------------------
  ------------------
  656|      3|            cipher, 0);
  657|      3|    }
  658|      3|    if (dgbl->rng_digest != NULL
  ------------------
  |  Branch (658:9): [True: 0, False: 3]
  ------------------
  659|      0|        && OSSL_PARAM_locate_const(settables, OSSL_DRBG_PARAM_DIGEST))
  ------------------
  |  |  238|      0|# define OSSL_DRBG_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
  |  |  ------------------
  |  |  |  |  127|      0|# define OSSL_ALG_PARAM_DIGEST "digest"
  |  |  ------------------
  ------------------
  |  Branch (659:12): [True: 0, False: 0]
  ------------------
  660|      0|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_DRBG_PARAM_DIGEST,
  ------------------
  |  |  238|      0|# define OSSL_DRBG_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
  |  |  ------------------
  |  |  |  |  127|      0|# define OSSL_ALG_PARAM_DIGEST "digest"
  |  |  ------------------
  ------------------
  661|      0|            dgbl->rng_digest, 0);
  662|      3|    if (dgbl->rng_propq != NULL)
  ------------------
  |  Branch (662:9): [True: 0, False: 3]
  ------------------
  663|      0|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_DRBG_PARAM_PROPERTIES,
  ------------------
  |  |  252|      0|# define OSSL_DRBG_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
  |  |  ------------------
  |  |  |  |  130|      0|# define OSSL_ALG_PARAM_PROPERTIES "properties"
  |  |  ------------------
  ------------------
  664|      0|            dgbl->rng_propq, 0);
  665|      3|    if (OSSL_PARAM_locate_const(settables, OSSL_ALG_PARAM_MAC))
  ------------------
  |  |  129|      3|# define OSSL_ALG_PARAM_MAC "mac"
  ------------------
  |  Branch (665:9): [True: 0, False: 3]
  ------------------
  666|      0|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_ALG_PARAM_MAC, "HMAC", 0);
  ------------------
  |  |  129|      0|# define OSSL_ALG_PARAM_MAC "mac"
  ------------------
  667|      3|    if (OSSL_PARAM_locate_const(settables, OSSL_DRBG_PARAM_USE_DF))
  ------------------
  |  |  259|      3|# define OSSL_DRBG_PARAM_USE_DF "use_derivation_function"
  ------------------
  |  Branch (667:9): [True: 3, False: 0]
  ------------------
  668|      3|        *p++ = OSSL_PARAM_construct_int(OSSL_DRBG_PARAM_USE_DF, &use_df);
  ------------------
  |  |  259|      3|# define OSSL_DRBG_PARAM_USE_DF "use_derivation_function"
  ------------------
  669|      3|    *p++ = OSSL_PARAM_construct_uint(OSSL_DRBG_PARAM_RESEED_REQUESTS,
  ------------------
  |  |  255|      3|# define OSSL_DRBG_PARAM_RESEED_REQUESTS "reseed_requests"
  ------------------
  670|      3|        &reseed_interval);
  671|      3|    *p++ = OSSL_PARAM_construct_time_t(OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL,
  ------------------
  |  |  257|      3|# define OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL "reseed_time_interval"
  ------------------
  672|      3|        &reseed_time_interval);
  673|      3|    *p = OSSL_PARAM_construct_end();
  674|      3|    if (!EVP_RAND_instantiate(ctx, 0, 0, NULL, 0, params)) {
  ------------------
  |  Branch (674:9): [True: 0, False: 3]
  ------------------
  675|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_ERROR_INSTANTIATING_DRBG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  676|      0|        EVP_RAND_CTX_free(ctx);
  677|      0|        return NULL;
  678|      0|    }
  679|      3|    return ctx;
  680|      3|}
rand_lib.c:rand_get0_public:
  792|  74.4k|{
  793|  74.4k|    EVP_RAND_CTX *rand, *primary;
  794|  74.4k|    OSSL_LIB_CTX *origctx = ctx;
  795|       |
  796|  74.4k|    ctx = ossl_lib_ctx_get_concrete(ctx);
  797|       |
  798|  74.4k|    if (ctx == NULL)
  ------------------
  |  Branch (798:9): [True: 0, False: 74.4k]
  ------------------
  799|      0|        return NULL;
  800|       |
  801|  74.4k|    if (dgbl == NULL)
  ------------------
  |  Branch (801:9): [True: 0, False: 74.4k]
  ------------------
  802|      0|        return NULL;
  803|       |
  804|  74.4k|    rand = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx);
  805|  74.4k|    if (rand == NULL) {
  ------------------
  |  Branch (805:9): [True: 1, False: 74.4k]
  ------------------
  806|      1|        primary = rand_get0_primary(origctx, dgbl);
  807|      1|        if (primary == NULL)
  ------------------
  |  Branch (807:13): [True: 0, False: 1]
  ------------------
  808|      0|            return NULL;
  809|       |
  810|       |        /*
  811|       |         * If the private is also NULL then this is the first time we've
  812|       |         * used this thread.
  813|       |         */
  814|      1|        if (CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PRIV_KEY, ctx) == NULL
  ------------------
  |  Branch (814:13): [True: 1, False: 0]
  ------------------
  815|      1|            && !ossl_init_thread_start(NULL, ctx, rand_delete_thread_state))
  ------------------
  |  Branch (815:16): [True: 0, False: 1]
  ------------------
  816|      0|            return NULL;
  817|      1|        rand = rand_new_drbg(ctx, primary, SECONDARY_RESEED_INTERVAL,
  ------------------
  |  |   24|      1|#define SECONDARY_RESEED_INTERVAL (1 << 16)
  ------------------
  818|      1|            SECONDARY_RESEED_TIME_INTERVAL);
  ------------------
  |  |   26|      1|#define SECONDARY_RESEED_TIME_INTERVAL (7 * 60) /* 7 minutes */
  ------------------
  819|      1|        if (!CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx, rand)) {
  ------------------
  |  Branch (819:13): [True: 0, False: 1]
  ------------------
  820|      0|            EVP_RAND_CTX_free(rand);
  821|      0|            rand = NULL;
  822|      0|        }
  823|      1|    }
  824|  74.4k|    return rand;
  825|  74.4k|}
rand_lib.c:rand_get0_private:
  839|  40.2k|{
  840|  40.2k|    EVP_RAND_CTX *rand, *primary;
  841|  40.2k|    OSSL_LIB_CTX *origctx = ctx;
  842|       |
  843|  40.2k|    ctx = ossl_lib_ctx_get_concrete(ctx);
  844|  40.2k|    if (ctx == NULL)
  ------------------
  |  Branch (844:9): [True: 0, False: 40.2k]
  ------------------
  845|      0|        return NULL;
  846|       |
  847|  40.2k|    rand = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PRIV_KEY, ctx);
  848|  40.2k|    if (rand == NULL) {
  ------------------
  |  Branch (848:9): [True: 1, False: 40.2k]
  ------------------
  849|      1|        primary = rand_get0_primary(origctx, dgbl);
  850|      1|        if (primary == NULL)
  ------------------
  |  Branch (850:13): [True: 0, False: 1]
  ------------------
  851|      0|            return NULL;
  852|       |
  853|       |        /*
  854|       |         * If the public is also NULL then this is the first time we've
  855|       |         * used this thread.
  856|       |         */
  857|      1|        if (CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx) == NULL
  ------------------
  |  Branch (857:13): [True: 0, False: 1]
  ------------------
  858|      0|            && !ossl_init_thread_start(NULL, ctx, rand_delete_thread_state))
  ------------------
  |  Branch (858:16): [True: 0, False: 0]
  ------------------
  859|      0|            return NULL;
  860|      1|        rand = rand_new_drbg(ctx, primary, SECONDARY_RESEED_INTERVAL,
  ------------------
  |  |   24|      1|#define SECONDARY_RESEED_INTERVAL (1 << 16)
  ------------------
  861|      1|            SECONDARY_RESEED_TIME_INTERVAL);
  ------------------
  |  |   26|      1|#define SECONDARY_RESEED_TIME_INTERVAL (7 * 60) /* 7 minutes */
  ------------------
  862|      1|        if (!CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PRIV_KEY, ctx, rand)) {
  ------------------
  |  Branch (862:13): [True: 0, False: 1]
  ------------------
  863|      0|            EVP_RAND_CTX_free(rand);
  864|      0|            rand = NULL;
  865|      0|        }
  866|      1|    }
  867|  40.2k|    return rand;
  868|  40.2k|}

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

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

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

ossl_self_test_set_callback_new:
   35|      2|{
   36|      2|    SELF_TEST_CB *stcb;
   37|       |
   38|      2|    stcb = OPENSSL_zalloc(sizeof(*stcb));
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   39|      2|    return stcb;
   40|      2|}

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

ossl_sha3_reset:
   30|   199k|{
   31|       |#if defined(__s390x__) && defined(OPENSSL_CPUID_OBJ)
   32|       |    if (!(OPENSSL_s390xcap_P.stfle[1] & S390X_CAPBIT(S390X_MSA12)))
   33|       |#endif
   34|   199k|        memset(ctx->A, 0, sizeof(ctx->A));
   35|   199k|    ctx->bufsz = 0;
   36|   199k|    ctx->xof_state = XOF_STATE_INIT;
  ------------------
  |  |   35|   199k|#define XOF_STATE_INIT 0
  ------------------
   37|   199k|}
ossl_sha3_init:
   40|  39.9k|{
   41|  39.9k|    size_t bsz = SHA3_BLOCKSIZE(bitlen);
  ------------------
  |  |   21|  39.9k|#define SHA3_BLOCKSIZE(bitlen) (KECCAK1600_WIDTH - bitlen * 2) / 8
  |  |  ------------------
  |  |  |  |   18|  39.9k|#define KECCAK1600_WIDTH 1600
  |  |  ------------------
  ------------------
   42|       |
   43|  39.9k|    if (bsz <= sizeof(ctx->buf)) {
  ------------------
  |  Branch (43:9): [True: 39.9k, False: 0]
  ------------------
   44|  39.9k|        ossl_sha3_reset(ctx);
   45|  39.9k|        ctx->block_size = bsz;
   46|  39.9k|        ctx->md_size = bitlen / 8;
   47|  39.9k|        ctx->pad = pad;
   48|  39.9k|        return 1;
   49|  39.9k|    }
   50|       |
   51|      0|    return 0;
   52|  39.9k|}
ossl_keccak_init:
   55|  21.7k|{
   56|  21.7k|    int ret = ossl_sha3_init(ctx, pad, bitlen);
   57|       |
   58|  21.7k|    if (ret)
  ------------------
  |  Branch (58:9): [True: 21.7k, False: 0]
  ------------------
   59|  21.7k|        ctx->md_size = mdlen / 8;
   60|  21.7k|    return ret;
   61|  21.7k|}
ossl_sha3_absorb:
   68|   177k|{
   69|   177k|    const size_t bsz = ctx->block_size;
   70|   177k|    size_t num, rem;
   71|       |
   72|   177k|    if (ossl_unlikely(len == 0))
  ------------------
  |  |   23|   177k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 177k]
  |  |  ------------------
  ------------------
   73|      0|        return 1;
   74|       |
   75|   177k|    if (!(ctx->xof_state == XOF_STATE_INIT || ctx->xof_state == XOF_STATE_ABSORB))
  ------------------
  |  |   35|   355k|#define XOF_STATE_INIT 0
  ------------------
                  if (!(ctx->xof_state == XOF_STATE_INIT || ctx->xof_state == XOF_STATE_ABSORB))
  ------------------
  |  |   36|  10.8k|#define XOF_STATE_ABSORB 1
  ------------------
  |  Branch (75:11): [True: 166k, False: 10.8k]
  |  Branch (75:47): [True: 10.8k, False: 0]
  ------------------
   76|      0|        return 0;
   77|       |
   78|       |    /* Is there anything in the buffer already ? */
   79|   177k|    if ((num = ctx->bufsz) != 0) {
  ------------------
  |  Branch (79:9): [True: 18.1k, False: 159k]
  ------------------
   80|       |        /* Calculate how much space is left in the buffer */
   81|  18.1k|        rem = bsz - num;
   82|       |        /* If the new input does not fill the buffer then just add it */
   83|  18.1k|        if (len < rem) {
  ------------------
  |  Branch (83:13): [True: 7.25k, False: 10.8k]
  ------------------
   84|  7.25k|            memcpy(ctx->buf + num, inp, len);
   85|  7.25k|            ctx->bufsz += len;
   86|  7.25k|            return 1;
   87|  7.25k|        }
   88|       |        /* otherwise fill up the buffer and absorb the buffer */
   89|  10.8k|        memcpy(ctx->buf + num, inp, rem);
   90|       |        /* Update the input pointer */
   91|  10.8k|        inp += rem;
   92|  10.8k|        len -= rem;
   93|  10.8k|        ctx->meth.absorb(ctx, ctx->buf, bsz);
   94|  10.8k|        ctx->bufsz = 0;
   95|  10.8k|        ctx->xof_state = XOF_STATE_ABSORB;
  ------------------
  |  |   36|  10.8k|#define XOF_STATE_ABSORB 1
  ------------------
   96|  10.8k|    }
   97|       |    /* Absorb the input - rem = leftover part of the input < blocksize) */
   98|   170k|    rem = ctx->meth.absorb(ctx, inp, len);
   99|   170k|    if (len >= bsz)
  ------------------
  |  Branch (99:9): [True: 18.1k, False: 152k]
  ------------------
  100|  18.1k|        ctx->xof_state = XOF_STATE_ABSORB;
  ------------------
  |  |   36|  18.1k|#define XOF_STATE_ABSORB 1
  ------------------
  101|       |    /* Copy the leftover bit of the input into the buffer */
  102|   170k|    if (ossl_likely(rem > 0)) {
  ------------------
  |  |   22|   170k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 170k, False: 0]
  |  |  ------------------
  ------------------
  103|   170k|        memcpy(ctx->buf, inp + len - rem, rem);
  104|   170k|        ctx->bufsz = rem;
  105|   170k|    }
  106|   170k|    return 1;
  107|   177k|}
ossl_sha3_final:
  115|  94.3k|{
  116|  94.3k|    int ret;
  117|       |
  118|  94.3k|    if (ctx->xof_state == XOF_STATE_SQUEEZE
  ------------------
  |  |   38|   188k|#define XOF_STATE_SQUEEZE 3
  ------------------
  |  Branch (118:9): [True: 0, False: 94.3k]
  ------------------
  119|  94.3k|        || ctx->xof_state == XOF_STATE_FINAL)
  ------------------
  |  |   37|  94.3k|#define XOF_STATE_FINAL 2
  ------------------
  |  Branch (119:12): [True: 0, False: 94.3k]
  ------------------
  120|      0|        return 0;
  121|  94.3k|    if (outlen == 0)
  ------------------
  |  Branch (121:9): [True: 0, False: 94.3k]
  ------------------
  122|      0|        return 1;
  123|       |
  124|  94.3k|    ret = ctx->meth.final(ctx, out, outlen);
  125|  94.3k|    ctx->xof_state = XOF_STATE_FINAL;
  ------------------
  |  |   37|  94.3k|#define XOF_STATE_FINAL 2
  ------------------
  126|  94.3k|    return ret;
  127|  94.3k|}
ossl_sha3_squeeze:
  131|   196k|{
  132|   196k|    int ret = 0;
  133|       |
  134|   196k|    if (ctx->xof_state == XOF_STATE_FINAL)
  ------------------
  |  |   37|   196k|#define XOF_STATE_FINAL 2
  ------------------
  |  Branch (134:9): [True: 0, False: 196k]
  ------------------
  135|      0|        return 0;
  136|   196k|    ret = ctx->meth.squeeze(ctx, out, outlen);
  137|   196k|    ctx->xof_state = XOF_STATE_SQUEEZE;
  ------------------
  |  |   38|   196k|#define XOF_STATE_SQUEEZE 3
  ------------------
  138|   196k|    return ret;
  139|   196k|}
ossl_sha3_absorb_default:
  143|   181k|{
  144|   181k|    return SHA3_absorb(ctx->A, inp, len, ctx->block_size);
  145|   181k|}
ossl_sha3_final_default:
  152|  94.3k|{
  153|  94.3k|    size_t bsz = ctx->block_size;
  154|  94.3k|    size_t num = ctx->bufsz;
  155|       |
  156|       |    /*
  157|       |     * Pad the data with 10*1. Note that |num| can be |bsz - 1|
  158|       |     * in which case both byte operations below are performed on
  159|       |     * same byte...
  160|       |     */
  161|  94.3k|    memset(ctx->buf + num, 0, bsz - num);
  162|  94.3k|    ctx->buf[num] = ctx->pad;
  163|  94.3k|    ctx->buf[bsz - 1] |= 0x80;
  164|       |
  165|  94.3k|    (void)SHA3_absorb(ctx->A, ctx->buf, bsz, bsz);
  166|       |
  167|  94.3k|    SHA3_squeeze(ctx->A, out, outlen, bsz, 0);
  168|  94.3k|    return 1;
  169|  94.3k|}
ossl_shake_squeeze_default:
  182|   196k|{
  183|   196k|    size_t bsz = ctx->block_size;
  184|   196k|    size_t num = ctx->bufsz;
  185|   196k|    size_t len;
  186|   196k|    int next = 1;
  187|       |
  188|       |    /*
  189|       |     * On the first squeeze call, finish the absorb process,
  190|       |     * by adding the trailing padding and then doing
  191|       |     * a final absorb.
  192|       |     */
  193|   196k|    if (ctx->xof_state != XOF_STATE_SQUEEZE) {
  ------------------
  |  |   38|   196k|#define XOF_STATE_SQUEEZE 3
  ------------------
  |  Branch (193:9): [True: 65.3k, False: 131k]
  ------------------
  194|       |        /*
  195|       |         * Pad the data with 10*1. Note that |num| can be |bsz - 1|
  196|       |         * in which case both byte operations below are performed on
  197|       |         * same byte...
  198|       |         */
  199|  65.3k|        memset(ctx->buf + num, 0, bsz - num);
  200|  65.3k|        ctx->buf[num] = ctx->pad;
  201|  65.3k|        ctx->buf[bsz - 1] |= 0x80;
  202|  65.3k|        (void)SHA3_absorb(ctx->A, ctx->buf, bsz, bsz);
  203|  65.3k|        num = ctx->bufsz = 0;
  204|  65.3k|        next = 0;
  205|  65.3k|    }
  206|       |
  207|       |    /*
  208|       |     * Step 1. Consume any bytes left over from a previous squeeze
  209|       |     * (See Step 4 below).
  210|       |     */
  211|   196k|    if (num != 0) {
  ------------------
  |  Branch (211:9): [True: 0, False: 196k]
  ------------------
  212|      0|        if (outlen > ctx->bufsz)
  ------------------
  |  Branch (212:13): [True: 0, False: 0]
  ------------------
  213|      0|            len = ctx->bufsz;
  214|      0|        else
  215|      0|            len = outlen;
  216|      0|        memcpy(out, ctx->buf + bsz - ctx->bufsz, len);
  217|      0|        out += len;
  218|      0|        outlen -= len;
  219|      0|        ctx->bufsz -= len;
  220|      0|    }
  221|   196k|    if (outlen == 0)
  ------------------
  |  Branch (221:9): [True: 0, False: 196k]
  ------------------
  222|      0|        return 1;
  223|       |
  224|       |    /* Step 2. Copy full sized squeezed blocks to the output buffer directly */
  225|   196k|    if (outlen >= bsz) {
  ------------------
  |  Branch (225:9): [True: 196k, False: 0]
  ------------------
  226|   196k|        len = bsz * (outlen / bsz);
  227|   196k|        SHA3_squeeze(ctx->A, out, len, bsz, next);
  228|   196k|        next = 1;
  229|   196k|        out += len;
  230|   196k|        outlen -= len;
  231|   196k|    }
  232|   196k|    if (outlen > 0) {
  ------------------
  |  Branch (232:9): [True: 0, False: 196k]
  ------------------
  233|       |        /* Step 3. Squeeze one more block into a buffer */
  234|      0|        SHA3_squeeze(ctx->A, ctx->buf, bsz, bsz, next);
  235|      0|        memcpy(out, ctx->buf, outlen);
  236|       |        /* Step 4. Remember the leftover part of the squeezed block */
  237|      0|        ctx->bufsz = bsz - outlen;
  238|      0|    }
  239|   196k|    return 1;
  240|   196k|}

SHA384_Init:
  114|   383k|{
  115|   383k|    c->h[0] = U64(0xcbbb9d5dc1059ed8);
  ------------------
  |  |   72|   383k|#define U64(C) C##ULL
  ------------------
  116|   383k|    c->h[1] = U64(0x629a292a367cd507);
  ------------------
  |  |   72|   383k|#define U64(C) C##ULL
  ------------------
  117|   383k|    c->h[2] = U64(0x9159015a3070dd17);
  ------------------
  |  |   72|   383k|#define U64(C) C##ULL
  ------------------
  118|   383k|    c->h[3] = U64(0x152fecd8f70e5939);
  ------------------
  |  |   72|   383k|#define U64(C) C##ULL
  ------------------
  119|   383k|    c->h[4] = U64(0x67332667ffc00b31);
  ------------------
  |  |   72|   383k|#define U64(C) C##ULL
  ------------------
  120|   383k|    c->h[5] = U64(0x8eb44a8768581511);
  ------------------
  |  |   72|   383k|#define U64(C) C##ULL
  ------------------
  121|   383k|    c->h[6] = U64(0xdb0c2e0d64f98fa7);
  ------------------
  |  |   72|   383k|#define U64(C) C##ULL
  ------------------
  122|   383k|    c->h[7] = U64(0x47b5481dbefa4fa4);
  ------------------
  |  |   72|   383k|#define U64(C) C##ULL
  ------------------
  123|       |
  124|   383k|    c->Nl = 0;
  125|   383k|    c->Nh = 0;
  126|   383k|    c->num = 0;
  127|   383k|    c->md_len = SHA384_DIGEST_LENGTH;
  ------------------
  |  |   88|   383k|#define SHA384_DIGEST_LENGTH 48
  ------------------
  128|   383k|    return 1;
  129|   383k|}
SHA512_Init:
  132|  3.62k|{
  133|  3.62k|    c->h[0] = U64(0x6a09e667f3bcc908);
  ------------------
  |  |   72|  3.62k|#define U64(C) C##ULL
  ------------------
  134|  3.62k|    c->h[1] = U64(0xbb67ae8584caa73b);
  ------------------
  |  |   72|  3.62k|#define U64(C) C##ULL
  ------------------
  135|  3.62k|    c->h[2] = U64(0x3c6ef372fe94f82b);
  ------------------
  |  |   72|  3.62k|#define U64(C) C##ULL
  ------------------
  136|  3.62k|    c->h[3] = U64(0xa54ff53a5f1d36f1);
  ------------------
  |  |   72|  3.62k|#define U64(C) C##ULL
  ------------------
  137|  3.62k|    c->h[4] = U64(0x510e527fade682d1);
  ------------------
  |  |   72|  3.62k|#define U64(C) C##ULL
  ------------------
  138|  3.62k|    c->h[5] = U64(0x9b05688c2b3e6c1f);
  ------------------
  |  |   72|  3.62k|#define U64(C) C##ULL
  ------------------
  139|  3.62k|    c->h[6] = U64(0x1f83d9abfb41bd6b);
  ------------------
  |  |   72|  3.62k|#define U64(C) C##ULL
  ------------------
  140|  3.62k|    c->h[7] = U64(0x5be0cd19137e2179);
  ------------------
  |  |   72|  3.62k|#define U64(C) C##ULL
  ------------------
  141|       |
  142|  3.62k|    c->Nl = 0;
  143|  3.62k|    c->Nh = 0;
  144|  3.62k|    c->num = 0;
  145|  3.62k|    c->md_len = SHA512_DIGEST_LENGTH;
  ------------------
  |  |   89|  3.62k|#define SHA512_DIGEST_LENGTH 64
  ------------------
  146|  3.62k|    return 1;
  147|  3.62k|}
SHA512_Final:
  163|   445k|{
  164|   445k|    unsigned char *p = (unsigned char *)c->u.p;
  165|   445k|    size_t n = c->num;
  166|       |
  167|   445k|    p[n] = 0x80; /* There always is a room for one */
  168|   445k|    n++;
  169|   445k|    if (n > (sizeof(c->u) - 16)) {
  ------------------
  |  Branch (169:9): [True: 0, False: 445k]
  ------------------
  170|      0|        memset(p + n, 0, sizeof(c->u) - n);
  171|      0|        n = 0;
  172|      0|        sha512_block_data_order(c, p, 1);
  173|      0|    }
  174|       |
  175|   445k|    memset(p + n, 0, sizeof(c->u) - 16 - n);
  176|       |#ifdef B_ENDIAN
  177|       |    c->u.d[SHA_LBLOCK - 2] = c->Nh;
  178|       |    c->u.d[SHA_LBLOCK - 1] = c->Nl;
  179|       |#else
  180|   445k|    uint8_t *cu = p + sizeof(c->u) - 16;
  181|       |
  182|   445k|    cu = OPENSSL_store_u64_be(cu, (uint64_t)c->Nh);
  183|   445k|    cu = OPENSSL_store_u64_be(cu, (uint64_t)c->Nl);
  184|   445k|#endif
  185|       |
  186|   445k|    sha512_block_data_order(c, p, 1);
  187|       |
  188|   445k|    if (out == NULL)
  ------------------
  |  Branch (188:9): [True: 0, False: 445k]
  ------------------
  189|      0|        return 0;
  190|       |
  191|       |    /* Let compiler decide if it's appropriate to unroll... */
  192|   445k|    switch (c->md_len) {
  193|      0|    case SHA256_192_DIGEST_LENGTH:
  ------------------
  |  |   85|      0|#define SHA256_192_DIGEST_LENGTH 24
  ------------------
  |  Branch (193:5): [True: 0, False: 445k]
  ------------------
  194|      0|        OUTPUT_RESULT(out, SHA256_192_DIGEST_LENGTH);
  ------------------
  |  |  159|      0|    for (n = 0; n < (len / 8); n++) \
  |  |  ------------------
  |  |  |  Branch (159:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  160|      0|    md = OPENSSL_store_u64_be(md, (uint64_t)c->h[n])
  ------------------
  195|      0|        break;
  196|      0|    case SHA256_DIGEST_LENGTH:
  ------------------
  |  |   87|      0|#define SHA256_DIGEST_LENGTH 32
  ------------------
  |  Branch (196:5): [True: 0, False: 445k]
  ------------------
  197|      0|        OUTPUT_RESULT(out, SHA256_DIGEST_LENGTH);
  ------------------
  |  |  159|      0|    for (n = 0; n < (len / 8); n++) \
  |  |  ------------------
  |  |  |  Branch (159:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  160|      0|    md = OPENSSL_store_u64_be(md, (uint64_t)c->h[n])
  ------------------
  198|      0|        break;
  199|   441k|    case SHA384_DIGEST_LENGTH:
  ------------------
  |  |   88|   441k|#define SHA384_DIGEST_LENGTH 48
  ------------------
  |  Branch (199:5): [True: 441k, False: 3.62k]
  ------------------
  200|   441k|        OUTPUT_RESULT(out, SHA384_DIGEST_LENGTH);
  ------------------
  |  |  159|  3.09M|    for (n = 0; n < (len / 8); n++) \
  |  |  ------------------
  |  |  |  Branch (159:17): [True: 2.65M, False: 441k]
  |  |  ------------------
  |  |  160|  2.65M|    md = OPENSSL_store_u64_be(md, (uint64_t)c->h[n])
  ------------------
  201|   441k|        break;
  202|  3.62k|    case SHA512_DIGEST_LENGTH:
  ------------------
  |  |   89|  3.62k|#define SHA512_DIGEST_LENGTH 64
  ------------------
  |  Branch (202:5): [True: 3.62k, False: 441k]
  ------------------
  203|  3.62k|        OUTPUT_RESULT(out, SHA512_DIGEST_LENGTH);
  ------------------
  |  |  159|  32.6k|    for (n = 0; n < (len / 8); n++) \
  |  |  ------------------
  |  |  |  Branch (159:17): [True: 29.0k, False: 3.62k]
  |  |  ------------------
  |  |  160|  29.0k|    md = OPENSSL_store_u64_be(md, (uint64_t)c->h[n])
  ------------------
  204|  3.62k|        break;
  205|      0|    case SHA224_DIGEST_LENGTH: {
  ------------------
  |  |   86|      0|#define SHA224_DIGEST_LENGTH 28
  ------------------
  |  Branch (205:5): [True: 0, False: 445k]
  ------------------
  206|      0|        OUTPUT_RESULT(out, SHA224_DIGEST_LENGTH);
  ------------------
  |  |  159|      0|    for (n = 0; n < (len / 8); n++) \
  |  |  ------------------
  |  |  |  Branch (159:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  160|      0|    md = OPENSSL_store_u64_be(md, (uint64_t)c->h[n])
  ------------------
  207|       |        /*
  208|       |         * For 224 bits, there are four bytes left over that have to be
  209|       |         * processed separately.
  210|       |         */
  211|      0|        {
  212|      0|            SHA_LONG64 t = c->h[SHA224_DIGEST_LENGTH / 8];
  ------------------
  |  |   86|      0|#define SHA224_DIGEST_LENGTH 28
  ------------------
  213|       |
  214|      0|            *(out++) = (unsigned char)(t >> 56);
  215|      0|            *(out++) = (unsigned char)(t >> 48);
  216|      0|            *(out++) = (unsigned char)(t >> 40);
  217|      0|            *(out++) = (unsigned char)(t >> 32);
  218|      0|        }
  219|      0|        break;
  220|      0|    }
  221|       |    /* ... as well as make sure md_len is not abused. */
  222|      0|    default:
  ------------------
  |  Branch (222:5): [True: 0, False: 445k]
  ------------------
  223|      0|        return 0;
  224|   445k|    }
  225|       |
  226|   445k|    return 1;
  227|   445k|}
SHA384_Final:
  230|   441k|{
  231|   441k|    return SHA512_Final(md, c);
  232|   441k|}
SHA512_Update_thunk:
  235|   930k|{
  236|   930k|    SHA512_CTX *c = (SHA512_CTX *)cp;
  237|   930k|    SHA_LONG64 l;
  238|   930k|    unsigned char *p = c->u.p;
  239|       |
  240|   930k|    if (len == 0)
  ------------------
  |  Branch (240:9): [True: 0, False: 930k]
  ------------------
  241|      0|        return 1;
  242|       |
  243|   930k|    l = (c->Nl + (((SHA_LONG64)len) << 3)) & U64(0xffffffffffffffff);
  ------------------
  |  |   72|   930k|#define U64(C) C##ULL
  ------------------
  244|   930k|    if (l < c->Nl)
  ------------------
  |  Branch (244:9): [True: 0, False: 930k]
  ------------------
  245|      0|        c->Nh++;
  246|   930k|    if (sizeof(len) >= 8)
  ------------------
  |  Branch (246:9): [True: 930k, Folded]
  ------------------
  247|   930k|        c->Nh += (((SHA_LONG64)len) >> 61);
  248|   930k|    c->Nl = l;
  249|       |
  250|   930k|    if (c->num != 0) {
  ------------------
  |  Branch (250:9): [True: 195k, False: 735k]
  ------------------
  251|   195k|        size_t n = sizeof(c->u) - c->num;
  252|       |
  253|   195k|        if (len < n) {
  ------------------
  |  Branch (253:13): [True: 173k, False: 21.7k]
  ------------------
  254|   173k|            memcpy(p + c->num, data, len), c->num += (unsigned int)len;
  255|   173k|            return 1;
  256|   173k|        } else {
  257|  21.7k|            memcpy(p + c->num, data, n), c->num = 0;
  258|  21.7k|            len -= n, data += n;
  259|  21.7k|            sha512_block_data_order(c, p, 1);
  260|  21.7k|        }
  261|   195k|    }
  262|       |
  263|   756k|    if (len >= sizeof(c->u)) {
  ------------------
  |  Branch (263:9): [True: 380k, False: 376k]
  ------------------
  264|       |#ifndef SHA512_BLOCK_CAN_MANAGE_UNALIGNED_DATA
  265|       |        if ((size_t)data % sizeof(c->u.d[0]) != 0)
  266|       |            while (len >= sizeof(c->u))
  267|       |                memcpy(p, data, sizeof(c->u)),
  268|       |                    sha512_block_data_order(c, p, 1),
  269|       |                    len -= sizeof(c->u), data += sizeof(c->u);
  270|       |        else
  271|       |#endif
  272|   380k|            sha512_block_data_order(c, data, len / sizeof(c->u)),
  273|   380k|                data += len, len %= sizeof(c->u), data -= len;
  274|   380k|    }
  275|       |
  276|   756k|    if (len != 0)
  ------------------
  |  Branch (276:9): [True: 394k, False: 362k]
  ------------------
  277|   394k|        memcpy(p, data, len), c->num = (int)len;
  278|       |
  279|   756k|    return 1;
  280|   930k|}

SHA1_Init:
   67|  10.8k|{
   68|  10.8k|    memset(c, 0, sizeof(*c));
   69|  10.8k|    c->h0 = INIT_DATA_h0;
  ------------------
  |  |   60|  10.8k|#define INIT_DATA_h0 0x67452301UL
  ------------------
   70|  10.8k|    c->h1 = INIT_DATA_h1;
  ------------------
  |  |   61|  10.8k|#define INIT_DATA_h1 0xefcdab89UL
  ------------------
   71|  10.8k|    c->h2 = INIT_DATA_h2;
  ------------------
  |  |   62|  10.8k|#define INIT_DATA_h2 0x98badcfeUL
  ------------------
   72|  10.8k|    c->h3 = INIT_DATA_h3;
  ------------------
  |  |   63|  10.8k|#define INIT_DATA_h3 0x10325476UL
  ------------------
   73|  10.8k|    c->h4 = INIT_DATA_h4;
  ------------------
  |  |   64|  10.8k|#define INIT_DATA_h4 0xc3d2e1f0UL
  ------------------
   74|  10.8k|    return 1;
   75|  10.8k|}

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

EVP_sm3:
   24|      2|{
   25|      2|    return &sm3_md;
   26|      2|}

ossl_sa_new:
   59|     36|{
   60|     36|    OPENSSL_SA *res = OPENSSL_zalloc(sizeof(*res));
  ------------------
  |  |  109|     36|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   61|       |
   62|     36|    return res;
   63|     36|}
ossl_sa_doall_arg:
  146|     24|{
  147|     24|    if (sa != NULL)
  ------------------
  |  Branch (147:9): [True: 24, False: 0]
  ------------------
  148|     24|        sa_doall(sa, NULL, leaf, arg);
  149|     24|}
ossl_sa_num:
  152|     24|{
  153|     24|    return sa == NULL ? 0 : sa->nelem;
  ------------------
  |  Branch (153:12): [True: 0, False: 24]
  ------------------
  154|     24|}
ossl_sa_get:
  157|  4.23M|{
  158|  4.23M|    int level;
  159|  4.23M|    void **p, *r = NULL;
  160|       |
  161|  4.23M|    if (sa == NULL || sa->nelem == 0)
  ------------------
  |  Branch (161:9): [True: 0, False: 4.23M]
  |  Branch (161:23): [True: 20, False: 4.23M]
  ------------------
  162|     20|        return NULL;
  163|       |
  164|  4.23M|    if (n <= sa->top) {
  ------------------
  |  Branch (164:9): [True: 4.23M, False: 368]
  ------------------
  165|  4.23M|        p = sa->nodes;
  166|  9.88M|        for (level = sa->levels - 1; p != NULL && level > 0; level--)
  ------------------
  |  Branch (166:38): [True: 9.80M, False: 73.8k]
  |  Branch (166:51): [True: 5.65M, False: 4.15M]
  ------------------
  167|  5.65M|            p = (void **)p[(n >> (OPENSSL_SA_BLOCK_BITS * level))
  ------------------
  |  |   34|  5.65M|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
  168|  5.65M|                & SA_BLOCK_MASK];
  ------------------
  |  |   46|  5.65M|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|  5.65M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  5.65M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  169|  4.23M|        r = p == NULL ? NULL : p[n & SA_BLOCK_MASK];
  ------------------
  |  |   46|  4.15M|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|  4.15M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  4.15M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (169:13): [True: 73.8k, False: 4.15M]
  ------------------
  170|  4.23M|    }
  171|  4.23M|    return r;
  172|  4.23M|}
ossl_sa_set:
  180|    355|{
  181|    355|    int i, level = 1;
  182|    355|    ossl_uintmax_t n = posn;
  183|    355|    void **p;
  184|       |
  185|    355|    if (sa == NULL)
  ------------------
  |  Branch (185:9): [True: 0, False: 355]
  ------------------
  186|      0|        return 0;
  187|       |
  188|  1.36k|    for (level = 1; level < SA_BLOCK_MAX_LEVELS; level++)
  ------------------
  |  |   47|  1.36k|#define SA_BLOCK_MAX_LEVELS (((int)sizeof(ossl_uintmax_t) * 8 \
  |  |   48|  1.36k|                                 + OPENSSL_SA_BLOCK_BITS - 1) \
  |  |  ------------------
  |  |  |  |   34|  1.36k|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  ------------------
  |  |   49|  1.36k|    / OPENSSL_SA_BLOCK_BITS)
  |  |  ------------------
  |  |  |  |   34|  1.36k|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  ------------------
  ------------------
  |  Branch (188:21): [True: 1.36k, False: 0]
  ------------------
  189|  1.36k|        if ((n >>= OPENSSL_SA_BLOCK_BITS) == 0)
  ------------------
  |  |   34|  1.36k|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
  |  Branch (189:13): [True: 355, False: 1.01k]
  ------------------
  190|    355|            break;
  191|       |
  192|    409|    for (; sa->levels < level; sa->levels++) {
  ------------------
  |  Branch (192:12): [True: 54, False: 355]
  ------------------
  193|     54|        p = alloc_node();
  194|     54|        if (p == NULL)
  ------------------
  |  Branch (194:13): [True: 0, False: 54]
  ------------------
  195|      0|            return 0;
  196|     54|        p[0] = sa->nodes;
  197|     54|        sa->nodes = p;
  198|     54|    }
  199|    355|    if (sa->top < posn)
  ------------------
  |  Branch (199:9): [True: 194, False: 161]
  ------------------
  200|    194|        sa->top = posn;
  201|       |
  202|    355|    p = sa->nodes;
  203|  1.38k|    for (level = sa->levels - 1; level > 0; level--) {
  ------------------
  |  Branch (203:34): [True: 1.03k, False: 355]
  ------------------
  204|  1.03k|        i = (posn >> (OPENSSL_SA_BLOCK_BITS * level)) & SA_BLOCK_MASK;
  ------------------
  |  |   34|  1.03k|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
                      i = (posn >> (OPENSSL_SA_BLOCK_BITS * level)) & SA_BLOCK_MASK;
  ------------------
  |  |   46|  1.03k|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|  1.03k|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.03k|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|  1.03k|        if (p[i] == NULL && (p[i] = alloc_node()) == NULL)
  ------------------
  |  Branch (205:13): [True: 683, False: 348]
  |  Branch (205:29): [True: 0, False: 683]
  ------------------
  206|      0|            return 0;
  207|  1.03k|        p = p[i];
  208|  1.03k|    }
  209|    355|    p += posn & SA_BLOCK_MASK;
  ------------------
  |  |   46|    355|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|    355|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|    355|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  210|    355|    if (val == NULL && *p != NULL)
  ------------------
  |  Branch (210:9): [True: 0, False: 355]
  |  Branch (210:24): [True: 0, False: 0]
  ------------------
  211|      0|        sa->nelem--;
  212|    355|    else if (val != NULL && *p == NULL)
  ------------------
  |  Branch (212:14): [True: 355, False: 0]
  |  Branch (212:29): [True: 349, False: 6]
  ------------------
  213|    349|        sa->nelem++;
  214|    355|    *p = val;
  215|    355|    return 1;
  216|    355|}
sparse_array.c:sa_doall:
   67|     24|{
   68|     24|    int i[SA_BLOCK_MAX_LEVELS];
   69|     24|    void *nodes[SA_BLOCK_MAX_LEVELS];
   70|     24|    ossl_uintmax_t idx = 0;
   71|     24|    int l = 0;
   72|       |
   73|     24|    i[0] = 0;
   74|     24|    nodes[0] = sa->nodes;
   75|  22.0k|    while (l >= 0) {
  ------------------
  |  Branch (75:12): [True: 22.0k, False: 24]
  ------------------
   76|  22.0k|        const int n = i[l];
   77|  22.0k|        void **const p = nodes[l];
   78|       |
   79|  22.0k|        if (n >= SA_BLOCK_MAX) {
  ------------------
  |  |   45|  22.0k|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  ------------------
  |  |  |  |   34|  22.0k|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  ------------------
  ------------------
  |  Branch (79:13): [True: 1.29k, False: 20.7k]
  ------------------
   80|  1.29k|            if (p != NULL && node != NULL)
  ------------------
  |  Branch (80:17): [True: 1.29k, False: 0]
  |  Branch (80:30): [True: 0, False: 1.29k]
  ------------------
   81|      0|                (*node)(p);
   82|  1.29k|            l--;
   83|  1.29k|            idx >>= OPENSSL_SA_BLOCK_BITS;
  ------------------
  |  |   34|  1.29k|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
   84|  20.7k|        } else {
   85|  20.7k|            i[l] = n + 1;
   86|  20.7k|            if (p != NULL && p[n] != NULL) {
  ------------------
  |  Branch (86:17): [True: 20.7k, False: 0]
  |  Branch (86:30): [True: 1.93k, False: 18.7k]
  ------------------
   87|  1.93k|                idx = (idx & ~SA_BLOCK_MASK) | n;
  ------------------
  |  |   46|  1.93k|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|  1.93k|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.93k|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   88|  1.93k|                if (l < sa->levels - 1) {
  ------------------
  |  Branch (88:21): [True: 1.27k, False: 666]
  ------------------
   89|  1.27k|                    i[++l] = 0;
   90|  1.27k|                    nodes[l] = p[n];
   91|  1.27k|                    idx <<= OPENSSL_SA_BLOCK_BITS;
  ------------------
  |  |   34|  1.27k|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
   92|  1.27k|                } else if (leaf != NULL) {
  ------------------
  |  Branch (92:28): [True: 666, False: 0]
  ------------------
   93|    666|                    (*leaf)(idx, p[n], arg);
   94|    666|                }
   95|  1.93k|            }
   96|  20.7k|        }
   97|  22.0k|    }
   98|     24|}
sparse_array.c:alloc_node:
  175|    737|{
  176|    737|    return OPENSSL_calloc(SA_BLOCK_MAX, sizeof(void *));
  ------------------
  |  |  113|    737|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  177|    737|}

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:
   40|  7.36k|{
   41|  7.36k|    OPENSSL_sk_compfunc old = sk->comp;
   42|       |
   43|  7.36k|    if (sk->comp != c && sk->num > 1)
  ------------------
  |  Branch (43:9): [True: 7.36k, False: 0]
  |  Branch (43:26): [True: 7.36k, False: 0]
  ------------------
   44|  7.36k|        sk->sorted = 0;
   45|  7.36k|    sk->comp = c;
   46|       |
   47|  7.36k|    return old;
   48|  7.36k|}
OPENSSL_sk_deep_copy:
  101|  29.3k|{
  102|  29.3k|    return internal_copy(sk, copy_func, free_func);
  103|  29.3k|}
OPENSSL_sk_dup:
  106|   206k|{
  107|   206k|    return internal_copy(sk, NULL, NULL);
  108|   206k|}
OPENSSL_sk_new_null:
  111|   498k|{
  112|       |    return OPENSSL_sk_new_reserve(NULL, 0);
  113|   498k|}
OPENSSL_sk_new:
  116|  14.6k|{
  117|  14.6k|    return OPENSSL_sk_new_reserve(c, 0);
  118|  14.6k|}
OPENSSL_sk_new_reserve:
  212|   513k|{
  213|   513k|    OPENSSL_STACK *st = OPENSSL_zalloc(sizeof(OPENSSL_STACK));
  ------------------
  |  |  109|   513k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  214|       |
  215|   513k|    if (st == NULL)
  ------------------
  |  Branch (215:9): [True: 0, False: 513k]
  ------------------
  216|      0|        return NULL;
  217|       |
  218|   513k|    st->comp = c;
  219|   513k|    st->sorted = 1; /* empty or single-element stack is considered sorted */
  220|       |
  221|   513k|    if (n <= 0)
  ------------------
  |  Branch (221:9): [True: 513k, False: 24]
  ------------------
  222|   513k|        return st;
  223|       |
  224|     24|    if (!sk_reserve(st, n, 1)) {
  ------------------
  |  Branch (224:9): [True: 0, False: 24]
  ------------------
  225|      0|        OPENSSL_sk_free(st);
  226|      0|        return NULL;
  227|      0|    }
  228|       |
  229|     24|    return st;
  230|     24|}
OPENSSL_sk_set_thunks:
  245|   551k|{
  246|   551k|    if (st != NULL)
  ------------------
  |  Branch (246:9): [True: 346k, False: 204k]
  ------------------
  247|   346k|        st->free_thunk = f_thunk;
  248|       |
  249|   551k|    return st;
  250|   551k|}
OPENSSL_sk_set_cmp_thunks:
  253|  14.6k|{
  254|  14.6k|    if (st != NULL)
  ------------------
  |  Branch (254:9): [True: 14.6k, False: 0]
  ------------------
  255|  14.6k|        st->cmp_thunk = c_thunk;
  256|       |
  257|  14.6k|    return st;
  258|  14.6k|}
OPENSSL_sk_insert:
  261|  1.12M|{
  262|  1.12M|    int cmp_ret;
  263|       |
  264|  1.12M|    if (st == NULL) {
  ------------------
  |  Branch (264:9): [True: 0, False: 1.12M]
  ------------------
  265|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  266|      0|        return 0;
  267|      0|    }
  268|  1.12M|    if (st->num == max_nodes) {
  ------------------
  |  Branch (268:9): [True: 0, False: 1.12M]
  ------------------
  269|      0|        ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_MANY_RECORDS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  270|      0|        return 0;
  271|      0|    }
  272|       |
  273|  1.12M|    if (!sk_reserve(st, 1, 0))
  ------------------
  |  Branch (273:9): [True: 0, False: 1.12M]
  ------------------
  274|      0|        return 0;
  275|       |
  276|  1.12M|    if ((loc >= st->num) || (loc < 0)) {
  ------------------
  |  Branch (276:9): [True: 1.11M, False: 10.8k]
  |  Branch (276:29): [True: 10.8k, False: 0]
  ------------------
  277|  1.12M|        loc = st->num;
  278|  1.12M|        st->data[loc] = data;
  279|  1.12M|    } else {
  280|      0|        memmove(&st->data[loc + 1], &st->data[loc],
  281|      0|            sizeof(st->data[0]) * (st->num - loc));
  282|      0|        st->data[loc] = data;
  283|      0|    }
  284|  1.12M|    st->num++;
  285|  1.12M|    if (st->sorted && st->num > 1) {
  ------------------
  |  Branch (285:9): [True: 248k, False: 874k]
  |  Branch (285:23): [True: 44.3k, False: 204k]
  ------------------
  286|  44.3k|        if (st->comp != NULL) {
  ------------------
  |  Branch (286:13): [True: 265, False: 44.0k]
  ------------------
  287|    265|            if (loc > 0) {
  ------------------
  |  Branch (287:17): [True: 265, False: 0]
  ------------------
  288|    265|                cmp_ret = cmp_with_thunk(st, &st->data[loc - 1], &st->data[loc]);
  289|    265|                if (cmp_ret > 0)
  ------------------
  |  Branch (289:21): [True: 0, False: 265]
  ------------------
  290|      0|                    st->sorted = 0;
  291|    265|            }
  292|    265|            if (loc < st->num - 1) {
  ------------------
  |  Branch (292:17): [True: 0, False: 265]
  ------------------
  293|      0|                cmp_ret = cmp_with_thunk(st, &st->data[loc + 1], &st->data[loc]);
  294|      0|                if (cmp_ret < 0)
  ------------------
  |  Branch (294:21): [True: 0, False: 0]
  ------------------
  295|      0|                    st->sorted = 0;
  296|      0|            }
  297|  44.0k|        } else {
  298|  44.0k|            st->sorted = 0;
  299|  44.0k|        }
  300|  44.3k|    }
  301|  1.12M|    return st->num;
  302|  1.12M|}
OPENSSL_sk_find:
  408|  14.6k|{
  409|  14.6k|    return internal_find(st, data, OSSL_BSEARCH_FIRST_VALUE_ON_MATCH, NULL);
  ------------------
  |  |  150|  14.6k|#define OSSL_BSEARCH_FIRST_VALUE_ON_MATCH 0x02
  ------------------
  410|  14.6k|}
OPENSSL_sk_find_all:
  418|  3.55k|{
  419|  3.55k|    return internal_find(st, data, OSSL_BSEARCH_FIRST_VALUE_ON_MATCH, pnum);
  ------------------
  |  |  150|  3.55k|#define OSSL_BSEARCH_FIRST_VALUE_ON_MATCH 0x02
  ------------------
  420|  3.55k|}
OPENSSL_sk_push:
  423|  1.11M|{
  424|  1.11M|    if (st == NULL)
  ------------------
  |  Branch (424:9): [True: 0, False: 1.11M]
  ------------------
  425|      0|        return 0;
  426|  1.11M|    return OPENSSL_sk_insert(st, data, st->num);
  427|  1.11M|}
OPENSSL_sk_pop:
  442|  7.25k|{
  443|  7.25k|    if (st == NULL || st->num == 0)
  ------------------
  |  Branch (443:9): [True: 0, False: 7.25k]
  |  Branch (443:23): [True: 0, False: 7.25k]
  ------------------
  444|      0|        return NULL;
  445|  7.25k|    return internal_delete(st, st->num - 1);
  446|  7.25k|}
OPENSSL_sk_pop_free:
  457|   874k|{
  458|   874k|    int i;
  459|       |
  460|   874k|    if (st == NULL)
  ------------------
  |  Branch (460:9): [True: 659k, False: 214k]
  ------------------
  461|   659k|        return;
  462|       |
  463|   725k|    for (i = 0; i < st->num; i++) {
  ------------------
  |  Branch (463:17): [True: 510k, False: 214k]
  ------------------
  464|   510k|        if (st->data[i] != NULL) {
  ------------------
  |  Branch (464:13): [True: 510k, False: 0]
  ------------------
  465|   510k|            if (st->free_thunk != NULL)
  ------------------
  |  Branch (465:17): [True: 507k, False: 3.55k]
  ------------------
  466|   507k|                st->free_thunk(func, (void *)st->data[i]);
  467|  3.55k|            else
  468|  3.55k|                func((void *)st->data[i]);
  469|   510k|        }
  470|   510k|    }
  471|   214k|    OPENSSL_sk_free(st);
  472|   214k|}
OPENSSL_sk_free:
  475|   975k|{
  476|   975k|    if (st == NULL)
  ------------------
  |  Branch (476:9): [True: 462k, False: 512k]
  ------------------
  477|   462k|        return;
  478|   512k|    OPENSSL_free(st->data);
  ------------------
  |  |  132|   512k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  479|   512k|    OPENSSL_free(st);
  ------------------
  |  |  132|   512k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  480|   512k|}
OPENSSL_sk_num:
  483|  3.70M|{
  484|  3.70M|    return st == NULL ? -1 : st->num;
  ------------------
  |  Branch (484:12): [True: 731k, False: 2.97M]
  ------------------
  485|  3.70M|}
OPENSSL_sk_value:
  488|  2.86M|{
  489|  2.86M|    if (st == NULL || i < 0 || i >= st->num)
  ------------------
  |  Branch (489:9): [True: 0, False: 2.86M]
  |  Branch (489:23): [True: 0, False: 2.86M]
  |  Branch (489:32): [True: 0, False: 2.86M]
  ------------------
  490|      0|        return NULL;
  491|  2.86M|    return (void *)st->data[i];
  492|  2.86M|}
OPENSSL_sk_set:
  495|  32.6k|{
  496|  32.6k|    if (st == NULL) {
  ------------------
  |  Branch (496:9): [True: 0, False: 32.6k]
  ------------------
  497|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  498|      0|        return NULL;
  499|      0|    }
  500|  32.6k|    if (i < 0 || i >= st->num) {
  ------------------
  |  Branch (500:9): [True: 0, False: 32.6k]
  |  Branch (500:18): [True: 0, False: 32.6k]
  ------------------
  501|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |   68|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  311|      0|#define ERR_R_PASSED_INVALID_ARGUMENT (262 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  502|      0|            "i=%d", i);
  503|      0|        return NULL;
  504|      0|    }
  505|  32.6k|    st->data[i] = data;
  506|  32.6k|    st->sorted = st->num <= 1;
  507|  32.6k|    return (void *)st->data[i];
  508|  32.6k|}
OPENSSL_sk_sort:
  511|  7.51k|{
  512|  7.51k|    if (st != NULL && !st->sorted && st->comp != NULL) {
  ------------------
  |  Branch (512:9): [True: 7.51k, False: 0]
  |  Branch (512:23): [True: 7.36k, False: 154]
  |  Branch (512:38): [True: 7.36k, False: 0]
  ------------------
  513|  7.36k|        if (st->num > 1)
  ------------------
  |  Branch (513:13): [True: 7.36k, False: 0]
  ------------------
  514|  7.36k|            qsort(st->data, st->num, sizeof(void *), st->comp);
  515|  7.36k|        st->sorted = 1; /* empty or single-element stack is considered sorted */
  516|  7.36k|    }
  517|  7.51k|}
stack.c:internal_copy:
   53|   235k|{
   54|   235k|    OPENSSL_STACK *ret;
   55|   235k|    int i;
   56|       |
   57|   235k|    if ((ret = OPENSSL_sk_new_null()) == NULL)
  ------------------
  |  Branch (57:9): [True: 0, False: 235k]
  ------------------
   58|      0|        goto err;
   59|       |
   60|   235k|    if (sk == NULL)
  ------------------
  |  Branch (60:9): [True: 1, False: 235k]
  ------------------
   61|      1|        goto done;
   62|       |
   63|       |    /* direct structure assignment */
   64|   235k|    *ret = *sk;
   65|   235k|    ret->data = NULL;
   66|   235k|    ret->num_alloc = 0;
   67|       |
   68|   235k|    if (ret->num == 0)
  ------------------
  |  Branch (68:9): [True: 0, False: 235k]
  ------------------
   69|      0|        goto done; /* nothing to copy */
   70|       |
   71|   235k|    ret->num_alloc = ret->num > min_nodes ? ret->num : min_nodes;
  ------------------
  |  Branch (71:22): [True: 25.7k, False: 209k]
  ------------------
   72|   235k|    ret->data = OPENSSL_calloc(ret->num_alloc, sizeof(*ret->data));
  ------------------
  |  |  113|   235k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   73|   235k|    if (ret->data == NULL)
  ------------------
  |  Branch (73:9): [True: 0, False: 235k]
  ------------------
   74|      0|        goto err;
   75|   235k|    if (copy_func == NULL) {
  ------------------
  |  Branch (75:9): [True: 206k, False: 29.3k]
  ------------------
   76|   206k|        memcpy(ret->data, sk->data, sizeof(*ret->data) * ret->num);
   77|   206k|    } else {
   78|   408k|        for (i = 0; i < ret->num; ++i) {
  ------------------
  |  Branch (78:21): [True: 378k, False: 29.3k]
  ------------------
   79|   378k|            if (sk->data[i] == NULL)
  ------------------
  |  Branch (79:17): [True: 0, False: 378k]
  ------------------
   80|      0|                continue;
   81|   378k|            if ((ret->data[i] = copy_func(sk->data[i])) == NULL) {
  ------------------
  |  Branch (81:17): [True: 0, False: 378k]
  ------------------
   82|      0|                while (--i >= 0)
  ------------------
  |  Branch (82:24): [True: 0, False: 0]
  ------------------
   83|      0|                    if (ret->data[i] != NULL)
  ------------------
  |  Branch (83:25): [True: 0, False: 0]
  ------------------
   84|      0|                        free_func((void *)ret->data[i]);
   85|      0|                goto err;
   86|      0|            }
   87|   378k|        }
   88|  29.3k|    }
   89|       |
   90|   235k|done:
   91|   235k|    return ret;
   92|       |
   93|      0|err:
   94|      0|    OPENSSL_sk_free(ret);
   95|       |    return NULL;
   96|   235k|}
stack.c:sk_reserve:
  158|  1.12M|{
  159|  1.12M|    const void **tmpdata;
  160|  1.12M|    int num_alloc;
  161|       |
  162|       |    /* Check to see the reservation isn't exceeding the hard limit */
  163|  1.12M|    if (n > max_nodes - st->num) {
  ------------------
  |  Branch (163:9): [True: 0, False: 1.12M]
  ------------------
  164|      0|        ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_MANY_RECORDS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  165|      0|        return 0;
  166|      0|    }
  167|       |
  168|       |    /* Figure out the new size */
  169|  1.12M|    num_alloc = st->num + n;
  170|  1.12M|    if (num_alloc < min_nodes)
  ------------------
  |  Branch (170:9): [True: 288k, False: 834k]
  ------------------
  171|   288k|        num_alloc = min_nodes;
  172|       |
  173|       |    /* If |st->data| allocation was postponed */
  174|  1.12M|    if (st->data == NULL) {
  ------------------
  |  Branch (174:9): [True: 204k, False: 919k]
  ------------------
  175|       |        /*
  176|       |         * At this point, |st->num_alloc| and |st->num| are 0;
  177|       |         * so |num_alloc| value is |n| or |min_nodes| if greater than |n|.
  178|       |         */
  179|   204k|        if ((st->data = OPENSSL_calloc(num_alloc, sizeof(void *))) == NULL)
  ------------------
  |  |  113|   204k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (179:13): [True: 0, False: 204k]
  ------------------
  180|      0|            return 0;
  181|   204k|        st->num_alloc = num_alloc;
  182|   204k|        return 1;
  183|   204k|    }
  184|       |
  185|   919k|    if (!exact) {
  ------------------
  |  Branch (185:9): [True: 919k, False: 0]
  ------------------
  186|   919k|        if (num_alloc <= st->num_alloc)
  ------------------
  |  Branch (186:13): [True: 784k, False: 135k]
  ------------------
  187|   784k|            return 1;
  188|   135k|        num_alloc = compute_growth(num_alloc, st->num_alloc);
  189|   135k|        if (num_alloc == 0) {
  ------------------
  |  Branch (189:13): [True: 0, False: 135k]
  ------------------
  190|      0|            ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_MANY_RECORDS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  191|      0|            return 0;
  192|      0|        }
  193|   135k|    } else if (num_alloc == st->num_alloc) {
  ------------------
  |  Branch (193:16): [True: 0, False: 0]
  ------------------
  194|      0|        return 1;
  195|      0|    }
  196|       |
  197|   135k|    tmpdata = OPENSSL_realloc_array((void *)st->data, num_alloc, sizeof(void *));
  ------------------
  |  |  125|   135k|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  198|   135k|    if (tmpdata == NULL)
  ------------------
  |  Branch (198:9): [True: 0, False: 135k]
  ------------------
  199|      0|        return 0;
  200|       |
  201|   135k|    st->data = tmpdata;
  202|   135k|    st->num_alloc = num_alloc;
  203|   135k|    return 1;
  204|   135k|}
stack.c:compute_growth:
  140|   135k|{
  141|   135k|    int err = 0;
  142|       |
  143|   270k|    while (current < target) {
  ------------------
  |  Branch (143:12): [True: 135k, False: 135k]
  ------------------
  144|   135k|        if (current >= max_nodes)
  ------------------
  |  Branch (144:13): [True: 0, False: 135k]
  ------------------
  145|      0|            return 0;
  146|       |
  147|   135k|        current = safe_muldiv_int(current, 8, 5, &err);
  148|   135k|        if (err != 0)
  ------------------
  |  Branch (148:13): [True: 0, False: 135k]
  ------------------
  149|      0|            return 0;
  150|   135k|        if (current >= max_nodes)
  ------------------
  |  Branch (150:13): [True: 0, False: 135k]
  ------------------
  151|      0|            current = max_nodes;
  152|   135k|    }
  153|   135k|    return current;
  154|   135k|}
stack.c:cmp_with_thunk:
  207|    265|{
  208|    265|    return (st->cmp_thunk == NULL) ? st->comp(a, b) : st->cmp_thunk(st->comp, a, b);
  ------------------
  |  Branch (208:12): [True: 0, False: 265]
  ------------------
  209|    265|}
stack.c:internal_delete:
  305|  7.25k|{
  306|  7.25k|    const void *ret = st->data[loc];
  307|       |
  308|  7.25k|    if (loc != st->num - 1)
  ------------------
  |  Branch (308:9): [True: 0, False: 7.25k]
  ------------------
  309|      0|        memmove(&st->data[loc], &st->data[loc + 1],
  310|      0|            sizeof(st->data[0]) * (st->num - loc - 1));
  311|  7.25k|    st->num--;
  312|  7.25k|    st->sorted = st->sorted || st->num <= 1;
  ------------------
  |  Branch (312:18): [True: 7.25k, False: 0]
  |  Branch (312:32): [True: 0, False: 0]
  ------------------
  313|       |
  314|  7.25k|    return (void *)ret;
  315|  7.25k|}
stack.c:internal_find:
  340|  18.1k|{
  341|  18.1k|    const void *r;
  342|  18.1k|    int i, count = 0;
  343|  18.1k|    int cmp_ret;
  344|  18.1k|    int *pnum = pnum_matched;
  345|       |
  346|  18.1k|    if (st == NULL || st->num == 0)
  ------------------
  |  Branch (346:9): [True: 0, False: 18.1k]
  |  Branch (346:23): [True: 0, False: 18.1k]
  ------------------
  347|      0|        return -1;
  348|       |
  349|  18.1k|    if (pnum == NULL)
  ------------------
  |  Branch (349:9): [True: 18.1k, False: 0]
  ------------------
  350|  18.1k|        pnum = &count;
  351|       |
  352|  18.1k|    if (st->comp == NULL) {
  ------------------
  |  Branch (352:9): [True: 3.62k, False: 14.5k]
  ------------------
  353|  3.62k|        for (i = 0; i < st->num; i++)
  ------------------
  |  Branch (353:21): [True: 3.62k, False: 0]
  ------------------
  354|  3.62k|            if (st->data[i] == data) {
  ------------------
  |  Branch (354:17): [True: 3.62k, False: 0]
  ------------------
  355|  3.62k|                *pnum = 1;
  356|  3.62k|                return i;
  357|  3.62k|            }
  358|      0|        *pnum = 0;
  359|      0|        return -1;
  360|  3.62k|    }
  361|       |
  362|  14.5k|    if (data == NULL)
  ------------------
  |  Branch (362:9): [True: 0, False: 14.5k]
  ------------------
  363|      0|        return -1;
  364|       |
  365|  14.5k|    if (!st->sorted) {
  ------------------
  |  Branch (365:9): [True: 0, False: 14.5k]
  ------------------
  366|      0|        int res = -1;
  367|       |
  368|      0|        for (i = 0; i < st->num; i++) {
  ------------------
  |  Branch (368:21): [True: 0, False: 0]
  ------------------
  369|      0|            cmp_ret = cmp_with_thunk(st, &data, st->data + i);
  370|      0|            if (cmp_ret == 0) {
  ------------------
  |  Branch (370:17): [True: 0, False: 0]
  ------------------
  371|      0|                if (res == -1)
  ------------------
  |  Branch (371:21): [True: 0, False: 0]
  ------------------
  372|      0|                    res = i;
  373|      0|                ++*pnum;
  374|       |                /* Check if only one result is wanted and exit if so */
  375|      0|                if (pnum_matched == NULL)
  ------------------
  |  Branch (375:21): [True: 0, False: 0]
  ------------------
  376|      0|                    return i;
  377|      0|            }
  378|      0|        }
  379|      0|        if (res == -1)
  ------------------
  |  Branch (379:13): [True: 0, False: 0]
  ------------------
  380|      0|            *pnum = 0;
  381|      0|        return res;
  382|      0|    }
  383|       |
  384|  14.5k|    if (pnum_matched != NULL)
  ------------------
  |  Branch (384:9): [True: 0, False: 14.5k]
  ------------------
  385|      0|        ret_val_options |= OSSL_BSEARCH_FIRST_VALUE_ON_MATCH;
  ------------------
  |  |  150|      0|#define OSSL_BSEARCH_FIRST_VALUE_ON_MATCH 0x02
  ------------------
  386|  14.5k|    r = ossl_bsearch(&data, st->data, st->num, sizeof(void *), st->comp, st->cmp_thunk,
  387|  14.5k|        ret_val_options);
  388|       |
  389|  14.5k|    if (pnum_matched != NULL) {
  ------------------
  |  Branch (389:9): [True: 0, False: 14.5k]
  ------------------
  390|      0|        *pnum = 0;
  391|      0|        if (r != NULL) {
  ------------------
  |  Branch (391:13): [True: 0, False: 0]
  ------------------
  392|      0|            const void **p = (const void **)r;
  393|       |
  394|      0|            while (p < st->data + st->num) {
  ------------------
  |  Branch (394:20): [True: 0, False: 0]
  ------------------
  395|      0|                cmp_ret = cmp_with_thunk(st, &data, p);
  396|      0|                if (cmp_ret != 0)
  ------------------
  |  Branch (396:21): [True: 0, False: 0]
  ------------------
  397|      0|                    break;
  398|      0|                ++*pnum;
  399|      0|                ++p;
  400|      0|            }
  401|      0|        }
  402|      0|    }
  403|       |
  404|  14.5k|    return r == NULL ? -1 : (int)((const void **)r - st->data);
  ------------------
  |  Branch (404:12): [True: 0, False: 14.5k]
  ------------------
  405|  14.5k|}

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

ossl_crypto_mutex_new:
   97|      2|{
   98|      2|    pthread_mutex_t *mutex;
   99|       |
  100|      2|    if ((mutex = OPENSSL_zalloc(sizeof(*mutex))) == NULL)
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (100:9): [True: 0, False: 2]
  ------------------
  101|      0|        return NULL;
  102|      2|    if (pthread_mutex_init(mutex, NULL) != 0) {
  ------------------
  |  Branch (102:9): [True: 0, False: 2]
  ------------------
  103|      0|        OPENSSL_free(mutex);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  104|      0|        return NULL;
  105|      0|    }
  106|      2|    return (CRYPTO_MUTEX *)mutex;
  107|      2|}
ossl_crypto_condvar_new:
  156|      2|{
  157|      2|    pthread_cond_t *cv_p;
  158|       |
  159|      2|    if ((cv_p = OPENSSL_zalloc(sizeof(*cv_p))) == NULL)
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (159:9): [True: 0, False: 2]
  ------------------
  160|      0|        return NULL;
  161|      2|    if (pthread_cond_init(cv_p, NULL) != 0) {
  ------------------
  |  Branch (161:9): [True: 0, False: 2]
  ------------------
  162|      0|        OPENSSL_free(cv_p);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  163|      0|        return NULL;
  164|      0|    }
  165|      2|    return (CRYPTO_CONDVAR *)cv_p;
  166|      2|}

ossl_threads_ctx_new:
  128|      2|{
  129|      2|    struct openssl_threads_st *t = OPENSSL_zalloc(sizeof(*t));
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  130|       |
  131|      2|    if (t == NULL)
  ------------------
  |  Branch (131:9): [True: 0, False: 2]
  ------------------
  132|      0|        return NULL;
  133|       |
  134|      2|    t->lock = ossl_crypto_mutex_new();
  135|      2|    t->cond_finished = ossl_crypto_condvar_new();
  136|       |
  137|      2|    if (t->lock == NULL || t->cond_finished == NULL)
  ------------------
  |  Branch (137:9): [True: 0, False: 2]
  |  Branch (137:28): [True: 0, False: 2]
  ------------------
  138|      0|        goto fail;
  139|       |
  140|      2|    return t;
  141|       |
  142|      0|fail:
  143|      0|    ossl_threads_ctx_free((void *)t);
  144|       |    return NULL;
  145|      2|}

CRYPTO_THREAD_get_local_ex:
  259|  2.94M|{
  260|  2.94M|    MASTER_KEY_ENTRY *mkey;
  261|  2.94M|    CTX_TABLE_ENTRY ctxd;
  262|       |
  263|  2.94M|    ctx = (ctx == CRYPTO_THREAD_NO_CONTEXT) ? NULL : ossl_lib_ctx_get_concrete(ctx);
  ------------------
  |  |   42|  2.94M|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  |  Branch (263:11): [True: 2.82M, False: 114k]
  ------------------
  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|  2.94M|    if (!CRYPTO_THREAD_run_once(&master_once, init_master_key))
  ------------------
  |  Branch (276:9): [True: 0, False: 2.94M]
  ------------------
  277|      0|        return NULL;
  278|       |
  279|  2.94M|    if (!ossl_assert(id < CRYPTO_THREAD_LOCAL_KEY_MAX))
  ------------------
  |  |   52|  2.94M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  2.94M|    __FILE__, __LINE__)
  ------------------
  |  Branch (279:9): [True: 0, False: 2.94M]
  ------------------
  280|      0|        return NULL;
  281|       |
  282|       |    /*
  283|       |     * Get our master table sparse array, indexed by key id
  284|       |     */
  285|  2.94M|    mkey = CRYPTO_THREAD_get_local(&master_key);
  286|  2.94M|    if (mkey == NULL)
  ------------------
  |  Branch (286:9): [True: 2, False: 2.94M]
  ------------------
  287|      2|        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|  2.94M|    if (mkey[id].ctx_table == NULL)
  ------------------
  |  Branch (293:9): [True: 3, False: 2.94M]
  ------------------
  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|  2.94M|    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|  2.94M|    return ctxd;
  310|  2.94M|}
CRYPTO_THREAD_set_local_ex:
  338|     10|{
  339|     10|    MASTER_KEY_ENTRY *mkey;
  340|       |
  341|     10|    ctx = (ctx == CRYPTO_THREAD_NO_CONTEXT) ? NULL : ossl_lib_ctx_get_concrete(ctx);
  ------------------
  |  |   42|     10|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  |  Branch (341:11): [True: 8, False: 2]
  ------------------
  342|       |    /*
  343|       |     * Make sure our master key is initialized
  344|       |     * See notes above on the use of CRYPTO_THREAD_run_once here
  345|       |     */
  346|     10|    if (!CRYPTO_THREAD_run_once(&master_once, init_master_key))
  ------------------
  |  Branch (346:9): [True: 0, False: 10]
  ------------------
  347|      0|        return 0;
  348|       |
  349|     10|    if (!ossl_assert(id < CRYPTO_THREAD_LOCAL_KEY_MAX))
  ------------------
  |  |   52|     10|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|     10|    __FILE__, __LINE__)
  ------------------
  |  Branch (349:9): [True: 0, False: 10]
  ------------------
  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|     10|    mkey = CRYPTO_THREAD_get_local(&master_key);
  357|     10|    if (mkey == NULL) {
  ------------------
  |  Branch (357:9): [True: 2, False: 8]
  ------------------
  358|       |        /*
  359|       |         * we didn't find one, but that's ok, just initialize it now
  360|       |         */
  361|      2|        mkey = OPENSSL_calloc(CRYPTO_THREAD_LOCAL_KEY_MAX,
  ------------------
  |  |  113|      2|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  362|      2|            sizeof(MASTER_KEY_ENTRY));
  363|      2|        if (mkey == NULL)
  ------------------
  |  Branch (363:13): [True: 0, False: 2]
  ------------------
  364|      0|            return 0;
  365|       |        /*
  366|       |         * make sure to assign it to our master key thread-local storage
  367|       |         */
  368|      2|        if (!CRYPTO_THREAD_set_local(&master_key, mkey)) {
  ------------------
  |  Branch (368:13): [True: 0, False: 2]
  ------------------
  369|      0|            OPENSSL_free(mkey);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  370|      0|            return 0;
  371|      0|        }
  372|      2|    }
  373|       |
  374|       |    /*
  375|       |     * Find the entry that we are looking for using our id index
  376|       |     */
  377|     10|    if (mkey[id].ctx_table == NULL) {
  ------------------
  |  Branch (377:9): [True: 4, False: 6]
  ------------------
  378|       |
  379|       |        /*
  380|       |         * Didn't find it, that's ok, just add it now
  381|       |         */
  382|      4|        mkey[id].ctx_table = ossl_sa_CTX_TABLE_ENTRY_new();
  383|      4|        if (mkey[id].ctx_table == NULL)
  ------------------
  |  Branch (383:13): [True: 0, False: 4]
  ------------------
  384|      0|            return 0;
  385|      4|    }
  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|     10|    return ossl_sa_CTX_TABLE_ENTRY_set(mkey[id].ctx_table,
  395|     10|        (uintptr_t)ctx, data);
  396|     10|}
threads_common.c:init_master_key:
  216|      2|{
  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|      2|    if (!CRYPTO_THREAD_init_local(&master_key, clean_master_key))
  ------------------
  |  Branch (228:9): [True: 0, False: 2]
  ------------------
  229|      0|        return;
  230|       |
  231|       |    /*
  232|       |     * Indicate that the key has been set up.
  233|       |     */
  234|      2|    master_key_init = 1;
  235|      2|}

ossl_rcu_uptr_deref:
  557|  4.68M|{
  558|  4.68M|    return ATOMIC_LOAD_N(pvoid, p, __ATOMIC_ACQUIRE);
  ------------------
  |  |  122|  4.68M|#define ATOMIC_LOAD_N(t, p, o) __atomic_load_n(p, o)
  ------------------
  559|  4.68M|}
ossl_rcu_assign_uptr:
  562|    638|{
  563|    638|    ATOMIC_STORE(pvoid, p, v, __ATOMIC_RELEASE);
  ------------------
  |  |  124|    638|#define ATOMIC_STORE(t, p, v, o) __atomic_store(p, v, o)
  ------------------
  564|    638|}
ossl_rcu_lock_new:
  567|      2|{
  568|      2|    struct rcu_lock_st *new;
  569|      2|    pthread_mutex_t *mutexes[3] = { NULL };
  570|      2|    pthread_cond_t *conds[2] = { NULL };
  571|      2|    int i;
  572|       |
  573|       |    /*
  574|       |     * We need a minimum of 2 qp's
  575|       |     */
  576|      2|    if (num_writers < 2)
  ------------------
  |  Branch (576:9): [True: 2, False: 0]
  ------------------
  577|      2|        num_writers = 2;
  578|       |
  579|      2|    ctx = ossl_lib_ctx_get_concrete(ctx);
  580|      2|    if (ctx == NULL)
  ------------------
  |  Branch (580:9): [True: 0, False: 2]
  ------------------
  581|      0|        return 0;
  582|       |
  583|      2|    new = OPENSSL_zalloc(sizeof(*new));
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  584|      2|    if (new == NULL)
  ------------------
  |  Branch (584:9): [True: 0, False: 2]
  ------------------
  585|      0|        return NULL;
  586|       |
  587|      2|    new->ctx = ctx;
  588|      2|    i = 0;
  589|      2|    mutexes[i] = pthread_mutex_init(&new->write_lock, NULL) == 0 ? &new->write_lock : NULL;
  ------------------
  |  Branch (589:18): [True: 2, False: 0]
  ------------------
  590|      2|    if (mutexes[i++] == NULL)
  ------------------
  |  Branch (590:9): [True: 0, False: 2]
  ------------------
  591|      0|        goto err;
  592|      2|    mutexes[i] = pthread_mutex_init(&new->prior_lock, NULL) == 0 ? &new->prior_lock : NULL;
  ------------------
  |  Branch (592:18): [True: 2, False: 0]
  ------------------
  593|      2|    if (mutexes[i++] == NULL)
  ------------------
  |  Branch (593:9): [True: 0, False: 2]
  ------------------
  594|      0|        goto err;
  595|      2|    mutexes[i] = pthread_mutex_init(&new->alloc_lock, NULL) == 0 ? &new->alloc_lock : NULL;
  ------------------
  |  Branch (595:18): [True: 2, False: 0]
  ------------------
  596|      2|    if (mutexes[i++] == NULL)
  ------------------
  |  Branch (596:9): [True: 0, False: 2]
  ------------------
  597|      0|        goto err;
  598|      2|    conds[i - 3] = pthread_cond_init(&new->prior_signal, NULL) == 0 ? &new->prior_signal : NULL;
  ------------------
  |  Branch (598:20): [True: 2, False: 0]
  ------------------
  599|      2|    if (conds[i - 3] == NULL)
  ------------------
  |  Branch (599:9): [True: 0, False: 2]
  ------------------
  600|      0|        goto err;
  601|      2|    i++;
  602|      2|    conds[i - 3] = pthread_cond_init(&new->alloc_signal, NULL) == 0 ? &new->alloc_signal : NULL;
  ------------------
  |  Branch (602:20): [True: 2, False: 0]
  ------------------
  603|      2|    if (conds[i - 3] == NULL)
  ------------------
  |  Branch (603:9): [True: 0, False: 2]
  ------------------
  604|      0|        goto err;
  605|      2|    i++;
  606|      2|    new->qp_group = allocate_new_qp_group(new, num_writers);
  607|      2|    if (new->qp_group == NULL)
  ------------------
  |  Branch (607:9): [True: 0, False: 2]
  ------------------
  608|      0|        goto err;
  609|       |
  610|      2|    return new;
  611|       |
  612|      0|err:
  613|      0|    for (i = 0; i < 3; i++)
  ------------------
  |  Branch (613:17): [True: 0, False: 0]
  ------------------
  614|      0|        if (mutexes[i] != NULL)
  ------------------
  |  Branch (614:13): [True: 0, False: 0]
  ------------------
  615|      0|            pthread_mutex_destroy(mutexes[i]);
  616|      0|    for (i = 0; i < 2; i++)
  ------------------
  |  Branch (616:17): [True: 0, False: 0]
  ------------------
  617|      0|        if (conds[i] != NULL)
  ------------------
  |  Branch (617:13): [True: 0, False: 0]
  ------------------
  618|      0|            pthread_cond_destroy(conds[i]);
  619|      0|    OPENSSL_free(new->qp_group);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  620|      0|    OPENSSL_free(new);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  621|       |    return NULL;
  622|      2|}
CRYPTO_THREAD_lock_new:
  909|   102k|{
  910|   102k|#ifdef USE_RWLOCK
  911|   102k|    CRYPTO_RWLOCK *lock;
  912|       |
  913|   102k|    ossl_init_rwlock_contention_data();
  914|       |
  915|   102k|    if ((lock = OPENSSL_zalloc(sizeof(pthread_rwlock_t))) == NULL)
  ------------------
  |  |  109|   102k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (915:9): [True: 0, False: 102k]
  ------------------
  916|       |        /* Don't set error, to avoid recursion blowup. */
  917|      0|        return NULL;
  918|       |
  919|   102k|    if (pthread_rwlock_init(lock, NULL) != 0) {
  ------------------
  |  Branch (919:9): [True: 0, False: 102k]
  ------------------
  920|      0|        OPENSSL_free(lock);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  921|      0|        return NULL;
  922|      0|    }
  923|       |#else
  924|       |    pthread_mutexattr_t attr;
  925|       |    CRYPTO_RWLOCK *lock;
  926|       |
  927|       |    if ((lock = OPENSSL_zalloc(sizeof(pthread_mutex_t))) == NULL)
  928|       |        /* Don't set error, to avoid recursion blowup. */
  929|       |        return NULL;
  930|       |
  931|       |    /*
  932|       |     * We don't use recursive mutexes, but try to catch errors if we do.
  933|       |     */
  934|       |    pthread_mutexattr_init(&attr);
  935|       |#if !defined(__TANDEM) && !defined(_SPT_MODEL_)
  936|       |#if !defined(NDEBUG) && !defined(OPENSSL_NO_MUTEX_ERRORCHECK)
  937|       |    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK);
  938|       |#endif
  939|       |#else
  940|       |    /* The SPT Thread Library does not define MUTEX attributes. */
  941|       |#endif
  942|       |
  943|       |    if (pthread_mutex_init(lock, &attr) != 0) {
  944|       |        pthread_mutexattr_destroy(&attr);
  945|       |        OPENSSL_free(lock);
  946|       |        return NULL;
  947|       |    }
  948|       |
  949|       |    pthread_mutexattr_destroy(&attr);
  950|       |#endif
  951|       |
  952|   102k|    return lock;
  953|   102k|}
CRYPTO_THREAD_read_lock:
  956|  3.00M|{
  957|  3.00M|#ifdef USE_RWLOCK
  958|  3.00M|    if (!ossl_assert(ossl_rwlock_rdlock(lock) == 0))
  ------------------
  |  |   52|  3.00M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  3.00M|    __FILE__, __LINE__)
  ------------------
  |  Branch (958:9): [True: 0, False: 3.00M]
  ------------------
  959|      0|        return 0;
  960|       |#else
  961|       |    if (pthread_mutex_lock(lock) != 0) {
  962|       |        assert(errno != EDEADLK && errno != EBUSY);
  963|       |        return 0;
  964|       |    }
  965|       |#endif
  966|       |
  967|  3.00M|    return 1;
  968|  3.00M|}
CRYPTO_THREAD_write_lock:
  971|   172k|{
  972|   172k|#ifdef USE_RWLOCK
  973|   172k|    if (!ossl_assert(ossl_rwlock_wrlock(lock) == 0))
  ------------------
  |  |   52|   172k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   172k|    __FILE__, __LINE__)
  ------------------
  |  Branch (973:9): [True: 0, False: 172k]
  ------------------
  974|      0|        return 0;
  975|       |#else
  976|       |    if (pthread_mutex_lock(lock) != 0) {
  977|       |        assert(errno != EDEADLK && errno != EBUSY);
  978|       |        return 0;
  979|       |    }
  980|       |#endif
  981|       |
  982|   172k|    return 1;
  983|   172k|}
CRYPTO_THREAD_unlock:
  986|  3.17M|{
  987|  3.17M|#ifdef USE_RWLOCK
  988|  3.17M|    if (ossl_rwlock_unlock(lock) != 0)
  ------------------
  |  Branch (988:9): [True: 0, False: 3.17M]
  ------------------
  989|      0|        return 0;
  990|       |#else
  991|       |    if (pthread_mutex_unlock(lock) != 0) {
  992|       |        assert(errno != EPERM);
  993|       |        return 0;
  994|       |    }
  995|       |#endif
  996|       |
  997|  3.17M|    return 1;
  998|  3.17M|}
CRYPTO_THREAD_lock_free:
 1001|   102k|{
 1002|   102k|    if (lock == NULL)
  ------------------
  |  Branch (1002:9): [True: 0, False: 102k]
  ------------------
 1003|      0|        return;
 1004|       |
 1005|   102k|#ifdef USE_RWLOCK
 1006|   102k|    pthread_rwlock_destroy(lock);
 1007|       |#else
 1008|       |    pthread_mutex_destroy(lock);
 1009|       |#endif
 1010|   102k|    OPENSSL_free(lock);
  ------------------
  |  |  132|   102k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1011|       |
 1012|   102k|    return;
 1013|   102k|}
CRYPTO_THREAD_run_once:
 1016|  13.3M|{
 1017|  13.3M|    if (ossl_unlikely(pthread_once(once, init) != 0))
  ------------------
  |  |   23|  13.3M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 13.3M]
  |  |  ------------------
  ------------------
 1018|      0|        return 0;
 1019|       |
 1020|  13.3M|    return 1;
 1021|  13.3M|}
CRYPTO_THREAD_init_local:
 1024|      8|{
 1025|      8|    if (pthread_key_create(key, cleanup) != 0)
  ------------------
  |  Branch (1025:9): [True: 0, False: 8]
  ------------------
 1026|      0|        return 0;
 1027|       |
 1028|      8|    return 1;
 1029|      8|}
CRYPTO_THREAD_get_local:
 1032|  6.49M|{
 1033|  6.49M|    return pthread_getspecific(*key);
 1034|  6.49M|}
CRYPTO_THREAD_set_local:
 1037|      6|{
 1038|      6|    if (pthread_setspecific(*key, val) != 0)
  ------------------
  |  Branch (1038:9): [True: 0, False: 6]
  ------------------
 1039|      0|        return 0;
 1040|       |
 1041|      6|    return 1;
 1042|      6|}
CRYPTO_atomic_add:
 1063|   265k|{
 1064|   265k|#if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
 1065|   265k|    if (__atomic_is_lock_free(sizeof(*val), val)) {
  ------------------
  |  Branch (1065:9): [True: 265k, Folded]
  ------------------
 1066|   265k|        *ret = __atomic_add_fetch(val, amount, __ATOMIC_ACQ_REL);
 1067|   265k|        return 1;
 1068|   265k|    }
 1069|       |#elif defined(__sun) && (defined(__SunOS_5_10) || defined(__SunOS_5_11))
 1070|       |    /* This will work for all future Solaris versions. */
 1071|       |    if (ret != NULL) {
 1072|       |        *ret = atomic_add_int_nv((volatile unsigned int *)val, amount);
 1073|       |        return 1;
 1074|       |    }
 1075|       |#endif
 1076|      0|    if (lock == NULL || !CRYPTO_THREAD_write_lock(lock))
  ------------------
  |  Branch (1076:9): [True: 0, False: 0]
  |  Branch (1076:25): [True: 0, False: 0]
  ------------------
 1077|      0|        return 0;
 1078|       |
 1079|      0|    *val += amount;
 1080|      0|    *ret = *val;
 1081|       |
 1082|      0|    if (!CRYPTO_THREAD_unlock(lock))
  ------------------
  |  Branch (1082:9): [True: 0, False: 0]
  ------------------
 1083|      0|        return 0;
 1084|       |
 1085|      0|    return 1;
 1086|      0|}
CRYPTO_atomic_or:
 1142|      5|{
 1143|      5|#if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
 1144|      5|    if (__atomic_is_lock_free(sizeof(*val), val)) {
  ------------------
  |  Branch (1144:9): [True: 5, Folded]
  ------------------
 1145|      5|        *ret = __atomic_or_fetch(val, op, __ATOMIC_ACQ_REL);
 1146|      5|        return 1;
 1147|      5|    }
 1148|       |#elif defined(__sun) && (defined(__SunOS_5_10) || defined(__SunOS_5_11))
 1149|       |    /* This will work for all future Solaris versions. */
 1150|       |    if (ret != NULL) {
 1151|       |        *ret = atomic_or_64_nv(val, op);
 1152|       |        return 1;
 1153|       |    }
 1154|       |#endif
 1155|      0|    if (lock == NULL || !CRYPTO_THREAD_write_lock(lock))
  ------------------
  |  Branch (1155:9): [True: 0, False: 0]
  |  Branch (1155:25): [True: 0, False: 0]
  ------------------
 1156|      0|        return 0;
 1157|      0|    *val |= op;
 1158|      0|    *ret = *val;
 1159|       |
 1160|      0|    if (!CRYPTO_THREAD_unlock(lock))
  ------------------
  |  Branch (1160:9): [True: 0, False: 0]
  ------------------
 1161|      0|        return 0;
 1162|       |
 1163|      0|    return 1;
 1164|      0|}
CRYPTO_atomic_load:
 1167|  5.83M|{
 1168|  5.83M|#if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
 1169|  5.83M|    if (__atomic_is_lock_free(sizeof(*val), val)) {
  ------------------
  |  Branch (1169:9): [True: 5.83M, Folded]
  ------------------
 1170|  5.83M|        __atomic_load(val, ret, __ATOMIC_ACQUIRE);
 1171|  5.83M|        return 1;
 1172|  5.83M|    }
 1173|       |#elif defined(__sun) && (defined(__SunOS_5_10) || defined(__SunOS_5_11))
 1174|       |    /* This will work for all future Solaris versions. */
 1175|       |    if (ret != NULL) {
 1176|       |        *ret = atomic_or_64_nv(val, 0);
 1177|       |        return 1;
 1178|       |    }
 1179|       |#endif
 1180|      0|    if (lock == NULL || !CRYPTO_THREAD_read_lock(lock))
  ------------------
  |  Branch (1180:9): [True: 0, False: 0]
  |  Branch (1180:25): [True: 0, False: 0]
  ------------------
 1181|      0|        return 0;
 1182|      0|    *ret = *val;
 1183|      0|    if (!CRYPTO_THREAD_unlock(lock))
  ------------------
  |  Branch (1183:9): [True: 0, False: 0]
  ------------------
 1184|      0|        return 0;
 1185|       |
 1186|      0|    return 1;
 1187|      0|}
CRYPTO_atomic_store:
 1190|    638|{
 1191|    638|#if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
 1192|    638|    if (__atomic_is_lock_free(sizeof(*dst), dst)) {
  ------------------
  |  Branch (1192:9): [True: 638, Folded]
  ------------------
 1193|    638|        __atomic_store(dst, &val, __ATOMIC_RELEASE);
 1194|    638|        return 1;
 1195|    638|    }
 1196|       |#elif defined(__sun) && (defined(__SunOS_5_10) || defined(__SunOS_5_11))
 1197|       |    /* This will work for all future Solaris versions. */
 1198|       |    if (dst != NULL) {
 1199|       |        atomic_swap_64(dst, val);
 1200|       |        return 1;
 1201|       |    }
 1202|       |#endif
 1203|      0|    if (lock == NULL || !CRYPTO_THREAD_write_lock(lock))
  ------------------
  |  Branch (1203:9): [True: 0, False: 0]
  |  Branch (1203:25): [True: 0, False: 0]
  ------------------
 1204|      0|        return 0;
 1205|      0|    *dst = val;
 1206|      0|    if (!CRYPTO_THREAD_unlock(lock))
  ------------------
  |  Branch (1206:9): [True: 0, False: 0]
  ------------------
 1207|      0|        return 0;
 1208|       |
 1209|      0|    return 1;
 1210|      0|}
openssl_get_fork_id:
 1266|   114k|{
 1267|   114k|    return getpid();
 1268|   114k|}
threads_pthread.c:allocate_new_qp_group:
  467|      2|{
  468|      2|    struct rcu_qp *new = OPENSSL_calloc(count, sizeof(*new));
  ------------------
  |  |  113|      2|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  469|       |
  470|      2|    lock->group_count = count;
  471|      2|    return new;
  472|      2|}
threads_pthread.c:ossl_init_rwlock_contention_data:
  888|   102k|{
  889|   102k|}
threads_pthread.c:ossl_rwlock_rdlock:
  892|  3.00M|{
  893|  3.00M|    return pthread_rwlock_rdlock(rwlock);
  894|  3.00M|}
threads_pthread.c:ossl_rwlock_wrlock:
  897|   172k|{
  898|   172k|    return pthread_rwlock_wrlock(rwlock);
  899|   172k|}
threads_pthread.c:ossl_rwlock_unlock:
  902|  3.17M|{
  903|  3.17M|    return pthread_rwlock_unlock(rwlock);
  904|  3.17M|}

ossl_time_now:
   16|  43.2k|{
   17|  43.2k|    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|  43.2k|    struct timeval t;
   37|       |
   38|  43.2k|    if (gettimeofday(&t, NULL) < 0) {
  ------------------
  |  Branch (38:9): [True: 0, False: 43.2k]
  ------------------
   39|      0|        ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   55|      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|  43.2k|    if (t.tv_sec <= 0)
  ------------------
  |  Branch (43:9): [True: 0, False: 43.2k]
  ------------------
   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|  43.2k|    else
   46|  43.2k|        r.t = ((uint64_t)t.tv_sec * 1000000 + t.tv_usec) * OSSL_TIME_US;
  ------------------
  |  |   37|  43.2k|#define OSSL_TIME_US (OSSL_TIME_MS / 1000)
  |  |  ------------------
  |  |  |  |   34|  43.2k|#define OSSL_TIME_MS (OSSL_TIME_SECOND / 1000)
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  43.2k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   47|  43.2k|#endif /* defined(_WIN32) */
   48|  43.2k|    return r;
   49|  43.2k|}

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

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

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

ossl_policy_cache_free:
  181|  21.8k|{
  182|  21.8k|    if (!cache)
  ------------------
  |  Branch (182:9): [True: 21.8k, False: 0]
  ------------------
  183|  21.8k|        return;
  184|      0|    ossl_policy_data_free(cache->anyPolicy);
  185|      0|    sk_X509_POLICY_DATA_pop_free(cache->data, ossl_policy_data_free);
  186|      0|    OPENSSL_free(cache);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  187|      0|}

X509_policy_tree_free:
  629|  14.5k|{
  630|  14.5k|    X509_POLICY_LEVEL *curr;
  631|  14.5k|    int i;
  632|       |
  633|  14.5k|    if (!tree)
  ------------------
  |  Branch (633:9): [True: 14.5k, False: 0]
  ------------------
  634|  14.5k|        return;
  635|       |
  636|      0|    sk_X509_POLICY_NODE_free(tree->auth_policies);
  ------------------
  |  | 1100|      0|#define sk_X509_POLICY_NODE_free(sk) OPENSSL_sk_free(ossl_check_X509_POLICY_NODE_sk_type(sk))
  ------------------
  637|      0|    sk_X509_POLICY_NODE_pop_free(tree->user_policies, exnode_free);
  ------------------
  |  | 1108|      0|#define sk_X509_POLICY_NODE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_POLICY_NODE_sk_type(sk), ossl_check_X509_POLICY_NODE_freefunc_type(freefunc))
  ------------------
  638|       |
  639|      0|    for (i = 0, curr = tree->levels; i < tree->nlevel; i++, curr++) {
  ------------------
  |  Branch (639:38): [True: 0, False: 0]
  ------------------
  640|      0|        X509_free(curr->cert);
  641|      0|        sk_X509_POLICY_NODE_pop_free(curr->nodes, ossl_policy_node_free);
  ------------------
  |  | 1108|      0|#define sk_X509_POLICY_NODE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_POLICY_NODE_sk_type(sk), ossl_check_X509_POLICY_NODE_freefunc_type(freefunc))
  ------------------
  642|      0|        ossl_policy_node_free(curr->anyPolicy);
  643|      0|    }
  644|       |
  645|      0|    sk_X509_POLICY_DATA_pop_free(tree->extra_data, ossl_policy_data_free);
  646|      0|    OPENSSL_free(tree->levels);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  647|      0|    OPENSSL_free(tree);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  648|      0|}

OSSL_STACK_OF_X509_free:
   22|   255k|{
   23|   255k|    sk_X509_pop_free(certs, X509_free);
  ------------------
  |  |   96|   255k|#define sk_X509_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_sk_type(sk), ossl_check_X509_freefunc_type(freefunc))
  ------------------
   24|   255k|}

X509v3_addr_validate_path:
 1333|  3.55k|{
 1334|  3.55k|    if (ctx->chain == NULL
  ------------------
  |  Branch (1334:9): [True: 0, False: 3.55k]
  ------------------
 1335|  3.55k|        || sk_X509_num(ctx->chain) == 0
  ------------------
  |  |   82|  3.55k|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
  |  Branch (1335:12): [True: 0, False: 3.55k]
  ------------------
 1336|  3.55k|        || ctx->verify_cb == NULL) {
  ------------------
  |  Branch (1336:12): [True: 0, False: 3.55k]
  ------------------
 1337|      0|        ctx->error = X509_V_ERR_UNSPECIFIED;
  ------------------
  |  |  313|      0|#define X509_V_ERR_UNSPECIFIED 1
  ------------------
 1338|      0|        return 0;
 1339|      0|    }
 1340|  3.55k|    return addr_validate_path_internal(ctx, ctx->chain, NULL);
 1341|  3.55k|}
v3_addr.c:addr_validate_path_internal:
 1215|  3.55k|{
 1216|  3.55k|    IPAddrBlocks *child = NULL;
 1217|  3.55k|    int i, j, ret = 0, rv;
 1218|  3.55k|    X509 *x;
 1219|       |
 1220|  3.55k|    if (!ossl_assert(chain != NULL && sk_X509_num(chain) > 0)
  ------------------
  |  |   52|  7.10k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 3.55k, False: 0]
  |  |  |  Branch (52:41): [True: 3.55k, False: 0]
  |  |  ------------------
  |  |   53|  7.10k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1220:9): [True: 0, False: 3.55k]
  ------------------
 1221|  3.55k|        || !ossl_assert(ctx != NULL || ext != NULL)
  ------------------
  |  |   52|  7.10k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 3.55k, False: 0]
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|  7.10k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1221:12): [True: 0, False: 3.55k]
  ------------------
 1222|  3.55k|        || !ossl_assert(ctx == NULL || ctx->verify_cb != NULL)) {
  ------------------
  |  |   52|  7.10k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 0, False: 3.55k]
  |  |  |  Branch (52:41): [True: 3.55k, False: 0]
  |  |  ------------------
  |  |   53|  3.55k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1222:12): [True: 0, False: 3.55k]
  ------------------
 1223|      0|        if (ctx != NULL)
  ------------------
  |  Branch (1223:13): [True: 0, False: 0]
  ------------------
 1224|      0|            ctx->error = X509_V_ERR_UNSPECIFIED;
  ------------------
  |  |  313|      0|#define X509_V_ERR_UNSPECIFIED 1
  ------------------
 1225|      0|        return 0;
 1226|      0|    }
 1227|       |
 1228|       |    /*
 1229|       |     * Figure out where to start.  If we don't have an extension to
 1230|       |     * check, we're done.  Otherwise, check canonical form and
 1231|       |     * set up for walking up the chain.
 1232|       |     */
 1233|  3.55k|    if (ext != NULL) {
  ------------------
  |  Branch (1233:9): [True: 0, False: 3.55k]
  ------------------
 1234|      0|        i = -1;
 1235|      0|        x = NULL;
 1236|  3.55k|    } else {
 1237|  3.55k|        i = 0;
 1238|  3.55k|        x = sk_X509_value(chain, i);
  ------------------
  |  |   83|  3.55k|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
 1239|  3.55k|        if ((ext = x->rfc3779_addr) == NULL)
  ------------------
  |  Branch (1239:13): [True: 3.55k, False: 0]
  ------------------
 1240|  3.55k|            return 1; /* Return success */
 1241|  3.55k|    }
 1242|      0|    if (!X509v3_addr_is_canonical(ext))
  ------------------
  |  Branch (1242:9): [True: 0, False: 0]
  ------------------
 1243|      0|        validation_err(X509_V_ERR_INVALID_EXTENSION);
  ------------------
  |  | 1191|      0|    do {                                 \
  |  | 1192|      0|        if (ctx != NULL) {               \
  |  |  ------------------
  |  |  |  Branch (1192:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1193|      0|            ctx->error = _err_;          \
  |  | 1194|      0|            ctx->error_depth = i;        \
  |  | 1195|      0|            ctx->current_cert = x;       \
  |  | 1196|      0|            rv = ctx->verify_cb(0, ctx); \
  |  | 1197|      0|        } else {                         \
  |  | 1198|      0|            rv = 0;                      \
  |  | 1199|      0|        }                                \
  |  | 1200|      0|        if (rv == 0)                     \
  |  |  ------------------
  |  |  |  Branch (1200:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1201|      0|            goto done;                   \
  |  | 1202|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1202:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1244|      0|    (void)sk_IPAddressFamily_set_cmp_func(ext, IPAddressFamily_cmp);
  ------------------
  |  | 1279|      0|#define sk_IPAddressFamily_set_cmp_func(sk, cmp) ((sk_IPAddressFamily_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_IPAddressFamily_sk_type(sk), ossl_check_IPAddressFamily_compfunc_type(cmp)))
  ------------------
 1245|      0|    if ((child = sk_IPAddressFamily_dup(ext)) == NULL) {
  ------------------
  |  | 1277|      0|#define sk_IPAddressFamily_dup(sk) ((STACK_OF(IPAddressFamily) *)OPENSSL_sk_dup(ossl_check_const_IPAddressFamily_sk_type(sk)))
  ------------------
  |  Branch (1245:9): [True: 0, False: 0]
  ------------------
 1246|      0|        ERR_raise(ERR_LIB_X509V3, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1247|      0|        if (ctx != NULL)
  ------------------
  |  Branch (1247:13): [True: 0, False: 0]
  ------------------
 1248|      0|            ctx->error = X509_V_ERR_OUT_OF_MEM;
  ------------------
  |  |  329|      0|#define X509_V_ERR_OUT_OF_MEM 17
  ------------------
 1249|      0|        goto done;
 1250|      0|    }
 1251|      0|    sk_IPAddressFamily_sort(child);
  ------------------
  |  | 1275|      0|#define sk_IPAddressFamily_sort(sk) OPENSSL_sk_sort(ossl_check_IPAddressFamily_sk_type(sk))
  ------------------
 1252|       |
 1253|       |    /*
 1254|       |     * Now walk up the chain.  No cert may list resources that its
 1255|       |     * parent doesn't list.
 1256|       |     */
 1257|      0|    for (i++; i < sk_X509_num(chain); i++) {
  ------------------
  |  |   82|      0|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
  |  Branch (1257:15): [True: 0, False: 0]
  ------------------
 1258|      0|        x = sk_X509_value(chain, i);
  ------------------
  |  |   83|      0|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
 1259|      0|        if (!X509v3_addr_is_canonical(x->rfc3779_addr))
  ------------------
  |  Branch (1259:13): [True: 0, False: 0]
  ------------------
 1260|      0|            validation_err(X509_V_ERR_INVALID_EXTENSION);
  ------------------
  |  | 1191|      0|    do {                                 \
  |  | 1192|      0|        if (ctx != NULL) {               \
  |  |  ------------------
  |  |  |  Branch (1192:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1193|      0|            ctx->error = _err_;          \
  |  | 1194|      0|            ctx->error_depth = i;        \
  |  | 1195|      0|            ctx->current_cert = x;       \
  |  | 1196|      0|            rv = ctx->verify_cb(0, ctx); \
  |  | 1197|      0|        } else {                         \
  |  | 1198|      0|            rv = 0;                      \
  |  | 1199|      0|        }                                \
  |  | 1200|      0|        if (rv == 0)                     \
  |  |  ------------------
  |  |  |  Branch (1200:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1201|      0|            goto done;                   \
  |  | 1202|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1202:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1261|      0|        if (x->rfc3779_addr == NULL) {
  ------------------
  |  Branch (1261:13): [True: 0, False: 0]
  ------------------
 1262|      0|            for (j = 0; j < sk_IPAddressFamily_num(child); j++) {
  ------------------
  |  | 1255|      0|#define sk_IPAddressFamily_num(sk) OPENSSL_sk_num(ossl_check_const_IPAddressFamily_sk_type(sk))
  ------------------
  |  Branch (1262:25): [True: 0, False: 0]
  ------------------
 1263|      0|                IPAddressFamily *fc = sk_IPAddressFamily_value(child, j);
  ------------------
  |  | 1256|      0|#define sk_IPAddressFamily_value(sk, idx) ((IPAddressFamily *)OPENSSL_sk_value(ossl_check_const_IPAddressFamily_sk_type(sk), (idx)))
  ------------------
 1264|       |
 1265|      0|                if (!IPAddressFamily_check_len(fc))
  ------------------
  |  Branch (1265:21): [True: 0, False: 0]
  ------------------
 1266|      0|                    goto done;
 1267|       |
 1268|      0|                if (fc->ipAddressChoice->type != IPAddressChoice_inherit) {
  ------------------
  |  | 1237|      0|#define IPAddressChoice_inherit 0
  ------------------
  |  Branch (1268:21): [True: 0, False: 0]
  ------------------
 1269|      0|                    validation_err(X509_V_ERR_UNNESTED_RESOURCE);
  ------------------
  |  | 1191|      0|    do {                                 \
  |  | 1192|      0|        if (ctx != NULL) {               \
  |  |  ------------------
  |  |  |  Branch (1192:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1193|      0|            ctx->error = _err_;          \
  |  | 1194|      0|            ctx->error_depth = i;        \
  |  | 1195|      0|            ctx->current_cert = x;       \
  |  | 1196|      0|            rv = ctx->verify_cb(0, ctx); \
  |  | 1197|      0|        } else {                         \
  |  | 1198|      0|            rv = 0;                      \
  |  | 1199|      0|        }                                \
  |  | 1200|      0|        if (rv == 0)                     \
  |  |  ------------------
  |  |  |  Branch (1200:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1201|      0|            goto done;                   \
  |  | 1202|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1202:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1270|      0|                    break;
 1271|      0|                }
 1272|      0|            }
 1273|      0|            continue;
 1274|      0|        }
 1275|      0|        (void)sk_IPAddressFamily_set_cmp_func(x->rfc3779_addr,
  ------------------
  |  | 1279|      0|#define sk_IPAddressFamily_set_cmp_func(sk, cmp) ((sk_IPAddressFamily_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_IPAddressFamily_sk_type(sk), ossl_check_IPAddressFamily_compfunc_type(cmp)))
  ------------------
 1276|      0|            IPAddressFamily_cmp);
 1277|      0|        sk_IPAddressFamily_sort(x->rfc3779_addr);
  ------------------
  |  | 1275|      0|#define sk_IPAddressFamily_sort(sk) OPENSSL_sk_sort(ossl_check_IPAddressFamily_sk_type(sk))
  ------------------
 1278|      0|        for (j = 0; j < sk_IPAddressFamily_num(child); j++) {
  ------------------
  |  | 1255|      0|#define sk_IPAddressFamily_num(sk) OPENSSL_sk_num(ossl_check_const_IPAddressFamily_sk_type(sk))
  ------------------
  |  Branch (1278:21): [True: 0, False: 0]
  ------------------
 1279|      0|            IPAddressFamily *fc = sk_IPAddressFamily_value(child, j);
  ------------------
  |  | 1256|      0|#define sk_IPAddressFamily_value(sk, idx) ((IPAddressFamily *)OPENSSL_sk_value(ossl_check_const_IPAddressFamily_sk_type(sk), (idx)))
  ------------------
 1280|      0|            int k = sk_IPAddressFamily_find(x->rfc3779_addr, fc);
  ------------------
  |  | 1272|      0|#define sk_IPAddressFamily_find(sk, ptr) OPENSSL_sk_find(ossl_check_IPAddressFamily_sk_type(sk), ossl_check_IPAddressFamily_type(ptr))
  ------------------
 1281|      0|            IPAddressFamily *fp = sk_IPAddressFamily_value(x->rfc3779_addr, k);
  ------------------
  |  | 1256|      0|#define sk_IPAddressFamily_value(sk, idx) ((IPAddressFamily *)OPENSSL_sk_value(ossl_check_const_IPAddressFamily_sk_type(sk), (idx)))
  ------------------
 1282|       |
 1283|      0|            if (fp == NULL) {
  ------------------
  |  Branch (1283:17): [True: 0, False: 0]
  ------------------
 1284|      0|                if (fc->ipAddressChoice->type == IPAddressChoice_addressesOrRanges) {
  ------------------
  |  | 1238|      0|#define IPAddressChoice_addressesOrRanges 1
  ------------------
  |  Branch (1284:21): [True: 0, False: 0]
  ------------------
 1285|      0|                    validation_err(X509_V_ERR_UNNESTED_RESOURCE);
  ------------------
  |  | 1191|      0|    do {                                 \
  |  | 1192|      0|        if (ctx != NULL) {               \
  |  |  ------------------
  |  |  |  Branch (1192:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1193|      0|            ctx->error = _err_;          \
  |  | 1194|      0|            ctx->error_depth = i;        \
  |  | 1195|      0|            ctx->current_cert = x;       \
  |  | 1196|      0|            rv = ctx->verify_cb(0, ctx); \
  |  | 1197|      0|        } else {                         \
  |  | 1198|      0|            rv = 0;                      \
  |  | 1199|      0|        }                                \
  |  | 1200|      0|        if (rv == 0)                     \
  |  |  ------------------
  |  |  |  Branch (1200:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1201|      0|            goto done;                   \
  |  | 1202|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1202:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1286|      0|                    break;
 1287|      0|                }
 1288|      0|                continue;
 1289|      0|            }
 1290|       |
 1291|      0|            if (!IPAddressFamily_check_len(fc) || !IPAddressFamily_check_len(fp))
  ------------------
  |  Branch (1291:17): [True: 0, False: 0]
  |  Branch (1291:51): [True: 0, False: 0]
  ------------------
 1292|      0|                goto done;
 1293|       |
 1294|      0|            if (fp->ipAddressChoice->type == IPAddressChoice_addressesOrRanges) {
  ------------------
  |  | 1238|      0|#define IPAddressChoice_addressesOrRanges 1
  ------------------
  |  Branch (1294:17): [True: 0, False: 0]
  ------------------
 1295|      0|                if (fc->ipAddressChoice->type == IPAddressChoice_inherit
  ------------------
  |  | 1237|      0|#define IPAddressChoice_inherit 0
  ------------------
  |  Branch (1295:21): [True: 0, False: 0]
  ------------------
 1296|      0|                    || addr_contains(fp->ipAddressChoice->u.addressesOrRanges,
  ------------------
  |  Branch (1296:24): [True: 0, False: 0]
  ------------------
 1297|      0|                        fc->ipAddressChoice->u.addressesOrRanges,
 1298|      0|                        length_from_afi(X509v3_addr_get_afi(fc))))
 1299|      0|                    (void)sk_IPAddressFamily_set(child, j, fp);
  ------------------
  |  | 1271|      0|#define sk_IPAddressFamily_set(sk, idx, ptr) ((IPAddressFamily *)OPENSSL_sk_set(ossl_check_IPAddressFamily_sk_type(sk), (idx), ossl_check_IPAddressFamily_type(ptr)))
  ------------------
 1300|      0|                else
 1301|      0|                    validation_err(X509_V_ERR_UNNESTED_RESOURCE);
  ------------------
  |  | 1191|      0|    do {                                 \
  |  | 1192|      0|        if (ctx != NULL) {               \
  |  |  ------------------
  |  |  |  Branch (1192:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1193|      0|            ctx->error = _err_;          \
  |  | 1194|      0|            ctx->error_depth = i;        \
  |  | 1195|      0|            ctx->current_cert = x;       \
  |  | 1196|      0|            rv = ctx->verify_cb(0, ctx); \
  |  | 1197|      0|        } else {                         \
  |  | 1198|      0|            rv = 0;                      \
  |  | 1199|      0|        }                                \
  |  | 1200|      0|        if (rv == 0)                     \
  |  |  ------------------
  |  |  |  Branch (1200:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1201|      0|            goto done;                   \
  |  | 1202|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1202:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1302|      0|            }
 1303|      0|        }
 1304|      0|    }
 1305|       |
 1306|       |    /*
 1307|       |     * Trust anchor can't inherit.
 1308|       |     */
 1309|      0|    if (x->rfc3779_addr != NULL) {
  ------------------
  |  Branch (1309:9): [True: 0, False: 0]
  ------------------
 1310|      0|        for (j = 0; j < sk_IPAddressFamily_num(x->rfc3779_addr); j++) {
  ------------------
  |  | 1255|      0|#define sk_IPAddressFamily_num(sk) OPENSSL_sk_num(ossl_check_const_IPAddressFamily_sk_type(sk))
  ------------------
  |  Branch (1310:21): [True: 0, False: 0]
  ------------------
 1311|      0|            IPAddressFamily *fp = sk_IPAddressFamily_value(x->rfc3779_addr, j);
  ------------------
  |  | 1256|      0|#define sk_IPAddressFamily_value(sk, idx) ((IPAddressFamily *)OPENSSL_sk_value(ossl_check_const_IPAddressFamily_sk_type(sk), (idx)))
  ------------------
 1312|       |
 1313|      0|            if (!IPAddressFamily_check_len(fp))
  ------------------
  |  Branch (1313:17): [True: 0, False: 0]
  ------------------
 1314|      0|                goto done;
 1315|       |
 1316|      0|            if (fp->ipAddressChoice->type == IPAddressChoice_inherit
  ------------------
  |  | 1237|      0|#define IPAddressChoice_inherit 0
  ------------------
  |  Branch (1316:17): [True: 0, False: 0]
  ------------------
 1317|      0|                && sk_IPAddressFamily_find(child, fp) >= 0)
  ------------------
  |  | 1272|      0|#define sk_IPAddressFamily_find(sk, ptr) OPENSSL_sk_find(ossl_check_IPAddressFamily_sk_type(sk), ossl_check_IPAddressFamily_type(ptr))
  ------------------
  |  Branch (1317:20): [True: 0, False: 0]
  ------------------
 1318|      0|                validation_err(X509_V_ERR_UNNESTED_RESOURCE);
  ------------------
  |  | 1191|      0|    do {                                 \
  |  | 1192|      0|        if (ctx != NULL) {               \
  |  |  ------------------
  |  |  |  Branch (1192:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1193|      0|            ctx->error = _err_;          \
  |  | 1194|      0|            ctx->error_depth = i;        \
  |  | 1195|      0|            ctx->current_cert = x;       \
  |  | 1196|      0|            rv = ctx->verify_cb(0, ctx); \
  |  | 1197|      0|        } else {                         \
  |  | 1198|      0|            rv = 0;                      \
  |  | 1199|      0|        }                                \
  |  | 1200|      0|        if (rv == 0)                     \
  |  |  ------------------
  |  |  |  Branch (1200:13): [True: 0, False: 0]
  |  |  ------------------
  |  | 1201|      0|            goto done;                   \
  |  | 1202|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1202:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1319|      0|        }
 1320|      0|    }
 1321|      0|    ret = 1;
 1322|      0|done:
 1323|      0|    sk_IPAddressFamily_free(child);
  ------------------
  |  | 1261|      0|#define sk_IPAddressFamily_free(sk) OPENSSL_sk_free(ossl_check_IPAddressFamily_sk_type(sk))
  ------------------
 1324|      0|    return ret;
 1325|      0|}

v3_akid.c:i2v_AUTHORITY_KEYID:
   42|     10|{
   43|     10|    char *tmp = NULL;
   44|     10|    STACK_OF(CONF_VALUE) *origextlist = extlist, *tmpextlist;
  ------------------
  |  |   33|     10|#define STACK_OF(type) struct stack_st_##type
  ------------------
   45|       |
   46|     10|    if (akeyid->keyid) {
  ------------------
  |  Branch (46:9): [True: 10, False: 0]
  ------------------
   47|     10|        tmp = i2s_ASN1_OCTET_STRING(NULL, akeyid->keyid);
   48|     10|        if (tmp == NULL) {
  ------------------
  |  Branch (48:13): [True: 0, False: 10]
  ------------------
   49|      0|            ERR_raise(ERR_LIB_X509V3, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   50|      0|            return NULL;
   51|      0|        }
   52|     10|        if (!X509V3_add_value((akeyid->issuer || akeyid->serial) ? "keyid" : NULL,
  ------------------
  |  Branch (52:13): [True: 0, False: 10]
  |  Branch (52:32): [True: 0, False: 10]
  |  Branch (52:50): [True: 0, False: 10]
  ------------------
   53|     10|                tmp, &extlist)) {
   54|      0|            OPENSSL_free(tmp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   55|      0|            ERR_raise(ERR_LIB_X509V3, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   56|      0|            goto err;
   57|      0|        }
   58|     10|        OPENSSL_free(tmp);
  ------------------
  |  |  132|     10|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   59|     10|    }
   60|     10|    if (akeyid->issuer) {
  ------------------
  |  Branch (60:9): [True: 0, False: 10]
  ------------------
   61|      0|        tmpextlist = i2v_GENERAL_NAMES(NULL, akeyid->issuer, extlist);
   62|      0|        if (tmpextlist == NULL) {
  ------------------
  |  Branch (62:13): [True: 0, False: 0]
  ------------------
   63|      0|            ERR_raise(ERR_LIB_X509V3, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   64|      0|            goto err;
   65|      0|        }
   66|      0|        extlist = tmpextlist;
   67|      0|    }
   68|     10|    if (akeyid->serial) {
  ------------------
  |  Branch (68:9): [True: 0, False: 10]
  ------------------
   69|      0|        tmp = i2s_ASN1_INTEGER(NULL, akeyid->serial);
   70|       |
   71|      0|        if (tmp == NULL) {
  ------------------
  |  Branch (71:13): [True: 0, False: 0]
  ------------------
   72|      0|            ERR_raise(ERR_LIB_X509V3, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   73|      0|            goto err;
   74|      0|        }
   75|      0|        if (!X509V3_add_value("serial", tmp, &extlist)) {
  ------------------
  |  Branch (75:13): [True: 0, False: 0]
  ------------------
   76|      0|            OPENSSL_free(tmp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   77|      0|            goto err;
   78|      0|        }
   79|      0|        OPENSSL_free(tmp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   80|      0|    }
   81|     10|    return extlist;
   82|      0|err:
   83|      0|    if (origextlist == NULL)
  ------------------
  |  Branch (83:9): [True: 0, False: 0]
  ------------------
   84|      0|        sk_CONF_VALUE_pop_free(extlist, X509V3_conf_free);
  ------------------
  |  |   62|      0|#define sk_CONF_VALUE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_freefunc_type(freefunc))
  ------------------
   85|       |    return NULL;
   86|     10|}

X509v3_asid_validate_path:
  845|  3.55k|{
  846|  3.55k|    if (ctx->chain == NULL
  ------------------
  |  Branch (846:9): [True: 0, False: 3.55k]
  ------------------
  847|  3.55k|        || sk_X509_num(ctx->chain) == 0
  ------------------
  |  |   82|  3.55k|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
  |  Branch (847:12): [True: 0, False: 3.55k]
  ------------------
  848|  3.55k|        || ctx->verify_cb == NULL) {
  ------------------
  |  Branch (848:12): [True: 0, False: 3.55k]
  ------------------
  849|      0|        ctx->error = X509_V_ERR_UNSPECIFIED;
  ------------------
  |  |  313|      0|#define X509_V_ERR_UNSPECIFIED 1
  ------------------
  850|      0|        return 0;
  851|      0|    }
  852|  3.55k|    return asid_validate_path_internal(ctx, ctx->chain, NULL);
  853|  3.55k|}
v3_asid.c:asid_validate_path_internal:
  722|  3.55k|{
  723|  3.55k|    ASIdOrRanges *child_as = NULL, *child_rdi = NULL;
  724|  3.55k|    int i, ret = 1, inherit_as = 0, inherit_rdi = 0;
  725|  3.55k|    X509 *x;
  726|       |
  727|  3.55k|    if (!ossl_assert(chain != NULL && sk_X509_num(chain) > 0)
  ------------------
  |  |   52|  7.10k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 3.55k, False: 0]
  |  |  |  Branch (52:41): [True: 3.55k, False: 0]
  |  |  ------------------
  |  |   53|  7.10k|    __FILE__, __LINE__)
  ------------------
  |  Branch (727:9): [True: 0, False: 3.55k]
  ------------------
  728|  3.55k|        || !ossl_assert(ctx != NULL || ext != NULL)
  ------------------
  |  |   52|  7.10k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 3.55k, False: 0]
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|  7.10k|    __FILE__, __LINE__)
  ------------------
  |  Branch (728:12): [True: 0, False: 3.55k]
  ------------------
  729|  3.55k|        || !ossl_assert(ctx == NULL || ctx->verify_cb != NULL)) {
  ------------------
  |  |   52|  7.10k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 0, False: 3.55k]
  |  |  |  Branch (52:41): [True: 3.55k, False: 0]
  |  |  ------------------
  |  |   53|  3.55k|    __FILE__, __LINE__)
  ------------------
  |  Branch (729:12): [True: 0, False: 3.55k]
  ------------------
  730|      0|        if (ctx != NULL)
  ------------------
  |  Branch (730:13): [True: 0, False: 0]
  ------------------
  731|      0|            ctx->error = X509_V_ERR_UNSPECIFIED;
  ------------------
  |  |  313|      0|#define X509_V_ERR_UNSPECIFIED 1
  ------------------
  732|      0|        return 0;
  733|      0|    }
  734|       |
  735|       |    /*
  736|       |     * Figure out where to start.  If we don't have an extension to
  737|       |     * check, we're done.  Otherwise, check canonical form and
  738|       |     * set up for walking up the chain.
  739|       |     */
  740|  3.55k|    if (ext != NULL) {
  ------------------
  |  Branch (740:9): [True: 0, False: 3.55k]
  ------------------
  741|      0|        i = -1;
  742|      0|        x = NULL;
  743|  3.55k|    } else {
  744|  3.55k|        i = 0;
  745|  3.55k|        x = sk_X509_value(chain, i);
  ------------------
  |  |   83|  3.55k|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
  746|  3.55k|        if ((ext = x->rfc3779_asid) == NULL)
  ------------------
  |  Branch (746:13): [True: 3.55k, False: 0]
  ------------------
  747|  3.55k|            goto done;
  748|  3.55k|    }
  749|      0|    if (!X509v3_asid_is_canonical(ext))
  ------------------
  |  Branch (749:9): [True: 0, False: 0]
  ------------------
  750|      0|        validation_err(X509_V_ERR_INVALID_EXTENSION);
  ------------------
  |  |  703|      0|    do {                                  \
  |  |  704|      0|        if (ctx != NULL) {                \
  |  |  ------------------
  |  |  |  Branch (704:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  705|      0|            ctx->error = _err_;           \
  |  |  706|      0|            ctx->error_depth = i;         \
  |  |  707|      0|            ctx->current_cert = x;        \
  |  |  708|      0|            ret = ctx->verify_cb(0, ctx); \
  |  |  709|      0|        } else {                          \
  |  |  710|      0|            ret = 0;                      \
  |  |  711|      0|        }                                 \
  |  |  712|      0|        if (!ret)                         \
  |  |  ------------------
  |  |  |  Branch (712:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  713|      0|            goto done;                    \
  |  |  714|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (714:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  751|      0|    if (ext->asnum != NULL) {
  ------------------
  |  Branch (751:9): [True: 0, False: 0]
  ------------------
  752|      0|        switch (ext->asnum->type) {
  ------------------
  |  Branch (752:17): [True: 0, False: 0]
  ------------------
  753|      0|        case ASIdentifierChoice_inherit:
  ------------------
  |  | 1170|      0|#define ASIdentifierChoice_inherit 0
  ------------------
  |  Branch (753:9): [True: 0, False: 0]
  ------------------
  754|      0|            inherit_as = 1;
  755|      0|            break;
  756|      0|        case ASIdentifierChoice_asIdsOrRanges:
  ------------------
  |  | 1171|      0|#define ASIdentifierChoice_asIdsOrRanges 1
  ------------------
  |  Branch (756:9): [True: 0, False: 0]
  ------------------
  757|      0|            child_as = ext->asnum->u.asIdsOrRanges;
  758|      0|            break;
  759|      0|        }
  760|      0|    }
  761|      0|    if (ext->rdi != NULL) {
  ------------------
  |  Branch (761:9): [True: 0, False: 0]
  ------------------
  762|      0|        switch (ext->rdi->type) {
  ------------------
  |  Branch (762:17): [True: 0, False: 0]
  ------------------
  763|      0|        case ASIdentifierChoice_inherit:
  ------------------
  |  | 1170|      0|#define ASIdentifierChoice_inherit 0
  ------------------
  |  Branch (763:9): [True: 0, False: 0]
  ------------------
  764|      0|            inherit_rdi = 1;
  765|      0|            break;
  766|      0|        case ASIdentifierChoice_asIdsOrRanges:
  ------------------
  |  | 1171|      0|#define ASIdentifierChoice_asIdsOrRanges 1
  ------------------
  |  Branch (766:9): [True: 0, False: 0]
  ------------------
  767|      0|            child_rdi = ext->rdi->u.asIdsOrRanges;
  768|      0|            break;
  769|      0|        }
  770|      0|    }
  771|       |
  772|       |    /*
  773|       |     * Now walk up the chain.  Extensions must be in canonical form, no
  774|       |     * cert may list resources that its parent doesn't list.
  775|       |     */
  776|      0|    for (i++; i < sk_X509_num(chain); i++) {
  ------------------
  |  |   82|      0|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
  |  Branch (776:15): [True: 0, False: 0]
  ------------------
  777|      0|        x = sk_X509_value(chain, i);
  ------------------
  |  |   83|      0|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
  778|      0|        if (!ossl_assert(x != NULL)) {
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (778:13): [True: 0, False: 0]
  ------------------
  779|      0|            if (ctx != NULL)
  ------------------
  |  Branch (779:17): [True: 0, False: 0]
  ------------------
  780|      0|                ctx->error = X509_V_ERR_UNSPECIFIED;
  ------------------
  |  |  313|      0|#define X509_V_ERR_UNSPECIFIED 1
  ------------------
  781|      0|            return 0;
  782|      0|        }
  783|      0|        if (x->rfc3779_asid == NULL) {
  ------------------
  |  Branch (783:13): [True: 0, False: 0]
  ------------------
  784|      0|            if (child_as != NULL || child_rdi != NULL)
  ------------------
  |  Branch (784:17): [True: 0, False: 0]
  |  Branch (784:37): [True: 0, False: 0]
  ------------------
  785|      0|                validation_err(X509_V_ERR_UNNESTED_RESOURCE);
  ------------------
  |  |  703|      0|    do {                                  \
  |  |  704|      0|        if (ctx != NULL) {                \
  |  |  ------------------
  |  |  |  Branch (704:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  705|      0|            ctx->error = _err_;           \
  |  |  706|      0|            ctx->error_depth = i;         \
  |  |  707|      0|            ctx->current_cert = x;        \
  |  |  708|      0|            ret = ctx->verify_cb(0, ctx); \
  |  |  709|      0|        } else {                          \
  |  |  710|      0|            ret = 0;                      \
  |  |  711|      0|        }                                 \
  |  |  712|      0|        if (!ret)                         \
  |  |  ------------------
  |  |  |  Branch (712:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  713|      0|            goto done;                    \
  |  |  714|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (714:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  786|      0|            continue;
  787|      0|        }
  788|      0|        if (!X509v3_asid_is_canonical(x->rfc3779_asid))
  ------------------
  |  Branch (788:13): [True: 0, False: 0]
  ------------------
  789|      0|            validation_err(X509_V_ERR_INVALID_EXTENSION);
  ------------------
  |  |  703|      0|    do {                                  \
  |  |  704|      0|        if (ctx != NULL) {                \
  |  |  ------------------
  |  |  |  Branch (704:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  705|      0|            ctx->error = _err_;           \
  |  |  706|      0|            ctx->error_depth = i;         \
  |  |  707|      0|            ctx->current_cert = x;        \
  |  |  708|      0|            ret = ctx->verify_cb(0, ctx); \
  |  |  709|      0|        } else {                          \
  |  |  710|      0|            ret = 0;                      \
  |  |  711|      0|        }                                 \
  |  |  712|      0|        if (!ret)                         \
  |  |  ------------------
  |  |  |  Branch (712:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  713|      0|            goto done;                    \
  |  |  714|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (714:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  790|      0|        if (x->rfc3779_asid->asnum == NULL && child_as != NULL) {
  ------------------
  |  Branch (790:13): [True: 0, False: 0]
  |  Branch (790:47): [True: 0, False: 0]
  ------------------
  791|      0|            validation_err(X509_V_ERR_UNNESTED_RESOURCE);
  ------------------
  |  |  703|      0|    do {                                  \
  |  |  704|      0|        if (ctx != NULL) {                \
  |  |  ------------------
  |  |  |  Branch (704:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  705|      0|            ctx->error = _err_;           \
  |  |  706|      0|            ctx->error_depth = i;         \
  |  |  707|      0|            ctx->current_cert = x;        \
  |  |  708|      0|            ret = ctx->verify_cb(0, ctx); \
  |  |  709|      0|        } else {                          \
  |  |  710|      0|            ret = 0;                      \
  |  |  711|      0|        }                                 \
  |  |  712|      0|        if (!ret)                         \
  |  |  ------------------
  |  |  |  Branch (712:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  713|      0|            goto done;                    \
  |  |  714|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (714:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  792|      0|            child_as = NULL;
  793|      0|            inherit_as = 0;
  794|      0|        }
  795|      0|        if (x->rfc3779_asid->asnum != NULL && x->rfc3779_asid->asnum->type == ASIdentifierChoice_asIdsOrRanges) {
  ------------------
  |  | 1171|      0|#define ASIdentifierChoice_asIdsOrRanges 1
  ------------------
  |  Branch (795:13): [True: 0, False: 0]
  |  Branch (795:47): [True: 0, False: 0]
  ------------------
  796|      0|            if (inherit_as
  ------------------
  |  Branch (796:17): [True: 0, False: 0]
  ------------------
  797|      0|                || asid_contains(x->rfc3779_asid->asnum->u.asIdsOrRanges,
  ------------------
  |  Branch (797:20): [True: 0, False: 0]
  ------------------
  798|      0|                    child_as)) {
  799|      0|                child_as = x->rfc3779_asid->asnum->u.asIdsOrRanges;
  800|      0|                inherit_as = 0;
  801|      0|            } else {
  802|      0|                validation_err(X509_V_ERR_UNNESTED_RESOURCE);
  ------------------
  |  |  703|      0|    do {                                  \
  |  |  704|      0|        if (ctx != NULL) {                \
  |  |  ------------------
  |  |  |  Branch (704:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  705|      0|            ctx->error = _err_;           \
  |  |  706|      0|            ctx->error_depth = i;         \
  |  |  707|      0|            ctx->current_cert = x;        \
  |  |  708|      0|            ret = ctx->verify_cb(0, ctx); \
  |  |  709|      0|        } else {                          \
  |  |  710|      0|            ret = 0;                      \
  |  |  711|      0|        }                                 \
  |  |  712|      0|        if (!ret)                         \
  |  |  ------------------
  |  |  |  Branch (712:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  713|      0|            goto done;                    \
  |  |  714|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (714:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  803|      0|            }
  804|      0|        }
  805|      0|        if (x->rfc3779_asid->rdi == NULL && child_rdi != NULL) {
  ------------------
  |  Branch (805:13): [True: 0, False: 0]
  |  Branch (805:45): [True: 0, False: 0]
  ------------------
  806|      0|            validation_err(X509_V_ERR_UNNESTED_RESOURCE);
  ------------------
  |  |  703|      0|    do {                                  \
  |  |  704|      0|        if (ctx != NULL) {                \
  |  |  ------------------
  |  |  |  Branch (704:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  705|      0|            ctx->error = _err_;           \
  |  |  706|      0|            ctx->error_depth = i;         \
  |  |  707|      0|            ctx->current_cert = x;        \
  |  |  708|      0|            ret = ctx->verify_cb(0, ctx); \
  |  |  709|      0|        } else {                          \
  |  |  710|      0|            ret = 0;                      \
  |  |  711|      0|        }                                 \
  |  |  712|      0|        if (!ret)                         \
  |  |  ------------------
  |  |  |  Branch (712:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  713|      0|            goto done;                    \
  |  |  714|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (714:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  807|      0|            child_rdi = NULL;
  808|      0|            inherit_rdi = 0;
  809|      0|        }
  810|      0|        if (x->rfc3779_asid->rdi != NULL && x->rfc3779_asid->rdi->type == ASIdentifierChoice_asIdsOrRanges) {
  ------------------
  |  | 1171|      0|#define ASIdentifierChoice_asIdsOrRanges 1
  ------------------
  |  Branch (810:13): [True: 0, False: 0]
  |  Branch (810:45): [True: 0, False: 0]
  ------------------
  811|      0|            if (inherit_rdi || asid_contains(x->rfc3779_asid->rdi->u.asIdsOrRanges, child_rdi)) {
  ------------------
  |  Branch (811:17): [True: 0, False: 0]
  |  Branch (811:32): [True: 0, False: 0]
  ------------------
  812|      0|                child_rdi = x->rfc3779_asid->rdi->u.asIdsOrRanges;
  813|      0|                inherit_rdi = 0;
  814|      0|            } else {
  815|      0|                validation_err(X509_V_ERR_UNNESTED_RESOURCE);
  ------------------
  |  |  703|      0|    do {                                  \
  |  |  704|      0|        if (ctx != NULL) {                \
  |  |  ------------------
  |  |  |  Branch (704:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  705|      0|            ctx->error = _err_;           \
  |  |  706|      0|            ctx->error_depth = i;         \
  |  |  707|      0|            ctx->current_cert = x;        \
  |  |  708|      0|            ret = ctx->verify_cb(0, ctx); \
  |  |  709|      0|        } else {                          \
  |  |  710|      0|            ret = 0;                      \
  |  |  711|      0|        }                                 \
  |  |  712|      0|        if (!ret)                         \
  |  |  ------------------
  |  |  |  Branch (712:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  713|      0|            goto done;                    \
  |  |  714|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (714:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  816|      0|            }
  817|      0|        }
  818|      0|    }
  819|       |
  820|       |    /*
  821|       |     * Trust anchor can't inherit.
  822|       |     */
  823|      0|    if (!ossl_assert(x != NULL)) {
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (823:9): [True: 0, False: 0]
  ------------------
  824|      0|        if (ctx != NULL)
  ------------------
  |  Branch (824:13): [True: 0, False: 0]
  ------------------
  825|      0|            ctx->error = X509_V_ERR_UNSPECIFIED;
  ------------------
  |  |  313|      0|#define X509_V_ERR_UNSPECIFIED 1
  ------------------
  826|      0|        return 0;
  827|      0|    }
  828|      0|    if (x->rfc3779_asid != NULL) {
  ------------------
  |  Branch (828:9): [True: 0, False: 0]
  ------------------
  829|      0|        if (x->rfc3779_asid->asnum != NULL && x->rfc3779_asid->asnum->type == ASIdentifierChoice_inherit)
  ------------------
  |  | 1170|      0|#define ASIdentifierChoice_inherit 0
  ------------------
  |  Branch (829:13): [True: 0, False: 0]
  |  Branch (829:47): [True: 0, False: 0]
  ------------------
  830|      0|            validation_err(X509_V_ERR_UNNESTED_RESOURCE);
  ------------------
  |  |  703|      0|    do {                                  \
  |  |  704|      0|        if (ctx != NULL) {                \
  |  |  ------------------
  |  |  |  Branch (704:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  705|      0|            ctx->error = _err_;           \
  |  |  706|      0|            ctx->error_depth = i;         \
  |  |  707|      0|            ctx->current_cert = x;        \
  |  |  708|      0|            ret = ctx->verify_cb(0, ctx); \
  |  |  709|      0|        } else {                          \
  |  |  710|      0|            ret = 0;                      \
  |  |  711|      0|        }                                 \
  |  |  712|      0|        if (!ret)                         \
  |  |  ------------------
  |  |  |  Branch (712:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  713|      0|            goto done;                    \
  |  |  714|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (714:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  831|      0|        if (x->rfc3779_asid->rdi != NULL && x->rfc3779_asid->rdi->type == ASIdentifierChoice_inherit)
  ------------------
  |  | 1170|      0|#define ASIdentifierChoice_inherit 0
  ------------------
  |  Branch (831:13): [True: 0, False: 0]
  |  Branch (831:45): [True: 0, False: 0]
  ------------------
  832|      0|            validation_err(X509_V_ERR_UNNESTED_RESOURCE);
  ------------------
  |  |  703|      0|    do {                                  \
  |  |  704|      0|        if (ctx != NULL) {                \
  |  |  ------------------
  |  |  |  Branch (704:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  705|      0|            ctx->error = _err_;           \
  |  |  706|      0|            ctx->error_depth = i;         \
  |  |  707|      0|            ctx->current_cert = x;        \
  |  |  708|      0|            ret = ctx->verify_cb(0, ctx); \
  |  |  709|      0|        } else {                          \
  |  |  710|      0|            ret = 0;                      \
  |  |  711|      0|        }                                 \
  |  |  712|      0|        if (!ret)                         \
  |  |  ------------------
  |  |  |  Branch (712:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  713|      0|            goto done;                    \
  |  |  714|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (714:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  833|      0|    }
  834|       |
  835|  3.55k|done:
  836|  3.55k|    return ret;
  837|      0|}

v3_bcons.c:i2v_BASIC_CONSTRAINTS:
   51|     10|{
   52|     10|    X509V3_add_value_bool("CA", bcons->ca, &extlist);
   53|     10|    X509V3_add_value_int("pathlen", bcons->pathlen, &extlist);
   54|     10|    return extlist;
   55|     10|}

i2v_ASN1_BIT_STRING:
   48|     10|{
   49|     10|    BIT_STRING_BITNAME *bnam;
   50|     10|    int last_seen_bit = -1;
   51|       |
   52|    110|    for (bnam = method->usr_data; bnam->lname; bnam++) {
  ------------------
  |  Branch (52:35): [True: 100, False: 10]
  ------------------
   53|       |        /*
   54|       |         * If the bitnumber did not change from the last iteration, this entry
   55|       |         * is an an alias for the previous bit; treat the first result as
   56|       |         * canonical and ignore the rest.
   57|       |         */
   58|    100|        if (last_seen_bit == bnam->bitnum)
  ------------------
  |  Branch (58:13): [True: 10, False: 90]
  ------------------
   59|     10|            continue;
   60|     90|        last_seen_bit = bnam->bitnum;
   61|     90|        if (ASN1_BIT_STRING_get_bit(bits, bnam->bitnum))
  ------------------
  |  Branch (61:13): [True: 20, False: 70]
  ------------------
   62|     20|            X509V3_add_value(bnam->lname, NULL, &ret);
   63|     90|    }
   64|     10|    return ret;
   65|     10|}

v3_extku.c:i2v_EXTENDED_KEY_USAGE:
   79|     10|{
   80|     10|    EXTENDED_KEY_USAGE *eku = a;
   81|     10|    int i;
   82|     10|    ASN1_OBJECT *obj;
   83|     10|    char obj_tmp[80];
   84|     20|    for (i = 0; i < sk_ASN1_OBJECT_num(eku); i++) {
  ------------------
  |  |  588|     20|#define sk_ASN1_OBJECT_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_OBJECT_sk_type(sk))
  ------------------
  |  Branch (84:17): [True: 10, False: 10]
  ------------------
   85|     10|        obj = sk_ASN1_OBJECT_value(eku, i);
  ------------------
  |  |  589|     10|#define sk_ASN1_OBJECT_value(sk, idx) ((ASN1_OBJECT *)OPENSSL_sk_value(ossl_check_const_ASN1_OBJECT_sk_type(sk), (idx)))
  ------------------
   86|     10|        i2t_ASN1_OBJECT(obj_tmp, 80, obj);
   87|       |        X509V3_add_value(NULL, obj_tmp, &ext_list);
   88|     10|    }
   89|     10|    return ext_list;
   90|     10|}

X509V3_EXT_get_nid:
   54|  54.1k|{
   55|  54.1k|    X509V3_EXT_METHOD tmp;
   56|  54.1k|    const X509V3_EXT_METHOD *t = &tmp, *const * ret;
   57|  54.1k|    int idx;
   58|       |
   59|  54.1k|    if (nid < 0)
  ------------------
  |  Branch (59:9): [True: 0, False: 54.1k]
  ------------------
   60|      0|        return NULL;
   61|  54.1k|    tmp.ext_nid = nid;
   62|  54.1k|    ret = OBJ_bsearch_ext(&t, standard_exts, STANDARD_EXTENSION_COUNT);
  ------------------
  |  |   99|  54.1k|#define STANDARD_EXTENSION_COUNT OSSL_NELEM(standard_exts)
  |  |  ------------------
  |  |  |  |   14|  54.1k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
   63|  54.1k|    if (ret)
  ------------------
  |  Branch (63:9): [True: 54.1k, False: 0]
  ------------------
   64|  54.1k|        return *ret;
   65|      0|    if (!ext_list)
  ------------------
  |  Branch (65:9): [True: 0, False: 0]
  ------------------
   66|      0|        return NULL;
   67|       |    /* Ideally, this would be done under a lock */
   68|      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))
  ------------------
   69|      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))
  ------------------
   70|       |    /* A failure to locate the item is handled by the value method */
   71|      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)))
  ------------------
   72|      0|}
X509V3_EXT_get:
   75|  54.1k|{
   76|  54.1k|    int nid;
   77|  54.1k|    if ((nid = OBJ_obj2nid(X509_EXTENSION_get_object(ext))) == NID_undef)
  ------------------
  |  |   18|  54.1k|#define NID_undef                       0
  ------------------
  |  Branch (77:9): [True: 0, False: 54.1k]
  ------------------
   78|      0|        return NULL;
   79|  54.1k|    return X509V3_EXT_get_nid(nid);
   80|  54.1k|}
X509V3_EXT_d2i:
  168|  54.0k|{
  169|  54.0k|    const X509V3_EXT_METHOD *method;
  170|  54.0k|    const unsigned char *p;
  171|  54.0k|    const ASN1_STRING *extvalue;
  172|  54.0k|    int extlen;
  173|       |
  174|  54.0k|    if ((method = X509V3_EXT_get(ext)) == NULL)
  ------------------
  |  Branch (174:9): [True: 0, False: 54.0k]
  ------------------
  175|      0|        return NULL;
  176|  54.0k|    extvalue = X509_EXTENSION_get_data(ext);
  177|  54.0k|    p = ASN1_STRING_get0_data(extvalue);
  178|  54.0k|    extlen = ASN1_STRING_length(extvalue);
  179|  54.0k|    if (method->it)
  ------------------
  |  Branch (179:9): [True: 54.0k, False: 0]
  ------------------
  180|  54.0k|        return ASN1_item_d2i(NULL, &p, extlen, ASN1_ITEM_ptr(method->it));
  ------------------
  |  |  394|  54.0k|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  181|      0|    return method->d2i(NULL, &p, extlen);
  182|  54.0k|}
X509V3_get_d2i:
  202|   133k|{
  203|   133k|    int lastpos, i;
  204|   133k|    X509_EXTENSION *ex, *found_ex = NULL;
  205|       |
  206|   133k|    if (!x) {
  ------------------
  |  Branch (206:9): [True: 0, False: 133k]
  ------------------
  207|      0|        if (idx)
  ------------------
  |  Branch (207:13): [True: 0, False: 0]
  ------------------
  208|      0|            *idx = -1;
  209|      0|        if (crit)
  ------------------
  |  Branch (209:13): [True: 0, False: 0]
  ------------------
  210|      0|            *crit = -1;
  211|      0|        return NULL;
  212|      0|    }
  213|   133k|    if (idx)
  ------------------
  |  Branch (213:9): [True: 0, False: 133k]
  ------------------
  214|      0|        lastpos = *idx + 1;
  215|   133k|    else
  216|   133k|        lastpos = 0;
  217|   133k|    if (lastpos < 0)
  ------------------
  |  Branch (217:9): [True: 0, False: 133k]
  ------------------
  218|      0|        lastpos = 0;
  219|   800k|    for (i = lastpos; i < sk_X509_EXTENSION_num(x); i++) {
  ------------------
  |  |  242|   800k|#define sk_X509_EXTENSION_num(sk) OPENSSL_sk_num(ossl_check_const_X509_EXTENSION_sk_type(sk))
  ------------------
  |  Branch (219:23): [True: 666k, False: 133k]
  ------------------
  220|   666k|        ex = sk_X509_EXTENSION_value(x, i);
  ------------------
  |  |  243|   666k|#define sk_X509_EXTENSION_value(sk, idx) ((X509_EXTENSION *)OPENSSL_sk_value(ossl_check_const_X509_EXTENSION_sk_type(sk), (idx)))
  ------------------
  221|   666k|        if (OBJ_obj2nid(X509_EXTENSION_get_object(ex)) == nid) {
  ------------------
  |  Branch (221:13): [True: 54.0k, False: 612k]
  ------------------
  222|  54.0k|            if (idx) {
  ------------------
  |  Branch (222:17): [True: 0, False: 54.0k]
  ------------------
  223|      0|                *idx = i;
  224|      0|                found_ex = ex;
  225|      0|                break;
  226|  54.0k|            } else if (found_ex) {
  ------------------
  |  Branch (226:24): [True: 0, False: 54.0k]
  ------------------
  227|       |                /* Found more than one */
  228|      0|                if (crit)
  ------------------
  |  Branch (228:21): [True: 0, False: 0]
  ------------------
  229|      0|                    *crit = -2;
  230|      0|                return NULL;
  231|      0|            }
  232|  54.0k|            found_ex = ex;
  233|  54.0k|        }
  234|   666k|    }
  235|   133k|    if (found_ex) {
  ------------------
  |  Branch (235:9): [True: 54.0k, False: 79.3k]
  ------------------
  236|       |        /* Found it */
  237|  54.0k|        if (crit)
  ------------------
  |  Branch (237:13): [True: 54.0k, False: 0]
  ------------------
  238|  54.0k|            *crit = X509_EXTENSION_get_critical(found_ex);
  239|  54.0k|        return X509V3_EXT_d2i(found_ex);
  240|  54.0k|    }
  241|       |
  242|       |    /* Extension not found */
  243|  79.3k|    if (idx)
  ------------------
  |  Branch (243:9): [True: 0, False: 79.3k]
  ------------------
  244|      0|        *idx = -1;
  245|  79.3k|    if (crit)
  ------------------
  |  Branch (245:9): [True: 75.6k, False: 3.62k]
  ------------------
  246|  75.6k|        *crit = -1;
  247|       |    return NULL;
  248|   133k|}
v3_lib.c:ext_cmp:
   42|   238k|{
   43|   238k|    return ((*a)->ext_nid - (*b)->ext_nid);
   44|   238k|}

X509V3_EXT_val_prn:
   26|     40|{
   27|     40|    int i;
   28|     40|    CONF_VALUE *nval;
   29|     40|    if (!val)
  ------------------
  |  Branch (29:9): [True: 0, False: 40]
  ------------------
   30|      0|        return;
   31|     40|    if (!ml || !sk_CONF_VALUE_num(val)) {
  ------------------
  |  |   48|     10|#define sk_CONF_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_CONF_VALUE_sk_type(sk))
  ------------------
  |  Branch (31:9): [True: 30, False: 10]
  |  Branch (31:16): [True: 0, False: 10]
  ------------------
   32|     30|        BIO_printf(out, "%*s", indent, "");
   33|     30|        if (!sk_CONF_VALUE_num(val))
  ------------------
  |  |   48|     30|#define sk_CONF_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_CONF_VALUE_sk_type(sk))
  ------------------
  |  Branch (33:13): [True: 0, False: 30]
  ------------------
   34|      0|            BIO_puts(out, "<EMPTY>\n");
   35|     30|    }
   36|     90|    for (i = 0; i < sk_CONF_VALUE_num(val); i++) {
  ------------------
  |  |   48|     90|#define sk_CONF_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_CONF_VALUE_sk_type(sk))
  ------------------
  |  Branch (36:17): [True: 50, False: 40]
  ------------------
   37|     50|        if (ml) {
  ------------------
  |  Branch (37:13): [True: 10, False: 40]
  ------------------
   38|     10|            if (i > 0)
  ------------------
  |  Branch (38:17): [True: 0, False: 10]
  ------------------
   39|      0|                BIO_printf(out, "\n");
   40|     10|            BIO_printf(out, "%*s", indent, "");
   41|     40|        } else if (i > 0)
  ------------------
  |  Branch (41:20): [True: 10, False: 30]
  ------------------
   42|     10|            BIO_printf(out, ", ");
   43|     50|        nval = sk_CONF_VALUE_value(val, i);
  ------------------
  |  |   49|     50|#define sk_CONF_VALUE_value(sk, idx) ((CONF_VALUE *)OPENSSL_sk_value(ossl_check_const_CONF_VALUE_sk_type(sk), (idx)))
  ------------------
   44|     50|        if (!nval->name)
  ------------------
  |  Branch (44:13): [True: 20, False: 30]
  ------------------
   45|     20|            BIO_puts(out, nval->value);
   46|     30|        else if (!nval->value)
  ------------------
  |  Branch (46:18): [True: 20, False: 10]
  ------------------
   47|     20|            BIO_puts(out, nval->name);
   48|     10|#ifndef CHARSET_EBCDIC
   49|     10|        else
   50|     10|            BIO_printf(out, "%s:%s", nval->name, nval->value);
   51|       |#else
   52|       |        else {
   53|       |            int len;
   54|       |            char *tmp;
   55|       |            len = strlen(nval->value) + 1;
   56|       |            tmp = OPENSSL_malloc(len);
   57|       |            if (tmp != NULL) {
   58|       |                ascii2ebcdic(tmp, nval->value, len);
   59|       |                BIO_printf(out, "%s:%s", nval->name, tmp);
   60|       |                OPENSSL_free(tmp);
   61|       |            }
   62|       |        }
   63|       |#endif
   64|     50|    }
   65|     40|}
X509V3_EXT_print:
   71|     50|{
   72|     50|    void *ext_str = NULL;
   73|     50|    char *value = NULL;
   74|     50|    const ASN1_OCTET_STRING *extoct;
   75|     50|    const unsigned char *p;
   76|     50|    int extlen;
   77|     50|    const X509V3_EXT_METHOD *method;
   78|     50|    STACK_OF(CONF_VALUE) *nval = NULL;
  ------------------
  |  |   33|     50|#define STACK_OF(type) struct stack_st_##type
  ------------------
   79|     50|    int ok = 1;
   80|       |
   81|     50|    extoct = X509_EXTENSION_get_data(ext);
   82|     50|    p = ASN1_STRING_get0_data(extoct);
   83|     50|    extlen = ASN1_STRING_length(extoct);
   84|       |
   85|     50|    if ((method = X509V3_EXT_get(ext)) == NULL)
  ------------------
  |  Branch (85:9): [True: 0, False: 50]
  ------------------
   86|      0|        return unknown_ext_print(out, p, extlen, flag, indent, 0);
   87|     50|    if (method->it)
  ------------------
  |  Branch (87:9): [True: 50, False: 0]
  ------------------
   88|     50|        ext_str = ASN1_item_d2i(NULL, &p, extlen, ASN1_ITEM_ptr(method->it));
  ------------------
  |  |  394|     50|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
   89|      0|    else
   90|      0|        ext_str = method->d2i(NULL, &p, extlen);
   91|       |
   92|     50|    if (!ext_str)
  ------------------
  |  Branch (92:9): [True: 0, False: 50]
  ------------------
   93|      0|        return unknown_ext_print(out, p, extlen, flag, indent, 1);
   94|       |
   95|     50|    if (method->i2s) {
  ------------------
  |  Branch (95:9): [True: 10, False: 40]
  ------------------
   96|     10|        if ((value = method->i2s(method, ext_str)) == NULL) {
  ------------------
  |  Branch (96:13): [True: 0, False: 10]
  ------------------
   97|      0|            ok = 0;
   98|      0|            goto err;
   99|      0|        }
  100|     10|#ifndef CHARSET_EBCDIC
  101|     10|        BIO_printf(out, "%*s%s", indent, "", value);
  102|       |#else
  103|       |        {
  104|       |            int len;
  105|       |            char *tmp;
  106|       |            len = strlen(value) + 1;
  107|       |            tmp = OPENSSL_malloc(len);
  108|       |            if (tmp != NULL) {
  109|       |                ascii2ebcdic(tmp, value, len);
  110|       |                BIO_printf(out, "%*s%s", indent, "", tmp);
  111|       |                OPENSSL_free(tmp);
  112|       |            }
  113|       |        }
  114|       |#endif
  115|     40|    } else if (method->i2v) {
  ------------------
  |  Branch (115:16): [True: 40, False: 0]
  ------------------
  116|     40|        if ((nval = method->i2v(method, ext_str, NULL)) == NULL) {
  ------------------
  |  Branch (116:13): [True: 0, False: 40]
  ------------------
  117|      0|            ok = 0;
  118|      0|            goto err;
  119|      0|        }
  120|     40|        X509V3_EXT_val_prn(out, nval, indent,
  121|     40|            method->ext_flags & X509V3_EXT_MULTILINE);
  ------------------
  |  |  146|     40|#define X509V3_EXT_MULTILINE 0x4
  ------------------
  122|     40|    } else if (method->i2r) {
  ------------------
  |  Branch (122:16): [True: 0, False: 0]
  ------------------
  123|      0|        if (!method->i2r(method, ext_str, out, indent))
  ------------------
  |  Branch (123:13): [True: 0, False: 0]
  ------------------
  124|      0|            ok = 0;
  125|      0|    } else
  126|      0|        ok = 0;
  127|       |
  128|     50|err:
  129|     50|    sk_CONF_VALUE_pop_free(nval, X509V3_conf_free);
  ------------------
  |  |   62|     50|#define sk_CONF_VALUE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_freefunc_type(freefunc))
  ------------------
  130|     50|    OPENSSL_free(value);
  ------------------
  |  |  132|     50|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  131|     50|    if (method->it)
  ------------------
  |  Branch (131:9): [True: 50, False: 0]
  ------------------
  132|     50|        ASN1_item_free(ext_str, ASN1_ITEM_ptr(method->it));
  ------------------
  |  |  394|     50|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  133|      0|    else
  134|      0|        method->ext_free(ext_str);
  135|     50|    return ok;
  136|     50|}

X509_check_purpose:
   83|  17.7k|{
   84|  17.7k|    int idx;
   85|  17.7k|    const X509_PURPOSE *pt;
   86|       |
   87|       |    /*
   88|       |     * TODO: This cast can be dropped when https://github.com/openssl/openssl/pull/30067
   89|       |     * gets merged
   90|       |     */
   91|  17.7k|    if (!ossl_x509v3_cache_extensions((X509 *)x))
  ------------------
  |  Branch (91:9): [True: 0, False: 17.7k]
  ------------------
   92|      0|        return -1;
   93|  17.7k|    if (id == -1)
  ------------------
  |  Branch (93:9): [True: 14.2k, False: 3.55k]
  ------------------
   94|  14.2k|        return 1;
   95|       |
   96|  3.55k|    idx = X509_PURPOSE_get_by_id(id);
   97|  3.55k|    if (idx == -1)
  ------------------
  |  Branch (97:9): [True: 0, False: 3.55k]
  ------------------
   98|      0|        return -1;
   99|  3.55k|    pt = X509_PURPOSE_get0(idx);
  100|  3.55k|    return pt->check_purpose(pt, x, non_leaf);
  101|  3.55k|}
X509_PURPOSE_get0:
  132|  10.8k|{
  133|  10.8k|    if (idx < 0)
  ------------------
  |  Branch (133:9): [True: 7.25k, False: 3.55k]
  ------------------
  134|  7.25k|        return NULL;
  135|  3.55k|    if (idx < (int)X509_PURPOSE_COUNT)
  ------------------
  |  |   72|  3.55k|#define X509_PURPOSE_COUNT OSSL_NELEM(xstandard)
  |  |  ------------------
  |  |  |  |   14|  3.55k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
  |  Branch (135:9): [True: 3.55k, False: 0]
  ------------------
  136|  3.55k|        return xstandard + idx;
  137|      0|    return sk_X509_PURPOSE_value(xptable, idx - X509_PURPOSE_COUNT);
  ------------------
  |  |  744|      0|#define sk_X509_PURPOSE_value(sk, idx) ((X509_PURPOSE *)OPENSSL_sk_value(ossl_check_const_X509_PURPOSE_sk_type(sk), (idx)))
  ------------------
  138|  3.55k|}
X509_PURPOSE_get_by_id:
  155|  10.8k|{
  156|  10.8k|    X509_PURPOSE tmp;
  157|  10.8k|    int idx;
  158|       |
  159|  10.8k|    if (purpose >= X509_PURPOSE_MIN && purpose <= X509_PURPOSE_MAX)
  ------------------
  |  |  783|  21.6k|#define X509_PURPOSE_MIN 1
  ------------------
                  if (purpose >= X509_PURPOSE_MIN && purpose <= X509_PURPOSE_MAX)
  ------------------
  |  |  784|  3.55k|#define X509_PURPOSE_MAX 10
  ------------------
  |  Branch (159:9): [True: 3.55k, False: 7.25k]
  |  Branch (159:40): [True: 3.55k, False: 0]
  ------------------
  160|  3.55k|        return purpose - X509_PURPOSE_MIN;
  ------------------
  |  |  783|  3.55k|#define X509_PURPOSE_MIN 1
  ------------------
  161|  7.25k|    if (xptable == NULL)
  ------------------
  |  Branch (161:9): [True: 7.25k, False: 0]
  ------------------
  162|  7.25k|        return -1;
  163|      0|    tmp.purpose = purpose;
  164|      0|    idx = sk_X509_PURPOSE_find(xptable, &tmp);
  ------------------
  |  |  760|      0|#define sk_X509_PURPOSE_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509_PURPOSE_sk_type(sk), ossl_check_X509_PURPOSE_type(ptr))
  ------------------
  165|      0|    if (idx < 0)
  ------------------
  |  Branch (165:9): [True: 0, False: 0]
  ------------------
  166|      0|        return -1;
  167|      0|    return idx + X509_PURPOSE_COUNT;
  ------------------
  |  |   72|      0|#define X509_PURPOSE_COUNT OSSL_NELEM(xstandard)
  |  |  ------------------
  |  |  |  |   14|      0|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
  168|      0|}
X509_supported_extension:
  308|  21.6k|{
  309|       |    /*
  310|       |     * This table is a list of the NIDs of supported extensions: that is
  311|       |     * those which are used by the verify process. If an extension is
  312|       |     * critical and doesn't appear in this list then the verify process will
  313|       |     * normally reject the certificate. The list must be kept in numerical
  314|       |     * order because it will be searched using bsearch.
  315|       |     */
  316|  21.6k|    static const int supported_nids[] = {
  317|  21.6k|        NID_netscape_cert_type, /* 71 */
  ------------------
  |  | 2949|  21.6k|#define NID_netscape_cert_type          71
  ------------------
  318|  21.6k|        NID_key_usage, /* 83 */
  ------------------
  |  | 2689|  21.6k|#define NID_key_usage           83
  ------------------
  319|  21.6k|        NID_subject_alt_name, /* 85 */
  ------------------
  |  | 2699|  21.6k|#define NID_subject_alt_name            85
  ------------------
  320|  21.6k|        NID_basic_constraints, /* 87 */
  ------------------
  |  | 2709|  21.6k|#define NID_basic_constraints           87
  ------------------
  321|  21.6k|        NID_certificate_policies, /* 89 */
  ------------------
  |  | 2754|  21.6k|#define NID_certificate_policies                89
  ------------------
  322|  21.6k|        NID_crl_distribution_points, /* 103 */
  ------------------
  |  | 2749|  21.6k|#define NID_crl_distribution_points             103
  ------------------
  323|  21.6k|        NID_ext_key_usage, /* 126 */
  ------------------
  |  | 2779|  21.6k|#define NID_ext_key_usage               126
  ------------------
  324|  21.6k|#ifndef OPENSSL_NO_RFC3779
  325|  21.6k|        NID_sbgp_ipAddrBlock, /* 290 */
  ------------------
  |  | 1630|  21.6k|#define NID_sbgp_ipAddrBlock            290
  ------------------
  326|  21.6k|        NID_sbgp_autonomousSysNum, /* 291 */
  ------------------
  |  | 1634|  21.6k|#define NID_sbgp_autonomousSysNum               291
  ------------------
  327|  21.6k|#endif
  328|  21.6k|        NID_id_pkix_OCSP_noCheck, /* 369 */
  ------------------
  |  | 2228|  21.6k|#define NID_id_pkix_OCSP_noCheck                369
  ------------------
  329|  21.6k|        NID_policy_constraints, /* 401 */
  ------------------
  |  | 2774|  21.6k|#define NID_policy_constraints          401
  ------------------
  330|  21.6k|        NID_proxyCertInfo, /* 663 */
  ------------------
  |  | 1652|  21.6k|#define NID_proxyCertInfo               663
  ------------------
  331|  21.6k|        NID_name_constraints, /* 666 */
  ------------------
  |  | 2744|  21.6k|#define NID_name_constraints            666
  ------------------
  332|  21.6k|        NID_policy_mappings, /* 747 */
  ------------------
  |  | 2764|  21.6k|#define NID_policy_mappings             747
  ------------------
  333|  21.6k|        NID_inhibit_any_policy /* 748 */
  ------------------
  |  | 2834|  21.6k|#define NID_inhibit_any_policy          748
  ------------------
  334|  21.6k|    };
  335|       |
  336|  21.6k|    int ex_nid = OBJ_obj2nid(X509_EXTENSION_get_object(ex));
  337|       |
  338|  21.6k|    if (ex_nid == NID_undef)
  ------------------
  |  |   18|  21.6k|#define NID_undef                       0
  ------------------
  |  Branch (338:9): [True: 0, False: 21.6k]
  ------------------
  339|      0|        return 0;
  340|       |
  341|  21.6k|    if (OBJ_bsearch_nid(&ex_nid, supported_nids, OSSL_NELEM(supported_nids)))
  ------------------
  |  |   14|  21.6k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (341:9): [True: 21.6k, False: 0]
  ------------------
  342|  21.6k|        return 1;
  343|      0|    return 0;
  344|  21.6k|}
ossl_x509v3_cache_extensions:
  444|  42.8k|{
  445|  42.8k|    BASIC_CONSTRAINTS *bs;
  446|  42.8k|    PROXY_CERT_INFO_EXTENSION *pci;
  447|  42.8k|    ASN1_BIT_STRING *usage;
  448|  42.8k|    ASN1_BIT_STRING *ns;
  449|  42.8k|    EXTENDED_KEY_USAGE *extusage;
  450|  42.8k|    int i;
  451|  42.8k|    int res;
  452|  42.8k|    uint32_t tmp_ex_flags;
  453|  42.8k|    unsigned char tmp_sha1_hash[SHA_DIGEST_LENGTH];
  454|  42.8k|    long tmp_ex_pathlen;
  455|  42.8k|    long tmp_ex_pcpathlen;
  456|  42.8k|    uint32_t tmp_ex_kusage;
  457|  42.8k|    uint32_t tmp_ex_xkusage;
  458|  42.8k|    uint32_t tmp_ex_nscert;
  459|  42.8k|    ASN1_OCTET_STRING *tmp_skid;
  460|  42.8k|    AUTHORITY_KEYID *tmp_akid;
  461|  42.8k|    STACK_OF(GENERAL_NAME) *tmp_altname;
  ------------------
  |  |   33|  42.8k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  462|  42.8k|    NAME_CONSTRAINTS *tmp_nc;
  463|  42.8k|    STACK_OF(DIST_POINT) *tmp_crldp = NULL;
  ------------------
  |  |   33|  42.8k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  464|  42.8k|    X509_SIG_INFO tmp_siginf;
  465|       |
  466|  42.8k|#ifdef tsan_ld_acq
  467|       |    /* Fast lock-free check, see end of the function for details. */
  468|  42.8k|    if (tsan_ld_acq((TSAN_QUALIFIER int *)&const_x->ex_cached))
  ------------------
  |  |   64|  42.8k|#define tsan_ld_acq(ptr) atomic_load_explicit((ptr), memory_order_acquire)
  |  |  ------------------
  |  |  |  Branch (64:26): [True: 32.0k, False: 10.8k]
  |  |  ------------------
  ------------------
  469|  32.0k|        return (const_x->ex_flags & EXFLAG_INVALID) == 0;
  ------------------
  |  |  676|  32.0k|#define EXFLAG_INVALID 0x80
  ------------------
  470|  10.8k|#endif
  471|       |
  472|  10.8k|    if (!CRYPTO_THREAD_read_lock(const_x->lock))
  ------------------
  |  Branch (472:9): [True: 0, False: 10.8k]
  ------------------
  473|      0|        return 0;
  474|  10.8k|    tmp_ex_flags = const_x->ex_flags;
  475|  10.8k|    tmp_ex_pcpathlen = const_x->ex_pcpathlen;
  476|  10.8k|    tmp_ex_kusage = const_x->ex_kusage;
  477|  10.8k|    tmp_ex_nscert = const_x->ex_nscert;
  478|       |
  479|  10.8k|    if ((tmp_ex_flags & EXFLAG_SET) != 0) { /* Cert has already been processed */
  ------------------
  |  |  678|  10.8k|#define EXFLAG_SET 0x100
  ------------------
  |  Branch (479:9): [True: 0, False: 10.8k]
  ------------------
  480|      0|        CRYPTO_THREAD_unlock(const_x->lock);
  481|      0|        return (tmp_ex_flags & EXFLAG_INVALID) == 0;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  482|      0|    }
  483|       |
  484|  10.8k|    ERR_set_mark();
  485|       |
  486|       |    /* Cache the SHA1 digest of the cert */
  487|  10.8k|    if (!X509_digest(const_x, EVP_sha1(), tmp_sha1_hash, NULL))
  ------------------
  |  Branch (487:9): [True: 0, False: 10.8k]
  ------------------
  488|      0|        tmp_ex_flags |= EXFLAG_NO_FINGERPRINT;
  ------------------
  |  |  686|      0|#define EXFLAG_NO_FINGERPRINT 0x100000
  ------------------
  489|       |
  490|       |    /* V1 should mean no extensions ... */
  491|  10.8k|    if (X509_get_version(const_x) == X509_VERSION_1)
  ------------------
  |  |  850|  10.8k|#define X509_VERSION_1 0
  ------------------
  |  Branch (491:9): [True: 0, False: 10.8k]
  ------------------
  492|      0|        tmp_ex_flags |= EXFLAG_V1;
  ------------------
  |  |  675|      0|#define EXFLAG_V1 0x40
  ------------------
  493|       |
  494|       |    /* Handle basic constraints */
  495|  10.8k|    tmp_ex_pathlen = -1;
  496|  10.8k|    if ((bs = X509_get_ext_d2i(const_x, NID_basic_constraints, &i, NULL)) != NULL) {
  ------------------
  |  | 2709|  10.8k|#define NID_basic_constraints           87
  ------------------
  |  Branch (496:9): [True: 10.8k, False: 0]
  ------------------
  497|  10.8k|        if (bs->ca)
  ------------------
  |  Branch (497:13): [True: 10.8k, False: 0]
  ------------------
  498|  10.8k|            tmp_ex_flags |= EXFLAG_CA;
  ------------------
  |  |  673|  10.8k|#define EXFLAG_CA 0x10
  ------------------
  499|  10.8k|        if (bs->pathlen != NULL) {
  ------------------
  |  Branch (499:13): [True: 0, False: 10.8k]
  ------------------
  500|       |            /*
  501|       |             * The error case !bs->ca is checked by check_chain()
  502|       |             * in case ctx->param->flags & X509_V_FLAG_X509_STRICT
  503|       |             */
  504|      0|            if (bs->pathlen->type == V_ASN1_NEG_INTEGER) {
  ------------------
  |  |  100|      0|#define V_ASN1_NEG_INTEGER (2 | V_ASN1_NEG)
  |  |  ------------------
  |  |  |  |   99|      0|#define V_ASN1_NEG 0x100
  |  |  ------------------
  ------------------
  |  Branch (504:17): [True: 0, False: 0]
  ------------------
  505|      0|                ERR_raise(ERR_LIB_X509V3, X509V3_R_NEGATIVE_PATHLEN);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  506|      0|                tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  507|      0|            } else {
  508|      0|                tmp_ex_pathlen = ASN1_INTEGER_get(bs->pathlen);
  509|      0|            }
  510|      0|        }
  511|  10.8k|        BASIC_CONSTRAINTS_free(bs);
  512|  10.8k|        tmp_ex_flags |= EXFLAG_BCONS;
  ------------------
  |  |  668|  10.8k|#define EXFLAG_BCONS 0x1
  ------------------
  513|  10.8k|    } else if (i != -1) {
  ------------------
  |  Branch (513:16): [True: 0, False: 0]
  ------------------
  514|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  515|      0|    }
  516|       |
  517|       |    /* Handle proxy certificates */
  518|  10.8k|    if ((pci = X509_get_ext_d2i(const_x, NID_proxyCertInfo, &i, NULL)) != NULL) {
  ------------------
  |  | 1652|  10.8k|#define NID_proxyCertInfo               663
  ------------------
  |  Branch (518:9): [True: 0, False: 10.8k]
  ------------------
  519|      0|        if ((tmp_ex_flags & EXFLAG_CA) != 0
  ------------------
  |  |  673|      0|#define EXFLAG_CA 0x10
  ------------------
  |  Branch (519:13): [True: 0, False: 0]
  ------------------
  520|      0|            || X509_get_ext_by_NID(const_x, NID_subject_alt_name, -1) >= 0
  ------------------
  |  | 2699|      0|#define NID_subject_alt_name            85
  ------------------
  |  Branch (520:16): [True: 0, False: 0]
  ------------------
  521|      0|            || X509_get_ext_by_NID(const_x, NID_issuer_alt_name, -1) >= 0) {
  ------------------
  |  | 2704|      0|#define NID_issuer_alt_name             86
  ------------------
  |  Branch (521:16): [True: 0, False: 0]
  ------------------
  522|      0|            tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  523|      0|        }
  524|      0|        if (pci->pcPathLengthConstraint != NULL)
  ------------------
  |  Branch (524:13): [True: 0, False: 0]
  ------------------
  525|      0|            tmp_ex_pcpathlen = ASN1_INTEGER_get(pci->pcPathLengthConstraint);
  526|      0|        else
  527|      0|            tmp_ex_pcpathlen = -1;
  528|      0|        PROXY_CERT_INFO_EXTENSION_free(pci);
  529|      0|        tmp_ex_flags |= EXFLAG_PROXY;
  ------------------
  |  |  680|      0|#define EXFLAG_PROXY 0x400
  ------------------
  530|  10.8k|    } else if (i != -1) {
  ------------------
  |  Branch (530:16): [True: 0, False: 10.8k]
  ------------------
  531|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  532|      0|    }
  533|       |
  534|       |    /* Handle (basic) key usage */
  535|  10.8k|    if ((usage = X509_get_ext_d2i(const_x, NID_key_usage, &i, NULL)) != NULL) {
  ------------------
  |  | 2689|  10.8k|#define NID_key_usage           83
  ------------------
  |  Branch (535:9): [True: 10.8k, False: 0]
  ------------------
  536|  10.8k|        tmp_ex_kusage = 0;
  537|  10.8k|        if (usage->length > 0) {
  ------------------
  |  Branch (537:13): [True: 10.8k, False: 0]
  ------------------
  538|  10.8k|            tmp_ex_kusage = usage->data[0];
  539|  10.8k|            if (usage->length > 1)
  ------------------
  |  Branch (539:17): [True: 0, False: 10.8k]
  ------------------
  540|      0|                tmp_ex_kusage |= usage->data[1] << 8;
  541|  10.8k|        }
  542|  10.8k|        tmp_ex_flags |= EXFLAG_KUSAGE;
  ------------------
  |  |  669|  10.8k|#define EXFLAG_KUSAGE 0x2
  ------------------
  543|  10.8k|        ASN1_BIT_STRING_free(usage);
  544|       |        /* Check for empty key usage according to RFC 5280 section 4.2.1.3 */
  545|  10.8k|        if (tmp_ex_kusage == 0) {
  ------------------
  |  Branch (545:13): [True: 0, False: 10.8k]
  ------------------
  546|      0|            ERR_raise(ERR_LIB_X509V3, X509V3_R_EMPTY_KEY_USAGE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  547|      0|            tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  548|      0|        }
  549|  10.8k|    } else if (i != -1) {
  ------------------
  |  Branch (549:16): [True: 0, False: 0]
  ------------------
  550|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  551|      0|    }
  552|       |
  553|       |    /* Handle extended key usage */
  554|  10.8k|    tmp_ex_xkusage = 0;
  555|  10.8k|    if ((extusage = X509_get_ext_d2i(const_x, NID_ext_key_usage, &i, NULL)) != NULL) {
  ------------------
  |  | 2779|  10.8k|#define NID_ext_key_usage               126
  ------------------
  |  Branch (555:9): [True: 10.8k, False: 0]
  ------------------
  556|  10.8k|        tmp_ex_flags |= EXFLAG_XKUSAGE;
  ------------------
  |  |  670|  10.8k|#define EXFLAG_XKUSAGE 0x4
  ------------------
  557|  21.6k|        for (i = 0; i < sk_ASN1_OBJECT_num(extusage); i++) {
  ------------------
  |  |  588|  21.6k|#define sk_ASN1_OBJECT_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_OBJECT_sk_type(sk))
  ------------------
  |  Branch (557:21): [True: 10.8k, False: 10.8k]
  ------------------
  558|  10.8k|            switch (OBJ_obj2nid(sk_ASN1_OBJECT_value(extusage, i))) {
  ------------------
  |  |  589|  10.8k|#define sk_ASN1_OBJECT_value(sk, idx) ((ASN1_OBJECT *)OPENSSL_sk_value(ossl_check_const_ASN1_OBJECT_sk_type(sk), (idx)))
  ------------------
  559|  10.8k|            case NID_server_auth:
  ------------------
  |  | 1684|  10.8k|#define NID_server_auth         129
  ------------------
  |  Branch (559:13): [True: 10.8k, False: 0]
  ------------------
  560|  10.8k|                tmp_ex_xkusage |= XKU_SSL_SERVER;
  ------------------
  |  |  718|  10.8k|#define XKU_SSL_SERVER 0x1
  ------------------
  561|  10.8k|                break;
  562|      0|            case NID_client_auth:
  ------------------
  |  | 1689|      0|#define NID_client_auth         130
  ------------------
  |  Branch (562:13): [True: 0, False: 10.8k]
  ------------------
  563|      0|                tmp_ex_xkusage |= XKU_SSL_CLIENT;
  ------------------
  |  |  719|      0|#define XKU_SSL_CLIENT 0x2
  ------------------
  564|      0|                break;
  565|      0|            case NID_email_protect:
  ------------------
  |  | 1699|      0|#define NID_email_protect               132
  ------------------
  |  Branch (565:13): [True: 0, False: 10.8k]
  ------------------
  566|      0|                tmp_ex_xkusage |= XKU_SMIME;
  ------------------
  |  |  720|      0|#define XKU_SMIME 0x4
  ------------------
  567|      0|                break;
  568|      0|            case NID_code_sign:
  ------------------
  |  | 1694|      0|#define NID_code_sign           131
  ------------------
  |  Branch (568:13): [True: 0, False: 10.8k]
  ------------------
  569|      0|                tmp_ex_xkusage |= XKU_CODE_SIGN;
  ------------------
  |  |  721|      0|#define XKU_CODE_SIGN 0x8
  ------------------
  570|      0|                break;
  571|      0|            case NID_ms_sgc:
  ------------------
  |  | 1383|      0|#define NID_ms_sgc              137
  ------------------
  |  Branch (571:13): [True: 0, False: 10.8k]
  ------------------
  572|      0|            case NID_ns_sgc:
  ------------------
  |  | 2994|      0|#define NID_ns_sgc              139
  ------------------
  |  Branch (572:13): [True: 0, False: 10.8k]
  ------------------
  573|      0|                tmp_ex_xkusage |= XKU_SGC;
  ------------------
  |  |  722|      0|#define XKU_SGC 0x10 /* Netscape or MS Server-Gated Crypto */
  ------------------
  574|      0|                break;
  575|      0|            case NID_OCSP_sign:
  ------------------
  |  | 1724|      0|#define NID_OCSP_sign           180
  ------------------
  |  Branch (575:13): [True: 0, False: 10.8k]
  ------------------
  576|      0|                tmp_ex_xkusage |= XKU_OCSP_SIGN;
  ------------------
  |  |  723|      0|#define XKU_OCSP_SIGN 0x20
  ------------------
  577|      0|                break;
  578|      0|            case NID_time_stamp:
  ------------------
  |  | 1719|      0|#define NID_time_stamp          133
  ------------------
  |  Branch (578:13): [True: 0, False: 10.8k]
  ------------------
  579|      0|                tmp_ex_xkusage |= XKU_TIMESTAMP;
  ------------------
  |  |  724|      0|#define XKU_TIMESTAMP 0x40
  ------------------
  580|      0|                break;
  581|      0|            case NID_dvcs:
  ------------------
  |  | 1729|      0|#define NID_dvcs                297
  ------------------
  |  Branch (581:13): [True: 0, False: 10.8k]
  ------------------
  582|      0|                tmp_ex_xkusage |= XKU_DVCS;
  ------------------
  |  |  725|      0|#define XKU_DVCS 0x80
  ------------------
  583|      0|                break;
  584|      0|            case NID_anyExtendedKeyUsage:
  ------------------
  |  | 2929|      0|#define NID_anyExtendedKeyUsage         910
  ------------------
  |  Branch (584:13): [True: 0, False: 10.8k]
  ------------------
  585|      0|                tmp_ex_xkusage |= XKU_ANYEKU;
  ------------------
  |  |  726|      0|#define XKU_ANYEKU 0x100
  ------------------
  586|      0|                break;
  587|      0|            default:
  ------------------
  |  Branch (587:13): [True: 0, False: 10.8k]
  ------------------
  588|       |                /* Ignore unknown extended key usage */
  589|      0|                break;
  590|  10.8k|            }
  591|  10.8k|        }
  592|  10.8k|        sk_ASN1_OBJECT_pop_free(extusage, ASN1_OBJECT_free);
  ------------------
  |  |  602|  10.8k|#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))
  ------------------
  593|  10.8k|    } else if (i != -1) {
  ------------------
  |  Branch (593:16): [True: 0, False: 0]
  ------------------
  594|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  595|      0|    }
  596|       |
  597|       |    /* Handle legacy Netscape extension */
  598|  10.8k|    if ((ns = X509_get_ext_d2i(const_x, NID_netscape_cert_type, &i, NULL)) != NULL) {
  ------------------
  |  | 2949|  10.8k|#define NID_netscape_cert_type          71
  ------------------
  |  Branch (598:9): [True: 0, False: 10.8k]
  ------------------
  599|      0|        if (ns->length > 0)
  ------------------
  |  Branch (599:13): [True: 0, False: 0]
  ------------------
  600|      0|            tmp_ex_nscert = ns->data[0];
  601|      0|        else
  602|      0|            tmp_ex_nscert = 0;
  603|      0|        tmp_ex_flags |= EXFLAG_NSCERT;
  ------------------
  |  |  671|      0|#define EXFLAG_NSCERT 0x8
  ------------------
  604|      0|        ASN1_BIT_STRING_free(ns);
  605|  10.8k|    } else if (i != -1) {
  ------------------
  |  Branch (605:16): [True: 0, False: 10.8k]
  ------------------
  606|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  607|      0|    }
  608|       |
  609|       |    /* Handle subject key identifier and issuer/authority key identifier */
  610|  10.8k|    tmp_skid = X509_get_ext_d2i(const_x, NID_subject_key_identifier, &i, NULL);
  ------------------
  |  | 2684|  10.8k|#define NID_subject_key_identifier              82
  ------------------
  611|  10.8k|    if (tmp_skid == NULL && i != -1)
  ------------------
  |  Branch (611:9): [True: 0, False: 10.8k]
  |  Branch (611:29): [True: 0, False: 0]
  ------------------
  612|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  613|       |
  614|  10.8k|    tmp_akid = X509_get_ext_d2i(const_x, NID_authority_key_identifier, &i, NULL);
  ------------------
  |  | 2769|  10.8k|#define NID_authority_key_identifier            90
  ------------------
  615|  10.8k|    if (tmp_akid == NULL && i != -1)
  ------------------
  |  Branch (615:9): [True: 0, False: 10.8k]
  |  Branch (615:29): [True: 0, False: 0]
  ------------------
  616|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  617|       |
  618|       |    /* Setting EXFLAG_SS is equivalent to ossl_x509_likely_issued(const_x, const_x) == X509_V_OK */
  619|  10.8k|    if (X509_NAME_cmp(X509_get_subject_name(const_x), X509_get_issuer_name(const_x)) == 0) {
  ------------------
  |  Branch (619:9): [True: 10.8k, False: 0]
  ------------------
  620|  10.8k|        tmp_ex_flags |= EXFLAG_SI; /* Certificate is self-issued: subject == issuer */
  ------------------
  |  |  674|  10.8k|#define EXFLAG_SI 0x20 /* self-issued, maybe not self-signed */
  ------------------
  621|       |        /*
  622|       |         * When the SKID is missing, which is rare for self-issued certs,
  623|       |         * we could afford doing the (accurate) actual self-signature check, but
  624|       |         * decided against it for efficiency reasons and according to RFC 5280,
  625|       |         * CA certs MUST have an SKID and non-root certs MUST have an AKID.
  626|       |         */
  627|  10.8k|        if (X509_check_akid(const_x, tmp_akid) == X509_V_OK
  ------------------
  |  |  312|  21.6k|#define X509_V_OK 0
  ------------------
  |  Branch (627:13): [True: 10.8k, False: 0]
  ------------------
  628|  10.8k|            && check_sig_alg_match(X509_get0_pubkey(const_x), const_x) == X509_V_OK) {
  ------------------
  |  |  312|  10.8k|#define X509_V_OK 0
  ------------------
  |  Branch (628:16): [True: 10.8k, False: 0]
  ------------------
  629|       |            /*
  630|       |             * Assume self-signed if the signature alg matches the pkey alg and
  631|       |             * AKID is missing or matches respective fields in the same cert
  632|       |             * Not checking if any given key usage extension allows signing.
  633|       |             */
  634|  10.8k|            tmp_ex_flags |= EXFLAG_SS;
  ------------------
  |  |  684|  10.8k|#define EXFLAG_SS 0x2000 /* cert is apparently self-signed */
  ------------------
  635|  10.8k|        }
  636|  10.8k|    }
  637|       |
  638|       |    /* Handle subject alternative names and various other extensions */
  639|  10.8k|    tmp_altname = X509_get_ext_d2i(const_x, NID_subject_alt_name, &i, NULL);
  ------------------
  |  | 2699|  10.8k|#define NID_subject_alt_name            85
  ------------------
  640|  10.8k|    if (tmp_altname == NULL && i != -1)
  ------------------
  |  Branch (640:9): [True: 10.8k, False: 0]
  |  Branch (640:32): [True: 0, False: 10.8k]
  ------------------
  641|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  642|  10.8k|    tmp_nc = X509_get_ext_d2i(const_x, NID_name_constraints, &i, NULL);
  ------------------
  |  | 2744|  10.8k|#define NID_name_constraints            666
  ------------------
  643|  10.8k|    if (tmp_nc == NULL && i != -1)
  ------------------
  |  Branch (643:9): [True: 10.8k, False: 0]
  |  Branch (643:27): [True: 0, False: 10.8k]
  ------------------
  644|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  645|       |
  646|       |    /* Handle CRL distribution point entries */
  647|  10.8k|    res = setup_crldp(const_x, &tmp_crldp);
  648|  10.8k|    if (res == 0)
  ------------------
  |  Branch (648:9): [True: 0, False: 10.8k]
  ------------------
  649|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  650|       |
  651|  10.8k|#ifndef OPENSSL_NO_RFC3779
  652|  10.8k|    STACK_OF(IPAddressFamily) *tmp_rfc3779_addr
  ------------------
  |  |   33|  10.8k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  653|  10.8k|        = X509_get_ext_d2i(const_x, NID_sbgp_ipAddrBlock, &i, NULL);
  ------------------
  |  | 1630|  10.8k|#define NID_sbgp_ipAddrBlock            290
  ------------------
  654|  10.8k|    if (tmp_rfc3779_addr == NULL && i != -1)
  ------------------
  |  Branch (654:9): [True: 10.8k, False: 0]
  |  Branch (654:37): [True: 0, False: 10.8k]
  ------------------
  655|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  656|       |
  657|  10.8k|    struct ASIdentifiers_st *tmp_rfc3779_asid
  658|  10.8k|        = X509_get_ext_d2i(const_x, NID_sbgp_autonomousSysNum, &i, NULL);
  ------------------
  |  | 1634|  10.8k|#define NID_sbgp_autonomousSysNum               291
  ------------------
  659|  10.8k|    if (tmp_rfc3779_asid == NULL && i != -1)
  ------------------
  |  Branch (659:9): [True: 10.8k, False: 0]
  |  Branch (659:37): [True: 0, False: 10.8k]
  ------------------
  660|      0|        tmp_ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  661|  10.8k|#endif
  662|       |
  663|  64.8k|    for (i = 0; i < X509_get_ext_count(const_x); i++) {
  ------------------
  |  Branch (663:17): [True: 54.0k, False: 10.8k]
  ------------------
  664|  54.0k|        const X509_EXTENSION *ex = X509_get_ext(const_x, i);
  665|  54.0k|        int nid = OBJ_obj2nid(X509_EXTENSION_get_object(ex));
  666|       |
  667|  54.0k|        if (nid == NID_freshest_crl)
  ------------------
  |  | 2809|  54.0k|#define NID_freshest_crl                857
  ------------------
  |  Branch (667:13): [True: 0, False: 54.0k]
  ------------------
  668|      0|            tmp_ex_flags |= EXFLAG_FRESHEST;
  ------------------
  |  |  683|      0|#define EXFLAG_FRESHEST 0x1000
  ------------------
  669|  54.0k|        if (!X509_EXTENSION_get_critical(ex))
  ------------------
  |  Branch (669:13): [True: 32.4k, False: 21.6k]
  ------------------
  670|  32.4k|            continue;
  671|  21.6k|        if (!X509_supported_extension(ex)) {
  ------------------
  |  Branch (671:13): [True: 0, False: 21.6k]
  ------------------
  672|      0|            tmp_ex_flags |= EXFLAG_CRITICAL;
  ------------------
  |  |  679|      0|#define EXFLAG_CRITICAL 0x200
  ------------------
  673|      0|            break;
  674|      0|        }
  675|  21.6k|    }
  676|       |
  677|       |    /* Set x->siginf, ignoring errors due to unsupported algos */
  678|  10.8k|    (void)ossl_x509_init_sig_info(const_x, &tmp_siginf);
  679|       |
  680|  10.8k|    tmp_ex_flags |= EXFLAG_SET; /* Indicate that cert has been processed */
  ------------------
  |  |  678|  10.8k|#define EXFLAG_SET 0x100
  ------------------
  681|  10.8k|    ERR_pop_to_mark();
  682|       |
  683|  10.8k|    CRYPTO_THREAD_unlock(const_x->lock);
  684|       |    /*
  685|       |     * Now that we've done all the compute intensive work under read lock
  686|       |     * do all the updating under a write lock
  687|       |     */
  688|  10.8k|    if (!CRYPTO_THREAD_write_lock(const_x->lock))
  ------------------
  |  Branch (688:9): [True: 0, False: 10.8k]
  ------------------
  689|      0|        return 0;
  690|  10.8k|    ((X509 *)const_x)->ex_flags = tmp_ex_flags;
  691|  10.8k|    ((X509 *)const_x)->ex_pathlen = tmp_ex_pathlen;
  692|  10.8k|    ((X509 *)const_x)->ex_pcpathlen = tmp_ex_pcpathlen;
  693|  10.8k|    if (!(tmp_ex_flags & EXFLAG_NO_FINGERPRINT))
  ------------------
  |  |  686|  10.8k|#define EXFLAG_NO_FINGERPRINT 0x100000
  ------------------
  |  Branch (693:9): [True: 10.8k, False: 0]
  ------------------
  694|  10.8k|        memcpy(((X509 *)const_x)->sha1_hash, tmp_sha1_hash, SHA_DIGEST_LENGTH);
  ------------------
  |  |   26|  10.8k|#define SHA_DIGEST_LENGTH 20
  ------------------
  695|  10.8k|    if (tmp_ex_flags & EXFLAG_KUSAGE)
  ------------------
  |  |  669|  10.8k|#define EXFLAG_KUSAGE 0x2
  ------------------
  |  Branch (695:9): [True: 10.8k, False: 0]
  ------------------
  696|  10.8k|        ((X509 *)const_x)->ex_kusage = tmp_ex_kusage;
  697|  10.8k|    ((X509 *)const_x)->ex_xkusage = tmp_ex_xkusage;
  698|  10.8k|    if (tmp_ex_flags & EXFLAG_NSCERT)
  ------------------
  |  |  671|  10.8k|#define EXFLAG_NSCERT 0x8
  ------------------
  |  Branch (698:9): [True: 0, False: 10.8k]
  ------------------
  699|      0|        ((X509 *)const_x)->ex_nscert = tmp_ex_nscert;
  700|  10.8k|    ASN1_OCTET_STRING_free(((X509 *)const_x)->skid);
  701|  10.8k|    ((X509 *)const_x)->skid = tmp_skid;
  702|  10.8k|    AUTHORITY_KEYID_free(((X509 *)const_x)->akid);
  703|  10.8k|    ((X509 *)const_x)->akid = tmp_akid;
  704|  10.8k|    sk_GENERAL_NAME_pop_free(((X509 *)const_x)->altname, GENERAL_NAME_free);
  ------------------
  |  |  256|  10.8k|#define sk_GENERAL_NAME_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_GENERAL_NAME_sk_type(sk), ossl_check_GENERAL_NAME_freefunc_type(freefunc))
  ------------------
  705|  10.8k|    ((X509 *)const_x)->altname = tmp_altname;
  706|  10.8k|    NAME_CONSTRAINTS_free(((X509 *)const_x)->nc);
  707|  10.8k|    ((X509 *)const_x)->nc = tmp_nc;
  708|  10.8k|    sk_DIST_POINT_pop_free(((X509 *)const_x)->crldp, DIST_POINT_free);
  ------------------
  |  |  353|  10.8k|#define sk_DIST_POINT_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_DIST_POINT_sk_type(sk), ossl_check_DIST_POINT_freefunc_type(freefunc))
  ------------------
  709|  10.8k|    ((X509 *)const_x)->crldp = tmp_crldp;
  710|  10.8k|#ifndef OPENSSL_NO_RFC3779
  711|  10.8k|    sk_IPAddressFamily_pop_free(((X509 *)const_x)->rfc3779_addr, IPAddressFamily_free);
  ------------------
  |  | 1269|  10.8k|#define sk_IPAddressFamily_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_IPAddressFamily_sk_type(sk), ossl_check_IPAddressFamily_freefunc_type(freefunc))
  ------------------
  712|  10.8k|    ((X509 *)const_x)->rfc3779_addr = tmp_rfc3779_addr;
  713|  10.8k|    ASIdentifiers_free(((X509 *)const_x)->rfc3779_asid);
  714|  10.8k|    ((X509 *)const_x)->rfc3779_asid = tmp_rfc3779_asid;
  715|  10.8k|#endif
  716|  10.8k|    ((X509 *)const_x)->siginf = tmp_siginf;
  717|       |
  718|  10.8k|#ifdef tsan_st_rel
  719|  10.8k|    tsan_st_rel((TSAN_QUALIFIER int *)&const_x->ex_cached, 1);
  ------------------
  |  |   65|  10.8k|#define tsan_st_rel(ptr, val) atomic_store_explicit((ptr), (val), memory_order_release)
  ------------------
  720|       |    /*
  721|       |     * Above store triggers fast lock-free check in the beginning of the
  722|       |     * function. But one has to ensure that the structure is "stable", i.e.
  723|       |     * all stores are visible on all processors. Hence the release fence.
  724|       |     */
  725|  10.8k|#endif
  726|  10.8k|    CRYPTO_THREAD_unlock(const_x->lock);
  727|  10.8k|    if (tmp_ex_flags & EXFLAG_INVALID) {
  ------------------
  |  |  676|  10.8k|#define EXFLAG_INVALID 0x80
  ------------------
  |  Branch (727:9): [True: 0, False: 10.8k]
  ------------------
  728|      0|        ERR_raise(ERR_LIB_X509V3, X509V3_R_INVALID_CERTIFICATE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  729|      0|        return 0;
  730|      0|    }
  731|  10.8k|    return 1;
  732|  10.8k|}
X509_check_ca:
  786|  3.55k|{
  787|       |    /* Note 0 normally means "not a CA" - but in this case means error. */
  788|  3.55k|    if (!ossl_x509v3_cache_extensions(x))
  ------------------
  |  Branch (788:9): [True: 0, False: 3.55k]
  ------------------
  789|      0|        return 0;
  790|       |
  791|  3.55k|    return check_ca(x);
  792|  3.55k|}
ossl_x509_likely_issued:
 1059|  7.10k|{
 1060|  7.10k|    int ret;
 1061|       |
 1062|  7.10k|    if (X509_NAME_cmp(X509_get_subject_name(issuer),
  ------------------
  |  Branch (1062:9): [True: 0, False: 7.10k]
  ------------------
 1063|  7.10k|            X509_get_issuer_name(subject))
 1064|  7.10k|        != 0)
 1065|      0|        return X509_V_ERR_SUBJECT_ISSUER_MISMATCH;
  ------------------
  |  |  343|      0|#define X509_V_ERR_SUBJECT_ISSUER_MISMATCH 29
  ------------------
 1066|       |
 1067|       |    /* set issuer->skid, subject->akid, and subject->ex_flags */
 1068|  7.10k|    if (!ossl_x509v3_cache_extensions(issuer)
  ------------------
  |  Branch (1068:9): [True: 0, False: 7.10k]
  ------------------
 1069|  7.10k|        || !ossl_x509v3_cache_extensions(subject))
  ------------------
  |  Branch (1069:12): [True: 0, False: 7.10k]
  ------------------
 1070|      0|        return X509_V_ERR_UNSPECIFIED;
  ------------------
  |  |  313|      0|#define X509_V_ERR_UNSPECIFIED 1
  ------------------
 1071|       |
 1072|  7.10k|    if (issuer == subject
  ------------------
  |  Branch (1072:9): [True: 3.55k, False: 3.55k]
  ------------------
 1073|  3.55k|        || (X509_NAME_cmp(X509_get_issuer_name(issuer), X509_get_issuer_name(subject)) == 0
  ------------------
  |  Branch (1073:13): [True: 3.55k, False: 0]
  ------------------
 1074|  3.55k|            && ASN1_INTEGER_cmp(X509_get0_serialNumber(issuer), X509_get0_serialNumber(subject)) == 0))
  ------------------
  |  Branch (1074:16): [True: 3.55k, False: 0]
  ------------------
 1075|       |        /*
 1076|       |         * At this point, we can assume that issuer and subject
 1077|       |         * are semantically the same cert because they are identical
 1078|       |         * or at least have the same issuer and serial number,
 1079|       |         * which (for any sane cert issuer) implies equality of the two certs.
 1080|       |         * In this case, for consistency with chain building and validation,
 1081|       |         * we make our issuance judgment depend on the presence of EXFLAG_SS.
 1082|       |         * This is used for corrected chain building in the corner case of
 1083|       |         * a self-issued but not actually self-signed trust anchor cert
 1084|       |         * without subject and issuer key identifiers (i.e., no SKID and AKID).
 1085|       |         */
 1086|  7.10k|        return (issuer->ex_flags & EXFLAG_SS) != 0
  ------------------
  |  |  684|  7.10k|#define EXFLAG_SS 0x2000 /* cert is apparently self-signed */
  ------------------
  |  Branch (1086:16): [True: 7.10k, False: 0]
  ------------------
 1087|  7.10k|            ? X509_V_OK
  ------------------
  |  |  312|  7.10k|#define X509_V_OK 0
  ------------------
 1088|  7.10k|            : X509_V_ERR_CERT_SIGNATURE_FAILURE;
  ------------------
  |  |  319|      0|#define X509_V_ERR_CERT_SIGNATURE_FAILURE 7
  ------------------
 1089|       |
 1090|      0|    ret = X509_check_akid(issuer, subject->akid);
 1091|      0|    if (ret != X509_V_OK)
  ------------------
  |  |  312|      0|#define X509_V_OK 0
  ------------------
  |  Branch (1091:9): [True: 0, False: 0]
  ------------------
 1092|      0|        return ret;
 1093|       |
 1094|       |    /* Check if the subject signature alg matches the issuer's PUBKEY alg */
 1095|      0|    return check_sig_alg_match(X509_get0_pubkey(issuer), subject);
 1096|      0|}
X509_check_akid:
 1123|  10.8k|{
 1124|  10.8k|    if (akid == NULL)
  ------------------
  |  Branch (1124:9): [True: 0, False: 10.8k]
  ------------------
 1125|      0|        return X509_V_OK;
  ------------------
  |  |  312|      0|#define X509_V_OK 0
  ------------------
 1126|       |
 1127|       |    /* Check key ids (if present) */
 1128|  10.8k|    if (akid->keyid && issuer->skid && ASN1_OCTET_STRING_cmp(akid->keyid, issuer->skid))
  ------------------
  |  Branch (1128:9): [True: 10.8k, False: 0]
  |  Branch (1128:24): [True: 0, False: 10.8k]
  |  Branch (1128:40): [True: 0, False: 0]
  ------------------
 1129|      0|        return X509_V_ERR_AKID_SKID_MISMATCH;
  ------------------
  |  |  344|      0|#define X509_V_ERR_AKID_SKID_MISMATCH 30
  ------------------
 1130|       |    /* Check serial number */
 1131|  10.8k|    if (akid->serial && ASN1_INTEGER_cmp(X509_get0_serialNumber(issuer), akid->serial))
  ------------------
  |  Branch (1131:9): [True: 0, False: 10.8k]
  |  Branch (1131:25): [True: 0, False: 0]
  ------------------
 1132|      0|        return X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH;
  ------------------
  |  |  345|      0|#define X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH 31
  ------------------
 1133|       |    /* Check issuer name */
 1134|  10.8k|    if (akid->issuer) {
  ------------------
  |  Branch (1134:9): [True: 0, False: 10.8k]
  ------------------
 1135|       |        /*
 1136|       |         * Ugh, for some peculiar reason AKID includes SEQUENCE OF
 1137|       |         * GeneralName. So look for a DirName. There may be more than one but
 1138|       |         * we only take any notice of the first.
 1139|       |         */
 1140|      0|        GENERAL_NAMES *gens = akid->issuer;
 1141|      0|        GENERAL_NAME *gen;
 1142|      0|        X509_NAME *nm = NULL;
 1143|      0|        int i;
 1144|       |
 1145|      0|        for (i = 0; i < sk_GENERAL_NAME_num(gens); i++) {
  ------------------
  |  |  242|      0|#define sk_GENERAL_NAME_num(sk) OPENSSL_sk_num(ossl_check_const_GENERAL_NAME_sk_type(sk))
  ------------------
  |  Branch (1145:21): [True: 0, False: 0]
  ------------------
 1146|      0|            gen = sk_GENERAL_NAME_value(gens, i);
  ------------------
  |  |  243|      0|#define sk_GENERAL_NAME_value(sk, idx) ((GENERAL_NAME *)OPENSSL_sk_value(ossl_check_const_GENERAL_NAME_sk_type(sk), (idx)))
  ------------------
 1147|      0|            if (gen->type == GEN_DIRNAME) {
  ------------------
  |  |  180|      0|#define GEN_DIRNAME 4
  ------------------
  |  Branch (1147:17): [True: 0, False: 0]
  ------------------
 1148|      0|                nm = gen->d.dirn;
 1149|      0|                break;
 1150|      0|            }
 1151|      0|        }
 1152|      0|        if (nm != NULL && X509_NAME_cmp(nm, X509_get_issuer_name(issuer)) != 0)
  ------------------
  |  Branch (1152:13): [True: 0, False: 0]
  |  Branch (1152:27): [True: 0, False: 0]
  ------------------
 1153|      0|            return X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH;
  ------------------
  |  |  345|      0|#define X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH 31
  ------------------
 1154|      0|    }
 1155|  10.8k|    return X509_V_OK;
  ------------------
  |  |  312|  10.8k|#define X509_V_OK 0
  ------------------
 1156|  10.8k|}
v3_purp.c:check_purpose_ssl_server:
  831|  3.55k|{
  832|  3.55k|    if (xku_reject(x, XKU_SSL_SERVER | XKU_SGC))
  ------------------
  |  |  427|  3.55k|    (((x)->ex_flags & EXFLAG_XKUSAGE) != 0 && ((x)->ex_xkusage & (usage)) == 0)
  |  |  ------------------
  |  |  |  |  670|  3.55k|#define EXFLAG_XKUSAGE 0x4
  |  |  ------------------
  |  |  |  Branch (427:6): [True: 3.55k, False: 0]
  |  |  |  Branch (427:47): [True: 0, False: 3.55k]
  |  |  ------------------
  ------------------
  833|      0|        return 0;
  834|  3.55k|    if (non_leaf)
  ------------------
  |  Branch (834:9): [True: 0, False: 3.55k]
  ------------------
  835|      0|        return check_ssl_ca(x);
  836|       |
  837|  3.55k|    if (ns_reject(x, NS_SSL_SERVER))
  ------------------
  |  |  429|  3.55k|    (((x)->ex_flags & EXFLAG_NSCERT) != 0 && ((x)->ex_nscert & (usage)) == 0)
  |  |  ------------------
  |  |  |  |  671|  3.55k|#define EXFLAG_NSCERT 0x8
  |  |  ------------------
  |  |  |  Branch (429:6): [True: 0, False: 3.55k]
  |  |  |  Branch (429:46): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  838|      0|        return 0;
  839|  3.55k|    if (ku_reject(x, KU_TLS))
  ------------------
  |  |  425|  3.55k|    (((x)->ex_flags & EXFLAG_KUSAGE) != 0 && ((x)->ex_kusage & (usage)) == 0)
  |  |  ------------------
  |  |  |  |  669|  3.55k|#define EXFLAG_KUSAGE 0x2
  |  |  ------------------
  |  |  |  Branch (425:6): [True: 3.55k, False: 0]
  |  |  |  Branch (425:46): [True: 0, False: 3.55k]
  |  |  ------------------
  ------------------
  840|      0|        return 0;
  841|       |
  842|  3.55k|    return 1;
  843|  3.55k|}
v3_purp.c:nid_cmp:
  300|  54.0k|{
  301|  54.0k|    return *a - *b;
  302|  54.0k|}
v3_purp.c:check_sig_alg_match:
  408|  10.8k|{
  409|  10.8k|    int subj_sig_nid;
  410|       |
  411|  10.8k|    if (issuer_key == NULL)
  ------------------
  |  Branch (411:9): [True: 0, False: 10.8k]
  ------------------
  412|      0|        return X509_V_ERR_NO_ISSUER_PUBLIC_KEY;
  ------------------
  |  |  336|      0|#define X509_V_ERR_NO_ISSUER_PUBLIC_KEY 24
  ------------------
  413|  10.8k|    if (OBJ_find_sigid_algs(OBJ_obj2nid(subject->cert_info.signature.algorithm),
  ------------------
  |  Branch (413:9): [True: 0, False: 10.8k]
  ------------------
  414|  10.8k|            NULL, &subj_sig_nid)
  415|  10.8k|        == 0)
  416|      0|        return X509_V_ERR_UNSUPPORTED_SIGNATURE_ALGORITHM;
  ------------------
  |  |  402|      0|#define X509_V_ERR_UNSUPPORTED_SIGNATURE_ALGORITHM 76
  ------------------
  417|  10.8k|    if (EVP_PKEY_is_a(issuer_key, OBJ_nid2sn(subj_sig_nid))
  ------------------
  |  Branch (417:9): [True: 10.8k, False: 0]
  ------------------
  418|      0|        || (EVP_PKEY_is_a(issuer_key, "RSA") && subj_sig_nid == NID_rsassaPss))
  ------------------
  |  |  583|      0|#define NID_rsassaPss           912
  ------------------
  |  Branch (418:13): [True: 0, False: 0]
  |  Branch (418:49): [True: 0, False: 0]
  ------------------
  419|  10.8k|        return X509_V_OK;
  ------------------
  |  |  312|  10.8k|#define X509_V_OK 0
  ------------------
  420|      0|    return X509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH;
  ------------------
  |  |  403|      0|#define X509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH 77
  ------------------
  421|  10.8k|}
v3_purp.c:setup_crldp:
  390|  10.8k|{
  391|  10.8k|    int i;
  392|       |
  393|  10.8k|    *tmp_crldp = X509_get_ext_d2i(x, NID_crl_distribution_points, &i, NULL);
  ------------------
  |  | 2749|  10.8k|#define NID_crl_distribution_points             103
  ------------------
  394|  10.8k|    if (*tmp_crldp == NULL && i != -1)
  ------------------
  |  Branch (394:9): [True: 10.8k, False: 0]
  |  Branch (394:31): [True: 0, False: 10.8k]
  ------------------
  395|      0|        return 0;
  396|       |
  397|  10.8k|    for (i = 0; i < sk_DIST_POINT_num(*tmp_crldp); i++) {
  ------------------
  |  |  339|  10.8k|#define sk_DIST_POINT_num(sk) OPENSSL_sk_num(ossl_check_const_DIST_POINT_sk_type(sk))
  ------------------
  |  Branch (397:17): [True: 0, False: 10.8k]
  ------------------
  398|      0|        int res = setup_dp(x, sk_DIST_POINT_value(*tmp_crldp, i));
  ------------------
  |  |  340|      0|#define sk_DIST_POINT_value(sk, idx) ((DIST_POINT *)OPENSSL_sk_value(ossl_check_const_DIST_POINT_sk_type(sk), (idx)))
  ------------------
  399|       |
  400|      0|        if (res < 1)
  ------------------
  |  Branch (400:13): [True: 0, False: 0]
  ------------------
  401|      0|            return res;
  402|      0|    }
  403|  10.8k|    return 1;
  404|  10.8k|}
v3_purp.c:check_ca:
  747|  3.55k|{
  748|       |    /* keyUsage if present should allow cert signing */
  749|  3.55k|    if (ku_reject(x, KU_KEY_CERT_SIGN))
  ------------------
  |  |  425|  3.55k|    (((x)->ex_flags & EXFLAG_KUSAGE) != 0 && ((x)->ex_kusage & (usage)) == 0)
  |  |  ------------------
  |  |  |  |  669|  3.55k|#define EXFLAG_KUSAGE 0x2
  |  |  ------------------
  |  |  |  Branch (425:6): [True: 3.55k, False: 0]
  |  |  |  Branch (425:46): [True: 0, False: 3.55k]
  |  |  ------------------
  ------------------
  750|      0|        return 0;
  751|  3.55k|    if ((x->ex_flags & EXFLAG_BCONS) != 0) {
  ------------------
  |  |  668|  3.55k|#define EXFLAG_BCONS 0x1
  ------------------
  |  Branch (751:9): [True: 3.55k, False: 0]
  ------------------
  752|       |        /* If basicConstraints says not a CA then say so */
  753|  3.55k|        return (x->ex_flags & EXFLAG_CA) != 0;
  ------------------
  |  |  673|  3.55k|#define EXFLAG_CA 0x10
  ------------------
  754|  3.55k|    } else {
  755|       |        /* We support V1 roots for...  uh, I don't really know why. */
  756|      0|        if ((x->ex_flags & V1_ROOT) == V1_ROOT)
  ------------------
  |  |  423|      0|#define V1_ROOT (EXFLAG_V1 | EXFLAG_SS)
  |  |  ------------------
  |  |  |  |  675|      0|#define EXFLAG_V1 0x40
  |  |  ------------------
  |  |               #define V1_ROOT (EXFLAG_V1 | EXFLAG_SS)
  |  |  ------------------
  |  |  |  |  684|      0|#define EXFLAG_SS 0x2000 /* cert is apparently self-signed */
  |  |  ------------------
  ------------------
                      if ((x->ex_flags & V1_ROOT) == V1_ROOT)
  ------------------
  |  |  423|      0|#define V1_ROOT (EXFLAG_V1 | EXFLAG_SS)
  |  |  ------------------
  |  |  |  |  675|      0|#define EXFLAG_V1 0x40
  |  |  ------------------
  |  |               #define V1_ROOT (EXFLAG_V1 | EXFLAG_SS)
  |  |  ------------------
  |  |  |  |  684|      0|#define EXFLAG_SS 0x2000 /* cert is apparently self-signed */
  |  |  ------------------
  ------------------
  |  Branch (756:13): [True: 0, False: 0]
  ------------------
  757|      0|            return 3;
  758|       |        /*
  759|       |         * If key usage present it must have certSign so tolerate it
  760|       |         */
  761|      0|        else if ((x->ex_flags & EXFLAG_KUSAGE) != 0)
  ------------------
  |  |  669|      0|#define EXFLAG_KUSAGE 0x2
  ------------------
  |  Branch (761:18): [True: 0, False: 0]
  ------------------
  762|      0|            return 4;
  763|       |        /* Older certificates could have Netscape-specific CA types */
  764|      0|        else if ((x->ex_flags & EXFLAG_NSCERT) != 0
  ------------------
  |  |  671|      0|#define EXFLAG_NSCERT 0x8
  ------------------
  |  Branch (764:18): [True: 0, False: 0]
  ------------------
  765|      0|            && (x->ex_nscert & NS_ANY_CA) != 0)
  ------------------
  |  |  716|      0|#define NS_ANY_CA (NS_SSL_CA | NS_SMIME_CA | NS_OBJSIGN_CA)
  |  |  ------------------
  |  |  |  |  713|      0|#define NS_SSL_CA 0x04
  |  |  ------------------
  |  |               #define NS_ANY_CA (NS_SSL_CA | NS_SMIME_CA | NS_OBJSIGN_CA)
  |  |  ------------------
  |  |  |  |  714|      0|#define NS_SMIME_CA 0x02
  |  |  ------------------
  |  |               #define NS_ANY_CA (NS_SSL_CA | NS_SMIME_CA | NS_OBJSIGN_CA)
  |  |  ------------------
  |  |  |  |  715|      0|#define NS_OBJSIGN_CA 0x01
  |  |  ------------------
  ------------------
  |  Branch (765:16): [True: 0, False: 0]
  ------------------
  766|      0|            return 5;
  767|       |        /* Can this still be regarded a CA certificate?  I doubt it. */
  768|      0|        return 0;
  769|      0|    }
  770|  3.55k|}

i2s_ASN1_OCTET_STRING:
   29|     20|{
   30|     20|    return OPENSSL_buf2hexstr(oct->data, oct->length);
   31|     20|}

X509V3_add_value:
   82|     50|{
   83|     50|    return x509v3_add_len_value(name, value,
   84|     50|        value != NULL ? strlen((const char *)value) : 0,
  ------------------
  |  Branch (84:9): [True: 30, False: 20]
  ------------------
   85|     50|        extlist);
   86|     50|}
X509V3_conf_free:
  105|     50|{
  106|     50|    if (!conf)
  ------------------
  |  Branch (106:9): [True: 0, False: 50]
  ------------------
  107|      0|        return;
  108|     50|    OPENSSL_free(conf->name);
  ------------------
  |  |  132|     50|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  109|     50|    OPENSSL_free(conf->value);
  ------------------
  |  |  132|     50|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  110|     50|    OPENSSL_free(conf->section);
  ------------------
  |  |  132|     50|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  111|     50|    OPENSSL_free(conf);
  ------------------
  |  |  132|     50|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  112|     50|}
X509V3_add_value_bool:
  116|     10|{
  117|     10|    if (asn1_bool)
  ------------------
  |  Branch (117:9): [True: 10, False: 0]
  ------------------
  118|     10|        return X509V3_add_value(name, "TRUE", extlist);
  119|      0|    return X509V3_add_value(name, "FALSE", extlist);
  120|     10|}
X509V3_add_value_int:
  253|     10|{
  254|     10|    char *strtmp;
  255|     10|    int ret;
  256|       |
  257|     10|    if (!aint)
  ------------------
  |  Branch (257:9): [True: 10, False: 0]
  ------------------
  258|     10|        return 1;
  259|      0|    if ((strtmp = i2s_ASN1_INTEGER(NULL, aint)) == NULL)
  ------------------
  |  Branch (259:9): [True: 0, False: 0]
  ------------------
  260|      0|        return 0;
  261|      0|    ret = X509V3_add_value(name, strtmp, extlist);
  262|      0|    OPENSSL_free(strtmp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  263|      0|    return ret;
  264|      0|}
v3_utl.c:x509v3_add_len_value:
   42|     50|{
   43|     50|    CONF_VALUE *vtmp = NULL;
   44|     50|    char *tname = NULL, *tvalue = NULL;
   45|     50|    int sk_allocated = (*extlist == NULL);
   46|       |
   47|     50|    if (name != NULL && (tname = OPENSSL_strdup(name)) == NULL)
  ------------------
  |  |  136|     30|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (47:9): [True: 30, False: 20]
  |  Branch (47:25): [True: 0, False: 30]
  ------------------
   48|      0|        goto err;
   49|     50|    if (value != NULL) {
  ------------------
  |  Branch (49:9): [True: 30, False: 20]
  ------------------
   50|       |        /* We don't allow embedded NUL characters */
   51|     30|        if (memchr(value, 0, vallen) != NULL)
  ------------------
  |  Branch (51:13): [True: 0, False: 30]
  ------------------
   52|      0|            goto err;
   53|     30|        tvalue = OPENSSL_strndup(value, vallen);
  ------------------
  |  |  138|     30|    CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   54|     30|        if (tvalue == NULL)
  ------------------
  |  Branch (54:13): [True: 0, False: 30]
  ------------------
   55|      0|            goto err;
   56|     30|    }
   57|     50|    if ((vtmp = OPENSSL_malloc(sizeof(*vtmp))) == NULL)
  ------------------
  |  |  107|     50|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (57:9): [True: 0, False: 50]
  ------------------
   58|      0|        goto err;
   59|     50|    if (sk_allocated && (*extlist = sk_CONF_VALUE_new_null()) == NULL) {
  ------------------
  |  |   51|     40|#define sk_CONF_VALUE_new_null() ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_CONF_VALUE_freefunc_thunk))
  ------------------
  |  Branch (59:9): [True: 40, False: 10]
  |  Branch (59:25): [True: 0, False: 40]
  ------------------
   60|      0|        ERR_raise(ERR_LIB_X509V3, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   61|      0|        goto err;
   62|      0|    }
   63|     50|    vtmp->section = NULL;
   64|     50|    vtmp->name = tname;
   65|     50|    vtmp->value = tvalue;
   66|     50|    if (!sk_CONF_VALUE_push(*extlist, vtmp))
  ------------------
  |  |   58|     50|#define sk_CONF_VALUE_push(sk, ptr) OPENSSL_sk_push(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
  ------------------
  |  Branch (66:9): [True: 0, False: 50]
  ------------------
   67|      0|        goto err;
   68|     50|    return 1;
   69|      0|err:
   70|      0|    if (sk_allocated) {
  ------------------
  |  Branch (70:9): [True: 0, False: 0]
  ------------------
   71|      0|        sk_CONF_VALUE_free(*extlist);
  ------------------
  |  |   54|      0|#define sk_CONF_VALUE_free(sk) OPENSSL_sk_free(ossl_check_CONF_VALUE_sk_type(sk))
  ------------------
   72|      0|        *extlist = NULL;
   73|      0|    }
   74|      0|    OPENSSL_free(vtmp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   75|      0|    OPENSSL_free(tname);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   76|      0|    OPENSSL_free(tvalue);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   77|      0|    return 0;
   78|     50|}

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

X509_subject_name_cmp:
   78|  3.55k|{
   79|  3.55k|    return X509_NAME_cmp(a->cert_info.subject, b->cert_info.subject);
   80|  3.55k|}
X509_get_issuer_name:
  101|  32.3k|{
  102|  32.3k|    return a->cert_info.issuer;
  103|  32.3k|}
X509_get_subject_name:
  118|  21.5k|{
  119|  21.5k|    return a->cert_info.subject;
  120|  21.5k|}
X509_get_serialNumber:
  123|     10|{
  124|     10|    return &a->cert_info.serialNumber;
  125|     10|}
X509_get0_serialNumber:
  128|  7.10k|{
  129|  7.10k|    return &a->cert_info.serialNumber;
  130|  7.10k|}
X509_cmp:
  153|  3.55k|{
  154|  3.55k|    int rv = 0;
  155|       |
  156|  3.55k|    if (a == b) /* for efficiency */
  ------------------
  |  Branch (156:9): [True: 0, False: 3.55k]
  ------------------
  157|      0|        return 0;
  158|       |
  159|       |    /* attempt to compute cert hash */
  160|  3.55k|    (void)X509_check_purpose((X509 *)a, -1, 0);
  161|  3.55k|    (void)X509_check_purpose((X509 *)b, -1, 0);
  162|       |
  163|  3.55k|    if ((a->ex_flags & EXFLAG_NO_FINGERPRINT) == 0
  ------------------
  |  |  686|  3.55k|#define EXFLAG_NO_FINGERPRINT 0x100000
  ------------------
  |  Branch (163:9): [True: 3.55k, False: 0]
  ------------------
  164|  3.55k|        && (b->ex_flags & EXFLAG_NO_FINGERPRINT) == 0)
  ------------------
  |  |  686|  3.55k|#define EXFLAG_NO_FINGERPRINT 0x100000
  ------------------
  |  Branch (164:12): [True: 3.55k, False: 0]
  ------------------
  165|  3.55k|        rv = memcmp(a->sha1_hash, b->sha1_hash, SHA_DIGEST_LENGTH);
  ------------------
  |  |   26|  3.55k|#define SHA_DIGEST_LENGTH 20
  ------------------
  166|  3.55k|    if (rv != 0)
  ------------------
  |  Branch (166:9): [True: 0, False: 3.55k]
  ------------------
  167|      0|        return rv < 0 ? -1 : 1;
  ------------------
  |  Branch (167:16): [True: 0, False: 0]
  ------------------
  168|       |
  169|       |    /* Check for match against stored encoding too */
  170|  3.55k|    if (!a->cert_info.enc.modified && !b->cert_info.enc.modified) {
  ------------------
  |  Branch (170:9): [True: 3.55k, False: 0]
  |  Branch (170:39): [True: 3.55k, False: 0]
  ------------------
  171|  3.55k|        if (a->cert_info.enc.len < b->cert_info.enc.len)
  ------------------
  |  Branch (171:13): [True: 0, False: 3.55k]
  ------------------
  172|      0|            return -1;
  173|  3.55k|        if (a->cert_info.enc.len > b->cert_info.enc.len)
  ------------------
  |  Branch (173:13): [True: 0, False: 3.55k]
  ------------------
  174|      0|            return 1;
  175|  3.55k|        rv = memcmp(a->cert_info.enc.enc,
  176|  3.55k|            b->cert_info.enc.enc, a->cert_info.enc.len);
  177|  3.55k|    }
  178|  3.55k|    return rv < 0 ? -1 : rv > 0;
  ------------------
  |  Branch (178:12): [True: 0, False: 3.55k]
  ------------------
  179|  3.55k|}
ossl_x509_add_cert_new:
  182|  10.8k|{
  183|  10.8k|    if (*p_sk == NULL && (*p_sk = sk_X509_new_null()) == NULL) {
  ------------------
  |  |   85|  7.25k|#define sk_X509_new_null() ((STACK_OF(X509) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_X509_freefunc_thunk))
  ------------------
  |  Branch (183:9): [True: 7.25k, False: 3.62k]
  |  Branch (183:26): [True: 0, False: 7.25k]
  ------------------
  184|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  185|      0|        return 0;
  186|      0|    }
  187|  10.8k|    return X509_add_cert(*p_sk, cert, flags);
  188|  10.8k|}
X509_add_cert:
  191|  10.8k|{
  192|  10.8k|    if (sk == NULL) {
  ------------------
  |  Branch (192:9): [True: 0, False: 10.8k]
  ------------------
  193|      0|        ERR_raise(ERR_LIB_X509, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  194|      0|        return 0;
  195|      0|    }
  196|  10.8k|    if (cert == NULL)
  ------------------
  |  Branch (196:9): [True: 0, False: 10.8k]
  ------------------
  197|      0|        return 0;
  198|  10.8k|    if ((flags & X509_ADD_FLAG_NO_DUP) != 0) {
  ------------------
  |  | 1002|  10.8k|#define X509_ADD_FLAG_NO_DUP 0x4
  ------------------
  |  Branch (198:9): [True: 0, False: 10.8k]
  ------------------
  199|       |        /*
  200|       |         * not using sk_X509_set_cmp_func() and sk_X509_find()
  201|       |         * because this re-orders the certs on the stack
  202|       |         */
  203|      0|        int i;
  204|       |
  205|      0|        for (i = 0; i < sk_X509_num(sk); i++) {
  ------------------
  |  |   82|      0|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
  |  Branch (205:21): [True: 0, False: 0]
  ------------------
  206|      0|            if (X509_cmp(sk_X509_value(sk, i), cert) == 0)
  ------------------
  |  |   83|      0|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
  |  Branch (206:17): [True: 0, False: 0]
  ------------------
  207|      0|                return 1;
  208|      0|        }
  209|      0|    }
  210|  10.8k|    if ((flags & X509_ADD_FLAG_NO_SS) != 0) {
  ------------------
  |  | 1003|  10.8k|#define X509_ADD_FLAG_NO_SS 0x8
  ------------------
  |  Branch (210:9): [True: 0, False: 10.8k]
  ------------------
  211|      0|        int ret = X509_self_signed(cert, 0);
  212|       |
  213|      0|        if (ret != 0)
  ------------------
  |  Branch (213:13): [True: 0, False: 0]
  ------------------
  214|      0|            return ret > 0 ? 1 : 0;
  ------------------
  |  Branch (214:20): [True: 0, False: 0]
  ------------------
  215|      0|    }
  216|       |    /*
  217|       |     * Note: We're technically mutating the cert here, but its just to up
  218|       |     * the reference count, so that should be safe, so cast away
  219|       |     */
  220|  10.8k|    if ((flags & X509_ADD_FLAG_UP_REF) != 0 && !X509_up_ref((X509 *)cert))
  ------------------
  |  | 1000|  10.8k|#define X509_ADD_FLAG_UP_REF 0x1
  ------------------
  |  Branch (220:9): [True: 7.25k, False: 3.62k]
  |  Branch (220:48): [True: 0, False: 7.25k]
  ------------------
  221|      0|        return 0;
  222|  10.8k|    if (!sk_X509_insert(sk, (X509 *)cert,
  ------------------
  |  |   97|  21.7k|#define sk_X509_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_X509_sk_type(sk), ossl_check_X509_type(ptr), (idx))
  |  |  ------------------
  |  |  |  Branch (97:113): [True: 0, False: 10.8k]
  |  |  ------------------
  ------------------
  |  Branch (222:9): [True: 0, False: 10.8k]
  ------------------
  223|  10.8k|            (flags & X509_ADD_FLAG_PREPEND) != 0 ? 0 : -1)) {
  224|      0|        if ((flags & X509_ADD_FLAG_UP_REF) != 0)
  ------------------
  |  | 1000|      0|#define X509_ADD_FLAG_UP_REF 0x1
  ------------------
  |  Branch (224:13): [True: 0, False: 0]
  ------------------
  225|      0|            X509_free((X509 *)cert);
  226|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  227|      0|        return 0;
  228|      0|    }
  229|  10.8k|    return 1;
  230|  10.8k|}
X509_add_certs:
  234|  7.25k|{
  235|  7.25k|    if (sk == NULL) {
  ------------------
  |  Branch (235:9): [True: 0, False: 7.25k]
  ------------------
  236|      0|        ERR_raise(ERR_LIB_X509, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  237|      0|        return 0;
  238|      0|    }
  239|  7.25k|    return ossl_x509_add_certs_new(&sk, certs, flags);
  240|  7.25k|}
ossl_x509_add_certs_new:
  244|  7.25k|{
  245|  7.25k|    int n = sk_X509_num(certs /* may be NULL */);
  ------------------
  |  |   82|  7.25k|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
  246|  7.25k|    int i;
  247|       |
  248|  10.8k|    for (i = 0; i < n; i++) {
  ------------------
  |  Branch (248:17): [True: 3.62k, False: 7.25k]
  ------------------
  249|  3.62k|        int j = (flags & X509_ADD_FLAG_PREPEND) == 0 ? i : n - 1 - i;
  ------------------
  |  | 1001|  3.62k|#define X509_ADD_FLAG_PREPEND 0x2
  ------------------
  |  Branch (249:17): [True: 3.62k, False: 0]
  ------------------
  250|       |        /* if prepend, add certs in reverse order to keep original order */
  251|       |
  252|  3.62k|        if (!ossl_x509_add_cert_new(p_sk, sk_X509_value(certs, j), flags))
  ------------------
  |  |   83|  3.62k|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
  |  Branch (252:13): [True: 0, False: 3.62k]
  ------------------
  253|      0|            return 0;
  254|  3.62k|    }
  255|  7.25k|    return 1;
  256|  7.25k|}
X509_NAME_cmp:
  259|  25.0k|{
  260|  25.0k|    int ret;
  261|       |
  262|  25.0k|    if (b == NULL)
  ------------------
  |  Branch (262:9): [True: 0, False: 25.0k]
  ------------------
  263|      0|        return a != NULL;
  264|  25.0k|    if (a == NULL)
  ------------------
  |  Branch (264:9): [True: 0, False: 25.0k]
  ------------------
  265|      0|        return -1;
  266|       |
  267|       |    /* Ensure canonical encoding is present and up to date */
  268|  25.0k|    if (a->canon_enc == NULL || a->modified) {
  ------------------
  |  Branch (268:9): [True: 0, False: 25.0k]
  |  Branch (268:33): [True: 0, False: 25.0k]
  ------------------
  269|      0|        ret = i2d_X509_NAME((X509_NAME *)a, NULL);
  270|      0|        if (ret < 0)
  ------------------
  |  Branch (270:13): [True: 0, False: 0]
  ------------------
  271|      0|            return -2;
  272|      0|    }
  273|       |
  274|  25.0k|    if (b->canon_enc == NULL || b->modified) {
  ------------------
  |  Branch (274:9): [True: 0, False: 25.0k]
  |  Branch (274:33): [True: 0, False: 25.0k]
  ------------------
  275|      0|        ret = i2d_X509_NAME((X509_NAME *)b, NULL);
  276|      0|        if (ret < 0)
  ------------------
  |  Branch (276:13): [True: 0, False: 0]
  ------------------
  277|      0|            return -2;
  278|      0|    }
  279|       |
  280|  25.0k|    ret = a->canon_enclen - b->canon_enclen;
  281|  25.0k|    if (ret == 0 && a->canon_enclen == 0)
  ------------------
  |  Branch (281:9): [True: 25.0k, False: 0]
  |  Branch (281:21): [True: 0, False: 25.0k]
  ------------------
  282|      0|        return 0;
  283|       |
  284|  25.0k|    if (ret == 0) {
  ------------------
  |  Branch (284:9): [True: 25.0k, False: 0]
  ------------------
  285|  25.0k|        if (a->canon_enc == NULL || b->canon_enc == NULL)
  ------------------
  |  Branch (285:13): [True: 0, False: 25.0k]
  |  Branch (285:37): [True: 0, False: 25.0k]
  ------------------
  286|      0|            return -2;
  287|  25.0k|        ret = memcmp(a->canon_enc, b->canon_enc, a->canon_enclen);
  288|  25.0k|    }
  289|       |
  290|  25.0k|    return ret < 0 ? -1 : ret > 0;
  ------------------
  |  Branch (290:12): [True: 0, False: 25.0k]
  ------------------
  291|  25.0k|}
X509_get0_pubkey:
  382|  54.7k|{
  383|  54.7k|    if (x == NULL)
  ------------------
  |  Branch (383:9): [True: 0, False: 54.7k]
  ------------------
  384|      0|        return NULL;
  385|  54.7k|    return X509_PUBKEY_get0(x->cert_info.key);
  386|  54.7k|}
X509_get_pubkey:
  389|     10|{
  390|     10|    if (x == NULL)
  ------------------
  |  Branch (390:9): [True: 0, False: 10]
  ------------------
  391|      0|        return NULL;
  392|     10|    return X509_PUBKEY_get(x->cert_info.key);
  393|     10|}
X509_check_private_key:
  396|  7.46k|{
  397|  7.46k|    const EVP_PKEY *xk = X509_get0_pubkey(cert);
  398|       |
  399|  7.46k|    if (xk == NULL) {
  ------------------
  |  Branch (399:9): [True: 0, False: 7.46k]
  ------------------
  400|      0|        ERR_raise(ERR_LIB_X509, X509_R_UNABLE_TO_GET_CERTS_PUBLIC_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  401|      0|        return 0;
  402|      0|    }
  403|  7.46k|    return ossl_x509_check_private_key(xk, pkey);
  404|  7.46k|}
ossl_x509_check_private_key:
  407|  7.46k|{
  408|  7.46k|    if (x == NULL) {
  ------------------
  |  Branch (408:9): [True: 0, False: 7.46k]
  ------------------
  409|      0|        ERR_raise(ERR_LIB_X509, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  410|      0|        return 0;
  411|      0|    }
  412|  7.46k|    switch (EVP_PKEY_eq(x, pkey)) {
  413|  7.46k|    case 1:
  ------------------
  |  Branch (413:5): [True: 7.46k, False: 0]
  ------------------
  414|  7.46k|        return 1;
  415|      0|    case 0:
  ------------------
  |  Branch (415:5): [True: 0, False: 7.46k]
  ------------------
  416|      0|        ERR_raise(ERR_LIB_X509, X509_R_KEY_VALUES_MISMATCH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  417|      0|        return 0;
  418|      0|    case -1:
  ------------------
  |  Branch (418:5): [True: 0, False: 7.46k]
  ------------------
  419|      0|        ERR_raise(ERR_LIB_X509, X509_R_KEY_TYPE_MISMATCH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  420|      0|        return 0;
  421|      0|    case -2:
  ------------------
  |  Branch (421:5): [True: 0, False: 7.46k]
  ------------------
  422|      0|        ERR_raise(ERR_LIB_X509, X509_R_UNKNOWN_KEY_TYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  423|       |        /* fall thru */
  424|      0|    default:
  ------------------
  |  Branch (424:5): [True: 0, False: 7.46k]
  ------------------
  425|      0|        return 0;
  426|  7.46k|    }
  427|  7.46k|}
X509_chain_check_suiteb:
  475|  3.55k|{
  476|  3.55k|    int rv, i, sign_nid;
  477|  3.55k|    EVP_PKEY *pk;
  478|  3.55k|    unsigned long tflags = flags;
  479|       |
  480|  3.55k|    if (!(flags & X509_V_FLAG_SUITEB_128_LOS))
  ------------------
  |  |  476|  3.55k|#define X509_V_FLAG_SUITEB_128_LOS 0x30000
  ------------------
  |  Branch (480:9): [True: 3.55k, False: 0]
  ------------------
  481|  3.55k|        return X509_V_OK;
  ------------------
  |  |  312|  3.55k|#define X509_V_OK 0
  ------------------
  482|       |
  483|       |    /* If no EE certificate passed in must be first in chain */
  484|      0|    if (x == NULL) {
  ------------------
  |  Branch (484:9): [True: 0, False: 0]
  ------------------
  485|      0|        x = sk_X509_value(chain, 0);
  ------------------
  |  |   83|      0|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
  486|      0|        i = 1;
  487|      0|    } else {
  488|      0|        i = 0;
  489|      0|    }
  490|      0|    pk = X509_get0_pubkey(x);
  491|       |
  492|       |    /*
  493|       |     * With DANE-EE(3) success, or DANE-EE(3)/PKIX-EE(1) failure we don't build
  494|       |     * a chain all, just report trust success or failure, but must also report
  495|       |     * Suite-B errors if applicable.  This is indicated via a NULL chain
  496|       |     * pointer.  All we need to do is check the leaf key algorithm.
  497|       |     */
  498|      0|    if (chain == NULL)
  ------------------
  |  Branch (498:9): [True: 0, False: 0]
  ------------------
  499|      0|        return check_suite_b(pk, -1, &tflags);
  500|       |
  501|      0|    if (X509_get_version(x) != X509_VERSION_3) {
  ------------------
  |  |  852|      0|#define X509_VERSION_3 2
  ------------------
  |  Branch (501:9): [True: 0, False: 0]
  ------------------
  502|      0|        rv = X509_V_ERR_SUITE_B_INVALID_VERSION;
  ------------------
  |  |  373|      0|#define X509_V_ERR_SUITE_B_INVALID_VERSION 56
  ------------------
  503|       |        /* Correct error depth */
  504|      0|        i = 0;
  505|      0|        goto end;
  506|      0|    }
  507|       |
  508|       |    /* Check EE key only */
  509|      0|    rv = check_suite_b(pk, -1, &tflags);
  510|      0|    if (rv != X509_V_OK) {
  ------------------
  |  |  312|      0|#define X509_V_OK 0
  ------------------
  |  Branch (510:9): [True: 0, False: 0]
  ------------------
  511|       |        /* Correct error depth */
  512|      0|        i = 0;
  513|      0|        goto end;
  514|      0|    }
  515|      0|    for (; i < sk_X509_num(chain); i++) {
  ------------------
  |  |   82|      0|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
  |  Branch (515:12): [True: 0, False: 0]
  ------------------
  516|      0|        sign_nid = X509_get_signature_nid(x);
  517|      0|        x = sk_X509_value(chain, i);
  ------------------
  |  |   83|      0|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
  518|      0|        if (X509_get_version(x) != X509_VERSION_3) {
  ------------------
  |  |  852|      0|#define X509_VERSION_3 2
  ------------------
  |  Branch (518:13): [True: 0, False: 0]
  ------------------
  519|      0|            rv = X509_V_ERR_SUITE_B_INVALID_VERSION;
  ------------------
  |  |  373|      0|#define X509_V_ERR_SUITE_B_INVALID_VERSION 56
  ------------------
  520|      0|            goto end;
  521|      0|        }
  522|      0|        pk = X509_get0_pubkey(x);
  523|      0|        rv = check_suite_b(pk, sign_nid, &tflags);
  524|      0|        if (rv != X509_V_OK)
  ------------------
  |  |  312|      0|#define X509_V_OK 0
  ------------------
  |  Branch (524:13): [True: 0, False: 0]
  ------------------
  525|      0|            goto end;
  526|      0|    }
  527|       |
  528|       |    /* Final check: root CA signature */
  529|      0|    rv = check_suite_b(pk, X509_get_signature_nid(x), &tflags);
  530|      0|end:
  531|      0|    if (rv != X509_V_OK) {
  ------------------
  |  |  312|      0|#define X509_V_OK 0
  ------------------
  |  Branch (531:9): [True: 0, False: 0]
  ------------------
  532|       |        /* Invalid signature or LOS errors are for previous cert */
  533|      0|        if ((rv == X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM
  ------------------
  |  |  376|      0|#define X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM 59
  ------------------
  |  Branch (533:14): [True: 0, False: 0]
  ------------------
  534|      0|                || rv == X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED)
  ------------------
  |  |  377|      0|#define X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED 60
  ------------------
  |  Branch (534:20): [True: 0, False: 0]
  ------------------
  535|      0|            && i)
  ------------------
  |  Branch (535:16): [True: 0, False: 0]
  ------------------
  536|      0|            i--;
  537|       |        /*
  538|       |         * If we have LOS error and flags changed then we are signing P-384
  539|       |         * with P-256. Use more meaningful error.
  540|       |         */
  541|      0|        if (rv == X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED && flags != tflags)
  ------------------
  |  |  377|      0|#define X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED 60
  ------------------
  |  Branch (541:13): [True: 0, False: 0]
  |  Branch (541:57): [True: 0, False: 0]
  ------------------
  542|      0|            rv = X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256;
  ------------------
  |  |  378|      0|#define X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256 61
  ------------------
  543|      0|        if (perror_depth)
  ------------------
  |  Branch (543:13): [True: 0, False: 0]
  ------------------
  544|      0|            *perror_depth = i;
  545|      0|    }
  546|      0|    return rv;
  547|      0|}
X509_chain_up_ref:
  578|  10.7k|{
  579|  10.7k|    STACK_OF(X509) *ret = sk_X509_dup(chain);
  ------------------
  |  |   33|  10.7k|#define STACK_OF(type) struct stack_st_##type
  ------------------
                  STACK_OF(X509) *ret = sk_X509_dup(chain);
  ------------------
  |  |  104|  10.7k|#define sk_X509_dup(sk) ((STACK_OF(X509) *)OPENSSL_sk_dup(ossl_check_const_X509_sk_type(sk)))
  ------------------
  580|  10.7k|    int i;
  581|       |
  582|  10.7k|    if (ret == NULL)
  ------------------
  |  Branch (582:9): [True: 0, False: 10.7k]
  ------------------
  583|      0|        return NULL;
  584|  21.5k|    for (i = 0; i < sk_X509_num(ret); i++) {
  ------------------
  |  |   82|  21.5k|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
  |  Branch (584:17): [True: 10.7k, False: 10.7k]
  ------------------
  585|  10.7k|        X509 *x = sk_X509_value(ret, i);
  ------------------
  |  |   83|  10.7k|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
  586|       |
  587|  10.7k|        if (!X509_up_ref(x))
  ------------------
  |  Branch (587:13): [True: 0, False: 10.7k]
  ------------------
  588|      0|            goto err;
  589|  10.7k|    }
  590|  10.7k|    return ret;
  591|       |
  592|      0|err:
  593|      0|    while (i-- > 0)
  ------------------
  |  Branch (593:12): [True: 0, False: 0]
  ------------------
  594|      0|        X509_free(sk_X509_value(ret, i));
  ------------------
  |  |   83|      0|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
  595|      0|    sk_X509_free(ret);
  ------------------
  |  |   88|      0|#define sk_X509_free(sk) OPENSSL_sk_free(ossl_check_X509_sk_type(sk))
  ------------------
  596|       |    return NULL;
  597|  10.7k|}

X509_STORE_load_path:
   71|  3.55k|{
   72|  3.55k|    X509_LOOKUP *lookup;
   73|       |
   74|  3.55k|    if (path == NULL
  ------------------
  |  Branch (74:9): [True: 0, False: 3.55k]
  ------------------
   75|  3.55k|        || (lookup = X509_STORE_add_lookup(ctx, X509_LOOKUP_hash_dir())) == NULL
  ------------------
  |  Branch (75:12): [True: 0, False: 3.55k]
  ------------------
   76|  3.55k|        || X509_LOOKUP_add_dir(lookup, path, X509_FILETYPE_PEM) <= 0)
  ------------------
  |  |  292|  3.55k|    X509_LOOKUP_ctrl((x), X509_L_ADD_DIR, (name), (long)(type), NULL)
  |  |  ------------------
  |  |  |  |  284|  3.55k|#define X509_L_ADD_DIR 2
  |  |  ------------------
  ------------------
  |  Branch (76:12): [True: 0, False: 3.55k]
  ------------------
   77|      0|        return 0;
   78|       |
   79|  3.55k|    return 1;
   80|  3.55k|}

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

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

X509_get_ext_count:
   71|  64.8k|{
   72|  64.8k|    return X509v3_get_ext_count(x->cert_info.extensions);
   73|  64.8k|}
X509_get_ext:
   91|  54.0k|{
   92|  54.0k|    return X509v3_get_ext(x->cert_info.extensions, loc);
   93|  54.0k|}
X509_get_ext_d2i:
  127|   133k|{
  128|   133k|    return X509V3_get_d2i(x->cert_info.extensions, nid, crit, idx);
  129|   133k|}

X509_LOOKUP_new:
   23|  3.55k|{
   24|  3.55k|    X509_LOOKUP *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  3.55k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   25|       |
   26|  3.55k|    if (ret == NULL)
  ------------------
  |  Branch (26:9): [True: 0, False: 3.55k]
  ------------------
   27|      0|        return NULL;
   28|       |
   29|  3.55k|    ret->method = method;
   30|  3.55k|    if (method->new_item != NULL && method->new_item(ret) == 0) {
  ------------------
  |  Branch (30:9): [True: 3.55k, False: 0]
  |  Branch (30:37): [True: 0, False: 3.55k]
  ------------------
   31|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   32|      0|        return NULL;
   33|      0|    }
   34|  3.55k|    return ret;
   35|  3.55k|}
X509_LOOKUP_free:
   38|  3.55k|{
   39|  3.55k|    if (ctx == NULL)
  ------------------
  |  Branch (39:9): [True: 0, False: 3.55k]
  ------------------
   40|      0|        return;
   41|  3.55k|    if ((ctx->method != NULL) && (ctx->method->free != NULL))
  ------------------
  |  Branch (41:9): [True: 3.55k, False: 0]
  |  Branch (41:34): [True: 3.55k, False: 0]
  ------------------
   42|  3.55k|        (*ctx->method->free)(ctx);
   43|  3.55k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|  3.55k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   44|  3.55k|}
X509_STORE_lock:
   47|  3.55k|{
   48|  3.55k|    return CRYPTO_THREAD_write_lock(xs->lock);
   49|  3.55k|}
ossl_x509_store_read_lock:
   52|  7.33k|{
   53|  7.33k|    return CRYPTO_THREAD_read_lock(xs->lock);
   54|  7.33k|}
X509_STORE_unlock:
   57|  10.8k|{
   58|  10.8k|    return CRYPTO_THREAD_unlock(xs->lock);
   59|  10.8k|}
X509_LOOKUP_shutdown:
   72|  3.55k|{
   73|  3.55k|    if (ctx->method == NULL)
  ------------------
  |  Branch (73:9): [True: 0, False: 3.55k]
  ------------------
   74|      0|        return 0;
   75|  3.55k|    if (ctx->method->shutdown != NULL)
  ------------------
  |  Branch (75:9): [True: 0, False: 3.55k]
  ------------------
   76|      0|        return ctx->method->shutdown(ctx);
   77|  3.55k|    else
   78|  3.55k|        return 1;
   79|  3.55k|}
X509_LOOKUP_ctrl_ex:
   83|  3.55k|{
   84|  3.55k|    if (ctx->method == NULL)
  ------------------
  |  Branch (84:9): [True: 0, False: 3.55k]
  ------------------
   85|      0|        return -1;
   86|  3.55k|    if (ctx->method->ctrl_ex != NULL)
  ------------------
  |  Branch (86:9): [True: 0, False: 3.55k]
  ------------------
   87|      0|        return ctx->method->ctrl_ex(ctx, cmd, argc, argl, ret, libctx, propq);
   88|  3.55k|    if (ctx->method->ctrl != NULL)
  ------------------
  |  Branch (88:9): [True: 3.55k, False: 0]
  ------------------
   89|  3.55k|        return ctx->method->ctrl(ctx, cmd, argc, argl, ret);
   90|      0|    return 1;
   91|  3.55k|}
X509_LOOKUP_ctrl:
   95|  3.55k|{
   96|  3.55k|    return X509_LOOKUP_ctrl_ex(ctx, cmd, argc, argl, ret, NULL, NULL);
   97|  3.55k|}
X509_STORE_new:
  201|  7.36k|{
  202|  7.36k|    X509_STORE *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  7.36k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  203|  7.36k|    HT_CONFIG htconf = {
  204|  7.36k|        .ht_free_fn = objs_ht_free,
  205|  7.36k|        .ht_hash_fn = obj_ht_hash,
  206|  7.36k|        .init_neighborhoods = X509_OBJS_HT_BUCKETS,
  ------------------
  |  |   20|  7.36k|#define X509_OBJS_HT_BUCKETS 8
  ------------------
  207|  7.36k|        .no_rcu = 1,
  208|  7.36k|    };
  209|       |
  210|  7.36k|    if (ret == NULL)
  ------------------
  |  Branch (210:9): [True: 0, False: 7.36k]
  ------------------
  211|      0|        return NULL;
  212|  7.36k|    if ((ret->objs_ht = ossl_ht_new(&htconf)) == NULL) {
  ------------------
  |  Branch (212:9): [True: 0, False: 7.36k]
  ------------------
  213|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  214|      0|        goto err;
  215|      0|    }
  216|  7.36k|    if ((ret->objs = sk_X509_OBJECT_new(x509_object_cmp)) == NULL) {
  ------------------
  |  |  103|  7.36k|#define sk_X509_OBJECT_new(cmp) ((STACK_OF(X509_OBJECT) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new(ossl_check_X509_OBJECT_compfunc_type(cmp)), sk_X509_OBJECT_cmpfunc_thunk))
  ------------------
  |  Branch (216:9): [True: 0, False: 7.36k]
  ------------------
  217|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  218|      0|        goto err;
  219|      0|    }
  220|  7.36k|    ret->cache = 1;
  221|  7.36k|    if ((ret->get_cert_methods = sk_X509_LOOKUP_new_null()) == NULL) {
  ------------------
  |  |   78|  7.36k|#define sk_X509_LOOKUP_new_null() ((STACK_OF(X509_LOOKUP) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_X509_LOOKUP_freefunc_thunk))
  ------------------
  |  Branch (221:9): [True: 0, False: 7.36k]
  ------------------
  222|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  223|      0|        goto err;
  224|      0|    }
  225|       |
  226|  7.36k|    if ((ret->param = X509_VERIFY_PARAM_new()) == NULL) {
  ------------------
  |  Branch (226:9): [True: 0, False: 7.36k]
  ------------------
  227|      0|        ERR_raise(ERR_LIB_X509, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  228|      0|        goto err;
  229|      0|    }
  230|  7.36k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_X509_STORE, ret, &ret->ex_data)) {
  ------------------
  |  |  255|  7.36k|#define CRYPTO_EX_INDEX_X509_STORE 4
  ------------------
  |  Branch (230:9): [True: 0, False: 7.36k]
  ------------------
  231|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  232|      0|        goto err;
  233|      0|    }
  234|       |
  235|  7.36k|    ret->lock = CRYPTO_THREAD_lock_new();
  236|  7.36k|    if (ret->lock == NULL) {
  ------------------
  |  Branch (236:9): [True: 0, False: 7.36k]
  ------------------
  237|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  238|      0|        goto err;
  239|      0|    }
  240|       |
  241|  7.36k|    if (!CRYPTO_NEW_REF(&ret->references, 1))
  ------------------
  |  Branch (241:9): [True: 0, False: 7.36k]
  ------------------
  242|      0|        goto err;
  243|  7.36k|    return ret;
  244|       |
  245|      0|err:
  246|      0|    X509_VERIFY_PARAM_free(ret->param);
  247|      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))
  ------------------
  248|      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))
  ------------------
  249|      0|    ossl_ht_free(ret->objs_ht);
  250|      0|    CRYPTO_THREAD_lock_free(ret->lock);
  251|      0|    OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  252|       |    return NULL;
  253|  7.36k|}
X509_STORE_free:
  256|  36.6k|{
  257|  36.6k|    int i;
  258|  36.6k|    STACK_OF(X509_LOOKUP) *sk;
  ------------------
  |  |   33|  36.6k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  259|  36.6k|    X509_LOOKUP *lu;
  260|       |
  261|  36.6k|    if (xs == NULL)
  ------------------
  |  Branch (261:9): [True: 29.2k, False: 7.36k]
  ------------------
  262|  29.2k|        return;
  263|  7.36k|    CRYPTO_DOWN_REF(&xs->references, &i);
  264|  7.36k|    REF_PRINT_COUNT("X509_STORE", i, xs);
  ------------------
  |  |  301|  7.36k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  7.36k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  7.36k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  7.36k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  265|  7.36k|    if (i > 0)
  ------------------
  |  Branch (265:9): [True: 0, False: 7.36k]
  ------------------
  266|      0|        return;
  267|  7.36k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  7.36k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 7.36k]
  |  |  ------------------
  ------------------
  268|       |
  269|  7.36k|    sk = xs->get_cert_methods;
  270|  10.9k|    for (i = 0; i < sk_X509_LOOKUP_num(sk); i++) {
  ------------------
  |  |   75|  10.9k|#define sk_X509_LOOKUP_num(sk) OPENSSL_sk_num(ossl_check_const_X509_LOOKUP_sk_type(sk))
  ------------------
  |  Branch (270:17): [True: 3.55k, False: 7.36k]
  ------------------
  271|  3.55k|        lu = sk_X509_LOOKUP_value(sk, i);
  ------------------
  |  |   76|  3.55k|#define sk_X509_LOOKUP_value(sk, idx) ((X509_LOOKUP *)OPENSSL_sk_value(ossl_check_const_X509_LOOKUP_sk_type(sk), (idx)))
  ------------------
  272|  3.55k|        X509_LOOKUP_shutdown(lu);
  273|  3.55k|        X509_LOOKUP_free(lu);
  274|  3.55k|    }
  275|  7.36k|    sk_X509_LOOKUP_free(sk);
  ------------------
  |  |   81|  7.36k|#define sk_X509_LOOKUP_free(sk) OPENSSL_sk_free(ossl_check_X509_LOOKUP_sk_type(sk))
  ------------------
  276|  7.36k|    sk_X509_OBJECT_pop_free(xs->objs, X509_OBJECT_free);
  ------------------
  |  |  115|  7.36k|#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))
  ------------------
  277|       |
  278|  7.36k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_X509_STORE, xs, &xs->ex_data);
  ------------------
  |  |  255|  7.36k|#define CRYPTO_EX_INDEX_X509_STORE 4
  ------------------
  279|  7.36k|    X509_VERIFY_PARAM_free(xs->param);
  280|  7.36k|    CRYPTO_THREAD_lock_free(xs->lock);
  281|  7.36k|    CRYPTO_FREE_REF(&xs->references);
  282|  7.36k|    ossl_ht_free(xs->objs_ht);
  283|  7.36k|    OPENSSL_free(xs);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  284|  7.36k|}
X509_STORE_add_lookup:
  299|  3.55k|{
  300|  3.55k|    int i;
  301|  3.55k|    STACK_OF(X509_LOOKUP) *sk;
  ------------------
  |  |   33|  3.55k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  302|  3.55k|    X509_LOOKUP *lu;
  303|       |
  304|  3.55k|    sk = xs->get_cert_methods;
  305|  3.55k|    for (i = 0; i < sk_X509_LOOKUP_num(sk); i++) {
  ------------------
  |  |   75|  3.55k|#define sk_X509_LOOKUP_num(sk) OPENSSL_sk_num(ossl_check_const_X509_LOOKUP_sk_type(sk))
  ------------------
  |  Branch (305:17): [True: 0, False: 3.55k]
  ------------------
  306|      0|        lu = sk_X509_LOOKUP_value(sk, i);
  ------------------
  |  |   76|      0|#define sk_X509_LOOKUP_value(sk, idx) ((X509_LOOKUP *)OPENSSL_sk_value(ossl_check_const_X509_LOOKUP_sk_type(sk), (idx)))
  ------------------
  307|      0|        if (m == lu->method) {
  ------------------
  |  Branch (307:13): [True: 0, False: 0]
  ------------------
  308|      0|            return lu;
  309|      0|        }
  310|      0|    }
  311|       |    /* a new one */
  312|  3.55k|    lu = X509_LOOKUP_new(m);
  313|  3.55k|    if (lu == NULL) {
  ------------------
  |  Branch (313:9): [True: 0, False: 3.55k]
  ------------------
  314|      0|        ERR_raise(ERR_LIB_X509, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  315|      0|        return NULL;
  316|      0|    }
  317|       |
  318|  3.55k|    lu->store_ctx = xs;
  319|  3.55k|    if (sk_X509_LOOKUP_push(xs->get_cert_methods, lu))
  ------------------
  |  |   85|  3.55k|#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: 3.55k, False: 0]
  |  |  ------------------
  ------------------
  320|  3.55k|        return lu;
  321|       |    /* sk_X509_LOOKUP_push() failed */
  322|  3.55k|    ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  323|      0|    X509_LOOKUP_free(lu);
  324|       |    return NULL;
  325|  3.55k|}
ossl_x509_store_ht_get_by_name:
  345|  10.8k|{
  346|  10.8k|    HT_VALUE *v;
  347|  10.8k|    OBJS_KEY key;
  348|  10.8k|    int ret;
  349|       |
  350|  10.8k|    if (xn->canon_enc == NULL || xn->modified) {
  ------------------
  |  Branch (350:9): [True: 0, False: 10.8k]
  |  Branch (350:34): [True: 0, False: 10.8k]
  ------------------
  351|      0|        ret = i2d_X509_NAME((X509_NAME *)xn, NULL);
  352|      0|        if (ret < 0)
  ------------------
  |  Branch (352:13): [True: 0, False: 0]
  ------------------
  353|      0|            return NULL;
  354|      0|    }
  355|       |
  356|  10.8k|    HT_INIT_KEY(&key);
  ------------------
  |  |  112|  10.8k|    do {                                                                                           \
  |  |  113|  10.8k|        memset((key), 0, sizeof(*(key)));                                                          \
  |  |  114|  10.8k|        (key)->key_header.keysize = (key)->key_header.bufsize = (sizeof(*(key)) - sizeof(HT_KEY)); \
  |  |  115|  10.8k|        (key)->key_header.keybuf = (((uint8_t *)key) + sizeof(HT_KEY));                            \
  |  |  116|  10.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (116:14): [Folded, False: 10.8k]
  |  |  ------------------
  ------------------
  357|  10.8k|    HT_SET_KEY_FIELD(&key, xn_canon, xn->canon_enc);
  ------------------
  |  |  180|  10.8k|#define HT_SET_KEY_FIELD(key, member, value) (key)->keyfields.member = value;
  ------------------
  358|  10.8k|    HT_SET_KEY_FIELD(&key, xn_canon_enclen, xn->canon_enclen);
  ------------------
  |  |  180|  10.8k|#define HT_SET_KEY_FIELD(key, member, value) (key)->keyfields.member = value;
  ------------------
  359|  10.8k|    v = ossl_ht_get(store->objs_ht, TO_HT_KEY(&key));
  ------------------
  |  |  237|  10.8k|#define TO_HT_KEY(key) &(key)->key_header
  ------------------
  360|  10.8k|    if (v == NULL)
  ------------------
  |  Branch (360:9): [True: 7.33k, False: 3.55k]
  ------------------
  361|  7.33k|        return NULL;
  362|  3.55k|    v = ossl_rcu_deref(&v);
  ------------------
  |  |   35|  3.55k|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  363|       |
  364|  3.55k|    return v->value;
  365|  10.8k|}
ossl_x509_store_ctx_get_by_subject:
  439|  7.33k|{
  440|  7.33k|    X509_STORE *store = ctx->store;
  441|  7.33k|    X509_LOOKUP *lu;
  442|  7.33k|    X509_OBJECT stmp, *tmp = NULL;
  443|  7.33k|    STACK_OF(X509_OBJECT) *objs;
  ------------------
  |  |   33|  7.33k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  444|  7.33k|    int i, j;
  445|       |
  446|  7.33k|    if (store == NULL)
  ------------------
  |  Branch (446:9): [True: 0, False: 7.33k]
  ------------------
  447|      0|        return 0;
  448|       |
  449|  7.33k|    stmp.type = X509_LU_NONE;
  450|  7.33k|    stmp.data.x509 = NULL;
  451|       |
  452|  7.33k|    if (!ossl_x509_store_read_lock(store))
  ------------------
  |  Branch (452:9): [True: 0, False: 7.33k]
  ------------------
  453|      0|        return 0;
  454|  7.33k|    if (store->objs_ht != NULL) {
  ------------------
  |  Branch (454:9): [True: 7.33k, False: 0]
  ------------------
  455|  7.33k|        objs = ossl_x509_store_ht_get_by_name(store, name);
  456|  7.33k|        if (objs != NULL)
  ------------------
  |  Branch (456:13): [True: 3.55k, False: 3.77k]
  ------------------
  457|  3.55k|            tmp = X509_OBJECT_retrieve_by_subject(objs, type, name);
  458|  7.33k|    } else {
  459|      0|        tmp = X509_OBJECT_retrieve_by_subject(store->objs, type, name);
  460|      0|    }
  461|  7.33k|    X509_STORE_unlock(store);
  462|       |
  463|  7.33k|    if (tmp == NULL || type == X509_LU_CRL) {
  ------------------
  |  Branch (463:9): [True: 3.77k, False: 3.55k]
  |  Branch (463:24): [True: 0, False: 3.55k]
  ------------------
  464|  3.77k|        for (i = 0; i < sk_X509_LOOKUP_num(store->get_cert_methods); i++) {
  ------------------
  |  |   75|  3.77k|#define sk_X509_LOOKUP_num(sk) OPENSSL_sk_num(ossl_check_const_X509_LOOKUP_sk_type(sk))
  ------------------
  |  Branch (464:21): [True: 0, False: 3.77k]
  ------------------
  465|      0|            lu = sk_X509_LOOKUP_value(store->get_cert_methods, i);
  ------------------
  |  |   76|      0|#define sk_X509_LOOKUP_value(sk, idx) ((X509_LOOKUP *)OPENSSL_sk_value(ossl_check_const_X509_LOOKUP_sk_type(sk), (idx)))
  ------------------
  466|      0|            if (lu->skip)
  ------------------
  |  Branch (466:17): [True: 0, False: 0]
  ------------------
  467|      0|                continue;
  468|      0|            if (lu->method == NULL)
  ------------------
  |  Branch (468:17): [True: 0, False: 0]
  ------------------
  469|      0|                return -1;
  470|      0|            j = X509_LOOKUP_by_subject_ex(lu, type, name, &stmp,
  471|      0|                ctx->libctx, ctx->propq);
  472|      0|            if (j != 0) { /* non-zero value is considered success here */
  ------------------
  |  Branch (472:17): [True: 0, False: 0]
  ------------------
  473|      0|                tmp = &stmp;
  474|      0|                break;
  475|      0|            }
  476|      0|        }
  477|  3.77k|        if (tmp == NULL)
  ------------------
  |  Branch (477:13): [True: 3.77k, False: 0]
  ------------------
  478|  3.77k|            return 0;
  479|  3.77k|    }
  480|       |
  481|  3.55k|    if (ret != NULL) {
  ------------------
  |  Branch (481:9): [True: 3.55k, False: 0]
  ------------------
  482|  3.55k|        if (!X509_OBJECT_up_ref_count(tmp))
  ------------------
  |  Branch (482:13): [True: 0, False: 3.55k]
  ------------------
  483|      0|            return -1;
  484|  3.55k|        ret->type = tmp->type;
  485|  3.55k|        ret->data = tmp->data;
  486|  3.55k|    }
  487|  3.55k|    return 1;
  488|  3.55k|}
X509_STORE_add_cert:
  586|  3.55k|{
  587|  3.55k|    if (!x509_store_add_x509(xs, x)) {
  ------------------
  |  Branch (587:9): [True: 0, False: 3.55k]
  ------------------
  588|      0|        ERR_raise(ERR_LIB_X509, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  589|      0|        return 0;
  590|      0|    }
  591|  3.55k|    return 1;
  592|  3.55k|}
X509_OBJECT_up_ref_count:
  604|  7.10k|{
  605|  7.10k|    switch (a->type) {
  ------------------
  |  Branch (605:13): [True: 7.10k, False: 0]
  ------------------
  606|      0|    case X509_LU_NONE:
  ------------------
  |  Branch (606:5): [True: 0, False: 7.10k]
  ------------------
  607|      0|        break;
  608|  7.10k|    case X509_LU_X509:
  ------------------
  |  Branch (608:5): [True: 7.10k, False: 0]
  ------------------
  609|  7.10k|        return X509_up_ref(a->data.x509);
  610|      0|    case X509_LU_CRL:
  ------------------
  |  Branch (610:5): [True: 0, False: 7.10k]
  ------------------
  611|      0|        return X509_CRL_up_ref(a->data.crl);
  612|  7.10k|    }
  613|      0|    return 1;
  614|  7.10k|}
X509_OBJECT_new:
  636|  10.8k|{
  637|  10.8k|    X509_OBJECT *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  10.8k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  638|       |
  639|  10.8k|    if (ret == NULL)
  ------------------
  |  Branch (639:9): [True: 0, False: 10.8k]
  ------------------
  640|      0|        return NULL;
  641|  10.8k|    ret->type = X509_LU_NONE;
  642|  10.8k|    return ret;
  643|  10.8k|}
X509_OBJECT_free:
  684|  10.8k|{
  685|  10.8k|    x509_object_free_internal(a);
  686|  10.8k|    OPENSSL_free(a);
  ------------------
  |  |  132|  10.8k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  687|  10.8k|}
X509_OBJECT_idx_by_subject:
  720|  3.55k|{
  721|       |    return x509_object_idx_cnt(h, type, name, NULL);
  722|  3.55k|}
X509_OBJECT_retrieve_by_subject:
  728|  3.55k|{
  729|  3.55k|    int idx = X509_OBJECT_idx_by_subject(h, type, name);
  730|       |
  731|  3.55k|    if (idx == -1)
  ------------------
  |  Branch (731:9): [True: 0, False: 3.55k]
  ------------------
  732|      0|        return NULL;
  733|  3.55k|    return sk_X509_OBJECT_value(h, idx);
  ------------------
  |  |  102|  3.55k|#define sk_X509_OBJECT_value(sk, idx) ((X509_OBJECT *)OPENSSL_sk_value(ossl_check_const_X509_OBJECT_sk_type(sk), (idx)))
  ------------------
  734|  3.55k|}
X509_STORE_set_flags:
 1011|  3.55k|{
 1012|  3.55k|    return X509_VERIFY_PARAM_set_flags(xs->param, flags);
 1013|  3.55k|}
x509_lu.c:objs_ht_free:
  187|  3.55k|{
  188|  3.55k|    STACK_OF(X509_OBJECT) *objs = v->value;
  ------------------
  |  |   33|  3.55k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  189|       |
  190|  3.55k|    sk_X509_OBJECT_pop_free(objs, X509_OBJECT_free);
  ------------------
  |  |  115|  3.55k|#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))
  ------------------
  191|  3.55k|}
x509_lu.c:obj_ht_hash:
  194|  14.4k|{
  195|  14.4k|    OBJS_KEY *k = (OBJS_KEY *)key;
  196|       |
  197|  14.4k|    return ossl_fnv1a_hash(k->keyfields.xn_canon, k->keyfields.xn_canon_enclen);
  198|  14.4k|}
x509_lu.c:x509_object_cmp:
  166|  3.55k|{
  167|  3.55k|    int ret;
  168|       |
  169|  3.55k|    ret = ((*a)->type - (*b)->type);
  170|  3.55k|    if (ret)
  ------------------
  |  Branch (170:9): [True: 0, False: 3.55k]
  ------------------
  171|      0|        return ret;
  172|  3.55k|    switch ((*a)->type) {
  ------------------
  |  Branch (172:13): [True: 3.55k, False: 0]
  ------------------
  173|  3.55k|    case X509_LU_X509:
  ------------------
  |  Branch (173:5): [True: 3.55k, False: 0]
  ------------------
  174|  3.55k|        ret = X509_subject_name_cmp((*a)->data.x509, (*b)->data.x509);
  175|  3.55k|        break;
  176|      0|    case X509_LU_CRL:
  ------------------
  |  Branch (176:5): [True: 0, False: 3.55k]
  ------------------
  177|      0|        ret = X509_CRL_cmp((*a)->data.crl, (*b)->data.crl);
  178|      0|        break;
  179|      0|    case X509_LU_NONE:
  ------------------
  |  Branch (179:5): [True: 0, False: 3.55k]
  ------------------
  180|       |        /* abort(); */
  181|      0|        return 0;
  182|  3.55k|    }
  183|  3.55k|    return ret;
  184|  3.55k|}
x509_lu.c:x509_store_add_x509:
  550|  3.55k|{
  551|  3.55k|    X509_OBJECT *obj;
  552|       |
  553|  3.55k|    if (x == NULL)
  ------------------
  |  Branch (553:9): [True: 0, False: 3.55k]
  ------------------
  554|      0|        return 0;
  555|  3.55k|    obj = X509_OBJECT_new();
  556|  3.55k|    if (obj == NULL)
  ------------------
  |  Branch (556:9): [True: 0, False: 3.55k]
  ------------------
  557|      0|        return 0;
  558|       |
  559|  3.55k|    obj->type = X509_LU_X509;
  560|       |    /*
  561|       |     * XXX Casts away const, get rid of this once we can have the x509
  562|       |     * member of OBJECT be const.
  563|       |     */
  564|  3.55k|    obj->data.x509 = (X509 *)x;
  565|       |
  566|  3.55k|    return x509_store_add_obj(store, obj);
  567|  3.55k|}
x509_lu.c:x509_store_add_obj:
  498|  3.55k|{
  499|  3.55k|    const X509_NAME *xn;
  500|  3.55k|    STACK_OF(X509_OBJECT) *objs = NULL;
  ------------------
  |  |   33|  3.55k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  501|  3.55k|    int ret = 0, added = 0;
  502|       |
  503|  3.55k|    if (obj->type == X509_LU_CRL)
  ------------------
  |  Branch (503:9): [True: 0, False: 3.55k]
  ------------------
  504|      0|        xn = obj->data.crl->crl.issuer;
  505|  3.55k|    else
  506|  3.55k|        xn = obj->data.x509->cert_info.subject;
  507|       |
  508|  3.55k|    if (xn == NULL) {
  ------------------
  |  Branch (508:9): [True: 0, False: 3.55k]
  ------------------
  509|      0|        obj->type = X509_LU_NONE;
  510|      0|        X509_OBJECT_free(obj);
  511|      0|        return 0;
  512|      0|    }
  513|       |
  514|  3.55k|    if (!X509_OBJECT_up_ref_count(obj)) {
  ------------------
  |  Branch (514:9): [True: 0, False: 3.55k]
  ------------------
  515|      0|        obj->type = X509_LU_NONE;
  516|      0|        X509_OBJECT_free(obj);
  517|      0|        return 0;
  518|      0|    }
  519|       |
  520|  3.55k|    if (!X509_STORE_lock(store)) {
  ------------------
  |  Branch (520:9): [True: 0, False: 3.55k]
  ------------------
  521|      0|        X509_OBJECT_free(obj);
  522|      0|        return 0;
  523|      0|    }
  524|       |
  525|  3.55k|    if (store->objs_ht != NULL) {
  ------------------
  |  Branch (525:9): [True: 3.55k, False: 0]
  ------------------
  526|  3.55k|        objs = ossl_x509_store_ht_get_by_name(store, xn);
  527|  3.55k|        if (objs != NULL && X509_OBJECT_retrieve_match(objs, obj)) {
  ------------------
  |  Branch (527:13): [True: 0, False: 3.55k]
  |  Branch (527:29): [True: 0, False: 0]
  ------------------
  528|      0|            ret = 1;
  529|  3.55k|        } else {
  530|  3.55k|            added = x509_name_objs_ht_insert(store, xn, objs, obj);
  531|  3.55k|            ret = added != 0;
  532|  3.55k|        }
  533|  3.55k|    } else {
  534|      0|        if (X509_OBJECT_retrieve_match(store->objs, obj)) {
  ------------------
  |  Branch (534:13): [True: 0, False: 0]
  ------------------
  535|      0|            ret = 1;
  536|      0|        } else {
  537|      0|            added = sk_X509_OBJECT_push(store->objs, obj);
  ------------------
  |  |  111|      0|#define sk_X509_OBJECT_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_OBJECT_sk_type(sk), ossl_check_X509_OBJECT_type(ptr))
  ------------------
  538|      0|            ret = added != 0;
  539|      0|        }
  540|      0|    }
  541|  3.55k|    X509_STORE_unlock(store);
  542|       |
  543|  3.55k|    if (added == 0) /* obj not pushed */
  ------------------
  |  Branch (543:9): [True: 0, False: 3.55k]
  ------------------
  544|      0|        X509_OBJECT_free(obj);
  545|       |
  546|  3.55k|    return ret;
  547|  3.55k|}
x509_lu.c:x509_name_objs_ht_insert:
  369|  3.55k|{
  370|  3.55k|    int ret = 0, added = 0;
  371|  3.55k|    OBJS_KEY key;
  372|  3.55k|    HT_VALUE val = { 0 };
  373|       |
  374|  3.55k|    if (objs != NULL) {
  ------------------
  |  Branch (374:9): [True: 0, False: 3.55k]
  ------------------
  375|      0|        added = sk_X509_OBJECT_push(objs, obj) != 0;
  ------------------
  |  |  111|      0|#define sk_X509_OBJECT_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_OBJECT_sk_type(sk), ossl_check_X509_OBJECT_type(ptr))
  ------------------
  376|      0|        return added;
  377|      0|    }
  378|       |
  379|  3.55k|    if (xn->canon_enc == NULL || xn->modified) {
  ------------------
  |  Branch (379:9): [True: 0, False: 3.55k]
  |  Branch (379:34): [True: 0, False: 3.55k]
  ------------------
  380|      0|        ret = i2d_X509_NAME((X509_NAME *)xn, NULL);
  381|      0|        if (ret < 0)
  ------------------
  |  Branch (381:13): [True: 0, False: 0]
  ------------------
  382|      0|            return 0;
  383|      0|    }
  384|       |
  385|  3.55k|    objs = sk_X509_OBJECT_new(x509_object_cmp);
  ------------------
  |  |  103|  3.55k|#define sk_X509_OBJECT_new(cmp) ((STACK_OF(X509_OBJECT) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new(ossl_check_X509_OBJECT_compfunc_type(cmp)), sk_X509_OBJECT_cmpfunc_thunk))
  ------------------
  386|  3.55k|    if (objs == NULL)
  ------------------
  |  Branch (386:9): [True: 0, False: 3.55k]
  ------------------
  387|      0|        return 0;
  388|       |
  389|  3.55k|    added = sk_X509_OBJECT_push(objs, obj) != 0;
  ------------------
  |  |  111|  3.55k|#define sk_X509_OBJECT_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_OBJECT_sk_type(sk), ossl_check_X509_OBJECT_type(ptr))
  ------------------
  390|  3.55k|    if (added == 0) {
  ------------------
  |  Branch (390:9): [True: 0, False: 3.55k]
  ------------------
  391|      0|        sk_X509_OBJECT_free(objs);
  ------------------
  |  |  107|      0|#define sk_X509_OBJECT_free(sk) OPENSSL_sk_free(ossl_check_X509_OBJECT_sk_type(sk))
  ------------------
  392|      0|        return 0;
  393|      0|    }
  394|       |
  395|  3.55k|    HT_INIT_KEY(&key);
  ------------------
  |  |  112|  3.55k|    do {                                                                                           \
  |  |  113|  3.55k|        memset((key), 0, sizeof(*(key)));                                                          \
  |  |  114|  3.55k|        (key)->key_header.keysize = (key)->key_header.bufsize = (sizeof(*(key)) - sizeof(HT_KEY)); \
  |  |  115|  3.55k|        (key)->key_header.keybuf = (((uint8_t *)key) + sizeof(HT_KEY));                            \
  |  |  116|  3.55k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (116:14): [Folded, False: 3.55k]
  |  |  ------------------
  ------------------
  396|  3.55k|    HT_SET_KEY_FIELD(&key, xn_canon, xn->canon_enc);
  ------------------
  |  |  180|  3.55k|#define HT_SET_KEY_FIELD(key, member, value) (key)->keyfields.member = value;
  ------------------
  397|  3.55k|    HT_SET_KEY_FIELD(&key, xn_canon_enclen, xn->canon_enclen);
  ------------------
  |  |  180|  3.55k|#define HT_SET_KEY_FIELD(key, member, value) (key)->keyfields.member = value;
  ------------------
  398|  3.55k|    val.value = (void *)objs;
  399|  3.55k|    ret = ossl_ht_insert(store->objs_ht, TO_HT_KEY(&key), &val, NULL);
  ------------------
  |  |  237|  3.55k|#define TO_HT_KEY(key) &(key)->key_header
  ------------------
  400|  3.55k|    if (ret != 1) {
  ------------------
  |  Branch (400:9): [True: 0, False: 3.55k]
  ------------------
  401|      0|        sk_X509_OBJECT_free(objs);
  ------------------
  |  |  107|      0|#define sk_X509_OBJECT_free(sk) OPENSSL_sk_free(ossl_check_X509_OBJECT_sk_type(sk))
  ------------------
  402|      0|        return 0;
  403|      0|    }
  404|       |
  405|  3.55k|    return 1;
  406|  3.55k|}
x509_lu.c:x509_object_free_internal:
  646|  10.8k|{
  647|  10.8k|    if (a == NULL)
  ------------------
  |  Branch (647:9): [True: 0, False: 10.8k]
  ------------------
  648|      0|        return;
  649|  10.8k|    switch (a->type) {
  ------------------
  |  Branch (649:13): [True: 10.8k, False: 0]
  ------------------
  650|  7.33k|    case X509_LU_NONE:
  ------------------
  |  Branch (650:5): [True: 7.33k, False: 3.55k]
  ------------------
  651|  7.33k|        break;
  652|  3.55k|    case X509_LU_X509:
  ------------------
  |  Branch (652:5): [True: 3.55k, False: 7.33k]
  ------------------
  653|  3.55k|        X509_free(a->data.x509);
  654|  3.55k|        break;
  655|      0|    case X509_LU_CRL:
  ------------------
  |  Branch (655:5): [True: 0, False: 10.8k]
  ------------------
  656|      0|        X509_CRL_free(a->data.crl);
  657|      0|        break;
  658|  10.8k|    }
  659|  10.8k|}
x509_lu.c:x509_object_idx_cnt:
  692|  3.55k|{
  693|  3.55k|    X509_OBJECT stmp;
  694|  3.55k|    X509 x509_s;
  695|  3.55k|    X509_CRL crl_s;
  696|       |
  697|  3.55k|    stmp.type = type;
  698|  3.55k|    switch (type) {
  699|  3.55k|    case X509_LU_X509:
  ------------------
  |  Branch (699:5): [True: 3.55k, False: 0]
  ------------------
  700|  3.55k|        stmp.data.x509 = &x509_s;
  701|  3.55k|        x509_s.cert_info.subject = (X509_NAME *)name; /* won't modify it */
  702|  3.55k|        break;
  703|      0|    case X509_LU_CRL:
  ------------------
  |  Branch (703:5): [True: 0, False: 3.55k]
  ------------------
  704|      0|        stmp.data.crl = &crl_s;
  705|      0|        crl_s.crl.issuer = (X509_NAME *)name; /* won't modify it */
  706|      0|        break;
  707|      0|    case X509_LU_NONE:
  ------------------
  |  Branch (707:5): [True: 0, False: 3.55k]
  ------------------
  708|      0|    default:
  ------------------
  |  Branch (708:5): [True: 0, False: 3.55k]
  ------------------
  709|       |        /* abort(); */
  710|      0|        return -1;
  711|  3.55k|    }
  712|       |
  713|       |    /* Assumes h is locked for read if applicable */
  714|  3.55k|    return sk_X509_OBJECT_find_all(h, &stmp, pnmatch);
  ------------------
  |  |  120|  3.55k|#define sk_X509_OBJECT_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_X509_OBJECT_sk_type(sk), ossl_check_X509_OBJECT_type(ptr), pnum)
  ------------------
  715|  3.55k|}

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

X509_check_trust:
   68|  7.10k|{
   69|  7.10k|    X509_TRUST *pt;
   70|  7.10k|    int idx;
   71|       |
   72|       |    /* We get this as a default value */
   73|  7.10k|    if (id == X509_TRUST_DEFAULT)
  ------------------
  |  |  195|  7.10k|#define X509_TRUST_DEFAULT 0 /* Only valid in purpose settings */
  ------------------
  |  Branch (73:9): [True: 0, False: 7.10k]
  ------------------
   74|      0|        return obj_trust(NID_anyExtendedKeyUsage, x,
  ------------------
  |  | 2929|      0|#define NID_anyExtendedKeyUsage         910
  ------------------
   75|      0|            flags | X509_TRUST_DO_SS_COMPAT);
  ------------------
  |  |  214|      0|#define X509_TRUST_DO_SS_COMPAT (1U << 3)
  ------------------
   76|  7.10k|    idx = X509_TRUST_get_by_id(id);
   77|  7.10k|    if (idx < 0)
  ------------------
  |  Branch (77:9): [True: 0, False: 7.10k]
  ------------------
   78|      0|        return default_trust(id, x, flags);
   79|  7.10k|    pt = X509_TRUST_get0(idx);
   80|  7.10k|    return pt->check_trust(pt, x, flags);
   81|  7.10k|}
X509_TRUST_get0:
   91|  7.10k|{
   92|  7.10k|    if (idx < 0)
  ------------------
  |  Branch (92:9): [True: 0, False: 7.10k]
  ------------------
   93|      0|        return NULL;
   94|  7.10k|    if (idx < (int)X509_TRUST_COUNT)
  ------------------
  |  |   48|  7.10k|#define X509_TRUST_COUNT OSSL_NELEM(trstandard)
  |  |  ------------------
  |  |  |  |   14|  7.10k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
  |  Branch (94:9): [True: 7.10k, False: 0]
  ------------------
   95|  7.10k|        return trstandard + idx;
   96|      0|    return sk_X509_TRUST_value(trtable, idx - X509_TRUST_COUNT);
  ------------------
  |  |  167|      0|#define sk_X509_TRUST_value(sk, idx) ((X509_TRUST *)OPENSSL_sk_value(ossl_check_const_X509_TRUST_sk_type(sk), (idx)))
  ------------------
   97|  7.10k|}
X509_TRUST_get_by_id:
  100|  7.10k|{
  101|  7.10k|    X509_TRUST tmp;
  102|  7.10k|    int idx;
  103|       |
  104|  7.10k|    if ((id >= X509_TRUST_MIN) && (id <= X509_TRUST_MAX))
  ------------------
  |  |  205|  7.10k|#define X509_TRUST_MIN 1
  ------------------
                  if ((id >= X509_TRUST_MIN) && (id <= X509_TRUST_MAX))
  ------------------
  |  |  206|  7.10k|#define X509_TRUST_MAX 8
  ------------------
  |  Branch (104:9): [True: 7.10k, False: 0]
  |  Branch (104:35): [True: 7.10k, False: 0]
  ------------------
  105|  7.10k|        return id - X509_TRUST_MIN;
  ------------------
  |  |  205|  7.10k|#define X509_TRUST_MIN 1
  ------------------
  106|      0|    if (trtable == NULL)
  ------------------
  |  Branch (106:9): [True: 0, False: 0]
  ------------------
  107|      0|        return -1;
  108|      0|    tmp.trust = id;
  109|       |    /* Ideally, this would be done under lock */
  110|      0|    sk_X509_TRUST_sort(trtable);
  ------------------
  |  |  186|      0|#define sk_X509_TRUST_sort(sk) OPENSSL_sk_sort(ossl_check_X509_TRUST_sk_type(sk))
  ------------------
  111|      0|    idx = sk_X509_TRUST_find(trtable, &tmp);
  ------------------
  |  |  183|      0|#define sk_X509_TRUST_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509_TRUST_sk_type(sk), ossl_check_X509_TRUST_type(ptr))
  ------------------
  112|      0|    if (idx < 0)
  ------------------
  |  Branch (112:9): [True: 0, False: 0]
  ------------------
  113|      0|        return -1;
  114|      0|    return idx + X509_TRUST_COUNT;
  ------------------
  |  |   48|      0|#define X509_TRUST_COUNT OSSL_NELEM(trstandard)
  |  |  ------------------
  |  |  |  |   14|      0|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
  115|      0|}
x509_trust.c:trust_compat:
  241|  7.10k|{
  242|       |    /* Call for side-effect of setting EXFLAG_SS for self-signed-certs */
  243|  7.10k|    if (X509_check_purpose(x, -1, 0) != 1)
  ------------------
  |  Branch (243:9): [True: 0, False: 7.10k]
  ------------------
  244|      0|        return X509_TRUST_UNTRUSTED;
  ------------------
  |  |  221|      0|#define X509_TRUST_UNTRUSTED 3
  ------------------
  245|  7.10k|    if ((flags & X509_TRUST_NO_SS_COMPAT) == 0 && (x->ex_flags & EXFLAG_SS))
  ------------------
  |  |  212|  7.10k|#define X509_TRUST_NO_SS_COMPAT (1U << 2)
  ------------------
                  if ((flags & X509_TRUST_NO_SS_COMPAT) == 0 && (x->ex_flags & EXFLAG_SS))
  ------------------
  |  |  684|  3.55k|#define EXFLAG_SS 0x2000 /* cert is apparently self-signed */
  ------------------
  |  Branch (245:9): [True: 3.55k, False: 3.55k]
  |  Branch (245:51): [True: 3.55k, False: 0]
  ------------------
  246|  3.55k|        return X509_TRUST_TRUSTED;
  ------------------
  |  |  219|  3.55k|#define X509_TRUST_TRUSTED 1
  ------------------
  247|  3.55k|    else
  248|  3.55k|        return X509_TRUST_UNTRUSTED;
  ------------------
  |  |  221|  3.55k|#define X509_TRUST_UNTRUSTED 3
  ------------------
  249|  7.10k|}
x509_trust.c:trust_1oidany:
  218|  7.10k|{
  219|       |    /*
  220|       |     * Declare the chain verified if the desired trust OID is not rejected in
  221|       |     * any auxiliary trust info for this certificate, and the OID is either
  222|       |     * expressly trusted, or else either "anyEKU" is trusted, or the
  223|       |     * certificate is self-signed and X509_TRUST_NO_SS_COMPAT is not set.
  224|       |     */
  225|  7.10k|    flags |= X509_TRUST_DO_SS_COMPAT | X509_TRUST_OK_ANY_EKU;
  ------------------
  |  |  214|  7.10k|#define X509_TRUST_DO_SS_COMPAT (1U << 3)
  ------------------
                  flags |= X509_TRUST_DO_SS_COMPAT | X509_TRUST_OK_ANY_EKU;
  ------------------
  |  |  216|  7.10k|#define X509_TRUST_OK_ANY_EKU (1U << 4)
  ------------------
  226|  7.10k|    return obj_trust(trust->arg1, x, flags);
  227|  7.10k|}
x509_trust.c:obj_trust:
  259|  7.10k|{
  260|  7.10k|    X509_CERT_AUX *ax = x->aux;
  261|  7.10k|    int i;
  262|       |
  263|  7.10k|    if (ax != NULL && ax->reject != NULL) {
  ------------------
  |  Branch (263:9): [True: 0, False: 7.10k]
  |  Branch (263:23): [True: 0, False: 0]
  ------------------
  264|      0|        for (i = 0; i < sk_ASN1_OBJECT_num(ax->reject); i++) {
  ------------------
  |  |  588|      0|#define sk_ASN1_OBJECT_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_OBJECT_sk_type(sk))
  ------------------
  |  Branch (264:21): [True: 0, False: 0]
  ------------------
  265|      0|            ASN1_OBJECT *obj = sk_ASN1_OBJECT_value(ax->reject, i);
  ------------------
  |  |  589|      0|#define sk_ASN1_OBJECT_value(sk, idx) ((ASN1_OBJECT *)OPENSSL_sk_value(ossl_check_const_ASN1_OBJECT_sk_type(sk), (idx)))
  ------------------
  266|      0|            int nid = OBJ_obj2nid(obj);
  267|       |
  268|      0|            if (nid == id || (nid == NID_anyExtendedKeyUsage && (flags & X509_TRUST_OK_ANY_EKU)))
  ------------------
  |  | 2929|      0|#define NID_anyExtendedKeyUsage         910
  ------------------
                          if (nid == id || (nid == NID_anyExtendedKeyUsage && (flags & X509_TRUST_OK_ANY_EKU)))
  ------------------
  |  |  216|      0|#define X509_TRUST_OK_ANY_EKU (1U << 4)
  ------------------
  |  Branch (268:17): [True: 0, False: 0]
  |  Branch (268:31): [True: 0, False: 0]
  |  Branch (268:65): [True: 0, False: 0]
  ------------------
  269|      0|                return X509_TRUST_REJECTED;
  ------------------
  |  |  220|      0|#define X509_TRUST_REJECTED 2
  ------------------
  270|      0|        }
  271|      0|    }
  272|       |
  273|  7.10k|    if (ax != NULL && ax->trust != NULL) {
  ------------------
  |  Branch (273:9): [True: 0, False: 7.10k]
  |  Branch (273:23): [True: 0, False: 0]
  ------------------
  274|      0|        for (i = 0; i < sk_ASN1_OBJECT_num(ax->trust); i++) {
  ------------------
  |  |  588|      0|#define sk_ASN1_OBJECT_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_OBJECT_sk_type(sk))
  ------------------
  |  Branch (274:21): [True: 0, False: 0]
  ------------------
  275|      0|            ASN1_OBJECT *obj = sk_ASN1_OBJECT_value(ax->trust, i);
  ------------------
  |  |  589|      0|#define sk_ASN1_OBJECT_value(sk, idx) ((ASN1_OBJECT *)OPENSSL_sk_value(ossl_check_const_ASN1_OBJECT_sk_type(sk), (idx)))
  ------------------
  276|      0|            int nid = OBJ_obj2nid(obj);
  277|       |
  278|      0|            if (nid == id || (nid == NID_anyExtendedKeyUsage && (flags & X509_TRUST_OK_ANY_EKU)))
  ------------------
  |  | 2929|      0|#define NID_anyExtendedKeyUsage         910
  ------------------
                          if (nid == id || (nid == NID_anyExtendedKeyUsage && (flags & X509_TRUST_OK_ANY_EKU)))
  ------------------
  |  |  216|      0|#define X509_TRUST_OK_ANY_EKU (1U << 4)
  ------------------
  |  Branch (278:17): [True: 0, False: 0]
  |  Branch (278:31): [True: 0, False: 0]
  |  Branch (278:65): [True: 0, False: 0]
  ------------------
  279|      0|                return X509_TRUST_TRUSTED;
  ------------------
  |  |  219|      0|#define X509_TRUST_TRUSTED 1
  ------------------
  280|      0|        }
  281|       |        /*
  282|       |         * Reject when explicit trust EKU are set and none match.
  283|       |         *
  284|       |         * Returning untrusted is enough for full chains that end in
  285|       |         * self-signed roots, because when explicit trust is specified it
  286|       |         * suppresses the default blanket trust of self-signed objects.
  287|       |         *
  288|       |         * But for partial chains, this is not enough, because absent a similar
  289|       |         * trust-self-signed policy, non matching EKUs are indistinguishable
  290|       |         * from lack of EKU constraints.
  291|       |         *
  292|       |         * Therefore, failure to match any trusted purpose must trigger an
  293|       |         * explicit reject.
  294|       |         */
  295|      0|        return X509_TRUST_REJECTED;
  ------------------
  |  |  220|      0|#define X509_TRUST_REJECTED 2
  ------------------
  296|      0|    }
  297|       |
  298|  7.10k|    if ((flags & X509_TRUST_DO_SS_COMPAT) == 0)
  ------------------
  |  |  214|  7.10k|#define X509_TRUST_DO_SS_COMPAT (1U << 3)
  ------------------
  |  Branch (298:9): [True: 0, False: 7.10k]
  ------------------
  299|      0|        return X509_TRUST_UNTRUSTED;
  ------------------
  |  |  221|      0|#define X509_TRUST_UNTRUSTED 3
  ------------------
  300|       |
  301|       |    /*
  302|       |     * Not rejected, and there is no list of accepted uses, try compat.
  303|       |     */
  304|  7.10k|    return trust_compat(NULL, x, flags);
  305|  7.10k|}

X509v3_get_ext_count:
   23|  64.8k|{
   24|  64.8k|    int ret;
   25|       |
   26|  64.8k|    if (x == NULL)
  ------------------
  |  Branch (26:9): [True: 0, False: 64.8k]
  ------------------
   27|      0|        return 0;
   28|  64.8k|    ret = sk_X509_EXTENSION_num(x);
  ------------------
  |  |  242|  64.8k|#define sk_X509_EXTENSION_num(sk) OPENSSL_sk_num(ossl_check_const_X509_EXTENSION_sk_type(sk))
  ------------------
   29|  64.8k|    return ret > 0 ? ret : 0;
  ------------------
  |  Branch (29:12): [True: 64.8k, False: 0]
  ------------------
   30|  64.8k|}
X509v3_get_ext:
   86|  54.0k|{
   87|  54.0k|    if (x == NULL || sk_X509_EXTENSION_num(x) <= loc || loc < 0)
  ------------------
  |  |  242|  54.0k|#define sk_X509_EXTENSION_num(sk) OPENSSL_sk_num(ossl_check_const_X509_EXTENSION_sk_type(sk))
  ------------------
  |  Branch (87:9): [True: 0, False: 54.0k]
  |  Branch (87:22): [True: 0, False: 54.0k]
  |  Branch (87:57): [True: 0, False: 54.0k]
  ------------------
   88|      0|        return NULL;
   89|  54.0k|    else
   90|  54.0k|        return sk_X509_EXTENSION_value(x, loc);
  ------------------
  |  |  243|  54.0k|#define sk_X509_EXTENSION_value(sk, idx) ((X509_EXTENSION *)OPENSSL_sk_value(ossl_check_const_X509_EXTENSION_sk_type(sk), (idx)))
  ------------------
   91|  54.0k|}
X509_EXTENSION_get_object:
  270|   796k|{
  271|   796k|    if (ex == NULL)
  ------------------
  |  Branch (271:9): [True: 0, False: 796k]
  ------------------
  272|      0|        return NULL;
  273|   796k|    return ex->object;
  274|   796k|}
X509_EXTENSION_get_data:
  277|  54.1k|{
  278|  54.1k|    if (ex == NULL)
  ------------------
  |  Branch (278:9): [True: 0, False: 54.1k]
  ------------------
  279|      0|        return NULL;
  280|  54.1k|    return &ex->value;
  281|  54.1k|}
X509_EXTENSION_get_critical:
  284|   108k|{
  285|   108k|    if (ex == NULL)
  ------------------
  |  Branch (285:9): [True: 0, False: 108k]
  ------------------
  286|      0|        return 0;
  287|   108k|    if (ex->critical > 0)
  ------------------
  |  Branch (287:9): [True: 43.2k, False: 64.8k]
  ------------------
  288|  43.2k|        return 1;
  289|  64.8k|    return 0;
  290|   108k|}

X509_self_signed:
  103|  7.33k|{
  104|  7.33k|    EVP_PKEY *pkey;
  105|       |
  106|  7.33k|    if ((pkey = X509_get0_pubkey(cert)) == NULL) { /* handles cert == NULL */
  ------------------
  |  Branch (106:9): [True: 0, False: 7.33k]
  ------------------
  107|      0|        ERR_raise(ERR_LIB_X509, X509_R_UNABLE_TO_GET_CERTS_PUBLIC_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  108|      0|        return -1;
  109|      0|    }
  110|  7.33k|    if (!ossl_x509v3_cache_extensions((X509 *)cert))
  ------------------
  |  Branch (110:9): [True: 0, False: 7.33k]
  ------------------
  111|      0|        return -1;
  112|  7.33k|    if ((cert->ex_flags & EXFLAG_SS) == 0)
  ------------------
  |  |  684|  7.33k|#define EXFLAG_SS 0x2000 /* cert is apparently self-signed */
  ------------------
  |  Branch (112:9): [True: 0, False: 7.33k]
  ------------------
  113|      0|        return 0;
  114|  7.33k|    if (!verify_signature)
  ------------------
  |  Branch (114:9): [True: 7.33k, False: 0]
  ------------------
  115|  7.33k|        return 1;
  116|      0|    return X509_verify(cert, pkey);
  117|  7.33k|}
X509_verify_cert:
  308|  7.25k|{
  309|  7.25k|    if (ctx == NULL) {
  ------------------
  |  Branch (309:9): [True: 0, False: 7.25k]
  ------------------
  310|      0|        ERR_raise(ERR_LIB_X509, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  311|      0|        return -1;
  312|      0|    }
  313|  7.25k|    return (ctx->rpk != NULL) ? x509_verify_rpk(ctx) : x509_verify_x509(ctx);
  ------------------
  |  Branch (313:12): [True: 0, False: 7.25k]
  ------------------
  314|  7.25k|}
X509_STORE_CTX_get1_issuer:
  457|  7.33k|{
  458|  7.33k|    const X509_NAME *xn = X509_get_issuer_name(x);
  459|  7.33k|    X509_OBJECT *obj = X509_OBJECT_new();
  460|  7.33k|    STACK_OF(X509) *certs;
  ------------------
  |  |   33|  7.33k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  461|  7.33k|    int ret;
  462|       |
  463|  7.33k|    *issuer = NULL;
  464|  7.33k|    if (obj == NULL)
  ------------------
  |  Branch (464:9): [True: 0, False: 7.33k]
  ------------------
  465|      0|        return -1;
  466|  7.33k|    ret = ossl_x509_store_ctx_get_by_subject(ctx, X509_LU_X509, xn, obj);
  467|  7.33k|    if (ret != 1)
  ------------------
  |  Branch (467:9): [True: 3.77k, False: 3.55k]
  ------------------
  468|  3.77k|        goto end;
  469|       |
  470|       |    /* quick happy path: certificate matches and is currently valid */
  471|  3.55k|    if (ctx->check_issued(ctx, x, obj->data.x509)) {
  ------------------
  |  Branch (471:9): [True: 3.55k, False: 0]
  ------------------
  472|  3.55k|        if (ossl_x509_check_cert_time(ctx, obj->data.x509, -1)) {
  ------------------
  |  Branch (472:13): [True: 3.55k, False: 0]
  ------------------
  473|  3.55k|            *issuer = obj->data.x509;
  474|       |            /* |*issuer| has taken over the cert reference from |obj| */
  475|  3.55k|            obj->type = X509_LU_NONE;
  476|  3.55k|            goto end;
  477|  3.55k|        }
  478|  3.55k|    }
  479|       |
  480|      0|    ret = -1;
  481|      0|    if ((certs = X509_STORE_CTX_get1_certs(ctx, xn)) == NULL)
  ------------------
  |  Branch (481:9): [True: 0, False: 0]
  ------------------
  482|      0|        goto end;
  483|      0|    *issuer = get0_best_issuer_sk(ctx, 0, 0 /* allow duplicates */, certs, x);
  484|      0|    ret = 0;
  485|      0|    if (*issuer != NULL)
  ------------------
  |  Branch (485:9): [True: 0, False: 0]
  ------------------
  486|      0|        ret = X509_up_ref(*issuer) ? 1 : -1;
  ------------------
  |  Branch (486:15): [True: 0, False: 0]
  ------------------
  487|      0|    OSSL_STACK_OF_X509_free(certs);
  488|  7.33k|end:
  489|  7.33k|    X509_OBJECT_free(obj);
  490|  7.33k|    return ret;
  491|      0|}
ossl_x509_check_cert_time:
 2257|  7.10k|{
 2258|  7.10k|    const X509_VERIFY_PARAM *vpm = ctx->param;
 2259|  7.10k|    int64_t notafter_seconds, notbefore_seconds, verification_time;
 2260|  7.10k|    int err;
 2261|       |
 2262|  7.10k|    if (!get_verification_time(vpm, &verification_time))
  ------------------
  |  Branch (2262:9): [True: 0, False: 7.10k]
  ------------------
 2263|      0|        return 1;
 2264|       |
 2265|  7.10k|    if (!certificate_time_to_posix(X509_get0_notBefore(x), &notbefore_seconds)) {
  ------------------
  |  Branch (2265:9): [True: 0, False: 7.10k]
  ------------------
 2266|      0|        err = X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD;
  ------------------
  |  |  325|      0|#define X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD 13
  ------------------
 2267|      0|        if (depth < 0 || verify_cb_cert(ctx, x, depth, err) == 0)
  ------------------
  |  Branch (2267:13): [True: 0, False: 0]
  |  Branch (2267:26): [True: 0, False: 0]
  ------------------
 2268|      0|            return 0;
 2269|  7.10k|    } else if (verification_time < notbefore_seconds) {
  ------------------
  |  Branch (2269:16): [True: 0, False: 7.10k]
  ------------------
 2270|      0|        err = X509_V_ERR_CERT_NOT_YET_VALID;
  ------------------
  |  |  321|      0|#define X509_V_ERR_CERT_NOT_YET_VALID 9
  ------------------
 2271|      0|        if (depth < 0 || verify_cb_cert(ctx, x, depth, err) == 0)
  ------------------
  |  Branch (2271:13): [True: 0, False: 0]
  |  Branch (2271:26): [True: 0, False: 0]
  ------------------
 2272|      0|            return 0;
 2273|      0|    }
 2274|       |
 2275|  7.10k|    if (!certificate_time_to_posix(X509_get0_notAfter(x), &notafter_seconds)) {
  ------------------
  |  Branch (2275:9): [True: 0, False: 7.10k]
  ------------------
 2276|      0|        err = X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD;
  ------------------
  |  |  326|      0|#define X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD 14
  ------------------
 2277|      0|        if (depth < 0 || verify_cb_cert(ctx, x, depth, err) == 0)
  ------------------
  |  Branch (2277:13): [True: 0, False: 0]
  |  Branch (2277:26): [True: 0, False: 0]
  ------------------
 2278|      0|            return 0;
 2279|  7.10k|    } else {
 2280|       |        /*
 2281|       |         * RFC 5280 4.1.2.5:
 2282|       |         * To indicate that a certificate has no well-defined expiration date,
 2283|       |         * the notAfter SHOULD be assigned the GeneralizedTime value of
 2284|       |         * 99991231235959Z. This is INT64_C(253402300799) in epoch seconds.
 2285|       |         */
 2286|  7.10k|        if (notafter_seconds == INT64_C(253402300799))
  ------------------
  |  Branch (2286:13): [True: 0, False: 7.10k]
  ------------------
 2287|      0|            return 1;
 2288|  7.10k|        if (verification_time > notafter_seconds) {
  ------------------
  |  Branch (2288:13): [True: 0, False: 7.10k]
  ------------------
 2289|      0|            err = X509_V_ERR_CERT_HAS_EXPIRED;
  ------------------
  |  |  322|      0|#define X509_V_ERR_CERT_HAS_EXPIRED 10
  ------------------
 2290|      0|            if (depth < 0 || verify_cb_cert(ctx, x, depth, err) == 0)
  ------------------
  |  Branch (2290:17): [True: 0, False: 0]
  |  Branch (2290:30): [True: 0, False: 0]
  ------------------
 2291|      0|                return 0;
 2292|      0|        }
 2293|  7.10k|    }
 2294|       |
 2295|  7.10k|    return 1;
 2296|  7.10k|}
X509_get_pubkey_parameters:
 2524|  3.55k|{
 2525|  3.55k|    EVP_PKEY *ktmp = NULL, *ktmp2;
 2526|  3.55k|    int i, j;
 2527|       |
 2528|  3.55k|    if (pkey != NULL && !EVP_PKEY_missing_parameters(pkey))
  ------------------
  |  Branch (2528:9): [True: 0, False: 3.55k]
  |  Branch (2528:25): [True: 0, False: 0]
  ------------------
 2529|      0|        return 1;
 2530|       |
 2531|  3.55k|    for (i = 0; i < sk_X509_num(chain); i++) {
  ------------------
  |  |   82|  3.55k|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
  |  Branch (2531:17): [True: 3.55k, False: 0]
  ------------------
 2532|  3.55k|        ktmp = X509_get0_pubkey(sk_X509_value(chain, i));
  ------------------
  |  |   83|  3.55k|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
 2533|  3.55k|        if (ktmp == NULL) {
  ------------------
  |  Branch (2533:13): [True: 0, False: 3.55k]
  ------------------
 2534|      0|            ERR_raise(ERR_LIB_X509, X509_R_UNABLE_TO_GET_CERTS_PUBLIC_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2535|      0|            return 0;
 2536|      0|        }
 2537|  3.55k|        if (!EVP_PKEY_missing_parameters(ktmp))
  ------------------
  |  Branch (2537:13): [True: 3.55k, False: 0]
  ------------------
 2538|  3.55k|            break;
 2539|      0|        ktmp = NULL;
 2540|      0|    }
 2541|  3.55k|    if (ktmp == NULL) {
  ------------------
  |  Branch (2541:9): [True: 0, False: 3.55k]
  ------------------
 2542|      0|        ERR_raise(ERR_LIB_X509, X509_R_UNABLE_TO_FIND_PARAMETERS_IN_CHAIN);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2543|      0|        return 0;
 2544|      0|    }
 2545|       |
 2546|       |    /* first, populate the other certs */
 2547|  3.55k|    for (j = i - 1; j >= 0; j--) {
  ------------------
  |  Branch (2547:21): [True: 0, False: 3.55k]
  ------------------
 2548|      0|        ktmp2 = X509_get0_pubkey(sk_X509_value(chain, j));
  ------------------
  |  |   83|      0|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
 2549|      0|        if (!EVP_PKEY_copy_parameters(ktmp2, ktmp))
  ------------------
  |  Branch (2549:13): [True: 0, False: 0]
  ------------------
 2550|      0|            return 0;
 2551|      0|    }
 2552|       |
 2553|  3.55k|    if (pkey != NULL)
  ------------------
  |  Branch (2553:9): [True: 0, False: 3.55k]
  ------------------
 2554|      0|        return EVP_PKEY_copy_parameters(pkey, ktmp);
 2555|  3.55k|    return 1;
 2556|  3.55k|}
X509_STORE_CTX_set_ex_data:
 2683|  3.62k|{
 2684|  3.62k|    return CRYPTO_set_ex_data(&ctx->ex_data, idx, data);
 2685|  3.62k|}
X509_STORE_CTX_get_error:
 2693|  3.62k|{
 2694|  3.62k|    return ctx->error;
 2695|  3.62k|}
X509_STORE_CTX_get0_chain:
 2723|  7.25k|{
 2724|  7.25k|    return ctx->chain;
 2725|  7.25k|}
X509_STORE_CTX_get1_chain:
 2728|  3.62k|{
 2729|  3.62k|    if (ctx->chain == NULL)
  ------------------
  |  Branch (2729:9): [True: 0, False: 3.62k]
  ------------------
 2730|      0|        return NULL;
 2731|  3.62k|    return X509_chain_up_ref(ctx->chain);
 2732|  3.62k|}
X509_STORE_CTX_new_ex:
 2855|  7.25k|{
 2856|  7.25k|    X509_STORE_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|  7.25k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2857|       |
 2858|  7.25k|    if (ctx == NULL)
  ------------------
  |  Branch (2858:9): [True: 0, False: 7.25k]
  ------------------
 2859|      0|        return NULL;
 2860|       |
 2861|  7.25k|    ctx->libctx = libctx;
 2862|  7.25k|    if (propq != NULL) {
  ------------------
  |  Branch (2862:9): [True: 0, False: 7.25k]
  ------------------
 2863|      0|        ctx->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2864|      0|        if (ctx->propq == NULL) {
  ------------------
  |  Branch (2864:13): [True: 0, False: 0]
  ------------------
 2865|      0|            OPENSSL_free(ctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2866|      0|            return NULL;
 2867|      0|        }
 2868|      0|    }
 2869|       |
 2870|  7.25k|    return ctx;
 2871|  7.25k|}
X509_STORE_CTX_free:
 2879|  7.25k|{
 2880|  7.25k|    if (ctx == NULL)
  ------------------
  |  Branch (2880:9): [True: 0, False: 7.25k]
  ------------------
 2881|      0|        return;
 2882|       |
 2883|  7.25k|    X509_STORE_CTX_cleanup(ctx);
 2884|       |
 2885|       |    /* libctx and propq survive X509_STORE_CTX_cleanup() */
 2886|  7.25k|    OPENSSL_free(ctx->propq);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2887|  7.25k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2888|  7.25k|}
X509_STORE_CTX_init:
 2900|  7.25k|{
 2901|  7.25k|    if (ctx == NULL) {
  ------------------
  |  Branch (2901:9): [True: 0, False: 7.25k]
  ------------------
 2902|      0|        ERR_raise(ERR_LIB_X509, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2903|      0|        return 0;
 2904|      0|    }
 2905|  7.25k|    X509_STORE_CTX_cleanup(ctx);
 2906|       |
 2907|  7.25k|    ctx->store = store;
 2908|  7.25k|    ctx->cert = (X509 *)x509; /* XXX casts away const */
 2909|  7.25k|    ctx->untrusted = chain;
 2910|  7.25k|    ctx->crls = NULL;
 2911|  7.25k|    ctx->num_untrusted = 0;
 2912|  7.25k|    ctx->other_ctx = NULL;
 2913|  7.25k|    ctx->valid = 0;
 2914|  7.25k|    ctx->chain = NULL;
 2915|  7.25k|    ctx->error = X509_V_OK;
  ------------------
  |  |  312|  7.25k|#define X509_V_OK 0
  ------------------
 2916|  7.25k|    ctx->explicit_policy = 0;
 2917|  7.25k|    ctx->error_depth = 0;
 2918|  7.25k|    ctx->current_cert = NULL;
 2919|  7.25k|    ctx->current_issuer = NULL;
 2920|  7.25k|    ctx->current_crl = NULL;
 2921|  7.25k|    ctx->current_crl_score = 0;
 2922|  7.25k|    ctx->current_reasons = 0;
 2923|  7.25k|    ctx->tree = NULL;
 2924|  7.25k|    ctx->parent = NULL;
 2925|  7.25k|    ctx->dane = NULL;
 2926|  7.25k|    ctx->bare_ta_signed = 0;
 2927|  7.25k|    ctx->rpk = NULL;
 2928|       |    /* Zero ex_data to make sure we're cleanup-safe */
 2929|  7.25k|    memset(&ctx->ex_data, 0, sizeof(ctx->ex_data));
 2930|  7.25k|    ctx->ocsp_resp = NULL;
 2931|       |
 2932|       |    /* store->cleanup is always 0 in OpenSSL, if set must be idempotent */
 2933|  7.25k|    if (store != NULL)
  ------------------
  |  Branch (2933:9): [True: 7.25k, False: 0]
  ------------------
 2934|  7.25k|        ctx->cleanup = store->cleanup;
 2935|      0|    else
 2936|      0|        ctx->cleanup = NULL;
 2937|       |
 2938|  7.25k|    if (store != NULL && store->check_issued != NULL)
  ------------------
  |  Branch (2938:9): [True: 7.25k, False: 0]
  |  Branch (2938:26): [True: 0, False: 7.25k]
  ------------------
 2939|      0|        ctx->check_issued = store->check_issued;
 2940|  7.25k|    else
 2941|  7.25k|        ctx->check_issued = check_issued;
 2942|       |
 2943|  7.25k|    if (store != NULL && store->get_issuer != NULL)
  ------------------
  |  Branch (2943:9): [True: 7.25k, False: 0]
  |  Branch (2943:26): [True: 0, False: 7.25k]
  ------------------
 2944|      0|        ctx->get_issuer = store->get_issuer;
 2945|  7.25k|    else
 2946|  7.25k|        ctx->get_issuer = X509_STORE_CTX_get1_issuer;
 2947|       |
 2948|  7.25k|    if (store != NULL && store->verify_cb != NULL)
  ------------------
  |  Branch (2948:9): [True: 7.25k, False: 0]
  |  Branch (2948:26): [True: 0, False: 7.25k]
  ------------------
 2949|      0|        ctx->verify_cb = store->verify_cb;
 2950|  7.25k|    else
 2951|  7.25k|        ctx->verify_cb = null_callback;
 2952|       |
 2953|  7.25k|    if (store != NULL && store->verify != NULL)
  ------------------
  |  Branch (2953:9): [True: 7.25k, False: 0]
  |  Branch (2953:26): [True: 0, False: 7.25k]
  ------------------
 2954|      0|        ctx->verify = store->verify;
 2955|  7.25k|    else
 2956|  7.25k|        ctx->verify = internal_verify;
 2957|       |
 2958|  7.25k|    if (store != NULL && store->check_revocation != NULL)
  ------------------
  |  Branch (2958:9): [True: 7.25k, False: 0]
  |  Branch (2958:26): [True: 0, False: 7.25k]
  ------------------
 2959|      0|        ctx->check_revocation = store->check_revocation;
 2960|  7.25k|    else
 2961|  7.25k|        ctx->check_revocation = check_revocation;
 2962|       |
 2963|  7.25k|    if (store != NULL && store->get_crl != NULL)
  ------------------
  |  Branch (2963:9): [True: 7.25k, False: 0]
  |  Branch (2963:26): [True: 0, False: 7.25k]
  ------------------
 2964|      0|        ctx->get_crl = store->get_crl;
 2965|  7.25k|    else
 2966|  7.25k|        ctx->get_crl = NULL;
 2967|       |
 2968|  7.25k|    if (store != NULL && store->check_crl != NULL)
  ------------------
  |  Branch (2968:9): [True: 7.25k, False: 0]
  |  Branch (2968:26): [True: 0, False: 7.25k]
  ------------------
 2969|      0|        ctx->check_crl = store->check_crl;
 2970|  7.25k|    else
 2971|  7.25k|        ctx->check_crl = check_crl;
 2972|       |
 2973|  7.25k|    if (store != NULL && store->cert_crl != NULL)
  ------------------
  |  Branch (2973:9): [True: 7.25k, False: 0]
  |  Branch (2973:26): [True: 0, False: 7.25k]
  ------------------
 2974|      0|        ctx->cert_crl = store->cert_crl;
 2975|  7.25k|    else
 2976|  7.25k|        ctx->cert_crl = cert_crl;
 2977|       |
 2978|  7.25k|    if (store != NULL && store->check_policy != NULL)
  ------------------
  |  Branch (2978:9): [True: 7.25k, False: 0]
  |  Branch (2978:26): [True: 0, False: 7.25k]
  ------------------
 2979|      0|        ctx->check_policy = store->check_policy;
 2980|  7.25k|    else
 2981|  7.25k|        ctx->check_policy = check_policy;
 2982|       |
 2983|  7.25k|    if (store != NULL && store->lookup_certs != NULL)
  ------------------
  |  Branch (2983:9): [True: 7.25k, False: 0]
  |  Branch (2983:26): [True: 0, False: 7.25k]
  ------------------
 2984|      0|        ctx->lookup_certs = store->lookup_certs;
 2985|  7.25k|    else
 2986|  7.25k|        ctx->lookup_certs = X509_STORE_CTX_get1_certs;
 2987|       |
 2988|  7.25k|    if (store != NULL && store->lookup_crls != NULL)
  ------------------
  |  Branch (2988:9): [True: 7.25k, False: 0]
  |  Branch (2988:26): [True: 0, False: 7.25k]
  ------------------
 2989|      0|        ctx->lookup_crls = store->lookup_crls;
 2990|  7.25k|    else
 2991|  7.25k|        ctx->lookup_crls = X509_STORE_CTX_get1_crls;
 2992|       |
 2993|  7.25k|    ctx->param = X509_VERIFY_PARAM_new();
 2994|  7.25k|    if (ctx->param == NULL) {
  ------------------
  |  Branch (2994:9): [True: 0, False: 7.25k]
  ------------------
 2995|      0|        ERR_raise(ERR_LIB_X509, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2996|      0|        goto err;
 2997|      0|    }
 2998|       |
 2999|       |    /* Inherit callbacks and flags from X509_STORE if not set use defaults. */
 3000|  7.25k|    if (store == NULL)
  ------------------
  |  Branch (3000:9): [True: 0, False: 7.25k]
  ------------------
 3001|      0|        ctx->param->inh_flags |= X509_VP_FLAG_DEFAULT | X509_VP_FLAG_ONCE;
  ------------------
  |  |  493|      0|#define X509_VP_FLAG_DEFAULT 0x1
  ------------------
                      ctx->param->inh_flags |= X509_VP_FLAG_DEFAULT | X509_VP_FLAG_ONCE;
  ------------------
  |  |  497|      0|#define X509_VP_FLAG_ONCE 0x10
  ------------------
 3002|  7.25k|    else if (X509_VERIFY_PARAM_inherit(ctx->param, store->param) == 0)
  ------------------
  |  Branch (3002:14): [True: 0, False: 7.25k]
  ------------------
 3003|      0|        goto err;
 3004|       |
 3005|  7.25k|    if (!X509_STORE_CTX_set_default(ctx, "default"))
  ------------------
  |  Branch (3005:9): [True: 0, False: 7.25k]
  ------------------
 3006|      0|        goto err;
 3007|       |
 3008|       |    /*
 3009|       |     * XXX: For now, continue to inherit trust from VPM, but infer from the
 3010|       |     * purpose if this still yields the default value.
 3011|       |     */
 3012|  7.25k|    if (ctx->param->trust == X509_TRUST_DEFAULT) {
  ------------------
  |  |  195|  7.25k|#define X509_TRUST_DEFAULT 0 /* Only valid in purpose settings */
  ------------------
  |  Branch (3012:9): [True: 7.25k, False: 0]
  ------------------
 3013|  7.25k|        int idx = X509_PURPOSE_get_by_id(ctx->param->purpose);
 3014|  7.25k|        X509_PURPOSE *xp = X509_PURPOSE_get0(idx);
 3015|       |
 3016|  7.25k|        if (xp != NULL)
  ------------------
  |  Branch (3016:13): [True: 0, False: 7.25k]
  ------------------
 3017|      0|            ctx->param->trust = X509_PURPOSE_get_trust(xp);
 3018|  7.25k|    }
 3019|       |
 3020|  7.25k|    if (CRYPTO_new_ex_data(CRYPTO_EX_INDEX_X509_STORE_CTX, ctx,
  ------------------
  |  |  256|  7.25k|#define CRYPTO_EX_INDEX_X509_STORE_CTX 5
  ------------------
  |  Branch (3020:9): [True: 7.25k, False: 0]
  ------------------
 3021|  7.25k|            &ctx->ex_data))
 3022|  7.25k|        return 1;
 3023|  7.25k|    ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3024|       |
 3025|      0|err:
 3026|       |    /*
 3027|       |     * On error clean up allocated storage, if the store context was not
 3028|       |     * allocated with X509_STORE_CTX_new() this is our last chance to do so.
 3029|       |     */
 3030|      0|    X509_STORE_CTX_cleanup(ctx);
 3031|      0|    return 0;
 3032|      0|}
X509_STORE_CTX_cleanup:
 3046|  14.5k|{
 3047|       |    /*
 3048|       |     * We need to be idempotent because, unfortunately, free() also calls
 3049|       |     * cleanup(), so the natural call sequence new(), init(), cleanup(), free()
 3050|       |     * calls cleanup() for the same object twice!  Thus we must zero the
 3051|       |     * pointers below after they're freed!
 3052|       |     */
 3053|       |    /* Seems to always be NULL in OpenSSL, do this at most once. */
 3054|  14.5k|    if (ctx->cleanup != NULL) {
  ------------------
  |  Branch (3054:9): [True: 0, False: 14.5k]
  ------------------
 3055|      0|        ctx->cleanup(ctx);
 3056|      0|        ctx->cleanup = NULL;
 3057|      0|    }
 3058|  14.5k|    if (ctx->param != NULL) {
  ------------------
  |  Branch (3058:9): [True: 7.25k, False: 7.25k]
  ------------------
 3059|  7.25k|        if (ctx->parent == NULL)
  ------------------
  |  Branch (3059:13): [True: 7.25k, False: 0]
  ------------------
 3060|  7.25k|            X509_VERIFY_PARAM_free(ctx->param);
 3061|  7.25k|        ctx->param = NULL;
 3062|  7.25k|    }
 3063|  14.5k|    X509_policy_tree_free(ctx->tree);
 3064|  14.5k|    ctx->tree = NULL;
 3065|  14.5k|    OSSL_STACK_OF_X509_free(ctx->chain);
 3066|  14.5k|    ctx->chain = NULL;
 3067|  14.5k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_X509_STORE_CTX, ctx, &(ctx->ex_data));
  ------------------
  |  |  256|  14.5k|#define CRYPTO_EX_INDEX_X509_STORE_CTX 5
  ------------------
 3068|  14.5k|    memset(&ctx->ex_data, 0, sizeof(ctx->ex_data));
 3069|  14.5k|}
X509_STORE_CTX_set_flags:
 3077|  3.62k|{
 3078|  3.62k|    X509_VERIFY_PARAM_set_flags(ctx->param, flags);
 3079|  3.62k|}
X509_STORE_CTX_set_default:
 3221|  10.8k|{
 3222|  10.8k|    const X509_VERIFY_PARAM *param;
 3223|       |
 3224|  10.8k|    param = X509_VERIFY_PARAM_lookup(name);
 3225|  10.8k|    if (param == NULL) {
  ------------------
  |  Branch (3225:9): [True: 0, False: 10.8k]
  ------------------
 3226|      0|        ERR_raise_data(ERR_LIB_X509, X509_R_UNKNOWN_PURPOSE_ID, "name=%s", name);
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_X509, X509_R_UNKNOWN_PURPOSE_ID, "name=%s", name);
  ------------------
  |  |   64|      0|#define ERR_LIB_X509 11
  ------------------
                      ERR_raise_data(ERR_LIB_X509, X509_R_UNKNOWN_PURPOSE_ID, "name=%s", name);
  ------------------
  |  |   62|      0|#define X509_R_UNKNOWN_PURPOSE_ID 121
  ------------------
 3227|      0|        return 0;
 3228|      0|    }
 3229|  10.8k|    return X509_VERIFY_PARAM_inherit(ctx->param, param);
 3230|  10.8k|}
X509_STORE_CTX_get0_param:
 3233|  3.62k|{
 3234|  3.62k|    return ctx->param;
 3235|  3.62k|}
x509_vfy.c:check_key_level:
 4071|  7.25k|{
 4072|  7.25k|    int level = ctx->param->auth_level;
 4073|       |
 4074|       |    /*
 4075|       |     * At security level zero, return without checking for a supported public
 4076|       |     * key type.  Some engines support key types not understood outside the
 4077|       |     * engine, and we only need to understand the key when enforcing a security
 4078|       |     * floor.
 4079|       |     */
 4080|  7.25k|    if (level <= 0)
  ------------------
  |  Branch (4080:9): [True: 3.62k, False: 3.62k]
  ------------------
 4081|  3.62k|        return 1;
 4082|       |
 4083|       |    /* Unsupported or malformed keys are not secure */
 4084|  3.62k|    if (pkey == NULL)
  ------------------
  |  Branch (4084:9): [True: 0, False: 3.62k]
  ------------------
 4085|      0|        return 0;
 4086|       |
 4087|  3.62k|    if (level > NUM_AUTH_LEVELS)
  ------------------
  |  Branch (4087:9): [True: 0, False: 3.62k]
  ------------------
 4088|      0|        level = NUM_AUTH_LEVELS;
 4089|       |
 4090|  3.62k|    return EVP_PKEY_get_security_bits(pkey) >= minbits_table[level - 1];
 4091|  3.62k|}
x509_vfy.c:x509_verify_x509:
  349|  7.25k|{
  350|  7.25k|    int ret;
  351|       |
  352|  7.25k|    if (ctx->cert == NULL) {
  ------------------
  |  Branch (352:9): [True: 0, False: 7.25k]
  ------------------
  353|      0|        ERR_raise(ERR_LIB_X509, X509_R_NO_CERT_SET_FOR_US_TO_VERIFY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  354|      0|        ctx->error = X509_V_ERR_INVALID_CALL;
  ------------------
  |  |  390|      0|#define X509_V_ERR_INVALID_CALL 69
  ------------------
  355|      0|        return -1;
  356|      0|    }
  357|       |
  358|  7.25k|    if (ctx->chain != NULL) {
  ------------------
  |  Branch (358:9): [True: 0, False: 7.25k]
  ------------------
  359|       |        /*
  360|       |         * This X509_STORE_CTX has already been used to verify a cert. We
  361|       |         * cannot do another one.
  362|       |         */
  363|      0|        ERR_raise(ERR_LIB_X509, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  364|      0|        ctx->error = X509_V_ERR_INVALID_CALL;
  ------------------
  |  |  390|      0|#define X509_V_ERR_INVALID_CALL 69
  ------------------
  365|      0|        return -1;
  366|      0|    }
  367|       |
  368|  7.25k|    if (!ossl_x509_add_cert_new(&ctx->chain, ctx->cert, X509_ADD_FLAG_UP_REF)) {
  ------------------
  |  | 1000|  7.25k|#define X509_ADD_FLAG_UP_REF 0x1
  ------------------
  |  Branch (368:9): [True: 0, False: 7.25k]
  ------------------
  369|      0|        ctx->error = X509_V_ERR_OUT_OF_MEM;
  ------------------
  |  |  329|      0|#define X509_V_ERR_OUT_OF_MEM 17
  ------------------
  370|      0|        return -1;
  371|      0|    }
  372|  7.25k|    ctx->num_untrusted = 1;
  373|       |
  374|       |    /* If the peer's public key is too weak, we can stop early. */
  375|  7.25k|    CB_FAIL_IF(!check_cert_key_level(ctx, ctx->cert),
  ------------------
  |  |  177|  7.25k|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:9): [True: 0, False: 7.25k]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|  7.25k|    return 0
  ------------------
  376|  7.25k|        ctx, ctx->cert, 0, X509_V_ERR_EE_KEY_TOO_SMALL);
  377|       |
  378|  7.25k|    ret = DANETLS_ENABLED(ctx->dane) ? dane_verify(ctx) : verify_chain(ctx);
  ------------------
  |  |   80|  7.25k|    ((dane) != NULL && sk_danetls_record_num((dane)->trecs) > 0)
  |  |  ------------------
  |  |  |  Branch (80:6): [True: 0, False: 7.25k]
  |  |  |  Branch (80:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  379|       |
  380|       |    /*
  381|       |     * Safety-net.  If we are returning an error, we must also set ctx->error,
  382|       |     * so that the chain is not considered verified should the error be ignored
  383|       |     * (e.g. TLS with SSL_VERIFY_NONE).
  384|       |     */
  385|  7.25k|    if (ret <= 0 && ctx->error == X509_V_OK)
  ------------------
  |  |  312|  3.70k|#define X509_V_OK 0
  ------------------
  |  Branch (385:9): [True: 3.70k, False: 3.55k]
  |  Branch (385:21): [True: 0, False: 3.70k]
  ------------------
  386|      0|        ctx->error = X509_V_ERR_UNSPECIFIED;
  ------------------
  |  |  313|      0|#define X509_V_ERR_UNSPECIFIED 1
  ------------------
  387|  7.25k|    return ret;
  388|  7.25k|}
x509_vfy.c:check_cert_key_level:
 4098|  7.25k|{
 4099|  7.25k|    return check_key_level(ctx, X509_get0_pubkey(cert));
 4100|  7.25k|}
x509_vfy.c:check_id:
  981|  3.55k|{
  982|  3.55k|    X509_VERIFY_PARAM *vpm = ctx->param;
  983|  3.55k|    X509 *x = ctx->cert;
  984|       |
  985|  3.55k|    if (vpm->hosts != NULL && check_hosts(x, vpm) <= 0) {
  ------------------
  |  Branch (985:9): [True: 0, False: 3.55k]
  |  Branch (985:31): [True: 0, False: 0]
  ------------------
  986|      0|        if (!check_id_error(ctx, X509_V_ERR_HOSTNAME_MISMATCH))
  ------------------
  |  |  380|      0|#define X509_V_ERR_HOSTNAME_MISMATCH 62
  ------------------
  |  Branch (986:13): [True: 0, False: 0]
  ------------------
  987|      0|            return 0;
  988|      0|    }
  989|       |
  990|  3.55k|    if (!check_email(x, vpm)) {
  ------------------
  |  Branch (990:9): [True: 0, False: 3.55k]
  ------------------
  991|      0|        if (!check_id_error(ctx, X509_V_ERR_EMAIL_MISMATCH))
  ------------------
  |  |  381|      0|#define X509_V_ERR_EMAIL_MISMATCH 63
  ------------------
  |  Branch (991:13): [True: 0, False: 0]
  ------------------
  992|      0|            return 0;
  993|      0|    }
  994|       |
  995|  3.55k|    if (vpm->ips != NULL && check_ips(x, vpm) <= 0) {
  ------------------
  |  Branch (995:9): [True: 0, False: 3.55k]
  |  Branch (995:29): [True: 0, False: 0]
  ------------------
  996|      0|        if (!check_id_error(ctx, X509_V_ERR_IP_ADDRESS_MISMATCH))
  ------------------
  |  |  382|      0|#define X509_V_ERR_IP_ADDRESS_MISMATCH 64
  ------------------
  |  Branch (996:13): [True: 0, False: 0]
  ------------------
  997|      0|            return 0;
  998|      0|    }
  999|  3.55k|    return 1;
 1000|  3.55k|}
x509_vfy.c:check_email:
  946|  3.55k|{
  947|  3.55k|    const uint8_t *name;
  948|  3.55k|    int nasc = sk_X509_BUFFER_num(vpm->rfc822s);
  949|  3.55k|    int nutf = sk_X509_BUFFER_num(vpm->smtputf8s);
  950|       |
  951|  3.55k|    for (int i = 0; i < nasc; ++i) {
  ------------------
  |  Branch (951:21): [True: 0, False: 3.55k]
  ------------------
  952|      0|        size_t len = sk_X509_BUFFER_value(vpm->rfc822s, i)->len;
  953|      0|        name = sk_X509_BUFFER_value(vpm->rfc822s, i)->data;
  954|      0|        if (ossl_x509_check_rfc822(x, (const char *)name, len, vpm->hostflags))
  ------------------
  |  Branch (954:13): [True: 0, False: 0]
  ------------------
  955|      0|            return 1;
  956|      0|    }
  957|  3.55k|    for (int i = 0; i < nutf; ++i) {
  ------------------
  |  Branch (957:21): [True: 0, False: 3.55k]
  ------------------
  958|      0|        size_t len = sk_X509_BUFFER_value(vpm->smtputf8s, i)->len;
  959|      0|        name = sk_X509_BUFFER_value(vpm->smtputf8s, i)->data;
  960|      0|        if (ossl_x509_check_smtputf8(x, (const char *)name, len, vpm->hostflags))
  ------------------
  |  Branch (960:13): [True: 0, False: 0]
  ------------------
  961|      0|            return 1;
  962|      0|    }
  963|  3.55k|    return nasc <= 0 && nutf <= 0;
  ------------------
  |  Branch (963:12): [True: 3.55k, False: 0]
  |  Branch (963:25): [True: 3.55k, False: 0]
  ------------------
  964|  3.55k|}
x509_vfy.c:verify_chain:
  256|  7.25k|{
  257|  7.25k|    int err;
  258|  7.25k|    int ok;
  259|       |
  260|  7.25k|    if ((ok = build_chain(ctx)) <= 0
  ------------------
  |  Branch (260:9): [True: 3.70k, False: 3.55k]
  ------------------
  261|  3.55k|        || (ok = check_extensions(ctx)) <= 0
  ------------------
  |  Branch (261:12): [True: 0, False: 3.55k]
  ------------------
  262|  3.55k|        || (ok = check_auth_level(ctx)) <= 0
  ------------------
  |  Branch (262:12): [True: 0, False: 3.55k]
  ------------------
  263|  3.55k|        || (ok = check_id(ctx)) <= 0
  ------------------
  |  Branch (263:12): [True: 0, False: 3.55k]
  ------------------
  264|  3.55k|        || (ok = X509_get_pubkey_parameters(NULL, ctx->chain) ? 1 : -1) <= 0
  ------------------
  |  Branch (264:12): [True: 0, False: 3.55k]
  |  Branch (264:18): [True: 3.55k, False: 0]
  ------------------
  265|  3.55k|        || (ok = ctx->check_revocation(ctx)) <= 0)
  ------------------
  |  Branch (265:12): [True: 0, False: 3.55k]
  ------------------
  266|  3.70k|        return ok;
  267|       |
  268|  3.55k|    err = X509_chain_check_suiteb(&ctx->error_depth, NULL, ctx->chain,
  269|  3.55k|        ctx->param->flags);
  270|  3.55k|    CB_FAIL_IF(err != X509_V_OK, ctx, NULL, ctx->error_depth, err);
  ------------------
  |  |  177|  3.55k|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:9): [True: 0, False: 3.55k]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|  3.55k|    return 0
  ------------------
  271|       |
  272|       |    /* Verify chain signatures and expiration times */
  273|  3.55k|    ok = ctx->verify != NULL ? ctx->verify(ctx) : internal_verify(ctx);
  ------------------
  |  Branch (273:10): [True: 3.55k, False: 0]
  ------------------
  274|  3.55k|    if (ok <= 0)
  ------------------
  |  Branch (274:9): [True: 0, False: 3.55k]
  ------------------
  275|      0|        return ok;
  276|       |
  277|  3.55k|    if ((ok = check_name_constraints(ctx)) <= 0)
  ------------------
  |  Branch (277:9): [True: 0, False: 3.55k]
  ------------------
  278|      0|        return ok;
  279|       |
  280|  3.55k|#ifndef OPENSSL_NO_RFC3779
  281|       |    /* RFC 3779 path validation, now that CRL check has been done */
  282|  3.55k|    if ((ok = X509v3_asid_validate_path(ctx)) <= 0)
  ------------------
  |  Branch (282:9): [True: 0, False: 3.55k]
  ------------------
  283|      0|        return ok;
  284|  3.55k|    if ((ok = X509v3_addr_validate_path(ctx)) <= 0)
  ------------------
  |  Branch (284:9): [True: 0, False: 3.55k]
  ------------------
  285|      0|        return ok;
  286|  3.55k|#endif
  287|       |
  288|       |    /* If we get this far evaluate policies */
  289|  3.55k|    if ((ctx->param->flags & X509_V_FLAG_POLICY_CHECK) != 0)
  ------------------
  |  |  454|  3.55k|#define X509_V_FLAG_POLICY_CHECK 0x80
  ------------------
  |  Branch (289:9): [True: 0, False: 3.55k]
  ------------------
  290|      0|        ok = ctx->check_policy(ctx);
  291|  3.55k|    return ok;
  292|  3.55k|}
x509_vfy.c:check_extensions:
  600|  3.55k|{
  601|  3.55k|    int i, must_be_ca, plen = 0;
  602|  3.55k|    X509 *x;
  603|  3.55k|    int ret, proxy_path_length = 0;
  604|  3.55k|    int purpose, allow_proxy_certs, num = sk_X509_num(ctx->chain);
  ------------------
  |  |   82|  3.55k|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
  605|       |
  606|       |    /*-
  607|       |     *  must_be_ca can have 1 of 3 values:
  608|       |     * -1: we accept both CA and non-CA certificates, to allow direct
  609|       |     *     use of self-signed certificates (which are marked as CA).
  610|       |     * 0:  we only accept non-CA certificates.  This is currently not
  611|       |     *     used, but the possibility is present for future extensions.
  612|       |     * 1:  we only accept CA certificates.  This is currently used for
  613|       |     *     all certificates in the chain except the leaf certificate.
  614|       |     */
  615|  3.55k|    must_be_ca = -1;
  616|       |
  617|       |    /* CRL path validation */
  618|  3.55k|    if (ctx->parent != NULL) {
  ------------------
  |  Branch (618:9): [True: 0, False: 3.55k]
  ------------------
  619|      0|        allow_proxy_certs = 0;
  620|      0|        purpose = X509_PURPOSE_CRL_SIGN;
  ------------------
  |  |  777|      0|#define X509_PURPOSE_CRL_SIGN 6
  ------------------
  621|  3.55k|    } else {
  622|  3.55k|        allow_proxy_certs = (ctx->param->flags & X509_V_FLAG_ALLOW_PROXY_CERTS) != 0;
  ------------------
  |  |  452|  3.55k|#define X509_V_FLAG_ALLOW_PROXY_CERTS 0x40
  ------------------
  623|  3.55k|        purpose = ctx->param->purpose;
  624|  3.55k|    }
  625|       |
  626|  7.10k|    for (i = 0; i < num; i++) {
  ------------------
  |  Branch (626:17): [True: 3.55k, False: 3.55k]
  ------------------
  627|  3.55k|        x = sk_X509_value(ctx->chain, i);
  ------------------
  |  |   83|  3.55k|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
  628|  3.55k|        CB_FAIL_IF((ctx->param->flags & X509_V_FLAG_IGNORE_CRITICAL) == 0
  ------------------
  |  |  177|  7.10k|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:10): [True: 3.55k, False: 0]
  |  |  |  Branch (177:10): [True: 0, False: 3.55k]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|  3.55k|    return 0
  ------------------
  629|  3.55k|                && (x->ex_flags & EXFLAG_CRITICAL) != 0,
  630|  3.55k|            ctx, x, i, X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION);
  631|  3.55k|        CB_FAIL_IF(!allow_proxy_certs && (x->ex_flags & EXFLAG_PROXY) != 0,
  ------------------
  |  |  177|  7.10k|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:10): [True: 3.55k, False: 0]
  |  |  |  Branch (177:10): [True: 0, False: 3.55k]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|  3.55k|    return 0
  ------------------
  632|  3.55k|            ctx, x, i, X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED);
  633|  3.55k|        ret = X509_check_ca(x);
  634|  3.55k|        switch (must_be_ca) {
  635|  3.55k|        case -1:
  ------------------
  |  Branch (635:9): [True: 3.55k, False: 0]
  ------------------
  636|  3.55k|            CB_FAIL_IF((ctx->param->flags & X509_V_FLAG_X509_STRICT) != 0
  ------------------
  |  |  177|  7.10k|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:10): [True: 0, False: 3.55k]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|  3.55k|    return 0
  ------------------
  637|  3.55k|                    && ret != 1 && ret != 0,
  638|  3.55k|                ctx, x, i, X509_V_ERR_INVALID_CA);
  639|  3.55k|            break;
  640|  3.55k|        case 0:
  ------------------
  |  Branch (640:9): [True: 0, False: 3.55k]
  ------------------
  641|      0|            CB_FAIL_IF(ret != 0, ctx, x, i, X509_V_ERR_INVALID_NON_CA);
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:9): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
  642|      0|            break;
  643|      0|        default:
  ------------------
  |  Branch (643:9): [True: 0, False: 3.55k]
  ------------------
  644|       |            /* X509_V_FLAG_X509_STRICT is implicit for intermediate CAs */
  645|      0|            CB_FAIL_IF(ret == 0
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
  646|      0|                    || ((i + 1 < num
  647|      0|                            || (ctx->param->flags & X509_V_FLAG_X509_STRICT) != 0)
  648|      0|                        && ret != 1),
  649|      0|                ctx, x, i, X509_V_ERR_INVALID_CA);
  650|      0|            break;
  651|  3.55k|        }
  652|  3.55k|        if (num > 1) {
  ------------------
  |  Branch (652:13): [True: 0, False: 3.55k]
  ------------------
  653|       |            /* Check for presence of explicit elliptic curve parameters */
  654|      0|            ret = check_curve(x);
  655|      0|            CB_FAIL_IF(ret < 0, ctx, x, i, X509_V_ERR_UNSPECIFIED);
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:9): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
  656|      0|            CB_FAIL_IF(ret == 0, ctx, x, i, X509_V_ERR_EC_KEY_EXPLICIT_PARAMS);
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:9): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
  657|      0|        }
  658|       |        /*
  659|       |         * Do the following set of checks only if strict checking is requested
  660|       |         * and not for self-issued (including self-signed) EE (non-CA) certs
  661|       |         * because RFC 5280 does not apply to them according RFC 6818 section 2.
  662|       |         */
  663|  3.55k|        if ((ctx->param->flags & X509_V_FLAG_X509_STRICT) != 0
  ------------------
  |  |  450|  3.55k|#define X509_V_FLAG_X509_STRICT 0x20
  ------------------
  |  Branch (663:13): [True: 0, False: 3.55k]
  ------------------
  664|      0|            && num > 1) { /*
  ------------------
  |  Branch (664:16): [True: 0, False: 0]
  ------------------
  665|       |                           * this should imply
  666|       |                           * !(i == 0 && (x->ex_flags & EXFLAG_CA) == 0
  667|       |                           *          && (x->ex_flags & EXFLAG_SI) != 0)
  668|       |                           */
  669|       |            /* Check Basic Constraints according to RFC 5280 section 4.2.1.9 */
  670|      0|            if (x->ex_pathlen != -1) {
  ------------------
  |  Branch (670:17): [True: 0, False: 0]
  ------------------
  671|      0|                CB_FAIL_IF((x->ex_flags & EXFLAG_CA) == 0,
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:9): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
  672|      0|                    ctx, x, i, X509_V_ERR_PATHLEN_INVALID_FOR_NON_CA);
  673|      0|                CB_FAIL_IF((x->ex_kusage & KU_KEY_CERT_SIGN) == 0, ctx,
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:9): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
  674|      0|                    x, i, X509_V_ERR_PATHLEN_WITHOUT_KU_KEY_CERT_SIGN);
  675|      0|            }
  676|       |            /* Check Key Usage according to RFC 5280 section 4.2.1.3 */
  677|      0|            if ((x->ex_flags & EXFLAG_CA) != 0) {
  ------------------
  |  |  673|      0|#define EXFLAG_CA 0x10
  ------------------
  |  Branch (677:17): [True: 0, False: 0]
  ------------------
  678|      0|                CB_FAIL_IF((x->ex_flags & EXFLAG_KUSAGE) == 0,
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:9): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
  679|      0|                    ctx, x, i, X509_V_ERR_CA_CERT_MISSING_KEY_USAGE);
  680|      0|            } else {
  681|      0|                CB_FAIL_IF((x->ex_kusage & KU_KEY_CERT_SIGN) != 0, ctx, x, i,
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:9): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
  682|      0|                    X509_V_ERR_KU_KEY_CERT_SIGN_INVALID_FOR_NON_CA);
  683|      0|            }
  684|       |            /* Check issuer is non-empty acc. to RFC 5280 section 4.1.2.4 */
  685|      0|            CB_FAIL_IF(X509_NAME_entry_count(X509_get_issuer_name(x)) == 0,
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:9): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
  686|      0|                ctx, x, i, X509_V_ERR_ISSUER_NAME_EMPTY);
  687|       |            /* Check subject is non-empty acc. to RFC 5280 section 4.1.2.6 */
  688|      0|            CB_FAIL_IF(((x->ex_flags & EXFLAG_CA) != 0
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
  689|      0|                           || (x->ex_kusage & KU_CRL_SIGN) != 0
  690|      0|                           || x->altname == NULL)
  691|      0|                    && X509_NAME_entry_count(X509_get_subject_name(x)) == 0,
  692|      0|                ctx, x, i, X509_V_ERR_SUBJECT_NAME_EMPTY);
  693|       |            /* Check SAN is non-empty according to RFC 5280 section 4.2.1.6 */
  694|      0|            CB_FAIL_IF(x->altname != NULL
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
  695|      0|                    && sk_GENERAL_NAME_num(x->altname) <= 0,
  696|      0|                ctx, x, i, X509_V_ERR_EMPTY_SUBJECT_ALT_NAME);
  697|       |            /* Check sig alg consistency acc. to RFC 5280 section 4.1.1.2 */
  698|      0|            CB_FAIL_IF(X509_ALGOR_cmp(&x->sig_alg, &x->cert_info.signature) != 0,
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:9): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
  699|      0|                ctx, x, i, X509_V_ERR_SIGNATURE_ALGORITHM_INCONSISTENCY);
  700|      0|            if (X509_get_version(x) >= X509_VERSION_3) {
  ------------------
  |  |  852|      0|#define X509_VERSION_3 2
  ------------------
  |  Branch (700:17): [True: 0, False: 0]
  ------------------
  701|       |                /* Check AKID presence acc. to RFC 5280 section 4.2.1.1 */
  702|       |                /*
  703|       |                 * This means not last cert in chain, taken as generated by
  704|       |                 * conforming CAs and not self-signed.
  705|       |                 */
  706|      0|                unsigned int check_akid = (i + 1 < num)
  ------------------
  |  Branch (706:43): [True: 0, False: 0]
  ------------------
  707|      0|                    && ((x->ex_flags & EXFLAG_SS) == 0);
  ------------------
  |  |  684|      0|#define EXFLAG_SS 0x2000 /* cert is apparently self-signed */
  ------------------
  |  Branch (707:24): [True: 0, False: 0]
  ------------------
  708|      0|                CB_FAIL_IF(check_akid != 0 && x->akid == NULL,
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
  709|      0|                    ctx, x, i, X509_V_ERR_MISSING_AUTHORITY_KEY_IDENTIFIER);
  710|      0|                CB_FAIL_IF(check_akid != 0 && x->akid != NULL
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
  711|      0|                        && x->akid->keyid == NULL && x->akid->issuer == NULL
  712|      0|                        && x->akid->serial == NULL,
  713|      0|                    ctx, x, i, X509_V_ERR_EMPTY_AUTHORITY_KEY_IDENTIFIER);
  714|       |                /*
  715|       |                 * The authorityCertIssuer and authorityCertSerialNumber fields
  716|       |                 * are paired and MUST either both be present or both be absent.
  717|       |                 *
  718|       |                 * Issuer without serial is ambiguous, and serial without issuer
  719|       |                 * is meaningless, leading to unresolvable and misleading issuer
  720|       |                 * identification.
  721|       |                 */
  722|      0|                CB_FAIL_IF(x->akid != NULL
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
  723|      0|                        && (x->akid->issuer == NULL) != (x->akid->serial == NULL),
  724|      0|                    ctx, x, i, X509_V_ERR_AKID_ISSUER_SERIAL_NOT_PAIRED);
  725|       |                /* Check SKID presence acc. to RFC 5280 section 4.2.1.2 */
  726|      0|                CB_FAIL_IF((x->ex_flags & EXFLAG_CA) != 0 && x->skid == NULL,
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
  727|      0|                    ctx, x, i, X509_V_ERR_MISSING_SUBJECT_KEY_IDENTIFIER);
  728|      0|            } else {
  729|      0|                CB_FAIL_IF(sk_X509_EXTENSION_num(X509_get0_extensions(x)) > 0,
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:9): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
  730|      0|                    ctx, x, i, X509_V_ERR_EXTENSIONS_REQUIRE_VERSION_3);
  731|      0|            }
  732|      0|        }
  733|       |
  734|       |        /* check_purpose() makes the callback as needed */
  735|  3.55k|        if (purpose >= X509_PURPOSE_MIN && !check_purpose(ctx, x, purpose, i, must_be_ca))
  ------------------
  |  |  783|  7.10k|#define X509_PURPOSE_MIN 1
  ------------------
  |  Branch (735:13): [True: 3.55k, False: 0]
  |  Branch (735:44): [True: 0, False: 3.55k]
  ------------------
  736|      0|            return 0;
  737|       |        /* Check path length */
  738|  3.55k|        CB_FAIL_IF(i > 1 && x->ex_pathlen != -1
  ------------------
  |  |  177|  7.10k|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:10): [True: 0, False: 3.55k]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|  3.55k|    return 0
  ------------------
  739|  3.55k|                && plen > x->ex_pathlen + proxy_path_length,
  740|  3.55k|            ctx, x, i, X509_V_ERR_PATH_LENGTH_EXCEEDED);
  741|       |        /* Increment path length if not a self-issued intermediate CA */
  742|  3.55k|        if (i > 0 && (x->ex_flags & EXFLAG_SI) == 0)
  ------------------
  |  |  674|      0|#define EXFLAG_SI 0x20 /* self-issued, maybe not self-signed */
  ------------------
  |  Branch (742:13): [True: 0, False: 3.55k]
  |  Branch (742:22): [True: 0, False: 0]
  ------------------
  743|      0|            plen++;
  744|       |        /*
  745|       |         * If this certificate is a proxy certificate, the next certificate
  746|       |         * must be another proxy certificate or a EE certificate.  If not,
  747|       |         * the next certificate must be a CA certificate.
  748|       |         */
  749|  3.55k|        if (x->ex_flags & EXFLAG_PROXY) {
  ------------------
  |  |  680|  3.55k|#define EXFLAG_PROXY 0x400
  ------------------
  |  Branch (749:13): [True: 0, False: 3.55k]
  ------------------
  750|       |            /*
  751|       |             * RFC3820, 4.1.3 (b)(1) stipulates that if pCPathLengthConstraint
  752|       |             * is less than max_path_length, the former should be copied to
  753|       |             * the latter, and 4.1.4 (a) stipulates that max_path_length
  754|       |             * should be verified to be larger than zero and decrement it.
  755|       |             *
  756|       |             * Because we're checking the certs in the reverse order, we start
  757|       |             * with verifying that proxy_path_length isn't larger than pcPLC,
  758|       |             * and copy the latter to the former if it is, and finally,
  759|       |             * increment proxy_path_length.
  760|       |             */
  761|      0|            if (x->ex_pcpathlen != -1) {
  ------------------
  |  Branch (761:17): [True: 0, False: 0]
  ------------------
  762|      0|                CB_FAIL_IF(proxy_path_length > x->ex_pcpathlen,
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:9): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
  763|      0|                    ctx, x, i, X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED);
  764|      0|                proxy_path_length = x->ex_pcpathlen;
  765|      0|            }
  766|      0|            proxy_path_length++;
  767|      0|            must_be_ca = 0;
  768|  3.55k|        } else {
  769|  3.55k|            must_be_ca = 1;
  770|  3.55k|        }
  771|  3.55k|    }
  772|  3.55k|    return 1;
  773|  3.55k|}
x509_vfy.c:check_purpose:
  550|  3.55k|{
  551|  3.55k|    int tr_ok = X509_TRUST_UNTRUSTED;
  ------------------
  |  |  221|  3.55k|#define X509_TRUST_UNTRUSTED 3
  ------------------
  552|       |
  553|       |    /*
  554|       |     * For trusted certificates we want to see whether any auxiliary trust
  555|       |     * settings trump the purpose constraints.
  556|       |     *
  557|       |     * This is complicated by the fact that the trust ordinals in
  558|       |     * ctx->param->trust are entirely independent of the purpose ordinals in
  559|       |     * ctx->param->purpose!
  560|       |     *
  561|       |     * What connects them is their mutual initialization via calls from
  562|       |     * X509_STORE_CTX_set_default() into X509_VERIFY_PARAM_lookup() which sets
  563|       |     * related values of both param->trust and param->purpose.  It is however
  564|       |     * typically possible to infer associated trust values from a purpose value
  565|       |     * via the X509_PURPOSE API.
  566|       |     *
  567|       |     * Therefore, we can only check for trust overrides when the purpose we're
  568|       |     * checking is the same as ctx->param->purpose and ctx->param->trust is
  569|       |     * also set.
  570|       |     */
  571|  3.55k|    if (depth >= ctx->num_untrusted && purpose == ctx->param->purpose)
  ------------------
  |  Branch (571:9): [True: 3.55k, False: 0]
  |  Branch (571:40): [True: 3.55k, False: 0]
  ------------------
  572|  3.55k|        tr_ok = X509_check_trust(x, ctx->param->trust, X509_TRUST_NO_SS_COMPAT);
  ------------------
  |  |  212|  3.55k|#define X509_TRUST_NO_SS_COMPAT (1U << 2)
  ------------------
  573|       |
  574|  3.55k|    switch (tr_ok) {
  575|      0|    case X509_TRUST_TRUSTED:
  ------------------
  |  |  219|      0|#define X509_TRUST_TRUSTED 1
  ------------------
  |  Branch (575:5): [True: 0, False: 3.55k]
  ------------------
  576|      0|        return 1;
  577|      0|    case X509_TRUST_REJECTED:
  ------------------
  |  |  220|      0|#define X509_TRUST_REJECTED 2
  ------------------
  |  Branch (577:5): [True: 0, False: 3.55k]
  ------------------
  578|      0|        break;
  579|  3.55k|    default: /* can only be X509_TRUST_UNTRUSTED */
  ------------------
  |  Branch (579:5): [True: 3.55k, False: 0]
  ------------------
  580|  3.55k|        switch (X509_check_purpose(x, purpose, must_be_ca > 0)) {
  581|  3.55k|        case 1:
  ------------------
  |  Branch (581:9): [True: 3.55k, False: 0]
  ------------------
  582|  3.55k|            return 1;
  583|      0|        case 0:
  ------------------
  |  Branch (583:9): [True: 0, False: 3.55k]
  ------------------
  584|      0|            break;
  585|      0|        default:
  ------------------
  |  Branch (585:9): [True: 0, False: 3.55k]
  ------------------
  586|      0|            if ((ctx->param->flags & X509_V_FLAG_X509_STRICT) == 0)
  ------------------
  |  |  450|      0|#define X509_V_FLAG_X509_STRICT 0x20
  ------------------
  |  Branch (586:17): [True: 0, False: 0]
  ------------------
  587|      0|                return 1;
  588|  3.55k|        }
  589|      0|        break;
  590|  3.55k|    }
  591|       |
  592|      0|    return verify_cb_cert(ctx, x, depth, X509_V_ERR_INVALID_PURPOSE);
  ------------------
  |  |  338|      0|#define X509_V_ERR_INVALID_PURPOSE 26
  ------------------
  593|  3.55k|}
x509_vfy.c:check_auth_level:
  212|  3.55k|{
  213|  3.55k|    int i;
  214|  3.55k|    int num = sk_X509_num(ctx->chain);
  ------------------
  |  |   82|  3.55k|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
  215|       |
  216|  3.55k|    if (ctx->param->auth_level <= 0)
  ------------------
  |  Branch (216:9): [True: 0, False: 3.55k]
  ------------------
  217|      0|        return 1;
  218|       |
  219|  7.10k|    for (i = 0; i < num; ++i) {
  ------------------
  |  Branch (219:17): [True: 3.55k, False: 3.55k]
  ------------------
  220|  3.55k|        X509 *cert = sk_X509_value(ctx->chain, i);
  ------------------
  |  |   83|  3.55k|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
  221|       |
  222|       |        /*
  223|       |         * We've already checked the security of the leaf key, so here we only
  224|       |         * check the security of issuer keys.
  225|       |         */
  226|  3.55k|        CB_FAIL_IF(i > 0 && !check_cert_key_level(ctx, cert),
  ------------------
  |  |  177|  3.55k|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:10): [True: 0, False: 3.55k]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|  3.55k|    return 0
  ------------------
  227|  3.55k|            ctx, cert, i, X509_V_ERR_CA_KEY_TOO_SMALL);
  228|       |        /*
  229|       |         * We also check the signature algorithm security of all certificates
  230|       |         * except those of the trust anchor at index num-1.
  231|       |         */
  232|  3.55k|        CB_FAIL_IF(i < num - 1 && !check_sig_level(ctx, cert),
  ------------------
  |  |  177|  3.55k|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:10): [True: 0, False: 3.55k]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|  3.55k|    return 0
  ------------------
  233|  3.55k|            ctx, cert, i, X509_V_ERR_CA_MD_TOO_WEAK);
  234|  3.55k|    }
  235|  3.55k|    return 1;
  236|  3.55k|}
x509_vfy.c:check_name_constraints:
  801|  3.55k|{
  802|  3.55k|    int i;
  803|       |
  804|       |    /* Check name constraints for all certificates */
  805|  7.10k|    for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--) {
  ------------------
  |  |   82|  3.55k|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
  |  Branch (805:43): [True: 3.55k, False: 3.55k]
  ------------------
  806|  3.55k|        const X509 *x = sk_X509_value(ctx->chain, i);
  ------------------
  |  |   83|  3.55k|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
  807|  3.55k|        int j;
  808|       |
  809|       |        /* Ignore self-issued certs unless last in chain */
  810|  3.55k|        if (i != 0 && (x->ex_flags & EXFLAG_SI) != 0)
  ------------------
  |  |  674|      0|#define EXFLAG_SI 0x20 /* self-issued, maybe not self-signed */
  ------------------
  |  Branch (810:13): [True: 0, False: 3.55k]
  |  Branch (810:23): [True: 0, False: 0]
  ------------------
  811|      0|            continue;
  812|       |
  813|       |        /*
  814|       |         * Proxy certificates policy has an extra constraint, where the
  815|       |         * certificate subject MUST be the issuer with a single CN entry
  816|       |         * added.
  817|       |         * (RFC 3820: 3.4, 4.1.3 (a)(4))
  818|       |         */
  819|  3.55k|        if ((x->ex_flags & EXFLAG_PROXY) != 0) {
  ------------------
  |  |  680|  3.55k|#define EXFLAG_PROXY 0x400
  ------------------
  |  Branch (819:13): [True: 0, False: 3.55k]
  ------------------
  820|      0|            const X509_NAME *tmpsubject = X509_get_subject_name(x);
  821|      0|            const X509_NAME *tmpissuer = X509_get_issuer_name(x);
  822|      0|            X509_NAME *tmpsubject2;
  823|      0|            X509_NAME_ENTRY *tmpentry = NULL;
  824|      0|            int last_nid = 0;
  825|      0|            int err = X509_V_OK;
  ------------------
  |  |  312|      0|#define X509_V_OK 0
  ------------------
  826|      0|            int last_loc = X509_NAME_entry_count(tmpsubject) - 1;
  827|       |
  828|       |            /* Check that there are at least two RDNs */
  829|      0|            if (last_loc < 1) {
  ------------------
  |  Branch (829:17): [True: 0, False: 0]
  ------------------
  830|      0|                err = X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION;
  ------------------
  |  |  396|      0|#define X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION 72
  ------------------
  831|      0|                goto proxy_name_done;
  832|      0|            }
  833|       |
  834|       |            /*
  835|       |             * Check that there is exactly one more RDN in subject as
  836|       |             * there is in issuer.
  837|       |             */
  838|      0|            if (X509_NAME_entry_count(tmpsubject)
  ------------------
  |  Branch (838:17): [True: 0, False: 0]
  ------------------
  839|      0|                != X509_NAME_entry_count(tmpissuer) + 1) {
  840|      0|                err = X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION;
  ------------------
  |  |  396|      0|#define X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION 72
  ------------------
  841|      0|                goto proxy_name_done;
  842|      0|            }
  843|       |
  844|       |            /*
  845|       |             * Check that the last subject component isn't part of a
  846|       |             * multi-valued RDN
  847|       |             */
  848|      0|            if (X509_NAME_ENTRY_set(X509_NAME_get_entry(tmpsubject, last_loc))
  ------------------
  |  Branch (848:17): [True: 0, False: 0]
  ------------------
  849|      0|                == X509_NAME_ENTRY_set(X509_NAME_get_entry(tmpsubject,
  850|      0|                    last_loc - 1))) {
  851|      0|                err = X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION;
  ------------------
  |  |  396|      0|#define X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION 72
  ------------------
  852|      0|                goto proxy_name_done;
  853|      0|            }
  854|       |
  855|       |            /*
  856|       |             * Check that the last subject RDN is a commonName, and that
  857|       |             * all the previous RDNs match the issuer exactly
  858|       |             */
  859|      0|            tmpsubject2 = X509_NAME_dup(tmpsubject);
  860|      0|            if (tmpsubject2 == NULL) {
  ------------------
  |  Branch (860:17): [True: 0, False: 0]
  ------------------
  861|      0|                ERR_raise(ERR_LIB_X509, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  862|      0|                ctx->error = X509_V_ERR_OUT_OF_MEM;
  ------------------
  |  |  329|      0|#define X509_V_ERR_OUT_OF_MEM 17
  ------------------
  863|      0|                return -1;
  864|      0|            }
  865|       |
  866|      0|            tmpentry = X509_NAME_delete_entry(tmpsubject2, last_loc);
  867|      0|            last_nid = OBJ_obj2nid(X509_NAME_ENTRY_get_object(tmpentry));
  868|       |
  869|      0|            if (last_nid != NID_commonName
  ------------------
  |  | 2407|      0|#define NID_commonName          13
  ------------------
  |  Branch (869:17): [True: 0, False: 0]
  ------------------
  870|      0|                || X509_NAME_cmp(tmpsubject2, tmpissuer) != 0) {
  ------------------
  |  Branch (870:20): [True: 0, False: 0]
  ------------------
  871|      0|                err = X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION;
  ------------------
  |  |  396|      0|#define X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION 72
  ------------------
  872|      0|            }
  873|       |
  874|      0|            X509_NAME_ENTRY_free(tmpentry);
  875|      0|            X509_NAME_free(tmpsubject2);
  876|       |
  877|      0|        proxy_name_done:
  878|      0|            CB_FAIL_IF(err != X509_V_OK, ctx, x, i, err);
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:9): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
  879|      0|        }
  880|       |
  881|       |        /*
  882|       |         * Check against constraints for all certificates higher in chain
  883|       |         * including trust anchor. Trust anchor not strictly speaking needed
  884|       |         * but if it includes constraints it is to be assumed it expects them
  885|       |         * to be obeyed.
  886|       |         */
  887|  3.55k|        for (j = sk_X509_num(ctx->chain) - 1; j > i; j--) {
  ------------------
  |  |   82|  3.55k|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
  |  Branch (887:47): [True: 0, False: 3.55k]
  ------------------
  888|      0|            NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;
  ------------------
  |  |   83|      0|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
  889|       |
  890|      0|            if (nc) {
  ------------------
  |  Branch (890:17): [True: 0, False: 0]
  ------------------
  891|      0|                int rv = NAME_CONSTRAINTS_check(x, nc);
  892|      0|                int ret = 1;
  893|       |
  894|       |                /* If EE certificate check commonName too */
  895|      0|                if (rv == X509_V_OK && i == 0
  ------------------
  |  |  312|      0|#define X509_V_OK 0
  ------------------
  |  Branch (895:21): [True: 0, False: 0]
  |  Branch (895:40): [True: 0, False: 0]
  ------------------
  896|      0|                    && (ctx->param->hostflags
  ------------------
  |  Branch (896:24): [True: 0, False: 0]
  ------------------
  897|      0|                           & X509_CHECK_FLAG_NEVER_CHECK_SUBJECT)
  ------------------
  |  | 1070|      0|#define X509_CHECK_FLAG_NEVER_CHECK_SUBJECT 0x20
  ------------------
  898|      0|                        == 0
  899|      0|                    && ((ctx->param->hostflags
  ------------------
  |  Branch (899:25): [True: 0, False: 0]
  ------------------
  900|      0|                            & X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT)
  ------------------
  |  | 1060|      0|#define X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT 0x1
  ------------------
  901|      0|                            != 0
  902|      0|                        || (ret = has_san_id(x, GEN_DNS)) == 0))
  ------------------
  |  |  178|      0|#define GEN_DNS 2
  ------------------
  |  Branch (902:28): [True: 0, False: 0]
  ------------------
  903|      0|                    rv = NAME_CONSTRAINTS_check_CN(x, nc);
  904|      0|                if (ret < 0)
  ------------------
  |  Branch (904:21): [True: 0, False: 0]
  ------------------
  905|      0|                    return ret;
  906|       |
  907|      0|                switch (rv) {
  908|      0|                case X509_V_OK:
  ------------------
  |  |  312|      0|#define X509_V_OK 0
  ------------------
  |  Branch (908:17): [True: 0, False: 0]
  ------------------
  909|      0|                    break;
  910|      0|                case X509_V_ERR_OUT_OF_MEM:
  ------------------
  |  |  329|      0|#define X509_V_ERR_OUT_OF_MEM 17
  ------------------
  |  Branch (910:17): [True: 0, False: 0]
  ------------------
  911|      0|                    return -1;
  912|      0|                default:
  ------------------
  |  Branch (912:17): [True: 0, False: 0]
  ------------------
  913|      0|                    CB_FAIL_IF(1, ctx, x, i, rv);
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:9): [True: 0, Folded]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
  914|      0|                    break;
  915|      0|                }
  916|      0|            }
  917|      0|        }
  918|  3.55k|    }
  919|  3.55k|    return 1;
  920|  3.55k|}
x509_vfy.c:get_verification_time:
 1483|  7.10k|{
 1484|  7.10k|    if (vpm != NULL && (vpm->flags & X509_V_FLAG_USE_CHECK_TIME) != 0)
  ------------------
  |  |  442|  7.10k|#define X509_V_FLAG_USE_CHECK_TIME 0x2
  ------------------
  |  Branch (1484:9): [True: 7.10k, False: 0]
  |  Branch (1484:24): [True: 0, False: 7.10k]
  ------------------
 1485|      0|        *verification_time = vpm->check_time;
 1486|  7.10k|    else
 1487|  7.10k|        *verification_time = (int64_t)time(NULL);
 1488|       |
 1489|  7.10k|    return vpm == NULL || (vpm->flags & X509_V_FLAG_NO_CHECK_TIME) == 0;
  ------------------
  |  |  486|  7.10k|#define X509_V_FLAG_NO_CHECK_TIME 0x200000
  ------------------
  |  Branch (1489:12): [True: 0, False: 7.10k]
  |  Branch (1489:27): [True: 7.10k, False: 0]
  ------------------
 1490|  7.10k|}
x509_vfy.c:certificate_time_to_posix:
 1057|  14.2k|{
 1058|  14.2k|    struct tm stm;
 1059|       |
 1060|  14.2k|    if (!validate_certificate_time(ctm))
  ------------------
  |  Branch (1060:9): [True: 0, False: 14.2k]
  ------------------
 1061|      0|        return 0;
 1062|       |
 1063|  14.2k|    if (!ASN1_TIME_to_tm(ctm, &stm))
  ------------------
  |  Branch (1063:9): [True: 0, False: 14.2k]
  ------------------
 1064|      0|        return 0;
 1065|       |
 1066|  14.2k|    if (!OPENSSL_tm_to_posix(&stm, out_time))
  ------------------
  |  Branch (1066:9): [True: 0, False: 14.2k]
  ------------------
 1067|      0|        return 0;
 1068|       |
 1069|  14.2k|    return 1;
 1070|  14.2k|}
x509_vfy.c:validate_certificate_time:
 1006|  14.2k|{
 1007|  14.2k|    static const size_t utctime_length = sizeof("YYMMDDHHMMSSZ") - 1;
 1008|  14.2k|    static const size_t generalizedtime_length = sizeof("YYYYMMDDHHMMSSZ") - 1;
 1009|  14.2k|    int i;
 1010|       |#ifdef CHARSET_EBCDIC
 1011|       |    const char upper_z = 0x5A;
 1012|       |#else
 1013|  14.2k|    const char upper_z = 'Z';
 1014|  14.2k|#endif
 1015|       |
 1016|       |    /*-
 1017|       |     * Note that ASN.1 allows much more slack in the time format than RFC5280.
 1018|       |     * In RFC5280, the representation is fixed:
 1019|       |     * UTCTime: YYMMDDHHMMSSZ
 1020|       |     * GeneralizedTime: YYYYMMDDHHMMSSZ
 1021|       |     *
 1022|       |     * We do NOT currently enforce the following RFC 5280 requirement:
 1023|       |     * "CAs conforming to this profile MUST always encode certificate
 1024|       |     *  validity dates through the year 2049 as UTCTime; certificate validity
 1025|       |     *  dates in 2050 or later MUST be encoded as GeneralizedTime."
 1026|       |     */
 1027|  14.2k|    switch (ctm->type) {
 1028|  7.10k|    case V_ASN1_UTCTIME:
  ------------------
  |  |   84|  7.10k|#define V_ASN1_UTCTIME 23
  ------------------
  |  Branch (1028:5): [True: 7.10k, False: 7.10k]
  ------------------
 1029|  7.10k|        if (ctm->length != (int)(utctime_length))
  ------------------
  |  Branch (1029:13): [True: 0, False: 7.10k]
  ------------------
 1030|      0|            return 0;
 1031|  7.10k|        break;
 1032|  7.10k|    case V_ASN1_GENERALIZEDTIME:
  ------------------
  |  |   85|  7.10k|#define V_ASN1_GENERALIZEDTIME 24
  ------------------
  |  Branch (1032:5): [True: 7.10k, False: 7.10k]
  ------------------
 1033|  7.10k|        if (ctm->length != (int)(generalizedtime_length))
  ------------------
  |  Branch (1033:13): [True: 0, False: 7.10k]
  ------------------
 1034|      0|            return 0;
 1035|  7.10k|        break;
 1036|  7.10k|    default:
  ------------------
  |  Branch (1036:5): [True: 0, False: 14.2k]
  ------------------
 1037|      0|        return 0;
 1038|  14.2k|    }
 1039|       |
 1040|       |    /**
 1041|       |     * Verify the format: the ASN.1 functions we use below allow a more
 1042|       |     * flexible format than what's mandated by RFC 5280.
 1043|       |     * Digit and date ranges will be verified in the conversion methods.
 1044|       |     */
 1045|   199k|    for (i = 0; i < ctm->length - 1; i++) {
  ------------------
  |  Branch (1045:17): [True: 184k, False: 14.2k]
  ------------------
 1046|   184k|        if (!ossl_ascii_isdigit(ctm->data[i]))
  ------------------
  |  Branch (1046:13): [True: 0, False: 184k]
  ------------------
 1047|      0|            return 0;
 1048|   184k|    }
 1049|  14.2k|    if (ctm->data[ctm->length - 1] != upper_z)
  ------------------
  |  Branch (1049:9): [True: 0, False: 14.2k]
  ------------------
 1050|      0|        return 0;
 1051|       |
 1052|  14.2k|    return 1;
 1053|  14.2k|}
x509_vfy.c:verify_cb_cert:
  165|  3.70k|{
  166|  3.70k|    if (depth < 0)
  ------------------
  |  Branch (166:9): [True: 0, False: 3.70k]
  ------------------
  167|      0|        depth = ctx->error_depth;
  168|  3.70k|    else
  169|  3.70k|        ctx->error_depth = depth;
  170|  3.70k|    ctx->current_cert = x != NULL ? (X509 *)x : sk_X509_value(ctx->chain, depth);
  ------------------
  |  |   83|  7.40k|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
  |  Branch (170:25): [True: 0, False: 3.70k]
  ------------------
  171|  3.70k|    if (err != X509_V_OK)
  ------------------
  |  |  312|  3.70k|#define X509_V_OK 0
  ------------------
  |  Branch (171:9): [True: 3.70k, False: 0]
  ------------------
  172|  3.70k|        ctx->error = err;
  173|  3.70k|    return ctx->verify_cb(0, ctx);
  174|  3.70k|}
x509_vfy.c:check_issued:
  495|  3.55k|{
  496|  3.55k|    int err = ossl_x509_likely_issued(issuer, x);
  497|       |
  498|  3.55k|    if (err == X509_V_OK)
  ------------------
  |  |  312|  3.55k|#define X509_V_OK 0
  ------------------
  |  Branch (498:9): [True: 3.55k, False: 0]
  ------------------
  499|  3.55k|        return 1;
  500|       |    /*
  501|       |     * SUBJECT_ISSUER_MISMATCH just means 'x' is clearly not issued by 'issuer'.
  502|       |     * Every other error code likely indicates a real error.
  503|       |     */
  504|      0|    return 0;
  505|  3.55k|}
x509_vfy.c:null_callback:
   91|  7.25k|{
   92|  7.25k|    return ok;
   93|  7.25k|}
x509_vfy.c:internal_verify:
 2303|  3.55k|{
 2304|  3.55k|    int n;
 2305|  3.55k|    X509 *xi;
 2306|  3.55k|    X509 *xs;
 2307|       |
 2308|       |    /* For RPK: just do the verify callback */
 2309|  3.55k|    if (ctx->rpk != NULL) {
  ------------------
  |  Branch (2309:9): [True: 0, False: 3.55k]
  ------------------
 2310|      0|        if (!ctx->verify_cb(ctx->error == X509_V_OK, ctx))
  ------------------
  |  |  312|      0|#define X509_V_OK 0
  ------------------
  |  Branch (2310:13): [True: 0, False: 0]
  ------------------
 2311|      0|            return 0;
 2312|      0|        return 1;
 2313|      0|    }
 2314|  3.55k|    n = sk_X509_num(ctx->chain) - 1;
  ------------------
  |  |   82|  3.55k|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
 2315|  3.55k|    xi = sk_X509_value(ctx->chain, n);
  ------------------
  |  |   83|  3.55k|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
 2316|  3.55k|    xs = xi;
 2317|       |
 2318|  3.55k|    ctx->error_depth = n;
 2319|  3.55k|    if (ctx->bare_ta_signed) {
  ------------------
  |  Branch (2319:9): [True: 0, False: 3.55k]
  ------------------
 2320|       |        /*
 2321|       |         * With DANE-verified bare public key TA signatures,
 2322|       |         * on the top certificate we check only the timestamps.
 2323|       |         * We report the issuer as NULL because all we have is a bare key.
 2324|       |         */
 2325|      0|        xi = NULL;
 2326|  3.55k|    } else if (ossl_x509_likely_issued(xi, xi) != X509_V_OK
  ------------------
  |  |  312|  7.10k|#define X509_V_OK 0
  ------------------
  |  Branch (2326:16): [True: 0, False: 3.55k]
  ------------------
 2327|       |        /* exceptional case: last cert in the chain is not self-issued */
 2328|      0|        && ((ctx->param->flags & X509_V_FLAG_PARTIAL_CHAIN) == 0)) {
  ------------------
  |  |  478|      0|#define X509_V_FLAG_PARTIAL_CHAIN 0x80000
  ------------------
  |  Branch (2328:12): [True: 0, False: 0]
  ------------------
 2329|      0|        if (n > 0) {
  ------------------
  |  Branch (2329:13): [True: 0, False: 0]
  ------------------
 2330|      0|            n--;
 2331|      0|            ctx->error_depth = n;
 2332|      0|            xs = sk_X509_value(ctx->chain, n);
  ------------------
  |  |   83|      0|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
 2333|      0|        } else {
 2334|      0|            CB_FAIL_IF(1, ctx, xi, 0,
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:9): [True: 0, Folded]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
 2335|      0|                X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE);
 2336|      0|        }
 2337|       |        /*
 2338|       |         * The below code will certainly not do a
 2339|       |         * self-signature check on xi because it is not self-issued.
 2340|       |         */
 2341|      0|    }
 2342|       |
 2343|       |    /*
 2344|       |     * Do not clear error (by ctx->error = X509_V_OK), it must be "sticky",
 2345|       |     * only the user's callback is allowed to reset errors (at its own peril).
 2346|       |     */
 2347|  7.10k|    while (n >= 0) {
  ------------------
  |  Branch (2347:12): [True: 3.55k, False: 3.55k]
  ------------------
 2348|       |        /*-
 2349|       |         * For each iteration of this loop:
 2350|       |         * n is the subject depth
 2351|       |         * xs is the subject cert, for which the signature is to be checked
 2352|       |         * xi is NULL for DANE-verified bare public key TA signatures
 2353|       |         *       else the supposed issuer cert containing the public key to use
 2354|       |         * Initially xs == xi if the last cert in the chain is self-issued.
 2355|       |         */
 2356|       |        /*
 2357|       |         * Do signature check for self-signed certificates only if explicitly
 2358|       |         * asked for because it does not add any security and just wastes time.
 2359|       |         */
 2360|  3.55k|        if (xi != NULL
  ------------------
  |  Branch (2360:13): [True: 3.55k, False: 0]
  ------------------
 2361|  3.55k|            && (xs != xi
  ------------------
  |  Branch (2361:17): [True: 0, False: 3.55k]
  ------------------
 2362|  3.55k|                || ((ctx->param->flags & X509_V_FLAG_CHECK_SS_SIGNATURE) != 0
  ------------------
  |  |  468|  3.55k|#define X509_V_FLAG_CHECK_SS_SIGNATURE 0x4000
  ------------------
  |  Branch (2362:21): [True: 0, False: 3.55k]
  ------------------
 2363|      0|                    && (xi->ex_flags & EXFLAG_SS) != 0))) {
  ------------------
  |  |  684|      0|#define EXFLAG_SS 0x2000 /* cert is apparently self-signed */
  ------------------
  |  Branch (2363:24): [True: 0, False: 0]
  ------------------
 2364|      0|            EVP_PKEY *pkey;
 2365|       |            /*
 2366|       |             * If the issuer's public key is not available or its key usage
 2367|       |             * does not support issuing the subject cert, report the issuer
 2368|       |             * cert and its depth (rather than n, the depth of the subject).
 2369|       |             */
 2370|      0|            int issuer_depth = n + (xs == xi ? 0 : 1);
  ------------------
  |  Branch (2370:37): [True: 0, False: 0]
  ------------------
 2371|       |            /*
 2372|       |             * According to https://tools.ietf.org/html/rfc5280#section-6.1.4
 2373|       |             * step (n) we must check any given key usage extension in a CA cert
 2374|       |             * when preparing the verification of a certificate issued by it.
 2375|       |             * According to https://tools.ietf.org/html/rfc5280#section-4.2.1.3
 2376|       |             * we must not verify a certificate signature if the key usage of
 2377|       |             * the CA certificate that issued the certificate prohibits signing.
 2378|       |             * In case the 'issuing' certificate is the last in the chain and is
 2379|       |             * not a CA certificate but a 'self-issued' end-entity cert (i.e.,
 2380|       |             * xs == xi && !(xi->ex_flags & EXFLAG_CA)) RFC 5280 does not apply
 2381|       |             * (see https://tools.ietf.org/html/rfc6818#section-2) and thus
 2382|       |             * we are free to ignore any key usage restrictions on such certs.
 2383|       |             */
 2384|      0|            int ret = xs == xi && (xi->ex_flags & EXFLAG_CA) == 0
  ------------------
  |  |  673|      0|#define EXFLAG_CA 0x10
  ------------------
  |  Branch (2384:23): [True: 0, False: 0]
  |  Branch (2384:35): [True: 0, False: 0]
  ------------------
 2385|      0|                ? X509_V_OK
  ------------------
  |  |  312|      0|#define X509_V_OK 0
  ------------------
 2386|      0|                : ossl_x509_signing_allowed(xi, xs);
 2387|       |
 2388|      0|            CB_FAIL_IF(ret != X509_V_OK, ctx, xi, issuer_depth, ret);
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:9): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
 2389|      0|            if ((pkey = X509_get0_pubkey(xi)) == NULL) {
  ------------------
  |  Branch (2389:17): [True: 0, False: 0]
  ------------------
 2390|      0|                CB_FAIL_IF(1, ctx, xi, issuer_depth,
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:9): [True: 0, Folded]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
 2391|      0|                    X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY);
 2392|      0|            } else {
 2393|      0|                CB_FAIL_IF(X509_verify(xs, pkey) <= 0,
  ------------------
  |  |  177|      0|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:9): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|      0|    return 0
  ------------------
 2394|      0|                    ctx, xs, n, X509_V_ERR_CERT_SIGNATURE_FAILURE);
 2395|      0|            }
 2396|      0|        }
 2397|       |
 2398|       |        /* In addition to RFC 5280 requirements do also for trust anchor cert */
 2399|       |        /* Calls verify callback as needed */
 2400|  3.55k|        if (!ossl_x509_check_cert_time(ctx, xs, n))
  ------------------
  |  Branch (2400:13): [True: 0, False: 3.55k]
  ------------------
 2401|      0|            return 0;
 2402|       |
 2403|       |        /*
 2404|       |         * Signal success at this depth.  However, the previous error (if any)
 2405|       |         * is retained.
 2406|       |         */
 2407|  3.55k|        ctx->current_issuer = xi;
 2408|  3.55k|        ctx->current_cert = xs;
 2409|  3.55k|        ctx->error_depth = n;
 2410|  3.55k|        if (!ctx->verify_cb(1, ctx))
  ------------------
  |  Branch (2410:13): [True: 0, False: 3.55k]
  ------------------
 2411|      0|            return 0;
 2412|       |
 2413|  3.55k|        if (--n >= 0) {
  ------------------
  |  Branch (2413:13): [True: 0, False: 3.55k]
  ------------------
 2414|      0|            xi = xs;
 2415|      0|            xs = sk_X509_value(ctx->chain, n);
  ------------------
  |  |   83|      0|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
 2416|      0|        }
 2417|  3.55k|    }
 2418|  3.55k|    return 1;
 2419|  3.55k|}
x509_vfy.c:check_revocation:
 1173|  3.55k|{
 1174|  3.55k|    int i = 0, last = 0, ok = 0;
 1175|  3.55k|    int crl_check_enabled = (ctx->param->flags & X509_V_FLAG_CRL_CHECK) != 0;
  ------------------
  |  |  444|  3.55k|#define X509_V_FLAG_CRL_CHECK 0x4
  ------------------
 1176|  3.55k|    int crl_check_all_enabled = crl_check_enabled && (ctx->param->flags & X509_V_FLAG_CRL_CHECK_ALL) != 0;
  ------------------
  |  |  446|      0|#define X509_V_FLAG_CRL_CHECK_ALL 0x8
  ------------------
  |  Branch (1176:33): [True: 0, False: 3.55k]
  |  Branch (1176:54): [True: 0, False: 0]
  ------------------
 1177|  3.55k|    int ocsp_check_enabled = (ctx->param->flags & X509_V_FLAG_OCSP_RESP_CHECK) != 0;
  ------------------
  |  |  489|  3.55k|#define X509_V_FLAG_OCSP_RESP_CHECK 0x400000
  ------------------
 1178|  3.55k|    int ocsp_check_all_enabled = ocsp_check_enabled && (ctx->param->flags & X509_V_FLAG_OCSP_RESP_CHECK_ALL) != 0;
  ------------------
  |  |  491|      0|#define X509_V_FLAG_OCSP_RESP_CHECK_ALL 0x800000
  ------------------
  |  Branch (1178:34): [True: 0, False: 3.55k]
  |  Branch (1178:56): [True: 0, False: 0]
  ------------------
 1179|       |
 1180|  3.55k|    if (!crl_check_enabled && !ocsp_check_enabled)
  ------------------
  |  Branch (1180:9): [True: 3.55k, False: 0]
  |  Branch (1180:31): [True: 3.55k, False: 0]
  ------------------
 1181|  3.55k|        return 1;
 1182|       |
 1183|      0|    if (ocsp_check_enabled) {
  ------------------
  |  Branch (1183:9): [True: 0, False: 0]
  ------------------
 1184|      0|#ifndef OPENSSL_NO_OCSP
 1185|       |        /*
 1186|       |         * certificate status checking with OCSP
 1187|       |         */
 1188|      0|        if (ocsp_check_all_enabled)
  ------------------
  |  Branch (1188:13): [True: 0, False: 0]
  ------------------
 1189|      0|            last = sk_X509_num(ctx->chain) - 1;
  ------------------
  |  |   82|      0|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
 1190|      0|        else if (!crl_check_all_enabled && ctx->parent != NULL)
  ------------------
  |  Branch (1190:18): [True: 0, False: 0]
  |  Branch (1190:44): [True: 0, False: 0]
  ------------------
 1191|      0|            return 1; /* If checking CRL paths this isn't the EE certificate */
 1192|       |
 1193|      0|        for (i = 0; i <= last; i++) {
  ------------------
  |  Branch (1193:21): [True: 0, False: 0]
  ------------------
 1194|      0|            ctx->error_depth = i;
 1195|      0|            ctx->current_cert = sk_X509_value(ctx->chain, i);
  ------------------
  |  |   83|      0|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
 1196|       |
 1197|       |            /* skip if cert is apparently self-signed */
 1198|      0|            if (ctx->current_cert->ex_flags & EXFLAG_SS)
  ------------------
  |  |  684|      0|#define EXFLAG_SS 0x2000 /* cert is apparently self-signed */
  ------------------
  |  Branch (1198:17): [True: 0, False: 0]
  ------------------
 1199|      0|                continue;
 1200|       |
 1201|       |            /* the issuer certificate is the next in the chain */
 1202|      0|            ctx->current_issuer = sk_X509_value(ctx->chain, i + 1);
  ------------------
  |  |   83|      0|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
 1203|      0|            if (ctx->current_issuer == NULL) {
  ------------------
  |  Branch (1203:17): [True: 0, False: 0]
  ------------------
 1204|       |                /*
 1205|       |                 * No issuer exists at i+1 — this is the partial-chain
 1206|       |                 * trust anchor. OCSP requires an issuer to build the
 1207|       |                 * CertID, so skip OCSP checking for this certificate.
 1208|       |                 */
 1209|      0|                if ((ctx->param->flags & X509_V_FLAG_PARTIAL_CHAIN) != 0)
  ------------------
  |  |  478|      0|#define X509_V_FLAG_PARTIAL_CHAIN 0x80000
  ------------------
  |  Branch (1209:21): [True: 0, False: 0]
  ------------------
 1210|      0|                    continue;
 1211|      0|                return verify_cb_ocsp(ctx, X509_V_ERR_OCSP_VERIFY_FAILED);
  ------------------
  |  |  399|      0|#define X509_V_ERR_OCSP_VERIFY_FAILED 74 /* Couldn't verify cert through OCSP */
  ------------------
 1212|      0|            }
 1213|       |
 1214|      0|            ok = check_cert_ocsp_resp(ctx);
 1215|       |
 1216|       |            /*
 1217|       |             * In the case the certificate status is REVOKED, the verification
 1218|       |             * can stop here.
 1219|       |             */
 1220|      0|            if (ok == V_OCSP_CERTSTATUS_REVOKED) {
  ------------------
  |  |  197|      0|#define V_OCSP_CERTSTATUS_REVOKED 1
  ------------------
  |  Branch (1220:17): [True: 0, False: 0]
  ------------------
 1221|      0|                return verify_cb_ocsp(ctx, ctx->error != 0 ? ctx->error : X509_V_ERR_OCSP_VERIFY_FAILED);
  ------------------
  |  |  399|      0|#define X509_V_ERR_OCSP_VERIFY_FAILED 74 /* Couldn't verify cert through OCSP */
  ------------------
  |  Branch (1221:44): [True: 0, False: 0]
  ------------------
 1222|      0|            }
 1223|       |
 1224|       |            /*
 1225|       |             * In the case the certificate status is GOOD, continue with the next
 1226|       |             * certificate.
 1227|       |             */
 1228|      0|            if (ok == V_OCSP_CERTSTATUS_GOOD)
  ------------------
  |  |  196|      0|#define V_OCSP_CERTSTATUS_GOOD 0
  ------------------
  |  Branch (1228:17): [True: 0, False: 0]
  ------------------
 1229|      0|                continue;
 1230|       |
 1231|       |            /*
 1232|       |             * As stated in RFC 6961 section 2.2:
 1233|       |             * If OCSP is not enabled or the client receives a "ocsp_response_list"
 1234|       |             * that does not contain a response for one or more of the certificates
 1235|       |             * in the completed certificate chain, the client SHOULD attempt to
 1236|       |             * validate the certificate using an alternative retrieval method,
 1237|       |             * such as downloading the relevant CRL;
 1238|       |             */
 1239|      0|            if (crl_check_all_enabled || (crl_check_enabled && i == 0)) {
  ------------------
  |  Branch (1239:17): [True: 0, False: 0]
  |  Branch (1239:43): [True: 0, False: 0]
  |  Branch (1239:64): [True: 0, False: 0]
  ------------------
 1240|      0|                ok = check_cert_crl(ctx);
 1241|      0|                if (!ok)
  ------------------
  |  Branch (1241:21): [True: 0, False: 0]
  ------------------
 1242|      0|                    return ok;
 1243|      0|            } else {
 1244|      0|                ok = verify_cb_ocsp(ctx, X509_V_ERR_OCSP_VERIFY_FAILED);
  ------------------
  |  |  399|      0|#define X509_V_ERR_OCSP_VERIFY_FAILED 74 /* Couldn't verify cert through OCSP */
  ------------------
 1245|      0|                if (!ok)
  ------------------
  |  Branch (1245:21): [True: 0, False: 0]
  ------------------
 1246|      0|                    return ok;
 1247|      0|            }
 1248|      0|        }
 1249|      0|#endif
 1250|      0|    }
 1251|       |
 1252|      0|    if (crl_check_enabled && !ocsp_check_all_enabled) {
  ------------------
  |  Branch (1252:9): [True: 0, False: 0]
  |  Branch (1252:30): [True: 0, False: 0]
  ------------------
 1253|       |        /* certificate status check with CRLs */
 1254|      0|        if (crl_check_all_enabled) {
  ------------------
  |  Branch (1254:13): [True: 0, False: 0]
  ------------------
 1255|      0|            last = sk_X509_num(ctx->chain) - 1;
  ------------------
  |  |   82|      0|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
 1256|      0|        } else {
 1257|       |            /* If checking CRL paths this isn't the EE certificate */
 1258|      0|            if (ctx->parent != NULL)
  ------------------
  |  Branch (1258:17): [True: 0, False: 0]
  ------------------
 1259|      0|                return 1;
 1260|      0|            last = 0;
 1261|      0|        }
 1262|       |
 1263|       |        /*
 1264|       |         * in the case that OCSP is only enabled for the server certificate
 1265|       |         * and CRL for the complete chain, the rest of the chain has to be
 1266|       |         * checked here
 1267|       |         */
 1268|      0|        if (ocsp_check_enabled && crl_check_all_enabled)
  ------------------
  |  Branch (1268:13): [True: 0, False: 0]
  |  Branch (1268:35): [True: 0, False: 0]
  ------------------
 1269|      0|            i = 1;
 1270|      0|        else
 1271|      0|            i = 0;
 1272|      0|        for (; i <= last; i++) {
  ------------------
  |  Branch (1272:16): [True: 0, False: 0]
  ------------------
 1273|      0|            ctx->error_depth = i;
 1274|      0|            ok = check_cert_crl(ctx);
 1275|      0|            if (!ok)
  ------------------
  |  Branch (1275:17): [True: 0, False: 0]
  ------------------
 1276|      0|                return ok;
 1277|      0|        }
 1278|      0|    }
 1279|       |
 1280|      0|    return 1;
 1281|      0|}
x509_vfy.c:build_chain:
 3674|  7.25k|{
 3675|  7.25k|    SSL_DANE *dane = ctx->dane;
 3676|  7.25k|    int num = sk_X509_num(ctx->chain);
  ------------------
  |  |   82|  7.25k|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
 3677|  7.25k|    STACK_OF(X509) *sk_untrusted = NULL;
  ------------------
  |  |   33|  7.25k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 3678|  7.25k|    unsigned int search;
 3679|  7.25k|    int may_trusted = 0;
 3680|  7.25k|    int may_alternate = 0;
 3681|  7.25k|    int trust = X509_TRUST_UNTRUSTED;
  ------------------
  |  |  221|  7.25k|#define X509_TRUST_UNTRUSTED 3
  ------------------
 3682|  7.25k|    int alt_untrusted = 0;
 3683|  7.25k|    int max_depth;
 3684|  7.25k|    int ok = 0;
 3685|  7.25k|    int i;
 3686|       |
 3687|       |    /* Our chain starts with a single untrusted element. */
 3688|  7.25k|    if (!ossl_assert(num == 1 && ctx->num_untrusted == num))
  ------------------
  |  |   52|  14.5k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 7.25k, False: 0]
  |  |  |  Branch (52:41): [True: 7.25k, False: 0]
  |  |  ------------------
  |  |   53|  7.25k|    __FILE__, __LINE__)
  ------------------
  |  Branch (3688:9): [True: 0, False: 7.25k]
  ------------------
 3689|      0|        goto int_err;
 3690|       |
 3691|  7.25k|#define S_DOUNTRUSTED (1 << 0) /* Search untrusted chain */
 3692|  7.25k|#define S_DOTRUSTED (1 << 1) /* Search trusted store */
 3693|  7.25k|#define S_DOALTERNATE (1 << 2) /* Retry with pruned alternate chain */
 3694|       |    /*
 3695|       |     * Set up search policy, untrusted if possible, trusted-first if enabled,
 3696|       |     * which is the default.
 3697|       |     * If we're doing DANE and not doing PKIX-TA/PKIX-EE, we never look in the
 3698|       |     * trust_store, otherwise we might look there first.  If not trusted-first,
 3699|       |     * and alternate chains are not disabled, try building an alternate chain
 3700|       |     * if no luck with untrusted first.
 3701|       |     */
 3702|  7.25k|    search = ctx->untrusted != NULL ? S_DOUNTRUSTED : 0;
  ------------------
  |  | 3691|  3.62k|#define S_DOUNTRUSTED (1 << 0) /* Search untrusted chain */
  ------------------
  |  Branch (3702:14): [True: 3.62k, False: 3.62k]
  ------------------
 3703|  7.25k|    if (DANETLS_HAS_PKIX(dane) || !DANETLS_HAS_DANE(dane)) {
  ------------------
  |  |   94|  14.5k|#define DANETLS_HAS_PKIX(dane) ((dane) && ((dane)->umask & DANETLS_PKIX_MASK))
  |  |  ------------------
  |  |  |  |   89|      0|#define DANETLS_PKIX_MASK (DANETLS_PKIX_TA_MASK | DANETLS_PKIX_EE_MASK)
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|      0|#define DANETLS_PKIX_TA_MASK (DANETLS_USAGE_BIT(DANETLS_USAGE_PKIX_TA))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   82|      0|#define DANETLS_USAGE_BIT(u) (((uint32_t)1) << u)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define DANETLS_PKIX_MASK (DANETLS_PKIX_TA_MASK | DANETLS_PKIX_EE_MASK)
  |  |  |  |  ------------------
  |  |  |  |  |  |   85|      0|#define DANETLS_PKIX_EE_MASK (DANETLS_USAGE_BIT(DANETLS_USAGE_PKIX_EE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   82|      0|#define DANETLS_USAGE_BIT(u) (((uint32_t)1) << u)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (94:33): [True: 0, False: 7.25k]
  |  |  |  Branch (94:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                  if (DANETLS_HAS_PKIX(dane) || !DANETLS_HAS_DANE(dane)) {
  ------------------
  |  |   95|  7.25k|#define DANETLS_HAS_DANE(dane) ((dane) && ((dane)->umask & DANETLS_DANE_MASK))
  |  |  ------------------
  |  |  |  |   90|      0|#define DANETLS_DANE_MASK (DANETLS_DANE_TA_MASK | DANETLS_DANE_EE_MASK)
  |  |  |  |  ------------------
  |  |  |  |  |  |   86|      0|#define DANETLS_DANE_TA_MASK (DANETLS_USAGE_BIT(DANETLS_USAGE_DANE_TA))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   82|      0|#define DANETLS_USAGE_BIT(u) (((uint32_t)1) << u)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define DANETLS_DANE_MASK (DANETLS_DANE_TA_MASK | DANETLS_DANE_EE_MASK)
  |  |  |  |  ------------------
  |  |  |  |  |  |   87|      0|#define DANETLS_DANE_EE_MASK (DANETLS_USAGE_BIT(DANETLS_USAGE_DANE_EE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   82|      0|#define DANETLS_USAGE_BIT(u) (((uint32_t)1) << u)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (95:33): [True: 0, False: 7.25k]
  |  |  |  Branch (95:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3704|  7.25k|        if (search == 0 || (ctx->param->flags & X509_V_FLAG_TRUSTED_FIRST) != 0)
  ------------------
  |  |  470|  3.62k|#define X509_V_FLAG_TRUSTED_FIRST 0x8000
  ------------------
  |  Branch (3704:13): [True: 3.62k, False: 3.62k]
  |  Branch (3704:28): [True: 3.62k, False: 0]
  ------------------
 3705|  7.25k|            search |= S_DOTRUSTED;
  ------------------
  |  | 3692|  7.25k|#define S_DOTRUSTED (1 << 1) /* Search trusted store */
  ------------------
 3706|      0|        else if (!(ctx->param->flags & X509_V_FLAG_NO_ALT_CHAINS))
  ------------------
  |  |  484|      0|#define X509_V_FLAG_NO_ALT_CHAINS 0x100000
  ------------------
  |  Branch (3706:18): [True: 0, False: 0]
  ------------------
 3707|      0|            may_alternate = 1;
 3708|  7.25k|        may_trusted = 1;
 3709|  7.25k|    }
 3710|       |
 3711|       |    /* Initialize empty untrusted stack. */
 3712|  7.25k|    if ((sk_untrusted = sk_X509_new_null()) == NULL) {
  ------------------
  |  |   85|  7.25k|#define sk_X509_new_null() ((STACK_OF(X509) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_X509_freefunc_thunk))
  ------------------
  |  Branch (3712:9): [True: 0, False: 7.25k]
  ------------------
 3713|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3714|      0|        goto memerr;
 3715|      0|    }
 3716|       |
 3717|       |    /*
 3718|       |     * If we got any "Cert(0) Full(0)" trust anchors from DNS, *prepend* them
 3719|       |     * to our working copy of the untrusted certificate stack.
 3720|       |     */
 3721|  7.25k|    if (DANETLS_ENABLED(dane) && dane->certs != NULL
  ------------------
  |  |   80|  14.5k|    ((dane) != NULL && sk_danetls_record_num((dane)->trecs) > 0)
  |  |  ------------------
  |  |  |  Branch (80:6): [True: 0, False: 7.25k]
  |  |  |  Branch (80:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3721:34): [True: 0, False: 0]
  ------------------
 3722|      0|        && !X509_add_certs(sk_untrusted, dane->certs, X509_ADD_FLAG_DEFAULT)) {
  ------------------
  |  |  999|      0|#define X509_ADD_FLAG_DEFAULT 0
  ------------------
  |  Branch (3722:12): [True: 0, False: 0]
  ------------------
 3723|      0|        ERR_raise(ERR_LIB_X509, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3724|      0|        goto memerr;
 3725|      0|    }
 3726|       |
 3727|       |    /*
 3728|       |     * Shallow-copy the stack of untrusted certificates (with TLS, this is
 3729|       |     * typically the content of the peer's certificate message) so we can make
 3730|       |     * multiple passes over it, while free to remove elements as we go.
 3731|       |     */
 3732|  7.25k|    if (!X509_add_certs(sk_untrusted, ctx->untrusted, X509_ADD_FLAG_DEFAULT)) {
  ------------------
  |  |  999|  7.25k|#define X509_ADD_FLAG_DEFAULT 0
  ------------------
  |  Branch (3732:9): [True: 0, False: 7.25k]
  ------------------
 3733|      0|        ERR_raise(ERR_LIB_X509, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3734|      0|        goto memerr;
 3735|      0|    }
 3736|       |
 3737|       |    /*
 3738|       |     * Still absurdly large, but arithmetically safe, a lower hard upper bound
 3739|       |     * might be reasonable.
 3740|       |     */
 3741|  7.25k|    if (ctx->param->depth > INT_MAX / 2)
  ------------------
  |  Branch (3741:9): [True: 0, False: 7.25k]
  ------------------
 3742|      0|        ctx->param->depth = INT_MAX / 2;
 3743|       |
 3744|       |    /*
 3745|       |     * Try to extend the chain until we reach an ultimately trusted issuer.
 3746|       |     * Build chains up to one longer the limit, later fail if we hit the limit,
 3747|       |     * with an X509_V_ERR_CERT_CHAIN_TOO_LONG error code.
 3748|       |     */
 3749|  7.25k|    max_depth = ctx->param->depth + 1;
 3750|       |
 3751|  7.33k|    while (search != 0) {
  ------------------
  |  Branch (3751:12): [True: 7.33k, False: 0]
  ------------------
 3752|  7.33k|        X509 *curr, *issuer = NULL;
 3753|       |
 3754|  7.33k|        num = sk_X509_num(ctx->chain);
  ------------------
  |  |   82|  7.33k|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
 3755|  7.33k|        ctx->error_depth = num - 1;
 3756|       |        /*
 3757|       |         * Look in the trust store if enabled for first lookup, or we've run
 3758|       |         * out of untrusted issuers and search here is not disabled.  When we
 3759|       |         * reach the depth limit, we stop extending the chain, if by that point
 3760|       |         * we've not found a trust anchor, any trusted chain would be too long.
 3761|       |         *
 3762|       |         * The error reported to the application verify callback is at the
 3763|       |         * maximal valid depth with the current certificate equal to the last
 3764|       |         * not ultimately-trusted issuer.  For example, with verify_depth = 0,
 3765|       |         * the callback will report errors at depth=1 when the immediate issuer
 3766|       |         * of the leaf certificate is not a trust anchor.  No attempt will be
 3767|       |         * made to locate an issuer for that certificate, since such a chain
 3768|       |         * would be a-priori too long.
 3769|       |         */
 3770|  7.33k|        if ((search & S_DOTRUSTED) != 0) {
  ------------------
  |  | 3692|  7.33k|#define S_DOTRUSTED (1 << 1) /* Search trusted store */
  ------------------
  |  Branch (3770:13): [True: 7.33k, False: 0]
  ------------------
 3771|  7.33k|            i = num;
 3772|  7.33k|            if ((search & S_DOALTERNATE) != 0) {
  ------------------
  |  | 3693|  7.33k|#define S_DOALTERNATE (1 << 2) /* Retry with pruned alternate chain */
  ------------------
  |  Branch (3772:17): [True: 0, False: 7.33k]
  ------------------
 3773|       |                /*
 3774|       |                 * As high up the chain as we can, look for an alternative
 3775|       |                 * trusted issuer of an untrusted certificate that currently
 3776|       |                 * has an untrusted issuer.  We use the alt_untrusted variable
 3777|       |                 * to track how far up the chain we find the first match.  It
 3778|       |                 * is only if and when we find a match, that we prune the chain
 3779|       |                 * and reset ctx->num_untrusted to the reduced count of
 3780|       |                 * untrusted certificates.  While we're searching for such a
 3781|       |                 * match (which may never be found), it is neither safe nor
 3782|       |                 * wise to preemptively modify either the chain or
 3783|       |                 * ctx->num_untrusted.
 3784|       |                 *
 3785|       |                 * Note, like ctx->num_untrusted, alt_untrusted is a count of
 3786|       |                 * untrusted certificates, not a "depth".
 3787|       |                 */
 3788|      0|                i = alt_untrusted;
 3789|      0|            }
 3790|  7.33k|            curr = sk_X509_value(ctx->chain, i - 1);
  ------------------
  |  |   83|  7.33k|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
 3791|       |
 3792|       |            /* Note: get1_trusted_issuer() must be used even if self-signed. */
 3793|  7.33k|            ok = num > max_depth ? 0 : get1_trusted_issuer(&issuer, ctx, curr);
  ------------------
  |  Branch (3793:18): [True: 0, False: 7.33k]
  ------------------
 3794|       |
 3795|  7.33k|            if (ok < 0) {
  ------------------
  |  Branch (3795:17): [True: 0, False: 7.33k]
  ------------------
 3796|      0|                trust = -1;
 3797|      0|                ctx->error = X509_V_ERR_STORE_LOOKUP;
  ------------------
  |  |  392|      0|#define X509_V_ERR_STORE_LOOKUP 70
  ------------------
 3798|      0|                break;
 3799|      0|            }
 3800|       |
 3801|  7.33k|            if (ok > 0) {
  ------------------
  |  Branch (3801:17): [True: 3.55k, False: 3.77k]
  ------------------
 3802|  3.55k|                int self_signed = X509_self_signed(curr, 0);
 3803|       |
 3804|  3.55k|                if (self_signed < 0) {
  ------------------
  |  Branch (3804:21): [True: 0, False: 3.55k]
  ------------------
 3805|      0|                    X509_free(issuer);
 3806|      0|                    goto int_err;
 3807|      0|                }
 3808|       |                /*
 3809|       |                 * Alternative trusted issuer for a mid-chain untrusted cert?
 3810|       |                 * Pop the untrusted cert's successors and retry.  We might now
 3811|       |                 * be able to complete a valid chain via the trust store.  Note
 3812|       |                 * that despite the current trust store match we might still
 3813|       |                 * fail complete the chain to a suitable trust anchor, in which
 3814|       |                 * case we may prune some more untrusted certificates and try
 3815|       |                 * again.  Thus the S_DOALTERNATE bit may yet be turned on
 3816|       |                 * again with an even shorter untrusted chain!
 3817|       |                 *
 3818|       |                 * If in the process we threw away our matching PKIX-TA trust
 3819|       |                 * anchor, reset DANE trust.  We might find a suitable trusted
 3820|       |                 * certificate among the ones from the trust store.
 3821|       |                 */
 3822|  3.55k|                if ((search & S_DOALTERNATE) != 0) {
  ------------------
  |  | 3693|  3.55k|#define S_DOALTERNATE (1 << 2) /* Retry with pruned alternate chain */
  ------------------
  |  Branch (3822:21): [True: 0, False: 3.55k]
  ------------------
 3823|      0|                    if (!ossl_assert(num > i && i > 0 && !self_signed)) {
  ------------------
  |  |   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]
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (3823:25): [True: 0, False: 0]
  ------------------
 3824|      0|                        X509_free(issuer);
 3825|      0|                        goto int_err;
 3826|      0|                    }
 3827|      0|                    search &= ~S_DOALTERNATE;
  ------------------
  |  | 3693|      0|#define S_DOALTERNATE (1 << 2) /* Retry with pruned alternate chain */
  ------------------
 3828|      0|                    for (; num > i; --num)
  ------------------
  |  Branch (3828:28): [True: 0, False: 0]
  ------------------
 3829|      0|                        X509_free(sk_X509_pop(ctx->chain));
  ------------------
  |  |   94|      0|#define sk_X509_pop(sk) ((X509 *)OPENSSL_sk_pop(ossl_check_X509_sk_type(sk)))
  ------------------
 3830|      0|                    ctx->num_untrusted = num;
 3831|       |
 3832|      0|                    if (DANETLS_ENABLED(dane) && dane->mdpth >= ctx->num_untrusted) {
  ------------------
  |  |   80|      0|    ((dane) != NULL && sk_danetls_record_num((dane)->trecs) > 0)
  |  |  ------------------
  |  |  |  Branch (80:6): [True: 0, False: 0]
  |  |  |  Branch (80:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3832:50): [True: 0, False: 0]
  ------------------
 3833|      0|                        dane->mdpth = -1;
 3834|      0|                        X509_free(dane->mcert);
 3835|      0|                        dane->mcert = NULL;
 3836|      0|                    }
 3837|      0|                    if (DANETLS_ENABLED(dane) && dane->pdpth >= ctx->num_untrusted)
  ------------------
  |  |   80|      0|    ((dane) != NULL && sk_danetls_record_num((dane)->trecs) > 0)
  |  |  ------------------
  |  |  |  Branch (80:6): [True: 0, False: 0]
  |  |  |  Branch (80:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3837:50): [True: 0, False: 0]
  ------------------
 3838|      0|                        dane->pdpth = -1;
 3839|      0|                }
 3840|       |
 3841|  3.55k|                if (!self_signed) { /* untrusted not self-signed certificate */
  ------------------
  |  Branch (3841:21): [True: 0, False: 3.55k]
  ------------------
 3842|       |                    /* Grow the chain by trusted issuer */
 3843|      0|                    if (!sk_X509_push(ctx->chain, issuer)) {
  ------------------
  |  |   92|      0|#define sk_X509_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_sk_type(sk), ossl_check_X509_type(ptr))
  ------------------
  |  Branch (3843:25): [True: 0, False: 0]
  ------------------
 3844|      0|                        X509_free(issuer);
 3845|      0|                        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3846|      0|                        goto memerr;
 3847|      0|                    }
 3848|      0|                    if ((self_signed = X509_self_signed(issuer, 0)) < 0)
  ------------------
  |  Branch (3848:25): [True: 0, False: 0]
  ------------------
 3849|      0|                        goto int_err;
 3850|  3.55k|                } else {
 3851|       |                    /*
 3852|       |                     * We have a self-signed untrusted cert that has the same
 3853|       |                     * subject name (and perhaps keyid and/or serial number) as
 3854|       |                     * a trust anchor.  We must have an exact match to avoid
 3855|       |                     * possible impersonation via key substitution etc.
 3856|       |                     */
 3857|  3.55k|                    if (X509_cmp(curr, issuer) != 0) {
  ------------------
  |  Branch (3857:25): [True: 0, False: 3.55k]
  ------------------
 3858|       |                        /* Self-signed untrusted mimic. */
 3859|      0|                        X509_free(issuer);
 3860|      0|                        ok = 0;
 3861|  3.55k|                    } else { /* curr "==" issuer */
 3862|       |                        /*
 3863|       |                         * Replace self-signed untrusted certificate
 3864|       |                         * by its trusted matching issuer.
 3865|       |                         */
 3866|  3.55k|                        X509_free(curr);
 3867|  3.55k|                        ctx->num_untrusted = --num;
 3868|  3.55k|                        (void)sk_X509_set(ctx->chain, num, issuer);
  ------------------
  |  |   98|  3.55k|#define sk_X509_set(sk, idx, ptr) ((X509 *)OPENSSL_sk_set(ossl_check_X509_sk_type(sk), (idx), ossl_check_X509_type(ptr)))
  ------------------
 3869|  3.55k|                    }
 3870|  3.55k|                }
 3871|       |
 3872|       |                /*
 3873|       |                 * We've added a new trusted certificate to the chain, re-check
 3874|       |                 * trust.  If not done, and not self-signed look deeper.
 3875|       |                 * Whether or not we're doing "trusted first", we no longer
 3876|       |                 * look for untrusted certificates from the peer's chain.
 3877|       |                 *
 3878|       |                 * At this point ctx->num_trusted and num must reflect the
 3879|       |                 * correct number of untrusted certificates, since the DANE
 3880|       |                 * logic in check_trust() depends on distinguishing CAs from
 3881|       |                 * "the wire" from CAs from the trust store.  In particular, the
 3882|       |                 * certificate at depth "num" should be the new trusted
 3883|       |                 * certificate with ctx->num_untrusted <= num.
 3884|       |                 */
 3885|  3.55k|                if (ok) {
  ------------------
  |  Branch (3885:21): [True: 3.55k, False: 0]
  ------------------
 3886|  3.55k|                    if (!ossl_assert(ctx->num_untrusted <= num))
  ------------------
  |  |   52|  3.55k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  3.55k|    __FILE__, __LINE__)
  ------------------
  |  Branch (3886:25): [True: 0, False: 3.55k]
  ------------------
 3887|      0|                        goto int_err;
 3888|  3.55k|                    search &= ~S_DOUNTRUSTED;
  ------------------
  |  | 3691|  3.55k|#define S_DOUNTRUSTED (1 << 0) /* Search untrusted chain */
  ------------------
 3889|  3.55k|                    trust = check_trust(ctx, num);
 3890|  3.55k|                    if (trust != X509_TRUST_UNTRUSTED)
  ------------------
  |  |  221|  3.55k|#define X509_TRUST_UNTRUSTED 3
  ------------------
  |  Branch (3890:25): [True: 3.55k, False: 0]
  ------------------
 3891|  3.55k|                        break;
 3892|      0|                    if (!self_signed)
  ------------------
  |  Branch (3892:25): [True: 0, False: 0]
  ------------------
 3893|      0|                        continue;
 3894|      0|                }
 3895|  3.55k|            }
 3896|       |
 3897|       |            /*
 3898|       |             * No dispositive decision, and either self-signed or no match, if
 3899|       |             * we were doing untrusted-first, and alt-chains are not disabled,
 3900|       |             * do that, by repeatedly losing one untrusted element at a time,
 3901|       |             * and trying to extend the shorted chain.
 3902|       |             */
 3903|  3.77k|            if ((search & S_DOUNTRUSTED) == 0) {
  ------------------
  |  | 3691|  3.77k|#define S_DOUNTRUSTED (1 << 0) /* Search untrusted chain */
  ------------------
  |  Branch (3903:17): [True: 3.70k, False: 75]
  ------------------
 3904|       |                /* Continue search for a trusted issuer of a shorter chain? */
 3905|  3.70k|                if ((search & S_DOALTERNATE) != 0 && --alt_untrusted > 0)
  ------------------
  |  | 3693|  3.70k|#define S_DOALTERNATE (1 << 2) /* Retry with pruned alternate chain */
  ------------------
  |  Branch (3905:21): [True: 0, False: 3.70k]
  |  Branch (3905:54): [True: 0, False: 0]
  ------------------
 3906|      0|                    continue;
 3907|       |                /* Still no luck and no fallbacks left? */
 3908|  3.70k|                if (!may_alternate || (search & S_DOALTERNATE) != 0 || ctx->num_untrusted < 2)
  ------------------
  |  | 3693|      0|#define S_DOALTERNATE (1 << 2) /* Retry with pruned alternate chain */
  ------------------
  |  Branch (3908:21): [True: 3.70k, False: 0]
  |  Branch (3908:39): [True: 0, False: 0]
  |  Branch (3908:72): [True: 0, False: 0]
  ------------------
 3909|  3.70k|                    break;
 3910|       |                /* Search for a trusted issuer of a shorter chain */
 3911|      0|                search |= S_DOALTERNATE;
  ------------------
  |  | 3693|      0|#define S_DOALTERNATE (1 << 2) /* Retry with pruned alternate chain */
  ------------------
 3912|      0|                alt_untrusted = ctx->num_untrusted - 1;
 3913|      0|            }
 3914|  3.77k|        }
 3915|       |
 3916|       |        /*
 3917|       |         * Try to extend chain with peer-provided untrusted certificate
 3918|       |         */
 3919|     75|        if ((search & S_DOUNTRUSTED) != 0) {
  ------------------
  |  | 3691|     75|#define S_DOUNTRUSTED (1 << 0) /* Search untrusted chain */
  ------------------
  |  Branch (3919:13): [True: 75, False: 0]
  ------------------
 3920|     75|            num = sk_X509_num(ctx->chain);
  ------------------
  |  |   82|     75|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
 3921|     75|            if (!ossl_assert(num == ctx->num_untrusted))
  ------------------
  |  |   52|     75|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|     75|    __FILE__, __LINE__)
  ------------------
  |  Branch (3921:17): [True: 0, False: 75]
  ------------------
 3922|      0|                goto int_err;
 3923|     75|            curr = sk_X509_value(ctx->chain, num - 1);
  ------------------
  |  |   83|     75|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
 3924|     75|            issuer = (X509_self_signed(curr, 0) > 0 || num > max_depth) ? NULL : get0_best_issuer_sk(ctx, 0, 1 /* no_dup */, sk_untrusted, curr);
  ------------------
  |  Branch (3924:23): [True: 75, False: 0]
  |  Branch (3924:56): [True: 0, False: 0]
  ------------------
 3925|     75|            if (issuer == NULL) {
  ------------------
  |  Branch (3925:17): [True: 75, False: 0]
  ------------------
 3926|       |                /*
 3927|       |                 * Once we have reached a self-signed cert or num > max_depth
 3928|       |                 * or can't find an issuer in the untrusted list we stop looking
 3929|       |                 * there and start looking only in the trust store if enabled.
 3930|       |                 */
 3931|     75|                search &= ~S_DOUNTRUSTED;
  ------------------
  |  | 3691|     75|#define S_DOUNTRUSTED (1 << 0) /* Search untrusted chain */
  ------------------
 3932|     75|                if (may_trusted)
  ------------------
  |  Branch (3932:21): [True: 75, False: 0]
  ------------------
 3933|     75|                    search |= S_DOTRUSTED;
  ------------------
  |  | 3692|     75|#define S_DOTRUSTED (1 << 1) /* Search trusted store */
  ------------------
 3934|     75|                continue;
 3935|     75|            }
 3936|       |
 3937|       |            /* Drop this issuer from future consideration */
 3938|      0|            (void)sk_X509_delete_ptr(sk_untrusted, issuer);
  ------------------
  |  |   91|      0|#define sk_X509_delete_ptr(sk, ptr) ((X509 *)OPENSSL_sk_delete_ptr(ossl_check_X509_sk_type(sk), ossl_check_X509_type(ptr)))
  ------------------
 3939|       |
 3940|       |            /* Grow the chain by untrusted issuer */
 3941|      0|            if (!X509_add_cert(ctx->chain, issuer, X509_ADD_FLAG_UP_REF))
  ------------------
  |  | 1000|      0|#define X509_ADD_FLAG_UP_REF 0x1
  ------------------
  |  Branch (3941:17): [True: 0, False: 0]
  ------------------
 3942|      0|                goto int_err;
 3943|       |
 3944|      0|            ++ctx->num_untrusted;
 3945|       |
 3946|       |            /* Check for DANE-TA trust of the topmost untrusted certificate. */
 3947|      0|            trust = check_dane_issuer(ctx, ctx->num_untrusted - 1);
 3948|      0|            if (trust == X509_TRUST_TRUSTED || trust == X509_TRUST_REJECTED)
  ------------------
  |  |  219|      0|#define X509_TRUST_TRUSTED 1
  ------------------
                          if (trust == X509_TRUST_TRUSTED || trust == X509_TRUST_REJECTED)
  ------------------
  |  |  220|      0|#define X509_TRUST_REJECTED 2
  ------------------
  |  Branch (3948:17): [True: 0, False: 0]
  |  Branch (3948:48): [True: 0, False: 0]
  ------------------
 3949|      0|                break;
 3950|      0|        }
 3951|     75|    }
 3952|  7.25k|    sk_X509_free(sk_untrusted);
  ------------------
  |  |   88|  7.25k|#define sk_X509_free(sk) OPENSSL_sk_free(ossl_check_X509_sk_type(sk))
  ------------------
 3953|       |
 3954|  7.25k|    if (trust < 0) /* internal error */
  ------------------
  |  Branch (3954:9): [True: 0, False: 7.25k]
  ------------------
 3955|      0|        return trust;
 3956|       |
 3957|       |    /*
 3958|       |     * Last chance to make a trusted chain, either bare DANE-TA public-key
 3959|       |     * signers, or else direct leaf PKIX trust.
 3960|       |     */
 3961|  7.25k|    num = sk_X509_num(ctx->chain);
  ------------------
  |  |   82|  7.25k|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
 3962|  7.25k|    if (num <= max_depth) {
  ------------------
  |  Branch (3962:9): [True: 7.25k, False: 0]
  ------------------
 3963|  7.25k|        if (trust == X509_TRUST_UNTRUSTED && DANETLS_HAS_DANE_TA(dane))
  ------------------
  |  |  221|  14.5k|#define X509_TRUST_UNTRUSTED 3
  ------------------
                      if (trust == X509_TRUST_UNTRUSTED && DANETLS_HAS_DANE_TA(dane))
  ------------------
  |  |  101|  3.70k|#define DANETLS_HAS_DANE_TA(dane) ((dane) && ((dane)->umask & DANETLS_DANE_TA_MASK))
  |  |  ------------------
  |  |  |  |   86|      0|#define DANETLS_DANE_TA_MASK (DANETLS_USAGE_BIT(DANETLS_USAGE_DANE_TA))
  |  |  |  |  ------------------
  |  |  |  |  |  |   82|      0|#define DANETLS_USAGE_BIT(u) (((uint32_t)1) << u)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (101:36): [True: 0, False: 3.70k]
  |  |  |  Branch (101:46): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3963:13): [True: 3.70k, False: 3.55k]
  ------------------
 3964|      0|            trust = check_dane_pkeys(ctx);
 3965|  7.25k|        if (trust == X509_TRUST_UNTRUSTED && num == ctx->num_untrusted)
  ------------------
  |  |  221|  14.5k|#define X509_TRUST_UNTRUSTED 3
  ------------------
  |  Branch (3965:13): [True: 3.70k, False: 3.55k]
  |  Branch (3965:46): [True: 3.70k, False: 0]
  ------------------
 3966|  3.70k|            trust = check_trust(ctx, num);
 3967|  7.25k|    }
 3968|       |
 3969|  7.25k|    switch (trust) {
 3970|  3.55k|    case X509_TRUST_TRUSTED:
  ------------------
  |  |  219|  3.55k|#define X509_TRUST_TRUSTED 1
  ------------------
  |  Branch (3970:5): [True: 3.55k, False: 3.70k]
  ------------------
 3971|  3.55k|        return 1;
 3972|      0|    case X509_TRUST_REJECTED:
  ------------------
  |  |  220|      0|#define X509_TRUST_REJECTED 2
  ------------------
  |  Branch (3972:5): [True: 0, False: 7.25k]
  ------------------
 3973|       |        /* Callback already issued */
 3974|      0|        return 0;
 3975|  3.70k|    case X509_TRUST_UNTRUSTED:
  ------------------
  |  |  221|  3.70k|#define X509_TRUST_UNTRUSTED 3
  ------------------
  |  Branch (3975:5): [True: 3.70k, False: 3.55k]
  ------------------
 3976|  3.70k|    default:
  ------------------
  |  Branch (3976:5): [True: 0, False: 7.25k]
  ------------------
 3977|  3.70k|        switch (ctx->error) {
 3978|      0|        case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD:
  ------------------
  |  |  325|      0|#define X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD 13
  ------------------
  |  Branch (3978:9): [True: 0, False: 3.70k]
  ------------------
 3979|      0|        case X509_V_ERR_CERT_NOT_YET_VALID:
  ------------------
  |  |  321|      0|#define X509_V_ERR_CERT_NOT_YET_VALID 9
  ------------------
  |  Branch (3979:9): [True: 0, False: 3.70k]
  ------------------
 3980|      0|        case X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD:
  ------------------
  |  |  326|      0|#define X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD 14
  ------------------
  |  Branch (3980:9): [True: 0, False: 3.70k]
  ------------------
 3981|      0|        case X509_V_ERR_CERT_HAS_EXPIRED:
  ------------------
  |  |  322|      0|#define X509_V_ERR_CERT_HAS_EXPIRED 10
  ------------------
  |  Branch (3981:9): [True: 0, False: 3.70k]
  ------------------
 3982|      0|            return 0; /* Callback already done by ossl_x509_check_cert_time() */
 3983|      0|        default: /* A preliminary error has become final */
  ------------------
  |  Branch (3983:9): [True: 0, False: 3.70k]
  ------------------
 3984|      0|            return verify_cb_cert(ctx, NULL, num - 1, ctx->error);
 3985|  3.70k|        case X509_V_OK:
  ------------------
  |  |  312|  3.70k|#define X509_V_OK 0
  ------------------
  |  Branch (3985:9): [True: 3.70k, False: 0]
  ------------------
 3986|  3.70k|            break;
 3987|  3.70k|        }
 3988|  3.70k|        CB_FAIL_IF(num > max_depth,
  ------------------
  |  |  177|  3.70k|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:9): [True: 0, False: 3.70k]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|  3.70k|    return 0
  ------------------
 3989|  3.70k|            ctx, NULL, num - 1, X509_V_ERR_CERT_CHAIN_TOO_LONG);
 3990|  3.70k|        CB_FAIL_IF(DANETLS_ENABLED(dane)
  ------------------
  |  |  177|  7.40k|    if ((cond) && verify_cb_cert(ctx, cert, depth, err) == 0) \
  |  |  ------------------
  |  |  |  Branch (177:10): [True: 0, False: 3.70k]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:10): [True: 0, False: 0]
  |  |  |  Branch (177:19): [True: 0, False: 0]
  |  |  ------------------
  |  |  178|  3.70k|    return 0
  ------------------
 3991|  3.70k|                && (!DANETLS_HAS_PKIX(dane) || dane->pdpth >= 0),
 3992|  3.70k|            ctx, NULL, num - 1, X509_V_ERR_DANE_NO_MATCH);
 3993|  3.70k|        if (X509_self_signed(sk_X509_value(ctx->chain, num - 1), 0) > 0)
  ------------------
  |  |   83|  3.70k|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
  |  Branch (3993:13): [True: 3.70k, False: 0]
  ------------------
 3994|  3.70k|            return verify_cb_cert(ctx, NULL, num - 1,
 3995|  3.70k|                num == 1
  ------------------
  |  Branch (3995:17): [True: 3.70k, False: 0]
  ------------------
 3996|  3.70k|                    ? X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT
  ------------------
  |  |  330|  3.70k|#define X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT 18
  ------------------
 3997|  3.70k|                    : X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN);
  ------------------
  |  |  331|      0|#define X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN 19
  ------------------
 3998|      0|        return verify_cb_cert(ctx, NULL, num - 1,
 3999|      0|            ctx->num_untrusted < num
  ------------------
  |  Branch (3999:13): [True: 0, False: 0]
  ------------------
 4000|      0|                ? X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT
  ------------------
  |  |  314|      0|#define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT 2
  ------------------
 4001|      0|                : X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY);
  ------------------
  |  |  332|      0|#define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY 20
  ------------------
 4002|  7.25k|    }
 4003|       |
 4004|      0|int_err:
 4005|      0|    ERR_raise(ERR_LIB_X509, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4006|      0|    ctx->error = X509_V_ERR_UNSPECIFIED;
  ------------------
  |  |  313|      0|#define X509_V_ERR_UNSPECIFIED 1
  ------------------
 4007|      0|    sk_X509_free(sk_untrusted);
  ------------------
  |  |   88|      0|#define sk_X509_free(sk) OPENSSL_sk_free(ossl_check_X509_sk_type(sk))
  ------------------
 4008|      0|    return -1;
 4009|       |
 4010|      0|memerr:
 4011|      0|    ctx->error = X509_V_ERR_OUT_OF_MEM;
  ------------------
  |  |  329|      0|#define X509_V_ERR_OUT_OF_MEM 17
  ------------------
 4012|      0|    sk_X509_free(sk_untrusted);
  ------------------
  |  |   88|      0|#define sk_X509_free(sk) OPENSSL_sk_free(ossl_check_X509_sk_type(sk))
  ------------------
 4013|      0|    return -1;
 4014|  7.25k|}
x509_vfy.c:get1_trusted_issuer:
 3658|  7.33k|{
 3659|  7.33k|    STACK_OF(X509) *saved_chain = ctx->chain;
  ------------------
  |  |   33|  7.33k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 3660|  7.33k|    int ok;
 3661|       |
 3662|  7.33k|    ctx->chain = NULL;
 3663|  7.33k|    ok = ctx->get_issuer(issuer, ctx, cert);
 3664|  7.33k|    ctx->chain = saved_chain;
 3665|       |
 3666|  7.33k|    return ok;
 3667|  7.33k|}
x509_vfy.c:check_trust:
 1074|  7.25k|{
 1075|  7.25k|    int i, res;
 1076|  7.25k|    X509 *x = NULL;
 1077|  7.25k|    X509 *mx;
 1078|  7.25k|    SSL_DANE *dane = ctx->dane;
 1079|  7.25k|    int num = sk_X509_num(ctx->chain);
  ------------------
  |  |   82|  7.25k|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
 1080|  7.25k|    int trust;
 1081|       |
 1082|       |    /*
 1083|       |     * Check for a DANE issuer at depth 1 or greater, if it is a DANE-TA(2)
 1084|       |     * match, we're done, otherwise we'll merely record the match depth.
 1085|       |     */
 1086|  7.25k|    if (DANETLS_HAS_TA(dane) && num_untrusted > 0 && num_untrusted < num) {
  ------------------
  |  |   96|  14.5k|#define DANETLS_HAS_TA(dane) ((dane) && ((dane)->umask & DANETLS_TA_MASK))
  |  |  ------------------
  |  |  |  |   91|      0|#define DANETLS_TA_MASK (DANETLS_PKIX_TA_MASK | DANETLS_DANE_TA_MASK)
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|      0|#define DANETLS_PKIX_TA_MASK (DANETLS_USAGE_BIT(DANETLS_USAGE_PKIX_TA))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   82|      0|#define DANETLS_USAGE_BIT(u) (((uint32_t)1) << u)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define DANETLS_TA_MASK (DANETLS_PKIX_TA_MASK | DANETLS_DANE_TA_MASK)
  |  |  |  |  ------------------
  |  |  |  |  |  |   86|      0|#define DANETLS_DANE_TA_MASK (DANETLS_USAGE_BIT(DANETLS_USAGE_DANE_TA))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   82|      0|#define DANETLS_USAGE_BIT(u) (((uint32_t)1) << u)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:31): [True: 0, False: 7.25k]
  |  |  |  Branch (96:41): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1086:33): [True: 0, False: 0]
  |  Branch (1086:54): [True: 0, False: 0]
  ------------------
 1087|      0|        trust = check_dane_issuer(ctx, num_untrusted);
 1088|      0|        if (trust != X509_TRUST_UNTRUSTED)
  ------------------
  |  |  221|      0|#define X509_TRUST_UNTRUSTED 3
  ------------------
  |  Branch (1088:13): [True: 0, False: 0]
  ------------------
 1089|      0|            return trust;
 1090|      0|    }
 1091|       |
 1092|       |    /*
 1093|       |     * Check trusted certificates in chain at depth num_untrusted and up.
 1094|       |     * Note, that depths 0..num_untrusted-1 may also contain trusted
 1095|       |     * certificates, but the caller is expected to have already checked those,
 1096|       |     * and wants to incrementally check just any added since.
 1097|       |     */
 1098|  7.25k|    for (i = num_untrusted; i < num; i++) {
  ------------------
  |  Branch (1098:29): [True: 3.55k, False: 3.70k]
  ------------------
 1099|  3.55k|        x = sk_X509_value(ctx->chain, i);
  ------------------
  |  |   83|  3.55k|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
 1100|  3.55k|        trust = X509_check_trust(x, ctx->param->trust, 0);
 1101|       |        /* If explicitly trusted (so not neutral nor rejected) return trusted */
 1102|  3.55k|        if (trust == X509_TRUST_TRUSTED)
  ------------------
  |  |  219|  3.55k|#define X509_TRUST_TRUSTED 1
  ------------------
  |  Branch (1102:13): [True: 3.55k, False: 0]
  ------------------
 1103|  3.55k|            goto trusted;
 1104|      0|        if (trust == X509_TRUST_REJECTED)
  ------------------
  |  |  220|      0|#define X509_TRUST_REJECTED 2
  ------------------
  |  Branch (1104:13): [True: 0, False: 0]
  ------------------
 1105|      0|            goto rejected;
 1106|      0|    }
 1107|       |
 1108|       |    /*
 1109|       |     * If we are looking at a trusted certificate, and accept partial chains,
 1110|       |     * the chain is PKIX trusted.
 1111|       |     */
 1112|  3.70k|    if (num_untrusted < num) {
  ------------------
  |  Branch (1112:9): [True: 0, False: 3.70k]
  ------------------
 1113|      0|        if ((ctx->param->flags & X509_V_FLAG_PARTIAL_CHAIN) != 0)
  ------------------
  |  |  478|      0|#define X509_V_FLAG_PARTIAL_CHAIN 0x80000
  ------------------
  |  Branch (1113:13): [True: 0, False: 0]
  ------------------
 1114|      0|            goto trusted;
 1115|      0|        return X509_TRUST_UNTRUSTED;
  ------------------
  |  |  221|      0|#define X509_TRUST_UNTRUSTED 3
  ------------------
 1116|      0|    }
 1117|       |
 1118|  3.70k|    if (num_untrusted == num
  ------------------
  |  Branch (1118:9): [True: 3.70k, False: 0]
  ------------------
 1119|  3.70k|        && (ctx->param->flags & X509_V_FLAG_PARTIAL_CHAIN) != 0) {
  ------------------
  |  |  478|  3.70k|#define X509_V_FLAG_PARTIAL_CHAIN 0x80000
  ------------------
  |  Branch (1119:12): [True: 0, False: 3.70k]
  ------------------
 1120|       |        /*
 1121|       |         * Last-resort call with no new trusted certificates, check the leaf
 1122|       |         * for a direct trust store match.
 1123|       |         */
 1124|      0|        i = 0;
 1125|      0|        x = sk_X509_value(ctx->chain, i);
  ------------------
  |  |   83|      0|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
 1126|      0|        res = lookup_cert_match(&mx, ctx, x);
 1127|      0|        if (res < 0)
  ------------------
  |  Branch (1127:13): [True: 0, False: 0]
  ------------------
 1128|      0|            return res;
 1129|      0|        if (res == 0)
  ------------------
  |  Branch (1129:13): [True: 0, False: 0]
  ------------------
 1130|      0|            return X509_TRUST_UNTRUSTED;
  ------------------
  |  |  221|      0|#define X509_TRUST_UNTRUSTED 3
  ------------------
 1131|       |
 1132|       |        /*
 1133|       |         * Check explicit auxiliary trust/reject settings.  If none are set,
 1134|       |         * we'll accept X509_TRUST_UNTRUSTED when not self-signed.
 1135|       |         */
 1136|      0|        trust = X509_check_trust(mx, ctx->param->trust, 0);
 1137|      0|        if (trust == X509_TRUST_REJECTED) {
  ------------------
  |  |  220|      0|#define X509_TRUST_REJECTED 2
  ------------------
  |  Branch (1137:13): [True: 0, False: 0]
  ------------------
 1138|      0|            X509_free(mx);
 1139|      0|            goto rejected;
 1140|      0|        }
 1141|       |
 1142|       |        /* Replace leaf with trusted match */
 1143|      0|        (void)sk_X509_set(ctx->chain, 0, mx);
  ------------------
  |  |   98|      0|#define sk_X509_set(sk, idx, ptr) ((X509 *)OPENSSL_sk_set(ossl_check_X509_sk_type(sk), (idx), ossl_check_X509_type(ptr)))
  ------------------
 1144|      0|        X509_free(x);
 1145|      0|        ctx->num_untrusted = 0;
 1146|      0|        goto trusted;
 1147|      0|    }
 1148|       |
 1149|       |    /*
 1150|       |     * If no trusted certs in chain at all return untrusted and allow
 1151|       |     * standard (no issuer cert) etc errors to be indicated.
 1152|       |     */
 1153|  3.70k|    return X509_TRUST_UNTRUSTED;
  ------------------
  |  |  221|  3.70k|#define X509_TRUST_UNTRUSTED 3
  ------------------
 1154|       |
 1155|      0|rejected:
 1156|      0|    return verify_cb_cert(ctx, x, i, X509_V_ERR_CERT_REJECTED) == 0
  ------------------
  |  |  340|      0|#define X509_V_ERR_CERT_REJECTED 28
  ------------------
  |  Branch (1156:12): [True: 0, False: 0]
  ------------------
 1157|      0|        ? X509_TRUST_REJECTED
  ------------------
  |  |  220|      0|#define X509_TRUST_REJECTED 2
  ------------------
 1158|      0|        : X509_TRUST_UNTRUSTED;
  ------------------
  |  |  221|      0|#define X509_TRUST_UNTRUSTED 3
  ------------------
 1159|       |
 1160|  3.55k|trusted:
 1161|  3.55k|    if (!DANETLS_ENABLED(dane))
  ------------------
  |  |   80|  3.55k|    ((dane) != NULL && sk_danetls_record_num((dane)->trecs) > 0)
  |  |  ------------------
  |  |  |  Branch (80:6): [True: 0, False: 3.55k]
  |  |  |  Branch (80:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1162|  3.55k|        return X509_TRUST_TRUSTED;
  ------------------
  |  |  219|  3.55k|#define X509_TRUST_TRUSTED 1
  ------------------
 1163|      0|    if (dane->pdpth < 0)
  ------------------
  |  Branch (1163:9): [True: 0, False: 0]
  ------------------
 1164|      0|        dane->pdpth = num_untrusted;
 1165|       |    /* With DANE, PKIX alone is not trusted until we have both */
 1166|      0|    if (dane->mdpth >= 0)
  ------------------
  |  Branch (1166:9): [True: 0, False: 0]
  ------------------
 1167|      0|        return X509_TRUST_TRUSTED;
  ------------------
  |  |  219|      0|#define X509_TRUST_TRUSTED 1
  ------------------
 1168|      0|    return X509_TRUST_UNTRUSTED;
  ------------------
  |  |  221|      0|#define X509_TRUST_UNTRUSTED 3
  ------------------
 1169|      0|}

X509_VERIFY_PARAM_new:
  353|  29.2k|{
  354|  29.2k|    X509_VERIFY_PARAM *param;
  355|       |
  356|  29.2k|    param = OPENSSL_zalloc(sizeof(*param));
  ------------------
  |  |  109|  29.2k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  357|  29.2k|    if (param == NULL)
  ------------------
  |  Branch (357:9): [True: 0, False: 29.2k]
  ------------------
  358|      0|        return NULL;
  359|  29.2k|    param->trust = X509_TRUST_DEFAULT;
  ------------------
  |  |  195|  29.2k|#define X509_TRUST_DEFAULT 0 /* Only valid in purpose settings */
  ------------------
  360|       |    /* param->inh_flags = X509_VP_FLAG_DEFAULT; */
  361|  29.2k|    param->depth = -1;
  362|  29.2k|    param->auth_level = -1; /* -1 means unset, 0 is explicit */
  363|  29.2k|    return param;
  364|  29.2k|}
X509_VERIFY_PARAM_free:
  367|  29.2k|{
  368|  29.2k|    if (param == NULL)
  ------------------
  |  Branch (368:9): [True: 0, False: 29.2k]
  ------------------
  369|      0|        return;
  370|  29.2k|    sk_ASN1_OBJECT_pop_free(param->policies, ASN1_OBJECT_free);
  ------------------
  |  |  602|  29.2k|#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))
  ------------------
  371|  29.2k|    clear_buffer_stack(&param->hosts);
  372|  29.2k|    clear_buffer_stack(&param->ips);
  373|  29.2k|    clear_buffer_stack(&param->rfc822s);
  374|  29.2k|    clear_buffer_stack(&param->smtputf8s);
  375|  29.2k|    OPENSSL_free(param->peername);
  ------------------
  |  |  132|  29.2k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  376|  29.2k|    OPENSSL_free(param);
  ------------------
  |  |  132|  29.2k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  377|  29.2k|}
X509_VERIFY_PARAM_inherit:
  424|  29.0k|{
  425|  29.0k|    unsigned long inh_flags;
  426|  29.0k|    int to_default, to_overwrite;
  427|       |
  428|  29.0k|    if (src == NULL)
  ------------------
  |  Branch (428:9): [True: 0, False: 29.0k]
  ------------------
  429|      0|        return 1;
  430|  29.0k|    inh_flags = dest->inh_flags | src->inh_flags;
  431|       |
  432|  29.0k|    if ((inh_flags & X509_VP_FLAG_ONCE) != 0)
  ------------------
  |  |  497|  29.0k|#define X509_VP_FLAG_ONCE 0x10
  ------------------
  |  Branch (432:9): [True: 0, False: 29.0k]
  ------------------
  433|      0|        dest->inh_flags = 0;
  434|       |
  435|  29.0k|    if ((inh_flags & X509_VP_FLAG_LOCKED) != 0)
  ------------------
  |  |  496|  29.0k|#define X509_VP_FLAG_LOCKED 0x8
  ------------------
  |  Branch (435:9): [True: 0, False: 29.0k]
  ------------------
  436|      0|        return 1;
  437|       |
  438|  29.0k|    to_default = (inh_flags & X509_VP_FLAG_DEFAULT) != 0;
  ------------------
  |  |  493|  29.0k|#define X509_VP_FLAG_DEFAULT 0x1
  ------------------
  439|  29.0k|    to_overwrite = (inh_flags & X509_VP_FLAG_OVERWRITE) != 0;
  ------------------
  |  |  494|  29.0k|#define X509_VP_FLAG_OVERWRITE 0x2
  ------------------
  440|       |
  441|  29.0k|    x509_verify_param_copy(purpose, 0);
  ------------------
  |  |  419|  29.0k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  414|  29.0k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (414:6): [True: 0, False: 29.0k]
  |  |  |  |  |  Branch (414:23): [True: 3.62k, False: 25.4k]
  |  |  |  |  |  Branch (414:45): [True: 0, False: 3.62k]
  |  |  |  |  |  Branch (414:59): [True: 3.62k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  420|  29.0k|        dest->field = src->field;
  ------------------
  442|  29.0k|    x509_verify_param_copy(trust, X509_TRUST_DEFAULT);
  ------------------
  |  |  419|  29.0k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  414|  29.0k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (414:6): [True: 0, False: 29.0k]
  |  |  |  |  |  Branch (414:23): [True: 3.62k, False: 25.4k]
  |  |  |  |  |  Branch (414:45): [True: 0, False: 3.62k]
  |  |  |  |  |  Branch (414:59): [True: 3.62k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  420|  29.0k|        dest->field = src->field;
  ------------------
  443|  29.0k|    x509_verify_param_copy(depth, -1);
  ------------------
  |  |  419|  29.0k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  414|  29.0k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (414:6): [True: 0, False: 29.0k]
  |  |  |  |  |  Branch (414:23): [True: 7.25k, False: 21.7k]
  |  |  |  |  |  Branch (414:45): [True: 0, False: 7.25k]
  |  |  |  |  |  Branch (414:59): [True: 7.25k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  420|  29.0k|        dest->field = src->field;
  ------------------
  444|  29.0k|    x509_verify_param_copy(auth_level, -1);
  ------------------
  |  |  419|  29.0k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  414|  29.0k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (414:6): [True: 0, False: 29.0k]
  |  |  |  |  |  Branch (414:23): [True: 0, False: 29.0k]
  |  |  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  420|  29.0k|        dest->field = src->field;
  ------------------
  445|       |
  446|       |    /* If overwrite or check time not set, copy across */
  447|       |
  448|  29.0k|    if (to_overwrite || (dest->flags & X509_V_FLAG_USE_CHECK_TIME) == 0) {
  ------------------
  |  |  442|  29.0k|#define X509_V_FLAG_USE_CHECK_TIME 0x2
  ------------------
  |  Branch (448:9): [True: 0, False: 29.0k]
  |  Branch (448:25): [True: 29.0k, False: 0]
  ------------------
  449|  29.0k|        dest->check_time = src->check_time;
  450|  29.0k|        dest->flags &= ~X509_V_FLAG_USE_CHECK_TIME;
  ------------------
  |  |  442|  29.0k|#define X509_V_FLAG_USE_CHECK_TIME 0x2
  ------------------
  451|       |        /* Don't need to copy flag: that is done below */
  452|  29.0k|    }
  453|       |
  454|  29.0k|    if ((inh_flags & X509_VP_FLAG_RESET_FLAGS) != 0)
  ------------------
  |  |  495|  29.0k|#define X509_VP_FLAG_RESET_FLAGS 0x4
  ------------------
  |  Branch (454:9): [True: 0, False: 29.0k]
  ------------------
  455|      0|        dest->flags = 0;
  456|       |
  457|  29.0k|    dest->flags |= src->flags;
  458|       |
  459|  29.0k|    if (test_x509_verify_param_copy(policies, NULL)) {
  ------------------
  |  |  414|  29.0k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  ------------------
  |  |  |  Branch (414:6): [True: 0, False: 29.0k]
  |  |  |  Branch (414:23): [True: 0, False: 29.0k]
  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  460|      0|        if (!X509_VERIFY_PARAM_set1_policies(dest, src->policies))
  ------------------
  |  Branch (460:13): [True: 0, False: 0]
  ------------------
  461|      0|            return 0;
  462|      0|    }
  463|       |
  464|  29.0k|    x509_verify_param_copy(hostflags, 0);
  ------------------
  |  |  419|  29.0k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  414|  29.0k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (414:6): [True: 0, False: 29.0k]
  |  |  |  |  |  Branch (414:23): [True: 0, False: 29.0k]
  |  |  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  420|  29.0k|        dest->field = src->field;
  ------------------
  465|       |
  466|  29.0k|    if (test_x509_verify_param_copy(hosts, NULL)) {
  ------------------
  |  |  414|  29.0k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  ------------------
  |  |  |  Branch (414:6): [True: 0, False: 29.0k]
  |  |  |  Branch (414:23): [True: 0, False: 29.0k]
  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  467|      0|        if (!replace_buffer_stack(&dest->hosts, &src->hosts))
  ------------------
  |  Branch (467:13): [True: 0, False: 0]
  ------------------
  468|      0|            return 0;
  469|      0|    }
  470|  29.0k|    x509_verify_param_copy(validate_host, NULL);
  ------------------
  |  |  419|  29.0k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  414|  29.0k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (414:6): [True: 0, False: 29.0k]
  |  |  |  |  |  Branch (414:23): [True: 0, False: 29.0k]
  |  |  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  420|  29.0k|        dest->field = src->field;
  ------------------
  471|       |
  472|  29.0k|    if (test_x509_verify_param_copy(ips, NULL)) {
  ------------------
  |  |  414|  29.0k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  ------------------
  |  |  |  Branch (414:6): [True: 0, False: 29.0k]
  |  |  |  Branch (414:23): [True: 0, False: 29.0k]
  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  473|      0|        if (!replace_buffer_stack(&dest->ips, &src->ips))
  ------------------
  |  Branch (473:13): [True: 0, False: 0]
  ------------------
  474|      0|            return 0;
  475|      0|    }
  476|  29.0k|    x509_verify_param_copy(validate_ip, NULL);
  ------------------
  |  |  419|  29.0k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  414|  29.0k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (414:6): [True: 0, False: 29.0k]
  |  |  |  |  |  Branch (414:23): [True: 0, False: 29.0k]
  |  |  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  420|  29.0k|        dest->field = src->field;
  ------------------
  477|       |
  478|  29.0k|    if (test_x509_verify_param_copy(rfc822s, NULL)) {
  ------------------
  |  |  414|  29.0k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  ------------------
  |  |  |  Branch (414:6): [True: 0, False: 29.0k]
  |  |  |  Branch (414:23): [True: 0, False: 29.0k]
  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  479|      0|        if (!replace_buffer_stack(&dest->rfc822s, &src->rfc822s))
  ------------------
  |  Branch (479:13): [True: 0, False: 0]
  ------------------
  480|      0|            return 0;
  481|      0|    }
  482|  29.0k|    x509_verify_param_copy(validate_rfc822, NULL);
  ------------------
  |  |  419|  29.0k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  414|  29.0k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (414:6): [True: 0, False: 29.0k]
  |  |  |  |  |  Branch (414:23): [True: 0, False: 29.0k]
  |  |  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  420|  29.0k|        dest->field = src->field;
  ------------------
  483|       |
  484|  29.0k|    if (test_x509_verify_param_copy(smtputf8s, NULL)) {
  ------------------
  |  |  414|  29.0k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  ------------------
  |  |  |  Branch (414:6): [True: 0, False: 29.0k]
  |  |  |  Branch (414:23): [True: 0, False: 29.0k]
  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  485|      0|        if (!replace_buffer_stack(&dest->smtputf8s, &src->smtputf8s))
  ------------------
  |  Branch (485:13): [True: 0, False: 0]
  ------------------
  486|      0|            return 0;
  487|      0|    }
  488|  29.0k|    x509_verify_param_copy(validate_smtputf8, NULL);
  ------------------
  |  |  419|  29.0k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  414|  29.0k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (414:6): [True: 0, False: 29.0k]
  |  |  |  |  |  Branch (414:23): [True: 0, False: 29.0k]
  |  |  |  |  |  Branch (414:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (414:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  420|  29.0k|        dest->field = src->field;
  ------------------
  489|       |
  490|  29.0k|    return 1;
  491|  29.0k|}
X509_VERIFY_PARAM_set1:
  495|  3.62k|{
  496|  3.62k|    unsigned long save_flags;
  497|  3.62k|    int ret;
  498|       |
  499|  3.62k|    if (to == NULL) {
  ------------------
  |  Branch (499:9): [True: 0, False: 3.62k]
  ------------------
  500|      0|        ERR_raise(ERR_LIB_X509, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  501|      0|        return 0;
  502|      0|    }
  503|  3.62k|    save_flags = to->inh_flags;
  504|  3.62k|    to->inh_flags |= X509_VP_FLAG_DEFAULT;
  ------------------
  |  |  493|  3.62k|#define X509_VP_FLAG_DEFAULT 0x1
  ------------------
  505|  3.62k|    ret = X509_VERIFY_PARAM_inherit(to, from);
  506|  3.62k|    to->inh_flags = save_flags;
  507|  3.62k|    return ret;
  508|  3.62k|}
X509_VERIFY_PARAM_set_flags:
  518|  7.18k|{
  519|  7.18k|    param->flags |= flags;
  520|  7.18k|    if ((flags & X509_V_FLAG_POLICY_MASK) != 0)
  ------------------
  |  |  500|  7.18k|#define X509_V_FLAG_POLICY_MASK (X509_V_FLAG_POLICY_CHECK \
  |  |  ------------------
  |  |  |  |  454|  7.18k|#define X509_V_FLAG_POLICY_CHECK 0x80
  |  |  ------------------
  |  |  501|  7.18k|    | X509_V_FLAG_EXPLICIT_POLICY                         \
  |  |  ------------------
  |  |  |  |  456|  7.18k|#define X509_V_FLAG_EXPLICIT_POLICY 0x100
  |  |  ------------------
  |  |  502|  7.18k|    | X509_V_FLAG_INHIBIT_ANY                             \
  |  |  ------------------
  |  |  |  |  458|  7.18k|#define X509_V_FLAG_INHIBIT_ANY 0x200
  |  |  ------------------
  |  |  503|  7.18k|    | X509_V_FLAG_INHIBIT_MAP)
  |  |  ------------------
  |  |  |  |  460|  7.18k|#define X509_V_FLAG_INHIBIT_MAP 0x400
  |  |  ------------------
  ------------------
  |  Branch (520:9): [True: 0, False: 7.18k]
  ------------------
  521|      0|        param->flags |= X509_V_FLAG_POLICY_CHECK;
  ------------------
  |  |  454|      0|#define X509_V_FLAG_POLICY_CHECK 0x80
  ------------------
  522|  7.18k|    return 1;
  523|  7.18k|}
X509_VERIFY_PARAM_set_auth_level:
  570|  3.62k|{
  571|  3.62k|    param->auth_level = auth_level;
  572|  3.62k|}
X509_VERIFY_PARAM_move_peername:
  831|  18.1k|{
  832|  18.1k|    char *peername = (from != NULL) ? from->peername : NULL;
  ------------------
  |  Branch (832:22): [True: 3.62k, False: 14.5k]
  ------------------
  833|       |
  834|  18.1k|    if (to->peername != peername) {
  ------------------
  |  Branch (834:9): [True: 0, False: 18.1k]
  ------------------
  835|      0|        OPENSSL_free(to->peername);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  836|      0|        to->peername = peername;
  837|      0|    }
  838|  18.1k|    if (from != NULL)
  ------------------
  |  Branch (838:9): [True: 3.62k, False: 14.5k]
  ------------------
  839|  3.62k|        from->peername = NULL;
  840|  18.1k|}
X509_VERIFY_PARAM_lookup:
 1021|  10.8k|{
 1022|  10.8k|    int idx;
 1023|  10.8k|    X509_VERIFY_PARAM pm;
 1024|       |
 1025|  10.8k|    pm.name = (char *)name;
 1026|  10.8k|    if (param_table != NULL) {
  ------------------
  |  Branch (1026:9): [True: 0, False: 10.8k]
  ------------------
 1027|       |        /* Ideally, this would be done under a lock */
 1028|      0|        sk_X509_VERIFY_PARAM_sort(param_table);
  ------------------
  |  |  147|      0|#define sk_X509_VERIFY_PARAM_sort(sk) OPENSSL_sk_sort(ossl_check_X509_VERIFY_PARAM_sk_type(sk))
  ------------------
 1029|      0|        idx = sk_X509_VERIFY_PARAM_find(param_table, &pm);
  ------------------
  |  |  144|      0|#define sk_X509_VERIFY_PARAM_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509_VERIFY_PARAM_sk_type(sk), ossl_check_X509_VERIFY_PARAM_type(ptr))
  ------------------
 1030|      0|        if (idx >= 0)
  ------------------
  |  Branch (1030:13): [True: 0, False: 0]
  ------------------
 1031|      0|            return sk_X509_VERIFY_PARAM_value(param_table, idx);
  ------------------
  |  |  128|      0|#define sk_X509_VERIFY_PARAM_value(sk, idx) ((X509_VERIFY_PARAM *)OPENSSL_sk_value(ossl_check_const_X509_VERIFY_PARAM_sk_type(sk), (idx)))
  ------------------
 1032|      0|    }
 1033|  10.8k|    return OBJ_bsearch_table(&pm, default_table, OSSL_NELEM(default_table));
  ------------------
  |  |   14|  10.8k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 1034|  10.8k|}
x509_vpm.c:clear_buffer_stack:
  117|   116k|{
  118|   116k|    sk_X509_BUFFER_pop_free(*buffer_stack, buffer_free);
  119|       |    *buffer_stack = NULL;
  120|   116k|}
x509_vpm.c:table_cmp:
  962|  21.7k|{
  963|  21.7k|    return strcmp(a->name, b->name);
  964|  21.7k|}

X509_NAME_entry_count:
   56|     20|{
   57|     20|    int ret;
   58|       |
   59|     20|    if (name == NULL)
  ------------------
  |  Branch (59:9): [True: 0, False: 20]
  ------------------
   60|      0|        return 0;
   61|     20|    ret = sk_X509_NAME_ENTRY_num(name->entries);
  ------------------
  |  |  209|     20|#define sk_X509_NAME_ENTRY_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_ENTRY_sk_type(sk))
  ------------------
   62|     20|    return ret > 0 ? ret : 0;
  ------------------
  |  Branch (62:12): [True: 20, False: 0]
  ------------------
   63|     20|}
X509_NAME_get_index_by_NID:
   66|  7.25k|{
   67|  7.25k|    ASN1_OBJECT *obj;
   68|       |
   69|  7.25k|    obj = OBJ_nid2obj(nid);
   70|  7.25k|    if (obj == NULL)
  ------------------
  |  Branch (70:9): [True: 0, False: 7.25k]
  ------------------
   71|      0|        return -2;
   72|  7.25k|    return X509_NAME_get_index_by_OBJ(name, obj, lastpos);
   73|  7.25k|}
X509_NAME_get_index_by_OBJ:
   78|  7.25k|{
   79|  7.25k|    int n;
   80|  7.25k|    X509_NAME_ENTRY *ne;
   81|  7.25k|    STACK_OF(X509_NAME_ENTRY) *sk;
  ------------------
  |  |   33|  7.25k|#define STACK_OF(type) struct stack_st_##type
  ------------------
   82|       |
   83|  7.25k|    if (name == NULL)
  ------------------
  |  Branch (83:9): [True: 0, False: 7.25k]
  ------------------
   84|      0|        return -1;
   85|  7.25k|    if (lastpos < 0)
  ------------------
  |  Branch (85:9): [True: 3.62k, False: 3.62k]
  ------------------
   86|  3.62k|        lastpos = -1;
   87|  7.25k|    sk = name->entries;
   88|  7.25k|    n = sk_X509_NAME_ENTRY_num(sk);
  ------------------
  |  |  209|  7.25k|#define sk_X509_NAME_ENTRY_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_ENTRY_sk_type(sk))
  ------------------
   89|  7.25k|    for (lastpos++; lastpos < n; lastpos++) {
  ------------------
  |  Branch (89:21): [True: 3.62k, False: 3.62k]
  ------------------
   90|  3.62k|        ne = sk_X509_NAME_ENTRY_value(sk, lastpos);
  ------------------
  |  |  210|  3.62k|#define sk_X509_NAME_ENTRY_value(sk, idx) ((X509_NAME_ENTRY *)OPENSSL_sk_value(ossl_check_const_X509_NAME_ENTRY_sk_type(sk), (idx)))
  ------------------
   91|  3.62k|        if (OBJ_cmp(ne->object, obj) == 0)
  ------------------
  |  Branch (91:13): [True: 3.62k, False: 0]
  ------------------
   92|  3.62k|            return lastpos;
   93|  3.62k|    }
   94|  3.62k|    return -1;
   95|  7.25k|}
X509_NAME_get_entry:
   98|  3.64k|{
   99|  3.64k|    if (name == NULL || sk_X509_NAME_ENTRY_num(name->entries) <= loc
  ------------------
  |  |  209|  3.64k|#define sk_X509_NAME_ENTRY_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_ENTRY_sk_type(sk))
  ------------------
  |  Branch (99:9): [True: 0, False: 3.64k]
  |  Branch (99:25): [True: 0, False: 3.64k]
  ------------------
  100|  3.64k|        || loc < 0)
  ------------------
  |  Branch (100:12): [True: 0, False: 3.64k]
  ------------------
  101|      0|        return NULL;
  102|       |
  103|  3.64k|    return sk_X509_NAME_ENTRY_value(name->entries, loc);
  ------------------
  |  |  210|  3.64k|#define sk_X509_NAME_ENTRY_value(sk, idx) ((X509_NAME_ENTRY *)OPENSSL_sk_value(ossl_check_const_X509_NAME_ENTRY_sk_type(sk), (idx)))
  ------------------
  104|  3.64k|}
X509_NAME_ENTRY_get_object:
  350|     20|{
  351|     20|    if (ne == NULL)
  ------------------
  |  Branch (351:9): [True: 0, False: 20]
  ------------------
  352|      0|        return NULL;
  353|     20|    return ne->object;
  354|     20|}
X509_NAME_ENTRY_get_data:
  357|  3.64k|{
  358|  3.64k|    if (ne == NULL)
  ------------------
  |  Branch (358:9): [True: 0, False: 3.64k]
  ------------------
  359|      0|        return NULL;
  360|  3.64k|    return ne->value;
  361|  3.64k|}
X509_NAME_ENTRY_set:
  364|     20|{
  365|     20|    return ne->set;
  366|     20|}

X509_digest:
  540|  10.8k|{
  541|  10.8k|    if (EVP_MD_is_a(md, SN_sha1) && (cert->ex_flags & EXFLAG_SET) != 0
  ------------------
  |  | 2346|  10.8k|#define SN_sha1         "SHA1"
  ------------------
                  if (EVP_MD_is_a(md, SN_sha1) && (cert->ex_flags & EXFLAG_SET) != 0
  ------------------
  |  |  678|  10.8k|#define EXFLAG_SET 0x100
  ------------------
  |  Branch (541:9): [True: 10.8k, False: 0]
  |  Branch (541:37): [True: 0, False: 10.8k]
  ------------------
  542|      0|        && (cert->ex_flags & EXFLAG_NO_FINGERPRINT) == 0) {
  ------------------
  |  |  686|      0|#define EXFLAG_NO_FINGERPRINT 0x100000
  ------------------
  |  Branch (542:12): [True: 0, False: 0]
  ------------------
  543|       |        /* Asking for SHA1 and we already computed it. */
  544|      0|        if (len != NULL)
  ------------------
  |  Branch (544:13): [True: 0, False: 0]
  ------------------
  545|      0|            *len = sizeof(cert->sha1_hash);
  546|      0|        memcpy(data, cert->sha1_hash, sizeof(cert->sha1_hash));
  547|      0|        return 1;
  548|      0|    }
  549|  10.8k|    return ossl_asn1_item_digest_ex(ASN1_ITEM_rptr(X509), md, (char *)cert,
  ------------------
  |  |  399|  10.8k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  550|  10.8k|        data, len, cert->libctx, cert->propq);
  551|  10.8k|}

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

ossl_d2i_X509_PUBKEY_INTERNAL:
   68|  10.9k|{
   69|  10.9k|    X509_PUBKEY *xpub = OPENSSL_zalloc(sizeof(*xpub));
  ------------------
  |  |  109|  10.9k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   70|       |
   71|  10.9k|    if (xpub == NULL)
  ------------------
  |  Branch (71:9): [True: 0, False: 10.9k]
  ------------------
   72|      0|        return NULL;
   73|  10.9k|    return (X509_PUBKEY *)ASN1_item_d2i_ex((ASN1_VALUE **)&xpub, pp, len,
   74|  10.9k|        ASN1_ITEM_rptr(X509_PUBKEY_INTERNAL),
  ------------------
  |  |  399|  10.9k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
   75|  10.9k|        libctx, propq);
   76|  10.9k|}
ossl_X509_PUBKEY_INTERNAL_free:
   79|  21.8k|{
   80|  21.8k|    ASN1_item_free((ASN1_VALUE *)xpub, ASN1_ITEM_rptr(X509_PUBKEY_INTERNAL));
  ------------------
  |  |  399|  21.8k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
   81|  21.8k|}
X509_PUBKEY_get0:
  446|  76.5k|{
  447|  76.5k|    if (key == NULL) {
  ------------------
  |  Branch (447:9): [True: 0, False: 76.5k]
  ------------------
  448|      0|        ERR_raise(ERR_LIB_X509, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  449|      0|        return NULL;
  450|      0|    }
  451|       |
  452|  76.5k|    if (key->pkey == NULL) {
  ------------------
  |  Branch (452:9): [True: 0, False: 76.5k]
  ------------------
  453|       |        /* We failed to decode the key when we loaded it, or it was never set */
  454|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_DECODE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  455|      0|        return NULL;
  456|      0|    }
  457|       |
  458|  76.5k|    return key->pkey;
  459|  76.5k|}
X509_PUBKEY_get:
  462|  10.9k|{
  463|  10.9k|    EVP_PKEY *ret = X509_PUBKEY_get0(key);
  464|       |
  465|  10.9k|    if (ret != NULL && !EVP_PKEY_up_ref(ret)) {
  ------------------
  |  Branch (465:9): [True: 10.9k, False: 0]
  |  Branch (465:24): [True: 0, False: 10.9k]
  ------------------
  466|      0|        ERR_raise(ERR_LIB_X509, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  467|       |        ret = NULL;
  468|      0|    }
  469|  10.9k|    return ret;
  470|  10.9k|}
ossl_d2i_PUBKEY_legacy:
  525|  10.9k|{
  526|  10.9k|    return d2i_PUBKEY_int(a, pp, length, NULL, NULL, 1, d2i_X509_PUBKEY);
  527|  10.9k|}
d2i_EC_PUBKEY:
  785|  10.9k|{
  786|  10.9k|    EVP_PKEY *pkey;
  787|  10.9k|    EC_KEY *key = NULL;
  788|  10.9k|    const unsigned char *q;
  789|  10.9k|    int type;
  790|       |
  791|  10.9k|    q = *pp;
  792|  10.9k|    pkey = ossl_d2i_PUBKEY_legacy(NULL, &q, length);
  793|  10.9k|    if (pkey == NULL)
  ------------------
  |  Branch (793:9): [True: 0, False: 10.9k]
  ------------------
  794|      0|        return NULL;
  795|  10.9k|    type = EVP_PKEY_get_id(pkey);
  796|  10.9k|    if (type == EVP_PKEY_EC || type == EVP_PKEY_SM2)
  ------------------
  |  |   73|  10.9k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|  21.8k|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
                  if (type == EVP_PKEY_EC || type == EVP_PKEY_SM2)
  ------------------
  |  |   74|      0|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1259|      0|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (796:9): [True: 10.9k, False: 0]
  |  Branch (796:32): [True: 0, False: 0]
  ------------------
  797|  10.9k|        key = EVP_PKEY_get1_EC_KEY(pkey);
  798|  10.9k|    EVP_PKEY_free(pkey);
  799|  10.9k|    if (key == NULL)
  ------------------
  |  Branch (799:9): [True: 0, False: 10.9k]
  ------------------
  800|      0|        return NULL;
  801|  10.9k|    *pp = q;
  802|  10.9k|    if (a != NULL) {
  ------------------
  |  Branch (802:9): [True: 0, False: 10.9k]
  ------------------
  803|      0|        EC_KEY_free(*a);
  804|      0|        *a = key;
  805|      0|    }
  806|  10.9k|    return key;
  807|  10.9k|}
X509_PUBKEY_get0_param:
 1019|  21.8k|{
 1020|  21.8k|    if (ppkalg)
  ------------------
  |  Branch (1020:9): [True: 10, False: 21.8k]
  ------------------
 1021|     10|        *ppkalg = pub->algor->algorithm;
 1022|  21.8k|    if (pk) {
  ------------------
  |  Branch (1022:9): [True: 10.9k, False: 10.9k]
  ------------------
 1023|  10.9k|        *pk = pub->public_key->data;
 1024|  10.9k|        *ppklen = pub->public_key->length;
 1025|  10.9k|    }
 1026|  21.8k|    if (pa)
  ------------------
  |  Branch (1026:9): [True: 21.8k, False: 10]
  ------------------
 1027|  21.8k|        *pa = pub->algor;
 1028|  21.8k|    return 1;
 1029|  21.8k|}
ossl_x509_PUBKEY_get0_libctx:
 1061|  10.9k|{
 1062|  10.9k|    if (plibctx)
  ------------------
  |  Branch (1062:9): [True: 10.9k, False: 0]
  ------------------
 1063|  10.9k|        *plibctx = key->libctx;
 1064|  10.9k|    if (ppropq)
  ------------------
  |  Branch (1064:9): [True: 10.9k, False: 0]
  ------------------
 1065|  10.9k|        *ppropq = key->propq;
 1066|  10.9k|    return 1;
 1067|  10.9k|}
x_pubkey.c:x509_pubkey_ex_new_ex:
  109|  10.9k|{
  110|  10.9k|    X509_PUBKEY *ret;
  111|       |
  112|  10.9k|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  109|  10.9k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (112:9): [True: 0, False: 10.9k]
  ------------------
  113|      0|        return 0;
  114|  10.9k|    if (!x509_pubkey_ex_populate((ASN1_VALUE **)&ret, NULL)
  ------------------
  |  Branch (114:9): [True: 0, False: 10.9k]
  ------------------
  115|  10.9k|        || !x509_pubkey_set0_libctx(ret, libctx, propq)) {
  ------------------
  |  Branch (115:12): [True: 0, False: 10.9k]
  ------------------
  116|      0|        x509_pubkey_ex_free((ASN1_VALUE **)&ret, NULL);
  117|      0|        ret = NULL;
  118|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  119|  10.9k|    } else {
  120|  10.9k|        *pval = (ASN1_VALUE *)ret;
  121|  10.9k|    }
  122|       |
  123|       |    return ret != NULL;
  124|  10.9k|}
x_pubkey.c:x509_pubkey_ex_populate:
   98|  32.7k|{
   99|  32.7k|    X509_PUBKEY *pubkey = (X509_PUBKEY *)*pval;
  100|       |
  101|  32.7k|    return (pubkey->algor != NULL
  ------------------
  |  Branch (101:13): [True: 10.9k, False: 21.8k]
  ------------------
  102|  21.8k|               || (pubkey->algor = X509_ALGOR_new()) != NULL)
  ------------------
  |  Branch (102:19): [True: 21.8k, False: 0]
  ------------------
  103|  32.7k|        && (pubkey->public_key != NULL
  ------------------
  |  Branch (103:13): [True: 10.9k, False: 21.8k]
  ------------------
  104|  21.8k|            || (pubkey->public_key = ASN1_BIT_STRING_new()) != NULL);
  ------------------
  |  Branch (104:16): [True: 21.8k, False: 0]
  ------------------
  105|  32.7k|}
x_pubkey.c:x509_pubkey_ex_d2i_ex:
  131|  21.8k|{
  132|  21.8k|    const unsigned char *in_saved = *in;
  133|  21.8k|    size_t publen;
  134|  21.8k|    X509_PUBKEY *pubkey;
  135|  21.8k|    int ret;
  136|  21.8k|    OSSL_DECODER_CTX *dctx = NULL;
  137|  21.8k|    unsigned char *tmpbuf = NULL;
  138|       |
  139|  21.8k|    if (*pval == NULL && !x509_pubkey_ex_new_ex(pval, it, libctx, propq))
  ------------------
  |  Branch (139:9): [True: 0, False: 21.8k]
  |  Branch (139:26): [True: 0, False: 0]
  ------------------
  140|      0|        return 0;
  141|  21.8k|    if (!x509_pubkey_ex_populate(pval, NULL)) {
  ------------------
  |  Branch (141:9): [True: 0, False: 21.8k]
  ------------------
  142|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  143|      0|        return 0;
  144|      0|    }
  145|       |
  146|       |    /* This ensures that |*in| advances properly no matter what */
  147|  21.8k|    if ((ret = asn1_item_embed_d2i(pval, in, len,
  ------------------
  |  Branch (147:9): [True: 0, False: 21.8k]
  ------------------
  148|  21.8k|             ASN1_ITEM_rptr(X509_PUBKEY_INTERNAL),
  ------------------
  |  |  399|  21.8k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  149|  21.8k|             tag, aclass, opt, ctx, 0,
  150|  21.8k|             NULL, NULL))
  151|  21.8k|        <= 0) {
  152|      0|        x509_pubkey_ex_free(pval, it);
  153|      0|        return ret;
  154|      0|    }
  155|       |
  156|  21.8k|    publen = *in - in_saved;
  157|  21.8k|    if (!ossl_assert(publen > 0)) {
  ------------------
  |  |   52|  21.8k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  21.8k|    __FILE__, __LINE__)
  ------------------
  |  Branch (157:9): [True: 0, False: 21.8k]
  ------------------
  158|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  159|      0|        return 0;
  160|      0|    }
  161|       |
  162|  21.8k|    pubkey = (X509_PUBKEY *)*pval;
  163|  21.8k|    EVP_PKEY_free(pubkey->pkey);
  164|  21.8k|    pubkey->pkey = NULL;
  165|       |
  166|       |    /*
  167|       |     * Opportunistically decode the key but remove any non fatal errors
  168|       |     * from the queue. Subsequent explicit attempts to decode/use the key
  169|       |     * will return an appropriate error.
  170|       |     */
  171|  21.8k|    ERR_set_mark();
  172|       |
  173|       |    /*
  174|       |     * Try to decode with legacy method first.  This ensures that engines
  175|       |     * aren't overridden by providers.
  176|       |     */
  177|  21.8k|    if ((ret = x509_pubkey_decode(&pubkey->pkey, pubkey)) == -1) {
  ------------------
  |  Branch (177:9): [True: 0, False: 21.8k]
  ------------------
  178|       |        /* -1 indicates a fatal error, like malloc failure */
  179|      0|        ERR_clear_last_mark();
  180|      0|        goto end;
  181|      0|    }
  182|       |
  183|       |    /* Try to decode it into an EVP_PKEY with OSSL_DECODER */
  184|  21.8k|    if (ret <= 0 && !pubkey->flag_force_legacy) {
  ------------------
  |  Branch (184:9): [True: 10.9k, False: 10.9k]
  |  Branch (184:21): [True: 10.9k, False: 0]
  ------------------
  185|  10.9k|        const unsigned char *p;
  186|  10.9k|        char txtoidname[OSSL_MAX_NAME_SIZE];
  187|  10.9k|        size_t slen = publen;
  188|       |
  189|       |        /*
  190|       |         * The decoders don't know how to handle anything other than Universal
  191|       |         * class so we modify the data accordingly.
  192|       |         */
  193|  10.9k|        if (aclass != V_ASN1_UNIVERSAL) {
  ------------------
  |  |   49|  10.9k|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  |  Branch (193:13): [True: 0, False: 10.9k]
  ------------------
  194|      0|            tmpbuf = OPENSSL_memdup(in_saved, publen);
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  195|      0|            if (tmpbuf == NULL)
  ------------------
  |  Branch (195:17): [True: 0, False: 0]
  ------------------
  196|      0|                return 0;
  197|      0|            in_saved = tmpbuf;
  198|      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
  ------------------
  199|      0|        }
  200|  10.9k|        p = in_saved;
  201|       |
  202|  10.9k|        if (OBJ_obj2txt(txtoidname, sizeof(txtoidname),
  ------------------
  |  Branch (202:13): [True: 0, False: 10.9k]
  ------------------
  203|  10.9k|                pubkey->algor->algorithm, 0)
  204|  10.9k|            <= 0) {
  205|      0|            ERR_clear_last_mark();
  206|      0|            goto end;
  207|      0|        }
  208|  10.9k|        if ((dctx = OSSL_DECODER_CTX_new_for_pkey(&pubkey->pkey,
  ------------------
  |  Branch (208:13): [True: 10.9k, False: 0]
  ------------------
  209|  10.9k|                 "DER", "SubjectPublicKeyInfo",
  210|  10.9k|                 txtoidname, EVP_PKEY_PUBLIC_KEY,
  ------------------
  |  |  112|  10.9k|    (EVP_PKEY_KEY_PARAMETERS | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  108|  10.9k|    (OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  653|  10.9k|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  648|  10.9k|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  654|  10.9k|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  649|  10.9k|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   (EVP_PKEY_KEY_PARAMETERS | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  10.9k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  211|  10.9k|                 pubkey->libctx,
  212|  10.9k|                 pubkey->propq))
  213|  10.9k|            != NULL)
  214|       |            /*
  215|       |             * As said higher up, we're being opportunistic.  In other words,
  216|       |             * we don't care if we fail.
  217|       |             */
  218|  10.9k|            if (OSSL_DECODER_from_data(dctx, &p, &slen)) {
  ------------------
  |  Branch (218:17): [True: 10.9k, False: 0]
  ------------------
  219|  10.9k|                if (slen != 0) {
  ------------------
  |  Branch (219:21): [True: 0, False: 10.9k]
  ------------------
  220|       |                    /*
  221|       |                     * If we successfully decoded then we *must* consume all the
  222|       |                     * bytes.
  223|       |                     */
  224|      0|                    ERR_clear_last_mark();
  225|      0|                    ERR_raise(ERR_LIB_ASN1, ASN1_R_DECODE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  226|      0|                    goto end;
  227|      0|                }
  228|  10.9k|            }
  229|  10.9k|    }
  230|       |
  231|  21.8k|    ERR_pop_to_mark();
  232|  21.8k|    ret = 1;
  233|  21.8k|end:
  234|  21.8k|    OSSL_DECODER_CTX_free(dctx);
  235|  21.8k|    OPENSSL_free(tmpbuf);
  ------------------
  |  |  132|  21.8k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  236|  21.8k|    return ret;
  237|  21.8k|}
x_pubkey.c:x509_pubkey_set0_libctx:
   48|  21.8k|{
   49|  21.8k|    if (x != NULL) {
  ------------------
  |  Branch (49:9): [True: 21.8k, False: 0]
  ------------------
   50|  21.8k|        x->libctx = libctx;
   51|  21.8k|        OPENSSL_free(x->propq);
  ------------------
  |  |  132|  21.8k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   52|  21.8k|        x->propq = NULL;
   53|  21.8k|        if (propq != NULL) {
  ------------------
  |  Branch (53:13): [True: 0, False: 21.8k]
  ------------------
   54|      0|            x->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   55|      0|            if (x->propq == NULL)
  ------------------
  |  Branch (55:17): [True: 0, False: 0]
  ------------------
   56|      0|                return 0;
   57|      0|        }
   58|  21.8k|    }
   59|  21.8k|    return 1;
   60|  21.8k|}
x_pubkey.c:x509_pubkey_ex_free:
   84|  21.8k|{
   85|  21.8k|    X509_PUBKEY *pubkey;
   86|       |
   87|  21.8k|    if (pval != NULL && (pubkey = (X509_PUBKEY *)*pval) != NULL) {
  ------------------
  |  Branch (87:9): [True: 21.8k, False: 0]
  |  Branch (87:25): [True: 21.8k, False: 0]
  ------------------
   88|  21.8k|        X509_ALGOR_free(pubkey->algor);
   89|  21.8k|        ASN1_BIT_STRING_free(pubkey->public_key);
   90|  21.8k|        EVP_PKEY_free(pubkey->pkey);
   91|  21.8k|        OPENSSL_free(pubkey->propq);
  ------------------
  |  |  132|  21.8k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   92|  21.8k|        OPENSSL_free(pubkey);
  ------------------
  |  |  132|  21.8k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   93|       |        *pval = NULL;
   94|  21.8k|    }
   95|  21.8k|}
x_pubkey.c:x509_pubkey_decode:
  405|  21.8k|{
  406|  21.8k|    EVP_PKEY *pkey;
  407|  21.8k|    int nid;
  408|       |
  409|  21.8k|    nid = OBJ_obj2nid(key->algor->algorithm);
  410|  21.8k|    if (!key->flag_force_legacy)
  ------------------
  |  Branch (410:9): [True: 10.9k, False: 10.9k]
  ------------------
  411|  10.9k|        return 0;
  412|       |
  413|  10.9k|    pkey = EVP_PKEY_new();
  414|  10.9k|    if (pkey == NULL) {
  ------------------
  |  Branch (414:9): [True: 0, False: 10.9k]
  ------------------
  415|      0|        ERR_raise(ERR_LIB_X509, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  416|      0|        return -1;
  417|      0|    }
  418|       |
  419|  10.9k|    if (!EVP_PKEY_set_type(pkey, nid)) {
  ------------------
  |  Branch (419:9): [True: 0, False: 10.9k]
  ------------------
  420|      0|        ERR_raise(ERR_LIB_X509, X509_R_UNSUPPORTED_ALGORITHM);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  421|      0|        goto error;
  422|      0|    }
  423|       |
  424|  10.9k|    if (pkey->ameth->pub_decode) {
  ------------------
  |  Branch (424:9): [True: 10.9k, False: 0]
  ------------------
  425|       |        /*
  426|       |         * Treat any failure of pub_decode as a decode error. In
  427|       |         * future we could have different return codes for decode
  428|       |         * errors and fatal errors such as malloc failure.
  429|       |         */
  430|  10.9k|        if (!pkey->ameth->pub_decode(pkey, key))
  ------------------
  |  Branch (430:13): [True: 0, False: 10.9k]
  ------------------
  431|      0|            goto error;
  432|  10.9k|    } else {
  433|      0|        ERR_raise(ERR_LIB_X509, X509_R_METHOD_NOT_SUPPORTED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  434|      0|        goto error;
  435|      0|    }
  436|       |
  437|  10.9k|    *ppkey = pkey;
  438|  10.9k|    return 1;
  439|       |
  440|      0|error:
  441|      0|    EVP_PKEY_free(pkey);
  442|      0|    return 0;
  443|  10.9k|}
x_pubkey.c:d2i_PUBKEY_int:
  483|  10.9k|{
  484|  10.9k|    X509_PUBKEY *xpk, *xpk2 = NULL, **pxpk = NULL;
  485|  10.9k|    EVP_PKEY *pktmp = NULL;
  486|  10.9k|    const unsigned char *q;
  487|       |
  488|  10.9k|    q = *pp;
  489|       |
  490|       |    /*
  491|       |     * If libctx or propq are non-NULL, we take advantage of the reuse
  492|       |     * feature.  It's not generally recommended, but is safe enough for
  493|       |     * newly created structures.
  494|       |     */
  495|  10.9k|    if (libctx != NULL || propq != NULL || force_legacy) {
  ------------------
  |  Branch (495:9): [True: 0, False: 10.9k]
  |  Branch (495:27): [True: 0, False: 10.9k]
  |  Branch (495:44): [True: 10.9k, False: 0]
  ------------------
  496|  10.9k|        xpk2 = OPENSSL_zalloc(sizeof(*xpk2));
  ------------------
  |  |  109|  10.9k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  497|  10.9k|        if (xpk2 == NULL)
  ------------------
  |  Branch (497:13): [True: 0, False: 10.9k]
  ------------------
  498|      0|            return NULL;
  499|  10.9k|        if (!x509_pubkey_set0_libctx(xpk2, libctx, propq))
  ------------------
  |  Branch (499:13): [True: 0, False: 10.9k]
  ------------------
  500|      0|            goto end;
  501|  10.9k|        xpk2->flag_force_legacy = !!force_legacy;
  502|  10.9k|        pxpk = &xpk2;
  503|  10.9k|    }
  504|  10.9k|    xpk = d2i_x509_pubkey(pxpk, &q, length);
  505|  10.9k|    if (xpk == NULL)
  ------------------
  |  Branch (505:9): [True: 0, False: 10.9k]
  ------------------
  506|      0|        goto end;
  507|  10.9k|    pktmp = X509_PUBKEY_get(xpk);
  508|  10.9k|    X509_PUBKEY_free(xpk);
  509|  10.9k|    xpk2 = NULL; /* We know that xpk == xpk2 */
  510|  10.9k|    if (pktmp == NULL)
  ------------------
  |  Branch (510:9): [True: 0, False: 10.9k]
  ------------------
  511|      0|        goto end;
  512|  10.9k|    *pp = q;
  513|  10.9k|    if (a != NULL) {
  ------------------
  |  Branch (513:9): [True: 0, False: 10.9k]
  ------------------
  514|      0|        EVP_PKEY_free(*a);
  515|      0|        *a = pktmp;
  516|      0|    }
  517|  10.9k|end:
  518|  10.9k|    X509_PUBKEY_free(xpk2);
  519|  10.9k|    return pktmp;
  520|  10.9k|}

ossl_x509_set0_libctx:
  141|  7.18k|{
  142|  7.18k|    if (x != NULL) {
  ------------------
  |  Branch (142:9): [True: 7.18k, False: 0]
  ------------------
  143|  7.18k|        x->libctx = libctx;
  144|  7.18k|        OPENSSL_free(x->propq);
  ------------------
  |  |  132|  7.18k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  145|  7.18k|        x->propq = NULL;
  146|  7.18k|        if (propq != NULL) {
  ------------------
  |  Branch (146:13): [True: 0, False: 7.18k]
  ------------------
  147|      0|            x->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  148|      0|            if (x->propq == NULL)
  ------------------
  |  Branch (148:17): [True: 0, False: 0]
  ------------------
  149|      0|                return 0;
  150|      0|        }
  151|  7.18k|    }
  152|  7.18k|    return 1;
  153|  7.18k|}
X509_new_ex:
  156|  7.18k|{
  157|  7.18k|    X509 *cert = NULL;
  158|       |
  159|  7.18k|    cert = (X509 *)ASN1_item_new_ex(X509_it(), libctx, propq);
  160|  7.18k|    if (!ossl_x509_set0_libctx(cert, libctx, propq)) {
  ------------------
  |  Branch (160:9): [True: 0, False: 7.18k]
  ------------------
  161|      0|        X509_free(cert);
  162|       |        cert = NULL;
  163|      0|    }
  164|  7.18k|    return cert;
  165|  7.18k|}
X509_get0_signature:
  289|     10|{
  290|     10|    if (psig)
  ------------------
  |  Branch (290:9): [True: 10, False: 0]
  ------------------
  291|     10|        *psig = &x->signature;
  292|     10|    if (palg)
  ------------------
  |  Branch (292:9): [True: 10, False: 0]
  ------------------
  293|     10|        *palg = &x->sig_alg;
  294|     10|}
x_x509.c:x509_cb:
   38|   144k|{
   39|   144k|    X509 *ret = (X509 *)*pval;
   40|       |
   41|   144k|    switch (operation) {
   42|       |
   43|  10.9k|    case ASN1_OP_D2I_PRE:
  ------------------
  |  |  735|  10.9k|#define ASN1_OP_D2I_PRE 4
  ------------------
  |  Branch (43:5): [True: 10.9k, False: 133k]
  ------------------
   44|  10.9k|        CRYPTO_free_ex_data(CRYPTO_EX_INDEX_X509, ret, &ret->ex_data);
  ------------------
  |  |  254|  10.9k|#define CRYPTO_EX_INDEX_X509 3
  ------------------
   45|  10.9k|        X509_CERT_AUX_free(ret->aux);
   46|  10.9k|        ASN1_OCTET_STRING_free(ret->skid);
   47|  10.9k|        AUTHORITY_KEYID_free(ret->akid);
   48|  10.9k|        CRL_DIST_POINTS_free(ret->crldp);
   49|  10.9k|        ossl_policy_cache_free(ret->policy_cache);
   50|  10.9k|        GENERAL_NAMES_free(ret->altname);
   51|  10.9k|        NAME_CONSTRAINTS_free(ret->nc);
   52|  10.9k|#ifndef OPENSSL_NO_RFC3779
   53|  10.9k|        sk_IPAddressFamily_pop_free(ret->rfc3779_addr, IPAddressFamily_free);
  ------------------
  |  | 1269|  10.9k|#define sk_IPAddressFamily_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_IPAddressFamily_sk_type(sk), ossl_check_IPAddressFamily_freefunc_type(freefunc))
  ------------------
   54|  10.9k|        ASIdentifiers_free(ret->rfc3779_asid);
   55|  10.9k|#endif
   56|  10.9k|        ASN1_OCTET_STRING_free(ret->distinguishing_id);
   57|       |
   58|       |        /* fall through */
   59|       |
   60|  21.8k|    case ASN1_OP_NEW_POST:
  ------------------
  |  |  732|  21.8k|#define ASN1_OP_NEW_POST 1
  ------------------
  |  Branch (60:5): [True: 10.9k, False: 133k]
  ------------------
   61|  21.8k|        ret->ex_cached = 0;
   62|  21.8k|        ret->ex_kusage = 0;
   63|  21.8k|        ret->ex_xkusage = 0;
   64|  21.8k|        ret->ex_nscert = 0;
   65|  21.8k|        ret->ex_flags = 0;
   66|  21.8k|        ret->ex_pathlen = -1;
   67|  21.8k|        ret->ex_pcpathlen = -1;
   68|  21.8k|        ret->skid = NULL;
   69|  21.8k|        ret->akid = NULL;
   70|  21.8k|        ret->policy_cache = NULL;
   71|  21.8k|        ret->altname = NULL;
   72|  21.8k|        ret->nc = NULL;
   73|  21.8k|#ifndef OPENSSL_NO_RFC3779
   74|  21.8k|        ret->rfc3779_addr = NULL;
   75|  21.8k|        ret->rfc3779_asid = NULL;
   76|  21.8k|#endif
   77|  21.8k|        ret->distinguishing_id = NULL;
   78|  21.8k|        ret->aux = NULL;
   79|  21.8k|        ret->crldp = NULL;
   80|  21.8k|        if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_X509, ret, &ret->ex_data))
  ------------------
  |  |  254|  21.8k|#define CRYPTO_EX_INDEX_X509 3
  ------------------
  |  Branch (80:13): [True: 0, False: 21.8k]
  ------------------
   81|      0|            return 0;
   82|  21.8k|        break;
   83|       |
   84|  21.8k|    case ASN1_OP_FREE_POST:
  ------------------
  |  |  734|  10.9k|#define ASN1_OP_FREE_POST 3
  ------------------
  |  Branch (84:5): [True: 10.9k, False: 133k]
  ------------------
   85|  10.9k|        CRYPTO_free_ex_data(CRYPTO_EX_INDEX_X509, ret, &ret->ex_data);
  ------------------
  |  |  254|  10.9k|#define CRYPTO_EX_INDEX_X509 3
  ------------------
   86|  10.9k|        X509_CERT_AUX_free(ret->aux);
   87|  10.9k|        ASN1_OCTET_STRING_free(ret->skid);
   88|  10.9k|        AUTHORITY_KEYID_free(ret->akid);
   89|  10.9k|        CRL_DIST_POINTS_free(ret->crldp);
   90|  10.9k|        ossl_policy_cache_free(ret->policy_cache);
   91|  10.9k|        GENERAL_NAMES_free(ret->altname);
   92|  10.9k|        NAME_CONSTRAINTS_free(ret->nc);
   93|  10.9k|#ifndef OPENSSL_NO_RFC3779
   94|  10.9k|        sk_IPAddressFamily_pop_free(ret->rfc3779_addr, IPAddressFamily_free);
  ------------------
  |  | 1269|  10.9k|#define sk_IPAddressFamily_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_IPAddressFamily_sk_type(sk), ossl_check_IPAddressFamily_freefunc_type(freefunc))
  ------------------
   95|  10.9k|        ASIdentifiers_free(ret->rfc3779_asid);
   96|  10.9k|#endif
   97|  10.9k|        ASN1_OCTET_STRING_free(ret->distinguishing_id);
   98|  10.9k|        OPENSSL_free(ret->propq);
  ------------------
  |  |  132|  10.9k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   99|  10.9k|        break;
  100|       |
  101|      0|    case ASN1_OP_DUP_POST: {
  ------------------
  |  |  746|      0|#define ASN1_OP_DUP_POST 15
  ------------------
  |  Branch (101:5): [True: 0, False: 144k]
  ------------------
  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: 144k]
  ------------------
  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: 144k]
  ------------------
  114|      0|        const char **propq = exarg;
  115|       |
  116|      0|        *propq = ret->propq;
  117|      0|    } break;
  118|       |
  119|   111k|    default:
  ------------------
  |  Branch (119:5): [True: 111k, False: 32.7k]
  ------------------
  120|   111k|        break;
  121|   144k|    }
  122|       |
  123|   144k|    return 1;
  124|   144k|}

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

SHA1_Update_thunk:
  163|  10.8k|{
  164|  10.8k|#ifdef HASH_UPDATE_THUNK
  165|  10.8k|    HASH_CTX *c = (HASH_CTX *)cp;
  ------------------
  |  |   20|  10.8k|#define HASH_CTX SHA_CTX
  ------------------
  166|  10.8k|#endif
  167|  10.8k|    const unsigned char *data = data_;
  168|  10.8k|    unsigned char *p;
  169|  10.8k|    HASH_LONG l;
  ------------------
  |  |   19|  10.8k|#define HASH_LONG SHA_LONG
  ------------------
  170|  10.8k|    size_t n;
  171|       |
  172|  10.8k|    if (ossl_unlikely(len == 0))
  ------------------
  |  |   23|  10.8k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 10.8k]
  |  |  ------------------
  ------------------
  173|      0|        return 1;
  174|       |
  175|  10.8k|    l = (c->Nl + (((HASH_LONG)len) << 3)) & 0xffffffffUL;
  176|  10.8k|    if (ossl_unlikely(l < c->Nl)) /* overflow */
  ------------------
  |  |   23|  10.8k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 10.8k]
  |  |  ------------------
  ------------------
  177|      0|        c->Nh++;
  178|  10.8k|    c->Nh += (HASH_LONG)(len >> 29); /* might cause compiler warning on
  179|       |                                      * 16-bit */
  180|  10.8k|    c->Nl = l;
  181|       |
  182|  10.8k|    n = c->num;
  183|  10.8k|    if (ossl_likely(n != 0)) {
  ------------------
  |  |   22|  10.8k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 10.8k]
  |  |  ------------------
  ------------------
  184|       |        /* Gets here if we already have buffered input data */
  185|      0|        p = (unsigned char *)c->data;
  186|       |
  187|      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 (187:13): [True: 0, False: 0]
  |  Branch (187:35): [True: 0, False: 0]
  ------------------
  188|       |            /*
  189|       |             * If there is enough input to fill the buffer then fill the
  190|       |             * buffer and process a single chunk.
  191|       |             */
  192|      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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  193|      0|            HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |   42|      0|#define HASH_BLOCK_DATA_ORDER sha1_block_data_order
  ------------------
  194|      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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  195|      0|            data += n;
  196|      0|            len -= n;
  197|      0|            c->num = 0;
  198|       |            /*
  199|       |             * We use memset rather than OPENSSL_cleanse() here deliberately.
  200|       |             * Using OPENSSL_cleanse() here could be a performance issue. It
  201|       |             * will get properly cleansed on finalisation so this isn't a
  202|       |             * security problem.
  203|       |             */
  204|      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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      0|        } else {
  206|       |            /* Otherwise just keep filling the buffer */
  207|      0|            memcpy(p + n, data, len);
  208|      0|            c->num += (unsigned int)len;
  209|      0|            return 1;
  210|      0|        }
  211|      0|    }
  212|       |
  213|  10.8k|    n = len / HASH_CBLOCK; /* Get number of input chunks (e.g. multiple of 512 bits for SHA256) */
  ------------------
  |  |   21|  10.8k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  10.8k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  10.8k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  214|  10.8k|    if (n > 0) {
  ------------------
  |  Branch (214:9): [True: 10.8k, False: 0]
  ------------------
  215|       |        /* Process chunks */
  216|  10.8k|        HASH_BLOCK_DATA_ORDER(c, data, n);
  ------------------
  |  |   42|  10.8k|#define HASH_BLOCK_DATA_ORDER sha1_block_data_order
  ------------------
  217|  10.8k|        n *= HASH_CBLOCK;
  ------------------
  |  |   21|  10.8k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  10.8k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  10.8k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  218|  10.8k|        data += n;
  219|  10.8k|        len -= n;
  220|  10.8k|    }
  221|       |    /* Buffer any left over data */
  222|  10.8k|    if (len != 0) {
  ------------------
  |  Branch (222:9): [True: 10.8k, False: 0]
  ------------------
  223|  10.8k|        p = (unsigned char *)c->data;
  224|  10.8k|        c->num = (unsigned int)len;
  225|  10.8k|        memcpy(p, data, len);
  226|  10.8k|    }
  227|  10.8k|    return 1;
  228|  10.8k|}
SHA1_Final:
  236|  10.8k|{
  237|  10.8k|    unsigned char *p = (unsigned char *)c->data;
  238|  10.8k|    size_t n = c->num;
  239|       |
  240|       |    /*
  241|       |     * Pad the input by adding a 1 bit + K zero bits + input length (L)
  242|       |     * as a 64 bit value. K must align the data to a chunk boundary.
  243|       |     */
  244|  10.8k|    p[n] = 0x80; /* there is always room for one */
  245|  10.8k|    n++;
  246|       |
  247|  10.8k|    if (n > (HASH_CBLOCK - 8)) {
  ------------------
  |  |   21|  10.8k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  10.8k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  10.8k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (247:9): [True: 0, False: 10.8k]
  ------------------
  248|       |        /*
  249|       |         * If there is not enough room in the buffer to add L, then fill the
  250|       |         * current buffer with zeros, and process the chunk
  251|       |         */
  252|      0|        memset(p + n, 0, 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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  253|      0|        n = 0;
  254|      0|        HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |   42|      0|#define HASH_BLOCK_DATA_ORDER sha1_block_data_order
  ------------------
  255|      0|    }
  256|       |    /* Add zero padding - but leave enough room for L */
  257|  10.8k|    memset(p + n, 0, HASH_CBLOCK - 8 - n);
  ------------------
  |  |   21|  10.8k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  10.8k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  10.8k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  258|       |
  259|       |    /* Add the 64 bit L value to the end of the buffer */
  260|  10.8k|    p += HASH_CBLOCK - 8;
  ------------------
  |  |   21|  10.8k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  10.8k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  10.8k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  261|  10.8k|#if defined(DATA_ORDER_IS_BIG_ENDIAN)
  262|  10.8k|    (void)HOST_l2c(c->Nh, p);
  ------------------
  |  |  133|  10.8k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  134|  10.8k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  135|  10.8k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  136|  10.8k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  137|  10.8k|    l)
  ------------------
  263|  10.8k|    (void)HOST_l2c(c->Nl, p);
  ------------------
  |  |  133|  10.8k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  134|  10.8k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  135|  10.8k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  136|  10.8k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  137|  10.8k|    l)
  ------------------
  264|       |#elif defined(DATA_ORDER_IS_LITTLE_ENDIAN)
  265|       |    (void)HOST_l2c(c->Nl, p);
  266|       |    (void)HOST_l2c(c->Nh, p);
  267|       |#endif
  268|  10.8k|    p -= HASH_CBLOCK;
  ------------------
  |  |   21|  10.8k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  10.8k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  10.8k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  269|       |    /* Process the final padded chunk */
  270|  10.8k|    HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |   42|  10.8k|#define HASH_BLOCK_DATA_ORDER sha1_block_data_order
  ------------------
  271|  10.8k|    c->num = 0;
  272|  10.8k|    OPENSSL_cleanse(p, HASH_CBLOCK);
  ------------------
  |  |   21|  10.8k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  10.8k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  10.8k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  273|       |
  274|       |#ifndef HASH_MAKE_STRING
  275|       |#error "HASH_MAKE_STRING must be defined!"
  276|       |#else
  277|  10.8k|    HASH_MAKE_STRING(c, md);
  ------------------
  |  |   23|  10.8k|    do {                         \
  |  |   24|  10.8k|        unsigned long ll;        \
  |  |   25|  10.8k|        ll = (c)->h0;            \
  |  |   26|  10.8k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  133|  10.8k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|  10.8k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|  10.8k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|  10.8k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|  10.8k|    l)
  |  |  ------------------
  |  |   27|  10.8k|        ll = (c)->h1;            \
  |  |   28|  10.8k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  133|  10.8k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|  10.8k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|  10.8k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|  10.8k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|  10.8k|    l)
  |  |  ------------------
  |  |   29|  10.8k|        ll = (c)->h2;            \
  |  |   30|  10.8k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  133|  10.8k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|  10.8k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|  10.8k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|  10.8k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|  10.8k|    l)
  |  |  ------------------
  |  |   31|  10.8k|        ll = (c)->h3;            \
  |  |   32|  10.8k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  133|  10.8k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|  10.8k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|  10.8k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|  10.8k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|  10.8k|    l)
  |  |  ------------------
  |  |   33|  10.8k|        ll = (c)->h4;            \
  |  |   34|  10.8k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  133|  10.8k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|  10.8k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|  10.8k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|  10.8k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|  10.8k|    l)
  |  |  ------------------
  |  |   35|  10.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (35:14): [Folded, False: 10.8k]
  |  |  ------------------
  ------------------
  278|  10.8k|#endif
  279|       |
  280|  10.8k|    return 1;
  281|  10.8k|}
SHA256_Update_thunk:
  163|  47.3k|{
  164|  47.3k|#ifdef HASH_UPDATE_THUNK
  165|  47.3k|    HASH_CTX *c = (HASH_CTX *)cp;
  ------------------
  |  |   77|  47.3k|#define HASH_CTX SHA256_CTX
  ------------------
  166|  47.3k|#endif
  167|  47.3k|    const unsigned char *data = data_;
  168|  47.3k|    unsigned char *p;
  169|  47.3k|    HASH_LONG l;
  ------------------
  |  |   76|  47.3k|#define HASH_LONG SHA_LONG
  ------------------
  170|  47.3k|    size_t n;
  171|       |
  172|  47.3k|    if (ossl_unlikely(len == 0))
  ------------------
  |  |   23|  47.3k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 47.3k]
  |  |  ------------------
  ------------------
  173|      0|        return 1;
  174|       |
  175|  47.3k|    l = (c->Nl + (((HASH_LONG)len) << 3)) & 0xffffffffUL;
  176|  47.3k|    if (ossl_unlikely(l < c->Nl)) /* overflow */
  ------------------
  |  |   23|  47.3k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 47.3k]
  |  |  ------------------
  ------------------
  177|      0|        c->Nh++;
  178|  47.3k|    c->Nh += (HASH_LONG)(len >> 29); /* might cause compiler warning on
  179|       |                                      * 16-bit */
  180|  47.3k|    c->Nl = l;
  181|       |
  182|  47.3k|    n = c->num;
  183|  47.3k|    if (ossl_likely(n != 0)) {
  ------------------
  |  |   22|  47.3k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 630, False: 46.6k]
  |  |  ------------------
  ------------------
  184|       |        /* Gets here if we already have buffered input data */
  185|    630|        p = (unsigned char *)c->data;
  186|       |
  187|    630|        if (len >= HASH_CBLOCK || len + n >= HASH_CBLOCK) {
  ------------------
  |  |   78|    630|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  1.26k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|    630|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      if (len >= HASH_CBLOCK || len + n >= HASH_CBLOCK) {
  ------------------
  |  |   78|    630|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|    630|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|    630|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (187:13): [True: 0, False: 630]
  |  Branch (187:35): [True: 10, False: 620]
  ------------------
  188|       |            /*
  189|       |             * If there is enough input to fill the buffer then fill the
  190|       |             * buffer and process a single chunk.
  191|       |             */
  192|     10|            memcpy(p + n, data, HASH_CBLOCK - n);
  ------------------
  |  |   78|     10|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|     10|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|     10|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  193|     10|            HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |  126|     10|#define HASH_BLOCK_DATA_ORDER sha256_block_data_order
  ------------------
  194|     10|            n = HASH_CBLOCK - n;
  ------------------
  |  |   78|     10|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|     10|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|     10|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  195|     10|            data += n;
  196|     10|            len -= n;
  197|     10|            c->num = 0;
  198|       |            /*
  199|       |             * We use memset rather than OPENSSL_cleanse() here deliberately.
  200|       |             * Using OPENSSL_cleanse() here could be a performance issue. It
  201|       |             * will get properly cleansed on finalisation so this isn't a
  202|       |             * security problem.
  203|       |             */
  204|     10|            memset(p, 0, HASH_CBLOCK); /* keep it zeroed */
  ------------------
  |  |   78|     10|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|     10|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|     10|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|    620|        } else {
  206|       |            /* Otherwise just keep filling the buffer */
  207|    620|            memcpy(p + n, data, len);
  208|    620|            c->num += (unsigned int)len;
  209|    620|            return 1;
  210|    620|        }
  211|    630|    }
  212|       |
  213|  46.6k|    n = len / HASH_CBLOCK; /* Get number of input chunks (e.g. multiple of 512 bits for SHA256) */
  ------------------
  |  |   78|  46.6k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  46.6k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  46.6k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  214|  46.6k|    if (n > 0) {
  ------------------
  |  Branch (214:9): [True: 39.4k, False: 7.19k]
  ------------------
  215|       |        /* Process chunks */
  216|  39.4k|        HASH_BLOCK_DATA_ORDER(c, data, n);
  ------------------
  |  |  126|  39.4k|#define HASH_BLOCK_DATA_ORDER sha256_block_data_order
  ------------------
  217|  39.4k|        n *= HASH_CBLOCK;
  ------------------
  |  |   78|  39.4k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  39.4k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  39.4k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  218|  39.4k|        data += n;
  219|  39.4k|        len -= n;
  220|  39.4k|    }
  221|       |    /* Buffer any left over data */
  222|  46.6k|    if (len != 0) {
  ------------------
  |  Branch (222:9): [True: 25.1k, False: 21.5k]
  ------------------
  223|  25.1k|        p = (unsigned char *)c->data;
  224|  25.1k|        c->num = (unsigned int)len;
  225|  25.1k|        memcpy(p, data, len);
  226|  25.1k|    }
  227|  46.6k|    return 1;
  228|  47.3k|}
SHA256_Final:
  236|  32.3k|{
  237|  32.3k|    unsigned char *p = (unsigned char *)c->data;
  238|  32.3k|    size_t n = c->num;
  239|       |
  240|       |    /*
  241|       |     * Pad the input by adding a 1 bit + K zero bits + input length (L)
  242|       |     * as a 64 bit value. K must align the data to a chunk boundary.
  243|       |     */
  244|  32.3k|    p[n] = 0x80; /* there is always room for one */
  245|  32.3k|    n++;
  246|       |
  247|  32.3k|    if (n > (HASH_CBLOCK - 8)) {
  ------------------
  |  |   78|  32.3k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  32.3k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  32.3k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (247:9): [True: 0, False: 32.3k]
  ------------------
  248|       |        /*
  249|       |         * If there is not enough room in the buffer to add L, then fill the
  250|       |         * current buffer with zeros, and process the chunk
  251|       |         */
  252|      0|        memset(p + n, 0, HASH_CBLOCK - n);
  ------------------
  |  |   78|      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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  253|      0|        n = 0;
  254|      0|        HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |  126|      0|#define HASH_BLOCK_DATA_ORDER sha256_block_data_order
  ------------------
  255|      0|    }
  256|       |    /* Add zero padding - but leave enough room for L */
  257|  32.3k|    memset(p + n, 0, HASH_CBLOCK - 8 - n);
  ------------------
  |  |   78|  32.3k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  32.3k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  32.3k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  258|       |
  259|       |    /* Add the 64 bit L value to the end of the buffer */
  260|  32.3k|    p += HASH_CBLOCK - 8;
  ------------------
  |  |   78|  32.3k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  32.3k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  32.3k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  261|  32.3k|#if defined(DATA_ORDER_IS_BIG_ENDIAN)
  262|  32.3k|    (void)HOST_l2c(c->Nh, p);
  ------------------
  |  |  133|  32.3k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  134|  32.3k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  135|  32.3k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  136|  32.3k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  137|  32.3k|    l)
  ------------------
  263|  32.3k|    (void)HOST_l2c(c->Nl, p);
  ------------------
  |  |  133|  32.3k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  134|  32.3k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  135|  32.3k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  136|  32.3k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  137|  32.3k|    l)
  ------------------
  264|       |#elif defined(DATA_ORDER_IS_LITTLE_ENDIAN)
  265|       |    (void)HOST_l2c(c->Nl, p);
  266|       |    (void)HOST_l2c(c->Nh, p);
  267|       |#endif
  268|  32.3k|    p -= HASH_CBLOCK;
  ------------------
  |  |   78|  32.3k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  32.3k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  32.3k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  269|       |    /* Process the final padded chunk */
  270|  32.3k|    HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |  126|  32.3k|#define HASH_BLOCK_DATA_ORDER sha256_block_data_order
  ------------------
  271|  32.3k|    c->num = 0;
  272|  32.3k|    OPENSSL_cleanse(p, HASH_CBLOCK);
  ------------------
  |  |   78|  32.3k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  32.3k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  32.3k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  273|       |
  274|       |#ifndef HASH_MAKE_STRING
  275|       |#error "HASH_MAKE_STRING must be defined!"
  276|       |#else
  277|  32.3k|    HASH_MAKE_STRING(c, md);
  ------------------
  |  |   89|  32.3k|    do {                                                            \
  |  |   90|  32.3k|        unsigned long ll;                                           \
  |  |   91|  32.3k|        unsigned int nn;                                            \
  |  |   92|  32.3k|        switch ((c)->md_len) {                                      \
  |  |   93|      0|        case SHA256_192_DIGEST_LENGTH:                              \
  |  |  ------------------
  |  |  |  |   85|      0|#define SHA256_192_DIGEST_LENGTH 24
  |  |  ------------------
  |  |  |  Branch (93:9): [True: 0, False: 32.3k]
  |  |  ------------------
  |  |   94|      0|            for (nn = 0; nn < SHA256_192_DIGEST_LENGTH / 4; nn++) { \
  |  |  ------------------
  |  |  |  |   85|      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:                                  \
  |  |  ------------------
  |  |  |  |   86|      0|#define SHA224_DIGEST_LENGTH 28
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 0, False: 32.3k]
  |  |  ------------------
  |  |  100|      0|            for (nn = 0; nn < SHA224_DIGEST_LENGTH / 4; nn++) {     \
  |  |  ------------------
  |  |  |  |   86|      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.3k|        case SHA256_DIGEST_LENGTH:                                  \
  |  |  ------------------
  |  |  |  |   87|  32.3k|#define SHA256_DIGEST_LENGTH 32
  |  |  ------------------
  |  |  |  Branch (105:9): [True: 32.3k, False: 0]
  |  |  ------------------
  |  |  106|   290k|            for (nn = 0; nn < SHA256_DIGEST_LENGTH / 4; nn++) {     \
  |  |  ------------------
  |  |  |  |   87|   290k|#define SHA256_DIGEST_LENGTH 32
  |  |  ------------------
  |  |  |  Branch (106:26): [True: 258k, False: 32.3k]
  |  |  ------------------
  |  |  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.3k|            break;                                                  \
  |  |  111|      0|        default:                                                    \
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 0, False: 32.3k]
  |  |  ------------------
  |  |  112|      0|            if ((c)->md_len > SHA256_DIGEST_LENGTH)                 \
  |  |  ------------------
  |  |  |  |   87|      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.3k|        }                                                           \
  |  |  120|  32.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (120:14): [Folded, False: 32.3k]
  |  |  ------------------
  ------------------
  278|  32.3k|#endif
  279|       |
  280|  32.3k|    return 1;
  281|  32.3k|}

threads_common.c:ossl_sa_CTX_TABLE_ENTRY_get:
   60|  2.94M|    {                                                                                                              \
   61|  2.94M|        return (type *)ossl_sa_get((OPENSSL_SA *)sa, n);                                                           \
   62|  2.94M|    }                                                                                                              \
threads_common.c:ossl_sa_CTX_TABLE_ENTRY_new:
   26|      4|    {                                                                                                              \
   27|      4|        return (SPARSE_ARRAY_OF(type) *)ossl_sa_new();                                                             \
   28|      4|    }                                                                                                              \
threads_common.c:ossl_sa_CTX_TABLE_ENTRY_set:
   66|     10|    {                                                                                                              \
   67|     10|        return ossl_sa_set((OPENSSL_SA *)sa, n, (void *)val);                                                      \
   68|     10|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_new:
   26|     32|    {                                                                                                              \
   27|     32|        return (SPARSE_ARRAY_OF(type) *)ossl_sa_new();                                                             \
   28|     32|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_get:
   60|  1.29M|    {                                                                                                              \
   61|  1.29M|        return (type *)ossl_sa_get((OPENSSL_SA *)sa, n);                                                           \
   62|  1.29M|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_set:
   66|    345|    {                                                                                                              \
   67|    345|        return ossl_sa_set((OPENSSL_SA *)sa, n, (void *)val);                                                      \
   68|    345|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_doall_arg:
   55|     24|    {                                                                                                              \
   56|     24|        ossl_sa_doall_arg((OPENSSL_SA *)sa,                                                                        \
   57|     24|            (void (*)(ossl_uintmax_t, void *, void *))leaf, arg);                                                  \
   58|     24|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_num:
   41|     24|    {                                                                                                              \
   42|     24|        return ossl_sa_num((OPENSSL_SA *)sa);                                                                      \
   43|     24|    }                                                                                                              \

s3_lib.c:ossl_assert_int:
   45|  14.5k|{
   46|  14.5k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 14.5k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  14.5k|    return expr;
   50|  14.5k|}
ssl_cert.c:ossl_assert_int:
   45|  7.36k|{
   46|  7.36k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 7.36k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  7.36k|    return expr;
   50|  7.36k|}
ssl_ciph.c:ossl_assert_int:
   45|  58.9k|{
   46|  58.9k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 58.9k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  58.9k|    return expr;
   50|  58.9k|}
ssl_lib.c:ossl_assert_int:
   45|  7.25k|{
   46|  7.25k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 7.25k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  7.25k|    return expr;
   50|  7.25k|}
tls13_enc.c:ossl_assert_int:
   45|  79.7k|{
   46|  79.7k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 79.7k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  79.7k|    return expr;
   50|  79.7k|}
rec_layer_s3.c:ossl_assert_int:
   45|  94.3k|{
   46|  94.3k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 94.3k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  94.3k|    return expr;
   50|  94.3k|}
tls_common.c:ossl_assert_int:
   45|   358k|{
   46|   358k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 358k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   358k|    return expr;
   50|   358k|}
extensions.c:ossl_assert_int:
   45|  18.1k|{
   46|  18.1k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 18.1k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  18.1k|    return expr;
   50|  18.1k|}
extensions_clnt.c:ossl_assert_int:
   45|  3.62k|{
   46|  3.62k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 3.62k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  3.62k|    return expr;
   50|  3.62k|}
extensions_srvr.c:ossl_assert_int:
   45|  3.62k|{
   46|  3.62k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 3.62k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  3.62k|    return expr;
   50|  3.62k|}
statem_clnt.c:ossl_assert_int:
   45|  7.16k|{
   46|  7.16k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 7.16k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  7.16k|    return expr;
   50|  7.16k|}
statem_lib.c:ossl_assert_int:
   45|  21.7k|{
   46|  21.7k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 21.7k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  21.7k|    return expr;
   50|  21.7k|}
statem_srvr.c:ossl_assert_int:
   45|  10.7k|{
   46|  10.7k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 10.7k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  10.7k|    return expr;
   50|  10.7k|}
bn_lib.c:ossl_assert_int:
   45|  73.1k|{
   46|  73.1k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 73.1k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  73.1k|    return expr;
   50|  73.1k|}
decoder_lib.c:ossl_assert_int:
   45|     86|{
   46|     86|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 86]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|     86|    return expr;
   50|     86|}
decoder_meth.c:ossl_assert_int:
   45|   369k|{
   46|   369k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 369k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   369k|    return expr;
   50|   369k|}
digest.c:ossl_assert_int:
   45|   746k|{
   46|   746k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 746k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   746k|    return expr;
   50|   746k|}
evp_enc.c:ossl_assert_int:
   45|   962k|{
   46|   962k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 962k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   962k|    return expr;
   50|   962k|}
evp_fetch.c:ossl_assert_int:
   45|  3.91M|{
   46|  3.91M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 3.91M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  3.91M|    return expr;
   50|  3.91M|}
exchange.c:ossl_assert_int:
   45|  7.25k|{
   46|  7.25k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 7.25k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  7.25k|    return expr;
   50|  7.25k|}
kem.c:ossl_assert_int:
   45|  14.5k|{
   46|  14.5k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 14.5k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  14.5k|    return expr;
   50|  14.5k|}
m_sigver.c:ossl_assert_int:
   45|  10.8k|{
   46|  10.8k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 10.8k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  10.8k|    return expr;
   50|  10.8k|}
p_lib.c:ossl_assert_int:
   45|   395k|{
   46|   395k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 395k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   395k|    return expr;
   50|   395k|}
pmeth_lib.c:ossl_assert_int:
   45|   238k|{
   46|   238k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 238k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   238k|    return expr;
   50|   238k|}
hmac.c:ossl_assert_int:
   45|   188k|{
   46|   188k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 188k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   188k|    return expr;
   50|   188k|}
core_fetch.c:ossl_assert_int:
   45|   117k|{
   46|   117k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 117k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   117k|    return expr;
   50|   117k|}
core_namemap.c:ossl_assert_int:
   45|    746|{
   46|    746|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 746]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|    746|    return expr;
   50|    746|}
packet.c:ossl_assert_int:
   45|  5.05M|{
   46|  5.05M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 5.05M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  5.05M|    return expr;
   50|  5.05M|}
passphrase.c:ossl_assert_int:
   45|  7.46k|{
   46|  7.46k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 7.46k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  7.46k|    return expr;
   50|  7.46k|}
provider_core.c:ossl_assert_int:
   45|   117k|{
   46|   117k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 117k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   117k|    return expr;
   50|   117k|}
threads_common.c:ossl_assert_int:
   45|  2.94M|{
   46|  2.94M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 2.94M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  2.94M|    return expr;
   50|  2.94M|}
threads_pthread.c:ossl_assert_int:
   45|  3.17M|{
   46|  3.17M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 3.17M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  3.17M|    return expr;
   50|  3.17M|}
defn_cache.c:ossl_assert_int:
   45|    782|{
   46|    782|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 782]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|    782|    return expr;
   50|    782|}
property.c:ossl_assert_int:
   45|    451|{
   46|    451|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 451]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|    451|    return expr;
   50|    451|}
x509_vfy.c:ossl_assert_int:
   45|  10.8k|{
   46|  10.8k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 10.8k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  10.8k|    return expr;
   50|  10.8k|}
x_pubkey.c:ossl_assert_int:
   45|  21.8k|{
   46|  21.8k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 21.8k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  21.8k|    return expr;
   50|  21.8k|}
drbg_ctr.c:ossl_assert_int:
   45|     16|{
   46|     16|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 16]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|     16|    return expr;
   50|     16|}
ecx_key.c:ossl_assert_int:
   45|  7.25k|{
   46|  7.25k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 7.25k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  7.25k|    return expr;
   50|  7.25k|}
ml_kem.c:ossl_assert_int:
   45|  18.1k|{
   46|  18.1k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 18.1k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  18.1k|    return expr;
   50|  18.1k|}
v3_addr.c:ossl_assert_int:
   45|  10.6k|{
   46|  10.6k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 10.6k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  10.6k|    return expr;
   50|  10.6k|}
v3_asid.c:ossl_assert_int:
   45|  10.6k|{
   46|  10.6k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 10.6k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  10.6k|    return expr;
   50|  10.6k|}

bn_lib.c:constant_time_select_int:
  358|  43.5k|{
  359|  43.5k|    return (int)constant_time_select(mask, (unsigned)(a), (unsigned)(b));
  360|  43.5k|}
bn_lib.c:constant_time_select:
  338|  43.5k|{
  339|  43.5k|    return (value_barrier(mask) & a) | (value_barrier(~mask) & b);
  340|  43.5k|}
bn_lib.c:value_barrier:
  277|  87.0k|{
  278|  87.0k|#if !defined(OPENSSL_NO_ASM) && defined(__GNUC__)
  279|  87.0k|    unsigned int r;
  280|  87.0k|    __asm__("" : "=r"(r) : "0"(a));
  281|       |#else
  282|       |    volatile unsigned int r = a;
  283|       |#endif
  284|  87.0k|    return r;
  285|  87.0k|}
bn_lib.c:constant_time_lt_bn:
  167|  29.0k|{
  168|  29.0k|    return constant_time_msb_bn(a ^ ((a ^ b) | ((a - b) ^ b)));
  169|  29.0k|}
bn_lib.c:constant_time_msb_bn:
  162|  43.5k|{
  163|  43.5k|    return 0 - (a >> (sizeof(a) * 8 - 1));
  164|  43.5k|}
bn_lib.c:constant_time_is_zero_bn:
  172|  14.5k|{
  173|  14.5k|    return constant_time_msb_bn(~a & (a - 1));
  174|  14.5k|}
bn_lib.c:constant_time_eq_bn:
  178|  3.62k|{
  179|  3.62k|    return constant_time_is_zero_bn(a ^ b);
  180|  3.62k|}
bn_lib.c:constant_time_msb:
  103|  43.5k|{
  104|  43.5k|    return 0 - (a >> (sizeof(a) * 8 - 1));
  105|  43.5k|}
bn_lib.c:constant_time_eq_int:
  260|  43.5k|{
  261|  43.5k|    return constant_time_eq((unsigned)(a), (unsigned)(b));
  262|  43.5k|}
bn_lib.c:constant_time_eq:
  239|  43.5k|{
  240|  43.5k|    return constant_time_is_zero(a ^ b);
  241|  43.5k|}
bn_lib.c:constant_time_is_zero:
  213|  43.5k|{
  214|  43.5k|    return constant_time_msb(~a & (a - 1));
  215|  43.5k|}
ml_kem.c:constant_time_lt_32:
  140|  16.7M|{
  141|  16.7M|    return constant_time_msb_32(a ^ ((a ^ b) | ((a - b) ^ b)));
  142|  16.7M|}
ml_kem.c:constant_time_msb_32:
  108|  16.7M|{
  109|  16.7M|    return 0 - (a >> 31);
  110|  16.7M|}
ml_kem.c:constant_time_eq_int_8:
  265|  3.62k|{
  266|  3.62k|    return constant_time_eq_8((unsigned)(a), (unsigned)(b));
  267|  3.62k|}
ml_kem.c:constant_time_eq_8:
  250|  3.62k|{
  251|  3.62k|    return (unsigned char)constant_time_eq(a, b);
  252|  3.62k|}
ml_kem.c:constant_time_eq:
  239|  3.62k|{
  240|  3.62k|    return constant_time_is_zero(a ^ b);
  241|  3.62k|}
ml_kem.c:constant_time_is_zero:
  213|  3.62k|{
  214|  3.62k|    return constant_time_msb(~a & (a - 1));
  215|  3.62k|}
ml_kem.c:constant_time_msb:
  103|  3.62k|{
  104|  3.62k|    return 0 - (a >> (sizeof(a) * 8 - 1));
  105|  3.62k|}
ml_kem.c:constant_time_select_8:
  352|   116k|{
  353|   116k|    return (unsigned char)constant_time_select(mask, a, b);
  354|   116k|}
ml_kem.c:constant_time_select:
  338|   116k|{
  339|   116k|    return (value_barrier(mask) & a) | (value_barrier(~mask) & b);
  340|   116k|}
ml_kem.c:value_barrier:
  277|   232k|{
  278|   232k|#if !defined(OPENSSL_NO_ASM) && defined(__GNUC__)
  279|   232k|    unsigned int r;
  280|   232k|    __asm__("" : "=r"(r) : "0"(a));
  281|       |#else
  282|       |    volatile unsigned int r = a;
  283|       |#endif
  284|   232k|    return r;
  285|   232k|}

core_namemap.c:ossl_ht_strcase:
  320|  1.92M|{
  321|  1.92M|    size_t i;
  322|       |#if defined(CHARSET_EBCDIC) && !defined(CHARSET_EBCDIC_TEST)
  323|       |    const long int case_adjust = ~0x40;
  324|       |#else
  325|  1.92M|    const long int case_adjust = ~0x20;
  326|  1.92M|#endif
  327|       |
  328|  1.92M|    if (src == NULL)
  ------------------
  |  Branch (328:9): [True: 0, False: 1.92M]
  ------------------
  329|      0|        return;
  330|       |
  331|       |    /*
  332|       |     * If we're passed a key, we're doing raw key copies
  333|       |     * so check that we don't overflow here, and truncate if
  334|       |     * we copy more space than we have available
  335|       |     */
  336|  1.92M|    if (key != NULL && key->keysize + len > key->bufsize)
  ------------------
  |  Branch (336:9): [True: 1.92M, False: 0]
  |  Branch (336:24): [True: 0, False: 1.92M]
  ------------------
  337|      0|        len = (size_t)(key->bufsize - key->keysize);
  338|       |
  339|  17.8M|    for (i = 0; i < len && src[i] != '\0'; i++)
  ------------------
  |  Branch (339:17): [True: 15.9M, False: 1.92M]
  |  Branch (339:28): [True: 15.9M, False: 0]
  ------------------
  340|  15.9M|        tgt[i] = case_adjust & src[i];
  341|  1.92M|}

array_alloc.c:ossl_size_mul:
   88|  1.78M|{
   89|  1.78M|    int err = 0;
   90|  1.78M|    *bytes = safe_mul_size_t(num, size, &err);
   91|       |
   92|  1.78M|    if (ossl_unlikely(err != 0)) {
  ------------------
  |  |   23|  1.78M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.78M]
  |  |  ------------------
  ------------------
   93|      0|        ossl_report_alloc_err_of(file, line);
   94|       |
   95|      0|        return false;
   96|      0|    }
   97|       |
   98|  1.78M|    return true;
   99|  1.78M|}

ssl_lib.c:PACKET_buf_init:
   83|  10.8k|{
   84|       |    /* Sanity check for negative values. */
   85|  10.8k|    if (len > (size_t)(SIZE_MAX / 2))
  ------------------
  |  Branch (85:9): [True: 0, False: 10.8k]
  ------------------
   86|      0|        return 0;
   87|       |
   88|  10.8k|    pkt->curr = pkt->msgstart = buf;
   89|  10.8k|    pkt->remaining = len;
   90|  10.8k|    return 1;
   91|  10.8k|}
ssl_lib.c:PACKET_get_length_prefixed_1:
  549|  14.5k|{
  550|  14.5k|    unsigned int length;
  551|  14.5k|    const unsigned char *data;
  552|  14.5k|    PACKET tmp = *pkt;
  553|  14.5k|    if (!PACKET_get_1(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
  ------------------
  |  Branch (553:9): [True: 4, False: 14.5k]
  |  Branch (553:41): [True: 0, False: 14.5k]
  ------------------
  554|      4|        return 0;
  555|      4|    }
  556|       |
  557|  14.5k|    *pkt = tmp;
  558|  14.5k|    subpkt->curr = data;
  559|  14.5k|    subpkt->msgstart = pkt->msgstart;
  560|  14.5k|    subpkt->remaining = length;
  561|       |
  562|  14.5k|    return 1;
  563|  14.5k|}
ssl_lib.c:PACKET_get_1:
  335|  14.5k|{
  336|  14.5k|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (336:9): [True: 4, False: 14.5k]
  ------------------
  337|      4|        return 0;
  338|       |
  339|  14.5k|    packet_forward(pkt, 1);
  340|       |
  341|  14.5k|    return 1;
  342|  14.5k|}
ssl_lib.c:PACKET_peek_1:
  324|  14.5k|{
  325|  14.5k|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (325:9): [True: 4, False: 14.5k]
  ------------------
  326|      4|        return 0;
  327|       |
  328|  14.5k|    *data = *pkt->curr;
  329|       |
  330|  14.5k|    return 1;
  331|  14.5k|}
ssl_lib.c:packet_forward:
   33|   137k|{
   34|   137k|    pkt->curr += len;
   35|   137k|    pkt->remaining -= len;
   36|   137k|}
ssl_lib.c:PACKET_get_bytes:
  416|  14.5k|{
  417|  14.5k|    if (!PACKET_peek_bytes(pkt, data, len))
  ------------------
  |  Branch (417:9): [True: 0, False: 14.5k]
  ------------------
  418|      0|        return 0;
  419|       |
  420|  14.5k|    packet_forward(pkt, len);
  421|       |
  422|  14.5k|    return 1;
  423|  14.5k|}
ssl_lib.c:PACKET_peek_bytes:
  398|  14.5k|{
  399|  14.5k|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (399:9): [True: 0, False: 14.5k]
  ------------------
  400|      0|        return 0;
  401|       |
  402|  14.5k|    *data = pkt->curr;
  403|       |
  404|  14.5k|    return 1;
  405|  14.5k|}
ssl_lib.c:PACKET_remaining:
   42|   192k|{
   43|   192k|    return pkt->remaining;
   44|   192k|}
ssl_lib.c:PACKET_data:
   71|  14.5k|{
   72|  14.5k|    return pkt->curr;
   73|  14.5k|}
ssl_lib.c:PACKET_equal:
  107|  7.25k|{
  108|  7.25k|    if (PACKET_remaining(pkt) != num)
  ------------------
  |  Branch (108:9): [True: 3.59k, False: 3.66k]
  ------------------
  109|  3.59k|        return 0;
  110|  3.66k|    return CRYPTO_memcmp(pkt->curr, ptr, num) == 0;
  ------------------
  |  |  332|  3.66k|#define CRYPTO_memcmp memcmp
  ------------------
  111|  7.25k|}
ssl_lib.c:PACKET_memdup:
  484|  3.62k|{
  485|  3.62k|    size_t length;
  486|       |
  487|  3.62k|    OPENSSL_free(*data);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  488|  3.62k|    *data = NULL;
  489|  3.62k|    *len = 0;
  490|       |
  491|  3.62k|    length = PACKET_remaining(pkt);
  492|       |
  493|  3.62k|    if (length == 0)
  ------------------
  |  Branch (493:9): [True: 0, False: 3.62k]
  ------------------
  494|      0|        return 1;
  495|       |
  496|  3.62k|    *data = OPENSSL_memdup(pkt->curr, length);
  ------------------
  |  |  134|  3.62k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  497|  3.62k|    if (*data == NULL)
  ------------------
  |  Branch (497:9): [True: 0, False: 3.62k]
  ------------------
  498|      0|        return 0;
  499|       |
  500|  3.62k|    *len = length;
  501|  3.62k|    return 1;
  502|  3.62k|}
ssl_lib.c:PACKET_copy_bytes:
  444|   112k|{
  445|   112k|    if (!PACKET_peek_copy_bytes(pkt, data, len))
  ------------------
  |  Branch (445:9): [True: 3.62k, False: 108k]
  ------------------
  446|  3.62k|        return 0;
  447|       |
  448|   108k|    packet_forward(pkt, len);
  449|       |
  450|   108k|    return 1;
  451|   112k|}
ssl_lib.c:PACKET_peek_copy_bytes:
  429|   112k|{
  430|   112k|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (430:9): [True: 3.62k, False: 108k]
  ------------------
  431|  3.62k|        return 0;
  432|       |
  433|   108k|    memcpy(data, pkt->curr, len);
  434|       |
  435|   108k|    return 1;
  436|   112k|}
t1_lib.c:PACKET_remaining:
   42|   145k|{
   43|   145k|    return pkt->remaining;
   44|   145k|}
t1_lib.c:PACKET_get_net_2:
  166|   137k|{
  167|   137k|    if (!PACKET_peek_net_2(pkt, data))
  ------------------
  |  Branch (167:9): [True: 0, False: 137k]
  ------------------
  168|      0|        return 0;
  169|       |
  170|   137k|    packet_forward(pkt, 2);
  171|       |
  172|   137k|    return 1;
  173|   137k|}
t1_lib.c:PACKET_peek_net_2:
  153|   137k|{
  154|   137k|    if (PACKET_remaining(pkt) < 2)
  ------------------
  |  Branch (154:9): [True: 0, False: 137k]
  ------------------
  155|      0|        return 0;
  156|       |
  157|   137k|    *data = ((unsigned int)(*pkt->curr)) << 8;
  158|   137k|    *data |= *(pkt->curr + 1);
  159|       |
  160|   137k|    return 1;
  161|   137k|}
t1_lib.c:packet_forward:
   33|   137k|{
   34|   137k|    pkt->curr += len;
   35|   137k|    pkt->remaining -= len;
   36|   137k|}
rec_layer_s3.c:PACKET_buf_init:
   83|  3.01k|{
   84|       |    /* Sanity check for negative values. */
   85|  3.01k|    if (len > (size_t)(SIZE_MAX / 2))
  ------------------
  |  Branch (85:9): [True: 0, False: 3.01k]
  ------------------
   86|      0|        return 0;
   87|       |
   88|  3.01k|    pkt->curr = pkt->msgstart = buf;
   89|  3.01k|    pkt->remaining = len;
   90|  3.01k|    return 1;
   91|  3.01k|}
rec_layer_s3.c:PACKET_get_1:
  335|  6.03k|{
  336|  6.03k|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (336:9): [True: 0, False: 6.03k]
  ------------------
  337|      0|        return 0;
  338|       |
  339|  6.03k|    packet_forward(pkt, 1);
  340|       |
  341|  6.03k|    return 1;
  342|  6.03k|}
rec_layer_s3.c:PACKET_peek_1:
  324|  6.03k|{
  325|  6.03k|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (325:9): [True: 0, False: 6.03k]
  ------------------
  326|      0|        return 0;
  327|       |
  328|  6.03k|    *data = *pkt->curr;
  329|       |
  330|  6.03k|    return 1;
  331|  6.03k|}
rec_layer_s3.c:packet_forward:
   33|  6.03k|{
   34|  6.03k|    pkt->curr += len;
   35|  6.03k|    pkt->remaining -= len;
   36|  6.03k|}
rec_layer_s3.c:PACKET_remaining:
   42|  9.04k|{
   43|  9.04k|    return pkt->remaining;
   44|  9.04k|}
tls_common.c:PACKET_buf_init:
   83|  46.9k|{
   84|       |    /* Sanity check for negative values. */
   85|  46.9k|    if (len > (size_t)(SIZE_MAX / 2))
  ------------------
  |  Branch (85:9): [True: 0, False: 46.9k]
  ------------------
   86|      0|        return 0;
   87|       |
   88|  46.9k|    pkt->curr = pkt->msgstart = buf;
   89|  46.9k|    pkt->remaining = len;
   90|  46.9k|    return 1;
   91|  46.9k|}
tls_common.c:PACKET_get_1:
  335|  46.9k|{
  336|  46.9k|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (336:9): [True: 0, False: 46.9k]
  ------------------
  337|      0|        return 0;
  338|       |
  339|  46.9k|    packet_forward(pkt, 1);
  340|       |
  341|  46.9k|    return 1;
  342|  46.9k|}
tls_common.c:PACKET_peek_1:
  324|  46.9k|{
  325|  46.9k|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (325:9): [True: 0, False: 46.9k]
  ------------------
  326|      0|        return 0;
  327|       |
  328|  46.9k|    *data = *pkt->curr;
  329|       |
  330|  46.9k|    return 1;
  331|  46.9k|}
tls_common.c:PACKET_remaining:
   42|   140k|{
   43|   140k|    return pkt->remaining;
   44|   140k|}
tls_common.c:packet_forward:
   33|   140k|{
   34|   140k|    pkt->curr += len;
   35|   140k|    pkt->remaining -= len;
   36|   140k|}
tls_common.c:PACKET_get_net_2:
  166|  93.9k|{
  167|  93.9k|    if (!PACKET_peek_net_2(pkt, data))
  ------------------
  |  Branch (167:9): [True: 0, False: 93.9k]
  ------------------
  168|      0|        return 0;
  169|       |
  170|  93.9k|    packet_forward(pkt, 2);
  171|       |
  172|  93.9k|    return 1;
  173|  93.9k|}
tls_common.c:PACKET_peek_net_2:
  153|  93.9k|{
  154|  93.9k|    if (PACKET_remaining(pkt) < 2)
  ------------------
  |  Branch (154:9): [True: 0, False: 93.9k]
  ------------------
  155|      0|        return 0;
  156|       |
  157|  93.9k|    *data = ((unsigned int)(*pkt->curr)) << 8;
  158|  93.9k|    *data |= *(pkt->curr + 1);
  159|       |
  160|  93.9k|    return 1;
  161|  93.9k|}
tls_common.c:PACKET_get_net_2_len:
  177|  46.9k|{
  178|  46.9k|    unsigned int i;
  179|  46.9k|    int ret = PACKET_get_net_2(pkt, &i);
  180|       |
  181|  46.9k|    if (ret)
  ------------------
  |  Branch (181:9): [True: 46.9k, False: 0]
  ------------------
  182|  46.9k|        *data = (size_t)i;
  183|       |
  184|  46.9k|    return ret;
  185|  46.9k|}
extensions.c:PACKET_remaining:
   42|   239k|{
   43|   239k|    return pkt->remaining;
   44|   239k|}
extensions.c:PACKET_get_net_2:
  166|   108k|{
  167|   108k|    if (!PACKET_peek_net_2(pkt, data))
  ------------------
  |  Branch (167:9): [True: 0, False: 108k]
  ------------------
  168|      0|        return 0;
  169|       |
  170|   108k|    packet_forward(pkt, 2);
  171|       |
  172|   108k|    return 1;
  173|   108k|}
extensions.c:PACKET_peek_net_2:
  153|   108k|{
  154|   108k|    if (PACKET_remaining(pkt) < 2)
  ------------------
  |  Branch (154:9): [True: 0, False: 108k]
  ------------------
  155|      0|        return 0;
  156|       |
  157|   108k|    *data = ((unsigned int)(*pkt->curr)) << 8;
  158|   108k|    *data |= *(pkt->curr + 1);
  159|       |
  160|   108k|    return 1;
  161|   108k|}
extensions.c:packet_forward:
   33|   163k|{
   34|   163k|    pkt->curr += len;
   35|   163k|    pkt->remaining -= len;
   36|   163k|}
extensions.c:PACKET_get_length_prefixed_2:
  596|  54.4k|{
  597|  54.4k|    unsigned int length;
  598|  54.4k|    const unsigned char *data;
  599|  54.4k|    PACKET tmp = *pkt;
  600|       |
  601|  54.4k|    if (!PACKET_get_net_2(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
  ------------------
  |  Branch (601:9): [True: 0, False: 54.4k]
  |  Branch (601:45): [True: 0, False: 54.4k]
  ------------------
  602|      0|        return 0;
  603|      0|    }
  604|       |
  605|  54.4k|    *pkt = tmp;
  606|  54.4k|    subpkt->curr = data;
  607|  54.4k|    subpkt->msgstart = pkt->msgstart;
  608|  54.4k|    subpkt->remaining = length;
  609|       |
  610|  54.4k|    return 1;
  611|  54.4k|}
extensions.c:PACKET_get_bytes:
  416|  54.4k|{
  417|  54.4k|    if (!PACKET_peek_bytes(pkt, data, len))
  ------------------
  |  Branch (417:9): [True: 0, False: 54.4k]
  ------------------
  418|      0|        return 0;
  419|       |
  420|  54.4k|    packet_forward(pkt, len);
  421|       |
  422|  54.4k|    return 1;
  423|  54.4k|}
extensions.c:PACKET_peek_bytes:
  398|  54.4k|{
  399|  54.4k|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (399:9): [True: 0, False: 54.4k]
  ------------------
  400|      0|        return 0;
  401|       |
  402|  54.4k|    *data = pkt->curr;
  403|       |
  404|  54.4k|    return 1;
  405|  54.4k|}
extensions_clnt.c:PACKET_buf_init:
   83|  3.62k|{
   84|       |    /* Sanity check for negative values. */
   85|  3.62k|    if (len > (size_t)(SIZE_MAX / 2))
  ------------------
  |  Branch (85:9): [True: 0, False: 3.62k]
  ------------------
   86|      0|        return 0;
   87|       |
   88|  3.62k|    pkt->curr = pkt->msgstart = buf;
   89|  3.62k|    pkt->remaining = len;
   90|  3.62k|    return 1;
   91|  3.62k|}
extensions_clnt.c:PACKET_get_length_prefixed_1:
  549|  7.25k|{
  550|  7.25k|    unsigned int length;
  551|  7.25k|    const unsigned char *data;
  552|  7.25k|    PACKET tmp = *pkt;
  553|  7.25k|    if (!PACKET_get_1(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
  ------------------
  |  Branch (553:9): [True: 0, False: 7.25k]
  |  Branch (553:41): [True: 0, False: 7.25k]
  ------------------
  554|      0|        return 0;
  555|      0|    }
  556|       |
  557|  7.25k|    *pkt = tmp;
  558|  7.25k|    subpkt->curr = data;
  559|  7.25k|    subpkt->msgstart = pkt->msgstart;
  560|  7.25k|    subpkt->remaining = length;
  561|       |
  562|  7.25k|    return 1;
  563|  7.25k|}
extensions_clnt.c:PACKET_get_1_len:
  346|  3.62k|{
  347|  3.62k|    unsigned int i;
  348|  3.62k|    int ret = PACKET_get_1(pkt, &i);
  349|       |
  350|  3.62k|    if (ret)
  ------------------
  |  Branch (350:9): [True: 3.62k, False: 0]
  ------------------
  351|  3.62k|        *data = (size_t)i;
  352|       |
  353|  3.62k|    return ret;
  354|  3.62k|}
extensions_clnt.c:PACKET_remaining:
   42|  68.9k|{
   43|  68.9k|    return pkt->remaining;
   44|  68.9k|}
extensions_clnt.c:PACKET_get_bytes:
  416|  10.8k|{
  417|  10.8k|    if (!PACKET_peek_bytes(pkt, data, len))
  ------------------
  |  Branch (417:9): [True: 0, False: 10.8k]
  ------------------
  418|      0|        return 0;
  419|       |
  420|  10.8k|    packet_forward(pkt, len);
  421|       |
  422|  10.8k|    return 1;
  423|  10.8k|}
extensions_clnt.c:PACKET_peek_bytes:
  398|  10.8k|{
  399|  10.8k|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (399:9): [True: 0, False: 10.8k]
  ------------------
  400|      0|        return 0;
  401|       |
  402|  10.8k|    *data = pkt->curr;
  403|       |
  404|  10.8k|    return 1;
  405|  10.8k|}
extensions_clnt.c:packet_forward:
   33|  39.9k|{
   34|  39.9k|    pkt->curr += len;
   35|  39.9k|    pkt->remaining -= len;
   36|  39.9k|}
extensions_clnt.c:PACKET_get_1:
  335|  10.8k|{
  336|  10.8k|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (336:9): [True: 0, False: 10.8k]
  ------------------
  337|      0|        return 0;
  338|       |
  339|  10.8k|    packet_forward(pkt, 1);
  340|       |
  341|  10.8k|    return 1;
  342|  10.8k|}
extensions_clnt.c:PACKET_peek_1:
  324|  10.8k|{
  325|  10.8k|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (325:9): [True: 0, False: 10.8k]
  ------------------
  326|      0|        return 0;
  327|       |
  328|  10.8k|    *data = *pkt->curr;
  329|       |
  330|  10.8k|    return 1;
  331|  10.8k|}
extensions_clnt.c:PACKET_copy_bytes:
  444|  3.62k|{
  445|  3.62k|    if (!PACKET_peek_copy_bytes(pkt, data, len))
  ------------------
  |  Branch (445:9): [True: 0, False: 3.62k]
  ------------------
  446|      0|        return 0;
  447|       |
  448|  3.62k|    packet_forward(pkt, len);
  449|       |
  450|  3.62k|    return 1;
  451|  3.62k|}
extensions_clnt.c:PACKET_peek_copy_bytes:
  429|  3.62k|{
  430|  3.62k|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (430:9): [True: 0, False: 3.62k]
  ------------------
  431|      0|        return 0;
  432|       |
  433|  3.62k|    memcpy(data, pkt->curr, len);
  434|       |
  435|  3.62k|    return 1;
  436|  3.62k|}
extensions_clnt.c:PACKET_data:
   71|  10.9k|{
   72|  10.9k|    return pkt->curr;
   73|  10.9k|}
extensions_clnt.c:PACKET_get_net_2_len:
  177|  3.62k|{
  178|  3.62k|    unsigned int i;
  179|  3.62k|    int ret = PACKET_get_net_2(pkt, &i);
  180|       |
  181|  3.62k|    if (ret)
  ------------------
  |  Branch (181:9): [True: 3.62k, False: 0]
  ------------------
  182|  3.62k|        *data = (size_t)i;
  183|       |
  184|  3.62k|    return ret;
  185|  3.62k|}
extensions_clnt.c:PACKET_get_net_2:
  166|  14.5k|{
  167|  14.5k|    if (!PACKET_peek_net_2(pkt, data))
  ------------------
  |  Branch (167:9): [True: 0, False: 14.5k]
  ------------------
  168|      0|        return 0;
  169|       |
  170|  14.5k|    packet_forward(pkt, 2);
  171|       |
  172|  14.5k|    return 1;
  173|  14.5k|}
extensions_clnt.c:PACKET_peek_net_2:
  153|  14.5k|{
  154|  14.5k|    if (PACKET_remaining(pkt) < 2)
  ------------------
  |  Branch (154:9): [True: 0, False: 14.5k]
  ------------------
  155|      0|        return 0;
  156|       |
  157|  14.5k|    *data = ((unsigned int)(*pkt->curr)) << 8;
  158|  14.5k|    *data |= *(pkt->curr + 1);
  159|       |
  160|  14.5k|    return 1;
  161|  14.5k|}
extensions_clnt.c:PACKET_as_length_prefixed_2:
  619|  3.62k|{
  620|  3.62k|    unsigned int length;
  621|  3.62k|    const unsigned char *data;
  622|  3.62k|    PACKET tmp = *pkt;
  623|       |
  624|  3.62k|    if (!PACKET_get_net_2(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length) || PACKET_remaining(&tmp) != 0) {
  ------------------
  |  Branch (624:9): [True: 0, False: 3.62k]
  |  Branch (624:45): [True: 0, False: 3.62k]
  |  Branch (624:95): [True: 0, False: 3.62k]
  ------------------
  625|      0|        return 0;
  626|      0|    }
  627|       |
  628|  3.62k|    *pkt = tmp;
  629|  3.62k|    subpkt->curr = data;
  630|  3.62k|    subpkt->msgstart = pkt->msgstart;
  631|  3.62k|    subpkt->remaining = length;
  632|       |
  633|  3.62k|    return 1;
  634|  3.62k|}
extensions_srvr.c:PACKET_get_1:
  335|  21.7k|{
  336|  21.7k|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (336:9): [True: 3.62k, False: 18.1k]
  ------------------
  337|  3.62k|        return 0;
  338|       |
  339|  18.1k|    packet_forward(pkt, 1);
  340|       |
  341|  18.1k|    return 1;
  342|  21.7k|}
extensions_srvr.c:PACKET_peek_1:
  324|  21.7k|{
  325|  21.7k|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (325:9): [True: 3.62k, False: 18.1k]
  ------------------
  326|  3.62k|        return 0;
  327|       |
  328|  18.1k|    *data = *pkt->curr;
  329|       |
  330|  18.1k|    return 1;
  331|  21.7k|}
extensions_srvr.c:packet_forward:
   33|  94.3k|{
   34|  94.3k|    pkt->curr += len;
   35|  94.3k|    pkt->remaining -= len;
   36|  94.3k|}
extensions_srvr.c:PACKET_get_bytes:
  416|  39.9k|{
  417|  39.9k|    if (!PACKET_peek_bytes(pkt, data, len))
  ------------------
  |  Branch (417:9): [True: 0, False: 39.9k]
  ------------------
  418|      0|        return 0;
  419|       |
  420|  39.9k|    packet_forward(pkt, len);
  421|       |
  422|  39.9k|    return 1;
  423|  39.9k|}
extensions_srvr.c:PACKET_peek_bytes:
  398|  39.9k|{
  399|  39.9k|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (399:9): [True: 0, False: 39.9k]
  ------------------
  400|      0|        return 0;
  401|       |
  402|  39.9k|    *data = pkt->curr;
  403|       |
  404|  39.9k|    return 1;
  405|  39.9k|}
extensions_srvr.c:PACKET_as_length_prefixed_2:
  619|  21.7k|{
  620|  21.7k|    unsigned int length;
  621|  21.7k|    const unsigned char *data;
  622|  21.7k|    PACKET tmp = *pkt;
  623|       |
  624|  21.7k|    if (!PACKET_get_net_2(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length) || PACKET_remaining(&tmp) != 0) {
  ------------------
  |  Branch (624:9): [True: 0, False: 21.7k]
  |  Branch (624:45): [True: 0, False: 21.7k]
  |  Branch (624:95): [True: 0, False: 21.7k]
  ------------------
  625|      0|        return 0;
  626|      0|    }
  627|       |
  628|  21.7k|    *pkt = tmp;
  629|  21.7k|    subpkt->curr = data;
  630|  21.7k|    subpkt->msgstart = pkt->msgstart;
  631|  21.7k|    subpkt->remaining = length;
  632|       |
  633|  21.7k|    return 1;
  634|  21.7k|}
extensions_srvr.c:PACKET_remaining:
   42|   195k|{
   43|   195k|    return pkt->remaining;
   44|   195k|}
extensions_srvr.c:PACKET_contains_zero_byte:
  525|  3.62k|{
  526|       |    return memchr(pkt->curr, 0, pkt->remaining) != NULL;
  527|  3.62k|}
extensions_srvr.c:PACKET_strndup:
  515|  3.62k|{
  516|  3.62k|    OPENSSL_free(*data);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  517|       |
  518|       |    /* This will succeed on an empty packet, unless pkt->curr == NULL. */
  519|  3.62k|    *data = OPENSSL_strndup((const char *)pkt->curr, PACKET_remaining(pkt));
  ------------------
  |  |  138|  3.62k|    CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  520|       |    return (*data != NULL);
  521|  3.62k|}
extensions_srvr.c:PACKET_as_length_prefixed_1:
  571|  3.62k|{
  572|  3.62k|    unsigned int length;
  573|  3.62k|    const unsigned char *data;
  574|  3.62k|    PACKET tmp = *pkt;
  575|  3.62k|    if (!PACKET_get_1(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length) || PACKET_remaining(&tmp) != 0) {
  ------------------
  |  Branch (575:9): [True: 0, False: 3.62k]
  |  Branch (575:41): [True: 0, False: 3.62k]
  |  Branch (575:91): [True: 0, False: 3.62k]
  ------------------
  576|      0|        return 0;
  577|      0|    }
  578|       |
  579|  3.62k|    *pkt = tmp;
  580|  3.62k|    subpkt->curr = data;
  581|  3.62k|    subpkt->msgstart = pkt->msgstart;
  582|  3.62k|    subpkt->remaining = length;
  583|       |
  584|  3.62k|    return 1;
  585|  3.62k|}
extensions_srvr.c:PACKET_memdup:
  484|  3.62k|{
  485|  3.62k|    size_t length;
  486|       |
  487|  3.62k|    OPENSSL_free(*data);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  488|  3.62k|    *data = NULL;
  489|  3.62k|    *len = 0;
  490|       |
  491|  3.62k|    length = PACKET_remaining(pkt);
  492|       |
  493|  3.62k|    if (length == 0)
  ------------------
  |  Branch (493:9): [True: 0, False: 3.62k]
  ------------------
  494|      0|        return 1;
  495|       |
  496|  3.62k|    *data = OPENSSL_memdup(pkt->curr, length);
  ------------------
  |  |  134|  3.62k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  497|  3.62k|    if (*data == NULL)
  ------------------
  |  Branch (497:9): [True: 0, False: 3.62k]
  ------------------
  498|      0|        return 0;
  499|       |
  500|  3.62k|    *len = length;
  501|  3.62k|    return 1;
  502|  3.62k|}
extensions_srvr.c:PACKET_data:
   71|  3.62k|{
   72|  3.62k|    return pkt->curr;
   73|  3.62k|}
extensions_srvr.c:PACKET_get_length_prefixed_2:
  596|  7.25k|{
  597|  7.25k|    unsigned int length;
  598|  7.25k|    const unsigned char *data;
  599|  7.25k|    PACKET tmp = *pkt;
  600|       |
  601|  7.25k|    if (!PACKET_get_net_2(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
  ------------------
  |  Branch (601:9): [True: 0, False: 7.25k]
  |  Branch (601:45): [True: 0, False: 7.25k]
  ------------------
  602|      0|        return 0;
  603|      0|    }
  604|       |
  605|  7.25k|    *pkt = tmp;
  606|  7.25k|    subpkt->curr = data;
  607|  7.25k|    subpkt->msgstart = pkt->msgstart;
  608|  7.25k|    subpkt->remaining = length;
  609|       |
  610|  7.25k|    return 1;
  611|  7.25k|}
extensions_srvr.c:PACKET_get_length_prefixed_1:
  549|  7.25k|{
  550|  7.25k|    unsigned int length;
  551|  7.25k|    const unsigned char *data;
  552|  7.25k|    PACKET tmp = *pkt;
  553|  7.25k|    if (!PACKET_get_1(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
  ------------------
  |  Branch (553:9): [True: 0, False: 7.25k]
  |  Branch (553:41): [True: 0, False: 7.25k]
  ------------------
  554|      0|        return 0;
  555|      0|    }
  556|       |
  557|  7.25k|    *pkt = tmp;
  558|  7.25k|    subpkt->curr = data;
  559|  7.25k|    subpkt->msgstart = pkt->msgstart;
  560|  7.25k|    subpkt->remaining = length;
  561|       |
  562|  7.25k|    return 1;
  563|  7.25k|}
extensions_srvr.c:PACKET_get_net_2:
  166|  36.2k|{
  167|  36.2k|    if (!PACKET_peek_net_2(pkt, data))
  ------------------
  |  Branch (167:9): [True: 0, False: 36.2k]
  ------------------
  168|      0|        return 0;
  169|       |
  170|  36.2k|    packet_forward(pkt, 2);
  171|       |
  172|  36.2k|    return 1;
  173|  36.2k|}
extensions_srvr.c:PACKET_peek_net_2:
  153|  36.2k|{
  154|  36.2k|    if (PACKET_remaining(pkt) < 2)
  ------------------
  |  Branch (154:9): [True: 0, False: 36.2k]
  ------------------
  155|      0|        return 0;
  156|       |
  157|  36.2k|    *data = ((unsigned int)(*pkt->curr)) << 8;
  158|  36.2k|    *data |= *(pkt->curr + 1);
  159|       |
  160|  36.2k|    return 1;
  161|  36.2k|}
statem.c:PACKET_buf_init:
   83|  32.5k|{
   84|       |    /* Sanity check for negative values. */
   85|  32.5k|    if (len > (size_t)(SIZE_MAX / 2))
  ------------------
  |  Branch (85:9): [True: 0, False: 32.5k]
  ------------------
   86|      0|        return 0;
   87|       |
   88|  32.5k|    pkt->curr = pkt->msgstart = buf;
   89|  32.5k|    pkt->remaining = len;
   90|  32.5k|    return 1;
   91|  32.5k|}
statem.c:PACKET_forward:
  531|  32.5k|{
  532|  32.5k|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (532:9): [True: 0, False: 32.5k]
  ------------------
  533|      0|        return 0;
  534|       |
  535|  32.5k|    packet_forward(pkt, len);
  536|       |
  537|  32.5k|    return 1;
  538|  32.5k|}
statem.c:PACKET_remaining:
   42|  32.5k|{
   43|  32.5k|    return pkt->remaining;
   44|  32.5k|}
statem.c:packet_forward:
   33|  32.5k|{
   34|  32.5k|    pkt->curr += len;
   35|  32.5k|    pkt->remaining -= len;
   36|  32.5k|}
statem_clnt.c:packet_forward:
   33|   115k|{
   34|   115k|    pkt->curr += len;
   35|   115k|    pkt->remaining -= len;
   36|   115k|}
statem_clnt.c:PACKET_get_length_prefixed_1:
  549|  10.7k|{
  550|  10.7k|    unsigned int length;
  551|  10.7k|    const unsigned char *data;
  552|  10.7k|    PACKET tmp = *pkt;
  553|  10.7k|    if (!PACKET_get_1(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
  ------------------
  |  Branch (553:9): [True: 0, False: 10.7k]
  |  Branch (553:41): [True: 0, False: 10.7k]
  ------------------
  554|      0|        return 0;
  555|      0|    }
  556|       |
  557|  10.7k|    *pkt = tmp;
  558|  10.7k|    subpkt->curr = data;
  559|  10.7k|    subpkt->msgstart = pkt->msgstart;
  560|  10.7k|    subpkt->remaining = length;
  561|       |
  562|  10.7k|    return 1;
  563|  10.7k|}
statem_clnt.c:PACKET_remaining:
   42|   194k|{
   43|   194k|    return pkt->remaining;
   44|   194k|}
statem_clnt.c:PACKET_copy_bytes:
  444|  10.7k|{
  445|  10.7k|    if (!PACKET_peek_copy_bytes(pkt, data, len))
  ------------------
  |  Branch (445:9): [True: 0, False: 10.7k]
  ------------------
  446|      0|        return 0;
  447|       |
  448|  10.7k|    packet_forward(pkt, len);
  449|       |
  450|  10.7k|    return 1;
  451|  10.7k|}
statem_clnt.c:PACKET_peek_copy_bytes:
  429|  10.7k|{
  430|  10.7k|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (430:9): [True: 0, False: 10.7k]
  ------------------
  431|      0|        return 0;
  432|       |
  433|  10.7k|    memcpy(data, pkt->curr, len);
  434|       |
  435|  10.7k|    return 1;
  436|  10.7k|}
statem_clnt.c:PACKET_peek_bytes:
  398|  39.7k|{
  399|  39.7k|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (399:9): [True: 0, False: 39.7k]
  ------------------
  400|      0|        return 0;
  401|       |
  402|  39.7k|    *data = pkt->curr;
  403|       |
  404|  39.7k|    return 1;
  405|  39.7k|}
statem_clnt.c:PACKET_get_net_2:
  166|  28.8k|{
  167|  28.8k|    if (!PACKET_peek_net_2(pkt, data))
  ------------------
  |  Branch (167:9): [True: 0, False: 28.8k]
  ------------------
  168|      0|        return 0;
  169|       |
  170|  28.8k|    packet_forward(pkt, 2);
  171|       |
  172|  28.8k|    return 1;
  173|  28.8k|}
statem_clnt.c:PACKET_peek_net_2:
  153|  28.8k|{
  154|  28.8k|    if (PACKET_remaining(pkt) < 2)
  ------------------
  |  Branch (154:9): [True: 0, False: 28.8k]
  ------------------
  155|      0|        return 0;
  156|       |
  157|  28.8k|    *data = ((unsigned int)(*pkt->curr)) << 8;
  158|  28.8k|    *data |= *(pkt->curr + 1);
  159|       |
  160|  28.8k|    return 1;
  161|  28.8k|}
statem_clnt.c:PACKET_data:
   71|  14.4k|{
   72|  14.4k|    return pkt->curr;
   73|  14.4k|}
statem_clnt.c:PACKET_get_bytes:
  416|  36.1k|{
  417|  36.1k|    if (!PACKET_peek_bytes(pkt, data, len))
  ------------------
  |  Branch (417:9): [True: 0, False: 36.1k]
  ------------------
  418|      0|        return 0;
  419|       |
  420|  36.1k|    packet_forward(pkt, len);
  421|       |
  422|  36.1k|    return 1;
  423|  36.1k|}
statem_clnt.c:PACKET_get_1:
  335|  18.0k|{
  336|  18.0k|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (336:9): [True: 0, False: 18.0k]
  ------------------
  337|      0|        return 0;
  338|       |
  339|  18.0k|    packet_forward(pkt, 1);
  340|       |
  341|  18.0k|    return 1;
  342|  18.0k|}
statem_clnt.c:PACKET_peek_1:
  324|  18.0k|{
  325|  18.0k|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (325:9): [True: 0, False: 18.0k]
  ------------------
  326|      0|        return 0;
  327|       |
  328|  18.0k|    *data = *pkt->curr;
  329|       |
  330|  18.0k|    return 1;
  331|  18.0k|}
statem_clnt.c:PACKET_null_init:
   95|  7.16k|{
   96|       |    pkt->curr = pkt->msgstart = NULL;
   97|  7.16k|    pkt->remaining = 0;
   98|  7.16k|}
statem_clnt.c:PACKET_as_length_prefixed_2:
  619|  14.4k|{
  620|  14.4k|    unsigned int length;
  621|  14.4k|    const unsigned char *data;
  622|  14.4k|    PACKET tmp = *pkt;
  623|       |
  624|  14.4k|    if (!PACKET_get_net_2(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length) || PACKET_remaining(&tmp) != 0) {
  ------------------
  |  Branch (624:9): [True: 0, False: 14.4k]
  |  Branch (624:45): [True: 0, False: 14.4k]
  |  Branch (624:95): [True: 0, False: 14.4k]
  ------------------
  625|      0|        return 0;
  626|      0|    }
  627|       |
  628|  14.4k|    *pkt = tmp;
  629|  14.4k|    subpkt->curr = data;
  630|  14.4k|    subpkt->msgstart = pkt->msgstart;
  631|  14.4k|    subpkt->remaining = length;
  632|       |
  633|  14.4k|    return 1;
  634|  14.4k|}
statem_clnt.c:PACKET_get_net_3:
  207|  7.25k|{
  208|  7.25k|    if (!PACKET_peek_net_3(pkt, data))
  ------------------
  |  Branch (208:9): [True: 0, False: 7.25k]
  ------------------
  209|      0|        return 0;
  210|       |
  211|  7.25k|    packet_forward(pkt, 3);
  212|       |
  213|  7.25k|    return 1;
  214|  7.25k|}
statem_clnt.c:PACKET_peek_net_3:
  193|  7.25k|{
  194|  7.25k|    if (PACKET_remaining(pkt) < 3)
  ------------------
  |  Branch (194:9): [True: 0, False: 7.25k]
  ------------------
  195|      0|        return 0;
  196|       |
  197|  7.25k|    *data = ((unsigned long)(*pkt->curr)) << 16;
  198|  7.25k|    *data |= ((unsigned long)(*(pkt->curr + 1))) << 8;
  199|  7.25k|    *data |= *(pkt->curr + 2);
  200|       |
  201|  7.25k|    return 1;
  202|  7.25k|}
statem_clnt.c:PACKET_get_length_prefixed_2:
  596|  3.62k|{
  597|  3.62k|    unsigned int length;
  598|  3.62k|    const unsigned char *data;
  599|  3.62k|    PACKET tmp = *pkt;
  600|       |
  601|  3.62k|    if (!PACKET_get_net_2(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
  ------------------
  |  Branch (601:9): [True: 0, False: 3.62k]
  |  Branch (601:45): [True: 0, False: 3.62k]
  ------------------
  602|      0|        return 0;
  603|      0|    }
  604|       |
  605|  3.62k|    *pkt = tmp;
  606|  3.62k|    subpkt->curr = data;
  607|  3.62k|    subpkt->msgstart = pkt->msgstart;
  608|  3.62k|    subpkt->remaining = length;
  609|       |
  610|  3.62k|    return 1;
  611|  3.62k|}
statem_clnt.c:PACKET_get_net_4:
  271|  14.3k|{
  272|  14.3k|    if (!PACKET_peek_net_4(pkt, data))
  ------------------
  |  Branch (272:9): [True: 0, False: 14.3k]
  ------------------
  273|      0|        return 0;
  274|       |
  275|  14.3k|    packet_forward(pkt, 4);
  276|       |
  277|  14.3k|    return 1;
  278|  14.3k|}
statem_clnt.c:PACKET_peek_net_4:
  234|  14.3k|{
  235|  14.3k|    if (PACKET_remaining(pkt) < 4)
  ------------------
  |  Branch (235:9): [True: 0, False: 14.3k]
  ------------------
  236|      0|        return 0;
  237|       |
  238|  14.3k|    *data = ((unsigned long)(*pkt->curr)) << 24;
  239|  14.3k|    *data |= ((unsigned long)(*(pkt->curr + 1))) << 16;
  240|  14.3k|    *data |= ((unsigned long)(*(pkt->curr + 2))) << 8;
  241|  14.3k|    *data |= *(pkt->curr + 3);
  242|       |
  243|  14.3k|    return 1;
  244|  14.3k|}
statem_lib.c:PACKET_get_net_2:
  166|  18.1k|{
  167|  18.1k|    if (!PACKET_peek_net_2(pkt, data))
  ------------------
  |  Branch (167:9): [True: 3.62k, False: 14.5k]
  ------------------
  168|  3.62k|        return 0;
  169|       |
  170|  14.5k|    packet_forward(pkt, 2);
  171|       |
  172|  14.5k|    return 1;
  173|  18.1k|}
statem_lib.c:PACKET_peek_net_2:
  153|  18.1k|{
  154|  18.1k|    if (PACKET_remaining(pkt) < 2)
  ------------------
  |  Branch (154:9): [True: 3.62k, False: 14.5k]
  ------------------
  155|  3.62k|        return 0;
  156|       |
  157|  14.5k|    *data = ((unsigned int)(*pkt->curr)) << 8;
  158|  14.5k|    *data |= *(pkt->curr + 1);
  159|       |
  160|  14.5k|    return 1;
  161|  18.1k|}
statem_lib.c:packet_forward:
   33|  25.4k|{
   34|  25.4k|    pkt->curr += len;
   35|  25.4k|    pkt->remaining -= len;
   36|  25.4k|}
statem_lib.c:PACKET_remaining:
   42|  47.1k|{
   43|  47.1k|    return pkt->remaining;
   44|  47.1k|}
statem_lib.c:PACKET_get_bytes:
  416|  7.25k|{
  417|  7.25k|    if (!PACKET_peek_bytes(pkt, data, len))
  ------------------
  |  Branch (417:9): [True: 0, False: 7.25k]
  ------------------
  418|      0|        return 0;
  419|       |
  420|  7.25k|    packet_forward(pkt, len);
  421|       |
  422|  7.25k|    return 1;
  423|  7.25k|}
statem_lib.c:PACKET_peek_bytes:
  398|  7.25k|{
  399|  7.25k|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (399:9): [True: 0, False: 7.25k]
  ------------------
  400|      0|        return 0;
  401|       |
  402|  7.25k|    *data = pkt->curr;
  403|       |
  404|  7.25k|    return 1;
  405|  7.25k|}
statem_lib.c:PACKET_get_1:
  335|  3.62k|{
  336|  3.62k|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (336:9): [True: 0, False: 3.62k]
  ------------------
  337|      0|        return 0;
  338|       |
  339|  3.62k|    packet_forward(pkt, 1);
  340|       |
  341|  3.62k|    return 1;
  342|  3.62k|}
statem_lib.c:PACKET_peek_1:
  324|  3.62k|{
  325|  3.62k|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (325:9): [True: 0, False: 3.62k]
  ------------------
  326|      0|        return 0;
  327|       |
  328|  3.62k|    *data = *pkt->curr;
  329|       |
  330|  3.62k|    return 1;
  331|  3.62k|}
statem_lib.c:PACKET_data:
   71|  7.21k|{
   72|  7.21k|    return pkt->curr;
   73|  7.21k|}
statem_lib.c:PACKET_as_length_prefixed_1:
  571|  3.62k|{
  572|  3.62k|    unsigned int length;
  573|  3.62k|    const unsigned char *data;
  574|  3.62k|    PACKET tmp = *pkt;
  575|  3.62k|    if (!PACKET_get_1(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length) || PACKET_remaining(&tmp) != 0) {
  ------------------
  |  Branch (575:9): [True: 0, False: 3.62k]
  |  Branch (575:41): [True: 0, False: 3.62k]
  |  Branch (575:91): [True: 0, False: 3.62k]
  ------------------
  576|      0|        return 0;
  577|      0|    }
  578|       |
  579|  3.62k|    *pkt = tmp;
  580|  3.62k|    subpkt->curr = data;
  581|  3.62k|    subpkt->msgstart = pkt->msgstart;
  582|  3.62k|    subpkt->remaining = length;
  583|       |
  584|  3.62k|    return 1;
  585|  3.62k|}
statem_srvr.c:PACKET_remaining:
   42|  54.4k|{
   43|  54.4k|    return pkt->remaining;
   44|  54.4k|}
statem_srvr.c:PACKET_peek_bytes:
  398|  14.5k|{
  399|  14.5k|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (399:9): [True: 0, False: 14.5k]
  ------------------
  400|      0|        return 0;
  401|       |
  402|  14.5k|    *data = pkt->curr;
  403|       |
  404|  14.5k|    return 1;
  405|  14.5k|}
statem_srvr.c:PACKET_null_init:
   95|  3.62k|{
   96|       |    pkt->curr = pkt->msgstart = NULL;
   97|  3.62k|    pkt->remaining = 0;
   98|  3.62k|}
statem_srvr.c:PACKET_get_net_2:
  166|  10.8k|{
  167|  10.8k|    if (!PACKET_peek_net_2(pkt, data))
  ------------------
  |  Branch (167:9): [True: 0, False: 10.8k]
  ------------------
  168|      0|        return 0;
  169|       |
  170|  10.8k|    packet_forward(pkt, 2);
  171|       |
  172|  10.8k|    return 1;
  173|  10.8k|}
statem_srvr.c:PACKET_peek_net_2:
  153|  10.8k|{
  154|  10.8k|    if (PACKET_remaining(pkt) < 2)
  ------------------
  |  Branch (154:9): [True: 0, False: 10.8k]
  ------------------
  155|      0|        return 0;
  156|       |
  157|  10.8k|    *data = ((unsigned int)(*pkt->curr)) << 8;
  158|  10.8k|    *data |= *(pkt->curr + 1);
  159|       |
  160|  10.8k|    return 1;
  161|  10.8k|}
statem_srvr.c:packet_forward:
   33|  36.2k|{
   34|  36.2k|    pkt->curr += len;
   35|  36.2k|    pkt->remaining -= len;
   36|  36.2k|}
statem_srvr.c:PACKET_copy_bytes:
  444|  3.62k|{
  445|  3.62k|    if (!PACKET_peek_copy_bytes(pkt, data, len))
  ------------------
  |  Branch (445:9): [True: 0, False: 3.62k]
  ------------------
  446|      0|        return 0;
  447|       |
  448|  3.62k|    packet_forward(pkt, len);
  449|       |
  450|  3.62k|    return 1;
  451|  3.62k|}
statem_srvr.c:PACKET_peek_copy_bytes:
  429|  3.62k|{
  430|  3.62k|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (430:9): [True: 0, False: 3.62k]
  ------------------
  431|      0|        return 0;
  432|       |
  433|  3.62k|    memcpy(data, pkt->curr, len);
  434|       |
  435|  3.62k|    return 1;
  436|  3.62k|}
statem_srvr.c:PACKET_get_length_prefixed_1:
  549|  7.25k|{
  550|  7.25k|    unsigned int length;
  551|  7.25k|    const unsigned char *data;
  552|  7.25k|    PACKET tmp = *pkt;
  553|  7.25k|    if (!PACKET_get_1(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
  ------------------
  |  Branch (553:9): [True: 0, False: 7.25k]
  |  Branch (553:41): [True: 0, False: 7.25k]
  ------------------
  554|      0|        return 0;
  555|      0|    }
  556|       |
  557|  7.25k|    *pkt = tmp;
  558|  7.25k|    subpkt->curr = data;
  559|  7.25k|    subpkt->msgstart = pkt->msgstart;
  560|  7.25k|    subpkt->remaining = length;
  561|       |
  562|  7.25k|    return 1;
  563|  7.25k|}
statem_srvr.c:PACKET_get_1:
  335|  7.25k|{
  336|  7.25k|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (336:9): [True: 0, False: 7.25k]
  ------------------
  337|      0|        return 0;
  338|       |
  339|  7.25k|    packet_forward(pkt, 1);
  340|       |
  341|  7.25k|    return 1;
  342|  7.25k|}
statem_srvr.c:PACKET_peek_1:
  324|  7.25k|{
  325|  7.25k|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (325:9): [True: 0, False: 7.25k]
  ------------------
  326|      0|        return 0;
  327|       |
  328|  7.25k|    *data = *pkt->curr;
  329|       |
  330|  7.25k|    return 1;
  331|  7.25k|}
statem_srvr.c:PACKET_copy_all:
  463|  7.25k|{
  464|  7.25k|    if (PACKET_remaining(pkt) > dest_len) {
  ------------------
  |  Branch (464:9): [True: 0, False: 7.25k]
  ------------------
  465|      0|        *len = 0;
  466|      0|        return 0;
  467|      0|    }
  468|  7.25k|    *len = pkt->remaining;
  469|  7.25k|    memcpy(dest, pkt->curr, pkt->remaining);
  470|  7.25k|    return 1;
  471|  7.25k|}
statem_srvr.c:PACKET_get_length_prefixed_2:
  596|  7.25k|{
  597|  7.25k|    unsigned int length;
  598|  7.25k|    const unsigned char *data;
  599|  7.25k|    PACKET tmp = *pkt;
  600|       |
  601|  7.25k|    if (!PACKET_get_net_2(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
  ------------------
  |  Branch (601:9): [True: 0, False: 7.25k]
  |  Branch (601:45): [True: 0, False: 7.25k]
  ------------------
  602|      0|        return 0;
  603|      0|    }
  604|       |
  605|  7.25k|    *pkt = tmp;
  606|  7.25k|    subpkt->curr = data;
  607|  7.25k|    subpkt->msgstart = pkt->msgstart;
  608|  7.25k|    subpkt->remaining = length;
  609|       |
  610|  7.25k|    return 1;
  611|  7.25k|}
statem_srvr.c:PACKET_get_bytes:
  416|  14.5k|{
  417|  14.5k|    if (!PACKET_peek_bytes(pkt, data, len))
  ------------------
  |  Branch (417:9): [True: 0, False: 14.5k]
  ------------------
  418|      0|        return 0;
  419|       |
  420|  14.5k|    packet_forward(pkt, len);
  421|       |
  422|  14.5k|    return 1;
  423|  14.5k|}
ech_helper.c:PACKET_buf_init:
   83|  3.62k|{
   84|       |    /* Sanity check for negative values. */
   85|  3.62k|    if (len > (size_t)(SIZE_MAX / 2))
  ------------------
  |  Branch (85:9): [True: 0, False: 3.62k]
  ------------------
   86|      0|        return 0;
   87|       |
   88|  3.62k|    pkt->curr = pkt->msgstart = buf;
   89|  3.62k|    pkt->remaining = len;
   90|  3.62k|    return 1;
   91|  3.62k|}
ech_helper.c:PACKET_data:
   71|  61.6k|{
   72|  61.6k|    return pkt->curr;
   73|  61.6k|}
ech_helper.c:PACKET_get_net_2:
  166|  97.9k|{
  167|  97.9k|    if (!PACKET_peek_net_2(pkt, data))
  ------------------
  |  Branch (167:9): [True: 0, False: 97.9k]
  ------------------
  168|      0|        return 0;
  169|       |
  170|  97.9k|    packet_forward(pkt, 2);
  171|       |
  172|  97.9k|    return 1;
  173|  97.9k|}
ech_helper.c:PACKET_peek_net_2:
  153|  97.9k|{
  154|  97.9k|    if (PACKET_remaining(pkt) < 2)
  ------------------
  |  Branch (154:9): [True: 0, False: 97.9k]
  ------------------
  155|      0|        return 0;
  156|       |
  157|  97.9k|    *data = ((unsigned int)(*pkt->curr)) << 8;
  158|  97.9k|    *data |= *(pkt->curr + 1);
  159|       |
  160|  97.9k|    return 1;
  161|  97.9k|}
ech_helper.c:packet_forward:
   33|   163k|{
   34|   163k|    pkt->curr += len;
   35|   163k|    pkt->remaining -= len;
   36|   163k|}
ech_helper.c:PACKET_get_bytes:
  416|  58.0k|{
  417|  58.0k|    if (!PACKET_peek_bytes(pkt, data, len))
  ------------------
  |  Branch (417:9): [True: 0, False: 58.0k]
  ------------------
  418|      0|        return 0;
  419|       |
  420|  58.0k|    packet_forward(pkt, len);
  421|       |
  422|  58.0k|    return 1;
  423|  58.0k|}
ech_helper.c:PACKET_peek_bytes:
  398|  58.0k|{
  399|  58.0k|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (399:9): [True: 0, False: 58.0k]
  ------------------
  400|      0|        return 0;
  401|       |
  402|  58.0k|    *data = pkt->curr;
  403|       |
  404|  58.0k|    return 1;
  405|  58.0k|}
ech_helper.c:PACKET_get_1:
  335|  7.25k|{
  336|  7.25k|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (336:9): [True: 0, False: 7.25k]
  ------------------
  337|      0|        return 0;
  338|       |
  339|  7.25k|    packet_forward(pkt, 1);
  340|       |
  341|  7.25k|    return 1;
  342|  7.25k|}
ech_helper.c:PACKET_peek_1:
  324|  7.25k|{
  325|  7.25k|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (325:9): [True: 0, False: 7.25k]
  ------------------
  326|      0|        return 0;
  327|       |
  328|  7.25k|    *data = *pkt->curr;
  329|       |
  330|  7.25k|    return 1;
  331|  7.25k|}
ech_helper.c:PACKET_remaining:
   42|   210k|{
   43|   210k|    return pkt->remaining;
   44|   210k|}
ech_internal.c:PACKET_remaining:
   42|  7.25k|{
   43|  7.25k|    return pkt->remaining;
   44|  7.25k|}
ech_internal.c:PACKET_peek_bytes:
  398|  3.62k|{
  399|  3.62k|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (399:9): [True: 0, False: 3.62k]
  ------------------
  400|      0|        return 0;
  401|       |
  402|  3.62k|    *data = pkt->curr;
  403|       |
  404|  3.62k|    return 1;
  405|  3.62k|}
asn1_dsa.c:PACKET_get_1:
  335|  32.6k|{
  336|  32.6k|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (336:9): [True: 0, False: 32.6k]
  ------------------
  337|      0|        return 0;
  338|       |
  339|  32.6k|    packet_forward(pkt, 1);
  340|       |
  341|  32.6k|    return 1;
  342|  32.6k|}
asn1_dsa.c:PACKET_peek_1:
  324|  32.6k|{
  325|  32.6k|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (325:9): [True: 0, False: 32.6k]
  ------------------
  326|      0|        return 0;
  327|       |
  328|  32.6k|    *data = *pkt->curr;
  329|       |
  330|  32.6k|    return 1;
  331|  32.6k|}
asn1_dsa.c:packet_forward:
   33|  43.5k|{
   34|  43.5k|    pkt->curr += len;
   35|  43.5k|    pkt->remaining -= len;
   36|  43.5k|}
asn1_dsa.c:PACKET_get_sub_packet:
  138|  10.8k|{
  139|  10.8k|    if (!PACKET_peek_sub_packet(pkt, subpkt, len))
  ------------------
  |  Branch (139:9): [True: 0, False: 10.8k]
  ------------------
  140|      0|        return 0;
  141|       |
  142|  10.8k|    packet_forward(pkt, len);
  143|       |
  144|  10.8k|    return 1;
  145|  10.8k|}
asn1_dsa.c:PACKET_peek_sub_packet:
  120|  10.8k|{
  121|  10.8k|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (121:9): [True: 0, False: 10.8k]
  ------------------
  122|      0|        return 0;
  123|       |
  124|  10.8k|    if (!PACKET_buf_init(subpkt, pkt->curr, len))
  ------------------
  |  Branch (124:9): [True: 0, False: 10.8k]
  ------------------
  125|      0|        return 0;
  126|       |
  127|  10.8k|    subpkt->msgstart = pkt->msgstart;
  128|  10.8k|    return 1;
  129|  10.8k|}
asn1_dsa.c:PACKET_remaining:
   42|  61.7k|{
   43|  61.7k|    return pkt->remaining;
   44|  61.7k|}
asn1_dsa.c:PACKET_data:
   71|  10.8k|{
   72|  10.8k|    return pkt->curr;
   73|  10.8k|}
asn1_dsa.c:PACKET_buf_init:
   83|  14.5k|{
   84|       |    /* Sanity check for negative values. */
   85|  14.5k|    if (len > (size_t)(SIZE_MAX / 2))
  ------------------
  |  Branch (85:9): [True: 0, False: 14.5k]
  ------------------
   86|      0|        return 0;
   87|       |
   88|  14.5k|    pkt->curr = pkt->msgstart = buf;
   89|  14.5k|    pkt->remaining = len;
   90|  14.5k|    return 1;
   91|  14.5k|}

ssl_cert.c:CRYPTO_NEW_REF:
  280|  14.6k|{
  281|  14.6k|    refcnt->val = n;
  282|  14.6k|    return 1;
  283|  14.6k|}
ssl_cert.c:CRYPTO_DOWN_REF:
   56|  14.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|  14.6k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  14.6k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 14.6k, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  14.6k|#endif
   68|  14.6k|    return 1;
   69|  14.6k|}
ssl_cert.c:CRYPTO_FREE_REF:
  286|  14.6k|{
  287|  14.6k|}
ssl_lib.c:CRYPTO_NEW_REF:
  280|  14.6k|{
  281|  14.6k|    refcnt->val = n;
  282|  14.6k|    return 1;
  283|  14.6k|}
ssl_lib.c:CRYPTO_FREE_REF:
  286|  14.6k|{
  287|  14.6k|}
ssl_lib.c:CRYPTO_UP_REF:
   40|  14.5k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  14.5k|    return 1;
   43|  14.5k|}
ssl_lib.c:CRYPTO_DOWN_REF:
   56|  29.1k|{
   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|  29.1k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  29.1k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 14.6k, False: 14.5k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  29.1k|#endif
   68|  29.1k|    return 1;
   69|  29.1k|}
ssl_sess.c:CRYPTO_NEW_REF:
  280|  25.1k|{
  281|  25.1k|    refcnt->val = n;
  282|  25.1k|    return 1;
  283|  25.1k|}
ssl_sess.c:CRYPTO_FREE_REF:
  286|  25.1k|{
  287|  25.1k|}
ssl_sess.c:CRYPTO_DOWN_REF:
   56|  32.3k|{
   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|  32.3k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  32.3k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 25.1k, False: 7.16k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  32.3k|#endif
   68|  32.3k|    return 1;
   69|  32.3k|}
ssl_sess.c:CRYPTO_UP_REF:
   40|  7.16k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  7.16k|    return 1;
   43|  7.16k|}
tasn_utl.c:CRYPTO_NEW_REF:
  280|  10.9k|{
  281|  10.9k|    refcnt->val = n;
  282|  10.9k|    return 1;
  283|  10.9k|}
tasn_utl.c:CRYPTO_FREE_REF:
  286|  10.9k|{
  287|  10.9k|}
tasn_utl.c:CRYPTO_DOWN_REF:
   56|  57.8k|{
   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|  57.8k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  57.8k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 10.9k, False: 46.9k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  57.8k|#endif
   68|  57.8k|    return 1;
   69|  57.8k|}
bio_lib.c:CRYPTO_NEW_REF:
  280|   160k|{
  281|   160k|    refcnt->val = n;
  282|   160k|    return 1;
  283|   160k|}
bio_lib.c:CRYPTO_FREE_REF:
  286|   160k|{
  287|   160k|}
bio_lib.c:CRYPTO_DOWN_REF:
   56|   341k|{
   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|   341k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   341k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 160k, False: 181k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   341k|#endif
   68|   341k|    return 1;
   69|   341k|}
bio_lib.c:CRYPTO_UP_REF:
   40|   181k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   181k|    return 1;
   43|   181k|}
bio_lib.c:CRYPTO_GET_REF:
   72|   108k|{
   73|       |    *ret = atomic_load_explicit(&refcnt->val, memory_order_acquire);
   74|   108k|    return 1;
   75|   108k|}
ec_key.c:CRYPTO_DOWN_REF:
   56|  43.7k|{
   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|  43.7k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  43.7k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 14.6k, False: 29.0k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  43.7k|#endif
   68|  43.7k|    return 1;
   69|  43.7k|}
ec_key.c:CRYPTO_FREE_REF:
  286|  14.6k|{
  287|  14.6k|}
ec_key.c:CRYPTO_UP_REF:
   40|  29.0k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  29.0k|    return 1;
   43|  29.0k|}
ec_kmeth.c:CRYPTO_NEW_REF:
  280|  14.6k|{
  281|  14.6k|    refcnt->val = n;
  282|  14.6k|    return 1;
  283|  14.6k|}
decoder_meth.c:CRYPTO_UP_REF:
   40|   200k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   200k|    return 1;
   43|   200k|}
decoder_meth.c:CRYPTO_DOWN_REF:
   56|   200k|{
   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|   200k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   200k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 0, False: 200k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   200k|#endif
   68|   200k|    return 1;
   69|   200k|}
decoder_meth.c:CRYPTO_NEW_REF:
  280|     76|{
  281|     76|    refcnt->val = n;
  282|     76|    return 1;
  283|     76|}
digest.c:CRYPTO_NEW_REF:
  280|     30|{
  281|     30|    refcnt->val = n;
  282|     30|    return 1;
  283|     30|}
digest.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|}
digest.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: 0, False: 1.09M]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  1.09M|#endif
   68|  1.09M|    return 1;
   69|  1.09M|}
evp_enc.c:CRYPTO_NEW_REF:
  280|    130|{
  281|    130|    refcnt->val = n;
  282|    130|    return 1;
  283|    130|}
evp_enc.c:CRYPTO_UP_REF:
   40|   168k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   168k|    return 1;
   43|   168k|}
evp_enc.c:CRYPTO_DOWN_REF:
   56|   168k|{
   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|   168k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   168k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 0, False: 168k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   168k|#endif
   68|   168k|    return 1;
   69|   168k|}
exchange.c:CRYPTO_DOWN_REF:
   56|  21.9k|{
   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|  21.9k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  21.9k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 0, False: 21.9k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  21.9k|#endif
   68|  21.9k|    return 1;
   69|  21.9k|}
exchange.c:CRYPTO_UP_REF:
   40|  21.9k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  21.9k|    return 1;
   43|  21.9k|}
exchange.c:CRYPTO_NEW_REF:
  280|      7|{
  281|      7|    refcnt->val = n;
  282|      7|    return 1;
  283|      7|}
kdf_meth.c:CRYPTO_NEW_REF:
  280|     21|{
  281|     21|    refcnt->val = n;
  282|     21|    return 1;
  283|     21|}
kdf_meth.c:CRYPTO_UP_REF:
   40|   304k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   304k|    return 1;
   43|   304k|}
kdf_meth.c:CRYPTO_DOWN_REF:
   56|   304k|{
   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|   304k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   304k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 0, False: 304k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   304k|#endif
   68|   304k|    return 1;
   69|   304k|}
kem.c:CRYPTO_DOWN_REF:
   56|  14.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|  14.5k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  14.5k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 0, False: 14.5k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  14.5k|#endif
   68|  14.5k|    return 1;
   69|  14.5k|}
kem.c:CRYPTO_UP_REF:
   40|  14.5k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  14.5k|    return 1;
   43|  14.5k|}
kem.c:CRYPTO_NEW_REF:
  280|     12|{
  281|     12|    refcnt->val = n;
  282|     12|    return 1;
  283|     12|}
keymgmt_meth.c:CRYPTO_NEW_REF:
  280|     42|{
  281|     42|    refcnt->val = n;
  282|     42|    return 1;
  283|     42|}
keymgmt_meth.c:CRYPTO_UP_REF:
   40|   776k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   776k|    return 1;
   43|   776k|}
keymgmt_meth.c:CRYPTO_DOWN_REF:
   56|   776k|{
   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|   776k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   776k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 0, False: 776k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   776k|#endif
   68|   776k|    return 1;
   69|   776k|}
mac_meth.c:CRYPTO_NEW_REF:
  280|      9|{
  281|      9|    refcnt->val = n;
  282|      9|    return 1;
  283|      9|}
mac_meth.c:CRYPTO_UP_REF:
   40|  86.8k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  86.8k|    return 1;
   43|  86.8k|}
mac_meth.c:CRYPTO_DOWN_REF:
   56|  86.8k|{
   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|  86.8k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  86.8k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 0, False: 86.8k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  86.8k|#endif
   68|  86.8k|    return 1;
   69|  86.8k|}
p_lib.c:CRYPTO_NEW_REF:
  280|  65.5k|{
  281|  65.5k|    refcnt->val = n;
  282|  65.5k|    return 1;
  283|  65.5k|}
p_lib.c:CRYPTO_FREE_REF:
  286|  65.5k|{
  287|  65.5k|}
p_lib.c:CRYPTO_UP_REF:
   40|   267k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   267k|    return 1;
   43|   267k|}
p_lib.c:CRYPTO_DOWN_REF:
   56|   333k|{
   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|   333k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   333k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 65.5k, False: 267k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   333k|#endif
   68|   333k|    return 1;
   69|   333k|}
signature.c:CRYPTO_DOWN_REF:
   56|  36.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|  36.6k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  36.6k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 0, False: 36.6k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  36.6k|#endif
   68|  36.6k|    return 1;
   69|  36.6k|}
signature.c:CRYPTO_UP_REF:
   40|  36.6k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  36.6k|    return 1;
   43|  36.6k|}
signature.c:CRYPTO_NEW_REF:
  280|     59|{
  281|     59|    refcnt->val = n;
  282|     59|    return 1;
  283|     59|}
provider_core.c:CRYPTO_UP_REF:
   40|   132k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   132k|    return 1;
   43|   132k|}
provider_core.c:CRYPTO_NEW_REF:
  280|      1|{
  281|      1|    refcnt->val = n;
  282|      1|    return 1;
  283|      1|}
provider_core.c:CRYPTO_DOWN_REF:
   56|   132k|{
   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|   132k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   132k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 0, False: 132k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   132k|#endif
   68|   132k|    return 1;
   69|   132k|}
x509_lu.c:CRYPTO_NEW_REF:
  280|  7.36k|{
  281|  7.36k|    refcnt->val = n;
  282|  7.36k|    return 1;
  283|  7.36k|}
x509_lu.c:CRYPTO_DOWN_REF:
   56|  7.36k|{
   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|  7.36k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  7.36k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 7.36k, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  7.36k|#endif
   68|  7.36k|    return 1;
   69|  7.36k|}
x509_lu.c:CRYPTO_FREE_REF:
  286|  7.36k|{
  287|  7.36k|}
x509_set.c:CRYPTO_UP_REF:
   40|  46.9k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  46.9k|    return 1;
   43|  46.9k|}
ossl_core_bio.c:CRYPTO_UP_REF:
   40|  29.3k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  29.3k|    return 1;
   43|  29.3k|}
ossl_core_bio.c:CRYPTO_DOWN_REF:
   56|  58.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|  58.6k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  58.6k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 29.3k, False: 29.3k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  58.6k|#endif
   68|  58.6k|    return 1;
   69|  58.6k|}
ossl_core_bio.c:CRYPTO_FREE_REF:
  286|  29.3k|{
  287|  29.3k|}
ossl_core_bio.c:CRYPTO_NEW_REF:
  280|  29.3k|{
  281|  29.3k|    refcnt->val = n;
  282|  29.3k|    return 1;
  283|  29.3k|}
ecx_backend.c:CRYPTO_NEW_REF:
  280|  3.62k|{
  281|  3.62k|    refcnt->val = n;
  282|  3.62k|    return 1;
  283|  3.62k|}
ecx_key.c:CRYPTO_NEW_REF:
  280|  14.5k|{
  281|  14.5k|    refcnt->val = n;
  282|  14.5k|    return 1;
  283|  14.5k|}
ecx_key.c:CRYPTO_FREE_REF:
  286|  18.1k|{
  287|  18.1k|}
ecx_key.c:CRYPTO_DOWN_REF:
   56|  32.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|  32.6k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  32.6k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 18.1k, False: 14.5k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  32.6k|#endif
   68|  32.6k|    return 1;
   69|  32.6k|}
ecx_key.c:CRYPTO_UP_REF:
   40|  14.5k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  14.5k|    return 1;
   43|  14.5k|}
evp_rand.c:CRYPTO_UP_REF:
   40|     18|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|     18|    return 1;
   43|     18|}
evp_rand.c:CRYPTO_NEW_REF:
  280|      9|{
  281|      9|    refcnt->val = n;
  282|      9|    return 1;
  283|      9|}
evp_rand.c:CRYPTO_DOWN_REF:
   56|      9|{
   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|      9|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|      9|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 0, False: 9]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|      9|#endif
   68|      9|    return 1;
   69|      9|}

ssl_sess.c:safe_add_time:
   51|  43.1k|    {                                                                \
   52|  43.1k|        type r;                                                      \
   53|  43.1k|                                                                     \
   54|  43.1k|        if (!__builtin_add_overflow(a, b, &r))                       \
  ------------------
  |  Branch (54:13): [True: 43.1k, False: 0]
  ------------------
   55|  43.1k|            return r;                                                \
   56|  43.1k|        *err |= 1;                                                   \
   57|      0|        return a + b;                                                \
   58|  43.1k|    }
array_alloc.c:safe_mul_size_t:
  151|  1.78M|    {                                                                \
  152|  1.78M|        type r;                                                      \
  153|  1.78M|                                                                     \
  154|  1.78M|        if (!__builtin_mul_overflow(a, b, &r))                       \
  ------------------
  |  Branch (154:13): [True: 1.78M, False: 0]
  ------------------
  155|  1.78M|            return r;                                                \
  156|  1.78M|        *err |= 1;                                                   \
  157|      0|        return a * b;                                                \
  158|  1.78M|    }
stack.c:safe_muldiv_int:
  324|   135k|    {                                                                   \
  325|   135k|        int e2 = 0;                                                     \
  326|   135k|        type q, r, x, y;                                                \
  327|   135k|                                                                        \
  328|   135k|        if (c == 0) {                                                   \
  ------------------
  |  Branch (328:13): [True: 0, False: 135k]
  ------------------
  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|   135k|        x = safe_mul_##type_name(a, b, &e2);                            \
  333|   135k|        if (!e2)                                                        \
  ------------------
  |  Branch (333:13): [True: 135k, False: 0]
  ------------------
  334|   135k|            return safe_div_##type_name(x, c, err);                     \
  335|   135k|        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|   135k|    }
stack.c:safe_mul_int:
  138|   135k|    {                                                                \
  139|   135k|        type r;                                                      \
  140|   135k|                                                                     \
  141|   135k|        if (!__builtin_mul_overflow(a, b, &r))                       \
  ------------------
  |  Branch (141:13): [True: 135k, False: 0]
  ------------------
  142|   135k|            return r;                                                \
  143|   135k|        *err |= 1;                                                   \
  144|      0|        return (a < 0) ^ (b < 0) ? min : max;                        \
  ------------------
  |  Branch (144:16): [True: 0, False: 0]
  ------------------
  145|   135k|    }
stack.c:safe_div_int:
  201|   135k|    {                                                                \
  202|   135k|        if (b == 0) {                                                \
  ------------------
  |  Branch (202:13): [True: 0, False: 135k]
  ------------------
  203|      0|            *err |= 1;                                               \
  204|      0|            return a < 0 ? min : max;                                \
  ------------------
  |  Branch (204:20): [True: 0, False: 0]
  ------------------
  205|      0|        }                                                            \
  206|   135k|        if (b == -1 && a == min) {                                   \
  ------------------
  |  Branch (206:13): [True: 0, False: 135k]
  |  Branch (206:24): [True: 0, False: 0]
  ------------------
  207|      0|            *err |= 1;                                               \
  208|      0|            return max;                                              \
  209|      0|        }                                                            \
  210|   135k|        return a / b;                                                \
  211|   135k|    }

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|      2|    {                                \
   74|      2|        init##_ossl_ret_ = init();   \
   75|      2|    }                                \
err.c:do_err_strings_init_ossl_:
   73|      2|    {                                \
   74|      2|        init##_ossl_ret_ = init();   \
   75|      2|    }                                \
context.c:default_context_do_thread_key_init_ossl_:
   73|      2|    {                                \
   74|      2|        init##_ossl_ret_ = init();   \
   75|      2|    }                                \
context.c:default_context_do_init_ossl_:
   73|      2|    {                                \
   74|      2|        init##_ossl_ret_ = init();   \
   75|      2|    }                                \
init.c:ossl_init_base_ossl_:
   73|      2|    {                                \
   74|      2|        init##_ossl_ret_ = init();   \
   75|      2|    }                                \
init.c:ossl_init_load_crypto_strings_ossl_:
   73|      2|    {                                \
   74|      2|        init##_ossl_ret_ = init();   \
   75|      2|    }                                \
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|      2|    {                                \
   74|      2|        init##_ossl_ret_ = init();   \
   75|      2|    }                                \
init.c:ossl_init_add_all_digests_ossl_:
   73|      2|    {                                \
   74|      2|        init##_ossl_ret_ = init();   \
   75|      2|    }                                \
init.c:ossl_init_config_ossl_:
   73|      2|    {                                \
   74|      2|        init##_ossl_ret_ = init();   \
   75|      2|    }                                \
initthread.c:create_global_tevent_register_ossl_:
   73|      2|    {                                \
   74|      2|        init##_ossl_ret_ = init();   \
   75|      2|    }                                \
o_names.c:o_names_init_ossl_:
   73|      2|    {                                \
   74|      2|        init##_ossl_ret_ = init();   \
   75|      2|    }                                \
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_asn1.c:ossl_time_to_time_t:
  123|  43.0k|{
  124|  43.0k|    return (time_t)(t.t / OSSL_TIME_SECOND);
  ------------------
  |  |   31|  43.0k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  ------------------
  125|  43.0k|}
ssl_asn1.c:ossl_time2ticks:
   67|  43.0k|{
   68|  43.0k|    return t.t;
   69|  43.0k|}
ssl_asn1.c:ossl_time_from_time_t:
  129|  7.16k|{
  130|  7.16k|    OSSL_TIME ot;
  131|       |
  132|  7.16k|    ot.t = t;
  133|  7.16k|    ot.t *= OSSL_TIME_SECOND;
  ------------------
  |  |   31|  7.16k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  ------------------
  134|  7.16k|    return ot;
  135|  7.16k|}
ssl_asn1.c:ossl_ticks2time:
   58|  7.16k|{
   59|  7.16k|    OSSL_TIME r;
   60|       |
   61|  7.16k|    r.t = ticks;
   62|  7.16k|    return r;
   63|  7.16k|}
ssl_sess.c:ossl_time_add:
  160|  43.1k|{
  161|  43.1k|    OSSL_TIME r;
  162|  43.1k|    int err = 0;
  163|       |
  164|  43.1k|    r.t = safe_add_time(a.t, b.t, &err);
  165|  43.1k|    return err ? ossl_time_infinite() : r;
  ------------------
  |  Branch (165:12): [True: 0, False: 43.1k]
  ------------------
  166|  43.1k|}
ssl_sess.c:ossl_ticks2time:
   58|  21.6k|{
   59|  21.6k|    OSSL_TIME r;
   60|       |
   61|  21.6k|    r.t = ticks;
   62|  21.6k|    return r;
   63|  21.6k|}
ssl_sess.c:ossl_time_is_zero:
  149|  7.25k|{
  150|  7.25k|    return ossl_time_compare(t, ossl_time_zero()) == 0;
  151|  7.25k|}
ssl_sess.c:ossl_time_compare:
  139|  7.25k|{
  140|  7.25k|    if (a.t > b.t)
  ------------------
  |  Branch (140:9): [True: 7.25k, False: 0]
  ------------------
  141|  7.25k|        return 1;
  142|      0|    if (a.t < b.t)
  ------------------
  |  Branch (142:9): [True: 0, False: 0]
  ------------------
  143|      0|        return -1;
  144|      0|    return 0;
  145|      0|}
ssl_sess.c:ossl_time_zero:
   76|  7.25k|{
   77|  7.25k|    return ossl_ticks2time(0);
   78|  7.25k|}
ssl_sess.c:ossl_time_to_time_t:
  123|  7.16k|{
  124|  7.16k|    return (time_t)(t.t / OSSL_TIME_SECOND);
  ------------------
  |  |   31|  7.16k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  ------------------
  125|  7.16k|}
ssl_sess.c:ossl_time_from_time_t:
  129|  7.36k|{
  130|  7.36k|    OSSL_TIME ot;
  131|       |
  132|  7.36k|    ot.t = t;
  133|  7.36k|    ot.t *= OSSL_TIME_SECOND;
  ------------------
  |  |   31|  7.36k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  ------------------
  134|  7.36k|    return ot;
  135|  7.36k|}
t1_lib.c:ossl_ticks2time:
   58|  7.36k|{
   59|  7.36k|    OSSL_TIME r;
   60|       |
   61|  7.36k|    r.t = ticks;
   62|  7.36k|    return r;
   63|  7.36k|}
statem_srvr.c:ossl_time2ticks:
   67|  7.16k|{
   68|  7.16k|    return t.t;
   69|  7.16k|}
statem_srvr.c:ossl_time_compare:
  139|  7.16k|{
  140|  7.16k|    if (a.t > b.t)
  ------------------
  |  Branch (140:9): [True: 0, False: 7.16k]
  ------------------
  141|      0|        return 1;
  142|  7.16k|    if (a.t < b.t)
  ------------------
  |  Branch (142:9): [True: 7.16k, False: 0]
  ------------------
  143|  7.16k|        return -1;
  144|      0|    return 0;
  145|  7.16k|}
statem_srvr.c:ossl_ticks2time:
   58|  7.16k|{
   59|  7.16k|    OSSL_TIME r;
   60|       |
   61|  7.16k|    r.t = ticks;
   62|  7.16k|    return r;
   63|  7.16k|}

extensions_clnt.c:is_ecdhe_group:
   76|  29.0k|{
   77|       |    /* This includes the usual EC groups, and also ECX, GOST ... */
   78|  29.0k|    return group_id < OSSL_TLS_GROUP_ID_FFDHE_START;
  ------------------
  |  |   72|  29.0k|#define OSSL_TLS_GROUP_ID_FFDHE_START 0x0100 /* inclusive */
  ------------------
   79|  29.0k|}
extensions_clnt.c:is_ffdhe_group:
   82|  36.2k|{
   83|  36.2k|    return group_id >= OSSL_TLS_GROUP_ID_FFDHE_START
  ------------------
  |  |   72|  72.5k|#define OSSL_TLS_GROUP_ID_FFDHE_START 0x0100 /* inclusive */
  ------------------
  |  Branch (83:12): [True: 14.5k, False: 21.7k]
  ------------------
   84|  14.5k|        && group_id <= OSSL_TLS_GROUP_ID_FFDHE_END;
  ------------------
  |  |   73|  14.5k|#define OSSL_TLS_GROUP_ID_FFDHE_END 0x01FF /* inclusive */
  ------------------
  |  Branch (84:12): [True: 3.62k, False: 10.8k]
  ------------------
   85|  36.2k|}

o_str.c:to_hex:
   15|    400|{
   16|    400|    *buf++ = hexdig[(n >> 4) & 0xf];
   17|    400|    *buf = hexdig[n & 0xf];
   18|    400|    return 2;
   19|    400|}

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

ssl_asn1.c:i2d_SSL_SESSION_ASN1:
  836|  43.0k|    {                                                             \
  837|  43.0k|        return ASN1_item_i2d((const ASN1_VALUE *)a, out,          \
  838|  43.0k|            ASN1_ITEM_rptr(stname));                              \
  ------------------
  |  |  399|  43.0k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  839|  43.0k|    }
ssl_asn1.c:d2i_SSL_SESSION_ASN1:
  831|  7.16k|    {                                                             \
  832|  7.16k|        return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, \
  833|  7.16k|            ASN1_ITEM_rptr(stname));                              \
  ------------------
  |  |  399|  7.16k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  834|  7.16k|    }                                                             \
PKCS8_PRIV_KEY_INFO_it:
  241|  14.9k|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|  14.9k|    {                                  \
  |  |   98|  14.9k|        static const ASN1_ITEM local_it = {
  ------------------
  242|  14.9k|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|  14.9k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|  14.9k|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|  14.9k|#define V_ASN1_SEQUENCE 16
  ------------------
  244|  14.9k|        tname##_seq_tt,                                 \
  245|  14.9k|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|  14.9k|        &tname##_aux,                                   \
  247|  14.9k|        sizeof(stname),                                 \
  248|  14.9k|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|  14.9k|    }                         \
  |  |  105|  14.9k|    ;                         \
  |  |  106|  14.9k|    return &local_it;         \
  |  |  107|  14.9k|    }
  ------------------
d2i_PKCS8_PRIV_KEY_INFO:
  814|  7.46k|    {                                                                                      \
  815|  7.46k|        return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname)); \
  ------------------
  |  |  399|  7.46k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  816|  7.46k|    }                                                                                      \
PKCS8_PRIV_KEY_INFO_free:
  804|  7.46k|    {                                                               \
  805|  7.46k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  7.46k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  7.46k|    }
ASN1_TYPE_new:
  800|  40.2k|    {                                                               \
  801|  40.2k|        return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));     \
  ------------------
  |  |  399|  40.2k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  802|  40.2k|    }                                                               \
X509_ALGOR_new:
  800|  21.8k|    {                                                               \
  801|  21.8k|        return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));     \
  ------------------
  |  |  399|  21.8k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  802|  21.8k|    }                                                               \
X509_ALGOR_free:
  804|  21.8k|    {                                                               \
  805|  21.8k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  21.8k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  21.8k|    }
GENERAL_NAMES_free:
  804|  21.8k|    {                                                               \
  805|  21.8k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  21.8k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  21.8k|    }
NAME_CONSTRAINTS_free:
  804|  32.6k|    {                                                               \
  805|  32.6k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  32.6k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  32.6k|    }
X509_CRL_it:
  241|  3.55k|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|  3.55k|    {                                  \
  |  |   98|  3.55k|        static const ASN1_ITEM local_it = {
  ------------------
  242|  3.55k|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|  3.55k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|  3.55k|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|  3.55k|#define V_ASN1_SEQUENCE 16
  ------------------
  244|  3.55k|        tname##_seq_tt,                                 \
  245|  3.55k|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|  3.55k|        &tname##_aux,                                   \
  247|  3.55k|        sizeof(stname),                                 \
  248|  3.55k|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|  3.55k|    }                         \
  |  |  105|  3.55k|    ;                         \
  |  |  106|  3.55k|    return &local_it;         \
  |  |  107|  3.55k|    }
  ------------------
X509_CRL_free:
  804|  3.55k|    {                                                               \
  805|  3.55k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  3.55k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  3.55k|    }
X509_NAME_ENTRY_new:
  800|  21.8k|    {                                                               \
  801|  21.8k|        return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));     \
  ------------------
  |  |  399|  21.8k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  802|  21.8k|    }                                                               \
X509_NAME_ENTRY_free:
  804|  65.5k|    {                                                               \
  805|  65.5k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  65.5k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  65.5k|    }
d2i_X509_PUBKEY:
  814|  10.9k|    {                                                                                      \
  815|  10.9k|        return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname)); \
  ------------------
  |  |  399|  10.9k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  816|  10.9k|    }                                                                                      \
X509_PUBKEY_free:
  804|  21.8k|    {                                                               \
  805|  21.8k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  21.8k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  21.8k|    }
X509_CINF_it:
  241|   111k|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|   111k|    {                                  \
  |  |   98|   111k|        static const ASN1_ITEM local_it = {
  ------------------
  242|   111k|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|   111k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|   111k|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|   111k|#define V_ASN1_SEQUENCE 16
  ------------------
  244|   111k|        tname##_seq_tt,                                 \
  245|   111k|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|   111k|        &tname##_aux,                                   \
  247|   111k|        sizeof(stname),                                 \
  248|   111k|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|   111k|    }                         \
  |  |  105|   111k|    ;                         \
  |  |  106|   111k|    return &local_it;         \
  |  |  107|   111k|    }
  ------------------
X509_it:
  241|   427k|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|   427k|    {                                  \
  |  |   98|   427k|        static const ASN1_ITEM local_it = {
  ------------------
  242|   427k|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|   427k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|   427k|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|   427k|#define V_ASN1_SEQUENCE 16
  ------------------
  244|   427k|        tname##_seq_tt,                                 \
  245|   427k|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|   427k|        &tname##_aux,                                   \
  247|   427k|        sizeof(stname),                                 \
  248|   427k|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|   427k|    }                         \
  |  |  105|   427k|    ;                         \
  |  |  106|   427k|    return &local_it;         \
  |  |  107|   427k|    }
  ------------------
d2i_X509:
  814|  10.9k|    {                                                                                      \
  815|  10.9k|        return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname)); \
  ------------------
  |  |  399|  10.9k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  816|  10.9k|    }                                                                                      \
i2d_X509:
  818|  7.27k|    {                                                                                      \
  819|  7.27k|        return ASN1_item_i2d((const ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname));          \
  ------------------
  |  |  399|  7.27k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  820|  7.27k|    }
X509_free:
  804|   291k|    {                                                               \
  805|   291k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|   291k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   291k|    }
X509_CERT_AUX_free:
  804|  21.8k|    {                                                               \
  805|  21.8k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  21.8k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  21.8k|    }
d2i_X509_SIG:
  814|  3.73k|    {                                                                                      \
  815|  3.73k|        return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname)); \
  ------------------
  |  |  399|  3.73k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  816|  3.73k|    }                                                                                      \
d2i_EC_PRIVATEKEY:
  814|  3.73k|    {                                                                                      \
  815|  3.73k|        return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname)); \
  ------------------
  |  |  399|  3.73k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  816|  3.73k|    }                                                                                      \
EC_PRIVATEKEY_free:
  804|  3.73k|    {                                                               \
  805|  3.73k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  3.73k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  3.73k|    }
AUTHORITY_KEYID_free:
  804|  32.6k|    {                                                               \
  805|  32.6k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  32.6k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  32.6k|    }
ASIdentifiers_free:
  804|  32.6k|    {                                                               \
  805|  32.6k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  32.6k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  32.6k|    }
BASIC_CONSTRAINTS_free:
  804|  10.8k|    {                                                               \
  805|  10.8k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  10.8k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  10.8k|    }
CRL_DIST_POINTS_free:
  804|  21.8k|    {                                                               \
  805|  21.8k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  399|  21.8k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  21.8k|    }

ml_kem.c:OPENSSL_store_u64_le:
  160|  2.03M|{
  161|  2.03M|#ifdef OSSL_HTOLE64
  162|  2.03M|    uint64_t t = OSSL_HTOLE64(val);
  ------------------
  |  |   52|  2.03M|#define OSSL_HTOLE64(x) htole64(x)
  ------------------
  163|       |
  164|  2.03M|    memcpy(out, (unsigned char *)&t, 8);
  165|  2.03M|    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|  2.03M|}
ml_kem.c:OPENSSL_load_u64_le:
  278|   493k|{
  279|   493k|#ifdef OSSL_LE64TOH
  280|   493k|    uint64_t t;
  281|       |
  282|   493k|    memcpy((unsigned char *)&t, in, 8);
  283|   493k|    *val = OSSL_LE64TOH(t);
  ------------------
  |  |   55|   493k|#define OSSL_LE64TOH(x) le64toh(x)
  ------------------
  284|   493k|    return in + 8;
  285|       |#else
  286|       |    uint64_t b0 = *in++;
  287|       |    uint64_t b1 = *in++;
  288|       |    uint64_t b2 = *in++;
  289|       |    uint64_t b3 = *in++;
  290|       |    uint64_t b4 = *in++;
  291|       |    uint64_t b5 = *in++;
  292|       |    uint64_t b6 = *in++;
  293|       |    uint64_t b7 = *in++;
  294|       |
  295|       |    *val = b0 | (b1 << 8) | (b2 << 16) | (b3 << 24)
  296|       |        | (b4 << 32) | (b5 << 40) | (b6 << 48) | (b7 << 56);
  297|       |    return in;
  298|       |#endif
  299|   493k|}
sha512.c:OPENSSL_store_u64_be:
  181|  3.57M|{
  182|  3.57M|#ifdef OSSL_HTOLE64
  183|  3.57M|    uint64_t t = OSSL_HTOBE64(val);
  ------------------
  |  |   46|  3.57M|#define OSSL_HTOBE64(x) htobe64(x)
  ------------------
  184|       |
  185|  3.57M|    memcpy(out, (unsigned char *)&t, 8);
  186|  3.57M|    return out + 8;
  187|       |#else
  188|       |    *out++ = (val >> 56) & 0xff;
  189|       |    *out++ = (val >> 48) & 0xff;
  190|       |    *out++ = (val >> 40) & 0xff;
  191|       |    *out++ = (val >> 32) & 0xff;
  192|       |    *out++ = (val >> 24) & 0xff;
  193|       |    *out++ = (val >> 16) & 0xff;
  194|       |    *out++ = (val >> 8) & 0xff;
  195|       |    *out++ = (val & 0xff);
  196|       |    return out;
  197|       |#endif
  198|  3.57M|}

tls_common.c:OSSL_FUNC_rlayer_skip_early_data:
   60|  72.5k|    {                                                  \
   61|  72.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  72.5k|    }
tls_common.c:OSSL_FUNC_rlayer_security:
   60|  72.5k|    {                                                  \
   61|  72.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  72.5k|    }
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|     30|    {                                                  \
   61|     30|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     30|    }
digest.c:OSSL_FUNC_digest_init:
   60|     30|    {                                                  \
   61|     30|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     30|    }
digest.c:OSSL_FUNC_digest_update:
   60|     30|    {                                                  \
   61|     30|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     30|    }
digest.c:OSSL_FUNC_digest_final:
   60|     30|    {                                                  \
   61|     30|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     30|    }
digest.c:OSSL_FUNC_digest_squeeze:
   60|      6|    {                                                  \
   61|      6|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      6|    }
digest.c:OSSL_FUNC_digest_freectx:
   60|     30|    {                                                  \
   61|     30|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     30|    }
digest.c:OSSL_FUNC_digest_dupctx:
   60|     30|    {                                                  \
   61|     30|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     30|    }
digest.c:OSSL_FUNC_digest_get_params:
   60|     30|    {                                                  \
   61|     30|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     30|    }
digest.c:OSSL_FUNC_digest_set_ctx_params:
   60|     11|    {                                                  \
   61|     11|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     11|    }
digest.c:OSSL_FUNC_digest_get_ctx_params:
   60|      9|    {                                                  \
   61|      9|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      9|    }
digest.c:OSSL_FUNC_digest_gettable_params:
   60|     30|    {                                                  \
   61|     30|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     30|    }
digest.c:OSSL_FUNC_digest_settable_ctx_params:
   60|     11|    {                                                  \
   61|     11|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     11|    }
digest.c:OSSL_FUNC_digest_gettable_ctx_params:
   60|      9|    {                                                  \
   61|      9|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      9|    }
digest.c:OSSL_FUNC_digest_copyctx:
   60|     27|    {                                                  \
   61|     27|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     27|    }
digest.c:OSSL_FUNC_digest_serialize:
   60|     19|    {                                                  \
   61|     19|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     19|    }
digest.c:OSSL_FUNC_digest_deserialize:
   60|     19|    {                                                  \
   61|     19|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     19|    }
evp_enc.c:OSSL_FUNC_cipher_newctx:
   60|    130|    {                                                  \
   61|    130|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    130|    }
evp_enc.c:OSSL_FUNC_cipher_encrypt_init:
   60|    130|    {                                                  \
   61|    130|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    130|    }
evp_enc.c:OSSL_FUNC_cipher_decrypt_init:
   60|    130|    {                                                  \
   61|    130|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    130|    }
evp_enc.c:OSSL_FUNC_cipher_encrypt_skey_init:
   60|     68|    {                                                  \
   61|     68|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     68|    }
evp_enc.c:OSSL_FUNC_cipher_decrypt_skey_init:
   60|     68|    {                                                  \
   61|     68|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     68|    }
evp_enc.c:OSSL_FUNC_cipher_update:
   60|    130|    {                                                  \
   61|    130|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    130|    }
evp_enc.c:OSSL_FUNC_cipher_final:
   60|    130|    {                                                  \
   61|    130|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    130|    }
evp_enc.c:OSSL_FUNC_cipher_cipher:
   60|    118|    {                                                  \
   61|    118|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    118|    }
evp_enc.c:OSSL_FUNC_cipher_freectx:
   60|    130|    {                                                  \
   61|    130|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    130|    }
evp_enc.c:OSSL_FUNC_cipher_dupctx:
   60|    129|    {                                                  \
   61|    129|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    129|    }
evp_enc.c:OSSL_FUNC_cipher_get_params:
   60|    130|    {                                                  \
   61|    130|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    130|    }
evp_enc.c:OSSL_FUNC_cipher_get_ctx_params:
   60|    130|    {                                                  \
   61|    130|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    130|    }
evp_enc.c:OSSL_FUNC_cipher_set_ctx_params:
   60|    130|    {                                                  \
   61|    130|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    130|    }
evp_enc.c:OSSL_FUNC_cipher_gettable_params:
   60|    130|    {                                                  \
   61|    130|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    130|    }
evp_enc.c:OSSL_FUNC_cipher_gettable_ctx_params:
   60|    130|    {                                                  \
   61|    130|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    130|    }
evp_enc.c:OSSL_FUNC_cipher_settable_ctx_params:
   60|    130|    {                                                  \
   61|    130|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    130|    }
exchange.c:OSSL_FUNC_keyexch_newctx:
   60|      7|    {                                                  \
   61|      7|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      7|    }
exchange.c:OSSL_FUNC_keyexch_init:
   60|      7|    {                                                  \
   61|      7|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      7|    }
exchange.c:OSSL_FUNC_keyexch_set_peer:
   60|      4|    {                                                  \
   61|      4|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      4|    }
exchange.c:OSSL_FUNC_keyexch_derive:
   60|      7|    {                                                  \
   61|      7|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      7|    }
exchange.c:OSSL_FUNC_keyexch_freectx:
   60|      7|    {                                                  \
   61|      7|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      7|    }
exchange.c:OSSL_FUNC_keyexch_dupctx:
   60|      7|    {                                                  \
   61|      7|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      7|    }
exchange.c:OSSL_FUNC_keyexch_get_ctx_params:
   60|      7|    {                                                  \
   61|      7|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      7|    }
exchange.c:OSSL_FUNC_keyexch_gettable_ctx_params:
   60|      7|    {                                                  \
   61|      7|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      7|    }
exchange.c:OSSL_FUNC_keyexch_set_ctx_params:
   60|      5|    {                                                  \
   61|      5|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      5|    }
exchange.c:OSSL_FUNC_keyexch_settable_ctx_params:
   60|      5|    {                                                  \
   61|      5|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      5|    }
exchange.c:OSSL_FUNC_keyexch_derive_skey:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
kdf_meth.c:OSSL_FUNC_kdf_newctx:
   60|     21|    {                                                  \
   61|     21|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     21|    }
kdf_meth.c:OSSL_FUNC_kdf_dupctx:
   60|     18|    {                                                  \
   61|     18|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     18|    }
kdf_meth.c:OSSL_FUNC_kdf_freectx:
   60|     21|    {                                                  \
   61|     21|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     21|    }
kdf_meth.c:OSSL_FUNC_kdf_reset:
   60|     21|    {                                                  \
   61|     21|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     21|    }
kdf_meth.c:OSSL_FUNC_kdf_derive:
   60|     21|    {                                                  \
   61|     21|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     21|    }
kdf_meth.c:OSSL_FUNC_kdf_gettable_ctx_params:
   60|     21|    {                                                  \
   61|     21|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     21|    }
kdf_meth.c:OSSL_FUNC_kdf_settable_ctx_params:
   60|     21|    {                                                  \
   61|     21|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     21|    }
kdf_meth.c:OSSL_FUNC_kdf_get_ctx_params:
   60|     21|    {                                                  \
   61|     21|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     21|    }
kdf_meth.c:OSSL_FUNC_kdf_set_ctx_params:
   60|     21|    {                                                  \
   61|     21|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     21|    }
kem.c:OSSL_FUNC_kem_newctx:
   60|     12|    {                                                  \
   61|     12|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     12|    }
kem.c:OSSL_FUNC_kem_encapsulate_init:
   60|     12|    {                                                  \
   61|     12|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     12|    }
kem.c:OSSL_FUNC_kem_auth_encapsulate_init:
   60|      3|    {                                                  \
   61|      3|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      3|    }
kem.c:OSSL_FUNC_kem_encapsulate:
   60|     12|    {                                                  \
   61|     12|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     12|    }
kem.c:OSSL_FUNC_kem_decapsulate_init:
   60|     12|    {                                                  \
   61|     12|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     12|    }
kem.c:OSSL_FUNC_kem_auth_decapsulate_init:
   60|      3|    {                                                  \
   61|      3|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      3|    }
kem.c:OSSL_FUNC_kem_decapsulate:
   60|     12|    {                                                  \
   61|     12|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     12|    }
kem.c:OSSL_FUNC_kem_freectx:
   60|     12|    {                                                  \
   61|     12|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     12|    }
kem.c:OSSL_FUNC_kem_dupctx:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
kem.c:OSSL_FUNC_kem_get_ctx_params:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
kem.c:OSSL_FUNC_kem_gettable_ctx_params:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
kem.c:OSSL_FUNC_kem_set_ctx_params:
   60|     12|    {                                                  \
   61|     12|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     12|    }
kem.c:OSSL_FUNC_kem_settable_ctx_params:
   60|     12|    {                                                  \
   61|     12|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     12|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_new:
   60|     42|    {                                                  \
   61|     42|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     42|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_new_ex:
   60|      6|    {                                                  \
   61|      6|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      6|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_init:
   60|     39|    {                                                  \
   61|     39|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     39|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_set_template:
   60|      6|    {                                                  \
   61|      6|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      6|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_set_params:
   60|     39|    {                                                  \
   61|     39|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     39|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_settable_params:
   60|     39|    {                                                  \
   61|     39|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     39|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_get_params:
   60|      2|    {                                                  \
   61|      2|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      2|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_gettable_params:
   60|      2|    {                                                  \
   61|      2|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      2|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen:
   60|     39|    {                                                  \
   61|     39|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     39|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_cleanup:
   60|     39|    {                                                  \
   61|     39|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     39|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_free:
   60|     42|    {                                                  \
   61|     42|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     42|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_load:
   60|     30|    {                                                  \
   61|     30|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     30|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_get_params:
   60|     39|    {                                                  \
   61|     39|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     39|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gettable_params:
   60|     39|    {                                                  \
   61|     39|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     39|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_set_params:
   60|     21|    {                                                  \
   61|     21|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     21|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_settable_params:
   60|     21|    {                                                  \
   61|     21|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     21|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_query_operation_name:
   60|      5|    {                                                  \
   61|      5|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      5|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_has:
   60|     42|    {                                                  \
   61|     42|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     42|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_dup:
   60|     35|    {                                                  \
   61|     35|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     35|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_validate:
   60|     30|    {                                                  \
   61|     30|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     30|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_match:
   60|     39|    {                                                  \
   61|     39|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     39|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_import:
   60|     39|    {                                                  \
   61|     39|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     39|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_import_types:
   60|     39|    {                                                  \
   61|     39|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     39|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_export:
   60|     39|    {                                                  \
   61|     39|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     39|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_export_types:
   60|     39|    {                                                  \
   61|     39|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     39|    }
mac_meth.c:OSSL_FUNC_mac_newctx:
   60|      9|    {                                                  \
   61|      9|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      9|    }
mac_meth.c:OSSL_FUNC_mac_dupctx:
   60|      9|    {                                                  \
   61|      9|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      9|    }
mac_meth.c:OSSL_FUNC_mac_freectx:
   60|      9|    {                                                  \
   61|      9|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      9|    }
mac_meth.c:OSSL_FUNC_mac_init:
   60|      9|    {                                                  \
   61|      9|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      9|    }
mac_meth.c:OSSL_FUNC_mac_update:
   60|      9|    {                                                  \
   61|      9|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      9|    }
mac_meth.c:OSSL_FUNC_mac_final:
   60|      9|    {                                                  \
   61|      9|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      9|    }
mac_meth.c:OSSL_FUNC_mac_gettable_params:
   60|      2|    {                                                  \
   61|      2|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      2|    }
mac_meth.c:OSSL_FUNC_mac_gettable_ctx_params:
   60|      7|    {                                                  \
   61|      7|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      7|    }
mac_meth.c:OSSL_FUNC_mac_settable_ctx_params:
   60|      9|    {                                                  \
   61|      9|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      9|    }
mac_meth.c:OSSL_FUNC_mac_get_params:
   60|      2|    {                                                  \
   61|      2|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      2|    }
mac_meth.c:OSSL_FUNC_mac_get_ctx_params:
   60|      7|    {                                                  \
   61|      7|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      7|    }
mac_meth.c:OSSL_FUNC_mac_set_ctx_params:
   60|      9|    {                                                  \
   61|      9|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      9|    }
signature.c:OSSL_FUNC_signature_newctx:
   60|     59|    {                                                  \
   61|     59|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     59|    }
signature.c:OSSL_FUNC_signature_sign_init:
   60|     40|    {                                                  \
   61|     40|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     40|    }
signature.c:OSSL_FUNC_signature_sign:
   60|     55|    {                                                  \
   61|     55|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     55|    }
signature.c:OSSL_FUNC_signature_sign_message_init:
   60|     51|    {                                                  \
   61|     51|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     51|    }
signature.c:OSSL_FUNC_signature_sign_message_update:
   60|     34|    {                                                  \
   61|     34|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     34|    }
signature.c:OSSL_FUNC_signature_sign_message_final:
   60|     34|    {                                                  \
   61|     34|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     34|    }
signature.c:OSSL_FUNC_signature_verify_init:
   60|     40|    {                                                  \
   61|     40|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     40|    }
signature.c:OSSL_FUNC_signature_verify:
   60|     55|    {                                                  \
   61|     55|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     55|    }
signature.c:OSSL_FUNC_signature_verify_message_init:
   60|     51|    {                                                  \
   61|     51|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     51|    }
signature.c:OSSL_FUNC_signature_verify_message_update:
   60|     34|    {                                                  \
   61|     34|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     34|    }
signature.c:OSSL_FUNC_signature_verify_message_final:
   60|     34|    {                                                  \
   61|     34|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     34|    }
signature.c:OSSL_FUNC_signature_verify_recover_init:
   60|     14|    {                                                  \
   61|     14|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     14|    }
signature.c:OSSL_FUNC_signature_verify_recover:
   60|     14|    {                                                  \
   61|     14|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     14|    }
signature.c:OSSL_FUNC_signature_digest_sign_init:
   60|     25|    {                                                  \
   61|     25|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     25|    }
signature.c:OSSL_FUNC_signature_digest_sign_update:
   60|      8|    {                                                  \
   61|      8|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      8|    }
signature.c:OSSL_FUNC_signature_digest_sign_final:
   60|      8|    {                                                  \
   61|      8|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      8|    }
signature.c:OSSL_FUNC_signature_digest_sign:
   60|     17|    {                                                  \
   61|     17|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     17|    }
signature.c:OSSL_FUNC_signature_digest_verify_init:
   60|     21|    {                                                  \
   61|     21|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     21|    }
signature.c:OSSL_FUNC_signature_digest_verify_update:
   60|      4|    {                                                  \
   61|      4|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      4|    }
signature.c:OSSL_FUNC_signature_digest_verify_final:
   60|      4|    {                                                  \
   61|      4|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      4|    }
signature.c:OSSL_FUNC_signature_digest_verify:
   60|     17|    {                                                  \
   61|     17|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     17|    }
signature.c:OSSL_FUNC_signature_freectx:
   60|     59|    {                                                  \
   61|     59|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     59|    }
signature.c:OSSL_FUNC_signature_dupctx:
   60|     59|    {                                                  \
   61|     59|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     59|    }
signature.c:OSSL_FUNC_signature_get_ctx_params:
   60|     55|    {                                                  \
   61|     55|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     55|    }
signature.c:OSSL_FUNC_signature_gettable_ctx_params:
   60|     55|    {                                                  \
   61|     55|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     55|    }
signature.c:OSSL_FUNC_signature_set_ctx_params:
   60|     59|    {                                                  \
   61|     59|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     59|    }
signature.c:OSSL_FUNC_signature_settable_ctx_params:
   60|     59|    {                                                  \
   61|     59|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     59|    }
signature.c:OSSL_FUNC_signature_get_ctx_md_params:
   60|      4|    {                                                  \
   61|      4|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      4|    }
signature.c:OSSL_FUNC_signature_gettable_ctx_md_params:
   60|      4|    {                                                  \
   61|      4|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      4|    }
signature.c:OSSL_FUNC_signature_set_ctx_md_params:
   60|      4|    {                                                  \
   61|      4|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      4|    }
signature.c:OSSL_FUNC_signature_settable_ctx_md_params:
   60|      4|    {                                                  \
   61|      4|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      4|    }
signature.c:OSSL_FUNC_signature_query_key_types:
   60|     36|    {                                                  \
   61|     36|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     36|    }
provider_core.c:OSSL_FUNC_provider_teardown:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
provider_core.c:OSSL_FUNC_provider_gettable_params:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
provider_core.c:OSSL_FUNC_provider_get_params:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
provider_core.c:OSSL_FUNC_provider_get_capabilities:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
provider_core.c:OSSL_FUNC_provider_query_operation:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
defltprov.c:OSSL_FUNC_core_get_params:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
defltprov.c:OSSL_FUNC_core_get_libctx:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
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|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
provider_seeding.c:OSSL_FUNC_get_user_entropy:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
provider_seeding.c:OSSL_FUNC_cleanup_entropy:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
provider_seeding.c:OSSL_FUNC_cleanup_user_entropy:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
provider_seeding.c:OSSL_FUNC_get_nonce:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
provider_seeding.c:OSSL_FUNC_get_user_nonce:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
provider_seeding.c:OSSL_FUNC_cleanup_nonce:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
provider_seeding.c:OSSL_FUNC_cleanup_user_nonce:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
drbg.c:OSSL_FUNC_rand_enable_locking:
   60|      3|    {                                                  \
   61|      3|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      3|    }
drbg.c:OSSL_FUNC_rand_lock:
   60|      3|    {                                                  \
   61|      3|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      3|    }
drbg.c:OSSL_FUNC_rand_unlock:
   60|      3|    {                                                  \
   61|      3|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      3|    }
drbg.c:OSSL_FUNC_rand_get_ctx_params:
   60|      3|    {                                                  \
   61|      3|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      3|    }
drbg.c:OSSL_FUNC_rand_get_seed:
   60|      3|    {                                                  \
   61|      3|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      3|    }
drbg.c:OSSL_FUNC_rand_clear_seed:
   60|      3|    {                                                  \
   61|      3|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      3|    }
evp_rand.c:OSSL_FUNC_rand_newctx:
   60|      5|    {                                                  \
   61|      5|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      5|    }
evp_rand.c:OSSL_FUNC_rand_freectx:
   60|      5|    {                                                  \
   61|      5|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      5|    }
evp_rand.c:OSSL_FUNC_rand_instantiate:
   60|      5|    {                                                  \
   61|      5|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      5|    }
evp_rand.c:OSSL_FUNC_rand_uninstantiate:
   60|      5|    {                                                  \
   61|      5|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      5|    }
evp_rand.c:OSSL_FUNC_rand_generate:
   60|      5|    {                                                  \
   61|      5|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      5|    }
evp_rand.c:OSSL_FUNC_rand_reseed:
   60|      5|    {                                                  \
   61|      5|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      5|    }
evp_rand.c:OSSL_FUNC_rand_nonce:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
evp_rand.c:OSSL_FUNC_rand_enable_locking:
   60|      5|    {                                                  \
   61|      5|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      5|    }
evp_rand.c:OSSL_FUNC_rand_lock:
   60|      5|    {                                                  \
   61|      5|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      5|    }
evp_rand.c:OSSL_FUNC_rand_unlock:
   60|      5|    {                                                  \
   61|      5|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      5|    }
evp_rand.c:OSSL_FUNC_rand_gettable_ctx_params:
   60|      5|    {                                                  \
   61|      5|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      5|    }
evp_rand.c:OSSL_FUNC_rand_settable_ctx_params:
   60|      4|    {                                                  \
   61|      4|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      4|    }
evp_rand.c:OSSL_FUNC_rand_get_ctx_params:
   60|      5|    {                                                  \
   61|      5|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      5|    }
evp_rand.c:OSSL_FUNC_rand_set_ctx_params:
   60|      4|    {                                                  \
   61|      4|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      4|    }
evp_rand.c:OSSL_FUNC_rand_verify_zeroization:
   60|      5|    {                                                  \
   61|      5|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      5|    }
evp_rand.c:OSSL_FUNC_rand_get_seed:
   60|      5|    {                                                  \
   61|      5|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      5|    }
evp_rand.c:OSSL_FUNC_rand_clear_seed:
   60|      4|    {                                                  \
   61|      4|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      4|    }

conf_mod.c:ERR_GET_REASON:
  239|      2|{
  240|      2|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|      2|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|      2|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 2]
  |  |  ------------------
  ------------------
  241|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|      2|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|      2|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|      2|}
err.c:ERR_GET_LIB:
  225|  9.26k|{
  226|  9.26k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|  9.26k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|  9.26k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 9.26k]
  |  |  ------------------
  ------------------
  227|      0|        return ERR_LIB_SYS;
  ------------------
  |  |   55|      0|#define ERR_LIB_SYS 2
  ------------------
  228|  9.26k|    return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  209|  9.26k|#define ERR_LIB_OFFSET 23L
  ------------------
                  return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  210|  9.26k|#define ERR_LIB_MASK 0xFF
  ------------------
  229|  9.26k|}
err.c:ERR_GET_REASON:
  239|     69|{
  240|     69|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|     69|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|     69|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 69]
  |  |  ------------------
  ------------------
  241|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|     69|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|     69|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|     69|}
pem_info.c:ERR_GET_REASON:
  239|  3.55k|{
  240|  3.55k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|  3.55k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|  3.55k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 3.55k]
  |  |  ------------------
  ------------------
  241|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|  3.55k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|  3.55k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|  3.55k|}
a_d2i_fp.c:ERR_GET_REASON:
  239|  25.5k|{
  240|  25.5k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|  25.5k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|  25.5k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 25.5k]
  |  |  ------------------
  ------------------
  241|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|  25.5k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|  25.5k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|  25.5k|}
conf_def.c:ERR_GET_REASON:
  239|      2|{
  240|      2|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  222|      2|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  201|      2|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (222:35): [True: 0, False: 2]
  |  |  ------------------
  ------------------
  241|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  202|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  242|      2|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  213|      2|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  243|      2|}

ssl_lib.c:lh_SSL_SESSION_retrieve:
  291|  14.3k|    {                                                                                                                      \
  292|  14.3k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|  14.3k|    }                                                                                                                      \
ssl_lib.c:lh_SSL_SESSION_new:
  334|  7.36k|    {                                                                                                                      \
  335|  7.36k|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|  7.36k|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|  7.36k|            lh_##type##_doall_thunk,                                                                                       \
  338|  7.36k|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|  7.36k|    }                                                                                                                      \
ssl_lib.c:lh_SSL_SESSION_hfn_thunk:
  260|  15.0k|    {                                                                                                                      \
  261|  15.0k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|  15.0k|        return hfn_conv((const type *)data);                                                                               \
  263|  15.0k|    }                                                                                                                      \
ssl_lib.c:lh_SSL_SESSION_free:
  271|  7.36k|    {                                                                                                                      \
  272|  7.36k|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|  7.36k|    }                                                                                                                      \
ssl_sess.c:lh_SSL_SESSION_retrieve:
  291|    697|    {                                                                                                                      \
  292|    697|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|    697|    }                                                                                                                      \
ssl_sess.c:lh_SSL_SESSION_get_down_load:
  306|  7.36k|    {                                                                                                                      \
  307|  7.36k|        return OPENSSL_LH_get_down_load((OPENSSL_LHASH *)lh);                                                              \
  308|  7.36k|    }                                                                                                                      \
ssl_sess.c:lh_SSL_SESSION_set_down_load:
  311|  14.7k|    {                                                                                                                      \
  312|  14.7k|        OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl);                                                                 \
  313|  14.7k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_new:
  334|      2|    {                                                                                                                      \
  335|      2|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|      2|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|      2|            lh_##type##_doall_thunk,                                                                                       \
  338|      2|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|      2|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_hfn_thunk:
  260|  14.6k|    {                                                                                                                      \
  261|  14.6k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|  14.6k|        return hfn_conv((const type *)data);                                                                               \
  263|  14.6k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_cfn_thunk:
  265|  14.6k|    {                                                                                                                      \
  266|  14.6k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|  14.6k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|  14.6k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_retrieve:
  291|  14.6k|    {                                                                                                                      \
  292|  14.6k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|  14.6k|    }                                                                                                                      \
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|  9.19k|    {                                                                                                          \
  209|  9.19k|        return (OPENSSL_LHASH *)lh;                                                                            \
  210|  9.19k|    }                                                                                                          \
err.c:ossl_check_ERR_STRING_DATA_lh_hashfunc_type:
  218|      2|    {                                                                                                          \
  219|      2|        return (OPENSSL_LH_HASHFUNC)hfn;                                                                       \
  220|      2|    }                                                                                                          \
err.c:ossl_check_ERR_STRING_DATA_lh_compfunc_type:
  213|      2|    {                                                                                                          \
  214|      2|        return (OPENSSL_LH_COMPFUNC)cmp;                                                                       \
  215|      2|    }                                                                                                          \
err.c:lh_ERR_STRING_DATA_hash_thunk:
  172|  9.19k|    {                                                                                                          \
  173|  9.19k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                        \
  174|  9.19k|        return hfn_conv((const type *)data);                                                                   \
  175|  9.19k|    }                                                                                                          \
err.c:lh_ERR_STRING_DATA_comp_thunk:
  177|  6.02k|    {                                                                                                          \
  178|  6.02k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                \
  179|  6.02k|        return cfn_conv((const type *)da, (const type *)db);                                                   \
  180|  6.02k|    }                                                                                                          \
err.c:ossl_check_ERR_STRING_DATA_lh_plain_type:
  193|  9.06k|    {                                                                                                          \
  194|  9.06k|        return ptr;                                                                                            \
  195|  9.06k|    }                                                                                                          \
err.c:ossl_check_const_ERR_STRING_DATA_lh_plain_type:
  198|    138|    {                                                                                                          \
  199|    138|        return ptr;                                                                                            \
  200|    138|    }                                                                                                          \
o_names.c:lh_OBJ_NAME_new:
  334|      2|    {                                                                                                                      \
  335|      2|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|      2|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|      2|            lh_##type##_doall_thunk,                                                                                       \
  338|      2|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|      2|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_hfn_thunk:
  260|  12.3k|    {                                                                                                                      \
  261|  12.3k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|  12.3k|        return hfn_conv((const type *)data);                                                                               \
  263|  12.3k|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_cfn_thunk:
  265|  11.6k|    {                                                                                                                      \
  266|  11.6k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|  11.6k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|  11.6k|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_retrieve:
  291|  11.4k|    {                                                                                                                      \
  292|  11.4k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|  11.4k|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_insert:
  281|    848|    {                                                                                                                      \
  282|    848|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|    848|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_error:
  296|    484|    {                                                                                                                      \
  297|    484|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|    484|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_doall_OBJ_DOALL:
  371|      2|    {                                                                                       \
  372|      2|        OPENSSL_LH_doall_arg_thunk((OPENSSL_LHASH *)lh,                                     \
  373|      2|            lh_##type##_doall_##argtype##_thunk,                                            \
  374|      2|            (OPENSSL_LH_DOALL_FUNCARG)fn,                                                   \
  375|      2|            (void *)arg);                                                                   \
  376|      2|    }                                                                                       \
o_names.c:lh_OBJ_NAME_doall_OBJ_DOALL_thunk:
  363|    484|    {                                                                                       \
  364|    484|        void (*fn_conv)(cbargtype *, argtype *) = (void (*)(cbargtype *, argtype *))fn;     \
  365|    484|        fn_conv((cbargtype *)node, (argtype *)arg);                                         \
  366|    484|    }                                                                                       \
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|   220k|    {                                                                                                                      \
  261|   220k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   220k|        return hfn_conv((const type *)data);                                                                               \
  263|   220k|    }                                                                                                                      \
obj_dat.c:lh_ADDED_OBJ_retrieve:
  291|   220k|    {                                                                                                                      \
  292|   220k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   220k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_new:
  334|      2|    {                                                                                                                      \
  335|      2|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|      2|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|      2|            lh_##type##_doall_thunk,                                                                                       \
  338|      2|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|      2|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_hfn_thunk:
  260|    423|    {                                                                                                                      \
  261|    423|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|    423|        return hfn_conv((const type *)data);                                                                               \
  263|    423|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_cfn_thunk:
  265|    375|    {                                                                                                                      \
  266|    375|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|    375|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|    375|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_retrieve:
  291|    407|    {                                                                                                                      \
  292|    407|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|    407|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_insert:
  281|     16|    {                                                                                                                      \
  282|     16|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|     16|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_error:
  296|     16|    {                                                                                                                      \
  297|     16|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|     16|    }                                                                                                                      \
property.c:lh_QUERY_new:
  334|    345|    {                                                                                                                      \
  335|    345|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|    345|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|    345|            lh_##type##_doall_thunk,                                                                                       \
  338|    345|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|    345|    }                                                                                                                      \
property.c:lh_QUERY_hfn_thunk:
  260|  1.21M|    {                                                                                                                      \
  261|  1.21M|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|  1.21M|        return hfn_conv((const type *)data);                                                                               \
  263|  1.21M|    }                                                                                                                      \
property.c:lh_QUERY_cfn_thunk:
  265|  1.21M|    {                                                                                                                      \
  266|  1.21M|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|  1.21M|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|  1.21M|    }                                                                                                                      \
property.c:lh_QUERY_doall:
  328|     46|    {                                                                                                                      \
  329|     46|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|     46|    }                                                                                                                      \
property.c:lh_QUERY_num_items:
  301|     46|    {                                                                                                                      \
  302|     46|        return OPENSSL_LH_num_items((OPENSSL_LHASH *)lh);                                                                  \
  303|     46|    }                                                                                                                      \
property.c:lh_QUERY_flush:
  276|     46|    {                                                                                                                      \
  277|     46|        OPENSSL_LH_flush((OPENSSL_LHASH *)lh);                                                                             \
  278|     46|    }                                                                                                                      \
property.c:lh_QUERY_retrieve:
  291|  1.21M|    {                                                                                                                      \
  292|  1.21M|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|  1.21M|    }                                                                                                                      \
property.c:lh_QUERY_insert:
  281|     60|    {                                                                                                                      \
  282|     60|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|     60|    }                                                                                                                      \
property.c:lh_QUERY_error:
  296|     60|    {                                                                                                                      \
  297|     60|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|     60|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_new:
  334|      4|    {                                                                                                                      \
  335|      4|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|      4|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|      4|            lh_##type##_doall_thunk,                                                                                       \
  338|      4|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|      4|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_hfn_thunk:
  260|    966|    {                                                                                                                      \
  261|    966|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|    966|        return hfn_conv((const type *)data);                                                                               \
  263|    966|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_cfn_thunk:
  265|    876|    {                                                                                                                      \
  266|    876|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|    876|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|    876|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_retrieve:
  291|    936|    {                                                                                                                      \
  292|    936|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|    936|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_insert:
  281|     30|    {                                                                                                                      \
  282|     30|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|     30|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_error:
  296|     30|    {                                                                                                                      \
  297|     30|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|     30|    }                                                                                                                      \

OBJ_bsearch_ssl_cipher_id:
  142|   217k|    {                                                                  \
  143|   217k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),    \
  144|   217k|            nm##_cmp_BSEARCH_CMP_FN);                                  \
  145|   217k|    }                                                                  \
ssl_lib.c:ssl_cipher_id_cmp_BSEARCH_CMP_FN:
  136|  1.03M|    {                                                                  \
  137|  1.03M|        type1 const *a = a_;                                           \
  138|  1.03M|        type2 const *b = b_;                                           \
  139|  1.03M|        return nm##_cmp(a, b);                                         \
  140|  1.03M|    }                                                                  \
obj_dat.c:OBJ_bsearch_ln:
  128|   183k|    {                                                                      \
  129|   183k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|   183k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|   183k|    }                                                                      \
obj_dat.c:ln_cmp_BSEARCH_CMP_FN:
  122|  1.74M|    {                                                                      \
  123|  1.74M|        type1 const *a = a_;                                               \
  124|  1.74M|        type2 const *b = b_;                                               \
  125|  1.74M|        return nm##_cmp(a, b);                                             \
  126|  1.74M|    }                                                                      \
obj_dat.c:OBJ_bsearch_sn:
  128|   275k|    {                                                                      \
  129|   275k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|   275k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|   275k|    }                                                                      \
obj_dat.c:sn_cmp_BSEARCH_CMP_FN:
  122|  2.89M|    {                                                                      \
  123|  2.89M|        type1 const *a = a_;                                               \
  124|  2.89M|        type2 const *b = b_;                                               \
  125|  2.89M|        return nm##_cmp(a, b);                                             \
  126|  2.89M|    }                                                                      \
obj_dat.c:OBJ_bsearch_obj:
  128|   211k|    {                                                                      \
  129|   211k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|   211k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|   211k|    }                                                                      \
obj_dat.c:obj_cmp_BSEARCH_CMP_FN:
  122|  2.10M|    {                                                                      \
  123|  2.10M|        type1 const *a = a_;                                               \
  124|  2.10M|        type2 const *b = b_;                                               \
  125|  2.10M|        return nm##_cmp(a, b);                                             \
  126|  2.10M|    }                                                                      \
obj_xref.c:OBJ_bsearch_sig:
  128|  51.0k|    {                                                                      \
  129|  51.0k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|  51.0k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|  51.0k|    }                                                                      \
obj_xref.c:sig_cmp_BSEARCH_CMP_FN:
  122|   284k|    {                                                                      \
  123|   284k|        type1 const *a = a_;                                               \
  124|   284k|        type2 const *b = b_;                                               \
  125|   284k|        return nm##_cmp(a, b);                                             \
  126|   284k|    }                                                                      \
v3_lib.c:OBJ_bsearch_ext:
  128|  54.1k|    {                                                                      \
  129|  54.1k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|  54.1k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|  54.1k|    }                                                                      \
v3_lib.c:ext_cmp_BSEARCH_CMP_FN:
  122|   238k|    {                                                                      \
  123|   238k|        type1 const *a = a_;                                               \
  124|   238k|        type2 const *b = b_;                                               \
  125|   238k|        return nm##_cmp(a, b);                                             \
  126|   238k|    }                                                                      \
v3_purp.c:OBJ_bsearch_nid:
  128|  21.6k|    {                                                                      \
  129|  21.6k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|  21.6k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|  21.6k|    }                                                                      \
v3_purp.c:nid_cmp_BSEARCH_CMP_FN:
  122|  54.0k|    {                                                                      \
  123|  54.0k|        type1 const *a = a_;                                               \
  124|  54.0k|        type2 const *b = b_;                                               \
  125|  54.0k|        return nm##_cmp(a, b);                                             \
  126|  54.0k|    }                                                                      \
x509_vpm.c:OBJ_bsearch_table:
  128|  10.8k|    {                                                                      \
  129|  10.8k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|  10.8k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|  10.8k|    }                                                                      \
x509_vpm.c:table_cmp_BSEARCH_CMP_FN:
  122|  21.7k|    {                                                                      \
  123|  21.7k|        type1 const *a = a_;                                               \
  124|  21.7k|        type2 const *b = b_;                                               \
  125|  21.7k|        return nm##_cmp(a, b);                                             \
  126|  21.7k|    }                                                                      \
ameth_lib.c:OBJ_bsearch_ameth:
  128|   142k|    {                                                                      \
  129|   142k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|   142k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|   142k|    }                                                                      \
ameth_lib.c:ameth_cmp_BSEARCH_CMP_FN:
  122|   420k|    {                                                                      \
  123|   420k|        type1 const *a = a_;                                               \
  124|   420k|        type2 const *b = b_;                                               \
  125|   420k|        return nm##_cmp(a, b);                                             \
  126|   420k|    }                                                                      \

PEM_read_bio_X509:
  152|  3.73k|    {                                                                \
  153|  3.73k|        return PEM_ASN1_read_bio((d2i_of_void *)d2i_##asn1, str, bp, \
  154|  3.73k|            (void **)x, cb, u);                                      \
  155|  3.73k|    }

s3_lib.c:ossl_check_X509_NAME_sk_type:
   63|  36.2k|    {                                                                                                                    \
   64|  36.2k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  36.2k|    }                                                                                                                    \
s3_lib.c:ossl_check_X509_NAME_freefunc_type:
   75|  36.2k|    {                                                                                                                    \
   76|  36.2k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  36.2k|    }
s3_lib.c:ossl_check_const_SSL_CIPHER_sk_type:
   59|  10.8k|    {                                                                                                                    \
   60|  10.8k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  10.8k|    }                                                                                                                    \
s3_lib.c:ossl_check_SSL_CIPHER_sk_type:
   63|  7.25k|    {                                                                                                                    \
   64|  7.25k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  7.25k|    }                                                                                                                    \
s3_lib.c:ossl_check_SSL_CIPHER_type:
   55|  3.62k|    {                                                                                                                    \
   56|  3.62k|        return ptr;                                                                                                      \
   57|  3.62k|    }                                                                                                                    \
ssl_cert.c:ossl_check_const_X509_sk_type:
   59|  7.25k|    {                                                                                                                    \
   60|  7.25k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  7.25k|    }                                                                                                                    \
ssl_cert.c:sk_danetls_record_num:
   98|  3.62k|    {                                                                                                                      \
   99|  3.62k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  3.62k|    }                                                                                                                      \
ssl_ciph.c:ossl_check_const_SSL_CIPHER_sk_type:
   59|   571k|    {                                                                                                                    \
   60|   571k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|   571k|    }                                                                                                                    \
ssl_ciph.c:ossl_check_SSL_CIPHER_sk_type:
   63|   500k|    {                                                                                                                    \
   64|   500k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   500k|    }                                                                                                                    \
ssl_ciph.c:ossl_check_SSL_CIPHER_type:
   55|   463k|    {                                                                                                                    \
   56|   463k|        return ptr;                                                                                                      \
   57|   463k|    }                                                                                                                    \
ssl_ciph.c:ossl_check_SSL_CIPHER_compfunc_type:
   67|  7.36k|    {                                                                                                                    \
   68|  7.36k|        return (OPENSSL_sk_compfunc)cmp;                                                                                 \
   69|  7.36k|    }                                                                                                                    \
ssl_lib.c:ossl_check_const_SSL_CIPHER_sk_type:
   59|  1.33M|    {                                                                                                                    \
   60|  1.33M|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  1.33M|    }                                                                                                                    \
ssl_lib.c:sk_danetls_record_pop_free:
  170|  7.25k|    {                                                                                                                      \
  171|  7.25k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  7.25k|                                                                                                                           \
  173|  7.25k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  7.25k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  7.25k|                                                                                                                           \
  176|  7.25k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  7.25k|    }                                                                                                                      \
ssl_lib.c:ossl_check_SSL_CIPHER_sk_type:
   63|   486k|    {                                                                                                                    \
   64|   486k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   486k|    }                                                                                                                    \
ssl_lib.c:ossl_check_X509_EXTENSION_sk_type:
   63|  7.25k|    {                                                                                                                    \
   64|  7.25k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  7.25k|    }                                                                                                                    \
ssl_lib.c:ossl_check_X509_EXTENSION_freefunc_type:
   75|  7.25k|    {                                                                                                                    \
   76|  7.25k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  7.25k|    }
ssl_lib.c:ossl_check_OCSP_RESPID_sk_type:
   63|  7.25k|    {                                                                                                                    \
   64|  7.25k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  7.25k|    }                                                                                                                    \
ssl_lib.c:ossl_check_OCSP_RESPID_freefunc_type:
   75|  7.25k|    {                                                                                                                    \
   76|  7.25k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  7.25k|    }
ssl_lib.c:sk_OCSP_RESPONSE_pop_free:
  170|  7.25k|    {                                                                                                                      \
  171|  7.25k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  7.25k|                                                                                                                           \
  173|  7.25k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  7.25k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  7.25k|                                                                                                                           \
  176|  7.25k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  7.25k|    }                                                                                                                      \
ssl_lib.c:ossl_check_X509_NAME_sk_type:
   63|  29.2k|    {                                                                                                                    \
   64|  29.2k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  29.2k|    }                                                                                                                    \
ssl_lib.c:ossl_check_X509_NAME_freefunc_type:
   75|  29.2k|    {                                                                                                                    \
   76|  29.2k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  29.2k|    }
ssl_lib.c:ossl_check_SRTP_PROTECTION_PROFILE_sk_type:
   63|  14.6k|    {                                                                                                                    \
   64|  14.6k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  14.6k|    }                                                                                                                    \
ssl_lib.c:ossl_check_SSL_CIPHER_type:
   55|   435k|    {                                                                                                                    \
   56|   435k|        return ptr;                                                                                                      \
   57|   435k|    }                                                                                                                    \
ssl_sess.c:sk_SSL_SESSION_new_null:
  115|  7.36k|    {                                                                                                                      \
  116|  7.36k|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|  7.36k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|  7.36k|                                                                                                                           \
  119|  7.36k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|  7.36k|                                                                                                                           \
  121|  7.36k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|  7.36k|    }                                                                                                                      \
ssl_sess.c:sk_SSL_SESSION_num:
   98|  7.36k|    {                                                                                                                      \
   99|  7.36k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  7.36k|    }                                                                                                                      \
ssl_sess.c:sk_SSL_SESSION_free:
  137|  7.36k|    {                                                                                                                      \
  138|  7.36k|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  139|  7.36k|    }                                                                                                                      \
t1_lib.c:ossl_check_const_X509_sk_type:
   59|  7.25k|    {                                                                                                                    \
   60|  7.25k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  7.25k|    }                                                                                                                    \
extensions.c:sk_OCSP_RESPONSE_pop_free:
  170|  7.25k|    {                                                                                                                      \
  171|  7.25k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  7.25k|                                                                                                                           \
  173|  7.25k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  7.25k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  7.25k|                                                                                                                           \
  176|  7.25k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  7.25k|    }                                                                                                                      \
extensions.c:ossl_check_const_X509_NAME_sk_type:
   59|  3.62k|    {                                                                                                                    \
   60|  3.62k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  3.62k|    }                                                                                                                    \
extensions_clnt.c:ossl_check_const_SSL_CIPHER_sk_type:
   59|  32.6k|    {                                                                                                                    \
   60|  32.6k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  32.6k|    }                                                                                                                    \
extensions_clnt.c:ossl_check_SSL_CIPHER_sk_type:
   63|  10.8k|    {                                                                                                                    \
   64|  10.8k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  10.8k|    }                                                                                                                    \
statem_clnt.c:ossl_check_SSL_CIPHER_sk_type:
   63|  3.62k|    {                                                                                                                    \
   64|  3.62k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  3.62k|    }                                                                                                                    \
statem_clnt.c:ossl_check_SSL_CIPHER_type:
   55|  3.62k|    {                                                                                                                    \
   56|  3.62k|        return ptr;                                                                                                      \
   57|  3.62k|    }                                                                                                                    \
statem_clnt.c:sk_X509_freefunc_thunk:
   42|  10.7k|    {                                                                                                                    \
   43|  10.7k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                  \
   44|  10.7k|        freefunc((t3 *)ptr);                                                                                             \
   45|  10.7k|    }                                                                                                                    \
statem_clnt.c:ossl_check_X509_sk_type:
   63|  3.62k|    {                                                                                                                    \
   64|  3.62k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  3.62k|    }                                                                                                                    \
statem_clnt.c:ossl_check_X509_type:
   55|  3.62k|    {                                                                                                                    \
   56|  3.62k|        return ptr;                                                                                                      \
   57|  3.62k|    }                                                                                                                    \
statem_clnt.c:ossl_check_const_X509_sk_type:
   59|  3.62k|    {                                                                                                                    \
   60|  3.62k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  3.62k|    }                                                                                                                    \
statem_lib.c:ossl_check_const_SSL_CIPHER_sk_type:
   59|  7.25k|    {                                                                                                                    \
   60|  7.25k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  7.25k|    }                                                                                                                    \
statem_lib.c:ossl_check_const_X509_sk_type:
   59|  7.25k|    {                                                                                                                    \
   60|  7.25k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  7.25k|    }                                                                                                                    \
statem_srvr.c:ossl_check_const_SSL_CIPHER_sk_type:
   59|  3.62k|    {                                                                                                                    \
   60|  3.62k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  3.62k|    }                                                                                                                    \
statem_srvr.c:ossl_check_SSL_CIPHER_sk_type:
   63|  10.8k|    {                                                                                                                    \
   64|  10.8k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  10.8k|    }                                                                                                                    \
tasn_dec.c:sk_ASN1_VALUE_freefunc_thunk:
   42|  10.8k|    {                                                                                                                    \
   43|  10.8k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                  \
   44|  10.8k|        freefunc((t3 *)ptr);                                                                                             \
   45|  10.8k|    }                                                                                                                    \
tasn_dec.c:ossl_check_ASN1_VALUE_sk_type:
   63|   109k|    {                                                                                                                    \
   64|   109k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   109k|    }                                                                                                                    \
tasn_dec.c:ossl_check_ASN1_VALUE_type:
   55|   109k|    {                                                                                                                    \
   56|   109k|        return ptr;                                                                                                      \
   57|   109k|    }                                                                                                                    \
tasn_enc.c:sk_const_ASN1_VALUE_num:
   98|   152k|    {                                                                                                                      \
   99|   152k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   152k|    }                                                                                                                      \
tasn_enc.c:sk_const_ASN1_VALUE_value:
  102|  65.5k|    {                                                                                                                      \
  103|  65.5k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  65.5k|    }                                                                                                                      \
tasn_fre.c:ossl_check_const_ASN1_VALUE_sk_type:
   59|   200k|    {                                                                                                                    \
   60|   200k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|   200k|    }                                                                                                                    \
tasn_fre.c:ossl_check_ASN1_VALUE_sk_type:
   63|  91.1k|    {                                                                                                                    \
   64|  91.1k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  91.1k|    }                                                                                                                    \
ct_log.c:ossl_check_CTLOG_sk_type:
   63|  7.36k|    {                                                                                                                    \
   64|  7.36k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  7.36k|    }                                                                                                                    \
ct_log.c:ossl_check_CTLOG_freefunc_type:
   75|  7.36k|    {                                                                                                                    \
   76|  7.36k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  7.36k|    }
ct_sct.c:ossl_check_SCT_sk_type:
   63|  7.25k|    {                                                                                                                    \
   64|  7.25k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  7.25k|    }                                                                                                                    \
ct_sct.c:ossl_check_SCT_freefunc_type:
   75|  7.25k|    {                                                                                                                    \
   76|  7.25k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  7.25k|    }
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_new_null:
  115|      2|    {                                                                                                                      \
  116|      2|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|      2|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|      2|                                                                                                                           \
  119|      2|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|      2|                                                                                                                           \
  121|      2|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|      2|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_push:
  154|     44|    {                                                                                                                      \
  155|     44|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|     44|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_new_null:
  115|      2|    {                                                                                                                      \
  116|      2|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|      2|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|      2|                                                                                                                           \
  119|      2|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|      2|                                                                                                                           \
  121|      2|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|      2|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_freefunc_thunk:
   85|    152|    {                                                                                                                      \
   86|    152|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|    152|        freefunc((t3 *)ptr);                                                                                               \
   88|    152|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_push:
  154|    152|    {                                                                                                                      \
  155|    152|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|    152|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_num:
   98|      2|    {                                                                                                                      \
   99|      2|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|      2|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_num:
   98|  29.3k|    {                                                                                                                      \
   99|  29.3k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  29.3k|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_set_cmp_func:
  220|      4|    {                                                                                                                      \
  221|      4|        return (sk_##t1##_compfunc)OPENSSL_sk_set_cmp_func((OPENSSL_STACK *)sk, (OPENSSL_sk_compfunc)compare);             \
  222|      4|    }
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_value:
  102|   200k|    {                                                                                                                      \
  103|   200k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|   200k|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_sort:
  200|      2|    {                                                                                                                      \
  201|      2|        OPENSSL_sk_sort((OPENSSL_STACK *)sk);                                                                              \
  202|      2|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_value:
  102|  6.68k|    {                                                                                                                      \
  103|  6.68k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  6.68k|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_pop_free:
  170|      2|    {                                                                                                                      \
  171|      2|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|      2|                                                                                                                           \
  173|      2|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|      2|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|      2|                                                                                                                           \
  176|      2|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|      2|    }                                                                                                                      \
decoder_meth.c:sk_OSSL_DECODER_INSTANCE_pop_free:
  170|  14.6k|    {                                                                                                                      \
  171|  14.6k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  14.6k|                                                                                                                           \
  173|  14.6k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  14.6k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  14.6k|                                                                                                                           \
  176|  14.6k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  14.6k|    }                                                                                                                      \
decoder_meth.c:sk_OSSL_DECODER_INSTANCE_freefunc_thunk:
   85|   200k|    {                                                                                                                      \
   86|   200k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|   200k|        freefunc((t3 *)ptr);                                                                                               \
   88|   200k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_new_null:
  115|      2|    {                                                                                                                      \
  116|      2|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|      2|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|      2|                                                                                                                           \
  119|      2|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|      2|                                                                                                                           \
  121|      2|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|      2|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_freefunc_thunk:
   85|   178k|    {                                                                                                                      \
   86|   178k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|   178k|        freefunc((t3 *)ptr);                                                                                               \
   88|   178k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_push:
  154|     44|    {                                                                                                                      \
  155|     44|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|     44|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_num:
   98|  14.7k|    {                                                                                                                      \
   99|  14.7k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  14.7k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_value:
  102|  30.4k|    {                                                                                                                      \
  103|  30.4k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  30.4k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_pop_free:
  170|  14.6k|    {                                                                                                                      \
  171|  14.6k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  14.6k|                                                                                                                           \
  173|  14.6k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  14.6k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  14.6k|                                                                                                                           \
  176|  14.6k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  14.6k|    }                                                                                                                      \
decoder_pkey.c:sk_OSSL_DECODER_INSTANCE_deep_copy:
  214|  14.6k|    {                                                                                                                      \
  215|  14.6k|        return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk,                                             \
  216|  14.6k|            (OPENSSL_sk_copyfunc)copyfunc,                                                                                 \
  217|  14.6k|            (OPENSSL_sk_freefunc)freefunc);                                                                                \
  218|  14.6k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_deep_copy:
  214|  14.6k|    {                                                                                                                      \
  215|  14.6k|        return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk,                                             \
  216|  14.6k|            (OPENSSL_sk_copyfunc)copyfunc,                                                                                 \
  217|  14.6k|            (OPENSSL_sk_freefunc)freefunc);                                                                                \
  218|  14.6k|    }                                                                                                                      \
keymgmt_lib.c:sk_OP_CACHE_ELEM_pop_free:
  170|  65.5k|    {                                                                                                                      \
  171|  65.5k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  65.5k|                                                                                                                           \
  173|  65.5k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  65.5k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  65.5k|                                                                                                                           \
  176|  65.5k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  65.5k|    }                                                                                                                      \
p_lib.c:ossl_check_X509_ATTRIBUTE_sk_type:
   63|  65.5k|    {                                                                                                                    \
   64|  65.5k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  65.5k|    }                                                                                                                    \
p_lib.c:ossl_check_X509_ATTRIBUTE_freefunc_type:
   75|  65.5k|    {                                                                                                                    \
   76|  65.5k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  65.5k|    }
core_namemap.c:sk_NAMES_value:
  102|  47.8k|    {                                                                                                                      \
  103|  47.8k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  47.8k|    }                                                                                                                      \
core_namemap.c:ossl_check_const_OPENSSL_STRING_sk_type:
   59|   328k|    {                                                                                                                    \
   60|   328k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|   328k|    }                                                                                                                    \
core_namemap.c:ossl_check_OPENSSL_STRING_sk_type:
   63|  48.1k|    {                                                                                                                    \
   64|  48.1k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  48.1k|    }                                                                                                                    \
core_namemap.c:ossl_check_OPENSSL_STRING_type:
   55|    638|    {                                                                                                                    \
   56|    638|        return ptr;                                                                                                      \
   57|    638|    }                                                                                                                    \
core_namemap.c:sk_NAMES_push:
  154|    283|    {                                                                                                                      \
  155|    283|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|    283|    }                                                                                                                      \
core_namemap.c:sk_NAMES_num:
   98|    283|    {                                                                                                                      \
   99|    283|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|    283|    }                                                                                                                      \
core_namemap.c:sk_NAMES_new_null:
  115|      2|    {                                                                                                                      \
  116|      2|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|      2|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|      2|                                                                                                                           \
  119|      2|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|      2|                                                                                                                           \
  121|      2|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|      2|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_num:
   98|   640k|    {                                                                                                                      \
   99|   640k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   640k|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_value:
  102|  43.5k|    {                                                                                                                      \
  103|  43.5k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  43.5k|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_new_null:
  115|      1|    {                                                                                                                      \
  116|      1|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|      1|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|      1|                                                                                                                           \
  119|      1|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|      1|                                                                                                                           \
  121|      1|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|      1|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_push:
  154|      2|    {                                                                                                                      \
  155|      2|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|      2|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_set:
  183|      1|    {                                                                                                                      \
  184|      1|        return (t2 *)OPENSSL_sk_set((OPENSSL_STACK *)sk, idx, (const void *)ptr);                                          \
  185|      1|    }                                                                                                                      \
ex_data.c:ossl_check_const_void_sk_type:
   59|  21.5k|    {                                                                                                                    \
   60|  21.5k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  21.5k|    }                                                                                                                    \
ex_data.c:ossl_check_void_sk_type:
   63|   342k|    {                                                                                                                    \
   64|   342k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   342k|    }                                                                                                                    \
ex_data.c:ossl_check_void_type:
   55|  18.1k|    {                                                                                                                    \
   56|  18.1k|        return ptr;                                                                                                      \
   57|  18.1k|    }                                                                                                                    \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_new_null:
  115|      2|    {                                                                                                                      \
  116|      2|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|      2|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|      2|                                                                                                                           \
  119|      2|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|      2|                                                                                                                           \
  121|      2|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|      2|    }                                                                                                                      \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_push:
  154|      2|    {                                                                                                                      \
  155|      2|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|      2|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_new_null:
  115|  7.25k|    {                                                                                                                      \
  116|  7.25k|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|  7.25k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|  7.25k|                                                                                                                           \
  119|  7.25k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|  7.25k|                                                                                                                           \
  121|  7.25k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|  7.25k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_pop:
  162|  7.25k|    {                                                                                                                      \
  163|  7.25k|        return (t2 *)OPENSSL_sk_pop((OPENSSL_STACK *)sk);                                                                  \
  164|  7.25k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_free:
  137|  7.25k|    {                                                                                                                      \
  138|  7.25k|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  139|  7.25k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_push:
  154|  7.25k|    {                                                                                                                      \
  155|  7.25k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|  7.25k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_num:
   98|  29.0k|    {                                                                                                                      \
   99|  29.0k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  29.0k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_value:
  102|  7.25k|    {                                                                                                                      \
  103|  7.25k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  7.25k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_new:
  106|      2|    {                                                                                                                      \
  107|      2|        OPENSSL_STACK *ret = OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);                                                 \
  108|      2|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  109|      2|                                                                                                                           \
  110|      2|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  111|      2|        OPENSSL_sk_set_cmp_thunks(ret, sk_##t1##_cmpfunc_thunk);                                                           \
  112|      2|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  113|      2|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_CHILD_CB_new_null:
  115|      2|    {                                                                                                                      \
  116|      2|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|      2|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|      2|                                                                                                                           \
  119|      2|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|      2|                                                                                                                           \
  121|      2|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|      2|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_value:
  102|   397k|    {                                                                                                                      \
  103|   397k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|   397k|    }                                                                                                                      \
provider_core.c:sk_INFOPAIR_deep_copy:
  214|      1|    {                                                                                                                      \
  215|      1|        return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk,                                             \
  216|      1|            (OPENSSL_sk_copyfunc)copyfunc,                                                                                 \
  217|      1|            (OPENSSL_sk_freefunc)freefunc);                                                                                \
  218|      1|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_push:
  154|      1|    {                                                                                                                      \
  155|      1|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|      1|    }                                                                                                                      \
provider_core.c:sk_INFOPAIR_num:
   98|  21.7k|    {                                                                                                                      \
   99|  21.7k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  21.7k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_dup:
  208|   132k|    {                                                                                                                      \
  209|   132k|        return (STACK_OF(t1) *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk);                                                  \
  210|   132k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_num:
   98|   132k|    {                                                                                                                      \
   99|   132k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|   132k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_free:
  137|   132k|    {                                                                                                                      \
  138|   132k|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  139|   132k|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_find:
  187|  7.36k|    {                                                                                                                      \
  188|  7.36k|        return OPENSSL_sk_find((const OPENSSL_STACK *)sk, (const void *)ptr);                                              \
  189|  7.36k|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_value:
  102|  7.36k|    {                                                                                                                      \
  103|  7.36k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  7.36k|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_new:
  106|      2|    {                                                                                                                      \
  107|      2|        OPENSSL_STACK *ret = OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);                                                 \
  108|      2|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  109|      2|                                                                                                                           \
  110|      2|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  111|      2|        OPENSSL_sk_set_cmp_thunks(ret, sk_##t1##_cmpfunc_thunk);                                                           \
  112|      2|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  113|      2|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_cmpfunc_thunk:
   90|  7.36k|    {                                                                                                                      \
   91|  7.36k|        int (*realcmp)(const t3 *const *a, const t3 *const *b) = (int (*)(const t3 *const *a, const t3 *const *b))(cmp);   \
   92|  7.36k|        const t3 *const *at = (const t3 *const *)a;                                                                        \
   93|  7.36k|        const t3 *const *bt = (const t3 *const *)b;                                                                        \
   94|  7.36k|                                                                                                                           \
   95|  7.36k|        return realcmp(at, bt);                                                                                            \
   96|  7.36k|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_push:
  154|      2|    {                                                                                                                      \
  155|      2|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|      2|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_sort:
  200|      2|    {                                                                                                                      \
  201|      2|        OPENSSL_sk_sort((OPENSSL_STACK *)sk);                                                                              \
  202|      2|    }                                                                                                                      \
pem_info.c:sk_X509_INFO_freefunc_thunk:
   42|  3.55k|    {                                                                                                                    \
   43|  3.55k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                  \
   44|  3.55k|        freefunc((t3 *)ptr);                                                                                             \
   45|  3.55k|    }                                                                                                                    \
pem_info.c:ossl_check_X509_INFO_sk_type:
   63|  3.55k|    {                                                                                                                    \
   64|  3.55k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  3.55k|    }                                                                                                                    \
pem_info.c:ossl_check_X509_INFO_type:
   55|  3.55k|    {                                                                                                                    \
   56|  3.55k|        return ptr;                                                                                                      \
   57|  3.55k|    }                                                                                                                    \
property.c:sk_IMPLEMENTATION_new_null:
  115|    345|    {                                                                                                                      \
  116|    345|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|    345|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|    345|                                                                                                                           \
  119|    345|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|    345|                                                                                                                           \
  121|    345|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|    345|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_num:
   98|  1.58k|    {                                                                                                                      \
   99|  1.58k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  1.58k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_value:
  102|    987|    {                                                                                                                      \
  103|    987|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|    987|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_push:
  154|    391|    {                                                                                                                      \
  155|    391|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|    391|    }                                                                                                                      \
property.c:sk_ALGORITHM_new_reserve:
  124|     24|    {                                                                                                                      \
  125|     24|        OPENSSL_STACK *ret = OPENSSL_sk_new_reserve((OPENSSL_sk_compfunc)compare, n);                                      \
  126|     24|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  127|     24|                                                                                                                           \
  128|     24|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  129|     24|        OPENSSL_sk_set_cmp_thunks(ret, sk_##t1##_cmpfunc_thunk);                                                           \
  130|     24|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  131|     24|    }                                                                                                                      \
property.c:sk_ALGORITHM_freefunc_thunk:
   85|    666|    {                                                                                                                      \
   86|    666|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|    666|        freefunc((t3 *)ptr);                                                                                               \
   88|    666|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_dup:
  208|    666|    {                                                                                                                      \
  209|    666|        return (STACK_OF(t1) *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk);                                                  \
  210|    666|    }                                                                                                                      \
property.c:sk_ALGORITHM_push:
  154|    666|    {                                                                                                                      \
  155|    666|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|    666|    }                                                                                                                      \
property.c:sk_ALGORITHM_num:
   98|     24|    {                                                                                                                      \
   99|     24|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|     24|    }                                                                                                                      \
property.c:sk_ALGORITHM_value:
  102|    666|    {                                                                                                                      \
  103|    666|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|    666|    }                                                                                                                      \
property.c:sk_ALGORITHM_pop_free:
  170|     24|    {                                                                                                                      \
  171|     24|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|     24|                                                                                                                           \
  173|     24|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|     24|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|     24|                                                                                                                           \
  176|     24|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|     24|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_free:
  137|    666|    {                                                                                                                      \
  138|    666|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  139|    666|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_new:
  106|    152|    {                                                                                                                      \
  107|    152|        OPENSSL_STACK *ret = OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);                                                 \
  108|    152|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  109|    152|                                                                                                                           \
  110|    152|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  111|    152|        OPENSSL_sk_set_cmp_thunks(ret, sk_##t1##_cmpfunc_thunk);                                                           \
  112|    152|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  113|    152|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_freefunc_thunk:
   85|    359|    {                                                                                                                      \
   86|    359|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|    359|        freefunc((t3 *)ptr);                                                                                               \
   88|    359|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_cmpfunc_thunk:
   90|    265|    {                                                                                                                      \
   91|    265|        int (*realcmp)(const t3 *const *a, const t3 *const *b) = (int (*)(const t3 *const *a, const t3 *const *b))(cmp);   \
   92|    265|        const t3 *const *at = (const t3 *const *)a;                                                                        \
   93|    265|        const t3 *const *bt = (const t3 *const *)b;                                                                        \
   94|    265|                                                                                                                           \
   95|    265|        return realcmp(at, bt);                                                                                            \
   96|    265|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_push:
  154|    359|    {                                                                                                                      \
  155|    359|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|    359|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_num:
   98|    152|    {                                                                                                                      \
   99|    152|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|    152|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_sort:
  200|    152|    {                                                                                                                      \
  201|    152|        OPENSSL_sk_sort((OPENSSL_STACK *)sk);                                                                              \
  202|    152|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_value:
  102|    359|    {                                                                                                                      \
  103|    359|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|    359|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_pop_free:
  170|    152|    {                                                                                                                      \
  171|    152|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|    152|                                                                                                                           \
  173|    152|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|    152|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|    152|                                                                                                                           \
  176|    152|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|    152|    }                                                                                                                      \
property_string.c:ossl_check_OPENSSL_CSTRING_sk_type:
   63|     30|    {                                                                                                                    \
   64|     30|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|     30|    }                                                                                                                    \
property_string.c:ossl_check_OPENSSL_CSTRING_type:
   55|     30|    {                                                                                                                    \
   56|     30|        return ptr;                                                                                                      \
   57|     30|    }                                                                                                                    \
property_string.c:ossl_check_const_OPENSSL_CSTRING_sk_type:
   59|    128|    {                                                                                                                    \
   60|    128|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|    128|    }                                                                                                                    \
by_dir.c:sk_BY_DIR_ENTRY_pop_free:
  170|  3.55k|    {                                                                                                                      \
  171|  3.55k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  3.55k|                                                                                                                           \
  173|  3.55k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  3.55k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  3.55k|                                                                                                                           \
  176|  3.55k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  3.55k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_freefunc_thunk:
   85|  3.55k|    {                                                                                                                      \
   86|  3.55k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|  3.55k|        freefunc((t3 *)ptr);                                                                                               \
   88|  3.55k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_HASH_pop_free:
  170|  3.55k|    {                                                                                                                      \
  171|  3.55k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  3.55k|                                                                                                                           \
  173|  3.55k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  3.55k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  3.55k|                                                                                                                           \
  176|  3.55k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  3.55k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_num:
   98|  7.10k|    {                                                                                                                      \
   99|  7.10k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  7.10k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_new_null:
  115|  3.55k|    {                                                                                                                      \
  116|  3.55k|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|  3.55k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|  3.55k|                                                                                                                           \
  119|  3.55k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|  3.55k|                                                                                                                           \
  121|  3.55k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|  3.55k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_HASH_new:
  106|  3.55k|    {                                                                                                                      \
  107|  3.55k|        OPENSSL_STACK *ret = OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);                                                 \
  108|  3.55k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  109|  3.55k|                                                                                                                           \
  110|  3.55k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  111|  3.55k|        OPENSSL_sk_set_cmp_thunks(ret, sk_##t1##_cmpfunc_thunk);                                                           \
  112|  3.55k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  113|  3.55k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_push:
  154|  3.55k|    {                                                                                                                      \
  155|  3.55k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|  3.55k|    }                                                                                                                      \
t_x509.c:ossl_check_X509_sk_type:
   63|   255k|    {                                                                                                                    \
   64|   255k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   255k|    }                                                                                                                    \
t_x509.c:ossl_check_X509_freefunc_type:
   75|   255k|    {                                                                                                                    \
   76|   255k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|   255k|    }
v3_lib.c:ossl_check_const_X509_EXTENSION_sk_type:
   59|  1.46M|    {                                                                                                                    \
   60|  1.46M|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  1.46M|    }                                                                                                                    \
v3_prn.c:ossl_check_const_CONF_VALUE_sk_type:
   59|    180|    {                                                                                                                    \
   60|    180|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|    180|    }                                                                                                                    \
v3_prn.c:ossl_check_CONF_VALUE_sk_type:
   63|     50|    {                                                                                                                    \
   64|     50|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|     50|    }                                                                                                                    \
v3_prn.c:ossl_check_CONF_VALUE_freefunc_type:
   75|     50|    {                                                                                                                    \
   76|     50|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|     50|    }
v3_purp.c:ossl_check_const_ASN1_OBJECT_sk_type:
   59|  32.4k|    {                                                                                                                    \
   60|  32.4k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  32.4k|    }                                                                                                                    \
v3_purp.c:ossl_check_ASN1_OBJECT_sk_type:
   63|  10.8k|    {                                                                                                                    \
   64|  10.8k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  10.8k|    }                                                                                                                    \
v3_purp.c:ossl_check_ASN1_OBJECT_freefunc_type:
   75|  10.8k|    {                                                                                                                    \
   76|  10.8k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  10.8k|    }
v3_purp.c:ossl_check_const_DIST_POINT_sk_type:
   59|  10.8k|    {                                                                                                                    \
   60|  10.8k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  10.8k|    }                                                                                                                    \
v3_purp.c:ossl_check_GENERAL_NAME_sk_type:
   63|  10.8k|    {                                                                                                                    \
   64|  10.8k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  10.8k|    }                                                                                                                    \
v3_purp.c:ossl_check_GENERAL_NAME_freefunc_type:
   75|  10.8k|    {                                                                                                                    \
   76|  10.8k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  10.8k|    }
v3_purp.c:ossl_check_DIST_POINT_sk_type:
   63|  10.8k|    {                                                                                                                    \
   64|  10.8k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  10.8k|    }                                                                                                                    \
v3_purp.c:ossl_check_DIST_POINT_freefunc_type:
   75|  10.8k|    {                                                                                                                    \
   76|  10.8k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  10.8k|    }
v3_purp.c:ossl_check_IPAddressFamily_sk_type:
   63|  10.8k|    {                                                                                                                    \
   64|  10.8k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  10.8k|    }                                                                                                                    \
v3_purp.c:ossl_check_IPAddressFamily_freefunc_type:
   75|  10.8k|    {                                                                                                                    \
   76|  10.8k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  10.8k|    }
v3_utl.c:sk_CONF_VALUE_freefunc_thunk:
   42|     50|    {                                                                                                                    \
   43|     50|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                  \
   44|     50|        freefunc((t3 *)ptr);                                                                                             \
   45|     50|    }                                                                                                                    \
v3_utl.c:ossl_check_CONF_VALUE_type:
   55|     50|    {                                                                                                                    \
   56|     50|        return ptr;                                                                                                      \
   57|     50|    }                                                                                                                    \
v3_utl.c:ossl_check_CONF_VALUE_sk_type:
   63|     50|    {                                                                                                                    \
   64|     50|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|     50|    }                                                                                                                    \
x509_cmp.c:sk_X509_freefunc_thunk:
   42|  10.8k|    {                                                                                                                    \
   43|  10.8k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                  \
   44|  10.8k|        freefunc((t3 *)ptr);                                                                                             \
   45|  10.8k|    }                                                                                                                    \
x509_cmp.c:ossl_check_const_X509_sk_type:
   59|  54.0k|    {                                                                                                                    \
   60|  54.0k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  54.0k|    }                                                                                                                    \
x509_cmp.c:ossl_check_X509_sk_type:
   63|  10.8k|    {                                                                                                                    \
   64|  10.8k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  10.8k|    }                                                                                                                    \
x509_cmp.c:ossl_check_X509_type:
   55|  10.8k|    {                                                                                                                    \
   56|  10.8k|        return ptr;                                                                                                      \
   57|  10.8k|    }                                                                                                                    \
x509_lu.c:ossl_check_X509_OBJECT_compfunc_type:
   67|  10.9k|    {                                                                                                                    \
   68|  10.9k|        return (OPENSSL_sk_compfunc)cmp;                                                                                 \
   69|  10.9k|    }                                                                                                                    \
x509_lu.c:sk_X509_OBJECT_cmpfunc_thunk:
   47|  3.55k|    {                                                                                                                    \
   48|  3.55k|        int (*realcmp)(const t3 *const *a, const t3 *const *b) = (int (*)(const t3 *const *a, const t3 *const *b))(cmp); \
   49|  3.55k|        const t3 *const *at = (const t3 *const *)a;                                                                      \
   50|  3.55k|        const t3 *const *bt = (const t3 *const *)b;                                                                      \
   51|  3.55k|                                                                                                                         \
   52|  3.55k|        return realcmp(at, bt);                                                                                          \
   53|  3.55k|    }                                                                                                                    \
x509_lu.c:ossl_check_X509_OBJECT_sk_type:
   63|  18.0k|    {                                                                                                                    \
   64|  18.0k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  18.0k|    }                                                                                                                    \
x509_lu.c:ossl_check_X509_LOOKUP_sk_type:
   63|  10.9k|    {                                                                                                                    \
   64|  10.9k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  10.9k|    }                                                                                                                    \
x509_lu.c:ossl_check_const_X509_LOOKUP_sk_type:
   59|  21.8k|    {                                                                                                                    \
   60|  21.8k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  21.8k|    }                                                                                                                    \
x509_lu.c:ossl_check_X509_OBJECT_freefunc_type:
   75|  10.9k|    {                                                                                                                    \
   76|  10.9k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  10.9k|    }
x509_lu.c:ossl_check_X509_LOOKUP_type:
   55|  3.55k|    {                                                                                                                    \
   56|  3.55k|        return ptr;                                                                                                      \
   57|  3.55k|    }                                                                                                                    \
x509_lu.c:ossl_check_const_X509_OBJECT_sk_type:
   59|  3.55k|    {                                                                                                                    \
   60|  3.55k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  3.55k|    }                                                                                                                    \
x509_lu.c:ossl_check_X509_OBJECT_type:
   55|  7.10k|    {                                                                                                                    \
   56|  7.10k|        return ptr;                                                                                                      \
   57|  7.10k|    }                                                                                                                    \
x509_v3.c:ossl_check_const_X509_EXTENSION_sk_type:
   59|   172k|    {                                                                                                                    \
   60|   172k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|   172k|    }                                                                                                                    \
x509_vfy.c:ossl_check_const_X509_sk_type:
   59|  86.6k|    {                                                                                                                    \
   60|  86.6k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  86.6k|    }                                                                                                                    \
x509_vfy.c:sk_X509_BUFFER_num:
   98|  7.10k|    {                                                                                                                      \
   99|  7.10k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  7.10k|    }                                                                                                                      \
x509_vfy.c:ossl_check_X509_type:
   55|  3.55k|    {                                                                                                                    \
   56|  3.55k|        return ptr;                                                                                                      \
   57|  3.55k|    }                                                                                                                    \
x509_vfy.c:ossl_check_X509_sk_type:
   63|  10.8k|    {                                                                                                                    \
   64|  10.8k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  10.8k|    }                                                                                                                    \
x509_vpm.c:ossl_check_ASN1_OBJECT_sk_type:
   63|  29.2k|    {                                                                                                                    \
   64|  29.2k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  29.2k|    }                                                                                                                    \
x509_vpm.c:ossl_check_ASN1_OBJECT_freefunc_type:
   75|  29.2k|    {                                                                                                                    \
   76|  29.2k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  29.2k|    }
x509_vpm.c:sk_X509_BUFFER_pop_free:
  170|   116k|    {                                                                                                                      \
  171|   116k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|   116k|                                                                                                                           \
  173|   116k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|   116k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|   116k|                                                                                                                           \
  176|   116k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|   116k|    }                                                                                                                      \
x509name.c:ossl_check_const_X509_NAME_ENTRY_sk_type:
   59|  18.2k|    {                                                                                                                    \
   60|  18.2k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  18.2k|    }                                                                                                                    \
x_name.c:sk_X509_NAME_ENTRY_freefunc_thunk:
   42|  43.6k|    {                                                                                                                    \
   43|  43.6k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                  \
   44|  43.6k|        freefunc((t3 *)ptr);                                                                                             \
   45|  43.6k|    }                                                                                                                    \
x_name.c:ossl_check_X509_NAME_ENTRY_sk_type:
   63|   152k|    {                                                                                                                    \
   64|   152k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|   152k|    }                                                                                                                    \
x_name.c:ossl_check_X509_NAME_ENTRY_freefunc_type:
   75|  65.5k|    {                                                                                                                    \
   76|  65.5k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  65.5k|    }
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_num:
   98|  43.6k|    {                                                                                                                      \
   99|  43.6k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
  100|  43.6k|    }                                                                                                                      \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_value:
  102|  21.8k|    {                                                                                                                      \
  103|  21.8k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
  104|  21.8k|    }                                                                                                                      \
x_name.c:ossl_check_const_X509_NAME_ENTRY_sk_type:
   59|   152k|    {                                                                                                                    \
   60|   152k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|   152k|    }                                                                                                                    \
x_name.c:ossl_check_X509_NAME_ENTRY_type:
   55|  65.5k|    {                                                                                                                    \
   56|  65.5k|        return ptr;                                                                                                      \
   57|  65.5k|    }                                                                                                                    \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_new_null:
  115|  21.8k|    {                                                                                                                      \
  116|  21.8k|        OPENSSL_STACK *ret = OPENSSL_sk_new_null();                                                                        \
  117|  21.8k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  118|  21.8k|                                                                                                                           \
  119|  21.8k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  120|  21.8k|                                                                                                                           \
  121|  21.8k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  122|  21.8k|    }                                                                                                                      \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_freefunc_thunk:
   85|  43.6k|    {                                                                                                                      \
   86|  43.6k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   87|  43.6k|        freefunc((t3 *)ptr);                                                                                               \
   88|  43.6k|    }                                                                                                                      \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_push:
  154|  21.8k|    {                                                                                                                      \
  155|  21.8k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  156|  21.8k|    }                                                                                                                      \
x_name.c:ossl_check_const_ASN1_VALUE_sk_type:
   59|   131k|    {                                                                                                                    \
   60|   131k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|   131k|    }                                                                                                                    \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_pop_free:
  170|  43.6k|    {                                                                                                                      \
  171|  43.6k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  172|  43.6k|                                                                                                                           \
  173|  43.6k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  174|  43.6k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  175|  43.6k|                                                                                                                           \
  176|  43.6k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  177|  43.6k|    }                                                                                                                      \
x_x509.c:ossl_check_IPAddressFamily_sk_type:
   63|  21.8k|    {                                                                                                                    \
   64|  21.8k|        return (OPENSSL_STACK *)sk;                                                                                      \
   65|  21.8k|    }                                                                                                                    \
x_x509.c:ossl_check_IPAddressFamily_freefunc_type:
   75|  21.8k|    {                                                                                                                    \
   76|  21.8k|        return (OPENSSL_sk_freefunc)fr;                                                                                  \
   77|  21.8k|    }
comp_methods.c:ossl_check_SSL_COMP_compfunc_type:
   67|      2|    {                                                                                                                    \
   68|      2|        return (OPENSSL_sk_compfunc)cmp;                                                                                 \
   69|      2|    }                                                                                                                    \
v3_addr.c:ossl_check_const_X509_sk_type:
   59|  10.6k|    {                                                                                                                    \
   60|  10.6k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  10.6k|    }                                                                                                                    \
v3_asid.c:ossl_check_const_X509_sk_type:
   59|  10.6k|    {                                                                                                                    \
   60|  10.6k|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|  10.6k|    }                                                                                                                    \
v3_extku.c:ossl_check_const_ASN1_OBJECT_sk_type:
   59|     30|    {                                                                                                                    \
   60|     30|        return (const OPENSSL_STACK *)sk;                                                                                \
   61|     30|    }                                                                                                                    \

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

ossl_prov_get_capabilities:
  352|  14.7k|{
  353|  14.7k|    if (OPENSSL_strcasecmp(capability, "TLS-GROUP") == 0)
  ------------------
  |  Branch (353:9): [True: 7.36k, False: 7.36k]
  ------------------
  354|  7.36k|        return tls_group_capability(cb, arg);
  355|  7.36k|    if (OPENSSL_strcasecmp(capability, "TLS-SIGALG") == 0)
  ------------------
  |  Branch (355:9): [True: 7.36k, False: 0]
  ------------------
  356|  7.36k|        return tls_sigalg_capability(cb, arg);
  357|       |
  358|       |    /* We don't support this capability */
  359|      0|    return 0;
  360|  7.36k|}
capabilities.c:tls_group_capability:
  270|  7.36k|{
  271|  7.36k|#if !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_ML_KEM)
  272|  7.36k|    size_t i;
  273|       |
  274|   206k|    for (i = 0; i < OSSL_NELEM(param_group_list); i++)
  ------------------
  |  |   14|   206k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (274:17): [True: 198k, False: 7.36k]
  ------------------
  275|   198k|        if (!cb(param_group_list[i], arg))
  ------------------
  |  Branch (275:13): [True: 0, False: 198k]
  ------------------
  276|      0|            return 0;
  277|  7.36k|#endif
  278|       |
  279|  7.36k|    return 1;
  280|  7.36k|}
capabilities.c:tls_sigalg_capability:
  339|  7.36k|{
  340|  7.36k|#if defined(TLS_SIGALG_ENTRY)
  341|  7.36k|    size_t i;
  342|       |
  343|  36.8k|    for (i = 0; i < OSSL_NELEM(param_sigalg_list); i++)
  ------------------
  |  |   14|  36.8k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (343:17): [True: 29.4k, False: 7.36k]
  ------------------
  344|  29.4k|        if (!cb(param_sigalg_list[i], arg))
  ------------------
  |  Branch (344:13): [True: 0, False: 29.4k]
  ------------------
  345|      0|            return 0;
  346|  7.36k|#endif
  347|  7.36k|    return 1;
  348|  7.36k|}

ossl_DER_w_algorithmIdentifier_ECDSA_with_MD:
   29|  10.8k|{
   30|  10.8k|    const unsigned char *precompiled = NULL;
   31|  10.8k|    size_t precompiled_sz = 0;
   32|       |
   33|  10.8k|    switch (mdnid) {
   34|      0|        MD_CASE(sha1);
  ------------------
  |  |   22|      0|    case NID_##name:                                                \
  |  |  ------------------
  |  |  |  | 2348|      0|#define NID_sha1                64
  |  |  ------------------
  |  |  |  Branch (22:5): [True: 0, False: 10.8k]
  |  |  ------------------
  |  |   23|      0|        precompiled = ossl_der_oid_id_ecdsa_with_##name;            \
  |  |  ------------------
  |  |  |  |   15|      0|#define ossl_der_oid_id_ecdsa_with_sha1 ossl_der_oid_ecdsa_with_SHA1
  |  |  ------------------
  |  |   24|      0|        precompiled_sz = sizeof(ossl_der_oid_id_ecdsa_with_##name); \
  |  |  ------------------
  |  |  |  |   15|      0|#define ossl_der_oid_id_ecdsa_with_sha1 ossl_der_oid_ecdsa_with_SHA1
  |  |  ------------------
  |  |   25|      0|        break;
  ------------------
   35|      0|        MD_CASE(sha224);
  ------------------
  |  |   22|      0|    case NID_##name:                                                \
  |  |  ------------------
  |  |  |  | 3306|      0|#define NID_sha224              675
  |  |  ------------------
  |  |  |  Branch (22:5): [True: 0, False: 10.8k]
  |  |  ------------------
  |  |   23|      0|        precompiled = ossl_der_oid_id_ecdsa_with_##name;            \
  |  |  ------------------
  |  |  |  |   16|      0|#define ossl_der_oid_id_ecdsa_with_sha224 ossl_der_oid_ecdsa_with_SHA224
  |  |  ------------------
  |  |   24|      0|        precompiled_sz = sizeof(ossl_der_oid_id_ecdsa_with_##name); \
  |  |  ------------------
  |  |  |  |   16|      0|#define ossl_der_oid_id_ecdsa_with_sha224 ossl_der_oid_ecdsa_with_SHA224
  |  |  ------------------
  |  |   25|      0|        break;
  ------------------
   36|  10.8k|        MD_CASE(sha256);
  ------------------
  |  |   22|  10.8k|    case NID_##name:                                                \
  |  |  ------------------
  |  |  |  | 3291|  10.8k|#define NID_sha256              672
  |  |  ------------------
  |  |  |  Branch (22:5): [True: 10.8k, False: 0]
  |  |  ------------------
  |  |   23|  10.8k|        precompiled = ossl_der_oid_id_ecdsa_with_##name;            \
  |  |  ------------------
  |  |  |  |   17|  10.8k|#define ossl_der_oid_id_ecdsa_with_sha256 ossl_der_oid_ecdsa_with_SHA256
  |  |  ------------------
  |  |   24|  10.8k|        precompiled_sz = sizeof(ossl_der_oid_id_ecdsa_with_##name); \
  |  |  ------------------
  |  |  |  |   17|  10.8k|#define ossl_der_oid_id_ecdsa_with_sha256 ossl_der_oid_ecdsa_with_SHA256
  |  |  ------------------
  |  |   25|  10.8k|        break;
  ------------------
   37|      0|        MD_CASE(sha384);
  ------------------
  |  |   22|      0|    case NID_##name:                                                \
  |  |  ------------------
  |  |  |  | 3296|      0|#define NID_sha384              673
  |  |  ------------------
  |  |  |  Branch (22:5): [True: 0, False: 10.8k]
  |  |  ------------------
  |  |   23|      0|        precompiled = ossl_der_oid_id_ecdsa_with_##name;            \
  |  |  ------------------
  |  |  |  |   18|      0|#define ossl_der_oid_id_ecdsa_with_sha384 ossl_der_oid_ecdsa_with_SHA384
  |  |  ------------------
  |  |   24|      0|        precompiled_sz = sizeof(ossl_der_oid_id_ecdsa_with_##name); \
  |  |  ------------------
  |  |  |  |   18|      0|#define ossl_der_oid_id_ecdsa_with_sha384 ossl_der_oid_ecdsa_with_SHA384
  |  |  ------------------
  |  |   25|      0|        break;
  ------------------
   38|      0|        MD_CASE(sha512);
  ------------------
  |  |   22|      0|    case NID_##name:                                                \
  |  |  ------------------
  |  |  |  | 3301|      0|#define NID_sha512              674
  |  |  ------------------
  |  |  |  Branch (22:5): [True: 0, False: 10.8k]
  |  |  ------------------
  |  |   23|      0|        precompiled = ossl_der_oid_id_ecdsa_with_##name;            \
  |  |  ------------------
  |  |  |  |   19|      0|#define ossl_der_oid_id_ecdsa_with_sha512 ossl_der_oid_ecdsa_with_SHA512
  |  |  ------------------
  |  |   24|      0|        precompiled_sz = sizeof(ossl_der_oid_id_ecdsa_with_##name); \
  |  |  ------------------
  |  |  |  |   19|      0|#define ossl_der_oid_id_ecdsa_with_sha512 ossl_der_oid_ecdsa_with_SHA512
  |  |  ------------------
  |  |   25|      0|        break;
  ------------------
   39|      0|        MD_CASE(sha3_224);
  ------------------
  |  |   22|      0|    case NID_##name:                                                \
  |  |  ------------------
  |  |  |  | 3321|      0|#define NID_sha3_224            1096
  |  |  ------------------
  |  |  |  Branch (22:5): [True: 0, False: 10.8k]
  |  |  ------------------
  |  |   23|      0|        precompiled = ossl_der_oid_id_ecdsa_with_##name;            \
  |  |   24|      0|        precompiled_sz = sizeof(ossl_der_oid_id_ecdsa_with_##name); \
  |  |   25|      0|        break;
  ------------------
   40|      0|        MD_CASE(sha3_256);
  ------------------
  |  |   22|      0|    case NID_##name:                                                \
  |  |  ------------------
  |  |  |  | 3326|      0|#define NID_sha3_256            1097
  |  |  ------------------
  |  |  |  Branch (22:5): [True: 0, False: 10.8k]
  |  |  ------------------
  |  |   23|      0|        precompiled = ossl_der_oid_id_ecdsa_with_##name;            \
  |  |   24|      0|        precompiled_sz = sizeof(ossl_der_oid_id_ecdsa_with_##name); \
  |  |   25|      0|        break;
  ------------------
   41|      0|        MD_CASE(sha3_384);
  ------------------
  |  |   22|      0|    case NID_##name:                                                \
  |  |  ------------------
  |  |  |  | 3331|      0|#define NID_sha3_384            1098
  |  |  ------------------
  |  |  |  Branch (22:5): [True: 0, False: 10.8k]
  |  |  ------------------
  |  |   23|      0|        precompiled = ossl_der_oid_id_ecdsa_with_##name;            \
  |  |   24|      0|        precompiled_sz = sizeof(ossl_der_oid_id_ecdsa_with_##name); \
  |  |   25|      0|        break;
  ------------------
   42|      0|        MD_CASE(sha3_512);
  ------------------
  |  |   22|      0|    case NID_##name:                                                \
  |  |  ------------------
  |  |  |  | 3336|      0|#define NID_sha3_512            1099
  |  |  ------------------
  |  |  |  Branch (22:5): [True: 0, False: 10.8k]
  |  |  ------------------
  |  |   23|      0|        precompiled = ossl_der_oid_id_ecdsa_with_##name;            \
  |  |   24|      0|        precompiled_sz = sizeof(ossl_der_oid_id_ecdsa_with_##name); \
  |  |   25|      0|        break;
  ------------------
   43|      0|    default:
  ------------------
  |  Branch (43:5): [True: 0, False: 10.8k]
  ------------------
   44|      0|        return 0;
   45|  10.8k|    }
   46|       |
   47|  10.8k|    return ossl_DER_w_begin_sequence(pkt, cont)
  ------------------
  |  Branch (47:12): [True: 10.8k, False: 0]
  ------------------
   48|       |        /* No parameters (yet?) */
   49|  10.8k|        && ossl_DER_w_precompiled(pkt, -1, precompiled, precompiled_sz)
  ------------------
  |  Branch (49:12): [True: 10.8k, False: 0]
  ------------------
   50|  10.8k|        && ossl_DER_w_end_sequence(pkt, cont);
  ------------------
  |  Branch (50:12): [True: 10.8k, False: 0]
  ------------------
   51|  10.8k|}

ossl_digest_md_to_nid:
   24|  10.8k|{
   25|  10.8k|    size_t i;
   26|       |
   27|  10.8k|    if (md == NULL)
  ------------------
  |  Branch (27:9): [True: 0, False: 10.8k]
  ------------------
   28|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
   29|       |
   30|  32.6k|    for (i = 0; i < it_len; i++)
  ------------------
  |  Branch (30:17): [True: 32.6k, False: 0]
  ------------------
   31|  32.6k|        if (EVP_MD_is_a(md, it[i].ptr))
  ------------------
  |  Branch (31:13): [True: 10.8k, False: 21.7k]
  ------------------
   32|  10.8k|            return (int)it[i].id;
   33|      0|    return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
   34|  10.8k|}
ossl_digest_get_approved_nid:
   41|  10.8k|{
   42|       |    /* TODO: FIPS 180-5 RFC 8692 RFC 8702 allow SHAKE */
   43|  10.8k|    static const OSSL_ITEM name_to_nid[] = {
   44|  10.8k|        { NID_sha1, OSSL_DIGEST_NAME_SHA1 },
  ------------------
  |  | 2348|  10.8k|#define NID_sha1                64
  ------------------
                      { NID_sha1, OSSL_DIGEST_NAME_SHA1 },
  ------------------
  |  |   37|  10.8k|#define OSSL_DIGEST_NAME_SHA1 "SHA1"
  ------------------
   45|  10.8k|        { NID_sha224, OSSL_DIGEST_NAME_SHA2_224 },
  ------------------
  |  | 3306|  10.8k|#define NID_sha224              675
  ------------------
                      { NID_sha224, OSSL_DIGEST_NAME_SHA2_224 },
  ------------------
  |  |   38|  10.8k|#define OSSL_DIGEST_NAME_SHA2_224 "SHA2-224"
  ------------------
   46|  10.8k|        { NID_sha256, OSSL_DIGEST_NAME_SHA2_256 },
  ------------------
  |  | 3291|  10.8k|#define NID_sha256              672
  ------------------
                      { NID_sha256, OSSL_DIGEST_NAME_SHA2_256 },
  ------------------
  |  |   39|  10.8k|#define OSSL_DIGEST_NAME_SHA2_256 "SHA2-256"
  ------------------
   47|  10.8k|        { NID_sha384, OSSL_DIGEST_NAME_SHA2_384 },
  ------------------
  |  | 3296|  10.8k|#define NID_sha384              673
  ------------------
                      { NID_sha384, OSSL_DIGEST_NAME_SHA2_384 },
  ------------------
  |  |   41|  10.8k|#define OSSL_DIGEST_NAME_SHA2_384 "SHA2-384"
  ------------------
   48|  10.8k|        { NID_sha512, OSSL_DIGEST_NAME_SHA2_512 },
  ------------------
  |  | 3301|  10.8k|#define NID_sha512              674
  ------------------
                      { NID_sha512, OSSL_DIGEST_NAME_SHA2_512 },
  ------------------
  |  |   42|  10.8k|#define OSSL_DIGEST_NAME_SHA2_512 "SHA2-512"
  ------------------
   49|  10.8k|        { NID_sha512_224, OSSL_DIGEST_NAME_SHA2_512_224 },
  ------------------
  |  | 3311|  10.8k|#define NID_sha512_224          1094
  ------------------
                      { NID_sha512_224, OSSL_DIGEST_NAME_SHA2_512_224 },
  ------------------
  |  |   43|  10.8k|#define OSSL_DIGEST_NAME_SHA2_512_224 "SHA2-512/224"
  ------------------
   50|  10.8k|        { NID_sha512_256, OSSL_DIGEST_NAME_SHA2_512_256 },
  ------------------
  |  | 3316|  10.8k|#define NID_sha512_256          1095
  ------------------
                      { NID_sha512_256, OSSL_DIGEST_NAME_SHA2_512_256 },
  ------------------
  |  |   44|  10.8k|#define OSSL_DIGEST_NAME_SHA2_512_256 "SHA2-512/256"
  ------------------
   51|  10.8k|        { NID_sha3_224, OSSL_DIGEST_NAME_SHA3_224 },
  ------------------
  |  | 3321|  10.8k|#define NID_sha3_224            1096
  ------------------
                      { NID_sha3_224, OSSL_DIGEST_NAME_SHA3_224 },
  ------------------
  |  |   49|  10.8k|#define OSSL_DIGEST_NAME_SHA3_224 "SHA3-224"
  ------------------
   52|  10.8k|        { NID_sha3_256, OSSL_DIGEST_NAME_SHA3_256 },
  ------------------
  |  | 3326|  10.8k|#define NID_sha3_256            1097
  ------------------
                      { NID_sha3_256, OSSL_DIGEST_NAME_SHA3_256 },
  ------------------
  |  |   50|  10.8k|#define OSSL_DIGEST_NAME_SHA3_256 "SHA3-256"
  ------------------
   53|  10.8k|        { NID_sha3_384, OSSL_DIGEST_NAME_SHA3_384 },
  ------------------
  |  | 3331|  10.8k|#define NID_sha3_384            1098
  ------------------
                      { NID_sha3_384, OSSL_DIGEST_NAME_SHA3_384 },
  ------------------
  |  |   51|  10.8k|#define OSSL_DIGEST_NAME_SHA3_384 "SHA3-384"
  ------------------
   54|  10.8k|        { NID_sha3_512, OSSL_DIGEST_NAME_SHA3_512 },
  ------------------
  |  | 3336|  10.8k|#define NID_sha3_512            1099
  ------------------
                      { NID_sha3_512, OSSL_DIGEST_NAME_SHA3_512 },
  ------------------
  |  |   52|  10.8k|#define OSSL_DIGEST_NAME_SHA3_512 "SHA3-512"
  ------------------
   55|  10.8k|    };
   56|       |
   57|  10.8k|    return ossl_digest_md_to_nid(md, name_to_nid, OSSL_NELEM(name_to_nid));
  ------------------
  |  |   14|  10.8k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
   58|  10.8k|}

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

ossl_prov_ctx_new:
   16|      1|{
   17|      1|    return OPENSSL_zalloc(sizeof(PROV_CTX));
  ------------------
  |  |  109|      1|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   18|      1|}
ossl_prov_ctx_set0_libctx:
   26|      1|{
   27|      1|    if (ctx != NULL)
  ------------------
  |  Branch (27:9): [True: 1, False: 0]
  ------------------
   28|      1|        ctx->libctx = libctx;
   29|      1|}
ossl_prov_ctx_set0_handle:
   32|      1|{
   33|      1|    if (ctx != NULL)
  ------------------
  |  Branch (33:9): [True: 1, False: 0]
  ------------------
   34|      1|        ctx->handle = handle;
   35|      1|}
ossl_prov_ctx_set0_core_bio_method:
   38|      1|{
   39|      1|    if (ctx != NULL)
  ------------------
  |  Branch (39:9): [True: 1, False: 0]
  ------------------
   40|      1|        ctx->corebiometh = corebiometh;
   41|      1|}
ossl_prov_ctx_set0_core_get_params:
   45|      1|{
   46|      1|    if (ctx != NULL)
  ------------------
  |  Branch (46:9): [True: 1, False: 0]
  ------------------
   47|      1|        ctx->core_get_params = c_get_params;
   48|      1|}
ossl_prov_ctx_get0_libctx:
   51|   406k|{
   52|   406k|    if (ctx == NULL)
  ------------------
  |  Branch (52:9): [True: 0, False: 406k]
  ------------------
   53|      0|        return NULL;
   54|   406k|    return ctx->libctx;
   55|   406k|}
ossl_prov_ctx_get0_core_bio_method:
   65|  29.3k|{
   66|  29.3k|    if (ctx == NULL)
  ------------------
  |  Branch (66:9): [True: 0, False: 29.3k]
  ------------------
   67|      0|        return NULL;
   68|  29.3k|    return ctx->corebiometh;
   69|  29.3k|}
ossl_prov_ctx_get_param:
   80|  21.7k|{
   81|  21.7k|    char *val = NULL;
   82|  21.7k|    OSSL_PARAM param[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  21.7k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM param[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  21.7k|    { NULL, 0, NULL, 0, 0 }
  ------------------
   83|       |
   84|  21.7k|    if (ctx == NULL
  ------------------
  |  Branch (84:9): [True: 0, False: 21.7k]
  ------------------
   85|  21.7k|        || ctx->handle == NULL
  ------------------
  |  Branch (85:12): [True: 0, False: 21.7k]
  ------------------
   86|  21.7k|        || ctx->core_get_params == NULL)
  ------------------
  |  Branch (86:12): [True: 0, False: 21.7k]
  ------------------
   87|      0|        return defval;
   88|       |
   89|  21.7k|    param[0].key = (char *)name;
   90|  21.7k|    param[0].data_type = OSSL_PARAM_UTF8_PTR;
  ------------------
  |  |  141|  21.7k|#define OSSL_PARAM_UTF8_PTR 6
  ------------------
   91|  21.7k|    param[0].data = (void *)&val;
   92|  21.7k|    param[0].data_size = sizeof(val);
   93|  21.7k|    param[0].return_size = OSSL_PARAM_UNMODIFIED;
  ------------------
  |  |   22|  21.7k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
   94|       |
   95|       |    /* Errors are ignored, returning the default value */
   96|  21.7k|    if (ctx->core_get_params(ctx->handle, param)
  ------------------
  |  Branch (96:9): [True: 21.7k, False: 0]
  ------------------
   97|  21.7k|        && OSSL_PARAM_modified(param)
  ------------------
  |  Branch (97:12): [True: 0, False: 21.7k]
  ------------------
   98|      0|        && val != NULL)
  ------------------
  |  Branch (98:12): [True: 0, False: 0]
  ------------------
   99|      0|        return val;
  100|  21.7k|    return defval;
  101|  21.7k|}
ossl_prov_ctx_get_bool_param:
  104|  14.5k|{
  105|  14.5k|    const char *val = ossl_prov_ctx_get_param(ctx, name, NULL);
  106|       |
  107|  14.5k|    if (val != NULL) {
  ------------------
  |  Branch (107:9): [True: 0, False: 14.5k]
  ------------------
  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|  14.5k|    return defval;
  120|  14.5k|}

ossl_err_load_PROV_strings:
  273|      2|{
  274|      2|#ifndef OPENSSL_NO_ERR
  275|      2|    if (ERR_reason_error_string(PROV_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (275:9): [True: 2, False: 0]
  ------------------
  276|      2|        ERR_load_strings_const(PROV_str_reasons);
  277|      2|#endif
  278|      2|    return 1;
  279|      2|}

ossl_prov_seeding_from_dispatch:
   42|      1|{
   43|     54|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (43:12): [True: 53, False: 1]
  ------------------
   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|     53|#define set_func(c, f)   \
   50|     53|    do {                 \
   51|     53|        if (c == NULL)   \
   52|     53|            c = f;       \
   53|     53|        else if (c != f) \
   54|     53|            return 0;    \
   55|     53|    } while (0)
   56|     53|        switch (fns->function_id) {
  ------------------
  |  Branch (56:17): [True: 8, False: 45]
  ------------------
   57|      1|        case OSSL_FUNC_GET_ENTROPY:
  ------------------
  |  |  188|      1|#define OSSL_FUNC_GET_ENTROPY 101
  ------------------
  |  Branch (57:9): [True: 1, False: 52]
  ------------------
   58|      1|            set_func(c_get_entropy, OSSL_FUNC_get_entropy(fns));
  ------------------
  |  |   50|      1|    do {                 \
  |  |   51|      1|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 0]
  |  |  ------------------
  |  |   52|      1|            c = f;       \
  |  |   53|      1|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|            return 0;    \
  |  |   55|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
   59|      1|            break;
   60|      1|        case OSSL_FUNC_GET_USER_ENTROPY:
  ------------------
  |  |  179|      1|#define OSSL_FUNC_GET_USER_ENTROPY 98
  ------------------
  |  Branch (60:9): [True: 1, False: 52]
  ------------------
   61|      1|            set_func(c_get_user_entropy, OSSL_FUNC_get_user_entropy(fns));
  ------------------
  |  |   50|      1|    do {                 \
  |  |   51|      1|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 0]
  |  |  ------------------
  |  |   52|      1|            c = f;       \
  |  |   53|      1|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|            return 0;    \
  |  |   55|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
   62|      1|            break;
   63|      1|        case OSSL_FUNC_CLEANUP_ENTROPY:
  ------------------
  |  |  189|      1|#define OSSL_FUNC_CLEANUP_ENTROPY 102
  ------------------
  |  Branch (63:9): [True: 1, False: 52]
  ------------------
   64|      1|            set_func(c_cleanup_entropy, OSSL_FUNC_cleanup_entropy(fns));
  ------------------
  |  |   50|      1|    do {                 \
  |  |   51|      1|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 0]
  |  |  ------------------
  |  |   52|      1|            c = f;       \
  |  |   53|      1|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|            return 0;    \
  |  |   55|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
   65|      1|            break;
   66|      1|        case OSSL_FUNC_CLEANUP_USER_ENTROPY:
  ------------------
  |  |  177|      1|#define OSSL_FUNC_CLEANUP_USER_ENTROPY 96
  ------------------
  |  Branch (66:9): [True: 1, False: 52]
  ------------------
   67|      1|            set_func(c_cleanup_user_entropy, OSSL_FUNC_cleanup_user_entropy(fns));
  ------------------
  |  |   50|      1|    do {                 \
  |  |   51|      1|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 0]
  |  |  ------------------
  |  |   52|      1|            c = f;       \
  |  |   53|      1|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|            return 0;    \
  |  |   55|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
   68|      1|            break;
   69|      1|        case OSSL_FUNC_GET_NONCE:
  ------------------
  |  |  190|      1|#define OSSL_FUNC_GET_NONCE 103
  ------------------
  |  Branch (69:9): [True: 1, False: 52]
  ------------------
   70|      1|            set_func(c_get_nonce, OSSL_FUNC_get_nonce(fns));
  ------------------
  |  |   50|      1|    do {                 \
  |  |   51|      1|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 0]
  |  |  ------------------
  |  |   52|      1|            c = f;       \
  |  |   53|      1|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|            return 0;    \
  |  |   55|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
   71|      1|            break;
   72|      1|        case OSSL_FUNC_GET_USER_NONCE:
  ------------------
  |  |  180|      1|#define OSSL_FUNC_GET_USER_NONCE 99
  ------------------
  |  Branch (72:9): [True: 1, False: 52]
  ------------------
   73|      1|            set_func(c_get_user_nonce, OSSL_FUNC_get_user_nonce(fns));
  ------------------
  |  |   50|      1|    do {                 \
  |  |   51|      1|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 0]
  |  |  ------------------
  |  |   52|      1|            c = f;       \
  |  |   53|      1|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|            return 0;    \
  |  |   55|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
   74|      1|            break;
   75|      1|        case OSSL_FUNC_CLEANUP_NONCE:
  ------------------
  |  |  191|      1|#define OSSL_FUNC_CLEANUP_NONCE 104
  ------------------
  |  Branch (75:9): [True: 1, False: 52]
  ------------------
   76|      1|            set_func(c_cleanup_nonce, OSSL_FUNC_cleanup_nonce(fns));
  ------------------
  |  |   50|      1|    do {                 \
  |  |   51|      1|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 0]
  |  |  ------------------
  |  |   52|      1|            c = f;       \
  |  |   53|      1|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|            return 0;    \
  |  |   55|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
   77|      1|            break;
   78|      1|        case OSSL_FUNC_CLEANUP_USER_NONCE:
  ------------------
  |  |  178|      1|#define OSSL_FUNC_CLEANUP_USER_NONCE 97
  ------------------
  |  Branch (78:9): [True: 1, False: 52]
  ------------------
   79|      1|            set_func(c_cleanup_user_nonce, OSSL_FUNC_cleanup_user_nonce(fns));
  ------------------
  |  |   50|      1|    do {                 \
  |  |   51|      1|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 0]
  |  |  ------------------
  |  |   52|      1|            c = f;       \
  |  |   53|      1|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 0]
  |  |  ------------------
  |  |   54|      0|            return 0;    \
  |  |   55|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
   80|      1|            break;
   81|     53|        }
   82|     53|#undef set_func
   83|     53|    }
   84|      1|    return 1;
   85|      1|}

ossl_prov_digest_reset:
   72|   195k|{
   73|   195k|    EVP_MD_free(pd->alloc_md);
   74|   195k|    pd->alloc_md = NULL;
   75|       |    pd->md = NULL;
   76|   195k|}
ossl_prov_digest_fetch:
   89|   195k|{
   90|   195k|    EVP_MD_free(pd->alloc_md);
   91|   195k|    pd->md = pd->alloc_md = EVP_MD_fetch(libctx, mdname, propquery);
   92|       |
   93|   195k|    return pd->md;
   94|   195k|}
ossl_prov_digest_load:
   98|   195k|{
   99|   195k|    const char *propquery;
  100|       |
  101|   195k|    if (!set_propq(propq, &propquery))
  ------------------
  |  Branch (101:9): [True: 0, False: 195k]
  ------------------
  102|      0|        return 0;
  103|       |
  104|   195k|    if (digest == NULL)
  ------------------
  |  Branch (104:9): [True: 0, False: 195k]
  ------------------
  105|      0|        return 1;
  106|   195k|    if (digest->data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|   195k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (106:9): [True: 0, False: 195k]
  ------------------
  107|      0|        return 0;
  108|       |
  109|   195k|    ossl_prov_digest_fetch(pd, ctx, digest->data, propquery);
  110|       |    return pd->md != NULL;
  111|   195k|}
ossl_prov_digest_md:
  120|   347k|{
  121|   347k|    return pd->md;
  122|   347k|}
ossl_prov_cache_exported_algorithms:
  221|      1|{
  222|      1|    int i, j;
  223|       |
  224|      1|    if (out[0].algorithm_names == NULL) {
  ------------------
  |  Branch (224:9): [True: 1, False: 0]
  ------------------
  225|    140|        for (i = j = 0; in[i].alg.algorithm_names != NULL; ++i) {
  ------------------
  |  Branch (225:25): [True: 139, False: 1]
  ------------------
  226|    139|            if (in[i].capable == NULL || in[i].capable())
  ------------------
  |  Branch (226:17): [True: 126, False: 13]
  |  Branch (226:42): [True: 4, False: 9]
  ------------------
  227|    130|                out[j++] = in[i].alg;
  228|    139|        }
  229|      1|        out[j++] = in[i].alg;
  230|      1|    }
  231|      1|}
provider_util.c:set_propq:
   37|   195k|{
   38|   195k|    *propquery = NULL;
   39|   195k|    if (propq != NULL) {
  ------------------
  |  Branch (39:9): [True: 0, False: 195k]
  ------------------
   40|      0|        if (propq->data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (40:13): [True: 0, False: 0]
  ------------------
   41|      0|            return 0;
   42|      0|        *propquery = propq->data;
   43|      0|    }
   44|   195k|    return 1;
   45|   195k|}

ossl_default_provider_init:
  793|      1|{
  794|      1|    OSSL_FUNC_core_get_libctx_fn *c_get_libctx = NULL;
  795|      1|    OSSL_FUNC_core_get_params_fn *c_get_params = NULL;
  796|      1|    BIO_METHOD *corebiometh;
  797|       |
  798|      1|    if (!ossl_prov_bio_from_dispatch(in)
  ------------------
  |  Branch (798:9): [True: 0, False: 1]
  ------------------
  799|      1|        || !ossl_prov_seeding_from_dispatch(in))
  ------------------
  |  Branch (799:12): [True: 0, False: 1]
  ------------------
  800|      0|        return 0;
  801|     54|    for (; in->function_id != 0; in++) {
  ------------------
  |  Branch (801:12): [True: 53, False: 1]
  ------------------
  802|     53|        switch (in->function_id) {
  803|      1|        case OSSL_FUNC_CORE_GET_PARAMS:
  ------------------
  |  |   75|      1|#define OSSL_FUNC_CORE_GET_PARAMS 2
  ------------------
  |  Branch (803:9): [True: 1, False: 52]
  ------------------
  804|      1|            c_get_params = OSSL_FUNC_core_get_params(in);
  805|      1|            break;
  806|      1|        case OSSL_FUNC_CORE_GET_LIBCTX:
  ------------------
  |  |   79|      1|#define OSSL_FUNC_CORE_GET_LIBCTX 4
  ------------------
  |  Branch (806:9): [True: 1, False: 52]
  ------------------
  807|      1|            c_get_libctx = OSSL_FUNC_core_get_libctx(in);
  808|      1|            break;
  809|     51|        default:
  ------------------
  |  Branch (809:9): [True: 51, False: 2]
  ------------------
  810|       |            /* Just ignore anything we don't understand */
  811|     51|            break;
  812|     53|        }
  813|     53|    }
  814|       |
  815|      1|    if (c_get_libctx == NULL)
  ------------------
  |  Branch (815:9): [True: 0, False: 1]
  ------------------
  816|      0|        return 0;
  817|       |
  818|       |    /*
  819|       |     * We want to make sure that all calls from this provider that requires
  820|       |     * a library context use the same context as the one used to call our
  821|       |     * functions.  We do that by passing it along in the provider context.
  822|       |     *
  823|       |     * This only works for built-in providers.  Most providers should
  824|       |     * create their own library context.
  825|       |     */
  826|      1|    if ((*provctx = ossl_prov_ctx_new()) == NULL
  ------------------
  |  Branch (826:9): [True: 0, False: 1]
  ------------------
  827|      1|        || (corebiometh = ossl_bio_prov_init_bio_method()) == NULL) {
  ------------------
  |  Branch (827:12): [True: 0, False: 1]
  ------------------
  828|      0|        ossl_prov_ctx_free(*provctx);
  829|      0|        *provctx = NULL;
  830|      0|        return 0;
  831|      0|    }
  832|      1|    ossl_prov_ctx_set0_libctx(*provctx,
  833|      1|        (OSSL_LIB_CTX *)c_get_libctx(handle));
  834|      1|    ossl_prov_ctx_set0_handle(*provctx, handle);
  835|      1|    ossl_prov_ctx_set0_core_bio_method(*provctx, corebiometh);
  836|      1|    ossl_prov_ctx_set0_core_get_params(*provctx, c_get_params);
  837|       |
  838|      1|    *out = deflt_dispatch_table;
  839|      1|    ossl_prov_cache_exported_algorithms(deflt_ciphers, exported_ciphers);
  840|       |
  841|      1|    return 1;
  842|      1|}
defltprov.c:deflt_query:
  735|   117k|{
  736|   117k|    *no_cache = 0;
  737|   117k|    switch (operation_id) {
  ------------------
  |  Branch (737:13): [True: 117k, False: 0]
  ------------------
  738|  51.5k|    case OSSL_OP_DIGEST:
  ------------------
  |  |  283|  51.5k|#define OSSL_OP_DIGEST 1
  ------------------
  |  Branch (738:5): [True: 51.5k, False: 66.3k]
  ------------------
  739|  51.5k|        return deflt_digests;
  740|  66.2k|    case OSSL_OP_CIPHER:
  ------------------
  |  |  284|  66.2k|#define OSSL_OP_CIPHER 2 /* Symmetric Ciphers */
  ------------------
  |  Branch (740:5): [True: 66.2k, False: 51.5k]
  ------------------
  741|  66.2k|        return exported_ciphers;
  742|      1|    case OSSL_OP_MAC:
  ------------------
  |  |  285|      1|#define OSSL_OP_MAC 3
  ------------------
  |  Branch (742:5): [True: 1, False: 117k]
  ------------------
  743|      1|        return deflt_macs;
  744|      1|    case OSSL_OP_KDF:
  ------------------
  |  |  286|      1|#define OSSL_OP_KDF 4
  ------------------
  |  Branch (744:5): [True: 1, False: 117k]
  ------------------
  745|      1|        return deflt_kdfs;
  746|      2|    case OSSL_OP_RAND:
  ------------------
  |  |  287|      2|#define OSSL_OP_RAND 5
  ------------------
  |  Branch (746:5): [True: 2, False: 117k]
  ------------------
  747|      2|        return deflt_rands;
  748|     23|    case OSSL_OP_KEYMGMT:
  ------------------
  |  |  288|     23|#define OSSL_OP_KEYMGMT 10
  ------------------
  |  Branch (748:5): [True: 23, False: 117k]
  ------------------
  749|     23|        return deflt_keymgmt;
  750|      3|    case OSSL_OP_KEYEXCH:
  ------------------
  |  |  289|      3|#define OSSL_OP_KEYEXCH 11
  ------------------
  |  Branch (750:5): [True: 3, False: 117k]
  ------------------
  751|      3|        return deflt_keyexch;
  752|      2|    case OSSL_OP_SIGNATURE:
  ------------------
  |  |  290|      2|#define OSSL_OP_SIGNATURE 12
  ------------------
  |  Branch (752:5): [True: 2, False: 117k]
  ------------------
  753|      2|        return deflt_signature;
  754|      0|    case OSSL_OP_ASYM_CIPHER:
  ------------------
  |  |  291|      0|#define OSSL_OP_ASYM_CIPHER 13
  ------------------
  |  Branch (754:5): [True: 0, False: 117k]
  ------------------
  755|      0|        return deflt_asym_cipher;
  756|      2|    case OSSL_OP_KEM:
  ------------------
  |  |  292|      2|#define OSSL_OP_KEM 14
  ------------------
  |  Branch (756:5): [True: 2, False: 117k]
  ------------------
  757|      2|        return deflt_asym_kem;
  758|      0|    case OSSL_OP_ENCODER:
  ------------------
  |  |  295|      0|#define OSSL_OP_ENCODER 20
  ------------------
  |  Branch (758:5): [True: 0, False: 117k]
  ------------------
  759|      0|        return deflt_encoder;
  760|      4|    case OSSL_OP_DECODER:
  ------------------
  |  |  296|      4|#define OSSL_OP_DECODER 21
  ------------------
  |  Branch (760:5): [True: 4, False: 117k]
  ------------------
  761|      4|        return deflt_decoder;
  762|      0|    case OSSL_OP_STORE:
  ------------------
  |  |  297|      0|#define OSSL_OP_STORE 22
  ------------------
  |  Branch (762:5): [True: 0, False: 117k]
  ------------------
  763|      0|        return deflt_store;
  764|      0|    case OSSL_OP_SKEYMGMT:
  ------------------
  |  |  293|      0|#define OSSL_OP_SKEYMGMT 15
  ------------------
  |  Branch (764:5): [True: 0, False: 117k]
  ------------------
  765|      0|        return deflt_skeymgmt;
  766|   117k|    }
  767|      0|    return NULL;
  768|   117k|}

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

cipher_aes_cbc_hmac_sha.c:aes_128_cbc_hmac_sha1_get_params:
  384|      1|    {                                                                               \
  385|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_CBC_MODE,            \
  ------------------
  |  |  211|      1|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  386|      1|            flags, kbits, blkbits, ivbits);                                         \
  387|      1|    }                                                                               \
cipher_aes_cbc_hmac_sha.c:aes_gettable_ctx_params:
  266|      4|{
  267|      4|    return aes_cbc_hmac_sha_get_ctx_params_list;
  268|      4|}
cipher_aes_cbc_hmac_sha.c:aes_256_cbc_hmac_sha1_get_params:
  384|      1|    {                                                                               \
  385|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_CBC_MODE,            \
  ------------------
  |  |  211|      1|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  386|      1|            flags, kbits, blkbits, ivbits);                                         \
  387|      1|    }                                                                               \
cipher_aes_cbc_hmac_sha.c:aes_128_cbc_hmac_sha256_get_params:
  384|      1|    {                                                                               \
  385|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_CBC_MODE,            \
  ------------------
  |  |  211|      1|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  386|      1|            flags, kbits, blkbits, ivbits);                                         \
  387|      1|    }                                                                               \
cipher_aes_cbc_hmac_sha.c:aes_256_cbc_hmac_sha256_get_params:
  384|      1|    {                                                                               \
  385|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_CBC_MODE,            \
  ------------------
  |  |  211|      1|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  386|      1|            flags, kbits, blkbits, ivbits);                                         \
  387|      1|    }                                                                               \

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.c:aes_gcm_newctx:
   24|  28.9k|{
   25|  28.9k|    PROV_AES_GCM_CTX *ctx;
   26|       |
   27|  28.9k|    CIPHER_PROV_CHECK(provctx, AES_256_GCM);
  ------------------
  |  |  205|  28.9k|    if (!ossl_prov_is_running())           \
  |  |  ------------------
  |  |  |  Branch (205:9): [True: 0, False: 28.9k]
  |  |  ------------------
  |  |  206|  28.9k|    return NULL
  ------------------
   28|  28.9k|    ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|  28.9k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   29|  28.9k|    if (ctx != NULL)
  ------------------
  |  Branch (29:9): [True: 28.9k, False: 0]
  ------------------
   30|  28.9k|        ossl_gcm_initctx(provctx, &ctx->base, keybits,
   31|  28.9k|            ossl_prov_aes_hw_gcm(keybits));
   32|  28.9k|    return ctx;
   33|  28.9k|}
cipher_aes_gcm.c:aes_gcm_freectx:
   55|  28.9k|{
   56|  28.9k|    PROV_AES_GCM_CTX *ctx = (PROV_AES_GCM_CTX *)vctx;
   57|       |
   58|  28.9k|    OPENSSL_clear_free(ctx, sizeof(*ctx));
  ------------------
  |  |  130|  28.9k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   59|  28.9k|}

cipher_aes_gcm_hw.c:generic_aes_gcm_cipher_update:
   63|  68.6k|{
   64|  68.6k|    if (ctx->enc) {
  ------------------
  |  Branch (64:9): [True: 36.1k, False: 32.5k]
  ------------------
   65|  36.1k|        if (ctx->ctr != NULL) {
  ------------------
  |  Branch (65:13): [True: 36.1k, False: 0]
  ------------------
   66|  36.1k|#if defined(AES_GCM_ASM)
   67|  36.1k|            size_t bulk = 0;
   68|       |
   69|  36.1k|            if (len >= AES_GCM_ENC_BYTES && AES_GCM_ASM(ctx)) {
  ------------------
  |  |  193|  72.2k|#define AES_GCM_ENC_BYTES 32
  ------------------
                          if (len >= AES_GCM_ENC_BYTES && AES_GCM_ASM(ctx)) {
  ------------------
  |  |  296|  25.4k|#define AES_GCM_ASM(ctx) (ctx->ctr == aesni_ctr32_encrypt_blocks && ctx->gcm.funcs.ghash == gcm_ghash_avx)
  |  |  ------------------
  |  |  |  Branch (296:27): [True: 25.4k, False: 0]
  |  |  |  Branch (296:69): [True: 25.4k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (69:17): [True: 25.4k, False: 10.6k]
  ------------------
   70|  25.4k|                size_t res = (16 - ctx->gcm.mres) % 16;
   71|       |
   72|  25.4k|                if (CRYPTO_gcm128_encrypt(&ctx->gcm, in, out, res))
  ------------------
  |  Branch (72:21): [True: 0, False: 25.4k]
  ------------------
   73|      0|                    return 0;
   74|       |
   75|  25.4k|                bulk = AES_gcm_encrypt(in + res, out + res, len - res,
  ------------------
  |  |  294|  25.4k|#define AES_gcm_encrypt aesni_gcm_encrypt
  ------------------
   76|  25.4k|                    ctx->gcm.key,
   77|  25.4k|                    ctx->gcm.Yi.c, ctx->gcm.Xi.u);
   78|       |
   79|  25.4k|                ctx->gcm.len.u[1] += bulk;
   80|  25.4k|                bulk += res;
   81|  25.4k|            }
   82|  36.1k|            if (CRYPTO_gcm128_encrypt_ctr32(&ctx->gcm, in + bulk, out + bulk,
  ------------------
  |  Branch (82:17): [True: 0, False: 36.1k]
  ------------------
   83|  36.1k|                    len - bulk, ctx->ctr))
   84|      0|                return 0;
   85|       |#else
   86|       |            if (CRYPTO_gcm128_encrypt_ctr32(&ctx->gcm, in, out, len, ctx->ctr))
   87|       |                return 0;
   88|       |#endif /* AES_GCM_ASM */
   89|  36.1k|        } else {
   90|      0|            if (CRYPTO_gcm128_encrypt(&ctx->gcm, in, out, len))
  ------------------
  |  Branch (90:17): [True: 0, False: 0]
  ------------------
   91|      0|                return 0;
   92|      0|        }
   93|  36.1k|    } else {
   94|  32.5k|        if (ctx->ctr != NULL) {
  ------------------
  |  Branch (94:13): [True: 32.5k, False: 0]
  ------------------
   95|  32.5k|#if defined(AES_GCM_ASM)
   96|  32.5k|            size_t bulk = 0;
   97|       |
   98|  32.5k|            if (len >= AES_GCM_DEC_BYTES && AES_GCM_ASM(ctx)) {
  ------------------
  |  |  194|  65.0k|#define AES_GCM_DEC_BYTES 16
  ------------------
                          if (len >= AES_GCM_DEC_BYTES && AES_GCM_ASM(ctx)) {
  ------------------
  |  |  296|  29.0k|#define AES_GCM_ASM(ctx) (ctx->ctr == aesni_ctr32_encrypt_blocks && ctx->gcm.funcs.ghash == gcm_ghash_avx)
  |  |  ------------------
  |  |  |  Branch (296:27): [True: 29.0k, False: 0]
  |  |  |  Branch (296:69): [True: 29.0k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (98:17): [True: 29.0k, False: 3.42k]
  ------------------
   99|  29.0k|                size_t res = (16 - ctx->gcm.mres) % 16;
  100|       |
  101|  29.0k|                if (CRYPTO_gcm128_decrypt(&ctx->gcm, in, out, res))
  ------------------
  |  Branch (101:21): [True: 0, False: 29.0k]
  ------------------
  102|      0|                    return 0;
  103|       |
  104|  29.0k|                bulk = AES_gcm_decrypt(in + res, out + res, len - res,
  ------------------
  |  |  295|  29.0k|#define AES_gcm_decrypt aesni_gcm_decrypt
  ------------------
  105|  29.0k|                    ctx->gcm.key,
  106|  29.0k|                    ctx->gcm.Yi.c, ctx->gcm.Xi.u);
  107|       |
  108|  29.0k|                ctx->gcm.len.u[1] += bulk;
  109|  29.0k|                bulk += res;
  110|  29.0k|            }
  111|  32.5k|            if (CRYPTO_gcm128_decrypt_ctr32(&ctx->gcm, in + bulk, out + bulk,
  ------------------
  |  Branch (111:17): [True: 0, False: 32.5k]
  ------------------
  112|  32.5k|                    len - bulk, ctx->ctr))
  113|      0|                return 0;
  114|       |#else
  115|       |            if (CRYPTO_gcm128_decrypt_ctr32(&ctx->gcm, in, out, len, ctx->ctr))
  116|       |                return 0;
  117|       |#endif /* AES_GCM_ASM */
  118|  32.5k|        } else {
  119|      0|            if (CRYPTO_gcm128_decrypt(&ctx->gcm, in, out, len))
  ------------------
  |  Branch (119:17): [True: 0, False: 0]
  ------------------
  120|      0|                return 0;
  121|      0|        }
  122|  32.5k|    }
  123|  68.6k|    return 1;
  124|  68.6k|}

ossl_prov_aes_hw_gcm:
   37|  28.9k|{
   38|  28.9k|#ifdef VAES_GCM_ENABLED
   39|  28.9k|    if (ossl_vaes_vpclmulqdq_capable())
  ------------------
  |  Branch (39:9): [True: 0, False: 28.9k]
  ------------------
   40|      0|        return &vaes_gcm;
   41|  28.9k|    else
   42|  28.9k|#endif
   43|  28.9k|    if (AESNI_CAPABLE)
  ------------------
  |  |  185|  28.9k|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 28.9k, False: 0]
  |  |  ------------------
  ------------------
   44|  28.9k|        return &aesni_gcm;
   45|      0|    else
   46|      0|        return &aes_gcm;
   47|  28.9k|}
cipher_aes_gcm_hw.c:aesni_gcm_initkey:
   17|  28.9k|{
   18|  28.9k|    PROV_AES_GCM_CTX *actx = (PROV_AES_GCM_CTX *)ctx;
   19|  28.9k|    AES_KEY *ks = &actx->ks.ks;
   20|  28.9k|    GCM_HW_SET_KEY_CTR_FN(ks, aesni_set_encrypt_key, aesni_encrypt,
  ------------------
  |  |  123|  28.9k|    fn_set_enc_key(key, (int)(keylen * 8), ks);                     \
  |  |  124|  28.9k|    CRYPTO_gcm128_init(&ctx->gcm, ks, (block128_f)fn_block);        \
  |  |  125|  28.9k|    ctx->ctr = (ctr128_f)fn_ctr;                                    \
  |  |  126|  28.9k|    ctx->key_set = 1;
  ------------------
   21|  28.9k|                          aesni_ctr32_encrypt_blocks);
   22|  28.9k|    return 1;
   23|  28.9k|}

cipher_aes_gcm_siv.c:ossl_aes_128_gcm_siv_get_params:
  278|      1|    {                                                                                                      \
  279|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,                            \
  ------------------
  |  |  221|      1|#define EVP_CIPH_GCM_SIV_MODE 0x10005
  ------------------
  280|      1|            flags, kbits, blkbits, ivbits);                                                                \
  281|      1|    }                                                                                                      \
cipher_aes_gcm_siv.c:ossl_aes_gcm_siv_gettable_ctx_params:
  208|      3|{
  209|      3|    return ossl_aes_gcm_siv_get_ctx_params_list;
  210|      3|}
cipher_aes_gcm_siv.c:ossl_aes_192_gcm_siv_get_params:
  278|      1|    {                                                                                                      \
  279|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,                            \
  ------------------
  |  |  221|      1|#define EVP_CIPH_GCM_SIV_MODE 0x10005
  ------------------
  280|      1|            flags, kbits, blkbits, ivbits);                                                                \
  281|      1|    }                                                                                                      \
cipher_aes_gcm_siv.c:ossl_aes_256_gcm_siv_get_params:
  278|      1|    {                                                                                                      \
  279|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,                            \
  ------------------
  |  |  221|      1|#define EVP_CIPH_GCM_SIV_MODE 0x10005
  ------------------
  280|      1|            flags, kbits, blkbits, ivbits);                                                                \
  281|      1|    }                                                                                                      \

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

cipher_aes_hw.c:cipher_hw_aesni_initkey:
   20|   236k|{
   21|   236k|    int ret;
   22|   236k|    PROV_AES_CTX *adat = (PROV_AES_CTX *)dat;
   23|   236k|    AES_KEY *ks = &adat->ks.ks;
   24|       |
   25|   236k|    dat->ks = ks;
   26|       |
   27|   236k|    if ((dat->mode == EVP_CIPH_ECB_MODE || dat->mode == EVP_CIPH_CBC_MODE)
  ------------------
  |  |  210|   472k|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
                  if ((dat->mode == EVP_CIPH_ECB_MODE || dat->mode == EVP_CIPH_CBC_MODE)
  ------------------
  |  |  211|   121k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  |  Branch (27:10): [True: 114k, False: 121k]
  |  Branch (27:44): [True: 7.16k, False: 114k]
  ------------------
   28|   121k|        && !dat->enc) {
  ------------------
  |  Branch (28:12): [True: 0, False: 121k]
  ------------------
   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 ?
  ------------------
  |  |  211|      0|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  |  Branch (31:27): [True: 0, False: 0]
  ------------------
   32|      0|            (cbc128_f) aesni_cbc_encrypt : NULL;
   33|   236k|    } else {
   34|   236k|        ret = aesni_set_encrypt_key(key, (int)(keylen * 8), ks);
   35|   236k|        dat->block = (block128_f) aesni_encrypt;
   36|   236k|        if (dat->mode == EVP_CIPH_CBC_MODE)
  ------------------
  |  |  211|   236k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  |  Branch (36:13): [True: 7.16k, False: 229k]
  ------------------
   37|  7.16k|            dat->stream.cbc = (cbc128_f) aesni_cbc_encrypt;
   38|   229k|        else if (dat->mode == EVP_CIPH_CTR_MODE)
  ------------------
  |  |  214|   229k|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  |  Branch (38:18): [True: 114k, False: 114k]
  ------------------
   39|   114k|            dat->stream.ctr = (ctr128_f) aesni_ctr32_encrypt_blocks;
   40|   114k|        else
   41|   114k|            dat->stream.cbc = NULL;
   42|   236k|    }
   43|       |
   44|   236k|    if (ret < 0) {
  ------------------
  |  Branch (44:9): [True: 0, False: 236k]
  ------------------
   45|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_KEY_SETUP_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   46|      0|        return 0;
   47|      0|    }
   48|       |
   49|   236k|    return 1;
   50|   236k|}
cipher_aes_hw.c:cipher_hw_aesni_cbc:
   54|  14.3k|{
   55|  14.3k|    const AES_KEY *ks = ctx->ks;
   56|       |
   57|  14.3k|    aesni_cbc_encrypt(in, out, len, ks, ctx->iv, ctx->enc);
   58|       |
   59|  14.3k|    return 1;
   60|  14.3k|}
cipher_aes_hw.c:cipher_hw_aesni_ecb:
   64|   114k|{
   65|   114k|    if (len < ctx->blocksize)
  ------------------
  |  Branch (65:9): [True: 0, False: 114k]
  ------------------
   66|      0|        return 1;
   67|       |
   68|   114k|    aesni_ecb_encrypt(in, out, len, ctx->ks, ctx->enc);
   69|       |
   70|   114k|    return 1;
   71|   114k|}

cipher_aes_ocb.c:aes_256_ocb_get_params:
  534|      1|    {                                                                           \
  535|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  219|      1|#define EVP_CIPH_OCB_MODE 0x10003
  ------------------
  536|      1|            flags, kbits, blkbits, ivbits);                                     \
  537|      1|    }                                                                           \
cipher_aes_ocb.c:cipher_ocb_gettable_ctx_params:
  421|      3|{
  422|      3|    return aes_ocb_get_ctx_params_list;
  423|      3|}
cipher_aes_ocb.c:aes_192_ocb_get_params:
  534|      1|    {                                                                           \
  535|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  219|      1|#define EVP_CIPH_OCB_MODE 0x10003
  ------------------
  536|      1|            flags, kbits, blkbits, ivbits);                                     \
  537|      1|    }                                                                           \
cipher_aes_ocb.c:aes_128_ocb_get_params:
  534|      1|    {                                                                           \
  535|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  219|      1|#define EVP_CIPH_OCB_MODE 0x10003
  ------------------
  536|      1|            flags, kbits, blkbits, ivbits);                                     \
  537|      1|    }                                                                           \

cipher_aes_siv.c:aes_128_siv_get_params:
  258|      1|    {                                                                            \
  259|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  220|      1|#define EVP_CIPH_SIV_MODE 0x10004
  ------------------
  260|      1|            flags, 2 * kbits, blkbits, ivbits);                                  \
  261|      1|    }                                                                            \
cipher_aes_siv.c:aes_siv_gettable_ctx_params:
  187|      3|{
  188|      3|    return aes_siv_get_ctx_params_list;
  189|      3|}
cipher_aes_siv.c:aes_192_siv_get_params:
  258|      1|    {                                                                            \
  259|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  220|      1|#define EVP_CIPH_SIV_MODE 0x10004
  ------------------
  260|      1|            flags, 2 * kbits, blkbits, ivbits);                                  \
  261|      1|    }                                                                            \
cipher_aes_siv.c:aes_256_siv_get_params:
  258|      1|    {                                                                            \
  259|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  220|      1|#define EVP_CIPH_SIV_MODE 0x10004
  ------------------
  260|      1|            flags, 2 * kbits, blkbits, ivbits);                                  \
  261|      1|    }                                                                            \

cipher_aes_wrp.c:aes_256_wrap_get_params:
  309|      1|    {                                                                           \
  310|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|      1|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|      1|            flags, kbits, blkbits, ivbits);                                     \
  312|      1|    }                                                                           \
cipher_aes_wrp.c:aes_192_wrap_get_params:
  309|      1|    {                                                                           \
  310|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|      1|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|      1|            flags, kbits, blkbits, ivbits);                                     \
  312|      1|    }                                                                           \
cipher_aes_wrp.c:aes_128_wrap_get_params:
  309|      1|    {                                                                           \
  310|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|      1|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|      1|            flags, kbits, blkbits, ivbits);                                     \
  312|      1|    }                                                                           \
cipher_aes_wrp.c:aes_256_wrappad_get_params:
  309|      1|    {                                                                           \
  310|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|      1|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|      1|            flags, kbits, blkbits, ivbits);                                     \
  312|      1|    }                                                                           \
cipher_aes_wrp.c:aes_192_wrappad_get_params:
  309|      1|    {                                                                           \
  310|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|      1|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|      1|            flags, kbits, blkbits, ivbits);                                     \
  312|      1|    }                                                                           \
cipher_aes_wrp.c:aes_128_wrappad_get_params:
  309|      1|    {                                                                           \
  310|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|      1|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|      1|            flags, kbits, blkbits, ivbits);                                     \
  312|      1|    }                                                                           \
cipher_aes_wrp.c:aes_256_wrapinv_get_params:
  309|      1|    {                                                                           \
  310|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|      1|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|      1|            flags, kbits, blkbits, ivbits);                                     \
  312|      1|    }                                                                           \
cipher_aes_wrp.c:aes_192_wrapinv_get_params:
  309|      1|    {                                                                           \
  310|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|      1|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|      1|            flags, kbits, blkbits, ivbits);                                     \
  312|      1|    }                                                                           \
cipher_aes_wrp.c:aes_128_wrapinv_get_params:
  309|      1|    {                                                                           \
  310|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|      1|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|      1|            flags, kbits, blkbits, ivbits);                                     \
  312|      1|    }                                                                           \
cipher_aes_wrp.c:aes_256_wrappadinv_get_params:
  309|      1|    {                                                                           \
  310|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|      1|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|      1|            flags, kbits, blkbits, ivbits);                                     \
  312|      1|    }                                                                           \
cipher_aes_wrp.c:aes_192_wrappadinv_get_params:
  309|      1|    {                                                                           \
  310|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|      1|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|      1|            flags, kbits, blkbits, ivbits);                                     \
  312|      1|    }                                                                           \
cipher_aes_wrp.c:aes_128_wrappadinv_get_params:
  309|      1|    {                                                                           \
  310|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  218|      1|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  311|      1|            flags, kbits, blkbits, ivbits);                                     \
  312|      1|    }                                                                           \

cipher_aes_xts.c:aes_256_xts_get_params:
  275|      1|    {                                                                              \
  276|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,    \
  ------------------
  |  |  217|      1|#define EVP_CIPH_XTS_MODE 0x10001
  ------------------
  277|      1|            flags, 2 * kbits, AES_XTS_BLOCK_BITS,                                  \
  ------------------
  |  |   26|      1|#define AES_XTS_BLOCK_BITS 8
  ------------------
  278|      1|            AES_XTS_IV_BITS);                                                      \
  ------------------
  |  |   25|      1|#define AES_XTS_IV_BITS 128
  ------------------
  279|      1|    }                                                                              \
cipher_aes_xts.c:aes_128_xts_get_params:
  275|      1|    {                                                                              \
  276|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,    \
  ------------------
  |  |  217|      1|#define EVP_CIPH_XTS_MODE 0x10001
  ------------------
  277|      1|            flags, 2 * kbits, AES_XTS_BLOCK_BITS,                                  \
  ------------------
  |  |   26|      1|#define AES_XTS_BLOCK_BITS 8
  ------------------
  278|      1|            AES_XTS_IV_BITS);                                                      \
  ------------------
  |  |   25|      1|#define AES_XTS_IV_BITS 128
  ------------------
  279|      1|    }                                                                              \

cipher_chacha20.c:chacha20_get_params:
   97|      1|{
   98|      1|    return ossl_cipher_generic_get_params(params, 0, CHACHA20_FLAGS,
  ------------------
  |  |   22|      1|#define CHACHA20_FLAGS (PROV_CIPHER_FLAG_CUSTOM_IV)
  |  |  ------------------
  |  |  |  |   40|      1|#define PROV_CIPHER_FLAG_CUSTOM_IV 0x0002
  |  |  ------------------
  ------------------
   99|      1|        CHACHA20_KEYLEN * 8,
  ------------------
  |  |   19|      1|#define CHACHA20_KEYLEN (CHACHA_KEY_SIZE)
  |  |  ------------------
  |  |  |  |   44|      1|#define CHACHA_KEY_SIZE 32
  |  |  ------------------
  ------------------
  100|      1|        CHACHA20_BLKLEN * 8,
  ------------------
  |  |   20|      1|#define CHACHA20_BLKLEN (1)
  ------------------
  101|      1|        CHACHA20_IVLEN * 8);
  ------------------
  |  |   21|      1|#define CHACHA20_IVLEN (CHACHA_CTR_SIZE)
  |  |  ------------------
  |  |  |  |   45|      1|#define CHACHA_CTR_SIZE 16
  |  |  ------------------
  ------------------
  102|      1|}
cipher_chacha20.c:chacha20_gettable_ctx_params:
  138|      1|{
  139|      1|    return chacha20_get_ctx_params_list;
  140|      1|}

cipher_chacha20_poly1305.c:chacha20_poly1305_get_params:
   93|  7.36k|{
   94|  7.36k|    return ossl_cipher_generic_get_params(params, 0, CHACHA20_POLY1305_FLAGS,
  ------------------
  |  |   23|  7.36k|#define CHACHA20_POLY1305_FLAGS (PROV_CIPHER_FLAG_AEAD \
  |  |  ------------------
  |  |  |  |   39|  7.36k|#define PROV_CIPHER_FLAG_AEAD 0x0001
  |  |  ------------------
  |  |   24|  7.36k|    | PROV_CIPHER_FLAG_CUSTOM_IV)
  |  |  ------------------
  |  |  |  |   40|  7.36k|#define PROV_CIPHER_FLAG_CUSTOM_IV 0x0002
  |  |  ------------------
  ------------------
   95|  7.36k|        CHACHA20_POLY1305_KEYLEN * 8,
  ------------------
  |  |   19|  7.36k|#define CHACHA20_POLY1305_KEYLEN CHACHA_KEY_SIZE
  |  |  ------------------
  |  |  |  |   44|  7.36k|#define CHACHA_KEY_SIZE 32
  |  |  ------------------
  ------------------
   96|  7.36k|        CHACHA20_POLY1305_BLKLEN * 8,
  ------------------
  |  |   20|  7.36k|#define CHACHA20_POLY1305_BLKLEN 1
  ------------------
   97|  7.36k|        CHACHA20_POLY1305_IVLEN * 8);
  ------------------
  |  |   16|  7.36k|#define CHACHA20_POLY1305_IVLEN 12
  ------------------
   98|  7.36k|}
cipher_chacha20_poly1305.c:chacha20_poly1305_gettable_ctx_params:
  151|      1|{
  152|      1|    return chacha20_poly1305_get_ctx_params_list;
  153|      1|}

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

cipher_null.c:null_get_params:
  105|      1|{
  106|      1|    return ossl_cipher_generic_get_params(params, 0, 0, 0, 8, 0);
  107|      1|}
cipher_null.c:null_gettable_ctx_params:
  112|      1|{
  113|      1|    return null_get_ctx_params_list;
  114|      1|}

cipher_sm4_xts.c:sm4_128_xts_get_params:
  239|      1|    {                                                                              \
  240|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,    \
  ------------------
  |  |  217|      1|#define EVP_CIPH_XTS_MODE 0x10001
  ------------------
  241|      1|            flags, 2 * kbits, SM4_XTS_BLOCK_BITS,                                  \
  ------------------
  |  |   20|      1|#define SM4_XTS_BLOCK_BITS 8
  ------------------
  242|      1|            SM4_XTS_IV_BITS);                                                      \
  ------------------
  |  |   19|      1|#define SM4_XTS_IV_BITS 128
  ------------------
  243|      1|    }                                                                              \

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

ossl_tdes_get_params:
  184|  7.37k|{
  185|       |#ifdef FIPS_MODULE
  186|       |    const int decrypt_only = 1;
  187|       |#else
  188|  7.37k|    const int decrypt_only = 0;
  189|  7.37k|#endif
  190|  7.37k|    OSSL_PARAM *p;
  191|       |
  192|  7.37k|    p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_DECRYPT_ONLY);
  ------------------
  |  |  190|  7.37k|# define OSSL_CIPHER_PARAM_DECRYPT_ONLY "decrypt-only"
  ------------------
  193|  7.37k|    if (p != NULL && !OSSL_PARAM_set_int(p, decrypt_only)) {
  ------------------
  |  Branch (193:9): [True: 7.36k, False: 10]
  |  Branch (193:22): [True: 0, False: 7.36k]
  ------------------
  194|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  195|      0|        return 0;
  196|      0|    }
  197|       |
  198|  7.37k|    return ossl_cipher_generic_get_params(params, md, flags,
  199|  7.37k|        kbits, blkbits, ivbits);
  200|  7.37k|}

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

ossl_cipher_generic_get_params:
   43|   117k|{
   44|   117k|    struct ossl_cipher_generic_get_params_st p;
   45|       |
   46|   117k|    if (!ossl_cipher_generic_get_params_decoder(params, &p))
  ------------------
  |  Branch (46:9): [True: 0, False: 117k]
  ------------------
   47|      0|        return 0;
   48|       |
   49|   117k|    if (p.mode != NULL && !OSSL_PARAM_set_uint(p.mode, md)) {
  ------------------
  |  Branch (49:9): [True: 130, False: 117k]
  |  Branch (49:27): [True: 0, False: 130]
  ------------------
   50|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   51|      0|        return 0;
   52|      0|    }
   53|   117k|    if (p.aead != NULL
  ------------------
  |  Branch (53:9): [True: 130, False: 117k]
  ------------------
   54|    130|        && !OSSL_PARAM_set_int(p.aead, (flags & PROV_CIPHER_FLAG_AEAD) != 0)) {
  ------------------
  |  |   39|    130|#define PROV_CIPHER_FLAG_AEAD 0x0001
  ------------------
  |  Branch (54:12): [True: 0, False: 130]
  ------------------
   55|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   56|      0|        return 0;
   57|      0|    }
   58|   117k|    if (p.custiv != NULL
  ------------------
  |  Branch (58:9): [True: 130, False: 117k]
  ------------------
   59|    130|        && !OSSL_PARAM_set_int(p.custiv, (flags & PROV_CIPHER_FLAG_CUSTOM_IV) != 0)) {
  ------------------
  |  |   40|    130|#define PROV_CIPHER_FLAG_CUSTOM_IV 0x0002
  ------------------
  |  Branch (59:12): [True: 0, False: 130]
  ------------------
   60|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   61|      0|        return 0;
   62|      0|    }
   63|   117k|    if (p.cts != NULL
  ------------------
  |  Branch (63:9): [True: 130, False: 117k]
  ------------------
   64|    130|        && !OSSL_PARAM_set_int(p.cts, (flags & PROV_CIPHER_FLAG_CTS) != 0)) {
  ------------------
  |  |   41|    130|#define PROV_CIPHER_FLAG_CTS 0x0004
  ------------------
  |  Branch (64:12): [True: 0, False: 130]
  ------------------
   65|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   66|      0|        return 0;
   67|      0|    }
   68|   117k|    if (p.mb != NULL
  ------------------
  |  Branch (68:9): [True: 130, False: 117k]
  ------------------
   69|    130|        && !OSSL_PARAM_set_int(p.mb, (flags & PROV_CIPHER_FLAG_TLS1_MULTIBLOCK) != 0)) {
  ------------------
  |  |   42|    130|#define PROV_CIPHER_FLAG_TLS1_MULTIBLOCK 0x0008
  ------------------
  |  Branch (69:12): [True: 0, False: 130]
  ------------------
   70|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   71|      0|        return 0;
   72|      0|    }
   73|   117k|    if (p.rand != NULL
  ------------------
  |  Branch (73:9): [True: 130, False: 117k]
  ------------------
   74|    130|        && !OSSL_PARAM_set_int(p.rand, (flags & PROV_CIPHER_FLAG_RAND_KEY) != 0)) {
  ------------------
  |  |   43|    130|#define PROV_CIPHER_FLAG_RAND_KEY 0x0010
  ------------------
  |  Branch (74:12): [True: 0, False: 130]
  ------------------
   75|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   76|      0|        return 0;
   77|      0|    }
   78|   117k|    if (p.etm != NULL
  ------------------
  |  Branch (78:9): [True: 130, False: 117k]
  ------------------
   79|    130|        && !OSSL_PARAM_set_int(p.etm, (flags & EVP_CIPH_FLAG_ENC_THEN_MAC) != 0)) {
  ------------------
  |  |  267|    130|#define EVP_CIPH_FLAG_ENC_THEN_MAC 0x10000000
  ------------------
  |  Branch (79:12): [True: 0, False: 130]
  ------------------
   80|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   81|      0|        return 0;
   82|      0|    }
   83|   117k|    if (p.keylen != NULL && !OSSL_PARAM_set_size_t(p.keylen, kbits / 8)) {
  ------------------
  |  Branch (83:9): [True: 130, False: 117k]
  |  Branch (83:29): [True: 0, False: 130]
  ------------------
   84|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   85|      0|        return 0;
   86|      0|    }
   87|   117k|    if (p.bsize != NULL && !OSSL_PARAM_set_size_t(p.bsize, blkbits / 8)) {
  ------------------
  |  Branch (87:9): [True: 130, False: 117k]
  |  Branch (87:28): [True: 0, False: 130]
  ------------------
   88|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   89|      0|        return 0;
   90|      0|    }
   91|   117k|    if (p.ivlen != NULL && !OSSL_PARAM_set_size_t(p.ivlen, ivbits / 8)) {
  ------------------
  |  Branch (91:9): [True: 130, False: 117k]
  |  Branch (91:28): [True: 0, False: 130]
  ------------------
   92|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   93|      0|        return 0;
   94|      0|    }
   95|   117k|    return 1;
   96|   117k|}
ossl_cipher_generic_gettable_ctx_params:
   99|     83|{
  100|     83|    return cipher_generic_get_ctx_params_list;
  101|     83|}
ossl_cipher_generic_reset_ctx:
  143|  7.16k|{
  144|  7.16k|    if (ctx != NULL && ctx->alloced) {
  ------------------
  |  Branch (144:9): [True: 7.16k, False: 0]
  |  Branch (144:24): [True: 0, False: 7.16k]
  ------------------
  145|      0|        OPENSSL_free(ctx->tlsmac);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  146|      0|        ctx->alloced = 0;
  147|       |        ctx->tlsmac = NULL;
  148|      0|    }
  149|  7.16k|}
ossl_cipher_generic_einit:
  194|   351k|{
  195|   351k|    return cipher_generic_init_internal((PROV_CIPHER_CTX *)vctx, key, keylen,
  196|   351k|        iv, ivlen, params, 1);
  197|   351k|}
ossl_cipher_generic_block_update:
  235|   121k|{
  236|   121k|    size_t outlint = 0;
  237|   121k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
  238|   121k|    size_t blksz = ctx->blocksize;
  239|   121k|    size_t nextblocks;
  240|       |
  241|   121k|    if (!ctx->key_set) {
  ------------------
  |  Branch (241:9): [True: 0, False: 121k]
  ------------------
  242|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_NO_KEY_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  243|      0|        return 0;
  244|      0|    }
  245|       |
  246|   121k|    if (ctx->tlsversion > 0) {
  ------------------
  |  Branch (246:9): [True: 0, False: 121k]
  ------------------
  247|       |        /*
  248|       |         * Each update call corresponds to a TLS record and is individually
  249|       |         * padded
  250|       |         */
  251|       |
  252|       |        /* Sanity check inputs */
  253|      0|        if (in == NULL
  ------------------
  |  Branch (253:13): [True: 0, False: 0]
  ------------------
  254|      0|            || in != out
  ------------------
  |  Branch (254:16): [True: 0, False: 0]
  ------------------
  255|      0|            || outsize < inl
  ------------------
  |  Branch (255:16): [True: 0, False: 0]
  ------------------
  256|      0|            || !ctx->pad) {
  ------------------
  |  Branch (256:16): [True: 0, False: 0]
  ------------------
  257|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  258|      0|            return 0;
  259|      0|        }
  260|       |
  261|      0|        if (ctx->enc) {
  ------------------
  |  Branch (261:13): [True: 0, False: 0]
  ------------------
  262|      0|            unsigned char padval;
  263|      0|            size_t padnum, loop;
  264|       |
  265|       |            /* Add padding */
  266|       |
  267|      0|            padnum = blksz - (inl % blksz);
  268|       |
  269|      0|            if (outsize < inl + padnum) {
  ------------------
  |  Branch (269:17): [True: 0, False: 0]
  ------------------
  270|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  271|      0|                return 0;
  272|      0|            }
  273|       |
  274|      0|            if (padnum > MAX_PADDING) {
  ------------------
  |  |  230|      0|#define MAX_PADDING 256
  ------------------
  |  Branch (274:17): [True: 0, False: 0]
  ------------------
  275|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  276|      0|                return 0;
  277|      0|            }
  278|      0|            padval = (unsigned char)(padnum - 1);
  279|      0|            if (ctx->tlsversion == SSL3_VERSION) {
  ------------------
  |  |   23|      0|#define SSL3_VERSION 0x0300
  ------------------
  |  Branch (279:17): [True: 0, False: 0]
  ------------------
  280|      0|                if (padnum > 1)
  ------------------
  |  Branch (280:21): [True: 0, False: 0]
  ------------------
  281|      0|                    memset(out + inl, 0, padnum - 1);
  282|      0|                *(out + inl + padnum - 1) = padval;
  283|      0|            } else {
  284|       |                /* we need to add 'padnum' padding bytes of value padval */
  285|      0|                for (loop = inl; loop < inl + padnum; loop++)
  ------------------
  |  Branch (285:34): [True: 0, False: 0]
  ------------------
  286|      0|                    out[loop] = padval;
  287|      0|            }
  288|      0|            inl += padnum;
  289|      0|        }
  290|       |
  291|      0|        if ((inl % blksz) != 0) {
  ------------------
  |  Branch (291:13): [True: 0, False: 0]
  ------------------
  292|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  293|      0|            return 0;
  294|      0|        }
  295|       |
  296|       |        /* Shouldn't normally fail */
  297|      0|        if (!ctx->hw->cipher(ctx, out, in, inl)) {
  ------------------
  |  Branch (297:13): [True: 0, False: 0]
  ------------------
  298|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  299|      0|            return 0;
  300|      0|        }
  301|       |
  302|      0|        if (ctx->alloced) {
  ------------------
  |  Branch (302:13): [True: 0, False: 0]
  ------------------
  303|      0|            OPENSSL_free(ctx->tlsmac);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  304|      0|            ctx->alloced = 0;
  305|      0|            ctx->tlsmac = NULL;
  306|      0|        }
  307|       |
  308|       |        /* This only fails if padding is publicly invalid */
  309|      0|        *outl = inl;
  310|      0|        if (!ctx->enc
  ------------------
  |  Branch (310:13): [True: 0, False: 0]
  ------------------
  311|      0|            && !ossl_cipher_tlsunpadblock(ctx->libctx, ctx->tlsversion,
  ------------------
  |  Branch (311:16): [True: 0, False: 0]
  ------------------
  312|      0|                out, outl,
  313|      0|                blksz, &ctx->tlsmac, &ctx->alloced,
  314|      0|                ctx->tlsmacsize, 0)) {
  315|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  316|      0|            return 0;
  317|      0|        }
  318|      0|        return 1;
  319|      0|    }
  320|       |
  321|   121k|    if (ctx->bufsz != 0)
  ------------------
  |  Branch (321:9): [True: 0, False: 121k]
  ------------------
  322|      0|        nextblocks = ossl_cipher_fillblock(ctx->buf, &ctx->bufsz, blksz,
  323|      0|            &in, &inl);
  324|   121k|    else
  325|   121k|        nextblocks = inl & ~(blksz - 1);
  326|       |
  327|       |    /*
  328|       |     * If we're decrypting and we end an update on a block boundary we hold
  329|       |     * the last block back in case this is the last update call and the last
  330|       |     * block is padded.
  331|       |     */
  332|   121k|    if (ctx->bufsz == blksz && (ctx->enc || inl > 0 || !ctx->pad)) {
  ------------------
  |  Branch (332:9): [True: 0, False: 121k]
  |  Branch (332:33): [True: 0, False: 0]
  |  Branch (332:45): [True: 0, False: 0]
  |  Branch (332:56): [True: 0, False: 0]
  ------------------
  333|      0|        if (outsize < blksz) {
  ------------------
  |  Branch (333:13): [True: 0, False: 0]
  ------------------
  334|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  335|      0|            return 0;
  336|      0|        }
  337|      0|        if (!ctx->hw->cipher(ctx, out, ctx->buf, blksz)) {
  ------------------
  |  Branch (337:13): [True: 0, False: 0]
  ------------------
  338|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  339|      0|            return 0;
  340|      0|        }
  341|      0|        ctx->bufsz = 0;
  342|      0|        outlint = blksz;
  343|      0|        out += blksz;
  344|      0|    }
  345|   121k|    if (nextblocks > 0) {
  ------------------
  |  Branch (345:9): [True: 121k, False: 0]
  ------------------
  346|   121k|        if (!ctx->enc && ctx->pad && nextblocks == inl) {
  ------------------
  |  Branch (346:13): [True: 0, False: 121k]
  |  Branch (346:26): [True: 0, False: 0]
  |  Branch (346:38): [True: 0, False: 0]
  ------------------
  347|      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 (347:17): [True: 0, False: 0]
  ------------------
  348|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  349|      0|                return 0;
  350|      0|            }
  351|      0|            nextblocks -= blksz;
  352|      0|        }
  353|   121k|        outlint += nextblocks;
  354|   121k|        if (outsize < outlint) {
  ------------------
  |  Branch (354:13): [True: 0, False: 121k]
  ------------------
  355|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  356|      0|            return 0;
  357|      0|        }
  358|   121k|    }
  359|   121k|    if (nextblocks > 0) {
  ------------------
  |  Branch (359:9): [True: 121k, False: 0]
  ------------------
  360|   121k|        if (!ctx->hw->cipher(ctx, out, in, nextblocks)) {
  ------------------
  |  Branch (360:13): [True: 0, False: 121k]
  ------------------
  361|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  362|      0|            return 0;
  363|      0|        }
  364|   121k|        in += nextblocks;
  365|   121k|        inl -= nextblocks;
  366|   121k|    }
  367|   121k|    if (inl != 0
  ------------------
  |  Branch (367:9): [True: 7.16k, False: 114k]
  ------------------
  368|  7.16k|        && !ossl_cipher_trailingdata(ctx->buf, &ctx->bufsz, blksz, &in, &inl)) {
  ------------------
  |  Branch (368:12): [True: 0, False: 7.16k]
  ------------------
  369|       |        /* ERR_raise already called */
  370|      0|        return 0;
  371|      0|    }
  372|       |
  373|   121k|    *outl = outlint;
  374|   121k|    return inl == 0;
  375|   121k|}
ossl_cipher_generic_block_final:
  379|  7.16k|{
  380|  7.16k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
  381|  7.16k|    size_t blksz = ctx->blocksize;
  382|       |
  383|  7.16k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (383:9): [True: 0, False: 7.16k]
  ------------------
  384|      0|        return 0;
  385|       |
  386|  7.16k|    if (!ctx->key_set) {
  ------------------
  |  Branch (386:9): [True: 0, False: 7.16k]
  ------------------
  387|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_NO_KEY_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  388|      0|        return 0;
  389|      0|    }
  390|       |
  391|  7.16k|    if (ctx->tlsversion > 0) {
  ------------------
  |  Branch (391:9): [True: 0, False: 7.16k]
  ------------------
  392|       |        /* We never finalize TLS, so this is an error */
  393|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  394|      0|        return 0;
  395|      0|    }
  396|       |
  397|  7.16k|    if (ctx->enc) {
  ------------------
  |  Branch (397:9): [True: 7.16k, False: 0]
  ------------------
  398|  7.16k|        if (ctx->pad) {
  ------------------
  |  Branch (398:13): [True: 7.16k, False: 0]
  ------------------
  399|  7.16k|            ossl_cipher_padblock(ctx->buf, &ctx->bufsz, blksz);
  400|  7.16k|        } else if (ctx->bufsz == 0) {
  ------------------
  |  Branch (400:20): [True: 0, False: 0]
  ------------------
  401|      0|            *outl = 0;
  402|      0|            return 1;
  403|      0|        } else if (ctx->bufsz != blksz) {
  ------------------
  |  Branch (403:20): [True: 0, False: 0]
  ------------------
  404|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_WRONG_FINAL_BLOCK_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  405|      0|            return 0;
  406|      0|        }
  407|       |
  408|  7.16k|        if (outsize < blksz) {
  ------------------
  |  Branch (408:13): [True: 0, False: 7.16k]
  ------------------
  409|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  410|      0|            return 0;
  411|      0|        }
  412|  7.16k|        if (!ctx->hw->cipher(ctx, out, ctx->buf, blksz)) {
  ------------------
  |  Branch (412:13): [True: 0, False: 7.16k]
  ------------------
  413|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  414|      0|            return 0;
  415|      0|        }
  416|  7.16k|        ctx->bufsz = 0;
  417|  7.16k|        *outl = blksz;
  418|  7.16k|        return 1;
  419|  7.16k|    }
  420|       |
  421|       |    /* Decrypting */
  422|      0|    if (ctx->bufsz != blksz) {
  ------------------
  |  Branch (422:9): [True: 0, False: 0]
  ------------------
  423|      0|        if (ctx->bufsz == 0 && !ctx->pad) {
  ------------------
  |  Branch (423:13): [True: 0, False: 0]
  |  Branch (423:32): [True: 0, False: 0]
  ------------------
  424|      0|            *outl = 0;
  425|      0|            return 1;
  426|      0|        }
  427|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_WRONG_FINAL_BLOCK_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  428|      0|        return 0;
  429|      0|    }
  430|       |
  431|      0|    if (!ctx->hw->cipher(ctx, ctx->buf, ctx->buf, blksz)) {
  ------------------
  |  Branch (431:9): [True: 0, False: 0]
  ------------------
  432|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  433|      0|        return 0;
  434|      0|    }
  435|       |
  436|      0|    if (ctx->pad && !ossl_cipher_unpadblock(ctx->buf, &ctx->bufsz, blksz)) {
  ------------------
  |  Branch (436:9): [True: 0, False: 0]
  |  Branch (436:21): [True: 0, False: 0]
  ------------------
  437|       |        /* ERR_raise already called */
  438|      0|        return 0;
  439|      0|    }
  440|       |
  441|      0|    if (outsize < ctx->bufsz) {
  ------------------
  |  Branch (441:9): [True: 0, False: 0]
  ------------------
  442|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  443|      0|        return 0;
  444|      0|    }
  445|      0|    memcpy(out, ctx->buf, ctx->bufsz);
  446|      0|    *outl = ctx->bufsz;
  447|      0|    ctx->bufsz = 0;
  448|      0|    return 1;
  449|      0|}
ossl_cipher_generic_stream_update:
  454|   114k|{
  455|   114k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
  456|       |
  457|   114k|    if (!ctx->key_set) {
  ------------------
  |  Branch (457:9): [True: 0, False: 114k]
  ------------------
  458|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_NO_KEY_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  459|      0|        return 0;
  460|      0|    }
  461|       |
  462|   114k|    if (inl == 0) {
  ------------------
  |  Branch (462:9): [True: 0, False: 114k]
  ------------------
  463|      0|        *outl = 0;
  464|      0|        return 1;
  465|      0|    }
  466|       |
  467|   114k|    if (outsize < inl) {
  ------------------
  |  Branch (467:9): [True: 0, False: 114k]
  ------------------
  468|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  469|      0|        return 0;
  470|      0|    }
  471|       |
  472|   114k|    if (!ctx->hw->cipher(ctx, out, in, inl)) {
  ------------------
  |  Branch (472:9): [True: 0, False: 114k]
  ------------------
  473|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  474|      0|        return 0;
  475|      0|    }
  476|       |
  477|   114k|    *outl = inl;
  478|   114k|    if (!ctx->enc && ctx->tlsversion > 0) {
  ------------------
  |  Branch (478:9): [True: 0, False: 114k]
  |  Branch (478:22): [True: 0, False: 0]
  ------------------
  479|       |        /*
  480|       |         * Remove any TLS padding. Only used by cipher_aes_cbc_hmac_sha1_hw.c and
  481|       |         * cipher_aes_cbc_hmac_sha256_hw.c
  482|       |         */
  483|      0|        if (ctx->removetlspad) {
  ------------------
  |  Branch (483:13): [True: 0, False: 0]
  ------------------
  484|       |            /*
  485|       |             * We should have already failed in the cipher() call above if this
  486|       |             * isn't true.
  487|       |             */
  488|      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 (488:17): [True: 0, False: 0]
  ------------------
  489|      0|                return 0;
  490|       |            /* The actual padding length */
  491|      0|            *outl -= out[inl - 1] + 1;
  492|      0|        }
  493|       |
  494|       |        /* TLS MAC and explicit IV if relevant. We should have already failed
  495|       |         * in the cipher() call above if *outl is too short.
  496|       |         */
  497|      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 (497:13): [True: 0, False: 0]
  ------------------
  498|      0|            return 0;
  499|      0|        *outl -= ctx->removetlsfixed;
  500|       |
  501|       |        /* Extract the MAC if there is one */
  502|      0|        if (ctx->tlsmacsize > 0) {
  ------------------
  |  Branch (502:13): [True: 0, False: 0]
  ------------------
  503|      0|            if (*outl < ctx->tlsmacsize)
  ------------------
  |  Branch (503:17): [True: 0, False: 0]
  ------------------
  504|      0|                return 0;
  505|       |
  506|      0|            ctx->tlsmac = out + *outl - ctx->tlsmacsize;
  507|      0|            *outl -= ctx->tlsmacsize;
  508|      0|        }
  509|      0|    }
  510|       |
  511|   114k|    return 1;
  512|   114k|}
ossl_cipher_common_get_ctx_params:
  559|  14.3k|{
  560|  14.3k|    if (p->ivlen != NULL && !OSSL_PARAM_set_size_t(p->ivlen, ctx->ivlen)) {
  ------------------
  |  Branch (560:9): [True: 7.17k, False: 7.17k]
  |  Branch (560:29): [True: 0, False: 7.17k]
  ------------------
  561|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  562|      0|        return 0;
  563|      0|    }
  564|       |
  565|  14.3k|    if (p->pad != NULL && !OSSL_PARAM_set_uint(p->pad, ctx->pad)) {
  ------------------
  |  Branch (565:9): [True: 0, False: 14.3k]
  |  Branch (565:27): [True: 0, False: 0]
  ------------------
  566|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  567|      0|        return 0;
  568|      0|    }
  569|       |
  570|  14.3k|    if (p->iv != NULL
  ------------------
  |  Branch (570:9): [True: 0, False: 14.3k]
  ------------------
  571|      0|        && !OSSL_PARAM_set_octet_string_or_ptr(p->iv, ctx->oiv, ctx->ivlen)) {
  ------------------
  |  Branch (571:12): [True: 0, False: 0]
  ------------------
  572|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  573|      0|        return 0;
  574|      0|    }
  575|       |
  576|  14.3k|    if (p->updiv != NULL
  ------------------
  |  Branch (576:9): [True: 0, False: 14.3k]
  ------------------
  577|      0|        && !OSSL_PARAM_set_octet_string_or_ptr(p->updiv, ctx->iv, ctx->ivlen)) {
  ------------------
  |  Branch (577:12): [True: 0, False: 0]
  ------------------
  578|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  579|      0|        return 0;
  580|      0|    }
  581|       |
  582|  14.3k|    if (p->num != NULL && !OSSL_PARAM_set_uint(p->num, ctx->num)) {
  ------------------
  |  Branch (582:9): [True: 0, False: 14.3k]
  |  Branch (582:27): [True: 0, False: 0]
  ------------------
  583|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  584|      0|        return 0;
  585|      0|    }
  586|       |
  587|  14.3k|    if (p->keylen != NULL && !OSSL_PARAM_set_size_t(p->keylen, ctx->keylen)) {
  ------------------
  |  Branch (587:9): [True: 7.17k, False: 7.17k]
  |  Branch (587:30): [True: 0, False: 7.17k]
  ------------------
  588|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  589|      0|        return 0;
  590|      0|    }
  591|       |
  592|  14.3k|    if (p->tlsmac != NULL
  ------------------
  |  Branch (592:9): [True: 0, False: 14.3k]
  ------------------
  593|      0|        && !OSSL_PARAM_set_octet_ptr(p->tlsmac, ctx->tlsmac, ctx->tlsmacsize)) {
  ------------------
  |  Branch (593:12): [True: 0, False: 0]
  ------------------
  594|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  595|      0|        return 0;
  596|      0|    }
  597|  14.3k|    return 1;
  598|  14.3k|}
ossl_cipher_generic_get_ctx_params:
  601|  14.3k|{
  602|  14.3k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
  603|  14.3k|    struct ossl_cipher_get_ctx_param_list_st p;
  604|       |
  605|  14.3k|    if (ctx == NULL || !cipher_generic_get_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (605:9): [True: 0, False: 14.3k]
  |  Branch (605:24): [True: 0, False: 14.3k]
  ------------------
  606|      0|        return 0;
  607|  14.3k|    return ossl_cipher_common_get_ctx_params(ctx, &p);
  608|  14.3k|}
ossl_cipher_generic_set_ctx_params:
  663|   351k|{
  664|   351k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
  665|   351k|    struct ossl_cipher_set_ctx_param_list_st p;
  666|       |
  667|   351k|    if (ossl_param_is_empty(params))
  ------------------
  |  Branch (667:9): [True: 351k, False: 0]
  ------------------
  668|   351k|        return 1;
  669|       |
  670|      0|    if (ctx == NULL || !cipher_generic_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (670:9): [True: 0, False: 0]
  |  Branch (670:24): [True: 0, False: 0]
  ------------------
  671|      0|        return 0;
  672|      0|    return ossl_cipher_common_set_ctx_params(ctx, &p);
  673|      0|}
ossl_cipher_generic_initiv:
  677|   121k|{
  678|   121k|    if (ivlen != ctx->ivlen
  ------------------
  |  Branch (678:9): [True: 0, False: 121k]
  ------------------
  679|   121k|        || ivlen > sizeof(ctx->iv)) {
  ------------------
  |  Branch (679:12): [True: 0, False: 121k]
  ------------------
  680|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_IV_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  681|      0|        return 0;
  682|      0|    }
  683|   121k|    ctx->iv_set = 1;
  684|   121k|    memcpy(ctx->iv, iv, ivlen);
  685|   121k|    memcpy(ctx->oiv, iv, ivlen);
  686|   121k|    return 1;
  687|   121k|}
ossl_cipher_generic_initkey:
  693|  7.17k|{
  694|  7.17k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
  695|       |
  696|  7.17k|    if ((flags & PROV_CIPHER_FLAG_INVERSE_CIPHER) != 0)
  ------------------
  |  |   46|  7.17k|#define PROV_CIPHER_FLAG_INVERSE_CIPHER 0x0200
  ------------------
  |  Branch (696:9): [True: 0, False: 7.17k]
  ------------------
  697|      0|        ctx->inverse_cipher = 1;
  698|  7.17k|    if ((flags & PROV_CIPHER_FLAG_VARIABLE_LENGTH) != 0)
  ------------------
  |  |   45|  7.17k|#define PROV_CIPHER_FLAG_VARIABLE_LENGTH 0x0100
  ------------------
  |  Branch (698:9): [True: 0, False: 7.17k]
  ------------------
  699|      0|        ctx->variable_keylength = 1;
  700|       |
  701|  7.17k|    ctx->pad = 1;
  702|  7.17k|    ctx->keylen = ((kbits) / 8);
  703|  7.17k|    ctx->ivlen = ((ivbits) / 8);
  704|  7.17k|    ctx->hw = hw;
  705|  7.17k|    ctx->mode = mode;
  706|  7.17k|    ctx->blocksize = blkbits / 8;
  707|  7.17k|    if (provctx != NULL)
  ------------------
  |  Branch (707:9): [True: 7.17k, False: 0]
  ------------------
  708|  7.17k|        ctx->libctx = PROV_LIBCTX_OF(provctx); /* used for rand */
  ------------------
  |  |   31|  7.17k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  709|  7.17k|}
ciphercommon.c:cipher_generic_init_internal:
  155|   351k|{
  156|   351k|    ctx->num = 0;
  157|   351k|    ctx->bufsz = 0;
  158|   351k|    ctx->updated = 0;
  159|   351k|    ctx->enc = enc ? 1 : 0;
  ------------------
  |  Branch (159:16): [True: 351k, False: 0]
  ------------------
  160|       |
  161|   351k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (161:9): [True: 0, False: 351k]
  ------------------
  162|      0|        return 0;
  163|       |
  164|   351k|    if (iv != NULL && ctx->mode != EVP_CIPH_ECB_MODE) {
  ------------------
  |  |  210|   121k|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  |  Branch (164:9): [True: 121k, False: 229k]
  |  Branch (164:23): [True: 121k, False: 0]
  ------------------
  165|   121k|        if (!ossl_cipher_generic_initiv(ctx, iv, ivlen))
  ------------------
  |  Branch (165:13): [True: 0, False: 121k]
  ------------------
  166|      0|            return 0;
  167|   121k|    }
  168|   351k|    if (iv == NULL && ctx->iv_set
  ------------------
  |  Branch (168:9): [True: 229k, False: 121k]
  |  Branch (168:23): [True: 114k, False: 114k]
  ------------------
  169|   114k|        && (ctx->mode == EVP_CIPH_CBC_MODE
  ------------------
  |  |  211|   229k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  |  Branch (169:13): [True: 0, False: 114k]
  ------------------
  170|   114k|            || ctx->mode == EVP_CIPH_CFB_MODE
  ------------------
  |  |  212|   229k|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  |  Branch (170:16): [True: 0, False: 114k]
  ------------------
  171|   114k|            || ctx->mode == EVP_CIPH_OFB_MODE))
  ------------------
  |  |  213|   114k|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  |  Branch (171:16): [True: 0, False: 114k]
  ------------------
  172|       |        /* reset IV for these modes to keep compatibility with 1.1.1 */
  173|      0|        memcpy(ctx->iv, ctx->oiv, ctx->ivlen);
  174|       |
  175|   351k|    if (key != NULL) {
  ------------------
  |  Branch (175:9): [True: 236k, False: 114k]
  ------------------
  176|   236k|        if (ctx->variable_keylength == 0) {
  ------------------
  |  Branch (176:13): [True: 236k, False: 0]
  ------------------
  177|   236k|            if (keylen != ctx->keylen) {
  ------------------
  |  Branch (177:17): [True: 0, False: 236k]
  ------------------
  178|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  179|      0|                return 0;
  180|      0|            }
  181|   236k|        } else {
  182|      0|            ctx->keylen = keylen;
  183|      0|        }
  184|   236k|        if (!ctx->hw->init(ctx, key, ctx->keylen))
  ------------------
  |  Branch (184:13): [True: 0, False: 236k]
  ------------------
  185|      0|            return 0;
  186|   236k|        ctx->key_set = 1;
  187|   236k|    }
  188|   351k|    return ossl_cipher_generic_set_ctx_params(ctx, params);
  189|   351k|}

ciphercommon.c:ossl_cipher_generic_get_params_decoder:
   47|   117k|{
   48|   117k|    const char *s;
   49|       |
   50|   117k|    memset(r, 0, sizeof(*r));
   51|   117k|    if (p != NULL)
  ------------------
  |  Branch (51:9): [True: 117k, False: 0]
  ------------------
   52|   237k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (52:16): [True: 119k, False: 117k]
  ------------------
   53|   119k|            switch(s[0]) {
   54|   117k|            default:
  ------------------
  |  Branch (54:13): [True: 117k, False: 1.30k]
  ------------------
   55|   117k|                break;
   56|   117k|            case 'a':
  ------------------
  |  Branch (56:13): [True: 130, False: 118k]
  ------------------
   57|    130|                if (ossl_likely(strcmp("ead", s + 1) == 0)) {
  ------------------
  |  |   22|    130|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 130, False: 0]
  |  |  ------------------
  ------------------
   58|       |                    /* OSSL_CIPHER_PARAM_AEAD */
   59|    130|                    if (ossl_unlikely(r->aead != NULL)) {
  ------------------
  |  |   23|    130|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 130]
  |  |  ------------------
  ------------------
   60|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   61|      0|                                       "param %s is repeated", s);
   62|      0|                        return 0;
   63|      0|                    }
   64|    130|                    r->aead = (OSSL_PARAM *)p;
   65|    130|                }
   66|    130|                break;
   67|    130|            case 'b':
  ------------------
  |  Branch (67:13): [True: 130, False: 118k]
  ------------------
   68|    130|                if (ossl_likely(strcmp("locksize", s + 1) == 0)) {
  ------------------
  |  |   22|    130|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 130, False: 0]
  |  |  ------------------
  ------------------
   69|       |                    /* OSSL_CIPHER_PARAM_BLOCK_SIZE */
   70|    130|                    if (ossl_unlikely(r->bsize != NULL)) {
  ------------------
  |  |   23|    130|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 130]
  |  |  ------------------
  ------------------
   71|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   72|      0|                                       "param %s is repeated", s);
   73|      0|                        return 0;
   74|      0|                    }
   75|    130|                    r->bsize = (OSSL_PARAM *)p;
   76|    130|                }
   77|    130|                break;
   78|    260|            case 'c':
  ------------------
  |  Branch (78:13): [True: 260, False: 118k]
  ------------------
   79|    260|                switch(s[1]) {
   80|      0|                default:
  ------------------
  |  Branch (80:17): [True: 0, False: 260]
  ------------------
   81|      0|                    break;
   82|    130|                case 't':
  ------------------
  |  Branch (82:17): [True: 130, False: 130]
  ------------------
   83|    130|                    if (ossl_likely(strcmp("s", s + 2) == 0)) {
  ------------------
  |  |   22|    130|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 130, False: 0]
  |  |  ------------------
  ------------------
   84|       |                        /* OSSL_CIPHER_PARAM_CTS */
   85|    130|                        if (ossl_unlikely(r->cts != NULL)) {
  ------------------
  |  |   23|    130|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 130]
  |  |  ------------------
  ------------------
   86|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   87|      0|                                           "param %s is repeated", s);
   88|      0|                            return 0;
   89|      0|                        }
   90|    130|                        r->cts = (OSSL_PARAM *)p;
   91|    130|                    }
   92|    130|                    break;
   93|    130|                case 'u':
  ------------------
  |  Branch (93:17): [True: 130, False: 130]
  ------------------
   94|    130|                    if (ossl_likely(strcmp("stom-iv", s + 2) == 0)) {
  ------------------
  |  |   22|    130|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 130, False: 0]
  |  |  ------------------
  ------------------
   95|       |                        /* OSSL_CIPHER_PARAM_CUSTOM_IV */
   96|    130|                        if (ossl_unlikely(r->custiv != NULL)) {
  ------------------
  |  |   23|    130|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 130]
  |  |  ------------------
  ------------------
   97|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   98|      0|                                           "param %s is repeated", s);
   99|      0|                            return 0;
  100|      0|                        }
  101|    130|                        r->custiv = (OSSL_PARAM *)p;
  102|    130|                    }
  103|    260|                }
  104|    260|                break;
  105|    260|            case 'e':
  ------------------
  |  Branch (105:13): [True: 130, False: 118k]
  ------------------
  106|    130|                if (ossl_likely(strcmp("ncrypt-then-mac", s + 1) == 0)) {
  ------------------
  |  |   22|    130|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 130, False: 0]
  |  |  ------------------
  ------------------
  107|       |                    /* OSSL_CIPHER_PARAM_ENCRYPT_THEN_MAC */
  108|    130|                    if (ossl_unlikely(r->etm != NULL)) {
  ------------------
  |  |   23|    130|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 130]
  |  |  ------------------
  ------------------
  109|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  110|      0|                                       "param %s is repeated", s);
  111|      0|                        return 0;
  112|      0|                    }
  113|    130|                    r->etm = (OSSL_PARAM *)p;
  114|    130|                }
  115|    130|                break;
  116|    130|            case 'h':
  ------------------
  |  Branch (116:13): [True: 130, False: 118k]
  ------------------
  117|    130|                if (ossl_likely(strcmp("as-randkey", s + 1) == 0)) {
  ------------------
  |  |   22|    130|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 130, False: 0]
  |  |  ------------------
  ------------------
  118|       |                    /* OSSL_CIPHER_PARAM_HAS_RAND_KEY */
  119|    130|                    if (ossl_unlikely(r->rand != NULL)) {
  ------------------
  |  |   23|    130|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 130]
  |  |  ------------------
  ------------------
  120|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  121|      0|                                       "param %s is repeated", s);
  122|      0|                        return 0;
  123|      0|                    }
  124|    130|                    r->rand = (OSSL_PARAM *)p;
  125|    130|                }
  126|    130|                break;
  127|    130|            case 'i':
  ------------------
  |  Branch (127:13): [True: 130, False: 118k]
  ------------------
  128|    130|                if (ossl_likely(strcmp("vlen", s + 1) == 0)) {
  ------------------
  |  |   22|    130|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 130, False: 0]
  |  |  ------------------
  ------------------
  129|       |                    /* OSSL_CIPHER_PARAM_IVLEN */
  130|    130|                    if (ossl_unlikely(r->ivlen != NULL)) {
  ------------------
  |  |   23|    130|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 130]
  |  |  ------------------
  ------------------
  131|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  132|      0|                                       "param %s is repeated", s);
  133|      0|                        return 0;
  134|      0|                    }
  135|    130|                    r->ivlen = (OSSL_PARAM *)p;
  136|    130|                }
  137|    130|                break;
  138|    130|            case 'k':
  ------------------
  |  Branch (138:13): [True: 130, False: 118k]
  ------------------
  139|    130|                if (ossl_likely(strcmp("eylen", s + 1) == 0)) {
  ------------------
  |  |   22|    130|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 130, False: 0]
  |  |  ------------------
  ------------------
  140|       |                    /* OSSL_CIPHER_PARAM_KEYLEN */
  141|    130|                    if (ossl_unlikely(r->keylen != NULL)) {
  ------------------
  |  |   23|    130|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 130]
  |  |  ------------------
  ------------------
  142|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  143|      0|                                       "param %s is repeated", s);
  144|      0|                        return 0;
  145|      0|                    }
  146|    130|                    r->keylen = (OSSL_PARAM *)p;
  147|    130|                }
  148|    130|                break;
  149|    130|            case 'm':
  ------------------
  |  Branch (149:13): [True: 130, False: 118k]
  ------------------
  150|    130|                if (ossl_likely(strcmp("ode", s + 1) == 0)) {
  ------------------
  |  |   22|    130|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 130, False: 0]
  |  |  ------------------
  ------------------
  151|       |                    /* OSSL_CIPHER_PARAM_MODE */
  152|    130|                    if (ossl_unlikely(r->mode != NULL)) {
  ------------------
  |  |   23|    130|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 130]
  |  |  ------------------
  ------------------
  153|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  154|      0|                                       "param %s is repeated", s);
  155|      0|                        return 0;
  156|      0|                    }
  157|    130|                    r->mode = (OSSL_PARAM *)p;
  158|    130|                }
  159|    130|                break;
  160|    130|            case 't':
  ------------------
  |  Branch (160:13): [True: 130, False: 118k]
  ------------------
  161|    130|                if (ossl_likely(strcmp("ls-multi", s + 1) == 0)) {
  ------------------
  |  |   22|    130|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 130, False: 0]
  |  |  ------------------
  ------------------
  162|       |                    /* OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK */
  163|    130|                    if (ossl_unlikely(r->mb != NULL)) {
  ------------------
  |  |   23|    130|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 130]
  |  |  ------------------
  ------------------
  164|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  165|      0|                                       "param %s is repeated", s);
  166|      0|                        return 0;
  167|      0|                    }
  168|    130|                    r->mb = (OSSL_PARAM *)p;
  169|    130|                }
  170|   119k|            }
  171|   117k|    return 1;
  172|   117k|}
ciphercommon.c:cipher_generic_get_ctx_params_decoder:
  205|  14.3k|{
  206|  14.3k|    const char *s;
  207|       |
  208|  14.3k|    memset(r, 0, sizeof(*r));
  209|  14.3k|    if (p != NULL)
  ------------------
  |  Branch (209:9): [True: 14.3k, False: 0]
  ------------------
  210|  28.6k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (210:16): [True: 14.3k, False: 14.3k]
  ------------------
  211|  14.3k|            switch(s[0]) {
  212|      0|            default:
  ------------------
  |  Branch (212:13): [True: 0, False: 14.3k]
  ------------------
  213|      0|                break;
  214|  7.17k|            case 'i':
  ------------------
  |  Branch (214:13): [True: 7.17k, False: 7.17k]
  ------------------
  215|  7.17k|                switch(s[1]) {
  216|      0|                default:
  ------------------
  |  Branch (216:17): [True: 0, False: 7.17k]
  ------------------
  217|      0|                    break;
  218|  7.17k|                case 'v':
  ------------------
  |  Branch (218:17): [True: 7.17k, False: 0]
  ------------------
  219|  7.17k|                    switch(s[2]) {
  220|      0|                    default:
  ------------------
  |  Branch (220:21): [True: 0, False: 7.17k]
  ------------------
  221|      0|                        break;
  222|  7.17k|                    case 'l':
  ------------------
  |  Branch (222:21): [True: 7.17k, False: 0]
  ------------------
  223|  7.17k|                        if (ossl_likely(strcmp("en", s + 3) == 0)) {
  ------------------
  |  |   22|  7.17k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 7.17k, False: 0]
  |  |  ------------------
  ------------------
  224|       |                            /* OSSL_CIPHER_PARAM_IVLEN */
  225|  7.17k|                            if (ossl_unlikely(r->ivlen != NULL)) {
  ------------------
  |  |   23|  7.17k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7.17k]
  |  |  ------------------
  ------------------
  226|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  227|      0|                                               "param %s is repeated", s);
  228|      0|                                return 0;
  229|      0|                            }
  230|  7.17k|                            r->ivlen = (OSSL_PARAM *)p;
  231|  7.17k|                        }
  232|  7.17k|                        break;
  233|  7.17k|                    case '\0':
  ------------------
  |  Branch (233:21): [True: 0, False: 7.17k]
  ------------------
  234|      0|                        if (ossl_unlikely(r->iv != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  235|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  236|      0|                                           "param %s is repeated", s);
  237|      0|                            return 0;
  238|      0|                        }
  239|      0|                        r->iv = (OSSL_PARAM *)p;
  240|  7.17k|                    }
  241|  7.17k|                }
  242|  7.17k|                break;
  243|  7.17k|            case 'k':
  ------------------
  |  Branch (243:13): [True: 7.17k, False: 7.17k]
  ------------------
  244|  7.17k|                if (ossl_likely(strcmp("eylen", s + 1) == 0)) {
  ------------------
  |  |   22|  7.17k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 7.17k, False: 0]
  |  |  ------------------
  ------------------
  245|       |                    /* OSSL_CIPHER_PARAM_KEYLEN */
  246|  7.17k|                    if (ossl_unlikely(r->keylen != NULL)) {
  ------------------
  |  |   23|  7.17k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7.17k]
  |  |  ------------------
  ------------------
  247|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  248|      0|                                       "param %s is repeated", s);
  249|      0|                        return 0;
  250|      0|                    }
  251|  7.17k|                    r->keylen = (OSSL_PARAM *)p;
  252|  7.17k|                }
  253|  7.17k|                break;
  254|  7.17k|            case 'n':
  ------------------
  |  Branch (254:13): [True: 0, False: 14.3k]
  ------------------
  255|      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]
  |  |  ------------------
  ------------------
  256|       |                    /* OSSL_CIPHER_PARAM_NUM */
  257|      0|                    if (ossl_unlikely(r->num != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  258|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  259|      0|                                       "param %s is repeated", s);
  260|      0|                        return 0;
  261|      0|                    }
  262|      0|                    r->num = (OSSL_PARAM *)p;
  263|      0|                }
  264|      0|                break;
  265|      0|            case 'p':
  ------------------
  |  Branch (265:13): [True: 0, False: 14.3k]
  ------------------
  266|      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]
  |  |  ------------------
  ------------------
  267|       |                    /* OSSL_CIPHER_PARAM_PADDING */
  268|      0|                    if (ossl_unlikely(r->pad != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  269|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  270|      0|                                       "param %s is repeated", s);
  271|      0|                        return 0;
  272|      0|                    }
  273|      0|                    r->pad = (OSSL_PARAM *)p;
  274|      0|                }
  275|      0|                break;
  276|      0|            case 't':
  ------------------
  |  Branch (276:13): [True: 0, False: 14.3k]
  ------------------
  277|      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]
  |  |  ------------------
  ------------------
  278|       |                    /* OSSL_CIPHER_PARAM_TLS_MAC */
  279|      0|                    if (ossl_unlikely(r->tlsmac != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  280|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  281|      0|                                       "param %s is repeated", s);
  282|      0|                        return 0;
  283|      0|                    }
  284|      0|                    r->tlsmac = (OSSL_PARAM *)p;
  285|      0|                }
  286|      0|                break;
  287|      0|            case 'u':
  ------------------
  |  Branch (287:13): [True: 0, False: 14.3k]
  ------------------
  288|      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]
  |  |  ------------------
  ------------------
  289|       |                    /* OSSL_CIPHER_PARAM_UPDATED_IV */
  290|      0|                    if (ossl_unlikely(r->updiv != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  291|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  292|      0|                                       "param %s is repeated", s);
  293|      0|                        return 0;
  294|      0|                    }
  295|      0|                    r->updiv = (OSSL_PARAM *)p;
  296|      0|                }
  297|  14.3k|            }
  298|  14.3k|    return 1;
  299|  14.3k|}

ossl_cipher_trailingdata:
   65|  7.16k|{
   66|  7.16k|    if (*inlen == 0)
  ------------------
  |  Branch (66:9): [True: 0, False: 7.16k]
  ------------------
   67|      0|        return 1;
   68|       |
   69|  7.16k|    if (*buflen + *inlen > blocksize) {
  ------------------
  |  Branch (69:9): [True: 0, False: 7.16k]
  ------------------
   70|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   71|      0|        return 0;
   72|      0|    }
   73|       |
   74|  7.16k|    memcpy(buf + *buflen, *in, *inlen);
   75|  7.16k|    *buflen += *inlen;
   76|  7.16k|    *inlen = 0;
   77|       |
   78|  7.16k|    return 1;
   79|  7.16k|}
ossl_cipher_padblock:
   83|  7.16k|{
   84|  7.16k|    size_t i;
   85|  7.16k|    unsigned char pad = (unsigned char)(blocksize - *buflen);
   86|       |
   87|  53.8k|    for (i = *buflen; i < blocksize; i++)
  ------------------
  |  Branch (87:23): [True: 46.6k, False: 7.16k]
  ------------------
   88|  46.6k|        buf[i] = pad;
   89|  7.16k|}

ossl_ccm_gettable_ctx_params:
  150|      7|{
  151|      7|    return ossl_cipher_ccm_get_ctx_params_list;
  152|      7|}

ossl_gcm_initctx:
   37|  28.9k|{
   38|  28.9k|    ctx->pad = 1;
   39|  28.9k|    ctx->mode = EVP_CIPH_GCM_MODE;
  ------------------
  |  |  215|  28.9k|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
   40|  28.9k|    ctx->taglen = UNINITIALISED_SIZET;
  ------------------
  |  |   14|  28.9k|#define UNINITIALISED_SIZET ((size_t)-1)
  ------------------
   41|  28.9k|    ctx->tls_aad_len = UNINITIALISED_SIZET;
  ------------------
  |  |   14|  28.9k|#define UNINITIALISED_SIZET ((size_t)-1)
  ------------------
   42|  28.9k|    ctx->ivlen = (EVP_GCM_TLS_FIXED_IV_LEN + EVP_GCM_TLS_EXPLICIT_IV_LEN);
  ------------------
  |  |  371|  28.9k|#define EVP_GCM_TLS_FIXED_IV_LEN 4
  ------------------
                  ctx->ivlen = (EVP_GCM_TLS_FIXED_IV_LEN + EVP_GCM_TLS_EXPLICIT_IV_LEN);
  ------------------
  |  |  373|  28.9k|#define EVP_GCM_TLS_EXPLICIT_IV_LEN 8
  ------------------
   43|  28.9k|    ctx->keylen = keybits / 8;
   44|  28.9k|    ctx->hw = hw;
   45|  28.9k|    ctx->libctx = PROV_LIBCTX_OF(provctx);
  ------------------
  |  |   31|  28.9k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
   46|  28.9k|}
ossl_gcm_einit:
   88|  65.1k|{
   89|  65.1k|    return gcm_init(vctx, key, keylen, iv, ivlen, params, 1);
   90|  65.1k|}
ossl_gcm_dinit:
   95|  61.4k|{
   96|  61.4k|    return gcm_init(vctx, key, keylen, iv, ivlen, params, 0);
   97|  61.4k|}
ossl_gcm_gettable_ctx_params:
  149|      7|{
  150|      7|    return ossl_cipher_gcm_get_ctx_params_list;
  151|      7|}
ossl_gcm_get_ctx_params:
  154|  93.9k|{
  155|  93.9k|    PROV_GCM_CTX *ctx = (PROV_GCM_CTX *)vctx;
  156|  93.9k|    size_t sz;
  157|  93.9k|    struct ossl_cipher_gcm_get_ctx_params_st p;
  158|       |
  159|  93.9k|    if (ctx == NULL || !ossl_cipher_gcm_get_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (159:9): [True: 0, False: 93.9k]
  |  Branch (159:24): [True: 0, False: 93.9k]
  ------------------
  160|      0|        return 0;
  161|       |
  162|  93.9k|    if (p.ivlen != NULL && !OSSL_PARAM_set_size_t(p.ivlen, ctx->ivlen)) {
  ------------------
  |  Branch (162:9): [True: 28.8k, False: 65.1k]
  |  Branch (162:28): [True: 0, False: 28.8k]
  ------------------
  163|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  164|      0|        return 0;
  165|      0|    }
  166|       |
  167|  93.9k|    if (p.keylen != NULL && !OSSL_PARAM_set_size_t(p.keylen, ctx->keylen)) {
  ------------------
  |  Branch (167:9): [True: 28.9k, False: 64.9k]
  |  Branch (167:29): [True: 0, False: 28.9k]
  ------------------
  168|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  169|      0|        return 0;
  170|      0|    }
  171|       |
  172|  93.9k|    if (p.taglen != NULL) {
  ------------------
  |  Branch (172:9): [True: 0, False: 93.9k]
  ------------------
  173|      0|        size_t taglen = (ctx->taglen != UNINITIALISED_SIZET) ? ctx->taglen : GCM_TAG_MAX_SIZE;
  ------------------
  |  |   14|      0|#define UNINITIALISED_SIZET ((size_t)-1)
  ------------------
                      size_t taglen = (ctx->taglen != UNINITIALISED_SIZET) ? ctx->taglen : GCM_TAG_MAX_SIZE;
  ------------------
  |  |   22|      0|#define GCM_TAG_MAX_SIZE 16
  ------------------
  |  Branch (173:25): [True: 0, False: 0]
  ------------------
  174|       |
  175|      0|        if (!OSSL_PARAM_set_size_t(p.taglen, taglen)) {
  ------------------
  |  Branch (175:13): [True: 0, False: 0]
  ------------------
  176|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  177|      0|            return 0;
  178|      0|        }
  179|      0|    }
  180|       |
  181|       |    /*
  182|       |     * Note p.updiv and p.iv are aliases that get the same information,
  183|       |     * so any code changes should be duplicated below.
  184|       |     */
  185|  93.9k|    if (p.iv != NULL) {
  ------------------
  |  Branch (185:9): [True: 0, False: 93.9k]
  ------------------
  186|      0|        if (!on_preupdate_generate_iv(ctx))
  ------------------
  |  Branch (186:13): [True: 0, False: 0]
  ------------------
  187|      0|            return 0;
  188|      0|        if (p.iv->data != NULL && ctx->ivlen > p.iv->data_size) {
  ------------------
  |  Branch (188:13): [True: 0, False: 0]
  |  Branch (188:35): [True: 0, False: 0]
  ------------------
  189|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_IV_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  190|      0|            return 0;
  191|      0|        }
  192|      0|        if (!OSSL_PARAM_set_octet_string_or_ptr(p.iv, ctx->iv, ctx->ivlen)) {
  ------------------
  |  Branch (192:13): [True: 0, False: 0]
  ------------------
  193|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  194|      0|            return 0;
  195|      0|        }
  196|      0|    }
  197|  93.9k|    if (p.updiv != NULL) {
  ------------------
  |  Branch (197:9): [True: 0, False: 93.9k]
  ------------------
  198|      0|        if (!on_preupdate_generate_iv(ctx))
  ------------------
  |  Branch (198:13): [True: 0, False: 0]
  ------------------
  199|      0|            return 0;
  200|      0|        if (p.updiv->data != NULL && ctx->ivlen > p.updiv->data_size) {
  ------------------
  |  Branch (200:13): [True: 0, False: 0]
  |  Branch (200:38): [True: 0, False: 0]
  ------------------
  201|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_IV_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  202|      0|            return 0;
  203|      0|        }
  204|      0|        if (!OSSL_PARAM_set_octet_string_or_ptr(p.updiv, ctx->iv, ctx->ivlen)) {
  ------------------
  |  Branch (204:13): [True: 0, False: 0]
  ------------------
  205|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  206|      0|            return 0;
  207|      0|        }
  208|      0|    }
  209|       |
  210|  93.9k|    if (p.pad != NULL && !OSSL_PARAM_set_size_t(p.pad, ctx->tls_aad_pad_sz)) {
  ------------------
  |  Branch (210:9): [True: 0, False: 93.9k]
  |  Branch (210:26): [True: 0, False: 0]
  ------------------
  211|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  212|      0|        return 0;
  213|      0|    }
  214|       |
  215|  93.9k|    if (p.tag != NULL) {
  ------------------
  |  Branch (215:9): [True: 36.1k, False: 57.8k]
  ------------------
  216|  36.1k|        sz = p.tag->data_size;
  217|  36.1k|        if (!ctx->enc || ctx->taglen == UNINITIALISED_SIZET) {
  ------------------
  |  |   14|  36.1k|#define UNINITIALISED_SIZET ((size_t)-1)
  ------------------
  |  Branch (217:13): [True: 0, False: 36.1k]
  |  Branch (217:26): [True: 0, False: 36.1k]
  ------------------
  218|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_TAG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  219|      0|            return 0;
  220|      0|        }
  221|  36.1k|        if (p.tag->data != NULL && (sz > EVP_GCM_TLS_TAG_LEN || sz == 0)) {
  ------------------
  |  |  375|  72.2k|#define EVP_GCM_TLS_TAG_LEN 16
  ------------------
  |  Branch (221:13): [True: 36.1k, False: 0]
  |  Branch (221:37): [True: 0, False: 36.1k]
  |  Branch (221:65): [True: 0, False: 36.1k]
  ------------------
  222|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_TAG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  223|      0|            return 0;
  224|      0|        }
  225|       |
  226|  36.1k|        if (!OSSL_PARAM_set_octet_string(p.tag, ctx->buf, sz)) {
  ------------------
  |  Branch (226:13): [True: 0, False: 36.1k]
  ------------------
  227|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  228|      0|            return 0;
  229|      0|        }
  230|  36.1k|    }
  231|       |
  232|  93.9k|    if (p.ivgen != NULL)
  ------------------
  |  Branch (232:9): [True: 0, False: 93.9k]
  ------------------
  233|      0|        if (p.ivgen->data == NULL
  ------------------
  |  Branch (233:13): [True: 0, False: 0]
  ------------------
  234|      0|            || p.ivgen->data_type != OSSL_PARAM_OCTET_STRING
  ------------------
  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (234:16): [True: 0, False: 0]
  ------------------
  235|      0|            || !getivgen(ctx, p.ivgen->data, p.ivgen->data_size))
  ------------------
  |  Branch (235:16): [True: 0, False: 0]
  ------------------
  236|      0|            return 0;
  237|       |
  238|  93.9k|    if (p.gen != NULL && !OSSL_PARAM_set_uint(p.gen, ctx->iv_gen_rand))
  ------------------
  |  Branch (238:9): [True: 0, False: 93.9k]
  |  Branch (238:26): [True: 0, False: 0]
  ------------------
  239|      0|        return 0;
  240|       |
  241|  93.9k|    return 1;
  242|  93.9k|}
ossl_gcm_set_ctx_params:
  251|   188k|{
  252|   188k|    PROV_GCM_CTX *ctx = (PROV_GCM_CTX *)vctx;
  253|   188k|    size_t sz;
  254|   188k|    void *vp;
  255|   188k|    struct ossl_cipher_gcm_set_ctx_params_st p;
  256|       |
  257|   188k|    if (ctx == NULL || !ossl_cipher_gcm_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (257:9): [True: 0, False: 188k]
  |  Branch (257:24): [True: 0, False: 188k]
  ------------------
  258|      0|        return 0;
  259|       |
  260|   188k|    if (p.tag != NULL) {
  ------------------
  |  Branch (260:9): [True: 32.5k, False: 155k]
  ------------------
  261|  32.5k|        vp = ctx->buf;
  262|  32.5k|        if (!OSSL_PARAM_get_octet_string(p.tag, &vp, EVP_GCM_TLS_TAG_LEN, &sz)) {
  ------------------
  |  |  375|  32.5k|#define EVP_GCM_TLS_TAG_LEN 16
  ------------------
  |  Branch (262:13): [True: 0, False: 32.5k]
  ------------------
  263|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  264|      0|            return 0;
  265|      0|        }
  266|  32.5k|        if (sz == 0 || ctx->enc) {
  ------------------
  |  Branch (266:13): [True: 0, False: 32.5k]
  |  Branch (266:24): [True: 0, False: 32.5k]
  ------------------
  267|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_TAG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  268|      0|            return 0;
  269|      0|        }
  270|  32.5k|        ctx->taglen = sz;
  271|  32.5k|    }
  272|       |
  273|   188k|    if (p.ivlen != NULL) {
  ------------------
  |  Branch (273:9): [True: 28.9k, False: 159k]
  ------------------
  274|  28.9k|        if (!OSSL_PARAM_get_size_t(p.ivlen, &sz)) {
  ------------------
  |  Branch (274:13): [True: 0, False: 28.9k]
  ------------------
  275|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  276|      0|            return 0;
  277|      0|        }
  278|  28.9k|        if (sz == 0 || sz > sizeof(ctx->iv)) {
  ------------------
  |  Branch (278:13): [True: 0, False: 28.9k]
  |  Branch (278:24): [True: 0, False: 28.9k]
  ------------------
  279|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_IV_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  280|      0|            return 0;
  281|      0|        }
  282|  28.9k|        if (ctx->ivlen != sz) {
  ------------------
  |  Branch (282:13): [True: 0, False: 28.9k]
  ------------------
  283|       |            /* If the iv was already set or autogenerated, it is invalid. */
  284|      0|            if (ctx->iv_state != IV_STATE_UNINITIALISED)
  ------------------
  |  |   25|      0|#define IV_STATE_UNINITIALISED 0 /* initial state is not initialized */
  ------------------
  |  Branch (284:17): [True: 0, False: 0]
  ------------------
  285|      0|                ctx->iv_state = IV_STATE_FINISHED;
  ------------------
  |  |   28|      0|#define IV_STATE_FINISHED 3 /* the iv has been used - so don't reuse it */
  ------------------
  286|      0|            ctx->ivlen = sz;
  287|      0|        }
  288|  28.9k|    }
  289|       |
  290|   188k|    if (p.aad != NULL) {
  ------------------
  |  Branch (290:9): [True: 0, False: 188k]
  ------------------
  291|      0|        if (p.aad->data_type != OSSL_PARAM_OCTET_STRING) {
  ------------------
  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (291:13): [True: 0, False: 0]
  ------------------
  292|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  293|      0|            return 0;
  294|      0|        }
  295|      0|        sz = gcm_tls_init(ctx, p.aad->data, p.aad->data_size);
  296|      0|        if (sz == 0) {
  ------------------
  |  Branch (296:13): [True: 0, False: 0]
  ------------------
  297|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_AAD);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  298|      0|            return 0;
  299|      0|        }
  300|      0|        ctx->tls_aad_pad_sz = sz;
  301|      0|    }
  302|       |
  303|   188k|    if (p.fixed != NULL) {
  ------------------
  |  Branch (303:9): [True: 0, False: 188k]
  ------------------
  304|      0|        if (p.fixed->data_type != OSSL_PARAM_OCTET_STRING) {
  ------------------
  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (304:13): [True: 0, False: 0]
  ------------------
  305|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  306|      0|            return 0;
  307|      0|        }
  308|      0|        if (gcm_tls_iv_set_fixed(ctx, p.fixed->data, p.fixed->data_size) == 0) {
  ------------------
  |  Branch (308:13): [True: 0, False: 0]
  ------------------
  309|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  310|      0|            return 0;
  311|      0|        }
  312|      0|    }
  313|       |
  314|   188k|    if (p.inviv != NULL)
  ------------------
  |  Branch (314:9): [True: 0, False: 188k]
  ------------------
  315|      0|        if (p.inviv->data == NULL
  ------------------
  |  Branch (315:13): [True: 0, False: 0]
  ------------------
  316|      0|            || p.inviv->data_type != OSSL_PARAM_OCTET_STRING
  ------------------
  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (316:16): [True: 0, False: 0]
  ------------------
  317|      0|            || !setivinv(ctx, p.inviv->data, p.inviv->data_size))
  ------------------
  |  Branch (317:16): [True: 0, False: 0]
  ------------------
  318|      0|            return 0;
  319|       |
  320|   188k|    return 1;
  321|   188k|}
ossl_gcm_stream_update:
  325|   137k|{
  326|   137k|    PROV_GCM_CTX *ctx = (PROV_GCM_CTX *)vctx;
  327|       |
  328|   137k|    if (inl == 0) {
  ------------------
  |  Branch (328:9): [True: 0, False: 137k]
  ------------------
  329|      0|        *outl = 0;
  330|      0|        return 1;
  331|      0|    }
  332|       |
  333|   137k|    if (outsize < inl) {
  ------------------
  |  Branch (333:9): [True: 0, False: 137k]
  ------------------
  334|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  335|      0|        return 0;
  336|      0|    }
  337|       |
  338|   137k|    if (gcm_cipher_internal(ctx, out, outl, in, inl) <= 0) {
  ------------------
  |  Branch (338:9): [True: 0, False: 137k]
  ------------------
  339|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  340|      0|        return 0;
  341|      0|    }
  342|   137k|    return 1;
  343|   137k|}
ossl_gcm_stream_final:
  347|  68.6k|{
  348|  68.6k|    PROV_GCM_CTX *ctx = (PROV_GCM_CTX *)vctx;
  349|  68.6k|    int i;
  350|       |
  351|  68.6k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (351:9): [True: 0, False: 68.6k]
  ------------------
  352|      0|        return 0;
  353|       |
  354|  68.6k|    i = gcm_cipher_internal(ctx, out, outl, NULL, 0);
  355|  68.6k|    if (i <= 0)
  ------------------
  |  Branch (355:9): [True: 0, False: 68.6k]
  ------------------
  356|      0|        return 0;
  357|       |
  358|  68.6k|    *outl = 0;
  359|  68.6k|    return 1;
  360|  68.6k|}
ciphercommon_gcm.c:gcm_init:
   54|   126k|{
   55|   126k|    PROV_GCM_CTX *ctx = (PROV_GCM_CTX *)vctx;
   56|       |
   57|   126k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (57:9): [True: 0, False: 126k]
  ------------------
   58|      0|        return 0;
   59|       |
   60|   126k|    ctx->enc = enc;
   61|       |
   62|   126k|    if (iv != NULL) {
  ------------------
  |  Branch (62:9): [True: 68.6k, False: 57.9k]
  ------------------
   63|  68.6k|        if (ivlen == 0 || ivlen > sizeof(ctx->iv)) {
  ------------------
  |  Branch (63:13): [True: 0, False: 68.6k]
  |  Branch (63:27): [True: 0, False: 68.6k]
  ------------------
   64|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_IV_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   65|      0|            return 0;
   66|      0|        }
   67|  68.6k|        ctx->iv_gen_rand = 0;
   68|  68.6k|        ctx->ivlen = ivlen;
   69|  68.6k|        memcpy(ctx->iv, iv, ivlen);
   70|  68.6k|        ctx->iv_state = IV_STATE_BUFFERED;
  ------------------
  |  |   26|  68.6k|#define IV_STATE_BUFFERED 1 /* iv has been copied to the iv buffer */
  ------------------
   71|  68.6k|    }
   72|       |
   73|   126k|    if (key != NULL) {
  ------------------
  |  Branch (73:9): [True: 28.9k, False: 97.6k]
  ------------------
   74|  28.9k|        if (keylen != ctx->keylen) {
  ------------------
  |  Branch (74:13): [True: 0, False: 28.9k]
  ------------------
   75|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   76|      0|            return 0;
   77|      0|        }
   78|  28.9k|        if (!ctx->hw->setkey(ctx, key, ctx->keylen))
  ------------------
  |  Branch (78:13): [True: 0, False: 28.9k]
  ------------------
   79|      0|            return 0;
   80|  28.9k|        ctx->tls_enc_records = 0;
   81|  28.9k|    }
   82|   126k|    return ossl_gcm_set_ctx_params(ctx, params);
   83|   126k|}
ciphercommon_gcm.c:gcm_cipher_internal:
  425|   205k|{
  426|   205k|    size_t olen = 0;
  427|   205k|    int rv = 0;
  428|   205k|    const PROV_GCM_HW *hw = ctx->hw;
  429|       |
  430|   205k|    if (ctx->tls_aad_len != UNINITIALISED_SIZET)
  ------------------
  |  |   14|   205k|#define UNINITIALISED_SIZET ((size_t)-1)
  ------------------
  |  Branch (430:9): [True: 0, False: 205k]
  ------------------
  431|      0|        return gcm_tls_cipher(ctx, out, padlen, in, len);
  432|       |
  433|   205k|    if (!ctx->key_set || ctx->iv_state == IV_STATE_FINISHED)
  ------------------
  |  |   28|   205k|#define IV_STATE_FINISHED 3 /* the iv has been used - so don't reuse it */
  ------------------
  |  Branch (433:9): [True: 0, False: 205k]
  |  Branch (433:26): [True: 0, False: 205k]
  ------------------
  434|      0|        goto err;
  435|       |
  436|       |    /*
  437|       |     * FIPS requires generation of AES-GCM IV's inside the FIPS module.
  438|       |     * The IV can still be set externally (the security policy will state that
  439|       |     * this is not FIPS compliant). There are some applications
  440|       |     * where setting the IV externally is the only option available.
  441|       |     */
  442|   205k|    if (ctx->iv_state == IV_STATE_UNINITIALISED) {
  ------------------
  |  |   25|   205k|#define IV_STATE_UNINITIALISED 0 /* initial state is not initialized */
  ------------------
  |  Branch (442:9): [True: 0, False: 205k]
  ------------------
  443|      0|        if (!ctx->enc || !gcm_iv_generate(ctx, 0))
  ------------------
  |  Branch (443:13): [True: 0, False: 0]
  |  Branch (443:26): [True: 0, False: 0]
  ------------------
  444|      0|            goto err;
  445|      0|    }
  446|       |
  447|   205k|    if (ctx->iv_state == IV_STATE_BUFFERED) {
  ------------------
  |  |   26|   205k|#define IV_STATE_BUFFERED 1 /* iv has been copied to the iv buffer */
  ------------------
  |  Branch (447:9): [True: 68.6k, False: 137k]
  ------------------
  448|  68.6k|        if (!hw->setiv(ctx, ctx->iv, ctx->ivlen))
  ------------------
  |  Branch (448:13): [True: 0, False: 68.6k]
  ------------------
  449|      0|            goto err;
  450|  68.6k|        ctx->iv_state = IV_STATE_COPIED;
  ------------------
  |  |   27|  68.6k|#define IV_STATE_COPIED 2 /* iv has been copied from the iv buffer */
  ------------------
  451|  68.6k|    }
  452|       |
  453|   205k|    if (in != NULL) {
  ------------------
  |  Branch (453:9): [True: 137k, False: 68.6k]
  ------------------
  454|       |        /*  The input is AAD if out is NULL */
  455|   137k|        if (out == NULL) {
  ------------------
  |  Branch (455:13): [True: 68.6k, False: 68.6k]
  ------------------
  456|  68.6k|            if (!hw->aadupdate(ctx, in, len))
  ------------------
  |  Branch (456:17): [True: 0, False: 68.6k]
  ------------------
  457|      0|                goto err;
  458|  68.6k|        } else {
  459|       |            /* The input is ciphertext OR plaintext */
  460|  68.6k|            if (!hw->cipherupdate(ctx, in, len, out))
  ------------------
  |  Branch (460:17): [True: 0, False: 68.6k]
  ------------------
  461|      0|                goto err;
  462|  68.6k|        }
  463|   137k|    } else {
  464|       |        /* The tag must be set before actually decrypting data */
  465|  68.6k|        if (!ctx->enc && ctx->taglen == UNINITIALISED_SIZET) {
  ------------------
  |  |   14|  32.5k|#define UNINITIALISED_SIZET ((size_t)-1)
  ------------------
  |  Branch (465:13): [True: 32.5k, False: 36.1k]
  |  Branch (465:26): [True: 0, False: 32.5k]
  ------------------
  466|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_TAG_NOT_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  467|      0|            goto err;
  468|      0|        }
  469|  68.6k|        if (!hw->cipherfinal(ctx, ctx->buf))
  ------------------
  |  Branch (469:13): [True: 0, False: 68.6k]
  ------------------
  470|      0|            goto err;
  471|  68.6k|        ctx->iv_state = IV_STATE_FINISHED; /* Don't reuse the IV */
  ------------------
  |  |   28|  68.6k|#define IV_STATE_FINISHED 3 /* the iv has been used - so don't reuse it */
  ------------------
  472|  68.6k|        goto finish;
  473|  68.6k|    }
  474|   137k|    olen = len;
  475|   205k|finish:
  476|   205k|    rv = 1;
  477|   205k|err:
  478|   205k|    *padlen = olen;
  479|   205k|    return rv;
  480|   205k|}

ciphercommon_gcm.c:ossl_cipher_gcm_get_ctx_params_decoder:
   45|  93.9k|{
   46|  93.9k|    const char *s;
   47|       |
   48|  93.9k|    memset(r, 0, sizeof(*r));
   49|  93.9k|    if (p != NULL)
  ------------------
  |  Branch (49:9): [True: 93.9k, False: 0]
  ------------------
   50|   187k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (50:16): [True: 93.9k, False: 93.9k]
  ------------------
   51|  93.9k|            switch(s[0]) {
   52|      0|            default:
  ------------------
  |  Branch (52:13): [True: 0, False: 93.9k]
  ------------------
   53|      0|                break;
   54|  28.8k|            case 'i':
  ------------------
  |  Branch (54:13): [True: 28.8k, False: 65.1k]
  ------------------
   55|  28.8k|                switch(s[1]) {
   56|      0|                default:
  ------------------
  |  Branch (56:17): [True: 0, False: 28.8k]
  ------------------
   57|      0|                    break;
   58|  28.8k|                case 'v':
  ------------------
  |  Branch (58:17): [True: 28.8k, False: 0]
  ------------------
   59|  28.8k|                    switch(s[2]) {
   60|      0|                    default:
  ------------------
  |  Branch (60:21): [True: 0, False: 28.8k]
  ------------------
   61|      0|                        break;
   62|      0|                    case '-':
  ------------------
  |  Branch (62:21): [True: 0, False: 28.8k]
  ------------------
   63|      0|                        if (ossl_likely(strcmp("generated", s + 3) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   64|       |                            /* OSSL_CIPHER_PARAM_AEAD_IV_GENERATED */
   65|      0|                            if (ossl_unlikely(r->gen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   66|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   67|      0|                                               "param %s is repeated", s);
   68|      0|                                return 0;
   69|      0|                            }
   70|      0|                            r->gen = (OSSL_PARAM *)p;
   71|      0|                        }
   72|      0|                        break;
   73|  28.8k|                    case 'l':
  ------------------
  |  Branch (73:21): [True: 28.8k, False: 0]
  ------------------
   74|  28.8k|                        if (ossl_likely(strcmp("en", s + 3) == 0)) {
  ------------------
  |  |   22|  28.8k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 28.8k, False: 0]
  |  |  ------------------
  ------------------
   75|       |                            /* OSSL_CIPHER_PARAM_IVLEN */
   76|  28.8k|                            if (ossl_unlikely(r->ivlen != NULL)) {
  ------------------
  |  |   23|  28.8k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 28.8k]
  |  |  ------------------
  ------------------
   77|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   78|      0|                                               "param %s is repeated", s);
   79|      0|                                return 0;
   80|      0|                            }
   81|  28.8k|                            r->ivlen = (OSSL_PARAM *)p;
   82|  28.8k|                        }
   83|  28.8k|                        break;
   84|  28.8k|                    case '\0':
  ------------------
  |  Branch (84:21): [True: 0, False: 28.8k]
  ------------------
   85|      0|                        if (ossl_unlikely(r->iv != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   86|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   87|      0|                                           "param %s is repeated", s);
   88|      0|                            return 0;
   89|      0|                        }
   90|      0|                        r->iv = (OSSL_PARAM *)p;
   91|  28.8k|                    }
   92|  28.8k|                }
   93|  28.8k|                break;
   94|  28.9k|            case 'k':
  ------------------
  |  Branch (94:13): [True: 28.9k, False: 64.9k]
  ------------------
   95|  28.9k|                if (ossl_likely(strcmp("eylen", s + 1) == 0)) {
  ------------------
  |  |   22|  28.9k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 28.9k, False: 0]
  |  |  ------------------
  ------------------
   96|       |                    /* OSSL_CIPHER_PARAM_KEYLEN */
   97|  28.9k|                    if (ossl_unlikely(r->keylen != NULL)) {
  ------------------
  |  |   23|  28.9k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 28.9k]
  |  |  ------------------
  ------------------
   98|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   99|      0|                                       "param %s is repeated", s);
  100|      0|                        return 0;
  101|      0|                    }
  102|  28.9k|                    r->keylen = (OSSL_PARAM *)p;
  103|  28.9k|                }
  104|  28.9k|                break;
  105|  36.1k|            case 't':
  ------------------
  |  Branch (105:13): [True: 36.1k, False: 57.8k]
  ------------------
  106|  36.1k|                switch(s[1]) {
  107|      0|                default:
  ------------------
  |  Branch (107:17): [True: 0, False: 36.1k]
  ------------------
  108|      0|                    break;
  109|  36.1k|                case 'a':
  ------------------
  |  Branch (109:17): [True: 36.1k, False: 0]
  ------------------
  110|  36.1k|                    switch(s[2]) {
  111|      0|                    default:
  ------------------
  |  Branch (111:21): [True: 0, False: 36.1k]
  ------------------
  112|      0|                        break;
  113|  36.1k|                    case 'g':
  ------------------
  |  Branch (113:21): [True: 36.1k, False: 0]
  ------------------
  114|  36.1k|                        switch(s[3]) {
  115|      0|                        default:
  ------------------
  |  Branch (115:25): [True: 0, False: 36.1k]
  ------------------
  116|      0|                            break;
  117|      0|                        case 'l':
  ------------------
  |  Branch (117:25): [True: 0, False: 36.1k]
  ------------------
  118|      0|                            if (ossl_likely(strcmp("en", s + 4) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  119|       |                                /* OSSL_CIPHER_PARAM_AEAD_TAGLEN */
  120|      0|                                if (ossl_unlikely(r->taglen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  121|      0|                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  122|      0|                                                   "param %s is repeated", s);
  123|      0|                                    return 0;
  124|      0|                                }
  125|      0|                                r->taglen = (OSSL_PARAM *)p;
  126|      0|                            }
  127|      0|                            break;
  128|  36.1k|                        case '\0':
  ------------------
  |  Branch (128:25): [True: 36.1k, False: 0]
  ------------------
  129|  36.1k|                            if (ossl_unlikely(r->tag != NULL)) {
  ------------------
  |  |   23|  36.1k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 36.1k]
  |  |  ------------------
  ------------------
  130|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  131|      0|                                               "param %s is repeated", s);
  132|      0|                                return 0;
  133|      0|                            }
  134|  36.1k|                            r->tag = (OSSL_PARAM *)p;
  135|  36.1k|                        }
  136|  36.1k|                    }
  137|  36.1k|                    break;
  138|  36.1k|                case 'l':
  ------------------
  |  Branch (138:17): [True: 0, False: 36.1k]
  ------------------
  139|      0|                    switch(s[2]) {
  140|      0|                    default:
  ------------------
  |  Branch (140:21): [True: 0, False: 0]
  ------------------
  141|      0|                        break;
  142|      0|                    case 's':
  ------------------
  |  Branch (142:21): [True: 0, False: 0]
  ------------------
  143|      0|                        switch(s[3]) {
  144|      0|                        default:
  ------------------
  |  Branch (144:25): [True: 0, False: 0]
  ------------------
  145|      0|                            break;
  146|      0|                        case 'a':
  ------------------
  |  Branch (146:25): [True: 0, False: 0]
  ------------------
  147|      0|                            if (ossl_likely(strcmp("adpad", s + 4) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  148|       |                                /* OSSL_CIPHER_PARAM_AEAD_TLS1_AAD_PAD */
  149|      0|                                if (ossl_unlikely(r->pad != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  150|      0|                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  151|      0|                                                   "param %s is repeated", s);
  152|      0|                                    return 0;
  153|      0|                                }
  154|      0|                                r->pad = (OSSL_PARAM *)p;
  155|      0|                            }
  156|      0|                            break;
  157|      0|                        case 'i':
  ------------------
  |  Branch (157:25): [True: 0, False: 0]
  ------------------
  158|      0|                            if (ossl_likely(strcmp("vgen", s + 4) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  159|       |                                /* OSSL_CIPHER_PARAM_AEAD_TLS1_GET_IV_GEN */
  160|      0|                                if (ossl_unlikely(r->ivgen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  161|      0|                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  162|      0|                                                   "param %s is repeated", s);
  163|      0|                                    return 0;
  164|      0|                                }
  165|      0|                                r->ivgen = (OSSL_PARAM *)p;
  166|      0|                            }
  167|      0|                        }
  168|      0|                    }
  169|  36.1k|                }
  170|  36.1k|                break;
  171|  36.1k|            case 'u':
  ------------------
  |  Branch (171:13): [True: 0, False: 93.9k]
  ------------------
  172|      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]
  |  |  ------------------
  ------------------
  173|       |                    /* OSSL_CIPHER_PARAM_UPDATED_IV */
  174|      0|                    if (ossl_unlikely(r->updiv != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  175|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  176|      0|                                       "param %s is repeated", s);
  177|      0|                        return 0;
  178|      0|                    }
  179|      0|                    r->updiv = (OSSL_PARAM *)p;
  180|      0|                }
  181|  93.9k|            }
  182|  93.9k|    return 1;
  183|  93.9k|}
ciphercommon_gcm.c:ossl_cipher_gcm_set_ctx_params_decoder:
  212|   188k|{
  213|   188k|    const char *s;
  214|       |
  215|   188k|    memset(r, 0, sizeof(*r));
  216|   188k|    if (p != NULL)
  ------------------
  |  Branch (216:9): [True: 61.5k, False: 126k]
  ------------------
  217|   123k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (217:16): [True: 61.5k, False: 61.5k]
  ------------------
  218|  61.5k|            switch(s[0]) {
  219|      0|            default:
  ------------------
  |  Branch (219:13): [True: 0, False: 61.5k]
  ------------------
  220|      0|                break;
  221|  28.9k|            case 'i':
  ------------------
  |  Branch (221:13): [True: 28.9k, False: 32.5k]
  ------------------
  222|  28.9k|                if (ossl_likely(strcmp("vlen", s + 1) == 0)) {
  ------------------
  |  |   22|  28.9k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 28.9k, False: 0]
  |  |  ------------------
  ------------------
  223|       |                    /* OSSL_CIPHER_PARAM_AEAD_IVLEN */
  224|  28.9k|                    if (ossl_unlikely(r->ivlen != NULL)) {
  ------------------
  |  |   23|  28.9k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 28.9k]
  |  |  ------------------
  ------------------
  225|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  226|      0|                                       "param %s is repeated", s);
  227|      0|                        return 0;
  228|      0|                    }
  229|  28.9k|                    r->ivlen = (OSSL_PARAM *)p;
  230|  28.9k|                }
  231|  28.9k|                break;
  232|  32.5k|            case 't':
  ------------------
  |  Branch (232:13): [True: 32.5k, False: 28.9k]
  ------------------
  233|  32.5k|                switch(s[1]) {
  234|      0|                default:
  ------------------
  |  Branch (234:17): [True: 0, False: 32.5k]
  ------------------
  235|      0|                    break;
  236|  32.5k|                case 'a':
  ------------------
  |  Branch (236:17): [True: 32.5k, False: 0]
  ------------------
  237|  32.5k|                    if (ossl_likely(strcmp("g", s + 2) == 0)) {
  ------------------
  |  |   22|  32.5k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 32.5k, False: 0]
  |  |  ------------------
  ------------------
  238|       |                        /* OSSL_CIPHER_PARAM_AEAD_TAG */
  239|  32.5k|                        if (ossl_unlikely(r->tag != NULL)) {
  ------------------
  |  |   23|  32.5k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 32.5k]
  |  |  ------------------
  ------------------
  240|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  241|      0|                                           "param %s is repeated", s);
  242|      0|                            return 0;
  243|      0|                        }
  244|  32.5k|                        r->tag = (OSSL_PARAM *)p;
  245|  32.5k|                    }
  246|  32.5k|                    break;
  247|  32.5k|                case 'l':
  ------------------
  |  Branch (247:17): [True: 0, False: 32.5k]
  ------------------
  248|      0|                    switch(s[2]) {
  249|      0|                    default:
  ------------------
  |  Branch (249:21): [True: 0, False: 0]
  ------------------
  250|      0|                        break;
  251|      0|                    case 's':
  ------------------
  |  Branch (251:21): [True: 0, False: 0]
  ------------------
  252|      0|                        switch(s[3]) {
  253|      0|                        default:
  ------------------
  |  Branch (253:25): [True: 0, False: 0]
  ------------------
  254|      0|                            break;
  255|      0|                        case 'a':
  ------------------
  |  Branch (255:25): [True: 0, False: 0]
  ------------------
  256|      0|                            if (ossl_likely(strcmp("ad", s + 4) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  257|       |                                /* OSSL_CIPHER_PARAM_AEAD_TLS1_AAD */
  258|      0|                                if (ossl_unlikely(r->aad != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  259|      0|                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  260|      0|                                                   "param %s is repeated", s);
  261|      0|                                    return 0;
  262|      0|                                }
  263|      0|                                r->aad = (OSSL_PARAM *)p;
  264|      0|                            }
  265|      0|                            break;
  266|      0|                        case 'i':
  ------------------
  |  Branch (266:25): [True: 0, False: 0]
  ------------------
  267|      0|                            switch(s[4]) {
  268|      0|                            default:
  ------------------
  |  Branch (268:29): [True: 0, False: 0]
  ------------------
  269|      0|                                break;
  270|      0|                            case 'v':
  ------------------
  |  Branch (270:29): [True: 0, False: 0]
  ------------------
  271|      0|                                switch(s[5]) {
  272|      0|                                default:
  ------------------
  |  Branch (272:33): [True: 0, False: 0]
  ------------------
  273|      0|                                    break;
  274|      0|                                case 'f':
  ------------------
  |  Branch (274:33): [True: 0, False: 0]
  ------------------
  275|      0|                                    if (ossl_likely(strcmp("ixed", s + 6) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  276|       |                                        /* OSSL_CIPHER_PARAM_AEAD_TLS1_IV_FIXED */
  277|      0|                                        if (ossl_unlikely(r->fixed != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  278|      0|                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  279|      0|                                                           "param %s is repeated", s);
  280|      0|                                            return 0;
  281|      0|                                        }
  282|      0|                                        r->fixed = (OSSL_PARAM *)p;
  283|      0|                                    }
  284|      0|                                    break;
  285|      0|                                case 'i':
  ------------------
  |  Branch (285:33): [True: 0, False: 0]
  ------------------
  286|      0|                                    if (ossl_likely(strcmp("nv", s + 6) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  287|       |                                        /* OSSL_CIPHER_PARAM_AEAD_TLS1_SET_IV_INV */
  288|      0|                                        if (ossl_unlikely(r->inviv != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  289|      0|                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  290|      0|                                                           "param %s is repeated", s);
  291|      0|                                            return 0;
  292|      0|                                        }
  293|      0|                                        r->inviv = (OSSL_PARAM *)p;
  294|      0|                                    }
  295|      0|                                }
  296|      0|                            }
  297|      0|                        }
  298|      0|                    }
  299|  32.5k|                }
  300|  61.5k|            }
  301|   188k|    return 1;
  302|   188k|}

ossl_gcm_setiv:
   14|  68.6k|{
   15|  68.6k|    CRYPTO_gcm128_setiv(&ctx->gcm, iv, ivlen);
   16|  68.6k|    return 1;
   17|  68.6k|}
ossl_gcm_aad_update:
   21|  68.6k|{
   22|  68.6k|    return CRYPTO_gcm128_aad(&ctx->gcm, aad, aad_len) == 0;
   23|  68.6k|}
ossl_gcm_cipher_final:
   39|  68.6k|{
   40|  68.6k|    if (ctx->enc) {
  ------------------
  |  Branch (40:9): [True: 36.1k, False: 32.5k]
  ------------------
   41|  36.1k|        CRYPTO_gcm128_tag(&ctx->gcm, tag, GCM_TAG_MAX_SIZE);
  ------------------
  |  |   22|  36.1k|#define GCM_TAG_MAX_SIZE 16
  ------------------
   42|  36.1k|        ctx->taglen = GCM_TAG_MAX_SIZE;
  ------------------
  |  |   22|  36.1k|#define GCM_TAG_MAX_SIZE 16
  ------------------
   43|  36.1k|    } else {
   44|  32.5k|        if (CRYPTO_gcm128_finish(&ctx->gcm, tag, ctx->taglen) != 0)
  ------------------
  |  Branch (44:13): [True: 0, False: 32.5k]
  ------------------
   45|      0|            return 0;
   46|  32.5k|    }
   47|  68.6k|    return 1;
   48|  68.6k|}

ossl_cipher_hw_generic_ctr:
  112|   114k|{
  113|   114k|    unsigned int num = dat->num;
  114|       |
  115|   114k|    if (dat->stream.ctr)
  ------------------
  |  Branch (115:9): [True: 114k, False: 0]
  ------------------
  116|   114k|        CRYPTO_ctr128_encrypt_ctr32(in, out, len, dat->ks, dat->iv, dat->buf,
  117|   114k|            &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|   114k|    dat->num = num;
  122|       |
  123|   114k|    return 1;
  124|   114k|}

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

ossl_digest_default_get_params:
   20|     30|{
   21|     30|    struct digest_default_get_params_st p;
   22|       |
   23|     30|    if (!digest_default_get_params_decoder(params, &p))
  ------------------
  |  Branch (23:9): [True: 0, False: 30]
  ------------------
   24|      0|        return 0;
   25|       |
   26|     30|    if (p.bsize != NULL && !OSSL_PARAM_set_size_t(p.bsize, blksz)) {
  ------------------
  |  Branch (26:9): [True: 30, False: 0]
  |  Branch (26:28): [True: 0, False: 30]
  ------------------
   27|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   28|      0|        return 0;
   29|      0|    }
   30|     30|    if (p.size != NULL && !OSSL_PARAM_set_size_t(p.size, paramsz)) {
  ------------------
  |  Branch (30:9): [True: 30, False: 0]
  |  Branch (30:27): [True: 0, False: 30]
  ------------------
   31|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   32|      0|        return 0;
   33|      0|    }
   34|     30|    if (p.xof != NULL
  ------------------
  |  Branch (34:9): [True: 30, False: 0]
  ------------------
   35|     30|        && !OSSL_PARAM_set_int(p.xof, (flags & PROV_DIGEST_FLAG_XOF) != 0)) {
  ------------------
  |  |   19|     30|#define PROV_DIGEST_FLAG_XOF 0x0001
  ------------------
  |  Branch (35:12): [True: 0, False: 30]
  ------------------
   36|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   37|      0|        return 0;
   38|      0|    }
   39|     30|    if (p.aldid != NULL
  ------------------
  |  Branch (39:9): [True: 30, False: 0]
  ------------------
   40|     30|        && !OSSL_PARAM_set_int(p.aldid, (flags & PROV_DIGEST_FLAG_ALGID_ABSENT) != 0)) {
  ------------------
  |  |   20|     30|#define PROV_DIGEST_FLAG_ALGID_ABSENT 0x0002
  ------------------
  |  Branch (40:12): [True: 0, False: 30]
  ------------------
   41|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   42|      0|        return 0;
   43|      0|    }
   44|     30|    return 1;
   45|     30|}

digestcommon.c:digest_default_get_params_decoder:
   35|     30|{
   36|     30|    const char *s;
   37|       |
   38|     30|    memset(r, 0, sizeof(*r));
   39|     30|    if (p != NULL)
  ------------------
  |  Branch (39:9): [True: 30, False: 0]
  ------------------
   40|    150|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (40:16): [True: 120, False: 30]
  ------------------
   41|    120|            switch(s[0]) {
   42|      0|            default:
  ------------------
  |  Branch (42:13): [True: 0, False: 120]
  ------------------
   43|      0|                break;
   44|     30|            case 'a':
  ------------------
  |  Branch (44:13): [True: 30, False: 90]
  ------------------
   45|     30|                if (ossl_likely(strcmp("lgid-absent", s + 1) == 0)) {
  ------------------
  |  |   22|     30|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 30, False: 0]
  |  |  ------------------
  ------------------
   46|       |                    /* OSSL_DIGEST_PARAM_ALGID_ABSENT */
   47|     30|                    if (ossl_unlikely(r->aldid != NULL)) {
  ------------------
  |  |   23|     30|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 30]
  |  |  ------------------
  ------------------
   48|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   49|      0|                                       "param %s is repeated", s);
   50|      0|                        return 0;
   51|      0|                    }
   52|     30|                    r->aldid = (OSSL_PARAM *)p;
   53|     30|                }
   54|     30|                break;
   55|     30|            case 'b':
  ------------------
  |  Branch (55:13): [True: 30, False: 90]
  ------------------
   56|     30|                if (ossl_likely(strcmp("locksize", s + 1) == 0)) {
  ------------------
  |  |   22|     30|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 30, False: 0]
  |  |  ------------------
  ------------------
   57|       |                    /* OSSL_DIGEST_PARAM_BLOCK_SIZE */
   58|     30|                    if (ossl_unlikely(r->bsize != NULL)) {
  ------------------
  |  |   23|     30|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 30]
  |  |  ------------------
  ------------------
   59|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   60|      0|                                       "param %s is repeated", s);
   61|      0|                        return 0;
   62|      0|                    }
   63|     30|                    r->bsize = (OSSL_PARAM *)p;
   64|     30|                }
   65|     30|                break;
   66|     30|            case 's':
  ------------------
  |  Branch (66:13): [True: 30, False: 90]
  ------------------
   67|     30|                if (ossl_likely(strcmp("ize", s + 1) == 0)) {
  ------------------
  |  |   22|     30|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 30, False: 0]
  |  |  ------------------
  ------------------
   68|       |                    /* OSSL_DIGEST_PARAM_SIZE */
   69|     30|                    if (ossl_unlikely(r->size != NULL)) {
  ------------------
  |  |   23|     30|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 30]
  |  |  ------------------
  ------------------
   70|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   71|      0|                                       "param %s is repeated", s);
   72|      0|                        return 0;
   73|      0|                    }
   74|     30|                    r->size = (OSSL_PARAM *)p;
   75|     30|                }
   76|     30|                break;
   77|     30|            case 'x':
  ------------------
  |  Branch (77:13): [True: 30, False: 90]
  ------------------
   78|     30|                if (ossl_likely(strcmp("of", s + 1) == 0)) {
  ------------------
  |  |   22|     30|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 30, False: 0]
  |  |  ------------------
  ------------------
   79|       |                    /* OSSL_DIGEST_PARAM_XOF */
   80|     30|                    if (ossl_unlikely(r->xof != NULL)) {
  ------------------
  |  |   23|     30|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 30]
  |  |  ------------------
  ------------------
   81|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   82|      0|                                       "param %s is repeated", s);
   83|      0|                        return 0;
   84|      0|                    }
   85|     30|                    r->xof = (OSSL_PARAM *)p;
   86|     30|                }
   87|    120|            }
   88|     30|    return 1;
   89|     30|}

ml_dsa_mu_prov.c:mu_get_params:
  136|      1|{
  137|      1|    return ossl_digest_default_get_params(params, SHA3_BLOCKSIZE(256),
  ------------------
  |  |   21|      1|#define SHA3_BLOCKSIZE(bitlen) (KECCAK1600_WIDTH - bitlen * 2) / 8
  |  |  ------------------
  |  |  |  |   18|      1|#define KECCAK1600_WIDTH 1600
  |  |  ------------------
  ------------------
  138|      1|        SHAKE256_SIZE, SHAKE_FLAGS);
  ------------------
  |  |   36|      1|#define SHAKE256_SIZE 64
  ------------------
                      SHAKE256_SIZE, SHAKE_FLAGS);
  ------------------
  |  |   37|      1|#define SHAKE_FLAGS (PROV_DIGEST_FLAG_ALGID_ABSENT)
  |  |  ------------------
  |  |  |  |   20|      1|#define PROV_DIGEST_FLAG_ALGID_ABSENT 0x0002
  |  |  ------------------
  ------------------
  139|      1|}

sha2_prov.c:sha1_set_ctx_params:
   39|  10.8k|{
   40|  10.8k|    struct sha1_set_ctx_params_st p;
   41|  10.8k|    SHA_CTX *ctx = (SHA_CTX *)vctx;
   42|       |
   43|  10.8k|    if (ossl_unlikely(ctx == NULL || !sha1_set_ctx_params_decoder(params, &p)))
  ------------------
  |  |   23|  21.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 10.8k]
  |  |  |  Branch (23:46): [True: 0, False: 10.8k]
  |  |  |  Branch (23:46): [True: 0, False: 10.8k]
  |  |  ------------------
  ------------------
   44|      0|        return 0;
   45|       |
   46|  10.8k|    if (p.ssl3_ms != NULL)
  ------------------
  |  Branch (46:9): [True: 0, False: 10.8k]
  ------------------
   47|      0|        return ossl_sha1_ctrl(ctx, EVP_CTRL_SSL3_MASTER_SECRET,
  ------------------
  |  |  318|      0|#define EVP_CTRL_SSL3_MASTER_SECRET 0x1d
  ------------------
   48|      0|            (int)p.ssl3_ms->data_size, p.ssl3_ms->data);
   49|       |
   50|  10.8k|    return 1;
   51|  10.8k|}

sha2_prov.c:sha1_set_ctx_params_decoder:
   29|  10.8k|{
   30|  10.8k|    const char *s;
   31|       |
   32|  10.8k|    memset(r, 0, sizeof(*r));
   33|  10.8k|    if (p != NULL)
  ------------------
  |  Branch (33:9): [True: 0, False: 10.8k]
  ------------------
   34|      0|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (34:16): [True: 0, False: 0]
  ------------------
   35|      0|            if (ossl_likely(strcmp("ssl3-ms", s + 0) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   36|       |                /* OSSL_DIGEST_PARAM_SSL3_MS */
   37|      0|                if (ossl_unlikely(r->ssl3_ms != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   38|      0|                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   39|      0|                                   "param %s is repeated", s);
   40|      0|                    return 0;
   41|      0|                }
   42|      0|                r->ssl3_ms = (OSSL_PARAM *)p;
   43|      0|            }
   44|  10.8k|    return 1;
   45|  10.8k|}

sha3_prov.c:keccak_update:
  115|   177k|{
  116|   177k|    return ossl_sha3_absorb((KECCAK1600_CTX *)vctx, inp, len);
  117|   177k|}
sha3_prov.c:keccak_final:
  121|  94.3k|{
  122|  94.3k|    int ret = 1;
  123|  94.3k|    KECCAK1600_CTX *ctx = vctx;
  124|       |
  125|  94.3k|    if (ossl_unlikely(!ossl_prov_is_running()))
  ------------------
  |  |   23|  94.3k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 94.3k]
  |  |  ------------------
  ------------------
  126|      0|        return 0;
  127|  94.3k|    if (ossl_unlikely(ctx->md_size == SIZE_MAX)) {
  ------------------
  |  |   23|  94.3k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 94.3k]
  |  |  ------------------
  ------------------
  128|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_DIGEST_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  129|      0|        return 0;
  130|      0|    }
  131|  94.3k|    ret = ossl_sha3_final(ctx, out, ctx->md_size);
  132|  94.3k|    *outl = ctx->md_size;
  133|  94.3k|    return ret;
  134|  94.3k|}
sha3_prov.c:keccak_freectx:
  503|  39.9k|{
  504|  39.9k|    KECCAK1600_CTX *ctx = (KECCAK1600_CTX *)vctx;
  505|       |
  506|  39.9k|    OPENSSL_clear_free(ctx, sizeof(*ctx));
  ------------------
  |  |  130|  39.9k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  507|  39.9k|}
sha3_prov.c:keccak_init:
  100|   159k|{
  101|   159k|    if (ossl_unlikely(!ossl_prov_is_running()))
  ------------------
  |  |   23|   159k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 159k]
  |  |  ------------------
  ------------------
  102|      0|        return 0;
  103|       |    /* The newctx() handles most of the ctx fixed setup. */
  104|   159k|    ossl_sha3_reset((KECCAK1600_CTX *)vctx);
  105|   159k|    return 1;
  106|   159k|}
sha3_prov.c:shake_squeeze:
  138|   196k|{
  139|   196k|    int ret = 1;
  140|   196k|    KECCAK1600_CTX *ctx = vctx;
  141|       |
  142|   196k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (142:9): [True: 0, False: 196k]
  ------------------
  143|      0|        return 0;
  144|   196k|    if (ctx->meth.squeeze == NULL)
  ------------------
  |  Branch (144:9): [True: 0, False: 196k]
  ------------------
  145|      0|        return 0;
  146|   196k|    if (outlen > 0)
  ------------------
  |  Branch (146:9): [True: 196k, False: 0]
  ------------------
  147|   196k|        ret = ossl_sha3_squeeze(ctx, out, outlen);
  148|   196k|    if (outl != NULL)
  ------------------
  |  Branch (148:9): [True: 196k, False: 0]
  ------------------
  149|   196k|        *outl = outlen;
  150|   196k|    return ret;
  151|   196k|}
sha3_prov.c:keccak_init_params:
  109|   141k|{
  110|   141k|    return keccak_init(vctx, NULL)
  ------------------
  |  Branch (110:12): [True: 141k, False: 0]
  ------------------
  111|   141k|        && shake_set_ctx_params(vctx, params);
  ------------------
  |  Branch (111:12): [True: 141k, False: 0]
  ------------------
  112|   141k|}
sha3_prov.c:shake_set_ctx_params:
  692|   217k|{
  693|   217k|    struct shake_set_ctx_params_st p;
  694|   217k|    KECCAK1600_CTX *ctx = (KECCAK1600_CTX *)vctx;
  695|       |
  696|   217k|    if (ossl_unlikely(ctx == NULL || !shake_set_ctx_params_decoder(params, &p)))
  ------------------
  |  |   23|   435k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 217k]
  |  |  |  Branch (23:46): [True: 0, False: 217k]
  |  |  |  Branch (23:46): [True: 0, False: 217k]
  |  |  ------------------
  ------------------
  697|      0|        return 0;
  698|       |
  699|   217k|    if (ossl_unlikely(p.xoflen != NULL
  ------------------
  |  |   23|   293k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 217k]
  |  |  |  Branch (23:46): [True: 76.2k, False: 141k]
  |  |  |  Branch (23:46): [True: 0, False: 76.2k]
  |  |  ------------------
  ------------------
  700|   217k|            && !OSSL_PARAM_get_size_t(p.xoflen, &ctx->md_size))) {
  701|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  702|      0|        return 0;
  703|      0|    }
  704|   217k|    return 1;
  705|   217k|}

sha3_prov.c:shake_set_ctx_params_decoder:
   85|   217k|{
   86|   217k|    const char *s;
   87|       |
   88|   217k|    memset(r, 0, sizeof(*r));
   89|   217k|    if (p != NULL)
  ------------------
  |  Branch (89:9): [True: 76.2k, False: 141k]
  ------------------
   90|   152k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (90:16): [True: 76.2k, False: 76.2k]
  ------------------
   91|  76.2k|            switch(s[0]) {
   92|      0|            default:
  ------------------
  |  Branch (92:13): [True: 0, False: 76.2k]
  ------------------
   93|      0|                break;
   94|      0|            case 's':
  ------------------
  |  Branch (94:13): [True: 0, False: 76.2k]
  ------------------
   95|      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]
  |  |  ------------------
  ------------------
   96|       |                    /* OSSL_DIGEST_PARAM_SIZE */
   97|      0|                    if (ossl_unlikely(r->xoflen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   98|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   99|      0|                                       "param %s is repeated", s);
  100|      0|                        return 0;
  101|      0|                    }
  102|      0|                    r->xoflen = (OSSL_PARAM *)p;
  103|      0|                }
  104|      0|                break;
  105|  76.2k|            case 'x':
  ------------------
  |  Branch (105:13): [True: 76.2k, False: 0]
  ------------------
  106|  76.2k|                if (ossl_likely(strcmp("oflen", s + 1) == 0)) {
  ------------------
  |  |   22|  76.2k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 76.2k, False: 0]
  |  |  ------------------
  ------------------
  107|       |                    /* OSSL_DIGEST_PARAM_XOFLEN */
  108|  76.2k|                    if (ossl_unlikely(r->xoflen != NULL)) {
  ------------------
  |  |   23|  76.2k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 76.2k]
  |  |  ------------------
  ------------------
  109|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  110|      0|                                       "param %s is repeated", s);
  111|      0|                        return 0;
  112|      0|                    }
  113|  76.2k|                    r->xoflen = (OSSL_PARAM *)p;
  114|  76.2k|                }
  115|  76.2k|            }
  116|   217k|    return 1;
  117|   217k|}

decode_der2key.c:PrivateKeyInfo_der2dh_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:der2key_newctx:
  164|   156k|{
  165|   156k|    struct der2key_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|   156k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  166|       |
  167|   156k|    if (ctx != NULL) {
  ------------------
  |  Branch (167:9): [True: 156k, False: 0]
  ------------------
  168|   156k|        ctx->provctx = provctx;
  169|   156k|        ctx->desc = desc;
  170|   156k|    }
  171|   156k|    return ctx;
  172|   156k|}
decode_der2key.c:der2key_decode_p8:
  137|  3.73k|{
  138|  3.73k|    PKCS8_PRIV_KEY_INFO *p8inf = NULL;
  139|  3.73k|    const X509_ALGOR *alg = NULL;
  140|  3.73k|    void *key = NULL;
  141|       |
  142|  3.73k|    if ((p8inf = d2i_PKCS8_PRIV_KEY_INFO(NULL, input_der, input_der_len)) != NULL
  ------------------
  |  Branch (142:9): [True: 3.73k, False: 0]
  ------------------
  143|  3.73k|        && PKCS8_pkey_get0(NULL, NULL, NULL, &alg, p8inf)
  ------------------
  |  Branch (143:12): [True: 3.73k, False: 0]
  ------------------
  144|  3.73k|        && (OBJ_obj2nid(alg->algorithm) == ctx->desc->evp_type
  ------------------
  |  Branch (144:13): [True: 3.73k, False: 0]
  ------------------
  145|       |            /* Allow decoding sm2 private key with id_ecPublicKey */
  146|      0|            || (OBJ_obj2nid(alg->algorithm) == NID_X9_62_id_ecPublicKey
  ------------------
  |  |  178|      0|#define NID_X9_62_id_ecPublicKey                408
  ------------------
  |  Branch (146:17): [True: 0, False: 0]
  ------------------
  147|      0|                && ctx->desc->evp_type == NID_sm2)))
  ------------------
  |  | 1259|      0|#define NID_sm2         1172
  ------------------
  |  Branch (147:20): [True: 0, False: 0]
  ------------------
  148|  3.73k|        key = key_from_pkcs8(p8inf, PROV_LIBCTX_OF(ctx->provctx), ctx->propq);
  ------------------
  |  |   31|  3.73k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  149|  3.73k|    PKCS8_PRIV_KEY_INFO_free(p8inf);
  150|       |
  151|  3.73k|    return key;
  152|  3.73k|}
decode_der2key.c:der2key_freectx:
  197|   156k|{
  198|   156k|    struct der2key_ctx_st *ctx = vctx;
  199|       |
  200|   156k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|   156k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  201|   156k|}
decode_der2key.c:PrivateKeyInfo_der2dh_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:der2key_check_selection:
  205|    138|{
  206|       |    /*
  207|       |     * The selections are kinda sorta "levels", i.e. each selection given
  208|       |     * here is assumed to include those following.
  209|       |     */
  210|    138|    int checks[] = {
  211|    138|        OSSL_KEYMGMT_SELECT_PRIVATE_KEY,
  ------------------
  |  |  646|    138|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  212|    138|        OSSL_KEYMGMT_SELECT_PUBLIC_KEY,
  ------------------
  |  |  647|    138|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  213|    138|        OSSL_KEYMGMT_SELECT_ALL_PARAMETERS
  ------------------
  |  |  653|    138|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  ------------------
  |  |  |  |  648|    138|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  ------------------
  |  |  654|    138|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  ------------------
  |  |  |  |  649|    138|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  ------------------
  ------------------
  214|    138|    };
  215|    138|    size_t i;
  216|       |
  217|       |    /* The decoder implementations made here support guessing */
  218|    138|    if (selection == 0)
  ------------------
  |  Branch (218:9): [True: 0, False: 138]
  ------------------
  219|      0|        return 1;
  220|       |
  221|    207|    for (i = 0; i < OSSL_NELEM(checks); i++) {
  ------------------
  |  |   14|    207|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (221:17): [True: 207, False: 0]
  ------------------
  222|    207|        int check1 = (selection & checks[i]) != 0;
  223|    207|        int check2 = (desc->selection_mask & checks[i]) != 0;
  224|       |
  225|       |        /*
  226|       |         * If the caller asked for the currently checked bit(s), return
  227|       |         * whether the decoder description says it's supported.
  228|       |         */
  229|    207|        if (check1)
  ------------------
  |  Branch (229:13): [True: 138, False: 69]
  ------------------
  230|    138|            return check2;
  231|    207|    }
  232|       |
  233|       |    /* This should be dead code, but just to be safe... */
  234|      0|    return 0;
  235|    138|}
decode_der2key.c:der2key_decode:
  240|  14.6k|{
  241|  14.6k|    struct der2key_ctx_st *ctx = vctx;
  242|  14.6k|    unsigned char *der = NULL;
  243|  14.6k|    const unsigned char *derp;
  244|  14.6k|    long der_len = 0;
  245|  14.6k|    void *key = NULL;
  246|  14.6k|    int ok = 0;
  247|       |
  248|  14.6k|    ctx->selection = selection;
  249|       |    /*
  250|       |     * The caller is allowed to specify 0 as a selection mask, to have the
  251|       |     * structure and key type guessed.  For type-specific structures, this
  252|       |     * is not recommended, as some structures are very similar.
  253|       |     * Note that 0 isn't the same as OSSL_KEYMGMT_SELECT_ALL, as the latter
  254|       |     * signifies a private key structure, where everything else is assumed
  255|       |     * to be present as well.
  256|       |     */
  257|  14.6k|    if (selection == 0)
  ------------------
  |  Branch (257:9): [True: 0, False: 14.6k]
  ------------------
  258|      0|        selection = ctx->desc->selection_mask;
  259|  14.6k|    if ((selection & ctx->desc->selection_mask) == 0) {
  ------------------
  |  Branch (259:9): [True: 0, False: 14.6k]
  ------------------
  260|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  261|      0|        return 0;
  262|      0|    }
  263|       |
  264|  14.6k|    ok = ossl_read_der(ctx->provctx, cin, &der, &der_len);
  265|  14.6k|    if (!ok)
  ------------------
  |  Branch (265:9): [True: 0, False: 14.6k]
  ------------------
  266|      0|        goto next;
  267|       |
  268|  14.6k|    ok = 0; /* Assume that we fail */
  269|       |
  270|  14.6k|    ERR_set_mark();
  271|  14.6k|    if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) {
  ------------------
  |  |  646|  14.6k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (271:9): [True: 3.73k, False: 10.9k]
  ------------------
  272|  3.73k|        derp = der;
  273|  3.73k|        if (ctx->desc->d2i_PKCS8 != NULL) {
  ------------------
  |  Branch (273:13): [True: 3.73k, False: 0]
  ------------------
  274|  3.73k|            key = ctx->desc->d2i_PKCS8(&derp, der_len, ctx);
  275|  3.73k|            if (ctx->flag_fatal) {
  ------------------
  |  Branch (275:17): [True: 0, False: 3.73k]
  ------------------
  276|      0|                ERR_clear_last_mark();
  277|      0|                goto end;
  278|      0|            }
  279|  3.73k|        } else if (ctx->desc->d2i_private_key != NULL) {
  ------------------
  |  Branch (279:20): [True: 0, False: 0]
  ------------------
  280|      0|            key = ctx->desc->d2i_private_key(NULL, &derp, der_len);
  281|      0|        }
  282|  3.73k|        if (key == NULL && ctx->selection != 0) {
  ------------------
  |  Branch (282:13): [True: 0, False: 3.73k]
  |  Branch (282:28): [True: 0, False: 0]
  ------------------
  283|      0|            ERR_clear_last_mark();
  284|      0|            goto next;
  285|      0|        }
  286|  3.73k|    }
  287|  14.6k|    if (key == NULL && (selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) {
  ------------------
  |  |  647|  10.9k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (287:9): [True: 10.9k, False: 3.73k]
  |  Branch (287:24): [True: 10.9k, False: 0]
  ------------------
  288|  10.9k|        derp = der;
  289|  10.9k|        if (ctx->desc->d2i_PUBKEY != NULL)
  ------------------
  |  Branch (289:13): [True: 10.9k, False: 0]
  ------------------
  290|  10.9k|            key = ctx->desc->d2i_PUBKEY(&derp, der_len, ctx);
  291|      0|        else if (ctx->desc->d2i_public_key != NULL)
  ------------------
  |  Branch (291:18): [True: 0, False: 0]
  ------------------
  292|      0|            key = ctx->desc->d2i_public_key(NULL, &derp, der_len);
  293|  10.9k|        if (key == NULL && ctx->selection != 0) {
  ------------------
  |  Branch (293:13): [True: 0, False: 10.9k]
  |  Branch (293:28): [True: 0, False: 0]
  ------------------
  294|      0|            ERR_clear_last_mark();
  295|      0|            goto next;
  296|      0|        }
  297|  10.9k|    }
  298|  14.6k|    if (key == NULL && (selection & OSSL_KEYMGMT_SELECT_ALL_PARAMETERS) != 0) {
  ------------------
  |  |  653|      0|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  ------------------
  |  |  |  |  648|      0|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  ------------------
  |  |  654|      0|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  ------------------
  |  |  |  |  649|      0|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  ------------------
  ------------------
  |  Branch (298:9): [True: 0, False: 14.6k]
  |  Branch (298:24): [True: 0, False: 0]
  ------------------
  299|      0|        derp = der;
  300|      0|        if (ctx->desc->d2i_key_params != NULL)
  ------------------
  |  Branch (300:13): [True: 0, False: 0]
  ------------------
  301|      0|            key = ctx->desc->d2i_key_params(NULL, &derp, der_len);
  302|      0|        if (key == NULL && ctx->selection != 0) {
  ------------------
  |  Branch (302:13): [True: 0, False: 0]
  |  Branch (302:28): [True: 0, False: 0]
  ------------------
  303|      0|            ERR_clear_last_mark();
  304|      0|            goto next;
  305|      0|        }
  306|      0|    }
  307|  14.6k|    if (key == NULL)
  ------------------
  |  Branch (307:9): [True: 0, False: 14.6k]
  ------------------
  308|      0|        ERR_clear_last_mark();
  309|  14.6k|    else
  310|  14.6k|        ERR_pop_to_mark();
  311|       |
  312|       |    /*
  313|       |     * Last minute check to see if this was the correct type of key.  This
  314|       |     * should never lead to a fatal error, i.e. the decoding itself was
  315|       |     * correct, it was just an unexpected key type.  This is generally for
  316|       |     * classes of key types that have subtle variants, like RSA-PSS keys as
  317|       |     * opposed to plain RSA keys.
  318|       |     */
  319|  14.6k|    if (key != NULL
  ------------------
  |  Branch (319:9): [True: 14.6k, False: 0]
  ------------------
  320|  14.6k|        && ctx->desc->check_key != NULL
  ------------------
  |  Branch (320:12): [True: 14.6k, False: 0]
  ------------------
  321|  14.6k|        && !ctx->desc->check_key(key, ctx)) {
  ------------------
  |  Branch (321:12): [True: 0, False: 14.6k]
  ------------------
  322|      0|        ctx->desc->free_key(key);
  323|      0|        key = NULL;
  324|      0|    }
  325|       |
  326|  14.6k|    if (key != NULL && ctx->desc->adjust_key != NULL)
  ------------------
  |  Branch (326:9): [True: 14.6k, False: 0]
  |  Branch (326:24): [True: 14.6k, False: 0]
  ------------------
  327|  14.6k|        ctx->desc->adjust_key(key, ctx);
  328|       |
  329|  14.6k|next:
  330|       |    /*
  331|       |     * Indicated that we successfully decoded something, or not at all.
  332|       |     * Ending up "empty handed" is not an error.
  333|       |     */
  334|  14.6k|    ok = 1;
  335|       |
  336|       |    /*
  337|       |     * We free memory here so it's not held up during the callback, because
  338|       |     * we know the process is recursive and the allocated chunks of memory
  339|       |     * add up.
  340|       |     */
  341|  14.6k|    OPENSSL_free(der);
  ------------------
  |  |  132|  14.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  342|  14.6k|    der = NULL;
  343|       |
  344|  14.6k|    if (key != NULL) {
  ------------------
  |  Branch (344:9): [True: 14.6k, False: 0]
  ------------------
  345|  14.6k|        OSSL_PARAM params[4];
  346|  14.6k|        int object_type = OSSL_OBJECT_PKEY;
  ------------------
  |  |   29|  14.6k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  347|       |
  348|  14.6k|        params[0] = OSSL_PARAM_construct_int(OSSL_OBJECT_PARAM_TYPE, &object_type);
  ------------------
  |  |  370|  14.6k|# define OSSL_OBJECT_PARAM_TYPE "type"
  ------------------
  349|       |
  350|  14.6k|#ifndef OPENSSL_NO_SM2
  351|  14.6k|        if (strcmp(ctx->desc->keytype_name, "EC") == 0
  ------------------
  |  Branch (351:13): [True: 14.6k, False: 0]
  ------------------
  352|  14.6k|            && (EC_KEY_get_flags(key) & EC_FLAG_SM2_RANGE) != 0)
  ------------------
  |  |  962|  14.6k|#define EC_FLAG_SM2_RANGE 0x0004
  ------------------
  |  Branch (352:16): [True: 0, False: 14.6k]
  ------------------
  353|      0|            params[1] = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_TYPE,
  ------------------
  |  |  366|      0|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
  354|      0|                "SM2", 0);
  355|  14.6k|        else
  356|  14.6k|#endif
  357|  14.6k|            params[1] = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_TYPE,
  ------------------
  |  |  366|  14.6k|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
  358|  14.6k|                (char *)ctx->desc->keytype_name,
  359|  14.6k|                0);
  360|       |        /* The address of the key becomes the octet string */
  361|  14.6k|        params[2] = OSSL_PARAM_construct_octet_string(OSSL_OBJECT_PARAM_REFERENCE,
  ------------------
  |  |  369|  14.6k|# define OSSL_OBJECT_PARAM_REFERENCE "reference"
  ------------------
  362|  14.6k|            &key, sizeof(key));
  363|  14.6k|        params[3] = OSSL_PARAM_construct_end();
  364|       |
  365|  14.6k|        ok = data_cb(params, data_cbarg);
  366|  14.6k|    }
  367|       |
  368|  14.6k|end:
  369|  14.6k|    ctx->desc->free_key(key);
  370|  14.6k|    OPENSSL_free(der);
  ------------------
  |  |  132|  14.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  371|       |
  372|  14.6k|    return ok;
  373|  14.6k|}
decode_der2key.c:SubjectPublicKeyInfo_der2dh_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_params_der2dh_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:DH_der2dh_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2dhx_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2dhx_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2dhx_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_params_der2dhx_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:DHX_der2dhx_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2dsa_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2dsa_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2dsa_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_der2dsa_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:type_specific_der2dsa_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:DSA_der2dsa_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:DSA_der2dsa_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ec_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:ec_d2i_PKCS8:
  475|  3.73k|{
  476|  3.73k|    return der2key_decode_p8(der, der_len, ctx,
  477|  3.73k|        (key_from_pkcs8_t *)ossl_ec_key_from_pkcs8);
  478|  3.73k|}
decode_der2key.c:ec_check:
  483|  14.6k|{
  484|       |    /* We're trying to be clever by comparing two truths */
  485|  14.6k|    int ret = 0;
  486|  14.6k|    int sm2 = (EC_KEY_get_flags(key) & EC_FLAG_SM2_RANGE) != 0;
  ------------------
  |  |  962|  14.6k|#define EC_FLAG_SM2_RANGE 0x0004
  ------------------
  487|       |
  488|  14.6k|    if (sm2)
  ------------------
  |  Branch (488:9): [True: 0, False: 14.6k]
  ------------------
  489|      0|        ret = ctx->desc->evp_type == EVP_PKEY_SM2
  ------------------
  |  |   74|      0|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1259|      0|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (489:15): [True: 0, False: 0]
  ------------------
  490|      0|            || ctx->desc->evp_type == NID_X9_62_id_ecPublicKey;
  ------------------
  |  |  178|      0|#define NID_X9_62_id_ecPublicKey                408
  ------------------
  |  Branch (490:16): [True: 0, False: 0]
  ------------------
  491|  14.6k|    else
  492|  14.6k|        ret = ctx->desc->evp_type != EVP_PKEY_SM2;
  ------------------
  |  |   74|  14.6k|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1259|  14.6k|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  493|       |
  494|  14.6k|    return ret;
  495|  14.6k|}
decode_der2key.c:ec_adjust:
  498|  14.6k|{
  499|  14.6k|    ossl_ec_key_set0_libctx(key, PROV_LIBCTX_OF(ctx->provctx));
  ------------------
  |  |   31|  14.6k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  500|  14.6k|}
decode_der2key.c:PrivateKeyInfo_der2ec_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ec_newctx:
 1210|  10.9k|    {                                                                                                                 \
 1211|  10.9k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  10.9k|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ec_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_no_pub_der2ec_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:type_specific_no_pub_der2ec_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:EC_der2ec_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:EC_der2ec_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2x25519_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2x25519_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2x25519_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2x448_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2x448_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2x448_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ed25519_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ed25519_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ed25519_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ed448_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ed448_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ed448_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2sm2_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2sm2_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2sm2_newctx:
 1210|  10.9k|    {                                                                                                                 \
 1211|  10.9k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  10.9k|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2sm2_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_no_pub_der2sm2_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:type_specific_no_pub_der2sm2_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_kem_512_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_kem_512_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_kem_512_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_kem_768_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_kem_768_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_kem_768_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_kem_1024_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_kem_1024_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_kem_1024_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_128s_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_128s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_128f_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_128f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_192s_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_192s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_192f_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_192f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_256s_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_256s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_256f_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_256f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_128s_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_128s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_128f_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_128f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_192s_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_192s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_192f_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_192f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_256s_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_256s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_256f_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_256f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_128s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_128f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_192s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_192f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_256s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_256f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_128s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_128f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_192s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_192f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_256s_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_256f_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2rsa_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2rsa_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2rsa_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_keypair_der2rsa_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:type_specific_keypair_der2rsa_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:RSA_der2rsa_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:RSA_der2rsa_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2rsapss_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2rsapss_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2rsapss_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_dsa_44_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_dsa_44_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_dsa_44_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_dsa_65_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_dsa_65_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_dsa_65_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_dsa_87_newctx:
 1210|  3.73k|    {                                                                                                                 \
 1211|  3.73k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1212|  3.73k|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_dsa_87_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_dsa_87_does_selection:
 1215|      2|    {                                                                                                                 \
 1216|      2|        return der2key_check_selection(selection,                                                                     \
 1217|      2|            &kind##_##keytype##_desc);                                                                                \
 1218|      2|    }                                                                                                                 \

ossl_epki2pki_der_decode:
  124|  3.73k|{
  125|  3.73k|    const unsigned char *pder = der;
  126|  3.73k|    unsigned char *new_der = NULL;
  127|  3.73k|    X509_SIG *p8 = NULL;
  128|  3.73k|    PKCS8_PRIV_KEY_INFO *p8inf = NULL;
  129|  3.73k|    const X509_ALGOR *alg = NULL;
  130|  3.73k|    int ok = 1; /* Assume good */
  131|       |
  132|  3.73k|    ERR_set_mark();
  133|  3.73k|    if ((p8 = d2i_X509_SIG(NULL, &pder, der_len)) != NULL) {
  ------------------
  |  Branch (133:9): [True: 0, False: 3.73k]
  ------------------
  134|      0|        char pbuf[1024];
  135|      0|        size_t plen = 0;
  136|       |
  137|      0|        ERR_clear_last_mark();
  138|       |
  139|      0|        if (!pw_cb(pbuf, sizeof(pbuf), &plen, NULL, pw_cbarg)) {
  ------------------
  |  Branch (139:13): [True: 0, False: 0]
  ------------------
  140|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_GET_PASSPHRASE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  141|      0|            ok = 0;
  142|      0|        } else {
  143|      0|            const ASN1_OCTET_STRING *oct;
  144|      0|            int new_der_len = 0;
  145|       |
  146|      0|            X509_SIG_get0(p8, &alg, &oct);
  147|      0|            if (!PKCS12_pbe_crypt_ex(alg, pbuf, (int)plen,
  ------------------
  |  Branch (147:17): [True: 0, False: 0]
  ------------------
  148|      0|                    oct->data, oct->length,
  149|      0|                    &new_der, &new_der_len, 0,
  150|      0|                    libctx, propq)) {
  151|      0|                ok = 0;
  152|      0|            } else {
  153|      0|                der = new_der;
  154|      0|                der_len = new_der_len;
  155|      0|            }
  156|      0|            alg = NULL;
  157|      0|        }
  158|      0|        X509_SIG_free(p8);
  159|  3.73k|    } else {
  160|  3.73k|        ERR_pop_to_mark();
  161|  3.73k|    }
  162|       |
  163|  3.73k|    ERR_set_mark();
  164|  3.73k|    pder = der;
  165|  3.73k|    p8inf = d2i_PKCS8_PRIV_KEY_INFO(NULL, &pder, der_len);
  166|  3.73k|    ERR_pop_to_mark();
  167|       |
  168|  3.73k|    if (p8inf != NULL && PKCS8_pkey_get0(NULL, NULL, NULL, &alg, p8inf)) {
  ------------------
  |  Branch (168:9): [True: 3.73k, False: 0]
  |  Branch (168:26): [True: 3.73k, False: 0]
  ------------------
  169|       |        /*
  170|       |         * We have something and recognised it as PrivateKeyInfo, so let's
  171|       |         * pass all the applicable data to the callback.
  172|       |         */
  173|  3.73k|        char keytype[OSSL_MAX_NAME_SIZE];
  174|  3.73k|        OSSL_PARAM params[6], *p = params;
  175|  3.73k|        int objtype = OSSL_OBJECT_PKEY;
  ------------------
  |  |   29|  3.73k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  176|       |
  177|  3.73k|        OBJ_obj2txt(keytype, sizeof(keytype), alg->algorithm, 0);
  178|       |
  179|  3.73k|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_TYPE,
  ------------------
  |  |  366|  3.73k|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
  180|  3.73k|            keytype, 0);
  181|  3.73k|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_INPUT_TYPE,
  ------------------
  |  |  368|  3.73k|# define OSSL_OBJECT_PARAM_INPUT_TYPE "input-type"
  ------------------
  182|  3.73k|            "DER", 0);
  183|  3.73k|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_STRUCTURE,
  ------------------
  |  |  365|  3.73k|# define OSSL_OBJECT_PARAM_DATA_STRUCTURE "data-structure"
  ------------------
  184|  3.73k|            "PrivateKeyInfo", 0);
  185|  3.73k|        *p++ = OSSL_PARAM_construct_octet_string(OSSL_OBJECT_PARAM_DATA,
  ------------------
  |  |  364|  3.73k|# define OSSL_OBJECT_PARAM_DATA "data"
  ------------------
  186|  3.73k|            der, der_len);
  187|  3.73k|        *p++ = OSSL_PARAM_construct_int(OSSL_OBJECT_PARAM_TYPE, &objtype);
  ------------------
  |  |  370|  3.73k|# define OSSL_OBJECT_PARAM_TYPE "type"
  ------------------
  188|  3.73k|        *p = OSSL_PARAM_construct_end();
  189|       |
  190|  3.73k|        ok = data_cb(params, data_cbarg);
  191|  3.73k|    }
  192|  3.73k|    PKCS8_PRIV_KEY_INFO_free(p8inf);
  193|  3.73k|    OPENSSL_free(new_der);
  ------------------
  |  |  132|  3.73k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  194|  3.73k|    return ok;
  195|  3.73k|}
decode_epki2pki.c:epki2pki_newctx:
   46|  14.6k|{
   47|  14.6k|    struct epki2pki_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|  14.6k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   48|       |
   49|  14.6k|    if (ctx != NULL)
  ------------------
  |  Branch (49:9): [True: 14.6k, False: 0]
  ------------------
   50|  14.6k|        ctx->provctx = provctx;
   51|  14.6k|    return ctx;
   52|  14.6k|}
decode_epki2pki.c:epki2pki_freectx:
   55|  14.6k|{
   56|  14.6k|    struct epki2pki_ctx_st *ctx = vctx;
   57|       |
   58|  14.6k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|  14.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   59|  14.6k|}
decode_epki2pki.c:epki2pki_set_ctx_params:
   67|      1|{
   68|      1|    struct epki2pki_ctx_st *ctx = vctx;
   69|      1|    struct epki2pki_set_ctx_params_st p;
   70|      1|    char *str;
   71|       |
   72|      1|    if (ctx == NULL || !epki2pki_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (72:9): [True: 0, False: 1]
  |  Branch (72:24): [True: 0, False: 1]
  ------------------
   73|      0|        return 0;
   74|       |
   75|      1|    str = ctx->propq;
   76|      1|    if (p.propq != NULL
  ------------------
  |  Branch (76:9): [True: 0, False: 1]
  ------------------
   77|      0|        && !OSSL_PARAM_get_utf8_string(p.propq, &str, sizeof(ctx->propq)))
  ------------------
  |  Branch (77:12): [True: 0, False: 0]
  ------------------
   78|      0|        return 0;
   79|       |
   80|      1|    return 1;
   81|      1|}

decode_epki2pki.c:epki2pki_set_ctx_params_decoder:
   29|      1|{
   30|      1|    const char *s;
   31|       |
   32|      1|    memset(r, 0, sizeof(*r));
   33|      1|    if (p != NULL)
  ------------------
  |  Branch (33:9): [True: 1, False: 0]
  ------------------
   34|      2|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (34:16): [True: 1, False: 1]
  ------------------
   35|      1|            if (ossl_likely(strcmp("properties", s + 0) == 0)) {
  ------------------
  |  |   22|      1|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 1]
  |  |  ------------------
  ------------------
   36|       |                /* OSSL_DECODER_PARAM_PROPERTIES */
   37|      0|                if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   38|      0|                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   39|      0|                                   "param %s is repeated", s);
   40|      0|                    return 0;
   41|      0|                }
   42|      0|                r->propq = (OSSL_PARAM *)p;
   43|      0|            }
   44|      1|    return 1;
   45|      1|}

decode_msblob2key.c:msblob2dsa_newctx:
  262|      1|    {                                                                  \
  263|      1|        return msblob2key_newctx(provctx, &mstype##2##keytype##_desc); \
  264|      1|    }                                                                  \
decode_msblob2key.c:msblob2key_newctx:
   65|      2|{
   66|      2|    struct msblob2key_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   67|       |
   68|      2|    if (ctx != NULL) {
  ------------------
  |  Branch (68:9): [True: 2, False: 0]
  ------------------
   69|      2|        ctx->provctx = provctx;
   70|      2|        ctx->desc = desc;
   71|      2|    }
   72|      2|    return ctx;
   73|      2|}
decode_msblob2key.c:msblob2key_freectx:
   76|      2|{
   77|      2|    struct msblob2key_ctx_st *ctx = vctx;
   78|       |
   79|      2|    OPENSSL_free(ctx);
  ------------------
  |  |  132|      2|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   80|      2|}
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)
  ------------------
  |  |  646|      4|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
                  if ((selection & (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)) != 0)
  ------------------
  |  |  647|      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:
   64|  14.6k|{
   65|  14.6k|    struct pem2der_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|  14.6k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   66|       |
   67|  14.6k|    if (ctx != NULL)
  ------------------
  |  Branch (67:9): [True: 14.6k, False: 0]
  ------------------
   68|  14.6k|        ctx->provctx = provctx;
   69|  14.6k|    return ctx;
   70|  14.6k|}
decode_pem2der.c:pem2der_freectx:
   73|  14.6k|{
   74|  14.6k|    struct pem2der_ctx_st *ctx = vctx;
   75|       |
   76|  14.6k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|  14.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   77|  14.6k|}
decode_pem2der.c:pem2der_decode:
  127|  3.73k|{
  128|       |    /*
  129|       |     * PEM names we recognise.  Other PEM names should be recognised by
  130|       |     * other decoder implementations.
  131|       |     */
  132|  3.73k|    static const struct pem_name_map_st {
  133|  3.73k|        const char *pem_name;
  134|  3.73k|        int object_type;
  135|  3.73k|        const char *data_type;
  136|  3.73k|        const char *data_structure;
  137|  3.73k|    } pem_name_map[] = {
  138|       |        /* PKCS#8 and SubjectPublicKeyInfo */
  139|  3.73k|        { PEM_STRING_PKCS8, OSSL_OBJECT_PKEY, NULL, "EncryptedPrivateKeyInfo" },
  ------------------
  |  |   49|  3.73k|#define PEM_STRING_PKCS8 "ENCRYPTED PRIVATE KEY"
  ------------------
                      { PEM_STRING_PKCS8, OSSL_OBJECT_PKEY, NULL, "EncryptedPrivateKeyInfo" },
  ------------------
  |  |   29|  3.73k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  140|  3.73k|        { PEM_STRING_PKCS8INF, OSSL_OBJECT_PKEY, NULL, "PrivateKeyInfo" },
  ------------------
  |  |   50|  3.73k|#define PEM_STRING_PKCS8INF "PRIVATE KEY"
  ------------------
                      { PEM_STRING_PKCS8INF, OSSL_OBJECT_PKEY, NULL, "PrivateKeyInfo" },
  ------------------
  |  |   29|  3.73k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  141|  3.73k|#define PKCS8_LAST_IDX 1
  142|  3.73k|        { PEM_STRING_PUBLIC, OSSL_OBJECT_PKEY, NULL, "SubjectPublicKeyInfo" },
  ------------------
  |  |   42|  3.73k|#define PEM_STRING_PUBLIC "PUBLIC KEY"
  ------------------
                      { PEM_STRING_PUBLIC, OSSL_OBJECT_PKEY, NULL, "SubjectPublicKeyInfo" },
  ------------------
  |  |   29|  3.73k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  143|  3.73k|#define SPKI_LAST_IDX 2
  144|       |        /* Our set of type specific PEM types */
  145|  3.73k|        { PEM_STRING_DHPARAMS, OSSL_OBJECT_PKEY, "DH", "type-specific" },
  ------------------
  |  |   51|  3.73k|#define PEM_STRING_DHPARAMS "DH PARAMETERS"
  ------------------
                      { PEM_STRING_DHPARAMS, OSSL_OBJECT_PKEY, "DH", "type-specific" },
  ------------------
  |  |   29|  3.73k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  146|  3.73k|        { PEM_STRING_DHXPARAMS, OSSL_OBJECT_PKEY, "X9.42 DH", "type-specific" },
  ------------------
  |  |   52|  3.73k|#define PEM_STRING_DHXPARAMS "X9.42 DH PARAMETERS"
  ------------------
                      { PEM_STRING_DHXPARAMS, OSSL_OBJECT_PKEY, "X9.42 DH", "type-specific" },
  ------------------
  |  |   29|  3.73k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  147|  3.73k|        { PEM_STRING_DSA, OSSL_OBJECT_PKEY, "DSA", "type-specific" },
  ------------------
  |  |   45|  3.73k|#define PEM_STRING_DSA "DSA PRIVATE KEY"
  ------------------
                      { PEM_STRING_DSA, OSSL_OBJECT_PKEY, "DSA", "type-specific" },
  ------------------
  |  |   29|  3.73k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  148|  3.73k|        { PEM_STRING_DSA_PUBLIC, OSSL_OBJECT_PKEY, "DSA", "type-specific" },
  ------------------
  |  |   46|  3.73k|#define PEM_STRING_DSA_PUBLIC "DSA PUBLIC KEY"
  ------------------
                      { PEM_STRING_DSA_PUBLIC, OSSL_OBJECT_PKEY, "DSA", "type-specific" },
  ------------------
  |  |   29|  3.73k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  149|  3.73k|        { PEM_STRING_DSAPARAMS, OSSL_OBJECT_PKEY, "DSA", "type-specific" },
  ------------------
  |  |   54|  3.73k|#define PEM_STRING_DSAPARAMS "DSA PARAMETERS"
  ------------------
                      { PEM_STRING_DSAPARAMS, OSSL_OBJECT_PKEY, "DSA", "type-specific" },
  ------------------
  |  |   29|  3.73k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  150|  3.73k|        { PEM_STRING_ECPRIVATEKEY, OSSL_OBJECT_PKEY, "EC", "type-specific" },
  ------------------
  |  |   57|  3.73k|#define PEM_STRING_ECPRIVATEKEY "EC PRIVATE KEY"
  ------------------
                      { PEM_STRING_ECPRIVATEKEY, OSSL_OBJECT_PKEY, "EC", "type-specific" },
  ------------------
  |  |   29|  3.73k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  151|  3.73k|        { PEM_STRING_ECPARAMETERS, OSSL_OBJECT_PKEY, "EC", "type-specific" },
  ------------------
  |  |   56|  3.73k|#define PEM_STRING_ECPARAMETERS "EC PARAMETERS"
  ------------------
                      { PEM_STRING_ECPARAMETERS, OSSL_OBJECT_PKEY, "EC", "type-specific" },
  ------------------
  |  |   29|  3.73k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  152|  3.73k|        { PEM_STRING_SM2PRIVATEKEY, OSSL_OBJECT_PKEY, "SM2", "type-specific" },
  ------------------
  |  |   60|  3.73k|#define PEM_STRING_SM2PRIVATEKEY "SM2 PRIVATE KEY"
  ------------------
                      { PEM_STRING_SM2PRIVATEKEY, OSSL_OBJECT_PKEY, "SM2", "type-specific" },
  ------------------
  |  |   29|  3.73k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  153|  3.73k|        { PEM_STRING_SM2PARAMETERS, OSSL_OBJECT_PKEY, "SM2", "type-specific" },
  ------------------
  |  |   61|  3.73k|#define PEM_STRING_SM2PARAMETERS "SM2 PARAMETERS"
  ------------------
                      { PEM_STRING_SM2PARAMETERS, OSSL_OBJECT_PKEY, "SM2", "type-specific" },
  ------------------
  |  |   29|  3.73k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  154|  3.73k|        { PEM_STRING_RSA, OSSL_OBJECT_PKEY, "RSA", "type-specific" },
  ------------------
  |  |   43|  3.73k|#define PEM_STRING_RSA "RSA PRIVATE KEY"
  ------------------
                      { PEM_STRING_RSA, OSSL_OBJECT_PKEY, "RSA", "type-specific" },
  ------------------
  |  |   29|  3.73k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  155|  3.73k|        { PEM_STRING_RSA_PUBLIC, OSSL_OBJECT_PKEY, "RSA", "type-specific" },
  ------------------
  |  |   44|  3.73k|#define PEM_STRING_RSA_PUBLIC "RSA PUBLIC KEY"
  ------------------
                      { PEM_STRING_RSA_PUBLIC, OSSL_OBJECT_PKEY, "RSA", "type-specific" },
  ------------------
  |  |   29|  3.73k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  156|       |
  157|       |        /*
  158|       |         * A few others that there is at least have an object type for, even
  159|       |         * though there is no provider interface to handle such objects, yet.
  160|       |         * However, this is beneficial for the OSSL_STORE result handler.
  161|       |         */
  162|  3.73k|        { PEM_STRING_X509, OSSL_OBJECT_CERT, NULL, "Certificate" },
  ------------------
  |  |   36|  3.73k|#define PEM_STRING_X509 "CERTIFICATE"
  ------------------
                      { PEM_STRING_X509, OSSL_OBJECT_CERT, NULL, "Certificate" },
  ------------------
  |  |   30|  3.73k|#define OSSL_OBJECT_CERT 3 /* X509 * */
  ------------------
  163|  3.73k|        { PEM_STRING_X509_TRUSTED, OSSL_OBJECT_CERT, NULL, "Certificate" },
  ------------------
  |  |   37|  3.73k|#define PEM_STRING_X509_TRUSTED "TRUSTED CERTIFICATE"
  ------------------
                      { PEM_STRING_X509_TRUSTED, OSSL_OBJECT_CERT, NULL, "Certificate" },
  ------------------
  |  |   30|  3.73k|#define OSSL_OBJECT_CERT 3 /* X509 * */
  ------------------
  164|  3.73k|        { PEM_STRING_X509_OLD, OSSL_OBJECT_CERT, NULL, "Certificate" },
  ------------------
  |  |   35|  3.73k|#define PEM_STRING_X509_OLD "X509 CERTIFICATE"
  ------------------
                      { PEM_STRING_X509_OLD, OSSL_OBJECT_CERT, NULL, "Certificate" },
  ------------------
  |  |   30|  3.73k|#define OSSL_OBJECT_CERT 3 /* X509 * */
  ------------------
  165|  3.73k|        { PEM_STRING_X509_CRL, OSSL_OBJECT_CRL, NULL, "CertificateList" }
  ------------------
  |  |   40|  3.73k|#define PEM_STRING_X509_CRL "X509 CRL"
  ------------------
                      { PEM_STRING_X509_CRL, OSSL_OBJECT_CRL, NULL, "CertificateList" }
  ------------------
  |  |   31|  3.73k|#define OSSL_OBJECT_CRL 4 /* X509_CRL * */
  ------------------
  166|  3.73k|    };
  167|  3.73k|    struct pem2der_ctx_st *ctx = vctx;
  168|  3.73k|    char *pem_name = NULL, *pem_header = NULL;
  169|  3.73k|    size_t i;
  170|  3.73k|    unsigned char *der = NULL;
  171|  3.73k|    long der_len = 0;
  172|  3.73k|    int ok = 0;
  173|  3.73k|    int objtype = OSSL_OBJECT_UNKNOWN;
  ------------------
  |  |   27|  3.73k|#define OSSL_OBJECT_UNKNOWN 0
  ------------------
  174|       |
  175|  3.73k|    ok = read_pem(ctx->provctx, cin, &pem_name, &pem_header,
  176|  3.73k|             &der, &der_len)
  177|  3.73k|        > 0;
  178|       |    /* We return "empty handed".  This is not an error. */
  179|  3.73k|    if (!ok)
  ------------------
  |  Branch (179:9): [True: 0, False: 3.73k]
  ------------------
  180|      0|        return 1;
  181|       |
  182|       |    /*
  183|       |     * 10 is the number of characters in "Proc-Type:", which
  184|       |     * PEM_get_EVP_CIPHER_INFO() requires to be present.
  185|       |     * If the PEM header has less characters than that, it's
  186|       |     * not worth spending cycles on it.
  187|       |     */
  188|  3.73k|    if (strlen(pem_header) > 10) {
  ------------------
  |  Branch (188:9): [True: 0, False: 3.73k]
  ------------------
  189|      0|        EVP_CIPHER_INFO cipher;
  190|      0|        struct pem2der_pass_data_st pass_data;
  191|       |
  192|      0|        ok = 0; /* Assume that we fail */
  193|      0|        pass_data.cb = pw_cb;
  194|      0|        pass_data.cbarg = pw_cbarg;
  195|      0|        if (!PEM_get_EVP_CIPHER_INFO(pem_header, &cipher)
  ------------------
  |  Branch (195:13): [True: 0, False: 0]
  ------------------
  196|      0|            || !PEM_do_header(&cipher, der, &der_len,
  ------------------
  |  Branch (196:16): [True: 0, False: 0]
  ------------------
  197|      0|                pem2der_pass_helper, &pass_data))
  198|      0|            goto end;
  199|      0|    }
  200|       |
  201|       |    /*
  202|       |     * Indicated that we successfully decoded something, or not at all.
  203|       |     * Ending up "empty handed" is not an error.
  204|       |     */
  205|  3.73k|    ok = 1;
  206|       |
  207|       |    /* Have a look to see if we recognise anything */
  208|  7.46k|    for (i = 0; i < OSSL_NELEM(pem_name_map); i++)
  ------------------
  |  |   14|  7.46k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (208:17): [True: 7.46k, False: 0]
  ------------------
  209|  7.46k|        if (strcmp(pem_name, pem_name_map[i].pem_name) == 0)
  ------------------
  |  Branch (209:13): [True: 3.73k, False: 3.73k]
  ------------------
  210|  3.73k|            break;
  211|       |
  212|  3.73k|    if (i < OSSL_NELEM(pem_name_map)) {
  ------------------
  |  |   14|  3.73k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (212:9): [True: 3.73k, False: 0]
  ------------------
  213|  3.73k|        OSSL_PARAM params[5], *p = params;
  214|       |        /* We expect these to be read only so casting away the const is ok */
  215|  3.73k|        char *data_type = (char *)pem_name_map[i].data_type;
  216|  3.73k|        char *data_structure = (char *)pem_name_map[i].data_structure;
  217|       |
  218|       |        /*
  219|       |         * Since this may perform decryption, we need to check the selection to
  220|       |         * avoid password prompts for objects of no interest.
  221|       |         */
  222|  3.73k|        if (i <= PKCS8_LAST_IDX
  ------------------
  |  |  141|  7.46k|#define PKCS8_LAST_IDX 1
  ------------------
  |  Branch (222:13): [True: 3.73k, False: 0]
  ------------------
  223|  3.73k|            && ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY)
  ------------------
  |  |  646|  3.73k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (223:17): [True: 3.73k, False: 0]
  ------------------
  224|      0|                || OPENSSL_strcasecmp(ctx->data_structure, "EncryptedPrivateKeyInfo") == 0
  ------------------
  |  Branch (224:20): [True: 0, False: 0]
  ------------------
  225|  3.73k|                || OPENSSL_strcasecmp(ctx->data_structure, "PrivateKeyInfo") == 0)) {
  ------------------
  |  Branch (225:20): [True: 0, False: 0]
  ------------------
  226|  3.73k|            ok = ossl_epki2pki_der_decode(der, der_len, selection, data_cb,
  227|  3.73k|                data_cbarg, pw_cb, pw_cbarg,
  228|  3.73k|                PROV_LIBCTX_OF(ctx->provctx),
  ------------------
  |  |   31|  3.73k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  229|  3.73k|                ctx->propq);
  230|  3.73k|            goto end;
  231|  3.73k|        }
  232|       |
  233|      0|        if (i <= SPKI_LAST_IDX
  ------------------
  |  |  143|      0|#define SPKI_LAST_IDX 2
  ------------------
  |  Branch (233:13): [True: 0, False: 0]
  ------------------
  234|      0|            && ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  ------------------
  |  |  647|      0|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (234:17): [True: 0, False: 0]
  ------------------
  235|      0|                || OPENSSL_strcasecmp(ctx->data_structure, "SubjectPublicKeyInfo") == 0)) {
  ------------------
  |  Branch (235:20): [True: 0, False: 0]
  ------------------
  236|      0|            ok = ossl_spki2typespki_der_decode(der, der_len, selection, data_cb,
  237|      0|                data_cbarg, pw_cb, pw_cbarg,
  238|      0|                PROV_LIBCTX_OF(ctx->provctx),
  ------------------
  |  |   31|      0|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  239|      0|                ctx->propq);
  240|      0|            goto end;
  241|      0|        }
  242|       |
  243|      0|        objtype = pem_name_map[i].object_type;
  244|      0|        if (data_type != NULL)
  ------------------
  |  Branch (244:13): [True: 0, False: 0]
  ------------------
  245|      0|            *p++ = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_TYPE,
  ------------------
  |  |  366|      0|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
  246|      0|                data_type, 0);
  247|       |
  248|       |        /* We expect this to be read only so casting away the const is ok */
  249|      0|        if (data_structure != NULL)
  ------------------
  |  Branch (249:13): [True: 0, False: 0]
  ------------------
  250|      0|            *p++ = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_STRUCTURE,
  ------------------
  |  |  365|      0|# define OSSL_OBJECT_PARAM_DATA_STRUCTURE "data-structure"
  ------------------
  251|      0|                data_structure, 0);
  252|      0|        *p++ = OSSL_PARAM_construct_octet_string(OSSL_OBJECT_PARAM_DATA,
  ------------------
  |  |  364|      0|# define OSSL_OBJECT_PARAM_DATA "data"
  ------------------
  253|      0|            der, der_len);
  254|      0|        *p++ = OSSL_PARAM_construct_int(OSSL_OBJECT_PARAM_TYPE, &objtype);
  ------------------
  |  |  370|      0|# define OSSL_OBJECT_PARAM_TYPE "type"
  ------------------
  255|       |
  256|      0|        *p = OSSL_PARAM_construct_end();
  257|       |
  258|      0|        ok = data_cb(params, data_cbarg);
  259|      0|    }
  260|       |
  261|  3.73k|end:
  262|  3.73k|    OPENSSL_free(pem_name);
  ------------------
  |  |  132|  3.73k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  263|  3.73k|    OPENSSL_free(pem_header);
  ------------------
  |  |  132|  3.73k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  264|  3.73k|    OPENSSL_free(der);
  ------------------
  |  |  132|  3.73k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  265|  3.73k|    return ok;
  266|  3.73k|}
decode_pem2der.c:read_pem:
   38|  3.73k|{
   39|  3.73k|    BIO *in = ossl_bio_new_from_core_bio(provctx, cin);
   40|  3.73k|    int ok;
   41|       |
   42|  3.73k|    if (in == NULL)
  ------------------
  |  Branch (42:9): [True: 0, False: 3.73k]
  ------------------
   43|      0|        return 0;
   44|  3.73k|    ok = (PEM_read_bio(in, pem_name, pem_header, data, len) > 0);
   45|       |
   46|  3.73k|    BIO_free(in);
   47|  3.73k|    return ok;
   48|  3.73k|}
decode_pem2der.c:pem2der_set_ctx_params:
   85|      3|{
   86|      3|    struct pem2der_ctx_st *ctx = vctx;
   87|      3|    struct pem2der_set_ctx_params_st p;
   88|      3|    char *str;
   89|       |
   90|      3|    if (ctx == NULL || !pem2der_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (90:9): [True: 0, False: 3]
  |  Branch (90:24): [True: 0, False: 3]
  ------------------
   91|      0|        return 0;
   92|       |
   93|      3|    str = ctx->propq;
   94|      3|    if (p.propq != NULL
  ------------------
  |  Branch (94:9): [True: 0, False: 3]
  ------------------
   95|      0|        && !OSSL_PARAM_get_utf8_string(p.propq, &str, sizeof(ctx->propq)))
  ------------------
  |  Branch (95:12): [True: 0, False: 0]
  ------------------
   96|      0|        return 0;
   97|       |
   98|      3|    str = ctx->data_structure;
   99|      3|    if (p.ds != NULL
  ------------------
  |  Branch (99:9): [True: 3, False: 0]
  ------------------
  100|      3|        && !OSSL_PARAM_get_utf8_string(p.ds, &str, sizeof(ctx->data_structure)))
  ------------------
  |  Branch (100:12): [True: 0, False: 3]
  ------------------
  101|      0|        return 0;
  102|       |
  103|      3|    return 1;
  104|      3|}

decode_pem2der.c:pem2der_set_ctx_params_decoder:
   31|      3|{
   32|      3|    const char *s;
   33|       |
   34|      3|    memset(r, 0, sizeof(*r));
   35|      3|    if (p != NULL)
  ------------------
  |  Branch (35:9): [True: 3, False: 0]
  ------------------
   36|      6|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (36:16): [True: 3, False: 3]
  ------------------
   37|      3|            switch(s[0]) {
   38|      0|            default:
  ------------------
  |  Branch (38:13): [True: 0, False: 3]
  ------------------
   39|      0|                break;
   40|      3|            case 'd':
  ------------------
  |  Branch (40:13): [True: 3, False: 0]
  ------------------
   41|      3|                if (ossl_likely(strcmp("ata-structure", s + 1) == 0)) {
  ------------------
  |  |   22|      3|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3, False: 0]
  |  |  ------------------
  ------------------
   42|       |                    /* OSSL_OBJECT_PARAM_DATA_STRUCTURE */
   43|      3|                    if (ossl_unlikely(r->ds != NULL)) {
  ------------------
  |  |   23|      3|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3]
  |  |  ------------------
  ------------------
   44|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   45|      0|                                       "param %s is repeated", s);
   46|      0|                        return 0;
   47|      0|                    }
   48|      3|                    r->ds = (OSSL_PARAM *)p;
   49|      3|                }
   50|      3|                break;
   51|      3|            case 'p':
  ------------------
  |  Branch (51:13): [True: 0, False: 3]
  ------------------
   52|      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]
  |  |  ------------------
  ------------------
   53|       |                    /* OSSL_DECODER_PARAM_PROPERTIES */
   54|      0|                    if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   55|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   56|      0|                                       "param %s is repeated", s);
   57|      0|                        return 0;
   58|      0|                    }
   59|      0|                    r->propq = (OSSL_PARAM *)p;
   60|      0|                }
   61|      3|            }
   62|      3|    return 1;
   63|      3|}

decode_pvk2key.c:pvk2dsa_newctx:
  262|      1|    {                                                            \
  263|      1|        return pvk2key_newctx(provctx, &pvk2##keytype##_desc);   \
  264|      1|    }                                                            \
decode_pvk2key.c:pvk2key_newctx:
   72|      2|{
   73|      2|    struct pvk2key_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   74|       |
   75|      2|    if (ctx != NULL) {
  ------------------
  |  Branch (75:9): [True: 2, False: 0]
  ------------------
   76|      2|        ctx->provctx = provctx;
   77|      2|        ctx->desc = desc;
   78|      2|    }
   79|      2|    return ctx;
   80|      2|}
decode_pvk2key.c:pvk2key_freectx:
   83|      2|{
   84|      2|    struct pvk2key_ctx_st *ctx = vctx;
   85|       |
   86|      2|    OPENSSL_free(ctx);
  ------------------
  |  |  132|      2|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   87|      2|}
decode_pvk2key.c:pvk2key_does_selection:
  112|      4|{
  113|      4|    if (selection == 0)
  ------------------
  |  Branch (113:9): [True: 0, False: 4]
  ------------------
  114|      0|        return 1;
  115|       |
  116|      4|    if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0)
  ------------------
  |  |  646|      4|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (116:9): [True: 2, False: 2]
  ------------------
  117|      2|        return 1;
  118|       |
  119|      2|    return 0;
  120|      4|}
decode_pvk2key.c:pvk2rsa_newctx:
  262|      1|    {                                                            \
  263|      1|        return pvk2key_newctx(provctx, &pvk2##keytype##_desc);   \
  264|      1|    }                                                            \

ossl_spki2typespki_der_decode:
  103|  10.9k|{
  104|  10.9k|    const unsigned char *derp = der;
  105|  10.9k|    X509_PUBKEY *xpub = NULL;
  106|  10.9k|    X509_ALGOR *algor = NULL;
  107|  10.9k|    const ASN1_OBJECT *oid = NULL;
  108|  10.9k|    char dataname[OSSL_MAX_NAME_SIZE];
  109|  10.9k|    OSSL_PARAM params[6], *p = params;
  110|  10.9k|    int objtype = OSSL_OBJECT_PKEY;
  ------------------
  |  |   29|  10.9k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  111|  10.9k|    int ok = 0;
  112|       |
  113|  10.9k|    xpub = ossl_d2i_X509_PUBKEY_INTERNAL(&derp, len, libctx, propq);
  114|       |
  115|  10.9k|    if (xpub == NULL) {
  ------------------
  |  Branch (115:9): [True: 0, False: 10.9k]
  ------------------
  116|       |        /* We return "empty handed".  This is not an error. */
  117|      0|        ok = 1;
  118|      0|        goto end;
  119|      0|    }
  120|       |
  121|  10.9k|    if (!X509_PUBKEY_get0_param(NULL, NULL, NULL, &algor, xpub))
  ------------------
  |  Branch (121:9): [True: 0, False: 10.9k]
  ------------------
  122|      0|        goto end;
  123|  10.9k|    X509_ALGOR_get0(&oid, NULL, NULL, algor);
  124|       |
  125|  10.9k|#ifndef OPENSSL_NO_EC
  126|       |    /* SM2 abuses the EC oid, so this could actually be SM2 */
  127|  10.9k|    if (OBJ_obj2nid(oid) == NID_X9_62_id_ecPublicKey
  ------------------
  |  |  178|  21.8k|#define NID_X9_62_id_ecPublicKey                408
  ------------------
  |  Branch (127:9): [True: 10.9k, False: 0]
  ------------------
  128|  10.9k|        && ossl_x509_algor_is_sm2(algor))
  ------------------
  |  Branch (128:12): [True: 0, False: 10.9k]
  ------------------
  129|      0|        strcpy(dataname, "SM2");
  130|  10.9k|    else
  131|  10.9k|#endif
  132|  10.9k|        if (OBJ_obj2txt(dataname, sizeof(dataname), oid, 0) <= 0)
  ------------------
  |  Branch (132:13): [True: 0, False: 10.9k]
  ------------------
  133|      0|        goto end;
  134|       |
  135|  10.9k|    ossl_X509_PUBKEY_INTERNAL_free(xpub);
  136|  10.9k|    xpub = NULL;
  137|       |
  138|  10.9k|    *p++ = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_TYPE,
  ------------------
  |  |  366|  10.9k|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
  139|  10.9k|        dataname, 0);
  140|       |
  141|  10.9k|    *p++ = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_INPUT_TYPE,
  ------------------
  |  |  368|  10.9k|# define OSSL_OBJECT_PARAM_INPUT_TYPE "input-type"
  ------------------
  142|  10.9k|        "DER", 0);
  143|       |
  144|  10.9k|    *p++ = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_STRUCTURE,
  ------------------
  |  |  365|  10.9k|# define OSSL_OBJECT_PARAM_DATA_STRUCTURE "data-structure"
  ------------------
  145|  10.9k|        "SubjectPublicKeyInfo",
  146|  10.9k|        0);
  147|  10.9k|    *p++ = OSSL_PARAM_construct_octet_string(OSSL_OBJECT_PARAM_DATA, der, len);
  ------------------
  |  |  364|  10.9k|# define OSSL_OBJECT_PARAM_DATA "data"
  ------------------
  148|  10.9k|    *p++ = OSSL_PARAM_construct_int(OSSL_OBJECT_PARAM_TYPE, &objtype);
  ------------------
  |  |  370|  10.9k|# define OSSL_OBJECT_PARAM_TYPE "type"
  ------------------
  149|       |
  150|  10.9k|    *p = OSSL_PARAM_construct_end();
  151|       |
  152|  10.9k|    ok = data_cb(params, data_cbarg);
  153|       |
  154|  10.9k|end:
  155|  10.9k|    ossl_X509_PUBKEY_INTERNAL_free(xpub);
  156|  10.9k|    return ok;
  157|  10.9k|}
decode_spki2typespki.c:spki2typespki_newctx:
   43|  14.6k|{
   44|  14.6k|    struct spki2typespki_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  109|  14.6k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   45|       |
   46|  14.6k|    if (ctx != NULL)
  ------------------
  |  Branch (46:9): [True: 14.6k, False: 0]
  ------------------
   47|  14.6k|        ctx->provctx = provctx;
   48|  14.6k|    return ctx;
   49|  14.6k|}
decode_spki2typespki.c:spki2typespki_freectx:
   52|  14.6k|{
   53|  14.6k|    struct spki2typespki_ctx_st *ctx = vctx;
   54|       |
   55|  14.6k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|  14.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   56|  14.6k|}
decode_spki2typespki.c:spki2typespki_decode:
   83|  10.9k|{
   84|  10.9k|    struct spki2typespki_ctx_st *ctx = vctx;
   85|  10.9k|    unsigned char *der;
   86|  10.9k|    long len;
   87|  10.9k|    int ok = 0;
   88|       |
   89|  10.9k|    if (!ossl_read_der(ctx->provctx, cin, &der, &len))
  ------------------
  |  Branch (89:9): [True: 0, False: 10.9k]
  ------------------
   90|      0|        return 1;
   91|       |
   92|  10.9k|    ok = ossl_spki2typespki_der_decode(der, len, selection, data_cb, data_cbarg,
   93|  10.9k|        pw_cb, pw_cbarg,
   94|  10.9k|        PROV_LIBCTX_OF(ctx->provctx), ctx->propq);
  ------------------
  |  |   31|  10.9k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
   95|  10.9k|    OPENSSL_free(der);
  ------------------
  |  |  132|  10.9k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   96|  10.9k|    return ok;
   97|  10.9k|}
decode_spki2typespki.c:spki2typespki_set_ctx_params:
   64|      1|{
   65|      1|    struct spki2typespki_ctx_st *ctx = vctx;
   66|      1|    struct spki2typespki_set_ctx_params_st p;
   67|      1|    char *str;
   68|       |
   69|      1|    if (ctx == NULL || !spki2typespki_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (69:9): [True: 0, False: 1]
  |  Branch (69:24): [True: 0, False: 1]
  ------------------
   70|      0|        return 0;
   71|       |
   72|      1|    str = ctx->propq;
   73|      1|    if (p.propq != NULL
  ------------------
  |  Branch (73:9): [True: 0, False: 1]
  ------------------
   74|      0|        && !OSSL_PARAM_get_utf8_string(p.propq, &str, sizeof(ctx->propq)))
  ------------------
  |  Branch (74:12): [True: 0, False: 0]
  ------------------
   75|      0|        return 0;
   76|       |
   77|      1|    return 1;
   78|      1|}

decode_spki2typespki.c:spki2typespki_set_ctx_params_decoder:
   29|      1|{
   30|      1|    const char *s;
   31|       |
   32|      1|    memset(r, 0, sizeof(*r));
   33|      1|    if (p != NULL)
  ------------------
  |  Branch (33:9): [True: 1, False: 0]
  ------------------
   34|      2|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (34:16): [True: 1, False: 1]
  ------------------
   35|      1|            if (ossl_likely(strcmp("properties", s + 0) == 0)) {
  ------------------
  |  |   22|      1|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 1]
  |  |  ------------------
  ------------------
   36|       |                /* OSSL_DECODER_PARAM_PROPERTIES */
   37|      0|                if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   38|      0|                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   39|      0|                                   "param %s is repeated", s);
   40|      0|                    return 0;
   41|      0|                }
   42|      0|                r->propq = (OSSL_PARAM *)p;
   43|      0|            }
   44|      1|    return 1;
   45|      1|}

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

ecx_exch.c:x25519_newctx:
   66|  7.25k|{
   67|  7.25k|    return ecx_newctx(provctx, X25519_KEYLEN);
  ------------------
  |  |   26|  7.25k|#define X25519_KEYLEN 32
  ------------------
   68|  7.25k|}
ecx_exch.c:ecx_newctx:
   50|  7.25k|{
   51|  7.25k|    PROV_ECX_CTX *ctx;
   52|       |
   53|  7.25k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (53:9): [True: 0, False: 7.25k]
  ------------------
   54|      0|        return NULL;
   55|       |
   56|  7.25k|    ctx = OPENSSL_zalloc(sizeof(PROV_ECX_CTX));
  ------------------
  |  |  109|  7.25k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   57|  7.25k|    if (ctx == NULL)
  ------------------
  |  Branch (57:9): [True: 0, False: 7.25k]
  ------------------
   58|      0|        return NULL;
   59|       |
   60|  7.25k|    ctx->keylen = keylen;
   61|       |
   62|  7.25k|    return ctx;
   63|  7.25k|}
ecx_exch.c:x25519_init:
  103|  7.25k|{
  104|  7.25k|    return ecx_init(vecxctx, vkey, "X25519");
  105|  7.25k|}
ecx_exch.c:ecx_init:
   76|  7.25k|{
   77|  7.25k|    PROV_ECX_CTX *ecxctx = (PROV_ECX_CTX *)vecxctx;
   78|  7.25k|    ECX_KEY *key = vkey;
   79|       |
   80|  7.25k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (80:9): [True: 0, False: 7.25k]
  ------------------
   81|      0|        return 0;
   82|       |
   83|  7.25k|    if (ecxctx == NULL
  ------------------
  |  Branch (83:9): [True: 0, False: 7.25k]
  ------------------
   84|  7.25k|        || key == NULL
  ------------------
  |  Branch (84:12): [True: 0, False: 7.25k]
  ------------------
   85|  7.25k|        || key->keylen != ecxctx->keylen
  ------------------
  |  Branch (85:12): [True: 0, False: 7.25k]
  ------------------
   86|  7.25k|        || !ossl_ecx_key_up_ref(key)) {
  ------------------
  |  Branch (86:12): [True: 0, False: 7.25k]
  ------------------
   87|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   88|      0|        return 0;
   89|      0|    }
   90|       |
   91|  7.25k|    ossl_ecx_key_free(ecxctx->key);
   92|  7.25k|    ecxctx->key = key;
   93|       |
   94|       |#ifdef FIPS_MODULE
   95|       |    if (!ossl_FIPS_IND_callback(key->libctx, algname, "Init"))
   96|       |        return 0;
   97|       |#endif
   98|  7.25k|    return 1;
   99|  7.25k|}
ecx_exch.c:ecx_derive:
  136|  7.25k|{
  137|  7.25k|    PROV_ECX_CTX *ecxctx = (PROV_ECX_CTX *)vecxctx;
  138|       |
  139|  7.25k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (139:9): [True: 0, False: 7.25k]
  ------------------
  140|      0|        return 0;
  141|  7.25k|    return ossl_ecx_compute_key(ecxctx->peerkey, ecxctx->key, ecxctx->keylen,
  142|  7.25k|        secret, secretlen, outlen);
  143|  7.25k|}
ecx_exch.c:ecx_set_peer:
  114|  7.25k|{
  115|  7.25k|    PROV_ECX_CTX *ecxctx = (PROV_ECX_CTX *)vecxctx;
  116|  7.25k|    ECX_KEY *key = vkey;
  117|       |
  118|  7.25k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (118:9): [True: 0, False: 7.25k]
  ------------------
  119|      0|        return 0;
  120|       |
  121|  7.25k|    if (ecxctx == NULL
  ------------------
  |  Branch (121:9): [True: 0, False: 7.25k]
  ------------------
  122|  7.25k|        || key == NULL
  ------------------
  |  Branch (122:12): [True: 0, False: 7.25k]
  ------------------
  123|  7.25k|        || key->keylen != ecxctx->keylen
  ------------------
  |  Branch (123:12): [True: 0, False: 7.25k]
  ------------------
  124|  7.25k|        || !ossl_ecx_key_up_ref(key)) {
  ------------------
  |  Branch (124:12): [True: 0, False: 7.25k]
  ------------------
  125|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  126|      0|        return 0;
  127|      0|    }
  128|  7.25k|    ossl_ecx_key_free(ecxctx->peerkey);
  129|  7.25k|    ecxctx->peerkey = key;
  130|       |
  131|  7.25k|    return 1;
  132|  7.25k|}
ecx_exch.c:ecx_freectx:
  146|  7.25k|{
  147|  7.25k|    PROV_ECX_CTX *ecxctx = (PROV_ECX_CTX *)vecxctx;
  148|       |
  149|  7.25k|    ossl_ecx_key_free(ecxctx->key);
  150|  7.25k|    ossl_ecx_key_free(ecxctx->peerkey);
  151|       |
  152|  7.25k|    OPENSSL_free(ecxctx);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  153|  7.25k|}

cipher_aes.c:aes_256_ecb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  210|      1|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aes.c:aes_192_ecb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  210|      1|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aes.c:aes_128_ecb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  210|      1|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aes.c:aes_256_cbc_get_params:
  213|  7.36k|    {                                                                            \
  214|  7.36k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|  7.36k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  215|  7.36k|            flags, kbits, blkbits, ivbits);                                      \
  216|  7.36k|    }                                                                            \
cipher_aes.c:aes_192_cbc_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|      1|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aes.c:aes_128_cbc_get_params:
  213|  7.36k|    {                                                                            \
  214|  7.36k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|  7.36k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  215|  7.36k|            flags, kbits, blkbits, ivbits);                                      \
  216|  7.36k|    }                                                                            \
cipher_aes.c:aes_256_ofb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  213|      1|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aes.c:aes_192_ofb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  213|      1|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aes.c:aes_128_ofb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  213|      1|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aes.c:aes_256_cfb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aes.c:aes_192_cfb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aes.c:aes_128_cfb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aes.c:aes_256_cfb1_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aes.c:aes_192_cfb1_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aes.c:aes_128_cfb1_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aes.c:aes_256_cfb8_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aes.c:aes_192_cfb8_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aes.c:aes_128_cfb8_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aes.c:aes_256_ctr_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  214|      1|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aes.c:aes_192_ctr_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  214|      1|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aes.c:aes_128_ctr_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  214|      1|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aes.c:aes_cbc_cts_gettable_ctx_params:
  364|      3|    {                                                                    \
  365|      3|        return name##_known_gettable_ctx_params;                         \
  366|      3|    }
cipher_aria.c:aria_256_ecb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  210|      1|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aria.c:aria_192_ecb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  210|      1|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aria.c:aria_128_ecb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  210|      1|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aria.c:aria_256_cbc_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|      1|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aria.c:aria_192_cbc_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|      1|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aria.c:aria_128_cbc_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|      1|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aria.c:aria_256_ofb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  213|      1|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aria.c:aria_192_ofb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  213|      1|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aria.c:aria_128_ofb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  213|      1|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aria.c:aria_256_cfb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aria.c:aria_192_cfb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aria.c:aria_128_cfb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aria.c:aria_256_cfb1_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aria.c:aria_192_cfb1_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aria.c:aria_128_cfb1_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aria.c:aria_256_cfb8_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aria.c:aria_192_cfb8_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aria.c:aria_128_cfb8_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aria.c:aria_256_ctr_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  214|      1|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aria.c:aria_192_ctr_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  214|      1|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_aria.c:aria_128_ctr_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  214|      1|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_camellia.c:camellia_256_ecb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  210|      1|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_camellia.c:camellia_192_ecb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  210|      1|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_camellia.c:camellia_128_ecb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  210|      1|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_camellia.c:camellia_256_cbc_get_params:
  213|  7.36k|    {                                                                            \
  214|  7.36k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|  7.36k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  215|  7.36k|            flags, kbits, blkbits, ivbits);                                      \
  216|  7.36k|    }                                                                            \
cipher_camellia.c:camellia_192_cbc_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|      1|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_camellia.c:camellia_128_cbc_get_params:
  213|  7.36k|    {                                                                            \
  214|  7.36k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|  7.36k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  215|  7.36k|            flags, kbits, blkbits, ivbits);                                      \
  216|  7.36k|    }                                                                            \
cipher_camellia.c:camellia_256_ofb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  213|      1|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_camellia.c:camellia_192_ofb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  213|      1|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_camellia.c:camellia_128_ofb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  213|      1|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_camellia.c:camellia_256_cfb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_camellia.c:camellia_192_cfb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_camellia.c:camellia_128_cfb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_camellia.c:camellia_256_cfb1_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_camellia.c:camellia_192_cfb1_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_camellia.c:camellia_128_cfb1_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_camellia.c:camellia_256_cfb8_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_camellia.c:camellia_192_cfb8_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_camellia.c:camellia_128_cfb8_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_camellia.c:camellia_256_ctr_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  214|      1|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_camellia.c:camellia_192_ctr_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  214|      1|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_camellia.c:camellia_128_ctr_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  214|      1|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_camellia.c:camellia_cbc_cts_gettable_ctx_params:
  364|      3|    {                                                                    \
  365|      3|        return name##_known_gettable_ctx_params;                         \
  366|      3|    }
cipher_sm4.c:sm4_128_ecb_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  210|      1|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_sm4.c:sm4_128_cbc_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  211|      1|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_sm4.c:sm4_128_ctr_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  214|      1|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_sm4.c:sm4_128_ofb128_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  213|      1|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
cipher_sm4.c:sm4_128_cfb128_get_params:
  213|      1|    {                                                                            \
  214|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  212|      1|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  215|      1|            flags, kbits, blkbits, ivbits);                                      \
  216|      1|    }                                                                            \
ossl_tdes_gettable_ctx_params:
  364|     11|    {                                                                    \
  365|     11|        return name##_known_gettable_ctx_params;                         \
  366|     11|    }

cipher_aes_ccm.c:aes_128_ccm_get_params:
   21|  14.7k|    {                                                                           \
   22|  14.7k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  216|  14.7k|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
   23|  14.7k|            flags, kbits, blkbits, ivbits);                                     \
   24|  14.7k|    }                                                                           \
cipher_aes_ccm.c:aes_192_ccm_get_params:
   21|      1|    {                                                                           \
   22|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  216|      1|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
   23|      1|            flags, kbits, blkbits, ivbits);                                     \
   24|      1|    }                                                                           \
cipher_aes_ccm.c:aes_256_ccm_get_params:
   21|  14.7k|    {                                                                           \
   22|  14.7k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  216|  14.7k|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
   23|  14.7k|            flags, kbits, blkbits, ivbits);                                     \
   24|  14.7k|    }                                                                           \
cipher_aes_gcm.c:aes_128_gcm_get_params:
   21|  7.36k|    {                                                                           \
   22|  7.36k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  215|  7.36k|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
   23|  7.36k|            flags, kbits, blkbits, ivbits);                                     \
   24|  7.36k|    }                                                                           \
cipher_aes_gcm.c:aes_192_gcm_get_params:
   21|      1|    {                                                                           \
   22|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  215|      1|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
   23|      1|            flags, kbits, blkbits, ivbits);                                     \
   24|      1|    }                                                                           \
cipher_aes_gcm.c:aes256gcm_newctx:
   27|  28.9k|    {                                                                           \
   28|  28.9k|        return alg##_##lc##_newctx(provctx, kbits);                             \
   29|  28.9k|    }                                                                           \
cipher_aes_gcm.c:aes_256_gcm_get_params:
   21|  7.36k|    {                                                                           \
   22|  7.36k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  215|  7.36k|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
   23|  7.36k|            flags, kbits, blkbits, ivbits);                                     \
   24|  7.36k|    }                                                                           \
cipher_aria_ccm.c:aria_128_ccm_get_params:
   21|      1|    {                                                                           \
   22|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  216|      1|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
   23|      1|            flags, kbits, blkbits, ivbits);                                     \
   24|      1|    }                                                                           \
cipher_aria_ccm.c:aria_192_ccm_get_params:
   21|      1|    {                                                                           \
   22|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  216|      1|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
   23|      1|            flags, kbits, blkbits, ivbits);                                     \
   24|      1|    }                                                                           \
cipher_aria_ccm.c:aria_256_ccm_get_params:
   21|      1|    {                                                                           \
   22|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  216|      1|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
   23|      1|            flags, kbits, blkbits, ivbits);                                     \
   24|      1|    }                                                                           \
cipher_aria_gcm.c:aria_128_gcm_get_params:
   21|  7.36k|    {                                                                           \
   22|  7.36k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  215|  7.36k|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
   23|  7.36k|            flags, kbits, blkbits, ivbits);                                     \
   24|  7.36k|    }                                                                           \
cipher_aria_gcm.c:aria_192_gcm_get_params:
   21|      1|    {                                                                           \
   22|      1|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  215|      1|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
   23|      1|            flags, kbits, blkbits, ivbits);                                     \
   24|      1|    }                                                                           \
cipher_aria_gcm.c:aria_256_gcm_get_params:
   21|  7.36k|    {                                                                           \
   22|  7.36k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  215|  7.36k|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
   23|  7.36k|            flags, kbits, blkbits, ivbits);                                     \
   24|  7.36k|    }                                                                           \
cipher_sm4_ccm.c:sm4_128_ccm_get_params:
   21|  7.36k|    {                                                                           \
   22|  7.36k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  216|  7.36k|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
   23|  7.36k|            flags, kbits, blkbits, ivbits);                                     \
   24|  7.36k|    }                                                                           \
cipher_sm4_gcm.c:sm4_128_gcm_get_params:
   21|  7.36k|    {                                                                           \
   22|  7.36k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  215|  7.36k|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
   23|  7.36k|            flags, kbits, blkbits, ivbits);                                     \
   24|  7.36k|    }                                                                           \

cshake_prov.c:cshake_128_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
cshake_prov.c:cshake_256_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
md5_prov.c:md5_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
md5_sha1_prov.c:md5_sha1_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
null_prov.c:nullmd_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
ripemd_prov.c:ripemd160_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
sha2_prov.c:sha1_internal_final:
   44|  10.8k|    {                                                                             \
   45|  10.8k|        if (ossl_prov_is_running() && outsz >= dgstsize && fin(out, ctx)) {       \
  ------------------
  |  Branch (45:13): [True: 10.8k, False: 0]
  |  Branch (45:39): [True: 10.8k, False: 0]
  |  Branch (45:60): [True: 10.8k, False: 0]
  ------------------
   46|  10.8k|            *outl = dgstsize;                                                     \
   47|  10.8k|            return 1;                                                             \
   48|  10.8k|        }                                                                         \
   49|  10.8k|        return 0;                                                                 \
   50|  10.8k|    }
sha2_prov.c:sha1_freectx:
   78|  10.8k|    {                                                                            \
   79|  10.8k|        CTX *ctx = (CTX *)vctx;                                                  \
   80|  10.8k|        OPENSSL_clear_free(ctx, sizeof(*ctx));                                   \
  ------------------
  |  |  130|  10.8k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   81|  10.8k|    }                                                                            \
sha2_prov.c:sha1_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
sha2_prov.c:sha1_internal_init:
  132|  10.8k|    {                                                                                  \
  133|  10.8k|        return ossl_prov_is_running()                                                  \
  ------------------
  |  Branch (133:16): [True: 10.8k, False: 0]
  ------------------
  134|  10.8k|            && init(ctx)                                                               \
  ------------------
  |  Branch (134:16): [True: 10.8k, False: 0]
  ------------------
  135|  10.8k|            && set_ctx_params(ctx, params);                                            \
  ------------------
  |  Branch (135:16): [True: 10.8k, False: 0]
  ------------------
  136|  10.8k|    }                                                                                  \
sha2_prov.c:sha224_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
sha2_prov.c:sha256_internal_final:
   44|  32.3k|    {                                                                             \
   45|  32.3k|        if (ossl_prov_is_running() && outsz >= dgstsize && fin(out, ctx)) {       \
  ------------------
  |  Branch (45:13): [True: 32.3k, False: 0]
  |  Branch (45:39): [True: 32.3k, False: 0]
  |  Branch (45:60): [True: 32.3k, False: 0]
  ------------------
   46|  32.3k|            *outl = dgstsize;                                                     \
   47|  32.3k|            return 1;                                                             \
   48|  32.3k|        }                                                                         \
   49|  32.3k|        return 0;                                                                 \
   50|  32.3k|    }
sha2_prov.c:sha256_freectx:
   78|  50.3k|    {                                                                            \
   79|  50.3k|        CTX *ctx = (CTX *)vctx;                                                  \
   80|  50.3k|        OPENSSL_clear_free(ctx, sizeof(*ctx));                                   \
  ------------------
  |  |  130|  50.3k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   81|  50.3k|    }                                                                            \
sha2_prov.c:sha256_copyctx:
   91|  7.16k|    {                                                                            \
   92|  7.16k|        CTX *outctx = (CTX *)voutctx;                                            \
   93|  7.16k|        CTX *inctx = (CTX *)vinctx;                                              \
   94|  7.16k|        *outctx = *inctx;                                                        \
   95|  7.16k|    }                                                                            \
sha2_prov.c:sha256_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
sha2_prov.c:sha256_internal_init:
  149|  35.9k|    {                                                                              \
  150|  35.9k|        return ossl_prov_is_running() && init(ctx);                                \
  ------------------
  |  Branch (150:16): [True: 35.9k, False: 0]
  |  Branch (150:42): [True: 35.9k, False: 0]
  ------------------
  151|  35.9k|    }                                                                              \
sha2_prov.c:sha256_192_internal_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
sha2_prov.c:sha384_internal_final:
   44|   441k|    {                                                                             \
   45|   441k|        if (ossl_prov_is_running() && outsz >= dgstsize && fin(out, ctx)) {       \
  ------------------
  |  Branch (45:13): [True: 441k, False: 0]
  |  Branch (45:39): [True: 441k, False: 0]
  |  Branch (45:60): [True: 441k, False: 0]
  ------------------
   46|   441k|            *outl = dgstsize;                                                     \
   47|   441k|            return 1;                                                             \
   48|   441k|        }                                                                         \
   49|   441k|        return 0;                                                                 \
   50|   441k|    }
sha2_prov.c:sha384_freectx:
   78|   637k|    {                                                                            \
   79|   637k|        CTX *ctx = (CTX *)vctx;                                                  \
   80|   637k|        OPENSSL_clear_free(ctx, sizeof(*ctx));                                   \
  ------------------
  |  |  130|   637k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   81|   637k|    }                                                                            \
sha2_prov.c:sha384_copyctx:
   91|   181k|    {                                                                            \
   92|   181k|        CTX *outctx = (CTX *)voutctx;                                            \
   93|   181k|        CTX *inctx = (CTX *)vinctx;                                              \
   94|   181k|        *outctx = *inctx;                                                        \
   95|   181k|    }                                                                            \
sha2_prov.c:sha384_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
sha2_prov.c:sha384_internal_init:
  149|   383k|    {                                                                              \
  150|   383k|        return ossl_prov_is_running() && init(ctx);                                \
  ------------------
  |  Branch (150:16): [True: 383k, False: 0]
  |  Branch (150:42): [True: 383k, False: 0]
  ------------------
  151|   383k|    }                                                                              \
sha2_prov.c:sha512_internal_final:
   44|  3.62k|    {                                                                             \
   45|  3.62k|        if (ossl_prov_is_running() && outsz >= dgstsize && fin(out, ctx)) {       \
  ------------------
  |  Branch (45:13): [True: 3.62k, False: 0]
  |  Branch (45:39): [True: 3.62k, False: 0]
  |  Branch (45:60): [True: 3.62k, False: 0]
  ------------------
   46|  3.62k|            *outl = dgstsize;                                                     \
   47|  3.62k|            return 1;                                                             \
   48|  3.62k|        }                                                                         \
   49|  3.62k|        return 0;                                                                 \
   50|  3.62k|    }
sha2_prov.c:sha512_freectx:
   78|  3.62k|    {                                                                            \
   79|  3.62k|        CTX *ctx = (CTX *)vctx;                                                  \
   80|  3.62k|        OPENSSL_clear_free(ctx, sizeof(*ctx));                                   \
  ------------------
  |  |  130|  3.62k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   81|  3.62k|    }                                                                            \
sha2_prov.c:sha512_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
sha2_prov.c:sha512_internal_init:
  149|  3.62k|    {                                                                              \
  150|  3.62k|        return ossl_prov_is_running() && init(ctx);                                \
  ------------------
  |  Branch (150:16): [True: 3.62k, False: 0]
  |  Branch (150:42): [True: 3.62k, False: 0]
  ------------------
  151|  3.62k|    }                                                                              \
sha2_prov.c:sha512_224_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
sha2_prov.c:sha512_256_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
sha3_prov.c:sha3_224_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
sha3_prov.c:sha3_256_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
sha3_prov.c:sha3_384_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
sha3_prov.c:sha3_512_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
sha3_prov.c:keccak_224_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
sha3_prov.c:keccak_256_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
sha3_prov.c:keccak_384_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
sha3_prov.c:keccak_512_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
sha3_prov.c:shake_128_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
sha3_prov.c:shake_256_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
sha3_prov.c:cshake_keccak_128_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
sha3_prov.c:cshake_keccak_256_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }
sm3_prov.c:sm3_get_params:
   29|      1|    {                                                                            \
   30|      1|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|      1|    }

hkdf.c:kdf_hkdf_new:
   98|   152k|{
   99|   152k|    KDF_HKDF *ctx;
  100|       |
  101|   152k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (101:9): [True: 0, False: 152k]
  ------------------
  102|      0|        return NULL;
  103|       |
  104|       |#ifdef FIPS_MODULE
  105|       |    if (!ossl_deferred_self_test(PROV_LIBCTX_OF(provctx),
  106|       |            ST_ID_KDF_HKDF))
  107|       |        return NULL;
  108|       |#endif
  109|       |
  110|   152k|    if ((ctx = OPENSSL_zalloc(sizeof(*ctx))) != NULL) {
  ------------------
  |  |  109|   152k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (110:9): [True: 152k, False: 0]
  ------------------
  111|   152k|        ctx->provctx = provctx;
  112|   152k|        OSSL_FIPS_IND_INIT(ctx)
  113|   152k|    }
  114|   152k|    return ctx;
  115|   152k|}
hkdf.c:kdf_hkdf_free:
  118|   152k|{
  119|   152k|    KDF_HKDF *ctx = (KDF_HKDF *)vctx;
  120|       |
  121|   152k|    if (ctx != NULL) {
  ------------------
  |  Branch (121:9): [True: 152k, False: 0]
  ------------------
  122|   152k|        kdf_hkdf_reset_ex(vctx, 1);
  123|   152k|        OPENSSL_free(ctx);
  ------------------
  |  |  132|   152k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  124|   152k|    }
  125|   152k|}
hkdf.c:kdf_hkdf_reset_ex:
  133|   152k|{
  134|   152k|    KDF_HKDF *ctx = (KDF_HKDF *)vctx;
  135|   152k|    void *provctx = ctx->provctx;
  136|   152k|    int preserve_digest = on_free ? 0 : ctx->fixed_digest;
  ------------------
  |  Branch (136:27): [True: 152k, False: 0]
  ------------------
  137|   152k|    PROV_DIGEST save_prov_digest = { 0 };
  138|       |
  139|       |    /* For fixed digests just save and restore the PROV_DIGEST object */
  140|   152k|    if (preserve_digest)
  ------------------
  |  Branch (140:9): [True: 0, False: 152k]
  ------------------
  141|      0|        save_prov_digest = ctx->digest;
  142|   152k|    else
  143|   152k|        ossl_prov_digest_reset(&ctx->digest);
  144|       |#ifdef OPENSSL_PEDANTIC_ZEROIZATION
  145|       |    OPENSSL_clear_free(ctx->salt, ctx->salt_len);
  146|       |#else
  147|   152k|    OPENSSL_free(ctx->salt);
  ------------------
  |  |  132|   152k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  148|   152k|#endif
  149|   152k|    OPENSSL_free(ctx->prefix);
  ------------------
  |  |  132|   152k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  150|   152k|    OPENSSL_free(ctx->label);
  ------------------
  |  |  132|   152k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  151|   152k|    OPENSSL_clear_free(ctx->data, ctx->data_len);
  ------------------
  |  |  130|   152k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  152|   152k|    OPENSSL_clear_free(ctx->key, ctx->key_len);
  ------------------
  |  |  130|   152k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  153|   152k|    OPENSSL_clear_free(ctx->info, ctx->info_len);
  ------------------
  |  |  130|   152k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  154|   152k|    memset(ctx, 0, sizeof(*ctx));
  155|   152k|    ctx->provctx = provctx;
  156|   152k|    if (preserve_digest) {
  ------------------
  |  Branch (156:9): [True: 0, False: 152k]
  ------------------
  157|      0|        ctx->fixed_digest = preserve_digest;
  158|      0|        ctx->digest = save_prov_digest;
  159|      0|    }
  160|   152k|}
hkdf.c:HKDF_Extract:
  643|  21.7k|{
  644|  21.7k|    int sz = EVP_MD_get_size(evp_md);
  645|       |
  646|  21.7k|    if (sz <= 0)
  ------------------
  |  Branch (646:9): [True: 0, False: 21.7k]
  ------------------
  647|      0|        return 0;
  648|  21.7k|    if (prk_len != (size_t)sz) {
  ------------------
  |  Branch (648:9): [True: 0, False: 21.7k]
  ------------------
  649|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_WRONG_OUTPUT_BUFFER_SIZE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  650|      0|        return 0;
  651|      0|    }
  652|       |    /* calc: PRK = HMAC-Hash(salt, IKM) */
  653|  21.7k|    return EVP_Q_mac(libctx, "HMAC", NULL, EVP_MD_get0_name(evp_md), NULL, salt,
  654|  21.7k|               salt_len, ikm, ikm_len, prk, EVP_MD_get_size(evp_md), NULL)
  655|       |        != NULL;
  656|  21.7k|}
hkdf.c:HKDF_Expand:
  701|   144k|{
  702|   144k|    HMAC_CTX *hmac;
  703|   144k|    int ret = 0, sz;
  704|   144k|    unsigned int i;
  705|   144k|    unsigned char prev[EVP_MAX_MD_SIZE];
  706|   144k|    size_t done_len = 0, dig_len, n;
  707|       |
  708|   144k|    sz = EVP_MD_get_size(evp_md);
  709|   144k|    if (sz <= 0)
  ------------------
  |  Branch (709:9): [True: 0, False: 144k]
  ------------------
  710|      0|        return 0;
  711|   144k|    dig_len = (size_t)sz;
  712|       |
  713|       |    /* calc: N = ceil(L/HashLen) */
  714|   144k|    n = okm_len / dig_len;
  715|   144k|    if (okm_len % dig_len)
  ------------------
  |  Branch (715:9): [True: 57.9k, False: 86.8k]
  ------------------
  716|  57.9k|        n++;
  717|       |
  718|   144k|    if (n > 255 || okm == NULL)
  ------------------
  |  Branch (718:9): [True: 0, False: 144k]
  |  Branch (718:20): [True: 0, False: 144k]
  ------------------
  719|      0|        return 0;
  720|       |
  721|   144k|    if ((hmac = HMAC_CTX_new()) == NULL)
  ------------------
  |  Branch (721:9): [True: 0, False: 144k]
  ------------------
  722|      0|        return 0;
  723|       |
  724|   144k|    if (!HMAC_Init_ex(hmac, prk, (int)prk_len, evp_md, NULL))
  ------------------
  |  Branch (724:9): [True: 0, False: 144k]
  ------------------
  725|      0|        goto err;
  726|       |
  727|   289k|    for (i = 1; i <= n; i++) {
  ------------------
  |  Branch (727:17): [True: 144k, False: 144k]
  ------------------
  728|   144k|        size_t copy_len;
  729|   144k|        const unsigned char ctr = i;
  730|       |
  731|       |        /* calc: T(i) = HMAC-Hash(PRK, T(i - 1) | info | i) */
  732|   144k|        if (i > 1) {
  ------------------
  |  Branch (732:13): [True: 0, False: 144k]
  ------------------
  733|      0|            if (!HMAC_Init_ex(hmac, NULL, 0, NULL, NULL))
  ------------------
  |  Branch (733:17): [True: 0, False: 0]
  ------------------
  734|      0|                goto err;
  735|       |
  736|      0|            if (!HMAC_Update(hmac, prev, dig_len))
  ------------------
  |  Branch (736:17): [True: 0, False: 0]
  ------------------
  737|      0|                goto err;
  738|      0|        }
  739|       |
  740|   144k|        if (!HMAC_Update(hmac, info, info_len))
  ------------------
  |  Branch (740:13): [True: 0, False: 144k]
  ------------------
  741|      0|            goto err;
  742|       |
  743|   144k|        if (!HMAC_Update(hmac, &ctr, 1))
  ------------------
  |  Branch (743:13): [True: 0, False: 144k]
  ------------------
  744|      0|            goto err;
  745|       |
  746|   144k|        if (!HMAC_Final(hmac, prev, NULL))
  ------------------
  |  Branch (746:13): [True: 0, False: 144k]
  ------------------
  747|      0|            goto err;
  748|       |
  749|   144k|        copy_len = (dig_len > okm_len - done_len) ? okm_len - done_len : dig_len;
  ------------------
  |  Branch (749:20): [True: 57.9k, False: 86.8k]
  ------------------
  750|       |
  751|   144k|        memcpy(okm + done_len, prev, copy_len);
  752|       |
  753|   144k|        done_len += copy_len;
  754|   144k|    }
  755|   144k|    ret = 1;
  756|       |
  757|   144k|err:
  758|   144k|    OPENSSL_cleanse(prev, sizeof(prev));
  759|   144k|    HMAC_CTX_free(hmac);
  760|   144k|    return ret;
  761|   144k|}
hkdf.c:hkdf_common_set_ctx_params:
  295|   152k|{
  296|   152k|    OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(ctx->provctx);
  ------------------
  |  |   31|   152k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  297|   152k|    int n;
  298|       |
  299|   152k|    if (p->digest != NULL) {
  ------------------
  |  Branch (299:9): [True: 152k, False: 0]
  ------------------
  300|   152k|        const EVP_MD *md = NULL;
  301|       |
  302|   152k|        if (!ossl_prov_digest_load(&ctx->digest, p->digest, p->propq, libctx))
  ------------------
  |  Branch (302:13): [True: 0, False: 152k]
  ------------------
  303|      0|            return 0;
  304|       |
  305|   152k|        md = ossl_prov_digest_md(&ctx->digest);
  306|   152k|        if (EVP_MD_xof(md)) {
  ------------------
  |  Branch (306:13): [True: 0, False: 152k]
  ------------------
  307|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_XOF_DIGESTS_NOT_ALLOWED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  308|      0|            return 0;
  309|      0|        }
  310|   152k|    }
  311|       |
  312|   152k|    if (p->mode != NULL) {
  ------------------
  |  Branch (312:9): [True: 152k, False: 0]
  ------------------
  313|   152k|        if (p->mode->data_type == OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|   152k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (313:13): [True: 0, False: 152k]
  ------------------
  314|      0|            if (OPENSSL_strcasecmp(p->mode->data, "EXTRACT_AND_EXPAND") == 0) {
  ------------------
  |  Branch (314:17): [True: 0, False: 0]
  ------------------
  315|      0|                ctx->mode = EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND;
  ------------------
  |  |   66|      0|#define EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND 0
  ------------------
  316|      0|            } else if (OPENSSL_strcasecmp(p->mode->data, "EXTRACT_ONLY") == 0) {
  ------------------
  |  Branch (316:24): [True: 0, False: 0]
  ------------------
  317|      0|                ctx->mode = EVP_KDF_HKDF_MODE_EXTRACT_ONLY;
  ------------------
  |  |   67|      0|#define EVP_KDF_HKDF_MODE_EXTRACT_ONLY 1
  ------------------
  318|      0|            } else if (OPENSSL_strcasecmp(p->mode->data, "EXPAND_ONLY") == 0) {
  ------------------
  |  Branch (318:24): [True: 0, False: 0]
  ------------------
  319|      0|                ctx->mode = EVP_KDF_HKDF_MODE_EXPAND_ONLY;
  ------------------
  |  |   68|      0|#define EVP_KDF_HKDF_MODE_EXPAND_ONLY 2
  ------------------
  320|      0|            } else {
  321|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_MODE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  322|      0|                return 0;
  323|      0|            }
  324|   152k|        } else if (OSSL_PARAM_get_int(p->mode, &n)) {
  ------------------
  |  Branch (324:20): [True: 152k, False: 0]
  ------------------
  325|   152k|            if (n != EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND
  ------------------
  |  |   66|   304k|#define EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND 0
  ------------------
  |  Branch (325:17): [True: 152k, False: 0]
  ------------------
  326|   152k|                && n != EVP_KDF_HKDF_MODE_EXTRACT_ONLY
  ------------------
  |  |   67|   304k|#define EVP_KDF_HKDF_MODE_EXTRACT_ONLY 1
  ------------------
  |  Branch (326:20): [True: 130k, False: 21.7k]
  ------------------
  327|   130k|                && n != EVP_KDF_HKDF_MODE_EXPAND_ONLY) {
  ------------------
  |  |   68|   130k|#define EVP_KDF_HKDF_MODE_EXPAND_ONLY 2
  ------------------
  |  Branch (327:20): [True: 0, False: 130k]
  ------------------
  328|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_MODE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  329|      0|                return 0;
  330|      0|            }
  331|   152k|            ctx->mode = n;
  332|   152k|        } else {
  333|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_MODE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  334|      0|            return 0;
  335|      0|        }
  336|   152k|    }
  337|       |
  338|   152k|    if (p->key != NULL) {
  ------------------
  |  Branch (338:9): [True: 137k, False: 14.5k]
  ------------------
  339|   137k|        OPENSSL_clear_free(ctx->key, ctx->key_len);
  ------------------
  |  |  130|   137k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  340|   137k|        ctx->key = NULL;
  341|   137k|        if (!OSSL_PARAM_get_octet_string(p->key, (void **)&ctx->key, 0,
  ------------------
  |  Branch (341:13): [True: 0, False: 137k]
  ------------------
  342|   137k|                &ctx->key_len))
  343|      0|            return 0;
  344|   137k|    }
  345|       |
  346|   152k|    if (p->salt != NULL) {
  ------------------
  |  Branch (346:9): [True: 14.5k, False: 137k]
  ------------------
  347|  14.5k|        OPENSSL_free(ctx->salt);
  ------------------
  |  |  132|  14.5k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  348|  14.5k|        ctx->salt = NULL;
  349|  14.5k|        if (!OSSL_PARAM_get_octet_string(p->salt, (void **)&ctx->salt, 0,
  ------------------
  |  Branch (349:13): [True: 0, False: 14.5k]
  ------------------
  350|  14.5k|                &ctx->salt_len))
  351|      0|            return 0;
  352|  14.5k|    }
  353|       |
  354|       |    /* Only relevant for HKDF not to the TLS 1.3 KDF */
  355|   152k|    if (ossl_param_get1_concat_octet_string(p->num_info, p->info,
  ------------------
  |  Branch (355:9): [True: 0, False: 152k]
  ------------------
  356|   152k|            &ctx->info, &ctx->info_len)
  357|   152k|        == 0)
  358|      0|        return 0;
  359|       |
  360|   152k|    return 1;
  361|   152k|}
hkdf.c:kdf_tls1_3_derive:
  934|   152k|{
  935|   152k|    KDF_HKDF *ctx = (KDF_HKDF *)vctx;
  936|   152k|    const EVP_MD *md;
  937|       |
  938|   152k|    if (!ossl_prov_is_running() || !kdf_tls1_3_set_ctx_params(ctx, params))
  ------------------
  |  Branch (938:9): [True: 0, False: 152k]
  |  Branch (938:36): [True: 0, False: 152k]
  ------------------
  939|      0|        return 0;
  940|       |
  941|   152k|    md = ossl_prov_digest_md(&ctx->digest);
  942|   152k|    if (md == NULL) {
  ------------------
  |  Branch (942:9): [True: 0, False: 152k]
  ------------------
  943|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_MESSAGE_DIGEST);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  944|      0|        return 0;
  945|      0|    }
  946|       |
  947|   152k|    switch (ctx->mode) {
  948|      0|    default:
  ------------------
  |  Branch (948:5): [True: 0, False: 152k]
  ------------------
  949|      0|        return 0;
  950|       |
  951|  21.7k|    case EVP_KDF_HKDF_MODE_EXTRACT_ONLY:
  ------------------
  |  |   67|  21.7k|#define EVP_KDF_HKDF_MODE_EXTRACT_ONLY 1
  ------------------
  |  Branch (951:5): [True: 21.7k, False: 130k]
  ------------------
  952|  21.7k|        return prov_tls13_hkdf_generate_secret(PROV_LIBCTX_OF(ctx->provctx),
  ------------------
  |  |   31|  21.7k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  953|  21.7k|            md,
  954|  21.7k|            ctx->salt, ctx->salt_len,
  955|  21.7k|            ctx->key, ctx->key_len,
  956|  21.7k|            ctx->prefix, ctx->prefix_len,
  957|  21.7k|            ctx->label, ctx->label_len,
  958|  21.7k|            key, keylen);
  959|       |
  960|   130k|    case EVP_KDF_HKDF_MODE_EXPAND_ONLY:
  ------------------
  |  |   68|   130k|#define EVP_KDF_HKDF_MODE_EXPAND_ONLY 2
  ------------------
  |  Branch (960:5): [True: 130k, False: 21.7k]
  ------------------
  961|   130k|        return prov_tls13_hkdf_expand(md, ctx->key, ctx->key_len,
  962|   130k|            ctx->prefix, ctx->prefix_len,
  963|   130k|            ctx->label, ctx->label_len,
  964|   130k|            ctx->data, ctx->data_len,
  965|   130k|            key, keylen);
  966|   152k|    }
  967|   152k|}
hkdf.c:prov_tls13_hkdf_generate_secret:
  820|  21.7k|{
  821|  21.7k|    size_t mdlen;
  822|  21.7k|    int ret;
  823|  21.7k|    unsigned char preextractsec[EVP_MAX_MD_SIZE];
  824|       |    /* Always filled with zeros */
  825|  21.7k|    static const unsigned char default_zeros[EVP_MAX_MD_SIZE];
  826|       |
  827|  21.7k|    ret = EVP_MD_get_size(md);
  828|       |    /* Ensure cast to size_t is safe */
  829|  21.7k|    if (ret <= 0)
  ------------------
  |  Branch (829:9): [True: 0, False: 21.7k]
  ------------------
  830|      0|        return 0;
  831|  21.7k|    mdlen = (size_t)ret;
  832|       |
  833|  21.7k|    if (insecret == NULL) {
  ------------------
  |  Branch (833:9): [True: 14.5k, False: 7.25k]
  ------------------
  834|  14.5k|        insecret = default_zeros;
  835|  14.5k|        insecretlen = mdlen;
  836|  14.5k|    }
  837|  21.7k|    if (prevsecret == NULL) {
  ------------------
  |  Branch (837:9): [True: 7.25k, False: 14.5k]
  ------------------
  838|  7.25k|        prevsecret = default_zeros;
  839|  7.25k|        prevsecretlen = mdlen;
  840|  14.5k|    } else {
  841|  14.5k|        EVP_MD_CTX *mctx = EVP_MD_CTX_new();
  842|  14.5k|        unsigned char hash[EVP_MAX_MD_SIZE];
  843|       |
  844|       |        /* The pre-extract derive step uses a hash of no messages */
  845|  14.5k|        if (mctx == NULL
  ------------------
  |  Branch (845:13): [True: 0, False: 14.5k]
  ------------------
  846|  14.5k|            || EVP_DigestInit_ex(mctx, md, NULL) <= 0
  ------------------
  |  Branch (846:16): [True: 0, False: 14.5k]
  ------------------
  847|  14.5k|            || EVP_DigestFinal_ex(mctx, hash, NULL) <= 0) {
  ------------------
  |  Branch (847:16): [True: 0, False: 14.5k]
  ------------------
  848|      0|            EVP_MD_CTX_free(mctx);
  849|      0|            return 0;
  850|      0|        }
  851|  14.5k|        EVP_MD_CTX_free(mctx);
  852|       |
  853|       |        /* Generate the pre-extract secret */
  854|  14.5k|        if (!prov_tls13_hkdf_expand(md, prevsecret, prevsecretlen,
  ------------------
  |  Branch (854:13): [True: 0, False: 14.5k]
  ------------------
  855|  14.5k|                prefix, prefixlen, label, labellen,
  856|  14.5k|                hash, mdlen, preextractsec, mdlen))
  857|      0|            return 0;
  858|  14.5k|        prevsecret = preextractsec;
  859|  14.5k|        prevsecretlen = mdlen;
  860|  14.5k|    }
  861|       |
  862|  21.7k|    ret = HKDF_Extract(libctx, md, prevsecret, prevsecretlen,
  863|  21.7k|        insecret, insecretlen, out, outlen);
  864|       |
  865|  21.7k|    if (prevsecret == preextractsec)
  ------------------
  |  Branch (865:9): [True: 14.5k, False: 7.25k]
  ------------------
  866|  14.5k|        OPENSSL_cleanse(preextractsec, mdlen);
  867|  21.7k|    return ret;
  868|  21.7k|}
hkdf.c:prov_tls13_hkdf_expand:
  781|   144k|{
  782|   144k|    size_t hkdflabellen;
  783|   144k|    unsigned char hkdflabel[HKDF_MAXBUF];
  784|   144k|    WPACKET pkt;
  785|       |
  786|       |    /*
  787|       |     * 2 bytes for length of derived secret + 1 byte for length of combined
  788|       |     * prefix and label + bytes for the label itself + 1 byte length of hash
  789|       |     * + bytes for the hash itself.  We've got the maximum the KDF can handle
  790|       |     * which should always be sufficient.
  791|       |     */
  792|   144k|    if (!WPACKET_init_static_len(&pkt, hkdflabel, sizeof(hkdflabel), 0)
  ------------------
  |  Branch (792:9): [True: 0, False: 144k]
  ------------------
  793|   144k|        || !WPACKET_put_bytes_u16(&pkt, outlen)
  ------------------
  |  |  911|   289k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (793:12): [True: 0, False: 144k]
  ------------------
  794|   144k|        || !WPACKET_start_sub_packet_u8(&pkt)
  ------------------
  |  |  810|   289k|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (794:12): [True: 0, False: 144k]
  ------------------
  795|   144k|        || !WPACKET_memcpy(&pkt, prefix, prefixlen)
  ------------------
  |  Branch (795:12): [True: 0, False: 144k]
  ------------------
  796|   144k|        || !WPACKET_memcpy(&pkt, label, labellen)
  ------------------
  |  Branch (796:12): [True: 0, False: 144k]
  ------------------
  797|   144k|        || !WPACKET_close(&pkt)
  ------------------
  |  Branch (797:12): [True: 0, False: 144k]
  ------------------
  798|   144k|        || !WPACKET_sub_memcpy_u8(&pkt, data, (data == NULL) ? 0 : datalen)
  ------------------
  |  |  938|   289k|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  |  |  ------------------
  |  |  |  Branch (938:41): [True: 72.4k, False: 72.3k]
  |  |  ------------------
  ------------------
  |  Branch (798:12): [True: 0, False: 144k]
  ------------------
  799|   144k|        || !WPACKET_get_total_written(&pkt, &hkdflabellen)
  ------------------
  |  Branch (799:12): [True: 0, False: 144k]
  ------------------
  800|   144k|        || !WPACKET_finish(&pkt)) {
  ------------------
  |  Branch (800:12): [True: 0, False: 144k]
  ------------------
  801|      0|        WPACKET_cleanup(&pkt);
  802|      0|        return 0;
  803|      0|    }
  804|       |
  805|   144k|    return HKDF_Expand(md, key, keylen, hkdflabel, hkdflabellen,
  806|   144k|        out, outlen);
  807|   144k|}
hkdf.c:kdf_tls1_3_set_ctx_params:
  970|   152k|{
  971|   152k|    struct hkdf_all_set_ctx_params_st p;
  972|   152k|    KDF_HKDF *ctx = vctx;
  973|       |
  974|   152k|    if (ctx == NULL || !kdf_tls1_3_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (974:9): [True: 0, False: 152k]
  |  Branch (974:24): [True: 0, False: 152k]
  ------------------
  975|      0|        return 0;
  976|       |
  977|   152k|    if (!OSSL_FIPS_IND_SET_CTX_FROM_PARAM(ctx, OSSL_FIPS_IND_SETTABLE0, p.ind_d))
  ------------------
  |  |  158|   152k|#define OSSL_FIPS_IND_SET_CTX_FROM_PARAM(ctx, id, p) 1
  ------------------
  |  Branch (977:9): [Folded, False: 152k]
  ------------------
  978|      0|        return 0;
  979|   152k|    if (!OSSL_FIPS_IND_SET_CTX_FROM_PARAM(ctx, OSSL_FIPS_IND_SETTABLE1, p.ind_k))
  ------------------
  |  |  158|   152k|#define OSSL_FIPS_IND_SET_CTX_FROM_PARAM(ctx, id, p) 1
  ------------------
  |  Branch (979:9): [Folded, False: 152k]
  ------------------
  980|      0|        return 0;
  981|       |
  982|   152k|    if (!hkdf_common_set_ctx_params(ctx, &p))
  ------------------
  |  Branch (982:9): [True: 0, False: 152k]
  ------------------
  983|      0|        return 0;
  984|       |
  985|   152k|    if (ctx->mode == EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND) {
  ------------------
  |  |   66|   152k|#define EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND 0
  ------------------
  |  Branch (985:9): [True: 0, False: 152k]
  ------------------
  986|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_MODE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  987|      0|        return 0;
  988|      0|    }
  989|       |
  990|   152k|    if (p.prefix != NULL) {
  ------------------
  |  Branch (990:9): [True: 152k, False: 0]
  ------------------
  991|   152k|        OPENSSL_free(ctx->prefix);
  ------------------
  |  |  132|   152k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  992|   152k|        ctx->prefix = NULL;
  993|   152k|        if (!OSSL_PARAM_get_octet_string(p.prefix, (void **)&ctx->prefix, 0,
  ------------------
  |  Branch (993:13): [True: 0, False: 152k]
  ------------------
  994|   152k|                &ctx->prefix_len))
  995|      0|            return 0;
  996|   152k|    }
  997|       |
  998|   152k|    if (p.label != NULL) {
  ------------------
  |  Branch (998:9): [True: 152k, False: 0]
  ------------------
  999|   152k|        OPENSSL_free(ctx->label);
  ------------------
  |  |  132|   152k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1000|   152k|        ctx->label = NULL;
 1001|   152k|        if (!OSSL_PARAM_get_octet_string(p.label, (void **)&ctx->label, 0,
  ------------------
  |  Branch (1001:13): [True: 0, False: 152k]
  ------------------
 1002|   152k|                &ctx->label_len))
 1003|      0|            return 0;
 1004|   152k|    }
 1005|       |
 1006|   152k|    if (p.data != NULL) {
  ------------------
  |  Branch (1006:9): [True: 57.7k, False: 94.2k]
  ------------------
 1007|  57.7k|        OPENSSL_clear_free(ctx->data, ctx->data_len);
  ------------------
  |  |  130|  57.7k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1008|  57.7k|        ctx->data = NULL;
 1009|  57.7k|        if (!OSSL_PARAM_get_octet_string(p.data, (void **)&ctx->data, 0,
  ------------------
  |  Branch (1009:13): [True: 0, False: 57.7k]
  ------------------
 1010|  57.7k|                &ctx->data_len))
 1011|      0|            return 0;
 1012|  57.7k|    }
 1013|       |
 1014|       |#ifdef FIPS_MODULE
 1015|       |    if (p.digest != NULL) {
 1016|       |        const EVP_MD *md = ossl_prov_digest_md(&ctx->digest);
 1017|       |
 1018|       |        if (!fips_tls1_3_digest_check_passed(ctx, md))
 1019|       |            return 0;
 1020|       |    }
 1021|       |
 1022|       |    if (p.key != NULL)
 1023|       |        if (!fips_tls1_3_key_check_passed(ctx))
 1024|       |            return 0;
 1025|       |#endif
 1026|       |
 1027|   152k|    return 1;
 1028|   152k|}

hkdf.c:kdf_tls1_3_set_ctx_params_decoder:
  437|   152k|{
  438|   152k|    const char *s;
  439|       |
  440|   152k|    memset(r, 0, sizeof(*r));
  441|   152k|    if (p != NULL)
  ------------------
  |  Branch (441:9): [True: 152k, False: 0]
  ------------------
  442|   970k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (442:16): [True: 818k, False: 152k]
  ------------------
  443|   818k|            switch(s[0]) {
  444|      0|            default:
  ------------------
  |  Branch (444:13): [True: 0, False: 818k]
  ------------------
  445|      0|                break;
  446|   209k|            case 'd':
  ------------------
  |  Branch (446:13): [True: 209k, False: 608k]
  ------------------
  447|   209k|                switch(s[1]) {
  448|      0|                default:
  ------------------
  |  Branch (448:17): [True: 0, False: 209k]
  ------------------
  449|      0|                    break;
  450|  57.7k|                case 'a':
  ------------------
  |  Branch (450:17): [True: 57.7k, False: 152k]
  ------------------
  451|  57.7k|                    if (ossl_likely(strcmp("ta", s + 2) == 0)) {
  ------------------
  |  |   22|  57.7k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 57.7k, False: 0]
  |  |  ------------------
  ------------------
  452|       |                        /* OSSL_KDF_PARAM_DATA */
  453|  57.7k|                        if (ossl_unlikely(r->data != NULL)) {
  ------------------
  |  |   23|  57.7k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 57.7k]
  |  |  ------------------
  ------------------
  454|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  455|      0|                                           "param %s is repeated", s);
  456|      0|                            return 0;
  457|      0|                        }
  458|  57.7k|                        r->data = (OSSL_PARAM *)p;
  459|  57.7k|                    }
  460|  57.7k|                    break;
  461|   152k|                case 'i':
  ------------------
  |  Branch (461:17): [True: 152k, False: 57.7k]
  ------------------
  462|   152k|                    switch(s[2]) {
  463|      0|                    default:
  ------------------
  |  Branch (463:21): [True: 0, False: 152k]
  ------------------
  464|      0|                        break;
  465|   152k|                    case 'g':
  ------------------
  |  Branch (465:21): [True: 152k, False: 0]
  ------------------
  466|   152k|                        switch(s[3]) {
  467|      0|                        default:
  ------------------
  |  Branch (467:25): [True: 0, False: 152k]
  ------------------
  468|      0|                            break;
  469|   152k|                        case 'e':
  ------------------
  |  Branch (469:25): [True: 152k, False: 0]
  ------------------
  470|   152k|                            switch(s[4]) {
  471|      0|                            default:
  ------------------
  |  Branch (471:29): [True: 0, False: 152k]
  ------------------
  472|      0|                                break;
  473|   152k|                            case 's':
  ------------------
  |  Branch (473:29): [True: 152k, False: 0]
  ------------------
  474|   152k|                                switch(s[5]) {
  475|      0|                                default:
  ------------------
  |  Branch (475:33): [True: 0, False: 152k]
  ------------------
  476|      0|                                    break;
  477|   152k|                                case 't':
  ------------------
  |  Branch (477:33): [True: 152k, False: 0]
  ------------------
  478|   152k|                                    switch(s[6]) {
  479|      0|                                    default:
  ------------------
  |  Branch (479:37): [True: 0, False: 152k]
  ------------------
  480|      0|                                        break;
  481|      0|                                    case '-':
  ------------------
  |  Branch (481:37): [True: 0, False: 152k]
  ------------------
  482|       |# if defined(FIPS_MODULE)
  483|       |                                        if (ossl_likely(strcmp("check", s + 7) == 0)) {
  484|       |                                            /* OSSL_KDF_PARAM_FIPS_DIGEST_CHECK */
  485|       |                                            if (ossl_unlikely(r->ind_d != NULL)) {
  486|       |                                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  487|       |                                                               "param %s is repeated", s);
  488|       |                                                return 0;
  489|       |                                            }
  490|       |                                            r->ind_d = (OSSL_PARAM *)p;
  491|       |                                        }
  492|       |# endif
  493|      0|                                        break;
  494|   152k|                                    case '\0':
  ------------------
  |  Branch (494:37): [True: 152k, False: 0]
  ------------------
  495|   152k|                                        if (ossl_unlikely(r->digest != NULL)) {
  ------------------
  |  |   23|   152k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 152k]
  |  |  ------------------
  ------------------
  496|      0|                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  497|      0|                                                           "param %s is repeated", s);
  498|      0|                                            return 0;
  499|      0|                                        }
  500|   152k|                                        r->digest = (OSSL_PARAM *)p;
  501|   152k|                                    }
  502|   152k|                                }
  503|   152k|                            }
  504|   152k|                        }
  505|   152k|                    }
  506|   209k|                }
  507|   209k|                break;
  508|   209k|            case 'k':
  ------------------
  |  Branch (508:13): [True: 137k, False: 680k]
  ------------------
  509|   137k|                switch(s[1]) {
  510|      0|                default:
  ------------------
  |  Branch (510:17): [True: 0, False: 137k]
  ------------------
  511|      0|                    break;
  512|   137k|                case 'e':
  ------------------
  |  Branch (512:17): [True: 137k, False: 0]
  ------------------
  513|   137k|                    switch(s[2]) {
  514|      0|                    default:
  ------------------
  |  Branch (514:21): [True: 0, False: 137k]
  ------------------
  515|      0|                        break;
  516|   137k|                    case 'y':
  ------------------
  |  Branch (516:21): [True: 137k, False: 0]
  ------------------
  517|   137k|                        switch(s[3]) {
  518|      0|                        default:
  ------------------
  |  Branch (518:25): [True: 0, False: 137k]
  ------------------
  519|      0|                            break;
  520|      0|                        case '-':
  ------------------
  |  Branch (520:25): [True: 0, False: 137k]
  ------------------
  521|       |# if defined(FIPS_MODULE)
  522|       |                            if (ossl_likely(strcmp("check", s + 4) == 0)) {
  523|       |                                /* OSSL_KDF_PARAM_FIPS_KEY_CHECK */
  524|       |                                if (ossl_unlikely(r->ind_k != NULL)) {
  525|       |                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  526|       |                                                   "param %s is repeated", s);
  527|       |                                    return 0;
  528|       |                                }
  529|       |                                r->ind_k = (OSSL_PARAM *)p;
  530|       |                            }
  531|       |# endif
  532|      0|                            break;
  533|   137k|                        case '\0':
  ------------------
  |  Branch (533:25): [True: 137k, False: 0]
  ------------------
  534|   137k|                            if (ossl_unlikely(r->key != NULL)) {
  ------------------
  |  |   23|   137k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 137k]
  |  |  ------------------
  ------------------
  535|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  536|      0|                                               "param %s is repeated", s);
  537|      0|                                return 0;
  538|      0|                            }
  539|   137k|                            r->key = (OSSL_PARAM *)p;
  540|   137k|                        }
  541|   137k|                    }
  542|   137k|                }
  543|   137k|                break;
  544|   152k|            case 'l':
  ------------------
  |  Branch (544:13): [True: 152k, False: 666k]
  ------------------
  545|   152k|                if (ossl_likely(strcmp("abel", s + 1) == 0)) {
  ------------------
  |  |   22|   152k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 152k, False: 0]
  |  |  ------------------
  ------------------
  546|       |                    /* OSSL_KDF_PARAM_LABEL */
  547|   152k|                    if (ossl_unlikely(r->label != NULL)) {
  ------------------
  |  |   23|   152k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 152k]
  |  |  ------------------
  ------------------
  548|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  549|      0|                                       "param %s is repeated", s);
  550|      0|                        return 0;
  551|      0|                    }
  552|   152k|                    r->label = (OSSL_PARAM *)p;
  553|   152k|                }
  554|   152k|                break;
  555|   152k|            case 'm':
  ------------------
  |  Branch (555:13): [True: 152k, False: 666k]
  ------------------
  556|   152k|                if (ossl_likely(strcmp("ode", s + 1) == 0)) {
  ------------------
  |  |   22|   152k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 152k, False: 0]
  |  |  ------------------
  ------------------
  557|       |                    /* OSSL_KDF_PARAM_MODE */
  558|   152k|                    if (ossl_unlikely(r->mode != NULL)) {
  ------------------
  |  |   23|   152k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 152k]
  |  |  ------------------
  ------------------
  559|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  560|      0|                                       "param %s is repeated", s);
  561|      0|                        return 0;
  562|      0|                    }
  563|   152k|                    r->mode = (OSSL_PARAM *)p;
  564|   152k|                }
  565|   152k|                break;
  566|   152k|            case 'p':
  ------------------
  |  Branch (566:13): [True: 152k, False: 666k]
  ------------------
  567|   152k|                switch(s[1]) {
  568|      0|                default:
  ------------------
  |  Branch (568:17): [True: 0, False: 152k]
  ------------------
  569|      0|                    break;
  570|   152k|                case 'r':
  ------------------
  |  Branch (570:17): [True: 152k, False: 0]
  ------------------
  571|   152k|                    switch(s[2]) {
  572|      0|                    default:
  ------------------
  |  Branch (572:21): [True: 0, False: 152k]
  ------------------
  573|      0|                        break;
  574|   152k|                    case 'e':
  ------------------
  |  Branch (574:21): [True: 152k, False: 0]
  ------------------
  575|   152k|                        if (ossl_likely(strcmp("fix", s + 3) == 0)) {
  ------------------
  |  |   22|   152k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 152k, False: 0]
  |  |  ------------------
  ------------------
  576|       |                            /* OSSL_KDF_PARAM_PREFIX */
  577|   152k|                            if (ossl_unlikely(r->prefix != NULL)) {
  ------------------
  |  |   23|   152k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 152k]
  |  |  ------------------
  ------------------
  578|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  579|      0|                                               "param %s is repeated", s);
  580|      0|                                return 0;
  581|      0|                            }
  582|   152k|                            r->prefix = (OSSL_PARAM *)p;
  583|   152k|                        }
  584|   152k|                        break;
  585|   152k|                    case 'o':
  ------------------
  |  Branch (585:21): [True: 0, False: 152k]
  ------------------
  586|      0|                        if (ossl_likely(strcmp("perties", s + 3) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  587|       |                            /* OSSL_KDF_PARAM_PROPERTIES */
  588|      0|                            if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  589|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  590|      0|                                               "param %s is repeated", s);
  591|      0|                                return 0;
  592|      0|                            }
  593|      0|                            r->propq = (OSSL_PARAM *)p;
  594|      0|                        }
  595|   152k|                    }
  596|   152k|                }
  597|   152k|                break;
  598|   152k|            case 's':
  ------------------
  |  Branch (598:13): [True: 14.5k, False: 803k]
  ------------------
  599|  14.5k|                if (ossl_likely(strcmp("alt", s + 1) == 0)) {
  ------------------
  |  |   22|  14.5k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 14.5k, False: 0]
  |  |  ------------------
  ------------------
  600|       |                    /* OSSL_KDF_PARAM_SALT */
  601|  14.5k|                    if (ossl_unlikely(r->salt != NULL)) {
  ------------------
  |  |   23|  14.5k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 14.5k]
  |  |  ------------------
  ------------------
  602|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  603|      0|                                       "param %s is repeated", s);
  604|      0|                        return 0;
  605|      0|                    }
  606|  14.5k|                    r->salt = (OSSL_PARAM *)p;
  607|  14.5k|                }
  608|   818k|            }
  609|   152k|    return 1;
  610|   152k|}

ml_kem_kem.c:ml_kem_newctx:
   44|  7.25k|{
   45|  7.25k|    PROV_ML_KEM_CTX *ctx;
   46|       |
   47|  7.25k|    if ((ctx = OPENSSL_malloc(sizeof(*ctx))) == NULL)
  ------------------
  |  |  107|  7.25k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (47:9): [True: 0, False: 7.25k]
  ------------------
   48|      0|        return NULL;
   49|       |
   50|       |#ifdef FIPS_MODULE
   51|       |    if (!ossl_deferred_self_test(PROV_LIBCTX_OF(provctx),
   52|       |            ST_ID_KEM_ML_KEM))
   53|       |        return NULL;
   54|       |#endif
   55|       |
   56|  7.25k|    ctx->key = NULL;
   57|       |    ctx->entropy = NULL;
   58|  7.25k|    ctx->op = 0;
   59|  7.25k|    return ctx;
   60|  7.25k|}
ml_kem_kem.c:ml_kem_encapsulate_init:
   89|  3.62k|{
   90|  3.62k|    ML_KEM_KEY *key = vkey;
   91|       |
   92|  3.62k|    if (!ossl_ml_kem_have_pubkey(key)) {
  ------------------
  |  |  207|  3.62k|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  ------------------
  |  Branch (92:9): [True: 0, False: 3.62k]
  ------------------
   93|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   94|      0|        return 0;
   95|      0|    }
   96|  3.62k|    return ml_kem_init(vctx, EVP_PKEY_OP_ENCAPSULATE, key, params);
  ------------------
  |  | 1539|  3.62k|#define EVP_PKEY_OP_ENCAPSULATE (1 << 12)
  ------------------
   97|  3.62k|}
ml_kem_kem.c:ml_kem_init:
   73|  7.25k|{
   74|  7.25k|    PROV_ML_KEM_CTX *ctx = vctx;
   75|       |
   76|  7.25k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (76:9): [True: 0, False: 7.25k]
  ------------------
   77|      0|        return 0;
   78|  7.25k|    ctx->key = key;
   79|  7.25k|    ctx->op = op;
   80|  7.25k|    if (ctx->entropy != NULL) {
  ------------------
  |  Branch (80:9): [True: 0, False: 7.25k]
  ------------------
   81|      0|        OPENSSL_cleanse(ctx->entropy, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
   82|       |        ctx->entropy = NULL;
   83|      0|    }
   84|  7.25k|    return ml_kem_set_ctx_params(vctx, params);
   85|  7.25k|}
ml_kem_kem.c:ml_kem_encapsulate:
  147|  3.62k|{
  148|  3.62k|    PROV_ML_KEM_CTX *ctx = vctx;
  149|  3.62k|    ML_KEM_KEY *key = ctx->key;
  150|  3.62k|    const ML_KEM_VINFO *v;
  151|  3.62k|    size_t encap_clen;
  152|  3.62k|    size_t encap_slen;
  153|  3.62k|    int ret = 0;
  154|       |
  155|  3.62k|    if (!ossl_ml_kem_have_pubkey(key)) {
  ------------------
  |  |  207|  3.62k|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  ------------------
  |  Branch (155:9): [True: 0, False: 3.62k]
  ------------------
  156|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  157|      0|        goto end;
  158|      0|    }
  159|  3.62k|    v = ossl_ml_kem_key_vinfo(key);
  ------------------
  |  |  206|  3.62k|#define ossl_ml_kem_key_vinfo(key) ((key)->vinfo)
  ------------------
  160|  3.62k|    encap_clen = v->ctext_bytes;
  161|  3.62k|    encap_slen = ML_KEM_SHARED_SECRET_BYTES;
  ------------------
  |  |   51|  3.62k|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
  162|       |
  163|  3.62k|    if (ctext == NULL) {
  ------------------
  |  Branch (163:9): [True: 0, False: 3.62k]
  ------------------
  164|      0|        if (clen == NULL && slen == NULL)
  ------------------
  |  Branch (164:13): [True: 0, False: 0]
  |  Branch (164:29): [True: 0, False: 0]
  ------------------
  165|      0|            return 0;
  166|      0|        if (clen != NULL)
  ------------------
  |  Branch (166:13): [True: 0, False: 0]
  ------------------
  167|      0|            *clen = encap_clen;
  168|      0|        if (slen != NULL)
  ------------------
  |  Branch (168:13): [True: 0, False: 0]
  ------------------
  169|      0|            *slen = encap_slen;
  170|      0|        return 1;
  171|      0|    }
  172|  3.62k|    if (shsec == NULL) {
  ------------------
  |  Branch (172:9): [True: 0, False: 3.62k]
  ------------------
  173|      0|        ERR_raise_data(ERR_LIB_PROV, PROV_R_NULL_OUTPUT_BUFFER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_NULL_OUTPUT_BUFFER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_NULL_OUTPUT_BUFFER,
  ------------------
  |  |  130|      0|#define PROV_R_NULL_OUTPUT_BUFFER 248
  ------------------
  174|      0|            "NULL shared-secret buffer");
  175|      0|        goto end;
  176|      0|    }
  177|       |
  178|  3.62k|    if (clen == NULL) {
  ------------------
  |  Branch (178:9): [True: 0, False: 3.62k]
  ------------------
  179|      0|        ERR_raise_data(ERR_LIB_PROV, PROV_R_NULL_LENGTH_POINTER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_NULL_LENGTH_POINTER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_NULL_LENGTH_POINTER,
  ------------------
  |  |  129|      0|#define PROV_R_NULL_LENGTH_POINTER 247
  ------------------
  180|      0|            "null ciphertext input/output length pointer");
  181|      0|        goto end;
  182|  3.62k|    } else if (*clen < encap_clen) {
  ------------------
  |  Branch (182:16): [True: 0, False: 3.62k]
  ------------------
  183|      0|        ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  133|      0|#define PROV_R_OUTPUT_BUFFER_TOO_SMALL 106
  ------------------
  184|      0|            "ciphertext buffer too small");
  185|      0|        goto end;
  186|  3.62k|    } else {
  187|  3.62k|        *clen = encap_clen;
  188|  3.62k|    }
  189|       |
  190|  3.62k|    if (slen == NULL) {
  ------------------
  |  Branch (190:9): [True: 0, False: 3.62k]
  ------------------
  191|      0|        ERR_raise_data(ERR_LIB_PROV, PROV_R_NULL_LENGTH_POINTER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_NULL_LENGTH_POINTER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_NULL_LENGTH_POINTER,
  ------------------
  |  |  129|      0|#define PROV_R_NULL_LENGTH_POINTER 247
  ------------------
  192|      0|            "null shared secret input/output length pointer");
  193|      0|        goto end;
  194|  3.62k|    } else if (*slen < encap_slen) {
  ------------------
  |  Branch (194:16): [True: 0, False: 3.62k]
  ------------------
  195|      0|        ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  133|      0|#define PROV_R_OUTPUT_BUFFER_TOO_SMALL 106
  ------------------
  196|      0|            "shared-secret buffer too small");
  197|      0|        goto end;
  198|  3.62k|    } else {
  199|  3.62k|        *slen = encap_slen;
  200|  3.62k|    }
  201|       |
  202|  3.62k|    if (ctx->entropy != NULL)
  ------------------
  |  Branch (202:9): [True: 0, False: 3.62k]
  ------------------
  203|      0|        ret = ossl_ml_kem_encap_seed(ctext, encap_clen, shsec, encap_slen,
  204|      0|            ctx->entropy, ML_KEM_RANDOM_BYTES, key);
  ------------------
  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  205|  3.62k|    else
  206|  3.62k|        ret = ossl_ml_kem_encap_rand(ctext, encap_clen, shsec, encap_slen, key);
  207|       |
  208|  3.62k|end:
  209|       |    /*
  210|       |     * One shot entropy, each encapsulate call must either provide a new
  211|       |     * "ikmE", or else will use a random value.  If a caller sets an explicit
  212|       |     * ikmE once for testing, and later performs multiple encapsulations
  213|       |     * without again calling encapsulate_init(), these should not share the
  214|       |     * original entropy.
  215|       |     */
  216|  3.62k|    if (ctx->entropy != NULL) {
  ------------------
  |  Branch (216:9): [True: 0, False: 3.62k]
  ------------------
  217|      0|        OPENSSL_cleanse(ctx->entropy, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  218|       |        ctx->entropy = NULL;
  219|      0|    }
  220|  3.62k|    return ret;
  221|  3.62k|}
ml_kem_kem.c:ml_kem_decapsulate_init:
  101|  3.62k|{
  102|  3.62k|    ML_KEM_KEY *key = vkey;
  103|       |
  104|  3.62k|    if (!ossl_ml_kem_have_prvkey(key)) {
  ------------------
  |  |  208|  3.62k|#define ossl_ml_kem_have_prvkey(key) ((key)->s != NULL)
  ------------------
  |  Branch (104:9): [True: 0, False: 3.62k]
  ------------------
  105|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  106|      0|        return 0;
  107|      0|    }
  108|  3.62k|    return ml_kem_init(vctx, EVP_PKEY_OP_DECAPSULATE, key, params);
  ------------------
  |  | 1540|  3.62k|#define EVP_PKEY_OP_DECAPSULATE (1 << 13)
  ------------------
  109|  3.62k|}
ml_kem_kem.c:ml_kem_decapsulate:
  225|  3.62k|{
  226|  3.62k|    PROV_ML_KEM_CTX *ctx = vctx;
  227|  3.62k|    ML_KEM_KEY *key = ctx->key;
  228|  3.62k|    size_t decap_slen = ML_KEM_SHARED_SECRET_BYTES;
  ------------------
  |  |   51|  3.62k|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
  229|       |
  230|  3.62k|    if (!ossl_ml_kem_have_prvkey(key)) {
  ------------------
  |  |  208|  3.62k|#define ossl_ml_kem_have_prvkey(key) ((key)->s != NULL)
  ------------------
  |  Branch (230:9): [True: 0, False: 3.62k]
  ------------------
  231|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  232|      0|        return 0;
  233|      0|    }
  234|       |
  235|  3.62k|    if (shsec == NULL) {
  ------------------
  |  Branch (235:9): [True: 0, False: 3.62k]
  ------------------
  236|      0|        if (slen == NULL)
  ------------------
  |  Branch (236:13): [True: 0, False: 0]
  ------------------
  237|      0|            return 0;
  238|      0|        *slen = ML_KEM_SHARED_SECRET_BYTES;
  ------------------
  |  |   51|      0|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
  239|      0|        return 1;
  240|      0|    }
  241|       |
  242|       |    /* For now tolerate newly-deprecated NULL length pointers. */
  243|  3.62k|    if (slen == NULL) {
  ------------------
  |  Branch (243:9): [True: 0, False: 3.62k]
  ------------------
  244|      0|        slen = &decap_slen;
  245|  3.62k|    } else if (*slen < decap_slen) {
  ------------------
  |  Branch (245:16): [True: 0, False: 3.62k]
  ------------------
  246|      0|        ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  133|      0|#define PROV_R_OUTPUT_BUFFER_TOO_SMALL 106
  ------------------
  247|      0|            "shared-secret buffer too small");
  248|      0|        return 0;
  249|  3.62k|    } else {
  250|  3.62k|        *slen = decap_slen;
  251|  3.62k|    }
  252|       |
  253|       |    /* ML-KEM decap handles incorrect ciphertext lengths internally */
  254|  3.62k|    return ossl_ml_kem_decap(shsec, decap_slen, ctext, clen, key);
  255|  3.62k|}
ml_kem_kem.c:ml_kem_freectx:
   63|  7.25k|{
   64|  7.25k|    PROV_ML_KEM_CTX *ctx = vctx;
   65|       |
   66|  7.25k|    if (ctx->entropy != NULL)
  ------------------
  |  Branch (66:9): [True: 0, False: 7.25k]
  ------------------
   67|      0|        OPENSSL_cleanse(ctx->entropy, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
   68|  7.25k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   69|  7.25k|}
ml_kem_kem.c:ml_kem_set_ctx_params:
  112|  7.25k|{
  113|  7.25k|    PROV_ML_KEM_CTX *ctx = vctx;
  114|  7.25k|    struct ml_kem_set_ctx_params_st p;
  115|       |
  116|  7.25k|    if (ctx == NULL || !ml_kem_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (116:9): [True: 0, False: 7.25k]
  |  Branch (116:24): [True: 0, False: 7.25k]
  ------------------
  117|      0|        return 0;
  118|       |
  119|       |    /* Encapsulation ephemeral input key material "ikmE" */
  120|  7.25k|    if (ctx->op == EVP_PKEY_OP_ENCAPSULATE && p.ikme != NULL) {
  ------------------
  |  | 1539|  14.5k|#define EVP_PKEY_OP_ENCAPSULATE (1 << 12)
  ------------------
  |  Branch (120:9): [True: 3.62k, False: 3.62k]
  |  Branch (120:47): [True: 0, False: 3.62k]
  ------------------
  121|      0|        size_t len = ML_KEM_RANDOM_BYTES;
  ------------------
  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  122|       |
  123|      0|        ctx->entropy = ctx->entropy_buf;
  124|      0|        if (OSSL_PARAM_get_octet_string(p.ikme, (void **)&ctx->entropy,
  ------------------
  |  Branch (124:13): [True: 0, False: 0]
  ------------------
  125|      0|                len, &len)
  126|      0|            && len == ML_KEM_RANDOM_BYTES)
  ------------------
  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  |  Branch (126:16): [True: 0, False: 0]
  ------------------
  127|      0|            return 1;
  128|       |
  129|       |        /* Possibly, but much less likely wrong type */
  130|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_SEED_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  131|      0|        OPENSSL_cleanse((void *)ctx->entropy_buf, sizeof(ctx->entropy_buf));
  132|      0|        ctx->entropy = NULL;
  133|      0|        return 0;
  134|      0|    }
  135|       |
  136|  7.25k|    return 1;
  137|  7.25k|}

ml_kem_kem.c:ml_kem_set_ctx_params_decoder:
   29|  7.25k|{
   30|  7.25k|    const char *s;
   31|       |
   32|  7.25k|    memset(r, 0, sizeof(*r));
   33|  7.25k|    if (p != NULL)
  ------------------
  |  Branch (33:9): [True: 0, False: 7.25k]
  ------------------
   34|      0|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (34:16): [True: 0, False: 0]
  ------------------
   35|      0|            if (ossl_likely(strcmp("ikme", s + 0) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   36|       |                /* OSSL_KEM_PARAM_IKME */
   37|      0|                if (ossl_unlikely(r->ikme != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   38|      0|                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   39|      0|                                   "param %s is repeated", s);
   40|      0|                    return 0;
   41|      0|                }
   42|      0|                r->ikme = (OSSL_PARAM *)p;
   43|      0|            }
   44|  7.25k|    return 1;
   45|  7.25k|}

mlx_kem.c:mlx_kem_newctx:
   39|  7.25k|{
   40|  7.25k|    PROV_MLX_KEM_CTX *ctx;
   41|       |
   42|  7.25k|    if ((ctx = OPENSSL_malloc(sizeof(*ctx))) == NULL)
  ------------------
  |  |  107|  7.25k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (42:9): [True: 0, False: 7.25k]
  ------------------
   43|      0|        return NULL;
   44|       |
   45|  7.25k|    ctx->libctx = PROV_LIBCTX_OF(provctx);
  ------------------
  |  |   31|  7.25k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
   46|       |    ctx->key = NULL;
   47|  7.25k|    ctx->op = 0;
   48|  7.25k|    return ctx;
   49|  7.25k|}
mlx_kem.c:mlx_kem_encapsulate_init:
   70|  3.62k|{
   71|  3.62k|    MLX_KEY *key = vkey;
   72|       |
   73|  3.62k|    if (!mlx_kem_have_pubkey(key)) {
  ------------------
  |  |   44|  3.62k|#define mlx_kem_have_pubkey(key) ((key)->state > 0)
  ------------------
  |  Branch (73:9): [True: 0, False: 3.62k]
  ------------------
   74|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   75|      0|        return 0;
   76|      0|    }
   77|  3.62k|    return mlx_kem_init(vctx, EVP_PKEY_OP_ENCAPSULATE, key, params);
  ------------------
  |  | 1539|  3.62k|#define EVP_PKEY_OP_ENCAPSULATE (1 << 12)
  ------------------
   78|  3.62k|}
mlx_kem.c:mlx_kem_init:
   58|  7.25k|{
   59|  7.25k|    PROV_MLX_KEM_CTX *ctx = vctx;
   60|       |
   61|  7.25k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (61:9): [True: 0, False: 7.25k]
  ------------------
   62|      0|        return 0;
   63|  7.25k|    ctx->key = key;
   64|  7.25k|    ctx->op = op;
   65|  7.25k|    return 1;
   66|  7.25k|}
mlx_kem.c:mlx_kem_encapsulate:
  108|  7.25k|{
  109|  7.25k|    MLX_KEY *key = ((PROV_MLX_KEM_CTX *)vctx)->key;
  110|  7.25k|    EVP_PKEY_CTX *ctx = NULL;
  111|  7.25k|    EVP_PKEY *xkey = NULL;
  112|  7.25k|    size_t encap_clen;
  113|  7.25k|    size_t encap_slen;
  114|  7.25k|    uint8_t *cbuf;
  115|  7.25k|    uint8_t *sbuf;
  116|  7.25k|    int ml_kem_slot = key->xinfo->ml_kem_slot;
  117|  7.25k|    int ret = 0;
  118|       |
  119|  7.25k|    if (!mlx_kem_have_pubkey(key)) {
  ------------------
  |  |   44|  7.25k|#define mlx_kem_have_pubkey(key) ((key)->state > 0)
  ------------------
  |  Branch (119:9): [True: 0, False: 7.25k]
  ------------------
  120|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  121|      0|        return 0;
  122|      0|    }
  123|  7.25k|    encap_clen = key->minfo->ctext_bytes + key->xinfo->pubkey_bytes;
  124|  7.25k|    encap_slen = ML_KEM_SHARED_SECRET_BYTES + key->xinfo->shsec_bytes;
  ------------------
  |  |   51|  7.25k|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
  125|       |
  126|  7.25k|    if (ctext == NULL) {
  ------------------
  |  Branch (126:9): [True: 3.62k, False: 3.62k]
  ------------------
  127|  3.62k|        if (clen == NULL && slen == NULL)
  ------------------
  |  Branch (127:13): [True: 0, False: 3.62k]
  |  Branch (127:29): [True: 0, False: 0]
  ------------------
  128|      0|            return 0;
  129|  3.62k|        if (clen != NULL)
  ------------------
  |  Branch (129:13): [True: 3.62k, False: 0]
  ------------------
  130|  3.62k|            *clen = encap_clen;
  131|  3.62k|        if (slen != NULL)
  ------------------
  |  Branch (131:13): [True: 3.62k, False: 0]
  ------------------
  132|  3.62k|            *slen = encap_slen;
  133|  3.62k|        return 1;
  134|  3.62k|    }
  135|  3.62k|    if (shsec == NULL) {
  ------------------
  |  Branch (135:9): [True: 0, False: 3.62k]
  ------------------
  136|      0|        ERR_raise_data(ERR_LIB_PROV, PROV_R_NULL_OUTPUT_BUFFER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_NULL_OUTPUT_BUFFER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_NULL_OUTPUT_BUFFER,
  ------------------
  |  |  130|      0|#define PROV_R_NULL_OUTPUT_BUFFER 248
  ------------------
  137|      0|            "null shared-secret output buffer");
  138|      0|        return 0;
  139|      0|    }
  140|       |
  141|  3.62k|    if (clen == NULL) {
  ------------------
  |  Branch (141:9): [True: 0, False: 3.62k]
  ------------------
  142|      0|        ERR_raise_data(ERR_LIB_PROV, PROV_R_NULL_LENGTH_POINTER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_NULL_LENGTH_POINTER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_NULL_LENGTH_POINTER,
  ------------------
  |  |  129|      0|#define PROV_R_NULL_LENGTH_POINTER 247
  ------------------
  143|      0|            "null ciphertext input/output length pointer");
  144|      0|        return 0;
  145|  3.62k|    } else if (*clen < encap_clen) {
  ------------------
  |  Branch (145:16): [True: 0, False: 3.62k]
  ------------------
  146|      0|        ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  133|      0|#define PROV_R_OUTPUT_BUFFER_TOO_SMALL 106
  ------------------
  147|      0|            "ciphertext buffer too small");
  148|      0|        return 0;
  149|  3.62k|    } else {
  150|  3.62k|        *clen = encap_clen;
  151|  3.62k|    }
  152|       |
  153|  3.62k|    if (slen == NULL) {
  ------------------
  |  Branch (153:9): [True: 0, False: 3.62k]
  ------------------
  154|      0|        ERR_raise_data(ERR_LIB_PROV, PROV_R_NULL_LENGTH_POINTER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_NULL_LENGTH_POINTER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_NULL_LENGTH_POINTER,
  ------------------
  |  |  129|      0|#define PROV_R_NULL_LENGTH_POINTER 247
  ------------------
  155|      0|            "null shared secret input/output length pointer");
  156|      0|        return 0;
  157|  3.62k|    } else if (*slen < encap_slen) {
  ------------------
  |  Branch (157:16): [True: 0, False: 3.62k]
  ------------------
  158|      0|        ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  133|      0|#define PROV_R_OUTPUT_BUFFER_TOO_SMALL 106
  ------------------
  159|      0|            "shared-secret buffer too small");
  160|      0|        return 0;
  161|  3.62k|    } else {
  162|  3.62k|        *slen = encap_slen;
  163|  3.62k|    }
  164|       |
  165|       |    /* ML-KEM encapsulation */
  166|  3.62k|    encap_clen = key->minfo->ctext_bytes;
  167|  3.62k|    encap_slen = ML_KEM_SHARED_SECRET_BYTES;
  ------------------
  |  |   51|  3.62k|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
  168|  3.62k|    cbuf = ctext + ml_kem_slot * key->xinfo->pubkey_bytes;
  169|  3.62k|    sbuf = shsec + ml_kem_slot * key->xinfo->shsec_bytes;
  170|  3.62k|    ctx = EVP_PKEY_CTX_new_from_pkey(key->libctx, key->mkey, key->propq);
  171|  3.62k|    if (ctx == NULL
  ------------------
  |  Branch (171:9): [True: 0, False: 3.62k]
  ------------------
  172|  3.62k|        || EVP_PKEY_encapsulate_init(ctx, NULL) <= 0
  ------------------
  |  Branch (172:12): [True: 0, False: 3.62k]
  ------------------
  173|  3.62k|        || EVP_PKEY_encapsulate(ctx, cbuf, &encap_clen, sbuf, &encap_slen) <= 0)
  ------------------
  |  Branch (173:12): [True: 0, False: 3.62k]
  ------------------
  174|      0|        goto end;
  175|  3.62k|    if (encap_clen != key->minfo->ctext_bytes) {
  ------------------
  |  Branch (175:9): [True: 0, False: 3.62k]
  ------------------
  176|      0|        ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  177|      0|            "unexpected %s ciphertext output size: %lu",
  178|      0|            key->minfo->algorithm_name, (unsigned long)encap_clen);
  179|      0|        goto end;
  180|      0|    }
  181|  3.62k|    if (encap_slen != ML_KEM_SHARED_SECRET_BYTES) {
  ------------------
  |  |   51|  3.62k|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
  |  Branch (181:9): [True: 0, False: 3.62k]
  ------------------
  182|      0|        ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  183|      0|            "unexpected %s shared secret output size: %lu",
  184|      0|            key->minfo->algorithm_name, (unsigned long)encap_slen);
  185|      0|        goto end;
  186|      0|    }
  187|  3.62k|    EVP_PKEY_CTX_free(ctx);
  188|       |
  189|       |    /*-
  190|       |     * ECDHE encapsulation
  191|       |     *
  192|       |     * Generate own ephemeral private key and add its public key to ctext.
  193|       |     *
  194|       |     * Note, we could support a settable parameter that sets an extant ECDH
  195|       |     * keypair as the keys to use in encap, making it possible to reuse the
  196|       |     * same (TLS client) ECDHE keypair for both the classical EC keyshare and a
  197|       |     * corresponding ECDHE + ML-KEM keypair.  But the TLS layer would then need
  198|       |     * know that this is a hybrid, and that it can partly reuse the same keys
  199|       |     * as another group for which a keyshare will be sent.  Deferred until we
  200|       |     * support generating multiple keyshares, there's a workable keyshare
  201|       |     * prediction specification, and the optimisation is justified.
  202|       |     */
  203|  3.62k|    cbuf = ctext + (1 - ml_kem_slot) * key->minfo->ctext_bytes;
  204|  3.62k|    encap_clen = key->xinfo->pubkey_bytes;
  205|  3.62k|    ctx = EVP_PKEY_CTX_new_from_pkey(key->libctx, key->xkey, key->propq);
  206|  3.62k|    if (ctx == NULL
  ------------------
  |  Branch (206:9): [True: 0, False: 3.62k]
  ------------------
  207|  3.62k|        || EVP_PKEY_keygen_init(ctx) <= 0
  ------------------
  |  Branch (207:12): [True: 0, False: 3.62k]
  ------------------
  208|  3.62k|        || EVP_PKEY_keygen(ctx, &xkey) <= 0
  ------------------
  |  Branch (208:12): [True: 0, False: 3.62k]
  ------------------
  209|  3.62k|        || EVP_PKEY_get_octet_string_param(xkey, OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY,
  ------------------
  |  |  407|  3.62k|# define OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY "encoded-pub-key"
  ------------------
  |  Branch (209:12): [True: 0, False: 3.62k]
  ------------------
  210|  3.62k|               cbuf, encap_clen, &encap_clen)
  211|  3.62k|            <= 0)
  212|      0|        goto end;
  213|  3.62k|    if (encap_clen != key->xinfo->pubkey_bytes) {
  ------------------
  |  Branch (213:9): [True: 0, False: 3.62k]
  ------------------
  214|      0|        ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  215|      0|            "unexpected %s public key output size: %lu",
  216|      0|            key->xinfo->algorithm_name, (unsigned long)encap_clen);
  217|      0|        goto end;
  218|      0|    }
  219|  3.62k|    EVP_PKEY_CTX_free(ctx);
  220|       |
  221|       |    /* Derive the ECDH shared secret */
  222|  3.62k|    encap_slen = key->xinfo->shsec_bytes;
  223|  3.62k|    sbuf = shsec + (1 - ml_kem_slot) * ML_KEM_SHARED_SECRET_BYTES;
  ------------------
  |  |   51|  3.62k|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
  224|  3.62k|    ctx = EVP_PKEY_CTX_new_from_pkey(key->libctx, xkey, key->propq);
  225|  3.62k|    if (ctx == NULL
  ------------------
  |  Branch (225:9): [True: 0, False: 3.62k]
  ------------------
  226|  3.62k|        || EVP_PKEY_derive_init(ctx) <= 0
  ------------------
  |  Branch (226:12): [True: 0, False: 3.62k]
  ------------------
  227|  3.62k|        || EVP_PKEY_derive_set_peer(ctx, key->xkey) <= 0
  ------------------
  |  Branch (227:12): [True: 0, False: 3.62k]
  ------------------
  228|  3.62k|        || EVP_PKEY_derive(ctx, sbuf, &encap_slen) <= 0)
  ------------------
  |  Branch (228:12): [True: 0, False: 3.62k]
  ------------------
  229|      0|        goto end;
  230|  3.62k|    if (encap_slen != key->xinfo->shsec_bytes) {
  ------------------
  |  Branch (230:9): [True: 0, False: 3.62k]
  ------------------
  231|      0|        ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  232|      0|            "unexpected %s shared secret output size: %lu",
  233|      0|            key->xinfo->algorithm_name, (unsigned long)encap_slen);
  234|      0|        goto end;
  235|      0|    }
  236|       |
  237|  3.62k|    ret = 1;
  238|  3.62k|end:
  239|       |    /* Erase any partial shared secret on failure */
  240|  3.62k|    if (ret == 0)
  ------------------
  |  Branch (240:9): [True: 0, False: 3.62k]
  ------------------
  241|      0|        OPENSSL_cleanse(shsec,
  242|      0|            ML_KEM_SHARED_SECRET_BYTES + key->xinfo->shsec_bytes);
  ------------------
  |  |   51|      0|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
  243|  3.62k|    EVP_PKEY_free(xkey);
  244|  3.62k|    EVP_PKEY_CTX_free(ctx);
  245|  3.62k|    return ret;
  246|  3.62k|}
mlx_kem.c:mlx_kem_decapsulate_init:
   82|  3.62k|{
   83|  3.62k|    MLX_KEY *key = vkey;
   84|       |
   85|  3.62k|    if (!mlx_kem_have_prvkey(key)) {
  ------------------
  |  |   45|  3.62k|#define mlx_kem_have_prvkey(key) ((key)->state > 1)
  ------------------
  |  Branch (85:9): [True: 0, False: 3.62k]
  ------------------
   86|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   87|      0|        return 0;
   88|      0|    }
   89|  3.62k|    return mlx_kem_init(vctx, EVP_PKEY_OP_DECAPSULATE, key, params);
  ------------------
  |  | 1540|  3.62k|#define EVP_PKEY_OP_DECAPSULATE (1 << 13)
  ------------------
   90|  3.62k|}
mlx_kem.c:mlx_kem_decapsulate:
  250|  7.25k|{
  251|  7.25k|    MLX_KEY *key = ((PROV_MLX_KEM_CTX *)vctx)->key;
  252|  7.25k|    EVP_PKEY_CTX *ctx = NULL;
  253|  7.25k|    EVP_PKEY *xkey = NULL;
  254|  7.25k|    const uint8_t *cbuf;
  255|  7.25k|    uint8_t *sbuf;
  256|  7.25k|    size_t decap_slen = ML_KEM_SHARED_SECRET_BYTES + key->xinfo->shsec_bytes;
  ------------------
  |  |   51|  7.25k|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
  257|  7.25k|    size_t decap_clen = key->minfo->ctext_bytes + key->xinfo->pubkey_bytes;
  258|  7.25k|    int ml_kem_slot = key->xinfo->ml_kem_slot;
  259|  7.25k|    int ret = 0;
  260|       |
  261|  7.25k|    if (!mlx_kem_have_prvkey(key)) {
  ------------------
  |  |   45|  7.25k|#define mlx_kem_have_prvkey(key) ((key)->state > 1)
  ------------------
  |  Branch (261:9): [True: 0, False: 7.25k]
  ------------------
  262|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  263|      0|        return 0;
  264|      0|    }
  265|       |
  266|  7.25k|    if (shsec == NULL) {
  ------------------
  |  Branch (266:9): [True: 3.62k, False: 3.62k]
  ------------------
  267|  3.62k|        if (slen == NULL)
  ------------------
  |  Branch (267:13): [True: 0, False: 3.62k]
  ------------------
  268|      0|            return 0;
  269|  3.62k|        *slen = decap_slen;
  270|  3.62k|        return 1;
  271|  3.62k|    }
  272|       |
  273|       |    /* For now tolerate newly-deprecated NULL length pointers. */
  274|  3.62k|    if (slen == NULL) {
  ------------------
  |  Branch (274:9): [True: 0, False: 3.62k]
  ------------------
  275|      0|        slen = &decap_slen;
  276|  3.62k|    } else if (*slen < decap_slen) {
  ------------------
  |  Branch (276:16): [True: 0, False: 3.62k]
  ------------------
  277|      0|        ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  133|      0|#define PROV_R_OUTPUT_BUFFER_TOO_SMALL 106
  ------------------
  278|      0|            "shared-secret buffer too small");
  279|      0|        return 0;
  280|  3.62k|    } else {
  281|  3.62k|        *slen = decap_slen;
  282|  3.62k|    }
  283|  3.62k|    if (clen != decap_clen) {
  ------------------
  |  Branch (283:9): [True: 0, False: 3.62k]
  ------------------
  284|      0|        ERR_raise_data(ERR_LIB_PROV, PROV_R_WRONG_CIPHERTEXT_SIZE,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_WRONG_CIPHERTEXT_SIZE,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_WRONG_CIPHERTEXT_SIZE,
  ------------------
  |  |  169|      0|#define PROV_R_WRONG_CIPHERTEXT_SIZE 251
  ------------------
  285|      0|            "wrong decapsulation input ciphertext size: %lu",
  286|      0|            (unsigned long)clen);
  287|      0|        return 0;
  288|      0|    }
  289|       |
  290|       |    /* ML-KEM decapsulation */
  291|  3.62k|    decap_clen = key->minfo->ctext_bytes;
  292|  3.62k|    decap_slen = ML_KEM_SHARED_SECRET_BYTES;
  ------------------
  |  |   51|  3.62k|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
  293|  3.62k|    cbuf = ctext + ml_kem_slot * key->xinfo->pubkey_bytes;
  294|  3.62k|    sbuf = shsec + ml_kem_slot * key->xinfo->shsec_bytes;
  295|  3.62k|    ctx = EVP_PKEY_CTX_new_from_pkey(key->libctx, key->mkey, key->propq);
  296|  3.62k|    if (ctx == NULL
  ------------------
  |  Branch (296:9): [True: 0, False: 3.62k]
  ------------------
  297|  3.62k|        || EVP_PKEY_decapsulate_init(ctx, NULL) <= 0
  ------------------
  |  Branch (297:12): [True: 0, False: 3.62k]
  ------------------
  298|  3.62k|        || EVP_PKEY_decapsulate(ctx, sbuf, &decap_slen, cbuf, decap_clen) <= 0)
  ------------------
  |  Branch (298:12): [True: 0, False: 3.62k]
  ------------------
  299|      0|        goto end;
  300|  3.62k|    if (decap_slen != ML_KEM_SHARED_SECRET_BYTES) {
  ------------------
  |  |   51|  3.62k|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
  |  Branch (300:9): [True: 0, False: 3.62k]
  ------------------
  301|      0|        ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  302|      0|            "unexpected %s shared secret output size: %lu",
  303|      0|            key->minfo->algorithm_name, (unsigned long)decap_slen);
  304|      0|        goto end;
  305|      0|    }
  306|  3.62k|    EVP_PKEY_CTX_free(ctx);
  307|       |
  308|       |    /* ECDH decapsulation */
  309|  3.62k|    decap_clen = key->xinfo->pubkey_bytes;
  310|  3.62k|    decap_slen = key->xinfo->shsec_bytes;
  311|  3.62k|    cbuf = ctext + (1 - ml_kem_slot) * key->minfo->ctext_bytes;
  312|  3.62k|    sbuf = shsec + (1 - ml_kem_slot) * ML_KEM_SHARED_SECRET_BYTES;
  ------------------
  |  |   51|  3.62k|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
  313|  3.62k|    ctx = EVP_PKEY_CTX_new_from_pkey(key->libctx, key->xkey, key->propq);
  314|  3.62k|    if (ctx == NULL
  ------------------
  |  Branch (314:9): [True: 0, False: 3.62k]
  ------------------
  315|  3.62k|        || (xkey = EVP_PKEY_new()) == NULL
  ------------------
  |  Branch (315:12): [True: 0, False: 3.62k]
  ------------------
  316|  3.62k|        || EVP_PKEY_copy_parameters(xkey, key->xkey) <= 0
  ------------------
  |  Branch (316:12): [True: 0, False: 3.62k]
  ------------------
  317|  3.62k|        || EVP_PKEY_set1_encoded_public_key(xkey, cbuf, decap_clen) <= 0
  ------------------
  |  Branch (317:12): [True: 0, False: 3.62k]
  ------------------
  318|  3.62k|        || EVP_PKEY_derive_init(ctx) <= 0
  ------------------
  |  Branch (318:12): [True: 0, False: 3.62k]
  ------------------
  319|  3.62k|        || EVP_PKEY_derive_set_peer(ctx, xkey) <= 0
  ------------------
  |  Branch (319:12): [True: 0, False: 3.62k]
  ------------------
  320|  3.62k|        || EVP_PKEY_derive(ctx, sbuf, &decap_slen) <= 0)
  ------------------
  |  Branch (320:12): [True: 0, False: 3.62k]
  ------------------
  321|      0|        goto end;
  322|  3.62k|    if (decap_slen != key->xinfo->shsec_bytes) {
  ------------------
  |  Branch (322:9): [True: 0, False: 3.62k]
  ------------------
  323|      0|        ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  324|      0|            "unexpected %s shared secret output size: %lu",
  325|      0|            key->xinfo->algorithm_name, (unsigned long)decap_slen);
  326|      0|        goto end;
  327|      0|    }
  328|       |
  329|  3.62k|    ret = 1;
  330|  3.62k|end:
  331|       |    /* Erase any partial shared secret on failure */
  332|  3.62k|    if (ret == 0)
  ------------------
  |  Branch (332:9): [True: 0, False: 3.62k]
  ------------------
  333|      0|        OPENSSL_cleanse(shsec,
  334|      0|            ML_KEM_SHARED_SECRET_BYTES + key->xinfo->shsec_bytes);
  ------------------
  |  |   51|      0|#define ML_KEM_SHARED_SECRET_BYTES 32
  ------------------
  335|  3.62k|    EVP_PKEY_CTX_free(ctx);
  336|  3.62k|    EVP_PKEY_free(xkey);
  337|  3.62k|    return ret;
  338|  3.62k|}
mlx_kem.c:mlx_kem_freectx:
   52|  7.25k|{
   53|  7.25k|    OPENSSL_free(vctx);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   54|  7.25k|}

ec_kmgmt.c:ec_load:
 1423|  14.6k|{
 1424|  14.6k|    return common_load(reference, reference_sz, 0);
 1425|  14.6k|}
ec_kmgmt.c:common_load:
 1405|  14.6k|{
 1406|  14.6k|    EC_KEY *ec = NULL;
 1407|       |
 1408|  14.6k|    if (ossl_prov_is_running() && reference_sz == sizeof(ec)) {
  ------------------
  |  Branch (1408:9): [True: 14.6k, False: 0]
  |  Branch (1408:35): [True: 14.6k, False: 0]
  ------------------
 1409|       |        /* The contents of the reference is the address to our object */
 1410|  14.6k|        ec = *(EC_KEY **)reference;
 1411|       |
 1412|  14.6k|        if (!common_check_sm2(ec, sm2_wanted))
  ------------------
  |  Branch (1412:13): [True: 0, False: 14.6k]
  ------------------
 1413|      0|            return NULL;
 1414|       |
 1415|       |        /* We grabbed, so we detach it */
 1416|  14.6k|        *(EC_KEY **)reference = NULL;
 1417|  14.6k|        return ec;
 1418|  14.6k|    }
 1419|      0|    return NULL;
 1420|  14.6k|}
ec_kmgmt.c:common_check_sm2:
  415|  14.6k|{
  416|  14.6k|    const EC_GROUP *ecg = NULL;
  417|       |
  418|       |    /*
  419|       |     * sm2_wanted: import the keys or domparams only on SM2 Curve
  420|       |     * !sm2_wanted: import the keys or domparams only not on SM2 Curve
  421|       |     */
  422|  14.6k|    if ((ecg = EC_KEY_get0_group(ec)) == NULL
  ------------------
  |  Branch (422:9): [True: 0, False: 14.6k]
  ------------------
  423|  14.6k|        || (sm2_wanted ^ (EC_GROUP_get_curve_name(ecg) == NID_sm2)))
  ------------------
  |  | 1259|  14.6k|#define NID_sm2         1172
  ------------------
  |  Branch (423:12): [True: 0, False: 14.6k]
  ------------------
  424|      0|        return 0;
  425|  14.6k|    return 1;
  426|  14.6k|}
ec_kmgmt.c:ec_freedata:
  339|  14.6k|{
  340|  14.6k|    EC_KEY_free(keydata);
  341|  14.6k|}
ec_kmgmt.c:ec_get_params:
  765|  25.5k|{
  766|  25.5k|    return common_get_params(key, params, 0);
  767|  25.5k|}
ec_kmgmt.c:common_get_params:
  663|  25.5k|{
  664|  25.5k|    int ret = 0;
  665|  25.5k|    EC_KEY *eck = key;
  666|  25.5k|    const EC_GROUP *ecg = NULL;
  667|  25.5k|    OSSL_PARAM *p;
  668|  25.5k|    unsigned char *pub_key = NULL, *genbuf = NULL;
  669|  25.5k|    OSSL_LIB_CTX *libctx;
  670|  25.5k|    const char *propq;
  671|  25.5k|    BN_CTX *bnctx = NULL;
  672|       |
  673|  25.5k|    ecg = EC_KEY_get0_group(eck);
  674|  25.5k|    if (ecg == NULL) {
  ------------------
  |  Branch (674:9): [True: 0, False: 25.5k]
  ------------------
  675|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_NO_PARAMETERS_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  676|      0|        return 0;
  677|      0|    }
  678|       |
  679|  25.5k|    libctx = ossl_ec_key_get_libctx(eck);
  680|  25.5k|    propq = ossl_ec_key_get0_propq(eck);
  681|       |
  682|  25.5k|    bnctx = BN_CTX_new_ex(libctx);
  683|  25.5k|    if (bnctx == NULL)
  ------------------
  |  Branch (683:9): [True: 0, False: 25.5k]
  ------------------
  684|      0|        return 0;
  685|  25.5k|    BN_CTX_start(bnctx);
  686|       |
  687|  25.5k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_MAX_SIZE)) != NULL
  ------------------
  |  |  432|  25.5k|# define OSSL_PKEY_PARAM_MAX_SIZE "max-size"
  ------------------
  |  Branch (687:9): [True: 14.6k, False: 10.8k]
  ------------------
  688|  14.6k|        && !OSSL_PARAM_set_int(p, ECDSA_size(eck)))
  ------------------
  |  Branch (688:12): [True: 0, False: 14.6k]
  ------------------
  689|      0|        goto err;
  690|  25.5k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_BITS)) != NULL
  ------------------
  |  |  374|  25.5k|# define OSSL_PKEY_PARAM_BITS "bits"
  ------------------
  |  Branch (690:9): [True: 14.6k, False: 10.8k]
  ------------------
  691|  14.6k|        && !OSSL_PARAM_set_int(p, EC_GROUP_order_bits(ecg)))
  ------------------
  |  Branch (691:12): [True: 0, False: 14.6k]
  ------------------
  692|      0|        goto err;
  693|  25.5k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_EC_FIELD_DEGREE)) != NULL
  ------------------
  |  |  396|  25.5k|# define OSSL_PKEY_PARAM_EC_FIELD_DEGREE "field-degree"
  ------------------
  |  Branch (693:9): [True: 0, False: 25.5k]
  ------------------
  694|      0|        && !OSSL_PARAM_set_int(p, EC_GROUP_get_degree(ecg)))
  ------------------
  |  Branch (694:12): [True: 0, False: 0]
  ------------------
  695|      0|        goto err;
  696|  25.5k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_SECURITY_BITS)) != NULL
  ------------------
  |  |  506|  25.5k|# define OSSL_PKEY_PARAM_SECURITY_BITS "security-bits"
  ------------------
  |  Branch (696:9): [True: 14.6k, False: 10.8k]
  ------------------
  697|  14.6k|        && !OSSL_PARAM_set_int(p, EC_GROUP_security_bits(ecg)))
  ------------------
  |  Branch (697:12): [True: 0, False: 14.6k]
  ------------------
  698|      0|        goto err;
  699|  25.5k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_SECURITY_CATEGORY)) != NULL)
  ------------------
  |  |  507|  25.5k|# define OSSL_PKEY_PARAM_SECURITY_CATEGORY OSSL_ALG_PARAM_SECURITY_CATEGORY
  |  |  ------------------
  |  |  |  |  131|  25.5k|# define OSSL_ALG_PARAM_SECURITY_CATEGORY "security-category"
  |  |  ------------------
  ------------------
  |  Branch (699:9): [True: 14.6k, False: 10.8k]
  ------------------
  700|  14.6k|        if (!OSSL_PARAM_set_int(p, 0))
  ------------------
  |  Branch (700:13): [True: 0, False: 14.6k]
  ------------------
  701|      0|            goto err;
  702|       |
  703|  25.5k|    if ((p = OSSL_PARAM_locate(params,
  ------------------
  |  Branch (703:9): [True: 0, False: 25.5k]
  ------------------
  704|  25.5k|             OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS))
  ------------------
  |  |  394|  25.5k|# define OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS "decoded-from-explicit"
  ------------------
  705|  25.5k|        != NULL) {
  706|      0|        int explicitparams = EC_KEY_decoded_from_explicit_params(eck);
  707|       |
  708|      0|        if (explicitparams < 0
  ------------------
  |  Branch (708:13): [True: 0, False: 0]
  ------------------
  709|      0|            || !OSSL_PARAM_set_int(p, explicitparams))
  ------------------
  |  Branch (709:16): [True: 0, False: 0]
  ------------------
  710|      0|            goto err;
  711|      0|    }
  712|       |
  713|  25.5k|    if (!sm2) {
  ------------------
  |  Branch (713:9): [True: 25.5k, False: 0]
  ------------------
  714|  25.5k|        if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_DEFAULT_DIGEST)) != NULL
  ------------------
  |  |  378|  25.5k|# define OSSL_PKEY_PARAM_DEFAULT_DIGEST "default-digest"
  ------------------
  |  Branch (714:13): [True: 0, False: 25.5k]
  ------------------
  715|      0|            && !OSSL_PARAM_set_utf8_string(p, EC_DEFAULT_MD))
  ------------------
  |  |   79|      0|#define EC_DEFAULT_MD "SHA256"
  ------------------
  |  Branch (715:16): [True: 0, False: 0]
  ------------------
  716|      0|            goto err;
  717|  25.5k|    } else {
  718|      0|        if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_DEFAULT_DIGEST)) != NULL
  ------------------
  |  |  378|      0|# define OSSL_PKEY_PARAM_DEFAULT_DIGEST "default-digest"
  ------------------
  |  Branch (718:13): [True: 0, False: 0]
  ------------------
  719|      0|            && !OSSL_PARAM_set_utf8_string(p, SM2_DEFAULT_MD))
  ------------------
  |  |   82|      0|#define SM2_DEFAULT_MD "SM3"
  ------------------
  |  Branch (719:16): [True: 0, False: 0]
  ------------------
  720|      0|            goto err;
  721|      0|    }
  722|       |
  723|       |    /* SM2 doesn't support this PARAM */
  724|  25.5k|    if (!sm2) {
  ------------------
  |  Branch (724:9): [True: 25.5k, False: 0]
  ------------------
  725|  25.5k|        p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_USE_COFACTOR_ECDH);
  ------------------
  |  |  509|  25.5k|# define OSSL_PKEY_PARAM_USE_COFACTOR_ECDH OSSL_PKEY_PARAM_USE_COFACTOR_FLAG
  |  |  ------------------
  |  |  |  |  510|  25.5k|# define OSSL_PKEY_PARAM_USE_COFACTOR_FLAG "use-cofactor-flag"
  |  |  ------------------
  ------------------
  726|  25.5k|        if (p != NULL) {
  ------------------
  |  Branch (726:13): [True: 0, False: 25.5k]
  ------------------
  727|      0|            int ecdh_cofactor_mode = 0;
  728|       |
  729|      0|            ecdh_cofactor_mode = (EC_KEY_get_flags(eck) & EC_FLAG_COFACTOR_ECDH) ? 1 : 0;
  ------------------
  |  |  963|      0|#define EC_FLAG_COFACTOR_ECDH 0x1000
  ------------------
  |  Branch (729:34): [True: 0, False: 0]
  ------------------
  730|       |
  731|      0|            if (!OSSL_PARAM_set_int(p, ecdh_cofactor_mode))
  ------------------
  |  Branch (731:17): [True: 0, False: 0]
  ------------------
  732|      0|                goto err;
  733|      0|        }
  734|  25.5k|    }
  735|  25.5k|    if ((p = OSSL_PARAM_locate(params,
  ------------------
  |  Branch (735:9): [True: 0, False: 25.5k]
  ------------------
  736|  25.5k|             OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY))
  ------------------
  |  |  407|  25.5k|# define OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY "encoded-pub-key"
  ------------------
  737|  25.5k|        != NULL) {
  738|      0|        const EC_POINT *ecp = EC_KEY_get0_public_key(key);
  739|       |
  740|      0|        if (ecp == NULL) {
  ------------------
  |  Branch (740:13): [True: 0, False: 0]
  ------------------
  741|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_NOT_A_PUBLIC_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  742|      0|            goto err;
  743|      0|        }
  744|      0|        p->return_size = EC_POINT_point2oct(ecg, ecp,
  745|      0|            POINT_CONVERSION_UNCOMPRESSED,
  746|      0|            p->data, p->data_size, bnctx);
  747|      0|        if (p->return_size == 0)
  ------------------
  |  Branch (747:13): [True: 0, False: 0]
  ------------------
  748|      0|            goto err;
  749|      0|    }
  750|       |
  751|  25.5k|    ret = ec_get_ecm_params(ecg, params)
  ------------------
  |  Branch (751:11): [True: 25.5k, False: 0]
  ------------------
  752|  25.5k|        && ossl_ec_group_todata(ecg, NULL, params, libctx, propq, bnctx,
  ------------------
  |  Branch (752:12): [True: 25.5k, False: 0]
  ------------------
  753|  25.5k|            &genbuf)
  754|  25.5k|        && key_to_params(eck, NULL, params, 1, &pub_key)
  ------------------
  |  Branch (754:12): [True: 25.5k, False: 0]
  ------------------
  755|  25.5k|        && otherparams_to_params(eck, NULL, params);
  ------------------
  |  Branch (755:12): [True: 25.5k, False: 0]
  ------------------
  756|  25.5k|err:
  757|  25.5k|    OPENSSL_free(genbuf);
  ------------------
  |  |  132|  25.5k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  758|  25.5k|    OPENSSL_free(pub_key);
  ------------------
  |  |  132|  25.5k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  759|  25.5k|    BN_CTX_end(bnctx);
  760|  25.5k|    BN_CTX_free(bnctx);
  761|  25.5k|    return ret;
  762|  25.5k|}
ec_kmgmt.c:ec_get_ecm_params:
  612|  25.5k|{
  613|       |#ifdef OPENSSL_NO_EC2M
  614|       |    return 1;
  615|       |#else
  616|  25.5k|    int ret = 0, m;
  617|  25.5k|    unsigned int k1 = 0, k2 = 0, k3 = 0;
  618|  25.5k|    int basis_nid;
  619|  25.5k|    const char *basis_name = NULL;
  620|  25.5k|    int fid = EC_GROUP_get_field_type(group);
  621|       |
  622|  25.5k|    if (fid != NID_X9_62_characteristic_two_field)
  ------------------
  |  |  156|  25.5k|#define NID_X9_62_characteristic_two_field              407
  ------------------
  |  Branch (622:9): [True: 25.5k, False: 0]
  ------------------
  623|  25.5k|        return 1;
  624|       |
  625|      0|    basis_nid = EC_GROUP_get_basis_type(group);
  626|      0|    if (basis_nid == NID_X9_62_tpBasis)
  ------------------
  |  |  168|      0|#define NID_X9_62_tpBasis               682
  ------------------
  |  Branch (626:9): [True: 0, False: 0]
  ------------------
  627|      0|        basis_name = SN_X9_62_tpBasis;
  ------------------
  |  |  167|      0|#define SN_X9_62_tpBasis                "tpBasis"
  ------------------
  628|      0|    else if (basis_nid == NID_X9_62_ppBasis)
  ------------------
  |  |  172|      0|#define NID_X9_62_ppBasis               683
  ------------------
  |  Branch (628:14): [True: 0, False: 0]
  ------------------
  629|      0|        basis_name = SN_X9_62_ppBasis;
  ------------------
  |  |  171|      0|#define SN_X9_62_ppBasis                "ppBasis"
  ------------------
  630|      0|    else
  631|      0|        goto err;
  632|       |
  633|      0|    m = EC_GROUP_get_degree(group);
  634|      0|    if (!ossl_param_build_set_int(NULL, params, OSSL_PKEY_PARAM_EC_CHAR2_M, m)
  ------------------
  |  |  387|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_M "m"
  ------------------
  |  Branch (634:9): [True: 0, False: 0]
  ------------------
  635|      0|        || !ossl_param_build_set_utf8_string(NULL, params,
  ------------------
  |  Branch (635:12): [True: 0, False: 0]
  ------------------
  636|      0|            OSSL_PKEY_PARAM_EC_CHAR2_TYPE,
  ------------------
  |  |  392|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_TYPE "basis-type"
  ------------------
  637|      0|            basis_name))
  638|      0|        goto err;
  639|       |
  640|      0|    if (basis_nid == NID_X9_62_tpBasis) {
  ------------------
  |  |  168|      0|#define NID_X9_62_tpBasis               682
  ------------------
  |  Branch (640:9): [True: 0, False: 0]
  ------------------
  641|      0|        if (!EC_GROUP_get_trinomial_basis(group, &k1)
  ------------------
  |  Branch (641:13): [True: 0, False: 0]
  ------------------
  642|      0|            || !ossl_param_build_set_int(NULL, params,
  ------------------
  |  Branch (642:16): [True: 0, False: 0]
  ------------------
  643|      0|                OSSL_PKEY_PARAM_EC_CHAR2_TP_BASIS,
  ------------------
  |  |  391|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_TP_BASIS "tp"
  ------------------
  644|      0|                (int)k1))
  645|      0|            goto err;
  646|      0|    } else {
  647|      0|        if (!EC_GROUP_get_pentanomial_basis(group, &k1, &k2, &k3)
  ------------------
  |  Branch (647:13): [True: 0, False: 0]
  ------------------
  648|      0|            || !ossl_param_build_set_int(NULL, params,
  ------------------
  |  Branch (648:16): [True: 0, False: 0]
  ------------------
  649|      0|                OSSL_PKEY_PARAM_EC_CHAR2_PP_K1, (int)k1)
  ------------------
  |  |  388|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K1 "k1"
  ------------------
  650|      0|            || !ossl_param_build_set_int(NULL, params,
  ------------------
  |  Branch (650:16): [True: 0, False: 0]
  ------------------
  651|      0|                OSSL_PKEY_PARAM_EC_CHAR2_PP_K2, (int)k2)
  ------------------
  |  |  389|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K2 "k2"
  ------------------
  652|      0|            || !ossl_param_build_set_int(NULL, params,
  ------------------
  |  Branch (652:16): [True: 0, False: 0]
  ------------------
  653|      0|                OSSL_PKEY_PARAM_EC_CHAR2_PP_K3, (int)k3))
  ------------------
  |  |  390|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K3 "k3"
  ------------------
  654|      0|            goto err;
  655|      0|    }
  656|      0|    ret = 1;
  657|      0|err:
  658|      0|    return ret;
  659|      0|#endif /* OPENSSL_NO_EC2M */
  660|      0|}
ec_kmgmt.c:key_to_params:
  124|  25.5k|{
  125|  25.5k|    BIGNUM *x = NULL, *y = NULL;
  126|  25.5k|    const BIGNUM *priv_key = NULL;
  127|  25.5k|    const EC_POINT *pub_point = NULL;
  128|  25.5k|    const EC_GROUP *ecg = NULL;
  129|  25.5k|    size_t pub_key_len = 0;
  130|  25.5k|    int ret = 0;
  131|  25.5k|    BN_CTX *bnctx = NULL;
  132|       |
  133|  25.5k|    if (eckey == NULL
  ------------------
  |  Branch (133:9): [True: 0, False: 25.5k]
  ------------------
  134|  25.5k|        || (ecg = EC_KEY_get0_group(eckey)) == NULL)
  ------------------
  |  Branch (134:12): [True: 0, False: 25.5k]
  ------------------
  135|      0|        return 0;
  136|       |
  137|  25.5k|    priv_key = EC_KEY_get0_private_key(eckey);
  138|  25.5k|    pub_point = EC_KEY_get0_public_key(eckey);
  139|       |
  140|  25.5k|    if (pub_point != NULL) {
  ------------------
  |  Branch (140:9): [True: 25.5k, False: 0]
  ------------------
  141|  25.5k|        OSSL_PARAM *p = NULL, *px = NULL, *py = NULL;
  142|       |        /*
  143|       |         * EC_POINT_point2buf() can generate random numbers in some
  144|       |         * implementations so we need to ensure we use the correct libctx.
  145|       |         */
  146|  25.5k|        bnctx = BN_CTX_new_ex(ossl_ec_key_get_libctx(eckey));
  147|  25.5k|        if (bnctx == NULL)
  ------------------
  |  Branch (147:13): [True: 0, False: 25.5k]
  ------------------
  148|      0|            goto err;
  149|       |
  150|       |        /* If we are doing a get then check first before decoding the point */
  151|  25.5k|        if (tmpl == NULL) {
  ------------------
  |  Branch (151:13): [True: 25.5k, False: 0]
  ------------------
  152|  25.5k|            p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_PUB_KEY);
  ------------------
  |  |  450|  25.5k|# define OSSL_PKEY_PARAM_PUB_KEY "pub"
  ------------------
  153|  25.5k|            px = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_EC_PUB_X);
  ------------------
  |  |  404|  25.5k|# define OSSL_PKEY_PARAM_EC_PUB_X "qx"
  ------------------
  154|  25.5k|            py = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_EC_PUB_Y);
  ------------------
  |  |  405|  25.5k|# define OSSL_PKEY_PARAM_EC_PUB_Y "qy"
  ------------------
  155|  25.5k|        }
  156|       |
  157|  25.5k|        if (p != NULL || tmpl != NULL) {
  ------------------
  |  Branch (157:13): [True: 0, False: 25.5k]
  |  Branch (157:26): [True: 0, False: 25.5k]
  ------------------
  158|       |            /* convert pub_point to a octet string according to the SECG standard */
  159|      0|            point_conversion_form_t format = EC_KEY_get_conv_form(eckey);
  160|       |
  161|      0|            if ((pub_key_len = EC_POINT_point2buf(ecg, pub_point,
  ------------------
  |  Branch (161:17): [True: 0, False: 0]
  ------------------
  162|      0|                     format,
  163|      0|                     pub_key, bnctx))
  164|      0|                    == 0
  165|      0|                || !ossl_param_build_set_octet_string(tmpl, p,
  ------------------
  |  Branch (165:20): [True: 0, False: 0]
  ------------------
  166|      0|                    OSSL_PKEY_PARAM_PUB_KEY,
  ------------------
  |  |  450|      0|# define OSSL_PKEY_PARAM_PUB_KEY "pub"
  ------------------
  167|      0|                    *pub_key, pub_key_len))
  168|      0|                goto err;
  169|      0|        }
  170|  25.5k|        if (px != NULL || py != NULL) {
  ------------------
  |  Branch (170:13): [True: 0, False: 25.5k]
  |  Branch (170:27): [True: 0, False: 25.5k]
  ------------------
  171|      0|            if (px != NULL) {
  ------------------
  |  Branch (171:17): [True: 0, False: 0]
  ------------------
  172|      0|                x = BN_CTX_get(bnctx);
  173|      0|                if (x == NULL)
  ------------------
  |  Branch (173:21): [True: 0, False: 0]
  ------------------
  174|      0|                    goto err;
  175|      0|            }
  176|      0|            if (py != NULL) {
  ------------------
  |  Branch (176:17): [True: 0, False: 0]
  ------------------
  177|      0|                y = BN_CTX_get(bnctx);
  178|      0|                if (y == NULL)
  ------------------
  |  Branch (178:21): [True: 0, False: 0]
  ------------------
  179|      0|                    goto err;
  180|      0|            }
  181|       |
  182|      0|            if (!EC_POINT_get_affine_coordinates(ecg, pub_point, x, y, bnctx))
  ------------------
  |  Branch (182:17): [True: 0, False: 0]
  ------------------
  183|      0|                goto err;
  184|      0|            if (px != NULL
  ------------------
  |  Branch (184:17): [True: 0, False: 0]
  ------------------
  185|      0|                && !ossl_param_build_set_bn(tmpl, px,
  ------------------
  |  Branch (185:20): [True: 0, False: 0]
  ------------------
  186|      0|                    OSSL_PKEY_PARAM_EC_PUB_X, x))
  ------------------
  |  |  404|      0|# define OSSL_PKEY_PARAM_EC_PUB_X "qx"
  ------------------
  187|      0|                goto err;
  188|      0|            if (py != NULL
  ------------------
  |  Branch (188:17): [True: 0, False: 0]
  ------------------
  189|      0|                && !ossl_param_build_set_bn(tmpl, py,
  ------------------
  |  Branch (189:20): [True: 0, False: 0]
  ------------------
  190|      0|                    OSSL_PKEY_PARAM_EC_PUB_Y, y))
  ------------------
  |  |  405|      0|# define OSSL_PKEY_PARAM_EC_PUB_Y "qy"
  ------------------
  191|      0|                goto err;
  192|      0|        }
  193|  25.5k|    }
  194|       |
  195|  25.5k|    if (priv_key != NULL && include_private) {
  ------------------
  |  Branch (195:9): [True: 10.9k, False: 14.5k]
  |  Branch (195:29): [True: 10.9k, False: 0]
  ------------------
  196|  10.9k|        size_t sz;
  197|  10.9k|        int ecbits;
  198|       |
  199|       |        /*
  200|       |         * Key import/export should never leak the bit length of the secret
  201|       |         * scalar in the key.
  202|       |         *
  203|       |         * For this reason, on export we use padded BIGNUMs with fixed length.
  204|       |         *
  205|       |         * When importing we also should make sure that, even if short lived,
  206|       |         * the newly created BIGNUM is marked with the BN_FLG_CONSTTIME flag as
  207|       |         * soon as possible, so that any processing of this BIGNUM might opt for
  208|       |         * constant time implementations in the backend.
  209|       |         *
  210|       |         * Setting the BN_FLG_CONSTTIME flag alone is never enough, we also have
  211|       |         * to preallocate the BIGNUM internal buffer to a fixed public size big
  212|       |         * enough that operations performed during the processing never trigger
  213|       |         * a realloc which would leak the size of the scalar through memory
  214|       |         * accesses.
  215|       |         *
  216|       |         * Fixed Length
  217|       |         * ------------
  218|       |         *
  219|       |         * The order of the large prime subgroup of the curve is our choice for
  220|       |         * a fixed public size, as that is generally the upper bound for
  221|       |         * generating a private key in EC cryptosystems and should fit all valid
  222|       |         * secret scalars.
  223|       |         *
  224|       |         * For padding on export we just use the bit length of the order
  225|       |         * converted to bytes (rounding up).
  226|       |         *
  227|       |         * For preallocating the BIGNUM storage we look at the number of "words"
  228|       |         * required for the internal representation of the order, and we
  229|       |         * preallocate 2 extra "words" in case any of the subsequent processing
  230|       |         * might temporarily overflow the order length.
  231|       |         */
  232|  10.9k|        ecbits = EC_GROUP_order_bits(ecg);
  233|  10.9k|        if (ecbits <= 0)
  ------------------
  |  Branch (233:13): [True: 0, False: 10.9k]
  ------------------
  234|      0|            goto err;
  235|  10.9k|        sz = (ecbits + 7) / 8;
  236|       |
  237|  10.9k|        if (!ossl_param_build_set_bn_pad(tmpl, params,
  ------------------
  |  Branch (237:13): [True: 0, False: 10.9k]
  ------------------
  238|  10.9k|                OSSL_PKEY_PARAM_PRIV_KEY,
  ------------------
  |  |  448|  10.9k|# define OSSL_PKEY_PARAM_PRIV_KEY "priv"
  ------------------
  239|  10.9k|                priv_key, sz))
  240|      0|            goto err;
  241|  10.9k|    }
  242|  25.5k|    ret = 1;
  243|  25.5k|err:
  244|  25.5k|    BN_CTX_free(bnctx);
  245|  25.5k|    return ret;
  246|  25.5k|}
ec_kmgmt.c:otherparams_to_params:
  250|  25.5k|{
  251|  25.5k|    int ecdh_cofactor_mode = 0, group_check = 0;
  252|  25.5k|    const char *name = NULL;
  253|  25.5k|    point_conversion_form_t format;
  254|       |
  255|  25.5k|    if (ec == NULL)
  ------------------
  |  Branch (255:9): [True: 0, False: 25.5k]
  ------------------
  256|      0|        return 0;
  257|       |
  258|  25.5k|    format = EC_KEY_get_conv_form(ec);
  259|  25.5k|    name = ossl_ec_pt_format_id2name((int)format);
  260|  25.5k|    if (name != NULL
  ------------------
  |  Branch (260:9): [True: 25.5k, False: 0]
  ------------------
  261|  25.5k|        && !ossl_param_build_set_utf8_string(tmpl, params,
  ------------------
  |  Branch (261:12): [True: 0, False: 25.5k]
  ------------------
  262|  25.5k|            OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT,
  ------------------
  |  |  403|  25.5k|# define OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT "point-format"
  ------------------
  263|  25.5k|            name))
  264|      0|        return 0;
  265|       |
  266|  25.5k|    group_check = EC_KEY_get_flags(ec) & EC_FLAG_CHECK_NAMED_GROUP_MASK;
  ------------------
  |  |  967|  25.5k|    (EC_FLAG_CHECK_NAMED_GROUP | EC_FLAG_CHECK_NAMED_GROUP_NIST)
  |  |  ------------------
  |  |  |  |  964|  25.5k|#define EC_FLAG_CHECK_NAMED_GROUP 0x2000
  |  |  ------------------
  |  |                   (EC_FLAG_CHECK_NAMED_GROUP | EC_FLAG_CHECK_NAMED_GROUP_NIST)
  |  |  ------------------
  |  |  |  |  965|  25.5k|#define EC_FLAG_CHECK_NAMED_GROUP_NIST 0x4000
  |  |  ------------------
  ------------------
  267|  25.5k|    name = ossl_ec_check_group_type_id2name(group_check);
  268|  25.5k|    if (name != NULL
  ------------------
  |  Branch (268:9): [True: 25.5k, False: 0]
  ------------------
  269|  25.5k|        && !ossl_param_build_set_utf8_string(tmpl, params,
  ------------------
  |  Branch (269:12): [True: 0, False: 25.5k]
  ------------------
  270|  25.5k|            OSSL_PKEY_PARAM_EC_GROUP_CHECK_TYPE,
  ------------------
  |  |  399|  25.5k|# define OSSL_PKEY_PARAM_EC_GROUP_CHECK_TYPE "group-check"
  ------------------
  271|  25.5k|            name))
  272|      0|        return 0;
  273|       |
  274|  25.5k|    if ((EC_KEY_get_enc_flags(ec) & EC_PKEY_NO_PUBKEY) != 0
  ------------------
  |  |  959|  25.5k|#define EC_PKEY_NO_PUBKEY 0x002
  ------------------
  |  Branch (274:9): [True: 0, False: 25.5k]
  ------------------
  275|      0|        && !ossl_param_build_set_int(tmpl, params,
  ------------------
  |  Branch (275:12): [True: 0, False: 0]
  ------------------
  276|      0|            OSSL_PKEY_PARAM_EC_INCLUDE_PUBLIC, 0))
  ------------------
  |  |  400|      0|# define OSSL_PKEY_PARAM_EC_INCLUDE_PUBLIC "include-public"
  ------------------
  277|      0|        return 0;
  278|       |
  279|  25.5k|    ecdh_cofactor_mode = (EC_KEY_get_flags(ec) & EC_FLAG_COFACTOR_ECDH) ? 1 : 0;
  ------------------
  |  |  963|  25.5k|#define EC_FLAG_COFACTOR_ECDH 0x1000
  ------------------
  |  Branch (279:26): [True: 0, False: 25.5k]
  ------------------
  280|  25.5k|    return ossl_param_build_set_int(tmpl, params,
  281|  25.5k|        OSSL_PKEY_PARAM_USE_COFACTOR_ECDH,
  ------------------
  |  |  509|  25.5k|# define OSSL_PKEY_PARAM_USE_COFACTOR_ECDH OSSL_PKEY_PARAM_USE_COFACTOR_FLAG
  |  |  ------------------
  |  |  |  |  510|  25.5k|# define OSSL_PKEY_PARAM_USE_COFACTOR_FLAG "use-cofactor-flag"
  |  |  ------------------
  ------------------
  282|  25.5k|        ecdh_cofactor_mode);
  283|  25.5k|}
ec_kmgmt.c:ec_has:
  344|  25.8k|{
  345|  25.8k|    const EC_KEY *ec = keydata;
  346|  25.8k|    int ok = 1;
  347|       |
  348|  25.8k|    if (!ossl_prov_is_running() || ec == NULL)
  ------------------
  |  Branch (348:9): [True: 0, False: 25.8k]
  |  Branch (348:36): [True: 0, False: 25.8k]
  ------------------
  349|      0|        return 0;
  350|  25.8k|    if ((selection & EC_POSSIBLE_SELECTIONS) == 0)
  ------------------
  |  |   81|  25.8k|    (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  ------------------
  |  |  |  |  656|  25.8k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  |  |  ------------------
  |  |  |  |  |  |  646|  25.8k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  |  |  ------------------
  |  |  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  |  |  ------------------
  |  |  |  |  |  |  647|  25.8k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  ------------------
  |  |  |  |  653|  25.8k|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  |  |  ------------------
  |  |  |  |  |  |  648|  25.8k|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  |  |  ------------------
  |  |  |  |  654|  25.8k|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  649|  25.8k|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (350:9): [True: 0, False: 25.8k]
  ------------------
  351|      0|        return 1; /* the selection is not missing */
  352|       |
  353|  25.8k|    if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0)
  ------------------
  |  |  647|  25.8k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (353:9): [True: 14.9k, False: 10.9k]
  ------------------
  354|  14.9k|        ok = ok && (EC_KEY_get0_public_key(ec) != NULL);
  ------------------
  |  Branch (354:14): [True: 14.9k, False: 0]
  |  Branch (354:20): [True: 14.9k, False: 0]
  ------------------
  355|  25.8k|    if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0)
  ------------------
  |  |  646|  25.8k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (355:9): [True: 3.73k, False: 22.1k]
  ------------------
  356|  3.73k|        ok = ok && (EC_KEY_get0_private_key(ec) != NULL);
  ------------------
  |  Branch (356:14): [True: 3.73k, False: 0]
  |  Branch (356:20): [True: 3.73k, False: 0]
  ------------------
  357|  25.8k|    if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0)
  ------------------
  |  |  648|  25.8k|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  ------------------
  |  Branch (357:9): [True: 10.9k, False: 14.9k]
  ------------------
  358|  10.9k|        ok = ok && (EC_KEY_get0_group(ec) != NULL);
  ------------------
  |  Branch (358:14): [True: 10.9k, False: 0]
  |  Branch (358:20): [True: 10.9k, False: 0]
  ------------------
  359|       |    /*
  360|       |     * We consider OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS to always be
  361|       |     * available, so no extra check is needed other than the previous one
  362|       |     * against EC_POSSIBLE_SELECTIONS.
  363|       |     */
  364|  25.8k|    return ok;
  365|  25.8k|}
ec_kmgmt.c:ec_match:
  368|  7.46k|{
  369|  7.46k|    const EC_KEY *ec1 = keydata1;
  370|  7.46k|    const EC_KEY *ec2 = keydata2;
  371|  7.46k|    const EC_GROUP *group_a = EC_KEY_get0_group(ec1);
  372|  7.46k|    const EC_GROUP *group_b = EC_KEY_get0_group(ec2);
  373|  7.46k|    BN_CTX *ctx = NULL;
  374|  7.46k|    int ok = 1;
  375|       |
  376|  7.46k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (376:9): [True: 0, False: 7.46k]
  ------------------
  377|      0|        return 0;
  378|       |
  379|  7.46k|    ctx = BN_CTX_new_ex(ossl_ec_key_get_libctx(ec1));
  380|  7.46k|    if (ctx == NULL)
  ------------------
  |  Branch (380:9): [True: 0, False: 7.46k]
  ------------------
  381|      0|        return 0;
  382|       |
  383|  7.46k|    if ((selection & OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) != 0)
  ------------------
  |  |  648|  7.46k|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  ------------------
  |  Branch (383:9): [True: 7.46k, False: 0]
  ------------------
  384|  7.46k|        ok = ok && group_a != NULL && group_b != NULL
  ------------------
  |  Branch (384:14): [True: 7.46k, False: 0]
  |  Branch (384:20): [True: 7.46k, False: 0]
  |  Branch (384:39): [True: 7.46k, False: 0]
  ------------------
  385|  7.46k|            && EC_GROUP_cmp(group_a, group_b, ctx) == 0;
  ------------------
  |  Branch (385:16): [True: 7.46k, False: 0]
  ------------------
  386|  7.46k|    if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) {
  ------------------
  |  |  656|  7.46k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  7.46k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  7.46k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (386:9): [True: 7.46k, False: 0]
  ------------------
  387|  7.46k|        int key_checked = 0;
  388|       |
  389|  7.46k|        if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) {
  ------------------
  |  |  647|  7.46k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (389:13): [True: 7.46k, False: 0]
  ------------------
  390|  7.46k|            const EC_POINT *pa = EC_KEY_get0_public_key(ec1);
  391|  7.46k|            const EC_POINT *pb = EC_KEY_get0_public_key(ec2);
  392|       |
  393|  7.46k|            if (pa != NULL && pb != NULL) {
  ------------------
  |  Branch (393:17): [True: 7.46k, False: 0]
  |  Branch (393:31): [True: 7.46k, False: 0]
  ------------------
  394|  7.46k|                ok = ok && EC_POINT_cmp(group_b, pa, pb, ctx) == 0;
  ------------------
  |  Branch (394:22): [True: 7.46k, False: 0]
  |  Branch (394:28): [True: 7.46k, False: 0]
  ------------------
  395|  7.46k|                key_checked = 1;
  396|  7.46k|            }
  397|  7.46k|        }
  398|  7.46k|        if (!key_checked
  ------------------
  |  Branch (398:13): [True: 0, False: 7.46k]
  ------------------
  399|      0|            && (selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) {
  ------------------
  |  |  646|      0|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (399:16): [True: 0, False: 0]
  ------------------
  400|      0|            const BIGNUM *pa = EC_KEY_get0_private_key(ec1);
  401|      0|            const BIGNUM *pb = EC_KEY_get0_private_key(ec2);
  402|       |
  403|      0|            if (pa != NULL && pb != NULL) {
  ------------------
  |  Branch (403:17): [True: 0, False: 0]
  |  Branch (403:31): [True: 0, False: 0]
  ------------------
  404|      0|                ok = ok && BN_cmp(pa, pb) == 0;
  ------------------
  |  Branch (404:22): [True: 0, False: 0]
  |  Branch (404:28): [True: 0, False: 0]
  ------------------
  405|      0|                key_checked = 1;
  406|      0|            }
  407|      0|        }
  408|  7.46k|        ok = ok && key_checked;
  ------------------
  |  Branch (408:14): [True: 7.46k, False: 0]
  |  Branch (408:20): [True: 7.46k, False: 0]
  ------------------
  409|  7.46k|    }
  410|  7.46k|    BN_CTX_free(ctx);
  411|  7.46k|    return ok;
  412|  7.46k|}
ec_kmgmt.c:ec_query_operation_name:
   85|  14.6k|{
   86|  14.6k|    switch (operation_id) {
  ------------------
  |  Branch (86:13): [True: 14.6k, False: 0]
  ------------------
   87|      0|    case OSSL_OP_KEYEXCH:
  ------------------
  |  |  289|      0|#define OSSL_OP_KEYEXCH 11
  ------------------
  |  Branch (87:5): [True: 0, False: 14.6k]
  ------------------
   88|      0|        return "ECDH";
   89|  14.6k|    case OSSL_OP_SIGNATURE:
  ------------------
  |  |  290|  14.6k|#define OSSL_OP_SIGNATURE 12
  ------------------
  |  Branch (89:5): [True: 14.6k, False: 0]
  ------------------
   90|  14.6k|        return "ECDSA";
   91|  14.6k|    }
   92|      0|    return NULL;
   93|  14.6k|}

ecx_kmgmt.c:x25519_new_key:
  107|  3.62k|{
  108|  3.62k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (108:9): [True: 0, False: 3.62k]
  ------------------
  109|      0|        return 0;
  110|  3.62k|    return ossl_ecx_key_new(PROV_LIBCTX_OF(provctx), ECX_KEY_TYPE_X25519, 0,
  ------------------
  |  |   31|  3.62k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  111|       |        NULL);
  112|  3.62k|}
ecx_kmgmt.c:ecx_free_key:
  996|  18.1k|{
  997|  18.1k|    ossl_ecx_key_free((ECX_KEY *)keydata);
  998|  18.1k|}
ecx_kmgmt.c:x25519_get_params:
  367|  29.0k|{
  368|  29.0k|    return ecx_get_params(key, params, X25519_BITS, X25519_SECURITY_BITS,
  ------------------
  |  |   33|  29.0k|#define X25519_BITS 253
  ------------------
                  return ecx_get_params(key, params, X25519_BITS, X25519_SECURITY_BITS,
  ------------------
  |  |   34|  29.0k|#define X25519_SECURITY_BITS 128
  ------------------
  369|  29.0k|        X25519_KEYLEN);
  ------------------
  |  |   26|  29.0k|#define X25519_KEYLEN 32
  ------------------
  370|  29.0k|}
ecx_kmgmt.c:ecx_get_params:
  330|  29.0k|{
  331|  29.0k|    ECX_KEY *ecx = key;
  332|  29.0k|    struct ecx_ed_common_get_params_st p;
  333|       |
  334|  29.0k|    if (key == NULL || !ecx_get_params_decoder(params, &p))
  ------------------
  |  Branch (334:9): [True: 0, False: 29.0k]
  |  Branch (334:24): [True: 0, False: 29.0k]
  ------------------
  335|      0|        return 0;
  336|       |
  337|  29.0k|    if (p.encpub != NULL
  ------------------
  |  Branch (337:9): [True: 10.8k, False: 18.1k]
  ------------------
  338|  10.8k|        && !OSSL_PARAM_set_octet_string(p.encpub, ecx->pubkey, ecx->keylen))
  ------------------
  |  Branch (338:12): [True: 0, False: 10.8k]
  ------------------
  339|      0|        return 0;
  340|       |#ifdef FIPS_MODULE
  341|       |    {
  342|       |        /* Currently X25519 and X448 are not approved */
  343|       |        int approved = 0;
  344|       |
  345|       |        if (p.ind != NULL && !OSSL_PARAM_set_int(p.ind, approved))
  346|       |            return 0;
  347|       |    }
  348|       |#endif
  349|       |
  350|  29.0k|    return ecx_ed_common_get_params(key, &p, bits, secbits, size);
  351|  29.0k|}
ecx_kmgmt.c:ecx_ed_common_get_params:
  313|  29.0k|{
  314|  29.0k|    ECX_KEY *ecx = key;
  315|       |
  316|  29.0k|    if (p->bits != NULL && !OSSL_PARAM_set_int(p->bits, bits))
  ------------------
  |  Branch (316:9): [True: 18.1k, False: 10.8k]
  |  Branch (316:28): [True: 0, False: 18.1k]
  ------------------
  317|      0|        return 0;
  318|  29.0k|    if (p->secbits != NULL && !OSSL_PARAM_set_int(p->secbits, secbits))
  ------------------
  |  Branch (318:9): [True: 18.1k, False: 10.8k]
  |  Branch (318:31): [True: 0, False: 18.1k]
  ------------------
  319|      0|        return 0;
  320|  29.0k|    if (p->size != NULL && !OSSL_PARAM_set_int(p->size, size))
  ------------------
  |  Branch (320:9): [True: 18.1k, False: 10.8k]
  |  Branch (320:28): [True: 0, False: 18.1k]
  ------------------
  321|      0|        return 0;
  322|  29.0k|    if (p->seccat != NULL && !OSSL_PARAM_set_int(p->seccat, 0))
  ------------------
  |  Branch (322:9): [True: 18.1k, False: 10.8k]
  |  Branch (322:30): [True: 0, False: 18.1k]
  ------------------
  323|      0|        return 0;
  324|  29.0k|    return key_to_params(ecx, NULL, p->pub, p->priv, 1);
  325|  29.0k|}
ecx_kmgmt.c:key_to_params:
  247|  32.6k|{
  248|  32.6k|    if (key == NULL)
  ------------------
  |  Branch (248:9): [True: 0, False: 32.6k]
  ------------------
  249|      0|        return 0;
  250|       |
  251|  32.6k|    if (!ossl_param_build_set_octet_string(tmpl, pub,
  ------------------
  |  Branch (251:9): [True: 0, False: 32.6k]
  ------------------
  252|  32.6k|            OSSL_PKEY_PARAM_PUB_KEY,
  ------------------
  |  |  450|  32.6k|# define OSSL_PKEY_PARAM_PUB_KEY "pub"
  ------------------
  253|  32.6k|            key->pubkey, key->keylen))
  254|      0|        return 0;
  255|       |
  256|  32.6k|    if (include_private
  ------------------
  |  Branch (256:9): [True: 29.0k, False: 3.62k]
  ------------------
  257|  29.0k|        && key->privkey != NULL
  ------------------
  |  Branch (257:12): [True: 21.7k, False: 7.25k]
  ------------------
  258|  21.7k|        && !ossl_param_build_set_octet_string(tmpl, priv,
  ------------------
  |  Branch (258:12): [True: 0, False: 21.7k]
  ------------------
  259|  21.7k|            OSSL_PKEY_PARAM_PRIV_KEY,
  ------------------
  |  |  448|  21.7k|# define OSSL_PKEY_PARAM_PRIV_KEY "priv"
  ------------------
  260|  21.7k|            key->privkey, key->keylen))
  261|      0|        return 0;
  262|       |
  263|  32.6k|    return 1;
  264|  32.6k|}
ecx_kmgmt.c:x25519_set_params:
  451|  3.62k|{
  452|  3.62k|    return ecx_set_params(key, params);
  453|  3.62k|}
ecx_kmgmt.c:ecx_set_params:
  422|  3.62k|{
  423|  3.62k|    ECX_KEY *ecxkey = key;
  424|  3.62k|    struct ecx_set_params_st p;
  425|       |
  426|  3.62k|    if (key == NULL || !ecx_set_params_decoder(params, &p))
  ------------------
  |  Branch (426:9): [True: 0, False: 3.62k]
  |  Branch (426:24): [True: 0, False: 3.62k]
  ------------------
  427|      0|        return 0;
  428|       |
  429|  3.62k|    if (p.pub != NULL) {
  ------------------
  |  Branch (429:9): [True: 3.62k, False: 0]
  ------------------
  430|  3.62k|        void *buf = ecxkey->pubkey;
  431|       |
  432|  3.62k|        if (p.pub->data_size != ecxkey->keylen
  ------------------
  |  Branch (432:13): [True: 0, False: 3.62k]
  ------------------
  433|  3.62k|            || !OSSL_PARAM_get_octet_string(p.pub, &buf, sizeof(ecxkey->pubkey),
  ------------------
  |  Branch (433:16): [True: 0, False: 3.62k]
  ------------------
  434|  3.62k|                NULL))
  435|      0|            return 0;
  436|  3.62k|        OPENSSL_clear_free(ecxkey->privkey, ecxkey->keylen);
  ------------------
  |  |  130|  3.62k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  437|  3.62k|        ecxkey->privkey = NULL;
  438|  3.62k|        ecxkey->haspubkey = 1;
  439|  3.62k|    }
  440|       |
  441|  3.62k|    if (p.propq != NULL) {
  ------------------
  |  Branch (441:9): [True: 0, False: 3.62k]
  ------------------
  442|      0|        if (p.propq->data_type != OSSL_PARAM_UTF8_STRING
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (442:13): [True: 0, False: 0]
  ------------------
  443|      0|            || !set_property_query(ecxkey, p.propq->data))
  ------------------
  |  Branch (443:16): [True: 0, False: 0]
  ------------------
  444|      0|            return 0;
  445|      0|    }
  446|       |
  447|  3.62k|    return 1;
  448|  3.62k|}
ecx_kmgmt.c:ecx_has:
  139|  7.25k|{
  140|  7.25k|    const ECX_KEY *key = keydata;
  141|  7.25k|    int ok = 0;
  142|       |
  143|  7.25k|    if (ossl_prov_is_running() && key != NULL) {
  ------------------
  |  Branch (143:9): [True: 7.25k, False: 0]
  |  Branch (143:35): [True: 3.62k, False: 3.62k]
  ------------------
  144|       |        /*
  145|       |         * ECX keys always have all the parameters they need (i.e. none).
  146|       |         * Therefore we always return with 1, if asked about parameters.
  147|       |         */
  148|  3.62k|        ok = 1;
  149|       |
  150|  3.62k|        if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0)
  ------------------
  |  |  647|  3.62k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (150:13): [True: 0, False: 3.62k]
  ------------------
  151|      0|            ok = ok && key->haspubkey;
  ------------------
  |  Branch (151:18): [True: 0, False: 0]
  |  Branch (151:24): [True: 0, False: 0]
  ------------------
  152|       |
  153|  3.62k|        if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0)
  ------------------
  |  |  646|  3.62k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (153:13): [True: 0, False: 3.62k]
  ------------------
  154|      0|            ok = ok && key->privkey != NULL;
  ------------------
  |  Branch (154:18): [True: 0, False: 0]
  |  Branch (154:24): [True: 0, False: 0]
  ------------------
  155|  3.62k|    }
  156|  7.25k|    return ok;
  157|  7.25k|}
ecx_kmgmt.c:x25519_validate:
  976|  7.25k|{
  977|  7.25k|    return ecx_validate(keydata, selection, ECX_KEY_TYPE_X25519, X25519_KEYLEN);
  ------------------
  |  |   26|  7.25k|#define X25519_KEYLEN 32
  ------------------
  978|  7.25k|}
ecx_kmgmt.c:ecx_validate:
  939|  7.25k|{
  940|  7.25k|    const ECX_KEY *ecx = keydata;
  941|  7.25k|    int ok = keylen == ecx->keylen;
  942|       |
  943|  7.25k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (943:9): [True: 0, False: 7.25k]
  ------------------
  944|      0|        return 0;
  945|       |
  946|  7.25k|    if ((selection & ECX_POSSIBLE_SELECTIONS) == 0)
  ------------------
  |  |   79|  7.25k|#define ECX_POSSIBLE_SELECTIONS (OSSL_KEYMGMT_SELECT_KEYPAIR)
  |  |  ------------------
  |  |  |  |  656|  7.25k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  |  |  ------------------
  |  |  |  |  |  |  646|  7.25k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  |  |  ------------------
  |  |  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  |  |  ------------------
  |  |  |  |  |  |  647|  7.25k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (946:9): [True: 0, False: 7.25k]
  ------------------
  947|      0|        return 1; /* nothing to validate */
  948|       |
  949|  7.25k|    if (!ok) {
  ------------------
  |  Branch (949:9): [True: 0, False: 7.25k]
  ------------------
  950|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_ALGORITHM_MISMATCH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  951|      0|        return 0;
  952|      0|    }
  953|       |
  954|  7.25k|    if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) {
  ------------------
  |  |  647|  7.25k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (954:9): [True: 7.25k, False: 0]
  ------------------
  955|  7.25k|        ok = ok && ecx->haspubkey;
  ------------------
  |  Branch (955:14): [True: 7.25k, False: 0]
  |  Branch (955:20): [True: 7.25k, False: 0]
  ------------------
  956|       |#ifdef FIPS_MODULE
  957|       |        ok = ok && ecd_key_pub_check(ecx, type);
  958|       |#endif
  959|  7.25k|    }
  960|       |
  961|  7.25k|    if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0)
  ------------------
  |  |  646|  7.25k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (961:9): [True: 0, False: 7.25k]
  ------------------
  962|      0|        ok = ok && ecx->privkey != NULL;
  ------------------
  |  Branch (962:14): [True: 0, False: 0]
  |  Branch (962:20): [True: 0, False: 0]
  ------------------
  963|       |
  964|  7.25k|    if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != OSSL_KEYMGMT_SELECT_KEYPAIR)
  ------------------
  |  |  656|  7.25k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  7.25k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  7.25k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
                  if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != OSSL_KEYMGMT_SELECT_KEYPAIR)
  ------------------
  |  |  656|  7.25k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  7.25k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  7.25k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (964:9): [True: 7.25k, False: 0]
  ------------------
  965|  7.25k|        return ok;
  966|       |
  967|      0|    if (ecx_key_type_is_ed(type))
  ------------------
  |  Branch (967:9): [True: 0, False: 0]
  ------------------
  968|      0|        ok = ok && ecd_key_pairwise_check(ecx, type);
  ------------------
  |  Branch (968:14): [True: 0, False: 0]
  |  Branch (968:20): [True: 0, False: 0]
  ------------------
  969|      0|    else
  970|      0|        ok = ok && ecx_key_pairwise_check(ecx, type);
  ------------------
  |  Branch (970:14): [True: 0, False: 0]
  |  Branch (970:20): [True: 0, False: 0]
  ------------------
  971|       |
  972|      0|    return ok;
  973|  7.25k|}
ecx_kmgmt.c:ecx_import:
  225|  3.62k|{
  226|  3.62k|    ECX_KEY *key = keydata;
  227|  3.62k|    int ok = 1;
  228|  3.62k|    int include_private;
  229|  3.62k|    struct ecx_imexport_types_st p;
  230|       |
  231|  3.62k|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (231:9): [True: 0, False: 3.62k]
  ------------------
  232|  3.62k|        || key == NULL
  ------------------
  |  Branch (232:12): [True: 0, False: 3.62k]
  ------------------
  233|  3.62k|        || !ecx_imexport_types_decoder(params, &p))
  ------------------
  |  Branch (233:12): [True: 0, False: 3.62k]
  ------------------
  234|      0|        return 0;
  235|       |
  236|  3.62k|    if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  656|  3.62k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  3.62k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  3.62k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (236:9): [True: 0, False: 3.62k]
  ------------------
  237|      0|        return 0;
  238|       |
  239|  3.62k|    include_private = selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY ? 1 : 0;
  ------------------
  |  |  646|  3.62k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (239:23): [True: 3.62k, False: 0]
  ------------------
  240|  3.62k|    ok = ok && ossl_ecx_key_fromdata(key, p.pub, p.priv, include_private);
  ------------------
  |  Branch (240:10): [True: 3.62k, False: 0]
  |  Branch (240:16): [True: 3.62k, False: 0]
  ------------------
  241|       |
  242|  3.62k|    return ok;
  243|  3.62k|}
ecx_kmgmt.c:ecx_export:
  268|  3.62k|{
  269|  3.62k|    ECX_KEY *key = keydata;
  270|  3.62k|    OSSL_PARAM_BLD *tmpl;
  271|  3.62k|    OSSL_PARAM *params = NULL;
  272|  3.62k|    int ret = 0;
  273|       |
  274|  3.62k|    if (!ossl_prov_is_running() || key == NULL)
  ------------------
  |  Branch (274:9): [True: 0, False: 3.62k]
  |  Branch (274:36): [True: 0, False: 3.62k]
  ------------------
  275|      0|        return 0;
  276|       |
  277|  3.62k|    if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  656|  3.62k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  3.62k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  3.62k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (277:9): [True: 0, False: 3.62k]
  ------------------
  278|      0|        return 0;
  279|       |
  280|  3.62k|    tmpl = OSSL_PARAM_BLD_new();
  281|  3.62k|    if (tmpl == NULL)
  ------------------
  |  Branch (281:9): [True: 0, False: 3.62k]
  ------------------
  282|      0|        return 0;
  283|       |
  284|  3.62k|    if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) {
  ------------------
  |  |  656|  3.62k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  3.62k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  3.62k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (284:9): [True: 3.62k, False: 0]
  ------------------
  285|  3.62k|        int include_private = ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0);
  ------------------
  |  |  646|  3.62k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  286|       |
  287|  3.62k|        if (!key_to_params(key, tmpl, NULL, NULL, include_private))
  ------------------
  |  Branch (287:13): [True: 0, False: 3.62k]
  ------------------
  288|      0|            goto err;
  289|  3.62k|    }
  290|       |
  291|  3.62k|    params = OSSL_PARAM_BLD_to_param(tmpl);
  292|  3.62k|    if (params == NULL)
  ------------------
  |  Branch (292:9): [True: 0, False: 3.62k]
  ------------------
  293|      0|        goto err;
  294|       |
  295|  3.62k|    ret = param_cb(params, cbarg);
  296|  3.62k|    OSSL_PARAM_clear_free(params);
  297|  3.62k|err:
  298|  3.62k|    OSSL_PARAM_BLD_free(tmpl);
  299|  3.62k|    return ret;
  300|  3.62k|}
ecx_kmgmt.c:x25519_gen_init:
  528|  10.8k|{
  529|  10.8k|    return ecx_gen_init(provctx, selection, params, ECX_KEY_TYPE_X25519, "X25519");
  530|  10.8k|}
ecx_kmgmt.c:ecx_gen_init:
  497|  10.8k|{
  498|  10.8k|    OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(provctx);
  ------------------
  |  |   31|  10.8k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  499|  10.8k|    struct ecx_gen_ctx *gctx = NULL;
  500|       |
  501|  10.8k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (501:9): [True: 0, False: 10.8k]
  ------------------
  502|      0|        return NULL;
  503|       |
  504|  10.8k|    if ((gctx = OPENSSL_zalloc(sizeof(*gctx))) != NULL) {
  ------------------
  |  |  109|  10.8k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (504:9): [True: 10.8k, False: 0]
  ------------------
  505|  10.8k|        gctx->libctx = libctx;
  506|  10.8k|        gctx->type = type;
  507|  10.8k|        gctx->selection = selection;
  508|       |#ifdef FIPS_MODULE
  509|       |        /* X25519/X448 are not FIPS approved, (ED25519/ED448 are approved) */
  510|       |        if (algdesc != NULL
  511|       |            && !ossl_FIPS_IND_callback(libctx, algdesc, "KeyGen Init")) {
  512|       |            OPENSSL_free(gctx);
  513|       |            return NULL;
  514|       |        }
  515|       |#endif
  516|  10.8k|    } else {
  517|      0|        return NULL;
  518|      0|    }
  519|  10.8k|    if (!ecx_gen_set_params(gctx, params)) {
  ------------------
  |  Branch (519:9): [True: 0, False: 10.8k]
  ------------------
  520|      0|        ecx_gen_cleanup(gctx);
  521|       |        gctx = NULL;
  522|      0|    }
  523|  10.8k|    return gctx;
  524|  10.8k|}
ecx_kmgmt.c:ecx_gen_set_params:
  551|  18.1k|{
  552|  18.1k|    struct ecx_gen_ctx *gctx = genctx;
  553|  18.1k|    struct ecx_gen_set_params_st p;
  554|       |
  555|  18.1k|    if (gctx == NULL || !ecx_gen_set_params_decoder(params, &p))
  ------------------
  |  Branch (555:9): [True: 0, False: 18.1k]
  |  Branch (555:25): [True: 0, False: 18.1k]
  ------------------
  556|      0|        return 0;
  557|       |
  558|  18.1k|    if (p.group != NULL) {
  ------------------
  |  Branch (558:9): [True: 3.62k, False: 14.5k]
  ------------------
  559|  3.62k|        const char *groupname = NULL;
  560|       |
  561|       |        /*
  562|       |         * We optionally allow setting a group name - but each algorithm only
  563|       |         * support one such name, so all we do is verify that it is the one we
  564|       |         * expected.
  565|       |         */
  566|  3.62k|        switch (gctx->type) {
  567|  3.62k|        case ECX_KEY_TYPE_X25519:
  ------------------
  |  Branch (567:9): [True: 3.62k, False: 0]
  ------------------
  568|  3.62k|            groupname = "x25519";
  569|  3.62k|            break;
  570|      0|        case ECX_KEY_TYPE_X448:
  ------------------
  |  Branch (570:9): [True: 0, False: 3.62k]
  ------------------
  571|      0|            groupname = "x448";
  572|      0|            break;
  573|      0|        default:
  ------------------
  |  Branch (573:9): [True: 0, False: 3.62k]
  ------------------
  574|       |            /* We only support this for key exchange at the moment */
  575|      0|            break;
  576|  3.62k|        }
  577|  3.62k|        if (p.group->data_type != OSSL_PARAM_UTF8_STRING
  ------------------
  |  |  117|  7.25k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (577:13): [True: 0, False: 3.62k]
  ------------------
  578|  3.62k|            || groupname == NULL
  ------------------
  |  Branch (578:16): [True: 0, False: 3.62k]
  ------------------
  579|  3.62k|            || OPENSSL_strcasecmp(p.group->data, groupname) != 0) {
  ------------------
  |  Branch (579:16): [True: 0, False: 3.62k]
  ------------------
  580|      0|            ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  581|      0|            return 0;
  582|      0|        }
  583|  3.62k|    }
  584|       |
  585|  18.1k|    if (p.kdfpropq != NULL) {
  ------------------
  |  Branch (585:9): [True: 0, False: 18.1k]
  ------------------
  586|      0|        if (p.kdfpropq->data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (586:13): [True: 0, False: 0]
  ------------------
  587|      0|            return 0;
  588|      0|        OPENSSL_free(gctx->propq);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  589|      0|        gctx->propq = OPENSSL_strdup(p.kdfpropq->data);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  590|      0|        if (gctx->propq == NULL)
  ------------------
  |  Branch (590:13): [True: 0, False: 0]
  ------------------
  591|      0|            return 0;
  592|      0|    }
  593|       |
  594|  18.1k|    if (p.ikm != NULL) {
  ------------------
  |  Branch (594:9): [True: 0, False: 18.1k]
  ------------------
  595|      0|        if (p.ikm->data_size != 0 && p.ikm->data != NULL) {
  ------------------
  |  Branch (595:13): [True: 0, False: 0]
  |  Branch (595:38): [True: 0, False: 0]
  ------------------
  596|      0|            OPENSSL_free(gctx->dhkem_ikm);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  597|      0|            gctx->dhkem_ikm = NULL;
  598|      0|            if (!OSSL_PARAM_get_octet_string(p.ikm, (void **)&gctx->dhkem_ikm, 0,
  ------------------
  |  Branch (598:17): [True: 0, False: 0]
  ------------------
  599|      0|                    &gctx->dhkem_ikmlen))
  600|      0|                return 0;
  601|      0|        }
  602|      0|    }
  603|       |
  604|  18.1k|    return 1;
  605|  18.1k|}
ecx_kmgmt.c:x25519_gen:
  748|  10.8k|{
  749|  10.8k|    struct ecx_gen_ctx *gctx = genctx;
  750|       |
  751|  10.8k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (751:9): [True: 0, False: 10.8k]
  ------------------
  752|      0|        return 0;
  753|       |
  754|       |#ifdef S390X_EC_ASM
  755|       |    if (OPENSSL_s390xcap_P.pcc[1] & S390X_CAPBIT(S390X_SCALAR_MULTIPLY_X25519))
  756|       |        return s390x_ecx_keygen25519(gctx);
  757|       |#endif
  758|  10.8k|    return ecx_gen(gctx);
  759|  10.8k|}
ecx_kmgmt.c:ecx_gen:
  682|  10.8k|{
  683|  10.8k|    ECX_KEY *key;
  684|  10.8k|    unsigned char *privkey;
  685|       |
  686|  10.8k|    if (gctx == NULL)
  ------------------
  |  Branch (686:9): [True: 0, False: 10.8k]
  ------------------
  687|      0|        return NULL;
  688|  10.8k|    if ((key = ossl_ecx_key_new(gctx->libctx, gctx->type, 0,
  ------------------
  |  Branch (688:9): [True: 0, False: 10.8k]
  ------------------
  689|  10.8k|             gctx->propq))
  690|  10.8k|        == NULL) {
  691|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  692|      0|        return NULL;
  693|      0|    }
  694|       |
  695|       |    /* If we're doing parameter generation then we just return a blank key */
  696|  10.8k|    if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  656|  10.8k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  10.8k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  10.8k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (696:9): [True: 0, False: 10.8k]
  ------------------
  697|      0|        return key;
  698|       |
  699|  10.8k|    if ((privkey = ossl_ecx_key_allocate_privkey(key)) == NULL) {
  ------------------
  |  Branch (699:9): [True: 0, False: 10.8k]
  ------------------
  700|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_EC_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  701|      0|        goto err;
  702|      0|    }
  703|  10.8k|#ifndef FIPS_MODULE
  704|  10.8k|    if (gctx->dhkem_ikm != NULL && gctx->dhkem_ikmlen != 0) {
  ------------------
  |  Branch (704:9): [True: 0, False: 10.8k]
  |  Branch (704:36): [True: 0, False: 0]
  ------------------
  705|      0|        if (ecx_key_type_is_ed(gctx->type))
  ------------------
  |  Branch (705:13): [True: 0, False: 0]
  ------------------
  706|      0|            goto err;
  707|      0|        if (!ossl_ecx_dhkem_derive_private(key, privkey,
  ------------------
  |  Branch (707:13): [True: 0, False: 0]
  ------------------
  708|      0|                gctx->dhkem_ikm, gctx->dhkem_ikmlen))
  709|      0|            goto err;
  710|      0|    } else
  711|  10.8k|#endif
  712|  10.8k|    {
  713|  10.8k|        if (RAND_priv_bytes_ex(gctx->libctx, privkey, key->keylen, 0) <= 0)
  ------------------
  |  Branch (713:13): [True: 0, False: 10.8k]
  ------------------
  714|      0|            goto err;
  715|  10.8k|    }
  716|       |
  717|  10.8k|    switch (gctx->type) {
  ------------------
  |  Branch (717:13): [True: 10.8k, False: 0]
  ------------------
  718|  10.8k|    case ECX_KEY_TYPE_X25519:
  ------------------
  |  Branch (718:5): [True: 10.8k, False: 0]
  ------------------
  719|  10.8k|        privkey[0] &= 248;
  720|  10.8k|        privkey[X25519_KEYLEN - 1] &= 127;
  ------------------
  |  |   26|  10.8k|#define X25519_KEYLEN 32
  ------------------
  721|  10.8k|        privkey[X25519_KEYLEN - 1] |= 64;
  ------------------
  |  |   26|  10.8k|#define X25519_KEYLEN 32
  ------------------
  722|  10.8k|        ossl_x25519_public_from_private(key->pubkey, privkey);
  723|  10.8k|        break;
  724|      0|    case ECX_KEY_TYPE_X448:
  ------------------
  |  Branch (724:5): [True: 0, False: 10.8k]
  ------------------
  725|      0|        privkey[0] &= 252;
  726|      0|        privkey[X448_KEYLEN - 1] |= 128;
  ------------------
  |  |   27|      0|#define X448_KEYLEN 56
  ------------------
  727|      0|        ossl_x448_public_from_private(key->pubkey, privkey);
  728|      0|        break;
  729|      0|    case ECX_KEY_TYPE_ED25519:
  ------------------
  |  Branch (729:5): [True: 0, False: 10.8k]
  ------------------
  730|      0|        if (!ossl_ed25519_public_from_private(gctx->libctx, key->pubkey, privkey,
  ------------------
  |  Branch (730:13): [True: 0, False: 0]
  ------------------
  731|      0|                gctx->propq))
  732|      0|            goto err;
  733|      0|        break;
  734|      0|    case ECX_KEY_TYPE_ED448:
  ------------------
  |  Branch (734:5): [True: 0, False: 10.8k]
  ------------------
  735|      0|        if (!ossl_ed448_public_from_private(gctx->libctx, key->pubkey, privkey,
  ------------------
  |  Branch (735:13): [True: 0, False: 0]
  ------------------
  736|      0|                gctx->propq))
  737|      0|            goto err;
  738|      0|        break;
  739|  10.8k|    }
  740|  10.8k|    key->haspubkey = 1;
  741|  10.8k|    return key;
  742|      0|err:
  743|      0|    ossl_ecx_key_free(key);
  744|       |    return NULL;
  745|  10.8k|}
ecx_kmgmt.c:ecx_gen_cleanup:
  841|  10.8k|{
  842|  10.8k|    struct ecx_gen_ctx *gctx = genctx;
  843|       |
  844|  10.8k|    if (gctx == NULL)
  ------------------
  |  Branch (844:9): [True: 0, False: 10.8k]
  ------------------
  845|      0|        return;
  846|       |
  847|  10.8k|    OPENSSL_clear_free(gctx->dhkem_ikm, gctx->dhkem_ikmlen);
  ------------------
  |  |  130|  10.8k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  848|  10.8k|    OPENSSL_free(gctx->propq);
  ------------------
  |  |  132|  10.8k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  849|  10.8k|    OPENSSL_free(gctx);
  ------------------
  |  |  132|  10.8k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  850|  10.8k|}
ecx_kmgmt.c:ecx_dup:
  867|  3.62k|{
  868|  3.62k|    if (ossl_prov_is_running())
  ------------------
  |  Branch (868:9): [True: 3.62k, False: 0]
  ------------------
  869|  3.62k|        return ossl_ecx_key_dup(keydata_from, selection);
  870|      0|    return NULL;
  871|  3.62k|}

ecx_kmgmt.c:ecx_get_params_decoder:
  107|  29.0k|{
  108|  29.0k|    const char *s;
  109|       |
  110|  29.0k|    memset(r, 0, sizeof(*r));
  111|  29.0k|    if (p != NULL)
  ------------------
  |  Branch (111:9): [True: 29.0k, False: 0]
  ------------------
  112|   112k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (112:16): [True: 83.4k, False: 29.0k]
  ------------------
  113|  83.4k|            switch(s[0]) {
  114|      0|            default:
  ------------------
  |  Branch (114:13): [True: 0, False: 83.4k]
  ------------------
  115|      0|                break;
  116|  18.1k|            case 'b':
  ------------------
  |  Branch (116:13): [True: 18.1k, False: 65.3k]
  ------------------
  117|  18.1k|                if (ossl_likely(strcmp("its", s + 1) == 0)) {
  ------------------
  |  |   22|  18.1k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 18.1k, False: 0]
  |  |  ------------------
  ------------------
  118|       |                    /* OSSL_PKEY_PARAM_BITS */
  119|  18.1k|                    if (ossl_unlikely(r->bits != NULL)) {
  ------------------
  |  |   23|  18.1k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 18.1k]
  |  |  ------------------
  ------------------
  120|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  121|      0|                                       "param %s is repeated", s);
  122|      0|                        return 0;
  123|      0|                    }
  124|  18.1k|                    r->bits = (OSSL_PARAM *)p;
  125|  18.1k|                }
  126|  18.1k|                break;
  127|  18.1k|            case 'e':
  ------------------
  |  Branch (127:13): [True: 10.8k, False: 72.5k]
  ------------------
  128|  10.8k|                if (ossl_likely(strcmp("ncoded-pub-key", s + 1) == 0)) {
  ------------------
  |  |   22|  10.8k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 10.8k, False: 0]
  |  |  ------------------
  ------------------
  129|       |                    /* OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY */
  130|  10.8k|                    if (ossl_unlikely(r->encpub != NULL)) {
  ------------------
  |  |   23|  10.8k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 10.8k]
  |  |  ------------------
  ------------------
  131|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  132|      0|                                       "param %s is repeated", s);
  133|      0|                        return 0;
  134|      0|                    }
  135|  10.8k|                    r->encpub = (OSSL_PARAM *)p;
  136|  10.8k|                }
  137|  10.8k|                break;
  138|  10.8k|            case 'f':
  ------------------
  |  Branch (138:13): [True: 0, False: 83.4k]
  ------------------
  139|       |# if defined(FIPS_MODULE)
  140|       |                if (ossl_likely(strcmp("ips-indicator", s + 1) == 0)) {
  141|       |                    /* OSSL_PKEY_PARAM_FIPS_APPROVED_INDICATOR */
  142|       |                    if (ossl_unlikely(r->ind != NULL)) {
  143|       |                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  144|       |                                       "param %s is repeated", s);
  145|       |                        return 0;
  146|       |                    }
  147|       |                    r->ind = (OSSL_PARAM *)p;
  148|       |                }
  149|       |# endif
  150|      0|                break;
  151|  18.1k|            case 'm':
  ------------------
  |  Branch (151:13): [True: 18.1k, False: 65.3k]
  ------------------
  152|  18.1k|                if (ossl_likely(strcmp("ax-size", s + 1) == 0)) {
  ------------------
  |  |   22|  18.1k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 18.1k, False: 0]
  |  |  ------------------
  ------------------
  153|       |                    /* OSSL_PKEY_PARAM_MAX_SIZE */
  154|  18.1k|                    if (ossl_unlikely(r->size != NULL)) {
  ------------------
  |  |   23|  18.1k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 18.1k]
  |  |  ------------------
  ------------------
  155|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  156|      0|                                       "param %s is repeated", s);
  157|      0|                        return 0;
  158|      0|                    }
  159|  18.1k|                    r->size = (OSSL_PARAM *)p;
  160|  18.1k|                }
  161|  18.1k|                break;
  162|  18.1k|            case 'p':
  ------------------
  |  Branch (162:13): [True: 0, False: 83.4k]
  ------------------
  163|      0|                switch(s[1]) {
  164|      0|                default:
  ------------------
  |  Branch (164:17): [True: 0, False: 0]
  ------------------
  165|      0|                    break;
  166|      0|                case 'r':
  ------------------
  |  Branch (166:17): [True: 0, False: 0]
  ------------------
  167|      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]
  |  |  ------------------
  ------------------
  168|       |                        /* OSSL_PKEY_PARAM_PRIV_KEY */
  169|      0|                        if (ossl_unlikely(r->priv != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  170|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  171|      0|                                           "param %s is repeated", s);
  172|      0|                            return 0;
  173|      0|                        }
  174|      0|                        r->priv = (OSSL_PARAM *)p;
  175|      0|                    }
  176|      0|                    break;
  177|      0|                case 'u':
  ------------------
  |  Branch (177:17): [True: 0, False: 0]
  ------------------
  178|      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]
  |  |  ------------------
  ------------------
  179|       |                        /* OSSL_PKEY_PARAM_PUB_KEY */
  180|      0|                        if (ossl_unlikely(r->pub != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  181|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  182|      0|                                           "param %s is repeated", s);
  183|      0|                            return 0;
  184|      0|                        }
  185|      0|                        r->pub = (OSSL_PARAM *)p;
  186|      0|                    }
  187|      0|                }
  188|      0|                break;
  189|  36.2k|            case 's':
  ------------------
  |  Branch (189:13): [True: 36.2k, False: 47.1k]
  ------------------
  190|  36.2k|                switch(s[1]) {
  191|      0|                default:
  ------------------
  |  Branch (191:17): [True: 0, False: 36.2k]
  ------------------
  192|      0|                    break;
  193|  36.2k|                case 'e':
  ------------------
  |  Branch (193:17): [True: 36.2k, False: 0]
  ------------------
  194|  36.2k|                    switch(s[2]) {
  195|      0|                    default:
  ------------------
  |  Branch (195:21): [True: 0, False: 36.2k]
  ------------------
  196|      0|                        break;
  197|  36.2k|                    case 'c':
  ------------------
  |  Branch (197:21): [True: 36.2k, False: 0]
  ------------------
  198|  36.2k|                        switch(s[3]) {
  199|      0|                        default:
  ------------------
  |  Branch (199:25): [True: 0, False: 36.2k]
  ------------------
  200|      0|                            break;
  201|  36.2k|                        case 'u':
  ------------------
  |  Branch (201:25): [True: 36.2k, False: 0]
  ------------------
  202|  36.2k|                            switch(s[4]) {
  203|      0|                            default:
  ------------------
  |  Branch (203:29): [True: 0, False: 36.2k]
  ------------------
  204|      0|                                break;
  205|  36.2k|                            case 'r':
  ------------------
  |  Branch (205:29): [True: 36.2k, False: 0]
  ------------------
  206|  36.2k|                                switch(s[5]) {
  207|      0|                                default:
  ------------------
  |  Branch (207:33): [True: 0, False: 36.2k]
  ------------------
  208|      0|                                    break;
  209|  36.2k|                                case 'i':
  ------------------
  |  Branch (209:33): [True: 36.2k, False: 0]
  ------------------
  210|  36.2k|                                    switch(s[6]) {
  211|      0|                                    default:
  ------------------
  |  Branch (211:37): [True: 0, False: 36.2k]
  ------------------
  212|      0|                                        break;
  213|  36.2k|                                    case 't':
  ------------------
  |  Branch (213:37): [True: 36.2k, False: 0]
  ------------------
  214|  36.2k|                                        switch(s[7]) {
  215|      0|                                        default:
  ------------------
  |  Branch (215:41): [True: 0, False: 36.2k]
  ------------------
  216|      0|                                            break;
  217|  36.2k|                                        case 'y':
  ------------------
  |  Branch (217:41): [True: 36.2k, False: 0]
  ------------------
  218|  36.2k|                                            switch(s[8]) {
  219|      0|                                            default:
  ------------------
  |  Branch (219:45): [True: 0, False: 36.2k]
  ------------------
  220|      0|                                                break;
  221|  36.2k|                                            case '-':
  ------------------
  |  Branch (221:45): [True: 36.2k, False: 0]
  ------------------
  222|  36.2k|                                                switch(s[9]) {
  223|      0|                                                default:
  ------------------
  |  Branch (223:49): [True: 0, False: 36.2k]
  ------------------
  224|      0|                                                    break;
  225|  18.1k|                                                case 'b':
  ------------------
  |  Branch (225:49): [True: 18.1k, False: 18.1k]
  ------------------
  226|  18.1k|                                                    if (ossl_likely(strcmp("its", s + 10) == 0)) {
  ------------------
  |  |   22|  18.1k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 18.1k, False: 0]
  |  |  ------------------
  ------------------
  227|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_BITS */
  228|  18.1k|                                                        if (ossl_unlikely(r->secbits != NULL)) {
  ------------------
  |  |   23|  18.1k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 18.1k]
  |  |  ------------------
  ------------------
  229|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  230|      0|                                                                           "param %s is repeated", s);
  231|      0|                                                            return 0;
  232|      0|                                                        }
  233|  18.1k|                                                        r->secbits = (OSSL_PARAM *)p;
  234|  18.1k|                                                    }
  235|  18.1k|                                                    break;
  236|  18.1k|                                                case 'c':
  ------------------
  |  Branch (236:49): [True: 18.1k, False: 18.1k]
  ------------------
  237|  18.1k|                                                    if (ossl_likely(strcmp("ategory", s + 10) == 0)) {
  ------------------
  |  |   22|  18.1k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 18.1k, False: 0]
  |  |  ------------------
  ------------------
  238|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_CATEGORY */
  239|  18.1k|                                                        if (ossl_unlikely(r->seccat != NULL)) {
  ------------------
  |  |   23|  18.1k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 18.1k]
  |  |  ------------------
  ------------------
  240|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  241|      0|                                                                           "param %s is repeated", s);
  242|      0|                                                            return 0;
  243|      0|                                                        }
  244|  18.1k|                                                        r->seccat = (OSSL_PARAM *)p;
  245|  18.1k|                                                    }
  246|  36.2k|                                                }
  247|  36.2k|                                            }
  248|  36.2k|                                        }
  249|  36.2k|                                    }
  250|  36.2k|                                }
  251|  36.2k|                            }
  252|  36.2k|                        }
  253|  36.2k|                    }
  254|  36.2k|                }
  255|  83.4k|            }
  256|  29.0k|    return 1;
  257|  29.0k|}
ecx_kmgmt.c:ecx_set_params_decoder:
  460|  3.62k|{
  461|  3.62k|    const char *s;
  462|       |
  463|  3.62k|    memset(r, 0, sizeof(*r));
  464|  3.62k|    if (p != NULL)
  ------------------
  |  Branch (464:9): [True: 3.62k, False: 0]
  ------------------
  465|  7.25k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (465:16): [True: 3.62k, False: 3.62k]
  ------------------
  466|  3.62k|            switch(s[0]) {
  467|      0|            default:
  ------------------
  |  Branch (467:13): [True: 0, False: 3.62k]
  ------------------
  468|      0|                break;
  469|  3.62k|            case 'e':
  ------------------
  |  Branch (469:13): [True: 3.62k, False: 0]
  ------------------
  470|  3.62k|                if (ossl_likely(strcmp("ncoded-pub-key", s + 1) == 0)) {
  ------------------
  |  |   22|  3.62k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  471|       |                    /* OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY */
  472|  3.62k|                    if (ossl_unlikely(r->pub != NULL)) {
  ------------------
  |  |   23|  3.62k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  473|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  474|      0|                                       "param %s is repeated", s);
  475|      0|                        return 0;
  476|      0|                    }
  477|  3.62k|                    r->pub = (OSSL_PARAM *)p;
  478|  3.62k|                }
  479|  3.62k|                break;
  480|  3.62k|            case 'p':
  ------------------
  |  Branch (480:13): [True: 0, False: 3.62k]
  ------------------
  481|      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]
  |  |  ------------------
  ------------------
  482|       |                    /* OSSL_PKEY_PARAM_PROPERTIES */
  483|      0|                    if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  484|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  485|      0|                                       "param %s is repeated", s);
  486|      0|                        return 0;
  487|      0|                    }
  488|      0|                    r->propq = (OSSL_PARAM *)p;
  489|      0|                }
  490|  3.62k|            }
  491|  3.62k|    return 1;
  492|  3.62k|}
ecx_kmgmt.c:ecx_imexport_types_decoder:
   31|  3.62k|{
   32|  3.62k|    const char *s;
   33|       |
   34|  3.62k|    memset(r, 0, sizeof(*r));
   35|  3.62k|    if (p != NULL)
  ------------------
  |  Branch (35:9): [True: 3.62k, False: 0]
  ------------------
   36|  7.25k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (36:16): [True: 3.62k, False: 3.62k]
  ------------------
   37|  3.62k|            switch(s[0]) {
   38|      0|            default:
  ------------------
  |  Branch (38:13): [True: 0, False: 3.62k]
  ------------------
   39|      0|                break;
   40|  3.62k|            case 'p':
  ------------------
  |  Branch (40:13): [True: 3.62k, False: 0]
  ------------------
   41|  3.62k|                switch(s[1]) {
   42|      0|                default:
  ------------------
  |  Branch (42:17): [True: 0, False: 3.62k]
  ------------------
   43|      0|                    break;
   44|      0|                case 'r':
  ------------------
  |  Branch (44:17): [True: 0, False: 3.62k]
  ------------------
   45|      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]
  |  |  ------------------
  ------------------
   46|       |                        /* OSSL_PKEY_PARAM_PRIV_KEY */
   47|      0|                        if (ossl_unlikely(r->priv != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   48|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   49|      0|                                           "param %s is repeated", s);
   50|      0|                            return 0;
   51|      0|                        }
   52|      0|                        r->priv = (OSSL_PARAM *)p;
   53|      0|                    }
   54|      0|                    break;
   55|  3.62k|                case 'u':
  ------------------
  |  Branch (55:17): [True: 3.62k, False: 0]
  ------------------
   56|  3.62k|                    if (ossl_likely(strcmp("b", s + 2) == 0)) {
  ------------------
  |  |   22|  3.62k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
   57|       |                        /* OSSL_PKEY_PARAM_PUB_KEY */
   58|  3.62k|                        if (ossl_unlikely(r->pub != NULL)) {
  ------------------
  |  |   23|  3.62k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
   59|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   60|      0|                                           "param %s is repeated", s);
   61|      0|                            return 0;
   62|      0|                        }
   63|  3.62k|                        r->pub = (OSSL_PARAM *)p;
   64|  3.62k|                    }
   65|  3.62k|                }
   66|  3.62k|            }
   67|  3.62k|    return 1;
   68|  3.62k|}
ecx_kmgmt.c:ecx_gen_set_params_decoder:
  517|  18.1k|{
  518|  18.1k|    const char *s;
  519|       |
  520|  18.1k|    memset(r, 0, sizeof(*r));
  521|  18.1k|    if (p != NULL)
  ------------------
  |  Branch (521:9): [True: 7.25k, False: 10.8k]
  ------------------
  522|  10.8k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (522:16): [True: 3.62k, False: 7.25k]
  ------------------
  523|  3.62k|            switch(s[0]) {
  524|      0|            default:
  ------------------
  |  Branch (524:13): [True: 0, False: 3.62k]
  ------------------
  525|      0|                break;
  526|      0|            case 'd':
  ------------------
  |  Branch (526:13): [True: 0, False: 3.62k]
  ------------------
  527|      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]
  |  |  ------------------
  ------------------
  528|       |                    /* OSSL_PKEY_PARAM_DHKEM_IKM */
  529|      0|                    if (ossl_unlikely(r->ikm != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  530|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  531|      0|                                       "param %s is repeated", s);
  532|      0|                        return 0;
  533|      0|                    }
  534|      0|                    r->ikm = (OSSL_PARAM *)p;
  535|      0|                }
  536|      0|                break;
  537|  3.62k|            case 'g':
  ------------------
  |  Branch (537:13): [True: 3.62k, False: 0]
  ------------------
  538|  3.62k|                if (ossl_likely(strcmp("roup", s + 1) == 0)) {
  ------------------
  |  |   22|  3.62k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  539|       |                    /* OSSL_PKEY_PARAM_GROUP_NAME */
  540|  3.62k|                    if (ossl_unlikely(r->group != NULL)) {
  ------------------
  |  |   23|  3.62k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  541|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  542|      0|                                       "param %s is repeated", s);
  543|      0|                        return 0;
  544|      0|                    }
  545|  3.62k|                    r->group = (OSSL_PARAM *)p;
  546|  3.62k|                }
  547|  3.62k|                break;
  548|  3.62k|            case 'p':
  ------------------
  |  Branch (548:13): [True: 0, False: 3.62k]
  ------------------
  549|      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]
  |  |  ------------------
  ------------------
  550|       |                    /* OSSL_KDF_PARAM_PROPERTIES */
  551|      0|                    if (ossl_unlikely(r->kdfpropq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  552|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  553|      0|                                       "param %s is repeated", s);
  554|      0|                        return 0;
  555|      0|                    }
  556|      0|                    r->kdfpropq = (OSSL_PARAM *)p;
  557|      0|                }
  558|  3.62k|            }
  559|  18.1k|    return 1;
  560|  18.1k|}

ossl_prov_ml_kem_new:
  161|  7.25k|{
  162|  7.25k|    ML_KEM_KEY *key;
  163|       |
  164|  7.25k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (164:9): [True: 0, False: 7.25k]
  ------------------
  165|      0|        return NULL;
  166|       |
  167|       |#ifdef FIPS_MODULE
  168|       |    if (!ossl_deferred_self_test(PROV_LIBCTX_OF(ctx),
  169|       |            ST_ID_ASYM_KEYGEN_ML_KEM))
  170|       |        return NULL;
  171|       |#endif
  172|       |
  173|       |    /*
  174|       |     * When decoding, if the key ends up "loaded" into the same provider, these
  175|       |     * are the correct config settings, otherwise, new values will be assigned
  176|       |     * on import into a different provider.  The "load" API does not pass along
  177|       |     * the provider context.
  178|       |     */
  179|  7.25k|    if ((key = ossl_ml_kem_key_new(PROV_LIBCTX_OF(ctx), propq, evp_type)) != NULL) {
  ------------------
  |  |   31|  7.25k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  |  Branch (179:9): [True: 7.25k, False: 0]
  ------------------
  180|  7.25k|        const char *pct_type = ossl_prov_ctx_get_param(
  181|  7.25k|            ctx, OSSL_PKEY_PARAM_ML_KEM_IMPORT_PCT_TYPE, "random");
  ------------------
  |  |  440|  7.25k|# define OSSL_PKEY_PARAM_ML_KEM_IMPORT_PCT_TYPE "ml-kem.import_pct_type"
  ------------------
  182|       |
  183|  7.25k|        if (ossl_prov_ctx_get_bool_param(
  ------------------
  |  Branch (183:13): [True: 7.25k, False: 0]
  ------------------
  184|  7.25k|                ctx, OSSL_PKEY_PARAM_ML_KEM_RETAIN_SEED, 1))
  ------------------
  |  |  444|  7.25k|# define OSSL_PKEY_PARAM_ML_KEM_RETAIN_SEED "ml-kem.retain_seed"
  ------------------
  185|  7.25k|            key->prov_flags |= ML_KEM_KEY_RETAIN_SEED;
  ------------------
  |  |  126|  7.25k|#define ML_KEM_KEY_RETAIN_SEED (1 << 3)
  ------------------
  186|      0|        else
  187|      0|            key->prov_flags &= ~ML_KEM_KEY_RETAIN_SEED;
  ------------------
  |  |  126|      0|#define ML_KEM_KEY_RETAIN_SEED (1 << 3)
  ------------------
  188|  7.25k|        if (ossl_prov_ctx_get_bool_param(
  ------------------
  |  Branch (188:13): [True: 7.25k, False: 0]
  ------------------
  189|  7.25k|                ctx, OSSL_PKEY_PARAM_ML_KEM_PREFER_SEED, 1))
  ------------------
  |  |  443|  7.25k|# define OSSL_PKEY_PARAM_ML_KEM_PREFER_SEED "ml-kem.prefer_seed"
  ------------------
  190|  7.25k|            key->prov_flags |= ML_KEM_KEY_PREFER_SEED;
  ------------------
  |  |  125|  7.25k|#define ML_KEM_KEY_PREFER_SEED (1 << 2)
  ------------------
  191|      0|        else
  192|      0|            key->prov_flags &= ~ML_KEM_KEY_PREFER_SEED;
  ------------------
  |  |  125|      0|#define ML_KEM_KEY_PREFER_SEED (1 << 2)
  ------------------
  193|  7.25k|        if (OPENSSL_strcasecmp(pct_type, "random") == 0)
  ------------------
  |  Branch (193:13): [True: 7.25k, False: 0]
  ------------------
  194|  7.25k|            key->prov_flags |= ML_KEM_KEY_RANDOM_PCT;
  ------------------
  |  |  123|  7.25k|#define ML_KEM_KEY_RANDOM_PCT (1 << 0)
  ------------------
  195|      0|        else if (OPENSSL_strcasecmp(pct_type, "fixed") == 0)
  ------------------
  |  Branch (195:18): [True: 0, False: 0]
  ------------------
  196|      0|            key->prov_flags |= ML_KEM_KEY_FIXED_PCT;
  ------------------
  |  |  124|      0|#define ML_KEM_KEY_FIXED_PCT (1 << 1)
  ------------------
  197|      0|        else
  198|      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)
  |  |  ------------------
  ------------------
  199|  7.25k|    }
  200|  7.25k|    return key;
  201|  7.25k|}
ml_kem_kmgmt.c:ml_kem_free_key:
  817|  7.25k|{
  818|  7.25k|    ossl_ml_kem_key_free((ML_KEM_KEY *)keydata);
  819|  7.25k|}
ml_kem_kmgmt.c:ml_kem_get_params:
  567|  7.25k|{
  568|  7.25k|    ML_KEM_KEY *key = vkey;
  569|  7.25k|    const ML_KEM_VINFO *v;
  570|  7.25k|    struct ml_kem_get_params_st p;
  571|       |
  572|  7.25k|    if (key == NULL || !ml_kem_get_params_decoder(params, &p))
  ------------------
  |  Branch (572:9): [True: 0, False: 7.25k]
  |  Branch (572:24): [True: 0, False: 7.25k]
  ------------------
  573|      0|        return 0;
  574|       |
  575|  7.25k|    v = ossl_ml_kem_key_vinfo(key);
  ------------------
  |  |  206|  7.25k|#define ossl_ml_kem_key_vinfo(key) ((key)->vinfo)
  ------------------
  576|       |
  577|  7.25k|    if (p.bits != NULL && !OSSL_PARAM_set_size_t(p.bits, v->bits))
  ------------------
  |  Branch (577:9): [True: 7.25k, False: 0]
  |  Branch (577:27): [True: 0, False: 7.25k]
  ------------------
  578|      0|        return 0;
  579|       |
  580|  7.25k|    if (p.secbits != NULL && !OSSL_PARAM_set_size_t(p.secbits, v->secbits))
  ------------------
  |  Branch (580:9): [True: 7.25k, False: 0]
  |  Branch (580:30): [True: 0, False: 7.25k]
  ------------------
  581|      0|        return 0;
  582|       |
  583|  7.25k|    if (p.maxsize != NULL && !OSSL_PARAM_set_size_t(p.maxsize, v->ctext_bytes))
  ------------------
  |  Branch (583:9): [True: 7.25k, False: 0]
  |  Branch (583:30): [True: 0, False: 7.25k]
  ------------------
  584|      0|        return 0;
  585|       |
  586|  7.25k|    if (p.seccat != NULL && !OSSL_PARAM_set_int(p.seccat, v->security_category))
  ------------------
  |  Branch (586:9): [True: 7.25k, False: 0]
  |  Branch (586:29): [True: 0, False: 7.25k]
  ------------------
  587|      0|        return 0;
  588|       |
  589|  7.25k|    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 (589:9): [True: 0, False: 7.25k]
  ------------------
  590|       |        /* Exported to EVP_PKEY_get_raw_public_key() */
  591|      0|        if (!ml_kem_get_key_param(key, p.pubkey, v->pubkey_bytes,
  ------------------
  |  Branch (591:13): [True: 0, False: 0]
  ------------------
  592|      0|                &ossl_ml_kem_encode_public_key))
  593|      0|            return 0;
  594|      0|    }
  595|       |
  596|  7.25k|    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 (596:9): [True: 0, False: 7.25k]
  ------------------
  597|       |        /* Needed by EVP_PKEY_get1_encoded_public_key() */
  598|      0|        if (!ml_kem_get_key_param(key, p.encpubkey, v->pubkey_bytes,
  ------------------
  |  Branch (598:13): [True: 0, False: 0]
  ------------------
  599|      0|                &ossl_ml_kem_encode_public_key))
  600|      0|            return 0;
  601|      0|    }
  602|       |
  603|  7.25k|    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 (603:9): [True: 0, False: 7.25k]
  ------------------
  604|       |        /* Exported to EVP_PKEY_get_raw_private_key() */
  605|      0|        if (!ml_kem_get_key_param(key, p.privkey, v->prvkey_bytes,
  ------------------
  |  Branch (605:13): [True: 0, False: 0]
  ------------------
  606|      0|                &ossl_ml_kem_encode_private_key))
  607|      0|            return 0;
  608|      0|    }
  609|       |
  610|  7.25k|    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 (610:9): [True: 0, False: 7.25k]
  ------------------
  611|       |        /* Exported for import */
  612|      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 (612:13): [True: 0, False: 0]
  ------------------
  613|      0|                &ossl_ml_kem_encode_seed))
  614|      0|            return 0;
  615|      0|    }
  616|       |
  617|  7.25k|#ifndef OPENSSL_NO_CMS
  618|  7.25k|    if (p.ri_type != NULL && !OSSL_PARAM_set_int(p.ri_type, CMS_RECIPINFO_KEM))
  ------------------
  |  |  175|      0|#define CMS_RECIPINFO_KEM 5
  ------------------
  |  Branch (618:9): [True: 0, False: 7.25k]
  |  Branch (618:30): [True: 0, False: 0]
  ------------------
  619|      0|        return 0;
  620|       |
  621|  7.25k|    if (p.kemri_kdf_alg != NULL) {
  ------------------
  |  Branch (621:9): [True: 0, False: 7.25k]
  ------------------
  622|      0|        uint8_t aid_buf[OSSL_MAX_ALGORITHM_ID_SIZE];
  623|      0|        int ret;
  624|      0|        size_t aid_len = 0;
  625|      0|        WPACKET pkt;
  626|      0|        uint8_t *aid = NULL;
  627|       |
  628|      0|        ret = WPACKET_init_der(&pkt, aid_buf, sizeof(aid_buf));
  629|      0|        ret &= ossl_DER_w_begin_sequence(&pkt, -1)
  ------------------
  |  Branch (629:16): [True: 0, False: 0]
  ------------------
  630|      0|            && ossl_DER_w_precompiled(&pkt, -1, ossl_der_oid_id_alg_hkdf_with_sha256,
  ------------------
  |  Branch (630:16): [True: 0, False: 0]
  ------------------
  631|      0|                sizeof(ossl_der_oid_id_alg_hkdf_with_sha256))
  632|      0|            && ossl_DER_w_end_sequence(&pkt, -1);
  ------------------
  |  Branch (632:16): [True: 0, False: 0]
  ------------------
  633|      0|        if (ret && WPACKET_finish(&pkt)) {
  ------------------
  |  Branch (633:13): [True: 0, False: 0]
  |  Branch (633:20): [True: 0, False: 0]
  ------------------
  634|      0|            WPACKET_get_total_written(&pkt, &aid_len);
  635|      0|            aid = WPACKET_get_curr(&pkt);
  636|      0|        }
  637|      0|        WPACKET_cleanup(&pkt);
  638|      0|        if (!ret)
  ------------------
  |  Branch (638:13): [True: 0, False: 0]
  ------------------
  639|      0|            return 0;
  640|      0|        if (aid != NULL && aid_len != 0 && !OSSL_PARAM_set_octet_string(p.kemri_kdf_alg, aid, aid_len))
  ------------------
  |  Branch (640:13): [True: 0, False: 0]
  |  Branch (640:28): [True: 0, False: 0]
  |  Branch (640:44): [True: 0, False: 0]
  ------------------
  641|      0|            return 0;
  642|      0|    }
  643|  7.25k|#endif
  644|       |
  645|  7.25k|    return 1;
  646|  7.25k|}
ml_kem_kmgmt.c:ml_kem_pairwise_test:
   73|  3.62k|{
   74|       |#ifdef FIPS_MODULE
   75|       |    OSSL_SELF_TEST *st = NULL;
   76|       |    OSSL_CALLBACK *cb = NULL;
   77|       |    void *cbarg = NULL;
   78|       |#endif
   79|  3.62k|    unsigned char entropy[ML_KEM_RANDOM_BYTES];
   80|  3.62k|    unsigned char secret[ML_KEM_SHARED_SECRET_BYTES];
   81|  3.62k|    unsigned char out[ML_KEM_SHARED_SECRET_BYTES];
   82|  3.62k|    unsigned char *ctext = NULL;
   83|  3.62k|    const ML_KEM_VINFO *v = ossl_ml_kem_key_vinfo(key);
  ------------------
  |  |  206|  3.62k|#define ossl_ml_kem_key_vinfo(key) ((key)->vinfo)
  ------------------
   84|  3.62k|    int operation_result = 0;
   85|  3.62k|    int ret = 0;
   86|       |
   87|       |    /* Unless we have both a public and private key, we can't do the test */
   88|  3.62k|    if (!ossl_ml_kem_have_prvkey(key)
  ------------------
  |  |  208|  7.25k|#define ossl_ml_kem_have_prvkey(key) ((key)->s != NULL)
  ------------------
  |  Branch (88:9): [True: 3.62k, False: 0]
  ------------------
   89|      0|        || !ossl_ml_kem_have_pubkey(key)
  ------------------
  |  |  207|  3.62k|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  ------------------
  |  Branch (89:12): [True: 0, False: 0]
  ------------------
   90|      0|        || (key_flags & ML_KEM_KEY_PCT_TYPE) == 0)
  ------------------
  |  |  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)
  |  |  ------------------
  ------------------
  |  Branch (90:12): [True: 0, False: 0]
  ------------------
   91|  3.62k|        return 1;
   92|       |#ifdef FIPS_MODULE
   93|       |    /* During self test, it is a waste to do this test */
   94|       |    if (ossl_fips_self_testing()
   95|       |        || ossl_self_test_in_progress(ST_ID_ASYM_KEYGEN_ML_KEM)
   96|       |        || ossl_self_test_in_progress(ST_ID_KEM_ML_KEM))
   97|       |        return 1;
   98|       |
   99|       |    /*
  100|       |     * The functions `OSSL_SELF_TEST_*` will return directly if parameter `st`
  101|       |     * is NULL.
  102|       |     */
  103|       |    OSSL_SELF_TEST_get_callback(key->libctx, &cb, &cbarg);
  104|       |
  105|       |    st = OSSL_SELF_TEST_new(cb, cbarg);
  106|       |    if (st == NULL)
  107|       |        return 0;
  108|       |
  109|       |    OSSL_SELF_TEST_onbegin(st, OSSL_SELF_TEST_TYPE_PCT,
  110|       |        OSSL_SELF_TEST_DESC_PCT_ML_KEM);
  111|       |#endif /* FIPS_MODULE */
  112|       |
  113|      0|    ctext = OPENSSL_malloc(v->ctext_bytes);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  114|      0|    if (ctext == NULL)
  ------------------
  |  Branch (114:9): [True: 0, False: 0]
  ------------------
  115|      0|        goto err;
  116|       |
  117|      0|    memset(out, 0, sizeof(out));
  118|       |
  119|      0|    if (key_flags & ML_KEM_KEY_RANDOM_PCT) {
  ------------------
  |  |  123|      0|#define ML_KEM_KEY_RANDOM_PCT (1 << 0)
  ------------------
  |  Branch (119:9): [True: 0, False: 0]
  ------------------
  120|      0|        operation_result = ossl_ml_kem_encap_rand(ctext, v->ctext_bytes,
  121|      0|            secret, sizeof(secret), key);
  122|      0|    } else {
  123|      0|        memset(entropy, 0125, sizeof(entropy));
  124|      0|        operation_result = ossl_ml_kem_encap_seed(ctext, v->ctext_bytes,
  125|      0|            secret, sizeof(secret),
  126|      0|            entropy, sizeof(entropy),
  127|      0|            key);
  128|      0|    }
  129|      0|    if (operation_result != 1)
  ------------------
  |  Branch (129:9): [True: 0, False: 0]
  ------------------
  130|      0|        goto err;
  131|       |
  132|       |#ifdef FIPS_MODULE
  133|       |    OSSL_SELF_TEST_oncorrupt_byte(st, ctext);
  134|       |#endif
  135|       |
  136|      0|    operation_result = ossl_ml_kem_decap(out, sizeof(out), ctext, v->ctext_bytes,
  137|      0|        key);
  138|      0|    if (operation_result != 1 || memcmp(out, secret, sizeof(out)) != 0)
  ------------------
  |  Branch (138:9): [True: 0, False: 0]
  |  Branch (138:34): [True: 0, False: 0]
  ------------------
  139|      0|        goto err;
  140|       |
  141|      0|    ret = 1;
  142|      0|err:
  143|       |#ifdef FIPS_MODULE
  144|       |    OSSL_SELF_TEST_onend(st, ret);
  145|       |    OSSL_SELF_TEST_free(st);
  146|       |#else
  147|      0|    if (ret == 0) {
  ------------------
  |  Branch (147:9): [True: 0, False: 0]
  ------------------
  148|      0|        ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_KEY,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_KEY,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_KEY,
  ------------------
  |  |   76|      0|#define PROV_R_INVALID_KEY 158
  ------------------
  149|      0|            "public part of %s private key fails to match private",
  150|      0|            v->algorithm_name);
  151|      0|    }
  152|      0|#endif
  153|      0|    OPENSSL_cleanse((void *)entropy, sizeof(entropy));
  154|      0|    OPENSSL_cleanse((void *)secret, sizeof(secret));
  155|      0|    OPENSSL_cleanse((void *)out, sizeof(out));
  156|      0|    OPENSSL_clear_free(ctext, v->ctext_bytes);
  ------------------
  |  |  130|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  157|      0|    return ret;
  158|      0|}
ml_kem_kmgmt.c:ml_kem_gen_init:
  721|  3.62k|{
  722|  3.62k|    PROV_ML_KEM_GEN_CTX *gctx = NULL;
  723|       |
  724|       |    /*
  725|       |     * We can only generate private keys, check that the selection is
  726|       |     * appropriate.
  727|       |     */
  728|  3.62k|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (728:9): [True: 0, False: 3.62k]
  ------------------
  729|  3.62k|        || (selection & minimal_selection) == 0
  ------------------
  |  Branch (729:12): [True: 0, False: 3.62k]
  ------------------
  730|  3.62k|        || (gctx = OPENSSL_zalloc(sizeof(*gctx))) == NULL)
  ------------------
  |  |  109|  3.62k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (730:12): [True: 0, False: 3.62k]
  ------------------
  731|      0|        return NULL;
  732|       |
  733|  3.62k|    gctx->selection = selection;
  734|  3.62k|    gctx->evp_type = evp_type;
  735|  3.62k|    gctx->provctx = provctx;
  736|  3.62k|    if (ml_kem_gen_set_params(gctx, params))
  ------------------
  |  Branch (736:9): [True: 3.62k, False: 0]
  ------------------
  737|  3.62k|        return gctx;
  738|       |
  739|      0|    ml_kem_gen_cleanup(gctx);
  740|       |    return NULL;
  741|  3.62k|}
ml_kem_kmgmt.c:ml_kem_gen_set_params:
  686|  7.25k|{
  687|  7.25k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
  688|  7.25k|    struct ml_kem_gen_set_params_st p;
  689|       |
  690|  7.25k|    if (gctx == NULL || !ml_kem_gen_set_params_decoder(params, &p))
  ------------------
  |  Branch (690:9): [True: 0, False: 7.25k]
  |  Branch (690:25): [True: 0, False: 7.25k]
  ------------------
  691|      0|        return 0;
  692|       |
  693|  7.25k|    if (p.propq != NULL) {
  ------------------
  |  Branch (693:9): [True: 0, False: 7.25k]
  ------------------
  694|      0|        if (p.propq->data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (694:13): [True: 0, False: 0]
  ------------------
  695|      0|            return 0;
  696|      0|        OPENSSL_free(gctx->propq);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  697|      0|        if ((gctx->propq = OPENSSL_strdup(p.propq->data)) == NULL)
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (697:13): [True: 0, False: 0]
  ------------------
  698|      0|            return 0;
  699|      0|    }
  700|       |
  701|  7.25k|    if (p.seed != NULL) {
  ------------------
  |  Branch (701:9): [True: 0, False: 7.25k]
  ------------------
  702|      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, ... */
  |  |  ------------------
  ------------------
  703|       |
  704|      0|        gctx->seed = gctx->seedbuf;
  705|      0|        if (OSSL_PARAM_get_octet_string(p.seed, (void **)&gctx->seed, len, &len)
  ------------------
  |  Branch (705:13): [True: 0, False: 0]
  ------------------
  706|      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 (706:16): [True: 0, False: 0]
  ------------------
  707|      0|            return 1;
  708|       |
  709|       |        /* Possibly, but less likely wrong data type */
  710|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_SEED_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  711|      0|        OPENSSL_cleanse((void *)gctx->seedbuf, sizeof(gctx->seedbuf));
  712|      0|        gctx->seed = NULL;
  713|      0|        return 0;
  714|      0|    }
  715|       |
  716|  7.25k|    return 1;
  717|  7.25k|}
ml_kem_kmgmt.c:ml_kem_gen:
  750|  3.62k|{
  751|  3.62k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
  752|  3.62k|    ML_KEM_KEY *key;
  753|  3.62k|    uint8_t *nopub = NULL;
  754|  3.62k|    uint8_t *seed;
  755|  3.62k|    int genok = 0;
  756|       |
  757|  3.62k|    if (gctx == NULL
  ------------------
  |  Branch (757:9): [True: 0, False: 3.62k]
  ------------------
  758|  3.62k|        || (gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  ------------------
  |  |  656|  3.62k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  3.62k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  3.62k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
                      || (gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  ------------------
  |  |  647|  3.62k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (758:12): [True: 0, False: 3.62k]
  ------------------
  759|      0|        return NULL;
  760|  3.62k|    seed = gctx->seed;
  761|  3.62k|    key = ossl_prov_ml_kem_new(gctx->provctx, gctx->propq, gctx->evp_type);
  762|  3.62k|    if (key == NULL)
  ------------------
  |  Branch (762:9): [True: 0, False: 3.62k]
  ------------------
  763|      0|        return NULL;
  764|       |
  765|  3.62k|    if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  656|  3.62k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  3.62k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  3.62k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (765:9): [True: 0, False: 3.62k]
  ------------------
  766|      0|        return key;
  767|       |
  768|  3.62k|    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 (768:9): [True: 0, False: 3.62k]
  |  Branch (768:25): [True: 0, False: 0]
  ------------------
  769|      0|        ossl_ml_kem_key_free(key);
  770|      0|        return NULL;
  771|      0|    }
  772|  3.62k|    genok = ossl_ml_kem_genkey(nopub, 0, key);
  773|       |
  774|       |    /* Erase the single-use seed */
  775|  3.62k|    if (seed != NULL)
  ------------------
  |  Branch (775:9): [True: 0, False: 3.62k]
  ------------------
  776|      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, ... */
  |  |  ------------------
  ------------------
  777|  3.62k|    gctx->seed = NULL;
  778|       |
  779|  3.62k|    if (genok) {
  ------------------
  |  Branch (779:9): [True: 3.62k, False: 0]
  ------------------
  780|       |#ifdef FIPS_MODULE
  781|       |        if (!ml_kem_pairwise_test(key, ML_KEM_KEY_FIXED_PCT)) {
  782|       |            ossl_ml_kem_key_free(key);
  783|       |            return NULL;
  784|       |        }
  785|       |#endif /* FIPS_MODULE */
  786|  3.62k|        return key;
  787|  3.62k|    }
  788|       |
  789|      0|    ossl_ml_kem_key_free(key);
  790|       |    return NULL;
  791|  3.62k|}
ml_kem_kmgmt.c:ml_kem_gen_cleanup:
  794|  3.62k|{
  795|  3.62k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
  796|       |
  797|  3.62k|    if (gctx == NULL)
  ------------------
  |  Branch (797:9): [True: 0, False: 3.62k]
  ------------------
  798|      0|        return;
  799|       |
  800|  3.62k|    if (gctx->seed != NULL)
  ------------------
  |  Branch (800:9): [True: 0, False: 3.62k]
  ------------------
  801|      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, ... */
  |  |  ------------------
  ------------------
  802|  3.62k|    OPENSSL_free(gctx->propq);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  803|  3.62k|    OPENSSL_free(gctx);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  804|  3.62k|}
ml_kem_kmgmt.c:ml_kem_import:
  472|  3.62k|{
  473|  3.62k|    ML_KEM_KEY *key = vkey;
  474|  3.62k|    int include_private;
  475|  3.62k|    int res;
  476|       |
  477|  3.62k|    if (!ossl_prov_is_running() || key == NULL)
  ------------------
  |  Branch (477:9): [True: 0, False: 3.62k]
  |  Branch (477:36): [True: 0, False: 3.62k]
  ------------------
  478|      0|        return 0;
  479|       |
  480|  3.62k|    if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  656|  3.62k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  3.62k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  3.62k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (480:9): [True: 0, False: 3.62k]
  ------------------
  481|      0|        return 0;
  482|       |
  483|  3.62k|    include_private = selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY ? 1 : 0;
  ------------------
  |  |  646|  3.62k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (483:23): [True: 3.62k, False: 0]
  ------------------
  484|  3.62k|    res = ml_kem_key_fromdata(key, params, include_private);
  485|  3.62k|    if (res > 0 && include_private
  ------------------
  |  Branch (485:9): [True: 3.62k, False: 0]
  |  Branch (485:20): [True: 3.62k, False: 0]
  ------------------
  486|  3.62k|        && !ml_kem_pairwise_test(key, key->prov_flags)) {
  ------------------
  |  Branch (486:12): [True: 0, False: 3.62k]
  ------------------
  487|      0|        ossl_ml_kem_key_reset(key);
  488|      0|        res = 0;
  489|      0|    }
  490|  3.62k|    return res;
  491|  3.62k|}
ml_kem_kmgmt.c:ml_kem_key_fromdata:
  389|  3.62k|{
  390|  3.62k|    const void *pubenc = NULL, *prvenc = NULL, *seedenc = NULL;
  391|  3.62k|    size_t publen = 0, prvlen = 0, seedlen = 0, puboff;
  392|  3.62k|    const ML_KEM_VINFO *v;
  393|  3.62k|    struct ml_kem_key_type_params_st p;
  394|       |
  395|       |    /* Invalid attempt to mutate a key, what is the right error to report? */
  396|  3.62k|    if (key == NULL
  ------------------
  |  Branch (396:9): [True: 0, False: 3.62k]
  ------------------
  397|  3.62k|        || ossl_ml_kem_have_pubkey(key)
  ------------------
  |  |  207|  7.25k|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  |  |  ------------------
  |  |  |  Branch (207:38): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  398|  3.62k|        || !ml_kem_key_type_params_decoder(params, &p))
  ------------------
  |  Branch (398:12): [True: 0, False: 3.62k]
  ------------------
  399|      0|        return 0;
  400|  3.62k|    v = ossl_ml_kem_key_vinfo(key);
  ------------------
  |  |  206|  3.62k|#define ossl_ml_kem_key_vinfo(key) ((key)->vinfo)
  ------------------
  401|       |
  402|       |    /*
  403|       |     * When a private key is provided, without a seed, any public key also
  404|       |     * provided will be ignored (apart from length), just as with the seed.
  405|       |     */
  406|  3.62k|    if (p.seed != NULL && include_private) {
  ------------------
  |  Branch (406:9): [True: 0, False: 3.62k]
  |  Branch (406:27): [True: 0, False: 0]
  ------------------
  407|       |        /*
  408|       |         * When a seed is provided, the private and public keys may be ignored,
  409|       |         * after validating just their lengths.  Comparing encodings or hashes
  410|       |         * when applicable is possible, but not currently implemented.
  411|       |         */
  412|      0|        if (OSSL_PARAM_get_octet_string_ptr(p.seed, &seedenc, &seedlen) != 1)
  ------------------
  |  Branch (412:13): [True: 0, False: 0]
  ------------------
  413|      0|            return 0;
  414|      0|        if (seedlen != 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, ... */
  |  |  ------------------
  ------------------
  |  Branch (414:13): [True: 0, False: 0]
  |  Branch (414:29): [True: 0, False: 0]
  ------------------
  415|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_SEED_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  416|      0|            return 0;
  417|      0|        }
  418|      0|    }
  419|       |
  420|  3.62k|    if (p.privkey != NULL && include_private) {
  ------------------
  |  Branch (420:9): [True: 0, False: 3.62k]
  |  Branch (420:30): [True: 0, False: 0]
  ------------------
  421|      0|        if (OSSL_PARAM_get_octet_string_ptr(p.privkey, &prvenc, &prvlen) != 1)
  ------------------
  |  Branch (421:13): [True: 0, False: 0]
  ------------------
  422|      0|            return 0;
  423|      0|        if (prvlen != 0 && prvlen != v->prvkey_bytes) {
  ------------------
  |  Branch (423:13): [True: 0, False: 0]
  |  Branch (423:28): [True: 0, False: 0]
  ------------------
  424|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  425|      0|            return 0;
  426|      0|        }
  427|      0|    }
  428|       |
  429|       |    /* Used only when no seed or private key is provided. */
  430|  3.62k|    if (p.pubkey != NULL) {
  ------------------
  |  Branch (430:9): [True: 3.62k, False: 0]
  ------------------
  431|  3.62k|        if (OSSL_PARAM_get_octet_string_ptr(p.pubkey, &pubenc, &publen) != 1)
  ------------------
  |  Branch (431:13): [True: 0, False: 3.62k]
  ------------------
  432|      0|            return 0;
  433|  3.62k|        if (publen != 0 && publen != v->pubkey_bytes) {
  ------------------
  |  Branch (433:13): [True: 3.62k, False: 0]
  |  Branch (433:28): [True: 0, False: 3.62k]
  ------------------
  434|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  435|      0|            return 0;
  436|      0|        }
  437|  3.62k|    }
  438|       |
  439|       |    /* The caller MUST specify at least one of seed, private or public keys. */
  440|  3.62k|    if (seedlen == 0 && publen == 0 && prvlen == 0) {
  ------------------
  |  Branch (440:9): [True: 3.62k, False: 0]
  |  Branch (440:25): [True: 0, False: 3.62k]
  |  Branch (440:40): [True: 0, False: 0]
  ------------------
  441|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  442|      0|        return 0;
  443|      0|    }
  444|       |
  445|       |    /* Check any explicit public key against embedded value in private key */
  446|  3.62k|    if (publen > 0 && prvlen > 0) {
  ------------------
  |  Branch (446:9): [True: 3.62k, False: 0]
  |  Branch (446:23): [True: 0, False: 3.62k]
  ------------------
  447|       |        /* point to the ek offset in dk = DKpke||ek||H(ek)||z */
  448|      0|        puboff = prvlen - ML_KEM_RANDOM_BYTES - ML_KEM_PKHASH_BYTES - publen;
  ------------------
  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
                      puboff = prvlen - ML_KEM_RANDOM_BYTES - ML_KEM_PKHASH_BYTES - publen;
  ------------------
  |  |   50|      0|#define ML_KEM_PKHASH_BYTES 32 /* Salts the shared-secret */
  ------------------
  449|      0|        if (memcmp(pubenc, (unsigned char *)prvenc + puboff, publen) != 0) {
  ------------------
  |  Branch (449:13): [True: 0, False: 0]
  ------------------
  450|      0|            ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_KEY,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_KEY,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_KEY,
  ------------------
  |  |   76|      0|#define PROV_R_INVALID_KEY 158
  ------------------
  451|      0|                "explicit %s public key does not match private",
  452|      0|                v->algorithm_name);
  453|      0|            return 0;
  454|      0|        }
  455|      0|    }
  456|       |
  457|  3.62k|    if (seedlen != 0
  ------------------
  |  Branch (457:9): [True: 0, False: 3.62k]
  ------------------
  458|      0|        && (prvlen == 0 || (key->prov_flags & ML_KEM_KEY_PREFER_SEED))) {
  ------------------
  |  |  125|      0|#define ML_KEM_KEY_PREFER_SEED (1 << 2)
  ------------------
  |  Branch (458:13): [True: 0, False: 0]
  |  Branch (458:28): [True: 0, False: 0]
  ------------------
  459|      0|        if (prvlen != 0 && !check_seed(seedenc, prvenc, key))
  ------------------
  |  Branch (459:13): [True: 0, False: 0]
  |  Branch (459:28): [True: 0, False: 0]
  ------------------
  460|      0|            return 0;
  461|      0|        if (!ossl_ml_kem_set_seed(seedenc, seedlen, key)
  ------------------
  |  Branch (461:13): [True: 0, False: 0]
  ------------------
  462|      0|            || !ossl_ml_kem_genkey(NULL, 0, key))
  ------------------
  |  Branch (462:16): [True: 0, False: 0]
  ------------------
  463|      0|            return 0;
  464|      0|        return prvlen == 0 || check_prvenc(prvenc, key);
  ------------------
  |  Branch (464:16): [True: 0, False: 0]
  |  Branch (464:31): [True: 0, False: 0]
  ------------------
  465|  3.62k|    } else if (prvlen != 0) {
  ------------------
  |  Branch (465:16): [True: 0, False: 3.62k]
  ------------------
  466|      0|        return ossl_ml_kem_parse_private_key(prvenc, prvlen, key);
  467|      0|    }
  468|  3.62k|    return ossl_ml_kem_parse_public_key(pubenc, publen, key);
  469|  3.62k|}
ml_kem_kmgmt.c:ml_kem_export:
  250|  3.62k|{
  251|  3.62k|    ML_KEM_KEY *key = vkey;
  252|  3.62k|    OSSL_PARAM_BLD *tmpl = NULL;
  253|  3.62k|    OSSL_PARAM *params = NULL;
  254|  3.62k|    const ML_KEM_VINFO *v;
  255|  3.62k|    uint8_t *pubenc = NULL, *prvenc = NULL, *seedenc = NULL;
  256|  3.62k|    size_t prvlen = 0, seedlen = 0;
  257|  3.62k|    int ret = 0;
  258|       |
  259|  3.62k|    if (!ossl_prov_is_running() || key == NULL)
  ------------------
  |  Branch (259:9): [True: 0, False: 3.62k]
  |  Branch (259:36): [True: 0, False: 3.62k]
  ------------------
  260|      0|        return 0;
  261|       |
  262|  3.62k|    if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  656|  3.62k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  3.62k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  3.62k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (262:9): [True: 0, False: 3.62k]
  ------------------
  263|      0|        return 0;
  264|       |
  265|  3.62k|    v = ossl_ml_kem_key_vinfo(key);
  ------------------
  |  |  206|  3.62k|#define ossl_ml_kem_key_vinfo(key) ((key)->vinfo)
  ------------------
  266|  3.62k|    if (!ossl_ml_kem_have_pubkey(key)) {
  ------------------
  |  |  207|  3.62k|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  ------------------
  |  Branch (266:9): [True: 0, False: 3.62k]
  ------------------
  267|       |        /* Fail when no key material can be returned */
  268|      0|        if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) == 0
  ------------------
  |  |  646|      0|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (268:13): [True: 0, False: 0]
  ------------------
  269|      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]
  |  |  ------------------
  ------------------
  270|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  271|      0|            return 0;
  272|      0|        }
  273|  3.62k|    } else if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) {
  ------------------
  |  |  647|  3.62k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (273:16): [True: 3.62k, False: 0]
  ------------------
  274|  3.62k|        pubenc = OPENSSL_malloc(v->pubkey_bytes);
  ------------------
  |  |  107|  3.62k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  275|  3.62k|        if (pubenc == NULL
  ------------------
  |  Branch (275:13): [True: 0, False: 3.62k]
  ------------------
  276|  3.62k|            || !ossl_ml_kem_encode_public_key(pubenc, v->pubkey_bytes, key))
  ------------------
  |  Branch (276:16): [True: 0, False: 3.62k]
  ------------------
  277|      0|            goto err;
  278|  3.62k|    }
  279|       |
  280|  3.62k|    if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) {
  ------------------
  |  |  646|  3.62k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (280:9): [True: 0, False: 3.62k]
  ------------------
  281|       |        /*
  282|       |         * The seed and/or private key material are allocated on the secure
  283|       |         * heap if configured, ossl_param_build_set_octet_string(), will then
  284|       |         * also use the secure heap.
  285|       |         */
  286|      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]
  |  |  ------------------
  ------------------
  287|      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, ... */
  |  |  ------------------
  ------------------
  288|      0|            if ((seedenc = OPENSSL_secure_zalloc(seedlen)) == NULL
  ------------------
  |  |  142|      0|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (288:17): [True: 0, False: 0]
  ------------------
  289|      0|                || !ossl_ml_kem_encode_seed(seedenc, seedlen, key))
  ------------------
  |  Branch (289:20): [True: 0, False: 0]
  ------------------
  290|      0|                goto err;
  291|      0|        }
  292|      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]
  |  |  ------------------
  ------------------
  293|      0|            prvlen = v->prvkey_bytes;
  294|      0|            if ((prvenc = OPENSSL_secure_zalloc(prvlen)) == NULL
  ------------------
  |  |  142|      0|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (294:17): [True: 0, False: 0]
  ------------------
  295|      0|                || !ossl_ml_kem_encode_private_key(prvenc, prvlen, key))
  ------------------
  |  Branch (295:20): [True: 0, False: 0]
  ------------------
  296|      0|                goto err;
  297|      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]
  |  |  ------------------
  ------------------
  298|      0|            prvlen = v->prvkey_bytes;
  299|      0|            if ((prvenc = OPENSSL_secure_zalloc(prvlen)) == NULL)
  ------------------
  |  |  142|      0|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (299:17): [True: 0, False: 0]
  ------------------
  300|      0|                goto err;
  301|      0|            memcpy(prvenc, key->encoded_dk, prvlen);
  302|      0|        }
  303|      0|    }
  304|       |
  305|  3.62k|    tmpl = OSSL_PARAM_BLD_new();
  306|  3.62k|    if (tmpl == NULL)
  ------------------
  |  Branch (306:9): [True: 0, False: 3.62k]
  ------------------
  307|      0|        goto err;
  308|       |
  309|       |    /* The (d, z) seed, when available and private keys are requested. */
  310|  3.62k|    if (seedenc != NULL
  ------------------
  |  Branch (310:9): [True: 0, False: 3.62k]
  ------------------
  311|      0|        && !ossl_param_build_set_octet_string(
  ------------------
  |  Branch (311:12): [True: 0, False: 0]
  ------------------
  312|      0|            tmpl, params, OSSL_PKEY_PARAM_ML_KEM_SEED, seedenc, seedlen))
  ------------------
  |  |  445|      0|# define OSSL_PKEY_PARAM_ML_KEM_SEED "seed"
  ------------------
  313|      0|        goto err;
  314|       |
  315|       |    /* The private key in the FIPS 203 |dk| format, when requested. */
  316|  3.62k|    if (prvenc != NULL
  ------------------
  |  Branch (316:9): [True: 0, False: 3.62k]
  ------------------
  317|      0|        && !ossl_param_build_set_octet_string(
  ------------------
  |  Branch (317:12): [True: 0, False: 0]
  ------------------
  318|      0|            tmpl, params, OSSL_PKEY_PARAM_PRIV_KEY, prvenc, prvlen))
  ------------------
  |  |  448|      0|# define OSSL_PKEY_PARAM_PRIV_KEY "priv"
  ------------------
  319|      0|        goto err;
  320|       |
  321|       |    /* The public key on request; it is always available when either is */
  322|  3.62k|    if (pubenc != NULL
  ------------------
  |  Branch (322:9): [True: 3.62k, False: 0]
  ------------------
  323|  3.62k|        && !ossl_param_build_set_octet_string(
  ------------------
  |  Branch (323:12): [True: 0, False: 3.62k]
  ------------------
  324|  3.62k|            tmpl, params, OSSL_PKEY_PARAM_PUB_KEY, pubenc, v->pubkey_bytes))
  ------------------
  |  |  450|  3.62k|# define OSSL_PKEY_PARAM_PUB_KEY "pub"
  ------------------
  325|      0|        goto err;
  326|       |
  327|  3.62k|    params = OSSL_PARAM_BLD_to_param(tmpl);
  328|  3.62k|    if (params == NULL)
  ------------------
  |  Branch (328:9): [True: 0, False: 3.62k]
  ------------------
  329|      0|        goto err;
  330|       |
  331|  3.62k|    ret = param_cb(params, cbarg);
  332|  3.62k|    OSSL_PARAM_clear_free(params);
  333|       |
  334|  3.62k|err:
  335|  3.62k|    OSSL_PARAM_BLD_free(tmpl);
  336|  3.62k|    OPENSSL_secure_clear_free(seedenc, seedlen);
  ------------------
  |  |  150|  3.62k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  337|  3.62k|    OPENSSL_secure_clear_free(prvenc, prvlen);
  ------------------
  |  |  150|  3.62k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  338|  3.62k|    OPENSSL_clear_free(pubenc, v->pubkey_bytes);
  ------------------
  |  |  130|  3.62k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  339|  3.62k|    return ret;
  340|  3.62k|}
ml_kem_kmgmt.c:ml_kem_768_gen_init:
  837|  3.62k|    {                                                                                     \
  838|  3.62k|        return ml_kem_gen_init(provctx, selection, params,                                \
  839|  3.62k|            EVP_PKEY_ML_KEM_##bits);                                                      \
  ------------------
  |  |  103|  3.62k|#define EVP_PKEY_ML_KEM_768 NID_ML_KEM_768
  |  |  ------------------
  |  |  |  | 6645|  3.62k|#define NID_ML_KEM_768          1455
  |  |  ------------------
  ------------------
  840|  3.62k|    }                                                                                     \

ml_kem_kmgmt.c:ml_kem_get_params_decoder:
  120|  7.25k|{
  121|  7.25k|    const char *s;
  122|       |
  123|  7.25k|    memset(r, 0, sizeof(*r));
  124|  7.25k|    if (p != NULL)
  ------------------
  |  Branch (124:9): [True: 7.25k, False: 0]
  ------------------
  125|  36.2k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (125:16): [True: 29.0k, False: 7.25k]
  ------------------
  126|  29.0k|            switch(s[0]) {
  127|      0|            default:
  ------------------
  |  Branch (127:13): [True: 0, False: 29.0k]
  ------------------
  128|      0|                break;
  129|  7.25k|            case 'b':
  ------------------
  |  Branch (129:13): [True: 7.25k, False: 21.7k]
  ------------------
  130|  7.25k|                if (ossl_likely(strcmp("its", s + 1) == 0)) {
  ------------------
  |  |   22|  7.25k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
  131|       |                    /* OSSL_PKEY_PARAM_BITS */
  132|  7.25k|                    if (ossl_unlikely(r->bits != NULL)) {
  ------------------
  |  |   23|  7.25k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7.25k]
  |  |  ------------------
  ------------------
  133|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  134|      0|                                       "param %s is repeated", s);
  135|      0|                        return 0;
  136|      0|                    }
  137|  7.25k|                    r->bits = (OSSL_PARAM *)p;
  138|  7.25k|                }
  139|  7.25k|                break;
  140|  7.25k|            case 'e':
  ------------------
  |  Branch (140:13): [True: 0, False: 29.0k]
  ------------------
  141|      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]
  |  |  ------------------
  ------------------
  142|       |                    /* OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY */
  143|      0|                    if (ossl_unlikely(r->encpubkey != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  144|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  145|      0|                                       "param %s is repeated", s);
  146|      0|                        return 0;
  147|      0|                    }
  148|      0|                    r->encpubkey = (OSSL_PARAM *)p;
  149|      0|                }
  150|      0|                break;
  151|      0|            case 'k':
  ------------------
  |  Branch (151:13): [True: 0, False: 29.0k]
  ------------------
  152|      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]
  |  |  ------------------
  ------------------
  153|       |                    /* OSSL_PKEY_PARAM_CMS_KEMRI_KDF_ALGORITHM */
  154|      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]
  |  |  ------------------
  ------------------
  155|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  156|      0|                                       "param %s is repeated", s);
  157|      0|                        return 0;
  158|      0|                    }
  159|      0|                    r->kemri_kdf_alg = (OSSL_PARAM *)p;
  160|      0|                }
  161|      0|                break;
  162|  7.25k|            case 'm':
  ------------------
  |  Branch (162:13): [True: 7.25k, False: 21.7k]
  ------------------
  163|  7.25k|                if (ossl_likely(strcmp("ax-size", s + 1) == 0)) {
  ------------------
  |  |   22|  7.25k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
  164|       |                    /* OSSL_PKEY_PARAM_MAX_SIZE */
  165|  7.25k|                    if (ossl_unlikely(r->maxsize != NULL)) {
  ------------------
  |  |   23|  7.25k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7.25k]
  |  |  ------------------
  ------------------
  166|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  167|      0|                                       "param %s is repeated", s);
  168|      0|                        return 0;
  169|      0|                    }
  170|  7.25k|                    r->maxsize = (OSSL_PARAM *)p;
  171|  7.25k|                }
  172|  7.25k|                break;
  173|  7.25k|            case 'p':
  ------------------
  |  Branch (173:13): [True: 0, False: 29.0k]
  ------------------
  174|      0|                switch(s[1]) {
  175|      0|                default:
  ------------------
  |  Branch (175:17): [True: 0, False: 0]
  ------------------
  176|      0|                    break;
  177|      0|                case 'r':
  ------------------
  |  Branch (177:17): [True: 0, False: 0]
  ------------------
  178|      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]
  |  |  ------------------
  ------------------
  179|       |                        /* OSSL_PKEY_PARAM_PRIV_KEY */
  180|      0|                        if (ossl_unlikely(r->privkey != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  181|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  182|      0|                                           "param %s is repeated", s);
  183|      0|                            return 0;
  184|      0|                        }
  185|      0|                        r->privkey = (OSSL_PARAM *)p;
  186|      0|                    }
  187|      0|                    break;
  188|      0|                case 'u':
  ------------------
  |  Branch (188:17): [True: 0, False: 0]
  ------------------
  189|      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]
  |  |  ------------------
  ------------------
  190|       |                        /* OSSL_PKEY_PARAM_PUB_KEY */
  191|      0|                        if (ossl_unlikely(r->pubkey != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  192|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  193|      0|                                           "param %s is repeated", s);
  194|      0|                            return 0;
  195|      0|                        }
  196|      0|                        r->pubkey = (OSSL_PARAM *)p;
  197|      0|                    }
  198|      0|                }
  199|      0|                break;
  200|      0|            case 'r':
  ------------------
  |  Branch (200:13): [True: 0, False: 29.0k]
  ------------------
  201|      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]
  |  |  ------------------
  ------------------
  202|       |                    /* OSSL_PKEY_PARAM_CMS_RI_TYPE */
  203|      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]
  |  |  ------------------
  ------------------
  204|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  205|      0|                                       "param %s is repeated", s);
  206|      0|                        return 0;
  207|      0|                    }
  208|      0|                    r->ri_type = (OSSL_PARAM *)p;
  209|      0|                }
  210|      0|                break;
  211|  14.5k|            case 's':
  ------------------
  |  Branch (211:13): [True: 14.5k, False: 14.5k]
  ------------------
  212|  14.5k|                switch(s[1]) {
  213|      0|                default:
  ------------------
  |  Branch (213:17): [True: 0, False: 14.5k]
  ------------------
  214|      0|                    break;
  215|  14.5k|                case 'e':
  ------------------
  |  Branch (215:17): [True: 14.5k, False: 0]
  ------------------
  216|  14.5k|                    switch(s[2]) {
  217|      0|                    default:
  ------------------
  |  Branch (217:21): [True: 0, False: 14.5k]
  ------------------
  218|      0|                        break;
  219|  14.5k|                    case 'c':
  ------------------
  |  Branch (219:21): [True: 14.5k, False: 0]
  ------------------
  220|  14.5k|                        switch(s[3]) {
  221|      0|                        default:
  ------------------
  |  Branch (221:25): [True: 0, False: 14.5k]
  ------------------
  222|      0|                            break;
  223|  14.5k|                        case 'u':
  ------------------
  |  Branch (223:25): [True: 14.5k, False: 0]
  ------------------
  224|  14.5k|                            switch(s[4]) {
  225|      0|                            default:
  ------------------
  |  Branch (225:29): [True: 0, False: 14.5k]
  ------------------
  226|      0|                                break;
  227|  14.5k|                            case 'r':
  ------------------
  |  Branch (227:29): [True: 14.5k, False: 0]
  ------------------
  228|  14.5k|                                switch(s[5]) {
  229|      0|                                default:
  ------------------
  |  Branch (229:33): [True: 0, False: 14.5k]
  ------------------
  230|      0|                                    break;
  231|  14.5k|                                case 'i':
  ------------------
  |  Branch (231:33): [True: 14.5k, False: 0]
  ------------------
  232|  14.5k|                                    switch(s[6]) {
  233|      0|                                    default:
  ------------------
  |  Branch (233:37): [True: 0, False: 14.5k]
  ------------------
  234|      0|                                        break;
  235|  14.5k|                                    case 't':
  ------------------
  |  Branch (235:37): [True: 14.5k, False: 0]
  ------------------
  236|  14.5k|                                        switch(s[7]) {
  237|      0|                                        default:
  ------------------
  |  Branch (237:41): [True: 0, False: 14.5k]
  ------------------
  238|      0|                                            break;
  239|  14.5k|                                        case 'y':
  ------------------
  |  Branch (239:41): [True: 14.5k, False: 0]
  ------------------
  240|  14.5k|                                            switch(s[8]) {
  241|      0|                                            default:
  ------------------
  |  Branch (241:45): [True: 0, False: 14.5k]
  ------------------
  242|      0|                                                break;
  243|  14.5k|                                            case '-':
  ------------------
  |  Branch (243:45): [True: 14.5k, False: 0]
  ------------------
  244|  14.5k|                                                switch(s[9]) {
  245|      0|                                                default:
  ------------------
  |  Branch (245:49): [True: 0, False: 14.5k]
  ------------------
  246|      0|                                                    break;
  247|  7.25k|                                                case 'b':
  ------------------
  |  Branch (247:49): [True: 7.25k, False: 7.25k]
  ------------------
  248|  7.25k|                                                    if (ossl_likely(strcmp("its", s + 10) == 0)) {
  ------------------
  |  |   22|  7.25k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
  249|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_BITS */
  250|  7.25k|                                                        if (ossl_unlikely(r->secbits != NULL)) {
  ------------------
  |  |   23|  7.25k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7.25k]
  |  |  ------------------
  ------------------
  251|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  252|      0|                                                                           "param %s is repeated", s);
  253|      0|                                                            return 0;
  254|      0|                                                        }
  255|  7.25k|                                                        r->secbits = (OSSL_PARAM *)p;
  256|  7.25k|                                                    }
  257|  7.25k|                                                    break;
  258|  7.25k|                                                case 'c':
  ------------------
  |  Branch (258:49): [True: 7.25k, False: 7.25k]
  ------------------
  259|  7.25k|                                                    if (ossl_likely(strcmp("ategory", s + 10) == 0)) {
  ------------------
  |  |   22|  7.25k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
  260|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_CATEGORY */
  261|  7.25k|                                                        if (ossl_unlikely(r->seccat != NULL)) {
  ------------------
  |  |   23|  7.25k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7.25k]
  |  |  ------------------
  ------------------
  262|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  263|      0|                                                                           "param %s is repeated", s);
  264|      0|                                                            return 0;
  265|      0|                                                        }
  266|  7.25k|                                                        r->seccat = (OSSL_PARAM *)p;
  267|  7.25k|                                                    }
  268|  14.5k|                                                }
  269|  14.5k|                                            }
  270|  14.5k|                                        }
  271|  14.5k|                                    }
  272|  14.5k|                                }
  273|  14.5k|                            }
  274|  14.5k|                        }
  275|  14.5k|                        break;
  276|  14.5k|                    case 'e':
  ------------------
  |  Branch (276:21): [True: 0, False: 14.5k]
  ------------------
  277|      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]
  |  |  ------------------
  ------------------
  278|       |                            /* OSSL_PKEY_PARAM_ML_KEM_SEED */
  279|      0|                            if (ossl_unlikely(r->seed != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  280|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  281|      0|                                               "param %s is repeated", s);
  282|      0|                                return 0;
  283|      0|                            }
  284|      0|                            r->seed = (OSSL_PARAM *)p;
  285|      0|                        }
  286|  14.5k|                    }
  287|  14.5k|                }
  288|  29.0k|            }
  289|  7.25k|    return 1;
  290|  7.25k|}
ml_kem_kmgmt.c:ml_kem_gen_set_params_decoder:
  350|  7.25k|{
  351|  7.25k|    const char *s;
  352|       |
  353|  7.25k|    memset(r, 0, sizeof(*r));
  354|  7.25k|    if (p != NULL)
  ------------------
  |  Branch (354:9): [True: 3.62k, False: 3.62k]
  ------------------
  355|  3.62k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (355:16): [True: 0, False: 3.62k]
  ------------------
  356|      0|            switch(s[0]) {
  357|      0|            default:
  ------------------
  |  Branch (357:13): [True: 0, False: 0]
  ------------------
  358|      0|                break;
  359|      0|            case 'p':
  ------------------
  |  Branch (359:13): [True: 0, False: 0]
  ------------------
  360|      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]
  |  |  ------------------
  ------------------
  361|       |                    /* OSSL_PKEY_PARAM_PROPERTIES */
  362|      0|                    if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  363|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  364|      0|                                       "param %s is repeated", s);
  365|      0|                        return 0;
  366|      0|                    }
  367|      0|                    r->propq = (OSSL_PARAM *)p;
  368|      0|                }
  369|      0|                break;
  370|      0|            case 's':
  ------------------
  |  Branch (370:13): [True: 0, False: 0]
  ------------------
  371|      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]
  |  |  ------------------
  ------------------
  372|       |                    /* OSSL_PKEY_PARAM_ML_KEM_SEED */
  373|      0|                    if (ossl_unlikely(r->seed != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  374|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  375|      0|                                       "param %s is repeated", s);
  376|      0|                        return 0;
  377|      0|                    }
  378|      0|                    r->seed = (OSSL_PARAM *)p;
  379|      0|                }
  380|      0|            }
  381|  7.25k|    return 1;
  382|  7.25k|}
ml_kem_kmgmt.c:ml_kem_key_type_params_decoder:
   33|  3.62k|{
   34|  3.62k|    const char *s;
   35|       |
   36|  3.62k|    memset(r, 0, sizeof(*r));
   37|  3.62k|    if (p != NULL)
  ------------------
  |  Branch (37:9): [True: 3.62k, False: 0]
  ------------------
   38|  7.25k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (38:16): [True: 3.62k, False: 3.62k]
  ------------------
   39|  3.62k|            switch(s[0]) {
   40|      0|            default:
  ------------------
  |  Branch (40:13): [True: 0, False: 3.62k]
  ------------------
   41|      0|                break;
   42|  3.62k|            case 'p':
  ------------------
  |  Branch (42:13): [True: 3.62k, False: 0]
  ------------------
   43|  3.62k|                switch(s[1]) {
   44|      0|                default:
  ------------------
  |  Branch (44:17): [True: 0, False: 3.62k]
  ------------------
   45|      0|                    break;
   46|      0|                case 'r':
  ------------------
  |  Branch (46:17): [True: 0, False: 3.62k]
  ------------------
   47|      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]
  |  |  ------------------
  ------------------
   48|       |                        /* OSSL_PKEY_PARAM_PRIV_KEY */
   49|      0|                        if (ossl_unlikely(r->privkey != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   50|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   51|      0|                                           "param %s is repeated", s);
   52|      0|                            return 0;
   53|      0|                        }
   54|      0|                        r->privkey = (OSSL_PARAM *)p;
   55|      0|                    }
   56|      0|                    break;
   57|  3.62k|                case 'u':
  ------------------
  |  Branch (57:17): [True: 3.62k, False: 0]
  ------------------
   58|  3.62k|                    if (ossl_likely(strcmp("b", s + 2) == 0)) {
  ------------------
  |  |   22|  3.62k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
   59|       |                        /* OSSL_PKEY_PARAM_PUB_KEY */
   60|  3.62k|                        if (ossl_unlikely(r->pubkey != NULL)) {
  ------------------
  |  |   23|  3.62k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
   61|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   62|      0|                                           "param %s is repeated", s);
   63|      0|                            return 0;
   64|      0|                        }
   65|  3.62k|                        r->pubkey = (OSSL_PARAM *)p;
   66|  3.62k|                    }
   67|  3.62k|                }
   68|  3.62k|                break;
   69|  3.62k|            case 's':
  ------------------
  |  Branch (69:13): [True: 0, False: 3.62k]
  ------------------
   70|      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]
  |  |  ------------------
  ------------------
   71|       |                    /* OSSL_PKEY_PARAM_ML_KEM_SEED */
   72|      0|                    if (ossl_unlikely(r->seed != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   73|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   74|      0|                                       "param %s is repeated", s);
   75|      0|                        return 0;
   76|      0|                    }
   77|      0|                    r->seed = (OSSL_PARAM *)p;
   78|      0|                }
   79|  3.62k|            }
   80|  3.62k|    return 1;
   81|  3.62k|}

mlx_kmgmt.c:mlx_kem_key_new:
   86|  7.25k|{
   87|  7.25k|    MLX_KEY *key = NULL;
   88|  7.25k|    unsigned int ml_kem_variant;
   89|       |
   90|  7.25k|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (90:9): [True: 0, False: 7.25k]
  ------------------
   91|  7.25k|        || v >= OSSL_NELEM(hybrid_vtable)
  ------------------
  |  |   14|  14.5k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (91:12): [True: 0, False: 7.25k]
  ------------------
   92|  7.25k|        || (key = OPENSSL_malloc(sizeof(*key))) == NULL)
  ------------------
  |  |  107|  7.25k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (92:12): [True: 0, False: 7.25k]
  ------------------
   93|      0|        goto err;
   94|       |
   95|  7.25k|    ml_kem_variant = hybrid_vtable[v].ml_kem_variant;
   96|  7.25k|    key->libctx = libctx;
   97|  7.25k|    key->minfo = ossl_ml_kem_get_vinfo(ml_kem_variant);
   98|  7.25k|    key->xinfo = &hybrid_vtable[v];
   99|  7.25k|    key->xkey = key->mkey = NULL;
  100|  7.25k|    key->state = MLX_HAVE_NOKEYS;
  ------------------
  |  |   39|  7.25k|#define MLX_HAVE_NOKEYS 0
  ------------------
  101|  7.25k|    key->propq = propq;
  102|  7.25k|    return key;
  103|       |
  104|      0|err:
  105|      0|    OPENSSL_free(propq);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  106|       |    return NULL;
  107|  7.25k|}
mlx_kmgmt.c:mlx_kem_key_free:
   72|  7.25k|{
   73|  7.25k|    MLX_KEY *key = vkey;
   74|       |
   75|  7.25k|    if (key == NULL)
  ------------------
  |  Branch (75:9): [True: 0, False: 7.25k]
  ------------------
   76|      0|        return;
   77|  7.25k|    OPENSSL_free(key->propq);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   78|  7.25k|    EVP_PKEY_free(key->mkey);
   79|  7.25k|    EVP_PKEY_free(key->xkey);
   80|  7.25k|    OPENSSL_free(key);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   81|  7.25k|}
mlx_kmgmt.c:mlx_kem_get_params:
  486|  14.5k|{
  487|  14.5k|    MLX_KEY *key = vkey;
  488|  14.5k|    OSSL_PARAM *pub, *prv = NULL;
  489|  14.5k|    EXPORT_CB_ARG sub_arg;
  490|  14.5k|    int selection;
  491|  14.5k|    struct mlx_get_params_st p;
  492|       |
  493|  14.5k|    if (key == NULL || !mlx_get_params_decoder(params, &p))
  ------------------
  |  Branch (493:9): [True: 0, False: 14.5k]
  |  Branch (493:24): [True: 0, False: 14.5k]
  ------------------
  494|      0|        return 0;
  495|       |
  496|       |    /* The reported "bit" count is those of the ML-KEM key */
  497|  14.5k|    if (p.bits != NULL)
  ------------------
  |  Branch (497:9): [True: 7.25k, False: 7.25k]
  ------------------
  498|  7.25k|        if (!OSSL_PARAM_set_int(p.bits, key->minfo->bits))
  ------------------
  |  Branch (498:13): [True: 0, False: 7.25k]
  ------------------
  499|      0|            return 0;
  500|       |
  501|       |    /* The reported security bits are those of the ML-KEM key */
  502|  14.5k|    if (p.secbits != NULL)
  ------------------
  |  Branch (502:9): [True: 7.25k, False: 7.25k]
  ------------------
  503|  7.25k|        if (!OSSL_PARAM_set_int(p.secbits, key->minfo->secbits))
  ------------------
  |  Branch (503:13): [True: 0, False: 7.25k]
  ------------------
  504|      0|            return 0;
  505|       |
  506|       |    /* The reported security category are those of the ML-KEM key */
  507|  14.5k|    if (p.seccat != NULL)
  ------------------
  |  Branch (507:9): [True: 7.25k, False: 7.25k]
  ------------------
  508|  7.25k|        if (!OSSL_PARAM_set_int(p.seccat, key->minfo->security_category))
  ------------------
  |  Branch (508:13): [True: 0, False: 7.25k]
  ------------------
  509|      0|            return 0;
  510|       |
  511|       |    /* The ciphertext sizes are additive */
  512|  14.5k|    if (p.maxsize != NULL)
  ------------------
  |  Branch (512:9): [True: 7.25k, False: 7.25k]
  ------------------
  513|  7.25k|        if (!OSSL_PARAM_set_size_t(p.maxsize, key->minfo->ctext_bytes + key->xinfo->pubkey_bytes))
  ------------------
  |  Branch (513:13): [True: 0, False: 7.25k]
  ------------------
  514|      0|            return 0;
  515|       |
  516|  14.5k|    if (!mlx_kem_have_pubkey(key))
  ------------------
  |  |   44|  14.5k|#define mlx_kem_have_pubkey(key) ((key)->state > 0)
  ------------------
  |  Branch (516:9): [True: 3.62k, False: 10.8k]
  ------------------
  517|  3.62k|        return 1;
  518|       |
  519|  10.8k|    memset(&sub_arg, 0, sizeof(sub_arg));
  520|  10.8k|    if ((pub = p.pub) != NULL) {
  ------------------
  |  Branch (520:9): [True: 7.25k, False: 3.62k]
  ------------------
  521|  7.25k|        size_t publen = key->minfo->pubkey_bytes + key->xinfo->pubkey_bytes;
  522|       |
  523|  7.25k|        if (pub->data_type != OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|  7.25k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (523:13): [True: 0, False: 7.25k]
  ------------------
  524|      0|            return 0;
  525|  7.25k|        pub->return_size = publen;
  526|  7.25k|        if (pub->data == NULL) {
  ------------------
  |  Branch (526:13): [True: 3.62k, False: 3.62k]
  ------------------
  527|  3.62k|            pub = NULL;
  528|  3.62k|        } else if (pub->data_size < publen) {
  ------------------
  |  Branch (528:20): [True: 0, False: 3.62k]
  ------------------
  529|      0|            ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  133|      0|#define PROV_R_OUTPUT_BUFFER_TOO_SMALL 106
  ------------------
  530|      0|                "public key output buffer too short: %lu < %lu",
  531|      0|                (unsigned long)pub->data_size,
  532|      0|                (unsigned long)publen);
  533|      0|            return 0;
  534|  3.62k|        } else {
  535|  3.62k|            sub_arg.pubenc = pub->data;
  536|  3.62k|        }
  537|  7.25k|    }
  538|  10.8k|    if (mlx_kem_have_prvkey(key)) {
  ------------------
  |  |   45|  10.8k|#define mlx_kem_have_prvkey(key) ((key)->state > 1)
  |  |  ------------------
  |  |  |  Branch (45:34): [True: 10.8k, False: 0]
  |  |  ------------------
  ------------------
  539|  10.8k|        if ((prv = p.priv) != NULL) {
  ------------------
  |  Branch (539:13): [True: 0, False: 10.8k]
  ------------------
  540|      0|            size_t prvlen = key->minfo->prvkey_bytes + key->xinfo->prvkey_bytes;
  541|       |
  542|      0|            if (prv->data_type != OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (542:17): [True: 0, False: 0]
  ------------------
  543|      0|                return 0;
  544|      0|            prv->return_size = prvlen;
  545|      0|            if (prv->data == NULL) {
  ------------------
  |  Branch (545:17): [True: 0, False: 0]
  ------------------
  546|      0|                prv = NULL;
  547|      0|            } else if (prv->data_size < prvlen) {
  ------------------
  |  Branch (547:24): [True: 0, False: 0]
  ------------------
  548|      0|                ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                              ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                              ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  133|      0|#define PROV_R_OUTPUT_BUFFER_TOO_SMALL 106
  ------------------
  549|      0|                    "private key output buffer too short: %lu < %lu",
  550|      0|                    (unsigned long)prv->data_size,
  551|      0|                    (unsigned long)prvlen);
  552|      0|                return 0;
  553|      0|            } else {
  554|      0|                sub_arg.prvenc = prv->data;
  555|      0|            }
  556|      0|        }
  557|  10.8k|    }
  558|  10.8k|    if (pub == NULL && prv == NULL)
  ------------------
  |  Branch (558:9): [True: 7.25k, False: 3.62k]
  |  Branch (558:24): [True: 7.25k, False: 0]
  ------------------
  559|  7.25k|        return 1;
  560|       |
  561|  3.62k|    selection = prv == NULL ? 0 : OSSL_KEYMGMT_SELECT_PRIVATE_KEY;
  ------------------
  |  |  646|  3.62k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (561:17): [True: 3.62k, False: 0]
  ------------------
  562|  3.62k|    selection |= pub == NULL ? 0 : OSSL_KEYMGMT_SELECT_PUBLIC_KEY;
  ------------------
  |  |  647|  7.25k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (562:18): [True: 0, False: 3.62k]
  ------------------
  563|  3.62k|    if (key->xinfo->group_name != NULL)
  ------------------
  |  Branch (563:9): [True: 0, False: 3.62k]
  ------------------
  564|      0|        selection |= OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS;
  ------------------
  |  |  648|      0|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  ------------------
  565|       |
  566|       |    /* Extract sub-component key material */
  567|  3.62k|    if (!export_sub(&sub_arg, selection, key)
  ------------------
  |  Branch (567:9): [True: 0, False: 3.62k]
  ------------------
  568|  3.62k|        || (pub != NULL && sub_arg.pubcount != 2)
  ------------------
  |  Branch (568:13): [True: 3.62k, False: 0]
  |  Branch (568:28): [True: 0, False: 3.62k]
  ------------------
  569|  3.62k|        || (prv != NULL && sub_arg.prvcount != 2)) {
  ------------------
  |  Branch (569:13): [True: 0, False: 3.62k]
  |  Branch (569:28): [True: 0, False: 0]
  ------------------
  570|       |        /* Erase any partial key material on failure */
  571|      0|        if (sub_arg.pubenc != NULL)
  ------------------
  |  Branch (571:13): [True: 0, False: 0]
  ------------------
  572|      0|            OPENSSL_cleanse(sub_arg.pubenc,
  573|      0|                key->minfo->pubkey_bytes + key->xinfo->pubkey_bytes);
  574|      0|        if (sub_arg.prvenc != NULL)
  ------------------
  |  Branch (574:13): [True: 0, False: 0]
  ------------------
  575|      0|            OPENSSL_cleanse(sub_arg.prvenc,
  576|      0|                key->minfo->prvkey_bytes + key->xinfo->prvkey_bytes);
  577|      0|        return 0;
  578|      0|    }
  579|       |
  580|  3.62k|    return 1;
  581|  3.62k|}
mlx_kmgmt.c:export_sub:
  215|  3.62k|{
  216|  3.62k|    int slot;
  217|       |
  218|       |    /*
  219|       |     * The caller is responsible for initialising only the pubenc and prvenc
  220|       |     * pointer fields, the rest are set here or in the callback.
  221|       |     */
  222|  3.62k|    sub_arg->pubcount = 0;
  223|  3.62k|    sub_arg->prvcount = 0;
  224|       |
  225|  10.8k|    for (slot = 0; slot < 2; ++slot) {
  ------------------
  |  Branch (225:20): [True: 7.25k, False: 3.62k]
  ------------------
  226|  7.25k|        int ml_kem_slot = key->xinfo->ml_kem_slot;
  227|  7.25k|        EVP_PKEY *pkey;
  228|       |
  229|       |        /* Export the parts of each component into its storage slot */
  230|  7.25k|        if (slot == ml_kem_slot) {
  ------------------
  |  Branch (230:13): [True: 3.62k, False: 3.62k]
  ------------------
  231|  3.62k|            pkey = key->mkey;
  232|  3.62k|            sub_arg->algorithm_name = key->minfo->algorithm_name;
  233|  3.62k|            sub_arg->puboff = slot * key->xinfo->pubkey_bytes;
  234|  3.62k|            sub_arg->prvoff = slot * key->xinfo->prvkey_bytes;
  235|  3.62k|            sub_arg->publen = key->minfo->pubkey_bytes;
  236|  3.62k|            sub_arg->prvlen = key->minfo->prvkey_bytes;
  237|  3.62k|        } else {
  238|  3.62k|            pkey = key->xkey;
  239|  3.62k|            sub_arg->algorithm_name = key->xinfo->algorithm_name;
  240|  3.62k|            sub_arg->puboff = (1 - ml_kem_slot) * key->minfo->pubkey_bytes;
  241|  3.62k|            sub_arg->prvoff = (1 - ml_kem_slot) * key->minfo->prvkey_bytes;
  242|  3.62k|            sub_arg->publen = key->xinfo->pubkey_bytes;
  243|  3.62k|            sub_arg->prvlen = key->xinfo->prvkey_bytes;
  244|  3.62k|        }
  245|  7.25k|        if (!EVP_PKEY_export(pkey, selection, export_sub_cb, (void *)sub_arg))
  ------------------
  |  Branch (245:13): [True: 0, False: 7.25k]
  ------------------
  246|      0|            return 0;
  247|  7.25k|    }
  248|  3.62k|    return 1;
  249|  3.62k|}
mlx_kmgmt.c:export_sub_cb:
  169|  7.25k|{
  170|  7.25k|    EXPORT_CB_ARG *sub_arg = varg;
  171|  7.25k|    struct ml_kem_import_export_st p;
  172|  7.25k|    size_t len;
  173|       |
  174|  7.25k|    if (!ml_kem_import_export_decoder(params, &p))
  ------------------
  |  Branch (174:9): [True: 0, False: 7.25k]
  ------------------
  175|      0|        return 0;
  176|       |
  177|       |    /*
  178|       |     * The caller will decide whether anything essential is missing, but, if
  179|       |     * some key material was returned, it should have the right (parameter)
  180|       |     * data type and length.
  181|       |     */
  182|  7.25k|    if (sub_arg->pubenc != NULL && p.pubkey != NULL) {
  ------------------
  |  Branch (182:9): [True: 7.25k, False: 0]
  |  Branch (182:36): [True: 7.25k, False: 0]
  ------------------
  183|  7.25k|        void *pub = sub_arg->pubenc + sub_arg->puboff;
  184|       |
  185|  7.25k|        if (OSSL_PARAM_get_octet_string(p.pubkey, &pub, sub_arg->publen, &len) != 1)
  ------------------
  |  Branch (185:13): [True: 0, False: 7.25k]
  ------------------
  186|      0|            return 0;
  187|  7.25k|        if (len != sub_arg->publen) {
  ------------------
  |  Branch (187:13): [True: 0, False: 7.25k]
  ------------------
  188|      0|            ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  189|      0|                "Unexpected %s public key length %lu != %lu",
  190|      0|                sub_arg->algorithm_name, (unsigned long)len,
  191|      0|                sub_arg->publen);
  192|      0|            return 0;
  193|      0|        }
  194|  7.25k|        ++sub_arg->pubcount;
  195|  7.25k|    }
  196|  7.25k|    if (sub_arg->prvenc != NULL && p.privkey != NULL) {
  ------------------
  |  Branch (196:9): [True: 0, False: 7.25k]
  |  Branch (196:36): [True: 0, False: 0]
  ------------------
  197|      0|        void *prv = sub_arg->prvenc + sub_arg->prvoff;
  198|       |
  199|      0|        if (OSSL_PARAM_get_octet_string(p.privkey, &prv, sub_arg->prvlen, &len) != 1)
  ------------------
  |  Branch (199:13): [True: 0, False: 0]
  ------------------
  200|      0|            return 0;
  201|      0|        if (len != sub_arg->prvlen) {
  ------------------
  |  Branch (201:13): [True: 0, False: 0]
  ------------------
  202|      0|            ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  203|      0|                "Unexpected %s private key length %lu != %lu",
  204|      0|                sub_arg->algorithm_name, (unsigned long)len,
  205|      0|                (unsigned long)sub_arg->publen);
  206|      0|            return 0;
  207|      0|        }
  208|      0|        ++sub_arg->prvcount;
  209|      0|    }
  210|  7.25k|    return 1;
  211|  7.25k|}
mlx_kmgmt.c:mlx_kem_set_params:
  589|  3.62k|{
  590|  3.62k|    MLX_KEY *key = vkey;
  591|  3.62k|    struct mlx_set_params_st p;
  592|  3.62k|    const void *pubenc = NULL;
  593|  3.62k|    size_t publen = 0;
  594|       |
  595|  3.62k|    if (key == NULL || !mlx_set_params_decoder(params, &p))
  ------------------
  |  Branch (595:9): [True: 0, False: 3.62k]
  |  Branch (595:24): [True: 0, False: 3.62k]
  ------------------
  596|      0|        return 0;
  597|       |
  598|  3.62k|    if (p.propq != NULL) {
  ------------------
  |  Branch (598:9): [True: 0, False: 3.62k]
  ------------------
  599|      0|        OPENSSL_free(key->propq);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  600|      0|        key->propq = NULL;
  601|      0|        if (!OSSL_PARAM_get_utf8_string(p.propq, &key->propq, 0))
  ------------------
  |  Branch (601:13): [True: 0, False: 0]
  ------------------
  602|      0|            return 0;
  603|      0|    }
  604|       |
  605|  3.62k|    if (p.pub == NULL)
  ------------------
  |  Branch (605:9): [True: 0, False: 3.62k]
  ------------------
  606|      0|        return 1;
  607|       |
  608|       |    /* Key mutation is reportedly generally not allowed */
  609|  3.62k|    if (mlx_kem_have_pubkey(key)) {
  ------------------
  |  |   44|  3.62k|#define mlx_kem_have_pubkey(key) ((key)->state > 0)
  |  |  ------------------
  |  |  |  Branch (44:34): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  610|      0|        ERR_raise_data(ERR_LIB_PROV,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
  611|      0|            PROV_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE,
  ------------------
  |  |  132|      0|#define PROV_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE 178
  ------------------
  612|      0|            "keys cannot be mutated");
  613|      0|        return 0;
  614|      0|    }
  615|       |    /* An unlikely failure mode is the parameter having some unexpected type */
  616|  3.62k|    if (!OSSL_PARAM_get_octet_string_ptr(p.pub, &pubenc, &publen))
  ------------------
  |  Branch (616:9): [True: 0, False: 3.62k]
  ------------------
  617|      0|        return 0;
  618|       |
  619|  3.62k|    if (publen != key->minfo->pubkey_bytes + key->xinfo->pubkey_bytes) {
  ------------------
  |  Branch (619:9): [True: 0, False: 3.62k]
  ------------------
  620|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_KEY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  621|      0|        return 0;
  622|      0|    }
  623|       |
  624|  3.62k|    return load_keys(key, pubenc, publen, NULL, 0);
  625|  3.62k|}
mlx_kmgmt.c:load_keys:
  382|  3.62k|{
  383|  3.62k|    int slot;
  384|       |
  385|  10.8k|    for (slot = 0; slot < 2; ++slot) {
  ------------------
  |  Branch (385:20): [True: 7.25k, False: 3.62k]
  ------------------
  386|  7.25k|        if (prvlen) {
  ------------------
  |  Branch (386:13): [True: 0, False: 7.25k]
  ------------------
  387|       |            /* Ignore public keys when private provided */
  388|      0|            if (!load_slot(key->libctx, key->propq, OSSL_PKEY_PARAM_PRIV_KEY,
  ------------------
  |  |  448|      0|# define OSSL_PKEY_PARAM_PRIV_KEY "priv"
  ------------------
  |  Branch (388:17): [True: 0, False: 0]
  ------------------
  389|      0|                    minimal_selection, key, slot, prvenc,
  390|      0|                    (int)key->minfo->prvkey_bytes,
  391|      0|                    (int)key->xinfo->prvkey_bytes))
  392|      0|                goto err;
  393|  7.25k|        } else if (publen) {
  ------------------
  |  Branch (393:20): [True: 7.25k, False: 0]
  ------------------
  394|       |            /* Absent private key data, import public keys */
  395|  7.25k|            if (!load_slot(key->libctx, key->propq, OSSL_PKEY_PARAM_PUB_KEY,
  ------------------
  |  |  450|  7.25k|# define OSSL_PKEY_PARAM_PUB_KEY "pub"
  ------------------
  |  Branch (395:17): [True: 0, False: 7.25k]
  ------------------
  396|  7.25k|                    minimal_selection, key, slot, pubenc,
  397|  7.25k|                    (int)key->minfo->pubkey_bytes,
  398|  7.25k|                    (int)key->xinfo->pubkey_bytes))
  399|      0|                goto err;
  400|  7.25k|        }
  401|  7.25k|    }
  402|  3.62k|    key->state = prvlen ? MLX_HAVE_PRVKEY : MLX_HAVE_PUBKEY;
  ------------------
  |  |   41|      0|#define MLX_HAVE_PRVKEY 2
  ------------------
                  key->state = prvlen ? MLX_HAVE_PRVKEY : MLX_HAVE_PUBKEY;
  ------------------
  |  |   40|  7.25k|#define MLX_HAVE_PUBKEY 1
  ------------------
  |  Branch (402:18): [True: 0, False: 3.62k]
  ------------------
  403|  3.62k|    return 1;
  404|       |
  405|      0|err:
  406|      0|    EVP_PKEY_free(key->mkey);
  407|      0|    EVP_PKEY_free(key->xkey);
  408|      0|    key->xkey = key->mkey = NULL;
  409|      0|    key->state = MLX_HAVE_NOKEYS;
  ------------------
  |  |   39|      0|#define MLX_HAVE_NOKEYS 0
  ------------------
  410|      0|    return 0;
  411|  3.62k|}
mlx_kmgmt.c:load_slot:
  338|  7.25k|{
  339|  7.25k|    EVP_PKEY_CTX *ctx;
  340|  7.25k|    EVP_PKEY **ppkey;
  341|  7.25k|    OSSL_PARAM parr[] = { OSSL_PARAM_END, OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  7.25k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM parr[] = { OSSL_PARAM_END, OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  7.25k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM parr[] = { OSSL_PARAM_END, OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  7.25k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  342|  7.25k|    const char *alg;
  343|  7.25k|    char *group = NULL;
  344|  7.25k|    size_t off, len;
  345|  7.25k|    void *val;
  346|  7.25k|    int ml_kem_slot = key->xinfo->ml_kem_slot;
  347|  7.25k|    int ret = 0;
  348|       |
  349|  7.25k|    if (slot == ml_kem_slot) {
  ------------------
  |  Branch (349:9): [True: 3.62k, False: 3.62k]
  ------------------
  350|  3.62k|        alg = key->minfo->algorithm_name;
  351|  3.62k|        ppkey = &key->mkey;
  352|  3.62k|        off = slot * xbytes;
  353|  3.62k|        len = mbytes;
  354|  3.62k|    } else {
  355|  3.62k|        alg = key->xinfo->algorithm_name;
  356|  3.62k|        group = (char *)key->xinfo->group_name;
  357|  3.62k|        ppkey = &key->xkey;
  358|  3.62k|        off = (1 - ml_kem_slot) * mbytes;
  359|  3.62k|        len = xbytes;
  360|  3.62k|    }
  361|  7.25k|    val = (void *)(in + off);
  362|       |
  363|  7.25k|    if ((ctx = EVP_PKEY_CTX_new_from_name(libctx, alg, propq)) == NULL
  ------------------
  |  Branch (363:9): [True: 0, False: 7.25k]
  ------------------
  364|  7.25k|        || EVP_PKEY_fromdata_init(ctx) <= 0)
  ------------------
  |  Branch (364:12): [True: 0, False: 7.25k]
  ------------------
  365|      0|        goto err;
  366|  7.25k|    parr[0] = OSSL_PARAM_construct_octet_string(pname, val, len);
  367|  7.25k|    if (group != NULL)
  ------------------
  |  Branch (367:9): [True: 0, False: 7.25k]
  ------------------
  368|      0|        parr[1] = OSSL_PARAM_construct_utf8_string(OSSL_PKEY_PARAM_GROUP_NAME,
  ------------------
  |  |  428|      0|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
  369|      0|            group, 0);
  370|  7.25k|    if (EVP_PKEY_fromdata(ctx, ppkey, selection, parr) > 0)
  ------------------
  |  Branch (370:9): [True: 7.25k, False: 0]
  ------------------
  371|  7.25k|        ret = 1;
  372|       |
  373|  7.25k|err:
  374|  7.25k|    EVP_PKEY_CTX_free(ctx);
  375|  7.25k|    return ret;
  376|  7.25k|}
mlx_kmgmt.c:mlx_kem_gen_init:
  647|  7.25k|{
  648|  7.25k|    PROV_ML_KEM_GEN_CTX *gctx = NULL;
  649|       |
  650|       |    /*
  651|       |     * We can only generate private keys, check that the selection is
  652|       |     * appropriate.
  653|       |     */
  654|  7.25k|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (654:9): [True: 0, False: 7.25k]
  ------------------
  655|  7.25k|        || (selection & minimal_selection) == 0
  ------------------
  |  Branch (655:12): [True: 0, False: 7.25k]
  ------------------
  656|  7.25k|        || (gctx = OPENSSL_zalloc(sizeof(*gctx))) == NULL)
  ------------------
  |  |  109|  7.25k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (656:12): [True: 0, False: 7.25k]
  ------------------
  657|      0|        return NULL;
  658|       |
  659|  7.25k|    gctx->evp_type = evp_type;
  660|  7.25k|    gctx->libctx = libctx;
  661|  7.25k|    gctx->selection = selection;
  662|  7.25k|    if (mlx_kem_gen_set_params(gctx, params))
  ------------------
  |  Branch (662:9): [True: 7.25k, False: 0]
  ------------------
  663|  7.25k|        return gctx;
  664|       |
  665|      0|    mlx_kem_gen_cleanup(gctx);
  666|       |    return NULL;
  667|  7.25k|}
mlx_kmgmt.c:mlx_kem_gen_set_params:
  628|  14.5k|{
  629|  14.5k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
  630|  14.5k|    struct mlx_gen_set_params_st p;
  631|       |
  632|  14.5k|    if (gctx == NULL || !mlx_gen_set_params_decoder(params, &p))
  ------------------
  |  Branch (632:9): [True: 0, False: 14.5k]
  |  Branch (632:25): [True: 0, False: 14.5k]
  ------------------
  633|      0|        return 0;
  634|       |
  635|  14.5k|    if (p.propq != NULL) {
  ------------------
  |  Branch (635:9): [True: 0, False: 14.5k]
  ------------------
  636|      0|        if (p.propq->data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (636:13): [True: 0, False: 0]
  ------------------
  637|      0|            return 0;
  638|      0|        OPENSSL_free(gctx->propq);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  639|      0|        if ((gctx->propq = OPENSSL_strdup(p.propq->data)) == NULL)
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (639:13): [True: 0, False: 0]
  ------------------
  640|      0|            return 0;
  641|      0|    }
  642|  14.5k|    return 1;
  643|  14.5k|}
mlx_kmgmt.c:mlx_kem_gen:
  676|  7.25k|{
  677|  7.25k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
  678|  7.25k|    MLX_KEY *key;
  679|  7.25k|    char *propq;
  680|       |
  681|  7.25k|    if (gctx == NULL
  ------------------
  |  Branch (681:9): [True: 0, False: 7.25k]
  ------------------
  682|  7.25k|        || (gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  ------------------
  |  |  656|  7.25k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  7.25k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  7.25k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
                      || (gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  ------------------
  |  |  647|  7.25k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (682:12): [True: 0, False: 7.25k]
  ------------------
  683|      0|        return NULL;
  684|       |
  685|       |    /* Lose ownership of propq */
  686|  7.25k|    propq = gctx->propq;
  687|  7.25k|    gctx->propq = NULL;
  688|  7.25k|    if ((key = mlx_kem_key_new(gctx->evp_type, gctx->libctx, propq)) == NULL)
  ------------------
  |  Branch (688:9): [True: 0, False: 7.25k]
  ------------------
  689|      0|        return NULL;
  690|       |
  691|  7.25k|    if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  656|  7.25k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  646|  7.25k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  647|  7.25k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (691:9): [True: 3.62k, False: 3.62k]
  ------------------
  692|  3.62k|        return key;
  693|       |
  694|       |    /* For now, using the same "propq" for all components */
  695|  3.62k|    key->mkey = EVP_PKEY_Q_keygen(key->libctx, key->propq,
  696|  3.62k|        key->minfo->algorithm_name);
  697|  3.62k|    key->xkey = EVP_PKEY_Q_keygen(key->libctx, key->propq,
  698|  3.62k|        key->xinfo->algorithm_name,
  699|  3.62k|        key->xinfo->group_name);
  700|  3.62k|    if (key->mkey != NULL && key->xkey != NULL) {
  ------------------
  |  Branch (700:9): [True: 3.62k, False: 0]
  |  Branch (700:30): [True: 3.62k, False: 0]
  ------------------
  701|  3.62k|        key->state = MLX_HAVE_PRVKEY;
  ------------------
  |  |   41|  3.62k|#define MLX_HAVE_PRVKEY 2
  ------------------
  702|  3.62k|        return key;
  703|  3.62k|    }
  704|       |
  705|      0|    mlx_kem_key_free(key);
  706|       |    return NULL;
  707|  3.62k|}
mlx_kmgmt.c:mlx_kem_gen_cleanup:
  710|  7.25k|{
  711|  7.25k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
  712|       |
  713|  7.25k|    if (gctx == NULL)
  ------------------
  |  Branch (713:9): [True: 0, False: 7.25k]
  ------------------
  714|      0|        return;
  715|  7.25k|    OPENSSL_free(gctx->propq);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  716|  7.25k|    OPENSSL_free(gctx);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  717|  7.25k|}

mlx_kmgmt.c:mlx_get_params_decoder:
   99|  14.5k|{
  100|  14.5k|    const char *s;
  101|       |
  102|  14.5k|    memset(r, 0, sizeof(*r));
  103|  14.5k|    if (p != NULL)
  ------------------
  |  Branch (103:9): [True: 14.5k, False: 0]
  ------------------
  104|  50.8k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (104:16): [True: 36.2k, False: 14.5k]
  ------------------
  105|  36.2k|            switch(s[0]) {
  106|      0|            default:
  ------------------
  |  Branch (106:13): [True: 0, False: 36.2k]
  ------------------
  107|      0|                break;
  108|  7.25k|            case 'b':
  ------------------
  |  Branch (108:13): [True: 7.25k, False: 29.0k]
  ------------------
  109|  7.25k|                if (ossl_likely(strcmp("its", s + 1) == 0)) {
  ------------------
  |  |   22|  7.25k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
  110|       |                    /* OSSL_PKEY_PARAM_BITS */
  111|  7.25k|                    if (ossl_unlikely(r->bits != NULL)) {
  ------------------
  |  |   23|  7.25k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7.25k]
  |  |  ------------------
  ------------------
  112|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  113|      0|                                       "param %s is repeated", s);
  114|      0|                        return 0;
  115|      0|                    }
  116|  7.25k|                    r->bits = (OSSL_PARAM *)p;
  117|  7.25k|                }
  118|  7.25k|                break;
  119|  7.25k|            case 'e':
  ------------------
  |  Branch (119:13): [True: 7.25k, False: 29.0k]
  ------------------
  120|  7.25k|                if (ossl_likely(strcmp("ncoded-pub-key", s + 1) == 0)) {
  ------------------
  |  |   22|  7.25k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
  121|       |                    /* OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY */
  122|  7.25k|                    if (ossl_unlikely(r->pub != NULL)) {
  ------------------
  |  |   23|  7.25k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7.25k]
  |  |  ------------------
  ------------------
  123|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  124|      0|                                       "param %s is repeated", s);
  125|      0|                        return 0;
  126|      0|                    }
  127|  7.25k|                    r->pub = (OSSL_PARAM *)p;
  128|  7.25k|                }
  129|  7.25k|                break;
  130|  7.25k|            case 'm':
  ------------------
  |  Branch (130:13): [True: 7.25k, False: 29.0k]
  ------------------
  131|  7.25k|                if (ossl_likely(strcmp("ax-size", s + 1) == 0)) {
  ------------------
  |  |   22|  7.25k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
  132|       |                    /* OSSL_PKEY_PARAM_MAX_SIZE */
  133|  7.25k|                    if (ossl_unlikely(r->maxsize != NULL)) {
  ------------------
  |  |   23|  7.25k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7.25k]
  |  |  ------------------
  ------------------
  134|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  135|      0|                                       "param %s is repeated", s);
  136|      0|                        return 0;
  137|      0|                    }
  138|  7.25k|                    r->maxsize = (OSSL_PARAM *)p;
  139|  7.25k|                }
  140|  7.25k|                break;
  141|  7.25k|            case 'p':
  ------------------
  |  Branch (141:13): [True: 0, False: 36.2k]
  ------------------
  142|      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]
  |  |  ------------------
  ------------------
  143|       |                    /* OSSL_PKEY_PARAM_PRIV_KEY */
  144|      0|                    if (ossl_unlikely(r->priv != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  145|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  146|      0|                                       "param %s is repeated", s);
  147|      0|                        return 0;
  148|      0|                    }
  149|      0|                    r->priv = (OSSL_PARAM *)p;
  150|      0|                }
  151|      0|                break;
  152|  14.5k|            case 's':
  ------------------
  |  Branch (152:13): [True: 14.5k, False: 21.7k]
  ------------------
  153|  14.5k|                switch(s[1]) {
  154|      0|                default:
  ------------------
  |  Branch (154:17): [True: 0, False: 14.5k]
  ------------------
  155|      0|                    break;
  156|  14.5k|                case 'e':
  ------------------
  |  Branch (156:17): [True: 14.5k, False: 0]
  ------------------
  157|  14.5k|                    switch(s[2]) {
  158|      0|                    default:
  ------------------
  |  Branch (158:21): [True: 0, False: 14.5k]
  ------------------
  159|      0|                        break;
  160|  14.5k|                    case 'c':
  ------------------
  |  Branch (160:21): [True: 14.5k, False: 0]
  ------------------
  161|  14.5k|                        switch(s[3]) {
  162|      0|                        default:
  ------------------
  |  Branch (162:25): [True: 0, False: 14.5k]
  ------------------
  163|      0|                            break;
  164|  14.5k|                        case 'u':
  ------------------
  |  Branch (164:25): [True: 14.5k, False: 0]
  ------------------
  165|  14.5k|                            switch(s[4]) {
  166|      0|                            default:
  ------------------
  |  Branch (166:29): [True: 0, False: 14.5k]
  ------------------
  167|      0|                                break;
  168|  14.5k|                            case 'r':
  ------------------
  |  Branch (168:29): [True: 14.5k, False: 0]
  ------------------
  169|  14.5k|                                switch(s[5]) {
  170|      0|                                default:
  ------------------
  |  Branch (170:33): [True: 0, False: 14.5k]
  ------------------
  171|      0|                                    break;
  172|  14.5k|                                case 'i':
  ------------------
  |  Branch (172:33): [True: 14.5k, False: 0]
  ------------------
  173|  14.5k|                                    switch(s[6]) {
  174|      0|                                    default:
  ------------------
  |  Branch (174:37): [True: 0, False: 14.5k]
  ------------------
  175|      0|                                        break;
  176|  14.5k|                                    case 't':
  ------------------
  |  Branch (176:37): [True: 14.5k, False: 0]
  ------------------
  177|  14.5k|                                        switch(s[7]) {
  178|      0|                                        default:
  ------------------
  |  Branch (178:41): [True: 0, False: 14.5k]
  ------------------
  179|      0|                                            break;
  180|  14.5k|                                        case 'y':
  ------------------
  |  Branch (180:41): [True: 14.5k, False: 0]
  ------------------
  181|  14.5k|                                            switch(s[8]) {
  182|      0|                                            default:
  ------------------
  |  Branch (182:45): [True: 0, False: 14.5k]
  ------------------
  183|      0|                                                break;
  184|  14.5k|                                            case '-':
  ------------------
  |  Branch (184:45): [True: 14.5k, False: 0]
  ------------------
  185|  14.5k|                                                switch(s[9]) {
  186|      0|                                                default:
  ------------------
  |  Branch (186:49): [True: 0, False: 14.5k]
  ------------------
  187|      0|                                                    break;
  188|  7.25k|                                                case 'b':
  ------------------
  |  Branch (188:49): [True: 7.25k, False: 7.25k]
  ------------------
  189|  7.25k|                                                    if (ossl_likely(strcmp("its", s + 10) == 0)) {
  ------------------
  |  |   22|  7.25k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
  190|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_BITS */
  191|  7.25k|                                                        if (ossl_unlikely(r->secbits != NULL)) {
  ------------------
  |  |   23|  7.25k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7.25k]
  |  |  ------------------
  ------------------
  192|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  193|      0|                                                                           "param %s is repeated", s);
  194|      0|                                                            return 0;
  195|      0|                                                        }
  196|  7.25k|                                                        r->secbits = (OSSL_PARAM *)p;
  197|  7.25k|                                                    }
  198|  7.25k|                                                    break;
  199|  7.25k|                                                case 'c':
  ------------------
  |  Branch (199:49): [True: 7.25k, False: 7.25k]
  ------------------
  200|  7.25k|                                                    if (ossl_likely(strcmp("ategory", s + 10) == 0)) {
  ------------------
  |  |   22|  7.25k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
  201|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_CATEGORY */
  202|  7.25k|                                                        if (ossl_unlikely(r->seccat != NULL)) {
  ------------------
  |  |   23|  7.25k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7.25k]
  |  |  ------------------
  ------------------
  203|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  204|      0|                                                                           "param %s is repeated", s);
  205|      0|                                                            return 0;
  206|      0|                                                        }
  207|  7.25k|                                                        r->seccat = (OSSL_PARAM *)p;
  208|  7.25k|                                                    }
  209|  14.5k|                                                }
  210|  14.5k|                                            }
  211|  14.5k|                                        }
  212|  14.5k|                                    }
  213|  14.5k|                                }
  214|  14.5k|                            }
  215|  14.5k|                        }
  216|  14.5k|                    }
  217|  14.5k|                }
  218|  36.2k|            }
  219|  14.5k|    return 1;
  220|  14.5k|}
mlx_kmgmt.c:ml_kem_import_export_decoder:
   31|  7.25k|{
   32|  7.25k|    const char *s;
   33|       |
   34|  7.25k|    memset(r, 0, sizeof(*r));
   35|  7.25k|    if (p != NULL)
  ------------------
  |  Branch (35:9): [True: 7.25k, False: 0]
  ------------------
   36|  14.5k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (36:16): [True: 7.25k, False: 7.25k]
  ------------------
   37|  7.25k|            switch(s[0]) {
   38|      0|            default:
  ------------------
  |  Branch (38:13): [True: 0, False: 7.25k]
  ------------------
   39|      0|                break;
   40|  7.25k|            case 'p':
  ------------------
  |  Branch (40:13): [True: 7.25k, False: 0]
  ------------------
   41|  7.25k|                switch(s[1]) {
   42|      0|                default:
  ------------------
  |  Branch (42:17): [True: 0, False: 7.25k]
  ------------------
   43|      0|                    break;
   44|      0|                case 'r':
  ------------------
  |  Branch (44:17): [True: 0, False: 7.25k]
  ------------------
   45|      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]
  |  |  ------------------
  ------------------
   46|       |                        /* OSSL_PKEY_PARAM_PRIV_KEY */
   47|      0|                        if (ossl_unlikely(r->privkey != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   48|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   49|      0|                                           "param %s is repeated", s);
   50|      0|                            return 0;
   51|      0|                        }
   52|      0|                        r->privkey = (OSSL_PARAM *)p;
   53|      0|                    }
   54|      0|                    break;
   55|  7.25k|                case 'u':
  ------------------
  |  Branch (55:17): [True: 7.25k, False: 0]
  ------------------
   56|  7.25k|                    if (ossl_likely(strcmp("b", s + 2) == 0)) {
  ------------------
  |  |   22|  7.25k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
   57|       |                        /* OSSL_PKEY_PARAM_PUB_KEY */
   58|  7.25k|                        if (ossl_unlikely(r->pubkey != NULL)) {
  ------------------
  |  |   23|  7.25k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7.25k]
  |  |  ------------------
  ------------------
   59|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   60|      0|                                           "param %s is repeated", s);
   61|      0|                            return 0;
   62|      0|                        }
   63|  7.25k|                        r->pubkey = (OSSL_PARAM *)p;
   64|  7.25k|                    }
   65|  7.25k|                }
   66|  7.25k|            }
   67|  7.25k|    return 1;
   68|  7.25k|}
mlx_kmgmt.c:mlx_set_params_decoder:
  243|  3.62k|{
  244|  3.62k|    const char *s;
  245|       |
  246|  3.62k|    memset(r, 0, sizeof(*r));
  247|  3.62k|    if (p != NULL)
  ------------------
  |  Branch (247:9): [True: 3.62k, False: 0]
  ------------------
  248|  7.25k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (248:16): [True: 3.62k, False: 3.62k]
  ------------------
  249|  3.62k|            switch(s[0]) {
  250|      0|            default:
  ------------------
  |  Branch (250:13): [True: 0, False: 3.62k]
  ------------------
  251|      0|                break;
  252|  3.62k|            case 'e':
  ------------------
  |  Branch (252:13): [True: 3.62k, False: 0]
  ------------------
  253|  3.62k|                if (ossl_likely(strcmp("ncoded-pub-key", s + 1) == 0)) {
  ------------------
  |  |   22|  3.62k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  254|       |                    /* OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY */
  255|  3.62k|                    if (ossl_unlikely(r->pub != NULL)) {
  ------------------
  |  |   23|  3.62k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  256|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  257|      0|                                       "param %s is repeated", s);
  258|      0|                        return 0;
  259|      0|                    }
  260|  3.62k|                    r->pub = (OSSL_PARAM *)p;
  261|  3.62k|                }
  262|  3.62k|                break;
  263|  3.62k|            case 'p':
  ------------------
  |  Branch (263:13): [True: 0, False: 3.62k]
  ------------------
  264|      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]
  |  |  ------------------
  ------------------
  265|       |                    /* OSSL_PKEY_PARAM_PROPERTIES */
  266|      0|                    if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  267|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  268|      0|                                       "param %s is repeated", s);
  269|      0|                        return 0;
  270|      0|                    }
  271|      0|                    r->propq = (OSSL_PARAM *)p;
  272|      0|                }
  273|  3.62k|            }
  274|  3.62k|    return 1;
  275|  3.62k|}
mlx_kmgmt.c:mlx_gen_set_params_decoder:
  296|  14.5k|{
  297|  14.5k|    const char *s;
  298|       |
  299|  14.5k|    memset(r, 0, sizeof(*r));
  300|  14.5k|    if (p != NULL)
  ------------------
  |  Branch (300:9): [True: 7.25k, False: 7.25k]
  ------------------
  301|  14.5k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (301:16): [True: 7.25k, False: 7.25k]
  ------------------
  302|  7.25k|            if (ossl_likely(strcmp("properties", s + 0) == 0)) {
  ------------------
  |  |   22|  7.25k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 7.25k]
  |  |  ------------------
  ------------------
  303|       |                /* OSSL_PKEY_PARAM_PROPERTIES */
  304|      0|                if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  305|      0|                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  306|      0|                                   "param %s is repeated", s);
  307|      0|                    return 0;
  308|      0|                }
  309|      0|                r->propq = (OSSL_PARAM *)p;
  310|      0|            }
  311|  14.5k|    return 1;
  312|  14.5k|}

hmac_prov.c:hmac_new:
   79|  43.4k|{
   80|  43.4k|    struct hmac_data_st *macctx;
   81|       |
   82|  43.4k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (82:9): [True: 0, False: 43.4k]
  ------------------
   83|      0|        return NULL;
   84|       |
   85|  43.4k|    if ((macctx = OPENSSL_zalloc(sizeof(*macctx))) == NULL
  ------------------
  |  |  109|  43.4k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (85:9): [True: 0, False: 43.4k]
  ------------------
   86|  43.4k|        || (macctx->ctx = HMAC_CTX_new()) == NULL) {
  ------------------
  |  Branch (86:12): [True: 0, False: 43.4k]
  ------------------
   87|      0|        OPENSSL_free(macctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   88|      0|        return NULL;
   89|      0|    }
   90|  43.4k|    macctx->provctx = provctx;
   91|  43.4k|    OSSL_FIPS_IND_INIT(macctx)
   92|       |
   93|  43.4k|    return macctx;
   94|  43.4k|}
hmac_prov.c:hmac_free:
   97|  43.4k|{
   98|  43.4k|    struct hmac_data_st *macctx = vmacctx;
   99|       |
  100|  43.4k|    if (macctx != NULL) {
  ------------------
  |  Branch (100:9): [True: 43.4k, False: 0]
  ------------------
  101|  43.4k|        HMAC_CTX_free(macctx->ctx);
  102|  43.4k|        ossl_prov_digest_reset(&macctx->digest);
  103|  43.4k|        OPENSSL_clear_free(macctx->key, macctx->keylen);
  ------------------
  |  |  130|  43.4k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  104|  43.4k|        OPENSSL_free(macctx);
  ------------------
  |  |  132|  43.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  105|  43.4k|    }
  106|  43.4k|}
hmac_prov.c:hmac_init:
  202|  43.4k|{
  203|  43.4k|    struct hmac_data_st *macctx = vmacctx;
  204|       |
  205|  43.4k|    if (!ossl_prov_is_running() || !hmac_set_ctx_params(macctx, params))
  ------------------
  |  Branch (205:9): [True: 0, False: 43.4k]
  |  Branch (205:36): [True: 0, False: 43.4k]
  ------------------
  206|      0|        return 0;
  207|       |
  208|  43.4k|    if (key != NULL)
  ------------------
  |  Branch (208:9): [True: 43.4k, False: 0]
  ------------------
  209|  43.4k|        return hmac_setkey(macctx, key, keylen);
  210|       |
  211|       |    /* Just reinit the HMAC context */
  212|      0|    return HMAC_Init_ex(macctx->ctx, NULL, 0, NULL, NULL);
  213|  43.4k|}
hmac_prov.c:hmac_setkey:
  159|  43.4k|{
  160|  43.4k|    const EVP_MD *digest;
  161|       |
  162|       |#ifdef FIPS_MODULE
  163|       |    /*
  164|       |     * KDF's pass a salt rather than a key,
  165|       |     * which is why it skips the key check unless "HMAC" is fetched directly.
  166|       |     */
  167|       |    if (!macctx->internal) {
  168|       |        OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(macctx->provctx);
  169|       |        int approved = ossl_mac_check_key_size(keylen);
  170|       |
  171|       |        if (!approved) {
  172|       |            if (!OSSL_FIPS_IND_ON_UNAPPROVED(macctx, OSSL_FIPS_IND_SETTABLE0,
  173|       |                    libctx, "HMAC", "keysize",
  174|       |                    ossl_fips_config_hmac_key_check)) {
  175|       |                ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH);
  176|       |                return 0;
  177|       |            }
  178|       |        }
  179|       |    }
  180|       |#endif
  181|       |
  182|  43.4k|    if (macctx->key != NULL)
  ------------------
  |  Branch (182:9): [True: 0, False: 43.4k]
  ------------------
  183|      0|        OPENSSL_clear_free(macctx->key, macctx->keylen);
  ------------------
  |  |  130|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  184|       |    /* Keep a copy of the key in case we need it for TLS HMAC */
  185|  43.4k|    macctx->key = OPENSSL_malloc(keylen > 0 ? keylen : 1);
  ------------------
  |  |  107|  86.8k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (107:19): [True: 43.4k, False: 0]
  |  |  ------------------
  ------------------
  186|  43.4k|    if (macctx->key == NULL)
  ------------------
  |  Branch (186:9): [True: 0, False: 43.4k]
  ------------------
  187|      0|        return 0;
  188|       |
  189|  43.4k|    if (keylen > 0)
  ------------------
  |  Branch (189:9): [True: 43.4k, False: 0]
  ------------------
  190|  43.4k|        memcpy(macctx->key, key, keylen);
  191|  43.4k|    macctx->keylen = keylen;
  192|       |
  193|  43.4k|    digest = ossl_prov_digest_md(&macctx->digest);
  194|       |    /* HMAC_Init_ex doesn't tolerate all zero params, so we must be careful */
  195|  43.4k|    if (key != NULL || (macctx->tls_data_size == 0 && digest != NULL))
  ------------------
  |  Branch (195:9): [True: 43.4k, False: 0]
  |  Branch (195:25): [True: 0, False: 0]
  |  Branch (195:55): [True: 0, False: 0]
  ------------------
  196|  43.4k|        return HMAC_Init_ex(macctx->ctx, key, (int)keylen, digest, NULL);
  197|      0|    return 1;
  198|  43.4k|}
hmac_prov.c:hmac_update:
  217|  43.4k|{
  218|  43.4k|    struct hmac_data_st *macctx = vmacctx;
  219|       |
  220|  43.4k|    if (macctx->tls_data_size > 0) {
  ------------------
  |  Branch (220:9): [True: 0, False: 43.4k]
  ------------------
  221|       |        /* We're doing a TLS HMAC */
  222|      0|        if (!macctx->tls_header_set) {
  ------------------
  |  Branch (222:13): [True: 0, False: 0]
  ------------------
  223|       |            /* We expect the first update call to contain the TLS header */
  224|      0|            if (datalen != sizeof(macctx->tls_header))
  ------------------
  |  Branch (224:17): [True: 0, False: 0]
  ------------------
  225|      0|                return 0;
  226|      0|            memcpy(macctx->tls_header, data, datalen);
  227|      0|            macctx->tls_header_set = 1;
  228|      0|            return 1;
  229|      0|        }
  230|       |        /* macctx->tls_data_size is datalen plus the padding length */
  231|      0|        if (macctx->tls_data_size < datalen)
  ------------------
  |  Branch (231:13): [True: 0, False: 0]
  ------------------
  232|      0|            return 0;
  233|       |
  234|      0|        return ssl3_cbc_digest_record(ossl_prov_digest_md(&macctx->digest),
  235|      0|            macctx->tls_mac_out,
  236|      0|            &macctx->tls_mac_out_size,
  237|      0|            macctx->tls_header,
  238|      0|            data,
  239|      0|            datalen,
  240|      0|            macctx->tls_data_size,
  241|      0|            macctx->key,
  242|      0|            macctx->keylen,
  243|      0|            0);
  244|      0|    }
  245|       |
  246|  43.4k|    return HMAC_Update(macctx->ctx, data, datalen);
  247|  43.4k|}
hmac_prov.c:hmac_final:
  251|  43.4k|{
  252|  43.4k|    unsigned int hlen;
  253|  43.4k|    struct hmac_data_st *macctx = vmacctx;
  254|       |
  255|  43.4k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (255:9): [True: 0, False: 43.4k]
  ------------------
  256|      0|        return 0;
  257|  43.4k|    if (macctx->tls_data_size > 0) {
  ------------------
  |  Branch (257:9): [True: 0, False: 43.4k]
  ------------------
  258|      0|        if (macctx->tls_mac_out_size == 0)
  ------------------
  |  Branch (258:13): [True: 0, False: 0]
  ------------------
  259|      0|            return 0;
  260|      0|        if (outl != NULL)
  ------------------
  |  Branch (260:13): [True: 0, False: 0]
  ------------------
  261|      0|            *outl = macctx->tls_mac_out_size;
  262|      0|        memcpy(out, macctx->tls_mac_out, macctx->tls_mac_out_size);
  263|      0|        return 1;
  264|      0|    }
  265|  43.4k|    if (!HMAC_Final(macctx->ctx, out, &hlen))
  ------------------
  |  Branch (265:9): [True: 0, False: 43.4k]
  ------------------
  266|      0|        return 0;
  267|  43.4k|    *outl = hlen;
  268|  43.4k|    return 1;
  269|  43.4k|}
hmac_prov.c:hmac_get_ctx_params:
  278|  43.4k|{
  279|  43.4k|    struct hmac_data_st *macctx = vmacctx;
  280|  43.4k|    struct hmac_get_ctx_params_st p;
  281|       |
  282|  43.4k|    if (macctx == NULL || !hmac_get_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (282:9): [True: 0, False: 43.4k]
  |  Branch (282:27): [True: 0, False: 43.4k]
  ------------------
  283|      0|        return 0;
  284|       |
  285|  43.4k|    if (p.size != NULL && !OSSL_PARAM_set_size_t(p.size, hmac_size(macctx)))
  ------------------
  |  Branch (285:9): [True: 43.4k, False: 0]
  |  Branch (285:27): [True: 0, False: 43.4k]
  ------------------
  286|      0|        return 0;
  287|       |
  288|  43.4k|    if (p.bsize != NULL && !OSSL_PARAM_set_int(p.bsize, hmac_block_size(macctx)))
  ------------------
  |  Branch (288:9): [True: 0, False: 43.4k]
  |  Branch (288:28): [True: 0, False: 0]
  ------------------
  289|      0|        return 0;
  290|       |
  291|       |#ifdef FIPS_MODULE
  292|       |    if (p.ind != NULL) {
  293|       |        int approved = 0;
  294|       |
  295|       |        if (!macctx->internal)
  296|       |            approved = OSSL_FIPS_IND_GET(macctx)->approved;
  297|       |        if (!OSSL_PARAM_set_int(p.ind, approved))
  298|       |            return 0;
  299|       |    }
  300|       |#endif
  301|  43.4k|    return 1;
  302|  43.4k|}
hmac_prov.c:hmac_size:
  144|  43.4k|{
  145|  43.4k|    return HMAC_size(macctx->ctx);
  146|  43.4k|}
hmac_prov.c:hmac_settable_ctx_params:
  306|  36.2k|{
  307|  36.2k|    return hmac_set_ctx_params_list;
  308|  36.2k|}
hmac_prov.c:hmac_set_ctx_params:
  314|   115k|{
  315|   115k|    struct hmac_data_st *macctx = vmacctx;
  316|   115k|    OSSL_LIB_CTX *ctx;
  317|   115k|    struct hmac_set_ctx_params_st p;
  318|       |
  319|   115k|    if (macctx == NULL || !hmac_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (319:9): [True: 0, False: 115k]
  |  Branch (319:27): [True: 0, False: 115k]
  ------------------
  320|      0|        return 0;
  321|       |
  322|   115k|    ctx = PROV_LIBCTX_OF(macctx->provctx);
  ------------------
  |  |   31|   115k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  323|       |
  324|   115k|    if (!OSSL_FIPS_IND_SET_CTX_FROM_PARAM(macctx, OSSL_FIPS_IND_SETTABLE0, p.ind_k))
  ------------------
  |  |  158|   115k|#define OSSL_FIPS_IND_SET_CTX_FROM_PARAM(ctx, id, p) 1
  ------------------
  |  Branch (324:9): [Folded, False: 115k]
  ------------------
  325|      0|        return 0;
  326|       |
  327|   115k|    if (p.digest != NULL
  ------------------
  |  Branch (327:9): [True: 43.4k, False: 72.4k]
  ------------------
  328|  43.4k|        && !ossl_prov_digest_load(&macctx->digest, p.digest, p.propq, ctx))
  ------------------
  |  Branch (328:12): [True: 0, False: 43.4k]
  ------------------
  329|      0|        return 0;
  330|       |
  331|   115k|    if (p.key != NULL) {
  ------------------
  |  Branch (331:9): [True: 0, False: 115k]
  ------------------
  332|      0|        if (p.key->data_type != OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (332:13): [True: 0, False: 0]
  ------------------
  333|      0|            return 0;
  334|       |
  335|      0|        if (!hmac_setkey(macctx, p.key->data, p.key->data_size))
  ------------------
  |  Branch (335:13): [True: 0, False: 0]
  ------------------
  336|      0|            return 0;
  337|      0|    }
  338|       |
  339|   115k|    if (p.tlssize != NULL && !OSSL_PARAM_get_size_t(p.tlssize, &macctx->tls_data_size))
  ------------------
  |  Branch (339:9): [True: 0, False: 115k]
  |  Branch (339:30): [True: 0, False: 0]
  ------------------
  340|      0|        return 0;
  341|       |
  342|   115k|    return 1;
  343|   115k|}

hmac_prov.c:hmac_get_ctx_params_decoder:
   37|  43.4k|{
   38|  43.4k|    const char *s;
   39|       |
   40|  43.4k|    memset(r, 0, sizeof(*r));
   41|  43.4k|    if (p != NULL)
  ------------------
  |  Branch (41:9): [True: 43.4k, False: 0]
  ------------------
   42|  86.8k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (42:16): [True: 43.4k, False: 43.4k]
  ------------------
   43|  43.4k|            switch(s[0]) {
   44|      0|            default:
  ------------------
  |  Branch (44:13): [True: 0, False: 43.4k]
  ------------------
   45|      0|                break;
   46|      0|            case 'b':
  ------------------
  |  Branch (46:13): [True: 0, False: 43.4k]
  ------------------
   47|      0|                if (ossl_likely(strcmp("lock-size", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   48|       |                    /* OSSL_MAC_PARAM_BLOCK_SIZE */
   49|      0|                    if (ossl_unlikely(r->bsize != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   50|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   51|      0|                                       "param %s is repeated", s);
   52|      0|                        return 0;
   53|      0|                    }
   54|      0|                    r->bsize = (OSSL_PARAM *)p;
   55|      0|                }
   56|      0|                break;
   57|      0|            case 'f':
  ------------------
  |  Branch (57:13): [True: 0, False: 43.4k]
  ------------------
   58|       |# if defined(FIPS_MODULE)
   59|       |                if (ossl_likely(strcmp("ips-indicator", s + 1) == 0)) {
   60|       |                    /* OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR */
   61|       |                    if (ossl_unlikely(r->ind != NULL)) {
   62|       |                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
   63|       |                                       "param %s is repeated", s);
   64|       |                        return 0;
   65|       |                    }
   66|       |                    r->ind = (OSSL_PARAM *)p;
   67|       |                }
   68|       |# endif
   69|      0|                break;
   70|  43.4k|            case 's':
  ------------------
  |  Branch (70:13): [True: 43.4k, False: 0]
  ------------------
   71|  43.4k|                if (ossl_likely(strcmp("ize", s + 1) == 0)) {
  ------------------
  |  |   22|  43.4k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 43.4k, False: 0]
  |  |  ------------------
  ------------------
   72|       |                    /* OSSL_MAC_PARAM_SIZE */
   73|  43.4k|                    if (ossl_unlikely(r->size != NULL)) {
  ------------------
  |  |   23|  43.4k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 43.4k]
  |  |  ------------------
  ------------------
   74|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   75|      0|                                       "param %s is repeated", s);
   76|      0|                        return 0;
   77|      0|                    }
   78|  43.4k|                    r->size = (OSSL_PARAM *)p;
   79|  43.4k|                }
   80|  43.4k|            }
   81|  43.4k|    return 1;
   82|  43.4k|}
hmac_prov.c:hmac_set_ctx_params_decoder:
  115|   115k|{
  116|   115k|    const char *s;
  117|       |
  118|   115k|    memset(r, 0, sizeof(*r));
  119|   115k|    if (p != NULL)
  ------------------
  |  Branch (119:9): [True: 72.3k, False: 43.5k]
  ------------------
  120|   115k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (120:16): [True: 43.4k, False: 72.3k]
  ------------------
  121|  43.4k|            switch(s[0]) {
  122|      0|            default:
  ------------------
  |  Branch (122:13): [True: 0, False: 43.4k]
  ------------------
  123|      0|                break;
  124|  43.4k|            case 'd':
  ------------------
  |  Branch (124:13): [True: 43.4k, False: 0]
  ------------------
  125|  43.4k|                if (ossl_likely(strcmp("igest", s + 1) == 0)) {
  ------------------
  |  |   22|  43.4k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 43.4k, False: 0]
  |  |  ------------------
  ------------------
  126|       |                    /* OSSL_MAC_PARAM_DIGEST */
  127|  43.4k|                    if (ossl_unlikely(r->digest != NULL)) {
  ------------------
  |  |   23|  43.4k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 43.4k]
  |  |  ------------------
  ------------------
  128|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  129|      0|                                       "param %s is repeated", s);
  130|      0|                        return 0;
  131|      0|                    }
  132|  43.4k|                    r->digest = (OSSL_PARAM *)p;
  133|  43.4k|                }
  134|  43.4k|                break;
  135|  43.4k|            case 'k':
  ------------------
  |  Branch (135:13): [True: 0, False: 43.4k]
  ------------------
  136|      0|                switch(s[1]) {
  137|      0|                default:
  ------------------
  |  Branch (137:17): [True: 0, False: 0]
  ------------------
  138|      0|                    break;
  139|      0|                case 'e':
  ------------------
  |  Branch (139:17): [True: 0, False: 0]
  ------------------
  140|      0|                    switch(s[2]) {
  141|      0|                    default:
  ------------------
  |  Branch (141:21): [True: 0, False: 0]
  ------------------
  142|      0|                        break;
  143|      0|                    case 'y':
  ------------------
  |  Branch (143:21): [True: 0, False: 0]
  ------------------
  144|      0|                        switch(s[3]) {
  145|      0|                        default:
  ------------------
  |  Branch (145:25): [True: 0, False: 0]
  ------------------
  146|      0|                            break;
  147|      0|                        case '-':
  ------------------
  |  Branch (147:25): [True: 0, False: 0]
  ------------------
  148|       |# if defined(FIPS_MODULE)
  149|       |                            if (ossl_likely(strcmp("check", s + 4) == 0)) {
  150|       |                                /* OSSL_MAC_PARAM_FIPS_KEY_CHECK */
  151|       |                                if (ossl_unlikely(r->ind_k != NULL)) {
  152|       |                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  153|       |                                                   "param %s is repeated", s);
  154|       |                                    return 0;
  155|       |                                }
  156|       |                                r->ind_k = (OSSL_PARAM *)p;
  157|       |                            }
  158|       |# endif
  159|      0|                            break;
  160|      0|                        case '\0':
  ------------------
  |  Branch (160:25): [True: 0, False: 0]
  ------------------
  161|      0|                            if (ossl_unlikely(r->key != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  162|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  163|      0|                                               "param %s is repeated", s);
  164|      0|                                return 0;
  165|      0|                            }
  166|      0|                            r->key = (OSSL_PARAM *)p;
  167|      0|                        }
  168|      0|                    }
  169|      0|                }
  170|      0|                break;
  171|      0|            case 'p':
  ------------------
  |  Branch (171:13): [True: 0, False: 43.4k]
  ------------------
  172|      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]
  |  |  ------------------
  ------------------
  173|       |                    /* OSSL_MAC_PARAM_PROPERTIES */
  174|      0|                    if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  175|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  176|      0|                                       "param %s is repeated", s);
  177|      0|                        return 0;
  178|      0|                    }
  179|      0|                    r->propq = (OSSL_PARAM *)p;
  180|      0|                }
  181|      0|                break;
  182|      0|            case 't':
  ------------------
  |  Branch (182:13): [True: 0, False: 43.4k]
  ------------------
  183|      0|                if (ossl_likely(strcmp("ls-data-size", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  184|       |                    /* OSSL_MAC_PARAM_TLS_DATA_SIZE */
  185|      0|                    if (ossl_unlikely(r->tlssize != 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,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  187|      0|                                       "param %s is repeated", s);
  188|      0|                        return 0;
  189|      0|                    }
  190|      0|                    r->tlssize = (OSSL_PARAM *)p;
  191|      0|                }
  192|  43.4k|            }
  193|   115k|    return 1;
  194|   115k|}

ossl_drbg_lock:
   54|   263k|{
   55|   263k|    return 1;
   56|   263k|}
ossl_drbg_unlock:
   60|   263k|{
   61|   263k|}
ossl_drbg_get_seed:
  148|      5|{
  149|      5|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
  150|      5|    size_t bytes_needed;
  151|      5|    unsigned char *buffer;
  152|       |
  153|       |    /* Figure out how many bytes we need */
  154|      5|    bytes_needed = entropy >= 0 ? (entropy + 7) / 8 : 0;
  ------------------
  |  Branch (154:20): [True: 5, False: 0]
  ------------------
  155|      5|    if (bytes_needed < min_len)
  ------------------
  |  Branch (155:9): [True: 0, False: 5]
  ------------------
  156|      0|        bytes_needed = min_len;
  157|      5|    if (bytes_needed > max_len)
  ------------------
  |  Branch (157:9): [True: 0, False: 5]
  ------------------
  158|      0|        bytes_needed = max_len;
  159|       |
  160|       |    /* Allocate storage */
  161|      5|    buffer = OPENSSL_secure_malloc(bytes_needed);
  ------------------
  |  |  140|      5|    CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  162|      5|    if (buffer == NULL)
  ------------------
  |  Branch (162:9): [True: 0, False: 5]
  ------------------
  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|      5|    if (!ossl_prov_drbg_generate(drbg, buffer, bytes_needed,
  ------------------
  |  Branch (174:9): [True: 0, False: 5]
  ------------------
  175|      5|            drbg->strength, prediction_resistance,
  176|      5|            (unsigned char *)&drbg, sizeof(drbg))) {
  177|      0|        OPENSSL_secure_clear_free(buffer, bytes_needed);
  ------------------
  |  |  150|      0|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  178|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_GENERATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  179|      0|        return 0;
  180|      0|    }
  181|      5|    *pout = buffer;
  182|      5|    return bytes_needed;
  183|      5|}
ossl_drbg_clear_seed:
  188|      5|{
  189|      5|    OPENSSL_secure_clear_free(out, outlen);
  ------------------
  |  |  150|      5|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  190|      5|}
ossl_prov_drbg_nonce_ctx_new:
  272|      2|{
  273|      2|    PROV_DRBG_NONCE_GLOBAL *dngbl = OPENSSL_zalloc(sizeof(*dngbl));
  ------------------
  |  |  109|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  274|       |
  275|      2|    if (dngbl == NULL)
  ------------------
  |  Branch (275:9): [True: 0, False: 2]
  ------------------
  276|      0|        return NULL;
  277|       |
  278|      2|    dngbl->rand_nonce_lock = CRYPTO_THREAD_lock_new();
  279|      2|    if (dngbl->rand_nonce_lock == NULL) {
  ------------------
  |  Branch (279:9): [True: 0, False: 2]
  ------------------
  280|      0|        OPENSSL_free(dngbl);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  281|      0|        return NULL;
  282|      0|    }
  283|       |
  284|      2|    return dngbl;
  285|      2|}
ossl_prov_drbg_instantiate:
  352|      3|{
  353|      3|    unsigned char *nonce = NULL, *entropy = NULL;
  354|      3|    size_t noncelen = 0, entropylen = 0;
  355|      3|    unsigned int min_entropy;
  356|      3|    size_t min_entropylen, max_entropylen;
  357|       |
  358|      3|    if (strength > drbg->strength) {
  ------------------
  |  Branch (358:9): [True: 0, False: 3]
  ------------------
  359|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INSUFFICIENT_DRBG_STRENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  360|      0|        goto end;
  361|      0|    }
  362|      3|    min_entropy = drbg->strength;
  363|      3|    min_entropylen = drbg->min_entropylen;
  364|      3|    max_entropylen = drbg->max_entropylen;
  365|       |
  366|      3|    if (pers == NULL) {
  ------------------
  |  Branch (366:9): [True: 3, False: 0]
  ------------------
  367|      3|        pers = (const unsigned char *)ossl_pers_string;
  368|      3|        perslen = sizeof(ossl_pers_string);
  369|      3|    }
  370|      3|    if (perslen > drbg->max_perslen) {
  ------------------
  |  Branch (370:9): [True: 0, False: 3]
  ------------------
  371|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_PERSONALISATION_STRING_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  372|      0|        goto end;
  373|      0|    }
  374|       |
  375|      3|    if (drbg->state != EVP_RAND_STATE_UNINITIALISED) {
  ------------------
  |  | 1249|      3|#define EVP_RAND_STATE_UNINITIALISED 0
  ------------------
  |  Branch (375:9): [True: 0, False: 3]
  ------------------
  376|      0|        if (drbg->state == EVP_RAND_STATE_ERROR)
  ------------------
  |  | 1251|      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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  378|      0|        else
  379|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_ALREADY_INSTANTIATED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  380|      0|        goto end;
  381|      0|    }
  382|       |
  383|      3|    drbg->state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1251|      3|#define EVP_RAND_STATE_ERROR 2
  ------------------
  384|       |
  385|      3|    if (drbg->min_noncelen > 0) {
  ------------------
  |  Branch (385:9): [True: 3, False: 0]
  ------------------
  386|      3|        if (drbg->parent_nonce != NULL) {
  ------------------
  |  Branch (386:13): [True: 0, False: 3]
  ------------------
  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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  392|      0|                goto end;
  393|      0|            }
  394|      0|            nonce = OPENSSL_malloc(noncelen);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  401|      0|                goto end;
  402|      0|            }
  403|      0|#ifndef PROV_RAND_GET_RANDOM_NONCE
  404|      3|        } else if (drbg->parent != NULL) {
  ------------------
  |  Branch (404:20): [True: 3, False: 0]
  ------------------
  405|      3|#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|      3|            min_entropy += drbg->strength / 2;
  414|      3|            min_entropylen += drbg->min_noncelen;
  415|      3|            max_entropylen += drbg->max_noncelen;
  416|      3|        }
  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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  424|      0|                goto end;
  425|      0|            }
  426|      0|        }
  427|      3|#endif
  428|      3|    }
  429|       |
  430|      3|    drbg->reseed_next_counter = tsan_load(&drbg->reseed_counter);
  ------------------
  |  |   61|      3|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
  431|      3|    if (drbg->reseed_next_counter) {
  ------------------
  |  Branch (431:9): [True: 3, False: 0]
  ------------------
  432|      3|        drbg->reseed_next_counter++;
  433|      3|        if (!drbg->reseed_next_counter)
  ------------------
  |  Branch (433:13): [True: 0, False: 3]
  ------------------
  434|      0|            drbg->reseed_next_counter = 1;
  435|      3|    }
  436|       |
  437|      3|    entropylen = get_entropy(drbg, &entropy, min_entropy,
  438|      3|        min_entropylen, max_entropylen,
  439|      3|        prediction_resistance);
  440|      3|    if (entropylen < min_entropylen
  ------------------
  |  Branch (440:9): [True: 0, False: 3]
  ------------------
  441|      3|        || entropylen > max_entropylen) {
  ------------------
  |  Branch (441:12): [True: 0, False: 3]
  ------------------
  442|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_ERROR_RETRIEVING_ENTROPY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  443|      0|        goto end;
  444|      0|    }
  445|       |
  446|      3|    if (!drbg->instantiate(drbg, entropy, entropylen, nonce, noncelen,
  ------------------
  |  Branch (446:9): [True: 0, False: 3]
  ------------------
  447|      3|            pers, perslen)) {
  448|      0|        cleanup_entropy(drbg, entropy, entropylen);
  449|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_ERROR_INSTANTIATING_DRBG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  450|      0|        goto end;
  451|      0|    }
  452|      3|    cleanup_entropy(drbg, entropy, entropylen);
  453|       |
  454|      3|    drbg->state = EVP_RAND_STATE_READY;
  ------------------
  |  | 1250|      3|#define EVP_RAND_STATE_READY 1
  ------------------
  455|      3|    drbg->generate_counter = 1;
  456|      3|    drbg->reseed_time = time(NULL);
  457|      3|    tsan_store(&drbg->reseed_counter, drbg->reseed_next_counter);
  ------------------
  |  |   62|      3|#define tsan_store(ptr, val) atomic_store_explicit((ptr), (val), memory_order_relaxed)
  ------------------
  458|       |
  459|      3|end:
  460|      3|    if (nonce != NULL)
  ------------------
  |  Branch (460:9): [True: 0, False: 3]
  ------------------
  461|      0|        ossl_prov_cleanup_nonce(drbg->provctx, nonce, noncelen);
  462|      3|    if (drbg->state == EVP_RAND_STATE_READY)
  ------------------
  |  | 1250|      3|#define EVP_RAND_STATE_READY 1
  ------------------
  |  Branch (462:9): [True: 3, False: 0]
  ------------------
  463|      3|        return 1;
  464|      0|    return 0;
  465|      3|}
ossl_prov_drbg_generate:
  625|   114k|{
  626|   114k|    int fork_id;
  627|   114k|    int reseed_required = 0;
  628|   114k|    int ret = 0;
  629|   114k|    time_t reseed_time_interval = drbg->reseed_time_interval;
  630|   114k|    time_t now = 0;
  631|       |
  632|   114k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (632:9): [True: 0, False: 114k]
  ------------------
  633|      0|        return 0;
  634|       |
  635|   114k|    fork_id = openssl_get_fork_id();
  636|       |
  637|   114k|    if (reseed_time_interval > 0)
  ------------------
  |  Branch (637:9): [True: 114k, False: 0]
  ------------------
  638|   114k|        now = time(NULL);
  639|       |
  640|   114k|    if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock))
  ------------------
  |  Branch (640:9): [True: 5, False: 114k]
  |  Branch (640:31): [True: 0, False: 5]
  ------------------
  641|      0|        return 0;
  642|       |
  643|   114k|    if (drbg->state != EVP_RAND_STATE_READY) {
  ------------------
  |  | 1250|   114k|#define EVP_RAND_STATE_READY 1
  ------------------
  |  Branch (643:9): [True: 0, False: 114k]
  ------------------
  644|       |        /* try to recover from previous errors */
  645|      0|        rand_drbg_restart(drbg);
  646|       |
  647|      0|        if (drbg->state == EVP_RAND_STATE_ERROR) {
  ------------------
  |  | 1251|      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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  649|      0|            goto err;
  650|      0|        }
  651|      0|        if (drbg->state == EVP_RAND_STATE_UNINITIALISED) {
  ------------------
  |  | 1249|      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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  653|      0|            goto err;
  654|      0|        }
  655|      0|    }
  656|   114k|    if (strength > drbg->strength) {
  ------------------
  |  Branch (656:9): [True: 0, False: 114k]
  ------------------
  657|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INSUFFICIENT_DRBG_STRENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  658|      0|        goto err;
  659|      0|    }
  660|       |
  661|   114k|    if (outlen > drbg->max_request) {
  ------------------
  |  Branch (661:9): [True: 0, False: 114k]
  ------------------
  662|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_REQUEST_TOO_LARGE_FOR_DRBG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  663|      0|        goto err;
  664|      0|    }
  665|   114k|    if (adinlen > drbg->max_adinlen) {
  ------------------
  |  Branch (665:9): [True: 0, False: 114k]
  ------------------
  666|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_ADDITIONAL_INPUT_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  667|      0|        goto err;
  668|      0|    }
  669|       |
  670|   114k|    if (drbg->fork_id != fork_id) {
  ------------------
  |  Branch (670:9): [True: 0, False: 114k]
  ------------------
  671|      0|        drbg->fork_id = fork_id;
  672|      0|        reseed_required = 1;
  673|      0|    }
  674|       |
  675|   114k|    if (drbg->reseed_interval > 0) {
  ------------------
  |  Branch (675:9): [True: 114k, False: 0]
  ------------------
  676|   114k|        if (drbg->generate_counter >= drbg->reseed_interval)
  ------------------
  |  Branch (676:13): [True: 1, False: 114k]
  ------------------
  677|      1|            reseed_required = 1;
  678|   114k|    }
  679|   114k|    if (reseed_time_interval > 0) {
  ------------------
  |  Branch (679:9): [True: 114k, False: 0]
  ------------------
  680|   114k|        if (now < drbg->reseed_time
  ------------------
  |  Branch (680:13): [True: 0, False: 114k]
  ------------------
  681|   114k|            || now - drbg->reseed_time >= reseed_time_interval)
  ------------------
  |  Branch (681:16): [True: 0, False: 114k]
  ------------------
  682|      0|            reseed_required = 1;
  683|   114k|    }
  684|   114k|    if (drbg->parent != NULL
  ------------------
  |  Branch (684:9): [True: 114k, False: 0]
  ------------------
  685|   114k|        && get_parent_reseed_count(drbg) != drbg->parent_reseed_counter)
  ------------------
  |  Branch (685:12): [True: 2, False: 114k]
  ------------------
  686|      2|        reseed_required = 1;
  687|       |
  688|   114k|    if (reseed_required || prediction_resistance) {
  ------------------
  |  Branch (688:9): [True: 3, False: 114k]
  |  Branch (688:28): [True: 0, False: 114k]
  ------------------
  689|      3|        if (!ossl_prov_drbg_reseed_unlocked(drbg, prediction_resistance, NULL,
  ------------------
  |  Branch (689:13): [True: 0, False: 3]
  ------------------
  690|      3|                0, adin, adinlen)) {
  691|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_RESEED_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  692|      0|            goto err;
  693|      0|        }
  694|      3|        adin = NULL;
  695|      3|        adinlen = 0;
  696|      3|    }
  697|       |
  698|   114k|    if (!drbg->generate(drbg, out, outlen, adin, adinlen)) {
  ------------------
  |  Branch (698:9): [True: 0, False: 114k]
  ------------------
  699|      0|        drbg->state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1251|      0|#define EVP_RAND_STATE_ERROR 2
  ------------------
  700|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_GENERATE_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  701|      0|        goto err;
  702|      0|    }
  703|       |
  704|   114k|    drbg->generate_counter++;
  705|       |
  706|   114k|    ret = 1;
  707|   114k|err:
  708|   114k|    if (drbg->lock != NULL)
  ------------------
  |  Branch (708:9): [True: 5, False: 114k]
  ------------------
  709|      5|        CRYPTO_THREAD_unlock(drbg->lock);
  710|       |
  711|   114k|    return ret;
  712|   114k|}
ossl_drbg_enable_locking:
  759|      1|{
  760|      1|    PROV_DRBG *drbg = vctx;
  761|       |
  762|      1|    if (drbg != NULL && drbg->lock == NULL) {
  ------------------
  |  Branch (762:9): [True: 1, False: 0]
  |  Branch (762:25): [True: 1, False: 0]
  ------------------
  763|      1|        if (drbg->parent_enable_locking != NULL)
  ------------------
  |  Branch (763:13): [True: 1, False: 0]
  ------------------
  764|      1|            if (!drbg->parent_enable_locking(drbg->parent)) {
  ------------------
  |  Branch (764:17): [True: 0, False: 1]
  ------------------
  765|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_PARENT_LOCKING_NOT_ENABLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  766|      0|                return 0;
  767|      0|            }
  768|      1|        drbg->lock = CRYPTO_THREAD_lock_new();
  769|      1|        if (drbg->lock == NULL) {
  ------------------
  |  Branch (769:13): [True: 0, False: 1]
  ------------------
  770|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_CREATE_LOCK);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  771|      0|            return 0;
  772|      0|        }
  773|      1|    }
  774|      1|    return 1;
  775|      1|}
ossl_rand_drbg_new:
  797|      3|{
  798|      3|    PROV_DRBG *drbg;
  799|      3|    unsigned int p_str;
  800|      3|    const OSSL_DISPATCH *pfunc;
  801|       |
  802|      3|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (802:9): [True: 0, False: 3]
  ------------------
  803|      0|        return NULL;
  804|       |
  805|      3|    drbg = OPENSSL_zalloc(sizeof(*drbg));
  ------------------
  |  |  109|      3|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  806|      3|    if (drbg == NULL)
  ------------------
  |  Branch (806:9): [True: 0, False: 3]
  ------------------
  807|      0|        return NULL;
  808|       |
  809|      3|    drbg->provctx = provctx;
  810|      3|    drbg->instantiate = instantiate;
  811|      3|    drbg->uninstantiate = uninstantiate;
  812|      3|    drbg->reseed = reseed;
  813|      3|    drbg->generate = generate;
  814|      3|    drbg->fork_id = openssl_get_fork_id();
  815|       |
  816|       |    /* Extract parent's functions */
  817|      3|    drbg->parent = parent;
  818|      3|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_ENABLE_LOCKING)) != NULL)
  ------------------
  |  |  548|      3|#define OSSL_FUNC_RAND_ENABLE_LOCKING 8
  ------------------
  |  Branch (818:9): [True: 3, False: 0]
  ------------------
  819|      3|        drbg->parent_enable_locking = OSSL_FUNC_rand_enable_locking(pfunc);
  820|      3|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_LOCK)) != NULL)
  ------------------
  |  |  549|      3|#define OSSL_FUNC_RAND_LOCK 9
  ------------------
  |  Branch (820:9): [True: 3, False: 0]
  ------------------
  821|      3|        drbg->parent_lock = OSSL_FUNC_rand_lock(pfunc);
  822|      3|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_UNLOCK)) != NULL)
  ------------------
  |  |  550|      3|#define OSSL_FUNC_RAND_UNLOCK 10
  ------------------
  |  Branch (822:9): [True: 3, False: 0]
  ------------------
  823|      3|        drbg->parent_unlock = OSSL_FUNC_rand_unlock(pfunc);
  824|      3|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_GET_CTX_PARAMS)) != NULL)
  ------------------
  |  |  555|      3|#define OSSL_FUNC_RAND_GET_CTX_PARAMS 15
  ------------------
  |  Branch (824:9): [True: 3, False: 0]
  ------------------
  825|      3|        drbg->parent_get_ctx_params = OSSL_FUNC_rand_get_ctx_params(pfunc);
  826|      3|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_NONCE)) != NULL)
  ------------------
  |  |  547|      3|#define OSSL_FUNC_RAND_NONCE 7
  ------------------
  |  Branch (826:9): [True: 0, False: 3]
  ------------------
  827|      0|        drbg->parent_nonce = OSSL_FUNC_rand_nonce(pfunc);
  828|      3|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_GET_SEED)) != NULL)
  ------------------
  |  |  558|      3|#define OSSL_FUNC_RAND_GET_SEED 18
  ------------------
  |  Branch (828:9): [True: 3, False: 0]
  ------------------
  829|      3|        drbg->parent_get_seed = OSSL_FUNC_rand_get_seed(pfunc);
  830|      3|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_CLEAR_SEED)) != NULL)
  ------------------
  |  |  559|      3|#define OSSL_FUNC_RAND_CLEAR_SEED 19
  ------------------
  |  Branch (830:9): [True: 3, False: 0]
  ------------------
  831|      3|        drbg->parent_clear_seed = OSSL_FUNC_rand_clear_seed(pfunc);
  832|       |
  833|       |    /* Set some default maximums up */
  834|      3|    drbg->max_entropylen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|      3|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  835|      3|    drbg->max_noncelen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|      3|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  836|      3|    drbg->max_perslen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|      3|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  837|      3|    drbg->max_adinlen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|      3|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  838|      3|    drbg->generate_counter = 1;
  839|      3|    drbg->reseed_counter = 1;
  840|      3|    drbg->reseed_interval = RESEED_INTERVAL;
  ------------------
  |  |   31|      3|#define RESEED_INTERVAL (1 << 8)
  ------------------
  841|      3|    drbg->reseed_time_interval = TIME_INTERVAL;
  ------------------
  |  |   32|      3|#define TIME_INTERVAL (60 * 60) /* 1 hour */
  ------------------
  842|       |
  843|      3|    if (!dnew(drbg))
  ------------------
  |  Branch (843:9): [True: 0, False: 3]
  ------------------
  844|      0|        goto err;
  845|       |
  846|      3|    if (parent != NULL) {
  ------------------
  |  Branch (846:9): [True: 3, False: 0]
  ------------------
  847|      3|        if (!get_parent_strength(drbg, &p_str))
  ------------------
  |  Branch (847:13): [True: 0, False: 3]
  ------------------
  848|      0|            goto err;
  849|      3|        if (drbg->strength > p_str) {
  ------------------
  |  Branch (849:13): [True: 0, False: 3]
  ------------------
  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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  855|      0|            goto err;
  856|      0|        }
  857|      3|    }
  858|       |#ifdef TSAN_REQUIRES_LOCKING
  859|       |    if (!ossl_drbg_enable_locking(drbg))
  860|       |        goto err;
  861|       |#endif
  862|      3|    return drbg;
  863|       |
  864|      0|err:
  865|      0|    dfree(drbg);
  866|       |    return NULL;
  867|      3|}
ossl_drbg_get_ctx_params:
  884|  34.6k|{
  885|  34.6k|    if (p->state != NULL && !OSSL_PARAM_set_int(p->state, drbg->state))
  ------------------
  |  Branch (885:9): [True: 34.6k, False: 7]
  |  Branch (885:29): [True: 0, False: 34.6k]
  ------------------
  886|      0|        return 0;
  887|       |
  888|  34.6k|    if (p->str != NULL && !OSSL_PARAM_set_int(p->str, drbg->strength))
  ------------------
  |  Branch (888:9): [True: 7, False: 34.6k]
  |  Branch (888:27): [True: 0, False: 7]
  ------------------
  889|      0|        return 0;
  890|       |
  891|  34.6k|    if (p->minentlen != NULL
  ------------------
  |  Branch (891:9): [True: 0, False: 34.6k]
  ------------------
  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|  34.6k|    if (p->maxentlen != NULL
  ------------------
  |  Branch (895:9): [True: 0, False: 34.6k]
  ------------------
  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|  34.6k|    if (p->minnonlen != NULL
  ------------------
  |  Branch (899:9): [True: 0, False: 34.6k]
  ------------------
  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|  34.6k|    if (p->maxnonlen != NULL
  ------------------
  |  Branch (903:9): [True: 0, False: 34.6k]
  ------------------
  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|  34.6k|    if (p->maxperlen != NULL
  ------------------
  |  Branch (907:9): [True: 0, False: 34.6k]
  ------------------
  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|  34.6k|    if (p->maxadlen != NULL
  ------------------
  |  Branch (911:9): [True: 0, False: 34.6k]
  ------------------
  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|  34.6k|    if (p->reseed_req != NULL
  ------------------
  |  Branch (915:9): [True: 0, False: 34.6k]
  ------------------
  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|  34.6k|    if (p->reseed_time != NULL
  ------------------
  |  Branch (919:9): [True: 0, False: 34.6k]
  ------------------
  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|  34.6k|    if (p->reseed_int != NULL
  ------------------
  |  Branch (923:9): [True: 0, False: 34.6k]
  ------------------
  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|  34.6k|    if (!OSSL_FIPS_IND_GET_CTX_FROM_PARAM(drbg, p->ind))
  ------------------
  |  |  161|  34.6k|#define OSSL_FIPS_IND_GET_CTX_FROM_PARAM(ctx, params) 1
  ------------------
  |  Branch (927:9): [Folded, False: 34.6k]
  ------------------
  928|      0|        return 0;
  929|       |
  930|  34.6k|    return 1;
  931|  34.6k|}
ossl_drbg_get_ctx_params_no_lock:
  940|   263k|{
  941|   263k|    size_t cnt = 0;
  942|       |
  943|       |    /* This value never changes once set */
  944|   263k|    if (p->maxreq != NULL) {
  ------------------
  |  Branch (944:9): [True: 114k, False: 149k]
  ------------------
  945|   114k|        if (!OSSL_PARAM_set_size_t(p->maxreq, drbg->max_request))
  ------------------
  |  Branch (945:13): [True: 0, False: 114k]
  ------------------
  946|      0|            return 0;
  947|   114k|        cnt++;
  948|   114k|    }
  949|       |
  950|       |    /*
  951|       |     * Can be changed by multiple threads, but we tolerate inaccuracies in this
  952|       |     * value.
  953|       |     */
  954|   263k|    if (p->reseed_cnt != NULL) {
  ------------------
  |  Branch (954:9): [True: 114k, False: 149k]
  ------------------
  955|   114k|        if (!OSSL_PARAM_set_uint(p->reseed_cnt, tsan_load(&drbg->reseed_counter)))
  ------------------
  |  |   61|   114k|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
  |  Branch (955:13): [True: 0, False: 114k]
  ------------------
  956|      0|            return 0;
  957|   114k|        cnt++;
  958|   114k|    }
  959|       |
  960|   263k|    if (params[cnt].key == NULL)
  ------------------
  |  Branch (960:9): [True: 229k, False: 34.6k]
  ------------------
  961|   229k|        *complete = 1;
  962|  34.6k|    else
  963|  34.6k|        *complete = 0;
  964|       |
  965|   263k|    return 1;
  966|   263k|}
ossl_drbg_set_ctx_params:
  970|      3|{
  971|      3|    if (p->reseed_req != NULL
  ------------------
  |  Branch (971:9): [True: 3, False: 0]
  ------------------
  972|      3|        && !OSSL_PARAM_get_uint(p->reseed_req, &drbg->reseed_interval))
  ------------------
  |  Branch (972:12): [True: 0, False: 3]
  ------------------
  973|      0|        return 0;
  974|       |
  975|      3|    if (p->reseed_time != NULL
  ------------------
  |  Branch (975:9): [True: 3, False: 0]
  ------------------
  976|      3|        && !OSSL_PARAM_get_time_t(p->reseed_time, &drbg->reseed_time_interval))
  ------------------
  |  Branch (976:12): [True: 0, False: 3]
  ------------------
  977|      0|        return 0;
  978|       |
  979|      3|    return 1;
  980|      3|}
drbg.c:get_entropy:
  195|      6|{
  196|      6|    size_t bytes;
  197|      6|    unsigned int p_str;
  198|       |
  199|      6|    if (drbg->parent == NULL)
  ------------------
  |  Branch (199:9): [True: 0, False: 6]
  ------------------
  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|      6|    if (drbg->parent_get_seed == NULL) {
  ------------------
  |  Branch (207:9): [True: 0, False: 6]
  ------------------
  208|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_PARENT_CANNOT_SUPPLY_ENTROPY_SEED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  209|      0|        return 0;
  210|      0|    }
  211|      6|    if (!get_parent_strength(drbg, &p_str))
  ------------------
  |  Branch (211:9): [True: 0, False: 6]
  ------------------
  212|      0|        return 0;
  213|      6|    if (drbg->strength > p_str) {
  ------------------
  |  Branch (213:9): [True: 0, False: 6]
  ------------------
  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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      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|      6|    if (!ossl_drbg_lock_parent(drbg))
  ------------------
  |  Branch (227:9): [True: 0, False: 6]
  ------------------
  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|      6|    bytes = drbg->parent_get_seed(drbg->parent, pout,
  239|      6|        entropy > 0 ? entropy : (int)drbg->strength,
  ------------------
  |  Branch (239:9): [True: 6, False: 0]
  ------------------
  240|      6|        min_len, max_len, prediction_resistance,
  241|      6|        (unsigned char *)&drbg, sizeof(drbg));
  242|      6|    ossl_drbg_unlock_parent(drbg);
  243|      6|    return bytes;
  244|      6|}
drbg.c:ossl_drbg_lock_parent:
   64|   114k|{
   65|   114k|    void *parent = drbg->parent;
   66|       |
   67|   114k|    if (parent != NULL
  ------------------
  |  Branch (67:9): [True: 114k, False: 0]
  ------------------
   68|   114k|        && drbg->parent_lock != NULL
  ------------------
  |  Branch (68:12): [True: 114k, False: 0]
  ------------------
   69|   114k|        && !drbg->parent_lock(parent)) {
  ------------------
  |  Branch (69:12): [True: 0, False: 114k]
  ------------------
   70|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_PARENT_LOCKING_NOT_ENABLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   71|      0|        return 0;
   72|      0|    }
   73|   114k|    return 1;
   74|   114k|}
drbg.c:ossl_drbg_unlock_parent:
   77|   114k|{
   78|   114k|    void *parent = drbg->parent;
   79|       |
   80|   114k|    if (parent != NULL && drbg->parent_unlock != NULL)
  ------------------
  |  Branch (80:9): [True: 114k, False: 0]
  |  Branch (80:27): [True: 114k, False: 0]
  ------------------
   81|   114k|        drbg->parent_unlock(parent);
   82|   114k|}
drbg.c:cleanup_entropy:
  247|      6|{
  248|      6|    if (drbg->parent == NULL) {
  ------------------
  |  Branch (248:9): [True: 0, False: 6]
  ------------------
  249|      0|        ossl_prov_cleanup_entropy(drbg->provctx, out, outlen);
  250|      6|    } else if (drbg->parent_clear_seed != NULL) {
  ------------------
  |  Branch (250:16): [True: 6, False: 0]
  ------------------
  251|      6|        if (!ossl_drbg_lock_parent(drbg))
  ------------------
  |  Branch (251:13): [True: 0, False: 6]
  ------------------
  252|      0|            return;
  253|      6|        drbg->parent_clear_seed(drbg->parent, out, outlen);
  254|      6|        ossl_drbg_unlock_parent(drbg);
  255|      6|    }
  256|      6|}
drbg.c:ossl_prov_drbg_reseed_unlocked:
  486|      3|{
  487|      3|    unsigned char *entropy = NULL;
  488|      3|    size_t entropylen = 0;
  489|       |
  490|      3|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (490:9): [True: 0, False: 3]
  ------------------
  491|      0|        return 0;
  492|       |
  493|      3|    if (drbg->state != EVP_RAND_STATE_READY) {
  ------------------
  |  | 1250|      3|#define EVP_RAND_STATE_READY 1
  ------------------
  |  Branch (493:9): [True: 0, False: 3]
  ------------------
  494|       |        /* try to recover from previous errors */
  495|      0|        rand_drbg_restart(drbg);
  496|       |
  497|      0|        if (drbg->state == EVP_RAND_STATE_ERROR) {
  ------------------
  |  | 1251|      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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  499|      0|            return 0;
  500|      0|        }
  501|      0|        if (drbg->state == EVP_RAND_STATE_UNINITIALISED) {
  ------------------
  |  | 1249|      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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  503|      0|            return 0;
  504|      0|        }
  505|      0|    }
  506|       |
  507|      3|    if (ent != NULL) {
  ------------------
  |  Branch (507:9): [True: 0, False: 3]
  ------------------
  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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  510|      0|            drbg->state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1251|      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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  515|      0|            drbg->state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1251|      0|#define EVP_RAND_STATE_ERROR 2
  ------------------
  516|      0|            return 0;
  517|      0|        }
  518|      0|    }
  519|       |
  520|      3|    if (adin == NULL) {
  ------------------
  |  Branch (520:9): [True: 3, False: 0]
  ------------------
  521|      3|        adinlen = 0;
  522|      3|    } 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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  524|      0|        return 0;
  525|      0|    }
  526|       |
  527|      3|    drbg->state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1251|      3|#define EVP_RAND_STATE_ERROR 2
  ------------------
  528|       |
  529|      3|    drbg->reseed_next_counter = tsan_load(&drbg->reseed_counter);
  ------------------
  |  |   61|      3|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
  530|      3|    if (drbg->reseed_next_counter) {
  ------------------
  |  Branch (530:9): [True: 3, False: 0]
  ------------------
  531|      3|        drbg->reseed_next_counter++;
  532|      3|        if (!drbg->reseed_next_counter)
  ------------------
  |  Branch (532:13): [True: 0, False: 3]
  ------------------
  533|      0|            drbg->reseed_next_counter = 1;
  534|      3|    }
  535|       |
  536|      3|    if (ent != NULL) {
  ------------------
  |  Branch (536:9): [True: 0, False: 3]
  ------------------
  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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      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|      3|    entropylen = get_entropy(drbg, &entropy, drbg->strength,
  562|      3|        drbg->min_entropylen, drbg->max_entropylen,
  563|      3|        prediction_resistance);
  564|      3|    if (entropylen < drbg->min_entropylen
  ------------------
  |  Branch (564:9): [True: 0, False: 3]
  ------------------
  565|      3|        || entropylen > drbg->max_entropylen) {
  ------------------
  |  Branch (565:12): [True: 0, False: 3]
  ------------------
  566|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_ERROR_RETRIEVING_ENTROPY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  567|      0|        goto end;
  568|      0|    }
  569|       |
  570|      3|    if (!drbg->reseed(drbg, entropy, entropylen, adin, adinlen))
  ------------------
  |  Branch (570:9): [True: 0, False: 3]
  ------------------
  571|      0|        goto end;
  572|       |
  573|      3|    drbg->state = EVP_RAND_STATE_READY;
  ------------------
  |  | 1250|      3|#define EVP_RAND_STATE_READY 1
  ------------------
  574|      3|    drbg->generate_counter = 1;
  575|      3|    drbg->reseed_time = time(NULL);
  576|      3|    tsan_store(&drbg->reseed_counter, drbg->reseed_next_counter);
  ------------------
  |  |   62|      3|#define tsan_store(ptr, val) atomic_store_explicit((ptr), (val), memory_order_relaxed)
  ------------------
  577|      3|    if (drbg->parent != NULL)
  ------------------
  |  Branch (577:9): [True: 3, False: 0]
  ------------------
  578|      3|        drbg->parent_reseed_counter = get_parent_reseed_count(drbg);
  579|       |
  580|      3|end:
  581|      3|    cleanup_entropy(drbg, entropy, entropylen);
  582|      3|    if (drbg->state == EVP_RAND_STATE_READY)
  ------------------
  |  | 1250|      3|#define EVP_RAND_STATE_READY 1
  ------------------
  |  Branch (582:9): [True: 3, False: 0]
  ------------------
  583|      3|        return 1;
  584|      0|    return 0;
  585|      3|}
drbg.c:get_parent_reseed_count:
  110|   114k|{
  111|   114k|    OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|   114k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|   114k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  112|   114k|    void *parent = drbg->parent;
  113|   114k|    unsigned int r = 0;
  114|       |
  115|   114k|    *params = OSSL_PARAM_construct_uint(OSSL_DRBG_PARAM_RESEED_COUNTER, &r);
  ------------------
  |  |  254|   114k|# define OSSL_DRBG_PARAM_RESEED_COUNTER "reseed_counter"
  ------------------
  116|   114k|    if (!ossl_drbg_lock_parent(drbg)) {
  ------------------
  |  Branch (116:9): [True: 0, False: 114k]
  ------------------
  117|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_LOCK_PARENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  118|      0|        goto err;
  119|      0|    }
  120|   114k|    if (!drbg->parent_get_ctx_params(parent, params))
  ------------------
  |  Branch (120:9): [True: 0, False: 114k]
  ------------------
  121|      0|        r = 0;
  122|   114k|    ossl_drbg_unlock_parent(drbg);
  123|   114k|    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|   114k|}
drbg.c:find_call:
  748|     21|{
  749|     21|    if (dispatch != NULL)
  ------------------
  |  Branch (749:9): [True: 21, False: 0]
  ------------------
  750|    247|        while (dispatch->function_id != 0) {
  ------------------
  |  Branch (750:16): [True: 244, False: 3]
  ------------------
  751|    244|            if (dispatch->function_id == function)
  ------------------
  |  Branch (751:17): [True: 18, False: 226]
  ------------------
  752|     18|                return dispatch;
  753|    226|            dispatch++;
  754|    226|        }
  755|      3|    return NULL;
  756|     21|}
drbg.c:get_parent_strength:
   85|      9|{
   86|      9|    OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|      9|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|      9|    { NULL, 0, NULL, 0, 0 }
  ------------------
   87|      9|    void *parent = drbg->parent;
   88|      9|    int res;
   89|       |
   90|      9|    if (drbg->parent_get_ctx_params == NULL) {
  ------------------
  |  Branch (90:9): [True: 0, False: 9]
  ------------------
   91|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_GET_PARENT_STRENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   92|      0|        return 0;
   93|      0|    }
   94|       |
   95|      9|    *params = OSSL_PARAM_construct_uint(OSSL_RAND_PARAM_STRENGTH, str);
  ------------------
  |  |  553|      9|# define OSSL_RAND_PARAM_STRENGTH "strength"
  ------------------
   96|      9|    if (!ossl_drbg_lock_parent(drbg)) {
  ------------------
  |  Branch (96:9): [True: 0, False: 9]
  ------------------
   97|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_LOCK_PARENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   98|      0|        return 0;
   99|      0|    }
  100|      9|    res = drbg->parent_get_ctx_params(parent, params);
  101|      9|    ossl_drbg_unlock_parent(drbg);
  102|      9|    if (!res) {
  ------------------
  |  Branch (102:9): [True: 0, False: 9]
  ------------------
  103|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_GET_PARENT_STRENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  104|      0|        return 0;
  105|      0|    }
  106|      9|    return 1;
  107|      9|}

drbg_ctr.c:drbg_ctr_new_wrapper:
  661|      3|{
  662|       |#ifdef FIPS_MODULE
  663|       |    if (!ossl_deferred_self_test(PROV_LIBCTX_OF(provctx),
  664|       |            ST_ID_DRBG_CTR))
  665|       |        return NULL;
  666|       |#endif
  667|       |
  668|      3|    return ossl_rand_drbg_new(provctx, parent, parent_dispatch,
  669|      3|        &drbg_ctr_new, &drbg_ctr_free,
  670|      3|        &drbg_ctr_instantiate, &drbg_ctr_uninstantiate,
  671|      3|        &drbg_ctr_reseed, &drbg_ctr_generate);
  672|      3|}
drbg_ctr.c:drbg_ctr_new:
  646|      3|{
  647|      3|    PROV_DRBG_CTR *ctr;
  648|       |
  649|      3|    ctr = OPENSSL_secure_zalloc(sizeof(*ctr));
  ------------------
  |  |  142|      3|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  650|      3|    if (ctr == NULL)
  ------------------
  |  Branch (650:9): [True: 0, False: 3]
  ------------------
  651|      0|        return 0;
  652|       |
  653|      3|    ctr->use_df = 1;
  654|      3|    drbg->data = ctr;
  655|      3|    OSSL_FIPS_IND_INIT(drbg)
  656|      3|    return drbg_ctr_init_lengths(drbg);
  657|      3|}
drbg_ctr.c:drbg_ctr_init_lengths:
  540|      6|{
  541|      6|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  542|      6|    int res = 1;
  543|       |
  544|       |    /* Maximum number of bits per request = 2^19  = 2^16 bytes */
  545|      6|    drbg->max_request = 1 << 16;
  546|      6|    if (ctr->use_df) {
  ------------------
  |  Branch (546:9): [True: 6, False: 0]
  ------------------
  547|      6|        drbg->min_entropylen = 0;
  548|      6|        drbg->max_entropylen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|      6|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  549|      6|        drbg->min_noncelen = 0;
  550|      6|        drbg->max_noncelen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|      6|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  551|      6|        drbg->max_perslen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|      6|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  552|      6|        drbg->max_adinlen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|      6|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  553|       |
  554|      6|        if (ctr->keylen > 0) {
  ------------------
  |  Branch (554:13): [True: 3, False: 3]
  ------------------
  555|      3|            drbg->min_entropylen = ctr->keylen;
  556|      3|            drbg->min_noncelen = drbg->min_entropylen / 2;
  557|      3|        }
  558|      6|    } else {
  559|      0|        const size_t len = ctr->keylen > 0 ? drbg->seedlen : DRBG_MAX_LENGTH;
  ------------------
  |  |   41|      0|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  |  Branch (559:28): [True: 0, False: 0]
  ------------------
  560|       |
  561|      0|        drbg->min_entropylen = len;
  562|      0|        drbg->max_entropylen = len;
  563|       |        /* Nonce not used */
  564|      0|        drbg->min_noncelen = 0;
  565|      0|        drbg->max_noncelen = 0;
  566|      0|        drbg->max_perslen = len;
  567|      0|        drbg->max_adinlen = len;
  568|      0|    }
  569|      6|    return res;
  570|      6|}
drbg_ctr.c:drbg_ctr_instantiate:
  323|      3|{
  324|      3|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  325|       |
  326|      3|    if (entropy == NULL)
  ------------------
  |  Branch (326:9): [True: 0, False: 3]
  ------------------
  327|      0|        return 0;
  328|       |
  329|      3|    memset(ctr->K, 0, sizeof(ctr->K));
  330|      3|    memset(ctr->V, 0, sizeof(ctr->V));
  331|      3|    if (!EVP_CipherInit_ex(ctr->ctx_ecb, NULL, NULL, ctr->K, NULL, -1))
  ------------------
  |  Branch (331:9): [True: 0, False: 3]
  ------------------
  332|      0|        return 0;
  333|       |
  334|      3|    inc_128(ctr);
  335|      3|    if (!ctr_update(drbg, entropy, entropylen, pers, perslen, nonce, noncelen))
  ------------------
  |  Branch (335:9): [True: 0, False: 3]
  ------------------
  336|      0|        return 0;
  337|      3|    return 1;
  338|      3|}
drbg_ctr.c:inc_128:
   72|   343k|{
   73|   343k|    unsigned char *p = &ctr->V[0];
   74|   343k|    u32 n = 16, c = 1;
   75|       |
   76|  5.50M|    do {
   77|  5.50M|        --n;
   78|  5.50M|        c += p[n];
   79|  5.50M|        p[n] = (u8)c;
   80|  5.50M|        c >>= 8;
   81|  5.50M|    } while (n);
  ------------------
  |  Branch (81:14): [True: 5.15M, False: 343k]
  ------------------
   82|   343k|}
drbg_ctr.c:ctr_update:
  277|   114k|{
  278|   114k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  279|   114k|    int outlen = AES_BLOCK_SIZE;
  ------------------
  |  |   26|   114k|#define AES_BLOCK_SIZE 16
  ------------------
  280|   114k|    unsigned char V_tmp[48], out[48];
  281|   114k|    unsigned char len;
  282|       |
  283|       |    /* correct key is already set up. */
  284|   114k|    memcpy(V_tmp, ctr->V, 16);
  285|   114k|    inc_128(ctr);
  286|   114k|    memcpy(V_tmp + 16, ctr->V, 16);
  287|   114k|    if (ctr->keylen == 16) {
  ------------------
  |  Branch (287:9): [True: 0, False: 114k]
  ------------------
  288|      0|        len = 32;
  289|   114k|    } else {
  290|   114k|        inc_128(ctr);
  291|   114k|        memcpy(V_tmp + 32, ctr->V, 16);
  292|   114k|        len = 48;
  293|   114k|    }
  294|   114k|    if (!EVP_CipherUpdate(ctr->ctx_ecb, out, &outlen, V_tmp, len)
  ------------------
  |  Branch (294:9): [True: 0, False: 114k]
  ------------------
  295|   114k|        || outlen != len)
  ------------------
  |  Branch (295:12): [True: 0, False: 114k]
  ------------------
  296|      0|        return 0;
  297|   114k|    memcpy(ctr->K, out, ctr->keylen);
  298|   114k|    memcpy(ctr->V, out + ctr->keylen, 16);
  299|       |
  300|   114k|    if (ctr->use_df) {
  ------------------
  |  Branch (300:9): [True: 114k, False: 0]
  ------------------
  301|       |        /* If no input reuse existing derived value */
  302|   114k|        if (in1 != NULL || nonce != NULL || in2 != NULL)
  ------------------
  |  Branch (302:13): [True: 11, False: 114k]
  |  Branch (302:28): [True: 0, False: 114k]
  |  Branch (302:45): [True: 0, False: 114k]
  ------------------
  303|     11|            if (!ctr_df(ctr, in1, in1len, nonce, noncelen, in2, in2len))
  ------------------
  |  Branch (303:17): [True: 0, False: 11]
  ------------------
  304|      0|                return 0;
  305|       |        /* If this a reuse input in1len != 0 */
  306|   114k|        if (in1len)
  ------------------
  |  Branch (306:13): [True: 16, False: 114k]
  ------------------
  307|     16|            ctr_XOR(ctr, ctr->KX, drbg->seedlen);
  308|   114k|    } else {
  309|      0|        ctr_XOR(ctr, in1, in1len);
  310|      0|        ctr_XOR(ctr, in2, in2len);
  311|      0|    }
  312|       |
  313|   114k|    if (!EVP_CipherInit_ex(ctr->ctx_ecb, NULL, NULL, ctr->K, NULL, -1)
  ------------------
  |  Branch (313:9): [True: 0, False: 114k]
  ------------------
  314|   114k|        || !EVP_CipherInit_ex(ctr->ctx_ctr, NULL, NULL, ctr->K, NULL, -1))
  ------------------
  |  Branch (314:12): [True: 0, False: 114k]
  ------------------
  315|      0|        return 0;
  316|   114k|    return 1;
  317|   114k|}
drbg_ctr.c:ctr_df:
  214|     11|{
  215|     11|    static unsigned char c80 = 0x80;
  216|     11|    size_t inlen;
  217|     11|    unsigned char *p = ctr->bltmp;
  218|     11|    int outlen = AES_BLOCK_SIZE;
  ------------------
  |  |   26|     11|#define AES_BLOCK_SIZE 16
  ------------------
  219|       |
  220|     11|    if (!ctr_BCC_init(ctr))
  ------------------
  |  Branch (220:9): [True: 0, False: 11]
  ------------------
  221|      0|        return 0;
  222|     11|    if (in1 == NULL)
  ------------------
  |  Branch (222:9): [True: 0, False: 11]
  ------------------
  223|      0|        in1len = 0;
  224|     11|    if (in2 == NULL)
  ------------------
  |  Branch (224:9): [True: 11, False: 0]
  ------------------
  225|     11|        in2len = 0;
  226|     11|    if (in3 == NULL)
  ------------------
  |  Branch (226:9): [True: 8, False: 3]
  ------------------
  227|      8|        in3len = 0;
  228|     11|    inlen = in1len + in2len + in3len;
  229|       |    /* Initialise L||N in temporary block */
  230|     11|    *p++ = (inlen >> 24) & 0xff;
  231|     11|    *p++ = (inlen >> 16) & 0xff;
  232|     11|    *p++ = (inlen >> 8) & 0xff;
  233|     11|    *p++ = inlen & 0xff;
  234|       |
  235|       |    /* NB keylen is at most 32 bytes */
  236|     11|    *p++ = 0;
  237|     11|    *p++ = 0;
  238|     11|    *p++ = 0;
  239|     11|    *p = (unsigned char)((ctr->keylen + 16) & 0xff);
  240|     11|    ctr->bltmp_pos = 8;
  241|     11|    if (!ctr_BCC_update(ctr, in1, in1len)
  ------------------
  |  Branch (241:9): [True: 0, False: 11]
  ------------------
  242|     11|        || !ctr_BCC_update(ctr, in2, in2len)
  ------------------
  |  Branch (242:12): [True: 0, False: 11]
  ------------------
  243|     11|        || !ctr_BCC_update(ctr, in3, in3len)
  ------------------
  |  Branch (243:12): [True: 0, False: 11]
  ------------------
  244|     11|        || !ctr_BCC_update(ctr, &c80, 1)
  ------------------
  |  Branch (244:12): [True: 0, False: 11]
  ------------------
  245|     11|        || !ctr_BCC_final(ctr))
  ------------------
  |  Branch (245:12): [True: 0, False: 11]
  ------------------
  246|      0|        return 0;
  247|       |    /* Set up key K */
  248|     11|    if (!EVP_CipherInit_ex(ctr->ctx_ecb, NULL, NULL, ctr->KX, NULL, -1))
  ------------------
  |  Branch (248:9): [True: 0, False: 11]
  ------------------
  249|      0|        return 0;
  250|       |    /* X follows key K */
  251|     11|    if (!EVP_CipherUpdate(ctr->ctx_ecb, ctr->KX, &outlen, ctr->KX + ctr->keylen,
  ------------------
  |  Branch (251:9): [True: 0, False: 11]
  ------------------
  252|     11|            AES_BLOCK_SIZE)
  ------------------
  |  |   26|     11|#define AES_BLOCK_SIZE 16
  ------------------
  253|     11|        || outlen != AES_BLOCK_SIZE)
  ------------------
  |  |   26|     11|#define AES_BLOCK_SIZE 16
  ------------------
  |  Branch (253:12): [True: 0, False: 11]
  ------------------
  254|      0|        return 0;
  255|     11|    if (!EVP_CipherUpdate(ctr->ctx_ecb, ctr->KX + 16, &outlen, ctr->KX,
  ------------------
  |  Branch (255:9): [True: 0, False: 11]
  ------------------
  256|     11|            AES_BLOCK_SIZE)
  ------------------
  |  |   26|     11|#define AES_BLOCK_SIZE 16
  ------------------
  257|     11|        || outlen != AES_BLOCK_SIZE)
  ------------------
  |  |   26|     11|#define AES_BLOCK_SIZE 16
  ------------------
  |  Branch (257:12): [True: 0, False: 11]
  ------------------
  258|      0|        return 0;
  259|     11|    if (ctr->keylen != 16)
  ------------------
  |  Branch (259:9): [True: 11, False: 0]
  ------------------
  260|     11|        if (!EVP_CipherUpdate(ctr->ctx_ecb, ctr->KX + 32, &outlen,
  ------------------
  |  Branch (260:13): [True: 0, False: 11]
  ------------------
  261|     11|                ctr->KX + 16, AES_BLOCK_SIZE)
  ------------------
  |  |   26|     11|#define AES_BLOCK_SIZE 16
  ------------------
  262|     11|            || outlen != AES_BLOCK_SIZE)
  ------------------
  |  |   26|     11|#define AES_BLOCK_SIZE 16
  ------------------
  |  Branch (262:16): [True: 0, False: 11]
  ------------------
  263|      0|            return 0;
  264|     11|    return 1;
  265|     11|}
drbg_ctr.c:ctr_BCC_init:
  151|     11|{
  152|     11|    unsigned char bltmp[48] = { 0 };
  153|     11|    unsigned char num_of_blk;
  154|       |
  155|     11|    memset(ctr->KX, 0, 48);
  156|     11|    num_of_blk = ctr->keylen == 16 ? 2 : 3;
  ------------------
  |  Branch (156:18): [True: 0, False: 11]
  ------------------
  157|     11|    bltmp[(AES_BLOCK_SIZE * 1) + 3] = 1;
  ------------------
  |  |   26|     11|#define AES_BLOCK_SIZE 16
  ------------------
  158|     11|    bltmp[(AES_BLOCK_SIZE * 2) + 3] = 2;
  ------------------
  |  |   26|     11|#define AES_BLOCK_SIZE 16
  ------------------
  159|     11|    return ctr_BCC_block(ctr, ctr->KX, bltmp, num_of_blk * AES_BLOCK_SIZE);
  ------------------
  |  |   26|     11|#define AES_BLOCK_SIZE 16
  ------------------
  160|     11|}
drbg_ctr.c:ctr_BCC_block:
  117|     48|{
  118|     48|    int i, outlen = AES_BLOCK_SIZE;
  ------------------
  |  |   26|     48|#define AES_BLOCK_SIZE 16
  ------------------
  119|       |
  120|  2.35k|    for (i = 0; i < len; i++)
  ------------------
  |  Branch (120:17): [True: 2.30k, False: 48]
  ------------------
  121|  2.30k|        out[i] ^= in[i];
  122|       |
  123|     48|    if (!EVP_CipherUpdate(ctr->ctx_df, out, &outlen, out, len)
  ------------------
  |  Branch (123:9): [True: 0, False: 48]
  ------------------
  124|     48|        || outlen != len)
  ------------------
  |  Branch (124:12): [True: 0, False: 48]
  ------------------
  125|      0|        return 0;
  126|     48|    return 1;
  127|     48|}
drbg_ctr.c:ctr_BCC_update:
  167|     44|{
  168|     44|    if (in == NULL || inlen == 0)
  ------------------
  |  Branch (168:9): [True: 19, False: 25]
  |  Branch (168:23): [True: 0, False: 25]
  ------------------
  169|     19|        return 1;
  170|       |
  171|       |    /* If we have partial block handle it first */
  172|     25|    if (ctr->bltmp_pos) {
  ------------------
  |  Branch (172:9): [True: 20, False: 5]
  ------------------
  173|     20|        size_t left = 16 - ctr->bltmp_pos;
  174|       |
  175|       |        /* If we now have a complete block process it */
  176|     20|        if (inlen >= left) {
  ------------------
  |  Branch (176:13): [True: 14, False: 6]
  ------------------
  177|     14|            memcpy(ctr->bltmp + ctr->bltmp_pos, in, left);
  178|     14|            if (!ctr_BCC_blocks(ctr, ctr->bltmp))
  ------------------
  |  Branch (178:17): [True: 0, False: 14]
  ------------------
  179|      0|                return 0;
  180|     14|            ctr->bltmp_pos = 0;
  181|     14|            inlen -= left;
  182|     14|            in += left;
  183|     14|        }
  184|     20|    }
  185|       |
  186|       |    /* Process zero or more complete blocks */
  187|     37|    for (; inlen >= 16; in += 16, inlen -= 16) {
  ------------------
  |  Branch (187:12): [True: 12, False: 25]
  ------------------
  188|     12|        if (!ctr_BCC_blocks(ctr, in))
  ------------------
  |  Branch (188:13): [True: 0, False: 12]
  ------------------
  189|      0|            return 0;
  190|     12|    }
  191|       |
  192|       |    /* Copy any remaining partial block to the temporary buffer */
  193|     25|    if (inlen > 0) {
  ------------------
  |  Branch (193:9): [True: 20, False: 5]
  ------------------
  194|     20|        memcpy(ctr->bltmp + ctr->bltmp_pos, in, inlen);
  195|     20|        ctr->bltmp_pos += inlen;
  196|     20|    }
  197|     25|    return 1;
  198|     25|}
drbg_ctr.c:ctr_BCC_blocks:
  133|     37|{
  134|     37|    unsigned char in_tmp[48];
  135|     37|    unsigned char num_of_blk = 2;
  136|       |
  137|     37|    memcpy(in_tmp, in, 16);
  138|     37|    memcpy(in_tmp + 16, in, 16);
  139|     37|    if (ctr->keylen != 16) {
  ------------------
  |  Branch (139:9): [True: 37, False: 0]
  ------------------
  140|     37|        memcpy(in_tmp + 32, in, 16);
  141|     37|        num_of_blk = 3;
  142|     37|    }
  143|     37|    return ctr_BCC_block(ctr, ctr->KX, in_tmp, AES_BLOCK_SIZE * num_of_blk);
  ------------------
  |  |   26|     37|#define AES_BLOCK_SIZE 16
  ------------------
  144|     37|}
drbg_ctr.c:ctr_BCC_final:
  201|     11|{
  202|     11|    if (ctr->bltmp_pos) {
  ------------------
  |  Branch (202:9): [True: 11, False: 0]
  ------------------
  203|     11|        memset(ctr->bltmp + ctr->bltmp_pos, 0, 16 - ctr->bltmp_pos);
  204|     11|        if (!ctr_BCC_blocks(ctr, ctr->bltmp))
  ------------------
  |  Branch (204:13): [True: 0, False: 11]
  ------------------
  205|      0|            return 0;
  206|     11|    }
  207|     11|    return 1;
  208|     11|}
drbg_ctr.c:ctr_XOR:
   85|     16|{
   86|     16|    size_t i, n;
   87|       |
   88|     16|    if (in == NULL || inlen == 0)
  ------------------
  |  Branch (88:9): [True: 0, False: 16]
  |  Branch (88:23): [True: 0, False: 16]
  ------------------
   89|      0|        return;
   90|       |
   91|       |    /*
   92|       |     * Any zero padding will have no effect on the result as we
   93|       |     * are XORing. So just process however much input we have.
   94|       |     */
   95|     16|    n = inlen < ctr->keylen ? inlen : ctr->keylen;
  ------------------
  |  Branch (95:9): [True: 0, False: 16]
  ------------------
   96|     16|    if (!ossl_assert(n <= sizeof(ctr->K)))
  ------------------
  |  |   52|     16|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|     16|    __FILE__, __LINE__)
  ------------------
  |  Branch (96:9): [True: 0, False: 16]
  ------------------
   97|      0|        return;
   98|    528|    for (i = 0; i < n; i++)
  ------------------
  |  Branch (98:17): [True: 512, False: 16]
  ------------------
   99|    512|        ctr->K[i] ^= in[i];
  100|     16|    if (inlen <= ctr->keylen)
  ------------------
  |  Branch (100:9): [True: 0, False: 16]
  ------------------
  101|      0|        return;
  102|       |
  103|     16|    n = inlen - ctr->keylen;
  104|     16|    if (n > 16) {
  ------------------
  |  Branch (104:9): [True: 0, False: 16]
  ------------------
  105|       |        /* Should never happen */
  106|      0|        n = 16;
  107|      0|    }
  108|    272|    for (i = 0; i < n; i++)
  ------------------
  |  Branch (108:17): [True: 256, False: 16]
  ------------------
  109|    256|        ctr->V[i] ^= in[i + ctr->keylen];
  110|     16|}
drbg_ctr.c:drbg_ctr_reseed:
  370|      3|{
  371|      3|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  372|       |
  373|      3|    if (entropy == NULL)
  ------------------
  |  Branch (373:9): [True: 0, False: 3]
  ------------------
  374|      0|        return 0;
  375|       |
  376|      3|    inc_128(ctr);
  377|      3|    if (!ctr_update(drbg, entropy, entropylen, adin, adinlen, NULL, 0))
  ------------------
  |  Branch (377:9): [True: 0, False: 3]
  ------------------
  378|      0|        return 0;
  379|      3|    return 1;
  380|      3|}
drbg_ctr.c:drbg_ctr_generate:
  407|   114k|{
  408|   114k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  409|   114k|    unsigned int ctr32, blocks;
  410|   114k|    int outl, buflen;
  411|       |
  412|   114k|    if (adin != NULL && adinlen != 0) {
  ------------------
  |  Branch (412:9): [True: 5, False: 114k]
  |  Branch (412:25): [True: 5, False: 0]
  ------------------
  413|      5|        inc_128(ctr);
  414|       |
  415|      5|        if (!ctr_update(drbg, adin, adinlen, NULL, 0, NULL, 0))
  ------------------
  |  Branch (415:13): [True: 0, False: 5]
  ------------------
  416|      0|            return 0;
  417|       |        /* This means we reuse derived value */
  418|      5|        if (ctr->use_df) {
  ------------------
  |  Branch (418:13): [True: 5, False: 0]
  ------------------
  419|      5|            adin = NULL;
  420|      5|            adinlen = 1;
  421|      5|        }
  422|   114k|    } else {
  423|   114k|        adinlen = 0;
  424|   114k|    }
  425|       |
  426|   114k|    inc_128(ctr);
  427|       |
  428|   114k|    if (outlen == 0) {
  ------------------
  |  Branch (428:9): [True: 0, False: 114k]
  ------------------
  429|      0|        inc_128(ctr);
  430|       |
  431|      0|        if (!ctr_update(drbg, adin, adinlen, NULL, 0, NULL, 0))
  ------------------
  |  Branch (431:13): [True: 0, False: 0]
  ------------------
  432|      0|            return 0;
  433|      0|        return 1;
  434|      0|    }
  435|       |
  436|   114k|    memset(out, 0, outlen);
  437|       |
  438|   114k|    do {
  439|   114k|        if (!EVP_CipherInit_ex(ctr->ctx_ctr,
  ------------------
  |  Branch (439:13): [True: 0, False: 114k]
  ------------------
  440|   114k|                NULL, NULL, NULL, ctr->V, -1))
  441|      0|            return 0;
  442|       |
  443|       |        /*-
  444|       |         * outlen has type size_t while EVP_CipherUpdate takes an
  445|       |         * int argument and thus cannot be guaranteed to process more
  446|       |         * than 2^31-1 bytes at a time. We process such huge generate
  447|       |         * requests in 2^30 byte chunks, which is the greatest multiple
  448|       |         * of AES block size lower than or equal to 2^31-1.
  449|       |         */
  450|   114k|        buflen = outlen > (1U << 30) ? (1 << 30) : (int)outlen;
  ------------------
  |  Branch (450:18): [True: 0, False: 114k]
  ------------------
  451|   114k|        blocks = (buflen + 15) / 16;
  452|       |
  453|   114k|        ctr32 = GETU32(ctr->V + 12) + blocks;
  ------------------
  |  |   98|   114k|#define GETU32(p) ((u32)(p)[0] << 24 | (u32)(p)[1] << 16 | (u32)(p)[2] << 8 | (u32)(p)[3])
  ------------------
  454|   114k|        if (ctr32 < blocks) {
  ------------------
  |  Branch (454:13): [True: 0, False: 114k]
  ------------------
  455|       |            /* 32-bit counter overflow into V. */
  456|      0|            if (ctr32 != 0) {
  ------------------
  |  Branch (456:17): [True: 0, False: 0]
  ------------------
  457|      0|                blocks -= ctr32;
  458|      0|                buflen = blocks * 16;
  459|      0|                ctr32 = 0;
  460|      0|            }
  461|      0|            ctr96_inc(ctr->V);
  462|      0|        }
  463|   114k|        PUTU32(ctr->V + 12, ctr32);
  ------------------
  |  |   99|   114k|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
  464|       |
  465|   114k|        if (!EVP_CipherUpdate(ctr->ctx_ctr, out, &outl, out, buflen)
  ------------------
  |  Branch (465:13): [True: 0, False: 114k]
  ------------------
  466|   114k|            || outl != buflen)
  ------------------
  |  Branch (466:16): [True: 0, False: 114k]
  ------------------
  467|      0|            return 0;
  468|       |
  469|   114k|        out += buflen;
  470|   114k|        outlen -= buflen;
  471|   114k|    } while (outlen);
  ------------------
  |  Branch (471:14): [True: 0, False: 114k]
  ------------------
  472|       |
  473|   114k|    if (!ctr_update(drbg, adin, adinlen, NULL, 0, NULL, 0))
  ------------------
  |  Branch (473:9): [True: 0, False: 114k]
  ------------------
  474|      0|        return 0;
  475|   114k|    return 1;
  476|   114k|}
drbg_ctr.c:drbg_ctr_instantiate_wrapper:
  345|      3|{
  346|      3|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
  347|      3|    struct drbg_set_ctx_params_st p;
  348|      3|    int ret = 0;
  349|       |
  350|      3|    if (drbg == NULL || !drbg_ctr_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (350:9): [True: 0, False: 3]
  |  Branch (350:25): [True: 0, False: 3]
  ------------------
  351|      0|        return 0;
  352|       |
  353|      3|    if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock))
  ------------------
  |  Branch (353:9): [True: 0, False: 3]
  |  Branch (353:31): [True: 0, False: 0]
  ------------------
  354|      0|        return 0;
  355|       |
  356|      3|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (356:9): [True: 0, False: 3]
  ------------------
  357|      3|        || !drbg_ctr_set_ctx_params_locked(drbg, &p))
  ------------------
  |  Branch (357:12): [True: 0, False: 3]
  ------------------
  358|      0|        goto err;
  359|      3|    ret = ossl_prov_drbg_instantiate(drbg, strength, prediction_resistance,
  360|      3|        pstr, pstr_len);
  361|      3|err:
  362|      3|    if (drbg->lock != NULL)
  ------------------
  |  Branch (362:9): [True: 0, False: 3]
  ------------------
  363|      0|        CRYPTO_THREAD_unlock(drbg->lock);
  364|      3|    return ret;
  365|      3|}
drbg_ctr.c:drbg_ctr_set_ctx_params_locked:
  738|      3|{
  739|      3|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)ctx->data;
  740|      3|    OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(ctx->provctx);
  ------------------
  |  |   31|      3|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  741|      3|    char *ecb;
  742|      3|    const char *propquery = NULL;
  743|      3|    int i, cipher_init = 0;
  744|       |
  745|      3|    if (p->df != NULL && OSSL_PARAM_get_int(p->df, &i)) {
  ------------------
  |  Branch (745:9): [True: 3, False: 0]
  |  Branch (745:26): [True: 3, False: 0]
  ------------------
  746|       |        /* FIPS errors out in the drbg_ctr_init() call later */
  747|      3|        ctr->use_df = i != 0;
  748|      3|        cipher_init = 1;
  749|      3|    }
  750|       |
  751|      3|#ifndef FIPS_MODULE
  752|      3|    propquery = "provider=default";
  753|      3|    if (p->propq != NULL
  ------------------
  |  Branch (753:9): [True: 0, False: 3]
  ------------------
  754|      0|        && p->propq->data_type == OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (754:12): [True: 0, False: 0]
  ------------------
  755|      0|        propquery = (const char *)p->propq->data;
  756|      3|#endif
  757|       |
  758|      3|    if (p->cipher != NULL) {
  ------------------
  |  Branch (758:9): [True: 3, False: 0]
  ------------------
  759|      3|        const char *base = (const char *)p->cipher->data;
  760|      3|        size_t ctr_str_len = sizeof("CTR") - 1;
  761|      3|        size_t ecb_str_len = sizeof("ECB") - 1;
  762|       |
  763|      3|        if (p->cipher->data_type != OSSL_PARAM_UTF8_STRING
  ------------------
  |  |  117|      6|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (763:13): [True: 0, False: 3]
  ------------------
  764|      3|            || p->cipher->data_size < ctr_str_len) {
  ------------------
  |  Branch (764:16): [True: 0, False: 3]
  ------------------
  765|      0|            return 0;
  766|      0|        }
  767|      3|        if (OPENSSL_strcasecmp("CTR", base + p->cipher->data_size - ctr_str_len) != 0) {
  ------------------
  |  Branch (767:13): [True: 0, False: 3]
  ------------------
  768|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_REQUIRE_CTR_MODE_CIPHER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  769|      0|            return 0;
  770|      0|        }
  771|      3|        if ((ecb = OPENSSL_strndup(base, p->cipher->data_size)) == NULL) {
  ------------------
  |  |  138|      3|    CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (771:13): [True: 0, False: 3]
  ------------------
  772|      0|            return 0;
  773|      0|        }
  774|      3|        strcpy(ecb + p->cipher->data_size - ecb_str_len, "ECB");
  775|      3|        EVP_CIPHER_free(ctr->cipher_ecb);
  776|      3|        EVP_CIPHER_free(ctr->cipher_ctr);
  777|      3|        ctr->cipher_ctr = NULL;
  778|      3|        ctr->cipher_ecb = NULL;
  779|       |        /*
  780|       |         * Try to fetch algorithms from our own provider code, fallback
  781|       |         * to generic fetch only if that fails
  782|       |         */
  783|      3|        ctr->cipher_ctr = EVP_CIPHER_fetch(libctx, base, propquery);
  784|      3|        ctr->cipher_ecb = EVP_CIPHER_fetch(libctx, ecb, propquery);
  785|      3|        OPENSSL_free(ecb);
  ------------------
  |  |  132|      3|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  786|      3|        if (ctr->cipher_ctr == NULL || ctr->cipher_ecb == NULL) {
  ------------------
  |  Branch (786:13): [True: 0, False: 3]
  |  Branch (786:40): [True: 0, False: 3]
  ------------------
  787|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_FIND_CIPHERS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  788|      0|            return 0;
  789|      0|        }
  790|      3|        cipher_init = 1;
  791|      3|    }
  792|       |
  793|      3|    if (cipher_init && !drbg_ctr_init(ctx))
  ------------------
  |  Branch (793:9): [True: 3, False: 0]
  |  Branch (793:24): [True: 0, False: 3]
  ------------------
  794|      0|        return 0;
  795|       |
  796|      3|    return ossl_drbg_set_ctx_params(ctx, p);
  797|      3|}
drbg_ctr.c:drbg_ctr_init:
  573|      3|{
  574|      3|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  575|      3|    size_t keylen;
  576|       |
  577|      3|    if (ctr->cipher_ctr == NULL) {
  ------------------
  |  Branch (577:9): [True: 0, False: 3]
  ------------------
  578|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_CIPHER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  579|      0|        return 0;
  580|      0|    }
  581|      3|    ctr->keylen = keylen = EVP_CIPHER_get_key_length(ctr->cipher_ctr);
  582|      3|    if (ctr->ctx_ecb == NULL)
  ------------------
  |  Branch (582:9): [True: 3, False: 0]
  ------------------
  583|      3|        ctr->ctx_ecb = EVP_CIPHER_CTX_new();
  584|      3|    if (ctr->ctx_ctr == NULL)
  ------------------
  |  Branch (584:9): [True: 3, False: 0]
  ------------------
  585|      3|        ctr->ctx_ctr = EVP_CIPHER_CTX_new();
  586|      3|    if (ctr->ctx_ecb == NULL || ctr->ctx_ctr == NULL) {
  ------------------
  |  Branch (586:9): [True: 0, False: 3]
  |  Branch (586:33): [True: 0, False: 3]
  ------------------
  587|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  588|      0|        goto err;
  589|      0|    }
  590|       |
  591|      3|    if (!EVP_CipherInit_ex(ctr->ctx_ecb,
  ------------------
  |  Branch (591:9): [True: 0, False: 3]
  ------------------
  592|      3|            ctr->cipher_ecb, NULL, NULL, NULL, 1)
  593|      3|        || !EVP_CipherInit_ex(ctr->ctx_ctr,
  ------------------
  |  Branch (593:12): [True: 0, False: 3]
  ------------------
  594|      3|            ctr->cipher_ctr, NULL, NULL, NULL, 1)) {
  595|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_INITIALISE_CIPHERS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  596|      0|        goto err;
  597|      0|    }
  598|       |
  599|      3|    drbg->strength = (unsigned int)(keylen * 8);
  600|      3|    drbg->seedlen = keylen + 16;
  601|       |
  602|       |#ifdef FIPS_MODULE
  603|       |    /*
  604|       |     * FIPS requires that we use a derivation function since our
  605|       |     * entropy source is outside the fips boundary
  606|       |     */
  607|       |    if (ctr->use_df == 0) {
  608|       |        ERR_raise_data(ERR_LIB_PROV, PROV_R_DERIVATION_FUNCTION_INIT_FAILED,
  609|       |            "FIPS requires the use of a derivation function");
  610|       |        goto err;
  611|       |    }
  612|       |#endif
  613|       |
  614|      3|    if (ctr->use_df) {
  ------------------
  |  Branch (614:9): [True: 3, False: 0]
  ------------------
  615|       |        /* df initialisation */
  616|      3|        static const unsigned char df_key[32] = {
  617|      3|            0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
  618|      3|            0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
  619|      3|            0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
  620|      3|            0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
  621|      3|        };
  622|       |
  623|      3|        if (ctr->ctx_df == NULL)
  ------------------
  |  Branch (623:13): [True: 3, False: 0]
  ------------------
  624|      3|            ctr->ctx_df = EVP_CIPHER_CTX_new();
  625|      3|        if (ctr->ctx_df == NULL) {
  ------------------
  |  Branch (625:13): [True: 0, False: 3]
  ------------------
  626|      0|            ERR_raise(ERR_LIB_PROV, ERR_R_EVP_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  627|      0|            goto err;
  628|      0|        }
  629|       |        /* Set key schedule for df_key */
  630|      3|        if (!EVP_CipherInit_ex(ctr->ctx_df,
  ------------------
  |  Branch (630:13): [True: 0, False: 3]
  ------------------
  631|      3|                ctr->cipher_ecb, NULL, df_key, NULL, 1)) {
  632|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_DERIVATION_FUNCTION_INIT_FAILED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  633|      0|            goto err;
  634|      0|        }
  635|      3|    }
  636|      3|    return drbg_ctr_init_lengths(drbg);
  637|       |
  638|      0|err:
  639|      0|    EVP_CIPHER_CTX_free(ctr->ctx_ecb);
  640|      0|    EVP_CIPHER_CTX_free(ctr->ctx_ctr);
  641|       |    ctr->ctx_ecb = ctr->ctx_ctr = NULL;
  642|      0|    return 0;
  643|      3|}
drbg_ctr.c:drbg_ctr_generate_wrapper:
  481|   114k|{
  482|   114k|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
  483|       |
  484|   114k|    return ossl_prov_drbg_generate(drbg, out, outlen, strength,
  485|   114k|        prediction_resistance, adin, adin_len);
  486|   114k|}
drbg_ctr.c:drbg_ctr_settable_ctx_params:
  821|      3|{
  822|      3|    return drbg_ctr_set_ctx_params_list;
  823|      3|}
drbg_ctr.c:drbg_ctr_get_ctx_params:
  692|   263k|{
  693|   263k|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
  694|   263k|    PROV_DRBG_CTR *ctr;
  695|   263k|    struct drbg_ctr_get_ctx_params_st p;
  696|   263k|    int ret = 0, complete = 0;
  697|       |
  698|   263k|    if (drbg == NULL || !drbg_ctr_get_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (698:9): [True: 0, False: 263k]
  |  Branch (698:25): [True: 0, False: 263k]
  ------------------
  699|      0|        return 0;
  700|       |
  701|   263k|    if (!ossl_drbg_get_ctx_params_no_lock(drbg, &p, params, &complete))
  ------------------
  |  Branch (701:9): [True: 0, False: 263k]
  ------------------
  702|      0|        return 0;
  703|       |
  704|   263k|    if (complete)
  ------------------
  |  Branch (704:9): [True: 229k, False: 34.6k]
  ------------------
  705|   229k|        return 1;
  706|       |
  707|  34.6k|    ctr = (PROV_DRBG_CTR *)drbg->data;
  708|       |
  709|  34.6k|    if (drbg->lock != NULL && !CRYPTO_THREAD_read_lock(drbg->lock))
  ------------------
  |  Branch (709:9): [True: 34.6k, False: 0]
  |  Branch (709:31): [True: 0, False: 34.6k]
  ------------------
  710|      0|        return 0;
  711|       |
  712|  34.6k|    if (p.df != NULL && !OSSL_PARAM_set_int(p.df, ctr->use_df))
  ------------------
  |  Branch (712:9): [True: 0, False: 34.6k]
  |  Branch (712:25): [True: 0, False: 0]
  ------------------
  713|      0|        goto err;
  714|       |
  715|  34.6k|    if (p.cipher != NULL) {
  ------------------
  |  Branch (715:9): [True: 0, False: 34.6k]
  ------------------
  716|      0|        if (ctr->cipher_ctr == NULL
  ------------------
  |  Branch (716:13): [True: 0, False: 0]
  ------------------
  717|      0|            || !OSSL_PARAM_set_utf8_string(p.cipher,
  ------------------
  |  Branch (717:16): [True: 0, False: 0]
  ------------------
  718|      0|                EVP_CIPHER_get0_name(ctr->cipher_ctr)))
  719|      0|            goto err;
  720|      0|    }
  721|       |
  722|  34.6k|    ret = ossl_drbg_get_ctx_params(drbg, &p);
  723|  34.6k|err:
  724|  34.6k|    if (drbg->lock != NULL)
  ------------------
  |  Branch (724:9): [True: 34.6k, False: 0]
  ------------------
  725|  34.6k|        CRYPTO_THREAD_unlock(drbg->lock);
  726|       |
  727|  34.6k|    return ret;
  728|  34.6k|}

drbg_ctr.c:drbg_ctr_set_ctx_params_decoder:
  383|      3|{
  384|      3|    const char *s;
  385|       |
  386|      3|    memset(r, 0, sizeof(*r));
  387|      3|    if (p != NULL)
  ------------------
  |  Branch (387:9): [True: 3, False: 0]
  ------------------
  388|     15|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (388:16): [True: 12, False: 3]
  ------------------
  389|     12|            switch(s[0]) {
  390|      0|            default:
  ------------------
  |  Branch (390:13): [True: 0, False: 12]
  ------------------
  391|      0|                break;
  392|      3|            case 'c':
  ------------------
  |  Branch (392:13): [True: 3, False: 9]
  ------------------
  393|      3|                if (ossl_likely(strcmp("ipher", s + 1) == 0)) {
  ------------------
  |  |   22|      3|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3, False: 0]
  |  |  ------------------
  ------------------
  394|       |                    /* OSSL_DRBG_PARAM_CIPHER */
  395|      3|                    if (ossl_unlikely(r->cipher != NULL)) {
  ------------------
  |  |   23|      3|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3]
  |  |  ------------------
  ------------------
  396|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  397|      0|                                       "param %s is repeated", s);
  398|      0|                        return 0;
  399|      0|                    }
  400|      3|                    r->cipher = (OSSL_PARAM *)p;
  401|      3|                }
  402|      3|                break;
  403|      3|            case 'p':
  ------------------
  |  Branch (403:13): [True: 0, False: 12]
  ------------------
  404|      0|                switch(s[1]) {
  405|      0|                default:
  ------------------
  |  Branch (405:17): [True: 0, False: 0]
  ------------------
  406|      0|                    break;
  407|      0|                case 'r':
  ------------------
  |  Branch (407:17): [True: 0, False: 0]
  ------------------
  408|      0|                    switch(s[2]) {
  409|      0|                    default:
  ------------------
  |  Branch (409:21): [True: 0, False: 0]
  ------------------
  410|      0|                        break;
  411|      0|                    case 'o':
  ------------------
  |  Branch (411:21): [True: 0, False: 0]
  ------------------
  412|      0|                        switch(s[3]) {
  413|      0|                        default:
  ------------------
  |  Branch (413:25): [True: 0, False: 0]
  ------------------
  414|      0|                            break;
  415|      0|                        case 'p':
  ------------------
  |  Branch (415:25): [True: 0, False: 0]
  ------------------
  416|      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]
  |  |  ------------------
  ------------------
  417|       |                                /* OSSL_DRBG_PARAM_PROPERTIES */
  418|      0|                                if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  419|      0|                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  420|      0|                                                   "param %s is repeated", s);
  421|      0|                                    return 0;
  422|      0|                                }
  423|      0|                                r->propq = (OSSL_PARAM *)p;
  424|      0|                            }
  425|      0|                            break;
  426|      0|                        case 'v':
  ------------------
  |  Branch (426:25): [True: 0, False: 0]
  ------------------
  427|      0|                            if (ossl_likely(strcmp("ider-name", s + 4) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  428|       |                                /* OSSL_PROV_PARAM_CORE_PROV_NAME */
  429|      0|                                if (ossl_unlikely(r->prov != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  430|      0|                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  431|      0|                                                   "param %s is repeated", s);
  432|      0|                                    return 0;
  433|      0|                                }
  434|      0|                                r->prov = (OSSL_PARAM *)p;
  435|      0|                            }
  436|      0|                        }
  437|      0|                    }
  438|      0|                }
  439|      0|                break;
  440|      6|            case 'r':
  ------------------
  |  Branch (440:13): [True: 6, False: 6]
  ------------------
  441|      6|                switch(s[1]) {
  442|      0|                default:
  ------------------
  |  Branch (442:17): [True: 0, False: 6]
  ------------------
  443|      0|                    break;
  444|      6|                case 'e':
  ------------------
  |  Branch (444:17): [True: 6, False: 0]
  ------------------
  445|      6|                    switch(s[2]) {
  446|      0|                    default:
  ------------------
  |  Branch (446:21): [True: 0, False: 6]
  ------------------
  447|      0|                        break;
  448|      6|                    case 's':
  ------------------
  |  Branch (448:21): [True: 6, False: 0]
  ------------------
  449|      6|                        switch(s[3]) {
  450|      0|                        default:
  ------------------
  |  Branch (450:25): [True: 0, False: 6]
  ------------------
  451|      0|                            break;
  452|      6|                        case 'e':
  ------------------
  |  Branch (452:25): [True: 6, False: 0]
  ------------------
  453|      6|                            switch(s[4]) {
  454|      0|                            default:
  ------------------
  |  Branch (454:29): [True: 0, False: 6]
  ------------------
  455|      0|                                break;
  456|      6|                            case 'e':
  ------------------
  |  Branch (456:29): [True: 6, False: 0]
  ------------------
  457|      6|                                switch(s[5]) {
  458|      0|                                default:
  ------------------
  |  Branch (458:33): [True: 0, False: 6]
  ------------------
  459|      0|                                    break;
  460|      6|                                case 'd':
  ------------------
  |  Branch (460:33): [True: 6, False: 0]
  ------------------
  461|      6|                                    switch(s[6]) {
  462|      0|                                    default:
  ------------------
  |  Branch (462:37): [True: 0, False: 6]
  ------------------
  463|      0|                                        break;
  464|      6|                                    case '_':
  ------------------
  |  Branch (464:37): [True: 6, False: 0]
  ------------------
  465|      6|                                        switch(s[7]) {
  466|      0|                                        default:
  ------------------
  |  Branch (466:41): [True: 0, False: 6]
  ------------------
  467|      0|                                            break;
  468|      3|                                        case 'r':
  ------------------
  |  Branch (468:41): [True: 3, False: 3]
  ------------------
  469|      3|                                            if (ossl_likely(strcmp("equests", s + 8) == 0)) {
  ------------------
  |  |   22|      3|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3, False: 0]
  |  |  ------------------
  ------------------
  470|       |                                                /* OSSL_DRBG_PARAM_RESEED_REQUESTS */
  471|      3|                                                if (ossl_unlikely(r->reseed_req != NULL)) {
  ------------------
  |  |   23|      3|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3]
  |  |  ------------------
  ------------------
  472|      0|                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  473|      0|                                                                   "param %s is repeated", s);
  474|      0|                                                    return 0;
  475|      0|                                                }
  476|      3|                                                r->reseed_req = (OSSL_PARAM *)p;
  477|      3|                                            }
  478|      3|                                            break;
  479|      3|                                        case 't':
  ------------------
  |  Branch (479:41): [True: 3, False: 3]
  ------------------
  480|      3|                                            if (ossl_likely(strcmp("ime_interval", s + 8) == 0)) {
  ------------------
  |  |   22|      3|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3, False: 0]
  |  |  ------------------
  ------------------
  481|       |                                                /* OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL */
  482|      3|                                                if (ossl_unlikely(r->reseed_time != NULL)) {
  ------------------
  |  |   23|      3|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3]
  |  |  ------------------
  ------------------
  483|      0|                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  484|      0|                                                                   "param %s is repeated", s);
  485|      0|                                                    return 0;
  486|      0|                                                }
  487|      3|                                                r->reseed_time = (OSSL_PARAM *)p;
  488|      3|                                            }
  489|      6|                                        }
  490|      6|                                    }
  491|      6|                                }
  492|      6|                            }
  493|      6|                        }
  494|      6|                    }
  495|      6|                }
  496|      6|                break;
  497|      6|            case 'u':
  ------------------
  |  Branch (497:13): [True: 3, False: 9]
  ------------------
  498|      3|# if !defined(FIPS_MODULE)
  499|      3|                if (ossl_likely(strcmp("se_derivation_function", s + 1) == 0)) {
  ------------------
  |  |   22|      3|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3, False: 0]
  |  |  ------------------
  ------------------
  500|       |                    /* OSSL_DRBG_PARAM_USE_DF */
  501|      3|                    if (ossl_unlikely(r->df != NULL)) {
  ------------------
  |  |   23|      3|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3]
  |  |  ------------------
  ------------------
  502|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  503|      0|                                       "param %s is repeated", s);
  504|      0|                        return 0;
  505|      0|                    }
  506|      3|                    r->df = (OSSL_PARAM *)p;
  507|      3|                }
  508|      3|# endif
  509|      3|                break;
  510|     12|            }
  511|      3|    return 1;
  512|      3|}
drbg_ctr.c:drbg_ctr_get_ctx_params_decoder:
   63|   263k|{
   64|   263k|    const char *s;
   65|       |
   66|   263k|    memset(r, 0, sizeof(*r));
   67|   263k|    if (p != NULL)
  ------------------
  |  Branch (67:9): [True: 263k, False: 0]
  ------------------
   68|   527k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (68:16): [True: 263k, False: 263k]
  ------------------
   69|   263k|            switch(s[0]) {
   70|      0|            default:
  ------------------
  |  Branch (70:13): [True: 0, False: 263k]
  ------------------
   71|      0|                break;
   72|      0|            case 'c':
  ------------------
  |  Branch (72:13): [True: 0, False: 263k]
  ------------------
   73|      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]
  |  |  ------------------
  ------------------
   74|       |                    /* OSSL_DRBG_PARAM_CIPHER */
   75|      0|                    if (ossl_unlikely(r->cipher != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   76|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   77|      0|                                       "param %s is repeated", s);
   78|      0|                        return 0;
   79|      0|                    }
   80|      0|                    r->cipher = (OSSL_PARAM *)p;
   81|      0|                }
   82|      0|                break;
   83|      0|            case 'f':
  ------------------
  |  Branch (83:13): [True: 0, False: 263k]
  ------------------
   84|       |# if defined(FIPS_MODULE)
   85|       |                if (ossl_likely(strcmp("ips-indicator", s + 1) == 0)) {
   86|       |                    /* OSSL_KDF_PARAM_FIPS_APPROVED_INDICATOR */
   87|       |                    if (ossl_unlikely(r->ind != NULL)) {
   88|       |                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
   89|       |                                       "param %s is repeated", s);
   90|       |                        return 0;
   91|       |                    }
   92|       |                    r->ind = (OSSL_PARAM *)p;
   93|       |                }
   94|       |# endif
   95|      0|                break;
   96|   114k|            case 'm':
  ------------------
  |  Branch (96:13): [True: 114k, False: 149k]
  ------------------
   97|   114k|                switch(s[1]) {
   98|      0|                default:
  ------------------
  |  Branch (98:17): [True: 0, False: 114k]
  ------------------
   99|      0|                    break;
  100|   114k|                case 'a':
  ------------------
  |  Branch (100:17): [True: 114k, False: 0]
  ------------------
  101|   114k|                    switch(s[2]) {
  102|      0|                    default:
  ------------------
  |  Branch (102:21): [True: 0, False: 114k]
  ------------------
  103|      0|                        break;
  104|   114k|                    case 'x':
  ------------------
  |  Branch (104:21): [True: 114k, False: 0]
  ------------------
  105|   114k|                        switch(s[3]) {
  106|      0|                        default:
  ------------------
  |  Branch (106:25): [True: 0, False: 114k]
  ------------------
  107|      0|                            break;
  108|   114k|                        case '_':
  ------------------
  |  Branch (108:25): [True: 114k, False: 0]
  ------------------
  109|   114k|                            switch(s[4]) {
  110|      0|                            default:
  ------------------
  |  Branch (110:29): [True: 0, False: 114k]
  ------------------
  111|      0|                                break;
  112|      0|                            case 'a':
  ------------------
  |  Branch (112:29): [True: 0, False: 114k]
  ------------------
  113|      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]
  |  |  ------------------
  ------------------
  114|       |                                    /* OSSL_DRBG_PARAM_MAX_ADINLEN */
  115|      0|                                    if (ossl_unlikely(r->maxadlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  116|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  117|      0|                                                       "param %s is repeated", s);
  118|      0|                                        return 0;
  119|      0|                                    }
  120|      0|                                    r->maxadlen = (OSSL_PARAM *)p;
  121|      0|                                }
  122|      0|                                break;
  123|      0|                            case 'e':
  ------------------
  |  Branch (123:29): [True: 0, False: 114k]
  ------------------
  124|      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]
  |  |  ------------------
  ------------------
  125|       |                                    /* OSSL_DRBG_PARAM_MAX_ENTROPYLEN */
  126|      0|                                    if (ossl_unlikely(r->maxentlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  127|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  128|      0|                                                       "param %s is repeated", s);
  129|      0|                                        return 0;
  130|      0|                                    }
  131|      0|                                    r->maxentlen = (OSSL_PARAM *)p;
  132|      0|                                }
  133|      0|                                break;
  134|      0|                            case 'n':
  ------------------
  |  Branch (134:29): [True: 0, False: 114k]
  ------------------
  135|      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]
  |  |  ------------------
  ------------------
  136|       |                                    /* OSSL_DRBG_PARAM_MAX_NONCELEN */
  137|      0|                                    if (ossl_unlikely(r->maxnonlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  138|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  139|      0|                                                       "param %s is repeated", s);
  140|      0|                                        return 0;
  141|      0|                                    }
  142|      0|                                    r->maxnonlen = (OSSL_PARAM *)p;
  143|      0|                                }
  144|      0|                                break;
  145|      0|                            case 'p':
  ------------------
  |  Branch (145:29): [True: 0, False: 114k]
  ------------------
  146|      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]
  |  |  ------------------
  ------------------
  147|       |                                    /* OSSL_DRBG_PARAM_MAX_PERSLEN */
  148|      0|                                    if (ossl_unlikely(r->maxperlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  149|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  150|      0|                                                       "param %s is repeated", s);
  151|      0|                                        return 0;
  152|      0|                                    }
  153|      0|                                    r->maxperlen = (OSSL_PARAM *)p;
  154|      0|                                }
  155|      0|                                break;
  156|   114k|                            case 'r':
  ------------------
  |  Branch (156:29): [True: 114k, False: 0]
  ------------------
  157|   114k|                                if (ossl_likely(strcmp("equest", s + 5) == 0)) {
  ------------------
  |  |   22|   114k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 114k, False: 0]
  |  |  ------------------
  ------------------
  158|       |                                    /* OSSL_RAND_PARAM_MAX_REQUEST */
  159|   114k|                                    if (ossl_unlikely(r->maxreq != NULL)) {
  ------------------
  |  |   23|   114k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 114k]
  |  |  ------------------
  ------------------
  160|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  161|      0|                                                       "param %s is repeated", s);
  162|      0|                                        return 0;
  163|      0|                                    }
  164|   114k|                                    r->maxreq = (OSSL_PARAM *)p;
  165|   114k|                                }
  166|   114k|                            }
  167|   114k|                        }
  168|   114k|                    }
  169|   114k|                    break;
  170|   114k|                case 'i':
  ------------------
  |  Branch (170:17): [True: 0, False: 114k]
  ------------------
  171|      0|                    switch(s[2]) {
  172|      0|                    default:
  ------------------
  |  Branch (172:21): [True: 0, False: 0]
  ------------------
  173|      0|                        break;
  174|      0|                    case 'n':
  ------------------
  |  Branch (174:21): [True: 0, False: 0]
  ------------------
  175|      0|                        switch(s[3]) {
  176|      0|                        default:
  ------------------
  |  Branch (176:25): [True: 0, False: 0]
  ------------------
  177|      0|                            break;
  178|      0|                        case '_':
  ------------------
  |  Branch (178:25): [True: 0, False: 0]
  ------------------
  179|      0|                            switch(s[4]) {
  180|      0|                            default:
  ------------------
  |  Branch (180:29): [True: 0, False: 0]
  ------------------
  181|      0|                                break;
  182|      0|                            case 'e':
  ------------------
  |  Branch (182:29): [True: 0, False: 0]
  ------------------
  183|      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]
  |  |  ------------------
  ------------------
  184|       |                                    /* OSSL_DRBG_PARAM_MIN_ENTROPYLEN */
  185|      0|                                    if (ossl_unlikely(r->minentlen != 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,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  187|      0|                                                       "param %s is repeated", s);
  188|      0|                                        return 0;
  189|      0|                                    }
  190|      0|                                    r->minentlen = (OSSL_PARAM *)p;
  191|      0|                                }
  192|      0|                                break;
  193|      0|                            case 'n':
  ------------------
  |  Branch (193:29): [True: 0, False: 0]
  ------------------
  194|      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]
  |  |  ------------------
  ------------------
  195|       |                                    /* OSSL_DRBG_PARAM_MIN_NONCELEN */
  196|      0|                                    if (ossl_unlikely(r->minnonlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  197|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  198|      0|                                                       "param %s is repeated", s);
  199|      0|                                        return 0;
  200|      0|                                    }
  201|      0|                                    r->minnonlen = (OSSL_PARAM *)p;
  202|      0|                                }
  203|      0|                            }
  204|      0|                        }
  205|      0|                    }
  206|   114k|                }
  207|   114k|                break;
  208|   114k|            case 'r':
  ------------------
  |  Branch (208:13): [True: 114k, False: 149k]
  ------------------
  209|   114k|                switch(s[1]) {
  210|      0|                default:
  ------------------
  |  Branch (210:17): [True: 0, False: 114k]
  ------------------
  211|      0|                    break;
  212|   114k|                case 'e':
  ------------------
  |  Branch (212:17): [True: 114k, False: 0]
  ------------------
  213|   114k|                    switch(s[2]) {
  214|      0|                    default:
  ------------------
  |  Branch (214:21): [True: 0, False: 114k]
  ------------------
  215|      0|                        break;
  216|   114k|                    case 's':
  ------------------
  |  Branch (216:21): [True: 114k, False: 0]
  ------------------
  217|   114k|                        switch(s[3]) {
  218|      0|                        default:
  ------------------
  |  Branch (218:25): [True: 0, False: 114k]
  ------------------
  219|      0|                            break;
  220|   114k|                        case 'e':
  ------------------
  |  Branch (220:25): [True: 114k, False: 0]
  ------------------
  221|   114k|                            switch(s[4]) {
  222|      0|                            default:
  ------------------
  |  Branch (222:29): [True: 0, False: 114k]
  ------------------
  223|      0|                                break;
  224|   114k|                            case 'e':
  ------------------
  |  Branch (224:29): [True: 114k, False: 0]
  ------------------
  225|   114k|                                switch(s[5]) {
  226|      0|                                default:
  ------------------
  |  Branch (226:33): [True: 0, False: 114k]
  ------------------
  227|      0|                                    break;
  228|   114k|                                case 'd':
  ------------------
  |  Branch (228:33): [True: 114k, False: 0]
  ------------------
  229|   114k|                                    switch(s[6]) {
  230|      0|                                    default:
  ------------------
  |  Branch (230:37): [True: 0, False: 114k]
  ------------------
  231|      0|                                        break;
  232|   114k|                                    case '_':
  ------------------
  |  Branch (232:37): [True: 114k, False: 0]
  ------------------
  233|   114k|                                        switch(s[7]) {
  234|      0|                                        default:
  ------------------
  |  Branch (234:41): [True: 0, False: 114k]
  ------------------
  235|      0|                                            break;
  236|   114k|                                        case 'c':
  ------------------
  |  Branch (236:41): [True: 114k, False: 0]
  ------------------
  237|   114k|                                            if (ossl_likely(strcmp("ounter", s + 8) == 0)) {
  ------------------
  |  |   22|   114k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 114k, False: 0]
  |  |  ------------------
  ------------------
  238|       |                                                /* OSSL_DRBG_PARAM_RESEED_COUNTER */
  239|   114k|                                                if (ossl_unlikely(r->reseed_cnt != NULL)) {
  ------------------
  |  |   23|   114k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 114k]
  |  |  ------------------
  ------------------
  240|      0|                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  241|      0|                                                                   "param %s is repeated", s);
  242|      0|                                                    return 0;
  243|      0|                                                }
  244|   114k|                                                r->reseed_cnt = (OSSL_PARAM *)p;
  245|   114k|                                            }
  246|   114k|                                            break;
  247|   114k|                                        case 'r':
  ------------------
  |  Branch (247:41): [True: 0, False: 114k]
  ------------------
  248|      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]
  |  |  ------------------
  ------------------
  249|       |                                                /* OSSL_DRBG_PARAM_RESEED_REQUESTS */
  250|      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]
  |  |  ------------------
  ------------------
  251|      0|                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  252|      0|                                                                   "param %s is repeated", s);
  253|      0|                                                    return 0;
  254|      0|                                                }
  255|      0|                                                r->reseed_req = (OSSL_PARAM *)p;
  256|      0|                                            }
  257|      0|                                            break;
  258|      0|                                        case 't':
  ------------------
  |  Branch (258:41): [True: 0, False: 114k]
  ------------------
  259|      0|                                            switch(s[8]) {
  260|      0|                                            default:
  ------------------
  |  Branch (260:45): [True: 0, False: 0]
  ------------------
  261|      0|                                                break;
  262|      0|                                            case 'i':
  ------------------
  |  Branch (262:45): [True: 0, False: 0]
  ------------------
  263|      0|                                                switch(s[9]) {
  264|      0|                                                default:
  ------------------
  |  Branch (264:49): [True: 0, False: 0]
  ------------------
  265|      0|                                                    break;
  266|      0|                                                case 'm':
  ------------------
  |  Branch (266:49): [True: 0, False: 0]
  ------------------
  267|      0|                                                    switch(s[10]) {
  268|      0|                                                    default:
  ------------------
  |  Branch (268:53): [True: 0, False: 0]
  ------------------
  269|      0|                                                        break;
  270|      0|                                                    case 'e':
  ------------------
  |  Branch (270:53): [True: 0, False: 0]
  ------------------
  271|      0|                                                        switch(s[11]) {
  272|      0|                                                        default:
  ------------------
  |  Branch (272:57): [True: 0, False: 0]
  ------------------
  273|      0|                                                            break;
  274|      0|                                                        case '_':
  ------------------
  |  Branch (274:57): [True: 0, False: 0]
  ------------------
  275|      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]
  |  |  ------------------
  ------------------
  276|       |                                                                /* OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL */
  277|      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]
  |  |  ------------------
  ------------------
  278|      0|                                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  279|      0|                                                                                   "param %s is repeated", s);
  280|      0|                                                                    return 0;
  281|      0|                                                                }
  282|      0|                                                                r->reseed_int = (OSSL_PARAM *)p;
  283|      0|                                                            }
  284|      0|                                                            break;
  285|      0|                                                        case '\0':
  ------------------
  |  Branch (285:57): [True: 0, False: 0]
  ------------------
  286|      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]
  |  |  ------------------
  ------------------
  287|      0|                                                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  288|      0|                                                                               "param %s is repeated", s);
  289|      0|                                                                return 0;
  290|      0|                                                            }
  291|      0|                                                            r->reseed_time = (OSSL_PARAM *)p;
  292|      0|                                                        }
  293|      0|                                                    }
  294|      0|                                                }
  295|      0|                                            }
  296|   114k|                                        }
  297|   114k|                                    }
  298|   114k|                                }
  299|   114k|                            }
  300|   114k|                        }
  301|   114k|                    }
  302|   114k|                }
  303|   114k|                break;
  304|   114k|            case 's':
  ------------------
  |  Branch (304:13): [True: 34.6k, False: 229k]
  ------------------
  305|  34.6k|                switch(s[1]) {
  306|      0|                default:
  ------------------
  |  Branch (306:17): [True: 0, False: 34.6k]
  ------------------
  307|      0|                    break;
  308|  34.6k|                case 't':
  ------------------
  |  Branch (308:17): [True: 34.6k, False: 0]
  ------------------
  309|  34.6k|                    switch(s[2]) {
  310|      0|                    default:
  ------------------
  |  Branch (310:21): [True: 0, False: 34.6k]
  ------------------
  311|      0|                        break;
  312|  34.6k|                    case 'a':
  ------------------
  |  Branch (312:21): [True: 34.6k, False: 7]
  ------------------
  313|  34.6k|                        if (ossl_likely(strcmp("te", s + 3) == 0)) {
  ------------------
  |  |   22|  34.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 34.6k, False: 0]
  |  |  ------------------
  ------------------
  314|       |                            /* OSSL_RAND_PARAM_STATE */
  315|  34.6k|                            if (ossl_unlikely(r->state != NULL)) {
  ------------------
  |  |   23|  34.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 34.6k]
  |  |  ------------------
  ------------------
  316|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  317|      0|                                               "param %s is repeated", s);
  318|      0|                                return 0;
  319|      0|                            }
  320|  34.6k|                            r->state = (OSSL_PARAM *)p;
  321|  34.6k|                        }
  322|  34.6k|                        break;
  323|  34.6k|                    case 'r':
  ------------------
  |  Branch (323:21): [True: 7, False: 34.6k]
  ------------------
  324|      7|                        if (ossl_likely(strcmp("ength", s + 3) == 0)) {
  ------------------
  |  |   22|      7|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 7, False: 0]
  |  |  ------------------
  ------------------
  325|       |                            /* OSSL_RAND_PARAM_STRENGTH */
  326|      7|                            if (ossl_unlikely(r->str != NULL)) {
  ------------------
  |  |   23|      7|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7]
  |  |  ------------------
  ------------------
  327|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  328|      0|                                               "param %s is repeated", s);
  329|      0|                                return 0;
  330|      0|                            }
  331|      7|                            r->str = (OSSL_PARAM *)p;
  332|      7|                        }
  333|  34.6k|                    }
  334|  34.6k|                }
  335|  34.6k|                break;
  336|  34.6k|            case 'u':
  ------------------
  |  Branch (336:13): [True: 0, False: 263k]
  ------------------
  337|      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]
  |  |  ------------------
  ------------------
  338|       |                    /* OSSL_DRBG_PARAM_USE_DF */
  339|      0|                    if (ossl_unlikely(r->df != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  340|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  341|      0|                                       "param %s is repeated", s);
  342|      0|                        return 0;
  343|      0|                    }
  344|      0|                    r->df = (OSSL_PARAM *)p;
  345|      0|                }
  346|   263k|            }
  347|   263k|    return 1;
  348|   263k|}

seed_src.c:seed_src_new:
   49|      1|{
   50|      1|    PROV_SEED_SRC *s;
   51|       |
   52|      1|    if (parent != NULL) {
  ------------------
  |  Branch (52:9): [True: 0, False: 1]
  ------------------
   53|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_SEED_SOURCES_MUST_NOT_HAVE_A_PARENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   54|      0|        return NULL;
   55|      0|    }
   56|       |
   57|      1|    s = OPENSSL_zalloc(sizeof(*s));
  ------------------
  |  |  109|      1|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   58|      1|    if (s == NULL)
  ------------------
  |  Branch (58:9): [True: 0, False: 1]
  ------------------
   59|      0|        return NULL;
   60|       |
   61|      1|    s->provctx = provctx;
   62|      1|    s->state = EVP_RAND_STATE_UNINITIALISED;
  ------------------
  |  | 1249|      1|#define EVP_RAND_STATE_UNINITIALISED 0
  ------------------
   63|      1|    return s;
   64|      1|}
seed_src.c:seed_src_instantiate:
   75|      1|{
   76|      1|    PROV_SEED_SRC *s = (PROV_SEED_SRC *)vseed;
   77|       |
   78|      1|    s->state = EVP_RAND_STATE_READY;
  ------------------
  |  | 1250|      1|#define EVP_RAND_STATE_READY 1
  ------------------
   79|      1|    return 1;
   80|      1|}
seed_src.c:seed_src_enable_locking:
  212|      1|{
  213|      1|    return 1;
  214|      1|}
seed_src.c:seed_src_lock:
  217|     10|{
  218|     10|    return 1;
  219|     10|}
seed_src.c:seed_src_unlock:
  222|     10|{
  223|     10|}
seed_src.c:seed_src_get_ctx_params:
  147|      7|{
  148|      7|    PROV_SEED_SRC *s = (PROV_SEED_SRC *)vseed;
  149|      7|    struct seed_src_get_ctx_params_st p;
  150|       |
  151|      7|    if (s == NULL || !seed_src_get_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (151:9): [True: 0, False: 7]
  |  Branch (151:22): [True: 0, False: 7]
  ------------------
  152|      0|        return 0;
  153|       |
  154|      7|    if (p.state != NULL && !OSSL_PARAM_set_int(p.state, s->state))
  ------------------
  |  Branch (154:9): [True: 0, False: 7]
  |  Branch (154:28): [True: 0, False: 0]
  ------------------
  155|      0|        return 0;
  156|       |
  157|      7|    if (p.str != NULL && !OSSL_PARAM_set_uint(p.str, 1024))
  ------------------
  |  Branch (157:9): [True: 2, False: 5]
  |  Branch (157:26): [True: 0, False: 2]
  ------------------
  158|      0|        return 0;
  159|       |
  160|      7|    if (p.maxreq != NULL && !OSSL_PARAM_set_size_t(p.maxreq, 128))
  ------------------
  |  Branch (160:9): [True: 0, False: 7]
  |  Branch (160:29): [True: 0, False: 0]
  ------------------
  161|      0|        return 0;
  162|      7|    return 1;
  163|      7|}
seed_src.c:seed_get_seed:
  180|      1|{
  181|      1|    size_t ret = 0;
  182|      1|    size_t entropy_available = 0;
  183|      1|    RAND_POOL *pool;
  184|       |
  185|      1|    pool = ossl_rand_pool_new(entropy, 1, min_len, max_len);
  186|      1|    if (pool == NULL) {
  ------------------
  |  Branch (186:9): [True: 0, False: 1]
  ------------------
  187|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_RAND_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  188|      0|        return 0;
  189|      0|    }
  190|       |
  191|       |    /* Get entropy by polling system entropy sources. */
  192|      1|    entropy_available = ossl_pool_acquire_entropy(pool);
  193|       |
  194|      1|    if (entropy_available > 0
  ------------------
  |  Branch (194:9): [True: 1, False: 0]
  ------------------
  195|      1|        && ossl_rand_pool_adin_mix_in(pool, adin, adin_len)) {
  ------------------
  |  Branch (195:12): [True: 1, False: 0]
  ------------------
  196|      1|        ret = ossl_rand_pool_length(pool);
  197|      1|        *pout = ossl_rand_pool_detach(pool);
  198|      1|    } else {
  199|       |        ERR_raise(ERR_LIB_PROV, PROV_R_ENTROPY_SOURCE_STRENGTH_TOO_WEAK);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  200|      0|    }
  201|      1|    ossl_rand_pool_free(pool);
  202|      1|    return ret;
  203|      1|}
seed_src.c:seed_clear_seed:
  207|      1|{
  208|      1|    OPENSSL_secure_clear_free(out, outlen);
  ------------------
  |  |  150|      1|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  209|      1|}

seed_src.c:seed_src_get_ctx_params_decoder:
   33|      7|{
   34|      7|    const char *s;
   35|       |
   36|      7|    memset(r, 0, sizeof(*r));
   37|      7|    if (p != NULL)
  ------------------
  |  Branch (37:9): [True: 7, False: 0]
  ------------------
   38|     14|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (38:16): [True: 7, False: 7]
  ------------------
   39|      7|            switch(s[0]) {
   40|      5|            default:
  ------------------
  |  Branch (40:13): [True: 5, False: 2]
  ------------------
   41|      5|                break;
   42|      5|            case 'm':
  ------------------
  |  Branch (42:13): [True: 0, False: 7]
  ------------------
   43|      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]
  |  |  ------------------
  ------------------
   44|       |                    /* OSSL_RAND_PARAM_MAX_REQUEST */
   45|      0|                    if (ossl_unlikely(r->maxreq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   46|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   47|      0|                                       "param %s is repeated", s);
   48|      0|                        return 0;
   49|      0|                    }
   50|      0|                    r->maxreq = (OSSL_PARAM *)p;
   51|      0|                }
   52|      0|                break;
   53|      2|            case 's':
  ------------------
  |  Branch (53:13): [True: 2, False: 5]
  ------------------
   54|      2|                switch(s[1]) {
   55|      0|                default:
  ------------------
  |  Branch (55:17): [True: 0, False: 2]
  ------------------
   56|      0|                    break;
   57|      2|                case 't':
  ------------------
  |  Branch (57:17): [True: 2, False: 0]
  ------------------
   58|      2|                    switch(s[2]) {
   59|      0|                    default:
  ------------------
  |  Branch (59:21): [True: 0, False: 2]
  ------------------
   60|      0|                        break;
   61|      0|                    case 'a':
  ------------------
  |  Branch (61:21): [True: 0, False: 2]
  ------------------
   62|      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]
  |  |  ------------------
  ------------------
   63|       |                            /* OSSL_RAND_PARAM_STATE */
   64|      0|                            if (ossl_unlikely(r->state != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   65|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   66|      0|                                               "param %s is repeated", s);
   67|      0|                                return 0;
   68|      0|                            }
   69|      0|                            r->state = (OSSL_PARAM *)p;
   70|      0|                        }
   71|      0|                        break;
   72|      2|                    case 'r':
  ------------------
  |  Branch (72:21): [True: 2, False: 0]
  ------------------
   73|      2|                        if (ossl_likely(strcmp("ength", s + 3) == 0)) {
  ------------------
  |  |   22|      2|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2, False: 0]
  |  |  ------------------
  ------------------
   74|       |                            /* OSSL_RAND_PARAM_STRENGTH */
   75|      2|                            if (ossl_unlikely(r->str != NULL)) {
  ------------------
  |  |   23|      2|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2]
  |  |  ------------------
  ------------------
   76|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   77|      0|                                               "param %s is repeated", s);
   78|      0|                                return 0;
   79|      0|                            }
   80|      2|                            r->str = (OSSL_PARAM *)p;
   81|      2|                        }
   82|      2|                    }
   83|      2|                }
   84|      7|            }
   85|      7|    return 1;
   86|      7|}

ossl_rand_pool_init:
  566|      1|{
  567|      1|    size_t i;
  568|       |
  569|      5|    for (i = 0; i < OSSL_NELEM(random_devices); i++)
  ------------------
  |  |   14|      5|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (569:17): [True: 4, False: 1]
  ------------------
  570|      4|        random_devices[i].fd = -1;
  571|       |
  572|      1|    return 1;
  573|      1|}
ossl_pool_acquire_entropy:
  634|      1|{
  635|       |#if defined(OPENSSL_RAND_SEED_NONE)
  636|       |    return ossl_rand_pool_entropy_available(pool);
  637|       |#else
  638|      1|    size_t entropy_available = 0;
  639|       |
  640|      1|    (void)entropy_available; /* avoid compiler warning */
  641|       |
  642|      1|#if defined(OPENSSL_RAND_SEED_GETRANDOM)
  643|      1|    {
  644|      1|        size_t bytes_needed;
  645|      1|        unsigned char *buffer;
  646|      1|        ssize_t bytes;
  647|       |        /* Maximum allowed number of consecutive unsuccessful attempts */
  648|      1|        int attempts = 3;
  649|       |
  650|      1|        bytes_needed = ossl_rand_pool_bytes_needed(pool, 1 /*entropy_factor*/);
  651|      2|        while (bytes_needed != 0 && attempts-- > 0) {
  ------------------
  |  Branch (651:16): [True: 1, False: 1]
  |  Branch (651:37): [True: 1, False: 0]
  ------------------
  652|      1|            buffer = ossl_rand_pool_add_begin(pool, bytes_needed);
  653|      1|            bytes = syscall_random(buffer, bytes_needed);
  654|      1|            if (bytes > 0) {
  ------------------
  |  Branch (654:17): [True: 1, False: 0]
  ------------------
  655|      1|                ossl_rand_pool_add_end(pool, bytes, 8 * bytes);
  656|      1|                bytes_needed -= bytes;
  657|      1|                attempts = 3; /* reset counter after successful attempt */
  658|      1|            } else if (bytes < 0 && errno != EINTR) {
  ------------------
  |  Branch (658:24): [True: 0, False: 0]
  |  Branch (658:37): [True: 0, False: 0]
  ------------------
  659|      0|                break;
  660|      0|            }
  661|      1|        }
  662|      1|    }
  663|      1|    entropy_available = ossl_rand_pool_entropy_available(pool);
  664|      1|    if (entropy_available > 0)
  ------------------
  |  Branch (664:9): [True: 1, False: 0]
  ------------------
  665|      1|        return entropy_available;
  666|      0|#endif
  667|       |
  668|      0|#if defined(OPENSSL_RAND_SEED_DEVRANDOM)
  669|      0|    if (wait_random_seeded()) {
  ------------------
  |  Branch (669:9): [True: 0, False: 0]
  ------------------
  670|      0|        size_t bytes_needed;
  671|      0|        unsigned char *buffer;
  672|      0|        size_t i;
  673|       |
  674|      0|        bytes_needed = ossl_rand_pool_bytes_needed(pool, 1 /*entropy_factor*/);
  675|      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 (675:21): [True: 0, False: 0]
  |  Branch (675:41): [True: 0, False: 0]
  ------------------
  676|      0|            i++) {
  677|      0|            ssize_t bytes = 0;
  678|       |            /* Maximum number of consecutive unsuccessful attempts */
  679|      0|            int attempts = 3;
  680|      0|            const int fd = get_random_device(i);
  681|       |
  682|      0|            if (fd == -1)
  ------------------
  |  Branch (682:17): [True: 0, False: 0]
  ------------------
  683|      0|                continue;
  684|       |
  685|      0|            while (bytes_needed != 0 && attempts-- > 0) {
  ------------------
  |  Branch (685:20): [True: 0, False: 0]
  |  Branch (685:41): [True: 0, False: 0]
  ------------------
  686|      0|                buffer = ossl_rand_pool_add_begin(pool, bytes_needed);
  687|      0|                bytes = read(fd, buffer, bytes_needed);
  688|       |
  689|      0|                if (bytes > 0) {
  ------------------
  |  Branch (689:21): [True: 0, False: 0]
  ------------------
  690|      0|                    ossl_rand_pool_add_end(pool, bytes, 8 * bytes);
  691|      0|                    bytes_needed -= bytes;
  692|      0|                    attempts = 3; /* reset counter on successful attempt */
  693|      0|                } else if (bytes < 0 && errno != EINTR) {
  ------------------
  |  Branch (693:28): [True: 0, False: 0]
  |  Branch (693:41): [True: 0, False: 0]
  ------------------
  694|      0|                    break;
  695|      0|                }
  696|      0|            }
  697|      0|            if (bytes < 0 || !keep_random_devices_open)
  ------------------
  |  Branch (697:17): [True: 0, False: 0]
  |  Branch (697:30): [True: 0, False: 0]
  ------------------
  698|      0|                close_random_device(i);
  699|       |
  700|      0|            bytes_needed = ossl_rand_pool_bytes_needed(pool, 1);
  701|      0|        }
  702|      0|        entropy_available = ossl_rand_pool_entropy_available(pool);
  703|      0|        if (entropy_available > 0)
  ------------------
  |  Branch (703:13): [True: 0, False: 0]
  ------------------
  704|      0|            return entropy_available;
  705|      0|    }
  706|      0|#endif
  707|       |
  708|       |#if defined(OPENSSL_RAND_SEED_RDTSC)
  709|       |    entropy_available = ossl_prov_acquire_entropy_from_tsc(pool);
  710|       |    if (entropy_available > 0)
  711|       |        return entropy_available;
  712|       |#endif
  713|       |
  714|       |#if defined(OPENSSL_RAND_SEED_RDCPU)
  715|       |    entropy_available = ossl_prov_acquire_entropy_from_cpu(pool);
  716|       |    if (entropy_available > 0)
  717|       |        return entropy_available;
  718|       |#endif
  719|       |
  720|       |#if defined(OPENSSL_RAND_SEED_EGD)
  721|       |    {
  722|       |        static const char *paths[] = { DEVRANDOM_EGD, NULL };
  723|       |        size_t bytes_needed;
  724|       |        unsigned char *buffer;
  725|       |        int i;
  726|       |
  727|       |        bytes_needed = ossl_rand_pool_bytes_needed(pool, 1 /*entropy_factor*/);
  728|       |        for (i = 0; bytes_needed > 0 && paths[i] != NULL; i++) {
  729|       |            size_t bytes = 0;
  730|       |            int num;
  731|       |
  732|       |            buffer = ossl_rand_pool_add_begin(pool, bytes_needed);
  733|       |            num = RAND_query_egd_bytes(paths[i],
  734|       |                buffer, (int)bytes_needed);
  735|       |            if (num == (int)bytes_needed)
  736|       |                bytes = bytes_needed;
  737|       |
  738|       |            ossl_rand_pool_add_end(pool, bytes, 8 * bytes);
  739|       |            bytes_needed = ossl_rand_pool_bytes_needed(pool, 1);
  740|       |        }
  741|       |        entropy_available = ossl_rand_pool_entropy_available(pool);
  742|       |        if (entropy_available > 0)
  743|       |            return entropy_available;
  744|       |    }
  745|       |#endif
  746|       |
  747|      0|    return ossl_rand_pool_entropy_available(pool);
  748|      0|#endif
  749|      0|}
rand_unix.c:syscall_random:
  333|      1|{
  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|      1|#if !defined(__DragonFly__) && !defined(__NetBSD__) && !defined(__FreeBSD__)
  357|      1|#if defined(__GNUC__) && __GNUC__ >= 2 && defined(__ELF__) && !defined(__hpux)
  358|      1|    extern int getentropy(void *buffer, size_t length) __attribute__((weak));
  359|       |
  360|      1|    if (getentropy != NULL) {
  ------------------
  |  Branch (360:9): [True: 1, False: 0]
  ------------------
  361|      1|        if (getentropy(buf, buflen) == 0)
  ------------------
  |  Branch (361:13): [True: 1, False: 0]
  ------------------
  362|      1|            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__) || defined(__EMSCRIPTEN__)
  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|      1|}

ecdsa_sig.c:ecdsa_newctx:
  164|  10.8k|{
  165|  10.8k|    PROV_ECDSA_CTX *ctx;
  166|       |
  167|  10.8k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (167:9): [True: 0, False: 10.8k]
  ------------------
  168|      0|        return NULL;
  169|       |
  170|       |#ifdef FIPS_MODULE
  171|       |    if (!ossl_deferred_self_test(PROV_LIBCTX_OF(provctx),
  172|       |            ST_ID_SIG_ECDSA_SHA256))
  173|       |        return NULL;
  174|       |#endif
  175|       |
  176|  10.8k|    ctx = OPENSSL_zalloc(sizeof(PROV_ECDSA_CTX));
  ------------------
  |  |  109|  10.8k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  177|  10.8k|    if (ctx == NULL)
  ------------------
  |  Branch (177:9): [True: 0, False: 10.8k]
  ------------------
  178|      0|        return NULL;
  179|       |
  180|  10.8k|    OSSL_FIPS_IND_INIT(ctx)
  181|  10.8k|    ctx->flag_allow_md = 1;
  182|       |#ifdef FIPS_MODULE
  183|       |    ctx->verify_message = 1;
  184|       |#endif
  185|  10.8k|    ctx->libctx = PROV_LIBCTX_OF(provctx);
  ------------------
  |  |   31|  10.8k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  186|  10.8k|    if (propq != NULL && (ctx->propq = OPENSSL_strdup(propq)) == NULL) {
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (186:9): [True: 0, False: 10.8k]
  |  Branch (186:26): [True: 0, False: 0]
  ------------------
  187|      0|        OPENSSL_free(ctx);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  188|       |        ctx = NULL;
  189|      0|    }
  190|  10.8k|    return ctx;
  191|  10.8k|}
ecdsa_sig.c:ecdsa_signverify_init:
  303|  10.8k|{
  304|  10.8k|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (304:9): [True: 0, False: 10.8k]
  ------------------
  305|  10.8k|        || ctx == NULL)
  ------------------
  |  Branch (305:12): [True: 0, False: 10.8k]
  ------------------
  306|      0|        return 0;
  307|       |
  308|  10.8k|    if (ec == NULL && ctx->ec == NULL) {
  ------------------
  |  Branch (308:9): [True: 0, False: 10.8k]
  |  Branch (308:23): [True: 0, False: 0]
  ------------------
  309|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_NO_KEY_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  310|      0|        return 0;
  311|      0|    }
  312|       |
  313|  10.8k|    if (ec != NULL) {
  ------------------
  |  Branch (313:9): [True: 10.8k, False: 0]
  ------------------
  314|  10.8k|        if (!EC_KEY_up_ref(ec))
  ------------------
  |  Branch (314:13): [True: 0, False: 10.8k]
  ------------------
  315|      0|            return 0;
  316|  10.8k|        EC_KEY_free(ctx->ec);
  317|  10.8k|        ctx->ec = ec;
  318|  10.8k|    }
  319|       |
  320|  10.8k|    ctx->operation = operation;
  321|       |
  322|  10.8k|    OSSL_FIPS_IND_SET_APPROVED(ctx)
  323|  10.8k|    if (!set_ctx_params(ctx, params))
  ------------------
  |  Branch (323:9): [True: 0, False: 10.8k]
  ------------------
  324|      0|        return 0;
  325|       |#ifdef FIPS_MODULE
  326|       |    if (!ossl_fips_ind_ec_key_check(OSSL_FIPS_IND_GET(ctx),
  327|       |            OSSL_FIPS_IND_SETTABLE0, ctx->libctx,
  328|       |            EC_KEY_get0_group(ctx->ec), desc,
  329|       |            (operation & (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG)) != 0))
  330|       |        return 0;
  331|       |#endif
  332|  10.8k|    return 1;
  333|  10.8k|}
ecdsa_sig.c:ecdsa_sign_directly:
  353|  7.25k|{
  354|  7.25k|    PROV_ECDSA_CTX *ctx = (PROV_ECDSA_CTX *)vctx;
  355|  7.25k|    int ret;
  356|  7.25k|    unsigned int sltmp;
  357|  7.25k|    size_t ecsize = ECDSA_size(ctx->ec);
  358|       |
  359|  7.25k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (359:9): [True: 0, False: 7.25k]
  ------------------
  360|      0|        return 0;
  361|       |
  362|  7.25k|    if (sig == NULL) {
  ------------------
  |  Branch (362:9): [True: 3.62k, False: 3.62k]
  ------------------
  363|  3.62k|        *siglen = ecsize;
  364|  3.62k|        return 1;
  365|  3.62k|    }
  366|       |
  367|       |#if !defined(OPENSSL_NO_ACVP_TESTS)
  368|       |    if (ctx->kattest && !ECDSA_sign_setup(ctx->ec, NULL, &ctx->kinv, &ctx->r))
  369|       |        return 0;
  370|       |#endif
  371|       |
  372|  3.62k|    if (sigsize < (size_t)ecsize)
  ------------------
  |  Branch (372:9): [True: 0, False: 3.62k]
  ------------------
  373|      0|        return 0;
  374|       |
  375|  3.62k|    if (ctx->mdsize != 0 && tbslen != ctx->mdsize)
  ------------------
  |  Branch (375:9): [True: 3.62k, False: 0]
  |  Branch (375:29): [True: 0, False: 3.62k]
  ------------------
  376|      0|        return 0;
  377|       |
  378|  3.62k|    if (ctx->nonce_type != 0) {
  ------------------
  |  Branch (378:9): [True: 0, False: 3.62k]
  ------------------
  379|      0|        const char *mdname = NULL;
  380|       |
  381|      0|        if (ctx->mdname[0] != '\0')
  ------------------
  |  Branch (381:13): [True: 0, False: 0]
  ------------------
  382|      0|            mdname = ctx->mdname;
  383|      0|        ret = ossl_ecdsa_deterministic_sign(tbs, (int)tbslen, sig, &sltmp,
  384|      0|            ctx->ec, ctx->nonce_type,
  385|      0|            mdname,
  386|      0|            ctx->libctx, ctx->propq);
  387|  3.62k|    } else {
  388|  3.62k|        ret = ECDSA_sign_ex(0, tbs, (int)tbslen, sig, &sltmp,
  389|  3.62k|            ctx->kinv, ctx->r, ctx->ec);
  390|  3.62k|    }
  391|  3.62k|    if (ret <= 0)
  ------------------
  |  Branch (391:9): [True: 0, False: 3.62k]
  ------------------
  392|      0|        return 0;
  393|       |
  394|  3.62k|    *siglen = sltmp;
  395|  3.62k|    return 1;
  396|  3.62k|}
ecdsa_sig.c:ecdsa_verify_set_sig:
  480|  3.62k|{
  481|  3.62k|    PROV_ECDSA_CTX *ctx = (PROV_ECDSA_CTX *)vctx;
  482|  3.62k|    OSSL_PARAM params[2];
  483|       |
  484|  3.62k|    params[0] = OSSL_PARAM_construct_octet_string(OSSL_SIGNATURE_PARAM_SIGNATURE,
  ------------------
  |  |  580|  3.62k|# define OSSL_SIGNATURE_PARAM_SIGNATURE "signature"
  ------------------
  485|  3.62k|        (unsigned char *)sig, siglen);
  486|  3.62k|    params[1] = OSSL_PARAM_construct_end();
  487|  3.62k|    return ecdsa_sigalg_set_ctx_params(ctx, params);
  488|  3.62k|}
ecdsa_sig.c:ecdsa_verify_directly:
  469|  3.62k|{
  470|  3.62k|    PROV_ECDSA_CTX *ctx = (PROV_ECDSA_CTX *)vctx;
  471|       |
  472|  3.62k|    if (!ossl_prov_is_running() || (ctx->mdsize != 0 && tbslen != ctx->mdsize))
  ------------------
  |  Branch (472:9): [True: 0, False: 3.62k]
  |  Branch (472:37): [True: 3.62k, False: 0]
  |  Branch (472:57): [True: 0, False: 3.62k]
  ------------------
  473|      0|        return 0;
  474|       |
  475|  3.62k|    return ECDSA_verify(0, tbs, (int)tbslen, sig, (int)siglen, ctx->ec);
  476|  3.62k|}
ecdsa_sig.c:ecdsa_digest_sign_init:
  573|  7.25k|{
  574|  7.25k|    return ecdsa_digest_signverify_init(vctx, mdname, ec, params,
  575|  7.25k|        EVP_PKEY_OP_SIGNMSG,
  ------------------
  |  | 1541|  7.25k|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  ------------------
  576|  7.25k|        "ECDSA Digest Sign Init");
  577|  7.25k|}
ecdsa_sig.c:ecdsa_digest_signverify_init:
  535|  10.8k|{
  536|  10.8k|    PROV_ECDSA_CTX *ctx = (PROV_ECDSA_CTX *)vctx;
  537|       |
  538|  10.8k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (538:9): [True: 0, False: 10.8k]
  ------------------
  539|      0|        return 0;
  540|       |
  541|       |#ifdef FIPS_MODULE
  542|       |    ctx->verify_message = 1;
  543|       |#endif
  544|  10.8k|    if (!ecdsa_signverify_init(vctx, ec, ecdsa_set_ctx_params, params,
  ------------------
  |  Branch (544:9): [True: 0, False: 10.8k]
  ------------------
  545|  10.8k|            operation, desc))
  546|      0|        return 0;
  547|       |
  548|  10.8k|    if (mdname != NULL
  ------------------
  |  Branch (548:9): [True: 10.8k, False: 0]
  ------------------
  549|       |        /* was ecdsa_setup_md already called in ecdsa_signverify_init()? */
  550|  10.8k|        && (mdname[0] == '\0' || OPENSSL_strcasecmp(ctx->mdname, mdname) != 0)
  ------------------
  |  Branch (550:13): [True: 0, False: 10.8k]
  |  Branch (550:34): [True: 3.62k, False: 7.25k]
  ------------------
  551|  3.62k|        && !ecdsa_setup_md(ctx, mdname, NULL, desc))
  ------------------
  |  Branch (551:12): [True: 0, False: 3.62k]
  ------------------
  552|      0|        return 0;
  553|       |
  554|  10.8k|    ctx->flag_allow_md = 0;
  555|       |
  556|  10.8k|    if (ctx->mdctx == NULL) {
  ------------------
  |  Branch (556:9): [True: 10.8k, False: 0]
  ------------------
  557|  10.8k|        ctx->mdctx = EVP_MD_CTX_new();
  558|  10.8k|        if (ctx->mdctx == NULL)
  ------------------
  |  Branch (558:13): [True: 0, False: 10.8k]
  ------------------
  559|      0|            goto error;
  560|  10.8k|    }
  561|       |
  562|  10.8k|    if (!EVP_DigestInit_ex2(ctx->mdctx, ctx->md, params))
  ------------------
  |  Branch (562:9): [True: 0, False: 10.8k]
  ------------------
  563|      0|        goto error;
  564|  10.8k|    return 1;
  565|      0|error:
  566|      0|    EVP_MD_CTX_free(ctx->mdctx);
  567|       |    ctx->mdctx = NULL;
  568|      0|    return 0;
  569|  10.8k|}
ecdsa_sig.c:ecdsa_setup_md:
  196|  10.8k|{
  197|  10.8k|    EVP_MD *md = NULL;
  198|  10.8k|    size_t mdname_len;
  199|  10.8k|    int md_nid, md_size;
  200|  10.8k|    WPACKET pkt;
  201|  10.8k|    unsigned char *aid = NULL;
  202|       |
  203|  10.8k|    if (mdname == NULL)
  ------------------
  |  Branch (203:9): [True: 0, False: 10.8k]
  ------------------
  204|      0|        return 1;
  205|       |
  206|  10.8k|    mdname_len = strlen(mdname);
  207|  10.8k|    if (mdname_len >= sizeof(ctx->mdname)) {
  ------------------
  |  Branch (207:9): [True: 0, False: 10.8k]
  ------------------
  208|      0|        ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_DIGEST,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_DIGEST,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_DIGEST,
  ------------------
  |  |   65|      0|#define PROV_R_INVALID_DIGEST 122
  ------------------
  209|      0|            "%s exceeds name buffer length", mdname);
  210|      0|        return 0;
  211|      0|    }
  212|  10.8k|    if (mdprops == NULL)
  ------------------
  |  Branch (212:9): [True: 3.62k, False: 7.25k]
  ------------------
  213|  3.62k|        mdprops = ctx->propq;
  214|  10.8k|    md = EVP_MD_fetch(ctx->libctx, mdname, mdprops);
  215|  10.8k|    if (md == NULL) {
  ------------------
  |  Branch (215:9): [True: 0, False: 10.8k]
  ------------------
  216|      0|        ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_DIGEST,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_DIGEST,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_DIGEST,
  ------------------
  |  |   65|      0|#define PROV_R_INVALID_DIGEST 122
  ------------------
  217|      0|            "%s could not be fetched", mdname);
  218|      0|        return 0;
  219|      0|    }
  220|  10.8k|    md_size = EVP_MD_get_size(md);
  221|  10.8k|    if (md_size <= 0) {
  ------------------
  |  Branch (221:9): [True: 0, False: 10.8k]
  ------------------
  222|      0|        ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_DIGEST,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_DIGEST,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                      ERR_raise_data(ERR_LIB_PROV, PROV_R_INVALID_DIGEST,
  ------------------
  |  |   65|      0|#define PROV_R_INVALID_DIGEST 122
  ------------------
  223|      0|            "%s has invalid md size %d", mdname, md_size);
  224|      0|        goto err;
  225|      0|    }
  226|  10.8k|    md_nid = ossl_digest_get_approved_nid(md);
  227|       |#ifdef FIPS_MODULE
  228|       |    if (md_nid == NID_undef) {
  229|       |        ERR_raise_data(ERR_LIB_PROV, PROV_R_DIGEST_NOT_ALLOWED,
  230|       |            "digest=%s", mdname);
  231|       |        goto err;
  232|       |    }
  233|       |#endif
  234|       |    /* XOF digests don't work */
  235|  10.8k|    if (EVP_MD_xof(md)) {
  ------------------
  |  Branch (235:9): [True: 0, False: 10.8k]
  ------------------
  236|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_XOF_DIGESTS_NOT_ALLOWED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  237|      0|        goto err;
  238|      0|    }
  239|       |
  240|       |#ifdef FIPS_MODULE
  241|       |    {
  242|       |        int sha1_allowed
  243|       |            = ((ctx->operation
  244|       |                   & (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG))
  245|       |                == 0);
  246|       |
  247|       |        if (!ossl_fips_ind_digest_sign_check(OSSL_FIPS_IND_GET(ctx),
  248|       |                OSSL_FIPS_IND_SETTABLE1,
  249|       |                ctx->libctx,
  250|       |                md_nid, sha1_allowed, 0, desc,
  251|       |                ossl_fips_config_signature_digest_check))
  252|       |            goto err;
  253|       |    }
  254|       |#endif
  255|       |
  256|  10.8k|    if (!ctx->flag_allow_md) {
  ------------------
  |  Branch (256:9): [True: 0, False: 10.8k]
  ------------------
  257|      0|        if (ctx->mdname[0] != '\0' && !EVP_MD_is_a(md, ctx->mdname)) {
  ------------------
  |  Branch (257:13): [True: 0, False: 0]
  |  Branch (257:39): [True: 0, False: 0]
  ------------------
  258|      0|            ERR_raise_data(ERR_LIB_PROV, PROV_R_DIGEST_NOT_ALLOWED,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, PROV_R_DIGEST_NOT_ALLOWED,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, PROV_R_DIGEST_NOT_ALLOWED,
  ------------------
  |  |   33|      0|#define PROV_R_DIGEST_NOT_ALLOWED 174
  ------------------
  259|      0|                "digest %s != %s", mdname, ctx->mdname);
  260|      0|            goto err;
  261|      0|        }
  262|      0|        EVP_MD_free(md);
  263|      0|        return 1;
  264|      0|    }
  265|       |
  266|  10.8k|    EVP_MD_CTX_free(ctx->mdctx);
  267|  10.8k|    EVP_MD_free(ctx->md);
  268|       |
  269|  10.8k|    ctx->aid_len = 0;
  270|  10.8k|#ifndef FIPS_MODULE
  271|  10.8k|    if (md_nid != NID_undef) {
  ------------------
  |  |   18|  10.8k|#define NID_undef                       0
  ------------------
  |  Branch (271:9): [True: 10.8k, False: 0]
  ------------------
  272|       |#else
  273|       |    {
  274|       |#endif
  275|  10.8k|        if (WPACKET_init_der(&pkt, ctx->aid_buf, sizeof(ctx->aid_buf))
  ------------------
  |  Branch (275:13): [True: 10.8k, False: 0]
  ------------------
  276|  10.8k|            && ossl_DER_w_algorithmIdentifier_ECDSA_with_MD(&pkt, -1, ctx->ec,
  ------------------
  |  Branch (276:16): [True: 10.8k, False: 0]
  ------------------
  277|  10.8k|                md_nid)
  278|  10.8k|            && WPACKET_finish(&pkt)) {
  ------------------
  |  Branch (278:16): [True: 10.8k, False: 0]
  ------------------
  279|  10.8k|            WPACKET_get_total_written(&pkt, &ctx->aid_len);
  280|  10.8k|            aid = WPACKET_get_curr(&pkt);
  281|  10.8k|        }
  282|  10.8k|        WPACKET_cleanup(&pkt);
  283|  10.8k|        if (aid != NULL && ctx->aid_len != 0)
  ------------------
  |  Branch (283:13): [True: 10.8k, False: 0]
  |  Branch (283:28): [True: 10.8k, False: 0]
  ------------------
  284|  10.8k|            memmove(ctx->aid_buf, aid, ctx->aid_len);
  285|  10.8k|    }
  286|       |
  287|  10.8k|    ctx->mdctx = NULL;
  288|  10.8k|    ctx->md = md;
  289|  10.8k|    ctx->mdsize = (size_t)md_size;
  290|  10.8k|    OPENSSL_strlcpy(ctx->mdname, mdname, sizeof(ctx->mdname));
  291|       |
  292|  10.8k|    return 1;
  293|      0|err:
  294|      0|    EVP_MD_free(md);
  295|      0|    return 0;
  296|  10.8k|}
ecdsa_sig.c:ecdsa_digest_signverify_update:
  581|  7.25k|{
  582|  7.25k|    PROV_ECDSA_CTX *ctx = (PROV_ECDSA_CTX *)vctx;
  583|       |
  584|  7.25k|    if (ctx == NULL || ctx->mdctx == NULL)
  ------------------
  |  Branch (584:9): [True: 0, False: 7.25k]
  |  Branch (584:24): [True: 0, False: 7.25k]
  ------------------
  585|      0|        return 0;
  586|       |    /* Sigalg implementations shouldn't do digest_sign */
  587|  7.25k|    if (ctx->flag_sigalg)
  ------------------
  |  Branch (587:9): [True: 0, False: 7.25k]
  ------------------
  588|      0|        return 0;
  589|       |
  590|  7.25k|    return ecdsa_signverify_message_update(vctx, data, datalen);
  591|  7.25k|}
ecdsa_sig.c:ecdsa_digest_sign_final:
  595|  7.25k|{
  596|  7.25k|    PROV_ECDSA_CTX *ctx = (PROV_ECDSA_CTX *)vctx;
  597|  7.25k|    int ok = 0;
  598|       |
  599|  7.25k|    if (ctx == NULL)
  ------------------
  |  Branch (599:9): [True: 0, False: 7.25k]
  ------------------
  600|      0|        return 0;
  601|       |    /* Sigalg implementations shouldn't do digest_sign */
  602|  7.25k|    if (ctx->flag_sigalg)
  ------------------
  |  Branch (602:9): [True: 0, False: 7.25k]
  ------------------
  603|      0|        return 0;
  604|       |
  605|  7.25k|    ok = ecdsa_sign_message_final(ctx, sig, siglen, sigsize);
  606|       |
  607|  7.25k|    ctx->flag_allow_md = 1;
  608|       |
  609|  7.25k|    return ok;
  610|  7.25k|}
ecdsa_sig.c:ecdsa_digest_verify_init:
  614|  3.62k|{
  615|  3.62k|    return ecdsa_digest_signverify_init(vctx, mdname, ec, params,
  616|  3.62k|        EVP_PKEY_OP_VERIFYMSG,
  ------------------
  |  | 1542|  3.62k|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  ------------------
  617|  3.62k|        "ECDSA Digest Verify Init");
  618|  3.62k|}
ecdsa_sig.c:ecdsa_digest_verify_final:
  622|  3.62k|{
  623|  3.62k|    PROV_ECDSA_CTX *ctx = (PROV_ECDSA_CTX *)vctx;
  624|  3.62k|    int ok = 0;
  625|       |
  626|  3.62k|    if (!ossl_prov_is_running() || ctx == NULL || ctx->mdctx == NULL)
  ------------------
  |  Branch (626:9): [True: 0, False: 3.62k]
  |  Branch (626:36): [True: 0, False: 3.62k]
  |  Branch (626:51): [True: 0, False: 3.62k]
  ------------------
  627|      0|        return 0;
  628|       |
  629|       |    /* Sigalg implementations shouldn't do digest_verify */
  630|  3.62k|    if (ctx->flag_sigalg)
  ------------------
  |  Branch (630:9): [True: 0, False: 3.62k]
  ------------------
  631|      0|        return 0;
  632|       |
  633|  3.62k|    if (ecdsa_verify_set_sig(ctx, sig, siglen))
  ------------------
  |  Branch (633:9): [True: 3.62k, False: 0]
  ------------------
  634|  3.62k|        ok = ecdsa_verify_message_final(ctx);
  635|       |
  636|  3.62k|    ctx->flag_allow_md = 1;
  637|       |
  638|  3.62k|    return ok;
  639|  3.62k|}
ecdsa_sig.c:ecdsa_freectx:
  642|  18.1k|{
  643|  18.1k|    PROV_ECDSA_CTX *ctx = (PROV_ECDSA_CTX *)vctx;
  644|       |
  645|  18.1k|    EVP_MD_CTX_free(ctx->mdctx);
  646|  18.1k|    EVP_MD_free(ctx->md);
  647|  18.1k|    OPENSSL_free(ctx->propq);
  ------------------
  |  |  132|  18.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  648|  18.1k|    OPENSSL_free(ctx->sig);
  ------------------
  |  |  132|  18.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  649|  18.1k|    EC_KEY_free(ctx->ec);
  650|  18.1k|    BN_clear_free(ctx->kinv);
  651|  18.1k|    BN_clear_free(ctx->r);
  652|  18.1k|    OPENSSL_free(ctx);
  ------------------
  |  |  132|  18.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  653|  18.1k|}
ecdsa_sig.c:ecdsa_dupctx:
  656|  7.25k|{
  657|  7.25k|    PROV_ECDSA_CTX *srcctx = (PROV_ECDSA_CTX *)vctx;
  658|  7.25k|    PROV_ECDSA_CTX *dstctx;
  659|       |
  660|       |    /* Test KATS should not need to be supported */
  661|  7.25k|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (661:9): [True: 0, False: 7.25k]
  ------------------
  662|  7.25k|        || srcctx->kinv != NULL
  ------------------
  |  Branch (662:12): [True: 0, False: 7.25k]
  ------------------
  663|  7.25k|        || srcctx->r != NULL
  ------------------
  |  Branch (663:12): [True: 0, False: 7.25k]
  ------------------
  664|  7.25k|        || (dstctx = OPENSSL_memdup(srcctx, sizeof(*srcctx))) == NULL)
  ------------------
  |  |  134|  7.25k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (664:12): [True: 0, False: 7.25k]
  ------------------
  665|      0|        return NULL;
  666|       |
  667|  7.25k|    dstctx->ec = NULL;
  668|  7.25k|    dstctx->propq = NULL;
  669|  7.25k|    dstctx->md = NULL;
  670|  7.25k|    dstctx->mdctx = NULL;
  671|  7.25k|    dstctx->sig = NULL;
  672|       |
  673|  7.25k|    if (srcctx->ec != NULL && !EC_KEY_up_ref(srcctx->ec))
  ------------------
  |  Branch (673:9): [True: 7.25k, False: 0]
  |  Branch (673:31): [True: 0, False: 7.25k]
  ------------------
  674|      0|        goto err;
  675|  7.25k|    dstctx->ec = srcctx->ec;
  676|       |
  677|  7.25k|    if (srcctx->md != NULL && !EVP_MD_up_ref(srcctx->md))
  ------------------
  |  Branch (677:9): [True: 7.25k, False: 0]
  |  Branch (677:31): [True: 0, False: 7.25k]
  ------------------
  678|      0|        goto err;
  679|  7.25k|    dstctx->md = srcctx->md;
  680|       |
  681|  7.25k|    if (srcctx->mdctx != NULL
  ------------------
  |  Branch (681:9): [True: 7.25k, False: 0]
  ------------------
  682|  7.25k|        && ((dstctx->mdctx = EVP_MD_CTX_new()) == NULL
  ------------------
  |  Branch (682:13): [True: 0, False: 7.25k]
  ------------------
  683|  7.25k|            || !EVP_MD_CTX_copy_ex(dstctx->mdctx, srcctx->mdctx)))
  ------------------
  |  Branch (683:16): [True: 0, False: 7.25k]
  ------------------
  684|      0|        goto err;
  685|  7.25k|    if (srcctx->propq != NULL
  ------------------
  |  Branch (685:9): [True: 0, False: 7.25k]
  ------------------
  686|      0|        && (dstctx->propq = OPENSSL_strdup(srcctx->propq)) == NULL)
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (686:12): [True: 0, False: 0]
  ------------------
  687|      0|        goto err;
  688|  7.25k|    if (srcctx->sig != NULL
  ------------------
  |  Branch (688:9): [True: 0, False: 7.25k]
  ------------------
  689|      0|        && (dstctx->sig = OPENSSL_memdup(srcctx->sig, srcctx->siglen)) == NULL)
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (689:12): [True: 0, False: 0]
  ------------------
  690|      0|        goto err;
  691|       |
  692|  7.25k|    return dstctx;
  693|      0|err:
  694|      0|    ecdsa_freectx(dstctx);
  695|       |    return NULL;
  696|  7.25k|}
ecdsa_sig.c:ecdsa_set_ctx_params:
  764|  10.8k|{
  765|  10.8k|    PROV_ECDSA_CTX *ctx = (PROV_ECDSA_CTX *)vctx;
  766|  10.8k|    struct ecdsa_all_set_ctx_params_st p;
  767|  10.8k|    size_t mdsize = 0;
  768|  10.8k|    int ret;
  769|       |
  770|  10.8k|    if (ctx == NULL || !ecdsa_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (770:9): [True: 0, False: 10.8k]
  |  Branch (770:24): [True: 0, False: 10.8k]
  ------------------
  771|      0|        return 0;
  772|       |
  773|  10.8k|    if ((ret = ecdsa_common_set_ctx_params(ctx, &p)) <= 0)
  ------------------
  |  Branch (773:9): [True: 0, False: 10.8k]
  ------------------
  774|      0|        return ret;
  775|       |
  776|  10.8k|    if (p.digest != NULL) {
  ------------------
  |  Branch (776:9): [True: 7.25k, False: 3.62k]
  ------------------
  777|  7.25k|        char mdname[OSSL_MAX_NAME_SIZE] = "", *pmdname = mdname;
  778|  7.25k|        char mdprops[OSSL_MAX_PROPQUERY_SIZE] = "", *pmdprops = mdprops;
  779|       |
  780|  7.25k|        if (!OSSL_PARAM_get_utf8_string(p.digest, &pmdname, sizeof(mdname)))
  ------------------
  |  Branch (780:13): [True: 0, False: 7.25k]
  ------------------
  781|      0|            return 0;
  782|  7.25k|        if (p.propq != NULL
  ------------------
  |  Branch (782:13): [True: 0, False: 7.25k]
  ------------------
  783|      0|            && !OSSL_PARAM_get_utf8_string(p.propq, &pmdprops, sizeof(mdprops)))
  ------------------
  |  Branch (783:16): [True: 0, False: 0]
  ------------------
  784|      0|            return 0;
  785|  7.25k|        if (!ecdsa_setup_md(ctx, mdname, mdprops, "ECDSA Set Ctx"))
  ------------------
  |  Branch (785:13): [True: 0, False: 7.25k]
  ------------------
  786|      0|            return 0;
  787|  7.25k|    }
  788|       |
  789|  10.8k|    if (p.size != NULL) {
  ------------------
  |  Branch (789:9): [True: 0, False: 10.8k]
  ------------------
  790|      0|        if (!OSSL_PARAM_get_size_t(p.size, &mdsize)
  ------------------
  |  Branch (790:13): [True: 0, False: 0]
  ------------------
  791|      0|            || (!ctx->flag_allow_md && mdsize != ctx->mdsize))
  ------------------
  |  Branch (791:17): [True: 0, False: 0]
  |  Branch (791:40): [True: 0, False: 0]
  ------------------
  792|      0|            return 0;
  793|      0|        ctx->mdsize = mdsize;
  794|      0|    }
  795|  10.8k|    return 1;
  796|  10.8k|}
ecdsa_sig.c:ecdsa_common_set_ctx_params:
  745|  14.5k|{
  746|  14.5k|    if (!OSSL_FIPS_IND_SET_CTX_FROM_PARAM(ctx, OSSL_FIPS_IND_SETTABLE0,
  ------------------
  |  |  158|  14.5k|#define OSSL_FIPS_IND_SET_CTX_FROM_PARAM(ctx, id, p) 1
  ------------------
  |  Branch (746:9): [Folded, False: 14.5k]
  ------------------
  747|  14.5k|            p->ind_k))
  748|      0|        return 0;
  749|  14.5k|    if (!OSSL_FIPS_IND_SET_CTX_FROM_PARAM(ctx, OSSL_FIPS_IND_SETTABLE1,
  ------------------
  |  |  158|  14.5k|#define OSSL_FIPS_IND_SET_CTX_FROM_PARAM(ctx, id, p) 1
  ------------------
  |  Branch (749:9): [Folded, False: 14.5k]
  ------------------
  750|  14.5k|            p->ind_d))
  751|      0|        return 0;
  752|       |
  753|       |#if !defined(OPENSSL_NO_ACVP_TESTS)
  754|       |    if (p->kat != NULL && !OSSL_PARAM_get_uint(p->kat, &ctx->kattest))
  755|       |        return 0;
  756|       |#endif
  757|       |
  758|  14.5k|    if (p->nonce != NULL && !OSSL_PARAM_get_uint(p->nonce, &ctx->nonce_type))
  ------------------
  |  Branch (758:9): [True: 0, False: 14.5k]
  |  Branch (758:29): [True: 0, False: 0]
  ------------------
  759|      0|        return 0;
  760|  14.5k|    return 1;
  761|  14.5k|}
ecdsa_sig.c:ecdsa_signverify_message_update:
  401|  7.25k|{
  402|  7.25k|    PROV_ECDSA_CTX *ctx = (PROV_ECDSA_CTX *)vctx;
  403|       |
  404|  7.25k|    if (ctx == NULL)
  ------------------
  |  Branch (404:9): [True: 0, False: 7.25k]
  ------------------
  405|      0|        return 0;
  406|       |
  407|  7.25k|    return EVP_DigestUpdate(ctx->mdctx, data, datalen);
  408|  7.25k|}
ecdsa_sig.c:ecdsa_sign_message_final:
  412|  7.25k|{
  413|  7.25k|    PROV_ECDSA_CTX *ctx = (PROV_ECDSA_CTX *)vctx;
  414|  7.25k|    unsigned char digest[EVP_MAX_MD_SIZE];
  415|  7.25k|    unsigned int dlen = 0;
  416|       |
  417|  7.25k|    if (!ossl_prov_is_running() || ctx == NULL)
  ------------------
  |  Branch (417:9): [True: 0, False: 7.25k]
  |  Branch (417:36): [True: 0, False: 7.25k]
  ------------------
  418|      0|        return 0;
  419|  7.25k|    if (ctx->mdctx == NULL)
  ------------------
  |  Branch (419:9): [True: 0, False: 7.25k]
  ------------------
  420|      0|        return 0;
  421|       |    /*
  422|       |     * If sig is NULL then we're just finding out the sig size. Other fields
  423|       |     * are ignored. Defer to ecdsa_sign.
  424|       |     */
  425|  7.25k|    if (sig != NULL
  ------------------
  |  Branch (425:9): [True: 3.62k, False: 3.62k]
  ------------------
  426|  3.62k|        && !EVP_DigestFinal_ex(ctx->mdctx, digest, &dlen))
  ------------------
  |  Branch (426:12): [True: 0, False: 3.62k]
  ------------------
  427|      0|        return 0;
  428|  7.25k|    return ecdsa_sign_directly(vctx, sig, siglen, sigsize, digest, dlen);
  429|  7.25k|}
ecdsa_sig.c:ecdsa_verify_message_final:
  491|  3.62k|{
  492|  3.62k|    PROV_ECDSA_CTX *ctx = (PROV_ECDSA_CTX *)vctx;
  493|  3.62k|    unsigned char digest[EVP_MAX_MD_SIZE];
  494|  3.62k|    unsigned int dlen = 0;
  495|       |
  496|  3.62k|    if (!ossl_prov_is_running() || ctx == NULL || ctx->mdctx == NULL)
  ------------------
  |  Branch (496:9): [True: 0, False: 3.62k]
  |  Branch (496:36): [True: 0, False: 3.62k]
  |  Branch (496:51): [True: 0, False: 3.62k]
  ------------------
  497|      0|        return 0;
  498|       |
  499|       |    /*
  500|       |     * The digests used here are all known (see ecdsa_get_md_nid()), so they
  501|       |     * should not exceed the internal buffer size of EVP_MAX_MD_SIZE.
  502|       |     */
  503|  3.62k|    if (!EVP_DigestFinal_ex(ctx->mdctx, digest, &dlen))
  ------------------
  |  Branch (503:9): [True: 0, False: 3.62k]
  ------------------
  504|      0|        return 0;
  505|       |
  506|  3.62k|    return ecdsa_verify_directly(vctx, ctx->sig, ctx->siglen,
  507|  3.62k|        digest, dlen);
  508|  3.62k|}
ecdsa_sig.c:ecdsa_sigalg_set_ctx_params:
  952|  3.62k|{
  953|  3.62k|    PROV_ECDSA_CTX *ctx = (PROV_ECDSA_CTX *)vctx;
  954|  3.62k|    struct ecdsa_all_set_ctx_params_st p;
  955|  3.62k|    int ret;
  956|       |
  957|  3.62k|    if (ctx == NULL || !ecdsa_sigalg_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (957:9): [True: 0, False: 3.62k]
  |  Branch (957:24): [True: 0, False: 3.62k]
  ------------------
  958|      0|        return 0;
  959|       |
  960|  3.62k|    if ((ret = ecdsa_common_set_ctx_params(ctx, &p)) <= 0)
  ------------------
  |  Branch (960:9): [True: 0, False: 3.62k]
  ------------------
  961|      0|        return ret;
  962|       |
  963|  3.62k|    if (ctx->operation == EVP_PKEY_OP_VERIFYMSG) {
  ------------------
  |  | 1542|  3.62k|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  ------------------
  |  Branch (963:9): [True: 3.62k, False: 0]
  ------------------
  964|  3.62k|        if (p.sig != NULL) {
  ------------------
  |  Branch (964:13): [True: 3.62k, False: 0]
  ------------------
  965|  3.62k|            OPENSSL_free(ctx->sig);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  966|  3.62k|            ctx->sig = NULL;
  967|  3.62k|            ctx->siglen = 0;
  968|  3.62k|            if (!OSSL_PARAM_get_octet_string(p.sig, (void **)&ctx->sig,
  ------------------
  |  Branch (968:17): [True: 0, False: 3.62k]
  ------------------
  969|  3.62k|                    0, &ctx->siglen))
  970|      0|                return 0;
  971|       |            /* The signature must not be empty */
  972|  3.62k|            if (ctx->siglen == 0) {
  ------------------
  |  Branch (972:17): [True: 0, False: 3.62k]
  ------------------
  973|      0|                OPENSSL_free(ctx->sig);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  974|      0|                ctx->sig = NULL;
  975|      0|                return 0;
  976|      0|            }
  977|  3.62k|        }
  978|  3.62k|    }
  979|  3.62k|    return 1;
  980|  3.62k|}

ecdsa_sig.c:ecdsa_set_ctx_params_decoder:
  200|  10.8k|{
  201|  10.8k|    const char *s;
  202|       |
  203|  10.8k|    memset(r, 0, sizeof(*r));
  204|  10.8k|    if (p != NULL)
  ------------------
  |  Branch (204:9): [True: 7.25k, False: 3.62k]
  ------------------
  205|  21.7k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (205:16): [True: 14.5k, False: 7.25k]
  ------------------
  206|  14.5k|            switch(s[0]) {
  207|  7.25k|            default:
  ------------------
  |  Branch (207:13): [True: 7.25k, False: 7.25k]
  ------------------
  208|  7.25k|                break;
  209|  7.25k|            case 'd':
  ------------------
  |  Branch (209:13): [True: 7.25k, False: 7.25k]
  ------------------
  210|  7.25k|                switch(s[1]) {
  211|      0|                default:
  ------------------
  |  Branch (211:17): [True: 0, False: 7.25k]
  ------------------
  212|      0|                    break;
  213|  7.25k|                case 'i':
  ------------------
  |  Branch (213:17): [True: 7.25k, False: 0]
  ------------------
  214|  7.25k|                    switch(s[2]) {
  215|      0|                    default:
  ------------------
  |  Branch (215:21): [True: 0, False: 7.25k]
  ------------------
  216|      0|                        break;
  217|  7.25k|                    case 'g':
  ------------------
  |  Branch (217:21): [True: 7.25k, False: 0]
  ------------------
  218|  7.25k|                        switch(s[3]) {
  219|      0|                        default:
  ------------------
  |  Branch (219:25): [True: 0, False: 7.25k]
  ------------------
  220|      0|                            break;
  221|  7.25k|                        case 'e':
  ------------------
  |  Branch (221:25): [True: 7.25k, False: 0]
  ------------------
  222|  7.25k|                            switch(s[4]) {
  223|      0|                            default:
  ------------------
  |  Branch (223:29): [True: 0, False: 7.25k]
  ------------------
  224|      0|                                break;
  225|  7.25k|                            case 's':
  ------------------
  |  Branch (225:29): [True: 7.25k, False: 0]
  ------------------
  226|  7.25k|                                switch(s[5]) {
  227|      0|                                default:
  ------------------
  |  Branch (227:33): [True: 0, False: 7.25k]
  ------------------
  228|      0|                                    break;
  229|  7.25k|                                case 't':
  ------------------
  |  Branch (229:33): [True: 7.25k, False: 0]
  ------------------
  230|  7.25k|                                    switch(s[6]) {
  231|      0|                                    default:
  ------------------
  |  Branch (231:37): [True: 0, False: 7.25k]
  ------------------
  232|      0|                                        break;
  233|      0|                                    case '-':
  ------------------
  |  Branch (233:37): [True: 0, False: 7.25k]
  ------------------
  234|      0|                                        switch(s[7]) {
  235|      0|                                        default:
  ------------------
  |  Branch (235:41): [True: 0, False: 0]
  ------------------
  236|      0|                                            break;
  237|      0|                                        case 'c':
  ------------------
  |  Branch (237:41): [True: 0, False: 0]
  ------------------
  238|       |# if defined(FIPS_MODULE)
  239|       |                                            if (ossl_likely(strcmp("heck", s + 8) == 0)) {
  240|       |                                                /* OSSL_SIGNATURE_PARAM_FIPS_DIGEST_CHECK */
  241|       |                                                if (ossl_unlikely(r->ind_d != NULL)) {
  242|       |                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  243|       |                                                                   "param %s is repeated", s);
  244|       |                                                    return 0;
  245|       |                                                }
  246|       |                                                r->ind_d = (OSSL_PARAM *)p;
  247|       |                                            }
  248|       |# endif
  249|      0|                                            break;
  250|      0|                                        case 's':
  ------------------
  |  Branch (250:41): [True: 0, False: 0]
  ------------------
  251|      0|                                            if (ossl_likely(strcmp("ize", s + 8) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  252|       |                                                /* OSSL_SIGNATURE_PARAM_DIGEST_SIZE */
  253|      0|                                                if (ossl_unlikely(r->size != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  254|      0|                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  255|      0|                                                                   "param %s is repeated", s);
  256|      0|                                                    return 0;
  257|      0|                                                }
  258|      0|                                                r->size = (OSSL_PARAM *)p;
  259|      0|                                            }
  260|      0|                                        }
  261|      0|                                        break;
  262|  7.25k|                                    case '\0':
  ------------------
  |  Branch (262:37): [True: 7.25k, False: 0]
  ------------------
  263|  7.25k|                                        if (ossl_unlikely(r->digest != NULL)) {
  ------------------
  |  |   23|  7.25k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7.25k]
  |  |  ------------------
  ------------------
  264|      0|                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  265|      0|                                                           "param %s is repeated", s);
  266|      0|                                            return 0;
  267|      0|                                        }
  268|  7.25k|                                        r->digest = (OSSL_PARAM *)p;
  269|  7.25k|                                    }
  270|  7.25k|                                }
  271|  7.25k|                            }
  272|  7.25k|                        }
  273|  7.25k|                    }
  274|  7.25k|                }
  275|  7.25k|                break;
  276|  7.25k|            case 'k':
  ------------------
  |  Branch (276:13): [True: 0, False: 14.5k]
  ------------------
  277|      0|                switch(s[1]) {
  278|      0|                default:
  ------------------
  |  Branch (278:17): [True: 0, False: 0]
  ------------------
  279|      0|                    break;
  280|      0|                case 'a':
  ------------------
  |  Branch (280:17): [True: 0, False: 0]
  ------------------
  281|       |# if !defined(OPENSSL_NO_ACVP_TESTS)
  282|       |                    if (ossl_likely(strcmp("t", s + 2) == 0)) {
  283|       |                        /* OSSL_SIGNATURE_PARAM_KAT */
  284|       |                        if (ossl_unlikely(r->kat != NULL)) {
  285|       |                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  286|       |                                           "param %s is repeated", s);
  287|       |                            return 0;
  288|       |                        }
  289|       |                        r->kat = (OSSL_PARAM *)p;
  290|       |                    }
  291|       |# endif
  292|      0|                    break;
  293|      0|                case 'e':
  ------------------
  |  Branch (293:17): [True: 0, False: 0]
  ------------------
  294|       |# if defined(FIPS_MODULE)
  295|       |                    if (ossl_likely(strcmp("y-check", s + 2) == 0)) {
  296|       |                        /* OSSL_SIGNATURE_PARAM_FIPS_KEY_CHECK */
  297|       |                        if (ossl_unlikely(r->ind_k != NULL)) {
  298|       |                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  299|       |                                           "param %s is repeated", s);
  300|       |                            return 0;
  301|       |                        }
  302|       |                        r->ind_k = (OSSL_PARAM *)p;
  303|       |                    }
  304|       |# endif
  305|      0|                    break;
  306|      0|                }
  307|      0|                break;
  308|      0|            case 'n':
  ------------------
  |  Branch (308:13): [True: 0, False: 14.5k]
  ------------------
  309|      0|                if (ossl_likely(strcmp("once-type", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  310|       |                    /* OSSL_SIGNATURE_PARAM_NONCE_TYPE */
  311|      0|                    if (ossl_unlikely(r->nonce != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  312|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  313|      0|                                       "param %s is repeated", s);
  314|      0|                        return 0;
  315|      0|                    }
  316|      0|                    r->nonce = (OSSL_PARAM *)p;
  317|      0|                }
  318|      0|                break;
  319|      0|            case 'p':
  ------------------
  |  Branch (319:13): [True: 0, False: 14.5k]
  ------------------
  320|      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]
  |  |  ------------------
  ------------------
  321|       |                    /* OSSL_SIGNATURE_PARAM_PROPERTIES */
  322|      0|                    if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  323|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  324|      0|                                       "param %s is repeated", s);
  325|      0|                        return 0;
  326|      0|                    }
  327|      0|                    r->propq = (OSSL_PARAM *)p;
  328|      0|                }
  329|  14.5k|            }
  330|  10.8k|    return 1;
  331|  10.8k|}
ecdsa_sig.c:ecdsa_sigalg_set_ctx_params_decoder:
  372|  3.62k|{
  373|  3.62k|    const char *s;
  374|       |
  375|  3.62k|    memset(r, 0, sizeof(*r));
  376|  3.62k|    if (p != NULL)
  ------------------
  |  Branch (376:9): [True: 3.62k, False: 0]
  ------------------
  377|  7.25k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (377:16): [True: 3.62k, False: 3.62k]
  ------------------
  378|  3.62k|            switch(s[0]) {
  379|      0|            default:
  ------------------
  |  Branch (379:13): [True: 0, False: 3.62k]
  ------------------
  380|      0|                break;
  381|      0|            case 'd':
  ------------------
  |  Branch (381:13): [True: 0, False: 3.62k]
  ------------------
  382|       |# if defined(FIPS_MODULE)
  383|       |                if (ossl_likely(strcmp("igest-check", s + 1) == 0)) {
  384|       |                    /* OSSL_SIGNATURE_PARAM_FIPS_DIGEST_CHECK */
  385|       |                    if (ossl_unlikely(r->ind_d != NULL)) {
  386|       |                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  387|       |                                       "param %s is repeated", s);
  388|       |                        return 0;
  389|       |                    }
  390|       |                    r->ind_d = (OSSL_PARAM *)p;
  391|       |                }
  392|       |# endif
  393|      0|                break;
  394|      0|            case 'k':
  ------------------
  |  Branch (394:13): [True: 0, False: 3.62k]
  ------------------
  395|      0|                switch(s[1]) {
  396|      0|                default:
  ------------------
  |  Branch (396:17): [True: 0, False: 0]
  ------------------
  397|      0|                    break;
  398|      0|                case 'a':
  ------------------
  |  Branch (398:17): [True: 0, False: 0]
  ------------------
  399|       |# if !defined(OPENSSL_NO_ACVP_TESTS)
  400|       |                    if (ossl_likely(strcmp("t", s + 2) == 0)) {
  401|       |                        /* OSSL_SIGNATURE_PARAM_KAT */
  402|       |                        if (ossl_unlikely(r->kat != NULL)) {
  403|       |                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  404|       |                                           "param %s is repeated", s);
  405|       |                            return 0;
  406|       |                        }
  407|       |                        r->kat = (OSSL_PARAM *)p;
  408|       |                    }
  409|       |# endif
  410|      0|                    break;
  411|      0|                case 'e':
  ------------------
  |  Branch (411:17): [True: 0, False: 0]
  ------------------
  412|       |# if defined(FIPS_MODULE)
  413|       |                    if (ossl_likely(strcmp("y-check", s + 2) == 0)) {
  414|       |                        /* OSSL_SIGNATURE_PARAM_FIPS_KEY_CHECK */
  415|       |                        if (ossl_unlikely(r->ind_k != NULL)) {
  416|       |                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  417|       |                                           "param %s is repeated", s);
  418|       |                            return 0;
  419|       |                        }
  420|       |                        r->ind_k = (OSSL_PARAM *)p;
  421|       |                    }
  422|       |# endif
  423|      0|                    break;
  424|      0|                }
  425|      0|                break;
  426|      0|            case 'n':
  ------------------
  |  Branch (426:13): [True: 0, False: 3.62k]
  ------------------
  427|      0|                if (ossl_likely(strcmp("once-type", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  428|       |                    /* OSSL_SIGNATURE_PARAM_NONCE_TYPE */
  429|      0|                    if (ossl_unlikely(r->nonce != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  430|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  431|      0|                                       "param %s is repeated", s);
  432|      0|                        return 0;
  433|      0|                    }
  434|      0|                    r->nonce = (OSSL_PARAM *)p;
  435|      0|                }
  436|      0|                break;
  437|  3.62k|            case 's':
  ------------------
  |  Branch (437:13): [True: 3.62k, False: 0]
  ------------------
  438|  3.62k|                if (ossl_likely(strcmp("ignature", s + 1) == 0)) {
  ------------------
  |  |   22|  3.62k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  439|       |                    /* OSSL_SIGNATURE_PARAM_SIGNATURE */
  440|  3.62k|                    if (ossl_unlikely(r->sig != NULL)) {
  ------------------
  |  |   23|  3.62k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  441|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  101|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  142|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  442|      0|                                       "param %s is repeated", s);
  443|      0|                        return 0;
  444|      0|                    }
  445|  3.62k|                    r->sig = (OSSL_PARAM *)p;
  446|  3.62k|                }
  447|  3.62k|            }
  448|  3.62k|    return 1;
  449|  3.62k|}

ossl_prov_is_running:
   20|  3.49M|{
   21|  3.49M|    return 1;
   22|  3.49M|}

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

ossl_ech_helper_get_ch_offsets:
   80|  3.62k|{
   81|  3.62k|    unsigned int elen = 0, etype = 0, pi_tmp = 0;
   82|  3.62k|    const unsigned char *pp_tmp = NULL, *chstart = NULL, *estart = NULL;
   83|  3.62k|    PACKET pkt;
   84|  3.62k|    int done = 0;
   85|       |
   86|  3.62k|    if (ch == NULL || ch_len == 0 || sessid_off == NULL || exts_off == NULL
  ------------------
  |  Branch (86:9): [True: 0, False: 3.62k]
  |  Branch (86:23): [True: 0, False: 3.62k]
  |  Branch (86:38): [True: 0, False: 3.62k]
  |  Branch (86:60): [True: 0, False: 3.62k]
  ------------------
   87|  3.62k|        || ech_off == NULL || echtype == NULL || ech_len == NULL
  ------------------
  |  Branch (87:12): [True: 0, False: 3.62k]
  |  Branch (87:31): [True: 0, False: 3.62k]
  |  Branch (87:50): [True: 0, False: 3.62k]
  ------------------
   88|  3.62k|        || sni_off == NULL || inner == NULL || exts_len == NULL)
  ------------------
  |  Branch (88:12): [True: 0, False: 3.62k]
  |  Branch (88:31): [True: 0, False: 3.62k]
  |  Branch (88:48): [True: 0, False: 3.62k]
  ------------------
   89|      0|        return 0;
   90|  3.62k|    *sessid_off = *exts_off = *ech_off = *sni_off = *sni_len = *ech_len = 0;
   91|  3.62k|    *exts_len = 0;
   92|  3.62k|    *inner = OSSL_ECH_UNKNOWN_CH_TYPE;
  ------------------
  |  |   46|  3.62k|#define OSSL_ECH_UNKNOWN_CH_TYPE -1 /* we don't know yet */
  ------------------
   93|  3.62k|    *echtype = 0xffff;
   94|  3.62k|    if (!PACKET_buf_init(&pkt, ch, ch_len))
  ------------------
  |  Branch (94:9): [True: 0, False: 3.62k]
  ------------------
   95|      0|        return 0;
   96|  3.62k|    chstart = PACKET_data(&pkt);
   97|  3.62k|    if (!PACKET_get_net_2(&pkt, &pi_tmp))
  ------------------
  |  Branch (97:9): [True: 0, False: 3.62k]
  ------------------
   98|      0|        return 0;
   99|       |    /* if we're not TLSv1.2+ then we can bail, but it's not an error */
  100|  3.62k|    if (pi_tmp != TLS1_2_VERSION)
  ------------------
  |  |   26|  3.62k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (100:9): [True: 0, False: 3.62k]
  ------------------
  101|      0|        return 1;
  102|       |    /* chew up the packet to extensions */
  103|  3.62k|    if (!PACKET_get_bytes(&pkt, &pp_tmp, SSL3_RANDOM_SIZE)
  ------------------
  |  |  137|  3.62k|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (103:9): [True: 0, False: 3.62k]
  ------------------
  104|  3.62k|        || (*sessid_off = PACKET_data(&pkt) - chstart) == 0
  ------------------
  |  Branch (104:12): [True: 0, False: 3.62k]
  ------------------
  105|  3.62k|        || !PACKET_get_1(&pkt, &pi_tmp) /* sessid len */
  ------------------
  |  Branch (105:12): [True: 0, False: 3.62k]
  ------------------
  106|  3.62k|        || !PACKET_get_bytes(&pkt, &pp_tmp, pi_tmp) /* sessid */
  ------------------
  |  Branch (106:12): [True: 0, False: 3.62k]
  ------------------
  107|  3.62k|        || !PACKET_get_net_2(&pkt, &pi_tmp) /* ciphersuite len */
  ------------------
  |  Branch (107:12): [True: 0, False: 3.62k]
  ------------------
  108|  3.62k|        || !PACKET_get_bytes(&pkt, &pp_tmp, pi_tmp) /* suites */
  ------------------
  |  Branch (108:12): [True: 0, False: 3.62k]
  ------------------
  109|  3.62k|        || !PACKET_get_1(&pkt, &pi_tmp) /* compression meths */
  ------------------
  |  Branch (109:12): [True: 0, False: 3.62k]
  ------------------
  110|  3.62k|        || !PACKET_get_bytes(&pkt, &pp_tmp, pi_tmp) /* comp meths */
  ------------------
  |  Branch (110:12): [True: 0, False: 3.62k]
  ------------------
  111|  3.62k|        || (*exts_off = PACKET_data(&pkt) - chstart) == 0
  ------------------
  |  Branch (111:12): [True: 0, False: 3.62k]
  ------------------
  112|  3.62k|        || !PACKET_get_net_2(&pkt, &pi_tmp) /* len(extensions) */
  ------------------
  |  Branch (112:12): [True: 0, False: 3.62k]
  ------------------
  113|  3.62k|        || (*exts_len = (size_t)pi_tmp) == 0)
  ------------------
  |  Branch (113:12): [True: 0, False: 3.62k]
  ------------------
  114|       |        /*
  115|       |         * unexpectedly, we return 1 here, as doing otherwise will
  116|       |         * break some non-ECH test code that truncates CH messages
  117|       |         * The same is true below when looking through extensions.
  118|       |         * That's ok though, we'll only set those offsets we've
  119|       |         * found.
  120|       |         */
  121|      0|        return 1;
  122|       |    /* no extensions is theoretically ok, if uninteresting */
  123|  3.62k|    if (*exts_len == 0)
  ------------------
  |  Branch (123:9): [True: 0, False: 3.62k]
  ------------------
  124|      0|        return 1;
  125|       |    /* find what we want from extensions */
  126|  3.62k|    estart = PACKET_data(&pkt);
  127|  47.1k|    while (PACKET_remaining(&pkt) > 0
  ------------------
  |  Branch (127:12): [True: 43.5k, False: 3.62k]
  ------------------
  128|  43.5k|        && (size_t)(PACKET_data(&pkt) - estart) < *exts_len
  ------------------
  |  Branch (128:12): [True: 43.5k, False: 0]
  ------------------
  129|  43.5k|        && done < 2) {
  ------------------
  |  Branch (129:12): [True: 43.5k, False: 0]
  ------------------
  130|  43.5k|        if (!PACKET_get_net_2(&pkt, &etype)
  ------------------
  |  Branch (130:13): [True: 0, False: 43.5k]
  ------------------
  131|  43.5k|            || !PACKET_get_net_2(&pkt, &elen))
  ------------------
  |  Branch (131:16): [True: 0, False: 43.5k]
  ------------------
  132|      0|            return 1; /* see note above */
  133|  43.5k|        if (etype == TLSEXT_TYPE_ech) {
  ------------------
  |  |  174|  43.5k|#define TLSEXT_TYPE_ech 0xfe0d
  ------------------
  |  Branch (133:13): [True: 0, False: 43.5k]
  ------------------
  134|      0|            if (elen == 0)
  ------------------
  |  Branch (134:17): [True: 0, False: 0]
  ------------------
  135|      0|                return 0;
  136|      0|            *ech_off = PACKET_data(&pkt) - chstart - 4;
  137|      0|            *echtype = etype;
  138|      0|            *ech_len = elen;
  139|      0|            done++;
  140|      0|        }
  141|  43.5k|        if (etype == TLSEXT_TYPE_server_name) {
  ------------------
  |  |   86|  43.5k|#define TLSEXT_TYPE_server_name 0
  ------------------
  |  Branch (141:13): [True: 3.62k, False: 39.9k]
  ------------------
  142|  3.62k|            *sni_off = PACKET_data(&pkt) - chstart - 4;
  143|  3.62k|            *sni_len = elen;
  144|  3.62k|            done++;
  145|  3.62k|        }
  146|  43.5k|        if (!PACKET_get_bytes(&pkt, &pp_tmp, elen))
  ------------------
  |  Branch (146:13): [True: 0, False: 43.5k]
  ------------------
  147|      0|            return 1; /* see note above */
  148|  43.5k|        if (etype == TLSEXT_TYPE_ech)
  ------------------
  |  |  174|  43.5k|#define TLSEXT_TYPE_ech 0xfe0d
  ------------------
  |  Branch (148:13): [True: 0, False: 43.5k]
  ------------------
  149|      0|            *inner = pp_tmp[0];
  150|  43.5k|    }
  151|  3.62k|    return 1;
  152|  3.62k|}

ossl_ech_pbuf:
   35|  14.5k|{
   36|  14.5k|    OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  219|  14.5k|    do {                           \
  |  |  220|  14.5k|        BIO *trc_out = NULL;       \
  |  |  221|  14.5k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 14.5k]
  |  |  ------------------
  ------------------
   37|      0|    {
   38|      0|        if (msg == NULL) {
  ------------------
  |  Branch (38:13): [True: 0, False: 0]
  ------------------
   39|      0|            BIO_printf(trc_out, "msg is NULL\n");
   40|      0|        } else if (buf == NULL || blen == 0) {
  ------------------
  |  Branch (40:20): [True: 0, False: 0]
  |  Branch (40:35): [True: 0, False: 0]
  ------------------
   41|      0|            BIO_printf(trc_out, "%s: buf is %p\n", msg, (void *)buf);
   42|      0|            BIO_printf(trc_out, "%s: blen is %lu\n", msg, (unsigned long)blen);
   43|      0|        } else {
   44|      0|            BIO_printf(trc_out, "%s (%lu)\n", msg, (unsigned long)blen);
   45|      0|            BIO_dump_indent(trc_out, buf, (int)blen, 4);
   46|      0|        }
   47|      0|    }
   48|  14.5k|    OSSL_TRACE_END(TLS);
  ------------------
  |  |  224|  14.5k|    }                            \
  |  |  225|  14.5k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 14.5k]
  |  |  ------------------
  ------------------
   49|  14.5k|    return;
   50|  14.5k|}
ossl_ech_ctx_clear:
  158|  7.36k|{
  159|  7.36k|    if (ce == NULL)
  ------------------
  |  Branch (159:9): [True: 0, False: 7.36k]
  ------------------
  160|      0|        return;
  161|  7.36k|    OSSL_ECHSTORE_free(ce->es);
  162|  7.36k|    OPENSSL_free(ce->alpn_outer);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  163|  7.36k|    return;
  164|  7.36k|}
ossl_ech_conn_clear:
  181|  7.25k|{
  182|  7.25k|    if (ec == NULL)
  ------------------
  |  Branch (182:9): [True: 0, False: 7.25k]
  ------------------
  183|      0|        return;
  184|  7.25k|    OSSL_ECHSTORE_free(ec->es);
  185|  7.25k|    OPENSSL_free(ec->outer_hostname);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  186|  7.25k|    OPENSSL_free(ec->alpn_outer);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  187|  7.25k|    OPENSSL_free(ec->former_inner);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  188|  7.25k|    OPENSSL_free(ec->transbuf);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  189|  7.25k|    OPENSSL_free(ec->innerch);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  190|  7.25k|    OPENSSL_free(ec->grease_suite);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  191|  7.25k|    OPENSSL_free(ec->sent);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  192|  7.25k|    OPENSSL_free(ec->returned);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  193|  7.25k|    OPENSSL_free(ec->pub);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  194|  7.25k|    OSSL_HPKE_CTX_free(ec->hpke_ctx);
  195|  7.25k|    OPENSSL_free(ec->encoded_inner);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  196|  7.25k|    ech_free_stashed_key_shares(ec);
  197|  7.25k|    return;
  198|  7.25k|}
ossl_ech_conn_init:
  203|  7.25k|{
  204|  7.25k|    memset(&s->ext.ech, 0, sizeof(s->ext.ech));
  205|  7.25k|    if (ctx->ext.ech.es != NULL
  ------------------
  |  Branch (205:9): [True: 0, False: 7.25k]
  ------------------
  206|      0|        && (s->ext.ech.es = ossl_echstore_dup(ctx->ext.ech.es)) == NULL)
  ------------------
  |  Branch (206:12): [True: 0, False: 0]
  ------------------
  207|      0|        goto err;
  208|  7.25k|    s->ext.ech.cb = ctx->ext.ech.cb;
  209|  7.25k|    if (ctx->ext.ech.alpn_outer != NULL) {
  ------------------
  |  Branch (209:9): [True: 0, False: 7.25k]
  ------------------
  210|      0|        s->ext.ech.alpn_outer = OPENSSL_memdup(ctx->ext.ech.alpn_outer,
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  211|      0|            ctx->ext.ech.alpn_outer_len);
  212|      0|        if (s->ext.ech.alpn_outer == NULL)
  ------------------
  |  Branch (212:13): [True: 0, False: 0]
  ------------------
  213|      0|            goto err;
  214|      0|        s->ext.ech.alpn_outer_len = ctx->ext.ech.alpn_outer_len;
  215|      0|    }
  216|       |    /* initialise type/cid to unknown */
  217|  7.25k|    s->ext.ech.attempted_type = OSSL_ECH_type_unknown;
  ------------------
  |  |   40|  7.25k|#define OSSL_ECH_type_unknown 0xffff
  ------------------
  218|  7.25k|    s->ext.ech.attempted_cid = OSSL_ECH_config_id_unset;
  ------------------
  |  |   42|  7.25k|#define OSSL_ECH_config_id_unset -1
  ------------------
  219|  7.25k|    if (s->ext.ech.es != NULL)
  ------------------
  |  Branch (219:9): [True: 0, False: 7.25k]
  ------------------
  220|      0|        s->ext.ech.attempted = 1;
  221|  7.25k|    if ((ctx->options & SSL_OP_ECH_GREASE) != 0)
  ------------------
  |  |  460|  7.25k|#define SSL_OP_ECH_GREASE SSL_OP_BIT(37)
  |  |  ------------------
  |  |  |  |  351|  7.25k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (221:9): [True: 0, False: 7.25k]
  ------------------
  222|      0|        s->options |= SSL_OP_ECH_GREASE;
  ------------------
  |  |  460|      0|#define SSL_OP_ECH_GREASE SSL_OP_BIT(37)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  223|  7.25k|    return 1;
  224|      0|err:
  225|      0|    OSSL_ECHSTORE_free(s->ext.ech.es);
  226|      0|    s->ext.ech.es = NULL;
  227|      0|    OPENSSL_free(s->ext.ech.alpn_outer);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  228|       |    s->ext.ech.alpn_outer = NULL;
  229|      0|    s->ext.ech.alpn_outer_len = 0;
  230|      0|    return 0;
  231|  7.25k|}
ossl_ech_get_ch_offsets:
 1131|  3.62k|{
 1132|  3.62k|    const unsigned char *ch = NULL;
 1133|  3.62k|    size_t ch_len = 0, exts_len = 0, sni_len = 0, ech_len = 0;
 1134|       |
 1135|  3.62k|    if (s == NULL)
  ------------------
  |  Branch (1135:9): [True: 0, False: 3.62k]
  ------------------
 1136|      0|        return 0;
 1137|  3.62k|    if (pkt == NULL || sessid_off == NULL || exts_off == NULL
  ------------------
  |  Branch (1137:9): [True: 0, False: 3.62k]
  |  Branch (1137:24): [True: 0, False: 3.62k]
  |  Branch (1137:46): [True: 0, False: 3.62k]
  ------------------
 1138|  3.62k|        || ech_off == NULL || echtype == NULL || inner == NULL
  ------------------
  |  Branch (1138:12): [True: 0, False: 3.62k]
  |  Branch (1138:31): [True: 0, False: 3.62k]
  |  Branch (1138:50): [True: 0, False: 3.62k]
  ------------------
 1139|  3.62k|        || sni_off == NULL) {
  ------------------
  |  Branch (1139:12): [True: 0, False: 3.62k]
  ------------------
 1140|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1141|      0|        return 0;
 1142|      0|    }
 1143|       |    /* check if we've already done the work */
 1144|  3.62k|    if (s->ext.ech.ch_offsets_done == 1) {
  ------------------
  |  Branch (1144:9): [True: 0, False: 3.62k]
  ------------------
 1145|      0|        *sessid_off = s->ext.ech.sessid_off;
 1146|      0|        *exts_off = s->ext.ech.exts_off;
 1147|      0|        *ech_off = s->ext.ech.ech_off;
 1148|      0|        *echtype = s->ext.ech.echtype;
 1149|      0|        *inner = s->ext.ech.inner;
 1150|      0|        *sni_off = s->ext.ech.sni_off;
 1151|      0|        return 1;
 1152|      0|    }
 1153|  3.62k|    *sessid_off = 0;
 1154|  3.62k|    *exts_off = 0;
 1155|  3.62k|    *ech_off = 0;
 1156|  3.62k|    *echtype = OSSL_ECH_type_unknown;
  ------------------
  |  |   40|  3.62k|#define OSSL_ECH_type_unknown 0xffff
  ------------------
 1157|  3.62k|    *sni_off = 0;
 1158|       |    /* do the work */
 1159|  3.62k|    ch_len = PACKET_remaining(pkt);
 1160|  3.62k|    if (PACKET_peek_bytes(pkt, &ch, ch_len) != 1) {
  ------------------
  |  Branch (1160:9): [True: 0, False: 3.62k]
  ------------------
 1161|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1162|      0|        return 0;
 1163|      0|    }
 1164|  3.62k|    if (ossl_ech_helper_get_ch_offsets(ch, ch_len, sessid_off, exts_off,
  ------------------
  |  Branch (1164:9): [True: 0, False: 3.62k]
  ------------------
 1165|  3.62k|            &exts_len, ech_off, echtype, &ech_len,
 1166|  3.62k|            sni_off, &sni_len, inner)
 1167|  3.62k|        != 1) {
 1168|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1169|      0|        return 0;
 1170|      0|    }
 1171|  3.62k|#ifdef OSSL_ECH_SUPERVERBOSE
 1172|  3.62k|    OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  219|  3.62k|    do {                           \
  |  |  220|  3.62k|        BIO *trc_out = NULL;       \
  |  |  221|  3.62k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
 1173|      0|    {
 1174|      0|        BIO_printf(trc_out, "orig CH/ECH type: %4x\n", *echtype);
 1175|      0|    }
 1176|  3.62k|    OSSL_TRACE_END(TLS);
  ------------------
  |  |  224|  3.62k|    }                            \
  |  |  225|  3.62k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
 1177|  3.62k|    ossl_ech_pbuf("orig CH", (unsigned char *)ch, ch_len);
 1178|  3.62k|    ossl_ech_pbuf("orig CH exts", (unsigned char *)ch + *exts_off, exts_len);
 1179|  3.62k|    ossl_ech_pbuf("orig CH/ECH", (unsigned char *)ch + *ech_off, ech_len);
 1180|  3.62k|    ossl_ech_pbuf("orig CH SNI", (unsigned char *)ch + *sni_off, sni_len);
 1181|  3.62k|#endif
 1182|  3.62k|    s->ext.ech.sessid_off = *sessid_off;
 1183|  3.62k|    s->ext.ech.exts_off = *exts_off;
 1184|  3.62k|    s->ext.ech.ech_off = *ech_off;
 1185|  3.62k|    s->ext.ech.echtype = *echtype;
 1186|  3.62k|    s->ext.ech.inner = *inner;
 1187|  3.62k|    s->ext.ech.sni_off = *sni_off;
 1188|  3.62k|    s->ext.ech.ch_offsets_done = 1;
 1189|  3.62k|    return 1;
 1190|  3.62k|}
ech_internal.c:ech_free_stashed_key_shares:
  167|  7.25k|{
  168|  7.25k|    size_t i;
  169|       |
  170|  7.25k|    if (ec == NULL)
  ------------------
  |  Branch (170:9): [True: 0, False: 7.25k]
  ------------------
  171|      0|        return;
  172|  7.25k|    for (i = 0; i != ec->num_ks_pkey; i++) {
  ------------------
  |  Branch (172:17): [True: 0, False: 7.25k]
  ------------------
  173|      0|        EVP_PKEY_free(ec->ks_pkey[i]);
  174|       |        ec->ks_pkey[i] = NULL;
  175|      0|    }
  176|  7.25k|    ec->num_ks_pkey = 0;
  177|  7.25k|    return;
  178|  7.25k|}

OSSL_ECHSTORE_free:
  674|  14.6k|{
  675|  14.6k|    if (es == NULL)
  ------------------
  |  Branch (675:9): [True: 14.6k, False: 0]
  ------------------
  676|  14.6k|        return;
  677|      0|    sk_OSSL_ECHSTORE_ENTRY_pop_free(es->entries, ossl_echstore_entry_free);
  678|      0|    OPENSSL_free(es->propq);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  679|      0|    OPENSSL_free(es);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  680|      0|    return;
  681|  14.6k|}

ossl_quic_free_token_store:
 4993|  7.36k|{
 4994|  7.36k|    int refs;
 4995|       |
 4996|  7.36k|    if (hdl == NULL)
  ------------------
  |  Branch (4996:9): [True: 7.36k, False: 0]
  ------------------
 4997|  7.36k|        return;
 4998|       |
 4999|      0|    if (!CRYPTO_DOWN_REF(&hdl->references, &refs))
  ------------------
  |  Branch (4999:9): [True: 0, False: 0]
  ------------------
 5000|      0|        return;
 5001|       |
 5002|      0|    if (refs > 0)
  ------------------
  |  Branch (5002:9): [True: 0, False: 0]
  ------------------
 5003|      0|        return;
 5004|       |
 5005|       |    /* last reference, we can clean up */
 5006|      0|    ossl_crypto_mutex_free(&hdl->mutex);
 5007|      0|    lh_QUIC_TOKEN_doall(hdl->cache, free_this_token);
 5008|      0|    lh_QUIC_TOKEN_free(hdl->cache);
 5009|      0|    CRYPTO_FREE_REF(&hdl->references);
 5010|      0|    OPENSSL_free(hdl);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 5011|      0|    return;
 5012|      0|}

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

tls13_meth.c:tls13_set_crypto_state:
   25|  28.9k|{
   26|  28.9k|    EVP_CIPHER_CTX *ciph_ctx;
   27|  28.9k|    EVP_MAC_CTX *mac_ctx;
   28|  28.9k|    EVP_MAC *mac;
   29|  28.9k|    OSSL_PARAM params[2], *p = params;
   30|  28.9k|    int mode;
   31|  28.9k|    int enc = (rl->direction == OSSL_RECORD_DIRECTION_WRITE) ? 1 : 0;
  ------------------
  |  |   43|  28.9k|#define OSSL_RECORD_DIRECTION_WRITE 1
  ------------------
  |  Branch (31:15): [True: 14.5k, False: 14.4k]
  ------------------
   32|       |
   33|  28.9k|    rl->iv = OPENSSL_malloc(ivlen);
  ------------------
  |  |  107|  28.9k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   34|  28.9k|    if (rl->iv == NULL)
  ------------------
  |  Branch (34:9): [True: 0, False: 28.9k]
  ------------------
   35|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
   36|       |
   37|  28.9k|    rl->nonce = OPENSSL_malloc(ivlen);
  ------------------
  |  |  107|  28.9k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   38|  28.9k|    if (rl->nonce == NULL)
  ------------------
  |  Branch (38:9): [True: 0, False: 28.9k]
  ------------------
   39|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
   40|       |
   41|  28.9k|    memcpy(rl->iv, iv, ivlen);
   42|       |
   43|       |    /* Integrity only */
   44|  28.9k|    if (EVP_CIPHER_is_a(ciph, "NULL") && mactype == NID_hmac && md != NULL) {
  ------------------
  |  | 5446|  28.9k|#define NID_hmac                855
  ------------------
  |  Branch (44:9): [True: 0, False: 28.9k]
  |  Branch (44:42): [True: 0, False: 0]
  |  Branch (44:65): [True: 0, False: 0]
  ------------------
   45|      0|        mac = EVP_MAC_fetch(rl->libctx, "HMAC", rl->propq);
   46|      0|        if (mac == NULL
  ------------------
  |  Branch (46:13): [True: 0, False: 0]
  ------------------
   47|      0|            || (mac_ctx = rl->mac_ctx = EVP_MAC_CTX_new(mac)) == NULL) {
  ------------------
  |  Branch (47:16): [True: 0, False: 0]
  ------------------
   48|      0|            EVP_MAC_free(mac);
   49|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   50|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
   51|      0|        }
   52|      0|        EVP_MAC_free(mac);
   53|      0|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_DIGEST,
  ------------------
  |  |  350|      0|# define OSSL_MAC_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
  |  |  ------------------
  |  |  |  |  127|      0|# define OSSL_ALG_PARAM_DIGEST "digest"
  |  |  ------------------
  ------------------
   54|      0|            (char *)EVP_MD_name(md), 0);
  ------------------
  |  |  455|      0|#define EVP_MD_name EVP_MD_get0_name
  ------------------
   55|      0|        *p = OSSL_PARAM_construct_end();
   56|      0|        if (!EVP_MAC_init(mac_ctx, key, keylen, params)) {
  ------------------
  |  Branch (56:13): [True: 0, False: 0]
  ------------------
   57|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   58|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
   59|      0|        }
   60|      0|        goto end;
   61|      0|    }
   62|       |
   63|  28.9k|    ciph_ctx = rl->enc_ctx = EVP_CIPHER_CTX_new();
   64|  28.9k|    if (ciph_ctx == NULL) {
  ------------------
  |  Branch (64:9): [True: 0, False: 28.9k]
  ------------------
   65|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   66|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
   67|      0|    }
   68|       |
   69|  28.9k|    mode = EVP_CIPHER_get_mode(ciph);
   70|       |
   71|  28.9k|    if (EVP_CipherInit_ex(ciph_ctx, ciph, NULL, NULL, NULL, enc) <= 0
  ------------------
  |  Branch (71:9): [True: 0, False: 28.9k]
  ------------------
   72|  28.9k|        || EVP_CIPHER_CTX_ctrl(ciph_ctx, EVP_CTRL_AEAD_SET_IVLEN, (int)ivlen,
  ------------------
  |  |  287|  28.9k|#define EVP_CTRL_AEAD_SET_IVLEN 0x9
  ------------------
  |  Branch (72:12): [True: 0, False: 28.9k]
  ------------------
   73|  28.9k|               NULL)
   74|  28.9k|            <= 0
   75|  28.9k|        || (mode == EVP_CIPH_CCM_MODE
  ------------------
  |  |  216|  57.9k|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
  |  Branch (75:13): [True: 0, False: 28.9k]
  ------------------
   76|      0|            && EVP_CIPHER_CTX_ctrl(ciph_ctx, EVP_CTRL_AEAD_SET_TAG, (int)taglen,
  ------------------
  |  |  289|      0|#define EVP_CTRL_AEAD_SET_TAG 0x11
  ------------------
  |  Branch (76:16): [True: 0, False: 0]
  ------------------
   77|      0|                   NULL)
   78|      0|                <= 0)
   79|  28.9k|        || EVP_CipherInit_ex(ciph_ctx, NULL, NULL, key, NULL, enc) <= 0) {
  ------------------
  |  Branch (79:12): [True: 0, False: 28.9k]
  ------------------
   80|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   81|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
   82|      0|    }
   83|  28.9k|end:
   84|  28.9k|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  28.9k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
   85|  28.9k|}
tls13_meth.c:tls13_cipher:
   90|  68.6k|{
   91|  68.6k|    EVP_CIPHER_CTX *enc_ctx;
   92|  68.6k|    unsigned char recheader[SSL3_RT_HEADER_LENGTH];
   93|  68.6k|    unsigned char tag[EVP_MAX_MD_SIZE];
   94|  68.6k|    size_t nonce_len, offset, loop, hdrlen, taglen;
   95|  68.6k|    unsigned char *staticiv;
   96|  68.6k|    unsigned char *nonce;
   97|  68.6k|    unsigned char *seq = rl->sequence;
   98|  68.6k|    int lenu, lenf;
   99|  68.6k|    TLS_RL_RECORD *rec = &recs[0];
  100|  68.6k|    WPACKET wpkt;
  101|  68.6k|    const EVP_CIPHER *cipher;
  102|  68.6k|    EVP_MAC_CTX *mac_ctx = NULL;
  103|  68.6k|    int mode;
  104|       |
  105|  68.6k|    if (n_recs != 1) {
  ------------------
  |  Branch (105:9): [True: 0, False: 68.6k]
  ------------------
  106|       |        /* Should not happen */
  107|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  108|      0|        return 0;
  109|      0|    }
  110|       |
  111|  68.6k|    enc_ctx = rl->enc_ctx; /* enc_ctx is ignored when rl->mac_ctx != NULL */
  112|  68.6k|    staticiv = rl->iv;
  113|  68.6k|    nonce = rl->nonce;
  114|       |
  115|  68.6k|    if (enc_ctx == NULL && rl->mac_ctx == NULL) {
  ------------------
  |  Branch (115:9): [True: 0, False: 68.6k]
  |  Branch (115:28): [True: 0, False: 0]
  ------------------
  116|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  117|      0|        return 0;
  118|      0|    }
  119|       |
  120|       |    /*
  121|       |     * If we're sending an alert and ctx != NULL then we must be forcing
  122|       |     * plaintext alerts. If we're reading and ctx != NULL then we allow
  123|       |     * plaintext alerts at certain points in the handshake. If we've got this
  124|       |     * far then we have already validated that a plaintext alert is ok here.
  125|       |     */
  126|  68.6k|    if (rec->type == SSL3_RT_ALERT) {
  ------------------
  |  |  220|  68.6k|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (126:9): [True: 0, False: 68.6k]
  ------------------
  127|      0|        memmove(rec->data, rec->input, rec->length);
  128|      0|        rec->input = rec->data;
  129|      0|        return 1;
  130|      0|    }
  131|       |
  132|       |    /* For integrity-only ciphers, nonce_len is same as MAC size */
  133|  68.6k|    if (rl->mac_ctx != NULL) {
  ------------------
  |  Branch (133:9): [True: 0, False: 68.6k]
  ------------------
  134|      0|        nonce_len = EVP_MAC_CTX_get_mac_size(rl->mac_ctx);
  135|  68.6k|    } else {
  136|  68.6k|        int ivlen = EVP_CIPHER_CTX_get_iv_length(enc_ctx);
  137|       |
  138|  68.6k|        if (ivlen < 0) {
  ------------------
  |  Branch (138:13): [True: 0, False: 68.6k]
  ------------------
  139|       |            /* Should not happen */
  140|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  141|      0|            return 0;
  142|      0|        }
  143|  68.6k|        nonce_len = (size_t)ivlen;
  144|  68.6k|    }
  145|       |
  146|  68.6k|    if (!sending) {
  ------------------
  |  Branch (146:9): [True: 32.5k, False: 36.1k]
  ------------------
  147|       |        /*
  148|       |         * Take off tag. There must be at least one byte of content type as
  149|       |         * well as the tag
  150|       |         */
  151|  32.5k|        if (rec->length < rl->taglen + 1)
  ------------------
  |  Branch (151:13): [True: 0, False: 32.5k]
  ------------------
  152|      0|            return 0;
  153|  32.5k|        rec->length -= rl->taglen;
  154|  32.5k|    }
  155|       |
  156|       |    /* Set up nonce: part of static IV followed by sequence number */
  157|  68.6k|    if (nonce_len < SEQ_NUM_SIZE) {
  ------------------
  |  |   20|  68.6k|#define SEQ_NUM_SIZE 8
  ------------------
  |  Branch (157:9): [True: 0, False: 68.6k]
  ------------------
  158|       |        /* Should not happen */
  159|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  160|      0|        return 0;
  161|      0|    }
  162|  68.6k|    offset = nonce_len - SEQ_NUM_SIZE;
  ------------------
  |  |   20|  68.6k|#define SEQ_NUM_SIZE 8
  ------------------
  163|  68.6k|    memcpy(nonce, staticiv, offset);
  164|   617k|    for (loop = 0; loop < SEQ_NUM_SIZE; loop++)
  ------------------
  |  |   20|   617k|#define SEQ_NUM_SIZE 8
  ------------------
  |  Branch (164:20): [True: 549k, False: 68.6k]
  ------------------
  165|   549k|        nonce[offset + loop] = staticiv[offset + loop] ^ seq[loop];
  166|       |
  167|  68.6k|    if (!tls_increment_sequence_ctr(rl)) {
  ------------------
  |  Branch (167:9): [True: 0, False: 68.6k]
  ------------------
  168|       |        /* RLAYERfatal already called */
  169|      0|        return 0;
  170|      0|    }
  171|       |
  172|       |    /* Set up the AAD */
  173|  68.6k|    if (!WPACKET_init_static_len(&wpkt, recheader, sizeof(recheader), 0)
  ------------------
  |  Branch (173:9): [True: 0, False: 68.6k]
  ------------------
  174|  68.6k|        || !WPACKET_put_bytes_u8(&wpkt, rec->type)
  ------------------
  |  |  909|   137k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (174:12): [True: 0, False: 68.6k]
  ------------------
  175|  68.6k|        || !WPACKET_put_bytes_u16(&wpkt, rec->rec_version)
  ------------------
  |  |  911|   137k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (175:12): [True: 0, False: 68.6k]
  ------------------
  176|  68.6k|        || !WPACKET_put_bytes_u16(&wpkt, rec->length + rl->taglen)
  ------------------
  |  |  911|   137k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (176:12): [True: 0, False: 68.6k]
  ------------------
  177|  68.6k|        || !WPACKET_get_total_written(&wpkt, &hdrlen)
  ------------------
  |  Branch (177:12): [True: 0, False: 68.6k]
  ------------------
  178|  68.6k|        || hdrlen != SSL3_RT_HEADER_LENGTH
  ------------------
  |  |  139|   137k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  |  Branch (178:12): [True: 0, False: 68.6k]
  ------------------
  179|  68.6k|        || !WPACKET_finish(&wpkt)) {
  ------------------
  |  Branch (179:12): [True: 0, False: 68.6k]
  ------------------
  180|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  181|      0|        WPACKET_cleanup(&wpkt);
  182|      0|        return 0;
  183|      0|    }
  184|       |
  185|  68.6k|    if (rl->mac_ctx != NULL) {
  ------------------
  |  Branch (185:9): [True: 0, False: 68.6k]
  ------------------
  186|      0|        int ret = 0;
  187|       |
  188|      0|        if ((mac_ctx = EVP_MAC_CTX_dup(rl->mac_ctx)) == NULL
  ------------------
  |  Branch (188:13): [True: 0, False: 0]
  ------------------
  189|      0|            || !EVP_MAC_update(mac_ctx, nonce, nonce_len)
  ------------------
  |  Branch (189:16): [True: 0, False: 0]
  ------------------
  190|      0|            || !EVP_MAC_update(mac_ctx, recheader, sizeof(recheader))
  ------------------
  |  Branch (190:16): [True: 0, False: 0]
  ------------------
  191|      0|            || !EVP_MAC_update(mac_ctx, rec->input, rec->length)
  ------------------
  |  Branch (191:16): [True: 0, False: 0]
  ------------------
  192|      0|            || !EVP_MAC_final(mac_ctx, tag, &taglen, rl->taglen)) {
  ------------------
  |  Branch (192:16): [True: 0, False: 0]
  ------------------
  193|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  194|      0|            goto end_mac;
  195|      0|        }
  196|       |
  197|      0|        if (sending) {
  ------------------
  |  Branch (197:13): [True: 0, False: 0]
  ------------------
  198|      0|            memcpy(rec->data + rec->length, tag, rl->taglen);
  199|      0|            rec->length += rl->taglen;
  200|      0|        } else if (CRYPTO_memcmp(tag, rec->data + rec->length,
  ------------------
  |  |  332|      0|#define CRYPTO_memcmp memcmp
  ------------------
  |  Branch (200:20): [True: 0, False: 0]
  ------------------
  201|      0|                       rl->taglen)
  202|      0|            != 0) {
  203|      0|            goto end_mac;
  204|      0|        }
  205|      0|        ret = 1;
  206|      0|    end_mac:
  207|      0|        EVP_MAC_CTX_free(mac_ctx);
  208|      0|        return ret;
  209|      0|    }
  210|       |
  211|  68.6k|    cipher = EVP_CIPHER_CTX_get0_cipher(enc_ctx);
  212|  68.6k|    if (cipher == NULL) {
  ------------------
  |  Branch (212:9): [True: 0, False: 68.6k]
  ------------------
  213|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  214|      0|        return 0;
  215|      0|    }
  216|  68.6k|    mode = EVP_CIPHER_get_mode(cipher);
  217|       |
  218|  68.6k|    if (EVP_CipherInit_ex(enc_ctx, NULL, NULL, NULL, nonce, sending) <= 0
  ------------------
  |  Branch (218:9): [True: 0, False: 68.6k]
  ------------------
  219|  68.6k|        || (!sending && EVP_CIPHER_CTX_ctrl(enc_ctx, EVP_CTRL_AEAD_SET_TAG, (int)rl->taglen, rec->data + rec->length) <= 0)) {
  ------------------
  |  |  289|  32.5k|#define EVP_CTRL_AEAD_SET_TAG 0x11
  ------------------
  |  Branch (219:13): [True: 32.5k, False: 36.1k]
  |  Branch (219:25): [True: 0, False: 32.5k]
  ------------------
  220|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  221|      0|        return 0;
  222|      0|    }
  223|       |
  224|       |    /*
  225|       |     * For CCM we must explicitly set the total plaintext length before we add
  226|       |     * any AAD.
  227|       |     */
  228|  68.6k|    if ((mode == EVP_CIPH_CCM_MODE
  ------------------
  |  |  216|   137k|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
  |  Branch (228:10): [True: 0, False: 68.6k]
  ------------------
  229|      0|            && EVP_CipherUpdate(enc_ctx, NULL, &lenu, NULL,
  ------------------
  |  Branch (229:16): [True: 0, False: 0]
  ------------------
  230|      0|                   (unsigned int)rec->length)
  231|      0|                <= 0)
  232|  68.6k|        || EVP_CipherUpdate(enc_ctx, NULL, &lenu, recheader,
  ------------------
  |  Branch (232:12): [True: 0, False: 68.6k]
  ------------------
  233|  68.6k|               sizeof(recheader))
  234|  68.6k|            <= 0
  235|  68.6k|        || EVP_CipherUpdate(enc_ctx, rec->data, &lenu, rec->input,
  ------------------
  |  Branch (235:12): [True: 0, False: 68.6k]
  ------------------
  236|  68.6k|               (unsigned int)rec->length)
  237|  68.6k|            <= 0
  238|  68.6k|        || EVP_CipherFinal_ex(enc_ctx, rec->data + lenu, &lenf) <= 0
  ------------------
  |  Branch (238:12): [True: 0, False: 68.6k]
  ------------------
  239|  68.6k|        || (size_t)(lenu + lenf) != rec->length) {
  ------------------
  |  Branch (239:12): [True: 0, False: 68.6k]
  ------------------
  240|      0|        return 0;
  241|      0|    }
  242|  68.6k|    if (sending) {
  ------------------
  |  Branch (242:9): [True: 36.1k, False: 32.5k]
  ------------------
  243|       |        /* Add the tag */
  244|  36.1k|        if (EVP_CIPHER_CTX_ctrl(enc_ctx, EVP_CTRL_AEAD_GET_TAG, (int)rl->taglen,
  ------------------
  |  |  288|  36.1k|#define EVP_CTRL_AEAD_GET_TAG 0x10
  ------------------
  |  Branch (244:13): [True: 0, False: 36.1k]
  ------------------
  245|  36.1k|                rec->data + rec->length)
  246|  36.1k|            <= 0) {
  247|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  248|      0|            return 0;
  249|      0|        }
  250|  36.1k|        rec->length += rl->taglen;
  251|  36.1k|    }
  252|       |
  253|  68.6k|    return 1;
  254|  68.6k|}
tls13_meth.c:tls13_validate_record_header:
  258|  39.7k|{
  259|  39.7k|    if (rec->type != SSL3_RT_APPLICATION_DATA
  ------------------
  |  |  222|  79.4k|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (259:9): [True: 7.21k, False: 32.5k]
  ------------------
  260|  7.21k|        && (rec->type != SSL3_RT_CHANGE_CIPHER_SPEC
  ------------------
  |  |  219|  14.4k|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (260:13): [True: 0, False: 7.21k]
  ------------------
  261|  7.21k|            || !rl->is_first_handshake)
  ------------------
  |  Branch (261:16): [True: 0, False: 7.21k]
  ------------------
  262|      0|        && (rec->type != SSL3_RT_ALERT || !rl->allow_plain_alerts)) {
  ------------------
  |  |  220|      0|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (262:13): [True: 0, False: 0]
  |  Branch (262:43): [True: 0, False: 0]
  ------------------
  263|      0|        RLAYERfatal(rl, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_BAD_RECORD_TYPE);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  264|      0|        return 0;
  265|      0|    }
  266|       |
  267|  39.7k|    if (rec->rec_version != TLS1_2_VERSION) {
  ------------------
  |  |   26|  39.7k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (267:9): [True: 0, False: 39.7k]
  ------------------
  268|      0|        RLAYERfatal(rl, SSL_AD_DECODE_ERROR, SSL_R_WRONG_VERSION_NUMBER);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  269|      0|        return 0;
  270|      0|    }
  271|       |
  272|  39.7k|    if (rec->length > SSL3_RT_MAX_TLS13_ENCRYPTED_LENGTH) {
  ------------------
  |  |  208|  39.7k|    (SSL3_RT_MAX_PLAIN_LENGTH + SSL3_RT_MAX_TLS13_ENCRYPTED_OVERHEAD)
  |  |  ------------------
  |  |  |  |  177|  39.7k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  |  |  ------------------
  |  |                   (SSL3_RT_MAX_PLAIN_LENGTH + SSL3_RT_MAX_TLS13_ENCRYPTED_OVERHEAD)
  |  |  ------------------
  |  |  |  |  187|  39.7k|#define SSL3_RT_MAX_TLS13_ENCRYPTED_OVERHEAD 256
  |  |  ------------------
  ------------------
  |  Branch (272:9): [True: 0, False: 39.7k]
  ------------------
  273|      0|        RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW,
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  274|      0|            SSL_R_ENCRYPTED_LENGTH_TOO_LONG);
  275|      0|        return 0;
  276|      0|    }
  277|  39.7k|    return 1;
  278|  39.7k|}
tls13_meth.c:tls13_post_process_record:
  281|  32.5k|{
  282|       |    /* Skip this if we've received a plaintext alert */
  283|  32.5k|    if (rec->type != SSL3_RT_ALERT) {
  ------------------
  |  |  220|  32.5k|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (283:9): [True: 32.5k, False: 0]
  ------------------
  284|  32.5k|        size_t end;
  285|       |
  286|  32.5k|        if (rec->length == 0
  ------------------
  |  Branch (286:13): [True: 0, False: 32.5k]
  ------------------
  287|  32.5k|            || rec->type != SSL3_RT_APPLICATION_DATA) {
  ------------------
  |  |  222|  32.5k|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (287:16): [True: 0, False: 32.5k]
  ------------------
  288|      0|            RLAYERfatal(rl, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  289|      0|                SSL_R_BAD_RECORD_TYPE);
  290|      0|            return 0;
  291|      0|        }
  292|       |
  293|       |        /* Strip trailing padding */
  294|  32.5k|        for (end = rec->length - 1; end > 0 && rec->data[end] == 0; end--)
  ------------------
  |  Branch (294:37): [True: 32.5k, False: 0]
  |  Branch (294:48): [True: 0, False: 32.5k]
  ------------------
  295|      0|            continue;
  296|       |
  297|  32.5k|        rec->length = end;
  298|  32.5k|        rec->type = rec->data[end];
  299|  32.5k|    }
  300|       |
  301|  32.5k|    if (rec->length > SSL3_RT_MAX_PLAIN_LENGTH) {
  ------------------
  |  |  177|  32.5k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (301:9): [True: 0, False: 32.5k]
  ------------------
  302|      0|        RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW, SSL_R_DATA_LENGTH_TOO_LONG);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  303|      0|        return 0;
  304|      0|    }
  305|       |
  306|  32.5k|    if (!tls13_common_post_process_record(rl, rec)) {
  ------------------
  |  Branch (306:9): [True: 0, False: 32.5k]
  ------------------
  307|       |        /* RLAYERfatal already called */
  308|      0|        return 0;
  309|      0|    }
  310|       |
  311|  32.5k|    return 1;
  312|  32.5k|}
tls13_meth.c:tls13_get_record_type:
  316|  36.1k|{
  317|  36.1k|    if (rl->allow_plain_alerts && template->type == SSL3_RT_ALERT)
  ------------------
  |  |  220|      0|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (317:9): [True: 0, False: 36.1k]
  |  Branch (317:35): [True: 0, False: 0]
  ------------------
  318|      0|        return SSL3_RT_ALERT;
  ------------------
  |  |  220|      0|#define SSL3_RT_ALERT 21
  ------------------
  319|       |
  320|       |    /*
  321|       |     * Aside from the above case we always use the application data record type
  322|       |     * when encrypting in TLSv1.3. The "inner" record type encodes the "real"
  323|       |     * record type from the template.
  324|       |     */
  325|  36.1k|    return SSL3_RT_APPLICATION_DATA;
  ------------------
  |  |  222|  36.1k|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  326|  36.1k|}
tls13_meth.c:tls13_add_record_padding:
  332|  36.1k|{
  333|  36.1k|    size_t rlen;
  334|       |
  335|       |    /* Nothing to be done in the case of a plaintext alert */
  336|  36.1k|    if (rl->allow_plain_alerts && thistempl->type != SSL3_RT_ALERT)
  ------------------
  |  |  220|      0|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (336:9): [True: 0, False: 36.1k]
  |  Branch (336:35): [True: 0, False: 0]
  ------------------
  337|      0|        return 1;
  338|       |
  339|  36.1k|    if (!WPACKET_put_bytes_u8(thispkt, thistempl->type)) {
  ------------------
  |  |  909|  36.1k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (339:9): [True: 0, False: 36.1k]
  ------------------
  340|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  341|      0|        return 0;
  342|      0|    }
  343|  36.1k|    TLS_RL_RECORD_add_length(thiswr, 1);
  ------------------
  |  |   87|  36.1k|#define TLS_RL_RECORD_add_length(r, l) ((r)->length += (l))
  ------------------
  344|       |
  345|       |    /* Add TLS1.3 padding */
  346|  36.1k|    rlen = TLS_RL_RECORD_get_length(thiswr);
  ------------------
  |  |   85|  36.1k|#define TLS_RL_RECORD_get_length(r) ((r)->length)
  ------------------
  347|  36.1k|    if (rlen < rl->max_frag_len) {
  ------------------
  |  Branch (347:9): [True: 36.1k, False: 13]
  ------------------
  348|  36.1k|        size_t padding = 0;
  349|  36.1k|        size_t max_padding = rl->max_frag_len - rlen;
  350|       |
  351|       |        /*
  352|       |         * We might want to change the "else if" below so that
  353|       |         * library-added padding can still happen even if there
  354|       |         * is an application-layer callback. The reason being
  355|       |         * the application may not be aware that the effectiveness
  356|       |         * of ECH could be damaged if the callback e.g. only
  357|       |         * padded application data. However, doing so would be
  358|       |         * a change that could break some application that has
  359|       |         * a client and server that both know what padding they
  360|       |         * like, and that dislike any other padding. That'd need
  361|       |         * one of those to have been updated though so the
  362|       |         * probability may be low enough that we could change
  363|       |         * the "else if" below to just an "if" and pick the
  364|       |         * larger of the library and callback's idea of padding.
  365|       |         * (Still subject to max_padding though.)
  366|       |         */
  367|  36.1k|        if (rl->padding != NULL) {
  ------------------
  |  Branch (367:13): [True: 0, False: 36.1k]
  ------------------
  368|      0|            padding = rl->padding(rl->cbarg, thistempl->type, rlen);
  369|  36.1k|        } else if (rl->block_padding > 0 || rl->hs_padding > 0) {
  ------------------
  |  Branch (369:20): [True: 0, False: 36.1k]
  |  Branch (369:45): [True: 0, False: 36.1k]
  ------------------
  370|      0|            size_t mask, bp = 0, remainder;
  371|       |
  372|       |            /*
  373|       |             * pad handshake or alert messages based on |hs_padding|
  374|       |             * but application data based on |block_padding|
  375|       |             */
  376|      0|            if (thistempl->type == SSL3_RT_HANDSHAKE && rl->hs_padding > 0)
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (376:17): [True: 0, False: 0]
  |  Branch (376:57): [True: 0, False: 0]
  ------------------
  377|      0|                bp = rl->hs_padding;
  378|      0|            else if (thistempl->type == SSL3_RT_ALERT && rl->hs_padding > 0)
  ------------------
  |  |  220|      0|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (378:22): [True: 0, False: 0]
  |  Branch (378:58): [True: 0, False: 0]
  ------------------
  379|      0|                bp = rl->hs_padding;
  380|      0|            else if (thistempl->type == SSL3_RT_APPLICATION_DATA
  ------------------
  |  |  222|      0|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (380:22): [True: 0, False: 0]
  ------------------
  381|      0|                && rl->block_padding > 0)
  ------------------
  |  Branch (381:20): [True: 0, False: 0]
  ------------------
  382|      0|                bp = rl->block_padding;
  383|      0|            if (bp > 0) {
  ------------------
  |  Branch (383:17): [True: 0, False: 0]
  ------------------
  384|      0|                mask = bp - 1;
  385|       |                /* optimize for power of 2 */
  386|      0|                if ((bp & mask) == 0)
  ------------------
  |  Branch (386:21): [True: 0, False: 0]
  ------------------
  387|      0|                    remainder = rlen & mask;
  388|      0|                else
  389|      0|                    remainder = rlen % bp;
  390|       |                /* don't want to add a block of padding if we don't have to */
  391|      0|                if (remainder == 0)
  ------------------
  |  Branch (391:21): [True: 0, False: 0]
  ------------------
  392|      0|                    padding = 0;
  393|      0|                else
  394|      0|                    padding = bp - remainder;
  395|      0|            }
  396|      0|        }
  397|  36.1k|        if (padding > 0) {
  ------------------
  |  Branch (397:13): [True: 0, False: 36.1k]
  ------------------
  398|       |            /* do not allow the record to exceed max plaintext length */
  399|      0|            if (padding > max_padding)
  ------------------
  |  Branch (399:17): [True: 0, False: 0]
  ------------------
  400|      0|                padding = max_padding;
  401|      0|            if (!WPACKET_memset(thispkt, 0, padding)) {
  ------------------
  |  Branch (401:17): [True: 0, False: 0]
  ------------------
  402|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  403|      0|                    ERR_R_INTERNAL_ERROR);
  404|      0|                return 0;
  405|      0|            }
  406|      0|            TLS_RL_RECORD_add_length(thiswr, padding);
  ------------------
  |  |   87|      0|#define TLS_RL_RECORD_add_length(r, l) ((r)->length += (l))
  ------------------
  407|      0|        }
  408|  36.1k|    }
  409|       |
  410|  36.1k|    return 1;
  411|  36.1k|}

ossl_tls_buffer_release:
   27|  72.5k|{
   28|  72.5k|    OPENSSL_free(b->buf);
  ------------------
  |  |  132|  72.5k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   29|       |    b->buf = NULL;
   30|  72.5k|}
tls_setup_write_buffer:
  144|  50.6k|{
  145|  50.6k|    unsigned char *p;
  146|  50.6k|    size_t maxalign = 0, headerlen;
  147|  50.6k|    TLS_BUFFER *wb;
  148|  50.6k|    size_t currpipe;
  149|  50.6k|    size_t defltlen = 0;
  150|  50.6k|    size_t contenttypelen = 0;
  151|       |
  152|  50.6k|    if (firstlen == 0 || (numwpipes > 1 && nextlen == 0)) {
  ------------------
  |  Branch (152:9): [True: 50.6k, False: 0]
  |  Branch (152:27): [True: 0, False: 0]
  |  Branch (152:44): [True: 0, False: 0]
  ------------------
  153|  50.6k|        if (rl->isdtls)
  ------------------
  |  Branch (153:13): [True: 0, False: 50.6k]
  ------------------
  154|      0|            headerlen = DTLS1_RT_HEADER_LENGTH + 1;
  ------------------
  |  |   41|      0|#define DTLS1_RT_HEADER_LENGTH 13
  ------------------
  155|  50.6k|        else
  156|  50.6k|            headerlen = SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|  50.6k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  157|       |
  158|       |        /* TLSv1.3 adds an extra content type byte after payload data */
  159|  50.6k|        if (rl->version == TLS1_3_VERSION)
  ------------------
  |  |   27|  50.6k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (159:13): [True: 47.0k, False: 3.62k]
  ------------------
  160|  47.0k|            contenttypelen = 1;
  161|       |
  162|  50.6k|#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD != 0
  163|  50.6k|        maxalign = SSL3_ALIGN_PAYLOAD - 1;
  ------------------
  |  |  152|  50.6k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
  164|  50.6k|#endif
  165|       |
  166|  50.6k|        defltlen = maxalign + headerlen + rl->eivlen + rl->max_frag_len
  167|  50.6k|            + contenttypelen + SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD;
  ------------------
  |  |  195|  50.6k|    (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  172|  50.6k|#define SSL_RT_MAX_CIPHER_BLOCK_SIZE 16
  |  |  ------------------
  |  |                   (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  166|  50.6k|#define SSL3_RT_MAX_MD_SIZE 64
  |  |  ------------------
  ------------------
  168|  50.6k|#ifndef OPENSSL_NO_COMP
  169|  50.6k|        if (tls_allow_compression(rl))
  ------------------
  |  Branch (169:13): [True: 0, False: 50.6k]
  ------------------
  170|      0|            defltlen += SSL3_RT_MAX_COMPRESSED_OVERHEAD;
  ------------------
  |  |  179|      0|#define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024
  ------------------
  171|  50.6k|#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|  50.6k|        if ((rl->options & SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS) == 0)
  ------------------
  |  |  378|  50.6k|#define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS SSL_OP_BIT(11)
  |  |  ------------------
  |  |  |  |  351|  50.6k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (177:13): [True: 50.6k, False: 0]
  ------------------
  178|  50.6k|            defltlen += headerlen + maxalign + SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD;
  ------------------
  |  |  195|  50.6k|    (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  172|  50.6k|#define SSL_RT_MAX_CIPHER_BLOCK_SIZE 16
  |  |  ------------------
  |  |                   (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  166|  50.6k|#define SSL3_RT_MAX_MD_SIZE 64
  |  |  ------------------
  ------------------
  179|  50.6k|    }
  180|       |
  181|  50.6k|    wb = rl->wbuf;
  182|   101k|    for (currpipe = 0; currpipe < numwpipes; currpipe++) {
  ------------------
  |  Branch (182:24): [True: 50.6k, False: 50.6k]
  ------------------
  183|  50.6k|        TLS_BUFFER *thiswb = &wb[currpipe];
  184|  50.6k|        size_t len = (currpipe == 0) ? firstlen : nextlen;
  ------------------
  |  Branch (184:22): [True: 50.6k, False: 0]
  ------------------
  185|       |
  186|  50.6k|        if (len == 0)
  ------------------
  |  Branch (186:13): [True: 50.6k, False: 0]
  ------------------
  187|  50.6k|            len = defltlen;
  188|       |
  189|  50.6k|        if (thiswb->len != len) {
  ------------------
  |  Branch (189:13): [True: 25.3k, False: 25.3k]
  ------------------
  190|  25.3k|            OPENSSL_free(thiswb->buf);
  ------------------
  |  |  132|  25.3k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  191|  25.3k|            thiswb->buf = NULL; /* force reallocation */
  192|  25.3k|        }
  193|       |
  194|  50.6k|        p = thiswb->buf;
  195|  50.6k|        if (p == NULL) {
  ------------------
  |  Branch (195:13): [True: 25.3k, False: 25.3k]
  ------------------
  196|  25.3k|            p = OPENSSL_malloc(len);
  ------------------
  |  |  107|  25.3k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  197|  25.3k|            if (p == NULL) {
  ------------------
  |  Branch (197:17): [True: 0, False: 25.3k]
  ------------------
  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);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  206|      0|                return 0;
  207|      0|            }
  208|  25.3k|        }
  209|  50.6k|        memset(thiswb, 0, sizeof(TLS_BUFFER));
  210|  50.6k|        thiswb->buf = p;
  211|  50.6k|        thiswb->len = len;
  212|  50.6k|    }
  213|       |
  214|       |    /* Free any previously allocated buffers that we are no longer using */
  215|  50.6k|    tls_release_write_buffer_int(rl, currpipe);
  216|       |
  217|  50.6k|    rl->numwpipes = numwpipes;
  218|       |
  219|  50.6k|    return 1;
  220|  50.6k|}
tls_setup_read_buffer:
  230|  21.7k|{
  231|  21.7k|    unsigned char *p;
  232|  21.7k|    size_t len, maxalign = 0, headerlen;
  233|  21.7k|    TLS_BUFFER *b;
  234|       |
  235|  21.7k|    b = &rl->rbuf;
  236|       |
  237|  21.7k|    if (rl->isdtls)
  ------------------
  |  Branch (237:9): [True: 0, False: 21.7k]
  ------------------
  238|      0|        headerlen = DTLS1_RT_HEADER_LENGTH;
  ------------------
  |  |   41|      0|#define DTLS1_RT_HEADER_LENGTH 13
  ------------------
  239|  21.7k|    else
  240|  21.7k|        headerlen = SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|  21.7k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  241|       |
  242|  21.7k|#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD != 0
  243|  21.7k|    maxalign = SSL3_ALIGN_PAYLOAD - 1;
  ------------------
  |  |  152|  21.7k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
  244|  21.7k|#endif
  245|       |
  246|  21.7k|    if (b->buf == NULL) {
  ------------------
  |  Branch (246:9): [True: 21.7k, False: 0]
  ------------------
  247|  21.7k|        len = rl->max_frag_len
  248|  21.7k|            + SSL3_RT_MAX_ENCRYPTED_OVERHEAD + headerlen + maxalign;
  ------------------
  |  |  186|  21.7k|#define SSL3_RT_MAX_ENCRYPTED_OVERHEAD (256 + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  166|  21.7k|#define SSL3_RT_MAX_MD_SIZE 64
  |  |  ------------------
  ------------------
  249|  21.7k|#ifndef OPENSSL_NO_COMP
  250|  21.7k|        if (tls_allow_compression(rl))
  ------------------
  |  Branch (250:13): [True: 0, False: 21.7k]
  ------------------
  251|      0|            len += SSL3_RT_MAX_COMPRESSED_OVERHEAD;
  ------------------
  |  |  179|      0|#define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024
  ------------------
  252|  21.7k|#endif
  253|       |
  254|       |        /* Ensure our buffer is large enough to support all our pipelines */
  255|  21.7k|        if (rl->max_pipelines > 1)
  ------------------
  |  Branch (255:13): [True: 0, False: 21.7k]
  ------------------
  256|      0|            len *= rl->max_pipelines;
  257|       |
  258|  21.7k|        if (b->default_len > len)
  ------------------
  |  Branch (258:13): [True: 10.8k, False: 10.8k]
  ------------------
  259|  10.8k|            len = b->default_len;
  260|       |
  261|  21.7k|        if ((p = OPENSSL_malloc(len)) == NULL) {
  ------------------
  |  |  107|  21.7k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (261:13): [True: 0, False: 21.7k]
  ------------------
  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);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  268|      0|            return 0;
  269|      0|        }
  270|  21.7k|        b->buf = p;
  271|  21.7k|        b->len = len;
  272|  21.7k|    }
  273|       |
  274|  21.7k|    return 1;
  275|  21.7k|}
tls_default_read_n:
  296|   112k|{
  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|   112k|    size_t len, left, align = 0;
  307|   112k|    unsigned char *pkt;
  308|   112k|    TLS_BUFFER *rb;
  309|       |
  310|   112k|    if (n == 0)
  ------------------
  |  Branch (310:9): [True: 0, False: 112k]
  ------------------
  311|      0|        return OSSL_RECORD_RETURN_NON_FATAL_ERR;
  ------------------
  |  |   47|      0|#define OSSL_RECORD_RETURN_NON_FATAL_ERR -1
  ------------------
  312|       |
  313|   112k|    rb = &rl->rbuf;
  314|   112k|    left = rb->left;
  315|   112k|#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD != 0
  316|   112k|    align = (size_t)rb->buf + SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|   112k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  317|   112k|    align = SSL3_ALIGN_PAYLOAD - 1 - ((align - 1) % SSL3_ALIGN_PAYLOAD);
  ------------------
  |  |  152|   112k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
                  align = SSL3_ALIGN_PAYLOAD - 1 - ((align - 1) % SSL3_ALIGN_PAYLOAD);
  ------------------
  |  |  152|   112k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
  318|   112k|#endif
  319|       |
  320|   112k|    if (!extend) {
  ------------------
  |  Branch (320:9): [True: 65.8k, False: 46.9k]
  ------------------
  321|       |        /* start with empty packet ... */
  322|  65.8k|        if (left == 0)
  ------------------
  |  Branch (322:13): [True: 58.6k, False: 7.21k]
  ------------------
  323|  58.6k|            rb->offset = align;
  324|       |
  325|  65.8k|        rl->packet = rb->buf + rb->offset;
  326|  65.8k|        rl->packet_length = 0;
  327|       |        /* ... now we can act as if 'extend' was set */
  328|  65.8k|    }
  329|       |
  330|   112k|    if (!ossl_assert(rl->packet != NULL)) {
  ------------------
  |  |   52|   112k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   112k|    __FILE__, __LINE__)
  ------------------
  |  Branch (330:9): [True: 0, False: 112k]
  ------------------
  331|       |        /* does not happen */
  332|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  333|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  334|      0|    }
  335|       |
  336|   112k|    len = rl->packet_length;
  337|   112k|    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|   112k|    if (rl->packet != pkt && clearold == 1) {
  ------------------
  |  Branch (342:9): [True: 7.21k, False: 105k]
  |  Branch (342:30): [True: 7.21k, False: 0]
  ------------------
  343|  7.21k|        memmove(pkt, rl->packet, len + left);
  344|  7.21k|        rl->packet = pkt;
  345|  7.21k|        rb->offset = len + align;
  346|  7.21k|    }
  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|   112k|    if (rl->isdtls) {
  ------------------
  |  Branch (353:9): [True: 0, False: 112k]
  ------------------
  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|   112k|    if (left >= n) {
  ------------------
  |  Branch (366:9): [True: 18.0k, False: 94.8k]
  ------------------
  367|  18.0k|        rl->packet_length += n;
  368|  18.0k|        rb->left = left - n;
  369|  18.0k|        rb->offset += n;
  370|  18.0k|        *readbytes = n;
  371|  18.0k|        return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  18.0k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  372|  18.0k|    }
  373|       |
  374|       |    /* else we need to read more data */
  375|       |
  376|  94.8k|    if (n > rb->len - rb->offset) {
  ------------------
  |  Branch (376:9): [True: 0, False: 94.8k]
  ------------------
  377|       |        /* does not happen */
  378|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      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|  94.8k|    if (!rl->read_ahead && !rl->isdtls) {
  ------------------
  |  Branch (383:9): [True: 87.5k, False: 7.28k]
  |  Branch (383:28): [True: 87.5k, False: 0]
  ------------------
  384|       |        /* ignore max parameter */
  385|  87.5k|        max = n;
  386|  87.5k|    } else {
  387|  7.28k|        if (max < n)
  ------------------
  |  Branch (387:13): [True: 0, False: 7.28k]
  ------------------
  388|      0|            max = n;
  389|  7.28k|        if (max > rb->len - rb->offset)
  ------------------
  |  Branch (389:13): [True: 7.28k, False: 0]
  ------------------
  390|  7.28k|            max = rb->len - rb->offset;
  391|  7.28k|    }
  392|       |
  393|   185k|    while (left < n) {
  ------------------
  |  Branch (393:12): [True: 109k, False: 75.9k]
  ------------------
  394|   109k|        size_t bioread = 0;
  395|   109k|        int ret;
  396|   109k|        BIO *bio = rl->prev != NULL ? rl->prev : rl->bio;
  ------------------
  |  Branch (396:20): [True: 14.4k, False: 94.8k]
  ------------------
  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|   109k|        clear_sys_error();
  ------------------
  |  |   31|   109k|#define clear_sys_error() errno = 0
  ------------------
  405|   109k|        if (bio != NULL) {
  ------------------
  |  Branch (405:13): [True: 109k, False: 0]
  ------------------
  406|   109k|            ret = BIO_read(bio, pkt + len + left, (int)(max - left));
  407|   109k|            if (ret > 0) {
  ------------------
  |  Branch (407:17): [True: 75.9k, False: 33.3k]
  ------------------
  408|  75.9k|                bioread = ret;
  409|  75.9k|                ret = OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  75.9k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  410|  75.9k|            } else if (BIO_should_retry(bio)) {
  ------------------
  |  |  281|  33.3k|#define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
  |  |  ------------------
  |  |  |  |  226|  33.3k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  |  |  |  Branch (281:29): [True: 33.3k, False: 0]
  |  |  ------------------
  ------------------
  411|  33.3k|                if (rl->prev != NULL) {
  ------------------
  |  Branch (411:21): [True: 14.4k, False: 18.8k]
  ------------------
  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|  14.4k|                    BIO_free(rl->prev);
  417|  14.4k|                    rl->prev = NULL;
  418|  14.4k|                    continue;
  419|  14.4k|                }
  420|  18.8k|                ret = OSSL_RECORD_RETURN_RETRY;
  ------------------
  |  |   46|  18.8k|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
  421|  18.8k|            } else if (BIO_eof(bio)) {
  ------------------
  |  Branch (421:24): [True: 0, False: 0]
  ------------------
  422|      0|                ret = OSSL_RECORD_RETURN_EOF;
  ------------------
  |  |   49|      0|#define OSSL_RECORD_RETURN_EOF -3
  ------------------
  423|      0|            } else {
  424|      0|                ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  425|      0|            }
  426|   109k|        } else {
  427|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_READ_BIO_NOT_SET);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  428|      0|            ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  429|      0|        }
  430|       |
  431|  94.8k|        if (ret <= OSSL_RECORD_RETURN_RETRY) {
  ------------------
  |  |   46|  94.8k|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
  |  Branch (431:13): [True: 18.8k, False: 75.9k]
  ------------------
  432|  18.8k|            rb->left = left;
  433|  18.8k|            if ((rl->mode & SSL_MODE_RELEASE_BUFFERS) != 0 && !rl->isdtls)
  ------------------
  |  |  537|  18.8k|#define SSL_MODE_RELEASE_BUFFERS 0x00000010U
  ------------------
  |  Branch (433:17): [True: 0, False: 18.8k]
  |  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|  18.8k|            return ret;
  437|  18.8k|        }
  438|  75.9k|        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|  75.9k|        if (rl->isdtls) {
  ------------------
  |  Branch (444:13): [True: 0, False: 75.9k]
  ------------------
  445|      0|            if (n > left)
  ------------------
  |  Branch (445:17): [True: 0, False: 0]
  ------------------
  446|      0|                n = left; /* makes the while condition false */
  447|      0|        }
  448|  75.9k|    }
  449|       |
  450|       |    /* done reading, now the book-keeping */
  451|  75.9k|    rb->offset += n;
  452|  75.9k|    rb->left = left - n;
  453|  75.9k|    rl->packet_length += n;
  454|  75.9k|    *readbytes = n;
  455|  75.9k|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  75.9k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  456|  94.8k|}
tls_get_more_records:
  544|  65.8k|{
  545|  65.8k|    int enc_err, rret;
  546|  65.8k|    int i;
  547|  65.8k|    size_t more, n;
  548|  65.8k|    TLS_RL_RECORD *rr, *thisrr;
  549|  65.8k|    TLS_BUFFER *rbuf;
  550|  65.8k|    unsigned char *p;
  551|  65.8k|    unsigned char md[EVP_MAX_MD_SIZE];
  552|  65.8k|    unsigned int version;
  553|  65.8k|    size_t mac_size = 0;
  554|  65.8k|    int imac_size;
  555|  65.8k|    size_t num_recs = 0, max_recs, j;
  556|  65.8k|    PACKET pkt;
  557|  65.8k|    SSL_MAC_BUF *macbufs = NULL;
  558|  65.8k|    int ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|  65.8k|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  559|       |
  560|  65.8k|    rr = rl->rrec;
  561|  65.8k|    rbuf = &rl->rbuf;
  562|  65.8k|    if (rbuf->buf == NULL) {
  ------------------
  |  Branch (562:9): [True: 21.7k, False: 44.1k]
  ------------------
  563|  21.7k|        if (!tls_setup_read_buffer(rl)) {
  ------------------
  |  Branch (563:13): [True: 0, False: 21.7k]
  ------------------
  564|       |            /* RLAYERfatal() already called */
  565|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  566|      0|        }
  567|  21.7k|    }
  568|       |
  569|  65.8k|    max_recs = rl->max_pipelines;
  570|       |
  571|  65.8k|    if (max_recs == 0)
  ------------------
  |  Branch (571:9): [True: 65.8k, False: 0]
  ------------------
  572|  65.8k|        max_recs = 1;
  573|       |
  574|  65.8k|    do {
  575|  65.8k|        thisrr = &rr[num_recs];
  576|       |
  577|       |        /* check if we have the header */
  578|  65.8k|        if ((rl->rstate != SSL_ST_READ_BODY) || (rl->packet_length < SSL3_RT_HEADER_LENGTH)) {
  ------------------
  |  | 1184|  65.8k|#define SSL_ST_READ_BODY 0xF1
  ------------------
                      if ((rl->rstate != SSL_ST_READ_BODY) || (rl->packet_length < SSL3_RT_HEADER_LENGTH)) {
  ------------------
  |  |  139|      0|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  |  Branch (578:13): [True: 65.8k, False: 0]
  |  Branch (578:49): [True: 0, False: 0]
  ------------------
  579|  65.8k|            unsigned int type;
  580|       |
  581|  65.8k|            rret = rl->funcs->read_n(rl, SSL3_RT_HEADER_LENGTH,
  ------------------
  |  |  139|  65.8k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  582|  65.8k|                TLS_BUFFER_get_len(rbuf), 0,
  ------------------
  |  |  524|  65.8k|#define TLS_BUFFER_get_len(b) ((b)->len)
  ------------------
  583|  65.8k|                num_recs == 0 ? 1 : 0, &n);
  ------------------
  |  Branch (583:17): [True: 65.8k, False: 0]
  ------------------
  584|       |
  585|  65.8k|            if (rret < OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|  65.8k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (585:17): [True: 18.8k, False: 46.9k]
  ------------------
  586|  18.8k|                return rret; /* error or non-blocking */
  587|       |
  588|  46.9k|            rl->rstate = SSL_ST_READ_BODY;
  ------------------
  |  | 1184|  46.9k|#define SSL_ST_READ_BODY 0xF1
  ------------------
  589|       |
  590|  46.9k|            p = rl->packet;
  591|  46.9k|            if (!PACKET_buf_init(&pkt, p, rl->packet_length)) {
  ------------------
  |  Branch (591:17): [True: 0, False: 46.9k]
  ------------------
  592|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  593|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  594|      0|            }
  595|       |
  596|       |            /* Pull apart the header into the TLS_RL_RECORD */
  597|  46.9k|            if (!PACKET_get_1(&pkt, &type)
  ------------------
  |  Branch (597:17): [True: 0, False: 46.9k]
  ------------------
  598|  46.9k|                || !PACKET_get_net_2(&pkt, &version)
  ------------------
  |  Branch (598:20): [True: 0, False: 46.9k]
  ------------------
  599|  46.9k|                || !PACKET_get_net_2_len(&pkt, &thisrr->length)) {
  ------------------
  |  Branch (599:20): [True: 0, False: 46.9k]
  ------------------
  600|      0|                if (rl->msg_callback != NULL)
  ------------------
  |  Branch (600:21): [True: 0, False: 0]
  ------------------
  601|      0|                    rl->msg_callback(0, 0, SSL3_RT_HEADER, p, 5, rl->cbarg);
  ------------------
  |  |  239|      0|#define SSL3_RT_HEADER 0x100
  ------------------
  602|      0|                RLAYERfatal(rl, SSL_AD_DECODE_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  603|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  604|      0|            }
  605|  46.9k|            thisrr->type = type;
  606|  46.9k|            thisrr->rec_version = version;
  607|       |
  608|  46.9k|            if (rl->msg_callback != NULL)
  ------------------
  |  Branch (608:17): [True: 0, False: 46.9k]
  ------------------
  609|      0|                rl->msg_callback(0, version, SSL3_RT_HEADER, p, 5, rl->cbarg);
  ------------------
  |  |  239|      0|#define SSL3_RT_HEADER 0x100
  ------------------
  610|       |
  611|  46.9k|            if (!rl->funcs->validate_record_header(rl, thisrr)) {
  ------------------
  |  Branch (611:17): [True: 0, False: 46.9k]
  ------------------
  612|       |                /* RLAYERfatal already called */
  613|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  614|      0|            }
  615|       |
  616|  46.9k|            if (thisrr->length > TLS_BUFFER_get_len(rbuf) - SSL3_RT_HEADER_LENGTH) {
  ------------------
  |  |  524|  46.9k|#define TLS_BUFFER_get_len(b) ((b)->len)
  ------------------
                          if (thisrr->length > TLS_BUFFER_get_len(rbuf) - SSL3_RT_HEADER_LENGTH) {
  ------------------
  |  |  139|  46.9k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  |  Branch (616:17): [True: 0, False: 46.9k]
  ------------------
  617|      0|                RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW,
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  618|      0|                    SSL_R_PACKET_LENGTH_TOO_LONG);
  619|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  620|      0|            }
  621|       |
  622|       |            /* now rl->rstate == SSL_ST_READ_BODY */
  623|  46.9k|        }
  624|       |
  625|       |        /*
  626|       |         * rl->rstate == SSL_ST_READ_BODY, get and decode the data. Calculate
  627|       |         * how much more data we need to read for the rest of the record
  628|       |         */
  629|  46.9k|        if (thisrr->rec_version == SSL2_VERSION) {
  ------------------
  |  |   23|  46.9k|#define SSL2_VERSION 0x0002
  ------------------
  |  Branch (629:13): [True: 0, False: 46.9k]
  ------------------
  630|      0|            more = thisrr->length + SSL2_RT_HEADER_LENGTH
  ------------------
  |  |  529|      0|#define SSL2_RT_HEADER_LENGTH 2
  ------------------
  631|      0|                - SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|      0|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  632|  46.9k|        } else {
  633|  46.9k|            more = thisrr->length;
  634|  46.9k|        }
  635|       |
  636|  46.9k|        if (more > 0) {
  ------------------
  |  Branch (636:13): [True: 46.9k, False: 0]
  ------------------
  637|       |            /* now rl->packet_length == SSL3_RT_HEADER_LENGTH */
  638|       |
  639|  46.9k|            rret = rl->funcs->read_n(rl, more, more, 1, 0, &n);
  640|  46.9k|            if (rret < OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|  46.9k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (640:17): [True: 0, False: 46.9k]
  ------------------
  641|      0|                return rret; /* error or non-blocking io */
  642|  46.9k|        }
  643|       |
  644|       |        /* set state for later operations */
  645|  46.9k|        rl->rstate = SSL_ST_READ_HEADER;
  ------------------
  |  | 1183|  46.9k|#define SSL_ST_READ_HEADER 0xF0
  ------------------
  646|       |
  647|       |        /*
  648|       |         * At this point, rl->packet_length == SSL3_RT_HEADER_LENGTH
  649|       |         * + thisrr->length, or rl->packet_length == SSL2_RT_HEADER_LENGTH
  650|       |         * + thisrr->length and we have that many bytes in rl->packet
  651|       |         */
  652|  46.9k|        if (thisrr->rec_version == SSL2_VERSION)
  ------------------
  |  |   23|  46.9k|#define SSL2_VERSION 0x0002
  ------------------
  |  Branch (652:13): [True: 0, False: 46.9k]
  ------------------
  653|      0|            thisrr->input = &(rl->packet[SSL2_RT_HEADER_LENGTH]);
  ------------------
  |  |  529|      0|#define SSL2_RT_HEADER_LENGTH 2
  ------------------
  654|  46.9k|        else
  655|  46.9k|            thisrr->input = &(rl->packet[SSL3_RT_HEADER_LENGTH]);
  ------------------
  |  |  139|  46.9k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  656|       |
  657|       |        /*
  658|       |         * ok, we can now read from 'rl->packet' data into 'thisrr'.
  659|       |         * thisrr->input points at thisrr->length bytes, which need to be copied
  660|       |         * into thisrr->data by either the decryption or by the decompression.
  661|       |         * When the data is 'copied' into the thisrr->data buffer,
  662|       |         * thisrr->input will be updated to point at the new buffer
  663|       |         */
  664|       |
  665|       |        /*
  666|       |         * We now have - encrypted [ MAC [ compressed [ plain ] ] ]
  667|       |         * thisrr->length bytes of encrypted compressed stuff.
  668|       |         */
  669|       |
  670|       |        /* decrypt in place in 'thisrr->input' */
  671|  46.9k|        thisrr->data = thisrr->input;
  672|  46.9k|        thisrr->orig_len = thisrr->length;
  673|       |
  674|  46.9k|        num_recs++;
  675|       |
  676|       |        /* we have pulled in a full packet so zero things */
  677|  46.9k|        rl->packet_length = 0;
  678|  46.9k|        rl->is_first_record = 0;
  679|  46.9k|    } while (num_recs < max_recs
  ------------------
  |  Branch (679:14): [True: 0, False: 46.9k]
  ------------------
  680|      0|        && thisrr->type == SSL3_RT_APPLICATION_DATA
  ------------------
  |  |  222|  46.9k|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (680:12): [True: 0, False: 0]
  ------------------
  681|      0|        && RLAYER_USE_EXPLICIT_IV(rl)
  ------------------
  |  |  394|  46.9k|#define RLAYER_USE_EXPLICIT_IV(rl) ((rl)->version == TLS1_1_VERSION \
  |  |  ------------------
  |  |  |  |   25|      0|#define TLS1_1_VERSION 0x0302
  |  |  ------------------
  |  |  |  Branch (394:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  395|      0|    || (rl)->version == TLS1_2_VERSION                              \
  |  |  ------------------
  |  |  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  |  |  ------------------
  |  |  |  Branch (395:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  396|      0|    || (rl)->version == DTLS1_BAD_VER                               \
  |  |  ------------------
  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  ------------------
  |  |  |  Branch (396:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  397|      0|    || (rl)->version == DTLS1_VERSION                               \
  |  |  ------------------
  |  |  |  |   28|      0|#define DTLS1_VERSION 0xFEFF
  |  |  ------------------
  |  |  |  Branch (397:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  398|  46.9k|    || (rl)->version == DTLS1_2_VERSION)
  |  |  ------------------
  |  |  |  |   29|      0|#define DTLS1_2_VERSION 0xFEFD
  |  |  ------------------
  |  |  |  Branch (398:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  682|      0|        && rl->enc_ctx != NULL
  ------------------
  |  Branch (682:12): [True: 0, False: 0]
  ------------------
  683|      0|        && (EVP_CIPHER_get_flags(EVP_CIPHER_CTX_get0_cipher(rl->enc_ctx))
  ------------------
  |  Branch (683:12): [True: 0, False: 0]
  ------------------
  684|      0|               & EVP_CIPH_FLAG_PIPELINE)
  ------------------
  |  |  259|      0|#define EVP_CIPH_FLAG_PIPELINE 0X800000
  ------------------
  685|      0|            != 0
  686|      0|        && tls_record_app_data_waiting(rl));
  ------------------
  |  Branch (686:12): [True: 0, False: 0]
  ------------------
  687|       |
  688|  46.9k|    if (num_recs == 1
  ------------------
  |  Branch (688:9): [True: 46.9k, False: 0]
  ------------------
  689|  46.9k|        && thisrr->type == SSL3_RT_CHANGE_CIPHER_SPEC
  ------------------
  |  |  219|  93.9k|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (689:12): [True: 7.21k, False: 39.7k]
  ------------------
  690|       |        /* The following can happen in tlsany_meth after HRR */
  691|  7.21k|        && rl->version == TLS1_3_VERSION
  ------------------
  |  |   27|  54.1k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (691:12): [True: 7.21k, False: 0]
  ------------------
  692|  7.21k|        && rl->is_first_handshake) {
  ------------------
  |  Branch (692:12): [True: 7.21k, False: 0]
  ------------------
  693|       |        /*
  694|       |         * CCS messages must be exactly 1 byte long, containing the value 0x01
  695|       |         */
  696|  7.21k|        if (thisrr->length != 1 || thisrr->data[0] != 0x01) {
  ------------------
  |  Branch (696:13): [True: 0, False: 7.21k]
  |  Branch (696:36): [True: 0, False: 7.21k]
  ------------------
  697|      0|            RLAYERfatal(rl, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  698|      0|                SSL_R_INVALID_CCS_MESSAGE);
  699|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  700|      0|        }
  701|       |        /*
  702|       |         * CCS messages are ignored in TLSv1.3. We treat it like an empty
  703|       |         * handshake record - but we still call the msg_callback
  704|       |         */
  705|  7.21k|        if (rl->msg_callback != NULL)
  ------------------
  |  Branch (705:13): [True: 0, False: 7.21k]
  ------------------
  706|      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
  ------------------
  707|      0|                thisrr->data, 1, rl->cbarg);
  708|  7.21k|        thisrr->type = SSL3_RT_HANDSHAKE;
  ------------------
  |  |  221|  7.21k|#define SSL3_RT_HANDSHAKE 22
  ------------------
  709|  7.21k|        if (++(rl->empty_record_count) > MAX_EMPTY_RECORDS) {
  ------------------
  |  |  527|  7.21k|#define MAX_EMPTY_RECORDS 32
  ------------------
  |  Branch (709:13): [True: 0, False: 7.21k]
  ------------------
  710|      0|            RLAYERfatal(rl, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  711|      0|                SSL_R_UNEXPECTED_CCS_MESSAGE);
  712|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  713|      0|        }
  714|  7.21k|        rl->num_recs = 0;
  715|  7.21k|        rl->curr_rec = 0;
  716|  7.21k|        rl->num_released = 0;
  717|       |
  718|  7.21k|        return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  7.21k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  719|  7.21k|    }
  720|       |
  721|  39.7k|    if (rl->md_ctx != NULL) {
  ------------------
  |  Branch (721:9): [True: 0, False: 39.7k]
  ------------------
  722|      0|        const EVP_MD *tmpmd = EVP_MD_CTX_get0_md(rl->md_ctx);
  723|       |
  724|      0|        if (tmpmd != NULL) {
  ------------------
  |  Branch (724:13): [True: 0, False: 0]
  ------------------
  725|      0|            imac_size = EVP_MD_get_size(tmpmd);
  726|      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 (726:17): [True: 0, False: 0]
  ------------------
  727|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  728|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  729|      0|            }
  730|      0|            mac_size = (size_t)imac_size;
  731|      0|        }
  732|      0|    }
  733|       |
  734|       |    /*
  735|       |     * If in encrypt-then-mac mode calculate mac from encrypted record. All
  736|       |     * the details below are public so no timing details can leak.
  737|       |     */
  738|  39.7k|    if (rl->use_etm && rl->md_ctx != NULL) {
  ------------------
  |  Branch (738:9): [True: 0, False: 39.7k]
  |  Branch (738:24): [True: 0, False: 0]
  ------------------
  739|      0|        unsigned char *mac;
  740|       |
  741|      0|        for (j = 0; j < num_recs; j++) {
  ------------------
  |  Branch (741:21): [True: 0, False: 0]
  ------------------
  742|      0|            thisrr = &rr[j];
  743|       |
  744|      0|            if (thisrr->length < mac_size) {
  ------------------
  |  Branch (744:17): [True: 0, False: 0]
  ------------------
  745|      0|                RLAYERfatal(rl, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_TOO_SHORT);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  746|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  747|      0|            }
  748|      0|            thisrr->length -= mac_size;
  749|      0|            mac = thisrr->data + thisrr->length;
  750|      0|            i = rl->funcs->mac(rl, thisrr, md, 0 /* not send */);
  751|      0|            if (i == 0 || CRYPTO_memcmp(md, mac, mac_size) != 0) {
  ------------------
  |  |  332|      0|#define CRYPTO_memcmp memcmp
  ------------------
  |  Branch (751:17): [True: 0, False: 0]
  |  Branch (751:27): [True: 0, False: 0]
  ------------------
  752|      0|                RLAYERfatal(rl, SSL_AD_BAD_RECORD_MAC,
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  753|      0|                    SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC);
  754|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  755|      0|            }
  756|      0|        }
  757|       |        /*
  758|       |         * We've handled the mac now - there is no MAC inside the encrypted
  759|       |         * record
  760|       |         */
  761|      0|        mac_size = 0;
  762|      0|    }
  763|       |
  764|  39.7k|    if (mac_size > 0) {
  ------------------
  |  Branch (764:9): [True: 0, False: 39.7k]
  ------------------
  765|      0|        macbufs = OPENSSL_calloc(num_recs, sizeof(*macbufs));
  ------------------
  |  |  113|      0|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  766|      0|        if (macbufs == NULL) {
  ------------------
  |  Branch (766:13): [True: 0, False: 0]
  ------------------
  767|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  768|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  769|      0|        }
  770|      0|    }
  771|       |
  772|  39.7k|    ERR_set_mark();
  773|  39.7k|    enc_err = rl->funcs->cipher(rl, rr, num_recs, 0, macbufs, mac_size);
  774|       |
  775|       |    /*-
  776|       |     * enc_err is:
  777|       |     *    0: if the record is publicly invalid, or an internal error, or AEAD
  778|       |     *       decryption failed, or ETM decryption failed.
  779|       |     *    1: Success or MTE decryption failed (MAC will be randomised)
  780|       |     */
  781|  39.7k|    if (enc_err == 0) {
  ------------------
  |  Branch (781:9): [True: 0, False: 39.7k]
  ------------------
  782|      0|        if (rl->alert != SSL_AD_NO_ALERT) {
  ------------------
  |  |   67|      0|#define SSL_AD_NO_ALERT -1
  ------------------
  |  Branch (782:13): [True: 0, False: 0]
  ------------------
  783|       |            /* RLAYERfatal() already got called */
  784|      0|            ERR_clear_last_mark();
  785|      0|            goto end;
  786|      0|        }
  787|      0|        if (num_recs == 1
  ------------------
  |  Branch (787:13): [True: 0, False: 0]
  ------------------
  788|      0|            && rl->skip_early_data != NULL
  ------------------
  |  Branch (788:16): [True: 0, False: 0]
  ------------------
  789|      0|            && rl->skip_early_data(rl->cbarg)) {
  ------------------
  |  Branch (789:16): [True: 0, False: 0]
  ------------------
  790|       |            /*
  791|       |             * Valid early_data that we cannot decrypt will fail here. We treat
  792|       |             * it like an empty record.
  793|       |             */
  794|       |
  795|       |            /*
  796|       |             * Remove any errors from the stack. Decryption failures are normal
  797|       |             * behaviour.
  798|       |             */
  799|      0|            ERR_pop_to_mark();
  800|       |
  801|      0|            thisrr = &rr[0];
  802|       |
  803|      0|            if (!rlayer_early_data_count_ok(rl, thisrr->length,
  ------------------
  |  Branch (803:17): [True: 0, False: 0]
  ------------------
  804|      0|                    EARLY_DATA_CIPHERTEXT_OVERHEAD, 0)) {
  ------------------
  |  |  626|      0|#define EARLY_DATA_CIPHERTEXT_OVERHEAD ((6 * (EVP_GCM_TLS_TAG_LEN + 1)) + 2)
  |  |  ------------------
  |  |  |  |  375|      0|#define EVP_GCM_TLS_TAG_LEN 16
  |  |  ------------------
  ------------------
  805|       |                /* RLAYERfatal() already called */
  806|      0|                goto end;
  807|      0|            }
  808|       |
  809|      0|            thisrr->length = 0;
  810|      0|            rl->num_recs = 0;
  811|      0|            rl->curr_rec = 0;
  812|      0|            rl->num_released = 0;
  813|       |            /* Reset the read sequence */
  814|      0|            memset(rl->sequence, 0, sizeof(rl->sequence));
  815|      0|            ret = 1;
  816|      0|            goto end;
  817|      0|        }
  818|      0|        ERR_clear_last_mark();
  819|      0|        RLAYERfatal(rl, SSL_AD_BAD_RECORD_MAC,
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  820|      0|            SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC);
  821|      0|        goto end;
  822|  39.7k|    } else {
  823|  39.7k|        ERR_clear_last_mark();
  824|  39.7k|    }
  825|  39.7k|    OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  219|  39.7k|    do {                           \
  |  |  220|  39.7k|        BIO *trc_out = NULL;       \
  |  |  221|  39.7k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 39.7k]
  |  |  ------------------
  ------------------
  826|      0|    {
  827|      0|        BIO_printf(trc_out, "dec %lu\n", (unsigned long)rr[0].length);
  828|      0|        BIO_dump_indent(trc_out, rr[0].data, (int)rr[0].length, 4);
  829|      0|    }
  830|  39.7k|    OSSL_TRACE_END(TLS);
  ------------------
  |  |  224|  39.7k|    }                            \
  |  |  225|  39.7k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 39.7k]
  |  |  ------------------
  ------------------
  831|       |
  832|       |    /* r->length is now the compressed data plus mac */
  833|  39.7k|    if (rl->enc_ctx != NULL
  ------------------
  |  Branch (833:9): [True: 32.5k, False: 7.25k]
  ------------------
  834|  32.5k|        && !rl->use_etm
  ------------------
  |  Branch (834:12): [True: 32.5k, False: 0]
  ------------------
  835|  32.5k|        && EVP_MD_CTX_get0_md(rl->md_ctx) != NULL) {
  ------------------
  |  Branch (835:12): [True: 0, False: 32.5k]
  ------------------
  836|      0|        for (j = 0; j < num_recs; j++) {
  ------------------
  |  Branch (836:21): [True: 0, False: 0]
  ------------------
  837|      0|            SSL_MAC_BUF *thismb = &macbufs[j];
  838|       |
  839|      0|            thisrr = &rr[j];
  840|       |
  841|      0|            i = rl->funcs->mac(rl, thisrr, md, 0 /* not send */);
  842|      0|            if (i == 0 || thismb == NULL || thismb->mac == NULL
  ------------------
  |  Branch (842:17): [True: 0, False: 0]
  |  Branch (842:27): [True: 0, False: 0]
  |  Branch (842:45): [True: 0, False: 0]
  ------------------
  843|      0|                || CRYPTO_memcmp(md, thismb->mac, (size_t)mac_size) != 0)
  ------------------
  |  |  332|      0|#define CRYPTO_memcmp memcmp
  ------------------
  |  Branch (843:20): [True: 0, False: 0]
  ------------------
  844|      0|                enc_err = 0;
  845|      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 (845:17): [True: 0, False: 0]
  ------------------
  846|      0|                enc_err = 0;
  847|      0|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
  848|      0|            if (enc_err == 0 && mac_size > 0 && thismb != NULL && thismb->mac != NULL && (md[0] ^ thismb->mac[0]) != 0xFF) {
  ------------------
  |  Branch (848:17): [True: 0, False: 0]
  |  Branch (848:33): [True: 0, False: 0]
  |  Branch (848:49): [True: 0, False: 0]
  |  Branch (848:67): [True: 0, False: 0]
  |  Branch (848:90): [True: 0, False: 0]
  ------------------
  849|      0|                enc_err = 1;
  850|      0|            }
  851|      0|#endif
  852|      0|        }
  853|      0|    }
  854|       |
  855|  39.7k|    if (enc_err == 0) {
  ------------------
  |  Branch (855:9): [True: 0, False: 39.7k]
  ------------------
  856|      0|        if (rl->alert != SSL_AD_NO_ALERT) {
  ------------------
  |  |   67|      0|#define SSL_AD_NO_ALERT -1
  ------------------
  |  Branch (856:13): [True: 0, False: 0]
  ------------------
  857|       |            /* We already called RLAYERfatal() */
  858|      0|            goto end;
  859|      0|        }
  860|       |        /*
  861|       |         * A separate 'decryption_failed' alert was introduced with TLS 1.0,
  862|       |         * SSL 3.0 only has 'bad_record_mac'.  But unless a decryption
  863|       |         * failure is directly visible from the ciphertext anyway, we should
  864|       |         * not reveal which kind of error occurred -- this might become
  865|       |         * visible to an attacker (e.g. via a logfile)
  866|       |         */
  867|      0|        RLAYERfatal(rl, SSL_AD_BAD_RECORD_MAC,
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  868|      0|            SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC);
  869|      0|        goto end;
  870|      0|    }
  871|       |
  872|  79.5k|    for (j = 0; j < num_recs; j++) {
  ------------------
  |  Branch (872:17): [True: 39.7k, False: 39.7k]
  ------------------
  873|  39.7k|        thisrr = &rr[j];
  874|       |
  875|  39.7k|        if (!rl->funcs->post_process_record(rl, thisrr)) {
  ------------------
  |  Branch (875:13): [True: 0, False: 39.7k]
  ------------------
  876|       |            /* RLAYERfatal already called */
  877|      0|            goto end;
  878|      0|        }
  879|       |
  880|       |        /*
  881|       |         * Record overflow checking (e.g. checking if
  882|       |         * thisrr->length > SSL3_RT_MAX_PLAIN_LENGTH) is the responsibility of
  883|       |         * the post_process_record() function above. However we check here if
  884|       |         * the received packet overflows the current Max Fragment Length setting
  885|       |         * if there is one.
  886|       |         * Note: rl->max_frag_len != SSL3_RT_MAX_PLAIN_LENGTH and KTLS are
  887|       |         * mutually exclusive. Also note that with KTLS thisrr->length can
  888|       |         * be > SSL3_RT_MAX_PLAIN_LENGTH (and rl->max_frag_len must be ignored)
  889|       |         */
  890|  39.7k|        if (rl->max_frag_len != SSL3_RT_MAX_PLAIN_LENGTH
  ------------------
  |  |  177|  79.5k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (890:13): [True: 0, False: 39.7k]
  ------------------
  891|      0|            && thisrr->length > rl->max_frag_len) {
  ------------------
  |  Branch (891:16): [True: 0, False: 0]
  ------------------
  892|      0|            RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW, SSL_R_DATA_LENGTH_TOO_LONG);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  893|      0|            goto end;
  894|      0|        }
  895|       |
  896|  39.7k|        thisrr->off = 0;
  897|       |        /*-
  898|       |         * So at this point the following is true
  899|       |         * thisrr->type   is the type of record
  900|       |         * thisrr->length == number of bytes in record
  901|       |         * thisrr->off    == offset to first valid byte
  902|       |         * thisrr->data   == where to take bytes from, increment after use :-).
  903|       |         */
  904|       |
  905|       |        /* just read a 0 length packet */
  906|  39.7k|        if (thisrr->length == 0) {
  ------------------
  |  Branch (906:13): [True: 0, False: 39.7k]
  ------------------
  907|      0|            if (++(rl->empty_record_count) > MAX_EMPTY_RECORDS) {
  ------------------
  |  |  527|      0|#define MAX_EMPTY_RECORDS 32
  ------------------
  |  Branch (907:17): [True: 0, False: 0]
  ------------------
  908|      0|                RLAYERfatal(rl, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  909|      0|                    SSL_R_RECORD_TOO_SMALL);
  910|      0|                goto end;
  911|      0|            }
  912|  39.7k|        } else {
  913|  39.7k|            rl->empty_record_count = 0;
  914|  39.7k|        }
  915|  39.7k|    }
  916|       |
  917|  39.7k|    if (rl->level == OSSL_RECORD_PROTECTION_LEVEL_EARLY) {
  ------------------
  |  | 2929|  39.7k|#define OSSL_RECORD_PROTECTION_LEVEL_EARLY 1
  ------------------
  |  Branch (917:9): [True: 0, False: 39.7k]
  ------------------
  918|      0|        thisrr = &rr[0];
  919|      0|        if (thisrr->type == SSL3_RT_APPLICATION_DATA
  ------------------
  |  |  222|      0|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (919:13): [True: 0, False: 0]
  ------------------
  920|      0|            && !rlayer_early_data_count_ok(rl, thisrr->length, 0, 0)) {
  ------------------
  |  Branch (920:16): [True: 0, False: 0]
  ------------------
  921|       |            /* RLAYERfatal already called */
  922|      0|            goto end;
  923|      0|        }
  924|      0|    }
  925|       |
  926|  39.7k|    rl->num_recs = num_recs;
  927|  39.7k|    rl->curr_rec = 0;
  928|  39.7k|    rl->num_released = 0;
  929|  39.7k|    ret = OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  39.7k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  930|  39.7k|end:
  931|  39.7k|    if (macbufs != NULL) {
  ------------------
  |  Branch (931:9): [True: 0, False: 39.7k]
  ------------------
  932|      0|        for (j = 0; j < num_recs; j++) {
  ------------------
  |  Branch (932:21): [True: 0, False: 0]
  ------------------
  933|      0|            if (macbufs[j].alloced)
  ------------------
  |  Branch (933:17): [True: 0, False: 0]
  ------------------
  934|      0|                OPENSSL_free(macbufs[j].mac);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  935|      0|        }
  936|      0|        OPENSSL_free(macbufs);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  937|      0|    }
  938|  39.7k|    return ret;
  939|  39.7k|}
tls_default_post_process_record:
 1015|  7.25k|{
 1016|  7.25k|    if (rl->compctx != NULL) {
  ------------------
  |  Branch (1016:9): [True: 0, False: 7.25k]
  ------------------
 1017|      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 (1017:13): [True: 0, False: 0]
  ------------------
 1018|      0|            RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW,
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1019|      0|                SSL_R_COMPRESSED_LENGTH_TOO_LONG);
 1020|      0|            return 0;
 1021|      0|        }
 1022|      0|        if (!tls_do_uncompress(rl, rec)) {
  ------------------
  |  Branch (1022:13): [True: 0, False: 0]
  ------------------
 1023|      0|            RLAYERfatal(rl, SSL_AD_DECOMPRESSION_FAILURE,
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1024|      0|                SSL_R_BAD_DECOMPRESSION);
 1025|      0|            return 0;
 1026|      0|        }
 1027|      0|    }
 1028|       |
 1029|  7.25k|    if (rec->length > SSL3_RT_MAX_PLAIN_LENGTH) {
  ------------------
  |  |  177|  7.25k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (1029:9): [True: 0, False: 7.25k]
  ------------------
 1030|      0|        RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW, SSL_R_DATA_LENGTH_TOO_LONG);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1031|      0|        return 0;
 1032|      0|    }
 1033|       |
 1034|  7.25k|    return 1;
 1035|  7.25k|}
tls13_common_post_process_record:
 1039|  32.5k|{
 1040|  32.5k|    if (rec->type != SSL3_RT_APPLICATION_DATA
  ------------------
  |  |  222|  65.0k|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (1040:9): [True: 28.2k, False: 4.23k]
  ------------------
 1041|  28.2k|        && rec->type != SSL3_RT_ALERT
  ------------------
  |  |  220|  60.7k|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (1041:12): [True: 25.2k, False: 3.01k]
  ------------------
 1042|  25.2k|        && rec->type != SSL3_RT_HANDSHAKE) {
  ------------------
  |  |  221|  25.2k|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (1042:12): [True: 0, False: 25.2k]
  ------------------
 1043|      0|        RLAYERfatal(rl, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_BAD_RECORD_TYPE);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1044|      0|        return 0;
 1045|      0|    }
 1046|       |
 1047|  32.5k|    if (rl->msg_callback != NULL) {
  ------------------
  |  Branch (1047:9): [True: 0, False: 32.5k]
  ------------------
 1048|      0|        unsigned char ctype = (unsigned char)rec->type;
 1049|       |
 1050|      0|        rl->msg_callback(0, rl->version, SSL3_RT_INNER_CONTENT_TYPE, &ctype,
  ------------------
  |  |  240|      0|#define SSL3_RT_INNER_CONTENT_TYPE 0x101
  ------------------
 1051|      0|            1, rl->cbarg);
 1052|      0|    }
 1053|       |
 1054|       |    /*
 1055|       |     * TLSv1.3 alert and handshake records are required to be non-zero in
 1056|       |     * length.
 1057|       |     */
 1058|  32.5k|    if ((rec->type == SSL3_RT_HANDSHAKE || rec->type == SSL3_RT_ALERT)
  ------------------
  |  |  221|  65.0k|#define SSL3_RT_HANDSHAKE 22
  ------------------
                  if ((rec->type == SSL3_RT_HANDSHAKE || rec->type == SSL3_RT_ALERT)
  ------------------
  |  |  220|  7.24k|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (1058:10): [True: 25.2k, False: 7.24k]
  |  Branch (1058:44): [True: 3.01k, False: 4.23k]
  ------------------
 1059|  28.2k|        && rec->length == 0) {
  ------------------
  |  Branch (1059:12): [True: 0, False: 28.2k]
  ------------------
 1060|      0|        RLAYERfatal(rl, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_BAD_LENGTH);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1061|      0|        return 0;
 1062|      0|    }
 1063|       |
 1064|  32.5k|    return 1;
 1065|  32.5k|}
tls_read_record:
 1070|  58.6k|{
 1071|  58.6k|    TLS_RL_RECORD *rec;
 1072|       |
 1073|       |    /*
 1074|       |     * tls_get_more_records() can return success without actually reading
 1075|       |     * anything useful (i.e. if empty records are read). We loop here until
 1076|       |     * we have something useful. tls_get_more_records() will eventually fail if
 1077|       |     * too many sequential empty records are read.
 1078|       |     */
 1079|   105k|    while (rl->curr_rec >= rl->num_recs) {
  ------------------
  |  Branch (1079:12): [True: 65.8k, False: 39.7k]
  ------------------
 1080|  65.8k|        int ret;
 1081|       |
 1082|  65.8k|        if (rl->num_released != rl->num_recs) {
  ------------------
  |  Branch (1082:13): [True: 0, False: 65.8k]
  ------------------
 1083|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_RECORDS_NOT_RELEASED);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1084|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1085|      0|        }
 1086|       |
 1087|  65.8k|        ret = rl->funcs->get_more_records(rl);
 1088|       |
 1089|  65.8k|        if (ret != OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|  65.8k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1089:13): [True: 18.8k, False: 46.9k]
  ------------------
 1090|  18.8k|            return ret;
 1091|  65.8k|    }
 1092|       |
 1093|       |    /*
 1094|       |     * We have now got rl->num_recs records buffered in rl->rrec. rl->curr_rec
 1095|       |     * points to the next one to read.
 1096|       |     */
 1097|  39.7k|    rec = &rl->rrec[rl->curr_rec++];
 1098|       |
 1099|  39.7k|    *rechandle = rec;
 1100|  39.7k|    *rversion = rec->rec_version;
 1101|  39.7k|    *type = rec->type;
 1102|  39.7k|    *data = rec->data + rec->off;
 1103|  39.7k|    *datalen = rec->length;
 1104|  39.7k|    if (rl->isdtls) {
  ------------------
  |  Branch (1104:9): [True: 0, False: 39.7k]
  ------------------
 1105|      0|        *epoch = rec->epoch;
 1106|      0|        memcpy(seq_num, rec->seq_num, sizeof(rec->seq_num));
 1107|      0|    }
 1108|       |
 1109|  39.7k|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  39.7k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1110|  58.6k|}
tls_release_record:
 1113|  72.4k|{
 1114|  72.4k|    TLS_RL_RECORD *rec = &rl->rrec[rl->num_released];
 1115|       |
 1116|  72.4k|    if (!ossl_assert(rl->num_released < rl->curr_rec)
  ------------------
  |  |   52|   144k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   144k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1116:9): [True: 0, False: 72.4k]
  ------------------
 1117|  72.4k|        || !ossl_assert(rechandle == rec)) {
  ------------------
  |  |   52|  72.4k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  72.4k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1117:12): [True: 0, False: 72.4k]
  ------------------
 1118|       |        /* Should not happen */
 1119|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_INVALID_RECORD);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1120|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1121|      0|    }
 1122|       |
 1123|  72.4k|    if (rec->length < length) {
  ------------------
  |  Branch (1123:9): [True: 0, False: 72.4k]
  ------------------
 1124|       |        /* Should not happen */
 1125|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1126|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1127|      0|    }
 1128|       |
 1129|  72.4k|    if ((rl->options & SSL_OP_CLEANSE_PLAINTEXT) != 0)
  ------------------
  |  |  359|  72.4k|#define SSL_OP_CLEANSE_PLAINTEXT SSL_OP_BIT(1)
  |  |  ------------------
  |  |  |  |  351|  72.4k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1129:9): [True: 0, False: 72.4k]
  ------------------
 1130|      0|        OPENSSL_cleanse(rec->data + rec->off, length);
 1131|       |
 1132|  72.4k|    rec->off += length;
 1133|  72.4k|    rec->length -= length;
 1134|       |
 1135|  72.4k|    if (rec->length > 0)
  ------------------
  |  Branch (1135:9): [True: 32.6k, False: 39.7k]
  ------------------
 1136|  32.6k|        return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  32.6k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1137|       |
 1138|  39.7k|    rl->num_released++;
 1139|       |
 1140|  39.7k|    if (rl->curr_rec == rl->num_released
  ------------------
  |  Branch (1140:9): [True: 39.7k, False: 0]
  ------------------
 1141|  39.7k|        && (rl->mode & SSL_MODE_RELEASE_BUFFERS) != 0
  ------------------
  |  |  537|  39.7k|#define SSL_MODE_RELEASE_BUFFERS 0x00000010U
  ------------------
  |  Branch (1141:12): [True: 0, False: 39.7k]
  ------------------
 1142|      0|        && TLS_BUFFER_get_left(&rl->rbuf) == 0)
  ------------------
  |  |  525|      0|#define TLS_BUFFER_get_left(b) ((b)->left)
  ------------------
  |  Branch (1142:12): [True: 0, False: 0]
  ------------------
 1143|      0|        tls_release_read_buffer(rl);
 1144|       |
 1145|  39.7k|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  39.7k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1146|  72.4k|}
tls_set_options:
 1149|  76.1k|{
 1150|  76.1k|    const OSSL_PARAM *p;
 1151|       |
 1152|  76.1k|    p = OSSL_PARAM_locate_const(options, OSSL_LIBSSL_RECORD_LAYER_PARAM_OPTIONS);
  ------------------
  |  |  340|  76.1k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_OPTIONS "options"
  ------------------
 1153|  76.1k|    if (p != NULL && !OSSL_PARAM_get_uint64(p, &rl->options)) {
  ------------------
  |  Branch (1153:9): [True: 72.5k, False: 3.62k]
  |  Branch (1153:22): [True: 0, False: 72.5k]
  ------------------
 1154|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1155|      0|        return 0;
 1156|      0|    }
 1157|       |
 1158|  76.1k|    p = OSSL_PARAM_locate_const(options, OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE);
  ------------------
  |  |  339|  76.1k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE "mode"
  ------------------
 1159|  76.1k|    if (p != NULL && !OSSL_PARAM_get_uint32(p, &rl->mode)) {
  ------------------
  |  Branch (1159:9): [True: 76.1k, False: 0]
  |  Branch (1159:22): [True: 0, False: 76.1k]
  ------------------
 1160|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1161|      0|        return 0;
 1162|      0|    }
 1163|       |
 1164|  76.1k|    if (rl->direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|  76.1k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1164:9): [True: 39.8k, False: 36.2k]
  ------------------
 1165|  39.8k|        p = OSSL_PARAM_locate_const(options,
 1166|  39.8k|            OSSL_LIBSSL_RECORD_LAYER_READ_BUFFER_LEN);
  ------------------
  |  |  345|  39.8k|# define OSSL_LIBSSL_RECORD_LAYER_READ_BUFFER_LEN "read_buffer_len"
  ------------------
 1167|  39.8k|        if (p != NULL && !OSSL_PARAM_get_size_t(p, &rl->rbuf.default_len)) {
  ------------------
  |  Branch (1167:13): [True: 36.2k, False: 3.62k]
  |  Branch (1167:26): [True: 0, False: 36.2k]
  ------------------
 1168|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1169|      0|            return 0;
 1170|      0|        }
 1171|  39.8k|    } else {
 1172|  36.2k|        p = OSSL_PARAM_locate_const(options,
 1173|  36.2k|            OSSL_LIBSSL_RECORD_LAYER_PARAM_BLOCK_PADDING);
  ------------------
  |  |  335|  36.2k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_BLOCK_PADDING "block_padding"
  ------------------
 1174|  36.2k|        if (p != NULL && !OSSL_PARAM_get_size_t(p, &rl->block_padding)) {
  ------------------
  |  Branch (1174:13): [True: 36.2k, False: 0]
  |  Branch (1174:26): [True: 0, False: 36.2k]
  ------------------
 1175|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1176|      0|            return 0;
 1177|      0|        }
 1178|  36.2k|        p = OSSL_PARAM_locate_const(options,
 1179|  36.2k|            OSSL_LIBSSL_RECORD_LAYER_PARAM_HS_PADDING);
  ------------------
  |  |  336|  36.2k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_HS_PADDING "hs_padding"
  ------------------
 1180|  36.2k|        if (p != NULL && !OSSL_PARAM_get_size_t(p, &rl->hs_padding)) {
  ------------------
  |  Branch (1180:13): [True: 36.2k, False: 0]
  |  Branch (1180:26): [True: 0, False: 36.2k]
  ------------------
 1181|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1182|      0|            return 0;
 1183|      0|        }
 1184|  36.2k|    }
 1185|       |
 1186|  76.1k|    if (rl->level == OSSL_RECORD_PROTECTION_LEVEL_APPLICATION) {
  ------------------
  |  | 2931|  76.1k|#define OSSL_RECORD_PROTECTION_LEVEL_APPLICATION 3
  ------------------
  |  Branch (1186:9): [True: 14.4k, False: 61.6k]
  ------------------
 1187|       |        /*
 1188|       |         * We ignore any read_ahead setting prior to the application protection
 1189|       |         * level. Otherwise we may read ahead data in a lower protection level
 1190|       |         * that is destined for a higher protection level. To simplify the logic
 1191|       |         * we don't support that at this stage.
 1192|       |         */
 1193|  14.4k|        p = OSSL_PARAM_locate_const(options,
 1194|  14.4k|            OSSL_LIBSSL_RECORD_LAYER_PARAM_READ_AHEAD);
  ------------------
  |  |  341|  14.4k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_READ_AHEAD "read_ahead"
  ------------------
 1195|  14.4k|        if (p != NULL && !OSSL_PARAM_get_int(p, &rl->read_ahead)) {
  ------------------
  |  Branch (1195:13): [True: 7.21k, False: 7.25k]
  |  Branch (1195:26): [True: 0, False: 7.21k]
  ------------------
 1196|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1197|      0|            return 0;
 1198|      0|        }
 1199|  14.4k|    }
 1200|       |
 1201|  76.1k|    return 1;
 1202|  76.1k|}
tls_int_new_record_layer:
 1212|  72.5k|{
 1213|  72.5k|    OSSL_RECORD_LAYER *rl = OPENSSL_zalloc(sizeof(*rl));
  ------------------
  |  |  109|  72.5k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1214|  72.5k|    const OSSL_PARAM *p;
 1215|       |
 1216|  72.5k|    *retrl = NULL;
 1217|       |
 1218|  72.5k|    if (rl == NULL)
  ------------------
  |  Branch (1218:9): [True: 0, False: 72.5k]
  ------------------
 1219|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1220|       |
 1221|       |    /*
 1222|       |     * Default the value for max_frag_len. This may be overridden by the
 1223|       |     * settings
 1224|       |     */
 1225|  72.5k|    rl->max_frag_len = SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|  72.5k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 1226|       |
 1227|       |    /* Loop through all the settings since they must all be understood */
 1228|  72.5k|    if (settings != NULL) {
  ------------------
  |  Branch (1228:9): [True: 72.5k, False: 0]
  ------------------
 1229|  76.1k|        for (p = settings; p->key != NULL; p++) {
  ------------------
  |  Branch (1229:28): [True: 3.62k, False: 72.5k]
  ------------------
 1230|  3.62k|            if (strcmp(p->key, OSSL_LIBSSL_RECORD_LAYER_PARAM_USE_ETM) == 0) {
  ------------------
  |  |  344|  3.62k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_USE_ETM "use_etm"
  ------------------
  |  Branch (1230:17): [True: 0, False: 3.62k]
  ------------------
 1231|      0|                if (!OSSL_PARAM_get_int(p, &rl->use_etm)) {
  ------------------
  |  Branch (1231:21): [True: 0, False: 0]
  ------------------
 1232|      0|                    ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1233|      0|                    goto err;
 1234|      0|                }
 1235|  3.62k|            } else if (strcmp(p->key,
  ------------------
  |  Branch (1235:24): [True: 0, False: 3.62k]
  ------------------
 1236|  3.62k|                           OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_FRAG_LEN)
  ------------------
  |  |  338|  3.62k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_FRAG_LEN "max_frag_len"
  ------------------
 1237|  3.62k|                == 0) {
 1238|      0|                if (!OSSL_PARAM_get_uint(p, &rl->max_frag_len)) {
  ------------------
  |  Branch (1238:21): [True: 0, False: 0]
  ------------------
 1239|      0|                    ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1240|      0|                    goto err;
 1241|      0|                }
 1242|  3.62k|            } else if (strcmp(p->key,
  ------------------
  |  Branch (1242:24): [True: 3.62k, False: 0]
  ------------------
 1243|  3.62k|                           OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_EARLY_DATA)
  ------------------
  |  |  337|  3.62k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_EARLY_DATA "max_early_data"
  ------------------
 1244|  3.62k|                == 0) {
 1245|  3.62k|                if (!OSSL_PARAM_get_uint32(p, &rl->max_early_data)) {
  ------------------
  |  Branch (1245:21): [True: 0, False: 3.62k]
  ------------------
 1246|      0|                    ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1247|      0|                    goto err;
 1248|      0|                }
 1249|  3.62k|            } else if (strcmp(p->key,
  ------------------
  |  Branch (1249:24): [True: 0, False: 0]
  ------------------
 1250|      0|                           OSSL_LIBSSL_RECORD_LAYER_PARAM_STREAM_MAC)
  ------------------
  |  |  342|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_STREAM_MAC "stream_mac"
  ------------------
 1251|      0|                == 0) {
 1252|      0|                if (!OSSL_PARAM_get_int(p, &rl->stream_mac)) {
  ------------------
  |  Branch (1252:21): [True: 0, False: 0]
  ------------------
 1253|      0|                    ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1254|      0|                    goto err;
 1255|      0|                }
 1256|      0|            } else if (strcmp(p->key,
  ------------------
  |  Branch (1256:24): [True: 0, False: 0]
  ------------------
 1257|      0|                           OSSL_LIBSSL_RECORD_LAYER_PARAM_TLSTREE)
  ------------------
  |  |  343|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_TLSTREE "tlstree"
  ------------------
 1258|      0|                == 0) {
 1259|      0|                if (!OSSL_PARAM_get_int(p, &rl->tlstree)) {
  ------------------
  |  Branch (1259:21): [True: 0, False: 0]
  ------------------
 1260|      0|                    ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1261|      0|                    goto err;
 1262|      0|                }
 1263|      0|            } else {
 1264|      0|                ERR_raise(ERR_LIB_SSL, SSL_R_UNKNOWN_MANDATORY_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1265|      0|                goto err;
 1266|      0|            }
 1267|  3.62k|        }
 1268|  72.5k|    }
 1269|       |
 1270|  72.5k|    rl->libctx = libctx;
 1271|  72.5k|    rl->propq = propq;
 1272|       |
 1273|  72.5k|    rl->version = vers;
 1274|  72.5k|    rl->role = role;
 1275|  72.5k|    rl->direction = direction;
 1276|  72.5k|    rl->level = level;
 1277|  72.5k|    rl->taglen = taglen;
 1278|  72.5k|    rl->md = md;
 1279|       |
 1280|  72.5k|    rl->alert = SSL_AD_NO_ALERT;
  ------------------
  |  |   67|  72.5k|#define SSL_AD_NO_ALERT -1
  ------------------
 1281|  72.5k|    rl->rstate = SSL_ST_READ_HEADER;
  ------------------
  |  | 1183|  72.5k|#define SSL_ST_READ_HEADER 0xF0
  ------------------
 1282|       |
 1283|  72.5k|    if (level == OSSL_RECORD_PROTECTION_LEVEL_NONE)
  ------------------
  |  | 2928|  72.5k|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
  |  Branch (1283:9): [True: 43.5k, False: 28.9k]
  ------------------
 1284|  43.5k|        rl->is_first_record = 1;
 1285|       |
 1286|  72.5k|    if (!tls_set1_bio(rl, transport))
  ------------------
  |  Branch (1286:9): [True: 0, False: 72.5k]
  ------------------
 1287|      0|        goto err;
 1288|       |
 1289|  72.5k|    if (prev != NULL && !BIO_up_ref(prev))
  ------------------
  |  Branch (1289:9): [True: 14.4k, False: 58.0k]
  |  Branch (1289:25): [True: 0, False: 14.4k]
  ------------------
 1290|      0|        goto err;
 1291|  72.5k|    rl->prev = prev;
 1292|       |
 1293|  72.5k|    if (next != NULL && !BIO_up_ref(next))
  ------------------
  |  Branch (1293:9): [True: 36.2k, False: 36.2k]
  |  Branch (1293:25): [True: 0, False: 36.2k]
  ------------------
 1294|      0|        goto err;
 1295|  72.5k|    rl->next = next;
 1296|       |
 1297|  72.5k|    rl->cbarg = cbarg;
 1298|  72.5k|    if (fns != NULL) {
  ------------------
  |  Branch (1298:9): [True: 72.5k, False: 0]
  ------------------
 1299|   217k|        for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (1299:16): [True: 145k, False: 72.5k]
  ------------------
 1300|   145k|            switch (fns->function_id) {
 1301|  72.5k|            case OSSL_FUNC_RLAYER_SKIP_EARLY_DATA:
  ------------------
  |  |  184|  72.5k|#define OSSL_FUNC_RLAYER_SKIP_EARLY_DATA 1
  ------------------
  |  Branch (1301:13): [True: 72.5k, False: 72.5k]
  ------------------
 1302|  72.5k|                rl->skip_early_data = OSSL_FUNC_rlayer_skip_early_data(fns);
 1303|  72.5k|                break;
 1304|      0|            case OSSL_FUNC_RLAYER_MSG_CALLBACK:
  ------------------
  |  |  186|      0|#define OSSL_FUNC_RLAYER_MSG_CALLBACK 2
  ------------------
  |  Branch (1304:13): [True: 0, False: 145k]
  ------------------
 1305|      0|                rl->msg_callback = OSSL_FUNC_rlayer_msg_callback(fns);
 1306|      0|                break;
 1307|  72.5k|            case OSSL_FUNC_RLAYER_SECURITY:
  ------------------
  |  |  188|  72.5k|#define OSSL_FUNC_RLAYER_SECURITY 3
  ------------------
  |  Branch (1307:13): [True: 72.5k, False: 72.5k]
  ------------------
 1308|  72.5k|                rl->security = OSSL_FUNC_rlayer_security(fns);
 1309|  72.5k|                break;
 1310|      0|            case OSSL_FUNC_RLAYER_PADDING:
  ------------------
  |  |  190|      0|#define OSSL_FUNC_RLAYER_PADDING 4
  ------------------
  |  Branch (1310:13): [True: 0, False: 145k]
  ------------------
 1311|      0|                rl->padding = OSSL_FUNC_rlayer_padding(fns);
 1312|      0|            default:
  ------------------
  |  Branch (1312:13): [True: 0, False: 145k]
  ------------------
 1313|       |                /* Just ignore anything we don't understand */
 1314|      0|                break;
 1315|   145k|            }
 1316|   145k|        }
 1317|  72.5k|    }
 1318|       |
 1319|  72.5k|    if (!tls_set_options(rl, options)) {
  ------------------
  |  Branch (1319:9): [True: 0, False: 72.5k]
  ------------------
 1320|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1321|      0|        goto err;
 1322|      0|    }
 1323|       |
 1324|  72.5k|    if ((rl->options & SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS) == 0
  ------------------
  |  |  378|  72.5k|#define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS SSL_OP_BIT(11)
  |  |  ------------------
  |  |  |  |  351|  72.5k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1324:9): [True: 72.5k, False: 0]
  ------------------
 1325|  72.5k|        && rl->version <= TLS1_VERSION
  ------------------
  |  |   24|   145k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (1325:12): [True: 0, False: 72.5k]
  ------------------
 1326|      0|        && !EVP_CIPHER_is_a(ciph, "NULL")
  ------------------
  |  Branch (1326:12): [True: 0, False: 0]
  ------------------
 1327|      0|        && !EVP_CIPHER_is_a(ciph, "RC4")) {
  ------------------
  |  Branch (1327:12): [True: 0, False: 0]
  ------------------
 1328|       |        /*
 1329|       |         * Enable vulnerability countermeasure for CBC ciphers with known-IV
 1330|       |         * problem (http://www.openssl.org/~bodo/tls-cbc.txt)
 1331|       |         */
 1332|      0|        rl->need_empty_fragments = 1;
 1333|      0|    }
 1334|       |
 1335|  72.5k|    *retrl = rl;
 1336|  72.5k|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  72.5k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1337|      0|err:
 1338|      0|    tls_int_free(rl);
 1339|      0|    return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1340|  72.5k|}
tls_free:
 1424|  72.5k|{
 1425|  72.5k|    TLS_BUFFER *rbuf;
 1426|  72.5k|    size_t left, written;
 1427|  72.5k|    int ret = 1;
 1428|       |
 1429|  72.5k|    if (rl == NULL)
  ------------------
  |  Branch (1429:9): [True: 0, False: 72.5k]
  ------------------
 1430|      0|        return 1;
 1431|       |
 1432|  72.5k|    rbuf = &rl->rbuf;
 1433|       |
 1434|  72.5k|    left = TLS_BUFFER_get_left(rbuf);
  ------------------
  |  |  525|  72.5k|#define TLS_BUFFER_get_left(b) ((b)->left)
  ------------------
 1435|  72.5k|    if (left > 0) {
  ------------------
  |  Branch (1435:9): [True: 444, False: 72.0k]
  ------------------
 1436|       |        /*
 1437|       |         * This record layer is closing but we still have data left in our
 1438|       |         * buffer. It must be destined for the next epoch - so push it there.
 1439|       |         */
 1440|    444|        ret = BIO_write_ex(rl->next, rbuf->buf + rbuf->offset, left, &written);
 1441|    444|    }
 1442|  72.5k|    tls_int_free(rl);
 1443|       |
 1444|  72.5k|    return ret;
 1445|  72.5k|}
tls_processed_read_pending:
 1453|  54.2k|{
 1454|  54.2k|    return rl->curr_rec < rl->num_recs;
 1455|  54.2k|}
tls_get_max_records_default:
 1473|  44.1k|{
 1474|       |    /*
 1475|       |     * If we have a pipeline capable cipher, and we have been configured to use
 1476|       |     * it, then return the preferred number of pipelines.
 1477|       |     */
 1478|  44.1k|    if (rl->max_pipelines > 0
  ------------------
  |  Branch (1478:9): [True: 0, False: 44.1k]
  ------------------
 1479|      0|        && rl->enc_ctx != NULL
  ------------------
  |  Branch (1479:12): [True: 0, False: 0]
  ------------------
 1480|      0|        && (EVP_CIPHER_get_flags(EVP_CIPHER_CTX_get0_cipher(rl->enc_ctx))
  ------------------
  |  Branch (1480:12): [True: 0, False: 0]
  ------------------
 1481|      0|               & EVP_CIPH_FLAG_PIPELINE)
  ------------------
  |  |  259|      0|#define EVP_CIPH_FLAG_PIPELINE 0X800000
  ------------------
 1482|      0|            != 0
 1483|      0|        && RLAYER_USE_EXPLICIT_IV(rl)) {
  ------------------
  |  |  394|      0|#define RLAYER_USE_EXPLICIT_IV(rl) ((rl)->version == TLS1_1_VERSION \
  |  |  ------------------
  |  |  |  |   25|      0|#define TLS1_1_VERSION 0x0302
  |  |  ------------------
  |  |  |  Branch (394:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  395|      0|    || (rl)->version == TLS1_2_VERSION                              \
  |  |  ------------------
  |  |  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  |  |  ------------------
  |  |  |  Branch (395:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  396|      0|    || (rl)->version == DTLS1_BAD_VER                               \
  |  |  ------------------
  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  ------------------
  |  |  |  Branch (396:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  397|      0|    || (rl)->version == DTLS1_VERSION                               \
  |  |  ------------------
  |  |  |  |   28|      0|#define DTLS1_VERSION 0xFEFF
  |  |  ------------------
  |  |  |  Branch (397:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  398|      0|    || (rl)->version == DTLS1_2_VERSION)
  |  |  ------------------
  |  |  |  |   29|      0|#define DTLS1_2_VERSION 0xFEFD
  |  |  ------------------
  |  |  |  Branch (398:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1484|      0|        size_t pipes;
 1485|       |
 1486|      0|        if (len == 0)
  ------------------
  |  Branch (1486:13): [True: 0, False: 0]
  ------------------
 1487|      0|            return 1;
 1488|      0|        pipes = ((len - 1) / *preffrag) + 1;
 1489|       |
 1490|      0|        return (pipes < rl->max_pipelines) ? pipes : rl->max_pipelines;
  ------------------
  |  Branch (1490:16): [True: 0, False: 0]
  ------------------
 1491|      0|    }
 1492|       |
 1493|  44.1k|    return 1;
 1494|  44.1k|}
tls_get_max_records:
 1498|  44.1k|{
 1499|  44.1k|    return rl->funcs->get_max_records(rl, type, len, maxfrag, preffrag);
 1500|  44.1k|}
tls_allocate_write_buffers_default:
 1506|  50.6k|{
 1507|  50.6k|    if (!tls_setup_write_buffer(rl, numtempl, 0, 0)) {
  ------------------
  |  Branch (1507:9): [True: 0, False: 50.6k]
  ------------------
 1508|       |        /* RLAYERfatal() already called */
 1509|      0|        return 0;
 1510|      0|    }
 1511|       |
 1512|  50.6k|    return 1;
 1513|  50.6k|}
tls_initialise_write_packets_default:
 1522|  50.6k|{
 1523|  50.6k|    WPACKET *thispkt;
 1524|  50.6k|    size_t j, align;
 1525|  50.6k|    TLS_BUFFER *wb;
 1526|       |
 1527|   101k|    for (j = 0; j < numtempl; j++) {
  ------------------
  |  Branch (1527:17): [True: 50.6k, False: 50.6k]
  ------------------
 1528|  50.6k|        thispkt = &pkt[j];
 1529|  50.6k|        wb = &bufs[j];
 1530|       |
 1531|  50.6k|        wb->type = templates[j].type;
 1532|       |
 1533|  50.6k|#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD != 0
 1534|  50.6k|        align = (size_t)TLS_BUFFER_get_buf(wb);
  ------------------
  |  |  522|  50.6k|#define TLS_BUFFER_get_buf(b) ((b)->buf)
  ------------------
 1535|  50.6k|        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|   101k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  |  Branch (1535:18): [True: 0, False: 50.6k]
  ------------------
 1536|  50.6k|        align = SSL3_ALIGN_PAYLOAD - 1
  ------------------
  |  |  152|  50.6k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
 1537|  50.6k|            - ((align - 1) % SSL3_ALIGN_PAYLOAD);
  ------------------
  |  |  152|  50.6k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
 1538|  50.6k|#endif
 1539|  50.6k|        TLS_BUFFER_set_offset(wb, align);
  ------------------
  |  |  529|  50.6k|#define TLS_BUFFER_set_offset(b, o) ((b)->offset = (o))
  ------------------
 1540|       |
 1541|  50.6k|        if (!WPACKET_init_static_len(thispkt, TLS_BUFFER_get_buf(wb),
  ------------------
  |  |  522|  50.6k|#define TLS_BUFFER_get_buf(b) ((b)->buf)
  ------------------
  |  Branch (1541:13): [True: 0, False: 50.6k]
  ------------------
 1542|  50.6k|                TLS_BUFFER_get_len(wb), 0)) {
  ------------------
  |  |  524|  50.6k|#define TLS_BUFFER_get_len(b) ((b)->len)
  ------------------
 1543|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1544|      0|            return 0;
 1545|      0|        }
 1546|  50.6k|        (*wpinited)++;
 1547|  50.6k|        if (!WPACKET_allocate_bytes(thispkt, align, NULL)) {
  ------------------
  |  Branch (1547:13): [True: 0, False: 50.6k]
  ------------------
 1548|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1549|      0|            return 0;
 1550|      0|        }
 1551|  50.6k|    }
 1552|       |
 1553|  50.6k|    return 1;
 1554|  50.6k|}
tls_prepare_record_header_default:
 1561|  50.6k|{
 1562|  50.6k|    size_t maxcomplen;
 1563|       |
 1564|  50.6k|    *recdata = NULL;
 1565|       |
 1566|  50.6k|    maxcomplen = templ->buflen;
 1567|  50.6k|    if (rl->compctx != NULL)
  ------------------
  |  Branch (1567:9): [True: 0, False: 50.6k]
  ------------------
 1568|      0|        maxcomplen += SSL3_RT_MAX_COMPRESSED_OVERHEAD;
  ------------------
  |  |  179|      0|#define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024
  ------------------
 1569|       |
 1570|  50.6k|    if (!WPACKET_put_bytes_u8(thispkt, rectype)
  ------------------
  |  |  909|   101k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (1570:9): [True: 0, False: 50.6k]
  ------------------
 1571|  50.6k|        || !WPACKET_put_bytes_u16(thispkt, templ->version)
  ------------------
  |  |  911|   101k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1571:12): [True: 0, False: 50.6k]
  ------------------
 1572|  50.6k|        || !WPACKET_start_sub_packet_u16(thispkt)
  ------------------
  |  |  812|   101k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1572:12): [True: 0, False: 50.6k]
  ------------------
 1573|  50.6k|        || (rl->eivlen > 0
  ------------------
  |  Branch (1573:13): [True: 0, False: 50.6k]
  ------------------
 1574|      0|            && !WPACKET_allocate_bytes(thispkt, rl->eivlen, NULL))
  ------------------
  |  Branch (1574:16): [True: 0, False: 0]
  ------------------
 1575|  50.6k|        || (maxcomplen > 0
  ------------------
  |  Branch (1575:13): [True: 50.6k, False: 0]
  ------------------
 1576|  50.6k|            && !WPACKET_reserve_bytes(thispkt, maxcomplen,
  ------------------
  |  Branch (1576:16): [True: 0, False: 50.6k]
  ------------------
 1577|  50.6k|                recdata))) {
 1578|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1579|      0|        return 0;
 1580|      0|    }
 1581|       |
 1582|  50.6k|    return 1;
 1583|  50.6k|}
tls_prepare_for_encryption_default:
 1589|  36.1k|{
 1590|  36.1k|    size_t len;
 1591|  36.1k|    unsigned char *recordstart;
 1592|       |
 1593|       |    /*
 1594|       |     * we should still have the output to thiswr->data and the input from
 1595|       |     * wr->input. Length should be thiswr->length. thiswr->data still points
 1596|       |     * in the wb->buf
 1597|       |     */
 1598|       |
 1599|  36.1k|    if (!rl->use_etm && mac_size != 0) {
  ------------------
  |  Branch (1599:9): [True: 36.1k, False: 0]
  |  Branch (1599:25): [True: 0, False: 36.1k]
  ------------------
 1600|      0|        unsigned char *mac;
 1601|       |
 1602|      0|        if (!WPACKET_allocate_bytes(thispkt, mac_size, &mac)
  ------------------
  |  Branch (1602:13): [True: 0, False: 0]
  ------------------
 1603|      0|            || !rl->funcs->mac(rl, thiswr, mac, 1)) {
  ------------------
  |  Branch (1603:16): [True: 0, False: 0]
  ------------------
 1604|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1605|      0|            return 0;
 1606|      0|        }
 1607|      0|    }
 1608|       |
 1609|       |    /*
 1610|       |     * Reserve some bytes for any growth that may occur during encryption. If
 1611|       |     * we are adding the MAC independently of the cipher algorithm, then the
 1612|       |     * max encrypted overhead does not need to include an allocation for that
 1613|       |     * MAC
 1614|       |     */
 1615|  36.1k|    if (!WPACKET_reserve_bytes(thispkt, SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD - mac_size, NULL)
  ------------------
  |  |  195|  36.1k|    (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  172|  36.1k|#define SSL_RT_MAX_CIPHER_BLOCK_SIZE 16
  |  |  ------------------
  |  |                   (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  166|  36.1k|#define SSL3_RT_MAX_MD_SIZE 64
  |  |  ------------------
  ------------------
  |  Branch (1615:9): [True: 0, False: 36.1k]
  ------------------
 1616|       |        /*
 1617|       |         * We also need next the amount of bytes written to this
 1618|       |         * sub-packet
 1619|       |         */
 1620|  36.1k|        || !WPACKET_get_length(thispkt, &len)) {
  ------------------
  |  Branch (1620:12): [True: 0, False: 36.1k]
  ------------------
 1621|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1622|      0|        return 0;
 1623|      0|    }
 1624|       |
 1625|       |    /* Get a pointer to the start of this record excluding header */
 1626|  36.1k|    recordstart = WPACKET_get_curr(thispkt) - len;
 1627|  36.1k|    TLS_RL_RECORD_set_data(thiswr, recordstart);
  ------------------
  |  |   88|  36.1k|#define TLS_RL_RECORD_set_data(r, d) ((r)->data = (d))
  ------------------
 1628|  36.1k|    TLS_RL_RECORD_reset_input(thiswr);
  ------------------
  |  |   90|  36.1k|#define TLS_RL_RECORD_reset_input(r) ((r)->input = (r)->data)
  ------------------
 1629|  36.1k|    TLS_RL_RECORD_set_length(thiswr, len);
  ------------------
  |  |   86|  36.1k|#define TLS_RL_RECORD_set_length(r, l) ((r)->length = (l))
  ------------------
 1630|       |
 1631|  36.1k|    return 1;
 1632|  36.1k|}
tls_post_encryption_processing_default:
 1639|  50.6k|{
 1640|  50.6k|    size_t origlen, len;
 1641|  50.6k|    size_t headerlen = rl->isdtls ? DTLS1_RT_HEADER_LENGTH
  ------------------
  |  |   41|      0|#define DTLS1_RT_HEADER_LENGTH 13
  ------------------
  |  Branch (1641:24): [True: 0, False: 50.6k]
  ------------------
 1642|  50.6k|                                  : SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|   101k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
 1643|       |
 1644|       |    /* Allocate bytes for the encryption overhead */
 1645|  50.6k|    if (!WPACKET_get_length(thispkt, &origlen)
  ------------------
  |  Branch (1645:9): [True: 0, False: 50.6k]
  ------------------
 1646|       |        /* Check we allowed enough room for the encryption growth */
 1647|  50.6k|        || !ossl_assert(origlen + SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD
  ------------------
  |  |   52|   101k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   101k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1647:12): [True: 0, False: 50.6k]
  ------------------
 1648|  50.6k|                - mac_size
 1649|  50.6k|            >= thiswr->length)
 1650|       |        /* Encryption should never shrink the data! */
 1651|  50.6k|        || origlen > thiswr->length
  ------------------
  |  Branch (1651:12): [True: 0, False: 50.6k]
  ------------------
 1652|  50.6k|        || (thiswr->length > origlen
  ------------------
  |  Branch (1652:13): [True: 36.1k, False: 14.5k]
  ------------------
 1653|  36.1k|            && !WPACKET_allocate_bytes(thispkt,
  ------------------
  |  Branch (1653:16): [True: 0, False: 36.1k]
  ------------------
 1654|  36.1k|                thiswr->length - origlen,
 1655|  36.1k|                NULL))) {
 1656|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1657|      0|        return 0;
 1658|      0|    }
 1659|  50.6k|    if (rl->use_etm && mac_size != 0) {
  ------------------
  |  Branch (1659:9): [True: 0, False: 50.6k]
  |  Branch (1659:24): [True: 0, False: 0]
  ------------------
 1660|      0|        unsigned char *mac;
 1661|       |
 1662|      0|        if (!WPACKET_allocate_bytes(thispkt, mac_size, &mac)
  ------------------
  |  Branch (1662:13): [True: 0, False: 0]
  ------------------
 1663|      0|            || !rl->funcs->mac(rl, thiswr, mac, 1)) {
  ------------------
  |  Branch (1663:16): [True: 0, False: 0]
  ------------------
 1664|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1665|      0|            return 0;
 1666|      0|        }
 1667|       |
 1668|      0|        TLS_RL_RECORD_add_length(thiswr, mac_size);
  ------------------
  |  |   87|      0|#define TLS_RL_RECORD_add_length(r, l) ((r)->length += (l))
  ------------------
 1669|      0|    }
 1670|       |
 1671|  50.6k|    if (!WPACKET_get_length(thispkt, &len)
  ------------------
  |  Branch (1671:9): [True: 0, False: 50.6k]
  ------------------
 1672|  50.6k|        || !WPACKET_close(thispkt)) {
  ------------------
  |  Branch (1672:12): [True: 0, False: 50.6k]
  ------------------
 1673|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1674|      0|        return 0;
 1675|      0|    }
 1676|       |
 1677|  50.6k|    if (rl->msg_callback != NULL) {
  ------------------
  |  Branch (1677:9): [True: 0, False: 50.6k]
  ------------------
 1678|      0|        unsigned char *recordstart;
 1679|       |
 1680|      0|        recordstart = WPACKET_get_curr(thispkt) - len - headerlen;
 1681|      0|        rl->msg_callback(1, thiswr->rec_version, SSL3_RT_HEADER, recordstart,
  ------------------
  |  |  239|      0|#define SSL3_RT_HEADER 0x100
  ------------------
 1682|      0|            headerlen, rl->cbarg);
 1683|       |
 1684|      0|        if (rl->version == TLS1_3_VERSION && rl->enc_ctx != NULL) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1684:13): [True: 0, False: 0]
  |  Branch (1684:46): [True: 0, False: 0]
  ------------------
 1685|      0|            unsigned char ctype = thistempl->type;
 1686|       |
 1687|      0|            rl->msg_callback(1, thiswr->rec_version, SSL3_RT_INNER_CONTENT_TYPE,
  ------------------
  |  |  240|      0|#define SSL3_RT_INNER_CONTENT_TYPE 0x101
  ------------------
 1688|      0|                &ctype, 1, rl->cbarg);
 1689|      0|        }
 1690|      0|    }
 1691|       |
 1692|  50.6k|    if (!WPACKET_finish(thispkt)) {
  ------------------
  |  Branch (1692:9): [True: 0, False: 50.6k]
  ------------------
 1693|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1694|      0|        return 0;
 1695|      0|    }
 1696|       |
 1697|  50.6k|    TLS_RL_RECORD_add_length(thiswr, headerlen);
  ------------------
  |  |   87|  50.6k|#define TLS_RL_RECORD_add_length(r, l) ((r)->length += (l))
  ------------------
 1698|       |
 1699|  50.6k|    return 1;
 1700|  50.6k|}
tls_write_records_default:
 1705|  50.6k|{
 1706|  50.6k|    WPACKET pkt[SSL_MAX_PIPELINES + 1];
 1707|  50.6k|    TLS_RL_RECORD wr[SSL_MAX_PIPELINES + 1];
 1708|  50.6k|    WPACKET *thispkt;
 1709|  50.6k|    TLS_RL_RECORD *thiswr;
 1710|  50.6k|    int mac_size = 0, ret = 0;
 1711|  50.6k|    size_t wpinited = 0;
 1712|  50.6k|    size_t j, prefix = 0;
 1713|  50.6k|    OSSL_RECORD_TEMPLATE prefixtempl;
 1714|  50.6k|    OSSL_RECORD_TEMPLATE *thistempl;
 1715|       |
 1716|  50.6k|    if (rl->md_ctx != NULL && EVP_MD_CTX_get0_md(rl->md_ctx) != NULL) {
  ------------------
  |  Branch (1716:9): [True: 0, False: 50.6k]
  |  Branch (1716:31): [True: 0, False: 0]
  ------------------
 1717|      0|        mac_size = EVP_MD_CTX_get_size(rl->md_ctx);
  ------------------
  |  |  482|      0|#define EVP_MD_CTX_get_size(e) EVP_MD_CTX_get_size_ex(e)
  ------------------
 1718|      0|        if (mac_size < 0) {
  ------------------
  |  Branch (1718:13): [True: 0, False: 0]
  ------------------
 1719|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1720|      0|            goto err;
 1721|      0|        }
 1722|      0|    }
 1723|       |
 1724|  50.6k|    if (!rl->funcs->allocate_write_buffers(rl, templates, numtempl, &prefix)) {
  ------------------
  |  Branch (1724:9): [True: 0, False: 50.6k]
  ------------------
 1725|       |        /* RLAYERfatal() already called */
 1726|      0|        goto err;
 1727|      0|    }
 1728|       |
 1729|  50.6k|    if (!rl->funcs->initialise_write_packets(rl, templates, numtempl,
  ------------------
  |  Branch (1729:9): [True: 0, False: 50.6k]
  ------------------
 1730|  50.6k|            &prefixtempl, pkt, rl->wbuf,
 1731|  50.6k|            &wpinited)) {
 1732|       |        /* RLAYERfatal() already called */
 1733|      0|        goto err;
 1734|      0|    }
 1735|       |
 1736|       |    /* Clear our TLS_RL_RECORD structures */
 1737|  50.6k|    memset(wr, 0, sizeof(wr));
 1738|   101k|    for (j = 0; j < numtempl + prefix; j++) {
  ------------------
  |  Branch (1738:17): [True: 50.6k, False: 50.6k]
  ------------------
 1739|  50.6k|        unsigned char *compressdata = NULL;
 1740|  50.6k|        uint8_t rectype;
 1741|       |
 1742|  50.6k|        thispkt = &pkt[j];
 1743|  50.6k|        thiswr = &wr[j];
 1744|  50.6k|        thistempl = (j < prefix) ? &prefixtempl : &templates[j - prefix];
  ------------------
  |  Branch (1744:21): [True: 0, False: 50.6k]
  ------------------
 1745|       |
 1746|       |        /*
 1747|       |         * Default to the record type as specified in the template unless the
 1748|       |         * protocol implementation says differently.
 1749|       |         */
 1750|  50.6k|        if (rl->funcs->get_record_type != NULL)
  ------------------
  |  Branch (1750:13): [True: 36.1k, False: 14.5k]
  ------------------
 1751|  36.1k|            rectype = rl->funcs->get_record_type(rl, thistempl);
 1752|  14.5k|        else
 1753|  14.5k|            rectype = thistempl->type;
 1754|       |
 1755|  50.6k|        TLS_RL_RECORD_set_type(thiswr, rectype);
  ------------------
  |  |   83|  50.6k|#define TLS_RL_RECORD_set_type(r, t) ((r)->type = (t))
  ------------------
 1756|  50.6k|        TLS_RL_RECORD_set_rec_version(thiswr, thistempl->version);
  ------------------
  |  |   84|  50.6k|#define TLS_RL_RECORD_set_rec_version(r, v) ((r)->rec_version = (v))
  ------------------
 1757|       |
 1758|  50.6k|        if (!rl->funcs->prepare_record_header(rl, thispkt, thistempl, rectype,
  ------------------
  |  Branch (1758:13): [True: 0, False: 50.6k]
  ------------------
 1759|  50.6k|                &compressdata)) {
 1760|       |            /* RLAYERfatal() already called */
 1761|      0|            goto err;
 1762|      0|        }
 1763|       |
 1764|       |        /* lets setup the record stuff. */
 1765|  50.6k|        TLS_RL_RECORD_set_data(thiswr, compressdata);
  ------------------
  |  |   88|  50.6k|#define TLS_RL_RECORD_set_data(r, d) ((r)->data = (d))
  ------------------
 1766|  50.6k|        TLS_RL_RECORD_set_length(thiswr, thistempl->buflen);
  ------------------
  |  |   86|  50.6k|#define TLS_RL_RECORD_set_length(r, l) ((r)->length = (l))
  ------------------
 1767|       |
 1768|  50.6k|        TLS_RL_RECORD_set_input(thiswr, (unsigned char *)thistempl->buf);
  ------------------
  |  |   89|  50.6k|#define TLS_RL_RECORD_set_input(r, i) ((r)->input = (i))
  ------------------
 1769|       |
 1770|       |        /*
 1771|       |         * we now 'read' from thiswr->input, thiswr->length bytes into
 1772|       |         * thiswr->data
 1773|       |         */
 1774|       |
 1775|       |        /* first we compress */
 1776|  50.6k|        if (rl->compctx != NULL) {
  ------------------
  |  Branch (1776:13): [True: 0, False: 50.6k]
  ------------------
 1777|      0|            if (!tls_do_compress(rl, thiswr)
  ------------------
  |  Branch (1777:17): [True: 0, False: 0]
  ------------------
 1778|      0|                || !WPACKET_allocate_bytes(thispkt, thiswr->length, NULL)) {
  ------------------
  |  Branch (1778:20): [True: 0, False: 0]
  ------------------
 1779|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_COMPRESSION_FAILURE);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1780|      0|                goto err;
 1781|      0|            }
 1782|  50.6k|        } else if (compressdata != NULL) {
  ------------------
  |  Branch (1782:20): [True: 50.6k, False: 0]
  ------------------
 1783|  50.6k|            if (!WPACKET_memcpy(thispkt, thiswr->input, thiswr->length)) {
  ------------------
  |  Branch (1783:17): [True: 0, False: 50.6k]
  ------------------
 1784|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1785|      0|                goto err;
 1786|      0|            }
 1787|  50.6k|            TLS_RL_RECORD_reset_input(&wr[j]);
  ------------------
  |  |   90|  50.6k|#define TLS_RL_RECORD_reset_input(r) ((r)->input = (r)->data)
  ------------------
 1788|  50.6k|        }
 1789|       |
 1790|  50.6k|        if (rl->funcs->add_record_padding != NULL
  ------------------
  |  Branch (1790:13): [True: 36.1k, False: 14.5k]
  ------------------
 1791|  36.1k|            && !rl->funcs->add_record_padding(rl, thistempl, thispkt,
  ------------------
  |  Branch (1791:16): [True: 0, False: 36.1k]
  ------------------
 1792|  36.1k|                thiswr)) {
 1793|       |            /* RLAYERfatal() already called */
 1794|      0|            goto err;
 1795|      0|        }
 1796|       |
 1797|  50.6k|        if (!rl->funcs->prepare_for_encryption(rl, mac_size, thispkt, thiswr)) {
  ------------------
  |  Branch (1797:13): [True: 0, False: 50.6k]
  ------------------
 1798|       |            /* RLAYERfatal() already called */
 1799|      0|            goto err;
 1800|      0|        }
 1801|  50.6k|    }
 1802|       |
 1803|  50.6k|    if (prefix) {
  ------------------
  |  Branch (1803:9): [True: 0, False: 50.6k]
  ------------------
 1804|      0|        if (rl->funcs->cipher(rl, wr, 1, 1, NULL, mac_size) < 1) {
  ------------------
  |  Branch (1804:13): [True: 0, False: 0]
  ------------------
 1805|      0|            if (rl->alert == SSL_AD_NO_ALERT) {
  ------------------
  |  |   67|      0|#define SSL_AD_NO_ALERT -1
  ------------------
  |  Branch (1805:17): [True: 0, False: 0]
  ------------------
 1806|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1807|      0|            }
 1808|      0|            goto err;
 1809|      0|        }
 1810|      0|    }
 1811|       |
 1812|  50.6k|    if (rl->funcs->cipher(rl, wr + prefix, numtempl, 1, NULL, mac_size) < 1) {
  ------------------
  |  Branch (1812:9): [True: 0, False: 50.6k]
  ------------------
 1813|      0|        if (rl->alert == SSL_AD_NO_ALERT) {
  ------------------
  |  |   67|      0|#define SSL_AD_NO_ALERT -1
  ------------------
  |  Branch (1813:13): [True: 0, False: 0]
  ------------------
 1814|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1815|      0|        }
 1816|      0|        goto err;
 1817|      0|    }
 1818|       |
 1819|   101k|    for (j = 0; j < numtempl + prefix; j++) {
  ------------------
  |  Branch (1819:17): [True: 50.6k, False: 50.6k]
  ------------------
 1820|  50.6k|        thispkt = &pkt[j];
 1821|  50.6k|        thiswr = &wr[j];
 1822|  50.6k|        thistempl = (j < prefix) ? &prefixtempl : &templates[j - prefix];
  ------------------
  |  Branch (1822:21): [True: 0, False: 50.6k]
  ------------------
 1823|       |
 1824|  50.6k|        if (!rl->funcs->post_encryption_processing(rl, mac_size, thistempl,
  ------------------
  |  Branch (1824:13): [True: 0, False: 50.6k]
  ------------------
 1825|  50.6k|                thispkt, thiswr)) {
 1826|       |            /* RLAYERfatal() already called */
 1827|      0|            goto err;
 1828|      0|        }
 1829|       |
 1830|       |        /* now let's set up wb */
 1831|  50.6k|        TLS_BUFFER_set_left(&rl->wbuf[j], TLS_RL_RECORD_get_length(thiswr));
  ------------------
  |  |  526|  50.6k|#define TLS_BUFFER_set_left(b, l) ((b)->left = (l))
  ------------------
 1832|  50.6k|    }
 1833|       |
 1834|  50.6k|    ret = 1;
 1835|  50.6k|err:
 1836|   101k|    for (j = 0; j < wpinited; j++)
  ------------------
  |  Branch (1836:17): [True: 50.6k, False: 50.6k]
  ------------------
 1837|  50.6k|        WPACKET_cleanup(&pkt[j]);
 1838|  50.6k|    return ret;
 1839|  50.6k|}
tls_write_records:
 1843|  50.6k|{
 1844|       |    /* Check we don't have pending data waiting to write */
 1845|  50.6k|    if (!ossl_assert(rl->nextwbuf >= rl->numwpipes
  ------------------
  |  |   52|  50.6k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 50.6k, False: 0]
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|  50.6k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1845:9): [True: 0, False: 50.6k]
  ------------------
 1846|  50.6k|            || TLS_BUFFER_get_left(&rl->wbuf[rl->nextwbuf]) == 0)) {
 1847|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1848|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1849|      0|    }
 1850|       |
 1851|  50.6k|    if (!rl->funcs->write_records(rl, templates, numtempl)) {
  ------------------
  |  Branch (1851:9): [True: 0, False: 50.6k]
  ------------------
 1852|       |        /* RLAYERfatal already called */
 1853|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1854|      0|    }
 1855|       |
 1856|  50.6k|    rl->nextwbuf = 0;
 1857|       |    /* we now just need to write the buffers */
 1858|  50.6k|    return tls_retry_write_records(rl);
 1859|  50.6k|}
tls_retry_write_records:
 1862|  50.6k|{
 1863|  50.6k|    int i, ret;
 1864|  50.6k|    TLS_BUFFER *thiswb;
 1865|  50.6k|    size_t tmpwrit = 0, left;
 1866|       |
 1867|  50.6k|    if (rl->nextwbuf >= rl->numwpipes)
  ------------------
  |  Branch (1867:9): [True: 0, False: 50.6k]
  ------------------
 1868|      0|        return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|      0|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1869|       |
 1870|  50.6k|    for (;;) {
 1871|  50.6k|        thiswb = &rl->wbuf[rl->nextwbuf];
 1872|  50.6k|        left = TLS_BUFFER_get_left(thiswb);
  ------------------
  |  |  525|  50.6k|#define TLS_BUFFER_get_left(b) ((b)->left)
  ------------------
 1873|       |
 1874|  50.6k|        clear_sys_error();
  ------------------
  |  |   31|  50.6k|#define clear_sys_error() errno = 0
  ------------------
 1875|  50.6k|        if (rl->bio != NULL) {
  ------------------
  |  Branch (1875:13): [True: 50.6k, False: 0]
  ------------------
 1876|  50.6k|            if (rl->funcs->prepare_write_bio != NULL) {
  ------------------
  |  Branch (1876:17): [True: 0, False: 50.6k]
  ------------------
 1877|      0|                ret = rl->funcs->prepare_write_bio(rl, thiswb->type);
 1878|      0|                if (ret != OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|      0|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1878:21): [True: 0, False: 0]
  ------------------
 1879|      0|                    return ret;
 1880|      0|            }
 1881|  50.6k|            i = BIO_write(rl->bio, (char *)&(TLS_BUFFER_get_buf(thiswb)[TLS_BUFFER_get_offset(thiswb)]),
  ------------------
  |  |  522|  50.6k|#define TLS_BUFFER_get_buf(b) ((b)->buf)
  ------------------
                          i = BIO_write(rl->bio, (char *)&(TLS_BUFFER_get_buf(thiswb)[TLS_BUFFER_get_offset(thiswb)]),
  ------------------
  |  |  528|  50.6k|#define TLS_BUFFER_get_offset(b) ((b)->offset)
  ------------------
 1882|  50.6k|                (unsigned int)left);
 1883|  50.6k|            if (i >= 0) {
  ------------------
  |  Branch (1883:17): [True: 50.6k, False: 0]
  ------------------
 1884|  50.6k|                tmpwrit = i;
 1885|  50.6k|                if (i == 0 && left != 0) {
  ------------------
  |  Branch (1885:21): [True: 0, False: 50.6k]
  |  Branch (1885:31): [True: 0, False: 0]
  ------------------
 1886|      0|                    if (BIO_should_retry(rl->bio)) {
  ------------------
  |  |  281|      0|#define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  |  |  |  Branch (281:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1887|      0|                        ret = OSSL_RECORD_RETURN_RETRY;
  ------------------
  |  |   46|      0|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
 1888|      0|                    } else {
 1889|       |                        /*
 1890|       |                         * Treat this as a fatal I/O condition. Do not queue an
 1891|       |                         * SSL reason: a zero return with no retry flag may come
 1892|       |                         * from a custom BIO and does not imply an SSL library
 1893|       |                         * or protocol error.
 1894|       |                         */
 1895|      0|                        ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1896|      0|                    }
 1897|  50.6k|                } else {
 1898|  50.6k|                    ret = OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  50.6k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1899|  50.6k|                }
 1900|  50.6k|            } else {
 1901|      0|                if (BIO_should_retry(rl->bio)) {
  ------------------
  |  |  281|      0|#define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  |  |  |  Branch (281:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1902|      0|                    ret = OSSL_RECORD_RETURN_RETRY;
  ------------------
  |  |   46|      0|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
 1903|      0|                } else {
 1904|      0|                    ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   55|      0|#define ERR_LIB_SYS 2
  ------------------
                                  ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   30|      0|#define get_last_sys_error() errno
  ------------------
 1905|      0|                        "tls_retry_write_records failure");
 1906|      0|                    ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1907|      0|                }
 1908|      0|            }
 1909|  50.6k|        } else {
 1910|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_BIO_NOT_SET);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1911|      0|            ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1912|      0|            i = -1;
 1913|      0|        }
 1914|       |
 1915|       |        /*
 1916|       |         * When an empty fragment is sent on a connection using KTLS,
 1917|       |         * it is sent as a write of zero bytes.  If this zero byte
 1918|       |         * write succeeds, i will be 0 rather than a non-zero value.
 1919|       |         * Treat i == 0 as success rather than an error for zero byte
 1920|       |         * writes to permit this case.
 1921|       |         */
 1922|  50.6k|        if (i >= 0 && tmpwrit == left) {
  ------------------
  |  Branch (1922:13): [True: 50.6k, False: 0]
  |  Branch (1922:23): [True: 50.6k, False: 0]
  ------------------
 1923|  50.6k|            TLS_BUFFER_set_left(thiswb, 0);
  ------------------
  |  |  526|  50.6k|#define TLS_BUFFER_set_left(b, l) ((b)->left = (l))
  ------------------
 1924|  50.6k|            TLS_BUFFER_add_offset(thiswb, tmpwrit);
  ------------------
  |  |  530|  50.6k|#define TLS_BUFFER_add_offset(b, o) ((b)->offset += (o))
  ------------------
 1925|  50.6k|            if (++(rl->nextwbuf) < rl->numwpipes)
  ------------------
  |  Branch (1925:17): [True: 0, False: 50.6k]
  ------------------
 1926|      0|                continue;
 1927|       |
 1928|  50.6k|            if (rl->nextwbuf == rl->numwpipes
  ------------------
  |  Branch (1928:17): [True: 50.6k, False: 0]
  ------------------
 1929|  50.6k|                && (rl->mode & SSL_MODE_RELEASE_BUFFERS) != 0)
  ------------------
  |  |  537|  50.6k|#define SSL_MODE_RELEASE_BUFFERS 0x00000010U
  ------------------
  |  Branch (1929:20): [True: 0, False: 50.6k]
  ------------------
 1930|      0|                tls_release_write_buffer(rl);
 1931|  50.6k|            return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  50.6k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1932|  50.6k|        } else if (i <= 0) {
  ------------------
  |  Branch (1932:20): [True: 0, False: 0]
  ------------------
 1933|       |            /*
 1934|       |             * If the app buffer is used directly (kTLS) and the caller is
 1935|       |             * allowed to move it, copy the unsent data so the original
 1936|       |             * buffer can be safely released.
 1937|       |             */
 1938|      0|            if (TLS_BUFFER_is_app_buffer(thiswb)
  ------------------
  |  |  532|      0|#define TLS_BUFFER_is_app_buffer(b) ((b)->app_buffer)
  |  |  ------------------
  |  |  |  Branch (532:37): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1939|      0|                && (rl->mode & SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER) != 0) {
  ------------------
  |  |  526|      0|#define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002U
  ------------------
  |  Branch (1939:20): [True: 0, False: 0]
  ------------------
 1940|      0|                unsigned char *buf;
 1941|       |
 1942|      0|                left = TLS_BUFFER_get_left(thiswb);
  ------------------
  |  |  525|      0|#define TLS_BUFFER_get_left(b) ((b)->left)
  ------------------
 1943|      0|                buf = OPENSSL_malloc(left);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1944|      0|                if (buf == NULL) {
  ------------------
  |  Branch (1944:21): [True: 0, False: 0]
  ------------------
 1945|      0|                    RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1946|      0|                    return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1947|      0|                }
 1948|      0|                memcpy(buf,
 1949|      0|                    TLS_BUFFER_get_buf(thiswb) + TLS_BUFFER_get_offset(thiswb),
  ------------------
  |  |  522|      0|#define TLS_BUFFER_get_buf(b) ((b)->buf)
  ------------------
                                  TLS_BUFFER_get_buf(thiswb) + TLS_BUFFER_get_offset(thiswb),
  ------------------
  |  |  528|      0|#define TLS_BUFFER_get_offset(b) ((b)->offset)
  ------------------
 1950|      0|                    left);
 1951|      0|                TLS_BUFFER_set_buf(thiswb, buf);
  ------------------
  |  |  523|      0|#define TLS_BUFFER_set_buf(b, n) ((b)->buf = (n))
  ------------------
 1952|      0|                TLS_BUFFER_set_offset(thiswb, 0);
  ------------------
  |  |  529|      0|#define TLS_BUFFER_set_offset(b, o) ((b)->offset = (o))
  ------------------
 1953|      0|                TLS_BUFFER_set_app_buffer(thiswb, 0);
  ------------------
  |  |  531|      0|#define TLS_BUFFER_set_app_buffer(b, l) ((b)->app_buffer = (l))
  ------------------
 1954|      0|            }
 1955|      0|            if (rl->isdtls) {
  ------------------
  |  Branch (1955:17): [True: 0, False: 0]
  ------------------
 1956|       |                /*
 1957|       |                 * For DTLS, just drop it. That's kind of the whole point in
 1958|       |                 * using a datagram service
 1959|       |                 */
 1960|      0|                TLS_BUFFER_set_left(thiswb, 0);
  ------------------
  |  |  526|      0|#define TLS_BUFFER_set_left(b, l) ((b)->left = (l))
  ------------------
 1961|      0|                if (++(rl->nextwbuf) == rl->numwpipes
  ------------------
  |  Branch (1961:21): [True: 0, False: 0]
  ------------------
 1962|      0|                    && (rl->mode & SSL_MODE_RELEASE_BUFFERS) != 0)
  ------------------
  |  |  537|      0|#define SSL_MODE_RELEASE_BUFFERS 0x00000010U
  ------------------
  |  Branch (1962:24): [True: 0, False: 0]
  ------------------
 1963|      0|                    tls_release_write_buffer(rl);
 1964|      0|            }
 1965|      0|            return ret;
 1966|      0|        }
 1967|      0|        TLS_BUFFER_add_offset(thiswb, tmpwrit);
  ------------------
  |  |  530|      0|#define TLS_BUFFER_add_offset(b, o) ((b)->offset += (o))
  ------------------
 1968|      0|        TLS_BUFFER_sub_left(thiswb, tmpwrit);
  ------------------
  |  |  527|      0|#define TLS_BUFFER_sub_left(b, l) ((b)->left -= (l))
  ------------------
 1969|      0|    }
 1970|  50.6k|}
tls_set1_bio:
 1978|   115k|{
 1979|   115k|    if (bio != NULL && !BIO_up_ref(bio))
  ------------------
  |  Branch (1979:9): [True: 94.1k, False: 21.7k]
  |  Branch (1979:24): [True: 0, False: 94.1k]
  ------------------
 1980|      0|        return 0;
 1981|   115k|    BIO_free_all(rl->bio);
 1982|   115k|    rl->bio = bio;
 1983|       |
 1984|   115k|    return 1;
 1985|   115k|}
tls_set_protocol_version:
 1997|  21.7k|{
 1998|  21.7k|    return rl->funcs->set_protocol_version(rl, version);
 1999|  21.7k|}
tls_set_plain_alerts:
 2002|  21.7k|{
 2003|  21.7k|    rl->allow_plain_alerts = allow;
 2004|  21.7k|}
tls_set_first_handshake:
 2007|  65.3k|{
 2008|  65.3k|    rl->is_first_handshake = first;
 2009|  65.3k|}
tls_increment_sequence_ctr:
 2064|  68.6k|{
 2065|  68.6k|    int i;
 2066|       |
 2067|       |    /* Increment the sequence counter */
 2068|  68.6k|    for (i = SEQ_NUM_SIZE; i > 0; i--) {
  ------------------
  |  |   20|  68.6k|#define SEQ_NUM_SIZE 8
  ------------------
  |  Branch (2068:28): [True: 68.6k, False: 0]
  ------------------
 2069|  68.6k|        ++(rl->sequence[i - 1]);
 2070|  68.6k|        if (rl->sequence[i - 1] != 0)
  ------------------
  |  Branch (2070:13): [True: 68.6k, False: 0]
  ------------------
 2071|  68.6k|            break;
 2072|  68.6k|    }
 2073|  68.6k|    if (i == 0) {
  ------------------
  |  Branch (2073:9): [True: 0, False: 68.6k]
  ------------------
 2074|       |        /* Sequence has wrapped */
 2075|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_SEQUENCE_CTR_WRAPPED);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 2076|      0|        return 0;
 2077|      0|    }
 2078|  68.6k|    return 1;
 2079|  68.6k|}
tls_common.c:tls_allow_compression:
  114|  72.3k|{
  115|  72.3k|    if (rl->options & SSL_OP_NO_COMPRESSION)
  ------------------
  |  |  395|  72.3k|#define SSL_OP_NO_COMPRESSION SSL_OP_BIT(17)
  |  |  ------------------
  |  |  |  |  351|  72.3k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (115:9): [True: 72.3k, False: 0]
  ------------------
  116|  72.3k|        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);
  ------------------
  |  | 2780|      0|#define SSL_SECOP_COMPRESSION (15 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2729|      0|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (119:12): [True: 0, False: 0]
  ------------------
  120|  72.3k|}
tls_common.c:tls_release_write_buffer_int:
  124|   123k|{
  125|   123k|    TLS_BUFFER *wb;
  126|   123k|    size_t pipes;
  127|       |
  128|   123k|    pipes = rl->numwpipes;
  129|       |
  130|   144k|    while (pipes > start) {
  ------------------
  |  Branch (130:12): [True: 21.7k, False: 123k]
  ------------------
  131|  21.7k|        wb = &rl->wbuf[pipes - 1];
  132|       |
  133|  21.7k|        if (TLS_BUFFER_is_app_buffer(wb))
  ------------------
  |  |  532|  21.7k|#define TLS_BUFFER_is_app_buffer(b) ((b)->app_buffer)
  |  |  ------------------
  |  |  |  Branch (532:37): [True: 0, False: 21.7k]
  |  |  ------------------
  ------------------
  134|      0|            TLS_BUFFER_set_app_buffer(wb, 0);
  ------------------
  |  |  531|      0|#define TLS_BUFFER_set_app_buffer(b, l) ((b)->app_buffer = (l))
  ------------------
  135|  21.7k|        else
  136|  21.7k|            OPENSSL_free(wb->buf);
  ------------------
  |  |  132|  21.7k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  137|       |        wb->buf = NULL;
  138|  21.7k|        pipes--;
  139|  21.7k|    }
  140|   123k|}
tls_common.c:tls_int_free:
 1399|  72.5k|{
 1400|  72.5k|    BIO_free(rl->prev);
 1401|  72.5k|    BIO_free_all(rl->bio);
 1402|  72.5k|    BIO_free(rl->next);
 1403|  72.5k|    ossl_tls_buffer_release(&rl->rbuf);
 1404|       |
 1405|  72.5k|    tls_release_write_buffer(rl);
 1406|       |
 1407|  72.5k|    EVP_CIPHER_CTX_free(rl->enc_ctx);
 1408|  72.5k|    EVP_MAC_CTX_free(rl->mac_ctx);
 1409|  72.5k|    EVP_MD_CTX_free(rl->md_ctx);
 1410|  72.5k|#ifndef OPENSSL_NO_COMP
 1411|  72.5k|    COMP_CTX_free(rl->compctx);
 1412|  72.5k|#endif
 1413|  72.5k|    OPENSSL_free(rl->iv);
  ------------------
  |  |  132|  72.5k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1414|  72.5k|    OPENSSL_free(rl->nonce);
  ------------------
  |  |  132|  72.5k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1415|  72.5k|    if (rl->version == SSL3_VERSION)
  ------------------
  |  |   23|  72.5k|#define SSL3_VERSION 0x0300
  ------------------
  |  Branch (1415:9): [True: 0, False: 72.5k]
  ------------------
 1416|      0|        OPENSSL_cleanse(rl->mac_secret, sizeof(rl->mac_secret));
 1417|       |
 1418|  72.5k|    TLS_RL_RECORD_release(rl->rrec, SSL_MAX_PIPELINES);
  ------------------
  |  |   74|  72.5k|#define SSL_MAX_PIPELINES 32
  ------------------
 1419|       |
 1420|  72.5k|    OPENSSL_free(rl);
  ------------------
  |  |  132|  72.5k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1421|  72.5k|}
tls_common.c:TLS_RL_RECORD_release:
   33|  72.5k|{
   34|  72.5k|    size_t i;
   35|       |
   36|  2.39M|    for (i = 0; i < num_recs; i++) {
  ------------------
  |  Branch (36:17): [True: 2.32M, False: 72.5k]
  ------------------
   37|  2.32M|        OPENSSL_free(r[i].comp);
  ------------------
  |  |  132|  2.32M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   38|       |        r[i].comp = NULL;
   39|  2.32M|    }
   40|  72.5k|}
tls_common.c:tls_release_write_buffer:
  223|  72.5k|{
  224|  72.5k|    tls_release_write_buffer_int(rl, 0);
  225|       |
  226|  72.5k|    rl->numwpipes = 0;
  227|  72.5k|}
tls_common.c:tls_new_record_layer:
 1356|  72.5k|{
 1357|  72.5k|    int ret;
 1358|       |
 1359|  72.5k|    ret = tls_int_new_record_layer(libctx, propq, vers, role, direction, level,
 1360|  72.5k|        ciph, taglen, md, comp, prev,
 1361|  72.5k|        transport, next, settings,
 1362|  72.5k|        options, fns, cbarg, retrl);
 1363|       |
 1364|  72.5k|    if (ret != OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|  72.5k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1364:9): [True: 0, False: 72.5k]
  ------------------
 1365|      0|        return ret;
 1366|       |
 1367|  72.5k|    switch (vers) {
 1368|  43.5k|    case TLS_ANY_VERSION:
  ------------------
  |  |   40|  43.5k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (1368:5): [True: 43.5k, False: 28.9k]
  ------------------
 1369|  43.5k|        (*retrl)->funcs = &tls_any_funcs;
 1370|  43.5k|        break;
 1371|  28.9k|    case TLS1_3_VERSION:
  ------------------
  |  |   27|  28.9k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1371:5): [True: 28.9k, False: 43.5k]
  ------------------
 1372|  28.9k|        (*retrl)->funcs = &tls_1_3_funcs;
 1373|  28.9k|        break;
 1374|      0|    case TLS1_2_VERSION:
  ------------------
  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (1374:5): [True: 0, False: 72.5k]
  ------------------
 1375|      0|    case TLS1_1_VERSION:
  ------------------
  |  |   25|      0|#define TLS1_1_VERSION 0x0302
  ------------------
  |  Branch (1375:5): [True: 0, False: 72.5k]
  ------------------
 1376|      0|    case TLS1_VERSION:
  ------------------
  |  |   24|      0|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (1376:5): [True: 0, False: 72.5k]
  ------------------
 1377|      0|        (*retrl)->funcs = &tls_1_funcs;
 1378|      0|        break;
 1379|      0|    default:
  ------------------
  |  Branch (1379:5): [True: 0, False: 72.5k]
  ------------------
 1380|       |        /* Should not happen */
 1381|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1382|      0|        ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1383|      0|        goto err;
 1384|  72.5k|    }
 1385|       |
 1386|  72.5k|    ret = (*retrl)->funcs->set_crypto_state(*retrl, level, key, keylen, iv,
 1387|  72.5k|        ivlen, mackey, mackeylen, ciph,
 1388|  72.5k|        taglen, mactype, md, comp);
 1389|       |
 1390|  72.5k|err:
 1391|  72.5k|    if (ret != OSSL_RECORD_RETURN_SUCCESS) {
  ------------------
  |  |   45|  72.5k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1391:9): [True: 0, False: 72.5k]
  ------------------
 1392|      0|        tls_int_free(*retrl);
 1393|       |        *retrl = NULL;
 1394|      0|    }
 1395|  72.5k|    return ret;
 1396|  72.5k|}

tlsany_meth.c:tls_any_set_crypto_state:
   26|  43.5k|{
   27|  43.5k|    if (level != OSSL_RECORD_PROTECTION_LEVEL_NONE) {
  ------------------
  |  | 2928|  43.5k|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
  |  Branch (27:9): [True: 0, False: 43.5k]
  ------------------
   28|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      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|  43.5k|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  43.5k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
   35|  43.5k|}
tlsany_meth.c:tls_any_cipher:
   40|  21.7k|{
   41|  21.7k|    return 1;
   42|  21.7k|}
tlsany_meth.c:tls_any_set_protocol_version:
  117|  21.7k|{
  118|  21.7k|    if (rl->version != TLS_ANY_VERSION && rl->version != vers)
  ------------------
  |  |   40|  43.5k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (118:9): [True: 7.25k, False: 14.5k]
  |  Branch (118:43): [True: 0, False: 7.25k]
  ------------------
  119|      0|        return 0;
  120|  21.7k|    rl->version = vers;
  121|       |
  122|  21.7k|    return 1;
  123|  21.7k|}
tlsany_meth.c:tls_validate_record_header:
   45|  7.25k|{
   46|  7.25k|    if (rl->version == TLS_ANY_VERSION) {
  ------------------
  |  |   40|  7.25k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (46:9): [True: 7.25k, False: 0]
  ------------------
   47|  7.25k|        if ((rec->rec_version >> 8) != SSL3_VERSION_MAJOR) {
  ------------------
  |  |  216|  7.25k|#define SSL3_VERSION_MAJOR 0x03
  ------------------
  |  Branch (47:13): [True: 0, False: 7.25k]
  ------------------
   48|      0|            if (rl->is_first_record) {
  ------------------
  |  Branch (48:17): [True: 0, False: 0]
  ------------------
   49|      0|                unsigned char *p;
   50|       |
   51|       |                /*
   52|       |                 * Go back to start of packet, look at the five bytes that
   53|       |                 * we have.
   54|       |                 */
   55|      0|                p = rl->packet;
   56|      0|                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|      0|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                              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|      0|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                              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|      0|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                              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|      0|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                              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|      0|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                              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|      0|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                              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|      0|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                              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|      0|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   57|      0|                    RLAYERfatal(rl, SSL_AD_NO_ALERT, SSL_R_HTTP_REQUEST);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   58|      0|                    return 0;
   59|      0|                } else if (HAS_PREFIX((char *)p, "CONNE")) {
  ------------------
  |  |   58|      0|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   60|      0|                    RLAYERfatal(rl, SSL_AD_NO_ALERT,
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   61|      0|                        SSL_R_HTTPS_PROXY_REQUEST);
   62|      0|                    return 0;
   63|      0|                }
   64|       |
   65|       |                /* Doesn't look like TLS - don't send an alert */
   66|      0|                RLAYERfatal(rl, SSL_AD_NO_ALERT,
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   67|      0|                    SSL_R_WRONG_VERSION_NUMBER);
   68|      0|                return 0;
   69|      0|            } else {
   70|      0|                RLAYERfatal(rl, SSL_AD_PROTOCOL_VERSION,
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   71|      0|                    SSL_R_WRONG_VERSION_NUMBER);
   72|      0|                return 0;
   73|      0|            }
   74|      0|        }
   75|  7.25k|    } else if (rl->version == TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (75:16): [True: 0, False: 0]
  ------------------
   76|       |        /*
   77|       |         * In this case we know we are going to negotiate TLSv1.3, but we've
   78|       |         * had an HRR, so we haven't actually done so yet. In TLSv1.3 we
   79|       |         * must ignore the legacy record version in plaintext records.
   80|       |         */
   81|      0|    } else if (rec->rec_version != rl->version) {
  ------------------
  |  Branch (81:16): [True: 0, False: 0]
  ------------------
   82|      0|        if ((rl->version & 0xFF00) == (rec->rec_version & 0xFF00)) {
  ------------------
  |  Branch (82:13): [True: 0, False: 0]
  ------------------
   83|      0|            if (rec->type == SSL3_RT_ALERT) {
  ------------------
  |  |  220|      0|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (83:17): [True: 0, False: 0]
  ------------------
   84|       |                /*
   85|       |                 * The record is using an incorrect version number,
   86|       |                 * but what we've got appears to be an alert. We
   87|       |                 * haven't read the body yet to check whether its a
   88|       |                 * fatal or not - but chances are it is. We probably
   89|       |                 * shouldn't send a fatal alert back. We'll just
   90|       |                 * end.
   91|       |                 */
   92|      0|                RLAYERfatal(rl, SSL_AD_NO_ALERT,
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   93|      0|                    SSL_R_WRONG_VERSION_NUMBER);
   94|      0|                return 0;
   95|      0|            }
   96|       |            /* Send back error using their minor version number */
   97|      0|            rl->version = (unsigned short)rec->rec_version;
   98|      0|        }
   99|      0|        RLAYERfatal(rl, SSL_AD_PROTOCOL_VERSION,
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  100|      0|            SSL_R_WRONG_VERSION_NUMBER);
  101|      0|        return 0;
  102|      0|    }
  103|       |
  104|  7.25k|    if (rec->length > SSL3_RT_MAX_PLAIN_LENGTH) {
  ------------------
  |  |  177|  7.25k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (104:9): [True: 0, False: 7.25k]
  ------------------
  105|       |        /*
  106|       |         * We use SSL_R_DATA_LENGTH_TOO_LONG instead of
  107|       |         * SSL_R_ENCRYPTED_LENGTH_TOO_LONG here because we are the "any" method
  108|       |         * and we know that we are dealing with plaintext data
  109|       |         */
  110|      0|        RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW, SSL_R_DATA_LENGTH_TOO_LONG);
  ------------------
  |  |  388|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  390|      0|    (ERR_new(),                                                  \
  |  |  |  |  391|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  392|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  111|      0|        return 0;
  112|      0|    }
  113|  7.25k|    return 1;
  114|  7.25k|}
tlsany_meth.c:tls_any_prepare_for_encryption:
  129|  14.5k|{
  130|       |    /* No encryption, so nothing to do */
  131|  14.5k|    return 1;
  132|  14.5k|}

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

ssl3_cleanup_key_block:
   19|  43.5k|{
   20|  43.5k|    OPENSSL_clear_free(s->s3.tmp.key_block, s->s3.tmp.key_block_length);
  ------------------
  |  |  130|  43.5k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   21|       |    s->s3.tmp.key_block = NULL;
   22|  43.5k|    s->s3.tmp.key_block_length = 0;
   23|  43.5k|}
ssl3_init_finished_mac:
   26|  7.25k|{
   27|  7.25k|    BIO *buf = BIO_new(BIO_s_mem());
   28|       |
   29|  7.25k|    if (buf == NULL) {
  ------------------
  |  Branch (29:9): [True: 0, False: 7.25k]
  ------------------
   30|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_BIO_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   31|      0|        return 0;
   32|      0|    }
   33|  7.25k|    ssl3_free_digest_list(s);
   34|  7.25k|    s->s3.handshake_buffer = buf;
   35|       |    (void)BIO_set_close(s->s3.handshake_buffer, BIO_CLOSE);
  ------------------
  |  |  643|  7.25k|#define BIO_set_close(b, c) (int)BIO_ctrl(b, BIO_CTRL_SET_CLOSE, (c), NULL)
  |  |  ------------------
  |  |  |  |   98|  7.25k|#define BIO_CTRL_SET_CLOSE 9 /* man - set the 'close' on free */
  |  |  ------------------
  ------------------
   36|  7.25k|    return 1;
   37|  7.25k|}
ssl3_free_digest_list:
   45|  43.5k|{
   46|  43.5k|    BIO_free(s->s3.handshake_buffer);
   47|  43.5k|    s->s3.handshake_buffer = NULL;
   48|  43.5k|    EVP_MD_CTX_free(s->s3.handshake_dgst);
   49|       |    s->s3.handshake_dgst = NULL;
   50|  43.5k|}
ssl3_finish_mac:
   53|  50.7k|{
   54|  50.7k|    int ret;
   55|       |
   56|  50.7k|    if (s->s3.handshake_dgst == NULL) {
  ------------------
  |  Branch (56:9): [True: 10.8k, False: 39.8k]
  ------------------
   57|       |        /* Note: this writes to a memory BIO so a failure is a fatal error */
   58|  10.8k|        if (len > INT_MAX) {
  ------------------
  |  Branch (58:13): [True: 0, False: 10.8k]
  ------------------
   59|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_OVERFLOW_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   60|      0|            return 0;
   61|      0|        }
   62|  10.8k|        ret = BIO_write(s->s3.handshake_buffer, (void *)buf, (int)len);
   63|  10.8k|        if (ret <= 0 || ret != (int)len) {
  ------------------
  |  Branch (63:13): [True: 0, False: 10.8k]
  |  Branch (63:25): [True: 0, False: 10.8k]
  ------------------
   64|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   65|      0|            return 0;
   66|      0|        }
   67|  39.8k|    } else {
   68|  39.8k|        ret = EVP_DigestUpdate(s->s3.handshake_dgst, buf, len);
   69|  39.8k|        if (!ret) {
  ------------------
  |  Branch (69:13): [True: 0, False: 39.8k]
  ------------------
   70|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   71|      0|            return 0;
   72|      0|        }
   73|  39.8k|    }
   74|  50.7k|    return 1;
   75|  50.7k|}
ssl3_digest_cached_records:
   78|  57.9k|{
   79|  57.9k|    const EVP_MD *md;
   80|  57.9k|    long hdatalen;
   81|  57.9k|    void *hdata;
   82|       |
   83|  57.9k|    if (s->s3.handshake_dgst == NULL) {
  ------------------
  |  Branch (83:9): [True: 7.25k, False: 50.7k]
  ------------------
   84|  7.25k|        hdatalen = BIO_get_mem_data(s->s3.handshake_buffer, &hdata);
  ------------------
  |  |  625|  7.25k|#define BIO_get_mem_data(b, pp) BIO_ctrl(b, BIO_CTRL_INFO, 0, (char *)(pp))
  |  |  ------------------
  |  |  |  |   92|  7.25k|#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
  |  |  ------------------
  ------------------
   85|  7.25k|        if (hdatalen <= 0) {
  ------------------
  |  Branch (85:13): [True: 0, False: 7.25k]
  ------------------
   86|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_HANDSHAKE_LENGTH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   87|      0|            return 0;
   88|      0|        }
   89|       |
   90|  7.25k|        s->s3.handshake_dgst = EVP_MD_CTX_new();
   91|  7.25k|        if (s->s3.handshake_dgst == NULL) {
  ------------------
  |  Branch (91:13): [True: 0, False: 7.25k]
  ------------------
   92|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   93|      0|            return 0;
   94|      0|        }
   95|       |
   96|  7.25k|        md = ssl_handshake_md(s);
   97|  7.25k|        if (md == NULL) {
  ------------------
  |  Branch (97:13): [True: 0, False: 7.25k]
  ------------------
   98|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   99|      0|                SSL_R_NO_SUITABLE_DIGEST_ALGORITHM);
  100|      0|            return 0;
  101|      0|        }
  102|  7.25k|        if (!EVP_DigestInit_ex(s->s3.handshake_dgst, md, NULL)
  ------------------
  |  Branch (102:13): [True: 0, False: 7.25k]
  ------------------
  103|  7.25k|            || !EVP_DigestUpdate(s->s3.handshake_dgst, hdata, hdatalen)) {
  ------------------
  |  Branch (103:16): [True: 0, False: 7.25k]
  ------------------
  104|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  105|      0|            return 0;
  106|      0|        }
  107|  7.25k|    }
  108|  57.9k|    if (keep == 0) {
  ------------------
  |  Branch (108:9): [True: 7.25k, False: 50.7k]
  ------------------
  109|  7.25k|        BIO_free(s->s3.handshake_buffer);
  110|  7.25k|        s->s3.handshake_buffer = NULL;
  111|  7.25k|    }
  112|       |
  113|  57.9k|    return 1;
  114|  57.9k|}

ssl_sort_cipher_list:
 3766|      2|{
 3767|      2|    qsort(tls13_ciphers, TLS13_NUM_CIPHERS, sizeof(tls13_ciphers[0]),
  ------------------
  |  |   27|      2|#define TLS13_NUM_CIPHERS OSSL_NELEM(tls13_ciphers)
  |  |  ------------------
  |  |  |  |   14|      2|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3768|      2|        cipher_compare);
 3769|      2|    qsort(ssl3_ciphers, SSL3_NUM_CIPHERS, sizeof(ssl3_ciphers[0]),
  ------------------
  |  |   28|      2|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|      2|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3770|      2|        cipher_compare);
 3771|      2|    qsort(ssl3_scsvs, SSL3_NUM_SCSVS, sizeof(ssl3_scsvs[0]), cipher_compare);
  ------------------
  |  |   29|      2|#define SSL3_NUM_SCSVS OSSL_NELEM(ssl3_scsvs)
  |  |  ------------------
  |  |  |  |   14|      2|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3772|      2|}
ssl3_num_ciphers:
 3775|  7.36k|{
 3776|  7.36k|    return SSL3_NUM_CIPHERS;
  ------------------
  |  |   28|  7.36k|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|  7.36k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3777|  7.36k|}
ssl3_get_cipher:
 3780|  1.40M|{
 3781|  1.40M|    if (u < SSL3_NUM_CIPHERS)
  ------------------
  |  |   28|  1.40M|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|  1.40M|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
  |  Branch (3781:9): [True: 1.40M, False: 0]
  ------------------
 3782|  1.40M|        return &(ssl3_ciphers[SSL3_NUM_CIPHERS - 1 - u]);
  ------------------
  |  |   28|  1.40M|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|  1.40M|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3783|      0|    else
 3784|      0|        return NULL;
 3785|  1.40M|}
ssl3_set_handshake_header:
 3788|  39.8k|{
 3789|       |    /* No header in the event of a CCS */
 3790|  39.8k|    if (htype == SSL3_MT_CHANGE_CIPHER_SPEC)
  ------------------
  |  |  337|  39.8k|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (3790:9): [True: 7.25k, False: 32.5k]
  ------------------
 3791|  7.25k|        return 1;
 3792|       |
 3793|       |    /* Set the content type and 3 bytes for the message len */
 3794|  32.5k|    if (!WPACKET_put_bytes_u8(pkt, htype)
  ------------------
  |  |  909|  65.1k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (3794:9): [True: 0, False: 32.5k]
  ------------------
 3795|  32.5k|        || !WPACKET_start_sub_packet_u24(pkt))
  ------------------
  |  |  814|  32.5k|    WPACKET_start_sub_packet_len__((pkt), 3)
  ------------------
  |  Branch (3795:12): [True: 0, False: 32.5k]
  ------------------
 3796|      0|        return 0;
 3797|       |
 3798|  32.5k|    return 1;
 3799|  32.5k|}
ssl3_handshake_write:
 3802|  32.5k|{
 3803|  32.5k|    return ssl3_do_write(s, SSL3_RT_HANDSHAKE);
  ------------------
  |  |  221|  32.5k|#define SSL3_RT_HANDSHAKE 22
  ------------------
 3804|  32.5k|}
ssl3_new:
 3807|  7.25k|{
 3808|  7.25k|#ifndef OPENSSL_NO_SRP
 3809|  7.25k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  7.25k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  7.25k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 7.25k]
  |  |  |  |  ------------------
  |  |  |  |   33|  7.25k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  7.25k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 7.25k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  7.25k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  7.25k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3810|       |
 3811|  7.25k|    if (sc == NULL)
  ------------------
  |  Branch (3811:9): [True: 0, False: 7.25k]
  ------------------
 3812|      0|        return 0;
 3813|       |
 3814|  7.25k|    if (!ssl_srp_ctx_init_intern(sc))
  ------------------
  |  Branch (3814:9): [True: 0, False: 7.25k]
  ------------------
 3815|      0|        return 0;
 3816|  7.25k|#endif
 3817|       |
 3818|  7.25k|    if (!s->method->ssl_clear(s))
  ------------------
  |  Branch (3818:9): [True: 0, False: 7.25k]
  ------------------
 3819|      0|        return 0;
 3820|       |
 3821|  7.25k|    return 1;
 3822|  7.25k|}
ssl3_free:
 3825|  7.25k|{
 3826|  7.25k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  7.25k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  7.25k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 7.25k]
  |  |  |  |  ------------------
  |  |  |  |   33|  7.25k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  7.25k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 7.25k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  7.25k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  7.25k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3827|  7.25k|    size_t i;
 3828|       |
 3829|  7.25k|    if (sc == NULL)
  ------------------
  |  Branch (3829:9): [True: 0, False: 7.25k]
  ------------------
 3830|      0|        return;
 3831|       |
 3832|  7.25k|    ssl3_cleanup_key_block(sc);
 3833|       |
 3834|  7.25k|    EVP_PKEY_free(sc->s3.peer_tmp);
 3835|  7.25k|    sc->s3.peer_tmp = NULL;
 3836|       |
 3837|  14.5k|    for (i = 0; i < sc->s3.tmp.num_ks_pkey; i++)
  ------------------
  |  Branch (3837:17): [True: 7.25k, False: 7.25k]
  ------------------
 3838|  7.25k|        if (sc->s3.tmp.ks_pkey[i] != NULL) {
  ------------------
  |  Branch (3838:13): [True: 7.25k, False: 0]
  ------------------
 3839|  7.25k|            if (sc->s3.tmp.pkey == sc->s3.tmp.ks_pkey[i])
  ------------------
  |  Branch (3839:17): [True: 3.62k, False: 3.62k]
  ------------------
 3840|  3.62k|                sc->s3.tmp.pkey = NULL;
 3841|       |
 3842|  7.25k|            EVP_PKEY_free(sc->s3.tmp.ks_pkey[i]);
 3843|  7.25k|            sc->s3.tmp.ks_pkey[i] = NULL;
 3844|  7.25k|        }
 3845|  7.25k|    sc->s3.tmp.num_ks_pkey = 0;
 3846|       |
 3847|  7.25k|    if (sc->s3.tmp.pkey != NULL) {
  ------------------
  |  Branch (3847:9): [True: 0, False: 7.25k]
  ------------------
 3848|      0|        EVP_PKEY_free(sc->s3.tmp.pkey);
 3849|      0|        sc->s3.tmp.pkey = NULL;
 3850|      0|    }
 3851|       |
 3852|  7.25k|    ssl_evp_cipher_free(sc->s3.tmp.new_sym_enc);
 3853|  7.25k|    ssl_evp_md_free(sc->s3.tmp.new_hash);
 3854|       |
 3855|  7.25k|    OPENSSL_free(sc->s3.tmp.ctype);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3856|  7.25k|    sk_X509_NAME_pop_free(sc->s3.tmp.peer_ca_names, X509_NAME_free);
  ------------------
  |  |   70|  7.25k|#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))
  ------------------
 3857|  7.25k|    OPENSSL_free(sc->s3.tmp.ciphers_raw);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3858|  7.25k|    OPENSSL_clear_free(sc->s3.tmp.pms, sc->s3.tmp.pmslen);
  ------------------
  |  |  130|  7.25k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3859|  7.25k|    OPENSSL_free(sc->s3.tmp.peer_sigalgs);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3860|  7.25k|    OPENSSL_free(sc->s3.tmp.peer_cert_sigalgs);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3861|  7.25k|    OPENSSL_free(sc->s3.tmp.valid_flags);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3862|  7.25k|    ssl3_free_digest_list(sc);
 3863|  7.25k|    OPENSSL_free(sc->s3.alpn_selected);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3864|  7.25k|    OPENSSL_free(sc->s3.alpn_proposed);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3865|  7.25k|    ossl_quic_tls_free(sc->qtls);
 3866|       |
 3867|  7.25k|#ifndef OPENSSL_NO_PSK
 3868|  7.25k|    OPENSSL_free(sc->s3.tmp.psk);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3869|  7.25k|#endif
 3870|       |
 3871|  7.25k|#ifndef OPENSSL_NO_SRP
 3872|  7.25k|    ssl_srp_ctx_free_intern(sc);
 3873|  7.25k|#endif
 3874|  7.25k|    memset(&sc->s3, 0, sizeof(sc->s3));
 3875|  7.25k|}
ssl3_clear:
 3878|  29.0k|{
 3879|  29.0k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  29.0k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  29.0k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 29.0k]
  |  |  |  |  ------------------
  |  |  |  |   33|  29.0k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  29.0k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 29.0k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  29.0k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  29.0k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3880|  29.0k|    int flags;
 3881|  29.0k|    size_t i;
 3882|       |
 3883|  29.0k|    if (sc == NULL)
  ------------------
  |  Branch (3883:9): [True: 0, False: 29.0k]
  ------------------
 3884|      0|        return 0;
 3885|       |
 3886|  29.0k|    ssl3_cleanup_key_block(sc);
 3887|  29.0k|    OPENSSL_free(sc->s3.tmp.ctype);
  ------------------
  |  |  132|  29.0k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3888|  29.0k|    sk_X509_NAME_pop_free(sc->s3.tmp.peer_ca_names, X509_NAME_free);
  ------------------
  |  |   70|  29.0k|#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))
  ------------------
 3889|  29.0k|    OPENSSL_free(sc->s3.tmp.ciphers_raw);
  ------------------
  |  |  132|  29.0k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3890|  29.0k|    OPENSSL_clear_free(sc->s3.tmp.pms, sc->s3.tmp.pmslen);
  ------------------
  |  |  130|  29.0k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3891|  29.0k|    OPENSSL_free(sc->s3.tmp.peer_sigalgs);
  ------------------
  |  |  132|  29.0k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3892|  29.0k|    OPENSSL_free(sc->s3.tmp.peer_cert_sigalgs);
  ------------------
  |  |  132|  29.0k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3893|  29.0k|    OPENSSL_free(sc->s3.tmp.valid_flags);
  ------------------
  |  |  132|  29.0k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3894|       |
 3895|  29.0k|    EVP_PKEY_free(sc->s3.peer_tmp);
 3896|       |
 3897|  29.0k|    for (i = 0; i < sc->s3.tmp.num_ks_pkey; i++)
  ------------------
  |  Branch (3897:17): [True: 0, False: 29.0k]
  ------------------
 3898|      0|        if (sc->s3.tmp.ks_pkey[i] != NULL) {
  ------------------
  |  Branch (3898:13): [True: 0, False: 0]
  ------------------
 3899|      0|            if (sc->s3.tmp.pkey == sc->s3.tmp.ks_pkey[i])
  ------------------
  |  Branch (3899:17): [True: 0, False: 0]
  ------------------
 3900|      0|                sc->s3.tmp.pkey = NULL;
 3901|       |
 3902|      0|            EVP_PKEY_free(sc->s3.tmp.ks_pkey[i]);
 3903|      0|            sc->s3.tmp.ks_pkey[i] = NULL;
 3904|      0|        }
 3905|  29.0k|    sc->s3.tmp.num_ks_pkey = 0;
 3906|       |
 3907|  29.0k|    if (sc->s3.tmp.pkey != NULL) {
  ------------------
  |  Branch (3907:9): [True: 0, False: 29.0k]
  ------------------
 3908|      0|        EVP_PKEY_free(sc->s3.tmp.pkey);
 3909|      0|        sc->s3.tmp.pkey = NULL;
 3910|      0|    }
 3911|       |
 3912|  29.0k|    ssl3_free_digest_list(sc);
 3913|       |
 3914|  29.0k|    OPENSSL_free(sc->s3.alpn_selected);
  ------------------
  |  |  132|  29.0k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3915|  29.0k|    OPENSSL_free(sc->s3.alpn_proposed);
  ------------------
  |  |  132|  29.0k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3916|       |
 3917|       |    /*
 3918|       |     * NULL/zero-out everything in the s3 struct, but remember if we are doing
 3919|       |     * QUIC.
 3920|       |     */
 3921|  29.0k|    flags = sc->s3.flags & (TLS1_FLAGS_QUIC | TLS1_FLAGS_QUIC_INTERNAL);
  ------------------
  |  |   22|  29.0k|#define TLS1_FLAGS_QUIC 0x2000
  ------------------
                  flags = sc->s3.flags & (TLS1_FLAGS_QUIC | TLS1_FLAGS_QUIC_INTERNAL);
  ------------------
  |  |   24|  29.0k|#define TLS1_FLAGS_QUIC_INTERNAL 0x4000
  ------------------
 3922|  29.0k|    memset(&sc->s3, 0, sizeof(sc->s3));
 3923|  29.0k|    sc->s3.flags |= flags;
 3924|       |
 3925|  29.0k|    if (!ssl_free_wbio_buffer(sc))
  ------------------
  |  Branch (3925:9): [True: 0, False: 29.0k]
  ------------------
 3926|      0|        return 0;
 3927|       |
 3928|  29.0k|    sc->version = TLS1_VERSION;
  ------------------
  |  |   24|  29.0k|#define TLS1_VERSION 0x0301
  ------------------
 3929|       |
 3930|  29.0k|#if !defined(OPENSSL_NO_NEXTPROTONEG)
 3931|  29.0k|    OPENSSL_free(sc->ext.npn);
  ------------------
  |  |  132|  29.0k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3932|  29.0k|    sc->ext.npn = NULL;
 3933|  29.0k|    sc->ext.npn_len = 0;
 3934|  29.0k|#endif
 3935|       |
 3936|  29.0k|    return 1;
 3937|  29.0k|}
ssl3_ctrl:
 3954|  7.25k|{
 3955|  7.25k|    int ret = 0;
 3956|  7.25k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  7.25k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  7.25k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 7.25k]
  |  |  |  |  ------------------
  |  |  |  |   33|  7.25k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  7.25k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 7.25k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  7.25k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  7.25k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3957|  7.25k|#ifndef OPENSSL_NO_OCSP
 3958|  7.25k|    unsigned char *p = NULL;
 3959|  7.25k|    OCSP_RESPONSE *resp = NULL;
 3960|  7.25k|#endif
 3961|       |
 3962|  7.25k|    if (sc == NULL)
  ------------------
  |  Branch (3962:9): [True: 0, False: 7.25k]
  ------------------
 3963|      0|        return ret;
 3964|       |
 3965|  7.25k|    switch (cmd) {
 3966|      0|    case SSL_CTRL_GET_CLIENT_CERT_REQUEST:
  ------------------
  |  | 1305|      0|#define SSL_CTRL_GET_CLIENT_CERT_REQUEST 9
  ------------------
  |  Branch (3966:5): [True: 0, False: 7.25k]
  ------------------
 3967|      0|        break;
 3968|      0|    case SSL_CTRL_GET_NUM_RENEGOTIATIONS:
  ------------------
  |  | 1306|      0|#define SSL_CTRL_GET_NUM_RENEGOTIATIONS 10
  ------------------
  |  Branch (3968:5): [True: 0, False: 7.25k]
  ------------------
 3969|      0|        ret = sc->s3.num_renegotiations;
 3970|      0|        break;
 3971|      0|    case SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS:
  ------------------
  |  | 1307|      0|#define SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS 11
  ------------------
  |  Branch (3971:5): [True: 0, False: 7.25k]
  ------------------
 3972|      0|        ret = sc->s3.num_renegotiations;
 3973|      0|        sc->s3.num_renegotiations = 0;
 3974|      0|        break;
 3975|      0|    case SSL_CTRL_GET_TOTAL_RENEGOTIATIONS:
  ------------------
  |  | 1308|      0|#define SSL_CTRL_GET_TOTAL_RENEGOTIATIONS 12
  ------------------
  |  Branch (3975:5): [True: 0, False: 7.25k]
  ------------------
 3976|      0|        ret = sc->s3.total_renegotiations;
 3977|      0|        break;
 3978|      0|    case SSL_CTRL_GET_FLAGS:
  ------------------
  |  | 1309|      0|#define SSL_CTRL_GET_FLAGS 13
  ------------------
  |  Branch (3978:5): [True: 0, False: 7.25k]
  ------------------
 3979|      0|        ret = (int)(sc->s3.flags);
 3980|      0|        break;
 3981|      0|#if !defined(OPENSSL_NO_DEPRECATED_3_0)
 3982|      0|    case SSL_CTRL_SET_TMP_DH: {
  ------------------
  |  | 1300|      0|#define SSL_CTRL_SET_TMP_DH 3
  ------------------
  |  Branch (3982:5): [True: 0, False: 7.25k]
  ------------------
 3983|      0|        EVP_PKEY *pkdh = NULL;
 3984|      0|        if (parg == NULL) {
  ------------------
  |  Branch (3984:13): [True: 0, False: 0]
  ------------------
 3985|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3986|      0|            return 0;
 3987|      0|        }
 3988|      0|        pkdh = ssl_dh_to_pkey(parg);
 3989|      0|        if (pkdh == NULL) {
  ------------------
  |  Branch (3989:13): [True: 0, False: 0]
  ------------------
 3990|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_DH_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3991|      0|            return 0;
 3992|      0|        }
 3993|      0|        if (!SSL_set0_tmp_dh_pkey(s, pkdh)) {
  ------------------
  |  Branch (3993:13): [True: 0, False: 0]
  ------------------
 3994|      0|            EVP_PKEY_free(pkdh);
 3995|      0|            return 0;
 3996|      0|        }
 3997|      0|        return 1;
 3998|      0|    } break;
 3999|      0|    case SSL_CTRL_SET_TMP_DH_CB: {
  ------------------
  |  | 1302|      0|#define SSL_CTRL_SET_TMP_DH_CB 6
  ------------------
  |  Branch (3999:5): [True: 0, False: 7.25k]
  ------------------
 4000|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4001|      0|        return ret;
 4002|      0|    }
 4003|      0|#endif
 4004|      0|    case SSL_CTRL_SET_DH_AUTO:
  ------------------
  |  | 1399|      0|#define SSL_CTRL_SET_DH_AUTO 118
  ------------------
  |  Branch (4004:5): [True: 0, False: 7.25k]
  ------------------
 4005|      0|        sc->cert->dh_tmp_auto = larg;
 4006|      0|        return 1;
 4007|      0|#if !defined(OPENSSL_NO_DEPRECATED_3_0)
 4008|      0|    case SSL_CTRL_SET_TMP_ECDH: {
  ------------------
  |  | 1301|      0|#define SSL_CTRL_SET_TMP_ECDH 4
  ------------------
  |  Branch (4008:5): [True: 0, False: 7.25k]
  ------------------
 4009|      0|        if (parg == NULL) {
  ------------------
  |  Branch (4009:13): [True: 0, False: 0]
  ------------------
 4010|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4011|      0|            return 0;
 4012|      0|        }
 4013|      0|        return ssl_set_tmp_ecdh_groups(&sc->ext.supportedgroups,
 4014|      0|            &sc->ext.supportedgroups_len,
 4015|      0|            &sc->ext.keyshares,
 4016|      0|            &sc->ext.keyshares_len,
 4017|      0|            &sc->ext.tuples,
 4018|      0|            &sc->ext.tuples_len,
 4019|      0|            parg);
 4020|      0|    }
 4021|      0|#endif /* !OPENSSL_NO_DEPRECATED_3_0 */
 4022|  3.62k|    case SSL_CTRL_SET_TLSEXT_HOSTNAME:
  ------------------
  |  | 1341|  3.62k|#define SSL_CTRL_SET_TLSEXT_HOSTNAME 55
  ------------------
  |  Branch (4022:5): [True: 3.62k, False: 3.62k]
  ------------------
 4023|       |        /*
 4024|       |         * This API is only used for a client to set what SNI it will request
 4025|       |         * from the server, but we currently allow it to be used on servers
 4026|       |         * as well, which is a programming error.  Currently we just clear
 4027|       |         * the field in SSL_do_handshake() for server SSLs, but when we can
 4028|       |         * make ABI-breaking changes, we may want to make use of this API
 4029|       |         * an error on server SSLs.
 4030|       |         */
 4031|  3.62k|        if (larg == TLSEXT_NAMETYPE_host_name) {
  ------------------
  |  |  179|  3.62k|#define TLSEXT_NAMETYPE_host_name 0
  ------------------
  |  Branch (4031:13): [True: 3.62k, False: 0]
  ------------------
 4032|  3.62k|            size_t len;
 4033|       |
 4034|  3.62k|            OPENSSL_free(sc->ext.hostname);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4035|  3.62k|            sc->ext.hostname = NULL;
 4036|       |
 4037|  3.62k|            ret = 1;
 4038|  3.62k|            if (parg == NULL)
  ------------------
  |  Branch (4038:17): [True: 0, False: 3.62k]
  ------------------
 4039|      0|                break;
 4040|  3.62k|            len = strlen((char *)parg);
 4041|  3.62k|            if (len == 0 || len > TLSEXT_MAXLEN_host_name) {
  ------------------
  |  |  256|  3.62k|#define TLSEXT_MAXLEN_host_name 255
  ------------------
  |  Branch (4041:17): [True: 0, False: 3.62k]
  |  Branch (4041:29): [True: 0, False: 3.62k]
  ------------------
 4042|      0|                ERR_raise(ERR_LIB_SSL, SSL_R_TLS_EXT_INVALID_SERVERNAME);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4043|      0|                return 0;
 4044|      0|            }
 4045|  3.62k|            if ((sc->ext.hostname = OPENSSL_strdup((char *)parg)) == NULL) {
  ------------------
  |  |  136|  3.62k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (4045:17): [True: 0, False: 3.62k]
  ------------------
 4046|      0|                ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4047|      0|                return 0;
 4048|      0|            }
 4049|  3.62k|        } else {
 4050|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_TLS_EXT_INVALID_SERVERNAME_TYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4051|      0|            return 0;
 4052|      0|        }
 4053|  3.62k|        break;
 4054|  3.62k|    case SSL_CTRL_SET_TLSEXT_DEBUG_ARG:
  ------------------
  |  | 1343|      0|#define SSL_CTRL_SET_TLSEXT_DEBUG_ARG 57
  ------------------
  |  Branch (4054:5): [True: 0, False: 7.25k]
  ------------------
 4055|      0|        sc->ext.debug_arg = parg;
 4056|      0|        ret = 1;
 4057|      0|        break;
 4058|       |
 4059|  3.62k|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE:
  ------------------
  |  | 1407|  3.62k|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE 127
  ------------------
  |  Branch (4059:5): [True: 3.62k, False: 3.62k]
  ------------------
 4060|  3.62k|        ret = sc->ext.status_type;
 4061|  3.62k|        break;
 4062|       |
 4063|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE:
  ------------------
  |  | 1351|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE 65
  ------------------
  |  Branch (4063:5): [True: 0, False: 7.25k]
  ------------------
 4064|      0|        sc->ext.status_type = larg;
 4065|      0|        ret = 1;
 4066|      0|        break;
 4067|       |
 4068|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS:
  ------------------
  |  | 1352|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS 66
  ------------------
  |  Branch (4068:5): [True: 0, False: 7.25k]
  ------------------
 4069|      0|        *(STACK_OF(X509_EXTENSION) **)parg = sc->ext.ocsp.exts;
 4070|      0|        ret = 1;
 4071|      0|        break;
 4072|       |
 4073|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS:
  ------------------
  |  | 1353|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS 67
  ------------------
  |  Branch (4073:5): [True: 0, False: 7.25k]
  ------------------
 4074|      0|        sc->ext.ocsp.exts = parg;
 4075|      0|        ret = 1;
 4076|      0|        break;
 4077|       |
 4078|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS:
  ------------------
  |  | 1354|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS 68
  ------------------
  |  Branch (4078:5): [True: 0, False: 7.25k]
  ------------------
 4079|      0|        *(STACK_OF(OCSP_RESPID) **)parg = sc->ext.ocsp.ids;
 4080|      0|        ret = 1;
 4081|      0|        break;
 4082|       |
 4083|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS:
  ------------------
  |  | 1355|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS 69
  ------------------
  |  Branch (4083:5): [True: 0, False: 7.25k]
  ------------------
 4084|      0|        sc->ext.ocsp.ids = parg;
 4085|      0|        ret = 1;
 4086|      0|        break;
 4087|       |
 4088|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP:
  ------------------
  |  | 1356|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP 70
  ------------------
  |  Branch (4088:5): [True: 0, False: 7.25k]
  ------------------
 4089|      0|        *(unsigned char **)parg = NULL;
 4090|      0|        ret = -1;
 4091|       |
 4092|      0|#ifndef OPENSSL_NO_OCSP
 4093|      0|        resp = sk_OCSP_RESPONSE_value(sc->ext.ocsp.resp_ex, 0);
 4094|       |
 4095|      0|        if (resp != NULL) {
  ------------------
  |  Branch (4095:13): [True: 0, False: 0]
  ------------------
 4096|      0|            int resp_len = i2d_OCSP_RESPONSE(resp, &p);
 4097|       |
 4098|      0|            if (resp_len > 0) {
  ------------------
  |  Branch (4098:17): [True: 0, False: 0]
  ------------------
 4099|      0|                OPENSSL_free(sc->ext.ocsp.resp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4100|      0|                *(unsigned char **)parg = sc->ext.ocsp.resp = p;
 4101|      0|                sc->ext.ocsp.resp_len = (size_t)resp_len;
 4102|      0|                ret = resp_len;
 4103|      0|            }
 4104|      0|        }
 4105|      0|#endif
 4106|      0|        break;
 4107|       |
 4108|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP:
  ------------------
  |  | 1357|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP 71
  ------------------
  |  Branch (4108:5): [True: 0, False: 7.25k]
  ------------------
 4109|      0|        ret = 1;
 4110|      0|#ifndef OPENSSL_NO_OCSP
 4111|       |        /*
 4112|       |         * In case of success keep the single value so we do not need to
 4113|       |         * free it immediately.
 4114|       |         * However in the handshake code we only use the extended values.
 4115|       |         */
 4116|      0|        OPENSSL_free(sc->ext.ocsp.resp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4117|      0|        sc->ext.ocsp.resp = NULL;
 4118|      0|        sc->ext.ocsp.resp_len = 0;
 4119|       |
 4120|      0|        sk_OCSP_RESPONSE_pop_free(sc->ext.ocsp.resp_ex, OCSP_RESPONSE_free);
 4121|      0|        sc->ext.ocsp.resp_ex = NULL;
 4122|       |
 4123|      0|        if (parg != NULL) {
  ------------------
  |  Branch (4123:13): [True: 0, False: 0]
  ------------------
 4124|      0|            sc->ext.ocsp.resp_ex = sk_OCSP_RESPONSE_new_reserve(NULL, 1);
 4125|      0|            if (sc->ext.ocsp.resp_ex == NULL)
  ------------------
  |  Branch (4125:17): [True: 0, False: 0]
  ------------------
 4126|      0|                return 0;
 4127|       |
 4128|      0|            p = parg;
 4129|      0|            resp = d2i_OCSP_RESPONSE(NULL, (const unsigned char **)&p, larg);
 4130|      0|            if (resp != NULL)
  ------------------
  |  Branch (4130:17): [True: 0, False: 0]
  ------------------
 4131|      0|                sk_OCSP_RESPONSE_push(sc->ext.ocsp.resp_ex, resp);
 4132|       |
 4133|      0|            sc->ext.ocsp.resp = parg;
 4134|      0|            sc->ext.ocsp.resp_len = larg;
 4135|      0|        }
 4136|      0|#endif
 4137|      0|        break;
 4138|       |
 4139|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP_EX:
  ------------------
  |  | 1422|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP_EX 142
  ------------------
  |  Branch (4139:5): [True: 0, False: 7.25k]
  ------------------
 4140|      0|#ifndef OPENSSL_NO_OCSP
 4141|      0|        *(STACK_OF(OCSP_RESPONSE) **)parg = sc->ext.ocsp.resp_ex;
 4142|      0|        ret = sk_OCSP_RESPONSE_num(sc->ext.ocsp.resp_ex);
 4143|       |#else
 4144|       |        *(unsigned char **)parg = NULL;
 4145|       |        ret = -1;
 4146|       |#endif
 4147|      0|        break;
 4148|       |
 4149|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP_EX:
  ------------------
  |  | 1423|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP_EX 143
  ------------------
  |  Branch (4149:5): [True: 0, False: 7.25k]
  ------------------
 4150|      0|#ifndef OPENSSL_NO_OCSP
 4151|       |        /*
 4152|       |         * cleanup single values, which might be set somewhere else
 4153|       |         * we only use the extended values
 4154|       |         */
 4155|      0|        if (sc->ext.ocsp.resp != NULL) {
  ------------------
  |  Branch (4155:13): [True: 0, False: 0]
  ------------------
 4156|      0|            OPENSSL_free(sc->ext.ocsp.resp);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4157|      0|            sc->ext.ocsp.resp = NULL;
 4158|      0|            sc->ext.ocsp.resp_len = 0;
 4159|      0|        }
 4160|       |
 4161|      0|        sk_OCSP_RESPONSE_pop_free(sc->ext.ocsp.resp_ex, OCSP_RESPONSE_free);
 4162|      0|        sc->ext.ocsp.resp_ex = (STACK_OF(OCSP_RESPONSE) *)parg;
 4163|      0|#endif
 4164|      0|        ret = 1;
 4165|      0|        break;
 4166|       |
 4167|      0|    case SSL_CTRL_CHAIN:
  ------------------
  |  | 1375|      0|#define SSL_CTRL_CHAIN 88
  ------------------
  |  Branch (4167:5): [True: 0, False: 7.25k]
  ------------------
 4168|      0|        if (larg)
  ------------------
  |  Branch (4168:13): [True: 0, False: 0]
  ------------------
 4169|      0|            return ssl_cert_set1_chain(sc, NULL, (STACK_OF(X509) *)parg);
 4170|      0|        else
 4171|      0|            return ssl_cert_set0_chain(sc, NULL, (STACK_OF(X509) *)parg);
 4172|       |
 4173|      0|    case SSL_CTRL_CHAIN_CERT:
  ------------------
  |  | 1376|      0|#define SSL_CTRL_CHAIN_CERT 89
  ------------------
  |  Branch (4173:5): [True: 0, False: 7.25k]
  ------------------
 4174|      0|        if (larg)
  ------------------
  |  Branch (4174:13): [True: 0, False: 0]
  ------------------
 4175|      0|            return ssl_cert_add1_chain_cert(sc, NULL, (X509 *)parg);
 4176|      0|        else
 4177|      0|            return ssl_cert_add0_chain_cert(sc, NULL, (X509 *)parg);
 4178|       |
 4179|      0|    case SSL_CTRL_GET_CHAIN_CERTS:
  ------------------
  |  | 1396|      0|#define SSL_CTRL_GET_CHAIN_CERTS 115
  ------------------
  |  Branch (4179:5): [True: 0, False: 7.25k]
  ------------------
 4180|      0|        *(STACK_OF(X509) **)parg = sc->cert->key->chain;
 4181|      0|        ret = 1;
 4182|      0|        break;
 4183|       |
 4184|      0|    case SSL_CTRL_SELECT_CURRENT_CERT:
  ------------------
  |  | 1397|      0|#define SSL_CTRL_SELECT_CURRENT_CERT 116
  ------------------
  |  Branch (4184:5): [True: 0, False: 7.25k]
  ------------------
 4185|      0|        return ssl_cert_select_current(sc->cert, (X509 *)parg);
 4186|       |
 4187|      0|    case SSL_CTRL_SET_CURRENT_CERT:
  ------------------
  |  | 1398|      0|#define SSL_CTRL_SET_CURRENT_CERT 117
  ------------------
  |  Branch (4187:5): [True: 0, False: 7.25k]
  ------------------
 4188|      0|        if (larg == SSL_CERT_SET_SERVER) {
  ------------------
  |  | 1426|      0|#define SSL_CERT_SET_SERVER 3
  ------------------
  |  Branch (4188:13): [True: 0, False: 0]
  ------------------
 4189|      0|            const SSL_CIPHER *cipher;
 4190|      0|            if (!sc->server)
  ------------------
  |  Branch (4190:17): [True: 0, False: 0]
  ------------------
 4191|      0|                return 0;
 4192|      0|            cipher = sc->s3.tmp.new_cipher;
 4193|      0|            if (cipher == NULL)
  ------------------
  |  Branch (4193:17): [True: 0, False: 0]
  ------------------
 4194|      0|                return 0;
 4195|       |            /*
 4196|       |             * No certificate for unauthenticated ciphersuites or using SRP
 4197|       |             * authentication
 4198|       |             */
 4199|      0|            if (cipher->algorithm_auth & (SSL_aNULL | SSL_aSRP))
  ------------------
  |  |  116|      0|#define SSL_aNULL 0x00000004U
  ------------------
                          if (cipher->algorithm_auth & (SSL_aNULL | SSL_aSRP))
  ------------------
  |  |  124|      0|#define SSL_aSRP 0x00000040U
  ------------------
  |  Branch (4199:17): [True: 0, False: 0]
  ------------------
 4200|      0|                return 2;
 4201|      0|            if (sc->s3.tmp.cert == NULL)
  ------------------
  |  Branch (4201:17): [True: 0, False: 0]
  ------------------
 4202|      0|                return 0;
 4203|      0|            sc->cert->key = sc->s3.tmp.cert;
 4204|      0|            return 1;
 4205|      0|        }
 4206|      0|        return ssl_cert_set_current(sc->cert, larg);
 4207|       |
 4208|      0|    case SSL_CTRL_GET_GROUPS: {
  ------------------
  |  | 1377|      0|#define SSL_CTRL_GET_GROUPS 90
  ------------------
  |  Branch (4208:5): [True: 0, False: 7.25k]
  ------------------
 4209|      0|        uint16_t *clist;
 4210|      0|        size_t clistlen;
 4211|       |
 4212|      0|        if (!sc->session)
  ------------------
  |  Branch (4212:13): [True: 0, False: 0]
  ------------------
 4213|      0|            return 0;
 4214|      0|        clist = sc->ext.peer_supportedgroups;
 4215|      0|        clistlen = sc->ext.peer_supportedgroups_len;
 4216|      0|        if (parg) {
  ------------------
  |  Branch (4216:13): [True: 0, False: 0]
  ------------------
 4217|      0|            size_t i;
 4218|      0|            int *cptr = parg;
 4219|       |
 4220|      0|            for (i = 0; i < clistlen; i++) {
  ------------------
  |  Branch (4220:25): [True: 0, False: 0]
  ------------------
 4221|      0|                const TLS_GROUP_INFO *cinf
 4222|      0|                    = tls1_group_id_lookup(s->ctx, clist[i]);
 4223|       |
 4224|      0|                if (cinf != NULL)
  ------------------
  |  Branch (4224:21): [True: 0, False: 0]
  ------------------
 4225|      0|                    cptr[i] = tls1_group_id2nid(cinf->group_id, 1);
 4226|      0|                else
 4227|      0|                    cptr[i] = TLSEXT_nid_unknown | clist[i];
  ------------------
  |  |  227|      0|#define TLSEXT_nid_unknown 0x1000000
  ------------------
 4228|      0|            }
 4229|      0|        }
 4230|      0|        return (int)clistlen;
 4231|      0|    }
 4232|       |
 4233|      0|    case SSL_CTRL_SET_GROUPS:
  ------------------
  |  | 1378|      0|#define SSL_CTRL_SET_GROUPS 91
  ------------------
  |  Branch (4233:5): [True: 0, False: 7.25k]
  ------------------
 4234|      0|        return tls1_set_groups(&sc->ext.supportedgroups,
 4235|      0|            &sc->ext.supportedgroups_len,
 4236|      0|            &sc->ext.keyshares,
 4237|      0|            &sc->ext.keyshares_len,
 4238|      0|            &sc->ext.tuples,
 4239|      0|            &sc->ext.tuples_len,
 4240|      0|            parg, larg);
 4241|       |
 4242|      0|    case SSL_CTRL_SET_GROUPS_LIST:
  ------------------
  |  | 1379|      0|#define SSL_CTRL_SET_GROUPS_LIST 92
  ------------------
  |  Branch (4242:5): [True: 0, False: 7.25k]
  ------------------
 4243|      0|        return tls1_set_groups_list(s->ctx,
 4244|      0|            &sc->ext.supportedgroups,
 4245|      0|            &sc->ext.supportedgroups_len,
 4246|      0|            &sc->ext.keyshares,
 4247|      0|            &sc->ext.keyshares_len,
 4248|      0|            &sc->ext.tuples,
 4249|      0|            &sc->ext.tuples_len,
 4250|      0|            parg);
 4251|       |
 4252|      0|    case SSL_CTRL_GET_SHARED_GROUP: {
  ------------------
  |  | 1380|      0|#define SSL_CTRL_GET_SHARED_GROUP 93
  ------------------
  |  Branch (4252:5): [True: 0, False: 7.25k]
  ------------------
 4253|      0|        uint16_t id = tls1_shared_group(sc, larg, TLS1_GROUPS_ALL_GROUPS);
  ------------------
  |  | 2717|      0|#define TLS1_GROUPS_ALL_GROUPS 2
  ------------------
 4254|       |
 4255|      0|        if (larg != -1)
  ------------------
  |  Branch (4255:13): [True: 0, False: 0]
  ------------------
 4256|      0|            return tls1_group_id2nid(id, 1);
 4257|      0|        return id;
 4258|      0|    }
 4259|      0|    case SSL_CTRL_GET_NEGOTIATED_GROUP: {
  ------------------
  |  | 1414|      0|#define SSL_CTRL_GET_NEGOTIATED_GROUP 134
  ------------------
  |  Branch (4259:5): [True: 0, False: 7.25k]
  ------------------
 4260|      0|        unsigned int id;
 4261|       |
 4262|      0|        if (SSL_CONNECTION_IS_TLS13(sc) && sc->s3.did_kex)
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      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 (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      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 (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (4262:44): [True: 0, False: 0]
  ------------------
 4263|      0|            id = sc->s3.group_id;
 4264|      0|        else
 4265|      0|            id = (sc->session != NULL) ? sc->session->kex_group : NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (4265:18): [True: 0, False: 0]
  ------------------
 4266|      0|        ret = tls1_group_id2nid(id, 1);
 4267|      0|        break;
 4268|      0|    }
 4269|      0|    case SSL_CTRL_SET_SIGALGS:
  ------------------
  |  | 1381|      0|#define SSL_CTRL_SET_SIGALGS 97
  ------------------
  |  Branch (4269:5): [True: 0, False: 7.25k]
  ------------------
 4270|      0|        return tls1_set_sigalgs(sc->cert, parg, larg, 0);
 4271|       |
 4272|      0|    case SSL_CTRL_SET_SIGALGS_LIST:
  ------------------
  |  | 1382|      0|#define SSL_CTRL_SET_SIGALGS_LIST 98
  ------------------
  |  Branch (4272:5): [True: 0, False: 7.25k]
  ------------------
 4273|      0|        return tls1_set_sigalgs_list(s->ctx, sc->cert, parg, 0);
 4274|       |
 4275|      0|    case SSL_CTRL_SET_CLIENT_SIGALGS:
  ------------------
  |  | 1385|      0|#define SSL_CTRL_SET_CLIENT_SIGALGS 101
  ------------------
  |  Branch (4275:5): [True: 0, False: 7.25k]
  ------------------
 4276|      0|        return tls1_set_sigalgs(sc->cert, parg, larg, 1);
 4277|       |
 4278|      0|    case SSL_CTRL_SET_CLIENT_SIGALGS_LIST:
  ------------------
  |  | 1386|      0|#define SSL_CTRL_SET_CLIENT_SIGALGS_LIST 102
  ------------------
  |  Branch (4278:5): [True: 0, False: 7.25k]
  ------------------
 4279|      0|        return tls1_set_sigalgs_list(s->ctx, sc->cert, parg, 1);
 4280|       |
 4281|      0|    case SSL_CTRL_GET_CLIENT_CERT_TYPES: {
  ------------------
  |  | 1387|      0|#define SSL_CTRL_GET_CLIENT_CERT_TYPES 103
  ------------------
  |  Branch (4281:5): [True: 0, False: 7.25k]
  ------------------
 4282|      0|        const unsigned char **pctype = parg;
 4283|      0|        if (sc->server || !sc->s3.tmp.cert_req)
  ------------------
  |  Branch (4283:13): [True: 0, False: 0]
  |  Branch (4283:27): [True: 0, False: 0]
  ------------------
 4284|      0|            return 0;
 4285|      0|        if (pctype)
  ------------------
  |  Branch (4285:13): [True: 0, False: 0]
  ------------------
 4286|      0|            *pctype = sc->s3.tmp.ctype;
 4287|      0|        return (long)sc->s3.tmp.ctype_len;
 4288|      0|    }
 4289|       |
 4290|      0|    case SSL_CTRL_SET_CLIENT_CERT_TYPES:
  ------------------
  |  | 1388|      0|#define SSL_CTRL_SET_CLIENT_CERT_TYPES 104
  ------------------
  |  Branch (4290:5): [True: 0, False: 7.25k]
  ------------------
 4291|      0|        if (!sc->server)
  ------------------
  |  Branch (4291:13): [True: 0, False: 0]
  ------------------
 4292|      0|            return 0;
 4293|      0|        return ssl3_set_req_cert_type(sc->cert, parg, larg);
 4294|       |
 4295|      0|    case SSL_CTRL_BUILD_CERT_CHAIN:
  ------------------
  |  | 1389|      0|#define SSL_CTRL_BUILD_CERT_CHAIN 105
  ------------------
  |  Branch (4295:5): [True: 0, False: 7.25k]
  ------------------
 4296|      0|        return ssl_build_cert_chain(sc, NULL, larg);
 4297|       |
 4298|      0|    case SSL_CTRL_SET_VERIFY_CERT_STORE:
  ------------------
  |  | 1390|      0|#define SSL_CTRL_SET_VERIFY_CERT_STORE 106
  ------------------
  |  Branch (4298:5): [True: 0, False: 7.25k]
  ------------------
 4299|      0|        return ssl_cert_set_cert_store(sc->cert, parg, 0, larg);
 4300|       |
 4301|      0|    case SSL_CTRL_SET_CHAIN_CERT_STORE:
  ------------------
  |  | 1391|      0|#define SSL_CTRL_SET_CHAIN_CERT_STORE 107
  ------------------
  |  Branch (4301:5): [True: 0, False: 7.25k]
  ------------------
 4302|      0|        return ssl_cert_set_cert_store(sc->cert, parg, 1, larg);
 4303|       |
 4304|      0|    case SSL_CTRL_GET_VERIFY_CERT_STORE:
  ------------------
  |  | 1417|      0|#define SSL_CTRL_GET_VERIFY_CERT_STORE 137
  ------------------
  |  Branch (4304:5): [True: 0, False: 7.25k]
  ------------------
 4305|      0|        return ssl_cert_get_cert_store(sc->cert, parg, 0);
 4306|       |
 4307|      0|    case SSL_CTRL_GET_CHAIN_CERT_STORE:
  ------------------
  |  | 1418|      0|#define SSL_CTRL_GET_CHAIN_CERT_STORE 138
  ------------------
  |  Branch (4307:5): [True: 0, False: 7.25k]
  ------------------
 4308|      0|        return ssl_cert_get_cert_store(sc->cert, parg, 1);
 4309|       |
 4310|      0|    case SSL_CTRL_GET_PEER_SIGNATURE_NAME:
  ------------------
  |  | 1421|      0|#define SSL_CTRL_GET_PEER_SIGNATURE_NAME 141
  ------------------
  |  Branch (4310:5): [True: 0, False: 7.25k]
  ------------------
 4311|      0|        if (parg == NULL || sc->s3.tmp.peer_sigalg == NULL)
  ------------------
  |  Branch (4311:13): [True: 0, False: 0]
  |  Branch (4311:29): [True: 0, False: 0]
  ------------------
 4312|      0|            return 0;
 4313|      0|        *(const char **)parg = sc->s3.tmp.peer_sigalg->name;
 4314|      0|        return 1;
 4315|       |
 4316|      0|    case SSL_CTRL_GET_PEER_SIGNATURE_NID:
  ------------------
  |  | 1392|      0|#define SSL_CTRL_GET_PEER_SIGNATURE_NID 108
  ------------------
  |  Branch (4316:5): [True: 0, False: 7.25k]
  ------------------
 4317|      0|        if (sc->s3.tmp.peer_sigalg == NULL)
  ------------------
  |  Branch (4317:13): [True: 0, False: 0]
  ------------------
 4318|      0|            return 0;
 4319|      0|        *(int *)parg = sc->s3.tmp.peer_sigalg->hash;
 4320|      0|        return 1;
 4321|       |
 4322|      0|    case SSL_CTRL_GET_SIGNATURE_NAME:
  ------------------
  |  | 1420|      0|#define SSL_CTRL_GET_SIGNATURE_NAME 140
  ------------------
  |  Branch (4322:5): [True: 0, False: 7.25k]
  ------------------
 4323|      0|        if (parg == NULL || sc->s3.tmp.sigalg == NULL)
  ------------------
  |  Branch (4323:13): [True: 0, False: 0]
  |  Branch (4323:29): [True: 0, False: 0]
  ------------------
 4324|      0|            return 0;
 4325|      0|        *(const char **)parg = sc->s3.tmp.sigalg->name;
 4326|      0|        return 1;
 4327|       |
 4328|      0|    case SSL_CTRL_GET_SIGNATURE_NID:
  ------------------
  |  | 1412|      0|#define SSL_CTRL_GET_SIGNATURE_NID 132
  ------------------
  |  Branch (4328:5): [True: 0, False: 7.25k]
  ------------------
 4329|      0|        if (sc->s3.tmp.sigalg == NULL)
  ------------------
  |  Branch (4329:13): [True: 0, False: 0]
  ------------------
 4330|      0|            return 0;
 4331|      0|        *(int *)parg = sc->s3.tmp.sigalg->hash;
 4332|      0|        return 1;
 4333|       |
 4334|      0|    case SSL_CTRL_GET_PEER_TMP_KEY:
  ------------------
  |  | 1393|      0|#define SSL_CTRL_GET_PEER_TMP_KEY 109
  ------------------
  |  Branch (4334:5): [True: 0, False: 7.25k]
  ------------------
 4335|      0|        if (sc->session == NULL || sc->s3.peer_tmp == NULL) {
  ------------------
  |  Branch (4335:13): [True: 0, False: 0]
  |  Branch (4335:36): [True: 0, False: 0]
  ------------------
 4336|      0|            return 0;
 4337|      0|        } else {
 4338|      0|            if (!EVP_PKEY_up_ref(sc->s3.peer_tmp))
  ------------------
  |  Branch (4338:17): [True: 0, False: 0]
  ------------------
 4339|      0|                return 0;
 4340|       |
 4341|      0|            *(EVP_PKEY **)parg = sc->s3.peer_tmp;
 4342|      0|            return 1;
 4343|      0|        }
 4344|       |
 4345|      0|    case SSL_CTRL_GET_TMP_KEY:
  ------------------
  |  | 1413|      0|#define SSL_CTRL_GET_TMP_KEY 133
  ------------------
  |  Branch (4345:5): [True: 0, False: 7.25k]
  ------------------
 4346|      0|        if (sc->session == NULL || sc->s3.tmp.pkey == NULL) {
  ------------------
  |  Branch (4346:13): [True: 0, False: 0]
  |  Branch (4346:36): [True: 0, False: 0]
  ------------------
 4347|      0|            return 0;
 4348|      0|        } else {
 4349|      0|            if (!EVP_PKEY_up_ref(sc->s3.tmp.pkey))
  ------------------
  |  Branch (4349:17): [True: 0, False: 0]
  ------------------
 4350|      0|                return 0;
 4351|       |
 4352|      0|            *(EVP_PKEY **)parg = sc->s3.tmp.pkey;
 4353|      0|            return 1;
 4354|      0|        }
 4355|       |
 4356|      0|    case SSL_CTRL_GET_EC_POINT_FORMATS: {
  ------------------
  |  | 1395|      0|#define SSL_CTRL_GET_EC_POINT_FORMATS 111
  ------------------
  |  Branch (4356:5): [True: 0, False: 7.25k]
  ------------------
 4357|      0|        const unsigned char **pformat = parg;
 4358|       |
 4359|      0|        if (sc->ext.peer_ecpointformats == NULL)
  ------------------
  |  Branch (4359:13): [True: 0, False: 0]
  ------------------
 4360|      0|            return 0;
 4361|      0|        *pformat = sc->ext.peer_ecpointformats;
 4362|      0|        return (int)sc->ext.peer_ecpointformats_len;
 4363|      0|    }
 4364|       |
 4365|      0|    case SSL_CTRL_GET_IANA_GROUPS: {
  ------------------
  |  | 1415|      0|#define SSL_CTRL_GET_IANA_GROUPS 135
  ------------------
  |  Branch (4365:5): [True: 0, False: 7.25k]
  ------------------
 4366|      0|        if (parg != NULL) {
  ------------------
  |  Branch (4366:13): [True: 0, False: 0]
  ------------------
 4367|      0|            *(uint16_t **)parg = (uint16_t *)sc->ext.peer_supportedgroups;
 4368|      0|        }
 4369|      0|        return (int)sc->ext.peer_supportedgroups_len;
 4370|      0|    }
 4371|       |
 4372|      0|    case SSL_CTRL_SET_MSG_CALLBACK_ARG:
  ------------------
  |  | 1312|      0|#define SSL_CTRL_SET_MSG_CALLBACK_ARG 16
  ------------------
  |  Branch (4372:5): [True: 0, False: 7.25k]
  ------------------
 4373|      0|        sc->msg_callback_arg = parg;
 4374|      0|        return 1;
 4375|       |
 4376|      0|    default:
  ------------------
  |  Branch (4376:5): [True: 0, False: 7.25k]
  ------------------
 4377|      0|        break;
 4378|  7.25k|    }
 4379|  7.25k|    return ret;
 4380|  7.25k|}
ssl3_ctx_ctrl:
 4418|  7.36k|{
 4419|  7.36k|    switch (cmd) {
 4420|      0|#if !defined(OPENSSL_NO_DEPRECATED_3_0)
 4421|      0|    case SSL_CTRL_SET_TMP_DH: {
  ------------------
  |  | 1300|      0|#define SSL_CTRL_SET_TMP_DH 3
  ------------------
  |  Branch (4421:5): [True: 0, False: 7.36k]
  ------------------
 4422|      0|        EVP_PKEY *pkdh = NULL;
 4423|      0|        if (parg == NULL) {
  ------------------
  |  Branch (4423:13): [True: 0, False: 0]
  ------------------
 4424|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4425|      0|            return 0;
 4426|      0|        }
 4427|      0|        pkdh = ssl_dh_to_pkey(parg);
 4428|      0|        if (pkdh == NULL) {
  ------------------
  |  Branch (4428:13): [True: 0, False: 0]
  ------------------
 4429|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_DH_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4430|      0|            return 0;
 4431|      0|        }
 4432|      0|        if (!SSL_CTX_set0_tmp_dh_pkey(ctx, pkdh)) {
  ------------------
  |  Branch (4432:13): [True: 0, False: 0]
  ------------------
 4433|      0|            EVP_PKEY_free(pkdh);
 4434|      0|            return 0;
 4435|      0|        }
 4436|      0|        return 1;
 4437|      0|    }
 4438|      0|    case SSL_CTRL_SET_TMP_DH_CB: {
  ------------------
  |  | 1302|      0|#define SSL_CTRL_SET_TMP_DH_CB 6
  ------------------
  |  Branch (4438:5): [True: 0, False: 7.36k]
  ------------------
 4439|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4440|      0|        return 0;
 4441|      0|    }
 4442|      0|#endif
 4443|      0|    case SSL_CTRL_SET_DH_AUTO:
  ------------------
  |  | 1399|      0|#define SSL_CTRL_SET_DH_AUTO 118
  ------------------
  |  Branch (4443:5): [True: 0, False: 7.36k]
  ------------------
 4444|      0|        ctx->cert->dh_tmp_auto = larg;
 4445|      0|        return 1;
 4446|      0|#if !defined(OPENSSL_NO_DEPRECATED_3_0)
 4447|      0|    case SSL_CTRL_SET_TMP_ECDH: {
  ------------------
  |  | 1301|      0|#define SSL_CTRL_SET_TMP_ECDH 4
  ------------------
  |  Branch (4447:5): [True: 0, False: 7.36k]
  ------------------
 4448|      0|        if (parg == NULL) {
  ------------------
  |  Branch (4448:13): [True: 0, False: 0]
  ------------------
 4449|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4450|      0|            return 0;
 4451|      0|        }
 4452|      0|        return ssl_set_tmp_ecdh_groups(&ctx->ext.supportedgroups,
 4453|      0|            &ctx->ext.supportedgroups_len,
 4454|      0|            &ctx->ext.keyshares,
 4455|      0|            &ctx->ext.keyshares_len,
 4456|      0|            &ctx->ext.tuples,
 4457|      0|            &ctx->ext.tuples_len,
 4458|      0|            parg);
 4459|      0|    }
 4460|      0|#endif /* !OPENSSL_NO_DEPRECATED_3_0 */
 4461|      0|    case SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG:
  ------------------
  |  | 1340|      0|#define SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG 54
  ------------------
  |  Branch (4461:5): [True: 0, False: 7.36k]
  ------------------
 4462|      0|        ctx->ext.servername_arg = parg;
 4463|      0|        break;
 4464|      0|    case SSL_CTRL_SET_TLSEXT_TICKET_KEYS:
  ------------------
  |  | 1345|      0|#define SSL_CTRL_SET_TLSEXT_TICKET_KEYS 59
  ------------------
  |  Branch (4464:5): [True: 0, False: 7.36k]
  ------------------
 4465|      0|    case SSL_CTRL_GET_TLSEXT_TICKET_KEYS: {
  ------------------
  |  | 1344|      0|#define SSL_CTRL_GET_TLSEXT_TICKET_KEYS 58
  ------------------
  |  Branch (4465:5): [True: 0, False: 7.36k]
  ------------------
 4466|      0|        unsigned char *keys = parg;
 4467|      0|        long tick_keylen = (sizeof(ctx->ext.tick_key_name) + sizeof(ctx->ext.secure->tick_hmac_key) + sizeof(ctx->ext.secure->tick_aes_key));
 4468|      0|        if (keys == NULL)
  ------------------
  |  Branch (4468:13): [True: 0, False: 0]
  ------------------
 4469|      0|            return tick_keylen;
 4470|      0|        if (larg != tick_keylen) {
  ------------------
  |  Branch (4470:13): [True: 0, False: 0]
  ------------------
 4471|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_TICKET_KEYS_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4472|      0|            return 0;
 4473|      0|        }
 4474|      0|        if (cmd == SSL_CTRL_SET_TLSEXT_TICKET_KEYS) {
  ------------------
  |  | 1345|      0|#define SSL_CTRL_SET_TLSEXT_TICKET_KEYS 59
  ------------------
  |  Branch (4474:13): [True: 0, False: 0]
  ------------------
 4475|      0|            memcpy(ctx->ext.tick_key_name, keys,
 4476|      0|                sizeof(ctx->ext.tick_key_name));
 4477|      0|            memcpy(ctx->ext.secure->tick_hmac_key,
 4478|      0|                keys + sizeof(ctx->ext.tick_key_name),
 4479|      0|                sizeof(ctx->ext.secure->tick_hmac_key));
 4480|      0|            memcpy(ctx->ext.secure->tick_aes_key,
 4481|      0|                keys + sizeof(ctx->ext.tick_key_name) + sizeof(ctx->ext.secure->tick_hmac_key),
 4482|      0|                sizeof(ctx->ext.secure->tick_aes_key));
 4483|      0|        } else {
 4484|      0|            memcpy(keys, ctx->ext.tick_key_name,
 4485|      0|                sizeof(ctx->ext.tick_key_name));
 4486|      0|            memcpy(keys + sizeof(ctx->ext.tick_key_name),
 4487|      0|                ctx->ext.secure->tick_hmac_key,
 4488|      0|                sizeof(ctx->ext.secure->tick_hmac_key));
 4489|      0|            memcpy(keys + sizeof(ctx->ext.tick_key_name) + sizeof(ctx->ext.secure->tick_hmac_key),
 4490|      0|                ctx->ext.secure->tick_aes_key,
 4491|      0|                sizeof(ctx->ext.secure->tick_aes_key));
 4492|      0|        }
 4493|      0|        return 1;
 4494|      0|    }
 4495|       |
 4496|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE:
  ------------------
  |  | 1407|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE 127
  ------------------
  |  Branch (4496:5): [True: 0, False: 7.36k]
  ------------------
 4497|      0|        return ctx->ext.status_type;
 4498|       |
 4499|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE:
  ------------------
  |  | 1351|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE 65
  ------------------
  |  Branch (4499:5): [True: 0, False: 7.36k]
  ------------------
 4500|      0|        ctx->ext.status_type = larg;
 4501|      0|        break;
 4502|       |
 4503|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG:
  ------------------
  |  | 1350|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG 64
  ------------------
  |  Branch (4503:5): [True: 0, False: 7.36k]
  ------------------
 4504|      0|        ctx->ext.status_arg = parg;
 4505|      0|        return 1;
 4506|       |
 4507|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG:
  ------------------
  |  | 1409|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG 129
  ------------------
  |  Branch (4507:5): [True: 0, False: 7.36k]
  ------------------
 4508|      0|        *(void **)parg = ctx->ext.status_arg;
 4509|      0|        break;
 4510|       |
 4511|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB:
  ------------------
  |  | 1408|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB 128
  ------------------
  |  Branch (4511:5): [True: 0, False: 7.36k]
  ------------------
 4512|      0|        *(int (**)(SSL *, void *))parg = ctx->ext.status_cb;
 4513|      0|        break;
 4514|       |
 4515|      0|#ifndef OPENSSL_NO_SRP
 4516|      0|    case SSL_CTRL_SET_TLS_EXT_SRP_USERNAME:
  ------------------
  |  | 1365|      0|#define SSL_CTRL_SET_TLS_EXT_SRP_USERNAME 79
  ------------------
  |  Branch (4516:5): [True: 0, False: 7.36k]
  ------------------
 4517|      0|        ctx->srp_ctx.srp_Mask |= SSL_kSRP;
  ------------------
  |  |   95|      0|#define SSL_kSRP 0x00000020U
  ------------------
 4518|      0|        OPENSSL_free(ctx->srp_ctx.login);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4519|      0|        ctx->srp_ctx.login = NULL;
 4520|      0|        if (parg == NULL)
  ------------------
  |  Branch (4520:13): [True: 0, False: 0]
  ------------------
 4521|      0|            break;
 4522|      0|        if (strlen((const char *)parg) > 255 || strlen((const char *)parg) < 1) {
  ------------------
  |  Branch (4522:13): [True: 0, False: 0]
  |  Branch (4522:49): [True: 0, False: 0]
  ------------------
 4523|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_SRP_USERNAME);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4524|      0|            return 0;
 4525|      0|        }
 4526|      0|        if ((ctx->srp_ctx.login = OPENSSL_strdup((char *)parg)) == NULL) {
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (4526:13): [True: 0, False: 0]
  ------------------
 4527|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4528|      0|            return 0;
 4529|      0|        }
 4530|      0|        break;
 4531|      0|    case SSL_CTRL_SET_TLS_EXT_SRP_PASSWORD:
  ------------------
  |  | 1367|      0|#define SSL_CTRL_SET_TLS_EXT_SRP_PASSWORD 81
  ------------------
  |  Branch (4531:5): [True: 0, False: 7.36k]
  ------------------
 4532|      0|        ctx->srp_ctx.SRP_give_srp_client_pwd_callback = srp_password_from_info_cb;
 4533|      0|        if (ctx->srp_ctx.info != NULL)
  ------------------
  |  Branch (4533:13): [True: 0, False: 0]
  ------------------
 4534|      0|            OPENSSL_free(ctx->srp_ctx.info);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4535|      0|        if ((ctx->srp_ctx.info = OPENSSL_strdup((char *)parg)) == NULL) {
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (4535:13): [True: 0, False: 0]
  ------------------
 4536|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4537|      0|            return 0;
 4538|      0|        }
 4539|      0|        break;
 4540|      0|    case SSL_CTRL_SET_SRP_ARG:
  ------------------
  |  | 1364|      0|#define SSL_CTRL_SET_SRP_ARG 78
  ------------------
  |  Branch (4540:5): [True: 0, False: 7.36k]
  ------------------
 4541|      0|        ctx->srp_ctx.srp_Mask |= SSL_kSRP;
  ------------------
  |  |   95|      0|#define SSL_kSRP 0x00000020U
  ------------------
 4542|      0|        ctx->srp_ctx.SRP_cb_arg = parg;
 4543|      0|        break;
 4544|       |
 4545|      0|    case SSL_CTRL_SET_TLS_EXT_SRP_STRENGTH:
  ------------------
  |  | 1366|      0|#define SSL_CTRL_SET_TLS_EXT_SRP_STRENGTH 80
  ------------------
  |  Branch (4545:5): [True: 0, False: 7.36k]
  ------------------
 4546|      0|        ctx->srp_ctx.strength = larg;
 4547|      0|        break;
 4548|      0|#endif
 4549|       |
 4550|      0|    case SSL_CTRL_SET_GROUPS:
  ------------------
  |  | 1378|      0|#define SSL_CTRL_SET_GROUPS 91
  ------------------
  |  Branch (4550:5): [True: 0, False: 7.36k]
  ------------------
 4551|      0|        return tls1_set_groups(&ctx->ext.supportedgroups,
 4552|      0|            &ctx->ext.supportedgroups_len,
 4553|      0|            &ctx->ext.keyshares,
 4554|      0|            &ctx->ext.keyshares_len,
 4555|      0|            &ctx->ext.tuples,
 4556|      0|            &ctx->ext.tuples_len,
 4557|      0|            parg, larg);
 4558|       |
 4559|  7.36k|    case SSL_CTRL_SET_GROUPS_LIST:
  ------------------
  |  | 1379|  7.36k|#define SSL_CTRL_SET_GROUPS_LIST 92
  ------------------
  |  Branch (4559:5): [True: 7.36k, False: 0]
  ------------------
 4560|  7.36k|        return tls1_set_groups_list(ctx,
 4561|  7.36k|            &ctx->ext.supportedgroups,
 4562|  7.36k|            &ctx->ext.supportedgroups_len,
 4563|  7.36k|            &ctx->ext.keyshares,
 4564|  7.36k|            &ctx->ext.keyshares_len,
 4565|  7.36k|            &ctx->ext.tuples,
 4566|  7.36k|            &ctx->ext.tuples_len,
 4567|  7.36k|            parg);
 4568|       |
 4569|      0|    case SSL_CTRL_GET0_IMPLEMENTED_GROUPS:
  ------------------
  |  | 1419|      0|#define SSL_CTRL_GET0_IMPLEMENTED_GROUPS 139
  ------------------
  |  Branch (4569:5): [True: 0, False: 7.36k]
  ------------------
 4570|      0|        return tls1_get0_implemented_groups(ctx->min_proto_version,
 4571|      0|            ctx->max_proto_version,
 4572|      0|            ctx->group_list,
 4573|      0|            ctx->group_list_len, larg, parg);
 4574|       |
 4575|      0|    case SSL_CTRL_SET_SIGALGS:
  ------------------
  |  | 1381|      0|#define SSL_CTRL_SET_SIGALGS 97
  ------------------
  |  Branch (4575:5): [True: 0, False: 7.36k]
  ------------------
 4576|      0|        return tls1_set_sigalgs(ctx->cert, parg, larg, 0);
 4577|       |
 4578|      0|    case SSL_CTRL_SET_SIGALGS_LIST:
  ------------------
  |  | 1382|      0|#define SSL_CTRL_SET_SIGALGS_LIST 98
  ------------------
  |  Branch (4578:5): [True: 0, False: 7.36k]
  ------------------
 4579|      0|        return tls1_set_sigalgs_list(ctx, ctx->cert, parg, 0);
 4580|       |
 4581|      0|    case SSL_CTRL_SET_CLIENT_SIGALGS:
  ------------------
  |  | 1385|      0|#define SSL_CTRL_SET_CLIENT_SIGALGS 101
  ------------------
  |  Branch (4581:5): [True: 0, False: 7.36k]
  ------------------
 4582|      0|        return tls1_set_sigalgs(ctx->cert, parg, larg, 1);
 4583|       |
 4584|      0|    case SSL_CTRL_SET_CLIENT_SIGALGS_LIST:
  ------------------
  |  | 1386|      0|#define SSL_CTRL_SET_CLIENT_SIGALGS_LIST 102
  ------------------
  |  Branch (4584:5): [True: 0, False: 7.36k]
  ------------------
 4585|      0|        return tls1_set_sigalgs_list(ctx, ctx->cert, parg, 1);
 4586|       |
 4587|      0|    case SSL_CTRL_SET_CLIENT_CERT_TYPES:
  ------------------
  |  | 1388|      0|#define SSL_CTRL_SET_CLIENT_CERT_TYPES 104
  ------------------
  |  Branch (4587:5): [True: 0, False: 7.36k]
  ------------------
 4588|      0|        return ssl3_set_req_cert_type(ctx->cert, parg, larg);
 4589|       |
 4590|      0|    case SSL_CTRL_BUILD_CERT_CHAIN:
  ------------------
  |  | 1389|      0|#define SSL_CTRL_BUILD_CERT_CHAIN 105
  ------------------
  |  Branch (4590:5): [True: 0, False: 7.36k]
  ------------------
 4591|      0|        return ssl_build_cert_chain(NULL, ctx, larg);
 4592|       |
 4593|      0|    case SSL_CTRL_SET_VERIFY_CERT_STORE:
  ------------------
  |  | 1390|      0|#define SSL_CTRL_SET_VERIFY_CERT_STORE 106
  ------------------
  |  Branch (4593:5): [True: 0, False: 7.36k]
  ------------------
 4594|      0|        return ssl_cert_set_cert_store(ctx->cert, parg, 0, larg);
 4595|       |
 4596|      0|    case SSL_CTRL_SET_CHAIN_CERT_STORE:
  ------------------
  |  | 1391|      0|#define SSL_CTRL_SET_CHAIN_CERT_STORE 107
  ------------------
  |  Branch (4596:5): [True: 0, False: 7.36k]
  ------------------
 4597|      0|        return ssl_cert_set_cert_store(ctx->cert, parg, 1, larg);
 4598|       |
 4599|      0|    case SSL_CTRL_GET_VERIFY_CERT_STORE:
  ------------------
  |  | 1417|      0|#define SSL_CTRL_GET_VERIFY_CERT_STORE 137
  ------------------
  |  Branch (4599:5): [True: 0, False: 7.36k]
  ------------------
 4600|      0|        return ssl_cert_get_cert_store(ctx->cert, parg, 0);
 4601|       |
 4602|      0|    case SSL_CTRL_GET_CHAIN_CERT_STORE:
  ------------------
  |  | 1418|      0|#define SSL_CTRL_GET_CHAIN_CERT_STORE 138
  ------------------
  |  Branch (4602:5): [True: 0, False: 7.36k]
  ------------------
 4603|      0|        return ssl_cert_get_cert_store(ctx->cert, parg, 1);
 4604|       |
 4605|       |        /* A Thawte special :-) */
 4606|      0|    case SSL_CTRL_EXTRA_CHAIN_CERT:
  ------------------
  |  | 1310|      0|#define SSL_CTRL_EXTRA_CHAIN_CERT 14
  ------------------
  |  Branch (4606:5): [True: 0, False: 7.36k]
  ------------------
 4607|      0|        if (ctx->extra_certs == NULL) {
  ------------------
  |  Branch (4607:13): [True: 0, False: 0]
  ------------------
 4608|      0|            if ((ctx->extra_certs = sk_X509_new_null()) == NULL) {
  ------------------
  |  |   85|      0|#define sk_X509_new_null() ((STACK_OF(X509) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_X509_freefunc_thunk))
  ------------------
  |  Branch (4608:17): [True: 0, False: 0]
  ------------------
 4609|      0|                ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4610|      0|                return 0;
 4611|      0|            }
 4612|      0|        }
 4613|      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 (4613:13): [True: 0, False: 0]
  ------------------
 4614|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4615|      0|            return 0;
 4616|      0|        }
 4617|      0|        break;
 4618|       |
 4619|      0|    case SSL_CTRL_GET_EXTRA_CHAIN_CERTS:
  ------------------
  |  | 1373|      0|#define SSL_CTRL_GET_EXTRA_CHAIN_CERTS 82
  ------------------
  |  Branch (4619:5): [True: 0, False: 7.36k]
  ------------------
 4620|      0|        if (ctx->extra_certs == NULL && larg == 0)
  ------------------
  |  Branch (4620:13): [True: 0, False: 0]
  |  Branch (4620:41): [True: 0, False: 0]
  ------------------
 4621|      0|            *(STACK_OF(X509) **)parg = ctx->cert->key->chain;
 4622|      0|        else
 4623|      0|            *(STACK_OF(X509) **)parg = ctx->extra_certs;
 4624|      0|        break;
 4625|       |
 4626|      0|    case SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS:
  ------------------
  |  | 1374|      0|#define SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS 83
  ------------------
  |  Branch (4626:5): [True: 0, False: 7.36k]
  ------------------
 4627|      0|        OSSL_STACK_OF_X509_free(ctx->extra_certs);
 4628|      0|        ctx->extra_certs = NULL;
 4629|      0|        break;
 4630|       |
 4631|      0|    case SSL_CTRL_CHAIN:
  ------------------
  |  | 1375|      0|#define SSL_CTRL_CHAIN 88
  ------------------
  |  Branch (4631:5): [True: 0, False: 7.36k]
  ------------------
 4632|      0|        if (larg)
  ------------------
  |  Branch (4632:13): [True: 0, False: 0]
  ------------------
 4633|      0|            return ssl_cert_set1_chain(NULL, ctx, (STACK_OF(X509) *)parg);
 4634|      0|        else
 4635|      0|            return ssl_cert_set0_chain(NULL, ctx, (STACK_OF(X509) *)parg);
 4636|       |
 4637|      0|    case SSL_CTRL_CHAIN_CERT:
  ------------------
  |  | 1376|      0|#define SSL_CTRL_CHAIN_CERT 89
  ------------------
  |  Branch (4637:5): [True: 0, False: 7.36k]
  ------------------
 4638|      0|        if (larg)
  ------------------
  |  Branch (4638:13): [True: 0, False: 0]
  ------------------
 4639|      0|            return ssl_cert_add1_chain_cert(NULL, ctx, (X509 *)parg);
 4640|      0|        else
 4641|      0|            return ssl_cert_add0_chain_cert(NULL, ctx, (X509 *)parg);
 4642|       |
 4643|      0|    case SSL_CTRL_GET_CHAIN_CERTS:
  ------------------
  |  | 1396|      0|#define SSL_CTRL_GET_CHAIN_CERTS 115
  ------------------
  |  Branch (4643:5): [True: 0, False: 7.36k]
  ------------------
 4644|      0|        *(STACK_OF(X509) **)parg = ctx->cert->key->chain;
 4645|      0|        break;
 4646|       |
 4647|      0|    case SSL_CTRL_SELECT_CURRENT_CERT:
  ------------------
  |  | 1397|      0|#define SSL_CTRL_SELECT_CURRENT_CERT 116
  ------------------
  |  Branch (4647:5): [True: 0, False: 7.36k]
  ------------------
 4648|      0|        return ssl_cert_select_current(ctx->cert, (X509 *)parg);
 4649|       |
 4650|      0|    case SSL_CTRL_SET_CURRENT_CERT:
  ------------------
  |  | 1398|      0|#define SSL_CTRL_SET_CURRENT_CERT 117
  ------------------
  |  Branch (4650:5): [True: 0, False: 7.36k]
  ------------------
 4651|      0|        return ssl_cert_set_current(ctx->cert, larg);
 4652|       |
 4653|      0|    default:
  ------------------
  |  Branch (4653:5): [True: 0, False: 7.36k]
  ------------------
 4654|      0|        return 0;
 4655|  7.36k|    }
 4656|      0|    return 1;
 4657|  7.36k|}
ssl3_get_cipher_by_id:
 4714|   119k|{
 4715|   119k|    SSL_CIPHER c;
 4716|   119k|    const SSL_CIPHER *cp;
 4717|       |
 4718|   119k|    c.id = id;
 4719|   119k|    cp = OBJ_bsearch_ssl_cipher_id(&c, tls13_ciphers, TLS13_NUM_CIPHERS);
  ------------------
  |  |   27|   119k|#define TLS13_NUM_CIPHERS OSSL_NELEM(tls13_ciphers)
  |  |  ------------------
  |  |  |  |   14|   119k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 4720|   119k|    if (cp != NULL)
  ------------------
  |  Branch (4720:9): [True: 21.6k, False: 97.9k]
  ------------------
 4721|  21.6k|        return cp;
 4722|  97.9k|    cp = OBJ_bsearch_ssl_cipher_id(&c, ssl3_ciphers, SSL3_NUM_CIPHERS);
  ------------------
  |  |   28|  97.9k|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|  97.9k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 4723|  97.9k|    if (cp != NULL)
  ------------------
  |  Branch (4723:9): [True: 97.9k, False: 0]
  ------------------
 4724|  97.9k|        return cp;
 4725|      0|    return OBJ_bsearch_ssl_cipher_id(&c, ssl3_scsvs, SSL3_NUM_SCSVS);
  ------------------
  |  |   29|      0|#define SSL3_NUM_SCSVS OSSL_NELEM(ssl3_scsvs)
  |  |  ------------------
  |  |  |  |   14|      0|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 4726|  97.9k|}
ssl3_get_tls13_cipher_by_std_name:
 4729|  22.0k|{
 4730|  22.0k|    SSL_CIPHER *end = &tls13_ciphers[TLS13_NUM_CIPHERS];
  ------------------
  |  |   27|  22.0k|#define TLS13_NUM_CIPHERS OSSL_NELEM(tls13_ciphers)
  |  |  ------------------
  |  |  |  |   14|  22.0k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 4731|       |
 4732|       |    /* this is not efficient, necessary to optimize this? */
 4733|  88.3k|    for (SSL_CIPHER *c = tls13_ciphers; c < end; ++c) {
  ------------------
  |  Branch (4733:41): [True: 88.3k, False: 0]
  ------------------
 4734|  88.3k|        if (c->stdname == NULL)
  ------------------
  |  Branch (4734:13): [True: 0, False: 88.3k]
  ------------------
 4735|      0|            continue;
 4736|  88.3k|        if (OPENSSL_strcasecmp(stdname, c->stdname) == 0)
  ------------------
  |  Branch (4736:13): [True: 22.0k, False: 66.2k]
  ------------------
 4737|  22.0k|            return c;
 4738|  88.3k|    }
 4739|      0|    return NULL;
 4740|  22.0k|}
ssl3_get_cipher_by_char:
 4766|   112k|{
 4767|   112k|    return ssl3_get_cipher_by_id(SSL3_CK_CIPHERSUITE_FLAG
  ------------------
  |  |  262|   112k|#define SSL3_CK_CIPHERSUITE_FLAG 0x03000000
  ------------------
 4768|   112k|        | ((uint32_t)p[0] << 8L)
 4769|   112k|        | (uint32_t)p[1]);
 4770|   112k|}
ssl3_put_cipher_by_char:
 4773|   112k|{
 4774|   112k|    if ((c->id & 0xff000000) != SSL3_CK_CIPHERSUITE_FLAG) {
  ------------------
  |  |  262|   112k|#define SSL3_CK_CIPHERSUITE_FLAG 0x03000000
  ------------------
  |  Branch (4774:9): [True: 0, False: 112k]
  ------------------
 4775|      0|        *len = 0;
 4776|      0|        return 1;
 4777|      0|    }
 4778|       |
 4779|   112k|    if (!WPACKET_put_bytes_u16(pkt, c->id & 0xffff))
  ------------------
  |  |  911|   112k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (4779:9): [True: 0, False: 112k]
  ------------------
 4780|      0|        return 0;
 4781|       |
 4782|   112k|    *len = 2;
 4783|   112k|    return 1;
 4784|   112k|}
ssl3_choose_cipher:
 4796|  3.62k|{
 4797|  3.62k|    const SSL_CIPHER *c, *ret = NULL;
 4798|  3.62k|    STACK_OF(SSL_CIPHER) *prio, *allow;
  ------------------
  |  |   33|  3.62k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 4799|  3.62k|    int i, ii, ok, prefer_sha256 = 0;
 4800|  3.62k|    unsigned long alg_k = 0, alg_a = 0, mask_k = 0, mask_a = 0;
 4801|  3.62k|    STACK_OF(SSL_CIPHER) *prio_chacha = NULL;
  ------------------
  |  |   33|  3.62k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 4802|       |
 4803|       |    /* Let's see which ciphers we can support */
 4804|       |
 4805|       |    /*
 4806|       |     * Do not set the compare functions, because this may lead to a
 4807|       |     * reordering by "id". We want to keep the original ordering. We may pay
 4808|       |     * a price in performance during sk_SSL_CIPHER_find(), but would have to
 4809|       |     * pay with the price of sk_SSL_CIPHER_dup().
 4810|       |     */
 4811|       |
 4812|  3.62k|    OSSL_TRACE_BEGIN(TLS_CIPHER)
  ------------------
  |  |  219|  3.62k|    do {                           \
  |  |  220|  3.62k|        BIO *trc_out = NULL;       \
  |  |  221|  3.62k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
 4813|      0|    {
 4814|      0|        BIO_printf(trc_out, "Server has %d from %p:\n",
 4815|      0|            sk_SSL_CIPHER_num(srvr), (void *)srvr);
  ------------------
  |  | 1028|      0|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
 4816|      0|        for (i = 0; i < sk_SSL_CIPHER_num(srvr); ++i) {
  ------------------
  |  | 1028|      0|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (4816:21): [True: 0, False: 0]
  ------------------
 4817|      0|            c = sk_SSL_CIPHER_value(srvr, i);
  ------------------
  |  | 1029|      0|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 4818|      0|            BIO_printf(trc_out, "%p:%s\n", (void *)c, c->name);
 4819|      0|        }
 4820|      0|        BIO_printf(trc_out, "Client sent %d from %p:\n",
 4821|      0|            sk_SSL_CIPHER_num(clnt), (void *)clnt);
  ------------------
  |  | 1028|      0|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
 4822|      0|        for (i = 0; i < sk_SSL_CIPHER_num(clnt); ++i) {
  ------------------
  |  | 1028|      0|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (4822:21): [True: 0, False: 0]
  ------------------
 4823|      0|            c = sk_SSL_CIPHER_value(clnt, i);
  ------------------
  |  | 1029|      0|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 4824|      0|            BIO_printf(trc_out, "%p:%s\n", (void *)c, c->name);
 4825|      0|        }
 4826|      0|    }
 4827|  3.62k|    OSSL_TRACE_END(TLS_CIPHER);
  ------------------
  |  |  224|  3.62k|    }                            \
  |  |  225|  3.62k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
 4828|       |
 4829|       |    /* SUITE-B takes precedence over server preference and ChaCha priortiy */
 4830|  3.62k|    if (tls1_suiteb(s)) {
  ------------------
  |  | 2035|  3.62k|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  584|  3.62k|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  |  |  |  Branch (2035:24): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
 4831|      0|        prio = srvr;
 4832|      0|        allow = clnt;
 4833|  3.62k|    } else if (s->options & SSL_OP_SERVER_PREFERENCE) {
  ------------------
  |  |  414|  3.62k|#define SSL_OP_SERVER_PREFERENCE SSL_OP_BIT(22)
  |  |  ------------------
  |  |  |  |  351|  3.62k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (4833:16): [True: 0, False: 3.62k]
  ------------------
 4834|      0|        prio = srvr;
 4835|      0|        allow = clnt;
 4836|       |
 4837|       |        /* If ChaCha20 is at the top of the client preference list,
 4838|       |           and there are ChaCha20 ciphers in the server list, then
 4839|       |           temporarily prioritize all ChaCha20 ciphers in the servers list. */
 4840|      0|        if (s->options & SSL_OP_PRIORITIZE_CHACHA && sk_SSL_CIPHER_num(clnt) > 0) {
  ------------------
  |  |  409|      0|#define SSL_OP_PRIORITIZE_CHACHA SSL_OP_BIT(21)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
                      if (s->options & SSL_OP_PRIORITIZE_CHACHA && sk_SSL_CIPHER_num(clnt) > 0) {
  ------------------
  |  | 1028|      0|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (4840:13): [True: 0, False: 0]
  |  Branch (4840:54): [True: 0, False: 0]
  ------------------
 4841|      0|            c = sk_SSL_CIPHER_value(clnt, 0);
  ------------------
  |  | 1029|      0|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 4842|      0|            if (c->algorithm_enc == SSL_CHACHA20POLY1305) {
  ------------------
  |  |  153|      0|#define SSL_CHACHA20POLY1305 0x00080000U
  ------------------
  |  Branch (4842:17): [True: 0, False: 0]
  ------------------
 4843|       |                /* ChaCha20 is client preferred, check server... */
 4844|      0|                int num = sk_SSL_CIPHER_num(srvr);
  ------------------
  |  | 1028|      0|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
 4845|      0|                int found = 0;
 4846|      0|                for (i = 0; i < num; i++) {
  ------------------
  |  Branch (4846:29): [True: 0, False: 0]
  ------------------
 4847|      0|                    c = sk_SSL_CIPHER_value(srvr, i);
  ------------------
  |  | 1029|      0|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 4848|      0|                    if (c->algorithm_enc == SSL_CHACHA20POLY1305) {
  ------------------
  |  |  153|      0|#define SSL_CHACHA20POLY1305 0x00080000U
  ------------------
  |  Branch (4848:25): [True: 0, False: 0]
  ------------------
 4849|      0|                        found = 1;
 4850|      0|                        break;
 4851|      0|                    }
 4852|      0|                }
 4853|      0|                if (found) {
  ------------------
  |  Branch (4853:21): [True: 0, False: 0]
  ------------------
 4854|      0|                    prio_chacha = sk_SSL_CIPHER_new_reserve(NULL, num);
  ------------------
  |  | 1032|      0|#define sk_SSL_CIPHER_new_reserve(cmp, n) ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_set_cmp_thunks(OPENSSL_sk_new_reserve(ossl_check_SSL_CIPHER_compfunc_type(cmp), (n)), sk_SSL_CIPHER_cmpfunc_thunk))
  ------------------
 4855|       |                    /* if reserve fails, then there's likely a memory issue */
 4856|      0|                    if (prio_chacha != NULL) {
  ------------------
  |  Branch (4856:25): [True: 0, False: 0]
  ------------------
 4857|       |                        /* Put all ChaCha20 at the top, starting with the one we just found */
 4858|      0|                        sk_SSL_CIPHER_push(prio_chacha, c);
  ------------------
  |  | 1038|      0|#define sk_SSL_CIPHER_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
 4859|      0|                        for (i++; i < num; i++) {
  ------------------
  |  Branch (4859:35): [True: 0, False: 0]
  ------------------
 4860|      0|                            c = sk_SSL_CIPHER_value(srvr, i);
  ------------------
  |  | 1029|      0|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 4861|      0|                            if (c->algorithm_enc == SSL_CHACHA20POLY1305)
  ------------------
  |  |  153|      0|#define SSL_CHACHA20POLY1305 0x00080000U
  ------------------
  |  Branch (4861:33): [True: 0, False: 0]
  ------------------
 4862|      0|                                sk_SSL_CIPHER_push(prio_chacha, c);
  ------------------
  |  | 1038|      0|#define sk_SSL_CIPHER_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
 4863|      0|                        }
 4864|       |                        /* Pull in the rest */
 4865|      0|                        for (i = 0; i < num; i++) {
  ------------------
  |  Branch (4865:37): [True: 0, False: 0]
  ------------------
 4866|      0|                            c = sk_SSL_CIPHER_value(srvr, i);
  ------------------
  |  | 1029|      0|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 4867|      0|                            if (c->algorithm_enc != SSL_CHACHA20POLY1305)
  ------------------
  |  |  153|      0|#define SSL_CHACHA20POLY1305 0x00080000U
  ------------------
  |  Branch (4867:33): [True: 0, False: 0]
  ------------------
 4868|      0|                                sk_SSL_CIPHER_push(prio_chacha, c);
  ------------------
  |  | 1038|      0|#define sk_SSL_CIPHER_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
 4869|      0|                        }
 4870|      0|                        prio = prio_chacha;
 4871|      0|                    }
 4872|      0|                }
 4873|      0|            }
 4874|      0|        }
 4875|  3.62k|    } else {
 4876|  3.62k|        prio = clnt;
 4877|  3.62k|        allow = srvr;
 4878|  3.62k|    }
 4879|       |
 4880|  3.62k|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 4881|  3.62k|#ifndef OPENSSL_NO_PSK
 4882|  3.62k|        size_t j;
 4883|       |
 4884|       |        /*
 4885|       |         * If we allow "old" style PSK callbacks, and we have no certificate (so
 4886|       |         * we're not going to succeed without a PSK anyway), and we're in
 4887|       |         * TLSv1.3 then the default hash for a PSK is SHA-256 (as per the
 4888|       |         * TLSv1.3 spec). Therefore we should prioritise ciphersuites using
 4889|       |         * that.
 4890|       |         */
 4891|  3.62k|        if (s->psk_server_callback != NULL) {
  ------------------
  |  Branch (4891:13): [True: 0, False: 3.62k]
  ------------------
 4892|      0|            for (j = 0; j < s->ssl_pkey_num && !ssl_has_cert(s, (int)j); j++)
  ------------------
  |  Branch (4892:25): [True: 0, False: 0]
  |  Branch (4892:48): [True: 0, False: 0]
  ------------------
 4893|      0|                ;
 4894|      0|            if (j == s->ssl_pkey_num) {
  ------------------
  |  Branch (4894:17): [True: 0, False: 0]
  ------------------
 4895|       |                /* There are no certificates */
 4896|      0|                prefer_sha256 = 1;
 4897|      0|            }
 4898|      0|        }
 4899|  3.62k|#endif
 4900|  3.62k|    } else {
 4901|      0|        tls1_set_cert_validity(s);
 4902|      0|        ssl_set_masks(s);
 4903|      0|    }
 4904|       |
 4905|  3.62k|    for (i = 0; i < sk_SSL_CIPHER_num(prio); i++) {
  ------------------
  |  | 1028|  3.62k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (4905:17): [True: 3.62k, False: 0]
  ------------------
 4906|  3.62k|        int minversion, maxversion;
 4907|       |
 4908|  3.62k|        c = sk_SSL_CIPHER_value(prio, i);
  ------------------
  |  | 1029|  3.62k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 4909|  3.62k|        minversion = SSL_CONNECTION_IS_DTLS(s) ? c->min_dtls : c->min_tls;
  ------------------
  |  |  266|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
 4910|  3.62k|        maxversion = SSL_CONNECTION_IS_DTLS(s) ? c->max_dtls : c->max_tls;
  ------------------
  |  |  266|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
 4911|       |
 4912|       |        /* Skip ciphers not supported by the protocol version */
 4913|  3.62k|        if (ssl_version_cmp(s, s->version, minversion) < 0
  ------------------
  |  Branch (4913:13): [True: 0, False: 3.62k]
  ------------------
 4914|  3.62k|            || ssl_version_cmp(s, s->version, maxversion) > 0)
  ------------------
  |  Branch (4914:16): [True: 0, False: 3.62k]
  ------------------
 4915|      0|            continue;
 4916|       |
 4917|       |        /*
 4918|       |         * Since TLS 1.3 ciphersuites can be used with any auth or
 4919|       |         * key exchange scheme skip tests.
 4920|       |         */
 4921|  3.62k|        if (!SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 4922|      0|            mask_k = s->s3.tmp.mask_k;
 4923|      0|            mask_a = s->s3.tmp.mask_a;
 4924|      0|#ifndef OPENSSL_NO_SRP
 4925|      0|            if (s->srp_ctx.srp_Mask & SSL_kSRP) {
  ------------------
  |  |   95|      0|#define SSL_kSRP 0x00000020U
  ------------------
  |  Branch (4925:17): [True: 0, False: 0]
  ------------------
 4926|      0|                mask_k |= SSL_kSRP;
  ------------------
  |  |   95|      0|#define SSL_kSRP 0x00000020U
  ------------------
 4927|      0|                mask_a |= SSL_aSRP;
  ------------------
  |  |  124|      0|#define SSL_aSRP 0x00000040U
  ------------------
 4928|      0|            }
 4929|      0|#endif
 4930|       |
 4931|      0|            alg_k = c->algorithm_mkey;
 4932|      0|            alg_a = c->algorithm_auth;
 4933|       |
 4934|      0|#ifndef OPENSSL_NO_PSK
 4935|       |            /* with PSK there must be server callback set */
 4936|      0|            if ((alg_k & SSL_PSK) && s->psk_server_callback == NULL)
  ------------------
  |  |  105|      0|#define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   91|      0|#define SSL_kPSK 0x00000008U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   97|      0|#define SSL_kRSAPSK 0x00000040U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   98|      0|#define SSL_kECDHEPSK 0x00000080U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   99|      0|#define SSL_kDHEPSK 0x00000100U
  |  |  ------------------
  ------------------
  |  Branch (4936:17): [True: 0, False: 0]
  |  Branch (4936:38): [True: 0, False: 0]
  ------------------
 4937|      0|                continue;
 4938|      0|#endif /* OPENSSL_NO_PSK */
 4939|       |
 4940|      0|            ok = (alg_k & mask_k) && (alg_a & mask_a);
  ------------------
  |  Branch (4940:18): [True: 0, False: 0]
  |  Branch (4940:38): [True: 0, False: 0]
  ------------------
 4941|      0|            OSSL_TRACE7(TLS_CIPHER,
  ------------------
  |  |  303|      0|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5, arg6, arg7))
  |  |  ------------------
  |  |  |  |  283|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
 4942|      0|                "%d:[%08lX:%08lX:%08lX:%08lX]%p:%s\n",
 4943|      0|                ok, alg_k, alg_a, mask_k, mask_a, (void *)c, c->name);
 4944|       |
 4945|       |            /*
 4946|       |             * if we are considering a DHE cipher suite that uses an ephemeral
 4947|       |             * FFDHE key check it
 4948|       |             */
 4949|      0|            if (alg_k & (SSL_kDHE | SSL_kDHEPSK))
  ------------------
  |  |   87|      0|#define SSL_kDHE 0x00000002U
  ------------------
                          if (alg_k & (SSL_kDHE | SSL_kDHEPSK))
  ------------------
  |  |   99|      0|#define SSL_kDHEPSK 0x00000100U
  ------------------
  |  Branch (4949:17): [True: 0, False: 0]
  ------------------
 4950|      0|                ok = ok && tls1_check_ffdhe_tmp_key(s, c->id);
  ------------------
  |  Branch (4950:22): [True: 0, False: 0]
  |  Branch (4950:28): [True: 0, False: 0]
  ------------------
 4951|       |
 4952|       |            /*
 4953|       |             * if we are considering an ECC cipher suite that uses an ephemeral
 4954|       |             * EC key check it
 4955|       |             */
 4956|      0|            if (alg_k & (SSL_kECDHE | SSL_kECDHEPSK))
  ------------------
  |  |   89|      0|#define SSL_kECDHE 0x00000004U
  ------------------
                          if (alg_k & (SSL_kECDHE | SSL_kECDHEPSK))
  ------------------
  |  |   98|      0|#define SSL_kECDHEPSK 0x00000080U
  ------------------
  |  Branch (4956:17): [True: 0, False: 0]
  ------------------
 4957|      0|                ok = ok && tls1_check_ec_tmp_key(s, c->id);
  ------------------
  |  Branch (4957:22): [True: 0, False: 0]
  |  Branch (4957:28): [True: 0, False: 0]
  ------------------
 4958|       |
 4959|      0|            if (!ok)
  ------------------
  |  Branch (4959:17): [True: 0, False: 0]
  ------------------
 4960|      0|                continue;
 4961|      0|        }
 4962|  3.62k|        ii = sk_SSL_CIPHER_find(allow, c);
  ------------------
  |  | 1045|  3.62k|#define sk_SSL_CIPHER_find(sk, ptr) OPENSSL_sk_find(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
 4963|  3.62k|        if (ii >= 0) {
  ------------------
  |  Branch (4963:13): [True: 3.62k, False: 0]
  ------------------
 4964|       |            /* Check security callback permits this cipher */
 4965|  3.62k|            if (!ssl_security(s, SSL_SECOP_CIPHER_SHARED,
  ------------------
  |  | 2756|  3.62k|#define SSL_SECOP_CIPHER_SHARED (2 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2730|  3.62k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (4965:17): [True: 0, False: 3.62k]
  ------------------
 4966|  3.62k|                    c->strength_bits, 0, (void *)c))
 4967|      0|                continue;
 4968|       |
 4969|  3.62k|            if ((alg_k & SSL_kECDHE) && (alg_a & SSL_aECDSA)
  ------------------
  |  |   89|  3.62k|#define SSL_kECDHE 0x00000004U
  ------------------
                          if ((alg_k & SSL_kECDHE) && (alg_a & SSL_aECDSA)
  ------------------
  |  |  118|      0|#define SSL_aECDSA 0x00000008U
  ------------------
  |  Branch (4969:17): [True: 0, False: 3.62k]
  |  Branch (4969:41): [True: 0, False: 0]
  ------------------
 4970|      0|                && s->s3.is_probably_safari) {
  ------------------
  |  Branch (4970:20): [True: 0, False: 0]
  ------------------
 4971|      0|                if (!ret)
  ------------------
  |  Branch (4971:21): [True: 0, False: 0]
  ------------------
 4972|      0|                    ret = sk_SSL_CIPHER_value(allow, ii);
  ------------------
  |  | 1029|      0|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 4973|      0|                continue;
 4974|      0|            }
 4975|       |
 4976|  3.62k|            if (prefer_sha256) {
  ------------------
  |  Branch (4976:17): [True: 0, False: 3.62k]
  ------------------
 4977|      0|                const SSL_CIPHER *tmp = sk_SSL_CIPHER_value(allow, ii);
  ------------------
  |  | 1029|      0|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 4978|      0|                const EVP_MD *md = ssl_md(SSL_CONNECTION_GET_CTX(s),
  ------------------
  |  |   26|      0|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 4979|      0|                    tmp->algorithm2);
 4980|       |
 4981|      0|                if (md != NULL
  ------------------
  |  Branch (4981:21): [True: 0, False: 0]
  ------------------
 4982|      0|                    && EVP_MD_is_a(md, OSSL_DIGEST_NAME_SHA2_256)) {
  ------------------
  |  |   39|      0|#define OSSL_DIGEST_NAME_SHA2_256 "SHA2-256"
  ------------------
  |  Branch (4982:24): [True: 0, False: 0]
  ------------------
 4983|      0|                    ret = tmp;
 4984|      0|                    break;
 4985|      0|                }
 4986|      0|                if (ret == NULL)
  ------------------
  |  Branch (4986:21): [True: 0, False: 0]
  ------------------
 4987|      0|                    ret = tmp;
 4988|      0|                continue;
 4989|      0|            }
 4990|  3.62k|            ret = sk_SSL_CIPHER_value(allow, ii);
  ------------------
  |  | 1029|  3.62k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 4991|  3.62k|            break;
 4992|  3.62k|        }
 4993|  3.62k|    }
 4994|       |
 4995|  3.62k|    sk_SSL_CIPHER_free(prio_chacha);
  ------------------
  |  | 1034|  3.62k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 4996|       |
 4997|  3.62k|    return ret;
 4998|  3.62k|}
ssl3_shutdown:
 5064|  6.48k|{
 5065|  6.48k|    int ret;
 5066|  6.48k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL_ONLY(s);
  ------------------
  |  |   23|  6.48k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  6.48k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 6.48k]
  |  |  |  |  ------------------
  |  |  |  |   18|  6.48k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  6.48k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 6.48k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  6.48k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  6.48k|                             : NULL))
  |  |  ------------------
  ------------------
 5067|       |
 5068|  6.48k|    if (sc == NULL)
  ------------------
  |  Branch (5068:9): [True: 0, False: 6.48k]
  ------------------
 5069|      0|        return 0;
 5070|       |
 5071|       |    /*
 5072|       |     * Don't do anything much if we have not done the handshake or we don't
 5073|       |     * want to send messages :-)
 5074|       |     */
 5075|  6.48k|    if (sc->quiet_shutdown || SSL_in_before(s)) {
  ------------------
  |  Branch (5075:9): [True: 0, False: 6.48k]
  |  Branch (5075:31): [True: 0, False: 6.48k]
  ------------------
 5076|      0|        sc->shutdown = (SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN);
  ------------------
  |  |  216|      0|#define SSL_SENT_SHUTDOWN 1
  ------------------
                      sc->shutdown = (SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN);
  ------------------
  |  |  217|      0|#define SSL_RECEIVED_SHUTDOWN 2
  ------------------
 5077|      0|        return 1;
 5078|      0|    }
 5079|       |
 5080|  6.48k|    if (!(sc->shutdown & SSL_SENT_SHUTDOWN)) {
  ------------------
  |  |  216|  6.48k|#define SSL_SENT_SHUTDOWN 1
  ------------------
  |  Branch (5080:9): [True: 6.48k, False: 0]
  ------------------
 5081|  6.48k|        sc->shutdown |= SSL_SENT_SHUTDOWN;
  ------------------
  |  |  216|  6.48k|#define SSL_SENT_SHUTDOWN 1
  ------------------
 5082|  6.48k|        ssl3_send_alert(sc, SSL3_AL_WARNING, SSL_AD_CLOSE_NOTIFY);
  ------------------
  |  |  249|  6.48k|#define SSL3_AL_WARNING 1
  ------------------
                      ssl3_send_alert(sc, SSL3_AL_WARNING, SSL_AD_CLOSE_NOTIFY);
  ------------------
  |  | 1232|  6.48k|#define SSL_AD_CLOSE_NOTIFY SSL3_AD_CLOSE_NOTIFY
  |  |  ------------------
  |  |  |  |  252|  6.48k|#define SSL3_AD_CLOSE_NOTIFY 0
  |  |  ------------------
  ------------------
 5083|       |        /*
 5084|       |         * our shutdown alert has been sent now, and if it still needs to be
 5085|       |         * written, s->s3.alert_dispatch will be > 0
 5086|       |         */
 5087|  6.48k|        if (sc->s3.alert_dispatch > 0)
  ------------------
  |  Branch (5087:13): [True: 0, False: 6.48k]
  ------------------
 5088|      0|            return -1; /* return WANT_WRITE */
 5089|  6.48k|    } else if (sc->s3.alert_dispatch > 0) {
  ------------------
  |  Branch (5089:16): [True: 0, False: 0]
  ------------------
 5090|       |        /* resend it if not sent */
 5091|      0|        ret = s->method->ssl_dispatch_alert(s);
 5092|      0|        if (ret == -1) {
  ------------------
  |  Branch (5092:13): [True: 0, False: 0]
  ------------------
 5093|       |            /*
 5094|       |             * we only get to return -1 here the 2nd/Nth invocation, we must
 5095|       |             * have already signalled return 0 upon a previous invocation,
 5096|       |             * return WANT_WRITE
 5097|       |             */
 5098|      0|            return ret;
 5099|      0|        }
 5100|      0|    } else if (!(sc->shutdown & SSL_RECEIVED_SHUTDOWN)) {
  ------------------
  |  |  217|      0|#define SSL_RECEIVED_SHUTDOWN 2
  ------------------
  |  Branch (5100:16): [True: 0, False: 0]
  ------------------
 5101|      0|        size_t readbytes;
 5102|       |        /*
 5103|       |         * If we are waiting for a close from our peer, we are closed
 5104|       |         */
 5105|      0|        s->method->ssl_read_bytes(s, 0, NULL, NULL, 0, 0, &readbytes);
 5106|      0|        if (!(sc->shutdown & SSL_RECEIVED_SHUTDOWN)) {
  ------------------
  |  |  217|      0|#define SSL_RECEIVED_SHUTDOWN 2
  ------------------
  |  Branch (5106:13): [True: 0, False: 0]
  ------------------
 5107|      0|            return -1; /* return WANT_READ */
 5108|      0|        }
 5109|      0|    }
 5110|       |
 5111|  6.48k|    if ((sc->shutdown == (SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN))
  ------------------
  |  |  216|  6.48k|#define SSL_SENT_SHUTDOWN 1
  ------------------
                  if ((sc->shutdown == (SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN))
  ------------------
  |  |  217|  6.48k|#define SSL_RECEIVED_SHUTDOWN 2
  ------------------
  |  Branch (5111:9): [True: 3.01k, False: 3.47k]
  ------------------
 5112|  3.01k|        && sc->s3.alert_dispatch == SSL_ALERT_DISPATCH_NONE)
  ------------------
  |  |  320|  3.01k|#define SSL_ALERT_DISPATCH_NONE 0
  ------------------
  |  Branch (5112:12): [True: 3.01k, False: 0]
  ------------------
 5113|  3.01k|        return 1;
 5114|  3.47k|    else
 5115|  3.47k|        return 0;
 5116|  6.48k|}
ssl3_write:
 5119|  4.32k|{
 5120|  4.32k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL_ONLY(s);
  ------------------
  |  |   23|  4.32k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  4.32k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 4.32k]
  |  |  |  |  ------------------
  |  |  |  |   18|  4.32k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  4.32k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 4.32k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  4.32k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  4.32k|                             : NULL))
  |  |  ------------------
  ------------------
 5121|       |
 5122|  4.32k|    if (sc == NULL)
  ------------------
  |  Branch (5122:9): [True: 0, False: 4.32k]
  ------------------
 5123|      0|        return 0;
 5124|       |
 5125|  4.32k|    clear_sys_error();
  ------------------
  |  |   31|  4.32k|#define clear_sys_error() errno = 0
  ------------------
 5126|  4.32k|    if (sc->s3.renegotiate)
  ------------------
  |  Branch (5126:9): [True: 0, False: 4.32k]
  ------------------
 5127|      0|        ssl3_renegotiate_check(s, 0);
 5128|       |
 5129|  4.32k|    return s->method->ssl_write_bytes(s, SSL3_RT_APPLICATION_DATA, buf, len,
  ------------------
  |  |  222|  4.32k|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
 5130|  4.32k|        written);
 5131|  4.32k|}
ssl3_read:
 5167|  15.0k|{
 5168|  15.0k|    return ssl3_read_internal(s, buf, len, 0, readbytes);
 5169|  15.0k|}
ssl3_renegotiate_check:
 5199|  18.3k|{
 5200|  18.3k|    int ret = 0;
 5201|  18.3k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL_ONLY(s);
  ------------------
  |  |   23|  18.3k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  18.3k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 18.3k]
  |  |  |  |  ------------------
  |  |  |  |   18|  18.3k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  18.3k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 18.3k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  18.3k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  18.3k|                             : NULL))
  |  |  ------------------
  ------------------
 5202|       |
 5203|  18.3k|    if (sc == NULL)
  ------------------
  |  Branch (5203:9): [True: 0, False: 18.3k]
  ------------------
 5204|      0|        return 0;
 5205|       |
 5206|  18.3k|    if (sc->s3.renegotiate) {
  ------------------
  |  Branch (5206:9): [True: 0, False: 18.3k]
  ------------------
 5207|      0|        if (!RECORD_LAYER_read_pending(&sc->rlayer)
  ------------------
  |  Branch (5207:13): [True: 0, False: 0]
  ------------------
 5208|      0|            && !RECORD_LAYER_write_pending(&sc->rlayer)
  ------------------
  |  Branch (5208:16): [True: 0, False: 0]
  ------------------
 5209|      0|            && (initok || !SSL_in_init(s))) {
  ------------------
  |  Branch (5209:17): [True: 0, False: 0]
  |  Branch (5209:27): [True: 0, False: 0]
  ------------------
 5210|       |            /*
 5211|       |             * if we are the server, and we have sent a 'RENEGOTIATE'
 5212|       |             * message, we need to set the state machine into the renegotiate
 5213|       |             * state.
 5214|       |             */
 5215|      0|            ossl_statem_set_renegotiate(sc);
 5216|      0|            sc->s3.renegotiate = 0;
 5217|      0|            sc->s3.num_renegotiations++;
 5218|      0|            sc->s3.total_renegotiations++;
 5219|      0|            ret = 1;
 5220|      0|        }
 5221|      0|    }
 5222|  18.3k|    return ret;
 5223|  18.3k|}
ssl_get_algorithm2:
 5232|   130k|{
 5233|   130k|    long alg2;
 5234|   130k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|   130k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 5235|       |
 5236|   130k|    if (s->s3.tmp.new_cipher == NULL)
  ------------------
  |  Branch (5236:9): [True: 0, False: 130k]
  ------------------
 5237|      0|        return -1;
 5238|   130k|    alg2 = s->s3.tmp.new_cipher->algorithm2;
 5239|   130k|    if (ssl->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_SHA256_PRF) {
  ------------------
  |  | 2194|   130k|#define SSL_ENC_FLAG_SHA256_PRF 0x4
  ------------------
  |  Branch (5239:9): [True: 130k, False: 0]
  ------------------
 5240|   130k|        if (alg2 == (SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF))
  ------------------
  |  |  223|   130k|#define SSL_HANDSHAKE_MAC_DEFAULT SSL_HANDSHAKE_MAC_MD5_SHA1
  |  |  ------------------
  |  |  |  |  216|   130k|#define SSL_HANDSHAKE_MAC_MD5_SHA1 SSL_MD_MD5_SHA1_IDX
  |  |  |  |  ------------------
  |  |  |  |  |  |  202|   130k|#define SSL_MD_MD5_SHA1_IDX 9
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      if (alg2 == (SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF))
  ------------------
  |  |  233|   130k|#define TLS1_PRF (SSL_MD_MD5_SHA1_IDX << TLS1_PRF_DGST_SHIFT)
  |  |  ------------------
  |  |  |  |  202|   130k|#define SSL_MD_MD5_SHA1_IDX 9
  |  |  ------------------
  |  |               #define TLS1_PRF (SSL_MD_MD5_SHA1_IDX << TLS1_PRF_DGST_SHIFT)
  |  |  ------------------
  |  |  |  |  226|   130k|#define TLS1_PRF_DGST_SHIFT 8
  |  |  ------------------
  ------------------
  |  Branch (5240:13): [True: 0, False: 130k]
  ------------------
 5241|      0|            return SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256;
  ------------------
  |  |  217|      0|#define SSL_HANDSHAKE_MAC_SHA256 SSL_MD_SHA256_IDX
  |  |  ------------------
  |  |  |  |  197|      0|#define SSL_MD_SHA256_IDX 4
  |  |  ------------------
  ------------------
                          return SSL_HANDSHAKE_MAC_SHA256 | TLS1_PRF_SHA256;
  ------------------
  |  |  228|      0|#define TLS1_PRF_SHA256 (SSL_MD_SHA256_IDX << TLS1_PRF_DGST_SHIFT)
  |  |  ------------------
  |  |  |  |  197|      0|#define SSL_MD_SHA256_IDX 4
  |  |  ------------------
  |  |               #define TLS1_PRF_SHA256 (SSL_MD_SHA256_IDX << TLS1_PRF_DGST_SHIFT)
  |  |  ------------------
  |  |  |  |  226|      0|#define TLS1_PRF_DGST_SHIFT 8
  |  |  ------------------
  ------------------
 5242|   130k|    } else if (s->s3.tmp.new_cipher->algorithm_mkey & SSL_PSK) {
  ------------------
  |  |  105|      0|#define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   91|      0|#define SSL_kPSK 0x00000008U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   97|      0|#define SSL_kRSAPSK 0x00000040U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   98|      0|#define SSL_kECDHEPSK 0x00000080U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   99|      0|#define SSL_kDHEPSK 0x00000100U
  |  |  ------------------
  ------------------
  |  Branch (5242:16): [True: 0, False: 0]
  ------------------
 5243|      0|        if (alg2 == (SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384))
  ------------------
  |  |  218|      0|#define SSL_HANDSHAKE_MAC_SHA384 SSL_MD_SHA384_IDX
  |  |  ------------------
  |  |  |  |  198|      0|#define SSL_MD_SHA384_IDX 5
  |  |  ------------------
  ------------------
                      if (alg2 == (SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384))
  ------------------
  |  |  229|      0|#define TLS1_PRF_SHA384 (SSL_MD_SHA384_IDX << TLS1_PRF_DGST_SHIFT)
  |  |  ------------------
  |  |  |  |  198|      0|#define SSL_MD_SHA384_IDX 5
  |  |  ------------------
  |  |               #define TLS1_PRF_SHA384 (SSL_MD_SHA384_IDX << TLS1_PRF_DGST_SHIFT)
  |  |  ------------------
  |  |  |  |  226|      0|#define TLS1_PRF_DGST_SHIFT 8
  |  |  ------------------
  ------------------
  |  Branch (5243:13): [True: 0, False: 0]
  ------------------
 5244|      0|            return SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF;
  ------------------
  |  |  223|      0|#define SSL_HANDSHAKE_MAC_DEFAULT SSL_HANDSHAKE_MAC_MD5_SHA1
  |  |  ------------------
  |  |  |  |  216|      0|#define SSL_HANDSHAKE_MAC_MD5_SHA1 SSL_MD_MD5_SHA1_IDX
  |  |  |  |  ------------------
  |  |  |  |  |  |  202|      0|#define SSL_MD_MD5_SHA1_IDX 9
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          return SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF;
  ------------------
  |  |  233|      0|#define TLS1_PRF (SSL_MD_MD5_SHA1_IDX << TLS1_PRF_DGST_SHIFT)
  |  |  ------------------
  |  |  |  |  202|      0|#define SSL_MD_MD5_SHA1_IDX 9
  |  |  ------------------
  |  |               #define TLS1_PRF (SSL_MD_MD5_SHA1_IDX << TLS1_PRF_DGST_SHIFT)
  |  |  ------------------
  |  |  |  |  226|      0|#define TLS1_PRF_DGST_SHIFT 8
  |  |  ------------------
  ------------------
 5245|      0|    }
 5246|   130k|    return alg2;
 5247|   130k|}
ssl_fill_hello_random:
 5256|  7.25k|{
 5257|  7.25k|    int send_time = 0, ret;
 5258|       |
 5259|  7.25k|    if (len < 4)
  ------------------
  |  Branch (5259:9): [True: 0, False: 7.25k]
  ------------------
 5260|      0|        return 0;
 5261|  7.25k|    if (server)
  ------------------
  |  Branch (5261:9): [True: 3.62k, False: 3.62k]
  ------------------
 5262|  3.62k|        send_time = (s->mode & SSL_MODE_SEND_SERVERHELLO_TIME) != 0;
  ------------------
  |  |  544|  3.62k|#define SSL_MODE_SEND_SERVERHELLO_TIME 0x00000040U
  ------------------
 5263|  3.62k|    else
 5264|  3.62k|        send_time = (s->mode & SSL_MODE_SEND_CLIENTHELLO_TIME) != 0;
  ------------------
  |  |  543|  3.62k|#define SSL_MODE_SEND_CLIENTHELLO_TIME 0x00000020U
  ------------------
 5265|  7.25k|    if (send_time) {
  ------------------
  |  Branch (5265:9): [True: 0, False: 7.25k]
  ------------------
 5266|      0|        unsigned long Time = (unsigned long)time(NULL);
 5267|      0|        unsigned char *p = result;
 5268|       |
 5269|      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))
  ------------------
 5270|      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)
  ------------------
 5271|  7.25k|    } else {
 5272|  7.25k|        ret = RAND_bytes_ex(SSL_CONNECTION_GET_CTX(s)->libctx, result, len, 0);
  ------------------
  |  |   26|  7.25k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 5273|  7.25k|    }
 5274|       |
 5275|  7.25k|    if (ret > 0) {
  ------------------
  |  Branch (5275:9): [True: 7.25k, False: 0]
  ------------------
 5276|  7.25k|        if (!ossl_assert(sizeof(tls11downgrade) < len)
  ------------------
  |  |   52|  14.5k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  14.5k|    __FILE__, __LINE__)
  ------------------
  |  Branch (5276:13): [True: 0, False: 7.25k]
  ------------------
 5277|  7.25k|            || !ossl_assert(sizeof(tls12downgrade) < len))
  ------------------
  |  |   52|  7.25k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  7.25k|    __FILE__, __LINE__)
  ------------------
  |  Branch (5277:16): [True: 0, False: 7.25k]
  ------------------
 5278|      0|            return 0;
 5279|  7.25k|        if (dgrd == DOWNGRADE_TO_1_2)
  ------------------
  |  Branch (5279:13): [True: 0, False: 7.25k]
  ------------------
 5280|      0|            memcpy(result + len - sizeof(tls12downgrade), tls12downgrade,
 5281|      0|                sizeof(tls12downgrade));
 5282|  7.25k|        else if (dgrd == DOWNGRADE_TO_1_1)
  ------------------
  |  Branch (5282:18): [True: 0, False: 7.25k]
  ------------------
 5283|      0|            memcpy(result + len - sizeof(tls11downgrade), tls11downgrade,
 5284|      0|                sizeof(tls11downgrade));
 5285|  7.25k|    }
 5286|       |
 5287|  7.25k|    return ret;
 5288|  7.25k|}
ssl_generate_pkey_group:
 5391|  7.25k|{
 5392|  7.25k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  7.25k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 5393|  7.25k|    const TLS_GROUP_INFO *ginf = tls1_group_id_lookup(sctx, id);
 5394|  7.25k|    EVP_PKEY_CTX *pctx = NULL;
 5395|  7.25k|    EVP_PKEY *pkey = NULL;
 5396|       |
 5397|  7.25k|    if (ginf == NULL) {
  ------------------
  |  Branch (5397:9): [True: 0, False: 7.25k]
  ------------------
 5398|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5399|      0|        goto err;
 5400|      0|    }
 5401|       |
 5402|  7.25k|    pctx = EVP_PKEY_CTX_new_from_name(sctx->libctx, ginf->algorithm,
 5403|  7.25k|        sctx->propq);
 5404|       |
 5405|  7.25k|    if (pctx == NULL) {
  ------------------
  |  Branch (5405:9): [True: 0, False: 7.25k]
  ------------------
 5406|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5407|      0|        goto err;
 5408|      0|    }
 5409|  7.25k|    if (EVP_PKEY_keygen_init(pctx) <= 0) {
  ------------------
  |  Branch (5409:9): [True: 0, False: 7.25k]
  ------------------
 5410|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5411|      0|        goto err;
 5412|      0|    }
 5413|  7.25k|    if (EVP_PKEY_CTX_set_group_name(pctx, ginf->realname) <= 0) {
  ------------------
  |  Branch (5413:9): [True: 0, False: 7.25k]
  ------------------
 5414|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5415|      0|        goto err;
 5416|      0|    }
 5417|  7.25k|    if (EVP_PKEY_keygen(pctx, &pkey) <= 0) {
  ------------------
  |  Branch (5417:9): [True: 0, False: 7.25k]
  ------------------
 5418|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5419|      0|        EVP_PKEY_free(pkey);
 5420|      0|        pkey = NULL;
 5421|      0|    }
 5422|       |
 5423|  7.25k|err:
 5424|  7.25k|    EVP_PKEY_CTX_free(pctx);
 5425|  7.25k|    return pkey;
 5426|  7.25k|}
ssl_generate_param_group:
 5432|  3.62k|{
 5433|  3.62k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 5434|  3.62k|    EVP_PKEY_CTX *pctx = NULL;
 5435|  3.62k|    EVP_PKEY *pkey = NULL;
 5436|  3.62k|    const TLS_GROUP_INFO *ginf = tls1_group_id_lookup(sctx, id);
 5437|       |
 5438|  3.62k|    if (ginf == NULL)
  ------------------
  |  Branch (5438:9): [True: 0, False: 3.62k]
  ------------------
 5439|      0|        goto err;
 5440|       |
 5441|  3.62k|    pctx = EVP_PKEY_CTX_new_from_name(sctx->libctx, ginf->algorithm,
 5442|  3.62k|        sctx->propq);
 5443|       |
 5444|  3.62k|    if (pctx == NULL)
  ------------------
  |  Branch (5444:9): [True: 0, False: 3.62k]
  ------------------
 5445|      0|        goto err;
 5446|  3.62k|    if (EVP_PKEY_paramgen_init(pctx) <= 0)
  ------------------
  |  Branch (5446:9): [True: 0, False: 3.62k]
  ------------------
 5447|      0|        goto err;
 5448|  3.62k|    if (EVP_PKEY_CTX_set_group_name(pctx, ginf->realname) <= 0) {
  ------------------
  |  Branch (5448:9): [True: 0, False: 3.62k]
  ------------------
 5449|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5450|      0|        goto err;
 5451|      0|    }
 5452|  3.62k|    if (EVP_PKEY_paramgen(pctx, &pkey) <= 0) {
  ------------------
  |  Branch (5452:9): [True: 0, False: 3.62k]
  ------------------
 5453|      0|        EVP_PKEY_free(pkey);
 5454|      0|        pkey = NULL;
 5455|      0|    }
 5456|       |
 5457|  3.62k|err:
 5458|  3.62k|    EVP_PKEY_CTX_free(pctx);
 5459|  3.62k|    return pkey;
 5460|  3.62k|}
ssl_gensecret:
 5464|  7.25k|{
 5465|  7.25k|    int rv = 0;
 5466|       |
 5467|       |    /* SSLfatal() called as appropriate in the below functions */
 5468|  7.25k|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  7.25k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.5k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.25k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.25k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.25k, False: 0]
  |  |  ------------------
  |  |  274|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.5k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.25k, False: 0]
  |  |  ------------------
  |  |  275|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.25k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
 5469|       |        /*
 5470|       |         * If we are resuming then we already generated the early secret
 5471|       |         * when we created the ClientHello, so don't recreate it.
 5472|       |         */
 5473|  7.25k|        if (!s->hit)
  ------------------
  |  Branch (5473:13): [True: 7.25k, False: 0]
  ------------------
 5474|  7.25k|            rv = tls13_generate_secret(s, ssl_handshake_md(s), NULL, NULL,
 5475|  7.25k|                0,
 5476|  7.25k|                (unsigned char *)&s->early_secret);
 5477|      0|        else
 5478|      0|            rv = 1;
 5479|       |
 5480|  7.25k|        rv = rv && tls13_generate_handshake_secret(s, pms, pmslen);
  ------------------
  |  Branch (5480:14): [True: 7.25k, False: 0]
  |  Branch (5480:20): [True: 7.25k, False: 0]
  ------------------
 5481|  7.25k|    } else {
 5482|      0|        rv = ssl_generate_master_secret(s, pms, pmslen, 0);
 5483|      0|    }
 5484|       |
 5485|  7.25k|    return rv;
 5486|  7.25k|}
ssl_decapsulate:
 5549|  3.62k|{
 5550|  3.62k|    int rv = 0;
 5551|  3.62k|    unsigned char *pms = NULL;
 5552|  3.62k|    size_t pmslen = 0;
 5553|  3.62k|    EVP_PKEY_CTX *pctx;
 5554|  3.62k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 5555|       |
 5556|  3.62k|    if (privkey == NULL) {
  ------------------
  |  Branch (5556:9): [True: 0, False: 3.62k]
  ------------------
 5557|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5558|      0|        return 0;
 5559|      0|    }
 5560|       |
 5561|  3.62k|    pctx = EVP_PKEY_CTX_new_from_pkey(sctx->libctx, privkey, sctx->propq);
 5562|       |
 5563|  3.62k|    if (EVP_PKEY_decapsulate_init(pctx, NULL) <= 0
  ------------------
  |  Branch (5563:9): [True: 0, False: 3.62k]
  ------------------
 5564|  3.62k|        || EVP_PKEY_decapsulate(pctx, NULL, &pmslen, ct, ctlen) <= 0) {
  ------------------
  |  Branch (5564:12): [True: 0, False: 3.62k]
  ------------------
 5565|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5566|      0|        goto err;
 5567|      0|    }
 5568|       |
 5569|  3.62k|    pms = OPENSSL_malloc(pmslen);
  ------------------
  |  |  107|  3.62k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 5570|  3.62k|    if (pms == NULL) {
  ------------------
  |  Branch (5570:9): [True: 0, False: 3.62k]
  ------------------
 5571|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5572|      0|        goto err;
 5573|      0|    }
 5574|       |
 5575|  3.62k|    if (EVP_PKEY_decapsulate(pctx, pms, &pmslen, ct, ctlen) <= 0) {
  ------------------
  |  Branch (5575:9): [True: 0, False: 3.62k]
  ------------------
 5576|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5577|      0|        goto err;
 5578|      0|    }
 5579|       |
 5580|  3.62k|    if (gensecret) {
  ------------------
  |  Branch (5580:9): [True: 3.62k, False: 0]
  ------------------
 5581|       |        /* SSLfatal() called as appropriate in the below functions */
 5582|  3.62k|        rv = ssl_gensecret(s, pms, pmslen);
 5583|  3.62k|    } else {
 5584|       |        /* Save premaster secret */
 5585|      0|        s->s3.tmp.pms = pms;
 5586|      0|        s->s3.tmp.pmslen = pmslen;
 5587|      0|        pms = NULL;
 5588|      0|        rv = 1;
 5589|      0|    }
 5590|       |
 5591|  3.62k|err:
 5592|  3.62k|    OPENSSL_clear_free(pms, pmslen);
  ------------------
  |  |  130|  3.62k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 5593|  3.62k|    EVP_PKEY_CTX_free(pctx);
 5594|  3.62k|    return rv;
 5595|  3.62k|}
ssl_encapsulate:
 5600|  3.62k|{
 5601|  3.62k|    int rv = 0;
 5602|  3.62k|    unsigned char *pms = NULL, *ct = NULL;
 5603|  3.62k|    size_t pmslen = 0, ctlen = 0;
 5604|  3.62k|    EVP_PKEY_CTX *pctx;
 5605|  3.62k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 5606|       |
 5607|  3.62k|    if (pubkey == NULL) {
  ------------------
  |  Branch (5607:9): [True: 0, False: 3.62k]
  ------------------
 5608|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5609|      0|        return 0;
 5610|      0|    }
 5611|       |
 5612|  3.62k|    pctx = EVP_PKEY_CTX_new_from_pkey(sctx->libctx, pubkey, sctx->propq);
 5613|       |
 5614|  3.62k|    if (EVP_PKEY_encapsulate_init(pctx, NULL) <= 0
  ------------------
  |  Branch (5614:9): [True: 0, False: 3.62k]
  ------------------
 5615|  3.62k|        || EVP_PKEY_encapsulate(pctx, NULL, &ctlen, NULL, &pmslen) <= 0
  ------------------
  |  Branch (5615:12): [True: 0, False: 3.62k]
  ------------------
 5616|  3.62k|        || pmslen == 0 || ctlen == 0) {
  ------------------
  |  Branch (5616:12): [True: 0, False: 3.62k]
  |  Branch (5616:27): [True: 0, False: 3.62k]
  ------------------
 5617|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5618|      0|        goto err;
 5619|      0|    }
 5620|       |
 5621|  3.62k|    pms = OPENSSL_malloc(pmslen);
  ------------------
  |  |  107|  3.62k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 5622|  3.62k|    ct = OPENSSL_malloc(ctlen);
  ------------------
  |  |  107|  3.62k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 5623|  3.62k|    if (pms == NULL || ct == NULL) {
  ------------------
  |  Branch (5623:9): [True: 0, False: 3.62k]
  |  Branch (5623:24): [True: 0, False: 3.62k]
  ------------------
 5624|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5625|      0|        goto err;
 5626|      0|    }
 5627|       |
 5628|  3.62k|    if (EVP_PKEY_encapsulate(pctx, ct, &ctlen, pms, &pmslen) <= 0) {
  ------------------
  |  Branch (5628:9): [True: 0, False: 3.62k]
  ------------------
 5629|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_KEY_SHARE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5630|      0|        goto err;
 5631|      0|    }
 5632|       |
 5633|  3.62k|    if (gensecret) {
  ------------------
  |  Branch (5633:9): [True: 0, False: 3.62k]
  ------------------
 5634|       |        /* SSLfatal() called as appropriate in the below functions */
 5635|      0|        rv = ssl_gensecret(s, pms, pmslen);
 5636|  3.62k|    } else {
 5637|       |        /* Save premaster secret */
 5638|  3.62k|        s->s3.tmp.pms = pms;
 5639|  3.62k|        s->s3.tmp.pmslen = pmslen;
 5640|  3.62k|        pms = NULL;
 5641|  3.62k|        rv = 1;
 5642|  3.62k|    }
 5643|       |
 5644|  3.62k|    if (rv > 0) {
  ------------------
  |  Branch (5644:9): [True: 3.62k, False: 0]
  ------------------
 5645|       |        /* Pass ownership of ct to caller */
 5646|  3.62k|        *ctp = ct;
 5647|  3.62k|        *ctlenp = ctlen;
 5648|  3.62k|        ct = NULL;
 5649|  3.62k|    }
 5650|       |
 5651|  3.62k|err:
 5652|  3.62k|    OPENSSL_clear_free(pms, pmslen);
  ------------------
  |  |  130|  3.62k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 5653|  3.62k|    OPENSSL_free(ct);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 5654|  3.62k|    EVP_PKEY_CTX_free(pctx);
 5655|  3.62k|    return rv;
 5656|  3.62k|}
s3_lib.c:cipher_compare:
 3756|  1.96k|{
 3757|  1.96k|    const SSL_CIPHER *ap = (const SSL_CIPHER *)a;
 3758|  1.96k|    const SSL_CIPHER *bp = (const SSL_CIPHER *)b;
 3759|       |
 3760|  1.96k|    if (ap->id == bp->id)
  ------------------
  |  Branch (3760:9): [True: 0, False: 1.96k]
  ------------------
 3761|      0|        return 0;
 3762|  1.96k|    return ap->id < bp->id ? -1 : 1;
  ------------------
  |  Branch (3762:12): [True: 1.25k, False: 706]
  ------------------
 3763|  1.96k|}
s3_lib.c:ssl3_read_internal:
 5135|  15.0k|{
 5136|  15.0k|    int ret;
 5137|  15.0k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL_ONLY(s);
  ------------------
  |  |   23|  15.0k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  15.0k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 15.0k]
  |  |  |  |  ------------------
  |  |  |  |   18|  15.0k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  15.0k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 15.0k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  15.0k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  15.0k|                             : NULL))
  |  |  ------------------
  ------------------
 5138|       |
 5139|  15.0k|    if (sc == NULL)
  ------------------
  |  Branch (5139:9): [True: 0, False: 15.0k]
  ------------------
 5140|      0|        return 0;
 5141|       |
 5142|  15.0k|    clear_sys_error();
  ------------------
  |  |   31|  15.0k|#define clear_sys_error() errno = 0
  ------------------
 5143|  15.0k|    if (sc->s3.renegotiate)
  ------------------
  |  Branch (5143:9): [True: 0, False: 15.0k]
  ------------------
 5144|      0|        ssl3_renegotiate_check(s, 0);
 5145|  15.0k|    sc->s3.in_read_app_data = 1;
 5146|  15.0k|    ret = s->method->ssl_read_bytes(s, SSL3_RT_APPLICATION_DATA, NULL, buf, len,
  ------------------
  |  |  222|  15.0k|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
 5147|  15.0k|        peek, readbytes);
 5148|  15.0k|    if ((ret == -1) && (sc->s3.in_read_app_data == 2)) {
  ------------------
  |  Branch (5148:9): [True: 7.72k, False: 7.36k]
  |  Branch (5148:24): [True: 0, False: 7.72k]
  ------------------
 5149|       |        /*
 5150|       |         * ssl3_read_bytes decided to call s->handshake_func, which called
 5151|       |         * ssl3_read_bytes to read handshake data. However, ssl3_read_bytes
 5152|       |         * actually found application data and thinks that application data
 5153|       |         * makes sense here; so disable handshake processing and try to read
 5154|       |         * application data again.
 5155|       |         */
 5156|      0|        ossl_statem_set_in_handshake(sc, 1);
 5157|      0|        ret = s->method->ssl_read_bytes(s, SSL3_RT_APPLICATION_DATA, NULL, buf,
  ------------------
  |  |  222|      0|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
 5158|      0|            len, peek, readbytes);
 5159|      0|        ossl_statem_set_in_handshake(sc, 0);
 5160|      0|    } else
 5161|  15.0k|        sc->s3.in_read_app_data = 0;
 5162|       |
 5163|  15.0k|    return ret;
 5164|  15.0k|}

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

i2d_SSL_SESSION:
  112|  43.0k|{
  113|       |
  114|  43.0k|    SSL_SESSION_ASN1 as;
  115|       |
  116|  43.0k|    ASN1_OCTET_STRING cipher;
  117|  43.0k|    unsigned char cipher_data[2];
  118|  43.0k|    ASN1_OCTET_STRING master_key, session_id, sid_ctx;
  119|       |
  120|  43.0k|#ifndef OPENSSL_NO_COMP
  121|  43.0k|    ASN1_OCTET_STRING comp_id;
  122|  43.0k|    unsigned char comp_id_data;
  123|  43.0k|#endif
  124|  43.0k|    ASN1_OCTET_STRING tlsext_hostname, tlsext_tick;
  125|  43.0k|#ifndef OPENSSL_NO_SRP
  126|  43.0k|    ASN1_OCTET_STRING srp_username;
  127|  43.0k|#endif
  128|  43.0k|#ifndef OPENSSL_NO_PSK
  129|  43.0k|    ASN1_OCTET_STRING psk_identity, psk_identity_hint;
  130|  43.0k|#endif
  131|  43.0k|    ASN1_OCTET_STRING alpn_selected;
  132|  43.0k|    ASN1_OCTET_STRING ticket_appdata;
  133|  43.0k|    ASN1_OCTET_STRING peer_rpk;
  134|       |
  135|  43.0k|    long l;
  136|  43.0k|    int ret;
  137|       |
  138|  43.0k|    if ((in == NULL) || ((in->cipher == NULL) && (in->cipher_id == 0)))
  ------------------
  |  Branch (138:9): [True: 0, False: 43.0k]
  |  Branch (138:26): [True: 0, False: 43.0k]
  |  Branch (138:50): [True: 0, False: 0]
  ------------------
  139|      0|        return 0;
  140|       |
  141|  43.0k|    memset(&as, 0, sizeof(as));
  142|       |
  143|  43.0k|    as.version = SSL_SESSION_ASN1_VERSION;
  ------------------
  |  |   64|  43.0k|#define SSL_SESSION_ASN1_VERSION 0x0001
  ------------------
  144|  43.0k|    as.ssl_version = in->ssl_version;
  145|       |
  146|  43.0k|    as.kex_group = in->kex_group;
  147|       |
  148|  43.0k|    if (in->cipher == NULL)
  ------------------
  |  Branch (148:9): [True: 0, False: 43.0k]
  ------------------
  149|      0|        l = in->cipher_id;
  150|  43.0k|    else
  151|  43.0k|        l = in->cipher->id;
  152|  43.0k|    cipher_data[0] = ((unsigned char)(l >> 8L)) & 0xff;
  153|  43.0k|    cipher_data[1] = ((unsigned char)(l)) & 0xff;
  154|       |
  155|  43.0k|    ssl_session_oinit(&as.cipher, &cipher, cipher_data, 2);
  156|       |
  157|  43.0k|#ifndef OPENSSL_NO_COMP
  158|  43.0k|    if (in->compress_meth) {
  ------------------
  |  Branch (158:9): [True: 0, False: 43.0k]
  ------------------
  159|      0|        comp_id_data = (unsigned char)in->compress_meth;
  160|      0|        ssl_session_oinit(&as.comp_id, &comp_id, &comp_id_data, 1);
  161|      0|    }
  162|  43.0k|#endif
  163|       |
  164|  43.0k|    ssl_session_oinit(&as.master_key, &master_key,
  165|  43.0k|        in->master_key, in->master_key_length);
  166|       |
  167|  43.0k|    ssl_session_oinit(&as.session_id, &session_id,
  168|  43.0k|        in->session_id, in->session_id_length);
  169|       |
  170|  43.0k|    ssl_session_oinit(&as.session_id_context, &sid_ctx,
  171|  43.0k|        in->sid_ctx, in->sid_ctx_length);
  172|       |
  173|  43.0k|    as.time = (int64_t)ossl_time_to_time_t(in->time);
  174|  43.0k|    as.timeout = (int64_t)ossl_time2seconds(in->timeout);
  ------------------
  |  |   43|  43.0k|#define ossl_time2seconds(t) (ossl_time2ticks(t) / OSSL_TIME_SECOND)
  |  |  ------------------
  |  |  |  |   31|  43.0k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  ------------------
  ------------------
  175|  43.0k|    as.verify_result = in->verify_result;
  176|       |
  177|  43.0k|    as.peer = in->peer;
  178|       |
  179|  43.0k|    as.peer_rpk = NULL;
  180|  43.0k|    peer_rpk.data = NULL;
  181|  43.0k|    if (in->peer_rpk != NULL) {
  ------------------
  |  Branch (181:9): [True: 0, False: 43.0k]
  ------------------
  182|      0|        peer_rpk.length = i2d_PUBKEY(in->peer_rpk, &peer_rpk.data);
  183|      0|        if (peer_rpk.length > 0 && peer_rpk.data != NULL)
  ------------------
  |  Branch (183:13): [True: 0, False: 0]
  |  Branch (183:36): [True: 0, False: 0]
  ------------------
  184|      0|            as.peer_rpk = &peer_rpk;
  185|      0|    }
  186|       |
  187|  43.0k|    ssl_session_sinit(&as.tlsext_hostname, &tlsext_hostname,
  188|  43.0k|        in->ext.hostname);
  189|  43.0k|    if (in->ext.tick) {
  ------------------
  |  Branch (189:9): [True: 14.3k, False: 28.6k]
  ------------------
  190|  14.3k|        ssl_session_oinit(&as.tlsext_tick, &tlsext_tick,
  191|  14.3k|            in->ext.tick, in->ext.ticklen);
  192|  14.3k|    }
  193|  43.0k|    if (in->ext.tick_lifetime_hint > 0)
  ------------------
  |  Branch (193:9): [True: 14.3k, False: 28.6k]
  ------------------
  194|  14.3k|        as.tlsext_tick_lifetime_hint = in->ext.tick_lifetime_hint;
  195|  43.0k|    as.tlsext_tick_age_add = in->ext.tick_age_add;
  196|  43.0k|#ifndef OPENSSL_NO_PSK
  197|  43.0k|    ssl_session_sinit(&as.psk_identity_hint, &psk_identity_hint,
  198|  43.0k|        in->psk_identity_hint);
  199|  43.0k|    ssl_session_sinit(&as.psk_identity, &psk_identity, in->psk_identity);
  200|  43.0k|#endif /* OPENSSL_NO_PSK */
  201|  43.0k|#ifndef OPENSSL_NO_SRP
  202|  43.0k|    ssl_session_sinit(&as.srp_username, &srp_username, in->srp_username);
  203|  43.0k|#endif /* OPENSSL_NO_SRP */
  204|       |
  205|  43.0k|    as.flags = in->flags;
  206|  43.0k|    as.max_early_data = in->ext.max_early_data;
  207|       |
  208|  43.0k|    if (in->ext.alpn_selected == NULL)
  ------------------
  |  Branch (208:9): [True: 24, False: 42.9k]
  ------------------
  209|     24|        as.alpn_selected = NULL;
  210|  42.9k|    else
  211|  42.9k|        ssl_session_oinit(&as.alpn_selected, &alpn_selected,
  212|  42.9k|            in->ext.alpn_selected, in->ext.alpn_selected_len);
  213|       |
  214|  43.0k|    as.tlsext_max_fragment_len_mode = in->ext.max_fragment_len_mode;
  215|       |
  216|  43.0k|    if (in->ticket_appdata == NULL)
  ------------------
  |  Branch (216:9): [True: 43.0k, False: 0]
  ------------------
  217|  43.0k|        as.ticket_appdata = NULL;
  218|      0|    else
  219|      0|        ssl_session_oinit(&as.ticket_appdata, &ticket_appdata,
  220|      0|            in->ticket_appdata, in->ticket_appdata_len);
  221|       |
  222|  43.0k|    ret = i2d_SSL_SESSION_ASN1(&as, pp);
  223|  43.0k|    OPENSSL_free(peer_rpk.data);
  ------------------
  |  |  132|  43.0k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  224|  43.0k|    return ret;
  225|  43.0k|}
d2i_SSL_SESSION_ex:
  267|  7.16k|{
  268|  7.16k|    long id;
  269|  7.16k|    size_t tmpl;
  270|  7.16k|    const unsigned char *p = *pp;
  271|  7.16k|    SSL_SESSION_ASN1 *as = NULL;
  272|  7.16k|    SSL_SESSION *ret = NULL;
  273|       |
  274|  7.16k|    as = d2i_SSL_SESSION_ASN1(NULL, &p, length);
  275|       |    /* ASN.1 code returns suitable error */
  276|  7.16k|    if (as == NULL)
  ------------------
  |  Branch (276:9): [True: 0, False: 7.16k]
  ------------------
  277|      0|        goto err;
  278|       |
  279|  7.16k|    if (a == NULL || *a == NULL) {
  ------------------
  |  Branch (279:9): [True: 7.16k, False: 0]
  |  Branch (279:22): [True: 0, False: 0]
  ------------------
  280|  7.16k|        ret = SSL_SESSION_new();
  281|  7.16k|        if (ret == NULL)
  ------------------
  |  Branch (281:13): [True: 0, False: 7.16k]
  ------------------
  282|      0|            goto err;
  283|  7.16k|    } else {
  284|      0|        ret = *a;
  285|      0|    }
  286|       |
  287|  7.16k|    if (as->version != SSL_SESSION_ASN1_VERSION) {
  ------------------
  |  |   64|  7.16k|#define SSL_SESSION_ASN1_VERSION 0x0001
  ------------------
  |  Branch (287:9): [True: 0, False: 7.16k]
  ------------------
  288|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_UNKNOWN_SSL_VERSION);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  289|      0|        goto err;
  290|      0|    }
  291|       |
  292|  7.16k|    if ((as->ssl_version >> 8) != SSL3_VERSION_MAJOR
  ------------------
  |  |  216|  14.3k|#define SSL3_VERSION_MAJOR 0x03
  ------------------
  |  Branch (292:9): [True: 0, False: 7.16k]
  ------------------
  293|      0|        && (as->ssl_version >> 8) != DTLS1_VERSION_MAJOR
  ------------------
  |  |   32|  7.16k|#define DTLS1_VERSION_MAJOR 0xFE
  ------------------
  |  Branch (293:12): [True: 0, False: 0]
  ------------------
  294|      0|        && as->ssl_version != DTLS1_BAD_VER) {
  ------------------
  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (294:12): [True: 0, False: 0]
  ------------------
  295|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_UNSUPPORTED_SSL_VERSION);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  296|      0|        goto err;
  297|      0|    }
  298|       |
  299|  7.16k|    ret->ssl_version = (int)as->ssl_version;
  300|       |
  301|  7.16k|    ret->kex_group = as->kex_group;
  302|       |
  303|  7.16k|    if (as->cipher->length != 2) {
  ------------------
  |  Branch (303:9): [True: 0, False: 7.16k]
  ------------------
  304|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_CIPHER_CODE_WRONG_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  305|      0|        goto err;
  306|      0|    }
  307|       |
  308|  7.16k|    id = 0x03000000L | ((unsigned long)as->cipher->data[0] << 8L)
  309|  7.16k|        | (unsigned long)as->cipher->data[1];
  310|       |
  311|  7.16k|    ret->cipher_id = id;
  312|  7.16k|    ret->cipher = ssl3_get_cipher_by_id(id);
  313|  7.16k|    if (ret->cipher == NULL)
  ------------------
  |  Branch (313:9): [True: 0, False: 7.16k]
  ------------------
  314|      0|        goto err;
  315|       |
  316|  7.16k|    if (!ssl_session_memcpy(ret->session_id, &ret->session_id_length,
  ------------------
  |  Branch (316:9): [True: 0, False: 7.16k]
  ------------------
  317|  7.16k|            as->session_id, SSL3_MAX_SSL_SESSION_ID_LENGTH))
  ------------------
  |  |  134|  7.16k|#define SSL3_MAX_SSL_SESSION_ID_LENGTH 32
  ------------------
  318|      0|        goto err;
  319|       |
  320|  7.16k|    if (!ssl_session_memcpy(ret->master_key, &tmpl,
  ------------------
  |  Branch (320:9): [True: 0, False: 7.16k]
  ------------------
  321|  7.16k|            as->master_key, TLS13_MAX_RESUMPTION_PSK_LENGTH))
  ------------------
  |  |  458|  7.16k|#define TLS13_MAX_RESUMPTION_PSK_LENGTH 512
  ------------------
  322|      0|        goto err;
  323|       |
  324|  7.16k|    ret->master_key_length = tmpl;
  325|       |
  326|  7.16k|    if (as->time != 0)
  ------------------
  |  Branch (326:9): [True: 7.16k, False: 0]
  ------------------
  327|  7.16k|        ret->time = ossl_time_from_time_t(as->time);
  328|      0|    else
  329|      0|        ret->time = ossl_time_now();
  330|       |
  331|  7.16k|    if (as->timeout != 0)
  ------------------
  |  Branch (331:9): [True: 7.16k, False: 0]
  ------------------
  332|  7.16k|        ret->timeout = ossl_seconds2time(as->timeout);
  ------------------
  |  |   42|  7.16k|#define ossl_seconds2time(s) ossl_ticks2time((s) * OSSL_TIME_SECOND)
  |  |  ------------------
  |  |  |  |   31|  7.16k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  ------------------
  ------------------
  333|      0|    else
  334|      0|        ret->timeout = ossl_seconds2time(3);
  ------------------
  |  |   42|      0|#define ossl_seconds2time(s) ossl_ticks2time((s) * OSSL_TIME_SECOND)
  |  |  ------------------
  |  |  |  |   31|      0|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  ------------------
  ------------------
  335|  7.16k|    ssl_session_calculate_timeout(ret);
  336|       |
  337|  7.16k|    X509_free(ret->peer);
  338|  7.16k|    ret->peer = as->peer;
  339|  7.16k|    as->peer = NULL;
  340|       |
  341|  7.16k|    EVP_PKEY_free(ret->peer_rpk);
  342|  7.16k|    ret->peer_rpk = NULL;
  343|  7.16k|    if (as->peer_rpk != NULL) {
  ------------------
  |  Branch (343:9): [True: 0, False: 7.16k]
  ------------------
  344|      0|        const unsigned char *data = as->peer_rpk->data;
  345|       |
  346|       |        /*
  347|       |         * |data| is incremented; we don't want to lose original ptr
  348|       |         */
  349|      0|        ret->peer_rpk = d2i_PUBKEY_ex(NULL, &data, as->peer_rpk->length, libctx, propq);
  350|      0|        if (ret->peer_rpk == NULL)
  ------------------
  |  Branch (350:13): [True: 0, False: 0]
  ------------------
  351|      0|            goto err;
  352|      0|    }
  353|       |
  354|  7.16k|    if (!ssl_session_memcpy(ret->sid_ctx, &ret->sid_ctx_length,
  ------------------
  |  Branch (354:9): [True: 0, False: 7.16k]
  ------------------
  355|  7.16k|            as->session_id_context, SSL_MAX_SID_CTX_LENGTH))
  ------------------
  |  |   67|  7.16k|#define SSL_MAX_SID_CTX_LENGTH 32
  ------------------
  356|      0|        goto err;
  357|       |
  358|       |    /* NB: this defaults to zero which is X509_V_OK */
  359|  7.16k|    ret->verify_result = as->verify_result;
  360|       |
  361|  7.16k|    if (!ssl_session_strndup(&ret->ext.hostname, as->tlsext_hostname))
  ------------------
  |  Branch (361:9): [True: 0, False: 7.16k]
  ------------------
  362|      0|        goto err;
  363|       |
  364|  7.16k|#ifndef OPENSSL_NO_PSK
  365|  7.16k|    if (!ssl_session_strndup(&ret->psk_identity_hint, as->psk_identity_hint))
  ------------------
  |  Branch (365:9): [True: 0, False: 7.16k]
  ------------------
  366|      0|        goto err;
  367|  7.16k|    if (!ssl_session_strndup(&ret->psk_identity, as->psk_identity))
  ------------------
  |  Branch (367:9): [True: 0, False: 7.16k]
  ------------------
  368|      0|        goto err;
  369|  7.16k|#endif
  370|       |
  371|  7.16k|    ret->ext.tick_lifetime_hint = (unsigned long)as->tlsext_tick_lifetime_hint;
  372|  7.16k|    ret->ext.tick_age_add = as->tlsext_tick_age_add;
  373|  7.16k|    OPENSSL_free(ret->ext.tick);
  ------------------
  |  |  132|  7.16k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  374|  7.16k|    if (as->tlsext_tick != NULL) {
  ------------------
  |  Branch (374:9): [True: 0, False: 7.16k]
  ------------------
  375|      0|        ret->ext.tick = as->tlsext_tick->data;
  376|      0|        ret->ext.ticklen = as->tlsext_tick->length;
  377|      0|        as->tlsext_tick->data = NULL;
  378|  7.16k|    } else {
  379|  7.16k|        ret->ext.tick = NULL;
  380|  7.16k|    }
  381|  7.16k|#ifndef OPENSSL_NO_COMP
  382|  7.16k|    if (as->comp_id) {
  ------------------
  |  Branch (382:9): [True: 0, False: 7.16k]
  ------------------
  383|      0|        if (as->comp_id->length != 1) {
  ------------------
  |  Branch (383:13): [True: 0, False: 0]
  ------------------
  384|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_BAD_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  385|      0|            goto err;
  386|      0|        }
  387|      0|        ret->compress_meth = as->comp_id->data[0];
  388|  7.16k|    } else {
  389|  7.16k|        ret->compress_meth = 0;
  390|  7.16k|    }
  391|  7.16k|#endif
  392|       |
  393|  7.16k|#ifndef OPENSSL_NO_SRP
  394|  7.16k|    if (!ssl_session_strndup(&ret->srp_username, as->srp_username))
  ------------------
  |  Branch (394:9): [True: 0, False: 7.16k]
  ------------------
  395|      0|        goto err;
  396|  7.16k|#endif /* OPENSSL_NO_SRP */
  397|       |    /* Flags defaults to zero which is fine */
  398|  7.16k|    ret->flags = (int32_t)as->flags;
  399|  7.16k|    ret->ext.max_early_data = as->max_early_data;
  400|       |
  401|  7.16k|    OPENSSL_free(ret->ext.alpn_selected);
  ------------------
  |  |  132|  7.16k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  402|  7.16k|    if (as->alpn_selected != NULL) {
  ------------------
  |  Branch (402:9): [True: 7.16k, False: 4]
  ------------------
  403|  7.16k|        ret->ext.alpn_selected = as->alpn_selected->data;
  404|  7.16k|        ret->ext.alpn_selected_len = as->alpn_selected->length;
  405|  7.16k|        as->alpn_selected->data = NULL;
  406|  7.16k|    } else {
  407|      4|        ret->ext.alpn_selected = NULL;
  408|      4|        ret->ext.alpn_selected_len = 0;
  409|      4|    }
  410|       |
  411|  7.16k|    ret->ext.max_fragment_len_mode = as->tlsext_max_fragment_len_mode;
  412|       |
  413|  7.16k|    OPENSSL_free(ret->ticket_appdata);
  ------------------
  |  |  132|  7.16k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  414|  7.16k|    if (as->ticket_appdata != NULL) {
  ------------------
  |  Branch (414:9): [True: 0, False: 7.16k]
  ------------------
  415|      0|        ret->ticket_appdata = as->ticket_appdata->data;
  416|      0|        ret->ticket_appdata_len = as->ticket_appdata->length;
  417|      0|        as->ticket_appdata->data = NULL;
  418|  7.16k|    } else {
  419|  7.16k|        ret->ticket_appdata = NULL;
  420|  7.16k|        ret->ticket_appdata_len = 0;
  421|  7.16k|    }
  422|       |
  423|  7.16k|    M_ASN1_free_of(as, SSL_SESSION_ASN1);
  ------------------
  |  |  892|  7.16k|    ASN1_item_free(CHECKED_PTR_OF(type, x), ASN1_ITEM_rptr(type))
  |  |  ------------------
  |  |  |  |  335|  7.16k|    ((void *)(1 ? p : (type *)0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (335:15): [True: 7.16k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ASN1_item_free(CHECKED_PTR_OF(type, x), ASN1_ITEM_rptr(type))
  |  |  ------------------
  |  |  |  |  399|  7.16k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  |  |  ------------------
  ------------------
  424|       |
  425|  7.16k|    if ((a != NULL) && (*a == NULL))
  ------------------
  |  Branch (425:9): [True: 0, False: 7.16k]
  |  Branch (425:24): [True: 0, False: 0]
  ------------------
  426|      0|        *a = ret;
  427|  7.16k|    *pp = p;
  428|  7.16k|    return ret;
  429|       |
  430|      0|err:
  431|      0|    M_ASN1_free_of(as, SSL_SESSION_ASN1);
  ------------------
  |  |  892|      0|    ASN1_item_free(CHECKED_PTR_OF(type, x), ASN1_ITEM_rptr(type))
  |  |  ------------------
  |  |  |  |  335|      0|    ((void *)(1 ? p : (type *)0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (335:15): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   ASN1_item_free(CHECKED_PTR_OF(type, x), ASN1_ITEM_rptr(type))
  |  |  ------------------
  |  |  |  |  399|      0|#define ASN1_ITEM_rptr(ref) (ref##_it())
  |  |  ------------------
  ------------------
  432|      0|    if ((a == NULL) || (*a != ret))
  ------------------
  |  Branch (432:9): [True: 0, False: 0]
  |  Branch (432:24): [True: 0, False: 0]
  ------------------
  433|      0|        SSL_SESSION_free(ret);
  434|       |    return NULL;
  435|  7.16k|}
ssl_asn1.c:ssl_session_oinit:
   94|   229k|{
   95|   229k|    os->data = (unsigned char *)data; /* justified cast: data is not modified */
   96|   229k|    os->length = (int)len;
   97|   229k|    os->flags = 0;
   98|   229k|    *dest = os;
   99|   229k|}
ssl_asn1.c:ssl_session_sinit:
  104|   172k|{
  105|   172k|    if (data != NULL)
  ------------------
  |  Branch (105:9): [True: 0, False: 172k]
  ------------------
  106|      0|        ssl_session_oinit(dest, os, (const unsigned char *)data, strlen(data));
  107|   172k|    else
  108|   172k|        *dest = NULL;
  109|   172k|}
ssl_asn1.c:ssl_session_memcpy:
  247|  21.5k|{
  248|  21.5k|    if (src == NULL || src->length == 0) {
  ------------------
  |  Branch (248:9): [True: 0, False: 21.5k]
  |  Branch (248:24): [True: 0, False: 21.5k]
  ------------------
  249|      0|        *pdstlen = 0;
  250|      0|        return 1;
  251|      0|    }
  252|  21.5k|    if (src->length < 0 || src->length > (int)maxlen)
  ------------------
  |  Branch (252:9): [True: 0, False: 21.5k]
  |  Branch (252:28): [True: 0, False: 21.5k]
  ------------------
  253|      0|        return 0;
  254|  21.5k|    memcpy(dst, src->data, src->length);
  255|  21.5k|    *pdstlen = src->length;
  256|  21.5k|    return 1;
  257|  21.5k|}
ssl_asn1.c:ssl_session_strndup:
  232|  28.6k|{
  233|  28.6k|    OPENSSL_free(*pdst);
  ------------------
  |  |  132|  28.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  234|  28.6k|    *pdst = NULL;
  235|  28.6k|    if (src == NULL)
  ------------------
  |  Branch (235:9): [True: 28.6k, False: 0]
  ------------------
  236|  28.6k|        return 1;
  237|      0|    *pdst = OPENSSL_strndup((char *)src->data, src->length);
  ------------------
  |  |  138|      0|    CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  238|      0|    if (*pdst == NULL)
  ------------------
  |  Branch (238:9): [True: 0, False: 0]
  ------------------
  239|      0|        return 0;
  240|      0|    return 1;
  241|      0|}

SSL_get_ex_data_X509_STORE_CTX_idx:
   56|  10.9k|{
   57|       |
   58|  10.9k|    if (!RUN_ONCE(&ssl_x509_store_ctx_once, ssl_x509_store_ctx_init))
  ------------------
  |  |  130|  10.9k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 10.9k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (58:9): [True: 0, False: 10.9k]
  ------------------
   59|      0|        return -1;
   60|  10.9k|    return ssl_x509_store_ctx_idx;
   61|  10.9k|}
ssl_cert_new:
   64|  7.36k|{
   65|  7.36k|    CERT *ret = NULL;
   66|       |
   67|       |    /* Should never happen */
   68|  7.36k|    if (!ossl_assert(ssl_pkey_num >= SSL_PKEY_NUM))
  ------------------
  |  |   52|  7.36k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  7.36k|    __FILE__, __LINE__)
  ------------------
  |  Branch (68:9): [True: 0, False: 7.36k]
  ------------------
   69|      0|        return NULL;
   70|       |
   71|  7.36k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  7.36k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   72|  7.36k|    if (ret == NULL)
  ------------------
  |  Branch (72:9): [True: 0, False: 7.36k]
  ------------------
   73|      0|        return NULL;
   74|       |
   75|  7.36k|    ret->ssl_pkey_num = ssl_pkey_num;
   76|  7.36k|    ret->pkeys = OPENSSL_calloc(ret->ssl_pkey_num, sizeof(CERT_PKEY));
  ------------------
  |  |  113|  7.36k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   77|  7.36k|    if (ret->pkeys == NULL) {
  ------------------
  |  Branch (77:9): [True: 0, False: 7.36k]
  ------------------
   78|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   79|      0|        return NULL;
   80|      0|    }
   81|       |
   82|  7.36k|    ret->key = &(ret->pkeys[SSL_PKEY_RSA]);
  ------------------
  |  |  327|  7.36k|#define SSL_PKEY_RSA 0
  ------------------
   83|  7.36k|    ret->sec_cb = ssl_security_default_callback;
   84|  7.36k|    ret->sec_level = OPENSSL_TLS_SECURITY_LEVEL;
  ------------------
  |  |   31|  7.36k|#define OPENSSL_TLS_SECURITY_LEVEL 2
  ------------------
   85|  7.36k|    ret->sec_ex = NULL;
   86|  7.36k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (86:9): [True: 0, False: 7.36k]
  ------------------
   87|      0|        OPENSSL_free(ret->pkeys);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   88|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   89|      0|        return NULL;
   90|      0|    }
   91|       |
   92|  7.36k|    return ret;
   93|  7.36k|}
ssl_cert_dup:
   96|  7.25k|{
   97|  7.25k|    CERT *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  7.25k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   98|  7.25k|    size_t i;
   99|       |#ifndef OPENSSL_NO_COMP_ALG
  100|       |    int j;
  101|       |#endif
  102|       |
  103|  7.25k|    if (ret == NULL)
  ------------------
  |  Branch (103:9): [True: 0, False: 7.25k]
  ------------------
  104|      0|        return NULL;
  105|       |
  106|  7.25k|    ret->ssl_pkey_num = cert->ssl_pkey_num;
  107|  7.25k|    ret->pkeys = OPENSSL_calloc(ret->ssl_pkey_num, sizeof(CERT_PKEY));
  ------------------
  |  |  113|  7.25k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  108|  7.25k|    if (ret->pkeys == NULL) {
  ------------------
  |  Branch (108:9): [True: 0, False: 7.25k]
  ------------------
  109|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  110|      0|        return NULL;
  111|      0|    }
  112|       |
  113|  7.25k|    ret->key = &ret->pkeys[cert->key - cert->pkeys];
  114|  7.25k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (114:9): [True: 0, False: 7.25k]
  ------------------
  115|      0|        OPENSSL_free(ret->pkeys);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  116|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  117|      0|        return NULL;
  118|      0|    }
  119|       |
  120|  7.25k|    if (cert->dh_tmp != NULL) {
  ------------------
  |  Branch (120:9): [True: 0, False: 7.25k]
  ------------------
  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|  7.25k|    ret->dh_tmp_cb = cert->dh_tmp_cb;
  127|  7.25k|    ret->dh_tmp_auto = cert->dh_tmp_auto;
  128|       |
  129|   101k|    for (i = 0; i < ret->ssl_pkey_num; i++) {
  ------------------
  |  Branch (129:17): [True: 94.3k, False: 7.25k]
  ------------------
  130|  94.3k|        CERT_PKEY *cpk = cert->pkeys + i;
  131|  94.3k|        CERT_PKEY *rpk = ret->pkeys + i;
  132|       |
  133|  94.3k|        if (cpk->x509 != NULL) {
  ------------------
  |  Branch (133:13): [True: 3.62k, False: 90.7k]
  ------------------
  134|  3.62k|            if (!X509_up_ref(cpk->x509))
  ------------------
  |  Branch (134:17): [True: 0, False: 3.62k]
  ------------------
  135|      0|                goto err;
  136|  3.62k|            rpk->x509 = cpk->x509;
  137|  3.62k|        }
  138|       |
  139|  94.3k|        if (cpk->privatekey != NULL) {
  ------------------
  |  Branch (139:13): [True: 3.62k, False: 90.7k]
  ------------------
  140|  3.62k|            if (!EVP_PKEY_up_ref(cpk->privatekey))
  ------------------
  |  Branch (140:17): [True: 0, False: 3.62k]
  ------------------
  141|      0|                goto err;
  142|  3.62k|            rpk->privatekey = cpk->privatekey;
  143|  3.62k|        }
  144|       |
  145|  94.3k|        if (cpk->chain) {
  ------------------
  |  Branch (145:13): [True: 0, False: 94.3k]
  ------------------
  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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  149|      0|                goto err;
  150|      0|            }
  151|      0|        }
  152|  94.3k|        if (cpk->serverinfo != NULL) {
  ------------------
  |  Branch (152:13): [True: 0, False: 94.3k]
  ------------------
  153|       |            /* Just copy everything. */
  154|      0|            rpk->serverinfo = OPENSSL_memdup(cpk->serverinfo, cpk->serverinfo_length);
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#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|  94.3k|    }
  169|       |
  170|       |    /* Configured sigalgs copied across */
  171|  7.25k|    if (cert->conf_sigalgs) {
  ------------------
  |  Branch (171:9): [True: 0, False: 7.25k]
  ------------------
  172|      0|        ret->conf_sigalgs = OPENSSL_malloc_array(cert->conf_sigalgslen,
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#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|  7.25k|        ret->conf_sigalgs = NULL;
  181|       |
  182|  7.25k|    if (cert->client_sigalgs) {
  ------------------
  |  Branch (182:9): [True: 0, False: 7.25k]
  ------------------
  183|      0|        ret->client_sigalgs = OPENSSL_malloc_array(cert->client_sigalgslen,
  ------------------
  |  |  111|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#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|  7.25k|        ret->client_sigalgs = NULL;
  192|       |    /* Copy any custom client certificate types */
  193|  7.25k|    if (cert->ctype) {
  ------------------
  |  Branch (193:9): [True: 0, False: 7.25k]
  ------------------
  194|      0|        ret->ctype = OPENSSL_memdup(cert->ctype, cert->ctype_len);
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#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|  7.25k|    ret->cert_flags = cert->cert_flags;
  201|       |
  202|  7.25k|    ret->cert_cb = cert->cert_cb;
  203|  7.25k|    ret->cert_cb_arg = cert->cert_cb_arg;
  204|       |
  205|  7.25k|    if (cert->verify_store) {
  ------------------
  |  Branch (205:9): [True: 0, False: 7.25k]
  ------------------
  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|  7.25k|    if (cert->chain_store) {
  ------------------
  |  Branch (211:9): [True: 0, False: 7.25k]
  ------------------
  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|  7.25k|    ret->sec_cb = cert->sec_cb;
  218|  7.25k|    ret->sec_level = cert->sec_level;
  219|  7.25k|    ret->sec_ex = cert->sec_ex;
  220|       |
  221|  7.25k|    if (!custom_exts_copy(&ret->custext, &cert->custext))
  ------------------
  |  Branch (221:9): [True: 0, False: 7.25k]
  ------------------
  222|      0|        goto err;
  223|  7.25k|#ifndef OPENSSL_NO_PSK
  224|  7.25k|    if (cert->psk_identity_hint) {
  ------------------
  |  Branch (224:9): [True: 0, False: 7.25k]
  ------------------
  225|      0|        ret->psk_identity_hint = OPENSSL_strdup(cert->psk_identity_hint);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#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|  7.25k|#endif
  230|  7.25k|    return ret;
  231|       |
  232|      0|err:
  233|      0|    ssl_cert_free(ret);
  234|       |
  235|       |    return NULL;
  236|  7.25k|}
ssl_cert_clear_certs:
  241|  14.6k|{
  242|  14.6k|    size_t i;
  243|       |#ifndef OPENSSL_NO_COMP_ALG
  244|       |    int j;
  245|       |#endif
  246|       |
  247|  14.6k|    if (c == NULL)
  ------------------
  |  Branch (247:9): [True: 0, False: 14.6k]
  ------------------
  248|      0|        return;
  249|   204k|    for (i = 0; i < c->ssl_pkey_num; i++) {
  ------------------
  |  Branch (249:17): [True: 190k, False: 14.6k]
  ------------------
  250|   190k|        CERT_PKEY *cpk = c->pkeys + i;
  251|   190k|        X509_free(cpk->x509);
  252|   190k|        cpk->x509 = NULL;
  253|   190k|        EVP_PKEY_free(cpk->privatekey);
  254|   190k|        cpk->privatekey = NULL;
  255|   190k|        OSSL_STACK_OF_X509_free(cpk->chain);
  256|   190k|        cpk->chain = NULL;
  257|   190k|        OPENSSL_free(cpk->serverinfo);
  ------------------
  |  |  132|   190k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  258|   190k|        cpk->serverinfo = NULL;
  259|   190k|        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|   190k|    }
  268|  14.6k|}
ssl_cert_free:
  271|  14.6k|{
  272|  14.6k|    int i;
  273|       |
  274|  14.6k|    if (c == NULL)
  ------------------
  |  Branch (274:9): [True: 0, False: 14.6k]
  ------------------
  275|      0|        return;
  276|  14.6k|    CRYPTO_DOWN_REF(&c->references, &i);
  277|  14.6k|    REF_PRINT_COUNT("CERT", i, c);
  ------------------
  |  |  301|  14.6k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  14.6k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  14.6k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  14.6k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  278|  14.6k|    if (i > 0)
  ------------------
  |  Branch (278:9): [True: 0, False: 14.6k]
  ------------------
  279|      0|        return;
  280|  14.6k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  14.6k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 14.6k]
  |  |  ------------------
  ------------------
  281|       |
  282|  14.6k|    EVP_PKEY_free(c->dh_tmp);
  283|       |
  284|  14.6k|    ssl_cert_clear_certs(c);
  285|  14.6k|    OPENSSL_free(c->conf_sigalgs);
  ------------------
  |  |  132|  14.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  286|  14.6k|    OPENSSL_free(c->client_sigalgs);
  ------------------
  |  |  132|  14.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  287|  14.6k|    OPENSSL_free(c->ctype);
  ------------------
  |  |  132|  14.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  288|  14.6k|    X509_STORE_free(c->verify_store);
  289|  14.6k|    X509_STORE_free(c->chain_store);
  290|  14.6k|    custom_exts_free(&c->custext);
  291|  14.6k|#ifndef OPENSSL_NO_PSK
  292|  14.6k|    OPENSSL_free(c->psk_identity_hint);
  ------------------
  |  |  132|  14.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  293|  14.6k|#endif
  294|  14.6k|    OPENSSL_free(c->pkeys);
  ------------------
  |  |  132|  14.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  295|  14.6k|    CRYPTO_FREE_REF(&c->references);
  296|  14.6k|    OPENSSL_free(c);
  ------------------
  |  |  132|  14.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  297|  14.6k|}
ssl_verify_cert_chain:
  575|  3.62k|{
  576|       |    return ssl_verify_internal(s, sk, NULL);
  577|  3.62k|}
SSL_get0_CA_list:
  631|  3.62k|{
  632|  3.62k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  3.62k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  3.62k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 3.62k]
  |  |  |  |  ------------------
  |  |  |  |   33|  3.62k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  3.62k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 3.62k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  3.62k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  3.62k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  633|       |
  634|  3.62k|    if (sc == NULL)
  ------------------
  |  Branch (634:9): [True: 0, False: 3.62k]
  ------------------
  635|      0|        return NULL;
  636|       |
  637|  3.62k|    return sc->ca_names != NULL ? sc->ca_names : s->ctx->ca_names;
  ------------------
  |  Branch (637:12): [True: 0, False: 3.62k]
  ------------------
  638|  3.62k|}
ssl_get_security_level_bits:
 1222|   994k|{
 1223|   994k|    int level;
 1224|       |    /*
 1225|       |     * note that there's a corresponding minbits_table
 1226|       |     * in crypto/x509/x509_vfy.c that's used for checking the security level
 1227|       |     * of RSA and DSA keys
 1228|       |     */
 1229|   994k|    static const int minbits_table[5 + 1] = { 0, 80, 112, 128, 192, 256 };
 1230|       |
 1231|   994k|    if (ctx != NULL)
  ------------------
  |  Branch (1231:9): [True: 3.73k, False: 990k]
  ------------------
 1232|  3.73k|        level = SSL_CTX_get_security_level(ctx);
 1233|   990k|    else
 1234|   990k|        level = SSL_get_security_level(s);
 1235|       |
 1236|   994k|    if (level > 5)
  ------------------
  |  Branch (1236:9): [True: 0, False: 994k]
  ------------------
 1237|      0|        level = 5;
 1238|   994k|    else if (level < 0)
  ------------------
  |  Branch (1238:14): [True: 0, False: 994k]
  ------------------
 1239|      0|        level = 0;
 1240|       |
 1241|   994k|    if (levelp != NULL)
  ------------------
  |  Branch (1241:9): [True: 994k, False: 0]
  ------------------
 1242|   994k|        *levelp = level;
 1243|       |
 1244|   994k|    return minbits_table[level];
 1245|   994k|}
ssl_security:
 1318|   990k|{
 1319|   990k|    return s->cert->sec_cb(SSL_CONNECTION_GET_USER_SSL(s), NULL, op, bits, nid,
  ------------------
  |  |   28|   990k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1320|   990k|        other, s->cert->sec_ex);
 1321|   990k|}
ssl_ctx_security:
 1324|  3.73k|{
 1325|       |    return ctx->cert->sec_cb(NULL, ctx, op, bits, nid, other,
 1326|  3.73k|        ctx->cert->sec_ex);
 1327|  3.73k|}
ssl_cert_lookup_by_nid:
 1330|  3.62k|{
 1331|  3.62k|    size_t i;
 1332|       |
 1333|  14.5k|    for (i = 0; i < OSSL_NELEM(ssl_cert_info); i++) {
  ------------------
  |  |   14|  14.5k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1333:17): [True: 14.5k, False: 0]
  ------------------
 1334|  14.5k|        if (ssl_cert_info[i].pkey_nid == nid) {
  ------------------
  |  Branch (1334:13): [True: 3.62k, False: 10.8k]
  ------------------
 1335|  3.62k|            *pidx = i;
 1336|  3.62k|            return 1;
 1337|  3.62k|        }
 1338|  14.5k|    }
 1339|      0|    for (i = 0; i < ctx->sigalg_list_len; i++) {
  ------------------
  |  Branch (1339:17): [True: 0, False: 0]
  ------------------
 1340|      0|        if (ctx->ssl_cert_info[i].pkey_nid == nid) {
  ------------------
  |  Branch (1340:13): [True: 0, False: 0]
  ------------------
 1341|      0|            *pidx = SSL_PKEY_NUM + i;
  ------------------
  |  |  336|      0|#define SSL_PKEY_NUM 9
  ------------------
 1342|      0|            return 1;
 1343|      0|        }
 1344|      0|    }
 1345|      0|    return 0;
 1346|      0|}
ssl_cert_lookup_by_pkey:
 1349|  14.7k|{
 1350|  14.7k|    size_t i;
 1351|       |
 1352|       |    /* check classic pk types */
 1353|  58.9k|    for (i = 0; i < OSSL_NELEM(ssl_cert_info); i++) {
  ------------------
  |  |   14|  58.9k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1353:17): [True: 58.9k, False: 0]
  ------------------
 1354|  58.9k|        const SSL_CERT_LOOKUP *tmp_lu = &ssl_cert_info[i];
 1355|       |
 1356|  58.9k|        if (EVP_PKEY_is_a(pk, OBJ_nid2sn(tmp_lu->pkey_nid))
  ------------------
  |  Branch (1356:13): [True: 14.7k, False: 44.1k]
  ------------------
 1357|  44.1k|            || EVP_PKEY_is_a(pk, OBJ_nid2ln(tmp_lu->pkey_nid))) {
  ------------------
  |  Branch (1357:16): [True: 0, False: 44.1k]
  ------------------
 1358|  14.7k|            if (pidx != NULL)
  ------------------
  |  Branch (1358:17): [True: 11.0k, False: 3.62k]
  ------------------
 1359|  11.0k|                *pidx = i;
 1360|  14.7k|            return tmp_lu;
 1361|  14.7k|        }
 1362|  58.9k|    }
 1363|       |    /* check provider-loaded pk types */
 1364|      0|    for (i = 0; i < ctx->sigalg_list_len; i++) {
  ------------------
  |  Branch (1364:17): [True: 0, False: 0]
  ------------------
 1365|      0|        SSL_CERT_LOOKUP *tmp_lu = &(ctx->ssl_cert_info[i]);
 1366|       |
 1367|      0|        if (EVP_PKEY_is_a(pk, OBJ_nid2sn(tmp_lu->pkey_nid))
  ------------------
  |  Branch (1367:13): [True: 0, False: 0]
  ------------------
 1368|      0|            || EVP_PKEY_is_a(pk, OBJ_nid2ln(tmp_lu->pkey_nid))) {
  ------------------
  |  Branch (1368:16): [True: 0, False: 0]
  ------------------
 1369|      0|            if (pidx != NULL)
  ------------------
  |  Branch (1369:17): [True: 0, False: 0]
  ------------------
 1370|      0|                *pidx = SSL_PKEY_NUM + i;
  ------------------
  |  |  336|      0|#define SSL_PKEY_NUM 9
  ------------------
 1371|      0|            return &ctx->ssl_cert_info[i];
 1372|      0|        }
 1373|      0|    }
 1374|       |
 1375|      0|    return NULL;
 1376|      0|}
ssl_cert_lookup_by_idx:
 1379|   736k|{
 1380|   736k|    if (idx >= (OSSL_NELEM(ssl_cert_info) + ctx->sigalg_list_len))
  ------------------
  |  |   14|   736k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1380:9): [True: 0, False: 736k]
  ------------------
 1381|      0|        return NULL;
 1382|   736k|    else if (idx >= (OSSL_NELEM(ssl_cert_info)))
  ------------------
  |  |   14|   736k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1382:14): [True: 58.0k, False: 678k]
  ------------------
 1383|  58.0k|        return &(ctx->ssl_cert_info[idx - SSL_PKEY_NUM]);
  ------------------
  |  |  336|  58.0k|#define SSL_PKEY_NUM 9
  ------------------
 1384|   678k|    return &ssl_cert_info[idx];
 1385|   736k|}
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,
  ------------------
  |  |  781|      1|    CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509_STORE_CTX, l, p, newf, dupf, freef)
  |  |  ------------------
  |  |  |  |  256|      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_verify_internal:
  428|  3.62k|{
  429|  3.62k|    X509 *x;
  430|  3.62k|    int i = 0;
  431|  3.62k|    X509_STORE *verify_store;
  432|  3.62k|    X509_STORE_CTX *ctx = NULL;
  433|  3.62k|    X509_VERIFY_PARAM *param;
  434|  3.62k|    SSL_CTX *sctx;
  435|  3.62k|#ifndef OPENSSL_NO_OCSP
  436|  3.62k|    SSL *ssl;
  437|  3.62k|#endif
  438|       |
  439|       |    /* Something must be passed in */
  440|  3.62k|    if ((sk == NULL || sk_X509_num(sk) == 0) && rpk == NULL)
  ------------------
  |  |   82|  3.62k|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
  |  Branch (440:10): [True: 0, False: 3.62k]
  |  Branch (440:24): [True: 0, False: 3.62k]
  |  Branch (440:49): [True: 0, False: 0]
  ------------------
  441|      0|        return 0;
  442|       |
  443|       |    /* Only one can be set */
  444|  3.62k|    if (sk != NULL && rpk != NULL)
  ------------------
  |  Branch (444:9): [True: 3.62k, False: 0]
  |  Branch (444:23): [True: 0, False: 3.62k]
  ------------------
  445|      0|        return 0;
  446|       |
  447|  3.62k|    sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  448|  3.62k|    if (s->cert->verify_store)
  ------------------
  |  Branch (448:9): [True: 0, False: 3.62k]
  ------------------
  449|      0|        verify_store = s->cert->verify_store;
  450|  3.62k|    else
  451|  3.62k|        verify_store = sctx->cert_store;
  452|       |
  453|  3.62k|    ctx = X509_STORE_CTX_new_ex(sctx->libctx, sctx->propq);
  454|  3.62k|    if (ctx == NULL) {
  ------------------
  |  Branch (454:9): [True: 0, False: 3.62k]
  ------------------
  455|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  456|      0|        return 0;
  457|      0|    }
  458|       |
  459|  3.62k|    if (sk != NULL) {
  ------------------
  |  Branch (459:9): [True: 3.62k, False: 0]
  ------------------
  460|  3.62k|        x = sk_X509_value(sk, 0);
  ------------------
  |  |   83|  3.62k|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
  461|  3.62k|        if (!X509_STORE_CTX_init(ctx, verify_store, x, sk)) {
  ------------------
  |  Branch (461:13): [True: 0, False: 3.62k]
  ------------------
  462|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  463|      0|            goto end;
  464|      0|        }
  465|  3.62k|    } else {
  466|      0|        if (!X509_STORE_CTX_init_rpk(ctx, verify_store, rpk)) {
  ------------------
  |  Branch (466:13): [True: 0, False: 0]
  ------------------
  467|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  468|      0|            goto end;
  469|      0|        }
  470|      0|    }
  471|  3.62k|    param = X509_STORE_CTX_get0_param(ctx);
  472|       |    /*
  473|       |     * XXX: Separate @AUTHSECLEVEL and @TLSSECLEVEL would be useful at some
  474|       |     * point, for now a single @SECLEVEL sets the same policy for TLS crypto
  475|       |     * and PKI authentication.
  476|       |     */
  477|  3.62k|    X509_VERIFY_PARAM_set_auth_level(param,
  478|  3.62k|        SSL_get_security_level(SSL_CONNECTION_GET_SSL(s)));
  ------------------
  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  479|       |
  480|       |    /* Set suite B flags if needed */
  481|  3.62k|    X509_STORE_CTX_set_flags(ctx, tls1_suiteb(s));
  ------------------
  |  | 2035|  3.62k|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  584|  3.62k|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  ------------------
  482|  3.62k|    if (!X509_STORE_CTX_set_ex_data(ctx,
  ------------------
  |  Branch (482:9): [True: 0, False: 3.62k]
  ------------------
  483|  3.62k|            SSL_get_ex_data_X509_STORE_CTX_idx(),
  484|  3.62k|            SSL_CONNECTION_GET_USER_SSL(s)))
  ------------------
  |  |   28|  3.62k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  485|      0|        goto end;
  486|       |
  487|       |    /* Verify via DANE if enabled */
  488|  3.62k|    if (DANETLS_ENABLED(&s->dane))
  ------------------
  |  |   80|  3.62k|    ((dane) != NULL && sk_danetls_record_num((dane)->trecs) > 0)
  |  |  ------------------
  |  |  |  Branch (80:6): [True: 3.62k, False: 0]
  |  |  |  Branch (80:24): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  489|      0|        X509_STORE_CTX_set0_dane(ctx, &s->dane);
  490|       |
  491|       |    /*
  492|       |     * Set OCSP Responses for verification:
  493|       |     * This function is called in the SERVER_CERTIFICATE message, in TLS 1.2
  494|       |     * the OCSP responses are sent in the CERT_STATUS message after that.
  495|       |     * Therefore the verification code currently only works in TLS 1.3.
  496|       |     */
  497|  3.62k|#ifndef OPENSSL_NO_OCSP
  498|  3.62k|    ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  499|       |    /*
  500|       |     * TODO(DTLS-1.3): in future DTLS should also be considered
  501|       |     */
  502|  3.62k|    if (!SSL_is_dtls(ssl) && SSL_version(ssl) >= TLS1_3_VERSION) {
  ------------------
  |  |   27|  3.62k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (502:9): [True: 3.62k, False: 0]
  |  Branch (502:30): [True: 3.62k, False: 0]
  ------------------
  503|       |        /* ignore status_request_v2 if TLS version < 1.3 */
  504|  3.62k|        int status = SSL_get_tlsext_status_type(ssl);
  ------------------
  |  |  317|  3.62k|    SSL_ctrl(ssl, SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE, 0, NULL)
  |  |  ------------------
  |  |  |  | 1407|  3.62k|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE 127
  |  |  ------------------
  ------------------
  505|       |
  506|  3.62k|        if (status == TLSEXT_STATUSTYPE_ocsp)
  ------------------
  |  |  181|  3.62k|#define TLSEXT_STATUSTYPE_ocsp 1
  ------------------
  |  Branch (506:13): [True: 0, False: 3.62k]
  ------------------
  507|      0|            X509_STORE_CTX_set_ocsp_resp(ctx, s->ext.ocsp.resp_ex);
  508|  3.62k|    }
  509|  3.62k|#endif
  510|       |
  511|       |    /*
  512|       |     * We need to inherit the verify parameters. These can be determined by
  513|       |     * the context: if its a server it will verify SSL client certificates or
  514|       |     * vice versa.
  515|       |     */
  516|       |
  517|  3.62k|    X509_STORE_CTX_set_default(ctx, s->server ? "ssl_client" : "ssl_server");
  ------------------
  |  Branch (517:37): [True: 0, False: 3.62k]
  ------------------
  518|       |    /*
  519|       |     * Anything non-default in "s->param" should overwrite anything in the ctx.
  520|       |     */
  521|  3.62k|    X509_VERIFY_PARAM_set1(param, s->param);
  522|       |
  523|  3.62k|    if (s->verify_callback)
  ------------------
  |  Branch (523:9): [True: 0, False: 3.62k]
  ------------------
  524|      0|        X509_STORE_CTX_set_verify_cb(ctx, s->verify_callback);
  525|       |
  526|  3.62k|    if (sctx->app_verify_callback != NULL) {
  ------------------
  |  Branch (526:9): [True: 0, False: 3.62k]
  ------------------
  527|      0|        i = sctx->app_verify_callback(ctx, sctx->app_verify_arg);
  528|  3.62k|    } else {
  529|  3.62k|        i = X509_verify_cert(ctx);
  530|       |        /* We treat an error in the same way as a failure to verify */
  531|  3.62k|        if (i < 0)
  ------------------
  |  Branch (531:13): [True: 0, False: 3.62k]
  ------------------
  532|      0|            i = 0;
  533|  3.62k|    }
  534|       |
  535|  3.62k|    s->verify_result = X509_STORE_CTX_get_error(ctx);
  536|  3.62k|    OSSL_STACK_OF_X509_free(s->verified_chain);
  537|  3.62k|    s->verified_chain = NULL;
  538|       |
  539|  3.62k|    if (sk != NULL && X509_STORE_CTX_get0_chain(ctx) != NULL) {
  ------------------
  |  Branch (539:9): [True: 3.62k, False: 0]
  |  Branch (539:23): [True: 3.62k, False: 0]
  ------------------
  540|  3.62k|        s->verified_chain = X509_STORE_CTX_get1_chain(ctx);
  541|  3.62k|        if (s->verified_chain == NULL) {
  ------------------
  |  Branch (541:13): [True: 0, False: 3.62k]
  ------------------
  542|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  543|      0|            i = 0;
  544|      0|        }
  545|  3.62k|    }
  546|       |
  547|       |    /* Move peername from the store context params to the SSL handle's */
  548|  3.62k|    X509_VERIFY_PARAM_move_peername(s->param, param);
  549|       |
  550|  3.62k|end:
  551|  3.62k|    X509_STORE_CTX_free(ctx);
  552|  3.62k|    return i;
  553|  3.62k|}
ssl_cert.c:ssl_security_default_callback:
 1250|   994k|{
 1251|   994k|    int level, minbits, pfs_mask;
 1252|   994k|    const SSL_CONNECTION *sc;
 1253|       |
 1254|   994k|    minbits = ssl_get_security_level_bits(s, ctx, &level);
 1255|       |
 1256|   994k|    if (level == 0) {
  ------------------
  |  Branch (1256:9): [True: 0, False: 994k]
  ------------------
 1257|       |        /*
 1258|       |         * No EDH keys weaker than 1024-bits even at level 0, otherwise,
 1259|       |         * anything goes.
 1260|       |         */
 1261|      0|        if (op == SSL_SECOP_TMP_DH && bits < 80)
  ------------------
  |  | 2766|      0|#define SSL_SECOP_TMP_DH (7 | SSL_SECOP_OTHER_PKEY)
  |  |  ------------------
  |  |  |  | 2733|      0|#define SSL_SECOP_OTHER_PKEY (4 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1261:13): [True: 0, False: 0]
  |  Branch (1261:39): [True: 0, False: 0]
  ------------------
 1262|      0|            return 0;
 1263|      0|        return 1;
 1264|      0|    }
 1265|   994k|    switch (op) {
 1266|   435k|    case SSL_SECOP_CIPHER_SUPPORTED:
  ------------------
  |  | 2754|   435k|#define SSL_SECOP_CIPHER_SUPPORTED (1 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2730|   435k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1266:5): [True: 435k, False: 558k]
  ------------------
 1267|   439k|    case SSL_SECOP_CIPHER_SHARED:
  ------------------
  |  | 2756|   439k|#define SSL_SECOP_CIPHER_SHARED (2 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2730|   439k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1267:5): [True: 3.62k, False: 990k]
  ------------------
 1268|   442k|    case SSL_SECOP_CIPHER_CHECK: {
  ------------------
  |  | 2758|   442k|#define SSL_SECOP_CIPHER_CHECK (3 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2730|   442k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1268:5): [True: 3.62k, False: 990k]
  ------------------
 1269|   442k|        const SSL_CIPHER *c = other;
 1270|       |        /* No ciphers below security level */
 1271|   442k|        if (bits < minbits)
  ------------------
  |  Branch (1271:13): [True: 0, False: 442k]
  ------------------
 1272|      0|            return 0;
 1273|       |        /* No unauthenticated ciphersuites */
 1274|   442k|        if (c->algorithm_auth & SSL_aNULL)
  ------------------
  |  |  116|   442k|#define SSL_aNULL 0x00000004U
  ------------------
  |  Branch (1274:13): [True: 0, False: 442k]
  ------------------
 1275|      0|            return 0;
 1276|       |        /* No MD5 mac ciphersuites */
 1277|   442k|        if (c->algorithm_mac & SSL_MD5)
  ------------------
  |  |  174|   442k|#define SSL_MD5 0x00000001U
  ------------------
  |  Branch (1277:13): [True: 0, False: 442k]
  ------------------
 1278|      0|            return 0;
 1279|       |        /* SHA1 HMAC is 160 bits of security */
 1280|   442k|        if (minbits > 160 && c->algorithm_mac & SSL_SHA1)
  ------------------
  |  |  175|      0|#define SSL_SHA1 0x00000002U
  ------------------
  |  Branch (1280:13): [True: 0, False: 442k]
  |  Branch (1280:30): [True: 0, False: 0]
  ------------------
 1281|      0|            return 0;
 1282|       |        /* Level 3: forward secure ciphersuites only */
 1283|   442k|        pfs_mask = SSL_kDHE | SSL_kECDHE | SSL_kDHEPSK | SSL_kECDHEPSK;
  ------------------
  |  |   87|   442k|#define SSL_kDHE 0x00000002U
  ------------------
                      pfs_mask = SSL_kDHE | SSL_kECDHE | SSL_kDHEPSK | SSL_kECDHEPSK;
  ------------------
  |  |   89|   442k|#define SSL_kECDHE 0x00000004U
  ------------------
                      pfs_mask = SSL_kDHE | SSL_kECDHE | SSL_kDHEPSK | SSL_kECDHEPSK;
  ------------------
  |  |   99|   442k|#define SSL_kDHEPSK 0x00000100U
  ------------------
                      pfs_mask = SSL_kDHE | SSL_kECDHE | SSL_kDHEPSK | SSL_kECDHEPSK;
  ------------------
  |  |   98|   442k|#define SSL_kECDHEPSK 0x00000080U
  ------------------
 1284|   442k|        if (level >= 3 && c->min_tls != TLS1_3_VERSION && !(c->algorithm_mkey & pfs_mask))
  ------------------
  |  |   27|   442k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1284:13): [True: 0, False: 442k]
  |  Branch (1284:27): [True: 0, False: 0]
  |  Branch (1284:59): [True: 0, False: 0]
  ------------------
 1285|      0|            return 0;
 1286|   442k|        break;
 1287|   442k|    }
 1288|   442k|    case SSL_SECOP_VERSION:
  ------------------
  |  | 2768|   119k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2729|   119k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (1288:5): [True: 119k, False: 874k]
  ------------------
 1289|   119k|        if ((sc = SSL_CONNECTION_FROM_CONST_SSL(s)) == NULL)
  ------------------
  |  |   41|   119k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|   119k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 119k]
  |  |  |  |  ------------------
  |  |  |  |   33|   119k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|   119k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 119k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|   119k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|   119k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  |  Branch (1289:13): [True: 0, False: 119k]
  ------------------
 1290|      0|            return 0;
 1291|   119k|        if (!SSL_CONNECTION_IS_DTLS(sc)) {
  ------------------
  |  |  266|   119k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|   119k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|   119k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (1291:13): [True: 119k, False: 0]
  ------------------
 1292|       |            /* SSLv3, TLS v1.0 and TLS v1.1 only allowed at level 0 */
 1293|   119k|            if (nid <= TLS1_1_VERSION && level > 0)
  ------------------
  |  |   25|   239k|#define TLS1_1_VERSION 0x0302
  ------------------
  |  Branch (1293:17): [True: 7.25k, False: 112k]
  |  Branch (1293:42): [True: 7.25k, False: 0]
  ------------------
 1294|  7.25k|                return 0;
 1295|   119k|        } else {
 1296|       |            /* DTLS v1.0 only allowed at level 0 */
 1297|      0|            if (DTLS_VERSION_LT(nid, DTLS1_2_VERSION) && level > 0)
  ------------------
  |  |   64|      0|#define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (64:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1297:58): [True: 0, False: 0]
  ------------------
 1298|      0|                return 0;
 1299|      0|        }
 1300|   112k|        break;
 1301|       |
 1302|   112k|    case SSL_SECOP_COMPRESSION:
  ------------------
  |  | 2780|      0|#define SSL_SECOP_COMPRESSION (15 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2729|      0|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (1302:5): [True: 0, False: 994k]
  ------------------
 1303|      0|        if (level >= 2)
  ------------------
  |  Branch (1303:13): [True: 0, False: 0]
  ------------------
 1304|      0|            return 0;
 1305|      0|        break;
 1306|      0|    case SSL_SECOP_TICKET:
  ------------------
  |  | 2770|      0|#define SSL_SECOP_TICKET (10 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2729|      0|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (1306:5): [True: 0, False: 994k]
  ------------------
 1307|      0|        if (level >= 3)
  ------------------
  |  Branch (1307:13): [True: 0, False: 0]
  ------------------
 1308|      0|            return 0;
 1309|      0|        break;
 1310|   431k|    default:
  ------------------
  |  Branch (1310:5): [True: 431k, False: 562k]
  ------------------
 1311|   431k|        if (bits < minbits)
  ------------------
  |  Branch (1311:13): [True: 10.8k, False: 421k]
  ------------------
 1312|  10.8k|            return 0;
 1313|   994k|    }
 1314|   976k|    return 1;
 1315|   994k|}

ssl_load_ciphers:
  278|  7.36k|{
  279|  7.36k|    size_t i;
  280|  7.36k|    const ssl_cipher_table *t;
  281|  7.36k|    EVP_KEYEXCH *kex = NULL;
  282|  7.36k|    EVP_SIGNATURE *sig = NULL;
  283|       |
  284|  7.36k|    ctx->disabled_enc_mask = 0;
  285|   198k|    for (i = 0, t = ssl_cipher_table_cipher; i < SSL_ENC_NUM_IDX; i++, t++) {
  ------------------
  |  |  364|   198k|#define SSL_ENC_NUM_IDX 26
  ------------------
  |  Branch (285:46): [True: 191k, False: 7.36k]
  ------------------
  286|   191k|        if (t->nid != NID_undef) {
  ------------------
  |  |   18|   191k|#define NID_undef                       0
  ------------------
  |  Branch (286:13): [True: 184k, False: 7.36k]
  ------------------
  287|   184k|            const EVP_CIPHER *cipher = ssl_evp_cipher_fetch(ctx->libctx,
  288|   184k|                OBJ_nid2sn(t->nid),
  289|   184k|                ctx->propq);
  290|       |
  291|   184k|            ctx->ssl_cipher_methods[i] = cipher;
  292|   184k|            if (cipher == NULL)
  ------------------
  |  Branch (292:17): [True: 66.2k, False: 117k]
  ------------------
  293|  66.2k|                ctx->disabled_enc_mask |= t->mask;
  294|   184k|        }
  295|   191k|    }
  296|  7.36k|    ctx->disabled_mac_mask = 0;
  297|   117k|    for (i = 0, t = ssl_cipher_table_mac; i < SSL_MD_NUM_IDX; i++, t++) {
  ------------------
  |  |  210|   117k|#define SSL_MD_NUM_IDX SSL_MAX_DIGEST
  |  |  ------------------
  |  |  |  |  208|   117k|#define SSL_MAX_DIGEST 15
  |  |  ------------------
  ------------------
  |  Branch (297:43): [True: 110k, False: 7.36k]
  ------------------
  298|       |        /*
  299|       |         * We ignore any errors from the fetch below. It is expected to fail
  300|       |         * if these algorithms are not available.
  301|       |         */
  302|   110k|        ERR_set_mark();
  303|   110k|        const EVP_MD *md = EVP_MD_fetch(ctx->libctx,
  304|   110k|            OBJ_nid2sn(t->nid),
  305|   110k|            ctx->propq);
  306|   110k|        ERR_pop_to_mark();
  307|       |
  308|   110k|        ctx->ssl_digest_methods[i] = md;
  309|   110k|        if (md == NULL) {
  ------------------
  |  Branch (309:13): [True: 51.5k, False: 58.9k]
  ------------------
  310|  51.5k|            ctx->disabled_mac_mask |= t->mask;
  311|  58.9k|        } else {
  312|  58.9k|            int tmpsize = EVP_MD_get_size(md);
  313|       |
  314|  58.9k|            if (!ossl_assert(tmpsize > 0))
  ------------------
  |  |   52|  58.9k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  58.9k|    __FILE__, __LINE__)
  ------------------
  |  Branch (314:17): [True: 0, False: 58.9k]
  ------------------
  315|      0|                return 0;
  316|  58.9k|            ctx->ssl_mac_secret_size[i] = tmpsize;
  317|  58.9k|        }
  318|   110k|    }
  319|       |
  320|  7.36k|    ctx->disabled_mkey_mask = 0;
  321|  7.36k|    ctx->disabled_auth_mask = 0;
  322|       |
  323|       |    /*
  324|       |     * We ignore any errors from the fetches below. They are expected to fail
  325|       |     * if these algorithms are not available.
  326|       |     */
  327|  7.36k|    ERR_set_mark();
  328|  7.36k|    sig = EVP_SIGNATURE_fetch(ctx->libctx, "DSA", ctx->propq);
  329|  7.36k|    if (sig == NULL)
  ------------------
  |  Branch (329:9): [True: 0, False: 7.36k]
  ------------------
  330|      0|        ctx->disabled_auth_mask |= SSL_aDSS;
  ------------------
  |  |  114|      0|#define SSL_aDSS 0x00000002U
  ------------------
  331|  7.36k|    else
  332|  7.36k|        EVP_SIGNATURE_free(sig);
  333|  7.36k|    kex = EVP_KEYEXCH_fetch(ctx->libctx, "DH", ctx->propq);
  334|  7.36k|    if (kex == NULL)
  ------------------
  |  Branch (334:9): [True: 0, False: 7.36k]
  ------------------
  335|      0|        ctx->disabled_mkey_mask |= SSL_kDHE | SSL_kDHEPSK;
  ------------------
  |  |   87|      0|#define SSL_kDHE 0x00000002U
  ------------------
                      ctx->disabled_mkey_mask |= SSL_kDHE | SSL_kDHEPSK;
  ------------------
  |  |   99|      0|#define SSL_kDHEPSK 0x00000100U
  ------------------
  336|  7.36k|    else
  337|  7.36k|        EVP_KEYEXCH_free(kex);
  338|  7.36k|    kex = EVP_KEYEXCH_fetch(ctx->libctx, "ECDH", ctx->propq);
  339|  7.36k|    if (kex == NULL)
  ------------------
  |  Branch (339:9): [True: 0, False: 7.36k]
  ------------------
  340|      0|        ctx->disabled_mkey_mask |= SSL_kECDHE | SSL_kECDHEPSK;
  ------------------
  |  |   89|      0|#define SSL_kECDHE 0x00000004U
  ------------------
                      ctx->disabled_mkey_mask |= SSL_kECDHE | SSL_kECDHEPSK;
  ------------------
  |  |   98|      0|#define SSL_kECDHEPSK 0x00000080U
  ------------------
  341|  7.36k|    else
  342|  7.36k|        EVP_KEYEXCH_free(kex);
  343|  7.36k|    sig = EVP_SIGNATURE_fetch(ctx->libctx, "ECDSA", ctx->propq);
  344|  7.36k|    if (sig == NULL)
  ------------------
  |  Branch (344:9): [True: 0, False: 7.36k]
  ------------------
  345|      0|        ctx->disabled_auth_mask |= SSL_aECDSA;
  ------------------
  |  |  118|      0|#define SSL_aECDSA 0x00000008U
  ------------------
  346|  7.36k|    else
  347|  7.36k|        EVP_SIGNATURE_free(sig);
  348|  7.36k|    ERR_pop_to_mark();
  349|       |
  350|       |#ifdef OPENSSL_NO_PSK
  351|       |    ctx->disabled_mkey_mask |= SSL_PSK;
  352|       |    ctx->disabled_auth_mask |= SSL_aPSK;
  353|       |#endif
  354|       |#ifdef OPENSSL_NO_SRP
  355|       |    ctx->disabled_mkey_mask |= SSL_kSRP;
  356|       |#endif
  357|       |
  358|       |    /*
  359|       |     * Check for presence of GOST 34.10 algorithms, and if they are not
  360|       |     * present, disable appropriate auth and key exchange
  361|       |     */
  362|  7.36k|    memcpy(ctx->ssl_mac_pkey_id, default_mac_pkey_id,
  363|  7.36k|        sizeof(ctx->ssl_mac_pkey_id));
  364|       |
  365|  7.36k|    ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC_IDX] = 0;
  ------------------
  |  |  196|  7.36k|#define SSL_MD_GOST89MAC_IDX 3
  ------------------
  366|  7.36k|    if (ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC_IDX])
  ------------------
  |  |  196|  7.36k|#define SSL_MD_GOST89MAC_IDX 3
  ------------------
  |  Branch (366:9): [True: 0, False: 7.36k]
  ------------------
  367|      0|        ctx->ssl_mac_secret_size[SSL_MD_GOST89MAC_IDX] = 32;
  ------------------
  |  |  196|      0|#define SSL_MD_GOST89MAC_IDX 3
  ------------------
  368|  7.36k|    else
  369|  7.36k|        ctx->disabled_mac_mask |= SSL_GOST89MAC;
  ------------------
  |  |  177|  7.36k|#define SSL_GOST89MAC 0x00000008U
  ------------------
  370|       |
  371|  7.36k|    ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC12_IDX] = 0;
  ------------------
  |  |  200|  7.36k|#define SSL_MD_GOST89MAC12_IDX 7
  ------------------
  372|  7.36k|    if (ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC12_IDX])
  ------------------
  |  |  200|  7.36k|#define SSL_MD_GOST89MAC12_IDX 7
  ------------------
  |  Branch (372:9): [True: 0, False: 7.36k]
  ------------------
  373|      0|        ctx->ssl_mac_secret_size[SSL_MD_GOST89MAC12_IDX] = 32;
  ------------------
  |  |  200|      0|#define SSL_MD_GOST89MAC12_IDX 7
  ------------------
  374|  7.36k|    else
  375|  7.36k|        ctx->disabled_mac_mask |= SSL_GOST89MAC12;
  ------------------
  |  |  183|  7.36k|#define SSL_GOST89MAC12 0x00000100U
  ------------------
  376|       |
  377|  7.36k|    ctx->ssl_mac_pkey_id[SSL_MD_MAGMAOMAC_IDX] = 0;
  ------------------
  |  |  205|  7.36k|#define SSL_MD_MAGMAOMAC_IDX 12
  ------------------
  378|  7.36k|    if (ctx->ssl_mac_pkey_id[SSL_MD_MAGMAOMAC_IDX])
  ------------------
  |  |  205|  7.36k|#define SSL_MD_MAGMAOMAC_IDX 12
  ------------------
  |  Branch (378:9): [True: 0, False: 7.36k]
  ------------------
  379|      0|        ctx->ssl_mac_secret_size[SSL_MD_MAGMAOMAC_IDX] = 32;
  ------------------
  |  |  205|      0|#define SSL_MD_MAGMAOMAC_IDX 12
  ------------------
  380|  7.36k|    else
  381|  7.36k|        ctx->disabled_mac_mask |= SSL_MAGMAOMAC;
  ------------------
  |  |  185|  7.36k|#define SSL_MAGMAOMAC 0x00000400U
  ------------------
  382|       |
  383|  7.36k|    ctx->ssl_mac_pkey_id[SSL_MD_KUZNYECHIKOMAC_IDX] = 0;
  ------------------
  |  |  206|  7.36k|#define SSL_MD_KUZNYECHIKOMAC_IDX 13
  ------------------
  384|  7.36k|    if (ctx->ssl_mac_pkey_id[SSL_MD_KUZNYECHIKOMAC_IDX])
  ------------------
  |  |  206|  7.36k|#define SSL_MD_KUZNYECHIKOMAC_IDX 13
  ------------------
  |  Branch (384:9): [True: 0, False: 7.36k]
  ------------------
  385|      0|        ctx->ssl_mac_secret_size[SSL_MD_KUZNYECHIKOMAC_IDX] = 32;
  ------------------
  |  |  206|      0|#define SSL_MD_KUZNYECHIKOMAC_IDX 13
  ------------------
  386|  7.36k|    else
  387|  7.36k|        ctx->disabled_mac_mask |= SSL_KUZNYECHIKOMAC;
  ------------------
  |  |  186|  7.36k|#define SSL_KUZNYECHIKOMAC 0x00000800U
  ------------------
  388|       |
  389|  7.36k|    ctx->disabled_auth_mask |= SSL_aGOST01 | SSL_aGOST12;
  ------------------
  |  |  122|  7.36k|#define SSL_aGOST01 0x00000020U
  ------------------
                  ctx->disabled_auth_mask |= SSL_aGOST01 | SSL_aGOST12;
  ------------------
  |  |  126|  7.36k|#define SSL_aGOST12 0x00000080U
  ------------------
  390|  7.36k|    ctx->disabled_auth_mask |= SSL_aGOST12;
  ------------------
  |  |  126|  7.36k|#define SSL_aGOST12 0x00000080U
  ------------------
  391|  7.36k|    ctx->disabled_auth_mask |= SSL_aGOST12;
  ------------------
  |  |  126|  7.36k|#define SSL_aGOST12 0x00000080U
  ------------------
  392|       |    /*
  393|       |     * Disable GOST key exchange if no GOST signature algs are available *
  394|       |     */
  395|  7.36k|    if ((ctx->disabled_auth_mask & (SSL_aGOST01 | SSL_aGOST12)) == (SSL_aGOST01 | SSL_aGOST12))
  ------------------
  |  |  122|  7.36k|#define SSL_aGOST01 0x00000020U
  ------------------
                  if ((ctx->disabled_auth_mask & (SSL_aGOST01 | SSL_aGOST12)) == (SSL_aGOST01 | SSL_aGOST12))
  ------------------
  |  |  126|  7.36k|#define SSL_aGOST12 0x00000080U
  ------------------
                  if ((ctx->disabled_auth_mask & (SSL_aGOST01 | SSL_aGOST12)) == (SSL_aGOST01 | SSL_aGOST12))
  ------------------
  |  |  122|  7.36k|#define SSL_aGOST01 0x00000020U
  ------------------
                  if ((ctx->disabled_auth_mask & (SSL_aGOST01 | SSL_aGOST12)) == (SSL_aGOST01 | SSL_aGOST12))
  ------------------
  |  |  126|  7.36k|#define SSL_aGOST12 0x00000080U
  ------------------
  |  Branch (395:9): [True: 7.36k, False: 0]
  ------------------
  396|  7.36k|        ctx->disabled_mkey_mask |= SSL_kGOST;
  ------------------
  |  |   93|  7.36k|#define SSL_kGOST 0x00000010U
  ------------------
  397|       |
  398|  7.36k|    if ((ctx->disabled_auth_mask & SSL_aGOST12) == SSL_aGOST12)
  ------------------
  |  |  126|  7.36k|#define SSL_aGOST12 0x00000080U
  ------------------
                  if ((ctx->disabled_auth_mask & SSL_aGOST12) == SSL_aGOST12)
  ------------------
  |  |  126|  7.36k|#define SSL_aGOST12 0x00000080U
  ------------------
  |  Branch (398:9): [True: 7.36k, False: 0]
  ------------------
  399|  7.36k|        ctx->disabled_mkey_mask |= SSL_kGOST18;
  ------------------
  |  |  101|  7.36k|#define SSL_kGOST18 0x00000200U
  ------------------
  400|       |
  401|  7.36k|    return 1;
  402|  7.36k|}
ssl_cipher_get_evp_cipher:
  406|  7.25k|{
  407|  7.25k|    int i = ssl_cipher_info_lookup(ssl_cipher_table_cipher,
  ------------------
  |  |  128|  7.25k|    ssl_cipher_info_find(table, OSSL_NELEM(table), x)
  |  |  ------------------
  |  |  |  |   14|  7.25k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
  408|  7.25k|        sslc->algorithm_enc);
  409|       |
  410|  7.25k|    if (i == -1) {
  ------------------
  |  Branch (410:9): [True: 0, False: 7.25k]
  ------------------
  411|      0|        *enc = NULL;
  412|  7.25k|    } else {
  413|  7.25k|        if (i == SSL_ENC_NULL_IDX) {
  ------------------
  |  |  343|  7.25k|#define SSL_ENC_NULL_IDX 5
  ------------------
  |  Branch (413:13): [True: 0, False: 7.25k]
  ------------------
  414|       |            /*
  415|       |             * This does not need any special handling. Use EVP_CIPHER_fetch()
  416|       |             * directly.
  417|       |             */
  418|      0|            *enc = EVP_CIPHER_fetch(ctx->libctx, "NULL", ctx->propq);
  419|      0|            if (*enc == NULL)
  ------------------
  |  Branch (419:17): [True: 0, False: 0]
  ------------------
  420|      0|                return 0;
  421|  7.25k|        } else {
  422|  7.25k|            const EVP_CIPHER *cipher = ctx->ssl_cipher_methods[i];
  423|       |
  424|  7.25k|            if (cipher == NULL
  ------------------
  |  Branch (424:17): [True: 0, False: 7.25k]
  ------------------
  425|  7.25k|                || !ssl_evp_cipher_up_ref(cipher))
  ------------------
  |  Branch (425:20): [True: 0, False: 7.25k]
  ------------------
  426|      0|                return 0;
  427|  7.25k|            *enc = ctx->ssl_cipher_methods[i];
  428|  7.25k|        }
  429|  7.25k|    }
  430|  7.25k|    return 1;
  431|  7.25k|}
ssl_cipher_get_evp_md_mac:
  436|  7.25k|{
  437|  7.25k|    int i = ssl_cipher_info_lookup(ssl_cipher_table_mac, sslc->algorithm_mac);
  ------------------
  |  |  128|  7.25k|    ssl_cipher_info_find(table, OSSL_NELEM(table), x)
  |  |  ------------------
  |  |  |  |   14|  7.25k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
  438|       |
  439|  7.25k|    if (i == -1) {
  ------------------
  |  Branch (439:9): [True: 7.25k, False: 0]
  ------------------
  440|  7.25k|        *md = NULL;
  441|  7.25k|        if (mac_pkey_type != NULL)
  ------------------
  |  Branch (441:13): [True: 7.25k, False: 0]
  ------------------
  442|  7.25k|            *mac_pkey_type = NID_undef;
  ------------------
  |  |   18|  7.25k|#define NID_undef                       0
  ------------------
  443|  7.25k|        if (mac_secret_size != NULL)
  ------------------
  |  Branch (443:13): [True: 7.25k, False: 0]
  ------------------
  444|  7.25k|            *mac_secret_size = 0;
  445|  7.25k|    } else {
  446|      0|        const EVP_MD *digest = ctx->ssl_digest_methods[i];
  447|       |
  448|      0|        if (digest == NULL || !ssl_evp_md_up_ref(digest))
  ------------------
  |  Branch (448:13): [True: 0, False: 0]
  |  Branch (448:31): [True: 0, False: 0]
  ------------------
  449|      0|            return 0;
  450|       |
  451|      0|        *md = digest;
  452|      0|        if (mac_pkey_type != NULL)
  ------------------
  |  Branch (452:13): [True: 0, False: 0]
  ------------------
  453|      0|            *mac_pkey_type = ctx->ssl_mac_pkey_id[i];
  454|      0|        if (mac_secret_size != NULL)
  ------------------
  |  Branch (454:13): [True: 0, False: 0]
  ------------------
  455|      0|            *mac_secret_size = ctx->ssl_mac_secret_size[i];
  456|      0|    }
  457|  7.25k|    return 1;
  458|  7.25k|}
ssl_cipher_get_evp:
  464|  7.25k|{
  465|  7.25k|    int i;
  466|  7.25k|    const SSL_CIPHER *c;
  467|       |
  468|  7.25k|    c = s->cipher;
  469|  7.25k|    if (c == NULL)
  ------------------
  |  Branch (469:9): [True: 0, False: 7.25k]
  ------------------
  470|      0|        return 0;
  471|  7.25k|    if (comp != NULL) {
  ------------------
  |  Branch (471:9): [True: 0, False: 7.25k]
  ------------------
  472|      0|        SSL_COMP ctmp;
  473|      0|        STACK_OF(SSL_COMP) *comp_methods;
  ------------------
  |  |   33|      0|#define STACK_OF(type) struct stack_st_##type
  ------------------
  474|       |
  475|      0|        *comp = NULL;
  476|      0|        ctmp.id = s->compress_meth;
  477|      0|        comp_methods = SSL_COMP_get_compression_methods();
  478|      0|        if (comp_methods != NULL) {
  ------------------
  |  Branch (478:13): [True: 0, False: 0]
  ------------------
  479|      0|            i = sk_SSL_COMP_find(comp_methods, &ctmp);
  ------------------
  |  |   87|      0|#define sk_SSL_COMP_find(sk, ptr) OPENSSL_sk_find(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
  ------------------
  480|      0|            if (i >= 0)
  ------------------
  |  Branch (480:17): [True: 0, False: 0]
  ------------------
  481|      0|                *comp = sk_SSL_COMP_value(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)))
  ------------------
  482|      0|        }
  483|       |        /* If were only interested in comp then return success */
  484|      0|        if ((enc == NULL) && (md == NULL))
  ------------------
  |  Branch (484:13): [True: 0, False: 0]
  |  Branch (484:30): [True: 0, False: 0]
  ------------------
  485|      0|            return 1;
  486|      0|    }
  487|       |
  488|  7.25k|    if ((enc == NULL) || (md == NULL))
  ------------------
  |  Branch (488:9): [True: 0, False: 7.25k]
  |  Branch (488:26): [True: 0, False: 7.25k]
  ------------------
  489|      0|        return 0;
  490|       |
  491|  7.25k|    if (!ssl_cipher_get_evp_cipher(ctx, c, enc))
  ------------------
  |  Branch (491:9): [True: 0, False: 7.25k]
  ------------------
  492|      0|        return 0;
  493|       |
  494|  7.25k|    if (!ssl_cipher_get_evp_md_mac(ctx, c, md, mac_pkey_type,
  ------------------
  |  Branch (494:9): [True: 0, False: 7.25k]
  ------------------
  495|  7.25k|            mac_secret_size)) {
  496|      0|        ssl_evp_cipher_free(*enc);
  497|      0|        return 0;
  498|      0|    }
  499|       |
  500|  7.25k|    if ((*enc != NULL)
  ------------------
  |  Branch (500:9): [True: 7.25k, False: 0]
  ------------------
  501|  7.25k|        && (*md != NULL
  ------------------
  |  Branch (501:13): [True: 0, False: 7.25k]
  ------------------
  502|  7.25k|            || (EVP_CIPHER_get_flags(*enc) & EVP_CIPH_FLAG_AEAD_CIPHER))
  ------------------
  |  |  256|  7.25k|#define EVP_CIPH_FLAG_AEAD_CIPHER 0x200000
  ------------------
  |  Branch (502:16): [True: 7.25k, False: 0]
  ------------------
  503|  7.25k|        && (c->algorithm_mac == SSL_AEAD
  ------------------
  |  |  181|  14.5k|#define SSL_AEAD 0x00000040U
  ------------------
  |  Branch (503:13): [True: 7.25k, False: 0]
  ------------------
  504|  7.25k|            || mac_pkey_type == NULL || *mac_pkey_type != NID_undef)) {
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (504:16): [True: 0, False: 0]
  |  Branch (504:41): [True: 0, False: 0]
  ------------------
  505|  7.25k|        const EVP_CIPHER *evp = NULL;
  506|       |
  507|  7.25k|        if (use_etm
  ------------------
  |  Branch (507:13): [True: 0, False: 7.25k]
  ------------------
  508|  7.25k|            || s->ssl_version >> 8 != TLS1_VERSION_MAJOR
  ------------------
  |  |   42|  14.5k|#define TLS1_VERSION_MAJOR 0x03
  ------------------
  |  Branch (508:16): [True: 0, False: 7.25k]
  ------------------
  509|  7.25k|            || s->ssl_version < TLS1_VERSION)
  ------------------
  |  |   24|  7.25k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (509:16): [True: 0, False: 7.25k]
  ------------------
  510|      0|            return 1;
  511|       |
  512|  7.25k|        if (c->algorithm_enc == SSL_RC4
  ------------------
  |  |  136|  14.5k|#define SSL_RC4 0x00000004U
  ------------------
  |  Branch (512:13): [True: 0, False: 7.25k]
  ------------------
  513|      0|            && c->algorithm_mac == SSL_MD5)
  ------------------
  |  |  174|      0|#define SSL_MD5 0x00000001U
  ------------------
  |  Branch (513:16): [True: 0, False: 0]
  ------------------
  514|      0|            evp = ssl_evp_cipher_fetch(ctx->libctx,
  515|      0|                "RC4-HMAC-MD5",
  516|      0|                ctx->propq);
  517|  7.25k|        else if (c->algorithm_enc == SSL_AES128
  ------------------
  |  |  140|  14.5k|#define SSL_AES128 0x00000040U
  ------------------
  |  Branch (517:18): [True: 0, False: 7.25k]
  ------------------
  518|      0|            && c->algorithm_mac == SSL_SHA1)
  ------------------
  |  |  175|      0|#define SSL_SHA1 0x00000002U
  ------------------
  |  Branch (518:16): [True: 0, False: 0]
  ------------------
  519|      0|            evp = ssl_evp_cipher_fetch(ctx->libctx,
  520|      0|                "AES-128-CBC-HMAC-SHA1",
  521|      0|                ctx->propq);
  522|  7.25k|        else if (c->algorithm_enc == SSL_AES256
  ------------------
  |  |  141|  14.5k|#define SSL_AES256 0x00000080U
  ------------------
  |  Branch (522:18): [True: 0, False: 7.25k]
  ------------------
  523|      0|            && c->algorithm_mac == SSL_SHA1)
  ------------------
  |  |  175|      0|#define SSL_SHA1 0x00000002U
  ------------------
  |  Branch (523:16): [True: 0, False: 0]
  ------------------
  524|      0|            evp = ssl_evp_cipher_fetch(ctx->libctx,
  525|      0|                "AES-256-CBC-HMAC-SHA1",
  526|      0|                ctx->propq);
  527|  7.25k|        else if (c->algorithm_enc == SSL_AES128
  ------------------
  |  |  140|  14.5k|#define SSL_AES128 0x00000040U
  ------------------
  |  Branch (527:18): [True: 0, False: 7.25k]
  ------------------
  528|      0|            && c->algorithm_mac == SSL_SHA256)
  ------------------
  |  |  178|      0|#define SSL_SHA256 0x00000010U
  ------------------
  |  Branch (528:16): [True: 0, False: 0]
  ------------------
  529|      0|            evp = ssl_evp_cipher_fetch(ctx->libctx,
  530|      0|                "AES-128-CBC-HMAC-SHA256",
  531|      0|                ctx->propq);
  532|  7.25k|        else if (c->algorithm_enc == SSL_AES256
  ------------------
  |  |  141|  14.5k|#define SSL_AES256 0x00000080U
  ------------------
  |  Branch (532:18): [True: 0, False: 7.25k]
  ------------------
  533|      0|            && c->algorithm_mac == SSL_SHA256)
  ------------------
  |  |  178|      0|#define SSL_SHA256 0x00000010U
  ------------------
  |  Branch (533:16): [True: 0, False: 0]
  ------------------
  534|      0|            evp = ssl_evp_cipher_fetch(ctx->libctx,
  535|      0|                "AES-256-CBC-HMAC-SHA256",
  536|      0|                ctx->propq);
  537|       |
  538|  7.25k|        if (evp != NULL) {
  ------------------
  |  Branch (538:13): [True: 0, False: 7.25k]
  ------------------
  539|      0|            ssl_evp_cipher_free(*enc);
  540|      0|            ssl_evp_md_free(*md);
  541|      0|            *enc = evp;
  542|      0|            *md = NULL;
  543|      0|        }
  544|  7.25k|        return 1;
  545|  7.25k|    }
  546|       |
  547|      0|    return 0;
  548|  7.25k|}
ssl_md:
  551|   409k|{
  552|   409k|    idx &= SSL_HANDSHAKE_MAC_MASK;
  ------------------
  |  |  215|   409k|#define SSL_HANDSHAKE_MAC_MASK 0xFF
  ------------------
  553|   409k|    if (idx < 0 || idx >= SSL_MD_NUM_IDX)
  ------------------
  |  |  210|   409k|#define SSL_MD_NUM_IDX SSL_MAX_DIGEST
  |  |  ------------------
  |  |  |  |  208|   409k|#define SSL_MAX_DIGEST 15
  |  |  ------------------
  ------------------
  |  Branch (553:9): [True: 0, False: 409k]
  |  Branch (553:20): [True: 0, False: 409k]
  ------------------
  554|      0|        return NULL;
  555|   409k|    return ctx->ssl_digest_methods[idx];
  556|   409k|}
ssl_handshake_md:
  559|   130k|{
  560|   130k|    return ssl_md(SSL_CONNECTION_GET_CTX(s), ssl_get_algorithm2(s));
  ------------------
  |  |   26|   130k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  561|   130k|}
SSL_CTX_set_ciphersuites:
 1352|  7.36k|{
 1353|  7.36k|    int ret = set_ciphersuites(&(ctx->tls13_ciphersuites), str);
 1354|       |
 1355|  7.36k|    if (ret && ctx->cipher_list != NULL)
  ------------------
  |  Branch (1355:9): [True: 7.36k, False: 0]
  |  Branch (1355:16): [True: 0, False: 7.36k]
  ------------------
 1356|      0|        return update_cipher_list(ctx, &ctx->cipher_list, &ctx->cipher_list_by_id,
 1357|      0|            ctx->tls13_ciphersuites);
 1358|       |
 1359|  7.36k|    return ret;
 1360|  7.36k|}
ssl_create_cipher_list:
 1391|  7.36k|{
 1392|  7.36k|    int ok, num_of_ciphers, num_of_alias_max, num_of_group_aliases, i;
 1393|  7.36k|    uint32_t disabled_mkey, disabled_auth, disabled_enc, disabled_mac;
 1394|  7.36k|    STACK_OF(SSL_CIPHER) *cipherstack;
  ------------------
  |  |   33|  7.36k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1395|  7.36k|    const char *rule_p;
 1396|  7.36k|    CIPHER_ORDER *co_list = NULL, *head = NULL, *tail = NULL, *curr;
 1397|  7.36k|    const SSL_CIPHER **ca_list = NULL;
 1398|  7.36k|    const SSL_METHOD *ssl_method = ctx->method;
 1399|       |
 1400|       |    /*
 1401|       |     * Return with error if nothing to do.
 1402|       |     */
 1403|  7.36k|    if (rule_str == NULL || cipher_list == NULL || cipher_list_by_id == NULL)
  ------------------
  |  Branch (1403:9): [True: 0, False: 7.36k]
  |  Branch (1403:29): [True: 0, False: 7.36k]
  |  Branch (1403:52): [True: 0, False: 7.36k]
  ------------------
 1404|      0|        return NULL;
 1405|       |
 1406|  7.36k|    if (!check_suiteb_cipher_list(ssl_method, c, &rule_str))
  ------------------
  |  Branch (1406:9): [True: 0, False: 7.36k]
  ------------------
 1407|      0|        return NULL;
 1408|       |
 1409|       |    /*
 1410|       |     * To reduce the work to do we only want to process the compiled
 1411|       |     * in algorithms, so we first get the mask of disabled ciphers.
 1412|       |     */
 1413|       |
 1414|  7.36k|    disabled_mkey = ctx->disabled_mkey_mask;
 1415|  7.36k|    disabled_auth = ctx->disabled_auth_mask;
 1416|  7.36k|    disabled_enc = ctx->disabled_enc_mask;
 1417|  7.36k|    disabled_mac = ctx->disabled_mac_mask;
 1418|       |
 1419|       |    /*
 1420|       |     * Now we have to collect the available ciphers from the compiled
 1421|       |     * in ciphers. We cannot get more than the number compiled in, so
 1422|       |     * it is used for allocation.
 1423|       |     */
 1424|  7.36k|    num_of_ciphers = ssl_method->num_ciphers();
 1425|       |
 1426|  7.36k|    if (num_of_ciphers > 0) {
  ------------------
  |  Branch (1426:9): [True: 7.36k, False: 0]
  ------------------
 1427|  7.36k|        co_list = OPENSSL_malloc_array(num_of_ciphers, sizeof(*co_list));
  ------------------
  |  |  111|  7.36k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1428|  7.36k|        if (co_list == NULL)
  ------------------
  |  Branch (1428:13): [True: 0, False: 7.36k]
  ------------------
 1429|      0|            return NULL; /* Failure */
 1430|  7.36k|    }
 1431|       |
 1432|  7.36k|    ssl_cipher_collect_ciphers(ssl_method, num_of_ciphers,
 1433|  7.36k|        disabled_mkey, disabled_auth, disabled_enc,
 1434|  7.36k|        disabled_mac, co_list, &head, &tail);
 1435|       |
 1436|       |    /* Now arrange all ciphers by preference. */
 1437|       |
 1438|       |    /*
 1439|       |     * Everything else being equal, prefer ephemeral ECDH over other key
 1440|       |     * exchange mechanisms.
 1441|       |     * For consistency, prefer ECDSA over RSA (though this only matters if the
 1442|       |     * server has both certificates, and is using the DEFAULT, or a client
 1443|       |     * preference).
 1444|       |     */
 1445|  7.36k|    ssl_cipher_apply_rule(0, SSL_kECDHE, SSL_aECDSA, 0, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |   89|  7.36k|#define SSL_kECDHE 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kECDHE, SSL_aECDSA, 0, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  118|  7.36k|#define SSL_aECDSA 0x00000008U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kECDHE, SSL_aECDSA, 0, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  141|  7.36k|#define CIPHER_ADD 1
  ------------------
 1446|  7.36k|        -1, &head, &tail);
 1447|  7.36k|    ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_ADD, -1, &head,
  ------------------
  |  |   89|  7.36k|#define SSL_kECDHE 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_ADD, -1, &head,
  ------------------
  |  |  141|  7.36k|#define CIPHER_ADD 1
  ------------------
 1448|  7.36k|        &tail);
 1449|  7.36k|    ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_DEL, -1, &head,
  ------------------
  |  |   89|  7.36k|#define SSL_kECDHE 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_DEL, -1, &head,
  ------------------
  |  |  143|  7.36k|#define CIPHER_DEL 3
  ------------------
 1450|  7.36k|        &tail);
 1451|       |
 1452|       |    /* Within each strength group, we prefer GCM over CHACHA... */
 1453|  7.36k|    ssl_cipher_apply_rule(0, 0, 0, SSL_AESGCM, 0, 0, 0, CIPHER_ADD, -1,
  ------------------
  |  |  161|  7.36k|#define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  ------------------
  |  |  |  |  146|  7.36k|#define SSL_AES128GCM 0x00001000U
  |  |  ------------------
  |  |               #define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  ------------------
  |  |  |  |  147|  7.36k|#define SSL_AES256GCM 0x00002000U
  |  |  ------------------
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_AESGCM, 0, 0, 0, CIPHER_ADD, -1,
  ------------------
  |  |  141|  7.36k|#define CIPHER_ADD 1
  ------------------
 1454|  7.36k|        &head, &tail);
 1455|  7.36k|    ssl_cipher_apply_rule(0, 0, 0, SSL_CHACHA20, 0, 0, 0, CIPHER_ADD, -1,
  ------------------
  |  |  165|  7.36k|#define SSL_CHACHA20 (SSL_CHACHA20POLY1305)
  |  |  ------------------
  |  |  |  |  153|  7.36k|#define SSL_CHACHA20POLY1305 0x00080000U
  |  |  ------------------
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_CHACHA20, 0, 0, 0, CIPHER_ADD, -1,
  ------------------
  |  |  141|  7.36k|#define CIPHER_ADD 1
  ------------------
 1456|  7.36k|        &head, &tail);
 1457|       |
 1458|       |    /*
 1459|       |     * ...and generally, our preferred cipher is AES.
 1460|       |     * Note that AEADs will be bumped to take preference after sorting by
 1461|       |     * strength.
 1462|       |     */
 1463|  7.36k|    ssl_cipher_apply_rule(0, 0, 0, SSL_AES ^ SSL_AESGCM, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  163|  7.36k|#define SSL_AES (SSL_AES128 | SSL_AES256 | SSL_AESGCM | SSL_AESCCM)
  |  |  ------------------
  |  |  |  |  140|  7.36k|#define SSL_AES128 0x00000040U
  |  |  ------------------
  |  |               #define SSL_AES (SSL_AES128 | SSL_AES256 | SSL_AESGCM | SSL_AESCCM)
  |  |  ------------------
  |  |  |  |  141|  7.36k|#define SSL_AES256 0x00000080U
  |  |  ------------------
  |  |               #define SSL_AES (SSL_AES128 | SSL_AES256 | SSL_AESGCM | SSL_AESCCM)
  |  |  ------------------
  |  |  |  |  161|  7.36k|#define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  7.36k|#define SSL_AES128GCM 0x00001000U
  |  |  |  |  ------------------
  |  |  |  |               #define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  7.36k|#define SSL_AES256GCM 0x00002000U
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SSL_AES (SSL_AES128 | SSL_AES256 | SSL_AESGCM | SSL_AESCCM)
  |  |  ------------------
  |  |  |  |  162|  7.36k|#define SSL_AESCCM (SSL_AES128CCM | SSL_AES256CCM | SSL_AES128CCM8 | SSL_AES256CCM8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  148|  7.36k|#define SSL_AES128CCM 0x00004000U
  |  |  |  |  ------------------
  |  |  |  |               #define SSL_AESCCM (SSL_AES128CCM | SSL_AES256CCM | SSL_AES128CCM8 | SSL_AES256CCM8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  149|  7.36k|#define SSL_AES256CCM 0x00008000U
  |  |  |  |  ------------------
  |  |  |  |               #define SSL_AESCCM (SSL_AES128CCM | SSL_AES256CCM | SSL_AES128CCM8 | SSL_AES256CCM8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  150|  7.36k|#define SSL_AES128CCM8 0x00010000U
  |  |  |  |  ------------------
  |  |  |  |               #define SSL_AESCCM (SSL_AES128CCM | SSL_AES256CCM | SSL_AES128CCM8 | SSL_AES256CCM8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  151|  7.36k|#define SSL_AES256CCM8 0x00020000U
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_AES ^ SSL_AESGCM, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  161|  7.36k|#define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  ------------------
  |  |  |  |  146|  7.36k|#define SSL_AES128GCM 0x00001000U
  |  |  ------------------
  |  |               #define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  ------------------
  |  |  |  |  147|  7.36k|#define SSL_AES256GCM 0x00002000U
  |  |  ------------------
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_AES ^ SSL_AESGCM, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  141|  7.36k|#define CIPHER_ADD 1
  ------------------
 1464|  7.36k|        -1, &head, &tail);
 1465|       |
 1466|       |    /* Temporarily enable everything else for sorting */
 1467|  7.36k|    ssl_cipher_apply_rule(0, 0, 0, 0, 0, 0, 0, CIPHER_ADD, -1, &head, &tail);
  ------------------
  |  |  141|  7.36k|#define CIPHER_ADD 1
  ------------------
 1468|       |
 1469|       |    /* Low priority for MD5 */
 1470|  7.36k|    ssl_cipher_apply_rule(0, 0, 0, 0, SSL_MD5, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  174|  7.36k|#define SSL_MD5 0x00000001U
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, 0, SSL_MD5, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  144|  7.36k|#define CIPHER_ORD 4
  ------------------
 1471|  7.36k|        &tail);
 1472|       |
 1473|       |    /*
 1474|       |     * Move anonymous ciphers to the end.  Usually, these will remain
 1475|       |     * disabled. (For applications that allow them, they aren't too bad, but
 1476|       |     * we prefer authenticated ciphers.)
 1477|       |     */
 1478|  7.36k|    ssl_cipher_apply_rule(0, 0, SSL_aNULL, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  116|  7.36k|#define SSL_aNULL 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, 0, SSL_aNULL, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  144|  7.36k|#define CIPHER_ORD 4
  ------------------
 1479|  7.36k|        &tail);
 1480|       |
 1481|  7.36k|    ssl_cipher_apply_rule(0, SSL_kRSA, 0, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |   85|  7.36k|#define SSL_kRSA 0x00000001U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kRSA, 0, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  144|  7.36k|#define CIPHER_ORD 4
  ------------------
 1482|  7.36k|        &tail);
 1483|  7.36k|    ssl_cipher_apply_rule(0, SSL_kPSK, 0, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |   91|  7.36k|#define SSL_kPSK 0x00000008U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kPSK, 0, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  144|  7.36k|#define CIPHER_ORD 4
  ------------------
 1484|  7.36k|        &tail);
 1485|       |
 1486|       |    /* RC4 is sort-of broken -- move to the end */
 1487|  7.36k|    ssl_cipher_apply_rule(0, 0, 0, SSL_RC4, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  136|  7.36k|#define SSL_RC4 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_RC4, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  144|  7.36k|#define CIPHER_ORD 4
  ------------------
 1488|  7.36k|        &tail);
 1489|       |
 1490|       |    /*
 1491|       |     * Now sort by symmetric encryption strength.  The above ordering remains
 1492|       |     * in force within each class
 1493|       |     */
 1494|  7.36k|    if (!ssl_cipher_strength_sort(&head, &tail)) {
  ------------------
  |  Branch (1494:9): [True: 0, False: 7.36k]
  ------------------
 1495|      0|        OPENSSL_free(co_list);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1496|      0|        return NULL;
 1497|      0|    }
 1498|       |
 1499|       |    /*
 1500|       |     * Partially overrule strength sort to prefer TLS 1.2 ciphers/PRFs.
 1501|       |     */
 1502|  7.36k|    ssl_cipher_apply_rule(0, 0, 0, 0, 0, TLS1_2_VERSION, 0, CIPHER_BUMP, -1,
  ------------------
  |  |   26|  7.36k|#define TLS1_2_VERSION 0x0303
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, 0, 0, TLS1_2_VERSION, 0, CIPHER_BUMP, -1,
  ------------------
  |  |  150|  7.36k|#define CIPHER_BUMP 6
  ------------------
 1503|  7.36k|        &head, &tail);
 1504|       |
 1505|       |    /*
 1506|       |     * Irrespective of strength, enforce the following order:
 1507|       |     * (EC)DHE + AEAD > (EC)DHE > rest of AEAD > rest.
 1508|       |     * Within each group, ciphers remain sorted by strength and previous
 1509|       |     * preference, i.e.,
 1510|       |     * 1) ECDHE > DHE
 1511|       |     * 2) GCM > CHACHA
 1512|       |     * 3) AES > rest
 1513|       |     * 4) TLS 1.2 > legacy
 1514|       |     *
 1515|       |     * Because we now bump ciphers to the top of the list, we proceed in
 1516|       |     * reverse order of preference.
 1517|       |     */
 1518|  7.36k|    ssl_cipher_apply_rule(0, 0, 0, 0, SSL_AEAD, 0, 0, CIPHER_BUMP, -1,
  ------------------
  |  |  181|  7.36k|#define SSL_AEAD 0x00000040U
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, 0, SSL_AEAD, 0, 0, CIPHER_BUMP, -1,
  ------------------
  |  |  150|  7.36k|#define CIPHER_BUMP 6
  ------------------
 1519|  7.36k|        &head, &tail);
 1520|  7.36k|    ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, 0, 0, 0,
  ------------------
  |  |   87|  7.36k|#define SSL_kDHE 0x00000002U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, 0, 0, 0,
  ------------------
  |  |   89|  7.36k|#define SSL_kECDHE 0x00000004U
  ------------------
 1521|  7.36k|        CIPHER_BUMP, -1, &head, &tail);
  ------------------
  |  |  150|  7.36k|#define CIPHER_BUMP 6
  ------------------
 1522|  7.36k|    ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, SSL_AEAD, 0, 0,
  ------------------
  |  |   87|  7.36k|#define SSL_kDHE 0x00000002U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, SSL_AEAD, 0, 0,
  ------------------
  |  |   89|  7.36k|#define SSL_kECDHE 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, SSL_AEAD, 0, 0,
  ------------------
  |  |  181|  7.36k|#define SSL_AEAD 0x00000040U
  ------------------
 1523|  7.36k|        CIPHER_BUMP, -1, &head, &tail);
  ------------------
  |  |  150|  7.36k|#define CIPHER_BUMP 6
  ------------------
 1524|       |
 1525|       |    /* Now disable everything (maintaining the ordering!) */
 1526|  7.36k|    ssl_cipher_apply_rule(0, 0, 0, 0, 0, 0, 0, CIPHER_DEL, -1, &head, &tail);
  ------------------
  |  |  143|  7.36k|#define CIPHER_DEL 3
  ------------------
 1527|       |
 1528|       |    /*
 1529|       |     * We also need cipher aliases for selecting based on the rule_str.
 1530|       |     * There might be two types of entries in the rule_str: 1) names
 1531|       |     * of ciphers themselves 2) aliases for groups of ciphers.
 1532|       |     * For 1) we need the available ciphers and for 2) the cipher
 1533|       |     * groups of cipher_aliases added together in one list (otherwise
 1534|       |     * we would be happy with just the cipher_aliases table).
 1535|       |     */
 1536|  7.36k|    num_of_group_aliases = OSSL_NELEM(cipher_aliases);
  ------------------
  |  |   14|  7.36k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 1537|  7.36k|    num_of_alias_max = num_of_ciphers + num_of_group_aliases + 1;
 1538|  7.36k|    ca_list = OPENSSL_malloc_array(num_of_alias_max, sizeof(*ca_list));
  ------------------
  |  |  111|  7.36k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1539|  7.36k|    if (ca_list == NULL) {
  ------------------
  |  Branch (1539:9): [True: 0, False: 7.36k]
  ------------------
 1540|      0|        OPENSSL_free(co_list);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1541|      0|        return NULL; /* Failure */
 1542|      0|    }
 1543|  7.36k|    ssl_cipher_collect_aliases(ca_list, num_of_group_aliases,
 1544|  7.36k|        disabled_mkey, disabled_auth, disabled_enc,
 1545|  7.36k|        disabled_mac, head);
 1546|       |
 1547|       |    /*
 1548|       |     * If the rule_string begins with DEFAULT, apply the default rule
 1549|       |     * before using the (possibly available) additional rules.
 1550|       |     */
 1551|  7.36k|    ok = 1;
 1552|  7.36k|    rule_p = rule_str;
 1553|  7.36k|    if (HAS_CASE_PREFIX(rule_str, "DEFAULT")) {
  ------------------
  |  |   63|  7.36k|#define HAS_CASE_PREFIX(s, p) (OPENSSL_strncasecmp(s, p "", sizeof(p) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (63:31): [True: 0, False: 7.36k]
  |  |  ------------------
  ------------------
 1554|      0|        ok = ssl_cipher_process_rulestr(OSSL_default_cipher_list(),
 1555|      0|            &head, &tail, ca_list, c);
 1556|      0|        rule_p += 7;
 1557|      0|        if (*rule_p == ':')
  ------------------
  |  Branch (1557:13): [True: 0, False: 0]
  ------------------
 1558|      0|            rule_p++;
 1559|      0|    }
 1560|       |
 1561|  7.36k|    if (ok && (rule_p[0] != '\0'))
  ------------------
  |  Branch (1561:9): [True: 7.36k, False: 0]
  |  Branch (1561:15): [True: 7.36k, False: 0]
  ------------------
 1562|  7.36k|        ok = ssl_cipher_process_rulestr(rule_p, &head, &tail, ca_list, c);
 1563|       |
 1564|  7.36k|    OPENSSL_free(ca_list); /* Not needed anymore */
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1565|       |
 1566|  7.36k|    if (!ok) { /* Rule processing failure */
  ------------------
  |  Branch (1566:9): [True: 0, False: 7.36k]
  ------------------
 1567|      0|        OPENSSL_free(co_list);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1568|      0|        return NULL;
 1569|      0|    }
 1570|       |
 1571|       |    /*
 1572|       |     * Allocate new "cipherstack" for the result, return with error
 1573|       |     * if we cannot get one.
 1574|       |     */
 1575|  7.36k|    if ((cipherstack = sk_SSL_CIPHER_new_null()) == NULL) {
  ------------------
  |  | 1031|  7.36k|#define sk_SSL_CIPHER_new_null() ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_SSL_CIPHER_freefunc_thunk))
  ------------------
  |  Branch (1575:9): [True: 0, False: 7.36k]
  ------------------
 1576|      0|        OPENSSL_free(co_list);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1577|      0|        return NULL;
 1578|      0|    }
 1579|       |
 1580|       |    /* Add TLSv1.3 ciphers first - we always prefer those if possible */
 1581|  29.4k|    for (i = 0; i < sk_SSL_CIPHER_num(tls13_ciphersuites); i++) {
  ------------------
  |  | 1028|  29.4k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (1581:17): [True: 22.0k, False: 7.36k]
  ------------------
 1582|  22.0k|        const SSL_CIPHER *sslc = sk_SSL_CIPHER_value(tls13_ciphersuites, i);
  ------------------
  |  | 1029|  22.0k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 1583|       |
 1584|       |        /* Don't include any TLSv1.3 ciphers that are disabled */
 1585|  22.0k|        if ((sslc->algorithm_enc & disabled_enc) != 0
  ------------------
  |  Branch (1585:13): [True: 0, False: 22.0k]
  ------------------
 1586|  22.0k|            || (ssl_cipher_table_mac[sslc->algorithm2
  ------------------
  |  Branch (1586:16): [True: 0, False: 22.0k]
  ------------------
 1587|  22.0k|                    & SSL_HANDSHAKE_MAC_MASK]
  ------------------
  |  |  215|  22.0k|#define SSL_HANDSHAKE_MAC_MASK 0xFF
  ------------------
 1588|  22.0k|                       .mask
 1589|  22.0k|                   & ctx->disabled_mac_mask)
 1590|  22.0k|                != 0) {
 1591|      0|            sk_SSL_CIPHER_delete(tls13_ciphersuites, i);
  ------------------
  |  | 1036|      0|#define sk_SSL_CIPHER_delete(sk, i) ((const SSL_CIPHER *)OPENSSL_sk_delete(ossl_check_SSL_CIPHER_sk_type(sk), (i)))
  ------------------
 1592|      0|            i--;
 1593|      0|            continue;
 1594|      0|        }
 1595|       |
 1596|  22.0k|        if (!sk_SSL_CIPHER_push(cipherstack, sslc)) {
  ------------------
  |  | 1038|  22.0k|#define sk_SSL_CIPHER_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
  |  Branch (1596:13): [True: 0, False: 22.0k]
  ------------------
 1597|      0|            OPENSSL_free(co_list);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1598|      0|            sk_SSL_CIPHER_free(cipherstack);
  ------------------
  |  | 1034|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1599|      0|            return NULL;
 1600|      0|        }
 1601|  22.0k|    }
 1602|       |
 1603|  7.36k|    OSSL_TRACE_BEGIN(TLS_CIPHER)
  ------------------
  |  |  219|  7.36k|    do {                           \
  |  |  220|  7.36k|        BIO *trc_out = NULL;       \
  |  |  221|  7.36k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 7.36k]
  |  |  ------------------
  ------------------
 1604|      0|    {
 1605|      0|        BIO_printf(trc_out, "cipher selection:\n");
 1606|      0|    }
 1607|       |    /*
 1608|       |     * The cipher selection for the list is done. The ciphers are added
 1609|       |     * to the resulting precedence to the STACK_OF(SSL_CIPHER).
 1610|       |     */
 1611|   427k|    for (curr = head; curr != NULL; curr = curr->next) {
  ------------------
  |  Branch (1611:23): [True: 419k, False: 7.36k]
  ------------------
 1612|   419k|        if (curr->active) {
  ------------------
  |  Branch (1612:13): [True: 419k, False: 0]
  ------------------
 1613|   419k|            if (!sk_SSL_CIPHER_push(cipherstack, curr->cipher)) {
  ------------------
  |  | 1038|   419k|#define sk_SSL_CIPHER_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
  |  Branch (1613:17): [True: 0, False: 419k]
  ------------------
 1614|      0|                OPENSSL_free(co_list);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1615|      0|                sk_SSL_CIPHER_free(cipherstack);
  ------------------
  |  | 1034|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1616|      0|                OSSL_TRACE_CANCEL(TLS_CIPHER);
  ------------------
  |  |  228|      0|    ((void)0)
  ------------------
 1617|      0|                return NULL;
 1618|      0|            }
 1619|   419k|            if (trc_out != NULL)
  ------------------
  |  Branch (1619:17): [True: 0, False: 419k]
  ------------------
 1620|      0|                BIO_printf(trc_out, "<%s>\n", curr->cipher->name);
 1621|   419k|        }
 1622|   419k|    }
 1623|  7.36k|    OPENSSL_free(co_list); /* Not needed any longer */
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1624|  7.36k|    OSSL_TRACE_END(TLS_CIPHER);
  ------------------
  |  |  224|  7.36k|    }                            \
  |  |  225|  7.36k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 7.36k]
  |  |  ------------------
  ------------------
 1625|       |
 1626|  7.36k|    if (!update_cipher_list_by_id(cipher_list_by_id, cipherstack)) {
  ------------------
  |  Branch (1626:9): [True: 0, False: 7.36k]
  ------------------
 1627|      0|        sk_SSL_CIPHER_free(cipherstack);
  ------------------
  |  | 1034|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1628|      0|        return NULL;
 1629|      0|    }
 1630|  7.36k|    sk_SSL_CIPHER_free(*cipher_list);
  ------------------
  |  | 1034|  7.36k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1631|  7.36k|    *cipher_list = cipherstack;
 1632|       |
 1633|  7.36k|    return cipherstack;
 1634|  7.36k|}
SSL_COMP_get_compression_methods:
 1951|  7.36k|{
 1952|  7.36k|    STACK_OF(SSL_COMP) **rv;
  ------------------
  |  |   33|  7.36k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1953|       |
 1954|  7.36k|    rv = (STACK_OF(SSL_COMP) **)OSSL_LIB_CTX_get_data(NULL,
 1955|  7.36k|        OSSL_LIB_CTX_COMP_METHODS);
  ------------------
  |  |  118|  7.36k|#define OSSL_LIB_CTX_COMP_METHODS 21
  ------------------
 1956|  7.36k|    if (rv != NULL)
  ------------------
  |  Branch (1956:9): [True: 7.36k, False: 0]
  ------------------
 1957|  7.36k|        return *rv;
 1958|      0|    else
 1959|      0|        return NULL;
 1960|  7.36k|}
ssl_get_cipher_by_char:
 2056|   112k|{
 2057|   112k|    const SSL_CIPHER *c = SSL_CONNECTION_GET_SSL(s)->method->get_cipher_by_char(ptr);
  ------------------
  |  |   27|   112k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2058|       |
 2059|   112k|    if (c == NULL || (!all && c->valid == 0))
  ------------------
  |  Branch (2059:9): [True: 0, False: 112k]
  |  Branch (2059:23): [True: 3.62k, False: 108k]
  |  Branch (2059:31): [True: 0, False: 3.62k]
  ------------------
 2060|      0|        return NULL;
 2061|   112k|    return c;
 2062|   112k|}
ssl_get_md_idx:
 2108|  29.4k|{
 2109|  29.4k|    int i;
 2110|       |
 2111|   471k|    for (i = 0; i < SSL_MD_NUM_IDX; i++) {
  ------------------
  |  |  210|   471k|#define SSL_MD_NUM_IDX SSL_MAX_DIGEST
  |  |  ------------------
  |  |  |  |  208|   471k|#define SSL_MAX_DIGEST 15
  |  |  ------------------
  ------------------
  |  Branch (2111:17): [True: 441k, False: 29.4k]
  ------------------
 2112|   441k|        if (md_nid == ssl_cipher_table_mac[i].nid)
  ------------------
  |  Branch (2112:13): [True: 0, False: 441k]
  ------------------
 2113|      0|            return i;
 2114|   441k|    }
 2115|  29.4k|    return -1;
 2116|  29.4k|}
ssl_cert_is_disabled:
 2190|   370k|{
 2191|   370k|    const SSL_CERT_LOOKUP *cl;
 2192|       |
 2193|       |    /* A provider-loaded key type is always enabled */
 2194|   370k|    if (idx >= SSL_PKEY_NUM)
  ------------------
  |  |  336|   370k|#define SSL_PKEY_NUM 9
  ------------------
  |  Branch (2194:9): [True: 68.9k, False: 301k]
  ------------------
 2195|  68.9k|        return 0;
 2196|       |
 2197|   301k|    cl = ssl_cert_lookup_by_idx(idx, ctx);
 2198|   301k|    if (cl == NULL || (cl->amask & ctx->disabled_auth_mask) != 0)
  ------------------
  |  Branch (2198:9): [True: 0, False: 301k]
  |  Branch (2198:23): [True: 0, False: 301k]
  ------------------
 2199|      0|        return 1;
 2200|   301k|    return 0;
 2201|   301k|}
OSSL_default_cipher_list:
 2209|  7.36k|{
 2210|  7.36k|    return "ALL:!COMPLEMENTOFDEFAULT:!eNULL";
 2211|  7.36k|}
OSSL_default_ciphersuites:
 2219|  7.36k|{
 2220|  7.36k|    return "TLS_AES_256_GCM_SHA384:"
 2221|  7.36k|           "TLS_CHACHA20_POLY1305_SHA256:"
 2222|  7.36k|           "TLS_AES_128_GCM_SHA256";
 2223|  7.36k|}
ssl_cipher_list_to_bytes:
 2227|  3.62k|{
 2228|  3.62k|    int i;
 2229|  3.62k|    size_t totlen = 0, len, maxlen, maxverok = 0;
 2230|  3.62k|    int empty_reneg_info_scsv = !s->renegotiate
  ------------------
  |  Branch (2230:33): [True: 3.62k, False: 0]
  ------------------
 2231|  3.62k|        && !SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (2231:12): [True: 3.62k, False: 0]
  ------------------
 2232|  3.62k|        && ssl_security(s, SSL_SECOP_VERSION, 0, TLS1_VERSION, NULL)
  ------------------
  |  | 2768|  3.62k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2729|  3.62k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
                      && ssl_security(s, SSL_SECOP_VERSION, 0, TLS1_VERSION, NULL)
  ------------------
  |  |   24|  3.62k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (2232:12): [True: 0, False: 3.62k]
  ------------------
 2233|      0|        && s->min_proto_version <= TLS1_VERSION;
  ------------------
  |  |   24|      0|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (2233:12): [True: 0, False: 0]
  ------------------
 2234|  3.62k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2235|       |
 2236|       |    /* Set disabled masks for this session */
 2237|  3.62k|    if (!ssl_set_client_disabled(s)) {
  ------------------
  |  Branch (2237:9): [True: 0, False: 3.62k]
  ------------------
 2238|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_PROTOCOLS_AVAILABLE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2239|      0|        return 0;
 2240|      0|    }
 2241|       |
 2242|  3.62k|    if (sk == NULL) {
  ------------------
  |  Branch (2242:9): [True: 0, False: 3.62k]
  ------------------
 2243|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2244|      0|        return 0;
 2245|      0|    }
 2246|       |
 2247|       |#ifdef OPENSSL_MAX_TLS1_2_CIPHER_LENGTH
 2248|       |#if OPENSSL_MAX_TLS1_2_CIPHER_LENGTH < 6
 2249|       |#error Max cipher length too short
 2250|       |#endif
 2251|       |    /*
 2252|       |     * Some servers hang if client hello > 256 bytes as hack workaround
 2253|       |     * chop number of supported ciphers to keep it well below this if we
 2254|       |     * use TLS v1.2
 2255|       |     */
 2256|       |    if (TLS1_get_version(ssl) >= TLS1_2_VERSION)
 2257|       |        maxlen = OPENSSL_MAX_TLS1_2_CIPHER_LENGTH & ~1;
 2258|       |    else
 2259|       |#endif
 2260|       |        /* Maximum length that can be stored in 2 bytes. Length must be even */
 2261|  3.62k|        maxlen = 0xfffe;
 2262|       |
 2263|  3.62k|    if (empty_reneg_info_scsv)
  ------------------
  |  Branch (2263:9): [True: 0, False: 3.62k]
  ------------------
 2264|      0|        maxlen -= 2;
 2265|  3.62k|    if (s->mode & SSL_MODE_SEND_FALLBACK_SCSV)
  ------------------
  |  |  553|  3.62k|#define SSL_MODE_SEND_FALLBACK_SCSV 0x00000080U
  ------------------
  |  Branch (2265:9): [True: 0, False: 3.62k]
  ------------------
 2266|      0|        maxlen -= 2;
 2267|       |
 2268|   221k|    for (i = 0; i < sk_SSL_CIPHER_num(sk) && totlen < maxlen; i++) {
  ------------------
  |  | 1028|   442k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (2268:17): [True: 217k, False: 3.62k]
  |  Branch (2268:46): [True: 217k, False: 0]
  ------------------
 2269|   217k|        const SSL_CIPHER *c;
 2270|       |
 2271|   217k|        c = sk_SSL_CIPHER_value(sk, i);
  ------------------
  |  | 1029|   217k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 2272|       |        /* Skip disabled ciphers */
 2273|   217k|        if (ssl_cipher_disabled(s, c, SSL_SECOP_CIPHER_SUPPORTED, 0))
  ------------------
  |  | 2754|   217k|#define SSL_SECOP_CIPHER_SUPPORTED (1 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2730|   217k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (2273:13): [True: 108k, False: 108k]
  ------------------
 2274|   108k|            continue;
 2275|       |
 2276|   108k|        if (!ssl->method->put_cipher_by_char(c, pkt, &len)) {
  ------------------
  |  Branch (2276:13): [True: 0, False: 108k]
  ------------------
 2277|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2278|      0|            return 0;
 2279|      0|        }
 2280|       |
 2281|       |        /* Sanity check that the maximum version we offer has ciphers enabled */
 2282|   108k|        if (!maxverok) {
  ------------------
  |  Branch (2282:13): [True: 3.62k, False: 105k]
  ------------------
 2283|  3.62k|            int minproto = SSL_CONNECTION_IS_DTLS(s) ? c->min_dtls : c->min_tls;
  ------------------
  |  |  266|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
 2284|  3.62k|            int maxproto = SSL_CONNECTION_IS_DTLS(s) ? c->max_dtls : c->max_tls;
  ------------------
  |  |  266|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
 2285|       |
 2286|  3.62k|            if (ssl_version_cmp(s, maxproto, s->s3.tmp.max_ver) >= 0
  ------------------
  |  Branch (2286:17): [True: 3.62k, False: 0]
  ------------------
 2287|  3.62k|                && ssl_version_cmp(s, minproto, s->s3.tmp.max_ver) <= 0)
  ------------------
  |  Branch (2287:20): [True: 3.62k, False: 0]
  ------------------
 2288|  3.62k|                maxverok = 1;
 2289|  3.62k|        }
 2290|       |
 2291|   108k|        totlen += len;
 2292|   108k|    }
 2293|       |
 2294|  3.62k|    if (totlen == 0 || !maxverok) {
  ------------------
  |  Branch (2294:9): [True: 0, False: 3.62k]
  |  Branch (2294:24): [True: 0, False: 3.62k]
  ------------------
 2295|      0|        const char *maxvertext = !maxverok
  ------------------
  |  Branch (2295:34): [True: 0, False: 0]
  ------------------
 2296|      0|            ? "No ciphers enabled for max supported SSL/TLS version"
 2297|      0|            : NULL;
 2298|       |
 2299|      0|        SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_CIPHERS_AVAILABLE,
  ------------------
  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  159|      0|        ossl_statem_fatal)
  ------------------
                      SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_CIPHERS_AVAILABLE,
  ------------------
  |  | 1266|      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_CIPHERS_AVAILABLE,
  ------------------
  |  |  198|      0|#define SSL_R_NO_CIPHERS_AVAILABLE 181
  ------------------
 2300|      0|            maxvertext);
 2301|      0|        return 0;
 2302|      0|    }
 2303|       |
 2304|  3.62k|    if (totlen != 0) {
  ------------------
  |  Branch (2304:9): [True: 3.62k, False: 0]
  ------------------
 2305|  3.62k|        if (empty_reneg_info_scsv) {
  ------------------
  |  Branch (2305:13): [True: 0, False: 3.62k]
  ------------------
 2306|      0|            static const SSL_CIPHER scsv = {
 2307|      0|                0, NULL, NULL, SSL3_CK_SCSV, 0, 0, 0, 0, 0, 0, 0, 0, 0
  ------------------
  |  |   33|      0|#define SSL3_CK_SCSV 0x030000FF
  ------------------
 2308|      0|            };
 2309|      0|            if (!ssl->method->put_cipher_by_char(&scsv, pkt, &len)) {
  ------------------
  |  Branch (2309:17): [True: 0, False: 0]
  ------------------
 2310|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2311|      0|                return 0;
 2312|      0|            }
 2313|      0|        }
 2314|  3.62k|        if (s->mode & SSL_MODE_SEND_FALLBACK_SCSV) {
  ------------------
  |  |  553|  3.62k|#define SSL_MODE_SEND_FALLBACK_SCSV 0x00000080U
  ------------------
  |  Branch (2314:13): [True: 0, False: 3.62k]
  ------------------
 2315|      0|            static const SSL_CIPHER scsv = {
 2316|      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
  ------------------
 2317|      0|            };
 2318|      0|            if (!ssl->method->put_cipher_by_char(&scsv, pkt, &len)) {
  ------------------
  |  Branch (2318:17): [True: 0, False: 0]
  ------------------
 2319|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2320|      0|                return 0;
 2321|      0|            }
 2322|      0|        }
 2323|  3.62k|    }
 2324|       |
 2325|  3.62k|    return 1;
 2326|  3.62k|}
ssl_ciph.c:ssl_cipher_info_find:
  118|  14.5k|{
  119|  14.5k|    size_t i;
  120|   217k|    for (i = 0; i < table_cnt; i++, table++) {
  ------------------
  |  Branch (120:17): [True: 210k, False: 7.25k]
  ------------------
  121|   210k|        if (table->mask == mask)
  ------------------
  |  Branch (121:13): [True: 7.25k, False: 203k]
  ------------------
  122|  7.25k|            return (int)i;
  123|   210k|    }
  124|  7.25k|    return -1;
  125|  14.5k|}
ssl_ciph.c:set_ciphersuites:
 1267|  7.36k|{
 1268|  7.36k|    STACK_OF(SSL_CIPHER) *newciphers = sk_SSL_CIPHER_new_null();
  ------------------
  |  |   33|  7.36k|#define STACK_OF(type) struct stack_st_##type
  ------------------
                  STACK_OF(SSL_CIPHER) *newciphers = sk_SSL_CIPHER_new_null();
  ------------------
  |  | 1031|  7.36k|#define sk_SSL_CIPHER_new_null() ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_SSL_CIPHER_freefunc_thunk))
  ------------------
 1269|       |
 1270|  7.36k|    if (newciphers == NULL)
  ------------------
  |  Branch (1270:9): [True: 0, False: 7.36k]
  ------------------
 1271|      0|        return 0;
 1272|       |
 1273|       |    /* Parse the list. We explicitly allow an empty list */
 1274|  7.36k|    if (*str != '\0'
  ------------------
  |  Branch (1274:9): [True: 7.36k, False: 0]
  ------------------
 1275|  7.36k|        && (CONF_parse_list(str, ':', 1, ciphersuite_cb, newciphers) <= 0
  ------------------
  |  Branch (1275:13): [True: 0, False: 7.36k]
  ------------------
 1276|  7.36k|            || sk_SSL_CIPHER_num(newciphers) == 0)) {
  ------------------
  |  | 1028|  7.36k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (1276:16): [True: 0, False: 7.36k]
  ------------------
 1277|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_NO_CIPHER_MATCH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1278|      0|        sk_SSL_CIPHER_free(newciphers);
  ------------------
  |  | 1034|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1279|      0|        return 0;
 1280|      0|    }
 1281|  7.36k|    sk_SSL_CIPHER_free(*currciphers);
  ------------------
  |  | 1034|  7.36k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1282|  7.36k|    *currciphers = newciphers;
 1283|       |
 1284|  7.36k|    return 1;
 1285|  7.36k|}
ssl_ciph.c:ciphersuite_cb:
 1231|  22.0k|{
 1232|  22.0k|    STACK_OF(SSL_CIPHER) *ciphersuites = (STACK_OF(SSL_CIPHER) *)arg;
  ------------------
  |  |   33|  22.0k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1233|  22.0k|    const SSL_CIPHER *cipher;
 1234|       |    /* Arbitrary sized temp buffer for the cipher name. Should be big enough */
 1235|  22.0k|    char name[80];
 1236|       |
 1237|       |    /* CONF_parse_list signals empty elements with elem == NULL; skip them */
 1238|  22.0k|    if (elem == NULL || len == 0)
  ------------------
  |  Branch (1238:9): [True: 0, False: 22.0k]
  |  Branch (1238:25): [True: 0, False: 22.0k]
  ------------------
 1239|      0|        return 1;
 1240|       |
 1241|  22.0k|    if (len > (int)(sizeof(name) - 1))
  ------------------
  |  Branch (1241:9): [True: 0, False: 22.0k]
  ------------------
 1242|       |        /* Anyway return 1 so we can parse rest of the list */
 1243|      0|        return 1;
 1244|       |
 1245|  22.0k|    memcpy(name, elem, len);
 1246|  22.0k|    name[len] = '\0';
 1247|       |
 1248|  22.0k|    cipher = ssl3_get_tls13_cipher_by_std_name(name);
 1249|  22.0k|    if (cipher == NULL)
  ------------------
  |  Branch (1249:9): [True: 0, False: 22.0k]
  ------------------
 1250|       |        /* Ciphersuite not found but return 1 to parse rest of the list */
 1251|      0|        return 1;
 1252|       |
 1253|       |    /* Suppress duplicates */
 1254|  44.1k|    for (int i = 0; i < sk_SSL_CIPHER_num(ciphersuites); ++i)
  ------------------
  |  | 1028|  44.1k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (1254:21): [True: 22.0k, False: 22.0k]
  ------------------
 1255|  22.0k|        if (sk_SSL_CIPHER_value(ciphersuites, i)->id == cipher->id)
  ------------------
  |  | 1029|  22.0k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
  |  Branch (1255:13): [True: 0, False: 22.0k]
  ------------------
 1256|      0|            return 1;
 1257|       |
 1258|  22.0k|    if (!sk_SSL_CIPHER_push(ciphersuites, cipher)) {
  ------------------
  |  | 1038|  22.0k|#define sk_SSL_CIPHER_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
  |  Branch (1258:9): [True: 0, False: 22.0k]
  ------------------
 1259|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1260|      0|        return 0;
 1261|      0|    }
 1262|       |
 1263|  22.0k|    return 1;
 1264|  22.0k|}
ssl_ciph.c:check_suiteb_cipher_list:
 1184|  7.36k|{
 1185|  7.36k|    unsigned int suiteb_flags = 0, suiteb_comb2 = 0;
 1186|  7.36k|    if (HAS_CASE_PREFIX(*prule_str, "SUITEB128ONLY")) {
  ------------------
  |  |   63|  7.36k|#define HAS_CASE_PREFIX(s, p) (OPENSSL_strncasecmp(s, p "", sizeof(p) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (63:31): [True: 0, False: 7.36k]
  |  |  ------------------
  ------------------
 1187|      0|        suiteb_flags = SSL_CERT_FLAG_SUITEB_128_LOS_ONLY;
  ------------------
  |  |  580|      0|#define SSL_CERT_FLAG_SUITEB_128_LOS_ONLY 0x10000
  ------------------
 1188|  7.36k|    } else if (HAS_CASE_PREFIX(*prule_str, "SUITEB128C2")) {
  ------------------
  |  |   63|  7.36k|#define HAS_CASE_PREFIX(s, p) (OPENSSL_strncasecmp(s, p "", sizeof(p) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (63:31): [True: 0, False: 7.36k]
  |  |  ------------------
  ------------------
 1189|      0|        suiteb_comb2 = 1;
 1190|      0|        suiteb_flags = SSL_CERT_FLAG_SUITEB_128_LOS;
  ------------------
  |  |  584|      0|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
 1191|  7.36k|    } else if (HAS_CASE_PREFIX(*prule_str, "SUITEB128")) {
  ------------------
  |  |   63|  7.36k|#define HAS_CASE_PREFIX(s, p) (OPENSSL_strncasecmp(s, p "", sizeof(p) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (63:31): [True: 0, False: 7.36k]
  |  |  ------------------
  ------------------
 1192|      0|        suiteb_flags = SSL_CERT_FLAG_SUITEB_128_LOS;
  ------------------
  |  |  584|      0|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
 1193|  7.36k|    } else if (HAS_CASE_PREFIX(*prule_str, "SUITEB192")) {
  ------------------
  |  |   63|  7.36k|#define HAS_CASE_PREFIX(s, p) (OPENSSL_strncasecmp(s, p "", sizeof(p) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (63:31): [True: 0, False: 7.36k]
  |  |  ------------------
  ------------------
 1194|      0|        suiteb_flags = SSL_CERT_FLAG_SUITEB_192_LOS;
  ------------------
  |  |  582|      0|#define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000
  ------------------
 1195|      0|    }
 1196|       |
 1197|  7.36k|    if (suiteb_flags) {
  ------------------
  |  Branch (1197:9): [True: 0, False: 7.36k]
  ------------------
 1198|      0|        c->cert_flags &= ~SSL_CERT_FLAG_SUITEB_128_LOS;
  ------------------
  |  |  584|      0|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
 1199|      0|        c->cert_flags |= suiteb_flags;
 1200|  7.36k|    } else {
 1201|  7.36k|        suiteb_flags = c->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS;
  ------------------
  |  |  584|  7.36k|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
 1202|  7.36k|    }
 1203|       |
 1204|  7.36k|    if (!suiteb_flags)
  ------------------
  |  Branch (1204:9): [True: 7.36k, False: 0]
  ------------------
 1205|  7.36k|        return 1;
 1206|       |    /* Check version: if TLS 1.2 ciphers allowed we can use Suite B */
 1207|       |
 1208|      0|    if (!(meth->ssl3_enc->enc_flags & SSL_ENC_FLAG_TLS1_2_CIPHERS)) {
  ------------------
  |  | 2201|      0|#define SSL_ENC_FLAG_TLS1_2_CIPHERS 0x10
  ------------------
  |  Branch (1208:9): [True: 0, False: 0]
  ------------------
 1209|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_AT_LEAST_TLS_1_2_NEEDED_IN_SUITEB_MODE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1210|      0|        return 0;
 1211|      0|    }
 1212|       |
 1213|      0|    switch (suiteb_flags) {
  ------------------
  |  Branch (1213:13): [True: 0, False: 0]
  ------------------
 1214|      0|    case SSL_CERT_FLAG_SUITEB_128_LOS:
  ------------------
  |  |  584|      0|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
  |  Branch (1214:5): [True: 0, False: 0]
  ------------------
 1215|      0|        if (suiteb_comb2)
  ------------------
  |  Branch (1215:13): [True: 0, False: 0]
  ------------------
 1216|      0|            *prule_str = "ECDHE-ECDSA-AES256-GCM-SHA384";
 1217|      0|        else
 1218|      0|            *prule_str = "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384";
 1219|      0|        break;
 1220|      0|    case SSL_CERT_FLAG_SUITEB_128_LOS_ONLY:
  ------------------
  |  |  580|      0|#define SSL_CERT_FLAG_SUITEB_128_LOS_ONLY 0x10000
  ------------------
  |  Branch (1220:5): [True: 0, False: 0]
  ------------------
 1221|      0|        *prule_str = "ECDHE-ECDSA-AES128-GCM-SHA256";
 1222|      0|        break;
 1223|      0|    case SSL_CERT_FLAG_SUITEB_192_LOS:
  ------------------
  |  |  582|      0|#define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000
  ------------------
  |  Branch (1223:5): [True: 0, False: 0]
  ------------------
 1224|      0|        *prule_str = "ECDHE-ECDSA-AES256-GCM-SHA384";
 1225|      0|        break;
 1226|      0|    }
 1227|      0|    return 1;
 1228|      0|}
ssl_ciph.c:ssl_cipher_collect_ciphers:
  615|  7.36k|{
  616|  7.36k|    int i, co_list_num;
  617|  7.36k|    const SSL_CIPHER *c;
  618|       |
  619|       |    /*
  620|       |     * We have num_of_ciphers descriptions compiled in, depending on the
  621|       |     * method selected (SSLv3, TLSv1 etc).
  622|       |     * These will later be sorted in a linked list with at most num
  623|       |     * entries.
  624|       |     */
  625|       |
  626|       |    /* Get the initial list of ciphers */
  627|  7.36k|    co_list_num = 0; /* actual count of ciphers */
  628|  1.41M|    for (i = 0; i < num_of_ciphers; i++) {
  ------------------
  |  Branch (628:17): [True: 1.40M, False: 7.36k]
  ------------------
  629|  1.40M|        c = ssl_method->get_cipher(i);
  630|       |        /* drop those that use any of that is not available */
  631|  1.40M|        if (c == NULL || !c->valid)
  ------------------
  |  Branch (631:13): [True: 0, False: 1.40M]
  |  Branch (631:26): [True: 0, False: 1.40M]
  ------------------
  632|      0|            continue;
  633|  1.40M|        if ((c->algorithm_mkey & disabled_mkey) || (c->algorithm_auth & disabled_auth) || (c->algorithm_enc & disabled_enc) || (c->algorithm_mac & disabled_mac))
  ------------------
  |  Branch (633:13): [True: 51.5k, False: 1.35M]
  |  Branch (633:52): [True: 0, False: 1.35M]
  |  Branch (633:91): [True: 110k, False: 1.24M]
  |  Branch (633:128): [True: 0, False: 1.24M]
  ------------------
  634|   161k|            continue;
  635|  1.24M|        if (((ssl_method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS) == 0) && c->min_tls == 0)
  ------------------
  |  | 2196|  1.24M|#define SSL_ENC_FLAG_DTLS 0x8
  ------------------
  |  Branch (635:13): [True: 1.24M, False: 0]
  |  Branch (635:77): [True: 0, False: 1.24M]
  ------------------
  636|      0|            continue;
  637|  1.24M|        if (((ssl_method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS) != 0) && c->min_dtls == 0)
  ------------------
  |  | 2196|  1.24M|#define SSL_ENC_FLAG_DTLS 0x8
  ------------------
  |  Branch (637:13): [True: 0, False: 1.24M]
  |  Branch (637:77): [True: 0, False: 0]
  ------------------
  638|      0|            continue;
  639|       |
  640|  1.24M|        co_list[co_list_num].cipher = c;
  641|  1.24M|        co_list[co_list_num].next = NULL;
  642|  1.24M|        co_list[co_list_num].prev = NULL;
  643|  1.24M|        co_list[co_list_num].active = 0;
  644|  1.24M|        co_list_num++;
  645|  1.24M|    }
  646|       |
  647|       |    /*
  648|       |     * Prepare linked list from list entries
  649|       |     */
  650|  7.36k|    if (co_list_num > 0) {
  ------------------
  |  Branch (650:9): [True: 7.36k, False: 0]
  ------------------
  651|  7.36k|        co_list[0].prev = NULL;
  652|       |
  653|  7.36k|        if (co_list_num > 1) {
  ------------------
  |  Branch (653:13): [True: 7.36k, False: 0]
  ------------------
  654|  7.36k|            co_list[0].next = &co_list[1];
  655|       |
  656|  1.23M|            for (i = 1; i < co_list_num - 1; i++) {
  ------------------
  |  Branch (656:25): [True: 1.22M, False: 7.36k]
  ------------------
  657|  1.22M|                co_list[i].prev = &co_list[i - 1];
  658|  1.22M|                co_list[i].next = &co_list[i + 1];
  659|  1.22M|            }
  660|       |
  661|  7.36k|            co_list[co_list_num - 1].prev = &co_list[co_list_num - 2];
  662|  7.36k|        }
  663|       |
  664|  7.36k|        co_list[co_list_num - 1].next = NULL;
  665|       |
  666|  7.36k|        *head_p = &co_list[0];
  667|  7.36k|        *tail_p = &co_list[co_list_num - 1];
  668|  7.36k|    }
  669|  7.36k|}
ssl_ciph.c:ssl_cipher_apply_rule:
  739|   184k|{
  740|   184k|    CIPHER_ORDER *head, *tail, *curr, *next, *last;
  741|   184k|    const SSL_CIPHER *cp;
  742|   184k|    int reverse = 0;
  743|       |
  744|   184k|    OSSL_TRACE_BEGIN(TLS_CIPHER)
  ------------------
  |  |  219|   184k|    do {                           \
  |  |  220|   184k|        BIO *trc_out = NULL;       \
  |  |  221|   184k|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 184k]
  |  |  ------------------
  ------------------
  745|      0|    {
  746|      0|        BIO_printf(trc_out,
  747|      0|            "Applying rule %d with %08x/%08x/%08x/%08x/%08x %08x (%d)\n",
  748|      0|            rule, (unsigned int)alg_mkey, (unsigned int)alg_auth,
  749|      0|            (unsigned int)alg_enc, (unsigned int)alg_mac, min_tls,
  750|      0|            (unsigned int)algo_strength, (int)strength_bits);
  751|      0|    }
  752|       |
  753|   184k|    if (rule == CIPHER_DEL || rule == CIPHER_BUMP)
  ------------------
  |  |  143|   368k|#define CIPHER_DEL 3
  ------------------
                  if (rule == CIPHER_DEL || rule == CIPHER_BUMP)
  ------------------
  |  |  150|   169k|#define CIPHER_BUMP 6
  ------------------
  |  Branch (753:9): [True: 14.7k, False: 169k]
  |  Branch (753:31): [True: 29.4k, False: 139k]
  ------------------
  754|  44.1k|        reverse = 1; /* needed to maintain sorting between currently
  755|       |                      * deleted ciphers */
  756|       |
  757|   184k|    head = *head_p;
  758|   184k|    tail = *tail_p;
  759|       |
  760|   184k|    if (reverse) {
  ------------------
  |  Branch (760:9): [True: 44.1k, False: 139k]
  ------------------
  761|  44.1k|        next = tail;
  762|  44.1k|        last = head;
  763|   139k|    } else {
  764|   139k|        next = head;
  765|   139k|        last = tail;
  766|   139k|    }
  767|       |
  768|   184k|    curr = NULL;
  769|  30.6M|    for (;;) {
  770|  30.6M|        if (curr == last)
  ------------------
  |  Branch (770:13): [True: 184k, False: 30.4M]
  ------------------
  771|   184k|            break;
  772|       |
  773|  30.4M|        curr = next;
  774|       |
  775|  30.4M|        if (curr == NULL)
  ------------------
  |  Branch (775:13): [True: 0, False: 30.4M]
  ------------------
  776|      0|            break;
  777|       |
  778|  30.4M|        next = reverse ? curr->prev : curr->next;
  ------------------
  |  Branch (778:16): [True: 7.46M, False: 22.9M]
  ------------------
  779|       |
  780|  30.4M|        cp = curr->cipher;
  781|       |
  782|       |        /*
  783|       |         * Selection criteria is either the value of strength_bits
  784|       |         * or the algorithms used.
  785|       |         */
  786|  30.4M|        if (strength_bits >= 0) {
  ------------------
  |  Branch (786:13): [True: 6.22M, False: 24.1M]
  ------------------
  787|  6.22M|            if (strength_bits != cp->strength_bits)
  ------------------
  |  Branch (787:17): [True: 4.97M, False: 1.24M]
  ------------------
  788|  4.97M|                continue;
  789|  24.1M|        } else {
  790|  24.1M|            if (trc_out != NULL) {
  ------------------
  |  Branch (790:17): [True: 0, False: 24.1M]
  ------------------
  791|      0|                BIO_printf(trc_out,
  792|      0|                    "\nName: %s:"
  793|      0|                    "\nAlgo = %08x/%08x/%08x/%08x/%08x Algo_strength = %08x\n",
  794|      0|                    cp->name,
  795|      0|                    (unsigned int)cp->algorithm_mkey,
  796|      0|                    (unsigned int)cp->algorithm_auth,
  797|      0|                    (unsigned int)cp->algorithm_enc,
  798|      0|                    (unsigned int)cp->algorithm_mac,
  799|      0|                    cp->min_tls,
  800|      0|                    (unsigned int)cp->algo_strength);
  801|      0|            }
  802|  24.1M|            if (cipher_id != 0 && (cipher_id != cp->id))
  ------------------
  |  Branch (802:17): [True: 0, False: 24.1M]
  |  Branch (802:35): [True: 0, False: 0]
  ------------------
  803|      0|                continue;
  804|  24.1M|            if (alg_mkey && !(alg_mkey & cp->algorithm_mkey))
  ------------------
  |  Branch (804:17): [True: 8.71M, False: 15.4M]
  |  Branch (804:29): [True: 6.55M, False: 2.15M]
  ------------------
  805|  6.55M|                continue;
  806|  17.6M|            if (alg_auth && !(alg_auth & cp->algorithm_auth))
  ------------------
  |  Branch (806:17): [True: 1.49M, False: 16.1M]
  |  Branch (806:29): [True: 1.25M, False: 235k]
  ------------------
  807|  1.25M|                continue;
  808|  16.3M|            if (alg_enc && !(alg_enc & cp->algorithm_enc))
  ------------------
  |  Branch (808:17): [True: 6.77M, False: 9.60M]
  |  Branch (808:28): [True: 4.84M, False: 1.92M]
  ------------------
  809|  4.84M|                continue;
  810|  11.5M|            if (alg_mac && !(alg_mac & cp->algorithm_mac))
  ------------------
  |  Branch (810:17): [True: 3.04M, False: 8.48M]
  |  Branch (810:28): [True: 2.37M, False: 670k]
  ------------------
  811|  2.37M|                continue;
  812|  9.15M|            if (min_tls && (min_tls != cp->min_tls))
  ------------------
  |  Branch (812:17): [True: 1.24M, False: 7.91M]
  |  Branch (812:28): [True: 611k, False: 633k]
  ------------------
  813|   611k|                continue;
  814|  8.54M|            if ((algo_strength & SSL_STRONG_MASK)
  ------------------
  |  |  249|  8.54M|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (814:17): [True: 0, False: 8.54M]
  ------------------
  815|      0|                && !(algo_strength & SSL_STRONG_MASK & cp->algo_strength))
  ------------------
  |  |  249|      0|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (815:20): [True: 0, False: 0]
  ------------------
  816|      0|                continue;
  817|  8.54M|            if ((algo_strength & SSL_DEFAULT_MASK)
  ------------------
  |  |  250|  8.54M|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (817:17): [True: 1.24M, False: 7.30M]
  ------------------
  818|  1.24M|                && !(algo_strength & SSL_DEFAULT_MASK & cp->algo_strength))
  ------------------
  |  |  250|  1.24M|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (818:20): [True: 552k, False: 692k]
  ------------------
  819|   552k|                continue;
  820|  8.54M|        }
  821|       |
  822|  9.24M|        if (trc_out != NULL)
  ------------------
  |  Branch (822:13): [True: 0, False: 9.24M]
  ------------------
  823|      0|            BIO_printf(trc_out, "Action = %d\n", rule);
  824|       |
  825|       |        /* add the cipher if it has not been added yet. */
  826|  9.24M|        if (rule == CIPHER_ADD) {
  ------------------
  |  |  141|  9.24M|#define CIPHER_ADD 1
  ------------------
  |  Branch (826:13): [True: 3.41M, False: 5.82M]
  ------------------
  827|       |            /* reverse == 0 */
  828|  3.41M|            if (!curr->active) {
  ------------------
  |  Branch (828:17): [True: 2.60M, False: 809k]
  ------------------
  829|  2.60M|                ll_append_tail(&head, curr, &tail);
  830|  2.60M|                curr->active = 1;
  831|  2.60M|            }
  832|  3.41M|        }
  833|       |        /* Move the added cipher to this location */
  834|  5.82M|        else if (rule == CIPHER_ORD) {
  ------------------
  |  |  144|  5.82M|#define CIPHER_ORD 4
  ------------------
  |  Branch (834:18): [True: 1.64M, False: 4.17M]
  ------------------
  835|       |            /* reverse == 0 */
  836|  1.64M|            if (curr->active) {
  ------------------
  |  Branch (836:17): [True: 1.64M, False: 0]
  ------------------
  837|  1.64M|                ll_append_tail(&head, curr, &tail);
  838|  1.64M|            }
  839|  4.17M|        } else if (rule == CIPHER_DEL) {
  ------------------
  |  |  143|  4.17M|#define CIPHER_DEL 3
  ------------------
  |  Branch (839:20): [True: 1.49M, False: 2.68M]
  ------------------
  840|       |            /* reverse == 1 */
  841|  1.49M|            if (curr->active) {
  ------------------
  |  Branch (841:17): [True: 1.49M, False: 0]
  ------------------
  842|       |                /*
  843|       |                 * most recently deleted ciphersuites get best positions for
  844|       |                 * any future CIPHER_ADD (note that the CIPHER_DEL loop works
  845|       |                 * in reverse to maintain the order)
  846|       |                 */
  847|  1.49M|                ll_append_head(&head, curr, &tail);
  848|  1.49M|                curr->active = 0;
  849|  1.49M|            }
  850|  2.68M|        } else if (rule == CIPHER_BUMP) {
  ------------------
  |  |  150|  2.68M|#define CIPHER_BUMP 6
  ------------------
  |  Branch (850:20): [True: 1.85M, False: 824k]
  ------------------
  851|  1.85M|            if (curr->active)
  ------------------
  |  Branch (851:17): [True: 1.85M, False: 0]
  ------------------
  852|  1.85M|                ll_append_head(&head, curr, &tail);
  853|  1.85M|        } else if (rule == CIPHER_KILL) {
  ------------------
  |  |  142|   824k|#define CIPHER_KILL 2
  ------------------
  |  Branch (853:20): [True: 824k, False: 0]
  ------------------
  854|       |            /* reverse == 0 */
  855|   824k|            if (head == curr)
  ------------------
  |  Branch (855:17): [True: 132k, False: 692k]
  ------------------
  856|   132k|                head = curr->next;
  857|   692k|            else
  858|   692k|                curr->prev->next = curr->next;
  859|   824k|            if (tail == curr)
  ------------------
  |  Branch (859:17): [True: 7.36k, False: 817k]
  ------------------
  860|  7.36k|                tail = curr->prev;
  861|   824k|            curr->active = 0;
  862|   824k|            if (curr->next != NULL)
  ------------------
  |  Branch (862:17): [True: 817k, False: 7.36k]
  ------------------
  863|   817k|                curr->next->prev = curr->prev;
  864|   824k|            if (curr->prev != NULL)
  ------------------
  |  Branch (864:17): [True: 692k, False: 132k]
  ------------------
  865|   692k|                curr->prev->next = curr->next;
  866|   824k|            curr->next = NULL;
  867|   824k|            curr->prev = NULL;
  868|   824k|        }
  869|  9.24M|    }
  870|       |
  871|   184k|    *head_p = head;
  872|   184k|    *tail_p = tail;
  873|       |
  874|   184k|    OSSL_TRACE_END(TLS_CIPHER);
  ------------------
  |  |  224|   184k|    }                            \
  |  |  225|   184k|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 184k]
  |  |  ------------------
  ------------------
  875|   184k|}
ssl_ciph.c:ll_append_tail:
  574|  4.25M|{
  575|  4.25M|    if (curr == *tail)
  ------------------
  |  Branch (575:9): [True: 7.36k, False: 4.24M]
  ------------------
  576|  7.36k|        return;
  577|  4.24M|    if (curr == *head)
  ------------------
  |  Branch (577:9): [True: 1.36M, False: 2.88M]
  ------------------
  578|  1.36M|        *head = curr->next;
  579|  4.24M|    if (curr->prev != NULL)
  ------------------
  |  Branch (579:9): [True: 2.88M, False: 1.36M]
  ------------------
  580|  2.88M|        curr->prev->next = curr->next;
  581|  4.24M|    if (curr->next != NULL)
  ------------------
  |  Branch (581:9): [True: 4.24M, False: 0]
  ------------------
  582|  4.24M|        curr->next->prev = curr->prev;
  583|  4.24M|    (*tail)->next = curr;
  584|  4.24M|    curr->prev = *tail;
  585|       |    curr->next = NULL;
  586|  4.24M|    *tail = curr;
  587|  4.24M|}
ssl_ciph.c:ll_append_head:
  591|  3.35M|{
  592|  3.35M|    if (curr == *head)
  ------------------
  |  Branch (592:9): [True: 0, False: 3.35M]
  ------------------
  593|      0|        return;
  594|  3.35M|    if (curr == *tail)
  ------------------
  |  Branch (594:9): [True: 1.49M, False: 1.85M]
  ------------------
  595|  1.49M|        *tail = curr->prev;
  596|  3.35M|    if (curr->next != NULL)
  ------------------
  |  Branch (596:9): [True: 1.85M, False: 1.49M]
  ------------------
  597|  1.85M|        curr->next->prev = curr->prev;
  598|  3.35M|    if (curr->prev != NULL)
  ------------------
  |  Branch (598:9): [True: 3.35M, False: 0]
  ------------------
  599|  3.35M|        curr->prev->next = curr->next;
  600|  3.35M|    (*head)->prev = curr;
  601|  3.35M|    curr->next = *head;
  602|       |    curr->prev = NULL;
  603|  3.35M|    *head = curr;
  604|  3.35M|}
ssl_ciph.c:ssl_cipher_strength_sort:
  879|  7.36k|{
  880|  7.36k|    int32_t max_strength_bits;
  881|  7.36k|    int i, *number_uses;
  882|  7.36k|    CIPHER_ORDER *curr;
  883|       |
  884|       |    /*
  885|       |     * This routine sorts the ciphers with descending strength. The sorting
  886|       |     * must keep the pre-sorted sequence, so we apply the normal sorting
  887|       |     * routine as '+' movement to the end of the list.
  888|       |     */
  889|  7.36k|    max_strength_bits = 0;
  890|  7.36k|    curr = *head_p;
  891|  1.25M|    while (curr != NULL) {
  ------------------
  |  Branch (891:12): [True: 1.24M, False: 7.36k]
  ------------------
  892|  1.24M|        if (curr->active && (curr->cipher->strength_bits > max_strength_bits))
  ------------------
  |  Branch (892:13): [True: 1.24M, False: 0]
  |  Branch (892:29): [True: 7.36k, False: 1.23M]
  ------------------
  893|  7.36k|            max_strength_bits = curr->cipher->strength_bits;
  894|  1.24M|        curr = curr->next;
  895|  1.24M|    }
  896|       |
  897|  7.36k|    number_uses = OPENSSL_calloc(max_strength_bits + 1, sizeof(int));
  ------------------
  |  |  113|  7.36k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  898|  7.36k|    if (number_uses == NULL)
  ------------------
  |  Branch (898:9): [True: 0, False: 7.36k]
  ------------------
  899|      0|        return 0;
  900|       |
  901|       |    /*
  902|       |     * Now find the strength_bits values actually used
  903|       |     */
  904|  7.36k|    curr = *head_p;
  905|  1.25M|    while (curr != NULL) {
  ------------------
  |  Branch (905:12): [True: 1.24M, False: 7.36k]
  ------------------
  906|  1.24M|        if (curr->active)
  ------------------
  |  Branch (906:13): [True: 1.24M, False: 0]
  ------------------
  907|  1.24M|            number_uses[curr->cipher->strength_bits]++;
  908|  1.24M|        curr = curr->next;
  909|  1.24M|    }
  910|       |    /*
  911|       |     * Go through the list of used strength_bits values in descending
  912|       |     * order.
  913|       |     */
  914|  1.89M|    for (i = max_strength_bits; i >= 0; i--)
  ------------------
  |  Branch (914:33): [True: 1.89M, False: 7.36k]
  ------------------
  915|  1.89M|        if (number_uses[i] > 0)
  ------------------
  |  Branch (915:13): [True: 36.8k, False: 1.85M]
  ------------------
  916|  36.8k|            ssl_cipher_apply_rule(0, 0, 0, 0, 0, 0, 0, CIPHER_ORD, i, head_p,
  ------------------
  |  |  144|  36.8k|#define CIPHER_ORD 4
  ------------------
  917|  36.8k|                tail_p);
  918|       |
  919|  7.36k|    OPENSSL_free(number_uses);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  920|  7.36k|    return 1;
  921|  7.36k|}
ssl_ciph.c:ssl_cipher_collect_aliases:
  678|  7.36k|{
  679|  7.36k|    CIPHER_ORDER *ciph_curr;
  680|  7.36k|    const SSL_CIPHER **ca_curr;
  681|  7.36k|    int i;
  682|  7.36k|    uint32_t mask_mkey = ~disabled_mkey;
  683|  7.36k|    uint32_t mask_auth = ~disabled_auth;
  684|  7.36k|    uint32_t mask_enc = ~disabled_enc;
  685|  7.36k|    uint32_t mask_mac = ~disabled_mac;
  686|       |
  687|       |    /*
  688|       |     * First, add the real ciphers as already collected
  689|       |     */
  690|  7.36k|    ciph_curr = head;
  691|  7.36k|    ca_curr = ca_list;
  692|  1.25M|    while (ciph_curr != NULL) {
  ------------------
  |  Branch (692:12): [True: 1.24M, False: 7.36k]
  ------------------
  693|  1.24M|        *ca_curr = ciph_curr->cipher;
  694|  1.24M|        ca_curr++;
  695|  1.24M|        ciph_curr = ciph_curr->next;
  696|  1.24M|    }
  697|       |
  698|       |    /*
  699|       |     * Now we add the available ones from the cipher_aliases[] table.
  700|       |     * They represent either one or more algorithms, some of which
  701|       |     * in any affected category must be supported (set in enabled_mask),
  702|       |     * or represent a cipher strength value (will be added in any case because algorithms=0).
  703|       |     */
  704|   574k|    for (i = 0; i < num_of_group_aliases; i++) {
  ------------------
  |  Branch (704:17): [True: 566k, False: 7.36k]
  ------------------
  705|   566k|        uint32_t algorithm_mkey = cipher_aliases[i].algorithm_mkey;
  706|   566k|        uint32_t algorithm_auth = cipher_aliases[i].algorithm_auth;
  707|   566k|        uint32_t algorithm_enc = cipher_aliases[i].algorithm_enc;
  708|   566k|        uint32_t algorithm_mac = cipher_aliases[i].algorithm_mac;
  709|       |
  710|   566k|        if (algorithm_mkey)
  ------------------
  |  Branch (710:13): [True: 184k, False: 382k]
  ------------------
  711|   184k|            if ((algorithm_mkey & mask_mkey) == 0)
  ------------------
  |  Branch (711:17): [True: 14.7k, False: 169k]
  ------------------
  712|  14.7k|                continue;
  713|       |
  714|   552k|        if (algorithm_auth)
  ------------------
  |  Branch (714:13): [True: 147k, False: 404k]
  ------------------
  715|   147k|            if ((algorithm_auth & mask_auth) == 0)
  ------------------
  |  Branch (715:17): [True: 22.0k, False: 125k]
  ------------------
  716|  22.0k|                continue;
  717|       |
  718|   530k|        if (algorithm_enc)
  ------------------
  |  Branch (718:13): [True: 206k, False: 323k]
  ------------------
  719|   206k|            if ((algorithm_enc & mask_enc) == 0)
  ------------------
  |  Branch (719:17): [True: 44.1k, False: 161k]
  ------------------
  720|  44.1k|                continue;
  721|       |
  722|   485k|        if (algorithm_mac)
  ------------------
  |  Branch (722:13): [True: 73.6k, False: 412k]
  ------------------
  723|  73.6k|            if ((algorithm_mac & mask_mac) == 0)
  ------------------
  |  Branch (723:17): [True: 22.0k, False: 51.5k]
  ------------------
  724|  22.0k|                continue;
  725|       |
  726|   463k|        *ca_curr = (SSL_CIPHER *)(cipher_aliases + i);
  727|   463k|        ca_curr++;
  728|   463k|    }
  729|       |
  730|       |    *ca_curr = NULL; /* end of list */
  731|  7.36k|}
ssl_ciph.c:ssl_cipher_process_rulestr:
  927|  7.36k|{
  928|  7.36k|    uint32_t alg_mkey, alg_auth, alg_enc, alg_mac, algo_strength;
  929|  7.36k|    int min_tls;
  930|  7.36k|    const char *l, *buf;
  931|  7.36k|    int j, multi, found, rule, retval, ok, buflen;
  932|  7.36k|    uint32_t cipher_id = 0;
  933|  7.36k|    char ch;
  934|       |
  935|  7.36k|    retval = 1;
  936|  7.36k|    l = rule_str;
  937|  36.8k|    for (;;) {
  938|  36.8k|        ch = *l;
  939|       |
  940|  36.8k|        if (ch == '\0')
  ------------------
  |  Branch (940:13): [True: 0, False: 36.8k]
  ------------------
  941|      0|            break; /* done */
  942|  36.8k|        if (ch == '-') {
  ------------------
  |  Branch (942:13): [True: 0, False: 36.8k]
  ------------------
  943|      0|            rule = CIPHER_DEL;
  ------------------
  |  |  143|      0|#define CIPHER_DEL 3
  ------------------
  944|      0|            l++;
  945|  36.8k|        } else if (ch == '+') {
  ------------------
  |  Branch (945:20): [True: 0, False: 36.8k]
  ------------------
  946|      0|            rule = CIPHER_ORD;
  ------------------
  |  |  144|      0|#define CIPHER_ORD 4
  ------------------
  947|      0|            l++;
  948|  36.8k|        } else if (ch == '!') {
  ------------------
  |  Branch (948:20): [True: 14.7k, False: 22.0k]
  ------------------
  949|  14.7k|            rule = CIPHER_KILL;
  ------------------
  |  |  142|  14.7k|#define CIPHER_KILL 2
  ------------------
  950|  14.7k|            l++;
  951|  22.0k|        } else if (ch == '@') {
  ------------------
  |  Branch (951:20): [True: 0, False: 22.0k]
  ------------------
  952|      0|            rule = CIPHER_SPECIAL;
  ------------------
  |  |  145|      0|#define CIPHER_SPECIAL 5
  ------------------
  953|      0|            l++;
  954|  22.0k|        } else {
  955|  22.0k|            rule = CIPHER_ADD;
  ------------------
  |  |  141|  22.0k|#define CIPHER_ADD 1
  ------------------
  956|  22.0k|        }
  957|       |
  958|  36.8k|        if (ITEM_SEP(ch)) {
  ------------------
  |  |  570|  36.8k|    (((a) == ':') || ((a) == ' ') || ((a) == ';') || ((a) == ','))
  |  |  ------------------
  |  |  |  Branch (570:6): [True: 14.7k, False: 22.0k]
  |  |  |  Branch (570:22): [True: 0, False: 22.0k]
  |  |  |  Branch (570:38): [True: 0, False: 22.0k]
  |  |  |  Branch (570:54): [True: 0, False: 22.0k]
  |  |  ------------------
  ------------------
  959|  14.7k|            l++;
  960|  14.7k|            continue;
  961|  14.7k|        }
  962|       |
  963|  22.0k|        alg_mkey = 0;
  964|  22.0k|        alg_auth = 0;
  965|  22.0k|        alg_enc = 0;
  966|  22.0k|        alg_mac = 0;
  967|  22.0k|        min_tls = 0;
  968|  22.0k|        algo_strength = 0;
  969|       |
  970|  22.0k|        for (;;) {
  971|  22.0k|            ch = *l;
  972|  22.0k|            buf = l;
  973|  22.0k|            buflen = 0;
  974|  22.0k|#ifndef CHARSET_EBCDIC
  975|   220k|            while (((ch >= 'A') && (ch <= 'Z')) || ((ch >= '0') && (ch <= '9')) || ((ch >= 'a') && (ch <= 'z')) || (ch == '-') || (ch == '_') || (ch == '.') || (ch == '='))
  ------------------
  |  Branch (975:21): [True: 198k, False: 22.0k]
  |  Branch (975:36): [True: 191k, False: 7.36k]
  |  Branch (975:53): [True: 22.0k, False: 7.36k]
  |  Branch (975:68): [True: 0, False: 22.0k]
  |  Branch (975:85): [True: 7.36k, False: 22.0k]
  |  Branch (975:100): [True: 7.36k, False: 0]
  |  Branch (975:116): [True: 0, False: 22.0k]
  |  Branch (975:131): [True: 0, False: 22.0k]
  |  Branch (975:146): [True: 0, False: 22.0k]
  |  Branch (975:161): [True: 0, False: 22.0k]
  ------------------
  976|       |#else
  977|       |            while (isalnum((unsigned char)ch) || (ch == '-') || (ch == '_') || (ch == '.')
  978|       |                || (ch == '='))
  979|       |#endif
  980|   198k|            {
  981|   198k|                ch = *(++l);
  982|   198k|                buflen++;
  983|   198k|            }
  984|       |
  985|  22.0k|            if (buflen == 0) {
  ------------------
  |  Branch (985:17): [True: 0, False: 22.0k]
  ------------------
  986|       |                /*
  987|       |                 * We hit something we cannot deal with,
  988|       |                 * it is no command or separator nor
  989|       |                 * alphanumeric, so we call this an error.
  990|       |                 */
  991|      0|                ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_COMMAND);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  992|      0|                return 0;
  993|      0|            }
  994|       |
  995|  22.0k|            if (rule == CIPHER_SPECIAL) {
  ------------------
  |  |  145|  22.0k|#define CIPHER_SPECIAL 5
  ------------------
  |  Branch (995:17): [True: 0, False: 22.0k]
  ------------------
  996|      0|                found = 0; /* unused -- avoid compiler warning */
  997|      0|                break; /* special treatment */
  998|      0|            }
  999|       |
 1000|       |            /* check for multi-part specification */
 1001|  22.0k|            if (ch == '+') {
  ------------------
  |  Branch (1001:17): [True: 0, False: 22.0k]
  ------------------
 1002|      0|                multi = 1;
 1003|      0|                l++;
 1004|  22.0k|            } else {
 1005|  22.0k|                multi = 0;
 1006|  22.0k|            }
 1007|       |
 1008|       |            /*
 1009|       |             * Now search for the cipher alias in the ca_list. Be careful
 1010|       |             * with the strncmp, because the "buflen" limitation
 1011|       |             * will make the rule "ADH:SOME" and the cipher
 1012|       |             * "ADH-MY-CIPHER" look like a match for buflen=3.
 1013|       |             * So additionally check whether the cipher name found
 1014|       |             * has the correct length. We can save a strlen() call:
 1015|       |             * just checking for the '\0' at the right place is
 1016|       |             * sufficient, we have to strncmp() anyway. (We cannot
 1017|       |             * use strcasecmp(), because buf is not '\0' terminated.)
 1018|       |             */
 1019|  22.0k|            j = found = 0;
 1020|  22.0k|            cipher_id = 0;
 1021|  4.02M|            while (ca_list[j]) {
  ------------------
  |  Branch (1021:20): [True: 4.02M, False: 0]
  ------------------
 1022|  4.02M|                if (OPENSSL_strncasecmp(buf, ca_list[j]->name, buflen) == 0
  ------------------
  |  Branch (1022:21): [True: 22.0k, False: 3.99M]
  ------------------
 1023|  22.0k|                    && (ca_list[j]->name[buflen] == '\0')) {
  ------------------
  |  Branch (1023:24): [True: 22.0k, False: 0]
  ------------------
 1024|  22.0k|                    found = 1;
 1025|  22.0k|                    break;
 1026|  3.99M|                } else if (ca_list[j]->stdname != NULL
  ------------------
  |  Branch (1026:28): [True: 3.73M, False: 265k]
  ------------------
 1027|  3.73M|                    && OPENSSL_strncasecmp(buf, ca_list[j]->stdname, buflen) == 0
  ------------------
  |  Branch (1027:24): [True: 0, False: 3.73M]
  ------------------
 1028|      0|                    && ca_list[j]->stdname[buflen] == '\0') {
  ------------------
  |  Branch (1028:24): [True: 0, False: 0]
  ------------------
 1029|      0|                    found = 1;
 1030|      0|                    break;
 1031|      0|                } else
 1032|  3.99M|                    j++;
 1033|  4.02M|            }
 1034|       |
 1035|  22.0k|            if (!found)
  ------------------
  |  Branch (1035:17): [True: 0, False: 22.0k]
  ------------------
 1036|      0|                break; /* ignore this entry */
 1037|       |
 1038|  22.0k|            if (ca_list[j]->algorithm_mkey) {
  ------------------
  |  Branch (1038:17): [True: 0, False: 22.0k]
  ------------------
 1039|      0|                if (alg_mkey) {
  ------------------
  |  Branch (1039:21): [True: 0, False: 0]
  ------------------
 1040|      0|                    alg_mkey &= ca_list[j]->algorithm_mkey;
 1041|      0|                    if (!alg_mkey) {
  ------------------
  |  Branch (1041:25): [True: 0, False: 0]
  ------------------
 1042|      0|                        found = 0;
 1043|      0|                        break;
 1044|      0|                    }
 1045|      0|                } else {
 1046|      0|                    alg_mkey = ca_list[j]->algorithm_mkey;
 1047|      0|                }
 1048|      0|            }
 1049|       |
 1050|  22.0k|            if (ca_list[j]->algorithm_auth) {
  ------------------
  |  Branch (1050:17): [True: 0, False: 22.0k]
  ------------------
 1051|      0|                if (alg_auth) {
  ------------------
  |  Branch (1051:21): [True: 0, False: 0]
  ------------------
 1052|      0|                    alg_auth &= ca_list[j]->algorithm_auth;
 1053|      0|                    if (!alg_auth) {
  ------------------
  |  Branch (1053:25): [True: 0, False: 0]
  ------------------
 1054|      0|                        found = 0;
 1055|      0|                        break;
 1056|      0|                    }
 1057|      0|                } else {
 1058|      0|                    alg_auth = ca_list[j]->algorithm_auth;
 1059|      0|                }
 1060|      0|            }
 1061|       |
 1062|  22.0k|            if (ca_list[j]->algorithm_enc) {
  ------------------
  |  Branch (1062:17): [True: 14.7k, False: 7.36k]
  ------------------
 1063|  14.7k|                if (alg_enc) {
  ------------------
  |  Branch (1063:21): [True: 0, False: 14.7k]
  ------------------
 1064|      0|                    alg_enc &= ca_list[j]->algorithm_enc;
 1065|      0|                    if (!alg_enc) {
  ------------------
  |  Branch (1065:25): [True: 0, False: 0]
  ------------------
 1066|      0|                        found = 0;
 1067|      0|                        break;
 1068|      0|                    }
 1069|  14.7k|                } else {
 1070|  14.7k|                    alg_enc = ca_list[j]->algorithm_enc;
 1071|  14.7k|                }
 1072|  14.7k|            }
 1073|       |
 1074|  22.0k|            if (ca_list[j]->algorithm_mac) {
  ------------------
  |  Branch (1074:17): [True: 0, False: 22.0k]
  ------------------
 1075|      0|                if (alg_mac) {
  ------------------
  |  Branch (1075:21): [True: 0, False: 0]
  ------------------
 1076|      0|                    alg_mac &= ca_list[j]->algorithm_mac;
 1077|      0|                    if (!alg_mac) {
  ------------------
  |  Branch (1077:25): [True: 0, False: 0]
  ------------------
 1078|      0|                        found = 0;
 1079|      0|                        break;
 1080|      0|                    }
 1081|      0|                } else {
 1082|      0|                    alg_mac = ca_list[j]->algorithm_mac;
 1083|      0|                }
 1084|      0|            }
 1085|       |
 1086|  22.0k|            if (ca_list[j]->algo_strength & SSL_STRONG_MASK) {
  ------------------
  |  |  249|  22.0k|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (1086:17): [True: 0, False: 22.0k]
  ------------------
 1087|      0|                if (algo_strength & SSL_STRONG_MASK) {
  ------------------
  |  |  249|      0|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (1087:21): [True: 0, False: 0]
  ------------------
 1088|      0|                    algo_strength &= (ca_list[j]->algo_strength & SSL_STRONG_MASK) | ~SSL_STRONG_MASK;
  ------------------
  |  |  249|      0|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
                                  algo_strength &= (ca_list[j]->algo_strength & SSL_STRONG_MASK) | ~SSL_STRONG_MASK;
  ------------------
  |  |  249|      0|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
 1089|      0|                    if (!(algo_strength & SSL_STRONG_MASK)) {
  ------------------
  |  |  249|      0|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (1089:25): [True: 0, False: 0]
  ------------------
 1090|      0|                        found = 0;
 1091|      0|                        break;
 1092|      0|                    }
 1093|      0|                } else {
 1094|      0|                    algo_strength = ca_list[j]->algo_strength & SSL_STRONG_MASK;
  ------------------
  |  |  249|      0|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
 1095|      0|                }
 1096|      0|            }
 1097|       |
 1098|  22.0k|            if (ca_list[j]->algo_strength & SSL_DEFAULT_MASK) {
  ------------------
  |  |  250|  22.0k|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (1098:17): [True: 7.36k, False: 14.7k]
  ------------------
 1099|  7.36k|                if (algo_strength & SSL_DEFAULT_MASK) {
  ------------------
  |  |  250|  7.36k|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (1099:21): [True: 0, False: 7.36k]
  ------------------
 1100|      0|                    algo_strength &= (ca_list[j]->algo_strength & SSL_DEFAULT_MASK) | ~SSL_DEFAULT_MASK;
  ------------------
  |  |  250|      0|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
                                  algo_strength &= (ca_list[j]->algo_strength & SSL_DEFAULT_MASK) | ~SSL_DEFAULT_MASK;
  ------------------
  |  |  250|      0|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
 1101|      0|                    if (!(algo_strength & SSL_DEFAULT_MASK)) {
  ------------------
  |  |  250|      0|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (1101:25): [True: 0, False: 0]
  ------------------
 1102|      0|                        found = 0;
 1103|      0|                        break;
 1104|      0|                    }
 1105|  7.36k|                } else {
 1106|  7.36k|                    algo_strength |= ca_list[j]->algo_strength & SSL_DEFAULT_MASK;
  ------------------
  |  |  250|  7.36k|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
 1107|  7.36k|                }
 1108|  7.36k|            }
 1109|       |
 1110|  22.0k|            if (ca_list[j]->valid) {
  ------------------
  |  Branch (1110:17): [True: 0, False: 22.0k]
  ------------------
 1111|       |                /*
 1112|       |                 * explicit ciphersuite found; its protocol version does not
 1113|       |                 * become part of the search pattern!
 1114|       |                 */
 1115|       |
 1116|      0|                cipher_id = ca_list[j]->id;
 1117|  22.0k|            } else {
 1118|       |                /*
 1119|       |                 * not an explicit ciphersuite; only in this case, the
 1120|       |                 * protocol version is considered part of the search pattern
 1121|       |                 */
 1122|       |
 1123|  22.0k|                if (ca_list[j]->min_tls) {
  ------------------
  |  Branch (1123:21): [True: 0, False: 22.0k]
  ------------------
 1124|      0|                    if (min_tls != 0 && min_tls != ca_list[j]->min_tls) {
  ------------------
  |  Branch (1124:25): [True: 0, False: 0]
  |  Branch (1124:41): [True: 0, False: 0]
  ------------------
 1125|      0|                        found = 0;
 1126|      0|                        break;
 1127|      0|                    } else {
 1128|      0|                        min_tls = ca_list[j]->min_tls;
 1129|      0|                    }
 1130|      0|                }
 1131|  22.0k|            }
 1132|       |
 1133|  22.0k|            if (!multi)
  ------------------
  |  Branch (1133:17): [True: 22.0k, False: 0]
  ------------------
 1134|  22.0k|                break;
 1135|  22.0k|        }
 1136|       |
 1137|       |        /*
 1138|       |         * Ok, we have the rule, now apply it
 1139|       |         */
 1140|  22.0k|        if (rule == CIPHER_SPECIAL) { /* special command */
  ------------------
  |  |  145|  22.0k|#define CIPHER_SPECIAL 5
  ------------------
  |  Branch (1140:13): [True: 0, False: 22.0k]
  ------------------
 1141|      0|            ok = 0;
 1142|      0|            if ((buflen == 8) && HAS_CASE_PREFIX(buf, "STRENGTH")) {
  ------------------
  |  |   63|      0|#define HAS_CASE_PREFIX(s, p) (OPENSSL_strncasecmp(s, p "", sizeof(p) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (63:31): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1142:17): [True: 0, False: 0]
  ------------------
 1143|      0|                ok = ssl_cipher_strength_sort(head_p, tail_p);
 1144|      0|            } else if (buflen == 10
  ------------------
  |  Branch (1144:24): [True: 0, False: 0]
  ------------------
 1145|      0|                && CHECK_AND_SKIP_CASE_PREFIX(buf, "SECLEVEL=")) {
  ------------------
  |  |   66|      0|    (HAS_CASE_PREFIX(str, pre) ? ((str) += sizeof(pre) - 1, 1) : 0)
  |  |  ------------------
  |  |  |  |   63|      0|#define HAS_CASE_PREFIX(s, p) (OPENSSL_strncasecmp(s, p "", sizeof(p) - 1) == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (63:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (66:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1146|      0|                int level = *buf - '0';
 1147|      0|                if (level < 0 || level > 5) {
  ------------------
  |  Branch (1147:21): [True: 0, False: 0]
  |  Branch (1147:34): [True: 0, False: 0]
  ------------------
 1148|      0|                    ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_COMMAND);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1149|      0|                } else {
 1150|      0|                    c->sec_level = level;
 1151|      0|                    ok = 1;
 1152|      0|                }
 1153|      0|            } else {
 1154|      0|                ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_COMMAND);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1155|      0|            }
 1156|      0|            if (ok == 0)
  ------------------
  |  Branch (1156:17): [True: 0, False: 0]
  ------------------
 1157|      0|                retval = 0;
 1158|       |            /*
 1159|       |             * We do not support any "multi" options
 1160|       |             * together with "@", so throw away the
 1161|       |             * rest of the command, if any left, until
 1162|       |             * end or ':' is found.
 1163|       |             */
 1164|      0|            while ((*l != '\0') && !ITEM_SEP(*l))
  ------------------
  |  |  570|      0|    (((a) == ':') || ((a) == ' ') || ((a) == ';') || ((a) == ','))
  |  |  ------------------
  |  |  |  Branch (570:6): [True: 0, False: 0]
  |  |  |  Branch (570:22): [True: 0, False: 0]
  |  |  |  Branch (570:38): [True: 0, False: 0]
  |  |  |  Branch (570:54): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1164:20): [True: 0, False: 0]
  ------------------
 1165|      0|                l++;
 1166|  22.0k|        } else if (found) {
  ------------------
  |  Branch (1166:20): [True: 22.0k, False: 0]
  ------------------
 1167|  22.0k|            ssl_cipher_apply_rule(cipher_id,
 1168|  22.0k|                alg_mkey, alg_auth, alg_enc, alg_mac,
 1169|  22.0k|                min_tls, algo_strength, rule, -1, head_p,
 1170|  22.0k|                tail_p);
 1171|  22.0k|        } else {
 1172|      0|            while ((*l != '\0') && !ITEM_SEP(*l))
  ------------------
  |  |  570|      0|    (((a) == ':') || ((a) == ' ') || ((a) == ';') || ((a) == ','))
  |  |  ------------------
  |  |  |  Branch (570:6): [True: 0, False: 0]
  |  |  |  Branch (570:22): [True: 0, False: 0]
  |  |  |  Branch (570:38): [True: 0, False: 0]
  |  |  |  Branch (570:54): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1172:20): [True: 0, False: 0]
  ------------------
 1173|      0|                l++;
 1174|      0|        }
 1175|  22.0k|        if (*l == '\0')
  ------------------
  |  Branch (1175:13): [True: 7.36k, False: 14.7k]
  ------------------
 1176|  7.36k|            break; /* done */
 1177|  22.0k|    }
 1178|       |
 1179|  7.36k|    return retval;
 1180|  7.36k|}
ssl_ciph.c:update_cipher_list_by_id:
 1289|  7.36k|{
 1290|  7.36k|    STACK_OF(SSL_CIPHER) *tmp_cipher_list = sk_SSL_CIPHER_dup(cipherstack);
  ------------------
  |  |   33|  7.36k|#define STACK_OF(type) struct stack_st_##type
  ------------------
                  STACK_OF(SSL_CIPHER) *tmp_cipher_list = sk_SSL_CIPHER_dup(cipherstack);
  ------------------
  |  | 1050|  7.36k|#define sk_SSL_CIPHER_dup(sk) ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_dup(ossl_check_const_SSL_CIPHER_sk_type(sk)))
  ------------------
 1291|       |
 1292|  7.36k|    if (tmp_cipher_list == NULL) {
  ------------------
  |  Branch (1292:9): [True: 0, False: 7.36k]
  ------------------
 1293|      0|        return 0;
 1294|      0|    }
 1295|       |
 1296|  7.36k|    sk_SSL_CIPHER_free(*cipher_list_by_id);
  ------------------
  |  | 1034|  7.36k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1297|  7.36k|    *cipher_list_by_id = tmp_cipher_list;
 1298|       |
 1299|  7.36k|    (void)sk_SSL_CIPHER_set_cmp_func(*cipher_list_by_id, ssl_cipher_ptr_id_cmp);
  ------------------
  |  | 1052|  7.36k|#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)))
  ------------------
 1300|  7.36k|    sk_SSL_CIPHER_sort(*cipher_list_by_id);
  ------------------
  |  | 1048|  7.36k|#define sk_SSL_CIPHER_sort(sk) OPENSSL_sk_sort(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1301|       |
 1302|  7.36k|    return 1;
 1303|  7.36k|}

SSL_CONF_CTX_free:
 1115|  7.36k|{
 1116|  7.36k|    if (cctx) {
  ------------------
  |  Branch (1116:9): [True: 0, False: 7.36k]
  ------------------
 1117|      0|        free_cert_filename(cctx);
 1118|      0|        OPENSSL_free(cctx->prefix);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#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);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1121|      0|    }
 1122|  7.36k|}

OPENSSL_init_ssl:
   47|  21.7k|{
   48|  21.7k|    static int stoperrset = 0;
   49|       |
   50|  21.7k|    if (stopped) {
  ------------------
  |  Branch (50:9): [True: 0, False: 21.7k]
  ------------------
   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);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   59|      0|        }
   60|      0|        return 0;
   61|      0|    }
   62|       |
   63|  21.7k|    opts |= OPENSSL_INIT_ADD_ALL_CIPHERS
  ------------------
  |  |  507|  21.7k|#define OPENSSL_INIT_ADD_ALL_CIPHERS 0x00000004L
  ------------------
   64|  21.7k|        | OPENSSL_INIT_ADD_ALL_DIGESTS;
  ------------------
  |  |  508|  21.7k|#define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
  ------------------
   65|  21.7k|#ifndef OPENSSL_NO_AUTOLOAD_CONFIG
   66|  21.7k|    if ((opts & OPENSSL_INIT_NO_LOAD_CONFIG) == 0)
  ------------------
  |  |  512|  21.7k|#define OPENSSL_INIT_NO_LOAD_CONFIG 0x00000080L
  ------------------
  |  Branch (66:9): [True: 21.7k, False: 0]
  ------------------
   67|  21.7k|        opts |= OPENSSL_INIT_LOAD_CONFIG;
  ------------------
  |  |  511|  21.7k|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
   68|  21.7k|#endif
   69|       |
   70|  21.7k|    if (!OPENSSL_init_crypto(opts, settings))
  ------------------
  |  Branch (70:9): [True: 0, False: 21.7k]
  ------------------
   71|      0|        return 0;
   72|       |
   73|  21.7k|    if (!RUN_ONCE(&ssl_base, ossl_init_ssl_base))
  ------------------
  |  |  130|  21.7k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 21.7k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (73:9): [True: 0, False: 21.7k]
  ------------------
   74|      0|        return 0;
   75|       |
   76|  21.7k|    return 1;
   77|  21.7k|}
ssl_init.c:ossl_init_ssl_base:
   25|      2|{
   26|      2|#ifndef OPENSSL_NO_COMP
   27|      2|    OSSL_TRACE(INIT, "ossl_init_ssl_base: "
  ------------------
  |  |  288|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      2|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   28|      2|                     "SSL_COMP_get_compression_methods()\n");
   29|       |    /*
   30|       |     * This will initialise the built-in compression algorithms. The value
   31|       |     * returned is a STACK_OF(SSL_COMP), but that can be discarded safely
   32|       |     */
   33|      2|    SSL_COMP_get_compression_methods();
   34|      2|#endif
   35|      2|    ssl_sort_cipher_list();
   36|      2|    OSSL_TRACE(INIT, "ossl_init_ssl_base: SSL_add_ssl_module()\n");
  ------------------
  |  |  288|      2|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      2|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   37|      2|    ssl_base_inited = 1;
   38|      2|    return 1;
   39|      2|}

SSL_clear:
  561|  7.25k|{
  562|  7.25k|    if (s->method == NULL) {
  ------------------
  |  Branch (562:9): [True: 0, False: 7.25k]
  ------------------
  563|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_NO_METHOD_SPECIFIED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  564|      0|        return 0;
  565|      0|    }
  566|       |
  567|  7.25k|    return s->method->ssl_reset(s);
  568|  7.25k|}
ossl_ssl_connection_reset:
  571|  14.5k|{
  572|  14.5k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  14.5k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  14.5k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 14.5k]
  |  |  |  |  ------------------
  |  |  |  |   33|  14.5k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  14.5k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 14.5k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  14.5k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  14.5k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  573|       |
  574|  14.5k|    if (sc == NULL)
  ------------------
  |  Branch (574:9): [True: 0, False: 14.5k]
  ------------------
  575|      0|        return 0;
  576|       |
  577|  14.5k|    if (ssl_clear_bad_session(sc)) {
  ------------------
  |  Branch (577:9): [True: 0, False: 14.5k]
  ------------------
  578|      0|        SSL_SESSION_free(sc->session);
  579|      0|        sc->session = NULL;
  580|      0|    }
  581|  14.5k|    SSL_SESSION_free(sc->psksession);
  582|  14.5k|    sc->psksession = NULL;
  583|  14.5k|    OPENSSL_free(sc->psksession_id);
  ------------------
  |  |  132|  14.5k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  584|  14.5k|    sc->psksession_id = NULL;
  585|  14.5k|    sc->psksession_id_len = 0;
  586|  14.5k|    sc->hello_retry_request = SSL_HRR_NONE;
  587|  14.5k|    sc->sent_tickets = 0;
  588|       |
  589|  14.5k|    sc->error = 0;
  590|  14.5k|    sc->hit = 0;
  591|  14.5k|    sc->shutdown = 0;
  592|       |
  593|  14.5k|    if (sc->renegotiate) {
  ------------------
  |  Branch (593:9): [True: 0, False: 14.5k]
  ------------------
  594|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  595|      0|        return 0;
  596|      0|    }
  597|       |
  598|  14.5k|    ossl_statem_clear(sc);
  599|       |
  600|  14.5k|    sc->version = s->method->version;
  601|  14.5k|    sc->client_version = sc->version;
  602|  14.5k|    sc->rwstate = SSL_NOTHING;
  ------------------
  |  |  955|  14.5k|#define SSL_NOTHING 1
  ------------------
  603|       |
  604|  14.5k|    BUF_MEM_free(sc->init_buf);
  605|  14.5k|    sc->init_buf = NULL;
  606|  14.5k|    sc->first_packet = 0;
  607|       |
  608|  14.5k|    sc->key_update = SSL_KEY_UPDATE_NONE;
  ------------------
  |  | 1071|  14.5k|#define SSL_KEY_UPDATE_NONE -1
  ------------------
  609|  14.5k|    memset(sc->ext.compress_certificate_from_peer, 0,
  610|  14.5k|        sizeof(sc->ext.compress_certificate_from_peer));
  611|  14.5k|    sc->ext.compress_certificate_sent = 0;
  612|       |
  613|  14.5k|    EVP_MD_CTX_free(sc->pha_dgst);
  614|  14.5k|    sc->pha_dgst = NULL;
  615|       |
  616|       |    /* Reset DANE verification result state */
  617|  14.5k|    sc->dane.mdpth = -1;
  618|  14.5k|    sc->dane.pdpth = -1;
  619|  14.5k|    X509_free(sc->dane.mcert);
  620|  14.5k|    sc->dane.mcert = NULL;
  621|  14.5k|    sc->dane.mtlsa = NULL;
  622|       |
  623|       |    /* Clear the verification result peername */
  624|  14.5k|    X509_VERIFY_PARAM_move_peername(sc->param, NULL);
  625|       |
  626|       |    /* Clear any shared connection state */
  627|  14.5k|    OPENSSL_free(sc->shared_sigalgs);
  ------------------
  |  |  132|  14.5k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  628|  14.5k|    sc->shared_sigalgs = NULL;
  629|  14.5k|    sc->shared_sigalgslen = 0;
  630|       |
  631|       |    /*
  632|       |     * Check to see if we were changed into a different method, if so, revert
  633|       |     * back.
  634|       |     */
  635|  14.5k|    if (s->method != s->defltmeth) {
  ------------------
  |  Branch (635:9): [True: 0, False: 14.5k]
  ------------------
  636|      0|        s->method->ssl_deinit(s);
  637|      0|        s->method = s->defltmeth;
  638|      0|        if (!s->method->ssl_init(s))
  ------------------
  |  Branch (638:13): [True: 0, False: 0]
  ------------------
  639|      0|            return 0;
  640|  14.5k|    } else {
  641|  14.5k|        if (!s->method->ssl_clear(s))
  ------------------
  |  Branch (641:13): [True: 0, False: 14.5k]
  ------------------
  642|      0|            return 0;
  643|  14.5k|    }
  644|       |
  645|  14.5k|    ossl_quic_tls_clear(sc->qtls);
  646|       |
  647|  14.5k|    if (!RECORD_LAYER_reset(&sc->rlayer))
  ------------------
  |  Branch (647:9): [True: 0, False: 14.5k]
  ------------------
  648|      0|        return 0;
  649|       |
  650|  14.5k|    return 1;
  651|  14.5k|}
SSL_new:
  684|  7.25k|{
  685|  7.25k|    if (ctx == NULL) {
  ------------------
  |  Branch (685:9): [True: 0, False: 7.25k]
  ------------------
  686|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_NULL_SSL_CTX);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  687|      0|        return NULL;
  688|      0|    }
  689|  7.25k|    if (ctx->method == NULL) {
  ------------------
  |  Branch (689:9): [True: 0, False: 7.25k]
  ------------------
  690|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  691|      0|        return NULL;
  692|      0|    }
  693|  7.25k|    return ctx->method->ssl_new(ctx);
  694|  7.25k|}
ossl_ssl_init:
  697|  7.25k|{
  698|  7.25k|    if (!SSL_CTX_up_ref(ctx))
  ------------------
  |  Branch (698:9): [True: 0, False: 7.25k]
  ------------------
  699|      0|        return 0;
  700|       |
  701|  7.25k|    ssl->lock = CRYPTO_THREAD_lock_new();
  702|       |
  703|  7.25k|    if (ssl->lock == NULL || !CRYPTO_NEW_REF(&ssl->references, 1))
  ------------------
  |  Branch (703:9): [True: 0, False: 7.25k]
  |  Branch (703:30): [True: 0, False: 7.25k]
  ------------------
  704|      0|        goto err;
  705|       |
  706|  7.25k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL, ssl, &ssl->ex_data)) {
  ------------------
  |  |  251|  7.25k|#define CRYPTO_EX_INDEX_SSL 0
  ------------------
  |  Branch (706:9): [True: 0, False: 7.25k]
  ------------------
  707|      0|        CRYPTO_FREE_REF(&ssl->references);
  708|      0|        goto err;
  709|      0|    }
  710|       |
  711|  7.25k|    ssl->ctx = ctx;
  712|  7.25k|    ssl->type = type;
  713|  7.25k|    ssl->defltmeth = ssl->method = method;
  714|       |
  715|  7.25k|    return 1;
  716|       |
  717|      0|err:
  718|      0|    CRYPTO_THREAD_lock_free(ssl->lock);
  719|       |    ssl->lock = NULL;
  720|      0|    SSL_CTX_free(ctx);
  721|      0|    return 0;
  722|  7.25k|}
ossl_ssl_connection_new_int:
  726|  7.25k|{
  727|  7.25k|    SSL_CONNECTION *s;
  728|  7.25k|    SSL *ssl;
  729|       |
  730|  7.25k|    s = OPENSSL_zalloc(sizeof(*s));
  ------------------
  |  |  109|  7.25k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  731|  7.25k|    if (s == NULL)
  ------------------
  |  Branch (731:9): [True: 0, False: 7.25k]
  ------------------
  732|      0|        return NULL;
  733|       |
  734|  7.25k|    ssl = &s->ssl;
  735|  7.25k|    s->user_ssl = (user_ssl == NULL) ? ssl : user_ssl;
  ------------------
  |  Branch (735:19): [True: 7.25k, False: 0]
  ------------------
  736|       |
  737|  7.25k|    if (!ossl_ssl_init(ssl, ctx, method, SSL_TYPE_SSL_CONNECTION)) {
  ------------------
  |  | 1225|  7.25k|#define SSL_TYPE_SSL_CONNECTION 0
  ------------------
  |  Branch (737:9): [True: 0, False: 7.25k]
  ------------------
  738|      0|        OPENSSL_free(s);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  739|      0|        s = NULL;
  740|      0|        ssl = NULL;
  741|      0|        goto sslerr;
  742|      0|    }
  743|       |
  744|  7.25k|    RECORD_LAYER_init(&s->rlayer, s);
  745|       |
  746|  7.25k|    s->options = ctx->options;
  747|       |
  748|  7.25k|    s->dane.flags = ctx->dane.flags;
  749|  7.25k|    if (method->version == ctx->method->version) {
  ------------------
  |  Branch (749:9): [True: 7.25k, False: 0]
  ------------------
  750|  7.25k|        s->min_proto_version = ctx->min_proto_version;
  751|  7.25k|        s->max_proto_version = ctx->max_proto_version;
  752|  7.25k|    }
  753|       |
  754|  7.25k|    s->mode = ctx->mode;
  755|  7.25k|    s->max_cert_list = ctx->max_cert_list;
  756|  7.25k|    s->max_early_data = ctx->max_early_data;
  757|  7.25k|    s->recv_max_early_data = ctx->recv_max_early_data;
  758|       |
  759|  7.25k|    s->num_tickets = ctx->num_tickets;
  760|  7.25k|    s->pha_enabled = ctx->pha_enabled;
  761|       |
  762|       |    /* Shallow copy of the ciphersuites stack */
  763|  7.25k|    s->tls13_ciphersuites = sk_SSL_CIPHER_dup(ctx->tls13_ciphersuites);
  ------------------
  |  | 1050|  7.25k|#define sk_SSL_CIPHER_dup(sk) ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_dup(ossl_check_const_SSL_CIPHER_sk_type(sk)))
  ------------------
  764|  7.25k|    if (s->tls13_ciphersuites == NULL)
  ------------------
  |  Branch (764:9): [True: 0, False: 7.25k]
  ------------------
  765|      0|        goto cerr;
  766|       |
  767|       |    /*
  768|       |     * Earlier library versions used to copy the pointer to the CERT, not
  769|       |     * its contents; only when setting new parameters for the per-SSL
  770|       |     * copy, ssl_cert_new would be called (and the direct reference to
  771|       |     * the per-SSL_CTX settings would be lost, but those still were
  772|       |     * indirectly accessed for various purposes, and for that reason they
  773|       |     * used to be known as s->ctx->default_cert). Now we don't look at the
  774|       |     * SSL_CTX's CERT after having duplicated it once.
  775|       |     */
  776|  7.25k|    s->cert = ssl_cert_dup(ctx->cert);
  777|  7.25k|    if (s->cert == NULL)
  ------------------
  |  Branch (777:9): [True: 0, False: 7.25k]
  ------------------
  778|      0|        goto sslerr;
  779|       |
  780|  7.25k|    RECORD_LAYER_set_read_ahead(&s->rlayer, ctx->read_ahead);
  ------------------
  |  |  134|  7.25k|#define RECORD_LAYER_set_read_ahead(rl, ra) ((rl)->read_ahead = (ra))
  ------------------
  781|  7.25k|    s->msg_callback = ctx->msg_callback;
  782|  7.25k|    s->msg_callback_arg = ctx->msg_callback_arg;
  783|  7.25k|    s->verify_mode = ctx->verify_mode;
  784|  7.25k|    s->not_resumable_session_cb = ctx->not_resumable_session_cb;
  785|  7.25k|    s->rlayer.record_padding_cb = ctx->record_padding_cb;
  786|  7.25k|    s->rlayer.record_padding_arg = ctx->record_padding_arg;
  787|  7.25k|    s->rlayer.block_padding = ctx->block_padding;
  788|  7.25k|    s->rlayer.hs_padding = ctx->hs_padding;
  789|  7.25k|    s->sid_ctx_length = ctx->sid_ctx_length;
  790|  7.25k|    if (!ossl_assert(s->sid_ctx_length <= sizeof(s->sid_ctx)))
  ------------------
  |  |   52|  7.25k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  7.25k|    __FILE__, __LINE__)
  ------------------
  |  Branch (790:9): [True: 0, False: 7.25k]
  ------------------
  791|      0|        goto err;
  792|  7.25k|    memcpy(&s->sid_ctx, &ctx->sid_ctx, sizeof(s->sid_ctx));
  793|  7.25k|    s->verify_callback = ctx->default_verify_callback;
  794|  7.25k|    s->generate_session_id = ctx->generate_session_id;
  795|       |
  796|  7.25k|    s->param = X509_VERIFY_PARAM_new();
  797|  7.25k|    if (s->param == NULL)
  ------------------
  |  Branch (797:9): [True: 0, False: 7.25k]
  ------------------
  798|      0|        goto asn1err;
  799|  7.25k|    X509_VERIFY_PARAM_inherit(s->param, ctx->param);
  800|  7.25k|    s->quiet_shutdown = IS_QUIC_CTX(ctx) ? 0 : ctx->quiet_shutdown;
  ------------------
  |  |   54|  7.25k|#define IS_QUIC_CTX(ctx) IS_QUIC_METHOD((ctx)->method)
  |  |  ------------------
  |  |  |  |   52|  7.25k|    ((m) == OSSL_QUIC_client_method() || (m) == OSSL_QUIC_client_thread_method() || (m) == OSSL_QUIC_server_method() || (m) == OSSL_QUIC_method())
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:6): [True: 0, False: 7.25k]
  |  |  |  |  |  Branch (52:42): [True: 0, False: 7.25k]
  |  |  |  |  |  Branch (52:85): [True: 0, False: 7.25k]
  |  |  |  |  |  Branch (52:121): [True: 0, False: 7.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  801|       |
  802|  7.25k|    if (!IS_QUIC_CTX(ctx))
  ------------------
  |  |   54|  7.25k|#define IS_QUIC_CTX(ctx) IS_QUIC_METHOD((ctx)->method)
  |  |  ------------------
  |  |  |  |   52|  7.25k|    ((m) == OSSL_QUIC_client_method() || (m) == OSSL_QUIC_client_thread_method() || (m) == OSSL_QUIC_server_method() || (m) == OSSL_QUIC_method())
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:6): [True: 0, False: 7.25k]
  |  |  |  |  |  Branch (52:42): [True: 0, False: 7.25k]
  |  |  |  |  |  Branch (52:85): [True: 0, False: 7.25k]
  |  |  |  |  |  Branch (52:121): [True: 0, False: 7.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  803|  7.25k|        s->ext.max_fragment_len_mode = ctx->ext.max_fragment_len_mode;
  804|       |
  805|  7.25k|    s->max_send_fragment = ctx->max_send_fragment;
  806|  7.25k|    s->split_send_fragment = ctx->split_send_fragment;
  807|  7.25k|    s->max_pipelines = ctx->max_pipelines;
  808|  7.25k|    s->rlayer.default_read_buf_len = ctx->default_read_buf_len;
  809|       |
  810|  7.25k|    s->ext.debug_cb = 0;
  811|  7.25k|    s->ext.debug_arg = NULL;
  812|  7.25k|    s->ext.ticket_expected = 0;
  813|  7.25k|    s->ext.status_type = ctx->ext.status_type;
  814|  7.25k|    s->ext.status_expected = 0;
  815|  7.25k|    s->ext.ocsp.ids = NULL;
  816|  7.25k|    s->ext.ocsp.exts = NULL;
  817|  7.25k|    s->ext.ocsp.resp = NULL;
  818|  7.25k|    s->ext.ocsp.resp_len = 0;
  819|  7.25k|    s->ext.ocsp.resp_ex = NULL;
  820|       |
  821|  7.25k|    if (!SSL_CTX_up_ref(ctx))
  ------------------
  |  Branch (821:9): [True: 0, False: 7.25k]
  ------------------
  822|      0|        goto err;
  823|       |
  824|  7.25k|    s->session_ctx = ctx;
  825|  7.25k|    if (ctx->ext.ecpointformats != NULL) {
  ------------------
  |  Branch (825:9): [True: 0, False: 7.25k]
  ------------------
  826|      0|        s->ext.ecpointformats = OPENSSL_memdup(ctx->ext.ecpointformats,
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  827|      0|            ctx->ext.ecpointformats_len);
  828|      0|        if (s->ext.ecpointformats == NULL) {
  ------------------
  |  Branch (828:13): [True: 0, False: 0]
  ------------------
  829|      0|            s->ext.ecpointformats_len = 0;
  830|      0|            goto err;
  831|      0|        }
  832|      0|        s->ext.ecpointformats_len = ctx->ext.ecpointformats_len;
  833|      0|    }
  834|  7.25k|    if (ctx->ext.supportedgroups != NULL) {
  ------------------
  |  Branch (834:9): [True: 7.25k, False: 0]
  ------------------
  835|  7.25k|        size_t add = 0;
  836|       |
  837|  7.25k|        if (ctx->ext.supportedgroups_len == 0)
  ------------------
  |  Branch (837:13): [True: 0, False: 7.25k]
  ------------------
  838|       |            /* Add 1 so allocation won't fail */
  839|      0|            add = 1;
  840|  7.25k|        s->ext.supportedgroups = OPENSSL_memdup(ctx->ext.supportedgroups,
  ------------------
  |  |  134|  7.25k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  841|  7.25k|            (ctx->ext.supportedgroups_len + add)
  842|  7.25k|                * sizeof(*ctx->ext.supportedgroups));
  843|  7.25k|        if (s->ext.supportedgroups == NULL) {
  ------------------
  |  Branch (843:13): [True: 0, False: 7.25k]
  ------------------
  844|      0|            s->ext.supportedgroups_len = 0;
  845|      0|            goto err;
  846|      0|        }
  847|  7.25k|        s->ext.supportedgroups_len = ctx->ext.supportedgroups_len;
  848|  7.25k|    }
  849|  7.25k|    if (ctx->ext.keyshares != NULL) {
  ------------------
  |  Branch (849:9): [True: 7.25k, False: 0]
  ------------------
  850|  7.25k|        size_t add = 0;
  851|       |
  852|  7.25k|        if (ctx->ext.keyshares_len == 0)
  ------------------
  |  Branch (852:13): [True: 0, False: 7.25k]
  ------------------
  853|       |            /* Add 1 so allocation won't fail */
  854|      0|            add = 1;
  855|  7.25k|        s->ext.keyshares = OPENSSL_memdup(ctx->ext.keyshares,
  ------------------
  |  |  134|  7.25k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  856|  7.25k|            (ctx->ext.keyshares_len + add)
  857|  7.25k|                * sizeof(*ctx->ext.keyshares));
  858|  7.25k|        if (s->ext.keyshares == NULL) {
  ------------------
  |  Branch (858:13): [True: 0, False: 7.25k]
  ------------------
  859|      0|            s->ext.keyshares_len = 0;
  860|      0|            goto err;
  861|      0|        }
  862|  7.25k|        s->ext.keyshares_len = ctx->ext.keyshares_len;
  863|  7.25k|    }
  864|  7.25k|    if (ctx->ext.tuples != NULL) {
  ------------------
  |  Branch (864:9): [True: 7.25k, False: 0]
  ------------------
  865|  7.25k|        size_t add = 0;
  866|       |
  867|  7.25k|        if (ctx->ext.tuples_len == 0)
  ------------------
  |  Branch (867:13): [True: 0, False: 7.25k]
  ------------------
  868|       |            /* Add 1 so allocation won't fail */
  869|      0|            add = 1;
  870|  7.25k|        s->ext.tuples = OPENSSL_memdup(ctx->ext.tuples,
  ------------------
  |  |  134|  7.25k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  871|  7.25k|            (ctx->ext.tuples_len + add)
  872|  7.25k|                * sizeof(*ctx->ext.tuples));
  873|  7.25k|        if (s->ext.tuples == NULL) {
  ------------------
  |  Branch (873:13): [True: 0, False: 7.25k]
  ------------------
  874|      0|            s->ext.tuples_len = 0;
  875|      0|            goto err;
  876|      0|        }
  877|  7.25k|        s->ext.tuples_len = ctx->ext.tuples_len;
  878|  7.25k|    }
  879|       |
  880|  7.25k|#ifndef OPENSSL_NO_NEXTPROTONEG
  881|  7.25k|    s->ext.npn = NULL;
  882|  7.25k|#endif
  883|       |
  884|  7.25k|    if (ctx->ext.alpn != NULL) {
  ------------------
  |  Branch (884:9): [True: 0, False: 7.25k]
  ------------------
  885|      0|        s->ext.alpn = OPENSSL_malloc(ctx->ext.alpn_len);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  886|      0|        if (s->ext.alpn == NULL) {
  ------------------
  |  Branch (886:13): [True: 0, False: 0]
  ------------------
  887|      0|            s->ext.alpn_len = 0;
  888|      0|            goto err;
  889|      0|        }
  890|      0|        memcpy(s->ext.alpn, ctx->ext.alpn, ctx->ext.alpn_len);
  891|      0|        s->ext.alpn_len = ctx->ext.alpn_len;
  892|      0|    }
  893|       |
  894|  7.25k|    s->verified_chain = NULL;
  895|  7.25k|    s->verify_result = X509_V_OK;
  ------------------
  |  |  312|  7.25k|#define X509_V_OK 0
  ------------------
  896|       |
  897|  7.25k|    s->default_passwd_callback = ctx->default_passwd_callback;
  898|  7.25k|    s->default_passwd_callback_userdata = ctx->default_passwd_callback_userdata;
  899|       |
  900|  7.25k|    s->key_update = SSL_KEY_UPDATE_NONE;
  ------------------
  |  | 1071|  7.25k|#define SSL_KEY_UPDATE_NONE -1
  ------------------
  901|       |
  902|  7.25k|    if (!IS_QUIC_CTX(ctx)) {
  ------------------
  |  |   54|  7.25k|#define IS_QUIC_CTX(ctx) IS_QUIC_METHOD((ctx)->method)
  |  |  ------------------
  |  |  |  |   52|  7.25k|    ((m) == OSSL_QUIC_client_method() || (m) == OSSL_QUIC_client_thread_method() || (m) == OSSL_QUIC_server_method() || (m) == OSSL_QUIC_method())
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:6): [True: 0, False: 7.25k]
  |  |  |  |  |  Branch (52:42): [True: 0, False: 7.25k]
  |  |  |  |  |  Branch (52:85): [True: 0, False: 7.25k]
  |  |  |  |  |  Branch (52:121): [True: 0, False: 7.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  903|  7.25k|        s->allow_early_data_cb = ctx->allow_early_data_cb;
  904|  7.25k|        s->allow_early_data_cb_data = ctx->allow_early_data_cb_data;
  905|  7.25k|    }
  906|       |
  907|  7.25k|    if (!method->ssl_init(ssl))
  ------------------
  |  Branch (907:9): [True: 0, False: 7.25k]
  ------------------
  908|      0|        goto sslerr;
  909|       |
  910|  7.25k|    s->server = (method->ssl_accept == ssl_undefined_function) ? 0 : 1;
  ------------------
  |  Branch (910:17): [True: 3.62k, False: 3.62k]
  ------------------
  911|       |
  912|  7.25k|    if (!method->ssl_reset(ssl))
  ------------------
  |  Branch (912:9): [True: 0, False: 7.25k]
  ------------------
  913|      0|        goto sslerr;
  914|       |
  915|  7.25k|#ifndef OPENSSL_NO_PSK
  916|  7.25k|    s->psk_client_callback = ctx->psk_client_callback;
  917|  7.25k|    s->psk_server_callback = ctx->psk_server_callback;
  918|  7.25k|#endif
  919|  7.25k|    s->psk_find_session_cb = ctx->psk_find_session_cb;
  920|  7.25k|    s->psk_use_session_cb = ctx->psk_use_session_cb;
  921|       |
  922|  7.25k|    s->async_cb = ctx->async_cb;
  923|  7.25k|    s->async_cb_arg = ctx->async_cb_arg;
  924|       |
  925|  7.25k|    s->job = NULL;
  926|       |
  927|       |#ifndef OPENSSL_NO_COMP_ALG
  928|       |    memcpy(s->cert_comp_prefs, ctx->cert_comp_prefs, sizeof(s->cert_comp_prefs));
  929|       |#endif
  930|  7.25k|    if (ctx->client_cert_type != NULL) {
  ------------------
  |  Branch (930:9): [True: 0, False: 7.25k]
  ------------------
  931|      0|        s->client_cert_type = OPENSSL_memdup(ctx->client_cert_type,
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  932|      0|            ctx->client_cert_type_len);
  933|      0|        if (s->client_cert_type == NULL)
  ------------------
  |  Branch (933:13): [True: 0, False: 0]
  ------------------
  934|      0|            goto sslerr;
  935|      0|        s->client_cert_type_len = ctx->client_cert_type_len;
  936|      0|    }
  937|  7.25k|    if (ctx->server_cert_type != NULL) {
  ------------------
  |  Branch (937:9): [True: 0, False: 7.25k]
  ------------------
  938|      0|        s->server_cert_type = OPENSSL_memdup(ctx->server_cert_type,
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  939|      0|            ctx->server_cert_type_len);
  940|      0|        if (s->server_cert_type == NULL)
  ------------------
  |  Branch (940:13): [True: 0, False: 0]
  ------------------
  941|      0|            goto sslerr;
  942|      0|        s->server_cert_type_len = ctx->server_cert_type_len;
  943|      0|    }
  944|       |
  945|  7.25k|#ifndef OPENSSL_NO_CT
  946|  7.25k|    if (!SSL_set_ct_validation_callback(ssl, ctx->ct_validation_callback,
  ------------------
  |  Branch (946:9): [True: 0, False: 7.25k]
  ------------------
  947|  7.25k|            ctx->ct_validation_callback_arg))
  948|      0|        goto sslerr;
  949|  7.25k|#endif
  950|       |
  951|  7.25k|#ifndef OPENSSL_NO_ECH
  952|  7.25k|    if (!ossl_ech_conn_init(s, ctx, method))
  ------------------
  |  Branch (952:9): [True: 0, False: 7.25k]
  ------------------
  953|      0|        goto sslerr;
  954|  7.25k|#endif
  955|       |
  956|  7.25k|    s->ssl_pkey_num = SSL_PKEY_NUM + ctx->sigalg_list_len;
  ------------------
  |  |  336|  7.25k|#define SSL_PKEY_NUM 9
  ------------------
  957|  7.25k|    return ssl;
  958|      0|cerr:
  959|      0|    ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  960|      0|    goto err;
  961|      0|asn1err:
  962|      0|    ERR_raise(ERR_LIB_SSL, ERR_R_ASN1_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  963|      0|    goto err;
  964|      0|sslerr:
  965|      0|    ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  966|      0|err:
  967|      0|    SSL_free(ssl);
  968|       |    return NULL;
  969|      0|}
ossl_ssl_connection_new:
  972|  7.25k|{
  973|       |    return ossl_ssl_connection_new_int(ctx, NULL, ctx->method);
  974|  7.25k|}
SSL_is_dtls:
  977|  3.62k|{
  978|  3.62k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  3.62k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  3.62k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 3.62k]
  |  |  |  |  ------------------
  |  |  |  |   33|  3.62k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  3.62k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 3.62k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  3.62k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  3.62k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  979|       |
  980|  3.62k|#ifndef OPENSSL_NO_QUIC
  981|  3.62k|    if (s->type == SSL_TYPE_QUIC_CONNECTION || s->type == SSL_TYPE_QUIC_XSO)
  ------------------
  |  | 1226|  7.25k|#define SSL_TYPE_QUIC_CONNECTION 0x80
  ------------------
                  if (s->type == SSL_TYPE_QUIC_CONNECTION || s->type == SSL_TYPE_QUIC_XSO)
  ------------------
  |  | 1227|  3.62k|#define SSL_TYPE_QUIC_XSO 0x81
  ------------------
  |  Branch (981:9): [True: 0, False: 3.62k]
  |  Branch (981:48): [True: 0, False: 3.62k]
  ------------------
  982|      0|        return 0;
  983|  3.62k|#endif
  984|       |
  985|  3.62k|    if (sc == NULL)
  ------------------
  |  Branch (985:9): [True: 0, False: 3.62k]
  ------------------
  986|      0|        return 0;
  987|       |
  988|  3.62k|    return SSL_CONNECTION_IS_DTLS(sc) ? 1 : 0;
  ------------------
  |  |  266|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  989|  3.62k|}
SSL_CTX_set_session_id_context:
 1037|  3.73k|{
 1038|  3.73k|    if (sid_ctx_len > SSL_MAX_SID_CTX_LENGTH) {
  ------------------
  |  |   67|  3.73k|#define SSL_MAX_SID_CTX_LENGTH 32
  ------------------
  |  Branch (1038:9): [True: 0, False: 3.73k]
  ------------------
 1039|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1040|      0|        return 0;
 1041|      0|    }
 1042|  3.73k|    ctx->sid_ctx_length = sid_ctx_len;
 1043|  3.73k|    memcpy(ctx->sid_ctx, sid_ctx, sid_ctx_len);
 1044|       |
 1045|  3.73k|    return 1;
 1046|  3.73k|}
SSL_has_matching_session_id:
 1088|  14.3k|{
 1089|       |    /*
 1090|       |     * A quick examination of SSL_SESSION_hash and SSL_SESSION_cmp shows how
 1091|       |     * we can "construct" a session to give us the desired check - i.e. to
 1092|       |     * find if there's a session in the hash table that would conflict with
 1093|       |     * any new session built out of this id/id_len and the ssl_version in use
 1094|       |     * by this SSL.
 1095|       |     */
 1096|  14.3k|    SSL_SESSION r, *p;
 1097|  14.3k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(ssl);
  ------------------
  |  |   41|  14.3k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  14.3k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 14.3k]
  |  |  |  |  ------------------
  |  |  |  |   33|  14.3k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  14.3k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 14.3k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  14.3k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  14.3k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 1098|       |
 1099|  14.3k|    if (sc == NULL || id_len > sizeof(r.session_id))
  ------------------
  |  Branch (1099:9): [True: 0, False: 14.3k]
  |  Branch (1099:23): [True: 0, False: 14.3k]
  ------------------
 1100|      0|        return 0;
 1101|       |
 1102|  14.3k|    r.ssl_version = sc->version;
 1103|  14.3k|    r.session_id_length = id_len;
 1104|  14.3k|    memcpy(r.session_id, id, id_len);
 1105|       |
 1106|  14.3k|    if (!CRYPTO_THREAD_read_lock(sc->session_ctx->lock))
  ------------------
  |  Branch (1106:9): [True: 0, False: 14.3k]
  ------------------
 1107|      0|        return 0;
 1108|  14.3k|    p = lh_SSL_SESSION_retrieve(sc->session_ctx->sessions, &r);
 1109|  14.3k|    CRYPTO_THREAD_unlock(sc->session_ctx->lock);
 1110|       |    return (p != NULL);
 1111|  14.3k|}
SSL_free:
 1470|  7.25k|{
 1471|  7.25k|    int i;
 1472|       |
 1473|  7.25k|    if (s == NULL)
  ------------------
  |  Branch (1473:9): [True: 0, False: 7.25k]
  ------------------
 1474|      0|        return;
 1475|  7.25k|    CRYPTO_DOWN_REF(&s->references, &i);
 1476|  7.25k|    REF_PRINT_COUNT("SSL", i, s);
  ------------------
  |  |  301|  7.25k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  7.25k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  7.25k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  7.25k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1477|  7.25k|    if (i > 0)
  ------------------
  |  Branch (1477:9): [True: 0, False: 7.25k]
  ------------------
 1478|      0|        return;
 1479|  7.25k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  7.25k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 7.25k]
  |  |  ------------------
  ------------------
 1480|       |
 1481|  7.25k|    if (s->method != NULL)
  ------------------
  |  Branch (1481:9): [True: 7.25k, False: 0]
  ------------------
 1482|  7.25k|        s->method->ssl_free(s);
 1483|       |
 1484|  7.25k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL, s, &s->ex_data);
  ------------------
  |  |  251|  7.25k|#define CRYPTO_EX_INDEX_SSL 0
  ------------------
 1485|  7.25k|    SSL_CTX_free(s->ctx);
 1486|  7.25k|    CRYPTO_THREAD_lock_free(s->lock);
 1487|  7.25k|    CRYPTO_FREE_REF(&s->references);
 1488|       |
 1489|  7.25k|    OPENSSL_free(s);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1490|  7.25k|}
ossl_ssl_connection_free:
 1493|  7.25k|{
 1494|  7.25k|    SSL_CONNECTION *s;
 1495|       |
 1496|  7.25k|    s = SSL_CONNECTION_FROM_SSL_ONLY(ssl);
  ------------------
  |  |   23|  7.25k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  7.25k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 7.25k]
  |  |  |  |  ------------------
  |  |  |  |   18|  7.25k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  7.25k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 7.25k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  7.25k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  7.25k|                             : NULL))
  |  |  ------------------
  ------------------
 1497|  7.25k|    if (s == NULL)
  ------------------
  |  Branch (1497:9): [True: 0, False: 7.25k]
  ------------------
 1498|      0|        return;
 1499|       |
 1500|       |    /*
 1501|       |     * Ignore return values. This could result in user callbacks being called
 1502|       |     * e.g. for the QUIC TLS record layer. So we do this early before we have
 1503|       |     * freed other things.
 1504|       |     */
 1505|  7.25k|    ssl_free_wbio_buffer(s);
 1506|  7.25k|    RECORD_LAYER_clear(&s->rlayer);
 1507|       |
 1508|  7.25k|    X509_VERIFY_PARAM_free(s->param);
 1509|  7.25k|    dane_final(&s->dane);
 1510|       |
 1511|  7.25k|    BUF_MEM_free(s->init_buf);
 1512|       |
 1513|       |    /* add extra stuff */
 1514|  7.25k|    sk_SSL_CIPHER_free(s->cipher_list);
  ------------------
  |  | 1034|  7.25k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1515|  7.25k|    sk_SSL_CIPHER_free(s->cipher_list_by_id);
  ------------------
  |  | 1034|  7.25k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1516|  7.25k|    sk_SSL_CIPHER_free(s->tls13_ciphersuites);
  ------------------
  |  | 1034|  7.25k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1517|  7.25k|    sk_SSL_CIPHER_free(s->peer_ciphers);
  ------------------
  |  | 1034|  7.25k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1518|       |
 1519|       |    /* Make the next call work :-) */
 1520|  7.25k|    if (s->session != NULL) {
  ------------------
  |  Branch (1520:9): [True: 7.25k, False: 0]
  ------------------
 1521|  7.25k|        ssl_clear_bad_session(s);
 1522|  7.25k|        SSL_SESSION_free(s->session);
 1523|  7.25k|    }
 1524|  7.25k|    SSL_SESSION_free(s->psksession);
 1525|  7.25k|    OPENSSL_free(s->psksession_id);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1526|       |
 1527|  7.25k|    ssl_cert_free(s->cert);
 1528|  7.25k|    OPENSSL_free(s->shared_sigalgs);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1529|       |    /* Free up if allocated */
 1530|       |
 1531|  7.25k|    OPENSSL_free(s->ext.hostname);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1532|  7.25k|    SSL_CTX_free(s->session_ctx);
 1533|  7.25k|    OPENSSL_free(s->ext.ecpointformats);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1534|  7.25k|    OPENSSL_free(s->ext.peer_ecpointformats);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1535|  7.25k|    OPENSSL_free(s->ext.supportedgroups);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1536|  7.25k|    OPENSSL_free(s->ext.keyshares);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1537|  7.25k|    OPENSSL_free(s->ext.tuples);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1538|  7.25k|    OPENSSL_free(s->ext.peer_supportedgroups);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1539|  7.25k|    sk_X509_EXTENSION_pop_free(s->ext.ocsp.exts, X509_EXTENSION_free);
  ------------------
  |  |  256|  7.25k|#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))
  ------------------
 1540|       |
 1541|  7.25k|#ifndef OPENSSL_NO_OCSP
 1542|  7.25k|    OPENSSL_free(s->ext.ocsp.resp);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1543|  7.25k|    s->ext.ocsp.resp = NULL;
 1544|  7.25k|    s->ext.ocsp.resp_len = 0;
 1545|       |
 1546|  7.25k|    sk_OCSP_RESPID_pop_free(s->ext.ocsp.ids, OCSP_RESPID_free);
  ------------------
  |  |  180|  7.25k|#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))
  ------------------
 1547|  7.25k|    sk_OCSP_RESPONSE_pop_free(s->ext.ocsp.resp_ex, OCSP_RESPONSE_free);
 1548|  7.25k|    s->ext.ocsp.resp_ex = NULL;
 1549|  7.25k|#endif
 1550|  7.25k|#ifndef OPENSSL_NO_CT
 1551|  7.25k|    SCT_LIST_free(s->scts);
 1552|  7.25k|    OPENSSL_free(s->ext.scts);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1553|  7.25k|#endif
 1554|  7.25k|    OPENSSL_free(s->ext.alpn);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1555|  7.25k|    OPENSSL_free(s->ext.tls13_cookie);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1556|  7.25k|    if (s->clienthello != NULL)
  ------------------
  |  Branch (1556:9): [True: 0, False: 7.25k]
  ------------------
 1557|      0|        OPENSSL_free(s->clienthello->pre_proc_exts);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1558|  7.25k|    OPENSSL_free(s->clienthello);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1559|  7.25k|    OPENSSL_free(s->pha_context);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1560|  7.25k|    EVP_MD_CTX_free(s->pha_dgst);
 1561|       |
 1562|  7.25k|    sk_X509_NAME_pop_free(s->ca_names, X509_NAME_free);
  ------------------
  |  |   70|  7.25k|#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))
  ------------------
 1563|  7.25k|    sk_X509_NAME_pop_free(s->client_ca_names, X509_NAME_free);
  ------------------
  |  |   70|  7.25k|#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))
  ------------------
 1564|       |
 1565|  7.25k|    OPENSSL_free(s->client_cert_type);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1566|  7.25k|    OPENSSL_free(s->server_cert_type);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1567|       |
 1568|  7.25k|    OSSL_STACK_OF_X509_free(s->verified_chain);
 1569|       |
 1570|  7.25k|    if (ssl->method != NULL)
  ------------------
  |  Branch (1570:9): [True: 7.25k, False: 0]
  ------------------
 1571|  7.25k|        ssl->method->ssl_deinit(ssl);
 1572|       |
 1573|  7.25k|    ASYNC_WAIT_CTX_free(s->waitctx);
 1574|       |
 1575|  7.25k|#if !defined(OPENSSL_NO_NEXTPROTONEG)
 1576|  7.25k|    OPENSSL_free(s->ext.npn);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1577|  7.25k|#endif
 1578|       |
 1579|  7.25k|#ifndef OPENSSL_NO_SRTP
 1580|  7.25k|    sk_SRTP_PROTECTION_PROFILE_free(s->srtp_profiles);
  ------------------
  |  |  257|  7.25k|#define sk_SRTP_PROTECTION_PROFILE_free(sk) OPENSSL_sk_free(ossl_check_SRTP_PROTECTION_PROFILE_sk_type(sk))
  ------------------
 1581|  7.25k|#endif
 1582|       |
 1583|       |    /*
 1584|       |     * We do this late. We want to ensure that any other references we held to
 1585|       |     * these BIOs are freed first *before* we call BIO_free_all(), because
 1586|       |     * BIO_free_all() will only free each BIO in the chain if the number of
 1587|       |     * references to the first BIO have dropped to 0
 1588|       |     */
 1589|  7.25k|    BIO_free_all(s->wbio);
 1590|  7.25k|    s->wbio = NULL;
 1591|  7.25k|    BIO_free_all(s->rbio);
 1592|  7.25k|    s->rbio = NULL;
 1593|  7.25k|    OPENSSL_free(s->s3.tmp.valid_flags);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1594|  7.25k|#ifndef OPENSSL_NO_ECH
 1595|  7.25k|    ossl_ech_conn_clear(&s->ext.ech);
 1596|  7.25k|#endif
 1597|  7.25k|}
SSL_set0_rbio:
 1600|  7.25k|{
 1601|  7.25k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  7.25k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  7.25k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 7.25k]
  |  |  |  |  ------------------
  |  |  |  |   33|  7.25k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  7.25k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 7.25k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  7.25k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  7.25k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 1602|       |
 1603|  7.25k|#ifndef OPENSSL_NO_QUIC
 1604|  7.25k|    if (IS_QUIC(s)) {
  ------------------
  |  |   96|  7.25k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  7.25k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 7.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
 1605|      0|        ossl_quic_conn_set0_net_rbio(s, rbio);
 1606|      0|        return;
 1607|      0|    }
 1608|  7.25k|#endif
 1609|       |
 1610|  7.25k|    if (sc == NULL)
  ------------------
  |  Branch (1610:9): [True: 0, False: 7.25k]
  ------------------
 1611|      0|        return;
 1612|       |
 1613|  7.25k|    BIO_free_all(sc->rbio);
 1614|  7.25k|    sc->rbio = rbio;
 1615|  7.25k|    sc->rlayer.rrlmethod->set1_bio(sc->rlayer.rrl, sc->rbio);
 1616|  7.25k|}
SSL_set0_wbio:
 1619|  7.25k|{
 1620|  7.25k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  7.25k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  7.25k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 7.25k]
  |  |  |  |  ------------------
  |  |  |  |   33|  7.25k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  7.25k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 7.25k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  7.25k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  7.25k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 1621|       |
 1622|  7.25k|#ifndef OPENSSL_NO_QUIC
 1623|  7.25k|    if (IS_QUIC(s)) {
  ------------------
  |  |   96|  7.25k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  7.25k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 7.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
 1624|      0|        ossl_quic_conn_set0_net_wbio(s, wbio);
 1625|      0|        return;
 1626|      0|    }
 1627|  7.25k|#endif
 1628|       |
 1629|  7.25k|    if (sc == NULL)
  ------------------
  |  Branch (1629:9): [True: 0, False: 7.25k]
  ------------------
 1630|      0|        return;
 1631|       |
 1632|       |    /*
 1633|       |     * If the output buffering BIO is still in place, remove it
 1634|       |     */
 1635|  7.25k|    if (sc->bbio != NULL)
  ------------------
  |  Branch (1635:9): [True: 0, False: 7.25k]
  ------------------
 1636|      0|        sc->wbio = BIO_pop(sc->wbio);
 1637|       |
 1638|  7.25k|    BIO_free_all(sc->wbio);
 1639|  7.25k|    sc->wbio = wbio;
 1640|       |
 1641|       |    /* Re-attach |bbio| to the new |wbio|. */
 1642|  7.25k|    if (sc->bbio != NULL)
  ------------------
  |  Branch (1642:9): [True: 0, False: 7.25k]
  ------------------
 1643|      0|        sc->wbio = BIO_push(sc->bbio, sc->wbio);
 1644|       |
 1645|  7.25k|    sc->rlayer.wrlmethod->set1_bio(sc->rlayer.wrl, sc->wbio);
 1646|  7.25k|}
SSL_set_bio:
 1649|  3.62k|{
 1650|       |    /*
 1651|       |     * For historical reasons, this function has many different cases in
 1652|       |     * ownership handling.
 1653|       |     */
 1654|       |
 1655|       |    /* If nothing has changed, do nothing */
 1656|  3.62k|    if (rbio == SSL_get_rbio(s) && wbio == SSL_get_wbio(s))
  ------------------
  |  Branch (1656:9): [True: 0, False: 3.62k]
  |  Branch (1656:36): [True: 0, False: 0]
  ------------------
 1657|      0|        return;
 1658|       |
 1659|       |    /*
 1660|       |     * If the two arguments are equal then one fewer reference is granted by the
 1661|       |     * caller than we want to take
 1662|       |     */
 1663|  3.62k|    if (rbio != NULL && rbio == wbio) {
  ------------------
  |  Branch (1663:9): [True: 3.62k, False: 0]
  |  Branch (1663:25): [True: 3.62k, False: 0]
  ------------------
 1664|  3.62k|        if (!BIO_up_ref(rbio))
  ------------------
  |  Branch (1664:13): [True: 0, False: 3.62k]
  ------------------
 1665|      0|            return;
 1666|  3.62k|    }
 1667|       |
 1668|       |    /*
 1669|       |     * If only the wbio is changed only adopt one reference.
 1670|       |     */
 1671|  3.62k|    if (rbio == SSL_get_rbio(s)) {
  ------------------
  |  Branch (1671:9): [True: 0, False: 3.62k]
  ------------------
 1672|      0|        SSL_set0_wbio(s, wbio);
 1673|      0|        return;
 1674|      0|    }
 1675|       |    /*
 1676|       |     * There is an asymmetry here for historical reasons. If only the rbio is
 1677|       |     * changed AND the rbio and wbio were originally different, then we only
 1678|       |     * adopt one reference.
 1679|       |     */
 1680|  3.62k|    if (wbio == SSL_get_wbio(s) && SSL_get_rbio(s) != SSL_get_wbio(s)) {
  ------------------
  |  Branch (1680:9): [True: 0, False: 3.62k]
  |  Branch (1680:36): [True: 0, False: 0]
  ------------------
 1681|      0|        SSL_set0_rbio(s, rbio);
 1682|      0|        return;
 1683|      0|    }
 1684|       |
 1685|       |    /* Otherwise, adopt both references. */
 1686|  3.62k|    SSL_set0_rbio(s, rbio);
 1687|  3.62k|    SSL_set0_wbio(s, wbio);
 1688|  3.62k|}
SSL_get_rbio:
 1691|  26.1k|{
 1692|  26.1k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  26.1k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  26.1k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 26.1k]
  |  |  |  |  ------------------
  |  |  |  |   33|  26.1k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  26.1k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 26.1k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  26.1k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  26.1k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 1693|       |
 1694|  26.1k|#ifndef OPENSSL_NO_QUIC
 1695|  26.1k|    if (IS_QUIC(s))
  ------------------
  |  |   96|  26.1k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  26.1k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 26.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 26.1k, False: 0]
  |  |  ------------------
  ------------------
 1696|      0|        return ossl_quic_conn_get_net_rbio(s);
 1697|  26.1k|#endif
 1698|       |
 1699|  26.1k|    if (sc == NULL)
  ------------------
  |  Branch (1699:9): [True: 0, False: 26.1k]
  ------------------
 1700|      0|        return NULL;
 1701|       |
 1702|  26.1k|    return sc->rbio;
 1703|  26.1k|}
SSL_get_wbio:
 1706|  3.62k|{
 1707|  3.62k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  3.62k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  3.62k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 3.62k]
  |  |  |  |  ------------------
  |  |  |  |   33|  3.62k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  3.62k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 3.62k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  3.62k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  3.62k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 1708|       |
 1709|  3.62k|#ifndef OPENSSL_NO_QUIC
 1710|  3.62k|    if (IS_QUIC(s))
  ------------------
  |  |   96|  3.62k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  3.62k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 3.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 1711|      0|        return ossl_quic_conn_get_net_wbio(s);
 1712|  3.62k|#endif
 1713|       |
 1714|  3.62k|    if (sc == NULL)
  ------------------
  |  Branch (1714:9): [True: 0, False: 3.62k]
  ------------------
 1715|      0|        return NULL;
 1716|       |
 1717|  3.62k|    if (sc->bbio != NULL) {
  ------------------
  |  Branch (1717:9): [True: 0, False: 3.62k]
  ------------------
 1718|       |        /*
 1719|       |         * If |bbio| is active, the true caller-configured BIO is its
 1720|       |         * |next_bio|.
 1721|       |         */
 1722|      0|        return BIO_next(sc->bbio);
 1723|      0|    }
 1724|  3.62k|    return sc->wbio;
 1725|  3.62k|}
SSL_set_fd:
 1768|  3.62k|{
 1769|  3.62k|    int ret = 0;
 1770|  3.62k|    BIO *bio = NULL;
 1771|       |
 1772|  3.62k|    if (s->type == SSL_TYPE_QUIC_XSO) {
  ------------------
  |  | 1227|  3.62k|#define SSL_TYPE_QUIC_XSO 0x81
  ------------------
  |  Branch (1772:9): [True: 0, False: 3.62k]
  ------------------
 1773|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_CONN_USE_ONLY);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1774|      0|        goto err;
 1775|      0|    }
 1776|       |
 1777|  3.62k|    bio = BIO_new(fd_method(s));
 1778|       |
 1779|  3.62k|    if (bio == NULL) {
  ------------------
  |  Branch (1779:9): [True: 0, False: 3.62k]
  ------------------
 1780|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_BUF_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1781|      0|        goto err;
 1782|      0|    }
 1783|  3.62k|    BIO_set_fd(bio, fd, BIO_NOCLOSE);
  ------------------
  |  |  574|  3.62k|#define BIO_set_fd(b, fd, c) BIO_int_ctrl(b, BIO_C_SET_FD, c, fd)
  |  |  ------------------
  |  |  |  |  447|  3.62k|#define BIO_C_SET_FD 104
  |  |  ------------------
  ------------------
 1784|  3.62k|    SSL_set_bio(s, bio, bio);
 1785|  3.62k|    ret = 1;
 1786|  3.62k|err:
 1787|  3.62k|    return ret;
 1788|  3.62k|}
SSL_get1_peer_certificate:
 2032|  3.62k|{
 2033|  3.62k|    X509 *r = SSL_get0_peer_certificate(s);
 2034|       |
 2035|  3.62k|    if (r != NULL && !X509_up_ref(r))
  ------------------
  |  Branch (2035:9): [True: 3.62k, False: 0]
  |  Branch (2035:22): [True: 0, False: 3.62k]
  ------------------
 2036|      0|        return NULL;
 2037|       |
 2038|  3.62k|    return r;
 2039|  3.62k|}
SSL_get0_peer_certificate:
 2042|  3.62k|{
 2043|  3.62k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  3.62k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  3.62k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 3.62k]
  |  |  |  |  ------------------
  |  |  |  |   33|  3.62k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  3.62k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 3.62k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  3.62k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  3.62k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 2044|       |
 2045|  3.62k|    if (sc == NULL)
  ------------------
  |  Branch (2045:9): [True: 0, False: 3.62k]
  ------------------
 2046|      0|        return NULL;
 2047|       |
 2048|  3.62k|    if (sc->session == NULL)
  ------------------
  |  Branch (2048:9): [True: 0, False: 3.62k]
  ------------------
 2049|      0|        return NULL;
 2050|  3.62k|    else
 2051|  3.62k|        return sc->session->peer;
 2052|  3.62k|}
SSL_get_peer_cert_chain:
 2055|     10|{
 2056|     10|    STACK_OF(X509) *r;
  ------------------
  |  |   33|     10|#define STACK_OF(type) struct stack_st_##type
  ------------------
 2057|     10|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|     10|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|     10|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 10]
  |  |  |  |  ------------------
  |  |  |  |   33|     10|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|     10|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 10, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|     10|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|     10|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 2058|       |
 2059|     10|    if (sc == NULL)
  ------------------
  |  Branch (2059:9): [True: 0, False: 10]
  ------------------
 2060|      0|        return NULL;
 2061|       |
 2062|     10|    if (sc->session == NULL)
  ------------------
  |  Branch (2062:9): [True: 0, False: 10]
  ------------------
 2063|      0|        r = NULL;
 2064|     10|    else
 2065|     10|        r = sc->session->peer_chain;
 2066|       |
 2067|       |    /*
 2068|       |     * If we are a client, cert_chain includes the peer's own certificate; if
 2069|       |     * we are a server, it does not.
 2070|       |     */
 2071|       |
 2072|     10|    return r;
 2073|     10|}
SSL_CTX_check_private_key:
 2116|  3.73k|{
 2117|  3.73k|    if ((ctx == NULL) || (ctx->cert->key->x509 == NULL)) {
  ------------------
  |  Branch (2117:9): [True: 0, False: 3.73k]
  |  Branch (2117:26): [True: 0, False: 3.73k]
  ------------------
 2118|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_NO_CERTIFICATE_ASSIGNED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2119|      0|        return 0;
 2120|      0|    }
 2121|  3.73k|    if (ctx->cert->key->privatekey == NULL) {
  ------------------
  |  Branch (2121:9): [True: 0, False: 3.73k]
  ------------------
 2122|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_NO_PRIVATE_KEY_ASSIGNED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2123|      0|        return 0;
 2124|      0|    }
 2125|  3.73k|    return X509_check_private_key(ctx->cert->key->x509, ctx->cert->key->privatekey);
 2126|  3.73k|}
SSL_accept:
 2285|  11.1k|{
 2286|  11.1k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  11.1k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  11.1k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 11.1k]
  |  |  |  |  ------------------
  |  |  |  |   33|  11.1k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  11.1k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 11.1k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  11.1k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  11.1k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 2287|       |
 2288|  11.1k|#ifndef OPENSSL_NO_QUIC
 2289|  11.1k|    if (IS_QUIC(s)) {
  ------------------
  |  |   96|  11.1k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  11.1k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 11.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 11.1k, False: 0]
  |  |  ------------------
  ------------------
 2290|      0|        return s->method->ssl_accept(s);
 2291|      0|    }
 2292|  11.1k|#endif
 2293|       |
 2294|  11.1k|    if (sc == NULL)
  ------------------
  |  Branch (2294:9): [True: 0, False: 11.1k]
  ------------------
 2295|      0|        return 0;
 2296|       |
 2297|  11.1k|    if (sc->handshake_func == NULL) {
  ------------------
  |  Branch (2297:9): [True: 0, False: 11.1k]
  ------------------
 2298|       |        /* Not properly initialized yet */
 2299|      0|        SSL_set_accept_state(s);
 2300|      0|    }
 2301|       |
 2302|  11.1k|    return SSL_do_handshake(s);
 2303|  11.1k|}
SSL_connect:
 2306|  7.25k|{
 2307|  7.25k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  7.25k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  7.25k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 7.25k]
  |  |  |  |  ------------------
  |  |  |  |   33|  7.25k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  7.25k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 7.25k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  7.25k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  7.25k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 2308|       |
 2309|  7.25k|#ifndef OPENSSL_NO_QUIC
 2310|  7.25k|    if (IS_QUIC(s)) {
  ------------------
  |  |   96|  7.25k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  7.25k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 7.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
 2311|      0|        return s->method->ssl_connect(s);
 2312|      0|    }
 2313|  7.25k|#endif
 2314|       |
 2315|  7.25k|    if (sc == NULL)
  ------------------
  |  Branch (2315:9): [True: 0, False: 7.25k]
  ------------------
 2316|      0|        return 0;
 2317|       |
 2318|  7.25k|    if (sc->handshake_func == NULL) {
  ------------------
  |  Branch (2318:9): [True: 0, False: 7.25k]
  ------------------
 2319|       |        /* Not properly initialized yet */
 2320|      0|        SSL_set_connect_state(s);
 2321|      0|    }
 2322|       |
 2323|  7.25k|    return SSL_do_handshake(s);
 2324|  7.25k|}
ssl_read_internal:
 2413|  18.0k|{
 2414|  18.0k|    int ret;
 2415|  18.0k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  18.0k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  18.0k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 18.0k]
  |  |  |  |  ------------------
  |  |  |  |   33|  18.0k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  18.0k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 18.0k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  18.0k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  18.0k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 2416|       |
 2417|  18.0k|#ifndef OPENSSL_NO_QUIC
 2418|  18.0k|    if (IS_QUIC(s))
  ------------------
  |  |   96|  18.0k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  18.0k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 18.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 18.0k, False: 0]
  |  |  ------------------
  ------------------
 2419|      0|        return s->method->ssl_read(s, buf, num, readbytes);
 2420|  18.0k|#endif
 2421|       |
 2422|  18.0k|    if (sc == NULL)
  ------------------
  |  Branch (2422:9): [True: 0, False: 18.0k]
  ------------------
 2423|      0|        return -1;
 2424|       |
 2425|  18.0k|    if (ssl_reset_error_state(sc) == 0)
  ------------------
  |  Branch (2425:9): [True: 0, False: 18.0k]
  ------------------
 2426|      0|        return -1;
 2427|       |
 2428|  18.0k|    if (sc->handshake_func == NULL) {
  ------------------
  |  Branch (2428:9): [True: 0, False: 18.0k]
  ------------------
 2429|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_UNINITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2430|      0|        sc->statem.error_state = ERROR_STATE_SSL;
 2431|      0|        return -1;
 2432|      0|    }
 2433|       |
 2434|  18.0k|    if (sc->shutdown & SSL_RECEIVED_SHUTDOWN) {
  ------------------
  |  |  217|  18.0k|#define SSL_RECEIVED_SHUTDOWN 2
  ------------------
  |  Branch (2434:9): [True: 2.97k, False: 15.0k]
  ------------------
 2435|  2.97k|        sc->rwstate = SSL_NOTHING;
  ------------------
  |  |  955|  2.97k|#define SSL_NOTHING 1
  ------------------
 2436|  2.97k|        return 0;
 2437|  2.97k|    }
 2438|       |
 2439|  15.0k|    if (sc->early_data_state == SSL_EARLY_DATA_CONNECT_RETRY
  ------------------
  |  Branch (2439:9): [True: 0, False: 15.0k]
  ------------------
 2440|  15.0k|        || sc->early_data_state == SSL_EARLY_DATA_ACCEPT_RETRY) {
  ------------------
  |  Branch (2440:12): [True: 0, False: 15.0k]
  ------------------
 2441|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2442|      0|        sc->statem.error_state = ERROR_STATE_SSL;
 2443|      0|        return 0;
 2444|      0|    }
 2445|       |    /*
 2446|       |     * If we are a client and haven't received the ServerHello etc then we
 2447|       |     * better do that
 2448|       |     */
 2449|  15.0k|    if (!ossl_statem_check_finish_init(sc, 0))
  ------------------
  |  Branch (2449:9): [True: 0, False: 15.0k]
  ------------------
 2450|      0|        return -1;
 2451|       |
 2452|  15.0k|    if ((sc->mode & SSL_MODE_ASYNC) && ASYNC_get_current_job() == NULL) {
  ------------------
  |  |  557|  15.0k|#define SSL_MODE_ASYNC 0x00000100U
  ------------------
  |  Branch (2452:9): [True: 0, False: 15.0k]
  |  Branch (2452:40): [True: 0, False: 0]
  ------------------
 2453|      0|        struct ssl_async_args args;
 2454|       |
 2455|      0|        args.s = s;
 2456|      0|        args.buf = buf;
 2457|      0|        args.num = num;
 2458|      0|        args.type = READFUNC;
 2459|      0|        args.f.func_read = s->method->ssl_read;
 2460|       |
 2461|      0|        ret = ssl_start_async_job(s, &args, ssl_io_intern);
 2462|      0|        *readbytes = sc->asyncrw;
 2463|      0|        ssl_update_error_state(sc);
 2464|      0|        return ret;
 2465|  15.0k|    } else {
 2466|  15.0k|        ret = s->method->ssl_read(s, buf, num, readbytes);
 2467|  15.0k|        ssl_update_error_state(sc);
 2468|  15.0k|        return ret;
 2469|  15.0k|    }
 2470|  15.0k|}
SSL_read:
 2473|  10.3k|{
 2474|  10.3k|    int ret;
 2475|  10.3k|    size_t readbytes;
 2476|  10.3k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  10.3k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  10.3k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 10.3k]
  |  |  |  |  ------------------
  |  |  |  |   33|  10.3k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  10.3k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 10.3k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  10.3k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  10.3k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 2477|       |
 2478|  10.3k|    if (num < 0) {
  ------------------
  |  Branch (2478:9): [True: 0, False: 10.3k]
  ------------------
 2479|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_BAD_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2480|      0|        if (sc != NULL)
  ------------------
  |  Branch (2480:13): [True: 0, False: 0]
  ------------------
 2481|      0|            sc->statem.error_state = ERROR_STATE_SSL;
 2482|      0|        return -1;
 2483|      0|    }
 2484|       |
 2485|  10.3k|    ret = ssl_read_internal(s, buf, (size_t)num, &readbytes);
 2486|       |
 2487|       |    /*
 2488|       |     * The cast is safe here because ret should be <= INT_MAX because num is
 2489|       |     * <= INT_MAX
 2490|       |     */
 2491|  10.3k|    if (ret > 0)
  ------------------
  |  Branch (2491:9): [True: 628, False: 9.68k]
  ------------------
 2492|    628|        ret = (int)readbytes;
 2493|       |
 2494|  10.3k|    return ret;
 2495|  10.3k|}
SSL_read_ex:
 2498|  7.75k|{
 2499|  7.75k|    int ret;
 2500|       |
 2501|  7.75k|    ret = ssl_read_internal(s, buf, num, readbytes);
 2502|  7.75k|    if (ret < 0)
  ------------------
  |  Branch (2502:9): [True: 4.03k, False: 3.72k]
  ------------------
 2503|  4.03k|        ret = 0;
 2504|       |
 2505|  7.75k|    return ret;
 2506|  7.75k|}
ssl_write_internal:
 2668|  4.32k|{
 2669|  4.32k|    int ret;
 2670|  4.32k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  4.32k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  4.32k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 4.32k]
  |  |  |  |  ------------------
  |  |  |  |   33|  4.32k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  4.32k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 4.32k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  4.32k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  4.32k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 2671|       |
 2672|  4.32k|#ifndef OPENSSL_NO_QUIC
 2673|  4.32k|    if (IS_QUIC(s))
  ------------------
  |  |   96|  4.32k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  4.32k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 4.32k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 4.32k, False: 0]
  |  |  ------------------
  ------------------
 2674|      0|        return ossl_quic_write_flags(s, buf, num, flags, written);
 2675|  4.32k|#endif
 2676|       |
 2677|  4.32k|    if (sc == NULL)
  ------------------
  |  Branch (2677:9): [True: 0, False: 4.32k]
  ------------------
 2678|      0|        return 0;
 2679|       |
 2680|  4.32k|    if (ssl_reset_error_state(sc) == 0)
  ------------------
  |  Branch (2680:9): [True: 0, False: 4.32k]
  ------------------
 2681|      0|        return -1;
 2682|       |
 2683|  4.32k|    if (sc->handshake_func == NULL) {
  ------------------
  |  Branch (2683:9): [True: 0, False: 4.32k]
  ------------------
 2684|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_UNINITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2685|      0|        sc->statem.error_state = ERROR_STATE_SSL;
 2686|      0|        return -1;
 2687|      0|    }
 2688|       |
 2689|  4.32k|    if (sc->shutdown & SSL_SENT_SHUTDOWN) {
  ------------------
  |  |  216|  4.32k|#define SSL_SENT_SHUTDOWN 1
  ------------------
  |  Branch (2689:9): [True: 0, False: 4.32k]
  ------------------
 2690|      0|        sc->rwstate = SSL_NOTHING;
  ------------------
  |  |  955|      0|#define SSL_NOTHING 1
  ------------------
 2691|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_PROTOCOL_IS_SHUTDOWN);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2692|      0|        sc->statem.error_state = ERROR_STATE_SSL;
 2693|      0|        return -1;
 2694|      0|    }
 2695|       |
 2696|  4.32k|    if (flags != 0) {
  ------------------
  |  Branch (2696:9): [True: 0, False: 4.32k]
  ------------------
 2697|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_UNSUPPORTED_WRITE_FLAG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2698|      0|        sc->statem.error_state = ERROR_STATE_SSL;
 2699|      0|        return -1;
 2700|      0|    }
 2701|       |
 2702|  4.32k|    if (sc->early_data_state == SSL_EARLY_DATA_CONNECT_RETRY
  ------------------
  |  Branch (2702:9): [True: 0, False: 4.32k]
  ------------------
 2703|  4.32k|        || sc->early_data_state == SSL_EARLY_DATA_ACCEPT_RETRY
  ------------------
  |  Branch (2703:12): [True: 0, False: 4.32k]
  ------------------
 2704|  4.32k|        || sc->early_data_state == SSL_EARLY_DATA_READ_RETRY) {
  ------------------
  |  Branch (2704:12): [True: 0, False: 4.32k]
  ------------------
 2705|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2706|      0|        sc->statem.error_state = ERROR_STATE_SSL;
 2707|      0|        return 0;
 2708|      0|    }
 2709|       |    /* If we are a client and haven't sent the Finished we better do that */
 2710|  4.32k|    if (!ossl_statem_check_finish_init(sc, 1))
  ------------------
  |  Branch (2710:9): [True: 0, False: 4.32k]
  ------------------
 2711|      0|        return -1;
 2712|       |
 2713|  4.32k|    if ((sc->mode & SSL_MODE_ASYNC) && ASYNC_get_current_job() == NULL) {
  ------------------
  |  |  557|  4.32k|#define SSL_MODE_ASYNC 0x00000100U
  ------------------
  |  Branch (2713:9): [True: 0, False: 4.32k]
  |  Branch (2713:40): [True: 0, False: 0]
  ------------------
 2714|      0|        struct ssl_async_args args;
 2715|       |
 2716|      0|        args.s = s;
 2717|      0|        args.buf = (void *)buf;
 2718|      0|        args.num = num;
 2719|      0|        args.type = WRITEFUNC;
 2720|      0|        args.f.func_write = s->method->ssl_write;
 2721|       |
 2722|      0|        ret = ssl_start_async_job(s, &args, ssl_io_intern);
 2723|      0|        *written = sc->asyncrw;
 2724|      0|        ssl_update_error_state(sc);
 2725|      0|        return ret;
 2726|  4.32k|    } else {
 2727|  4.32k|        ret = s->method->ssl_write(s, buf, num, written);
 2728|  4.32k|        ssl_update_error_state(sc);
 2729|  4.32k|        return ret;
 2730|  4.32k|    }
 2731|  4.32k|}
SSL_write:
 2815|  3.60k|{
 2816|  3.60k|    int ret;
 2817|  3.60k|    size_t written;
 2818|  3.60k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  3.60k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  3.60k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 3.60k]
  |  |  |  |  ------------------
  |  |  |  |   33|  3.60k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  3.60k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 3.60k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  3.60k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  3.60k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 2819|       |
 2820|  3.60k|    if (num < 0) {
  ------------------
  |  Branch (2820:9): [True: 0, False: 3.60k]
  ------------------
 2821|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_BAD_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2822|      0|        if (sc != NULL)
  ------------------
  |  Branch (2822:13): [True: 0, False: 0]
  ------------------
 2823|      0|            sc->statem.error_state = ERROR_STATE_SSL;
 2824|      0|        return -1;
 2825|      0|    }
 2826|       |
 2827|  3.60k|    ret = ssl_write_internal(s, buf, (size_t)num, 0, &written);
 2828|       |
 2829|       |    /*
 2830|       |     * The cast is safe here because ret should be <= INT_MAX because num is
 2831|       |     * <= INT_MAX
 2832|       |     */
 2833|  3.60k|    if (ret > 0)
  ------------------
  |  Branch (2833:9): [True: 3.60k, False: 0]
  ------------------
 2834|  3.60k|        ret = (int)written;
 2835|       |
 2836|  3.60k|    return ret;
 2837|  3.60k|}
SSL_write_ex:
 2840|    720|{
 2841|    720|    return SSL_write_ex2(s, buf, num, 0, written);
 2842|    720|}
SSL_write_ex2:
 2846|    720|{
 2847|    720|    int ret;
 2848|       |
 2849|    720|    ret = ssl_write_internal(s, buf, num, flags, written);
 2850|    720|    if (ret < 0)
  ------------------
  |  Branch (2850:9): [True: 0, False: 720]
  ------------------
 2851|      0|        ret = 0;
 2852|       |
 2853|    720|    return ret;
 2854|    720|}
SSL_shutdown:
 2938|  6.48k|{
 2939|       |    /*
 2940|       |     * Note that this function behaves differently from what one might
 2941|       |     * expect.  Return values are 0 for no success (yet), 1 for success; but
 2942|       |     * calling it once is usually not enough, even if blocking I/O is used
 2943|       |     * (see ssl3_shutdown).
 2944|       |     */
 2945|  6.48k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  6.48k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  6.48k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 6.48k]
  |  |  |  |  ------------------
  |  |  |  |   33|  6.48k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  6.48k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 6.48k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  6.48k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  6.48k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 2946|  6.48k|    int ret;
 2947|       |
 2948|  6.48k|    if (ssl_reset_error_state(sc) == 0)
  ------------------
  |  Branch (2948:9): [True: 0, False: 6.48k]
  ------------------
 2949|      0|        return -1;
 2950|       |
 2951|  6.48k|#ifndef OPENSSL_NO_QUIC
 2952|  6.48k|    if (IS_QUIC(s))
  ------------------
  |  |   96|  6.48k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  6.48k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 6.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 6.48k, False: 0]
  |  |  ------------------
  ------------------
 2953|      0|        return ossl_quic_conn_shutdown(s, 0, NULL, 0);
 2954|  6.48k|#endif
 2955|       |
 2956|  6.48k|    if (sc == NULL)
  ------------------
  |  Branch (2956:9): [True: 0, False: 6.48k]
  ------------------
 2957|      0|        return -1;
 2958|       |
 2959|  6.48k|    if (sc->handshake_func == NULL) {
  ------------------
  |  Branch (2959:9): [True: 0, False: 6.48k]
  ------------------
 2960|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_UNINITIALIZED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2961|      0|        sc->statem.error_state = ERROR_STATE_SSL;
 2962|      0|        return -1;
 2963|      0|    }
 2964|       |
 2965|  6.48k|    if (!SSL_in_init(s)) {
  ------------------
  |  Branch (2965:9): [True: 6.48k, False: 0]
  ------------------
 2966|  6.48k|        if ((sc->mode & SSL_MODE_ASYNC) && ASYNC_get_current_job() == NULL) {
  ------------------
  |  |  557|  6.48k|#define SSL_MODE_ASYNC 0x00000100U
  ------------------
  |  Branch (2966:13): [True: 0, False: 6.48k]
  |  Branch (2966:44): [True: 0, False: 0]
  ------------------
 2967|      0|            struct ssl_async_args args;
 2968|       |
 2969|      0|            memset(&args, 0, sizeof(args));
 2970|      0|            args.s = s;
 2971|      0|            args.type = OTHERFUNC;
 2972|      0|            args.f.func_other = s->method->ssl_shutdown;
 2973|       |
 2974|      0|            ret = ssl_start_async_job(s, &args, ssl_io_intern);
 2975|  6.48k|        } else {
 2976|  6.48k|            ret = s->method->ssl_shutdown(s);
 2977|  6.48k|        }
 2978|  6.48k|    } else {
 2979|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_SHUTDOWN_WHILE_IN_INIT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2980|      0|        sc->statem.error_state = ERROR_STATE_SSL;
 2981|      0|        return -1;
 2982|      0|    }
 2983|       |
 2984|  6.48k|    ssl_update_error_state(sc);
 2985|  6.48k|    return ret;
 2986|  6.48k|}
SSL_ctrl:
 3123|  10.8k|{
 3124|  10.8k|    return ossl_ctrl_internal(s, cmd, larg, parg, /*no_quic=*/0);
 3125|  10.8k|}
ossl_ctrl_internal:
 3128|  10.8k|{
 3129|  10.8k|    long l;
 3130|  10.8k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  10.8k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  10.8k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 10.8k]
  |  |  |  |  ------------------
  |  |  |  |   33|  10.8k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  10.8k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 10.8k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  10.8k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  10.8k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3131|       |
 3132|       |    /*
 3133|       |     * Routing of ctrl calls for QUIC is a little counterintuitive:
 3134|       |     *
 3135|       |     *   - Firstly (no_quic=0), we pass the ctrl directly to our QUIC
 3136|       |     *     implementation in case it wants to handle the ctrl specially.
 3137|       |     *
 3138|       |     *   - If our QUIC implementation does not care about the ctrl, it
 3139|       |     *     will reenter this function with no_quic=1 and we will try to handle
 3140|       |     *     it directly using the QCSO SSL object stub (not the handshake layer
 3141|       |     *     SSL object). This is important for e.g. the version configuration
 3142|       |     *     ctrls below, which must use s->defltmeth (and not sc->defltmeth).
 3143|       |     *
 3144|       |     *   - If we don't handle a ctrl here specially, then processing is
 3145|       |     *     redirected to the handshake layer SSL object.
 3146|       |     */
 3147|  10.8k|    if (!no_quic && IS_QUIC(s))
  ------------------
  |  |   96|  10.8k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  10.8k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 10.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 10.8k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3147:9): [True: 10.8k, False: 0]
  ------------------
 3148|      0|        return s->method->ssl_ctrl(s, cmd, larg, parg);
 3149|       |
 3150|  10.8k|    if (sc == NULL)
  ------------------
  |  Branch (3150:9): [True: 0, False: 10.8k]
  ------------------
 3151|      0|        return 0;
 3152|       |
 3153|  10.8k|    switch (cmd) {
 3154|      0|    case SSL_CTRL_GET_READ_AHEAD:
  ------------------
  |  | 1329|      0|#define SSL_CTRL_GET_READ_AHEAD 40
  ------------------
  |  Branch (3154:5): [True: 0, False: 10.8k]
  ------------------
 3155|      0|        return RECORD_LAYER_get_read_ahead(&sc->rlayer);
  ------------------
  |  |  135|      0|#define RECORD_LAYER_get_read_ahead(rl) ((rl)->read_ahead)
  ------------------
 3156|      0|    case SSL_CTRL_SET_READ_AHEAD:
  ------------------
  |  | 1330|      0|#define SSL_CTRL_SET_READ_AHEAD 41
  ------------------
  |  Branch (3156:5): [True: 0, False: 10.8k]
  ------------------
 3157|      0|        l = RECORD_LAYER_get_read_ahead(&sc->rlayer);
  ------------------
  |  |  135|      0|#define RECORD_LAYER_get_read_ahead(rl) ((rl)->read_ahead)
  ------------------
 3158|      0|        RECORD_LAYER_set_read_ahead(&sc->rlayer, larg);
  ------------------
  |  |  134|      0|#define RECORD_LAYER_set_read_ahead(rl, ra) ((rl)->read_ahead = (ra))
  ------------------
 3159|      0|        return l;
 3160|       |
 3161|  3.62k|    case SSL_CTRL_MODE: {
  ------------------
  |  | 1328|  3.62k|#define SSL_CTRL_MODE 33
  ------------------
  |  Branch (3161:5): [True: 3.62k, False: 7.25k]
  ------------------
 3162|  3.62k|        OSSL_PARAM options[2], *opts = options;
 3163|       |
 3164|  3.62k|        sc->mode |= larg;
 3165|       |
 3166|  3.62k|        *opts++ = OSSL_PARAM_construct_uint32(OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE,
  ------------------
  |  |  339|  3.62k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE "mode"
  ------------------
 3167|  3.62k|            &sc->mode);
 3168|  3.62k|        *opts = OSSL_PARAM_construct_end();
 3169|       |
 3170|       |        /* Ignore return value */
 3171|  3.62k|        sc->rlayer.rrlmethod->set_options(sc->rlayer.rrl, options);
 3172|       |
 3173|  3.62k|        return sc->mode;
 3174|      0|    }
 3175|      0|    case SSL_CTRL_CLEAR_MODE:
  ------------------
  |  | 1371|      0|#define SSL_CTRL_CLEAR_MODE 78
  ------------------
  |  Branch (3175:5): [True: 0, False: 10.8k]
  ------------------
 3176|      0|        return (sc->mode &= ~larg);
 3177|      0|    case SSL_CTRL_GET_MAX_CERT_LIST:
  ------------------
  |  | 1335|      0|#define SSL_CTRL_GET_MAX_CERT_LIST 50
  ------------------
  |  Branch (3177:5): [True: 0, False: 10.8k]
  ------------------
 3178|      0|        return (long)sc->max_cert_list;
 3179|      0|    case SSL_CTRL_SET_MAX_CERT_LIST:
  ------------------
  |  | 1336|      0|#define SSL_CTRL_SET_MAX_CERT_LIST 51
  ------------------
  |  Branch (3179:5): [True: 0, False: 10.8k]
  ------------------
 3180|      0|        if (larg < 0)
  ------------------
  |  Branch (3180:13): [True: 0, False: 0]
  ------------------
 3181|      0|            return 0;
 3182|      0|        l = (long)sc->max_cert_list;
 3183|      0|        sc->max_cert_list = (size_t)larg;
 3184|      0|        return l;
 3185|      0|    case SSL_CTRL_SET_MAX_SEND_FRAGMENT:
  ------------------
  |  | 1337|      0|#define SSL_CTRL_SET_MAX_SEND_FRAGMENT 52
  ------------------
  |  Branch (3185:5): [True: 0, False: 10.8k]
  ------------------
 3186|      0|        if (larg < 512 || larg > SSL3_RT_MAX_PLAIN_LENGTH)
  ------------------
  |  |  177|      0|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (3186:13): [True: 0, False: 0]
  |  Branch (3186:27): [True: 0, False: 0]
  ------------------
 3187|      0|            return 0;
 3188|       |#ifndef OPENSSL_NO_KTLS
 3189|       |        if (sc->wbio != NULL && BIO_get_ktls_send(sc->wbio))
 3190|       |            return 0;
 3191|       |#endif /* OPENSSL_NO_KTLS */
 3192|      0|        sc->max_send_fragment = larg;
 3193|      0|        if (sc->max_send_fragment < sc->split_send_fragment)
  ------------------
  |  Branch (3193:13): [True: 0, False: 0]
  ------------------
 3194|      0|            sc->split_send_fragment = sc->max_send_fragment;
 3195|      0|        sc->rlayer.wrlmethod->set_max_frag_len(sc->rlayer.wrl, larg);
 3196|      0|        return 1;
 3197|      0|    case SSL_CTRL_SET_SPLIT_SEND_FRAGMENT:
  ------------------
  |  | 1405|      0|#define SSL_CTRL_SET_SPLIT_SEND_FRAGMENT 125
  ------------------
  |  Branch (3197:5): [True: 0, False: 10.8k]
  ------------------
 3198|      0|        if ((size_t)larg > sc->max_send_fragment || larg == 0)
  ------------------
  |  Branch (3198:13): [True: 0, False: 0]
  |  Branch (3198:53): [True: 0, False: 0]
  ------------------
 3199|      0|            return 0;
 3200|      0|        sc->split_send_fragment = larg;
 3201|      0|        return 1;
 3202|      0|    case SSL_CTRL_SET_MAX_PIPELINES:
  ------------------
  |  | 1406|      0|#define SSL_CTRL_SET_MAX_PIPELINES 126
  ------------------
  |  Branch (3202:5): [True: 0, False: 10.8k]
  ------------------
 3203|      0|        if (larg < 1 || larg > SSL_MAX_PIPELINES)
  ------------------
  |  |   74|      0|#define SSL_MAX_PIPELINES 32
  ------------------
  |  Branch (3203:13): [True: 0, False: 0]
  |  Branch (3203:25): [True: 0, False: 0]
  ------------------
 3204|      0|            return 0;
 3205|      0|        sc->max_pipelines = larg;
 3206|      0|        if (sc->rlayer.rrlmethod->set_max_pipelines != NULL)
  ------------------
  |  Branch (3206:13): [True: 0, False: 0]
  ------------------
 3207|      0|            sc->rlayer.rrlmethod->set_max_pipelines(sc->rlayer.rrl, (size_t)larg);
 3208|      0|        return 1;
 3209|      0|    case SSL_CTRL_GET_RI_SUPPORT:
  ------------------
  |  | 1370|      0|#define SSL_CTRL_GET_RI_SUPPORT 76
  ------------------
  |  Branch (3209:5): [True: 0, False: 10.8k]
  ------------------
 3210|      0|        return sc->s3.send_connection_binding;
 3211|      0|    case SSL_CTRL_SET_RETRY_VERIFY:
  ------------------
  |  | 1416|      0|#define SSL_CTRL_SET_RETRY_VERIFY 136
  ------------------
  |  Branch (3211:5): [True: 0, False: 10.8k]
  ------------------
 3212|      0|        sc->rwstate = SSL_RETRY_VERIFY;
  ------------------
  |  |  962|      0|#define SSL_RETRY_VERIFY 8
  ------------------
 3213|      0|        return 1;
 3214|      0|    case SSL_CTRL_CERT_FLAGS:
  ------------------
  |  | 1383|      0|#define SSL_CTRL_CERT_FLAGS 99
  ------------------
  |  Branch (3214:5): [True: 0, False: 10.8k]
  ------------------
 3215|      0|        return (sc->cert->cert_flags |= larg);
 3216|      0|    case SSL_CTRL_CLEAR_CERT_FLAGS:
  ------------------
  |  | 1384|      0|#define SSL_CTRL_CLEAR_CERT_FLAGS 100
  ------------------
  |  Branch (3216:5): [True: 0, False: 10.8k]
  ------------------
 3217|      0|        return (sc->cert->cert_flags &= ~larg);
 3218|       |
 3219|      0|    case SSL_CTRL_GET_RAW_CIPHERLIST:
  ------------------
  |  | 1394|      0|#define SSL_CTRL_GET_RAW_CIPHERLIST 110
  ------------------
  |  Branch (3219:5): [True: 0, False: 10.8k]
  ------------------
 3220|      0|        if (parg) {
  ------------------
  |  Branch (3220:13): [True: 0, False: 0]
  ------------------
 3221|      0|            if (sc->s3.tmp.ciphers_raw == NULL)
  ------------------
  |  Branch (3221:17): [True: 0, False: 0]
  ------------------
 3222|      0|                return 0;
 3223|      0|            *(unsigned char **)parg = sc->s3.tmp.ciphers_raw;
 3224|      0|            return (int)sc->s3.tmp.ciphers_rawlen;
 3225|      0|        } else {
 3226|      0|            return TLS_CIPHER_LEN;
  ------------------
  |  |  389|      0|#define TLS_CIPHER_LEN 2
  ------------------
 3227|      0|        }
 3228|      0|    case SSL_CTRL_GET_EXTMS_SUPPORT:
  ------------------
  |  | 1402|      0|#define SSL_CTRL_GET_EXTMS_SUPPORT 122
  ------------------
  |  Branch (3228:5): [True: 0, False: 10.8k]
  ------------------
 3229|      0|        if (!sc->session || SSL_in_init(s) || ossl_statem_get_in_handshake(sc))
  ------------------
  |  Branch (3229:13): [True: 0, False: 0]
  |  Branch (3229:29): [True: 0, False: 0]
  |  Branch (3229:47): [True: 0, False: 0]
  ------------------
 3230|      0|            return -1;
 3231|      0|        if (sc->session->flags & SSL_SESS_FLAG_EXTMS)
  ------------------
  |  |  577|      0|#define SSL_SESS_FLAG_EXTMS 0x1
  ------------------
  |  Branch (3231:13): [True: 0, False: 0]
  ------------------
 3232|      0|            return 1;
 3233|      0|        else
 3234|      0|            return 0;
 3235|      0|    case SSL_CTRL_SET_MIN_PROTO_VERSION:
  ------------------
  |  | 1403|      0|#define SSL_CTRL_SET_MIN_PROTO_VERSION 123
  ------------------
  |  Branch (3235:5): [True: 0, False: 10.8k]
  ------------------
 3236|      0|        return ssl_check_allowed_versions(larg, sc->max_proto_version)
  ------------------
  |  Branch (3236:16): [True: 0, False: 0]
  ------------------
 3237|      0|            && ssl_set_version_bound(s->defltmeth->version, (int)larg,
  ------------------
  |  Branch (3237:16): [True: 0, False: 0]
  ------------------
 3238|      0|                &sc->min_proto_version);
 3239|      0|    case SSL_CTRL_GET_MIN_PROTO_VERSION:
  ------------------
  |  | 1410|      0|#define SSL_CTRL_GET_MIN_PROTO_VERSION 130
  ------------------
  |  Branch (3239:5): [True: 0, False: 10.8k]
  ------------------
 3240|      0|        return sc->min_proto_version;
 3241|      0|    case SSL_CTRL_SET_MAX_PROTO_VERSION:
  ------------------
  |  | 1404|      0|#define SSL_CTRL_SET_MAX_PROTO_VERSION 124
  ------------------
  |  Branch (3241:5): [True: 0, False: 10.8k]
  ------------------
 3242|      0|        return ssl_check_allowed_versions(sc->min_proto_version, larg)
  ------------------
  |  Branch (3242:16): [True: 0, False: 0]
  ------------------
 3243|      0|            && ssl_set_version_bound(s->defltmeth->version, (int)larg,
  ------------------
  |  Branch (3243:16): [True: 0, False: 0]
  ------------------
 3244|      0|                &sc->max_proto_version);
 3245|      0|    case SSL_CTRL_GET_MAX_PROTO_VERSION:
  ------------------
  |  | 1411|      0|#define SSL_CTRL_GET_MAX_PROTO_VERSION 131
  ------------------
  |  Branch (3245:5): [True: 0, False: 10.8k]
  ------------------
 3246|      0|        return sc->max_proto_version;
 3247|  7.25k|    default:
  ------------------
  |  Branch (3247:5): [True: 7.25k, False: 3.62k]
  ------------------
 3248|  7.25k|        if (IS_QUIC(s))
  ------------------
  |  |   96|  7.25k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  7.25k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 7.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
 3249|      0|            return SSL_ctrl((SSL *)sc, cmd, larg, parg);
 3250|  7.25k|        else
 3251|  7.25k|            return s->method->ssl_ctrl(s, cmd, larg, parg);
 3252|  10.8k|    }
 3253|  10.8k|}
SSL_CTX_ctrl:
 3277|  32.9k|{
 3278|  32.9k|    long l;
 3279|       |
 3280|       |    /* For some cases with ctx == NULL or larg == 1 perform syntax checks */
 3281|  32.9k|    if (cmd == SSL_CTRL_SET_GROUPS_LIST && larg == 1)
  ------------------
  |  | 1379|  65.9k|#define SSL_CTRL_SET_GROUPS_LIST 92
  ------------------
  |  Branch (3281:9): [True: 7.36k, False: 25.6k]
  |  Branch (3281:44): [True: 0, False: 7.36k]
  ------------------
 3282|      0|        return tls1_set_groups_list(ctx, NULL, NULL, NULL, NULL, NULL, NULL, parg);
 3283|  32.9k|    if (ctx == NULL) {
  ------------------
  |  Branch (3283:9): [True: 0, False: 32.9k]
  ------------------
 3284|      0|        switch (cmd) {
 3285|      0|        case SSL_CTRL_SET_SIGALGS_LIST:
  ------------------
  |  | 1382|      0|#define SSL_CTRL_SET_SIGALGS_LIST 98
  ------------------
  |  Branch (3285:9): [True: 0, False: 0]
  ------------------
 3286|      0|        case SSL_CTRL_SET_CLIENT_SIGALGS_LIST:
  ------------------
  |  | 1386|      0|#define SSL_CTRL_SET_CLIENT_SIGALGS_LIST 102
  ------------------
  |  Branch (3286:9): [True: 0, False: 0]
  ------------------
 3287|      0|            return tls1_set_sigalgs_list(ctx, NULL, parg, 0);
 3288|      0|        default:
  ------------------
  |  Branch (3288:9): [True: 0, False: 0]
  ------------------
 3289|      0|            return 0;
 3290|      0|        }
 3291|      0|    }
 3292|       |
 3293|  32.9k|    switch (cmd) {
 3294|      0|    case SSL_CTRL_GET_READ_AHEAD:
  ------------------
  |  | 1329|      0|#define SSL_CTRL_GET_READ_AHEAD 40
  ------------------
  |  Branch (3294:5): [True: 0, False: 32.9k]
  ------------------
 3295|      0|        return ctx->read_ahead;
 3296|  3.62k|    case SSL_CTRL_SET_READ_AHEAD:
  ------------------
  |  | 1330|  3.62k|#define SSL_CTRL_SET_READ_AHEAD 41
  ------------------
  |  Branch (3296:5): [True: 3.62k, False: 29.3k]
  ------------------
 3297|  3.62k|        l = ctx->read_ahead;
 3298|  3.62k|        ctx->read_ahead = larg;
 3299|  3.62k|        return l;
 3300|       |
 3301|      0|    case SSL_CTRL_SET_MSG_CALLBACK_ARG:
  ------------------
  |  | 1312|      0|#define SSL_CTRL_SET_MSG_CALLBACK_ARG 16
  ------------------
  |  Branch (3301:5): [True: 0, False: 32.9k]
  ------------------
 3302|      0|        ctx->msg_callback_arg = parg;
 3303|      0|        return 1;
 3304|       |
 3305|      0|    case SSL_CTRL_GET_MAX_CERT_LIST:
  ------------------
  |  | 1335|      0|#define SSL_CTRL_GET_MAX_CERT_LIST 50
  ------------------
  |  Branch (3305:5): [True: 0, False: 32.9k]
  ------------------
 3306|      0|        return (long)ctx->max_cert_list;
 3307|      0|    case SSL_CTRL_SET_MAX_CERT_LIST:
  ------------------
  |  | 1336|      0|#define SSL_CTRL_SET_MAX_CERT_LIST 51
  ------------------
  |  Branch (3307:5): [True: 0, False: 32.9k]
  ------------------
 3308|      0|        if (larg < 0)
  ------------------
  |  Branch (3308:13): [True: 0, False: 0]
  ------------------
 3309|      0|            return 0;
 3310|      0|        l = (long)ctx->max_cert_list;
 3311|      0|        ctx->max_cert_list = (size_t)larg;
 3312|      0|        return l;
 3313|       |
 3314|      0|    case SSL_CTRL_SET_SESS_CACHE_SIZE:
  ------------------
  |  | 1331|      0|#define SSL_CTRL_SET_SESS_CACHE_SIZE 42
  ------------------
  |  Branch (3314:5): [True: 0, False: 32.9k]
  ------------------
 3315|      0|        if (larg < 0)
  ------------------
  |  Branch (3315:13): [True: 0, False: 0]
  ------------------
 3316|      0|            return 0;
 3317|      0|        l = (long)ctx->session_cache_size;
 3318|      0|        ctx->session_cache_size = (size_t)larg;
 3319|      0|        return l;
 3320|      0|    case SSL_CTRL_GET_SESS_CACHE_SIZE:
  ------------------
  |  | 1332|      0|#define SSL_CTRL_GET_SESS_CACHE_SIZE 43
  ------------------
  |  Branch (3320:5): [True: 0, False: 32.9k]
  ------------------
 3321|      0|        return (long)ctx->session_cache_size;
 3322|  7.36k|    case SSL_CTRL_SET_SESS_CACHE_MODE:
  ------------------
  |  | 1333|  7.36k|#define SSL_CTRL_SET_SESS_CACHE_MODE 44
  ------------------
  |  Branch (3322:5): [True: 7.36k, False: 25.6k]
  ------------------
 3323|  7.36k|        l = ctx->session_cache_mode;
 3324|  7.36k|        ctx->session_cache_mode = larg;
 3325|  7.36k|        return l;
 3326|      0|    case SSL_CTRL_GET_SESS_CACHE_MODE:
  ------------------
  |  | 1334|      0|#define SSL_CTRL_GET_SESS_CACHE_MODE 45
  ------------------
  |  Branch (3326:5): [True: 0, False: 32.9k]
  ------------------
 3327|      0|        return ctx->session_cache_mode;
 3328|       |
 3329|      0|    case SSL_CTRL_SESS_NUMBER:
  ------------------
  |  | 1316|      0|#define SSL_CTRL_SESS_NUMBER 20
  ------------------
  |  Branch (3329:5): [True: 0, False: 32.9k]
  ------------------
 3330|      0|        return lh_SSL_SESSION_num_items(ctx->sessions);
 3331|      0|    case SSL_CTRL_SESS_CONNECT:
  ------------------
  |  | 1317|      0|#define SSL_CTRL_SESS_CONNECT 21
  ------------------
  |  Branch (3331:5): [True: 0, False: 32.9k]
  ------------------
 3332|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_connect);
 3333|      0|    case SSL_CTRL_SESS_CONNECT_GOOD:
  ------------------
  |  | 1318|      0|#define SSL_CTRL_SESS_CONNECT_GOOD 22
  ------------------
  |  Branch (3333:5): [True: 0, False: 32.9k]
  ------------------
 3334|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_connect_good);
 3335|      0|    case SSL_CTRL_SESS_CONNECT_RENEGOTIATE:
  ------------------
  |  | 1319|      0|#define SSL_CTRL_SESS_CONNECT_RENEGOTIATE 23
  ------------------
  |  Branch (3335:5): [True: 0, False: 32.9k]
  ------------------
 3336|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_connect_renegotiate);
 3337|      0|    case SSL_CTRL_SESS_ACCEPT:
  ------------------
  |  | 1320|      0|#define SSL_CTRL_SESS_ACCEPT 24
  ------------------
  |  Branch (3337:5): [True: 0, False: 32.9k]
  ------------------
 3338|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_accept);
 3339|      0|    case SSL_CTRL_SESS_ACCEPT_GOOD:
  ------------------
  |  | 1321|      0|#define SSL_CTRL_SESS_ACCEPT_GOOD 25
  ------------------
  |  Branch (3339:5): [True: 0, False: 32.9k]
  ------------------
 3340|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_accept_good);
 3341|      0|    case SSL_CTRL_SESS_ACCEPT_RENEGOTIATE:
  ------------------
  |  | 1322|      0|#define SSL_CTRL_SESS_ACCEPT_RENEGOTIATE 26
  ------------------
  |  Branch (3341:5): [True: 0, False: 32.9k]
  ------------------
 3342|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_accept_renegotiate);
 3343|      0|    case SSL_CTRL_SESS_HIT:
  ------------------
  |  | 1323|      0|#define SSL_CTRL_SESS_HIT 27
  ------------------
  |  Branch (3343:5): [True: 0, False: 32.9k]
  ------------------
 3344|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_hit);
 3345|      0|    case SSL_CTRL_SESS_CB_HIT:
  ------------------
  |  | 1324|      0|#define SSL_CTRL_SESS_CB_HIT 28
  ------------------
  |  Branch (3345:5): [True: 0, False: 32.9k]
  ------------------
 3346|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_cb_hit);
 3347|      0|    case SSL_CTRL_SESS_MISSES:
  ------------------
  |  | 1325|      0|#define SSL_CTRL_SESS_MISSES 29
  ------------------
  |  Branch (3347:5): [True: 0, False: 32.9k]
  ------------------
 3348|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_miss);
 3349|      0|    case SSL_CTRL_SESS_TIMEOUTS:
  ------------------
  |  | 1326|      0|#define SSL_CTRL_SESS_TIMEOUTS 30
  ------------------
  |  Branch (3349:5): [True: 0, False: 32.9k]
  ------------------
 3350|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_timeout);
 3351|      0|    case SSL_CTRL_SESS_CACHE_FULL:
  ------------------
  |  | 1327|      0|#define SSL_CTRL_SESS_CACHE_FULL 31
  ------------------
  |  Branch (3351:5): [True: 0, False: 32.9k]
  ------------------
 3352|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_cache_full);
 3353|  3.62k|    case SSL_CTRL_MODE:
  ------------------
  |  | 1328|  3.62k|#define SSL_CTRL_MODE 33
  ------------------
  |  Branch (3353:5): [True: 3.62k, False: 29.3k]
  ------------------
 3354|  3.62k|        return (ctx->mode |= larg);
 3355|      0|    case SSL_CTRL_CLEAR_MODE:
  ------------------
  |  | 1371|      0|#define SSL_CTRL_CLEAR_MODE 78
  ------------------
  |  Branch (3355:5): [True: 0, False: 32.9k]
  ------------------
 3356|      0|        return (ctx->mode &= ~larg);
 3357|      0|    case SSL_CTRL_SET_MAX_SEND_FRAGMENT:
  ------------------
  |  | 1337|      0|#define SSL_CTRL_SET_MAX_SEND_FRAGMENT 52
  ------------------
  |  Branch (3357:5): [True: 0, False: 32.9k]
  ------------------
 3358|      0|        if (larg < 512 || larg > SSL3_RT_MAX_PLAIN_LENGTH)
  ------------------
  |  |  177|      0|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (3358:13): [True: 0, False: 0]
  |  Branch (3358:27): [True: 0, False: 0]
  ------------------
 3359|      0|            return 0;
 3360|      0|        ctx->max_send_fragment = larg;
 3361|      0|        if (ctx->max_send_fragment < ctx->split_send_fragment)
  ------------------
  |  Branch (3361:13): [True: 0, False: 0]
  ------------------
 3362|      0|            ctx->split_send_fragment = ctx->max_send_fragment;
 3363|      0|        return 1;
 3364|      0|    case SSL_CTRL_SET_SPLIT_SEND_FRAGMENT:
  ------------------
  |  | 1405|      0|#define SSL_CTRL_SET_SPLIT_SEND_FRAGMENT 125
  ------------------
  |  Branch (3364:5): [True: 0, False: 32.9k]
  ------------------
 3365|      0|        if ((size_t)larg > ctx->max_send_fragment || larg == 0)
  ------------------
  |  Branch (3365:13): [True: 0, False: 0]
  |  Branch (3365:54): [True: 0, False: 0]
  ------------------
 3366|      0|            return 0;
 3367|      0|        ctx->split_send_fragment = larg;
 3368|      0|        return 1;
 3369|      0|    case SSL_CTRL_SET_MAX_PIPELINES:
  ------------------
  |  | 1406|      0|#define SSL_CTRL_SET_MAX_PIPELINES 126
  ------------------
  |  Branch (3369:5): [True: 0, False: 32.9k]
  ------------------
 3370|      0|        if (larg < 1 || larg > SSL_MAX_PIPELINES)
  ------------------
  |  |   74|      0|#define SSL_MAX_PIPELINES 32
  ------------------
  |  Branch (3370:13): [True: 0, False: 0]
  |  Branch (3370:25): [True: 0, False: 0]
  ------------------
 3371|      0|            return 0;
 3372|      0|        ctx->max_pipelines = larg;
 3373|      0|        return 1;
 3374|      0|    case SSL_CTRL_CERT_FLAGS:
  ------------------
  |  | 1383|      0|#define SSL_CTRL_CERT_FLAGS 99
  ------------------
  |  Branch (3374:5): [True: 0, False: 32.9k]
  ------------------
 3375|      0|        return (ctx->cert->cert_flags |= larg);
 3376|      0|    case SSL_CTRL_CLEAR_CERT_FLAGS:
  ------------------
  |  | 1384|      0|#define SSL_CTRL_CLEAR_CERT_FLAGS 100
  ------------------
  |  Branch (3376:5): [True: 0, False: 32.9k]
  ------------------
 3377|      0|        return (ctx->cert->cert_flags &= ~larg);
 3378|  7.36k|    case SSL_CTRL_SET_MIN_PROTO_VERSION:
  ------------------
  |  | 1403|  7.36k|#define SSL_CTRL_SET_MIN_PROTO_VERSION 123
  ------------------
  |  Branch (3378:5): [True: 7.36k, False: 25.6k]
  ------------------
 3379|  7.36k|        return ssl_check_allowed_versions(larg, ctx->max_proto_version)
  ------------------
  |  Branch (3379:16): [True: 7.36k, False: 0]
  ------------------
 3380|  7.36k|            && ssl_set_version_bound(ctx->method->version, (int)larg,
  ------------------
  |  Branch (3380:16): [True: 7.36k, False: 0]
  ------------------
 3381|  7.36k|                &ctx->min_proto_version);
 3382|      0|    case SSL_CTRL_GET_MIN_PROTO_VERSION:
  ------------------
  |  | 1410|      0|#define SSL_CTRL_GET_MIN_PROTO_VERSION 130
  ------------------
  |  Branch (3382:5): [True: 0, False: 32.9k]
  ------------------
 3383|      0|        return ctx->min_proto_version;
 3384|  3.62k|    case SSL_CTRL_SET_MAX_PROTO_VERSION:
  ------------------
  |  | 1404|  3.62k|#define SSL_CTRL_SET_MAX_PROTO_VERSION 124
  ------------------
  |  Branch (3384:5): [True: 3.62k, False: 29.3k]
  ------------------
 3385|  3.62k|        return ssl_check_allowed_versions(ctx->min_proto_version, larg)
  ------------------
  |  Branch (3385:16): [True: 3.62k, False: 0]
  ------------------
 3386|  3.62k|            && ssl_set_version_bound(ctx->method->version, (int)larg,
  ------------------
  |  Branch (3386:16): [True: 3.62k, False: 0]
  ------------------
 3387|  3.62k|                &ctx->max_proto_version);
 3388|      0|    case SSL_CTRL_GET_MAX_PROTO_VERSION:
  ------------------
  |  | 1411|      0|#define SSL_CTRL_GET_MAX_PROTO_VERSION 131
  ------------------
  |  Branch (3388:5): [True: 0, False: 32.9k]
  ------------------
 3389|      0|        return ctx->max_proto_version;
 3390|  7.36k|    default:
  ------------------
  |  Branch (3390:5): [True: 7.36k, False: 25.6k]
  ------------------
 3391|  7.36k|        return ctx->method->ssl_ctx_ctrl(ctx, cmd, larg, parg);
 3392|  32.9k|    }
 3393|  32.9k|}
ssl_cipher_id_cmp:
 3410|  1.03M|{
 3411|  1.03M|    if (a->id > b->id)
  ------------------
  |  Branch (3411:9): [True: 388k, False: 649k]
  ------------------
 3412|   388k|        return 1;
 3413|   649k|    if (a->id < b->id)
  ------------------
  |  Branch (3413:9): [True: 529k, False: 119k]
  ------------------
 3414|   529k|        return -1;
 3415|   119k|    return 0;
 3416|   649k|}
ssl_cipher_ptr_id_cmp:
 3420|  1.99M|{
 3421|  1.99M|    if ((*ap)->id > (*bp)->id)
  ------------------
  |  Branch (3421:9): [True: 1.11M, False: 879k]
  ------------------
 3422|  1.11M|        return 1;
 3423|   879k|    if ((*ap)->id < (*bp)->id)
  ------------------
  |  Branch (3423:9): [True: 875k, False: 3.62k]
  ------------------
 3424|   875k|        return -1;
 3425|  3.62k|    return 0;
 3426|   879k|}
SSL_get_ciphers:
 3433|  21.7k|{
 3434|  21.7k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  21.7k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  21.7k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 21.7k]
  |  |  |  |  ------------------
  |  |  |  |   33|  21.7k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  21.7k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 21.7k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  21.7k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  21.7k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3435|       |
 3436|  21.7k|    if (sc != NULL) {
  ------------------
  |  Branch (3436:9): [True: 21.7k, False: 0]
  ------------------
 3437|  21.7k|        if (sc->cipher_list != NULL) {
  ------------------
  |  Branch (3437:13): [True: 0, False: 21.7k]
  ------------------
 3438|      0|            return sc->cipher_list;
 3439|  21.7k|        } else if ((s->ctx != NULL) && (s->ctx->cipher_list != NULL)) {
  ------------------
  |  Branch (3439:20): [True: 21.7k, False: 0]
  |  Branch (3439:40): [True: 21.7k, False: 0]
  ------------------
 3440|  21.7k|            return s->ctx->cipher_list;
 3441|  21.7k|        }
 3442|  21.7k|    }
 3443|      0|    return NULL;
 3444|  21.7k|}
SSL_get1_supported_ciphers:
 3456|  10.8k|{
 3457|  10.8k|    STACK_OF(SSL_CIPHER) *sk = NULL, *ciphers;
  ------------------
  |  |   33|  10.8k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 3458|  10.8k|    int i;
 3459|  10.8k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  10.8k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  10.8k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 10.8k]
  |  |  |  |  ------------------
  |  |  |  |   33|  10.8k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  10.8k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 10.8k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  10.8k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  10.8k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3460|       |
 3461|  10.8k|    if (sc == NULL)
  ------------------
  |  Branch (3461:9): [True: 0, False: 10.8k]
  ------------------
 3462|      0|        return NULL;
 3463|       |
 3464|  10.8k|    ciphers = SSL_get_ciphers(s);
 3465|  10.8k|    if (!ciphers)
  ------------------
  |  Branch (3465:9): [True: 0, False: 10.8k]
  ------------------
 3466|      0|        return NULL;
 3467|  10.8k|    if (!ssl_set_client_disabled(sc))
  ------------------
  |  Branch (3467:9): [True: 0, False: 10.8k]
  ------------------
 3468|      0|        return NULL;
 3469|   664k|    for (i = 0; i < sk_SSL_CIPHER_num(ciphers); i++) {
  ------------------
  |  | 1028|   664k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (3469:17): [True: 653k, False: 10.8k]
  ------------------
 3470|   653k|        const SSL_CIPHER *c = sk_SSL_CIPHER_value(ciphers, i);
  ------------------
  |  | 1029|   653k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 3471|   653k|        if (!ssl_cipher_disabled(sc, c, SSL_SECOP_CIPHER_SUPPORTED, 0)) {
  ------------------
  |  | 2754|   653k|#define SSL_SECOP_CIPHER_SUPPORTED (1 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2730|   653k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (3471:13): [True: 326k, False: 326k]
  ------------------
 3472|   326k|            if (!sk)
  ------------------
  |  Branch (3472:17): [True: 10.8k, False: 315k]
  ------------------
 3473|  10.8k|                sk = sk_SSL_CIPHER_new_null();
  ------------------
  |  | 1031|  10.8k|#define sk_SSL_CIPHER_new_null() ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_SSL_CIPHER_freefunc_thunk))
  ------------------
 3474|   326k|            if (!sk)
  ------------------
  |  Branch (3474:17): [True: 0, False: 326k]
  ------------------
 3475|      0|                return NULL;
 3476|   326k|            if (!sk_SSL_CIPHER_push(sk, c)) {
  ------------------
  |  | 1038|   326k|#define sk_SSL_CIPHER_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
  |  Branch (3476:17): [True: 0, False: 326k]
  ------------------
 3477|      0|                sk_SSL_CIPHER_free(sk);
  ------------------
  |  | 1034|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 3478|      0|                return NULL;
 3479|      0|            }
 3480|   326k|        }
 3481|   653k|    }
 3482|  10.8k|    return sk;
 3483|  10.8k|}
ssl_get_ciphers_by_id:
 3488|  3.62k|{
 3489|  3.62k|    if (s != NULL) {
  ------------------
  |  Branch (3489:9): [True: 3.62k, False: 0]
  ------------------
 3490|  3.62k|        if (s->cipher_list_by_id != NULL)
  ------------------
  |  Branch (3490:13): [True: 0, False: 3.62k]
  ------------------
 3491|      0|            return s->cipher_list_by_id;
 3492|  3.62k|        else if (s->ssl.ctx != NULL
  ------------------
  |  Branch (3492:18): [True: 3.62k, False: 0]
  ------------------
 3493|  3.62k|            && s->ssl.ctx->cipher_list_by_id != NULL)
  ------------------
  |  Branch (3493:16): [True: 3.62k, False: 0]
  ------------------
 3494|  3.62k|            return s->ssl.ctx->cipher_list_by_id;
 3495|  3.62k|    }
 3496|      0|    return NULL;
 3497|  3.62k|}
SSL_select_next_proto:
 3756|  3.62k|{
 3757|  3.62k|    PACKET cpkt, csubpkt, spkt, ssubpkt;
 3758|       |
 3759|  3.62k|    if (!PACKET_buf_init(&cpkt, client, client_len)
  ------------------
  |  Branch (3759:9): [True: 0, False: 3.62k]
  ------------------
 3760|  3.62k|        || !PACKET_get_length_prefixed_1(&cpkt, &csubpkt)
  ------------------
  |  Branch (3760:12): [True: 0, False: 3.62k]
  ------------------
 3761|  3.62k|        || PACKET_remaining(&csubpkt) == 0) {
  ------------------
  |  Branch (3761:12): [True: 0, False: 3.62k]
  ------------------
 3762|      0|        *out = NULL;
 3763|      0|        *outlen = 0;
 3764|      0|        return OPENSSL_NPN_NO_OVERLAP;
  ------------------
  |  |  857|      0|#define OPENSSL_NPN_NO_OVERLAP 2
  ------------------
 3765|      0|    }
 3766|       |
 3767|       |    /*
 3768|       |     * Set the default opportunistic protocol. Will be overwritten if we find
 3769|       |     * a match.
 3770|       |     */
 3771|  3.62k|    *out = (unsigned char *)PACKET_data(&csubpkt);
 3772|  3.62k|    *outlen = (unsigned char)PACKET_remaining(&csubpkt);
 3773|       |
 3774|       |    /*
 3775|       |     * For each protocol in server preference order, see if we support it.
 3776|       |     */
 3777|  3.62k|    if (PACKET_buf_init(&spkt, server, server_len)) {
  ------------------
  |  Branch (3777:9): [True: 3.62k, False: 0]
  ------------------
 3778|  3.63k|        while (PACKET_get_length_prefixed_1(&spkt, &ssubpkt)) {
  ------------------
  |  Branch (3778:16): [True: 3.62k, False: 2]
  ------------------
 3779|  3.62k|            if (PACKET_remaining(&ssubpkt) == 0)
  ------------------
  |  Branch (3779:17): [True: 0, False: 3.62k]
  ------------------
 3780|      0|                continue; /* Invalid - ignore it */
 3781|  3.62k|            if (PACKET_buf_init(&cpkt, client, client_len)) {
  ------------------
  |  Branch (3781:17): [True: 3.62k, False: 0]
  ------------------
 3782|  7.25k|                while (PACKET_get_length_prefixed_1(&cpkt, &csubpkt)) {
  ------------------
  |  Branch (3782:24): [True: 7.25k, False: 2]
  ------------------
 3783|  7.25k|                    if (PACKET_equal(&csubpkt, PACKET_data(&ssubpkt),
  ------------------
  |  Branch (3783:25): [True: 3.62k, False: 3.62k]
  ------------------
 3784|  7.25k|                            PACKET_remaining(&ssubpkt))) {
 3785|       |                        /* We found a match */
 3786|  3.62k|                        *out = (unsigned char *)PACKET_data(&ssubpkt);
 3787|  3.62k|                        *outlen = (unsigned char)PACKET_remaining(&ssubpkt);
 3788|  3.62k|                        return OPENSSL_NPN_NEGOTIATED;
  ------------------
  |  |  856|  3.62k|#define OPENSSL_NPN_NEGOTIATED 1
  ------------------
 3789|  3.62k|                    }
 3790|  7.25k|                }
 3791|       |                /* Ignore spurious trailing bytes in the client list */
 3792|  3.62k|            } else {
 3793|       |                /* This should never happen */
 3794|      0|                return OPENSSL_NPN_NO_OVERLAP;
  ------------------
  |  |  857|      0|#define OPENSSL_NPN_NO_OVERLAP 2
  ------------------
 3795|      0|            }
 3796|  3.62k|        }
 3797|       |        /* Ignore spurious trailing bytes in the server list */
 3798|  3.62k|    }
 3799|       |
 3800|       |    /*
 3801|       |     * There's no overlap between our protocols and the server's list. We use
 3802|       |     * the default opportunistic protocol selected earlier
 3803|       |     */
 3804|      2|    return OPENSSL_NPN_NO_OVERLAP;
  ------------------
  |  |  857|      2|#define OPENSSL_NPN_NO_OVERLAP 2
  ------------------
 3805|  3.62k|}
SSL_set_alpn_protos:
 3931|  3.62k|{
 3932|  3.62k|    unsigned char *alpn;
 3933|  3.62k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(ssl);
  ------------------
  |  |   39|  3.62k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  3.62k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 3.62k]
  |  |  |  |  ------------------
  |  |  |  |   33|  3.62k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  3.62k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 3.62k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  3.62k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  3.62k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3934|       |
 3935|  3.62k|    if (sc == NULL)
  ------------------
  |  Branch (3935:9): [True: 0, False: 3.62k]
  ------------------
 3936|      0|        return 1;
 3937|       |
 3938|  3.62k|    if (protos_len == 0 || protos == NULL) {
  ------------------
  |  Branch (3938:9): [True: 0, False: 3.62k]
  |  Branch (3938:28): [True: 0, False: 3.62k]
  ------------------
 3939|      0|        OPENSSL_free(sc->ext.alpn);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3940|      0|        sc->ext.alpn = NULL;
 3941|      0|        sc->ext.alpn_len = 0;
 3942|      0|        return 0;
 3943|      0|    }
 3944|       |    /* Not valid per RFC */
 3945|  3.62k|    if (!alpn_value_ok(protos, protos_len))
  ------------------
  |  Branch (3945:9): [True: 0, False: 3.62k]
  ------------------
 3946|      0|        return 1;
 3947|       |
 3948|  3.62k|    alpn = OPENSSL_memdup(protos, protos_len);
  ------------------
  |  |  134|  3.62k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3949|  3.62k|    if (alpn == NULL)
  ------------------
  |  Branch (3949:9): [True: 0, False: 3.62k]
  ------------------
 3950|      0|        return 1;
 3951|  3.62k|    OPENSSL_free(sc->ext.alpn);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3952|  3.62k|    sc->ext.alpn = alpn;
 3953|  3.62k|    sc->ext.alpn_len = protos_len;
 3954|       |
 3955|  3.62k|    return 0;
 3956|  3.62k|}
SSL_CTX_set_alpn_select_cb:
 4007|  3.73k|{
 4008|  3.73k|    ctx->ext.alpn_select_cb = cb;
 4009|  3.73k|    ctx->ext.alpn_select_cb_arg = arg;
 4010|  3.73k|}
SSL_get0_alpn_selected:
 4020|  3.62k|{
 4021|  3.62k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(ssl);
  ------------------
  |  |   41|  3.62k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  3.62k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 3.62k]
  |  |  |  |  ------------------
  |  |  |  |   33|  3.62k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  3.62k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 3.62k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  3.62k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  3.62k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 4022|       |
 4023|  3.62k|    if (sc == NULL) {
  ------------------
  |  Branch (4023:9): [True: 0, False: 3.62k]
  ------------------
 4024|       |        /* We have no other way to indicate error */
 4025|      0|        *data = NULL;
 4026|      0|        *len = 0;
 4027|      0|        return;
 4028|      0|    }
 4029|       |
 4030|  3.62k|    *data = sc->s3.alpn_selected;
 4031|  3.62k|    if (*data == NULL)
  ------------------
  |  Branch (4031:9): [True: 2, False: 3.62k]
  ------------------
 4032|      2|        *len = 0;
 4033|  3.62k|    else
 4034|  3.62k|        *len = (unsigned int)sc->s3.alpn_selected_len;
 4035|  3.62k|}
SSL_CTX_new_ex:
 4211|  7.36k|{
 4212|  7.36k|    SSL_CTX *ret = NULL;
 4213|       |#ifndef OPENSSL_NO_SSLKEYLOG
 4214|       |    const char *keylogfile = ossl_safe_getenv("SSLKEYLOGFILE");
 4215|       |#endif
 4216|       |#ifndef OPENSSL_NO_COMP_ALG
 4217|       |    int i;
 4218|       |#endif
 4219|       |
 4220|  7.36k|    if (meth == NULL) {
  ------------------
  |  Branch (4220:9): [True: 0, False: 7.36k]
  ------------------
 4221|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_NULL_SSL_METHOD_PASSED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4222|      0|        return NULL;
 4223|      0|    }
 4224|       |
 4225|  7.36k|    if (!OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL))
  ------------------
  |  | 2818|  7.36k|#define OPENSSL_INIT_LOAD_SSL_STRINGS 0x00200000L
  ------------------
  |  Branch (4225:9): [True: 0, False: 7.36k]
  ------------------
 4226|      0|        return NULL;
 4227|       |
 4228|       |    /* Doing this for the run once effect */
 4229|  7.36k|    if (SSL_get_ex_data_X509_STORE_CTX_idx() < 0) {
  ------------------
  |  Branch (4229:9): [True: 0, False: 7.36k]
  ------------------
 4230|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_X509_VERIFICATION_SETUP_PROBLEMS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4231|      0|        goto err;
 4232|      0|    }
 4233|       |
 4234|  7.36k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  7.36k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4235|  7.36k|    if (ret == NULL)
  ------------------
  |  Branch (4235:9): [True: 0, False: 7.36k]
  ------------------
 4236|      0|        return NULL;
 4237|       |
 4238|       |    /* Init the reference counting before any call to SSL_CTX_free */
 4239|  7.36k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (4239:9): [True: 0, False: 7.36k]
  ------------------
 4240|      0|        OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4241|      0|        return NULL;
 4242|      0|    }
 4243|       |
 4244|  7.36k|    ret->lock = CRYPTO_THREAD_lock_new();
 4245|  7.36k|    if (ret->lock == NULL) {
  ------------------
  |  Branch (4245:9): [True: 0, False: 7.36k]
  ------------------
 4246|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4247|      0|        goto err;
 4248|      0|    }
 4249|       |
 4250|       |#ifdef TSAN_REQUIRES_LOCKING
 4251|       |    ret->tsan_lock = CRYPTO_THREAD_lock_new();
 4252|       |    if (ret->tsan_lock == NULL) {
 4253|       |        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
 4254|       |        goto err;
 4255|       |    }
 4256|       |#endif
 4257|       |
 4258|  7.36k|    ret->libctx = libctx;
 4259|  7.36k|    if (propq != NULL) {
  ------------------
  |  Branch (4259:9): [True: 0, False: 7.36k]
  ------------------
 4260|      0|        ret->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4261|      0|        if (ret->propq == NULL)
  ------------------
  |  Branch (4261:13): [True: 0, False: 0]
  ------------------
 4262|      0|            goto err;
 4263|      0|    }
 4264|       |
 4265|  7.36k|    ret->method = meth;
 4266|  7.36k|    ret->min_proto_version = 0;
 4267|  7.36k|    ret->max_proto_version = 0;
 4268|  7.36k|    ret->mode = SSL_MODE_AUTO_RETRY;
  ------------------
  |  |  530|  7.36k|#define SSL_MODE_AUTO_RETRY 0x00000004U
  ------------------
 4269|  7.36k|    ret->session_cache_mode = SSL_SESS_CACHE_SERVER;
  ------------------
  |  |  735|  7.36k|#define SSL_SESS_CACHE_SERVER 0x0002
  ------------------
 4270|  7.36k|    ret->session_cache_size = SSL_SESSION_CACHE_MAX_SIZE_DEFAULT;
  ------------------
  |  |  716|  7.36k|#define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT (1024 * 20)
  ------------------
 4271|       |    /* We take the system default. */
 4272|  7.36k|    ret->session_timeout = meth->get_timeout();
 4273|  7.36k|    ret->max_cert_list = SSL_MAX_CERT_LIST_DEFAULT;
  ------------------
  |  |  714|  7.36k|#define SSL_MAX_CERT_LIST_DEFAULT (1024 * 100)
  ------------------
 4274|  7.36k|    ret->verify_mode = SSL_VERIFY_NONE;
  ------------------
  |  | 1200|  7.36k|#define SSL_VERIFY_NONE 0x00
  ------------------
 4275|       |
 4276|  7.36k|    ret->sessions = lh_SSL_SESSION_new(ssl_session_hash, ssl_session_cmp);
 4277|  7.36k|    if (ret->sessions == NULL) {
  ------------------
  |  Branch (4277:9): [True: 0, False: 7.36k]
  ------------------
 4278|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4279|      0|        goto err;
 4280|      0|    }
 4281|  7.36k|    ret->cert_store = X509_STORE_new();
 4282|  7.36k|    if (ret->cert_store == NULL) {
  ------------------
  |  Branch (4282:9): [True: 0, False: 7.36k]
  ------------------
 4283|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4284|      0|        goto err;
 4285|      0|    }
 4286|  7.36k|#ifndef OPENSSL_NO_CT
 4287|  7.36k|    ret->ctlog_store = CTLOG_STORE_new_ex(libctx, propq);
 4288|  7.36k|    if (ret->ctlog_store == NULL) {
  ------------------
  |  Branch (4288:9): [True: 0, False: 7.36k]
  ------------------
 4289|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CT_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4290|      0|        goto err;
 4291|      0|    }
 4292|  7.36k|#endif
 4293|       |
 4294|       |    /* initialize cipher/digest methods table */
 4295|  7.36k|    if (!ssl_load_ciphers(ret)) {
  ------------------
  |  Branch (4295:9): [True: 0, False: 7.36k]
  ------------------
 4296|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4297|      0|        goto err;
 4298|      0|    }
 4299|       |
 4300|  7.36k|    if (!ssl_load_groups(ret)) {
  ------------------
  |  Branch (4300:9): [True: 0, False: 7.36k]
  ------------------
 4301|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4302|      0|        goto err;
 4303|      0|    }
 4304|       |
 4305|       |    /* load provider sigalgs */
 4306|  7.36k|    if (!ssl_load_sigalgs(ret)) {
  ------------------
  |  Branch (4306:9): [True: 0, False: 7.36k]
  ------------------
 4307|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4308|      0|        goto err;
 4309|      0|    }
 4310|       |
 4311|       |    /* initialise sig algs */
 4312|  7.36k|    if (!ssl_setup_sigalgs(ret)) {
  ------------------
  |  Branch (4312:9): [True: 0, False: 7.36k]
  ------------------
 4313|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4314|      0|        goto err;
 4315|      0|    }
 4316|       |
 4317|  7.36k|    if (!SSL_CTX_set_ciphersuites(ret, OSSL_default_ciphersuites())) {
  ------------------
  |  Branch (4317:9): [True: 0, False: 7.36k]
  ------------------
 4318|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4319|      0|        goto err;
 4320|      0|    }
 4321|       |
 4322|  7.36k|    if ((ret->cert = ssl_cert_new(SSL_PKEY_NUM + ret->sigalg_list_len)) == NULL) {
  ------------------
  |  |  336|  7.36k|#define SSL_PKEY_NUM 9
  ------------------
  |  Branch (4322:9): [True: 0, False: 7.36k]
  ------------------
 4323|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4324|      0|        goto err;
 4325|      0|    }
 4326|       |
 4327|  7.36k|    if (!ssl_create_cipher_list(ret,
  ------------------
  |  Branch (4327:9): [True: 0, False: 7.36k]
  ------------------
 4328|  7.36k|            ret->tls13_ciphersuites,
 4329|  7.36k|            &ret->cipher_list, &ret->cipher_list_by_id,
 4330|  7.36k|            OSSL_default_cipher_list(), ret->cert)
 4331|  7.36k|        || sk_SSL_CIPHER_num(ret->cipher_list) <= 0) {
  ------------------
  |  | 1028|  7.36k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (4331:12): [True: 0, False: 7.36k]
  ------------------
 4332|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_LIBRARY_HAS_NO_CIPHERS);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4333|      0|        goto err;
 4334|      0|    }
 4335|       |
 4336|  7.36k|    ret->param = X509_VERIFY_PARAM_new();
 4337|  7.36k|    if (ret->param == NULL) {
  ------------------
  |  Branch (4337:9): [True: 0, False: 7.36k]
  ------------------
 4338|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4339|      0|        goto err;
 4340|      0|    }
 4341|       |
 4342|       |    /*
 4343|       |     * If these aren't available from the provider we'll get NULL returns.
 4344|       |     * That's fine but will cause errors later if SSLv3 is negotiated
 4345|       |     */
 4346|  7.36k|    ERR_set_mark();
 4347|  7.36k|    ret->md5 = EVP_MD_fetch(libctx, "MD5", propq);
 4348|  7.36k|    ret->sha1 = EVP_MD_fetch(libctx, "SHA1", propq);
 4349|  7.36k|    ERR_pop_to_mark();
 4350|       |
 4351|  7.36k|    if ((ret->ca_names = sk_X509_NAME_new_null()) == NULL) {
  ------------------
  |  |   59|  7.36k|#define sk_X509_NAME_new_null() ((STACK_OF(X509_NAME) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_X509_NAME_freefunc_thunk))
  ------------------
  |  Branch (4351:9): [True: 0, False: 7.36k]
  ------------------
 4352|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4353|      0|        goto err;
 4354|      0|    }
 4355|       |
 4356|  7.36k|    if ((ret->client_ca_names = sk_X509_NAME_new_null()) == NULL) {
  ------------------
  |  |   59|  7.36k|#define sk_X509_NAME_new_null() ((STACK_OF(X509_NAME) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_X509_NAME_freefunc_thunk))
  ------------------
  |  Branch (4356:9): [True: 0, False: 7.36k]
  ------------------
 4357|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4358|      0|        goto err;
 4359|      0|    }
 4360|       |
 4361|  7.36k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_CTX, ret, &ret->ex_data)) {
  ------------------
  |  |  252|  7.36k|#define CRYPTO_EX_INDEX_SSL_CTX 1
  ------------------
  |  Branch (4361:9): [True: 0, False: 7.36k]
  ------------------
 4362|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4363|      0|        goto err;
 4364|      0|    }
 4365|       |
 4366|  7.36k|    if ((ret->ext.secure = OPENSSL_secure_zalloc(sizeof(*ret->ext.secure))) == NULL)
  ------------------
  |  |  142|  7.36k|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (4366:9): [True: 0, False: 7.36k]
  ------------------
 4367|      0|        goto err;
 4368|       |
 4369|       |    /* No compression for DTLS */
 4370|  7.36k|    if (!(meth->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS))
  ------------------
  |  | 2196|  7.36k|#define SSL_ENC_FLAG_DTLS 0x8
  ------------------
  |  Branch (4370:9): [True: 7.36k, False: 0]
  ------------------
 4371|  7.36k|        ret->comp_methods = SSL_COMP_get_compression_methods();
 4372|       |
 4373|  7.36k|    ret->max_send_fragment = SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|  7.36k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 4374|  7.36k|    ret->split_send_fragment = SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|  7.36k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 4375|       |
 4376|       |    /* Setup RFC5077 ticket keys */
 4377|  7.36k|    if ((RAND_bytes_ex(libctx, ret->ext.tick_key_name,
  ------------------
  |  Branch (4377:9): [True: 0, False: 7.36k]
  ------------------
 4378|  7.36k|             sizeof(ret->ext.tick_key_name), 0)
 4379|  7.36k|            <= 0)
 4380|  7.36k|        || (RAND_priv_bytes_ex(libctx, ret->ext.secure->tick_hmac_key,
  ------------------
  |  Branch (4380:12): [True: 0, False: 7.36k]
  ------------------
 4381|  7.36k|                sizeof(ret->ext.secure->tick_hmac_key), 0)
 4382|  7.36k|            <= 0)
 4383|  7.36k|        || (RAND_priv_bytes_ex(libctx, ret->ext.secure->tick_aes_key,
  ------------------
  |  Branch (4383:12): [True: 0, False: 7.36k]
  ------------------
 4384|  7.36k|                sizeof(ret->ext.secure->tick_aes_key), 0)
 4385|  7.36k|            <= 0))
 4386|      0|        ret->options |= SSL_OP_NO_TICKET;
  ------------------
  |  |  384|      0|#define SSL_OP_NO_TICKET SSL_OP_BIT(14)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
 4387|       |
 4388|  7.36k|    if (RAND_priv_bytes_ex(libctx, ret->ext.cookie_hmac_key,
  ------------------
  |  Branch (4388:9): [True: 0, False: 7.36k]
  ------------------
 4389|  7.36k|            sizeof(ret->ext.cookie_hmac_key), 0)
 4390|  7.36k|        <= 0) {
 4391|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_RAND_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4392|      0|        goto err;
 4393|      0|    }
 4394|       |
 4395|  7.36k|#ifndef OPENSSL_NO_SRP
 4396|  7.36k|    if (!ssl_ctx_srp_ctx_init_intern(ret)) {
  ------------------
  |  Branch (4396:9): [True: 0, False: 7.36k]
  ------------------
 4397|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4398|      0|        goto err;
 4399|      0|    }
 4400|  7.36k|#endif
 4401|       |
 4402|       |#ifndef OPENSSL_NO_COMP_ALG
 4403|       |    /*
 4404|       |     * Set the default order: brotli, zlib, zstd
 4405|       |     * Including only those enabled algorithms
 4406|       |     */
 4407|       |    memset(ret->cert_comp_prefs, 0, sizeof(ret->cert_comp_prefs));
 4408|       |    i = 0;
 4409|       |    if (ossl_comp_has_alg(TLSEXT_comp_cert_brotli))
 4410|       |        ret->cert_comp_prefs[i++] = TLSEXT_comp_cert_brotli;
 4411|       |    if (ossl_comp_has_alg(TLSEXT_comp_cert_zlib))
 4412|       |        ret->cert_comp_prefs[i++] = TLSEXT_comp_cert_zlib;
 4413|       |    if (ossl_comp_has_alg(TLSEXT_comp_cert_zstd))
 4414|       |        ret->cert_comp_prefs[i++] = TLSEXT_comp_cert_zstd;
 4415|       |#endif
 4416|       |    /*
 4417|       |     * Disable compression by default to prevent CRIME. Applications can
 4418|       |     * re-enable compression by configuring
 4419|       |     * SSL_CTX_clear_options(ctx, SSL_OP_NO_COMPRESSION);
 4420|       |     * or by using the SSL_CONF library. Similarly we also enable TLSv1.3
 4421|       |     * middlebox compatibility by default. This may be disabled by default in
 4422|       |     * a later OpenSSL version.
 4423|       |     */
 4424|  7.36k|    ret->options |= SSL_OP_NO_COMPRESSION | SSL_OP_ENABLE_MIDDLEBOX_COMPAT;
  ------------------
  |  |  395|  7.36k|#define SSL_OP_NO_COMPRESSION SSL_OP_BIT(17)
  |  |  ------------------
  |  |  |  |  351|  7.36k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
                  ret->options |= SSL_OP_NO_COMPRESSION | SSL_OP_ENABLE_MIDDLEBOX_COMPAT;
  ------------------
  |  |  404|  7.36k|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|  7.36k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
 4425|       |
 4426|  7.36k|    ret->ext.status_type = TLSEXT_STATUSTYPE_nothing;
  ------------------
  |  | 2213|  7.36k|#define TLSEXT_STATUSTYPE_nothing -1
  ------------------
 4427|       |
 4428|       |    /*
 4429|       |     * We cannot usefully set a default max_early_data here (which gets
 4430|       |     * propagated in SSL_new(), for the following reason: setting the
 4431|       |     * SSL field causes tls_construct_stoc_early_data() to tell the
 4432|       |     * client that early data will be accepted when constructing a TLS 1.3
 4433|       |     * session ticket, and the client will accordingly send us early data
 4434|       |     * when using that ticket (if the client has early data to send).
 4435|       |     * However, in order for the early data to actually be consumed by
 4436|       |     * the application, the application must also have calls to
 4437|       |     * SSL_read_early_data(); otherwise we'll just skip past the early data
 4438|       |     * and ignore it.  So, since the application must add calls to
 4439|       |     * SSL_read_early_data(), we also require them to add
 4440|       |     * calls to SSL_CTX_set_max_early_data() in order to use early data,
 4441|       |     * eliminating the bandwidth-wasting early data in the case described
 4442|       |     * above.
 4443|       |     */
 4444|  7.36k|    ret->max_early_data = 0;
 4445|       |
 4446|       |    /*
 4447|       |     * Default recv_max_early_data is a fully loaded single record. Could be
 4448|       |     * split across multiple records in practice. We set this differently to
 4449|       |     * max_early_data so that, in the default case, we do not advertise any
 4450|       |     * support for early_data, but if a client were to send us some (e.g.
 4451|       |     * because of an old, stale ticket) then we will tolerate it and skip over
 4452|       |     * it.
 4453|       |     */
 4454|  7.36k|    ret->recv_max_early_data = SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|  7.36k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 4455|       |
 4456|       |    /* By default we send two session tickets automatically in TLSv1.3 */
 4457|  7.36k|    ret->num_tickets = 2;
 4458|       |
 4459|  7.36k|#ifndef OPENSSL_NO_QUIC
 4460|       |    /* only create a cache for client CTX-es */
 4461|  7.36k|    if (meth == OSSL_QUIC_client_method())
  ------------------
  |  Branch (4461:9): [True: 0, False: 7.36k]
  ------------------
 4462|      0|        if ((ret->tokencache = ossl_quic_new_token_store()) == NULL)
  ------------------
  |  Branch (4462:13): [True: 0, False: 0]
  ------------------
 4463|      0|            goto err;
 4464|  7.36k|    ret->domain_flags = 0;
 4465|  7.36k|    if (IS_QUIC_METHOD(meth)) {
  ------------------
  |  |   52|  7.36k|    ((m) == OSSL_QUIC_client_method() || (m) == OSSL_QUIC_client_thread_method() || (m) == OSSL_QUIC_server_method() || (m) == OSSL_QUIC_method())
  |  |  ------------------
  |  |  |  Branch (52:6): [True: 0, False: 7.36k]
  |  |  |  Branch (52:42): [True: 0, False: 7.36k]
  |  |  |  Branch (52:85): [True: 0, False: 7.36k]
  |  |  |  Branch (52:121): [True: 0, False: 7.36k]
  |  |  ------------------
  ------------------
 4466|      0|#if defined(OPENSSL_THREADS)
 4467|      0|        if (meth == OSSL_QUIC_client_thread_method())
  ------------------
  |  Branch (4467:13): [True: 0, False: 0]
  ------------------
 4468|      0|            ret->domain_flags
 4469|      0|                = SSL_DOMAIN_FLAG_MULTI_THREAD
  ------------------
  |  | 2375|      0|#define SSL_DOMAIN_FLAG_MULTI_THREAD (1U << 1)
  ------------------
 4470|      0|                | SSL_DOMAIN_FLAG_THREAD_ASSISTED
  ------------------
  |  | 2376|      0|#define SSL_DOMAIN_FLAG_THREAD_ASSISTED (1U << 2)
  ------------------
 4471|      0|                | SSL_DOMAIN_FLAG_BLOCKING;
  ------------------
  |  | 2377|      0|#define SSL_DOMAIN_FLAG_BLOCKING (1U << 3)
  ------------------
 4472|      0|        else
 4473|      0|            ret->domain_flags
 4474|      0|                = SSL_DOMAIN_FLAG_MULTI_THREAD
  ------------------
  |  | 2375|      0|#define SSL_DOMAIN_FLAG_MULTI_THREAD (1U << 1)
  ------------------
 4475|      0|                | SSL_DOMAIN_FLAG_LEGACY_BLOCKING;
  ------------------
  |  | 2378|      0|#define SSL_DOMAIN_FLAG_LEGACY_BLOCKING (1U << 4)
  ------------------
 4476|       |#else
 4477|       |        ret->domain_flags
 4478|       |            = SSL_DOMAIN_FLAG_SINGLE_THREAD
 4479|       |            | SSL_DOMAIN_FLAG_LEGACY_BLOCKING;
 4480|       |#endif
 4481|      0|    }
 4482|  7.36k|#endif
 4483|       |
 4484|  7.36k|    if (!ssl_ctx_system_config(ret)) {
  ------------------
  |  Branch (4484:9): [True: 0, False: 7.36k]
  ------------------
 4485|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_ERROR_IN_SYSTEM_DEFAULT_CONFIG);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4486|      0|        goto err;
 4487|      0|    }
 4488|       |
 4489|       |#ifndef OPENSSL_NO_SSLKEYLOG
 4490|       |    if (keylogfile != NULL && strlen(keylogfile) != 0) {
 4491|       |        /* Make sure we have a global lock allocated */
 4492|       |        if (!RUN_ONCE(&ssl_keylog_once, ssl_keylog_init)) {
 4493|       |            /* use a trace message as a warning */
 4494|       |            OSSL_TRACE(TLS, "Unable to initialize keylog data\n");
 4495|       |            goto out;
 4496|       |        }
 4497|       |
 4498|       |        /* Grab our global lock */
 4499|       |        if (!CRYPTO_THREAD_write_lock(keylog_lock)) {
 4500|       |            OSSL_TRACE(TLS, "Unable to acquire keylog write lock\n");
 4501|       |            goto out;
 4502|       |        } else {
 4503|       |            /*
 4504|       |             * If the bio for the requested keylog file hasn't been
 4505|       |             * created yet, go ahead and create it, and set it to append
 4506|       |             * if its already there.
 4507|       |             */
 4508|       |            if (keylog_bio == NULL) {
 4509|       |                keylog_bio = get_sslkeylog_bio(keylogfile);
 4510|       |                if (keylog_bio == NULL) {
 4511|       |                    OSSL_TRACE(TLS, "Unable to create keylog bio\n");
 4512|       |                    goto out;
 4513|       |                }
 4514|       |                BIO_set_callback_ex(keylog_bio, check_keylog_bio_free);
 4515|       |            } else {
 4516|       |                /* up our refcount for the already-created case */
 4517|       |                BIO_up_ref(keylog_bio);
 4518|       |            }
 4519|       |            /* If we have a bio now, assign the callback handler */
 4520|       |            if (keylog_bio != NULL)
 4521|       |                ret->do_sslkeylog = 1;
 4522|       |            /* unlock, and we're done */
 4523|       |            CRYPTO_THREAD_unlock(keylog_lock);
 4524|       |        }
 4525|       |    }
 4526|       |out:
 4527|       |#endif
 4528|  7.36k|    return ret;
 4529|      0|err:
 4530|      0|    SSL_CTX_free(ret);
 4531|       |#ifndef OPENSSL_NO_SSLKEYLOG
 4532|       |    BIO_free(keylog_bio);
 4533|       |#endif
 4534|       |    return NULL;
 4535|  7.36k|}
SSL_CTX_new:
 4538|  7.36k|{
 4539|  7.36k|    return SSL_CTX_new_ex(NULL, NULL, meth);
 4540|  7.36k|}
SSL_CTX_up_ref:
 4543|  14.5k|{
 4544|  14.5k|    int i;
 4545|       |
 4546|  14.5k|    if (CRYPTO_UP_REF(&ctx->references, &i) <= 0)
  ------------------
  |  Branch (4546:9): [True: 0, False: 14.5k]
  ------------------
 4547|      0|        return 0;
 4548|       |
 4549|  14.5k|    REF_PRINT_COUNT("SSL_CTX", i, ctx);
  ------------------
  |  |  301|  14.5k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  14.5k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  14.5k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  14.5k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4550|  14.5k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|  14.5k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 14.5k]
  |  |  ------------------
  ------------------
 4551|  14.5k|    return ((i > 1) ? 1 : 0);
  ------------------
  |  Branch (4551:13): [True: 14.5k, False: 0]
  ------------------
 4552|  14.5k|}
SSL_CTX_free:
 4555|  21.8k|{
 4556|  21.8k|    int i;
 4557|  21.8k|    size_t j;
 4558|       |
 4559|  21.8k|    if (a == NULL)
  ------------------
  |  Branch (4559:9): [True: 0, False: 21.8k]
  ------------------
 4560|      0|        return;
 4561|       |
 4562|  21.8k|    CRYPTO_DOWN_REF(&a->references, &i);
 4563|  21.8k|    REF_PRINT_COUNT("SSL_CTX", i, a);
  ------------------
  |  |  301|  21.8k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  21.8k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  21.8k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  21.8k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4564|  21.8k|    if (i > 0)
  ------------------
  |  Branch (4564:9): [True: 14.5k, False: 7.36k]
  ------------------
 4565|  14.5k|        return;
 4566|  7.36k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  7.36k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 7.36k]
  |  |  ------------------
  ------------------
 4567|       |
 4568|       |#ifndef OPENSSL_NO_SSLKEYLOG
 4569|       |    if (keylog_lock != NULL && CRYPTO_THREAD_write_lock(keylog_lock)) {
 4570|       |        if (a->do_sslkeylog == 1)
 4571|       |            BIO_free(keylog_bio);
 4572|       |        a->do_sslkeylog = 0;
 4573|       |        CRYPTO_THREAD_unlock(keylog_lock);
 4574|       |    }
 4575|       |#endif
 4576|       |
 4577|  7.36k|    X509_VERIFY_PARAM_free(a->param);
 4578|  7.36k|    dane_ctx_final(&a->dane);
 4579|       |
 4580|       |    /*
 4581|       |     * Free internal session cache. However: the remove_cb() may reference
 4582|       |     * the ex_data of SSL_CTX, thus the ex_data store can only be removed
 4583|       |     * after the sessions were flushed.
 4584|       |     * As the ex_data handling routines might also touch the session cache,
 4585|       |     * the most secure solution seems to be: empty (flush) the cache, then
 4586|       |     * free ex_data, then finally free the cache.
 4587|       |     * (See ticket [openssl.org #212].)
 4588|       |     */
 4589|  7.36k|    if (a->sessions != NULL)
  ------------------
  |  Branch (4589:9): [True: 7.36k, False: 0]
  ------------------
 4590|  7.36k|        SSL_CTX_flush_sessions_ex(a, 0);
 4591|       |
 4592|  7.36k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_CTX, a, &a->ex_data);
  ------------------
  |  |  252|  7.36k|#define CRYPTO_EX_INDEX_SSL_CTX 1
  ------------------
 4593|  7.36k|    lh_SSL_SESSION_free(a->sessions);
 4594|  7.36k|    X509_STORE_free(a->cert_store);
 4595|  7.36k|#ifndef OPENSSL_NO_CT
 4596|  7.36k|    CTLOG_STORE_free(a->ctlog_store);
 4597|  7.36k|#endif
 4598|  7.36k|    sk_SSL_CIPHER_free(a->cipher_list);
  ------------------
  |  | 1034|  7.36k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 4599|  7.36k|    sk_SSL_CIPHER_free(a->cipher_list_by_id);
  ------------------
  |  | 1034|  7.36k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 4600|  7.36k|    sk_SSL_CIPHER_free(a->tls13_ciphersuites);
  ------------------
  |  | 1034|  7.36k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 4601|  7.36k|    ssl_cert_free(a->cert);
 4602|  7.36k|    sk_X509_NAME_pop_free(a->ca_names, X509_NAME_free);
  ------------------
  |  |   70|  7.36k|#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))
  ------------------
 4603|  7.36k|    sk_X509_NAME_pop_free(a->client_ca_names, X509_NAME_free);
  ------------------
  |  |   70|  7.36k|#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))
  ------------------
 4604|  7.36k|    OSSL_STACK_OF_X509_free(a->extra_certs);
 4605|  7.36k|    a->comp_methods = NULL;
 4606|  7.36k|#ifndef OPENSSL_NO_SRTP
 4607|  7.36k|    sk_SRTP_PROTECTION_PROFILE_free(a->srtp_profiles);
  ------------------
  |  |  257|  7.36k|#define sk_SRTP_PROTECTION_PROFILE_free(sk) OPENSSL_sk_free(ossl_check_SRTP_PROTECTION_PROFILE_sk_type(sk))
  ------------------
 4608|  7.36k|#endif
 4609|  7.36k|#ifndef OPENSSL_NO_SRP
 4610|  7.36k|    ssl_ctx_srp_ctx_free_intern(a);
 4611|  7.36k|#endif
 4612|       |
 4613|  7.36k|    OPENSSL_free(a->ext.ecpointformats);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4614|  7.36k|    OPENSSL_free(a->ext.supportedgroups);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4615|  7.36k|    OPENSSL_free(a->ext.keyshares);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4616|  7.36k|    OPENSSL_free(a->ext.tuples);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4617|  7.36k|    OPENSSL_free(a->ext.alpn);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4618|  7.36k|    OPENSSL_secure_clear_free(a->ext.secure, sizeof(*a->ext.secure));
  ------------------
  |  |  150|  7.36k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4619|       |
 4620|  7.36k|    ssl_evp_md_free(a->md5);
 4621|  7.36k|    ssl_evp_md_free(a->sha1);
 4622|       |
 4623|   198k|    for (j = 0; j < SSL_ENC_NUM_IDX; j++)
  ------------------
  |  |  364|   198k|#define SSL_ENC_NUM_IDX 26
  ------------------
  |  Branch (4623:17): [True: 191k, False: 7.36k]
  ------------------
 4624|   191k|        ssl_evp_cipher_free(a->ssl_cipher_methods[j]);
 4625|   117k|    for (j = 0; j < SSL_MD_NUM_IDX; j++)
  ------------------
  |  |  210|   117k|#define SSL_MD_NUM_IDX SSL_MAX_DIGEST
  |  |  ------------------
  |  |  |  |  208|   117k|#define SSL_MAX_DIGEST 15
  |  |  ------------------
  ------------------
  |  Branch (4625:17): [True: 110k, False: 7.36k]
  ------------------
 4626|   110k|        ssl_evp_md_free(a->ssl_digest_methods[j]);
 4627|   206k|    for (j = 0; j < a->group_list_len; j++) {
  ------------------
  |  Branch (4627:17): [True: 198k, False: 7.36k]
  ------------------
 4628|   198k|        OPENSSL_free(a->group_list[j].tlsname);
  ------------------
  |  |  132|   198k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4629|   198k|        OPENSSL_free(a->group_list[j].realname);
  ------------------
  |  |  132|   198k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4630|   198k|        OPENSSL_free(a->group_list[j].algorithm);
  ------------------
  |  |  132|   198k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4631|   198k|    }
 4632|  7.36k|    OPENSSL_free(a->group_list);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4633|  36.8k|    for (j = 0; j < a->sigalg_list_len; j++) {
  ------------------
  |  Branch (4633:17): [True: 29.4k, False: 7.36k]
  ------------------
 4634|  29.4k|        OPENSSL_free(a->sigalg_list[j].name);
  ------------------
  |  |  132|  29.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4635|  29.4k|        OPENSSL_free(a->sigalg_list[j].sigalg_name);
  ------------------
  |  |  132|  29.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4636|  29.4k|        OPENSSL_free(a->sigalg_list[j].sigalg_oid);
  ------------------
  |  |  132|  29.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4637|  29.4k|        OPENSSL_free(a->sigalg_list[j].sig_name);
  ------------------
  |  |  132|  29.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4638|  29.4k|        OPENSSL_free(a->sigalg_list[j].sig_oid);
  ------------------
  |  |  132|  29.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4639|  29.4k|        OPENSSL_free(a->sigalg_list[j].hash_name);
  ------------------
  |  |  132|  29.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4640|  29.4k|        OPENSSL_free(a->sigalg_list[j].hash_oid);
  ------------------
  |  |  132|  29.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4641|  29.4k|        OPENSSL_free(a->sigalg_list[j].keytype);
  ------------------
  |  |  132|  29.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4642|  29.4k|        OPENSSL_free(a->sigalg_list[j].keytype_oid);
  ------------------
  |  |  132|  29.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4643|  29.4k|    }
 4644|  7.36k|    OPENSSL_free(a->sigalg_list);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4645|  7.36k|    OPENSSL_free(a->ssl_cert_info);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4646|       |
 4647|  7.36k|    OPENSSL_free(a->sigalg_lookup_cache);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4648|  7.36k|    OPENSSL_free(a->tls12_sigalgs);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4649|       |
 4650|  7.36k|    OPENSSL_free(a->client_cert_type);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4651|  7.36k|    OPENSSL_free(a->server_cert_type);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4652|       |
 4653|  7.36k|    CRYPTO_THREAD_lock_free(a->lock);
 4654|  7.36k|    CRYPTO_FREE_REF(&a->references);
 4655|       |#ifdef TSAN_REQUIRES_LOCKING
 4656|       |    CRYPTO_THREAD_lock_free(a->tsan_lock);
 4657|       |#endif
 4658|       |
 4659|  7.36k|    OPENSSL_free(a->propq);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4660|  7.36k|#ifndef OPENSSL_NO_QLOG
 4661|  7.36k|    OPENSSL_free(a->qlog_title);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4662|  7.36k|#endif
 4663|       |
 4664|  7.36k|#ifndef OPENSSL_NO_QUIC
 4665|  7.36k|    ossl_quic_free_token_store(a->tokencache);
 4666|  7.36k|#endif
 4667|       |
 4668|  7.36k|#ifndef OPENSSL_NO_ECH
 4669|  7.36k|    ossl_ech_ctx_clear(&a->ext.ech);
 4670|  7.36k|#endif
 4671|       |
 4672|  7.36k|    OPENSSL_free(a);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4673|  7.36k|}
SSL_CTX_set_verify:
 4745|  3.62k|{
 4746|  3.62k|    ctx->verify_mode = mode;
 4747|  3.62k|    ctx->default_verify_callback = cb;
 4748|  3.62k|}
ssl_update_cache:
 4921|  14.3k|{
 4922|  14.3k|    int i;
 4923|       |
 4924|       |    /*
 4925|       |     * If the session_id_length is 0, we are not supposed to cache it, and it
 4926|       |     * would be rather hard to do anyway :-). Also if the session has already
 4927|       |     * been marked as not_resumable we should not cache it for later reuse.
 4928|       |     */
 4929|  14.3k|    if (s->session->session_id_length == 0 || s->session->not_resumable)
  ------------------
  |  Branch (4929:9): [True: 0, False: 14.3k]
  |  Branch (4929:47): [True: 0, False: 14.3k]
  ------------------
 4930|      0|        return;
 4931|       |
 4932|       |    /*
 4933|       |     * If sid_ctx_length is 0 there is no specific application context
 4934|       |     * associated with this session, so when we try to resume it and
 4935|       |     * SSL_VERIFY_PEER is requested to verify the client identity, we have no
 4936|       |     * indication that this is actually a session for the proper application
 4937|       |     * context, and the *handshake* will fail, not just the resumption attempt.
 4938|       |     * Do not cache (on the server) these sessions that are not resumable
 4939|       |     * (clients can set SSL_VERIFY_PEER without needing a sid_ctx set).
 4940|       |     */
 4941|  14.3k|    if (s->server && s->session->sid_ctx_length == 0
  ------------------
  |  Branch (4941:9): [True: 7.16k, False: 7.16k]
  |  Branch (4941:22): [True: 0, False: 7.16k]
  ------------------
 4942|      0|        && (s->verify_mode & SSL_VERIFY_PEER) != 0)
  ------------------
  |  | 1201|      0|#define SSL_VERIFY_PEER 0x01
  ------------------
  |  Branch (4942:12): [True: 0, False: 0]
  ------------------
 4943|      0|        return;
 4944|       |
 4945|  14.3k|    i = s->session_ctx->session_cache_mode;
 4946|  14.3k|    if ((i & mode) != 0
  ------------------
  |  Branch (4946:9): [True: 14.3k, False: 0]
  ------------------
 4947|  14.3k|        && (!s->hit || SSL_CONNECTION_IS_TLS13(s))) {
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      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 (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      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 (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (4947:13): [True: 14.3k, False: 0]
  ------------------
 4948|       |        /*
 4949|       |         * Add the session to the internal cache. In server side TLSv1.3 we
 4950|       |         * normally don't do this because by default it's a full stateless ticket
 4951|       |         * with only a dummy session id so there is no reason to cache it,
 4952|       |         * unless:
 4953|       |         * - we are doing early_data, in which case we cache so that we can
 4954|       |         *   detect replays
 4955|       |         * - the application has set a remove_session_cb so needs to know about
 4956|       |         *   session timeout events
 4957|       |         * - SSL_OP_NO_TICKET is set in which case it is a stateful ticket
 4958|       |         */
 4959|  14.3k|        if ((i & SSL_SESS_CACHE_NO_INTERNAL_STORE) == 0
  ------------------
  |  |  740|  14.3k|#define SSL_SESS_CACHE_NO_INTERNAL_STORE 0x0200
  ------------------
  |  Branch (4959:13): [True: 7.16k, False: 7.16k]
  ------------------
 4960|  7.16k|            && (!SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|  14.3k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.3k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.16k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  274|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.3k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  275|  14.3k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.16k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.16k, False: 0]
  |  |  ------------------
  ------------------
 4961|  7.16k|                || !s->server
  ------------------
  |  Branch (4961:20): [True: 0, False: 7.16k]
  ------------------
 4962|  7.16k|                || (s->max_early_data > 0
  ------------------
  |  Branch (4962:21): [True: 0, False: 7.16k]
  ------------------
 4963|      0|                    && (s->options & SSL_OP_NO_ANTI_REPLAY) == 0)
  ------------------
  |  |  428|      0|#define SSL_OP_NO_ANTI_REPLAY SSL_OP_BIT(24)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (4963:24): [True: 0, False: 0]
  ------------------
 4964|  7.16k|                || s->session_ctx->remove_session_cb != NULL
  ------------------
  |  Branch (4964:20): [True: 0, False: 7.16k]
  ------------------
 4965|  7.16k|                || (s->options & SSL_OP_NO_TICKET) != 0))
  ------------------
  |  |  384|  7.16k|#define SSL_OP_NO_TICKET SSL_OP_BIT(14)
  |  |  ------------------
  |  |  |  |  351|  7.16k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (4965:20): [True: 0, False: 7.16k]
  ------------------
 4966|      0|            SSL_CTX_add_session(s->session_ctx, s->session);
 4967|       |
 4968|       |        /*
 4969|       |         * Add the session to the external cache. We do this even in server side
 4970|       |         * TLSv1.3 without early data because some applications just want to
 4971|       |         * know about the creation of a session and aren't doing a full cache.
 4972|       |         */
 4973|  14.3k|        if (s->session_ctx->new_session_cb != NULL && SSL_SESSION_up_ref(s->session)) {
  ------------------
  |  Branch (4973:13): [True: 7.16k, False: 7.16k]
  |  Branch (4973:55): [True: 7.16k, False: 0]
  ------------------
 4974|  7.16k|            if (!s->session_ctx->new_session_cb(SSL_CONNECTION_GET_USER_SSL(s),
  ------------------
  |  |   28|  7.16k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  |  Branch (4974:17): [True: 7.16k, False: 0]
  ------------------
 4975|  7.16k|                    s->session))
 4976|  7.16k|                SSL_SESSION_free(s->session);
 4977|  7.16k|        }
 4978|  14.3k|    }
 4979|       |
 4980|       |    /* auto flush every 255 connections */
 4981|  14.3k|    if ((!(i & SSL_SESS_CACHE_NO_AUTO_CLEAR)) && ((i & mode) == mode)) {
  ------------------
  |  |  737|  14.3k|#define SSL_SESS_CACHE_NO_AUTO_CLEAR 0x0080
  ------------------
  |  Branch (4981:9): [True: 14.3k, False: 0]
  |  Branch (4981:50): [True: 14.3k, False: 0]
  ------------------
 4982|  14.3k|        TSAN_QUALIFIER int *stat;
  ------------------
  |  |   60|  14.3k|#define TSAN_QUALIFIER _Atomic
  ------------------
 4983|       |
 4984|  14.3k|        if (mode & SSL_SESS_CACHE_CLIENT)
  ------------------
  |  |  734|  14.3k|#define SSL_SESS_CACHE_CLIENT 0x0001
  ------------------
  |  Branch (4984:13): [True: 7.16k, False: 7.16k]
  ------------------
 4985|  7.16k|            stat = &s->session_ctx->stats.sess_connect_good;
 4986|  7.16k|        else
 4987|  7.16k|            stat = &s->session_ctx->stats.sess_accept_good;
 4988|  14.3k|        if ((ssl_tsan_load(s->session_ctx, stat) & 0xff) == 0xff)
  ------------------
  |  Branch (4988:13): [True: 0, False: 14.3k]
  ------------------
 4989|      0|            SSL_CTX_flush_sessions_ex(s->session_ctx, time(NULL));
 4990|  14.3k|    }
 4991|  14.3k|}
SSL_get_error:
 5035|  24.8k|{
 5036|  24.8k|    return ossl_ssl_get_error(s, i, /*check_err=*/1);
 5037|  24.8k|}
ossl_ssl_get_error:
 5040|  24.8k|{
 5041|  24.8k|    int reason;
 5042|  24.8k|    BIO *bio;
 5043|  24.8k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  24.8k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  24.8k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 24.8k]
  |  |  |  |  ------------------
  |  |  |  |   33|  24.8k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  24.8k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 24.8k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  24.8k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  24.8k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 5044|       |
 5045|  24.8k|    if (i > 0)
  ------------------
  |  Branch (5045:9): [True: 0, False: 24.8k]
  ------------------
 5046|      0|        return SSL_ERROR_NONE;
  ------------------
  |  | 1284|      0|#define SSL_ERROR_NONE 0
  ------------------
 5047|       |
 5048|  24.8k|#ifndef OPENSSL_NO_QUIC
 5049|  24.8k|    if (IS_QUIC(s)) {
  ------------------
  |  |   96|  24.8k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  24.8k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 24.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 24.8k, False: 0]
  |  |  ------------------
  ------------------
 5050|      0|        reason = ossl_quic_get_error(s, i);
 5051|      0|        if (reason != SSL_ERROR_NONE)
  ------------------
  |  | 1284|      0|#define SSL_ERROR_NONE 0
  ------------------
  |  Branch (5051:13): [True: 0, False: 0]
  ------------------
 5052|      0|            return reason;
 5053|      0|    }
 5054|  24.8k|#endif
 5055|       |
 5056|  24.8k|    if (sc == NULL)
  ------------------
  |  Branch (5056:9): [True: 0, False: 24.8k]
  ------------------
 5057|      0|        return SSL_ERROR_SSL;
  ------------------
  |  | 1285|      0|#define SSL_ERROR_SSL 1
  ------------------
 5058|       |
 5059|  24.8k|    if (check_err != 0) {
  ------------------
  |  Branch (5059:9): [True: 24.8k, False: 0]
  ------------------
 5060|  24.8k|        if (sc->statem.error_state == ERROR_STATE_SSL)
  ------------------
  |  Branch (5060:13): [True: 0, False: 24.8k]
  ------------------
 5061|      0|            return SSL_ERROR_SSL;
  ------------------
  |  | 1285|      0|#define SSL_ERROR_SSL 1
  ------------------
 5062|  24.8k|        if (sc->statem.error_state == ERROR_STATE_SYSCALL)
  ------------------
  |  Branch (5062:13): [True: 0, False: 24.8k]
  ------------------
 5063|      0|            return SSL_ERROR_SYSCALL;
  ------------------
  |  | 1289|      0|#define SSL_ERROR_SYSCALL 5 /* look at error stack/return \
  ------------------
 5064|  24.8k|    }
 5065|       |
 5066|  24.8k|#ifndef OPENSSL_NO_QUIC
 5067|  24.8k|    if (!IS_QUIC(s))
  ------------------
  |  |   96|  24.8k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  24.8k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 24.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 24.8k, False: 0]
  |  |  ------------------
  ------------------
 5068|  24.8k|#endif
 5069|  24.8k|    {
 5070|  24.8k|        if (SSL_want_read(s)) {
  ------------------
  |  |  966|  24.8k|#define SSL_want_read(s) (SSL_want(s) == SSL_READING)
  |  |  ------------------
  |  |  |  |  957|  24.8k|#define SSL_READING 3
  |  |  ------------------
  |  |  |  Branch (966:26): [True: 18.8k, False: 6.00k]
  |  |  ------------------
  ------------------
 5071|  18.8k|            bio = SSL_get_rbio(s);
 5072|  18.8k|            if (BIO_should_read(bio))
  ------------------
  |  |  277|  18.8k|#define BIO_should_read(a) BIO_test_flags(a, BIO_FLAGS_READ)
  |  |  ------------------
  |  |  |  |  222|  18.8k|#define BIO_FLAGS_READ 0x01
  |  |  ------------------
  |  |  |  Branch (277:28): [True: 18.8k, False: 0]
  |  |  ------------------
  ------------------
 5073|  18.8k|                return SSL_ERROR_WANT_READ;
  ------------------
  |  | 1286|  18.8k|#define SSL_ERROR_WANT_READ 2
  ------------------
 5074|      0|            else if (BIO_should_write(bio))
  ------------------
  |  |  278|      0|#define BIO_should_write(a) BIO_test_flags(a, BIO_FLAGS_WRITE)
  |  |  ------------------
  |  |  |  |  223|      0|#define BIO_FLAGS_WRITE 0x02
  |  |  ------------------
  |  |  |  Branch (278:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5075|       |                /*
 5076|       |                 * This one doesn't make too much sense ... We never try to
 5077|       |                 * write to the rbio, and an application program where rbio and
 5078|       |                 * wbio are separate couldn't even know what it should wait for.
 5079|       |                 * However if we ever set s->rwstate incorrectly (so that we
 5080|       |                 * have SSL_want_read(s) instead of SSL_want_write(s)) and rbio
 5081|       |                 * and wbio *are* the same, this test works around that bug; so
 5082|       |                 * it might be safer to keep it.
 5083|       |                 */
 5084|      0|                return SSL_ERROR_WANT_WRITE;
  ------------------
  |  | 1287|      0|#define SSL_ERROR_WANT_WRITE 3
  ------------------
 5085|      0|            else if (BIO_should_io_special(bio)) {
  ------------------
  |  |  279|      0|#define BIO_should_io_special(a) BIO_test_flags(a, BIO_FLAGS_IO_SPECIAL)
  |  |  ------------------
  |  |  |  |  224|      0|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  ------------------
  |  |  |  Branch (279:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5086|      0|                reason = BIO_get_retry_reason(bio);
 5087|      0|                if (reason == BIO_RR_CONNECT)
  ------------------
  |  |  295|      0|#define BIO_RR_CONNECT 0x02
  ------------------
  |  Branch (5087:21): [True: 0, False: 0]
  ------------------
 5088|      0|                    return SSL_ERROR_WANT_CONNECT;
  ------------------
  |  | 1292|      0|#define SSL_ERROR_WANT_CONNECT 7
  ------------------
 5089|      0|                else if (reason == BIO_RR_ACCEPT)
  ------------------
  |  |  297|      0|#define BIO_RR_ACCEPT 0x03
  ------------------
  |  Branch (5089:26): [True: 0, False: 0]
  ------------------
 5090|      0|                    return SSL_ERROR_WANT_ACCEPT;
  ------------------
  |  | 1293|      0|#define SSL_ERROR_WANT_ACCEPT 8
  ------------------
 5091|      0|                else
 5092|      0|                    return SSL_ERROR_SYSCALL; /* unknown */
  ------------------
  |  | 1289|      0|#define SSL_ERROR_SYSCALL 5 /* look at error stack/return \
  ------------------
 5093|      0|            }
 5094|  18.8k|        }
 5095|       |
 5096|  6.00k|        if (SSL_want_write(s)) {
  ------------------
  |  |  967|  6.00k|#define SSL_want_write(s) (SSL_want(s) == SSL_WRITING)
  |  |  ------------------
  |  |  |  |  956|  6.00k|#define SSL_WRITING 2
  |  |  ------------------
  |  |  |  Branch (967:27): [True: 0, False: 6.00k]
  |  |  ------------------
  ------------------
 5097|       |            /*
 5098|       |             * Access wbio directly - in order to use the buffered bio if
 5099|       |             * present
 5100|       |             */
 5101|      0|            bio = sc->wbio;
 5102|      0|            if (BIO_should_write(bio))
  ------------------
  |  |  278|      0|#define BIO_should_write(a) BIO_test_flags(a, BIO_FLAGS_WRITE)
  |  |  ------------------
  |  |  |  |  223|      0|#define BIO_FLAGS_WRITE 0x02
  |  |  ------------------
  |  |  |  Branch (278:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5103|      0|                return SSL_ERROR_WANT_WRITE;
  ------------------
  |  | 1287|      0|#define SSL_ERROR_WANT_WRITE 3
  ------------------
 5104|      0|            else if (BIO_should_read(bio))
  ------------------
  |  |  277|      0|#define BIO_should_read(a) BIO_test_flags(a, BIO_FLAGS_READ)
  |  |  ------------------
  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  ------------------
  |  |  |  Branch (277:28): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5105|       |                /*
 5106|       |                 * See above (SSL_want_read(s) with BIO_should_write(bio))
 5107|       |                 */
 5108|      0|                return SSL_ERROR_WANT_READ;
  ------------------
  |  | 1286|      0|#define SSL_ERROR_WANT_READ 2
  ------------------
 5109|      0|            else if (BIO_should_io_special(bio)) {
  ------------------
  |  |  279|      0|#define BIO_should_io_special(a) BIO_test_flags(a, BIO_FLAGS_IO_SPECIAL)
  |  |  ------------------
  |  |  |  |  224|      0|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  ------------------
  |  |  |  Branch (279:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 5110|      0|                reason = BIO_get_retry_reason(bio);
 5111|      0|                if (reason == BIO_RR_CONNECT)
  ------------------
  |  |  295|      0|#define BIO_RR_CONNECT 0x02
  ------------------
  |  Branch (5111:21): [True: 0, False: 0]
  ------------------
 5112|      0|                    return SSL_ERROR_WANT_CONNECT;
  ------------------
  |  | 1292|      0|#define SSL_ERROR_WANT_CONNECT 7
  ------------------
 5113|      0|                else if (reason == BIO_RR_ACCEPT)
  ------------------
  |  |  297|      0|#define BIO_RR_ACCEPT 0x03
  ------------------
  |  Branch (5113:26): [True: 0, False: 0]
  ------------------
 5114|      0|                    return SSL_ERROR_WANT_ACCEPT;
  ------------------
  |  | 1293|      0|#define SSL_ERROR_WANT_ACCEPT 8
  ------------------
 5115|      0|                else
 5116|      0|                    return SSL_ERROR_SYSCALL;
  ------------------
  |  | 1289|      0|#define SSL_ERROR_SYSCALL 5 /* look at error stack/return \
  ------------------
 5117|      0|            }
 5118|      0|        }
 5119|  6.00k|    }
 5120|       |
 5121|  6.00k|    if (SSL_want_x509_lookup(s))
  ------------------
  |  |  968|  6.00k|#define SSL_want_x509_lookup(s) (SSL_want(s) == SSL_X509_LOOKUP)
  |  |  ------------------
  |  |  |  |  958|  6.00k|#define SSL_X509_LOOKUP 4
  |  |  ------------------
  |  |  |  Branch (968:33): [True: 0, False: 6.00k]
  |  |  ------------------
  ------------------
 5122|      0|        return SSL_ERROR_WANT_X509_LOOKUP;
  ------------------
  |  | 1288|      0|#define SSL_ERROR_WANT_X509_LOOKUP 4
  ------------------
 5123|  6.00k|    if (SSL_want_retry_verify(s))
  ------------------
  |  |  969|  6.00k|#define SSL_want_retry_verify(s) (SSL_want(s) == SSL_RETRY_VERIFY)
  |  |  ------------------
  |  |  |  |  962|  6.00k|#define SSL_RETRY_VERIFY 8
  |  |  ------------------
  |  |  |  Branch (969:34): [True: 0, False: 6.00k]
  |  |  ------------------
  ------------------
 5124|      0|        return SSL_ERROR_WANT_RETRY_VERIFY;
  ------------------
  |  | 1297|      0|#define SSL_ERROR_WANT_RETRY_VERIFY 12
  ------------------
 5125|  6.00k|    if (SSL_want_async(s))
  ------------------
  |  |  970|  6.00k|#define SSL_want_async(s) (SSL_want(s) == SSL_ASYNC_PAUSED)
  |  |  ------------------
  |  |  |  |  959|  6.00k|#define SSL_ASYNC_PAUSED 5
  |  |  ------------------
  |  |  |  Branch (970:27): [True: 0, False: 6.00k]
  |  |  ------------------
  ------------------
 5126|      0|        return SSL_ERROR_WANT_ASYNC;
  ------------------
  |  | 1294|      0|#define SSL_ERROR_WANT_ASYNC 9
  ------------------
 5127|  6.00k|    if (SSL_want_async_job(s))
  ------------------
  |  |  971|  6.00k|#define SSL_want_async_job(s) (SSL_want(s) == SSL_ASYNC_NO_JOBS)
  |  |  ------------------
  |  |  |  |  960|  6.00k|#define SSL_ASYNC_NO_JOBS 6
  |  |  ------------------
  |  |  |  Branch (971:31): [True: 0, False: 6.00k]
  |  |  ------------------
  ------------------
 5128|      0|        return SSL_ERROR_WANT_ASYNC_JOB;
  ------------------
  |  | 1295|      0|#define SSL_ERROR_WANT_ASYNC_JOB 10
  ------------------
 5129|  6.00k|    if (SSL_want_client_hello_cb(s))
  ------------------
  |  |  972|  6.00k|#define SSL_want_client_hello_cb(s) (SSL_want(s) == SSL_CLIENT_HELLO_CB)
  |  |  ------------------
  |  |  |  |  961|  6.00k|#define SSL_CLIENT_HELLO_CB 7
  |  |  ------------------
  |  |  |  Branch (972:37): [True: 0, False: 6.00k]
  |  |  ------------------
  ------------------
 5130|      0|        return SSL_ERROR_WANT_CLIENT_HELLO_CB;
  ------------------
  |  | 1296|      0|#define SSL_ERROR_WANT_CLIENT_HELLO_CB 11
  ------------------
 5131|       |
 5132|  6.00k|    if ((sc->shutdown & SSL_RECEIVED_SHUTDOWN) && (sc->s3.warn_alert == SSL_AD_CLOSE_NOTIFY))
  ------------------
  |  |  217|  6.00k|#define SSL_RECEIVED_SHUTDOWN 2
  ------------------
                  if ((sc->shutdown & SSL_RECEIVED_SHUTDOWN) && (sc->s3.warn_alert == SSL_AD_CLOSE_NOTIFY))
  ------------------
  |  | 1232|  5.99k|#define SSL_AD_CLOSE_NOTIFY SSL3_AD_CLOSE_NOTIFY
  |  |  ------------------
  |  |  |  |  252|  5.99k|#define SSL3_AD_CLOSE_NOTIFY 0
  |  |  ------------------
  ------------------
  |  Branch (5132:9): [True: 5.99k, False: 15]
  |  Branch (5132:51): [True: 5.99k, False: 0]
  ------------------
 5133|  5.99k|        return SSL_ERROR_ZERO_RETURN;
  ------------------
  |  | 1291|  5.99k|#define SSL_ERROR_ZERO_RETURN 6
  ------------------
 5134|       |
 5135|     15|    return SSL_ERROR_SYSCALL;
  ------------------
  |  | 1289|     15|#define SSL_ERROR_SYSCALL 5 /* look at error stack/return \
  ------------------
 5136|  6.00k|}
SSL_do_handshake:
 5151|  18.3k|{
 5152|  18.3k|    int ret = 1;
 5153|  18.3k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  18.3k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  18.3k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 18.3k]
  |  |  |  |  ------------------
  |  |  |  |   33|  18.3k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  18.3k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 18.3k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  18.3k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  18.3k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 5154|       |
 5155|  18.3k|#ifndef OPENSSL_NO_QUIC
 5156|  18.3k|    if (IS_QUIC(s))
  ------------------
  |  |   96|  18.3k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  18.3k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 18.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 18.3k, False: 0]
  |  |  ------------------
  ------------------
 5157|      0|        return ossl_quic_do_handshake(s);
 5158|  18.3k|#endif
 5159|       |
 5160|  18.3k|    if (sc == NULL)
  ------------------
  |  Branch (5160:9): [True: 0, False: 18.3k]
  ------------------
 5161|      0|        return -1;
 5162|       |
 5163|  18.3k|    if (ssl_reset_error_state(sc) == 0)
  ------------------
  |  Branch (5163:9): [True: 0, False: 18.3k]
  ------------------
 5164|      0|        return -1;
 5165|       |
 5166|  18.3k|    sc->statem.error_state = ERROR_STATE_NOERROR;
 5167|       |
 5168|  18.3k|    if (sc->handshake_func == NULL) {
  ------------------
  |  Branch (5168:9): [True: 0, False: 18.3k]
  ------------------
 5169|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_CONNECTION_TYPE_NOT_SET);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 5170|      0|        sc->statem.error_state = ERROR_STATE_SSL;
 5171|      0|        return -1;
 5172|      0|    }
 5173|       |
 5174|  18.3k|    if (!ossl_statem_check_finish_init(sc, -1)) {
  ------------------
  |  Branch (5174:9): [True: 0, False: 18.3k]
  ------------------
 5175|      0|        ssl_update_error_state(sc);
 5176|      0|        return -1;
 5177|      0|    }
 5178|       |
 5179|  18.3k|    s->method->ssl_renegotiate_check(s, 0);
 5180|       |
 5181|  18.3k|    if (SSL_in_init(s) || SSL_in_before(s)) {
  ------------------
  |  Branch (5181:9): [True: 18.3k, False: 0]
  |  Branch (5181:27): [True: 0, False: 0]
  ------------------
 5182|  18.3k|        if ((sc->mode & SSL_MODE_ASYNC) && ASYNC_get_current_job() == NULL) {
  ------------------
  |  |  557|  18.3k|#define SSL_MODE_ASYNC 0x00000100U
  ------------------
  |  Branch (5182:13): [True: 0, False: 18.3k]
  |  Branch (5182:44): [True: 0, False: 0]
  ------------------
 5183|      0|            struct ssl_async_args args;
 5184|       |
 5185|      0|            memset(&args, 0, sizeof(args));
 5186|      0|            args.s = s;
 5187|       |
 5188|      0|            ret = ssl_start_async_job(s, &args, ssl_do_handshake_intern);
 5189|  18.3k|        } else {
 5190|  18.3k|            ret = sc->handshake_func(s);
 5191|  18.3k|        }
 5192|  18.3k|    }
 5193|       |
 5194|  18.3k|    ssl_update_error_state(sc);
 5195|  18.3k|    return ret;
 5196|  18.3k|}
SSL_set_accept_state:
 5199|  3.62k|{
 5200|  3.62k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL_ONLY(s);
  ------------------
  |  |   23|  3.62k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  3.62k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 3.62k]
  |  |  |  |  ------------------
  |  |  |  |   18|  3.62k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  3.62k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 3.62k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  3.62k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  3.62k|                             : NULL))
  |  |  ------------------
  ------------------
 5201|       |
 5202|  3.62k|#ifndef OPENSSL_NO_QUIC
 5203|  3.62k|    if (IS_QUIC(s)) {
  ------------------
  |  |   96|  3.62k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  3.62k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 3.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 5204|       |        /* We suppress errors because this is a void function */
 5205|      0|        (void)ossl_quic_set_accept_state(s, 0 /* suppress errors */);
 5206|      0|        return;
 5207|      0|    }
 5208|  3.62k|#endif
 5209|       |
 5210|  3.62k|    sc->server = 1;
 5211|  3.62k|    sc->shutdown = 0;
 5212|  3.62k|    ossl_statem_clear(sc);
 5213|  3.62k|    sc->handshake_func = s->method->ssl_accept;
 5214|       |    /* Ignore return value. Its a void public API function */
 5215|  3.62k|    RECORD_LAYER_reset(&sc->rlayer);
 5216|  3.62k|}
SSL_set_connect_state:
 5219|  3.62k|{
 5220|  3.62k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL_ONLY(s);
  ------------------
  |  |   23|  3.62k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  3.62k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 3.62k]
  |  |  |  |  ------------------
  |  |  |  |   18|  3.62k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  3.62k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 3.62k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  3.62k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  3.62k|                             : NULL))
  |  |  ------------------
  ------------------
 5221|       |
 5222|  3.62k|#ifndef OPENSSL_NO_QUIC
 5223|  3.62k|    if (IS_QUIC(s)) {
  ------------------
  |  |   96|  3.62k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  3.62k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 3.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 5224|       |        /* We suppress errors because this is a void function */
 5225|      0|        (void)ossl_quic_set_connect_state(s, 0 /* suppress errors */);
 5226|      0|        return;
 5227|      0|    }
 5228|  3.62k|#endif
 5229|       |
 5230|  3.62k|    sc->server = 0;
 5231|  3.62k|    sc->shutdown = 0;
 5232|  3.62k|    ossl_statem_clear(sc);
 5233|  3.62k|    sc->handshake_func = s->method->ssl_connect;
 5234|       |    /* Ignore return value. Its a void public API function */
 5235|  3.62k|    RECORD_LAYER_reset(&sc->rlayer);
 5236|  3.62k|}
ssl_init_wbio_buffer:
 5577|  14.4k|{
 5578|  14.4k|    BIO *bbio;
 5579|       |
 5580|  14.4k|    if (s->bbio != NULL) {
  ------------------
  |  Branch (5580:9): [True: 0, False: 14.4k]
  ------------------
 5581|       |        /* Already buffered. */
 5582|      0|        return 1;
 5583|      0|    }
 5584|       |
 5585|  14.4k|    bbio = BIO_new(BIO_f_buffer());
 5586|  14.4k|    if (bbio == NULL || BIO_set_read_buffer_size(bbio, 1) <= 0) {
  ------------------
  |  |  635|  14.4k|#define BIO_set_read_buffer_size(b, size) BIO_int_ctrl(b, BIO_C_SET_BUFF_SIZE, size, 0)
  |  |  ------------------
  |  |  |  |  460|  14.4k|#define BIO_C_SET_BUFF_SIZE 117
  |  |  ------------------
  ------------------
  |  Branch (5586:9): [True: 0, False: 14.4k]
  |  Branch (5586:25): [True: 0, False: 14.4k]
  ------------------
 5587|      0|        BIO_free(bbio);
 5588|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_BUF_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 5589|      0|        return 0;
 5590|      0|    }
 5591|  14.4k|    s->bbio = bbio;
 5592|  14.4k|    s->wbio = BIO_push(bbio, s->wbio);
 5593|       |
 5594|  14.4k|    s->rlayer.wrlmethod->set1_bio(s->rlayer.wrl, s->wbio);
 5595|       |
 5596|  14.4k|    return 1;
 5597|  14.4k|}
ssl_free_wbio_buffer:
 5600|  50.6k|{
 5601|       |    /* callers ensure s is never null */
 5602|  50.6k|    if (s->bbio == NULL)
  ------------------
  |  Branch (5602:9): [True: 36.2k, False: 14.4k]
  ------------------
 5603|  36.2k|        return 1;
 5604|       |
 5605|  14.4k|    s->wbio = BIO_pop(s->wbio);
 5606|  14.4k|    s->rlayer.wrlmethod->set1_bio(s->rlayer.wrl, s->wbio);
 5607|       |
 5608|  14.4k|    BIO_free(s->bbio);
 5609|  14.4k|    s->bbio = NULL;
 5610|       |
 5611|  14.4k|    return 1;
 5612|  50.6k|}
SSL_get_shutdown:
 5658|  6.08k|{
 5659|  6.08k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL_ONLY(s);
  ------------------
  |  |   25|  6.08k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, const)
  |  |  ------------------
  |  |  |  |   17|  6.08k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 6.08k]
  |  |  |  |  ------------------
  |  |  |  |   18|  6.08k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  6.08k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 6.08k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  6.08k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  6.08k|                             : NULL))
  |  |  ------------------
  ------------------
 5660|       |
 5661|  6.08k|#ifndef OPENSSL_NO_QUIC
 5662|       |    /* QUIC: Just indicate whether the connection was shutdown cleanly. */
 5663|  6.08k|    if (IS_QUIC(s))
  ------------------
  |  |   96|  6.08k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  6.08k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 6.08k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 6.08k, False: 0]
  |  |  ------------------
  ------------------
 5664|      0|        return ossl_quic_get_shutdown(s);
 5665|  6.08k|#endif
 5666|       |
 5667|  6.08k|    if (sc == NULL)
  ------------------
  |  Branch (5667:9): [True: 0, False: 6.08k]
  ------------------
 5668|      0|        return 0;
 5669|       |
 5670|  6.08k|    return sc->shutdown;
 5671|  6.08k|}
SSL_version:
 5674|  25.2k|{
 5675|  25.2k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  25.2k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  25.2k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 25.2k]
  |  |  |  |  ------------------
  |  |  |  |   33|  25.2k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  25.2k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 25.2k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  25.2k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  25.2k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 5676|       |
 5677|  25.2k|#ifndef OPENSSL_NO_QUIC
 5678|       |    /* We only support QUICv1 - so if its QUIC its QUICv1 */
 5679|  25.2k|    if (s->type == SSL_TYPE_QUIC_CONNECTION || s->type == SSL_TYPE_QUIC_XSO)
  ------------------
  |  | 1226|  50.5k|#define SSL_TYPE_QUIC_CONNECTION 0x80
  ------------------
                  if (s->type == SSL_TYPE_QUIC_CONNECTION || s->type == SSL_TYPE_QUIC_XSO)
  ------------------
  |  | 1227|  25.2k|#define SSL_TYPE_QUIC_XSO 0x81
  ------------------
  |  Branch (5679:9): [True: 0, False: 25.2k]
  |  Branch (5679:48): [True: 0, False: 25.2k]
  ------------------
 5680|      0|        return OSSL_QUIC1_VERSION;
  ------------------
  |  |   33|      0|#define OSSL_QUIC1_VERSION 0x0000001
  ------------------
 5681|  25.2k|#endif
 5682|  25.2k|    if (sc == NULL)
  ------------------
  |  Branch (5682:9): [True: 0, False: 25.2k]
  ------------------
 5683|      0|        return 0;
 5684|       |
 5685|  25.2k|    return sc->version;
 5686|  25.2k|}
SSL_get_verify_result:
 5889|  3.62k|{
 5890|  3.62k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(ssl);
  ------------------
  |  |   41|  3.62k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  3.62k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 3.62k]
  |  |  |  |  ------------------
  |  |  |  |   33|  3.62k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  3.62k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 3.62k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  3.62k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  3.62k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 5891|       |
 5892|  3.62k|    if (sc == NULL)
  ------------------
  |  Branch (5892:9): [True: 0, False: 3.62k]
  ------------------
 5893|      0|        return 0;
 5894|       |
 5895|  3.62k|    return sc->verify_result;
 5896|  3.62k|}
SSL_set_ex_data:
 5951|  3.62k|{
 5952|  3.62k|    return CRYPTO_set_ex_data(&s->ex_data, idx, arg);
 5953|  3.62k|}
SSL_get_ex_data:
 5956|  7.16k|{
 5957|  7.16k|    return CRYPTO_get_ex_data(&s->ex_data, idx);
 5958|  7.16k|}
SSL_CTX_get_cert_store:
 5971|  3.62k|{
 5972|  3.62k|    return ctx->cert_store;
 5973|  3.62k|}
SSL_want:
 5990|  60.9k|{
 5991|  60.9k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  60.9k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  60.9k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 60.9k]
  |  |  |  |  ------------------
  |  |  |  |   33|  60.9k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  60.9k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 60.9k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  60.9k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  60.9k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 5992|       |
 5993|  60.9k|#ifndef OPENSSL_NO_QUIC
 5994|  60.9k|    if (IS_QUIC(s))
  ------------------
  |  |   96|  60.9k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  60.9k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 60.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 60.9k, False: 0]
  |  |  ------------------
  ------------------
 5995|      0|        return ossl_quic_want(s);
 5996|  60.9k|#endif
 5997|       |
 5998|  60.9k|    if (sc == NULL)
  ------------------
  |  Branch (5998:9): [True: 0, False: 60.9k]
  ------------------
 5999|      0|        return SSL_NOTHING;
  ------------------
  |  |  955|      0|#define SSL_NOTHING 1
  ------------------
 6000|       |
 6001|  60.9k|    return sc->rwstate;
 6002|  60.9k|}
ssl_handshake_hash:
 6313|  65.2k|{
 6314|  65.2k|    EVP_MD_CTX *ctx = NULL;
 6315|  65.2k|    EVP_MD_CTX *hdgst = s->s3.handshake_dgst;
 6316|  65.2k|    int hashleni = EVP_MD_CTX_get_size(hdgst);
  ------------------
  |  |  482|  65.2k|#define EVP_MD_CTX_get_size(e) EVP_MD_CTX_get_size_ex(e)
  ------------------
 6317|  65.2k|    int ret = 0;
 6318|       |
 6319|  65.2k|    if (hashleni < 0 || (size_t)hashleni > outlen) {
  ------------------
  |  Branch (6319:9): [True: 0, False: 65.2k]
  |  Branch (6319:25): [True: 0, False: 65.2k]
  ------------------
 6320|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 6321|      0|        goto err;
 6322|      0|    }
 6323|       |
 6324|  65.2k|    ctx = EVP_MD_CTX_new();
 6325|  65.2k|    if (ctx == NULL) {
  ------------------
  |  Branch (6325:9): [True: 0, False: 65.2k]
  ------------------
 6326|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 6327|      0|        goto err;
 6328|      0|    }
 6329|       |
 6330|  65.2k|    if (!EVP_MD_CTX_copy_ex(ctx, hdgst)
  ------------------
  |  Branch (6330:9): [True: 0, False: 65.2k]
  ------------------
 6331|  65.2k|        || EVP_DigestFinal_ex(ctx, out, NULL) <= 0) {
  ------------------
  |  Branch (6331:12): [True: 0, False: 65.2k]
  ------------------
 6332|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 6333|      0|        goto err;
 6334|      0|    }
 6335|       |
 6336|  65.2k|    *hashlen = hashleni;
 6337|       |
 6338|  65.2k|    ret = 1;
 6339|  65.2k|err:
 6340|  65.2k|    EVP_MD_CTX_free(ctx);
 6341|  65.2k|    return ret;
 6342|  65.2k|}
SSL_session_reused:
 6345|  3.58k|{
 6346|  3.58k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  3.58k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  3.58k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 3.58k]
  |  |  |  |  ------------------
  |  |  |  |   33|  3.58k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  3.58k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 3.58k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  3.58k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  3.58k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 6347|       |
 6348|  3.58k|    if (sc == NULL)
  ------------------
  |  Branch (6348:9): [True: 0, False: 3.58k]
  ------------------
 6349|      0|        return 0;
 6350|       |
 6351|  3.58k|    return sc->hit;
 6352|  3.58k|}
SSL_get_security_level:
 6384|   994k|{
 6385|   994k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|   994k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|   994k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 994k]
  |  |  |  |  ------------------
  |  |  |  |   33|   994k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|   994k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 994k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|   994k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|   994k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 6386|       |
 6387|   994k|    if (sc == NULL)
  ------------------
  |  Branch (6387:9): [True: 0, False: 994k]
  ------------------
 6388|      0|        return 0;
 6389|       |
 6390|   994k|    return sc->cert->sec_level;
 6391|   994k|}
SSL_CTX_get_security_level:
 6445|  3.73k|{
 6446|  3.73k|    return ctx->cert->sec_level;
 6447|  3.73k|}
SSL_get_options:
 6483|  7.25k|{
 6484|  7.25k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  7.25k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  7.25k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 7.25k]
  |  |  |  |  ------------------
  |  |  |  |   33|  7.25k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  7.25k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 7.25k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  7.25k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  7.25k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 6485|       |
 6486|  7.25k|#ifndef OPENSSL_NO_QUIC
 6487|  7.25k|    if (IS_QUIC(s))
  ------------------
  |  |   96|  7.25k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  7.25k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 7.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
 6488|      0|        return ossl_quic_get_options(s);
 6489|  7.25k|#endif
 6490|       |
 6491|  7.25k|    if (sc == NULL)
  ------------------
  |  Branch (6491:9): [True: 0, False: 7.25k]
  ------------------
 6492|      0|        return 0;
 6493|       |
 6494|  7.25k|    return sc->options;
 6495|  7.25k|}
SSL_CTX_set_options:
 6498|  7.36k|{
 6499|  7.36k|    return ctx->options |= op;
 6500|  7.36k|}
SSL_set_ct_validation_callback:
 6770|  7.25k|{
 6771|  7.25k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  7.25k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  7.25k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 7.25k]
  |  |  |  |  ------------------
  |  |  |  |   33|  7.25k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  7.25k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 7.25k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  7.25k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  7.25k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 6772|       |
 6773|  7.25k|    if (sc == NULL)
  ------------------
  |  Branch (6773:9): [True: 0, False: 7.25k]
  ------------------
 6774|      0|        return 0;
 6775|       |
 6776|       |    /*
 6777|       |     * Since code exists that uses the custom extension handler for CT, look
 6778|       |     * for this and throw an error if they have already registered to use CT.
 6779|       |     */
 6780|  7.25k|    if (callback != NULL && SSL_CTX_has_client_custom_ext(s->ctx, TLSEXT_TYPE_signed_certificate_timestamp)) {
  ------------------
  |  |  125|      0|#define TLSEXT_TYPE_signed_certificate_timestamp 18
  ------------------
  |  Branch (6780:9): [True: 0, False: 7.25k]
  |  Branch (6780:29): [True: 0, False: 0]
  ------------------
 6781|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_CUSTOM_EXT_HANDLER_ALREADY_INSTALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 6782|      0|        return 0;
 6783|      0|    }
 6784|       |
 6785|  7.25k|    if (callback != NULL) {
  ------------------
  |  Branch (6785:9): [True: 0, False: 7.25k]
  ------------------
 6786|       |        /*
 6787|       |         * If we are validating CT, then we MUST accept SCTs served via OCSP
 6788|       |         */
 6789|      0|        if (!SSL_set_tlsext_status_type(s, TLSEXT_STATUSTYPE_ocsp))
  ------------------
  |  |  320|      0|    SSL_ctrl(ssl, SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE, type, NULL)
  |  |  ------------------
  |  |  |  | 1351|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE 65
  |  |  ------------------
  ------------------
  |  Branch (6789:13): [True: 0, False: 0]
  ------------------
 6790|      0|            return 0;
 6791|      0|    }
 6792|       |
 6793|  7.25k|    sc->ct_validation_callback = callback;
 6794|  7.25k|    sc->ct_validation_callback_arg = arg;
 6795|       |
 6796|  7.25k|    return 1;
 6797|  7.25k|}
ssl_log_secret:
 7292|  36.2k|{
 7293|  36.2k|    return nss_keylog_int(label,
 7294|  36.2k|        sc,
 7295|  36.2k|        sc->s3.client_random,
 7296|  36.2k|        SSL3_RANDOM_SIZE,
  ------------------
  |  |  137|  36.2k|#define SSL3_RANDOM_SIZE 32
  ------------------
 7297|  36.2k|        secret,
 7298|  36.2k|        secret_len);
 7299|  36.2k|}
ssl_cache_cipherlist:
 7302|  3.62k|{
 7303|  3.62k|    if (PACKET_remaining(cipher_suites) == 0) {
  ------------------
  |  Branch (7303:9): [True: 0, False: 3.62k]
  ------------------
 7304|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_NO_CIPHERS_SPECIFIED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 7305|      0|        return 0;
 7306|      0|    }
 7307|       |
 7308|  3.62k|    if (PACKET_remaining(cipher_suites) % TLS_CIPHER_LEN != 0) {
  ------------------
  |  |  389|  3.62k|#define TLS_CIPHER_LEN 2
  ------------------
  |  Branch (7308:9): [True: 0, False: 3.62k]
  ------------------
 7309|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 7310|      0|        return 0;
 7311|      0|    }
 7312|       |
 7313|  3.62k|    OPENSSL_free(s->s3.tmp.ciphers_raw);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 7314|  3.62k|    s->s3.tmp.ciphers_raw = NULL;
 7315|  3.62k|    s->s3.tmp.ciphers_rawlen = 0;
 7316|       |
 7317|  3.62k|    if (!PACKET_memdup(cipher_suites, &s->s3.tmp.ciphers_raw,
  ------------------
  |  Branch (7317:9): [True: 0, False: 3.62k]
  ------------------
 7318|  3.62k|            &s->s3.tmp.ciphers_rawlen)) {
 7319|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 7320|      0|        return 0;
 7321|      0|    }
 7322|  3.62k|    return 1;
 7323|  3.62k|}
ossl_bytes_to_cipher_list:
 7344|  3.62k|{
 7345|  3.62k|    const SSL_CIPHER *c;
 7346|  3.62k|    STACK_OF(SSL_CIPHER) *sk = NULL;
  ------------------
  |  |   33|  3.62k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 7347|  3.62k|    STACK_OF(SSL_CIPHER) *scsvs = NULL;
  ------------------
  |  |   33|  3.62k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 7348|  3.62k|    int n = TLS_CIPHER_LEN;
  ------------------
  |  |  389|  3.62k|#define TLS_CIPHER_LEN 2
  ------------------
 7349|  3.62k|    unsigned char cipher[TLS_CIPHER_LEN];
 7350|       |
 7351|  3.62k|    if (PACKET_remaining(cipher_suites) == 0) {
  ------------------
  |  Branch (7351:9): [True: 0, False: 3.62k]
  ------------------
 7352|      0|        if (fatal)
  ------------------
  |  Branch (7352:13): [True: 0, False: 0]
  ------------------
 7353|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_NO_CIPHERS_SPECIFIED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 7354|      0|        else
 7355|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_NO_CIPHERS_SPECIFIED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 7356|      0|        return 0;
 7357|      0|    }
 7358|       |
 7359|  3.62k|    if (PACKET_remaining(cipher_suites) % n != 0) {
  ------------------
  |  Branch (7359:9): [True: 0, False: 3.62k]
  ------------------
 7360|      0|        if (fatal)
  ------------------
  |  Branch (7360:13): [True: 0, False: 0]
  ------------------
 7361|      0|            SSLfatal(s, SSL_AD_DECODE_ERROR,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 7362|      0|                SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST);
 7363|      0|        else
 7364|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 7365|      0|        return 0;
 7366|      0|    }
 7367|       |
 7368|  3.62k|    sk = sk_SSL_CIPHER_new_null();
  ------------------
  |  | 1031|  3.62k|#define sk_SSL_CIPHER_new_null() ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_SSL_CIPHER_freefunc_thunk))
  ------------------
 7369|  3.62k|    scsvs = sk_SSL_CIPHER_new_null();
  ------------------
  |  | 1031|  3.62k|#define sk_SSL_CIPHER_new_null() ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_SSL_CIPHER_freefunc_thunk))
  ------------------
 7370|  3.62k|    if (sk == NULL || scsvs == NULL) {
  ------------------
  |  Branch (7370:9): [True: 0, False: 3.62k]
  |  Branch (7370:23): [True: 0, False: 3.62k]
  ------------------
 7371|      0|        if (fatal)
  ------------------
  |  Branch (7371:13): [True: 0, False: 0]
  ------------------
 7372|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 7373|      0|        else
 7374|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 7375|      0|        goto err;
 7376|      0|    }
 7377|       |
 7378|   112k|    while (PACKET_copy_bytes(cipher_suites, cipher, n)) {
  ------------------
  |  Branch (7378:12): [True: 108k, False: 3.62k]
  ------------------
 7379|   108k|        c = ssl_get_cipher_by_char(s, cipher, 1);
 7380|   108k|        if (c != NULL) {
  ------------------
  |  Branch (7380:13): [True: 108k, False: 0]
  ------------------
 7381|   108k|            if ((c->valid && !sk_SSL_CIPHER_push(sk, c)) || (!c->valid && !sk_SSL_CIPHER_push(scsvs, c))) {
  ------------------
  |  | 1038|   108k|#define sk_SSL_CIPHER_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
                          if ((c->valid && !sk_SSL_CIPHER_push(sk, c)) || (!c->valid && !sk_SSL_CIPHER_push(scsvs, c))) {
  ------------------
  |  | 1038|      0|#define sk_SSL_CIPHER_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
  |  Branch (7381:18): [True: 108k, False: 0]
  |  Branch (7381:30): [True: 0, False: 108k]
  |  Branch (7381:62): [True: 0, False: 108k]
  |  Branch (7381:75): [True: 0, False: 0]
  ------------------
 7382|      0|                if (fatal)
  ------------------
  |  Branch (7382:21): [True: 0, False: 0]
  ------------------
 7383|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 7384|      0|                else
 7385|      0|                    ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 7386|      0|                goto err;
 7387|      0|            }
 7388|   108k|        }
 7389|   108k|    }
 7390|  3.62k|    if (PACKET_remaining(cipher_suites) > 0) {
  ------------------
  |  Branch (7390:9): [True: 0, False: 3.62k]
  ------------------
 7391|      0|        if (fatal)
  ------------------
  |  Branch (7391:13): [True: 0, False: 0]
  ------------------
 7392|      0|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_LENGTH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 7393|      0|        else
 7394|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_BAD_LENGTH);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 7395|      0|        goto err;
 7396|      0|    }
 7397|       |
 7398|  3.62k|    if (skp != NULL)
  ------------------
  |  Branch (7398:9): [True: 3.62k, False: 0]
  ------------------
 7399|  3.62k|        *skp = sk;
 7400|      0|    else
 7401|      0|        sk_SSL_CIPHER_free(sk);
  ------------------
  |  | 1034|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 7402|  3.62k|    if (scsvs_out != NULL)
  ------------------
  |  Branch (7402:9): [True: 3.62k, False: 0]
  ------------------
 7403|  3.62k|        *scsvs_out = scsvs;
 7404|      0|    else
 7405|      0|        sk_SSL_CIPHER_free(scsvs);
  ------------------
  |  | 1034|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 7406|  3.62k|    return 1;
 7407|      0|err:
 7408|      0|    sk_SSL_CIPHER_free(sk);
  ------------------
  |  | 1034|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 7409|      0|    sk_SSL_CIPHER_free(scsvs);
  ------------------
  |  | 1034|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 7410|      0|    return 0;
 7411|  3.62k|}
ssl_get_max_send_fragment:
 7482|  80.4k|{
 7483|       |    /* Return any active Max Fragment Len extension */
 7484|  80.4k|    if (sc->session != NULL && USE_MAX_FRAGMENT_LENGTH_EXT(sc->session))
  ------------------
  |  |  304|  58.6k|    IS_MAX_FRAGMENT_LENGTH_EXT_VALID(session->ext.max_fragment_len_mode)
  |  |  ------------------
  |  |  |  |  302|  58.6k|    (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  58.6k|#define TLSEXT_max_fragment_length_512 1
  |  |  |  |  ------------------
  |  |  |  |                   (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  240|  3.62k|#define TLSEXT_max_fragment_length_4096 4
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (302:6): [True: 3.62k, False: 55.0k]
  |  |  |  |  |  Branch (302:53): [True: 0, False: 3.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7484:9): [True: 58.6k, False: 21.7k]
  ------------------
 7485|      0|        return GET_MAX_FRAGMENT_LENGTH(sc->session);
  ------------------
  |  |  306|      0|    (512U << (session->ext.max_fragment_len_mode - 1))
  ------------------
 7486|       |
 7487|       |    /* return current SSL connection setting */
 7488|  80.4k|    return (unsigned int)sc->max_send_fragment;
 7489|  80.4k|}
ssl_get_split_send_fragment:
 7492|  44.1k|{
 7493|       |    /* Return a value regarding an active Max Fragment Len extension */
 7494|  44.1k|    if (sc->session != NULL && USE_MAX_FRAGMENT_LENGTH_EXT(sc->session)
  ------------------
  |  |  304|  44.1k|    IS_MAX_FRAGMENT_LENGTH_EXT_VALID(session->ext.max_fragment_len_mode)
  |  |  ------------------
  |  |  |  |  302|  88.3k|    (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  44.1k|#define TLSEXT_max_fragment_length_512 1
  |  |  |  |  ------------------
  |  |  |  |                   (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  240|  3.62k|#define TLSEXT_max_fragment_length_4096 4
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (302:6): [True: 3.62k, False: 40.5k]
  |  |  |  |  |  Branch (302:53): [True: 0, False: 3.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7494:9): [True: 44.1k, False: 0]
  ------------------
 7495|      0|        && sc->split_send_fragment > GET_MAX_FRAGMENT_LENGTH(sc->session))
  ------------------
  |  |  306|      0|    (512U << (session->ext.max_fragment_len_mode - 1))
  ------------------
  |  Branch (7495:12): [True: 0, False: 0]
  ------------------
 7496|      0|        return GET_MAX_FRAGMENT_LENGTH(sc->session);
  ------------------
  |  |  306|      0|    (512U << (session->ext.max_fragment_len_mode - 1))
  ------------------
 7497|       |
 7498|       |    /* else limit |split_send_fragment| to current |max_send_fragment| */
 7499|  44.1k|    if (sc->split_send_fragment > sc->max_send_fragment)
  ------------------
  |  Branch (7499:9): [True: 0, False: 44.1k]
  ------------------
 7500|      0|        return (unsigned int)sc->max_send_fragment;
 7501|       |
 7502|       |    /* return current SSL connection setting */
 7503|  44.1k|    return (unsigned int)sc->split_send_fragment;
 7504|  44.1k|}
SSL_CTX_set_post_handshake_auth:
 7534|  3.62k|{
 7535|  3.62k|    ctx->pha_enabled = val;
 7536|  3.62k|}
ssl_evp_cipher_fetch:
 7642|   184k|{
 7643|   184k|    const EVP_CIPHER *ciph;
 7644|       |
 7645|   184k|    ERR_set_mark();
 7646|   184k|    ciph = EVP_CIPHER_fetch(libctx, name, properties);
 7647|   184k|    if (ciph != NULL) {
  ------------------
  |  Branch (7647:9): [True: 117k, False: 66.2k]
  ------------------
 7648|   117k|        OSSL_PARAM params[2];
 7649|   117k|        int decrypt_only = 0;
 7650|       |
 7651|   117k|        params[0] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_DECRYPT_ONLY,
  ------------------
  |  |  190|   117k|# define OSSL_CIPHER_PARAM_DECRYPT_ONLY "decrypt-only"
  ------------------
 7652|   117k|            &decrypt_only);
 7653|   117k|        params[1] = OSSL_PARAM_construct_end();
 7654|   117k|        if (EVP_CIPHER_get_params((EVP_CIPHER *)ciph, params)
  ------------------
  |  Branch (7654:13): [True: 117k, False: 0]
  ------------------
 7655|   117k|            && decrypt_only) {
  ------------------
  |  Branch (7655:16): [True: 0, False: 117k]
  ------------------
 7656|       |            /* If a cipher is decrypt-only, it is unusable */
 7657|      0|            EVP_CIPHER_free((EVP_CIPHER *)ciph);
 7658|       |            ciph = NULL;
 7659|      0|        }
 7660|   117k|    }
 7661|   184k|    ERR_pop_to_mark();
 7662|   184k|    return ciph;
 7663|   184k|}
ssl_evp_cipher_up_ref:
 7666|  7.25k|{
 7667|       |    /* Don't up-ref an implicit EVP_CIPHER */
 7668|  7.25k|    if (EVP_CIPHER_get0_provider(cipher) == NULL)
  ------------------
  |  Branch (7668:9): [True: 0, False: 7.25k]
  ------------------
 7669|      0|        return 1;
 7670|       |
 7671|       |    /*
 7672|       |     * The cipher was explicitly fetched and therefore it is safe to cast
 7673|       |     * away the const
 7674|       |     */
 7675|  7.25k|    return EVP_CIPHER_up_ref((EVP_CIPHER *)cipher);
 7676|  7.25k|}
ssl_evp_cipher_free:
 7679|   205k|{
 7680|   205k|    if (cipher == NULL)
  ------------------
  |  Branch (7680:9): [True: 80.8k, False: 125k]
  ------------------
 7681|  80.8k|        return;
 7682|       |
 7683|   125k|    if (EVP_CIPHER_get0_provider(cipher) != NULL) {
  ------------------
  |  Branch (7683:9): [True: 125k, False: 0]
  ------------------
 7684|       |        /*
 7685|       |         * The cipher was explicitly fetched and therefore it is safe to cast
 7686|       |         * away the const
 7687|       |         */
 7688|   125k|        EVP_CIPHER_free((EVP_CIPHER *)cipher);
 7689|   125k|    }
 7690|   125k|}
ssl_evp_md_free:
 7706|   139k|{
 7707|   139k|    if (md == NULL)
  ------------------
  |  Branch (7707:9): [True: 66.0k, False: 73.6k]
  ------------------
 7708|  66.0k|        return;
 7709|       |
 7710|  73.6k|    if (EVP_MD_get0_provider(md) != NULL) {
  ------------------
  |  Branch (7710:9): [True: 73.6k, False: 0]
  ------------------
 7711|       |        /*
 7712|       |         * The digest was explicitly fetched and therefore it is safe to cast
 7713|       |         * away the const
 7714|       |         */
 7715|  73.6k|        EVP_MD_free((EVP_MD *)md);
 7716|  73.6k|    }
 7717|  73.6k|}
ssl_lib.c:dane_final:
  169|  7.25k|{
  170|  7.25k|    sk_danetls_record_pop_free(dane->trecs, tlsa_free);
  171|  7.25k|    dane->trecs = NULL;
  172|       |
  173|  7.25k|    OSSL_STACK_OF_X509_free(dane->certs);
  174|  7.25k|    dane->certs = NULL;
  175|       |
  176|  7.25k|    X509_free(dane->mcert);
  177|  7.25k|    dane->mcert = NULL;
  178|       |    dane->mtlsa = NULL;
  179|  7.25k|    dane->mdpth = -1;
  180|  7.25k|    dane->pdpth = -1;
  181|  7.25k|}
ssl_lib.c:fd_method:
 1758|  3.62k|{
 1759|  3.62k|#ifndef OPENSSL_NO_DGRAM
 1760|  3.62k|    if (IS_QUIC(s))
  ------------------
  |  |   96|  3.62k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1231|  3.62k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1231:29): [True: 0, False: 3.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 1761|      0|        return BIO_s_datagram();
 1762|  3.62k|#endif
 1763|       |
 1764|  3.62k|    return BIO_s_socket();
 1765|  3.62k|}
ssl_lib.c:ssl_reset_error_state:
 2247|  47.2k|{
 2248|  47.2k|    if (sc == NULL)
  ------------------
  |  Branch (2248:9): [True: 0, False: 47.2k]
  ------------------
 2249|      0|        return 1;
 2250|       |
 2251|  47.2k|    if (sc->statem.state == MSG_FLOW_ERROR) {
  ------------------
  |  Branch (2251:9): [True: 0, False: 47.2k]
  ------------------
 2252|      0|        sc->statem.error_state = ERROR_STATE_SSL;
 2253|      0|        return 0;
 2254|      0|    }
 2255|       |
 2256|  47.2k|    sc->statem.error_state = ERROR_STATE_NOERROR;
 2257|  47.2k|    return 1;
 2258|  47.2k|}
ssl_lib.c:ssl_update_error_state:
 2268|  44.2k|{
 2269|  44.2k|    unsigned long l;
 2270|       |
 2271|  44.2k|    if (sc == NULL)
  ------------------
  |  Branch (2271:9): [True: 0, False: 44.2k]
  ------------------
 2272|      0|        return;
 2273|       |
 2274|  44.2k|    if (sc->statem.state == MSG_FLOW_ERROR
  ------------------
  |  Branch (2274:9): [True: 0, False: 44.2k]
  ------------------
 2275|      0|        && sc->statem.error_state == ERROR_STATE_NOERROR) {
  ------------------
  |  Branch (2275:12): [True: 0, False: 0]
  ------------------
 2276|      0|        l = ERR_peek_error();
 2277|      0|        if (l == 0 || ERR_GET_LIB(l) == ERR_LIB_SYS)
  ------------------
  |  |   55|      0|#define ERR_LIB_SYS 2
  ------------------
  |  Branch (2277:13): [True: 0, False: 0]
  |  Branch (2277:23): [True: 0, False: 0]
  ------------------
 2278|      0|            sc->statem.error_state = ERROR_STATE_SYSCALL;
 2279|      0|        else
 2280|      0|            sc->statem.error_state = ERROR_STATE_SSL;
 2281|      0|    }
 2282|  44.2k|}
ssl_lib.c:ssl_check_allowed_versions:
  450|  10.9k|{
  451|  10.9k|    int minisdtls = 0, maxisdtls = 0;
  452|       |
  453|       |    /* Figure out if we're doing DTLS versions or TLS versions */
  454|  10.9k|    if (min_version == DTLS1_BAD_VER
  ------------------
  |  |   30|  21.9k|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (454:9): [True: 0, False: 10.9k]
  ------------------
  455|  10.9k|        || min_version >> 8 == DTLS1_VERSION_MAJOR)
  ------------------
  |  |   32|  10.9k|#define DTLS1_VERSION_MAJOR 0xFE
  ------------------
  |  Branch (455:12): [True: 0, False: 10.9k]
  ------------------
  456|      0|        minisdtls = 1;
  457|  10.9k|    if (max_version == DTLS1_BAD_VER
  ------------------
  |  |   30|  21.9k|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (457:9): [True: 0, False: 10.9k]
  ------------------
  458|  10.9k|        || max_version >> 8 == DTLS1_VERSION_MAJOR)
  ------------------
  |  |   32|  10.9k|#define DTLS1_VERSION_MAJOR 0xFE
  ------------------
  |  Branch (458:12): [True: 0, False: 10.9k]
  ------------------
  459|      0|        maxisdtls = 1;
  460|       |    /* A wildcard version of 0 could be DTLS or TLS. */
  461|  10.9k|    if ((minisdtls && !maxisdtls && max_version != 0)
  ------------------
  |  Branch (461:10): [True: 0, False: 10.9k]
  |  Branch (461:23): [True: 0, False: 0]
  |  Branch (461:37): [True: 0, False: 0]
  ------------------
  462|  10.9k|        || (maxisdtls && !minisdtls && min_version != 0)) {
  ------------------
  |  Branch (462:13): [True: 0, False: 10.9k]
  |  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|  10.9k|    if (minisdtls || maxisdtls) {
  ------------------
  |  Branch (467:9): [True: 0, False: 10.9k]
  |  Branch (467:22): [True: 0, False: 10.9k]
  ------------------
  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|  10.9k|    } else {
  495|       |        /* Regular TLS version checks. */
  496|  10.9k|        if (min_version == 0)
  ------------------
  |  Branch (496:13): [True: 0, False: 10.9k]
  ------------------
  497|      0|            min_version = TLS1_VERSION;
  ------------------
  |  |   24|      0|#define TLS1_VERSION 0x0301
  ------------------
  498|  10.9k|        if (max_version == 0)
  ------------------
  |  Branch (498:13): [True: 10.9k, False: 0]
  ------------------
  499|  10.9k|            max_version = TLS1_3_VERSION;
  ------------------
  |  |   27|  10.9k|#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_TLS1
  517|       |        if (min_version == TLS1_VERSION)
  518|       |            min_version = TLS1_1_VERSION;
  519|       |#endif
  520|       |#ifdef OPENSSL_NO_TLS1_1
  521|       |        if (min_version == TLS1_1_VERSION)
  522|       |            min_version = TLS1_2_VERSION;
  523|       |#endif
  524|       |#ifdef OPENSSL_NO_TLS1_2
  525|       |        if (min_version == TLS1_2_VERSION)
  526|       |            min_version = TLS1_3_VERSION;
  527|       |#endif
  528|       |        /* Done massaging versions; do the check. */
  529|  10.9k|        if (0
  ------------------
  |  Branch (529:13): [Folded, False: 10.9k]
  ------------------
  530|       |#ifdef OPENSSL_NO_TLS1
  531|       |            || (min_version <= TLS1_VERSION && TLS1_VERSION <= max_version)
  532|       |#endif
  533|       |#ifdef OPENSSL_NO_TLS1_1
  534|       |            || (min_version <= TLS1_1_VERSION && TLS1_1_VERSION <= max_version)
  535|       |#endif
  536|       |#ifdef OPENSSL_NO_TLS1_2
  537|       |            || (min_version <= TLS1_2_VERSION && TLS1_2_VERSION <= max_version)
  538|       |#endif
  539|       |#ifdef OPENSSL_NO_TLS1_3
  540|       |            || (min_version <= TLS1_3_VERSION && TLS1_3_VERSION <= max_version)
  541|       |#endif
  542|  10.9k|        )
  543|      0|            return 0;
  544|  10.9k|    }
  545|  10.9k|    return 1;
  546|  10.9k|}
ssl_lib.c:ssl_tsan_load:
 3266|  14.3k|{
 3267|  14.3k|    int res = 0;
 3268|       |
 3269|  14.3k|    if (ssl_tsan_lock(ctx)) {
  ------------------
  |  Branch (3269:9): [True: 14.3k, False: 0]
  ------------------
 3270|       |        res = tsan_load(stat);
  ------------------
  |  |   61|  14.3k|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
 3271|  14.3k|        ssl_tsan_unlock(ctx);
 3272|  14.3k|    }
 3273|  14.3k|    return res;
 3274|  14.3k|}
ssl_lib.c:alpn_value_ok:
 3882|  3.62k|{
 3883|  3.62k|    unsigned int idx;
 3884|       |
 3885|  3.62k|    if (protos_len < 2 || protos == NULL)
  ------------------
  |  Branch (3885:9): [True: 0, False: 3.62k]
  |  Branch (3885:27): [True: 0, False: 3.62k]
  ------------------
 3886|      0|        return 0;
 3887|       |
 3888|  10.8k|    for (idx = 0; idx < protos_len; idx += protos[idx] + 1) {
  ------------------
  |  Branch (3888:19): [True: 7.25k, False: 3.62k]
  ------------------
 3889|  7.25k|        if (protos[idx] == 0)
  ------------------
  |  Branch (3889:13): [True: 0, False: 7.25k]
  ------------------
 3890|      0|            return 0;
 3891|  7.25k|    }
 3892|  3.62k|    return idx == protos_len;
 3893|  3.62k|}
ssl_lib.c:ssl_session_hash:
 4075|  15.0k|{
 4076|  15.0k|    const unsigned char *session_id = a->session_id;
 4077|  15.0k|    unsigned long l;
 4078|  15.0k|    unsigned char tmp_storage[4];
 4079|       |
 4080|  15.0k|    if (a->session_id_length < sizeof(tmp_storage)) {
  ------------------
  |  Branch (4080:9): [True: 0, False: 15.0k]
  ------------------
 4081|      0|        memset(tmp_storage, 0, sizeof(tmp_storage));
 4082|      0|        memcpy(tmp_storage, a->session_id, a->session_id_length);
 4083|      0|        session_id = tmp_storage;
 4084|      0|    }
 4085|       |
 4086|  15.0k|    l = (unsigned long)((unsigned long)session_id[0]) | ((unsigned long)session_id[1] << 8L) | ((unsigned long)session_id[2] << 16L) | ((unsigned long)session_id[3] << 24L);
 4087|  15.0k|    return l;
 4088|  15.0k|}
ssl_lib.c:dane_ctx_final:
  150|  7.36k|{
  151|  7.36k|    OPENSSL_free(dctx->mdevp);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  152|  7.36k|    dctx->mdevp = NULL;
  153|       |
  154|  7.36k|    OPENSSL_free(dctx->mdord);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  155|       |    dctx->mdord = NULL;
  156|  7.36k|    dctx->mdmax = 0;
  157|  7.36k|}
ssl_lib.c:nss_keylog_int:
 7219|  36.2k|{
 7220|  36.2k|    char *out = NULL;
 7221|  36.2k|    char *cursor = NULL;
 7222|  36.2k|    size_t out_len = 0, i, prefix_len;
 7223|  36.2k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(sc);
  ------------------
  |  |   26|  36.2k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 7224|       |
 7225|       |#ifndef OPENSSL_NO_SSLKEYLOG
 7226|       |    if (sctx->keylog_callback == NULL && sctx->do_sslkeylog == 0)
 7227|       |        return 1;
 7228|       |#else
 7229|  36.2k|    if (sctx->keylog_callback == NULL)
  ------------------
  |  Branch (7229:9): [True: 36.2k, False: 0]
  ------------------
 7230|  36.2k|        return 1;
 7231|      0|#endif
 7232|       |
 7233|       |    /*
 7234|       |     * Our output buffer will contain the following strings, rendered with
 7235|       |     * space characters in between, terminated by a NULL character: first the
 7236|       |     * prefix, then the first parameter, then the second parameter. The
 7237|       |     * meaning of each parameter depends on the specific key material being
 7238|       |     * logged. Note that the first and second parameters are encoded in
 7239|       |     * hexadecimal, so we need a buffer that is twice their lengths.
 7240|       |     */
 7241|      0|    prefix_len = strlen(prefix);
 7242|      0|    out_len = prefix_len + (2 * parameter_1_len) + (2 * parameter_2_len) + 3;
 7243|      0|    if ((out = cursor = OPENSSL_malloc(out_len)) == NULL)
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (7243:9): [True: 0, False: 0]
  ------------------
 7244|      0|        return 0;
 7245|       |
 7246|      0|    memcpy(cursor, prefix, prefix_len);
 7247|      0|    cursor += prefix_len;
 7248|      0|    *cursor++ = ' ';
 7249|       |
 7250|      0|    for (i = 0; i < parameter_1_len; ++i)
  ------------------
  |  Branch (7250:17): [True: 0, False: 0]
  ------------------
 7251|      0|        cursor += ossl_to_lowerhex(cursor, parameter_1[i]);
 7252|      0|    *cursor++ = ' ';
 7253|       |
 7254|      0|    for (i = 0; i < parameter_2_len; ++i)
  ------------------
  |  Branch (7254:17): [True: 0, False: 0]
  ------------------
 7255|      0|        cursor += ossl_to_lowerhex(cursor, parameter_2[i]);
 7256|      0|    *cursor = '\0';
 7257|       |
 7258|       |#ifndef OPENSSL_NO_SSLKEYLOG
 7259|       |    if (sctx->do_sslkeylog == 1)
 7260|       |        do_sslkeylogfile(SSL_CONNECTION_GET_SSL(sc), (const char *)out);
 7261|       |#endif
 7262|      0|    if (sctx->keylog_callback != NULL)
  ------------------
  |  Branch (7262:9): [True: 0, False: 0]
  ------------------
 7263|      0|        sctx->keylog_callback(SSL_CONNECTION_GET_USER_SSL(sc), (const char *)out);
  ------------------
  |  |   28|      0|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 7264|      0|    OPENSSL_clear_free(out, out_len);
  ------------------
  |  |  130|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 7265|      0|    return 1;
 7266|      0|}

TLS_server_method:
 2270|  3.73k|    {                                                                      \
 2271|  3.73k|        static const SSL_METHOD func_name##_data = {                       \
 2272|  3.73k|            version,                                                       \
 2273|  3.73k|            flags,                                                         \
 2274|  3.73k|            mask,                                                          \
 2275|  3.73k|            ossl_ssl_connection_new,                                       \
 2276|  3.73k|            ossl_ssl_connection_free,                                      \
 2277|  3.73k|            ossl_ssl_connection_reset,                                     \
 2278|  3.73k|            tls1_new,                                                      \
 2279|  3.73k|            tls1_clear,                                                    \
 2280|  3.73k|            tls1_free,                                                     \
 2281|  3.73k|            s_accept,                                                      \
 2282|  3.73k|            s_connect,                                                     \
 2283|  3.73k|            ssl3_read,                                                     \
 2284|  3.73k|            ssl3_peek,                                                     \
 2285|  3.73k|            ssl3_write,                                                    \
 2286|  3.73k|            ssl3_shutdown,                                                 \
 2287|  3.73k|            ssl3_renegotiate,                                              \
 2288|  3.73k|            ssl3_renegotiate_check,                                        \
 2289|  3.73k|            ssl3_read_bytes,                                               \
 2290|  3.73k|            ssl3_write_bytes,                                              \
 2291|  3.73k|            ssl3_dispatch_alert,                                           \
 2292|  3.73k|            ssl3_ctrl,                                                     \
 2293|  3.73k|            ssl3_ctx_ctrl,                                                 \
 2294|  3.73k|            ssl3_get_cipher_by_char,                                       \
 2295|  3.73k|            ssl3_put_cipher_by_char,                                       \
 2296|  3.73k|            ssl3_pending,                                                  \
 2297|  3.73k|            ssl3_num_ciphers,                                              \
 2298|  3.73k|            ssl3_get_cipher,                                               \
 2299|  3.73k|            tls1_default_timeout,                                          \
 2300|  3.73k|            &enc_data,                                                     \
 2301|  3.73k|            ssl_undefined_void_function,                                   \
 2302|  3.73k|            ssl3_callback_ctrl,                                            \
 2303|  3.73k|            ssl3_ctx_callback_ctrl,                                        \
 2304|  3.73k|        };                                                                 \
 2305|  3.73k|        return &func_name##_data;                                          \
 2306|  3.73k|    }
tlsv1_3_server_method:
 2270|  7.25k|    {                                                                      \
 2271|  7.25k|        static const SSL_METHOD func_name##_data = {                       \
 2272|  7.25k|            version,                                                       \
 2273|  7.25k|            flags,                                                         \
 2274|  7.25k|            mask,                                                          \
 2275|  7.25k|            ossl_ssl_connection_new,                                       \
 2276|  7.25k|            ossl_ssl_connection_free,                                      \
 2277|  7.25k|            ossl_ssl_connection_reset,                                     \
 2278|  7.25k|            tls1_new,                                                      \
 2279|  7.25k|            tls1_clear,                                                    \
 2280|  7.25k|            tls1_free,                                                     \
 2281|  7.25k|            s_accept,                                                      \
 2282|  7.25k|            s_connect,                                                     \
 2283|  7.25k|            ssl3_read,                                                     \
 2284|  7.25k|            ssl3_peek,                                                     \
 2285|  7.25k|            ssl3_write,                                                    \
 2286|  7.25k|            ssl3_shutdown,                                                 \
 2287|  7.25k|            ssl3_renegotiate,                                              \
 2288|  7.25k|            ssl3_renegotiate_check,                                        \
 2289|  7.25k|            ssl3_read_bytes,                                               \
 2290|  7.25k|            ssl3_write_bytes,                                              \
 2291|  7.25k|            ssl3_dispatch_alert,                                           \
 2292|  7.25k|            ssl3_ctrl,                                                     \
 2293|  7.25k|            ssl3_ctx_ctrl,                                                 \
 2294|  7.25k|            ssl3_get_cipher_by_char,                                       \
 2295|  7.25k|            ssl3_put_cipher_by_char,                                       \
 2296|  7.25k|            ssl3_pending,                                                  \
 2297|  7.25k|            ssl3_num_ciphers,                                              \
 2298|  7.25k|            ssl3_get_cipher,                                               \
 2299|  7.25k|            tls1_default_timeout,                                          \
 2300|  7.25k|            &enc_data,                                                     \
 2301|  7.25k|            ssl_undefined_void_function,                                   \
 2302|  7.25k|            ssl3_callback_ctrl,                                            \
 2303|  7.25k|            ssl3_ctx_callback_ctrl,                                        \
 2304|  7.25k|        };                                                                 \
 2305|  7.25k|        return &func_name##_data;                                          \
 2306|  7.25k|    }
TLS_client_method:
 2270|  3.62k|    {                                                                      \
 2271|  3.62k|        static const SSL_METHOD func_name##_data = {                       \
 2272|  3.62k|            version,                                                       \
 2273|  3.62k|            flags,                                                         \
 2274|  3.62k|            mask,                                                          \
 2275|  3.62k|            ossl_ssl_connection_new,                                       \
 2276|  3.62k|            ossl_ssl_connection_free,                                      \
 2277|  3.62k|            ossl_ssl_connection_reset,                                     \
 2278|  3.62k|            tls1_new,                                                      \
 2279|  3.62k|            tls1_clear,                                                    \
 2280|  3.62k|            tls1_free,                                                     \
 2281|  3.62k|            s_accept,                                                      \
 2282|  3.62k|            s_connect,                                                     \
 2283|  3.62k|            ssl3_read,                                                     \
 2284|  3.62k|            ssl3_peek,                                                     \
 2285|  3.62k|            ssl3_write,                                                    \
 2286|  3.62k|            ssl3_shutdown,                                                 \
 2287|  3.62k|            ssl3_renegotiate,                                              \
 2288|  3.62k|            ssl3_renegotiate_check,                                        \
 2289|  3.62k|            ssl3_read_bytes,                                               \
 2290|  3.62k|            ssl3_write_bytes,                                              \
 2291|  3.62k|            ssl3_dispatch_alert,                                           \
 2292|  3.62k|            ssl3_ctrl,                                                     \
 2293|  3.62k|            ssl3_ctx_ctrl,                                                 \
 2294|  3.62k|            ssl3_get_cipher_by_char,                                       \
 2295|  3.62k|            ssl3_put_cipher_by_char,                                       \
 2296|  3.62k|            ssl3_pending,                                                  \
 2297|  3.62k|            ssl3_num_ciphers,                                              \
 2298|  3.62k|            ssl3_get_cipher,                                               \
 2299|  3.62k|            tls1_default_timeout,                                          \
 2300|  3.62k|            &enc_data,                                                     \
 2301|  3.62k|            ssl_undefined_void_function,                                   \
 2302|  3.62k|            ssl3_callback_ctrl,                                            \
 2303|  3.62k|            ssl3_ctx_callback_ctrl,                                        \
 2304|  3.62k|        };                                                                 \
 2305|  3.62k|        return &func_name##_data;                                          \
 2306|  3.62k|    }
tlsv1_3_client_method:
 2270|  50.8k|    {                                                                      \
 2271|  50.8k|        static const SSL_METHOD func_name##_data = {                       \
 2272|  50.8k|            version,                                                       \
 2273|  50.8k|            flags,                                                         \
 2274|  50.8k|            mask,                                                          \
 2275|  50.8k|            ossl_ssl_connection_new,                                       \
 2276|  50.8k|            ossl_ssl_connection_free,                                      \
 2277|  50.8k|            ossl_ssl_connection_reset,                                     \
 2278|  50.8k|            tls1_new,                                                      \
 2279|  50.8k|            tls1_clear,                                                    \
 2280|  50.8k|            tls1_free,                                                     \
 2281|  50.8k|            s_accept,                                                      \
 2282|  50.8k|            s_connect,                                                     \
 2283|  50.8k|            ssl3_read,                                                     \
 2284|  50.8k|            ssl3_peek,                                                     \
 2285|  50.8k|            ssl3_write,                                                    \
 2286|  50.8k|            ssl3_shutdown,                                                 \
 2287|  50.8k|            ssl3_renegotiate,                                              \
 2288|  50.8k|            ssl3_renegotiate_check,                                        \
 2289|  50.8k|            ssl3_read_bytes,                                               \
 2290|  50.8k|            ssl3_write_bytes,                                              \
 2291|  50.8k|            ssl3_dispatch_alert,                                           \
 2292|  50.8k|            ssl3_ctrl,                                                     \
 2293|  50.8k|            ssl3_ctx_ctrl,                                                 \
 2294|  50.8k|            ssl3_get_cipher_by_char,                                       \
 2295|  50.8k|            ssl3_put_cipher_by_char,                                       \
 2296|  50.8k|            ssl3_pending,                                                  \
 2297|  50.8k|            ssl3_num_ciphers,                                              \
 2298|  50.8k|            ssl3_get_cipher,                                               \
 2299|  50.8k|            tls1_default_timeout,                                          \
 2300|  50.8k|            &enc_data,                                                     \
 2301|  50.8k|            ssl_undefined_void_function,                                   \
 2302|  50.8k|            ssl3_callback_ctrl,                                            \
 2303|  50.8k|            ssl3_ctx_callback_ctrl,                                        \
 2304|  50.8k|        };                                                                 \
 2305|  50.8k|        return &func_name##_data;                                          \
 2306|  50.8k|    }
tlsv1_2_client_method:
 2270|  47.1k|    {                                                                      \
 2271|  47.1k|        static const SSL_METHOD func_name##_data = {                       \
 2272|  47.1k|            version,                                                       \
 2273|  47.1k|            flags,                                                         \
 2274|  47.1k|            mask,                                                          \
 2275|  47.1k|            ossl_ssl_connection_new,                                       \
 2276|  47.1k|            ossl_ssl_connection_free,                                      \
 2277|  47.1k|            ossl_ssl_connection_reset,                                     \
 2278|  47.1k|            tls1_new,                                                      \
 2279|  47.1k|            tls1_clear,                                                    \
 2280|  47.1k|            tls1_free,                                                     \
 2281|  47.1k|            s_accept,                                                      \
 2282|  47.1k|            s_connect,                                                     \
 2283|  47.1k|            ssl3_read,                                                     \
 2284|  47.1k|            ssl3_peek,                                                     \
 2285|  47.1k|            ssl3_write,                                                    \
 2286|  47.1k|            ssl3_shutdown,                                                 \
 2287|  47.1k|            ssl3_renegotiate,                                              \
 2288|  47.1k|            ssl3_renegotiate_check,                                        \
 2289|  47.1k|            ssl3_read_bytes,                                               \
 2290|  47.1k|            ssl3_write_bytes,                                              \
 2291|  47.1k|            ssl3_dispatch_alert,                                           \
 2292|  47.1k|            ssl3_ctrl,                                                     \
 2293|  47.1k|            ssl3_ctx_ctrl,                                                 \
 2294|  47.1k|            ssl3_get_cipher_by_char,                                       \
 2295|  47.1k|            ssl3_put_cipher_by_char,                                       \
 2296|  47.1k|            ssl3_pending,                                                  \
 2297|  47.1k|            ssl3_num_ciphers,                                              \
 2298|  47.1k|            ssl3_get_cipher,                                               \
 2299|  47.1k|            tls1_default_timeout,                                          \
 2300|  47.1k|            &enc_data,                                                     \
 2301|  47.1k|            ssl_undefined_void_function,                                   \
 2302|  47.1k|            ssl3_callback_ctrl,                                            \
 2303|  47.1k|            ssl3_ctx_callback_ctrl,                                        \
 2304|  47.1k|        };                                                                 \
 2305|  47.1k|        return &func_name##_data;                                          \
 2306|  47.1k|    }
tlsv1_1_client_method:
 2270|  47.1k|    {                                                                      \
 2271|  47.1k|        static const SSL_METHOD func_name##_data = {                       \
 2272|  47.1k|            version,                                                       \
 2273|  47.1k|            flags,                                                         \
 2274|  47.1k|            mask,                                                          \
 2275|  47.1k|            ossl_ssl_connection_new,                                       \
 2276|  47.1k|            ossl_ssl_connection_free,                                      \
 2277|  47.1k|            ossl_ssl_connection_reset,                                     \
 2278|  47.1k|            tls1_new,                                                      \
 2279|  47.1k|            tls1_clear,                                                    \
 2280|  47.1k|            tls1_free,                                                     \
 2281|  47.1k|            s_accept,                                                      \
 2282|  47.1k|            s_connect,                                                     \
 2283|  47.1k|            ssl3_read,                                                     \
 2284|  47.1k|            ssl3_peek,                                                     \
 2285|  47.1k|            ssl3_write,                                                    \
 2286|  47.1k|            ssl3_shutdown,                                                 \
 2287|  47.1k|            ssl3_renegotiate,                                              \
 2288|  47.1k|            ssl3_renegotiate_check,                                        \
 2289|  47.1k|            ssl3_read_bytes,                                               \
 2290|  47.1k|            ssl3_write_bytes,                                              \
 2291|  47.1k|            ssl3_dispatch_alert,                                           \
 2292|  47.1k|            ssl3_ctrl,                                                     \
 2293|  47.1k|            ssl3_ctx_ctrl,                                                 \
 2294|  47.1k|            ssl3_get_cipher_by_char,                                       \
 2295|  47.1k|            ssl3_put_cipher_by_char,                                       \
 2296|  47.1k|            ssl3_pending,                                                  \
 2297|  47.1k|            ssl3_num_ciphers,                                              \
 2298|  47.1k|            ssl3_get_cipher,                                               \
 2299|  47.1k|            tls1_default_timeout,                                          \
 2300|  47.1k|            &enc_data,                                                     \
 2301|  47.1k|            ssl_undefined_void_function,                                   \
 2302|  47.1k|            ssl3_callback_ctrl,                                            \
 2303|  47.1k|            ssl3_ctx_callback_ctrl,                                        \
 2304|  47.1k|        };                                                                 \
 2305|  47.1k|        return &func_name##_data;                                          \
 2306|  47.1k|    }
tlsv1_client_method:
 2270|  47.1k|    {                                                                      \
 2271|  47.1k|        static const SSL_METHOD func_name##_data = {                       \
 2272|  47.1k|            version,                                                       \
 2273|  47.1k|            flags,                                                         \
 2274|  47.1k|            mask,                                                          \
 2275|  47.1k|            ossl_ssl_connection_new,                                       \
 2276|  47.1k|            ossl_ssl_connection_free,                                      \
 2277|  47.1k|            ossl_ssl_connection_reset,                                     \
 2278|  47.1k|            tls1_new,                                                      \
 2279|  47.1k|            tls1_clear,                                                    \
 2280|  47.1k|            tls1_free,                                                     \
 2281|  47.1k|            s_accept,                                                      \
 2282|  47.1k|            s_connect,                                                     \
 2283|  47.1k|            ssl3_read,                                                     \
 2284|  47.1k|            ssl3_peek,                                                     \
 2285|  47.1k|            ssl3_write,                                                    \
 2286|  47.1k|            ssl3_shutdown,                                                 \
 2287|  47.1k|            ssl3_renegotiate,                                              \
 2288|  47.1k|            ssl3_renegotiate_check,                                        \
 2289|  47.1k|            ssl3_read_bytes,                                               \
 2290|  47.1k|            ssl3_write_bytes,                                              \
 2291|  47.1k|            ssl3_dispatch_alert,                                           \
 2292|  47.1k|            ssl3_ctrl,                                                     \
 2293|  47.1k|            ssl3_ctx_ctrl,                                                 \
 2294|  47.1k|            ssl3_get_cipher_by_char,                                       \
 2295|  47.1k|            ssl3_put_cipher_by_char,                                       \
 2296|  47.1k|            ssl3_pending,                                                  \
 2297|  47.1k|            ssl3_num_ciphers,                                              \
 2298|  47.1k|            ssl3_get_cipher,                                               \
 2299|  47.1k|            tls1_default_timeout,                                          \
 2300|  47.1k|            &enc_data,                                                     \
 2301|  47.1k|            ssl_undefined_void_function,                                   \
 2302|  47.1k|            ssl3_callback_ctrl,                                            \
 2303|  47.1k|            ssl3_ctx_callback_ctrl,                                        \
 2304|  47.1k|        };                                                                 \
 2305|  47.1k|        return &func_name##_data;                                          \
 2306|  47.1k|    }
ssl_lib.c:ssl_tsan_lock:
 2929|  14.3k|{
 2930|       |#ifdef TSAN_REQUIRES_LOCKING
 2931|       |    if (!CRYPTO_THREAD_write_lock(ctx->tsan_lock))
 2932|       |        return 0;
 2933|       |#endif
 2934|  14.3k|    return 1;
 2935|  14.3k|}
ssl_lib.c:ssl_tsan_unlock:
 2938|  14.3k|{
 2939|       |#ifdef TSAN_REQUIRES_LOCKING
 2940|       |    CRYPTO_THREAD_unlock(ctx->tsan_lock);
 2941|       |#endif
 2942|  14.3k|}
t1_lib.c:ssl_has_cert:
 2388|  14.5k|{
 2389|  14.5k|    if (idx < 0 || idx >= (int)s->ssl_pkey_num)
  ------------------
  |  Branch (2389:9): [True: 0, False: 14.5k]
  |  Branch (2389:20): [True: 0, False: 14.5k]
  ------------------
 2390|      0|        return 0;
 2391|       |
 2392|       |    /* If RPK is enabled for this SSL... only require private key */
 2393|  14.5k|    if (ssl_has_cert_type(s, TLSEXT_cert_type_rpk))
  ------------------
  |  |  250|  14.5k|#define TLSEXT_cert_type_rpk 2
  ------------------
  |  Branch (2393:9): [True: 0, False: 14.5k]
  ------------------
 2394|      0|        return s->cert->pkeys[idx].privatekey != NULL;
 2395|       |
 2396|  14.5k|    return s->cert->pkeys[idx].x509 != NULL
  ------------------
  |  Branch (2396:12): [True: 3.62k, False: 10.8k]
  ------------------
 2397|  3.62k|        && s->cert->pkeys[idx].privatekey != NULL;
  ------------------
  |  Branch (2397:12): [True: 3.62k, False: 0]
  ------------------
 2398|  14.5k|}
t1_lib.c:ssl_has_cert_type:
 2368|  14.5k|{
 2369|  14.5k|    unsigned char *ptr;
 2370|  14.5k|    size_t len;
 2371|       |
 2372|  14.5k|    if (sc->server) {
  ------------------
  |  Branch (2372:9): [True: 14.5k, False: 0]
  ------------------
 2373|  14.5k|        ptr = sc->server_cert_type;
 2374|  14.5k|        len = sc->server_cert_type_len;
 2375|  14.5k|    } else {
 2376|      0|        ptr = sc->client_cert_type;
 2377|      0|        len = sc->client_cert_type_len;
 2378|      0|    }
 2379|       |
 2380|  14.5k|    if (ptr == NULL)
  ------------------
  |  Branch (2380:9): [True: 14.5k, False: 0]
  ------------------
 2381|  14.5k|        return 0;
 2382|       |
 2383|      0|    return memchr(ptr, ct, len) != NULL;
 2384|  14.5k|}
extensions_srvr.c:tls1_get_peer_groups:
 2403|  3.62k|{
 2404|  3.62k|    *pgroups = s->ext.peer_supportedgroups;
 2405|  3.62k|    *pgroupslen = s->ext.peer_supportedgroups_len;
 2406|  3.62k|}
statem_lib.c:ssl_tsan_counter:
 2946|  14.4k|{
 2947|  14.4k|    if (ssl_tsan_lock(ctx)) {
  ------------------
  |  Branch (2947:9): [True: 14.4k, False: 0]
  ------------------
 2948|       |        tsan_counter(stat);
  ------------------
  |  |  167|  14.4k|#define tsan_counter(ptr) tsan_add((ptr), 1)
  |  |  ------------------
  |  |  |  |   63|  14.4k|#define tsan_add(ptr, n) atomic_fetch_add_explicit((ptr), (n), memory_order_relaxed)
  |  |  ------------------
  ------------------
 2949|  14.4k|        ssl_tsan_unlock(ctx);
 2950|  14.4k|    }
 2951|  14.4k|}
statem_lib.c:ssl_tsan_lock:
 2929|  14.4k|{
 2930|       |#ifdef TSAN_REQUIRES_LOCKING
 2931|       |    if (!CRYPTO_THREAD_write_lock(ctx->tsan_lock))
 2932|       |        return 0;
 2933|       |#endif
 2934|  14.4k|    return 1;
 2935|  14.4k|}
statem_lib.c:ssl_tsan_unlock:
 2938|  14.4k|{
 2939|       |#ifdef TSAN_REQUIRES_LOCKING
 2940|       |    CRYPTO_THREAD_unlock(ctx->tsan_lock);
 2941|       |#endif
 2942|  14.4k|}
statem_lib.c:ssl_has_cert:
 2388|  10.8k|{
 2389|  10.8k|    if (idx < 0 || idx >= (int)s->ssl_pkey_num)
  ------------------
  |  Branch (2389:9): [True: 0, False: 10.8k]
  |  Branch (2389:20): [True: 0, False: 10.8k]
  ------------------
 2390|      0|        return 0;
 2391|       |
 2392|       |    /* If RPK is enabled for this SSL... only require private key */
 2393|  10.8k|    if (ssl_has_cert_type(s, TLSEXT_cert_type_rpk))
  ------------------
  |  |  250|  10.8k|#define TLSEXT_cert_type_rpk 2
  ------------------
  |  Branch (2393:9): [True: 0, False: 10.8k]
  ------------------
 2394|      0|        return s->cert->pkeys[idx].privatekey != NULL;
 2395|       |
 2396|  10.8k|    return s->cert->pkeys[idx].x509 != NULL
  ------------------
  |  Branch (2396:12): [True: 3.62k, False: 7.25k]
  ------------------
 2397|  3.62k|        && s->cert->pkeys[idx].privatekey != NULL;
  ------------------
  |  Branch (2397:12): [True: 3.62k, False: 0]
  ------------------
 2398|  10.8k|}
statem_lib.c:ssl_has_cert_type:
 2368|  10.8k|{
 2369|  10.8k|    unsigned char *ptr;
 2370|  10.8k|    size_t len;
 2371|       |
 2372|  10.8k|    if (sc->server) {
  ------------------
  |  Branch (2372:9): [True: 10.8k, False: 0]
  ------------------
 2373|  10.8k|        ptr = sc->server_cert_type;
 2374|  10.8k|        len = sc->server_cert_type_len;
 2375|  10.8k|    } else {
 2376|      0|        ptr = sc->client_cert_type;
 2377|      0|        len = sc->client_cert_type_len;
 2378|      0|    }
 2379|       |
 2380|  10.8k|    if (ptr == NULL)
  ------------------
  |  Branch (2380:9): [True: 10.8k, False: 0]
  ------------------
 2381|  10.8k|        return 0;
 2382|       |
 2383|      0|    return memchr(ptr, ct, len) != NULL;
 2384|  10.8k|}

ssl_ctx_system_config:
  130|  7.36k|{
  131|  7.36k|    return ssl_do_config(NULL, ctx, NULL, 1);
  132|  7.36k|}
ssl_mcnf.c:ssl_do_config:
   37|  7.36k|{
   38|  7.36k|    SSL_CONF_CTX *cctx = NULL;
   39|  7.36k|    size_t i, idx, cmd_count;
   40|  7.36k|    int err = 1;
   41|  7.36k|    unsigned int flags;
   42|  7.36k|    unsigned int conf_diagnostics = 0;
   43|  7.36k|    const SSL_METHOD *meth;
   44|  7.36k|    const SSL_CONF_CMD *cmds;
   45|  7.36k|    OSSL_LIB_CTX *libctx = NULL, *prev_libctx = NULL;
   46|  7.36k|    CONF_IMODULE *imod = NULL;
   47|       |
   48|  7.36k|    if (s == NULL && ctx == NULL) {
  ------------------
  |  Branch (48:9): [True: 7.36k, False: 0]
  |  Branch (48:22): [True: 0, False: 7.36k]
  ------------------
   49|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   50|      0|        goto err;
   51|      0|    }
   52|  7.36k|    if (name == NULL && system)
  ------------------
  |  Branch (52:9): [True: 7.36k, False: 0]
  |  Branch (52:25): [True: 7.36k, False: 0]
  ------------------
   53|  7.36k|        name = "system_default";
   54|       |
   55|  7.36k|    if (name == NULL) {
  ------------------
  |  Branch (55:9): [True: 0, False: 7.36k]
  ------------------
   56|      0|        ERR_raise_data(ERR_LIB_SSL, SSL_R_INVALID_CONFIGURATION_NAME,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, SSL_R_INVALID_CONFIGURATION_NAME,
  ------------------
  |  |   70|      0|#define ERR_LIB_SSL 20
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, SSL_R_INVALID_CONFIGURATION_NAME,
  ------------------
  |  |  151|      0|#define SSL_R_INVALID_CONFIGURATION_NAME 113
  ------------------
   57|      0|            "name not specified (name == NULL)");
   58|      0|        goto err;
   59|      0|    }
   60|       |
   61|  7.36k|    libctx = s != NULL ? s->ctx->libctx : ctx->libctx;
  ------------------
  |  Branch (61:14): [True: 0, False: 7.36k]
  ------------------
   62|  7.36k|    imod = ssl_do_lookup_module(libctx);
   63|  7.36k|    if (!conf_ssl_name_find(imod, name, &idx)) {
  ------------------
  |  Branch (63:9): [True: 7.36k, False: 0]
  ------------------
   64|  7.36k|        if (!system)
  ------------------
  |  Branch (64:13): [True: 0, False: 7.36k]
  ------------------
   65|      0|            ERR_raise_data(ERR_LIB_SSL, SSL_R_INVALID_CONFIGURATION_NAME,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_SSL, SSL_R_INVALID_CONFIGURATION_NAME,
  ------------------
  |  |   70|      0|#define ERR_LIB_SSL 20
  ------------------
                          ERR_raise_data(ERR_LIB_SSL, SSL_R_INVALID_CONFIGURATION_NAME,
  ------------------
  |  |  151|      0|#define SSL_R_INVALID_CONFIGURATION_NAME 113
  ------------------
   66|      0|                "name=%s", name);
   67|  7.36k|        goto err;
   68|  7.36k|    }
   69|       |
   70|      0|    cmds = conf_ssl_get(imod, idx, &name, &cmd_count);
   71|      0|    flags = SSL_CONF_FLAG_FILE;
  ------------------
  |  |  626|      0|#define SSL_CONF_FLAG_FILE 0x2
  ------------------
   72|      0|    if (!system)
  ------------------
  |  Branch (72:9): [True: 0, False: 0]
  ------------------
   73|      0|        flags |= SSL_CONF_FLAG_CERTIFICATE | SSL_CONF_FLAG_REQUIRE_PRIVATE;
  ------------------
  |  |  630|      0|#define SSL_CONF_FLAG_CERTIFICATE 0x20
  ------------------
                      flags |= SSL_CONF_FLAG_CERTIFICATE | SSL_CONF_FLAG_REQUIRE_PRIVATE;
  ------------------
  |  |  631|      0|#define SSL_CONF_FLAG_REQUIRE_PRIVATE 0x40
  ------------------
   74|       |
   75|      0|    cctx = SSL_CONF_CTX_new();
   76|      0|    if (cctx == NULL) {
  ------------------
  |  Branch (76:9): [True: 0, False: 0]
  ------------------
   77|       |        /* this is a fatal error, always report */
   78|      0|        system = 0;
   79|      0|        goto err;
   80|      0|    }
   81|       |
   82|      0|    if (s != NULL) {
  ------------------
  |  Branch (82:9): [True: 0, False: 0]
  ------------------
   83|      0|        meth = s->method;
   84|      0|        SSL_CONF_CTX_set_ssl(cctx, s);
   85|      0|        libctx = s->ctx->libctx;
   86|      0|    } else {
   87|      0|        meth = ctx->method;
   88|      0|        SSL_CONF_CTX_set_ssl_ctx(cctx, ctx);
   89|      0|        libctx = ctx->libctx;
   90|      0|    }
   91|       |
   92|      0|    conf_diagnostics = OSSL_LIB_CTX_get_conf_diagnostics(libctx);
   93|      0|    if (conf_diagnostics)
  ------------------
  |  Branch (93:9): [True: 0, False: 0]
  ------------------
   94|      0|        flags |= SSL_CONF_FLAG_SHOW_ERRORS;
  ------------------
  |  |  629|      0|#define SSL_CONF_FLAG_SHOW_ERRORS 0x10
  ------------------
   95|      0|    if (meth->ssl_accept != ssl_undefined_function)
  ------------------
  |  Branch (95:9): [True: 0, False: 0]
  ------------------
   96|      0|        flags |= SSL_CONF_FLAG_SERVER;
  ------------------
  |  |  628|      0|#define SSL_CONF_FLAG_SERVER 0x8
  ------------------
   97|      0|    if (meth->ssl_connect != ssl_undefined_function)
  ------------------
  |  Branch (97:9): [True: 0, False: 0]
  ------------------
   98|      0|        flags |= SSL_CONF_FLAG_CLIENT;
  ------------------
  |  |  627|      0|#define SSL_CONF_FLAG_CLIENT 0x4
  ------------------
   99|      0|    SSL_CONF_CTX_set_flags(cctx, flags);
  100|      0|    prev_libctx = OSSL_LIB_CTX_set0_default(libctx);
  101|      0|    err = 0;
  102|      0|    for (i = 0; i < cmd_count; i++) {
  ------------------
  |  Branch (102:17): [True: 0, False: 0]
  ------------------
  103|      0|        char *cmdstr, *arg;
  104|      0|        int rv;
  105|       |
  106|      0|        conf_ssl_get_cmd(cmds, i, &cmdstr, &arg);
  107|      0|        rv = SSL_CONF_cmd(cctx, cmdstr, arg);
  108|      0|        if (rv <= 0)
  ------------------
  |  Branch (108:13): [True: 0, False: 0]
  ------------------
  109|      0|            ++err;
  110|      0|    }
  111|      0|    if (!SSL_CONF_CTX_finish(cctx))
  ------------------
  |  Branch (111:9): [True: 0, False: 0]
  ------------------
  112|      0|        ++err;
  113|  7.36k|err:
  114|  7.36k|    OSSL_LIB_CTX_set0_default(prev_libctx);
  115|  7.36k|    SSL_CONF_CTX_free(cctx);
  116|  7.36k|    return err == 0 || (system && !conf_diagnostics);
  ------------------
  |  Branch (116:12): [True: 0, False: 7.36k]
  |  Branch (116:25): [True: 7.36k, False: 0]
  |  Branch (116:35): [True: 7.36k, False: 0]
  ------------------
  117|      0|}
ssl_mcnf.c:ssl_do_lookup_module:
   26|  7.36k|{
   27|  7.36k|    CONF_IMODULE *m = OSSL_LIB_CTX_get_data(libctx, OSSL_LIB_CTX_SSL_CONF_IMODULE);
  ------------------
  |  |  120|  7.36k|#define OSSL_LIB_CTX_SSL_CONF_IMODULE 23
  ------------------
   28|       |
   29|  7.36k|    if (m != NULL)
  ------------------
  |  Branch (29:9): [True: 0, False: 7.36k]
  ------------------
   30|      0|        return m;
   31|       |
   32|  7.36k|    libctx = OSSL_LIB_CTX_get0_global_default();
   33|  7.36k|    return OSSL_LIB_CTX_get_data(libctx, OSSL_LIB_CTX_SSL_CONF_IMODULE);
  ------------------
  |  |  120|  7.36k|#define OSSL_LIB_CTX_SSL_CONF_IMODULE 23
  ------------------
   34|  7.36k|}

SSL_CTX_use_certificate:
  243|  3.73k|{
  244|  3.73k|    int rv;
  245|  3.73k|    if (x == NULL) {
  ------------------
  |  Branch (245:9): [True: 0, False: 3.73k]
  ------------------
  246|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  247|      0|        return 0;
  248|      0|    }
  249|       |
  250|  3.73k|    rv = ssl_security_cert(NULL, ctx, x, 1);
  251|  3.73k|    if (rv != 1) {
  ------------------
  |  Branch (251:9): [True: 0, False: 3.73k]
  ------------------
  252|      0|        ERR_raise(ERR_LIB_SSL, rv);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  253|      0|        return 0;
  254|      0|    }
  255|  3.73k|    return ssl_set_cert(ctx->cert, x, ctx);
  256|  3.73k|}
SSL_CTX_use_PrivateKey:
  385|  3.73k|{
  386|  3.73k|    if (pkey == NULL) {
  ------------------
  |  Branch (386:9): [True: 0, False: 3.73k]
  ------------------
  387|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  388|      0|        return 0;
  389|      0|    }
  390|  3.73k|    return ssl_set_pkey(ctx->cert, pkey, ctx);
  391|  3.73k|}
ssl_rsa.c:ssl_set_pkey:
  134|  3.73k|{
  135|  3.73k|    size_t i;
  136|       |
  137|  3.73k|    if (ssl_cert_lookup_by_pkey(pkey, &i, ctx) == NULL) {
  ------------------
  |  Branch (137:9): [True: 0, False: 3.73k]
  ------------------
  138|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_UNKNOWN_CERTIFICATE_TYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  139|      0|        return 0;
  140|      0|    }
  141|       |
  142|  3.73k|    if (c->pkeys[i].x509 != NULL
  ------------------
  |  Branch (142:9): [True: 3.73k, False: 0]
  ------------------
  143|  3.73k|        && !X509_check_private_key(c->pkeys[i].x509, pkey))
  ------------------
  |  Branch (143:12): [True: 0, False: 3.73k]
  ------------------
  144|      0|        return 0;
  145|  3.73k|    if (!EVP_PKEY_up_ref(pkey))
  ------------------
  |  Branch (145:9): [True: 0, False: 3.73k]
  ------------------
  146|      0|        return 0;
  147|       |
  148|  3.73k|    EVP_PKEY_free(c->pkeys[i].privatekey);
  149|  3.73k|    c->pkeys[i].privatekey = pkey;
  150|  3.73k|    c->key = &c->pkeys[i];
  151|  3.73k|    return 1;
  152|  3.73k|}
ssl_rsa.c:ssl_set_cert:
  259|  3.73k|{
  260|  3.73k|    EVP_PKEY *pkey;
  261|  3.73k|    size_t i;
  262|       |
  263|  3.73k|    pkey = X509_get0_pubkey(x);
  264|  3.73k|    if (pkey == NULL) {
  ------------------
  |  Branch (264:9): [True: 0, False: 3.73k]
  ------------------
  265|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  266|      0|        return 0;
  267|      0|    }
  268|       |
  269|  3.73k|    if (ssl_cert_lookup_by_pkey(pkey, &i, ctx) == NULL) {
  ------------------
  |  Branch (269:9): [True: 0, False: 3.73k]
  ------------------
  270|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_UNKNOWN_CERTIFICATE_TYPE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  271|      0|        return 0;
  272|      0|    }
  273|       |
  274|  3.73k|    if (i == SSL_PKEY_ECC && !EVP_PKEY_can_sign(pkey)) {
  ------------------
  |  |  330|  7.46k|#define SSL_PKEY_ECC 3
  ------------------
  |  Branch (274:9): [True: 3.73k, False: 0]
  |  Branch (274:30): [True: 0, False: 3.73k]
  ------------------
  275|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_ECC_CERT_NOT_FOR_SIGNING);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  276|      0|        return 0;
  277|      0|    }
  278|       |
  279|  3.73k|    if (c->pkeys[i].privatekey != NULL) {
  ------------------
  |  Branch (279:9): [True: 0, False: 3.73k]
  ------------------
  280|       |        /*
  281|       |         * The return code from EVP_PKEY_copy_parameters is deliberately
  282|       |         * ignored. Some EVP_PKEY types cannot do this.
  283|       |         * coverity[check_return]
  284|       |         */
  285|      0|        EVP_PKEY_copy_parameters(pkey, c->pkeys[i].privatekey);
  286|      0|        ERR_clear_error();
  287|       |
  288|      0|        if (!X509_check_private_key(x, c->pkeys[i].privatekey)) {
  ------------------
  |  Branch (288:13): [True: 0, False: 0]
  ------------------
  289|       |            /*
  290|       |             * don't fail for a cert/key mismatch, just free current private
  291|       |             * key (when switching to a different cert & key, first this
  292|       |             * function should be used, then ssl_set_pkey
  293|       |             */
  294|      0|            EVP_PKEY_free(c->pkeys[i].privatekey);
  295|      0|            c->pkeys[i].privatekey = NULL;
  296|       |            /* clear error queue */
  297|      0|            ERR_clear_error();
  298|      0|        }
  299|      0|    }
  300|       |
  301|  3.73k|    if (!X509_up_ref(x))
  ------------------
  |  Branch (301:9): [True: 0, False: 3.73k]
  ------------------
  302|      0|        return 0;
  303|       |
  304|  3.73k|    X509_free(c->pkeys[i].x509);
  305|  3.73k|    c->pkeys[i].x509 = x;
  306|  3.73k|    c->key = &(c->pkeys[i]);
  307|       |
  308|  3.73k|    return 1;
  309|  3.73k|}

ssl_session_calculate_timeout:
   48|  43.1k|{
   49|  43.1k|    ss->calc_timeout = ossl_time_add(ss->time, ss->timeout);
   50|  43.1k|}
SSL_SESSION_new:
  102|  14.4k|{
  103|  14.4k|    SSL_SESSION *ss;
  104|       |
  105|  14.4k|    if (!OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL))
  ------------------
  |  | 2818|  14.4k|#define OPENSSL_INIT_LOAD_SSL_STRINGS 0x00200000L
  ------------------
  |  Branch (105:9): [True: 0, False: 14.4k]
  ------------------
  106|      0|        return NULL;
  107|       |
  108|  14.4k|    ss = OPENSSL_zalloc(sizeof(*ss));
  ------------------
  |  |  109|  14.4k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  109|  14.4k|    if (ss == NULL)
  ------------------
  |  Branch (109:9): [True: 0, False: 14.4k]
  ------------------
  110|      0|        return NULL;
  111|       |
  112|  14.4k|    ss->ext.max_fragment_len_mode = TLSEXT_max_fragment_length_UNSPECIFIED;
  ------------------
  |  |  242|  14.4k|#define TLSEXT_max_fragment_length_UNSPECIFIED 255
  ------------------
  113|  14.4k|    ss->verify_result = 1; /* avoid 0 (= X509_V_OK) just in case */
  114|       |    /* 5 minute timeout by default */
  115|  14.4k|    ss->timeout = ossl_seconds2time(60 * 5 + 4);
  ------------------
  |  |   42|  14.4k|#define ossl_seconds2time(s) ossl_ticks2time((s) * OSSL_TIME_SECOND)
  |  |  ------------------
  |  |  |  |   31|  14.4k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  ------------------
  ------------------
  116|  14.4k|    ss->time = ossl_time_now();
  117|  14.4k|    ssl_session_calculate_timeout(ss);
  118|  14.4k|    if (!CRYPTO_NEW_REF(&ss->references, 1)) {
  ------------------
  |  Branch (118:9): [True: 0, False: 14.4k]
  ------------------
  119|      0|        OPENSSL_free(ss);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  120|      0|        return NULL;
  121|      0|    }
  122|       |
  123|  14.4k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_SESSION, ss, &ss->ex_data)) {
  ------------------
  |  |  253|  14.4k|#define CRYPTO_EX_INDEX_SSL_SESSION 2
  ------------------
  |  Branch (123:9): [True: 0, False: 14.4k]
  ------------------
  124|      0|        CRYPTO_FREE_REF(&ss->references);
  125|      0|        OPENSSL_free(ss);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  126|      0|        return NULL;
  127|      0|    }
  128|  14.4k|    return ss;
  129|  14.4k|}
ssl_session_dup:
  279|  10.7k|{
  280|  10.7k|    SSL_SESSION *sess = ssl_session_dup_intern(src, ticket);
  281|       |
  282|  10.7k|    if (sess != NULL)
  ------------------
  |  Branch (282:9): [True: 10.7k, False: 0]
  ------------------
  283|  10.7k|        sess->not_resumable = 0;
  284|       |
  285|  10.7k|    return sess;
  286|  10.7k|}
ssl_generate_session_id:
  348|  7.16k|{
  349|  7.16k|    unsigned int tmp;
  350|  7.16k|    GEN_SESSION_CB cb = def_generate_session_id;
  351|  7.16k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  352|       |
  353|  7.16k|    switch (s->version) {
  354|      0|    case TLS1_VERSION:
  ------------------
  |  |   24|      0|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (354:5): [True: 0, False: 7.16k]
  ------------------
  355|      0|    case TLS1_1_VERSION:
  ------------------
  |  |   25|      0|#define TLS1_1_VERSION 0x0302
  ------------------
  |  Branch (355:5): [True: 0, False: 7.16k]
  ------------------
  356|      0|    case TLS1_2_VERSION:
  ------------------
  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (356:5): [True: 0, False: 7.16k]
  ------------------
  357|  7.16k|    case TLS1_3_VERSION:
  ------------------
  |  |   27|  7.16k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (357:5): [True: 7.16k, False: 0]
  ------------------
  358|  7.16k|    case DTLS1_BAD_VER:
  ------------------
  |  |   30|  7.16k|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (358:5): [True: 0, False: 7.16k]
  ------------------
  359|  7.16k|    case DTLS1_VERSION:
  ------------------
  |  |   28|  7.16k|#define DTLS1_VERSION 0xFEFF
  ------------------
  |  Branch (359:5): [True: 0, False: 7.16k]
  ------------------
  360|  7.16k|    case DTLS1_2_VERSION:
  ------------------
  |  |   29|  7.16k|#define DTLS1_2_VERSION 0xFEFD
  ------------------
  |  Branch (360:5): [True: 0, False: 7.16k]
  ------------------
  361|  7.16k|        ss->session_id_length = SSL3_SSL_SESSION_ID_LENGTH;
  ------------------
  |  |  133|  7.16k|#define SSL3_SSL_SESSION_ID_LENGTH 32
  ------------------
  362|  7.16k|        break;
  363|      0|    default:
  ------------------
  |  Branch (363:5): [True: 0, False: 7.16k]
  ------------------
  364|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_UNSUPPORTED_SSL_VERSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  365|      0|        return 0;
  366|  7.16k|    }
  367|       |
  368|       |    /*-
  369|       |     * If RFC5077 ticket, use empty session ID (as server).
  370|       |     * Note that:
  371|       |     * (a) ssl_get_prev_session() does lookahead into the
  372|       |     *     ClientHello extensions to find the session ticket.
  373|       |     *     When ssl_get_prev_session() fails, statem_srvr.c calls
  374|       |     *     ssl_get_new_session() in tls_process_client_hello().
  375|       |     *     At that point, it has not yet parsed the extensions,
  376|       |     *     however, because of the lookahead, it already knows
  377|       |     *     whether a ticket is expected or not.
  378|       |     *
  379|       |     * (b) statem_clnt.c calls ssl_get_new_session() before parsing
  380|       |     *     ServerHello extensions, and before recording the session
  381|       |     *     ID received from the server, so this block is a noop.
  382|       |     */
  383|  7.16k|    if (s->ext.ticket_expected) {
  ------------------
  |  Branch (383:9): [True: 0, False: 7.16k]
  ------------------
  384|      0|        ss->session_id_length = 0;
  385|      0|        return 1;
  386|      0|    }
  387|       |
  388|       |    /* Choose which callback will set the session ID */
  389|  7.16k|    if (!CRYPTO_THREAD_read_lock(SSL_CONNECTION_GET_SSL(s)->lock))
  ------------------
  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  |  Branch (389:9): [True: 0, False: 7.16k]
  ------------------
  390|      0|        return 0;
  391|  7.16k|    if (!CRYPTO_THREAD_read_lock(s->session_ctx->lock)) {
  ------------------
  |  Branch (391:9): [True: 0, False: 7.16k]
  ------------------
  392|      0|        CRYPTO_THREAD_unlock(ssl->lock);
  393|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  394|      0|            SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED);
  395|      0|        return 0;
  396|      0|    }
  397|  7.16k|    if (s->generate_session_id)
  ------------------
  |  Branch (397:9): [True: 0, False: 7.16k]
  ------------------
  398|      0|        cb = s->generate_session_id;
  399|  7.16k|    else if (s->session_ctx->generate_session_id)
  ------------------
  |  Branch (399:14): [True: 0, False: 7.16k]
  ------------------
  400|      0|        cb = s->session_ctx->generate_session_id;
  401|  7.16k|    CRYPTO_THREAD_unlock(s->session_ctx->lock);
  402|  7.16k|    CRYPTO_THREAD_unlock(ssl->lock);
  403|       |    /* Choose a session ID */
  404|  7.16k|    memset(ss->session_id, 0, ss->session_id_length);
  405|  7.16k|    tmp = (int)ss->session_id_length;
  406|  7.16k|    if (!cb(ssl, ss->session_id, &tmp)) {
  ------------------
  |  Branch (406:9): [True: 0, False: 7.16k]
  ------------------
  407|       |        /* The callback failed */
  408|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  409|      0|            SSL_R_SSL_SESSION_ID_CALLBACK_FAILED);
  410|      0|        return 0;
  411|      0|    }
  412|       |    /*
  413|       |     * Don't allow the callback to set the session length to zero. nor
  414|       |     * set it higher than it was.
  415|       |     */
  416|  7.16k|    if (tmp == 0 || tmp > ss->session_id_length) {
  ------------------
  |  Branch (416:9): [True: 0, False: 7.16k]
  |  Branch (416:21): [True: 0, False: 7.16k]
  ------------------
  417|       |        /* The callback set an illegal length */
  418|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  419|      0|            SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH);
  420|      0|        return 0;
  421|      0|    }
  422|  7.16k|    ss->session_id_length = tmp;
  423|       |    /* Finally, check for a conflict */
  424|  7.16k|    if (SSL_has_matching_session_id(ssl, ss->session_id,
  ------------------
  |  Branch (424:9): [True: 0, False: 7.16k]
  ------------------
  425|  7.16k|            (unsigned int)ss->session_id_length)) {
  426|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_SSL_SESSION_ID_CONFLICT);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  427|      0|        return 0;
  428|      0|    }
  429|       |
  430|  7.16k|    return 1;
  431|  7.16k|}
ssl_get_new_session:
  434|  7.25k|{
  435|       |    /* This gets used by clients and servers. */
  436|       |
  437|  7.25k|    SSL_SESSION *ss = NULL;
  438|       |
  439|  7.25k|    if ((ss = SSL_SESSION_new()) == NULL) {
  ------------------
  |  Branch (439:9): [True: 0, False: 7.25k]
  ------------------
  440|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_SSL_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  441|      0|        return 0;
  442|      0|    }
  443|       |
  444|       |    /* If the context has a default timeout, use it */
  445|  7.25k|    if (ossl_time_is_zero(s->session_ctx->session_timeout))
  ------------------
  |  Branch (445:9): [True: 0, False: 7.25k]
  ------------------
  446|      0|        ss->timeout = SSL_CONNECTION_GET_SSL(s)->method->get_timeout();
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  447|  7.25k|    else
  448|  7.25k|        ss->timeout = s->session_ctx->session_timeout;
  449|  7.25k|    ssl_session_calculate_timeout(ss);
  450|       |
  451|  7.25k|    SSL_SESSION_free(s->session);
  452|  7.25k|    s->session = NULL;
  453|       |
  454|  7.25k|    if (session) {
  ------------------
  |  Branch (454:9): [True: 3.62k, False: 3.62k]
  ------------------
  455|  3.62k|        if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  456|       |            /*
  457|       |             * We generate the session id while constructing the
  458|       |             * NewSessionTicket in TLSv1.3.
  459|       |             */
  460|  3.62k|            ss->session_id_length = 0;
  461|  3.62k|        } else if (!ssl_generate_session_id(s, ss)) {
  ------------------
  |  Branch (461:20): [True: 0, False: 0]
  ------------------
  462|       |            /* SSLfatal() already called */
  463|      0|            SSL_SESSION_free(ss);
  464|      0|            return 0;
  465|      0|        }
  466|       |
  467|  3.62k|    } else {
  468|  3.62k|        ss->session_id_length = 0;
  469|  3.62k|    }
  470|       |
  471|  7.25k|    if (s->sid_ctx_length > sizeof(ss->sid_ctx)) {
  ------------------
  |  Branch (471:9): [True: 0, False: 7.25k]
  ------------------
  472|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  473|      0|        SSL_SESSION_free(ss);
  474|      0|        return 0;
  475|      0|    }
  476|  7.25k|    memcpy(ss->sid_ctx, s->sid_ctx, s->sid_ctx_length);
  477|  7.25k|    ss->sid_ctx_length = s->sid_ctx_length;
  478|  7.25k|    s->session = ss;
  479|  7.25k|    ss->ssl_version = s->version;
  480|  7.25k|    ss->verify_result = X509_V_OK;
  ------------------
  |  |  312|  7.25k|#define X509_V_OK 0
  ------------------
  481|       |
  482|       |    /* If client supports extended master secret set it in session */
  483|  7.25k|    if (s->s3.flags & TLS1_FLAGS_RECEIVED_EXTMS)
  ------------------
  |  |  300|  7.25k|#define TLS1_FLAGS_RECEIVED_EXTMS 0x0200
  ------------------
  |  Branch (483:9): [True: 0, False: 7.25k]
  ------------------
  484|      0|        ss->flags |= SSL_SESS_FLAG_EXTMS;
  ------------------
  |  |  577|      0|#define SSL_SESS_FLAG_EXTMS 0x1
  ------------------
  485|       |
  486|  7.25k|    return 1;
  487|  7.25k|}
ssl_get_prev_session:
  584|  3.62k|{
  585|       |    /* This is used only by servers. */
  586|       |
  587|  3.62k|    SSL_SESSION *ret = NULL;
  588|  3.62k|    int fatal = 0;
  589|  3.62k|    int try_session_cache = 0;
  590|  3.62k|    SSL_TICKET_STATUS r;
  591|       |
  592|  3.62k|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  593|  3.62k|        SSL_SESSION_free(s->session);
  594|  3.62k|        s->session = NULL;
  595|       |        /*
  596|       |         * By default we will send a new ticket. This can be overridden in the
  597|       |         * ticket processing.
  598|       |         */
  599|  3.62k|        s->ext.ticket_expected = 1;
  600|  3.62k|        if (!tls_parse_extension(s, TLSEXT_IDX_psk_kex_modes,
  ------------------
  |  Branch (600:13): [True: 0, False: 3.62k]
  ------------------
  601|  3.62k|                SSL_EXT_CLIENT_HELLO, hello->pre_proc_exts,
  ------------------
  |  |  300|  3.62k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  602|  3.62k|                NULL, 0)
  603|  3.62k|            || !tls_parse_extension(s, TLSEXT_IDX_psk, SSL_EXT_CLIENT_HELLO,
  ------------------
  |  |  300|  3.62k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (603:16): [True: 0, False: 3.62k]
  ------------------
  604|  3.62k|                hello->pre_proc_exts, NULL, 0))
  605|      0|            return -1;
  606|       |
  607|       |        /* If we resumed, s->session will now be set */
  608|  3.62k|        ret = s->session;
  609|  3.62k|    } else {
  610|       |        /* sets s->ext.ticket_expected */
  611|      0|        r = tls_get_ticket_from_client(s, hello, &ret);
  612|      0|        switch (r) {
  ------------------
  |  Branch (612:17): [True: 0, False: 0]
  ------------------
  613|      0|        case SSL_TICKET_FATAL_ERR_MALLOC:
  ------------------
  |  | 2838|      0|#define SSL_TICKET_FATAL_ERR_MALLOC 0
  ------------------
  |  Branch (613:9): [True: 0, False: 0]
  ------------------
  614|      0|        case SSL_TICKET_FATAL_ERR_OTHER:
  ------------------
  |  | 2840|      0|#define SSL_TICKET_FATAL_ERR_OTHER 1
  ------------------
  |  Branch (614:9): [True: 0, False: 0]
  ------------------
  615|      0|            fatal = 1;
  616|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  617|      0|            goto err;
  618|      0|        case SSL_TICKET_NONE:
  ------------------
  |  | 2842|      0|#define SSL_TICKET_NONE 2
  ------------------
  |  Branch (618:9): [True: 0, False: 0]
  ------------------
  619|      0|        case SSL_TICKET_EMPTY:
  ------------------
  |  | 2844|      0|#define SSL_TICKET_EMPTY 3
  ------------------
  |  Branch (619:9): [True: 0, False: 0]
  ------------------
  620|      0|            if (hello->session_id_len > 0) {
  ------------------
  |  Branch (620:17): [True: 0, False: 0]
  ------------------
  621|      0|                try_session_cache = 1;
  622|      0|                ret = lookup_sess_in_cache(s, hello->session_id,
  623|      0|                    hello->session_id_len);
  624|      0|            }
  625|      0|            break;
  626|      0|        case SSL_TICKET_NO_DECRYPT:
  ------------------
  |  | 2846|      0|#define SSL_TICKET_NO_DECRYPT 4
  ------------------
  |  Branch (626:9): [True: 0, False: 0]
  ------------------
  627|      0|        case SSL_TICKET_SUCCESS:
  ------------------
  |  | 2848|      0|#define SSL_TICKET_SUCCESS 5
  ------------------
  |  Branch (627:9): [True: 0, False: 0]
  ------------------
  628|      0|        case SSL_TICKET_SUCCESS_RENEW:
  ------------------
  |  | 2850|      0|#define SSL_TICKET_SUCCESS_RENEW 6
  ------------------
  |  Branch (628:9): [True: 0, False: 0]
  ------------------
  629|      0|            break;
  630|      0|        }
  631|      0|    }
  632|       |
  633|  3.62k|    if (ret == NULL)
  ------------------
  |  Branch (633:9): [True: 3.62k, False: 0]
  ------------------
  634|  3.62k|        goto err;
  635|       |
  636|       |    /* Now ret is non-NULL and we own one of its reference counts. */
  637|       |
  638|       |    /* Check TLS version consistency */
  639|      0|    if (ret->ssl_version != s->version)
  ------------------
  |  Branch (639:9): [True: 0, False: 0]
  ------------------
  640|      0|        goto err;
  641|       |
  642|      0|    if (ret->sid_ctx_length != s->sid_ctx_length
  ------------------
  |  Branch (642:9): [True: 0, False: 0]
  ------------------
  643|      0|        || memcmp(ret->sid_ctx, s->sid_ctx, ret->sid_ctx_length)) {
  ------------------
  |  Branch (643:12): [True: 0, False: 0]
  ------------------
  644|       |        /*
  645|       |         * We have the session requested by the client, but we don't want to
  646|       |         * use it in this context.
  647|       |         */
  648|      0|        goto err; /* treat like cache miss */
  649|      0|    }
  650|       |
  651|      0|    if ((s->verify_mode & SSL_VERIFY_PEER) && s->sid_ctx_length == 0) {
  ------------------
  |  | 1201|      0|#define SSL_VERIFY_PEER 0x01
  ------------------
  |  Branch (651:9): [True: 0, False: 0]
  |  Branch (651:47): [True: 0, False: 0]
  ------------------
  652|       |        /*
  653|       |         * We can't be sure if this session is being used out of context,
  654|       |         * which is especially important for SSL_VERIFY_PEER. The application
  655|       |         * should have used SSL[_CTX]_set_session_id_context. For this error
  656|       |         * case, we generate an error instead of treating the event like a
  657|       |         * cache miss (otherwise it would be easy for applications to
  658|       |         * effectively disable the session cache by accident without anyone
  659|       |         * noticing).
  660|       |         */
  661|       |
  662|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  663|      0|            SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED);
  664|      0|        fatal = 1;
  665|      0|        goto err;
  666|      0|    }
  667|       |
  668|      0|    if (sess_timedout(ossl_time_now(), ret)) {
  ------------------
  |  Branch (668:9): [True: 0, False: 0]
  ------------------
  669|      0|        ssl_tsan_counter(s->session_ctx, &s->session_ctx->stats.sess_timeout);
  670|      0|        if (try_session_cache) {
  ------------------
  |  Branch (670:13): [True: 0, False: 0]
  ------------------
  671|       |            /* session was from the cache, so remove it */
  672|      0|            SSL_CTX_remove_session(s->session_ctx, ret);
  673|      0|        }
  674|      0|        goto err;
  675|      0|    }
  676|       |
  677|       |    /* Check extended master secret extension consistency */
  678|      0|    if (ret->flags & SSL_SESS_FLAG_EXTMS) {
  ------------------
  |  |  577|      0|#define SSL_SESS_FLAG_EXTMS 0x1
  ------------------
  |  Branch (678:9): [True: 0, False: 0]
  ------------------
  679|       |        /* If old session includes extms, but new does not: abort handshake */
  680|      0|        if (!(s->s3.flags & TLS1_FLAGS_RECEIVED_EXTMS)) {
  ------------------
  |  |  300|      0|#define TLS1_FLAGS_RECEIVED_EXTMS 0x0200
  ------------------
  |  Branch (680:13): [True: 0, False: 0]
  ------------------
  681|      0|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_INCONSISTENT_EXTMS);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  682|      0|            fatal = 1;
  683|      0|            goto err;
  684|      0|        }
  685|      0|    } else if (s->s3.flags & TLS1_FLAGS_RECEIVED_EXTMS) {
  ------------------
  |  |  300|      0|#define TLS1_FLAGS_RECEIVED_EXTMS 0x0200
  ------------------
  |  Branch (685:16): [True: 0, False: 0]
  ------------------
  686|       |        /* If new session includes extms, but old does not: do not resume */
  687|      0|        goto err;
  688|      0|    }
  689|       |
  690|      0|    if (!SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      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 (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      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 (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  691|       |        /* We already did this for TLS1.3 */
  692|      0|        SSL_SESSION_free(s->session);
  693|      0|        s->session = ret;
  694|      0|    }
  695|       |
  696|       |    /*
  697|       |     * Explicit comparison between the session ID the client offered in
  698|       |     * ClientHello and the session ID embedded in the SSL_SESSION returned by
  699|       |     * the external cache. If they do not match, the cached session is released
  700|       |     * and ssl_get_prev_session() returns as a cache miss, forcing a full
  701|       |     * handshake. The check is placed in ssl_get_prev_session() rather than a
  702|       |     * later callback because this is the earliest point where both values are
  703|       |     * available simultaneously, before any ServerHello is composed.
  704|       |     * Catching the mismatch here ensures the server never sends a ServerHello
  705|       |     * that claims resumption of a session ID it cannot legitimately echo.
  706|       |     *
  707|       |     * A mismatch unambiguously indicates one of:
  708|       |     *   - a corrupt cache entry
  709|       |     *   - an external cache implementation that returned the wrong session
  710|       |     *   - an active tampering attempt
  711|       |     *
  712|       |     * Refusing resumption and falling back to a full handshake is the correct
  713|       |     * response.
  714|       |     */
  715|      0|    if (!SSL_CONNECTION_IS_TLS13(s) && hello->session_id_len > 0
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      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 (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      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 (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (715:40): [True: 0, False: 0]
  ------------------
  716|      0|        && (s->session->session_id_length != hello->session_id_len
  ------------------
  |  Branch (716:13): [True: 0, False: 0]
  ------------------
  717|      0|            || memcmp(s->session->session_id, hello->session_id,
  ------------------
  |  Branch (717:16): [True: 0, False: 0]
  ------------------
  718|      0|                   hello->session_id_len)
  719|      0|                != 0)) {
  720|      0|        return 0;
  721|      0|    }
  722|      0|    ssl_tsan_counter(s->session_ctx, &s->session_ctx->stats.sess_hit);
  723|      0|    s->verify_result = s->session->verify_result;
  724|      0|    return 1;
  725|       |
  726|  3.62k|err:
  727|  3.62k|    if (ret != NULL) {
  ------------------
  |  Branch (727:9): [True: 0, False: 3.62k]
  ------------------
  728|      0|        SSL_SESSION_free(ret);
  729|       |        /* In TLSv1.3 s->session was already set to ret, so we NULL it out */
  730|      0|        if (SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      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 (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      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 (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  731|      0|            s->session = NULL;
  732|       |
  733|      0|        if (!try_session_cache) {
  ------------------
  |  Branch (733:13): [True: 0, False: 0]
  ------------------
  734|       |            /*
  735|       |             * The session was from a ticket, so we should issue a ticket for
  736|       |             * the new session
  737|       |             */
  738|      0|            s->ext.ticket_expected = 1;
  739|      0|        }
  740|      0|    }
  741|  3.62k|    if (fatal)
  ------------------
  |  Branch (741:9): [True: 0, False: 3.62k]
  ------------------
  742|      0|        return -1;
  743|       |
  744|  3.62k|    return 0;
  745|  3.62k|}
SSL_CTX_remove_session:
  857|  4.35k|{
  858|  4.35k|    SSL_SESSION *r;
  859|       |
  860|  4.35k|    if (c == NULL || c->session_id_length == 0)
  ------------------
  |  Branch (860:9): [True: 0, False: 4.35k]
  |  Branch (860:22): [True: 3.65k, False: 697]
  ------------------
  861|  3.65k|        return 0;
  862|    697|    if (!CRYPTO_THREAD_write_lock(ctx->lock))
  ------------------
  |  Branch (862:9): [True: 0, False: 697]
  ------------------
  863|      0|        return 0;
  864|    697|    r = remove_session_locked(ctx, c);
  865|    697|    CRYPTO_THREAD_unlock(ctx->lock);
  866|       |
  867|       |    /*
  868|       |     * The callback is invoked even when the session is not in the internal
  869|       |     * cache so that external caches can be notified.
  870|       |     */
  871|    697|    if (ctx->remove_session_cb != NULL)
  ------------------
  |  Branch (871:9): [True: 0, False: 697]
  ------------------
  872|      0|        ctx->remove_session_cb(ctx, c);
  873|    697|    SSL_SESSION_free(r);
  874|       |    return r != NULL;
  875|    697|}
SSL_SESSION_free:
  898|  69.3k|{
  899|  69.3k|    int i;
  900|       |
  901|  69.3k|    if (ss == NULL)
  ------------------
  |  Branch (901:9): [True: 36.9k, False: 32.3k]
  ------------------
  902|  36.9k|        return;
  903|  32.3k|    CRYPTO_DOWN_REF(&ss->references, &i);
  904|  32.3k|    REF_PRINT_COUNT("SSL_SESSION", i, ss);
  ------------------
  |  |  301|  32.3k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  32.3k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  32.3k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  32.3k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  905|  32.3k|    if (i > 0)
  ------------------
  |  Branch (905:9): [True: 7.16k, False: 25.1k]
  ------------------
  906|  7.16k|        return;
  907|  25.1k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  25.1k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 25.1k]
  |  |  ------------------
  ------------------
  908|       |
  909|  25.1k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_SESSION, ss, &ss->ex_data);
  ------------------
  |  |  253|  25.1k|#define CRYPTO_EX_INDEX_SSL_SESSION 2
  ------------------
  910|       |
  911|  25.1k|    OPENSSL_cleanse(ss->master_key, sizeof(ss->master_key));
  912|  25.1k|    OPENSSL_cleanse(ss->session_id, sizeof(ss->session_id));
  913|  25.1k|    X509_free(ss->peer);
  914|  25.1k|    EVP_PKEY_free(ss->peer_rpk);
  915|  25.1k|    OSSL_STACK_OF_X509_free(ss->peer_chain);
  916|  25.1k|    OPENSSL_free(ss->ext.hostname);
  ------------------
  |  |  132|  25.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  917|  25.1k|    OPENSSL_free(ss->ext.tick);
  ------------------
  |  |  132|  25.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  918|  25.1k|#ifndef OPENSSL_NO_PSK
  919|  25.1k|    OPENSSL_free(ss->psk_identity_hint);
  ------------------
  |  |  132|  25.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  920|  25.1k|    OPENSSL_free(ss->psk_identity);
  ------------------
  |  |  132|  25.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  921|  25.1k|#endif
  922|  25.1k|#ifndef OPENSSL_NO_SRP
  923|  25.1k|    OPENSSL_free(ss->srp_username);
  ------------------
  |  |  132|  25.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  924|  25.1k|#endif
  925|  25.1k|    OPENSSL_free(ss->ext.alpn_selected);
  ------------------
  |  |  132|  25.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  926|  25.1k|    OPENSSL_free(ss->ticket_appdata);
  ------------------
  |  |  132|  25.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  927|  25.1k|    CRYPTO_FREE_REF(&ss->references);
  928|  25.1k|    OPENSSL_clear_free(ss, sizeof(*ss));
  ------------------
  |  |  130|  25.1k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  929|  25.1k|}
SSL_SESSION_up_ref:
  932|  7.16k|{
  933|  7.16k|    int i;
  934|       |
  935|  7.16k|    if (CRYPTO_UP_REF(&ss->references, &i) <= 0)
  ------------------
  |  Branch (935:9): [True: 0, False: 7.16k]
  ------------------
  936|      0|        return 0;
  937|       |
  938|  7.16k|    REF_PRINT_COUNT("SSL_SESSION", i, ss);
  ------------------
  |  |  301|  7.16k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  7.16k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  295|  7.16k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  283|  7.16k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  939|  7.16k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|  7.16k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 7.16k]
  |  |  ------------------
  ------------------
  940|  7.16k|    return ((i > 1) ? 1 : 0);
  ------------------
  |  Branch (940:13): [True: 7.16k, False: 0]
  ------------------
  941|  7.16k|}
SSL_SESSION_get_timeout:
 1005|  7.16k|{
 1006|  7.16k|    if (s == NULL)
  ------------------
  |  Branch (1006:9): [True: 0, False: 7.16k]
  ------------------
 1007|      0|        return 0;
 1008|  7.16k|    return (long)ossl_time_to_time_t(s->timeout);
 1009|  7.16k|}
SSL_SESSION_get_max_early_data:
 1110|  7.16k|{
 1111|  7.16k|    return s->ext.max_early_data;
 1112|  7.16k|}
SSL_CTX_flush_sessions_ex:
 1264|  7.36k|{
 1265|  7.36k|    STACK_OF(SSL_SESSION) *sk;
  ------------------
  |  |   33|  7.36k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1266|  7.36k|    SSL_SESSION *current;
 1267|  7.36k|    unsigned long i;
 1268|  7.36k|    const OSSL_TIME timeout = ossl_time_from_time_t(t);
 1269|       |
 1270|  7.36k|    if (!CRYPTO_THREAD_write_lock(s->lock))
  ------------------
  |  Branch (1270:9): [True: 0, False: 7.36k]
  ------------------
 1271|      0|        return;
 1272|       |
 1273|  7.36k|    sk = sk_SSL_SESSION_new_null();
 1274|  7.36k|    i = lh_SSL_SESSION_get_down_load(s->sessions);
 1275|  7.36k|    lh_SSL_SESSION_set_down_load(s->sessions, 0);
 1276|       |
 1277|       |    /*
 1278|       |     * Iterate over the list from the back (oldest), and stop
 1279|       |     * when a session can no longer be removed.
 1280|       |     * Collect removed sessions on a stack to be processed outside the lock,
 1281|       |     * so that remove_session_cb is never invoked while holding ctx->lock.
 1282|       |     * If the stack failed to create, or a push fails, free the session
 1283|       |     * immediately (without invoking the callback).
 1284|       |     */
 1285|  7.36k|    while (s->session_cache_tail != NULL) {
  ------------------
  |  Branch (1285:12): [True: 0, False: 7.36k]
  ------------------
 1286|      0|        current = s->session_cache_tail;
 1287|      0|        if (t == 0 || sess_timedout(timeout, current)) {
  ------------------
  |  Branch (1287:13): [True: 0, False: 0]
  |  Branch (1287:23): [True: 0, False: 0]
  ------------------
 1288|      0|            lh_SSL_SESSION_delete(s->sessions, current);
 1289|      0|            SSL_SESSION_list_remove(s, current);
 1290|      0|            current->not_resumable = 1;
 1291|      0|            if (sk == NULL || !sk_SSL_SESSION_push(sk, current))
  ------------------
  |  Branch (1291:17): [True: 0, False: 0]
  |  Branch (1291:31): [True: 0, False: 0]
  ------------------
 1292|      0|                SSL_SESSION_free(current);
 1293|      0|        } else {
 1294|      0|            break;
 1295|      0|        }
 1296|      0|    }
 1297|       |
 1298|  7.36k|    lh_SSL_SESSION_set_down_load(s->sessions, i);
 1299|  7.36k|    CRYPTO_THREAD_unlock(s->lock);
 1300|       |
 1301|  7.36k|    while (sk_SSL_SESSION_num(sk) > 0) {
  ------------------
  |  Branch (1301:12): [True: 0, False: 7.36k]
  ------------------
 1302|      0|        current = sk_SSL_SESSION_pop(sk);
 1303|      0|        if (s->remove_session_cb != NULL)
  ------------------
  |  Branch (1303:13): [True: 0, False: 0]
  ------------------
 1304|      0|            s->remove_session_cb(s, current);
 1305|      0|        SSL_SESSION_free(current);
 1306|      0|    }
 1307|  7.36k|    sk_SSL_SESSION_free(sk);
 1308|  7.36k|}
ssl_clear_bad_session:
 1311|  21.7k|{
 1312|  21.7k|    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)))) {
  ------------------
  |  |  216|  7.25k|#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|    772|#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|    727|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  |  Branch (1312:9): [True: 7.25k, False: 14.5k]
  |  Branch (1312:33): [True: 772, False: 6.48k]
  |  Branch (1312:73): [True: 45, False: 727]
  |  Branch (1312:115): [True: 0, False: 727]
  ------------------
 1313|    727|        SSL_CTX_remove_session(s->session_ctx, s->session);
 1314|    727|        return 1;
 1315|    727|    } else
 1316|  21.0k|        return 0;
 1317|  21.7k|}
SSL_CTX_sess_set_new_cb:
 1401|  3.62k|{
 1402|  3.62k|    ctx->new_session_cb = cb;
 1403|  3.62k|}
ssl_sess.c:ssl_session_dup_intern:
  136|  10.7k|{
  137|  10.7k|    SSL_SESSION *dest;
  138|       |
  139|  10.7k|    dest = OPENSSL_malloc(sizeof(*dest));
  ------------------
  |  |  107|  10.7k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  140|  10.7k|    if (dest == NULL)
  ------------------
  |  Branch (140:9): [True: 0, False: 10.7k]
  ------------------
  141|      0|        return NULL;
  142|       |
  143|       |    /*
  144|       |     * src is logically read-only but the prev/next pointers are not, they are
  145|       |     * part of the session cache and can be modified concurrently.
  146|       |     */
  147|  10.7k|    memcpy(dest, src, offsetof(SSL_SESSION, prev));
  148|       |
  149|       |    /*
  150|       |     * Set the various pointers to NULL so that we can call SSL_SESSION_free in
  151|       |     * the case of an error whilst halfway through constructing dest
  152|       |     */
  153|  10.7k|#ifndef OPENSSL_NO_PSK
  154|  10.7k|    dest->psk_identity_hint = NULL;
  155|  10.7k|    dest->psk_identity = NULL;
  156|  10.7k|#endif
  157|  10.7k|    dest->ext.hostname = NULL;
  158|  10.7k|    dest->ext.tick = NULL;
  159|  10.7k|    dest->ext.alpn_selected = NULL;
  160|  10.7k|#ifndef OPENSSL_NO_SRP
  161|  10.7k|    dest->srp_username = NULL;
  162|  10.7k|#endif
  163|  10.7k|    dest->peer_chain = NULL;
  164|  10.7k|    dest->peer = NULL;
  165|  10.7k|    dest->peer_rpk = NULL;
  166|  10.7k|    dest->ticket_appdata = NULL;
  167|  10.7k|    memset(&dest->ex_data, 0, sizeof(dest->ex_data));
  168|       |
  169|       |    /* As the copy is not in the cache, we remove the associated pointers */
  170|  10.7k|    dest->prev = NULL;
  171|  10.7k|    dest->next = NULL;
  172|  10.7k|    dest->owner = NULL;
  173|       |
  174|  10.7k|    if (!CRYPTO_NEW_REF(&dest->references, 1)) {
  ------------------
  |  Branch (174:9): [True: 0, False: 10.7k]
  ------------------
  175|      0|        OPENSSL_free(dest);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  176|      0|        return NULL;
  177|      0|    }
  178|       |
  179|  10.7k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_SESSION, dest, &dest->ex_data)) {
  ------------------
  |  |  253|  10.7k|#define CRYPTO_EX_INDEX_SSL_SESSION 2
  ------------------
  |  Branch (179:9): [True: 0, False: 10.7k]
  ------------------
  180|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  181|      0|        goto err;
  182|      0|    }
  183|       |
  184|  10.7k|    if (src->peer != NULL) {
  ------------------
  |  Branch (184:9): [True: 7.16k, False: 3.58k]
  ------------------
  185|  7.16k|        if (!X509_up_ref(src->peer)) {
  ------------------
  |  Branch (185:13): [True: 0, False: 7.16k]
  ------------------
  186|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  187|      0|            goto err;
  188|      0|        }
  189|  7.16k|        dest->peer = src->peer;
  190|  7.16k|    }
  191|       |
  192|  10.7k|    if (src->peer_chain != NULL) {
  ------------------
  |  Branch (192:9): [True: 7.16k, False: 3.58k]
  ------------------
  193|  7.16k|        dest->peer_chain = X509_chain_up_ref(src->peer_chain);
  194|  7.16k|        if (dest->peer_chain == NULL) {
  ------------------
  |  Branch (194:13): [True: 0, False: 7.16k]
  ------------------
  195|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_X509_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  196|      0|            goto err;
  197|      0|        }
  198|  7.16k|    }
  199|       |
  200|  10.7k|    if (src->peer_rpk != NULL) {
  ------------------
  |  Branch (200:9): [True: 0, False: 10.7k]
  ------------------
  201|      0|        if (!EVP_PKEY_up_ref(src->peer_rpk))
  ------------------
  |  Branch (201:13): [True: 0, False: 0]
  ------------------
  202|      0|            goto err;
  203|      0|        dest->peer_rpk = src->peer_rpk;
  204|      0|    }
  205|       |
  206|  10.7k|#ifndef OPENSSL_NO_PSK
  207|  10.7k|    if (src->psk_identity_hint) {
  ------------------
  |  Branch (207:9): [True: 0, False: 10.7k]
  ------------------
  208|      0|        dest->psk_identity_hint = OPENSSL_strdup(src->psk_identity_hint);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  209|      0|        if (dest->psk_identity_hint == NULL)
  ------------------
  |  Branch (209:13): [True: 0, False: 0]
  ------------------
  210|      0|            goto err;
  211|      0|    }
  212|  10.7k|    if (src->psk_identity) {
  ------------------
  |  Branch (212:9): [True: 0, False: 10.7k]
  ------------------
  213|      0|        dest->psk_identity = OPENSSL_strdup(src->psk_identity);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  214|      0|        if (dest->psk_identity == NULL)
  ------------------
  |  Branch (214:13): [True: 0, False: 0]
  ------------------
  215|      0|            goto err;
  216|      0|    }
  217|  10.7k|#endif
  218|       |
  219|  10.7k|    if (!CRYPTO_dup_ex_data(CRYPTO_EX_INDEX_SSL_SESSION,
  ------------------
  |  |  253|  10.7k|#define CRYPTO_EX_INDEX_SSL_SESSION 2
  ------------------
  |  Branch (219:9): [True: 0, False: 10.7k]
  ------------------
  220|  10.7k|            &dest->ex_data, &src->ex_data)) {
  221|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  222|      0|        goto err;
  223|      0|    }
  224|       |
  225|  10.7k|    if (src->ext.hostname) {
  ------------------
  |  Branch (225:9): [True: 0, False: 10.7k]
  ------------------
  226|      0|        dest->ext.hostname = OPENSSL_strdup(src->ext.hostname);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  227|      0|        if (dest->ext.hostname == NULL)
  ------------------
  |  Branch (227:13): [True: 0, False: 0]
  ------------------
  228|      0|            goto err;
  229|      0|    }
  230|       |
  231|  10.7k|    if (ticket != 0 && src->ext.tick != NULL) {
  ------------------
  |  Branch (231:9): [True: 0, False: 10.7k]
  |  Branch (231:24): [True: 0, False: 0]
  ------------------
  232|      0|        dest->ext.tick = OPENSSL_memdup(src->ext.tick, src->ext.ticklen);
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  233|      0|        if (dest->ext.tick == NULL)
  ------------------
  |  Branch (233:13): [True: 0, False: 0]
  ------------------
  234|      0|            goto err;
  235|  10.7k|    } else {
  236|  10.7k|        dest->ext.tick_lifetime_hint = 0;
  237|  10.7k|        dest->ext.ticklen = 0;
  238|  10.7k|    }
  239|       |
  240|  10.7k|    if (src->ext.alpn_selected != NULL) {
  ------------------
  |  Branch (240:9): [True: 10.7k, False: 6]
  ------------------
  241|  10.7k|        dest->ext.alpn_selected = OPENSSL_memdup(src->ext.alpn_selected,
  ------------------
  |  |  134|  10.7k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  242|  10.7k|            src->ext.alpn_selected_len);
  243|  10.7k|        if (dest->ext.alpn_selected == NULL)
  ------------------
  |  Branch (243:13): [True: 0, False: 10.7k]
  ------------------
  244|      0|            goto err;
  245|  10.7k|    }
  246|       |
  247|  10.7k|#ifndef OPENSSL_NO_SRP
  248|  10.7k|    if (src->srp_username) {
  ------------------
  |  Branch (248:9): [True: 0, False: 10.7k]
  ------------------
  249|      0|        dest->srp_username = OPENSSL_strdup(src->srp_username);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  250|      0|        if (dest->srp_username == NULL)
  ------------------
  |  Branch (250:13): [True: 0, False: 0]
  ------------------
  251|      0|            goto err;
  252|      0|    }
  253|  10.7k|#endif
  254|       |
  255|  10.7k|    if (src->ticket_appdata != NULL) {
  ------------------
  |  Branch (255:9): [True: 0, False: 10.7k]
  ------------------
  256|      0|        dest->ticket_appdata = OPENSSL_memdup(src->ticket_appdata, src->ticket_appdata_len);
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  257|      0|        if (dest->ticket_appdata == NULL)
  ------------------
  |  Branch (257:13): [True: 0, False: 0]
  ------------------
  258|      0|            goto err;
  259|      0|    }
  260|       |
  261|  10.7k|    return dest;
  262|      0|err:
  263|      0|    SSL_SESSION_free(dest);
  264|       |    return NULL;
  265|  10.7k|}
ssl_sess.c:def_generate_session_id:
  322|  7.16k|{
  323|  7.16k|    unsigned int retry = 0;
  324|  7.16k|    do {
  325|  7.16k|        if (RAND_bytes_ex(ssl->ctx->libctx, id, *id_len, 0) <= 0)
  ------------------
  |  Branch (325:13): [True: 0, False: 7.16k]
  ------------------
  326|      0|            return 0;
  327|  7.16k|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
  328|  7.16k|        if (retry > 0) {
  ------------------
  |  Branch (328:13): [True: 0, False: 7.16k]
  ------------------
  329|      0|            id[0]++;
  330|      0|        }
  331|  7.16k|#endif
  332|  7.16k|    } while (SSL_has_matching_session_id(ssl, id, *id_len) && (++retry < MAX_SESS_ID_ATTEMPTS));
  ------------------
  |  |  319|      0|#define MAX_SESS_ID_ATTEMPTS 10
  ------------------
  |  Branch (332:14): [True: 0, False: 7.16k]
  |  Branch (332:63): [True: 0, False: 0]
  ------------------
  333|  7.16k|    if (retry < MAX_SESS_ID_ATTEMPTS)
  ------------------
  |  |  319|  7.16k|#define MAX_SESS_ID_ATTEMPTS 10
  ------------------
  |  Branch (333:9): [True: 7.16k, False: 0]
  ------------------
  334|  7.16k|        return 1;
  335|       |    /* else - woops a session_id match */
  336|       |    /*
  337|       |     * XXX We should also check the external cache -- but the probability of
  338|       |     * a collision is negligible, and we could not prevent the concurrent
  339|       |     * creation of sessions with identical IDs since we currently don't have
  340|       |     * means to atomically check whether a session ID already exists and make
  341|       |     * a reservation for it if it does not (this problem applies to the
  342|       |     * internal cache as well).
  343|       |     */
  344|      0|    return 0;
  345|  7.16k|}
ssl_sess.c:remove_session_locked:
  883|    697|{
  884|    697|    SSL_SESSION *r = NULL;
  885|       |
  886|    697|    if (c != NULL && c->session_id_length != 0) {
  ------------------
  |  Branch (886:9): [True: 697, False: 0]
  |  Branch (886:22): [True: 697, False: 0]
  ------------------
  887|    697|        r = lh_SSL_SESSION_retrieve(ctx->sessions, c);
  888|    697|        if (r != NULL) {
  ------------------
  |  Branch (888:13): [True: 0, False: 697]
  ------------------
  889|      0|            r = lh_SSL_SESSION_delete(ctx->sessions, r);
  890|      0|            SSL_SESSION_list_remove(ctx, r);
  891|      0|        }
  892|    697|        c->not_resumable = 1;
  893|    697|    }
  894|    697|    return r;
  895|    697|}

ossl_ech_2bcompressed:
  551|  1.34M|{
  552|  1.34M|    const size_t nexts = OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|  1.34M|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  553|       |
  554|       |#ifdef DUPEMALL
  555|       |    return 0;
  556|       |#endif
  557|  1.34M|    if (ind >= nexts)
  ------------------
  |  Branch (557:9): [True: 0, False: 1.34M]
  ------------------
  558|      0|        return -1;
  559|  1.34M|    return ext_defs[ind].ech_handling == OSSL_ECH_HANDLING_COMPRESS;
  ------------------
  |  |   30|  1.34M|#define OSSL_ECH_HANDLING_COMPRESS 2 /* compress outer value into inner */
  ------------------
  560|  1.34M|}
tls_validate_all_contexts:
  646|  3.62k|{
  647|  3.62k|    size_t i, num_exts, builtin_num = OSSL_NELEM(ext_defs), offset;
  ------------------
  |  |   14|  3.62k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  648|  3.62k|    RAW_EXTENSION *thisext;
  649|  3.62k|    unsigned int context;
  650|  3.62k|    ENDPOINT role = ENDPOINT_BOTH;
  651|       |
  652|  3.62k|    if ((thisctx & SSL_EXT_CLIENT_HELLO) != 0)
  ------------------
  |  |  300|  3.62k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (652:9): [True: 0, False: 3.62k]
  ------------------
  653|      0|        role = ENDPOINT_SERVER;
  654|  3.62k|    else if ((thisctx & SSL_EXT_TLS1_2_SERVER_HELLO) != 0)
  ------------------
  |  |  302|  3.62k|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
  |  Branch (654:14): [True: 0, False: 3.62k]
  ------------------
  655|      0|        role = ENDPOINT_CLIENT;
  656|       |
  657|       |    /* Calculate the number of extensions in the extensions list */
  658|  3.62k|    num_exts = builtin_num + s->cert->custext.meths_count;
  659|       |
  660|   116k|    for (thisext = exts, i = 0; i < num_exts; i++, thisext++) {
  ------------------
  |  Branch (660:33): [True: 112k, False: 3.62k]
  ------------------
  661|   112k|        if (!thisext->present)
  ------------------
  |  Branch (661:13): [True: 105k, False: 7.25k]
  ------------------
  662|   105k|            continue;
  663|       |
  664|  7.25k|        if (i < builtin_num) {
  ------------------
  |  Branch (664:13): [True: 7.25k, False: 0]
  ------------------
  665|  7.25k|            context = ext_defs[i].context;
  666|  7.25k|        } else {
  667|      0|            custom_ext_method *meth = NULL;
  668|       |
  669|      0|            meth = custom_ext_find(&s->cert->custext, role, thisext->type,
  670|      0|                &offset);
  671|      0|            if (!ossl_assert(meth != NULL))
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (671:17): [True: 0, False: 0]
  ------------------
  672|      0|                return 0;
  673|      0|            context = meth->context;
  674|      0|        }
  675|       |
  676|  7.25k|        if (!validate_context(s, context, thisctx))
  ------------------
  |  Branch (676:13): [True: 0, False: 7.25k]
  ------------------
  677|      0|            return 0;
  678|  7.25k|    }
  679|       |
  680|  3.62k|    return 1;
  681|  3.62k|}
extension_is_relevant:
  746|   355k|{
  747|   355k|    int is_tls13;
  748|       |
  749|       |    /*
  750|       |     * For HRR we haven't selected the version yet but we know it will be
  751|       |     * TLSv1.3
  752|       |     */
  753|   355k|    if ((thisctx & SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST) != 0)
  ------------------
  |  |  305|   355k|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
  |  Branch (753:9): [True: 0, False: 355k]
  ------------------
  754|      0|        is_tls13 = 1;
  755|   355k|    else
  756|   355k|        is_tls13 = SSL_CONNECTION_IS_TLS13(s);
  ------------------
  |  |  273|   355k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|   711k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|   355k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|   355k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 355k, False: 0]
  |  |  ------------------
  |  |  274|   355k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|   355k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|   711k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 355k, False: 0]
  |  |  ------------------
  |  |  275|   355k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|   355k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|   355k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 130k, False: 224k]
  |  |  ------------------
  ------------------
  757|       |
  758|   355k|    if ((SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|   711k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|   355k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|   355k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 355k]
  |  |  ------------------
  ------------------
  759|      0|            && (extctx & SSL_EXT_TLS_IMPLEMENTATION_ONLY) != 0)
  ------------------
  |  |  291|      0|#define SSL_EXT_TLS_IMPLEMENTATION_ONLY 0x00004
  ------------------
  |  Branch (759:16): [True: 0, False: 0]
  ------------------
  760|       |        /*
  761|       |         * Note that SSL_IS_TLS13() means "TLS 1.3 has been negotiated",
  762|       |         * which is never true when generating the ClientHello.
  763|       |         * However, version negotiation *has* occurred by the time the
  764|       |         * ClientHello extensions are being parsed.
  765|       |         * Be careful to allow TLS 1.3-only extensions when generating
  766|       |         * the ClientHello.
  767|       |         */
  768|   355k|        || (is_tls13 && (extctx & SSL_EXT_TLS1_2_AND_BELOW_ONLY) != 0)
  ------------------
  |  |  295|   130k|#define SSL_EXT_TLS1_2_AND_BELOW_ONLY 0x00010
  ------------------
  |  Branch (768:13): [True: 130k, False: 224k]
  |  Branch (768:25): [True: 14.5k, False: 116k]
  ------------------
  769|   341k|        || (!is_tls13 && (extctx & SSL_EXT_TLS1_3_ONLY) != 0
  ------------------
  |  |  297|   224k|#define SSL_EXT_TLS1_3_ONLY 0x00020
  ------------------
  |  Branch (769:13): [True: 224k, False: 116k]
  |  Branch (769:26): [True: 54.4k, False: 170k]
  ------------------
  770|  54.4k|            && (thisctx & SSL_EXT_CLIENT_HELLO) == 0)
  ------------------
  |  |  300|  54.4k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (770:16): [True: 0, False: 54.4k]
  ------------------
  771|   341k|        || (s->server && !is_tls13 && (extctx & SSL_EXT_TLS1_3_ONLY) != 0)
  ------------------
  |  |  297|  68.9k|#define SSL_EXT_TLS1_3_ONLY 0x00020
  ------------------
  |  Branch (771:13): [True: 152k, False: 188k]
  |  Branch (771:26): [True: 68.9k, False: 83.3k]
  |  Branch (771:39): [True: 18.1k, False: 50.8k]
  ------------------
  772|   322k|        || (s->hit && (extctx & SSL_EXT_IGNORE_ON_RESUMPTION) != 0))
  ------------------
  |  |  299|      0|#define SSL_EXT_IGNORE_ON_RESUMPTION 0x00040
  ------------------
  |  Branch (772:13): [True: 0, False: 322k]
  |  Branch (772:23): [True: 0, False: 0]
  ------------------
  773|  32.6k|        return 0;
  774|   322k|    return 1;
  775|   355k|}
tls_collect_extensions:
  796|  21.6k|{
  797|  21.6k|    PACKET extensions = *packet;
  798|  21.6k|    size_t i = 0;
  799|  21.6k|    size_t num_exts;
  800|  21.6k|    custom_ext_methods *exts = &s->cert->custext;
  801|  21.6k|    RAW_EXTENSION *raw_extensions = NULL;
  802|  21.6k|    const EXTENSION_DEFINITION *thisexd;
  803|       |
  804|  21.6k|    *res = NULL;
  805|       |
  806|       |    /*
  807|       |     * Initialise server side custom extensions. Client side is done during
  808|       |     * construction of extensions for the ClientHello.
  809|       |     */
  810|  21.6k|#ifndef OPENSSL_NO_ECH
  811|  21.6k|    if ((context & SSL_EXT_CLIENT_HELLO) != 0 && s->ext.ech.attempted == 0)
  ------------------
  |  |  300|  21.6k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (811:9): [True: 3.62k, False: 18.0k]
  |  Branch (811:50): [True: 3.62k, False: 0]
  ------------------
  812|  3.62k|        custom_ext_init(&s->cert->custext);
  813|       |#else
  814|       |    if ((context & SSL_EXT_CLIENT_HELLO) != 0)
  815|       |        custom_ext_init(&s->cert->custext);
  816|       |#endif
  817|       |
  818|  21.6k|    num_exts = OSSL_NELEM(ext_defs) + (exts != NULL ? exts->meths_count : 0);
  ------------------
  |  |   14|  21.6k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (818:40): [True: 21.6k, False: 0]
  ------------------
  819|  21.6k|    raw_extensions = OPENSSL_calloc(num_exts, sizeof(*raw_extensions));
  ------------------
  |  |  113|  21.6k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  820|  21.6k|    if (raw_extensions == NULL) {
  ------------------
  |  Branch (820:9): [True: 0, False: 21.6k]
  ------------------
  821|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  822|      0|        return 0;
  823|      0|    }
  824|       |
  825|  21.6k|    i = 0;
  826|  76.1k|    while (PACKET_remaining(&extensions) > 0) {
  ------------------
  |  Branch (826:12): [True: 54.4k, False: 21.6k]
  ------------------
  827|  54.4k|        unsigned int type, idx;
  828|  54.4k|        PACKET extension;
  829|  54.4k|        RAW_EXTENSION *thisex;
  830|       |
  831|  54.4k|        if (!PACKET_get_net_2(&extensions, &type) || !PACKET_get_length_prefixed_2(&extensions, &extension)) {
  ------------------
  |  Branch (831:13): [True: 0, False: 54.4k]
  |  Branch (831:54): [True: 0, False: 54.4k]
  ------------------
  832|      0|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  833|      0|            goto err;
  834|      0|        }
  835|       |        /*
  836|       |         * Verify this extension is allowed. We only check duplicates for
  837|       |         * extensions that we recognise. We also have a special case for the
  838|       |         * PSK extension, which must be the last one in the ClientHello.
  839|       |         */
  840|  54.4k|        if (!verify_extension(s, context, type, exts, raw_extensions, &thisex)
  ------------------
  |  Branch (840:13): [True: 0, False: 54.4k]
  ------------------
  841|  54.4k|            || (thisex != NULL && thisex->present == 1)
  ------------------
  |  Branch (841:17): [True: 54.4k, False: 0]
  |  Branch (841:35): [True: 0, False: 54.4k]
  ------------------
  842|  54.4k|            || (type == TLSEXT_TYPE_psk
  ------------------
  |  |  154|   108k|#define TLSEXT_TYPE_psk 41
  ------------------
  |  Branch (842:17): [True: 0, False: 54.4k]
  ------------------
  843|      0|                && (context & SSL_EXT_CLIENT_HELLO) != 0
  ------------------
  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (843:20): [True: 0, False: 0]
  ------------------
  844|      0|                && PACKET_remaining(&extensions) != 0)) {
  ------------------
  |  Branch (844:20): [True: 0, False: 0]
  ------------------
  845|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  846|      0|            goto err;
  847|      0|        }
  848|       |
  849|       |        /* The server must tolerate the unknown extension and complete. */
  850|  54.4k|        if (thisex == NULL)
  ------------------
  |  Branch (850:13): [True: 0, False: 54.4k]
  ------------------
  851|      0|            continue;
  852|       |
  853|  54.4k|        idx = (unsigned int)(thisex - raw_extensions);
  854|       |        /*-
  855|       |         * Check that we requested this extension (if appropriate). Requests can
  856|       |         * be sent in the ClientHello and CertificateRequest. Unsolicited
  857|       |         * extensions can be sent in the NewSessionTicket. We only do this for
  858|       |         * the built-in extensions. Custom extensions have a different but
  859|       |         * similar check elsewhere.
  860|       |         * Special cases:
  861|       |         * - The HRR cookie extension is unsolicited
  862|       |         * - The renegotiate extension is unsolicited (the client signals
  863|       |         *   support via an SCSV)
  864|       |         * - The signed_certificate_timestamp extension can be provided by a
  865|       |         * custom extension or by the built-in version. We let the extension
  866|       |         * itself handle unsolicited response checks.
  867|       |         */
  868|  54.4k|        if (idx < OSSL_NELEM(ext_defs)
  ------------------
  |  |   14|   108k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (868:13): [True: 54.4k, False: 0]
  ------------------
  869|  54.4k|            && (context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_CERTIFICATE_REQUEST | SSL_EXT_TLS1_3_NEW_SESSION_TICKET)) == 0
  ------------------
  |  |  300|  54.4k|#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
  ------------------
  |  |  308|  54.4k|#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
  ------------------
  |  |  307|  54.4k|#define SSL_EXT_TLS1_3_NEW_SESSION_TICKET 0x02000
  ------------------
  |  Branch (869:16): [True: 10.8k, False: 43.5k]
  ------------------
  870|  10.8k|            && type != TLSEXT_TYPE_cookie
  ------------------
  |  |  157|  65.3k|#define TLSEXT_TYPE_cookie 44
  ------------------
  |  Branch (870:16): [True: 10.8k, False: 0]
  ------------------
  871|  10.8k|            && type != TLSEXT_TYPE_renegotiate
  ------------------
  |  |  166|  65.3k|#define TLSEXT_TYPE_renegotiate 0xff01
  ------------------
  |  Branch (871:16): [True: 10.8k, False: 0]
  ------------------
  872|  10.8k|            && type != TLSEXT_TYPE_signed_certificate_timestamp
  ------------------
  |  |  125|  65.3k|#define TLSEXT_TYPE_signed_certificate_timestamp 18
  ------------------
  |  Branch (872:16): [True: 10.8k, False: 0]
  ------------------
  873|  10.8k|            && (s->ext.extflags[idx] & SSL_EXT_FLAG_SENT) == 0
  ------------------
  |  | 2074|  10.8k|#define SSL_EXT_FLAG_SENT 0x2
  ------------------
  |  Branch (873:16): [True: 0, False: 10.8k]
  ------------------
  874|      0|#ifndef OPENSSL_NO_GOST
  875|      0|            && !((context & SSL_EXT_TLS1_2_SERVER_HELLO) != 0
  ------------------
  |  |  302|      0|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
  |  Branch (875:18): [True: 0, False: 0]
  ------------------
  876|      0|                && type == TLSEXT_TYPE_cryptopro_bug)
  ------------------
  |  |  401|      0|#define TLSEXT_TYPE_cryptopro_bug 0xfde8
  ------------------
  |  Branch (876:20): [True: 0, False: 0]
  ------------------
  877|  54.4k|#endif
  878|  54.4k|        ) {
  879|      0|            SSLfatal(s, SSL_AD_UNSUPPORTED_EXTENSION,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  880|      0|                SSL_R_UNSOLICITED_EXTENSION);
  881|      0|            goto err;
  882|      0|        }
  883|  54.4k|        thisex->data = extension;
  884|  54.4k|        thisex->present = 1;
  885|  54.4k|        thisex->type = type;
  886|  54.4k|        thisex->received_order = i++;
  887|  54.4k|        if (s->ext.debug_cb)
  ------------------
  |  Branch (887:13): [True: 0, False: 54.4k]
  ------------------
  888|      0|            s->ext.debug_cb(SSL_CONNECTION_GET_USER_SSL(s), !s->server,
  ------------------
  |  |   28|      0|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  889|      0|                thisex->type, PACKET_data(&thisex->data),
  890|      0|                (int)PACKET_remaining(&thisex->data),
  891|      0|                s->ext.debug_arg);
  892|  54.4k|    }
  893|       |
  894|  21.6k|    if (init) {
  ------------------
  |  Branch (894:9): [True: 21.6k, False: 0]
  ------------------
  895|       |        /*
  896|       |         * Initialise all known extensions relevant to this context,
  897|       |         * whether we have found them or not
  898|       |         */
  899|   693k|        for (thisexd = ext_defs, i = 0; i < OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|   693k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (899:41): [True: 672k, False: 21.6k]
  ------------------
  900|   672k|            i++, thisexd++) {
  901|   672k|            if (thisexd->init != NULL && (thisexd->context & context) != 0
  ------------------
  |  Branch (901:17): [True: 411k, False: 260k]
  |  Branch (901:42): [True: 134k, False: 277k]
  ------------------
  902|   134k|                && extension_is_relevant(s, thisexd->context, context)
  ------------------
  |  Branch (902:20): [True: 116k, False: 18.1k]
  ------------------
  903|   116k|                && !thisexd->init(s, context)) {
  ------------------
  |  Branch (903:20): [True: 0, False: 116k]
  ------------------
  904|       |                /* SSLfatal() already called */
  905|      0|                goto err;
  906|      0|            }
  907|   672k|        }
  908|  21.6k|    }
  909|       |
  910|  21.6k|    *res = raw_extensions;
  911|  21.6k|    if (len != NULL)
  ------------------
  |  Branch (911:9): [True: 3.62k, False: 18.0k]
  ------------------
  912|  3.62k|        *len = num_exts;
  913|  21.6k|    return 1;
  914|       |
  915|      0|err:
  916|      0|    OPENSSL_free(raw_extensions);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  917|      0|    return 0;
  918|  21.6k|}
tls_parse_extension:
  932|   690k|{
  933|   690k|    RAW_EXTENSION *currext = &exts[idx];
  934|   690k|    int (*parser)(SSL_CONNECTION *s, PACKET *pkt, unsigned int context, X509 *x,
  935|   690k|        size_t chainidx)
  936|   690k|        = NULL;
  937|       |
  938|       |    /* Skip if the extension is not present */
  939|   690k|    if (!currext->present)
  ------------------
  |  Branch (939:9): [True: 625k, False: 65.3k]
  ------------------
  940|   625k|        return 1;
  941|       |
  942|       |    /* Skip if we've already parsed this extension */
  943|  65.3k|    if (currext->parsed)
  ------------------
  |  Branch (943:9): [True: 14.5k, False: 50.8k]
  ------------------
  944|  14.5k|        return 1;
  945|       |
  946|  50.8k|    currext->parsed = 1;
  947|       |
  948|  50.8k|    if (idx < OSSL_NELEM(ext_defs)) {
  ------------------
  |  |   14|  50.8k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (948:9): [True: 50.8k, False: 0]
  ------------------
  949|       |        /* We are handling a built-in extension */
  950|  50.8k|        const EXTENSION_DEFINITION *extdef = &ext_defs[idx];
  951|       |
  952|       |        /* Check if extension is defined for our protocol. If not, skip */
  953|  50.8k|        if (!extension_is_relevant(s, extdef->context, context))
  ------------------
  |  Branch (953:13): [True: 14.5k, False: 36.2k]
  ------------------
  954|  14.5k|            return 1;
  955|       |
  956|  36.2k|        parser = s->server ? extdef->parse_ctos : extdef->parse_stoc;
  ------------------
  |  Branch (956:18): [True: 25.4k, False: 10.8k]
  ------------------
  957|       |
  958|  36.2k|        if (parser != NULL)
  ------------------
  |  Branch (958:13): [True: 36.2k, False: 0]
  ------------------
  959|  36.2k|            return parser(s, &currext->data, context, x, chainidx);
  960|       |
  961|       |        /*
  962|       |         * If the parser is NULL we fall through to the custom extension
  963|       |         * processing
  964|       |         */
  965|  36.2k|    }
  966|       |
  967|       |    /* Parse custom extensions */
  968|      0|    return custom_ext_parse(s, context, currext->type,
  969|      0|        PACKET_data(&currext->data),
  970|      0|        PACKET_remaining(&currext->data),
  971|      0|        x, chainidx);
  972|  50.8k|}
tls_parse_all_extensions:
  984|  21.6k|{
  985|  21.6k|    size_t i, numexts = OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|  21.6k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  986|  21.6k|    const EXTENSION_DEFINITION *thisexd;
  987|       |
  988|       |    /* Calculate the number of extensions in the extensions list */
  989|  21.6k|    numexts += s->cert->custext.meths_count;
  990|       |
  991|       |    /* Parse each extension in turn */
  992|   693k|    for (i = 0; i < numexts; i++) {
  ------------------
  |  Branch (992:17): [True: 672k, False: 21.6k]
  ------------------
  993|   672k|        if (!tls_parse_extension(s, i, context, exts, x, chainidx)) {
  ------------------
  |  Branch (993:13): [True: 0, False: 672k]
  ------------------
  994|       |            /* SSLfatal() already called */
  995|      0|            return 0;
  996|      0|        }
  997|   672k|    }
  998|       |
  999|  21.6k|    if (fin) {
  ------------------
  |  Branch (999:9): [True: 21.6k, False: 0]
  ------------------
 1000|       |        /*
 1001|       |         * Finalise all known extensions relevant to this context,
 1002|       |         * whether we have found them or not
 1003|       |         */
 1004|   693k|        for (i = 0, thisexd = ext_defs; i < OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|   693k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1004:41): [True: 672k, False: 21.6k]
  ------------------
 1005|   672k|            i++, thisexd++) {
 1006|   672k|            if (thisexd->final != NULL && (thisexd->context & context) != 0
  ------------------
  |  Branch (1006:17): [True: 260k, False: 411k]
  |  Branch (1006:43): [True: 79.7k, False: 180k]
  ------------------
 1007|  79.7k|                && !thisexd->final(s, context, exts[i].present)) {
  ------------------
  |  Branch (1007:20): [True: 0, False: 79.7k]
  ------------------
 1008|       |                /* SSLfatal() already called */
 1009|      0|                return 0;
 1010|      0|            }
 1011|   672k|        }
 1012|  21.6k|    }
 1013|       |
 1014|  21.6k|    return 1;
 1015|  21.6k|}
should_add_extension:
 1019|   672k|{
 1020|       |    /* Skip if not relevant for our context */
 1021|   672k|    if ((extctx & thisctx) == 0)
  ------------------
  |  Branch (1021:9): [True: 501k, False: 170k]
  ------------------
 1022|   501k|        return 0;
 1023|       |
 1024|       |    /* Check if this extension is defined for our protocol. If not, skip */
 1025|   170k|    if (!extension_is_relevant(s, extctx, thisctx)
  ------------------
  |  Branch (1025:9): [True: 0, False: 170k]
  ------------------
 1026|   170k|        || ((extctx & SSL_EXT_TLS1_3_ONLY) != 0
  ------------------
  |  |  297|   170k|#define SSL_EXT_TLS1_3_ONLY 0x00020
  ------------------
  |  Branch (1026:13): [True: 57.9k, False: 112k]
  ------------------
 1027|  57.9k|            && (thisctx & SSL_EXT_CLIENT_HELLO) != 0
  ------------------
  |  |  300|  57.9k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (1027:16): [True: 36.2k, False: 21.6k]
  ------------------
 1028|  36.2k|            && (SSL_CONNECTION_IS_DTLS(s) || max_version < TLS1_3_VERSION)))
  ------------------
  |  |  266|  72.5k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  36.2k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  36.2k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 36.2k]
  |  |  ------------------
  ------------------
                          && (SSL_CONNECTION_IS_DTLS(s) || max_version < TLS1_3_VERSION)))
  ------------------
  |  |   27|  36.2k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1028:46): [True: 0, False: 36.2k]
  ------------------
 1029|      0|        return 0;
 1030|       |
 1031|   170k|    return 1;
 1032|   170k|}
tls_construct_extensions:
 1045|  21.6k|{
 1046|  21.6k|    size_t i;
 1047|  21.6k|    int min_version, max_version = 0, reason;
 1048|  21.6k|    const EXTENSION_DEFINITION *thisexd;
 1049|  21.6k|    int for_comp = (context & SSL_EXT_TLS1_3_CERTIFICATE_COMPRESSION) != 0;
  ------------------
  |  |  309|  21.6k|#define SSL_EXT_TLS1_3_CERTIFICATE_COMPRESSION 0x08000
  ------------------
 1050|  21.6k|#ifndef OPENSSL_NO_ECH
 1051|  21.6k|    int pass;
 1052|  21.6k|#endif
 1053|       |
 1054|  21.6k|    if (!WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  43.3k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1054:9): [True: 0, False: 21.6k]
  ------------------
 1055|       |        /*
 1056|       |         * If extensions are of zero length then we don't even add the
 1057|       |         * extensions length bytes to a ClientHello/ServerHello
 1058|       |         * (for non-TLSv1.3).
 1059|       |         */
 1060|  21.6k|        || ((context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_2_SERVER_HELLO)) != 0
  ------------------
  |  |  300|  21.6k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
                      || ((context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_2_SERVER_HELLO)) != 0
  ------------------
  |  |  302|  21.6k|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
  |  Branch (1060:13): [True: 3.62k, False: 18.0k]
  ------------------
 1061|  3.62k|            && !WPACKET_set_flags(pkt,
  ------------------
  |  Branch (1061:16): [True: 0, False: 3.62k]
  ------------------
 1062|  3.62k|                WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH))) {
  ------------------
  |  |  723|  3.62k|#define WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH 2
  ------------------
 1063|      0|        if (!for_comp)
  ------------------
  |  Branch (1063:13): [True: 0, False: 0]
  ------------------
 1064|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1065|      0|        return 0;
 1066|      0|    }
 1067|       |
 1068|  21.6k|    if ((context & SSL_EXT_CLIENT_HELLO) != 0) {
  ------------------
  |  |  300|  21.6k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (1068:9): [True: 3.62k, False: 18.0k]
  ------------------
 1069|  3.62k|        reason = ssl_get_min_max_version(s, &min_version, &max_version, NULL);
 1070|  3.62k|        if (reason != 0) {
  ------------------
  |  Branch (1070:13): [True: 0, False: 3.62k]
  ------------------
 1071|      0|            if (!for_comp)
  ------------------
  |  Branch (1071:17): [True: 0, False: 0]
  ------------------
 1072|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, reason);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1073|      0|            return 0;
 1074|      0|        }
 1075|  3.62k|    }
 1076|       |
 1077|       |    /* Add custom extensions first */
 1078|  21.6k|#ifndef OPENSSL_NO_ECH
 1079|  21.6k|    if ((context & SSL_EXT_CLIENT_HELLO) != 0 && s->ext.ech.attempted == 0)
  ------------------
  |  |  300|  21.6k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (1079:9): [True: 3.62k, False: 18.0k]
  |  Branch (1079:50): [True: 3.62k, False: 0]
  ------------------
 1080|       |        /* On the server side with initialise during ClientHello parsing */
 1081|  3.62k|        custom_ext_init(&s->cert->custext);
 1082|       |#else
 1083|       |    if ((context & SSL_EXT_CLIENT_HELLO) != 0)
 1084|       |        /* On the server side with initialise during ClientHello parsing */
 1085|       |        custom_ext_init(&s->cert->custext);
 1086|       |#endif
 1087|  21.6k|    if (!custom_ext_add(s, context, pkt, x, chainidx, max_version)) {
  ------------------
  |  Branch (1087:9): [True: 0, False: 21.6k]
  ------------------
 1088|       |        /* SSLfatal() already called */
 1089|      0|        return 0;
 1090|      0|    }
 1091|       |
 1092|  21.6k|#ifndef OPENSSL_NO_ECH
 1093|       |    /*
 1094|       |     * Two passes if doing real ECH - we first construct the
 1095|       |     * to-be-ECH-compressed extensions, and then go around again
 1096|       |     * constructing those that aren't to be ECH-compressed. We
 1097|       |     * need to ensure this ordering so that all the ECH-compressed
 1098|       |     * extensions are contiguous in the encoding. The actual
 1099|       |     * compression happens later in ech_encode_inner().
 1100|       |     */
 1101|  65.0k|    for (pass = 0; pass <= 1; pass++)
  ------------------
  |  Branch (1101:20): [True: 43.3k, False: 21.6k]
  ------------------
 1102|  43.3k|#endif
 1103|       |
 1104|  1.38M|        for (i = 0, thisexd = ext_defs; i < OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|  1.38M|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1104:41): [True: 1.34M, False: 43.3k]
  ------------------
 1105|  1.34M|            i++, thisexd++) {
 1106|  1.34M|            EXT_RETURN (*construct)(SSL_CONNECTION *s, WPACKET *pkt,
 1107|  1.34M|                unsigned int context,
 1108|  1.34M|                X509 *x, size_t chainidx);
 1109|  1.34M|            EXT_RETURN ret;
 1110|       |
 1111|  1.34M|#ifndef OPENSSL_NO_ECH
 1112|       |            /* do compressed in pass 0, non-compressed in pass 1 */
 1113|  1.34M|            if (ossl_ech_2bcompressed((int)i) == pass)
  ------------------
  |  Branch (1113:17): [True: 672k, False: 672k]
  ------------------
 1114|   672k|                continue;
 1115|       |            /* stash index - needed for COMPRESS ECH handling */
 1116|   672k|            s->ext.ech.ext_ind = (int)i;
 1117|   672k|#endif
 1118|       |            /* Skip if not relevant for our context */
 1119|   672k|            if (!should_add_extension(s, thisexd->context, context, max_version))
  ------------------
  |  Branch (1119:17): [True: 501k, False: 170k]
  ------------------
 1120|   501k|                continue;
 1121|       |
 1122|   170k|            construct = s->server ? thisexd->construct_stoc
  ------------------
  |  Branch (1122:25): [True: 57.9k, False: 112k]
  ------------------
 1123|   170k|                                  : thisexd->construct_ctos;
 1124|       |
 1125|   170k|            if (construct == NULL)
  ------------------
  |  Branch (1125:17): [True: 14.5k, False: 155k]
  ------------------
 1126|  14.5k|                continue;
 1127|       |
 1128|   155k|            ret = construct(s, pkt, context, x, chainidx);
 1129|   155k|            if (ret == EXT_RETURN_FAIL) {
  ------------------
  |  Branch (1129:17): [True: 0, False: 155k]
  ------------------
 1130|       |                /* SSLfatal() already called */
 1131|      0|                return 0;
 1132|      0|            }
 1133|   155k|            if (ret == EXT_RETURN_SENT
  ------------------
  |  Branch (1133:17): [True: 58.0k, False: 97.8k]
  ------------------
 1134|  58.0k|                && (context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_CERTIFICATE_REQUEST | SSL_EXT_TLS1_3_NEW_SESSION_TICKET)) != 0)
  ------------------
  |  |  300|  58.0k|#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)
  ------------------
  |  |  308|  58.0k|#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)
  ------------------
  |  |  307|  58.0k|#define SSL_EXT_TLS1_3_NEW_SESSION_TICKET 0x02000
  ------------------
  |  Branch (1134:20): [True: 47.1k, False: 10.8k]
  ------------------
 1135|  47.1k|                s->ext.extflags[i] |= SSL_EXT_FLAG_SENT;
  ------------------
  |  | 2074|  47.1k|#define SSL_EXT_FLAG_SENT 0x2
  ------------------
 1136|   155k|        }
 1137|       |
 1138|  21.6k|#ifndef OPENSSL_NO_ECH
 1139|       |    /*
 1140|       |     * don't close yet if client in the middle of doing ECH, we'll
 1141|       |     * eventually close this in ech_aad_and_encrypt() after we add
 1142|       |     * the real ECH extension value
 1143|       |     */
 1144|  21.6k|    if (s->server
  ------------------
  |  Branch (1144:9): [True: 18.0k, False: 3.62k]
  ------------------
 1145|  3.62k|        || context != SSL_EXT_CLIENT_HELLO
  ------------------
  |  |  300|  25.3k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (1145:12): [True: 0, False: 3.62k]
  ------------------
 1146|  3.62k|        || s->ext.ech.attempted == 0
  ------------------
  |  Branch (1146:12): [True: 3.62k, False: 0]
  ------------------
 1147|      0|        || s->ext.ech.ch_depth == 1
  ------------------
  |  Branch (1147:12): [True: 0, False: 0]
  ------------------
 1148|  21.6k|        || s->ext.ech.grease == OSSL_ECH_IS_GREASE) {
  ------------------
  |  |   37|      0|#define OSSL_ECH_IS_GREASE 1 /* when decryption failed or GREASE wanted */
  ------------------
  |  Branch (1148:12): [True: 0, False: 0]
  ------------------
 1149|  21.6k|        if (!WPACKET_close(pkt)) {
  ------------------
  |  Branch (1149:13): [True: 0, False: 21.6k]
  ------------------
 1150|      0|            if (!for_comp)
  ------------------
  |  Branch (1150:17): [True: 0, False: 0]
  ------------------
 1151|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1152|      0|            return 0;
 1153|      0|        }
 1154|  21.6k|    }
 1155|       |#else
 1156|       |    if (!WPACKET_close(pkt)) {
 1157|       |        if (!for_comp)
 1158|       |            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
 1159|       |        return 0;
 1160|       |    }
 1161|       |#endif
 1162|  21.6k|    return 1;
 1163|  21.6k|}
extensions.c:final_renegotiate:
 1173|  3.62k|{
 1174|  3.62k|    if (!s->server) {
  ------------------
  |  Branch (1174:9): [True: 0, False: 3.62k]
  ------------------
 1175|       |        /*
 1176|       |         * Check if we can connect to a server that doesn't support safe
 1177|       |         * renegotiation
 1178|       |         */
 1179|      0|        if (!(s->options & SSL_OP_LEGACY_SERVER_CONNECT)
  ------------------
  |  |  361|      0|#define SSL_OP_LEGACY_SERVER_CONNECT SSL_OP_BIT(2)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1179:13): [True: 0, False: 0]
  ------------------
 1180|      0|            && !(s->options & SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION)
  ------------------
  |  |  397|      0|#define SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION SSL_OP_BIT(18)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1180:16): [True: 0, False: 0]
  ------------------
 1181|      0|            && !sent) {
  ------------------
  |  Branch (1181:16): [True: 0, False: 0]
  ------------------
 1182|      0|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1183|      0|                SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED);
 1184|      0|            return 0;
 1185|      0|        }
 1186|       |
 1187|      0|        return 1;
 1188|      0|    }
 1189|       |
 1190|       |    /* Need RI if renegotiating */
 1191|  3.62k|    if (s->renegotiate
  ------------------
  |  Branch (1191:9): [True: 0, False: 3.62k]
  ------------------
 1192|      0|        && !(s->options & SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION)
  ------------------
  |  |  397|      0|#define SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION SSL_OP_BIT(18)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1192:12): [True: 0, False: 0]
  ------------------
 1193|      0|        && !sent) {
  ------------------
  |  Branch (1193:12): [True: 0, False: 0]
  ------------------
 1194|      0|        SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1195|      0|            SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED);
 1196|      0|        return 0;
 1197|      0|    }
 1198|       |
 1199|  3.62k|    return 1;
 1200|  3.62k|}
extensions.c:init_server_name:
 1212|  10.8k|{
 1213|  10.8k|    if (s->server) {
  ------------------
  |  Branch (1213:9): [True: 3.62k, False: 7.25k]
  ------------------
 1214|  3.62k|        s->servername_done = 0;
 1215|       |
 1216|  3.62k|        OPENSSL_free(s->ext.hostname);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1217|  3.62k|        s->ext.hostname = NULL;
 1218|  3.62k|    }
 1219|       |
 1220|  10.8k|    return 1;
 1221|  10.8k|}
extensions.c:final_server_name:
 1254|  7.25k|{
 1255|  7.25k|    int ret = SSL_TLSEXT_ERR_NOACK;
  ------------------
  |  |  353|  7.25k|#define SSL_TLSEXT_ERR_NOACK 3
  ------------------
 1256|  7.25k|    int altmp = SSL_AD_UNRECOGNIZED_NAME;
  ------------------
  |  | 1276|  7.25k|#define SSL_AD_UNRECOGNIZED_NAME TLS1_AD_UNRECOGNIZED_NAME
  |  |  ------------------
  |  |  |  |   76|  7.25k|#define TLS1_AD_UNRECOGNIZED_NAME 112
  |  |  ------------------
  ------------------
 1257|  7.25k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  7.25k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1258|  7.25k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  7.25k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1259|  7.25k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  7.25k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1260|  7.25k|    int was_ticket = (SSL_get_options(ssl) & SSL_OP_NO_TICKET) == 0;
  ------------------
  |  |  384|  7.25k|#define SSL_OP_NO_TICKET SSL_OP_BIT(14)
  |  |  ------------------
  |  |  |  |  351|  7.25k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
 1261|       |
 1262|  7.25k|    if (!ossl_assert(sctx != NULL) || !ossl_assert(s->session_ctx != NULL)) {
  ------------------
  |  |   52|  14.5k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  14.5k|    __FILE__, __LINE__)
  ------------------
                  if (!ossl_assert(sctx != NULL) || !ossl_assert(s->session_ctx != NULL)) {
  ------------------
  |  |   52|  7.25k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  7.25k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1262:9): [True: 0, False: 7.25k]
  |  Branch (1262:39): [True: 0, False: 7.25k]
  ------------------
 1263|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1264|      0|        return 0;
 1265|      0|    }
 1266|       |
 1267|  7.25k|    if (sctx->ext.servername_cb != NULL)
  ------------------
  |  Branch (1267:9): [True: 0, False: 7.25k]
  ------------------
 1268|      0|        ret = sctx->ext.servername_cb(ussl, &altmp,
 1269|      0|            sctx->ext.servername_arg);
 1270|  7.25k|    else if (s->session_ctx->ext.servername_cb != NULL)
  ------------------
  |  Branch (1270:14): [True: 0, False: 7.25k]
  ------------------
 1271|      0|        ret = s->session_ctx->ext.servername_cb(ussl, &altmp,
 1272|      0|            s->session_ctx->ext.servername_arg);
 1273|       |
 1274|       |    /*
 1275|       |     * For servers, propagate the SNI hostname from the temporary
 1276|       |     * storage in the SSL to the persistent SSL_SESSION, now that we
 1277|       |     * know we accepted it.
 1278|       |     * Clients make this copy when parsing the server's response to
 1279|       |     * the extension, which is when they find out that the negotiation
 1280|       |     * was successful.
 1281|       |     */
 1282|  7.25k|    if (s->server) {
  ------------------
  |  Branch (1282:9): [True: 3.62k, False: 3.62k]
  ------------------
 1283|  3.62k|        if (sent && ret == SSL_TLSEXT_ERR_OK && !s->hit) {
  ------------------
  |  |  350|  7.25k|#define SSL_TLSEXT_ERR_OK 0
  ------------------
  |  Branch (1283:13): [True: 3.62k, False: 0]
  |  Branch (1283:21): [True: 0, False: 3.62k]
  |  Branch (1283:49): [True: 0, False: 0]
  ------------------
 1284|       |            /* Only store the hostname in the session if we accepted it. */
 1285|      0|            OPENSSL_free(s->session->ext.hostname);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1286|      0|            s->session->ext.hostname = OPENSSL_strdup(s->ext.hostname);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1287|      0|            if (s->session->ext.hostname == NULL && s->ext.hostname != NULL) {
  ------------------
  |  Branch (1287:17): [True: 0, False: 0]
  |  Branch (1287:53): [True: 0, False: 0]
  ------------------
 1288|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1289|      0|            }
 1290|      0|        }
 1291|  3.62k|    }
 1292|       |
 1293|       |    /*
 1294|       |     * If we switched contexts (whether here or in the client_hello callback),
 1295|       |     * move the sess_accept increment from the session_ctx to the new
 1296|       |     * context, to avoid the confusing situation of having sess_accept_good
 1297|       |     * exceed sess_accept (zero) for the new context.
 1298|       |     */
 1299|  7.25k|    if (SSL_IS_FIRST_HANDSHAKE(s) && sctx != s->session_ctx
  ------------------
  |  |  285|  14.5k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 7.25k, False: 0]
  |  |  ------------------
  |  |  286|  14.5k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1299:38): [True: 0, False: 7.25k]
  ------------------
 1300|      0|        && s->hello_retry_request == SSL_HRR_NONE) {
  ------------------
  |  Branch (1300:12): [True: 0, False: 0]
  ------------------
 1301|      0|        ssl_tsan_counter(sctx, &sctx->stats.sess_accept);
 1302|      0|        ssl_tsan_decr(s->session_ctx, &s->session_ctx->stats.sess_accept);
 1303|      0|    }
 1304|       |
 1305|       |    /*
 1306|       |     * If we're expecting to send a ticket, and tickets were previously enabled,
 1307|       |     * and now tickets are disabled, then turn off expected ticket.
 1308|       |     * Also, if this is not a resumption, create a new session ID
 1309|       |     */
 1310|  7.25k|    if (ret == SSL_TLSEXT_ERR_OK && s->ext.ticket_expected
  ------------------
  |  |  350|  14.5k|#define SSL_TLSEXT_ERR_OK 0
  ------------------
  |  Branch (1310:9): [True: 0, False: 7.25k]
  |  Branch (1310:37): [True: 0, False: 0]
  ------------------
 1311|      0|        && was_ticket && (SSL_get_options(ssl) & SSL_OP_NO_TICKET) != 0) {
  ------------------
  |  |  384|      0|#define SSL_OP_NO_TICKET SSL_OP_BIT(14)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1311:12): [True: 0, False: 0]
  |  Branch (1311:26): [True: 0, False: 0]
  ------------------
 1312|      0|        s->ext.ticket_expected = 0;
 1313|      0|        if (!s->hit) {
  ------------------
  |  Branch (1313:13): [True: 0, False: 0]
  ------------------
 1314|      0|            SSL_SESSION *ss = SSL_get_session(ssl);
 1315|       |
 1316|      0|            if (ss != NULL) {
  ------------------
  |  Branch (1316:17): [True: 0, False: 0]
  ------------------
 1317|      0|                OPENSSL_free(ss->ext.tick);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1318|      0|                ss->ext.tick = NULL;
 1319|      0|                ss->ext.ticklen = 0;
 1320|      0|                ss->ext.tick_lifetime_hint = 0;
 1321|      0|                ss->ext.tick_age_add = 0;
 1322|      0|                if (!ssl_generate_session_id(s, ss)) {
  ------------------
  |  Branch (1322:21): [True: 0, False: 0]
  ------------------
 1323|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1324|      0|                    return 0;
 1325|      0|                }
 1326|      0|            } else {
 1327|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1328|      0|                return 0;
 1329|      0|            }
 1330|      0|        }
 1331|      0|    }
 1332|       |
 1333|  7.25k|    switch (ret) {
 1334|      0|    case SSL_TLSEXT_ERR_ALERT_FATAL:
  ------------------
  |  |  352|      0|#define SSL_TLSEXT_ERR_ALERT_FATAL 2
  ------------------
  |  Branch (1334:5): [True: 0, False: 7.25k]
  ------------------
 1335|      0|        SSLfatal(s, altmp, SSL_R_CALLBACK_FAILED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1336|      0|        return 0;
 1337|       |
 1338|      0|    case SSL_TLSEXT_ERR_ALERT_WARNING:
  ------------------
  |  |  351|      0|#define SSL_TLSEXT_ERR_ALERT_WARNING 1
  ------------------
  |  Branch (1338:5): [True: 0, False: 7.25k]
  ------------------
 1339|       |        /* TLSv1.3 doesn't have warning alerts so we suppress this */
 1340|      0|        if (!SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      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 (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      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 (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1341|      0|            ssl3_send_alert(s, SSL3_AL_WARNING, altmp);
  ------------------
  |  |  249|      0|#define SSL3_AL_WARNING 1
  ------------------
 1342|      0|        s->servername_done = 0;
 1343|      0|        return 1;
 1344|       |
 1345|  7.25k|    case SSL_TLSEXT_ERR_NOACK:
  ------------------
  |  |  353|  7.25k|#define SSL_TLSEXT_ERR_NOACK 3
  ------------------
  |  Branch (1345:5): [True: 7.25k, False: 0]
  ------------------
 1346|  7.25k|        s->servername_done = 0;
 1347|  7.25k|        return 1;
 1348|       |
 1349|      0|    default:
  ------------------
  |  Branch (1349:5): [True: 0, False: 7.25k]
  ------------------
 1350|      0|        return 1;
 1351|  7.25k|    }
 1352|  7.25k|}
extensions.c:final_maxfragmentlen:
 2017|  7.25k|{
 2018|  7.25k|    if (s->session == NULL)
  ------------------
  |  Branch (2018:9): [True: 0, False: 7.25k]
  ------------------
 2019|      0|        return 1;
 2020|       |
 2021|       |    /* MaxFragmentLength defaults to disabled */
 2022|  7.25k|    if (s->session->ext.max_fragment_len_mode == TLSEXT_max_fragment_length_UNSPECIFIED)
  ------------------
  |  |  242|  7.25k|#define TLSEXT_max_fragment_length_UNSPECIFIED 255
  ------------------
  |  Branch (2022:9): [True: 7.25k, False: 0]
  ------------------
 2023|  7.25k|        s->session->ext.max_fragment_len_mode = TLSEXT_max_fragment_length_DISABLED;
  ------------------
  |  |  235|  7.25k|#define TLSEXT_max_fragment_length_DISABLED 0
  ------------------
 2024|       |
 2025|  7.25k|    if (USE_MAX_FRAGMENT_LENGTH_EXT(s->session)) {
  ------------------
  |  |  304|  7.25k|    IS_MAX_FRAGMENT_LENGTH_EXT_VALID(session->ext.max_fragment_len_mode)
  |  |  ------------------
  |  |  |  |  302|  7.25k|    (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  7.25k|#define TLSEXT_max_fragment_length_512 1
  |  |  |  |  ------------------
  |  |  |  |                   (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  240|      0|#define TLSEXT_max_fragment_length_4096 4
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (302:6): [True: 0, False: 7.25k]
  |  |  |  |  |  Branch (302:53): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2026|      0|        s->rlayer.rrlmethod->set_max_frag_len(s->rlayer.rrl,
 2027|      0|            GET_MAX_FRAGMENT_LENGTH(s->session));
  ------------------
  |  |  306|      0|    (512U << (session->ext.max_fragment_len_mode - 1))
  ------------------
 2028|      0|        s->rlayer.wrlmethod->set_max_frag_len(s->rlayer.wrl,
 2029|      0|            ssl_get_max_send_fragment(s));
 2030|      0|    }
 2031|       |
 2032|  7.25k|    return 1;
 2033|  7.25k|}
extensions.c:init_srp:
 1488|  3.62k|{
 1489|  3.62k|    OPENSSL_free(s->srp_ctx.login);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1490|  3.62k|    s->srp_ctx.login = NULL;
 1491|       |
 1492|  3.62k|    return 1;
 1493|  3.62k|}
extensions.c:init_ec_point_formats:
 1497|  7.25k|{
 1498|  7.25k|    OPENSSL_free(s->ext.peer_ecpointformats);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1499|  7.25k|    s->ext.peer_ecpointformats = NULL;
 1500|  7.25k|    s->ext.peer_ecpointformats_len = 0;
 1501|       |
 1502|  7.25k|    return 1;
 1503|  7.25k|}
extensions.c:final_ec_pt_formats:
 1356|  3.62k|{
 1357|  3.62k|    unsigned long alg_k, alg_a;
 1358|       |
 1359|  3.62k|    if (s->server)
  ------------------
  |  Branch (1359:9): [True: 3.62k, False: 0]
  ------------------
 1360|  3.62k|        return 1;
 1361|       |
 1362|      0|    alg_k = s->s3.tmp.new_cipher->algorithm_mkey;
 1363|      0|    alg_a = s->s3.tmp.new_cipher->algorithm_auth;
 1364|       |
 1365|       |    /*
 1366|       |     * If we are client and using an elliptic curve cryptography cipher
 1367|       |     * suite, then if server returns an EC point formats lists extension it
 1368|       |     * must contain uncompressed.
 1369|       |     */
 1370|      0|    if (s->ext.ecpointformats != NULL
  ------------------
  |  Branch (1370:9): [True: 0, False: 0]
  ------------------
 1371|      0|        && s->ext.ecpointformats_len > 0
  ------------------
  |  Branch (1371:12): [True: 0, False: 0]
  ------------------
 1372|      0|        && s->ext.peer_ecpointformats != NULL
  ------------------
  |  Branch (1372:12): [True: 0, False: 0]
  ------------------
 1373|      0|        && s->ext.peer_ecpointformats_len > 0
  ------------------
  |  Branch (1373:12): [True: 0, False: 0]
  ------------------
 1374|      0|        && ((alg_k & SSL_kECDHE) || (alg_a & SSL_aECDSA))) {
  ------------------
  |  |   89|      0|#define SSL_kECDHE 0x00000004U
  ------------------
                      && ((alg_k & SSL_kECDHE) || (alg_a & SSL_aECDSA))) {
  ------------------
  |  |  118|      0|#define SSL_aECDSA 0x00000008U
  ------------------
  |  Branch (1374:13): [True: 0, False: 0]
  |  Branch (1374:37): [True: 0, False: 0]
  ------------------
 1375|       |        /* we are using an ECC cipher */
 1376|      0|        size_t i;
 1377|      0|        unsigned char *list = s->ext.peer_ecpointformats;
 1378|       |
 1379|      0|        for (i = 0; i < s->ext.peer_ecpointformats_len; i++) {
  ------------------
  |  Branch (1379:21): [True: 0, False: 0]
  ------------------
 1380|      0|            if (*list++ == TLSEXT_ECPOINTFORMAT_uncompressed)
  ------------------
  |  |  185|      0|#define TLSEXT_ECPOINTFORMAT_uncompressed 0
  ------------------
  |  Branch (1380:17): [True: 0, False: 0]
  ------------------
 1381|      0|                break;
 1382|      0|        }
 1383|      0|        if (i == s->ext.peer_ecpointformats_len) {
  ------------------
  |  Branch (1383:13): [True: 0, False: 0]
  ------------------
 1384|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1385|      0|                SSL_R_TLS_INVALID_ECPOINTFORMAT_LIST);
 1386|      0|            return 0;
 1387|      0|        }
 1388|      0|    }
 1389|       |
 1390|      0|    return 1;
 1391|      0|}
extensions.c:init_session_ticket:
 1394|  7.25k|{
 1395|  7.25k|    if (!s->server)
  ------------------
  |  Branch (1395:9): [True: 3.62k, False: 3.62k]
  ------------------
 1396|  3.62k|        s->ext.ticket_expected = 0;
 1397|       |
 1398|  7.25k|    return 1;
 1399|  7.25k|}
extensions.c:init_status_request:
 1403|  10.8k|{
 1404|  10.8k|    if (s->server) {
  ------------------
  |  Branch (1404:9): [True: 3.62k, False: 7.25k]
  ------------------
 1405|  3.62k|        s->ext.status_type = TLSEXT_STATUSTYPE_nothing;
  ------------------
  |  | 2213|  3.62k|#define TLSEXT_STATUSTYPE_nothing -1
  ------------------
 1406|  7.25k|    } else {
 1407|       |        /*
 1408|       |         * Ensure we get sensible values passed to tlsext_status_cb in the event
 1409|       |         * that we don't receive a status message
 1410|       |         */
 1411|  7.25k|        OPENSSL_free(s->ext.ocsp.resp);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1412|  7.25k|        s->ext.ocsp.resp = NULL;
 1413|  7.25k|        s->ext.ocsp.resp_len = 0;
 1414|       |
 1415|  7.25k|        sk_OCSP_RESPONSE_pop_free(s->ext.ocsp.resp_ex, OCSP_RESPONSE_free);
 1416|  7.25k|        s->ext.ocsp.resp_ex = NULL;
 1417|  7.25k|    }
 1418|       |
 1419|  10.8k|    return 1;
 1420|  10.8k|}
extensions.c:init_npn:
 1425|  7.25k|{
 1426|  7.25k|    s->s3.npn_seen = 0;
 1427|       |
 1428|  7.25k|    return 1;
 1429|  7.25k|}
extensions.c:init_alpn:
 1433|  10.8k|{
 1434|  10.8k|    OPENSSL_free(s->s3.alpn_selected);
  ------------------
  |  |  132|  10.8k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1435|  10.8k|    s->s3.alpn_selected = NULL;
 1436|  10.8k|    s->s3.alpn_selected_len = 0;
 1437|  10.8k|    if (s->server) {
  ------------------
  |  Branch (1437:9): [True: 3.62k, False: 7.25k]
  ------------------
 1438|  3.62k|        OPENSSL_free(s->s3.alpn_proposed);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1439|       |        s->s3.alpn_proposed = NULL;
 1440|  3.62k|        s->s3.alpn_proposed_len = 0;
 1441|  3.62k|    }
 1442|  10.8k|    return 1;
 1443|  10.8k|}
extensions.c:final_alpn:
 1446|  7.25k|{
 1447|  7.25k|    if (!s->server && !sent && s->session->ext.alpn_selected != NULL)
  ------------------
  |  Branch (1447:9): [True: 3.62k, False: 3.62k]
  |  Branch (1447:23): [True: 2, False: 3.62k]
  |  Branch (1447:32): [True: 0, False: 2]
  ------------------
 1448|      0|        s->ext.early_data_ok = 0;
 1449|       |
 1450|  7.25k|    if (!s->server || !SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1450:9): [True: 3.62k, False: 3.62k]
  ------------------
 1451|  3.62k|        return 1;
 1452|       |
 1453|       |    /*
 1454|       |     * Call alpn_select callback if needed.  Has to be done after SNI and
 1455|       |     * cipher negotiation (HTTP/2 restricts permitted ciphers). In TLSv1.3
 1456|       |     * we also have to do this before we decide whether to accept early_data.
 1457|       |     * In TLSv1.3 we've already negotiated our cipher so we do this call now.
 1458|       |     * For < TLSv1.3 we defer it until after cipher negotiation.
 1459|       |     *
 1460|       |     * On failure SSLfatal() already called.
 1461|       |     */
 1462|  3.62k|    return tls_handle_alpn(s);
 1463|  7.25k|}
extensions.c:init_srtp:
 1599|  10.8k|{
 1600|  10.8k|    if (s->server)
  ------------------
  |  Branch (1600:9): [True: 3.62k, False: 7.25k]
  ------------------
 1601|  3.62k|        s->srtp_profile = NULL;
 1602|       |
 1603|  10.8k|    return 1;
 1604|  10.8k|}
extensions.c:init_etm:
 1506|  7.25k|{
 1507|  7.25k|    s->ext.use_etm = 0;
 1508|       |
 1509|  7.25k|    return 1;
 1510|  7.25k|}
extensions.c:init_ems:
 1513|  7.25k|{
 1514|  7.25k|    if (s->s3.flags & TLS1_FLAGS_RECEIVED_EXTMS) {
  ------------------
  |  |  300|  7.25k|#define TLS1_FLAGS_RECEIVED_EXTMS 0x0200
  ------------------
  |  Branch (1514:9): [True: 0, False: 7.25k]
  ------------------
 1515|      0|        s->s3.flags &= ~TLS1_FLAGS_RECEIVED_EXTMS;
  ------------------
  |  |  300|      0|#define TLS1_FLAGS_RECEIVED_EXTMS 0x0200
  ------------------
 1516|      0|        s->s3.flags |= TLS1_FLAGS_REQUIRED_EXTMS;
  ------------------
  |  |  307|      0|#define TLS1_FLAGS_REQUIRED_EXTMS 0x1000
  ------------------
 1517|      0|    }
 1518|       |
 1519|  7.25k|    return 1;
 1520|  7.25k|}
extensions.c:final_ems:
 1523|  3.62k|{
 1524|       |    /*
 1525|       |     * Check extended master secret extension is not dropped on
 1526|       |     * renegotiation.
 1527|       |     */
 1528|  3.62k|    if (!(s->s3.flags & TLS1_FLAGS_RECEIVED_EXTMS)
  ------------------
  |  |  300|  3.62k|#define TLS1_FLAGS_RECEIVED_EXTMS 0x0200
  ------------------
  |  Branch (1528:9): [True: 3.62k, False: 0]
  ------------------
 1529|  3.62k|        && (s->s3.flags & TLS1_FLAGS_REQUIRED_EXTMS)) {
  ------------------
  |  |  307|  3.62k|#define TLS1_FLAGS_REQUIRED_EXTMS 0x1000
  ------------------
  |  Branch (1529:12): [True: 0, False: 3.62k]
  ------------------
 1530|      0|        SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_INCONSISTENT_EXTMS);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1531|      0|        return 0;
 1532|      0|    }
 1533|  3.62k|    if (!s->server && s->hit) {
  ------------------
  |  Branch (1533:9): [True: 0, False: 3.62k]
  |  Branch (1533:23): [True: 0, False: 0]
  ------------------
 1534|       |        /*
 1535|       |         * Check extended master secret extension is consistent with
 1536|       |         * original session.
 1537|       |         */
 1538|      0|        if (!(s->s3.flags & TLS1_FLAGS_RECEIVED_EXTMS) != !(s->session->flags & SSL_SESS_FLAG_EXTMS)) {
  ------------------
  |  |  300|      0|#define TLS1_FLAGS_RECEIVED_EXTMS 0x0200
  ------------------
                      if (!(s->s3.flags & TLS1_FLAGS_RECEIVED_EXTMS) != !(s->session->flags & SSL_SESS_FLAG_EXTMS)) {
  ------------------
  |  |  577|      0|#define SSL_SESS_FLAG_EXTMS 0x1
  ------------------
  |  Branch (1538:13): [True: 0, False: 0]
  ------------------
 1539|      0|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_INCONSISTENT_EXTMS);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1540|      0|            return 0;
 1541|      0|        }
 1542|      0|    }
 1543|       |
 1544|  3.62k|    return 1;
 1545|  3.62k|}
extensions.c:init_sig_algs_cert:
 1477|  3.62k|{
 1478|       |    /* Clear any signature algorithms extension received */
 1479|  3.62k|    OPENSSL_free(s->s3.tmp.peer_cert_sigalgs);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1480|  3.62k|    s->s3.tmp.peer_cert_sigalgs = NULL;
 1481|  3.62k|    s->s3.tmp.peer_cert_sigalgslen = 0;
 1482|       |
 1483|  3.62k|    return 1;
 1484|  3.62k|}
extensions.c:init_client_cert_type:
 2204|  10.8k|{
 2205|       |    /* Only reset when parsing client hello */
 2206|  10.8k|    if (sc->server) {
  ------------------
  |  Branch (2206:9): [True: 3.62k, False: 7.25k]
  ------------------
 2207|  3.62k|        sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE;
  ------------------
  |  |  375|  3.62k|#define OSSL_CERT_TYPE_CTOS_NONE 0
  ------------------
 2208|  3.62k|        sc->ext.client_cert_type = TLSEXT_cert_type_x509;
  ------------------
  |  |  248|  3.62k|#define TLSEXT_cert_type_x509 0
  ------------------
 2209|  3.62k|    }
 2210|  10.8k|    return 1;
 2211|  10.8k|}
extensions.c:init_server_cert_type:
 2194|  10.8k|{
 2195|       |    /* Only reset when parsing client hello */
 2196|  10.8k|    if (sc->server) {
  ------------------
  |  Branch (2196:9): [True: 3.62k, False: 7.25k]
  ------------------
 2197|  3.62k|        sc->ext.server_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE;
  ------------------
  |  |  375|  3.62k|#define OSSL_CERT_TYPE_CTOS_NONE 0
  ------------------
 2198|  3.62k|        sc->ext.server_cert_type = TLSEXT_cert_type_x509;
  ------------------
  |  |  248|  3.62k|#define TLSEXT_cert_type_x509 0
  ------------------
 2199|  3.62k|    }
 2200|  10.8k|    return 1;
 2201|  10.8k|}
extensions.c:init_sig_algs:
 1466|  3.62k|{
 1467|       |    /* Clear any signature algorithms extension received */
 1468|  3.62k|    OPENSSL_free(s->s3.tmp.peer_sigalgs);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1469|  3.62k|    s->s3.tmp.peer_sigalgs = NULL;
 1470|  3.62k|    s->s3.tmp.peer_sigalgslen = 0;
 1471|       |
 1472|  3.62k|    return 1;
 1473|  3.62k|}
extensions.c:final_sig_algs:
 1608|  3.62k|{
 1609|  3.62k|    if (!sent && SSL_CONNECTION_IS_TLS13(s) && !s->hit) {
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      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 (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && 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 (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1609:9): [True: 0, False: 3.62k]
  |  Branch (1609:48): [True: 0, False: 0]
  ------------------
 1610|      0|        SSLfatal(s, TLS13_AD_MISSING_EXTENSION,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1611|      0|            SSL_R_MISSING_SIGALGS_EXTENSION);
 1612|      0|        return 0;
 1613|      0|    }
 1614|       |
 1615|  3.62k|    return 1;
 1616|  3.62k|}
extensions.c:final_supported_versions:
 1620|  7.25k|{
 1621|  7.25k|    if (!sent && context == SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST) {
  ------------------
  |  |  305|      0|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
  |  Branch (1621:9): [True: 0, False: 7.25k]
  |  Branch (1621:18): [True: 0, False: 0]
  ------------------
 1622|      0|        SSLfatal(s, TLS13_AD_MISSING_EXTENSION,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1623|      0|            SSL_R_MISSING_SUPPORTED_VERSIONS_EXTENSION);
 1624|      0|        return 0;
 1625|      0|    }
 1626|       |
 1627|  7.25k|    return 1;
 1628|  7.25k|}
extensions.c:final_key_share:
 1631|  7.25k|{
 1632|  7.25k|#if !defined(OPENSSL_NO_TLS1_3)
 1633|  7.25k|    if (!SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  273|  7.25k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.5k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.25k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.25k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.25k, False: 0]
  |  |  ------------------
  |  |  274|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.5k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.25k, False: 0]
  |  |  ------------------
  |  |  275|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.25k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
 1634|      0|        return 1;
 1635|       |
 1636|       |    /* Nothing to do for key_share in an HRR */
 1637|  7.25k|    if ((context & SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST) != 0)
  ------------------
  |  |  305|  7.25k|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
  |  Branch (1637:9): [True: 0, False: 7.25k]
  ------------------
 1638|      0|        return 1;
 1639|       |
 1640|       |    /*
 1641|       |     * If
 1642|       |     *     we are a client
 1643|       |     *     AND
 1644|       |     *     we have no key_share
 1645|       |     *     AND
 1646|       |     *     (we are not resuming
 1647|       |     *      OR the kex_mode doesn't allow non key_share resumes)
 1648|       |     * THEN
 1649|       |     *     fail;
 1650|       |     */
 1651|  7.25k|    if (!s->server
  ------------------
  |  Branch (1651:9): [True: 3.62k, False: 3.62k]
  ------------------
 1652|  3.62k|        && !sent) {
  ------------------
  |  Branch (1652:12): [True: 0, False: 3.62k]
  ------------------
 1653|      0|        if ((s->ext.psk_kex_mode & TLSEXT_KEX_MODE_FLAG_KE) == 0) {
  ------------------
  |  | 2223|      0|#define TLSEXT_KEX_MODE_FLAG_KE 1
  ------------------
  |  Branch (1653:13): [True: 0, False: 0]
  ------------------
 1654|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_NO_SUITABLE_KEY_SHARE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1655|      0|            return 0;
 1656|      0|        }
 1657|      0|        if (!s->hit) {
  ------------------
  |  Branch (1657:13): [True: 0, False: 0]
  ------------------
 1658|      0|            SSLfatal(s, SSL_AD_MISSING_EXTENSION, SSL_R_NO_SUITABLE_KEY_SHARE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1659|      0|            return 0;
 1660|      0|        }
 1661|      0|    }
 1662|       |    /*
 1663|       |     * IF
 1664|       |     *     we are a server
 1665|       |     * THEN
 1666|       |     *     IF
 1667|       |     *         we have a suitable key_share
 1668|       |     *     THEN
 1669|       |     *         IF
 1670|       |     *             we are stateless AND we have no cookie
 1671|       |     *         THEN
 1672|       |     *             send a HelloRetryRequest
 1673|       |     *     ELSE
 1674|       |     *         IF
 1675|       |     *             we didn't already send a HelloRetryRequest
 1676|       |     *             AND
 1677|       |     *             the client sent a key_share extension
 1678|       |     *             AND
 1679|       |     *             (we are not resuming
 1680|       |     *              OR the kex_mode allows key_share resumes)
 1681|       |     *             AND
 1682|       |     *             a shared group exists
 1683|       |     *         THEN
 1684|       |     *             send a HelloRetryRequest
 1685|       |     *         ELSE IF
 1686|       |     *             we are not resuming
 1687|       |     *             OR
 1688|       |     *             the kex_mode doesn't allow non key_share resumes
 1689|       |     *         THEN
 1690|       |     *             fail
 1691|       |     *         ELSE IF
 1692|       |     *             we are stateless AND we have no cookie
 1693|       |     *         THEN
 1694|       |     *             send a HelloRetryRequest
 1695|       |     */
 1696|  7.25k|    if (s->server) {
  ------------------
  |  Branch (1696:9): [True: 3.62k, False: 3.62k]
  ------------------
 1697|  3.62k|        if (s->s3.peer_tmp != NULL) {
  ------------------
  |  Branch (1697:13): [True: 3.62k, False: 0]
  ------------------
 1698|       |            /* We have a suitable key_share */
 1699|  3.62k|            if ((s->s3.flags & TLS1_FLAGS_STATELESS) != 0
  ------------------
  |  |  304|  3.62k|#define TLS1_FLAGS_STATELESS 0x0800
  ------------------
  |  Branch (1699:17): [True: 0, False: 3.62k]
  ------------------
 1700|      0|                && !s->ext.cookieok) {
  ------------------
  |  Branch (1700:20): [True: 0, False: 0]
  ------------------
 1701|      0|                if (!ossl_assert(s->hello_retry_request == SSL_HRR_NONE)) {
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (1701:21): [True: 0, False: 0]
  ------------------
 1702|       |                    /*
 1703|       |                     * If we are stateless then we wouldn't know about any
 1704|       |                     * previously sent HRR - so how can this be anything other
 1705|       |                     * than 0?
 1706|       |                     */
 1707|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1708|      0|                    return 0;
 1709|      0|                }
 1710|      0|                s->hello_retry_request = SSL_HRR_PENDING;
 1711|      0|                return 1;
 1712|      0|            }
 1713|  3.62k|        } else {
 1714|       |            /* No suitable key_share */
 1715|      0|            if (s->hello_retry_request == SSL_HRR_NONE && sent
  ------------------
  |  Branch (1715:17): [True: 0, False: 0]
  |  Branch (1715:59): [True: 0, False: 0]
  ------------------
 1716|      0|                && (!s->hit
  ------------------
  |  Branch (1716:21): [True: 0, False: 0]
  ------------------
 1717|      0|                    || (s->ext.psk_kex_mode & TLSEXT_KEX_MODE_FLAG_KE_DHE) != 0)) {
  ------------------
  |  | 2224|      0|#define TLSEXT_KEX_MODE_FLAG_KE_DHE 2
  ------------------
  |  Branch (1717:24): [True: 0, False: 0]
  ------------------
 1718|       |
 1719|       |                /* Did we detect group overlap in tls_parse_ctos_key_share ? */
 1720|      0|                if (s->s3.group_id_candidate != 0) {
  ------------------
  |  Branch (1720:21): [True: 0, False: 0]
  ------------------
 1721|       |                    /* A shared group exists so send a HelloRetryRequest */
 1722|      0|                    s->s3.group_id = s->s3.group_id_candidate;
 1723|      0|                    s->hello_retry_request = SSL_HRR_PENDING;
 1724|      0|                    return 1;
 1725|      0|                }
 1726|      0|            }
 1727|      0|            if (!s->hit
  ------------------
  |  Branch (1727:17): [True: 0, False: 0]
  ------------------
 1728|      0|                || (s->ext.psk_kex_mode & TLSEXT_KEX_MODE_FLAG_KE) == 0) {
  ------------------
  |  | 2223|      0|#define TLSEXT_KEX_MODE_FLAG_KE 1
  ------------------
  |  Branch (1728:20): [True: 0, False: 0]
  ------------------
 1729|       |                /* Nothing left we can do - just fail */
 1730|      0|                SSLfatal(s, sent ? SSL_AD_HANDSHAKE_FAILURE : SSL_AD_MISSING_EXTENSION,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  |  |  |  Branch (155:48): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1731|      0|                    SSL_R_NO_SUITABLE_KEY_SHARE);
 1732|      0|                return 0;
 1733|      0|            }
 1734|       |
 1735|      0|            if ((s->s3.flags & TLS1_FLAGS_STATELESS) != 0
  ------------------
  |  |  304|      0|#define TLS1_FLAGS_STATELESS 0x0800
  ------------------
  |  Branch (1735:17): [True: 0, False: 0]
  ------------------
 1736|      0|                && !s->ext.cookieok) {
  ------------------
  |  Branch (1736:20): [True: 0, False: 0]
  ------------------
 1737|      0|                if (!ossl_assert(s->hello_retry_request == SSL_HRR_NONE)) {
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (1737:21): [True: 0, False: 0]
  ------------------
 1738|       |                    /*
 1739|       |                     * If we are stateless then we wouldn't know about any
 1740|       |                     * previously sent HRR - so how can this be anything other
 1741|       |                     * than 0?
 1742|       |                     */
 1743|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1744|      0|                    return 0;
 1745|      0|                }
 1746|      0|                s->hello_retry_request = SSL_HRR_PENDING;
 1747|      0|                return 1;
 1748|      0|            }
 1749|      0|        }
 1750|       |
 1751|       |        /*
 1752|       |         * We have a key_share so don't send any more HelloRetryRequest
 1753|       |         * messages
 1754|       |         */
 1755|  3.62k|        if (s->hello_retry_request == SSL_HRR_PENDING)
  ------------------
  |  Branch (1755:13): [True: 0, False: 3.62k]
  ------------------
 1756|      0|            s->hello_retry_request = SSL_HRR_COMPLETE;
 1757|  3.62k|    } else {
 1758|       |        /*
 1759|       |         * For a client side resumption with no key_share we need to generate
 1760|       |         * the handshake secret (otherwise this is done during key_share
 1761|       |         * processing).
 1762|       |         */
 1763|  3.62k|        if (!sent && !tls13_generate_handshake_secret(s, NULL, 0)) {
  ------------------
  |  Branch (1763:13): [True: 0, False: 3.62k]
  |  Branch (1763:22): [True: 0, False: 0]
  ------------------
 1764|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1765|      0|            return 0;
 1766|      0|        }
 1767|  3.62k|    }
 1768|  7.25k|#endif /* !defined(OPENSSL_NO_TLS1_3) */
 1769|  7.25k|    return 1;
 1770|  7.25k|}
extensions.c:tls_construct_compress_certificate:
 2070|  3.62k|{
 2071|       |#ifndef OPENSSL_NO_COMP_ALG
 2072|       |    int i;
 2073|       |
 2074|       |    if (!ossl_comp_has_alg(0))
 2075|       |        return EXT_RETURN_NOT_SENT;
 2076|       |
 2077|       |    /* Server: Don't attempt to compress a non-X509 (i.e. an RPK) */
 2078|       |    if (sc->server && sc->ext.server_cert_type != TLSEXT_cert_type_x509) {
 2079|       |        sc->cert_comp_prefs[0] = TLSEXT_comp_cert_none;
 2080|       |        return EXT_RETURN_NOT_SENT;
 2081|       |    }
 2082|       |
 2083|       |    /* Client: If we sent a client cert-type extension, don't indicate compression */
 2084|       |    if (!sc->server && sc->ext.client_cert_type_ctos) {
 2085|       |        sc->cert_comp_prefs[0] = TLSEXT_comp_cert_none;
 2086|       |        return EXT_RETURN_NOT_SENT;
 2087|       |    }
 2088|       |
 2089|       |    /* Do not indicate we support receiving compressed certificates */
 2090|       |    if ((sc->options & SSL_OP_NO_RX_CERTIFICATE_COMPRESSION) != 0)
 2091|       |        return EXT_RETURN_NOT_SENT;
 2092|       |
 2093|       |    if (sc->cert_comp_prefs[0] == TLSEXT_comp_cert_none)
 2094|       |        return EXT_RETURN_NOT_SENT;
 2095|       |#ifndef OPENSSL_NO_ECH
 2096|       |    ECH_SAME_EXT(sc, context, pkt);
 2097|       |#endif
 2098|       |
 2099|       |    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_compress_certificate)
 2100|       |        || !WPACKET_start_sub_packet_u16(pkt)
 2101|       |        || !WPACKET_start_sub_packet_u8(pkt))
 2102|       |        goto err;
 2103|       |
 2104|       |    for (i = 0; sc->cert_comp_prefs[i] != TLSEXT_comp_cert_none; i++) {
 2105|       |        if (!WPACKET_put_bytes_u16(pkt, sc->cert_comp_prefs[i]))
 2106|       |            goto err;
 2107|       |    }
 2108|       |    if (!WPACKET_close(pkt) || !WPACKET_close(pkt))
 2109|       |        goto err;
 2110|       |
 2111|       |    sc->ext.compress_certificate_sent = 1;
 2112|       |    return EXT_RETURN_SENT;
 2113|       |err:
 2114|       |    SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
 2115|       |    return EXT_RETURN_FAIL;
 2116|       |#else
 2117|  3.62k|    return EXT_RETURN_NOT_SENT;
 2118|  3.62k|#endif
 2119|  3.62k|}
extensions.c:final_early_data:
 1973|  14.4k|{
 1974|  14.4k|    if (!sent)
  ------------------
  |  Branch (1974:9): [True: 14.4k, False: 0]
  ------------------
 1975|  14.4k|        return 1;
 1976|       |
 1977|      0|    if (!s->server) {
  ------------------
  |  Branch (1977:9): [True: 0, False: 0]
  ------------------
 1978|      0|        if (context == SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS
  ------------------
  |  |  304|      0|#define SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS 0x00400
  ------------------
  |  Branch (1978:13): [True: 0, False: 0]
  ------------------
 1979|      0|            && sent
  ------------------
  |  Branch (1979:16): [True: 0, False: 0]
  ------------------
 1980|      0|            && !s->ext.early_data_ok) {
  ------------------
  |  Branch (1980:16): [True: 0, False: 0]
  ------------------
 1981|       |            /*
 1982|       |             * If we get here then the server accepted our early_data but we
 1983|       |             * later realised that it shouldn't have done (e.g. inconsistent
 1984|       |             * ALPN)
 1985|       |             */
 1986|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_EARLY_DATA);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1987|      0|            return 0;
 1988|      0|        }
 1989|       |
 1990|      0|        return 1;
 1991|      0|    }
 1992|       |
 1993|      0|    if (s->max_early_data == 0
  ------------------
  |  Branch (1993:9): [True: 0, False: 0]
  ------------------
 1994|      0|        || !s->hit
  ------------------
  |  Branch (1994:12): [True: 0, False: 0]
  ------------------
 1995|      0|        || s->early_data_state != SSL_EARLY_DATA_ACCEPTING
  ------------------
  |  Branch (1995:12): [True: 0, False: 0]
  ------------------
 1996|      0|        || !s->ext.early_data_ok
  ------------------
  |  Branch (1996:12): [True: 0, False: 0]
  ------------------
 1997|      0|        || s->hello_retry_request != SSL_HRR_NONE
  ------------------
  |  Branch (1997:12): [True: 0, False: 0]
  ------------------
 1998|      0|        || (s->allow_early_data_cb != NULL
  ------------------
  |  Branch (1998:13): [True: 0, False: 0]
  ------------------
 1999|      0|            && !s->allow_early_data_cb(SSL_CONNECTION_GET_USER_SSL(s),
  ------------------
  |  |   28|      0|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  |  Branch (1999:16): [True: 0, False: 0]
  ------------------
 2000|      0|                s->allow_early_data_cb_data))) {
 2001|      0|        s->ext.early_data = SSL_EARLY_DATA_REJECTED;
  ------------------
  |  | 2073|      0|#define SSL_EARLY_DATA_REJECTED 1
  ------------------
 2002|      0|    } else {
 2003|      0|        s->ext.early_data = SSL_EARLY_DATA_ACCEPTED;
  ------------------
  |  | 2074|      0|#define SSL_EARLY_DATA_ACCEPTED 2
  ------------------
 2004|       |
 2005|      0|        if (!tls13_change_cipher_state(s,
  ------------------
  |  Branch (2005:13): [True: 0, False: 0]
  ------------------
 2006|      0|                SSL3_CC_EARLY | SSL3_CHANGE_CIPHER_SERVER_READ)) {
  ------------------
  |  |  346|      0|#define SSL3_CC_EARLY 0x040
  ------------------
                              SSL3_CC_EARLY | SSL3_CHANGE_CIPHER_SERVER_READ)) {
  ------------------
  |  |  350|      0|#define SSL3_CHANGE_CIPHER_SERVER_READ (SSL3_CC_SERVER | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  345|      0|#define SSL3_CC_SERVER 0x020
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_SERVER_READ (SSL3_CC_SERVER | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  342|      0|#define SSL3_CC_READ 0x001
  |  |  ------------------
  ------------------
 2007|       |            /* SSLfatal() already called */
 2008|      0|            return 0;
 2009|      0|        }
 2010|      0|    }
 2011|       |
 2012|      0|    return 1;
 2013|      0|}
extensions.c:tls_construct_certificate_authorities:
 1559|  3.62k|{
 1560|  3.62k|    const STACK_OF(X509_NAME) *ca_sk = get_ca_names(s);
 1561|       |
 1562|  3.62k|    if (ca_sk == NULL || sk_X509_NAME_num(ca_sk) == 0)
  ------------------
  |  |   56|  3.62k|#define sk_X509_NAME_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_sk_type(sk))
  ------------------
  |  Branch (1562:9): [True: 0, False: 3.62k]
  |  Branch (1562:26): [True: 3.62k, False: 0]
  ------------------
 1563|  3.62k|        return EXT_RETURN_NOT_SENT;
 1564|       |
 1565|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_certificate_authorities)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1565:9): [True: 0, False: 0]
  ------------------
 1566|      0|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1566:12): [True: 0, False: 0]
  ------------------
 1567|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1568|      0|        return EXT_RETURN_FAIL;
 1569|      0|    }
 1570|       |
 1571|      0|    if (!construct_ca_names(s, ca_sk, pkt)) {
  ------------------
  |  Branch (1571:9): [True: 0, False: 0]
  ------------------
 1572|       |        /* SSLfatal() already called */
 1573|      0|        return EXT_RETURN_FAIL;
 1574|      0|    }
 1575|       |
 1576|      0|    if (!WPACKET_close(pkt)) {
  ------------------
  |  Branch (1576:9): [True: 0, False: 0]
  ------------------
 1577|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1578|      0|        return EXT_RETURN_FAIL;
 1579|      0|    }
 1580|       |
 1581|      0|    return EXT_RETURN_SENT;
 1582|      0|}
extensions.c:init_ech:
 1229|  3.62k|{
 1230|  3.62k|    const int nexts = OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|  3.62k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 1231|       |
 1232|       |    /* we don't need this assert everywhere - anywhere is fine */
 1233|  3.62k|    if (!ossl_assert(TLSEXT_IDX_num_builtins == nexts)) {
  ------------------
  |  |   52|  3.62k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  3.62k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1233:9): [True: 0, False: 3.62k]
  ------------------
 1234|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1235|      0|        return 0;
 1236|      0|    }
 1237|  3.62k|    if ((context & SSL_EXT_CLIENT_HELLO) != 0)
  ------------------
  |  |  300|  3.62k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (1237:9): [True: 0, False: 3.62k]
  ------------------
 1238|      0|        s->ext.ech.done = 0;
 1239|  3.62k|    return 1;
 1240|  3.62k|}
extensions.c:final_ech:
 1243|  7.25k|{
 1244|  7.25k|    if (s->server && s->ext.ech.success == 1
  ------------------
  |  Branch (1244:9): [True: 3.62k, False: 3.62k]
  |  Branch (1244:22): [True: 0, False: 3.62k]
  ------------------
 1245|      0|        && s->ext.ech.inner_ech_seen_ok != 1) {
  ------------------
  |  Branch (1245:12): [True: 0, False: 0]
  ------------------
 1246|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_ECH_REQUIRED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1247|      0|        return 0;
 1248|      0|    }
 1249|  7.25k|    return 1;
 1250|  7.25k|}
extensions.c:final_psk:
 2048|  7.25k|{
 2049|  7.25k|    if (s->server && sent && s->clienthello != NULL
  ------------------
  |  Branch (2049:9): [True: 3.62k, False: 3.62k]
  |  Branch (2049:22): [True: 0, False: 3.62k]
  |  Branch (2049:30): [True: 0, False: 0]
  ------------------
 2050|      0|        && !s->clienthello->pre_proc_exts[TLSEXT_IDX_psk_kex_modes].present) {
  ------------------
  |  Branch (2050:12): [True: 0, False: 0]
  ------------------
 2051|      0|        SSLfatal(s, TLS13_AD_MISSING_EXTENSION,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2052|      0|            SSL_R_MISSING_PSK_KEX_MODES_EXTENSION);
 2053|      0|        return 0;
 2054|      0|    }
 2055|       |
 2056|  7.25k|    return 1;
 2057|  7.25k|}
extensions.c:validate_context:
  629|  61.6k|{
  630|       |    /* Check we're allowed to use this extension in this context */
  631|  61.6k|    if ((thisctx & extctx) == 0)
  ------------------
  |  Branch (631:9): [True: 0, False: 61.6k]
  ------------------
  632|      0|        return 0;
  633|       |
  634|  61.6k|    if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  61.6k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  61.6k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  61.6k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 61.6k]
  |  |  ------------------
  ------------------
  635|      0|        if ((extctx & SSL_EXT_TLS_ONLY) != 0)
  ------------------
  |  |  287|      0|#define SSL_EXT_TLS_ONLY 0x00001
  ------------------
  |  Branch (635:13): [True: 0, False: 0]
  ------------------
  636|      0|            return 0;
  637|  61.6k|    } else if ((extctx & SSL_EXT_DTLS_ONLY) != 0) {
  ------------------
  |  |  289|  61.6k|#define SSL_EXT_DTLS_ONLY 0x00002
  ------------------
  |  Branch (637:16): [True: 0, False: 61.6k]
  ------------------
  638|      0|        return 0;
  639|      0|    }
  640|       |
  641|  61.6k|    return 1;
  642|  61.6k|}
extensions.c:verify_extension:
  692|  54.4k|{
  693|  54.4k|    size_t i;
  694|  54.4k|    size_t builtin_num = OSSL_NELEM(ext_defs);
  ------------------
  |  |   14|  54.4k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  695|  54.4k|    const EXTENSION_DEFINITION *thisext;
  696|       |
  697|   725k|    for (i = 0, thisext = ext_defs; i < builtin_num; i++, thisext++) {
  ------------------
  |  Branch (697:37): [True: 725k, False: 0]
  ------------------
  698|   725k|        if (type == thisext->type) {
  ------------------
  |  Branch (698:13): [True: 54.4k, False: 671k]
  ------------------
  699|  54.4k|            if (!validate_context(s, thisext->context, context))
  ------------------
  |  Branch (699:17): [True: 0, False: 54.4k]
  ------------------
  700|      0|                return 0;
  701|       |
  702|  54.4k|            *found = &rawexlist[i];
  703|  54.4k|            return 1;
  704|  54.4k|        }
  705|   725k|    }
  706|       |
  707|       |    /* Check the custom extensions */
  708|      0|    if (meths != NULL) {
  ------------------
  |  Branch (708:9): [True: 0, False: 0]
  ------------------
  709|      0|        size_t offset = 0;
  710|      0|        ENDPOINT role = ENDPOINT_BOTH;
  711|      0|        custom_ext_method *meth = NULL;
  712|       |
  713|      0|        if ((context & SSL_EXT_CLIENT_HELLO) != 0) {
  ------------------
  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (713:13): [True: 0, False: 0]
  ------------------
  714|      0|#ifndef OPENSSL_NO_ECH
  715|      0|            if (s->ext.ech.attempted == 1 && s->ext.ech.ch_depth == 1)
  ------------------
  |  Branch (715:17): [True: 0, False: 0]
  |  Branch (715:46): [True: 0, False: 0]
  ------------------
  716|      0|                role = ENDPOINT_CLIENT;
  717|      0|            else
  718|      0|                role = ENDPOINT_SERVER;
  719|       |#else
  720|       |            role = ENDPOINT_SERVER;
  721|       |#endif
  722|      0|        } else if ((context & SSL_EXT_TLS1_2_SERVER_HELLO) != 0)
  ------------------
  |  |  302|      0|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
  |  Branch (722:20): [True: 0, False: 0]
  ------------------
  723|      0|            role = ENDPOINT_CLIENT;
  724|       |
  725|      0|        meth = custom_ext_find(meths, role, type, &offset);
  726|      0|        if (meth != NULL) {
  ------------------
  |  Branch (726:13): [True: 0, False: 0]
  ------------------
  727|      0|            if (!validate_context(s, meth->context, context))
  ------------------
  |  Branch (727:17): [True: 0, False: 0]
  ------------------
  728|      0|                return 0;
  729|      0|            *found = &rawexlist[offset + builtin_num];
  730|      0|            return 1;
  731|      0|        }
  732|      0|    }
  733|       |
  734|       |    /* Unknown extension. We allow it */
  735|      0|    *found = NULL;
  736|      0|    return 1;
  737|      0|}

tls_construct_ctos_renegotiate:
   31|  3.62k|{
   32|  3.62k|    if (!s->renegotiate) {
  ------------------
  |  Branch (32:9): [True: 3.62k, False: 0]
  ------------------
   33|       |        /* If not renegotiating, send an empty RI extension to indicate support */
   34|       |
   35|       |#if DTLS_MAX_VERSION_INTERNAL != DTLS1_2_VERSION
   36|       |#error Internal DTLS version error
   37|       |#endif
   38|       |
   39|  3.62k|        if (!SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (39:13): [True: 3.62k, False: 0]
  ------------------
   40|  3.62k|            && (s->min_proto_version >= TLS1_3_VERSION
  ------------------
  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (40:17): [True: 0, False: 3.62k]
  ------------------
   41|  3.62k|                || (ssl_security(s, SSL_SECOP_VERSION, 0, TLS1_VERSION, NULL)
  ------------------
  |  | 2768|  3.62k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2729|  3.62k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
                              || (ssl_security(s, SSL_SECOP_VERSION, 0, TLS1_VERSION, NULL)
  ------------------
  |  |   24|  3.62k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (41:21): [True: 0, False: 3.62k]
  ------------------
   42|      0|                    && s->min_proto_version <= TLS1_VERSION))) {
  ------------------
  |  |   24|      0|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (42:24): [True: 0, False: 0]
  ------------------
   43|       |            /*
   44|       |             * For TLS <= 1.0 SCSV is used instead, and for TLS 1.3 this
   45|       |             * extension isn't used at all.
   46|       |             */
   47|      0|            return EXT_RETURN_NOT_SENT;
   48|      0|        }
   49|       |
   50|  3.62k|#ifndef OPENSSL_NO_ECH
   51|  3.62k|        ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  3.62k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  7.25k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 3.62k, False: 0]
  |  |  |  Branch (317:44): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  318|  3.62k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 3.62k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
   52|  3.62k|#endif
   53|       |
   54|  3.62k|        if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_renegotiate)
  ------------------
  |  |  911|  7.25k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (54:13): [True: 0, False: 3.62k]
  ------------------
   55|  3.62k|            || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  7.25k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (55:16): [True: 0, False: 3.62k]
  ------------------
   56|  3.62k|            || !WPACKET_put_bytes_u8(pkt, 0)
  ------------------
  |  |  909|  7.25k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (56:16): [True: 0, False: 3.62k]
  ------------------
   57|  3.62k|            || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (57:16): [True: 0, False: 3.62k]
  ------------------
   58|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   59|      0|            return EXT_RETURN_FAIL;
   60|      0|        }
   61|       |
   62|  3.62k|        return EXT_RETURN_SENT;
   63|  3.62k|    }
   64|       |
   65|      0|#ifndef OPENSSL_NO_ECH
   66|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
   67|      0|#endif
   68|       |
   69|       |    /* Add a complete RI extension if renegotiating */
   70|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_renegotiate)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (70:9): [True: 0, False: 0]
  ------------------
   71|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (71:12): [True: 0, False: 0]
  ------------------
   72|      0|        || !WPACKET_sub_memcpy_u8(pkt, s->s3.previous_client_finished,
  ------------------
  |  |  938|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (72:12): [True: 0, False: 0]
  ------------------
   73|      0|            s->s3.previous_client_finished_len)
   74|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (74:12): [True: 0, False: 0]
  ------------------
   75|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   76|      0|        return EXT_RETURN_FAIL;
   77|      0|    }
   78|       |
   79|      0|    return EXT_RETURN_SENT;
   80|      0|}
tls_construct_ctos_server_name:
   85|  3.62k|{
   86|  3.62k|    char *chosen = s->ext.hostname;
   87|  3.62k|#ifndef OPENSSL_NO_ECH
   88|  3.62k|    OSSL_HPKE_SUITE suite;
   89|  3.62k|    OSSL_ECHSTORE_ENTRY *ee = NULL;
   90|       |
   91|  3.62k|    if (s->ext.ech.es != NULL) {
  ------------------
  |  Branch (91:9): [True: 0, False: 3.62k]
  ------------------
   92|      0|        if (ossl_ech_pick_matching_cfg(s, &ee, &suite) != 1) {
  ------------------
  |  Branch (92:13): [True: 0, False: 0]
  ------------------
   93|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   94|      0|            return EXT_RETURN_NOT_SENT;
   95|      0|        }
   96|       |        /* Don't send outer SNI if external API says so */
   97|      0|        if (s->ext.ech.ch_depth == 0 && s->ext.ech.no_outer == 1)
  ------------------
  |  Branch (97:13): [True: 0, False: 0]
  |  Branch (97:41): [True: 0, False: 0]
  ------------------
   98|      0|            return EXT_RETURN_NOT_SENT;
   99|      0|        if (s->ext.ech.ch_depth == 1) /* inner */
  ------------------
  |  Branch (99:13): [True: 0, False: 0]
  ------------------
  100|      0|            chosen = s->ext.hostname;
  101|      0|        if (s->ext.ech.ch_depth == 0) { /* outer */
  ------------------
  |  Branch (101:13): [True: 0, False: 0]
  ------------------
  102|      0|            if (s->ext.ech.outer_hostname != NULL) /* prefer API */
  ------------------
  |  Branch (102:17): [True: 0, False: 0]
  ------------------
  103|      0|                chosen = s->ext.ech.outer_hostname;
  104|      0|            else /* use name from ECHConfig */
  105|      0|                chosen = ee->public_name;
  106|      0|        }
  107|      0|    }
  108|  3.62k|#endif
  109|  3.62k|    if (chosen == NULL)
  ------------------
  |  Branch (109:9): [True: 0, False: 3.62k]
  ------------------
  110|      0|        return EXT_RETURN_NOT_SENT;
  111|       |    /* Add TLS extension servername to the Client Hello message */
  112|  3.62k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_server_name)
  ------------------
  |  |  911|  7.25k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (112:9): [True: 0, False: 3.62k]
  ------------------
  113|       |        /* Sub-packet for server_name extension */
  114|  3.62k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  7.25k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (114:12): [True: 0, False: 3.62k]
  ------------------
  115|       |        /* Sub-packet for servername list (always 1 hostname)*/
  116|  3.62k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  7.25k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (116:12): [True: 0, False: 3.62k]
  ------------------
  117|  3.62k|        || !WPACKET_put_bytes_u8(pkt, TLSEXT_NAMETYPE_host_name)
  ------------------
  |  |  909|  7.25k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (117:12): [True: 0, False: 3.62k]
  ------------------
  118|  3.62k|        || !WPACKET_sub_memcpy_u16(pkt, chosen, strlen(chosen))
  ------------------
  |  |  940|  7.25k|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (118:12): [True: 0, False: 3.62k]
  ------------------
  119|  3.62k|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (119:12): [True: 0, False: 3.62k]
  ------------------
  120|  3.62k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (120:12): [True: 0, False: 3.62k]
  ------------------
  121|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  122|      0|        return EXT_RETURN_FAIL;
  123|      0|    }
  124|  3.62k|    return EXT_RETURN_SENT;
  125|  3.62k|}
tls_construct_ctos_maxfragmentlen:
  131|  3.62k|{
  132|  3.62k|    if (s->ext.max_fragment_len_mode == TLSEXT_max_fragment_length_DISABLED)
  ------------------
  |  |  235|  3.62k|#define TLSEXT_max_fragment_length_DISABLED 0
  ------------------
  |  Branch (132:9): [True: 3.62k, False: 0]
  ------------------
  133|  3.62k|        return EXT_RETURN_NOT_SENT;
  134|      0|#ifndef OPENSSL_NO_ECH
  135|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  136|      0|#endif
  137|       |
  138|       |    /* Add Max Fragment Length extension if client enabled it. */
  139|       |    /*-
  140|       |     * 4 bytes for this extension type and extension length
  141|       |     * 1 byte for the Max Fragment Length code value.
  142|       |     */
  143|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_max_fragment_length)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (143:9): [True: 0, False: 0]
  ------------------
  144|       |        /* Sub-packet for Max Fragment Length extension (1 byte) */
  145|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (145:12): [True: 0, False: 0]
  ------------------
  146|      0|        || !WPACKET_put_bytes_u8(pkt, s->ext.max_fragment_len_mode)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (146:12): [True: 0, False: 0]
  ------------------
  147|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (147:12): [True: 0, False: 0]
  ------------------
  148|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  149|      0|        return EXT_RETURN_FAIL;
  150|      0|    }
  151|       |
  152|      0|    return EXT_RETURN_SENT;
  153|      0|}
tls_construct_ctos_srp:
  159|  3.62k|{
  160|       |    /* Add SRP username if there is one */
  161|  3.62k|    if (s->srp_ctx.login == NULL)
  ------------------
  |  Branch (161:9): [True: 3.62k, False: 0]
  ------------------
  162|  3.62k|        return EXT_RETURN_NOT_SENT;
  163|      0|#ifndef OPENSSL_NO_ECH
  164|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  165|      0|#endif
  166|       |
  167|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_srp)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (167:9): [True: 0, False: 0]
  ------------------
  168|       |        /* Sub-packet for SRP extension */
  169|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (169:12): [True: 0, False: 0]
  ------------------
  170|      0|        || !WPACKET_start_sub_packet_u8(pkt)
  ------------------
  |  |  810|      0|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (170:12): [True: 0, False: 0]
  ------------------
  171|       |        /* login must not be zero...internal error if so */
  172|      0|        || !WPACKET_set_flags(pkt, WPACKET_FLAGS_NON_ZERO_LENGTH)
  ------------------
  |  |  717|      0|#define WPACKET_FLAGS_NON_ZERO_LENGTH 1
  ------------------
  |  Branch (172:12): [True: 0, False: 0]
  ------------------
  173|      0|        || !WPACKET_memcpy(pkt, s->srp_ctx.login,
  ------------------
  |  Branch (173:12): [True: 0, False: 0]
  ------------------
  174|      0|            strlen(s->srp_ctx.login))
  175|      0|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (175:12): [True: 0, False: 0]
  ------------------
  176|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (176:12): [True: 0, False: 0]
  ------------------
  177|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  178|      0|        return EXT_RETURN_FAIL;
  179|      0|    }
  180|       |
  181|      0|    return EXT_RETURN_SENT;
  182|      0|}
tls_construct_ctos_ec_pt_formats:
  263|  3.62k|{
  264|  3.62k|    const unsigned char *pformats;
  265|  3.62k|    size_t num_formats;
  266|  3.62k|    int reason, min_version, max_version;
  267|       |
  268|  3.62k|    reason = ssl_get_min_max_version(s, &min_version, &max_version, NULL);
  269|  3.62k|    if (reason != 0) {
  ------------------
  |  Branch (269:9): [True: 0, False: 3.62k]
  ------------------
  270|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, reason);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  271|      0|        return EXT_RETURN_FAIL;
  272|      0|    }
  273|  3.62k|    if (!negotiate_dhe(s, ptfmt_check, min_version, max_version))
  ------------------
  |  Branch (273:9): [True: 0, False: 3.62k]
  ------------------
  274|      0|        return EXT_RETURN_NOT_SENT;
  275|       |
  276|  3.62k|    tls1_get_formatlist(s, &pformats, &num_formats);
  277|  3.62k|    if (num_formats == 0)
  ------------------
  |  Branch (277:9): [True: 0, False: 3.62k]
  ------------------
  278|      0|        return EXT_RETURN_NOT_SENT;
  279|  3.62k|#ifndef OPENSSL_NO_ECH
  280|  3.62k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  3.62k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  7.25k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 3.62k, False: 0]
  |  |  |  Branch (317:44): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  318|  3.62k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 3.62k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  281|  3.62k|#endif
  282|       |
  283|       |    /* Add TLS extension ECPointFormats to the ClientHello message */
  284|  3.62k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_ec_point_formats)
  ------------------
  |  |  911|  7.25k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (284:9): [True: 0, False: 3.62k]
  ------------------
  285|       |        /* Sub-packet for formats extension */
  286|  3.62k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  7.25k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (286:12): [True: 0, False: 3.62k]
  ------------------
  287|  3.62k|        || !WPACKET_sub_memcpy_u8(pkt, pformats, num_formats)
  ------------------
  |  |  938|  7.25k|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (287:12): [True: 0, False: 3.62k]
  ------------------
  288|  3.62k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (288:12): [True: 0, False: 3.62k]
  ------------------
  289|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  290|      0|        return EXT_RETURN_FAIL;
  291|      0|    }
  292|       |
  293|  3.62k|    return EXT_RETURN_SENT;
  294|  3.62k|}
tls_construct_ctos_supported_groups:
  299|  3.62k|{
  300|  3.62k|    const uint16_t *pgroups = NULL;
  301|  3.62k|    size_t num_groups = 0, i, tls13added = 0, added = 0;
  302|  3.62k|    int min_version, max_version, reason;
  303|  3.62k|    int dtls = SSL_CONNECTION_IS_DTLS(s);
  ------------------
  |  |  266|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  304|  3.62k|    int use_ecdhe, use_ffdhe;
  305|       |
  306|  3.62k|    reason = ssl_get_min_max_version(s, &min_version, &max_version, NULL);
  307|  3.62k|    if (reason != 0) {
  ------------------
  |  Branch (307:9): [True: 0, False: 3.62k]
  ------------------
  308|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, reason);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  309|      0|        return EXT_RETURN_FAIL;
  310|      0|    }
  311|       |
  312|       |    /*
  313|       |     * If we don't support suitable groups, don't send the extension
  314|       |     */
  315|  3.62k|    use_ecdhe = negotiate_dhe(s, ecdhe_check, min_version, max_version);
  316|  3.62k|    use_ffdhe = negotiate_dhe(s, ffdhe_check, min_version, max_version);
  317|  3.62k|    if (!use_ecdhe && !use_ffdhe
  ------------------
  |  Branch (317:9): [True: 0, False: 3.62k]
  |  Branch (317:23): [True: 0, False: 0]
  ------------------
  318|      0|        && (dtls ? DTLS_VERSION_LE(max_version, DTLS1_2_VERSION)
  ------------------
  |  |   65|      0|#define DTLS_VERSION_LE(v1, v2) (dtls_ver_ordinal(v1) >= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LE(v1, v2) (dtls_ver_ordinal(v1) >= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (318:12): [True: 0, False: 0]
  |  Branch (318:13): [True: 0, False: 0]
  ------------------
  319|      0|                 : (max_version <= TLS1_2_VERSION)))
  ------------------
  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  ------------------
  320|      0|        return EXT_RETURN_NOT_SENT;
  321|  3.62k|#ifndef OPENSSL_NO_ECH
  322|  3.62k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  3.62k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  7.25k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 3.62k, False: 0]
  |  |  |  Branch (317:44): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  318|  3.62k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 3.62k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  323|  3.62k|#endif
  324|       |
  325|       |    /*
  326|       |     * Add TLS extension supported_groups to the ClientHello message
  327|       |     */
  328|  3.62k|    tls1_get_supported_groups(s, &pgroups, &num_groups);
  329|       |
  330|  3.62k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_supported_groups)
  ------------------
  |  |  911|  7.25k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (330:9): [True: 0, False: 3.62k]
  ------------------
  331|       |        /* Sub-packet for supported_groups extension */
  332|  3.62k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  7.25k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (332:12): [True: 0, False: 3.62k]
  ------------------
  333|  3.62k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  7.25k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (333:12): [True: 0, False: 3.62k]
  ------------------
  334|  3.62k|        || !WPACKET_set_flags(pkt, WPACKET_FLAGS_NON_ZERO_LENGTH)) {
  ------------------
  |  |  717|  3.62k|#define WPACKET_FLAGS_NON_ZERO_LENGTH 1
  ------------------
  |  Branch (334:12): [True: 0, False: 3.62k]
  ------------------
  335|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  336|      0|        return EXT_RETURN_FAIL;
  337|      0|    }
  338|       |    /* Copy group ID if supported */
  339|  43.5k|    for (i = 0; i < num_groups; i++) {
  ------------------
  |  Branch (339:17): [True: 39.9k, False: 3.62k]
  ------------------
  340|  39.9k|        const TLS_GROUP_INFO *ginfo = NULL;
  341|  39.9k|        uint16_t ctmp = pgroups[i];
  342|  39.9k|        int okfortls13;
  343|       |
  344|  39.9k|        if (!tls_valid_group(s, ctmp, min_version, max_version, &okfortls13,
  ------------------
  |  Branch (344:13): [True: 0, False: 39.9k]
  ------------------
  345|  39.9k|                &ginfo)
  346|  39.9k|            || (!use_ecdhe && is_ecdhe_group(ginfo->group_id))
  ------------------
  |  Branch (346:17): [True: 0, False: 39.9k]
  |  Branch (346:31): [True: 0, False: 0]
  ------------------
  347|  39.9k|            || (!use_ffdhe && is_ffdhe_group(ginfo->group_id))
  ------------------
  |  Branch (347:17): [True: 0, False: 39.9k]
  |  Branch (347:31): [True: 0, False: 0]
  ------------------
  348|       |            /* Note: SSL_SECOP_CURVE_SUPPORTED covers all key exchange groups */
  349|  39.9k|            || !tls_group_allowed(s, ctmp, SSL_SECOP_CURVE_SUPPORTED))
  ------------------
  |  | 2760|  39.9k|#define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2731|  39.9k|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  |  Branch (349:16): [True: 0, False: 39.9k]
  ------------------
  350|      0|            continue;
  351|       |
  352|  39.9k|        if (!WPACKET_put_bytes_u16(pkt, ctmp)) {
  ------------------
  |  |  911|  39.9k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (352:13): [True: 0, False: 39.9k]
  ------------------
  353|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  354|      0|            return EXT_RETURN_FAIL;
  355|      0|        }
  356|  39.9k|        if (okfortls13 && max_version == TLS1_3_VERSION)
  ------------------
  |  |   27|  39.9k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (356:13): [True: 39.9k, False: 0]
  |  Branch (356:27): [True: 39.9k, False: 0]
  ------------------
  357|  39.9k|            tls13added++;
  358|  39.9k|        added++;
  359|  39.9k|    }
  360|  3.62k|    if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (360:9): [True: 0, False: 3.62k]
  |  Branch (360:32): [True: 0, False: 3.62k]
  ------------------
  361|      0|        if (added == 0)
  ------------------
  |  Branch (361:13): [True: 0, False: 0]
  ------------------
  362|      0|            SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  159|      0|        ossl_statem_fatal)
  ------------------
                          SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  | 1266|      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,
  ------------------
  |  |  217|      0|#define SSL_R_NO_SUITABLE_GROUPS 295
  ------------------
  363|      0|                "No groups enabled for max supported SSL/TLS version");
  364|      0|        else
  365|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  366|      0|        return EXT_RETURN_FAIL;
  367|      0|    }
  368|       |
  369|  3.62k|    if (tls13added == 0 && max_version == TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (369:9): [True: 0, False: 3.62k]
  |  Branch (369:28): [True: 0, False: 0]
  ------------------
  370|      0|        SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  159|      0|        ossl_statem_fatal)
  ------------------
                      SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  | 1266|      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,
  ------------------
  |  |  217|      0|#define SSL_R_NO_SUITABLE_GROUPS 295
  ------------------
  371|      0|            "No groups enabled for max supported SSL/TLS version");
  372|      0|        return EXT_RETURN_FAIL;
  373|      0|    }
  374|       |
  375|  3.62k|    return EXT_RETURN_SENT;
  376|  3.62k|}
tls_construct_ctos_session_ticket:
  381|  3.62k|{
  382|  3.62k|    size_t ticklen;
  383|       |
  384|  3.62k|    if (!tls_use_ticket(s))
  ------------------
  |  Branch (384:9): [True: 3.62k, False: 0]
  ------------------
  385|  3.62k|        return EXT_RETURN_NOT_SENT;
  386|      0|#ifndef OPENSSL_NO_ECH
  387|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  388|      0|#endif
  389|       |
  390|      0|    if (!s->new_session && s->session != NULL
  ------------------
  |  Branch (390:9): [True: 0, False: 0]
  |  Branch (390:28): [True: 0, False: 0]
  ------------------
  391|      0|        && s->session->ext.tick != NULL
  ------------------
  |  Branch (391:12): [True: 0, False: 0]
  ------------------
  392|      0|        && s->session->ssl_version != TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (392:12): [True: 0, False: 0]
  ------------------
  393|      0|        ticklen = s->session->ext.ticklen;
  394|      0|    } else if (s->session && s->ext.session_ticket != NULL
  ------------------
  |  Branch (394:16): [True: 0, False: 0]
  |  Branch (394:30): [True: 0, False: 0]
  ------------------
  395|      0|        && s->ext.session_ticket->data != NULL) {
  ------------------
  |  Branch (395:12): [True: 0, False: 0]
  ------------------
  396|      0|        ticklen = s->ext.session_ticket->length;
  397|      0|        s->session->ext.tick = OPENSSL_malloc(ticklen);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  398|      0|        if (s->session->ext.tick == NULL) {
  ------------------
  |  Branch (398:13): [True: 0, False: 0]
  ------------------
  399|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  400|      0|            return EXT_RETURN_FAIL;
  401|      0|        }
  402|      0|        memcpy(s->session->ext.tick,
  403|      0|            s->ext.session_ticket->data, ticklen);
  404|      0|        s->session->ext.ticklen = ticklen;
  405|      0|    } else {
  406|      0|        ticklen = 0;
  407|      0|    }
  408|       |
  409|      0|    if (ticklen == 0 && s->ext.session_ticket != NULL && s->ext.session_ticket->data == NULL)
  ------------------
  |  Branch (409:9): [True: 0, False: 0]
  |  Branch (409:25): [True: 0, False: 0]
  |  Branch (409:58): [True: 0, False: 0]
  ------------------
  410|      0|        return EXT_RETURN_NOT_SENT;
  411|       |
  412|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_session_ticket)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (412:9): [True: 0, False: 0]
  ------------------
  413|      0|        || !WPACKET_sub_memcpy_u16(pkt, s->session->ext.tick, ticklen)) {
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (413:12): [True: 0, False: 0]
  ------------------
  414|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  415|      0|        return EXT_RETURN_FAIL;
  416|      0|    }
  417|       |
  418|      0|    return EXT_RETURN_SENT;
  419|      0|}
tls_construct_ctos_sig_algs:
  424|  3.62k|{
  425|  3.62k|    size_t salglen;
  426|  3.62k|    const uint16_t *salg;
  427|       |
  428|       |    /*
  429|       |     * This used both in the initial hello and as part of renegotiation,
  430|       |     * in the latter case, the client version may be already set and may
  431|       |     * be lower than that initially offered in `client_version`.
  432|       |     */
  433|  3.62k|    if (!SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (433:9): [True: 3.62k, False: 0]
  ------------------
  434|  3.62k|        if (s->client_version < TLS1_2_VERSION
  ------------------
  |  |   26|  7.25k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (434:13): [True: 0, False: 3.62k]
  ------------------
  435|  3.62k|            || (s->ssl.method->version != TLS_ANY_VERSION
  ------------------
  |  |   40|  7.25k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (435:17): [True: 0, False: 3.62k]
  ------------------
  436|      0|                && s->version < TLS1_2_VERSION))
  ------------------
  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (436:20): [True: 0, False: 0]
  ------------------
  437|      0|            return EXT_RETURN_NOT_SENT;
  438|  3.62k|    } else {
  439|      0|        if (DTLS_VERSION_LT(s->client_version, DTLS1_2_VERSION)
  ------------------
  |  |   64|      0|#define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (64:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  440|      0|            || (s->ssl.method->version != DTLS_ANY_VERSION
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (440:17): [True: 0, False: 0]
  ------------------
  441|      0|                && DTLS_VERSION_LT(s->version, DTLS1_2_VERSION)))
  ------------------
  |  |   64|      0|#define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (64:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  442|      0|            return EXT_RETURN_NOT_SENT;
  443|      0|    }
  444|       |
  445|  3.62k|#ifndef OPENSSL_NO_ECH
  446|  3.62k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  3.62k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  7.25k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 3.62k, False: 0]
  |  |  |  Branch (317:44): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  318|  3.62k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 3.62k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  447|  3.62k|#endif
  448|       |
  449|  3.62k|    salglen = tls12_get_psigalgs(s, 1, &salg);
  450|  3.62k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_signature_algorithms)
  ------------------
  |  |  911|  7.25k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (450:9): [True: 0, False: 3.62k]
  ------------------
  451|       |        /* Sub-packet for sig-algs extension */
  452|  3.62k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  7.25k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (452:12): [True: 0, False: 3.62k]
  ------------------
  453|       |        /* Sub-packet for the actual list */
  454|  3.62k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  7.25k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (454:12): [True: 0, False: 3.62k]
  ------------------
  455|  3.62k|        || !tls12_copy_sigalgs(s, pkt, salg, salglen)
  ------------------
  |  Branch (455:12): [True: 0, False: 3.62k]
  ------------------
  456|  3.62k|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (456:12): [True: 0, False: 3.62k]
  ------------------
  457|  3.62k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (457:12): [True: 0, False: 3.62k]
  ------------------
  458|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  459|      0|        return EXT_RETURN_FAIL;
  460|      0|    }
  461|       |
  462|  3.62k|    return EXT_RETURN_SENT;
  463|  3.62k|}
tls_construct_ctos_status_request:
  469|  3.62k|{
  470|  3.62k|    int i;
  471|       |
  472|       |    /* This extension isn't defined for client Certificates */
  473|  3.62k|    if (x != NULL)
  ------------------
  |  Branch (473:9): [True: 0, False: 3.62k]
  ------------------
  474|      0|        return EXT_RETURN_NOT_SENT;
  475|       |
  476|  3.62k|    if (s->ext.status_type != TLSEXT_STATUSTYPE_ocsp)
  ------------------
  |  |  181|  3.62k|#define TLSEXT_STATUSTYPE_ocsp 1
  ------------------
  |  Branch (476:9): [True: 3.62k, False: 0]
  ------------------
  477|  3.62k|        return EXT_RETURN_NOT_SENT;
  478|      0|#ifndef OPENSSL_NO_ECH
  479|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  480|      0|#endif
  481|       |
  482|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_status_request)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (482:9): [True: 0, False: 0]
  ------------------
  483|       |        /* Sub-packet for status request extension */
  484|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (484:12): [True: 0, False: 0]
  ------------------
  485|      0|        || !WPACKET_put_bytes_u8(pkt, TLSEXT_STATUSTYPE_ocsp)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (485:12): [True: 0, False: 0]
  ------------------
  486|       |        /* Sub-packet for the ids */
  487|      0|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (487:12): [True: 0, False: 0]
  ------------------
  488|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  489|      0|        return EXT_RETURN_FAIL;
  490|      0|    }
  491|      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 (491:17): [True: 0, False: 0]
  ------------------
  492|      0|        unsigned char *idbytes;
  493|      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)))
  ------------------
  494|      0|        int idlen = i2d_OCSP_RESPID(id, NULL);
  495|       |
  496|      0|        if (idlen <= 0
  ------------------
  |  Branch (496:13): [True: 0, False: 0]
  ------------------
  497|       |            /* Sub-packet for an individual id */
  498|      0|            || !WPACKET_sub_allocate_bytes_u16(pkt, idlen, &idbytes)
  ------------------
  |  |  851|      0|    WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 2)
  ------------------
  |  Branch (498:16): [True: 0, False: 0]
  ------------------
  499|      0|            || i2d_OCSP_RESPID(id, &idbytes) != idlen) {
  ------------------
  |  Branch (499:16): [True: 0, False: 0]
  ------------------
  500|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      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|      0|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (505:12): [True: 0, False: 0]
  ------------------
  506|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  507|      0|        return EXT_RETURN_FAIL;
  508|      0|    }
  509|      0|    if (s->ext.ocsp.exts) {
  ------------------
  |  Branch (509:9): [True: 0, False: 0]
  ------------------
  510|      0|        unsigned char *extbytes;
  511|      0|        int extlen = i2d_X509_EXTENSIONS(s->ext.ocsp.exts, NULL);
  512|       |
  513|      0|        if (extlen < 0) {
  ------------------
  |  Branch (513:13): [True: 0, False: 0]
  ------------------
  514|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  515|      0|            return EXT_RETURN_FAIL;
  516|      0|        }
  517|      0|        if (!WPACKET_allocate_bytes(pkt, extlen, &extbytes)
  ------------------
  |  Branch (517:13): [True: 0, False: 0]
  ------------------
  518|      0|            || i2d_X509_EXTENSIONS(s->ext.ocsp.exts, &extbytes)
  ------------------
  |  Branch (518:16): [True: 0, False: 0]
  ------------------
  519|      0|                != extlen) {
  520|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  521|      0|            return EXT_RETURN_FAIL;
  522|      0|        }
  523|      0|    }
  524|      0|    if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (524:9): [True: 0, False: 0]
  |  Branch (524:32): [True: 0, False: 0]
  ------------------
  525|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  526|      0|        return EXT_RETURN_FAIL;
  527|      0|    }
  528|       |
  529|      0|    return EXT_RETURN_SENT;
  530|      0|}
tls_construct_ctos_npn:
  537|  3.62k|{
  538|  3.62k|    if (SSL_CONNECTION_GET_CTX(s)->ext.npn_select_cb == NULL
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  |  Branch (538:9): [True: 3.62k, False: 0]
  ------------------
  539|      0|        || !SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  285|      0|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 0, False: 0]
  |  |  ------------------
  |  |  286|      0|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  540|  3.62k|        return EXT_RETURN_NOT_SENT;
  541|      0|#ifndef OPENSSL_NO_ECH
  542|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  543|      0|#endif
  544|       |
  545|       |    /*
  546|       |     * The client advertises an empty extension to indicate its support
  547|       |     * for Next Protocol Negotiation
  548|       |     */
  549|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_next_proto_neg)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (549:9): [True: 0, False: 0]
  ------------------
  550|      0|        || !WPACKET_put_bytes_u16(pkt, 0)) {
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (550:12): [True: 0, False: 0]
  ------------------
  551|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  552|      0|        return EXT_RETURN_FAIL;
  553|      0|    }
  554|       |
  555|      0|    return EXT_RETURN_SENT;
  556|      0|}
tls_construct_ctos_alpn:
  562|  3.62k|{
  563|  3.62k|    unsigned char *aval = s->ext.alpn;
  564|  3.62k|    size_t alen = s->ext.alpn_len;
  565|       |
  566|  3.62k|    s->s3.alpn_sent = 0;
  567|  3.62k|    if (!SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  285|  3.62k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  286|  3.62k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  568|      0|        return EXT_RETURN_NOT_SENT;
  569|  3.62k|#ifndef OPENSSL_NO_ECH
  570|       |    /*
  571|       |     * If we have different alpn and alpn_outer values, then we set
  572|       |     * the appropriate one for inner and outer.
  573|       |     * If no alpn is set (for inner or outer), we don't send any.
  574|       |     * If only an inner is set then we send the same in both.
  575|       |     * Logic above is on the basis that alpn's aren't that sensitive,
  576|       |     * usually, so special action is needed to do better.
  577|       |     * We also don't support a way to send alpn only in the inner.
  578|       |     * If you don't want the inner value in the outer, you have to
  579|       |     * pick what to send in the outer and send that.
  580|       |     */
  581|  3.62k|    if (s->ext.ech.ch_depth == 1 && s->ext.alpn == NULL) /* inner */
  ------------------
  |  Branch (581:9): [True: 0, False: 3.62k]
  |  Branch (581:37): [True: 0, False: 0]
  ------------------
  582|      0|        return EXT_RETURN_NOT_SENT;
  583|  3.62k|    if (s->ext.ech.ch_depth == 0 && s->ext.alpn == NULL
  ------------------
  |  Branch (583:9): [True: 3.62k, False: 0]
  |  Branch (583:37): [True: 0, False: 3.62k]
  ------------------
  584|      0|        && s->ext.ech.alpn_outer == NULL) /* outer */
  ------------------
  |  Branch (584:12): [True: 0, False: 0]
  ------------------
  585|      0|        return EXT_RETURN_NOT_SENT;
  586|  3.62k|    if (s->ext.ech.ch_depth == 0 && s->ext.ech.alpn_outer != NULL) {
  ------------------
  |  Branch (586:9): [True: 3.62k, False: 0]
  |  Branch (586:37): [True: 0, False: 3.62k]
  ------------------
  587|      0|        aval = s->ext.ech.alpn_outer;
  588|      0|        alen = s->ext.ech.alpn_outer_len;
  589|      0|    }
  590|  3.62k|#endif
  591|  3.62k|    if (aval == NULL)
  ------------------
  |  Branch (591:9): [True: 0, False: 3.62k]
  ------------------
  592|      0|        return EXT_RETURN_NOT_SENT;
  593|  3.62k|    if (!WPACKET_put_bytes_u16(pkt,
  ------------------
  |  |  911|  7.25k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (593:9): [True: 0, False: 3.62k]
  ------------------
  594|  3.62k|            TLSEXT_TYPE_application_layer_protocol_negotiation)
  595|       |        /* Sub-packet ALPN extension */
  596|  3.62k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  7.25k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (596:12): [True: 0, False: 3.62k]
  ------------------
  597|  3.62k|        || !WPACKET_sub_memcpy_u16(pkt, aval, alen)
  ------------------
  |  |  940|  7.25k|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (597:12): [True: 0, False: 3.62k]
  ------------------
  598|  3.62k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (598:12): [True: 0, False: 3.62k]
  ------------------
  599|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  600|      0|        return EXT_RETURN_FAIL;
  601|      0|    }
  602|  3.62k|    s->s3.alpn_sent = 1;
  603|  3.62k|    return EXT_RETURN_SENT;
  604|  3.62k|}
tls_construct_ctos_use_srtp:
  610|  3.62k|{
  611|  3.62k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  612|  3.62k|    STACK_OF(SRTP_PROTECTION_PROFILE) *clnt = SSL_get_srtp_profiles(ssl);
  ------------------
  |  |   33|  3.62k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  613|  3.62k|    int i, end;
  614|       |
  615|  3.62k|    if (clnt == NULL)
  ------------------
  |  Branch (615:9): [True: 3.62k, False: 0]
  ------------------
  616|  3.62k|        return EXT_RETURN_NOT_SENT;
  617|      0|#ifndef OPENSSL_NO_ECH
  618|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  619|      0|#endif
  620|       |
  621|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_use_srtp)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (621:9): [True: 0, False: 0]
  ------------------
  622|       |        /* Sub-packet for SRTP extension */
  623|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (623:12): [True: 0, False: 0]
  ------------------
  624|       |        /* Sub-packet for the protection profile list */
  625|      0|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (625:12): [True: 0, False: 0]
  ------------------
  626|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  627|      0|        return EXT_RETURN_FAIL;
  628|      0|    }
  629|       |
  630|      0|    end = sk_SRTP_PROTECTION_PROFILE_num(clnt);
  ------------------
  |  |  251|      0|#define sk_SRTP_PROTECTION_PROFILE_num(sk) OPENSSL_sk_num(ossl_check_const_SRTP_PROTECTION_PROFILE_sk_type(sk))
  ------------------
  631|      0|    for (i = 0; i < end; i++) {
  ------------------
  |  Branch (631:17): [True: 0, False: 0]
  ------------------
  632|      0|        const SRTP_PROTECTION_PROFILE *prof = sk_SRTP_PROTECTION_PROFILE_value(clnt, i);
  ------------------
  |  |  252|      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)))
  ------------------
  633|       |
  634|      0|        if (prof == NULL || !WPACKET_put_bytes_u16(pkt, prof->id)) {
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (634:13): [True: 0, False: 0]
  |  Branch (634:29): [True: 0, False: 0]
  ------------------
  635|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  636|      0|            return EXT_RETURN_FAIL;
  637|      0|        }
  638|      0|    }
  639|      0|    if (!WPACKET_close(pkt)
  ------------------
  |  Branch (639:9): [True: 0, False: 0]
  ------------------
  640|       |        /* Add an empty use_mki value */
  641|      0|        || !WPACKET_put_bytes_u8(pkt, 0)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (641:12): [True: 0, False: 0]
  ------------------
  642|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (642:12): [True: 0, False: 0]
  ------------------
  643|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  644|      0|        return EXT_RETURN_FAIL;
  645|      0|    }
  646|       |
  647|      0|    return EXT_RETURN_SENT;
  648|      0|}
tls_construct_ctos_etm:
  654|  3.62k|{
  655|  3.62k|    if (s->options & SSL_OP_NO_ENCRYPT_THEN_MAC)
  ------------------
  |  |  399|  3.62k|#define SSL_OP_NO_ENCRYPT_THEN_MAC SSL_OP_BIT(19)
  |  |  ------------------
  |  |  |  |  351|  3.62k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (655:9): [True: 0, False: 3.62k]
  ------------------
  656|      0|        return EXT_RETURN_NOT_SENT;
  657|  3.62k|#ifndef OPENSSL_NO_ECH
  658|  3.62k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  3.62k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  7.25k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 3.62k, False: 0]
  |  |  |  Branch (317:44): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  318|  3.62k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 3.62k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  659|  3.62k|#endif
  660|       |
  661|  3.62k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_encrypt_then_mac)
  ------------------
  |  |  911|  7.25k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (661:9): [True: 0, False: 3.62k]
  ------------------
  662|  3.62k|        || !WPACKET_put_bytes_u16(pkt, 0)) {
  ------------------
  |  |  911|  3.62k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (662:12): [True: 0, False: 3.62k]
  ------------------
  663|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  664|      0|        return EXT_RETURN_FAIL;
  665|      0|    }
  666|       |
  667|  3.62k|    return EXT_RETURN_SENT;
  668|  3.62k|}
tls_construct_ctos_sct:
  674|  3.62k|{
  675|  3.62k|    if (s->ct_validation_callback == NULL)
  ------------------
  |  Branch (675:9): [True: 3.62k, False: 0]
  ------------------
  676|  3.62k|        return EXT_RETURN_NOT_SENT;
  677|       |
  678|       |    /* Not defined for client Certificates */
  679|      0|    if (x != NULL)
  ------------------
  |  Branch (679:9): [True: 0, False: 0]
  ------------------
  680|      0|        return EXT_RETURN_NOT_SENT;
  681|      0|#ifndef OPENSSL_NO_ECH
  682|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  683|      0|#endif
  684|       |
  685|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_signed_certificate_timestamp)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (685:9): [True: 0, False: 0]
  ------------------
  686|      0|        || !WPACKET_put_bytes_u16(pkt, 0)) {
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (686:12): [True: 0, False: 0]
  ------------------
  687|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  688|      0|        return EXT_RETURN_FAIL;
  689|      0|    }
  690|       |
  691|      0|    return EXT_RETURN_SENT;
  692|      0|}
tls_construct_ctos_ems:
  698|  3.62k|{
  699|  3.62k|    if (s->options & SSL_OP_NO_EXTENDED_MASTER_SECRET)
  ------------------
  |  |  357|  3.62k|#define SSL_OP_NO_EXTENDED_MASTER_SECRET SSL_OP_BIT(0)
  |  |  ------------------
  |  |  |  |  351|  3.62k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (699:9): [True: 0, False: 3.62k]
  ------------------
  700|      0|        return EXT_RETURN_NOT_SENT;
  701|  3.62k|#ifndef OPENSSL_NO_ECH
  702|  3.62k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  3.62k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  7.25k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 3.62k, False: 0]
  |  |  |  Branch (317:44): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  318|  3.62k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 3.62k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  703|  3.62k|#endif
  704|       |
  705|  3.62k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_extended_master_secret)
  ------------------
  |  |  911|  7.25k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (705:9): [True: 0, False: 3.62k]
  ------------------
  706|  3.62k|        || !WPACKET_put_bytes_u16(pkt, 0)) {
  ------------------
  |  |  911|  3.62k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (706:12): [True: 0, False: 3.62k]
  ------------------
  707|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  708|      0|        return EXT_RETURN_FAIL;
  709|      0|    }
  710|       |
  711|  3.62k|    return EXT_RETURN_SENT;
  712|  3.62k|}
tls_construct_ctos_supported_versions:
  717|  3.62k|{
  718|  3.62k|    int currv, min_version, max_version, reason;
  719|       |
  720|  3.62k|    reason = ssl_get_min_max_version(s, &min_version, &max_version, NULL);
  721|  3.62k|    if (reason != 0) {
  ------------------
  |  Branch (721:9): [True: 0, False: 3.62k]
  ------------------
  722|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, reason);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  723|      0|        return EXT_RETURN_FAIL;
  724|      0|    }
  725|       |
  726|       |    /*
  727|       |     * Don't include this if we can't negotiate TLSv1.3. We can do a straight
  728|       |     * comparison here because we will never be called in DTLS.
  729|       |     */
  730|  3.62k|    if (max_version < TLS1_3_VERSION)
  ------------------
  |  |   27|  3.62k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (730:9): [True: 0, False: 3.62k]
  ------------------
  731|      0|        return EXT_RETURN_NOT_SENT;
  732|  3.62k|#ifndef OPENSSL_NO_ECH
  733|  3.62k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  3.62k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  7.25k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 3.62k, False: 0]
  |  |  |  Branch (317:44): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  318|  3.62k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 3.62k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  734|  3.62k|#endif
  735|       |
  736|  3.62k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_supported_versions)
  ------------------
  |  |  911|  7.25k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (736:9): [True: 0, False: 3.62k]
  ------------------
  737|  3.62k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  7.25k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (737:12): [True: 0, False: 3.62k]
  ------------------
  738|  3.62k|        || !WPACKET_start_sub_packet_u8(pkt)) {
  ------------------
  |  |  810|  3.62k|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (738:12): [True: 0, False: 3.62k]
  ------------------
  739|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  740|      0|        return EXT_RETURN_FAIL;
  741|      0|    }
  742|       |
  743|  10.8k|    for (currv = max_version; currv >= min_version; currv--) {
  ------------------
  |  Branch (743:31): [True: 7.25k, False: 3.62k]
  ------------------
  744|  7.25k|        if (!WPACKET_put_bytes_u16(pkt, currv)) {
  ------------------
  |  |  911|  7.25k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (744:13): [True: 0, False: 7.25k]
  ------------------
  745|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  746|      0|            return EXT_RETURN_FAIL;
  747|      0|        }
  748|  7.25k|    }
  749|  3.62k|    if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (749:9): [True: 0, False: 3.62k]
  |  Branch (749:32): [True: 0, False: 3.62k]
  ------------------
  750|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  751|      0|        return EXT_RETURN_FAIL;
  752|      0|    }
  753|       |
  754|  3.62k|    return EXT_RETURN_SENT;
  755|  3.62k|}
tls_construct_ctos_psk_kex_modes:
  763|  3.62k|{
  764|  3.62k|#ifndef OPENSSL_NO_TLS1_3
  765|  3.62k|    int nodhe = s->options & SSL_OP_ALLOW_NO_DHE_KEX;
  ------------------
  |  |  370|  3.62k|#define SSL_OP_ALLOW_NO_DHE_KEX SSL_OP_BIT(10)
  |  |  ------------------
  |  |  |  |  351|  3.62k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  766|       |
  767|  3.62k|#ifndef OPENSSL_NO_ECH
  768|  3.62k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  3.62k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  7.25k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 3.62k, False: 0]
  |  |  |  Branch (317:44): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  318|  3.62k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 3.62k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  769|  3.62k|#endif
  770|       |
  771|  3.62k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_psk_kex_modes)
  ------------------
  |  |  911|  7.25k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (771:9): [True: 0, False: 3.62k]
  ------------------
  772|  3.62k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  7.25k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (772:12): [True: 0, False: 3.62k]
  ------------------
  773|  3.62k|        || !WPACKET_start_sub_packet_u8(pkt)
  ------------------
  |  |  810|  7.25k|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (773:12): [True: 0, False: 3.62k]
  ------------------
  774|  3.62k|        || !WPACKET_put_bytes_u8(pkt, TLSEXT_KEX_MODE_KE_DHE)
  ------------------
  |  |  909|  7.25k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (774:12): [True: 0, False: 3.62k]
  ------------------
  775|  3.62k|        || (nodhe && !WPACKET_put_bytes_u8(pkt, TLSEXT_KEX_MODE_KE))
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (775:13): [True: 0, False: 3.62k]
  |  Branch (775:22): [True: 0, False: 0]
  ------------------
  776|  3.62k|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (776:12): [True: 0, False: 3.62k]
  ------------------
  777|  3.62k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (777:12): [True: 0, False: 3.62k]
  ------------------
  778|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  779|      0|        return EXT_RETURN_FAIL;
  780|      0|    }
  781|       |
  782|  3.62k|    s->ext.psk_kex_mode = TLSEXT_KEX_MODE_FLAG_KE_DHE;
  ------------------
  |  | 2224|  3.62k|#define TLSEXT_KEX_MODE_FLAG_KE_DHE 2
  ------------------
  783|  3.62k|    if (nodhe)
  ------------------
  |  Branch (783:9): [True: 0, False: 3.62k]
  ------------------
  784|      0|        s->ext.psk_kex_mode |= TLSEXT_KEX_MODE_FLAG_KE;
  ------------------
  |  | 2223|      0|#define TLSEXT_KEX_MODE_FLAG_KE 1
  ------------------
  785|  3.62k|#endif
  786|       |
  787|  3.62k|    return EXT_RETURN_SENT;
  788|  3.62k|}
tls_construct_ctos_key_share:
  854|  3.62k|{
  855|  3.62k|#ifndef OPENSSL_NO_TLS1_3
  856|  3.62k|    size_t i, num_groups = 0;
  857|  3.62k|    const uint16_t *pgroups = NULL;
  858|  3.62k|    uint16_t group_id = 0;
  859|  3.62k|    int add_only_one = 0;
  860|  3.62k|    size_t valid_keyshare = 0;
  861|       |
  862|  3.62k|#ifndef OPENSSL_NO_ECH
  863|  3.62k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  3.62k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  7.25k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 3.62k, False: 0]
  |  |  |  Branch (317:44): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  318|  3.62k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 3.62k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  864|  3.62k|#endif
  865|       |
  866|       |    /* key_share extension */
  867|  3.62k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_key_share)
  ------------------
  |  |  911|  7.25k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (867:9): [True: 0, False: 3.62k]
  ------------------
  868|       |        /* Extension data sub-packet */
  869|  3.62k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  7.25k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (869:12): [True: 0, False: 3.62k]
  ------------------
  870|       |        /* KeyShare list sub-packet */
  871|  3.62k|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|  3.62k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (871:12): [True: 0, False: 3.62k]
  ------------------
  872|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  873|      0|        return EXT_RETURN_FAIL;
  874|      0|    }
  875|       |
  876|  3.62k|    tls1_get_requested_keyshare_groups(s, &pgroups, &num_groups);
  877|  3.62k|    if (num_groups == 1 && pgroups[0] == 0) { /* Indication that no * prefix was used */
  ------------------
  |  Branch (877:9): [True: 0, False: 3.62k]
  |  Branch (877:28): [True: 0, False: 0]
  ------------------
  878|      0|        tls1_get_supported_groups(s, &pgroups, &num_groups);
  879|      0|        add_only_one = 1;
  880|      0|    }
  881|       |
  882|       |    /* If neither the default nor the keyshares have any entry --> fatal */
  883|  3.62k|    if (num_groups == 0) {
  ------------------
  |  Branch (883:9): [True: 0, False: 3.62k]
  ------------------
  884|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_KEY_SHARE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  885|      0|        return EXT_RETURN_FAIL;
  886|      0|    }
  887|       |
  888|       |    /* Add key shares */
  889|       |
  890|  3.62k|    if (s->s3.group_id != 0 && s->s3.tmp.pkey == NULL) {
  ------------------
  |  Branch (890:9): [True: 0, False: 3.62k]
  |  Branch (890:32): [True: 0, False: 0]
  ------------------
  891|       |        /* new, single key share */
  892|      0|        group_id = s->s3.group_id;
  893|      0|        s->s3.tmp.num_ks_pkey = 0;
  894|      0|        if (!add_key_share(s, pkt, group_id, 0)) {
  ------------------
  |  Branch (894:13): [True: 0, False: 0]
  ------------------
  895|       |            /* SSLfatal() already called */
  896|      0|            return EXT_RETURN_FAIL;
  897|      0|        }
  898|      0|        valid_keyshare++;
  899|  3.62k|    } else {
  900|  3.62k|        if (s->ext.supportedgroups == NULL) /* use default */
  ------------------
  |  Branch (900:13): [True: 0, False: 3.62k]
  ------------------
  901|      0|            add_only_one = 1;
  902|       |
  903|  10.8k|        for (i = 0; i < num_groups; i++) {
  ------------------
  |  Branch (903:21): [True: 7.25k, False: 3.62k]
  ------------------
  904|  7.25k|            if (!tls_group_allowed(s, pgroups[i], SSL_SECOP_CURVE_SUPPORTED))
  ------------------
  |  | 2760|  7.25k|#define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2731|  7.25k|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  |  Branch (904:17): [True: 0, False: 7.25k]
  ------------------
  905|      0|                continue;
  906|  7.25k|            if (!tls_valid_group(s, pgroups[i], TLS1_3_VERSION, TLS1_3_VERSION,
  ------------------
  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  ------------------
                          if (!tls_valid_group(s, pgroups[i], TLS1_3_VERSION, TLS1_3_VERSION,
  ------------------
  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (906:17): [True: 0, False: 7.25k]
  ------------------
  907|  7.25k|                    NULL, NULL))
  908|      0|                continue;
  909|       |
  910|  7.25k|            group_id = pgroups[i];
  911|       |
  912|  7.25k|            if (group_id == 0) {
  ------------------
  |  Branch (912:17): [True: 0, False: 7.25k]
  ------------------
  913|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_KEY_SHARE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  914|      0|                return EXT_RETURN_FAIL;
  915|      0|            }
  916|  7.25k|            if (!add_key_share(s, pkt, group_id, valid_keyshare)) {
  ------------------
  |  Branch (916:17): [True: 0, False: 7.25k]
  ------------------
  917|       |                /* SSLfatal() already called */
  918|      0|                return EXT_RETURN_FAIL;
  919|      0|            }
  920|  7.25k|            valid_keyshare++;
  921|  7.25k|            if (add_only_one)
  ------------------
  |  Branch (921:17): [True: 0, False: 7.25k]
  ------------------
  922|      0|                break;
  923|  7.25k|        }
  924|  3.62k|    }
  925|       |
  926|  3.62k|    if (valid_keyshare == 0) {
  ------------------
  |  Branch (926:9): [True: 0, False: 3.62k]
  ------------------
  927|       |        /* No key shares were allowed */
  928|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_KEY_SHARE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  929|      0|        return EXT_RETURN_FAIL;
  930|      0|    }
  931|       |
  932|  3.62k|#ifndef OPENSSL_NO_ECH
  933|       |    /* stash inner key shares */
  934|  3.62k|    if (s->ext.ech.ch_depth == 1 && ossl_ech_stash_keyshares(s) != 1) {
  ------------------
  |  Branch (934:9): [True: 0, False: 3.62k]
  |  Branch (934:37): [True: 0, False: 0]
  ------------------
  935|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  936|      0|        return EXT_RETURN_FAIL;
  937|      0|    }
  938|  3.62k|#endif
  939|       |
  940|  3.62k|    if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (940:9): [True: 0, False: 3.62k]
  |  Branch (940:32): [True: 0, False: 3.62k]
  ------------------
  941|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  942|      0|        return EXT_RETURN_FAIL;
  943|      0|    }
  944|  3.62k|    return EXT_RETURN_SENT;
  945|       |#else
  946|       |    return EXT_RETURN_NOT_SENT;
  947|       |#endif
  948|  3.62k|}
tls_construct_ctos_cookie:
  953|  3.62k|{
  954|  3.62k|    EXT_RETURN ret = EXT_RETURN_FAIL;
  955|       |
  956|       |    /* Should only be set if we've had an HRR */
  957|  3.62k|    if (s->ext.tls13_cookie_len == 0)
  ------------------
  |  Branch (957:9): [True: 3.62k, False: 0]
  ------------------
  958|  3.62k|        return EXT_RETURN_NOT_SENT;
  959|      0|#ifndef OPENSSL_NO_ECH
  960|      0|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
  961|      0|#endif
  962|       |
  963|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_cookie)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (963:9): [True: 0, False: 0]
  ------------------
  964|       |        /* Extension data sub-packet */
  965|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (965:12): [True: 0, False: 0]
  ------------------
  966|      0|        || !WPACKET_sub_memcpy_u16(pkt, s->ext.tls13_cookie,
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (966:12): [True: 0, False: 0]
  ------------------
  967|      0|            s->ext.tls13_cookie_len)
  968|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (968:12): [True: 0, False: 0]
  ------------------
  969|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  970|      0|        goto end;
  971|      0|    }
  972|       |
  973|      0|    ret = EXT_RETURN_SENT;
  974|      0|end:
  975|      0|    OPENSSL_free(s->ext.tls13_cookie);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  976|      0|    s->ext.tls13_cookie = NULL;
  977|      0|    s->ext.tls13_cookie_len = 0;
  978|       |
  979|      0|    return ret;
  980|      0|}
tls_construct_ctos_early_data:
  985|  3.62k|{
  986|  3.62k|#ifndef OPENSSL_NO_PSK
  987|  3.62k|    char identity[PSK_MAX_IDENTITY_LEN + 1];
  988|  3.62k|#endif /* OPENSSL_NO_PSK */
  989|  3.62k|    const unsigned char *id = NULL;
  990|  3.62k|    size_t idlen = 0;
  991|  3.62k|    SSL_SESSION *psksess = NULL;
  992|  3.62k|    SSL_SESSION *edsess = NULL;
  993|  3.62k|    const EVP_MD *handmd = NULL;
  994|  3.62k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  3.62k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  995|       |
  996|  3.62k|#ifndef OPENSSL_NO_ECH
  997|       |    /*
  998|       |     * If we're attempting ECH and processing the outer CH
  999|       |     * then we only need to check if the extension is to be
 1000|       |     * sent or not - any other processing (with side effects)
 1001|       |     * happened already for the inner CH.
 1002|       |     */
 1003|  3.62k|    if (s->ext.ech.es != NULL && s->ext.ech.ch_depth == 0) {
  ------------------
  |  Branch (1003:9): [True: 0, False: 3.62k]
  |  Branch (1003:34): [True: 0, False: 0]
  ------------------
 1004|       |        /*
 1005|       |         * if we called this for inner and did send then
 1006|       |         * the following two things should be set, if so,
 1007|       |         * then send again in the outer CH.
 1008|       |         */
 1009|      0|        if (s->ext.early_data == SSL_EARLY_DATA_REJECTED
  ------------------
  |  | 2073|      0|#define SSL_EARLY_DATA_REJECTED 1
  ------------------
  |  Branch (1009:13): [True: 0, False: 0]
  ------------------
 1010|      0|            && s->ext.early_data_ok == 1) {
  ------------------
  |  Branch (1010:16): [True: 0, False: 0]
  ------------------
 1011|      0|            if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_early_data)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1011:17): [True: 0, False: 0]
  ------------------
 1012|      0|                || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1012:20): [True: 0, False: 0]
  ------------------
 1013|      0|                || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1013:20): [True: 0, False: 0]
  ------------------
 1014|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1015|      0|                return EXT_RETURN_FAIL;
 1016|      0|            }
 1017|      0|            return EXT_RETURN_SENT;
 1018|      0|        } else {
 1019|      0|            return EXT_RETURN_NOT_SENT;
 1020|      0|        }
 1021|      0|    }
 1022|  3.62k|#endif
 1023|  3.62k|    if (s->hello_retry_request == SSL_HRR_PENDING)
  ------------------
  |  Branch (1023:9): [True: 0, False: 3.62k]
  ------------------
 1024|      0|        handmd = ssl_handshake_md(s);
 1025|       |
 1026|  3.62k|    if (s->psk_use_session_cb != NULL
  ------------------
  |  Branch (1026:9): [True: 0, False: 3.62k]
  ------------------
 1027|      0|        && (!s->psk_use_session_cb(ussl, handmd, &id, &idlen, &psksess)
  ------------------
  |  Branch (1027:13): [True: 0, False: 0]
  ------------------
 1028|      0|            || (psksess != NULL
  ------------------
  |  Branch (1028:17): [True: 0, False: 0]
  ------------------
 1029|      0|                && psksess->ssl_version != TLS1_3_VERSION))) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1029:20): [True: 0, False: 0]
  ------------------
 1030|      0|        SSL_SESSION_free(psksess);
 1031|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_PSK);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1032|      0|        return EXT_RETURN_FAIL;
 1033|      0|    }
 1034|       |
 1035|  3.62k|#ifndef OPENSSL_NO_PSK
 1036|  3.62k|    if (psksess == NULL && s->psk_client_callback != NULL) {
  ------------------
  |  Branch (1036:9): [True: 3.62k, False: 0]
  |  Branch (1036:28): [True: 0, False: 3.62k]
  ------------------
 1037|      0|        unsigned char psk[PSK_MAX_PSK_LEN];
 1038|      0|        size_t psklen = 0;
 1039|       |
 1040|      0|        memset(identity, 0, sizeof(identity));
 1041|      0|        psklen = s->psk_client_callback(ussl, NULL,
 1042|      0|            identity, sizeof(identity) - 1,
 1043|      0|            psk, sizeof(psk));
 1044|       |
 1045|      0|        if (psklen > PSK_MAX_PSK_LEN) {
  ------------------
  |  |  885|      0|#define PSK_MAX_PSK_LEN 512
  ------------------
  |  Branch (1045:13): [True: 0, False: 0]
  ------------------
 1046|      0|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1047|      0|            return EXT_RETURN_FAIL;
 1048|      0|        } else if (psklen > 0) {
  ------------------
  |  Branch (1048:20): [True: 0, False: 0]
  ------------------
 1049|      0|            const unsigned char tls13_aes128gcmsha256_id[] = { 0x13, 0x01 };
 1050|      0|            const SSL_CIPHER *cipher;
 1051|       |
 1052|      0|            idlen = strlen(identity);
 1053|      0|            if (idlen > PSK_MAX_IDENTITY_LEN) {
  ------------------
  |  |  884|      0|#define PSK_MAX_IDENTITY_LEN 256
  ------------------
  |  Branch (1053:17): [True: 0, False: 0]
  ------------------
 1054|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1055|      0|                return EXT_RETURN_FAIL;
 1056|      0|            }
 1057|      0|            id = (unsigned char *)identity;
 1058|       |
 1059|       |            /*
 1060|       |             * We found a PSK using an old style callback. We don't know
 1061|       |             * the digest so we default to SHA256 as per the TLSv1.3 spec
 1062|       |             */
 1063|      0|            cipher = SSL_CIPHER_find(SSL_CONNECTION_GET_SSL(s),
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1064|      0|                tls13_aes128gcmsha256_id);
 1065|      0|            if (cipher == NULL) {
  ------------------
  |  Branch (1065:17): [True: 0, False: 0]
  ------------------
 1066|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1067|      0|                return EXT_RETURN_FAIL;
 1068|      0|            }
 1069|       |
 1070|      0|            psksess = SSL_SESSION_new();
 1071|      0|            if (psksess == NULL
  ------------------
  |  Branch (1071:17): [True: 0, False: 0]
  ------------------
 1072|      0|                || !SSL_SESSION_set1_master_key(psksess, psk, psklen)
  ------------------
  |  Branch (1072:20): [True: 0, False: 0]
  ------------------
 1073|      0|                || !SSL_SESSION_set_cipher(psksess, cipher)
  ------------------
  |  Branch (1073:20): [True: 0, False: 0]
  ------------------
 1074|      0|                || !SSL_SESSION_set_protocol_version(psksess, TLS1_3_VERSION)) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1074:20): [True: 0, False: 0]
  ------------------
 1075|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1076|      0|                OPENSSL_cleanse(psk, psklen);
 1077|      0|                return EXT_RETURN_FAIL;
 1078|      0|            }
 1079|      0|            OPENSSL_cleanse(psk, psklen);
 1080|      0|        }
 1081|      0|    }
 1082|  3.62k|#endif /* OPENSSL_NO_PSK */
 1083|       |
 1084|  3.62k|    SSL_SESSION_free(s->psksession);
 1085|  3.62k|    s->psksession = psksess;
 1086|  3.62k|    if (psksess != NULL) {
  ------------------
  |  Branch (1086:9): [True: 0, False: 3.62k]
  ------------------
 1087|      0|        OPENSSL_free(s->psksession_id);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1088|      0|        s->psksession_id = OPENSSL_memdup(id, idlen);
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1089|      0|        if (s->psksession_id == NULL) {
  ------------------
  |  Branch (1089:13): [True: 0, False: 0]
  ------------------
 1090|      0|            s->psksession_id_len = 0;
 1091|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1092|      0|            return EXT_RETURN_FAIL;
 1093|      0|        }
 1094|      0|        s->psksession_id_len = idlen;
 1095|      0|    }
 1096|       |
 1097|  3.62k|    if (s->early_data_state != SSL_EARLY_DATA_CONNECTING
  ------------------
  |  Branch (1097:9): [True: 3.62k, False: 0]
  ------------------
 1098|      0|        || (s->session->ext.max_early_data == 0
  ------------------
  |  Branch (1098:13): [True: 0, False: 0]
  ------------------
 1099|  3.62k|            && (psksess == NULL || psksess->ext.max_early_data == 0))) {
  ------------------
  |  Branch (1099:17): [True: 0, False: 0]
  |  Branch (1099:36): [True: 0, False: 0]
  ------------------
 1100|  3.62k|        s->max_early_data = 0;
 1101|  3.62k|        return EXT_RETURN_NOT_SENT;
 1102|  3.62k|    }
 1103|      0|    edsess = s->session->ext.max_early_data != 0 ? s->session : psksess;
  ------------------
  |  Branch (1103:14): [True: 0, False: 0]
  ------------------
 1104|      0|    s->max_early_data = edsess->ext.max_early_data;
 1105|       |
 1106|      0|    if (edsess->ext.hostname != NULL) {
  ------------------
  |  Branch (1106:9): [True: 0, False: 0]
  ------------------
 1107|      0|        if (s->ext.hostname == NULL
  ------------------
  |  Branch (1107:13): [True: 0, False: 0]
  ------------------
 1108|      0|            || (s->ext.hostname != NULL
  ------------------
  |  Branch (1108:17): [True: 0, False: 0]
  ------------------
 1109|      0|                && strcmp(s->ext.hostname, edsess->ext.hostname) != 0)) {
  ------------------
  |  Branch (1109:20): [True: 0, False: 0]
  ------------------
 1110|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1111|      0|                SSL_R_INCONSISTENT_EARLY_DATA_SNI);
 1112|      0|            return EXT_RETURN_FAIL;
 1113|      0|        }
 1114|      0|    }
 1115|       |
 1116|      0|    if ((s->ext.alpn == NULL && edsess->ext.alpn_selected != NULL)) {
  ------------------
  |  Branch (1116:10): [True: 0, False: 0]
  |  Branch (1116:33): [True: 0, False: 0]
  ------------------
 1117|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_INCONSISTENT_EARLY_DATA_ALPN);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1118|      0|        return EXT_RETURN_FAIL;
 1119|      0|    }
 1120|       |
 1121|       |    /*
 1122|       |     * Verify that we are offering an ALPN protocol consistent with the early
 1123|       |     * data.
 1124|       |     */
 1125|      0|    if (edsess->ext.alpn_selected != NULL) {
  ------------------
  |  Branch (1125:9): [True: 0, False: 0]
  ------------------
 1126|      0|        PACKET prots, alpnpkt;
 1127|      0|        int found = 0;
 1128|       |
 1129|      0|        if (!PACKET_buf_init(&prots, s->ext.alpn, s->ext.alpn_len)) {
  ------------------
  |  Branch (1129:13): [True: 0, False: 0]
  ------------------
 1130|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1131|      0|            return EXT_RETURN_FAIL;
 1132|      0|        }
 1133|      0|        while (PACKET_get_length_prefixed_1(&prots, &alpnpkt)) {
  ------------------
  |  Branch (1133:16): [True: 0, False: 0]
  ------------------
 1134|      0|            if (PACKET_equal(&alpnpkt, edsess->ext.alpn_selected,
  ------------------
  |  Branch (1134:17): [True: 0, False: 0]
  ------------------
 1135|      0|                    edsess->ext.alpn_selected_len)) {
 1136|      0|                found = 1;
 1137|      0|                break;
 1138|      0|            }
 1139|      0|        }
 1140|      0|        if (!found) {
  ------------------
  |  Branch (1140:13): [True: 0, False: 0]
  ------------------
 1141|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1142|      0|                SSL_R_INCONSISTENT_EARLY_DATA_ALPN);
 1143|      0|            return EXT_RETURN_FAIL;
 1144|      0|        }
 1145|      0|    }
 1146|       |
 1147|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_early_data)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1147:9): [True: 0, False: 0]
  ------------------
 1148|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1148:12): [True: 0, False: 0]
  ------------------
 1149|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1149:12): [True: 0, False: 0]
  ------------------
 1150|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1151|      0|        return EXT_RETURN_FAIL;
 1152|      0|    }
 1153|       |
 1154|       |    /*
 1155|       |     * We set this to rejected here. Later, if the server acknowledges the
 1156|       |     * extension, we set it to accepted.
 1157|       |     */
 1158|      0|    s->ext.early_data = SSL_EARLY_DATA_REJECTED;
  ------------------
  |  | 2073|      0|#define SSL_EARLY_DATA_REJECTED 1
  ------------------
 1159|      0|    s->ext.early_data_ok = 1;
 1160|       |
 1161|      0|    return EXT_RETURN_SENT;
 1162|      0|}
tls_construct_ctos_padding:
 1184|  3.62k|{
 1185|  3.62k|    unsigned char *padbytes;
 1186|  3.62k|    size_t hlen;
 1187|       |
 1188|  3.62k|    if ((s->options & SSL_OP_TLSEXT_PADDING) == 0)
  ------------------
  |  |  364|  3.62k|#define SSL_OP_TLSEXT_PADDING SSL_OP_BIT(4)
  |  |  ------------------
  |  |  |  |  351|  3.62k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1188:9): [True: 0, False: 3.62k]
  ------------------
 1189|      0|        return EXT_RETURN_NOT_SENT;
 1190|  3.62k|#ifndef OPENSSL_NO_ECH
 1191|  3.62k|    ECH_SAME_EXT(s, context, pkt);
  ------------------
  |  |  317|  3.62k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  7.25k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 3.62k, False: 0]
  |  |  |  Branch (317:44): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  318|  3.62k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 3.62k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
 1192|  3.62k|#endif
 1193|       |
 1194|       |    /*
 1195|       |     * Add padding to workaround bugs in F5 terminators. See RFC7685.
 1196|       |     * This code calculates the length of all extensions added so far but
 1197|       |     * excludes the PSK extension (because that MUST be written last). Therefore
 1198|       |     * this extension MUST always appear second to last.
 1199|       |     */
 1200|  3.62k|    if (!WPACKET_get_total_written(pkt, &hlen)) {
  ------------------
  |  Branch (1200:9): [True: 0, False: 3.62k]
  ------------------
 1201|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1202|      0|        return EXT_RETURN_FAIL;
 1203|      0|    }
 1204|       |
 1205|       |    /*
 1206|       |     * If we're going to send a PSK then that will be written out after this
 1207|       |     * extension, so we need to calculate how long it is going to be.
 1208|       |     */
 1209|  3.62k|    if (s->session->ssl_version == TLS1_3_VERSION
  ------------------
  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1209:9): [True: 3.62k, False: 0]
  ------------------
 1210|  3.62k|        && s->session->ext.ticklen != 0
  ------------------
  |  Branch (1210:12): [True: 0, False: 3.62k]
  ------------------
 1211|      0|        && s->session->cipher != NULL) {
  ------------------
  |  Branch (1211:12): [True: 0, False: 0]
  ------------------
 1212|      0|        const EVP_MD *md = ssl_md(SSL_CONNECTION_GET_CTX(s),
  ------------------
  |  |   26|      0|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1213|      0|            s->session->cipher->algorithm2);
 1214|       |
 1215|      0|        if (md != NULL) {
  ------------------
  |  Branch (1215:13): [True: 0, False: 0]
  ------------------
 1216|       |            /*
 1217|       |             * Add the fixed PSK overhead, the identity length and the binder
 1218|       |             * length.
 1219|       |             */
 1220|      0|            int md_size = EVP_MD_get_size(md);
 1221|       |
 1222|      0|            if (md_size <= 0)
  ------------------
  |  Branch (1222:17): [True: 0, False: 0]
  ------------------
 1223|      0|                return EXT_RETURN_FAIL;
 1224|      0|            hlen += PSK_PRE_BINDER_OVERHEAD + s->session->ext.ticklen
  ------------------
  |  | 1179|      0|#define PSK_PRE_BINDER_OVERHEAD (2 + 2 + 2 + 2 + 4 + 2 + 1)
  ------------------
 1225|      0|                + md_size;
 1226|      0|        }
 1227|      0|    }
 1228|       |
 1229|  3.62k|    if (hlen > F5_WORKAROUND_MIN_MSG_LEN && hlen < F5_WORKAROUND_MAX_MSG_LEN) {
  ------------------
  |  | 1164|  7.25k|#define F5_WORKAROUND_MIN_MSG_LEN 0xff
  ------------------
                  if (hlen > F5_WORKAROUND_MIN_MSG_LEN && hlen < F5_WORKAROUND_MAX_MSG_LEN) {
  ------------------
  |  | 1165|  3.62k|#define F5_WORKAROUND_MAX_MSG_LEN 0x200
  ------------------
  |  Branch (1229:9): [True: 3.62k, False: 0]
  |  Branch (1229:45): [True: 0, False: 3.62k]
  ------------------
 1230|       |        /* Calculate the amount of padding we need to add */
 1231|      0|        hlen = F5_WORKAROUND_MAX_MSG_LEN - hlen;
  ------------------
  |  | 1165|      0|#define F5_WORKAROUND_MAX_MSG_LEN 0x200
  ------------------
 1232|       |
 1233|       |        /*
 1234|       |         * Take off the size of extension header itself (2 bytes for type and
 1235|       |         * 2 bytes for length bytes), but ensure that the extension is at least
 1236|       |         * 1 byte long so as not to have an empty extension last (WebSphere 7.x,
 1237|       |         * 8.x are intolerant of that condition)
 1238|       |         */
 1239|      0|        if (hlen > 4)
  ------------------
  |  Branch (1239:13): [True: 0, False: 0]
  ------------------
 1240|      0|            hlen -= 4;
 1241|      0|        else
 1242|      0|            hlen = 1;
 1243|       |
 1244|      0|        if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_padding)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1244:13): [True: 0, False: 0]
  ------------------
 1245|      0|            || !WPACKET_sub_allocate_bytes_u16(pkt, hlen, &padbytes)) {
  ------------------
  |  |  851|      0|    WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 2)
  ------------------
  |  Branch (1245:16): [True: 0, False: 0]
  ------------------
 1246|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1247|      0|            return EXT_RETURN_FAIL;
 1248|      0|        }
 1249|      0|        memset(padbytes, 0, hlen);
 1250|      0|    }
 1251|       |
 1252|  3.62k|    return EXT_RETURN_SENT;
 1253|  3.62k|}
tls_construct_ctos_psk:
 1261|  3.62k|{
 1262|  3.62k|#ifndef OPENSSL_NO_TLS1_3
 1263|  3.62k|    uint32_t agesec, agems = 0;
 1264|  3.62k|    size_t binderoffset, msglen;
 1265|  3.62k|    int reshashsize = 0, pskhashsize = 0;
 1266|  3.62k|    unsigned char *resbinder = NULL, *pskbinder = NULL, *msgstart = NULL;
 1267|  3.62k|    const EVP_MD *handmd = NULL, *mdres = NULL, *mdpsk = NULL;
 1268|  3.62k|    int dores = 0;
 1269|  3.62k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1270|  3.62k|    OSSL_TIME t;
 1271|       |
 1272|  3.62k|    s->ext.tick_identity = 0;
 1273|       |
 1274|       |    /*
 1275|       |     * Note: At this stage of the code we only support adding a single
 1276|       |     * resumption PSK. If we add support for multiple PSKs then the length
 1277|       |     * calculations in the padding extension will need to be adjusted.
 1278|       |     */
 1279|       |
 1280|       |    /*
 1281|       |     * If this is an incompatible or new session then we have nothing to resume
 1282|       |     * so don't add this extension.
 1283|       |     */
 1284|  3.62k|    if (s->session->ssl_version != TLS1_3_VERSION
  ------------------
  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1284:9): [True: 0, False: 3.62k]
  ------------------
 1285|  3.62k|        || (s->session->ext.ticklen == 0 && s->psksession == NULL))
  ------------------
  |  Branch (1285:13): [True: 3.62k, False: 0]
  |  Branch (1285:45): [True: 3.62k, False: 0]
  ------------------
 1286|  3.62k|        return EXT_RETURN_NOT_SENT;
 1287|       |
 1288|      0|    if (s->hello_retry_request == SSL_HRR_PENDING)
  ------------------
  |  Branch (1288:9): [True: 0, False: 0]
  ------------------
 1289|      0|        handmd = ssl_handshake_md(s);
 1290|       |
 1291|      0|    if (s->session->ext.ticklen != 0) {
  ------------------
  |  Branch (1291:9): [True: 0, False: 0]
  ------------------
 1292|       |        /* Get the digest associated with the ciphersuite in the session */
 1293|      0|        if (s->session->cipher == NULL) {
  ------------------
  |  Branch (1293:13): [True: 0, False: 0]
  ------------------
 1294|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1295|      0|            return EXT_RETURN_FAIL;
 1296|      0|        }
 1297|      0|        mdres = ssl_md(sctx, s->session->cipher->algorithm2);
 1298|      0|        if (mdres == NULL) {
  ------------------
  |  Branch (1298:13): [True: 0, False: 0]
  ------------------
 1299|       |            /*
 1300|       |             * Don't recognize this cipher so we can't use the session.
 1301|       |             * Ignore it
 1302|       |             */
 1303|      0|            goto dopsksess;
 1304|      0|        }
 1305|       |
 1306|      0|        if (s->hello_retry_request == SSL_HRR_PENDING && mdres != handmd) {
  ------------------
  |  Branch (1306:13): [True: 0, False: 0]
  |  Branch (1306:58): [True: 0, False: 0]
  ------------------
 1307|       |            /*
 1308|       |             * Selected ciphersuite hash does not match the hash for the session
 1309|       |             * so we can't use it.
 1310|       |             */
 1311|      0|            goto dopsksess;
 1312|      0|        }
 1313|       |
 1314|      0|#ifndef OPENSSL_NO_ECH
 1315|       |        /*
 1316|       |         * When doing ECH, we get here twice (for inner then outer). The
 1317|       |         * 2nd time (for outer) we can skip some checks as we know how
 1318|       |         * those went last time.
 1319|       |         */
 1320|      0|        if (s->ext.ech.es != NULL && s->ext.ech.ch_depth == 0) {
  ------------------
  |  Branch (1320:13): [True: 0, False: 0]
  |  Branch (1320:38): [True: 0, False: 0]
  ------------------
 1321|      0|            s->ext.tick_identity = s->ext.ech.tick_identity;
 1322|      0|            dores = (s->ext.tick_identity > 0);
 1323|      0|            goto dopsksess;
 1324|      0|        }
 1325|      0|#endif
 1326|       |
 1327|       |        /*
 1328|       |         * Technically the C standard just says time() returns a time_t and says
 1329|       |         * nothing about the encoding of that type. In practice most
 1330|       |         * implementations follow POSIX which holds it as an integral type in
 1331|       |         * seconds since epoch. We've already made the assumption that we can do
 1332|       |         * this in multiple places in the code, so portability shouldn't be an
 1333|       |         * issue.
 1334|       |         */
 1335|      0|        t = ossl_time_subtract(ossl_time_now(), s->session->time);
 1336|      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)
  |  |  ------------------
  ------------------
 1337|       |
 1338|       |        /*
 1339|       |         * We calculate the age in seconds but the server may work in ms. Due to
 1340|       |         * rounding errors we could overestimate the age by up to 1s. It is
 1341|       |         * better to underestimate it. Otherwise, if the RTT is very short, when
 1342|       |         * the server calculates the age reported by the client it could be
 1343|       |         * bigger than the age calculated on the server - which should never
 1344|       |         * happen.
 1345|       |         */
 1346|      0|        if (agesec > 0)
  ------------------
  |  Branch (1346:13): [True: 0, False: 0]
  ------------------
 1347|      0|            agesec--;
 1348|       |
 1349|      0|        if (s->session->ext.tick_lifetime_hint < agesec) {
  ------------------
  |  Branch (1349:13): [True: 0, False: 0]
  ------------------
 1350|       |            /* Ticket is too old. Ignore it. */
 1351|      0|            goto dopsksess;
 1352|      0|        }
 1353|       |
 1354|       |        /*
 1355|       |         * Calculate age in ms. We're just doing it to nearest second. Should be
 1356|       |         * good enough.
 1357|       |         */
 1358|      0|        agems = agesec * (uint32_t)1000;
 1359|       |
 1360|      0|        if (agesec != 0 && agems / (uint32_t)1000 != agesec) {
  ------------------
  |  Branch (1360:13): [True: 0, False: 0]
  |  Branch (1360:28): [True: 0, False: 0]
  ------------------
 1361|       |            /*
 1362|       |             * Overflow. Shouldn't happen unless this is a *really* old session.
 1363|       |             * If so we just ignore it.
 1364|       |             */
 1365|      0|            goto dopsksess;
 1366|      0|        }
 1367|       |
 1368|       |        /*
 1369|       |         * Obfuscate the age. Overflow here is fine, this addition is supposed
 1370|       |         * to be mod 2^32.
 1371|       |         */
 1372|      0|        agems += s->session->ext.tick_age_add;
 1373|       |
 1374|      0|        reshashsize = EVP_MD_get_size(mdres);
 1375|      0|        if (reshashsize <= 0)
  ------------------
  |  Branch (1375:13): [True: 0, False: 0]
  ------------------
 1376|      0|            goto dopsksess;
 1377|      0|        s->ext.tick_identity++;
 1378|      0|#ifndef OPENSSL_NO_ECH
 1379|       |        /* stash this for re-use in outer CH */
 1380|      0|        if (s->ext.ech.es != NULL && s->ext.ech.ch_depth == 1)
  ------------------
  |  Branch (1380:13): [True: 0, False: 0]
  |  Branch (1380:38): [True: 0, False: 0]
  ------------------
 1381|      0|            s->ext.ech.tick_identity = s->ext.tick_identity;
 1382|      0|#endif
 1383|      0|        dores = 1;
 1384|      0|    }
 1385|       |
 1386|      0|dopsksess:
 1387|      0|    if (!dores && s->psksession == NULL)
  ------------------
  |  Branch (1387:9): [True: 0, False: 0]
  |  Branch (1387:19): [True: 0, False: 0]
  ------------------
 1388|      0|        return EXT_RETURN_NOT_SENT;
 1389|       |
 1390|      0|    if (s->psksession != NULL) {
  ------------------
  |  Branch (1390:9): [True: 0, False: 0]
  ------------------
 1391|      0|        mdpsk = ssl_md(sctx, s->psksession->cipher->algorithm2);
 1392|      0|        if (mdpsk == NULL) {
  ------------------
  |  Branch (1392:13): [True: 0, False: 0]
  ------------------
 1393|       |            /*
 1394|       |             * Don't recognize this cipher so we can't use the session.
 1395|       |             * If this happens it's an application bug.
 1396|       |             */
 1397|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_PSK);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1398|      0|            return EXT_RETURN_FAIL;
 1399|      0|        }
 1400|       |
 1401|      0|        if (s->hello_retry_request == SSL_HRR_PENDING && mdpsk != handmd) {
  ------------------
  |  Branch (1401:13): [True: 0, False: 0]
  |  Branch (1401:58): [True: 0, False: 0]
  ------------------
 1402|       |            /*
 1403|       |             * Selected ciphersuite hash does not match the hash for the PSK
 1404|       |             * session. This is an application bug.
 1405|       |             */
 1406|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_PSK);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1407|      0|            return EXT_RETURN_FAIL;
 1408|      0|        }
 1409|       |
 1410|      0|        pskhashsize = EVP_MD_get_size(mdpsk);
 1411|      0|        if (pskhashsize <= 0) {
  ------------------
  |  Branch (1411:13): [True: 0, False: 0]
  ------------------
 1412|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_PSK);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1413|      0|            return EXT_RETURN_FAIL;
 1414|      0|        }
 1415|      0|    }
 1416|       |
 1417|       |    /* Create the extension, but skip over the binder for now */
 1418|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_psk)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1418:9): [True: 0, False: 0]
  ------------------
 1419|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1419:12): [True: 0, False: 0]
  ------------------
 1420|      0|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1420:12): [True: 0, False: 0]
  ------------------
 1421|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1422|      0|        return EXT_RETURN_FAIL;
 1423|      0|    }
 1424|       |
 1425|      0|#ifndef OPENSSL_NO_ECH
 1426|       |    /*
 1427|       |     * For ECH if we're processing the outer CH and the inner CH
 1428|       |     * has a PSK, then we want to send a GREASE PSK in the outer.
 1429|       |     * We'll do that by just replacing the ticket value itself
 1430|       |     * with random values of the same length.
 1431|       |     */
 1432|      0|    if (s->ext.ech.es != NULL && s->ext.ech.ch_depth == 0) {
  ------------------
  |  Branch (1432:9): [True: 0, False: 0]
  |  Branch (1432:34): [True: 0, False: 0]
  ------------------
 1433|      0|        unsigned char *rndbuf = NULL, *rndbufp = NULL;
 1434|      0|        size_t totalrndsize = 0;
 1435|       |
 1436|      0|        totalrndsize = s->session->ext.ticklen
 1437|      0|            + sizeof(agems)
 1438|      0|            + s->psksession_id_len
 1439|      0|            + reshashsize
 1440|      0|            + pskhashsize;
 1441|      0|        rndbuf = OPENSSL_malloc(totalrndsize);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1442|      0|        if (rndbuf == NULL) {
  ------------------
  |  Branch (1442:13): [True: 0, False: 0]
  ------------------
 1443|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1444|      0|            return EXT_RETURN_FAIL;
 1445|      0|        }
 1446|       |        /* for outer CH allocate a similar sized random value */
 1447|      0|        if (RAND_bytes_ex(sctx->libctx, rndbuf, totalrndsize, 0) <= 0) {
  ------------------
  |  Branch (1447:13): [True: 0, False: 0]
  ------------------
 1448|      0|            OPENSSL_free(rndbuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1449|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1450|      0|            return EXT_RETURN_FAIL;
 1451|      0|        }
 1452|       |        /* set agems from random buffer */
 1453|      0|        rndbufp = rndbuf;
 1454|      0|        memcpy(&agems, rndbufp, sizeof(agems));
 1455|      0|        rndbufp += sizeof(agems);
 1456|      0|        if (dores != 0) {
  ------------------
  |  Branch (1456:13): [True: 0, False: 0]
  ------------------
 1457|      0|            if (!WPACKET_sub_memcpy_u16(pkt, rndbufp,
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (1457:17): [True: 0, False: 0]
  ------------------
 1458|      0|                    s->session->ext.ticklen)
 1459|      0|                || !WPACKET_put_bytes_u32(pkt, agems)) {
  ------------------
  |  |  915|      0|    WPACKET_put_bytes__((pkt), (val), 4)
  ------------------
  |  Branch (1459:20): [True: 0, False: 0]
  ------------------
 1460|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1461|      0|                OPENSSL_free(rndbuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1462|      0|                return EXT_RETURN_FAIL;
 1463|      0|            }
 1464|      0|            rndbufp += s->session->ext.ticklen;
 1465|      0|        }
 1466|      0|        if (s->psksession != NULL) {
  ------------------
  |  Branch (1466:13): [True: 0, False: 0]
  ------------------
 1467|      0|            if (!WPACKET_sub_memcpy_u16(pkt, rndbufp, s->psksession_id_len)
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (1467:17): [True: 0, False: 0]
  ------------------
 1468|      0|                || !WPACKET_put_bytes_u32(pkt, 0)) {
  ------------------
  |  |  915|      0|    WPACKET_put_bytes__((pkt), (val), 4)
  ------------------
  |  Branch (1468:20): [True: 0, False: 0]
  ------------------
 1469|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1470|      0|                OPENSSL_free(rndbuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1471|      0|                return EXT_RETURN_FAIL;
 1472|      0|            }
 1473|      0|            rndbufp += s->psksession_id_len;
 1474|      0|        }
 1475|      0|        if (!WPACKET_close(pkt)
  ------------------
  |  Branch (1475:13): [True: 0, False: 0]
  ------------------
 1476|      0|            || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1476:16): [True: 0, False: 0]
  ------------------
 1477|      0|            || (dores == 1
  ------------------
  |  Branch (1477:17): [True: 0, False: 0]
  ------------------
 1478|      0|                && !WPACKET_sub_memcpy_u8(pkt, rndbufp, reshashsize))
  ------------------
  |  |  938|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (1478:20): [True: 0, False: 0]
  ------------------
 1479|      0|            || (s->psksession != NULL
  ------------------
  |  Branch (1479:17): [True: 0, False: 0]
  ------------------
 1480|      0|                && !WPACKET_sub_memcpy_u8(pkt, rndbufp, pskhashsize))
  ------------------
  |  |  938|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (1480:20): [True: 0, False: 0]
  ------------------
 1481|      0|            || !WPACKET_close(pkt)
  ------------------
  |  Branch (1481:16): [True: 0, False: 0]
  ------------------
 1482|      0|            || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1482:16): [True: 0, False: 0]
  ------------------
 1483|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1484|      0|            OPENSSL_free(rndbuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1485|      0|            return EXT_RETURN_FAIL;
 1486|      0|        }
 1487|      0|        OPENSSL_free(rndbuf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1488|      0|        return EXT_RETURN_SENT;
 1489|      0|    }
 1490|      0|#endif /* OPENSSL_NO_ECH */
 1491|      0|    if (dores) {
  ------------------
  |  Branch (1491:9): [True: 0, False: 0]
  ------------------
 1492|      0|        if (!WPACKET_sub_memcpy_u16(pkt, s->session->ext.tick,
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (1492:13): [True: 0, False: 0]
  ------------------
 1493|      0|                s->session->ext.ticklen)
 1494|      0|            || !WPACKET_put_bytes_u32(pkt, agems)) {
  ------------------
  |  |  915|      0|    WPACKET_put_bytes__((pkt), (val), 4)
  ------------------
  |  Branch (1494:16): [True: 0, False: 0]
  ------------------
 1495|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1496|      0|            return EXT_RETURN_FAIL;
 1497|      0|        }
 1498|      0|    }
 1499|       |
 1500|      0|    if (s->psksession != NULL) {
  ------------------
  |  Branch (1500:9): [True: 0, False: 0]
  ------------------
 1501|      0|        if (!WPACKET_sub_memcpy_u16(pkt, s->psksession_id,
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (1501:13): [True: 0, False: 0]
  ------------------
 1502|      0|                s->psksession_id_len)
 1503|      0|            || !WPACKET_put_bytes_u32(pkt, 0)) {
  ------------------
  |  |  915|      0|    WPACKET_put_bytes__((pkt), (val), 4)
  ------------------
  |  Branch (1503:16): [True: 0, False: 0]
  ------------------
 1504|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1505|      0|            return EXT_RETURN_FAIL;
 1506|      0|        }
 1507|      0|        s->ext.tick_identity++;
 1508|      0|    }
 1509|       |
 1510|      0|    if (!WPACKET_close(pkt)
  ------------------
  |  Branch (1510:9): [True: 0, False: 0]
  ------------------
 1511|      0|        || !WPACKET_get_total_written(pkt, &binderoffset)
  ------------------
  |  Branch (1511:12): [True: 0, False: 0]
  ------------------
 1512|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1512:12): [True: 0, False: 0]
  ------------------
 1513|      0|        || (dores
  ------------------
  |  Branch (1513:13): [True: 0, False: 0]
  ------------------
 1514|      0|            && !WPACKET_sub_allocate_bytes_u8(pkt, reshashsize, &resbinder))
  ------------------
  |  |  849|      0|    WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 1)
  ------------------
  |  Branch (1514:16): [True: 0, False: 0]
  ------------------
 1515|      0|        || (s->psksession != NULL
  ------------------
  |  Branch (1515:13): [True: 0, False: 0]
  ------------------
 1516|      0|            && !WPACKET_sub_allocate_bytes_u8(pkt, pskhashsize, &pskbinder))
  ------------------
  |  |  849|      0|    WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 1)
  ------------------
  |  Branch (1516:16): [True: 0, False: 0]
  ------------------
 1517|      0|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (1517:12): [True: 0, False: 0]
  ------------------
 1518|      0|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (1518:12): [True: 0, False: 0]
  ------------------
 1519|      0|        || !WPACKET_get_total_written(pkt, &msglen)
  ------------------
  |  Branch (1519:12): [True: 0, False: 0]
  ------------------
 1520|       |        /*
 1521|       |         * We need to fill in all the sub-packet lengths now so we can
 1522|       |         * calculate the HMAC of the message up to the binders
 1523|       |         */
 1524|      0|        || !WPACKET_fill_lengths(pkt)) {
  ------------------
  |  Branch (1524:12): [True: 0, False: 0]
  ------------------
 1525|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1526|      0|        return EXT_RETURN_FAIL;
 1527|      0|    }
 1528|       |
 1529|      0|    msgstart = WPACKET_get_curr(pkt) - msglen;
 1530|       |
 1531|      0|    if (dores
  ------------------
  |  Branch (1531:9): [True: 0, False: 0]
  ------------------
 1532|      0|        && tls_psk_do_binder(s, mdres, msgstart, binderoffset, NULL,
  ------------------
  |  Branch (1532:12): [True: 0, False: 0]
  ------------------
 1533|      0|               resbinder, s->session, 1, 0)
 1534|      0|            != 1) {
 1535|       |        /* SSLfatal() already called */
 1536|      0|        return EXT_RETURN_FAIL;
 1537|      0|    }
 1538|       |
 1539|      0|    if (s->psksession != NULL
  ------------------
  |  Branch (1539:9): [True: 0, False: 0]
  ------------------
 1540|      0|        && tls_psk_do_binder(s, mdpsk, msgstart, binderoffset, NULL,
  ------------------
  |  Branch (1540:12): [True: 0, False: 0]
  ------------------
 1541|      0|               pskbinder, s->psksession, 1, 1)
 1542|      0|            != 1) {
 1543|       |        /* SSLfatal() already called */
 1544|      0|        return EXT_RETURN_FAIL;
 1545|      0|    }
 1546|       |
 1547|      0|    return EXT_RETURN_SENT;
 1548|       |#else
 1549|       |    return EXT_RETURN_NOT_SENT;
 1550|       |#endif
 1551|      0|}
tls_construct_ctos_post_handshake_auth:
 1557|  3.62k|{
 1558|  3.62k|#ifndef OPENSSL_NO_TLS1_3
 1559|  3.62k|    if (!s->pha_enabled)
  ------------------
  |  Branch (1559:9): [True: 0, False: 3.62k]
  ------------------
 1560|      0|        return EXT_RETURN_NOT_SENT;
 1561|  3.62k|#ifndef OPENSSL_NO_ECH
 1562|  3.62k|    ECH_SAME_EXT(s, context, pkt)
  ------------------
  |  |  317|  3.62k|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|  7.25k|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 3.62k, False: 0]
  |  |  |  Branch (317:44): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  318|  3.62k|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 3.62k]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
 1563|  3.62k|#endif
 1564|       |
 1565|       |    /* construct extension - 0 length, no contents */
 1566|  3.62k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_post_handshake_auth)
  ------------------
  |  |  911|  7.25k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1566:9): [True: 0, False: 3.62k]
  ------------------
 1567|  3.62k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  7.25k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1567:12): [True: 0, False: 3.62k]
  ------------------
 1568|  3.62k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1568:12): [True: 0, False: 3.62k]
  ------------------
 1569|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1570|      0|        return EXT_RETURN_FAIL;
 1571|      0|    }
 1572|       |
 1573|  3.62k|    s->post_handshake_auth = SSL_PHA_EXT_SENT;
 1574|       |
 1575|  3.62k|    return EXT_RETURN_SENT;
 1576|       |#else
 1577|       |    return EXT_RETURN_NOT_SENT;
 1578|       |#endif
 1579|  3.62k|}
tls_parse_stoc_alpn:
 1954|  3.62k|{
 1955|  3.62k|    size_t len;
 1956|  3.62k|    PACKET confpkt, protpkt;
 1957|  3.62k|    int valid = 0;
 1958|       |
 1959|       |    /* We must have requested it. */
 1960|  3.62k|    if (!s->s3.alpn_sent) {
  ------------------
  |  Branch (1960:9): [True: 0, False: 3.62k]
  ------------------
 1961|      0|        SSLfatal(s, SSL_AD_UNSUPPORTED_EXTENSION, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1962|      0|        return 0;
 1963|      0|    }
 1964|       |    /*-
 1965|       |     * The extension data consists of:
 1966|       |     *   uint16 list_length
 1967|       |     *   uint8 proto_length;
 1968|       |     *   uint8 proto[proto_length];
 1969|       |     */
 1970|  3.62k|    if (!PACKET_get_net_2_len(pkt, &len)
  ------------------
  |  Branch (1970:9): [True: 0, False: 3.62k]
  ------------------
 1971|  3.62k|        || PACKET_remaining(pkt) != len || !PACKET_get_1_len(pkt, &len)
  ------------------
  |  Branch (1971:12): [True: 0, False: 3.62k]
  |  Branch (1971:44): [True: 0, False: 3.62k]
  ------------------
 1972|  3.62k|        || PACKET_remaining(pkt) != len) {
  ------------------
  |  Branch (1972:12): [True: 0, False: 3.62k]
  ------------------
 1973|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1974|      0|        return 0;
 1975|      0|    }
 1976|       |
 1977|       |    /* It must be a protocol that we sent */
 1978|  3.62k|    if (!PACKET_buf_init(&confpkt, s->ext.alpn, s->ext.alpn_len)) {
  ------------------
  |  Branch (1978:9): [True: 0, False: 3.62k]
  ------------------
 1979|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1980|      0|        return 0;
 1981|      0|    }
 1982|  7.25k|    while (PACKET_get_length_prefixed_1(&confpkt, &protpkt)) {
  ------------------
  |  Branch (1982:12): [True: 7.25k, False: 0]
  ------------------
 1983|  7.25k|        if (PACKET_remaining(&protpkt) != len)
  ------------------
  |  Branch (1983:13): [True: 3.58k, False: 3.66k]
  ------------------
 1984|  3.58k|            continue;
 1985|  3.66k|        if (memcmp(PACKET_data(pkt), PACKET_data(&protpkt), len) == 0) {
  ------------------
  |  Branch (1985:13): [True: 3.62k, False: 36]
  ------------------
 1986|       |            /* Valid protocol found */
 1987|  3.62k|            valid = 1;
 1988|  3.62k|            break;
 1989|  3.62k|        }
 1990|  3.66k|    }
 1991|       |
 1992|  3.62k|    if (!valid) {
  ------------------
  |  Branch (1992:9): [True: 0, False: 3.62k]
  ------------------
 1993|       |        /* The protocol sent from the server does not match one we advertised */
 1994|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1995|      0|        return 0;
 1996|      0|    }
 1997|       |
 1998|  3.62k|    OPENSSL_free(s->s3.alpn_selected);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1999|  3.62k|    s->s3.alpn_selected = OPENSSL_malloc(len);
  ------------------
  |  |  107|  3.62k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2000|  3.62k|    if (s->s3.alpn_selected == NULL) {
  ------------------
  |  Branch (2000:9): [True: 0, False: 3.62k]
  ------------------
 2001|      0|        s->s3.alpn_selected_len = 0;
 2002|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2003|      0|        return 0;
 2004|      0|    }
 2005|  3.62k|    if (!PACKET_copy_bytes(pkt, s->s3.alpn_selected, len)) {
  ------------------
  |  Branch (2005:9): [True: 0, False: 3.62k]
  ------------------
 2006|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2007|      0|        return 0;
 2008|      0|    }
 2009|  3.62k|    s->s3.alpn_selected_len = len;
 2010|       |
 2011|  3.62k|    if (s->session->ext.alpn_selected == NULL
  ------------------
  |  Branch (2011:9): [True: 3.62k, False: 0]
  ------------------
 2012|      0|        || s->session->ext.alpn_selected_len != len
  ------------------
  |  Branch (2012:12): [True: 0, False: 0]
  ------------------
 2013|      0|        || memcmp(s->session->ext.alpn_selected, s->s3.alpn_selected, len)
  ------------------
  |  Branch (2013:12): [True: 0, False: 0]
  ------------------
 2014|  3.62k|            != 0) {
 2015|       |        /* ALPN not consistent with the old session so cannot use early_data */
 2016|  3.62k|        s->ext.early_data_ok = 0;
 2017|  3.62k|    }
 2018|  3.62k|    if (!s->hit) {
  ------------------
  |  Branch (2018:9): [True: 3.62k, False: 0]
  ------------------
 2019|       |        /*
 2020|       |         * This is a new session and so alpn_selected should have been
 2021|       |         * initialised to NULL. We should update it with the selected ALPN.
 2022|       |         */
 2023|  3.62k|        if (!ossl_assert(s->session->ext.alpn_selected == NULL)) {
  ------------------
  |  |   52|  3.62k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  3.62k|    __FILE__, __LINE__)
  ------------------
  |  Branch (2023:13): [True: 0, False: 3.62k]
  ------------------
 2024|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2025|      0|            return 0;
 2026|      0|        }
 2027|  3.62k|        s->session->ext.alpn_selected = OPENSSL_memdup(s->s3.alpn_selected, s->s3.alpn_selected_len);
  ------------------
  |  |  134|  3.62k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2028|  3.62k|        if (s->session->ext.alpn_selected == NULL) {
  ------------------
  |  Branch (2028:13): [True: 0, False: 3.62k]
  ------------------
 2029|      0|            s->session->ext.alpn_selected_len = 0;
 2030|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2031|      0|            return 0;
 2032|      0|        }
 2033|  3.62k|        s->session->ext.alpn_selected_len = s->s3.alpn_selected_len;
 2034|  3.62k|    }
 2035|       |
 2036|  3.62k|    return 1;
 2037|  3.62k|}
tls_parse_stoc_supported_versions:
 2120|  3.62k|{
 2121|  3.62k|    unsigned int version;
 2122|       |
 2123|  3.62k|    if (!PACKET_get_net_2(pkt, &version)
  ------------------
  |  Branch (2123:9): [True: 0, False: 3.62k]
  ------------------
 2124|  3.62k|        || PACKET_remaining(pkt) != 0) {
  ------------------
  |  Branch (2124:12): [True: 0, False: 3.62k]
  ------------------
 2125|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2126|      0|        return 0;
 2127|      0|    }
 2128|       |
 2129|       |    /*
 2130|       |     * The only protocol version we support which is valid in this extension in
 2131|       |     * a ServerHello is TLSv1.3 therefore we shouldn't be getting anything else.
 2132|       |     */
 2133|  3.62k|    if (version != TLS1_3_VERSION) {
  ------------------
  |  |   27|  3.62k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (2133:9): [True: 0, False: 3.62k]
  ------------------
 2134|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2135|      0|            SSL_R_BAD_PROTOCOL_VERSION_NUMBER);
 2136|      0|        return 0;
 2137|      0|    }
 2138|       |
 2139|       |    /* We ignore this extension for HRRs except to sanity check it */
 2140|  3.62k|    if (context == SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST)
  ------------------
  |  |  305|  3.62k|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
  |  Branch (2140:9): [True: 0, False: 3.62k]
  ------------------
 2141|      0|        return 1;
 2142|       |
 2143|       |    /* We just set it here. We validate it in ssl_choose_client_version */
 2144|  3.62k|    s->version = version;
 2145|  3.62k|    if (!ssl_set_record_protocol_version(s, version)) {
  ------------------
  |  Branch (2145:9): [True: 0, False: 3.62k]
  ------------------
 2146|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2147|      0|        return 0;
 2148|      0|    }
 2149|       |
 2150|  3.62k|    return 1;
 2151|  3.62k|}
tls_parse_stoc_key_share:
 2156|  3.62k|{
 2157|  3.62k|#ifndef OPENSSL_NO_TLS1_3
 2158|  3.62k|    unsigned int group_id;
 2159|  3.62k|    PACKET encoded_pt;
 2160|  3.62k|    EVP_PKEY *ckey = s->s3.tmp.pkey, *skey = NULL;
 2161|  3.62k|    const TLS_GROUP_INFO *ginf = NULL;
 2162|  3.62k|    uint16_t valid_ks_id = 0;
 2163|  3.62k|    size_t i;
 2164|       |
 2165|       |    /* Sanity check */
 2166|  3.62k|    if (ckey == NULL || s->s3.peer_tmp != NULL) {
  ------------------
  |  Branch (2166:9): [True: 0, False: 3.62k]
  |  Branch (2166:25): [True: 0, False: 3.62k]
  ------------------
 2167|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2168|      0|        return 0;
 2169|      0|    }
 2170|       |
 2171|       |    /* Which group ID does the server want -> group_id */
 2172|  3.62k|    if (!PACKET_get_net_2(pkt, &group_id)) {
  ------------------
  |  Branch (2172:9): [True: 0, False: 3.62k]
  ------------------
 2173|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2174|      0|        return 0;
 2175|      0|    }
 2176|       |
 2177|  3.62k|    if ((context & SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST) != 0) {
  ------------------
  |  |  305|  3.62k|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
  |  Branch (2177:9): [True: 0, False: 3.62k]
  ------------------
 2178|      0|        const uint16_t *pgroups = NULL;
 2179|      0|        size_t num_groups;
 2180|       |
 2181|      0|        if (PACKET_remaining(pkt) != 0) {
  ------------------
  |  Branch (2181:13): [True: 0, False: 0]
  ------------------
 2182|      0|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2183|      0|            return 0;
 2184|      0|        }
 2185|       |
 2186|       |        /*
 2187|       |         * It is an error if the HelloRetryRequest wants a key_share that we
 2188|       |         * already sent in the first ClientHello
 2189|       |         */
 2190|      0|        for (i = 0; i < s->s3.tmp.num_ks_pkey; i++) {
  ------------------
  |  Branch (2190:21): [True: 0, False: 0]
  ------------------
 2191|      0|            if (s->s3.tmp.ks_group_id[i] == group_id) {
  ------------------
  |  Branch (2191:17): [True: 0, False: 0]
  ------------------
 2192|      0|                SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_KEY_SHARE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2193|      0|                return 0;
 2194|      0|            }
 2195|      0|        }
 2196|       |
 2197|       |        /* Validate the selected group is one we support */
 2198|      0|        tls1_get_supported_groups(s, &pgroups, &num_groups);
 2199|      0|        for (i = 0; i < num_groups; i++) {
  ------------------
  |  Branch (2199:21): [True: 0, False: 0]
  ------------------
 2200|      0|            if (group_id == pgroups[i])
  ------------------
  |  Branch (2200:17): [True: 0, False: 0]
  ------------------
 2201|      0|                break;
 2202|      0|        }
 2203|      0|        if (i >= num_groups
  ------------------
  |  Branch (2203:13): [True: 0, False: 0]
  ------------------
 2204|      0|            || !tls_group_allowed(s, group_id, SSL_SECOP_CURVE_SUPPORTED)
  ------------------
  |  | 2760|      0|#define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2731|      0|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  |  Branch (2204:16): [True: 0, False: 0]
  ------------------
 2205|      0|            || !tls_valid_group(s, group_id, TLS1_3_VERSION, TLS1_3_VERSION,
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
                          || !tls_valid_group(s, group_id, TLS1_3_VERSION, TLS1_3_VERSION,
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (2205:16): [True: 0, False: 0]
  ------------------
 2206|      0|                NULL, NULL)) {
 2207|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_KEY_SHARE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2208|      0|            return 0;
 2209|      0|        }
 2210|       |
 2211|       |        /* Memorize which groupID the server wants */
 2212|      0|        s->s3.group_id = group_id;
 2213|       |
 2214|       |        /* The initial keyshares are obsolete now, hence free memory */
 2215|      0|        for (i = 0; i < s->s3.tmp.num_ks_pkey; i++) {
  ------------------
  |  Branch (2215:21): [True: 0, False: 0]
  ------------------
 2216|      0|            if (s->s3.tmp.ks_pkey[i] != NULL) {
  ------------------
  |  Branch (2216:17): [True: 0, False: 0]
  ------------------
 2217|      0|                EVP_PKEY_free(s->s3.tmp.ks_pkey[i]);
 2218|      0|                s->s3.tmp.ks_pkey[i] = NULL;
 2219|      0|            }
 2220|      0|        }
 2221|      0|        s->s3.tmp.num_ks_pkey = 0;
 2222|      0|        s->s3.tmp.pkey = NULL;
 2223|       |
 2224|      0|        return 1;
 2225|      0|    }
 2226|       |
 2227|       |    /*
 2228|       |     * check that the group requested by the server is one we've
 2229|       |     * sent a key share for, and if so: memorize which one
 2230|       |     */
 2231|  3.62k|    for (i = 0; i < s->s3.tmp.num_ks_pkey; i++) {
  ------------------
  |  Branch (2231:17): [True: 3.62k, False: 0]
  ------------------
 2232|  3.62k|        if (s->s3.tmp.ks_group_id[i] == group_id) {
  ------------------
  |  Branch (2232:13): [True: 3.62k, False: 0]
  ------------------
 2233|  3.62k|            valid_ks_id = group_id;
 2234|  3.62k|            ckey = s->s3.tmp.ks_pkey[i];
 2235|  3.62k|            s->s3.group_id = group_id;
 2236|  3.62k|            s->s3.tmp.pkey = ckey;
 2237|  3.62k|            break;
 2238|  3.62k|        }
 2239|  3.62k|    }
 2240|  3.62k|    if (valid_ks_id == 0) {
  ------------------
  |  Branch (2240:9): [True: 0, False: 3.62k]
  ------------------
 2241|       |        /*
 2242|       |         * This isn't for the group that we sent in the original
 2243|       |         * key_share!
 2244|       |         */
 2245|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_KEY_SHARE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2246|      0|        return 0;
 2247|      0|    }
 2248|       |    /* Retain this group in the SSL_SESSION */
 2249|  3.62k|    if (!s->hit) {
  ------------------
  |  Branch (2249:9): [True: 3.62k, False: 0]
  ------------------
 2250|  3.62k|        s->session->kex_group = group_id;
 2251|  3.62k|    } else if (group_id != s->session->kex_group) {
  ------------------
  |  Branch (2251:16): [True: 0, False: 0]
  ------------------
 2252|       |        /*
 2253|       |         * If this is a resumption but changed what group was used, we need
 2254|       |         * to record the new group in the session, but the session is not
 2255|       |         * a new session and could be in use by other threads.  So, make
 2256|       |         * a copy of the session to record the new information so that it's
 2257|       |         * useful for any sessions resumed from tickets issued on this
 2258|       |         * connection.
 2259|       |         */
 2260|      0|        SSL_SESSION *new_sess;
 2261|       |
 2262|      0|        if ((new_sess = ssl_session_dup(s->session, 0)) == NULL) {
  ------------------
  |  Branch (2262:13): [True: 0, False: 0]
  ------------------
 2263|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_SSL_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2264|      0|            return 0;
 2265|      0|        }
 2266|      0|        SSL_SESSION_free(s->session);
 2267|      0|        s->session = new_sess;
 2268|      0|        s->session->kex_group = group_id;
 2269|      0|    }
 2270|       |
 2271|  3.62k|    if ((ginf = tls1_group_id_lookup(SSL_CONNECTION_GET_CTX(s),
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  |  Branch (2271:9): [True: 0, False: 3.62k]
  ------------------
 2272|  3.62k|             group_id))
 2273|  3.62k|        == NULL) {
 2274|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_KEY_SHARE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2275|      0|        return 0;
 2276|      0|    }
 2277|       |
 2278|  3.62k|    if (!PACKET_as_length_prefixed_2(pkt, &encoded_pt)
  ------------------
  |  Branch (2278:9): [True: 0, False: 3.62k]
  ------------------
 2279|  3.62k|        || PACKET_remaining(&encoded_pt) == 0) {
  ------------------
  |  Branch (2279:12): [True: 0, False: 3.62k]
  ------------------
 2280|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2281|      0|        return 0;
 2282|      0|    }
 2283|       |
 2284|  3.62k|    if (!ginf->is_kem) {
  ------------------
  |  Branch (2284:9): [True: 0, False: 3.62k]
  ------------------
 2285|       |        /* Regular KEX */
 2286|      0|        skey = EVP_PKEY_new();
 2287|      0|        if (skey == NULL || EVP_PKEY_copy_parameters(skey, ckey) <= 0) {
  ------------------
  |  Branch (2287:13): [True: 0, False: 0]
  |  Branch (2287:29): [True: 0, False: 0]
  ------------------
 2288|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_COPY_PARAMETERS_FAILED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2289|      0|            EVP_PKEY_free(skey);
 2290|      0|            return 0;
 2291|      0|        }
 2292|       |
 2293|      0|        if (tls13_set_encoded_pub_key(skey, PACKET_data(&encoded_pt),
  ------------------
  |  Branch (2293:13): [True: 0, False: 0]
  ------------------
 2294|      0|                PACKET_remaining(&encoded_pt))
 2295|      0|            <= 0) {
 2296|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_KEY_SHARE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2297|      0|            EVP_PKEY_free(skey);
 2298|      0|            return 0;
 2299|      0|        }
 2300|       |
 2301|      0|        if (ssl_derive(s, ckey, skey, 1) == 0) {
  ------------------
  |  Branch (2301:13): [True: 0, False: 0]
  ------------------
 2302|       |            /* SSLfatal() already called */
 2303|      0|            EVP_PKEY_free(skey);
 2304|      0|            return 0;
 2305|      0|        }
 2306|      0|        s->s3.peer_tmp = skey;
 2307|  3.62k|    } else {
 2308|       |        /* KEM Mode */
 2309|  3.62k|        const unsigned char *ct = PACKET_data(&encoded_pt);
 2310|  3.62k|        size_t ctlen = PACKET_remaining(&encoded_pt);
 2311|       |
 2312|  3.62k|        if (ssl_decapsulate(s, ckey, ct, ctlen, 1) == 0) {
  ------------------
  |  Branch (2312:13): [True: 0, False: 3.62k]
  ------------------
 2313|       |            /* SSLfatal() already called */
 2314|      0|            return 0;
 2315|      0|        }
 2316|  3.62k|    }
 2317|  3.62k|    s->s3.did_kex = 1;
 2318|  3.62k|#endif
 2319|       |
 2320|  3.62k|    return 1;
 2321|  3.62k|}
tls_construct_ctos_client_cert_type:
 2454|  3.62k|{
 2455|  3.62k|    sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE;
  ------------------
  |  |  375|  3.62k|#define OSSL_CERT_TYPE_CTOS_NONE 0
  ------------------
 2456|  3.62k|    if (sc->client_cert_type == NULL)
  ------------------
  |  Branch (2456:9): [True: 3.62k, False: 0]
  ------------------
 2457|  3.62k|        return EXT_RETURN_NOT_SENT;
 2458|      0|#ifndef OPENSSL_NO_ECH
 2459|      0|    ECH_SAME_EXT(sc, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
 2460|      0|#endif
 2461|       |
 2462|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_client_cert_type)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2462:9): [True: 0, False: 0]
  ------------------
 2463|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2463:12): [True: 0, False: 0]
  ------------------
 2464|      0|        || !WPACKET_sub_memcpy_u8(pkt, sc->client_cert_type, sc->client_cert_type_len)
  ------------------
  |  |  938|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (2464:12): [True: 0, False: 0]
  ------------------
 2465|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2465:12): [True: 0, False: 0]
  ------------------
 2466|      0|        SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2467|      0|        return EXT_RETURN_FAIL;
 2468|      0|    }
 2469|      0|    sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_GOOD;
  ------------------
  |  |  376|      0|#define OSSL_CERT_TYPE_CTOS_GOOD 1
  ------------------
 2470|      0|    return EXT_RETURN_SENT;
 2471|      0|}
tls_construct_ctos_server_cert_type:
 2509|  3.62k|{
 2510|  3.62k|    sc->ext.server_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE;
  ------------------
  |  |  375|  3.62k|#define OSSL_CERT_TYPE_CTOS_NONE 0
  ------------------
 2511|  3.62k|    if (sc->server_cert_type == NULL)
  ------------------
  |  Branch (2511:9): [True: 3.62k, False: 0]
  ------------------
 2512|  3.62k|        return EXT_RETURN_NOT_SENT;
 2513|      0|#ifndef OPENSSL_NO_ECH
 2514|      0|    ECH_SAME_EXT(sc, context, pkt)
  ------------------
  |  |  317|      0|    if (context == SSL_EXT_CLIENT_HELLO && !s->server         \
  |  |  ------------------
  |  |  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  |  |  ------------------
  |  |  |  Branch (317:9): [True: 0, False: 0]
  |  |  |  Branch (317:44): [True: 0, False: 0]
  |  |  ------------------
  |  |  318|      0|        && s->ext.ech.es != NULL && s->ext.ech.grease == 0) { \
  |  |  ------------------
  |  |  |  Branch (318:12): [True: 0, False: 0]
  |  |  |  Branch (318:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  319|      0|        int ech_iosame_rv = ossl_ech_same_ext(s, pkt);        \
  |  |  320|      0|                                                              \
  |  |  321|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_ERR)           \
  |  |  ------------------
  |  |  |  |  293|      0|#define OSSL_ECH_SAME_EXT_ERR 0 /* bummer something wrong */
  |  |  ------------------
  |  |  |  Branch (321:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  322|      0|            return EXT_RETURN_FAIL;                           \
  |  |  323|      0|        if (ech_iosame_rv == OSSL_ECH_SAME_EXT_DONE)          \
  |  |  ------------------
  |  |  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  |  |  ------------------
  |  |  |  Branch (323:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  324|      0|            return EXT_RETURN_SENT;                           \
  |  |  325|      0|        /* otherwise continue as normal */                    \
  |  |  326|      0|    }
  ------------------
 2515|      0|#endif
 2516|       |
 2517|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_server_cert_type)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2517:9): [True: 0, False: 0]
  ------------------
 2518|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2518:12): [True: 0, False: 0]
  ------------------
 2519|      0|        || !WPACKET_sub_memcpy_u8(pkt, sc->server_cert_type, sc->server_cert_type_len)
  ------------------
  |  |  938|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (2519:12): [True: 0, False: 0]
  ------------------
 2520|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2520:12): [True: 0, False: 0]
  ------------------
 2521|      0|        SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2522|      0|        return EXT_RETURN_FAIL;
 2523|      0|    }
 2524|      0|    sc->ext.server_cert_type_ctos = OSSL_CERT_TYPE_CTOS_GOOD;
  ------------------
  |  |  376|      0|#define OSSL_CERT_TYPE_CTOS_GOOD 1
  ------------------
 2525|      0|    return EXT_RETURN_SENT;
 2526|      0|}
tls_construct_ctos_ech:
 2565|  3.62k|{
 2566|  3.62k|    int rv = 0, hpke_mode = OSSL_HPKE_MODE_BASE;
  ------------------
  |  |   18|  3.62k|#define OSSL_HPKE_MODE_BASE 0 /* Base mode  */
  ------------------
 2567|  3.62k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2568|  3.62k|    OSSL_ECHSTORE_ENTRY *ee = NULL;
 2569|  3.62k|    OSSL_HPKE_SUITE hpke_suite = OSSL_HPKE_SUITE_DEFAULT;
  ------------------
  |  |   92|  3.62k|    {                                 \
  |  |   93|  3.62k|        OSSL_HPKE_KEM_ID_X25519,      \
  |  |  ------------------
  |  |  |  |   41|  3.62k|#define OSSL_HPKE_KEM_ID_X25519 0x0020 /* Curve25519 */
  |  |  ------------------
  |  |   94|  3.62k|        OSSL_HPKE_KDF_ID_HKDF_SHA256, \
  |  |  ------------------
  |  |  |  |   45|  3.62k|#define OSSL_HPKE_KDF_ID_HKDF_SHA256 0x0001 /* HKDF-SHA256 */
  |  |  ------------------
  |  |   95|  3.62k|        OSSL_HPKE_AEAD_ID_AES_GCM_128 \
  |  |  ------------------
  |  |  |  |   50|  3.62k|#define OSSL_HPKE_AEAD_ID_AES_GCM_128 0x0001 /* AES-GCM-128 */
  |  |  ------------------
  |  |   96|  3.62k|    }
  ------------------
 2570|  3.62k|    unsigned char config_id_to_use = 0x00, info[OSSL_ECH_MAX_INFO_LEN];
 2571|  3.62k|    unsigned char *encoded = NULL, *mypub = NULL;
 2572|  3.62k|    size_t cipherlen = 0, aad_len = 0, lenclen = 0, mypub_len = 0;
 2573|  3.62k|    size_t info_len = OSSL_ECH_MAX_INFO_LEN, clear_len = 0, encoded_len = 0;
  ------------------
  |  |   24|  3.62k|#define OSSL_ECH_MAX_INFO_LEN (OSSL_ECH_MAX_ECHCONFIG_LEN + 8)
  |  |  ------------------
  |  |  |  |   33|  3.62k|#define OSSL_ECH_MAX_ECHCONFIG_LEN 1500 /* max for all encodings */
  |  |  ------------------
  ------------------
 2574|       |    /* whether or not we've been asked to GREASE, one way or another */
 2575|  3.62k|    int grease_opt_set = (s->ext.ech.attempted != 1
  ------------------
  |  Branch (2575:27): [True: 3.62k, False: 0]
  ------------------
 2576|  3.62k|        && ((s->ext.ech.grease == OSSL_ECH_IS_GREASE)
  ------------------
  |  |   37|  3.62k|#define OSSL_ECH_IS_GREASE 1 /* when decryption failed or GREASE wanted */
  ------------------
  |  Branch (2576:13): [True: 0, False: 3.62k]
  ------------------
 2577|  3.62k|            || ((s->options & SSL_OP_ECH_GREASE) != 0)));
  ------------------
  |  |  460|  3.62k|#define SSL_OP_ECH_GREASE SSL_OP_BIT(37)
  |  |  ------------------
  |  |  |  |  351|  3.62k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (2577:16): [True: 0, False: 3.62k]
  ------------------
 2578|       |
 2579|       |    /* if we're not doing real ECH and not GREASEing then exit */
 2580|  3.62k|    if (s->ext.ech.attempted_type != TLSEXT_TYPE_ech && grease_opt_set == 0)
  ------------------
  |  |  174|  7.25k|#define TLSEXT_TYPE_ech 0xfe0d
  ------------------
  |  Branch (2580:9): [True: 3.62k, False: 0]
  |  Branch (2580:57): [True: 3.62k, False: 0]
  ------------------
 2581|  3.62k|        return EXT_RETURN_NOT_SENT;
 2582|       |    /* send grease if not really attempting ECH */
 2583|      0|    if (grease_opt_set == 1) {
  ------------------
  |  Branch (2583:9): [True: 0, False: 0]
  ------------------
 2584|      0|        if (s->hello_retry_request == SSL_HRR_PENDING
  ------------------
  |  Branch (2584:13): [True: 0, False: 0]
  ------------------
 2585|      0|            && s->ext.ech.sent != NULL) {
  ------------------
  |  Branch (2585:16): [True: 0, False: 0]
  ------------------
 2586|       |            /* re-tx already sent GREASEy ECH */
 2587|      0|            if (WPACKET_memcpy(pkt, s->ext.ech.sent,
  ------------------
  |  Branch (2587:17): [True: 0, False: 0]
  ------------------
 2588|      0|                    s->ext.ech.sent_len)
 2589|      0|                != 1) {
 2590|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2591|      0|                return EXT_RETURN_FAIL;
 2592|      0|            }
 2593|      0|            return EXT_RETURN_SENT;
 2594|      0|        }
 2595|       |        /* if nobody set a type, use the default */
 2596|      0|        if (s->ext.ech.attempted_type == OSSL_ECH_type_unknown)
  ------------------
  |  |   40|      0|#define OSSL_ECH_type_unknown 0xffff
  ------------------
  |  Branch (2596:13): [True: 0, False: 0]
  ------------------
 2597|      0|            s->ext.ech.attempted_type = TLSEXT_TYPE_ech;
  ------------------
  |  |  174|      0|#define TLSEXT_TYPE_ech 0xfe0d
  ------------------
 2598|      0|        if (ossl_ech_send_grease(s, pkt) != 1) {
  ------------------
  |  Branch (2598:13): [True: 0, False: 0]
  ------------------
 2599|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2600|      0|            return EXT_RETURN_NOT_SENT;
 2601|      0|        }
 2602|      0|        return EXT_RETURN_SENT;
 2603|      0|    }
 2604|       |
 2605|       |    /* For the inner CH - we simply include one of these saying "inner" */
 2606|      0|    if (s->ext.ech.ch_depth == 1) {
  ------------------
  |  Branch (2606:9): [True: 0, False: 0]
  ------------------
 2607|      0|        if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_ech)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2607:13): [True: 0, False: 0]
  ------------------
 2608|      0|            || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2608:16): [True: 0, False: 0]
  ------------------
 2609|      0|            || !WPACKET_put_bytes_u8(pkt, OSSL_ECH_INNER_CH_TYPE)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (2609:16): [True: 0, False: 0]
  ------------------
 2610|      0|            || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2610:16): [True: 0, False: 0]
  ------------------
 2611|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2612|      0|            return EXT_RETURN_FAIL;
 2613|      0|        }
 2614|      0|        return EXT_RETURN_SENT;
 2615|      0|    }
 2616|       |
 2617|       |    /*
 2618|       |     * If not GREASEing we prepare sending the outer value - after the
 2619|       |     * entire thing has been constructed, putting in zeros for now where
 2620|       |     * we'd otherwise include ECH ciphertext, we later encode and encrypt.
 2621|       |     * We need to do it that way as we need the rest of the outer CH to
 2622|       |     * be known and used as AAD input before we do encryption.
 2623|       |     */
 2624|      0|    if (s->ext.ech.ch_depth != 0)
  ------------------
  |  Branch (2624:9): [True: 0, False: 0]
  ------------------
 2625|      0|        return EXT_RETURN_NOT_SENT;
 2626|       |    /* Make ClientHelloInner and EncodedClientHelloInner as per spec. */
 2627|      0|    if (ossl_ech_encode_inner(s, &encoded, &encoded_len) != 1) {
  ------------------
  |  Branch (2627:9): [True: 0, False: 0]
  ------------------
 2628|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2629|      0|        goto err;
 2630|      0|    }
 2631|      0|    s->ext.ech.encoded_inner = encoded;
 2632|      0|    s->ext.ech.encoded_inner_len = encoded_len;
 2633|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 2634|      0|    ossl_ech_pbuf("encoded inner CH", encoded, encoded_len);
 2635|      0|#endif
 2636|      0|    rv = ossl_ech_pick_matching_cfg(s, &ee, &hpke_suite);
 2637|      0|    if (rv != 1 || ee == NULL) {
  ------------------
  |  Branch (2637:9): [True: 0, False: 0]
  |  Branch (2637:20): [True: 0, False: 0]
  ------------------
 2638|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2639|      0|        goto err;
 2640|      0|    }
 2641|      0|    s->ext.ech.attempted_type = ee->version;
 2642|      0|    OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2643|      0|    {
 2644|      0|        BIO_printf(trc_out, "EAAE: selected: version: %4x, config %2x\n",
 2645|      0|            ee->version, ee->config_id);
 2646|      0|    }
 2647|      0|    OSSL_TRACE_END(TLS);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2648|      0|    config_id_to_use = ee->config_id; /* if requested, use a random config_id instead */
 2649|      0|    if ((s->options & SSL_OP_ECH_IGNORE_CID) != 0) {
  ------------------
  |  |  471|      0|#define SSL_OP_ECH_IGNORE_CID SSL_OP_BIT(39)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (2649:9): [True: 0, False: 0]
  ------------------
 2650|      0|        int max_iters = 1000, i = 0;
 2651|       |
 2652|       |        /* rejection sample to get a different but random config_id */
 2653|      0|        while (config_id_to_use == ee->config_id) {
  ------------------
  |  Branch (2653:16): [True: 0, False: 0]
  ------------------
 2654|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 2655|      0|            if (i > 0) {
  ------------------
  |  Branch (2655:17): [True: 0, False: 0]
  ------------------
 2656|      0|                OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2657|      0|                {
 2658|      0|                    BIO_printf(trc_out, "EAAE: rejected random-config %02x\n",
 2659|      0|                        config_id_to_use);
 2660|      0|                }
 2661|      0|                OSSL_TRACE_END(TLS);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2662|      0|            }
 2663|      0|#endif
 2664|      0|            if (RAND_bytes_ex(sctx->libctx, &config_id_to_use, 1, 0) <= 0) {
  ------------------
  |  Branch (2664:17): [True: 0, False: 0]
  ------------------
 2665|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2666|      0|                return 0;
 2667|      0|            }
 2668|      0|            if (i++ >= max_iters) {
  ------------------
  |  Branch (2668:17): [True: 0, False: 0]
  ------------------
 2669|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2670|      0|                return 0;
 2671|      0|            }
 2672|      0|        }
 2673|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 2674|      0|        ossl_ech_pbuf("EAAE: random config_id", &config_id_to_use, 1);
 2675|      0|#endif
 2676|      0|    }
 2677|      0|    s->ext.ech.attempted_cid = config_id_to_use;
 2678|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 2679|      0|    ossl_ech_pbuf("EAAE: peer pub", ee->pub, ee->pub_len);
 2680|      0|    ossl_ech_pbuf("EAAE: clear", encoded, encoded_len);
 2681|      0|    ossl_ech_pbuf("EAAE: ECHConfig", ee->encoded, ee->encoded_len);
 2682|      0|#endif
 2683|       |    /*
 2684|       |     * The AAD is the full outer client hello but with the correct number of
 2685|       |     * zeros for where the ECH ciphertext octets will later be placed. So we
 2686|       |     * add the ECH extension to the |pkt| but with zeros for ciphertext, that
 2687|       |     * forms up the AAD, then after we've encrypted, we'll splice in the actual
 2688|       |     * ciphertext.
 2689|       |     * Watch out for the "4" offsets that remove the type and 3-octet length
 2690|       |     * from the encoded CH as per the spec.
 2691|       |     */
 2692|      0|    clear_len = ossl_ech_calc_padding(s, ee, encoded_len);
 2693|      0|    if (clear_len == 0) {
  ------------------
  |  Branch (2693:9): [True: 0, False: 0]
  ------------------
 2694|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2695|      0|        goto err;
 2696|      0|    }
 2697|      0|    lenclen = OSSL_HPKE_get_public_encap_size(hpke_suite);
 2698|      0|    if (s->ext.ech.hpke_ctx == NULL) { /* 1st CH */
  ------------------
  |  Branch (2698:9): [True: 0, False: 0]
  ------------------
 2699|      0|        if (ossl_ech_make_enc_info(ee->encoded, ee->encoded_len,
  ------------------
  |  Branch (2699:13): [True: 0, False: 0]
  ------------------
 2700|      0|                info, &info_len)
 2701|      0|            != 1) {
 2702|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2703|      0|            goto err;
 2704|      0|        }
 2705|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 2706|      0|        ossl_ech_pbuf("EAAE info", info, info_len);
 2707|      0|#endif
 2708|      0|        s->ext.ech.hpke_ctx = OSSL_HPKE_CTX_new(hpke_mode, hpke_suite,
 2709|      0|            OSSL_HPKE_ROLE_SENDER,
  ------------------
  |  |   73|      0|#define OSSL_HPKE_ROLE_SENDER 0
  ------------------
 2710|      0|            sctx->libctx, sctx->propq);
 2711|      0|        if (s->ext.ech.hpke_ctx == NULL) {
  ------------------
  |  Branch (2711:13): [True: 0, False: 0]
  ------------------
 2712|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2713|      0|            goto err;
 2714|      0|        }
 2715|      0|        mypub = OPENSSL_malloc(lenclen);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2716|      0|        if (mypub == NULL) {
  ------------------
  |  Branch (2716:13): [True: 0, False: 0]
  ------------------
 2717|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2718|      0|            goto err;
 2719|      0|        }
 2720|      0|        mypub_len = lenclen;
 2721|      0|        rv = OSSL_HPKE_encap(s->ext.ech.hpke_ctx, mypub, &mypub_len,
 2722|      0|            ee->pub, ee->pub_len, info, info_len);
 2723|      0|        if (rv != 1) {
  ------------------
  |  Branch (2723:13): [True: 0, False: 0]
  ------------------
 2724|      0|            OPENSSL_free(mypub);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2725|      0|            mypub = NULL;
 2726|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2727|      0|            goto err;
 2728|      0|        }
 2729|      0|        s->ext.ech.pub = mypub;
 2730|      0|        s->ext.ech.pub_len = mypub_len;
 2731|      0|    } else { /* HRR - retrieve public */
 2732|      0|        mypub = s->ext.ech.pub;
 2733|      0|        mypub_len = s->ext.ech.pub_len;
 2734|      0|        if (mypub == NULL || mypub_len == 0) {
  ------------------
  |  Branch (2734:13): [True: 0, False: 0]
  |  Branch (2734:30): [True: 0, False: 0]
  ------------------
 2735|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2736|      0|            goto err;
 2737|      0|        }
 2738|      0|    }
 2739|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 2740|      0|    ossl_ech_pbuf("EAAE: mypub", mypub, mypub_len);
 2741|      0|    WPACKET_get_total_written(pkt, &aad_len); /* use aad_len for tracing */
 2742|      0|    ossl_ech_pbuf("EAAE pkt b4", WPACKET_get_curr(pkt) - aad_len, aad_len);
 2743|      0|#endif
 2744|      0|    cipherlen = OSSL_HPKE_get_ciphertext_size(hpke_suite, clear_len);
 2745|      0|    if (cipherlen <= clear_len || cipherlen > OSSL_ECH_MAX_PAYLOAD_LEN) {
  ------------------
  |  |   31|      0|#define OSSL_ECH_MAX_PAYLOAD_LEN 1500 /* max ECH ciphertext to en/decode */
  ------------------
  |  Branch (2745:9): [True: 0, False: 0]
  |  Branch (2745:35): [True: 0, False: 0]
  ------------------
 2746|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2747|      0|        goto err;
 2748|      0|    }
 2749|      0|    s->ext.ech.clearlen = clear_len;
 2750|      0|    s->ext.ech.cipherlen = cipherlen;
 2751|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_ech)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2751:9): [True: 0, False: 0]
  ------------------
 2752|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2752:12): [True: 0, False: 0]
  ------------------
 2753|      0|        || !WPACKET_put_bytes_u8(pkt, OSSL_ECH_OUTER_CH_TYPE)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (2753:12): [True: 0, False: 0]
  ------------------
 2754|      0|        || !WPACKET_put_bytes_u16(pkt, hpke_suite.kdf_id)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2754:12): [True: 0, False: 0]
  ------------------
 2755|      0|        || !WPACKET_put_bytes_u16(pkt, hpke_suite.aead_id)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2755:12): [True: 0, False: 0]
  ------------------
 2756|      0|        || !WPACKET_put_bytes_u8(pkt, config_id_to_use)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (2756:12): [True: 0, False: 0]
  ------------------
 2757|      0|        || (s->hello_retry_request == SSL_HRR_PENDING
  ------------------
  |  Branch (2757:13): [True: 0, False: 0]
  ------------------
 2758|      0|            && !WPACKET_put_bytes_u16(pkt, 0x00)) /* no pub */
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2758:16): [True: 0, False: 0]
  ------------------
 2759|      0|        || (s->hello_retry_request != SSL_HRR_PENDING
  ------------------
  |  Branch (2759:13): [True: 0, False: 0]
  ------------------
 2760|      0|            && !WPACKET_sub_memcpy_u16(pkt, mypub, mypub_len))
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (2760:16): [True: 0, False: 0]
  ------------------
 2761|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2761:12): [True: 0, False: 0]
  ------------------
 2762|      0|        || !WPACKET_get_total_written(pkt, &s->ext.ech.cipher_offset)
  ------------------
  |  Branch (2762:12): [True: 0, False: 0]
  ------------------
 2763|      0|        || !WPACKET_memset(pkt, 0, cipherlen)
  ------------------
  |  Branch (2763:12): [True: 0, False: 0]
  ------------------
 2764|      0|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (2764:12): [True: 0, False: 0]
  ------------------
 2765|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2765:12): [True: 0, False: 0]
  ------------------
 2766|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2767|      0|        goto err;
 2768|      0|    }
 2769|       |    /* don't count the type + 3-octet length */
 2770|      0|    s->ext.ech.cipher_offset -= 4;
 2771|      0|    return EXT_RETURN_SENT;
 2772|      0|err:
 2773|      0|    return EXT_RETURN_FAIL;
 2774|      0|}
extensions_clnt.c:negotiate_dhe:
  207|  10.8k|{
  208|  10.8k|    int i, end, ret = 0;
  209|  10.8k|    STACK_OF(SSL_CIPHER) *cipher_stack = NULL;
  ------------------
  |  |   33|  10.8k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  210|  10.8k|    const uint16_t *pgroups = NULL;
  211|  10.8k|    size_t num_groups, j;
  212|  10.8k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  10.8k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  213|  10.8k|    int dtls = SSL_CONNECTION_IS_DTLS(s);
  ------------------
  |  |  266|  10.8k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  10.8k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  10.8k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  214|       |
  215|       |    /* See if we support any EC or FFDHE ciphersuites */
  216|  10.8k|    cipher_stack = SSL_get1_supported_ciphers(ssl);
  217|  10.8k|    end = sk_SSL_CIPHER_num(cipher_stack);
  ------------------
  |  | 1028|  10.8k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  218|  21.7k|    for (i = 0; i < end; i++) {
  ------------------
  |  Branch (218:17): [True: 21.7k, False: 0]
  ------------------
  219|  21.7k|        const SSL_CIPHER *c = sk_SSL_CIPHER_value(cipher_stack, i);
  ------------------
  |  | 1029|  21.7k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
  220|  21.7k|        unsigned long alg_k = c->algorithm_mkey;
  221|  21.7k|        unsigned long alg_a = c->algorithm_auth;
  222|       |
  223|  21.7k|        int is_ffdhe_ciphersuite = (alg_k & (SSL_kDHE | SSL_kDHEPSK));
  ------------------
  |  |   87|  21.7k|#define SSL_kDHE 0x00000002U
  ------------------
                      int is_ffdhe_ciphersuite = (alg_k & (SSL_kDHE | SSL_kDHEPSK));
  ------------------
  |  |   99|  21.7k|#define SSL_kDHEPSK 0x00000100U
  ------------------
  224|  21.7k|        int is_ec_ciphersuite = ((alg_k & (SSL_kECDHE | SSL_kECDHEPSK))
  ------------------
  |  |   89|  21.7k|#define SSL_kECDHE 0x00000004U
  ------------------
                      int is_ec_ciphersuite = ((alg_k & (SSL_kECDHE | SSL_kECDHEPSK))
  ------------------
  |  |   98|  21.7k|#define SSL_kECDHEPSK 0x00000080U
  ------------------
  |  Branch (224:34): [True: 3.62k, False: 18.1k]
  ------------------
  225|  18.1k|            || (alg_a & SSL_aECDSA));
  ------------------
  |  |  118|  18.1k|#define SSL_aECDSA 0x00000008U
  ------------------
  |  Branch (225:16): [True: 0, False: 18.1k]
  ------------------
  226|  21.7k|        int is_tls13 = (dtls ? DTLS_VERSION_GT(c->min_dtls, DTLS1_2_VERSION)
  ------------------
  |  |   62|      0|#define DTLS_VERSION_GT(v1, v2) (dtls_ver_ordinal(v1) < dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_GT(v1, v2) (dtls_ver_ordinal(v1) < dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (226:25): [True: 0, False: 21.7k]
  ------------------
  227|  21.7k|                             : (c->min_tls > TLS1_2_VERSION));
  ------------------
  |  |   26|  21.7k|#define TLS1_2_VERSION 0x0303
  ------------------
  228|       |
  229|  21.7k|        if ((check_type == ffdhe_check && (is_ffdhe_ciphersuite || is_tls13))
  ------------------
  |  Branch (229:14): [True: 3.62k, False: 18.1k]
  |  Branch (229:44): [True: 0, False: 3.62k]
  |  Branch (229:68): [True: 3.62k, False: 0]
  ------------------
  230|  18.1k|            || (check_type == ecdhe_check && (is_ec_ciphersuite || is_tls13))
  ------------------
  |  Branch (230:17): [True: 3.62k, False: 14.5k]
  |  Branch (230:47): [True: 0, False: 3.62k]
  |  Branch (230:68): [True: 3.62k, False: 0]
  ------------------
  231|  14.5k|            || (check_type == ptfmt_check && is_ec_ciphersuite)) {
  ------------------
  |  Branch (231:17): [True: 14.5k, False: 0]
  |  Branch (231:46): [True: 3.62k, False: 10.8k]
  ------------------
  232|  10.8k|            ret = 1;
  233|  10.8k|            break;
  234|  10.8k|        }
  235|  21.7k|    }
  236|  10.8k|    sk_SSL_CIPHER_free(cipher_stack);
  ------------------
  |  | 1034|  10.8k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
  237|  10.8k|    if (ret == 0)
  ------------------
  |  Branch (237:9): [True: 0, False: 10.8k]
  ------------------
  238|      0|        return 0;
  239|       |
  240|       |    /* Check we have at least one EC or FFDHE supported group */
  241|  10.8k|    tls1_get_supported_groups(s, &pgroups, &num_groups);
  242|  65.3k|    for (j = 0; j < num_groups; j++) {
  ------------------
  |  Branch (242:17): [True: 65.3k, False: 0]
  ------------------
  243|  65.3k|        uint16_t ctmp = pgroups[j];
  244|  65.3k|        const TLS_GROUP_INFO *ginfo = NULL;
  245|       |
  246|  65.3k|        if (!tls_valid_group(s, ctmp, min_version, max_version, NULL, &ginfo))
  ------------------
  |  Branch (246:13): [True: 0, False: 65.3k]
  ------------------
  247|      0|            continue;
  248|       |
  249|  65.3k|        if (check_type == ffdhe_check && is_ffdhe_group(ginfo->group_id)
  ------------------
  |  Branch (249:13): [True: 36.2k, False: 29.0k]
  |  Branch (249:42): [True: 3.62k, False: 32.6k]
  ------------------
  250|  3.62k|            && tls_group_allowed(s, ctmp, SSL_SECOP_CURVE_SUPPORTED))
  ------------------
  |  | 2760|  3.62k|#define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2731|  3.62k|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  |  Branch (250:16): [True: 3.62k, False: 0]
  ------------------
  251|  3.62k|            return 1;
  252|       |
  253|  61.6k|        if (check_type != ffdhe_check && is_ecdhe_group(ginfo->group_id)
  ------------------
  |  Branch (253:13): [True: 29.0k, False: 32.6k]
  |  Branch (253:42): [True: 7.25k, False: 21.7k]
  ------------------
  254|  7.25k|            && tls_group_allowed(s, ctmp, SSL_SECOP_CURVE_SUPPORTED))
  ------------------
  |  | 2760|  7.25k|#define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2731|  7.25k|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  |  Branch (254:16): [True: 7.25k, False: 0]
  ------------------
  255|  7.25k|            return 1;
  256|  61.6k|    }
  257|      0|    return 0;
  258|  10.8k|}
extensions_clnt.c:add_key_share:
  792|  7.25k|{
  793|  7.25k|    unsigned char *encoded_pubkey = NULL;
  794|  7.25k|    EVP_PKEY *key_share_key = NULL;
  795|  7.25k|    size_t encodedlen;
  796|       |
  797|  7.25k|    if (loop_num < s->s3.tmp.num_ks_pkey) {
  ------------------
  |  Branch (797:9): [True: 0, False: 7.25k]
  ------------------
  798|      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 (798:13): [True: 0, False: 0]
  ------------------
  799|      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 (799:16): [True: 0, False: 0]
  ------------------
  800|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  801|      0|            return 0;
  802|      0|        }
  803|       |        /*
  804|       |         * Could happen if we got an HRR that wasn't requesting a new key_share
  805|       |         */
  806|      0|        key_share_key = s->s3.tmp.ks_pkey[loop_num];
  807|  7.25k|    } else {
  808|  7.25k|        key_share_key = ssl_generate_pkey_group(s, group_id);
  809|  7.25k|        if (key_share_key == NULL) {
  ------------------
  |  Branch (809:13): [True: 0, False: 7.25k]
  ------------------
  810|       |            /* SSLfatal() already called */
  811|      0|            return 0;
  812|      0|        }
  813|  7.25k|    }
  814|       |
  815|       |    /* Encode the public key. */
  816|  7.25k|    encodedlen = EVP_PKEY_get1_encoded_public_key(key_share_key,
  817|  7.25k|        &encoded_pubkey);
  818|  7.25k|    if (encodedlen == 0) {
  ------------------
  |  Branch (818:9): [True: 0, False: 7.25k]
  ------------------
  819|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EC_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  820|      0|        goto err;
  821|      0|    }
  822|       |
  823|       |    /* Create KeyShareEntry */
  824|  7.25k|    if (!WPACKET_put_bytes_u16(pkt, group_id)
  ------------------
  |  |  911|  14.5k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (824:9): [True: 0, False: 7.25k]
  ------------------
  825|  7.25k|        || !WPACKET_sub_memcpy_u16(pkt, encoded_pubkey, encodedlen)) {
  ------------------
  |  |  940|  7.25k|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (825:12): [True: 0, False: 7.25k]
  ------------------
  826|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  827|      0|        goto err;
  828|      0|    }
  829|       |
  830|       |    /* For backward compatibility, we use the first valid group to add a key share */
  831|  7.25k|    if (loop_num == 0) {
  ------------------
  |  Branch (831:9): [True: 3.62k, False: 3.62k]
  ------------------
  832|  3.62k|        s->s3.tmp.pkey = key_share_key;
  833|  3.62k|        s->s3.group_id = group_id;
  834|  3.62k|    }
  835|       |    /* We ensure in t1_lib.c that the loop number does not exceed OPENSSL_CLIENT_MAX_KEY_SHARES */
  836|  7.25k|    s->s3.tmp.ks_pkey[loop_num] = key_share_key;
  837|  7.25k|    s->s3.tmp.ks_group_id[loop_num] = group_id;
  838|  7.25k|    if (loop_num >= s->s3.tmp.num_ks_pkey)
  ------------------
  |  Branch (838:9): [True: 7.25k, False: 0]
  ------------------
  839|  7.25k|        s->s3.tmp.num_ks_pkey++;
  840|       |
  841|  7.25k|    OPENSSL_free(encoded_pubkey);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  842|  7.25k|    return 1;
  843|      0|err:
  844|      0|    if (key_share_key != s->s3.tmp.ks_pkey[loop_num])
  ------------------
  |  Branch (844:9): [True: 0, False: 0]
  ------------------
  845|      0|        EVP_PKEY_free(key_share_key);
  846|      0|    OPENSSL_free(encoded_pubkey);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  847|      0|    return 0;
  848|  7.25k|}

custom_ext_init:
  104|  7.25k|{
  105|  7.25k|    size_t i;
  106|  7.25k|    custom_ext_method *meth = exts->meths;
  107|       |
  108|  7.25k|    for (i = 0; i < exts->meths_count; i++, meth++)
  ------------------
  |  Branch (108:17): [True: 0, False: 7.25k]
  ------------------
  109|      0|        meth->ext_flags &= ~(SSL_EXT_FLAG_SENT | SSL_EXT_FLAG_RECEIVED);
  ------------------
  |  | 2074|      0|#define SSL_EXT_FLAG_SENT 0x2
  ------------------
                      meth->ext_flags &= ~(SSL_EXT_FLAG_SENT | SSL_EXT_FLAG_RECEIVED);
  ------------------
  |  | 2069|      0|#define SSL_EXT_FLAG_RECEIVED 0x1
  ------------------
  110|  7.25k|}
custom_ext_add:
  175|  21.6k|{
  176|  21.6k|    custom_ext_methods *exts = &s->cert->custext;
  177|  21.6k|    custom_ext_method *meth;
  178|  21.6k|    size_t i;
  179|  21.6k|    int al;
  180|  21.6k|    int for_comp = (context & SSL_EXT_TLS1_3_CERTIFICATE_COMPRESSION) != 0;
  ------------------
  |  |  309|  21.6k|#define SSL_EXT_TLS1_3_CERTIFICATE_COMPRESSION 0x08000
  ------------------
  181|       |
  182|  21.6k|    for (i = 0; i < exts->meths_count; i++) {
  ------------------
  |  Branch (182:17): [True: 0, False: 21.6k]
  ------------------
  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) {
  ------------------
  |  |  302|      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) {
  ------------------
  |  |  303|      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) {
  ------------------
  |  |  304|      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) {
  ------------------
  |  |  306|      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) {
  ------------------
  |  |  311|      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) {
  ------------------
  |  |  305|      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))
  ------------------
  |  | 2069|      0|#define SSL_EXT_FLAG_RECEIVED 0x1
  ------------------
  |  Branch (193:17): [True: 0, False: 0]
  ------------------
  194|      0|                continue;
  195|      0|        }
  196|       |
  197|      0|#ifndef OPENSSL_NO_ECH
  198|      0|        if ((context & SSL_EXT_CLIENT_HELLO) != 0
  ------------------
  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (198:13): [True: 0, False: 0]
  ------------------
  199|      0|            && s->ext.ech.attempted == 1) {
  ------------------
  |  Branch (199:16): [True: 0, False: 0]
  ------------------
  200|      0|            if (s->ext.ech.ch_depth == 1) {
  ------------------
  |  Branch (200:17): [True: 0, False: 0]
  ------------------
  201|       |                /* mark custom CH ext for ECH compression, if doing ECH */
  202|      0|                if (s->ext.ech.n_outer_only >= OSSL_ECH_OUTERS_MAX) {
  ------------------
  |  |   38|      0|#define OSSL_ECH_OUTERS_MAX 20 /* max extensions we compress via outer-exts */
  ------------------
  |  Branch (202:21): [True: 0, False: 0]
  ------------------
  203|      0|                    OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  204|      0|                    {
  205|      0|                        BIO_printf(trc_out,
  206|      0|                            "Too many outers to compress (max=%d)\n",
  207|      0|                            OSSL_ECH_OUTERS_MAX);
  ------------------
  |  |   38|      0|#define OSSL_ECH_OUTERS_MAX 20 /* max extensions we compress via outer-exts */
  ------------------
  208|      0|                    }
  209|      0|                    OSSL_TRACE_END(TLS);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  210|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  211|      0|                    return 0;
  212|      0|                }
  213|      0|                s->ext.ech.outer_only[s->ext.ech.n_outer_only] = meth->ext_type;
  214|      0|                s->ext.ech.n_outer_only++;
  215|      0|                OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  216|      0|                {
  217|      0|                    BIO_printf(trc_out, "ECH compressing type "
  218|      0|                                        "0x%04x (tot: %d)\n",
  219|      0|                        (int)meth->ext_type,
  220|      0|                        (int)s->ext.ech.n_outer_only);
  221|      0|                }
  222|      0|                OSSL_TRACE_END(TLS);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  223|      0|            }
  224|      0|            if (s->ext.ech.ch_depth == 0) {
  ------------------
  |  Branch (224:17): [True: 0, False: 0]
  ------------------
  225|       |                /*
  226|       |                 * We store/access the index of the extension handler in
  227|       |                 * s->ext.ech.ext_ind, as we'd otherwise not know it here.
  228|       |                 * Be nice were there a better way to handle that.
  229|       |                 */
  230|       |                /* copy over the extension octets (if any) to outer */
  231|      0|                int j, tind = -1;
  232|      0|                RAW_EXTENSION *raws = NULL;
  233|       |
  234|       |                /* we gotta find the relevant index to copy over this ext */
  235|      0|                if (s->clienthello == NULL
  ------------------
  |  Branch (235:21): [True: 0, False: 0]
  ------------------
  236|      0|                    || s->clienthello->pre_proc_exts == NULL) {
  ------------------
  |  Branch (236:24): [True: 0, False: 0]
  ------------------
  237|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  238|      0|                    return 0;
  239|      0|                }
  240|      0|                raws = s->clienthello->pre_proc_exts;
  241|      0|                for (j = 0; j != (int)s->clienthello->pre_proc_exts_len; j++) {
  ------------------
  |  Branch (241:29): [True: 0, False: 0]
  ------------------
  242|      0|                    if (raws[j].type == meth->ext_type) {
  ------------------
  |  Branch (242:25): [True: 0, False: 0]
  ------------------
  243|      0|                        tind = j;
  244|      0|                        break;
  245|      0|                    }
  246|      0|                }
  247|      0|                if (tind == -1) {
  ------------------
  |  Branch (247:21): [True: 0, False: 0]
  ------------------
  248|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  249|      0|                    return 0;
  250|      0|                }
  251|      0|                if (ossl_ech_copy_inner2outer(s, meth->ext_type, tind,
  ------------------
  |  Branch (251:21): [True: 0, False: 0]
  ------------------
  252|      0|                        pkt)
  253|      0|                    != OSSL_ECH_SAME_EXT_DONE) {
  ------------------
  |  |  294|      0|#define OSSL_ECH_SAME_EXT_DONE 1 /* proceed with same value in inner/outer */
  ------------------
  254|       |                    /* for custom exts, we really should have found it */
  255|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  256|      0|                    return 0;
  257|      0|                }
  258|       |                /* we're done with that one now */
  259|      0|                continue;
  260|      0|            }
  261|      0|        }
  262|      0|#endif
  263|       |
  264|       |        /*
  265|       |         * We skip it if the callback is absent - except for a ClientHello where
  266|       |         * we add an empty extension.
  267|       |         */
  268|      0|        if ((context & SSL_EXT_CLIENT_HELLO) == 0 && meth->add_cb == NULL)
  ------------------
  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (268:13): [True: 0, False: 0]
  |  Branch (268:54): [True: 0, False: 0]
  ------------------
  269|      0|            continue;
  270|       |
  271|      0|        if (meth->add_cb != NULL) {
  ------------------
  |  Branch (271:13): [True: 0, False: 0]
  ------------------
  272|      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)
  ------------------
  273|      0|                meth->ext_type, context, &out,
  274|      0|                &outlen, x, chainidx, &al,
  275|      0|                meth->add_arg);
  276|       |
  277|      0|            if (cb_retval < 0) {
  ------------------
  |  Branch (277:17): [True: 0, False: 0]
  ------------------
  278|      0|                if (!for_comp)
  ------------------
  |  Branch (278:21): [True: 0, False: 0]
  ------------------
  279|      0|                    SSLfatal(s, al, SSL_R_CALLBACK_FAILED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  280|      0|                return 0; /* error */
  281|      0|            }
  282|      0|            if (cb_retval == 0)
  ------------------
  |  Branch (282:17): [True: 0, False: 0]
  ------------------
  283|      0|                continue; /* skip this extension */
  284|      0|        }
  285|       |
  286|      0|        if (!WPACKET_put_bytes_u16(pkt, meth->ext_type)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (286:13): [True: 0, False: 0]
  ------------------
  287|      0|            || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (287:16): [True: 0, False: 0]
  ------------------
  288|      0|            || (outlen > 0 && !WPACKET_memcpy(pkt, out, outlen))
  ------------------
  |  Branch (288:17): [True: 0, False: 0]
  |  Branch (288:31): [True: 0, False: 0]
  ------------------
  289|      0|            || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (289:16): [True: 0, False: 0]
  ------------------
  290|      0|            if (meth->free_cb != NULL)
  ------------------
  |  Branch (290:17): [True: 0, False: 0]
  ------------------
  291|      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)
  ------------------
  292|      0|                    context, out, meth->add_arg);
  293|      0|            if (!for_comp)
  ------------------
  |  Branch (293:17): [True: 0, False: 0]
  ------------------
  294|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  295|      0|            return 0;
  296|      0|        }
  297|      0|        if ((context & SSL_EXT_CLIENT_HELLO) != 0) {
  ------------------
  |  |  300|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (297:13): [True: 0, False: 0]
  ------------------
  298|       |            /*
  299|       |             * We can't send duplicates: code logic should prevent this.
  300|       |             */
  301|      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 (301:17): [True: 0, False: 0]
  ------------------
  302|      0|                if (meth->free_cb != NULL)
  ------------------
  |  Branch (302:21): [True: 0, False: 0]
  ------------------
  303|      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)
  ------------------
  304|      0|                        context, out, meth->add_arg);
  305|      0|                if (!for_comp)
  ------------------
  |  Branch (305:21): [True: 0, False: 0]
  ------------------
  306|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  307|      0|                return 0;
  308|      0|            }
  309|       |            /*
  310|       |             * Indicate extension has been sent: this is both a sanity check to
  311|       |             * ensure we don't send duplicate extensions and indicates that it
  312|       |             * is not an error if the extension is present in ServerHello.
  313|       |             */
  314|      0|            meth->ext_flags |= SSL_EXT_FLAG_SENT;
  ------------------
  |  | 2074|      0|#define SSL_EXT_FLAG_SENT 0x2
  ------------------
  315|      0|        }
  316|      0|        if (meth->free_cb != NULL)
  ------------------
  |  Branch (316:13): [True: 0, False: 0]
  ------------------
  317|      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)
  ------------------
  318|      0|                context, out, meth->add_arg);
  319|      0|    }
  320|  21.6k|    return 1;
  321|  21.6k|}
custom_exts_copy:
  370|  7.25k|{
  371|  7.25k|    size_t i;
  372|  7.25k|    int err = 0;
  373|       |
  374|  7.25k|    if (src->meths_count > 0) {
  ------------------
  |  Branch (374:9): [True: 0, False: 7.25k]
  ------------------
  375|      0|        dst->meths = OPENSSL_memdup(src->meths,
  ------------------
  |  |  134|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  376|      0|            sizeof(*src->meths) * src->meths_count);
  377|      0|        if (dst->meths == NULL)
  ------------------
  |  Branch (377:13): [True: 0, False: 0]
  ------------------
  378|      0|            return 0;
  379|      0|        dst->meths_count = src->meths_count;
  380|       |
  381|      0|        for (i = 0; i < src->meths_count; i++)
  ------------------
  |  Branch (381:21): [True: 0, False: 0]
  ------------------
  382|      0|            custom_ext_copy_old_cb(&dst->meths[i], &src->meths[i], &err);
  383|      0|    }
  384|       |
  385|  7.25k|    if (err) {
  ------------------
  |  Branch (385:9): [True: 0, False: 7.25k]
  ------------------
  386|      0|        custom_exts_free(dst);
  387|      0|        return 0;
  388|      0|    }
  389|       |
  390|  7.25k|    return 1;
  391|  7.25k|}
custom_exts_free:
  441|  14.6k|{
  442|  14.6k|    size_t i;
  443|  14.6k|    custom_ext_method *meth;
  444|       |
  445|  14.6k|    for (i = 0, meth = exts->meths; i < exts->meths_count; i++, meth++) {
  ------------------
  |  Branch (445:37): [True: 0, False: 14.6k]
  ------------------
  446|      0|        if (meth->add_cb != custom_ext_add_old_cb_wrap)
  ------------------
  |  Branch (446:13): [True: 0, False: 0]
  ------------------
  447|      0|            continue;
  448|       |
  449|       |        /* Old style API wrapper. Need to free the arguments too */
  450|      0|        OPENSSL_free(meth->add_arg);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  451|      0|        OPENSSL_free(meth->parse_arg);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  452|      0|    }
  453|  14.6k|    OPENSSL_free(exts->meths);
  ------------------
  |  |  132|  14.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  454|       |    exts->meths = NULL;
  455|  14.6k|    exts->meths_count = 0;
  456|  14.6k|}

tls_parse_ctos_server_name:
  114|  3.62k|{
  115|  3.62k|    unsigned int servname_type;
  116|  3.62k|    PACKET sni, hostname;
  117|       |
  118|  3.62k|    if (!PACKET_as_length_prefixed_2(pkt, &sni)
  ------------------
  |  Branch (118:9): [True: 0, False: 3.62k]
  ------------------
  119|       |        /* ServerNameList must be at least 1 byte long. */
  120|  3.62k|        || PACKET_remaining(&sni) == 0) {
  ------------------
  |  Branch (120:12): [True: 0, False: 3.62k]
  ------------------
  121|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  122|      0|        return 0;
  123|      0|    }
  124|       |
  125|       |    /*
  126|       |     * Although the intent was for server_name to be extensible, RFC 4366
  127|       |     * was not clear about it; and so OpenSSL among other implementations,
  128|       |     * always and only allows a 'host_name' name types.
  129|       |     * RFC 6066 corrected the mistake but adding new name types
  130|       |     * is nevertheless no longer feasible, so act as if no other
  131|       |     * SNI types can exist, to simplify parsing.
  132|       |     *
  133|       |     * Also note that the RFC permits only one SNI value per type,
  134|       |     * i.e., we can only have a single hostname.
  135|       |     */
  136|  3.62k|    if (!PACKET_get_1(&sni, &servname_type)
  ------------------
  |  Branch (136:9): [True: 0, False: 3.62k]
  ------------------
  137|  3.62k|        || servname_type != TLSEXT_NAMETYPE_host_name
  ------------------
  |  |  179|  7.25k|#define TLSEXT_NAMETYPE_host_name 0
  ------------------
  |  Branch (137:12): [True: 0, False: 3.62k]
  ------------------
  138|  3.62k|        || !PACKET_as_length_prefixed_2(&sni, &hostname)) {
  ------------------
  |  Branch (138:12): [True: 0, False: 3.62k]
  ------------------
  139|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  140|      0|        return 0;
  141|      0|    }
  142|       |
  143|       |    /*
  144|       |     * In TLSv1.2 and below the SNI is associated with the session. In TLSv1.3
  145|       |     * we always use the SNI value from the handshake.
  146|       |     */
  147|  3.62k|    if (!s->hit || SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      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 (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      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 (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (147:9): [True: 3.62k, False: 0]
  ------------------
  148|  3.62k|        if (PACKET_remaining(&hostname) > TLSEXT_MAXLEN_host_name) {
  ------------------
  |  |  256|  3.62k|#define TLSEXT_MAXLEN_host_name 255
  ------------------
  |  Branch (148:13): [True: 0, False: 3.62k]
  ------------------
  149|      0|            SSLfatal(s, SSL_AD_UNRECOGNIZED_NAME, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  150|      0|            return 0;
  151|      0|        }
  152|       |
  153|  3.62k|        if (PACKET_contains_zero_byte(&hostname)) {
  ------------------
  |  Branch (153:13): [True: 0, False: 3.62k]
  ------------------
  154|      0|            SSLfatal(s, SSL_AD_UNRECOGNIZED_NAME, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  155|      0|            return 0;
  156|      0|        }
  157|       |
  158|       |        /*
  159|       |         * Store the requested SNI in the SSL as temporary storage.
  160|       |         * If we accept it, it will get stored in the SSL_SESSION as well.
  161|       |         */
  162|  3.62k|        OPENSSL_free(s->ext.hostname);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  163|  3.62k|        s->ext.hostname = NULL;
  164|  3.62k|        if (!PACKET_strndup(&hostname, &s->ext.hostname)) {
  ------------------
  |  Branch (164:13): [True: 0, False: 3.62k]
  ------------------
  165|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  166|      0|            return 0;
  167|      0|        }
  168|       |
  169|  3.62k|        s->servername_done = 1;
  170|  3.62k|    } else {
  171|       |        /*
  172|       |         * In TLSv1.2 and below we should check if the SNI is consistent between
  173|       |         * the initial handshake and the resumption. In TLSv1.3 SNI is not
  174|       |         * associated with the session.
  175|       |         */
  176|      0|        s->servername_done = (s->session->ext.hostname != NULL)
  ------------------
  |  Branch (176:30): [True: 0, False: 0]
  ------------------
  177|      0|            && PACKET_equal(&hostname, s->session->ext.hostname,
  ------------------
  |  Branch (177:16): [True: 0, False: 0]
  ------------------
  178|      0|                strlen(s->session->ext.hostname));
  179|      0|    }
  180|       |
  181|  3.62k|    return 1;
  182|  3.62k|}
tls_parse_ctos_sig_algs:
  312|  3.62k|{
  313|  3.62k|    PACKET supported_sig_algs;
  314|       |
  315|  3.62k|    if (!PACKET_as_length_prefixed_2(pkt, &supported_sig_algs)
  ------------------
  |  Branch (315:9): [True: 0, False: 3.62k]
  ------------------
  316|  3.62k|        || PACKET_remaining(&supported_sig_algs) == 0) {
  ------------------
  |  Branch (316:12): [True: 0, False: 3.62k]
  ------------------
  317|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  318|      0|        return 0;
  319|      0|    }
  320|       |
  321|       |    /*
  322|       |     * We use this routine on both clients and servers, and when clients
  323|       |     * get asked for PHA we need to always save the sigalgs regardless
  324|       |     * of whether it was a resumption or not.
  325|       |     */
  326|  3.62k|    if ((!s->server || (s->server && !s->hit))
  ------------------
  |  Branch (326:10): [True: 0, False: 3.62k]
  |  Branch (326:25): [True: 3.62k, False: 0]
  |  Branch (326:38): [True: 3.62k, False: 0]
  ------------------
  327|  3.62k|        && !tls1_save_sigalgs(s, &supported_sig_algs, 0)) {
  ------------------
  |  Branch (327:12): [True: 0, False: 3.62k]
  ------------------
  328|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  329|      0|        return 0;
  330|      0|    }
  331|       |
  332|  3.62k|    return 1;
  333|  3.62k|}
tls_parse_ctos_alpn:
  460|  3.62k|{
  461|  3.62k|    PACKET protocol_list, save_protocol_list, protocol;
  462|       |
  463|  3.62k|    if (!SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  285|  3.62k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  286|  3.62k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  464|      0|        return 1;
  465|       |
  466|  3.62k|    if (!PACKET_as_length_prefixed_2(pkt, &protocol_list)
  ------------------
  |  Branch (466:9): [True: 0, False: 3.62k]
  ------------------
  467|  3.62k|        || PACKET_remaining(&protocol_list) < 2) {
  ------------------
  |  Branch (467:12): [True: 0, False: 3.62k]
  ------------------
  468|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  469|      0|        return 0;
  470|      0|    }
  471|       |
  472|  3.62k|    save_protocol_list = protocol_list;
  473|  7.25k|    do {
  474|       |        /* Protocol names can't be empty. */
  475|  7.25k|        if (!PACKET_get_length_prefixed_1(&protocol_list, &protocol)
  ------------------
  |  Branch (475:13): [True: 0, False: 7.25k]
  ------------------
  476|  7.25k|            || PACKET_remaining(&protocol) == 0) {
  ------------------
  |  Branch (476:16): [True: 0, False: 7.25k]
  ------------------
  477|      0|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  478|      0|            return 0;
  479|      0|        }
  480|  7.25k|    } while (PACKET_remaining(&protocol_list) != 0);
  ------------------
  |  Branch (480:14): [True: 3.62k, False: 3.62k]
  ------------------
  481|       |
  482|  3.62k|    OPENSSL_free(s->s3.alpn_proposed);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  483|  3.62k|    s->s3.alpn_proposed = NULL;
  484|  3.62k|    s->s3.alpn_proposed_len = 0;
  485|  3.62k|    if (!PACKET_memdup(&save_protocol_list,
  ------------------
  |  Branch (485:9): [True: 0, False: 3.62k]
  ------------------
  486|  3.62k|            &s->s3.alpn_proposed, &s->s3.alpn_proposed_len)) {
  487|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  488|      0|        return 0;
  489|      0|    }
  490|       |
  491|  3.62k|    return 1;
  492|  3.62k|}
tls_parse_ctos_psk_kex_modes:
  578|  3.62k|{
  579|  3.62k|#ifndef OPENSSL_NO_TLS1_3
  580|  3.62k|    PACKET psk_kex_modes;
  581|  3.62k|    unsigned int mode;
  582|       |
  583|  3.62k|    if (!PACKET_as_length_prefixed_1(pkt, &psk_kex_modes)
  ------------------
  |  Branch (583:9): [True: 0, False: 3.62k]
  ------------------
  584|  3.62k|        || PACKET_remaining(&psk_kex_modes) == 0) {
  ------------------
  |  Branch (584:12): [True: 0, False: 3.62k]
  ------------------
  585|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  586|      0|        return 0;
  587|      0|    }
  588|       |
  589|  7.25k|    while (PACKET_get_1(&psk_kex_modes, &mode)) {
  ------------------
  |  Branch (589:12): [True: 3.62k, False: 3.62k]
  ------------------
  590|  3.62k|        if (mode == TLSEXT_KEX_MODE_KE_DHE)
  ------------------
  |  | 2217|  3.62k|#define TLSEXT_KEX_MODE_KE_DHE 0x01
  ------------------
  |  Branch (590:13): [True: 3.62k, False: 0]
  ------------------
  591|  3.62k|            s->ext.psk_kex_mode |= TLSEXT_KEX_MODE_FLAG_KE_DHE;
  ------------------
  |  | 2224|  3.62k|#define TLSEXT_KEX_MODE_FLAG_KE_DHE 2
  ------------------
  592|      0|        else if (mode == TLSEXT_KEX_MODE_KE
  ------------------
  |  | 2216|      0|#define TLSEXT_KEX_MODE_KE 0x00
  ------------------
  |  Branch (592:18): [True: 0, False: 0]
  ------------------
  593|      0|            && (s->options & SSL_OP_ALLOW_NO_DHE_KEX) != 0)
  ------------------
  |  |  370|      0|#define SSL_OP_ALLOW_NO_DHE_KEX SSL_OP_BIT(10)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (593:16): [True: 0, False: 0]
  ------------------
  594|      0|            s->ext.psk_kex_mode |= TLSEXT_KEX_MODE_FLAG_KE;
  ------------------
  |  | 2223|      0|#define TLSEXT_KEX_MODE_FLAG_KE 1
  ------------------
  595|  3.62k|    }
  596|       |
  597|  3.62k|    if (((s->ext.psk_kex_mode & TLSEXT_KEX_MODE_FLAG_KE) != 0)
  ------------------
  |  | 2223|  3.62k|#define TLSEXT_KEX_MODE_FLAG_KE 1
  ------------------
  |  Branch (597:9): [True: 0, False: 3.62k]
  ------------------
  598|      0|        && (s->options & SSL_OP_PREFER_NO_DHE_KEX) != 0) {
  ------------------
  |  |  455|      0|#define SSL_OP_PREFER_NO_DHE_KEX SSL_OP_BIT(35)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (598:12): [True: 0, False: 0]
  ------------------
  599|       |
  600|       |        /*
  601|       |         * If NO_DHE is supported and preferred, then we only remember this
  602|       |         * mode. DHE PSK will not be used for sure, because in any case where
  603|       |         * it would be supported (i.e. if a key share is present), NO_DHE would
  604|       |         * be supported as well. As the latter is preferred it would be
  605|       |         * chosen. By removing DHE PSK here, we don't have to deal with the
  606|       |         * SSL_OP_PREFER_NO_DHE_KEX option in any other place.
  607|       |         */
  608|      0|        s->ext.psk_kex_mode = TLSEXT_KEX_MODE_FLAG_KE;
  ------------------
  |  | 2223|      0|#define TLSEXT_KEX_MODE_FLAG_KE 1
  ------------------
  609|      0|    }
  610|       |
  611|  3.62k|#endif
  612|       |
  613|  3.62k|    return 1;
  614|  3.62k|}
tls_parse_ctos_key_share:
  822|  3.62k|{
  823|  3.62k|#ifndef OPENSSL_NO_TLS1_3
  824|  3.62k|    PACKET key_share_list;
  825|  3.62k|    const uint16_t *clntgroups, *srvrgroups;
  826|  3.62k|    const size_t *srvrtuples;
  827|  3.62k|    uint16_t *first_group_in_tuple;
  828|  3.62k|    size_t clnt_num_groups, srvr_num_groups, srvr_num_tuples;
  829|  3.62k|    PACKET *encoded_pubkey_arr = NULL;
  830|  3.62k|    uint16_t *keyshares_arr = NULL;
  831|  3.62k|    size_t keyshares_cnt = 0;
  832|       |    /* We conservatively assume that we did not find a suitable group */
  833|  3.62k|    uint16_t group_id_candidate = 0;
  834|  3.62k|    KS_EXTRACTION_RESULT ks_extraction_result;
  835|  3.62k|    size_t current_tuple;
  836|  3.62k|    int ret = 0;
  837|       |
  838|  3.62k|    s->s3.group_id_candidate = 0;
  839|  3.62k|    if (s->hit && (s->ext.psk_kex_mode & TLSEXT_KEX_MODE_FLAG_KE_DHE) == 0)
  ------------------
  |  | 2224|      0|#define TLSEXT_KEX_MODE_FLAG_KE_DHE 2
  ------------------
  |  Branch (839:9): [True: 0, False: 3.62k]
  |  Branch (839:19): [True: 0, False: 0]
  ------------------
  840|      0|        return 1;
  841|       |
  842|       |    /* Sanity check */
  843|  3.62k|    if (s->s3.peer_tmp != NULL) {
  ------------------
  |  Branch (843:9): [True: 0, False: 3.62k]
  ------------------
  844|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  845|      0|        return 0;
  846|      0|    }
  847|       |
  848|  3.62k|    if (!PACKET_as_length_prefixed_2(pkt, &key_share_list)) {
  ------------------
  |  Branch (848:9): [True: 0, False: 3.62k]
  ------------------
  849|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  850|      0|        return 0;
  851|      0|    }
  852|       |
  853|       |    /* Get list of server supported groups and the group tuples */
  854|  3.62k|    tls1_get_supported_groups(s, &srvrgroups, &srvr_num_groups);
  855|  3.62k|    tls1_get_group_tuples(s, &srvrtuples, &srvr_num_tuples);
  856|       |    /* Get the clients list of supported groups. */
  857|  3.62k|    tls1_get_peer_groups(s, &clntgroups, &clnt_num_groups);
  858|       |
  859|  3.62k|    if (clnt_num_groups == 0) {
  ------------------
  |  Branch (859:9): [True: 0, False: 3.62k]
  ------------------
  860|       |        /*
  861|       |         * This can only happen if the supported_groups extension was not sent,
  862|       |         * because we verify that the length is non-zero when we process that
  863|       |         * extension.
  864|       |         */
  865|      0|        SSLfatal(s, SSL_AD_MISSING_EXTENSION,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  866|      0|            SSL_R_MISSING_SUPPORTED_GROUPS_EXTENSION);
  867|      0|        return 0;
  868|      0|    }
  869|       |
  870|  3.62k|    if (s->s3.group_id != 0 && PACKET_remaining(&key_share_list) == 0) {
  ------------------
  |  Branch (870:9): [True: 0, False: 3.62k]
  |  Branch (870:32): [True: 0, False: 0]
  ------------------
  871|       |        /*
  872|       |         * If we set a group_id already, then we must have sent an HRR
  873|       |         * requesting a new key_share. If we haven't got one then that is an
  874|       |         * error
  875|       |         */
  876|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_KEY_SHARE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  877|      0|        return 0;
  878|      0|    }
  879|       |
  880|       |    /* We parse the key share extension and memorize the entries (after some checks) */
  881|  3.62k|    ks_extraction_result = extract_keyshares(s,
  882|  3.62k|        &key_share_list,
  883|  3.62k|        clntgroups, clnt_num_groups,
  884|  3.62k|        srvrgroups, srvr_num_groups,
  885|  3.62k|        &keyshares_arr, &encoded_pubkey_arr,
  886|  3.62k|        &keyshares_cnt);
  887|       |
  888|  3.62k|    if (ks_extraction_result == EXTRACTION_FAILURE) /* Fatal error during tests */
  ------------------
  |  Branch (888:9): [True: 0, False: 3.62k]
  ------------------
  889|      0|        return 0; /* Memory already freed and SSLfatal already called */
  890|  3.62k|    if (ks_extraction_result == EXTRACTION_SUCCESS_HRR) /* Successful HRR */
  ------------------
  |  Branch (890:9): [True: 0, False: 3.62k]
  ------------------
  891|      0|        goto end;
  892|       |
  893|       |    /*
  894|       |     * We now have the following lists available to make a decision for
  895|       |     * which group the server should use for key exchange :
  896|       |     * From client: clntgroups[clnt_num_groups],
  897|       |     *              keyshares_arr[keyshares_cnt], encoded_pubkey_arr[keyshares_cnt]
  898|       |     * From server: srvrgroups[srvr_num_groups], srvrtuples[srvr_num_tuples]
  899|       |     *
  900|       |     * Group selection algorithm:
  901|       |     *    For all tuples do:
  902|       |     *      key share group(s) overlapping with current tuple?
  903|       |     *         --> Yes: accept group_id for SH
  904|       |     *        --> No: is any of the client supported_groups overlapping with current tuple?
  905|       |     *            --> Yes: memorize group_id for HRR, break
  906|       |     *             --> No: continue to check next tuple
  907|       |     *
  908|       |     * Remark: Selection priority different for client- or server-preference
  909|       |     */
  910|  3.62k|    first_group_in_tuple = (uint16_t *)srvrgroups;
  911|  3.62k|    for (current_tuple = 0; current_tuple < srvr_num_tuples; current_tuple++) {
  ------------------
  |  Branch (911:29): [True: 3.62k, False: 0]
  ------------------
  912|  3.62k|        size_t number_of_groups_in_tuple = srvrtuples[current_tuple];
  913|  3.62k|        int prio_group_idx = 0, candidate_group_idx = 0;
  914|       |
  915|       |        /* Server or client preference ? */
  916|  3.62k|        if (s->options & SSL_OP_SERVER_PREFERENCE) {
  ------------------
  |  |  414|  3.62k|#define SSL_OP_SERVER_PREFERENCE SSL_OP_BIT(22)
  |  |  ------------------
  |  |  |  |  351|  3.62k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (916:13): [True: 0, False: 3.62k]
  ------------------
  917|       |            /* Server preference */
  918|       |            /* Is there overlap with a key share group?  */
  919|      0|            check_overlap(s,
  920|      0|                first_group_in_tuple, number_of_groups_in_tuple,
  921|      0|                keyshares_arr, keyshares_cnt,
  922|      0|                &prio_group_idx, &candidate_group_idx,
  923|      0|                &group_id_candidate);
  924|      0|            if (group_id_candidate > 0) { /* Overlap found -> accept the key share group */
  ------------------
  |  Branch (924:17): [True: 0, False: 0]
  ------------------
  925|      0|                if (!tls_accept_ksgroup(s, group_id_candidate,
  ------------------
  |  Branch (925:21): [True: 0, False: 0]
  ------------------
  926|      0|                        &encoded_pubkey_arr[candidate_group_idx]))
  927|      0|                    goto err; /* SSLfatal already called */
  928|       |                /* We have all info for a SH, hence we're done here */
  929|      0|                goto end;
  930|      0|            } else {
  931|       |                /*
  932|       |                 * There's no overlap with a key share, but is there at least a client
  933|       |                 * supported_group overlapping with the current tuple?
  934|       |                 */
  935|      0|                check_overlap(s,
  936|      0|                    first_group_in_tuple, number_of_groups_in_tuple,
  937|      0|                    clntgroups, clnt_num_groups,
  938|      0|                    &prio_group_idx, &candidate_group_idx,
  939|      0|                    &group_id_candidate);
  940|      0|                if (group_id_candidate > 0) {
  ------------------
  |  Branch (940:21): [True: 0, False: 0]
  ------------------
  941|       |                    /*
  942|       |                     * We did not have a key share overlap, but at least the supported
  943|       |                     * groups overlap hence we can stop searching
  944|       |                     * (and report group_id_candidate 'upward' for HRR)
  945|       |                     */
  946|      0|                    s->s3.group_id_candidate = group_id_candidate;
  947|      0|                    goto end;
  948|      0|                } else {
  949|       |                    /*
  950|       |                     * Neither key share nor supported_groups overlap current
  951|       |                     * tuple, hence we try the next tuple
  952|       |                     */
  953|      0|                    first_group_in_tuple = &first_group_in_tuple[number_of_groups_in_tuple];
  954|      0|                    continue;
  955|      0|                }
  956|      0|            }
  957|       |
  958|  3.62k|        } else { /* We have client preference */
  959|  3.62k|            check_overlap(s,
  960|  3.62k|                keyshares_arr, keyshares_cnt,
  961|  3.62k|                first_group_in_tuple, number_of_groups_in_tuple,
  962|  3.62k|                &prio_group_idx, &candidate_group_idx,
  963|  3.62k|                &group_id_candidate);
  964|  3.62k|            if (group_id_candidate > 0) {
  ------------------
  |  Branch (964:17): [True: 3.62k, False: 0]
  ------------------
  965|  3.62k|                if (!tls_accept_ksgroup(s, group_id_candidate, &encoded_pubkey_arr[prio_group_idx]))
  ------------------
  |  Branch (965:21): [True: 0, False: 3.62k]
  ------------------
  966|      0|                    goto err;
  967|  3.62k|                goto end;
  968|  3.62k|            } else {
  969|      0|                check_overlap(s,
  970|      0|                    clntgroups, clnt_num_groups,
  971|      0|                    first_group_in_tuple, number_of_groups_in_tuple,
  972|      0|                    &prio_group_idx, &candidate_group_idx,
  973|      0|                    &group_id_candidate);
  974|      0|                if (group_id_candidate > 0) {
  ------------------
  |  Branch (974:21): [True: 0, False: 0]
  ------------------
  975|      0|                    s->s3.group_id_candidate = group_id_candidate;
  976|      0|                    goto end;
  977|      0|                } else {
  978|      0|                    first_group_in_tuple = &first_group_in_tuple[number_of_groups_in_tuple];
  979|      0|                    continue;
  980|      0|                }
  981|      0|            }
  982|  3.62k|        }
  983|  3.62k|    }
  984|       |
  985|  3.62k|end:
  986|  3.62k|    ret = 1;
  987|       |
  988|  3.62k|err:
  989|  3.62k|    OPENSSL_free(keyshares_arr);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  990|  3.62k|    OPENSSL_free(encoded_pubkey_arr);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  991|  3.62k|    return ret;
  992|       |
  993|      0|#endif
  994|       |
  995|      0|    return 1;
  996|  3.62k|}
tls_parse_ctos_supported_groups:
 1214|  3.62k|{
 1215|  3.62k|    PACKET supported_groups_list;
 1216|       |
 1217|       |    /* Each group is 2 bytes and we must have at least 1. */
 1218|  3.62k|    if (!PACKET_as_length_prefixed_2(pkt, &supported_groups_list)
  ------------------
  |  Branch (1218:9): [True: 0, False: 3.62k]
  ------------------
 1219|  3.62k|        || PACKET_remaining(&supported_groups_list) == 0
  ------------------
  |  Branch (1219:12): [True: 0, False: 3.62k]
  ------------------
 1220|  3.62k|        || (PACKET_remaining(&supported_groups_list) % 2) != 0) {
  ------------------
  |  Branch (1220:12): [True: 0, False: 3.62k]
  ------------------
 1221|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1222|      0|        return 0;
 1223|      0|    }
 1224|       |
 1225|  3.62k|    if (!s->hit || SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      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 (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      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 (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1225:9): [True: 3.62k, False: 0]
  ------------------
 1226|  3.62k|        OPENSSL_free(s->ext.peer_supportedgroups);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1227|  3.62k|        s->ext.peer_supportedgroups = NULL;
 1228|  3.62k|        s->ext.peer_supportedgroups_len = 0;
 1229|       |        /*
 1230|       |         * We only pay attention to the first 128 supported groups and ignore
 1231|       |         * any beyond that limit. Theoretically this could cause problems if
 1232|       |         * the client also uses one of these groups (say in a key share extension)
 1233|       |         * - but why would any valid client be sending such a huge supported
 1234|       |         * groups list?
 1235|       |         */
 1236|  3.62k|        if (!tls1_save_u16(&supported_groups_list,
  ------------------
  |  Branch (1236:13): [True: 0, False: 3.62k]
  ------------------
 1237|  3.62k|                &s->ext.peer_supportedgroups,
 1238|  3.62k|                &s->ext.peer_supportedgroups_len, MAX_SUPPORTED_GROUPS)) {
  ------------------
  |  |   22|  3.62k|#define MAX_SUPPORTED_GROUPS 128
  ------------------
 1239|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1240|      0|            return 0;
 1241|      0|        }
 1242|  3.62k|    }
 1243|       |
 1244|  3.62k|    return 1;
 1245|  3.62k|}
tls_parse_ctos_post_handshake_auth:
 1566|  3.62k|{
 1567|  3.62k|    if (PACKET_remaining(pkt) != 0) {
  ------------------
  |  Branch (1567:9): [True: 0, False: 3.62k]
  ------------------
 1568|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1569|      0|            SSL_R_POST_HANDSHAKE_AUTH_ENCODING_ERR);
 1570|      0|        return 0;
 1571|      0|    }
 1572|       |
 1573|  3.62k|    s->post_handshake_auth = SSL_PHA_EXT_RECEIVED;
 1574|       |
 1575|  3.62k|    return 1;
 1576|  3.62k|}
tls_construct_stoc_server_name:
 1608|  3.62k|{
 1609|  3.62k|    if (s->servername_done != 1)
  ------------------
  |  Branch (1609:9): [True: 3.62k, False: 0]
  ------------------
 1610|  3.62k|        return EXT_RETURN_NOT_SENT;
 1611|       |
 1612|       |    /*
 1613|       |     * Prior to TLSv1.3 we ignore any SNI in the current handshake if resuming.
 1614|       |     * We just use the servername from the initial handshake.
 1615|       |     */
 1616|      0|    if (s->hit && !SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      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 (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      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 (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1616:9): [True: 0, False: 0]
  ------------------
 1617|      0|        return EXT_RETURN_NOT_SENT;
 1618|       |
 1619|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_server_name)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1619:9): [True: 0, False: 0]
  ------------------
 1620|      0|        || !WPACKET_put_bytes_u16(pkt, 0)) {
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1620:12): [True: 0, False: 0]
  ------------------
 1621|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1622|      0|        return EXT_RETURN_FAIL;
 1623|      0|    }
 1624|       |
 1625|      0|    return EXT_RETURN_SENT;
 1626|      0|}
tls_construct_stoc_maxfragmentlen:
 1632|  3.62k|{
 1633|  3.62k|    if (!USE_MAX_FRAGMENT_LENGTH_EXT(s->session))
  ------------------
  |  |  304|  3.62k|    IS_MAX_FRAGMENT_LENGTH_EXT_VALID(session->ext.max_fragment_len_mode)
  |  |  ------------------
  |  |  |  |  302|  3.62k|    (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|  3.62k|#define TLSEXT_max_fragment_length_512 1
  |  |  |  |  ------------------
  |  |  |  |                   (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  240|      0|#define TLSEXT_max_fragment_length_4096 4
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (302:6): [True: 0, False: 3.62k]
  |  |  |  |  |  Branch (302:53): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1634|  3.62k|        return EXT_RETURN_NOT_SENT;
 1635|       |
 1636|       |    /*-
 1637|       |     * 4 bytes for this extension type and extension length
 1638|       |     * 1 byte for the Max Fragment Length code value.
 1639|       |     */
 1640|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_max_fragment_length)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1640:9): [True: 0, False: 0]
  ------------------
 1641|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1641:12): [True: 0, False: 0]
  ------------------
 1642|      0|        || !WPACKET_put_bytes_u8(pkt, s->session->ext.max_fragment_len_mode)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (1642:12): [True: 0, False: 0]
  ------------------
 1643|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1643:12): [True: 0, False: 0]
  ------------------
 1644|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1645|      0|        return EXT_RETURN_FAIL;
 1646|      0|    }
 1647|       |
 1648|      0|    return EXT_RETURN_SENT;
 1649|      0|}
tls_construct_stoc_supported_groups:
 1680|  3.62k|{
 1681|  3.62k|    const uint16_t *groups;
 1682|  3.62k|    size_t numgroups, i, first = 1;
 1683|  3.62k|    int version;
 1684|       |
 1685|       |    /* s->s3.group_id is non zero if we accepted a key_share */
 1686|  3.62k|    if (s->s3.group_id == 0)
  ------------------
  |  Branch (1686:9): [True: 0, False: 3.62k]
  ------------------
 1687|      0|        return EXT_RETURN_NOT_SENT;
 1688|       |
 1689|       |    /* Get our list of supported groups */
 1690|  3.62k|    tls1_get_supported_groups(s, &groups, &numgroups);
 1691|  3.62k|    if (numgroups == 0) {
  ------------------
  |  Branch (1691:9): [True: 0, False: 3.62k]
  ------------------
 1692|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1693|      0|        return EXT_RETURN_FAIL;
 1694|      0|    }
 1695|       |
 1696|       |    /* Copy group ID if supported */
 1697|  3.62k|    version = SSL_version(SSL_CONNECTION_GET_SSL(s));
  ------------------
  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1698|  3.62k|    for (i = 0; i < numgroups; i++) {
  ------------------
  |  Branch (1698:17): [True: 3.62k, False: 0]
  ------------------
 1699|  3.62k|        uint16_t group = groups[i];
 1700|       |
 1701|  3.62k|        if (tls_valid_group(s, group, version, version, NULL, NULL)
  ------------------
  |  Branch (1701:13): [True: 3.62k, False: 0]
  ------------------
 1702|  3.62k|            && tls_group_allowed(s, group, SSL_SECOP_CURVE_SUPPORTED)) {
  ------------------
  |  | 2760|  3.62k|#define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2731|  3.62k|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1702:16): [True: 3.62k, False: 0]
  ------------------
 1703|  3.62k|            if (first) {
  ------------------
  |  Branch (1703:17): [True: 3.62k, False: 0]
  ------------------
 1704|       |                /*
 1705|       |                 * Check if the client is already using our preferred group. If
 1706|       |                 * so we don't need to add this extension
 1707|       |                 */
 1708|  3.62k|                if (s->s3.group_id == group)
  ------------------
  |  Branch (1708:21): [True: 3.62k, False: 0]
  ------------------
 1709|  3.62k|                    return EXT_RETURN_NOT_SENT;
 1710|       |
 1711|       |                /* Add extension header */
 1712|      0|                if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_supported_groups)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1712:21): [True: 0, False: 0]
  ------------------
 1713|       |                    /* Sub-packet for supported_groups extension */
 1714|      0|                    || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1714:24): [True: 0, False: 0]
  ------------------
 1715|      0|                    || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1715:24): [True: 0, False: 0]
  ------------------
 1716|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1717|      0|                    return EXT_RETURN_FAIL;
 1718|      0|                }
 1719|       |
 1720|      0|                first = 0;
 1721|      0|            }
 1722|      0|            if (!WPACKET_put_bytes_u16(pkt, group)) {
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1722:17): [True: 0, False: 0]
  ------------------
 1723|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1724|      0|                return EXT_RETURN_FAIL;
 1725|      0|            }
 1726|      0|        }
 1727|  3.62k|    }
 1728|       |
 1729|      0|    if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1729:9): [True: 0, False: 0]
  |  Branch (1729:32): [True: 0, False: 0]
  ------------------
 1730|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1731|      0|        return EXT_RETURN_FAIL;
 1732|      0|    }
 1733|       |
 1734|      0|    return EXT_RETURN_SENT;
 1735|      0|}
tls_construct_stoc_status_request:
 1759|  3.62k|{
 1760|  3.62k|    OCSP_RESPONSE *resp;
 1761|       |
 1762|       |    /* We don't currently support this extension inside a CertificateRequest */
 1763|  3.62k|    if (context == SSL_EXT_TLS1_3_CERTIFICATE_REQUEST)
  ------------------
  |  |  308|  3.62k|#define SSL_EXT_TLS1_3_CERTIFICATE_REQUEST 0x04000
  ------------------
  |  Branch (1763:9): [True: 0, False: 3.62k]
  ------------------
 1764|      0|        return EXT_RETURN_NOT_SENT;
 1765|       |
 1766|  3.62k|    if (!s->ext.status_expected)
  ------------------
  |  Branch (1766:9): [True: 3.62k, False: 0]
  ------------------
 1767|  3.62k|        return EXT_RETURN_NOT_SENT;
 1768|       |
 1769|       |    /* Try to retrieve OCSP response for the actual certificate */
 1770|      0|    resp = ossl_get_ocsp_response(s, (int)chainidx);
 1771|       |
 1772|       |    /* If no OCSP response was found the extension is not sent */
 1773|      0|    if (resp == NULL)
  ------------------
  |  Branch (1773:9): [True: 0, False: 0]
  ------------------
 1774|      0|        return EXT_RETURN_NOT_SENT;
 1775|       |
 1776|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_status_request)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1776:9): [True: 0, False: 0]
  ------------------
 1777|      0|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1777:12): [True: 0, False: 0]
  ------------------
 1778|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1779|      0|        return EXT_RETURN_FAIL;
 1780|      0|    }
 1781|       |
 1782|       |    /*
 1783|       |     * In TLSv1.3 we include the certificate status itself. In <= TLSv1.2 we
 1784|       |     * send back an empty extension, with the certificate status appearing as a
 1785|       |     * separate message
 1786|       |     */
 1787|      0|    if (SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      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 (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      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 (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1788|      0|        && !tls_construct_cert_status_body(s, resp, pkt)) {
  ------------------
  |  Branch (1788:12): [True: 0, False: 0]
  ------------------
 1789|       |        /* SSLfatal() already called */
 1790|      0|        return EXT_RETURN_FAIL;
 1791|      0|    }
 1792|      0|    if (!WPACKET_close(pkt)) {
  ------------------
  |  Branch (1792:9): [True: 0, False: 0]
  ------------------
 1793|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1794|      0|        return EXT_RETURN_FAIL;
 1795|      0|    }
 1796|       |
 1797|      0|    return EXT_RETURN_SENT;
 1798|      0|}
tls_construct_stoc_alpn:
 1834|  3.62k|{
 1835|  3.62k|    if (s->s3.alpn_selected == NULL)
  ------------------
  |  Branch (1835:9): [True: 2, False: 3.62k]
  ------------------
 1836|      2|        return EXT_RETURN_NOT_SENT;
 1837|       |
 1838|  3.62k|    if (!WPACKET_put_bytes_u16(pkt,
  ------------------
  |  |  911|  7.25k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1838:9): [True: 0, False: 3.62k]
  ------------------
 1839|  3.62k|            TLSEXT_TYPE_application_layer_protocol_negotiation)
 1840|  3.62k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  7.25k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1840:12): [True: 0, False: 3.62k]
  ------------------
 1841|  3.62k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  7.25k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1841:12): [True: 0, False: 3.62k]
  ------------------
 1842|  3.62k|        || !WPACKET_sub_memcpy_u8(pkt, s->s3.alpn_selected,
  ------------------
  |  |  938|  7.25k|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (1842:12): [True: 0, False: 3.62k]
  ------------------
 1843|  3.62k|            s->s3.alpn_selected_len)
 1844|  3.62k|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (1844:12): [True: 0, False: 3.62k]
  ------------------
 1845|  3.62k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1845:12): [True: 0, False: 3.62k]
  ------------------
 1846|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1847|      0|        return EXT_RETURN_FAIL;
 1848|      0|    }
 1849|       |
 1850|  3.62k|    return EXT_RETURN_SENT;
 1851|  3.62k|}
tls_construct_stoc_use_srtp:
 1857|  3.62k|{
 1858|  3.62k|    if (s->srtp_profile == NULL)
  ------------------
  |  Branch (1858:9): [True: 3.62k, False: 0]
  ------------------
 1859|  3.62k|        return EXT_RETURN_NOT_SENT;
 1860|       |
 1861|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_use_srtp)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1861:9): [True: 0, False: 0]
  ------------------
 1862|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1862:12): [True: 0, False: 0]
  ------------------
 1863|      0|        || !WPACKET_put_bytes_u16(pkt, 2)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1863:12): [True: 0, False: 0]
  ------------------
 1864|      0|        || !WPACKET_put_bytes_u16(pkt, s->srtp_profile->id)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1864:12): [True: 0, False: 0]
  ------------------
 1865|      0|        || !WPACKET_put_bytes_u8(pkt, 0)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (1865:12): [True: 0, False: 0]
  ------------------
 1866|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1866:12): [True: 0, False: 0]
  ------------------
 1867|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1868|      0|        return EXT_RETURN_FAIL;
 1869|      0|    }
 1870|       |
 1871|      0|    return EXT_RETURN_SENT;
 1872|      0|}
tls_construct_stoc_supported_versions:
 1924|  3.62k|{
 1925|  3.62k|    if (!ossl_assert(SSL_CONNECTION_IS_TLS13(s))) {
  ------------------
  |  |   52|  14.5k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 3.62k, False: 0]
  |  |  |  Branch (52:41): [True: 3.62k, False: 0]
  |  |  |  Branch (52:41): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |   53|  3.62k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1925:9): [True: 0, False: 3.62k]
  ------------------
 1926|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1927|      0|        return EXT_RETURN_FAIL;
 1928|      0|    }
 1929|       |
 1930|  3.62k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_supported_versions)
  ------------------
  |  |  911|  7.25k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1930:9): [True: 0, False: 3.62k]
  ------------------
 1931|  3.62k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  7.25k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1931:12): [True: 0, False: 3.62k]
  ------------------
 1932|  3.62k|        || !WPACKET_put_bytes_u16(pkt, s->version)
  ------------------
  |  |  911|  7.25k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1932:12): [True: 0, False: 3.62k]
  ------------------
 1933|  3.62k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1933:12): [True: 0, False: 3.62k]
  ------------------
 1934|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1935|      0|        return EXT_RETURN_FAIL;
 1936|      0|    }
 1937|       |
 1938|  3.62k|    return EXT_RETURN_SENT;
 1939|  3.62k|}
tls_construct_stoc_key_share:
 1944|  3.62k|{
 1945|  3.62k|#ifndef OPENSSL_NO_TLS1_3
 1946|  3.62k|    unsigned char *encoded_pubkey;
 1947|  3.62k|    size_t encoded_pubkey_len = 0;
 1948|  3.62k|    EVP_PKEY *ckey = s->s3.peer_tmp, *skey = NULL;
 1949|  3.62k|    const TLS_GROUP_INFO *ginf = NULL;
 1950|       |
 1951|  3.62k|    if (s->hello_retry_request == SSL_HRR_PENDING) {
  ------------------
  |  Branch (1951:9): [True: 0, False: 3.62k]
  ------------------
 1952|      0|        if (ckey != NULL) {
  ------------------
  |  Branch (1952:13): [True: 0, False: 0]
  ------------------
 1953|       |            /* Original key_share was acceptable so don't ask for another one */
 1954|      0|            return EXT_RETURN_NOT_SENT;
 1955|      0|        }
 1956|      0|        if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_key_share)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1956:13): [True: 0, False: 0]
  ------------------
 1957|      0|            || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1957:16): [True: 0, False: 0]
  ------------------
 1958|      0|            || !WPACKET_put_bytes_u16(pkt, s->s3.group_id)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1958:16): [True: 0, False: 0]
  ------------------
 1959|      0|            || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1959:16): [True: 0, False: 0]
  ------------------
 1960|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1961|      0|            return EXT_RETURN_FAIL;
 1962|      0|        }
 1963|       |
 1964|      0|        return EXT_RETURN_SENT;
 1965|      0|    }
 1966|       |
 1967|  3.62k|    if (ckey == NULL) {
  ------------------
  |  Branch (1967:9): [True: 0, False: 3.62k]
  ------------------
 1968|       |        /* No key_share received from client - must be resuming */
 1969|      0|        if (!s->hit || !tls13_generate_handshake_secret(s, NULL, 0)) {
  ------------------
  |  Branch (1969:13): [True: 0, False: 0]
  |  Branch (1969:24): [True: 0, False: 0]
  ------------------
 1970|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1971|      0|            return EXT_RETURN_FAIL;
 1972|      0|        }
 1973|      0|        return EXT_RETURN_NOT_SENT;
 1974|      0|    }
 1975|       |
 1976|  3.62k|    if (s->hit && (s->ext.psk_kex_mode & TLSEXT_KEX_MODE_FLAG_KE_DHE) == 0) {
  ------------------
  |  | 2224|      0|#define TLSEXT_KEX_MODE_FLAG_KE_DHE 2
  ------------------
  |  Branch (1976:9): [True: 0, False: 3.62k]
  |  Branch (1976:19): [True: 0, False: 0]
  ------------------
 1977|       |        /*
 1978|       |         * PSK ('hit') and explicitly not doing DHE. If the client sent the
 1979|       |         * DHE option, we take it by default, except if non-DHE would be
 1980|       |         * preferred by config, but this case would have been handled in
 1981|       |         * tls_parse_ctos_psk_kex_modes().
 1982|       |         */
 1983|      0|        return EXT_RETURN_NOT_SENT;
 1984|      0|    }
 1985|       |
 1986|  3.62k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_key_share)
  ------------------
  |  |  911|  7.25k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1986:9): [True: 0, False: 3.62k]
  ------------------
 1987|  3.62k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|  7.25k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1987:12): [True: 0, False: 3.62k]
  ------------------
 1988|  3.62k|        || !WPACKET_put_bytes_u16(pkt, s->s3.group_id)) {
  ------------------
  |  |  911|  3.62k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1988:12): [True: 0, False: 3.62k]
  ------------------
 1989|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1990|      0|        return EXT_RETURN_FAIL;
 1991|      0|    }
 1992|       |
 1993|  3.62k|    if ((ginf = tls1_group_id_lookup(SSL_CONNECTION_GET_CTX(s),
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  |  Branch (1993:9): [True: 0, False: 3.62k]
  ------------------
 1994|  3.62k|             s->s3.group_id))
 1995|  3.62k|        == NULL) {
 1996|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1997|      0|        return EXT_RETURN_FAIL;
 1998|      0|    }
 1999|       |
 2000|  3.62k|    if (!ginf->is_kem) {
  ------------------
  |  Branch (2000:9): [True: 0, False: 3.62k]
  ------------------
 2001|       |        /* Regular KEX */
 2002|      0|        skey = ssl_generate_pkey(s, ckey);
 2003|      0|        if (skey == NULL) {
  ------------------
  |  Branch (2003:13): [True: 0, False: 0]
  ------------------
 2004|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_SSL_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2005|      0|            return EXT_RETURN_FAIL;
 2006|      0|        }
 2007|       |
 2008|       |        /* Generate encoding of server key */
 2009|      0|        encoded_pubkey_len = EVP_PKEY_get1_encoded_public_key(skey, &encoded_pubkey);
 2010|      0|        if (encoded_pubkey_len == 0) {
  ------------------
  |  Branch (2010:13): [True: 0, False: 0]
  ------------------
 2011|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EC_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2012|      0|            EVP_PKEY_free(skey);
 2013|      0|            return EXT_RETURN_FAIL;
 2014|      0|        }
 2015|       |
 2016|      0|        if (!WPACKET_sub_memcpy_u16(pkt, encoded_pubkey, encoded_pubkey_len)
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (2016:13): [True: 0, False: 0]
  ------------------
 2017|      0|            || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2017:16): [True: 0, False: 0]
  ------------------
 2018|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2019|      0|            EVP_PKEY_free(skey);
 2020|      0|            OPENSSL_free(encoded_pubkey);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2021|      0|            return EXT_RETURN_FAIL;
 2022|      0|        }
 2023|      0|        OPENSSL_free(encoded_pubkey);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2024|       |
 2025|       |        /*
 2026|       |         * This causes the crypto state to be updated based on the derived keys
 2027|       |         */
 2028|      0|        if (ssl_derive(s, skey, ckey, 1) == 0) {
  ------------------
  |  Branch (2028:13): [True: 0, False: 0]
  ------------------
 2029|       |            /* SSLfatal() already called */
 2030|      0|            EVP_PKEY_free(skey);
 2031|      0|            return EXT_RETURN_FAIL;
 2032|      0|        }
 2033|      0|        s->s3.tmp.pkey = skey;
 2034|  3.62k|    } else {
 2035|       |        /* KEM mode */
 2036|  3.62k|        unsigned char *ct = NULL;
 2037|  3.62k|        size_t ctlen = 0;
 2038|       |
 2039|       |        /*
 2040|       |         * This does not update the crypto state.
 2041|       |         *
 2042|       |         * The generated pms is stored in `s->s3.tmp.pms` to be later used via
 2043|       |         * ssl_gensecret().
 2044|       |         */
 2045|  3.62k|        if (ssl_encapsulate(s, ckey, &ct, &ctlen, 0) == 0) {
  ------------------
  |  Branch (2045:13): [True: 0, False: 3.62k]
  ------------------
 2046|       |            /* SSLfatal() already called */
 2047|      0|            return EXT_RETURN_FAIL;
 2048|      0|        }
 2049|       |
 2050|  3.62k|        if (ctlen == 0) {
  ------------------
  |  Branch (2050:13): [True: 0, False: 3.62k]
  ------------------
 2051|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2052|      0|            OPENSSL_free(ct);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2053|      0|            return EXT_RETURN_FAIL;
 2054|      0|        }
 2055|       |
 2056|  3.62k|        if (!WPACKET_sub_memcpy_u16(pkt, ct, ctlen)
  ------------------
  |  |  940|  7.25k|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (2056:13): [True: 0, False: 3.62k]
  ------------------
 2057|  3.62k|            || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2057:16): [True: 0, False: 3.62k]
  ------------------
 2058|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2059|      0|            OPENSSL_free(ct);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2060|      0|            return EXT_RETURN_FAIL;
 2061|      0|        }
 2062|  3.62k|        OPENSSL_free(ct);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2063|       |
 2064|       |        /*
 2065|       |         * This causes the crypto state to be updated based on the generated pms
 2066|       |         */
 2067|  3.62k|        if (ssl_gensecret(s, s->s3.tmp.pms, s->s3.tmp.pmslen) == 0) {
  ------------------
  |  Branch (2067:13): [True: 0, False: 3.62k]
  ------------------
 2068|       |            /* SSLfatal() already called */
 2069|      0|            return EXT_RETURN_FAIL;
 2070|      0|        }
 2071|  3.62k|    }
 2072|  3.62k|    s->s3.did_kex = 1;
 2073|  3.62k|    return EXT_RETURN_SENT;
 2074|       |#else
 2075|       |    return EXT_RETURN_FAIL;
 2076|       |#endif
 2077|  3.62k|}
tls_construct_stoc_early_data:
 2242|  10.7k|{
 2243|  10.7k|    if (context == SSL_EXT_TLS1_3_NEW_SESSION_TICKET) {
  ------------------
  |  |  307|  10.7k|#define SSL_EXT_TLS1_3_NEW_SESSION_TICKET 0x02000
  ------------------
  |  Branch (2243:9): [True: 7.16k, False: 3.62k]
  ------------------
 2244|  7.16k|        if (s->max_early_data == 0)
  ------------------
  |  Branch (2244:13): [True: 7.16k, False: 0]
  ------------------
 2245|  7.16k|            return EXT_RETURN_NOT_SENT;
 2246|       |
 2247|      0|        if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_early_data)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2247:13): [True: 0, False: 0]
  ------------------
 2248|      0|            || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2248:16): [True: 0, False: 0]
  ------------------
 2249|      0|            || !WPACKET_put_bytes_u32(pkt, s->max_early_data)
  ------------------
  |  |  915|      0|    WPACKET_put_bytes__((pkt), (val), 4)
  ------------------
  |  Branch (2249:16): [True: 0, False: 0]
  ------------------
 2250|      0|            || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2250:16): [True: 0, False: 0]
  ------------------
 2251|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2252|      0|            return EXT_RETURN_FAIL;
 2253|      0|        }
 2254|       |
 2255|      0|        return EXT_RETURN_SENT;
 2256|      0|    }
 2257|       |
 2258|  3.62k|    if (s->ext.early_data != SSL_EARLY_DATA_ACCEPTED)
  ------------------
  |  | 2074|  3.62k|#define SSL_EARLY_DATA_ACCEPTED 2
  ------------------
  |  Branch (2258:9): [True: 3.62k, False: 0]
  ------------------
 2259|  3.62k|        return EXT_RETURN_NOT_SENT;
 2260|       |
 2261|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_early_data)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2261:9): [True: 0, False: 0]
  ------------------
 2262|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2262:12): [True: 0, False: 0]
  ------------------
 2263|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2263:12): [True: 0, False: 0]
  ------------------
 2264|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2265|      0|        return EXT_RETURN_FAIL;
 2266|      0|    }
 2267|       |
 2268|      0|    return EXT_RETURN_SENT;
 2269|      0|}
tls_construct_stoc_psk:
 2274|  3.62k|{
 2275|  3.62k|    if (!s->hit)
  ------------------
  |  Branch (2275:9): [True: 3.62k, False: 0]
  ------------------
 2276|  3.62k|        return EXT_RETURN_NOT_SENT;
 2277|       |
 2278|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_psk)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2278:9): [True: 0, False: 0]
  ------------------
 2279|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2279:12): [True: 0, False: 0]
  ------------------
 2280|      0|        || !WPACKET_put_bytes_u16(pkt, s->ext.tick_identity)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2280:12): [True: 0, False: 0]
  ------------------
 2281|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2281:12): [True: 0, False: 0]
  ------------------
 2282|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2283|      0|        return EXT_RETURN_FAIL;
 2284|      0|    }
 2285|       |
 2286|      0|    return EXT_RETURN_SENT;
 2287|      0|}
tls_construct_stoc_client_cert_type:
 2292|  3.62k|{
 2293|  3.62k|    if (sc->ext.client_cert_type_ctos == OSSL_CERT_TYPE_CTOS_ERROR
  ------------------
  |  |  377|  7.25k|#define OSSL_CERT_TYPE_CTOS_ERROR 2
  ------------------
  |  Branch (2293:9): [True: 0, False: 3.62k]
  ------------------
 2294|      0|        && (send_certificate_request(sc)
  ------------------
  |  Branch (2294:13): [True: 0, False: 0]
  ------------------
 2295|      0|            || sc->post_handshake_auth == SSL_PHA_EXT_RECEIVED)) {
  ------------------
  |  Branch (2295:16): [True: 0, False: 0]
  ------------------
 2296|       |        /* Did not receive an acceptable cert type - and doing client auth */
 2297|      0|        SSLfatal(sc, SSL_AD_UNSUPPORTED_CERTIFICATE, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2298|      0|        return EXT_RETURN_FAIL;
 2299|      0|    }
 2300|       |
 2301|  3.62k|    if (sc->ext.client_cert_type == TLSEXT_cert_type_x509) {
  ------------------
  |  |  248|  3.62k|#define TLSEXT_cert_type_x509 0
  ------------------
  |  Branch (2301:9): [True: 3.62k, False: 0]
  ------------------
 2302|  3.62k|        sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE;
  ------------------
  |  |  375|  3.62k|#define OSSL_CERT_TYPE_CTOS_NONE 0
  ------------------
 2303|  3.62k|        return EXT_RETURN_NOT_SENT;
 2304|  3.62k|    }
 2305|       |
 2306|       |    /*
 2307|       |     * Note: only supposed to send this if we are going to do a cert request,
 2308|       |     * but TLSv1.3 could do a PHA request if the client supports it
 2309|       |     */
 2310|      0|    if ((!send_certificate_request(sc) && sc->post_handshake_auth != SSL_PHA_EXT_RECEIVED)
  ------------------
  |  Branch (2310:10): [True: 0, False: 0]
  |  Branch (2310:43): [True: 0, False: 0]
  ------------------
 2311|      0|        || sc->ext.client_cert_type_ctos != OSSL_CERT_TYPE_CTOS_GOOD
  ------------------
  |  |  376|      0|#define OSSL_CERT_TYPE_CTOS_GOOD 1
  ------------------
  |  Branch (2311:12): [True: 0, False: 0]
  ------------------
 2312|      0|        || sc->client_cert_type == NULL) {
  ------------------
  |  Branch (2312:12): [True: 0, False: 0]
  ------------------
 2313|       |        /* if we don't send it, reset to TLSEXT_cert_type_x509 */
 2314|      0|        sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE;
  ------------------
  |  |  375|      0|#define OSSL_CERT_TYPE_CTOS_NONE 0
  ------------------
 2315|      0|        sc->ext.client_cert_type = TLSEXT_cert_type_x509;
  ------------------
  |  |  248|      0|#define TLSEXT_cert_type_x509 0
  ------------------
 2316|      0|        return EXT_RETURN_NOT_SENT;
 2317|      0|    }
 2318|       |
 2319|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_client_cert_type)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2319:9): [True: 0, False: 0]
  ------------------
 2320|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2320:12): [True: 0, False: 0]
  ------------------
 2321|      0|        || !WPACKET_put_bytes_u8(pkt, sc->ext.client_cert_type)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (2321:12): [True: 0, False: 0]
  ------------------
 2322|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2322:12): [True: 0, False: 0]
  ------------------
 2323|      0|        SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2324|      0|        return EXT_RETURN_FAIL;
 2325|      0|    }
 2326|      0|    return EXT_RETURN_SENT;
 2327|      0|}
tls_construct_stoc_server_cert_type:
 2387|  3.62k|{
 2388|  3.62k|    if (sc->ext.server_cert_type == TLSEXT_cert_type_x509) {
  ------------------
  |  |  248|  3.62k|#define TLSEXT_cert_type_x509 0
  ------------------
  |  Branch (2388:9): [True: 3.62k, False: 0]
  ------------------
 2389|  3.62k|        sc->ext.server_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE;
  ------------------
  |  |  375|  3.62k|#define OSSL_CERT_TYPE_CTOS_NONE 0
  ------------------
 2390|  3.62k|        return EXT_RETURN_NOT_SENT;
 2391|  3.62k|    }
 2392|      0|    if (sc->ext.server_cert_type_ctos != OSSL_CERT_TYPE_CTOS_GOOD
  ------------------
  |  |  376|      0|#define OSSL_CERT_TYPE_CTOS_GOOD 1
  ------------------
  |  Branch (2392:9): [True: 0, False: 0]
  ------------------
 2393|      0|        || sc->server_cert_type == NULL) {
  ------------------
  |  Branch (2393:12): [True: 0, False: 0]
  ------------------
 2394|       |        /* if we don't send it, reset to TLSEXT_cert_type_x509 */
 2395|      0|        sc->ext.server_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE;
  ------------------
  |  |  375|      0|#define OSSL_CERT_TYPE_CTOS_NONE 0
  ------------------
 2396|      0|        sc->ext.server_cert_type = TLSEXT_cert_type_x509;
  ------------------
  |  |  248|      0|#define TLSEXT_cert_type_x509 0
  ------------------
 2397|      0|        return EXT_RETURN_NOT_SENT;
 2398|      0|    }
 2399|       |
 2400|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_server_cert_type)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2400:9): [True: 0, False: 0]
  ------------------
 2401|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2401:12): [True: 0, False: 0]
  ------------------
 2402|      0|        || !WPACKET_put_bytes_u8(pkt, sc->ext.server_cert_type)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (2402:12): [True: 0, False: 0]
  ------------------
 2403|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2403:12): [True: 0, False: 0]
  ------------------
 2404|      0|        SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2405|      0|        return EXT_RETURN_FAIL;
 2406|      0|    }
 2407|      0|    return EXT_RETURN_SENT;
 2408|      0|}
tls_construct_stoc_ech:
 2520|  3.62k|{
 2521|  3.62k|    unsigned char *rcfgs = NULL;
 2522|  3.62k|    size_t rcfgslen = 0;
 2523|  3.62k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2524|       |
 2525|  3.62k|    if (context == SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST
  ------------------
  |  |  305|  7.25k|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
  |  Branch (2525:9): [True: 0, False: 3.62k]
  ------------------
 2526|      0|        && (s->ext.ech.success == 1 || s->ext.ech.backend == 1)
  ------------------
  |  Branch (2526:13): [True: 0, False: 0]
  |  Branch (2526:40): [True: 0, False: 0]
  ------------------
 2527|      0|        && s->ext.ech.attempted_type == TLSEXT_TYPE_ech) {
  ------------------
  |  |  174|      0|#define TLSEXT_TYPE_ech 0xfe0d
  ------------------
  |  Branch (2527:12): [True: 0, False: 0]
  ------------------
 2528|      0|        unsigned char eightzeros[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
 2529|       |
 2530|      0|        if (!WPACKET_put_bytes_u16(pkt, s->ext.ech.attempted_type)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2530:13): [True: 0, False: 0]
  ------------------
 2531|      0|            || !WPACKET_sub_memcpy_u16(pkt, eightzeros, 8)) {
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (2531:16): [True: 0, False: 0]
  ------------------
 2532|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2533|      0|            return 0;
 2534|      0|        }
 2535|      0|        OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2536|      0|        {
 2537|      0|            BIO_printf(trc_out, "set 8 zeros for ECH accept confirm in HRR\n");
 2538|      0|        }
 2539|      0|        OSSL_TRACE_END(TLS);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2540|      0|        return EXT_RETURN_SENT;
 2541|      0|    }
 2542|       |    /* GREASE or error => random confirmation in HRR case */
 2543|  3.62k|    if (context == SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST
  ------------------
  |  |  305|  7.25k|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
  |  Branch (2543:9): [True: 0, False: 3.62k]
  ------------------
 2544|      0|        && s->ext.ech.attempted_type == TLSEXT_TYPE_ech
  ------------------
  |  |  174|  3.62k|#define TLSEXT_TYPE_ech 0xfe0d
  ------------------
  |  Branch (2544:12): [True: 0, False: 0]
  ------------------
 2545|      0|        && s->ext.ech.attempted == 1) {
  ------------------
  |  Branch (2545:12): [True: 0, False: 0]
  ------------------
 2546|      0|        unsigned char randomconf[8];
 2547|       |
 2548|      0|        if (RAND_bytes_ex(sctx->libctx, randomconf, 8,
  ------------------
  |  Branch (2548:13): [True: 0, False: 0]
  ------------------
 2549|      0|                RAND_DRBG_STRENGTH)
  ------------------
  |  |   37|      0|#define RAND_DRBG_STRENGTH 256
  ------------------
 2550|      0|            <= 0) {
 2551|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2552|      0|            return 0;
 2553|      0|        }
 2554|      0|        if (!WPACKET_put_bytes_u16(pkt, s->ext.ech.attempted_type)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2554:13): [True: 0, False: 0]
  ------------------
 2555|      0|            || !WPACKET_sub_memcpy_u16(pkt, randomconf, 8)) {
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (2555:16): [True: 0, False: 0]
  ------------------
 2556|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2557|      0|            return 0;
 2558|      0|        }
 2559|      0|        OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2560|      0|        {
 2561|      0|            BIO_printf(trc_out, "set random for ECH acccpt confirm in HRR\n");
 2562|      0|        }
 2563|      0|        OSSL_TRACE_END(TLS);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2564|      0|        return EXT_RETURN_SENT;
 2565|      0|    }
 2566|       |    /* in other HRR circumstances: don't set */
 2567|  3.62k|    if (context == SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST)
  ------------------
  |  |  305|  3.62k|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
  |  Branch (2567:9): [True: 0, False: 3.62k]
  ------------------
 2568|      0|        return EXT_RETURN_NOT_SENT;
 2569|       |    /* If in some weird state we ignore and send nothing */
 2570|  3.62k|    if (s->ext.ech.grease != OSSL_ECH_IS_GREASE
  ------------------
  |  |   37|  7.25k|#define OSSL_ECH_IS_GREASE 1 /* when decryption failed or GREASE wanted */
  ------------------
  |  Branch (2570:9): [True: 3.62k, False: 0]
  ------------------
 2571|      0|        || s->ext.ech.attempted_type != TLSEXT_TYPE_ech)
  ------------------
  |  |  174|      0|#define TLSEXT_TYPE_ech 0xfe0d
  ------------------
  |  Branch (2571:12): [True: 0, False: 0]
  ------------------
 2572|  3.62k|        return EXT_RETURN_NOT_SENT;
 2573|       |    /*
 2574|       |     * If the client GREASEd, or we think it did, return the
 2575|       |     * most-recently loaded ECHConfigList, as the value of the
 2576|       |     * extension. Most-recently loaded can be anywhere in the
 2577|       |     * list, depending on changing or non-changing file names.
 2578|       |     */
 2579|      0|    if (s->ext.ech.es == NULL) {
  ------------------
  |  Branch (2579:9): [True: 0, False: 0]
  ------------------
 2580|      0|        OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2581|      0|        {
 2582|      0|            BIO_printf(trc_out, "ECH - not sending ECHConfigList to client "
 2583|      0|                                "even though they GREASE'd as I've no loaded configs\n");
 2584|      0|        }
 2585|      0|        OSSL_TRACE_END(TLS);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2586|      0|        return EXT_RETURN_NOT_SENT;
 2587|      0|    }
 2588|      0|    if (ossl_ech_get_retry_configs(s, &rcfgs, &rcfgslen) != 1) {
  ------------------
  |  Branch (2588:9): [True: 0, False: 0]
  ------------------
 2589|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2590|      0|        return 0;
 2591|      0|    }
 2592|      0|    if (rcfgslen == 0) {
  ------------------
  |  Branch (2592:9): [True: 0, False: 0]
  ------------------
 2593|      0|        OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2594|      0|        {
 2595|      0|            BIO_printf(trc_out, "ECH - not sending ECHConfigList to client "
 2596|      0|                                "even though they GREASE'd and I have configs but "
 2597|      0|                                "I've no configs set to be returned\n");
 2598|      0|        }
 2599|      0|        OSSL_TRACE_END(TLS);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2600|      0|        OPENSSL_free(rcfgs);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2601|      0|        return EXT_RETURN_NOT_SENT;
 2602|      0|    }
 2603|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_ech)
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2603:9): [True: 0, False: 0]
  ------------------
 2604|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  812|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2604:12): [True: 0, False: 0]
  ------------------
 2605|      0|        || !WPACKET_sub_memcpy_u16(pkt, rcfgs, rcfgslen)
  ------------------
  |  |  940|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (2605:12): [True: 0, False: 0]
  ------------------
 2606|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2606:12): [True: 0, False: 0]
  ------------------
 2607|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2608|      0|        OPENSSL_free(rcfgs);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2609|      0|        return 0;
 2610|      0|    }
 2611|      0|    OPENSSL_free(rcfgs);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2612|      0|    return EXT_RETURN_SENT;
 2613|      0|}
extensions_srvr.c:extract_keyshares:
  663|  3.62k|{
  664|  3.62k|    PACKET encoded_pubkey;
  665|  3.62k|    size_t key_share_pos = 0;
  666|  3.62k|    size_t previous_key_share_pos = 0;
  667|  3.62k|    unsigned int group_id = 0;
  668|  3.62k|    unsigned int i;
  669|       |
  670|       |    /*
  671|       |     * Theoretically there is no limit on the number of keyshares as long as
  672|       |     * they are less than 2^16 bytes in total. It costs us something for each
  673|       |     * keyshare to confirm the groups are valid, so we restrict this to a
  674|       |     * sensible number (MAX_KEY_SHARES == 16). Any keyshares over this limit are
  675|       |     * simply ignored.
  676|       |     */
  677|       |
  678|       |    /* Prepare memory to hold the extracted key share groups and related pubkeys */
  679|  3.62k|    *keyshares_arr = OPENSSL_malloc_array(MAX_KEY_SHARES,
  ------------------
  |  |  111|  3.62k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  680|  3.62k|        sizeof(**keyshares_arr));
  681|  3.62k|    if (*keyshares_arr == NULL) {
  ------------------
  |  Branch (681:9): [True: 0, False: 3.62k]
  ------------------
  682|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  683|      0|        goto failure;
  684|      0|    }
  685|  3.62k|    *encoded_pubkey_arr = OPENSSL_malloc_array(MAX_KEY_SHARES,
  ------------------
  |  |  111|  3.62k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  686|  3.62k|        sizeof(**encoded_pubkey_arr));
  687|  3.62k|    if (*encoded_pubkey_arr == NULL) {
  ------------------
  |  Branch (687:9): [True: 0, False: 3.62k]
  ------------------
  688|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  689|      0|        goto failure;
  690|      0|    }
  691|       |
  692|       |    /*
  693|       |     * We limit the number of key shares we are willing to process to
  694|       |     * MAX_KEY_SHARES regardless of whether we include them in keyshares_arr or
  695|       |     * not.
  696|       |     */
  697|  10.8k|    for (i = 0; PACKET_remaining(key_share_list) > 0 && i < MAX_KEY_SHARES; i++) {
  ------------------
  |  |   23|  7.25k|#define MAX_KEY_SHARES 16
  ------------------
  |  Branch (697:17): [True: 7.25k, False: 3.62k]
  |  Branch (697:57): [True: 7.25k, False: 0]
  ------------------
  698|       |        /* Get the group_id for the current share and its encoded_pubkey */
  699|  7.25k|        if (!PACKET_get_net_2(key_share_list, &group_id)
  ------------------
  |  Branch (699:13): [True: 0, False: 7.25k]
  ------------------
  700|  7.25k|            || !PACKET_get_length_prefixed_2(key_share_list, &encoded_pubkey)
  ------------------
  |  Branch (700:16): [True: 0, False: 7.25k]
  ------------------
  701|  7.25k|            || PACKET_remaining(&encoded_pubkey) == 0) {
  ------------------
  |  Branch (701:16): [True: 0, False: 7.25k]
  ------------------
  702|      0|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  703|      0|            goto failure;
  704|      0|        }
  705|       |
  706|       |        /*
  707|       |         * If we sent an HRR then the key_share sent back MUST be for the group
  708|       |         * we requested, and must be the only key_share sent.
  709|       |         */
  710|  7.25k|        if (s->s3.group_id != 0
  ------------------
  |  Branch (710:13): [True: 0, False: 7.25k]
  ------------------
  711|      0|            && (group_id != s->s3.group_id
  ------------------
  |  Branch (711:17): [True: 0, False: 0]
  ------------------
  712|      0|                || PACKET_remaining(key_share_list) != 0)) {
  ------------------
  |  Branch (712:20): [True: 0, False: 0]
  ------------------
  713|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_KEY_SHARE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  714|      0|            goto failure;
  715|      0|        }
  716|       |
  717|       |        /*
  718|       |         * Check if this share is in supported_groups sent from client
  719|       |         * RFC 8446 also mandates that clients send keyshares in the same
  720|       |         * order as listed in the supported groups extension, but its not
  721|       |         * required that the server check that, and some clients violate this
  722|       |         * so instead of failing the connection when that occurs, log a trace
  723|       |         * message indicating the client discrepancy.
  724|       |         */
  725|  7.25k|        if (!check_in_list(s, group_id, clntgroups, clnt_num_groups, 0, &key_share_pos)) {
  ------------------
  |  Branch (725:13): [True: 0, False: 7.25k]
  ------------------
  726|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_KEY_SHARE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  727|      0|            goto failure;
  728|      0|        }
  729|       |
  730|  7.25k|        if (key_share_pos < previous_key_share_pos)
  ------------------
  |  Branch (730:13): [True: 0, False: 7.25k]
  ------------------
  731|  7.25k|            OSSL_TRACE1(TLS, "key share group id %d is out of RFC 8446 order\n", group_id);
  ------------------
  |  |  291|      0|    OSSL_TRACEV(category, (trc_out, format, arg1))
  |  |  ------------------
  |  |  |  |  283|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  732|       |
  733|  7.25k|        previous_key_share_pos = key_share_pos;
  734|       |
  735|  7.25k|        if (s->s3.group_id != 0) {
  ------------------
  |  Branch (735:13): [True: 0, False: 7.25k]
  ------------------
  736|       |            /*
  737|       |             * We have sent a HRR, and the key share we got back is
  738|       |             * the one we expected and is the only key share and is
  739|       |             * in the list of supported_groups (checked
  740|       |             * above already), hence we accept this key share group
  741|       |             */
  742|      0|            if (!tls_accept_ksgroup(s, s->s3.group_id, &encoded_pubkey))
  ------------------
  |  Branch (742:17): [True: 0, False: 0]
  ------------------
  743|      0|                goto failure; /* SSLfatal already called */
  744|       |            /* We have selected a key share group via HRR, hence we're done here */
  745|      0|            return EXTRACTION_SUCCESS_HRR;
  746|      0|        }
  747|       |
  748|       |        /*
  749|       |         * We tolerate but ignore a group id that we don't think is
  750|       |         * suitable for TLSv1.3 or which is not supported by the server
  751|       |         */
  752|  7.25k|        if (!check_in_list(s, group_id, srvrgroups, srvr_num_groups, 1, NULL)
  ------------------
  |  Branch (752:13): [True: 0, False: 7.25k]
  ------------------
  753|  7.25k|            || !tls_group_allowed(s, group_id, SSL_SECOP_CURVE_SUPPORTED)
  ------------------
  |  | 2760|  7.25k|#define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2731|  7.25k|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  |  Branch (753:16): [True: 0, False: 7.25k]
  ------------------
  754|  7.25k|            || !tls_valid_group(s, group_id, TLS1_3_VERSION, TLS1_3_VERSION,
  ------------------
  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  ------------------
                          || !tls_valid_group(s, group_id, TLS1_3_VERSION, TLS1_3_VERSION,
  ------------------
  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (754:16): [True: 0, False: 7.25k]
  ------------------
  755|  7.25k|                NULL, NULL)) {
  756|       |            /* Share not suitable or not supported, check next share */
  757|      0|            continue;
  758|      0|        }
  759|       |
  760|       |        /* Memorize this key share group ID and its encoded point */
  761|  7.25k|        (*keyshares_arr)[*keyshares_cnt] = group_id;
  762|  7.25k|        (*encoded_pubkey_arr)[(*keyshares_cnt)++] = encoded_pubkey;
  763|  7.25k|    }
  764|       |
  765|  3.62k|    return EXTRACTION_SUCCESS;
  766|       |
  767|      0|failure:
  768|       |    /* Fatal error -> free any allocated memory and return 0 */
  769|      0|    OPENSSL_free(*keyshares_arr);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  770|      0|    OPENSSL_free(*encoded_pubkey_arr);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  771|      0|    return EXTRACTION_FAILURE;
  772|  3.62k|}
extensions_srvr.c:check_overlap:
  787|  3.62k|{
  788|  3.62k|    uint16_t current_group;
  789|  3.62k|    size_t group_idx = prio_num_groups;
  790|  3.62k|    size_t new_group_idx = 0;
  791|       |
  792|  3.62k|    *candidate_group_idx = 0;
  793|  3.62k|    *prio_group_idx = 0;
  794|  3.62k|    *selected_group = 0;
  795|       |
  796|  14.5k|    for (current_group = 0; current_group < candidate_num_groups; current_group++) {
  ------------------
  |  Branch (796:29): [True: 10.8k, False: 3.62k]
  ------------------
  797|  10.8k|        if (!check_in_list(s, candidate_groups[current_group], prio_groups,
  ------------------
  |  Branch (797:13): [True: 7.25k, False: 3.62k]
  ------------------
  798|  10.8k|                prio_num_groups, 1, &new_group_idx)
  799|  3.62k|            || !tls_group_allowed(s, candidate_groups[current_group],
  ------------------
  |  Branch (799:16): [True: 0, False: 3.62k]
  ------------------
  800|  3.62k|                SSL_SECOP_CURVE_SUPPORTED)
  ------------------
  |  | 2760|  3.62k|#define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2731|  3.62k|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  801|  3.62k|            || !tls_valid_group(s, candidate_groups[current_group], TLS1_3_VERSION,
  ------------------
  |  |   27|  3.62k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (801:16): [True: 0, False: 3.62k]
  ------------------
  802|  3.62k|                TLS1_3_VERSION, NULL, NULL))
  ------------------
  |  |   27|  3.62k|#define TLS1_3_VERSION 0x0304
  ------------------
  803|       |            /* No overlap or group not suitable, check next group */
  804|  7.25k|            continue;
  805|       |
  806|       |        /*
  807|       |         * is the found new_group_idx earlier in the priority list than
  808|       |         * initial or last group_idx?
  809|       |         */
  810|  3.62k|        if (new_group_idx < group_idx) {
  ------------------
  |  Branch (810:13): [True: 3.62k, False: 0]
  ------------------
  811|  3.62k|            group_idx = new_group_idx;
  812|  3.62k|            *candidate_group_idx = current_group;
  813|  3.62k|            *prio_group_idx = (int)group_idx;
  814|  3.62k|            *selected_group = prio_groups[group_idx];
  815|  3.62k|        }
  816|  3.62k|    }
  817|  3.62k|}
extensions_srvr.c:tls_accept_ksgroup:
  628|  3.62k|{
  629|       |    /* Accept the key share group */
  630|  3.62k|    s->s3.group_id = ksgroup;
  631|  3.62k|    s->s3.group_id_candidate = ksgroup;
  632|       |    /* Cache the selected group ID in the SSL_SESSION */
  633|  3.62k|    s->session->kex_group = ksgroup;
  634|  3.62k|    if ((s->s3.peer_tmp = ssl_generate_param_group(s, ksgroup)) == NULL) {
  ------------------
  |  Branch (634:9): [True: 0, False: 3.62k]
  ------------------
  635|      0|        SSLfatal(s,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  636|      0|            SSL_AD_INTERNAL_ERROR,
  637|      0|            SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS);
  638|      0|        return 0;
  639|      0|    }
  640|  3.62k|    if (tls13_set_encoded_pub_key(s->s3.peer_tmp,
  ------------------
  |  Branch (640:9): [True: 0, False: 3.62k]
  ------------------
  641|  3.62k|            PACKET_data(encoded_pubkey),
  642|  3.62k|            PACKET_remaining(encoded_pubkey))
  643|  3.62k|        <= 0) {
  644|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_KEY_SHARE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  645|      0|        return 0;
  646|      0|    }
  647|  3.62k|    return 1;
  648|  3.62k|}

SSL_get_state:
   75|  72.8k|{
   76|  72.8k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(ssl);
  ------------------
  |  |   41|  72.8k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  72.8k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 72.8k]
  |  |  |  |  ------------------
  |  |  |  |   33|  72.8k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  72.8k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 72.8k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  72.8k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  72.8k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
   77|       |
   78|  72.8k|    if (sc == NULL)
  ------------------
  |  Branch (78:9): [True: 0, False: 72.8k]
  ------------------
   79|      0|        return TLS_ST_BEFORE;
   80|       |
   81|  72.8k|    return sc->statem.hand_state;
   82|  72.8k|}
SSL_in_init:
   85|   172k|{
   86|   172k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|   172k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|   172k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 172k]
  |  |  |  |  ------------------
  |  |  |  |   33|   172k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|   172k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 172k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|   172k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|   172k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
   87|       |
   88|   172k|    if (sc == NULL)
  ------------------
  |  Branch (88:9): [True: 0, False: 172k]
  ------------------
   89|      0|        return 0;
   90|       |
   91|   172k|    return sc->statem.in_init;
   92|   172k|}
SSL_in_before:
  105|  47.1k|{
  106|  47.1k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  47.1k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  47.1k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 47.1k]
  |  |  |  |  ------------------
  |  |  |  |   33|  47.1k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  47.1k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 47.1k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  47.1k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  47.1k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  107|       |
  108|  47.1k|    if (sc == NULL)
  ------------------
  |  Branch (108:9): [True: 0, False: 47.1k]
  ------------------
  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|  47.1k|    return (sc->statem.hand_state == TLS_ST_BEFORE)
  ------------------
  |  Branch (118:12): [True: 17.6k, False: 29.5k]
  ------------------
  119|  17.6k|        && (sc->statem.state == MSG_FLOW_UNINITED);
  ------------------
  |  Branch (119:12): [True: 14.5k, False: 3.11k]
  ------------------
  120|  47.1k|}
ossl_statem_clear:
  131|  21.7k|{
  132|  21.7k|    s->statem.state = MSG_FLOW_UNINITED;
  133|  21.7k|    s->statem.hand_state = TLS_ST_BEFORE;
  134|  21.7k|    s->statem.error_state = ERROR_STATE_NOERROR;
  135|  21.7k|    ossl_statem_set_in_init(s, 1);
  136|  21.7k|    s->statem.no_cert_verify = 0;
  137|  21.7k|}
ossl_statem_set_in_init:
  205|  54.8k|{
  206|  54.8k|    s->statem.in_init = init;
  207|  54.8k|    if (s->rlayer.rrlmethod != NULL && s->rlayer.rrlmethod->set_in_init != NULL)
  ------------------
  |  Branch (207:9): [True: 47.6k, False: 7.25k]
  |  Branch (207:40): [True: 0, False: 47.6k]
  ------------------
  208|      0|        s->rlayer.rrlmethod->set_in_init(s->rlayer.rrl, init);
  209|  54.8k|}
ossl_statem_get_in_handshake:
  212|   131k|{
  213|   131k|    return s->statem.in_handshake;
  214|   131k|}
ossl_statem_check_finish_init:
  247|  37.7k|{
  248|  37.7k|    if (sending == -1) {
  ------------------
  |  Branch (248:9): [True: 18.3k, False: 19.4k]
  ------------------
  249|  18.3k|        if (s->statem.hand_state == TLS_ST_PENDING_EARLY_DATA_END
  ------------------
  |  Branch (249:13): [True: 0, False: 18.3k]
  ------------------
  250|  18.3k|            || s->statem.hand_state == TLS_ST_EARLY_DATA) {
  ------------------
  |  Branch (250:16): [True: 4.37k, False: 14.0k]
  ------------------
  251|  4.37k|            ossl_statem_set_in_init(s, 1);
  252|  4.37k|            if (s->early_data_state == SSL_EARLY_DATA_WRITE_RETRY) {
  ------------------
  |  Branch (252:17): [True: 0, False: 4.37k]
  ------------------
  253|       |                /*
  254|       |                 * SSL_connect() or SSL_do_handshake() has been called directly.
  255|       |                 * We don't allow any more writing of early data.
  256|       |                 */
  257|      0|                s->early_data_state = SSL_EARLY_DATA_FINISHED_WRITING;
  258|      0|            }
  259|  4.37k|        }
  260|  19.4k|    } else if (!s->server) {
  ------------------
  |  Branch (260:16): [True: 10.9k, False: 8.47k]
  ------------------
  261|  10.9k|        if ((sending && (s->statem.hand_state == TLS_ST_PENDING_EARLY_DATA_END || s->statem.hand_state == TLS_ST_EARLY_DATA)
  ------------------
  |  Branch (261:14): [True: 3.60k, False: 7.33k]
  |  Branch (261:26): [True: 0, False: 3.60k]
  |  Branch (261:83): [True: 0, False: 3.60k]
  ------------------
  262|      0|                && s->early_data_state != SSL_EARLY_DATA_WRITING)
  ------------------
  |  Branch (262:20): [True: 0, False: 0]
  ------------------
  263|  10.9k|            || (!sending && s->statem.hand_state == TLS_ST_EARLY_DATA)) {
  ------------------
  |  Branch (263:17): [True: 7.33k, False: 3.60k]
  |  Branch (263:29): [True: 0, False: 7.33k]
  ------------------
  264|      0|            ossl_statem_set_in_init(s, 1);
  265|       |            /*
  266|       |             * SSL_write() has been called directly. We don't allow any more
  267|       |             * writing of early data.
  268|       |             */
  269|      0|            if (sending && s->early_data_state == SSL_EARLY_DATA_WRITE_RETRY)
  ------------------
  |  Branch (269:17): [True: 0, False: 0]
  |  Branch (269:28): [True: 0, False: 0]
  ------------------
  270|      0|                s->early_data_state = SSL_EARLY_DATA_FINISHED_WRITING;
  271|      0|        }
  272|  10.9k|    } else {
  273|  8.47k|        if (s->early_data_state == SSL_EARLY_DATA_FINISHED_READING
  ------------------
  |  Branch (273:13): [True: 0, False: 8.47k]
  ------------------
  274|      0|            && s->statem.hand_state == TLS_ST_EARLY_DATA)
  ------------------
  |  Branch (274:16): [True: 0, False: 0]
  ------------------
  275|      0|            ossl_statem_set_in_init(s, 1);
  276|  8.47k|    }
  277|  37.7k|    return 1;
  278|  37.7k|}
ossl_statem_connect:
  296|  14.4k|{
  297|  14.4k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  14.4k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  14.4k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 14.4k]
  |  |  |  |  ------------------
  |  |  |  |   33|  14.4k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  14.4k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 14.4k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  14.4k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  14.4k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  298|       |
  299|  14.4k|    if (sc == NULL)
  ------------------
  |  Branch (299:9): [True: 0, False: 14.4k]
  ------------------
  300|      0|        return -1;
  301|       |
  302|  14.4k|    return state_machine(sc, 0);
  303|  14.4k|}
ossl_statem_accept:
  306|  11.1k|{
  307|  11.1k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  11.1k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  11.1k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 11.1k]
  |  |  |  |  ------------------
  |  |  |  |   33|  11.1k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  11.1k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 11.1k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  11.1k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  11.1k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  308|       |
  309|  11.1k|    if (sc == NULL)
  ------------------
  |  Branch (309:9): [True: 0, False: 11.1k]
  ------------------
  310|      0|        return -1;
  311|       |
  312|  11.1k|    return state_machine(sc, 1);
  313|  11.1k|}
statem_flush:
  961|  18.0k|{
  962|  18.0k|    s->rwstate = SSL_WRITING;
  ------------------
  |  |  956|  18.0k|#define SSL_WRITING 2
  ------------------
  963|  18.0k|    if (BIO_flush(s->wbio) <= 0) {
  ------------------
  |  |  650|  18.0k|#define BIO_flush(b) (int)BIO_ctrl(b, BIO_CTRL_FLUSH, 0, NULL)
  |  |  ------------------
  |  |  |  |  100|  18.0k|#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
  |  |  ------------------
  ------------------
  |  Branch (963:9): [True: 0, False: 18.0k]
  ------------------
  964|      0|        return 0;
  965|      0|    }
  966|  18.0k|    s->rwstate = SSL_NOTHING;
  ------------------
  |  |  955|  18.0k|#define SSL_NOTHING 1
  ------------------
  967|       |
  968|  18.0k|    return 1;
  969|  18.0k|}
statem.c:state_machine:
  358|  25.5k|{
  359|  25.5k|    BUF_MEM *buf = NULL;
  360|  25.5k|    void (*cb)(const SSL *ssl, int type, int val) = NULL;
  361|  25.5k|    OSSL_STATEM *st = &s->statem;
  362|  25.5k|    int ret = -1;
  363|  25.5k|    int ssret;
  364|  25.5k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  25.5k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  365|  25.5k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  25.5k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  366|       |
  367|  25.5k|    if (st->state == MSG_FLOW_ERROR) {
  ------------------
  |  Branch (367:9): [True: 0, False: 25.5k]
  ------------------
  368|       |        /* Shouldn't have been called if we're already in the error state */
  369|      0|        return -1;
  370|      0|    }
  371|       |
  372|  25.5k|    ERR_clear_error();
  373|  25.5k|    clear_sys_error();
  ------------------
  |  |   31|  25.5k|#define clear_sys_error() errno = 0
  ------------------
  374|       |
  375|  25.5k|    cb = get_callback(s);
  376|       |
  377|  25.5k|    st->in_handshake++;
  378|  25.5k|    if (!SSL_in_init(ssl) || SSL_in_before(ssl)) {
  ------------------
  |  Branch (378:9): [True: 0, False: 25.5k]
  |  Branch (378:30): [True: 7.25k, False: 18.2k]
  ------------------
  379|       |        /*
  380|       |         * If we are stateless then we already called SSL_clear() - don't do
  381|       |         * it again and clear the STATELESS flag itself.
  382|       |         */
  383|  7.25k|        if ((s->s3.flags & TLS1_FLAGS_STATELESS) == 0 && !SSL_clear(ssl))
  ------------------
  |  |  304|  7.25k|#define TLS1_FLAGS_STATELESS 0x0800
  ------------------
  |  Branch (383:13): [True: 7.25k, False: 0]
  |  Branch (383:58): [True: 0, False: 7.25k]
  ------------------
  384|      0|            return -1;
  385|  7.25k|    }
  386|       |#ifndef OPENSSL_NO_SCTP
  387|       |    if (SSL_CONNECTION_IS_DTLS(s) && BIO_dgram_is_sctp(SSL_get_wbio(ssl))) {
  388|       |        /*
  389|       |         * Notify SCTP BIO socket to enter handshake mode and prevent stream
  390|       |         * identifier other than 0.
  391|       |         */
  392|       |        BIO_ctrl(SSL_get_wbio(ssl), BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE,
  393|       |            st->in_handshake, NULL);
  394|       |    }
  395|       |#endif
  396|       |
  397|       |    /* Initialise state machine */
  398|  25.5k|    if (st->state == MSG_FLOW_UNINITED
  ------------------
  |  Branch (398:9): [True: 7.25k, False: 18.2k]
  ------------------
  399|  18.2k|        || st->state == MSG_FLOW_FINISHED) {
  ------------------
  |  Branch (399:12): [True: 7.16k, False: 11.1k]
  ------------------
  400|  14.4k|        if (st->state == MSG_FLOW_UNINITED) {
  ------------------
  |  Branch (400:13): [True: 7.25k, False: 7.16k]
  ------------------
  401|  7.25k|            st->hand_state = TLS_ST_BEFORE;
  402|  7.25k|            st->request_state = TLS_ST_BEFORE;
  403|  7.25k|        }
  404|       |
  405|  14.4k|        s->server = server;
  406|  14.4k|        if (cb != NULL) {
  ------------------
  |  Branch (406:13): [True: 0, False: 14.4k]
  ------------------
  407|      0|            if (SSL_IS_FIRST_HANDSHAKE(s) || !SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  285|      0|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 0, False: 0]
  |  |  ------------------
  |  |  286|      0|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                          if (SSL_IS_FIRST_HANDSHAKE(s) || !SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      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 (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      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 (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  408|      0|                cb(ussl, SSL_CB_HANDSHAKE_START, 1);
  ------------------
  |  | 1169|      0|#define SSL_CB_HANDSHAKE_START 0x10
  ------------------
  409|      0|        }
  410|       |
  411|       |        /*
  412|       |         * Fatal errors in this block don't send an alert because we have
  413|       |         * failed to even initialise properly. Sending an alert is probably
  414|       |         * doomed to failure.
  415|       |         */
  416|       |
  417|  14.4k|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  14.4k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  14.4k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  14.4k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 14.4k]
  |  |  ------------------
  ------------------
  418|      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 (418:17): [True: 0, False: 0]
  |  Branch (418:71): [True: 0, False: 0]
  |  Branch (418:81): [True: 0, False: 0]
  ------------------
  419|      0|                SSLfatal(s, SSL_AD_NO_ALERT, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  420|      0|                goto end;
  421|      0|            }
  422|  14.4k|        } else {
  423|  14.4k|            if ((s->version >> 8) != SSL3_VERSION_MAJOR) {
  ------------------
  |  |  216|  14.4k|#define SSL3_VERSION_MAJOR 0x03
  ------------------
  |  Branch (423:17): [True: 0, False: 14.4k]
  ------------------
  424|      0|                SSLfatal(s, SSL_AD_NO_ALERT, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  425|      0|                goto end;
  426|      0|            }
  427|  14.4k|        }
  428|       |
  429|  14.4k|        if (!ssl_security(s, SSL_SECOP_VERSION, 0, s->version, NULL)) {
  ------------------
  |  | 2768|  14.4k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2729|  14.4k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (429:13): [True: 0, False: 14.4k]
  ------------------
  430|      0|            SSLfatal(s, SSL_AD_NO_ALERT, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  431|      0|            goto end;
  432|      0|        }
  433|       |
  434|  14.4k|        if (s->init_buf == NULL) {
  ------------------
  |  Branch (434:13): [True: 14.4k, False: 0]
  ------------------
  435|  14.4k|            if ((buf = BUF_MEM_new()) == NULL) {
  ------------------
  |  Branch (435:17): [True: 0, False: 14.4k]
  ------------------
  436|      0|                SSLfatal(s, SSL_AD_NO_ALERT, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  437|      0|                goto end;
  438|      0|            }
  439|  14.4k|            if (!BUF_MEM_grow(buf, SSL3_RT_MAX_PLAIN_LENGTH)) {
  ------------------
  |  |  177|  14.4k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (439:17): [True: 0, False: 14.4k]
  ------------------
  440|      0|                SSLfatal(s, SSL_AD_NO_ALERT, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  441|      0|                goto end;
  442|      0|            }
  443|  14.4k|            s->init_buf = buf;
  444|  14.4k|            buf = NULL;
  445|  14.4k|        }
  446|       |
  447|  14.4k|        s->init_num = 0;
  448|       |
  449|       |        /*
  450|       |         * Should have been reset by tls_process_finished, too.
  451|       |         */
  452|  14.4k|        s->s3.change_cipher_spec = 0;
  453|       |
  454|       |        /*
  455|       |         * Ok, we now need to push on a buffering BIO ...but not with
  456|       |         * SCTP
  457|       |         */
  458|       |#ifndef OPENSSL_NO_SCTP
  459|       |        if (!SSL_CONNECTION_IS_DTLS(s) || !BIO_dgram_is_sctp(SSL_get_wbio(ssl)))
  460|       |#endif
  461|  14.4k|            if (!ssl_init_wbio_buffer(s)) {
  ------------------
  |  Branch (461:17): [True: 0, False: 14.4k]
  ------------------
  462|      0|                SSLfatal(s, SSL_AD_NO_ALERT, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  463|      0|                goto end;
  464|      0|            }
  465|       |
  466|  14.4k|        if ((SSL_in_before(ssl))
  ------------------
  |  Branch (466:13): [True: 7.25k, False: 7.16k]
  ------------------
  467|  7.25k|            || s->renegotiate) {
  ------------------
  |  Branch (467:16): [True: 0, False: 7.16k]
  ------------------
  468|  7.25k|            if (!tls_setup_handshake(s)) {
  ------------------
  |  Branch (468:17): [True: 0, False: 7.25k]
  ------------------
  469|       |                /* SSLfatal() already called */
  470|      0|                goto end;
  471|      0|            }
  472|       |
  473|  7.25k|            if (SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  285|  7.25k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 7.25k, False: 0]
  |  |  ------------------
  |  |  286|  7.25k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  474|  7.25k|                st->read_state_first_init = 1;
  475|  7.25k|        }
  476|       |
  477|  14.4k|        st->state = MSG_FLOW_WRITING;
  478|  14.4k|        init_write_state_machine(s);
  479|  14.4k|    }
  480|       |
  481|  75.9k|    while (st->state != MSG_FLOW_FINISHED) {
  ------------------
  |  Branch (481:12): [True: 61.6k, False: 14.3k]
  ------------------
  482|  61.6k|        if (st->state == MSG_FLOW_READING) {
  ------------------
  |  Branch (482:13): [True: 29.1k, False: 32.4k]
  ------------------
  483|  29.1k|            ssret = read_state_machine(s);
  484|  29.1k|            if (ssret == SUB_STATE_FINISHED) {
  ------------------
  |  Branch (484:17): [True: 18.0k, False: 11.1k]
  ------------------
  485|  18.0k|                st->state = MSG_FLOW_WRITING;
  486|  18.0k|                init_write_state_machine(s);
  487|  18.0k|            } else {
  488|       |                /* NBIO or error */
  489|  11.1k|                goto end;
  490|  11.1k|            }
  491|  32.4k|        } else if (st->state == MSG_FLOW_WRITING) {
  ------------------
  |  Branch (491:20): [True: 32.4k, False: 0]
  ------------------
  492|  32.4k|            ssret = write_state_machine(s);
  493|  32.4k|            if (ssret == SUB_STATE_FINISHED) {
  ------------------
  |  Branch (493:17): [True: 18.0k, False: 14.3k]
  ------------------
  494|  18.0k|                st->state = MSG_FLOW_READING;
  495|  18.0k|                init_read_state_machine(s);
  496|  18.0k|            } else if (ssret == SUB_STATE_END_HANDSHAKE) {
  ------------------
  |  Branch (496:24): [True: 14.3k, False: 0]
  ------------------
  497|  14.3k|                st->state = MSG_FLOW_FINISHED;
  498|  14.3k|            } else {
  499|       |                /* NBIO or error */
  500|      0|                goto end;
  501|      0|            }
  502|  32.4k|        } else {
  503|       |            /* Error */
  504|      0|            check_fatal(s);
  ------------------
  |  |  183|      0|    do {                                                             \
  |  |  184|      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 (184:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  185|      0|                && (s)->statem.state == MSG_FLOW_ERROR))             \
  |  |  186|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_MISSING_FATAL); \
  |  |  ------------------
  |  |  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  187|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (187:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  505|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  506|      0|            goto end;
  507|      0|        }
  508|  61.6k|    }
  509|       |
  510|  14.3k|    ret = 1;
  511|       |
  512|  25.5k|end:
  513|  25.5k|    st->in_handshake--;
  514|       |
  515|       |#ifndef OPENSSL_NO_SCTP
  516|       |    if (SSL_CONNECTION_IS_DTLS(s) && BIO_dgram_is_sctp(SSL_get_wbio(ssl))) {
  517|       |        /*
  518|       |         * Notify SCTP BIO socket to leave handshake mode and allow stream
  519|       |         * identifier other than 0.
  520|       |         */
  521|       |        BIO_ctrl(SSL_get_wbio(ssl), BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE,
  522|       |            st->in_handshake, NULL);
  523|       |    }
  524|       |#endif
  525|       |
  526|  25.5k|    BUF_MEM_free(buf);
  527|  25.5k|    if (cb != NULL) {
  ------------------
  |  Branch (527:9): [True: 0, False: 25.5k]
  ------------------
  528|      0|        if (server)
  ------------------
  |  Branch (528:13): [True: 0, False: 0]
  ------------------
  529|      0|            cb(ussl, SSL_CB_ACCEPT_EXIT, ret);
  ------------------
  |  | 1166|      0|#define SSL_CB_ACCEPT_EXIT (SSL_ST_ACCEPT | SSL_CB_EXIT)
  |  |  ------------------
  |  |  |  | 1154|      0|#define SSL_ST_ACCEPT 0x2000
  |  |  ------------------
  |  |               #define SSL_CB_ACCEPT_EXIT (SSL_ST_ACCEPT | SSL_CB_EXIT)
  |  |  ------------------
  |  |  |  | 1159|      0|#define SSL_CB_EXIT 0x02
  |  |  ------------------
  ------------------
  530|      0|        else
  531|      0|            cb(ussl, SSL_CB_CONNECT_EXIT, ret);
  ------------------
  |  | 1168|      0|#define SSL_CB_CONNECT_EXIT (SSL_ST_CONNECT | SSL_CB_EXIT)
  |  |  ------------------
  |  |  |  | 1153|      0|#define SSL_ST_CONNECT 0x1000
  |  |  ------------------
  |  |               #define SSL_CB_CONNECT_EXIT (SSL_ST_CONNECT | SSL_CB_EXIT)
  |  |  ------------------
  |  |  |  | 1159|      0|#define SSL_CB_EXIT 0x02
  |  |  ------------------
  ------------------
  532|      0|    }
  533|  25.5k|    return ret;
  534|  14.3k|}
statem.c:get_callback:
  318|  87.1k|{
  319|  87.1k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  87.1k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  320|       |
  321|  87.1k|    if (s->info_callback != NULL)
  ------------------
  |  Branch (321:9): [True: 0, False: 87.1k]
  ------------------
  322|      0|        return s->info_callback;
  323|  87.1k|    else if (sctx->info_callback != NULL)
  ------------------
  |  Branch (323:14): [True: 0, False: 87.1k]
  ------------------
  324|      0|        return sctx->info_callback;
  325|       |
  326|  87.1k|    return NULL;
  327|  87.1k|}
statem.c:init_write_state_machine:
  759|  32.4k|{
  760|  32.4k|    OSSL_STATEM *st = &s->statem;
  761|       |
  762|  32.4k|    st->write_state = WRITE_STATE_TRANSITION;
  763|  32.4k|}
statem.c:read_state_machine:
  573|  29.1k|{
  574|  29.1k|    OSSL_STATEM *st = &s->statem;
  575|  29.1k|    int ret, mt;
  576|  29.1k|    size_t len = 0, headerlen;
  577|  29.1k|    int (*transition)(SSL_CONNECTION *s, int mt);
  578|  29.1k|    PACKET pkt;
  579|  29.1k|    MSG_PROCESS_RETURN (*process_message)(SSL_CONNECTION *s, PACKET *pkt);
  580|  29.1k|    WORK_STATE (*post_process_message)(SSL_CONNECTION *s, WORK_STATE wst);
  581|  29.1k|    size_t (*max_message_size)(SSL_CONNECTION *s);
  582|  29.1k|    void (*cb)(const SSL *ssl, int type, int val) = NULL;
  583|  29.1k|    SSL *ssl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  29.1k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  584|       |
  585|  29.1k|    cb = get_callback(s);
  586|       |
  587|  29.1k|    if (s->server) {
  ------------------
  |  Branch (587:9): [True: 14.7k, False: 14.4k]
  ------------------
  588|  14.7k|        transition = ossl_statem_server_read_transition;
  589|  14.7k|        process_message = ossl_statem_server_process_message;
  590|  14.7k|        max_message_size = ossl_statem_server_max_message_size;
  591|  14.7k|        post_process_message = ossl_statem_server_post_process_message;
  592|  14.7k|    } else {
  593|  14.4k|        transition = ossl_statem_client_read_transition;
  594|  14.4k|        process_message = ossl_statem_client_process_message;
  595|  14.4k|        max_message_size = ossl_statem_client_max_message_size;
  596|  14.4k|        post_process_message = ossl_statem_client_post_process_message;
  597|  14.4k|    }
  598|       |
  599|  29.1k|    if (st->read_state_first_init) {
  ------------------
  |  Branch (599:9): [True: 7.25k, False: 21.9k]
  ------------------
  600|  7.25k|        s->first_packet = 1;
  601|  7.25k|        st->read_state_first_init = 0;
  602|  7.25k|    }
  603|       |
  604|  50.9k|    while (1) {
  ------------------
  |  Branch (604:12): [True: 50.9k, Folded]
  ------------------
  605|  50.9k|        switch (st->read_state) {
  606|  43.6k|        case READ_STATE_HEADER:
  ------------------
  |  Branch (606:9): [True: 43.6k, False: 7.25k]
  ------------------
  607|       |            /* Get the state the peer wants to move to */
  608|  43.6k|            if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  43.6k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  43.6k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  43.6k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 43.6k]
  |  |  ------------------
  ------------------
  609|       |                /*
  610|       |                 * In DTLS we get the whole message in one go - header and body
  611|       |                 */
  612|      0|                ret = dtls_get_message(s, &mt);
  613|  43.6k|            } else {
  614|  43.6k|                ret = tls_get_message_header(s, &mt);
  615|  43.6k|            }
  616|       |
  617|  43.6k|            if (ret == 0) {
  ------------------
  |  Branch (617:17): [True: 11.1k, False: 32.5k]
  ------------------
  618|       |                /* Could be non-blocking IO */
  619|  11.1k|                return SUB_STATE_ERROR;
  620|  11.1k|            }
  621|       |
  622|  32.5k|            if (cb != NULL) {
  ------------------
  |  Branch (622:17): [True: 0, False: 32.5k]
  ------------------
  623|       |                /* Notify callback of an impending state change */
  624|      0|                if (s->server)
  ------------------
  |  Branch (624:21): [True: 0, False: 0]
  ------------------
  625|      0|                    cb(ssl, SSL_CB_ACCEPT_LOOP, 1);
  ------------------
  |  | 1165|      0|#define SSL_CB_ACCEPT_LOOP (SSL_ST_ACCEPT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1154|      0|#define SSL_ST_ACCEPT 0x2000
  |  |  ------------------
  |  |               #define SSL_CB_ACCEPT_LOOP (SSL_ST_ACCEPT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1158|      0|#define SSL_CB_LOOP 0x01
  |  |  ------------------
  ------------------
  626|      0|                else
  627|      0|                    cb(ssl, SSL_CB_CONNECT_LOOP, 1);
  ------------------
  |  | 1167|      0|#define SSL_CB_CONNECT_LOOP (SSL_ST_CONNECT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1153|      0|#define SSL_ST_CONNECT 0x1000
  |  |  ------------------
  |  |               #define SSL_CB_CONNECT_LOOP (SSL_ST_CONNECT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1158|      0|#define SSL_CB_LOOP 0x01
  |  |  ------------------
  ------------------
  628|      0|            }
  629|       |            /*
  630|       |             * Validate that we are allowed to move to the new state and move
  631|       |             * to that state if so
  632|       |             */
  633|  32.5k|            if (!transition(s, mt))
  ------------------
  |  Branch (633:17): [True: 0, False: 32.5k]
  ------------------
  634|      0|                return SUB_STATE_ERROR;
  635|       |
  636|  32.5k|            if (s->s3.tmp.message_size > max_message_size(s)) {
  ------------------
  |  Branch (636:17): [True: 0, False: 32.5k]
  ------------------
  637|      0|                SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  638|      0|                    SSL_R_EXCESSIVE_MESSAGE_SIZE);
  639|      0|                return SUB_STATE_ERROR;
  640|      0|            }
  641|       |
  642|  32.5k|            st->read_state = READ_STATE_BODY;
  643|       |            /* Fall through */
  644|       |
  645|  32.5k|        case READ_STATE_BODY:
  ------------------
  |  Branch (645:9): [True: 0, False: 50.9k]
  ------------------
  646|  32.5k|            if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  32.5k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  32.5k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  32.5k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 32.5k]
  |  |  ------------------
  ------------------
  647|       |                /*
  648|       |                 * Actually we already have the body, but we give DTLS the
  649|       |                 * opportunity to do any further processing.
  650|       |                 */
  651|      0|                ret = dtls_get_message_body(s, &len);
  652|  32.5k|            } else {
  653|  32.5k|                ret = tls_get_message_body(s, &len);
  654|  32.5k|            }
  655|  32.5k|            if (ret == 0) {
  ------------------
  |  Branch (655:17): [True: 0, False: 32.5k]
  ------------------
  656|       |                /* Could be non-blocking IO */
  657|      0|                return SUB_STATE_ERROR;
  658|      0|            }
  659|       |
  660|  32.5k|            s->first_packet = 0;
  661|       |            /*
  662|       |             * We initialise the buffer including the message header, and
  663|       |             * then skip over header ready to process the message. This
  664|       |             * ensures that calls to PACKET_msg_start() gives us the whole
  665|       |             * message
  666|       |             */
  667|  32.5k|            headerlen = (char *)s->init_msg - s->init_buf->data;
  668|  32.5k|            if (!PACKET_buf_init(&pkt, (unsigned char *)s->init_buf->data,
  ------------------
  |  Branch (668:17): [True: 0, False: 32.5k]
  ------------------
  669|  32.5k|                    len + headerlen)) {
  670|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  671|      0|                return SUB_STATE_ERROR;
  672|      0|            }
  673|  32.5k|            if (!PACKET_forward(&pkt, headerlen)) {
  ------------------
  |  Branch (673:17): [True: 0, False: 32.5k]
  ------------------
  674|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  675|      0|                return SUB_STATE_ERROR;
  676|      0|            }
  677|       |
  678|  32.5k|            ret = process_message(s, &pkt);
  679|       |
  680|       |            /* Discard the packet data */
  681|  32.5k|            s->init_num = 0;
  682|       |
  683|  32.5k|            switch (ret) {
  684|      0|            case MSG_PROCESS_ERROR:
  ------------------
  |  Branch (684:13): [True: 0, False: 32.5k]
  ------------------
  685|      0|                check_fatal(s);
  ------------------
  |  |  183|      0|    do {                                                             \
  |  |  184|      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 (184:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  185|      0|                && (s)->statem.state == MSG_FLOW_ERROR))             \
  |  |  186|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_MISSING_FATAL); \
  |  |  ------------------
  |  |  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  187|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (187:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  686|      0|                return SUB_STATE_ERROR;
  687|       |
  688|  14.3k|            case MSG_PROCESS_FINISHED_READING:
  ------------------
  |  Branch (688:13): [True: 14.3k, False: 18.1k]
  ------------------
  689|  14.3k|                if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  14.3k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  14.3k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  14.3k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 14.3k]
  |  |  ------------------
  ------------------
  690|      0|                    dtls1_stop_timer(s);
  691|      0|                }
  692|  14.3k|                return SUB_STATE_FINISHED;
  693|       |
  694|  7.25k|            case MSG_PROCESS_CONTINUE_PROCESSING:
  ------------------
  |  Branch (694:13): [True: 7.25k, False: 25.2k]
  ------------------
  695|  7.25k|                st->read_state = READ_STATE_POST_PROCESS;
  696|  7.25k|                st->read_state_work = WORK_MORE_A;
  697|  7.25k|                break;
  698|       |
  699|  10.8k|            default:
  ------------------
  |  Branch (699:13): [True: 10.8k, False: 21.6k]
  ------------------
  700|  10.8k|                st->read_state = READ_STATE_HEADER;
  701|  10.8k|                break;
  702|  32.5k|            }
  703|  18.1k|            break;
  704|       |
  705|  18.1k|        case READ_STATE_POST_PROCESS:
  ------------------
  |  Branch (705:9): [True: 7.25k, False: 43.6k]
  ------------------
  706|  7.25k|            st->read_state_work = post_process_message(s, st->read_state_work);
  707|  7.25k|            switch (st->read_state_work) {
  ------------------
  |  Branch (707:21): [True: 7.25k, False: 0]
  ------------------
  708|      0|            case WORK_ERROR:
  ------------------
  |  Branch (708:13): [True: 0, False: 7.25k]
  ------------------
  709|      0|                check_fatal(s);
  ------------------
  |  |  183|      0|    do {                                                             \
  |  |  184|      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 (184:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  185|      0|                && (s)->statem.state == MSG_FLOW_ERROR))             \
  |  |  186|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_MISSING_FATAL); \
  |  |  ------------------
  |  |  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  187|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (187:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  710|       |                /* Fall through */
  711|      0|            case WORK_MORE_A:
  ------------------
  |  Branch (711:13): [True: 0, False: 7.25k]
  ------------------
  712|      0|            case WORK_MORE_B:
  ------------------
  |  Branch (712:13): [True: 0, False: 7.25k]
  ------------------
  713|      0|            case WORK_MORE_C:
  ------------------
  |  Branch (713:13): [True: 0, False: 7.25k]
  ------------------
  714|      0|                return SUB_STATE_ERROR;
  715|       |
  716|  3.62k|            case WORK_FINISHED_CONTINUE:
  ------------------
  |  Branch (716:13): [True: 3.62k, False: 3.62k]
  ------------------
  717|  3.62k|                st->read_state = READ_STATE_HEADER;
  718|  3.62k|                break;
  719|       |
  720|      0|            case WORK_FINISHED_SWAP:
  ------------------
  |  Branch (720:13): [True: 0, False: 7.25k]
  ------------------
  721|  3.62k|            case WORK_FINISHED_STOP:
  ------------------
  |  Branch (721:13): [True: 3.62k, False: 3.62k]
  ------------------
  722|  3.62k|                if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  723|      0|                    dtls1_stop_timer(s);
  724|      0|                }
  725|  3.62k|                return SUB_STATE_FINISHED;
  726|  7.25k|            }
  727|  3.62k|            break;
  728|       |
  729|  3.62k|        default:
  ------------------
  |  Branch (729:9): [True: 0, False: 50.9k]
  ------------------
  730|       |            /* Shouldn't happen */
  731|       |            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  732|      0|            return SUB_STATE_ERROR;
  733|  50.9k|        }
  734|  50.9k|    }
  735|  29.1k|}
statem.c:write_state_machine:
  797|  32.4k|{
  798|  32.4k|    OSSL_STATEM *st = &s->statem;
  799|  32.4k|    int ret;
  800|  32.4k|    WRITE_TRAN (*transition)(SSL_CONNECTION *s);
  801|  32.4k|    WORK_STATE (*pre_work)(SSL_CONNECTION *s, WORK_STATE wst);
  802|  32.4k|    WORK_STATE (*post_work)(SSL_CONNECTION *s, WORK_STATE wst);
  803|  32.4k|    int (*get_construct_message_f)(SSL_CONNECTION *s,
  804|  32.4k|        CON_FUNC_RETURN (**confunc)(SSL_CONNECTION *s,
  805|  32.4k|            WPACKET *pkt),
  806|  32.4k|        int *mt);
  807|  32.4k|    void (*cb)(const SSL *ssl, int type, int val) = NULL;
  808|  32.4k|    CON_FUNC_RETURN (*confunc)(SSL_CONNECTION *s, WPACKET *pkt);
  809|  32.4k|    int mt;
  810|  32.4k|    WPACKET pkt;
  811|  32.4k|    SSL *ssl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  32.4k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  812|       |
  813|  32.4k|    cb = get_callback(s);
  814|       |
  815|  32.4k|    if (s->server) {
  ------------------
  |  Branch (815:9): [True: 10.8k, False: 21.5k]
  ------------------
  816|  10.8k|        transition = ossl_statem_server_write_transition;
  817|  10.8k|        pre_work = ossl_statem_server_pre_work;
  818|  10.8k|        post_work = ossl_statem_server_post_work;
  819|  10.8k|        get_construct_message_f = ossl_statem_server_construct_message;
  820|  21.5k|    } else {
  821|  21.5k|        transition = ossl_statem_client_write_transition;
  822|  21.5k|        pre_work = ossl_statem_client_pre_work;
  823|  21.5k|        post_work = ossl_statem_client_post_work;
  824|  21.5k|        get_construct_message_f = ossl_statem_client_construct_message;
  825|  21.5k|    }
  826|       |
  827|   137k|    while (1) {
  ------------------
  |  Branch (827:12): [True: 137k, Folded]
  ------------------
  828|   137k|        switch (st->write_state) {
  829|  75.8k|        case WRITE_STATE_TRANSITION:
  ------------------
  |  Branch (829:9): [True: 75.8k, False: 61.4k]
  ------------------
  830|  75.8k|            if (cb != NULL) {
  ------------------
  |  Branch (830:17): [True: 0, False: 75.8k]
  ------------------
  831|       |                /* Notify callback of an impending state change */
  832|      0|                if (s->server)
  ------------------
  |  Branch (832:21): [True: 0, False: 0]
  ------------------
  833|      0|                    cb(ssl, SSL_CB_ACCEPT_LOOP, 1);
  ------------------
  |  | 1165|      0|#define SSL_CB_ACCEPT_LOOP (SSL_ST_ACCEPT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1154|      0|#define SSL_ST_ACCEPT 0x2000
  |  |  ------------------
  |  |               #define SSL_CB_ACCEPT_LOOP (SSL_ST_ACCEPT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1158|      0|#define SSL_CB_LOOP 0x01
  |  |  ------------------
  ------------------
  834|      0|                else
  835|      0|                    cb(ssl, SSL_CB_CONNECT_LOOP, 1);
  ------------------
  |  | 1167|      0|#define SSL_CB_CONNECT_LOOP (SSL_ST_CONNECT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1153|      0|#define SSL_ST_CONNECT 0x1000
  |  |  ------------------
  |  |               #define SSL_CB_CONNECT_LOOP (SSL_ST_CONNECT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1158|      0|#define SSL_CB_LOOP 0x01
  |  |  ------------------
  ------------------
  836|      0|            }
  837|  75.8k|            switch (transition(s)) {
  ------------------
  |  Branch (837:21): [True: 75.8k, False: 0]
  ------------------
  838|  57.8k|            case WRITE_TRAN_CONTINUE:
  ------------------
  |  Branch (838:13): [True: 57.8k, False: 18.0k]
  ------------------
  839|  57.8k|                st->write_state = WRITE_STATE_PRE_WORK;
  840|  57.8k|                st->write_state_work = WORK_MORE_A;
  841|  57.8k|                break;
  842|       |
  843|  18.0k|            case WRITE_TRAN_FINISHED:
  ------------------
  |  Branch (843:13): [True: 18.0k, False: 57.8k]
  ------------------
  844|  18.0k|                return SUB_STATE_FINISHED;
  845|       |
  846|      0|            case WRITE_TRAN_ERROR:
  ------------------
  |  Branch (846:13): [True: 0, False: 75.8k]
  ------------------
  847|      0|                check_fatal(s);
  ------------------
  |  |  183|      0|    do {                                                             \
  |  |  184|      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 (184:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  185|      0|                && (s)->statem.state == MSG_FLOW_ERROR))             \
  |  |  186|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_MISSING_FATAL); \
  |  |  ------------------
  |  |  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  187|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (187:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  848|      0|                return SUB_STATE_ERROR;
  849|  75.8k|            }
  850|  57.8k|            break;
  851|       |
  852|  57.8k|        case WRITE_STATE_PRE_WORK:
  ------------------
  |  Branch (852:9): [True: 57.8k, False: 79.5k]
  ------------------
  853|  57.8k|            switch (st->write_state_work = pre_work(s, st->write_state_work)) {
  ------------------
  |  Branch (853:21): [True: 57.8k, False: 0]
  ------------------
  854|      0|            case WORK_ERROR:
  ------------------
  |  Branch (854:13): [True: 0, False: 57.8k]
  ------------------
  855|      0|                check_fatal(s);
  ------------------
  |  |  183|      0|    do {                                                             \
  |  |  184|      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 (184:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  185|      0|                && (s)->statem.state == MSG_FLOW_ERROR))             \
  |  |  186|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_MISSING_FATAL); \
  |  |  ------------------
  |  |  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  187|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (187:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  856|       |                /* Fall through */
  857|      0|            case WORK_MORE_A:
  ------------------
  |  Branch (857:13): [True: 0, False: 57.8k]
  ------------------
  858|      0|            case WORK_MORE_B:
  ------------------
  |  Branch (858:13): [True: 0, False: 57.8k]
  ------------------
  859|      0|            case WORK_MORE_C:
  ------------------
  |  Branch (859:13): [True: 0, False: 57.8k]
  ------------------
  860|      0|                return SUB_STATE_ERROR;
  861|       |
  862|  43.4k|            case WORK_FINISHED_CONTINUE:
  ------------------
  |  Branch (862:13): [True: 43.4k, False: 14.3k]
  ------------------
  863|  43.4k|                st->write_state = WRITE_STATE_SEND;
  864|  43.4k|                break;
  865|       |
  866|      0|            case WORK_FINISHED_SWAP:
  ------------------
  |  Branch (866:13): [True: 0, False: 57.8k]
  ------------------
  867|      0|                return SUB_STATE_FINISHED;
  868|       |
  869|  14.3k|            case WORK_FINISHED_STOP:
  ------------------
  |  Branch (869:13): [True: 14.3k, False: 43.4k]
  ------------------
  870|  14.3k|                return SUB_STATE_END_HANDSHAKE;
  871|  57.8k|            }
  872|  43.4k|            if (!get_construct_message_f(s, &confunc, &mt)) {
  ------------------
  |  Branch (872:17): [True: 0, False: 43.4k]
  ------------------
  873|       |                /* SSLfatal() already called */
  874|      0|                return SUB_STATE_ERROR;
  875|      0|            }
  876|  43.4k|            if (mt == SSL3_MT_DUMMY) {
  ------------------
  |  |   41|  43.4k|#define SSL3_MT_DUMMY -1
  ------------------
  |  Branch (876:17): [True: 3.62k, False: 39.8k]
  ------------------
  877|       |                /* Skip construction and sending. This isn't a "real" state */
  878|  3.62k|                st->write_state = WRITE_STATE_POST_WORK;
  879|  3.62k|                st->write_state_work = WORK_MORE_A;
  880|  3.62k|                break;
  881|  3.62k|            }
  882|  39.8k|            if (!WPACKET_init(&pkt, s->init_buf)
  ------------------
  |  Branch (882:17): [True: 0, False: 39.8k]
  ------------------
  883|  39.8k|                || !ssl_set_handshake_header(s, &pkt, mt)) {
  ------------------
  |  | 2184|  39.8k|    SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->set_handshake_header((s), (pkt), (htype))
  |  |  ------------------
  |  |  |  |   27|  39.8k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  ------------------
  |  Branch (883:20): [True: 0, False: 39.8k]
  ------------------
  884|      0|                WPACKET_cleanup(&pkt);
  885|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  886|      0|                return SUB_STATE_ERROR;
  887|      0|            }
  888|  39.8k|            if (confunc != NULL) {
  ------------------
  |  Branch (888:17): [True: 39.8k, False: 0]
  ------------------
  889|  39.8k|                CON_FUNC_RETURN tmpret;
  890|       |
  891|  39.8k|                tmpret = confunc(s, &pkt);
  892|  39.8k|                if (tmpret == CON_FUNC_ERROR) {
  ------------------
  |  Branch (892:21): [True: 0, False: 39.8k]
  ------------------
  893|      0|                    WPACKET_cleanup(&pkt);
  894|      0|                    check_fatal(s);
  ------------------
  |  |  183|      0|    do {                                                             \
  |  |  184|      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 (184:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  185|      0|                && (s)->statem.state == MSG_FLOW_ERROR))             \
  |  |  186|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_MISSING_FATAL); \
  |  |  ------------------
  |  |  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  187|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (187:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  895|      0|                    return SUB_STATE_ERROR;
  896|  39.8k|                } else if (tmpret == CON_FUNC_DONT_SEND) {
  ------------------
  |  Branch (896:28): [True: 0, False: 39.8k]
  ------------------
  897|       |                    /*
  898|       |                     * The construction function decided not to construct the
  899|       |                     * message after all and continue. Skip sending.
  900|       |                     */
  901|      0|                    WPACKET_cleanup(&pkt);
  902|      0|                    st->write_state = WRITE_STATE_POST_WORK;
  903|      0|                    st->write_state_work = WORK_MORE_A;
  904|      0|                    break;
  905|      0|                } /* else success */
  906|  39.8k|            }
  907|  39.8k|            if (!ssl_close_construct_packet(s, &pkt, mt)
  ------------------
  |  | 2186|  39.8k|    SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->close_construct_packet((s), (pkt), (htype))
  |  |  ------------------
  |  |  |  |   27|  39.8k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  ------------------
  |  Branch (907:17): [True: 0, False: 39.8k]
  ------------------
  908|  39.8k|                || !WPACKET_finish(&pkt)) {
  ------------------
  |  Branch (908:20): [True: 0, False: 39.8k]
  ------------------
  909|      0|                WPACKET_cleanup(&pkt);
  910|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  911|      0|                return SUB_STATE_ERROR;
  912|      0|            }
  913|       |
  914|       |            /* Fall through */
  915|       |
  916|  39.8k|        case WRITE_STATE_SEND:
  ------------------
  |  Branch (916:9): [True: 0, False: 137k]
  ------------------
  917|  39.8k|            if (SSL_CONNECTION_IS_DTLS(s) && st->use_timer) {
  ------------------
  |  |  266|  79.6k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  39.8k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  39.8k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 39.8k]
  |  |  ------------------
  ------------------
  |  Branch (917:46): [True: 0, False: 0]
  ------------------
  918|      0|                dtls1_start_timer(s);
  919|      0|            }
  920|  39.8k|            ret = statem_do_write(s);
  921|  39.8k|            if (ret <= 0) {
  ------------------
  |  Branch (921:17): [True: 0, False: 39.8k]
  ------------------
  922|      0|                return SUB_STATE_ERROR;
  923|      0|            }
  924|  39.8k|            st->write_state = WRITE_STATE_POST_WORK;
  925|  39.8k|            st->write_state_work = WORK_MORE_A;
  926|       |            /* Fall through */
  927|       |
  928|  43.4k|        case WRITE_STATE_POST_WORK:
  ------------------
  |  Branch (928:9): [True: 3.62k, False: 133k]
  ------------------
  929|  43.4k|            switch (st->write_state_work = post_work(s, st->write_state_work)) {
  ------------------
  |  Branch (929:21): [True: 43.4k, False: 0]
  ------------------
  930|      0|            case WORK_ERROR:
  ------------------
  |  Branch (930:13): [True: 0, False: 43.4k]
  ------------------
  931|      0|                check_fatal(s);
  ------------------
  |  |  183|      0|    do {                                                             \
  |  |  184|      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 (184:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  185|      0|                && (s)->statem.state == MSG_FLOW_ERROR))             \
  |  |  186|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_MISSING_FATAL); \
  |  |  ------------------
  |  |  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  187|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (187:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  932|       |                /* Fall through */
  933|      0|            case WORK_MORE_A:
  ------------------
  |  Branch (933:13): [True: 0, False: 43.4k]
  ------------------
  934|      0|            case WORK_MORE_B:
  ------------------
  |  Branch (934:13): [True: 0, False: 43.4k]
  ------------------
  935|      0|            case WORK_MORE_C:
  ------------------
  |  Branch (935:13): [True: 0, False: 43.4k]
  ------------------
  936|      0|                return SUB_STATE_ERROR;
  937|       |
  938|  43.4k|            case WORK_FINISHED_CONTINUE:
  ------------------
  |  Branch (938:13): [True: 43.4k, False: 0]
  ------------------
  939|  43.4k|                st->write_state = WRITE_STATE_TRANSITION;
  940|  43.4k|                break;
  941|       |
  942|      0|            case WORK_FINISHED_SWAP:
  ------------------
  |  Branch (942:13): [True: 0, False: 43.4k]
  ------------------
  943|      0|                return SUB_STATE_FINISHED;
  944|       |
  945|      0|            case WORK_FINISHED_STOP:
  ------------------
  |  Branch (945:13): [True: 0, False: 43.4k]
  ------------------
  946|      0|                return SUB_STATE_END_HANDSHAKE;
  947|  43.4k|            }
  948|  43.4k|            break;
  949|       |
  950|  43.4k|        default:
  ------------------
  |  Branch (950:9): [True: 0, False: 137k]
  ------------------
  951|       |            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  952|      0|            return SUB_STATE_ERROR;
  953|   137k|        }
  954|   137k|    }
  955|  32.4k|}
statem.c:statem_do_write:
  741|  39.8k|{
  742|  39.8k|    OSSL_STATEM *st = &s->statem;
  743|       |
  744|  39.8k|    if (st->hand_state == TLS_ST_CW_CHANGE
  ------------------
  |  Branch (744:9): [True: 3.62k, False: 36.2k]
  ------------------
  745|  36.2k|        || st->hand_state == TLS_ST_SW_CHANGE) {
  ------------------
  |  Branch (745:12): [True: 3.62k, False: 32.5k]
  ------------------
  746|  7.25k|        if (SSL_CONNECTION_IS_DTLS(s))
  ------------------
  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  7.25k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 7.25k]
  |  |  ------------------
  ------------------
  747|      0|            return dtls1_do_write(s, SSL3_RT_CHANGE_CIPHER_SPEC);
  ------------------
  |  |  219|      0|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  748|  7.25k|        else
  749|  7.25k|            return ssl3_do_write(s, SSL3_RT_CHANGE_CIPHER_SPEC);
  ------------------
  |  |  219|  7.25k|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  750|  32.5k|    } else {
  751|  32.5k|        return ssl_do_write(s);
  ------------------
  |  | 2187|  32.5k|#define ssl_do_write(s) SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->do_write(s)
  |  |  ------------------
  |  |  |  |   27|  32.5k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  ------------------
  752|  32.5k|    }
  753|  39.8k|}
statem.c:init_read_state_machine:
  540|  18.0k|{
  541|  18.0k|    OSSL_STATEM *st = &s->statem;
  542|       |
  543|  18.0k|    st->read_state = READ_STATE_HEADER;
  544|  18.0k|}

ossl_statem_client_read_transition:
  228|  25.3k|{
  229|  25.3k|    OSSL_STATEM *st = &s->statem;
  230|  25.3k|    int ske_expected;
  231|       |
  232|       |    /*
  233|       |     * Note that after writing the first ClientHello we don't know what version
  234|       |     * we are going to negotiate yet, so we don't take this branch until later.
  235|       |     */
  236|  25.3k|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  25.3k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  50.6k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  25.3k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  25.3k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 25.3k, False: 0]
  |  |  ------------------
  |  |  274|  25.3k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  25.3k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  50.6k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 25.3k, False: 0]
  |  |  ------------------
  |  |  275|  25.3k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  25.3k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  25.3k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 21.6k, False: 3.62k]
  |  |  ------------------
  ------------------
  237|  21.6k|        if (!ossl_statem_client13_read_transition(s, mt))
  ------------------
  |  Branch (237:13): [True: 0, False: 21.6k]
  ------------------
  238|      0|            goto err;
  239|  21.6k|        return 1;
  240|  21.6k|    }
  241|       |
  242|  3.62k|    switch (st->hand_state) {
  243|      0|    default:
  ------------------
  |  Branch (243:5): [True: 0, False: 3.62k]
  ------------------
  244|      0|        break;
  245|       |
  246|  3.62k|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (246:5): [True: 3.62k, False: 0]
  ------------------
  247|  3.62k|        if (mt == SSL3_MT_SERVER_HELLO) {
  ------------------
  |  |  314|  3.62k|#define SSL3_MT_SERVER_HELLO 2
  ------------------
  |  Branch (247:13): [True: 3.62k, False: 0]
  ------------------
  248|  3.62k|            st->hand_state = TLS_ST_CR_SRVR_HELLO;
  249|  3.62k|            return 1;
  250|  3.62k|        }
  251|       |
  252|      0|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|      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)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  253|      0|            if (mt == DTLS1_MT_HELLO_VERIFY_REQUEST) {
  ------------------
  |  |  334|      0|#define DTLS1_MT_HELLO_VERIFY_REQUEST 3
  ------------------
  |  Branch (253:17): [True: 0, False: 0]
  ------------------
  254|      0|                st->hand_state = DTLS_ST_CR_HELLO_VERIFY_REQUEST;
  255|      0|                return 1;
  256|      0|            }
  257|      0|        }
  258|      0|        break;
  259|       |
  260|      0|    case TLS_ST_EARLY_DATA:
  ------------------
  |  Branch (260:5): [True: 0, False: 3.62k]
  ------------------
  261|       |        /*
  262|       |         * We've not actually selected TLSv1.3 yet, but we have sent early
  263|       |         * data. The only thing allowed now is a ServerHello or a
  264|       |         * HelloRetryRequest.
  265|       |         */
  266|      0|        if (mt == SSL3_MT_SERVER_HELLO) {
  ------------------
  |  |  314|      0|#define SSL3_MT_SERVER_HELLO 2
  ------------------
  |  Branch (266:13): [True: 0, False: 0]
  ------------------
  267|      0|            st->hand_state = TLS_ST_CR_SRVR_HELLO;
  268|      0|            return 1;
  269|      0|        }
  270|      0|        break;
  271|       |
  272|      0|    case TLS_ST_CR_SRVR_HELLO:
  ------------------
  |  Branch (272:5): [True: 0, False: 3.62k]
  ------------------
  273|      0|        if (s->hit) {
  ------------------
  |  Branch (273:13): [True: 0, False: 0]
  ------------------
  274|      0|            if (s->ext.ticket_expected) {
  ------------------
  |  Branch (274:17): [True: 0, False: 0]
  ------------------
  275|      0|                if (mt == SSL3_MT_NEWSESSION_TICKET) {
  ------------------
  |  |  315|      0|#define SSL3_MT_NEWSESSION_TICKET 4
  ------------------
  |  Branch (275:21): [True: 0, False: 0]
  ------------------
  276|      0|                    st->hand_state = TLS_ST_CR_SESSION_TICKET;
  277|      0|                    return 1;
  278|      0|                }
  279|      0|            } else if (mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (279:24): [True: 0, False: 0]
  ------------------
  280|      0|                st->hand_state = TLS_ST_CR_CHANGE;
  281|      0|                return 1;
  282|      0|            }
  283|      0|        } else {
  284|      0|            if (SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|      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)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  285|      0|                && mt == DTLS1_MT_HELLO_VERIFY_REQUEST) {
  ------------------
  |  |  334|      0|#define DTLS1_MT_HELLO_VERIFY_REQUEST 3
  ------------------
  |  Branch (285:20): [True: 0, False: 0]
  ------------------
  286|      0|                st->hand_state = DTLS_ST_CR_HELLO_VERIFY_REQUEST;
  287|      0|                return 1;
  288|      0|            } else if (s->version >= TLS1_VERSION
  ------------------
  |  |   24|      0|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (288:24): [True: 0, False: 0]
  ------------------
  289|      0|                && s->ext.session_secret_cb != NULL
  ------------------
  |  Branch (289:20): [True: 0, False: 0]
  ------------------
  290|      0|                && s->session->ext.tick != NULL
  ------------------
  |  Branch (290:20): [True: 0, False: 0]
  ------------------
  291|      0|                && mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (291:20): [True: 0, False: 0]
  ------------------
  292|       |                /*
  293|       |                 * Normally, we can tell if the server is resuming the session
  294|       |                 * from the session ID. EAP-FAST (RFC 4851), however, relies on
  295|       |                 * the next server message after the ServerHello to determine if
  296|       |                 * the server is resuming.
  297|       |                 */
  298|      0|                s->hit = 1;
  299|      0|                st->hand_state = TLS_ST_CR_CHANGE;
  300|      0|                return 1;
  301|      0|            } else if (!(s->s3.tmp.new_cipher->algorithm_auth
  ------------------
  |  Branch (301:24): [True: 0, False: 0]
  ------------------
  302|      0|                           & (SSL_aNULL | SSL_aSRP | SSL_aPSK))) {
  ------------------
  |  |  116|      0|#define SSL_aNULL 0x00000004U
  ------------------
                                         & (SSL_aNULL | SSL_aSRP | SSL_aPSK))) {
  ------------------
  |  |  124|      0|#define SSL_aSRP 0x00000040U
  ------------------
                                         & (SSL_aNULL | SSL_aSRP | SSL_aPSK))) {
  ------------------
  |  |  120|      0|#define SSL_aPSK 0x00000010U
  ------------------
  303|      0|                if (mt == SSL3_MT_CERTIFICATE) {
  ------------------
  |  |  318|      0|#define SSL3_MT_CERTIFICATE 11
  ------------------
  |  Branch (303:21): [True: 0, False: 0]
  ------------------
  304|      0|                    st->hand_state = TLS_ST_CR_CERT;
  305|      0|                    return 1;
  306|      0|                }
  307|      0|            } else {
  308|      0|                ske_expected = key_exchange_expected(s);
  309|       |                /* SKE is optional for some PSK ciphersuites */
  310|      0|                if (ske_expected
  ------------------
  |  Branch (310:21): [True: 0, False: 0]
  ------------------
  311|      0|                    || ((s->s3.tmp.new_cipher->algorithm_mkey & SSL_PSK)
  ------------------
  |  |  105|      0|#define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   91|      0|#define SSL_kPSK 0x00000008U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   97|      0|#define SSL_kRSAPSK 0x00000040U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   98|      0|#define SSL_kECDHEPSK 0x00000080U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   99|      0|#define SSL_kDHEPSK 0x00000100U
  |  |  ------------------
  ------------------
  |  Branch (311:25): [True: 0, False: 0]
  ------------------
  312|      0|                        && mt == SSL3_MT_SERVER_KEY_EXCHANGE)) {
  ------------------
  |  |  319|      0|#define SSL3_MT_SERVER_KEY_EXCHANGE 12
  ------------------
  |  Branch (312:28): [True: 0, False: 0]
  ------------------
  313|      0|                    if (mt == SSL3_MT_SERVER_KEY_EXCHANGE) {
  ------------------
  |  |  319|      0|#define SSL3_MT_SERVER_KEY_EXCHANGE 12
  ------------------
  |  Branch (313:25): [True: 0, False: 0]
  ------------------
  314|      0|                        st->hand_state = TLS_ST_CR_KEY_EXCH;
  315|      0|                        return 1;
  316|      0|                    }
  317|      0|                } else if (mt == SSL3_MT_CERTIFICATE_REQUEST
  ------------------
  |  |  320|      0|#define SSL3_MT_CERTIFICATE_REQUEST 13
  ------------------
  |  Branch (317:28): [True: 0, False: 0]
  ------------------
  318|      0|                    && cert_req_allowed(s)) {
  ------------------
  |  Branch (318:24): [True: 0, False: 0]
  ------------------
  319|      0|                    st->hand_state = TLS_ST_CR_CERT_REQ;
  320|      0|                    return 1;
  321|      0|                } else if (mt == SSL3_MT_SERVER_DONE) {
  ------------------
  |  |  321|      0|#define SSL3_MT_SERVER_DONE 14
  ------------------
  |  Branch (321:28): [True: 0, False: 0]
  ------------------
  322|      0|                    st->hand_state = TLS_ST_CR_SRVR_DONE;
  323|      0|                    return 1;
  324|      0|                }
  325|      0|            }
  326|      0|        }
  327|      0|        break;
  328|       |
  329|      0|    case TLS_ST_CR_CERT:
  ------------------
  |  Branch (329:5): [True: 0, False: 3.62k]
  ------------------
  330|      0|    case TLS_ST_CR_COMP_CERT:
  ------------------
  |  Branch (330:5): [True: 0, False: 3.62k]
  ------------------
  331|       |        /*
  332|       |         * The CertificateStatus message is optional even if
  333|       |         * |ext.status_expected| is set
  334|       |         */
  335|      0|        if (s->ext.status_expected && mt == SSL3_MT_CERTIFICATE_STATUS) {
  ------------------
  |  |  326|      0|#define SSL3_MT_CERTIFICATE_STATUS 22
  ------------------
  |  Branch (335:13): [True: 0, False: 0]
  |  Branch (335:39): [True: 0, False: 0]
  ------------------
  336|      0|            st->hand_state = TLS_ST_CR_CERT_STATUS;
  337|      0|            return 1;
  338|      0|        }
  339|       |        /* Fall through */
  340|       |
  341|      0|    case TLS_ST_CR_CERT_STATUS:
  ------------------
  |  Branch (341:5): [True: 0, False: 3.62k]
  ------------------
  342|      0|        ske_expected = key_exchange_expected(s);
  343|       |        /* SKE is optional for some PSK ciphersuites */
  344|      0|        if (ske_expected || ((s->s3.tmp.new_cipher->algorithm_mkey & SSL_PSK) && mt == SSL3_MT_SERVER_KEY_EXCHANGE)) {
  ------------------
  |  |  105|      0|#define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   91|      0|#define SSL_kPSK 0x00000008U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   97|      0|#define SSL_kRSAPSK 0x00000040U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   98|      0|#define SSL_kECDHEPSK 0x00000080U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   99|      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 (344:13): [True: 0, False: 0]
  |  Branch (344:30): [True: 0, False: 0]
  |  Branch (344:82): [True: 0, False: 0]
  ------------------
  345|      0|            if (mt == SSL3_MT_SERVER_KEY_EXCHANGE) {
  ------------------
  |  |  319|      0|#define SSL3_MT_SERVER_KEY_EXCHANGE 12
  ------------------
  |  Branch (345:17): [True: 0, False: 0]
  ------------------
  346|      0|                st->hand_state = TLS_ST_CR_KEY_EXCH;
  347|      0|                return 1;
  348|      0|            }
  349|      0|            goto err;
  350|      0|        }
  351|       |        /* Fall through */
  352|       |
  353|      0|    case TLS_ST_CR_KEY_EXCH:
  ------------------
  |  Branch (353:5): [True: 0, False: 3.62k]
  ------------------
  354|      0|        if (mt == SSL3_MT_CERTIFICATE_REQUEST) {
  ------------------
  |  |  320|      0|#define SSL3_MT_CERTIFICATE_REQUEST 13
  ------------------
  |  Branch (354:13): [True: 0, False: 0]
  ------------------
  355|      0|            if (cert_req_allowed(s)) {
  ------------------
  |  Branch (355:17): [True: 0, False: 0]
  ------------------
  356|      0|                st->hand_state = TLS_ST_CR_CERT_REQ;
  357|      0|                return 1;
  358|      0|            }
  359|      0|            goto err;
  360|      0|        }
  361|       |        /* Fall through */
  362|       |
  363|      0|    case TLS_ST_CR_CERT_REQ:
  ------------------
  |  Branch (363:5): [True: 0, False: 3.62k]
  ------------------
  364|      0|        if (mt == SSL3_MT_SERVER_DONE) {
  ------------------
  |  |  321|      0|#define SSL3_MT_SERVER_DONE 14
  ------------------
  |  Branch (364:13): [True: 0, False: 0]
  ------------------
  365|      0|            st->hand_state = TLS_ST_CR_SRVR_DONE;
  366|      0|            return 1;
  367|      0|        }
  368|      0|        break;
  369|       |
  370|      0|    case TLS_ST_CW_FINISHED:
  ------------------
  |  Branch (370:5): [True: 0, False: 3.62k]
  ------------------
  371|      0|        if (s->ext.ticket_expected) {
  ------------------
  |  Branch (371:13): [True: 0, False: 0]
  ------------------
  372|      0|            if (mt == SSL3_MT_NEWSESSION_TICKET) {
  ------------------
  |  |  315|      0|#define SSL3_MT_NEWSESSION_TICKET 4
  ------------------
  |  Branch (372:17): [True: 0, False: 0]
  ------------------
  373|      0|                st->hand_state = TLS_ST_CR_SESSION_TICKET;
  374|      0|                return 1;
  375|      0|            }
  376|      0|        } else if (mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (376:20): [True: 0, False: 0]
  ------------------
  377|      0|            st->hand_state = TLS_ST_CR_CHANGE;
  378|      0|            return 1;
  379|      0|        }
  380|      0|        break;
  381|       |
  382|      0|    case TLS_ST_CR_SESSION_TICKET:
  ------------------
  |  Branch (382:5): [True: 0, False: 3.62k]
  ------------------
  383|      0|        if (mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (383:13): [True: 0, False: 0]
  ------------------
  384|      0|            st->hand_state = TLS_ST_CR_CHANGE;
  385|      0|            return 1;
  386|      0|        }
  387|      0|        break;
  388|       |
  389|      0|    case TLS_ST_CR_CHANGE:
  ------------------
  |  Branch (389:5): [True: 0, False: 3.62k]
  ------------------
  390|      0|        if (mt == SSL3_MT_FINISHED) {
  ------------------
  |  |  324|      0|#define SSL3_MT_FINISHED 20
  ------------------
  |  Branch (390:13): [True: 0, False: 0]
  ------------------
  391|      0|            st->hand_state = TLS_ST_CR_FINISHED;
  392|      0|            return 1;
  393|      0|        }
  394|      0|        break;
  395|       |
  396|      0|    case TLS_ST_OK:
  ------------------
  |  Branch (396:5): [True: 0, False: 3.62k]
  ------------------
  397|      0|        if (mt == SSL3_MT_HELLO_REQUEST) {
  ------------------
  |  |  312|      0|#define SSL3_MT_HELLO_REQUEST 0
  ------------------
  |  Branch (397:13): [True: 0, False: 0]
  ------------------
  398|      0|            st->hand_state = TLS_ST_CR_HELLO_REQ;
  399|      0|            return 1;
  400|      0|        }
  401|      0|        break;
  402|  3.62k|    }
  403|       |
  404|      0|err:
  405|       |    /* No valid transition found */
  406|      0|    if (SSL_CONNECTION_IS_DTLS(s) && mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  266|      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)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                  if (SSL_CONNECTION_IS_DTLS(s) && mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (406:38): [True: 0, False: 0]
  ------------------
  407|      0|        BIO *rbio;
  408|       |
  409|       |        /*
  410|       |         * CCS messages don't have a message sequence number so this is probably
  411|       |         * because of an out-of-order CCS. We'll just drop it.
  412|       |         */
  413|      0|        s->init_num = 0;
  414|      0|        s->rwstate = SSL_READING;
  ------------------
  |  |  957|      0|#define SSL_READING 3
  ------------------
  415|      0|        rbio = SSL_get_rbio(SSL_CONNECTION_GET_SSL(s));
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  416|      0|        BIO_clear_retry_flags(rbio);
  ------------------
  |  |  272|      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
  |  |  ------------------
  ------------------
  417|      0|        BIO_set_retry_read(rbio);
  ------------------
  |  |  266|      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
  |  |  ------------------
  ------------------
  418|      0|        return 0;
  419|      0|    }
  420|      0|    SSLfatal(s, SSL3_AD_UNEXPECTED_MESSAGE, SSL_R_UNEXPECTED_MESSAGE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  421|      0|    return 0;
  422|      0|}
ossl_statem_client_write_transition:
  539|  32.4k|{
  540|  32.4k|    OSSL_STATEM *st = &s->statem;
  541|       |
  542|       |    /*
  543|       |     * Note that immediately before/after a ClientHello we don't know what
  544|       |     * version we are going to negotiate yet, so we don't take this branch until
  545|       |     * later
  546|       |     */
  547|  32.4k|    if (SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  273|  32.4k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  64.9k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  32.4k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  32.4k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 32.4k, False: 0]
  |  |  ------------------
  |  |  274|  32.4k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  32.4k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  64.9k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 32.4k, False: 0]
  |  |  ------------------
  |  |  275|  32.4k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  32.4k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  32.4k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 25.2k, False: 7.25k]
  |  |  ------------------
  ------------------
  548|  25.2k|        return ossl_statem_client13_write_transition(s);
  549|       |
  550|  7.25k|    switch (st->hand_state) {
  551|      0|    default:
  ------------------
  |  Branch (551:5): [True: 0, False: 7.25k]
  ------------------
  552|       |        /* Shouldn't happen */
  553|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  554|      0|        return WRITE_TRAN_ERROR;
  555|       |
  556|      0|    case TLS_ST_OK:
  ------------------
  |  Branch (556:5): [True: 0, False: 7.25k]
  ------------------
  557|      0|        if (!s->renegotiate) {
  ------------------
  |  Branch (557:13): [True: 0, False: 0]
  ------------------
  558|       |            /*
  559|       |             * We haven't requested a renegotiation ourselves so we must have
  560|       |             * received a message from the server. Better read it.
  561|       |             */
  562|      0|            return WRITE_TRAN_FINISHED;
  563|      0|        }
  564|       |        /* Renegotiation */
  565|       |        /* fall thru */
  566|  3.62k|    case TLS_ST_BEFORE:
  ------------------
  |  Branch (566:5): [True: 3.62k, False: 3.62k]
  ------------------
  567|  3.62k|        st->hand_state = TLS_ST_CW_CLNT_HELLO;
  568|  3.62k|        return WRITE_TRAN_CONTINUE;
  569|       |
  570|  3.62k|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (570:5): [True: 3.62k, False: 3.62k]
  ------------------
  571|  3.62k|        if (s->early_data_state == SSL_EARLY_DATA_CONNECTING
  ------------------
  |  Branch (571:13): [True: 0, False: 3.62k]
  ------------------
  572|      0|            && !SSL_IS_QUIC_HANDSHAKE(s)) {
  ------------------
  |  |  311|      0|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  ------------------
  |  |  |  |   22|      0|#define TLS1_FLAGS_QUIC 0x2000
  |  |  ------------------
  ------------------
  |  Branch (572:16): [True: 0, False: 0]
  ------------------
  573|       |            /*
  574|       |             * We are assuming this is a TLSv1.3 connection, although we haven't
  575|       |             * actually selected a version yet.
  576|       |             */
  577|      0|            if ((s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0)
  ------------------
  |  |  404|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (577:17): [True: 0, False: 0]
  ------------------
  578|      0|                st->hand_state = TLS_ST_CW_CHANGE;
  579|      0|            else
  580|      0|                st->hand_state = TLS_ST_EARLY_DATA;
  581|      0|            return WRITE_TRAN_CONTINUE;
  582|      0|        }
  583|       |        /*
  584|       |         * No transition at the end of writing because we don't know what
  585|       |         * we will be sent
  586|       |         */
  587|  3.62k|        s->ts_msg_write = ossl_time_now();
  588|  3.62k|        return WRITE_TRAN_FINISHED;
  589|       |
  590|      0|    case TLS_ST_CR_SRVR_HELLO:
  ------------------
  |  Branch (590:5): [True: 0, False: 7.25k]
  ------------------
  591|       |        /*
  592|       |         * We only get here in TLSv1.3. We just received an HRR, so issue a
  593|       |         * CCS unless middlebox compat mode is off, or we already issued one
  594|       |         * because we did early data.
  595|       |         */
  596|      0|        if ((s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0
  ------------------
  |  |  404|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (596:13): [True: 0, False: 0]
  ------------------
  597|      0|            && s->early_data_state != SSL_EARLY_DATA_FINISHED_WRITING)
  ------------------
  |  Branch (597:16): [True: 0, False: 0]
  ------------------
  598|      0|            st->hand_state = TLS_ST_CW_CHANGE;
  599|      0|        else
  600|      0|            st->hand_state = TLS_ST_CW_CLNT_HELLO;
  601|      0|        return WRITE_TRAN_CONTINUE;
  602|       |
  603|      0|    case TLS_ST_EARLY_DATA:
  ------------------
  |  Branch (603:5): [True: 0, False: 7.25k]
  ------------------
  604|      0|        s->ts_msg_write = ossl_time_now();
  605|      0|        return WRITE_TRAN_FINISHED;
  606|       |
  607|      0|    case DTLS_ST_CR_HELLO_VERIFY_REQUEST:
  ------------------
  |  Branch (607:5): [True: 0, False: 7.25k]
  ------------------
  608|      0|        st->hand_state = TLS_ST_CW_CLNT_HELLO;
  609|      0|        return WRITE_TRAN_CONTINUE;
  610|       |
  611|      0|    case TLS_ST_CR_SRVR_DONE:
  ------------------
  |  Branch (611:5): [True: 0, False: 7.25k]
  ------------------
  612|      0|        s->ts_msg_read = ossl_time_now();
  613|      0|        if (s->s3.tmp.cert_req)
  ------------------
  |  Branch (613:13): [True: 0, False: 0]
  ------------------
  614|      0|            st->hand_state = TLS_ST_CW_CERT;
  615|      0|        else
  616|      0|            st->hand_state = TLS_ST_CW_KEY_EXCH;
  617|      0|        return WRITE_TRAN_CONTINUE;
  618|       |
  619|      0|    case TLS_ST_CW_CERT:
  ------------------
  |  Branch (619:5): [True: 0, False: 7.25k]
  ------------------
  620|      0|        st->hand_state = TLS_ST_CW_KEY_EXCH;
  621|      0|        return WRITE_TRAN_CONTINUE;
  622|       |
  623|      0|    case TLS_ST_CW_KEY_EXCH:
  ------------------
  |  Branch (623:5): [True: 0, False: 7.25k]
  ------------------
  624|       |        /*
  625|       |         * For TLS, cert_req is set to 2, so a cert chain of nothing is
  626|       |         * sent, but no verify packet is sent
  627|       |         */
  628|       |        /*
  629|       |         * XXX: For now, we do not support client authentication in ECDH
  630|       |         * cipher suites with ECDH (rather than ECDSA) certificates. We
  631|       |         * need to skip the certificate verify message when client's
  632|       |         * ECDH public key is sent inside the client certificate.
  633|       |         */
  634|      0|        if (s->s3.tmp.cert_req == 1) {
  ------------------
  |  Branch (634:13): [True: 0, False: 0]
  ------------------
  635|      0|            st->hand_state = TLS_ST_CW_CERT_VRFY;
  636|      0|        } else {
  637|      0|            st->hand_state = TLS_ST_CW_CHANGE;
  638|      0|        }
  639|      0|        if (s->s3.flags & TLS1_FLAGS_SKIP_CERT_VERIFY) {
  ------------------
  |  |  293|      0|#define TLS1_FLAGS_SKIP_CERT_VERIFY 0x0010
  ------------------
  |  Branch (639:13): [True: 0, False: 0]
  ------------------
  640|      0|            st->hand_state = TLS_ST_CW_CHANGE;
  641|      0|        }
  642|      0|        return WRITE_TRAN_CONTINUE;
  643|       |
  644|      0|    case TLS_ST_CW_CERT_VRFY:
  ------------------
  |  Branch (644:5): [True: 0, False: 7.25k]
  ------------------
  645|      0|        st->hand_state = TLS_ST_CW_CHANGE;
  646|      0|        return WRITE_TRAN_CONTINUE;
  647|       |
  648|      0|    case TLS_ST_CW_CHANGE:
  ------------------
  |  Branch (648:5): [True: 0, False: 7.25k]
  ------------------
  649|      0|        if (s->hello_retry_request == SSL_HRR_PENDING) {
  ------------------
  |  Branch (649:13): [True: 0, False: 0]
  ------------------
  650|      0|            st->hand_state = TLS_ST_CW_CLNT_HELLO;
  651|      0|        } else if (s->early_data_state == SSL_EARLY_DATA_CONNECTING) {
  ------------------
  |  Branch (651:20): [True: 0, False: 0]
  ------------------
  652|      0|            st->hand_state = TLS_ST_EARLY_DATA;
  653|      0|        } else {
  654|       |#if defined(OPENSSL_NO_NEXTPROTONEG)
  655|       |            st->hand_state = TLS_ST_CW_FINISHED;
  656|       |#else
  657|      0|            if (!SSL_CONNECTION_IS_DTLS(s) && s->s3.npn_seen)
  ------------------
  |  |  266|      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)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (657:17): [True: 0, False: 0]
  |  Branch (657:47): [True: 0, False: 0]
  ------------------
  658|      0|                st->hand_state = TLS_ST_CW_NEXT_PROTO;
  659|      0|            else
  660|      0|                st->hand_state = TLS_ST_CW_FINISHED;
  661|      0|#endif
  662|      0|        }
  663|      0|        return WRITE_TRAN_CONTINUE;
  664|       |
  665|      0|#if !defined(OPENSSL_NO_NEXTPROTONEG)
  666|      0|    case TLS_ST_CW_NEXT_PROTO:
  ------------------
  |  Branch (666:5): [True: 0, False: 7.25k]
  ------------------
  667|      0|        st->hand_state = TLS_ST_CW_FINISHED;
  668|      0|        return WRITE_TRAN_CONTINUE;
  669|      0|#endif
  670|       |
  671|      0|    case TLS_ST_CW_FINISHED:
  ------------------
  |  Branch (671:5): [True: 0, False: 7.25k]
  ------------------
  672|      0|        if (s->hit) {
  ------------------
  |  Branch (672:13): [True: 0, False: 0]
  ------------------
  673|      0|            st->hand_state = TLS_ST_OK;
  674|      0|            return WRITE_TRAN_CONTINUE;
  675|      0|        } else {
  676|      0|            return WRITE_TRAN_FINISHED;
  677|      0|        }
  678|       |
  679|      0|    case TLS_ST_CR_FINISHED:
  ------------------
  |  Branch (679:5): [True: 0, False: 7.25k]
  ------------------
  680|      0|        if (s->hit) {
  ------------------
  |  Branch (680:13): [True: 0, False: 0]
  ------------------
  681|      0|            st->hand_state = TLS_ST_CW_CHANGE;
  682|      0|            return WRITE_TRAN_CONTINUE;
  683|      0|        } else {
  684|      0|            st->hand_state = TLS_ST_OK;
  685|      0|            return WRITE_TRAN_CONTINUE;
  686|      0|        }
  687|       |
  688|      0|    case TLS_ST_CR_HELLO_REQ:
  ------------------
  |  Branch (688:5): [True: 0, False: 7.25k]
  ------------------
  689|       |        /*
  690|       |         * If we can renegotiate now then do so, otherwise wait for a more
  691|       |         * convenient time.
  692|       |         */
  693|      0|        if (ssl3_renegotiate_check(SSL_CONNECTION_GET_SSL(s), 1)) {
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  |  Branch (693:13): [True: 0, False: 0]
  ------------------
  694|      0|            if (!tls_setup_handshake(s)) {
  ------------------
  |  Branch (694:17): [True: 0, False: 0]
  ------------------
  695|       |                /* SSLfatal() already called */
  696|      0|                return WRITE_TRAN_ERROR;
  697|      0|            }
  698|      0|            st->hand_state = TLS_ST_CW_CLNT_HELLO;
  699|      0|            return WRITE_TRAN_CONTINUE;
  700|      0|        }
  701|      0|        st->hand_state = TLS_ST_OK;
  702|      0|        return WRITE_TRAN_CONTINUE;
  703|  7.25k|    }
  704|  7.25k|}
ossl_statem_client_pre_work:
  711|  21.6k|{
  712|  21.6k|    OSSL_STATEM *st = &s->statem;
  713|       |
  714|  21.6k|    switch (st->hand_state) {
  715|  3.62k|    default:
  ------------------
  |  Branch (715:5): [True: 3.62k, False: 18.0k]
  ------------------
  716|       |        /* No pre work to be done */
  717|  3.62k|        break;
  718|       |
  719|  3.62k|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (719:5): [True: 3.62k, False: 18.0k]
  ------------------
  720|  3.62k|        s->shutdown = 0;
  721|  3.62k|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  722|       |            /* every DTLS ClientHello resets Finished MAC */
  723|      0|            if (!ssl3_init_finished_mac(s)) {
  ------------------
  |  Branch (723:17): [True: 0, False: 0]
  ------------------
  724|       |                /* SSLfatal() already called */
  725|      0|                return WORK_ERROR;
  726|      0|            }
  727|  3.62k|        } else if (s->ext.early_data == SSL_EARLY_DATA_REJECTED) {
  ------------------
  |  | 2073|  3.62k|#define SSL_EARLY_DATA_REJECTED 1
  ------------------
  |  Branch (727:20): [True: 0, False: 3.62k]
  ------------------
  728|       |            /*
  729|       |             * This must be a second ClientHello after an HRR following an
  730|       |             * earlier rejected attempt to send early data. Since we were
  731|       |             * previously encrypting the early data we now need to reset the
  732|       |             * write record layer in order to write in plaintext again.
  733|       |             */
  734|      0|            if (!ssl_set_new_record_layer(s,
  ------------------
  |  Branch (734:17): [True: 0, False: 0]
  ------------------
  735|      0|                    TLS_ANY_VERSION,
  ------------------
  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  ------------------
  736|      0|                    OSSL_RECORD_DIRECTION_WRITE,
  ------------------
  |  |   43|      0|#define OSSL_RECORD_DIRECTION_WRITE 1
  ------------------
  737|      0|                    OSSL_RECORD_PROTECTION_LEVEL_NONE,
  ------------------
  |  | 2928|      0|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
  738|      0|                    NULL, 0, NULL, 0, NULL, 0, NULL, 0,
  739|      0|                    NULL, 0, NID_undef, NULL, NULL,
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  740|      0|                    NULL)) {
  741|       |                /* SSLfatal already called */
  742|      0|                return WORK_ERROR;
  743|      0|            }
  744|      0|        }
  745|  3.62k|        break;
  746|       |
  747|  3.62k|    case TLS_ST_CW_CHANGE:
  ------------------
  |  Branch (747:5): [True: 3.62k, False: 18.0k]
  ------------------
  748|  3.62k|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  749|      0|            if (s->hit) {
  ------------------
  |  Branch (749:17): [True: 0, False: 0]
  ------------------
  750|       |                /*
  751|       |                 * We're into the last flight so we don't retransmit these
  752|       |                 * messages unless we need to.
  753|       |                 */
  754|      0|                st->use_timer = 0;
  755|      0|            }
  756|       |#ifndef OPENSSL_NO_SCTP
  757|       |            if (BIO_dgram_is_sctp(SSL_get_wbio(SSL_CONNECTION_GET_SSL(s)))) {
  758|       |                /* Calls SSLfatal() as required */
  759|       |                return dtls_wait_for_dry(s);
  760|       |            }
  761|       |#endif
  762|      0|        }
  763|  3.62k|        break;
  764|       |
  765|      0|    case TLS_ST_PENDING_EARLY_DATA_END:
  ------------------
  |  Branch (765:5): [True: 0, False: 21.6k]
  ------------------
  766|       |        /*
  767|       |         * If we've been called by SSL_do_handshake()/SSL_write(), or we did not
  768|       |         * attempt to write early data before calling SSL_read() then we press
  769|       |         * on with the handshake. Otherwise we pause here.
  770|       |         */
  771|      0|        if (s->early_data_state == SSL_EARLY_DATA_FINISHED_WRITING
  ------------------
  |  Branch (771:13): [True: 0, False: 0]
  ------------------
  772|      0|            || s->early_data_state == SSL_EARLY_DATA_NONE)
  ------------------
  |  Branch (772:16): [True: 0, False: 0]
  ------------------
  773|      0|            return WORK_FINISHED_CONTINUE;
  774|       |        /* Fall through */
  775|       |
  776|      0|    case TLS_ST_EARLY_DATA:
  ------------------
  |  Branch (776:5): [True: 0, False: 21.6k]
  ------------------
  777|      0|        return tls_finish_handshake(s, wst, 0, 1);
  778|       |
  779|  10.7k|    case TLS_ST_OK:
  ------------------
  |  Branch (779:5): [True: 10.7k, False: 10.8k]
  ------------------
  780|       |        /* Calls SSLfatal() as required */
  781|  10.7k|        return tls_finish_handshake(s, wst, 1, 1);
  782|  21.6k|    }
  783|       |
  784|  10.8k|    return WORK_FINISHED_CONTINUE;
  785|  21.6k|}
ossl_statem_client_post_work:
  792|  10.8k|{
  793|  10.8k|    OSSL_STATEM *st = &s->statem;
  794|  10.8k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  10.8k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  795|       |
  796|  10.8k|    s->init_num = 0;
  797|       |
  798|  10.8k|    switch (st->hand_state) {
  799|      0|    default:
  ------------------
  |  Branch (799:5): [True: 0, False: 10.8k]
  ------------------
  800|       |        /* No post work to be done */
  801|      0|        break;
  802|       |
  803|  3.62k|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (803:5): [True: 3.62k, False: 7.25k]
  ------------------
  804|  3.62k|        if (s->early_data_state == SSL_EARLY_DATA_CONNECTING
  ------------------
  |  Branch (804:13): [True: 0, False: 3.62k]
  ------------------
  805|      0|            && s->max_early_data > 0) {
  ------------------
  |  Branch (805:16): [True: 0, False: 0]
  ------------------
  806|       |            /*
  807|       |             * We haven't selected TLSv1.3 yet so we don't call the change
  808|       |             * cipher state function associated with the SSL_METHOD. Instead
  809|       |             * we call tls13_change_cipher_state() directly.
  810|       |             */
  811|      0|            if ((s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) == 0) {
  ------------------
  |  |  404|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (811:17): [True: 0, False: 0]
  ------------------
  812|      0|                if (!tls13_change_cipher_state(s,
  ------------------
  |  Branch (812:21): [True: 0, False: 0]
  ------------------
  813|      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
  |  |  ------------------
  ------------------
  814|       |                    /* SSLfatal() already called */
  815|      0|                    return WORK_ERROR;
  816|      0|                }
  817|      0|            }
  818|       |            /* else we're in compat mode so we delay flushing until after CCS */
  819|  3.62k|        } else if (!statem_flush(s)) {
  ------------------
  |  Branch (819:20): [True: 0, False: 3.62k]
  ------------------
  820|      0|            return WORK_MORE_A;
  821|      0|        }
  822|       |
  823|  3.62k|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  824|       |            /* Treat the next message as the first packet */
  825|      0|            s->first_packet = 1;
  826|      0|        }
  827|  3.62k|        break;
  828|       |
  829|      0|    case TLS_ST_CW_KEY_EXCH:
  ------------------
  |  Branch (829:5): [True: 0, False: 10.8k]
  ------------------
  830|      0|        if (tls_client_key_exchange_post_work(s) == 0) {
  ------------------
  |  Branch (830:13): [True: 0, False: 0]
  ------------------
  831|       |            /* SSLfatal() already called */
  832|      0|            return WORK_ERROR;
  833|      0|        }
  834|      0|        break;
  835|       |
  836|  3.62k|    case TLS_ST_CW_CHANGE:
  ------------------
  |  Branch (836:5): [True: 3.62k, False: 7.25k]
  ------------------
  837|  3.62k|        if (SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|  7.25k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  838|      0|            || s->hello_retry_request == SSL_HRR_PENDING)
  ------------------
  |  Branch (838:16): [True: 0, False: 0]
  ------------------
  839|  3.62k|            break;
  840|      0|        if (s->early_data_state == SSL_EARLY_DATA_CONNECTING
  ------------------
  |  Branch (840:13): [True: 0, False: 0]
  ------------------
  841|      0|            && s->max_early_data > 0) {
  ------------------
  |  Branch (841:16): [True: 0, False: 0]
  ------------------
  842|       |            /*
  843|       |             * We haven't selected TLSv1.3 yet so we don't call the change
  844|       |             * cipher state function associated with the SSL_METHOD. Instead
  845|       |             * we call tls13_change_cipher_state() directly.
  846|       |             */
  847|      0|            if (!tls13_change_cipher_state(s,
  ------------------
  |  Branch (847:17): [True: 0, False: 0]
  ------------------
  848|      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
  |  |  ------------------
  ------------------
  849|      0|                return WORK_ERROR;
  850|      0|            break;
  851|      0|        }
  852|      0|        s->session->cipher = s->s3.tmp.new_cipher;
  853|       |#ifdef OPENSSL_NO_COMP
  854|       |        s->session->compress_meth = 0;
  855|       |#else
  856|      0|        if (s->s3.tmp.new_compression == NULL)
  ------------------
  |  Branch (856:13): [True: 0, False: 0]
  ------------------
  857|      0|            s->session->compress_meth = 0;
  858|      0|        else
  859|      0|            s->session->compress_meth = s->s3.tmp.new_compression->id;
  860|      0|#endif
  861|      0|        if (!ssl->method->ssl3_enc->setup_key_block(s)) {
  ------------------
  |  Branch (861:13): [True: 0, False: 0]
  ------------------
  862|       |            /* SSLfatal() already called */
  863|      0|            return WORK_ERROR;
  864|      0|        }
  865|       |
  866|      0|        if (!ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (866:13): [True: 0, False: 0]
  ------------------
  867|      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
  |  |  ------------------
  ------------------
  868|       |            /* SSLfatal() already called */
  869|      0|            return WORK_ERROR;
  870|      0|        }
  871|       |
  872|       |#ifndef OPENSSL_NO_SCTP
  873|       |        if (SSL_CONNECTION_IS_DTLS(s) && s->hit) {
  874|       |            /*
  875|       |             * Change to new shared key of SCTP-Auth, will be ignored if
  876|       |             * no SCTP used.
  877|       |             */
  878|       |            BIO_ctrl(SSL_get_wbio(ssl), BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY,
  879|       |                0, NULL);
  880|       |        }
  881|       |#endif
  882|      0|        break;
  883|       |
  884|  3.62k|    case TLS_ST_CW_FINISHED:
  ------------------
  |  Branch (884:5): [True: 3.62k, False: 7.25k]
  ------------------
  885|       |#ifndef OPENSSL_NO_SCTP
  886|       |        if (wst == WORK_MORE_A && SSL_CONNECTION_IS_DTLS(s) && s->hit == 0) {
  887|       |            /*
  888|       |             * Change to new shared key of SCTP-Auth, will be ignored if
  889|       |             * no SCTP used.
  890|       |             */
  891|       |            BIO_ctrl(SSL_get_wbio(ssl), BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY,
  892|       |                0, NULL);
  893|       |        }
  894|       |#endif
  895|  3.62k|        if (statem_flush(s) != 1)
  ------------------
  |  Branch (895:13): [True: 0, False: 3.62k]
  ------------------
  896|      0|            return WORK_MORE_B;
  897|       |
  898|  3.62k|        if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  899|  3.62k|            if (!tls13_save_handshake_digest_for_pha(s)) {
  ------------------
  |  Branch (899:17): [True: 0, False: 3.62k]
  ------------------
  900|       |                /* SSLfatal() already called */
  901|      0|                return WORK_ERROR;
  902|      0|            }
  903|  3.62k|            if (s->post_handshake_auth != SSL_PHA_REQUESTED) {
  ------------------
  |  Branch (903:17): [True: 3.62k, False: 0]
  ------------------
  904|  3.62k|                if (!ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (904:21): [True: 0, False: 3.62k]
  ------------------
  905|  3.62k|                        SSL3_CC_APPLICATION | SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  348|  3.62k|#define SSL3_CC_APPLICATION 0x100
  ------------------
                                      SSL3_CC_APPLICATION | SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  349|  3.62k|#define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  344|  3.62k|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  343|  3.62k|#define SSL3_CC_WRITE 0x002
  |  |  ------------------
  ------------------
  906|       |                    /* SSLfatal() already called */
  907|      0|                    return WORK_ERROR;
  908|      0|                }
  909|       |                /*
  910|       |                 * For QUIC we deferred setting up these keys until now so
  911|       |                 * that we can ensure write keys are always set up before read
  912|       |                 * keys.
  913|       |                 */
  914|  3.62k|                if (SSL_IS_QUIC_HANDSHAKE(s)
  ------------------
  |  |  311|  7.25k|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  ------------------
  |  |  |  |   22|  3.62k|#define TLS1_FLAGS_QUIC 0x2000
  |  |  ------------------
  |  |  |  Branch (311:34): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  915|      0|                    && !ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (915:24): [True: 0, False: 0]
  ------------------
  916|      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
  |  |  ------------------
  ------------------
  917|       |                    /* SSLfatal() already called */
  918|      0|                    return WORK_ERROR;
  919|      0|                }
  920|  3.62k|            }
  921|  3.62k|        }
  922|  3.62k|        break;
  923|       |
  924|  3.62k|    case TLS_ST_CW_KEY_UPDATE:
  ------------------
  |  Branch (924:5): [True: 0, False: 10.8k]
  ------------------
  925|      0|        if (statem_flush(s) != 1)
  ------------------
  |  Branch (925:13): [True: 0, False: 0]
  ------------------
  926|      0|            return WORK_MORE_A;
  927|      0|        if (!tls13_update_key(s, 1)) {
  ------------------
  |  Branch (927:13): [True: 0, False: 0]
  ------------------
  928|       |            /* SSLfatal() already called */
  929|      0|            return WORK_ERROR;
  930|      0|        }
  931|      0|        break;
  932|  10.8k|    }
  933|       |
  934|  10.8k|    return WORK_FINISHED_CONTINUE;
  935|  10.8k|}
ossl_statem_client_construct_message:
  947|  10.8k|{
  948|  10.8k|    OSSL_STATEM *st = &s->statem;
  949|       |
  950|  10.8k|    switch (st->hand_state) {
  951|      0|    default:
  ------------------
  |  Branch (951:5): [True: 0, False: 10.8k]
  ------------------
  952|       |        /* Shouldn't happen */
  953|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_HANDSHAKE_STATE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  954|      0|        return 0;
  955|       |
  956|  3.62k|    case TLS_ST_CW_CHANGE:
  ------------------
  |  Branch (956:5): [True: 3.62k, False: 7.25k]
  ------------------
  957|  3.62k|        if (SSL_CONNECTION_IS_DTLS(s))
  ------------------
  |  |  266|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  958|      0|            *confunc = dtls_construct_change_cipher_spec;
  959|  3.62k|        else
  960|  3.62k|            *confunc = tls_construct_change_cipher_spec;
  961|  3.62k|        *mt = SSL3_MT_CHANGE_CIPHER_SPEC;
  ------------------
  |  |  337|  3.62k|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  962|  3.62k|        break;
  963|       |
  964|  3.62k|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (964:5): [True: 3.62k, False: 7.25k]
  ------------------
  965|  3.62k|        *confunc = tls_construct_client_hello;
  966|  3.62k|        *mt = SSL3_MT_CLIENT_HELLO;
  ------------------
  |  |  313|  3.62k|#define SSL3_MT_CLIENT_HELLO 1
  ------------------
  967|  3.62k|        break;
  968|       |
  969|      0|    case TLS_ST_CW_END_OF_EARLY_DATA:
  ------------------
  |  Branch (969:5): [True: 0, False: 10.8k]
  ------------------
  970|      0|        *confunc = tls_construct_end_of_early_data;
  971|      0|        *mt = SSL3_MT_END_OF_EARLY_DATA;
  ------------------
  |  |  316|      0|#define SSL3_MT_END_OF_EARLY_DATA 5
  ------------------
  972|      0|        break;
  973|       |
  974|      0|    case TLS_ST_PENDING_EARLY_DATA_END:
  ------------------
  |  Branch (974:5): [True: 0, False: 10.8k]
  ------------------
  975|      0|        *confunc = NULL;
  976|      0|        *mt = SSL3_MT_DUMMY;
  ------------------
  |  |   41|      0|#define SSL3_MT_DUMMY -1
  ------------------
  977|      0|        break;
  978|       |
  979|      0|    case TLS_ST_CW_CERT:
  ------------------
  |  Branch (979:5): [True: 0, False: 10.8k]
  ------------------
  980|      0|        *confunc = tls_construct_client_certificate;
  981|      0|        *mt = SSL3_MT_CERTIFICATE;
  ------------------
  |  |  318|      0|#define SSL3_MT_CERTIFICATE 11
  ------------------
  982|      0|        break;
  983|       |
  984|       |#ifndef OPENSSL_NO_COMP_ALG
  985|       |    case TLS_ST_CW_COMP_CERT:
  986|       |        *confunc = tls_construct_client_compressed_certificate;
  987|       |        *mt = SSL3_MT_COMPRESSED_CERTIFICATE;
  988|       |        break;
  989|       |#endif
  990|       |
  991|      0|    case TLS_ST_CW_KEY_EXCH:
  ------------------
  |  Branch (991:5): [True: 0, False: 10.8k]
  ------------------
  992|      0|        *confunc = tls_construct_client_key_exchange;
  993|      0|        *mt = SSL3_MT_CLIENT_KEY_EXCHANGE;
  ------------------
  |  |  323|      0|#define SSL3_MT_CLIENT_KEY_EXCHANGE 16
  ------------------
  994|      0|        break;
  995|       |
  996|      0|    case TLS_ST_CW_CERT_VRFY:
  ------------------
  |  Branch (996:5): [True: 0, False: 10.8k]
  ------------------
  997|      0|        *confunc = tls_construct_cert_verify;
  998|      0|        *mt = SSL3_MT_CERTIFICATE_VERIFY;
  ------------------
  |  |  322|      0|#define SSL3_MT_CERTIFICATE_VERIFY 15
  ------------------
  999|      0|        break;
 1000|       |
 1001|      0|#if !defined(OPENSSL_NO_NEXTPROTONEG)
 1002|      0|    case TLS_ST_CW_NEXT_PROTO:
  ------------------
  |  Branch (1002:5): [True: 0, False: 10.8k]
  ------------------
 1003|      0|        *confunc = tls_construct_next_proto;
 1004|      0|        *mt = SSL3_MT_NEXT_PROTO;
  ------------------
  |  |  331|      0|#define SSL3_MT_NEXT_PROTO 67
  ------------------
 1005|      0|        break;
 1006|      0|#endif
 1007|  3.62k|    case TLS_ST_CW_FINISHED:
  ------------------
  |  Branch (1007:5): [True: 3.62k, False: 7.25k]
  ------------------
 1008|  3.62k|        *confunc = tls_construct_finished;
 1009|  3.62k|        *mt = SSL3_MT_FINISHED;
  ------------------
  |  |  324|  3.62k|#define SSL3_MT_FINISHED 20
  ------------------
 1010|  3.62k|        break;
 1011|       |
 1012|      0|    case TLS_ST_CW_KEY_UPDATE:
  ------------------
  |  Branch (1012:5): [True: 0, False: 10.8k]
  ------------------
 1013|      0|        *confunc = tls_construct_key_update;
 1014|      0|        *mt = SSL3_MT_KEY_UPDATE;
  ------------------
  |  |  328|      0|#define SSL3_MT_KEY_UPDATE 24
  ------------------
 1015|      0|        break;
 1016|  10.8k|    }
 1017|       |
 1018|  10.8k|    return 1;
 1019|  10.8k|}
ossl_statem_client_max_message_size:
 1026|  25.3k|{
 1027|  25.3k|    OSSL_STATEM *st = &s->statem;
 1028|       |
 1029|  25.3k|    switch (st->hand_state) {
 1030|      0|    default:
  ------------------
  |  Branch (1030:5): [True: 0, False: 25.3k]
  ------------------
 1031|       |        /* Shouldn't happen */
 1032|      0|        return 0;
 1033|       |
 1034|  3.62k|    case TLS_ST_CR_SRVR_HELLO:
  ------------------
  |  Branch (1034:5): [True: 3.62k, False: 21.6k]
  ------------------
 1035|  3.62k|        return SERVER_HELLO_MAX_LENGTH;
  ------------------
  |  |   32|  3.62k|#define SERVER_HELLO_MAX_LENGTH 65607
  ------------------
 1036|       |
 1037|      0|    case DTLS_ST_CR_HELLO_VERIFY_REQUEST:
  ------------------
  |  Branch (1037:5): [True: 0, False: 25.3k]
  ------------------
 1038|      0|        return HELLO_VERIFY_REQUEST_MAX_LENGTH;
  ------------------
  |  |   20|      0|#define HELLO_VERIFY_REQUEST_MAX_LENGTH 258
  ------------------
 1039|       |
 1040|      0|    case TLS_ST_CR_COMP_CERT:
  ------------------
  |  Branch (1040:5): [True: 0, False: 25.3k]
  ------------------
 1041|  3.62k|    case TLS_ST_CR_CERT:
  ------------------
  |  Branch (1041:5): [True: 3.62k, False: 21.6k]
  ------------------
 1042|  3.62k|        return s->max_cert_list;
 1043|       |
 1044|  3.62k|    case TLS_ST_CR_CERT_VRFY:
  ------------------
  |  Branch (1044:5): [True: 3.62k, False: 21.6k]
  ------------------
 1045|  3.62k|        return CERTIFICATE_VERIFY_MAX_LENGTH;
  ------------------
  |  |   35|  3.62k|#define CERTIFICATE_VERIFY_MAX_LENGTH 65539
  ------------------
 1046|       |
 1047|      0|    case TLS_ST_CR_CERT_STATUS:
  ------------------
  |  Branch (1047:5): [True: 0, False: 25.3k]
  ------------------
 1048|      0|        return SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|      0|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 1049|       |
 1050|      0|    case TLS_ST_CR_KEY_EXCH:
  ------------------
  |  Branch (1050:5): [True: 0, False: 25.3k]
  ------------------
 1051|      0|        return SERVER_KEY_EXCH_MAX_LENGTH;
  ------------------
  |  |   26|      0|#define SERVER_KEY_EXCH_MAX_LENGTH 102400
  ------------------
 1052|       |
 1053|      0|    case TLS_ST_CR_CERT_REQ:
  ------------------
  |  Branch (1053:5): [True: 0, False: 25.3k]
  ------------------
 1054|       |        /*
 1055|       |         * Set to s->max_cert_list for compatibility with previous releases. In
 1056|       |         * practice these messages can get quite long if servers are configured
 1057|       |         * to provide a long list of acceptable CAs
 1058|       |         */
 1059|      0|        return s->max_cert_list;
 1060|       |
 1061|      0|    case TLS_ST_CR_SRVR_DONE:
  ------------------
  |  Branch (1061:5): [True: 0, False: 25.3k]
  ------------------
 1062|      0|        return SERVER_HELLO_DONE_MAX_LENGTH;
  ------------------
  |  |   27|      0|#define SERVER_HELLO_DONE_MAX_LENGTH 0
  ------------------
 1063|       |
 1064|      0|    case TLS_ST_CR_CHANGE:
  ------------------
  |  Branch (1064:5): [True: 0, False: 25.3k]
  ------------------
 1065|      0|        if (s->version == DTLS1_BAD_VER)
  ------------------
  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (1065:13): [True: 0, False: 0]
  ------------------
 1066|      0|            return 3;
 1067|      0|        return CCS_MAX_LENGTH;
  ------------------
  |  |   29|      0|#define CCS_MAX_LENGTH 1
  ------------------
 1068|       |
 1069|  7.16k|    case TLS_ST_CR_SESSION_TICKET:
  ------------------
  |  Branch (1069:5): [True: 7.16k, False: 18.1k]
  ------------------
 1070|  7.16k|        return (SSL_CONNECTION_IS_TLS13(s)) ? SESSION_TICKET_MAX_LENGTH_TLS13
  ------------------
  |  |  273|  7.16k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.3k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.16k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  274|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.3k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  275|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.16k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.16k, False: 0]
  |  |  ------------------
  ------------------
                      return (SSL_CONNECTION_IS_TLS13(s)) ? SESSION_TICKET_MAX_LENGTH_TLS13
  ------------------
  |  |   24|  7.16k|#define SESSION_TICKET_MAX_LENGTH_TLS13 131338
  ------------------
 1071|  7.16k|                                            : SESSION_TICKET_MAX_LENGTH_TLS12;
  ------------------
  |  |   25|  7.16k|#define SESSION_TICKET_MAX_LENGTH_TLS12 65541
  ------------------
 1072|       |
 1073|  3.62k|    case TLS_ST_CR_FINISHED:
  ------------------
  |  Branch (1073:5): [True: 3.62k, False: 21.6k]
  ------------------
 1074|  3.62k|        return FINISHED_MAX_LENGTH;
  ------------------
  |  |   38|  3.62k|#define FINISHED_MAX_LENGTH 64
  ------------------
 1075|       |
 1076|  3.62k|    case TLS_ST_CR_ENCRYPTED_EXTENSIONS:
  ------------------
  |  Branch (1076:5): [True: 3.62k, False: 21.6k]
  ------------------
 1077|  3.62k|        return ENCRYPTED_EXTENSIONS_MAX_LENGTH;
  ------------------
  |  |   23|  3.62k|#define ENCRYPTED_EXTENSIONS_MAX_LENGTH 20000
  ------------------
 1078|       |
 1079|      0|    case TLS_ST_CR_KEY_UPDATE:
  ------------------
  |  Branch (1079:5): [True: 0, False: 25.3k]
  ------------------
 1080|      0|        return KEY_UPDATE_MAX_LENGTH;
  ------------------
  |  |   28|      0|#define KEY_UPDATE_MAX_LENGTH 1
  ------------------
 1081|  25.3k|    }
 1082|  25.3k|}
ossl_statem_client_process_message:
 1089|  25.3k|{
 1090|  25.3k|    OSSL_STATEM *st = &s->statem;
 1091|       |
 1092|  25.3k|    switch (st->hand_state) {
 1093|      0|    default:
  ------------------
  |  Branch (1093:5): [True: 0, False: 25.3k]
  ------------------
 1094|       |        /* Shouldn't happen */
 1095|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1096|      0|        return MSG_PROCESS_ERROR;
 1097|       |
 1098|  3.62k|    case TLS_ST_CR_SRVR_HELLO:
  ------------------
  |  Branch (1098:5): [True: 3.62k, False: 21.6k]
  ------------------
 1099|  3.62k|        return tls_process_server_hello(s, pkt);
 1100|       |
 1101|      0|    case DTLS_ST_CR_HELLO_VERIFY_REQUEST:
  ------------------
  |  Branch (1101:5): [True: 0, False: 25.3k]
  ------------------
 1102|      0|        return dtls_process_hello_verify(s, pkt);
 1103|       |
 1104|  3.62k|    case TLS_ST_CR_CERT:
  ------------------
  |  Branch (1104:5): [True: 3.62k, False: 21.6k]
  ------------------
 1105|  3.62k|        return tls_process_server_certificate(s, pkt);
 1106|       |
 1107|       |#ifndef OPENSSL_NO_COMP_ALG
 1108|       |    case TLS_ST_CR_COMP_CERT:
 1109|       |        return tls_process_server_compressed_certificate(s, pkt);
 1110|       |#endif
 1111|       |
 1112|  3.62k|    case TLS_ST_CR_CERT_VRFY:
  ------------------
  |  Branch (1112:5): [True: 3.62k, False: 21.6k]
  ------------------
 1113|  3.62k|        return tls_process_cert_verify(s, pkt);
 1114|       |
 1115|      0|    case TLS_ST_CR_CERT_STATUS:
  ------------------
  |  Branch (1115:5): [True: 0, False: 25.3k]
  ------------------
 1116|      0|        return tls_process_cert_status(s, pkt);
 1117|       |
 1118|      0|    case TLS_ST_CR_KEY_EXCH:
  ------------------
  |  Branch (1118:5): [True: 0, False: 25.3k]
  ------------------
 1119|      0|        return tls_process_key_exchange(s, pkt);
 1120|       |
 1121|      0|    case TLS_ST_CR_CERT_REQ:
  ------------------
  |  Branch (1121:5): [True: 0, False: 25.3k]
  ------------------
 1122|      0|        return tls_process_certificate_request(s, pkt);
 1123|       |
 1124|      0|    case TLS_ST_CR_SRVR_DONE:
  ------------------
  |  Branch (1124:5): [True: 0, False: 25.3k]
  ------------------
 1125|      0|        return tls_process_server_done(s, pkt);
 1126|       |
 1127|      0|    case TLS_ST_CR_CHANGE:
  ------------------
  |  Branch (1127:5): [True: 0, False: 25.3k]
  ------------------
 1128|      0|        return tls_process_change_cipher_spec(s, pkt);
 1129|       |
 1130|  7.16k|    case TLS_ST_CR_SESSION_TICKET:
  ------------------
  |  Branch (1130:5): [True: 7.16k, False: 18.1k]
  ------------------
 1131|  7.16k|        return tls_process_new_session_ticket(s, pkt);
 1132|       |
 1133|  3.62k|    case TLS_ST_CR_FINISHED:
  ------------------
  |  Branch (1133:5): [True: 3.62k, False: 21.6k]
  ------------------
 1134|  3.62k|        return tls_process_finished(s, pkt);
 1135|       |
 1136|      0|    case TLS_ST_CR_HELLO_REQ:
  ------------------
  |  Branch (1136:5): [True: 0, False: 25.3k]
  ------------------
 1137|      0|        return tls_process_hello_req(s, pkt);
 1138|       |
 1139|  3.62k|    case TLS_ST_CR_ENCRYPTED_EXTENSIONS:
  ------------------
  |  Branch (1139:5): [True: 3.62k, False: 21.6k]
  ------------------
 1140|  3.62k|        return tls_process_encrypted_extensions(s, pkt);
 1141|       |
 1142|      0|    case TLS_ST_CR_KEY_UPDATE:
  ------------------
  |  Branch (1142:5): [True: 0, False: 25.3k]
  ------------------
 1143|      0|        return tls_process_key_update(s, pkt);
 1144|  25.3k|    }
 1145|  25.3k|}
ossl_statem_client_post_process_message:
 1153|  3.62k|{
 1154|  3.62k|    OSSL_STATEM *st = &s->statem;
 1155|       |
 1156|  3.62k|    switch (st->hand_state) {
 1157|      0|    default:
  ------------------
  |  Branch (1157:5): [True: 0, False: 3.62k]
  ------------------
 1158|       |        /* Shouldn't happen */
 1159|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1160|      0|        return WORK_ERROR;
 1161|       |
 1162|  3.62k|    case TLS_ST_CR_CERT:
  ------------------
  |  Branch (1162:5): [True: 3.62k, False: 0]
  ------------------
 1163|  3.62k|    case TLS_ST_CR_COMP_CERT:
  ------------------
  |  Branch (1163:5): [True: 0, False: 3.62k]
  ------------------
 1164|  3.62k|        return tls_post_process_server_certificate(s, wst);
 1165|       |
 1166|      0|    case TLS_ST_CR_CERT_VRFY:
  ------------------
  |  Branch (1166:5): [True: 0, False: 3.62k]
  ------------------
 1167|      0|    case TLS_ST_CR_CERT_REQ:
  ------------------
  |  Branch (1167:5): [True: 0, False: 3.62k]
  ------------------
 1168|      0|        return tls_prepare_client_certificate(s, wst);
 1169|  3.62k|    }
 1170|  3.62k|}
tls_construct_client_hello:
 1214|  3.62k|{
 1215|  3.62k|    WPACKET inner; /* "fake" pkt for inner */
 1216|  3.62k|    BUF_MEM *inner_mem = NULL;
 1217|  3.62k|    PACKET rpkt; /* we'll decode back the inner ch to help make the outer */
 1218|  3.62k|    SSL_SESSION *sess = NULL;
 1219|  3.62k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1220|  3.62k|    size_t sess_id_len = 0, innerlen = 0;
 1221|  3.62k|    int mt = SSL3_MT_CLIENT_HELLO, rv = 0;
  ------------------
  |  |  313|  3.62k|#define SSL3_MT_CLIENT_HELLO 1
  ------------------
 1222|  3.62k|    OSSL_HPKE_SUITE suite;
 1223|  3.62k|    OSSL_ECHSTORE_ENTRY *ee = NULL;
 1224|       |    /* Work out what SSL/TLS/DTLS version to use */
 1225|  3.62k|    int protverr = ssl_set_client_hello_version(s);
 1226|       |
 1227|  3.62k|    if (protverr != 0) {
  ------------------
  |  Branch (1227:9): [True: 0, False: 3.62k]
  ------------------
 1228|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, protverr);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1229|      0|        return 0;
 1230|      0|    }
 1231|       |    /* If we're not really attempting ECH, just call existing code.  */
 1232|  3.62k|    if (s->ext.ech.es == NULL)
  ------------------
  |  Branch (1232:9): [True: 3.62k, False: 0]
  ------------------
 1233|  3.62k|        return tls_construct_client_hello_aux(s, pkt);
 1234|       |    /* note version we're attempting and that an attempt is being made */
 1235|      0|    if (s->ext.ech.es->entries != NULL) {
  ------------------
  |  Branch (1235:9): [True: 0, False: 0]
  ------------------
 1236|      0|        if (ossl_ech_pick_matching_cfg(s, &ee, &suite) != 1 || ee == NULL) {
  ------------------
  |  Branch (1236:13): [True: 0, False: 0]
  |  Branch (1236:64): [True: 0, False: 0]
  ------------------
 1237|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_UNSUPPORTED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1238|      0|            return 0;
 1239|      0|        }
 1240|      0|        if (ee->version != OSSL_ECH_RFC9849_VERSION) {
  ------------------
  |  |   45|      0|#define OSSL_ECH_RFC9849_VERSION 0xfe0d /* official ECHConfig version */
  ------------------
  |  Branch (1240:13): [True: 0, False: 0]
  ------------------
 1241|       |            /* we only support that version for now */
 1242|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_UNSUPPORTED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1243|      0|            return 0;
 1244|      0|        }
 1245|      0|        s->ext.ech.attempted_type = TLSEXT_TYPE_ech;
  ------------------
  |  |  174|      0|#define TLSEXT_TYPE_ech 0xfe0d
  ------------------
 1246|      0|        s->ext.ech.attempted_cid = ee->config_id;
 1247|      0|        s->ext.ech.attempted = 1;
 1248|      0|        if (s->ext.ech.outer_hostname == NULL && ee->public_name != NULL) {
  ------------------
  |  Branch (1248:13): [True: 0, False: 0]
  |  Branch (1248:50): [True: 0, False: 0]
  ------------------
 1249|      0|            s->ext.ech.outer_hostname = OPENSSL_strdup((char *)ee->public_name);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1250|      0|            if (s->ext.ech.outer_hostname == NULL) {
  ------------------
  |  Branch (1250:17): [True: 0, False: 0]
  ------------------
 1251|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1252|      0|                return 0;
 1253|      0|            }
 1254|      0|        }
 1255|      0|    }
 1256|       |    /* If doing real ECH and application requested GREASE too, over-ride that */
 1257|      0|    if (s->ext.ech.grease == OSSL_ECH_IS_GREASE && s->ext.ech.attempted == 1)
  ------------------
  |  |   37|      0|#define OSSL_ECH_IS_GREASE 1 /* when decryption failed or GREASE wanted */
  ------------------
  |  Branch (1257:9): [True: 0, False: 0]
  |  Branch (1257:52): [True: 0, False: 0]
  ------------------
 1258|      0|        s->ext.ech.grease = OSSL_ECH_NOT_GREASE;
  ------------------
  |  |   36|      0|#define OSSL_ECH_NOT_GREASE 0 /* when decryption worked */
  ------------------
 1259|       |    /*
 1260|       |     * Session ID is handled "oddly" by not being encoded into inner CH (an
 1261|       |     * optimisation) so is the same for both inner and outer.
 1262|       |     */
 1263|      0|    sess = s->session;
 1264|      0|    if (sess == NULL
  ------------------
  |  Branch (1264:9): [True: 0, False: 0]
  ------------------
 1265|      0|        || !ssl_version_supported(s, sess->ssl_version, NULL)
  ------------------
  |  Branch (1265:12): [True: 0, False: 0]
  ------------------
 1266|      0|        || !SSL_SESSION_is_resumable(sess)) {
  ------------------
  |  Branch (1266:12): [True: 0, False: 0]
  ------------------
 1267|      0|        if (s->hello_retry_request == SSL_HRR_NONE
  ------------------
  |  Branch (1267:13): [True: 0, False: 0]
  ------------------
 1268|      0|            && !ssl_get_new_session(s, 0))
  ------------------
  |  Branch (1268:16): [True: 0, False: 0]
  ------------------
 1269|      0|            return 0; /* SSLfatal() already called */
 1270|      0|    }
 1271|      0|    if (s->new_session || s->session->ssl_version == TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1271:9): [True: 0, False: 0]
  |  Branch (1271:27): [True: 0, False: 0]
  ------------------
 1272|      0|        if (s->version == TLS1_3_VERSION
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1272:13): [True: 0, False: 0]
  ------------------
 1273|      0|            && (s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0) {
  ------------------
  |  |  404|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1273:16): [True: 0, False: 0]
  ------------------
 1274|      0|            sess_id_len = sizeof(s->tmp_session_id);
 1275|      0|            s->tmp_session_id_len = sess_id_len;
 1276|      0|            if (s->hello_retry_request == SSL_HRR_NONE
  ------------------
  |  Branch (1276:17): [True: 0, False: 0]
  ------------------
 1277|      0|                && RAND_bytes_ex(sctx->libctx, s->tmp_session_id,
  ------------------
  |  Branch (1277:20): [True: 0, False: 0]
  ------------------
 1278|      0|                       sess_id_len, 0)
 1279|      0|                    <= 0) {
 1280|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1281|      0|                return 0;
 1282|      0|            }
 1283|      0|            memcpy(s->session->session_id, s->tmp_session_id, sess_id_len);
 1284|      0|            s->session->session_id_length = sess_id_len;
 1285|      0|        } else {
 1286|      0|            sess_id_len = 0;
 1287|      0|        }
 1288|      0|    } else {
 1289|      0|        assert(s->session->session_id_length <= sizeof(s->session->session_id));
  ------------------
  |  Branch (1289:9): [True: 0, False: 0]
  |  Branch (1289:9): [True: 0, False: 0]
  ------------------
 1290|      0|        sess_id_len = s->session->session_id_length;
 1291|      0|        if (s->version == TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1291:13): [True: 0, False: 0]
  ------------------
 1292|      0|            s->tmp_session_id_len = sess_id_len;
 1293|      0|            memcpy(s->tmp_session_id, s->session->session_id, sess_id_len);
 1294|      0|        }
 1295|      0|    }
 1296|      0|    if (s->hello_retry_request != SSL_HRR_NONE)
  ------------------
  |  Branch (1296:9): [True: 0, False: 0]
  ------------------
 1297|      0|        s->ext.ech.n_outer_only = 0; /* reset count of "compressed" exts */
 1298|       |    /*
 1299|       |     * Set CH depth flag so that other code (e.g. extension handlers)
 1300|       |     * know where we're at: 1 is "inner CH", 0 is "outer CH"
 1301|       |     */
 1302|      0|    s->ext.ech.ch_depth = 1;
 1303|      0|    if ((inner_mem = BUF_MEM_new()) == NULL
  ------------------
  |  Branch (1303:9): [True: 0, False: 0]
  ------------------
 1304|      0|        || !WPACKET_init(&inner, inner_mem)
  ------------------
  |  Branch (1304:12): [True: 0, False: 0]
  ------------------
 1305|      0|        || !ssl_set_handshake_header(s, &inner, mt)
  ------------------
  |  | 2184|      0|    SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->set_handshake_header((s), (pkt), (htype))
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  ------------------
  |  Branch (1305:12): [True: 0, False: 0]
  ------------------
 1306|      0|        || tls_construct_client_hello_aux(s, &inner) != 1
  ------------------
  |  Branch (1306:12): [True: 0, False: 0]
  ------------------
 1307|      0|        || !WPACKET_close(&inner)
  ------------------
  |  Branch (1307:12): [True: 0, False: 0]
  ------------------
 1308|      0|        || !WPACKET_get_length(&inner, &innerlen)) {
  ------------------
  |  Branch (1308:12): [True: 0, False: 0]
  ------------------
 1309|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1310|      0|        goto err;
 1311|      0|    }
 1312|      0|    OPENSSL_free(s->ext.ech.innerch);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1313|      0|    s->ext.ech.innerch = (unsigned char *)inner_mem->data;
 1314|      0|    inner_mem->data = NULL;
 1315|      0|    s->ext.ech.innerch_len = innerlen;
 1316|       |    /* add inner to transcript */
 1317|      0|    if (ossl_ech_intbuf_add(s, s->ext.ech.innerch, innerlen, 0) != 1) {
  ------------------
  |  Branch (1317:9): [True: 0, False: 0]
  ------------------
 1318|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1319|      0|        goto err;
 1320|      0|    }
 1321|      0|    WPACKET_cleanup(&inner);
 1322|      0|    BUF_MEM_free(inner_mem);
 1323|      0|    inner_mem = NULL;
 1324|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 1325|      0|    ossl_ech_pbuf("inner CH", s->ext.ech.innerch, s->ext.ech.innerch_len);
 1326|      0|    ossl_ech_pbuf("inner, client_random", s->ext.ech.client_random,
 1327|      0|        SSL3_RANDOM_SIZE);
  ------------------
  |  |  137|      0|#define SSL3_RANDOM_SIZE 32
  ------------------
 1328|      0|    ossl_ech_pbuf("inner, session_id", s->session->session_id,
 1329|      0|        s->session->session_id_length);
 1330|      0|#endif
 1331|       |    /* Decode inner so that we can make up encoded inner */
 1332|      0|    if (!PACKET_buf_init(&rpkt, (unsigned char *)s->ext.ech.innerch + 4,
  ------------------
  |  Branch (1332:9): [True: 0, False: 0]
  ------------------
 1333|      0|            s->ext.ech.innerch_len - 4)) {
 1334|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1335|      0|        goto err;
 1336|      0|    }
 1337|       |    /*
 1338|       |     * Parse the full inner CH (usually done on server). This gets us
 1339|       |     * individually encoded extensions so we can choose to compress
 1340|       |     * and/or to re-use the same value in outer.
 1341|       |     */
 1342|      0|    if (!tls_process_client_hello(s, &rpkt)) {
  ------------------
  |  Branch (1342:9): [True: 0, False: 0]
  ------------------
 1343|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1344|      0|        goto err;
 1345|      0|    }
 1346|       |
 1347|      0|    s->ext.ech.ch_depth = 0; /* set depth for outer CH */
 1348|       |    /*
 1349|       |     * If we want different key shares for inner and outer, then
 1350|       |     * zap the one for the inner. The inner key_share is stashed
 1351|       |     * in s.ext.ech.tmp_pkey already.
 1352|       |     */
 1353|      0|    if (ossl_ech_same_key_share() == 0) {
  ------------------
  |  Branch (1353:9): [True: 0, False: 0]
  ------------------
 1354|      0|        EVP_PKEY_free(s->s3.tmp.pkey);
 1355|      0|        s->s3.tmp.pkey = NULL;
 1356|      0|    }
 1357|       |    /* Make second call into CH construction for outer CH. */
 1358|      0|    rv = tls_construct_client_hello_aux(s, pkt);
 1359|      0|    if (rv != 1) {
  ------------------
  |  Branch (1359:9): [True: 0, False: 0]
  ------------------
 1360|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1361|      0|        goto err;
 1362|      0|    }
 1363|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 1364|      0|    ossl_ech_pbuf("outer, client_random", s->s3.client_random,
 1365|      0|        SSL3_RANDOM_SIZE);
  ------------------
  |  |  137|      0|#define SSL3_RANDOM_SIZE 32
  ------------------
 1366|      0|    ossl_ech_pbuf("outer, session_id", s->session->session_id,
 1367|      0|        s->session->session_id_length);
 1368|      0|#endif
 1369|       |    /* Finally, calculate AAD and encrypt using HPKE */
 1370|      0|    if (ossl_ech_aad_and_encrypt(s, pkt) != 1) {
  ------------------
  |  Branch (1370:9): [True: 0, False: 0]
  ------------------
 1371|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1372|      0|        goto err;
 1373|      0|    }
 1374|       |    /* Free up raw exts as needed (happens like this on real server) */
 1375|      0|    if (s->clienthello != NULL
  ------------------
  |  Branch (1375:9): [True: 0, False: 0]
  ------------------
 1376|      0|        && s->clienthello->pre_proc_exts != NULL) {
  ------------------
  |  Branch (1376:12): [True: 0, False: 0]
  ------------------
 1377|      0|        OPENSSL_free(s->clienthello->pre_proc_exts);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1378|      0|        OPENSSL_free(s->clienthello);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1379|      0|        s->clienthello = NULL;
 1380|      0|    }
 1381|      0|    return 1;
 1382|      0|err:
 1383|      0|    if (inner_mem != NULL) {
  ------------------
  |  Branch (1383:9): [True: 0, False: 0]
  ------------------
 1384|      0|        WPACKET_cleanup(&inner);
 1385|      0|        BUF_MEM_free(inner_mem);
 1386|      0|    }
 1387|      0|    if (s->clienthello != NULL) {
  ------------------
  |  Branch (1387:9): [True: 0, False: 0]
  ------------------
 1388|      0|        OPENSSL_free(s->clienthello->pre_proc_exts);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1389|      0|        OPENSSL_free(s->clienthello);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1390|       |        s->clienthello = NULL;
 1391|      0|    }
 1392|      0|    return 0;
 1393|      0|}
tls_process_server_hello:
 1717|  3.62k|{
 1718|  3.62k|    PACKET session_id, extpkt;
 1719|  3.62k|    size_t session_id_len;
 1720|  3.62k|    const unsigned char *cipherchars;
 1721|  3.62k|    int hrr = 0;
 1722|  3.62k|    unsigned int compression;
 1723|  3.62k|    unsigned int sversion;
 1724|  3.62k|    unsigned int context;
 1725|  3.62k|    RAW_EXTENSION *extensions = NULL;
 1726|  3.62k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1727|  3.62k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  3.62k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1728|  3.62k|#ifndef OPENSSL_NO_COMP
 1729|  3.62k|    SSL_COMP *comp;
 1730|  3.62k|#endif
 1731|  3.62k|#ifndef OPENSSL_NO_ECH
 1732|  3.62k|    const unsigned char *shbuf = NULL;
 1733|  3.62k|    size_t shlen, alen;
 1734|       |    /*
 1735|       |     * client and server accept signal buffers, initialise in case of
 1736|       |     * e.g. memory fail when calculating, only really applies when
 1737|       |     * SUPERVERBOSE is defined and we trace these.
 1738|       |     */
 1739|  3.62k|    unsigned char c_signal[OSSL_ECH_SIGNAL_LEN] = { 0 };
 1740|  3.62k|    unsigned char s_signal[OSSL_ECH_SIGNAL_LEN] = { 0xff };
 1741|  3.62k|    unsigned char *abuf = NULL;
 1742|       |
 1743|  3.62k|    shlen = PACKET_remaining(pkt);
 1744|  3.62k|    if (PACKET_peek_bytes(pkt, &shbuf, shlen) != 1) {
  ------------------
  |  Branch (1744:9): [True: 0, False: 3.62k]
  ------------------
 1745|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1746|      0|        goto err;
 1747|      0|    }
 1748|  3.62k|#endif
 1749|       |
 1750|  3.62k|    if (!PACKET_get_net_2(pkt, &sversion)) {
  ------------------
  |  Branch (1750:9): [True: 0, False: 3.62k]
  ------------------
 1751|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1752|      0|        goto err;
 1753|      0|    }
 1754|       |
 1755|       |    /* load the server random */
 1756|  3.62k|    if (s->version == TLS1_3_VERSION
  ------------------
  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1756:9): [True: 3.62k, False: 0]
  ------------------
 1757|  3.62k|        && sversion == TLS1_2_VERSION
  ------------------
  |  |   26|  7.25k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (1757:12): [True: 3.62k, False: 0]
  ------------------
 1758|  3.62k|        && PACKET_remaining(pkt) >= SSL3_RANDOM_SIZE
  ------------------
  |  |  137|  7.25k|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1758:12): [True: 3.62k, False: 0]
  ------------------
 1759|  3.62k|        && memcmp(hrrrandom, PACKET_data(pkt), SSL3_RANDOM_SIZE) == 0) {
  ------------------
  |  |  137|  3.62k|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1759:12): [True: 0, False: 3.62k]
  ------------------
 1760|      0|        if (s->hello_retry_request != SSL_HRR_NONE) {
  ------------------
  |  Branch (1760:13): [True: 0, False: 0]
  ------------------
 1761|      0|            SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_UNEXPECTED_MESSAGE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1762|      0|            goto err;
 1763|      0|        }
 1764|      0|        s->hello_retry_request = SSL_HRR_PENDING;
 1765|       |        /* Tell the record layer that we know we're going to get TLSv1.3 */
 1766|      0|        if (!ssl_set_record_protocol_version(s, s->version)) {
  ------------------
  |  Branch (1766:13): [True: 0, False: 0]
  ------------------
 1767|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1768|      0|            goto err;
 1769|      0|        }
 1770|      0|        hrr = 1;
 1771|      0|        if (!PACKET_forward(pkt, SSL3_RANDOM_SIZE)) {
  ------------------
  |  |  137|      0|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1771:13): [True: 0, False: 0]
  ------------------
 1772|      0|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1773|      0|            goto err;
 1774|      0|        }
 1775|  3.62k|    } else {
 1776|  3.62k|        if (!PACKET_copy_bytes(pkt, s->s3.server_random, SSL3_RANDOM_SIZE)) {
  ------------------
  |  |  137|  3.62k|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1776:13): [True: 0, False: 3.62k]
  ------------------
 1777|      0|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1778|      0|            goto err;
 1779|      0|        }
 1780|  3.62k|    }
 1781|       |
 1782|       |    /* Get the session-id. */
 1783|  3.62k|    if (!PACKET_get_length_prefixed_1(pkt, &session_id)) {
  ------------------
  |  Branch (1783:9): [True: 0, False: 3.62k]
  ------------------
 1784|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1785|      0|        goto err;
 1786|      0|    }
 1787|  3.62k|    session_id_len = PACKET_remaining(&session_id);
 1788|  3.62k|    if (session_id_len > sizeof(s->session->session_id)
  ------------------
  |  Branch (1788:9): [True: 0, False: 3.62k]
  ------------------
 1789|  3.62k|        || session_id_len > SSL3_SESSION_ID_SIZE) {
  ------------------
  |  |  138|  3.62k|#define SSL3_SESSION_ID_SIZE 32
  ------------------
  |  Branch (1789:12): [True: 0, False: 3.62k]
  ------------------
 1790|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_TLS_SESSION_ID_TOO_LONG);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1791|      0|        goto err;
 1792|      0|    }
 1793|       |
 1794|  3.62k|    if (!PACKET_get_bytes(pkt, &cipherchars, TLS_CIPHER_LEN)) {
  ------------------
  |  |  389|  3.62k|#define TLS_CIPHER_LEN 2
  ------------------
  |  Branch (1794:9): [True: 0, False: 3.62k]
  ------------------
 1795|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1796|      0|        goto err;
 1797|      0|    }
 1798|       |
 1799|  3.62k|    if (!PACKET_get_1(pkt, &compression)) {
  ------------------
  |  Branch (1799:9): [True: 0, False: 3.62k]
  ------------------
 1800|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1801|      0|        goto err;
 1802|      0|    }
 1803|       |
 1804|       |    /* TLS extensions */
 1805|  3.62k|    if (PACKET_remaining(pkt) == 0 && !hrr) {
  ------------------
  |  Branch (1805:9): [True: 0, False: 3.62k]
  |  Branch (1805:39): [True: 0, False: 0]
  ------------------
 1806|      0|        PACKET_null_init(&extpkt);
 1807|  3.62k|    } else if (!PACKET_as_length_prefixed_2(pkt, &extpkt)
  ------------------
  |  Branch (1807:16): [True: 0, False: 3.62k]
  ------------------
 1808|  3.62k|        || PACKET_remaining(pkt) != 0) {
  ------------------
  |  Branch (1808:12): [True: 0, False: 3.62k]
  ------------------
 1809|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_LENGTH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1810|      0|        goto err;
 1811|      0|    }
 1812|       |
 1813|  3.62k|    if (hrr) {
  ------------------
  |  Branch (1813:9): [True: 0, False: 3.62k]
  ------------------
 1814|      0|        if (!tls_collect_extensions(s, &extpkt, SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST,
  ------------------
  |  |  305|      0|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
  |  Branch (1814:13): [True: 0, False: 0]
  ------------------
 1815|      0|                &extensions, NULL, 1)
 1816|      0|            || !tls_parse_extension(s, TLSEXT_IDX_ech,
  ------------------
  |  Branch (1816:16): [True: 0, False: 0]
  ------------------
 1817|      0|                SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST,
  ------------------
  |  |  305|      0|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
 1818|      0|                extensions, NULL, 0)) {
 1819|       |            /* SSLfatal() already called */
 1820|      0|            goto err;
 1821|      0|        }
 1822|  3.62k|    } else {
 1823|  3.62k|        if (!tls_collect_extensions(s, &extpkt,
  ------------------
  |  Branch (1823:13): [True: 0, False: 3.62k]
  ------------------
 1824|  3.62k|                SSL_EXT_TLS1_2_SERVER_HELLO
  ------------------
  |  |  302|  3.62k|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
 1825|  3.62k|                    | SSL_EXT_TLS1_3_SERVER_HELLO,
  ------------------
  |  |  303|  3.62k|#define SSL_EXT_TLS1_3_SERVER_HELLO 0x00200
  ------------------
 1826|  3.62k|                &extensions, NULL, 1)) {
 1827|       |            /* SSLfatal() already called */
 1828|      0|            goto err;
 1829|      0|        }
 1830|  3.62k|    }
 1831|       |
 1832|  3.62k|#ifndef OPENSSL_NO_ECH
 1833|       |    /*
 1834|       |     * If we sent an ECH then check if that worked based on the
 1835|       |     * ServerHello.random confirmation trick. If that is good
 1836|       |     * then we'll swap over the inner and outer contexts and
 1837|       |     * proceed with inner. There are some HRR wrinkles too
 1838|       |     * though.
 1839|       |     */
 1840|  3.62k|    if (s->ext.ech.es != NULL
  ------------------
  |  Branch (1840:9): [True: 0, False: 3.62k]
  ------------------
 1841|      0|        && s->ext.ech.done != 1 && s->ext.ech.ch_depth == 0
  ------------------
  |  Branch (1841:12): [True: 0, False: 0]
  |  Branch (1841:36): [True: 0, False: 0]
  ------------------
 1842|      0|        && s->ext.ech.grease == OSSL_ECH_NOT_GREASE
  ------------------
  |  |   36|  3.62k|#define OSSL_ECH_NOT_GREASE 0 /* when decryption worked */
  ------------------
  |  Branch (1842:12): [True: 0, False: 0]
  ------------------
 1843|      0|        && s->ext.ech.attempted_type == TLSEXT_TYPE_ech) {
  ------------------
  |  |  174|      0|#define TLSEXT_TYPE_ech 0xfe0d
  ------------------
  |  Branch (1843:12): [True: 0, False: 0]
  ------------------
 1844|      0|        if (!set_client_ciphersuite(s, cipherchars)) {
  ------------------
  |  Branch (1844:13): [True: 0, False: 0]
  ------------------
 1845|       |            /* SSLfatal() already called */
 1846|      0|            goto err;
 1847|      0|        }
 1848|       |        /* add any SH/HRR to inner transcript if we tried ECH */
 1849|      0|        if (s->ext.ech.attempted == 1) {
  ------------------
  |  Branch (1849:13): [True: 0, False: 0]
  ------------------
 1850|      0|            unsigned char prelude[4];
 1851|       |
 1852|      0|            prelude[0] = SSL3_MT_SERVER_HELLO;
  ------------------
  |  |  314|      0|#define SSL3_MT_SERVER_HELLO 2
  ------------------
 1853|      0|            prelude[1] = (shlen >> 16) & 0xff;
 1854|      0|            prelude[2] = (shlen >> 8) & 0xff;
 1855|      0|            prelude[3] = shlen & 0xff;
 1856|      0|            if (ossl_ech_intbuf_add(s, prelude, sizeof(prelude), hrr) != 1
  ------------------
  |  Branch (1856:17): [True: 0, False: 0]
  ------------------
 1857|      0|                || ossl_ech_intbuf_add(s, shbuf, shlen, 0) != 1) {
  ------------------
  |  Branch (1857:20): [True: 0, False: 0]
  ------------------
 1858|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1859|      0|                goto err;
 1860|      0|            }
 1861|      0|        }
 1862|       |        /* check the ECH accept signal */
 1863|      0|        if (ossl_ech_calc_confirm(s, hrr, c_signal, shlen) != 1) {
  ------------------
  |  Branch (1863:13): [True: 0, False: 0]
  ------------------
 1864|       |            /* SSLfatal() already called */
 1865|      0|            OSSL_TRACE(TLS, "ECH calc confirm failed\n");
  ------------------
  |  |  288|      0|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
 1866|      0|            goto err;
 1867|      0|        }
 1868|      0|        if (ossl_ech_find_confirm(s, hrr, s_signal) != 1
  ------------------
  |  Branch (1868:13): [True: 0, False: 0]
  ------------------
 1869|      0|            || memcmp(s_signal, c_signal, sizeof(c_signal)) != 0) {
  ------------------
  |  Branch (1869:16): [True: 0, False: 0]
  ------------------
 1870|      0|            OSSL_TRACE(TLS, "ECH accept check failed\n");
  ------------------
  |  |  288|      0|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
 1871|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 1872|      0|            ossl_ech_pbuf("ECH client accept val:", c_signal, sizeof(c_signal));
 1873|      0|            ossl_ech_pbuf("ECH server accept val:", s_signal, sizeof(s_signal));
 1874|      0|#endif
 1875|      0|            s->ext.ech.success = 0;
 1876|      0|        } else { /* match, ECH worked */
 1877|      0|            OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1878|      0|            {
 1879|      0|                BIO_printf(trc_out, "ECH accept check ok\n");
 1880|      0|                BIO_printf(trc_out, "ECH set session hostname to %s\n",
 1881|      0|                    s->ext.hostname ? s->ext.hostname : "NULL");
  ------------------
  |  Branch (1881:21): [True: 0, False: 0]
  ------------------
 1882|      0|            }
 1883|      0|            OSSL_TRACE_END(TLS);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1884|      0|            s->ext.ech.success = 1;
 1885|      0|        }
 1886|      0|        if (!hrr && s->ext.ech.success == 1) {
  ------------------
  |  Branch (1886:13): [True: 0, False: 0]
  |  Branch (1886:21): [True: 0, False: 0]
  ------------------
 1887|      0|            if (ossl_ech_swaperoo(s) != 1
  ------------------
  |  Branch (1887:17): [True: 0, False: 0]
  ------------------
 1888|      0|                || ossl_ech_intbuf_fetch(s, &abuf, &alen) != 1
  ------------------
  |  Branch (1888:20): [True: 0, False: 0]
  ------------------
 1889|      0|                || ossl_ech_reset_hs_buffer(s, abuf, alen) != 1) {
  ------------------
  |  Branch (1889:20): [True: 0, False: 0]
  ------------------
 1890|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1891|      0|                goto err;
 1892|      0|            }
 1893|      0|        } else if (hrr == 1 && s->ext.ech.success == 1) {
  ------------------
  |  Branch (1893:20): [True: 0, False: 0]
  |  Branch (1893:32): [True: 0, False: 0]
  ------------------
 1894|      0|            OSSL_TRACE(TLS, "ECH HRR accept ok, continuing.\n");
  ------------------
  |  |  288|      0|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
 1895|       |            /*
 1896|       |             * If we got retry_configs then we should be validating
 1897|       |             * the outer CH, so we better set the hostname for the
 1898|       |             * connection accordingly.
 1899|       |             */
 1900|      0|        } else if (!hrr && s->ext.ech.success == 0
  ------------------
  |  Branch (1900:20): [True: 0, False: 0]
  |  Branch (1900:28): [True: 0, False: 0]
  ------------------
 1901|      0|            && s->ext.ech.hrrsignal_p != NULL) {
  ------------------
  |  Branch (1901:16): [True: 0, False: 0]
  ------------------
 1902|       |            /*
 1903|       |             * we previously saw a good HRR ECH acceptance but now
 1904|       |             * the SH.random ECH acceptance signal is bad so that's an
 1905|       |             * illegal protocol error
 1906|       |             */
 1907|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_ECH_REQUIRED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1908|      0|            goto err;
 1909|      0|        } else {
 1910|      0|            OSSL_TRACE1(TLS, "ECH falling back to public_name: %s\n",
  ------------------
  |  |  291|      0|    OSSL_TRACEV(category, (trc_out, format, arg1))
  |  |  ------------------
  |  |  |  |  283|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
 1911|      0|                s->ext.ech.outer_hostname != NULL ? s->ext.ech.outer_hostname : "NONE");
 1912|      0|            s->ext.ech.former_inner = s->ext.hostname;
 1913|      0|            s->ext.hostname = NULL;
 1914|      0|            if (s->ext.ech.outer_hostname != NULL) {
  ------------------
  |  Branch (1914:17): [True: 0, False: 0]
  ------------------
 1915|      0|                s->ext.hostname = OPENSSL_strdup(s->ext.ech.outer_hostname);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1916|      0|                if (s->ext.hostname == NULL) {
  ------------------
  |  Branch (1916:21): [True: 0, False: 0]
  ------------------
 1917|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1918|      0|                    goto err;
 1919|      0|                }
 1920|      0|                if (SSL_set1_dnsname(ssl, s->ext.ech.outer_hostname) != 1) {
  ------------------
  |  Branch (1920:21): [True: 0, False: 0]
  ------------------
 1921|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1922|      0|                    goto err;
 1923|      0|                }
 1924|      0|            }
 1925|      0|        }
 1926|      0|    }
 1927|  3.62k|#endif
 1928|       |
 1929|  3.62k|    if (!hrr) {
  ------------------
  |  Branch (1929:9): [True: 3.62k, False: 0]
  ------------------
 1930|  3.62k|        if (!ssl_choose_client_version(s, sversion, extensions)) {
  ------------------
  |  Branch (1930:13): [True: 0, False: 3.62k]
  ------------------
 1931|       |            /* SSLfatal() already called */
 1932|      0|            goto err;
 1933|      0|        }
 1934|  3.62k|    }
 1935|       |
 1936|  3.62k|    if (SSL_CONNECTION_IS_TLS13(s) || hrr) {
  ------------------
  |  |  273|  7.25k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1936:39): [True: 0, False: 0]
  ------------------
 1937|  3.62k|        if (compression != 0) {
  ------------------
  |  Branch (1937:13): [True: 0, False: 3.62k]
  ------------------
 1938|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1939|      0|                SSL_R_INVALID_COMPRESSION_ALGORITHM);
 1940|      0|            goto err;
 1941|      0|        }
 1942|       |
 1943|  3.62k|        if (session_id_len != s->tmp_session_id_len
  ------------------
  |  Branch (1943:13): [True: 0, False: 3.62k]
  ------------------
 1944|  3.62k|            || memcmp(PACKET_data(&session_id), s->tmp_session_id,
  ------------------
  |  Branch (1944:16): [True: 0, False: 3.62k]
  ------------------
 1945|  3.62k|                   session_id_len)
 1946|  3.62k|                != 0) {
 1947|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_INVALID_SESSION_ID);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1948|      0|            goto err;
 1949|      0|        }
 1950|  3.62k|    }
 1951|       |
 1952|  3.62k|    if (hrr) {
  ------------------
  |  Branch (1952:9): [True: 0, False: 3.62k]
  ------------------
 1953|      0|        int ret;
 1954|       |
 1955|      0|        if (!set_client_ciphersuite(s, cipherchars)) {
  ------------------
  |  Branch (1955:13): [True: 0, False: 0]
  ------------------
 1956|       |            /* SSLfatal() already called */
 1957|      0|            goto err;
 1958|      0|        }
 1959|       |
 1960|      0|        ret = tls_process_as_hello_retry_request(s, extensions);
 1961|      0|        OPENSSL_free(extensions);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1962|       |
 1963|      0|        return ret;
 1964|      0|    }
 1965|       |
 1966|       |    /*
 1967|       |     * Now we have chosen the version we need to check again that the extensions
 1968|       |     * are appropriate for this version.
 1969|       |     */
 1970|  3.62k|    context = SSL_CONNECTION_IS_TLS13(s) ? SSL_EXT_TLS1_3_SERVER_HELLO
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
                  context = SSL_CONNECTION_IS_TLS13(s) ? SSL_EXT_TLS1_3_SERVER_HELLO
  ------------------
  |  |  303|  3.62k|#define SSL_EXT_TLS1_3_SERVER_HELLO 0x00200
  ------------------
 1971|  3.62k|                                         : SSL_EXT_TLS1_2_SERVER_HELLO;
  ------------------
  |  |  302|  3.62k|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
 1972|  3.62k|    if (!tls_validate_all_contexts(s, context, extensions)) {
  ------------------
  |  Branch (1972:9): [True: 0, False: 3.62k]
  ------------------
 1973|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1974|      0|        goto err;
 1975|      0|    }
 1976|       |
 1977|  3.62k|    s->hit = 0;
 1978|       |
 1979|  3.62k|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 1980|       |        /*
 1981|       |         * In TLSv1.3 a ServerHello message signals a key change so the end of
 1982|       |         * the message must be on a record boundary.
 1983|       |         */
 1984|  3.62k|        if (RECORD_LAYER_processed_read_pending(&s->rlayer)) {
  ------------------
  |  Branch (1984:13): [True: 0, False: 3.62k]
  ------------------
 1985|      0|            SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1986|      0|                SSL_R_NOT_ON_RECORD_BOUNDARY);
 1987|      0|            goto err;
 1988|      0|        }
 1989|       |
 1990|       |        /* This will set s->hit if we are resuming */
 1991|  3.62k|        if (!tls_parse_extension(s, TLSEXT_IDX_psk,
  ------------------
  |  Branch (1991:13): [True: 0, False: 3.62k]
  ------------------
 1992|  3.62k|                SSL_EXT_TLS1_3_SERVER_HELLO,
  ------------------
  |  |  303|  3.62k|#define SSL_EXT_TLS1_3_SERVER_HELLO 0x00200
  ------------------
 1993|  3.62k|                extensions, NULL, 0)) {
 1994|       |            /* SSLfatal() already called */
 1995|      0|            goto err;
 1996|      0|        }
 1997|  3.62k|    } else {
 1998|       |        /*
 1999|       |         * Check if we can resume the session based on external pre-shared
 2000|       |         * secret. EAP-FAST (RFC 4851) supports two types of session resumption.
 2001|       |         * Resumption based on server-side state works with session IDs.
 2002|       |         * Resumption based on pre-shared Protected Access Credentials (PACs)
 2003|       |         * works by overriding the SessionTicket extension at the application
 2004|       |         * layer, and does not send a session ID. (We do not know whether
 2005|       |         * EAP-FAST servers would honour the session ID.) Therefore, the session
 2006|       |         * ID alone is not a reliable indicator of session resumption, so we
 2007|       |         * first check if we can resume, and later peek at the next handshake
 2008|       |         * message to see if the server wants to resume.
 2009|       |         */
 2010|      0|        if (s->version >= TLS1_VERSION
  ------------------
  |  |   24|      0|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (2010:13): [True: 0, False: 0]
  ------------------
 2011|      0|            && s->ext.session_secret_cb != NULL && s->session->ext.tick) {
  ------------------
  |  Branch (2011:16): [True: 0, False: 0]
  |  Branch (2011:52): [True: 0, False: 0]
  ------------------
 2012|      0|            const SSL_CIPHER *pref_cipher = NULL;
 2013|       |            /*
 2014|       |             * s->session->master_key_length is a size_t, but this is an int for
 2015|       |             * backwards compat reasons
 2016|       |             */
 2017|      0|            int master_key_length;
 2018|       |
 2019|      0|            master_key_length = sizeof(s->session->master_key);
 2020|      0|            if (s->ext.session_secret_cb(ussl, s->session->master_key,
  ------------------
  |  Branch (2020:17): [True: 0, False: 0]
  ------------------
 2021|      0|                    &master_key_length,
 2022|      0|                    NULL, &pref_cipher,
 2023|      0|                    s->ext.session_secret_cb_arg)
 2024|      0|                && master_key_length > 0) {
  ------------------
  |  Branch (2024:20): [True: 0, False: 0]
  ------------------
 2025|      0|                s->session->master_key_length = master_key_length;
 2026|      0|                s->session->cipher = pref_cipher ? pref_cipher : ssl_get_cipher_by_char(s, cipherchars, 0);
  ------------------
  |  Branch (2026:38): [True: 0, False: 0]
  ------------------
 2027|      0|            } else {
 2028|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2029|      0|                goto err;
 2030|      0|            }
 2031|      0|        }
 2032|       |
 2033|      0|        if (session_id_len != 0
  ------------------
  |  Branch (2033:13): [True: 0, False: 0]
  ------------------
 2034|      0|            && session_id_len == s->session->session_id_length
  ------------------
  |  Branch (2034:16): [True: 0, False: 0]
  ------------------
 2035|      0|            && memcmp(PACKET_data(&session_id), s->session->session_id,
  ------------------
  |  Branch (2035:16): [True: 0, False: 0]
  ------------------
 2036|      0|                   session_id_len)
 2037|      0|                == 0)
 2038|      0|            s->hit = 1;
 2039|      0|    }
 2040|       |
 2041|  3.62k|    if (s->hit) {
  ------------------
  |  Branch (2041:9): [True: 0, False: 3.62k]
  ------------------
 2042|      0|        if (s->sid_ctx_length != s->session->sid_ctx_length
  ------------------
  |  Branch (2042:13): [True: 0, False: 0]
  ------------------
 2043|      0|            || memcmp(s->session->sid_ctx, s->sid_ctx, s->sid_ctx_length)) {
  ------------------
  |  Branch (2043:16): [True: 0, False: 0]
  ------------------
 2044|       |            /* actually a client application bug */
 2045|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2046|      0|                SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT);
 2047|      0|            goto err;
 2048|      0|        }
 2049|  3.62k|    } else {
 2050|       |        /*
 2051|       |         * If we were trying for session-id reuse but the server
 2052|       |         * didn't resume, make a new SSL_SESSION.
 2053|       |         * In the case of EAP-FAST and PAC, we do not send a session ID,
 2054|       |         * so the PAC-based session secret is always preserved. It'll be
 2055|       |         * overwritten if the server refuses resumption.
 2056|       |         */
 2057|  3.62k|        if (s->session->session_id_length > 0) {
  ------------------
  |  Branch (2057:13): [True: 0, False: 3.62k]
  ------------------
 2058|      0|            ssl_tsan_counter(s->session_ctx, &s->session_ctx->stats.sess_miss);
 2059|      0|            if (!ssl_get_new_session(s, 0)) {
  ------------------
  |  Branch (2059:17): [True: 0, False: 0]
  ------------------
 2060|       |                /* SSLfatal() already called */
 2061|      0|                goto err;
 2062|      0|            }
 2063|      0|        }
 2064|       |
 2065|  3.62k|        s->session->ssl_version = s->version;
 2066|       |        /*
 2067|       |         * In TLSv1.2 and below we save the session id we were sent so we can
 2068|       |         * resume it later. In TLSv1.3 the session id we were sent is just an
 2069|       |         * echo of what we originally sent in the ClientHello and should not be
 2070|       |         * used for resumption.
 2071|       |         */
 2072|  3.62k|        if (!SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 2073|      0|            s->session->session_id_length = session_id_len;
 2074|       |            /* session_id_len could be 0 */
 2075|      0|            if (session_id_len > 0)
  ------------------
  |  Branch (2075:17): [True: 0, False: 0]
  ------------------
 2076|      0|                memcpy(s->session->session_id, PACKET_data(&session_id),
 2077|      0|                    session_id_len);
 2078|      0|        }
 2079|  3.62k|    }
 2080|       |
 2081|       |    /* Session version and negotiated protocol version should match */
 2082|  3.62k|    if (s->version != s->session->ssl_version) {
  ------------------
  |  Branch (2082:9): [True: 0, False: 3.62k]
  ------------------
 2083|      0|        SSLfatal(s, SSL_AD_PROTOCOL_VERSION,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2084|      0|            SSL_R_SSL_SESSION_VERSION_MISMATCH);
 2085|      0|        goto err;
 2086|      0|    }
 2087|       |    /*
 2088|       |     * Now that we know the version, update the check to see if it's an allowed
 2089|       |     * version.
 2090|       |     */
 2091|  3.62k|    s->s3.tmp.min_ver = s->version;
 2092|  3.62k|    s->s3.tmp.max_ver = s->version;
 2093|       |
 2094|  3.62k|    if (!set_client_ciphersuite(s, cipherchars)) {
  ------------------
  |  Branch (2094:9): [True: 0, False: 3.62k]
  ------------------
 2095|       |        /* SSLfatal() already called */
 2096|      0|        goto err;
 2097|      0|    }
 2098|       |
 2099|       |#ifdef OPENSSL_NO_COMP
 2100|       |    if (compression != 0) {
 2101|       |        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
 2102|       |            SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM);
 2103|       |        goto err;
 2104|       |    }
 2105|       |    /*
 2106|       |     * If compression is disabled we'd better not try to resume a session
 2107|       |     * using compression.
 2108|       |     */
 2109|       |    if (s->session->compress_meth != 0) {
 2110|       |        SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_INCONSISTENT_COMPRESSION);
 2111|       |        goto err;
 2112|       |    }
 2113|       |#else
 2114|  3.62k|    if (s->hit && compression != s->session->compress_meth) {
  ------------------
  |  Branch (2114:9): [True: 0, False: 3.62k]
  |  Branch (2114:19): [True: 0, False: 0]
  ------------------
 2115|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2116|      0|            SSL_R_OLD_SESSION_COMPRESSION_ALGORITHM_NOT_RETURNED);
 2117|      0|        goto err;
 2118|      0|    }
 2119|  3.62k|    if (compression == 0)
  ------------------
  |  Branch (2119:9): [True: 3.62k, False: 0]
  ------------------
 2120|  3.62k|        comp = NULL;
 2121|      0|    else if (!ssl_allow_compression(s)) {
  ------------------
  |  Branch (2121:14): [True: 0, False: 0]
  ------------------
 2122|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_COMPRESSION_DISABLED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2123|      0|        goto err;
 2124|      0|    } else {
 2125|      0|        comp = ssl3_comp_find(SSL_CONNECTION_GET_CTX(s)->comp_methods,
  ------------------
  |  |   26|      0|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2126|      0|            compression);
 2127|      0|    }
 2128|       |
 2129|  3.62k|    if (compression != 0 && comp == NULL) {
  ------------------
  |  Branch (2129:9): [True: 0, False: 3.62k]
  |  Branch (2129:29): [True: 0, False: 0]
  ------------------
 2130|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2131|      0|            SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM);
 2132|      0|        goto err;
 2133|  3.62k|    } else {
 2134|  3.62k|        s->s3.tmp.new_compression = comp;
 2135|  3.62k|    }
 2136|  3.62k|#endif
 2137|       |
 2138|  3.62k|    if (!tls_parse_all_extensions(s, context, extensions, NULL, 0, 1)) {
  ------------------
  |  Branch (2138:9): [True: 0, False: 3.62k]
  ------------------
 2139|       |        /* SSLfatal() already called */
 2140|      0|        goto err;
 2141|      0|    }
 2142|       |
 2143|       |#ifndef OPENSSL_NO_SCTP
 2144|       |    if (SSL_CONNECTION_IS_DTLS(s) && s->hit) {
 2145|       |        unsigned char sctpauthkey[64];
 2146|       |        char labelbuffer[sizeof(DTLS1_SCTP_AUTH_LABEL)];
 2147|       |        size_t labellen;
 2148|       |
 2149|       |        /*
 2150|       |         * Add new shared key for SCTP-Auth, will be ignored if
 2151|       |         * no SCTP used.
 2152|       |         */
 2153|       |        memcpy(labelbuffer, DTLS1_SCTP_AUTH_LABEL,
 2154|       |            sizeof(DTLS1_SCTP_AUTH_LABEL));
 2155|       |
 2156|       |        /* Don't include the terminating zero. */
 2157|       |        labellen = sizeof(labelbuffer) - 1;
 2158|       |        if (s->mode & SSL_MODE_DTLS_SCTP_LABEL_LENGTH_BUG)
 2159|       |            labellen += 1;
 2160|       |
 2161|       |        if (SSL_export_keying_material(ssl, sctpauthkey,
 2162|       |                sizeof(sctpauthkey),
 2163|       |                labelbuffer,
 2164|       |                labellen, NULL, 0, 0)
 2165|       |            <= 0) {
 2166|       |            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
 2167|       |            goto err;
 2168|       |        }
 2169|       |
 2170|       |        BIO_ctrl(SSL_get_wbio(ssl),
 2171|       |            BIO_CTRL_DGRAM_SCTP_ADD_AUTH_KEY,
 2172|       |            sizeof(sctpauthkey), sctpauthkey);
 2173|       |    }
 2174|       |#endif
 2175|       |
 2176|       |    /*
 2177|       |     * In TLSv1.3 we have some post-processing to change cipher state, otherwise
 2178|       |     * we're done with this message
 2179|       |     */
 2180|  3.62k|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 2181|  3.62k|        if (!ssl->method->ssl3_enc->setup_key_block(s)
  ------------------
  |  Branch (2181:13): [True: 0, False: 3.62k]
  ------------------
 2182|  3.62k|            || !tls13_store_handshake_traffic_hash(s)) {
  ------------------
  |  Branch (2182:16): [True: 0, False: 3.62k]
  ------------------
 2183|       |            /* SSLfatal() already called */
 2184|      0|            goto err;
 2185|      0|        }
 2186|       |        /*
 2187|       |         * If we're not doing early-data and we're not going to send a dummy CCS
 2188|       |         * (i.e. no middlebox compat mode) then we can change the write keys
 2189|       |         * immediately. Otherwise we have to defer this until after all possible
 2190|       |         * early data is written. We could just always defer until the last
 2191|       |         * moment except QUIC needs it done at the same time as the read keys
 2192|       |         * are changed. Since QUIC doesn't do TLS early data or need middlebox
 2193|       |         * compat this doesn't cause a problem.
 2194|       |         */
 2195|  3.62k|        if (SSL_IS_QUIC_HANDSHAKE(s)
  ------------------
  |  |  311|  7.25k|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  ------------------
  |  |  |  |   22|  3.62k|#define TLS1_FLAGS_QUIC 0x2000
  |  |  ------------------
  |  |  |  Branch (311:34): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
 2196|  3.62k|            || (s->early_data_state == SSL_EARLY_DATA_NONE
  ------------------
  |  Branch (2196:17): [True: 3.62k, False: 0]
  ------------------
 2197|  3.62k|                && (s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) == 0)) {
  ------------------
  |  |  404|  3.62k|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|  3.62k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (2197:20): [True: 0, False: 3.62k]
  ------------------
 2198|      0|            if (!ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (2198:17): [True: 0, False: 0]
  ------------------
 2199|      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
  |  |  ------------------
  ------------------
 2200|       |                /* SSLfatal() already called */
 2201|      0|                goto err;
 2202|      0|            }
 2203|      0|        }
 2204|  3.62k|        if (!ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (2204:13): [True: 0, False: 3.62k]
  ------------------
 2205|  3.62k|                SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_CLIENT_READ)) {
  ------------------
  |  |  347|  3.62k|#define SSL3_CC_HANDSHAKE 0x080
  ------------------
                              SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_CLIENT_READ)) {
  ------------------
  |  |  351|  3.62k|#define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  344|  3.62k|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  342|  3.62k|#define SSL3_CC_READ 0x001
  |  |  ------------------
  ------------------
 2206|       |            /* SSLfatal() already called */
 2207|      0|            goto err;
 2208|      0|        }
 2209|  3.62k|    }
 2210|       |
 2211|  3.62k|    OPENSSL_free(extensions);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2212|  3.62k|    return MSG_PROCESS_CONTINUE_READING;
 2213|      0|err:
 2214|      0|    OPENSSL_free(extensions);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2215|      0|    return MSG_PROCESS_ERROR;
 2216|  3.62k|}
tls_process_server_certificate:
 2369|  3.62k|{
 2370|  3.62k|    unsigned long cert_list_len, cert_len;
 2371|  3.62k|    X509 *x = NULL;
 2372|  3.62k|    const unsigned char *certstart, *certbytes;
 2373|  3.62k|    size_t chainidx;
 2374|  3.62k|    unsigned int context = 0;
 2375|  3.62k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2376|       |
 2377|  3.62k|    if (s->ext.server_cert_type == TLSEXT_cert_type_rpk)
  ------------------
  |  |  250|  3.62k|#define TLSEXT_cert_type_rpk 2
  ------------------
  |  Branch (2377:9): [True: 0, False: 3.62k]
  ------------------
 2378|      0|        return tls_process_server_rpk(s, pkt);
 2379|  3.62k|    if (s->ext.server_cert_type != TLSEXT_cert_type_x509) {
  ------------------
  |  |  248|  3.62k|#define TLSEXT_cert_type_x509 0
  ------------------
  |  Branch (2379:9): [True: 0, False: 3.62k]
  ------------------
 2380|      0|        SSLfatal(s, SSL_AD_UNSUPPORTED_CERTIFICATE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2381|      0|            SSL_R_UNKNOWN_CERTIFICATE_TYPE);
 2382|      0|        goto err;
 2383|      0|    }
 2384|       |
 2385|  3.62k|    if ((s->session->peer_chain = sk_X509_new_null()) == NULL) {
  ------------------
  |  |   85|  3.62k|#define sk_X509_new_null() ((STACK_OF(X509) *)OPENSSL_sk_set_thunks(OPENSSL_sk_new_null(), sk_X509_freefunc_thunk))
  ------------------
  |  Branch (2385:9): [True: 0, False: 3.62k]
  ------------------
 2386|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2387|      0|        goto err;
 2388|      0|    }
 2389|       |
 2390|  3.62k|    if ((SSL_CONNECTION_IS_TLS13(s) && !PACKET_get_1(pkt, &context))
  ------------------
  |  |  273|  7.25k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2390:40): [True: 0, False: 3.62k]
  ------------------
 2391|  3.62k|        || context != 0
  ------------------
  |  Branch (2391:12): [True: 0, False: 3.62k]
  ------------------
 2392|  3.62k|        || !PACKET_get_net_3(pkt, &cert_list_len)
  ------------------
  |  Branch (2392:12): [True: 0, False: 3.62k]
  ------------------
 2393|  3.62k|        || PACKET_remaining(pkt) != cert_list_len
  ------------------
  |  Branch (2393:12): [True: 0, False: 3.62k]
  ------------------
 2394|  3.62k|        || PACKET_remaining(pkt) == 0) {
  ------------------
  |  Branch (2394:12): [True: 0, False: 3.62k]
  ------------------
 2395|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2396|      0|        goto err;
 2397|      0|    }
 2398|  7.25k|    for (chainidx = 0; PACKET_remaining(pkt); chainidx++) {
  ------------------
  |  Branch (2398:24): [True: 3.62k, False: 3.62k]
  ------------------
 2399|  3.62k|        if (!PACKET_get_net_3(pkt, &cert_len)
  ------------------
  |  Branch (2399:13): [True: 0, False: 3.62k]
  ------------------
 2400|  3.62k|            || !PACKET_get_bytes(pkt, &certbytes, cert_len)) {
  ------------------
  |  Branch (2400:16): [True: 0, False: 3.62k]
  ------------------
 2401|      0|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_CERT_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2402|      0|            goto err;
 2403|      0|        }
 2404|       |
 2405|  3.62k|        certstart = certbytes;
 2406|  3.62k|        x = X509_new_ex(sctx->libctx, sctx->propq);
 2407|  3.62k|        if (x == NULL) {
  ------------------
  |  Branch (2407:13): [True: 0, False: 3.62k]
  ------------------
 2408|      0|            SSLfatal(s, SSL_AD_DECODE_ERROR, ERR_R_ASN1_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2409|      0|            goto err;
 2410|      0|        }
 2411|  3.62k|        if (d2i_X509(&x, (const unsigned char **)&certbytes,
  ------------------
  |  Branch (2411:13): [True: 0, False: 3.62k]
  ------------------
 2412|  3.62k|                cert_len)
 2413|  3.62k|            == NULL) {
 2414|      0|            SSLfatal(s, SSL_AD_BAD_CERTIFICATE, ERR_R_ASN1_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2415|      0|            goto err;
 2416|      0|        }
 2417|       |
 2418|  3.62k|        if (certbytes != (certstart + cert_len)) {
  ------------------
  |  Branch (2418:13): [True: 0, False: 3.62k]
  ------------------
 2419|      0|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_CERT_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2420|      0|            goto err;
 2421|      0|        }
 2422|       |
 2423|  3.62k|        if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 2424|  3.62k|            RAW_EXTENSION *rawexts = NULL;
 2425|  3.62k|            PACKET extensions;
 2426|       |
 2427|  3.62k|            if (!PACKET_get_length_prefixed_2(pkt, &extensions)) {
  ------------------
  |  Branch (2427:17): [True: 0, False: 3.62k]
  ------------------
 2428|      0|                SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_LENGTH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2429|      0|                goto err;
 2430|      0|            }
 2431|  3.62k|            if (!tls_collect_extensions(s, &extensions,
  ------------------
  |  Branch (2431:17): [True: 0, False: 3.62k]
  ------------------
 2432|  3.62k|                    SSL_EXT_TLS1_3_CERTIFICATE, &rawexts,
  ------------------
  |  |  306|  3.62k|#define SSL_EXT_TLS1_3_CERTIFICATE 0x01000
  ------------------
 2433|  3.62k|                    NULL, chainidx == 0)
 2434|  3.62k|                || !tls_parse_all_extensions(s, SSL_EXT_TLS1_3_CERTIFICATE,
  ------------------
  |  |  306|  3.62k|#define SSL_EXT_TLS1_3_CERTIFICATE 0x01000
  ------------------
  |  Branch (2434:20): [True: 0, False: 3.62k]
  ------------------
 2435|  3.62k|                    rawexts, x, chainidx,
 2436|  3.62k|                    PACKET_remaining(pkt) == 0)) {
 2437|      0|                OPENSSL_free(rawexts);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2438|       |                /* SSLfatal already called */
 2439|      0|                goto err;
 2440|      0|            }
 2441|  3.62k|            OPENSSL_free(rawexts);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2442|  3.62k|        }
 2443|       |
 2444|  3.62k|        if (!sk_X509_push(s->session->peer_chain, x)) {
  ------------------
  |  |   92|  3.62k|#define sk_X509_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_sk_type(sk), ossl_check_X509_type(ptr))
  ------------------
  |  Branch (2444:13): [True: 0, False: 3.62k]
  ------------------
 2445|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2446|      0|            goto err;
 2447|      0|        }
 2448|  3.62k|        x = NULL;
 2449|  3.62k|    }
 2450|  3.62k|    return MSG_PROCESS_CONTINUE_PROCESSING;
 2451|       |
 2452|      0|err:
 2453|      0|    X509_free(x);
 2454|      0|    OSSL_STACK_OF_X509_free(s->session->peer_chain);
 2455|       |    s->session->peer_chain = NULL;
 2456|      0|    return MSG_PROCESS_ERROR;
 2457|  3.62k|}
tls_post_process_server_certificate:
 2466|  3.62k|{
 2467|  3.62k|    X509 *x;
 2468|  3.62k|    EVP_PKEY *pkey = NULL;
 2469|  3.62k|    const SSL_CERT_LOOKUP *clu;
 2470|  3.62k|    size_t certidx;
 2471|  3.62k|    int i;
 2472|       |
 2473|  3.62k|    if (s->ext.server_cert_type == TLSEXT_cert_type_rpk)
  ------------------
  |  |  250|  3.62k|#define TLSEXT_cert_type_rpk 2
  ------------------
  |  Branch (2473:9): [True: 0, False: 3.62k]
  ------------------
 2474|      0|        return tls_post_process_server_rpk(s, wst);
 2475|       |
 2476|  3.62k|    if (s->rwstate == SSL_RETRY_VERIFY)
  ------------------
  |  |  962|  3.62k|#define SSL_RETRY_VERIFY 8
  ------------------
  |  Branch (2476:9): [True: 0, False: 3.62k]
  ------------------
 2477|      0|        s->rwstate = SSL_NOTHING;
  ------------------
  |  |  955|      0|#define SSL_NOTHING 1
  ------------------
 2478|       |
 2479|       |    /*
 2480|       |     * The documented interface is that SSL_VERIFY_PEER should be set in order
 2481|       |     * for client side verification of the server certificate to take place.
 2482|       |     * However, historically the code has only checked that *any* flag is set
 2483|       |     * to cause server verification to take place. Use of the other flags makes
 2484|       |     * no sense in client mode. An attempt to clean up the semantics was
 2485|       |     * reverted because at least one application *only* set
 2486|       |     * SSL_VERIFY_FAIL_IF_NO_PEER_CERT. Prior to the clean up this still caused
 2487|       |     * server verification to take place, after the clean up it silently did
 2488|       |     * nothing. SSL_CTX_set_verify()/SSL_set_verify() cannot validate the flags
 2489|       |     * sent to them because they are void functions. Therefore, we now use the
 2490|       |     * (less clean) historic behaviour of performing validation if any flag is
 2491|       |     * set. The *documented* interface remains the same.
 2492|       |     */
 2493|  3.62k|    ERR_set_mark();
 2494|  3.62k|    i = ssl_verify_cert_chain(s, s->session->peer_chain);
 2495|  3.62k|    if (i <= 0 && s->verify_mode != SSL_VERIFY_NONE) {
  ------------------
  |  | 1200|     75|#define SSL_VERIFY_NONE 0x00
  ------------------
  |  Branch (2495:9): [True: 75, False: 3.55k]
  |  Branch (2495:19): [True: 0, False: 75]
  ------------------
 2496|      0|        ERR_clear_last_mark();
 2497|      0|        SSLfatal(s, ssl_x509err2alert(s->verify_result),
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2498|      0|            SSL_R_CERTIFICATE_VERIFY_FAILED);
 2499|      0|        return WORK_ERROR;
 2500|      0|    }
 2501|  3.62k|    ERR_pop_to_mark(); /* but we keep s->verify_result */
 2502|  3.62k|    if (i > 0 && s->rwstate == SSL_RETRY_VERIFY)
  ------------------
  |  |  962|  3.55k|#define SSL_RETRY_VERIFY 8
  ------------------
  |  Branch (2502:9): [True: 3.55k, False: 75]
  |  Branch (2502:18): [True: 0, False: 3.55k]
  ------------------
 2503|      0|        return WORK_MORE_A;
 2504|       |
 2505|       |    /*
 2506|       |     * Inconsistency alert: cert_chain does include the peer's certificate,
 2507|       |     * which we don't include in statem_srvr.c
 2508|       |     */
 2509|  3.62k|    x = sk_X509_value(s->session->peer_chain, 0);
  ------------------
  |  |   83|  3.62k|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
 2510|       |
 2511|  3.62k|    pkey = X509_get0_pubkey(x);
 2512|       |
 2513|  3.62k|    if (pkey == NULL || EVP_PKEY_missing_parameters(pkey)) {
  ------------------
  |  Branch (2513:9): [True: 0, False: 3.62k]
  |  Branch (2513:25): [True: 0, False: 3.62k]
  ------------------
 2514|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2515|      0|            SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS);
 2516|      0|        return WORK_ERROR;
 2517|      0|    }
 2518|       |
 2519|  3.62k|    if ((clu = ssl_cert_lookup_by_pkey(pkey, &certidx,
  ------------------
  |  Branch (2519:9): [True: 0, False: 3.62k]
  ------------------
 2520|  3.62k|             SSL_CONNECTION_GET_CTX(s)))
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2521|  3.62k|        == NULL) {
 2522|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_UNKNOWN_CERTIFICATE_TYPE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2523|      0|        return WORK_ERROR;
 2524|      0|    }
 2525|       |    /*
 2526|       |     * Check certificate type is consistent with ciphersuite. For TLS 1.3
 2527|       |     * skip check since TLS 1.3 ciphersuites can be used with any certificate
 2528|       |     * type.
 2529|       |     */
 2530|  3.62k|    if (!SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 2531|      0|        if ((clu->amask & s->s3.tmp.new_cipher->algorithm_auth) == 0) {
  ------------------
  |  Branch (2531:13): [True: 0, False: 0]
  ------------------
 2532|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_WRONG_CERTIFICATE_TYPE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2533|      0|            return WORK_ERROR;
 2534|      0|        }
 2535|      0|    }
 2536|       |
 2537|  3.62k|    if (!X509_up_ref(x)) {
  ------------------
  |  Branch (2537:9): [True: 0, False: 3.62k]
  ------------------
 2538|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2539|      0|        return WORK_ERROR;
 2540|      0|    }
 2541|       |
 2542|  3.62k|    X509_free(s->session->peer);
 2543|  3.62k|    s->session->peer = x;
 2544|  3.62k|    s->session->verify_result = s->verify_result;
 2545|       |    /* Ensure there is no RPK */
 2546|  3.62k|    EVP_PKEY_free(s->session->peer_rpk);
 2547|  3.62k|    s->session->peer_rpk = NULL;
 2548|       |
 2549|       |    /* Save the current hash state for when we receive the CertificateVerify */
 2550|  3.62k|    if (SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|  7.25k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 2551|  3.62k|        && !ssl_handshake_hash(s, s->cert_verify_hash,
  ------------------
  |  Branch (2551:12): [True: 0, False: 3.62k]
  ------------------
 2552|  3.62k|            sizeof(s->cert_verify_hash),
 2553|  3.62k|            &s->cert_verify_hash_len)) {
 2554|      0|        /* SSLfatal() already called */;
 2555|      0|        return WORK_ERROR;
 2556|      0|    }
 2557|  3.62k|    return WORK_FINISHED_CONTINUE;
 2558|  3.62k|}
tls_process_new_session_ticket:
 3101|  7.16k|{
 3102|  7.16k|    unsigned int ticklen;
 3103|  7.16k|    unsigned long ticket_lifetime_hint, age_add = 0;
 3104|  7.16k|    unsigned int sess_len;
 3105|  7.16k|    RAW_EXTENSION *exts = NULL;
 3106|  7.16k|    PACKET nonce;
 3107|  7.16k|    EVP_MD *sha256 = NULL;
 3108|  7.16k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  7.16k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3109|       |
 3110|  7.16k|    PACKET_null_init(&nonce);
 3111|       |
 3112|  7.16k|    if (!PACKET_get_net_4(pkt, &ticket_lifetime_hint)
  ------------------
  |  Branch (3112:9): [True: 0, False: 7.16k]
  ------------------
 3113|  7.16k|        || (SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|  14.3k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.3k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.16k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  274|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.3k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  275|  14.3k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.16k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.16k, False: 0]
  |  |  ------------------
  ------------------
 3114|  7.16k|            && (!PACKET_get_net_4(pkt, &age_add)
  ------------------
  |  Branch (3114:17): [True: 0, False: 7.16k]
  ------------------
 3115|  7.16k|                || !PACKET_get_length_prefixed_1(pkt, &nonce)))
  ------------------
  |  Branch (3115:20): [True: 0, False: 7.16k]
  ------------------
 3116|  7.16k|        || !PACKET_get_net_2(pkt, &ticklen)
  ------------------
  |  Branch (3116:12): [True: 0, False: 7.16k]
  ------------------
 3117|  7.16k|        || (SSL_CONNECTION_IS_TLS13(s) ? (ticklen == 0
  ------------------
  |  |  273|  7.16k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.3k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.16k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  274|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.3k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  275|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.16k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.16k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3117:12): [True: 0, False: 7.16k]
  |  Branch (3117:43): [True: 0, False: 7.16k]
  ------------------
 3118|  7.16k|                                             || PACKET_remaining(pkt) < ticklen)
  ------------------
  |  Branch (3118:49): [True: 0, False: 7.16k]
  ------------------
 3119|  7.16k|                                       : PACKET_remaining(pkt) != ticklen)) {
 3120|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 3121|      0|        goto err;
 3122|      0|    }
 3123|       |
 3124|       |    /*
 3125|       |     * Server is allowed to change its mind (in <=TLSv1.2) and send an empty
 3126|       |     * ticket. We already checked this TLSv1.3 case above, so it should never
 3127|       |     * be 0 here in that instance
 3128|       |     */
 3129|  7.16k|    if (ticklen == 0)
  ------------------
  |  Branch (3129:9): [True: 0, False: 7.16k]
  ------------------
 3130|      0|        return MSG_PROCESS_CONTINUE_READING;
 3131|       |
 3132|       |    /*
 3133|       |     * Sessions must be immutable once they go into the session cache. Otherwise
 3134|       |     * we can get multi-thread problems. Therefore we don't "update" sessions,
 3135|       |     * we replace them with a duplicate. In TLSv1.3 we need to do this every
 3136|       |     * time a NewSessionTicket arrives because those messages arrive
 3137|       |     * post-handshake and the session may have already gone into the session
 3138|       |     * cache.
 3139|       |     */
 3140|  7.16k|    if (SSL_CONNECTION_IS_TLS13(s) || s->session->session_id_length > 0) {
  ------------------
  |  |  273|  14.3k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.3k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.16k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  274|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.3k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  275|  14.3k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.16k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.16k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3140:39): [True: 0, False: 0]
  ------------------
 3141|  7.16k|        SSL_SESSION *new_sess;
 3142|       |
 3143|       |        /*
 3144|       |         * We reused an existing session, so we need to replace it with a new
 3145|       |         * one
 3146|       |         */
 3147|  7.16k|        if ((new_sess = ssl_session_dup(s->session, 0)) == 0) {
  ------------------
  |  Branch (3147:13): [True: 0, False: 7.16k]
  ------------------
 3148|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_SSL_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 3149|      0|            goto err;
 3150|      0|        }
 3151|       |
 3152|  7.16k|        if ((s->session_ctx->session_cache_mode & SSL_SESS_CACHE_CLIENT) != 0
  ------------------
  |  |  734|  7.16k|#define SSL_SESS_CACHE_CLIENT 0x0001
  ------------------
  |  Branch (3152:13): [True: 7.16k, False: 0]
  ------------------
 3153|  7.16k|            && !SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  7.16k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.3k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.16k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  274|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.3k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  275|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.16k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.16k, False: 0]
  |  |  ------------------
  ------------------
 3154|       |            /*
 3155|       |             * In TLSv1.2 and below the arrival of a new tickets signals that
 3156|       |             * any old ticket we were using is now out of date, so we remove the
 3157|       |             * old session from the cache. We carry on if this fails
 3158|       |             */
 3159|      0|            SSL_CTX_remove_session(s->session_ctx, s->session);
 3160|      0|        }
 3161|       |
 3162|  7.16k|        SSL_SESSION_free(s->session);
 3163|  7.16k|        s->session = new_sess;
 3164|  7.16k|    }
 3165|       |
 3166|  7.16k|    s->session->time = ossl_time_now();
 3167|  7.16k|    ssl_session_calculate_timeout(s->session);
 3168|       |
 3169|  7.16k|    OPENSSL_free(s->session->ext.tick);
  ------------------
  |  |  132|  7.16k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3170|  7.16k|    s->session->ext.tick = NULL;
 3171|  7.16k|    s->session->ext.ticklen = 0;
 3172|       |
 3173|  7.16k|    s->session->ext.tick = OPENSSL_malloc(ticklen);
  ------------------
  |  |  107|  7.16k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3174|  7.16k|    if (s->session->ext.tick == NULL) {
  ------------------
  |  Branch (3174:9): [True: 0, False: 7.16k]
  ------------------
 3175|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 3176|      0|        goto err;
 3177|      0|    }
 3178|  7.16k|    if (!PACKET_copy_bytes(pkt, s->session->ext.tick, ticklen)) {
  ------------------
  |  Branch (3178:9): [True: 0, False: 7.16k]
  ------------------
 3179|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 3180|      0|        goto err;
 3181|      0|    }
 3182|       |
 3183|  7.16k|    s->session->ext.tick_lifetime_hint = ticket_lifetime_hint;
 3184|  7.16k|    s->session->ext.tick_age_add = age_add;
 3185|  7.16k|    s->session->ext.ticklen = ticklen;
 3186|       |
 3187|  7.16k|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  7.16k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.3k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.16k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  274|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.3k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  275|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.16k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.16k, False: 0]
  |  |  ------------------
  ------------------
 3188|  7.16k|        PACKET extpkt;
 3189|       |
 3190|       |        /*
 3191|       |         * Fulfilling RFC8446:4.6.1 requirement: Clients MUST NOT cache
 3192|       |         * tickets for longer than 7 days.
 3193|       |         */
 3194|  7.16k|        if (ticket_lifetime_hint > 604800) {
  ------------------
  |  Branch (3194:13): [True: 0, False: 7.16k]
  ------------------
 3195|      0|            ticket_lifetime_hint = 604800;
 3196|      0|        }
 3197|       |
 3198|  7.16k|        if (!PACKET_as_length_prefixed_2(pkt, &extpkt)
  ------------------
  |  Branch (3198:13): [True: 0, False: 7.16k]
  ------------------
 3199|  7.16k|            || PACKET_remaining(pkt) != 0) {
  ------------------
  |  Branch (3199:16): [True: 0, False: 7.16k]
  ------------------
 3200|      0|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 3201|      0|            goto err;
 3202|      0|        }
 3203|       |
 3204|  7.16k|        if (!tls_collect_extensions(s, &extpkt,
  ------------------
  |  Branch (3204:13): [True: 0, False: 7.16k]
  ------------------
 3205|  7.16k|                SSL_EXT_TLS1_3_NEW_SESSION_TICKET, &exts,
  ------------------
  |  |  307|  7.16k|#define SSL_EXT_TLS1_3_NEW_SESSION_TICKET 0x02000
  ------------------
 3206|  7.16k|                NULL, 1)
 3207|  7.16k|            || !tls_parse_all_extensions(s,
  ------------------
  |  Branch (3207:16): [True: 0, False: 7.16k]
  ------------------
 3208|  7.16k|                SSL_EXT_TLS1_3_NEW_SESSION_TICKET,
  ------------------
  |  |  307|  7.16k|#define SSL_EXT_TLS1_3_NEW_SESSION_TICKET 0x02000
  ------------------
 3209|  7.16k|                exts, NULL, 0, 1)) {
 3210|       |            /* SSLfatal() already called */
 3211|      0|            goto err;
 3212|      0|        }
 3213|  7.16k|    }
 3214|       |
 3215|       |    /*
 3216|       |     * There are two ways to detect a resumed ticket session. One is to set
 3217|       |     * an appropriate session ID and then the server must return a match in
 3218|       |     * ServerHello. This allows the normal client session ID matching to work
 3219|       |     * and we know much earlier that the ticket has been accepted. The
 3220|       |     * other way is to set zero length session ID when the ticket is
 3221|       |     * presented and rely on the handshake to determine session resumption.
 3222|       |     * We choose the former approach because this fits in with assumptions
 3223|       |     * elsewhere in OpenSSL. The session ID is set to the SHA256 hash of the
 3224|       |     * ticket.
 3225|       |     */
 3226|  7.16k|    sha256 = EVP_MD_fetch(sctx->libctx, "SHA2-256", sctx->propq);
 3227|  7.16k|    if (sha256 == NULL) {
  ------------------
  |  Branch (3227:9): [True: 0, False: 7.16k]
  ------------------
 3228|       |        /* Error is already recorded */
 3229|      0|        SSLfatal_alert(s, SSL_AD_INTERNAL_ERROR);
  ------------------
  |  |  154|      0|#define SSLfatal_alert(s, al) ossl_statem_send_fatal((s), (al))
  ------------------
 3230|      0|        goto err;
 3231|      0|    }
 3232|       |    /*
 3233|       |     * We use sess_len here because EVP_Digest expects an int
 3234|       |     * but s->session->session_id_length is a size_t
 3235|       |     */
 3236|  7.16k|    if (!EVP_Digest(s->session->ext.tick, ticklen,
  ------------------
  |  Branch (3236:9): [True: 0, False: 7.16k]
  ------------------
 3237|  7.16k|            s->session->session_id, &sess_len,
 3238|  7.16k|            sha256, NULL)) {
 3239|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 3240|      0|        goto err;
 3241|      0|    }
 3242|  7.16k|    EVP_MD_free(sha256);
 3243|  7.16k|    sha256 = NULL;
 3244|  7.16k|    s->session->session_id_length = sess_len;
 3245|  7.16k|    s->session->not_resumable = 0;
 3246|       |
 3247|       |    /* This is a standalone message in TLSv1.3, so there is no more to read */
 3248|  7.16k|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  7.16k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.3k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.16k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  274|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.3k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  275|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.16k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.16k, False: 0]
  |  |  ------------------
  ------------------
 3249|  7.16k|        const EVP_MD *md = ssl_handshake_md(s);
 3250|  7.16k|        int hashleni = EVP_MD_get_size(md);
 3251|  7.16k|        size_t hashlen;
 3252|       |        /* ASCII: "resumption", in hex for EBCDIC compatibility */
 3253|  7.16k|        static const unsigned char nonce_label[] = { 0x72, 0x65, 0x73, 0x75, 0x6D,
 3254|  7.16k|            0x70, 0x74, 0x69, 0x6F, 0x6E };
 3255|       |
 3256|       |        /* Ensure cast to size_t is safe */
 3257|  7.16k|        if (!ossl_assert(hashleni > 0)) {
  ------------------
  |  |   52|  7.16k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  7.16k|    __FILE__, __LINE__)
  ------------------
  |  Branch (3257:13): [True: 0, False: 7.16k]
  ------------------
 3258|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 3259|      0|            goto err;
 3260|      0|        }
 3261|  7.16k|        hashlen = (size_t)hashleni;
 3262|       |
 3263|  7.16k|        if (!tls13_hkdf_expand(s, md, s->resumption_master_secret,
  ------------------
  |  Branch (3263:13): [True: 0, False: 7.16k]
  ------------------
 3264|  7.16k|                nonce_label,
 3265|  7.16k|                sizeof(nonce_label),
 3266|  7.16k|                PACKET_data(&nonce),
 3267|  7.16k|                PACKET_remaining(&nonce),
 3268|  7.16k|                s->session->master_key,
 3269|  7.16k|                hashlen, 1)) {
 3270|       |            /* SSLfatal() already called */
 3271|      0|            goto err;
 3272|      0|        }
 3273|  7.16k|        s->session->master_key_length = hashlen;
 3274|       |
 3275|  7.16k|        OPENSSL_free(exts);
  ------------------
  |  |  132|  7.16k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3276|  7.16k|        ssl_update_cache(s, SSL_SESS_CACHE_CLIENT);
  ------------------
  |  |  734|  7.16k|#define SSL_SESS_CACHE_CLIENT 0x0001
  ------------------
 3277|  7.16k|        return MSG_PROCESS_FINISHED_READING;
 3278|  7.16k|    }
 3279|       |
 3280|      0|    return MSG_PROCESS_CONTINUE_READING;
 3281|      0|err:
 3282|      0|    EVP_MD_free(sha256);
 3283|      0|    OPENSSL_free(exts);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3284|      0|    return MSG_PROCESS_ERROR;
 3285|  7.16k|}
tls_process_initial_server_flight:
 3377|  3.62k|{
 3378|  3.62k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3379|       |
 3380|       |    /*
 3381|       |     * at this point we check that we have the required stuff from
 3382|       |     * the server
 3383|       |     */
 3384|  3.62k|    if (!ssl3_check_cert_and_algorithm(s)) {
  ------------------
  |  Branch (3384:9): [True: 0, False: 3.62k]
  ------------------
 3385|       |        /* SSLfatal() already called */
 3386|      0|        return 0;
 3387|      0|    }
 3388|       |
 3389|       |    /*
 3390|       |     * Call the ocsp status callback if needed. The |ext.ocsp.resp| and
 3391|       |     * |ext.ocsp.resp_len| values will be set if we actually received a status
 3392|       |     * message, or NULL and -1 otherwise
 3393|       |     */
 3394|  3.62k|    if (s->ext.status_type != TLSEXT_STATUSTYPE_nothing
  ------------------
  |  | 2213|  7.25k|#define TLSEXT_STATUSTYPE_nothing -1
  ------------------
  |  Branch (3394:9): [True: 0, False: 3.62k]
  ------------------
 3395|      0|        && sctx->ext.status_cb != NULL) {
  ------------------
  |  Branch (3395:12): [True: 0, False: 0]
  ------------------
 3396|      0|        int ret = sctx->ext.status_cb(SSL_CONNECTION_GET_USER_SSL(s),
  ------------------
  |  |   28|      0|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 3397|      0|            sctx->ext.status_arg);
 3398|       |
 3399|      0|        if (ret == 0) {
  ------------------
  |  Branch (3399:13): [True: 0, False: 0]
  ------------------
 3400|      0|            SSLfatal(s, SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 3401|      0|                SSL_R_INVALID_STATUS_RESPONSE);
 3402|      0|            return 0;
 3403|      0|        }
 3404|      0|        if (ret < 0) {
  ------------------
  |  Branch (3404:13): [True: 0, False: 0]
  ------------------
 3405|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 3406|      0|                SSL_R_OCSP_CALLBACK_FAILURE);
 3407|      0|            return 0;
 3408|      0|        }
 3409|      0|    }
 3410|  3.62k|#ifndef OPENSSL_NO_CT
 3411|  3.62k|    if (s->ct_validation_callback != NULL) {
  ------------------
  |  Branch (3411:9): [True: 0, False: 3.62k]
  ------------------
 3412|       |        /* Note we validate the SCTs whether or not we abort on error */
 3413|      0|        if (!ssl_validate_ct(s) && (s->verify_mode & SSL_VERIFY_PEER)) {
  ------------------
  |  | 1201|      0|#define SSL_VERIFY_PEER 0x01
  ------------------
  |  Branch (3413:13): [True: 0, False: 0]
  |  Branch (3413:36): [True: 0, False: 0]
  ------------------
 3414|       |            /* SSLfatal() already called */
 3415|      0|            return 0;
 3416|      0|        }
 3417|      0|    }
 3418|  3.62k|#endif
 3419|       |
 3420|  3.62k|#ifndef OPENSSL_NO_ECH
 3421|       |    /* check result of ech and return error if needed */
 3422|  3.62k|    if (s->ext.ech.es != NULL
  ------------------
  |  Branch (3422:9): [True: 0, False: 3.62k]
  ------------------
 3423|      0|        && s->ext.ech.attempted == 1
  ------------------
  |  Branch (3423:12): [True: 0, False: 0]
  ------------------
 3424|      0|        && s->ext.ech.success != 1
  ------------------
  |  Branch (3424:12): [True: 0, False: 0]
  ------------------
 3425|      0|        && s->ext.ech.grease != OSSL_ECH_IS_GREASE) {
  ------------------
  |  |   37|      0|#define OSSL_ECH_IS_GREASE 1 /* when decryption failed or GREASE wanted */
  ------------------
  |  Branch (3425:12): [True: 0, False: 0]
  ------------------
 3426|      0|        s->ext.ech.retry_configs_ok = 1; /* note those are good */
 3427|      0|        SSLfatal(s, SSL_AD_ECH_REQUIRED, SSL_R_ECH_REQUIRED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 3428|      0|        return 0;
 3429|      0|    }
 3430|  3.62k|#endif /* OPENSSL_NO_ECH */
 3431|       |
 3432|  3.62k|    return 1;
 3433|  3.62k|}
ssl3_check_cert_and_algorithm:
 4391|  3.62k|{
 4392|  3.62k|    const SSL_CERT_LOOKUP *clu;
 4393|  3.62k|    size_t idx;
 4394|  3.62k|    long alg_k, alg_a;
 4395|  3.62k|    EVP_PKEY *pkey;
 4396|       |
 4397|  3.62k|    alg_k = s->s3.tmp.new_cipher->algorithm_mkey;
 4398|  3.62k|    alg_a = s->s3.tmp.new_cipher->algorithm_auth;
 4399|       |
 4400|       |    /* we don't have a certificate */
 4401|  3.62k|    if (!(alg_a & SSL_aCERT))
  ------------------
  |  |  131|  3.62k|    (SSL_aRSA | SSL_aDSS | SSL_aECDSA | SSL_aGOST01 | SSL_aGOST12)
  |  |  ------------------
  |  |  |  |  112|  3.62k|#define SSL_aRSA 0x00000001U
  |  |  ------------------
  |  |                   (SSL_aRSA | SSL_aDSS | SSL_aECDSA | SSL_aGOST01 | SSL_aGOST12)
  |  |  ------------------
  |  |  |  |  114|  3.62k|#define SSL_aDSS 0x00000002U
  |  |  ------------------
  |  |                   (SSL_aRSA | SSL_aDSS | SSL_aECDSA | SSL_aGOST01 | SSL_aGOST12)
  |  |  ------------------
  |  |  |  |  118|  3.62k|#define SSL_aECDSA 0x00000008U
  |  |  ------------------
  |  |                   (SSL_aRSA | SSL_aDSS | SSL_aECDSA | SSL_aGOST01 | SSL_aGOST12)
  |  |  ------------------
  |  |  |  |  122|  3.62k|#define SSL_aGOST01 0x00000020U
  |  |  ------------------
  |  |                   (SSL_aRSA | SSL_aDSS | SSL_aECDSA | SSL_aGOST01 | SSL_aGOST12)
  |  |  ------------------
  |  |  |  |  126|  3.62k|#define SSL_aGOST12 0x00000080U
  |  |  ------------------
  ------------------
  |  Branch (4401:9): [True: 3.62k, False: 0]
  ------------------
 4402|  3.62k|        return 1;
 4403|       |
 4404|       |    /* This is the passed certificate */
 4405|      0|    pkey = tls_get_peer_pkey(s);
 4406|      0|    clu = ssl_cert_lookup_by_pkey(pkey, &idx, SSL_CONNECTION_GET_CTX(s));
  ------------------
  |  |   26|      0|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 4407|       |
 4408|       |    /* Check certificate is recognised and suitable for cipher */
 4409|      0|    if (clu == NULL || (alg_a & clu->amask) == 0) {
  ------------------
  |  Branch (4409:9): [True: 0, False: 0]
  |  Branch (4409:24): [True: 0, False: 0]
  ------------------
 4410|      0|        SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_MISSING_SIGNING_CERT);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4411|      0|        return 0;
 4412|      0|    }
 4413|       |
 4414|      0|    if (alg_k & (SSL_kRSA | SSL_kRSAPSK) && idx != SSL_PKEY_RSA) {
  ------------------
  |  |   85|      0|#define SSL_kRSA 0x00000001U
  ------------------
                  if (alg_k & (SSL_kRSA | SSL_kRSAPSK) && idx != SSL_PKEY_RSA) {
  ------------------
  |  |   97|      0|#define SSL_kRSAPSK 0x00000040U
  ------------------
                  if (alg_k & (SSL_kRSA | SSL_kRSAPSK) && idx != SSL_PKEY_RSA) {
  ------------------
  |  |  327|      0|#define SSL_PKEY_RSA 0
  ------------------
  |  Branch (4414:9): [True: 0, False: 0]
  |  Branch (4414:45): [True: 0, False: 0]
  ------------------
 4415|      0|        SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4416|      0|            SSL_R_MISSING_RSA_ENCRYPTING_CERT);
 4417|      0|        return 0;
 4418|      0|    }
 4419|       |
 4420|      0|    if ((alg_k & SSL_kDHE) && (s->s3.peer_tmp == NULL)) {
  ------------------
  |  |   87|      0|#define SSL_kDHE 0x00000002U
  ------------------
  |  Branch (4420:9): [True: 0, False: 0]
  |  Branch (4420:31): [True: 0, False: 0]
  ------------------
 4421|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4422|      0|        return 0;
 4423|      0|    }
 4424|       |
 4425|       |    /* Early out to skip the checks below */
 4426|      0|    if (s->session->peer_rpk != NULL)
  ------------------
  |  Branch (4426:9): [True: 0, False: 0]
  ------------------
 4427|      0|        return 1;
 4428|       |
 4429|      0|    if (clu->amask & SSL_aECDSA) {
  ------------------
  |  |  118|      0|#define SSL_aECDSA 0x00000008U
  ------------------
  |  Branch (4429:9): [True: 0, False: 0]
  ------------------
 4430|      0|        if (ssl_check_srvr_ecc_cert_and_alg(s->session->peer, s))
  ------------------
  |  Branch (4430:13): [True: 0, False: 0]
  ------------------
 4431|      0|            return 1;
 4432|      0|        SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_BAD_ECC_CERT);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4433|      0|        return 0;
 4434|      0|    }
 4435|       |
 4436|      0|    return 1;
 4437|      0|}
statem_clnt.c:ossl_statem_client13_read_transition:
   95|  21.6k|{
   96|  21.6k|    OSSL_STATEM *st = &s->statem;
   97|       |
   98|       |    /*
   99|       |     * Note: There is no case for TLS_ST_CW_CLNT_HELLO, because we haven't
  100|       |     * yet negotiated TLSv1.3 at that point so that is handled by
  101|       |     * ossl_statem_client_read_transition()
  102|       |     */
  103|       |
  104|  21.6k|    switch (st->hand_state) {
  105|      0|    default:
  ------------------
  |  Branch (105:5): [True: 0, False: 21.6k]
  ------------------
  106|      0|        break;
  107|       |
  108|      0|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (108:5): [True: 0, False: 21.6k]
  ------------------
  109|       |        /*
  110|       |         * This must a ClientHello following a HelloRetryRequest, so the only
  111|       |         * thing we can get now is a ServerHello.
  112|       |         */
  113|      0|        if (mt == SSL3_MT_SERVER_HELLO) {
  ------------------
  |  |  314|      0|#define SSL3_MT_SERVER_HELLO 2
  ------------------
  |  Branch (113:13): [True: 0, False: 0]
  ------------------
  114|      0|            st->hand_state = TLS_ST_CR_SRVR_HELLO;
  115|      0|            return 1;
  116|      0|        }
  117|      0|        break;
  118|       |
  119|  3.62k|    case TLS_ST_CR_SRVR_HELLO:
  ------------------
  |  Branch (119:5): [True: 3.62k, False: 18.0k]
  ------------------
  120|  3.62k|        if (mt == SSL3_MT_ENCRYPTED_EXTENSIONS) {
  ------------------
  |  |  317|  3.62k|#define SSL3_MT_ENCRYPTED_EXTENSIONS 8
  ------------------
  |  Branch (120:13): [True: 3.62k, False: 0]
  ------------------
  121|  3.62k|            st->hand_state = TLS_ST_CR_ENCRYPTED_EXTENSIONS;
  122|  3.62k|            return 1;
  123|  3.62k|        }
  124|      0|        break;
  125|       |
  126|  3.62k|    case TLS_ST_CR_ENCRYPTED_EXTENSIONS:
  ------------------
  |  Branch (126:5): [True: 3.62k, False: 18.0k]
  ------------------
  127|  3.62k|        if (s->hit) {
  ------------------
  |  Branch (127:13): [True: 0, False: 3.62k]
  ------------------
  128|      0|            if (mt == SSL3_MT_FINISHED) {
  ------------------
  |  |  324|      0|#define SSL3_MT_FINISHED 20
  ------------------
  |  Branch (128:17): [True: 0, False: 0]
  ------------------
  129|      0|                st->hand_state = TLS_ST_CR_FINISHED;
  130|      0|                return 1;
  131|      0|            }
  132|  3.62k|        } else {
  133|  3.62k|            if (mt == SSL3_MT_CERTIFICATE_REQUEST) {
  ------------------
  |  |  320|  3.62k|#define SSL3_MT_CERTIFICATE_REQUEST 13
  ------------------
  |  Branch (133:17): [True: 0, False: 3.62k]
  ------------------
  134|      0|                st->hand_state = TLS_ST_CR_CERT_REQ;
  135|      0|                return 1;
  136|      0|            }
  137|  3.62k|            if (mt == SSL3_MT_CERTIFICATE) {
  ------------------
  |  |  318|  3.62k|#define SSL3_MT_CERTIFICATE 11
  ------------------
  |  Branch (137:17): [True: 3.62k, False: 0]
  ------------------
  138|  3.62k|                st->hand_state = TLS_ST_CR_CERT;
  139|  3.62k|                return 1;
  140|  3.62k|            }
  141|       |#ifndef OPENSSL_NO_COMP_ALG
  142|       |            if (mt == SSL3_MT_COMPRESSED_CERTIFICATE
  143|       |                && s->ext.compress_certificate_sent) {
  144|       |                st->hand_state = TLS_ST_CR_COMP_CERT;
  145|       |                return 1;
  146|       |            }
  147|       |#endif
  148|  3.62k|        }
  149|      0|        break;
  150|       |
  151|      0|    case TLS_ST_CR_CERT_REQ:
  ------------------
  |  Branch (151:5): [True: 0, False: 21.6k]
  ------------------
  152|      0|        if (mt == SSL3_MT_CERTIFICATE) {
  ------------------
  |  |  318|      0|#define SSL3_MT_CERTIFICATE 11
  ------------------
  |  Branch (152:13): [True: 0, False: 0]
  ------------------
  153|      0|            st->hand_state = TLS_ST_CR_CERT;
  154|      0|            return 1;
  155|      0|        }
  156|       |#ifndef OPENSSL_NO_COMP_ALG
  157|       |        if (mt == SSL3_MT_COMPRESSED_CERTIFICATE
  158|       |            && s->ext.compress_certificate_sent) {
  159|       |            st->hand_state = TLS_ST_CR_COMP_CERT;
  160|       |            return 1;
  161|       |        }
  162|       |#endif
  163|      0|        break;
  164|       |
  165|  3.62k|    case TLS_ST_CR_CERT:
  ------------------
  |  Branch (165:5): [True: 3.62k, False: 18.0k]
  ------------------
  166|  3.62k|    case TLS_ST_CR_COMP_CERT:
  ------------------
  |  Branch (166:5): [True: 0, False: 21.6k]
  ------------------
  167|  3.62k|        if (mt == SSL3_MT_CERTIFICATE_VERIFY) {
  ------------------
  |  |  322|  3.62k|#define SSL3_MT_CERTIFICATE_VERIFY 15
  ------------------
  |  Branch (167:13): [True: 3.62k, False: 0]
  ------------------
  168|  3.62k|            st->hand_state = TLS_ST_CR_CERT_VRFY;
  169|  3.62k|            return 1;
  170|  3.62k|        }
  171|      0|        break;
  172|       |
  173|  3.62k|    case TLS_ST_CR_CERT_VRFY:
  ------------------
  |  Branch (173:5): [True: 3.62k, False: 18.0k]
  ------------------
  174|  3.62k|        if (mt == SSL3_MT_FINISHED) {
  ------------------
  |  |  324|  3.62k|#define SSL3_MT_FINISHED 20
  ------------------
  |  Branch (174:13): [True: 3.62k, False: 0]
  ------------------
  175|  3.62k|            st->hand_state = TLS_ST_CR_FINISHED;
  176|  3.62k|            return 1;
  177|  3.62k|        }
  178|      0|        break;
  179|       |
  180|  7.16k|    case TLS_ST_OK:
  ------------------
  |  Branch (180:5): [True: 7.16k, False: 14.5k]
  ------------------
  181|  7.16k|        if (mt == SSL3_MT_NEWSESSION_TICKET) {
  ------------------
  |  |  315|  7.16k|#define SSL3_MT_NEWSESSION_TICKET 4
  ------------------
  |  Branch (181:13): [True: 7.16k, False: 0]
  ------------------
  182|  7.16k|            st->hand_state = TLS_ST_CR_SESSION_TICKET;
  183|  7.16k|            return 1;
  184|  7.16k|        }
  185|      0|        if (mt == SSL3_MT_KEY_UPDATE && !SSL_IS_QUIC_HANDSHAKE(s)) {
  ------------------
  |  |  328|      0|#define SSL3_MT_KEY_UPDATE 24
  ------------------
                      if (mt == SSL3_MT_KEY_UPDATE && !SSL_IS_QUIC_HANDSHAKE(s)) {
  ------------------
  |  |  311|      0|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  ------------------
  |  |  |  |   22|      0|#define TLS1_FLAGS_QUIC 0x2000
  |  |  ------------------
  ------------------
  |  Branch (185:13): [True: 0, False: 0]
  |  Branch (185:41): [True: 0, False: 0]
  ------------------
  186|      0|            st->hand_state = TLS_ST_CR_KEY_UPDATE;
  187|      0|            return 1;
  188|      0|        }
  189|      0|        if (mt == SSL3_MT_CERTIFICATE_REQUEST) {
  ------------------
  |  |  320|      0|#define SSL3_MT_CERTIFICATE_REQUEST 13
  ------------------
  |  Branch (189:13): [True: 0, False: 0]
  ------------------
  190|       |#if DTLS_MAX_VERSION_INTERNAL != DTLS1_2_VERSION
  191|       |            /* Restore digest for PHA before adding message.*/
  192|       |#error Internal DTLS version error
  193|       |#endif
  194|      0|            if (!SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|      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)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (194:17): [True: 0, False: 0]
  ------------------
  195|      0|                && s->post_handshake_auth == SSL_PHA_EXT_SENT) {
  ------------------
  |  Branch (195:20): [True: 0, False: 0]
  ------------------
  196|      0|                s->post_handshake_auth = SSL_PHA_REQUESTED;
  197|       |                /*
  198|       |                 * In TLS, this is called before the message is added to the
  199|       |                 * digest. In DTLS, this is expected to be called after adding
  200|       |                 * to the digest. Either move the digest restore, or add the
  201|       |                 * message here after the swap, or do it after the clientFinished?
  202|       |                 */
  203|      0|                if (!tls13_restore_handshake_digest_for_pha(s)) {
  ------------------
  |  Branch (203:21): [True: 0, False: 0]
  ------------------
  204|       |                    /* SSLfatal() already called */
  205|      0|                    return 0;
  206|      0|                }
  207|      0|                st->hand_state = TLS_ST_CR_CERT_REQ;
  208|      0|                return 1;
  209|      0|            }
  210|      0|        }
  211|      0|        break;
  212|  21.6k|    }
  213|       |
  214|       |    /* No valid transition found */
  215|      0|    return 0;
  216|  21.6k|}
statem_clnt.c:ossl_statem_client13_write_transition:
  437|  25.2k|{
  438|  25.2k|    OSSL_STATEM *st = &s->statem;
  439|       |
  440|       |    /*
  441|       |     * Note: There are no cases for TLS_ST_BEFORE because we haven't negotiated
  442|       |     * TLSv1.3 yet at that point. They are handled by
  443|       |     * ossl_statem_client_write_transition().
  444|       |     */
  445|  25.2k|    switch (st->hand_state) {
  446|      0|    default:
  ------------------
  |  Branch (446:5): [True: 0, False: 25.2k]
  ------------------
  447|       |        /* Shouldn't happen */
  448|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  449|      0|        return WRITE_TRAN_ERROR;
  450|       |
  451|      0|    case TLS_ST_CR_CERT_REQ:
  ------------------
  |  Branch (451:5): [True: 0, False: 25.2k]
  ------------------
  452|      0|        if (s->post_handshake_auth == SSL_PHA_REQUESTED) {
  ------------------
  |  Branch (452:13): [True: 0, False: 0]
  ------------------
  453|      0|            if (do_compressed_cert(s))
  ------------------
  |  Branch (453:17): [True: 0, False: 0]
  ------------------
  454|      0|                st->hand_state = TLS_ST_CW_COMP_CERT;
  455|      0|            else
  456|      0|                st->hand_state = TLS_ST_CW_CERT;
  457|      0|            return WRITE_TRAN_CONTINUE;
  458|      0|        }
  459|       |        /*
  460|       |         * We should only get here if we received a CertificateRequest after
  461|       |         * we already sent close_notify
  462|       |         */
  463|      0|        if (!ossl_assert((s->shutdown & SSL_SENT_SHUTDOWN) != 0)) {
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (463:13): [True: 0, False: 0]
  ------------------
  464|       |            /* Shouldn't happen - same as default case */
  465|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  466|      0|            return WRITE_TRAN_ERROR;
  467|      0|        }
  468|      0|        st->hand_state = TLS_ST_OK;
  469|      0|        return WRITE_TRAN_CONTINUE;
  470|       |
  471|  3.62k|    case TLS_ST_CR_FINISHED:
  ------------------
  |  Branch (471:5): [True: 3.62k, False: 21.5k]
  ------------------
  472|  3.62k|        if (s->early_data_state == SSL_EARLY_DATA_WRITE_RETRY
  ------------------
  |  Branch (472:13): [True: 0, False: 3.62k]
  ------------------
  473|  3.62k|            || s->early_data_state == SSL_EARLY_DATA_FINISHED_WRITING)
  ------------------
  |  Branch (473:16): [True: 0, False: 3.62k]
  ------------------
  474|      0|            st->hand_state = TLS_ST_PENDING_EARLY_DATA_END;
  475|  3.62k|        else if ((s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0
  ------------------
  |  |  404|  3.62k|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|  3.62k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (475:18): [True: 3.62k, False: 0]
  ------------------
  476|  3.62k|            && s->hello_retry_request == SSL_HRR_NONE)
  ------------------
  |  Branch (476:16): [True: 3.62k, False: 0]
  ------------------
  477|  3.62k|            st->hand_state = TLS_ST_CW_CHANGE;
  478|      0|        else if (s->s3.tmp.cert_req == 0)
  ------------------
  |  Branch (478:18): [True: 0, False: 0]
  ------------------
  479|      0|            st->hand_state = TLS_ST_CW_FINISHED;
  480|      0|        else if (do_compressed_cert(s))
  ------------------
  |  Branch (480:18): [True: 0, False: 0]
  ------------------
  481|      0|            st->hand_state = TLS_ST_CW_COMP_CERT;
  482|      0|        else
  483|      0|            st->hand_state = TLS_ST_CW_CERT;
  484|       |
  485|  3.62k|        s->ts_msg_read = ossl_time_now();
  486|  3.62k|        return WRITE_TRAN_CONTINUE;
  487|       |
  488|      0|    case TLS_ST_PENDING_EARLY_DATA_END:
  ------------------
  |  Branch (488:5): [True: 0, False: 25.2k]
  ------------------
  489|      0|        if (s->ext.early_data == SSL_EARLY_DATA_ACCEPTED && !SSL_NO_EOED(s)) {
  ------------------
  |  | 2074|      0|#define SSL_EARLY_DATA_ACCEPTED 2
  ------------------
                      if (s->ext.early_data == SSL_EARLY_DATA_ACCEPTED && !SSL_NO_EOED(s)) {
  ------------------
  |  |  315|      0|#define SSL_NO_EOED(s) SSL_IS_QUIC_HANDSHAKE(s)
  |  |  ------------------
  |  |  |  |  311|      0|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |   22|      0|#define TLS1_FLAGS_QUIC 0x2000
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (489:13): [True: 0, False: 0]
  |  Branch (489:61): [True: 0, False: 0]
  ------------------
  490|      0|            st->hand_state = TLS_ST_CW_END_OF_EARLY_DATA;
  491|      0|            return WRITE_TRAN_CONTINUE;
  492|      0|        }
  493|       |        /* Fall through */
  494|       |
  495|      0|    case TLS_ST_CW_END_OF_EARLY_DATA:
  ------------------
  |  Branch (495:5): [True: 0, False: 25.2k]
  ------------------
  496|  3.62k|    case TLS_ST_CW_CHANGE:
  ------------------
  |  Branch (496:5): [True: 3.62k, False: 21.5k]
  ------------------
  497|  3.62k|        if (s->s3.tmp.cert_req == 0)
  ------------------
  |  Branch (497:13): [True: 3.62k, False: 0]
  ------------------
  498|  3.62k|            st->hand_state = TLS_ST_CW_FINISHED;
  499|      0|        else if (do_compressed_cert(s))
  ------------------
  |  Branch (499:18): [True: 0, False: 0]
  ------------------
  500|      0|            st->hand_state = TLS_ST_CW_COMP_CERT;
  501|      0|        else
  502|      0|            st->hand_state = TLS_ST_CW_CERT;
  503|  3.62k|        return WRITE_TRAN_CONTINUE;
  504|       |
  505|      0|    case TLS_ST_CW_COMP_CERT:
  ------------------
  |  Branch (505:5): [True: 0, False: 25.2k]
  ------------------
  506|      0|    case TLS_ST_CW_CERT:
  ------------------
  |  Branch (506:5): [True: 0, False: 25.2k]
  ------------------
  507|       |        /* If a non-empty Certificate we also send CertificateVerify */
  508|      0|        st->hand_state = (s->s3.tmp.cert_req == 1) ? TLS_ST_CW_CERT_VRFY
  ------------------
  |  Branch (508:26): [True: 0, False: 0]
  ------------------
  509|      0|                                                   : TLS_ST_CW_FINISHED;
  510|      0|        return WRITE_TRAN_CONTINUE;
  511|       |
  512|      0|    case TLS_ST_CW_CERT_VRFY:
  ------------------
  |  Branch (512:5): [True: 0, False: 25.2k]
  ------------------
  513|      0|        st->hand_state = TLS_ST_CW_FINISHED;
  514|      0|        return WRITE_TRAN_CONTINUE;
  515|       |
  516|      0|    case TLS_ST_CR_KEY_UPDATE:
  ------------------
  |  Branch (516:5): [True: 0, False: 25.2k]
  ------------------
  517|      0|    case TLS_ST_CW_KEY_UPDATE:
  ------------------
  |  Branch (517:5): [True: 0, False: 25.2k]
  ------------------
  518|  7.16k|    case TLS_ST_CR_SESSION_TICKET:
  ------------------
  |  Branch (518:5): [True: 7.16k, False: 18.0k]
  ------------------
  519|  10.7k|    case TLS_ST_CW_FINISHED:
  ------------------
  |  Branch (519:5): [True: 3.62k, False: 21.5k]
  ------------------
  520|  10.7k|        st->hand_state = TLS_ST_OK;
  521|  10.7k|        return WRITE_TRAN_CONTINUE;
  522|       |
  523|  7.16k|    case TLS_ST_OK:
  ------------------
  |  Branch (523:5): [True: 7.16k, False: 18.0k]
  ------------------
  524|  7.16k|        if (s->key_update != SSL_KEY_UPDATE_NONE) {
  ------------------
  |  | 1071|  7.16k|#define SSL_KEY_UPDATE_NONE -1
  ------------------
  |  Branch (524:13): [True: 0, False: 7.16k]
  ------------------
  525|      0|            st->hand_state = TLS_ST_CW_KEY_UPDATE;
  526|      0|            return WRITE_TRAN_CONTINUE;
  527|      0|        }
  528|       |
  529|       |        /* Try to read from the server instead */
  530|  7.16k|        return WRITE_TRAN_FINISHED;
  531|  25.2k|    }
  532|  25.2k|}
statem_clnt.c:tls_construct_client_hello_aux:
 1399|  3.62k|{
 1400|  3.62k|    unsigned char *p;
 1401|  3.62k|    size_t sess_id_len;
 1402|  3.62k|    int i, protverr;
 1403|  3.62k|#ifndef OPENSSL_NO_COMP
 1404|  3.62k|    SSL_COMP *comp;
 1405|  3.62k|#endif
 1406|  3.62k|    SSL_SESSION *sess = s->session;
 1407|  3.62k|    unsigned char *session_id;
 1408|  3.62k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1409|       |
 1410|       |    /* Work out what SSL/TLS/DTLS version to use */
 1411|  3.62k|    protverr = ssl_set_client_hello_version(s);
 1412|  3.62k|    if (protverr != 0) {
  ------------------
  |  Branch (1412:9): [True: 0, False: 3.62k]
  ------------------
 1413|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, protverr);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1414|      0|        return CON_FUNC_ERROR;
 1415|      0|    }
 1416|       |
 1417|  3.62k|#ifndef OPENSSL_NO_ECH
 1418|       |    /* if we're doing ECH, re-use session ID setup earlier */
 1419|  3.62k|    if (s->ext.ech.es == NULL)
  ------------------
  |  Branch (1419:9): [True: 3.62k, False: 0]
  ------------------
 1420|  3.62k|#endif
 1421|  3.62k|        if (sess == NULL
  ------------------
  |  Branch (1421:13): [True: 3.62k, False: 0]
  ------------------
 1422|      0|            || !ssl_version_supported(s, sess->ssl_version, NULL)
  ------------------
  |  Branch (1422:16): [True: 0, False: 0]
  ------------------
 1423|  3.62k|            || !SSL_SESSION_is_resumable(sess)) {
  ------------------
  |  Branch (1423:16): [True: 0, False: 0]
  ------------------
 1424|  3.62k|            if (s->hello_retry_request == SSL_HRR_NONE
  ------------------
  |  Branch (1424:17): [True: 3.62k, False: 0]
  ------------------
 1425|  3.62k|                && !ssl_get_new_session(s, 0)) {
  ------------------
  |  Branch (1425:20): [True: 0, False: 3.62k]
  ------------------
 1426|       |                /* SSLfatal() already called */
 1427|      0|                return CON_FUNC_ERROR;
 1428|      0|            }
 1429|  3.62k|        }
 1430|       |    /* else use the pre-loaded session */
 1431|       |
 1432|  3.62k|#ifndef OPENSSL_NO_ECH
 1433|       |    /* use different client_random fields for inner and outer */
 1434|  3.62k|    if (s->ext.ech.es != NULL && s->ext.ech.ch_depth == 1)
  ------------------
  |  Branch (1434:9): [True: 0, False: 3.62k]
  |  Branch (1434:34): [True: 0, False: 0]
  ------------------
 1435|      0|        p = s->ext.ech.client_random;
 1436|  3.62k|    else
 1437|  3.62k|#endif
 1438|  3.62k|        p = s->s3.client_random;
 1439|       |
 1440|       |    /*
 1441|       |     * for DTLS if client_random is initialized, reuse it, we are
 1442|       |     * required to use same upon reply to HelloVerify
 1443|       |     */
 1444|  3.62k|    if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
 1445|      0|        size_t idx;
 1446|      0|        i = 1;
 1447|      0|        for (idx = 0; idx < sizeof(s->s3.client_random); idx++) {
  ------------------
  |  Branch (1447:23): [True: 0, False: 0]
  ------------------
 1448|      0|            if (p[idx]) {
  ------------------
  |  Branch (1448:17): [True: 0, False: 0]
  ------------------
 1449|      0|                i = 0;
 1450|      0|                break;
 1451|      0|            }
 1452|      0|        }
 1453|  3.62k|    } else {
 1454|  3.62k|        i = (s->hello_retry_request == SSL_HRR_NONE);
 1455|  3.62k|    }
 1456|       |
 1457|  3.62k|    if (i && ssl_fill_hello_random(s, 0, p, sizeof(s->s3.client_random), DOWNGRADE_NONE) <= 0) {
  ------------------
  |  Branch (1457:9): [True: 3.62k, False: 0]
  |  Branch (1457:14): [True: 0, False: 3.62k]
  ------------------
 1458|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1459|      0|        return CON_FUNC_ERROR;
 1460|      0|    }
 1461|       |
 1462|       |    /*-
 1463|       |     * version indicates the negotiated version: for example from
 1464|       |     * an SSLv2/v3 compatible client hello). The client_version
 1465|       |     * field is the maximum version we permit and it is also
 1466|       |     * used in RSA encrypted premaster secrets. Some servers can
 1467|       |     * choke if we initially report a higher version then
 1468|       |     * renegotiate to a lower one in the premaster secret. This
 1469|       |     * didn't happen with TLS 1.0 as most servers supported it
 1470|       |     * but it can with TLS 1.1 or later if the server only supports
 1471|       |     * 1.0.
 1472|       |     *
 1473|       |     * Possible scenario with previous logic:
 1474|       |     *      1. Client hello indicates TLS 1.2
 1475|       |     *      2. Server hello says TLS 1.0
 1476|       |     *      3. RSA encrypted premaster secret uses 1.2.
 1477|       |     *      4. Handshake proceeds using TLS 1.0.
 1478|       |     *      5. Server sends hello request to renegotiate.
 1479|       |     *      6. Client hello indicates TLS v1.0 as we now
 1480|       |     *         know that is maximum server supports.
 1481|       |     *      7. Server chokes on RSA encrypted premaster secret
 1482|       |     *         containing version 1.0.
 1483|       |     *
 1484|       |     * For interoperability it should be OK to always use the
 1485|       |     * maximum version we support in client hello and then rely
 1486|       |     * on the checking of version to ensure the servers isn't
 1487|       |     * being inconsistent: for example initially negotiating with
 1488|       |     * TLS 1.0 and renegotiating with TLS 1.2. We do this by using
 1489|       |     * client_version in client hello and not resetting it to
 1490|       |     * the negotiated version.
 1491|       |     *
 1492|       |     * For TLS 1.3 we always set the ClientHello version to 1.2 and rely on the
 1493|       |     * supported_versions extension for the real supported versions.
 1494|       |     */
 1495|  3.62k|    if (!WPACKET_put_bytes_u16(pkt, s->client_version)
  ------------------
  |  |  911|  7.25k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1495:9): [True: 0, False: 3.62k]
  ------------------
 1496|  3.62k|        || !WPACKET_memcpy(pkt, p, SSL3_RANDOM_SIZE)) {
  ------------------
  |  |  137|  3.62k|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1496:12): [True: 0, False: 3.62k]
  ------------------
 1497|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1498|      0|        return CON_FUNC_ERROR;
 1499|      0|    }
 1500|       |
 1501|       |    /* Session ID */
 1502|  3.62k|    session_id = s->session->session_id;
 1503|  3.62k|#ifndef OPENSSL_NO_ECH
 1504|       |    /* same session ID is used for inner/outer when doing ECH */
 1505|  3.62k|    if (s->ext.ech.es != NULL) {
  ------------------
  |  Branch (1505:9): [True: 0, False: 3.62k]
  ------------------
 1506|      0|        if (s->version != TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1506:13): [True: 0, False: 0]
  ------------------
 1507|      0|            SSLfatal(s, SSL_AD_PROTOCOL_VERSION, SSL_R_UNSUPPORTED_SSL_VERSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1508|      0|            return CON_FUNC_ERROR;
 1509|      0|        }
 1510|      0|        if ((s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0)
  ------------------
  |  |  404|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1510:13): [True: 0, False: 0]
  ------------------
 1511|      0|            sess_id_len = sizeof(s->tmp_session_id);
 1512|      0|        else
 1513|      0|            sess_id_len = 0;
 1514|  3.62k|    } else {
 1515|  3.62k|#endif
 1516|  3.62k|        if (s->new_session || s->session->ssl_version == TLS1_3_VERSION) {
  ------------------
  |  |   27|  3.62k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1516:13): [True: 0, False: 3.62k]
  |  Branch (1516:31): [True: 3.62k, False: 0]
  ------------------
 1517|  3.62k|            if (s->version == TLS1_3_VERSION
  ------------------
  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1517:17): [True: 3.62k, False: 0]
  ------------------
 1518|  3.62k|                && (s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0) {
  ------------------
  |  |  404|  3.62k|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|  3.62k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1518:20): [True: 3.62k, False: 0]
  ------------------
 1519|  3.62k|                sess_id_len = sizeof(s->tmp_session_id);
 1520|  3.62k|                s->tmp_session_id_len = sess_id_len;
 1521|  3.62k|                session_id = s->tmp_session_id;
 1522|  3.62k|                if (s->hello_retry_request == SSL_HRR_NONE
  ------------------
  |  Branch (1522:21): [True: 3.62k, False: 0]
  ------------------
 1523|  3.62k|                    && RAND_bytes_ex(sctx->libctx, s->tmp_session_id,
  ------------------
  |  Branch (1523:24): [True: 0, False: 3.62k]
  ------------------
 1524|  3.62k|                           sess_id_len, 0)
 1525|  3.62k|                        <= 0) {
 1526|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1527|      0|                    return CON_FUNC_ERROR;
 1528|      0|                }
 1529|  3.62k|            } else {
 1530|      0|                sess_id_len = 0;
 1531|      0|            }
 1532|  3.62k|        } else {
 1533|      0|            assert(s->session->session_id_length <= sizeof(s->session->session_id));
  ------------------
  |  Branch (1533:13): [True: 0, False: 0]
  |  Branch (1533:13): [True: 0, False: 0]
  ------------------
 1534|      0|            sess_id_len = s->session->session_id_length;
 1535|      0|            if (s->version == TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1535:17): [True: 0, False: 0]
  ------------------
 1536|      0|                s->tmp_session_id_len = sess_id_len;
 1537|      0|                memcpy(s->tmp_session_id, s->session->session_id, sess_id_len);
 1538|      0|            }
 1539|      0|        }
 1540|  3.62k|#ifndef OPENSSL_NO_ECH
 1541|  3.62k|    }
 1542|  3.62k|#endif
 1543|       |
 1544|  3.62k|    if (!WPACKET_start_sub_packet_u8(pkt)
  ------------------
  |  |  810|  7.25k|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (1544:9): [True: 0, False: 3.62k]
  ------------------
 1545|  3.62k|        || (sess_id_len != 0 && !WPACKET_memcpy(pkt, session_id, sess_id_len))
  ------------------
  |  Branch (1545:13): [True: 3.62k, False: 0]
  |  Branch (1545:33): [True: 0, False: 3.62k]
  ------------------
 1546|  3.62k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1546:12): [True: 0, False: 3.62k]
  ------------------
 1547|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1548|      0|        return CON_FUNC_ERROR;
 1549|      0|    }
 1550|       |
 1551|       |    /* cookie stuff for DTLS */
 1552|  3.62k|    if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
 1553|      0|        if (s->d1->cookie_len > sizeof(s->d1->cookie)
  ------------------
  |  Branch (1553:13): [True: 0, False: 0]
  ------------------
 1554|      0|            || !WPACKET_sub_memcpy_u8(pkt, s->d1->cookie,
  ------------------
  |  |  938|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (1554:16): [True: 0, False: 0]
  ------------------
 1555|      0|                s->d1->cookie_len)) {
 1556|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1557|      0|            return CON_FUNC_ERROR;
 1558|      0|        }
 1559|      0|    }
 1560|       |
 1561|       |    /* Ciphers supported */
 1562|  3.62k|    if (!WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|  3.62k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1562:9): [True: 0, False: 3.62k]
  ------------------
 1563|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1564|      0|        return CON_FUNC_ERROR;
 1565|      0|    }
 1566|       |
 1567|  3.62k|    if (!ssl_cipher_list_to_bytes(s, SSL_get_ciphers(SSL_CONNECTION_GET_SSL(s)),
  ------------------
  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  |  Branch (1567:9): [True: 0, False: 3.62k]
  ------------------
 1568|  3.62k|            pkt)) {
 1569|       |        /* SSLfatal() already called */
 1570|      0|        return CON_FUNC_ERROR;
 1571|      0|    }
 1572|  3.62k|    if (!WPACKET_close(pkt)) {
  ------------------
  |  Branch (1572:9): [True: 0, False: 3.62k]
  ------------------
 1573|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1574|      0|        return CON_FUNC_ERROR;
 1575|      0|    }
 1576|       |
 1577|       |    /* COMPRESSION */
 1578|  3.62k|    if (!WPACKET_start_sub_packet_u8(pkt)) {
  ------------------
  |  |  810|  3.62k|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (1578:9): [True: 0, False: 3.62k]
  ------------------
 1579|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1580|      0|        return CON_FUNC_ERROR;
 1581|      0|    }
 1582|  3.62k|#ifndef OPENSSL_NO_COMP
 1583|  3.62k|    if (ssl_allow_compression(s)
  ------------------
  |  Branch (1583:9): [True: 0, False: 3.62k]
  ------------------
 1584|      0|        && sctx->comp_methods
  ------------------
  |  Branch (1584:12): [True: 0, False: 0]
  ------------------
 1585|      0|        && (SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|      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)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1586|      0|            || s->s3.tmp.max_ver < TLS1_3_VERSION)) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1586:16): [True: 0, False: 0]
  ------------------
 1587|      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))
  ------------------
 1588|      0|        for (i = 0; i < compnum; i++) {
  ------------------
  |  Branch (1588:21): [True: 0, False: 0]
  ------------------
 1589|      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)))
  ------------------
 1590|      0|            if (!WPACKET_put_bytes_u8(pkt, comp->id)) {
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (1590:17): [True: 0, False: 0]
  ------------------
 1591|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1592|      0|                return CON_FUNC_ERROR;
 1593|      0|            }
 1594|      0|        }
 1595|      0|    }
 1596|  3.62k|#endif
 1597|       |    /* Add the NULL method */
 1598|  3.62k|    if (!WPACKET_put_bytes_u8(pkt, 0) || !WPACKET_close(pkt)) {
  ------------------
  |  |  909|  7.25k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (1598:9): [True: 0, False: 3.62k]
  |  Branch (1598:42): [True: 0, False: 3.62k]
  ------------------
 1599|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1600|      0|        return CON_FUNC_ERROR;
 1601|      0|    }
 1602|       |
 1603|       |    /* TLS extensions */
 1604|  3.62k|    if (!tls_construct_extensions(s, pkt, SSL_EXT_CLIENT_HELLO, NULL, 0)) {
  ------------------
  |  |  300|  3.62k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (1604:9): [True: 0, False: 3.62k]
  ------------------
 1605|       |        /* SSLfatal() already called */
 1606|      0|        return CON_FUNC_ERROR;
 1607|      0|    }
 1608|       |
 1609|  3.62k|    return CON_FUNC_SUCCESS;
 1610|  3.62k|}
statem_clnt.c:set_client_ciphersuite:
 1640|  3.62k|{
 1641|  3.62k|    STACK_OF(SSL_CIPHER) *sk;
  ------------------
  |  |   33|  3.62k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1642|  3.62k|    const SSL_CIPHER *c;
 1643|  3.62k|    int i;
 1644|  3.62k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1645|       |
 1646|  3.62k|    c = ssl_get_cipher_by_char(s, cipherchars, 0);
 1647|  3.62k|    if (c == NULL) {
  ------------------
  |  Branch (1647:9): [True: 0, False: 3.62k]
  ------------------
 1648|       |        /* unknown cipher */
 1649|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_UNKNOWN_CIPHER_RETURNED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1650|      0|        return 0;
 1651|      0|    }
 1652|       |    /*
 1653|       |     * If it is a disabled cipher we either didn't send it in client hello,
 1654|       |     * or it's not allowed for the selected protocol. So we return an error.
 1655|       |     */
 1656|  3.62k|    if (ssl_cipher_disabled(s, c, SSL_SECOP_CIPHER_CHECK, 1)) {
  ------------------
  |  | 2758|  3.62k|#define SSL_SECOP_CIPHER_CHECK (3 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2730|  3.62k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1656:9): [True: 0, False: 3.62k]
  ------------------
 1657|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_WRONG_CIPHER_RETURNED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1658|      0|        return 0;
 1659|      0|    }
 1660|       |
 1661|  3.62k|    sk = ssl_get_ciphers_by_id(s);
 1662|  3.62k|    i = sk_SSL_CIPHER_find(sk, c);
  ------------------
  |  | 1045|  3.62k|#define sk_SSL_CIPHER_find(sk, ptr) OPENSSL_sk_find(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
 1663|  3.62k|    if (i < 0) {
  ------------------
  |  Branch (1663:9): [True: 0, False: 3.62k]
  ------------------
 1664|       |        /* we did not say we would use this cipher */
 1665|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_WRONG_CIPHER_RETURNED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1666|      0|        return 0;
 1667|      0|    }
 1668|       |
 1669|  3.62k|    if (SSL_CONNECTION_IS_TLS13(s) && s->s3.tmp.new_cipher != NULL
  ------------------
  |  |  273|  7.25k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1669:39): [True: 0, False: 3.62k]
  ------------------
 1670|      0|        && s->s3.tmp.new_cipher->id != c->id) {
  ------------------
  |  Branch (1670:12): [True: 0, False: 0]
  ------------------
 1671|       |        /* ServerHello selected a different ciphersuite to that in the HRR */
 1672|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_WRONG_CIPHER_RETURNED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1673|      0|        return 0;
 1674|      0|    }
 1675|       |
 1676|       |    /*
 1677|       |     * Depending on the session caching (internal/external), the cipher
 1678|       |     * and/or cipher_id values may not be set. Make sure that cipher_id is
 1679|       |     * set and use it for comparison.
 1680|       |     */
 1681|  3.62k|    if (s->session->cipher != NULL)
  ------------------
  |  Branch (1681:9): [True: 0, False: 3.62k]
  ------------------
 1682|      0|        s->session->cipher_id = s->session->cipher->id;
 1683|  3.62k|    if (s->hit && (s->session->cipher_id != c->id)) {
  ------------------
  |  Branch (1683:9): [True: 0, False: 3.62k]
  |  Branch (1683:19): [True: 0, False: 0]
  ------------------
 1684|      0|        if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      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 (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      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 (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1685|      0|            const EVP_MD *md = ssl_md(sctx, c->algorithm2);
 1686|       |
 1687|      0|            if (!ossl_assert(s->session->cipher != NULL)) {
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (1687:17): [True: 0, False: 0]
  ------------------
 1688|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1689|      0|                return 0;
 1690|      0|            }
 1691|       |            /*
 1692|       |             * In TLSv1.3 it is valid for the server to select a different
 1693|       |             * ciphersuite as long as the hash is the same.
 1694|       |             */
 1695|      0|            if (md == NULL
  ------------------
  |  Branch (1695:17): [True: 0, False: 0]
  ------------------
 1696|      0|                || md != ssl_md(sctx, s->session->cipher->algorithm2)) {
  ------------------
  |  Branch (1696:20): [True: 0, False: 0]
  ------------------
 1697|      0|                SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1698|      0|                    SSL_R_CIPHERSUITE_DIGEST_HAS_CHANGED);
 1699|      0|                return 0;
 1700|      0|            }
 1701|      0|        } else {
 1702|       |            /*
 1703|       |             * Prior to TLSv1.3 resuming a session always meant using the same
 1704|       |             * ciphersuite.
 1705|       |             */
 1706|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1707|      0|                SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED);
 1708|      0|            return 0;
 1709|      0|        }
 1710|      0|    }
 1711|  3.62k|    s->s3.tmp.new_cipher = c;
 1712|       |
 1713|  3.62k|    return 1;
 1714|  3.62k|}
statem_clnt.c:tls_process_encrypted_extensions:
 4492|  3.62k|{
 4493|  3.62k|    PACKET extensions;
 4494|  3.62k|    RAW_EXTENSION *rawexts = NULL;
 4495|       |
 4496|  3.62k|    if (!PACKET_as_length_prefixed_2(pkt, &extensions)
  ------------------
  |  Branch (4496:9): [True: 0, False: 3.62k]
  ------------------
 4497|  3.62k|        || PACKET_remaining(pkt) != 0) {
  ------------------
  |  Branch (4497:12): [True: 0, False: 3.62k]
  ------------------
 4498|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4499|      0|        goto err;
 4500|      0|    }
 4501|       |
 4502|  3.62k|    if (!tls_collect_extensions(s, &extensions,
  ------------------
  |  Branch (4502:9): [True: 0, False: 3.62k]
  ------------------
 4503|  3.62k|            SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS, &rawexts,
  ------------------
  |  |  304|  3.62k|#define SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS 0x00400
  ------------------
 4504|  3.62k|            NULL, 1)
 4505|  3.62k|        || !tls_parse_all_extensions(s, SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS,
  ------------------
  |  |  304|  3.62k|#define SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS 0x00400
  ------------------
  |  Branch (4505:12): [True: 0, False: 3.62k]
  ------------------
 4506|  3.62k|            rawexts, NULL, 0, 1)) {
 4507|       |        /* SSLfatal() already called */
 4508|      0|        goto err;
 4509|      0|    }
 4510|       |
 4511|  3.62k|    OPENSSL_free(rawexts);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4512|  3.62k|    return MSG_PROCESS_CONTINUE_READING;
 4513|       |
 4514|      0|err:
 4515|      0|    OPENSSL_free(rawexts);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4516|      0|    return MSG_PROCESS_ERROR;
 4517|  3.62k|}

ssl3_do_write:
   64|  39.8k|{
   65|  39.8k|    int ret;
   66|  39.8k|    size_t written = 0;
   67|  39.8k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  39.8k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
   68|  39.8k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  39.8k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
   69|       |
   70|       |    /*
   71|       |     * If we're running the test suite then we may need to mutate the message
   72|       |     * we've been asked to write. Does not happen in normal operation.
   73|       |     */
   74|  39.8k|    if (s->statem.mutate_handshake_cb != NULL
  ------------------
  |  Branch (74:9): [True: 0, False: 39.8k]
  ------------------
   75|      0|        && !s->statem.write_in_progress
  ------------------
  |  Branch (75:12): [True: 0, False: 0]
  ------------------
   76|      0|        && type == SSL3_RT_HANDSHAKE
  ------------------
  |  |  221|  39.8k|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (76:12): [True: 0, False: 0]
  ------------------
   77|      0|        && s->init_num >= SSL3_HM_HEADER_LENGTH) {
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (77:12): [True: 0, False: 0]
  ------------------
   78|      0|        unsigned char *msg;
   79|      0|        size_t msglen;
   80|       |
   81|      0|        if (!s->statem.mutate_handshake_cb((unsigned char *)s->init_buf->data,
  ------------------
  |  Branch (81:13): [True: 0, False: 0]
  ------------------
   82|      0|                s->init_num,
   83|      0|                &msg, &msglen,
   84|      0|                s->statem.mutatearg))
   85|      0|            return -1;
   86|      0|        if (msglen < SSL3_HM_HEADER_LENGTH
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (86:13): [True: 0, False: 0]
  ------------------
   87|      0|            || !BUF_MEM_grow(s->init_buf, msglen))
  ------------------
  |  Branch (87:16): [True: 0, False: 0]
  ------------------
   88|      0|            return -1;
   89|      0|        memcpy(s->init_buf->data, msg, msglen);
   90|      0|        s->init_num = msglen;
   91|      0|        s->init_msg = s->init_buf->data + SSL3_HM_HEADER_LENGTH;
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
   92|      0|        s->statem.finish_mutate_handshake_cb(s->statem.mutatearg);
   93|      0|        s->statem.write_in_progress = 1;
   94|      0|    }
   95|       |
   96|  39.8k|    ret = ssl3_write_bytes(ssl, type, &s->init_buf->data[s->init_off],
   97|  39.8k|        s->init_num, &written);
   98|  39.8k|    if (ret <= 0)
  ------------------
  |  Branch (98:9): [True: 0, False: 39.8k]
  ------------------
   99|      0|        return -1;
  100|  39.8k|    if (type == SSL3_RT_HANDSHAKE)
  ------------------
  |  |  221|  39.8k|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (100:9): [True: 32.5k, False: 7.25k]
  ------------------
  101|       |        /*
  102|       |         * should not be done for 'Hello Request's, but in that case we'll
  103|       |         * ignore the result anyway
  104|       |         * TLS1.3 KeyUpdate and NewSessionTicket do not need to be added
  105|       |         */
  106|  32.5k|        if (!SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|  65.1k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  65.1k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  32.5k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  32.5k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 32.5k, False: 0]
  |  |  ------------------
  |  |  274|  32.5k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  32.5k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  65.1k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 32.5k, False: 0]
  |  |  ------------------
  |  |  275|  65.1k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  32.5k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  32.5k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 28.9k, False: 3.62k]
  |  |  ------------------
  ------------------
  107|  28.9k|            || (s->statem.hand_state != TLS_ST_SW_SESSION_TICKET
  ------------------
  |  Branch (107:17): [True: 21.7k, False: 7.16k]
  ------------------
  108|  21.7k|                && s->statem.hand_state != TLS_ST_CW_KEY_UPDATE
  ------------------
  |  Branch (108:20): [True: 21.7k, False: 0]
  ------------------
  109|  21.7k|                && s->statem.hand_state != TLS_ST_SW_KEY_UPDATE))
  ------------------
  |  Branch (109:20): [True: 21.7k, False: 0]
  ------------------
  110|  25.4k|            if (!ssl3_finish_mac(s,
  ------------------
  |  Branch (110:17): [True: 0, False: 25.4k]
  ------------------
  111|  25.4k|                    (unsigned char *)&s->init_buf->data[s->init_off],
  112|  25.4k|                    written))
  113|      0|                return -1;
  114|  39.8k|    if (written == s->init_num) {
  ------------------
  |  Branch (114:9): [True: 39.8k, False: 0]
  ------------------
  115|  39.8k|        s->statem.write_in_progress = 0;
  116|  39.8k|        if (s->msg_callback)
  ------------------
  |  Branch (116:13): [True: 0, False: 39.8k]
  ------------------
  117|      0|            s->msg_callback(1, s->version, type, s->init_buf->data,
  118|      0|                (size_t)(s->init_off + s->init_num), ussl,
  119|      0|                s->msg_callback_arg);
  120|  39.8k|        return 1;
  121|  39.8k|    }
  122|      0|    s->init_off += written;
  123|      0|    s->init_num -= written;
  124|      0|    return 0;
  125|  39.8k|}
tls_close_construct_packet:
  128|  39.8k|{
  129|  39.8k|    size_t msglen;
  130|       |
  131|  39.8k|    if ((htype != SSL3_MT_CHANGE_CIPHER_SPEC && !WPACKET_close(pkt))
  ------------------
  |  |  337|  79.6k|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (131:10): [True: 32.5k, False: 7.25k]
  |  Branch (131:49): [True: 0, False: 32.5k]
  ------------------
  132|  39.8k|        || !WPACKET_get_length(pkt, &msglen)
  ------------------
  |  Branch (132:12): [True: 0, False: 39.8k]
  ------------------
  133|  39.8k|        || msglen > INT_MAX)
  ------------------
  |  Branch (133:12): [True: 0, False: 39.8k]
  ------------------
  134|      0|        return 0;
  135|  39.8k|    s->init_num = (int)msglen;
  136|  39.8k|    s->init_off = 0;
  137|       |
  138|  39.8k|    return 1;
  139|  39.8k|}
tls_setup_handshake:
  142|  7.25k|{
  143|  7.25k|    int ver_min, ver_max, ok;
  144|  7.25k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  7.25k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  145|  7.25k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  7.25k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  146|       |
  147|  7.25k|    if (!ssl3_init_finished_mac(s)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 7.25k]
  ------------------
  148|       |        /* SSLfatal() already called */
  149|      0|        return 0;
  150|      0|    }
  151|       |
  152|       |    /* Reset any extension flags */
  153|  7.25k|    memset(s->ext.extflags, 0, sizeof(s->ext.extflags));
  154|       |
  155|  7.25k|    if (ssl_get_min_max_version(s, &ver_min, &ver_max, NULL) != 0) {
  ------------------
  |  Branch (155:9): [True: 0, False: 7.25k]
  ------------------
  156|      0|        SSLfatal(s, SSL_AD_PROTOCOL_VERSION, SSL_R_NO_PROTOCOLS_AVAILABLE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  157|      0|        return 0;
  158|      0|    }
  159|       |
  160|       |    /* Sanity check that we have MD5-SHA1 if we need it */
  161|  7.25k|    if (sctx->ssl_digest_methods[SSL_MD_MD5_SHA1_IDX] == NULL) {
  ------------------
  |  |  202|  7.25k|#define SSL_MD_MD5_SHA1_IDX 9
  ------------------
  |  Branch (161:9): [True: 0, False: 7.25k]
  ------------------
  162|      0|        int negotiated_minversion;
  163|      0|        int md5sha1_needed_maxversion = SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|      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)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  164|      0|            ? DTLS1_VERSION
  ------------------
  |  |   28|      0|#define DTLS1_VERSION 0xFEFF
  ------------------
  165|      0|            : TLS1_1_VERSION;
  ------------------
  |  |   25|      0|#define TLS1_1_VERSION 0x0302
  ------------------
  166|       |
  167|       |        /* We don't have MD5-SHA1 - do we need it? */
  168|      0|        if (ssl_version_cmp(s, ver_max, md5sha1_needed_maxversion) <= 0) {
  ------------------
  |  Branch (168:13): [True: 0, False: 0]
  ------------------
  169|      0|            SSLfatal_data(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  159|      0|        ossl_statem_fatal)
  ------------------
                          SSLfatal_data(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  | 1242|      0|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      0|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
  170|      0|                SSL_R_NO_SUITABLE_DIGEST_ALGORITHM,
  ------------------
  |  |  216|      0|#define SSL_R_NO_SUITABLE_DIGEST_ALGORITHM 297
  ------------------
  171|      0|                "The max supported SSL/TLS version needs the"
  172|      0|                " MD5-SHA1 digest but it is not available"
  173|      0|                " in the loaded providers. Use (D)TLSv1.2 or"
  174|      0|                " above, or load different providers");
  175|      0|            return 0;
  176|      0|        }
  177|       |
  178|      0|        ok = 1;
  179|       |
  180|       |        /* Don't allow TLSv1.1 or below to be negotiated */
  181|      0|        negotiated_minversion = SSL_CONNECTION_IS_DTLS(s) ? DTLS1_2_VERSION : TLS1_2_VERSION;
  ------------------
  |  |  266|      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)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266: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
  ------------------
  182|      0|        if (ssl_version_cmp(s, ver_min, negotiated_minversion) < 0)
  ------------------
  |  Branch (182:13): [True: 0, False: 0]
  ------------------
  183|      0|            ok = SSL_set_min_proto_version(ssl, negotiated_minversion);
  ------------------
  |  | 1591|      0|    SSL_ctrl(s, SSL_CTRL_SET_MIN_PROTO_VERSION, version, NULL)
  |  |  ------------------
  |  |  |  | 1403|      0|#define SSL_CTRL_SET_MIN_PROTO_VERSION 123
  |  |  ------------------
  ------------------
  184|      0|        if (!ok) {
  ------------------
  |  Branch (184:13): [True: 0, False: 0]
  ------------------
  185|       |            /* Shouldn't happen */
  186|      0|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  187|      0|            return 0;
  188|      0|        }
  189|      0|    }
  190|       |
  191|  7.25k|    ok = 0;
  192|  7.25k|    if (s->server) {
  ------------------
  |  Branch (192:9): [True: 3.62k, False: 3.62k]
  ------------------
  193|  3.62k|        STACK_OF(SSL_CIPHER) *ciphers = SSL_get_ciphers(ssl);
  ------------------
  |  |   33|  3.62k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  194|  3.62k|        int i;
  195|       |
  196|       |        /*
  197|       |         * Sanity check that the maximum version we accept has ciphers
  198|       |         * enabled. For clients we do this check during construction of the
  199|       |         * ClientHello.
  200|       |         */
  201|  3.62k|        for (i = 0; i < sk_SSL_CIPHER_num(ciphers); i++) {
  ------------------
  |  | 1028|  3.62k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (201:21): [True: 3.62k, False: 0]
  ------------------
  202|  3.62k|            const SSL_CIPHER *c = sk_SSL_CIPHER_value(ciphers, i);
  ------------------
  |  | 1029|  3.62k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
  203|  3.62k|            int cipher_minprotover = SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  204|  3.62k|                ? c->min_dtls
  205|  3.62k|                : c->min_tls;
  206|  3.62k|            int cipher_maxprotover = SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  207|  3.62k|                ? c->max_dtls
  208|  3.62k|                : c->max_tls;
  209|       |
  210|  3.62k|            if (ssl_version_cmp(s, ver_max, cipher_minprotover) >= 0
  ------------------
  |  Branch (210:17): [True: 3.62k, False: 0]
  ------------------
  211|  3.62k|                && ssl_version_cmp(s, ver_max, cipher_maxprotover) <= 0) {
  ------------------
  |  Branch (211:20): [True: 3.62k, False: 0]
  ------------------
  212|  3.62k|                ok = 1;
  213|  3.62k|                break;
  214|  3.62k|            }
  215|  3.62k|        }
  216|  3.62k|        if (!ok) {
  ------------------
  |  Branch (216:13): [True: 0, False: 3.62k]
  ------------------
  217|      0|            SSLfatal_data(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  159|      0|        ossl_statem_fatal)
  ------------------
                          SSLfatal_data(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  | 1242|      0|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      0|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
  218|      0|                SSL_R_NO_CIPHERS_AVAILABLE,
  ------------------
  |  |  198|      0|#define SSL_R_NO_CIPHERS_AVAILABLE 181
  ------------------
  219|      0|                "No ciphers enabled for max supported "
  220|      0|                "SSL/TLS version");
  221|      0|            return 0;
  222|      0|        }
  223|  3.62k|        if (SSL_IS_FIRST_HANDSHAKE(s)) {
  ------------------
  |  |  285|  3.62k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  286|  3.62k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  224|       |            /* N.B. s->session_ctx == s->ctx here */
  225|  3.62k|            ssl_tsan_counter(s->session_ctx, &s->session_ctx->stats.sess_accept);
  226|  3.62k|        } else {
  227|       |            /* N.B. s->ctx may not equal s->session_ctx */
  228|      0|            ssl_tsan_counter(sctx, &sctx->stats.sess_accept_renegotiate);
  229|       |
  230|      0|            s->s3.tmp.cert_request = 0;
  231|      0|        }
  232|  3.62k|    } else {
  233|  3.62k|        if (SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  285|  3.62k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  286|  3.62k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  234|  3.62k|            ssl_tsan_counter(s->session_ctx, &s->session_ctx->stats.sess_connect);
  235|      0|        else
  236|      0|            ssl_tsan_counter(s->session_ctx,
  237|      0|                &s->session_ctx->stats.sess_connect_renegotiate);
  238|       |
  239|       |        /* mark client_random uninitialized */
  240|  3.62k|        memset(s->s3.client_random, 0, sizeof(s->s3.client_random));
  241|  3.62k|        s->hit = 0;
  242|       |
  243|  3.62k|        s->s3.tmp.cert_req = 0;
  244|       |
  245|  3.62k|        if (SSL_CONNECTION_IS_DTLS(s))
  ------------------
  |  |  266|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  246|      0|            s->statem.use_timer = 1;
  247|  3.62k|    }
  248|       |
  249|  7.25k|    return 1;
  250|  7.25k|}
tls_construct_cert_verify:
  315|  3.62k|{
  316|  3.62k|    EVP_PKEY *pkey = NULL;
  317|  3.62k|    const EVP_MD *md = NULL;
  318|  3.62k|    EVP_MD_CTX *mctx = NULL;
  319|  3.62k|    EVP_PKEY_CTX *pctx = NULL;
  320|  3.62k|    size_t hdatalen = 0, siglen = 0;
  321|  3.62k|    void *hdata;
  322|  3.62k|    unsigned char *sig = NULL;
  323|  3.62k|    unsigned char tls13tbs[TLS13_TBS_PREAMBLE_SIZE + EVP_MAX_MD_SIZE];
  324|  3.62k|    const SIGALG_LOOKUP *lu = s->s3.tmp.sigalg;
  325|  3.62k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  326|  3.62k|    OSSL_PARAM params[3], *p = params;
  327|       |
  328|  3.62k|    if (lu == NULL || s->s3.tmp.cert == NULL) {
  ------------------
  |  Branch (328:9): [True: 0, False: 3.62k]
  |  Branch (328:23): [True: 0, False: 3.62k]
  ------------------
  329|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  330|      0|        goto err;
  331|      0|    }
  332|  3.62k|    pkey = s->s3.tmp.cert->privatekey;
  333|       |
  334|  3.62k|    if (pkey == NULL || !tls1_lookup_md(sctx, lu, &md)) {
  ------------------
  |  Branch (334:9): [True: 0, False: 3.62k]
  |  Branch (334:25): [True: 0, False: 3.62k]
  ------------------
  335|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  336|      0|        goto err;
  337|      0|    }
  338|       |
  339|  3.62k|    mctx = EVP_MD_CTX_new();
  340|  3.62k|    if (mctx == NULL) {
  ------------------
  |  Branch (340:9): [True: 0, False: 3.62k]
  ------------------
  341|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  342|      0|        goto err;
  343|      0|    }
  344|       |
  345|       |    /* Get the data to be signed */
  346|  3.62k|    if (!get_cert_verify_tbs_data(s, tls13tbs, &hdata, &hdatalen)) {
  ------------------
  |  Branch (346:9): [True: 0, False: 3.62k]
  ------------------
  347|       |        /* SSLfatal() already called */
  348|      0|        goto err;
  349|      0|    }
  350|       |
  351|  3.62k|    if (SSL_USE_SIGALGS(s) && !WPACKET_put_bytes_u16(pkt, lu->sigalg)) {
  ------------------
  |  |  293|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_SIGALGS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_SIGALGS)
  |  |  ------------------
  |  |  |  | 2192|  3.62k|#define SSL_ENC_FLAG_SIGALGS 0x2
  |  |  ------------------
  |  |  |  Branch (293:5): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
                  if (SSL_USE_SIGALGS(s) && !WPACKET_put_bytes_u16(pkt, lu->sigalg)) {
  ------------------
  |  |  911|  3.62k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (351:31): [True: 0, False: 3.62k]
  ------------------
  352|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  353|      0|        goto err;
  354|      0|    }
  355|       |
  356|       |    /*
  357|       |     * To avoid problems with older RSA providers we must also pass the digest
  358|       |     * name when passing any other parameters.
  359|       |     */
  360|  3.62k|    *p++ = OSSL_PARAM_construct_int(OSSL_SIGNATURE_PARAM_TLS_VERSION, &s->version);
  ------------------
  |  |  582|  3.62k|# define OSSL_SIGNATURE_PARAM_TLS_VERSION "tls-version"
  ------------------
  361|  3.62k|    if (md != NULL)
  ------------------
  |  Branch (361:9): [True: 3.62k, False: 0]
  ------------------
  362|  3.62k|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_SIGNATURE_PARAM_DIGEST,
  ------------------
  |  |  561|  3.62k|# define OSSL_SIGNATURE_PARAM_DIGEST OSSL_PKEY_PARAM_DIGEST
  |  |  ------------------
  |  |  |  |  382|  3.62k|# define OSSL_PKEY_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
  |  |  |  |  ------------------
  |  |  |  |  |  |  127|  3.62k|# define OSSL_ALG_PARAM_DIGEST "digest"
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  363|  3.62k|            (char *)EVP_MD_get0_name(md), 0);
  364|  3.62k|    *p = OSSL_PARAM_construct_end();
  365|       |
  366|  3.62k|    if (EVP_DigestSignInit_ex(mctx, &pctx,
  ------------------
  |  Branch (366:9): [True: 0, False: 3.62k]
  ------------------
  367|  3.62k|            md == NULL ? NULL : EVP_MD_get0_name(md),
  ------------------
  |  Branch (367:13): [True: 0, False: 3.62k]
  ------------------
  368|  3.62k|            sctx->libctx, sctx->propq, pkey, params)
  369|  3.62k|        <= 0) {
  370|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  371|      0|        goto err;
  372|      0|    }
  373|       |
  374|  3.62k|    if (lu->sig == EVP_PKEY_RSA_PSS) {
  ------------------
  |  |   65|  3.62k|#define EVP_PKEY_RSA_PSS NID_rsassaPss
  |  |  ------------------
  |  |  |  |  583|  3.62k|#define NID_rsassaPss           912
  |  |  ------------------
  ------------------
  |  Branch (374:9): [True: 0, False: 3.62k]
  ------------------
  375|      0|        if (EVP_PKEY_CTX_set_rsa_padding(pctx, RSA_PKCS1_PSS_PADDING) <= 0
  ------------------
  |  |  200|      0|#define RSA_PKCS1_PSS_PADDING 6
  ------------------
  |  Branch (375:13): [True: 0, False: 0]
  ------------------
  376|      0|            || EVP_PKEY_CTX_set_rsa_pss_saltlen(pctx,
  ------------------
  |  Branch (376:16): [True: 0, False: 0]
  ------------------
  377|      0|                   RSA_PSS_SALTLEN_DIGEST)
  ------------------
  |  |  138|      0|#define RSA_PSS_SALTLEN_DIGEST -1
  ------------------
  378|      0|                <= 0) {
  379|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  380|      0|            goto err;
  381|      0|        }
  382|      0|    }
  383|       |
  384|       |    /*
  385|       |     * Here we *must* use EVP_DigestSign() because Ed25519/Ed448 does not
  386|       |     * support streaming via EVP_DigestSignUpdate/EVP_DigestSignFinal
  387|       |     */
  388|  3.62k|    if (EVP_DigestSign(mctx, NULL, &siglen, hdata, hdatalen) <= 0) {
  ------------------
  |  Branch (388:9): [True: 0, False: 3.62k]
  ------------------
  389|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  390|      0|        goto err;
  391|      0|    }
  392|  3.62k|    sig = OPENSSL_malloc(siglen);
  ------------------
  |  |  107|  3.62k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  393|  3.62k|    if (sig == NULL
  ------------------
  |  Branch (393:9): [True: 0, False: 3.62k]
  ------------------
  394|  3.62k|        || EVP_DigestSign(mctx, sig, &siglen, hdata, hdatalen) <= 0) {
  ------------------
  |  Branch (394:12): [True: 0, False: 3.62k]
  ------------------
  395|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  396|      0|        goto err;
  397|      0|    }
  398|       |
  399|  3.62k|#ifndef OPENSSL_NO_GOST
  400|  3.62k|    {
  401|  3.62k|        int pktype = lu->sig;
  402|       |
  403|  3.62k|        if (pktype == NID_id_GostR3410_2001
  ------------------
  |  | 4583|  7.25k|#define NID_id_GostR3410_2001           811
  ------------------
  |  Branch (403:13): [True: 0, False: 3.62k]
  ------------------
  404|  3.62k|            || pktype == NID_id_GostR3410_2012_256
  ------------------
  |  | 4794|  7.25k|#define NID_id_GostR3410_2012_256               979
  ------------------
  |  Branch (404:16): [True: 0, False: 3.62k]
  ------------------
  405|  3.62k|            || pktype == NID_id_GostR3410_2012_512)
  ------------------
  |  | 4799|  3.62k|#define NID_id_GostR3410_2012_512               980
  ------------------
  |  Branch (405:16): [True: 0, False: 3.62k]
  ------------------
  406|      0|            BUF_reverse(sig, NULL, siglen);
  407|  3.62k|    }
  408|  3.62k|#endif
  409|       |
  410|  3.62k|    if (!WPACKET_sub_memcpy_u16(pkt, sig, siglen)) {
  ------------------
  |  |  940|  3.62k|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (410:9): [True: 0, False: 3.62k]
  ------------------
  411|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  412|      0|        goto err;
  413|      0|    }
  414|       |
  415|       |    /* Digest cached records and discard handshake buffer */
  416|  3.62k|    if (!ssl3_digest_cached_records(s, 0)) {
  ------------------
  |  Branch (416:9): [True: 0, False: 3.62k]
  ------------------
  417|       |        /* SSLfatal() already called */
  418|      0|        goto err;
  419|      0|    }
  420|       |
  421|  3.62k|    OPENSSL_free(sig);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  422|  3.62k|    EVP_MD_CTX_free(mctx);
  423|  3.62k|    return CON_FUNC_SUCCESS;
  424|      0|err:
  425|      0|    OPENSSL_free(sig);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  426|      0|    EVP_MD_CTX_free(mctx);
  427|      0|    return CON_FUNC_ERROR;
  428|  3.62k|}
tls_process_cert_verify:
  431|  3.62k|{
  432|  3.62k|    EVP_PKEY *pkey = NULL;
  433|  3.62k|    const unsigned char *data;
  434|  3.62k|#ifndef OPENSSL_NO_GOST
  435|  3.62k|    unsigned char *gost_data = NULL;
  436|  3.62k|#endif
  437|  3.62k|    MSG_PROCESS_RETURN ret = MSG_PROCESS_ERROR;
  438|  3.62k|    int j;
  439|  3.62k|    unsigned int len;
  440|  3.62k|    const EVP_MD *md = NULL;
  441|  3.62k|    size_t hdatalen = 0;
  442|  3.62k|    void *hdata;
  443|  3.62k|    unsigned char tls13tbs[TLS13_TBS_PREAMBLE_SIZE + EVP_MAX_MD_SIZE];
  444|  3.62k|    EVP_MD_CTX *mctx = EVP_MD_CTX_new();
  445|  3.62k|    EVP_PKEY_CTX *pctx = NULL;
  446|  3.62k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  447|  3.62k|    OSSL_PARAM params[3], *p = params;
  448|       |
  449|  3.62k|    if (mctx == NULL) {
  ------------------
  |  Branch (449:9): [True: 0, False: 3.62k]
  ------------------
  450|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  451|      0|        goto err;
  452|      0|    }
  453|       |
  454|  3.62k|    pkey = tls_get_peer_pkey(s);
  455|  3.62k|    if (pkey == NULL) {
  ------------------
  |  Branch (455:9): [True: 0, False: 3.62k]
  ------------------
  456|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  457|      0|        goto err;
  458|      0|    }
  459|       |
  460|  3.62k|    if (ssl_cert_lookup_by_pkey(pkey, NULL, sctx) == NULL) {
  ------------------
  |  Branch (460:9): [True: 0, False: 3.62k]
  ------------------
  461|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  462|      0|            SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE);
  463|      0|        goto err;
  464|      0|    }
  465|       |
  466|  3.62k|    if (SSL_USE_SIGALGS(s)) {
  ------------------
  |  |  293|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_SIGALGS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_SIGALGS)
  |  |  ------------------
  |  |  |  | 2192|  3.62k|#define SSL_ENC_FLAG_SIGALGS 0x2
  |  |  ------------------
  |  |  |  Branch (293:5): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  467|  3.62k|        unsigned int sigalg;
  468|       |
  469|  3.62k|        if (!PACKET_get_net_2(pkt, &sigalg)) {
  ------------------
  |  Branch (469:13): [True: 0, False: 3.62k]
  ------------------
  470|      0|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_PACKET);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  471|      0|            goto err;
  472|      0|        }
  473|  3.62k|        if (tls12_check_peer_sigalg(s, sigalg, pkey) <= 0) {
  ------------------
  |  Branch (473:13): [True: 0, False: 3.62k]
  ------------------
  474|       |            /* SSLfatal() already called */
  475|      0|            goto err;
  476|      0|        }
  477|  3.62k|    } else if (!tls1_set_peer_legacy_sigalg(s, pkey)) {
  ------------------
  |  Branch (477:16): [True: 0, False: 0]
  ------------------
  478|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  479|      0|            SSL_R_LEGACY_SIGALG_DISALLOWED_OR_UNSUPPORTED);
  480|      0|        goto err;
  481|      0|    }
  482|       |
  483|  3.62k|    if (!tls1_lookup_md(sctx, s->s3.tmp.peer_sigalg, &md)) {
  ------------------
  |  Branch (483:9): [True: 0, False: 3.62k]
  ------------------
  484|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  485|      0|        goto err;
  486|      0|    }
  487|       |
  488|  3.62k|    if (SSL_USE_SIGALGS(s))
  ------------------
  |  |  293|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_SIGALGS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_SIGALGS)
  |  |  ------------------
  |  |  |  | 2192|  3.62k|#define SSL_ENC_FLAG_SIGALGS 0x2
  |  |  ------------------
  |  |  |  Branch (293:5): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  489|  3.62k|        OSSL_TRACE1(TLS, "USING TLSv1.2 HASH %s\n",
  ------------------
  |  |  291|  3.62k|    OSSL_TRACEV(category, (trc_out, format, arg1))
  |  |  ------------------
  |  |  |  |  283|  3.62k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  490|  3.62k|            md == NULL ? "n/a" : EVP_MD_get0_name(md));
  491|       |
  492|       |    /* Check for broken implementations of GOST ciphersuites */
  493|       |    /*
  494|       |     * If key is GOST and len is exactly 64 or 128, it is signature without
  495|       |     * length field (CryptoPro implementations at least till TLS 1.2)
  496|       |     */
  497|  3.62k|#ifndef OPENSSL_NO_GOST
  498|  3.62k|    if (!SSL_USE_SIGALGS(s)
  ------------------
  |  |  293|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_SIGALGS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_SIGALGS)
  |  |  ------------------
  |  |  |  | 2192|  3.62k|#define SSL_ENC_FLAG_SIGALGS 0x2
  |  |  ------------------
  ------------------
  |  Branch (498:9): [True: 0, False: 3.62k]
  ------------------
  499|      0|        && ((PACKET_remaining(pkt) == 64
  ------------------
  |  Branch (499:14): [True: 0, False: 0]
  ------------------
  500|      0|                && (EVP_PKEY_get_id(pkey) == NID_id_GostR3410_2001
  ------------------
  |  | 4583|      0|#define NID_id_GostR3410_2001           811
  ------------------
  |  Branch (500:21): [True: 0, False: 0]
  ------------------
  501|      0|                    || EVP_PKEY_get_id(pkey) == NID_id_GostR3410_2012_256))
  ------------------
  |  | 4794|      0|#define NID_id_GostR3410_2012_256               979
  ------------------
  |  Branch (501:24): [True: 0, False: 0]
  ------------------
  502|      0|            || (PACKET_remaining(pkt) == 128
  ------------------
  |  Branch (502:17): [True: 0, False: 0]
  ------------------
  503|      0|                && EVP_PKEY_get_id(pkey) == NID_id_GostR3410_2012_512))) {
  ------------------
  |  | 4799|      0|#define NID_id_GostR3410_2012_512               980
  ------------------
  |  Branch (503:20): [True: 0, False: 0]
  ------------------
  504|      0|        len = (unsigned int)PACKET_remaining(pkt);
  505|      0|    } else
  506|  3.62k|#endif
  507|  3.62k|        if (!PACKET_get_net_2(pkt, &len)) {
  ------------------
  |  Branch (507:13): [True: 0, False: 3.62k]
  ------------------
  508|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  509|      0|        goto err;
  510|      0|    }
  511|       |
  512|  3.62k|    if (!PACKET_get_bytes(pkt, &data, len)) {
  ------------------
  |  Branch (512:9): [True: 0, False: 3.62k]
  ------------------
  513|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  514|      0|        goto err;
  515|      0|    }
  516|  3.62k|    if (PACKET_remaining(pkt) != 0) {
  ------------------
  |  Branch (516:9): [True: 0, False: 3.62k]
  ------------------
  517|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  518|      0|        goto err;
  519|      0|    }
  520|       |
  521|  3.62k|    if (!get_cert_verify_tbs_data(s, tls13tbs, &hdata, &hdatalen)) {
  ------------------
  |  Branch (521:9): [True: 0, False: 3.62k]
  ------------------
  522|       |        /* SSLfatal() already called */
  523|      0|        goto err;
  524|      0|    }
  525|       |
  526|  3.62k|    OSSL_TRACE1(TLS, "Using client verify alg %s\n",
  ------------------
  |  |  291|  3.62k|    OSSL_TRACEV(category, (trc_out, format, arg1))
  |  |  ------------------
  |  |  |  |  283|  3.62k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  527|  3.62k|        md == NULL ? "n/a" : EVP_MD_get0_name(md));
  528|       |
  529|       |    /*
  530|       |     * To avoid problems with older RSA providers we must also pass the digest
  531|       |     * name when passing any other parameters.
  532|       |     */
  533|  3.62k|    *p++ = OSSL_PARAM_construct_int(OSSL_SIGNATURE_PARAM_TLS_VERSION, &s->version);
  ------------------
  |  |  582|  3.62k|# define OSSL_SIGNATURE_PARAM_TLS_VERSION "tls-version"
  ------------------
  534|  3.62k|    if (md != NULL)
  ------------------
  |  Branch (534:9): [True: 3.62k, False: 0]
  ------------------
  535|  3.62k|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_SIGNATURE_PARAM_DIGEST,
  ------------------
  |  |  561|  3.62k|# define OSSL_SIGNATURE_PARAM_DIGEST OSSL_PKEY_PARAM_DIGEST
  |  |  ------------------
  |  |  |  |  382|  3.62k|# define OSSL_PKEY_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
  |  |  |  |  ------------------
  |  |  |  |  |  |  127|  3.62k|# define OSSL_ALG_PARAM_DIGEST "digest"
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  536|  3.62k|            (char *)EVP_MD_get0_name(md), 0);
  537|  3.62k|    *p = OSSL_PARAM_construct_end();
  538|       |
  539|  3.62k|    if (EVP_DigestVerifyInit_ex(mctx, &pctx,
  ------------------
  |  Branch (539:9): [True: 0, False: 3.62k]
  ------------------
  540|  3.62k|            md == NULL ? NULL : EVP_MD_get0_name(md),
  ------------------
  |  Branch (540:13): [True: 0, False: 3.62k]
  ------------------
  541|  3.62k|            sctx->libctx, sctx->propq, pkey, params)
  542|  3.62k|        <= 0) {
  543|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  544|      0|        goto err;
  545|      0|    }
  546|  3.62k|#ifndef OPENSSL_NO_GOST
  547|  3.62k|    {
  548|  3.62k|        int pktype = EVP_PKEY_get_id(pkey);
  549|  3.62k|        if (pktype == NID_id_GostR3410_2001
  ------------------
  |  | 4583|  7.25k|#define NID_id_GostR3410_2001           811
  ------------------
  |  Branch (549:13): [True: 0, False: 3.62k]
  ------------------
  550|  3.62k|            || pktype == NID_id_GostR3410_2012_256
  ------------------
  |  | 4794|  7.25k|#define NID_id_GostR3410_2012_256               979
  ------------------
  |  Branch (550:16): [True: 0, False: 3.62k]
  ------------------
  551|  3.62k|            || pktype == NID_id_GostR3410_2012_512) {
  ------------------
  |  | 4799|  3.62k|#define NID_id_GostR3410_2012_512               980
  ------------------
  |  Branch (551:16): [True: 0, False: 3.62k]
  ------------------
  552|      0|            if ((gost_data = OPENSSL_malloc(len)) == NULL)
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (552:17): [True: 0, False: 0]
  ------------------
  553|      0|                goto err;
  554|      0|            BUF_reverse(gost_data, data, len);
  555|      0|            data = gost_data;
  556|      0|        }
  557|  3.62k|    }
  558|  3.62k|#endif
  559|       |
  560|  3.62k|    if (SSL_USE_PSS(s)) {
  ------------------
  |  | 2226|  3.62k|#define SSL_USE_PSS(s) (s->s3.tmp.peer_sigalg != NULL && s->s3.tmp.peer_sigalg->sig == EVP_PKEY_RSA_PSS)
  |  |  ------------------
  |  |  |  |   65|  3.62k|#define EVP_PKEY_RSA_PSS NID_rsassaPss
  |  |  |  |  ------------------
  |  |  |  |  |  |  583|  7.25k|#define NID_rsassaPss           912
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (2226:25): [True: 3.62k, False: 0]
  |  |  |  Branch (2226:58): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  561|      0|        if (EVP_PKEY_CTX_set_rsa_padding(pctx, RSA_PKCS1_PSS_PADDING) <= 0
  ------------------
  |  |  200|      0|#define RSA_PKCS1_PSS_PADDING 6
  ------------------
  |  Branch (561:13): [True: 0, False: 0]
  ------------------
  562|      0|            || EVP_PKEY_CTX_set_rsa_pss_saltlen(pctx,
  ------------------
  |  Branch (562:16): [True: 0, False: 0]
  ------------------
  563|      0|                   RSA_PSS_SALTLEN_DIGEST)
  ------------------
  |  |  138|      0|#define RSA_PSS_SALTLEN_DIGEST -1
  ------------------
  564|      0|                <= 0) {
  565|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  566|      0|            goto err;
  567|      0|        }
  568|      0|    }
  569|       |
  570|  3.62k|    j = EVP_DigestVerify(mctx, data, len, hdata, hdatalen);
  571|  3.62k|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
  572|       |    /* Ignore bad signatures when fuzzing */
  573|  3.62k|    if (SSL_IS_QUIC_HANDSHAKE(s))
  ------------------
  |  |  311|  3.62k|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  ------------------
  |  |  |  |   22|  3.62k|#define TLS1_FLAGS_QUIC 0x2000
  |  |  ------------------
  |  |  |  Branch (311:34): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  574|      0|        j = 1;
  575|  3.62k|#endif
  576|  3.62k|    if (j <= 0) {
  ------------------
  |  Branch (576:9): [True: 0, False: 3.62k]
  ------------------
  577|      0|        SSLfatal(s, SSL_AD_DECRYPT_ERROR, SSL_R_BAD_SIGNATURE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  578|      0|        goto err;
  579|      0|    }
  580|       |
  581|       |    /*
  582|       |     * In TLSv1.3 on the client side we make sure we prepare the client
  583|       |     * certificate after the CertVerify instead of when we get the
  584|       |     * CertificateRequest. This is because in TLSv1.3 the CertificateRequest
  585|       |     * comes *before* the Certificate message. In TLSv1.2 it comes after. We
  586|       |     * want to make sure that SSL_get1_peer_certificate() will return the actual
  587|       |     * server certificate from the client_cert_cb callback.
  588|       |     */
  589|  3.62k|    if (!s->server && SSL_CONNECTION_IS_TLS13(s) && s->s3.tmp.cert_req == 1)
  ------------------
  |  |  273|  7.25k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (589:9): [True: 3.62k, False: 0]
  |  Branch (589:53): [True: 0, False: 3.62k]
  ------------------
  590|      0|        ret = MSG_PROCESS_CONTINUE_PROCESSING;
  591|  3.62k|    else
  592|  3.62k|        ret = MSG_PROCESS_CONTINUE_READING;
  593|  3.62k|err:
  594|  3.62k|    BIO_free(s->s3.handshake_buffer);
  595|  3.62k|    s->s3.handshake_buffer = NULL;
  596|  3.62k|    EVP_MD_CTX_free(mctx);
  597|  3.62k|#ifndef OPENSSL_NO_GOST
  598|  3.62k|    OPENSSL_free(gost_data);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  599|  3.62k|#endif
  600|  3.62k|    return ret;
  601|  3.62k|}
tls_construct_finished:
  604|  7.25k|{
  605|  7.25k|    size_t finish_md_len;
  606|  7.25k|    const char *sender;
  607|  7.25k|    size_t slen;
  608|  7.25k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  7.25k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  609|       |
  610|       |    /* This is a real handshake so make sure we clean it up at the end */
  611|  7.25k|    if (!s->server && s->post_handshake_auth != SSL_PHA_REQUESTED)
  ------------------
  |  Branch (611:9): [True: 3.62k, False: 3.62k]
  |  Branch (611:23): [True: 3.62k, False: 0]
  ------------------
  612|  3.62k|        s->statem.cleanuphand = 1;
  613|       |
  614|       |    /*
  615|       |     * If we attempted to write early data or we're in middlebox compat mode
  616|       |     * then we deferred changing the handshake write keys to the last possible
  617|       |     * moment. If we didn't already do this when we sent the client certificate
  618|       |     * then we need to do it now.
  619|       |     */
  620|  7.25k|    if (SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|  14.5k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.5k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.25k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.25k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.25k, False: 0]
  |  |  ------------------
  |  |  274|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.5k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.25k, False: 0]
  |  |  ------------------
  |  |  275|  14.5k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.25k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
  621|  7.25k|        && !s->server
  ------------------
  |  Branch (621:12): [True: 3.62k, False: 3.62k]
  ------------------
  622|  3.62k|        && !SSL_IS_QUIC_HANDSHAKE(s)
  ------------------
  |  |  311|  10.8k|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  ------------------
  |  |  |  |   22|  3.62k|#define TLS1_FLAGS_QUIC 0x2000
  |  |  ------------------
  ------------------
  |  Branch (622:12): [True: 3.62k, False: 0]
  ------------------
  623|  3.62k|        && (s->early_data_state != SSL_EARLY_DATA_NONE
  ------------------
  |  Branch (623:13): [True: 0, False: 3.62k]
  ------------------
  624|  3.62k|            || (s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0)
  ------------------
  |  |  404|  3.62k|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|  3.62k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (624:16): [True: 3.62k, False: 0]
  ------------------
  625|  3.62k|        && s->s3.tmp.cert_req == 0
  ------------------
  |  Branch (625:12): [True: 3.62k, False: 0]
  ------------------
  626|  3.62k|        && (!ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (626:12): [True: 0, False: 3.62k]
  ------------------
  627|  3.62k|            SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_CLIENT_WRITE))) {
  ------------------
  |  |  347|  3.62k|#define SSL3_CC_HANDSHAKE 0x080
  ------------------
                          SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_CLIENT_WRITE))) {
  ------------------
  |  |  349|  3.62k|#define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  344|  3.62k|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  343|  3.62k|#define SSL3_CC_WRITE 0x002
  |  |  ------------------
  ------------------
  628|      0|        ;
  629|       |        /* SSLfatal() already called */
  630|      0|        return CON_FUNC_ERROR;
  631|      0|    }
  632|       |
  633|  7.25k|    if (s->server) {
  ------------------
  |  Branch (633:9): [True: 3.62k, False: 3.62k]
  ------------------
  634|  3.62k|        sender = ssl->method->ssl3_enc->server_finished_label;
  635|  3.62k|        slen = ssl->method->ssl3_enc->server_finished_label_len;
  636|  3.62k|    } else {
  637|  3.62k|        sender = ssl->method->ssl3_enc->client_finished_label;
  638|  3.62k|        slen = ssl->method->ssl3_enc->client_finished_label_len;
  639|  3.62k|    }
  640|       |
  641|  7.25k|    finish_md_len = ssl->method->ssl3_enc->final_finish_mac(s,
  642|  7.25k|        sender, slen,
  643|  7.25k|        s->s3.tmp.finish_md);
  644|  7.25k|    if (finish_md_len == 0) {
  ------------------
  |  Branch (644:9): [True: 0, False: 7.25k]
  ------------------
  645|       |        /* SSLfatal() already called */
  646|      0|        return CON_FUNC_ERROR;
  647|      0|    }
  648|       |
  649|  7.25k|    s->s3.tmp.finish_md_len = finish_md_len;
  650|       |
  651|  7.25k|    if (!WPACKET_memcpy(pkt, s->s3.tmp.finish_md, finish_md_len)) {
  ------------------
  |  Branch (651:9): [True: 0, False: 7.25k]
  ------------------
  652|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  653|      0|        return CON_FUNC_ERROR;
  654|      0|    }
  655|       |
  656|       |    /*
  657|       |     * Log the master secret, if logging is enabled. We don't log it for
  658|       |     * TLSv1.3: there's a different key schedule for that.
  659|       |     */
  660|  7.25k|    if (!SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|  14.5k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.5k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.25k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.25k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.25k, False: 0]
  |  |  ------------------
  |  |  274|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.5k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.25k, False: 0]
  |  |  ------------------
  |  |  275|  14.5k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.25k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
  661|      0|        && !ssl_log_secret(s, MASTER_SECRET_LABEL, s->session->master_key,
  ------------------
  |  | 2841|      0|#define MASTER_SECRET_LABEL "CLIENT_RANDOM"
  ------------------
  |  Branch (661:12): [True: 0, False: 0]
  ------------------
  662|      0|            s->session->master_key_length)) {
  663|       |        /* SSLfatal() already called */
  664|      0|        return CON_FUNC_ERROR;
  665|      0|    }
  666|       |
  667|       |    /*
  668|       |     * Copy the finished so we can use it for renegotiation checks
  669|       |     */
  670|  7.25k|    if (!ossl_assert(finish_md_len <= EVP_MAX_MD_SIZE)) {
  ------------------
  |  |   52|  7.25k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  7.25k|    __FILE__, __LINE__)
  ------------------
  |  Branch (670:9): [True: 0, False: 7.25k]
  ------------------
  671|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  672|      0|        return CON_FUNC_ERROR;
  673|      0|    }
  674|  7.25k|    if (!s->server) {
  ------------------
  |  Branch (674:9): [True: 3.62k, False: 3.62k]
  ------------------
  675|  3.62k|        memcpy(s->s3.previous_client_finished, s->s3.tmp.finish_md,
  676|  3.62k|            finish_md_len);
  677|  3.62k|        s->s3.previous_client_finished_len = finish_md_len;
  678|  3.62k|    } else {
  679|  3.62k|        memcpy(s->s3.previous_server_finished, s->s3.tmp.finish_md,
  680|  3.62k|            finish_md_len);
  681|  3.62k|        s->s3.previous_server_finished_len = finish_md_len;
  682|  3.62k|    }
  683|       |
  684|  7.25k|    return CON_FUNC_SUCCESS;
  685|  7.25k|}
ssl3_take_mac:
  748|  7.21k|{
  749|  7.21k|    const char *sender;
  750|  7.21k|    size_t slen;
  751|  7.21k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  7.21k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  752|       |
  753|  7.21k|    if (!s->server) {
  ------------------
  |  Branch (753:9): [True: 3.62k, False: 3.58k]
  ------------------
  754|  3.62k|        sender = ssl->method->ssl3_enc->server_finished_label;
  755|  3.62k|        slen = ssl->method->ssl3_enc->server_finished_label_len;
  756|  3.62k|    } else {
  757|  3.58k|        sender = ssl->method->ssl3_enc->client_finished_label;
  758|  3.58k|        slen = ssl->method->ssl3_enc->client_finished_label_len;
  759|  3.58k|    }
  760|       |
  761|  7.21k|    s->s3.tmp.peer_finish_md_len = ssl->method->ssl3_enc->final_finish_mac(s, sender, slen,
  762|  7.21k|        s->s3.tmp.peer_finish_md);
  763|       |
  764|  7.21k|    if (s->s3.tmp.peer_finish_md_len == 0) {
  ------------------
  |  Branch (764:9): [True: 0, False: 7.21k]
  ------------------
  765|       |        /* SSLfatal() already called */
  766|      0|        return 0;
  767|      0|    }
  768|       |
  769|  7.21k|    return 1;
  770|  7.21k|}
tls_process_finished:
  829|  7.21k|{
  830|  7.21k|    size_t md_len;
  831|  7.21k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  7.21k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  832|  7.21k|    int was_first = SSL_IS_FIRST_HANDSHAKE(s);
  ------------------
  |  |  285|  7.21k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 3.62k, False: 3.58k]
  |  |  ------------------
  |  |  286|  7.21k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 3.58k]
  |  |  ------------------
  ------------------
  833|  7.21k|    int ok;
  834|       |
  835|       |    /* This is a real handshake so make sure we clean it up at the end */
  836|  7.21k|    if (s->server) {
  ------------------
  |  Branch (836:9): [True: 3.58k, False: 3.62k]
  ------------------
  837|       |        /*
  838|       |         * To get this far we must have read encrypted data from the client. We
  839|       |         * no longer tolerate unencrypted alerts. This is ignored if less than
  840|       |         * TLSv1.3
  841|       |         */
  842|  3.58k|        if (s->rlayer.rrlmethod->set_plain_alerts != NULL)
  ------------------
  |  Branch (842:13): [True: 3.58k, False: 0]
  ------------------
  843|  3.58k|            s->rlayer.rrlmethod->set_plain_alerts(s->rlayer.rrl, 0);
  844|  3.58k|        if (s->post_handshake_auth != SSL_PHA_REQUESTED)
  ------------------
  |  Branch (844:13): [True: 3.58k, False: 0]
  ------------------
  845|  3.58k|            s->statem.cleanuphand = 1;
  846|  3.58k|        if (SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|  7.16k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.16k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.58k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.58k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.58k, False: 0]
  |  |  ------------------
  |  |  274|  3.58k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.58k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.58k, False: 0]
  |  |  ------------------
  |  |  275|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.58k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.58k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.58k, False: 0]
  |  |  ------------------
  ------------------
  847|  3.58k|            && !tls13_save_handshake_digest_for_pha(s)) {
  ------------------
  |  Branch (847:16): [True: 0, False: 3.58k]
  ------------------
  848|       |            /* SSLfatal() already called */
  849|      0|            return MSG_PROCESS_ERROR;
  850|      0|        }
  851|  3.58k|    }
  852|       |
  853|       |    /*
  854|       |     * In TLSv1.3 a Finished message signals a key change so the end of the
  855|       |     * message must be on a record boundary.
  856|       |     */
  857|  7.21k|    if (SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|  14.4k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.4k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.21k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.21k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.21k, False: 0]
  |  |  ------------------
  |  |  274|  7.21k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.21k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.4k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.21k, False: 0]
  |  |  ------------------
  |  |  275|  14.4k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.21k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.21k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.21k, False: 0]
  |  |  ------------------
  ------------------
  858|  7.21k|        && RECORD_LAYER_processed_read_pending(&s->rlayer)) {
  ------------------
  |  Branch (858:12): [True: 0, False: 7.21k]
  ------------------
  859|      0|        SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_NOT_ON_RECORD_BOUNDARY);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  860|      0|        return MSG_PROCESS_ERROR;
  861|      0|    }
  862|       |
  863|       |    /* If this occurs, we have missed a message */
  864|  7.21k|    if (!SSL_CONNECTION_IS_TLS13(s) && !s->s3.change_cipher_spec) {
  ------------------
  |  |  273|  14.4k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.4k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.21k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.21k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.21k, False: 0]
  |  |  ------------------
  |  |  274|  7.21k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.21k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.4k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.21k, False: 0]
  |  |  ------------------
  |  |  275|  14.4k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.21k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.21k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.21k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (864:40): [True: 0, False: 0]
  ------------------
  865|      0|        SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_GOT_A_FIN_BEFORE_A_CCS);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  866|      0|        return MSG_PROCESS_ERROR;
  867|      0|    }
  868|  7.21k|    s->s3.change_cipher_spec = 0;
  869|       |
  870|  7.21k|    md_len = s->s3.tmp.peer_finish_md_len;
  871|       |
  872|  7.21k|    if (md_len != PACKET_remaining(pkt)) {
  ------------------
  |  Branch (872:9): [True: 0, False: 7.21k]
  ------------------
  873|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_DIGEST_LENGTH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  874|      0|        return MSG_PROCESS_ERROR;
  875|      0|    }
  876|       |
  877|  7.21k|    ok = CRYPTO_memcmp(PACKET_data(pkt), s->s3.tmp.peer_finish_md,
  ------------------
  |  |  332|  7.21k|#define CRYPTO_memcmp memcmp
  ------------------
  878|  7.21k|        md_len);
  879|  7.21k|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
  880|  7.21k|    if (ok != 0) {
  ------------------
  |  Branch (880:9): [True: 0, False: 7.21k]
  ------------------
  881|      0|        if ((PACKET_data(pkt)[0] ^ s->s3.tmp.peer_finish_md[0]) != 0xFF) {
  ------------------
  |  Branch (881:13): [True: 0, False: 0]
  ------------------
  882|      0|            ok = 0;
  883|      0|        }
  884|      0|    }
  885|  7.21k|#endif
  886|  7.21k|    if (ok != 0) {
  ------------------
  |  Branch (886:9): [True: 0, False: 7.21k]
  ------------------
  887|      0|        SSLfatal(s, SSL_AD_DECRYPT_ERROR, SSL_R_DIGEST_CHECK_FAILED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  888|      0|        return MSG_PROCESS_ERROR;
  889|      0|    }
  890|       |
  891|       |    /*
  892|       |     * Copy the finished so we can use it for renegotiation checks
  893|       |     */
  894|  7.21k|    if (!ossl_assert(md_len <= EVP_MAX_MD_SIZE)) {
  ------------------
  |  |   52|  7.21k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  7.21k|    __FILE__, __LINE__)
  ------------------
  |  Branch (894:9): [True: 0, False: 7.21k]
  ------------------
  895|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  896|      0|        return MSG_PROCESS_ERROR;
  897|      0|    }
  898|  7.21k|    if (s->server) {
  ------------------
  |  Branch (898:9): [True: 3.58k, False: 3.62k]
  ------------------
  899|  3.58k|        memcpy(s->s3.previous_client_finished, s->s3.tmp.peer_finish_md,
  900|  3.58k|            md_len);
  901|  3.58k|        s->s3.previous_client_finished_len = md_len;
  902|  3.62k|    } else {
  903|  3.62k|        memcpy(s->s3.previous_server_finished, s->s3.tmp.peer_finish_md,
  904|  3.62k|            md_len);
  905|  3.62k|        s->s3.previous_server_finished_len = md_len;
  906|  3.62k|    }
  907|       |
  908|       |    /*
  909|       |     * In TLS1.3 we also have to change cipher state and do any final processing
  910|       |     * of the initial server flight (if we are a client)
  911|       |     */
  912|  7.21k|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  7.21k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.4k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.21k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.21k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.21k, False: 0]
  |  |  ------------------
  |  |  274|  7.21k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.21k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.4k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.21k, False: 0]
  |  |  ------------------
  |  |  275|  7.21k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.21k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.21k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.21k, False: 0]
  |  |  ------------------
  ------------------
  913|  7.21k|        if (s->server) {
  ------------------
  |  Branch (913:13): [True: 3.58k, False: 3.62k]
  ------------------
  914|  3.58k|            if (s->post_handshake_auth != SSL_PHA_REQUESTED && !ssl->method->ssl3_enc->change_cipher_state(s, SSL3_CC_APPLICATION | SSL3_CHANGE_CIPHER_SERVER_READ)) {
  ------------------
  |  |  348|  3.58k|#define SSL3_CC_APPLICATION 0x100
  ------------------
                          if (s->post_handshake_auth != SSL_PHA_REQUESTED && !ssl->method->ssl3_enc->change_cipher_state(s, SSL3_CC_APPLICATION | SSL3_CHANGE_CIPHER_SERVER_READ)) {
  ------------------
  |  |  350|  3.58k|#define SSL3_CHANGE_CIPHER_SERVER_READ (SSL3_CC_SERVER | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  345|  3.58k|#define SSL3_CC_SERVER 0x020
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_SERVER_READ (SSL3_CC_SERVER | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  342|  3.58k|#define SSL3_CC_READ 0x001
  |  |  ------------------
  ------------------
  |  Branch (914:17): [True: 3.58k, False: 0]
  |  Branch (914:64): [True: 0, False: 3.58k]
  ------------------
  915|       |                /* SSLfatal() already called */
  916|      0|                return MSG_PROCESS_ERROR;
  917|      0|            }
  918|  3.62k|        } else {
  919|       |            /* TLS 1.3 gets the secret size from the handshake md */
  920|  3.62k|            size_t dummy;
  921|  3.62k|            if (!ssl->method->ssl3_enc->generate_master_secret(s,
  ------------------
  |  Branch (921:17): [True: 0, False: 3.62k]
  ------------------
  922|  3.62k|                    s->master_secret, s->handshake_secret, 0,
  923|  3.62k|                    &dummy)) {
  924|       |                /* SSLfatal() already called */
  925|      0|                return MSG_PROCESS_ERROR;
  926|      0|            }
  927|  3.62k|            if (!tls13_store_server_finished_hash(s)) {
  ------------------
  |  Branch (927:17): [True: 0, False: 3.62k]
  ------------------
  928|       |                /* SSLfatal() already called */
  929|      0|                return MSG_PROCESS_ERROR;
  930|      0|            }
  931|       |
  932|       |            /*
  933|       |             * For non-QUIC we set up the client's app data read keys now, so
  934|       |             * that we can go straight into reading 0.5RTT data from the server.
  935|       |             * For QUIC we don't do that, and instead defer setting up the keys
  936|       |             * until after we have set up the write keys in order to ensure that
  937|       |             * write keys are always set up before read keys (so that if we read
  938|       |             * a message we have the correct keys in place to ack it)
  939|       |             */
  940|  3.62k|            if (!SSL_IS_QUIC_HANDSHAKE(s)
  ------------------
  |  |  311|  7.25k|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  ------------------
  |  |  |  |   22|  3.62k|#define TLS1_FLAGS_QUIC 0x2000
  |  |  ------------------
  ------------------
  |  Branch (940:17): [True: 3.62k, False: 0]
  ------------------
  941|  3.62k|                && !ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (941:20): [True: 0, False: 3.62k]
  ------------------
  942|  3.62k|                    SSL3_CC_APPLICATION | SSL3_CHANGE_CIPHER_CLIENT_READ)) {
  ------------------
  |  |  348|  3.62k|#define SSL3_CC_APPLICATION 0x100
  ------------------
                                  SSL3_CC_APPLICATION | SSL3_CHANGE_CIPHER_CLIENT_READ)) {
  ------------------
  |  |  351|  3.62k|#define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  344|  3.62k|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  342|  3.62k|#define SSL3_CC_READ 0x001
  |  |  ------------------
  ------------------
  943|       |                /* SSLfatal() already called */
  944|      0|                return MSG_PROCESS_ERROR;
  945|      0|            }
  946|  3.62k|            if (!tls_process_initial_server_flight(s)) {
  ------------------
  |  Branch (946:17): [True: 0, False: 3.62k]
  ------------------
  947|       |                /* SSLfatal() already called */
  948|      0|                return MSG_PROCESS_ERROR;
  949|      0|            }
  950|  3.62k|        }
  951|  7.21k|    }
  952|       |
  953|  7.21k|    if (was_first
  ------------------
  |  Branch (953:9): [True: 3.62k, False: 3.58k]
  ------------------
  954|  3.62k|        && !SSL_IS_FIRST_HANDSHAKE(s)
  ------------------
  |  |  285|  10.8k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  286|  10.8k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  955|      0|        && s->rlayer.rrlmethod->set_first_handshake != NULL)
  ------------------
  |  Branch (955:12): [True: 0, False: 0]
  ------------------
  956|      0|        s->rlayer.rrlmethod->set_first_handshake(s->rlayer.rrl, 0);
  957|       |
  958|  7.21k|    return MSG_PROCESS_FINISHED_READING;
  959|  7.21k|}
tls_construct_change_cipher_spec:
  962|  7.25k|{
  963|  7.25k|    if (!WPACKET_put_bytes_u8(pkt, SSL3_MT_CCS)) {
  ------------------
  |  |  909|  7.25k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (963:9): [True: 0, False: 7.25k]
  ------------------
  964|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  965|      0|        return CON_FUNC_ERROR;
  966|      0|    }
  967|       |
  968|  7.25k|    return CON_FUNC_SUCCESS;
  969|  7.25k|}
tls_get_peer_pkey:
 1106|  3.62k|{
 1107|  3.62k|    if (sc->session->peer_rpk != NULL)
  ------------------
  |  Branch (1107:9): [True: 0, False: 3.62k]
  ------------------
 1108|      0|        return sc->session->peer_rpk;
 1109|  3.62k|    if (sc->session->peer != NULL)
  ------------------
  |  Branch (1109:9): [True: 3.62k, False: 0]
  ------------------
 1110|  3.62k|        return X509_get0_pubkey(sc->session->peer);
 1111|      0|    return NULL;
 1112|  3.62k|}
ssl3_output_cert_chain:
 1392|  3.62k|{
 1393|  3.62k|    if (!WPACKET_start_sub_packet_u24(pkt)) {
  ------------------
  |  |  814|  3.62k|    WPACKET_start_sub_packet_len__((pkt), 3)
  ------------------
  |  Branch (1393:9): [True: 0, False: 3.62k]
  ------------------
 1394|      0|        if (!for_comp)
  ------------------
  |  Branch (1394:13): [True: 0, False: 0]
  ------------------
 1395|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1396|      0|        return 0;
 1397|      0|    }
 1398|       |
 1399|  3.62k|    if (!ssl_add_cert_chain(s, pkt, cpk, for_comp))
  ------------------
  |  Branch (1399:9): [True: 0, False: 3.62k]
  ------------------
 1400|      0|        return 0;
 1401|       |
 1402|  3.62k|    if (!WPACKET_close(pkt)) {
  ------------------
  |  Branch (1402:9): [True: 0, False: 3.62k]
  ------------------
 1403|      0|        if (!for_comp)
  ------------------
  |  Branch (1403:13): [True: 0, False: 0]
  ------------------
 1404|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1405|      0|        return 0;
 1406|      0|    }
 1407|       |
 1408|  3.62k|    return 1;
 1409|  3.62k|}
tls_finish_handshake:
 1418|  17.9k|{
 1419|  17.9k|    void (*cb)(const SSL *ssl, int type, int val) = NULL;
 1420|  17.9k|    int cleanuphand = s->statem.cleanuphand;
 1421|  17.9k|    SSL *ssl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  17.9k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1422|  17.9k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  17.9k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1423|       |
 1424|  17.9k|    if (clearbufs) {
  ------------------
  |  Branch (1424:9): [True: 14.3k, False: 3.58k]
  ------------------
 1425|  14.3k|        if (!SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|  14.3k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  14.3k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  14.3k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (1425:13): [True: 14.3k, False: 0]
  ------------------
 1426|       |#ifndef OPENSSL_NO_SCTP
 1427|       |            /*
 1428|       |             * RFC6083: SCTP provides a reliable and in-sequence transport service for DTLS
 1429|       |             * messages that require it. Therefore, DTLS procedures for retransmissions
 1430|       |             * MUST NOT be used.
 1431|       |             * Hence the init_buf can be cleared when DTLS over SCTP as transport is used.
 1432|       |             */
 1433|       |            || BIO_dgram_is_sctp(SSL_get_wbio(SSL_CONNECTION_GET_SSL(s)))
 1434|       |#endif
 1435|  14.3k|        ) {
 1436|       |            /*
 1437|       |             * We don't do this in DTLS over UDP because we may still need the init_buf
 1438|       |             * in case there are any unexpected retransmits
 1439|       |             */
 1440|  14.3k|            BUF_MEM_free(s->init_buf);
 1441|  14.3k|            s->init_buf = NULL;
 1442|  14.3k|        }
 1443|       |
 1444|  14.3k|        if (!ssl_free_wbio_buffer(s)) {
  ------------------
  |  Branch (1444:13): [True: 0, False: 14.3k]
  ------------------
 1445|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1446|      0|            return WORK_ERROR;
 1447|      0|        }
 1448|  14.3k|        s->init_num = 0;
 1449|  14.3k|    }
 1450|       |
 1451|  17.9k|    if (SSL_CONNECTION_IS_TLS13(s) && !s->server
  ------------------
  |  |  273|  35.9k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  35.9k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  17.9k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  17.9k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 17.9k, False: 0]
  |  |  ------------------
  |  |  274|  17.9k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  17.9k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  35.9k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 17.9k, False: 0]
  |  |  ------------------
  |  |  275|  35.9k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  17.9k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  17.9k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 17.9k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1451:39): [True: 10.7k, False: 7.16k]
  ------------------
 1452|  10.7k|        && s->post_handshake_auth == SSL_PHA_REQUESTED)
  ------------------
  |  Branch (1452:12): [True: 0, False: 10.7k]
  ------------------
 1453|      0|        s->post_handshake_auth = SSL_PHA_EXT_SENT;
 1454|       |
 1455|       |    /*
 1456|       |     * Only set if there was a Finished message and this isn't after a TLSv1.3
 1457|       |     * post handshake exchange
 1458|       |     */
 1459|  17.9k|    if (cleanuphand) {
  ------------------
  |  Branch (1459:9): [True: 7.21k, False: 10.7k]
  ------------------
 1460|       |        /* skipped if we just sent a HelloRequest */
 1461|  7.21k|        s->renegotiate = 0;
 1462|  7.21k|        s->new_session = 0;
 1463|  7.21k|        s->statem.cleanuphand = 0;
 1464|  7.21k|        s->ext.ticket_expected = 0;
 1465|       |
 1466|  7.21k|        ssl3_cleanup_key_block(s);
 1467|       |
 1468|  7.21k|        if (s->server) {
  ------------------
  |  Branch (1468:13): [True: 3.58k, False: 3.62k]
  ------------------
 1469|       |            /*
 1470|       |             * In TLSv1.3 we update the cache as part of constructing the
 1471|       |             * NewSessionTicket
 1472|       |             */
 1473|  3.58k|            if (!SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  273|  3.58k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.16k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.58k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.58k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.58k, False: 0]
  |  |  ------------------
  |  |  274|  3.58k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.58k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.58k, False: 0]
  |  |  ------------------
  |  |  275|  3.58k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.58k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.58k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.58k, False: 0]
  |  |  ------------------
  ------------------
 1474|      0|                ssl_update_cache(s, SSL_SESS_CACHE_SERVER);
  ------------------
  |  |  735|      0|#define SSL_SESS_CACHE_SERVER 0x0002
  ------------------
 1475|       |
 1476|       |            /* N.B. s->ctx may not equal s->session_ctx */
 1477|  3.58k|            ssl_tsan_counter(sctx, &sctx->stats.sess_accept_good);
 1478|  3.58k|            s->handshake_func = ossl_statem_accept;
 1479|  3.62k|        } else {
 1480|  3.62k|            if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 1481|       |                /*
 1482|       |                 * We encourage applications to only use TLSv1.3 tickets once,
 1483|       |                 * so we remove this one from the cache.
 1484|       |                 */
 1485|  3.62k|                if ((s->session_ctx->session_cache_mode
  ------------------
  |  Branch (1485:21): [True: 3.62k, False: 0]
  ------------------
 1486|  3.62k|                        & SSL_SESS_CACHE_CLIENT)
  ------------------
  |  |  734|  3.62k|#define SSL_SESS_CACHE_CLIENT 0x0001
  ------------------
 1487|  3.62k|                    != 0)
 1488|  3.62k|                    SSL_CTX_remove_session(s->session_ctx, s->session);
 1489|  3.62k|            } else {
 1490|       |                /*
 1491|       |                 * In TLSv1.3 we update the cache as part of processing the
 1492|       |                 * NewSessionTicket
 1493|       |                 */
 1494|      0|                ssl_update_cache(s, SSL_SESS_CACHE_CLIENT);
  ------------------
  |  |  734|      0|#define SSL_SESS_CACHE_CLIENT 0x0001
  ------------------
 1495|      0|            }
 1496|  3.62k|            if (s->hit)
  ------------------
  |  Branch (1496:17): [True: 0, False: 3.62k]
  ------------------
 1497|      0|                ssl_tsan_counter(s->session_ctx,
 1498|      0|                    &s->session_ctx->stats.sess_hit);
 1499|       |
 1500|  3.62k|            s->handshake_func = ossl_statem_connect;
 1501|  3.62k|            ssl_tsan_counter(s->session_ctx,
 1502|  3.62k|                &s->session_ctx->stats.sess_connect_good);
 1503|  3.62k|        }
 1504|       |
 1505|  7.21k|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  7.21k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  7.21k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  7.21k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 7.21k]
  |  |  ------------------
  ------------------
 1506|       |            /* done with handshaking */
 1507|      0|            s->d1->handshake_read_seq = 0;
 1508|      0|            s->d1->handshake_write_seq = 0;
 1509|      0|            s->d1->next_handshake_write_seq = 0;
 1510|      0|            dtls1_clear_received_buffer(s);
 1511|      0|        }
 1512|  7.21k|    }
 1513|       |
 1514|  17.9k|    if (s->info_callback != NULL)
  ------------------
  |  Branch (1514:9): [True: 0, False: 17.9k]
  ------------------
 1515|      0|        cb = s->info_callback;
 1516|  17.9k|    else if (sctx->info_callback != NULL)
  ------------------
  |  Branch (1516:14): [True: 0, False: 17.9k]
  ------------------
 1517|      0|        cb = sctx->info_callback;
 1518|       |
 1519|       |    /* The callback may expect us to not be in init at handshake done */
 1520|  17.9k|    ossl_statem_set_in_init(s, 0);
 1521|       |
 1522|  17.9k|    if (cb != NULL) {
  ------------------
  |  Branch (1522:9): [True: 0, False: 17.9k]
  ------------------
 1523|      0|        if (cleanuphand
  ------------------
  |  Branch (1523:13): [True: 0, False: 0]
  ------------------
 1524|      0|            || !SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      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 (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      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 (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1525|      0|            || SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  285|      0|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 0, False: 0]
  |  |  ------------------
  |  |  286|      0|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1526|      0|            cb(ssl, SSL_CB_HANDSHAKE_DONE, 1);
  ------------------
  |  | 1170|      0|#define SSL_CB_HANDSHAKE_DONE 0x20
  ------------------
 1527|      0|    }
 1528|       |
 1529|  17.9k|    if (!stop) {
  ------------------
  |  Branch (1529:9): [True: 3.58k, False: 14.3k]
  ------------------
 1530|       |        /* If we've got more work to do we go back into init */
 1531|  3.58k|        ossl_statem_set_in_init(s, 1);
 1532|  3.58k|        return WORK_FINISHED_CONTINUE;
 1533|  3.58k|    }
 1534|       |
 1535|  14.3k|    return WORK_FINISHED_STOP;
 1536|  17.9k|}
tls_get_message_header:
 1539|  43.6k|{
 1540|       |    /* s->init_num < SSL3_HM_HEADER_LENGTH */
 1541|  43.6k|    int skip_message, i;
 1542|  43.6k|    uint8_t recvd_type;
 1543|  43.6k|    unsigned char *p;
 1544|  43.6k|    size_t l, readbytes;
 1545|  43.6k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  43.6k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1546|  43.6k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  43.6k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1547|       |
 1548|  43.6k|    p = (unsigned char *)s->init_buf->data;
 1549|       |
 1550|  43.6k|    do {
 1551|  76.2k|        while (s->init_num < SSL3_HM_HEADER_LENGTH) {
  ------------------
  |  |  141|  76.2k|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (1551:16): [True: 43.6k, False: 32.5k]
  ------------------
 1552|  43.6k|            i = ssl->method->ssl_read_bytes(ssl, SSL3_RT_HANDSHAKE, &recvd_type,
  ------------------
  |  |  221|  43.6k|#define SSL3_RT_HANDSHAKE 22
  ------------------
 1553|  43.6k|                &p[s->init_num],
 1554|  43.6k|                SSL3_HM_HEADER_LENGTH - s->init_num,
  ------------------
  |  |  141|  43.6k|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1555|  43.6k|                0, &readbytes);
 1556|  43.6k|            if (i <= 0) {
  ------------------
  |  Branch (1556:17): [True: 11.1k, False: 32.5k]
  ------------------
 1557|  11.1k|                s->rwstate = SSL_READING;
  ------------------
  |  |  957|  11.1k|#define SSL_READING 3
  ------------------
 1558|  11.1k|                return 0;
 1559|  11.1k|            }
 1560|  32.5k|            if (recvd_type == SSL3_RT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  219|  32.5k|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (1560:17): [True: 0, False: 32.5k]
  ------------------
 1561|       |                /*
 1562|       |                 * A ChangeCipherSpec must be a single byte and may not occur
 1563|       |                 * in the middle of a handshake message.
 1564|       |                 */
 1565|      0|                if (s->init_num != 0 || readbytes != 1 || p[0] != SSL3_MT_CCS) {
  ------------------
  |  |  339|      0|#define SSL3_MT_CCS 1
  ------------------
  |  Branch (1565:21): [True: 0, False: 0]
  |  Branch (1565:41): [True: 0, False: 0]
  |  Branch (1565:59): [True: 0, False: 0]
  ------------------
 1566|      0|                    SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1567|      0|                        SSL_R_BAD_CHANGE_CIPHER_SPEC);
 1568|      0|                    return 0;
 1569|      0|                }
 1570|      0|                if (s->statem.hand_state == TLS_ST_BEFORE
  ------------------
  |  Branch (1570:21): [True: 0, False: 0]
  ------------------
 1571|      0|                    && (s->s3.flags & TLS1_FLAGS_STATELESS) != 0) {
  ------------------
  |  |  304|      0|#define TLS1_FLAGS_STATELESS 0x0800
  ------------------
  |  Branch (1571:24): [True: 0, False: 0]
  ------------------
 1572|       |                    /*
 1573|       |                     * We are stateless and we received a CCS. Probably this is
 1574|       |                     * from a client between the first and second ClientHellos.
 1575|       |                     * We should ignore this, but return an error because we do
 1576|       |                     * not return success until we see the second ClientHello
 1577|       |                     * with a valid cookie.
 1578|       |                     */
 1579|      0|                    return 0;
 1580|      0|                }
 1581|      0|                s->s3.tmp.message_type = *mt = SSL3_MT_CHANGE_CIPHER_SPEC;
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
 1582|      0|                s->init_num = readbytes - 1;
 1583|      0|                s->init_msg = s->init_buf->data;
 1584|      0|                s->s3.tmp.message_size = readbytes;
 1585|      0|                return 1;
 1586|  32.5k|            } else if (recvd_type != SSL3_RT_HANDSHAKE) {
  ------------------
  |  |  221|  32.5k|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (1586:24): [True: 0, False: 32.5k]
  ------------------
 1587|      0|                SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1588|      0|                    SSL_R_CCS_RECEIVED_EARLY);
 1589|      0|                return 0;
 1590|      0|            }
 1591|  32.5k|            s->init_num += readbytes;
 1592|  32.5k|        }
 1593|       |
 1594|  32.5k|        skip_message = 0;
 1595|  32.5k|        if (!s->server)
  ------------------
  |  Branch (1595:13): [True: 25.3k, False: 7.21k]
  ------------------
 1596|  25.3k|            if (s->statem.hand_state != TLS_ST_OK
  ------------------
  |  Branch (1596:17): [True: 18.1k, False: 7.16k]
  ------------------
 1597|  18.1k|                && p[0] == SSL3_MT_HELLO_REQUEST)
  ------------------
  |  |  312|  18.1k|#define SSL3_MT_HELLO_REQUEST 0
  ------------------
  |  Branch (1597:20): [True: 0, False: 18.1k]
  ------------------
 1598|       |                /*
 1599|       |                 * The server may always send 'Hello Request' messages --
 1600|       |                 * we are doing a handshake anyway now, so ignore them if
 1601|       |                 * their format is correct. Does not count for 'Finished'
 1602|       |                 * MAC.
 1603|       |                 */
 1604|      0|                if (p[1] == 0 && p[2] == 0 && p[3] == 0) {
  ------------------
  |  Branch (1604:21): [True: 0, False: 0]
  |  Branch (1604:34): [True: 0, False: 0]
  |  Branch (1604:47): [True: 0, False: 0]
  ------------------
 1605|      0|                    s->init_num = 0;
 1606|      0|                    skip_message = 1;
 1607|       |
 1608|      0|                    if (s->msg_callback)
  ------------------
  |  Branch (1608:25): [True: 0, False: 0]
  ------------------
 1609|      0|                        s->msg_callback(0, s->version, SSL3_RT_HANDSHAKE,
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
 1610|      0|                            p, SSL3_HM_HEADER_LENGTH, ussl,
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1611|      0|                            s->msg_callback_arg);
 1612|      0|                }
 1613|  32.5k|    } while (skip_message);
  ------------------
  |  Branch (1613:14): [True: 0, False: 32.5k]
  ------------------
 1614|       |    /* s->init_num == SSL3_HM_HEADER_LENGTH */
 1615|       |
 1616|  32.5k|    *mt = *p;
 1617|  32.5k|    s->s3.tmp.message_type = *(p++);
 1618|       |
 1619|  32.5k|    n2l3(p, l);
  ------------------
  |  |  196|  32.5k|#define n2l3(c, l) ((l = (((unsigned long)((c)[0])) << 16) | (((unsigned long)((c)[1])) << 8) | (((unsigned long)((c)[2])))), (c) += 3)
  ------------------
 1620|       |    /* BUF_MEM_grow takes an 'int' parameter */
 1621|  32.5k|    if (l > (INT_MAX - SSL3_HM_HEADER_LENGTH)) {
  ------------------
  |  |  141|  32.5k|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (1621:9): [True: 0, False: 32.5k]
  ------------------
 1622|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_EXCESSIVE_MESSAGE_SIZE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1623|      0|        return 0;
 1624|      0|    }
 1625|  32.5k|    s->s3.tmp.message_size = l;
 1626|       |
 1627|  32.5k|    s->init_msg = s->init_buf->data + SSL3_HM_HEADER_LENGTH;
  ------------------
  |  |  141|  32.5k|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1628|  32.5k|    s->init_num = 0;
 1629|       |
 1630|  32.5k|    return 1;
 1631|  32.5k|}
tls_get_message_body:
 1650|  32.5k|{
 1651|  32.5k|    size_t toread, readbytes;
 1652|  32.5k|    unsigned char *p;
 1653|  32.5k|    int i;
 1654|  32.5k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  32.5k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1655|  32.5k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  32.5k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1656|       |
 1657|  32.5k|    if (s->s3.tmp.message_type == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|  32.5k|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (1657:9): [True: 0, False: 32.5k]
  ------------------
 1658|       |        /* We've already read everything in */
 1659|      0|        *len = (unsigned long)s->init_num;
 1660|      0|        return 1;
 1661|      0|    }
 1662|       |
 1663|  32.5k|    toread = s->s3.tmp.message_size - s->init_num;
 1664|  65.0k|    while (toread > 0) {
  ------------------
  |  Branch (1664:12): [True: 32.5k, False: 32.5k]
  ------------------
 1665|  32.5k|        size_t chunk = toread > SSL3_RT_MAX_PLAIN_LENGTH ? SSL3_RT_MAX_PLAIN_LENGTH : toread;
  ------------------
  |  |  177|  32.5k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
                      size_t chunk = toread > SSL3_RT_MAX_PLAIN_LENGTH ? SSL3_RT_MAX_PLAIN_LENGTH : toread;
  ------------------
  |  |  177|      0|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (1665:24): [True: 0, False: 32.5k]
  ------------------
 1666|       |
 1667|       |        /*
 1668|       |         * We incrementally allocate the buffer to guard against the peer
 1669|       |         * claiming a very large message size and then not sending it.
 1670|       |         */
 1671|  32.5k|        if (!grow_init_buf(s, s->init_num + chunk + SSL3_HM_HEADER_LENGTH)) {
  ------------------
  |  |  141|  32.5k|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (1671:13): [True: 0, False: 32.5k]
  ------------------
 1672|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_BUF_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1673|      0|            return 0;
 1674|      0|        }
 1675|       |
 1676|       |        /* init_msg location can change after grow_init_buf */
 1677|  32.5k|        p = s->init_msg;
 1678|  32.5k|        i = ssl->method->ssl_read_bytes(ssl, SSL3_RT_HANDSHAKE, NULL,
  ------------------
  |  |  221|  32.5k|#define SSL3_RT_HANDSHAKE 22
  ------------------
 1679|  32.5k|            &p[s->init_num], chunk, 0, &readbytes);
 1680|  32.5k|        if (i <= 0) {
  ------------------
  |  Branch (1680:13): [True: 0, False: 32.5k]
  ------------------
 1681|      0|            s->rwstate = SSL_READING;
  ------------------
  |  |  957|      0|#define SSL_READING 3
  ------------------
 1682|      0|            *len = 0;
 1683|      0|            return 0;
 1684|      0|        }
 1685|  32.5k|        s->init_num += readbytes;
 1686|  32.5k|        toread -= readbytes;
 1687|  32.5k|    }
 1688|       |
 1689|       |    /*
 1690|       |     * If receiving Finished, record MAC of prior handshake messages for
 1691|       |     * Finished verification.
 1692|       |     */
 1693|  32.5k|    if (*(s->init_buf->data) == SSL3_MT_FINISHED && !ssl3_take_mac(s)) {
  ------------------
  |  |  324|  65.0k|#define SSL3_MT_FINISHED 20
  ------------------
  |  Branch (1693:9): [True: 7.21k, False: 25.3k]
  |  Branch (1693:53): [True: 0, False: 7.21k]
  ------------------
 1694|       |        /* SSLfatal() already called */
 1695|      0|        *len = 0;
 1696|      0|        return 0;
 1697|      0|    }
 1698|       |
 1699|       |    /*
 1700|       |     * We defer feeding in the HRR until later. We'll do it as part of
 1701|       |     * processing the message
 1702|       |     * The TLsv1.3 handshake transcript stops at the ClientFinished
 1703|       |     * message.
 1704|       |     */
 1705|  32.5k|#define SERVER_HELLO_RANDOM_OFFSET (SSL3_HM_HEADER_LENGTH + 2)
 1706|       |    /* KeyUpdate and NewSessionTicket do not need to be added */
 1707|  32.5k|    if (!SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|  65.0k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  65.0k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  32.5k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  32.5k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 32.5k, False: 0]
  |  |  ------------------
  |  |  274|  32.5k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  32.5k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  65.0k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 32.5k, False: 0]
  |  |  ------------------
  |  |  275|  65.0k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  32.5k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  32.5k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 25.2k, False: 7.25k]
  |  |  ------------------
  ------------------
 1708|  25.2k|        || (s->s3.tmp.message_type != SSL3_MT_NEWSESSION_TICKET
  ------------------
  |  |  315|  50.5k|#define SSL3_MT_NEWSESSION_TICKET 4
  ------------------
  |  Branch (1708:13): [True: 18.1k, False: 7.16k]
  ------------------
 1709|  25.3k|            && s->s3.tmp.message_type != SSL3_MT_KEY_UPDATE)) {
  ------------------
  |  |  328|  18.1k|#define SSL3_MT_KEY_UPDATE 24
  ------------------
  |  Branch (1709:16): [True: 18.1k, False: 0]
  ------------------
 1710|  25.3k|        if (s->s3.tmp.message_type != SSL3_MT_SERVER_HELLO
  ------------------
  |  |  314|  50.7k|#define SSL3_MT_SERVER_HELLO 2
  ------------------
  |  Branch (1710:13): [True: 21.7k, False: 3.62k]
  ------------------
 1711|  3.62k|            || s->init_num < SERVER_HELLO_RANDOM_OFFSET + SSL3_RANDOM_SIZE
  ------------------
  |  | 1705|  3.62k|#define SERVER_HELLO_RANDOM_OFFSET (SSL3_HM_HEADER_LENGTH + 2)
  |  |  ------------------
  |  |  |  |  141|  3.62k|#define SSL3_HM_HEADER_LENGTH 4
  |  |  ------------------
  ------------------
                          || s->init_num < SERVER_HELLO_RANDOM_OFFSET + SSL3_RANDOM_SIZE
  ------------------
  |  |  137|  28.9k|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1711:16): [True: 0, False: 3.62k]
  ------------------
 1712|  3.62k|            || memcmp(hrrrandom,
  ------------------
  |  Branch (1712:16): [True: 3.62k, False: 0]
  ------------------
 1713|  3.62k|                   s->init_buf->data + SERVER_HELLO_RANDOM_OFFSET,
  ------------------
  |  | 1705|  3.62k|#define SERVER_HELLO_RANDOM_OFFSET (SSL3_HM_HEADER_LENGTH + 2)
  |  |  ------------------
  |  |  |  |  141|  3.62k|#define SSL3_HM_HEADER_LENGTH 4
  |  |  ------------------
  ------------------
 1714|  3.62k|                   SSL3_RANDOM_SIZE)
  ------------------
  |  |  137|  3.62k|#define SSL3_RANDOM_SIZE 32
  ------------------
 1715|  25.3k|                != 0) {
 1716|  25.3k|            if (!ssl3_finish_mac(s, (unsigned char *)s->init_buf->data,
  ------------------
  |  Branch (1716:17): [True: 0, False: 25.3k]
  ------------------
 1717|  25.3k|                    s->init_num + SSL3_HM_HEADER_LENGTH)) {
  ------------------
  |  |  141|  25.3k|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1718|       |                /* SSLfatal() already called */
 1719|      0|                *len = 0;
 1720|      0|                return 0;
 1721|      0|            }
 1722|  25.3k|        }
 1723|  25.3k|    }
 1724|  32.5k|    if (s->msg_callback)
  ------------------
  |  Branch (1724:9): [True: 0, False: 32.5k]
  ------------------
 1725|      0|        s->msg_callback(0, s->version, SSL3_RT_HANDSHAKE, s->init_buf->data,
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
 1726|      0|            (size_t)s->init_num + SSL3_HM_HEADER_LENGTH, ussl,
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1727|      0|            s->msg_callback_arg);
 1728|       |
 1729|  32.5k|    *len = s->init_num;
 1730|  32.5k|    return 1;
 1731|  32.5k|}
ssl_allow_compression:
 1790|  3.62k|{
 1791|  3.62k|    if (s->options & SSL_OP_NO_COMPRESSION)
  ------------------
  |  |  395|  3.62k|#define SSL_OP_NO_COMPRESSION SSL_OP_BIT(17)
  |  |  ------------------
  |  |  |  |  351|  3.62k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1791:9): [True: 3.62k, False: 0]
  ------------------
 1792|  3.62k|        return 0;
 1793|      0|    return ssl_security(s, SSL_SECOP_COMPRESSION, 0, 0, NULL);
  ------------------
  |  | 2780|      0|#define SSL_SECOP_COMPRESSION (15 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2729|      0|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
 1794|  3.62k|}
ssl_version_cmp:
 1805|  1.31M|{
 1806|  1.31M|    int dtls = SSL_CONNECTION_IS_DTLS(s);
  ------------------
  |  |  266|  1.31M|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.31M|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  1.31M|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
 1807|       |
 1808|  1.31M|    if (versiona == versionb)
  ------------------
  |  Branch (1808:9): [True: 642k, False: 674k]
  ------------------
 1809|   642k|        return 0;
 1810|   674k|    if (!dtls)
  ------------------
  |  Branch (1810:9): [True: 674k, False: 0]
  ------------------
 1811|   674k|        return versiona < versionb ? -1 : 1;
  ------------------
  |  Branch (1811:16): [True: 497k, False: 177k]
  ------------------
 1812|      0|    return DTLS_VERSION_LT(versiona, versionb) ? -1 : 1;
  ------------------
  |  |   64|      0|#define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (64:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1813|   674k|}
ssl_version_supported:
 1967|  3.62k|{
 1968|  3.62k|    const version_info *vent;
 1969|  3.62k|    const version_info *table;
 1970|       |
 1971|  3.62k|    switch (SSL_CONNECTION_GET_SSL(s)->method->version) {
  ------------------
  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1972|      0|    default:
  ------------------
  |  Branch (1972:5): [True: 0, False: 3.62k]
  ------------------
 1973|       |        /* Version should match method version for non-ANY method */
 1974|      0|        return ssl_version_cmp(s, version, s->version) == 0;
 1975|  3.62k|    case TLS_ANY_VERSION:
  ------------------
  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (1975:5): [True: 3.62k, False: 0]
  ------------------
 1976|  3.62k|        table = tls_version_table;
 1977|  3.62k|        break;
 1978|      0|    case DTLS_ANY_VERSION:
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (1978:5): [True: 0, False: 3.62k]
  ------------------
 1979|      0|        table = dtls_version_table;
 1980|      0|        break;
 1981|  3.62k|    }
 1982|       |
 1983|  3.62k|    for (vent = table;
 1984|  3.62k|        vent->version != 0 && ssl_version_cmp(s, version, vent->version) <= 0;
  ------------------
  |  Branch (1984:9): [True: 3.62k, False: 0]
  |  Branch (1984:31): [True: 3.62k, False: 0]
  ------------------
 1985|  3.62k|        ++vent) {
 1986|  3.62k|        const SSL_METHOD *(*thismeth)(void) = s->server ? vent->smeth
  ------------------
  |  Branch (1986:47): [True: 3.62k, False: 0]
  ------------------
 1987|  3.62k|                                                        : vent->cmeth;
 1988|       |
 1989|  3.62k|        if (thismeth != NULL
  ------------------
  |  Branch (1989:13): [True: 3.62k, False: 0]
  ------------------
 1990|  3.62k|            && ssl_version_cmp(s, version, vent->version) == 0
  ------------------
  |  Branch (1990:16): [True: 3.62k, False: 0]
  ------------------
 1991|  3.62k|            && ssl_method_error(s, thismeth()) == 0
  ------------------
  |  Branch (1991:16): [True: 3.62k, False: 0]
  ------------------
 1992|  3.62k|            && (!s->server
  ------------------
  |  Branch (1992:17): [True: 0, False: 3.62k]
  ------------------
 1993|  3.62k|                || version != TLS1_3_VERSION
  ------------------
  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1993:20): [True: 0, False: 3.62k]
  ------------------
 1994|  3.62k|                || is_tls13_capable(s))) {
  ------------------
  |  Branch (1994:20): [True: 3.62k, False: 0]
  ------------------
 1995|  3.62k|            if (meth != NULL)
  ------------------
  |  Branch (1995:17): [True: 3.62k, False: 0]
  ------------------
 1996|  3.62k|                *meth = thismeth();
 1997|  3.62k|            return 1;
 1998|  3.62k|        }
 1999|  3.62k|    }
 2000|      0|    return 0;
 2001|  3.62k|}
ssl_set_version_bound:
 2059|  10.9k|{
 2060|  10.9k|    int valid_tls;
 2061|  10.9k|    int valid_dtls;
 2062|       |
 2063|  10.9k|    if (version == 0) {
  ------------------
  |  Branch (2063:9): [True: 3.62k, False: 7.36k]
  ------------------
 2064|  3.62k|        *bound = version;
 2065|  3.62k|        return 1;
 2066|  3.62k|    }
 2067|       |
 2068|  7.36k|    valid_tls = version > SSL3_VERSION && version <= TLS_MAX_VERSION_INTERNAL;
  ------------------
  |  |   23|  14.7k|#define SSL3_VERSION 0x0300
  ------------------
                  valid_tls = version > SSL3_VERSION && version <= TLS_MAX_VERSION_INTERNAL;
  ------------------
  |  |   54|  7.36k|#define TLS_MAX_VERSION_INTERNAL TLS1_3_VERSION
  |  |  ------------------
  |  |  |  |   27|  14.7k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  ------------------
  |  Branch (2068:17): [True: 7.36k, False: 0]
  |  Branch (2068:43): [True: 7.36k, False: 0]
  ------------------
 2069|  7.36k|    valid_dtls =
 2070|       |        /* We support client side pre-standardisation version of DTLS */
 2071|  7.36k|        (version == DTLS1_BAD_VER)
  ------------------
  |  |   30|  7.36k|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (2071:9): [True: 0, False: 7.36k]
  ------------------
 2072|  7.36k|        || (DTLS_VERSION_LE(version, DTLS_MAX_VERSION_INTERNAL)
  ------------------
  |  |   65|  14.7k|#define DTLS_VERSION_LE(v1, v2) (dtls_ver_ordinal(v1) >= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|  7.36k|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  7.36k|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 7.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LE(v1, v2) (dtls_ver_ordinal(v1) >= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|  7.36k|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  7.36k|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 7.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (65:33): [True: 0, False: 7.36k]
  |  |  ------------------
  ------------------
 2073|      0|            && DTLS_VERSION_GE(version, DTLS1_VERSION));
  ------------------
  |  |   63|      0|#define DTLS_VERSION_GE(v1, v2) (dtls_ver_ordinal(v1) <= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_GE(v1, v2) (dtls_ver_ordinal(v1) <= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (63:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2074|       |
 2075|  7.36k|    if (!valid_tls && !valid_dtls)
  ------------------
  |  Branch (2075:9): [True: 0, False: 7.36k]
  |  Branch (2075:23): [True: 0, False: 0]
  ------------------
 2076|      0|        return 0;
 2077|       |
 2078|       |    /*-
 2079|       |     * Restrict TLS methods to TLS protocol versions.
 2080|       |     * Restrict DTLS methods to DTLS protocol versions.
 2081|       |     * Note, DTLS version numbers are decreasing, use comparison macros.
 2082|       |     *
 2083|       |     * Note that for both lower-bounds we use explicit versions, not
 2084|       |     * (D)TLS_MIN_VERSION.  This is because we don't want to break user
 2085|       |     * configurations.  If the MIN (supported) version ever rises, the user's
 2086|       |     * "floor" remains valid even if no longer available.  We don't expect the
 2087|       |     * MAX ceiling to ever get lower, so making that variable makes sense.
 2088|       |     *
 2089|       |     * We ignore attempts to set bounds on version-inflexible methods,
 2090|       |     * returning success.
 2091|       |     */
 2092|  7.36k|    switch (method_version) {
 2093|      0|    default:
  ------------------
  |  Branch (2093:5): [True: 0, False: 7.36k]
  ------------------
 2094|      0|        break;
 2095|       |
 2096|  7.36k|    case TLS_ANY_VERSION:
  ------------------
  |  |   40|  7.36k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (2096:5): [True: 7.36k, False: 0]
  ------------------
 2097|  7.36k|        if (valid_tls)
  ------------------
  |  Branch (2097:13): [True: 7.36k, False: 0]
  ------------------
 2098|  7.36k|            *bound = version;
 2099|  7.36k|        break;
 2100|       |
 2101|      0|    case DTLS_ANY_VERSION:
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (2101:5): [True: 0, False: 7.36k]
  ------------------
 2102|      0|        if (valid_dtls)
  ------------------
  |  Branch (2102:13): [True: 0, False: 0]
  ------------------
 2103|      0|            *bound = version;
 2104|      0|        break;
 2105|  7.36k|    }
 2106|  7.36k|    return 1;
 2107|  7.36k|}
ssl_choose_server_version:
 2141|  3.62k|{
 2142|       |    /*-
 2143|       |     * With version-flexible methods we have an initial state with:
 2144|       |     *
 2145|       |     *   s->method->version == (D)TLS_ANY_VERSION,
 2146|       |     *   s->version == (D)TLS_MAX_VERSION_INTERNAL.
 2147|       |     *
 2148|       |     * So we detect version-flexible methods via the method version, not the
 2149|       |     * handle version.
 2150|       |     */
 2151|  3.62k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2152|  3.62k|    int server_version = ssl->method->version;
 2153|  3.62k|    int client_version = hello->legacy_version;
 2154|  3.62k|    const version_info *vent;
 2155|  3.62k|    const version_info *table;
 2156|  3.62k|    int disabled = 0;
 2157|  3.62k|    RAW_EXTENSION *suppversions;
 2158|       |
 2159|  3.62k|    s->client_version = client_version;
 2160|       |
 2161|  3.62k|    switch (server_version) {
 2162|      0|    default:
  ------------------
  |  Branch (2162:5): [True: 0, False: 3.62k]
  ------------------
 2163|      0|        if (!SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      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 (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      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 (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2164|      0|            if (ssl_version_cmp(s, client_version, s->version) < 0)
  ------------------
  |  Branch (2164:17): [True: 0, False: 0]
  ------------------
 2165|      0|                return SSL_R_WRONG_SSL_VERSION;
  ------------------
  |  |  376|      0|#define SSL_R_WRONG_SSL_VERSION 266
  ------------------
 2166|      0|            *dgrd = DOWNGRADE_NONE;
 2167|       |            /*
 2168|       |             * If this SSL handle is not from a version flexible method we don't
 2169|       |             * (and never did) check min/max FIPS or Suite B constraints.  Hope
 2170|       |             * that's OK.  It is up to the caller to not choose fixed protocol
 2171|       |             * versions they don't want.  If not, then easy to fix, just return
 2172|       |             * ssl_method_error(s, s->method)
 2173|       |             */
 2174|      0|            return 0;
 2175|      0|        }
 2176|       |        /*
 2177|       |         * Fall through if we are TLSv1.3 already (this means we must be after
 2178|       |         * a HelloRetryRequest
 2179|       |         */
 2180|       |        /* fall thru */
 2181|  3.62k|    case TLS_ANY_VERSION:
  ------------------
  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (2181:5): [True: 3.62k, False: 0]
  ------------------
 2182|  3.62k|        table = tls_version_table;
 2183|  3.62k|        break;
 2184|      0|    case DTLS_ANY_VERSION:
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (2184:5): [True: 0, False: 3.62k]
  ------------------
 2185|      0|        table = dtls_version_table;
 2186|      0|        break;
 2187|  3.62k|    }
 2188|       |
 2189|  3.62k|    suppversions = &hello->pre_proc_exts[TLSEXT_IDX_supported_versions];
 2190|       |
 2191|  3.62k|#ifndef OPENSSL_NO_ECH
 2192|       |    /*
 2193|       |     * Check we're dealing with a TLSv1.3 connection when ECH has
 2194|       |     * succeeded, and not with a smuggled earlier version ClientHello
 2195|       |     * (which could be a form of attack).
 2196|       |     * This bit checks there is a supported version present, a little
 2197|       |     * bit further below, we check that that version is TLSv1.3
 2198|       |     */
 2199|  3.62k|    if (!suppversions->present && s->ext.ech.success == 1)
  ------------------
  |  Branch (2199:9): [True: 0, False: 3.62k]
  |  Branch (2199:35): [True: 0, False: 0]
  ------------------
 2200|      0|        return SSL_R_UNSUPPORTED_PROTOCOL;
  ------------------
  |  |  362|      0|#define SSL_R_UNSUPPORTED_PROTOCOL 258
  ------------------
 2201|  3.62k|#endif
 2202|       |
 2203|       |    /* If we did an HRR then supported versions is mandatory */
 2204|  3.62k|    if (!suppversions->present && s->hello_retry_request != SSL_HRR_NONE)
  ------------------
  |  Branch (2204:9): [True: 0, False: 3.62k]
  |  Branch (2204:35): [True: 0, False: 0]
  ------------------
 2205|      0|        return SSL_R_UNSUPPORTED_PROTOCOL;
  ------------------
  |  |  362|      0|#define SSL_R_UNSUPPORTED_PROTOCOL 258
  ------------------
 2206|       |
 2207|  3.62k|    if (suppversions->present && !SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (2207:9): [True: 3.62k, False: 0]
  |  Branch (2207:34): [True: 3.62k, False: 0]
  ------------------
 2208|  3.62k|        unsigned int candidate_vers = 0;
 2209|  3.62k|        unsigned int best_vers = 0;
 2210|  3.62k|        const SSL_METHOD *best_method = NULL;
 2211|  3.62k|        PACKET versionslist;
 2212|       |
 2213|  3.62k|        suppversions->parsed = 1;
 2214|       |
 2215|  3.62k|        if (!PACKET_as_length_prefixed_1(&suppversions->data, &versionslist)) {
  ------------------
  |  Branch (2215:13): [True: 0, False: 3.62k]
  ------------------
 2216|       |            /* Trailing or invalid data? */
 2217|      0|            return SSL_R_LENGTH_MISMATCH;
  ------------------
  |  |  166|      0|#define SSL_R_LENGTH_MISMATCH 159
  ------------------
 2218|      0|        }
 2219|       |
 2220|       |        /*
 2221|       |         * The TLSv1.3 spec says the client MUST set this to TLS1_2_VERSION.
 2222|       |         * The spec only requires servers to check that it isn't SSLv3:
 2223|       |         * "Any endpoint receiving a Hello message with
 2224|       |         * ClientHello.legacy_version or ServerHello.legacy_version set to
 2225|       |         * 0x0300 MUST abort the handshake with a "protocol_version" alert."
 2226|       |         * We are slightly stricter and require that it isn't SSLv3 or lower.
 2227|       |         * We tolerate TLSv1 and TLSv1.1.
 2228|       |         */
 2229|  3.62k|        if (client_version <= SSL3_VERSION)
  ------------------
  |  |   23|  3.62k|#define SSL3_VERSION 0x0300
  ------------------
  |  Branch (2229:13): [True: 0, False: 3.62k]
  ------------------
 2230|      0|            return SSL_R_BAD_LEGACY_VERSION;
  ------------------
  |  |   46|      0|#define SSL_R_BAD_LEGACY_VERSION 292
  ------------------
 2231|       |
 2232|  10.8k|        while (PACKET_get_net_2(&versionslist, &candidate_vers)) {
  ------------------
  |  Branch (2232:16): [True: 7.25k, False: 3.62k]
  ------------------
 2233|  7.25k|            if (ssl_version_cmp(s, candidate_vers, best_vers) <= 0)
  ------------------
  |  Branch (2233:17): [True: 3.62k, False: 3.62k]
  ------------------
 2234|  3.62k|                continue;
 2235|  3.62k|            if (ssl_version_supported(s, candidate_vers, &best_method))
  ------------------
  |  Branch (2235:17): [True: 3.62k, False: 0]
  ------------------
 2236|  3.62k|                best_vers = candidate_vers;
 2237|  3.62k|        }
 2238|  3.62k|        if (PACKET_remaining(&versionslist) != 0) {
  ------------------
  |  Branch (2238:13): [True: 0, False: 3.62k]
  ------------------
 2239|       |            /* Trailing data? */
 2240|      0|            return SSL_R_LENGTH_MISMATCH;
  ------------------
  |  |  166|      0|#define SSL_R_LENGTH_MISMATCH 159
  ------------------
 2241|      0|        }
 2242|       |
 2243|  3.62k|        if (best_vers > 0) {
  ------------------
  |  Branch (2243:13): [True: 3.62k, False: 0]
  ------------------
 2244|  3.62k|#ifndef OPENSSL_NO_ECH
 2245|       |            /* ECH needs TLSV1.3 also */
 2246|  3.62k|            if (s->ext.ech.success == 1 && best_vers != TLS1_3_VERSION)
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (2246:17): [True: 0, False: 3.62k]
  |  Branch (2246:44): [True: 0, False: 0]
  ------------------
 2247|      0|                return SSL_R_UNSUPPORTED_PROTOCOL;
  ------------------
  |  |  362|      0|#define SSL_R_UNSUPPORTED_PROTOCOL 258
  ------------------
 2248|  3.62k|#endif
 2249|  3.62k|            if (s->hello_retry_request != SSL_HRR_NONE) {
  ------------------
  |  Branch (2249:17): [True: 0, False: 3.62k]
  ------------------
 2250|       |                /*
 2251|       |                 * This is after a HelloRetryRequest so we better check that we
 2252|       |                 * negotiated TLSv1.3
 2253|       |                 */
 2254|      0|                if (best_vers != TLS1_3_VERSION)
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (2254:21): [True: 0, False: 0]
  ------------------
 2255|      0|                    return SSL_R_UNSUPPORTED_PROTOCOL;
  ------------------
  |  |  362|      0|#define SSL_R_UNSUPPORTED_PROTOCOL 258
  ------------------
 2256|      0|                return 0;
 2257|      0|            }
 2258|  3.62k|            check_for_downgrade(s, best_vers, dgrd);
 2259|  3.62k|            s->version = best_vers;
 2260|  3.62k|            ssl->method = best_method;
 2261|  3.62k|            if (!ssl_set_record_protocol_version(s, best_vers))
  ------------------
  |  Branch (2261:17): [True: 0, False: 3.62k]
  ------------------
 2262|      0|                return ERR_R_INTERNAL_ERROR;
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2263|       |
 2264|  3.62k|            return 0;
 2265|  3.62k|        }
 2266|      0|        return SSL_R_UNSUPPORTED_PROTOCOL;
  ------------------
  |  |  362|      0|#define SSL_R_UNSUPPORTED_PROTOCOL 258
  ------------------
 2267|  3.62k|    }
 2268|       |
 2269|       |    /*
 2270|       |     * If the supported versions extension isn't present, then the highest
 2271|       |     * version we can negotiate is TLSv1.2
 2272|       |     */
 2273|      0|    if (ssl_version_cmp(s, client_version, TLS1_3_VERSION) >= 0)
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (2273:9): [True: 0, False: 0]
  ------------------
 2274|      0|        client_version = TLS1_2_VERSION;
  ------------------
  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  ------------------
 2275|       |
 2276|       |    /*
 2277|       |     * No supported versions extension, so we just use the version supplied in
 2278|       |     * the ClientHello.
 2279|       |     */
 2280|      0|    for (vent = table; vent->version != 0; ++vent) {
  ------------------
  |  Branch (2280:24): [True: 0, False: 0]
  ------------------
 2281|      0|        const SSL_METHOD *method;
 2282|       |
 2283|      0|        if (vent->smeth == NULL || ssl_version_cmp(s, client_version, vent->version) < 0)
  ------------------
  |  Branch (2283:13): [True: 0, False: 0]
  |  Branch (2283:36): [True: 0, False: 0]
  ------------------
 2284|      0|            continue;
 2285|      0|        method = vent->smeth();
 2286|      0|        if (ssl_method_error(s, method) == 0) {
  ------------------
  |  Branch (2286:13): [True: 0, False: 0]
  ------------------
 2287|      0|            check_for_downgrade(s, vent->version, dgrd);
 2288|      0|            s->version = vent->version;
 2289|      0|            ssl->method = method;
 2290|      0|            if (!ssl_set_record_protocol_version(s, s->version))
  ------------------
  |  Branch (2290:17): [True: 0, False: 0]
  ------------------
 2291|      0|                return ERR_R_INTERNAL_ERROR;
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2292|       |
 2293|      0|            return 0;
 2294|      0|        }
 2295|      0|        disabled = 1;
 2296|      0|    }
 2297|      0|    return disabled ? SSL_R_UNSUPPORTED_PROTOCOL : SSL_R_VERSION_TOO_LOW;
  ------------------
  |  |  362|      0|#define SSL_R_UNSUPPORTED_PROTOCOL 258
  ------------------
                  return disabled ? SSL_R_UNSUPPORTED_PROTOCOL : SSL_R_VERSION_TOO_LOW;
  ------------------
  |  |  368|      0|#define SSL_R_VERSION_TOO_LOW 396
  ------------------
  |  Branch (2297:12): [True: 0, False: 0]
  ------------------
 2298|      0|}
ssl_choose_client_version:
 2313|  3.62k|{
 2314|  3.62k|    const version_info *vent;
 2315|  3.62k|    const version_info *table;
 2316|  3.62k|    int ret, ver_min, ver_max, real_max, origv;
 2317|  3.62k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2318|       |
 2319|  3.62k|    origv = s->version;
 2320|  3.62k|    s->version = version;
 2321|       |
 2322|       |    /* This will overwrite s->version if the extension is present */
 2323|  3.62k|    if (!tls_parse_extension(s, TLSEXT_IDX_supported_versions,
  ------------------
  |  Branch (2323:9): [True: 0, False: 3.62k]
  ------------------
 2324|  3.62k|            SSL_EXT_TLS1_2_SERVER_HELLO
  ------------------
  |  |  302|  3.62k|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
 2325|  3.62k|                | SSL_EXT_TLS1_3_SERVER_HELLO,
  ------------------
  |  |  303|  3.62k|#define SSL_EXT_TLS1_3_SERVER_HELLO 0x00200
  ------------------
 2326|  3.62k|            extensions,
 2327|  3.62k|            NULL, 0)) {
 2328|      0|        s->version = origv;
 2329|      0|        return 0;
 2330|      0|    }
 2331|       |
 2332|  3.62k|    if (s->hello_retry_request != SSL_HRR_NONE
  ------------------
  |  Branch (2332:9): [True: 0, False: 3.62k]
  ------------------
 2333|      0|        && s->version != TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (2333:12): [True: 0, False: 0]
  ------------------
 2334|      0|        s->version = origv;
 2335|      0|        SSLfatal(s, SSL_AD_PROTOCOL_VERSION, SSL_R_WRONG_SSL_VERSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2336|      0|        return 0;
 2337|      0|    }
 2338|       |
 2339|  3.62k|    switch (ssl->method->version) {
 2340|      0|    default:
  ------------------
  |  Branch (2340:5): [True: 0, False: 3.62k]
  ------------------
 2341|      0|        if (s->version != ssl->method->version) {
  ------------------
  |  Branch (2341:13): [True: 0, False: 0]
  ------------------
 2342|      0|            s->version = origv;
 2343|      0|            SSLfatal(s, SSL_AD_PROTOCOL_VERSION, SSL_R_WRONG_SSL_VERSION);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2344|      0|            return 0;
 2345|      0|        }
 2346|       |        /*
 2347|       |         * If this SSL handle is not from a version flexible method we don't
 2348|       |         * (and never did) check min/max, FIPS or Suite B constraints.  Hope
 2349|       |         * that's OK.  It is up to the caller to not choose fixed protocol
 2350|       |         * versions they don't want.  If not, then easy to fix, just return
 2351|       |         * ssl_method_error(s, s->method)
 2352|       |         */
 2353|      0|        if (!ssl_set_record_protocol_version(s, s->version)) {
  ------------------
  |  Branch (2353:13): [True: 0, False: 0]
  ------------------
 2354|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2355|      0|            return 0;
 2356|      0|        }
 2357|      0|        return 1;
 2358|  3.62k|    case TLS_ANY_VERSION:
  ------------------
  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (2358:5): [True: 3.62k, False: 0]
  ------------------
 2359|  3.62k|        table = tls_version_table;
 2360|  3.62k|        break;
 2361|      0|    case DTLS_ANY_VERSION:
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (2361:5): [True: 0, False: 3.62k]
  ------------------
 2362|      0|        table = dtls_version_table;
 2363|      0|        break;
 2364|  3.62k|    }
 2365|       |
 2366|  3.62k|    ret = ssl_get_min_max_version(s, &ver_min, &ver_max, &real_max);
 2367|  3.62k|    if (ret != 0) {
  ------------------
  |  Branch (2367:9): [True: 0, False: 3.62k]
  ------------------
 2368|      0|        s->version = origv;
 2369|      0|        SSLfatal(s, SSL_AD_PROTOCOL_VERSION, ret);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2370|      0|        return 0;
 2371|      0|    }
 2372|  3.62k|    if (ssl_version_cmp(s, s->version, ver_min) < 0
  ------------------
  |  Branch (2372:9): [True: 0, False: 3.62k]
  ------------------
 2373|  3.62k|        || ssl_version_cmp(s, s->version, ver_max) > 0) {
  ------------------
  |  Branch (2373:12): [True: 0, False: 3.62k]
  ------------------
 2374|      0|        s->version = origv;
 2375|      0|        SSLfatal(s, SSL_AD_PROTOCOL_VERSION, SSL_R_UNSUPPORTED_PROTOCOL);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2376|      0|        return 0;
 2377|      0|    }
 2378|       |
 2379|  3.62k|    if ((s->mode & SSL_MODE_SEND_FALLBACK_SCSV) == 0)
  ------------------
  |  |  553|  3.62k|#define SSL_MODE_SEND_FALLBACK_SCSV 0x00000080U
  ------------------
  |  Branch (2379:9): [True: 3.62k, False: 0]
  ------------------
 2380|  3.62k|        real_max = ver_max;
 2381|       |
 2382|       |    /* Check for downgrades */
 2383|       |    /* TODO(DTLSv1.3): Update this code for DTLSv1.3 */
 2384|  3.62k|    if (!SSL_CONNECTION_IS_DTLS(s) && real_max > s->version) {
  ------------------
  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (2384:9): [True: 3.62k, False: 0]
  |  Branch (2384:39): [True: 0, False: 3.62k]
  ------------------
 2385|       |        /* Signal applies to all versions */
 2386|      0|        if (memcmp(tls11downgrade,
  ------------------
  |  Branch (2386:13): [True: 0, False: 0]
  ------------------
 2387|      0|                s->s3.server_random + SSL3_RANDOM_SIZE
  ------------------
  |  |  137|      0|#define SSL3_RANDOM_SIZE 32
  ------------------
 2388|      0|                    - sizeof(tls11downgrade),
 2389|      0|                sizeof(tls11downgrade))
 2390|      0|            == 0) {
 2391|      0|            s->version = origv;
 2392|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2393|      0|                SSL_R_INAPPROPRIATE_FALLBACK);
 2394|      0|            return 0;
 2395|      0|        }
 2396|       |        /* Only when accepting TLS1.3 */
 2397|      0|        if (real_max == TLS1_3_VERSION
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (2397:13): [True: 0, False: 0]
  ------------------
 2398|      0|            && memcmp(tls12downgrade,
  ------------------
  |  Branch (2398:16): [True: 0, False: 0]
  ------------------
 2399|      0|                   s->s3.server_random + SSL3_RANDOM_SIZE
  ------------------
  |  |  137|      0|#define SSL3_RANDOM_SIZE 32
  ------------------
 2400|      0|                       - sizeof(tls12downgrade),
 2401|      0|                   sizeof(tls12downgrade))
 2402|      0|                == 0) {
 2403|      0|            s->version = origv;
 2404|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2405|      0|                SSL_R_INAPPROPRIATE_FALLBACK);
 2406|      0|            return 0;
 2407|      0|        }
 2408|      0|    }
 2409|       |
 2410|  3.62k|    for (vent = table; vent->version != 0; ++vent) {
  ------------------
  |  Branch (2410:24): [True: 3.62k, False: 0]
  ------------------
 2411|  3.62k|        if (vent->cmeth == NULL || s->version != vent->version)
  ------------------
  |  Branch (2411:13): [True: 0, False: 3.62k]
  |  Branch (2411:36): [True: 0, False: 3.62k]
  ------------------
 2412|      0|            continue;
 2413|       |
 2414|  3.62k|        ssl->method = vent->cmeth();
 2415|  3.62k|        if (!ssl_set_record_protocol_version(s, s->version)) {
  ------------------
  |  Branch (2415:13): [True: 0, False: 3.62k]
  ------------------
 2416|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2417|      0|            return 0;
 2418|      0|        }
 2419|  3.62k|        return 1;
 2420|  3.62k|    }
 2421|       |
 2422|      0|    s->version = origv;
 2423|       |    SSLfatal(s, SSL_AD_PROTOCOL_VERSION, SSL_R_UNSUPPORTED_PROTOCOL);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2424|      0|    return 0;
 2425|  3.62k|}
ssl_get_min_max_version:
 2451|  47.1k|{
 2452|  47.1k|    int version, tmp_real_max;
 2453|  47.1k|    int hole;
 2454|  47.1k|    const SSL_METHOD *method;
 2455|  47.1k|    const version_info *table;
 2456|  47.1k|    const version_info *vent;
 2457|  47.1k|    const SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  47.1k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2458|       |
 2459|  47.1k|    switch (ssl->method->version) {
 2460|      0|    default:
  ------------------
  |  Branch (2460:5): [True: 0, False: 47.1k]
  ------------------
 2461|       |        /*
 2462|       |         * If this SSL handle is not from a version flexible method we don't
 2463|       |         * (and never did) check min/max FIPS or Suite B constraints.  Hope
 2464|       |         * that's OK.  It is up to the caller to not choose fixed protocol
 2465|       |         * versions they don't want.  If not, then easy to fix, just return
 2466|       |         * ssl_method_error(s, s->method)
 2467|       |         */
 2468|      0|        *min_version = *max_version = s->version;
 2469|       |        /*
 2470|       |         * Providing a real_max only makes sense where we're using a version
 2471|       |         * flexible method.
 2472|       |         */
 2473|      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 (2473:13): [True: 0, False: 0]
  ------------------
 2474|      0|            return ERR_R_INTERNAL_ERROR;
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2475|      0|        return 0;
 2476|  47.1k|    case TLS_ANY_VERSION:
  ------------------
  |  |   40|  47.1k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (2476:5): [True: 47.1k, False: 0]
  ------------------
 2477|  47.1k|        table = tls_version_table;
 2478|  47.1k|        break;
 2479|      0|    case DTLS_ANY_VERSION:
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (2479:5): [True: 0, False: 47.1k]
  ------------------
 2480|      0|        table = dtls_version_table;
 2481|      0|        break;
 2482|  47.1k|    }
 2483|       |
 2484|       |    /*
 2485|       |     * SSL_OP_NO_X disables all protocols above X *if* there are some protocols
 2486|       |     * below X enabled. This is required in order to maintain the "version
 2487|       |     * capability" vector contiguous. Any versions with a NULL client method
 2488|       |     * (protocol version client is disabled at compile-time) is also a "hole".
 2489|       |     *
 2490|       |     * Our initial state is hole == 1, version == 0.  That is, versions above
 2491|       |     * the first version in the method table are disabled (a "hole" above
 2492|       |     * the valid protocol entries) and we don't have a selected version yet.
 2493|       |     *
 2494|       |     * Whenever "hole == 1", and we hit an enabled method, its version becomes
 2495|       |     * the selected version.  We're no longer in a hole, so "hole" becomes 0.
 2496|       |     *
 2497|       |     * If "hole == 0" and we hit an enabled method, we support a contiguous
 2498|       |     * range of at least two methods.  If we hit a disabled method,
 2499|       |     * then hole becomes true again, but nothing else changes yet,
 2500|       |     * because all the remaining methods may be disabled too.
 2501|       |     * If we again hit an enabled method after the new hole, it becomes
 2502|       |     * selected, as we start from scratch.
 2503|       |     */
 2504|  47.1k|    *min_version = version = 0;
 2505|  47.1k|    hole = 1;
 2506|  47.1k|    if (real_max != NULL)
  ------------------
  |  Branch (2506:9): [True: 3.62k, False: 43.5k]
  ------------------
 2507|  3.62k|        *real_max = 0;
 2508|  47.1k|    tmp_real_max = 0;
 2509|   235k|    for (vent = table; vent->version != 0; ++vent) {
  ------------------
  |  Branch (2509:24): [True: 188k, False: 47.1k]
  ------------------
 2510|       |        /*
 2511|       |         * A table entry with a NULL client method is still a hole in the
 2512|       |         * "version capability" vector.
 2513|       |         */
 2514|   188k|        if (vent->cmeth == NULL) {
  ------------------
  |  Branch (2514:13): [True: 0, False: 188k]
  ------------------
 2515|      0|            hole = 1;
 2516|      0|            tmp_real_max = 0;
 2517|      0|            continue;
 2518|      0|        }
 2519|   188k|        method = vent->cmeth();
 2520|       |
 2521|   188k|        if (hole == 1 && tmp_real_max == 0)
  ------------------
  |  Branch (2521:13): [True: 94.3k, False: 94.3k]
  |  Branch (2521:26): [True: 47.1k, False: 47.1k]
  ------------------
 2522|  47.1k|            tmp_real_max = vent->version;
 2523|       |
 2524|   188k|        if (ssl_method_error(s, method) != 0) {
  ------------------
  |  Branch (2524:13): [True: 94.3k, False: 94.3k]
  ------------------
 2525|  94.3k|            hole = 1;
 2526|  94.3k|        } else if (!hole) {
  ------------------
  |  Branch (2526:20): [True: 47.1k, False: 47.1k]
  ------------------
 2527|  47.1k|            *min_version = method->version;
 2528|  47.1k|        } else {
 2529|  47.1k|            if (real_max != NULL && tmp_real_max != 0)
  ------------------
  |  Branch (2529:17): [True: 3.62k, False: 43.5k]
  |  Branch (2529:37): [True: 3.62k, False: 0]
  ------------------
 2530|  3.62k|                *real_max = tmp_real_max;
 2531|  47.1k|            version = method->version;
 2532|  47.1k|            *min_version = version;
 2533|  47.1k|            hole = 0;
 2534|  47.1k|        }
 2535|   188k|    }
 2536|       |
 2537|  47.1k|    *max_version = version;
 2538|       |
 2539|       |    /* Fail if everything is disabled */
 2540|  47.1k|    if (version == 0)
  ------------------
  |  Branch (2540:9): [True: 0, False: 47.1k]
  ------------------
 2541|      0|        return SSL_R_NO_PROTOCOLS_AVAILABLE;
  ------------------
  |  |  208|      0|#define SSL_R_NO_PROTOCOLS_AVAILABLE 191
  ------------------
 2542|       |
 2543|  47.1k|    return 0;
 2544|  47.1k|}
ssl_set_client_hello_version:
 2555|  7.25k|{
 2556|  7.25k|    int ver_min, ver_max, ret;
 2557|       |
 2558|       |    /*
 2559|       |     * In a renegotiation we always send the same client_version that we sent
 2560|       |     * last time, regardless of which version we eventually negotiated.
 2561|       |     */
 2562|  7.25k|    if (!SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  285|  7.25k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 7.25k, False: 0]
  |  |  ------------------
  |  |  286|  7.25k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2563|      0|        return 0;
 2564|       |
 2565|  7.25k|    ret = ssl_get_min_max_version(s, &ver_min, &ver_max, NULL);
 2566|       |
 2567|  7.25k|    if (ret != 0)
  ------------------
  |  Branch (2567:9): [True: 0, False: 7.25k]
  ------------------
 2568|      0|        return ret;
 2569|       |
 2570|  7.25k|    s->version = ver_max;
 2571|       |
 2572|  7.25k|    if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  7.25k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 7.25k]
  |  |  ------------------
  ------------------
 2573|      0|        if (ver_max == DTLS1_BAD_VER) {
  ------------------
  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (2573:13): [True: 0, False: 0]
  ------------------
 2574|       |            /*
 2575|       |             * Even though this is technically before version negotiation,
 2576|       |             * because we have asked for DTLS1_BAD_VER we will never negotiate
 2577|       |             * anything else, and this has impacts on the record layer for when
 2578|       |             * we read the ServerHello. So we need to tell the record layer
 2579|       |             * about this immediately.
 2580|       |             */
 2581|      0|            if (!ssl_set_record_protocol_version(s, ver_max))
  ------------------
  |  Branch (2581:17): [True: 0, False: 0]
  ------------------
 2582|      0|                return 0;
 2583|      0|        }
 2584|  7.25k|    } else if (ver_max > TLS1_2_VERSION) {
  ------------------
  |  |   26|  7.25k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (2584:16): [True: 7.25k, False: 0]
  ------------------
 2585|       |        /* TLS1.3 always uses TLS1.2 in the legacy_version field */
 2586|  7.25k|        ver_max = TLS1_2_VERSION;
  ------------------
  |  |   26|  7.25k|#define TLS1_2_VERSION 0x0303
  ------------------
 2587|  7.25k|    }
 2588|       |
 2589|  7.25k|    s->client_version = ver_max;
 2590|  7.25k|    return 0;
 2591|  7.25k|}
check_in_list:
 2602|  25.4k|{
 2603|  25.4k|    size_t i;
 2604|       |
 2605|  25.4k|    if (groups == NULL || num_groups == 0)
  ------------------
  |  Branch (2605:9): [True: 0, False: 25.4k]
  |  Branch (2605:27): [True: 0, False: 25.4k]
  ------------------
 2606|      0|        return 0;
 2607|       |
 2608|  61.6k|    for (i = 0; i < num_groups; i++) {
  ------------------
  |  Branch (2608:17): [True: 54.4k, False: 7.25k]
  ------------------
 2609|  54.4k|        uint16_t group = groups[i];
 2610|       |
 2611|  54.4k|        if (group_id == group
  ------------------
  |  Branch (2611:13): [True: 18.1k, False: 36.2k]
  ------------------
 2612|  18.1k|            && (!checkallow
  ------------------
  |  Branch (2612:17): [True: 7.25k, False: 10.8k]
  ------------------
 2613|  18.1k|                || tls_group_allowed(s, group, SSL_SECOP_CURVE_CHECK))) {
  ------------------
  |  | 2764|  10.8k|#define SSL_SECOP_CURVE_CHECK (6 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2731|  10.8k|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  |  Branch (2613:20): [True: 10.8k, False: 0]
  ------------------
 2614|  18.1k|            if (pos != NULL)
  ------------------
  |  Branch (2614:17): [True: 10.8k, False: 7.25k]
  ------------------
 2615|  10.8k|                *pos = i;
 2616|  18.1k|            return 1;
 2617|  18.1k|        }
 2618|  54.4k|    }
 2619|       |
 2620|  7.25k|    return 0;
 2621|  25.4k|}
get_ca_names:
 2738|  3.62k|{
 2739|  3.62k|    const STACK_OF(X509_NAME) *ca_sk = NULL;
 2740|  3.62k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2741|       |
 2742|  3.62k|    if (s->server) {
  ------------------
  |  Branch (2742:9): [True: 0, False: 3.62k]
  ------------------
 2743|      0|        ca_sk = SSL_get_client_CA_list(ssl);
 2744|      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 (2744:13): [True: 0, False: 0]
  |  Branch (2744:30): [True: 0, False: 0]
  ------------------
 2745|      0|            ca_sk = NULL;
 2746|      0|    }
 2747|       |
 2748|  3.62k|    if (ca_sk == NULL)
  ------------------
  |  Branch (2748:9): [True: 3.62k, False: 0]
  ------------------
 2749|  3.62k|        ca_sk = SSL_get0_CA_list(ssl);
 2750|       |
 2751|  3.62k|    return ca_sk;
 2752|  3.62k|}
tls13_save_handshake_digest_for_pha:
 2815|  7.21k|{
 2816|  7.21k|    if (s->pha_dgst == NULL) {
  ------------------
  |  Branch (2816:9): [True: 7.21k, False: 0]
  ------------------
 2817|  7.21k|        if (!ssl3_digest_cached_records(s, 1))
  ------------------
  |  Branch (2817:13): [True: 0, False: 7.21k]
  ------------------
 2818|       |            /* SSLfatal() already called */
 2819|      0|            return 0;
 2820|       |
 2821|  7.21k|        s->pha_dgst = EVP_MD_CTX_new();
 2822|  7.21k|        if (s->pha_dgst == NULL) {
  ------------------
  |  Branch (2822:13): [True: 0, False: 7.21k]
  ------------------
 2823|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2824|      0|            return 0;
 2825|      0|        }
 2826|  7.21k|        if (!EVP_MD_CTX_copy_ex(s->pha_dgst,
  ------------------
  |  Branch (2826:13): [True: 0, False: 7.21k]
  ------------------
 2827|  7.21k|                s->s3.handshake_dgst)) {
 2828|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2829|      0|            EVP_MD_CTX_free(s->pha_dgst);
 2830|      0|            s->pha_dgst = NULL;
 2831|      0|            return 0;
 2832|      0|        }
 2833|  7.21k|    }
 2834|  7.21k|    return 1;
 2835|  7.21k|}
statem_lib.c:get_cert_verify_tbs_data:
  261|  7.25k|{
  262|       |    /* ASCII: "TLS 1.3, server CertificateVerify", in hex for EBCDIC compatibility */
  263|  7.25k|    static const char servercontext[] = "\x54\x4c\x53\x20\x31\x2e\x33\x2c\x20\x73\x65\x72"
  264|  7.25k|                                        "\x76\x65\x72\x20\x43\x65\x72\x74\x69\x66\x69\x63\x61\x74\x65\x56\x65\x72\x69\x66\x79";
  265|       |    /* ASCII: "TLS 1.3, client CertificateVerify", in hex for EBCDIC compatibility */
  266|  7.25k|    static const char clientcontext[] = "\x54\x4c\x53\x20\x31\x2e\x33\x2c\x20\x63\x6c\x69"
  267|  7.25k|                                        "\x65\x6e\x74\x20\x43\x65\x72\x74\x69\x66\x69\x63\x61\x74\x65\x56\x65\x72\x69\x66\x79";
  268|       |
  269|  7.25k|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  7.25k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.5k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.25k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.25k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.25k, False: 0]
  |  |  ------------------
  |  |  274|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.5k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.25k, False: 0]
  |  |  ------------------
  |  |  275|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.25k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.25k, False: 0]
  |  |  ------------------
  ------------------
  270|  7.25k|        size_t hashlen;
  271|       |
  272|       |        /* Set the first 64 bytes of to-be-signed data to octet 32 */
  273|  7.25k|        memset(tls13tbs, 32, TLS13_TBS_START_SIZE);
  ------------------
  |  |  256|  7.25k|#define TLS13_TBS_START_SIZE 64
  ------------------
  274|       |        /* This copies the 33 bytes of context plus the 0 separator byte */
  275|  7.25k|        if (s->statem.hand_state == TLS_ST_CR_CERT_VRFY
  ------------------
  |  Branch (275:13): [True: 3.62k, False: 3.62k]
  ------------------
  276|  3.62k|            || s->statem.hand_state == TLS_ST_SW_CERT_VRFY)
  ------------------
  |  Branch (276:16): [True: 3.62k, False: 0]
  ------------------
  277|  7.25k|            strcpy((char *)tls13tbs + TLS13_TBS_START_SIZE, servercontext);
  ------------------
  |  |  256|  7.25k|#define TLS13_TBS_START_SIZE 64
  ------------------
  278|      0|        else
  279|      0|            strcpy((char *)tls13tbs + TLS13_TBS_START_SIZE, clientcontext);
  ------------------
  |  |  256|      0|#define TLS13_TBS_START_SIZE 64
  ------------------
  280|       |
  281|       |        /*
  282|       |         * If we're currently reading then we need to use the saved handshake
  283|       |         * hash value. We can't use the current handshake hash state because
  284|       |         * that includes the CertVerify itself.
  285|       |         */
  286|  7.25k|        if (s->statem.hand_state == TLS_ST_CR_CERT_VRFY
  ------------------
  |  Branch (286:13): [True: 3.62k, False: 3.62k]
  ------------------
  287|  3.62k|            || s->statem.hand_state == TLS_ST_SR_CERT_VRFY) {
  ------------------
  |  Branch (287:16): [True: 0, False: 3.62k]
  ------------------
  288|  3.62k|            memcpy(tls13tbs + TLS13_TBS_PREAMBLE_SIZE, s->cert_verify_hash,
  ------------------
  |  |  257|  3.62k|#define TLS13_TBS_PREAMBLE_SIZE (TLS13_TBS_START_SIZE + 33 + 1)
  |  |  ------------------
  |  |  |  |  256|  3.62k|#define TLS13_TBS_START_SIZE 64
  |  |  ------------------
  ------------------
  289|  3.62k|                s->cert_verify_hash_len);
  290|  3.62k|            hashlen = s->cert_verify_hash_len;
  291|  3.62k|        } else if (!ssl_handshake_hash(s, tls13tbs + TLS13_TBS_PREAMBLE_SIZE,
  ------------------
  |  |  257|  3.62k|#define TLS13_TBS_PREAMBLE_SIZE (TLS13_TBS_START_SIZE + 33 + 1)
  |  |  ------------------
  |  |  |  |  256|  3.62k|#define TLS13_TBS_START_SIZE 64
  |  |  ------------------
  ------------------
  |  Branch (291:20): [True: 0, False: 3.62k]
  ------------------
  292|  3.62k|                       EVP_MAX_MD_SIZE, &hashlen)) {
  ------------------
  |  |   34|  3.62k|#define EVP_MAX_MD_SIZE 64 /* longest known is SHA512 */
  ------------------
  293|       |            /* SSLfatal() already called */
  294|      0|            return 0;
  295|      0|        }
  296|       |
  297|  7.25k|        *hdata = tls13tbs;
  298|  7.25k|        *hdatalen = TLS13_TBS_PREAMBLE_SIZE + hashlen;
  ------------------
  |  |  257|  7.25k|#define TLS13_TBS_PREAMBLE_SIZE (TLS13_TBS_START_SIZE + 33 + 1)
  |  |  ------------------
  |  |  |  |  256|  7.25k|#define TLS13_TBS_START_SIZE 64
  |  |  ------------------
  ------------------
  299|  7.25k|    } else {
  300|      0|        size_t retlen;
  301|      0|        long retlen_l;
  302|       |
  303|      0|        retlen = retlen_l = BIO_get_mem_data(s->s3.handshake_buffer, hdata);
  ------------------
  |  |  625|      0|#define BIO_get_mem_data(b, pp) BIO_ctrl(b, BIO_CTRL_INFO, 0, (char *)(pp))
  |  |  ------------------
  |  |  |  |   92|      0|#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
  |  |  ------------------
  ------------------
  304|      0|        if (retlen_l <= 0) {
  ------------------
  |  Branch (304:13): [True: 0, False: 0]
  ------------------
  305|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  306|      0|            return 0;
  307|      0|        }
  308|      0|        *hdatalen = retlen;
  309|      0|    }
  310|       |
  311|  7.25k|    return 1;
  312|  7.25k|}
statem_lib.c:ssl_add_cert_chain:
 1006|  3.62k|{
 1007|  3.62k|    int i, chain_count;
 1008|  3.62k|    X509 *x;
 1009|  3.62k|    STACK_OF(X509) *extra_certs;
  ------------------
  |  |   33|  3.62k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1010|  3.62k|    STACK_OF(X509) *chain = NULL;
  ------------------
  |  |   33|  3.62k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1011|  3.62k|    X509_STORE *chain_store;
 1012|  3.62k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1013|       |
 1014|  3.62k|    if (cpk == NULL || cpk->x509 == NULL)
  ------------------
  |  Branch (1014:9): [True: 0, False: 3.62k]
  |  Branch (1014:24): [True: 0, False: 3.62k]
  ------------------
 1015|      0|        return 1;
 1016|       |
 1017|  3.62k|    x = cpk->x509;
 1018|       |
 1019|       |    /*
 1020|       |     * If we have a certificate specific chain use it, else use parent ctx.
 1021|       |     */
 1022|  3.62k|    if (cpk->chain != NULL)
  ------------------
  |  Branch (1022:9): [True: 0, False: 3.62k]
  ------------------
 1023|      0|        extra_certs = cpk->chain;
 1024|  3.62k|    else
 1025|  3.62k|        extra_certs = sctx->extra_certs;
 1026|       |
 1027|  3.62k|    if ((s->mode & SSL_MODE_NO_AUTO_CHAIN) || extra_certs)
  ------------------
  |  |  532|  3.62k|#define SSL_MODE_NO_AUTO_CHAIN 0x00000008U
  ------------------
  |  Branch (1027:9): [True: 0, False: 3.62k]
  |  Branch (1027:47): [True: 0, False: 3.62k]
  ------------------
 1028|      0|        chain_store = NULL;
 1029|  3.62k|    else if (s->cert->chain_store)
  ------------------
  |  Branch (1029:14): [True: 0, False: 3.62k]
  ------------------
 1030|      0|        chain_store = s->cert->chain_store;
 1031|  3.62k|    else
 1032|  3.62k|        chain_store = sctx->cert_store;
 1033|       |
 1034|  3.62k|    if (chain_store != NULL) {
  ------------------
  |  Branch (1034:9): [True: 3.62k, False: 0]
  ------------------
 1035|  3.62k|        X509_STORE_CTX *xs_ctx = X509_STORE_CTX_new_ex(sctx->libctx,
 1036|  3.62k|            sctx->propq);
 1037|       |
 1038|  3.62k|        if (xs_ctx == NULL) {
  ------------------
  |  Branch (1038:13): [True: 0, False: 3.62k]
  ------------------
 1039|      0|            if (!for_comp)
  ------------------
  |  Branch (1039:17): [True: 0, False: 0]
  ------------------
 1040|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_X509_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1041|      0|            return 0;
 1042|      0|        }
 1043|  3.62k|        if (!X509_STORE_CTX_init(xs_ctx, chain_store, x, NULL)) {
  ------------------
  |  Branch (1043:13): [True: 0, False: 3.62k]
  ------------------
 1044|      0|            X509_STORE_CTX_free(xs_ctx);
 1045|      0|            if (!for_comp)
  ------------------
  |  Branch (1045:17): [True: 0, False: 0]
  ------------------
 1046|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_X509_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1047|      0|            return 0;
 1048|      0|        }
 1049|       |        /*
 1050|       |         * It is valid for the chain not to be complete (because normally we
 1051|       |         * don't include the root cert in the chain). Therefore we deliberately
 1052|       |         * ignore the error return from this call. We're not actually verifying
 1053|       |         * the cert - we're just building as much of the chain as we can
 1054|       |         */
 1055|  3.62k|        (void)X509_verify_cert(xs_ctx);
 1056|       |        /* Don't leave errors in the queue */
 1057|  3.62k|        ERR_clear_error();
 1058|  3.62k|        chain = X509_STORE_CTX_get0_chain(xs_ctx);
 1059|  3.62k|        i = ssl_security_cert_chain(s, chain, NULL);
 1060|  3.62k|        if (i != 1) {
  ------------------
  |  Branch (1060:13): [True: 0, False: 3.62k]
  ------------------
 1061|       |#if 0
 1062|       |            /* Dummy error calls so mkerr generates them */
 1063|       |            ERR_raise(ERR_LIB_SSL, SSL_R_EE_KEY_TOO_SMALL);
 1064|       |            ERR_raise(ERR_LIB_SSL, SSL_R_CA_KEY_TOO_SMALL);
 1065|       |            ERR_raise(ERR_LIB_SSL, SSL_R_CA_MD_TOO_WEAK);
 1066|       |#endif
 1067|      0|            X509_STORE_CTX_free(xs_ctx);
 1068|      0|            if (!for_comp)
  ------------------
  |  Branch (1068:17): [True: 0, False: 0]
  ------------------
 1069|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, i);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1070|      0|            return 0;
 1071|      0|        }
 1072|  3.62k|        chain_count = sk_X509_num(chain);
  ------------------
  |  |   82|  3.62k|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
 1073|  7.25k|        for (i = 0; i < chain_count; i++) {
  ------------------
  |  Branch (1073:21): [True: 3.62k, False: 3.62k]
  ------------------
 1074|  3.62k|            x = sk_X509_value(chain, i);
  ------------------
  |  |   83|  3.62k|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
 1075|       |
 1076|  3.62k|            if (!ssl_add_cert_to_wpacket(s, pkt, x, i, for_comp)) {
  ------------------
  |  Branch (1076:17): [True: 0, False: 3.62k]
  ------------------
 1077|       |                /* SSLfatal() already called */
 1078|      0|                X509_STORE_CTX_free(xs_ctx);
 1079|      0|                return 0;
 1080|      0|            }
 1081|  3.62k|        }
 1082|  3.62k|        X509_STORE_CTX_free(xs_ctx);
 1083|  3.62k|    } else {
 1084|      0|        i = ssl_security_cert_chain(s, extra_certs, x);
 1085|      0|        if (i != 1) {
  ------------------
  |  Branch (1085:13): [True: 0, False: 0]
  ------------------
 1086|      0|            if (!for_comp)
  ------------------
  |  Branch (1086:17): [True: 0, False: 0]
  ------------------
 1087|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, i);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1088|      0|            return 0;
 1089|      0|        }
 1090|      0|        if (!ssl_add_cert_to_wpacket(s, pkt, x, 0, for_comp)) {
  ------------------
  |  Branch (1090:13): [True: 0, False: 0]
  ------------------
 1091|       |            /* SSLfatal() already called */
 1092|      0|            return 0;
 1093|      0|        }
 1094|      0|        for (i = 0; i < sk_X509_num(extra_certs); i++) {
  ------------------
  |  |   82|      0|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
  |  Branch (1094:21): [True: 0, False: 0]
  ------------------
 1095|      0|            x = sk_X509_value(extra_certs, i);
  ------------------
  |  |   83|      0|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
 1096|      0|            if (!ssl_add_cert_to_wpacket(s, pkt, x, i + 1, for_comp)) {
  ------------------
  |  Branch (1096:17): [True: 0, False: 0]
  ------------------
 1097|       |                /* SSLfatal() already called */
 1098|      0|                return 0;
 1099|      0|            }
 1100|      0|        }
 1101|      0|    }
 1102|  3.62k|    return 1;
 1103|  3.62k|}
statem_lib.c:ssl_add_cert_to_wpacket:
  974|  3.62k|{
  975|  3.62k|    int len;
  976|  3.62k|    unsigned char *outbytes;
  977|  3.62k|    int context = SSL_EXT_TLS1_3_CERTIFICATE;
  ------------------
  |  |  306|  3.62k|#define SSL_EXT_TLS1_3_CERTIFICATE 0x01000
  ------------------
  978|       |
  979|  3.62k|    if (for_comp)
  ------------------
  |  Branch (979:9): [True: 0, False: 3.62k]
  ------------------
  980|      0|        context |= SSL_EXT_TLS1_3_CERTIFICATE_COMPRESSION;
  ------------------
  |  |  309|      0|#define SSL_EXT_TLS1_3_CERTIFICATE_COMPRESSION 0x08000
  ------------------
  981|       |
  982|  3.62k|    len = i2d_X509(x, NULL);
  983|  3.62k|    if (len < 0) {
  ------------------
  |  Branch (983:9): [True: 0, False: 3.62k]
  ------------------
  984|      0|        if (!for_comp)
  ------------------
  |  Branch (984:13): [True: 0, False: 0]
  ------------------
  985|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_BUF_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  986|      0|        return 0;
  987|      0|    }
  988|  3.62k|    if (!WPACKET_sub_allocate_bytes_u24(pkt, len, &outbytes)
  ------------------
  |  |  853|  7.25k|    WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 3)
  ------------------
  |  Branch (988:9): [True: 0, False: 3.62k]
  ------------------
  989|  3.62k|        || i2d_X509(x, &outbytes) != len) {
  ------------------
  |  Branch (989:12): [True: 0, False: 3.62k]
  ------------------
  990|      0|        if (!for_comp)
  ------------------
  |  Branch (990:13): [True: 0, False: 0]
  ------------------
  991|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  992|      0|        return 0;
  993|      0|    }
  994|       |
  995|  3.62k|    if ((SSL_CONNECTION_IS_TLS13(s) || for_comp)
  ------------------
  |  |  273|  7.25k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (995:40): [True: 0, False: 0]
  ------------------
  996|  3.62k|        && !tls_construct_extensions(s, pkt, context, x, chain)) {
  ------------------
  |  Branch (996:12): [True: 0, False: 3.62k]
  ------------------
  997|       |        /* SSLfatal() already called */
  998|      0|        return 0;
  999|      0|    }
 1000|       |
 1001|  3.62k|    return 1;
 1002|  3.62k|}
statem_lib.c:grow_init_buf:
 1634|  32.5k|{
 1635|       |
 1636|  32.5k|    size_t msg_offset = (char *)s->init_msg - s->init_buf->data;
 1637|       |
 1638|  32.5k|    if (!BUF_MEM_grow_clean(s->init_buf, size))
  ------------------
  |  Branch (1638:9): [True: 0, False: 32.5k]
  ------------------
 1639|      0|        return 0;
 1640|       |
 1641|  32.5k|    if (size < msg_offset)
  ------------------
  |  Branch (1641:9): [True: 0, False: 32.5k]
  ------------------
 1642|      0|        return 0;
 1643|       |
 1644|  32.5k|    s->init_msg = s->init_buf->data + msg_offset;
 1645|       |
 1646|  32.5k|    return 1;
 1647|  32.5k|}
statem_lib.c:ssl_method_error:
 1880|   192k|{
 1881|   192k|    int version = method->version;
 1882|       |
 1883|   192k|    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)
  ------------------
  |  | 2768|  97.9k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2729|  97.9k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (1883:10): [True: 192k, False: 0]
  |  Branch (1883:39): [True: 94.3k, False: 97.9k]
  |  Branch (1883:97): [True: 0, False: 97.9k]
  ------------------
 1884|  94.3k|        return SSL_R_VERSION_TOO_LOW;
  ------------------
  |  |  368|  94.3k|#define SSL_R_VERSION_TOO_LOW 396
  ------------------
 1885|       |
 1886|  97.9k|    if (s->max_proto_version != 0 && ssl_version_cmp(s, version, s->max_proto_version) > 0)
  ------------------
  |  Branch (1886:9): [True: 0, False: 97.9k]
  |  Branch (1886:38): [True: 0, False: 0]
  ------------------
 1887|      0|        return SSL_R_VERSION_TOO_HIGH;
  ------------------
  |  |  367|      0|#define SSL_R_VERSION_TOO_HIGH 166
  ------------------
 1888|       |
 1889|  97.9k|    if ((s->options & method->mask) != 0)
  ------------------
  |  Branch (1889:9): [True: 0, False: 97.9k]
  ------------------
 1890|      0|        return SSL_R_UNSUPPORTED_PROTOCOL;
  ------------------
  |  |  362|      0|#define SSL_R_UNSUPPORTED_PROTOCOL 258
  ------------------
 1891|  97.9k|    if ((method->flags & SSL_METHOD_NO_SUITEB) != 0 && tls1_suiteb(s))
  ------------------
  |  | 2265|  97.9k|#define SSL_METHOD_NO_SUITEB (1U << 1)
  ------------------
                  if ((method->flags & SSL_METHOD_NO_SUITEB) != 0 && tls1_suiteb(s))
  ------------------
  |  | 2035|      0|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  584|      0|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  |  |  |  Branch (2035:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1891:9): [True: 0, False: 97.9k]
  ------------------
 1892|      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
  ------------------
 1893|       |
 1894|  97.9k|    return 0;
 1895|  97.9k|}
statem_lib.c:is_tls13_capable:
 1903|  3.62k|{
 1904|  3.62k|    size_t i;
 1905|  3.62k|    int curve;
 1906|  3.62k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1907|       |
 1908|  3.62k|    if (!ossl_assert(sctx != NULL) || !ossl_assert(s->session_ctx != NULL))
  ------------------
  |  |   52|  7.25k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  7.25k|    __FILE__, __LINE__)
  ------------------
                  if (!ossl_assert(sctx != NULL) || !ossl_assert(s->session_ctx != NULL))
  ------------------
  |  |   52|  3.62k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  3.62k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1908:9): [True: 0, False: 3.62k]
  |  Branch (1908:39): [True: 0, False: 3.62k]
  ------------------
 1909|      0|        return 0;
 1910|       |
 1911|       |    /*
 1912|       |     * A servername callback can change the available certs, so if a servername
 1913|       |     * cb is set then we just assume TLSv1.3 will be ok
 1914|       |     */
 1915|  3.62k|    if (sctx->ext.servername_cb != NULL
  ------------------
  |  Branch (1915:9): [True: 0, False: 3.62k]
  ------------------
 1916|  3.62k|        || s->session_ctx->ext.servername_cb != NULL)
  ------------------
  |  Branch (1916:12): [True: 0, False: 3.62k]
  ------------------
 1917|      0|        return 1;
 1918|       |
 1919|  3.62k|#ifndef OPENSSL_NO_PSK
 1920|  3.62k|    if (s->psk_server_callback != NULL)
  ------------------
  |  Branch (1920:9): [True: 0, False: 3.62k]
  ------------------
 1921|      0|        return 1;
 1922|  3.62k|#endif
 1923|       |
 1924|  3.62k|    if (s->psk_find_session_cb != NULL || s->cert->cert_cb != NULL)
  ------------------
  |  Branch (1924:9): [True: 0, False: 3.62k]
  |  Branch (1924:43): [True: 0, False: 3.62k]
  ------------------
 1925|      0|        return 1;
 1926|       |
 1927|       |    /* All provider-based sig algs are required to support at least TLS1.3 */
 1928|  14.5k|    for (i = 0; i < s->ssl_pkey_num; i++) {
  ------------------
  |  Branch (1928:17): [True: 14.5k, False: 0]
  ------------------
 1929|       |        /* Skip over certs disallowed for TLSv1.3 */
 1930|  14.5k|        switch (i) {
 1931|  3.62k|        case SSL_PKEY_DSA_SIGN:
  ------------------
  |  |  329|  3.62k|#define SSL_PKEY_DSA_SIGN 2
  ------------------
  |  Branch (1931:9): [True: 3.62k, False: 10.8k]
  ------------------
 1932|  3.62k|        case SSL_PKEY_GOST01:
  ------------------
  |  |  331|  3.62k|#define SSL_PKEY_GOST01 4
  ------------------
  |  Branch (1932:9): [True: 0, False: 14.5k]
  ------------------
 1933|  3.62k|        case SSL_PKEY_GOST12_256:
  ------------------
  |  |  332|  3.62k|#define SSL_PKEY_GOST12_256 5
  ------------------
  |  Branch (1933:9): [True: 0, False: 14.5k]
  ------------------
 1934|  3.62k|        case SSL_PKEY_GOST12_512:
  ------------------
  |  |  333|  3.62k|#define SSL_PKEY_GOST12_512 6
  ------------------
  |  Branch (1934:9): [True: 0, False: 14.5k]
  ------------------
 1935|  3.62k|            continue;
 1936|  10.8k|        default:
  ------------------
  |  Branch (1936:9): [True: 10.8k, False: 3.62k]
  ------------------
 1937|  10.8k|            break;
 1938|  14.5k|        }
 1939|  10.8k|        if (!ssl_has_cert(s, (int)i))
  ------------------
  |  Branch (1939:13): [True: 7.25k, False: 3.62k]
  ------------------
 1940|  7.25k|            continue;
 1941|  3.62k|        if (i != SSL_PKEY_ECC)
  ------------------
  |  |  330|  3.62k|#define SSL_PKEY_ECC 3
  ------------------
  |  Branch (1941:13): [True: 0, False: 3.62k]
  ------------------
 1942|      0|            return 1;
 1943|       |        /*
 1944|       |         * Prior to TLSv1.3 sig algs allowed any curve to be used. TLSv1.3 is
 1945|       |         * more restrictive so check that our sig algs are consistent with this
 1946|       |         * EC cert. See section 4.2.3 of RFC8446.
 1947|       |         */
 1948|  3.62k|        curve = ssl_get_EC_curve_nid(s->cert->pkeys[SSL_PKEY_ECC].privatekey);
  ------------------
  |  |  330|  3.62k|#define SSL_PKEY_ECC 3
  ------------------
 1949|  3.62k|        if (tls_check_sigalg_curve(s, curve))
  ------------------
  |  Branch (1949:13): [True: 3.62k, False: 0]
  ------------------
 1950|  3.62k|            return 1;
 1951|  3.62k|    }
 1952|       |
 1953|      0|    return 0;
 1954|  3.62k|}
statem_lib.c:check_for_downgrade:
 2110|  3.62k|{
 2111|  3.62k|    if (vers == TLS1_2_VERSION
  ------------------
  |  |   26|  7.25k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (2111:9): [True: 0, False: 3.62k]
  ------------------
 2112|      0|        && ssl_version_supported(s, TLS1_3_VERSION, NULL)) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (2112:12): [True: 0, False: 0]
  ------------------
 2113|      0|        *dgrd = DOWNGRADE_TO_1_2;
 2114|  3.62k|    } else if (!SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (2114:16): [True: 3.62k, False: 0]
  ------------------
 2115|  3.62k|        && vers < TLS1_2_VERSION
  ------------------
  |  |   26|  7.25k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (2115:12): [True: 0, False: 3.62k]
  ------------------
 2116|       |        /*
 2117|       |         * We need to ensure that a server that disables TLSv1.2
 2118|       |         * (creating a hole between TLSv1.3 and TLSv1.1) can still
 2119|       |         * complete handshakes with clients that support TLSv1.2 and
 2120|       |         * below. Therefore we do not enable the sentinel if TLSv1.3 is
 2121|       |         * enabled and TLSv1.2 is not.
 2122|       |         */
 2123|      0|        && ssl_version_supported(s, TLS1_2_VERSION, NULL)) {
  ------------------
  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (2123:12): [True: 0, False: 0]
  ------------------
 2124|      0|        *dgrd = DOWNGRADE_TO_1_1;
 2125|  3.62k|    } else {
 2126|  3.62k|        *dgrd = DOWNGRADE_NONE;
 2127|  3.62k|    }
 2128|  3.62k|}

ossl_statem_server_read_transition:
  191|  7.21k|{
  192|  7.21k|    OSSL_STATEM *st = &s->statem;
  193|       |
  194|  7.21k|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  7.21k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.4k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.21k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.21k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.21k, False: 0]
  |  |  ------------------
  |  |  274|  7.21k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.21k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.4k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.21k, False: 0]
  |  |  ------------------
  |  |  275|  7.21k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.21k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.21k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.58k, False: 3.62k]
  |  |  ------------------
  ------------------
  195|  3.58k|        if (!ossl_statem_server13_read_transition(s, mt))
  ------------------
  |  Branch (195:13): [True: 0, False: 3.58k]
  ------------------
  196|      0|            goto err;
  197|  3.58k|        return 1;
  198|  3.58k|    }
  199|       |
  200|  3.62k|    switch (st->hand_state) {
  201|      0|    default:
  ------------------
  |  Branch (201:5): [True: 0, False: 3.62k]
  ------------------
  202|      0|        break;
  203|       |
  204|  3.62k|    case TLS_ST_BEFORE:
  ------------------
  |  Branch (204:5): [True: 3.62k, False: 0]
  ------------------
  205|  3.62k|    case TLS_ST_OK:
  ------------------
  |  Branch (205:5): [True: 0, False: 3.62k]
  ------------------
  206|  3.62k|    case DTLS_ST_SW_HELLO_VERIFY_REQUEST:
  ------------------
  |  Branch (206:5): [True: 0, False: 3.62k]
  ------------------
  207|  3.62k|        if (mt == SSL3_MT_CLIENT_HELLO) {
  ------------------
  |  |  313|  3.62k|#define SSL3_MT_CLIENT_HELLO 1
  ------------------
  |  Branch (207:13): [True: 3.62k, False: 0]
  ------------------
  208|  3.62k|            st->hand_state = TLS_ST_SR_CLNT_HELLO;
  209|  3.62k|            return 1;
  210|  3.62k|        }
  211|      0|        break;
  212|       |
  213|      0|    case TLS_ST_SW_SRVR_DONE:
  ------------------
  |  Branch (213:5): [True: 0, False: 3.62k]
  ------------------
  214|       |        /*
  215|       |         * If we get a CKE message after a ServerDone then either
  216|       |         * 1) We didn't request a Certificate
  217|       |         * OR
  218|       |         * 2) We did request one and we allow no Certificate to be returned
  219|       |         */
  220|      0|        if (mt == SSL3_MT_CLIENT_KEY_EXCHANGE) {
  ------------------
  |  |  323|      0|#define SSL3_MT_CLIENT_KEY_EXCHANGE 16
  ------------------
  |  Branch (220:13): [True: 0, False: 0]
  ------------------
  221|      0|            if (!s->s3.tmp.cert_request) {
  ------------------
  |  Branch (221:17): [True: 0, False: 0]
  ------------------
  222|      0|                st->hand_state = TLS_ST_SR_KEY_EXCH;
  223|      0|                return 1;
  224|      0|            }
  225|      0|        } else if (s->s3.tmp.cert_request) {
  ------------------
  |  Branch (225:20): [True: 0, False: 0]
  ------------------
  226|      0|            if (mt == SSL3_MT_CERTIFICATE) {
  ------------------
  |  |  318|      0|#define SSL3_MT_CERTIFICATE 11
  ------------------
  |  Branch (226:17): [True: 0, False: 0]
  ------------------
  227|      0|                st->hand_state = TLS_ST_SR_CERT;
  228|      0|                return 1;
  229|      0|            }
  230|      0|        }
  231|      0|        break;
  232|       |
  233|      0|    case TLS_ST_SR_CERT:
  ------------------
  |  Branch (233:5): [True: 0, False: 3.62k]
  ------------------
  234|      0|        if (mt == SSL3_MT_CLIENT_KEY_EXCHANGE) {
  ------------------
  |  |  323|      0|#define SSL3_MT_CLIENT_KEY_EXCHANGE 16
  ------------------
  |  Branch (234:13): [True: 0, False: 0]
  ------------------
  235|      0|            st->hand_state = TLS_ST_SR_KEY_EXCH;
  236|      0|            return 1;
  237|      0|        }
  238|      0|        break;
  239|       |
  240|      0|    case TLS_ST_SR_KEY_EXCH:
  ------------------
  |  Branch (240:5): [True: 0, False: 3.62k]
  ------------------
  241|       |        /*
  242|       |         * We should only process a CertificateVerify message if we have
  243|       |         * received a Certificate from the client. If so then |s->session->peer|
  244|       |         * will be non NULL. In some instances a CertificateVerify message is
  245|       |         * not required even if the peer has sent a Certificate (e.g. such as in
  246|       |         * the case of static DH). In that case |st->no_cert_verify| should be
  247|       |         * set.
  248|       |         */
  249|      0|        if (!received_client_cert(s) || st->no_cert_verify) {
  ------------------
  |  Branch (249:13): [True: 0, False: 0]
  |  Branch (249:41): [True: 0, False: 0]
  ------------------
  250|      0|            if (mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (250:17): [True: 0, False: 0]
  ------------------
  251|       |                /*
  252|       |                 * For the ECDH ciphersuites when the client sends its ECDH
  253|       |                 * pub key in a certificate, the CertificateVerify message is
  254|       |                 * not sent. Also for GOST ciphersuites when the client uses
  255|       |                 * its key from the certificate for key exchange.
  256|       |                 */
  257|      0|                st->hand_state = TLS_ST_SR_CHANGE;
  258|      0|                return 1;
  259|      0|            }
  260|      0|        } else {
  261|      0|            if (mt == SSL3_MT_CERTIFICATE_VERIFY) {
  ------------------
  |  |  322|      0|#define SSL3_MT_CERTIFICATE_VERIFY 15
  ------------------
  |  Branch (261:17): [True: 0, False: 0]
  ------------------
  262|      0|                st->hand_state = TLS_ST_SR_CERT_VRFY;
  263|      0|                return 1;
  264|      0|            }
  265|      0|        }
  266|      0|        break;
  267|       |
  268|      0|    case TLS_ST_SR_CERT_VRFY:
  ------------------
  |  Branch (268:5): [True: 0, False: 3.62k]
  ------------------
  269|      0|        if (mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (269:13): [True: 0, False: 0]
  ------------------
  270|      0|            st->hand_state = TLS_ST_SR_CHANGE;
  271|      0|            return 1;
  272|      0|        }
  273|      0|        break;
  274|       |
  275|      0|    case TLS_ST_SR_CHANGE:
  ------------------
  |  Branch (275:5): [True: 0, False: 3.62k]
  ------------------
  276|      0|#ifndef OPENSSL_NO_NEXTPROTONEG
  277|      0|        if (s->s3.npn_seen) {
  ------------------
  |  Branch (277:13): [True: 0, False: 0]
  ------------------
  278|      0|            if (mt == SSL3_MT_NEXT_PROTO) {
  ------------------
  |  |  331|      0|#define SSL3_MT_NEXT_PROTO 67
  ------------------
  |  Branch (278:17): [True: 0, False: 0]
  ------------------
  279|      0|                st->hand_state = TLS_ST_SR_NEXT_PROTO;
  280|      0|                return 1;
  281|      0|            }
  282|      0|        } else {
  283|      0|#endif
  284|      0|            if (mt == SSL3_MT_FINISHED) {
  ------------------
  |  |  324|      0|#define SSL3_MT_FINISHED 20
  ------------------
  |  Branch (284:17): [True: 0, False: 0]
  ------------------
  285|      0|                st->hand_state = TLS_ST_SR_FINISHED;
  286|      0|                return 1;
  287|      0|            }
  288|      0|#ifndef OPENSSL_NO_NEXTPROTONEG
  289|      0|        }
  290|      0|#endif
  291|      0|        break;
  292|       |
  293|      0|#ifndef OPENSSL_NO_NEXTPROTONEG
  294|      0|    case TLS_ST_SR_NEXT_PROTO:
  ------------------
  |  Branch (294:5): [True: 0, False: 3.62k]
  ------------------
  295|      0|        if (mt == SSL3_MT_FINISHED) {
  ------------------
  |  |  324|      0|#define SSL3_MT_FINISHED 20
  ------------------
  |  Branch (295:13): [True: 0, False: 0]
  ------------------
  296|      0|            st->hand_state = TLS_ST_SR_FINISHED;
  297|      0|            return 1;
  298|      0|        }
  299|      0|        break;
  300|      0|#endif
  301|       |
  302|      0|    case TLS_ST_SW_FINISHED:
  ------------------
  |  Branch (302:5): [True: 0, False: 3.62k]
  ------------------
  303|      0|        if (mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (303:13): [True: 0, False: 0]
  ------------------
  304|      0|            st->hand_state = TLS_ST_SR_CHANGE;
  305|      0|            return 1;
  306|      0|        }
  307|      0|        break;
  308|  3.62k|    }
  309|       |
  310|      0|err:
  311|       |    /* No valid transition found */
  312|      0|    if (SSL_CONNECTION_IS_DTLS(s) && mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  266|      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)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                  if (SSL_CONNECTION_IS_DTLS(s) && mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (312:38): [True: 0, False: 0]
  ------------------
  313|      0|        BIO *rbio;
  314|       |
  315|       |        /*
  316|       |         * CCS messages don't have a message sequence number so this is probably
  317|       |         * because of an out-of-order CCS. We'll just drop it.
  318|       |         */
  319|      0|        s->init_num = 0;
  320|      0|        s->rwstate = SSL_READING;
  ------------------
  |  |  957|      0|#define SSL_READING 3
  ------------------
  321|      0|        rbio = SSL_get_rbio(SSL_CONNECTION_GET_SSL(s));
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  322|      0|        BIO_clear_retry_flags(rbio);
  ------------------
  |  |  272|      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
  |  |  ------------------
  ------------------
  323|      0|        BIO_set_retry_read(rbio);
  ------------------
  |  |  266|      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
  |  |  ------------------
  ------------------
  324|      0|        return 0;
  325|      0|    }
  326|      0|    SSLfatal(s, SSL3_AD_UNEXPECTED_MESSAGE, SSL_R_UNEXPECTED_MESSAGE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  327|      0|    return 0;
  328|      0|}
send_certificate_request:
  401|  7.25k|{
  402|  7.25k|    if (
  403|       |        /* don't request cert unless asked for it: */
  404|  7.25k|        s->verify_mode & SSL_VERIFY_PEER
  ------------------
  |  | 1201|  14.5k|#define SSL_VERIFY_PEER 0x01
  ------------------
  |  Branch (404:9): [True: 0, False: 7.25k]
  ------------------
  405|       |        /*
  406|       |         * don't request if post-handshake-only unless doing
  407|       |         * post-handshake in TLSv1.3:
  408|       |         */
  409|      0|        && (!SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      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 (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      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 (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  410|      0|            || !(s->verify_mode & SSL_VERIFY_POST_HANDSHAKE)
  ------------------
  |  | 1204|      0|#define SSL_VERIFY_POST_HANDSHAKE 0x08
  ------------------
  |  Branch (410:16): [True: 0, False: 0]
  ------------------
  411|      0|            || s->post_handshake_auth == SSL_PHA_REQUEST_PENDING)
  ------------------
  |  Branch (411:16): [True: 0, False: 0]
  ------------------
  412|       |        /*
  413|       |         * if SSL_VERIFY_CLIENT_ONCE is set, don't request cert
  414|       |         * a second time:
  415|       |         */
  416|      0|        && (s->certreqs_sent < 1 || !(s->verify_mode & SSL_VERIFY_CLIENT_ONCE))
  ------------------
  |  | 1203|      0|#define SSL_VERIFY_CLIENT_ONCE 0x04
  ------------------
  |  Branch (416:13): [True: 0, False: 0]
  |  Branch (416:37): [True: 0, False: 0]
  ------------------
  417|       |        /*
  418|       |         * never request cert in anonymous ciphersuites (see
  419|       |         * section "Certificate request" in SSL 3 drafts and in
  420|       |         * RFC 2246):
  421|       |         */
  422|      0|        && (!(s->s3.tmp.new_cipher->algorithm_auth & SSL_aNULL)
  ------------------
  |  |  116|      0|#define SSL_aNULL 0x00000004U
  ------------------
  |  Branch (422:13): [True: 0, False: 0]
  ------------------
  423|       |            /*
  424|       |             * ... except when the application insists on
  425|       |             * verification (against the specs, but statem_clnt.c accepts
  426|       |             * this for SSL 3)
  427|       |             */
  428|      0|            || (s->verify_mode & SSL_VERIFY_FAIL_IF_NO_PEER_CERT))
  ------------------
  |  | 1202|      0|#define SSL_VERIFY_FAIL_IF_NO_PEER_CERT 0x02
  ------------------
  |  Branch (428:16): [True: 0, False: 0]
  ------------------
  429|       |        /* don't request certificate for SRP auth */
  430|      0|        && !(s->s3.tmp.new_cipher->algorithm_auth & SSL_aSRP)
  ------------------
  |  |  124|      0|#define SSL_aSRP 0x00000040U
  ------------------
  |  Branch (430:12): [True: 0, False: 0]
  ------------------
  431|       |        /*
  432|       |         * With normal PSK Certificates and Certificate Requests
  433|       |         * are omitted
  434|       |         */
  435|      0|        && !(s->s3.tmp.new_cipher->algorithm_auth & SSL_aPSK)) {
  ------------------
  |  |  120|      0|#define SSL_aPSK 0x00000010U
  ------------------
  |  Branch (435:12): [True: 0, False: 0]
  ------------------
  436|      0|        return 1;
  437|      0|    }
  438|       |
  439|  7.25k|    return 0;
  440|  7.25k|}
ossl_statem_server_write_transition:
  736|  43.4k|{
  737|  43.4k|    OSSL_STATEM *st = &s->statem;
  738|       |
  739|       |    /*
  740|       |     * Note that before the ClientHello we don't know what version we are going
  741|       |     * to negotiate yet, so we don't take this branch until later
  742|       |     */
  743|       |
  744|  43.4k|    if (SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  273|  43.4k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  86.8k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  43.4k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  43.4k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 43.4k, False: 0]
  |  |  ------------------
  |  |  274|  43.4k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  43.4k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  86.8k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 43.4k, False: 0]
  |  |  ------------------
  |  |  275|  43.4k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  43.4k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  43.4k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 39.7k, False: 3.62k]
  |  |  ------------------
  ------------------
  745|  39.7k|        return ossl_statem_server13_write_transition(s);
  746|       |
  747|  3.62k|    switch (st->hand_state) {
  748|      0|    default:
  ------------------
  |  Branch (748:5): [True: 0, False: 3.62k]
  ------------------
  749|       |        /* Shouldn't happen */
  750|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  751|      0|        return WRITE_TRAN_ERROR;
  752|       |
  753|      0|    case TLS_ST_OK:
  ------------------
  |  Branch (753:5): [True: 0, False: 3.62k]
  ------------------
  754|      0|        if (st->request_state == TLS_ST_SW_HELLO_REQ) {
  ------------------
  |  Branch (754:13): [True: 0, False: 0]
  ------------------
  755|       |            /* We must be trying to renegotiate */
  756|      0|            st->hand_state = TLS_ST_SW_HELLO_REQ;
  757|      0|            st->request_state = TLS_ST_BEFORE;
  758|      0|            return WRITE_TRAN_CONTINUE;
  759|      0|        }
  760|       |        /* Must be an incoming ClientHello */
  761|      0|        if (!tls_setup_handshake(s)) {
  ------------------
  |  Branch (761:13): [True: 0, False: 0]
  ------------------
  762|       |            /* SSLfatal() already called */
  763|      0|            return WRITE_TRAN_ERROR;
  764|      0|        }
  765|       |        /* Fall through */
  766|       |
  767|  3.62k|    case TLS_ST_BEFORE:
  ------------------
  |  Branch (767:5): [True: 3.62k, False: 0]
  ------------------
  768|       |        /* Just go straight to trying to read from the client */
  769|  3.62k|        return WRITE_TRAN_FINISHED;
  770|       |
  771|      0|    case TLS_ST_SW_HELLO_REQ:
  ------------------
  |  Branch (771:5): [True: 0, False: 3.62k]
  ------------------
  772|      0|        st->hand_state = TLS_ST_OK;
  773|      0|        return WRITE_TRAN_CONTINUE;
  774|       |
  775|      0|    case TLS_ST_SR_CLNT_HELLO:
  ------------------
  |  Branch (775:5): [True: 0, False: 3.62k]
  ------------------
  776|      0|        if (SSL_CONNECTION_IS_DTLS(s) && !s->d1->cookie_verified
  ------------------
  |  |  266|      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)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (776:42): [True: 0, False: 0]
  ------------------
  777|      0|            && (SSL_get_options(SSL_CONNECTION_GET_SSL(s)) & SSL_OP_COOKIE_EXCHANGE)) {
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
                          && (SSL_get_options(SSL_CONNECTION_GET_SSL(s)) & SSL_OP_COOKIE_EXCHANGE)) {
  ------------------
  |  |  382|      0|#define SSL_OP_COOKIE_EXCHANGE SSL_OP_BIT(13)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (777:16): [True: 0, False: 0]
  ------------------
  778|      0|            st->hand_state = DTLS_ST_SW_HELLO_VERIFY_REQUEST;
  779|      0|        } else if (s->renegotiate == 0 && !SSL_IS_FIRST_HANDSHAKE(s)) {
  ------------------
  |  |  285|      0|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 0, False: 0]
  |  |  ------------------
  |  |  286|      0|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (779:20): [True: 0, False: 0]
  ------------------
  780|       |            /* We must have rejected the renegotiation */
  781|      0|            st->hand_state = TLS_ST_OK;
  782|      0|            return WRITE_TRAN_CONTINUE;
  783|      0|        } else {
  784|      0|            st->hand_state = TLS_ST_SW_SRVR_HELLO;
  785|      0|        }
  786|      0|        return WRITE_TRAN_CONTINUE;
  787|       |
  788|      0|    case DTLS_ST_SW_HELLO_VERIFY_REQUEST:
  ------------------
  |  Branch (788:5): [True: 0, False: 3.62k]
  ------------------
  789|      0|        return WRITE_TRAN_FINISHED;
  790|       |
  791|      0|    case TLS_ST_SW_SRVR_HELLO:
  ------------------
  |  Branch (791:5): [True: 0, False: 3.62k]
  ------------------
  792|      0|        if (s->hit) {
  ------------------
  |  Branch (792:13): [True: 0, False: 0]
  ------------------
  793|      0|            if (s->ext.ticket_expected)
  ------------------
  |  Branch (793:17): [True: 0, False: 0]
  ------------------
  794|      0|                st->hand_state = TLS_ST_SW_SESSION_TICKET;
  795|      0|            else
  796|      0|                st->hand_state = TLS_ST_SW_CHANGE;
  797|      0|        } else {
  798|       |            /* Check if it is anon DH or anon ECDH, */
  799|       |            /* normal PSK or SRP */
  800|      0|            if (!(s->s3.tmp.new_cipher->algorithm_auth & (SSL_aNULL | SSL_aSRP | SSL_aPSK))) {
  ------------------
  |  |  116|      0|#define SSL_aNULL 0x00000004U
  ------------------
                          if (!(s->s3.tmp.new_cipher->algorithm_auth & (SSL_aNULL | SSL_aSRP | SSL_aPSK))) {
  ------------------
  |  |  124|      0|#define SSL_aSRP 0x00000040U
  ------------------
                          if (!(s->s3.tmp.new_cipher->algorithm_auth & (SSL_aNULL | SSL_aSRP | SSL_aPSK))) {
  ------------------
  |  |  120|      0|#define SSL_aPSK 0x00000010U
  ------------------
  |  Branch (800:17): [True: 0, False: 0]
  ------------------
  801|      0|                st->hand_state = TLS_ST_SW_CERT;
  802|      0|            } else if (send_server_key_exchange(s)) {
  ------------------
  |  Branch (802:24): [True: 0, False: 0]
  ------------------
  803|      0|                st->hand_state = TLS_ST_SW_KEY_EXCH;
  804|      0|            } else if (send_certificate_request(s)) {
  ------------------
  |  Branch (804:24): [True: 0, False: 0]
  ------------------
  805|      0|                st->hand_state = TLS_ST_SW_CERT_REQ;
  806|      0|            } else {
  807|      0|                st->hand_state = TLS_ST_SW_SRVR_DONE;
  808|      0|            }
  809|      0|        }
  810|      0|        return WRITE_TRAN_CONTINUE;
  811|       |
  812|      0|    case TLS_ST_SW_CERT:
  ------------------
  |  Branch (812:5): [True: 0, False: 3.62k]
  ------------------
  813|      0|        if (s->ext.status_expected) {
  ------------------
  |  Branch (813:13): [True: 0, False: 0]
  ------------------
  814|      0|            st->hand_state = TLS_ST_SW_CERT_STATUS;
  815|      0|            return WRITE_TRAN_CONTINUE;
  816|      0|        }
  817|       |        /* Fall through */
  818|       |
  819|      0|    case TLS_ST_SW_CERT_STATUS:
  ------------------
  |  Branch (819:5): [True: 0, False: 3.62k]
  ------------------
  820|      0|        if (send_server_key_exchange(s)) {
  ------------------
  |  Branch (820:13): [True: 0, False: 0]
  ------------------
  821|      0|            st->hand_state = TLS_ST_SW_KEY_EXCH;
  822|      0|            return WRITE_TRAN_CONTINUE;
  823|      0|        }
  824|       |        /* Fall through */
  825|       |
  826|      0|    case TLS_ST_SW_KEY_EXCH:
  ------------------
  |  Branch (826:5): [True: 0, False: 3.62k]
  ------------------
  827|      0|        if (send_certificate_request(s)) {
  ------------------
  |  Branch (827:13): [True: 0, False: 0]
  ------------------
  828|      0|            st->hand_state = TLS_ST_SW_CERT_REQ;
  829|      0|            return WRITE_TRAN_CONTINUE;
  830|      0|        }
  831|       |        /* Fall through */
  832|       |
  833|      0|    case TLS_ST_SW_CERT_REQ:
  ------------------
  |  Branch (833:5): [True: 0, False: 3.62k]
  ------------------
  834|      0|        st->hand_state = TLS_ST_SW_SRVR_DONE;
  835|      0|        return WRITE_TRAN_CONTINUE;
  836|       |
  837|      0|    case TLS_ST_SW_SRVR_DONE:
  ------------------
  |  Branch (837:5): [True: 0, False: 3.62k]
  ------------------
  838|      0|        s->ts_msg_write = ossl_time_now();
  839|      0|        return WRITE_TRAN_FINISHED;
  840|       |
  841|      0|    case TLS_ST_SR_FINISHED:
  ------------------
  |  Branch (841:5): [True: 0, False: 3.62k]
  ------------------
  842|      0|        s->ts_msg_read = ossl_time_now();
  843|      0|        if (s->hit) {
  ------------------
  |  Branch (843:13): [True: 0, False: 0]
  ------------------
  844|      0|            st->hand_state = TLS_ST_OK;
  845|      0|            return WRITE_TRAN_CONTINUE;
  846|      0|        } else if (s->ext.ticket_expected) {
  ------------------
  |  Branch (846:20): [True: 0, False: 0]
  ------------------
  847|      0|            st->hand_state = TLS_ST_SW_SESSION_TICKET;
  848|      0|        } else {
  849|      0|            st->hand_state = TLS_ST_SW_CHANGE;
  850|      0|        }
  851|      0|        return WRITE_TRAN_CONTINUE;
  852|       |
  853|      0|    case TLS_ST_SW_SESSION_TICKET:
  ------------------
  |  Branch (853:5): [True: 0, False: 3.62k]
  ------------------
  854|      0|        st->hand_state = TLS_ST_SW_CHANGE;
  855|      0|        return WRITE_TRAN_CONTINUE;
  856|       |
  857|      0|    case TLS_ST_SW_CHANGE:
  ------------------
  |  Branch (857:5): [True: 0, False: 3.62k]
  ------------------
  858|      0|        st->hand_state = TLS_ST_SW_FINISHED;
  859|      0|        return WRITE_TRAN_CONTINUE;
  860|       |
  861|      0|    case TLS_ST_SW_FINISHED:
  ------------------
  |  Branch (861:5): [True: 0, False: 3.62k]
  ------------------
  862|      0|        if (s->hit) {
  ------------------
  |  Branch (862:13): [True: 0, False: 0]
  ------------------
  863|      0|            return WRITE_TRAN_FINISHED;
  864|      0|        }
  865|      0|        st->hand_state = TLS_ST_OK;
  866|      0|        return WRITE_TRAN_CONTINUE;
  867|  3.62k|    }
  868|  3.62k|}
ossl_statem_server_pre_work:
  875|  36.1k|{
  876|  36.1k|    OSSL_STATEM *st = &s->statem;
  877|  36.1k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  36.1k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  878|       |
  879|  36.1k|    switch (st->hand_state) {
  880|  14.5k|    default:
  ------------------
  |  Branch (880:5): [True: 14.5k, False: 21.6k]
  ------------------
  881|       |        /* No pre work to be done */
  882|  14.5k|        break;
  883|       |
  884|  14.5k|    case TLS_ST_SW_HELLO_REQ:
  ------------------
  |  Branch (884:5): [True: 0, False: 36.1k]
  ------------------
  885|      0|        s->shutdown = 0;
  886|      0|        if (SSL_CONNECTION_IS_DTLS(s))
  ------------------
  |  |  266|      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)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  887|      0|            dtls1_clear_sent_buffer(s);
  888|      0|        break;
  889|       |
  890|      0|    case DTLS_ST_SW_HELLO_VERIFY_REQUEST:
  ------------------
  |  Branch (890:5): [True: 0, False: 36.1k]
  ------------------
  891|      0|        s->shutdown = 0;
  892|      0|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|      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)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  893|      0|            dtls1_clear_sent_buffer(s);
  894|       |            /* We don't buffer this message so don't use the timer */
  895|      0|            st->use_timer = 0;
  896|      0|        }
  897|      0|        break;
  898|       |
  899|  3.62k|    case TLS_ST_SW_SRVR_HELLO:
  ------------------
  |  Branch (899:5): [True: 3.62k, False: 32.5k]
  ------------------
  900|  3.62k|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
  901|       |            /*
  902|       |             * Messages we write from now on should be buffered and
  903|       |             * retransmitted if necessary, so we need to use the timer now
  904|       |             */
  905|      0|            st->use_timer = 1;
  906|      0|        }
  907|  3.62k|        break;
  908|       |
  909|      0|    case TLS_ST_SW_SRVR_DONE:
  ------------------
  |  Branch (909:5): [True: 0, False: 36.1k]
  ------------------
  910|       |#ifndef OPENSSL_NO_SCTP
  911|       |        if (SSL_CONNECTION_IS_DTLS(s) && BIO_dgram_is_sctp(SSL_get_wbio(ssl))) {
  912|       |            /* Calls SSLfatal() as required */
  913|       |            return dtls_wait_for_dry(s);
  914|       |        }
  915|       |#endif
  916|      0|        return WORK_FINISHED_CONTINUE;
  917|       |
  918|  7.16k|    case TLS_ST_SW_SESSION_TICKET:
  ------------------
  |  Branch (918:5): [True: 7.16k, False: 28.9k]
  ------------------
  919|  7.16k|        if (SSL_CONNECTION_IS_TLS13(s) && s->sent_tickets == 0
  ------------------
  |  |  273|  14.3k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.3k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.16k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  274|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.3k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  275|  14.3k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.16k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.16k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (919:43): [True: 3.58k, False: 3.58k]
  ------------------
  920|  3.58k|            && s->ext.extra_tickets_expected == 0) {
  ------------------
  |  Branch (920:16): [True: 3.58k, False: 0]
  ------------------
  921|       |            /*
  922|       |             * Actually this is the end of the handshake, but we're going
  923|       |             * straight into writing the session ticket out. So we finish off
  924|       |             * the handshake, but keep the various buffers active.
  925|       |             *
  926|       |             * Calls SSLfatal as required.
  927|       |             */
  928|  3.58k|            return tls_finish_handshake(s, wst, 0, 0);
  929|  3.58k|        }
  930|  3.58k|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  3.58k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.58k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.58k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.58k]
  |  |  ------------------
  ------------------
  931|       |            /*
  932|       |             * We're into the last flight. We don't retransmit the last flight
  933|       |             * unless we need to, so we don't use the timer
  934|       |             */
  935|      0|            st->use_timer = 0;
  936|      0|        }
  937|  3.58k|        break;
  938|       |
  939|  3.62k|    case TLS_ST_SW_CHANGE:
  ------------------
  |  Branch (939:5): [True: 3.62k, False: 32.5k]
  ------------------
  940|  3.62k|        if (SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  941|  3.62k|            break;
  942|       |        /* Writes to s->session are only safe for initial handshakes */
  943|      0|        if (s->session->cipher == NULL) {
  ------------------
  |  Branch (943:13): [True: 0, False: 0]
  ------------------
  944|      0|            s->session->cipher = s->s3.tmp.new_cipher;
  945|      0|        } else if (s->session->cipher != s->s3.tmp.new_cipher) {
  ------------------
  |  Branch (945:20): [True: 0, False: 0]
  ------------------
  946|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  947|      0|            return WORK_ERROR;
  948|      0|        }
  949|      0|        if (!ssl->method->ssl3_enc->setup_key_block(s)) {
  ------------------
  |  Branch (949:13): [True: 0, False: 0]
  ------------------
  950|       |            /* SSLfatal() already called */
  951|      0|            return WORK_ERROR;
  952|      0|        }
  953|      0|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|      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)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  954|       |            /*
  955|       |             * We're into the last flight. We don't retransmit the last flight
  956|       |             * unless we need to, so we don't use the timer. This might have
  957|       |             * already been set to 0 if we sent a NewSessionTicket message,
  958|       |             * but we'll set it again here in case we didn't.
  959|       |             */
  960|      0|            st->use_timer = 0;
  961|      0|        }
  962|      0|        return WORK_FINISHED_CONTINUE;
  963|       |
  964|  3.62k|    case TLS_ST_EARLY_DATA:
  ------------------
  |  Branch (964:5): [True: 3.62k, False: 32.5k]
  ------------------
  965|  3.62k|        if (s->early_data_state != SSL_EARLY_DATA_ACCEPTING
  ------------------
  |  Branch (965:13): [True: 3.62k, False: 0]
  ------------------
  966|  3.62k|            && (s->s3.flags & TLS1_FLAGS_STATELESS) == 0)
  ------------------
  |  |  304|  3.62k|#define TLS1_FLAGS_STATELESS 0x0800
  ------------------
  |  Branch (966:16): [True: 3.62k, False: 0]
  ------------------
  967|  3.62k|            return WORK_FINISHED_CONTINUE;
  968|       |
  969|       |        /*
  970|       |         * In QUIC with 0-RTT we just carry on when otherwise we would stop
  971|       |         * to allow the server to read early data
  972|       |         */
  973|      0|        if (SSL_NO_EOED(s) && s->ext.early_data == SSL_EARLY_DATA_ACCEPTED
  ------------------
  |  |  315|      0|#define SSL_NO_EOED(s) SSL_IS_QUIC_HANDSHAKE(s)
  |  |  ------------------
  |  |  |  |  311|      0|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |   22|      0|#define TLS1_FLAGS_QUIC 0x2000
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (311:34): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      if (SSL_NO_EOED(s) && s->ext.early_data == SSL_EARLY_DATA_ACCEPTED
  ------------------
  |  | 2074|      0|#define SSL_EARLY_DATA_ACCEPTED 2
  ------------------
  |  Branch (973:31): [True: 0, False: 0]
  ------------------
  974|      0|            && s->early_data_state != SSL_EARLY_DATA_FINISHED_READING) {
  ------------------
  |  Branch (974:16): [True: 0, False: 0]
  ------------------
  975|      0|            s->early_data_state = SSL_EARLY_DATA_FINISHED_READING;
  976|      0|            if (!ssl->method->ssl3_enc->change_cipher_state(s, SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_SERVER_READ)) {
  ------------------
  |  |  347|      0|#define SSL3_CC_HANDSHAKE 0x080
  ------------------
                          if (!ssl->method->ssl3_enc->change_cipher_state(s, SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_SERVER_READ)) {
  ------------------
  |  |  350|      0|#define SSL3_CHANGE_CIPHER_SERVER_READ (SSL3_CC_SERVER | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  345|      0|#define SSL3_CC_SERVER 0x020
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_SERVER_READ (SSL3_CC_SERVER | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  342|      0|#define SSL3_CC_READ 0x001
  |  |  ------------------
  ------------------
  |  Branch (976:17): [True: 0, False: 0]
  ------------------
  977|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  978|      0|                return WORK_ERROR;
  979|      0|            }
  980|      0|            return WORK_FINISHED_SWAP;
  981|      0|        }
  982|       |        /* Fall through */
  983|       |
  984|  3.58k|    case TLS_ST_OK:
  ------------------
  |  Branch (984:5): [True: 3.58k, False: 32.5k]
  ------------------
  985|       |        /* Calls SSLfatal() as required */
  986|  3.58k|        return tls_finish_handshake(s, wst, 1, 1);
  987|  36.1k|    }
  988|       |
  989|  25.3k|    return WORK_FINISHED_CONTINUE;
  990|  36.1k|}
ossl_statem_server_post_work:
 1017|  32.5k|{
 1018|  32.5k|    OSSL_STATEM *st = &s->statem;
 1019|  32.5k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  32.5k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1020|       |
 1021|  32.5k|    s->init_num = 0;
 1022|       |
 1023|  32.5k|    switch (st->hand_state) {
 1024|  10.8k|    default:
  ------------------
  |  Branch (1024:5): [True: 10.8k, False: 21.6k]
  ------------------
 1025|       |        /* No post work to be done */
 1026|  10.8k|        break;
 1027|       |
 1028|  10.8k|    case TLS_ST_SW_HELLO_REQ:
  ------------------
  |  Branch (1028:5): [True: 0, False: 32.5k]
  ------------------
 1029|      0|        if (statem_flush(s) != 1)
  ------------------
  |  Branch (1029:13): [True: 0, False: 0]
  ------------------
 1030|      0|            return WORK_MORE_A;
 1031|      0|        if (!ssl3_init_finished_mac(s)) {
  ------------------
  |  Branch (1031:13): [True: 0, False: 0]
  ------------------
 1032|       |            /* SSLfatal() already called */
 1033|      0|            return WORK_ERROR;
 1034|      0|        }
 1035|      0|        break;
 1036|       |
 1037|      0|    case DTLS_ST_SW_HELLO_VERIFY_REQUEST:
  ------------------
  |  Branch (1037:5): [True: 0, False: 32.5k]
  ------------------
 1038|      0|        if (statem_flush(s) != 1)
  ------------------
  |  Branch (1038:13): [True: 0, False: 0]
  ------------------
 1039|      0|            return WORK_MORE_A;
 1040|       |        /* HelloVerifyRequest resets Finished MAC */
 1041|      0|        if (s->version != DTLS1_BAD_VER && !ssl3_init_finished_mac(s)) {
  ------------------
  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (1041:13): [True: 0, False: 0]
  |  Branch (1041:44): [True: 0, False: 0]
  ------------------
 1042|       |            /* SSLfatal() already called */
 1043|      0|            return WORK_ERROR;
 1044|      0|        }
 1045|       |        /*
 1046|       |         * The next message should be another ClientHello which we need to
 1047|       |         * treat like it was the first packet
 1048|       |         */
 1049|      0|        s->first_packet = 1;
 1050|      0|        break;
 1051|       |
 1052|  3.62k|    case TLS_ST_SW_SRVR_HELLO:
  ------------------
  |  Branch (1052:5): [True: 3.62k, False: 28.9k]
  ------------------
 1053|  3.62k|        if (SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|  7.25k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 1054|  3.62k|            && s->hello_retry_request == SSL_HRR_PENDING) {
  ------------------
  |  Branch (1054:16): [True: 0, False: 3.62k]
  ------------------
 1055|      0|            if ((s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) == 0
  ------------------
  |  |  404|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1055:17): [True: 0, False: 0]
  ------------------
 1056|      0|                && statem_flush(s) != 1)
  ------------------
  |  Branch (1056:20): [True: 0, False: 0]
  ------------------
 1057|      0|                return WORK_MORE_A;
 1058|      0|            break;
 1059|      0|        }
 1060|       |#ifndef OPENSSL_NO_SCTP
 1061|       |        if (SSL_CONNECTION_IS_DTLS(s) && s->hit) {
 1062|       |            unsigned char sctpauthkey[64];
 1063|       |            char labelbuffer[sizeof(DTLS1_SCTP_AUTH_LABEL)];
 1064|       |            size_t labellen;
 1065|       |
 1066|       |            /*
 1067|       |             * Add new shared key for SCTP-Auth, will be ignored if no
 1068|       |             * SCTP used.
 1069|       |             */
 1070|       |            memcpy(labelbuffer, DTLS1_SCTP_AUTH_LABEL,
 1071|       |                sizeof(DTLS1_SCTP_AUTH_LABEL));
 1072|       |
 1073|       |            /* Don't include the terminating zero. */
 1074|       |            labellen = sizeof(labelbuffer) - 1;
 1075|       |            if (s->mode & SSL_MODE_DTLS_SCTP_LABEL_LENGTH_BUG)
 1076|       |                labellen += 1;
 1077|       |
 1078|       |            if (SSL_export_keying_material(ssl, sctpauthkey,
 1079|       |                    sizeof(sctpauthkey), labelbuffer,
 1080|       |                    labellen, NULL, 0,
 1081|       |                    0)
 1082|       |                <= 0) {
 1083|       |                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
 1084|       |                return WORK_ERROR;
 1085|       |            }
 1086|       |
 1087|       |            BIO_ctrl(SSL_get_wbio(ssl), BIO_CTRL_DGRAM_SCTP_ADD_AUTH_KEY,
 1088|       |                sizeof(sctpauthkey), sctpauthkey);
 1089|       |        }
 1090|       |#endif
 1091|  3.62k|        if (!SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|  7.25k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 1092|  3.62k|            || ((s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0
  ------------------
  |  |  404|  3.62k|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|  3.62k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1092:17): [True: 3.62k, False: 0]
  ------------------
 1093|  3.62k|                && s->hello_retry_request != SSL_HRR_COMPLETE))
  ------------------
  |  Branch (1093:20): [True: 3.62k, False: 0]
  ------------------
 1094|  3.62k|            break;
 1095|       |        /* Fall through */
 1096|       |
 1097|  3.62k|    case TLS_ST_SW_CHANGE:
  ------------------
  |  Branch (1097:5): [True: 3.62k, False: 28.9k]
  ------------------
 1098|  3.62k|        if (s->hello_retry_request == SSL_HRR_PENDING) {
  ------------------
  |  Branch (1098:13): [True: 0, False: 3.62k]
  ------------------
 1099|      0|            if (!statem_flush(s))
  ------------------
  |  Branch (1099:17): [True: 0, False: 0]
  ------------------
 1100|      0|                return WORK_MORE_A;
 1101|      0|            break;
 1102|      0|        }
 1103|       |
 1104|  3.62k|        if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 1105|  3.62k|            if (!ssl->method->ssl3_enc->setup_key_block(s)
  ------------------
  |  Branch (1105:17): [True: 0, False: 3.62k]
  ------------------
 1106|  3.62k|                || !tls13_store_handshake_traffic_hash(s)
  ------------------
  |  Branch (1106:20): [True: 0, False: 3.62k]
  ------------------
 1107|  3.62k|                || !ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (1107:20): [True: 0, False: 3.62k]
  ------------------
 1108|  3.62k|                    SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_SERVER_WRITE)) {
  ------------------
  |  |  347|  3.62k|#define SSL3_CC_HANDSHAKE 0x080
  ------------------
                                  SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_SERVER_WRITE)) {
  ------------------
  |  |  352|  3.62k|#define SSL3_CHANGE_CIPHER_SERVER_WRITE (SSL3_CC_SERVER | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  345|  3.62k|#define SSL3_CC_SERVER 0x020
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_SERVER_WRITE (SSL3_CC_SERVER | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  343|  3.62k|#define SSL3_CC_WRITE 0x002
  |  |  ------------------
  ------------------
 1109|       |                /* SSLfatal() already called */
 1110|      0|                return WORK_ERROR;
 1111|      0|            }
 1112|       |
 1113|  3.62k|            if (s->ext.early_data != SSL_EARLY_DATA_ACCEPTED
  ------------------
  |  | 2074|  7.25k|#define SSL_EARLY_DATA_ACCEPTED 2
  ------------------
  |  Branch (1113:17): [True: 3.62k, False: 0]
  ------------------
 1114|  3.62k|                && !ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (1114:20): [True: 0, False: 3.62k]
  ------------------
 1115|  3.62k|                    SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_SERVER_READ)) {
  ------------------
  |  |  347|  3.62k|#define SSL3_CC_HANDSHAKE 0x080
  ------------------
                                  SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_SERVER_READ)) {
  ------------------
  |  |  350|  3.62k|#define SSL3_CHANGE_CIPHER_SERVER_READ (SSL3_CC_SERVER | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  345|  3.62k|#define SSL3_CC_SERVER 0x020
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_SERVER_READ (SSL3_CC_SERVER | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  342|  3.62k|#define SSL3_CC_READ 0x001
  |  |  ------------------
  ------------------
 1116|       |                /* SSLfatal() already called */
 1117|      0|                return WORK_ERROR;
 1118|      0|            }
 1119|       |            /*
 1120|       |             * We don't yet know whether the next record we are going to receive
 1121|       |             * is an unencrypted alert, an encrypted alert, or an encrypted
 1122|       |             * handshake message. We temporarily tolerate unencrypted alerts.
 1123|       |             */
 1124|  3.62k|            if (s->rlayer.rrlmethod->set_plain_alerts != NULL)
  ------------------
  |  Branch (1124:17): [True: 3.62k, False: 0]
  ------------------
 1125|  3.62k|                s->rlayer.rrlmethod->set_plain_alerts(s->rlayer.rrl, 1);
 1126|  3.62k|            break;
 1127|  3.62k|        }
 1128|       |
 1129|       |#ifndef OPENSSL_NO_SCTP
 1130|       |        if (SSL_CONNECTION_IS_DTLS(s) && !s->hit) {
 1131|       |            /*
 1132|       |             * Change to new shared key of SCTP-Auth, will be ignored if
 1133|       |             * no SCTP used.
 1134|       |             */
 1135|       |            BIO_ctrl(SSL_get_wbio(ssl), BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY,
 1136|       |                0, NULL);
 1137|       |        }
 1138|       |#endif
 1139|      0|        if (!ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (1139:13): [True: 0, False: 0]
  ------------------
 1140|      0|                SSL3_CHANGE_CIPHER_SERVER_WRITE)) {
  ------------------
  |  |  352|      0|#define SSL3_CHANGE_CIPHER_SERVER_WRITE (SSL3_CC_SERVER | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  345|      0|#define SSL3_CC_SERVER 0x020
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_SERVER_WRITE (SSL3_CC_SERVER | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  343|      0|#define SSL3_CC_WRITE 0x002
  |  |  ------------------
  ------------------
 1141|       |            /* SSLfatal() already called */
 1142|      0|            return WORK_ERROR;
 1143|      0|        }
 1144|      0|        break;
 1145|       |
 1146|      0|    case TLS_ST_SW_SRVR_DONE:
  ------------------
  |  Branch (1146:5): [True: 0, False: 32.5k]
  ------------------
 1147|      0|        if (statem_flush(s) != 1)
  ------------------
  |  Branch (1147:13): [True: 0, False: 0]
  ------------------
 1148|      0|            return WORK_MORE_A;
 1149|      0|        break;
 1150|       |
 1151|  3.62k|    case TLS_ST_SW_FINISHED:
  ------------------
  |  Branch (1151:5): [True: 3.62k, False: 28.9k]
  ------------------
 1152|  3.62k|        if (statem_flush(s) != 1)
  ------------------
  |  Branch (1152:13): [True: 0, False: 3.62k]
  ------------------
 1153|      0|            return WORK_MORE_A;
 1154|       |#ifndef OPENSSL_NO_SCTP
 1155|       |        if (SSL_CONNECTION_IS_DTLS(s) && s->hit) {
 1156|       |            /*
 1157|       |             * Change to new shared key of SCTP-Auth, will be ignored if
 1158|       |             * no SCTP used.
 1159|       |             */
 1160|       |            BIO_ctrl(SSL_get_wbio(ssl), BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY,
 1161|       |                0, NULL);
 1162|       |        }
 1163|       |#endif
 1164|  3.62k|        if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 1165|       |            /* TLS 1.3 gets the secret size from the handshake md */
 1166|  3.62k|            size_t dummy;
 1167|  3.62k|            if (!ssl->method->ssl3_enc->generate_master_secret(s,
  ------------------
  |  Branch (1167:17): [True: 0, False: 3.62k]
  ------------------
 1168|  3.62k|                    s->master_secret, s->handshake_secret, 0,
 1169|  3.62k|                    &dummy)
 1170|  3.62k|                || !tls13_store_server_finished_hash(s)
  ------------------
  |  Branch (1170:20): [True: 0, False: 3.62k]
  ------------------
 1171|  3.62k|                || !ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (1171:20): [True: 0, False: 3.62k]
  ------------------
 1172|  3.62k|                    SSL3_CC_APPLICATION | SSL3_CHANGE_CIPHER_SERVER_WRITE))
  ------------------
  |  |  348|  3.62k|#define SSL3_CC_APPLICATION 0x100
  ------------------
                                  SSL3_CC_APPLICATION | SSL3_CHANGE_CIPHER_SERVER_WRITE))
  ------------------
  |  |  352|  3.62k|#define SSL3_CHANGE_CIPHER_SERVER_WRITE (SSL3_CC_SERVER | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  345|  3.62k|#define SSL3_CC_SERVER 0x020
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_SERVER_WRITE (SSL3_CC_SERVER | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  343|  3.62k|#define SSL3_CC_WRITE 0x002
  |  |  ------------------
  ------------------
 1173|       |                /* SSLfatal() already called */
 1174|      0|                return WORK_ERROR;
 1175|  3.62k|        }
 1176|  3.62k|        break;
 1177|       |
 1178|  3.62k|    case TLS_ST_SW_CERT_REQ:
  ------------------
  |  Branch (1178:5): [True: 0, False: 32.5k]
  ------------------
 1179|      0|        if (s->post_handshake_auth == SSL_PHA_REQUEST_PENDING) {
  ------------------
  |  Branch (1179:13): [True: 0, False: 0]
  ------------------
 1180|      0|            if (statem_flush(s) != 1)
  ------------------
  |  Branch (1180:17): [True: 0, False: 0]
  ------------------
 1181|      0|                return WORK_MORE_A;
 1182|      0|        } else {
 1183|      0|            if (!SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      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 (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      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 (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1184|      0|                || (s->options & SSL_OP_NO_TX_CERTIFICATE_COMPRESSION) != 0)
  ------------------
  |  |  451|      0|#define SSL_OP_NO_TX_CERTIFICATE_COMPRESSION SSL_OP_BIT(32)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1184:20): [True: 0, False: 0]
  ------------------
 1185|      0|                s->ext.compress_certificate_from_peer[0] = TLSEXT_comp_cert_none;
  ------------------
  |  |  219|      0|#define TLSEXT_comp_cert_none 0
  ------------------
 1186|      0|        }
 1187|      0|        break;
 1188|       |
 1189|  3.62k|    case TLS_ST_SW_ENCRYPTED_EXTENSIONS:
  ------------------
  |  Branch (1189:5): [True: 3.62k, False: 28.9k]
  ------------------
 1190|  3.62k|        if (!s->hit && !send_certificate_request(s)) {
  ------------------
  |  Branch (1190:13): [True: 3.62k, False: 0]
  |  Branch (1190:24): [True: 3.62k, False: 0]
  ------------------
 1191|  3.62k|            if (!SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|  7.25k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 1192|  3.62k|                || (s->options & SSL_OP_NO_TX_CERTIFICATE_COMPRESSION) != 0)
  ------------------
  |  |  451|  3.62k|#define SSL_OP_NO_TX_CERTIFICATE_COMPRESSION SSL_OP_BIT(32)
  |  |  ------------------
  |  |  |  |  351|  3.62k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1192:20): [True: 0, False: 3.62k]
  ------------------
 1193|      0|                s->ext.compress_certificate_from_peer[0] = TLSEXT_comp_cert_none;
  ------------------
  |  |  219|      0|#define TLSEXT_comp_cert_none 0
  ------------------
 1194|  3.62k|        }
 1195|  3.62k|        break;
 1196|       |
 1197|      0|    case TLS_ST_SW_KEY_UPDATE:
  ------------------
  |  Branch (1197:5): [True: 0, False: 32.5k]
  ------------------
 1198|      0|        if (statem_flush(s) != 1)
  ------------------
  |  Branch (1198:13): [True: 0, False: 0]
  ------------------
 1199|      0|            return WORK_MORE_A;
 1200|      0|        if (!tls13_update_key(s, 1)) {
  ------------------
  |  Branch (1200:13): [True: 0, False: 0]
  ------------------
 1201|       |            /* SSLfatal() already called */
 1202|      0|            return WORK_ERROR;
 1203|      0|        }
 1204|      0|        break;
 1205|       |
 1206|  7.16k|    case TLS_ST_SW_SESSION_TICKET:
  ------------------
  |  Branch (1206:5): [True: 7.16k, False: 25.4k]
  ------------------
 1207|  7.16k|        clear_sys_error();
  ------------------
  |  |   31|  7.16k|#define clear_sys_error() errno = 0
  ------------------
 1208|  7.16k|        if (SSL_CONNECTION_IS_TLS13(s) && statem_flush(s) != 1) {
  ------------------
  |  |  273|  14.3k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.3k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.16k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  274|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.3k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  275|  14.3k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.16k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.16k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1208:43): [True: 0, False: 7.16k]
  ------------------
 1209|      0|            if (SSL_get_error(ssl, 0) == SSL_ERROR_SYSCALL
  ------------------
  |  | 1289|      0|#define SSL_ERROR_SYSCALL 5 /* look at error stack/return \
  ------------------
  |  Branch (1209:17): [True: 0, False: 0]
  ------------------
 1210|      0|                && conn_is_closed()) {
  ------------------
  |  Branch (1210:20): [True: 0, False: 0]
  ------------------
 1211|       |                /*
 1212|       |                 * We ignore connection closed errors in TLSv1.3 when sending a
 1213|       |                 * NewSessionTicket and behave as if we were successful. This is
 1214|       |                 * so that we are still able to read data sent to us by a client
 1215|       |                 * that closes soon after the end of the handshake without
 1216|       |                 * waiting to read our post-handshake NewSessionTickets.
 1217|       |                 */
 1218|      0|                s->rwstate = SSL_NOTHING;
  ------------------
  |  |  955|      0|#define SSL_NOTHING 1
  ------------------
 1219|      0|                break;
 1220|      0|            }
 1221|       |
 1222|      0|            return WORK_MORE_A;
 1223|      0|        }
 1224|  7.16k|        ERR_clear_last_mark();
 1225|  7.16k|        break;
 1226|  32.5k|    }
 1227|       |
 1228|  32.5k|    return WORK_FINISHED_CONTINUE;
 1229|  32.5k|}
ossl_statem_server_construct_message:
 1241|  32.5k|{
 1242|  32.5k|    OSSL_STATEM *st = &s->statem;
 1243|       |
 1244|  32.5k|    switch (st->hand_state) {
 1245|      0|    default:
  ------------------
  |  Branch (1245:5): [True: 0, False: 32.5k]
  ------------------
 1246|       |        /* Shouldn't happen */
 1247|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_HANDSHAKE_STATE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1248|      0|        return 0;
 1249|       |
 1250|  3.62k|    case TLS_ST_SW_CHANGE:
  ------------------
  |  Branch (1250:5): [True: 3.62k, False: 28.9k]
  ------------------
 1251|  3.62k|        if (SSL_CONNECTION_IS_DTLS(s))
  ------------------
  |  |  266|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
 1252|      0|            *confunc = dtls_construct_change_cipher_spec;
 1253|  3.62k|        else
 1254|  3.62k|            *confunc = tls_construct_change_cipher_spec;
 1255|  3.62k|        *mt = SSL3_MT_CHANGE_CIPHER_SPEC;
  ------------------
  |  |  337|  3.62k|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
 1256|  3.62k|        break;
 1257|       |
 1258|      0|    case DTLS_ST_SW_HELLO_VERIFY_REQUEST:
  ------------------
  |  Branch (1258:5): [True: 0, False: 32.5k]
  ------------------
 1259|      0|        *confunc = dtls_construct_hello_verify_request;
 1260|      0|        *mt = DTLS1_MT_HELLO_VERIFY_REQUEST;
  ------------------
  |  |  334|      0|#define DTLS1_MT_HELLO_VERIFY_REQUEST 3
  ------------------
 1261|      0|        break;
 1262|       |
 1263|      0|    case TLS_ST_SW_HELLO_REQ:
  ------------------
  |  Branch (1263:5): [True: 0, False: 32.5k]
  ------------------
 1264|       |        /* No construction function needed */
 1265|      0|        *confunc = NULL;
 1266|      0|        *mt = SSL3_MT_HELLO_REQUEST;
  ------------------
  |  |  312|      0|#define SSL3_MT_HELLO_REQUEST 0
  ------------------
 1267|      0|        break;
 1268|       |
 1269|  3.62k|    case TLS_ST_SW_SRVR_HELLO:
  ------------------
  |  Branch (1269:5): [True: 3.62k, False: 28.9k]
  ------------------
 1270|  3.62k|        *confunc = tls_construct_server_hello;
 1271|  3.62k|        *mt = SSL3_MT_SERVER_HELLO;
  ------------------
  |  |  314|  3.62k|#define SSL3_MT_SERVER_HELLO 2
  ------------------
 1272|  3.62k|        break;
 1273|       |
 1274|  3.62k|    case TLS_ST_SW_CERT:
  ------------------
  |  Branch (1274:5): [True: 3.62k, False: 28.9k]
  ------------------
 1275|  3.62k|        *confunc = tls_construct_server_certificate;
 1276|  3.62k|        *mt = SSL3_MT_CERTIFICATE;
  ------------------
  |  |  318|  3.62k|#define SSL3_MT_CERTIFICATE 11
  ------------------
 1277|  3.62k|        break;
 1278|       |
 1279|       |#ifndef OPENSSL_NO_COMP_ALG
 1280|       |    case TLS_ST_SW_COMP_CERT:
 1281|       |        *confunc = tls_construct_server_compressed_certificate;
 1282|       |        *mt = SSL3_MT_COMPRESSED_CERTIFICATE;
 1283|       |        break;
 1284|       |#endif
 1285|       |
 1286|  3.62k|    case TLS_ST_SW_CERT_VRFY:
  ------------------
  |  Branch (1286:5): [True: 3.62k, False: 28.9k]
  ------------------
 1287|  3.62k|        *confunc = tls_construct_cert_verify;
 1288|  3.62k|        *mt = SSL3_MT_CERTIFICATE_VERIFY;
  ------------------
  |  |  322|  3.62k|#define SSL3_MT_CERTIFICATE_VERIFY 15
  ------------------
 1289|  3.62k|        break;
 1290|       |
 1291|      0|    case TLS_ST_SW_KEY_EXCH:
  ------------------
  |  Branch (1291:5): [True: 0, False: 32.5k]
  ------------------
 1292|      0|        *confunc = tls_construct_server_key_exchange;
 1293|      0|        *mt = SSL3_MT_SERVER_KEY_EXCHANGE;
  ------------------
  |  |  319|      0|#define SSL3_MT_SERVER_KEY_EXCHANGE 12
  ------------------
 1294|      0|        break;
 1295|       |
 1296|      0|    case TLS_ST_SW_CERT_REQ:
  ------------------
  |  Branch (1296:5): [True: 0, False: 32.5k]
  ------------------
 1297|      0|        *confunc = tls_construct_certificate_request;
 1298|      0|        *mt = SSL3_MT_CERTIFICATE_REQUEST;
  ------------------
  |  |  320|      0|#define SSL3_MT_CERTIFICATE_REQUEST 13
  ------------------
 1299|      0|        break;
 1300|       |
 1301|      0|    case TLS_ST_SW_SRVR_DONE:
  ------------------
  |  Branch (1301:5): [True: 0, False: 32.5k]
  ------------------
 1302|      0|        *confunc = tls_construct_server_done;
 1303|      0|        *mt = SSL3_MT_SERVER_DONE;
  ------------------
  |  |  321|      0|#define SSL3_MT_SERVER_DONE 14
  ------------------
 1304|      0|        break;
 1305|       |
 1306|  7.16k|    case TLS_ST_SW_SESSION_TICKET:
  ------------------
  |  Branch (1306:5): [True: 7.16k, False: 25.4k]
  ------------------
 1307|  7.16k|        *confunc = tls_construct_new_session_ticket;
 1308|  7.16k|        *mt = SSL3_MT_NEWSESSION_TICKET;
  ------------------
  |  |  315|  7.16k|#define SSL3_MT_NEWSESSION_TICKET 4
  ------------------
 1309|  7.16k|        break;
 1310|       |
 1311|      0|    case TLS_ST_SW_CERT_STATUS:
  ------------------
  |  Branch (1311:5): [True: 0, False: 32.5k]
  ------------------
 1312|      0|        *confunc = tls_construct_cert_status;
 1313|      0|        *mt = SSL3_MT_CERTIFICATE_STATUS;
  ------------------
  |  |  326|      0|#define SSL3_MT_CERTIFICATE_STATUS 22
  ------------------
 1314|      0|        break;
 1315|       |
 1316|  3.62k|    case TLS_ST_SW_FINISHED:
  ------------------
  |  Branch (1316:5): [True: 3.62k, False: 28.9k]
  ------------------
 1317|  3.62k|        *confunc = tls_construct_finished;
 1318|  3.62k|        *mt = SSL3_MT_FINISHED;
  ------------------
  |  |  324|  3.62k|#define SSL3_MT_FINISHED 20
  ------------------
 1319|  3.62k|        break;
 1320|       |
 1321|  3.62k|    case TLS_ST_EARLY_DATA:
  ------------------
  |  Branch (1321:5): [True: 3.62k, False: 28.9k]
  ------------------
 1322|  3.62k|        *confunc = NULL;
 1323|  3.62k|        *mt = SSL3_MT_DUMMY;
  ------------------
  |  |   41|  3.62k|#define SSL3_MT_DUMMY -1
  ------------------
 1324|  3.62k|        break;
 1325|       |
 1326|  3.62k|    case TLS_ST_SW_ENCRYPTED_EXTENSIONS:
  ------------------
  |  Branch (1326:5): [True: 3.62k, False: 28.9k]
  ------------------
 1327|  3.62k|        *confunc = tls_construct_encrypted_extensions;
 1328|  3.62k|        *mt = SSL3_MT_ENCRYPTED_EXTENSIONS;
  ------------------
  |  |  317|  3.62k|#define SSL3_MT_ENCRYPTED_EXTENSIONS 8
  ------------------
 1329|  3.62k|        break;
 1330|       |
 1331|      0|    case TLS_ST_SW_KEY_UPDATE:
  ------------------
  |  Branch (1331:5): [True: 0, False: 32.5k]
  ------------------
 1332|      0|        *confunc = tls_construct_key_update;
 1333|      0|        *mt = SSL3_MT_KEY_UPDATE;
  ------------------
  |  |  328|      0|#define SSL3_MT_KEY_UPDATE 24
  ------------------
 1334|      0|        break;
 1335|  32.5k|    }
 1336|       |
 1337|  32.5k|    return 1;
 1338|  32.5k|}
ossl_statem_server_max_message_size:
 1365|  7.21k|{
 1366|  7.21k|    OSSL_STATEM *st = &s->statem;
 1367|       |
 1368|  7.21k|    switch (st->hand_state) {
 1369|      0|    default:
  ------------------
  |  Branch (1369:5): [True: 0, False: 7.21k]
  ------------------
 1370|       |        /* Shouldn't happen */
 1371|      0|        return 0;
 1372|       |
 1373|  3.62k|    case TLS_ST_SR_CLNT_HELLO:
  ------------------
  |  Branch (1373:5): [True: 3.62k, False: 3.58k]
  ------------------
 1374|  3.62k|        return CLIENT_HELLO_MAX_LENGTH;
  ------------------
  |  | 1355|  3.62k|#define CLIENT_HELLO_MAX_LENGTH 131396
  ------------------
 1375|       |
 1376|      0|    case TLS_ST_SR_END_OF_EARLY_DATA:
  ------------------
  |  Branch (1376:5): [True: 0, False: 7.21k]
  ------------------
 1377|      0|        return END_OF_EARLY_DATA_MAX_LENGTH;
  ------------------
  |  |   21|      0|#define END_OF_EARLY_DATA_MAX_LENGTH 0
  ------------------
 1378|       |
 1379|      0|    case TLS_ST_SR_COMP_CERT:
  ------------------
  |  Branch (1379:5): [True: 0, False: 7.21k]
  ------------------
 1380|      0|    case TLS_ST_SR_CERT:
  ------------------
  |  Branch (1380:5): [True: 0, False: 7.21k]
  ------------------
 1381|      0|        return s->max_cert_list;
 1382|       |
 1383|      0|    case TLS_ST_SR_KEY_EXCH:
  ------------------
  |  Branch (1383:5): [True: 0, False: 7.21k]
  ------------------
 1384|      0|        return CLIENT_KEY_EXCH_MAX_LENGTH;
  ------------------
  |  | 1357|      0|#define CLIENT_KEY_EXCH_MAX_LENGTH 2048
  ------------------
 1385|       |
 1386|      0|    case TLS_ST_SR_CERT_VRFY:
  ------------------
  |  Branch (1386:5): [True: 0, False: 7.21k]
  ------------------
 1387|      0|        return CERTIFICATE_VERIFY_MAX_LENGTH;
  ------------------
  |  |   35|      0|#define CERTIFICATE_VERIFY_MAX_LENGTH 65539
  ------------------
 1388|       |
 1389|      0|#ifndef OPENSSL_NO_NEXTPROTONEG
 1390|      0|    case TLS_ST_SR_NEXT_PROTO:
  ------------------
  |  Branch (1390:5): [True: 0, False: 7.21k]
  ------------------
 1391|      0|        return NEXT_PROTO_MAX_LENGTH;
  ------------------
  |  | 1358|      0|#define NEXT_PROTO_MAX_LENGTH 514
  ------------------
 1392|      0|#endif
 1393|       |
 1394|      0|    case TLS_ST_SR_CHANGE:
  ------------------
  |  Branch (1394:5): [True: 0, False: 7.21k]
  ------------------
 1395|      0|        return CCS_MAX_LENGTH;
  ------------------
  |  |   29|      0|#define CCS_MAX_LENGTH 1
  ------------------
 1396|       |
 1397|  3.58k|    case TLS_ST_SR_FINISHED:
  ------------------
  |  Branch (1397:5): [True: 3.58k, False: 3.62k]
  ------------------
 1398|  3.58k|        return FINISHED_MAX_LENGTH;
  ------------------
  |  |   38|  3.58k|#define FINISHED_MAX_LENGTH 64
  ------------------
 1399|       |
 1400|      0|    case TLS_ST_SR_KEY_UPDATE:
  ------------------
  |  Branch (1400:5): [True: 0, False: 7.21k]
  ------------------
 1401|      0|        return KEY_UPDATE_MAX_LENGTH;
  ------------------
  |  |   28|      0|#define KEY_UPDATE_MAX_LENGTH 1
  ------------------
 1402|  7.21k|    }
 1403|  7.21k|}
ossl_statem_server_process_message:
 1410|  7.21k|{
 1411|  7.21k|    OSSL_STATEM *st = &s->statem;
 1412|       |
 1413|  7.21k|    switch (st->hand_state) {
 1414|      0|    default:
  ------------------
  |  Branch (1414:5): [True: 0, False: 7.21k]
  ------------------
 1415|       |        /* Shouldn't happen */
 1416|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1417|      0|        return MSG_PROCESS_ERROR;
 1418|       |
 1419|  3.62k|    case TLS_ST_SR_CLNT_HELLO:
  ------------------
  |  Branch (1419:5): [True: 3.62k, False: 3.58k]
  ------------------
 1420|  3.62k|        return tls_process_client_hello(s, pkt);
 1421|       |
 1422|      0|    case TLS_ST_SR_END_OF_EARLY_DATA:
  ------------------
  |  Branch (1422:5): [True: 0, False: 7.21k]
  ------------------
 1423|      0|        return tls_process_end_of_early_data(s, pkt);
 1424|       |
 1425|      0|    case TLS_ST_SR_CERT:
  ------------------
  |  Branch (1425:5): [True: 0, False: 7.21k]
  ------------------
 1426|      0|        return tls_process_client_certificate(s, pkt);
 1427|       |
 1428|       |#ifndef OPENSSL_NO_COMP_ALG
 1429|       |    case TLS_ST_SR_COMP_CERT:
 1430|       |        return tls_process_client_compressed_certificate(s, pkt);
 1431|       |#endif
 1432|       |
 1433|      0|    case TLS_ST_SR_KEY_EXCH:
  ------------------
  |  Branch (1433:5): [True: 0, False: 7.21k]
  ------------------
 1434|      0|        return tls_process_client_key_exchange(s, pkt);
 1435|       |
 1436|      0|    case TLS_ST_SR_CERT_VRFY:
  ------------------
  |  Branch (1436:5): [True: 0, False: 7.21k]
  ------------------
 1437|      0|        return tls_process_cert_verify(s, pkt);
 1438|       |
 1439|      0|#ifndef OPENSSL_NO_NEXTPROTONEG
 1440|      0|    case TLS_ST_SR_NEXT_PROTO:
  ------------------
  |  Branch (1440:5): [True: 0, False: 7.21k]
  ------------------
 1441|      0|        return tls_process_next_proto(s, pkt);
 1442|      0|#endif
 1443|       |
 1444|      0|    case TLS_ST_SR_CHANGE:
  ------------------
  |  Branch (1444:5): [True: 0, False: 7.21k]
  ------------------
 1445|      0|        return tls_process_change_cipher_spec(s, pkt);
 1446|       |
 1447|  3.58k|    case TLS_ST_SR_FINISHED:
  ------------------
  |  Branch (1447:5): [True: 3.58k, False: 3.62k]
  ------------------
 1448|  3.58k|        return tls_process_finished(s, pkt);
 1449|       |
 1450|      0|    case TLS_ST_SR_KEY_UPDATE:
  ------------------
  |  Branch (1450:5): [True: 0, False: 7.21k]
  ------------------
 1451|      0|        return tls_process_key_update(s, pkt);
 1452|  7.21k|    }
 1453|  7.21k|}
ossl_statem_server_post_process_message:
 1461|  3.62k|{
 1462|  3.62k|    OSSL_STATEM *st = &s->statem;
 1463|       |
 1464|  3.62k|    switch (st->hand_state) {
 1465|      0|    default:
  ------------------
  |  Branch (1465:5): [True: 0, False: 3.62k]
  ------------------
 1466|       |        /* Shouldn't happen */
 1467|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1468|      0|        return WORK_ERROR;
 1469|       |
 1470|  3.62k|    case TLS_ST_SR_CLNT_HELLO:
  ------------------
  |  Branch (1470:5): [True: 3.62k, False: 0]
  ------------------
 1471|  3.62k|        return tls_post_process_client_hello(s, wst);
 1472|       |
 1473|      0|    case TLS_ST_SR_KEY_EXCH:
  ------------------
  |  Branch (1473:5): [True: 0, False: 3.62k]
  ------------------
 1474|      0|        return tls_post_process_client_key_exchange(s, wst);
 1475|  3.62k|    }
 1476|  3.62k|}
tls_process_client_hello:
 1634|  3.62k|{
 1635|       |    /* |cookie| will only be initialized for DTLS. */
 1636|  3.62k|    PACKET session_id, compression, extensions, cookie;
 1637|  3.62k|    CLIENTHELLO_MSG *clienthello = NULL;
 1638|       |
 1639|  3.62k|#ifndef OPENSSL_NO_ECH
 1640|       |    /*
 1641|       |     * For a split-mode backend we want to have a way to point at the CH octets
 1642|       |     * for the accept-confirmation calculation. The split-mode backend does not
 1643|       |     * need any ECH secrets, but it does need to see the inner CH and be the TLS
 1644|       |     * endpoint with which the ECH encrypting client sets up the TLS session.
 1645|       |     * The split-mode backend however does need to do an ECH confirm calculation
 1646|       |     * so we need to tee that up. The result of that calculation will be put in
 1647|       |     * the ServerHello.random (or ECH extension if HRR) to signal to the client
 1648|       |     * that ECH "worked."
 1649|       |     */
 1650|  3.62k|    if (s->server && PACKET_remaining(pkt) != 0) {
  ------------------
  |  Branch (1650:9): [True: 3.62k, False: 0]
  |  Branch (1650:22): [True: 3.62k, False: 0]
  ------------------
 1651|  3.62k|        int rv = 0, innerflag = OSSL_ECH_UNKNOWN_CH_TYPE;
  ------------------
  |  |   46|  3.62k|#define OSSL_ECH_UNKNOWN_CH_TYPE -1 /* we don't know yet */
  ------------------
 1652|  3.62k|        size_t startofsessid = 0, startofexts = 0, echoffset = 0;
 1653|  3.62k|        size_t outersnioffset = 0; /* offset to SNI in outer */
 1654|  3.62k|        uint16_t echtype = OSSL_ECH_type_unknown; /* type of ECH seen */
  ------------------
  |  |   40|  3.62k|#define OSSL_ECH_type_unknown 0xffff
  ------------------
 1655|  3.62k|        const unsigned char *pbuf = NULL;
 1656|       |
 1657|       |        /* reset needed in case of HRR */
 1658|  3.62k|        s->ext.ech.ch_offsets_done = 0;
 1659|  3.62k|        rv = ossl_ech_get_ch_offsets(s, pkt, &startofsessid, &startofexts,
 1660|  3.62k|            &echoffset, &echtype, &innerflag,
 1661|  3.62k|            &outersnioffset);
 1662|  3.62k|        if (rv != 1) {
  ------------------
  |  Branch (1662:13): [True: 0, False: 3.62k]
  ------------------
 1663|       |            /* SSLfatal already called */
 1664|      0|            goto err;
 1665|      0|        }
 1666|  3.62k|        if (innerflag == OSSL_ECH_INNER_CH_TYPE) {
  ------------------
  |  |   45|  3.62k|#define OSSL_ECH_INNER_CH_TYPE 1 /* inner ECHClientHello enum */
  ------------------
  |  Branch (1666:13): [True: 0, False: 3.62k]
  ------------------
 1667|      0|            WPACKET inner;
 1668|       |
 1669|      0|            OSSL_TRACE(TLS, "Got inner ECH so setting backend\n");
  ------------------
  |  |  288|      0|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
 1670|       |            /* For backend, include msg type & 3 octet length */
 1671|      0|            s->ext.ech.backend = 1;
 1672|      0|            s->ext.ech.attempted_type = TLSEXT_TYPE_ech;
  ------------------
  |  |  174|      0|#define TLSEXT_TYPE_ech 0xfe0d
  ------------------
 1673|      0|            OPENSSL_free(s->ext.ech.innerch);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1674|      0|            s->ext.ech.innerch_len = PACKET_remaining(pkt);
 1675|      0|            if (PACKET_peek_bytes(pkt, &pbuf, s->ext.ech.innerch_len) != 1) {
  ------------------
  |  Branch (1675:17): [True: 0, False: 0]
  ------------------
 1676|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1677|      0|                goto err;
 1678|      0|            }
 1679|      0|            s->ext.ech.innerch_len += SSL3_HM_HEADER_LENGTH; /* 4 */
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1680|      0|            s->ext.ech.innerch = OPENSSL_malloc(s->ext.ech.innerch_len);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1681|      0|            if (s->ext.ech.innerch == NULL) {
  ------------------
  |  Branch (1681:17): [True: 0, False: 0]
  ------------------
 1682|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1683|      0|                goto err;
 1684|      0|            }
 1685|      0|            if (!WPACKET_init_static_len(&inner, s->ext.ech.innerch,
  ------------------
  |  Branch (1685:17): [True: 0, False: 0]
  ------------------
 1686|      0|                    s->ext.ech.innerch_len, 0)) {
 1687|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1688|      0|                goto err;
 1689|      0|            }
 1690|      0|            if (!WPACKET_put_bytes_u8(&inner, SSL3_MT_CLIENT_HELLO)
  ------------------
  |  |  909|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (1690:17): [True: 0, False: 0]
  ------------------
 1691|      0|                || !WPACKET_put_bytes_u24(&inner, s->ext.ech.innerch_len - SSL3_HM_HEADER_LENGTH)
  ------------------
  |  |  913|      0|    WPACKET_put_bytes__((pkt), (val), 3)
  ------------------
  |  Branch (1691:20): [True: 0, False: 0]
  ------------------
 1692|      0|                || !WPACKET_memcpy(&inner, pbuf, s->ext.ech.innerch_len - SSL3_HM_HEADER_LENGTH)
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (1692:20): [True: 0, False: 0]
  ------------------
 1693|      0|                || !WPACKET_finish(&inner)) {
  ------------------
  |  Branch (1693:20): [True: 0, False: 0]
  ------------------
 1694|      0|                WPACKET_cleanup(&inner);
 1695|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1696|      0|                goto err;
 1697|      0|            }
 1698|      0|            if (ossl_ech_intbuf_add(s, s->ext.ech.innerch,
  ------------------
  |  Branch (1698:17): [True: 0, False: 0]
  ------------------
 1699|      0|                    s->ext.ech.innerch_len, 0)
 1700|      0|                != 1) {
 1701|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1702|      0|                goto err;
 1703|      0|            }
 1704|  3.62k|        } else if (s->ext.ech.es != NULL) {
  ------------------
  |  Branch (1704:20): [True: 0, False: 3.62k]
  ------------------
 1705|      0|            PACKET newpkt;
 1706|      0|            int secondtime = s->ext.ech.success;
 1707|       |
 1708|       |            /*
 1709|       |             * if ECH decrypt worked first time (success == 1) then fail
 1710|       |             * if there's no ECH extension at all 2nd time
 1711|       |             */
 1712|      0|            if (secondtime == 1 && echoffset == 0) {
  ------------------
  |  Branch (1712:17): [True: 0, False: 0]
  |  Branch (1712:36): [True: 0, False: 0]
  ------------------
 1713|      0|                SSLfatal(s, SSL_AD_MISSING_EXTENSION,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1714|      0|                    SSL_R_TLSV13_ALERT_MISSING_EXTENSION);
 1715|      0|                goto err;
 1716|      0|            }
 1717|      0|            if (ossl_ech_early_decrypt(s, pkt, &newpkt) != 1) {
  ------------------
  |  Branch (1717:17): [True: 0, False: 0]
  ------------------
 1718|       |                /* SSLfatal() already called */
 1719|      0|                goto err;
 1720|      0|            }
 1721|      0|            if (s->ext.ech.success == 1) {
  ------------------
  |  Branch (1721:17): [True: 0, False: 0]
  ------------------
 1722|       |                /*
 1723|       |                 * Replace the outer CH with the inner, as long as there's
 1724|       |                 * space, which there better be! (a bug triggered a bigger
 1725|       |                 * inner CH once;-)
 1726|       |                 */
 1727|      0|                if (PACKET_remaining(&newpkt) > PACKET_remaining(pkt)) {
  ------------------
  |  Branch (1727:21): [True: 0, False: 0]
  ------------------
 1728|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1729|      0|                    goto err;
 1730|      0|                }
 1731|      0|                *pkt = newpkt;
 1732|      0|            } else if (secondtime == 1 && s->ext.ech.success == 0) {
  ------------------
  |  Branch (1732:24): [True: 0, False: 0]
  |  Branch (1732:43): [True: 0, False: 0]
  ------------------
 1733|       |                /* 2nd time decrypt failed */
 1734|      0|                SSLfatal(s, SSL_AD_DECRYPT_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1735|      0|                goto err;
 1736|      0|            }
 1737|      0|        }
 1738|  3.62k|    }
 1739|  3.62k|#endif
 1740|       |
 1741|       |    /* Check if this is actually an unexpected renegotiation ClientHello */
 1742|  3.62k|    if (s->renegotiate == 0 && !SSL_IS_FIRST_HANDSHAKE(s)) {
  ------------------
  |  |  285|  3.62k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  286|  3.62k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1742:9): [True: 3.62k, False: 0]
  ------------------
 1743|      0|        if (!ossl_assert(!SSL_CONNECTION_IS_TLS13(s))) {
  ------------------
  |  |   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]
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (1743:13): [True: 0, False: 0]
  ------------------
 1744|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1745|      0|            goto err;
 1746|      0|        }
 1747|      0|        if (!RENEG_OPTIONS_OK(s->options)
  ------------------
  |  | 1630|      0|    ((options & SSL_OP_NO_RENEGOTIATION) == 0 \
  |  |  ------------------
  |  |  |  |  437|      0|#define SSL_OP_NO_RENEGOTIATION SSL_OP_BIT(30)
  |  |  |  |  ------------------
  |  |  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (1630:6): [True: 0, False: 0]
  |  |  ------------------
  |  | 1631|      0|        && (options & SSL_OP_ALLOW_CLIENT_RENEGOTIATION) != 0)
  |  |  ------------------
  |  |  |  |  367|      0|#define SSL_OP_ALLOW_CLIENT_RENEGOTIATION SSL_OP_BIT(8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (1631:12): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1748|      0|            || (!s->s3.send_connection_binding
  ------------------
  |  Branch (1748:17): [True: 0, False: 0]
  ------------------
 1749|      0|                && (s->options
  ------------------
  |  Branch (1749:20): [True: 0, False: 0]
  ------------------
 1750|      0|                       & SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION)
  ------------------
  |  |  397|      0|#define SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION SSL_OP_BIT(18)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
 1751|      0|                    == 0)) {
 1752|      0|            ssl3_send_alert(s, SSL3_AL_WARNING, SSL_AD_NO_RENEGOTIATION);
  ------------------
  |  |  249|      0|#define SSL3_AL_WARNING 1
  ------------------
                          ssl3_send_alert(s, SSL3_AL_WARNING, SSL_AD_NO_RENEGOTIATION);
  ------------------
  |  | 1268|      0|#define SSL_AD_NO_RENEGOTIATION TLS1_AD_NO_RENEGOTIATION
  |  |  ------------------
  |  |  |  |   69|      0|#define TLS1_AD_NO_RENEGOTIATION 100
  |  |  ------------------
  ------------------
 1753|      0|            return MSG_PROCESS_FINISHED_READING;
 1754|      0|        }
 1755|      0|        s->renegotiate = 1;
 1756|      0|        s->new_session = 1;
 1757|      0|    }
 1758|       |
 1759|  3.62k|    clienthello = OPENSSL_zalloc(sizeof(*clienthello));
  ------------------
  |  |  109|  3.62k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1760|  3.62k|    if (clienthello == NULL) {
  ------------------
  |  Branch (1760:9): [True: 0, False: 3.62k]
  ------------------
 1761|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1762|      0|        goto err;
 1763|      0|    }
 1764|       |
 1765|       |    /*
 1766|       |     * First, parse the raw ClientHello data into the CLIENTHELLO_MSG structure.
 1767|       |     */
 1768|  3.62k|    PACKET_null_init(&cookie);
 1769|       |
 1770|  3.62k|    if (!PACKET_get_net_2(pkt, &clienthello->legacy_version)) {
  ------------------
  |  Branch (1770:9): [True: 0, False: 3.62k]
  ------------------
 1771|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_TOO_SHORT);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1772|      0|        goto err;
 1773|      0|    }
 1774|       |
 1775|  3.62k|    if (!PACKET_copy_bytes(pkt, clienthello->random, SSL3_RANDOM_SIZE)
  ------------------
  |  |  137|  3.62k|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1775:9): [True: 0, False: 3.62k]
  ------------------
 1776|  3.62k|        || !PACKET_get_length_prefixed_1(pkt, &session_id)
  ------------------
  |  Branch (1776:12): [True: 0, False: 3.62k]
  ------------------
 1777|  3.62k|        || !PACKET_copy_all(&session_id, clienthello->session_id,
  ------------------
  |  Branch (1777:12): [True: 0, False: 3.62k]
  ------------------
 1778|  3.62k|            SSL_MAX_SSL_SESSION_ID_LENGTH,
  ------------------
  |  |   66|  3.62k|#define SSL_MAX_SSL_SESSION_ID_LENGTH 32
  ------------------
 1779|  3.62k|            &clienthello->session_id_len)) {
 1780|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1781|      0|        goto err;
 1782|      0|    }
 1783|       |
 1784|  3.62k|    if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
 1785|      0|        if (!PACKET_get_length_prefixed_1(pkt, &cookie)) {
  ------------------
  |  Branch (1785:13): [True: 0, False: 0]
  ------------------
 1786|      0|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1787|      0|            goto err;
 1788|      0|        }
 1789|      0|        if (!PACKET_copy_all(&cookie, clienthello->dtls_cookie,
  ------------------
  |  Branch (1789:13): [True: 0, False: 0]
  ------------------
 1790|      0|                DTLS1_COOKIE_LENGTH,
  ------------------
  |  |   39|      0|#define DTLS1_COOKIE_LENGTH 255
  ------------------
 1791|      0|                &clienthello->dtls_cookie_len)) {
 1792|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1793|      0|            goto err;
 1794|      0|        }
 1795|       |        /*
 1796|       |         * If we require cookies and this ClientHello doesn't contain one,
 1797|       |         * just return since we do not want to allocate any memory yet.
 1798|       |         * So check cookie length...
 1799|       |         */
 1800|      0|        if (SSL_get_options(SSL_CONNECTION_GET_SSL(s)) & SSL_OP_COOKIE_EXCHANGE) {
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
                      if (SSL_get_options(SSL_CONNECTION_GET_SSL(s)) & SSL_OP_COOKIE_EXCHANGE) {
  ------------------
  |  |  382|      0|#define SSL_OP_COOKIE_EXCHANGE SSL_OP_BIT(13)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1800:13): [True: 0, False: 0]
  ------------------
 1801|      0|            if (clienthello->dtls_cookie_len == 0) {
  ------------------
  |  Branch (1801:17): [True: 0, False: 0]
  ------------------
 1802|      0|                OPENSSL_free(clienthello);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1803|      0|                return MSG_PROCESS_FINISHED_READING;
 1804|      0|            }
 1805|      0|        }
 1806|      0|    }
 1807|       |
 1808|  3.62k|    if (!PACKET_get_length_prefixed_2(pkt, &clienthello->ciphersuites)) {
  ------------------
  |  Branch (1808:9): [True: 0, False: 3.62k]
  ------------------
 1809|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1810|      0|        goto err;
 1811|      0|    }
 1812|       |
 1813|  3.62k|    if (!PACKET_get_length_prefixed_1(pkt, &compression)) {
  ------------------
  |  Branch (1813:9): [True: 0, False: 3.62k]
  ------------------
 1814|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1815|      0|        goto err;
 1816|      0|    }
 1817|       |
 1818|       |    /* Could be empty. */
 1819|  3.62k|    if (PACKET_remaining(pkt) == 0) {
  ------------------
  |  Branch (1819:9): [True: 0, False: 3.62k]
  ------------------
 1820|      0|        PACKET_null_init(&clienthello->extensions);
 1821|  3.62k|    } else {
 1822|  3.62k|        if (!PACKET_get_length_prefixed_2(pkt, &clienthello->extensions)
  ------------------
  |  Branch (1822:13): [True: 0, False: 3.62k]
  ------------------
 1823|  3.62k|            || PACKET_remaining(pkt) != 0) {
  ------------------
  |  Branch (1823:16): [True: 0, False: 3.62k]
  ------------------
 1824|      0|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1825|      0|            goto err;
 1826|      0|        }
 1827|  3.62k|    }
 1828|       |
 1829|  3.62k|    if (!PACKET_copy_all(&compression, clienthello->compressions,
  ------------------
  |  Branch (1829:9): [True: 0, False: 3.62k]
  ------------------
 1830|  3.62k|            MAX_COMPRESSIONS_SIZE,
  ------------------
  |  |  636|  3.62k|#define MAX_COMPRESSIONS_SIZE 255
  ------------------
 1831|  3.62k|            &clienthello->compressions_len)) {
 1832|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1833|      0|        goto err;
 1834|      0|    }
 1835|       |
 1836|       |    /* Preserve the raw extensions PACKET for later use */
 1837|  3.62k|    extensions = clienthello->extensions;
 1838|  3.62k|    if (!tls_collect_extensions(s, &extensions, SSL_EXT_CLIENT_HELLO,
  ------------------
  |  |  300|  3.62k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (1838:9): [True: 0, False: 3.62k]
  ------------------
 1839|  3.62k|            &clienthello->pre_proc_exts,
 1840|  3.62k|            &clienthello->pre_proc_exts_len, 1)) {
 1841|       |        /* SSLfatal already been called */
 1842|      0|        goto err;
 1843|      0|    }
 1844|  3.62k|    s->clienthello = clienthello;
 1845|       |
 1846|  3.62k|    return MSG_PROCESS_CONTINUE_PROCESSING;
 1847|       |
 1848|      0|err:
 1849|      0|    if (clienthello != NULL)
  ------------------
  |  Branch (1849:9): [True: 0, False: 0]
  ------------------
 1850|      0|        OPENSSL_free(clienthello->pre_proc_exts);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1851|      0|    OPENSSL_free(clienthello);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1852|      0|#ifndef OPENSSL_NO_ECH
 1853|      0|    s->clienthello = NULL;
 1854|      0|    OPENSSL_free(s->ext.ech.innerch);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1855|      0|    s->ext.ech.innerch = NULL;
 1856|      0|    s->ext.ech.innerch_len = 0;
 1857|      0|#endif
 1858|       |
 1859|      0|    return MSG_PROCESS_ERROR;
 1860|  3.62k|}
tls_handle_alpn:
 2392|  3.62k|{
 2393|  3.62k|    const unsigned char *selected = NULL;
 2394|  3.62k|    unsigned char selected_len = 0;
 2395|  3.62k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2396|       |
 2397|  3.62k|    if (sctx->ext.alpn_select_cb != NULL && s->s3.alpn_proposed != NULL) {
  ------------------
  |  Branch (2397:9): [True: 3.62k, False: 0]
  |  Branch (2397:45): [True: 3.62k, False: 0]
  ------------------
 2398|  3.62k|        int r = sctx->ext.alpn_select_cb(SSL_CONNECTION_GET_USER_SSL(s),
  ------------------
  |  |   28|  3.62k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 2399|  3.62k|            &selected, &selected_len,
 2400|  3.62k|            s->s3.alpn_proposed,
 2401|  3.62k|            (unsigned int)s->s3.alpn_proposed_len,
 2402|  3.62k|            sctx->ext.alpn_select_cb_arg);
 2403|       |
 2404|  3.62k|        if (r == SSL_TLSEXT_ERR_OK) {
  ------------------
  |  |  350|  3.62k|#define SSL_TLSEXT_ERR_OK 0
  ------------------
  |  Branch (2404:13): [True: 3.62k, False: 2]
  ------------------
 2405|  3.62k|            OPENSSL_free(s->s3.alpn_selected);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2406|  3.62k|            s->s3.alpn_selected = OPENSSL_memdup(selected, selected_len);
  ------------------
  |  |  134|  3.62k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2407|  3.62k|            if (s->s3.alpn_selected == NULL) {
  ------------------
  |  Branch (2407:17): [True: 0, False: 3.62k]
  ------------------
 2408|      0|                s->s3.alpn_selected_len = 0;
 2409|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2410|      0|                return 0;
 2411|      0|            }
 2412|  3.62k|            s->s3.alpn_selected_len = selected_len;
 2413|  3.62k|#ifndef OPENSSL_NO_NEXTPROTONEG
 2414|       |            /* ALPN takes precedence over NPN. */
 2415|  3.62k|            s->s3.npn_seen = 0;
 2416|  3.62k|#endif
 2417|       |
 2418|       |            /* Check ALPN is consistent with session */
 2419|  3.62k|            if (s->session->ext.alpn_selected == NULL
  ------------------
  |  Branch (2419:17): [True: 3.62k, False: 0]
  ------------------
 2420|      0|                || selected_len != s->session->ext.alpn_selected_len
  ------------------
  |  Branch (2420:20): [True: 0, False: 0]
  ------------------
 2421|      0|                || memcmp(selected, s->session->ext.alpn_selected,
  ------------------
  |  Branch (2421:20): [True: 0, False: 0]
  ------------------
 2422|      0|                       selected_len)
 2423|  3.62k|                    != 0) {
 2424|       |                /* Not consistent so can't be used for early_data */
 2425|  3.62k|                s->ext.early_data_ok = 0;
 2426|       |
 2427|  3.62k|                if (!s->hit) {
  ------------------
  |  Branch (2427:21): [True: 3.62k, False: 0]
  ------------------
 2428|       |                    /*
 2429|       |                     * This is a new session and so alpn_selected should have
 2430|       |                     * been initialised to NULL. We should update it with the
 2431|       |                     * selected ALPN.
 2432|       |                     */
 2433|  3.62k|                    if (!ossl_assert(s->session->ext.alpn_selected == NULL)) {
  ------------------
  |  |   52|  3.62k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  3.62k|    __FILE__, __LINE__)
  ------------------
  |  Branch (2433:25): [True: 0, False: 3.62k]
  ------------------
 2434|      0|                        SSLfatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2435|      0|                            ERR_R_INTERNAL_ERROR);
 2436|      0|                        return 0;
 2437|      0|                    }
 2438|  3.62k|                    s->session->ext.alpn_selected = OPENSSL_memdup(selected,
  ------------------
  |  |  134|  3.62k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2439|  3.62k|                        selected_len);
 2440|  3.62k|                    if (s->session->ext.alpn_selected == NULL) {
  ------------------
  |  Branch (2440:25): [True: 0, False: 3.62k]
  ------------------
 2441|      0|                        SSLfatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2442|      0|                            ERR_R_INTERNAL_ERROR);
 2443|      0|                        return 0;
 2444|      0|                    }
 2445|  3.62k|                    s->session->ext.alpn_selected_len = selected_len;
 2446|  3.62k|                }
 2447|  3.62k|            }
 2448|       |
 2449|  3.62k|            return 1;
 2450|  3.62k|        } else if (r != SSL_TLSEXT_ERR_NOACK) {
  ------------------
  |  |  353|      2|#define SSL_TLSEXT_ERR_NOACK 3
  ------------------
  |  Branch (2450:20): [True: 0, False: 2]
  ------------------
 2451|      0|            SSLfatal(s, SSL_AD_NO_APPLICATION_PROTOCOL,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2452|      0|                SSL_R_NO_APPLICATION_PROTOCOL);
 2453|      0|            return 0;
 2454|      0|        }
 2455|       |        /*
 2456|       |         * If r == SSL_TLSEXT_ERR_NOACK then behave as if no callback was
 2457|       |         * present.
 2458|       |         */
 2459|  3.62k|    }
 2460|       |
 2461|       |    /* Check ALPN is consistent with session */
 2462|      2|    if (s->session->ext.alpn_selected != NULL) {
  ------------------
  |  Branch (2462:9): [True: 0, False: 2]
  ------------------
 2463|       |        /* Not consistent so can't be used for early_data */
 2464|      0|        s->ext.early_data_ok = 0;
 2465|      0|    }
 2466|       |
 2467|      2|    return 1;
 2468|  3.62k|}
tls_post_process_client_hello:
 2471|  3.62k|{
 2472|  3.62k|    const SSL_CIPHER *cipher;
 2473|  3.62k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2474|  3.62k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  3.62k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 2475|       |
 2476|  3.62k|    if (wst == WORK_MORE_A) {
  ------------------
  |  Branch (2476:9): [True: 3.62k, False: 0]
  ------------------
 2477|  3.62k|        int rv = tls_early_post_process_client_hello(s);
 2478|       |
 2479|  3.62k|        if (rv == 0) {
  ------------------
  |  Branch (2479:13): [True: 0, False: 3.62k]
  ------------------
 2480|       |            /* SSLfatal() was already called */
 2481|      0|            goto err;
 2482|      0|        }
 2483|  3.62k|        if (rv < 0)
  ------------------
  |  Branch (2483:13): [True: 0, False: 3.62k]
  ------------------
 2484|      0|            return WORK_MORE_A;
 2485|  3.62k|        wst = WORK_MORE_B;
 2486|  3.62k|    }
 2487|  3.62k|    if (wst == WORK_MORE_B) {
  ------------------
  |  Branch (2487:9): [True: 3.62k, False: 0]
  ------------------
 2488|  3.62k|        if (!s->hit || SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      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 (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      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 (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2488:13): [True: 3.62k, False: 0]
  ------------------
 2489|       |            /* Let cert callback update server certificates if required */
 2490|  3.62k|            if (!s->hit && s->cert->cert_cb != NULL) {
  ------------------
  |  Branch (2490:17): [True: 3.62k, False: 0]
  |  Branch (2490:28): [True: 0, False: 3.62k]
  ------------------
 2491|      0|                int rv = s->cert->cert_cb(ussl, s->cert->cert_cb_arg);
 2492|       |
 2493|      0|                if (rv == 0) {
  ------------------
  |  Branch (2493:21): [True: 0, False: 0]
  ------------------
 2494|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_CERT_CB_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2495|      0|                    goto err;
 2496|      0|                }
 2497|      0|                if (rv < 0) {
  ------------------
  |  Branch (2497:21): [True: 0, False: 0]
  ------------------
 2498|      0|                    s->rwstate = SSL_X509_LOOKUP;
  ------------------
  |  |  958|      0|#define SSL_X509_LOOKUP 4
  ------------------
 2499|      0|                    return WORK_MORE_B;
 2500|      0|                }
 2501|      0|                s->rwstate = SSL_NOTHING;
  ------------------
  |  |  955|      0|#define SSL_NOTHING 1
  ------------------
 2502|      0|            }
 2503|       |
 2504|       |            /* In TLSv1.3 we selected the ciphersuite before resumption */
 2505|  3.62k|            if (!SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 2506|      0|                cipher = ssl3_choose_cipher(s, s->peer_ciphers,
 2507|      0|                    SSL_get_ciphers(ssl));
 2508|       |
 2509|      0|                if (cipher == NULL) {
  ------------------
  |  Branch (2509:21): [True: 0, False: 0]
  ------------------
 2510|      0|                    SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2511|      0|                        SSL_R_NO_SHARED_CIPHER);
 2512|      0|                    goto err;
 2513|      0|                }
 2514|      0|                s->s3.tmp.new_cipher = cipher;
 2515|      0|            }
 2516|  3.62k|            if (!s->hit) {
  ------------------
  |  Branch (2516:17): [True: 3.62k, False: 0]
  ------------------
 2517|  3.62k|                if (!tls_choose_sigalg(s, 1)) {
  ------------------
  |  Branch (2517:21): [True: 0, False: 3.62k]
  ------------------
 2518|       |                    /* SSLfatal already called */
 2519|      0|                    goto err;
 2520|      0|                }
 2521|       |                /* check whether we should disable session resumption */
 2522|  3.62k|                if (s->not_resumable_session_cb != NULL)
  ------------------
  |  Branch (2522:21): [True: 0, False: 3.62k]
  ------------------
 2523|      0|                    s->session->not_resumable = s->not_resumable_session_cb(ussl,
 2524|      0|                        ((s->s3.tmp.new_cipher->algorithm_mkey
 2525|      0|                             & (SSL_kDHE | SSL_kECDHE))
  ------------------
  |  |   87|      0|#define SSL_kDHE 0x00000002U
  ------------------
                                           & (SSL_kDHE | SSL_kECDHE))
  ------------------
  |  |   89|      0|#define SSL_kECDHE 0x00000004U
  ------------------
 2526|      0|                            != 0));
 2527|  3.62k|                if (s->session->not_resumable)
  ------------------
  |  Branch (2527:21): [True: 0, False: 3.62k]
  ------------------
 2528|       |                    /* do not send a session ticket */
 2529|      0|                    s->ext.ticket_expected = 0;
 2530|  3.62k|            }
 2531|  3.62k|        } else {
 2532|       |            /* Session-id reuse */
 2533|      0|            s->s3.tmp.new_cipher = s->session->cipher;
 2534|      0|        }
 2535|       |
 2536|       |        /*-
 2537|       |         * we now have the following setup.
 2538|       |         * client_random
 2539|       |         * cipher_list          - our preferred list of ciphers
 2540|       |         * ciphers              - the client's preferred list of ciphers
 2541|       |         * compression          - basically ignored right now
 2542|       |         * ssl version is set   - sslv3
 2543|       |         * s->session           - The ssl session has been setup.
 2544|       |         * s->hit               - session reuse flag
 2545|       |         * s->s3.tmp.new_cipher - the new cipher to use.
 2546|       |         */
 2547|       |
 2548|       |        /*
 2549|       |         * Call status_request callback if needed. Has to be done after the
 2550|       |         * certificate callbacks etc above.
 2551|       |         */
 2552|  3.62k|        if (!tls_handle_status_request(s)) {
  ------------------
  |  Branch (2552:13): [True: 0, False: 3.62k]
  ------------------
 2553|       |            /* SSLfatal() already called */
 2554|      0|            goto err;
 2555|      0|        }
 2556|       |        /*
 2557|       |         * Call alpn_select callback if needed.  Has to be done after SNI and
 2558|       |         * cipher negotiation (HTTP/2 restricts permitted ciphers). In TLSv1.3
 2559|       |         * we already did this because cipher negotiation happens earlier, and
 2560|       |         * we must handle ALPN before we decide whether to accept early_data.
 2561|       |         */
 2562|  3.62k|        if (!SSL_CONNECTION_IS_TLS13(s) && !tls_handle_alpn(s)) {
  ------------------
  |  |  273|  7.25k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2562:44): [True: 0, False: 0]
  ------------------
 2563|       |            /* SSLfatal() already called */
 2564|      0|            goto err;
 2565|      0|        }
 2566|       |
 2567|  3.62k|        wst = WORK_MORE_C;
 2568|  3.62k|    }
 2569|  3.62k|#ifndef OPENSSL_NO_SRP
 2570|  3.62k|    if (wst == WORK_MORE_C) {
  ------------------
  |  Branch (2570:9): [True: 3.62k, False: 0]
  ------------------
 2571|  3.62k|        int ret;
 2572|  3.62k|        if ((ret = ssl_check_srp_ext_ClientHello(s)) == 0) {
  ------------------
  |  Branch (2572:13): [True: 0, False: 3.62k]
  ------------------
 2573|       |            /*
 2574|       |             * callback indicates further work to be done
 2575|       |             */
 2576|      0|            s->rwstate = SSL_X509_LOOKUP;
  ------------------
  |  |  958|      0|#define SSL_X509_LOOKUP 4
  ------------------
 2577|      0|            return WORK_MORE_C;
 2578|      0|        }
 2579|  3.62k|        if (ret < 0) {
  ------------------
  |  Branch (2579:13): [True: 0, False: 3.62k]
  ------------------
 2580|       |            /* SSLfatal() already called */
 2581|      0|            goto err;
 2582|      0|        }
 2583|  3.62k|    }
 2584|  3.62k|#endif
 2585|       |
 2586|  3.62k|    return WORK_FINISHED_STOP;
 2587|      0|err:
 2588|      0|    return WORK_ERROR;
 2589|  3.62k|}
tls_construct_server_hello:
 2592|  3.62k|{
 2593|  3.62k|    int compm;
 2594|  3.62k|    size_t sl, len;
 2595|  3.62k|    int version;
 2596|  3.62k|    unsigned char *session_id;
 2597|  3.62k|    int usetls13 = SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|  7.25k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 2598|      0|        || s->hello_retry_request == SSL_HRR_PENDING;
  ------------------
  |  Branch (2598:12): [True: 0, False: 0]
  ------------------
 2599|       |
 2600|  3.62k|    version = usetls13 ? TLS1_2_VERSION : s->version;
  ------------------
  |  |   26|  3.62k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (2600:15): [True: 3.62k, False: 0]
  ------------------
 2601|  3.62k|    if (!WPACKET_put_bytes_u16(pkt, version)
  ------------------
  |  |  911|  7.25k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2601:9): [True: 0, False: 3.62k]
  ------------------
 2602|       |        /*
 2603|       |         * Random stuff. Filling of the server_random takes place in
 2604|       |         * tls_process_client_hello()
 2605|       |         */
 2606|  3.62k|        || !WPACKET_memcpy(pkt,
  ------------------
  |  Branch (2606:12): [True: 0, False: 3.62k]
  ------------------
 2607|  3.62k|            s->hello_retry_request == SSL_HRR_PENDING
  ------------------
  |  Branch (2607:13): [True: 0, False: 3.62k]
  ------------------
 2608|  3.62k|                ? hrrrandom
 2609|  3.62k|                : s->s3.server_random,
 2610|  3.62k|            SSL3_RANDOM_SIZE)) {
  ------------------
  |  |  137|  3.62k|#define SSL3_RANDOM_SIZE 32
  ------------------
 2611|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2612|      0|        return CON_FUNC_ERROR;
 2613|      0|    }
 2614|       |
 2615|       |    /*-
 2616|       |     * There are several cases for the session ID to send
 2617|       |     * back in the server hello:
 2618|       |     * - For session reuse from the session cache,
 2619|       |     *   we send back the old session ID.
 2620|       |     * - If stateless session reuse (using a session ticket)
 2621|       |     *   is successful, we send back the client's "session ID"
 2622|       |     *   (which doesn't actually identify the session).
 2623|       |     * - If it is a new session, we send back the new
 2624|       |     *   session ID.
 2625|       |     * - However, if we want the new session to be single-use,
 2626|       |     *   we send back a 0-length session ID.
 2627|       |     * - In TLSv1.3 we echo back the session id sent to us by the client
 2628|       |     *   regardless
 2629|       |     * s->hit is non-zero in either case of session reuse,
 2630|       |     * so the following won't overwrite an ID that we're supposed
 2631|       |     * to send back.
 2632|       |     */
 2633|  3.62k|    if (!(SSL_CONNECTION_GET_CTX(s)->session_cache_mode & SSL_SESS_CACHE_SERVER)
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
                  if (!(SSL_CONNECTION_GET_CTX(s)->session_cache_mode & SSL_SESS_CACHE_SERVER)
  ------------------
  |  |  735|  3.62k|#define SSL_SESS_CACHE_SERVER 0x0002
  ------------------
  |  Branch (2633:9): [True: 0, False: 3.62k]
  ------------------
 2634|      0|        && !s->hit)
  ------------------
  |  Branch (2634:12): [True: 0, False: 0]
  ------------------
 2635|      0|        s->session->session_id_length = 0;
 2636|       |
 2637|  3.62k|    if (usetls13) {
  ------------------
  |  Branch (2637:9): [True: 3.62k, False: 0]
  ------------------
 2638|  3.62k|        sl = s->tmp_session_id_len;
 2639|  3.62k|        session_id = s->tmp_session_id;
 2640|  3.62k|    } else {
 2641|      0|        sl = s->session->session_id_length;
 2642|      0|        session_id = s->session->session_id;
 2643|      0|    }
 2644|       |
 2645|  3.62k|    if (sl > sizeof(s->session->session_id)) {
  ------------------
  |  Branch (2645:9): [True: 0, False: 3.62k]
  ------------------
 2646|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2647|      0|        return CON_FUNC_ERROR;
 2648|      0|    }
 2649|       |
 2650|       |    /* set up the compression method */
 2651|       |#ifdef OPENSSL_NO_COMP
 2652|       |    compm = 0;
 2653|       |#else
 2654|  3.62k|    if (usetls13 || s->s3.tmp.new_compression == NULL)
  ------------------
  |  Branch (2654:9): [True: 3.62k, False: 0]
  |  Branch (2654:21): [True: 0, False: 0]
  ------------------
 2655|  3.62k|        compm = 0;
 2656|      0|    else
 2657|      0|        compm = s->s3.tmp.new_compression->id;
 2658|  3.62k|#endif
 2659|       |
 2660|  3.62k|    if (!WPACKET_sub_memcpy_u8(pkt, session_id, sl)
  ------------------
  |  |  938|  7.25k|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (2660:9): [True: 0, False: 3.62k]
  ------------------
 2661|  3.62k|        || !SSL_CONNECTION_GET_SSL(s)->method->put_cipher_by_char(s->s3.tmp.new_cipher,
  ------------------
  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  |  Branch (2661:12): [True: 0, False: 3.62k]
  ------------------
 2662|  3.62k|            pkt, &len)
 2663|  3.62k|        || !WPACKET_put_bytes_u8(pkt, compm)) {
  ------------------
  |  |  909|  3.62k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (2663:12): [True: 0, False: 3.62k]
  ------------------
 2664|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2665|      0|        return CON_FUNC_ERROR;
 2666|      0|    }
 2667|       |
 2668|  3.62k|    if (!tls_construct_extensions(s, pkt,
  ------------------
  |  Branch (2668:9): [True: 0, False: 3.62k]
  ------------------
 2669|  3.62k|            s->hello_retry_request == SSL_HRR_PENDING
  ------------------
  |  Branch (2669:13): [True: 0, False: 3.62k]
  ------------------
 2670|  3.62k|                ? SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST
  ------------------
  |  |  305|      0|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
 2671|  3.62k|                : (SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 2672|  3.62k|                          ? SSL_EXT_TLS1_3_SERVER_HELLO
  ------------------
  |  |  303|  3.62k|#define SSL_EXT_TLS1_3_SERVER_HELLO 0x00200
  ------------------
 2673|  3.62k|                          : SSL_EXT_TLS1_2_SERVER_HELLO),
  ------------------
  |  |  302|      0|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
 2674|  3.62k|            NULL, 0)) {
 2675|       |        /* SSLfatal() already called */
 2676|      0|        return CON_FUNC_ERROR;
 2677|      0|    }
 2678|       |
 2679|  3.62k|    if (s->hello_retry_request == SSL_HRR_PENDING) {
  ------------------
  |  Branch (2679:9): [True: 0, False: 3.62k]
  ------------------
 2680|       |        /* Ditch the session. We'll create a new one next time around */
 2681|      0|        SSL_SESSION_free(s->session);
 2682|      0|        s->session = NULL;
 2683|      0|        s->hit = 0;
 2684|       |
 2685|       |        /*
 2686|       |         * Re-initialise the Transcript Hash. We're going to prepopulate it with
 2687|       |         * a synthetic message_hash in place of ClientHello1.
 2688|       |         */
 2689|      0|#ifndef OPENSSL_NO_ECH
 2690|       |        /*
 2691|       |         * if we're sending 2nd SH after HRR and we did ECH
 2692|       |         * then we want to inject the hash of the inner CH1
 2693|       |         * and not the outer (which is the default)
 2694|       |         */
 2695|      0|        OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2696|      0|        {
 2697|      0|            BIO_printf(trc_out, "Checking success (%d)/innerCH (%p)\n",
 2698|      0|                s->ext.ech.success, (void *)s->ext.ech.innerch);
 2699|      0|        }
 2700|      0|        OSSL_TRACE_END(TLS);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2701|      0|        if ((s->ext.ech.backend == 1 || s->ext.ech.success == 1)
  ------------------
  |  Branch (2701:14): [True: 0, False: 0]
  |  Branch (2701:41): [True: 0, False: 0]
  ------------------
 2702|      0|            && s->ext.ech.innerch != NULL) {
  ------------------
  |  Branch (2702:16): [True: 0, False: 0]
  ------------------
 2703|       |            /* do pre-existing HRR stuff */
 2704|      0|            unsigned char hashval[EVP_MAX_MD_SIZE];
 2705|      0|            unsigned int hashlen;
 2706|      0|            EVP_MD_CTX *ctx = EVP_MD_CTX_new();
 2707|      0|            const EVP_MD *md = NULL;
 2708|       |
 2709|      0|            OSSL_TRACE(TLS, "Adding in digest of ClientHello\n");
  ------------------
  |  |  288|      0|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
 2710|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 2711|      0|            ossl_ech_pbuf("innerch", s->ext.ech.innerch,
 2712|      0|                s->ext.ech.innerch_len);
 2713|      0|#endif
 2714|      0|            if (ctx == NULL) {
  ------------------
  |  Branch (2714:17): [True: 0, False: 0]
  ------------------
 2715|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2716|      0|                return CON_FUNC_ERROR;
 2717|      0|            }
 2718|      0|            md = ssl_handshake_md(s);
 2719|      0|            if (md == NULL) {
  ------------------
  |  Branch (2719:17): [True: 0, False: 0]
  ------------------
 2720|      0|                EVP_MD_CTX_free(ctx);
 2721|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2722|      0|                return CON_FUNC_ERROR;
 2723|      0|            }
 2724|      0|            if (EVP_DigestInit_ex(ctx, md, NULL) <= 0
  ------------------
  |  Branch (2724:17): [True: 0, False: 0]
  ------------------
 2725|      0|                || EVP_DigestUpdate(ctx, s->ext.ech.innerch,
  ------------------
  |  Branch (2725:20): [True: 0, False: 0]
  ------------------
 2726|      0|                       s->ext.ech.innerch_len)
 2727|      0|                    <= 0
 2728|      0|                || EVP_DigestFinal_ex(ctx, hashval, &hashlen) <= 0) {
  ------------------
  |  Branch (2728:20): [True: 0, False: 0]
  ------------------
 2729|      0|                EVP_MD_CTX_free(ctx);
 2730|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2731|      0|                return CON_FUNC_ERROR;
 2732|      0|            }
 2733|      0|#ifdef OSSL_ECH_SUPERVERBOSE
 2734|      0|            ossl_ech_pbuf("digested CH", hashval, hashlen);
 2735|      0|#endif
 2736|      0|            EVP_MD_CTX_free(ctx);
 2737|      0|            if (ossl_ech_reset_hs_buffer(s, NULL, 0) != 1) {
  ------------------
  |  Branch (2737:17): [True: 0, False: 0]
  ------------------
 2738|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2739|      0|                return CON_FUNC_ERROR;
 2740|      0|            }
 2741|      0|            if (!create_synthetic_message_hash(s, hashval, hashlen, NULL, 0)) {
  ------------------
  |  Branch (2741:17): [True: 0, False: 0]
  ------------------
 2742|       |                /* SSLfatal() already called */
 2743|      0|                return CON_FUNC_ERROR;
 2744|      0|            }
 2745|      0|        } else {
 2746|      0|            if (!create_synthetic_message_hash(s, NULL, 0, NULL, 0))
  ------------------
  |  Branch (2746:17): [True: 0, False: 0]
  ------------------
 2747|      0|                return CON_FUNC_ERROR; /* SSLfatal() already called */
 2748|      0|        }
 2749|       |#else
 2750|       |        if (!create_synthetic_message_hash(s, NULL, 0, NULL, 0))
 2751|       |            /* SSLfatal() already called */
 2752|       |            return CON_FUNC_ERROR;
 2753|       |#endif /* OPENSSL_NO_ECH */
 2754|  3.62k|    } else if (!(s->verify_mode & SSL_VERIFY_PEER)
  ------------------
  |  | 1201|  3.62k|#define SSL_VERIFY_PEER 0x01
  ------------------
  |  Branch (2754:16): [True: 3.62k, False: 0]
  ------------------
 2755|  3.62k|        && !ssl3_digest_cached_records(s, 0)) {
  ------------------
  |  Branch (2755:12): [True: 0, False: 3.62k]
  ------------------
 2756|      0|        /* SSLfatal() already called */;
 2757|      0|        return CON_FUNC_ERROR;
 2758|      0|    }
 2759|       |
 2760|  3.62k|#ifndef OPENSSL_NO_ECH
 2761|       |    /*
 2762|       |     * Calculate the ECH-accept server random to indicate that
 2763|       |     * we're accepting ECH, if that's the case
 2764|       |     */
 2765|  3.62k|    if (s->ext.ech.attempted_type == TLSEXT_TYPE_ech
  ------------------
  |  |  174|  7.25k|#define TLSEXT_TYPE_ech 0xfe0d
  ------------------
  |  Branch (2765:9): [True: 0, False: 3.62k]
  ------------------
 2766|      0|        && (s->ext.ech.backend == 1
  ------------------
  |  Branch (2766:13): [True: 0, False: 0]
  ------------------
 2767|      0|            || (s->ext.ech.es != NULL && s->ext.ech.success == 1))) {
  ------------------
  |  Branch (2767:17): [True: 0, False: 0]
  |  Branch (2767:42): [True: 0, False: 0]
  ------------------
 2768|      0|        unsigned char acbuf[8];
 2769|      0|        unsigned char *shbuf = NULL;
 2770|      0|        size_t shlen = 0;
 2771|      0|        size_t shoffset = 0;
 2772|      0|        int hrr = 0;
 2773|       |
 2774|      0|        if (s->hello_retry_request == SSL_HRR_PENDING)
  ------------------
  |  Branch (2774:13): [True: 0, False: 0]
  ------------------
 2775|      0|            hrr = 1;
 2776|      0|        memset(acbuf, 0, 8);
 2777|      0|        if (WPACKET_get_total_written(pkt, &shlen) != 1) {
  ------------------
  |  Branch (2777:13): [True: 0, False: 0]
  ------------------
 2778|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2779|      0|            return CON_FUNC_ERROR;
 2780|      0|        }
 2781|      0|        shbuf = WPACKET_get_curr(pkt) - shlen;
 2782|       |        /* we need to fixup SH length here */
 2783|      0|        shbuf[1] = ((shlen - 4)) >> 16 & 0xff;
 2784|      0|        shbuf[2] = ((shlen - 4)) >> 8 & 0xff;
 2785|      0|        shbuf[3] = (shlen - 4) & 0xff;
 2786|      0|        if (ossl_ech_intbuf_add(s, shbuf, shlen, hrr) != 1) {
  ------------------
  |  Branch (2786:13): [True: 0, False: 0]
  ------------------
 2787|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2788|      0|            return CON_FUNC_ERROR;
 2789|      0|        }
 2790|      0|        if (ossl_ech_calc_confirm(s, hrr, acbuf, shlen) != 1) {
  ------------------
  |  Branch (2790:13): [True: 0, False: 0]
  ------------------
 2791|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2792|      0|            return CON_FUNC_ERROR;
 2793|      0|        }
 2794|      0|        memcpy(s->s3.server_random + SSL3_RANDOM_SIZE - 8, acbuf, 8);
  ------------------
  |  |  137|      0|#define SSL3_RANDOM_SIZE 32
  ------------------
 2795|      0|        if (hrr == 0) {
  ------------------
  |  Branch (2795:13): [True: 0, False: 0]
  ------------------
 2796|       |            /* confirm value hacked into SH.random rightmost octets */
 2797|      0|            shoffset = SSL3_HM_HEADER_LENGTH /* 4 */
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 2798|      0|                + CLIENT_VERSION_LEN /* 2 */
  ------------------
  |  |   61|      0|#define CLIENT_VERSION_LEN 2
  ------------------
 2799|      0|                + SSL3_RANDOM_SIZE /* 32 */
  ------------------
  |  |  137|      0|#define SSL3_RANDOM_SIZE 32
  ------------------
 2800|      0|                - 8;
 2801|      0|            memcpy(shbuf + shoffset, acbuf, 8);
 2802|      0|        } else {
 2803|       |            /*
 2804|       |             * confirm value is in extension in HRR case as the SH.random
 2805|       |             * is already hacked to be a specific value in a HRR
 2806|       |             */
 2807|      0|            memcpy(WPACKET_get_curr(pkt) - 8, acbuf, 8);
 2808|      0|        }
 2809|      0|    }
 2810|       |    /* call ECH callback, if appropriate */
 2811|  3.62k|    if (s->ext.ech.attempted == 1 && s->ext.ech.cb != NULL
  ------------------
  |  Branch (2811:9): [True: 0, False: 3.62k]
  |  Branch (2811:38): [True: 0, False: 0]
  ------------------
 2812|      0|        && s->hello_retry_request != SSL_HRR_PENDING) {
  ------------------
  |  Branch (2812:12): [True: 0, False: 0]
  ------------------
 2813|      0|        char pstr[OSSL_ECH_PBUF_SIZE + 1];
 2814|      0|        BIO *biom = BIO_new(BIO_s_mem());
 2815|      0|        unsigned int cbrv = 0;
 2816|       |
 2817|      0|        if (biom == NULL) {
  ------------------
  |  Branch (2817:13): [True: 0, False: 0]
  ------------------
 2818|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2819|      0|            return CON_FUNC_ERROR;
 2820|      0|        }
 2821|      0|        memset(pstr, 0, OSSL_ECH_PBUF_SIZE + 1);
  ------------------
  |  |   53|      0|#define OSSL_ECH_PBUF_SIZE 8 * 1024
  ------------------
 2822|      0|        ossl_ech_status_print(biom, s, OSSL_ECHSTORE_ALL);
  ------------------
  |  |   65|      0|#define OSSL_ECHSTORE_ALL -2
  ------------------
 2823|      0|        BIO_read(biom, pstr, OSSL_ECH_PBUF_SIZE);
  ------------------
  |  |   53|      0|#define OSSL_ECH_PBUF_SIZE 8 * 1024
  ------------------
 2824|      0|        cbrv = s->ext.ech.cb(&s->ssl, pstr);
 2825|      0|        BIO_free(biom);
 2826|      0|        if (cbrv != 1) {
  ------------------
  |  Branch (2826:13): [True: 0, False: 0]
  ------------------
 2827|      0|            OSSL_TRACE(TLS, "Error from tls_construct_server_hello/ech_cb\n");
  ------------------
  |  |  288|      0|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  283|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
 2828|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2829|      0|            return CON_FUNC_ERROR;
 2830|      0|        }
 2831|      0|    }
 2832|  3.62k|#endif /* OPENSSL_NO_ECH */
 2833|  3.62k|    return CON_FUNC_SUCCESS;
 2834|  3.62k|}
tls_construct_server_certificate:
 4163|  3.62k|{
 4164|  3.62k|    CERT_PKEY *cpk = s->s3.tmp.cert;
 4165|       |
 4166|  3.62k|    if (cpk == NULL) {
  ------------------
  |  Branch (4166:9): [True: 0, False: 3.62k]
  ------------------
 4167|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4168|      0|        return CON_FUNC_ERROR;
 4169|      0|    }
 4170|       |
 4171|       |    /*
 4172|       |     * In TLSv1.3 the certificate chain is always preceded by a 0 length context
 4173|       |     * for the server Certificate message
 4174|       |     */
 4175|  3.62k|    if (SSL_CONNECTION_IS_TLS13(s) && !WPACKET_put_bytes_u8(pkt, 0)) {
  ------------------
  |  |  273|  7.25k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
                  if (SSL_CONNECTION_IS_TLS13(s) && !WPACKET_put_bytes_u8(pkt, 0)) {
  ------------------
  |  |  909|  3.62k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (4175:39): [True: 0, False: 3.62k]
  ------------------
 4176|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4177|      0|        return CON_FUNC_ERROR;
 4178|      0|    }
 4179|  3.62k|    switch (s->ext.server_cert_type) {
 4180|      0|    case TLSEXT_cert_type_rpk:
  ------------------
  |  |  250|      0|#define TLSEXT_cert_type_rpk 2
  ------------------
  |  Branch (4180:5): [True: 0, False: 3.62k]
  ------------------
 4181|      0|        if (!tls_output_rpk(s, pkt, cpk)) {
  ------------------
  |  Branch (4181:13): [True: 0, False: 0]
  ------------------
 4182|       |            /* SSLfatal() already called */
 4183|      0|            return 0;
 4184|      0|        }
 4185|      0|        break;
 4186|  3.62k|    case TLSEXT_cert_type_x509:
  ------------------
  |  |  248|  3.62k|#define TLSEXT_cert_type_x509 0
  ------------------
  |  Branch (4186:5): [True: 3.62k, False: 0]
  ------------------
 4187|  3.62k|        if (!ssl3_output_cert_chain(s, pkt, cpk, 0)) {
  ------------------
  |  Branch (4187:13): [True: 0, False: 3.62k]
  ------------------
 4188|       |            /* SSLfatal() already called */
 4189|      0|            return 0;
 4190|      0|        }
 4191|  3.62k|        break;
 4192|  3.62k|    default:
  ------------------
  |  Branch (4192:5): [True: 0, False: 3.62k]
  ------------------
 4193|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4194|      0|        return 0;
 4195|  3.62k|    }
 4196|       |
 4197|  3.62k|    return CON_FUNC_SUCCESS;
 4198|  3.62k|}
tls_construct_new_session_ticket:
 4514|  7.16k|{
 4515|  7.16k|    SSL_CTX *tctx = s->session_ctx;
 4516|  7.16k|    unsigned char tick_nonce[TICKET_NONCE_SIZE];
 4517|  7.16k|    union {
 4518|  7.16k|        unsigned char age_add_c[sizeof(uint32_t)];
 4519|  7.16k|        uint32_t age_add;
 4520|  7.16k|    } age_add_u;
 4521|  7.16k|    CON_FUNC_RETURN ret = CON_FUNC_ERROR;
 4522|       |
 4523|  7.16k|    age_add_u.age_add = 0;
 4524|       |
 4525|  7.16k|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  7.16k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.3k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.16k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  274|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.3k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  275|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.16k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.16k, False: 0]
  |  |  ------------------
  ------------------
 4526|  7.16k|        size_t i, hashlen;
 4527|  7.16k|        uint64_t nonce;
 4528|       |        /* ASCII: "resumption", in hex for EBCDIC compatibility */
 4529|  7.16k|        static const unsigned char nonce_label[] = { 0x72, 0x65, 0x73, 0x75, 0x6D,
 4530|  7.16k|            0x70, 0x74, 0x69, 0x6F, 0x6E };
 4531|  7.16k|        const EVP_MD *md = ssl_handshake_md(s);
 4532|  7.16k|        int hashleni = EVP_MD_get_size(md);
 4533|       |
 4534|       |        /* Ensure cast to size_t is safe */
 4535|  7.16k|        if (!ossl_assert(hashleni > 0)) {
  ------------------
  |  |   52|  7.16k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  7.16k|    __FILE__, __LINE__)
  ------------------
  |  Branch (4535:13): [True: 0, False: 7.16k]
  ------------------
 4536|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4537|      0|            goto err;
 4538|      0|        }
 4539|  7.16k|        hashlen = (size_t)hashleni;
 4540|       |
 4541|       |        /*
 4542|       |         * If we already sent one NewSessionTicket, or we resumed then
 4543|       |         * s->session may already be in a cache and so we must not modify it.
 4544|       |         * Instead we need to take a copy of it and modify that.
 4545|       |         */
 4546|  7.16k|        if (s->sent_tickets != 0 || s->hit) {
  ------------------
  |  Branch (4546:13): [True: 3.58k, False: 3.58k]
  |  Branch (4546:37): [True: 0, False: 3.58k]
  ------------------
 4547|  3.58k|            SSL_SESSION *new_sess = ssl_session_dup(s->session, 0);
 4548|       |
 4549|  3.58k|            if (new_sess == NULL) {
  ------------------
  |  Branch (4549:17): [True: 0, False: 3.58k]
  ------------------
 4550|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_SSL_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4551|      0|                goto err;
 4552|      0|            }
 4553|       |
 4554|  3.58k|            SSL_SESSION_free(s->session);
 4555|  3.58k|            s->session = new_sess;
 4556|  3.58k|        }
 4557|       |
 4558|  7.16k|        if (!ssl_generate_session_id(s, s->session)) {
  ------------------
  |  Branch (4558:13): [True: 0, False: 7.16k]
  ------------------
 4559|       |            /* SSLfatal() already called */
 4560|      0|            goto err;
 4561|      0|        }
 4562|  7.16k|        if (RAND_bytes_ex(SSL_CONNECTION_GET_CTX(s)->libctx,
  ------------------
  |  |   26|  7.16k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  |  Branch (4562:13): [True: 0, False: 7.16k]
  ------------------
 4563|  7.16k|                age_add_u.age_add_c, sizeof(age_add_u), 0)
 4564|  7.16k|            <= 0) {
 4565|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4566|      0|            goto err;
 4567|      0|        }
 4568|  7.16k|        s->session->ext.tick_age_add = age_add_u.age_add;
 4569|       |
 4570|  7.16k|        nonce = s->next_ticket_nonce;
 4571|  64.5k|        for (i = TICKET_NONCE_SIZE; i > 0; i--) {
  ------------------
  |  |   37|  7.16k|#define TICKET_NONCE_SIZE 8
  ------------------
  |  Branch (4571:37): [True: 57.3k, False: 7.16k]
  ------------------
 4572|  57.3k|            tick_nonce[i - 1] = (unsigned char)(nonce & 0xff);
 4573|  57.3k|            nonce >>= 8;
 4574|  57.3k|        }
 4575|       |
 4576|  7.16k|        if (!tls13_hkdf_expand(s, md, s->resumption_master_secret,
  ------------------
  |  Branch (4576:13): [True: 0, False: 7.16k]
  ------------------
 4577|  7.16k|                nonce_label,
 4578|  7.16k|                sizeof(nonce_label),
 4579|  7.16k|                tick_nonce,
 4580|  7.16k|                TICKET_NONCE_SIZE,
  ------------------
  |  |   37|  7.16k|#define TICKET_NONCE_SIZE 8
  ------------------
 4581|  7.16k|                s->session->master_key,
 4582|  7.16k|                hashlen, 1)) {
 4583|       |            /* SSLfatal() already called */
 4584|      0|            goto err;
 4585|      0|        }
 4586|  7.16k|        s->session->master_key_length = hashlen;
 4587|       |
 4588|  7.16k|        s->session->time = ossl_time_now();
 4589|  7.16k|        ssl_session_calculate_timeout(s->session);
 4590|  7.16k|        if (s->s3.alpn_selected != NULL) {
  ------------------
  |  Branch (4590:13): [True: 7.16k, False: 4]
  ------------------
 4591|  7.16k|            OPENSSL_free(s->session->ext.alpn_selected);
  ------------------
  |  |  132|  7.16k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4592|  7.16k|            s->session->ext.alpn_selected = OPENSSL_memdup(s->s3.alpn_selected, s->s3.alpn_selected_len);
  ------------------
  |  |  134|  7.16k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4593|  7.16k|            if (s->session->ext.alpn_selected == NULL) {
  ------------------
  |  Branch (4593:17): [True: 0, False: 7.16k]
  ------------------
 4594|      0|                s->session->ext.alpn_selected_len = 0;
 4595|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4596|      0|                goto err;
 4597|      0|            }
 4598|  7.16k|            s->session->ext.alpn_selected_len = s->s3.alpn_selected_len;
 4599|  7.16k|        }
 4600|  7.16k|        s->session->ext.max_early_data = s->max_early_data;
 4601|  7.16k|    }
 4602|       |
 4603|  7.16k|    if (tctx->generate_ticket_cb != NULL && tctx->generate_ticket_cb(SSL_CONNECTION_GET_USER_SSL(s), tctx->ticket_cb_data) == 0) {
  ------------------
  |  |   28|      0|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  |  Branch (4603:9): [True: 0, False: 7.16k]
  |  Branch (4603:45): [True: 0, False: 0]
  ------------------
 4604|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4605|      0|        goto err;
 4606|      0|    }
 4607|       |    /*
 4608|       |     * If we are using anti-replay protection then we behave as if
 4609|       |     * SSL_OP_NO_TICKET is set - we are caching tickets anyway so there
 4610|       |     * is no point in using full stateless tickets.
 4611|       |     */
 4612|  7.16k|    if (SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|  14.3k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.3k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.16k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  274|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.3k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  275|  14.3k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.16k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.16k, False: 0]
  |  |  ------------------
  ------------------
 4613|  7.16k|        && ((s->options & SSL_OP_NO_TICKET) != 0
  ------------------
  |  |  384|  7.16k|#define SSL_OP_NO_TICKET SSL_OP_BIT(14)
  |  |  ------------------
  |  |  |  |  351|  7.16k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (4613:13): [True: 0, False: 7.16k]
  ------------------
 4614|  7.16k|            || (s->max_early_data > 0
  ------------------
  |  Branch (4614:17): [True: 0, False: 7.16k]
  ------------------
 4615|      0|                && (s->options & SSL_OP_NO_ANTI_REPLAY) == 0))) {
  ------------------
  |  |  428|      0|#define SSL_OP_NO_ANTI_REPLAY SSL_OP_BIT(24)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (4615:20): [True: 0, False: 0]
  ------------------
 4616|      0|        if (!construct_stateful_ticket(s, pkt, age_add_u.age_add, tick_nonce)) {
  ------------------
  |  Branch (4616:13): [True: 0, False: 0]
  ------------------
 4617|       |            /* SSLfatal() already called */
 4618|      0|            goto err;
 4619|      0|        }
 4620|  7.16k|    } else {
 4621|  7.16k|        CON_FUNC_RETURN tmpret;
 4622|       |
 4623|  7.16k|        tmpret = construct_stateless_ticket(s, pkt, age_add_u.age_add,
 4624|  7.16k|            tick_nonce);
 4625|  7.16k|        if (tmpret != CON_FUNC_SUCCESS) {
  ------------------
  |  Branch (4625:13): [True: 0, False: 7.16k]
  ------------------
 4626|      0|            if (tmpret == CON_FUNC_DONT_SEND) {
  ------------------
  |  Branch (4626:17): [True: 0, False: 0]
  ------------------
 4627|       |                /* Non-fatal. Abort construction but continue */
 4628|      0|                ret = CON_FUNC_DONT_SEND;
 4629|       |                /* We count this as a success so update the counts anwyay */
 4630|      0|                tls_update_ticket_counts(s);
 4631|      0|            }
 4632|       |            /* else SSLfatal() already called */
 4633|      0|            goto err;
 4634|      0|        }
 4635|  7.16k|    }
 4636|       |
 4637|  7.16k|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  7.16k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.3k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.16k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  274|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.3k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  275|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.16k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.16k, False: 0]
  |  |  ------------------
  ------------------
 4638|  7.16k|        if (!tls_construct_extensions(s, pkt,
  ------------------
  |  Branch (4638:13): [True: 0, False: 7.16k]
  ------------------
 4639|  7.16k|                SSL_EXT_TLS1_3_NEW_SESSION_TICKET,
  ------------------
  |  |  307|  7.16k|#define SSL_EXT_TLS1_3_NEW_SESSION_TICKET 0x02000
  ------------------
 4640|  7.16k|                NULL, 0)) {
 4641|       |            /* SSLfatal() already called */
 4642|      0|            goto err;
 4643|      0|        }
 4644|  7.16k|        tls_update_ticket_counts(s);
 4645|  7.16k|        ssl_update_cache(s, SSL_SESS_CACHE_SERVER);
  ------------------
  |  |  735|  7.16k|#define SSL_SESS_CACHE_SERVER 0x0002
  ------------------
 4646|  7.16k|    }
 4647|       |
 4648|  7.16k|    ret = CON_FUNC_SUCCESS;
 4649|  7.16k|err:
 4650|  7.16k|    return ret;
 4651|  7.16k|}
statem_srvr.c:ossl_statem_server13_read_transition:
   75|  3.58k|{
   76|  3.58k|    OSSL_STATEM *st = &s->statem;
   77|       |
   78|       |    /*
   79|       |     * Note: There is no case for TLS_ST_BEFORE because at that stage we have
   80|       |     * not negotiated TLSv1.3 yet, so that case is handled by
   81|       |     * ossl_statem_server_read_transition()
   82|       |     */
   83|  3.58k|    switch (st->hand_state) {
   84|      0|    default:
  ------------------
  |  Branch (84:5): [True: 0, False: 3.58k]
  ------------------
   85|      0|        break;
   86|       |
   87|  3.58k|    case TLS_ST_EARLY_DATA:
  ------------------
  |  Branch (87:5): [True: 3.58k, False: 0]
  ------------------
   88|  3.58k|        if (s->hello_retry_request == SSL_HRR_PENDING) {
  ------------------
  |  Branch (88:13): [True: 0, False: 3.58k]
  ------------------
   89|      0|            if (mt == SSL3_MT_CLIENT_HELLO) {
  ------------------
  |  |  313|      0|#define SSL3_MT_CLIENT_HELLO 1
  ------------------
  |  Branch (89:17): [True: 0, False: 0]
  ------------------
   90|      0|                st->hand_state = TLS_ST_SR_CLNT_HELLO;
   91|      0|                return 1;
   92|      0|            }
   93|      0|            break;
   94|  3.58k|        } else if (s->ext.early_data == SSL_EARLY_DATA_ACCEPTED
  ------------------
  |  | 2074|  7.16k|#define SSL_EARLY_DATA_ACCEPTED 2
  ------------------
  |  Branch (94:20): [True: 0, False: 3.58k]
  ------------------
   95|      0|            && !SSL_NO_EOED(s)) {
  ------------------
  |  |  315|      0|#define SSL_NO_EOED(s) SSL_IS_QUIC_HANDSHAKE(s)
  |  |  ------------------
  |  |  |  |  311|      0|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |   22|      0|#define TLS1_FLAGS_QUIC 0x2000
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (95:16): [True: 0, False: 0]
  ------------------
   96|      0|            if (mt == SSL3_MT_END_OF_EARLY_DATA) {
  ------------------
  |  |  316|      0|#define SSL3_MT_END_OF_EARLY_DATA 5
  ------------------
  |  Branch (96:17): [True: 0, False: 0]
  ------------------
   97|      0|                st->hand_state = TLS_ST_SR_END_OF_EARLY_DATA;
   98|      0|                return 1;
   99|      0|            }
  100|      0|            break;
  101|      0|        }
  102|       |        /* Fall through */
  103|       |
  104|  3.58k|    case TLS_ST_SR_END_OF_EARLY_DATA:
  ------------------
  |  Branch (104:5): [True: 0, False: 3.58k]
  ------------------
  105|  3.58k|    case TLS_ST_SW_FINISHED:
  ------------------
  |  Branch (105:5): [True: 0, False: 3.58k]
  ------------------
  106|  3.58k|        if (s->s3.tmp.cert_request) {
  ------------------
  |  Branch (106:13): [True: 0, False: 3.58k]
  ------------------
  107|      0|            if (mt == SSL3_MT_CERTIFICATE) {
  ------------------
  |  |  318|      0|#define SSL3_MT_CERTIFICATE 11
  ------------------
  |  Branch (107:17): [True: 0, False: 0]
  ------------------
  108|      0|                st->hand_state = TLS_ST_SR_CERT;
  109|      0|                return 1;
  110|      0|            }
  111|       |#ifndef OPENSSL_NO_COMP_ALG
  112|       |            if (mt == SSL3_MT_COMPRESSED_CERTIFICATE
  113|       |                && s->ext.compress_certificate_sent) {
  114|       |                st->hand_state = TLS_ST_SR_COMP_CERT;
  115|       |                return 1;
  116|       |            }
  117|       |#endif
  118|  3.58k|        } else {
  119|  3.58k|            if (mt == SSL3_MT_FINISHED) {
  ------------------
  |  |  324|  3.58k|#define SSL3_MT_FINISHED 20
  ------------------
  |  Branch (119:17): [True: 3.58k, False: 0]
  ------------------
  120|  3.58k|                st->hand_state = TLS_ST_SR_FINISHED;
  121|  3.58k|                return 1;
  122|  3.58k|            }
  123|  3.58k|        }
  124|      0|        break;
  125|       |
  126|      0|    case TLS_ST_SR_COMP_CERT:
  ------------------
  |  Branch (126:5): [True: 0, False: 3.58k]
  ------------------
  127|      0|    case TLS_ST_SR_CERT:
  ------------------
  |  Branch (127:5): [True: 0, False: 3.58k]
  ------------------
  128|      0|        if (!received_client_cert(s)) {
  ------------------
  |  Branch (128:13): [True: 0, False: 0]
  ------------------
  129|      0|            if (mt == SSL3_MT_FINISHED) {
  ------------------
  |  |  324|      0|#define SSL3_MT_FINISHED 20
  ------------------
  |  Branch (129:17): [True: 0, False: 0]
  ------------------
  130|      0|                st->hand_state = TLS_ST_SR_FINISHED;
  131|      0|                return 1;
  132|      0|            }
  133|      0|        } else {
  134|      0|            if (mt == SSL3_MT_CERTIFICATE_VERIFY) {
  ------------------
  |  |  322|      0|#define SSL3_MT_CERTIFICATE_VERIFY 15
  ------------------
  |  Branch (134:17): [True: 0, False: 0]
  ------------------
  135|      0|                st->hand_state = TLS_ST_SR_CERT_VRFY;
  136|      0|                return 1;
  137|      0|            }
  138|      0|        }
  139|      0|        break;
  140|       |
  141|      0|    case TLS_ST_SR_CERT_VRFY:
  ------------------
  |  Branch (141:5): [True: 0, False: 3.58k]
  ------------------
  142|      0|        if (mt == SSL3_MT_FINISHED) {
  ------------------
  |  |  324|      0|#define SSL3_MT_FINISHED 20
  ------------------
  |  Branch (142:13): [True: 0, False: 0]
  ------------------
  143|      0|            st->hand_state = TLS_ST_SR_FINISHED;
  144|      0|            return 1;
  145|      0|        }
  146|      0|        break;
  147|       |
  148|      0|    case TLS_ST_OK:
  ------------------
  |  Branch (148:5): [True: 0, False: 3.58k]
  ------------------
  149|       |        /*
  150|       |         * Its never ok to start processing handshake messages in the middle of
  151|       |         * early data (i.e. before we've received the end of early data alert)
  152|       |         */
  153|      0|        if (s->early_data_state == SSL_EARLY_DATA_READING)
  ------------------
  |  Branch (153:13): [True: 0, False: 0]
  ------------------
  154|      0|            break;
  155|       |
  156|      0|        if (s->post_handshake_auth == SSL_PHA_REQUESTED) {
  ------------------
  |  Branch (156:13): [True: 0, False: 0]
  ------------------
  157|      0|            if (mt == SSL3_MT_CERTIFICATE) {
  ------------------
  |  |  318|      0|#define SSL3_MT_CERTIFICATE 11
  ------------------
  |  Branch (157:17): [True: 0, False: 0]
  ------------------
  158|      0|                st->hand_state = TLS_ST_SR_CERT;
  159|      0|                return 1;
  160|      0|            }
  161|       |#ifndef OPENSSL_NO_COMP_ALG
  162|       |            if (mt == SSL3_MT_COMPRESSED_CERTIFICATE
  163|       |                && s->ext.compress_certificate_sent) {
  164|       |                st->hand_state = TLS_ST_SR_COMP_CERT;
  165|       |                return 1;
  166|       |            }
  167|       |#endif
  168|      0|        }
  169|       |
  170|      0|        if (mt == SSL3_MT_KEY_UPDATE && !SSL_IS_QUIC_HANDSHAKE(s)) {
  ------------------
  |  |  328|      0|#define SSL3_MT_KEY_UPDATE 24
  ------------------
                      if (mt == SSL3_MT_KEY_UPDATE && !SSL_IS_QUIC_HANDSHAKE(s)) {
  ------------------
  |  |  311|      0|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  ------------------
  |  |  |  |   22|      0|#define TLS1_FLAGS_QUIC 0x2000
  |  |  ------------------
  ------------------
  |  Branch (170:13): [True: 0, False: 0]
  |  Branch (170:41): [True: 0, False: 0]
  ------------------
  171|      0|            st->hand_state = TLS_ST_SR_KEY_UPDATE;
  172|      0|            return 1;
  173|      0|        }
  174|      0|        break;
  175|  3.58k|    }
  176|       |
  177|       |    /* No valid transition found */
  178|      0|    return 0;
  179|  3.58k|}
statem_srvr.c:ossl_statem_server13_write_transition:
  597|  39.7k|{
  598|  39.7k|    OSSL_STATEM *st = &s->statem;
  599|       |
  600|       |    /*
  601|       |     * No case for TLS_ST_BEFORE, because at that stage we have not negotiated
  602|       |     * TLSv1.3 yet, so that is handled by ossl_statem_server_write_transition()
  603|       |     */
  604|       |
  605|  39.7k|    switch (st->hand_state) {
  606|      0|    default:
  ------------------
  |  Branch (606:5): [True: 0, False: 39.7k]
  ------------------
  607|       |        /* Shouldn't happen */
  608|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  609|      0|        return WRITE_TRAN_ERROR;
  610|       |
  611|      0|    case TLS_ST_OK:
  ------------------
  |  Branch (611:5): [True: 0, False: 39.7k]
  ------------------
  612|      0|        if (s->key_update != SSL_KEY_UPDATE_NONE) {
  ------------------
  |  | 1071|      0|#define SSL_KEY_UPDATE_NONE -1
  ------------------
  |  Branch (612:13): [True: 0, False: 0]
  ------------------
  613|      0|            st->hand_state = TLS_ST_SW_KEY_UPDATE;
  614|      0|            return WRITE_TRAN_CONTINUE;
  615|      0|        }
  616|      0|        if (s->post_handshake_auth == SSL_PHA_REQUEST_PENDING) {
  ------------------
  |  Branch (616:13): [True: 0, False: 0]
  ------------------
  617|      0|            st->hand_state = TLS_ST_SW_CERT_REQ;
  618|      0|            return WRITE_TRAN_CONTINUE;
  619|      0|        }
  620|      0|        if (s->ext.extra_tickets_expected > 0) {
  ------------------
  |  Branch (620:13): [True: 0, False: 0]
  ------------------
  621|      0|            st->hand_state = TLS_ST_SW_SESSION_TICKET;
  622|      0|            return WRITE_TRAN_CONTINUE;
  623|      0|        }
  624|       |        /* Try to read from the client instead */
  625|      0|        return WRITE_TRAN_FINISHED;
  626|       |
  627|  3.62k|    case TLS_ST_SR_CLNT_HELLO:
  ------------------
  |  Branch (627:5): [True: 3.62k, False: 36.1k]
  ------------------
  628|  3.62k|        st->hand_state = TLS_ST_SW_SRVR_HELLO;
  629|  3.62k|        return WRITE_TRAN_CONTINUE;
  630|       |
  631|  3.62k|    case TLS_ST_SW_SRVR_HELLO:
  ------------------
  |  Branch (631:5): [True: 3.62k, False: 36.1k]
  ------------------
  632|  3.62k|        if ((s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0
  ------------------
  |  |  404|  3.62k|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  351|  3.62k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (632:13): [True: 3.62k, False: 0]
  ------------------
  633|  3.62k|            && s->hello_retry_request != SSL_HRR_COMPLETE)
  ------------------
  |  Branch (633:16): [True: 3.62k, False: 0]
  ------------------
  634|  3.62k|            st->hand_state = TLS_ST_SW_CHANGE;
  635|      0|        else if (s->hello_retry_request == SSL_HRR_PENDING)
  ------------------
  |  Branch (635:18): [True: 0, False: 0]
  ------------------
  636|      0|            st->hand_state = TLS_ST_EARLY_DATA;
  637|      0|        else
  638|      0|            st->hand_state = TLS_ST_SW_ENCRYPTED_EXTENSIONS;
  639|  3.62k|        return WRITE_TRAN_CONTINUE;
  640|       |
  641|  3.62k|    case TLS_ST_SW_CHANGE:
  ------------------
  |  Branch (641:5): [True: 3.62k, False: 36.1k]
  ------------------
  642|  3.62k|        if (s->hello_retry_request == SSL_HRR_PENDING)
  ------------------
  |  Branch (642:13): [True: 0, False: 3.62k]
  ------------------
  643|      0|            st->hand_state = TLS_ST_EARLY_DATA;
  644|  3.62k|        else
  645|  3.62k|            st->hand_state = TLS_ST_SW_ENCRYPTED_EXTENSIONS;
  646|  3.62k|        return WRITE_TRAN_CONTINUE;
  647|       |
  648|  3.62k|    case TLS_ST_SW_ENCRYPTED_EXTENSIONS:
  ------------------
  |  Branch (648:5): [True: 3.62k, False: 36.1k]
  ------------------
  649|  3.62k|        if (s->hit)
  ------------------
  |  Branch (649:13): [True: 0, False: 3.62k]
  ------------------
  650|      0|            st->hand_state = TLS_ST_SW_FINISHED;
  651|  3.62k|        else if (send_certificate_request(s))
  ------------------
  |  Branch (651:18): [True: 0, False: 3.62k]
  ------------------
  652|      0|            st->hand_state = TLS_ST_SW_CERT_REQ;
  653|  3.62k|        else if (do_compressed_cert(s))
  ------------------
  |  Branch (653:18): [True: 0, False: 3.62k]
  ------------------
  654|      0|            st->hand_state = TLS_ST_SW_COMP_CERT;
  655|  3.62k|        else
  656|  3.62k|            st->hand_state = TLS_ST_SW_CERT;
  657|       |
  658|  3.62k|        return WRITE_TRAN_CONTINUE;
  659|       |
  660|      0|    case TLS_ST_SW_CERT_REQ:
  ------------------
  |  Branch (660:5): [True: 0, False: 39.7k]
  ------------------
  661|      0|        if (s->post_handshake_auth == SSL_PHA_REQUEST_PENDING) {
  ------------------
  |  Branch (661:13): [True: 0, False: 0]
  ------------------
  662|      0|            s->post_handshake_auth = SSL_PHA_REQUESTED;
  663|      0|            st->hand_state = TLS_ST_OK;
  664|      0|        } else if (do_compressed_cert(s)) {
  ------------------
  |  Branch (664:20): [True: 0, False: 0]
  ------------------
  665|      0|            st->hand_state = TLS_ST_SW_COMP_CERT;
  666|      0|        } else {
  667|      0|            st->hand_state = TLS_ST_SW_CERT;
  668|      0|        }
  669|      0|        return WRITE_TRAN_CONTINUE;
  670|       |
  671|      0|    case TLS_ST_SW_COMP_CERT:
  ------------------
  |  Branch (671:5): [True: 0, False: 39.7k]
  ------------------
  672|  3.62k|    case TLS_ST_SW_CERT:
  ------------------
  |  Branch (672:5): [True: 3.62k, False: 36.1k]
  ------------------
  673|  3.62k|        st->hand_state = TLS_ST_SW_CERT_VRFY;
  674|  3.62k|        return WRITE_TRAN_CONTINUE;
  675|       |
  676|  3.62k|    case TLS_ST_SW_CERT_VRFY:
  ------------------
  |  Branch (676:5): [True: 3.62k, False: 36.1k]
  ------------------
  677|  3.62k|        st->hand_state = TLS_ST_SW_FINISHED;
  678|  3.62k|        return WRITE_TRAN_CONTINUE;
  679|       |
  680|  3.62k|    case TLS_ST_SW_FINISHED:
  ------------------
  |  Branch (680:5): [True: 3.62k, False: 36.1k]
  ------------------
  681|  3.62k|        st->hand_state = TLS_ST_EARLY_DATA;
  682|  3.62k|        s->ts_msg_write = ossl_time_now();
  683|  3.62k|        return WRITE_TRAN_CONTINUE;
  684|       |
  685|  3.62k|    case TLS_ST_EARLY_DATA:
  ------------------
  |  Branch (685:5): [True: 3.62k, False: 36.1k]
  ------------------
  686|  3.62k|        return WRITE_TRAN_FINISHED;
  687|       |
  688|  3.58k|    case TLS_ST_SR_FINISHED:
  ------------------
  |  Branch (688:5): [True: 3.58k, False: 36.2k]
  ------------------
  689|  3.58k|        s->ts_msg_read = ossl_time_now();
  690|       |        /*
  691|       |         * Technically we have finished the handshake at this point, but we're
  692|       |         * going to remain "in_init" for now and write out any session tickets
  693|       |         * immediately.
  694|       |         */
  695|  3.58k|        if (s->post_handshake_auth == SSL_PHA_REQUESTED) {
  ------------------
  |  Branch (695:13): [True: 0, False: 3.58k]
  ------------------
  696|      0|            s->post_handshake_auth = SSL_PHA_EXT_RECEIVED;
  697|  3.58k|        } else if (!s->ext.ticket_expected) {
  ------------------
  |  Branch (697:20): [True: 0, False: 3.58k]
  ------------------
  698|       |            /*
  699|       |             * If we're not going to renew the ticket then we just finish the
  700|       |             * handshake at this point.
  701|       |             */
  702|      0|            st->hand_state = TLS_ST_OK;
  703|      0|            return WRITE_TRAN_CONTINUE;
  704|      0|        }
  705|  3.58k|        if (s->num_tickets > s->sent_tickets)
  ------------------
  |  Branch (705:13): [True: 3.58k, False: 0]
  ------------------
  706|  3.58k|            st->hand_state = TLS_ST_SW_SESSION_TICKET;
  707|      0|        else
  708|      0|            st->hand_state = TLS_ST_OK;
  709|  3.58k|        return WRITE_TRAN_CONTINUE;
  710|       |
  711|      0|    case TLS_ST_SR_KEY_UPDATE:
  ------------------
  |  Branch (711:5): [True: 0, False: 39.7k]
  ------------------
  712|      0|    case TLS_ST_SW_KEY_UPDATE:
  ------------------
  |  Branch (712:5): [True: 0, False: 39.7k]
  ------------------
  713|      0|        st->hand_state = TLS_ST_OK;
  714|      0|        return WRITE_TRAN_CONTINUE;
  715|       |
  716|  7.16k|    case TLS_ST_SW_SESSION_TICKET:
  ------------------
  |  Branch (716:5): [True: 7.16k, False: 32.6k]
  ------------------
  717|       |        /* In a resumption we only ever send a maximum of one new ticket.
  718|       |         * Following an initial handshake we send the number of tickets we have
  719|       |         * been configured for.
  720|       |         */
  721|  7.16k|        if (!SSL_IS_FIRST_HANDSHAKE(s) && s->ext.extra_tickets_expected > 0) {
  ------------------
  |  |  285|  14.3k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 0, False: 7.16k]
  |  |  ------------------
  |  |  286|  14.3k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 7.16k]
  |  |  ------------------
  ------------------
  |  Branch (721:43): [True: 0, False: 7.16k]
  ------------------
  722|      0|            return WRITE_TRAN_CONTINUE;
  723|  7.16k|        } else if (s->hit || s->num_tickets <= s->sent_tickets) {
  ------------------
  |  Branch (723:20): [True: 0, False: 7.16k]
  |  Branch (723:30): [True: 3.58k, False: 3.58k]
  ------------------
  724|       |            /* We've written enough tickets out. */
  725|  3.58k|            st->hand_state = TLS_ST_OK;
  726|  3.58k|        }
  727|  7.16k|        return WRITE_TRAN_CONTINUE;
  728|  39.7k|    }
  729|  39.7k|}
statem_srvr.c:do_compressed_cert:
  585|  3.62k|{
  586|       |    /* If we negotiated RPK, we won't attempt to compress it */
  587|  3.62k|    return sc->ext.server_cert_type == TLSEXT_cert_type_x509
  ------------------
  |  |  248|  7.25k|#define TLSEXT_cert_type_x509 0
  ------------------
  |  Branch (587:12): [True: 3.62k, False: 0]
  ------------------
  588|  3.62k|        && get_compressed_certificate_alg(sc) != TLSEXT_comp_cert_none;
  ------------------
  |  |  219|  3.62k|#define TLSEXT_comp_cert_none 0
  ------------------
  |  Branch (588:12): [True: 0, False: 3.62k]
  ------------------
  589|  3.62k|}
statem_srvr.c:get_compressed_certificate_alg:
  378|  3.62k|{
  379|       |#ifndef OPENSSL_NO_COMP_ALG
  380|       |    int *alg = sc->ext.compress_certificate_from_peer;
  381|       |
  382|       |    if (sc->s3.tmp.cert == NULL)
  383|       |        return TLSEXT_comp_cert_none;
  384|       |
  385|       |    for (; *alg != TLSEXT_comp_cert_none; alg++) {
  386|       |        if (sc->s3.tmp.cert->comp_cert[*alg] != NULL)
  387|       |            return *alg;
  388|       |    }
  389|       |#endif
  390|  3.62k|    return TLSEXT_comp_cert_none;
  ------------------
  |  |  219|  3.62k|#define TLSEXT_comp_cert_none 0
  ------------------
  391|  3.62k|}
statem_srvr.c:tls_early_post_process_client_hello:
 1863|  3.62k|{
 1864|  3.62k|    unsigned int j;
 1865|  3.62k|    int i, al = SSL_AD_INTERNAL_ERROR;
  ------------------
  |  | 1266|  3.62k|#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR
  |  |  ------------------
  |  |  |  |   66|  3.62k|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  |  |  ------------------
  ------------------
 1866|  3.62k|    int protverr;
 1867|  3.62k|    unsigned long id;
 1868|  3.62k|#ifndef OPENSSL_NO_COMP
 1869|  3.62k|    SSL_COMP *comp = NULL;
 1870|  3.62k|#endif
 1871|  3.62k|    const SSL_CIPHER *c;
 1872|  3.62k|    STACK_OF(SSL_CIPHER) *ciphers = NULL;
  ------------------
  |  |   33|  3.62k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1873|  3.62k|    STACK_OF(SSL_CIPHER) *scsvs = NULL;
  ------------------
  |  |   33|  3.62k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1874|  3.62k|    CLIENTHELLO_MSG *clienthello = s->clienthello;
 1875|  3.62k|    DOWNGRADE dgrd = DOWNGRADE_NONE;
 1876|  3.62k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1877|  3.62k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1878|  3.62k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  3.62k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1879|       |
 1880|       |    /* Finished parsing the ClientHello, now we can start processing it */
 1881|       |    /* Give the ClientHello callback a crack at things */
 1882|  3.62k|    if (sctx->client_hello_cb != NULL) {
  ------------------
  |  Branch (1882:9): [True: 0, False: 3.62k]
  ------------------
 1883|       |        /* A failure in the ClientHello callback terminates the connection. */
 1884|      0|        switch (sctx->client_hello_cb(ussl, &al, sctx->client_hello_cb_arg)) {
 1885|      0|        case SSL_CLIENT_HELLO_SUCCESS:
  ------------------
  |  | 1996|      0|#define SSL_CLIENT_HELLO_SUCCESS 1
  ------------------
  |  Branch (1885:9): [True: 0, False: 0]
  ------------------
 1886|      0|            break;
 1887|      0|        case SSL_CLIENT_HELLO_RETRY:
  ------------------
  |  | 1998|      0|#define SSL_CLIENT_HELLO_RETRY (-1)
  ------------------
  |  Branch (1887:9): [True: 0, False: 0]
  ------------------
 1888|      0|            s->rwstate = SSL_CLIENT_HELLO_CB;
  ------------------
  |  |  961|      0|#define SSL_CLIENT_HELLO_CB 7
  ------------------
 1889|      0|            return -1;
 1890|      0|        case SSL_CLIENT_HELLO_ERROR:
  ------------------
  |  | 1997|      0|#define SSL_CLIENT_HELLO_ERROR 0
  ------------------
  |  Branch (1890:9): [True: 0, False: 0]
  ------------------
 1891|      0|        default:
  ------------------
  |  Branch (1891:9): [True: 0, False: 0]
  ------------------
 1892|      0|            SSLfatal(s, al, SSL_R_CALLBACK_FAILED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1893|      0|            goto err;
 1894|      0|        }
 1895|      0|    }
 1896|       |
 1897|       |    /* Set up the client_random */
 1898|  3.62k|    memcpy(s->s3.client_random, clienthello->random, SSL3_RANDOM_SIZE);
  ------------------
  |  |  137|  3.62k|#define SSL3_RANDOM_SIZE 32
  ------------------
 1899|       |
 1900|       |    /* Choose the server SSL/TLS/DTLS version. */
 1901|  3.62k|    protverr = ssl_choose_server_version(s, clienthello, &dgrd);
 1902|       |
 1903|  3.62k|#ifndef OPENSSL_NO_ECH
 1904|  3.62k|    if (protverr && s->ext.ech.success == 1) {
  ------------------
  |  Branch (1904:9): [True: 0, False: 3.62k]
  |  Branch (1904:21): [True: 0, False: 0]
  ------------------
 1905|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, protverr);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1906|      0|    }
 1907|  3.62k|#endif
 1908|  3.62k|    if (protverr) {
  ------------------
  |  Branch (1908:9): [True: 0, False: 3.62k]
  ------------------
 1909|      0|        if (SSL_IS_FIRST_HANDSHAKE(s)) {
  ------------------
  |  |  285|      0|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 0, False: 0]
  |  |  ------------------
  |  |  286|      0|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1910|       |            /* like ssl3_get_record, send alert using remote version number */
 1911|      0|            s->version = s->client_version = clienthello->legacy_version;
 1912|      0|        }
 1913|      0|        SSLfatal(s, SSL_AD_PROTOCOL_VERSION, protverr);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1914|      0|        goto err;
 1915|      0|    }
 1916|       |
 1917|       |    /* TLSv1.3 specifies that a ClientHello must end on a record boundary */
 1918|  3.62k|    if (SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|  7.25k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 1919|  3.62k|        && RECORD_LAYER_processed_read_pending(&s->rlayer)) {
  ------------------
  |  Branch (1919:12): [True: 0, False: 3.62k]
  ------------------
 1920|      0|        SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_NOT_ON_RECORD_BOUNDARY);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1921|      0|        goto err;
 1922|      0|    }
 1923|       |
 1924|  3.62k|    if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
 1925|       |        /* Empty cookie was already handled above by returning early. */
 1926|      0|        if (SSL_get_options(ssl) & SSL_OP_COOKIE_EXCHANGE) {
  ------------------
  |  |  382|      0|#define SSL_OP_COOKIE_EXCHANGE SSL_OP_BIT(13)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1926:13): [True: 0, False: 0]
  ------------------
 1927|      0|            if (sctx->app_verify_cookie_cb != NULL) {
  ------------------
  |  Branch (1927:17): [True: 0, False: 0]
  ------------------
 1928|      0|                if (sctx->app_verify_cookie_cb(ussl, clienthello->dtls_cookie,
  ------------------
  |  Branch (1928:21): [True: 0, False: 0]
  ------------------
 1929|      0|                        (unsigned int)clienthello->dtls_cookie_len)
 1930|      0|                    == 0) {
 1931|      0|                    SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1932|      0|                        SSL_R_COOKIE_MISMATCH);
 1933|      0|                    goto err;
 1934|       |                    /* else cookie verification succeeded */
 1935|      0|                }
 1936|       |                /* default verification */
 1937|      0|            } else if (s->d1->cookie_len != clienthello->dtls_cookie_len
  ------------------
  |  Branch (1937:24): [True: 0, False: 0]
  ------------------
 1938|      0|                || memcmp(clienthello->dtls_cookie, s->d1->cookie,
  ------------------
  |  Branch (1938:20): [True: 0, False: 0]
  ------------------
 1939|      0|                       s->d1->cookie_len)
 1940|      0|                    != 0) {
 1941|      0|                SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_COOKIE_MISMATCH);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1942|      0|                goto err;
 1943|      0|            }
 1944|      0|            s->d1->cookie_verified = 1;
 1945|      0|        }
 1946|      0|    }
 1947|       |
 1948|  3.62k|    s->hit = 0;
 1949|       |
 1950|  3.62k|    if (!ssl_cache_cipherlist(s, &clienthello->ciphersuites)
  ------------------
  |  Branch (1950:9): [True: 0, False: 3.62k]
  ------------------
 1951|  3.62k|        || !ossl_bytes_to_cipher_list(s, &clienthello->ciphersuites, &ciphers, &scsvs, 1)) {
  ------------------
  |  Branch (1951:12): [True: 0, False: 3.62k]
  ------------------
 1952|       |        /* SSLfatal() already called */
 1953|      0|        goto err;
 1954|      0|    }
 1955|       |
 1956|  3.62k|    s->s3.send_connection_binding = 0;
 1957|       |    /* Check what signalling cipher-suite values were received. */
 1958|  3.62k|    if (scsvs != NULL) {
  ------------------
  |  Branch (1958:9): [True: 3.62k, False: 0]
  ------------------
 1959|  3.62k|        for (i = 0; i < sk_SSL_CIPHER_num(scsvs); i++) {
  ------------------
  |  | 1028|  3.62k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (1959:21): [True: 0, False: 3.62k]
  ------------------
 1960|      0|            c = sk_SSL_CIPHER_value(scsvs, i);
  ------------------
  |  | 1029|      0|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 1961|      0|            if (SSL_CIPHER_get_id(c) == SSL3_CK_SCSV) {
  ------------------
  |  |   33|      0|#define SSL3_CK_SCSV 0x030000FF
  ------------------
  |  Branch (1961:17): [True: 0, False: 0]
  ------------------
 1962|      0|                if (s->renegotiate) {
  ------------------
  |  Branch (1962:21): [True: 0, False: 0]
  ------------------
 1963|       |                    /* SCSV is fatal if renegotiating */
 1964|      0|                    SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1965|      0|                        SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING);
 1966|      0|                    goto err;
 1967|      0|                }
 1968|      0|                s->s3.send_connection_binding = 1;
 1969|      0|            } else if (SSL_CIPHER_get_id(c) == SSL3_CK_FALLBACK_SCSV && !ssl_check_version_downgrade(s)) {
  ------------------
  |  |   39|      0|#define SSL3_CK_FALLBACK_SCSV 0x03005600
  ------------------
  |  Branch (1969:24): [True: 0, False: 0]
  |  Branch (1969:73): [True: 0, False: 0]
  ------------------
 1970|       |                /*
 1971|       |                 * This SCSV indicates that the client previously tried
 1972|       |                 * a higher version.  We should fail if the current version
 1973|       |                 * is an unexpected downgrade, as that indicates that the first
 1974|       |                 * connection may have been tampered with in order to trigger
 1975|       |                 * an insecure downgrade.
 1976|       |                 */
 1977|      0|                SSLfatal(s, SSL_AD_INAPPROPRIATE_FALLBACK,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1978|      0|                    SSL_R_INAPPROPRIATE_FALLBACK);
 1979|      0|                goto err;
 1980|      0|            }
 1981|      0|        }
 1982|  3.62k|    }
 1983|       |
 1984|       |    /* For TLSv1.3 we must select the ciphersuite *before* session resumption */
 1985|  3.62k|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 1986|  3.62k|        const SSL_CIPHER *cipher = ssl3_choose_cipher(s, ciphers, SSL_get_ciphers(ssl));
 1987|       |
 1988|  3.62k|        if (cipher == NULL) {
  ------------------
  |  Branch (1988:13): [True: 0, False: 3.62k]
  ------------------
 1989|      0|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_NO_SHARED_CIPHER);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1990|      0|            goto err;
 1991|      0|        }
 1992|  3.62k|        if (s->hello_retry_request == SSL_HRR_PENDING
  ------------------
  |  Branch (1992:13): [True: 0, False: 3.62k]
  ------------------
 1993|      0|            && (s->s3.tmp.new_cipher == NULL
  ------------------
  |  Branch (1993:17): [True: 0, False: 0]
  ------------------
 1994|      0|                || s->s3.tmp.new_cipher->id != cipher->id)) {
  ------------------
  |  Branch (1994:20): [True: 0, False: 0]
  ------------------
 1995|       |            /*
 1996|       |             * A previous HRR picked a different ciphersuite to the one we
 1997|       |             * just selected. Something must have changed.
 1998|       |             */
 1999|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_CIPHER);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2000|      0|            goto err;
 2001|      0|        }
 2002|  3.62k|        s->s3.tmp.new_cipher = cipher;
 2003|  3.62k|    }
 2004|       |
 2005|       |    /* We need to do this before getting the session */
 2006|  3.62k|    if (!tls_parse_extension(s, TLSEXT_IDX_extended_master_secret,
  ------------------
  |  Branch (2006:9): [True: 0, False: 3.62k]
  ------------------
 2007|  3.62k|            SSL_EXT_CLIENT_HELLO,
  ------------------
  |  |  300|  3.62k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
 2008|  3.62k|            clienthello->pre_proc_exts, NULL, 0)) {
 2009|       |        /* SSLfatal() already called */
 2010|      0|        goto err;
 2011|      0|    }
 2012|       |
 2013|       |    /*
 2014|       |     * We don't allow resumption in a backwards compatible ClientHello.
 2015|       |     * In TLS1.1+, session_id MUST be empty.
 2016|       |     *
 2017|       |     * Versions before 0.9.7 always allow clients to resume sessions in
 2018|       |     * renegotiation. 0.9.7 and later allow this by default, but optionally
 2019|       |     * ignore resumption requests with flag
 2020|       |     * SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION (it's a new flag rather
 2021|       |     * than a change to default behavior so that applications relying on
 2022|       |     * this for security won't even compile against older library versions).
 2023|       |     * 1.0.1 and later also have a function SSL_renegotiate_abbreviated() to
 2024|       |     * request renegotiation but not a new session (s->new_session remains
 2025|       |     * unset): for servers, this essentially just means that the
 2026|       |     * SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION setting will be
 2027|       |     * ignored.
 2028|       |     */
 2029|  3.62k|    if (s->new_session && (s->options & SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION)) {
  ------------------
  |  |  393|      0|#define SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION SSL_OP_BIT(16)
  |  |  ------------------
  |  |  |  |  351|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (2029:9): [True: 0, False: 3.62k]
  |  Branch (2029:27): [True: 0, False: 0]
  ------------------
 2030|      0|        if (!ssl_get_new_session(s, 1)) {
  ------------------
  |  Branch (2030:13): [True: 0, False: 0]
  ------------------
 2031|       |            /* SSLfatal() already called */
 2032|      0|            goto err;
 2033|      0|        }
 2034|  3.62k|    } else {
 2035|  3.62k|        i = ssl_get_prev_session(s, clienthello);
 2036|  3.62k|        if (i == 1) {
  ------------------
  |  Branch (2036:13): [True: 0, False: 3.62k]
  ------------------
 2037|       |            /* previous session */
 2038|      0|            s->hit = 1;
 2039|  3.62k|        } else if (i == -1) {
  ------------------
  |  Branch (2039:20): [True: 0, False: 3.62k]
  ------------------
 2040|       |            /* SSLfatal() already called */
 2041|      0|            goto err;
 2042|  3.62k|        } else {
 2043|       |            /* i == 0 */
 2044|  3.62k|            if (!ssl_get_new_session(s, 1)) {
  ------------------
  |  Branch (2044:17): [True: 0, False: 3.62k]
  ------------------
 2045|       |                /* SSLfatal() already called */
 2046|      0|                goto err;
 2047|      0|            }
 2048|  3.62k|        }
 2049|  3.62k|    }
 2050|       |
 2051|  3.62k|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 2052|  3.62k|        memcpy(s->tmp_session_id, s->clienthello->session_id,
 2053|  3.62k|            s->clienthello->session_id_len);
 2054|  3.62k|        s->tmp_session_id_len = s->clienthello->session_id_len;
 2055|  3.62k|    }
 2056|       |
 2057|       |    /*
 2058|       |     * If it is a hit, check that the cipher is in the list. In TLSv1.3 we check
 2059|       |     * ciphersuite compatibility with the session as part of resumption.
 2060|       |     */
 2061|  3.62k|    if (!SSL_CONNECTION_IS_TLS13(s) && s->hit) {
  ------------------
  |  |  273|  7.25k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2061:40): [True: 0, False: 0]
  ------------------
 2062|      0|        j = 0;
 2063|      0|        id = s->session->cipher->id;
 2064|       |
 2065|      0|        OSSL_TRACE_BEGIN(TLS_CIPHER)
  ------------------
  |  |  219|      0|    do {                           \
  |  |  220|      0|        BIO *trc_out = NULL;       \
  |  |  221|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (221:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2066|      0|        {
 2067|      0|            BIO_printf(trc_out, "client sent %d ciphers\n",
 2068|      0|                sk_SSL_CIPHER_num(ciphers));
  ------------------
  |  | 1028|      0|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
 2069|      0|        }
 2070|      0|        for (i = 0; i < sk_SSL_CIPHER_num(ciphers); i++) {
  ------------------
  |  | 1028|      0|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (2070:21): [True: 0, False: 0]
  ------------------
 2071|      0|            c = sk_SSL_CIPHER_value(ciphers, i);
  ------------------
  |  | 1029|      0|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 2072|      0|            if (trc_out != NULL)
  ------------------
  |  Branch (2072:17): [True: 0, False: 0]
  ------------------
 2073|      0|                BIO_printf(trc_out, "client [%2d of %2d]:%s\n", i,
 2074|      0|                    sk_SSL_CIPHER_num(ciphers), SSL_CIPHER_get_name(c));
  ------------------
  |  | 1028|      0|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
 2075|      0|            if (c->id == id) {
  ------------------
  |  Branch (2075:17): [True: 0, False: 0]
  ------------------
 2076|      0|                j = 1;
 2077|      0|                break;
 2078|      0|            }
 2079|      0|        }
 2080|      0|        if (j == 0) {
  ------------------
  |  Branch (2080:13): [True: 0, False: 0]
  ------------------
 2081|       |            /*
 2082|       |             * we need to have the cipher in the cipher list if we are asked
 2083|       |             * to reuse it
 2084|       |             */
 2085|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2086|      0|                SSL_R_REQUIRED_CIPHER_MISSING);
 2087|      0|            OSSL_TRACE_CANCEL(TLS_CIPHER);
  ------------------
  |  |  228|      0|    ((void)0)
  ------------------
 2088|      0|            goto err;
 2089|      0|        }
 2090|      0|        OSSL_TRACE_END(TLS_CIPHER);
  ------------------
  |  |  224|      0|    }                            \
  |  |  225|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (225:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2091|      0|    }
 2092|       |
 2093|       |    /* At least one compression method must be preset. */
 2094|  3.62k|    if (clienthello->compressions_len == 0) {
  ------------------
  |  Branch (2094:9): [True: 0, False: 3.62k]
  ------------------
 2095|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_NO_COMPRESSION_SPECIFIED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2096|      0|        goto err;
 2097|      0|    }
 2098|       |    /* Make sure at least the null compression is supported. */
 2099|  3.62k|    if (memchr(clienthello->compressions, 0,
  ------------------
  |  Branch (2099:9): [True: 0, False: 3.62k]
  ------------------
 2100|  3.62k|            clienthello->compressions_len)
 2101|  3.62k|        == NULL) {
 2102|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2103|      0|            SSL_R_REQUIRED_COMPRESSION_ALGORITHM_MISSING);
 2104|      0|        goto err;
 2105|      0|    }
 2106|       |
 2107|  3.62k|    if (s->options & SSL_OP_SAFARI_ECDHE_ECDSA_BUG)
  ------------------
  |  |  365|  3.62k|#define SSL_OP_SAFARI_ECDHE_ECDSA_BUG SSL_OP_BIT(6)
  |  |  ------------------
  |  |  |  |  351|  3.62k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (2107:9): [True: 0, False: 3.62k]
  ------------------
 2108|      0|        ssl_check_for_safari(s, clienthello);
 2109|       |
 2110|       |    /* TLS extensions */
 2111|  3.62k|    if (!tls_parse_all_extensions(s, SSL_EXT_CLIENT_HELLO,
  ------------------
  |  |  300|  3.62k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (2111:9): [True: 0, False: 3.62k]
  ------------------
 2112|  3.62k|            clienthello->pre_proc_exts, NULL, 0, 1)) {
 2113|       |        /* SSLfatal() already called */
 2114|      0|        goto err;
 2115|      0|    }
 2116|       |
 2117|       |    /*
 2118|       |     * Check if we want to use external pre-shared secret for this handshake
 2119|       |     * for not reused session only. We need to generate server_random before
 2120|       |     * calling tls_session_secret_cb in order to allow SessionTicket
 2121|       |     * processing to use it in key derivation.
 2122|       |     */
 2123|  3.62k|    {
 2124|  3.62k|        unsigned char *pos;
 2125|  3.62k|        pos = s->s3.server_random;
 2126|  3.62k|        if (ssl_fill_hello_random(s, 1, pos, SSL3_RANDOM_SIZE, dgrd) <= 0) {
  ------------------
  |  |  137|  3.62k|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (2126:13): [True: 0, False: 3.62k]
  ------------------
 2127|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2128|      0|            goto err;
 2129|      0|        }
 2130|  3.62k|    }
 2131|       |
 2132|  3.62k|    if (!s->hit && !tls1_set_server_sigalgs(s)) {
  ------------------
  |  Branch (2132:9): [True: 3.62k, False: 0]
  |  Branch (2132:20): [True: 0, False: 3.62k]
  ------------------
 2133|       |        /* SSLfatal() already called */
 2134|      0|        goto err;
 2135|      0|    }
 2136|       |
 2137|       |    /*
 2138|       |     * Unless ECH has worked or not been configured we won't call
 2139|       |     * the session_secret_cb now because we'll need to calculate the
 2140|       |     * server random later to include the ECH accept value.
 2141|       |     * We can't do it now as we don't yet have the SH encoding.
 2142|       |     */
 2143|  3.62k|    if (
 2144|  3.62k|#ifndef OPENSSL_NO_ECH
 2145|  3.62k|        ((s->ext.ech.es != NULL && s->ext.ech.success == 1)
  ------------------
  |  Branch (2145:11): [True: 0, False: 3.62k]
  |  Branch (2145:36): [True: 0, False: 0]
  ------------------
 2146|  3.62k|            || s->ext.ech.es == NULL)
  ------------------
  |  Branch (2146:16): [True: 3.62k, False: 0]
  ------------------
 2147|  3.62k|        &&
 2148|  3.62k|#endif
 2149|  3.62k|        !s->hit
  ------------------
  |  Branch (2149:9): [True: 3.62k, False: 0]
  ------------------
 2150|  3.62k|        && s->version >= TLS1_VERSION
  ------------------
  |  |   24|  7.25k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (2150:12): [True: 3.62k, False: 0]
  ------------------
 2151|  3.62k|        && !SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|  7.25k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 2152|      0|        && !SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|  3.62k|    (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)
  |  |  ------------------
  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (2152:12): [True: 0, False: 0]
  ------------------
 2153|      0|        && s->ext.session_secret_cb != NULL) {
  ------------------
  |  Branch (2153:12): [True: 0, False: 0]
  ------------------
 2154|      0|        const SSL_CIPHER *pref_cipher = NULL;
 2155|       |
 2156|       |        /*
 2157|       |         * s->session->master_key_length is a size_t, but this is an int for
 2158|       |         * backwards compat reasons
 2159|       |         */
 2160|      0|        int master_key_length;
 2161|       |
 2162|      0|        master_key_length = sizeof(s->session->master_key);
 2163|      0|        if (s->ext.session_secret_cb(ussl, s->session->master_key,
  ------------------
  |  Branch (2163:13): [True: 0, False: 0]
  ------------------
 2164|      0|                &master_key_length, ciphers,
 2165|      0|                &pref_cipher,
 2166|      0|                s->ext.session_secret_cb_arg)
 2167|      0|            && master_key_length > 0) {
  ------------------
  |  Branch (2167:16): [True: 0, False: 0]
  ------------------
 2168|      0|            s->session->master_key_length = master_key_length;
 2169|      0|            s->hit = 1;
 2170|      0|            s->peer_ciphers = ciphers;
 2171|      0|            s->session->verify_result = X509_V_OK;
  ------------------
  |  |  312|      0|#define X509_V_OK 0
  ------------------
 2172|       |
 2173|       |            /*
 2174|       |             * Per RFC 4851, Section 3.2.2:
 2175|       |             * If the ClientHello contains both a Session ID and a PAC-Opaque in
 2176|       |             * the SessionTicket extension, and the server resumes the session
 2177|       |             * using the PAC-Opaque, it should echo the same Session ID in the
 2178|       |             * ServerHello.
 2179|       |             */
 2180|      0|            if (clienthello->session_id_len > 0) {
  ------------------
  |  Branch (2180:17): [True: 0, False: 0]
  ------------------
 2181|      0|                memcpy(s->session->session_id, clienthello->session_id,
 2182|      0|                    clienthello->session_id_len);
 2183|      0|                s->session->session_id_length = clienthello->session_id_len;
 2184|      0|            }
 2185|       |
 2186|      0|            ciphers = NULL;
 2187|       |
 2188|       |            /* check if some cipher was preferred by call back */
 2189|      0|            if (pref_cipher == NULL)
  ------------------
  |  Branch (2189:17): [True: 0, False: 0]
  ------------------
 2190|      0|                pref_cipher = ssl3_choose_cipher(s, s->peer_ciphers,
 2191|      0|                    SSL_get_ciphers(ssl));
 2192|      0|            if (pref_cipher == NULL) {
  ------------------
  |  Branch (2192:17): [True: 0, False: 0]
  ------------------
 2193|      0|                SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_NO_SHARED_CIPHER);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2194|      0|                goto err;
 2195|      0|            }
 2196|       |
 2197|      0|            s->session->cipher = pref_cipher;
 2198|      0|            sk_SSL_CIPHER_free(s->cipher_list);
  ------------------
  |  | 1034|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 2199|      0|            s->cipher_list = sk_SSL_CIPHER_dup(s->peer_ciphers);
  ------------------
  |  | 1050|      0|#define sk_SSL_CIPHER_dup(sk) ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_dup(ossl_check_const_SSL_CIPHER_sk_type(sk)))
  ------------------
 2200|      0|            sk_SSL_CIPHER_free(s->cipher_list_by_id);
  ------------------
  |  | 1034|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 2201|      0|            s->cipher_list_by_id = sk_SSL_CIPHER_dup(s->peer_ciphers);
  ------------------
  |  | 1050|      0|#define sk_SSL_CIPHER_dup(sk) ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_dup(ossl_check_const_SSL_CIPHER_sk_type(sk)))
  ------------------
 2202|      0|        }
 2203|      0|    }
 2204|       |
 2205|       |    /*
 2206|       |     * Worst case, we will use the NULL compression, but if we have other
 2207|       |     * options, we will now look for them.  We have complen-1 compression
 2208|       |     * algorithms from the client, starting at q.
 2209|       |     */
 2210|  3.62k|    s->s3.tmp.new_compression = NULL;
 2211|  3.62k|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 2212|       |        /*
 2213|       |         * We already checked above that the NULL compression method appears in
 2214|       |         * the list. Now we check there aren't any others (which is illegal in
 2215|       |         * a TLSv1.3 ClientHello.
 2216|       |         */
 2217|  3.62k|        if (clienthello->compressions_len != 1) {
  ------------------
  |  Branch (2217:13): [True: 0, False: 3.62k]
  ------------------
 2218|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2219|      0|                SSL_R_INVALID_COMPRESSION_ALGORITHM);
 2220|      0|            goto err;
 2221|      0|        }
 2222|  3.62k|    }
 2223|      0|#ifndef OPENSSL_NO_COMP
 2224|       |    /* This only happens if we have a cache hit */
 2225|      0|    else if (s->session->compress_meth != 0) {
  ------------------
  |  Branch (2225:14): [True: 0, False: 0]
  ------------------
 2226|      0|        int m, comp_id = s->session->compress_meth;
 2227|      0|        unsigned int k;
 2228|       |        /* Perform sanity checks on resumed compression algorithm */
 2229|       |        /* Can't disable compression */
 2230|      0|        if (!ssl_allow_compression(s)) {
  ------------------
  |  Branch (2230:13): [True: 0, False: 0]
  ------------------
 2231|      0|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2232|      0|                SSL_R_INCONSISTENT_COMPRESSION);
 2233|      0|            goto err;
 2234|      0|        }
 2235|       |        /* Look for resumed compression method */
 2236|      0|        for (m = 0; m < sk_SSL_COMP_num(sctx->comp_methods); m++) {
  ------------------
  |  |   70|      0|#define sk_SSL_COMP_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_COMP_sk_type(sk))
  ------------------
  |  Branch (2236:21): [True: 0, False: 0]
  ------------------
 2237|      0|            comp = sk_SSL_COMP_value(sctx->comp_methods, m);
  ------------------
  |  |   71|      0|#define sk_SSL_COMP_value(sk, idx) ((SSL_COMP *)OPENSSL_sk_value(ossl_check_const_SSL_COMP_sk_type(sk), (idx)))
  ------------------
 2238|      0|            if (comp_id == comp->id) {
  ------------------
  |  Branch (2238:17): [True: 0, False: 0]
  ------------------
 2239|      0|                s->s3.tmp.new_compression = comp;
 2240|      0|                break;
 2241|      0|            }
 2242|      0|        }
 2243|      0|        if (s->s3.tmp.new_compression == NULL) {
  ------------------
  |  Branch (2243:13): [True: 0, False: 0]
  ------------------
 2244|      0|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2245|      0|                SSL_R_INVALID_COMPRESSION_ALGORITHM);
 2246|      0|            goto err;
 2247|      0|        }
 2248|       |        /* Look for resumed method in compression list */
 2249|      0|        for (k = 0; k < clienthello->compressions_len; k++) {
  ------------------
  |  Branch (2249:21): [True: 0, False: 0]
  ------------------
 2250|      0|            if (clienthello->compressions[k] == comp_id)
  ------------------
  |  Branch (2250:17): [True: 0, False: 0]
  ------------------
 2251|      0|                break;
 2252|      0|        }
 2253|      0|        if (k >= clienthello->compressions_len) {
  ------------------
  |  Branch (2253:13): [True: 0, False: 0]
  ------------------
 2254|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2255|      0|                SSL_R_REQUIRED_COMPRESSION_ALGORITHM_MISSING);
 2256|      0|            goto err;
 2257|      0|        }
 2258|      0|    } else if (s->hit) {
  ------------------
  |  Branch (2258:16): [True: 0, False: 0]
  ------------------
 2259|      0|        comp = NULL;
 2260|      0|    } else if (ssl_allow_compression(s) && sctx->comp_methods) {
  ------------------
  |  Branch (2260:16): [True: 0, False: 0]
  |  Branch (2260:44): [True: 0, False: 0]
  ------------------
 2261|       |        /* See if we have a match */
 2262|      0|        int m, nn, v, done = 0;
 2263|      0|        unsigned int o;
 2264|       |
 2265|      0|        nn = 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))
  ------------------
 2266|      0|        for (m = 0; m < nn; m++) {
  ------------------
  |  Branch (2266:21): [True: 0, False: 0]
  ------------------
 2267|      0|            comp = sk_SSL_COMP_value(sctx->comp_methods, m);
  ------------------
  |  |   71|      0|#define sk_SSL_COMP_value(sk, idx) ((SSL_COMP *)OPENSSL_sk_value(ossl_check_const_SSL_COMP_sk_type(sk), (idx)))
  ------------------
 2268|      0|            v = comp->id;
 2269|      0|            for (o = 0; o < clienthello->compressions_len; o++) {
  ------------------
  |  Branch (2269:25): [True: 0, False: 0]
  ------------------
 2270|      0|                if (v == clienthello->compressions[o]) {
  ------------------
  |  Branch (2270:21): [True: 0, False: 0]
  ------------------
 2271|      0|                    done = 1;
 2272|      0|                    break;
 2273|      0|                }
 2274|      0|            }
 2275|      0|            if (done)
  ------------------
  |  Branch (2275:17): [True: 0, False: 0]
  ------------------
 2276|      0|                break;
 2277|      0|        }
 2278|      0|        if (done)
  ------------------
  |  Branch (2278:13): [True: 0, False: 0]
  ------------------
 2279|      0|            s->s3.tmp.new_compression = comp;
 2280|      0|        else
 2281|      0|            comp = NULL;
 2282|      0|    }
 2283|       |#else
 2284|       |    /*
 2285|       |     * If compression is disabled we'd better not try to resume a session
 2286|       |     * using compression.
 2287|       |     */
 2288|       |    if (s->session->compress_meth != 0) {
 2289|       |        SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_INCONSISTENT_COMPRESSION);
 2290|       |        goto err;
 2291|       |    }
 2292|       |#endif
 2293|       |
 2294|       |    /*
 2295|       |     * Given s->peer_ciphers and SSL_get_ciphers, we must pick a cipher
 2296|       |     */
 2297|       |
 2298|  3.62k|    if (!s->hit || SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      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 (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      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 (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2298:9): [True: 3.62k, False: 0]
  ------------------
 2299|  3.62k|        sk_SSL_CIPHER_free(s->peer_ciphers);
  ------------------
  |  | 1034|  3.62k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 2300|  3.62k|        s->peer_ciphers = ciphers;
 2301|  3.62k|        if (ciphers == NULL) {
  ------------------
  |  Branch (2301:13): [True: 0, False: 3.62k]
  ------------------
 2302|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2303|      0|            goto err;
 2304|      0|        }
 2305|  3.62k|        ciphers = NULL;
 2306|  3.62k|    }
 2307|       |
 2308|  3.62k|    if (!s->hit) {
  ------------------
  |  Branch (2308:9): [True: 3.62k, False: 0]
  ------------------
 2309|       |#ifdef OPENSSL_NO_COMP
 2310|       |        s->session->compress_meth = 0;
 2311|       |#else
 2312|  3.62k|        s->session->compress_meth = (comp == NULL) ? 0 : comp->id;
  ------------------
  |  Branch (2312:37): [True: 3.62k, False: 0]
  ------------------
 2313|  3.62k|#endif
 2314|  3.62k|    }
 2315|       |
 2316|  3.62k|    sk_SSL_CIPHER_free(ciphers);
  ------------------
  |  | 1034|  3.62k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 2317|  3.62k|    sk_SSL_CIPHER_free(scsvs);
  ------------------
  |  | 1034|  3.62k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 2318|  3.62k|    OPENSSL_free(clienthello->pre_proc_exts);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2319|  3.62k|    OPENSSL_free(s->clienthello);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2320|  3.62k|    s->clienthello = NULL;
 2321|  3.62k|    return 1;
 2322|      0|err:
 2323|      0|    sk_SSL_CIPHER_free(ciphers);
  ------------------
  |  | 1034|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 2324|      0|    sk_SSL_CIPHER_free(scsvs);
  ------------------
  |  | 1034|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 2325|      0|    if (clienthello != NULL)
  ------------------
  |  Branch (2325:9): [True: 0, False: 0]
  ------------------
 2326|      0|        OPENSSL_free(clienthello->pre_proc_exts);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2327|      0|    OPENSSL_free(s->clienthello);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2328|      0|    s->clienthello = NULL;
 2329|       |
 2330|      0|    return 0;
 2331|  3.62k|}
statem_srvr.c:tls_handle_status_request:
 2338|  3.62k|{
 2339|  3.62k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2340|       |
 2341|  3.62k|    s->ext.status_expected = 0;
 2342|       |
 2343|       |    /*
 2344|       |     * If status request then ask callback what to do. Note: this must be
 2345|       |     * called after servername callbacks in case the certificate has changed,
 2346|       |     * and must be called after the cipher has been chosen because this may
 2347|       |     * influence which certificate is sent
 2348|       |     */
 2349|  3.62k|    if (s->ext.status_type != TLSEXT_STATUSTYPE_nothing && sctx != NULL
  ------------------
  |  | 2213|  7.25k|#define TLSEXT_STATUSTYPE_nothing -1
  ------------------
  |  Branch (2349:9): [True: 0, False: 3.62k]
  |  Branch (2349:60): [True: 0, False: 0]
  ------------------
 2350|      0|        && sctx->ext.status_cb != NULL) {
  ------------------
  |  Branch (2350:12): [True: 0, False: 0]
  ------------------
 2351|      0|        int ret;
 2352|       |
 2353|       |        /* If no certificate can't return certificate status */
 2354|      0|        if (s->s3.tmp.cert != NULL) {
  ------------------
  |  Branch (2354:13): [True: 0, False: 0]
  ------------------
 2355|       |            /*
 2356|       |             * Set current certificate to one we will use so SSL_get_certificate
 2357|       |             * et al can pick it up.
 2358|       |             */
 2359|      0|            s->cert->key = s->s3.tmp.cert;
 2360|      0|            ret = sctx->ext.status_cb(SSL_CONNECTION_GET_USER_SSL(s),
  ------------------
  |  |   28|      0|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 2361|      0|                sctx->ext.status_arg);
 2362|      0|            switch (ret) {
 2363|       |                /* We don't want to send a status request response */
 2364|      0|            case SSL_TLSEXT_ERR_NOACK:
  ------------------
  |  |  353|      0|#define SSL_TLSEXT_ERR_NOACK 3
  ------------------
  |  Branch (2364:13): [True: 0, False: 0]
  ------------------
 2365|      0|                s->ext.status_expected = 0;
 2366|      0|                break;
 2367|       |                /* status request response should be sent */
 2368|      0|            case SSL_TLSEXT_ERR_OK:
  ------------------
  |  |  350|      0|#define SSL_TLSEXT_ERR_OK 0
  ------------------
  |  Branch (2368:13): [True: 0, False: 0]
  ------------------
 2369|      0|#ifndef OPENSSL_NO_OCSP
 2370|      0|                if (s->ext.ocsp.resp_ex != NULL
  ------------------
  |  Branch (2370:21): [True: 0, False: 0]
  ------------------
 2371|      0|                    && sk_OCSP_RESPONSE_num(s->ext.ocsp.resp_ex) > 0)
  ------------------
  |  Branch (2371:24): [True: 0, False: 0]
  ------------------
 2372|      0|                    s->ext.status_expected = 1;
 2373|      0|#endif
 2374|      0|                break;
 2375|       |                /* something bad happened */
 2376|      0|            case SSL_TLSEXT_ERR_ALERT_FATAL:
  ------------------
  |  |  352|      0|#define SSL_TLSEXT_ERR_ALERT_FATAL 2
  ------------------
  |  Branch (2376:13): [True: 0, False: 0]
  ------------------
 2377|      0|            default:
  ------------------
  |  Branch (2377:13): [True: 0, False: 0]
  ------------------
 2378|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_CLIENTHELLO_TLSEXT);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2379|      0|                return 0;
 2380|      0|            }
 2381|      0|        }
 2382|      0|    }
 2383|       |
 2384|  3.62k|    return 1;
 2385|  3.62k|}
statem_srvr.c:ssl_check_srp_ext_ClientHello:
 1481|  3.62k|{
 1482|  3.62k|    int ret;
 1483|  3.62k|    int al = SSL_AD_UNRECOGNIZED_NAME;
  ------------------
  |  | 1276|  3.62k|#define SSL_AD_UNRECOGNIZED_NAME TLS1_AD_UNRECOGNIZED_NAME
  |  |  ------------------
  |  |  |  |   76|  3.62k|#define TLS1_AD_UNRECOGNIZED_NAME 112
  |  |  ------------------
  ------------------
 1484|       |
 1485|  3.62k|    if ((s->s3.tmp.new_cipher->algorithm_mkey & SSL_kSRP) && (s->srp_ctx.TLS_ext_srp_username_callback != NULL)) {
  ------------------
  |  |   95|  3.62k|#define SSL_kSRP 0x00000020U
  ------------------
  |  Branch (1485:9): [True: 0, False: 3.62k]
  |  Branch (1485:62): [True: 0, False: 0]
  ------------------
 1486|      0|        if (s->srp_ctx.login == NULL) {
  ------------------
  |  Branch (1486:13): [True: 0, False: 0]
  ------------------
 1487|       |            /*
 1488|       |             * RFC 5054 says SHOULD reject, we do so if There is no srp
 1489|       |             * login name
 1490|       |             */
 1491|      0|            SSLfatal(s, SSL_AD_UNKNOWN_PSK_IDENTITY,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1492|      0|                SSL_R_PSK_IDENTITY_NOT_FOUND);
 1493|      0|            return -1;
 1494|      0|        } else {
 1495|      0|            ret = ssl_srp_server_param_with_username_intern(s, &al);
 1496|      0|            if (ret < 0)
  ------------------
  |  Branch (1496:17): [True: 0, False: 0]
  ------------------
 1497|      0|                return 0;
 1498|      0|            if (ret == SSL3_AL_FATAL) {
  ------------------
  |  |  250|      0|#define SSL3_AL_FATAL 2
  ------------------
  |  Branch (1498:17): [True: 0, False: 0]
  ------------------
 1499|      0|                SSLfatal(s, al,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  |  |  |  Branch (155:54): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1500|      0|                    al == SSL_AD_UNKNOWN_PSK_IDENTITY
 1501|      0|                        ? SSL_R_PSK_IDENTITY_NOT_FOUND
 1502|      0|                        : SSL_R_CLIENTHELLO_TLSEXT);
 1503|      0|                return -1;
 1504|      0|            }
 1505|      0|        }
 1506|      0|    }
 1507|  3.62k|    return 1;
 1508|  3.62k|}
statem_srvr.c:create_ticket_prequel:
 4230|  7.16k|{
 4231|  7.16k|    uint32_t timeout = (uint32_t)ossl_time2seconds(s->session->timeout);
  ------------------
  |  |   43|  7.16k|#define ossl_time2seconds(t) (ossl_time2ticks(t) / OSSL_TIME_SECOND)
  |  |  ------------------
  |  |  |  |   31|  7.16k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  ------------------
  ------------------
 4232|       |
 4233|       |    /*
 4234|       |     * Ticket lifetime hint:
 4235|       |     * In TLSv1.3 we reset the "time" field above, and always specify the
 4236|       |     * timeout, limited to a 1 week period per RFC8446.
 4237|       |     * For TLSv1.2 this is advisory only and we leave this unspecified for
 4238|       |     * resumed session (for simplicity).
 4239|       |     */
 4240|  7.16k|#define ONE_WEEK_SEC (7 * 24 * 60 * 60)
 4241|       |
 4242|  7.16k|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  7.16k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.3k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.16k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  274|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.3k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  275|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.16k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.16k, False: 0]
  |  |  ------------------
  ------------------
 4243|  7.16k|        if (ossl_time_compare(s->session->timeout,
  ------------------
  |  Branch (4243:13): [True: 0, False: 7.16k]
  ------------------
 4244|  7.16k|                ossl_seconds2time(ONE_WEEK_SEC))
  ------------------
  |  |   42|  7.16k|#define ossl_seconds2time(s) ossl_ticks2time((s) * OSSL_TIME_SECOND)
  |  |  ------------------
  |  |  |  |   31|  7.16k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  ------------------
  ------------------
 4245|  7.16k|            > 0)
 4246|      0|            timeout = ONE_WEEK_SEC;
  ------------------
  |  | 4240|      0|#define ONE_WEEK_SEC (7 * 24 * 60 * 60)
  ------------------
 4247|  7.16k|    } else if (s->hit)
  ------------------
  |  Branch (4247:16): [True: 0, False: 0]
  ------------------
 4248|      0|        timeout = 0;
 4249|       |
 4250|  7.16k|    if (!WPACKET_put_bytes_u32(pkt, timeout)) {
  ------------------
  |  |  915|  7.16k|    WPACKET_put_bytes__((pkt), (val), 4)
  ------------------
  |  Branch (4250:9): [True: 0, False: 7.16k]
  ------------------
 4251|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4252|      0|        return 0;
 4253|      0|    }
 4254|       |
 4255|  7.16k|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  7.16k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  14.3k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  7.16k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  274|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  14.3k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 7.16k, False: 0]
  |  |  ------------------
  |  |  275|  7.16k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  7.16k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  7.16k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 7.16k, False: 0]
  |  |  ------------------
  ------------------
 4256|  7.16k|        if (!WPACKET_put_bytes_u32(pkt, age_add)
  ------------------
  |  |  915|  14.3k|    WPACKET_put_bytes__((pkt), (val), 4)
  ------------------
  |  Branch (4256:13): [True: 0, False: 7.16k]
  ------------------
 4257|  7.16k|            || !WPACKET_sub_memcpy_u8(pkt, tick_nonce, TICKET_NONCE_SIZE)) {
  ------------------
  |  |  938|  7.16k|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (4257:16): [True: 0, False: 7.16k]
  ------------------
 4258|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4259|      0|            return 0;
 4260|      0|        }
 4261|  7.16k|    }
 4262|       |
 4263|       |    /* Start the sub-packet for the actual ticket data */
 4264|  7.16k|    if (!WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  812|  7.16k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (4264:9): [True: 0, False: 7.16k]
  ------------------
 4265|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4266|      0|        return 0;
 4267|      0|    }
 4268|       |
 4269|  7.16k|    return 1;
 4270|  7.16k|}
statem_srvr.c:construct_stateless_ticket:
 4276|  7.16k|{
 4277|  7.16k|    unsigned char *senc = NULL;
 4278|  7.16k|    EVP_CIPHER_CTX *ctx = NULL;
 4279|  7.16k|    SSL_HMAC *hctx = NULL;
 4280|  7.16k|    unsigned char *p, *encdata1, *encdata2, *macdata1, *macdata2;
 4281|  7.16k|    const unsigned char *const_p;
 4282|  7.16k|    int len, slen_full, slen, lenfinal;
 4283|  7.16k|    SSL_SESSION *sess;
 4284|  7.16k|    size_t hlen;
 4285|  7.16k|    SSL_CTX *tctx = s->session_ctx;
 4286|  7.16k|    unsigned char iv[EVP_MAX_IV_LENGTH];
 4287|  7.16k|    unsigned char key_name[TLSEXT_KEYNAME_LENGTH];
 4288|  7.16k|    int iv_len;
 4289|  7.16k|    CON_FUNC_RETURN ok = CON_FUNC_ERROR;
 4290|  7.16k|    size_t macoffset, macendoffset;
 4291|  7.16k|    SSL *ssl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  7.16k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 4292|  7.16k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  7.16k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 4293|       |
 4294|       |    /* get session encoding length */
 4295|  7.16k|    slen_full = i2d_SSL_SESSION(s->session, NULL);
 4296|       |    /*
 4297|       |     * Some length values are 16 bits, so forget it if session is too
 4298|       |     * long
 4299|       |     */
 4300|  7.16k|    if (slen_full == 0 || slen_full > 0xFF00) {
  ------------------
  |  Branch (4300:9): [True: 0, False: 7.16k]
  |  Branch (4300:27): [True: 0, False: 7.16k]
  ------------------
 4301|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4302|      0|        goto err;
 4303|      0|    }
 4304|  7.16k|    senc = OPENSSL_malloc(slen_full);
  ------------------
  |  |  107|  7.16k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4305|  7.16k|    if (senc == NULL) {
  ------------------
  |  Branch (4305:9): [True: 0, False: 7.16k]
  ------------------
 4306|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4307|      0|        goto err;
 4308|      0|    }
 4309|       |
 4310|  7.16k|    ctx = EVP_CIPHER_CTX_new();
 4311|  7.16k|    if (ctx == NULL) {
  ------------------
  |  Branch (4311:9): [True: 0, False: 7.16k]
  ------------------
 4312|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4313|      0|        goto err;
 4314|      0|    }
 4315|  7.16k|    hctx = ssl_hmac_new(tctx);
 4316|  7.16k|    if (hctx == NULL) {
  ------------------
  |  Branch (4316:9): [True: 0, False: 7.16k]
  ------------------
 4317|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_SSL_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4318|      0|        goto err;
 4319|      0|    }
 4320|       |
 4321|  7.16k|    p = senc;
 4322|  7.16k|    if (!i2d_SSL_SESSION(s->session, &p)) {
  ------------------
  |  Branch (4322:9): [True: 0, False: 7.16k]
  ------------------
 4323|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4324|      0|        goto err;
 4325|      0|    }
 4326|       |
 4327|       |    /*
 4328|       |     * create a fresh copy (not shared with other threads) to clean up
 4329|       |     */
 4330|  7.16k|    const_p = senc;
 4331|  7.16k|    sess = d2i_SSL_SESSION_ex(NULL, &const_p, slen_full, sctx->libctx,
 4332|  7.16k|        sctx->propq);
 4333|  7.16k|    if (sess == NULL) {
  ------------------
  |  Branch (4333:9): [True: 0, False: 7.16k]
  ------------------
 4334|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4335|      0|        goto err;
 4336|      0|    }
 4337|       |
 4338|  7.16k|    slen = i2d_SSL_SESSION(sess, NULL);
 4339|  7.16k|    if (slen == 0 || slen > slen_full) {
  ------------------
  |  Branch (4339:9): [True: 0, False: 7.16k]
  |  Branch (4339:22): [True: 0, False: 7.16k]
  ------------------
 4340|       |        /* shouldn't ever happen */
 4341|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4342|      0|        SSL_SESSION_free(sess);
 4343|      0|        goto err;
 4344|      0|    }
 4345|  7.16k|    p = senc;
 4346|  7.16k|    if (!i2d_SSL_SESSION(sess, &p)) {
  ------------------
  |  Branch (4346:9): [True: 0, False: 7.16k]
  ------------------
 4347|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4348|      0|        SSL_SESSION_free(sess);
 4349|      0|        goto err;
 4350|      0|    }
 4351|  7.16k|    SSL_SESSION_free(sess);
 4352|       |
 4353|       |    /*
 4354|       |     * Initialize HMAC and cipher contexts. If callback present it does
 4355|       |     * all the work otherwise use generated values from parent ctx.
 4356|       |     */
 4357|  7.16k|#ifndef OPENSSL_NO_DEPRECATED_3_0
 4358|  7.16k|    if (tctx->ext.ticket_key_evp_cb != NULL || tctx->ext.ticket_key_cb != NULL)
  ------------------
  |  Branch (4358:9): [True: 0, False: 7.16k]
  |  Branch (4358:48): [True: 0, False: 7.16k]
  ------------------
 4359|       |#else
 4360|       |    if (tctx->ext.ticket_key_evp_cb != NULL)
 4361|       |#endif
 4362|      0|    {
 4363|      0|        int ret = 0;
 4364|       |
 4365|      0|        if (tctx->ext.ticket_key_evp_cb != NULL)
  ------------------
  |  Branch (4365:13): [True: 0, False: 0]
  ------------------
 4366|      0|            ret = tctx->ext.ticket_key_evp_cb(ssl, key_name, iv, ctx,
 4367|      0|                ssl_hmac_get0_EVP_MAC_CTX(hctx),
 4368|      0|                1);
 4369|      0|#ifndef OPENSSL_NO_DEPRECATED_3_0
 4370|      0|        else if (tctx->ext.ticket_key_cb != NULL)
  ------------------
  |  Branch (4370:18): [True: 0, False: 0]
  ------------------
 4371|       |            /* if 0 is returned, write an empty ticket */
 4372|      0|            ret = tctx->ext.ticket_key_cb(ssl, key_name, iv, ctx,
 4373|      0|                ssl_hmac_get0_HMAC_CTX(hctx), 1);
 4374|      0|#endif
 4375|       |
 4376|      0|        if (ret == 0) {
  ------------------
  |  Branch (4376:13): [True: 0, False: 0]
  ------------------
 4377|       |            /*
 4378|       |             * In TLSv1.2 we construct a 0 length ticket. In TLSv1.3 a 0
 4379|       |             * length ticket is not allowed so we abort construction of the
 4380|       |             * ticket
 4381|       |             */
 4382|      0|            if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      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 (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      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 (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4383|      0|                ok = CON_FUNC_DONT_SEND;
 4384|      0|                goto err;
 4385|      0|            }
 4386|       |            /* Put timeout and length */
 4387|      0|            if (!WPACKET_put_bytes_u32(pkt, 0)
  ------------------
  |  |  915|      0|    WPACKET_put_bytes__((pkt), (val), 4)
  ------------------
  |  Branch (4387:17): [True: 0, False: 0]
  ------------------
 4388|      0|                || !WPACKET_put_bytes_u16(pkt, 0)) {
  ------------------
  |  |  911|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (4388:20): [True: 0, False: 0]
  ------------------
 4389|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4390|      0|                goto err;
 4391|      0|            }
 4392|      0|            OPENSSL_free(senc);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4393|      0|            EVP_CIPHER_CTX_free(ctx);
 4394|      0|            ssl_hmac_free(hctx);
 4395|      0|            return CON_FUNC_SUCCESS;
 4396|      0|        }
 4397|      0|        if (ret < 0) {
  ------------------
  |  Branch (4397:13): [True: 0, False: 0]
  ------------------
 4398|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_CALLBACK_FAILED);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4399|      0|            goto err;
 4400|      0|        }
 4401|      0|        iv_len = EVP_CIPHER_CTX_get_iv_length(ctx);
 4402|      0|        if (iv_len < 0) {
  ------------------
  |  Branch (4402:13): [True: 0, False: 0]
  ------------------
 4403|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4404|      0|            goto err;
 4405|      0|        }
 4406|  7.16k|    } else {
 4407|  7.16k|        EVP_CIPHER *cipher = EVP_CIPHER_fetch(sctx->libctx, "AES-256-CBC",
 4408|  7.16k|            sctx->propq);
 4409|       |
 4410|  7.16k|        if (cipher == NULL) {
  ------------------
  |  Branch (4410:13): [True: 0, False: 7.16k]
  ------------------
 4411|       |            /* Error is already recorded */
 4412|      0|            SSLfatal_alert(s, SSL_AD_INTERNAL_ERROR);
  ------------------
  |  |  154|      0|#define SSLfatal_alert(s, al) ossl_statem_send_fatal((s), (al))
  ------------------
 4413|      0|            goto err;
 4414|      0|        }
 4415|       |
 4416|  7.16k|        iv_len = EVP_CIPHER_get_iv_length(cipher);
 4417|  7.16k|        if (iv_len < 0
  ------------------
  |  Branch (4417:13): [True: 0, False: 7.16k]
  ------------------
 4418|  7.16k|            || RAND_bytes_ex(sctx->libctx, iv, iv_len, 0) <= 0
  ------------------
  |  Branch (4418:16): [True: 0, False: 7.16k]
  ------------------
 4419|  7.16k|            || !EVP_EncryptInit_ex(ctx, cipher, NULL,
  ------------------
  |  Branch (4419:16): [True: 0, False: 7.16k]
  ------------------
 4420|  7.16k|                tctx->ext.secure->tick_aes_key, iv)
 4421|  7.16k|            || !ssl_hmac_init(hctx, tctx->ext.secure->tick_hmac_key,
  ------------------
  |  Branch (4421:16): [True: 0, False: 7.16k]
  ------------------
 4422|  7.16k|                sizeof(tctx->ext.secure->tick_hmac_key),
 4423|  7.16k|                "SHA256")) {
 4424|      0|            EVP_CIPHER_free(cipher);
 4425|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4426|      0|            goto err;
 4427|      0|        }
 4428|  7.16k|        EVP_CIPHER_free(cipher);
 4429|  7.16k|        memcpy(key_name, tctx->ext.tick_key_name,
 4430|  7.16k|            sizeof(tctx->ext.tick_key_name));
 4431|  7.16k|    }
 4432|       |
 4433|  7.16k|    if (!create_ticket_prequel(s, pkt, age_add, tick_nonce)) {
  ------------------
  |  Branch (4433:9): [True: 0, False: 7.16k]
  ------------------
 4434|       |        /* SSLfatal() already called */
 4435|      0|        goto err;
 4436|      0|    }
 4437|       |
 4438|  7.16k|    if (!WPACKET_get_total_written(pkt, &macoffset)
  ------------------
  |  Branch (4438:9): [True: 0, False: 7.16k]
  ------------------
 4439|       |        /* Output key name */
 4440|  7.16k|        || !WPACKET_memcpy(pkt, key_name, sizeof(key_name))
  ------------------
  |  Branch (4440:12): [True: 0, False: 7.16k]
  ------------------
 4441|       |        /* output IV */
 4442|  7.16k|        || !WPACKET_memcpy(pkt, iv, iv_len)
  ------------------
  |  Branch (4442:12): [True: 0, False: 7.16k]
  ------------------
 4443|  7.16k|        || !WPACKET_reserve_bytes(pkt, slen + EVP_MAX_BLOCK_LENGTH,
  ------------------
  |  |   37|  7.16k|#define EVP_MAX_BLOCK_LENGTH 32
  ------------------
  |  Branch (4443:12): [True: 0, False: 7.16k]
  ------------------
 4444|  7.16k|            &encdata1)
 4445|       |        /* Encrypt session data */
 4446|  7.16k|        || !EVP_EncryptUpdate(ctx, encdata1, &len, senc, slen)
  ------------------
  |  Branch (4446:12): [True: 0, False: 7.16k]
  ------------------
 4447|  7.16k|        || !WPACKET_allocate_bytes(pkt, len, &encdata2)
  ------------------
  |  Branch (4447:12): [True: 0, False: 7.16k]
  ------------------
 4448|  7.16k|        || encdata1 != encdata2
  ------------------
  |  Branch (4448:12): [True: 0, False: 7.16k]
  ------------------
 4449|  7.16k|        || !EVP_EncryptFinal(ctx, encdata1 + len, &lenfinal)
  ------------------
  |  Branch (4449:12): [True: 0, False: 7.16k]
  ------------------
 4450|  7.16k|        || !WPACKET_allocate_bytes(pkt, lenfinal, &encdata2)
  ------------------
  |  Branch (4450:12): [True: 0, False: 7.16k]
  ------------------
 4451|  7.16k|        || encdata1 + len != encdata2
  ------------------
  |  Branch (4451:12): [True: 0, False: 7.16k]
  ------------------
 4452|  7.16k|        || len + lenfinal > slen + EVP_MAX_BLOCK_LENGTH
  ------------------
  |  |   37|  14.3k|#define EVP_MAX_BLOCK_LENGTH 32
  ------------------
  |  Branch (4452:12): [True: 0, False: 7.16k]
  ------------------
 4453|  7.16k|        || !WPACKET_get_total_written(pkt, &macendoffset)
  ------------------
  |  Branch (4453:12): [True: 0, False: 7.16k]
  ------------------
 4454|  7.16k|        || !ssl_hmac_update(hctx,
  ------------------
  |  Branch (4454:12): [True: 0, False: 7.16k]
  ------------------
 4455|  7.16k|            (unsigned char *)s->init_buf->data + macoffset,
 4456|  7.16k|            macendoffset - macoffset)
 4457|  7.16k|        || !WPACKET_reserve_bytes(pkt, EVP_MAX_MD_SIZE, &macdata1)
  ------------------
  |  |   34|  7.16k|#define EVP_MAX_MD_SIZE 64 /* longest known is SHA512 */
  ------------------
  |  Branch (4457:12): [True: 0, False: 7.16k]
  ------------------
 4458|  7.16k|        || !ssl_hmac_final(hctx, macdata1, &hlen, EVP_MAX_MD_SIZE)
  ------------------
  |  |   34|  7.16k|#define EVP_MAX_MD_SIZE 64 /* longest known is SHA512 */
  ------------------
  |  Branch (4458:12): [True: 0, False: 7.16k]
  ------------------
 4459|  7.16k|        || hlen > EVP_MAX_MD_SIZE
  ------------------
  |  |   34|  14.3k|#define EVP_MAX_MD_SIZE 64 /* longest known is SHA512 */
  ------------------
  |  Branch (4459:12): [True: 0, False: 7.16k]
  ------------------
 4460|  7.16k|        || !WPACKET_allocate_bytes(pkt, hlen, &macdata2)
  ------------------
  |  Branch (4460:12): [True: 0, False: 7.16k]
  ------------------
 4461|  7.16k|        || macdata1 != macdata2) {
  ------------------
  |  Branch (4461:12): [True: 0, False: 7.16k]
  ------------------
 4462|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4463|      0|        goto err;
 4464|      0|    }
 4465|       |
 4466|       |    /* Close the sub-packet created by create_ticket_prequel() */
 4467|  7.16k|    if (!WPACKET_close(pkt)) {
  ------------------
  |  Branch (4467:9): [True: 0, False: 7.16k]
  ------------------
 4468|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4469|      0|        goto err;
 4470|      0|    }
 4471|       |
 4472|  7.16k|    ok = CON_FUNC_SUCCESS;
 4473|  7.16k|err:
 4474|  7.16k|    OPENSSL_free(senc);
  ------------------
  |  |  132|  7.16k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4475|  7.16k|    EVP_CIPHER_CTX_free(ctx);
 4476|  7.16k|    ssl_hmac_free(hctx);
 4477|  7.16k|    return ok;
 4478|  7.16k|}
statem_srvr.c:tls_update_ticket_counts:
 4500|  7.16k|{
 4501|       |    /*
 4502|       |     * Increment both |sent_tickets| and |next_ticket_nonce|. |sent_tickets|
 4503|       |     * gets reset to 0 if we send more tickets following a post-handshake
 4504|       |     * auth, but |next_ticket_nonce| does not.  If we're sending extra
 4505|       |     * tickets, decrement the count of pending extra tickets.
 4506|       |     */
 4507|  7.16k|    s->sent_tickets++;
 4508|  7.16k|    s->next_ticket_nonce++;
 4509|  7.16k|    if (s->ext.extra_tickets_expected > 0)
  ------------------
  |  Branch (4509:9): [True: 0, False: 7.16k]
  ------------------
 4510|      0|        s->ext.extra_tickets_expected--;
 4511|  7.16k|}
statem_srvr.c:tls_construct_encrypted_extensions:
 4736|  3.62k|{
 4737|  3.62k|    if (!tls_construct_extensions(s, pkt, SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS,
  ------------------
  |  |  304|  3.62k|#define SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS 0x00400
  ------------------
  |  Branch (4737:9): [True: 0, False: 3.62k]
  ------------------
 4738|  3.62k|            NULL, 0)) {
 4739|       |        /* SSLfatal() already called */
 4740|      0|        return CON_FUNC_ERROR;
 4741|      0|    }
 4742|       |
 4743|  3.62k|    return CON_FUNC_SUCCESS;
 4744|  3.62k|}

tls1_alert_code:
  533|  6.48k|{
  534|  6.48k|    switch (code) {
  535|  6.48k|    case SSL_AD_CLOSE_NOTIFY:
  ------------------
  |  | 1232|  6.48k|#define SSL_AD_CLOSE_NOTIFY SSL3_AD_CLOSE_NOTIFY
  |  |  ------------------
  |  |  |  |  252|  6.48k|#define SSL3_AD_CLOSE_NOTIFY 0
  |  |  ------------------
  ------------------
  |  Branch (535:5): [True: 6.48k, False: 0]
  ------------------
  536|  6.48k|        return SSL3_AD_CLOSE_NOTIFY;
  ------------------
  |  |  252|  6.48k|#define SSL3_AD_CLOSE_NOTIFY 0
  ------------------
  537|      0|    case SSL_AD_UNEXPECTED_MESSAGE:
  ------------------
  |  | 1234|      0|#define SSL_AD_UNEXPECTED_MESSAGE SSL3_AD_UNEXPECTED_MESSAGE
  |  |  ------------------
  |  |  |  |  253|      0|#define SSL3_AD_UNEXPECTED_MESSAGE 10 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (537:5): [True: 0, False: 6.48k]
  ------------------
  538|      0|        return SSL3_AD_UNEXPECTED_MESSAGE;
  ------------------
  |  |  253|      0|#define SSL3_AD_UNEXPECTED_MESSAGE 10 /* fatal */
  ------------------
  539|      0|    case SSL_AD_BAD_RECORD_MAC:
  ------------------
  |  | 1236|      0|#define SSL_AD_BAD_RECORD_MAC SSL3_AD_BAD_RECORD_MAC
  |  |  ------------------
  |  |  |  |  254|      0|#define SSL3_AD_BAD_RECORD_MAC 20 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (539:5): [True: 0, False: 6.48k]
  ------------------
  540|      0|        return SSL3_AD_BAD_RECORD_MAC;
  ------------------
  |  |  254|      0|#define SSL3_AD_BAD_RECORD_MAC 20 /* fatal */
  ------------------
  541|      0|    case SSL_AD_DECRYPTION_FAILED:
  ------------------
  |  | 1237|      0|#define SSL_AD_DECRYPTION_FAILED TLS1_AD_DECRYPTION_FAILED
  |  |  ------------------
  |  |  |  |   57|      0|#define TLS1_AD_DECRYPTION_FAILED 21
  |  |  ------------------
  ------------------
  |  Branch (541:5): [True: 0, False: 6.48k]
  ------------------
  542|      0|        return TLS1_AD_DECRYPTION_FAILED;
  ------------------
  |  |   57|      0|#define TLS1_AD_DECRYPTION_FAILED 21
  ------------------
  543|      0|    case SSL_AD_RECORD_OVERFLOW:
  ------------------
  |  | 1238|      0|#define SSL_AD_RECORD_OVERFLOW TLS1_AD_RECORD_OVERFLOW
  |  |  ------------------
  |  |  |  |   58|      0|#define TLS1_AD_RECORD_OVERFLOW 22
  |  |  ------------------
  ------------------
  |  Branch (543:5): [True: 0, False: 6.48k]
  ------------------
  544|      0|        return TLS1_AD_RECORD_OVERFLOW;
  ------------------
  |  |   58|      0|#define TLS1_AD_RECORD_OVERFLOW 22
  ------------------
  545|      0|    case SSL_AD_DECOMPRESSION_FAILURE:
  ------------------
  |  | 1240|      0|#define SSL_AD_DECOMPRESSION_FAILURE SSL3_AD_DECOMPRESSION_FAILURE
  |  |  ------------------
  |  |  |  |  255|      0|#define SSL3_AD_DECOMPRESSION_FAILURE 30 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (545:5): [True: 0, False: 6.48k]
  ------------------
  546|      0|        return SSL3_AD_DECOMPRESSION_FAILURE;
  ------------------
  |  |  255|      0|#define SSL3_AD_DECOMPRESSION_FAILURE 30 /* fatal */
  ------------------
  547|      0|    case SSL_AD_HANDSHAKE_FAILURE:
  ------------------
  |  | 1242|      0|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      0|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (547:5): [True: 0, False: 6.48k]
  ------------------
  548|      0|        return SSL3_AD_HANDSHAKE_FAILURE;
  ------------------
  |  |  256|      0|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  ------------------
  549|      0|    case SSL_AD_NO_CERTIFICATE:
  ------------------
  |  | 1244|      0|#define SSL_AD_NO_CERTIFICATE SSL3_AD_NO_CERTIFICATE
  |  |  ------------------
  |  |  |  |  257|      0|#define SSL3_AD_NO_CERTIFICATE 41
  |  |  ------------------
  ------------------
  |  Branch (549:5): [True: 0, False: 6.48k]
  ------------------
  550|      0|        return -1;
  551|      0|    case SSL_AD_BAD_CERTIFICATE:
  ------------------
  |  | 1245|      0|#define SSL_AD_BAD_CERTIFICATE SSL3_AD_BAD_CERTIFICATE
  |  |  ------------------
  |  |  |  |  258|      0|#define SSL3_AD_BAD_CERTIFICATE 42
  |  |  ------------------
  ------------------
  |  Branch (551:5): [True: 0, False: 6.48k]
  ------------------
  552|      0|        return SSL3_AD_BAD_CERTIFICATE;
  ------------------
  |  |  258|      0|#define SSL3_AD_BAD_CERTIFICATE 42
  ------------------
  553|      0|    case SSL_AD_UNSUPPORTED_CERTIFICATE:
  ------------------
  |  | 1246|      0|#define SSL_AD_UNSUPPORTED_CERTIFICATE SSL3_AD_UNSUPPORTED_CERTIFICATE
  |  |  ------------------
  |  |  |  |  259|      0|#define SSL3_AD_UNSUPPORTED_CERTIFICATE 43
  |  |  ------------------
  ------------------
  |  Branch (553:5): [True: 0, False: 6.48k]
  ------------------
  554|      0|        return SSL3_AD_UNSUPPORTED_CERTIFICATE;
  ------------------
  |  |  259|      0|#define SSL3_AD_UNSUPPORTED_CERTIFICATE 43
  ------------------
  555|      0|    case SSL_AD_CERTIFICATE_REVOKED:
  ------------------
  |  | 1247|      0|#define SSL_AD_CERTIFICATE_REVOKED SSL3_AD_CERTIFICATE_REVOKED
  |  |  ------------------
  |  |  |  |  260|      0|#define SSL3_AD_CERTIFICATE_REVOKED 44
  |  |  ------------------
  ------------------
  |  Branch (555:5): [True: 0, False: 6.48k]
  ------------------
  556|      0|        return SSL3_AD_CERTIFICATE_REVOKED;
  ------------------
  |  |  260|      0|#define SSL3_AD_CERTIFICATE_REVOKED 44
  ------------------
  557|      0|    case SSL_AD_CERTIFICATE_EXPIRED:
  ------------------
  |  | 1248|      0|#define SSL_AD_CERTIFICATE_EXPIRED SSL3_AD_CERTIFICATE_EXPIRED
  |  |  ------------------
  |  |  |  |  261|      0|#define SSL3_AD_CERTIFICATE_EXPIRED 45
  |  |  ------------------
  ------------------
  |  Branch (557:5): [True: 0, False: 6.48k]
  ------------------
  558|      0|        return SSL3_AD_CERTIFICATE_EXPIRED;
  ------------------
  |  |  261|      0|#define SSL3_AD_CERTIFICATE_EXPIRED 45
  ------------------
  559|      0|    case SSL_AD_CERTIFICATE_UNKNOWN:
  ------------------
  |  | 1249|      0|#define SSL_AD_CERTIFICATE_UNKNOWN SSL3_AD_CERTIFICATE_UNKNOWN
  |  |  ------------------
  |  |  |  |  262|      0|#define SSL3_AD_CERTIFICATE_UNKNOWN 46
  |  |  ------------------
  ------------------
  |  Branch (559:5): [True: 0, False: 6.48k]
  ------------------
  560|      0|        return SSL3_AD_CERTIFICATE_UNKNOWN;
  ------------------
  |  |  262|      0|#define SSL3_AD_CERTIFICATE_UNKNOWN 46
  ------------------
  561|      0|    case SSL_AD_ILLEGAL_PARAMETER:
  ------------------
  |  | 1251|      0|#define SSL_AD_ILLEGAL_PARAMETER SSL3_AD_ILLEGAL_PARAMETER
  |  |  ------------------
  |  |  |  |  263|      0|#define SSL3_AD_ILLEGAL_PARAMETER 47 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (561:5): [True: 0, False: 6.48k]
  ------------------
  562|      0|        return SSL3_AD_ILLEGAL_PARAMETER;
  ------------------
  |  |  263|      0|#define SSL3_AD_ILLEGAL_PARAMETER 47 /* fatal */
  ------------------
  563|      0|    case SSL_AD_UNKNOWN_CA:
  ------------------
  |  | 1253|      0|#define SSL_AD_UNKNOWN_CA TLS1_AD_UNKNOWN_CA
  |  |  ------------------
  |  |  |  |   59|      0|#define TLS1_AD_UNKNOWN_CA 48 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (563:5): [True: 0, False: 6.48k]
  ------------------
  564|      0|        return TLS1_AD_UNKNOWN_CA;
  ------------------
  |  |   59|      0|#define TLS1_AD_UNKNOWN_CA 48 /* fatal */
  ------------------
  565|      0|    case SSL_AD_ACCESS_DENIED:
  ------------------
  |  | 1255|      0|#define SSL_AD_ACCESS_DENIED TLS1_AD_ACCESS_DENIED
  |  |  ------------------
  |  |  |  |   60|      0|#define TLS1_AD_ACCESS_DENIED 49 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (565:5): [True: 0, False: 6.48k]
  ------------------
  566|      0|        return TLS1_AD_ACCESS_DENIED;
  ------------------
  |  |   60|      0|#define TLS1_AD_ACCESS_DENIED 49 /* fatal */
  ------------------
  567|      0|    case SSL_AD_DECODE_ERROR:
  ------------------
  |  | 1257|      0|#define SSL_AD_DECODE_ERROR TLS1_AD_DECODE_ERROR
  |  |  ------------------
  |  |  |  |   61|      0|#define TLS1_AD_DECODE_ERROR 50 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (567:5): [True: 0, False: 6.48k]
  ------------------
  568|      0|        return TLS1_AD_DECODE_ERROR;
  ------------------
  |  |   61|      0|#define TLS1_AD_DECODE_ERROR 50 /* fatal */
  ------------------
  569|      0|    case SSL_AD_DECRYPT_ERROR:
  ------------------
  |  | 1258|      0|#define SSL_AD_DECRYPT_ERROR TLS1_AD_DECRYPT_ERROR
  |  |  ------------------
  |  |  |  |   62|      0|#define TLS1_AD_DECRYPT_ERROR 51
  |  |  ------------------
  ------------------
  |  Branch (569:5): [True: 0, False: 6.48k]
  ------------------
  570|      0|        return TLS1_AD_DECRYPT_ERROR;
  ------------------
  |  |   62|      0|#define TLS1_AD_DECRYPT_ERROR 51
  ------------------
  571|      0|    case SSL_AD_EXPORT_RESTRICTION:
  ------------------
  |  | 1260|      0|#define SSL_AD_EXPORT_RESTRICTION TLS1_AD_EXPORT_RESTRICTION
  |  |  ------------------
  |  |  |  |   63|      0|#define TLS1_AD_EXPORT_RESTRICTION 60 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (571:5): [True: 0, False: 6.48k]
  ------------------
  572|      0|        return TLS1_AD_EXPORT_RESTRICTION;
  ------------------
  |  |   63|      0|#define TLS1_AD_EXPORT_RESTRICTION 60 /* fatal */
  ------------------
  573|      0|    case SSL_AD_PROTOCOL_VERSION:
  ------------------
  |  | 1262|      0|#define SSL_AD_PROTOCOL_VERSION TLS1_AD_PROTOCOL_VERSION
  |  |  ------------------
  |  |  |  |   64|      0|#define TLS1_AD_PROTOCOL_VERSION 70 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (573:5): [True: 0, False: 6.48k]
  ------------------
  574|      0|        return TLS1_AD_PROTOCOL_VERSION;
  ------------------
  |  |   64|      0|#define TLS1_AD_PROTOCOL_VERSION 70 /* fatal */
  ------------------
  575|      0|    case SSL_AD_INSUFFICIENT_SECURITY:
  ------------------
  |  | 1264|      0|#define SSL_AD_INSUFFICIENT_SECURITY TLS1_AD_INSUFFICIENT_SECURITY
  |  |  ------------------
  |  |  |  |   65|      0|#define TLS1_AD_INSUFFICIENT_SECURITY 71 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (575:5): [True: 0, False: 6.48k]
  ------------------
  576|      0|        return TLS1_AD_INSUFFICIENT_SECURITY;
  ------------------
  |  |   65|      0|#define TLS1_AD_INSUFFICIENT_SECURITY 71 /* fatal */
  ------------------
  577|      0|    case SSL_AD_INTERNAL_ERROR:
  ------------------
  |  | 1266|      0|#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR
  |  |  ------------------
  |  |  |  |   66|      0|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (577:5): [True: 0, False: 6.48k]
  ------------------
  578|      0|        return TLS1_AD_INTERNAL_ERROR;
  ------------------
  |  |   66|      0|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  ------------------
  579|      0|    case SSL_AD_USER_CANCELLED:
  ------------------
  |  | 1267|      0|#define SSL_AD_USER_CANCELLED TLS1_AD_USER_CANCELLED
  |  |  ------------------
  |  |  |  |   68|      0|#define TLS1_AD_USER_CANCELLED 90
  |  |  ------------------
  ------------------
  |  Branch (579:5): [True: 0, False: 6.48k]
  ------------------
  580|      0|        return TLS1_AD_USER_CANCELLED;
  ------------------
  |  |   68|      0|#define TLS1_AD_USER_CANCELLED 90
  ------------------
  581|      0|    case SSL_AD_NO_RENEGOTIATION:
  ------------------
  |  | 1268|      0|#define SSL_AD_NO_RENEGOTIATION TLS1_AD_NO_RENEGOTIATION
  |  |  ------------------
  |  |  |  |   69|      0|#define TLS1_AD_NO_RENEGOTIATION 100
  |  |  ------------------
  ------------------
  |  Branch (581:5): [True: 0, False: 6.48k]
  ------------------
  582|      0|        return TLS1_AD_NO_RENEGOTIATION;
  ------------------
  |  |   69|      0|#define TLS1_AD_NO_RENEGOTIATION 100
  ------------------
  583|      0|    case SSL_AD_UNSUPPORTED_EXTENSION:
  ------------------
  |  | 1274|      0|#define SSL_AD_UNSUPPORTED_EXTENSION TLS1_AD_UNSUPPORTED_EXTENSION
  |  |  ------------------
  |  |  |  |   74|      0|#define TLS1_AD_UNSUPPORTED_EXTENSION 110
  |  |  ------------------
  ------------------
  |  Branch (583:5): [True: 0, False: 6.48k]
  ------------------
  584|      0|        return TLS1_AD_UNSUPPORTED_EXTENSION;
  ------------------
  |  |   74|      0|#define TLS1_AD_UNSUPPORTED_EXTENSION 110
  ------------------
  585|      0|    case SSL_AD_CERTIFICATE_UNOBTAINABLE:
  ------------------
  |  | 1275|      0|#define SSL_AD_CERTIFICATE_UNOBTAINABLE TLS1_AD_CERTIFICATE_UNOBTAINABLE
  |  |  ------------------
  |  |  |  |   75|      0|#define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111
  |  |  ------------------
  ------------------
  |  Branch (585:5): [True: 0, False: 6.48k]
  ------------------
  586|      0|        return TLS1_AD_CERTIFICATE_UNOBTAINABLE;
  ------------------
  |  |   75|      0|#define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111
  ------------------
  587|      0|    case SSL_AD_UNRECOGNIZED_NAME:
  ------------------
  |  | 1276|      0|#define SSL_AD_UNRECOGNIZED_NAME TLS1_AD_UNRECOGNIZED_NAME
  |  |  ------------------
  |  |  |  |   76|      0|#define TLS1_AD_UNRECOGNIZED_NAME 112
  |  |  ------------------
  ------------------
  |  Branch (587:5): [True: 0, False: 6.48k]
  ------------------
  588|      0|        return TLS1_AD_UNRECOGNIZED_NAME;
  ------------------
  |  |   76|      0|#define TLS1_AD_UNRECOGNIZED_NAME 112
  ------------------
  589|      0|    case SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE:
  ------------------
  |  | 1277|      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 (589:5): [True: 0, False: 6.48k]
  ------------------
  590|      0|        return TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE;
  ------------------
  |  |   77|      0|#define TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE 113
  ------------------
  591|      0|    case SSL_AD_BAD_CERTIFICATE_HASH_VALUE:
  ------------------
  |  | 1278|      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 (591:5): [True: 0, False: 6.48k]
  ------------------
  592|      0|        return TLS1_AD_BAD_CERTIFICATE_HASH_VALUE;
  ------------------
  |  |   78|      0|#define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114
  ------------------
  593|      0|    case SSL_AD_UNKNOWN_PSK_IDENTITY:
  ------------------
  |  | 1280|      0|#define SSL_AD_UNKNOWN_PSK_IDENTITY TLS1_AD_UNKNOWN_PSK_IDENTITY
  |  |  ------------------
  |  |  |  |   79|      0|#define TLS1_AD_UNKNOWN_PSK_IDENTITY 115 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (593:5): [True: 0, False: 6.48k]
  ------------------
  594|      0|        return TLS1_AD_UNKNOWN_PSK_IDENTITY;
  ------------------
  |  |   79|      0|#define TLS1_AD_UNKNOWN_PSK_IDENTITY 115 /* fatal */
  ------------------
  595|      0|    case SSL_AD_INAPPROPRIATE_FALLBACK:
  ------------------
  |  | 1282|      0|#define SSL_AD_INAPPROPRIATE_FALLBACK TLS1_AD_INAPPROPRIATE_FALLBACK
  |  |  ------------------
  |  |  |  |   67|      0|#define TLS1_AD_INAPPROPRIATE_FALLBACK 86 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (595:5): [True: 0, False: 6.48k]
  ------------------
  596|      0|        return TLS1_AD_INAPPROPRIATE_FALLBACK;
  ------------------
  |  |   67|      0|#define TLS1_AD_INAPPROPRIATE_FALLBACK 86 /* fatal */
  ------------------
  597|      0|    case SSL_AD_NO_APPLICATION_PROTOCOL:
  ------------------
  |  | 1283|      0|#define SSL_AD_NO_APPLICATION_PROTOCOL TLS1_AD_NO_APPLICATION_PROTOCOL
  |  |  ------------------
  |  |  |  |   80|      0|#define TLS1_AD_NO_APPLICATION_PROTOCOL 120 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (597:5): [True: 0, False: 6.48k]
  ------------------
  598|      0|        return TLS1_AD_NO_APPLICATION_PROTOCOL;
  ------------------
  |  |   80|      0|#define TLS1_AD_NO_APPLICATION_PROTOCOL 120 /* fatal */
  ------------------
  599|      0|    case SSL_AD_CERTIFICATE_REQUIRED:
  ------------------
  |  | 1270|      0|#define SSL_AD_CERTIFICATE_REQUIRED TLS13_AD_CERTIFICATE_REQUIRED
  |  |  ------------------
  |  |  |  |   72|      0|#define TLS13_AD_CERTIFICATE_REQUIRED 116 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (599:5): [True: 0, False: 6.48k]
  ------------------
  600|      0|        return SSL_AD_HANDSHAKE_FAILURE;
  ------------------
  |  | 1242|      0|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      0|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
  601|      0|    case TLS13_AD_MISSING_EXTENSION:
  ------------------
  |  |   71|      0|#define TLS13_AD_MISSING_EXTENSION 109 /* fatal */
  ------------------
  |  Branch (601:5): [True: 0, False: 6.48k]
  ------------------
  602|      0|        return SSL_AD_HANDSHAKE_FAILURE;
  ------------------
  |  | 1242|      0|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      0|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
  603|      0|#ifndef OPENSSL_NO_ECH
  604|      0|    case SSL_AD_ECH_REQUIRED:
  ------------------
  |  | 1272|      0|#define SSL_AD_ECH_REQUIRED TLS1_AD_ECH_REQUIRED
  |  |  ------------------
  |  |  |  |   82|      0|#define TLS1_AD_ECH_REQUIRED 121 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (604:5): [True: 0, False: 6.48k]
  ------------------
  605|      0|        return TLS1_AD_ECH_REQUIRED;
  ------------------
  |  |   82|      0|#define TLS1_AD_ECH_REQUIRED 121 /* fatal */
  ------------------
  606|      0|#endif
  607|      0|    default:
  ------------------
  |  Branch (607:5): [True: 0, False: 6.48k]
  ------------------
  608|      0|        return -1;
  609|  6.48k|    }
  610|  6.48k|}

tls1_default_timeout:
   99|  7.36k|{
  100|       |    /*
  101|       |     * 2 hours, the 24 hours mentioned in the TLSv1 spec is way too long for
  102|       |     * http, the cache would over fill
  103|       |     */
  104|  7.36k|    return ossl_seconds2time(60 * 60 * 2);
  ------------------
  |  |   42|  7.36k|#define ossl_seconds2time(s) ossl_ticks2time((s) * OSSL_TIME_SECOND)
  |  |  ------------------
  |  |  |  |   31|  7.36k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  ------------------
  ------------------
  105|  7.36k|}
tls1_new:
  108|  7.25k|{
  109|  7.25k|    if (!ssl3_new(s))
  ------------------
  |  Branch (109:9): [True: 0, False: 7.25k]
  ------------------
  110|      0|        return 0;
  111|  7.25k|    if (!s->method->ssl_clear(s))
  ------------------
  |  Branch (111:9): [True: 0, False: 7.25k]
  ------------------
  112|      0|        return 0;
  113|       |
  114|  7.25k|    return 1;
  115|  7.25k|}
tls1_free:
  118|  7.25k|{
  119|  7.25k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  7.25k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  7.25k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 7.25k]
  |  |  |  |  ------------------
  |  |  |  |   33|  7.25k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  7.25k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 7.25k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  7.25k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  7.25k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  120|       |
  121|  7.25k|    if (sc == NULL)
  ------------------
  |  Branch (121:9): [True: 0, False: 7.25k]
  ------------------
  122|      0|        return;
  123|       |
  124|  7.25k|    OPENSSL_free(sc->ext.session_ticket);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  125|  7.25k|    ssl3_free(s);
  126|  7.25k|}
tls1_clear:
  129|  29.0k|{
  130|  29.0k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  29.0k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  29.0k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 29.0k]
  |  |  |  |  ------------------
  |  |  |  |   33|  29.0k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1225|  29.0k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 29.0k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  29.0k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  29.0k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1231|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1231:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  131|       |
  132|  29.0k|    if (sc == NULL)
  ------------------
  |  Branch (132:9): [True: 0, False: 29.0k]
  ------------------
  133|      0|        return 0;
  134|       |
  135|  29.0k|    if (!ssl3_clear(s))
  ------------------
  |  Branch (135:9): [True: 0, False: 29.0k]
  ------------------
  136|      0|        return 0;
  137|       |
  138|  29.0k|    if (s->method->version == TLS_ANY_VERSION)
  ------------------
  |  |   40|  29.0k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (138:9): [True: 29.0k, False: 0]
  ------------------
  139|  29.0k|        sc->version = TLS_MAX_VERSION_INTERNAL;
  ------------------
  |  |   54|  29.0k|#define TLS_MAX_VERSION_INTERNAL TLS1_3_VERSION
  |  |  ------------------
  |  |  |  |   27|  29.0k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  ------------------
  140|      0|    else
  141|      0|        sc->version = s->method->version;
  142|       |
  143|  29.0k|    return 1;
  144|  29.0k|}
ssl_load_groups:
  382|  7.36k|{
  383|  7.36k|    if (!OSSL_PROVIDER_do_all(ctx->libctx, discover_provider_groups, ctx))
  ------------------
  |  Branch (383:9): [True: 0, False: 7.36k]
  ------------------
  384|      0|        return 0;
  385|       |
  386|  7.36k|    return SSL_CTX_set1_groups_list(ctx, TLS_DEFAULT_GROUP_LIST);
  ------------------
  |  | 1531|  7.36k|    SSL_CTX_ctrl(ctx, SSL_CTRL_SET_GROUPS_LIST, 0, (char *)(s))
  |  |  ------------------
  |  |  |  | 1379|  7.36k|#define SSL_CTRL_SET_GROUPS_LIST 92
  |  |  ------------------
  ------------------
  387|  7.36k|}
ssl_load_sigalgs:
  696|  7.36k|{
  697|  7.36k|    size_t i;
  698|  7.36k|    SSL_CERT_LOOKUP lu;
  699|       |
  700|  7.36k|    if (!OSSL_PROVIDER_do_all(ctx->libctx, discover_provider_sigalgs, ctx))
  ------------------
  |  Branch (700:9): [True: 0, False: 7.36k]
  ------------------
  701|      0|        return 0;
  702|       |
  703|       |    /* now populate ctx->ssl_cert_info */
  704|  7.36k|    if (ctx->sigalg_list_len > 0) {
  ------------------
  |  Branch (704:9): [True: 7.36k, False: 0]
  ------------------
  705|  7.36k|        OPENSSL_free(ctx->ssl_cert_info);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  706|  7.36k|        ctx->ssl_cert_info = OPENSSL_calloc(ctx->sigalg_list_len, sizeof(lu));
  ------------------
  |  |  113|  7.36k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  707|  7.36k|        if (ctx->ssl_cert_info == NULL)
  ------------------
  |  Branch (707:13): [True: 0, False: 7.36k]
  ------------------
  708|      0|            return 0;
  709|  36.8k|        for (i = 0; i < ctx->sigalg_list_len; i++) {
  ------------------
  |  Branch (709:21): [True: 29.4k, False: 7.36k]
  ------------------
  710|  29.4k|            const char *keytype = inferred_keytype(&ctx->sigalg_list[i]);
  711|  29.4k|            ctx->ssl_cert_info[i].pkey_nid = OBJ_txt2nid(keytype);
  712|  29.4k|            ctx->ssl_cert_info[i].amask = SSL_aANY;
  ------------------
  |  |  128|  29.4k|#define SSL_aANY 0x00000000U
  ------------------
  713|  29.4k|        }
  714|  7.36k|    }
  715|       |
  716|       |    /*
  717|       |     * For now, leave it at this: legacy sigalgs stay in their own
  718|       |     * data structures until "legacy cleanup" occurs.
  719|       |     */
  720|       |
  721|  7.36k|    return 1;
  722|  7.36k|}
tls1_group_id_lookup:
  738|   228k|{
  739|   228k|    size_t i;
  740|       |
  741|  1.66M|    for (i = 0; i < ctx->group_list_len; i++) {
  ------------------
  |  Branch (741:17): [True: 1.66M, False: 0]
  ------------------
  742|  1.66M|        if (ctx->group_list[i].group_id == group_id)
  ------------------
  |  Branch (742:13): [True: 228k, False: 1.43M]
  ------------------
  743|   228k|            return &ctx->group_list[i];
  744|  1.66M|    }
  745|       |
  746|      0|    return NULL;
  747|   228k|}
tls1_group_id2nid:
  760|  83.4k|{
  761|  83.4k|    size_t i;
  762|       |
  763|  83.4k|    if (group_id == 0)
  ------------------
  |  Branch (763:9): [True: 0, False: 83.4k]
  ------------------
  764|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  765|       |
  766|       |    /*
  767|       |     * Return well known Group NIDs - for backwards compatibility. This won't
  768|       |     * work for groups we don't know about.
  769|       |     */
  770|  3.12M|    for (i = 0; i < OSSL_NELEM(nid_to_group); i++) {
  ------------------
  |  |   14|  3.12M|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (770:17): [True: 3.08M, False: 36.2k]
  ------------------
  771|  3.08M|        if (nid_to_group[i].group_id == group_id)
  ------------------
  |  Branch (771:13): [True: 47.1k, False: 3.03M]
  ------------------
  772|  47.1k|            return nid_to_group[i].nid;
  773|  3.08M|    }
  774|  36.2k|    if (!include_unknown)
  ------------------
  |  Branch (774:9): [True: 36.2k, False: 0]
  ------------------
  775|  36.2k|        return NID_undef;
  ------------------
  |  |   18|  36.2k|#define NID_undef                       0
  ------------------
  776|      0|    return TLSEXT_nid_unknown | (int)group_id;
  ------------------
  |  |  227|      0|#define TLSEXT_nid_unknown 0x1000000
  ------------------
  777|  36.2k|}
tls1_get_supported_groups:
  801|  21.7k|{
  802|  21.7k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  21.7k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  803|       |
  804|       |    /* For Suite B mode only include P-256, P-384 */
  805|  21.7k|    switch (tls1_suiteb(s)) {
  ------------------
  |  | 2035|  21.7k|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  584|  21.7k|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  ------------------
  806|      0|    case SSL_CERT_FLAG_SUITEB_128_LOS:
  ------------------
  |  |  584|      0|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
  |  Branch (806:5): [True: 0, False: 21.7k]
  ------------------
  807|      0|        *pgroups = suiteb_curves;
  808|      0|        *pgroupslen = OSSL_NELEM(suiteb_curves);
  ------------------
  |  |   14|      0|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  809|      0|        break;
  810|       |
  811|      0|    case SSL_CERT_FLAG_SUITEB_128_LOS_ONLY:
  ------------------
  |  |  580|      0|#define SSL_CERT_FLAG_SUITEB_128_LOS_ONLY 0x10000
  ------------------
  |  Branch (811:5): [True: 0, False: 21.7k]
  ------------------
  812|      0|        *pgroups = suiteb_curves;
  813|      0|        *pgroupslen = 1;
  814|      0|        break;
  815|       |
  816|      0|    case SSL_CERT_FLAG_SUITEB_192_LOS:
  ------------------
  |  |  582|      0|#define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000
  ------------------
  |  Branch (816:5): [True: 0, False: 21.7k]
  ------------------
  817|      0|        *pgroups = suiteb_curves + 1;
  818|      0|        *pgroupslen = 1;
  819|      0|        break;
  820|       |
  821|  21.7k|    default:
  ------------------
  |  Branch (821:5): [True: 21.7k, False: 0]
  ------------------
  822|  21.7k|        if (s->ext.supportedgroups == NULL) {
  ------------------
  |  Branch (822:13): [True: 0, False: 21.7k]
  ------------------
  823|      0|            *pgroups = sctx->ext.supportedgroups;
  824|      0|            *pgroupslen = sctx->ext.supportedgroups_len;
  825|  21.7k|        } else {
  826|  21.7k|            *pgroups = s->ext.supportedgroups;
  827|  21.7k|            *pgroupslen = s->ext.supportedgroups_len;
  828|  21.7k|        }
  829|  21.7k|        break;
  830|  21.7k|    }
  831|  21.7k|}
tls1_get_requested_keyshare_groups:
  848|  3.62k|{
  849|  3.62k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  850|       |
  851|  3.62k|    if (s->ext.supportedgroups == NULL) {
  ------------------
  |  Branch (851:9): [True: 0, False: 3.62k]
  ------------------
  852|      0|        *pgroups = sctx->ext.supportedgroups;
  853|      0|        *pgroupslen = sctx->ext.supportedgroups_len;
  854|  3.62k|    } else {
  855|  3.62k|        *pgroups = s->ext.keyshares;
  856|  3.62k|        *pgroupslen = s->ext.keyshares_len;
  857|  3.62k|    }
  858|  3.62k|}
tls1_get_group_tuples:
  862|  3.62k|{
  863|  3.62k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  864|       |
  865|  3.62k|    if (s->ext.supportedgroups == NULL) {
  ------------------
  |  Branch (865:9): [True: 0, False: 3.62k]
  ------------------
  866|      0|        *ptuples = sctx->ext.tuples;
  867|      0|        *ptupleslen = sctx->ext.tuples_len;
  868|  3.62k|    } else {
  869|  3.62k|        *ptuples = s->ext.tuples;
  870|  3.62k|        *ptupleslen = s->ext.tuples_len;
  871|  3.62k|    }
  872|  3.62k|}
tls_valid_group:
  877|   127k|{
  878|   127k|    const TLS_GROUP_INFO *ginfo = tls1_group_id_lookup(SSL_CONNECTION_GET_CTX(s),
  ------------------
  |  |   26|   127k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  879|   127k|        group_id);
  880|   127k|    int ret = 0;
  881|   127k|    int group_minversion, group_maxversion;
  882|       |
  883|   127k|    if (okfortls13 != NULL)
  ------------------
  |  Branch (883:9): [True: 39.9k, False: 87.0k]
  ------------------
  884|  39.9k|        *okfortls13 = 0;
  885|       |
  886|   127k|    if (ginfo == NULL)
  ------------------
  |  Branch (886:9): [True: 0, False: 127k]
  ------------------
  887|      0|        goto end;
  888|       |
  889|   127k|    group_minversion = SSL_CONNECTION_IS_DTLS(s) ? ginfo->mindtls : ginfo->mintls;
  ------------------
  |  |  266|   127k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|   127k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|   127k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 127k]
  |  |  ------------------
  ------------------
  890|   127k|    group_maxversion = SSL_CONNECTION_IS_DTLS(s) ? ginfo->maxdtls : ginfo->maxtls;
  ------------------
  |  |  266|   127k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|   127k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|   127k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 127k]
  |  |  ------------------
  ------------------
  891|       |
  892|   127k|    if (group_minversion < 0 || group_maxversion < 0)
  ------------------
  |  Branch (892:9): [True: 0, False: 127k]
  |  Branch (892:33): [True: 0, False: 127k]
  ------------------
  893|      0|        goto end;
  894|   127k|    if (group_maxversion == 0)
  ------------------
  |  Branch (894:9): [True: 127k, False: 0]
  ------------------
  895|   127k|        ret = 1;
  896|      0|    else
  897|      0|        ret = (ssl_version_cmp(s, minversion, group_maxversion) <= 0);
  898|   127k|    if (group_minversion > 0)
  ------------------
  |  Branch (898:9): [True: 127k, False: 0]
  ------------------
  899|   127k|        ret &= (ssl_version_cmp(s, maxversion, group_minversion) >= 0);
  900|       |
  901|   127k|    if (!SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  266|   127k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|   127k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|   127k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (901:9): [True: 127k, False: 0]
  ------------------
  902|   127k|        if (ret && okfortls13 != NULL && maxversion == TLS1_3_VERSION)
  ------------------
  |  |   27|  39.9k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (902:13): [True: 127k, False: 0]
  |  Branch (902:20): [True: 39.9k, False: 87.0k]
  |  Branch (902:42): [True: 39.9k, False: 0]
  ------------------
  903|  39.9k|            *okfortls13 = (group_maxversion == 0)
  ------------------
  |  Branch (903:27): [True: 39.9k, False: 0]
  ------------------
  904|      0|                || (group_maxversion >= TLS1_3_VERSION);
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (904:20): [True: 0, False: 0]
  ------------------
  905|   127k|    }
  906|   127k|end:
  907|   127k|    if (giptr != NULL)
  ------------------
  |  Branch (907:9): [True: 105k, False: 21.7k]
  ------------------
  908|   105k|        *giptr = ginfo;
  909|   127k|    return ret;
  910|   127k|}
tls_group_allowed:
  914|  83.4k|{
  915|  83.4k|    const TLS_GROUP_INFO *ginfo = tls1_group_id_lookup(SSL_CONNECTION_GET_CTX(s),
  ------------------
  |  |   26|  83.4k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  916|  83.4k|        group);
  917|  83.4k|    unsigned char gtmp[2];
  918|       |
  919|  83.4k|    if (ginfo == NULL)
  ------------------
  |  Branch (919:9): [True: 0, False: 83.4k]
  ------------------
  920|      0|        return 0;
  921|       |
  922|  83.4k|    gtmp[0] = group >> 8;
  923|  83.4k|    gtmp[1] = group & 0xff;
  924|  83.4k|    return ssl_security(s, op, ginfo->secbits,
  925|  83.4k|        tls1_group_id2nid(ginfo->group_id, 0), (void *)gtmp);
  926|  83.4k|}
tls1_set_groups_list:
 1742|  7.36k|{
 1743|  7.36k|    size_t i = 0, j;
 1744|  7.36k|    int ret = 0, parse_ret = 0;
 1745|  7.36k|    gid_cb_st gcb;
 1746|       |
 1747|       |    /* Sanity check */
 1748|  7.36k|    if (ctx == NULL) {
  ------------------
  |  Branch (1748:9): [True: 0, False: 7.36k]
  ------------------
 1749|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1750|      0|        return 0;
 1751|      0|    }
 1752|       |
 1753|  7.36k|    memset(&gcb, 0, sizeof(gcb));
 1754|  7.36k|    gcb.gidmax = GROUPLIST_INCREMENT;
  ------------------
  |  | 1215|  7.36k|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1755|  7.36k|    gcb.tplmax = GROUPLIST_INCREMENT;
  ------------------
  |  | 1215|  7.36k|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1756|  7.36k|    gcb.ksidmax = GROUPLIST_INCREMENT;
  ------------------
  |  | 1215|  7.36k|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1757|  7.36k|    gcb.ctx = ctx;
 1758|       |
 1759|       |    /* Prepare initial chunks of memory for groups, tuples and keyshares groupIDs */
 1760|  7.36k|    gcb.gid_arr = OPENSSL_malloc_array(gcb.gidmax, sizeof(*gcb.gid_arr));
  ------------------
  |  |  111|  7.36k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1761|  7.36k|    if (gcb.gid_arr == NULL)
  ------------------
  |  Branch (1761:9): [True: 0, False: 7.36k]
  ------------------
 1762|      0|        goto end;
 1763|  7.36k|    gcb.tuplcnt_arr = OPENSSL_malloc_array(gcb.tplmax, sizeof(*gcb.tuplcnt_arr));
  ------------------
  |  |  111|  7.36k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1764|  7.36k|    if (gcb.tuplcnt_arr == NULL)
  ------------------
  |  Branch (1764:9): [True: 0, False: 7.36k]
  ------------------
 1765|      0|        goto end;
 1766|  7.36k|    gcb.tuplcnt_arr[0] = 0;
 1767|  7.36k|    gcb.ksid_arr = OPENSSL_malloc_array(gcb.ksidmax, sizeof(*gcb.ksid_arr));
  ------------------
  |  |  111|  7.36k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1768|  7.36k|    if (gcb.ksid_arr == NULL)
  ------------------
  |  Branch (1768:9): [True: 0, False: 7.36k]
  ------------------
 1769|      0|        goto end;
 1770|       |
 1771|  7.36k|    while (str[0] != '\0' && isspace((unsigned char)*str))
  ------------------
  |  Branch (1771:12): [True: 7.36k, False: 0]
  |  Branch (1771:30): [True: 0, False: 7.36k]
  ------------------
 1772|      0|        str++;
 1773|  7.36k|    if (str[0] == '\0')
  ------------------
  |  Branch (1773:9): [True: 0, False: 7.36k]
  ------------------
 1774|      0|        goto empty_list;
 1775|       |
 1776|       |    /*
 1777|       |     * Start the (potentially recursive) tuple processing by calling CONF_parse_list
 1778|       |     * with the TUPLE_DELIMITER_CHARACTER (which will call tuple_cb after cleaning spaces)
 1779|       |     */
 1780|  7.36k|    parse_ret = CONF_parse_list(str, TUPLE_DELIMITER_CHARACTER, 1, tuple_cb, &gcb);
  ------------------
  |  | 1226|  7.36k|#define TUPLE_DELIMITER_CHARACTER '/'
  ------------------
 1781|       |
 1782|  7.36k|    if (parse_ret == 0)
  ------------------
  |  Branch (1782:9): [True: 0, False: 7.36k]
  ------------------
 1783|      0|        goto end;
 1784|  7.36k|    if (parse_ret == -1) {
  ------------------
  |  Branch (1784:9): [True: 0, False: 7.36k]
  ------------------
 1785|      0|        ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |   70|      0|#define ERR_LIB_SSL 20
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  311|      0|#define ERR_R_PASSED_INVALID_ARGUMENT (262 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1786|      0|            "Syntax error in '%s'", str);
 1787|      0|        goto end;
 1788|      0|    }
 1789|       |
 1790|       |    /*
 1791|       |     * We check whether a tuple was completely emptied by using "-" prefix
 1792|       |     * excessively, in which case we remove the tuple
 1793|       |     */
 1794|  44.1k|    for (i = j = 0; j < gcb.tplcnt; j++) {
  ------------------
  |  Branch (1794:21): [True: 36.8k, False: 7.36k]
  ------------------
 1795|  36.8k|        if (gcb.tuplcnt_arr[j] == 0)
  ------------------
  |  Branch (1795:13): [True: 0, False: 36.8k]
  ------------------
 1796|      0|            continue;
 1797|       |        /* If there's a gap, move to first unfilled slot */
 1798|  36.8k|        if (j == i)
  ------------------
  |  Branch (1798:13): [True: 36.8k, False: 0]
  ------------------
 1799|  36.8k|            ++i;
 1800|      0|        else
 1801|      0|            gcb.tuplcnt_arr[i++] = gcb.tuplcnt_arr[j];
 1802|  36.8k|    }
 1803|  7.36k|    gcb.tplcnt = i;
 1804|       |
 1805|  7.36k|    if (gcb.ksidcnt > OPENSSL_CLIENT_MAX_KEY_SHARES) {
  ------------------
  |  |   28|  7.36k|#define OPENSSL_CLIENT_MAX_KEY_SHARES 4
  ------------------
  |  Branch (1805:9): [True: 0, False: 7.36k]
  ------------------
 1806|      0|        ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  361|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |   70|      0|#define ERR_LIB_SSL 20
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  311|      0|#define ERR_R_PASSED_INVALID_ARGUMENT (262 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1807|      0|            "To many keyshares requested in '%s' (max = %d)",
 1808|      0|            str, OPENSSL_CLIENT_MAX_KEY_SHARES);
  ------------------
  |  |   28|      0|#define OPENSSL_CLIENT_MAX_KEY_SHARES 4
  ------------------
 1809|      0|        goto end;
 1810|      0|    }
 1811|       |
 1812|       |    /*
 1813|       |     * For backward compatibility we let the rest of the code know that a key share
 1814|       |     * for the first valid group should be added if no "*" prefix was used anywhere
 1815|       |     */
 1816|  7.36k|    if (gcb.gidcnt > 0 && gcb.ksidcnt == 0) {
  ------------------
  |  Branch (1816:9): [True: 7.36k, False: 0]
  |  Branch (1816:27): [True: 0, False: 7.36k]
  ------------------
 1817|       |        /*
 1818|       |         * No key share group prefix character was used, hence we indicate that a single
 1819|       |         * key share should be sent and flag that it should come from the supported_groups list
 1820|       |         */
 1821|      0|        gcb.ksidcnt = 1;
 1822|      0|        gcb.ksid_arr[0] = 0;
 1823|      0|    }
 1824|       |
 1825|  7.36k|empty_list:
 1826|       |    /*
 1827|       |     * A call to tls1_set_groups_list with any of the args (other than ctx) set
 1828|       |     * to NULL only does a syntax check, hence we're done here and report success
 1829|       |     */
 1830|  7.36k|    if (grpext == NULL || ksext == NULL || tplext == NULL || grpextlen == NULL || ksextlen == NULL || tplextlen == NULL) {
  ------------------
  |  Branch (1830:9): [True: 0, False: 7.36k]
  |  Branch (1830:27): [True: 0, False: 7.36k]
  |  Branch (1830:44): [True: 0, False: 7.36k]
  |  Branch (1830:62): [True: 0, False: 7.36k]
  |  Branch (1830:83): [True: 0, False: 7.36k]
  |  Branch (1830:103): [True: 0, False: 7.36k]
  ------------------
 1831|      0|        ret = 1;
 1832|      0|        goto end;
 1833|      0|    }
 1834|       |
 1835|       |    /*
 1836|       |     * tuple_cb and gid_cb combo ensures there are no duplicates or unknown groups so we
 1837|       |     * can just go ahead and set the results (after disposing the existing)
 1838|       |     */
 1839|  7.36k|    OPENSSL_free(*grpext);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1840|  7.36k|    *grpext = gcb.gid_arr;
 1841|  7.36k|    *grpextlen = gcb.gidcnt;
 1842|  7.36k|    OPENSSL_free(*ksext);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1843|  7.36k|    *ksext = gcb.ksid_arr;
 1844|  7.36k|    *ksextlen = gcb.ksidcnt;
 1845|  7.36k|    OPENSSL_free(*tplext);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1846|  7.36k|    *tplext = gcb.tuplcnt_arr;
 1847|  7.36k|    *tplextlen = gcb.tplcnt;
 1848|       |
 1849|  7.36k|    return 1;
 1850|       |
 1851|      0|end:
 1852|      0|    OPENSSL_free(gcb.gid_arr);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1853|      0|    OPENSSL_free(gcb.tuplcnt_arr);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1854|      0|    OPENSSL_free(gcb.ksid_arr);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1855|      0|    return ret;
 1856|  7.36k|}
tls1_get_formatlist:
 1914|  3.62k|{
 1915|       |    /*
 1916|       |     * If we have a custom point format list use it otherwise use default
 1917|       |     */
 1918|  3.62k|    if (s->ext.ecpointformats) {
  ------------------
  |  Branch (1918:9): [True: 0, False: 3.62k]
  ------------------
 1919|      0|        *pformats = s->ext.ecpointformats;
 1920|      0|        *num_formats = s->ext.ecpointformats_len;
 1921|  3.62k|    } else if ((s->options & SSL_OP_LEGACY_EC_POINT_FORMATS) != 0) {
  ------------------
  |  |  456|  3.62k|#define SSL_OP_LEGACY_EC_POINT_FORMATS SSL_OP_BIT(36)
  |  |  ------------------
  |  |  |  |  351|  3.62k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1921:16): [True: 0, False: 3.62k]
  ------------------
 1922|      0|        *pformats = ecformats_all;
 1923|       |        /* For Suite B we don't support char2 fields */
 1924|      0|        if (tls1_suiteb(s))
  ------------------
  |  | 2035|      0|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  584|      0|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  |  |  |  Branch (2035:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1925|      0|            *num_formats = sizeof(ecformats_all) - 1;
 1926|      0|        else
 1927|      0|            *num_formats = sizeof(ecformats_all);
 1928|  3.62k|    } else {
 1929|  3.62k|        *pformats = ecformats_default;
 1930|  3.62k|        *num_formats = sizeof(ecformats_default);
 1931|  3.62k|    }
 1932|  3.62k|}
ssl_setup_sigalgs:
 2313|  7.36k|{
 2314|  7.36k|    size_t i, cache_idx, sigalgs_len, enabled;
 2315|  7.36k|    const SIGALG_LOOKUP *lu;
 2316|  7.36k|    SIGALG_LOOKUP *cache = NULL;
 2317|  7.36k|    uint16_t *tls12_sigalgs_list = NULL;
 2318|  7.36k|    EVP_PKEY *tmpkey = EVP_PKEY_new();
 2319|  7.36k|    int istls;
 2320|  7.36k|    int ret = 0;
 2321|       |
 2322|  7.36k|    if (ctx == NULL)
  ------------------
  |  Branch (2322:9): [True: 0, False: 7.36k]
  ------------------
 2323|      0|        goto err;
 2324|       |
 2325|  7.36k|    istls = !SSL_CTX_IS_DTLS(ctx);
  ------------------
  |  |  270|  7.36k|    (ctx->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|  7.36k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
 2326|       |
 2327|  7.36k|    sigalgs_len = OSSL_NELEM(sigalg_lookup_tbl) + ctx->sigalg_list_len;
  ------------------
  |  |   14|  7.36k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 2328|       |
 2329|  7.36k|    cache = OPENSSL_calloc(sigalgs_len, sizeof(const SIGALG_LOOKUP));
  ------------------
  |  |  113|  7.36k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2330|  7.36k|    if (cache == NULL || tmpkey == NULL)
  ------------------
  |  Branch (2330:9): [True: 0, False: 7.36k]
  |  Branch (2330:26): [True: 0, False: 7.36k]
  ------------------
 2331|      0|        goto err;
 2332|       |
 2333|  7.36k|    tls12_sigalgs_list = OPENSSL_calloc(sigalgs_len, sizeof(uint16_t));
  ------------------
  |  |  113|  7.36k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2334|  7.36k|    if (tls12_sigalgs_list == NULL)
  ------------------
  |  Branch (2334:9): [True: 0, False: 7.36k]
  ------------------
 2335|      0|        goto err;
 2336|       |
 2337|  7.36k|    ERR_set_mark();
 2338|       |    /* First fill cache and tls12_sigalgs list from legacy algorithm list */
 2339|  7.36k|    for (i = 0, lu = sigalg_lookup_tbl;
 2340|   235k|        i < OSSL_NELEM(sigalg_lookup_tbl); lu++, i++) {
  ------------------
  |  |   14|   235k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (2340:9): [True: 228k, False: 7.36k]
  ------------------
 2341|   228k|        EVP_PKEY_CTX *pctx;
 2342|       |
 2343|   228k|        cache[i] = *lu;
 2344|       |
 2345|       |        /*
 2346|       |         * Check hash is available.
 2347|       |         * This test is not perfect. A provider could have support
 2348|       |         * for a signature scheme, but not a particular hash. However the hash
 2349|       |         * could be available from some other loaded provider. In that case it
 2350|       |         * could be that the signature is available, and the hash is available
 2351|       |         * independently - but not as a combination. We ignore this for now.
 2352|       |         */
 2353|   228k|        if (lu->hash != NID_undef
  ------------------
  |  |   18|   456k|#define NID_undef                       0
  ------------------
  |  Branch (2353:13): [True: 213k, False: 14.7k]
  ------------------
 2354|   213k|            && ctx->ssl_digest_methods[lu->hash_idx] == NULL) {
  ------------------
  |  Branch (2354:16): [True: 36.8k, False: 176k]
  ------------------
 2355|  36.8k|            cache[i].available = 0;
 2356|  36.8k|            continue;
 2357|  36.8k|        }
 2358|       |
 2359|   191k|        if (!EVP_PKEY_set_type(tmpkey, lu->sig)) {
  ------------------
  |  Branch (2359:13): [True: 0, False: 191k]
  ------------------
 2360|      0|            cache[i].available = 0;
 2361|      0|            continue;
 2362|      0|        }
 2363|   191k|        pctx = EVP_PKEY_CTX_new_from_pkey(ctx->libctx, tmpkey, ctx->propq);
 2364|       |        /* If unable to create pctx we assume the sig algorithm is unavailable */
 2365|   191k|        if (pctx == NULL)
  ------------------
  |  Branch (2365:13): [True: 0, False: 191k]
  ------------------
 2366|      0|            cache[i].available = 0;
 2367|   191k|        EVP_PKEY_CTX_free(pctx);
 2368|   191k|    }
 2369|       |
 2370|       |    /* Now complete cache and tls12_sigalgs list with provider sig information */
 2371|  7.36k|    cache_idx = OSSL_NELEM(sigalg_lookup_tbl);
  ------------------
  |  |   14|  7.36k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 2372|  36.8k|    for (i = 0; i < ctx->sigalg_list_len; i++) {
  ------------------
  |  Branch (2372:17): [True: 29.4k, False: 7.36k]
  ------------------
 2373|  29.4k|        TLS_SIGALG_INFO si = ctx->sigalg_list[i];
 2374|  29.4k|        cache[cache_idx].name = si.name;
 2375|  29.4k|        cache[cache_idx].name12 = si.sigalg_name;
 2376|  29.4k|        cache[cache_idx].sigalg = si.code_point;
 2377|  29.4k|        tls12_sigalgs_list[cache_idx] = si.code_point;
 2378|  29.4k|        cache[cache_idx].hash = si.hash_name ? OBJ_txt2nid(si.hash_name) : NID_undef;
  ------------------
  |  |   18|  58.9k|#define NID_undef                       0
  ------------------
  |  Branch (2378:33): [True: 0, False: 29.4k]
  ------------------
 2379|  29.4k|        cache[cache_idx].hash_idx = ssl_get_md_idx(cache[cache_idx].hash);
 2380|  29.4k|        cache[cache_idx].sig = OBJ_txt2nid(si.sigalg_name);
 2381|  29.4k|        cache[cache_idx].sig_idx = (int)(i + SSL_PKEY_NUM);
  ------------------
  |  |  336|  29.4k|#define SSL_PKEY_NUM 9
  ------------------
 2382|  29.4k|        cache[cache_idx].sigandhash = OBJ_txt2nid(si.sigalg_name);
 2383|  29.4k|        cache[cache_idx].curve = NID_undef;
  ------------------
  |  |   18|  29.4k|#define NID_undef                       0
  ------------------
 2384|  29.4k|        cache[cache_idx].mintls = TLS1_3_VERSION;
  ------------------
  |  |   27|  29.4k|#define TLS1_3_VERSION 0x0304
  ------------------
 2385|  29.4k|        cache[cache_idx].maxtls = TLS1_3_VERSION;
  ------------------
  |  |   27|  29.4k|#define TLS1_3_VERSION 0x0304
  ------------------
 2386|  29.4k|        cache[cache_idx].mindtls = -1;
 2387|  29.4k|        cache[cache_idx].maxdtls = -1;
 2388|       |        /* Compatibility with TLS 1.3 is checked on load */
 2389|  29.4k|        cache[cache_idx].available = istls;
 2390|  29.4k|        cache[cache_idx].advertise = 0;
 2391|  29.4k|        cache_idx++;
 2392|  29.4k|    }
 2393|  7.36k|    ERR_pop_to_mark();
 2394|       |
 2395|  7.36k|    enabled = 0;
 2396|   257k|    for (i = 0; i < OSSL_NELEM(tls12_sigalgs); ++i) {
  ------------------
  |  |   14|   257k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (2396:17): [True: 250k, False: 7.36k]
  ------------------
 2397|   250k|        SIGALG_LOOKUP *ent = cache;
 2398|   250k|        size_t j;
 2399|       |
 2400|  4.38M|        for (j = 0; j < sigalgs_len; ent++, j++) {
  ------------------
  |  Branch (2400:21): [True: 4.38M, False: 0]
  ------------------
 2401|  4.38M|            if (ent->sigalg != tls12_sigalgs[i])
  ------------------
  |  Branch (2401:17): [True: 4.13M, False: 250k]
  ------------------
 2402|  4.13M|                continue;
 2403|       |            /* Dedup by marking cache entry as default enabled. */
 2404|   250k|            if (ent->available && !ent->advertise) {
  ------------------
  |  Branch (2404:17): [True: 213k, False: 36.8k]
  |  Branch (2404:35): [True: 213k, False: 0]
  ------------------
 2405|   213k|                ent->advertise = 1;
 2406|   213k|                tls12_sigalgs_list[enabled++] = tls12_sigalgs[i];
 2407|   213k|            }
 2408|   250k|            break;
 2409|  4.38M|        }
 2410|   250k|    }
 2411|       |
 2412|       |    /* Append any provider sigalgs not yet handled */
 2413|  36.8k|    for (i = OSSL_NELEM(sigalg_lookup_tbl); i < sigalgs_len; ++i) {
  ------------------
  |  |   14|  7.36k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (2413:45): [True: 29.4k, False: 7.36k]
  ------------------
 2414|  29.4k|        SIGALG_LOOKUP *ent = &cache[i];
 2415|       |
 2416|  29.4k|        if (ent->available && !ent->advertise)
  ------------------
  |  Branch (2416:13): [True: 29.4k, False: 0]
  |  Branch (2416:31): [True: 7.36k, False: 22.0k]
  ------------------
 2417|  7.36k|            tls12_sigalgs_list[enabled++] = ent->sigalg;
 2418|  29.4k|    }
 2419|       |
 2420|  7.36k|    ctx->sigalg_lookup_cache = cache;
 2421|  7.36k|    ctx->sigalg_lookup_cache_len = sigalgs_len;
 2422|  7.36k|    ctx->tls12_sigalgs = tls12_sigalgs_list;
 2423|  7.36k|    ctx->tls12_sigalgs_len = enabled;
 2424|  7.36k|    cache = NULL;
 2425|  7.36k|    tls12_sigalgs_list = NULL;
 2426|       |
 2427|  7.36k|    ret = 1;
 2428|  7.36k|err:
 2429|  7.36k|    OPENSSL_free(cache);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2430|  7.36k|    OPENSSL_free(tls12_sigalgs_list);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2431|  7.36k|    EVP_PKEY_free(tmpkey);
 2432|  7.36k|    return ret;
 2433|  7.36k|}
tls1_lookup_md:
 2533|   366k|{
 2534|   366k|    const EVP_MD *md;
 2535|       |
 2536|   366k|    if (lu == NULL)
  ------------------
  |  Branch (2536:9): [True: 0, False: 366k]
  ------------------
 2537|      0|        return 0;
 2538|       |    /* lu->hash == NID_undef means no associated digest */
 2539|   366k|    if (lu->hash == NID_undef) {
  ------------------
  |  |   18|   366k|#define NID_undef                       0
  ------------------
  |  Branch (2539:9): [True: 87.0k, False: 279k]
  ------------------
 2540|  87.0k|        md = NULL;
 2541|   279k|    } else {
 2542|   279k|        md = ssl_md(ctx, lu->hash_idx);
 2543|   279k|        if (md == NULL)
  ------------------
  |  Branch (2543:13): [True: 0, False: 279k]
  ------------------
 2544|      0|            return 0;
 2545|   279k|    }
 2546|   366k|    if (pmd)
  ------------------
  |  Branch (2546:9): [True: 352k, False: 14.5k]
  ------------------
 2547|   352k|        *pmd = md;
 2548|   366k|    return 1;
 2549|   366k|}
tls12_get_psigalgs:
 2670|  25.4k|{
 2671|       |    /*
 2672|       |     * If Suite B mode use Suite B sigalgs only, ignore any other
 2673|       |     * preferences.
 2674|       |     */
 2675|  25.4k|    switch (tls1_suiteb(s)) {
  ------------------
  |  | 2035|  25.4k|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  584|  25.4k|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  |  |  |  Branch (2035:24): [True: 0, False: 25.4k]
  |  |  ------------------
  ------------------
 2676|      0|    case SSL_CERT_FLAG_SUITEB_128_LOS:
  ------------------
  |  |  584|      0|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
  |  Branch (2676:5): [True: 0, False: 25.4k]
  ------------------
 2677|      0|        *psigs = suiteb_sigalgs;
 2678|      0|        return OSSL_NELEM(suiteb_sigalgs);
  ------------------
  |  |   14|      0|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 2679|       |
 2680|      0|    case SSL_CERT_FLAG_SUITEB_128_LOS_ONLY:
  ------------------
  |  |  580|      0|#define SSL_CERT_FLAG_SUITEB_128_LOS_ONLY 0x10000
  ------------------
  |  Branch (2680:5): [True: 0, False: 25.4k]
  ------------------
 2681|      0|        *psigs = suiteb_sigalgs;
 2682|      0|        return 1;
 2683|       |
 2684|      0|    case SSL_CERT_FLAG_SUITEB_192_LOS:
  ------------------
  |  |  582|      0|#define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000
  ------------------
  |  Branch (2684:5): [True: 0, False: 25.4k]
  ------------------
 2685|      0|        *psigs = suiteb_sigalgs + 1;
 2686|      0|        return 1;
 2687|  25.4k|    }
 2688|       |    /*
 2689|       |     *  We use client_sigalgs (if not NULL) if we're a server
 2690|       |     *  and sending a certificate request or if we're a client and
 2691|       |     *  determining which shared algorithm to use.
 2692|       |     */
 2693|  25.4k|    if ((s->server == sent) && s->cert->client_sigalgs != NULL) {
  ------------------
  |  Branch (2693:9): [True: 0, False: 25.4k]
  |  Branch (2693:32): [True: 0, False: 0]
  ------------------
 2694|      0|        *psigs = s->cert->client_sigalgs;
 2695|      0|        return s->cert->client_sigalgslen;
 2696|  25.4k|    } else if (s->cert->conf_sigalgs) {
  ------------------
  |  Branch (2696:16): [True: 0, False: 25.4k]
  ------------------
 2697|      0|        *psigs = s->cert->conf_sigalgs;
 2698|      0|        return s->cert->conf_sigalgslen;
 2699|  25.4k|    } else {
 2700|  25.4k|        *psigs = SSL_CONNECTION_GET_CTX(s)->tls12_sigalgs;
  ------------------
  |  |   26|  25.4k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2701|  25.4k|        return SSL_CONNECTION_GET_CTX(s)->tls12_sigalgs_len;
  ------------------
  |  |   26|  25.4k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2702|  25.4k|    }
 2703|  25.4k|}
tls_check_sigalg_curve:
 2710|  3.62k|{
 2711|  3.62k|    const uint16_t *sigs;
 2712|  3.62k|    size_t siglen, i;
 2713|       |
 2714|  3.62k|    if (s->cert->conf_sigalgs) {
  ------------------
  |  Branch (2714:9): [True: 0, False: 3.62k]
  ------------------
 2715|      0|        sigs = s->cert->conf_sigalgs;
 2716|      0|        siglen = s->cert->conf_sigalgslen;
 2717|  3.62k|    } else {
 2718|  3.62k|        sigs = SSL_CONNECTION_GET_CTX(s)->tls12_sigalgs;
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2719|  3.62k|        siglen = SSL_CONNECTION_GET_CTX(s)->tls12_sigalgs_len;
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2720|  3.62k|    }
 2721|       |
 2722|  14.5k|    for (i = 0; i < siglen; i++) {
  ------------------
  |  Branch (2722:17): [True: 14.5k, False: 0]
  ------------------
 2723|  14.5k|        const SIGALG_LOOKUP *lu = tls1_lookup_sigalg(SSL_CONNECTION_GET_CTX(s), sigs[i]);
  ------------------
  |  |   26|  14.5k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2724|       |
 2725|  14.5k|        if (lu == NULL)
  ------------------
  |  Branch (2725:13): [True: 0, False: 14.5k]
  ------------------
 2726|      0|            continue;
 2727|  14.5k|        if (lu->sig == EVP_PKEY_EC
  ------------------
  |  |   73|  14.5k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|  29.0k|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
  |  Branch (2727:13): [True: 3.62k, False: 10.8k]
  ------------------
 2728|  3.62k|            && lu->curve != NID_undef
  ------------------
  |  |   18|  18.1k|#define NID_undef                       0
  ------------------
  |  Branch (2728:16): [True: 3.62k, False: 0]
  ------------------
 2729|  3.62k|            && curve == lu->curve)
  ------------------
  |  Branch (2729:16): [True: 3.62k, False: 0]
  ------------------
 2730|  3.62k|            return 1;
 2731|  14.5k|    }
 2732|       |
 2733|      0|    return 0;
 2734|  3.62k|}
tls12_check_peer_sigalg:
 2831|  3.62k|{
 2832|  3.62k|    const uint16_t *sent_sigs;
 2833|  3.62k|    const EVP_MD *md = NULL;
 2834|  3.62k|    char sigalgstr[2];
 2835|  3.62k|    size_t sent_sigslen, i, cidx;
 2836|  3.62k|    int pkeyid = -1;
 2837|  3.62k|    const SIGALG_LOOKUP *lu;
 2838|  3.62k|    int secbits = 0;
 2839|       |
 2840|  3.62k|    pkeyid = EVP_PKEY_get_id(pkey);
 2841|       |
 2842|  3.62k|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 2843|       |        /* Disallow DSA for TLS 1.3 */
 2844|  3.62k|        if (pkeyid == EVP_PKEY_DSA) {
  ------------------
  |  |   66|  3.62k|#define EVP_PKEY_DSA NID_dsa
  |  |  ------------------
  |  |  |  |  136|  3.62k|#define NID_dsa         116
  |  |  ------------------
  ------------------
  |  Branch (2844:13): [True: 0, False: 3.62k]
  ------------------
 2845|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_WRONG_SIGNATURE_TYPE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2846|      0|            return 0;
 2847|      0|        }
 2848|       |        /* Only allow PSS for TLS 1.3 */
 2849|  3.62k|        if (pkeyid == EVP_PKEY_RSA)
  ------------------
  |  |   63|  3.62k|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|  3.62k|#define NID_rsaEncryption               6
  |  |  ------------------
  ------------------
  |  Branch (2849:13): [True: 0, False: 3.62k]
  ------------------
 2850|      0|            pkeyid = EVP_PKEY_RSA_PSS;
  ------------------
  |  |   65|      0|#define EVP_PKEY_RSA_PSS NID_rsassaPss
  |  |  ------------------
  |  |  |  |  583|      0|#define NID_rsassaPss           912
  |  |  ------------------
  ------------------
 2851|  3.62k|    }
 2852|       |
 2853|       |    /* Is this code point available and compatible with the protocol */
 2854|  3.62k|    lu = tls1_lookup_sigalg(SSL_CONNECTION_GET_CTX(s), sig);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2855|  3.62k|    if (lu == NULL || !tls_sigalg_compat(s, lu)) {
  ------------------
  |  Branch (2855:9): [True: 0, False: 3.62k]
  |  Branch (2855:23): [True: 0, False: 3.62k]
  ------------------
 2856|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_WRONG_SIGNATURE_TYPE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2857|      0|        return 0;
 2858|      0|    }
 2859|       |
 2860|       |    /* If we don't know the pkey nid yet go and find it */
 2861|  3.62k|    if (pkeyid == EVP_PKEY_KEYMGMT) {
  ------------------
  |  |  104|  3.62k|#define EVP_PKEY_KEYMGMT -1
  ------------------
  |  Branch (2861:9): [True: 0, False: 3.62k]
  ------------------
 2862|      0|        const SSL_CERT_LOOKUP *scl = ssl_cert_lookup_by_pkey(pkey, NULL, SSL_CONNECTION_GET_CTX(s));
  ------------------
  |  |   26|      0|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2863|       |
 2864|      0|        if (scl == NULL) {
  ------------------
  |  Branch (2864:13): [True: 0, False: 0]
  ------------------
 2865|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_WRONG_SIGNATURE_TYPE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2866|      0|            return 0;
 2867|      0|        }
 2868|      0|        pkeyid = scl->pkey_nid;
 2869|      0|    }
 2870|       |
 2871|       |    /* Should never happen */
 2872|  3.62k|    if (pkeyid == -1) {
  ------------------
  |  Branch (2872:9): [True: 0, False: 3.62k]
  ------------------
 2873|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_WRONG_SIGNATURE_TYPE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2874|      0|        return -1;
 2875|      0|    }
 2876|       |
 2877|       |    /*
 2878|       |     * Check sigalgs is known. Disallow SHA1/SHA224 with TLS 1.3. Check key type
 2879|       |     * is consistent with signature: RSA keys can be used for RSA-PSS
 2880|       |     */
 2881|  3.62k|    if ((SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  273|  7.25k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 2882|  3.62k|            && (lu->hash == NID_sha1 || lu->hash == NID_sha224))
  ------------------
  |  | 2348|  7.25k|#define NID_sha1                64
  ------------------
                          && (lu->hash == NID_sha1 || lu->hash == NID_sha224))
  ------------------
  |  | 3306|  3.62k|#define NID_sha224              675
  ------------------
  |  Branch (2882:17): [True: 0, False: 3.62k]
  |  Branch (2882:41): [True: 0, False: 3.62k]
  ------------------
 2883|  3.62k|        || (pkeyid != lu->sig
  ------------------
  |  Branch (2883:13): [True: 0, False: 3.62k]
  ------------------
 2884|      0|            && (lu->sig != EVP_PKEY_RSA_PSS || pkeyid != EVP_PKEY_RSA))) {
  ------------------
  |  |   65|      0|#define EVP_PKEY_RSA_PSS NID_rsassaPss
  |  |  ------------------
  |  |  |  |  583|      0|#define NID_rsassaPss           912
  |  |  ------------------
  ------------------
                          && (lu->sig != EVP_PKEY_RSA_PSS || pkeyid != EVP_PKEY_RSA))) {
  ------------------
  |  |   63|      0|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|      0|#define NID_rsaEncryption               6
  |  |  ------------------
  ------------------
  |  Branch (2884:17): [True: 0, False: 0]
  |  Branch (2884:48): [True: 0, False: 0]
  ------------------
 2885|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_WRONG_SIGNATURE_TYPE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2886|      0|        return 0;
 2887|      0|    }
 2888|       |    /* Check the sigalg is consistent with the key OID */
 2889|  3.62k|    if (!ssl_cert_lookup_by_nid(
  ------------------
  |  Branch (2889:9): [True: 0, False: 3.62k]
  ------------------
 2890|  3.62k|            (pkeyid == EVP_PKEY_RSA_PSS) ? EVP_PKEY_get_id(pkey) : pkeyid,
  ------------------
  |  |   65|  3.62k|#define EVP_PKEY_RSA_PSS NID_rsassaPss
  |  |  ------------------
  |  |  |  |  583|  3.62k|#define NID_rsassaPss           912
  |  |  ------------------
  ------------------
  |  Branch (2890:13): [True: 0, False: 3.62k]
  ------------------
 2891|  3.62k|            &cidx, SSL_CONNECTION_GET_CTX(s))
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2892|  3.62k|        || lu->sig_idx != (int)cidx) {
  ------------------
  |  Branch (2892:12): [True: 0, False: 3.62k]
  ------------------
 2893|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_WRONG_SIGNATURE_TYPE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2894|      0|        return 0;
 2895|      0|    }
 2896|       |
 2897|  3.62k|    if (pkeyid == EVP_PKEY_EC) {
  ------------------
  |  |   73|  3.62k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|  3.62k|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
  |  Branch (2897:9): [True: 3.62k, False: 0]
  ------------------
 2898|       |
 2899|       |        /* For TLS 1.3 or Suite B check curve matches signature algorithm */
 2900|  3.62k|        if (SSL_CONNECTION_IS_TLS13(s) || tls1_suiteb(s)) {
  ------------------
  |  |  273|  7.25k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
                      if (SSL_CONNECTION_IS_TLS13(s) || tls1_suiteb(s)) {
  ------------------
  |  | 2035|      0|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  584|      0|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  |  |  |  Branch (2035:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2901|  3.62k|            int curve = ssl_get_EC_curve_nid(pkey);
 2902|       |
 2903|  3.62k|            if (lu->curve != NID_undef && curve != lu->curve) {
  ------------------
  |  |   18|  7.25k|#define NID_undef                       0
  ------------------
  |  Branch (2903:17): [True: 3.62k, False: 0]
  |  Branch (2903:43): [True: 0, False: 3.62k]
  ------------------
 2904|      0|                SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_WRONG_CURVE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2905|      0|                return 0;
 2906|      0|            }
 2907|  3.62k|        }
 2908|  3.62k|        if (!SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 2909|       |            /* Check curve matches extensions */
 2910|      0|            if (!tls1_check_group_id(s, tls1_get_group_id(pkey), 1)) {
  ------------------
  |  Branch (2910:17): [True: 0, False: 0]
  ------------------
 2911|      0|                SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_WRONG_CURVE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2912|      0|                return 0;
 2913|      0|            }
 2914|      0|            if (tls1_suiteb(s)) {
  ------------------
  |  | 2035|      0|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  584|      0|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  |  |  |  Branch (2035:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2915|       |                /* Check sigalg matches a permissible Suite B value */
 2916|      0|                if (sig != TLSEXT_SIGALG_ecdsa_secp256r1_sha256
  ------------------
  |  |   15|      0|#define TLSEXT_SIGALG_ecdsa_secp256r1_sha256 0x0403
  ------------------
  |  Branch (2916:21): [True: 0, False: 0]
  ------------------
 2917|      0|                    && sig != TLSEXT_SIGALG_ecdsa_secp384r1_sha384) {
  ------------------
  |  |   16|      0|#define TLSEXT_SIGALG_ecdsa_secp384r1_sha384 0x0503
  ------------------
  |  Branch (2917:24): [True: 0, False: 0]
  ------------------
 2918|      0|                    SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2919|      0|                        SSL_R_WRONG_SIGNATURE_TYPE);
 2920|      0|                    return 0;
 2921|      0|                }
 2922|      0|            }
 2923|      0|        }
 2924|  3.62k|    } else if (tls1_suiteb(s)) {
  ------------------
  |  | 2035|      0|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  584|      0|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  |  |  |  Branch (2035:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2925|      0|        SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_WRONG_SIGNATURE_TYPE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2926|      0|        return 0;
 2927|      0|    }
 2928|       |
 2929|       |    /* Check signature matches a type we sent */
 2930|  3.62k|    sent_sigslen = tls12_get_psigalgs(s, 1, &sent_sigs);
 2931|  14.5k|    for (i = 0; i < sent_sigslen; i++, sent_sigs++) {
  ------------------
  |  Branch (2931:17): [True: 14.5k, False: 0]
  ------------------
 2932|  14.5k|        if (sig == *sent_sigs)
  ------------------
  |  Branch (2932:13): [True: 3.62k, False: 10.8k]
  ------------------
 2933|  3.62k|            break;
 2934|  14.5k|    }
 2935|       |    /* Allow fallback to SHA1 if not strict mode */
 2936|  3.62k|    if (i == sent_sigslen && (lu->hash != NID_sha1 || s->cert->cert_flags & SSL_CERT_FLAGS_CHECK_TLS_STRICT)) {
  ------------------
  |  | 2348|      0|#define NID_sha1                64
  ------------------
                  if (i == sent_sigslen && (lu->hash != NID_sha1 || s->cert->cert_flags & SSL_CERT_FLAGS_CHECK_TLS_STRICT)) {
  ------------------
  |  | 2038|      0|    (SSL_CERT_FLAG_SUITEB_128_LOS | SSL_CERT_FLAG_TLS_STRICT)
  |  |  ------------------
  |  |  |  |  584|      0|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  |  |                   (SSL_CERT_FLAG_SUITEB_128_LOS | SSL_CERT_FLAG_TLS_STRICT)
  |  |  ------------------
  |  |  |  |  577|      0|#define SSL_CERT_FLAG_TLS_STRICT 0x00000001U
  |  |  ------------------
  ------------------
  |  Branch (2936:9): [True: 0, False: 3.62k]
  |  Branch (2936:31): [True: 0, False: 0]
  |  Branch (2936:55): [True: 0, False: 0]
  ------------------
 2937|      0|        SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_WRONG_SIGNATURE_TYPE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2938|      0|        return 0;
 2939|      0|    }
 2940|  3.62k|    if (!tls1_lookup_md(SSL_CONNECTION_GET_CTX(s), lu, &md)) {
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  |  Branch (2940:9): [True: 0, False: 3.62k]
  ------------------
 2941|      0|        SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_UNKNOWN_DIGEST);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2942|      0|        return 0;
 2943|      0|    }
 2944|       |    /*
 2945|       |     * Make sure security callback allows algorithm. For historical
 2946|       |     * reasons we have to pass the sigalg as a two byte char array.
 2947|       |     */
 2948|  3.62k|    sigalgstr[0] = (sig >> 8) & 0xff;
 2949|  3.62k|    sigalgstr[1] = sig & 0xff;
 2950|  3.62k|    secbits = sigalg_security_bits(SSL_CONNECTION_GET_CTX(s), lu);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2951|  3.62k|    if (secbits == 0 || !ssl_security(s, SSL_SECOP_SIGALG_CHECK, secbits, md != NULL ? EVP_MD_get_type(md) : NID_undef, (void *)sigalgstr)) {
  ------------------
  |  | 2776|  3.62k|#define SSL_SECOP_SIGALG_CHECK (13 | SSL_SECOP_OTHER_SIGALG)
  |  |  ------------------
  |  |  |  | 2734|  3.62k|#define SSL_SECOP_OTHER_SIGALG (5 << 16)
  |  |  ------------------
  ------------------
                  if (secbits == 0 || !ssl_security(s, SSL_SECOP_SIGALG_CHECK, secbits, md != NULL ? EVP_MD_get_type(md) : NID_undef, (void *)sigalgstr)) {
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (2951:9): [True: 0, False: 3.62k]
  |  Branch (2951:25): [True: 0, False: 3.62k]
  |  Branch (2951:75): [True: 3.62k, False: 0]
  ------------------
 2952|      0|        SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_WRONG_SIGNATURE_TYPE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2953|      0|        return 0;
 2954|      0|    }
 2955|       |    /* Store the sigalg the peer uses */
 2956|  3.62k|    s->s3.tmp.peer_sigalg = lu;
 2957|  3.62k|    return 1;
 2958|  3.62k|}
ssl_set_client_disabled:
 2997|  14.5k|{
 2998|  14.5k|    s->s3.tmp.mask_a = 0;
 2999|  14.5k|    s->s3.tmp.mask_k = 0;
 3000|  14.5k|    ssl_set_sig_mask(&s->s3.tmp.mask_a, s, SSL_SECOP_SIGALG_MASK);
  ------------------
  |  | 2778|  14.5k|#define SSL_SECOP_SIGALG_MASK (14 | SSL_SECOP_OTHER_SIGALG)
  |  |  ------------------
  |  |  |  | 2734|  14.5k|#define SSL_SECOP_OTHER_SIGALG (5 << 16)
  |  |  ------------------
  ------------------
 3001|  14.5k|    if (ssl_get_min_max_version(s, &s->s3.tmp.min_ver,
  ------------------
  |  Branch (3001:9): [True: 0, False: 14.5k]
  ------------------
 3002|  14.5k|            &s->s3.tmp.max_ver, NULL)
 3003|  14.5k|        != 0)
 3004|      0|        return 0;
 3005|  14.5k|#ifndef OPENSSL_NO_PSK
 3006|       |    /* with PSK there must be client callback set */
 3007|  14.5k|    if (!s->psk_client_callback) {
  ------------------
  |  Branch (3007:9): [True: 14.5k, False: 0]
  ------------------
 3008|  14.5k|        s->s3.tmp.mask_a |= SSL_aPSK;
  ------------------
  |  |  120|  14.5k|#define SSL_aPSK 0x00000010U
  ------------------
 3009|  14.5k|        s->s3.tmp.mask_k |= SSL_PSK;
  ------------------
  |  |  105|  14.5k|#define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   91|  14.5k|#define SSL_kPSK 0x00000008U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   97|  14.5k|#define SSL_kRSAPSK 0x00000040U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   98|  14.5k|#define SSL_kECDHEPSK 0x00000080U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   99|  14.5k|#define SSL_kDHEPSK 0x00000100U
  |  |  ------------------
  ------------------
 3010|  14.5k|    }
 3011|  14.5k|#endif /* OPENSSL_NO_PSK */
 3012|  14.5k|#ifndef OPENSSL_NO_SRP
 3013|  14.5k|    if (!(s->srp_ctx.srp_Mask & SSL_kSRP)) {
  ------------------
  |  |   95|  14.5k|#define SSL_kSRP 0x00000020U
  ------------------
  |  Branch (3013:9): [True: 14.5k, False: 0]
  ------------------
 3014|  14.5k|        s->s3.tmp.mask_a |= SSL_aSRP;
  ------------------
  |  |  124|  14.5k|#define SSL_aSRP 0x00000040U
  ------------------
 3015|  14.5k|        s->s3.tmp.mask_k |= SSL_kSRP;
  ------------------
  |  |   95|  14.5k|#define SSL_kSRP 0x00000020U
  ------------------
 3016|  14.5k|    }
 3017|  14.5k|#endif
 3018|  14.5k|    return 1;
 3019|  14.5k|}
ssl_cipher_disabled:
 3032|   874k|{
 3033|   874k|    int minversion = SSL_CONNECTION_IS_DTLS(s) ? c->min_dtls : c->min_tls;
  ------------------
  |  |  266|   874k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|   874k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|   874k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 874k]
  |  |  ------------------
  ------------------
 3034|   874k|    int maxversion = SSL_CONNECTION_IS_DTLS(s) ? c->max_dtls : c->max_tls;
  ------------------
  |  |  266|   874k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|   874k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|   874k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 874k]
  |  |  ------------------
  ------------------
 3035|       |
 3036|   874k|    if (c->algorithm_mkey & s->s3.tmp.mask_k
  ------------------
  |  Branch (3036:9): [True: 435k, False: 439k]
  ------------------
 3037|   439k|        || c->algorithm_auth & s->s3.tmp.mask_a)
  ------------------
  |  Branch (3037:12): [True: 0, False: 439k]
  ------------------
 3038|   435k|        return 1;
 3039|   439k|    if (s->s3.tmp.max_ver == 0)
  ------------------
  |  Branch (3039:9): [True: 0, False: 439k]
  ------------------
 3040|      0|        return 1;
 3041|       |
 3042|   439k|    if (SSL_IS_QUIC_INT_HANDSHAKE(s))
  ------------------
  |  |  312|   439k|#define SSL_IS_QUIC_INT_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC_INTERNAL) != 0)
  |  |  ------------------
  |  |  |  |   24|   439k|#define TLS1_FLAGS_QUIC_INTERNAL 0x4000
  |  |  ------------------
  |  |  |  Branch (312:38): [True: 0, False: 439k]
  |  |  ------------------
  ------------------
 3043|       |        /* For QUIC, only allow these ciphersuites. */
 3044|      0|        switch (SSL_CIPHER_get_id(c)) {
 3045|      0|        case TLS1_3_CK_AES_128_GCM_SHA256:
  ------------------
  |  |  639|      0|#define TLS1_3_CK_AES_128_GCM_SHA256 0x03001301
  ------------------
  |  Branch (3045:9): [True: 0, False: 0]
  ------------------
 3046|      0|        case TLS1_3_CK_AES_256_GCM_SHA384:
  ------------------
  |  |  640|      0|#define TLS1_3_CK_AES_256_GCM_SHA384 0x03001302
  ------------------
  |  Branch (3046:9): [True: 0, False: 0]
  ------------------
 3047|      0|        case TLS1_3_CK_CHACHA20_POLY1305_SHA256:
  ------------------
  |  |  641|      0|#define TLS1_3_CK_CHACHA20_POLY1305_SHA256 0x03001303
  ------------------
  |  Branch (3047:9): [True: 0, False: 0]
  ------------------
 3048|      0|            break;
 3049|      0|        default:
  ------------------
  |  Branch (3049:9): [True: 0, False: 0]
  ------------------
 3050|      0|            return 1;
 3051|      0|        }
 3052|       |
 3053|       |    /*
 3054|       |     * For historical reasons we will allow ECHDE to be selected by a server
 3055|       |     * in SSLv3 if we are a client
 3056|       |     */
 3057|   439k|    if (minversion == TLS1_VERSION
  ------------------
  |  |   24|   878k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (3057:9): [True: 58.0k, False: 381k]
  ------------------
 3058|  58.0k|        && ecdhe
  ------------------
  |  Branch (3058:12): [True: 0, False: 58.0k]
  ------------------
 3059|      0|        && (c->algorithm_mkey & (SSL_kECDHE | SSL_kECDHEPSK)) != 0)
  ------------------
  |  |   89|      0|#define SSL_kECDHE 0x00000004U
  ------------------
                      && (c->algorithm_mkey & (SSL_kECDHE | SSL_kECDHEPSK)) != 0)
  ------------------
  |  |   98|      0|#define SSL_kECDHEPSK 0x00000080U
  ------------------
  |  Branch (3059:12): [True: 0, False: 0]
  ------------------
 3060|      0|        minversion = SSL3_VERSION;
  ------------------
  |  |   23|      0|#define SSL3_VERSION 0x0300
  ------------------
 3061|       |
 3062|   439k|    if (ssl_version_cmp(s, minversion, s->s3.tmp.max_ver) > 0
  ------------------
  |  Branch (3062:9): [True: 0, False: 439k]
  ------------------
 3063|   439k|        || ssl_version_cmp(s, maxversion, s->s3.tmp.min_ver) < 0)
  ------------------
  |  Branch (3063:12): [True: 0, False: 439k]
  ------------------
 3064|      0|        return 1;
 3065|       |
 3066|   439k|    return !ssl_security(s, op, c->strength_bits, 0, (void *)c);
 3067|   439k|}
tls_use_ticket:
 3070|  3.62k|{
 3071|  3.62k|    if ((s->options & SSL_OP_NO_TICKET))
  ------------------
  |  |  384|  3.62k|#define SSL_OP_NO_TICKET SSL_OP_BIT(14)
  |  |  ------------------
  |  |  |  |  351|  3.62k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (3071:9): [True: 3.62k, False: 0]
  ------------------
 3072|  3.62k|        return 0;
 3073|      0|    return ssl_security(s, SSL_SECOP_TICKET, 0, 0, NULL);
  ------------------
  |  | 2770|      0|#define SSL_SECOP_TICKET (10 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2729|      0|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
 3074|  3.62k|}
tls1_set_server_sigalgs:
 3077|  3.62k|{
 3078|  3.62k|    size_t i;
 3079|       |
 3080|       |    /* Clear any shared signature algorithms */
 3081|  3.62k|    OPENSSL_free(s->shared_sigalgs);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3082|  3.62k|    s->shared_sigalgs = NULL;
 3083|  3.62k|    s->shared_sigalgslen = 0;
 3084|       |
 3085|       |    /* Clear certificate validity flags */
 3086|  3.62k|    if (s->s3.tmp.valid_flags)
  ------------------
  |  Branch (3086:9): [True: 0, False: 3.62k]
  ------------------
 3087|      0|        memset(s->s3.tmp.valid_flags, 0, s->ssl_pkey_num * sizeof(uint32_t));
 3088|  3.62k|    else
 3089|  3.62k|        s->s3.tmp.valid_flags = OPENSSL_calloc(s->ssl_pkey_num, sizeof(uint32_t));
  ------------------
  |  |  113|  3.62k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3090|  3.62k|    if (s->s3.tmp.valid_flags == NULL) {
  ------------------
  |  Branch (3090:9): [True: 0, False: 3.62k]
  ------------------
 3091|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 3092|      0|        return 0;
 3093|      0|    }
 3094|       |    /*
 3095|       |     * If peer sent no signature algorithms check to see if we support
 3096|       |     * the default algorithm for each certificate type
 3097|       |     */
 3098|  3.62k|    if (s->s3.tmp.peer_cert_sigalgs == NULL
  ------------------
  |  Branch (3098:9): [True: 3.62k, False: 0]
  ------------------
 3099|  3.62k|        && s->s3.tmp.peer_sigalgs == NULL) {
  ------------------
  |  Branch (3099:12): [True: 0, False: 3.62k]
  ------------------
 3100|      0|        const uint16_t *sent_sigs;
 3101|      0|        size_t sent_sigslen = tls12_get_psigalgs(s, 1, &sent_sigs);
 3102|       |
 3103|      0|        for (i = 0; i < s->ssl_pkey_num; i++) {
  ------------------
  |  Branch (3103:21): [True: 0, False: 0]
  ------------------
 3104|      0|            const SIGALG_LOOKUP *lu = tls1_get_legacy_sigalg(s, (int)i);
 3105|      0|            size_t j;
 3106|       |
 3107|      0|            if (lu == NULL)
  ------------------
  |  Branch (3107:17): [True: 0, False: 0]
  ------------------
 3108|      0|                continue;
 3109|       |            /* Check default matches a type we sent */
 3110|      0|            for (j = 0; j < sent_sigslen; j++) {
  ------------------
  |  Branch (3110:25): [True: 0, False: 0]
  ------------------
 3111|      0|                if (lu->sigalg == sent_sigs[j]) {
  ------------------
  |  Branch (3111:21): [True: 0, False: 0]
  ------------------
 3112|      0|                    s->s3.tmp.valid_flags[i] = CERT_PKEY_SIGN;
  ------------------
  |  |  605|      0|#define CERT_PKEY_SIGN 0x2
  ------------------
 3113|      0|                    break;
 3114|      0|                }
 3115|      0|            }
 3116|      0|        }
 3117|      0|        return 1;
 3118|      0|    }
 3119|       |
 3120|  3.62k|    if (!tls1_process_sigalgs(s)) {
  ------------------
  |  Branch (3120:9): [True: 0, False: 3.62k]
  ------------------
 3121|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 3122|      0|        return 0;
 3123|      0|    }
 3124|  3.62k|    if (s->shared_sigalgs != NULL)
  ------------------
  |  Branch (3124:9): [True: 3.62k, False: 0]
  ------------------
 3125|  3.62k|        return 1;
 3126|       |
 3127|       |    /* Fatal error if no shared signature algorithms */
 3128|  3.62k|    SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 3129|      0|        SSL_R_NO_SHARED_SIGNATURE_ALGORITHMS);
 3130|      0|    return 0;
 3131|  3.62k|}
ssl_set_sig_mask:
 3544|  14.5k|{
 3545|  14.5k|    const uint16_t *sigalgs;
 3546|  14.5k|    size_t i, sigalgslen;
 3547|  14.5k|    uint32_t disabled_mask = SSL_aRSA | SSL_aDSS | SSL_aECDSA;
  ------------------
  |  |  112|  14.5k|#define SSL_aRSA 0x00000001U
  ------------------
                  uint32_t disabled_mask = SSL_aRSA | SSL_aDSS | SSL_aECDSA;
  ------------------
  |  |  114|  14.5k|#define SSL_aDSS 0x00000002U
  ------------------
                  uint32_t disabled_mask = SSL_aRSA | SSL_aDSS | SSL_aECDSA;
  ------------------
  |  |  118|  14.5k|#define SSL_aECDSA 0x00000008U
  ------------------
 3548|       |    /*
 3549|       |     * Go through all signature algorithms seeing if we support any
 3550|       |     * in disabled_mask.
 3551|       |     */
 3552|  14.5k|    sigalgslen = tls12_get_psigalgs(s, 1, &sigalgs);
 3553|   449k|    for (i = 0; i < sigalgslen; i++, sigalgs++) {
  ------------------
  |  Branch (3553:17): [True: 435k, False: 14.5k]
  ------------------
 3554|   435k|        const SIGALG_LOOKUP *lu = tls1_lookup_sigalg(SSL_CONNECTION_GET_CTX(s), *sigalgs);
  ------------------
  |  |   26|   435k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3555|   435k|        const SSL_CERT_LOOKUP *clu;
 3556|       |
 3557|   435k|        if (lu == NULL)
  ------------------
  |  Branch (3557:13): [True: 0, False: 435k]
  ------------------
 3558|      0|            continue;
 3559|       |
 3560|   435k|        clu = ssl_cert_lookup_by_idx(lu->sig_idx,
 3561|   435k|            SSL_CONNECTION_GET_CTX(s));
  ------------------
  |  |   26|   435k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3562|   435k|        if (clu == NULL)
  ------------------
  |  Branch (3562:13): [True: 0, False: 435k]
  ------------------
 3563|      0|            continue;
 3564|       |
 3565|       |        /* If algorithm is disabled see if we can enable it */
 3566|   435k|        if ((clu->amask & disabled_mask) != 0
  ------------------
  |  Branch (3566:13): [True: 43.5k, False: 391k]
  ------------------
 3567|  43.5k|            && tls12_sigalg_allowed(s, op, lu))
  ------------------
  |  Branch (3567:16): [True: 43.5k, False: 0]
  ------------------
 3568|  43.5k|            disabled_mask &= ~clu->amask;
 3569|   435k|    }
 3570|  14.5k|    *pmask_a |= disabled_mask;
 3571|  14.5k|}
tls12_copy_sigalgs:
 3575|  3.62k|{
 3576|  3.62k|    size_t i;
 3577|  3.62k|    int rv = 0;
 3578|       |
 3579|   112k|    for (i = 0; i < psiglen; i++, psig++) {
  ------------------
  |  Branch (3579:17): [True: 108k, False: 3.62k]
  ------------------
 3580|   108k|        const SIGALG_LOOKUP *lu = tls1_lookup_sigalg(SSL_CONNECTION_GET_CTX(s), *psig);
  ------------------
  |  |   26|   108k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3581|       |
 3582|   108k|        if (lu == NULL || !tls_sigalg_compat(s, lu))
  ------------------
  |  Branch (3582:13): [True: 0, False: 108k]
  |  Branch (3582:27): [True: 10.8k, False: 97.9k]
  ------------------
 3583|  10.8k|            continue;
 3584|  97.9k|        if (!WPACKET_put_bytes_u16(pkt, *psig))
  ------------------
  |  |  911|  97.9k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (3584:13): [True: 0, False: 97.9k]
  ------------------
 3585|      0|            return 0;
 3586|       |        /*
 3587|       |         * If TLS 1.3 must have at least one valid TLS 1.3 message
 3588|       |         * signing algorithm: i.e. neither RSA nor SHA1/SHA224
 3589|       |         */
 3590|  97.9k|        if (rv == 0 && (!SSL_CONNECTION_IS_TLS13(s) || (lu->sig != EVP_PKEY_RSA && lu->hash != NID_sha1 && lu->hash != NID_sha224)))
  ------------------
  |  |  273|  7.25k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  7.25k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 0, False: 3.62k]
  |  |  ------------------
  ------------------
                      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)))
  ------------------
  |  | 2348|      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)))
  ------------------
  |  | 3306|      0|#define NID_sha224              675
  ------------------
  |  Branch (3590:13): [True: 3.62k, False: 94.3k]
  |  Branch (3590:57): [True: 0, False: 0]
  |  Branch (3590:84): [True: 0, False: 0]
  |  Branch (3590:108): [True: 0, False: 0]
  ------------------
 3591|  3.62k|            rv = 1;
 3592|  97.9k|    }
 3593|  3.62k|    if (rv == 0)
  ------------------
  |  Branch (3593:9): [True: 0, False: 3.62k]
  ------------------
 3594|       |        ERR_raise(ERR_LIB_SSL, SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3595|  3.62k|    return rv;
 3596|  3.62k|}
tls1_save_u16:
 3672|  7.25k|{
 3673|  7.25k|    unsigned int stmp;
 3674|  7.25k|    size_t size, i;
 3675|  7.25k|    uint16_t *buf;
 3676|       |
 3677|  7.25k|    size = PACKET_remaining(pkt);
 3678|       |
 3679|       |    /* Invalid data length */
 3680|  7.25k|    if (size == 0 || (size & 1) != 0)
  ------------------
  |  Branch (3680:9): [True: 0, False: 7.25k]
  |  Branch (3680:22): [True: 0, False: 7.25k]
  ------------------
 3681|      0|        return 0;
 3682|       |
 3683|  7.25k|    size >>= 1;
 3684|       |
 3685|       |    /*
 3686|       |     * We ignore any entries in the list larger than the maximum number we
 3687|       |     * will accept.
 3688|       |     */
 3689|  7.25k|    if (size > maxnum)
  ------------------
  |  Branch (3689:9): [True: 0, False: 7.25k]
  ------------------
 3690|      0|        size = maxnum;
 3691|       |
 3692|  7.25k|    if ((buf = OPENSSL_malloc_array(size, sizeof(*buf))) == NULL)
  ------------------
  |  |  111|  7.25k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (3692:9): [True: 0, False: 7.25k]
  ------------------
 3693|      0|        return 0;
 3694|   145k|    for (i = 0; i < size && PACKET_get_net_2(pkt, &stmp); i++)
  ------------------
  |  Branch (3694:17): [True: 137k, False: 7.25k]
  |  Branch (3694:29): [True: 137k, False: 0]
  ------------------
 3695|   137k|        buf[i] = stmp;
 3696|       |
 3697|  7.25k|    if (i != size) {
  ------------------
  |  Branch (3697:9): [True: 0, False: 7.25k]
  ------------------
 3698|      0|        OPENSSL_free(buf);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3699|      0|        return 0;
 3700|      0|    }
 3701|       |
 3702|  7.25k|    OPENSSL_free(*pdest);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3703|  7.25k|    *pdest = buf;
 3704|  7.25k|    *pdestlen = size;
 3705|       |
 3706|  7.25k|    return 1;
 3707|  7.25k|}
tls1_save_sigalgs:
 3710|  3.62k|{
 3711|       |    /* Extension ignored for inappropriate versions */
 3712|  3.62k|    if (!SSL_USE_SIGALGS(s))
  ------------------
  |  |  293|  3.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_SIGALGS)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_SIGALGS)
  |  |  ------------------
  |  |  |  | 2192|  3.62k|#define SSL_ENC_FLAG_SIGALGS 0x2
  |  |  ------------------
  ------------------
  |  Branch (3712:9): [True: 0, False: 3.62k]
  ------------------
 3713|      0|        return 1;
 3714|       |    /* Should never happen */
 3715|  3.62k|    if (s->cert == NULL)
  ------------------
  |  Branch (3715:9): [True: 0, False: 3.62k]
  ------------------
 3716|      0|        return 0;
 3717|       |
 3718|       |    /*
 3719|       |     * We restrict the number of signature algorithms we are willing to process
 3720|       |     * to 128. Any beyond this number are simply ignored.
 3721|       |     */
 3722|  3.62k|    if (cert)
  ------------------
  |  Branch (3722:9): [True: 0, False: 3.62k]
  ------------------
 3723|      0|        return tls1_save_u16(pkt, &s->s3.tmp.peer_cert_sigalgs,
 3724|      0|            &s->s3.tmp.peer_cert_sigalgslen, MAX_SIGALGS);
  ------------------
  |  |   32|      0|#define MAX_SIGALGS 128
  ------------------
 3725|  3.62k|    else
 3726|  3.62k|        return tls1_save_u16(pkt, &s->s3.tmp.peer_sigalgs,
 3727|  3.62k|            &s->s3.tmp.peer_sigalgslen, MAX_SIGALGS);
  ------------------
  |  |   32|  3.62k|#define MAX_SIGALGS 128
  ------------------
 3728|  3.62k|}
tls1_process_sigalgs:
 3733|  3.62k|{
 3734|  3.62k|    size_t i;
 3735|  3.62k|    uint32_t *pvalid = s->s3.tmp.valid_flags;
 3736|       |
 3737|  3.62k|    if (!tls1_set_shared_sigalgs(s))
  ------------------
  |  Branch (3737:9): [True: 0, False: 3.62k]
  ------------------
 3738|      0|        return 0;
 3739|       |
 3740|  50.8k|    for (i = 0; i < s->ssl_pkey_num; i++)
  ------------------
  |  Branch (3740:17): [True: 47.1k, False: 3.62k]
  ------------------
 3741|  47.1k|        pvalid[i] = 0;
 3742|       |
 3743|  87.0k|    for (i = 0; i < s->shared_sigalgslen; i++) {
  ------------------
  |  Branch (3743:17): [True: 83.4k, False: 3.62k]
  ------------------
 3744|  83.4k|        const SIGALG_LOOKUP *sigptr = s->shared_sigalgs[i];
 3745|  83.4k|        int idx = sigptr->sig_idx;
 3746|       |
 3747|       |        /* Ignore PKCS1 based sig algs in TLSv1.3 */
 3748|  83.4k|        if (SSL_CONNECTION_IS_TLS13(s) && sigptr->sig == EVP_PKEY_RSA)
  ------------------
  |  |  273|   166k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|   166k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  83.4k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  83.4k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 83.4k, False: 0]
  |  |  ------------------
  |  |  274|  83.4k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  83.4k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|   166k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 83.4k, False: 0]
  |  |  ------------------
  |  |  275|   166k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  83.4k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  83.4k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 83.4k, False: 0]
  |  |  ------------------
  ------------------
                      if (SSL_CONNECTION_IS_TLS13(s) && sigptr->sig == EVP_PKEY_RSA)
  ------------------
  |  |   63|  83.4k|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|  83.4k|#define NID_rsaEncryption               6
  |  |  ------------------
  ------------------
  |  Branch (3748:43): [True: 14.5k, False: 68.9k]
  ------------------
 3749|  14.5k|            continue;
 3750|       |        /* If not disabled indicate we can explicitly sign */
 3751|  68.9k|        if (pvalid[idx] == 0
  ------------------
  |  Branch (3751:13): [True: 32.6k, False: 36.2k]
  ------------------
 3752|  32.6k|            && !ssl_cert_is_disabled(SSL_CONNECTION_GET_CTX(s), idx))
  ------------------
  |  |   26|  32.6k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  |  Branch (3752:16): [True: 32.6k, False: 0]
  ------------------
 3753|  32.6k|            pvalid[idx] = CERT_PKEY_EXPLICIT_SIGN | CERT_PKEY_SIGN;
  ------------------
  |  |  615|  32.6k|#define CERT_PKEY_EXPLICIT_SIGN 0x100
  ------------------
                          pvalid[idx] = CERT_PKEY_EXPLICIT_SIGN | CERT_PKEY_SIGN;
  ------------------
  |  |  605|  32.6k|#define CERT_PKEY_SIGN 0x2
  ------------------
 3754|  68.9k|    }
 3755|  3.62k|    return 1;
 3756|  3.62k|}
ssl_security_cert:
 4566|  7.36k|{
 4567|  7.36k|    if (is_ee) {
  ------------------
  |  Branch (4567:9): [True: 7.36k, False: 0]
  ------------------
 4568|  7.36k|        if (!ssl_security_cert_key(s, ctx, x, SSL_SECOP_EE_KEY))
  ------------------
  |  | 2782|  7.36k|#define SSL_SECOP_EE_KEY (16 | SSL_SECOP_OTHER_CERT)
  |  |  ------------------
  |  |  |  | 2735|  7.36k|#define SSL_SECOP_OTHER_CERT (6 << 16)
  |  |  ------------------
  ------------------
  |  Branch (4568:13): [True: 0, False: 7.36k]
  ------------------
 4569|      0|            return SSL_R_EE_KEY_TOO_SMALL;
  ------------------
  |  |  117|      0|#define SSL_R_EE_KEY_TOO_SMALL 399
  ------------------
 4570|  7.36k|    } else {
 4571|      0|        if (!ssl_security_cert_key(s, ctx, x, SSL_SECOP_CA_KEY))
  ------------------
  |  | 2784|      0|#define SSL_SECOP_CA_KEY (17 | SSL_SECOP_OTHER_CERT)
  |  |  ------------------
  |  |  |  | 2735|      0|#define SSL_SECOP_OTHER_CERT (6 << 16)
  |  |  ------------------
  ------------------
  |  Branch (4571:13): [True: 0, False: 0]
  ------------------
 4572|      0|            return SSL_R_CA_KEY_TOO_SMALL;
  ------------------
  |  |   71|      0|#define SSL_R_CA_KEY_TOO_SMALL 397
  ------------------
 4573|      0|    }
 4574|  7.36k|    return 1;
 4575|  7.36k|}
ssl_security_cert_chain:
 4588|  3.62k|{
 4589|  3.62k|    int rv, start_idx, i;
 4590|       |
 4591|  3.62k|    if (x == NULL) {
  ------------------
  |  Branch (4591:9): [True: 3.62k, False: 0]
  ------------------
 4592|  3.62k|        x = sk_X509_value(sk, 0);
  ------------------
  |  |   83|  3.62k|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
 4593|  3.62k|        if (x == NULL)
  ------------------
  |  Branch (4593:13): [True: 0, False: 3.62k]
  ------------------
 4594|      0|            return ERR_R_INTERNAL_ERROR;
  ------------------
  |  |  308|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  304|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  219|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  220|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  211|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4595|  3.62k|        start_idx = 1;
 4596|  3.62k|    } else
 4597|      0|        start_idx = 0;
 4598|       |
 4599|  3.62k|    rv = ssl_security_cert(s, NULL, x, 1);
 4600|  3.62k|    if (rv != 1)
  ------------------
  |  Branch (4600:9): [True: 0, False: 3.62k]
  ------------------
 4601|      0|        return rv;
 4602|       |
 4603|  3.62k|    for (i = start_idx; i < sk_X509_num(sk); i++) {
  ------------------
  |  |   82|  3.62k|#define sk_X509_num(sk) OPENSSL_sk_num(ossl_check_const_X509_sk_type(sk))
  ------------------
  |  Branch (4603:25): [True: 0, False: 3.62k]
  ------------------
 4604|      0|        x = sk_X509_value(sk, i);
  ------------------
  |  |   83|      0|#define sk_X509_value(sk, idx) ((X509 *)OPENSSL_sk_value(ossl_check_const_X509_sk_type(sk), (idx)))
  ------------------
 4605|      0|        rv = ssl_security_cert(s, NULL, x, 0);
 4606|      0|        if (rv != 1)
  ------------------
  |  Branch (4606:13): [True: 0, False: 0]
  ------------------
 4607|      0|            return rv;
 4608|      0|    }
 4609|  3.62k|    return 1;
 4610|  3.62k|}
tls_choose_sigalg:
 4815|  3.62k|{
 4816|  3.62k|    const SIGALG_LOOKUP *lu = NULL;
 4817|  3.62k|    int sig_idx = -1;
 4818|       |
 4819|  3.62k|    s->s3.tmp.cert = NULL;
 4820|  3.62k|    s->s3.tmp.sigalg = NULL;
 4821|       |
 4822|  3.62k|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  273|  3.62k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|  7.25k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|  3.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  274|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  7.25k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 3.62k, False: 0]
  |  |  ------------------
  |  |  275|  3.62k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  3.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  3.62k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 3.62k, False: 0]
  |  |  ------------------
  ------------------
 4823|  3.62k|        lu = find_sig_alg(s, NULL, NULL);
 4824|  3.62k|        if (lu == NULL) {
  ------------------
  |  Branch (4824:13): [True: 0, False: 3.62k]
  ------------------
 4825|      0|            if (!fatalerrs)
  ------------------
  |  Branch (4825:17): [True: 0, False: 0]
  ------------------
 4826|      0|                return 1;
 4827|      0|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4828|      0|                SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM);
 4829|      0|            return 0;
 4830|      0|        }
 4831|  3.62k|    } else {
 4832|       |        /* If ciphersuite doesn't require a cert nothing to do */
 4833|      0|        if (!(s->s3.tmp.new_cipher->algorithm_auth & SSL_aCERT))
  ------------------
  |  |  131|      0|    (SSL_aRSA | SSL_aDSS | SSL_aECDSA | SSL_aGOST01 | SSL_aGOST12)
  |  |  ------------------
  |  |  |  |  112|      0|#define SSL_aRSA 0x00000001U
  |  |  ------------------
  |  |                   (SSL_aRSA | SSL_aDSS | SSL_aECDSA | SSL_aGOST01 | SSL_aGOST12)
  |  |  ------------------
  |  |  |  |  114|      0|#define SSL_aDSS 0x00000002U
  |  |  ------------------
  |  |                   (SSL_aRSA | SSL_aDSS | SSL_aECDSA | SSL_aGOST01 | SSL_aGOST12)
  |  |  ------------------
  |  |  |  |  118|      0|#define SSL_aECDSA 0x00000008U
  |  |  ------------------
  |  |                   (SSL_aRSA | SSL_aDSS | SSL_aECDSA | SSL_aGOST01 | SSL_aGOST12)
  |  |  ------------------
  |  |  |  |  122|      0|#define SSL_aGOST01 0x00000020U
  |  |  ------------------
  |  |                   (SSL_aRSA | SSL_aDSS | SSL_aECDSA | SSL_aGOST01 | SSL_aGOST12)
  |  |  ------------------
  |  |  |  |  126|      0|#define SSL_aGOST12 0x00000080U
  |  |  ------------------
  ------------------
  |  Branch (4833:13): [True: 0, False: 0]
  ------------------
 4834|      0|            return 1;
 4835|      0|        if (!s->server && !ssl_has_cert(s, (int)(s->cert->key - s->cert->pkeys)))
  ------------------
  |  Branch (4835:13): [True: 0, False: 0]
  |  Branch (4835:27): [True: 0, False: 0]
  ------------------
 4836|      0|            return 1;
 4837|       |
 4838|      0|        if (SSL_USE_SIGALGS(s)) {
  ------------------
  |  |  293|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_SIGALGS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_SIGALGS)
  |  |  ------------------
  |  |  |  | 2192|      0|#define SSL_ENC_FLAG_SIGALGS 0x2
  |  |  ------------------
  |  |  |  Branch (293:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4839|      0|            size_t i;
 4840|      0|            if (s->s3.tmp.peer_sigalgs != NULL) {
  ------------------
  |  Branch (4840:17): [True: 0, False: 0]
  ------------------
 4841|      0|                int curve = -1;
 4842|      0|                SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|      0|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 4843|       |
 4844|       |                /* For Suite B need to match signature algorithm to curve */
 4845|      0|                if (tls1_suiteb(s))
  ------------------
  |  | 2035|      0|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  584|      0|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  |  |  |  Branch (2035:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4846|      0|                    curve = ssl_get_EC_curve_nid(s->cert->pkeys[SSL_PKEY_ECC]
  ------------------
  |  |  330|      0|#define SSL_PKEY_ECC 3
  ------------------
 4847|      0|                            .privatekey);
 4848|       |
 4849|       |                /*
 4850|       |                 * Find highest preference signature algorithm matching
 4851|       |                 * cert type
 4852|       |                 */
 4853|      0|                for (i = 0; i < s->shared_sigalgslen; i++) {
  ------------------
  |  Branch (4853:29): [True: 0, False: 0]
  ------------------
 4854|       |                    /* Check the sigalg version bounds */
 4855|      0|                    lu = s->shared_sigalgs[i];
 4856|      0|                    if (!tls_sigalg_compat(s, lu))
  ------------------
  |  Branch (4856:25): [True: 0, False: 0]
  ------------------
 4857|      0|                        continue;
 4858|      0|                    if (s->server) {
  ------------------
  |  Branch (4858:25): [True: 0, False: 0]
  ------------------
 4859|      0|                        if ((sig_idx = tls12_get_cert_sigalg_idx(s, lu)) == -1)
  ------------------
  |  Branch (4859:29): [True: 0, False: 0]
  ------------------
 4860|      0|                            continue;
 4861|      0|                    } else {
 4862|      0|                        int cc_idx = (int)(s->cert->key - s->cert->pkeys);
 4863|       |
 4864|      0|                        sig_idx = lu->sig_idx;
 4865|      0|                        if (cc_idx != sig_idx)
  ------------------
  |  Branch (4865:29): [True: 0, False: 0]
  ------------------
 4866|      0|                            continue;
 4867|      0|                    }
 4868|       |                    /* Check that we have a cert, and sig_algs_cert */
 4869|      0|                    if (!has_usable_cert(s, lu, sig_idx))
  ------------------
  |  Branch (4869:25): [True: 0, False: 0]
  ------------------
 4870|      0|                        continue;
 4871|      0|                    if (lu->sig == EVP_PKEY_RSA_PSS) {
  ------------------
  |  |   65|      0|#define EVP_PKEY_RSA_PSS NID_rsassaPss
  |  |  ------------------
  |  |  |  |  583|      0|#define NID_rsassaPss           912
  |  |  ------------------
  ------------------
  |  Branch (4871:25): [True: 0, False: 0]
  ------------------
 4872|       |                        /* validate that key is large enough for the signature algorithm */
 4873|      0|                        EVP_PKEY *pkey = s->cert->pkeys[sig_idx].privatekey;
 4874|       |
 4875|      0|                        if (!rsa_pss_check_min_key_size(sctx, pkey, lu))
  ------------------
  |  Branch (4875:29): [True: 0, False: 0]
  ------------------
 4876|      0|                            continue;
 4877|      0|                    }
 4878|      0|                    if (curve == -1 || lu->curve == curve)
  ------------------
  |  Branch (4878:25): [True: 0, False: 0]
  |  Branch (4878:40): [True: 0, False: 0]
  ------------------
 4879|      0|                        break;
 4880|      0|                }
 4881|      0|#ifndef OPENSSL_NO_GOST
 4882|       |                /*
 4883|       |                 * Some Windows-based implementations do not send GOST algorithms indication
 4884|       |                 * in supported_algorithms extension, so when we have GOST-based ciphersuite,
 4885|       |                 * we have to assume GOST support.
 4886|       |                 */
 4887|      0|                if (i == s->shared_sigalgslen
  ------------------
  |  Branch (4887:21): [True: 0, False: 0]
  ------------------
 4888|      0|                    && (s->s3.tmp.new_cipher->algorithm_auth
  ------------------
  |  Branch (4888:24): [True: 0, False: 0]
  ------------------
 4889|      0|                           & (SSL_aGOST01 | SSL_aGOST12))
  ------------------
  |  |  122|      0|#define SSL_aGOST01 0x00000020U
  ------------------
                                         & (SSL_aGOST01 | SSL_aGOST12))
  ------------------
  |  |  126|      0|#define SSL_aGOST12 0x00000080U
  ------------------
 4890|      0|                        != 0) {
 4891|      0|                    if ((lu = tls1_get_legacy_sigalg(s, -1)) == NULL) {
  ------------------
  |  Branch (4891:25): [True: 0, False: 0]
  ------------------
 4892|      0|                        if (!fatalerrs)
  ------------------
  |  Branch (4892:29): [True: 0, False: 0]
  ------------------
 4893|      0|                            return 1;
 4894|      0|                        SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4895|      0|                            SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM);
 4896|      0|                        return 0;
 4897|      0|                    } else {
 4898|      0|                        i = 0;
 4899|      0|                        sig_idx = lu->sig_idx;
 4900|      0|                    }
 4901|      0|                }
 4902|      0|#endif
 4903|      0|                if (i == s->shared_sigalgslen) {
  ------------------
  |  Branch (4903:21): [True: 0, False: 0]
  ------------------
 4904|      0|                    if (!fatalerrs)
  ------------------
  |  Branch (4904:25): [True: 0, False: 0]
  ------------------
 4905|      0|                        return 1;
 4906|      0|                    SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4907|      0|                        SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM);
 4908|      0|                    return 0;
 4909|      0|                }
 4910|      0|            } else {
 4911|       |                /*
 4912|       |                 * If we have no sigalg use defaults
 4913|       |                 */
 4914|      0|                const uint16_t *sent_sigs;
 4915|      0|                size_t sent_sigslen;
 4916|       |
 4917|      0|                if ((lu = tls1_get_legacy_sigalg(s, -1)) == NULL) {
  ------------------
  |  Branch (4917:21): [True: 0, False: 0]
  ------------------
 4918|      0|                    if (!fatalerrs)
  ------------------
  |  Branch (4918:25): [True: 0, False: 0]
  ------------------
 4919|      0|                        return 1;
 4920|      0|                    SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4921|      0|                        SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM);
 4922|      0|                    return 0;
 4923|      0|                }
 4924|       |
 4925|       |                /* Check signature matches a type we sent */
 4926|      0|                sent_sigslen = tls12_get_psigalgs(s, 1, &sent_sigs);
 4927|      0|                for (i = 0; i < sent_sigslen; i++, sent_sigs++) {
  ------------------
  |  Branch (4927:29): [True: 0, False: 0]
  ------------------
 4928|      0|                    if (lu->sigalg == *sent_sigs
  ------------------
  |  Branch (4928:25): [True: 0, False: 0]
  ------------------
 4929|      0|                        && has_usable_cert(s, lu, lu->sig_idx))
  ------------------
  |  Branch (4929:28): [True: 0, False: 0]
  ------------------
 4930|      0|                        break;
 4931|      0|                }
 4932|      0|                if (i == sent_sigslen) {
  ------------------
  |  Branch (4932:21): [True: 0, False: 0]
  ------------------
 4933|      0|                    if (!fatalerrs)
  ------------------
  |  Branch (4933:25): [True: 0, False: 0]
  ------------------
 4934|      0|                        return 1;
 4935|      0|                    SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4936|      0|                        SSL_R_WRONG_SIGNATURE_TYPE);
 4937|      0|                    return 0;
 4938|      0|                }
 4939|      0|            }
 4940|      0|        } else {
 4941|      0|            if ((lu = tls1_get_legacy_sigalg(s, -1)) == NULL) {
  ------------------
  |  Branch (4941:17): [True: 0, False: 0]
  ------------------
 4942|      0|                if (!fatalerrs)
  ------------------
  |  Branch (4942:21): [True: 0, False: 0]
  ------------------
 4943|      0|                    return 1;
 4944|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4945|      0|                    SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM);
 4946|      0|                return 0;
 4947|      0|            }
 4948|      0|        }
 4949|      0|    }
 4950|  3.62k|    if (sig_idx == -1)
  ------------------
  |  Branch (4950:9): [True: 3.62k, False: 0]
  ------------------
 4951|  3.62k|        sig_idx = lu->sig_idx;
 4952|  3.62k|    s->s3.tmp.cert = &s->cert->pkeys[sig_idx];
 4953|  3.62k|    s->cert->key = s->s3.tmp.cert;
 4954|  3.62k|    s->s3.tmp.sigalg = lu;
 4955|  3.62k|    return 1;
 4956|  3.62k|}
ssl_hmac_new:
 4999|  7.16k|{
 5000|  7.16k|    SSL_HMAC *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  109|  7.16k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 5001|  7.16k|    EVP_MAC *mac = NULL;
 5002|       |
 5003|  7.16k|    if (ret == NULL)
  ------------------
  |  Branch (5003:9): [True: 0, False: 7.16k]
  ------------------
 5004|      0|        return NULL;
 5005|  7.16k|#ifndef OPENSSL_NO_DEPRECATED_3_0
 5006|  7.16k|    if (ctx->ext.ticket_key_evp_cb == NULL
  ------------------
  |  Branch (5006:9): [True: 7.16k, False: 0]
  ------------------
 5007|  7.16k|        && ctx->ext.ticket_key_cb != NULL) {
  ------------------
  |  Branch (5007:12): [True: 0, False: 7.16k]
  ------------------
 5008|      0|        if (!ssl_hmac_old_new(ret))
  ------------------
  |  Branch (5008:13): [True: 0, False: 0]
  ------------------
 5009|      0|            goto err;
 5010|      0|        return ret;
 5011|      0|    }
 5012|  7.16k|#endif
 5013|  7.16k|    mac = EVP_MAC_fetch(ctx->libctx, "HMAC", ctx->propq);
 5014|  7.16k|    if (mac == NULL || (ret->ctx = EVP_MAC_CTX_new(mac)) == NULL)
  ------------------
  |  Branch (5014:9): [True: 0, False: 7.16k]
  |  Branch (5014:24): [True: 0, False: 7.16k]
  ------------------
 5015|      0|        goto err;
 5016|  7.16k|    EVP_MAC_free(mac);
 5017|  7.16k|    return ret;
 5018|      0|err:
 5019|      0|    EVP_MAC_CTX_free(ret->ctx);
 5020|      0|    EVP_MAC_free(mac);
 5021|      0|    OPENSSL_free(ret);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 5022|       |    return NULL;
 5023|  7.16k|}
ssl_hmac_free:
 5026|  7.16k|{
 5027|  7.16k|    if (ctx != NULL) {
  ------------------
  |  Branch (5027:9): [True: 7.16k, False: 0]
  ------------------
 5028|  7.16k|        EVP_MAC_CTX_free(ctx->ctx);
 5029|  7.16k|#ifndef OPENSSL_NO_DEPRECATED_3_0
 5030|  7.16k|        ssl_hmac_old_free(ctx);
 5031|  7.16k|#endif
 5032|  7.16k|        OPENSSL_free(ctx);
  ------------------
  |  |  132|  7.16k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 5033|  7.16k|    }
 5034|  7.16k|}
ssl_hmac_init:
 5042|  7.16k|{
 5043|  7.16k|    OSSL_PARAM params[2], *p = params;
 5044|       |
 5045|  7.16k|    if (ctx->ctx != NULL) {
  ------------------
  |  Branch (5045:9): [True: 7.16k, False: 0]
  ------------------
 5046|  7.16k|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_DIGEST, md, 0);
  ------------------
  |  |  350|  7.16k|# define OSSL_MAC_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
  |  |  ------------------
  |  |  |  |  127|  7.16k|# define OSSL_ALG_PARAM_DIGEST "digest"
  |  |  ------------------
  ------------------
 5047|  7.16k|        *p = OSSL_PARAM_construct_end();
 5048|  7.16k|        if (EVP_MAC_init(ctx->ctx, key, len, params))
  ------------------
  |  Branch (5048:13): [True: 7.16k, False: 0]
  ------------------
 5049|  7.16k|            return 1;
 5050|  7.16k|    }
 5051|      0|#ifndef OPENSSL_NO_DEPRECATED_3_0
 5052|      0|    if (ctx->old_ctx != NULL)
  ------------------
  |  Branch (5052:9): [True: 0, False: 0]
  ------------------
 5053|      0|        return ssl_hmac_old_init(ctx, key, len, md);
 5054|      0|#endif
 5055|      0|    return 0;
 5056|      0|}
ssl_hmac_update:
 5059|  7.16k|{
 5060|  7.16k|    if (ctx->ctx != NULL)
  ------------------
  |  Branch (5060:9): [True: 7.16k, False: 0]
  ------------------
 5061|  7.16k|        return EVP_MAC_update(ctx->ctx, data, len);
 5062|      0|#ifndef OPENSSL_NO_DEPRECATED_3_0
 5063|      0|    if (ctx->old_ctx != NULL)
  ------------------
  |  Branch (5063:9): [True: 0, False: 0]
  ------------------
 5064|      0|        return ssl_hmac_old_update(ctx, data, len);
 5065|      0|#endif
 5066|      0|    return 0;
 5067|      0|}
ssl_hmac_final:
 5071|  7.16k|{
 5072|  7.16k|    if (ctx->ctx != NULL)
  ------------------
  |  Branch (5072:9): [True: 7.16k, False: 0]
  ------------------
 5073|  7.16k|        return EVP_MAC_final(ctx->ctx, md, len, max_size);
 5074|      0|#ifndef OPENSSL_NO_DEPRECATED_3_0
 5075|      0|    if (ctx->old_ctx != NULL)
  ------------------
  |  Branch (5075:9): [True: 0, False: 0]
  ------------------
 5076|      0|        return ssl_hmac_old_final(ctx, md, len);
 5077|      0|#endif
 5078|      0|    return 0;
 5079|      0|}
ssl_get_EC_curve_nid:
 5093|  10.8k|{
 5094|  10.8k|    char gname[OSSL_MAX_NAME_SIZE];
 5095|       |
 5096|  10.8k|    if (EVP_PKEY_get_group_name(pkey, gname, sizeof(gname), NULL) > 0)
  ------------------
  |  Branch (5096:9): [True: 10.8k, False: 0]
  ------------------
 5097|  10.8k|        return OBJ_txt2nid(gname);
 5098|       |
 5099|      0|    return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
 5100|  10.8k|}
tls13_set_encoded_pub_key:
 5105|  3.62k|{
 5106|  3.62k|    if (EVP_PKEY_is_a(pkey, "DH")) {
  ------------------
  |  Branch (5106:9): [True: 0, False: 3.62k]
  ------------------
 5107|      0|        int bits = EVP_PKEY_get_bits(pkey);
 5108|       |
 5109|      0|        if (bits <= 0 || enckeylen != (size_t)bits / 8)
  ------------------
  |  Branch (5109:13): [True: 0, False: 0]
  |  Branch (5109:26): [True: 0, False: 0]
  ------------------
 5110|       |            /* the encoded key must be padded to the length of the p */
 5111|      0|            return 0;
 5112|  3.62k|    } else if (EVP_PKEY_is_a(pkey, "EC")) {
  ------------------
  |  Branch (5112:16): [True: 0, False: 3.62k]
  ------------------
 5113|      0|        if (enckeylen < 3 /* point format and at least 1 byte for x and y */
  ------------------
  |  Branch (5113:13): [True: 0, False: 0]
  ------------------
 5114|      0|            || enckey[0] != 0x04)
  ------------------
  |  Branch (5114:16): [True: 0, False: 0]
  ------------------
 5115|      0|            return 0;
 5116|      0|    }
 5117|       |
 5118|  3.62k|    return EVP_PKEY_set1_encoded_public_key(pkey, enckey, enckeylen);
 5119|  3.62k|}
t1_lib.c:discover_provider_groups:
  372|  7.36k|{
  373|  7.36k|    struct provider_ctx_data_st pgd;
  374|       |
  375|  7.36k|    pgd.ctx = vctx;
  376|  7.36k|    pgd.provider = provider;
  377|  7.36k|    return OSSL_PROVIDER_get_capabilities(provider, "TLS-GROUP",
  378|  7.36k|        add_provider_groups, &pgd);
  379|  7.36k|}
t1_lib.c:add_provider_groups:
  234|   198k|{
  235|   198k|    struct provider_ctx_data_st *pgd = data;
  236|   198k|    SSL_CTX *ctx = pgd->ctx;
  237|   198k|    const OSSL_PARAM *p;
  238|   198k|    TLS_GROUP_INFO *ginf = NULL;
  239|   198k|    EVP_KEYMGMT *keymgmt;
  240|   198k|    unsigned int gid;
  241|   198k|    unsigned int is_kem = 0;
  242|   198k|    int ret = 0;
  243|       |
  244|   198k|    if (ctx->group_list_max_len == ctx->group_list_len) {
  ------------------
  |  Branch (244:9): [True: 22.0k, False: 176k]
  ------------------
  245|  22.0k|        TLS_GROUP_INFO *tmp = NULL;
  246|       |
  247|  22.0k|        if (ctx->group_list_max_len == 0)
  ------------------
  |  Branch (247:13): [True: 7.36k, False: 14.7k]
  ------------------
  248|  7.36k|            tmp = OPENSSL_malloc_array(TLS_GROUP_LIST_MALLOC_BLOCK_SIZE,
  ------------------
  |  |  111|  7.36k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  249|  22.0k|                sizeof(TLS_GROUP_INFO));
  250|  14.7k|        else
  251|  14.7k|            tmp = OPENSSL_realloc_array(ctx->group_list,
  ------------------
  |  |  125|  14.7k|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  252|  22.0k|                ctx->group_list_max_len
  253|  22.0k|                    + TLS_GROUP_LIST_MALLOC_BLOCK_SIZE,
  254|  22.0k|                sizeof(TLS_GROUP_INFO));
  255|  22.0k|        if (tmp == NULL)
  ------------------
  |  Branch (255:13): [True: 0, False: 22.0k]
  ------------------
  256|      0|            return 0;
  257|  22.0k|        ctx->group_list = tmp;
  258|  22.0k|        memset(tmp + ctx->group_list_max_len,
  259|  22.0k|            0,
  260|  22.0k|            sizeof(TLS_GROUP_INFO) * TLS_GROUP_LIST_MALLOC_BLOCK_SIZE);
  ------------------
  |  |  231|  22.0k|#define TLS_GROUP_LIST_MALLOC_BLOCK_SIZE 10
  ------------------
  261|  22.0k|        ctx->group_list_max_len += TLS_GROUP_LIST_MALLOC_BLOCK_SIZE;
  ------------------
  |  |  231|  22.0k|#define TLS_GROUP_LIST_MALLOC_BLOCK_SIZE 10
  ------------------
  262|  22.0k|    }
  263|       |
  264|   198k|    ginf = &ctx->group_list[ctx->group_list_len];
  265|       |
  266|   198k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_NAME);
  ------------------
  |  |  153|   198k|# define OSSL_CAPABILITY_TLS_GROUP_NAME "tls-group-name"
  ------------------
  267|   198k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|   198k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (267:9): [True: 0, False: 198k]
  |  Branch (267:22): [True: 0, False: 198k]
  ------------------
  268|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  269|      0|        goto err;
  270|      0|    }
  271|   198k|    ginf->tlsname = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|   198k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  272|   198k|    if (ginf->tlsname == NULL)
  ------------------
  |  Branch (272:9): [True: 0, False: 198k]
  ------------------
  273|      0|        goto err;
  274|       |
  275|   198k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_NAME_INTERNAL);
  ------------------
  |  |  154|   198k|# define OSSL_CAPABILITY_TLS_GROUP_NAME_INTERNAL "tls-group-name-internal"
  ------------------
  276|   198k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|   198k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (276:9): [True: 0, False: 198k]
  |  Branch (276:22): [True: 0, False: 198k]
  ------------------
  277|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  278|      0|        goto err;
  279|      0|    }
  280|   198k|    ginf->realname = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|   198k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  281|   198k|    if (ginf->realname == NULL)
  ------------------
  |  Branch (281:9): [True: 0, False: 198k]
  ------------------
  282|      0|        goto err;
  283|       |
  284|   198k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_ID);
  ------------------
  |  |  147|   198k|# define OSSL_CAPABILITY_TLS_GROUP_ID "tls-group-id"
  ------------------
  285|   198k|    if (p == NULL || !OSSL_PARAM_get_uint(p, &gid) || gid > UINT16_MAX) {
  ------------------
  |  Branch (285:9): [True: 0, False: 198k]
  |  Branch (285:22): [True: 0, False: 198k]
  |  Branch (285:55): [True: 0, False: 198k]
  ------------------
  286|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  287|      0|        goto err;
  288|      0|    }
  289|   198k|    ginf->group_id = (uint16_t)gid;
  290|       |
  291|   198k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_ALG);
  ------------------
  |  |  146|   198k|# define OSSL_CAPABILITY_TLS_GROUP_ALG "tls-group-alg"
  ------------------
  292|   198k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|   198k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (292:9): [True: 0, False: 198k]
  |  Branch (292:22): [True: 0, False: 198k]
  ------------------
  293|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  294|      0|        goto err;
  295|      0|    }
  296|   198k|    ginf->algorithm = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|   198k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  297|   198k|    if (ginf->algorithm == NULL)
  ------------------
  |  Branch (297:9): [True: 0, False: 198k]
  ------------------
  298|      0|        goto err;
  299|       |
  300|   198k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_SECURITY_BITS);
  ------------------
  |  |  155|   198k|# define OSSL_CAPABILITY_TLS_GROUP_SECURITY_BITS "tls-group-sec-bits"
  ------------------
  301|   198k|    if (p == NULL || !OSSL_PARAM_get_uint(p, &ginf->secbits)) {
  ------------------
  |  Branch (301:9): [True: 0, False: 198k]
  |  Branch (301:22): [True: 0, False: 198k]
  ------------------
  302|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  303|      0|        goto err;
  304|      0|    }
  305|       |
  306|   198k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_IS_KEM);
  ------------------
  |  |  148|   198k|# define OSSL_CAPABILITY_TLS_GROUP_IS_KEM "tls-group-is-kem"
  ------------------
  307|   198k|    if (p != NULL && (!OSSL_PARAM_get_uint(p, &is_kem) || is_kem > 1)) {
  ------------------
  |  Branch (307:9): [True: 198k, False: 0]
  |  Branch (307:23): [True: 0, False: 198k]
  |  Branch (307:59): [True: 0, False: 198k]
  ------------------
  308|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  309|      0|        goto err;
  310|      0|    }
  311|   198k|    ginf->is_kem = 1 & is_kem;
  312|       |
  313|   198k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_MIN_TLS);
  ------------------
  |  |  152|   198k|# define OSSL_CAPABILITY_TLS_GROUP_MIN_TLS "tls-min-tls"
  ------------------
  314|   198k|    if (p == NULL || !OSSL_PARAM_get_int(p, &ginf->mintls)) {
  ------------------
  |  Branch (314:9): [True: 0, False: 198k]
  |  Branch (314:22): [True: 0, False: 198k]
  ------------------
  315|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  316|      0|        goto err;
  317|      0|    }
  318|       |
  319|   198k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_MAX_TLS);
  ------------------
  |  |  150|   198k|# define OSSL_CAPABILITY_TLS_GROUP_MAX_TLS "tls-max-tls"
  ------------------
  320|   198k|    if (p == NULL || !OSSL_PARAM_get_int(p, &ginf->maxtls)) {
  ------------------
  |  Branch (320:9): [True: 0, False: 198k]
  |  Branch (320:22): [True: 0, False: 198k]
  ------------------
  321|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  322|      0|        goto err;
  323|      0|    }
  324|       |
  325|   198k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_MIN_DTLS);
  ------------------
  |  |  151|   198k|# define OSSL_CAPABILITY_TLS_GROUP_MIN_DTLS "tls-min-dtls"
  ------------------
  326|   198k|    if (p == NULL || !OSSL_PARAM_get_int(p, &ginf->mindtls)) {
  ------------------
  |  Branch (326:9): [True: 0, False: 198k]
  |  Branch (326:22): [True: 0, False: 198k]
  ------------------
  327|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  328|      0|        goto err;
  329|      0|    }
  330|       |
  331|   198k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_MAX_DTLS);
  ------------------
  |  |  149|   198k|# define OSSL_CAPABILITY_TLS_GROUP_MAX_DTLS "tls-max-dtls"
  ------------------
  332|   198k|    if (p == NULL || !OSSL_PARAM_get_int(p, &ginf->maxdtls)) {
  ------------------
  |  Branch (332:9): [True: 0, False: 198k]
  |  Branch (332:22): [True: 0, False: 198k]
  ------------------
  333|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  334|      0|        goto err;
  335|      0|    }
  336|       |
  337|   198k|    if (ginf->group_id >= OSSL_TLS_GROUP_ID_ffdhe2048
  ------------------
  |  |   55|   397k|#define OSSL_TLS_GROUP_ID_ffdhe2048 0x0100
  ------------------
  |  Branch (337:9): [True: 88.3k, False: 110k]
  ------------------
  338|  88.3k|        && ginf->group_id <= OSSL_TLS_GROUP_ID_ffdhe8192) {
  ------------------
  |  |   59|  88.3k|#define OSSL_TLS_GROUP_ID_ffdhe8192 0x0104
  ------------------
  |  Branch (338:12): [True: 36.8k, False: 51.5k]
  ------------------
  339|  36.8k|        if (ginf->mintls > TLS1_2_VERSION)
  ------------------
  |  |   26|  36.8k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (339:13): [True: 36.8k, False: 0]
  ------------------
  340|  36.8k|            ginf->mintls = TLS1_VERSION;
  ------------------
  |  |   24|  36.8k|#define TLS1_VERSION 0x0301
  ------------------
  341|  36.8k|        if (DTLS_VERSION_GT(ginf->mindtls, DTLS1_2_VERSION))
  ------------------
  |  |   62|  36.8k|#define DTLS_VERSION_GT(v1, v2) (dtls_ver_ordinal(v1) < dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|  36.8k|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  36.8k|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [True: 0, False: 36.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_GT(v1, v2) (dtls_ver_ordinal(v1) < dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   61|  36.8k|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  36.8k|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (61:31): [Folded, False: 36.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (62:33): [True: 36.8k, False: 0]
  |  |  ------------------
  ------------------
  342|  36.8k|            ginf->mindtls = DTLS1_VERSION;
  ------------------
  |  |   28|  36.8k|#define DTLS1_VERSION 0xFEFF
  ------------------
  343|  36.8k|    }
  344|       |
  345|       |    /*
  346|       |     * Now check that the algorithm is actually usable for our property query
  347|       |     * string. Regardless of the result we still return success because we have
  348|       |     * successfully processed this group, even though we may decide not to use
  349|       |     * it.
  350|       |     */
  351|   198k|    ret = 1;
  352|   198k|    ERR_set_mark();
  353|   198k|    keymgmt = EVP_KEYMGMT_fetch(ctx->libctx, ginf->algorithm, ctx->propq);
  354|   198k|    if (keymgmt != NULL) {
  ------------------
  |  Branch (354:9): [True: 198k, False: 0]
  ------------------
  355|       |        /* We have successfully fetched the algorithm, we can use the group. */
  356|   198k|        ctx->group_list_len++;
  357|   198k|        ginf = NULL;
  358|   198k|        EVP_KEYMGMT_free(keymgmt);
  359|   198k|    }
  360|   198k|    ERR_pop_to_mark();
  361|   198k|err:
  362|   198k|    if (ginf != NULL) {
  ------------------
  |  Branch (362:9): [True: 0, False: 198k]
  ------------------
  363|      0|        OPENSSL_free(ginf->tlsname);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  364|      0|        OPENSSL_free(ginf->realname);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  365|      0|        OPENSSL_free(ginf->algorithm);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  366|       |        ginf->algorithm = ginf->tlsname = ginf->realname = NULL;
  367|      0|    }
  368|   198k|    return ret;
  369|   198k|}
t1_lib.c:discover_provider_sigalgs:
  681|  7.36k|{
  682|  7.36k|    struct provider_ctx_data_st pgd;
  683|       |
  684|  7.36k|    pgd.ctx = vctx;
  685|  7.36k|    pgd.provider = provider;
  686|  7.36k|    OSSL_PROVIDER_get_capabilities(provider, "TLS-SIGALG",
  687|  7.36k|        add_provider_sigalgs, &pgd);
  688|       |    /*
  689|       |     * Always OK, even if provider doesn't support the capability:
  690|       |     * Reconsider testing retval when legacy sigalgs are also loaded this way.
  691|       |     */
  692|  7.36k|    return 1;
  693|  7.36k|}
t1_lib.c:add_provider_sigalgs:
  401|  29.4k|{
  402|  29.4k|    struct provider_ctx_data_st *pgd = data;
  403|  29.4k|    SSL_CTX *ctx = pgd->ctx;
  404|  29.4k|    OSSL_PROVIDER *provider = pgd->provider;
  405|  29.4k|    const OSSL_PARAM *p;
  406|  29.4k|    TLS_SIGALG_INFO *sinf = NULL;
  407|  29.4k|    EVP_KEYMGMT *keymgmt;
  408|  29.4k|    const char *keytype;
  409|  29.4k|    unsigned int code_point = 0;
  410|  29.4k|    int ret = 0;
  411|       |
  412|  29.4k|    if (ctx->sigalg_list_max_len == ctx->sigalg_list_len) {
  ------------------
  |  Branch (412:9): [True: 7.36k, False: 22.0k]
  ------------------
  413|  7.36k|        TLS_SIGALG_INFO *tmp = NULL;
  414|       |
  415|  7.36k|        if (ctx->sigalg_list_max_len == 0)
  ------------------
  |  Branch (415:13): [True: 7.36k, False: 0]
  ------------------
  416|  7.36k|            tmp = OPENSSL_malloc_array(TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE,
  ------------------
  |  |  111|  7.36k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  417|  7.36k|                sizeof(TLS_SIGALG_INFO));
  418|      0|        else
  419|      0|            tmp = OPENSSL_realloc_array(ctx->sigalg_list,
  ------------------
  |  |  125|      0|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  420|  7.36k|                ctx->sigalg_list_max_len
  421|  7.36k|                    + TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE,
  422|  7.36k|                sizeof(TLS_SIGALG_INFO));
  423|  7.36k|        if (tmp == NULL)
  ------------------
  |  Branch (423:13): [True: 0, False: 7.36k]
  ------------------
  424|      0|            return 0;
  425|  7.36k|        ctx->sigalg_list = tmp;
  426|  7.36k|        memset(tmp + ctx->sigalg_list_max_len, 0,
  427|  7.36k|            sizeof(TLS_SIGALG_INFO) * TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE);
  ------------------
  |  |  398|  7.36k|#define TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE 10
  ------------------
  428|  7.36k|        ctx->sigalg_list_max_len += TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE;
  ------------------
  |  |  398|  7.36k|#define TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE 10
  ------------------
  429|  7.36k|    }
  430|       |
  431|  29.4k|    sinf = &ctx->sigalg_list[ctx->sigalg_list_len];
  432|       |
  433|       |    /* First, mandatory parameters */
  434|  29.4k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_NAME);
  ------------------
  |  |  166|  29.4k|# define OSSL_CAPABILITY_TLS_SIGALG_NAME "tls-sigalg-name"
  ------------------
  435|  29.4k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|  29.4k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (435:9): [True: 0, False: 29.4k]
  |  Branch (435:22): [True: 0, False: 29.4k]
  ------------------
  436|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  437|      0|        goto err;
  438|      0|    }
  439|  29.4k|    OPENSSL_free(sinf->sigalg_name);
  ------------------
  |  |  132|  29.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  440|  29.4k|    sinf->sigalg_name = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|  29.4k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  441|  29.4k|    if (sinf->sigalg_name == NULL)
  ------------------
  |  Branch (441:9): [True: 0, False: 29.4k]
  ------------------
  442|      0|        goto err;
  443|       |
  444|  29.4k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_IANA_NAME);
  ------------------
  |  |  159|  29.4k|# define OSSL_CAPABILITY_TLS_SIGALG_IANA_NAME "tls-sigalg-iana-name"
  ------------------
  445|  29.4k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|  29.4k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (445:9): [True: 0, False: 29.4k]
  |  Branch (445:22): [True: 0, False: 29.4k]
  ------------------
  446|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  447|      0|        goto err;
  448|      0|    }
  449|  29.4k|    OPENSSL_free(sinf->name);
  ------------------
  |  |  132|  29.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  450|  29.4k|    sinf->name = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|  29.4k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  451|  29.4k|    if (sinf->name == NULL)
  ------------------
  |  Branch (451:9): [True: 0, False: 29.4k]
  ------------------
  452|      0|        goto err;
  453|       |
  454|  29.4k|    p = OSSL_PARAM_locate_const(params,
  455|  29.4k|        OSSL_CAPABILITY_TLS_SIGALG_CODE_POINT);
  ------------------
  |  |  156|  29.4k|# define OSSL_CAPABILITY_TLS_SIGALG_CODE_POINT "tls-sigalg-code-point"
  ------------------
  456|  29.4k|    if (p == NULL
  ------------------
  |  Branch (456:9): [True: 0, False: 29.4k]
  ------------------
  457|  29.4k|        || !OSSL_PARAM_get_uint(p, &code_point)
  ------------------
  |  Branch (457:12): [True: 0, False: 29.4k]
  ------------------
  458|  29.4k|        || code_point > UINT16_MAX) {
  ------------------
  |  Branch (458:12): [True: 0, False: 29.4k]
  ------------------
  459|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  460|      0|        goto err;
  461|      0|    }
  462|  29.4k|    sinf->code_point = (uint16_t)code_point;
  463|       |
  464|  29.4k|    p = OSSL_PARAM_locate_const(params,
  465|  29.4k|        OSSL_CAPABILITY_TLS_SIGALG_SECURITY_BITS);
  ------------------
  |  |  168|  29.4k|# define OSSL_CAPABILITY_TLS_SIGALG_SECURITY_BITS "tls-sigalg-sec-bits"
  ------------------
  466|  29.4k|    if (p == NULL || !OSSL_PARAM_get_uint(p, &sinf->secbits)) {
  ------------------
  |  Branch (466:9): [True: 0, False: 29.4k]
  |  Branch (466:22): [True: 0, False: 29.4k]
  ------------------
  467|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  468|      0|        goto err;
  469|      0|    }
  470|       |
  471|       |    /* Now, optional parameters */
  472|  29.4k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_OID);
  ------------------
  |  |  167|  29.4k|# define OSSL_CAPABILITY_TLS_SIGALG_OID "tls-sigalg-oid"
  ------------------
  473|  29.4k|    if (p == NULL) {
  ------------------
  |  Branch (473:9): [True: 0, False: 29.4k]
  ------------------
  474|      0|        sinf->sigalg_oid = NULL;
  475|  29.4k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|  29.4k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (475:16): [True: 0, False: 29.4k]
  ------------------
  476|      0|        goto err;
  477|  29.4k|    } else {
  478|  29.4k|        OPENSSL_free(sinf->sigalg_oid);
  ------------------
  |  |  132|  29.4k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  479|  29.4k|        sinf->sigalg_oid = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|  29.4k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  480|  29.4k|        if (sinf->sigalg_oid == NULL)
  ------------------
  |  Branch (480:13): [True: 0, False: 29.4k]
  ------------------
  481|      0|            goto err;
  482|  29.4k|    }
  483|       |
  484|  29.4k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_SIG_NAME);
  ------------------
  |  |  169|  29.4k|# define OSSL_CAPABILITY_TLS_SIGALG_SIG_NAME "tls-sigalg-sig-name"
  ------------------
  485|  29.4k|    if (p == NULL) {
  ------------------
  |  Branch (485:9): [True: 29.4k, False: 0]
  ------------------
  486|  29.4k|        sinf->sig_name = NULL;
  487|  29.4k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (487:16): [True: 0, False: 0]
  ------------------
  488|      0|        goto err;
  489|      0|    } else {
  490|      0|        OPENSSL_free(sinf->sig_name);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  491|      0|        sinf->sig_name = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  492|      0|        if (sinf->sig_name == NULL)
  ------------------
  |  Branch (492:13): [True: 0, False: 0]
  ------------------
  493|      0|            goto err;
  494|      0|    }
  495|       |
  496|  29.4k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_SIG_OID);
  ------------------
  |  |  170|  29.4k|# define OSSL_CAPABILITY_TLS_SIGALG_SIG_OID "tls-sigalg-sig-oid"
  ------------------
  497|  29.4k|    if (p == NULL) {
  ------------------
  |  Branch (497:9): [True: 29.4k, False: 0]
  ------------------
  498|  29.4k|        sinf->sig_oid = NULL;
  499|  29.4k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (499:16): [True: 0, False: 0]
  ------------------
  500|      0|        goto err;
  501|      0|    } else {
  502|      0|        OPENSSL_free(sinf->sig_oid);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  503|      0|        sinf->sig_oid = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  504|      0|        if (sinf->sig_oid == NULL)
  ------------------
  |  Branch (504:13): [True: 0, False: 0]
  ------------------
  505|      0|            goto err;
  506|      0|    }
  507|       |
  508|  29.4k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_HASH_NAME);
  ------------------
  |  |  157|  29.4k|# define OSSL_CAPABILITY_TLS_SIGALG_HASH_NAME "tls-sigalg-hash-name"
  ------------------
  509|  29.4k|    if (p == NULL) {
  ------------------
  |  Branch (509:9): [True: 29.4k, False: 0]
  ------------------
  510|  29.4k|        sinf->hash_name = NULL;
  511|  29.4k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (511:16): [True: 0, False: 0]
  ------------------
  512|      0|        goto err;
  513|      0|    } else {
  514|      0|        OPENSSL_free(sinf->hash_name);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  515|      0|        sinf->hash_name = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  516|      0|        if (sinf->hash_name == NULL)
  ------------------
  |  Branch (516:13): [True: 0, False: 0]
  ------------------
  517|      0|            goto err;
  518|      0|    }
  519|       |
  520|  29.4k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_HASH_OID);
  ------------------
  |  |  158|  29.4k|# define OSSL_CAPABILITY_TLS_SIGALG_HASH_OID "tls-sigalg-hash-oid"
  ------------------
  521|  29.4k|    if (p == NULL) {
  ------------------
  |  Branch (521:9): [True: 29.4k, False: 0]
  ------------------
  522|  29.4k|        sinf->hash_oid = NULL;
  523|  29.4k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (523:16): [True: 0, False: 0]
  ------------------
  524|      0|        goto err;
  525|      0|    } else {
  526|      0|        OPENSSL_free(sinf->hash_oid);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  527|      0|        sinf->hash_oid = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  528|      0|        if (sinf->hash_oid == NULL)
  ------------------
  |  Branch (528:13): [True: 0, False: 0]
  ------------------
  529|      0|            goto err;
  530|      0|    }
  531|       |
  532|  29.4k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE);
  ------------------
  |  |  160|  29.4k|# define OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE "tls-sigalg-keytype"
  ------------------
  533|  29.4k|    if (p == NULL) {
  ------------------
  |  Branch (533:9): [True: 29.4k, False: 0]
  ------------------
  534|  29.4k|        sinf->keytype = NULL;
  535|  29.4k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (535:16): [True: 0, False: 0]
  ------------------
  536|      0|        goto err;
  537|      0|    } else {
  538|      0|        OPENSSL_free(sinf->keytype);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  539|      0|        sinf->keytype = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  540|      0|        if (sinf->keytype == NULL)
  ------------------
  |  Branch (540:13): [True: 0, False: 0]
  ------------------
  541|      0|            goto err;
  542|      0|    }
  543|       |
  544|  29.4k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE_OID);
  ------------------
  |  |  161|  29.4k|# define OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE_OID "tls-sigalg-keytype-oid"
  ------------------
  545|  29.4k|    if (p == NULL) {
  ------------------
  |  Branch (545:9): [True: 29.4k, False: 0]
  ------------------
  546|  29.4k|        sinf->keytype_oid = NULL;
  547|  29.4k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (547:16): [True: 0, False: 0]
  ------------------
  548|      0|        goto err;
  549|      0|    } else {
  550|      0|        OPENSSL_free(sinf->keytype_oid);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  551|      0|        sinf->keytype_oid = OPENSSL_strdup(p->data);
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  552|      0|        if (sinf->keytype_oid == NULL)
  ------------------
  |  Branch (552:13): [True: 0, False: 0]
  ------------------
  553|      0|            goto err;
  554|      0|    }
  555|       |
  556|       |    /* Optional, not documented prior to 3.5 */
  557|  29.4k|    sinf->mindtls = sinf->maxdtls = -1;
  558|  29.4k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_MIN_DTLS);
  ------------------
  |  |  164|  29.4k|# define OSSL_CAPABILITY_TLS_SIGALG_MIN_DTLS "tls-min-dtls"
  ------------------
  559|  29.4k|    if (p != NULL && !OSSL_PARAM_get_int(p, &sinf->mindtls)) {
  ------------------
  |  Branch (559:9): [True: 29.4k, False: 0]
  |  Branch (559:22): [True: 0, False: 29.4k]
  ------------------
  560|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  561|      0|        goto err;
  562|      0|    }
  563|  29.4k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_MAX_DTLS);
  ------------------
  |  |  162|  29.4k|# define OSSL_CAPABILITY_TLS_SIGALG_MAX_DTLS "tls-max-dtls"
  ------------------
  564|  29.4k|    if (p != NULL && !OSSL_PARAM_get_int(p, &sinf->maxdtls)) {
  ------------------
  |  Branch (564:9): [True: 29.4k, False: 0]
  |  Branch (564:22): [True: 0, False: 29.4k]
  ------------------
  565|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  566|      0|        goto err;
  567|      0|    }
  568|       |    /* DTLS version numbers grow downward */
  569|  29.4k|    if ((sinf->maxdtls != 0) && (sinf->maxdtls != -1) && ((sinf->maxdtls > sinf->mindtls))) {
  ------------------
  |  Branch (569:9): [True: 29.4k, False: 0]
  |  Branch (569:33): [True: 0, False: 29.4k]
  |  Branch (569:58): [True: 0, False: 0]
  ------------------
  570|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  571|      0|        goto err;
  572|      0|    }
  573|       |    /* No provider sigalgs are supported in DTLS, reset after checking. */
  574|  29.4k|    sinf->mindtls = sinf->maxdtls = -1;
  575|       |
  576|       |    /* The remaining parameters below are mandatory again */
  577|  29.4k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_MIN_TLS);
  ------------------
  |  |  165|  29.4k|# define OSSL_CAPABILITY_TLS_SIGALG_MIN_TLS "tls-min-tls"
  ------------------
  578|  29.4k|    if (p == NULL || !OSSL_PARAM_get_int(p, &sinf->mintls)) {
  ------------------
  |  Branch (578:9): [True: 0, False: 29.4k]
  |  Branch (578:22): [True: 0, False: 29.4k]
  ------------------
  579|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  580|      0|        goto err;
  581|      0|    }
  582|  29.4k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_MAX_TLS);
  ------------------
  |  |  163|  29.4k|# define OSSL_CAPABILITY_TLS_SIGALG_MAX_TLS "tls-max-tls"
  ------------------
  583|  29.4k|    if (p == NULL || !OSSL_PARAM_get_int(p, &sinf->maxtls)) {
  ------------------
  |  Branch (583:9): [True: 0, False: 29.4k]
  |  Branch (583:22): [True: 0, False: 29.4k]
  ------------------
  584|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  585|      0|        goto err;
  586|      0|    }
  587|  29.4k|    if ((sinf->maxtls != 0) && (sinf->maxtls != -1) && ((sinf->maxtls < sinf->mintls))) {
  ------------------
  |  Branch (587:9): [True: 0, False: 29.4k]
  |  Branch (587:32): [True: 0, False: 0]
  |  Branch (587:56): [True: 0, False: 0]
  ------------------
  588|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  589|      0|        goto err;
  590|      0|    }
  591|  29.4k|    if ((sinf->mintls != 0) && (sinf->mintls != -1) && ((sinf->mintls > TLS1_3_VERSION)))
  ------------------
  |  |   27|  29.4k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (591:9): [True: 29.4k, False: 0]
  |  Branch (591:32): [True: 29.4k, False: 0]
  |  Branch (591:56): [True: 0, False: 29.4k]
  ------------------
  592|      0|        sinf->mintls = sinf->maxtls = -1;
  593|  29.4k|    if ((sinf->maxtls != 0) && (sinf->maxtls != -1) && ((sinf->maxtls < TLS1_3_VERSION)))
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (593:9): [True: 0, False: 29.4k]
  |  Branch (593:32): [True: 0, False: 0]
  |  Branch (593:56): [True: 0, False: 0]
  ------------------
  594|      0|        sinf->mintls = sinf->maxtls = -1;
  595|       |
  596|       |    /* Ignore unusable sigalgs */
  597|  29.4k|    if (sinf->mintls == -1 && sinf->mindtls == -1) {
  ------------------
  |  Branch (597:9): [True: 0, False: 29.4k]
  |  Branch (597:31): [True: 0, False: 0]
  ------------------
  598|      0|        ret = 1;
  599|      0|        goto err;
  600|      0|    }
  601|       |
  602|       |    /*
  603|       |     * Now check that the algorithm is actually usable for our property query
  604|       |     * string. Regardless of the result we still return success because we have
  605|       |     * successfully processed this signature, even though we may decide not to
  606|       |     * use it.
  607|       |     */
  608|  29.4k|    ret = 1;
  609|  29.4k|    ERR_set_mark();
  610|  29.4k|    keytype = inferred_keytype(sinf);
  611|  29.4k|    keymgmt = EVP_KEYMGMT_fetch(ctx->libctx, keytype, ctx->propq);
  612|  29.4k|    if (keymgmt != NULL) {
  ------------------
  |  Branch (612:9): [True: 29.4k, False: 0]
  ------------------
  613|       |        /*
  614|       |         * We have successfully fetched the algorithm - however if the provider
  615|       |         * doesn't match this one then we ignore it.
  616|       |         *
  617|       |         * Note: We're cheating a little here. Technically if the same algorithm
  618|       |         * is available from more than one provider then it is undefined which
  619|       |         * implementation you will get back. Theoretically this could be
  620|       |         * different every time...we assume here that you'll always get the
  621|       |         * same one back if you repeat the exact same fetch. Is this a reasonable
  622|       |         * assumption to make (in which case perhaps we should document this
  623|       |         * behaviour)?
  624|       |         */
  625|  29.4k|        if (EVP_KEYMGMT_get0_provider(keymgmt) == provider) {
  ------------------
  |  Branch (625:13): [True: 29.4k, False: 0]
  ------------------
  626|       |            /*
  627|       |             * We have a match - so we could use this signature;
  628|       |             * Check proper object registration first, though.
  629|       |             * Don't care about return value as this may have been
  630|       |             * done within providers or previous calls to
  631|       |             * add_provider_sigalgs.
  632|       |             */
  633|  29.4k|            OBJ_create(sinf->sigalg_oid, sinf->sigalg_name, NULL);
  634|       |            /* sanity check: Without successful registration don't use alg */
  635|  29.4k|            if ((OBJ_txt2nid(sinf->sigalg_name) == NID_undef) || (OBJ_nid2obj(OBJ_txt2nid(sinf->sigalg_name)) == NULL)) {
  ------------------
  |  |   18|  29.4k|#define NID_undef                       0
  ------------------
  |  Branch (635:17): [True: 0, False: 29.4k]
  |  Branch (635:66): [True: 0, False: 29.4k]
  ------------------
  636|      0|                ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  637|      0|                goto err;
  638|      0|            }
  639|  29.4k|            if (sinf->sig_name != NULL)
  ------------------
  |  Branch (639:17): [True: 0, False: 29.4k]
  ------------------
  640|      0|                OBJ_create(sinf->sig_oid, sinf->sig_name, NULL);
  641|  29.4k|            if (sinf->keytype != NULL)
  ------------------
  |  Branch (641:17): [True: 0, False: 29.4k]
  ------------------
  642|      0|                OBJ_create(sinf->keytype_oid, sinf->keytype, NULL);
  643|  29.4k|            if (sinf->hash_name != NULL)
  ------------------
  |  Branch (643:17): [True: 0, False: 29.4k]
  ------------------
  644|      0|                OBJ_create(sinf->hash_oid, sinf->hash_name, NULL);
  645|  29.4k|            OBJ_add_sigid(OBJ_txt2nid(sinf->sigalg_name),
  646|  29.4k|                (sinf->hash_name != NULL
  ------------------
  |  Branch (646:18): [True: 0, False: 29.4k]
  ------------------
  647|  29.4k|                        ? OBJ_txt2nid(sinf->hash_name)
  648|  29.4k|                        : NID_undef),
  ------------------
  |  |   18|  29.4k|#define NID_undef                       0
  ------------------
  649|  29.4k|                OBJ_txt2nid(keytype));
  650|  29.4k|            ctx->sigalg_list_len++;
  651|  29.4k|            sinf = NULL;
  652|  29.4k|        }
  653|  29.4k|        EVP_KEYMGMT_free(keymgmt);
  654|  29.4k|    }
  655|  29.4k|    ERR_pop_to_mark();
  656|  29.4k|err:
  657|  29.4k|    if (sinf != NULL) {
  ------------------
  |  Branch (657:9): [True: 0, False: 29.4k]
  ------------------
  658|      0|        OPENSSL_free(sinf->name);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  659|      0|        sinf->name = NULL;
  660|      0|        OPENSSL_free(sinf->sigalg_name);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  661|      0|        sinf->sigalg_name = NULL;
  662|      0|        OPENSSL_free(sinf->sigalg_oid);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  663|      0|        sinf->sigalg_oid = NULL;
  664|      0|        OPENSSL_free(sinf->sig_name);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  665|      0|        sinf->sig_name = NULL;
  666|      0|        OPENSSL_free(sinf->sig_oid);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  667|      0|        sinf->sig_oid = NULL;
  668|      0|        OPENSSL_free(sinf->hash_name);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  669|      0|        sinf->hash_name = NULL;
  670|      0|        OPENSSL_free(sinf->hash_oid);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  671|      0|        sinf->hash_oid = NULL;
  672|      0|        OPENSSL_free(sinf->keytype);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  673|      0|        sinf->keytype = NULL;
  674|      0|        OPENSSL_free(sinf->keytype_oid);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  675|       |        sinf->keytype_oid = NULL;
  676|      0|    }
  677|  29.4k|    return ret;
  678|  29.4k|}
t1_lib.c:inferred_keytype:
  390|  58.9k|{
  391|  58.9k|    return (sinf->keytype != NULL
  ------------------
  |  Branch (391:13): [True: 0, False: 58.9k]
  ------------------
  392|  58.9k|            ? sinf->keytype
  393|  58.9k|            : (sinf->sig_name != NULL
  ------------------
  |  Branch (393:16): [True: 0, False: 58.9k]
  ------------------
  394|  58.9k|                      ? sinf->sig_name
  395|  58.9k|                      : sinf->sigalg_name));
  396|  58.9k|}
t1_lib.c:tuple_cb:
 1694|  36.8k|{
 1695|  36.8k|    gid_cb_st *garg = arg;
 1696|  36.8k|    int retval = 1; /* We assume success */
 1697|  36.8k|    char *restored_tuple_string;
 1698|       |
 1699|       |    /* Sanity checks */
 1700|  36.8k|    if (garg == NULL || tuple == NULL || len <= 0) {
  ------------------
  |  Branch (1700:9): [True: 0, False: 36.8k]
  |  Branch (1700:25): [True: 0, False: 36.8k]
  |  Branch (1700:42): [True: 0, False: 36.8k]
  ------------------
 1701|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_UNSUPPORTED_CONFIG_VALUE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1702|      0|        return 0;
 1703|      0|    }
 1704|       |
 1705|  36.8k|    if (garg->inner && !garg->first && !close_tuple(garg))
  ------------------
  |  Branch (1705:9): [True: 0, False: 36.8k]
  |  Branch (1705:24): [True: 0, False: 0]
  |  Branch (1705:40): [True: 0, False: 0]
  ------------------
 1706|      0|        return 0;
 1707|  36.8k|    garg->first = 0;
 1708|       |
 1709|       |    /* Convert to \0-terminated string */
 1710|  36.8k|    restored_tuple_string = OPENSSL_malloc(len + 1 /* \0 */);
  ------------------
  |  |  107|  36.8k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1711|  36.8k|    if (restored_tuple_string == NULL)
  ------------------
  |  Branch (1711:9): [True: 0, False: 36.8k]
  ------------------
 1712|      0|        return 0;
 1713|  36.8k|    memcpy(restored_tuple_string, tuple, len);
 1714|  36.8k|    restored_tuple_string[len] = '\0';
 1715|       |
 1716|       |    /* Analyze group list of this tuple */
 1717|  36.8k|    retval = CONF_parse_list(restored_tuple_string, GROUP_DELIMITER_CHARACTER, 1, gid_cb, arg);
  ------------------
  |  | 1230|  36.8k|#define GROUP_DELIMITER_CHARACTER ':'
  ------------------
 1718|       |
 1719|       |    /* We don't need the \o-terminated string anymore */
 1720|  36.8k|    OPENSSL_free(restored_tuple_string);
  ------------------
  |  |  132|  36.8k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1721|       |
 1722|  36.8k|    if (!garg->inner && !close_tuple(garg))
  ------------------
  |  Branch (1722:9): [True: 36.8k, False: 0]
  |  Branch (1722:25): [True: 0, False: 36.8k]
  ------------------
 1723|      0|        return 0;
 1724|  36.8k|    return retval;
 1725|  36.8k|}
t1_lib.c:close_tuple:
 1665|  36.8k|{
 1666|  36.8k|    size_t gidcnt = garg->tuplcnt_arr[garg->tplcnt];
 1667|       |
 1668|  36.8k|    if (gidcnt > 0 && garg->want_keyshare > 0) {
  ------------------
  |  Branch (1668:9): [True: 36.8k, False: 0]
  |  Branch (1668:23): [True: 0, False: 36.8k]
  ------------------
 1669|      0|        uint16_t gid = garg->gid_arr[garg->gidcnt - gidcnt];
 1670|       |
 1671|       |        /*
 1672|       |         * All groups in the tuple that were marked for keyshare prediction
 1673|       |         * were unknown (unrecognised); select the first known group instead.
 1674|       |         */
 1675|      0|        garg->ksid_arr[garg->ksidcnt++] = gid;
 1676|      0|    }
 1677|       |    /* Reset keyshare state for the next tuple */
 1678|  36.8k|    garg->want_keyshare = 0;
 1679|       |
 1680|  36.8k|    if (gidcnt == 0)
  ------------------
  |  Branch (1680:9): [True: 0, False: 36.8k]
  ------------------
 1681|      0|        return 1; /* Discard empty tuple; no need to open a new slot */
 1682|       |
 1683|       |    /* Grow before the increment: the new active slot will be at tplcnt + 1 */
 1684|  36.8k|    if (!grow_tuples(garg))
  ------------------
  |  Branch (1684:9): [True: 0, False: 36.8k]
  ------------------
 1685|      0|        return 0;
 1686|       |
 1687|       |    /* Promote closed tuple and initialise the new active tuple slot */
 1688|  36.8k|    garg->tuplcnt_arr[++garg->tplcnt] = 0;
 1689|  36.8k|    return 1;
 1690|  36.8k|}
t1_lib.c:grow_tuples:
 1639|  36.8k|{
 1640|       |    /*
 1641|       |     * tplcnt + 1 is the index close_tuple() will write to after incrementing;
 1642|       |     * reallocate before it would reach the end of the allocated array.
 1643|       |     */
 1644|  36.8k|    if (garg->tplcnt + 1 >= garg->tplmax) {
  ------------------
  |  Branch (1644:9): [True: 0, False: 36.8k]
  ------------------
 1645|      0|        size_t *tmp = OPENSSL_realloc_array(garg->tuplcnt_arr,
  ------------------
  |  |  125|      0|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1646|      0|            garg->tplmax + GROUPLIST_INCREMENT,
 1647|      0|            sizeof(*garg->tuplcnt_arr));
 1648|       |
 1649|      0|        if (tmp == NULL)
  ------------------
  |  Branch (1649:13): [True: 0, False: 0]
  ------------------
 1650|      0|            return 0;
 1651|      0|        garg->tplmax += GROUPLIST_INCREMENT;
  ------------------
  |  | 1215|      0|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1652|      0|        garg->tuplcnt_arr = tmp;
 1653|      0|    }
 1654|  36.8k|    return 1;
 1655|  36.8k|}
t1_lib.c:gid_cb:
 1303|  80.9k|{
 1304|  80.9k|    gid_cb_st *garg = arg;
 1305|  80.9k|    size_t i, j, k;
 1306|  80.9k|    uint16_t gid = 0;
 1307|  80.9k|    int found_group = 0;
 1308|  80.9k|    char etmp[GROUP_NAME_BUFFER_LENGTH];
 1309|  80.9k|    int retval = 1; /* We assume success */
 1310|  80.9k|    const char *current_prefix;
 1311|  80.9k|    int ignore_unknown = 0;
 1312|  80.9k|    int add_keyshare = 0;
 1313|  80.9k|    int remove_group = 0;
 1314|  80.9k|    size_t restored_prefix_index = 0;
 1315|  80.9k|    char *restored_default_group_string;
 1316|  80.9k|    int continue_while_loop = 1;
 1317|       |
 1318|       |    /* Sanity checks */
 1319|  80.9k|    if (garg == NULL || elem == NULL || len <= 0) {
  ------------------
  |  Branch (1319:9): [True: 0, False: 80.9k]
  |  Branch (1319:25): [True: 0, False: 80.9k]
  |  Branch (1319:41): [True: 0, False: 80.9k]
  ------------------
 1320|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_UNSUPPORTED_CONFIG_VALUE);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1321|      0|        return 0;
 1322|      0|    }
 1323|       |
 1324|       |    /* Check the possible prefixes (remark: Leading and trailing spaces already cleared) */
 1325|   176k|    while (continue_while_loop && len > 0
  ------------------
  |  Branch (1325:12): [True: 176k, False: 0]
  |  Branch (1325:35): [True: 176k, False: 0]
  ------------------
 1326|   176k|        && ((current_prefix = strchr(prefixes, elem[0])) != NULL
  ------------------
  |  Branch (1326:13): [True: 95.7k, False: 80.9k]
  ------------------
 1327|  95.7k|            || OPENSSL_strncasecmp(current_prefix = (char *)DEFAULT_GROUPNAME_FIRST_CHARACTER, elem, 1) == 0)) {
  ------------------
  |  Branch (1327:16): [True: 0, False: 80.9k]
  ------------------
 1328|       |
 1329|  95.7k|        switch (*current_prefix) {
 1330|      0|        case TUPLE_DELIMITER_CHARACTER:
  ------------------
  |  | 1226|      0|#define TUPLE_DELIMITER_CHARACTER '/'
  ------------------
  |  Branch (1330:9): [True: 0, False: 95.7k]
  ------------------
 1331|       |            /* tuple delimiter not allowed here -> syntax error */
 1332|      0|            return -1;
 1333|      0|            break;
 1334|      0|        case GROUP_DELIMITER_CHARACTER:
  ------------------
  |  | 1230|      0|#define GROUP_DELIMITER_CHARACTER ':'
  ------------------
  |  Branch (1334:9): [True: 0, False: 95.7k]
  ------------------
 1335|      0|            return -1; /* Not a valid prefix for a single group name-> syntax error */
 1336|      0|            break;
 1337|  14.7k|        case KEY_SHARE_INDICATOR_CHARACTER:
  ------------------
  |  | 1238|  14.7k|#define KEY_SHARE_INDICATOR_CHARACTER '*'
  ------------------
  |  Branch (1337:9): [True: 14.7k, False: 80.9k]
  ------------------
 1338|  14.7k|            if (add_keyshare)
  ------------------
  |  Branch (1338:17): [True: 0, False: 14.7k]
  ------------------
 1339|      0|                return -1; /* Only single key share prefix allowed -> syntax error */
 1340|  14.7k|            add_keyshare = 1;
 1341|  14.7k|            ++elem;
 1342|  14.7k|            --len;
 1343|  14.7k|            break;
 1344|      0|        case REMOVE_GROUP_INDICATOR_CHARACTER:
  ------------------
  |  | 1242|      0|#define REMOVE_GROUP_INDICATOR_CHARACTER '-'
  ------------------
  |  Branch (1344:9): [True: 0, False: 95.7k]
  ------------------
 1345|      0|            if (remove_group)
  ------------------
  |  Branch (1345:17): [True: 0, False: 0]
  ------------------
 1346|      0|                return -1; /* Only single remove group prefix allowed -> syntax error */
 1347|      0|            remove_group = 1;
 1348|      0|            ++elem;
 1349|      0|            --len;
 1350|      0|            break;
 1351|  80.9k|        case IGNORE_UNKNOWN_GROUP_CHARACTER:
  ------------------
  |  | 1234|  80.9k|#define IGNORE_UNKNOWN_GROUP_CHARACTER '?'
  ------------------
  |  Branch (1351:9): [True: 80.9k, False: 14.7k]
  ------------------
 1352|  80.9k|            if (ignore_unknown)
  ------------------
  |  Branch (1352:17): [True: 0, False: 80.9k]
  ------------------
 1353|      0|                return -1; /* Only single ? allowed -> syntax error */
 1354|  80.9k|            ignore_unknown = 1;
 1355|  80.9k|            ++elem;
 1356|  80.9k|            --len;
 1357|  80.9k|            break;
 1358|      0|        default:
  ------------------
  |  Branch (1358:9): [True: 0, False: 95.7k]
  ------------------
 1359|       |            /*
 1360|       |             * Check whether a DEFAULT[_XYZ] 'pseudo group' (= a built-in
 1361|       |             * list of groups) should be added
 1362|       |             */
 1363|      0|            for (i = 0; i < OSSL_NELEM(default_group_strings); i++) {
  ------------------
  |  |   14|      0|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1363:25): [True: 0, False: 0]
  ------------------
 1364|      0|                if ((size_t)len == (strlen(default_group_strings[i].list_name))
  ------------------
  |  Branch (1364:21): [True: 0, False: 0]
  ------------------
 1365|      0|                    && OPENSSL_strncasecmp(default_group_strings[i].list_name, elem, len) == 0) {
  ------------------
  |  Branch (1365:24): [True: 0, False: 0]
  ------------------
 1366|      0|                    int saved_first;
 1367|       |
 1368|       |                    /*
 1369|       |                     * We're asked to insert an entire list of groups from a
 1370|       |                     * DEFAULT[_XYZ] 'pseudo group' which we do by
 1371|       |                     * recursively calling this function (indirectly via
 1372|       |                     * CONF_parse_list and tuple_cb); essentially, we treat a DEFAULT
 1373|       |                     * group string like a tuple which is appended to the current tuple
 1374|       |                     * rather then starting a new tuple.
 1375|       |                     */
 1376|      0|                    if (ignore_unknown || remove_group)
  ------------------
  |  Branch (1376:25): [True: 0, False: 0]
  |  Branch (1376:43): [True: 0, False: 0]
  ------------------
 1377|      0|                        return -1; /* removal or ignore not allowed here -> syntax error */
 1378|       |
 1379|       |                    /*
 1380|       |                     * First, we restore any keyshare prefix in a new zero-terminated string
 1381|       |                     * (if not already present)
 1382|       |                     */
 1383|      0|                    restored_default_group_string = OPENSSL_malloc(1 /* max prefix length */ + strlen(default_group_strings[i].group_string) + 1 /* \0 */);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1384|      0|                    if (restored_default_group_string == NULL)
  ------------------
  |  Branch (1384:25): [True: 0, False: 0]
  ------------------
 1385|      0|                        return 0;
 1386|      0|                    if (add_keyshare
  ------------------
  |  Branch (1386:25): [True: 0, False: 0]
  ------------------
 1387|       |                        /* Remark: we tolerate a duplicated keyshare indicator here */
 1388|      0|                        && default_group_strings[i].group_string[0]
  ------------------
  |  Branch (1388:28): [True: 0, False: 0]
  ------------------
 1389|      0|                            != KEY_SHARE_INDICATOR_CHARACTER)
  ------------------
  |  | 1238|      0|#define KEY_SHARE_INDICATOR_CHARACTER '*'
  ------------------
 1390|      0|                        restored_default_group_string[restored_prefix_index++] = KEY_SHARE_INDICATOR_CHARACTER;
  ------------------
  |  | 1238|      0|#define KEY_SHARE_INDICATOR_CHARACTER '*'
  ------------------
 1391|       |
 1392|      0|                    memcpy(restored_default_group_string + restored_prefix_index,
 1393|      0|                        default_group_strings[i].group_string,
 1394|      0|                        strlen(default_group_strings[i].group_string));
 1395|      0|                    restored_default_group_string[strlen(default_group_strings[i].group_string) + restored_prefix_index] = '\0';
 1396|       |                    /*
 1397|       |                     * Append first tuple of result to current tuple, and don't
 1398|       |                     * terminate the last tuple until we return to a top-level
 1399|       |                     * tuple_cb.
 1400|       |                     */
 1401|      0|                    saved_first = garg->first;
 1402|      0|                    garg->inner = garg->first = 1;
 1403|      0|                    retval = CONF_parse_list(restored_default_group_string,
 1404|      0|                        TUPLE_DELIMITER_CHARACTER, 1, tuple_cb, garg);
  ------------------
  |  | 1226|      0|#define TUPLE_DELIMITER_CHARACTER '/'
  ------------------
 1405|      0|                    garg->inner = 0;
 1406|      0|                    garg->first = saved_first;
 1407|       |                    /* We don't need the \0-terminated string anymore */
 1408|      0|                    OPENSSL_free(restored_default_group_string);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1409|       |
 1410|      0|                    return retval;
 1411|      0|                }
 1412|      0|            }
 1413|       |            /*
 1414|       |             * If we reached this point, a group name started with a 'd' or 'D', but no request
 1415|       |             * for a DEFAULT[_XYZ] 'pseudo group' was detected, hence processing of the group
 1416|       |             * name can continue as usual (= the while loop checking prefixes can end)
 1417|       |             */
 1418|      0|            continue_while_loop = 0;
 1419|      0|            break;
 1420|  95.7k|        }
 1421|  95.7k|    }
 1422|       |
 1423|  80.9k|    if (len == 0)
  ------------------
  |  Branch (1423:9): [True: 0, False: 80.9k]
  ------------------
 1424|      0|        return -1; /* Seems we have prefxes without a group name -> syntax error */
 1425|       |
 1426|       |    /* Memory management in case more groups are present compared to initial allocation */
 1427|  80.9k|    if (garg->gidcnt == garg->gidmax) {
  ------------------
  |  Branch (1427:9): [True: 0, False: 80.9k]
  ------------------
 1428|      0|        uint16_t *tmp = OPENSSL_realloc_array(garg->gid_arr,
  ------------------
  |  |  125|      0|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1429|      0|            garg->gidmax + GROUPLIST_INCREMENT,
 1430|      0|            sizeof(*garg->gid_arr));
 1431|       |
 1432|      0|        if (tmp == NULL)
  ------------------
  |  Branch (1432:13): [True: 0, False: 0]
  ------------------
 1433|      0|            return 0;
 1434|       |
 1435|      0|        garg->gidmax += GROUPLIST_INCREMENT;
  ------------------
  |  | 1215|      0|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1436|      0|        garg->gid_arr = tmp;
 1437|      0|    }
 1438|       |    /* Memory management for key share groups */
 1439|  80.9k|    if (garg->ksidcnt == garg->ksidmax) {
  ------------------
  |  Branch (1439:9): [True: 0, False: 80.9k]
  ------------------
 1440|      0|        uint16_t *tmp = OPENSSL_realloc_array(garg->ksid_arr,
  ------------------
  |  |  125|      0|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1441|      0|            garg->ksidmax + GROUPLIST_INCREMENT,
 1442|      0|            sizeof(*garg->ksid_arr));
 1443|       |
 1444|      0|        if (tmp == NULL)
  ------------------
  |  Branch (1444:13): [True: 0, False: 0]
  ------------------
 1445|      0|            return 0;
 1446|      0|        garg->ksidmax += GROUPLIST_INCREMENT;
  ------------------
  |  | 1215|      0|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1447|      0|        garg->ksid_arr = tmp;
 1448|      0|    }
 1449|       |
 1450|  80.9k|    if (len > (int)(sizeof(etmp) - 1))
  ------------------
  |  Branch (1450:9): [True: 0, False: 80.9k]
  ------------------
 1451|      0|        return -1; /* group name to long  -> syntax error */
 1452|       |
 1453|       |    /*
 1454|       |     * Prepare addition or removal of a single group by converting
 1455|       |     * a group name into its groupID equivalent
 1456|       |     */
 1457|       |
 1458|       |    /* Create a \0-terminated string and get the gid for this group if possible */
 1459|  80.9k|    memcpy(etmp, elem, len);
 1460|  80.9k|    etmp[len] = 0;
 1461|       |
 1462|       |    /* Get the groupID */
 1463|  80.9k|    gid = tls1_group_name2id(garg->ctx, etmp);
 1464|       |    /*
 1465|       |     * Handle the case where no valid groupID was returned
 1466|       |     * e.g. for an unknown group, which we'd ignore (only) if relevant prefix was set
 1467|       |     */
 1468|  80.9k|    if (gid == 0) {
  ------------------
  |  Branch (1468:9): [True: 0, False: 80.9k]
  ------------------
 1469|       |        /* Is it one of the GOST groups ? */
 1470|      0|        for (i = 0; i < OSSL_NELEM(name2id_arr); i++) {
  ------------------
  |  |   14|      0|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1470:21): [True: 0, False: 0]
  ------------------
 1471|      0|            if (OPENSSL_strcasecmp(etmp, name2id_arr[i].group_name) == 0) {
  ------------------
  |  Branch (1471:17): [True: 0, False: 0]
  ------------------
 1472|      0|                gid = name2id_arr[i].groupID;
 1473|      0|                break;
 1474|      0|            }
 1475|      0|        }
 1476|      0|        if (gid == 0) { /* still not found */
  ------------------
  |  Branch (1476:13): [True: 0, False: 0]
  ------------------
 1477|       |            /* If unknown, next known tuple element gets a keyshare */
 1478|      0|            if (add_keyshare && !remove_group && garg->want_keyshare == 0)
  ------------------
  |  Branch (1478:17): [True: 0, False: 0]
  |  Branch (1478:33): [True: 0, False: 0]
  |  Branch (1478:50): [True: 0, False: 0]
  ------------------
 1479|      0|                garg->want_keyshare = 1;
 1480|       |            /* Unknown group - ignore if ignore_unknown; trigger error otherwise */
 1481|      0|            retval = ignore_unknown;
 1482|      0|            goto done;
 1483|      0|        }
 1484|      0|    }
 1485|       |
 1486|       |    /* Make sure that at least one provider is supporting this groupID */
 1487|  80.9k|    found_group = 0;
 1488|   817k|    for (j = 0; j < garg->ctx->group_list_len; j++)
  ------------------
  |  Branch (1488:17): [True: 817k, False: 0]
  ------------------
 1489|   817k|        if (garg->ctx->group_list[j].group_id == gid) {
  ------------------
  |  Branch (1489:13): [True: 80.9k, False: 736k]
  ------------------
 1490|  80.9k|            found_group = 1;
 1491|  80.9k|            break;
 1492|  80.9k|        }
 1493|       |
 1494|       |    /*
 1495|       |     * No provider supports this group - ignore if
 1496|       |     * ignore_unknown; trigger error otherwise
 1497|       |     */
 1498|  80.9k|    if (found_group == 0) {
  ------------------
  |  Branch (1498:9): [True: 0, False: 80.9k]
  ------------------
 1499|       |        /* If unknown, next known tuple element gets a keyshare */
 1500|      0|        if (add_keyshare && !remove_group && garg->want_keyshare == 0)
  ------------------
  |  Branch (1500:13): [True: 0, False: 0]
  |  Branch (1500:29): [True: 0, False: 0]
  |  Branch (1500:46): [True: 0, False: 0]
  ------------------
 1501|      0|            garg->want_keyshare = 1;
 1502|      0|        retval = ignore_unknown;
 1503|      0|        goto done;
 1504|      0|    }
 1505|       |    /* Remove group (and keyshare) from anywhere in the list if present, ignore if not present */
 1506|  80.9k|    if (remove_group) {
  ------------------
  |  Branch (1506:9): [True: 0, False: 80.9k]
  ------------------
 1507|      0|        size_t n = 0; /* tuple size */
 1508|      0|        size_t tpl_start_idx = 0; /* Index of 1st group in tuple of removed group */
 1509|      0|        size_t ks_check_idx = 0; /* Index after last known retained keyshare */
 1510|       |
 1511|      0|        j = 0; /* tuple index */
 1512|      0|        k = 0; /* keyshare index */
 1513|      0|        n = garg->tuplcnt_arr[j];
 1514|       |
 1515|      0|        for (i = 0; i < garg->gidcnt; ++i) {
  ------------------
  |  Branch (1515:21): [True: 0, False: 0]
  ------------------
 1516|      0|            if (garg->gid_arr[i] == gid)
  ------------------
  |  Branch (1516:17): [True: 0, False: 0]
  ------------------
 1517|      0|                break;
 1518|       |            /* Skip keyshare slots associated with groups prior to that removed */
 1519|      0|            if (k < garg->ksidcnt && garg->gid_arr[i] == garg->ksid_arr[k]) {
  ------------------
  |  Branch (1519:17): [True: 0, False: 0]
  |  Branch (1519:38): [True: 0, False: 0]
  ------------------
 1520|      0|                ++k;
 1521|       |                /* Skip each retained keyshare as we go */
 1522|      0|                ks_check_idx = i + 1;
 1523|      0|            }
 1524|      0|            if (--n == 0) {
  ------------------
  |  Branch (1524:17): [True: 0, False: 0]
  ------------------
 1525|      0|                if (j < garg->tplcnt)
  ------------------
  |  Branch (1525:21): [True: 0, False: 0]
  ------------------
 1526|      0|                    n = garg->tuplcnt_arr[++j];
 1527|      0|                tpl_start_idx = i + 1;
 1528|      0|            }
 1529|      0|        }
 1530|       |
 1531|       |        /* Nothing to remove? */
 1532|      0|        if (i >= garg->gidcnt)
  ------------------
  |  Branch (1532:13): [True: 0, False: 0]
  ------------------
 1533|      0|            goto done;
 1534|       |
 1535|      0|        garg->gidcnt--;
 1536|      0|        garg->tuplcnt_arr[j]--;
 1537|      0|        memmove(garg->gid_arr + i, garg->gid_arr + i + 1,
 1538|      0|            (garg->gidcnt - i) * sizeof(gid));
 1539|       |
 1540|       |        /* Handle keyshare removal */
 1541|      0|        if (k < garg->ksidcnt && garg->ksid_arr[k] == gid) {
  ------------------
  |  Branch (1541:13): [True: 0, False: 0]
  |  Branch (1541:34): [True: 0, False: 0]
  ------------------
 1542|      0|            int drop_ks;
 1543|       |
 1544|       |            /*
 1545|       |             * Simply drop the group's keyshare unless it is the last one in a
 1546|       |             * still non-empty tuple.
 1547|       |             *
 1548|       |             * If `ks_check_idx` is larger than the tuple start index at least
 1549|       |             * one keyshare belonging to the tuple is retained, so we drop this
 1550|       |             * one.  Also if the tuple is the current one (isn't closed yet),
 1551|       |             * floating is handled at tuple close time.
 1552|       |             *
 1553|       |             * Otherwise, iterate through the tuple check whether any keyshares
 1554|       |             * remain *after* the index of the group we're removing.  The first
 1555|       |             * of these, if any, is at index `k+1` in the keyshare list, which
 1556|       |             * is the only slot we need to check.
 1557|       |             *
 1558|       |             * If the removal emptied the tuple (tuplcnt_arr[j] == 0 after the
 1559|       |             * decrement above) there is no remaining group to float onto:
 1560|       |             * gid_arr[tpl_start_idx] would now name a group belonging to the
 1561|       |             * next tuple (or be past gid_arr entirely).  Drop the keyshare in
 1562|       |             * that case too.
 1563|       |             */
 1564|      0|            drop_ks = ks_check_idx > tpl_start_idx || j >= garg->tplcnt
  ------------------
  |  Branch (1564:23): [True: 0, False: 0]
  |  Branch (1564:55): [True: 0, False: 0]
  ------------------
 1565|      0|                || garg->tuplcnt_arr[j] == 0;
  ------------------
  |  Branch (1565:20): [True: 0, False: 0]
  ------------------
 1566|       |
 1567|      0|            if (!drop_ks) {
  ------------------
  |  Branch (1567:17): [True: 0, False: 0]
  ------------------
 1568|      0|                size_t end; /* End index of affected tuple */
 1569|       |
 1570|       |                /* Removing the first keyshare of an already completed tuple */
 1571|      0|                for (end = tpl_start_idx + garg->tuplcnt_arr[j]; i < end; ++i) {
  ------------------
  |  Branch (1571:66): [True: 0, False: 0]
  ------------------
 1572|       |                    /* Any other keyshares for the same tuple? */
 1573|      0|                    if (k + 1 < garg->ksidcnt
  ------------------
  |  Branch (1573:25): [True: 0, False: 0]
  ------------------
 1574|      0|                        && garg->gid_arr[i] == garg->ksid_arr[k + 1])
  ------------------
  |  Branch (1574:28): [True: 0, False: 0]
  ------------------
 1575|      0|                        break;
 1576|      0|                }
 1577|       |                /* Float keyshare to first group when no others found */
 1578|      0|                if (i >= end)
  ------------------
  |  Branch (1578:21): [True: 0, False: 0]
  ------------------
 1579|      0|                    garg->ksid_arr[k] = garg->gid_arr[tpl_start_idx];
 1580|      0|                else
 1581|      0|                    drop_ks = 1;
 1582|      0|            }
 1583|      0|            if (drop_ks) {
  ------------------
  |  Branch (1583:17): [True: 0, False: 0]
  ------------------
 1584|      0|                garg->ksidcnt--;
 1585|      0|                memmove(garg->ksid_arr + k, garg->ksid_arr + k + 1,
 1586|      0|                    (garg->ksidcnt - k) * sizeof(gid));
 1587|      0|            }
 1588|      0|        }
 1589|       |
 1590|       |        /*
 1591|       |         * Adjust closed or current tuple's group count, if a closed tuple
 1592|       |         * count reaches zero excise the resulting empty tuple.  The current
 1593|       |         * (not yet closed) tuple at the end of the list stays even if empty.
 1594|       |         *
 1595|       |         * The active tuple lives at index tplcnt, so the slots in use are
 1596|       |         * tuplcnt_arr[0..tplcnt] (tplcnt + 1 entries).  Excising closed tuple
 1597|       |         * j must therefore shift the closed tuples j+1..tplcnt-1 *and* the
 1598|       |         * active tuple at index tplcnt down by one, i.e. (tplcnt - j) entries
 1599|       |         * counted with the pre-decrement tplcnt.  Decrement tplcnt only after
 1600|       |         * the move so the active-tuple slot is not left behind (which would
 1601|       |         * inflate the per-tuple counts and desynchronise them from gid_arr).
 1602|       |         */
 1603|      0|        if (garg->tuplcnt_arr[j] == 0 && j < garg->tplcnt) {
  ------------------
  |  Branch (1603:13): [True: 0, False: 0]
  |  Branch (1603:42): [True: 0, False: 0]
  ------------------
 1604|      0|            memmove(garg->tuplcnt_arr + j, garg->tuplcnt_arr + j + 1,
 1605|      0|                (garg->tplcnt - j) * sizeof(size_t));
 1606|      0|            garg->tplcnt--;
 1607|      0|        }
 1608|  80.9k|    } else { /* Processing addition of a single new group */
 1609|       |
 1610|       |        /* Check for duplicates */
 1611|   485k|        for (i = 0; i < garg->gidcnt; i++)
  ------------------
  |  Branch (1611:21): [True: 404k, False: 80.9k]
  ------------------
 1612|   404k|            if (garg->gid_arr[i] == gid) {
  ------------------
  |  Branch (1612:17): [True: 0, False: 404k]
  ------------------
 1613|       |                /* Duplicate group anywhere in the list of groups - ignore */
 1614|      0|                goto done;
 1615|      0|            }
 1616|       |
 1617|       |        /* Add the current group to the 'flat' list of groups */
 1618|  80.9k|        garg->gid_arr[garg->gidcnt++] = gid;
 1619|       |        /* and update the book keeping for the number of groups in current tuple */
 1620|  80.9k|        garg->tuplcnt_arr[garg->tplcnt]++;
 1621|       |
 1622|       |        /* We want to add a key share for the current group */
 1623|  80.9k|        if (add_keyshare) {
  ------------------
  |  Branch (1623:13): [True: 14.7k, False: 66.2k]
  ------------------
 1624|  14.7k|            garg->ksid_arr[garg->ksidcnt++] = gid;
 1625|  14.7k|            garg->want_keyshare = -1;
 1626|  14.7k|        }
 1627|  80.9k|    }
 1628|       |
 1629|  80.9k|done:
 1630|  80.9k|    return retval;
 1631|  80.9k|}
t1_lib.c:tls1_group_name2id:
  725|  80.9k|{
  726|  80.9k|    size_t i;
  727|       |
  728|   817k|    for (i = 0; i < ctx->group_list_len; i++) {
  ------------------
  |  Branch (728:17): [True: 817k, False: 0]
  ------------------
  729|   817k|        if (OPENSSL_strcasecmp(ctx->group_list[i].tlsname, name) == 0
  ------------------
  |  Branch (729:13): [True: 80.9k, False: 736k]
  ------------------
  730|   736k|            || OPENSSL_strcasecmp(ctx->group_list[i].realname, name) == 0)
  ------------------
  |  Branch (730:16): [True: 0, False: 736k]
  ------------------
  731|  80.9k|            return ctx->group_list[i].group_id;
  732|   817k|    }
  733|       |
  734|      0|    return 0;
  735|  80.9k|}
t1_lib.c:tls1_lookup_sigalg:
 2525|   758k|{
 2526|   758k|    const SIGALG_LOOKUP *lu = tls1_find_sigalg(ctx, sigalg);
 2527|       |
 2528|   758k|    return (lu != NULL && lu->available) ? lu : NULL;
  ------------------
  |  Branch (2528:13): [True: 758k, False: 0]
  |  Branch (2528:27): [True: 758k, False: 0]
  ------------------
 2529|   758k|}
t1_lib.c:tls_sigalg_compat:
 2789|   127k|{
 2790|   127k|    int minversion, maxversion;
 2791|   127k|    int minproto, maxproto;
 2792|       |
 2793|   127k|    if (!lu->available)
  ------------------
  |  Branch (2793:9): [True: 0, False: 127k]
  ------------------
 2794|      0|        return 0;
 2795|       |
 2796|   127k|    if (SSL_CONNECTION_IS_DTLS(sc)) {
  ------------------
  |  |  266|   127k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|   127k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|   127k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (266:5): [True: 0, False: 127k]
  |  |  ------------------
  ------------------
 2797|      0|        if (sc->ssl.method->version == DTLS_ANY_VERSION) {
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (2797:13): [True: 0, False: 0]
  ------------------
 2798|      0|            minproto = sc->min_proto_version;
 2799|      0|            maxproto = sc->max_proto_version;
 2800|      0|        } else {
 2801|      0|            maxproto = minproto = sc->version;
 2802|      0|        }
 2803|      0|        minversion = lu->mindtls;
 2804|      0|        maxversion = lu->maxdtls;
 2805|   127k|    } else {
 2806|   127k|        if (sc->ssl.method->version == TLS_ANY_VERSION) {
  ------------------
  |  |   40|   127k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (2806:13): [True: 108k, False: 18.1k]
  ------------------
 2807|   108k|            minproto = sc->min_proto_version;
 2808|   108k|            maxproto = sc->max_proto_version;
 2809|   108k|        } else {
 2810|  18.1k|            maxproto = minproto = sc->version;
 2811|  18.1k|        }
 2812|   127k|        minversion = lu->mintls;
 2813|   127k|        maxversion = lu->maxtls;
 2814|   127k|    }
 2815|   127k|    if (minversion == -1 || maxversion == -1
  ------------------
  |  Branch (2815:9): [True: 0, False: 127k]
  |  Branch (2815:29): [True: 0, False: 127k]
  ------------------
 2816|   127k|        || (minversion != 0 && maxproto != 0
  ------------------
  |  Branch (2816:13): [True: 127k, False: 0]
  |  Branch (2816:32): [True: 18.1k, False: 108k]
  ------------------
 2817|  18.1k|            && ssl_version_cmp(sc, minversion, maxproto) > 0)
  ------------------
  |  Branch (2817:16): [True: 0, False: 18.1k]
  ------------------
 2818|   127k|        || (maxversion != 0 && minproto != 0
  ------------------
  |  Branch (2818:13): [True: 58.0k, False: 68.9k]
  |  Branch (2818:32): [True: 58.0k, False: 0]
  ------------------
 2819|  58.0k|            && ssl_version_cmp(sc, maxversion, minproto) < 0)
  ------------------
  |  Branch (2819:16): [True: 0, False: 58.0k]
  ------------------
 2820|   127k|        || !tls12_sigalg_allowed(sc, SSL_SECOP_SIGALG_SUPPORTED, lu))
  ------------------
  |  | 2772|   127k|#define SSL_SECOP_SIGALG_SUPPORTED (11 | SSL_SECOP_OTHER_SIGALG)
  |  |  ------------------
  |  |  |  | 2734|   127k|#define SSL_SECOP_OTHER_SIGALG (5 << 16)
  |  |  ------------------
  ------------------
  |  Branch (2820:12): [True: 10.8k, False: 116k]
  ------------------
 2821|  10.8k|        return 0;
 2822|   116k|    return 1;
 2823|   127k|}
t1_lib.c:sigalg_security_bits:
 2741|   341k|{
 2742|   341k|    const EVP_MD *md = NULL;
 2743|   341k|    int secbits = 0;
 2744|       |
 2745|   341k|    if (!tls1_lookup_md(ctx, lu, &md))
  ------------------
  |  Branch (2745:9): [True: 0, False: 341k]
  ------------------
 2746|      0|        return 0;
 2747|   341k|    if (md != NULL) {
  ------------------
  |  Branch (2747:9): [True: 264k, False: 76.2k]
  ------------------
 2748|   264k|        int md_type = EVP_MD_get_type(md);
 2749|       |
 2750|       |        /* Security bits: half digest bits */
 2751|   264k|        secbits = EVP_MD_get_size(md) * 4;
 2752|   264k|        if (secbits <= 0)
  ------------------
  |  Branch (2752:13): [True: 0, False: 264k]
  ------------------
 2753|      0|            return 0;
 2754|       |        /*
 2755|       |         * SHA1 and MD5 are known to be broken. Reduce security bits so that
 2756|       |         * they're no longer accepted at security level 1. The real values don't
 2757|       |         * really matter as long as they're lower than 80, which is our
 2758|       |         * security level 1.
 2759|       |         * https://eprint.iacr.org/2020/014 puts a chosen-prefix attack for
 2760|       |         * SHA1 at 2^63.4 and MD5+SHA1 at 2^67.2
 2761|       |         * https://documents.epfl.ch/users/l/le/lenstra/public/papers/lat.pdf
 2762|       |         * puts a chosen-prefix attack for MD5 at 2^39.
 2763|       |         */
 2764|   264k|        if (md_type == NID_sha1)
  ------------------
  |  | 2348|   264k|#define NID_sha1                64
  ------------------
  |  Branch (2764:13): [True: 10.8k, False: 254k]
  ------------------
 2765|  10.8k|            secbits = 64;
 2766|   254k|        else if (md_type == NID_md5_sha1)
  ------------------
  |  | 1247|   254k|#define NID_md5_sha1            114
  ------------------
  |  Branch (2766:18): [True: 0, False: 254k]
  ------------------
 2767|      0|            secbits = 67;
 2768|   254k|        else if (md_type == NID_md5)
  ------------------
  |  | 1242|   254k|#define NID_md5         4
  ------------------
  |  Branch (2768:18): [True: 0, False: 254k]
  ------------------
 2769|      0|            secbits = 39;
 2770|   264k|    } else {
 2771|       |        /* Values from https://tools.ietf.org/html/rfc8032#section-8.5 */
 2772|  76.2k|        if (lu->sigalg == TLSEXT_SIGALG_ed25519)
  ------------------
  |  |   43|  76.2k|#define TLSEXT_SIGALG_ed25519 0x0807
  ------------------
  |  Branch (2772:13): [True: 10.8k, False: 65.3k]
  ------------------
 2773|  10.8k|            secbits = 128;
 2774|  65.3k|        else if (lu->sigalg == TLSEXT_SIGALG_ed448)
  ------------------
  |  |   44|  65.3k|#define TLSEXT_SIGALG_ed448 0x0808
  ------------------
  |  Branch (2774:18): [True: 10.8k, False: 54.4k]
  ------------------
 2775|  10.8k|            secbits = 224;
 2776|  76.2k|    }
 2777|       |    /*
 2778|       |     * For provider-based sigalgs we have secbits information available
 2779|       |     * in the (provider-loaded) sigalg_list structure
 2780|       |     */
 2781|   341k|    if ((secbits == 0) && (lu->sig_idx >= SSL_PKEY_NUM)
  ------------------
  |  |  336|  54.4k|#define SSL_PKEY_NUM 9
  ------------------
  |  Branch (2781:9): [True: 54.4k, False: 286k]
  |  Branch (2781:27): [True: 54.4k, False: 0]
  ------------------
 2782|  54.4k|        && ((lu->sig_idx - SSL_PKEY_NUM) < (int)ctx->sigalg_list_len)) {
  ------------------
  |  |  336|  54.4k|#define SSL_PKEY_NUM 9
  ------------------
  |  Branch (2782:12): [True: 54.4k, False: 0]
  ------------------
 2783|  54.4k|        secbits = ctx->sigalg_list[lu->sig_idx - SSL_PKEY_NUM].secbits;
  ------------------
  |  |  336|  54.4k|#define SSL_PKEY_NUM 9
  ------------------
 2784|  54.4k|    }
 2785|   341k|    return secbits;
 2786|   341k|}
t1_lib.c:tls12_sigalg_allowed:
 3467|   366k|{
 3468|   366k|    unsigned char sigalgstr[2];
 3469|   366k|    int secbits;
 3470|       |
 3471|   366k|    if (lu == NULL || !lu->available)
  ------------------
  |  Branch (3471:9): [True: 0, False: 366k]
  |  Branch (3471:23): [True: 0, False: 366k]
  ------------------
 3472|      0|        return 0;
 3473|       |    /* DSA is not allowed in TLS 1.3 */
 3474|   366k|    if (SSL_CONNECTION_IS_TLS13(s) && lu->sig == EVP_PKEY_DSA)
  ------------------
  |  |  273|   733k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|   733k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|   366k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|   366k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 366k, False: 0]
  |  |  ------------------
  |  |  274|   366k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|   366k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|   733k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (274:8): [True: 366k, False: 0]
  |  |  ------------------
  |  |  275|   733k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|   366k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|   366k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (275:8): [True: 214k, False: 152k]
  |  |  ------------------
  ------------------
                  if (SSL_CONNECTION_IS_TLS13(s) && lu->sig == EVP_PKEY_DSA)
  ------------------
  |  |   66|   214k|#define EVP_PKEY_DSA NID_dsa
  |  |  ------------------
  |  |  |  |  136|   214k|#define NID_dsa         116
  |  |  ------------------
  ------------------
  |  Branch (3474:39): [True: 29.0k, False: 185k]
  ------------------
 3475|  29.0k|        return 0;
 3476|       |    /*
 3477|       |     * At some point we should fully axe DSA/etc. in ClientHello as per TLS 1.3
 3478|       |     * spec
 3479|       |     */
 3480|   337k|    if (!s->server && !SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  266|   493k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|   156k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2196|   156k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (3480:9): [True: 156k, False: 181k]
  |  Branch (3480:23): [True: 156k, False: 0]
  ------------------
 3481|   156k|        && s->s3.tmp.min_ver >= TLS1_3_VERSION
  ------------------
  |  |   27|   493k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (3481:12): [True: 3.62k, False: 152k]
  ------------------
 3482|  3.62k|        && (lu->sig == EVP_PKEY_DSA || lu->hash_idx == SSL_MD_SHA1_IDX
  ------------------
  |  |   66|  3.62k|#define EVP_PKEY_DSA NID_dsa
  |  |  ------------------
  |  |  |  |  136|  7.25k|#define NID_dsa         116
  |  |  ------------------
  ------------------
                      && (lu->sig == EVP_PKEY_DSA || lu->hash_idx == SSL_MD_SHA1_IDX
  ------------------
  |  |  194|  7.25k|#define SSL_MD_SHA1_IDX 1
  ------------------
  |  Branch (3482:13): [True: 0, False: 3.62k]
  |  Branch (3482:40): [True: 0, False: 3.62k]
  ------------------
 3483|  3.62k|            || lu->hash_idx == SSL_MD_MD5_IDX
  ------------------
  |  |  193|  7.25k|#define SSL_MD_MD5_IDX 0
  ------------------
  |  Branch (3483:16): [True: 0, False: 3.62k]
  ------------------
 3484|  3.62k|            || lu->hash_idx == SSL_MD_SHA224_IDX))
  ------------------
  |  |  203|  3.62k|#define SSL_MD_SHA224_IDX 10
  ------------------
  |  Branch (3484:16): [True: 0, False: 3.62k]
  ------------------
 3485|      0|        return 0;
 3486|       |
 3487|       |    /* See if public key algorithm allowed */
 3488|   337k|    if (ssl_cert_is_disabled(SSL_CONNECTION_GET_CTX(s), lu->sig_idx))
  ------------------
  |  |   26|   337k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  |  Branch (3488:9): [True: 0, False: 337k]
  ------------------
 3489|      0|        return 0;
 3490|       |
 3491|   337k|    if (lu->sig == NID_id_GostR3410_2012_256
  ------------------
  |  | 4794|   674k|#define NID_id_GostR3410_2012_256               979
  ------------------
  |  Branch (3491:9): [True: 0, False: 337k]
  ------------------
 3492|   337k|        || lu->sig == NID_id_GostR3410_2012_512
  ------------------
  |  | 4799|   674k|#define NID_id_GostR3410_2012_512               980
  ------------------
  |  Branch (3492:12): [True: 0, False: 337k]
  ------------------
 3493|   337k|        || lu->sig == NID_id_GostR3410_2001) {
  ------------------
  |  | 4583|   337k|#define NID_id_GostR3410_2001           811
  ------------------
  |  Branch (3493:12): [True: 0, False: 337k]
  ------------------
 3494|       |        /* We never allow GOST sig algs on the server with TLSv1.3 */
 3495|      0|        if (s->server && SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  273|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  266|      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)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2196|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (273:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  274|      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 (274:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  275|      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 (275:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3495:13): [True: 0, False: 0]
  ------------------
 3496|      0|            return 0;
 3497|      0|        if (!s->server
  ------------------
  |  Branch (3497:13): [True: 0, False: 0]
  ------------------
 3498|      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 (3498:16): [True: 0, False: 0]
  ------------------
 3499|      0|            && s->s3.tmp.max_ver >= TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (3499:16): [True: 0, False: 0]
  ------------------
 3500|      0|            int i, num;
 3501|      0|            STACK_OF(SSL_CIPHER) *sk;
  ------------------
  |  |   33|      0|#define STACK_OF(type) struct stack_st_##type
  ------------------
 3502|       |
 3503|       |            /*
 3504|       |             * We're a client that could negotiate TLSv1.3. We only allow GOST
 3505|       |             * sig algs if we could negotiate TLSv1.2 or below and we have GOST
 3506|       |             * ciphersuites enabled.
 3507|       |             */
 3508|       |
 3509|      0|            if (s->s3.tmp.min_ver >= TLS1_3_VERSION)
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (3509:17): [True: 0, False: 0]
  ------------------
 3510|      0|                return 0;
 3511|       |
 3512|      0|            sk = SSL_get_ciphers(SSL_CONNECTION_GET_SSL(s));
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 3513|      0|            num = sk != NULL ? sk_SSL_CIPHER_num(sk) : 0;
  ------------------
  |  | 1028|      0|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (3513:19): [True: 0, False: 0]
  ------------------
 3514|      0|            for (i = 0; i < num; i++) {
  ------------------
  |  Branch (3514:25): [True: 0, False: 0]
  ------------------
 3515|      0|                const SSL_CIPHER *c;
 3516|       |
 3517|      0|                c = sk_SSL_CIPHER_value(sk, i);
  ------------------
  |  | 1029|      0|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 3518|       |                /* Skip disabled ciphers */
 3519|      0|                if (ssl_cipher_disabled(s, c, SSL_SECOP_CIPHER_SUPPORTED, 0))
  ------------------
  |  | 2754|      0|#define SSL_SECOP_CIPHER_SUPPORTED (1 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2730|      0|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (3519:21): [True: 0, False: 0]
  ------------------
 3520|      0|                    continue;
 3521|       |
 3522|      0|                if ((c->algorithm_mkey & (SSL_kGOST | SSL_kGOST18)) != 0)
  ------------------
  |  |   93|      0|#define SSL_kGOST 0x00000010U
  ------------------
                              if ((c->algorithm_mkey & (SSL_kGOST | SSL_kGOST18)) != 0)
  ------------------
  |  |  101|      0|#define SSL_kGOST18 0x00000200U
  ------------------
  |  Branch (3522:21): [True: 0, False: 0]
  ------------------
 3523|      0|                    break;
 3524|      0|            }
 3525|      0|            if (i == num)
  ------------------
  |  Branch (3525:17): [True: 0, False: 0]
  ------------------
 3526|      0|                return 0;
 3527|      0|        }
 3528|      0|    }
 3529|       |
 3530|       |    /* Finally see if security callback allows it */
 3531|   337k|    secbits = sigalg_security_bits(SSL_CONNECTION_GET_CTX(s), lu);
  ------------------
  |  |   26|   337k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3532|   337k|    sigalgstr[0] = (lu->sigalg >> 8) & 0xff;
 3533|   337k|    sigalgstr[1] = lu->sigalg & 0xff;
 3534|   337k|    return ssl_security(s, op, secbits, lu->hash, (void *)sigalgstr);
 3535|   337k|}
t1_lib.c:tls1_set_shared_sigalgs:
 3627|  3.62k|{
 3628|  3.62k|    const uint16_t *pref, *allow, *conf;
 3629|  3.62k|    size_t preflen, allowlen, conflen;
 3630|  3.62k|    size_t nmatch;
 3631|  3.62k|    const SIGALG_LOOKUP **salgs = NULL;
 3632|  3.62k|    CERT *c = s->cert;
 3633|  3.62k|    unsigned int is_suiteb = tls1_suiteb(s);
  ------------------
  |  | 2035|  3.62k|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  584|  3.62k|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  ------------------
 3634|       |
 3635|  3.62k|    OPENSSL_free(s->shared_sigalgs);
  ------------------
  |  |  132|  3.62k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3636|  3.62k|    s->shared_sigalgs = NULL;
 3637|  3.62k|    s->shared_sigalgslen = 0;
 3638|       |    /* If client use client signature algorithms if not NULL */
 3639|  3.62k|    if (!s->server && c->client_sigalgs && !is_suiteb) {
  ------------------
  |  Branch (3639:9): [True: 0, False: 3.62k]
  |  Branch (3639:23): [True: 0, False: 0]
  |  Branch (3639:44): [True: 0, False: 0]
  ------------------
 3640|      0|        conf = c->client_sigalgs;
 3641|      0|        conflen = c->client_sigalgslen;
 3642|  3.62k|    } else if (c->conf_sigalgs && !is_suiteb) {
  ------------------
  |  Branch (3642:16): [True: 0, False: 3.62k]
  |  Branch (3642:35): [True: 0, False: 0]
  ------------------
 3643|      0|        conf = c->conf_sigalgs;
 3644|      0|        conflen = c->conf_sigalgslen;
 3645|      0|    } else
 3646|  3.62k|        conflen = tls12_get_psigalgs(s, 0, &conf);
 3647|  3.62k|    if (s->options & SSL_OP_SERVER_PREFERENCE || is_suiteb) {
  ------------------
  |  |  414|  3.62k|#define SSL_OP_SERVER_PREFERENCE SSL_OP_BIT(22)
  |  |  ------------------
  |  |  |  |  351|  7.25k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (3647:9): [True: 0, False: 3.62k]
  |  Branch (3647:50): [True: 0, False: 3.62k]
  ------------------
 3648|      0|        pref = conf;
 3649|      0|        preflen = conflen;
 3650|      0|        allow = s->s3.tmp.peer_sigalgs;
 3651|      0|        allowlen = s->s3.tmp.peer_sigalgslen;
 3652|  3.62k|    } else {
 3653|  3.62k|        allow = conf;
 3654|  3.62k|        allowlen = conflen;
 3655|  3.62k|        pref = s->s3.tmp.peer_sigalgs;
 3656|  3.62k|        preflen = s->s3.tmp.peer_sigalgslen;
 3657|  3.62k|    }
 3658|  3.62k|    nmatch = tls12_shared_sigalgs(s, NULL, pref, preflen, allow, allowlen);
 3659|  3.62k|    if (nmatch) {
  ------------------
  |  Branch (3659:9): [True: 3.62k, False: 0]
  ------------------
 3660|  3.62k|        if ((salgs = OPENSSL_malloc_array(nmatch, sizeof(*salgs))) == NULL)
  ------------------
  |  |  111|  3.62k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (3660:13): [True: 0, False: 3.62k]
  ------------------
 3661|      0|            return 0;
 3662|  3.62k|        nmatch = tls12_shared_sigalgs(s, salgs, pref, preflen, allow, allowlen);
 3663|  3.62k|    } else {
 3664|      0|        salgs = NULL;
 3665|      0|    }
 3666|  3.62k|    s->shared_sigalgs = salgs;
 3667|  3.62k|    s->shared_sigalgslen = nmatch;
 3668|  3.62k|    return 1;
 3669|  3.62k|}
t1_lib.c:tls12_shared_sigalgs:
 3603|  7.25k|{
 3604|  7.25k|    const uint16_t *ptmp, *atmp;
 3605|  7.25k|    size_t i, j, nmatch = 0;
 3606|   203k|    for (i = 0, ptmp = pref; i < preflen; i++, ptmp++) {
  ------------------
  |  Branch (3606:30): [True: 195k, False: 7.25k]
  ------------------
 3607|   195k|        const SIGALG_LOOKUP *lu = tls1_lookup_sigalg(SSL_CONNECTION_GET_CTX(s), *ptmp);
  ------------------
  |  |   26|   195k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3608|       |
 3609|       |        /* Skip disabled hashes or signature algorithms */
 3610|   195k|        if (lu == NULL
  ------------------
  |  Branch (3610:13): [True: 0, False: 195k]
  ------------------
 3611|   195k|            || !tls12_sigalg_allowed(s, SSL_SECOP_SIGALG_SHARED, lu))
  ------------------
  |  | 2774|   195k|#define SSL_SECOP_SIGALG_SHARED (12 | SSL_SECOP_OTHER_SIGALG)
  |  |  ------------------
  |  |  |  | 2734|   195k|#define SSL_SECOP_OTHER_SIGALG (5 << 16)
  |  |  ------------------
  ------------------
  |  Branch (3611:16): [True: 29.0k, False: 166k]
  ------------------
 3612|  29.0k|            continue;
 3613|  2.06M|        for (j = 0, atmp = allow; j < allowlen; j++, atmp++) {
  ------------------
  |  Branch (3613:35): [True: 2.06M, False: 0]
  ------------------
 3614|  2.06M|            if (*ptmp == *atmp) {
  ------------------
  |  Branch (3614:17): [True: 166k, False: 1.89M]
  ------------------
 3615|   166k|                nmatch++;
 3616|   166k|                if (shsig)
  ------------------
  |  Branch (3616:21): [True: 83.4k, False: 83.4k]
  ------------------
 3617|  83.4k|                    *shsig++ = lu;
 3618|   166k|                break;
 3619|   166k|            }
 3620|  2.06M|        }
 3621|   166k|    }
 3622|  7.25k|    return nmatch;
 3623|  7.25k|}
t1_lib.c:tls1_find_sigalg:
 2513|   758k|{
 2514|   758k|    const SIGALG_LOOKUP *lu = ctx->sigalg_lookup_cache;
 2515|       |
 2516|  12.2M|    for (size_t i = 0; i < ctx->sigalg_lookup_cache_len; lu++, i++)
  ------------------
  |  Branch (2516:24): [True: 12.2M, False: 0]
  ------------------
 2517|  12.2M|        if (lu->sigalg == sigalg)
  ------------------
  |  Branch (2517:13): [True: 758k, False: 11.5M]
  ------------------
 2518|   758k|            return lu;
 2519|      0|    return NULL;
 2520|   758k|}
t1_lib.c:ssl_security_cert_key:
 4546|  7.36k|{
 4547|  7.36k|    int secbits = -1;
 4548|  7.36k|    EVP_PKEY *pkey = X509_get0_pubkey(x);
 4549|       |
 4550|  7.36k|    if (pkey) {
  ------------------
  |  Branch (4550:9): [True: 7.36k, False: 0]
  ------------------
 4551|       |        /*
 4552|       |         * If no parameters this will return -1 and fail using the default
 4553|       |         * security callback for any non-zero security level. This will
 4554|       |         * reject keys which omit parameters but this only affects DSA and
 4555|       |         * omission of parameters is never (?) done in practice.
 4556|       |         */
 4557|  7.36k|        secbits = EVP_PKEY_get_security_bits(pkey);
 4558|  7.36k|    }
 4559|  7.36k|    if (s != NULL)
  ------------------
  |  Branch (4559:9): [True: 3.62k, False: 3.73k]
  ------------------
 4560|  3.62k|        return ssl_security(s, op, secbits, 0, x);
 4561|  3.73k|    else
 4562|  3.73k|        return ssl_ctx_security(ctx, op, secbits, 0, x);
 4563|  7.36k|}
t1_lib.c:find_sig_alg:
 4756|  3.62k|{
 4757|  3.62k|    const SIGALG_LOOKUP *lu = NULL;
 4758|  3.62k|    size_t i;
 4759|  3.62k|    int curve = -1;
 4760|  3.62k|    EVP_PKEY *tmppkey;
 4761|  3.62k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 4762|       |
 4763|       |    /* Look for a shared sigalgs matching possible certificates */
 4764|  14.5k|    for (i = 0; i < s->shared_sigalgslen; i++) {
  ------------------
  |  Branch (4764:17): [True: 14.5k, False: 0]
  ------------------
 4765|       |        /* Skip SHA1, SHA224, DSA and RSA if not PSS */
 4766|  14.5k|        lu = s->shared_sigalgs[i];
 4767|  14.5k|        if (lu->hash == NID_sha1
  ------------------
  |  | 2348|  29.0k|#define NID_sha1                64
  ------------------
  |  Branch (4767:13): [True: 0, False: 14.5k]
  ------------------
 4768|  14.5k|            || lu->hash == NID_sha224
  ------------------
  |  | 3306|  29.0k|#define NID_sha224              675
  ------------------
  |  Branch (4768:16): [True: 0, False: 14.5k]
  ------------------
 4769|  14.5k|            || lu->sig == EVP_PKEY_DSA
  ------------------
  |  |   66|  14.5k|#define EVP_PKEY_DSA NID_dsa
  |  |  ------------------
  |  |  |  |  136|  29.0k|#define NID_dsa         116
  |  |  ------------------
  ------------------
  |  Branch (4769:16): [True: 0, False: 14.5k]
  ------------------
 4770|  14.5k|            || lu->sig == EVP_PKEY_RSA
  ------------------
  |  |   63|  14.5k|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|  29.0k|#define NID_rsaEncryption               6
  |  |  ------------------
  ------------------
  |  Branch (4770:16): [True: 0, False: 14.5k]
  ------------------
 4771|  14.5k|            || !tls_sigalg_compat(s, lu))
  ------------------
  |  Branch (4771:16): [True: 0, False: 14.5k]
  ------------------
 4772|      0|            continue;
 4773|       |
 4774|       |        /* Check that we have a cert, and signature_algorithms_cert */
 4775|  14.5k|        if (!tls1_lookup_md(sctx, lu, NULL))
  ------------------
  |  Branch (4775:13): [True: 0, False: 14.5k]
  ------------------
 4776|      0|            continue;
 4777|  14.5k|        if ((pkey == NULL && !has_usable_cert(s, lu, -1))
  ------------------
  |  Branch (4777:14): [True: 14.5k, False: 0]
  |  Branch (4777:30): [True: 10.8k, False: 3.62k]
  ------------------
 4778|  3.62k|            || (pkey != NULL && !is_cert_usable(s, lu, x, pkey)))
  ------------------
  |  Branch (4778:17): [True: 0, False: 3.62k]
  |  Branch (4778:33): [True: 0, False: 0]
  ------------------
 4779|  10.8k|            continue;
 4780|       |
 4781|  3.62k|        tmppkey = (pkey != NULL) ? pkey
  ------------------
  |  Branch (4781:19): [True: 0, False: 3.62k]
  ------------------
 4782|  3.62k|                                 : s->cert->pkeys[lu->sig_idx].privatekey;
 4783|       |
 4784|  3.62k|        if (lu->sig == EVP_PKEY_EC) {
  ------------------
  |  |   73|  3.62k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|  3.62k|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
  |  Branch (4784:13): [True: 3.62k, False: 0]
  ------------------
 4785|  3.62k|            if (curve == -1)
  ------------------
  |  Branch (4785:17): [True: 3.62k, False: 0]
  ------------------
 4786|  3.62k|                curve = ssl_get_EC_curve_nid(tmppkey);
 4787|  3.62k|            if (lu->curve != NID_undef && curve != lu->curve)
  ------------------
  |  |   18|  7.25k|#define NID_undef                       0
  ------------------
  |  Branch (4787:17): [True: 3.62k, False: 0]
  |  Branch (4787:43): [True: 0, False: 3.62k]
  ------------------
 4788|      0|                continue;
 4789|  3.62k|        } else if (lu->sig == EVP_PKEY_RSA_PSS) {
  ------------------
  |  |   65|      0|#define EVP_PKEY_RSA_PSS NID_rsassaPss
  |  |  ------------------
  |  |  |  |  583|      0|#define NID_rsassaPss           912
  |  |  ------------------
  ------------------
  |  Branch (4789:20): [True: 0, False: 0]
  ------------------
 4790|       |            /* validate that key is large enough for the signature algorithm */
 4791|      0|            if (!rsa_pss_check_min_key_size(sctx, tmppkey, lu))
  ------------------
  |  Branch (4791:17): [True: 0, False: 0]
  ------------------
 4792|      0|                continue;
 4793|      0|        }
 4794|  3.62k|        break;
 4795|  3.62k|    }
 4796|       |
 4797|  3.62k|    if (i == s->shared_sigalgslen)
  ------------------
  |  Branch (4797:9): [True: 0, False: 3.62k]
  ------------------
 4798|      0|        return NULL;
 4799|       |
 4800|  3.62k|    return lu;
 4801|  3.62k|}
t1_lib.c:check_cert_usable:
 4646|  3.62k|{
 4647|  3.62k|    const SIGALG_LOOKUP *lu;
 4648|  3.62k|    int mdnid, pknid, supported;
 4649|  3.62k|    size_t i;
 4650|  3.62k|    const char *mdname = NULL;
 4651|  3.62k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.62k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 4652|       |
 4653|       |    /*
 4654|       |     * If the given EVP_PKEY cannot support signing with this digest,
 4655|       |     * the answer is simply 'no'.
 4656|       |     */
 4657|  3.62k|    if (sig->hash != NID_undef)
  ------------------
  |  |   18|  3.62k|#define NID_undef                       0
  ------------------
  |  Branch (4657:9): [True: 3.62k, False: 0]
  ------------------
 4658|  3.62k|        mdname = OBJ_nid2sn(sig->hash);
 4659|  3.62k|    supported = EVP_PKEY_digestsign_supports_digest(pkey, sctx->libctx,
 4660|  3.62k|        mdname,
 4661|  3.62k|        sctx->propq);
 4662|  3.62k|    if (supported <= 0)
  ------------------
  |  Branch (4662:9): [True: 0, False: 3.62k]
  ------------------
 4663|      0|        return 0;
 4664|       |
 4665|       |    /*
 4666|       |     * When RPK is negotiated there are no certificate signatures to
 4667|       |     * constrain, and there may not even be a certificate configured.
 4668|       |     */
 4669|  3.62k|    if (TLSEXT_cert_type_rpk == (s->server ? s->ext.server_cert_type : s->ext.client_cert_type))
  ------------------
  |  |  250|  3.62k|#define TLSEXT_cert_type_rpk 2
  ------------------
  |  Branch (4669:9): [True: 0, False: 3.62k]
  |  Branch (4669:34): [True: 3.62k, False: 0]
  ------------------
 4670|      0|        return 1;
 4671|       |
 4672|       |    /*
 4673|       |     * RPK was enabled, adding candidate private-key-only slots, but was not
 4674|       |     * negotiated, so the key-only slot is not usable.
 4675|       |     */
 4676|  3.62k|    if (x == NULL)
  ------------------
  |  Branch (4676:9): [True: 0, False: 3.62k]
  ------------------
 4677|      0|        return 0;
 4678|       |
 4679|       |    /*
 4680|       |     * The TLS 1.3 signature_algorithms_cert extension places restrictions
 4681|       |     * on the sigalg with which the certificate was signed (by its issuer).
 4682|       |     */
 4683|  3.62k|    if (s->s3.tmp.peer_cert_sigalgs != NULL) {
  ------------------
  |  Branch (4683:9): [True: 0, False: 3.62k]
  ------------------
 4684|      0|        if (!X509_get_signature_info(x, &mdnid, &pknid, NULL, NULL))
  ------------------
  |  Branch (4684:13): [True: 0, False: 0]
  ------------------
 4685|      0|            return 0;
 4686|      0|        for (i = 0; i < s->s3.tmp.peer_cert_sigalgslen; i++) {
  ------------------
  |  Branch (4686:21): [True: 0, False: 0]
  ------------------
 4687|      0|            lu = tls1_lookup_sigalg(SSL_CONNECTION_GET_CTX(s),
  ------------------
  |  |   26|      0|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 4688|      0|                s->s3.tmp.peer_cert_sigalgs[i]);
 4689|      0|            if (lu == NULL)
  ------------------
  |  Branch (4689:17): [True: 0, False: 0]
  ------------------
 4690|      0|                continue;
 4691|       |
 4692|       |            /*
 4693|       |             * This does not differentiate between the
 4694|       |             * rsa_pss_pss_* and rsa_pss_rsae_* schemes since we do not
 4695|       |             * have a chain here that lets us look at the key OID in the
 4696|       |             * signing certificate.
 4697|       |             */
 4698|      0|            if (mdnid == lu->hash && pknid == lu->sig)
  ------------------
  |  Branch (4698:17): [True: 0, False: 0]
  |  Branch (4698:38): [True: 0, False: 0]
  ------------------
 4699|      0|                return 1;
 4700|      0|        }
 4701|      0|        return 0;
 4702|      0|    }
 4703|       |
 4704|       |    /*
 4705|       |     * Without signat_algorithms_cert, any certificate for which we have
 4706|       |     * a viable public key is permitted.
 4707|       |     */
 4708|  3.62k|    return 1;
 4709|  3.62k|}
t1_lib.c:has_usable_cert:
 4719|  14.5k|{
 4720|       |    /* TLS 1.2 callers can override sig->sig_idx, but not TLS 1.3 callers. */
 4721|  14.5k|    if (idx == -1)
  ------------------
  |  Branch (4721:9): [True: 14.5k, False: 0]
  ------------------
 4722|  14.5k|        idx = sig->sig_idx;
 4723|  14.5k|    if (!ssl_has_cert(s, idx))
  ------------------
  |  Branch (4723:9): [True: 10.8k, False: 3.62k]
  ------------------
 4724|  10.8k|        return 0;
 4725|       |
 4726|  3.62k|    return check_cert_usable(s, sig, s->cert->pkeys[idx].x509,
 4727|  3.62k|        s->cert->pkeys[idx].privatekey);
 4728|  14.5k|}

tls13_hkdf_expand_ex:
   39|   130k|{
   40|   130k|    EVP_KDF *kdf = EVP_KDF_fetch(libctx, OSSL_KDF_NAME_TLS1_3_KDF, propq);
  ------------------
  |  |   73|   130k|#define OSSL_KDF_NAME_TLS1_3_KDF "TLS13-KDF"
  ------------------
   41|   130k|    EVP_KDF_CTX *kctx;
   42|   130k|    OSSL_PARAM params[8], *p = params;
   43|   130k|    int mode = EVP_PKEY_HKDEF_MODE_EXPAND_ONLY;
  ------------------
  |  |   99|   130k|    EVP_KDF_HKDF_MODE_EXPAND_ONLY
  |  |  ------------------
  |  |  |  |   68|   130k|#define EVP_KDF_HKDF_MODE_EXPAND_ONLY 2
  |  |  ------------------
  ------------------
   44|   130k|    const char *mdname = EVP_MD_get0_name(md);
   45|   130k|    int ret;
   46|   130k|    size_t hashlen;
   47|       |
   48|   130k|    kctx = EVP_KDF_CTX_new(kdf);
   49|   130k|    EVP_KDF_free(kdf);
   50|   130k|    if (kctx == NULL)
  ------------------
  |  Branch (50:9): [True: 0, False: 130k]
  ------------------
   51|      0|        return 0;
   52|       |
   53|   130k|    if (labellen > TLS13_MAX_LABEL_LEN) {
  ------------------
  |  |   20|   130k|#define TLS13_MAX_LABEL_LEN 249
  ------------------
  |  Branch (53:9): [True: 0, False: 130k]
  ------------------
   54|      0|        if (raise_error)
  ------------------
  |  Branch (54:13): [True: 0, False: 0]
  ------------------
   55|       |            /*
   56|       |             * Probably we have been called from SSL_export_keying_material(),
   57|       |             * or SSL_export_keying_material_early().
   58|       |             */
   59|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_TLS_ILLEGAL_EXPORTER_LABEL);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   60|       |
   61|      0|        EVP_KDF_CTX_free(kctx);
   62|      0|        return 0;
   63|      0|    }
   64|       |
   65|   130k|    if ((ret = EVP_MD_get_size(md)) <= 0) {
  ------------------
  |  Branch (65:9): [True: 0, False: 130k]
  ------------------
   66|      0|        EVP_KDF_CTX_free(kctx);
   67|      0|        if (raise_error)
  ------------------
  |  Branch (67:13): [True: 0, False: 0]
  ------------------
   68|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   69|      0|        return 0;
   70|      0|    }
   71|   130k|    hashlen = (size_t)ret;
   72|       |
   73|   130k|    *p++ = OSSL_PARAM_construct_int(OSSL_KDF_PARAM_MODE, &mode);
  ------------------
  |  |  302|   130k|# define OSSL_KDF_PARAM_MODE "mode"
  ------------------
   74|   130k|    *p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_DIGEST,
  ------------------
  |  |  285|   130k|# define OSSL_KDF_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
  |  |  ------------------
  |  |  |  |  127|   130k|# define OSSL_ALG_PARAM_DIGEST "digest"
  |  |  ------------------
  ------------------
   75|   130k|        (char *)mdname, 0);
   76|   130k|    *p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_KEY,
  ------------------
  |  |  298|   130k|# define OSSL_KDF_PARAM_KEY "key"
  ------------------
   77|   130k|        (unsigned char *)secret, hashlen);
   78|   130k|    *p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_PREFIX,
  ------------------
  |  |  306|   130k|# define OSSL_KDF_PARAM_PREFIX "prefix"
  ------------------
   79|   130k|        (unsigned char *)label_prefix,
   80|   130k|        sizeof(label_prefix) - 1);
   81|   130k|    *p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_LABEL,
  ------------------
  |  |  299|   130k|# define OSSL_KDF_PARAM_LABEL "label"
  ------------------
   82|   130k|        (unsigned char *)label, labellen);
   83|   130k|    if (data != NULL)
  ------------------
  |  Branch (83:9): [True: 57.7k, False: 72.4k]
  ------------------
   84|  57.7k|        *p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_DATA,
  ------------------
  |  |  284|  57.7k|# define OSSL_KDF_PARAM_DATA "data"
  ------------------
   85|  57.7k|            (unsigned char *)data,
   86|  57.7k|            datalen);
   87|   130k|    if (propq != NULL)
  ------------------
  |  Branch (87:9): [True: 0, False: 130k]
  ------------------
   88|      0|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_PROPERTIES,
  ------------------
  |  |  307|      0|# define OSSL_KDF_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
  |  |  ------------------
  |  |  |  |  130|      0|# define OSSL_ALG_PARAM_PROPERTIES "properties"
  |  |  ------------------
  ------------------
   89|      0|            (char *)propq, 0);
   90|       |
   91|   130k|    *p++ = OSSL_PARAM_construct_end();
   92|       |
   93|   130k|    ret = EVP_KDF_derive(kctx, out, outlen, params) <= 0;
   94|   130k|    EVP_KDF_CTX_free(kctx);
   95|       |
   96|   130k|    if (ret != 0) {
  ------------------
  |  Branch (96:9): [True: 0, False: 130k]
  ------------------
   97|      0|        if (raise_error)
  ------------------
  |  Branch (97:13): [True: 0, False: 0]
  ------------------
   98|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   99|      0|    }
  100|       |
  101|   130k|    return ret == 0;
  102|   130k|}
tls13_hkdf_expand:
  109|   130k|{
  110|   130k|    int ret;
  111|   130k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|   130k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  112|       |
  113|   130k|    ret = tls13_hkdf_expand_ex(sctx->libctx, sctx->propq, md,
  114|   130k|        secret, label, labellen, data, datalen,
  115|   130k|        out, outlen, !fatal);
  116|   130k|    if (ret == 0 && fatal)
  ------------------
  |  Branch (116:9): [True: 0, False: 130k]
  |  Branch (116:21): [True: 0, False: 0]
  ------------------
  117|   130k|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  118|       |
  119|   130k|    return ret;
  120|   130k|}
tls13_derive_key:
  129|  28.9k|{
  130|       |    /* ASCII: "key", in hex for EBCDIC compatibility */
  131|  28.9k|    static const unsigned char keylabel[] = "\x6B\x65\x79";
  132|       |
  133|  28.9k|    return tls13_hkdf_expand(s, md, secret, keylabel, sizeof(keylabel) - 1,
  134|       |        NULL, 0, key, keylen, 1);
  135|  28.9k|}
tls13_derive_iv:
  144|  28.9k|{
  145|       |    /* ASCII: "iv", in hex for EBCDIC compatibility */
  146|  28.9k|    static const unsigned char ivlabel[] = "\x69\x76";
  147|       |
  148|  28.9k|    return tls13_hkdf_expand(s, md, secret, ivlabel, sizeof(ivlabel) - 1,
  149|       |        NULL, 0, iv, ivlen, 1);
  150|  28.9k|}
tls13_derive_finishedkey:
  155|  14.5k|{
  156|       |    /* ASCII: "finished", in hex for EBCDIC compatibility */
  157|  14.5k|    static const unsigned char finishedlabel[] = "\x66\x69\x6E\x69\x73\x68\x65\x64";
  158|       |
  159|  14.5k|    return tls13_hkdf_expand(s, md, secret, finishedlabel,
  160|       |        sizeof(finishedlabel) - 1, NULL, 0, fin, finlen, 1);
  161|  14.5k|}
tls13_generate_secret:
  173|  21.7k|{
  174|  21.7k|    size_t mdlen;
  175|  21.7k|    int mdleni;
  176|  21.7k|    int ret;
  177|  21.7k|    EVP_KDF *kdf;
  178|  21.7k|    EVP_KDF_CTX *kctx;
  179|  21.7k|    OSSL_PARAM params[7], *p = params;
  180|  21.7k|    int mode = EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY;
  ------------------
  |  |   97|  21.7k|    EVP_KDF_HKDF_MODE_EXTRACT_ONLY
  |  |  ------------------
  |  |  |  |   67|  21.7k|#define EVP_KDF_HKDF_MODE_EXTRACT_ONLY 1
  |  |  ------------------
  ------------------
  181|  21.7k|    const char *mdname = EVP_MD_get0_name(md);
  182|       |    /* ASCII: "derived", in hex for EBCDIC compatibility */
  183|  21.7k|    static const char derived_secret_label[] = "\x64\x65\x72\x69\x76\x65\x64";
  184|  21.7k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  21.7k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  185|       |
  186|  21.7k|    kdf = EVP_KDF_fetch(sctx->libctx, OSSL_KDF_NAME_TLS1_3_KDF, sctx->propq);
  ------------------
  |  |   73|  21.7k|#define OSSL_KDF_NAME_TLS1_3_KDF "TLS13-KDF"
  ------------------
  187|  21.7k|    kctx = EVP_KDF_CTX_new(kdf);
  188|  21.7k|    EVP_KDF_free(kdf);
  189|  21.7k|    if (kctx == NULL) {
  ------------------
  |  Branch (189:9): [True: 0, False: 21.7k]
  ------------------
  190|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  191|      0|        return 0;
  192|      0|    }
  193|       |
  194|  21.7k|    mdleni = EVP_MD_get_size(md);
  195|       |    /* Ensure cast to size_t is safe */
  196|  21.7k|    if (!ossl_assert(mdleni > 0)) {
  ------------------
  |  |   52|  21.7k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  21.7k|    __FILE__, __LINE__)
  ------------------
  |  Branch (196:9): [True: 0, False: 21.7k]
  ------------------
  197|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  198|      0|        EVP_KDF_CTX_free(kctx);
  199|      0|        return 0;
  200|      0|    }
  201|  21.7k|    mdlen = (size_t)mdleni;
  202|       |
  203|  21.7k|    *p++ = OSSL_PARAM_construct_int(OSSL_KDF_PARAM_MODE, &mode);
  ------------------
  |  |  302|  21.7k|# define OSSL_KDF_PARAM_MODE "mode"
  ------------------
  204|  21.7k|    *p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_DIGEST,
  ------------------
  |  |  285|  21.7k|# define OSSL_KDF_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
  |  |  ------------------
  |  |  |  |  127|  21.7k|# define OSSL_ALG_PARAM_DIGEST "digest"
  |  |  ------------------
  ------------------
  205|  21.7k|        (char *)mdname, 0);
  206|  21.7k|    if (insecret != NULL)
  ------------------
  |  Branch (206:9): [True: 7.25k, False: 14.5k]
  ------------------
  207|  7.25k|        *p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_KEY,
  ------------------
  |  |  298|  7.25k|# define OSSL_KDF_PARAM_KEY "key"
  ------------------
  208|  7.25k|            (unsigned char *)insecret,
  209|  7.25k|            insecretlen);
  210|  21.7k|    if (prevsecret != NULL)
  ------------------
  |  Branch (210:9): [True: 14.5k, False: 7.25k]
  ------------------
  211|  14.5k|        *p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_SALT,
  ------------------
  |  |  308|  14.5k|# define OSSL_KDF_PARAM_SALT "salt"
  ------------------
  212|  14.5k|            (unsigned char *)prevsecret, mdlen);
  213|  21.7k|    *p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_PREFIX,
  ------------------
  |  |  306|  21.7k|# define OSSL_KDF_PARAM_PREFIX "prefix"
  ------------------
  214|  21.7k|        (unsigned char *)label_prefix,
  215|  21.7k|        sizeof(label_prefix) - 1);
  216|  21.7k|    *p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_LABEL,
  ------------------
  |  |  299|  21.7k|# define OSSL_KDF_PARAM_LABEL "label"
  ------------------
  217|  21.7k|        (unsigned char *)derived_secret_label,
  218|  21.7k|        sizeof(derived_secret_label) - 1);
  219|  21.7k|    *p++ = OSSL_PARAM_construct_end();
  220|       |
  221|  21.7k|    ret = EVP_KDF_derive(kctx, outsecret, mdlen, params) <= 0;
  222|       |
  223|  21.7k|    if (ret != 0)
  ------------------
  |  Branch (223:9): [True: 0, False: 21.7k]
  ------------------
  224|  21.7k|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  225|       |
  226|  21.7k|    EVP_KDF_CTX_free(kctx);
  227|  21.7k|    return ret == 0;
  228|  21.7k|}
tls13_generate_handshake_secret:
  238|  7.25k|{
  239|       |    /* Calls SSLfatal() if required */
  240|  7.25k|    return tls13_generate_secret(s, ssl_handshake_md(s), s->early_secret,
  241|  7.25k|        insecret, insecretlen,
  242|  7.25k|        (unsigned char *)&s->handshake_secret);
  243|  7.25k|}
tls13_generate_master_secret:
  253|  7.25k|{
  254|  7.25k|    const EVP_MD *md = ssl_handshake_md(s);
  255|  7.25k|    int md_size;
  256|       |
  257|  7.25k|    md_size = EVP_MD_get_size(md);
  258|  7.25k|    if (md_size <= 0) {
  ------------------
  |  Branch (258:9): [True: 0, False: 7.25k]
  ------------------
  259|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  260|      0|        return 0;
  261|      0|    }
  262|  7.25k|    *secret_size = (size_t)md_size;
  263|       |    /* Calls SSLfatal() if required */
  264|       |    return tls13_generate_secret(s, md, prev, NULL, 0, out);
  265|  7.25k|}
tls13_final_finish_mac:
  273|  14.4k|{
  274|  14.4k|    const EVP_MD *md = ssl_handshake_md(s);
  275|  14.4k|    const char *mdname = EVP_MD_get0_name(md);
  276|  14.4k|    unsigned char hash[EVP_MAX_MD_SIZE];
  277|  14.4k|    unsigned char finsecret[EVP_MAX_MD_SIZE];
  278|  14.4k|    unsigned char *key = NULL;
  279|  14.4k|    size_t len = 0, hashlen;
  280|  14.4k|    OSSL_PARAM params[2], *p = params;
  281|  14.4k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  14.4k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  282|       |
  283|  14.4k|    if (md == NULL)
  ------------------
  |  Branch (283:9): [True: 0, False: 14.4k]
  ------------------
  284|      0|        return 0;
  285|       |
  286|       |    /* Safe to cast away const here since we're not "getting" any data */
  287|  14.4k|    if (sctx->propq != NULL)
  ------------------
  |  Branch (287:9): [True: 0, False: 14.4k]
  ------------------
  288|      0|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_ALG_PARAM_PROPERTIES,
  ------------------
  |  |  130|      0|# define OSSL_ALG_PARAM_PROPERTIES "properties"
  ------------------
  289|      0|            (char *)sctx->propq,
  290|      0|            0);
  291|  14.4k|    *p = OSSL_PARAM_construct_end();
  292|       |
  293|  14.4k|    if (!ssl_handshake_hash(s, hash, sizeof(hash), &hashlen)) {
  ------------------
  |  Branch (293:9): [True: 0, False: 14.4k]
  ------------------
  294|       |        /* SSLfatal() already called */
  295|      0|        goto err;
  296|      0|    }
  297|       |
  298|  14.4k|    if (str == SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->server_finished_label) {
  ------------------
  |  |   27|  14.4k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  |  Branch (298:9): [True: 7.25k, False: 7.21k]
  ------------------
  299|  7.25k|        key = s->server_finished_secret;
  300|  7.25k|    } else if (SSL_IS_FIRST_HANDSHAKE(s)) {
  ------------------
  |  |  285|  7.21k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (285:36): [True: 3.62k, False: 3.58k]
  |  |  ------------------
  |  |  286|  7.21k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (286:8): [True: 3.58k, False: 0]
  |  |  ------------------
  ------------------
  301|  7.21k|        key = s->client_finished_secret;
  302|  7.21k|    } else {
  303|      0|        if (!tls13_derive_finishedkey(s, md,
  ------------------
  |  Branch (303:13): [True: 0, False: 0]
  ------------------
  304|      0|                s->client_app_traffic_secret,
  305|      0|                finsecret, hashlen))
  306|      0|            goto err;
  307|      0|        key = finsecret;
  308|      0|    }
  309|       |
  310|  14.4k|    if (!EVP_Q_mac(sctx->libctx, "HMAC", sctx->propq, mdname,
  ------------------
  |  Branch (310:9): [True: 0, False: 14.4k]
  ------------------
  311|  14.4k|            params, key, hashlen, hash, hashlen,
  312|       |            /* outsize as per sizeof(peer_finish_md) */
  313|  14.4k|            out, EVP_MAX_MD_SIZE * 2, &len)) {
  ------------------
  |  |   34|  14.4k|#define EVP_MAX_MD_SIZE 64 /* longest known is SHA512 */
  ------------------
  314|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  315|      0|        goto err;
  316|      0|    }
  317|       |
  318|  14.4k|err:
  319|  14.4k|    OPENSSL_cleanse(finsecret, sizeof(finsecret));
  320|  14.4k|    return len;
  321|  14.4k|}
tls13_setup_key_block:
  328|  7.25k|{
  329|  7.25k|    const EVP_CIPHER *c;
  330|  7.25k|    const EVP_MD *hash;
  331|  7.25k|    int mac_type = NID_undef;
  ------------------
  |  |   18|  7.25k|#define NID_undef                       0
  ------------------
  332|  7.25k|    size_t mac_secret_size = 0;
  333|       |
  334|  7.25k|    s->session->cipher = s->s3.tmp.new_cipher;
  335|  7.25k|    if (!ssl_cipher_get_evp(SSL_CONNECTION_GET_CTX(s), s->session, &c, &hash,
  ------------------
  |  |   26|  7.25k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  |  Branch (335:9): [True: 0, False: 7.25k]
  ------------------
  336|  7.25k|            &mac_type, &mac_secret_size, NULL, 0)) {
  337|       |        /* Error is already recorded */
  338|      0|        SSLfatal_alert(s, SSL_AD_INTERNAL_ERROR);
  ------------------
  |  |  154|      0|#define SSLfatal_alert(s, al) ossl_statem_send_fatal((s), (al))
  ------------------
  339|      0|        return 0;
  340|      0|    }
  341|       |
  342|  7.25k|    ssl_evp_cipher_free(s->s3.tmp.new_sym_enc);
  343|  7.25k|    s->s3.tmp.new_sym_enc = c;
  344|  7.25k|    ssl_evp_md_free(s->s3.tmp.new_hash);
  345|  7.25k|    s->s3.tmp.new_hash = hash;
  346|  7.25k|    s->s3.tmp.new_mac_pkey_type = mac_type;
  347|  7.25k|    s->s3.tmp.new_mac_secret_size = mac_secret_size;
  348|       |
  349|  7.25k|    return 1;
  350|  7.25k|}
tls13_store_handshake_traffic_hash:
  467|  7.25k|{
  468|  7.25k|    return tls13_store_hash(s, s->handshake_traffic_hash,
  469|  7.25k|        sizeof(s->handshake_traffic_hash));
  470|  7.25k|}
tls13_store_server_finished_hash:
  473|  7.25k|{
  474|  7.25k|    return tls13_store_hash(s, s->server_finished_hash,
  475|  7.25k|        sizeof(s->server_finished_hash));
  476|  7.25k|}
tls13_change_cipher_state:
  479|  28.9k|{
  480|       |    /* ASCII: "c e traffic", in hex for EBCDIC compatibility */
  481|  28.9k|    static const unsigned char client_early_traffic[] = "\x63\x20\x65\x20\x74\x72\x61\x66\x66\x69\x63";
  482|       |    /* ASCII: "c hs traffic", in hex for EBCDIC compatibility */
  483|  28.9k|    static const unsigned char client_handshake_traffic[] = "\x63\x20\x68\x73\x20\x74\x72\x61\x66\x66\x69\x63";
  484|       |    /* ASCII: "c ap traffic", in hex for EBCDIC compatibility */
  485|  28.9k|    static const unsigned char client_application_traffic[] = "\x63\x20\x61\x70\x20\x74\x72\x61\x66\x66\x69\x63";
  486|       |    /* ASCII: "s hs traffic", in hex for EBCDIC compatibility */
  487|  28.9k|    static const unsigned char server_handshake_traffic[] = "\x73\x20\x68\x73\x20\x74\x72\x61\x66\x66\x69\x63";
  488|       |    /* ASCII: "s ap traffic", in hex for EBCDIC compatibility */
  489|  28.9k|    static const unsigned char server_application_traffic[] = "\x73\x20\x61\x70\x20\x74\x72\x61\x66\x66\x69\x63";
  490|       |    /* ASCII: "exp master", in hex for EBCDIC compatibility */
  491|  28.9k|    static const unsigned char exporter_master_secret[] = "\x65\x78\x70\x20\x6D\x61\x73\x74\x65\x72";
  492|       |    /* ASCII: "res master", in hex for EBCDIC compatibility */
  493|  28.9k|    static const unsigned char resumption_master_secret[] = "\x72\x65\x73\x20\x6D\x61\x73\x74\x65\x72";
  494|       |    /* ASCII: "e exp master", in hex for EBCDIC compatibility */
  495|  28.9k|    static const unsigned char early_exporter_master_secret[] = "\x65\x20\x65\x78\x70\x20\x6D\x61\x73\x74\x65\x72";
  496|  28.9k|    unsigned char iv_intern[EVP_MAX_IV_LENGTH];
  497|  28.9k|    unsigned char *iv = iv_intern;
  498|  28.9k|    unsigned char key[EVP_MAX_KEY_LENGTH];
  499|  28.9k|    unsigned char secret[EVP_MAX_MD_SIZE];
  500|  28.9k|    unsigned char hashval[EVP_MAX_MD_SIZE];
  501|  28.9k|    unsigned char *hash = hashval;
  502|  28.9k|    unsigned char *insecret;
  503|  28.9k|    unsigned char *finsecret = NULL;
  504|  28.9k|    const char *log_label = NULL;
  505|  28.9k|    int finsecretlen = 0;
  506|  28.9k|    const unsigned char *label;
  507|  28.9k|    size_t labellen, hashlen = 0;
  508|  28.9k|    int ret = 0;
  509|  28.9k|    const EVP_MD *md = NULL, *mac_md = NULL;
  510|  28.9k|    const EVP_CIPHER *cipher = NULL;
  511|  28.9k|    int mac_pkey_type = NID_undef;
  ------------------
  |  |   18|  28.9k|#define NID_undef                       0
  ------------------
  512|  28.9k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  28.9k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  513|  28.9k|    size_t keylen, ivlen = EVP_MAX_IV_LENGTH, taglen;
  ------------------
  |  |   36|  28.9k|#define EVP_MAX_IV_LENGTH 16
  ------------------
  514|  28.9k|    int level;
  515|  28.9k|    int direction = (which & SSL3_CC_READ) != 0 ? OSSL_RECORD_DIRECTION_READ
  ------------------
  |  |  342|  28.9k|#define SSL3_CC_READ 0x001
  ------------------
                  int direction = (which & SSL3_CC_READ) != 0 ? OSSL_RECORD_DIRECTION_READ
  ------------------
  |  |   42|  14.4k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (515:21): [True: 14.4k, False: 14.5k]
  ------------------
  516|  28.9k|                                                : OSSL_RECORD_DIRECTION_WRITE;
  ------------------
  |  |   43|  14.5k|#define OSSL_RECORD_DIRECTION_WRITE 1
  ------------------
  517|       |
  518|  28.9k|    if (((which & SSL3_CC_CLIENT) && (which & SSL3_CC_WRITE))
  ------------------
  |  |  344|  28.9k|#define SSL3_CC_CLIENT 0x010
  ------------------
                  if (((which & SSL3_CC_CLIENT) && (which & SSL3_CC_WRITE))
  ------------------
  |  |  343|  14.5k|#define SSL3_CC_WRITE 0x002
  ------------------
  |  Branch (518:10): [True: 14.5k, False: 14.4k]
  |  Branch (518:38): [True: 7.25k, False: 7.25k]
  ------------------
  519|  21.7k|        || ((which & SSL3_CC_SERVER) && (which & SSL3_CC_READ))) {
  ------------------
  |  |  345|  21.7k|#define SSL3_CC_SERVER 0x020
  ------------------
                      || ((which & SSL3_CC_SERVER) && (which & SSL3_CC_READ))) {
  ------------------
  |  |  342|  14.4k|#define SSL3_CC_READ 0x001
  ------------------
  |  Branch (519:13): [True: 14.4k, False: 7.25k]
  |  Branch (519:41): [True: 7.21k, False: 7.25k]
  ------------------
  520|  14.4k|        if ((which & SSL3_CC_EARLY) != 0) {
  ------------------
  |  |  346|  14.4k|#define SSL3_CC_EARLY 0x040
  ------------------
  |  Branch (520:13): [True: 0, False: 14.4k]
  ------------------
  521|      0|            EVP_MD_CTX *mdctx = NULL;
  522|      0|            long handlen;
  523|      0|            void *hdata;
  524|      0|            unsigned int hashlenui;
  525|      0|            const SSL_CIPHER *sslcipher = SSL_SESSION_get0_cipher(s->session);
  526|       |
  527|      0|            insecret = s->early_secret;
  528|      0|            label = client_early_traffic;
  529|      0|            labellen = sizeof(client_early_traffic) - 1;
  530|      0|            log_label = CLIENT_EARLY_LABEL;
  ------------------
  |  | 2842|      0|#define CLIENT_EARLY_LABEL "CLIENT_EARLY_TRAFFIC_SECRET"
  ------------------
  531|       |
  532|      0|#ifndef OPENSSL_NO_ECH
  533|       |            /* if ECH worked then use the innerch and not the h/s buffer here */
  534|      0|            if (((which & SSL3_CC_SERVER) && s->ext.ech.success == 1)
  ------------------
  |  |  345|      0|#define SSL3_CC_SERVER 0x020
  ------------------
  |  Branch (534:18): [True: 0, False: 0]
  |  Branch (534:46): [True: 0, False: 0]
  ------------------
  535|      0|                || ((which & SSL3_CC_CLIENT) && s->ext.ech.attempted == 1)) {
  ------------------
  |  |  344|      0|#define SSL3_CC_CLIENT 0x010
  ------------------
  |  Branch (535:21): [True: 0, False: 0]
  |  Branch (535:49): [True: 0, False: 0]
  ------------------
  536|      0|                if (s->ext.ech.innerch == NULL) {
  ------------------
  |  Branch (536:21): [True: 0, False: 0]
  ------------------
  537|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  538|      0|                    goto err;
  539|      0|                }
  540|      0|                handlen = (long)s->ext.ech.innerch_len;
  541|      0|                hdata = s->ext.ech.innerch;
  542|      0|            } else
  543|      0|#endif
  544|      0|            {
  545|      0|                handlen = BIO_get_mem_data(s->s3.handshake_buffer, &hdata);
  ------------------
  |  |  625|      0|#define BIO_get_mem_data(b, pp) BIO_ctrl(b, BIO_CTRL_INFO, 0, (char *)(pp))
  |  |  ------------------
  |  |  |  |   92|      0|#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
  |  |  ------------------
  ------------------
  546|      0|                if (handlen <= 0) {
  ------------------
  |  Branch (546:21): [True: 0, False: 0]
  ------------------
  547|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  548|      0|                        SSL_R_BAD_HANDSHAKE_LENGTH);
  549|      0|                    goto err;
  550|      0|                }
  551|      0|            }
  552|       |
  553|      0|            if (s->early_data_state == SSL_EARLY_DATA_CONNECTING
  ------------------
  |  Branch (553:17): [True: 0, False: 0]
  ------------------
  554|      0|                && s->max_early_data > 0
  ------------------
  |  Branch (554:20): [True: 0, False: 0]
  ------------------
  555|      0|                && s->session->ext.max_early_data == 0) {
  ------------------
  |  Branch (555:20): [True: 0, False: 0]
  ------------------
  556|       |                /*
  557|       |                 * If we are attempting to send early data, and we've decided to
  558|       |                 * actually do it but max_early_data in s->session is 0 then we
  559|       |                 * must be using an external PSK.
  560|       |                 */
  561|      0|                if (!ossl_assert(s->psksession != NULL
  ------------------
  |  |   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 (561:21): [True: 0, False: 0]
  ------------------
  562|      0|                        && s->max_early_data == s->psksession->ext.max_early_data)) {
  563|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  564|      0|                    goto err;
  565|      0|                }
  566|      0|                sslcipher = SSL_SESSION_get0_cipher(s->psksession);
  567|      0|            }
  568|      0|            if (sslcipher == NULL) {
  ------------------
  |  Branch (568:17): [True: 0, False: 0]
  ------------------
  569|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_PSK);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  570|      0|                goto err;
  571|      0|            }
  572|       |
  573|       |            /*
  574|       |             * This ups the ref count on cipher so we better make sure we free
  575|       |             * it again
  576|       |             */
  577|      0|            if (!ssl_cipher_get_evp_cipher(sctx, sslcipher, &cipher)) {
  ------------------
  |  Branch (577:17): [True: 0, False: 0]
  ------------------
  578|       |                /* Error is already recorded */
  579|      0|                SSLfatal_alert(s, SSL_AD_INTERNAL_ERROR);
  ------------------
  |  |  154|      0|#define SSLfatal_alert(s, al) ossl_statem_send_fatal((s), (al))
  ------------------
  580|      0|                goto err;
  581|      0|            }
  582|       |
  583|      0|            if (((EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) == 0)
  ------------------
  |  |  518|      0|#define EVP_CIPHER_flags EVP_CIPHER_get_flags
  ------------------
                          if (((EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) == 0)
  ------------------
  |  |  256|      0|#define EVP_CIPH_FLAG_AEAD_CIPHER 0x200000
  ------------------
  |  Branch (583:17): [True: 0, False: 0]
  ------------------
  584|      0|                && (!ssl_cipher_get_evp_md_mac(sctx, sslcipher, &mac_md,
  ------------------
  |  Branch (584:20): [True: 0, False: 0]
  ------------------
  585|      0|                    &mac_pkey_type, NULL))) {
  586|      0|                SSLfatal_alert(s, SSL_AD_INTERNAL_ERROR);
  ------------------
  |  |  154|      0|#define SSLfatal_alert(s, al) ossl_statem_send_fatal((s), (al))
  ------------------
  587|      0|                goto err;
  588|      0|            }
  589|       |
  590|       |            /*
  591|       |             * We need to calculate the handshake digest using the digest from
  592|       |             * the session. We haven't yet selected our ciphersuite so we can't
  593|       |             * use ssl_handshake_md().
  594|       |             */
  595|      0|            mdctx = EVP_MD_CTX_new();
  596|      0|            if (mdctx == NULL) {
  ------------------
  |  Branch (596:17): [True: 0, False: 0]
  ------------------
  597|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  598|      0|                goto err;
  599|      0|            }
  600|       |
  601|      0|            md = ssl_md(sctx, sslcipher->algorithm2);
  602|      0|            if (md == NULL || !EVP_DigestInit_ex(mdctx, md, NULL)
  ------------------
  |  Branch (602:17): [True: 0, False: 0]
  |  Branch (602:31): [True: 0, False: 0]
  ------------------
  603|      0|                || !EVP_DigestUpdate(mdctx, hdata, handlen)
  ------------------
  |  Branch (603:20): [True: 0, False: 0]
  ------------------
  604|      0|                || !EVP_DigestFinal_ex(mdctx, hashval, &hashlenui)) {
  ------------------
  |  Branch (604:20): [True: 0, False: 0]
  ------------------
  605|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  606|      0|                EVP_MD_CTX_free(mdctx);
  607|      0|                goto err;
  608|      0|            }
  609|      0|            hashlen = hashlenui;
  610|      0|            EVP_MD_CTX_free(mdctx);
  611|       |
  612|      0|            if (!tls13_hkdf_expand(s, md, insecret,
  ------------------
  |  Branch (612:17): [True: 0, False: 0]
  ------------------
  613|      0|                    early_exporter_master_secret,
  614|      0|                    sizeof(early_exporter_master_secret) - 1,
  615|      0|                    hashval, hashlen,
  616|      0|                    s->early_exporter_master_secret, hashlen,
  617|      0|                    1)) {
  618|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  619|      0|                goto err;
  620|      0|            }
  621|       |
  622|      0|            if (!ssl_log_secret(s, EARLY_EXPORTER_SECRET_LABEL,
  ------------------
  |  | 2849|      0|#define EARLY_EXPORTER_SECRET_LABEL "EARLY_EXPORTER_SECRET"
  ------------------
  |  Branch (622:17): [True: 0, False: 0]
  ------------------
  623|      0|                    s->early_exporter_master_secret, hashlen)) {
  624|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  625|      0|                goto err;
  626|      0|            }
  627|  14.4k|        } else if (which & SSL3_CC_HANDSHAKE) {
  ------------------
  |  |  347|  14.4k|#define SSL3_CC_HANDSHAKE 0x080
  ------------------
  |  Branch (627:20): [True: 7.25k, False: 7.21k]
  ------------------
  628|  7.25k|            insecret = s->handshake_secret;
  629|  7.25k|            finsecret = s->client_finished_secret;
  630|  7.25k|            finsecretlen = EVP_MD_get_size(ssl_handshake_md(s));
  631|  7.25k|            if (finsecretlen <= 0) {
  ------------------
  |  Branch (631:17): [True: 0, False: 7.25k]
  ------------------
  632|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  633|      0|                goto err;
  634|      0|            }
  635|  7.25k|            label = client_handshake_traffic;
  636|  7.25k|            labellen = sizeof(client_handshake_traffic) - 1;
  637|  7.25k|            log_label = CLIENT_HANDSHAKE_LABEL;
  ------------------
  |  | 2843|  7.25k|#define CLIENT_HANDSHAKE_LABEL "CLIENT_HANDSHAKE_TRAFFIC_SECRET"
  ------------------
  638|       |            /*
  639|       |             * The handshake hash used for the server read/client write handshake
  640|       |             * traffic secret is the same as the hash for the server
  641|       |             * write/client read handshake traffic secret. However, if we
  642|       |             * processed early data then we delay changing the server
  643|       |             * read/client write cipher state until later, and the handshake
  644|       |             * hashes have moved on. Therefore we use the value saved earlier
  645|       |             * when we did the server write/client read change cipher state.
  646|       |             */
  647|  7.25k|            hash = s->handshake_traffic_hash;
  648|  7.25k|        } else {
  649|  7.21k|            insecret = s->master_secret;
  650|  7.21k|            label = client_application_traffic;
  651|  7.21k|            labellen = sizeof(client_application_traffic) - 1;
  652|  7.21k|            log_label = CLIENT_APPLICATION_LABEL;
  ------------------
  |  | 2845|  7.21k|#define CLIENT_APPLICATION_LABEL "CLIENT_TRAFFIC_SECRET_0"
  ------------------
  653|       |            /*
  654|       |             * For this we only use the handshake hashes up until the server
  655|       |             * Finished hash. We do not include the client's Finished, which is
  656|       |             * what ssl_handshake_hash() would give us. Instead we use the
  657|       |             * previously saved value.
  658|       |             */
  659|  7.21k|            hash = s->server_finished_hash;
  660|  7.21k|        }
  661|  14.5k|    } else {
  662|       |        /* Early data never applies to client-read/server-write */
  663|  14.5k|        if (which & SSL3_CC_HANDSHAKE) {
  ------------------
  |  |  347|  14.5k|#define SSL3_CC_HANDSHAKE 0x080
  ------------------
  |  Branch (663:13): [True: 7.25k, False: 7.25k]
  ------------------
  664|  7.25k|            insecret = s->handshake_secret;
  665|  7.25k|            finsecret = s->server_finished_secret;
  666|  7.25k|            finsecretlen = EVP_MD_get_size(ssl_handshake_md(s));
  667|  7.25k|            if (finsecretlen <= 0) {
  ------------------
  |  Branch (667:17): [True: 0, False: 7.25k]
  ------------------
  668|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  669|      0|                goto err;
  670|      0|            }
  671|  7.25k|            label = server_handshake_traffic;
  672|  7.25k|            labellen = sizeof(server_handshake_traffic) - 1;
  673|  7.25k|            log_label = SERVER_HANDSHAKE_LABEL;
  ------------------
  |  | 2844|  7.25k|#define SERVER_HANDSHAKE_LABEL "SERVER_HANDSHAKE_TRAFFIC_SECRET"
  ------------------
  674|  7.25k|        } else {
  675|  7.25k|            insecret = s->master_secret;
  676|  7.25k|            label = server_application_traffic;
  677|  7.25k|            labellen = sizeof(server_application_traffic) - 1;
  678|  7.25k|            log_label = SERVER_APPLICATION_LABEL;
  ------------------
  |  | 2847|  7.25k|#define SERVER_APPLICATION_LABEL "SERVER_TRAFFIC_SECRET_0"
  ------------------
  679|  7.25k|            hash = s->server_finished_hash;
  680|  7.25k|        }
  681|  14.5k|    }
  682|       |
  683|  28.9k|    if ((which & SSL3_CC_EARLY) == 0) {
  ------------------
  |  |  346|  28.9k|#define SSL3_CC_EARLY 0x040
  ------------------
  |  Branch (683:9): [True: 28.9k, False: 0]
  ------------------
  684|  28.9k|        md = ssl_handshake_md(s);
  685|  28.9k|        cipher = s->s3.tmp.new_sym_enc;
  686|  28.9k|        mac_md = s->s3.tmp.new_hash;
  687|  28.9k|        mac_pkey_type = s->s3.tmp.new_mac_pkey_type;
  688|  28.9k|        if (!ssl3_digest_cached_records(s, 1)
  ------------------
  |  Branch (688:13): [True: 0, False: 28.9k]
  ------------------
  689|  28.9k|            || !ssl_handshake_hash(s, hashval, sizeof(hashval), &hashlen)) {
  ------------------
  |  Branch (689:16): [True: 0, False: 28.9k]
  ------------------
  690|      0|            /* SSLfatal() already called */;
  691|      0|            goto err;
  692|      0|        }
  693|  28.9k|    }
  694|       |
  695|  28.9k|    if (label == client_application_traffic) {
  ------------------
  |  Branch (695:9): [True: 7.21k, False: 21.7k]
  ------------------
  696|       |        /*
  697|       |         * We also create the resumption master secret, but this time use the
  698|       |         * hash for the whole handshake including the Client Finished
  699|       |         */
  700|  7.21k|        if (!tls13_hkdf_expand(s, ssl_handshake_md(s), insecret,
  ------------------
  |  Branch (700:13): [True: 0, False: 7.21k]
  ------------------
  701|  7.21k|                resumption_master_secret,
  702|  7.21k|                sizeof(resumption_master_secret) - 1,
  703|  7.21k|                hashval, hashlen, s->resumption_master_secret,
  704|  7.21k|                hashlen, 1)) {
  705|       |            /* SSLfatal() already called */
  706|      0|            goto err;
  707|      0|        }
  708|  7.21k|    }
  709|       |
  710|       |    /* check whether cipher is known */
  711|  28.9k|    if (!ossl_assert(cipher != NULL))
  ------------------
  |  |   52|  28.9k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  28.9k|    __FILE__, __LINE__)
  ------------------
  |  Branch (711:9): [True: 0, False: 28.9k]
  ------------------
  712|      0|        goto err;
  713|       |
  714|  28.9k|    if (!derive_secret_key_and_iv(s, md, cipher, mac_pkey_type, mac_md,
  ------------------
  |  Branch (714:9): [True: 0, False: 28.9k]
  ------------------
  715|  28.9k|            insecret, hash, label, labellen, secret, key,
  716|  28.9k|            &keylen, &iv, &ivlen, &taglen)) {
  717|       |        /* SSLfatal() already called */
  718|      0|        goto err;
  719|      0|    }
  720|       |
  721|  28.9k|    if (label == server_application_traffic) {
  ------------------
  |  Branch (721:9): [True: 7.25k, False: 21.7k]
  ------------------
  722|  7.25k|        memcpy(s->server_app_traffic_secret, secret, hashlen);
  723|       |        /* Now we create the exporter master secret */
  724|  7.25k|        if (!tls13_hkdf_expand(s, ssl_handshake_md(s), insecret,
  ------------------
  |  Branch (724:13): [True: 0, False: 7.25k]
  ------------------
  725|  7.25k|                exporter_master_secret,
  726|  7.25k|                sizeof(exporter_master_secret) - 1,
  727|  7.25k|                hash, hashlen, s->exporter_master_secret,
  728|  7.25k|                hashlen, 1)) {
  729|       |            /* SSLfatal() already called */
  730|      0|            goto err;
  731|      0|        }
  732|       |
  733|  7.25k|        if (!ssl_log_secret(s, EXPORTER_SECRET_LABEL, s->exporter_master_secret,
  ------------------
  |  | 2850|  7.25k|#define EXPORTER_SECRET_LABEL "EXPORTER_SECRET"
  ------------------
  |  Branch (733:13): [True: 0, False: 7.25k]
  ------------------
  734|  7.25k|                hashlen)) {
  735|       |            /* SSLfatal() already called */
  736|      0|            goto err;
  737|      0|        }
  738|  21.7k|    } else if (label == client_application_traffic)
  ------------------
  |  Branch (738:16): [True: 7.21k, False: 14.5k]
  ------------------
  739|  7.21k|        memcpy(s->client_app_traffic_secret, secret, hashlen);
  740|       |
  741|  28.9k|    if (!ssl_log_secret(s, log_label, secret, hashlen)) {
  ------------------
  |  Branch (741:9): [True: 0, False: 28.9k]
  ------------------
  742|       |        /* SSLfatal() already called */
  743|      0|        goto err;
  744|      0|    }
  745|       |
  746|  28.9k|    if (finsecret != NULL
  ------------------
  |  Branch (746:9): [True: 14.5k, False: 14.4k]
  ------------------
  747|  14.5k|        && !tls13_derive_finishedkey(s, ssl_handshake_md(s), secret,
  ------------------
  |  Branch (747:12): [True: 0, False: 14.5k]
  ------------------
  748|  14.5k|            finsecret, (size_t)finsecretlen)) {
  749|       |        /* SSLfatal() already called */
  750|      0|        goto err;
  751|      0|    }
  752|       |
  753|  28.9k|    if ((which & SSL3_CC_WRITE) != 0) {
  ------------------
  |  |  343|  28.9k|#define SSL3_CC_WRITE 0x002
  ------------------
  |  Branch (753:9): [True: 14.5k, False: 14.4k]
  ------------------
  754|  14.5k|        if (!s->server && label == client_early_traffic)
  ------------------
  |  Branch (754:13): [True: 7.25k, False: 7.25k]
  |  Branch (754:27): [True: 0, False: 7.25k]
  ------------------
  755|      0|            s->rlayer.wrlmethod->set_plain_alerts(s->rlayer.wrl, 1);
  756|  14.5k|        else
  757|  14.5k|            s->rlayer.wrlmethod->set_plain_alerts(s->rlayer.wrl, 0);
  758|  14.5k|    }
  759|       |
  760|  28.9k|    level = (which & SSL3_CC_EARLY) != 0
  ------------------
  |  |  346|  28.9k|#define SSL3_CC_EARLY 0x040
  ------------------
  |  Branch (760:13): [True: 0, False: 28.9k]
  ------------------
  761|  28.9k|        ? OSSL_RECORD_PROTECTION_LEVEL_EARLY
  ------------------
  |  | 2929|      0|#define OSSL_RECORD_PROTECTION_LEVEL_EARLY 1
  ------------------
  762|  28.9k|        : ((which & SSL3_CC_HANDSHAKE) != 0
  ------------------
  |  |  347|  28.9k|#define SSL3_CC_HANDSHAKE 0x080
  ------------------
  |  Branch (762:12): [True: 14.5k, False: 14.4k]
  ------------------
  763|  28.9k|                  ? OSSL_RECORD_PROTECTION_LEVEL_HANDSHAKE
  ------------------
  |  | 2930|  14.5k|#define OSSL_RECORD_PROTECTION_LEVEL_HANDSHAKE 2
  ------------------
  764|  28.9k|                  : OSSL_RECORD_PROTECTION_LEVEL_APPLICATION);
  ------------------
  |  | 2931|  14.4k|#define OSSL_RECORD_PROTECTION_LEVEL_APPLICATION 3
  ------------------
  765|       |
  766|  28.9k|    if (!ssl_set_new_record_layer(s, s->version,
  ------------------
  |  Branch (766:9): [True: 0, False: 28.9k]
  ------------------
  767|  28.9k|            direction,
  768|  28.9k|            level, secret, hashlen, key, keylen, iv,
  769|  28.9k|            ivlen, NULL, 0, cipher, taglen,
  770|  28.9k|            mac_pkey_type, mac_md, NULL, md)) {
  771|       |        /* SSLfatal already called */
  772|      0|        goto err;
  773|      0|    }
  774|       |
  775|  28.9k|    ret = 1;
  776|  28.9k|err:
  777|  28.9k|    if ((which & SSL3_CC_EARLY) != 0) {
  ------------------
  |  |  346|  28.9k|#define SSL3_CC_EARLY 0x040
  ------------------
  |  Branch (777:9): [True: 0, False: 28.9k]
  ------------------
  778|       |        /* We up-refed this so now we need to down ref */
  779|      0|        if ((EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) == 0)
  ------------------
  |  |  518|      0|#define EVP_CIPHER_flags EVP_CIPHER_get_flags
  ------------------
                      if ((EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) == 0)
  ------------------
  |  |  256|      0|#define EVP_CIPH_FLAG_AEAD_CIPHER 0x200000
  ------------------
  |  Branch (779:13): [True: 0, False: 0]
  ------------------
  780|      0|            ssl_evp_md_free(mac_md);
  781|      0|        ssl_evp_cipher_free(cipher);
  782|      0|    }
  783|  28.9k|    OPENSSL_cleanse(key, sizeof(key));
  784|  28.9k|    OPENSSL_cleanse(secret, sizeof(secret));
  785|  28.9k|    if (iv != iv_intern)
  ------------------
  |  Branch (785:9): [True: 0, False: 28.9k]
  ------------------
  786|      0|        OPENSSL_free(iv);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  787|  28.9k|    return ret;
  788|  28.9k|}
tls13_alert_code:
  857|  6.48k|{
  858|       |    /* There are 2 additional alerts in TLSv1.3 compared to TLSv1.2 */
  859|  6.48k|    if (code == SSL_AD_MISSING_EXTENSION || code == SSL_AD_CERTIFICATE_REQUIRED)
  ------------------
  |  | 1269|  6.48k|#define SSL_AD_MISSING_EXTENSION TLS13_AD_MISSING_EXTENSION
  |  |  ------------------
  |  |  |  |   71|  12.9k|#define TLS13_AD_MISSING_EXTENSION 109 /* fatal */
  |  |  ------------------
  ------------------
                  if (code == SSL_AD_MISSING_EXTENSION || code == SSL_AD_CERTIFICATE_REQUIRED)
  ------------------
  |  | 1270|  6.48k|#define SSL_AD_CERTIFICATE_REQUIRED TLS13_AD_CERTIFICATE_REQUIRED
  |  |  ------------------
  |  |  |  |   72|  6.48k|#define TLS13_AD_CERTIFICATE_REQUIRED 116 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 0, False: 6.48k]
  |  Branch (859:45): [True: 0, False: 6.48k]
  ------------------
  860|      0|        return code;
  861|       |
  862|  6.48k|    return tls1_alert_code(code);
  863|  6.48k|}
tls13_enc.c:tls13_store_hash:
  454|  14.5k|{
  455|  14.5k|    size_t hashlen;
  456|       |
  457|  14.5k|    if (!ssl3_digest_cached_records(s, 1)
  ------------------
  |  Branch (457:9): [True: 0, False: 14.5k]
  ------------------
  458|  14.5k|        || !ssl_handshake_hash(s, hash, len, &hashlen)) {
  ------------------
  |  Branch (458:12): [True: 0, False: 14.5k]
  ------------------
  459|      0|        /* SSLfatal() already called */;
  460|      0|        return 0;
  461|      0|    }
  462|       |
  463|  14.5k|    return 1;
  464|  14.5k|}
tls13_enc.c:derive_secret_key_and_iv:
  363|  28.9k|{
  364|  28.9k|    int hashleni = EVP_MD_get_size(md);
  365|  28.9k|    size_t hashlen;
  366|  28.9k|    int mode, mac_mdleni;
  367|       |
  368|       |    /* Ensure cast to size_t is safe */
  369|  28.9k|    if (!ossl_assert(hashleni > 0)) {
  ------------------
  |  |   52|  28.9k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  28.9k|    __FILE__, __LINE__)
  ------------------
  |  Branch (369:9): [True: 0, False: 28.9k]
  ------------------
  370|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  371|      0|        return 0;
  372|      0|    }
  373|  28.9k|    hashlen = (size_t)hashleni;
  374|       |
  375|  28.9k|    if (!tls13_hkdf_expand(s, md, insecret, label, labellen, hash, hashlen,
  ------------------
  |  Branch (375:9): [True: 0, False: 28.9k]
  ------------------
  376|  28.9k|            secret, hashlen, 1)) {
  377|       |        /* SSLfatal() already called */
  378|      0|        return 0;
  379|      0|    }
  380|       |
  381|       |    /* if ciph is NULL cipher, then use new_hash to calculate keylen */
  382|  28.9k|    if (EVP_CIPHER_is_a(ciph, "NULL")
  ------------------
  |  Branch (382:9): [True: 0, False: 28.9k]
  ------------------
  383|      0|        && mac_md != NULL
  ------------------
  |  Branch (383:12): [True: 0, False: 0]
  ------------------
  384|      0|        && mac_type == NID_hmac) {
  ------------------
  |  | 5446|      0|#define NID_hmac                855
  ------------------
  |  Branch (384:12): [True: 0, False: 0]
  ------------------
  385|      0|        mac_mdleni = EVP_MD_get_size(mac_md);
  386|       |
  387|      0|        if (mac_mdleni <= 0) {
  ------------------
  |  Branch (387:13): [True: 0, False: 0]
  ------------------
  388|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  389|      0|            return 0;
  390|      0|        }
  391|      0|        *ivlen = *taglen = (size_t)mac_mdleni;
  392|      0|        *keylen = s->s3.tmp.new_mac_secret_size;
  393|  28.9k|    } else {
  394|       |
  395|  28.9k|        *keylen = EVP_CIPHER_get_key_length(ciph);
  396|       |
  397|  28.9k|        mode = EVP_CIPHER_get_mode(ciph);
  398|  28.9k|        if (mode == EVP_CIPH_CCM_MODE) {
  ------------------
  |  |  216|  28.9k|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
  |  Branch (398:13): [True: 0, False: 28.9k]
  ------------------
  399|      0|            uint32_t algenc;
  400|       |
  401|      0|            *ivlen = EVP_CCM_TLS_IV_LEN;
  ------------------
  |  |  383|      0|#define EVP_CCM_TLS_IV_LEN 12
  ------------------
  402|      0|            if (s->s3.tmp.new_cipher != NULL) {
  ------------------
  |  Branch (402:17): [True: 0, False: 0]
  ------------------
  403|      0|                algenc = s->s3.tmp.new_cipher->algorithm_enc;
  404|      0|            } else if (s->session->cipher != NULL) {
  ------------------
  |  Branch (404:24): [True: 0, False: 0]
  ------------------
  405|       |                /* We've not selected a cipher yet - we must be doing early data */
  406|      0|                algenc = s->session->cipher->algorithm_enc;
  407|      0|            } else if (s->psksession != NULL && s->psksession->cipher != NULL) {
  ------------------
  |  Branch (407:24): [True: 0, False: 0]
  |  Branch (407:49): [True: 0, False: 0]
  ------------------
  408|       |                /* We must be doing early data with out-of-band PSK */
  409|      0|                algenc = s->psksession->cipher->algorithm_enc;
  410|      0|            } else {
  411|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  412|      0|                return 0;
  413|      0|            }
  414|      0|            if (algenc & (SSL_AES128CCM8 | SSL_AES256CCM8))
  ------------------
  |  |  150|      0|#define SSL_AES128CCM8 0x00010000U
  ------------------
                          if (algenc & (SSL_AES128CCM8 | SSL_AES256CCM8))
  ------------------
  |  |  151|      0|#define SSL_AES256CCM8 0x00020000U
  ------------------
  |  Branch (414:17): [True: 0, False: 0]
  ------------------
  415|      0|                *taglen = EVP_CCM8_TLS_TAG_LEN;
  ------------------
  |  |  387|      0|#define EVP_CCM8_TLS_TAG_LEN 8
  ------------------
  416|      0|            else
  417|      0|                *taglen = EVP_CCM_TLS_TAG_LEN;
  ------------------
  |  |  385|      0|#define EVP_CCM_TLS_TAG_LEN 16
  ------------------
  418|  28.9k|        } else {
  419|  28.9k|            int iivlen;
  420|       |
  421|  28.9k|            if (mode == EVP_CIPH_GCM_MODE) {
  ------------------
  |  |  215|  28.9k|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
  |  Branch (421:17): [True: 28.9k, False: 0]
  ------------------
  422|  28.9k|                *taglen = EVP_GCM_TLS_TAG_LEN;
  ------------------
  |  |  375|  28.9k|#define EVP_GCM_TLS_TAG_LEN 16
  ------------------
  423|  28.9k|            } else {
  424|       |                /* CHACHA20P-POLY1305 */
  425|      0|                *taglen = EVP_CHACHAPOLY_TLS_TAG_LEN;
  ------------------
  |  |  390|      0|#define EVP_CHACHAPOLY_TLS_TAG_LEN 16
  ------------------
  426|      0|            }
  427|  28.9k|            iivlen = EVP_CIPHER_get_iv_length(ciph);
  428|  28.9k|            if (iivlen < 0) {
  ------------------
  |  Branch (428:17): [True: 0, False: 28.9k]
  ------------------
  429|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  430|      0|                return 0;
  431|      0|            }
  432|  28.9k|            *ivlen = iivlen;
  433|  28.9k|        }
  434|  28.9k|    }
  435|       |
  436|  28.9k|    if (*ivlen > EVP_MAX_IV_LENGTH) {
  ------------------
  |  |   36|  28.9k|#define EVP_MAX_IV_LENGTH 16
  ------------------
  |  Branch (436:9): [True: 0, False: 28.9k]
  ------------------
  437|      0|        *iv = OPENSSL_malloc(*ivlen);
  ------------------
  |  |  107|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  438|      0|        if (*iv == NULL) {
  ------------------
  |  Branch (438:13): [True: 0, False: 0]
  ------------------
  439|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_MALLOC_FAILURE);
  ------------------
  |  |  155|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  157|      0|    (ERR_new(),                                                  \
  |  |  |  |  158|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  159|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  440|      0|            return 0;
  441|      0|        }
  442|      0|    }
  443|       |
  444|  28.9k|    if (!tls13_derive_key(s, md, secret, key, *keylen)
  ------------------
  |  Branch (444:9): [True: 0, False: 28.9k]
  ------------------
  445|  28.9k|        || !tls13_derive_iv(s, md, secret, *iv, *ivlen)) {
  ------------------
  |  Branch (445:12): [True: 0, False: 28.9k]
  ------------------
  446|       |        /* SSLfatal() already called */
  447|      0|        return 0;
  448|      0|    }
  449|       |
  450|  28.9k|    return 1;
  451|  28.9k|}

ssl_hmac_old_free:
   35|  7.16k|{
   36|  7.16k|    HMAC_CTX_free(ctx->old_ctx);
   37|  7.16k|}

ssl_ctx_srp_ctx_free_intern:
   34|  7.36k|{
   35|  7.36k|    if (ctx == NULL)
  ------------------
  |  Branch (35:9): [True: 0, False: 7.36k]
  ------------------
   36|      0|        return 0;
   37|  7.36k|    OPENSSL_free(ctx->srp_ctx.login);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   38|  7.36k|    OPENSSL_free(ctx->srp_ctx.info);
  ------------------
  |  |  132|  7.36k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   39|  7.36k|    BN_free(ctx->srp_ctx.N);
   40|  7.36k|    BN_free(ctx->srp_ctx.g);
   41|  7.36k|    BN_free(ctx->srp_ctx.s);
   42|  7.36k|    BN_free(ctx->srp_ctx.B);
   43|  7.36k|    BN_free(ctx->srp_ctx.A);
   44|  7.36k|    BN_free(ctx->srp_ctx.a);
   45|  7.36k|    BN_free(ctx->srp_ctx.b);
   46|  7.36k|    BN_free(ctx->srp_ctx.v);
   47|  7.36k|    memset(&ctx->srp_ctx, 0, sizeof(ctx->srp_ctx));
   48|  7.36k|    ctx->srp_ctx.strength = SRP_MINIMAL_N;
  ------------------
  |  |  276|  7.36k|#define SRP_MINIMAL_N 1024
  ------------------
   49|  7.36k|    return 1;
   50|  7.36k|}
ssl_srp_ctx_free_intern:
   62|  7.25k|{
   63|  7.25k|    if (s == NULL)
  ------------------
  |  Branch (63:9): [True: 0, False: 7.25k]
  ------------------
   64|      0|        return 0;
   65|  7.25k|    OPENSSL_free(s->srp_ctx.login);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   66|  7.25k|    OPENSSL_free(s->srp_ctx.info);
  ------------------
  |  |  132|  7.25k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   67|  7.25k|    BN_free(s->srp_ctx.N);
   68|  7.25k|    BN_free(s->srp_ctx.g);
   69|  7.25k|    BN_free(s->srp_ctx.s);
   70|  7.25k|    BN_free(s->srp_ctx.B);
   71|  7.25k|    BN_free(s->srp_ctx.A);
   72|  7.25k|    BN_free(s->srp_ctx.a);
   73|  7.25k|    BN_free(s->srp_ctx.b);
   74|  7.25k|    BN_free(s->srp_ctx.v);
   75|  7.25k|    memset(&s->srp_ctx, 0, sizeof(s->srp_ctx));
   76|  7.25k|    s->srp_ctx.strength = SRP_MINIMAL_N;
  ------------------
  |  |  276|  7.25k|#define SRP_MINIMAL_N 1024
  ------------------
   77|  7.25k|    return 1;
   78|  7.25k|}
ssl_srp_ctx_init_intern:
   93|  7.25k|{
   94|  7.25k|    SSL_CTX *ctx;
   95|       |
   96|  7.25k|    if (s == NULL || (ctx = SSL_CONNECTION_GET_CTX(s)) == NULL)
  ------------------
  |  |   26|  7.25k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  |  Branch (96:9): [True: 0, False: 7.25k]
  |  Branch (96:22): [True: 0, False: 7.25k]
  ------------------
   97|      0|        return 0;
   98|       |
   99|  7.25k|    memset(&s->srp_ctx, 0, sizeof(s->srp_ctx));
  100|       |
  101|  7.25k|    s->srp_ctx.SRP_cb_arg = ctx->srp_ctx.SRP_cb_arg;
  102|       |    /* set client Hello login callback */
  103|  7.25k|    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|  7.25k|    s->srp_ctx.SRP_verify_param_callback = ctx->srp_ctx.SRP_verify_param_callback;
  106|       |    /* set SRP client passwd callback */
  107|  7.25k|    s->srp_ctx.SRP_give_srp_client_pwd_callback = ctx->srp_ctx.SRP_give_srp_client_pwd_callback;
  108|       |
  109|  7.25k|    s->srp_ctx.strength = ctx->srp_ctx.strength;
  110|       |
  111|  7.25k|    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: 7.25k]
  |  Branch (111:38): [True: 0, False: 0]
  |  Branch (111:93): [True: 0, False: 7.25k]
  |  Branch (111:121): [True: 0, False: 0]
  |  Branch (111:176): [True: 0, False: 7.25k]
  |  Branch (111:204): [True: 0, False: 0]
  |  Branch (111:259): [True: 0, False: 7.25k]
  |  Branch (111:287): [True: 0, False: 0]
  |  Branch (111:342): [True: 0, False: 7.25k]
  |  Branch (111:370): [True: 0, False: 0]
  |  Branch (111:425): [True: 0, False: 7.25k]
  |  Branch (111:453): [True: 0, False: 0]
  |  Branch (111:508): [True: 0, False: 7.25k]
  |  Branch (111:536): [True: 0, False: 0]
  |  Branch (111:591): [True: 0, False: 7.25k]
  |  Branch (111:619): [True: 0, False: 0]
  ------------------
  112|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_BN_LIB);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  113|      0|        goto err;
  114|      0|    }
  115|  7.25k|    if ((ctx->srp_ctx.login != NULL) && ((s->srp_ctx.login = OPENSSL_strdup(ctx->srp_ctx.login)) == NULL)) {
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (115:9): [True: 0, False: 7.25k]
  |  Branch (115:41): [True: 0, False: 0]
  ------------------
  116|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  117|      0|        goto err;
  118|      0|    }
  119|  7.25k|    if ((ctx->srp_ctx.info != NULL) && ((s->srp_ctx.info = OPENSSL_strdup(ctx->srp_ctx.info)) == NULL)) {
  ------------------
  |  |  136|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (119:9): [True: 0, False: 7.25k]
  |  Branch (119:40): [True: 0, False: 0]
  ------------------
  120|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  357|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  359|      0|    (ERR_new(),                                                  \
  |  |  |  |  360|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  366|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  361|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  121|      0|        goto err;
  122|      0|    }
  123|  7.25k|    s->srp_ctx.srp_Mask = ctx->srp_ctx.srp_Mask;
  124|       |
  125|  7.25k|    return 1;
  126|      0|err:
  127|      0|    OPENSSL_free(s->srp_ctx.login);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  128|      0|    OPENSSL_free(s->srp_ctx.info);
  ------------------
  |  |  132|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  345|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  346|       |#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|  7.25k|}
ssl_ctx_srp_ctx_init_intern:
  154|  7.36k|{
  155|  7.36k|    if (ctx == NULL)
  ------------------
  |  Branch (155:9): [True: 0, False: 7.36k]
  ------------------
  156|      0|        return 0;
  157|       |
  158|  7.36k|    memset(&ctx->srp_ctx, 0, sizeof(ctx->srp_ctx));
  159|  7.36k|    ctx->srp_ctx.strength = SRP_MINIMAL_N;
  ------------------
  |  |  276|  7.36k|#define SRP_MINIMAL_N 1024
  ------------------
  160|       |
  161|  7.36k|    return 1;
  162|  7.36k|}

inflateResetKeep:
  100|      3|int ZEXPORT inflateResetKeep(z_streamp strm) {
  101|      3|    struct inflate_state FAR *state;
  102|       |
  103|      3|    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  |  Branch (103:9): [True: 0, False: 3]
  ------------------
  104|      3|    state = (struct inflate_state FAR *)strm->state;
  105|      3|    strm->total_in = strm->total_out = state->total = 0;
  106|      3|    strm->msg = Z_NULL;
  ------------------
  |  |  216|      3|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  107|      3|    strm->data_type = 0;
  108|      3|    if (state->wrap)        /* to support ill-conceived Java test suite */
  ------------------
  |  Branch (108:9): [True: 3, False: 0]
  ------------------
  109|      3|        strm->adler = state->wrap & 1;
  110|      3|    state->mode = HEAD;
  111|      3|    state->last = 0;
  112|      3|    state->havedict = 0;
  113|      3|    state->flags = -1;
  114|      3|    state->dmax = 32768U;
  115|      3|    state->head = Z_NULL;
  ------------------
  |  |  216|      3|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  116|      3|    state->hold = 0;
  117|      3|    state->bits = 0;
  118|      3|    state->lencode = state->distcode = state->next = state->codes;
  119|      3|    state->sane = 1;
  120|      3|    state->back = -1;
  121|      3|    Tracev((stderr, "inflate: reset\n"));
  122|      3|    return Z_OK;
  ------------------
  |  |  181|      3|#define Z_OK            0
  ------------------
  123|      3|}
inflateReset:
  125|      3|int ZEXPORT inflateReset(z_streamp strm) {
  126|      3|    struct inflate_state FAR *state;
  127|       |
  128|      3|    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  |  Branch (128:9): [True: 0, False: 3]
  ------------------
  129|      3|    state = (struct inflate_state FAR *)strm->state;
  130|      3|    state->wsize = 0;
  131|      3|    state->whave = 0;
  132|      3|    state->wnext = 0;
  133|      3|    return inflateResetKeep(strm);
  134|      3|}
inflateReset2:
  136|      3|int ZEXPORT inflateReset2(z_streamp strm, int windowBits) {
  137|      3|    int wrap;
  138|      3|    struct inflate_state FAR *state;
  139|       |
  140|       |    /* get the state */
  141|      3|    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  |  Branch (141:9): [True: 0, False: 3]
  ------------------
  142|      3|    state = (struct inflate_state FAR *)strm->state;
  143|       |
  144|       |    /* extract wrap request from windowBits parameter */
  145|      3|    if (windowBits < 0) {
  ------------------
  |  Branch (145:9): [True: 0, False: 3]
  ------------------
  146|      0|        if (windowBits < -15)
  ------------------
  |  Branch (146:13): [True: 0, False: 0]
  ------------------
  147|      0|            return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  148|      0|        wrap = 0;
  149|      0|        windowBits = -windowBits;
  150|      0|    }
  151|      3|    else {
  152|      3|        wrap = (windowBits >> 4) + 5;
  153|      3|#ifdef GUNZIP
  154|      3|        if (windowBits < 48)
  ------------------
  |  Branch (154:13): [True: 3, False: 0]
  ------------------
  155|      3|            windowBits &= 15;
  156|      3|#endif
  157|      3|    }
  158|       |
  159|       |    /* set number of window bits, free window if different */
  160|      3|    if (windowBits && (windowBits < 8 || windowBits > 15))
  ------------------
  |  Branch (160:9): [True: 3, False: 0]
  |  Branch (160:24): [True: 0, False: 3]
  |  Branch (160:42): [True: 0, False: 3]
  ------------------
  161|      0|        return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  162|      3|    if (state->window != Z_NULL && state->wbits != (unsigned)windowBits) {
  ------------------
  |  |  216|      6|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (162:9): [True: 0, False: 3]
  |  Branch (162:36): [True: 0, False: 0]
  ------------------
  163|      0|        ZFREE(strm, state->window);
  ------------------
  |  |  254|      0|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  ------------------
  164|      0|        state->window = Z_NULL;
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  165|      0|    }
  166|       |
  167|       |    /* update state and reset the rest of it */
  168|      3|    state->wrap = wrap;
  169|      3|    state->wbits = (unsigned)windowBits;
  170|      3|    return inflateReset(strm);
  171|      3|}
inflateInit2_:
  174|      3|                          const char *version, int stream_size) {
  175|      3|    int ret;
  176|      3|    struct inflate_state FAR *state;
  177|       |
  178|      3|    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
  ------------------
  |  |  216|      6|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
                  if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
  ------------------
  |  |   44|      3|#define ZLIB_VERSION "1.3.2"
  ------------------
  |  Branch (178:9): [True: 0, False: 3]
  |  Branch (178:30): [True: 0, False: 3]
  ------------------
  179|      3|        stream_size != (int)(sizeof(z_stream)))
  ------------------
  |  Branch (179:9): [True: 0, False: 3]
  ------------------
  180|      0|        return Z_VERSION_ERROR;
  ------------------
  |  |  189|      0|#define Z_VERSION_ERROR (-6)
  ------------------
  181|      3|    if (strm == Z_NULL) return Z_STREAM_ERROR;
  ------------------
  |  |  216|      3|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
                  if (strm == Z_NULL) return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  |  Branch (181:9): [True: 0, False: 3]
  ------------------
  182|      3|    strm->msg = Z_NULL;                 /* in case we return an error */
  ------------------
  |  |  216|      3|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  183|      3|    if (strm->zalloc == (alloc_func)0) {
  ------------------
  |  Branch (183:9): [True: 0, False: 3]
  ------------------
  184|       |#ifdef Z_SOLO
  185|       |        return Z_STREAM_ERROR;
  186|       |#else
  187|      0|        strm->zalloc = zcalloc;
  188|      0|        strm->opaque = (voidpf)0;
  189|      0|#endif
  190|      0|    }
  191|      3|    if (strm->zfree == (free_func)0)
  ------------------
  |  Branch (191:9): [True: 0, False: 3]
  ------------------
  192|       |#ifdef Z_SOLO
  193|       |        return Z_STREAM_ERROR;
  194|       |#else
  195|      0|        strm->zfree = zcfree;
  196|      3|#endif
  197|      3|    state = (struct inflate_state FAR *)
  198|      3|            ZALLOC(strm, 1, sizeof(struct inflate_state));
  ------------------
  |  |  253|      3|           (*((strm)->zalloc))((strm)->opaque, (items), (size))
  ------------------
  199|      3|    if (state == Z_NULL) return Z_MEM_ERROR;
  ------------------
  |  |  216|      3|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
                  if (state == Z_NULL) return Z_MEM_ERROR;
  ------------------
  |  |  187|      0|#define Z_MEM_ERROR    (-4)
  ------------------
  |  Branch (199:9): [True: 0, False: 3]
  ------------------
  200|      3|    zmemzero(state, sizeof(struct inflate_state));
  ------------------
  |  |  218|      3|#    define zmemzero(dest, len) memset(dest, 0, len)
  ------------------
  201|      3|    Tracev((stderr, "inflate: allocated\n"));
  202|      3|    strm->state = (struct internal_state FAR *)state;
  203|      3|    state->strm = strm;
  204|      3|    state->window = Z_NULL;
  ------------------
  |  |  216|      3|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  205|      3|    state->mode = HEAD;     /* to pass state test in inflateReset2() */
  206|      3|    ret = inflateReset2(strm, windowBits);
  207|      3|    if (ret != Z_OK) {
  ------------------
  |  |  181|      3|#define Z_OK            0
  ------------------
  |  Branch (207:9): [True: 0, False: 3]
  ------------------
  208|      0|        ZFREE(strm, state);
  ------------------
  |  |  254|      0|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  ------------------
  209|      0|        strm->state = Z_NULL;
  ------------------
  |  |  216|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  210|      0|    }
  211|      3|    return ret;
  212|      3|}
inflateEnd:
 1155|      3|int ZEXPORT inflateEnd(z_streamp strm) {
 1156|      3|    struct inflate_state FAR *state;
 1157|      3|    if (inflateStateCheck(strm))
  ------------------
  |  Branch (1157:9): [True: 0, False: 3]
  ------------------
 1158|      0|        return Z_STREAM_ERROR;
  ------------------
  |  |  185|      0|#define Z_STREAM_ERROR (-2)
  ------------------
 1159|      3|    state = (struct inflate_state FAR *)strm->state;
 1160|      3|    if (state->window != Z_NULL) ZFREE(strm, state->window);
  ------------------
  |  |  216|      3|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
                  if (state->window != Z_NULL) ZFREE(strm, state->window);
  ------------------
  |  |  254|      0|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  ------------------
  |  Branch (1160:9): [True: 0, False: 3]
  ------------------
 1161|      3|    ZFREE(strm, strm->state);
  ------------------
  |  |  254|      3|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  ------------------
 1162|      3|    strm->state = Z_NULL;
  ------------------
  |  |  216|      3|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
 1163|      3|    Tracev((stderr, "inflate: end\n"));
 1164|      3|    return Z_OK;
  ------------------
  |  |  181|      3|#define Z_OK            0
  ------------------
 1165|      3|}
inflate.c:inflateStateCheck:
   88|     12|local int inflateStateCheck(z_streamp strm) {
   89|     12|    struct inflate_state FAR *state;
   90|     12|    if (strm == Z_NULL ||
  ------------------
  |  |  216|     24|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (90:9): [True: 0, False: 12]
  ------------------
   91|     12|        strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0)
  ------------------
  |  Branch (91:9): [True: 0, False: 12]
  |  Branch (91:42): [True: 0, False: 12]
  ------------------
   92|      0|        return 1;
   93|     12|    state = (struct inflate_state FAR *)strm->state;
   94|     12|    if (state == Z_NULL || state->strm != strm ||
  ------------------
  |  |  216|     24|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (94:9): [True: 0, False: 12]
  |  Branch (94:28): [True: 0, False: 12]
  ------------------
   95|     12|        state->mode < HEAD || state->mode > SYNC)
  ------------------
  |  Branch (95:9): [True: 0, False: 12]
  |  Branch (95:31): [True: 0, False: 12]
  ------------------
   96|      0|        return 1;
   97|     12|    return 0;
   98|     12|}

LLVMFuzzerTestOneInput:
   38|  3.73k|                                      std::size_t size) {
   39|  3.73k|  return Fuzzer::TestOneInput(data, size);
   40|  3.73k|}

_ZN12proto_fuzzer23ProtoFuzzerTestOneInputENS_13TargetProfileEPKhm:
   92|  3.73k|int ProtoFuzzerTestOneInput(TargetProfile profile, const std::uint8_t* data, std::size_t size) {
   93|  3.73k|  EnsureTargetPostProcessor(profile);
   94|  3.73k|  curl::fuzzer::proto::Scenario scenario;
   95|  3.73k|  if (protobuf_mutator::libfuzzer::LoadProtoInput(kUseBinaryFormat, data, size, &scenario)) {
  ------------------
  |  Branch (95:7): [True: 3.73k, False: 0]
  ------------------
   96|  3.73k|    ScenarioRunner().Run(scenario, RunModeFor(profile));
   97|  3.73k|  }
   98|  3.73k|  return 0;
   99|  3.73k|}
fuzzer_main.cc:_ZN12_GLOBAL__N_119CurlGlobalBootstrapC2Ev:
   60|      2|  CurlGlobalBootstrap() {
   61|       |    // Keep parity with the legacy harness. libcurl normally suppresses
   62|       |    // SIGPIPE for its own writes, but fuzzed connection lifecycles also race
   63|       |    // mock-peer teardown; those failures should be reported as socket errors,
   64|       |    // not mistaken for process crashes.
   65|      2|    std::signal(SIGPIPE, SIG_IGN);
   66|      2|    curl_global_init(CURL_GLOBAL_ALL);
  ------------------
  |  | 3046|      2|#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32)
  |  |  ------------------
  |  |  |  | 3044|      2|#define CURL_GLOBAL_SSL (1 << 0) /* no purpose since 7.57.0 */
  |  |  ------------------
  |  |               #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32)
  |  |  ------------------
  |  |  |  | 3045|      2|#define CURL_GLOBAL_WIN32 (1 << 1)
  |  |  ------------------
  ------------------
   67|      2|  }
fuzzer_main.cc:_ZN12_GLOBAL__N_125EnsureTargetPostProcessorEN12proto_fuzzer13TargetProfileE:
   38|  3.73k|void EnsureTargetPostProcessor(proto_fuzzer::TargetProfile profile) {
   39|  3.73k|  if (profile == proto_fuzzer::TargetProfile::kCompatibility) {
  ------------------
  |  Branch (39:7): [True: 0, False: 3.73k]
  ------------------
   40|      0|    return;
   41|      0|  }
   42|       |
   43|  3.73k|  static const proto_fuzzer::TargetProfile registered_profile = profile;
   44|  3.73k|  static const protobuf_mutator::libfuzzer::PostProcessorRegistration<curl::fuzzer::proto::Scenario>
   45|  3.73k|      policy_registration([](curl::fuzzer::proto::Scenario* scenario, unsigned int /*seed*/) {
   46|  3.73k|        proto_fuzzer::ApplyTargetPolicy(scenario, registered_profile);
   47|  3.73k|        proto_fuzzer::CanonicalizeOptionValueCases(scenario);
   48|  3.73k|      });
   49|       |
   50|       |  // A second profile in one process would cause LPM's global registry to
   51|       |  // enforce the wrong lane. Real fuzz binaries cannot do this; keep the
   52|       |  // assertion to make misuse by future in-process callers immediately clear.
   53|  3.73k|  assert(profile == registered_profile);
  ------------------
  |  Branch (53:3): [True: 3.73k, False: 0]
  ------------------
   54|  3.73k|  (void)policy_registration;
   55|  3.73k|}
fuzzer_main.cc:_ZZN12_GLOBAL__N_125EnsureTargetPostProcessorEN12proto_fuzzer13TargetProfileEENK3$_0clEPN4curl6fuzzer5proto8ScenarioEj:
   45|  3.73k|      policy_registration([](curl::fuzzer::proto::Scenario* scenario, unsigned int /*seed*/) {
   46|  3.73k|        proto_fuzzer::ApplyTargetPolicy(scenario, registered_profile);
   47|  3.73k|        proto_fuzzer::CanonicalizeOptionValueCases(scenario);
   48|  3.73k|      });

_ZN12proto_fuzzer21ProtoFuzzerEntrypointILNS_13TargetProfileE3EE12TestOneInputEPKhm:
   67|  3.73k|  static int TestOneInput(const std::uint8_t* data, std::size_t size) {
   68|  3.73k|    return ProtoFuzzerTestOneInput(Profile, data, size);
   69|  3.73k|  }

_ZN12proto_fuzzer14MockConnectionC2Ev:
   46|  3.62k|MockConnection::MockConnection() : server_fd_(-1), client_fd_(-1), drain_limit_(0) {
   47|  3.62k|  int fds[2];
   48|       |
   49|  3.62k|  if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) != 0) {
  ------------------
  |  Branch (49:7): [True: 0, False: 3.62k]
  ------------------
   50|      0|    return;
   51|      0|  }
   52|       |
   53|       |  // The fds must be small enough to fit in an fd_set for select(). If not, close them and fail the constructor.
   54|  3.62k|  if (!FdFitsInFdSet(fds[0]) || !FdFitsInFdSet(fds[1])) {
  ------------------
  |  Branch (54:7): [True: 0, False: 3.62k]
  |  Branch (54:33): [True: 0, False: 3.62k]
  ------------------
   55|      0|    close(fds[0]);
   56|      0|    close(fds[1]);
   57|      0|    return;
   58|      0|  }
   59|       |
   60|       |  // Set the server-side fd non-blocking so we can write to it without risk of hanging the fuzzer.
   61|  3.62k|  int flags = fcntl(fds[0], F_GETFL, 0);
   62|  3.62k|  if (flags < 0 || fcntl(fds[0], F_SETFL, flags | O_NONBLOCK) < 0) {
  ------------------
  |  Branch (62:7): [True: 0, False: 3.62k]
  |  Branch (62:20): [True: 0, False: 3.62k]
  ------------------
   63|      0|    close(fds[0]);
   64|      0|    close(fds[1]);
   65|      0|    return;
   66|      0|  }
   67|       |
   68|       |  // Success: store the file descriptors.
   69|  3.62k|  server_fd_ = fds[0];
   70|  3.62k|  client_fd_ = fds[1];
   71|  3.62k|}
_ZN12proto_fuzzer14MockConnectionD2Ev:
   74|  3.62k|MockConnection::~MockConnection() {
   75|  3.62k|  if (server_fd_ >= 0) {
  ------------------
  |  Branch (75:7): [True: 3.62k, False: 0]
  ------------------
   76|  3.62k|    close(server_fd_);
   77|  3.62k|  }
   78|  3.62k|  if (client_fd_ >= 0) {
  ------------------
  |  Branch (78:7): [True: 0, False: 3.62k]
  ------------------
   79|      0|    close(client_fd_);
   80|      0|  }
   81|  3.62k|}
_ZNK12proto_fuzzer14MockConnection2okEv:
   84|  15.1k|bool MockConnection::ok() const { return server_fd_ >= 0; }
_ZNK12proto_fuzzer14MockConnection9server_fdEv:
   87|  7.08k|int MockConnection::server_fd() const { return server_fd_; }
_ZN12proto_fuzzer14MockConnection14take_client_fdEv:
  124|  3.62k|curl_socket_t MockConnection::take_client_fd() {
  125|  3.62k|  int fd = client_fd_;
  126|  3.62k|  client_fd_ = -1;
  127|  3.62k|  return static_cast<curl_socket_t>(fd);
  128|  3.62k|}
_ZN12proto_fuzzer14MockConnection17ApplyBackpressureEim:
  188|  3.62k|void MockConnection::ApplyBackpressure(int recv_buf_bytes, std::size_t drain_limit) {
  189|  3.62k|  if (recv_buf_bytes > 0) {
  ------------------
  |  Branch (189:7): [True: 0, False: 3.62k]
  ------------------
  190|      0|    if (server_fd_ >= 0) {
  ------------------
  |  Branch (190:9): [True: 0, False: 0]
  ------------------
  191|      0|      (void)setsockopt(server_fd_, SOL_SOCKET, SO_RCVBUF, &recv_buf_bytes, sizeof(recv_buf_bytes));
  192|      0|    }
  193|      0|    if (client_fd_ >= 0) {
  ------------------
  |  Branch (193:9): [True: 0, False: 0]
  ------------------
  194|      0|      (void)setsockopt(client_fd_, SOL_SOCKET, SO_SNDBUF, &recv_buf_bytes, sizeof(recv_buf_bytes));
  195|      0|    }
  196|      0|  }
  197|  3.62k|  drain_limit_ = drain_limit;
  198|  3.62k|}
_ZN12proto_fuzzer10MockServerC2Ev:
  233|  3.73k|MockServer::MockServer() : script_count_(0), next_script_(0), active_script_(nullptr), preload_all_chunks_(false) {}
_ZN12proto_fuzzer10MockServerD2Ev:
  237|  3.73k|MockServer::~MockServer() = default;
_ZN12proto_fuzzer10MockServer10SetScriptsERKN4curl6fuzzer5proto8ScenarioE:
  246|  3.73k|void MockServer::SetScripts(const curl::fuzzer::proto::Scenario& scenario) {
  247|  3.73k|  ResetConnections();
  248|  3.73k|  script_count_ = 0;
  249|  3.73k|  next_script_ = 0;
  250|       |
  251|  3.73k|  const auto append_script = [this](const curl::fuzzer::proto::Connection& connection) {
  252|  3.73k|    ConnectionScript& script = scripts_[script_count_++];
  253|  3.73k|    script.connection = &connection;
  254|  3.73k|    script.raw_chunk_count = std::min<std::size_t>(scenario_limits::kMaxResponseChunks, connection.on_readable_size());
  255|  3.73k|    const std::size_t frame_budget = scenario_limits::kMaxResponseChunks - script.raw_chunk_count;
  256|  3.73k|    script.frame_chunk_count = std::min<std::size_t>(frame_budget, connection.server_frames_size());
  257|  3.73k|    script.next_chunk = 0;
  258|  3.73k|  };
  259|       |
  260|  3.73k|  append_script(scenario.connection());
  261|  3.73k|  const std::size_t subsequent_count = std::min<std::size_t>(
  262|  3.73k|      scenario_limits::kMaxConnections - 1, static_cast<std::size_t>(scenario.subsequent_connections_size()));
  263|  4.07k|  for (std::size_t i = 0; i < subsequent_count; ++i) {
  ------------------
  |  Branch (263:27): [True: 338, False: 3.73k]
  ------------------
  264|    338|    append_script(scenario.subsequent_connections(static_cast<int>(i)));
  265|    338|  }
  266|  3.73k|}
_ZNK12proto_fuzzer10MockServer15has_more_chunksEv:
  269|  8.86k|bool MockServer::has_more_chunks() const {
  270|  8.86k|  return active_script_ != nullptr && active_script_->next_chunk < active_script_->chunk_count();
  ------------------
  |  Branch (270:10): [True: 8.86k, False: 0]
  |  Branch (270:39): [True: 2.02k, False: 6.84k]
  ------------------
  271|  8.86k|}
_ZN12proto_fuzzer10MockServer16ResetConnectionsEv:
  280|  7.46k|void MockServer::ResetConnections() {
  281|  7.46k|  active_script_ = nullptr;
  282|  7.46k|  connection_.reset();
  283|  7.46k|  previous_connections_.clear();
  284|  7.46k|}
_ZN12proto_fuzzer10MockServer16HandleOpenSocketE12curlsocktypeP13curl_sockaddr:
  299|  3.62k|curl_socket_t MockServer::HandleOpenSocket(curlsocktype purpose, struct curl_sockaddr* address) {
  300|  3.62k|  (void)purpose;
  301|  3.62k|  (void)address;
  302|  3.62k|  if (next_script_ >= script_count_) {
  ------------------
  |  Branch (302:7): [True: 0, False: 3.62k]
  ------------------
  303|       |    // Refusing a fifth socket keeps redirect loops bounded even if curl's own
  304|       |    // redirect limit is mutated upward or an authentication scheme retries.
  305|      0|    return CURL_SOCKET_BAD;
  ------------------
  |  |  147|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  306|      0|  }
  307|       |
  308|  3.62k|  if (connection_) {
  ------------------
  |  Branch (308:7): [True: 0, False: 3.62k]
  ------------------
  309|       |    // libcurl owns the corresponding client fd, so retain the server half
  310|       |    // until the easy handle leaves the multi instead of closing it at the
  311|       |    // moment a redirect or retry opens its replacement.
  312|      0|    previous_connections_.push_back(std::move(connection_));
  313|      0|  }
  314|       |
  315|  3.62k|  active_script_ = &scripts_[next_script_++];
  316|  3.62k|  const curl::fuzzer::proto::Connection& script_connection = *active_script_->connection;
  317|  3.62k|  connection_ = CreateConnection();
  318|  3.62k|  if (!connection_ || !connection_->ok()) {
  ------------------
  |  Branch (318:7): [True: 0, False: 3.62k]
  |  Branch (318:23): [True: 0, False: 3.62k]
  ------------------
  319|      0|    connection_.reset();
  320|      0|    active_script_ = nullptr;
  321|      0|    return CURL_SOCKET_BAD;
  ------------------
  |  |  147|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  322|      0|  }
  323|       |
  324|       |  // Target policies clamp/clear these values before execution. Saturating the
  325|       |  // compatibility lane's raw uint32 avoids implementation-defined narrowing
  326|       |  // while preserving its ability to request any representable socket size.
  327|  3.62k|  const std::uint32_t int_max = static_cast<std::uint32_t>(std::numeric_limits<int>::max());
  328|  3.62k|  const auto& backpressure = script_connection.backpressure();
  329|  3.62k|  const int recv_buf_bytes = static_cast<int>(std::min(backpressure.recv_buf_bytes(), int_max));
  330|  3.62k|  connection_->ApplyBackpressure(recv_buf_bytes, static_cast<std::size_t>(backpressure.drain_limit()));
  331|       |
  332|  3.62k|  const std::string& initial_response = script_connection.initial_response();
  333|  3.62k|  if (!initial_response.empty()) {
  ------------------
  |  Branch (333:7): [True: 350, False: 3.27k]
  ------------------
  334|    350|    if (!connection_->WriteAll(reinterpret_cast<const unsigned char*>(initial_response.data()),
  ------------------
  |  Branch (334:9): [True: 0, False: 350]
  ------------------
  335|    350|                               initial_response.size())) {
  336|      0|      connection_.reset();
  337|      0|      active_script_ = nullptr;
  338|      0|      return CURL_SOCKET_BAD;
  ------------------
  |  |  147|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  339|      0|    }
  340|    350|  }
  341|  3.62k|  if (preload_all_chunks_) {
  ------------------
  |  Branch (341:7): [True: 0, False: 3.62k]
  ------------------
  342|      0|    while (has_more_chunks()) {
  ------------------
  |  Branch (342:12): [True: 0, False: 0]
  ------------------
  343|      0|      (void)DeliverNextChunk();
  344|      0|    }
  345|      0|  }
  346|  3.62k|  if (active_script_->chunk_count() == 0) {
  ------------------
  |  Branch (346:7): [True: 3.11k, False: 515]
  ------------------
  347|  3.11k|    connection_->ShutdownWrite();
  348|  3.11k|  }
  349|  3.62k|  return connection_->take_client_fd();
  350|  3.62k|}
_ZN12proto_fuzzer10MockServer16DeliverNextChunkEv:
  374|    802|bool MockServer::DeliverNextChunk() {
  375|    802|  if (!connection_ || !has_more_chunks()) {
  ------------------
  |  Branch (375:7): [True: 0, False: 802]
  |  Branch (375:23): [True: 0, False: 802]
  ------------------
  376|      0|    return false;
  377|      0|  }
  378|    802|  connection_->DrainIncoming();
  379|    802|  const std::size_t chunk_index = active_script_->next_chunk++;
  380|    802|  const auto& script_connection = *active_script_->connection;
  381|    802|  if (chunk_index < active_script_->raw_chunk_count) {
  ------------------
  |  Branch (381:7): [True: 513, False: 289]
  ------------------
  382|    513|    const std::string& chunk = script_connection.on_readable(static_cast<int>(chunk_index));
  383|    513|    if (!chunk.empty()) {
  ------------------
  |  Branch (383:9): [True: 412, False: 101]
  ------------------
  384|    412|      connection_->WriteAll(reinterpret_cast<const unsigned char*>(chunk.data()), chunk.size());
  385|    412|    }
  386|    513|  } else {
  387|       |    // HTTP scenarios historically accept structured WebSocket frames as raw
  388|       |    // response bytes after every on_readable chunk. Serialize only the frame
  389|       |    // curl is about to receive: follow-on scripts and capped suffix frames may
  390|       |    // never be consumed, so eagerly materialising all of them wastes mutations.
  391|    289|    const std::size_t frame_index = chunk_index - active_script_->raw_chunk_count;
  392|    289|    const std::string chunk = SerializeWebSocketFrame(script_connection.server_frames(static_cast<int>(frame_index)));
  393|    289|    if (!chunk.empty()) {
  ------------------
  |  Branch (393:9): [True: 289, False: 0]
  ------------------
  394|    289|      connection_->WriteAll(reinterpret_cast<const unsigned char*>(chunk.data()), chunk.size());
  395|    289|    }
  396|    289|  }
  397|    802|  if (!has_more_chunks()) {
  ------------------
  |  Branch (397:7): [True: 386, False: 416]
  ------------------
  398|    386|    connection_->ShutdownWrite();
  399|    386|  }
  400|    802|  return true;
  401|    802|}
_ZN12proto_fuzzer10MockServer24DrainIncomingConnectionsEv:
  407|  7.26k|std::size_t MockServer::DrainIncomingConnections() {
  408|  7.26k|  std::size_t drained = 0;
  409|  7.26k|  for (const auto& previous : previous_connections_) {
  ------------------
  |  Branch (409:29): [True: 0, False: 7.26k]
  ------------------
  410|      0|    drained += previous->DrainIncoming();
  411|      0|  }
  412|  7.26k|  if (connection_) {
  ------------------
  |  Branch (412:7): [True: 7.26k, False: 0]
  ------------------
  413|  7.26k|    drained += connection_->DrainIncoming();
  414|  7.26k|  }
  415|  7.26k|  return drained;
  416|  7.26k|}
_ZN12proto_fuzzer10MockServer18ServiceConnectionsEv:
  422|  7.26k|bool MockServer::ServiceConnections() {
  423|  7.26k|  bool made_progress = DrainIncomingConnections() != 0;
  424|  7.26k|  if (has_more_chunks()) {
  ------------------
  |  Branch (424:7): [True: 802, False: 6.46k]
  ------------------
  425|    802|    made_progress = DeliverNextChunk() || made_progress;
  ------------------
  |  Branch (425:21): [True: 802, False: 0]
  |  Branch (425:43): [True: 0, False: 0]
  ------------------
  426|    802|  }
  427|  7.26k|  return made_progress;
  428|  7.26k|}
_ZN12proto_fuzzer10MockServer7RunLoopEPvS1_RKN4curl6fuzzer5proto8ScenarioE:
  466|  3.73k|void MockServer::RunLoop(CURLM* multi, CURL* easy, const curl::fuzzer::proto::Scenario& scenario) {
  467|  3.73k|  SetScripts(scenario);
  468|       |
  469|  3.73k|  if (multi_socket_driver() != nullptr) {
  ------------------
  |  Branch (469:7): [True: 0, False: 3.73k]
  ------------------
  470|      0|    RunSocketActionLoop(multi, easy);
  471|      0|    return;
  472|      0|  }
  473|       |
  474|  3.73k|  int still_running = 1;
  475|  3.73k|  int idle_iterations = 0;
  476|  3.73k|  int drive_iterations = 0;
  477|  3.73k|  bool pollset_probed = false;
  478|       |  // Each newly opened socket can carry its own pressure settings. Inspect only
  479|       |  // the borrowed, runtime-bounded scripts: ignored repeated protobuf entries must
  480|       |  // not opt a fast transfer into timed waits.
  481|  3.73k|  const bool timed_drive =
  482|  3.73k|      std::any_of(scripts_.begin(), scripts_.begin() + script_count_, [](const ConnectionScript& script) {
  483|  3.73k|        const auto& backpressure = script.connection->backpressure();
  484|  3.73k|        return backpressure.recv_buf_bytes() != 0 || backpressure.drain_limit() != 0;
  485|  3.73k|      });
  486|  3.73k|  const int idle_limit = timed_drive ? kMaxTimedIdleIterations : kMaxIdleIterations;
  ------------------
  |  Branch (486:26): [True: 0, False: 3.73k]
  ------------------
  487|  3.73k|  CURLMcode rc = CURLM_OK;
  488|       |
  489|  10.9k|  while (still_running && idle_iterations < idle_limit && drive_iterations++ < kMaxDriveIterations) {
  ------------------
  |  Branch (489:10): [True: 10.9k, False: 0]
  |  Branch (489:27): [True: 10.9k, False: 0]
  |  Branch (489:59): [True: 10.9k, False: 0]
  ------------------
  490|  10.9k|    bool made_progress = false;
  491|  10.9k|    const int running_before = still_running;
  492|  10.9k|    rc = curl_multi_perform(multi, &still_running);
  493|  10.9k|    if (rc != CURLM_OK) {
  ------------------
  |  Branch (493:9): [True: 0, False: 10.9k]
  ------------------
  494|      0|      break;
  495|      0|    }
  496|  10.9k|    ObserveActiveTransfer(easy);
  497|  10.9k|    made_progress = still_running != running_before;
  498|  10.9k|    if (timed_drive && still_running && !pollset_probed) {
  ------------------
  |  Branch (498:9): [True: 0, False: 10.9k]
  |  Branch (498:24): [True: 0, False: 0]
  |  Branch (498:41): [True: 0, False: 0]
  ------------------
  499|       |      // Probe only after curl has built the socket/filter chain. A zero-timeout
  500|       |      // poll adds no wall-clock wait; restricting it to the timing lane keeps
  501|       |      // the fixed HTTP target free of a per-input polling syscall.
  502|      0|      ProbeMultiPollset(multi);
  503|      0|      pollset_probed = true;
  504|      0|    }
  505|  10.9k|    if (!still_running) {
  ------------------
  |  Branch (505:9): [True: 3.73k, False: 7.26k]
  ------------------
  506|  3.73k|      break;
  507|  3.73k|    }
  508|       |
  509|       |    // Always drain whatever curl has written. Under backpressure the kernel
  510|       |    // recv buffer would otherwise stay full — curl short-writes, the mock
  511|       |    // never consumes, and the transfer wedges until the drive budget. With
  512|       |    // drain_limit set this still honours the per-tick byte budget.
  513|  7.26k|    made_progress = ServiceConnections() || made_progress;
  ------------------
  |  Branch (513:21): [True: 7.26k, False: 0]
  |  Branch (513:45): [True: 0, False: 0]
  ------------------
  514|       |
  515|  7.26k|    if (made_progress) {
  ------------------
  |  Branch (515:9): [True: 7.26k, False: 0]
  ------------------
  516|  7.26k|      idle_iterations = 0;
  517|  7.26k|      continue;
  518|  7.26k|    }
  519|       |
  520|       |    // Ordinary socketpair scenarios never sleep: repeated no-progress
  521|       |    // performs are enough to settle curl's local state machine. Only an
  522|       |    // explicit BackpressureConfig opts into short waits so timeout-related
  523|       |    // behaviour remains fuzzable without taxing every corpus entry.
  524|      0|    if (timed_drive) {
  ------------------
  |  Branch (524:9): [True: 0, False: 0]
  ------------------
  525|      0|      (void)WaitOnMultiFdset(multi, &rc);
  526|      0|      if (rc != CURLM_OK) {
  ------------------
  |  Branch (526:11): [True: 0, False: 0]
  ------------------
  527|      0|        break;
  528|      0|      }
  529|      0|    }
  530|      0|    ++idle_iterations;
  531|      0|  }
  532|  3.73k|}
mock_server.cc:_ZN12proto_fuzzer12_GLOBAL__N_113FdFitsInFdSetEi:
   36|  7.25k|bool FdFitsInFdSet(int fd) { return fd >= 0 && fd < FD_SETSIZE; }
  ------------------
  |  Branch (36:37): [True: 7.25k, False: 0]
  |  Branch (36:48): [True: 7.25k, False: 0]
  ------------------
mock_server.cc:_ZZN12proto_fuzzer10MockServer10SetScriptsERKN4curl6fuzzer5proto8ScenarioEENK3$_0clERKNS3_10ConnectionE:
  251|  4.07k|  const auto append_script = [this](const curl::fuzzer::proto::Connection& connection) {
  252|  4.07k|    ConnectionScript& script = scripts_[script_count_++];
  253|  4.07k|    script.connection = &connection;
  254|  4.07k|    script.raw_chunk_count = std::min<std::size_t>(scenario_limits::kMaxResponseChunks, connection.on_readable_size());
  255|  4.07k|    const std::size_t frame_budget = scenario_limits::kMaxResponseChunks - script.raw_chunk_count;
  256|  4.07k|    script.frame_chunk_count = std::min<std::size_t>(frame_budget, connection.server_frames_size());
  257|  4.07k|    script.next_chunk = 0;
  258|  4.07k|  };
mock_server.cc:_ZZN12proto_fuzzer10MockServer7RunLoopEPvS1_RKN4curl6fuzzer5proto8ScenarioEENK3$_0clERKNS0_16ConnectionScriptE:
  482|  4.07k|      std::any_of(scripts_.begin(), scripts_.begin() + script_count_, [](const ConnectionScript& script) {
  483|  4.07k|        const auto& backpressure = script.connection->backpressure();
  484|  4.07k|        return backpressure.recv_buf_bytes() != 0 || backpressure.drain_limit() != 0;
  ------------------
  |  Branch (484:16): [True: 0, False: 4.07k]
  |  Branch (484:54): [True: 0, False: 4.07k]
  ------------------
  485|  4.07k|      });

_ZNK12proto_fuzzer10MockServer16ConnectionScript11chunk_countEv:
  139|  12.4k|    std::size_t chunk_count() const { return raw_chunk_count + frame_chunk_count; }

_ZN12proto_fuzzer34MockServerBaseOpenSocketTrampolineEPv12curlsocktypeP13curl_sockaddr:
   53|  3.62k|curl_socket_t MockServerBaseOpenSocketTrampoline(void* clientp, curlsocktype purpose, struct curl_sockaddr* address) {
   54|  3.62k|  return static_cast<MockServerBase*>(clientp)->HandleOpenSocket(purpose, address);
   55|  3.62k|}
_ZN12proto_fuzzer14MockServerBaseC2Ev:
   59|  3.73k|    : connection_(nullptr), pending_recv_buf_bytes_(0), pending_drain_limit_(0), multi_socket_driver_(nullptr) {}
_ZN12proto_fuzzer14MockServerBaseD2Ev:
   64|  3.73k|MockServerBase::~MockServerBase() = default;
_ZN12proto_fuzzer14MockServerBase7InstallEPv:
   71|  3.73k|void MockServerBase::Install(CURL* easy) {
   72|  3.73k|  curl_easy_setopt(easy, CURLOPT_OPENSOCKETFUNCTION, &MockServerBaseOpenSocketTrampoline);
  ------------------
  |  | 3363|  3.73k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
   73|  3.73k|  curl_easy_setopt(easy, CURLOPT_OPENSOCKETDATA, this);
  ------------------
  |  | 3363|  3.73k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
   74|  3.73k|  curl_easy_setopt(easy, CURLOPT_SOCKOPTFUNCTION, &SockOptTrampoline);
  ------------------
  |  | 3363|  3.73k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
   75|  3.73k|}
_ZN12proto_fuzzer14MockServerBase20ConfigureRequestDataEPNS_19ScenarioRequestDataE:
   79|  3.73k|void MockServerBase::ConfigureRequestData(ScenarioRequestData* /*request_data*/) {}
_ZN12proto_fuzzer14MockServerBase13DriveScenarioEPvRKN4curl6fuzzer5proto8ScenarioEbb:
   86|  3.73k|                                       bool wake_multi) {
   87|       |  // Cache backpressure knobs so HandleOpenSocket can apply them the moment
   88|       |  // connection_ exists. Both default to 0, which matches the legacy "drain
   89|       |  // greedily, kernel-default buffers" behaviour exactly.
   90|  3.73k|  const auto& bp = scenario.connection().backpressure();
   91|  3.73k|  pending_recv_buf_bytes_ = static_cast<int>(bp.recv_buf_bytes());
   92|  3.73k|  pending_drain_limit_ = static_cast<std::size_t>(bp.drain_limit());
   93|       |
   94|  3.73k|  CURLM* multi = curl_multi_init();
   95|  3.73k|  if (multi == nullptr) {
  ------------------
  |  Branch (95:7): [True: 0, False: 3.73k]
  ------------------
   96|      0|    return CURLE_FAILED_INIT;
   97|      0|  }
   98|       |
   99|  3.73k|  CURLcode transfer_result = CURLE_FAILED_INIT;
  100|       |
  101|       |  // Callback data must survive both remove_handle and multi_cleanup, since
  102|       |  // either may emit CURL_POLL_REMOVE. Keeping it in this outer scope provides
  103|       |  // that lifetime without allocating per-watch state.
  104|  3.73k|  MultiSocketDriver socket_driver;
  105|  3.73k|  if (use_multi_socket && socket_driver.Install(multi)) {
  ------------------
  |  Branch (105:7): [True: 0, False: 3.73k]
  |  Branch (105:27): [True: 0, False: 0]
  ------------------
  106|      0|    multi_socket_driver_ = &socket_driver;
  107|      0|  }
  108|  3.73k|  if (curl_multi_add_handle(multi, easy) == CURLM_OK) {
  ------------------
  |  Branch (108:7): [True: 3.73k, False: 0]
  ------------------
  109|  3.73k|    if (wake_multi) {
  ------------------
  |  Branch (109:9): [True: 0, False: 3.73k]
  ------------------
  110|      0|      if (multi_socket_driver_ != nullptr) {
  ------------------
  |  Branch (110:11): [True: 0, False: 0]
  ------------------
  111|      0|        multi_socket_driver_->ProbeControlApis();
  112|      0|      } else {
  113|      0|        long timeout_ms = -1;
  114|      0|        (void)curl_multi_timeout(multi, &timeout_ms);
  115|      0|        (void)curl_multi_wakeup(multi);
  116|      0|      }
  117|      0|    }
  118|  3.73k|    RunLoop(multi, easy, scenario);
  119|       |
  120|       |    // Completion messages are the multi API's only durable record of the
  121|       |    // transfer result. Consume them while the easy handle is still attached:
  122|       |    // otherwise every scenario systematically skips curl_multi_info_read's
  123|       |    // result path and removal discards the opportunity. With one easy handle
  124|       |    // attached, this drain has at most one completion message regardless of
  125|       |    // fuzzed response size or redirect count.
  126|  3.73k|    int messages_remaining = 0;
  127|  3.73k|    CURLMsg* message = nullptr;
  128|  7.46k|    while ((message = curl_multi_info_read(multi, &messages_remaining)) != nullptr) {
  ------------------
  |  Branch (128:12): [True: 3.73k, False: 3.73k]
  ------------------
  129|  3.73k|      if (message->msg == CURLMSG_DONE && message->easy_handle == easy) {
  ------------------
  |  Branch (129:11): [True: 3.73k, False: 0]
  |  Branch (129:43): [True: 3.73k, False: 0]
  ------------------
  130|  3.73k|        transfer_result = message->data.result;
  131|  3.73k|      }
  132|  3.73k|    }
  133|       |
  134|  3.73k|    curl_multi_remove_handle(multi, easy);
  135|  3.73k|  }
  136|  3.73k|  curl_multi_cleanup(multi);
  137|  3.73k|  multi_socket_driver_ = nullptr;
  138|  3.73k|  return transfer_result;
  139|  3.73k|}
_ZN12proto_fuzzer14MockServerBase19multi_socket_driverEv:
  150|  3.73k|MultiSocketDriver* MockServerBase::multi_socket_driver() { return multi_socket_driver_; }
mock_server_base.cc:_ZN12proto_fuzzer12_GLOBAL__N_117SockOptTrampolineEPvi12curlsocktype:
   32|  3.62k|int SockOptTrampoline(void* /*clientp*/, curl_socket_t curlfd, curlsocktype purpose) {
   33|  3.62k|  if (purpose == CURLSOCKTYPE_ACCEPT) {
  ------------------
  |  Branch (33:7): [True: 0, False: 3.62k]
  ------------------
   34|      0|    return CURL_SOCKOPT_OK;
  ------------------
  |  |  420|      0|#define CURL_SOCKOPT_OK 0
  ------------------
   35|      0|  }
   36|       |
   37|  3.62k|  int socket_type = 0;
   38|  3.62k|  socklen_t socket_type_size = sizeof(socket_type);
   39|  3.62k|  if (getsockopt(curlfd, SOL_SOCKET, SO_TYPE, &socket_type, &socket_type_size) != 0) {
  ------------------
  |  Branch (39:7): [True: 0, False: 3.62k]
  ------------------
   40|      0|    return CURL_SOCKOPT_ERROR;
  ------------------
  |  |  421|      0|#define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return
  ------------------
   41|      0|  }
   42|  3.62k|  return socket_type == SOCK_DGRAM ? CURL_SOCKOPT_OK : CURL_SOCKOPT_ALREADY_CONNECTED;
  ------------------
  |  |  420|      0|#define CURL_SOCKOPT_OK 0
  ------------------
                return socket_type == SOCK_DGRAM ? CURL_SOCKOPT_OK : CURL_SOCKOPT_ALREADY_CONNECTED;
  ------------------
  |  |  423|  3.62k|#define CURL_SOCKOPT_ALREADY_CONNECTED 2
  ------------------
  |  Branch (42:10): [True: 0, False: 3.62k]
  ------------------
   43|  3.62k|}

_ZN12proto_fuzzer17MultiSocketDriverC2Ev:
   54|  3.73k|MultiSocketDriver::MultiSocketDriver() : multi_(nullptr), timeout_ms_(-1), timer_pending_(false), generation_(0) {}
_ZN12proto_fuzzer17MultiSocketDriverD2Ev:
   58|  3.73k|MultiSocketDriver::~MultiSocketDriver() = default;

_ZN12proto_fuzzer28CanonicalizeOptionValueCasesEPN4curl6fuzzer5proto8ScenarioE:
  152|  3.73k|void CanonicalizeOptionValueCases(curl::fuzzer::proto::Scenario* scenario) {
  153|  3.73k|  if (scenario == nullptr) {
  ------------------
  |  Branch (153:7): [True: 0, False: 3.73k]
  ------------------
  154|      0|    return;
  155|      0|  }
  156|  12.7k|  for (auto& option : *scenario->mutable_options()) {
  ------------------
  |  Branch (156:21): [True: 12.7k, False: 3.73k]
  ------------------
  157|  12.7k|    const OptionDescriptor* desc = LookupOptionDescriptor(option.option_id());
  158|  12.7k|    if (desc == nullptr) {
  ------------------
  |  Branch (158:9): [True: 628, False: 12.1k]
  ------------------
  159|    628|      continue;
  160|    628|    }
  161|       |
  162|  12.1k|    switch (desc->kind) {
  ------------------
  |  Branch (162:13): [True: 12.1k, False: 0]
  ------------------
  163|  4.77k|      case OptionValueKind::kString:
  ------------------
  |  Branch (163:7): [True: 4.77k, False: 7.34k]
  ------------------
  164|  4.77k|        if (option.value_case() != curl::fuzzer::proto::SetOption::kStringValue) {
  ------------------
  |  Branch (164:13): [True: 0, False: 4.77k]
  ------------------
  165|      0|          option.set_string_value("");
  166|      0|        }
  167|  4.77k|        if (desc->curlopt == CURLOPT_PINNEDPUBLICKEY) {
  ------------------
  |  Branch (167:13): [True: 0, False: 4.77k]
  ------------------
  168|      0|          ConstrainPinnedPublicKeyValue(option.mutable_string_value());
  169|      0|        }
  170|  4.77k|        break;
  171|  4.90k|      case OptionValueKind::kUint:
  ------------------
  |  Branch (171:7): [True: 4.90k, False: 7.20k]
  ------------------
  172|  4.90k|        if (option.value_case() != curl::fuzzer::proto::SetOption::kUintValue) {
  ------------------
  |  Branch (172:13): [True: 0, False: 4.90k]
  ------------------
  173|      0|          option.set_uint_value(DecodeIntegralValue(*desc, option));
  174|      0|        }
  175|  4.90k|        break;
  176|  2.43k|      case OptionValueKind::kBool:
  ------------------
  |  Branch (176:7): [True: 2.43k, False: 9.68k]
  ------------------
  177|  2.43k|        if (option.value_case() != curl::fuzzer::proto::SetOption::kBoolValue) {
  ------------------
  |  Branch (177:13): [True: 0, False: 2.43k]
  ------------------
  178|      0|          option.set_bool_value(DecodeIntegralValue(*desc, option) != 0);
  179|      0|        }
  180|  2.43k|        break;
  181|  12.1k|    }
  182|  12.1k|  }
  183|  3.73k|}
_ZN12proto_fuzzer20ApplyBaselineOptionsEPvN4curl6fuzzer5proto6SchemeE:
  192|  3.73k|struct curl_slist* ApplyBaselineOptions(CURL* easy, curl::fuzzer::proto::Scheme scheme) {
  193|  3.73k|  EnableDebugHttpTransportMetadata();
  194|       |
  195|  3.73k|  curl_easy_setopt(easy, CURLOPT_WRITEFUNCTION, &SilentWriteCallback);
  ------------------
  |  | 3363|  3.73k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  196|  3.73k|  curl_easy_setopt(easy, CURLOPT_HEADERFUNCTION, &SilentWriteCallback);
  ------------------
  |  | 3363|  3.73k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  197|       |
  198|  3.73k|  const bool user_requested_verbose = std::getenv(kVerboseEnvVar) != nullptr;
  199|  3.73k|  if (scheme == curl::fuzzer::proto::SCHEME_TELNET && !user_requested_verbose) {
  ------------------
  |  Branch (199:7): [True: 0, False: 3.73k]
  |  Branch (199:55): [True: 0, False: 0]
  ------------------
  200|       |    // printoption() and printsub() contain a substantial part of curl's TELNET
  201|       |    // parser diagnostics but run only in verbose mode. Keep those paths in the
  202|       |    // ordinary TELNET coverage lane while suppressing their high-volume text.
  203|       |    // An explicit FUZZ_VERBOSE still skips the sink so reproductions remain
  204|       |    // inspectable from the terminal.
  205|      0|    curl_easy_setopt(easy, CURLOPT_DEBUGFUNCTION, &SilentDebugCallback);
  ------------------
  |  | 3363|      0|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|      0|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  206|      0|    curl_easy_setopt(easy, CURLOPT_VERBOSE, 1L);
  ------------------
  |  | 3363|      0|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|      0|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  207|      0|  }
  208|       |
  209|       |  // Each non-HTTP protocol must use its dedicated peer invariants. Keep them
  210|       |  // out of the redirect allowlist so an HTTP response cannot switch a stream
  211|       |  // mock into synchronous TELNET, two-channel FTP, or datagram TFTP semantics.
  212|       |  // CURLOPT_PROTOCOLS_STR arrived in 7.85.0.
  213|  3.73k|  const char* direct_protocols = kEventDrivenProtocolsAllowed;
  214|  3.73k|  switch (scheme) {
  215|      0|    case curl::fuzzer::proto::SCHEME_TELNET:
  ------------------
  |  Branch (215:5): [True: 0, False: 3.73k]
  ------------------
  216|      0|      direct_protocols = kTelnetProtocolAllowed;
  217|      0|      break;
  218|      0|    case curl::fuzzer::proto::SCHEME_FTP:
  ------------------
  |  Branch (218:5): [True: 0, False: 3.73k]
  ------------------
  219|      0|      direct_protocols = kFtpProtocolAllowed;
  220|      0|      break;
  221|      0|    case curl::fuzzer::proto::SCHEME_TFTP:
  ------------------
  |  Branch (221:5): [True: 0, False: 3.73k]
  ------------------
  222|      0|      direct_protocols = kTftpProtocolAllowed;
  223|      0|      break;
  224|      0|    case curl::fuzzer::proto::SCHEME_HTTP:
  ------------------
  |  Branch (224:5): [True: 0, False: 3.73k]
  ------------------
  225|  3.73k|    case curl::fuzzer::proto::SCHEME_HTTPS:
  ------------------
  |  Branch (225:5): [True: 3.73k, False: 0]
  ------------------
  226|  3.73k|    case curl::fuzzer::proto::SCHEME_WS:
  ------------------
  |  Branch (226:5): [True: 0, False: 3.73k]
  ------------------
  227|  3.73k|    case curl::fuzzer::proto::SCHEME_WSS:
  ------------------
  |  Branch (227:5): [True: 0, False: 3.73k]
  ------------------
  228|  3.73k|    case curl::fuzzer::proto::SCHEME_UNSPECIFIED:
  ------------------
  |  Branch (228:5): [True: 0, False: 3.73k]
  ------------------
  229|  3.73k|    default:
  ------------------
  |  Branch (229:5): [True: 0, False: 3.73k]
  ------------------
  230|  3.73k|      break;
  231|  3.73k|  }
  232|  3.73k|  curl_easy_setopt(easy, CURLOPT_PROTOCOLS_STR, direct_protocols);
  ------------------
  |  | 3363|  3.73k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  233|  3.73k|  curl_easy_setopt(easy, CURLOPT_REDIR_PROTOCOLS_STR, kEventDrivenProtocolsAllowed);
  ------------------
  |  | 3363|  3.73k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  234|       |
  235|       |  // CONNECT_TO confines direct connections, but an ambient http_proxy or
  236|       |  // ALL_PROXY can select a proxy before curl asks the harness for a socket.
  237|       |  // An explicit empty proxy keeps every transfer inside the socketpair and
  238|       |  // makes replay independent of the machine running the fuzzer.
  239|  3.73k|  curl_easy_setopt(easy, CURLOPT_PROXY, "");
  ------------------
  |  | 3363|  3.73k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  240|       |
  241|       |  // Keep raw secure-scheme inputs independent of the host trust store,
  242|       |  // matching the legacy harness. The dedicated TLS mock installs its own
  243|       |  // in-memory trust anchor after this baseline; scenario options still run
  244|       |  // last and can deliberately select verification failures.
  245|  3.73k|  curl_easy_setopt(easy, CURLOPT_SSL_VERIFYPEER, 0L);
  ------------------
  |  | 3363|  3.73k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  246|       |
  247|       |  // Force every name lookup to the fuzzer's in-process mock peer. The caller
  248|       |  // owns the returned slist and must free it after curl_easy_cleanup.
  249|  3.73k|  struct curl_slist* connect_to = curl_slist_append(nullptr, kConnectToOverride);
  250|  3.73k|  curl_easy_setopt(easy, CURLOPT_CONNECT_TO, connect_to);
  ------------------
  |  | 3363|  3.73k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  251|       |
  252|       |  // Short bounds: fuzzing should never sit waiting on real I/O. Response
  253|       |  // volume is already bounded by libFuzzer's input-size limit, so do not rate
  254|       |  // limit receive traffic here: a global bytes-per-second throttle turns every
  255|       |  // otherwise-complete large response into wall-clock sleep.
  256|  3.73k|  curl_easy_setopt(easy, CURLOPT_CONNECTTIMEOUT_MS, kConnectTimeoutMs);
  ------------------
  |  | 3363|  3.73k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  257|  3.73k|  curl_easy_setopt(easy, CURLOPT_TIMEOUT_MS, kTimeoutMs);
  ------------------
  |  | 3363|  3.73k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  258|       |
  259|       |  // Keep every persistence/read path deterministic and prevent scenarios from
  260|       |  // leaking state onto the filesystem. COOKIEFILE also makes the in-memory
  261|       |  // engine's RELOAD command traverse its loader against a harmless empty
  262|       |  // source. These path options deliberately remain absent from the generated
  263|       |  // mutation manifest, so a proto cannot replace /dev/null.
  264|  3.73k|  curl_easy_setopt(easy, CURLOPT_COOKIEJAR, kDevNull);
  ------------------
  |  | 3363|  3.73k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  265|  3.73k|  curl_easy_setopt(easy, CURLOPT_COOKIEFILE, kDevNull);
  ------------------
  |  | 3363|  3.73k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  266|  3.73k|  curl_easy_setopt(easy, CURLOPT_ALTSVC, kDevNull);
  ------------------
  |  | 3363|  3.73k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  267|  3.73k|  curl_easy_setopt(easy, CURLOPT_HSTS, kDevNull);
  ------------------
  |  | 3363|  3.73k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  268|  3.73k|  curl_easy_setopt(easy, CURLOPT_NETRC_FILE, kDevNull);
  ------------------
  |  | 3363|  3.73k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  269|       |  // Do not set CRLFILE merely to mirror the legacy harness. An empty CRL is
  270|       |  // not a harmless sink: when a scenario restores certificate verification,
  271|       |  // OpenSSL rejects /dev/null before it can exercise useful handshake and
  272|       |  // verification paths. The option is absent from the mutation manifest, so
  273|       |  // leaving it unset introduces neither filesystem writes nor external input.
  274|       |
  275|       |  // Match the legacy TLV fuzzer: FUZZ_VERBOSE in the environment flips curl's
  276|       |  // own verbose logging on. Useful when reproducing a crashing corpus entry.
  277|  3.73k|  if (user_requested_verbose) {
  ------------------
  |  Branch (277:7): [True: 0, False: 3.73k]
  ------------------
  278|      0|    curl_easy_setopt(easy, CURLOPT_VERBOSE, 1L);
  ------------------
  |  | 3363|      0|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|      0|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  279|      0|  }
  280|  3.73k|  return connect_to;
  281|  3.73k|}
_ZN12proto_fuzzer14ApplySetOptionEPvRKN4curl6fuzzer5proto9SetOptionE:
  293|  12.7k|CURLcode ApplySetOption(CURL* easy, const curl::fuzzer::proto::SetOption& option) {
  294|  12.7k|  const OptionDescriptor* desc = LookupOptionDescriptor(option.option_id());
  295|  12.7k|  if (desc == nullptr) {
  ------------------
  |  Branch (295:7): [True: 628, False: 12.1k]
  ------------------
  296|    628|    return CURLE_UNKNOWN_OPTION;
  297|    628|  }
  298|       |
  299|  12.1k|  switch (desc->kind) {
  ------------------
  |  Branch (299:11): [True: 12.1k, False: 0]
  ------------------
  300|  4.77k|    case OptionValueKind::kString: {
  ------------------
  |  Branch (300:5): [True: 4.77k, False: 7.34k]
  ------------------
  301|  4.77k|      const std::string& value = option.string_value();
  302|       |
  303|       |      // POSTFIELDS borrows its pointer and accepts embedded NULs only when its
  304|       |      // size is explicit. Apply the size first so curl never observes the
  305|       |      // protobuf bytes with strlen semantics, even transiently.
  306|  4.77k|      if (desc->curlopt == CURLOPT_POSTFIELDS) {
  ------------------
  |  Branch (306:11): [True: 243, False: 4.52k]
  ------------------
  307|    243|        CURLcode result = curl_easy_setopt(easy, CURLOPT_POSTFIELDSIZE_LARGE, static_cast<curl_off_t>(value.size()));
  ------------------
  |  | 3363|    243|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|    243|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  308|    243|        if (result != CURLE_OK) {
  ------------------
  |  Branch (308:13): [True: 0, False: 243]
  ------------------
  309|      0|          return result;
  310|      0|        }
  311|    243|      }
  312|       |
  313|       |      // Curl otherwise treats this option as a filename during the TLS
  314|       |      // handshake. Fixed-policy inputs normally arrive pre-constrained by the
  315|       |      // postprocessor; this runtime check also protects compatibility inputs,
  316|       |      // which intentionally bypass it. Curl copies this option in setopt, so
  317|       |      // the temporary remains valid for the call's full ownership contract.
  318|  4.77k|      if (desc->curlopt == CURLOPT_PINNEDPUBLICKEY && !UsesInMemoryPublicKeyPin(value)) {
  ------------------
  |  Branch (318:11): [True: 0, False: 4.77k]
  |  Branch (318:55): [True: 0, False: 0]
  ------------------
  319|      0|        std::string constrained = value;
  320|      0|        ConstrainPinnedPublicKeyValue(&constrained);
  321|      0|        return curl_easy_setopt(easy, desc->curlopt, constrained.c_str());
  ------------------
  |  | 3363|      0|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|      0|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  322|      0|      }
  323|       |
  324|  4.77k|      return curl_easy_setopt(easy, desc->curlopt, value.c_str());
  ------------------
  |  | 3363|  4.77k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  4.77k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  325|  4.77k|    }
  326|       |
  327|       |    // Decode the uint_value and pass it as either a long or a curl_off_t depending on the option.
  328|  4.90k|    case OptionValueKind::kUint: {
  ------------------
  |  Branch (328:5): [True: 4.90k, False: 7.20k]
  ------------------
  329|  4.90k|      const std::uint64_t raw = DecodeIntegralValue(*desc, option);
  330|       |      // CURLOPTTYPE_OFF_T options start at 30000. Everything below takes a
  331|       |      // long; everything at/above takes a curl_off_t.
  332|  4.90k|      if (static_cast<int>(desc->curlopt) >= 30000) {
  ------------------
  |  Branch (332:11): [True: 698, False: 4.21k]
  ------------------
  333|    698|        return curl_easy_setopt(easy, desc->curlopt, static_cast<curl_off_t>(raw));
  ------------------
  |  | 3363|    698|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|    698|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  334|    698|      }
  335|  4.21k|      return curl_easy_setopt(easy, desc->curlopt, static_cast<long>(raw));
  ------------------
  |  | 3363|  4.21k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  4.21k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  336|  4.90k|    }
  337|       |
  338|       |    // Decode the bool_value and pass it as a long flag (0 or 1).
  339|  2.43k|    case OptionValueKind::kBool: {
  ------------------
  |  Branch (339:5): [True: 2.43k, False: 9.68k]
  ------------------
  340|  2.43k|      const long flag = static_cast<long>(DecodeIntegralValue(*desc, option));
  341|  2.43k|      return curl_easy_setopt(easy, desc->curlopt, flag);
  ------------------
  |  | 3363|  2.43k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  2.43k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  342|  4.90k|    }
  343|  12.1k|  }
  344|      0|  return CURLE_UNKNOWN_OPTION;
  345|  12.1k|}
_ZN12proto_fuzzer18RuntimeOptionCountERKN4curl6fuzzer5proto8ScenarioE:
  349|  7.08k|std::size_t RuntimeOptionCount(const curl::fuzzer::proto::Scenario& scenario) {
  350|  7.08k|  return std::min<std::size_t>(static_cast<std::size_t>(scenario.options_size()), scenario_limits::kMaxOptions);
  351|  7.08k|}
_ZN12proto_fuzzer20ApplyScenarioOptionsEPvRKN4curl6fuzzer5proto8ScenarioE:
  356|  3.73k|std::size_t ApplyScenarioOptions(CURL* easy, const curl::fuzzer::proto::Scenario& scenario) {
  357|  3.73k|  const std::size_t option_count = RuntimeOptionCount(scenario);
  358|  16.4k|  for (std::size_t index = 0; index < option_count; ++index) {
  ------------------
  |  Branch (358:31): [True: 12.7k, False: 3.73k]
  ------------------
  359|  12.7k|    (void)ApplySetOption(easy, scenario.options(static_cast<int>(index)));
  360|  12.7k|  }
  361|  3.73k|  return option_count;
  362|  3.73k|}
option_apply.cc:_ZN12proto_fuzzer12_GLOBAL__N_119DecodeIntegralValueERKNS_16OptionDescriptorERKN4curl6fuzzer5proto9SetOptionE:
  115|  7.34k|std::uint64_t DecodeIntegralValue(const OptionDescriptor& descriptor, const curl::fuzzer::proto::SetOption& option) {
  116|  7.34k|  if (descriptor.kind == OptionValueKind::kString) {
  ------------------
  |  Branch (116:7): [True: 0, False: 7.34k]
  ------------------
  117|      0|    return 0;
  118|      0|  }
  119|  7.34k|  switch (option.value_case()) {
  ------------------
  |  Branch (119:11): [True: 7.34k, False: 0]
  ------------------
  120|  2.43k|    case curl::fuzzer::proto::SetOption::kBoolValue:
  ------------------
  |  Branch (120:5): [True: 2.43k, False: 4.90k]
  ------------------
  121|  2.43k|      return option.bool_value() ? 1U : 0U;
  ------------------
  |  Branch (121:14): [True: 832, False: 1.60k]
  ------------------
  122|  4.90k|    case curl::fuzzer::proto::SetOption::kUintValue:
  ------------------
  |  Branch (122:5): [True: 4.90k, False: 2.43k]
  ------------------
  123|  4.90k|      if (descriptor.kind == OptionValueKind::kBool) {
  ------------------
  |  Branch (123:11): [True: 0, False: 4.90k]
  ------------------
  124|      0|        return option.uint_value() != 0 ? 1U : 0U;
  ------------------
  |  Branch (124:16): [True: 0, False: 0]
  ------------------
  125|      0|      }
  126|  4.90k|      return option.uint_value();
  127|      0|    case curl::fuzzer::proto::SetOption::kStringValue:
  ------------------
  |  Branch (127:5): [True: 0, False: 7.34k]
  ------------------
  128|      0|    case curl::fuzzer::proto::SetOption::VALUE_NOT_SET:
  ------------------
  |  Branch (128:5): [True: 0, False: 7.34k]
  ------------------
  129|      0|      return 0;
  130|  7.34k|  }
  131|      0|  return 0;
  132|  7.34k|}
option_apply.cc:_ZN12proto_fuzzer12_GLOBAL__N_132EnableDebugHttpTransportMetadataEv:
   95|  3.73k|void EnableDebugHttpTransportMetadata() {
   96|  3.73k|  static const bool configured = [] {
   97|       |    // CMake builds the fuzzing copy of curl with ENABLE_DEBUG specifically so
   98|       |    // these curl-provided test hooks are available. Do not overwrite values a
   99|       |    // reproducer deliberately supplied in its environment.
  100|  3.73k|    (void)setenv(kAltSvcHttpEnvVar, "1", 0);
  101|  3.73k|    (void)setenv(kHstsHttpEnvVar, "1", 0);
  102|  3.73k|    return true;
  103|  3.73k|  }();
  104|  3.73k|  (void)configured;
  105|  3.73k|}
option_apply.cc:_ZZN12proto_fuzzer12_GLOBAL__N_132EnableDebugHttpTransportMetadataEvENK3$_0clEv:
   96|      1|  static const bool configured = [] {
   97|       |    // CMake builds the fuzzing copy of curl with ENABLE_DEBUG specifically so
   98|       |    // these curl-provided test hooks are available. Do not overwrite values a
   99|       |    // reproducer deliberately supplied in its environment.
  100|      1|    (void)setenv(kAltSvcHttpEnvVar, "1", 0);
  101|      1|    (void)setenv(kHstsHttpEnvVar, "1", 0);
  102|      1|    return true;
  103|      1|  }();
option_apply.cc:_ZN12proto_fuzzer12_GLOBAL__N_119SilentWriteCallbackEPvmmS1_:
   81|    210|size_t SilentWriteCallback(void* /*contents*/, size_t size, size_t nmemb, void* /*userdata*/) { return size * nmemb; }

_ZN12proto_fuzzer17UploadScriptStateC2ERKN4curl6fuzzer5proto8ScenarioE:
  225|  3.73k|    : data_(),
  226|  3.73k|      read_step_count_(0),
  227|  3.73k|      total_size_(scenario.scheme() == curl::fuzzer::proto::SCHEME_TELNET ? 0 : scenario_limits::kMaxUploadBytes),
  ------------------
  |  Branch (227:19): [True: 0, False: 3.73k]
  ------------------
  228|  3.73k|      max_read_size_(scenario.scheme() == curl::fuzzer::proto::SCHEME_TELNET ? scenario_limits::kMaxTelnetUploadReadSize
  ------------------
  |  Branch (228:22): [True: 0, False: 3.73k]
  ------------------
  229|  3.73k|                                                                             : scenario_limits::kMaxUploadReadSize),
  230|  3.73k|      offset_(0),
  231|  3.73k|      next_read_size_(0),
  232|  3.73k|      terminal_(curl::fuzzer::proto::UPLOAD_TERMINAL_EOF),
  233|  3.73k|      seek_result_(curl::fuzzer::proto::UPLOAD_SEEK_CANTSEEK),
  234|  3.73k|      before_read_callback_(nullptr),
  235|  3.73k|      before_read_userdata_(nullptr),
  236|  3.73k|      scripted_(scenario.has_upload()) {
  237|  3.73k|  if (!scripted_) {
  ------------------
  |  Branch (237:7): [True: 3.35k, False: 381]
  ------------------
  238|  3.35k|    return;
  239|  3.35k|  }
  240|       |
  241|    381|  const auto& upload = scenario.upload();
  242|    381|  const std::size_t data_limit = scenario.scheme() == curl::fuzzer::proto::SCHEME_TELNET
  ------------------
  |  Branch (242:34): [True: 0, False: 381]
  ------------------
  243|    381|                                     ? scenario_limits::kMaxTelnetUploadBytes
  244|    381|                                     : scenario_limits::kMaxUploadBytes;
  245|    381|  const std::size_t data_size = std::min(upload.data().size(), data_limit);
  246|    381|  data_ = std::string_view(upload.data().data(), data_size);
  247|    381|  total_size_ = data_.size();
  248|    381|  terminal_ = upload.terminal();
  249|    381|  if (scenario.scheme() != curl::fuzzer::proto::SCHEME_TELNET &&
  ------------------
  |  Branch (249:7): [True: 381, False: 0]
  ------------------
  250|    381|      terminal_ == curl::fuzzer::proto::UPLOAD_TERMINAL_PAUSE) {
  ------------------
  |  Branch (250:7): [True: 0, False: 381]
  ------------------
  251|       |    // Event-driven protocols need an external resume source. Interpret this
  252|       |    // TELNET-specific outcome as EOF before curl can retain a paused transfer.
  253|      0|    terminal_ = curl::fuzzer::proto::UPLOAD_TERMINAL_EOF;
  254|      0|  }
  255|    381|  seek_result_ = upload.seek_result();
  256|       |
  257|    381|  const std::size_t read_step_limit = scenario.scheme() == curl::fuzzer::proto::SCHEME_TELNET
  ------------------
  |  Branch (257:39): [True: 0, False: 381]
  ------------------
  258|    381|                                          ? scenario_limits::kMaxTelnetUploadReadSteps
  259|    381|                                          : scenario_limits::kMaxUploadReadSteps;
  260|    381|  read_step_count_ = std::min<std::size_t>(upload.read_sizes_size(), read_step_limit);
  261|    878|  for (std::size_t i = 0; i < read_step_count_; ++i) {
  ------------------
  |  Branch (261:27): [True: 497, False: 381]
  ------------------
  262|    497|    const std::size_t requested = upload.read_sizes(static_cast<int>(i));
  263|       |    // Zero-as-one ensures every retained step makes progress; see the schema
  264|       |    // comment for why zero is not treated as an early EOF sentinel.
  265|    497|    read_sizes_[i] = std::max<std::size_t>(1, std::min(requested, max_read_size_));
  266|    497|  }
  267|    381|}
_ZN12proto_fuzzer17UploadScriptState4ReadEPcm:
  272|      2|std::size_t UploadScriptState::Read(char* buffer, std::size_t capacity) {
  273|       |  // TELNET can produce negotiation replies while one curl_multi_perform call
  274|       |  // owns the thread. Empty them before returning more callback bytes;
  275|       |  // otherwise send_telnet_data() can consume the whole bounded transfer
  276|       |  // timeout while the synchronous path waits for socket capacity.
  277|      2|  if (before_read_callback_ != nullptr) {
  ------------------
  |  Branch (277:7): [True: 0, False: 2]
  ------------------
  278|      0|    before_read_callback_(before_read_userdata_);
  279|      0|  }
  280|      2|  if (offset_ >= total_size_) {
  ------------------
  |  Branch (280:7): [True: 1, False: 1]
  ------------------
  281|      1|    switch (terminal_) {
  282|      0|      case curl::fuzzer::proto::UPLOAD_TERMINAL_ABORT:
  ------------------
  |  Branch (282:7): [True: 0, False: 1]
  ------------------
  283|      0|        return CURL_READFUNC_ABORT;
  ------------------
  |  |  392|      0|#define CURL_READFUNC_ABORT 0x10000000
  ------------------
  284|      0|      case curl::fuzzer::proto::UPLOAD_TERMINAL_PAUSE:
  ------------------
  |  Branch (284:7): [True: 0, False: 1]
  ------------------
  285|      0|        return CURL_READFUNC_PAUSE;
  ------------------
  |  |  395|      0|#define CURL_READFUNC_PAUSE 0x10000001
  ------------------
  286|      1|      case curl::fuzzer::proto::UPLOAD_TERMINAL_EOF:
  ------------------
  |  Branch (286:7): [True: 1, False: 0]
  ------------------
  287|      1|      default:
  ------------------
  |  Branch (287:7): [True: 0, False: 1]
  ------------------
  288|      1|        return 0;
  289|      1|    }
  290|      1|  }
  291|      1|  if (buffer == nullptr || capacity == 0) {
  ------------------
  |  Branch (291:7): [True: 0, False: 1]
  |  Branch (291:28): [True: 0, False: 1]
  ------------------
  292|      0|    return 0;
  293|      0|  }
  294|       |
  295|      1|  std::size_t chunk_limit = std::min(capacity, max_read_size_);
  296|      1|  if (next_read_size_ < read_step_count_) {
  ------------------
  |  Branch (296:7): [True: 0, False: 1]
  ------------------
  297|      0|    chunk_limit = std::min(chunk_limit, read_sizes_[next_read_size_++]);
  298|      0|  }
  299|      1|  const std::size_t count = std::min(chunk_limit, total_size_ - offset_);
  300|      1|  if (scripted_) {
  ------------------
  |  Branch (300:7): [True: 0, False: 1]
  ------------------
  301|      0|    std::memcpy(buffer, data_.data() + offset_, count);
  302|      1|  } else {
  303|      1|    std::memset(buffer, 'U', count);
  304|      1|  }
  305|      1|  offset_ += count;
  306|      1|  return count;
  307|      1|}
_ZN12proto_fuzzer17UploadScriptState12ReadCallbackEPcmmPv:
  354|      2|std::size_t UploadScriptState::ReadCallback(char* buffer, std::size_t size, std::size_t nitems, void* userdata) {
  355|      2|  if (userdata == nullptr || size == 0 || nitems == 0) {
  ------------------
  |  Branch (355:7): [True: 0, False: 2]
  |  Branch (355:30): [True: 0, False: 2]
  |  Branch (355:43): [True: 0, False: 2]
  ------------------
  356|      0|    return 0;
  357|      0|  }
  358|      2|  const std::size_t max = std::numeric_limits<std::size_t>::max();
  359|      2|  if (nitems > max / size) {
  ------------------
  |  Branch (359:7): [True: 0, False: 2]
  ------------------
  360|      0|    return CURL_READFUNC_ABORT;
  ------------------
  |  |  392|      0|#define CURL_READFUNC_ABORT 0x10000000
  ------------------
  361|      0|  }
  362|      2|  return static_cast<UploadScriptState*>(userdata)->Read(buffer, size * nitems);
  363|      2|}
_ZN12proto_fuzzer19ScenarioRequestDataC2EPvRKN4curl6fuzzer5proto8ScenarioE:
  392|  3.73k|    : easy_(easy),
  393|  3.73k|      request_headers_(nullptr),
  394|  3.73k|      telnet_options_(nullptr),
  395|  3.73k|      mime_post_(nullptr),
  396|  3.73k|      upload_state_(scenario),
  397|  3.73k|      upload_callbacks_installed_(false) {
  398|  3.73k|  if (easy_ == nullptr) {
  ------------------
  |  Branch (398:7): [True: 0, False: 3.73k]
  ------------------
  399|      0|    return;
  400|      0|  }
  401|       |
  402|  3.73k|  if (NeedsUploadCallbacks(scenario)) {
  ------------------
  |  Branch (402:7): [True: 523, False: 3.21k]
  ------------------
  403|       |    // Install a per-run memory source even when Scenario.upload is absent but
  404|       |    // CURLOPT_UPLOAD or TELNET may request caller input. Non-TELNET schemes
  405|       |    // retain the historical fallback bytes; TELNET returns EOF. Either result
  406|       |    // replaces stdin and cannot block OSS-Fuzz. The state remains scoped to
  407|       |    // the complete drive so retries cannot share a cursor across iterations.
  408|    523|    upload_callbacks_installed_ = true;
  409|    523|    (void)curl_easy_setopt(easy_, CURLOPT_READFUNCTION, &UploadScriptState::ReadCallback);
  ------------------
  |  | 3363|    523|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|    523|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  410|    523|    (void)curl_easy_setopt(easy_, CURLOPT_READDATA, &upload_state_);
  ------------------
  |  | 3363|    523|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|    523|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  411|    523|    (void)curl_easy_setopt(easy_, CURLOPT_SEEKFUNCTION, &UploadScriptState::SeekCallback);
  ------------------
  |  | 3363|    523|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|    523|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  412|    523|    (void)curl_easy_setopt(easy_, CURLOPT_SEEKDATA, &upload_state_);
  ------------------
  |  | 3363|    523|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|    523|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  413|    523|  }
  414|       |
  415|       |  // HTTP headers/MIME and TELNET options are mutually exclusive because only
  416|       |  // the selected protocol can observe them. Avoid allocating protocol-inert
  417|       |  // lists and trees in compatibility inputs that bypass target policy.
  418|  3.73k|  if (scenario.scheme() == curl::fuzzer::proto::SCHEME_TELNET) {
  ------------------
  |  Branch (418:7): [True: 0, False: 3.73k]
  ------------------
  419|      0|    telnet_options_ = BuildStringList(scenario.telnet_options(), scenario_limits::kMaxTelnetOptions,
  420|      0|                                      scenario_limits::kMaxTelnetOptionBytes, &stats_.telnet_options);
  421|      0|    if (telnet_options_ != nullptr) {
  ------------------
  |  Branch (421:9): [True: 0, False: 0]
  ------------------
  422|      0|      (void)curl_easy_setopt(easy_, CURLOPT_TELNETOPTIONS, telnet_options_);
  ------------------
  |  | 3363|      0|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|      0|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  423|      0|    }
  424|  3.73k|  } else {
  425|  3.73k|    request_headers_ = BuildStringList(scenario.request_headers(), scenario_limits::kMaxRequestHeaders,
  426|  3.73k|                                       scenario_limits::kMaxMetadataBytes, &stats_.request_headers);
  427|  3.73k|    if (request_headers_ != nullptr) {
  ------------------
  |  Branch (427:9): [True: 579, False: 3.15k]
  ------------------
  428|    579|      (void)curl_easy_setopt(easy_, CURLOPT_HTTPHEADER, request_headers_);
  ------------------
  |  | 3363|    579|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|    579|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  429|    579|    }
  430|       |
  431|  3.73k|    if (scenario.has_mime_post()) {
  ------------------
  |  Branch (431:9): [True: 638, False: 3.09k]
  ------------------
  432|    638|      mime_post_ = BuildMimePost(easy_, scenario.mime_post(), &stats_);
  433|    638|      if (mime_post_ != nullptr) {
  ------------------
  |  Branch (433:11): [True: 638, False: 0]
  ------------------
  434|    638|        (void)curl_easy_setopt(easy_, CURLOPT_MIMEPOST, mime_post_);
  ------------------
  |  | 3363|    638|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|    638|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  435|    638|      }
  436|    638|    }
  437|  3.73k|  }
  438|  3.73k|}
_ZN12proto_fuzzer19ScenarioRequestDataD2Ev:
  444|  3.73k|ScenarioRequestData::~ScenarioRequestData() {
  445|  3.73k|  if (easy_ != nullptr) {
  ------------------
  |  Branch (445:7): [True: 3.73k, False: 0]
  ------------------
  446|       |    // Clear callbacks before their userdata member is destroyed. There is no
  447|       |    // perform in this destructor, but making the handle non-dangling keeps the
  448|       |    // ownership rule robust if cleanup later gains diagnostics or getinfo.
  449|  3.73k|    if (upload_callbacks_installed_) {
  ------------------
  |  Branch (449:9): [True: 523, False: 3.21k]
  ------------------
  450|    523|      (void)curl_easy_setopt(easy_, CURLOPT_SEEKFUNCTION, nullptr);
  ------------------
  |  | 3363|    523|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|    523|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  451|    523|      (void)curl_easy_setopt(easy_, CURLOPT_SEEKDATA, nullptr);
  ------------------
  |  | 3363|    523|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|    523|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  452|    523|      (void)curl_easy_setopt(easy_, CURLOPT_READFUNCTION, nullptr);
  ------------------
  |  | 3363|    523|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|    523|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  453|    523|      (void)curl_easy_setopt(easy_, CURLOPT_READDATA, nullptr);
  ------------------
  |  | 3363|    523|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|    523|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  454|    523|    }
  455|  3.73k|    if (mime_post_ != nullptr) {
  ------------------
  |  Branch (455:9): [True: 638, False: 3.09k]
  ------------------
  456|    638|      (void)curl_easy_setopt(easy_, CURLOPT_MIMEPOST, nullptr);
  ------------------
  |  | 3363|    638|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|    638|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  457|    638|    }
  458|  3.73k|    if (request_headers_ != nullptr) {
  ------------------
  |  Branch (458:9): [True: 579, False: 3.15k]
  ------------------
  459|    579|      (void)curl_easy_setopt(easy_, CURLOPT_HTTPHEADER, nullptr);
  ------------------
  |  | 3363|    579|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|    579|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  460|    579|    }
  461|  3.73k|    if (telnet_options_ != nullptr) {
  ------------------
  |  Branch (461:9): [True: 0, False: 3.73k]
  ------------------
  462|      0|      (void)curl_easy_setopt(easy_, CURLOPT_TELNETOPTIONS, nullptr);
  ------------------
  |  | 3363|      0|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|      0|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  463|      0|    }
  464|  3.73k|  }
  465|  3.73k|  curl_mime_free(mime_post_);
  466|  3.73k|  curl_slist_free_all(telnet_options_);
  467|  3.73k|  curl_slist_free_all(request_headers_);
  468|  3.73k|}
request_data.cc:_ZN12proto_fuzzer12_GLOBAL__N_120NeedsUploadCallbacksERKN4curl6fuzzer5proto8ScenarioE:
   46|  3.73k|bool NeedsUploadCallbacks(const curl::fuzzer::proto::Scenario& scenario) {
   47|       |  // curl's TELNET implementation polls stdin unless a READFUNCTION was
   48|       |  // explicitly installed. Always provide the bounded per-scenario source,
   49|       |  // even when there is no upload payload to send.
   50|  3.73k|  if (scenario.scheme() == curl::fuzzer::proto::SCHEME_TELNET || scenario.has_upload()) {
  ------------------
  |  Branch (50:7): [True: 0, False: 3.73k]
  |  Branch (50:66): [True: 381, False: 3.35k]
  ------------------
   51|    381|    return true;
   52|    381|  }
   53|  3.35k|  const std::size_t option_count = RuntimeOptionCount(scenario);
   54|  13.0k|  for (std::size_t index = 0; index < option_count; ++index) {
  ------------------
  |  Branch (54:31): [True: 9.79k, False: 3.21k]
  ------------------
   55|  9.79k|    const auto& option = scenario.options(static_cast<int>(index));
   56|  9.79k|    if (option.option_id() == curl::fuzzer::proto::CURLOPT_UPLOAD ||
  ------------------
  |  Branch (56:9): [True: 71, False: 9.72k]
  ------------------
   57|  9.72k|        option.option_id() == curl::fuzzer::proto::CURLOPT_POST) {
  ------------------
  |  Branch (57:9): [True: 71, False: 9.65k]
  ------------------
   58|    142|      return true;
   59|    142|    }
   60|  9.79k|  }
   61|  3.21k|  return false;
   62|  3.35k|}
request_data.cc:_ZN12proto_fuzzer12_GLOBAL__N_113BuildMimePostEPvRKN4curl6fuzzer5proto8MimePostEPNS_17RequestBuildStatsE:
  175|    638|curl_mime* BuildMimePost(CURL* easy, const curl::fuzzer::proto::MimePost& source, RequestBuildStats* stats) {
  176|    638|  curl_mime* mime = curl_mime_init(easy);
  177|    638|  if (mime == nullptr) {
  ------------------
  |  Branch (177:7): [True: 0, False: 638]
  ------------------
  178|      0|    return nullptr;
  179|      0|  }
  180|       |
  181|    638|  std::size_t remaining_parts = scenario_limits::kMaxTotalMimeParts;
  182|    638|  const std::size_t count = std::min<std::size_t>(scenario_limits::kMaxTopLevelMimeParts, source.parts_size());
  183|  2.19k|  for (std::size_t i = 0; i < count && remaining_parts != 0; ++i) {
  ------------------
  |  Branch (183:27): [True: 1.55k, False: 638]
  |  Branch (183:40): [True: 1.55k, False: 0]
  ------------------
  184|  1.55k|    curl_mimepart* part = curl_mime_addpart(mime);
  185|  1.55k|    if (part == nullptr) {
  ------------------
  |  Branch (185:9): [True: 0, False: 1.55k]
  ------------------
  186|      0|      break;
  187|      0|    }
  188|  1.55k|    --remaining_parts;
  189|  1.55k|    ++stats->mime_parts;
  190|  1.55k|    const auto& proto_part = source.parts(static_cast<int>(i));
  191|  1.55k|    ApplyPartMetadata(part, proto_part, stats);
  192|       |
  193|  1.55k|    switch (proto_part.content_case()) {
  194|    189|      case curl::fuzzer::proto::MimePart::kData:
  ------------------
  |  Branch (194:7): [True: 189, False: 1.37k]
  ------------------
  195|    189|        ApplyPartData(part, proto_part.data());
  196|    189|        break;
  197|    772|      case curl::fuzzer::proto::MimePart::kSubparts: {
  ------------------
  |  Branch (197:7): [True: 772, False: 787]
  ------------------
  198|    772|        curl_mime* subparts = curl_mime_init(easy);
  199|    772|        if (subparts == nullptr) {
  ------------------
  |  Branch (199:13): [True: 0, False: 772]
  ------------------
  200|      0|          break;
  201|      0|        }
  202|    772|        PopulateSubparts(subparts, proto_part.subparts(), &remaining_parts, stats);
  203|    772|        if (curl_mime_subparts(part, subparts) != CURLE_OK) {
  ------------------
  |  Branch (203:13): [True: 0, False: 772]
  ------------------
  204|      0|          curl_mime_free(subparts);
  205|      0|        }
  206|    772|        break;
  207|    772|      }
  208|    598|      case curl::fuzzer::proto::MimePart::CONTENT_NOT_SET:
  ------------------
  |  Branch (208:7): [True: 598, False: 961]
  ------------------
  209|    598|      default:
  ------------------
  |  Branch (209:7): [True: 0, False: 1.55k]
  ------------------
  210|    598|        break;
  211|  1.55k|    }
  212|  1.55k|  }
  213|    638|  return mime;
  214|    638|}
request_data.cc:_ZN12proto_fuzzer12_GLOBAL__N_117ApplyPartMetadataIN4curl6fuzzer5proto8MimePartEEEvP13curl_mimepartRKT_PNS_17RequestBuildStatsE:
  111|  1.55k|void ApplyPartMetadata(curl_mimepart* part, const ProtoPart& source, RequestBuildStats* stats) {
  112|       |  // Reuse the rare compatibility-path allocation across all three fields;
  113|       |  // ordinary postprocessed metadata never writes this scratch string.
  114|  1.55k|  std::string truncated;
  115|  1.55k|  if (!source.name().empty()) {
  ------------------
  |  Branch (115:7): [True: 516, False: 1.04k]
  ------------------
  116|    516|    (void)curl_mime_name(part, BoundedCString(source.name(), scenario_limits::kMaxMetadataBytes, &truncated));
  117|    516|  }
  118|  1.55k|  if (!source.filename().empty()) {
  ------------------
  |  Branch (118:7): [True: 435, False: 1.12k]
  ------------------
  119|    435|    (void)curl_mime_filename(part, BoundedCString(source.filename(), scenario_limits::kMaxMetadataBytes, &truncated));
  120|    435|  }
  121|  1.55k|  if (!source.content_type().empty()) {
  ------------------
  |  Branch (121:7): [True: 461, False: 1.09k]
  ------------------
  122|    461|    (void)curl_mime_type(part, BoundedCString(source.content_type(), scenario_limits::kMaxMetadataBytes, &truncated));
  123|    461|  }
  124|  1.55k|  if (const char* encoder = MimeEncoderName(source.encoder())) {
  ------------------
  |  Branch (124:19): [True: 537, False: 1.02k]
  ------------------
  125|    537|    (void)curl_mime_encoder(part, encoder);
  126|    537|  }
  127|       |
  128|  1.55k|  std::size_t header_count = 0;
  129|  1.55k|  curl_slist* headers = BuildStringList(source.headers(), scenario_limits::kMaxMimeHeadersPerPart,
  130|  1.55k|                                        scenario_limits::kMaxMetadataBytes, &header_count);
  131|  1.55k|  if (headers != nullptr) {
  ------------------
  |  Branch (131:7): [True: 486, False: 1.07k]
  ------------------
  132|       |    // take_ownership=1 is crucial: unlike the strings above, MIME retains the
  133|       |    // list pointer. Once attached, the root curl_mime_free call recursively
  134|       |    // releases it, including lists on nested parts.
  135|    486|    const CURLcode result = curl_mime_headers(part, headers, 1);
  136|    486|    if (result == CURLE_OK) {
  ------------------
  |  Branch (136:9): [True: 486, False: 0]
  ------------------
  137|    486|      stats->mime_headers += header_count;
  138|    486|    } else {
  139|      0|      curl_slist_free_all(headers);
  140|      0|    }
  141|    486|  }
  142|  1.55k|}
request_data.cc:_ZN12proto_fuzzer12_GLOBAL__N_114BoundedCStringERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEmPS7_:
   32|  8.21k|const char* BoundedCString(const std::string& value, std::size_t limit, std::string* truncated) {
   33|  8.21k|  if (value.size() <= limit) {
  ------------------
  |  Branch (33:7): [True: 8.21k, False: 0]
  ------------------
   34|  8.21k|    return value.c_str();
   35|  8.21k|  }
   36|      0|  truncated->assign(value.data(), limit);
   37|      0|  return truncated->c_str();
   38|  8.21k|}
request_data.cc:_ZN12proto_fuzzer12_GLOBAL__N_115MimeEncoderNameEN4curl6fuzzer5proto11MimeEncoderE:
   67|  3.36k|const char* MimeEncoderName(curl::fuzzer::proto::MimeEncoder encoder) {
   68|  3.36k|  switch (encoder) {
   69|    257|    case curl::fuzzer::proto::MIME_ENCODER_BINARY:
  ------------------
  |  Branch (69:5): [True: 257, False: 3.10k]
  ------------------
   70|    257|      return "binary";
   71|    231|    case curl::fuzzer::proto::MIME_ENCODER_8BIT:
  ------------------
  |  Branch (71:5): [True: 231, False: 3.13k]
  ------------------
   72|    231|      return "8bit";
   73|    278|    case curl::fuzzer::proto::MIME_ENCODER_7BIT:
  ------------------
  |  Branch (73:5): [True: 278, False: 3.08k]
  ------------------
   74|    278|      return "7bit";
   75|    238|    case curl::fuzzer::proto::MIME_ENCODER_BASE64:
  ------------------
  |  Branch (75:5): [True: 238, False: 3.12k]
  ------------------
   76|    238|      return "base64";
   77|    405|    case curl::fuzzer::proto::MIME_ENCODER_QUOTED_PRINTABLE:
  ------------------
  |  Branch (77:5): [True: 405, False: 2.95k]
  ------------------
   78|    405|      return "quoted-printable";
   79|  1.95k|    case curl::fuzzer::proto::MIME_ENCODER_UNSPECIFIED:
  ------------------
  |  Branch (79:5): [True: 1.95k, False: 1.40k]
  ------------------
   80|  1.95k|    default:
  ------------------
  |  Branch (80:5): [True: 0, False: 3.36k]
  ------------------
   81|  1.95k|      return nullptr;
   82|  3.36k|  }
   83|  3.36k|}
request_data.cc:_ZN12proto_fuzzer12_GLOBAL__N_113ApplyPartDataEP13curl_mimepartRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
  147|  1.99k|void ApplyPartData(curl_mimepart* part, const std::string& data) {
  148|  1.99k|  const std::size_t size = std::min(data.size(), scenario_limits::kMaxMimeDataBytes);
  149|  1.99k|  const char* bytes = data.empty() ? "" : data.data();
  ------------------
  |  Branch (149:23): [True: 1.20k, False: 792]
  ------------------
  150|  1.99k|  (void)curl_mime_data(part, bytes, size);
  151|  1.99k|}
request_data.cc:_ZN12proto_fuzzer12_GLOBAL__N_116PopulateSubpartsEP9curl_mimeRKN4curl6fuzzer5proto12MimeSubpartsEPmPNS_17RequestBuildStatsE:
  157|    772|                      RequestBuildStats* stats) {
  158|    772|  const std::size_t count = std::min<std::size_t>(scenario_limits::kMaxNestedMimeParts, source.parts_size());
  159|  2.57k|  for (std::size_t i = 0; i < count && *remaining_parts != 0; ++i) {
  ------------------
  |  Branch (159:27): [True: 1.80k, False: 772]
  |  Branch (159:40): [True: 1.80k, False: 0]
  ------------------
  160|  1.80k|    curl_mimepart* part = curl_mime_addpart(mime);
  161|  1.80k|    if (part == nullptr) {
  ------------------
  |  Branch (161:9): [True: 0, False: 1.80k]
  ------------------
  162|      0|      break;
  163|      0|    }
  164|  1.80k|    --*remaining_parts;
  165|  1.80k|    ++stats->mime_parts;
  166|  1.80k|    const auto& proto_part = source.parts(static_cast<int>(i));
  167|  1.80k|    ApplyPartMetadata(part, proto_part, stats);
  168|  1.80k|    ApplyPartData(part, proto_part.data());
  169|  1.80k|  }
  170|    772|}
request_data.cc:_ZN12proto_fuzzer12_GLOBAL__N_117ApplyPartMetadataIN4curl6fuzzer5proto12MimeDataPartEEEvP13curl_mimepartRKT_PNS_17RequestBuildStatsE:
  111|  1.80k|void ApplyPartMetadata(curl_mimepart* part, const ProtoPart& source, RequestBuildStats* stats) {
  112|       |  // Reuse the rare compatibility-path allocation across all three fields;
  113|       |  // ordinary postprocessed metadata never writes this scratch string.
  114|  1.80k|  std::string truncated;
  115|  1.80k|  if (!source.name().empty()) {
  ------------------
  |  Branch (115:7): [True: 679, False: 1.12k]
  ------------------
  116|    679|    (void)curl_mime_name(part, BoundedCString(source.name(), scenario_limits::kMaxMetadataBytes, &truncated));
  117|    679|  }
  118|  1.80k|  if (!source.filename().empty()) {
  ------------------
  |  Branch (118:7): [True: 626, False: 1.17k]
  ------------------
  119|    626|    (void)curl_mime_filename(part, BoundedCString(source.filename(), scenario_limits::kMaxMetadataBytes, &truncated));
  120|    626|  }
  121|  1.80k|  if (!source.content_type().empty()) {
  ------------------
  |  Branch (121:7): [True: 717, False: 1.08k]
  ------------------
  122|    717|    (void)curl_mime_type(part, BoundedCString(source.content_type(), scenario_limits::kMaxMetadataBytes, &truncated));
  123|    717|  }
  124|  1.80k|  if (const char* encoder = MimeEncoderName(source.encoder())) {
  ------------------
  |  Branch (124:19): [True: 872, False: 932]
  ------------------
  125|    872|    (void)curl_mime_encoder(part, encoder);
  126|    872|  }
  127|       |
  128|  1.80k|  std::size_t header_count = 0;
  129|  1.80k|  curl_slist* headers = BuildStringList(source.headers(), scenario_limits::kMaxMimeHeadersPerPart,
  130|  1.80k|                                        scenario_limits::kMaxMetadataBytes, &header_count);
  131|  1.80k|  if (headers != nullptr) {
  ------------------
  |  Branch (131:7): [True: 763, False: 1.04k]
  ------------------
  132|       |    // take_ownership=1 is crucial: unlike the strings above, MIME retains the
  133|       |    // list pointer. Once attached, the root curl_mime_free call recursively
  134|       |    // releases it, including lists on nested parts.
  135|    763|    const CURLcode result = curl_mime_headers(part, headers, 1);
  136|    763|    if (result == CURLE_OK) {
  ------------------
  |  Branch (136:9): [True: 763, False: 0]
  ------------------
  137|    763|      stats->mime_headers += header_count;
  138|    763|    } else {
  139|      0|      curl_slist_free_all(headers);
  140|      0|    }
  141|    763|  }
  142|  1.80k|}
request_data.cc:_ZN12proto_fuzzer12_GLOBAL__N_115BuildStringListIN6google8protobuf16RepeatedPtrFieldINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEEP10curl_slistRKT_mmPm:
   91|  7.09k|                            std::size_t* applied) {
   92|  7.09k|  curl_slist* list = nullptr;
   93|  7.09k|  std::string truncated;
   94|  7.09k|  const std::size_t count = std::min<std::size_t>(count_limit, values.size());
   95|  11.8k|  for (std::size_t i = 0; i < count; ++i) {
  ------------------
  |  Branch (95:27): [True: 4.78k, False: 7.09k]
  ------------------
   96|  4.78k|    const std::string& value = values.Get(static_cast<int>(i));
   97|  4.78k|    curl_slist* appended = curl_slist_append(list, BoundedCString(value, value_limit, &truncated));
   98|  4.78k|    if (appended == nullptr) {
  ------------------
  |  Branch (98:9): [True: 0, False: 4.78k]
  ------------------
   99|      0|      break;
  100|      0|    }
  101|  4.78k|    list = appended;
  102|  4.78k|    ++*applied;
  103|  4.78k|  }
  104|  7.09k|  return list;
  105|  7.09k|}

_ZN12proto_fuzzer14ScenarioRunnerC2Ev:
  166|  3.73k|ScenarioRunner::ScenarioRunner() = default;
_ZN12proto_fuzzer14ScenarioRunnerD2Ev:
  170|  3.73k|ScenarioRunner::~ScenarioRunner() = default;
_ZN12proto_fuzzer14ScenarioRunner3RunERKN4curl6fuzzer5proto8ScenarioENS_15ScenarioRunModeE:
  174|  3.73k|int ScenarioRunner::Run(const curl::fuzzer::proto::Scenario& scenario, ScenarioRunMode mode) {
  175|  3.73k|  const char* prefix = SchemePrefix(scenario.scheme());
  176|  3.73k|  if (prefix == nullptr || scenario.host_path().empty()) {
  ------------------
  |  Branch (176:7): [True: 0, False: 3.73k]
  |  Branch (176:28): [True: 0, False: 3.73k]
  ------------------
  177|      0|    return 0;
  178|      0|  }
  179|       |
  180|  3.73k|  std::unique_ptr<MockServerBase> mock = MakeMockServerForScenario(scenario, mode);
  181|  3.73k|  if (!mock) {
  ------------------
  |  Branch (181:7): [True: 0, False: 3.73k]
  ------------------
  182|      0|    return 0;
  183|      0|  }
  184|       |
  185|       |  // Declaration order is an ownership invariant: reverse destruction keeps
  186|       |  // CONNECT_TO storage and share callback userdata alive through easy cleanup.
  187|       |  // This matters for incomplete transfers, where an explicit share detach can
  188|       |  // be rejected while easy cleanup can still release the reference safely.
  189|  3.73k|  std::unique_ptr<ApiLifecycle> api_lifecycle;
  190|  3.73k|  CurlSlistPtr connect_to;
  191|  3.73k|  CurlEasyPtr easy(curl_easy_init());
  192|  3.73k|  if (!easy) {
  ------------------
  |  Branch (192:7): [True: 0, False: 3.73k]
  ------------------
  193|      0|    return 0;
  194|      0|  }
  195|       |
  196|  3.73k|  std::string url = std::string(prefix) + "://" + scenario.host_path();
  197|  3.73k|  const auto configure_easy = [&] {
  198|  3.73k|    connect_to.reset(ApplyBaselineOptions(easy.get(), scenario.scheme()));
  199|  3.73k|    curl_easy_setopt(easy.get(), CURLOPT_URL, url.c_str());
  200|  3.73k|    mock->Install(easy.get());
  201|       |
  202|       |    // Compatibility inputs deliberately bypass the mutating postprocessor,
  203|       |    // so enforce the shared option prefix again at the runtime boundary. The
  204|       |    // helper still ignores individual CURLcodes: the fuzzer stresses curl
  205|       |    // rather than treating rejected combinations as harness failures.
  206|  3.73k|    (void)ApplyScenarioOptions(easy.get(), scenario);
  207|  3.73k|  };
  208|  3.73k|  configure_easy();
  209|       |
  210|  3.73k|  const curl::fuzzer::proto::ApiPlan* api_plan =
  211|  3.73k|      mode == ScenarioRunMode::kApiLifecycle && scenario.has_api_plan() ? &scenario.api_plan() : nullptr;
  ------------------
  |  Branch (211:7): [True: 0, False: 3.73k]
  |  Branch (211:49): [True: 0, False: 0]
  ------------------
  212|  3.73k|  if (api_plan != nullptr && api_plan->reset_easy()) {
  ------------------
  |  Branch (212:7): [True: 0, False: 3.73k]
  |  Branch (212:30): [True: 0, False: 0]
  ------------------
  213|       |    // Reset deliberately drops every pointer-valued option before its backing
  214|       |    // list is freed. Reapplying the exact scenario then lets the transfer
  215|       |    // populate post-reset state instead of turning reset coverage into a
  216|       |    // guaranteed malformed request.
  217|      0|    curl_easy_reset(easy.get());
  218|      0|    connect_to.reset();
  219|      0|    configure_easy();
  220|      0|  }
  221|       |
  222|  3.73k|  if (api_plan != nullptr) {
  ------------------
  |  Branch (222:7): [True: 0, False: 3.73k]
  ------------------
  223|      0|    api_lifecycle = std::make_unique<ApiLifecycle>(easy.get(), *api_plan, url);
  224|      0|  }
  225|       |
  226|  3.73k|  {
  227|       |    // HTTP headers, MIME bodies, TELNET options, and callback userdata are
  228|       |    // pointer-valued state that libcurl does not copy. Keep their owner around
  229|       |    // the entire multi-handle drive, then let it detach them while `easy` is
  230|       |    // still valid. This inner scope is deliberate: easy.reset() below must
  231|       |    // never run before the owner's destructor clears those options.
  232|  3.73k|    ScenarioRequestData request_data(easy.get(), scenario);
  233|  3.73k|    mock->ConfigureRequestData(&request_data);
  234|  3.73k|    const auto drive_mode = api_plan == nullptr ? curl::fuzzer::proto::API_DRIVE_MULTI_PERFORM : api_plan->drive_mode();
  ------------------
  |  Branch (234:29): [True: 3.73k, False: 0]
  ------------------
  235|  3.73k|    if (drive_mode == curl::fuzzer::proto::API_DRIVE_EASY_PERFORM) {
  ------------------
  |  Branch (235:9): [True: 0, False: 3.73k]
  ------------------
  236|      0|      mock->DriveEasyScenario(easy.get(), scenario);
  237|  3.73k|    } else {
  238|  3.73k|      mock->DriveScenario(easy.get(), scenario, drive_mode == curl::fuzzer::proto::API_DRIVE_MULTI_SOCKET,
  239|  3.73k|                          api_plan != nullptr && api_plan->wake_multi());
  ------------------
  |  Branch (239:27): [True: 0, False: 3.73k]
  |  Branch (239:50): [True: 0, False: 0]
  ------------------
  240|  3.73k|    }
  241|  3.73k|    if (api_lifecycle != nullptr) {
  ------------------
  |  Branch (241:9): [True: 0, False: 3.73k]
  ------------------
  242|      0|      api_lifecycle->ProbeTransferResults(drive_mode == curl::fuzzer::proto::API_DRIVE_EASY_PERFORM);
  243|      0|      api_lifecycle->ProbeEasyDuplication();
  244|  3.73k|    } else if (mode != ScenarioRunMode::kFastProtocol) {
  ------------------
  |  Branch (244:16): [True: 3.73k, False: 0]
  ------------------
  245|  3.73k|      ProbeTransferResults(easy.get());
  246|  3.73k|    }
  247|  3.73k|  }
  248|       |
  249|       |  // Easy cleanup is the reliable share-detach boundary even if the bounded
  250|       |  // drive stopped with a connection attached. The lifecycle object—and thus
  251|       |  // lock callback userdata—outlives it, then releases share-owned caches.
  252|  3.73k|  easy.reset();
  253|  3.73k|  connect_to.reset();
  254|  3.73k|  api_lifecycle.reset();
  255|  3.73k|  return 0;
  256|  3.73k|}
scenario_runner.cc:_ZN12proto_fuzzer12_GLOBAL__N_112SchemePrefixEN4curl6fuzzer5proto6SchemeE:
   89|  3.73k|const char* SchemePrefix(curl::fuzzer::proto::Scheme scheme) {
   90|  3.73k|  switch (scheme) {
   91|      0|    case curl::fuzzer::proto::SCHEME_HTTP:
  ------------------
  |  Branch (91:5): [True: 0, False: 3.73k]
  ------------------
   92|      0|      return "http";
   93|  3.73k|    case curl::fuzzer::proto::SCHEME_HTTPS:
  ------------------
  |  Branch (93:5): [True: 3.73k, False: 0]
  ------------------
   94|  3.73k|      return "https";
   95|      0|    case curl::fuzzer::proto::SCHEME_WS:
  ------------------
  |  Branch (95:5): [True: 0, False: 3.73k]
  ------------------
   96|      0|      return "ws";
   97|      0|    case curl::fuzzer::proto::SCHEME_WSS:
  ------------------
  |  Branch (97:5): [True: 0, False: 3.73k]
  ------------------
   98|      0|      return "wss";
   99|      0|    case curl::fuzzer::proto::SCHEME_TELNET:
  ------------------
  |  Branch (99:5): [True: 0, False: 3.73k]
  ------------------
  100|      0|      return "telnet";
  101|      0|    case curl::fuzzer::proto::SCHEME_FTP:
  ------------------
  |  Branch (101:5): [True: 0, False: 3.73k]
  ------------------
  102|      0|      return "ftp";
  103|      0|    case curl::fuzzer::proto::SCHEME_TFTP:
  ------------------
  |  Branch (103:5): [True: 0, False: 3.73k]
  ------------------
  104|      0|      return "tftp";
  105|      0|    case curl::fuzzer::proto::SCHEME_UNSPECIFIED:
  ------------------
  |  Branch (105:5): [True: 0, False: 3.73k]
  ------------------
  106|      0|    default:
  ------------------
  |  Branch (106:5): [True: 0, False: 3.73k]
  ------------------
  107|      0|      return nullptr;
  108|  3.73k|  }
  109|  3.73k|}
scenario_runner.cc:_ZN12proto_fuzzer12_GLOBAL__N_125MakeMockServerForScenarioERKN4curl6fuzzer5proto8ScenarioENS_15ScenarioRunModeE:
  117|  3.73k|                                                          ScenarioRunMode mode) {
  118|  3.73k|  switch (scenario.scheme()) {
  119|      0|    case curl::fuzzer::proto::SCHEME_HTTP:
  ------------------
  |  Branch (119:5): [True: 0, False: 3.73k]
  ------------------
  120|      0|      return std::make_unique<MockServer>();
  121|  3.73k|    case curl::fuzzer::proto::SCHEME_HTTPS:
  ------------------
  |  Branch (121:5): [True: 3.73k, False: 0]
  ------------------
  122|  3.73k|#if defined(PROTO_FUZZER_HAS_TLS_MOCK_SERVER)
  123|  3.73k|      if (mode == ScenarioRunMode::kTlsCoverage) {
  ------------------
  |  Branch (123:11): [True: 3.73k, False: 0]
  ------------------
  124|  3.73k|        return std::make_unique<TlsMockServer>();
  125|  3.73k|      }
  126|       |#else
  127|       |      (void)mode;
  128|       |#endif
  129|      0|      return std::make_unique<MockServer>();
  130|      0|    case curl::fuzzer::proto::SCHEME_WS:
  ------------------
  |  Branch (130:5): [True: 0, False: 3.73k]
  ------------------
  131|      0|    case curl::fuzzer::proto::SCHEME_WSS:
  ------------------
  |  Branch (131:5): [True: 0, False: 3.73k]
  ------------------
  132|      0|      return std::make_unique<WebSocketMockServer>();
  133|      0|    case curl::fuzzer::proto::SCHEME_TELNET:
  ------------------
  |  Branch (133:5): [True: 0, False: 3.73k]
  ------------------
  134|      0|      return std::make_unique<TelnetMockServer>();
  135|      0|    case curl::fuzzer::proto::SCHEME_FTP:
  ------------------
  |  Branch (135:5): [True: 0, False: 3.73k]
  ------------------
  136|       |      // New numeric enum values may already occur in the historical mixed
  137|       |      // corpus as unknown fields. Only the fixed FTP profile may reinterpret
  138|       |      // one as a live two-channel protocol exchange.
  139|      0|      if (mode == ScenarioRunMode::kFtpCoverage) {
  ------------------
  |  Branch (139:11): [True: 0, False: 0]
  ------------------
  140|      0|        return std::make_unique<FtpMockServer>();
  141|      0|      }
  142|      0|      return nullptr;
  143|      0|    case curl::fuzzer::proto::SCHEME_TFTP:
  ------------------
  |  Branch (143:5): [True: 0, False: 3.73k]
  ------------------
  144|       |      // TFTP changes the callback transport from a preconnected stream to a
  145|       |      // real UDP endpoint, so compatibility inputs must not opt into it merely
  146|       |      // because this build learned a new enum value.
  147|      0|      if (mode == ScenarioRunMode::kTftpCoverage) {
  ------------------
  |  Branch (147:11): [True: 0, False: 0]
  ------------------
  148|      0|        return std::make_unique<TftpMockServer>();
  149|      0|      }
  150|      0|      return nullptr;
  151|      0|    case curl::fuzzer::proto::SCHEME_UNSPECIFIED:
  ------------------
  |  Branch (151:5): [True: 0, False: 3.73k]
  ------------------
  152|      0|    default:
  ------------------
  |  Branch (152:5): [True: 0, False: 3.73k]
  ------------------
  153|      0|      return nullptr;
  154|  3.73k|  }
  155|  3.73k|}
scenario_runner.cc:_ZZN12proto_fuzzer14ScenarioRunner3RunERKN4curl6fuzzer5proto8ScenarioENS_15ScenarioRunModeEENK3$_0clEv:
  197|  3.73k|  const auto configure_easy = [&] {
  198|  3.73k|    connect_to.reset(ApplyBaselineOptions(easy.get(), scenario.scheme()));
  199|  3.73k|    curl_easy_setopt(easy.get(), CURLOPT_URL, url.c_str());
  ------------------
  |  | 3363|  3.73k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  200|  3.73k|    mock->Install(easy.get());
  201|       |
  202|       |    // Compatibility inputs deliberately bypass the mutating postprocessor,
  203|       |    // so enforce the shared option prefix again at the runtime boundary. The
  204|       |    // helper still ignores individual CURLcodes: the fuzzer stresses curl
  205|       |    // rather than treating rejected combinations as harness failures.
  206|  3.73k|    (void)ApplyScenarioOptions(easy.get(), scenario);
  207|  3.73k|  };
scenario_runner.cc:_ZN12proto_fuzzer12_GLOBAL__N_120ProbeTransferResultsEPv:
   62|  3.73k|void ProbeTransferResults(CURL* easy) {
   63|  3.73k|  char* string_result = nullptr;
   64|  3.73k|  long long_result = 0;
   65|  3.73k|  double double_result = 0;
   66|  3.73k|  curl_off_t offset_result = 0;
   67|  3.73k|  curl_socket_t socket_result = CURL_SOCKET_BAD;
  ------------------
  |  |  147|  3.73k|#define CURL_SOCKET_BAD (-1)
  ------------------
   68|  3.73k|  struct curl_certinfo* certinfo_result = nullptr;
   69|       |
   70|  3.73k|  (void)curl_easy_getinfo(easy, CURLINFO_EFFECTIVE_URL, &string_result);
  ------------------
  |  | 3365|  3.73k|  curl_easy_getinfo curl_exactly_three_arguments(handle, info, arg)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
   71|  3.73k|  (void)curl_easy_getinfo(easy, CURLINFO_RESPONSE_CODE, &long_result);
  ------------------
  |  | 3365|  3.73k|  curl_easy_getinfo curl_exactly_three_arguments(handle, info, arg)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
   72|  3.73k|  (void)curl_easy_getinfo(easy, CURLINFO_TOTAL_TIME, &double_result);
  ------------------
  |  | 3365|  3.73k|  curl_easy_getinfo curl_exactly_three_arguments(handle, info, arg)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
   73|  3.73k|  (void)curl_easy_getinfo(easy, CURLINFO_SIZE_DOWNLOAD_T, &offset_result);
  ------------------
  |  | 3365|  3.73k|  curl_easy_getinfo curl_exactly_three_arguments(handle, info, arg)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
   74|  3.73k|  (void)curl_easy_getinfo(easy, CURLINFO_ACTIVESOCKET, &socket_result);
  ------------------
  |  | 3365|  3.73k|  curl_easy_getinfo curl_exactly_three_arguments(handle, info, arg)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
   75|  3.73k|  (void)curl_easy_getinfo(easy, CURLINFO_CERTINFO, &certinfo_result);
  ------------------
  |  | 3365|  3.73k|  curl_easy_getinfo curl_exactly_three_arguments(handle, info, arg)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
   76|       |
   77|  3.73k|  struct curl_header* header = nullptr;
   78|  3.73k|  (void)curl_easy_header(easy, "Content-Type", 0, kAllHeaderOrigins, -1, &header);
   79|  3.73k|  header = nullptr;
   80|  3.82k|  for (std::size_t index = 0; index < kMaxResultHeaders; ++index) {
  ------------------
  |  Branch (80:31): [True: 3.82k, False: 0]
  ------------------
   81|  3.82k|    header = curl_easy_nextheader(easy, kAllHeaderOrigins, -1, header);
   82|  3.82k|    if (header == nullptr) {
  ------------------
  |  Branch (82:9): [True: 3.73k, False: 93]
  ------------------
   83|  3.73k|      break;
   84|  3.73k|    }
   85|  3.82k|  }
   86|  3.73k|}
scenario_runner.cc:_ZNK12proto_fuzzer12_GLOBAL__N_116CurlSlistDeleterclEP10curl_slist:
   47|  3.73k|  void operator()(curl_slist* list) const noexcept { curl_slist_free_all(list); }
scenario_runner.cc:_ZNK12proto_fuzzer12_GLOBAL__N_115CurlEasyDeleterclEPv:
   39|  3.73k|  void operator()(CURL* h) const noexcept {
   40|  3.73k|    if (h) curl_easy_cleanup(h);
  ------------------
  |  Branch (40:9): [True: 3.73k, False: 0]
  ------------------
   41|  3.73k|  }

_ZN12proto_fuzzer17ApplyTargetPolicyEPN4curl6fuzzer5proto8ScenarioENS_13TargetProfileE:
  663|  3.73k|void ApplyTargetPolicy(curl::fuzzer::proto::Scenario* scenario, TargetProfile profile) {
  664|  3.73k|  if (scenario == nullptr) {
  ------------------
  |  Branch (664:7): [True: 0, False: 3.73k]
  ------------------
  665|      0|    return;
  666|      0|  }
  667|       |
  668|  3.73k|  if (profile == TargetProfile::kCompatibility) {
  ------------------
  |  Branch (668:7): [True: 0, False: 3.73k]
  ------------------
  669|       |    // The original target's existing corpus predates profile splitting. A
  670|       |    // no-op here makes the type safe to pass around while its binary continues
  671|       |    // to omit postprocessor registration altogether. The append-only FTP/TFTP
  672|       |    // scheme values do not justify rewriting historical mixed-lane inputs.
  673|      0|    return;
  674|      0|  }
  675|       |
  676|  3.73k|  if (profile == TargetProfile::kFastTelnet) {
  ------------------
  |  Branch (676:7): [True: 0, False: 3.73k]
  ------------------
  677|       |    // Set the scheme before general bounds so the TELNET-specific upload and
  678|       |    // PAUSE budgets are selected rather than event-driven compatibility ones.
  679|      0|    scenario->set_scheme(curl::fuzzer::proto::SCHEME_TELNET);
  680|      0|    RemoveApiOnlyShape(scenario);
  681|      0|    RemoveNonTelnetShape(scenario);
  682|      0|    RetainCheapTelnetOptions(scenario);
  683|      0|    BoundScenarioShape(scenario);
  684|      0|    BoundTelnetResponse(scenario->mutable_connection());
  685|      0|    return;
  686|      0|  }
  687|       |
  688|  3.73k|  if (profile == TargetProfile::kFastHttp) {
  ------------------
  |  Branch (688:7): [True: 0, False: 3.73k]
  ------------------
  689|      0|    scenario->set_scheme(curl::fuzzer::proto::SCHEME_HTTP);
  690|      0|    RemoveApiOnlyShape(scenario);
  691|      0|    RemoveTelnetOnlyShape(scenario);
  692|      0|    RemoveDeepHttpShape(scenario);
  693|      0|    RetainCheapHttpOptions(scenario);
  694|      0|    BoundScenarioShape(scenario);
  695|      0|    return;
  696|      0|  }
  697|       |
  698|  3.73k|  if (profile == TargetProfile::kFastFtp) {
  ------------------
  |  Branch (698:7): [True: 0, False: 3.73k]
  ------------------
  699|      0|    scenario->set_scheme(curl::fuzzer::proto::SCHEME_FTP);
  700|      0|    RemoveIgnoredFtpShape(scenario);
  701|      0|    RetainFtpOptions(scenario);
  702|      0|    CanonicalizeFtpOptionModes(scenario);
  703|      0|    BoundScenarioShape(scenario);
  704|      0|    CanonicalizeFtpAuthority(scenario);
  705|      0|    return;
  706|      0|  }
  707|       |
  708|  3.73k|  if (profile == TargetProfile::kFastTftp) {
  ------------------
  |  Branch (708:7): [True: 0, False: 3.73k]
  ------------------
  709|      0|    scenario->set_scheme(curl::fuzzer::proto::SCHEME_TFTP);
  710|      0|    RemoveIgnoredTftpShape(scenario);
  711|      0|    RetainTftpOptions(scenario);
  712|      0|    CanonicalizeTftpOptionModes(scenario);
  713|      0|    BoundScenarioShape(scenario);
  714|      0|    CanonicalizeTftpAuthority(scenario);
  715|      0|    return;
  716|      0|  }
  717|       |
  718|       |  // Select the lane's scheme before applying scheme-sensitive upload bounds.
  719|       |  // The scheme field is itself mutable, so bounding first could accidentally
  720|       |  // give an HTTP/WS case TELNET's smaller payload budget merely because that
  721|       |  // was the input's pre-policy value.
  722|  3.73k|  switch (profile) {
  ------------------
  |  Branch (722:11): [True: 3.73k, False: 0]
  ------------------
  723|      0|    case TargetProfile::kCompatibility:
  ------------------
  |  Branch (723:5): [True: 0, False: 3.73k]
  ------------------
  724|      0|      return;
  725|      0|    case TargetProfile::kDeepHttp:
  ------------------
  |  Branch (725:5): [True: 0, False: 3.73k]
  ------------------
  726|      0|      scenario->set_scheme(curl::fuzzer::proto::SCHEME_HTTP);
  727|      0|      break;
  728|      0|    case TargetProfile::kApi:
  ------------------
  |  Branch (728:5): [True: 0, False: 3.73k]
  ------------------
  729|      0|      scenario->set_scheme(curl::fuzzer::proto::SCHEME_HTTP);
  730|      0|      break;
  731|  3.73k|    case TargetProfile::kFastHttps:
  ------------------
  |  Branch (731:5): [True: 3.73k, False: 0]
  ------------------
  732|  3.73k|      scenario->set_scheme(curl::fuzzer::proto::SCHEME_HTTPS);
  733|  3.73k|      break;
  734|      0|    case TargetProfile::kFastWebSocket:
  ------------------
  |  Branch (734:5): [True: 0, False: 3.73k]
  ------------------
  735|      0|      scenario->set_scheme(curl::fuzzer::proto::SCHEME_WS);
  736|      0|      break;
  737|      0|    case TargetProfile::kFastSecureWebSocket:
  ------------------
  |  Branch (737:5): [True: 0, False: 3.73k]
  ------------------
  738|      0|      scenario->set_scheme(curl::fuzzer::proto::SCHEME_WSS);
  739|      0|      break;
  740|      0|    case TargetProfile::kTiming:
  ------------------
  |  Branch (740:5): [True: 0, False: 3.73k]
  ------------------
  741|      0|      scenario->set_scheme(PlaintextScheme(scenario->scheme()));
  742|      0|      break;
  743|      0|    case TargetProfile::kFastHttp:
  ------------------
  |  Branch (743:5): [True: 0, False: 3.73k]
  ------------------
  744|      0|    case TargetProfile::kFastTelnet:
  ------------------
  |  Branch (744:5): [True: 0, False: 3.73k]
  ------------------
  745|      0|    case TargetProfile::kFastFtp:
  ------------------
  |  Branch (745:5): [True: 0, False: 3.73k]
  ------------------
  746|      0|    case TargetProfile::kFastTftp:
  ------------------
  |  Branch (746:5): [True: 0, False: 3.73k]
  ------------------
  747|       |      // Protocol-specific early-return paths selected their scheme above.
  748|      0|      return;
  749|  3.73k|  }
  750|       |
  751|       |  // TELNET's retained slist and synchronous pause have no observable, safe
  752|       |  // meaning in the fixed event-driven lanes. Clear them before walking the
  753|       |  // general shape so only the compatibility and TELNET targets can retain
  754|       |  // those values.
  755|  3.73k|  RemoveTelnetOnlyShape(scenario);
  756|  3.73k|  if (profile != TargetProfile::kApi) {
  ------------------
  |  Branch (756:7): [True: 3.73k, False: 0]
  ------------------
  757|  3.73k|    RemoveApiOnlyShape(scenario);
  758|  3.73k|  }
  759|  3.73k|  RemoveFileTransferOnlyOptions(scenario);
  760|  3.73k|  BoundScenarioShape(scenario);
  761|       |
  762|  3.73k|  switch (profile) {
  ------------------
  |  Branch (762:11): [True: 3.73k, False: 0]
  ------------------
  763|      0|    case TargetProfile::kCompatibility:
  ------------------
  |  Branch (763:5): [True: 0, False: 3.73k]
  ------------------
  764|      0|      return;
  765|      0|    case TargetProfile::kFastHttp:
  ------------------
  |  Branch (765:5): [True: 0, False: 3.73k]
  ------------------
  766|       |      // Handled before the general bounds so discarded deep shapes are never
  767|       |      // traversed on the fast path.
  768|      0|      return;
  769|       |
  770|      0|    case TargetProfile::kDeepHttp:
  ------------------
  |  Branch (770:5): [True: 0, False: 3.73k]
  ------------------
  771|      0|      ClearAllBackpressure(scenario);
  772|      0|      return;
  773|       |
  774|      0|    case TargetProfile::kApi:
  ------------------
  |  Branch (774:5): [True: 0, False: 3.73k]
  ------------------
  775|      0|      ClearAllBackpressure(scenario);
  776|      0|      if (scenario->host_path().size() > scenario_limits::kMaxApiStringBytes) {
  ------------------
  |  Branch (776:11): [True: 0, False: 0]
  ------------------
  777|      0|        scenario->mutable_host_path()->resize(scenario_limits::kMaxApiStringBytes);
  778|      0|      }
  779|      0|      if (scenario->has_api_plan()) {
  ------------------
  |  Branch (779:11): [True: 0, False: 0]
  ------------------
  780|      0|        BoundApiPlanShape(scenario->mutable_api_plan());
  781|      0|      }
  782|      0|      return;
  783|       |
  784|  3.73k|    case TargetProfile::kFastHttps:
  ------------------
  |  Branch (784:5): [True: 3.73k, False: 0]
  ------------------
  785|  3.73k|      ClearAllBackpressure(scenario);
  786|  3.73k|      CanonicalizeTlsAuthority(scenario);
  787|  3.73k|      return;
  788|       |
  789|      0|    case TargetProfile::kFastWebSocket:
  ------------------
  |  Branch (789:5): [True: 0, False: 3.73k]
  ------------------
  790|      0|      ClearAllBackpressure(scenario);
  791|      0|      RemoveIgnoredWebSocketShape(scenario);
  792|      0|      return;
  793|       |
  794|      0|    case TargetProfile::kFastSecureWebSocket:
  ------------------
  |  Branch (794:5): [True: 0, False: 3.73k]
  ------------------
  795|      0|      ClearAllBackpressure(scenario);
  796|      0|      RemoveIgnoredWebSocketShape(scenario);
  797|      0|      return;
  798|       |
  799|      0|    case TargetProfile::kFastTelnet:
  ------------------
  |  Branch (799:5): [True: 0, False: 3.73k]
  ------------------
  800|       |      // Handled before the general bounds so its protocol-specific limits are
  801|       |      // selected from the start.
  802|      0|      return;
  803|       |
  804|      0|    case TargetProfile::kFastFtp:
  ------------------
  |  Branch (804:5): [True: 0, False: 3.73k]
  ------------------
  805|      0|    case TargetProfile::kFastTftp:
  ------------------
  |  Branch (805:5): [True: 0, False: 3.73k]
  ------------------
  806|       |      // Their peers consume narrower raw-script shapes, pruned before general
  807|       |      // bounds so ignored fields never tax these fast paths.
  808|      0|      return;
  809|       |
  810|      0|    case TargetProfile::kTiming: {
  ------------------
  |  Branch (810:5): [True: 0, False: 3.73k]
  ------------------
  811|      0|      if (scenario->scheme() == curl::fuzzer::proto::SCHEME_WS) {
  ------------------
  |  Branch (811:11): [True: 0, False: 0]
  ------------------
  812|      0|        RemoveIgnoredWebSocketShape(scenario);
  813|      0|      }
  814|      0|      auto* backpressure = scenario->mutable_connection()->mutable_backpressure();
  815|      0|      if (backpressure->recv_buf_bytes() == 0) {
  ------------------
  |  Branch (815:11): [True: 0, False: 0]
  ------------------
  816|       |        // A drain limit alone cannot fill the default AF_UNIX buffer with the
  817|       |        // harness's bounded upload. Always tighten the socket so this lane
  818|       |        // represents real pressure, not merely selection of the timed loop.
  819|      0|        backpressure->set_recv_buf_bytes(kDefaultBackpressureBufferBytes);
  820|      0|      } else {
  821|      0|        backpressure->set_recv_buf_bytes(CanonicalizeNonZero(backpressure->recv_buf_bytes(),
  822|      0|                                                             kMinBackpressureBufferBytes, kMaxBackpressureBufferBytes));
  823|      0|      }
  824|      0|      backpressure->set_drain_limit(CanonicalizeNonZero(backpressure->drain_limit(), 1, kMaxDrainBytesPerIteration));
  825|      0|      for (auto& connection : *scenario->mutable_subsequent_connections()) {
  ------------------
  |  Branch (825:29): [True: 0, False: 0]
  ------------------
  826|      0|        CanonicalizeOptionalBackpressure(&connection);
  827|      0|      }
  828|      0|      return;
  829|      0|    }
  830|  3.73k|  }
  831|  3.73k|}
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_118RemoveApiOnlyShapeEPN4curl6fuzzer5proto8ScenarioE:
  557|  3.73k|void RemoveApiOnlyShape(curl::fuzzer::proto::Scenario* scenario) { scenario->clear_api_plan(); }
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_118BoundScenarioShapeEPN4curl6fuzzer5proto8ScenarioE:
  231|  3.73k|void BoundScenarioShape(curl::fuzzer::proto::Scenario* scenario) {
  232|  3.73k|  TrimRepeated(scenario->mutable_options(), scenario_limits::kMaxOptions);
  233|  12.7k|  for (auto& option : *scenario->mutable_options()) {
  ------------------
  |  Branch (233:21): [True: 12.7k, False: 3.73k]
  ------------------
  234|  12.7k|    if (option.value_case() == curl::fuzzer::proto::SetOption::kStringValue) {
  ------------------
  |  Branch (234:9): [True: 4.82k, False: 7.91k]
  ------------------
  235|  4.82k|      TrimMetadata(option.mutable_string_value());
  236|  4.82k|    }
  237|  12.7k|  }
  238|       |
  239|  3.73k|  BoundHeaderValues(scenario->mutable_request_headers(), scenario_limits::kMaxRequestHeaders);
  240|  3.73k|  BoundStringValues(scenario->mutable_telnet_options(), scenario_limits::kMaxTelnetOptions,
  241|  3.73k|                    scenario_limits::kMaxTelnetOptionBytes);
  242|  3.73k|  if (scenario->has_mime_post()) {
  ------------------
  |  Branch (242:7): [True: 638, False: 3.09k]
  ------------------
  243|    638|    BoundMimeShape(scenario->mutable_mime_post());
  244|    638|  }
  245|  3.73k|  if (scenario->has_upload()) {
  ------------------
  |  Branch (245:7): [True: 381, False: 3.35k]
  ------------------
  246|    381|    const bool telnet = scenario->scheme() == curl::fuzzer::proto::SCHEME_TELNET;
  247|    381|    const std::size_t data_limit = telnet ? scenario_limits::kMaxTelnetUploadBytes : scenario_limits::kMaxUploadBytes;
  ------------------
  |  Branch (247:36): [True: 0, False: 381]
  ------------------
  248|    381|    const std::size_t read_step_limit =
  249|    381|        telnet ? scenario_limits::kMaxTelnetUploadReadSteps : scenario_limits::kMaxUploadReadSteps;
  ------------------
  |  Branch (249:9): [True: 0, False: 381]
  ------------------
  250|    381|    const std::size_t read_size_limit =
  251|    381|        telnet ? scenario_limits::kMaxTelnetUploadReadSize : scenario_limits::kMaxUploadReadSize;
  ------------------
  |  Branch (251:9): [True: 0, False: 381]
  ------------------
  252|    381|    BoundUploadShape(scenario->mutable_upload(), data_limit, read_step_limit, read_size_limit);
  253|    381|  }
  254|       |
  255|  3.73k|  BoundConnectionShape(scenario->mutable_connection());
  256|  3.73k|  TrimRepeated(scenario->mutable_subsequent_connections(), scenario_limits::kMaxConnections - 1);
  257|  3.73k|  for (auto& connection : *scenario->mutable_subsequent_connections()) {
  ------------------
  |  Branch (257:25): [True: 338, False: 3.73k]
  ------------------
  258|    338|    BoundConnectionShape(&connection);
  259|    338|  }
  260|  3.73k|}
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_112TrimRepeatedIN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto9SetOptionEEEEEvPT_m:
   38|  3.73k|void TrimRepeated(RepeatedField* field, std::size_t limit) {
   39|  3.73k|  const std::size_t size = static_cast<std::size_t>(field->size());
   40|  3.73k|  if (size > limit) {
  ------------------
  |  Branch (40:7): [True: 0, False: 3.73k]
  ------------------
   41|      0|    field->DeleteSubrange(static_cast<int>(limit), static_cast<int>(size - limit));
   42|      0|  }
   43|  3.73k|}
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_112TrimMetadataEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   48|  14.9k|void TrimMetadata(std::string* value) {
   49|  14.9k|  if (value->size() > scenario_limits::kMaxMetadataBytes) {
  ------------------
  |  Branch (49:7): [True: 0, False: 14.9k]
  ------------------
   50|      0|    value->resize(scenario_limits::kMaxMetadataBytes);
   51|      0|  }
   52|  14.9k|}
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_117BoundHeaderValuesIN6google8protobuf16RepeatedPtrFieldINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEEvPT_m:
  110|  7.09k|void BoundHeaderValues(RepeatedBytes* headers, std::size_t limit) {
  111|  7.09k|  BoundStringValues(headers, limit, scenario_limits::kMaxMetadataBytes);
  112|  7.09k|}
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_117BoundStringValuesIN6google8protobuf16RepeatedPtrFieldINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEEvPT_mm:
  100|  10.8k|void BoundStringValues(RepeatedBytes* values, std::size_t count_limit, std::size_t value_limit) {
  101|  10.8k|  TrimRepeated(values, count_limit);
  102|  10.8k|  for (std::string& value : *values) {
  ------------------
  |  Branch (102:27): [True: 4.78k, False: 10.8k]
  ------------------
  103|  4.78k|    if (value.size() > value_limit) {
  ------------------
  |  Branch (103:9): [True: 0, False: 4.78k]
  ------------------
  104|      0|      value.resize(value_limit);
  105|      0|    }
  106|  4.78k|  }
  107|  10.8k|}
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_112TrimRepeatedIN6google8protobuf16RepeatedPtrFieldINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEEvPT_m:
   38|  14.9k|void TrimRepeated(RepeatedField* field, std::size_t limit) {
   39|  14.9k|  const std::size_t size = static_cast<std::size_t>(field->size());
   40|  14.9k|  if (size > limit) {
  ------------------
  |  Branch (40:7): [True: 0, False: 14.9k]
  ------------------
   41|      0|    field->DeleteSubrange(static_cast<int>(limit), static_cast<int>(size - limit));
   42|      0|  }
   43|  14.9k|}
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_114BoundMimeShapeEPN4curl6fuzzer5proto8MimePostE:
  142|    638|void BoundMimeShape(curl::fuzzer::proto::MimePost* post) {
  143|    638|  TrimRepeated(post->mutable_parts(), scenario_limits::kMaxTopLevelMimeParts);
  144|    638|  std::size_t remaining = scenario_limits::kMaxTotalMimeParts;
  145|    638|  std::size_t retained_top_parts = 0;
  146|       |
  147|  2.19k|  while (retained_top_parts < static_cast<std::size_t>(post->parts_size()) && remaining != 0) {
  ------------------
  |  Branch (147:10): [True: 1.55k, False: 638]
  |  Branch (147:79): [True: 1.55k, False: 0]
  ------------------
  148|  1.55k|    auto* part = post->mutable_parts(static_cast<int>(retained_top_parts));
  149|  1.55k|    ++retained_top_parts;
  150|  1.55k|    --remaining;
  151|  1.55k|    BoundMimePartMetadata(part);
  152|       |
  153|  1.55k|    if (part->content_case() == curl::fuzzer::proto::MimePart::kData) {
  ------------------
  |  Branch (153:9): [True: 189, False: 1.37k]
  ------------------
  154|    189|      if (part->data().size() > scenario_limits::kMaxMimeDataBytes) {
  ------------------
  |  Branch (154:11): [True: 0, False: 189]
  ------------------
  155|      0|        part->mutable_data()->resize(scenario_limits::kMaxMimeDataBytes);
  156|      0|      }
  157|    189|      continue;
  158|    189|    }
  159|  1.37k|    if (part->content_case() != curl::fuzzer::proto::MimePart::kSubparts) {
  ------------------
  |  Branch (159:9): [True: 598, False: 772]
  ------------------
  160|    598|      continue;
  161|    598|    }
  162|       |
  163|    772|    auto* children = part->mutable_subparts()->mutable_parts();
  164|    772|    TrimRepeated(children, std::min(scenario_limits::kMaxNestedMimeParts, remaining));
  165|  1.80k|    for (auto& child : *children) {
  ------------------
  |  Branch (165:22): [True: 1.80k, False: 772]
  ------------------
  166|  1.80k|      BoundMimeLeaf(&child);
  167|  1.80k|      --remaining;
  168|  1.80k|    }
  169|    772|  }
  170|       |
  171|    638|  TrimRepeated(post->mutable_parts(), retained_top_parts);
  172|    638|}
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_112TrimRepeatedIN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto8MimePartEEEEEvPT_m:
   38|  1.27k|void TrimRepeated(RepeatedField* field, std::size_t limit) {
   39|  1.27k|  const std::size_t size = static_cast<std::size_t>(field->size());
   40|  1.27k|  if (size > limit) {
  ------------------
  |  Branch (40:7): [True: 0, False: 1.27k]
  ------------------
   41|      0|    field->DeleteSubrange(static_cast<int>(limit), static_cast<int>(size - limit));
   42|      0|  }
   43|  1.27k|}
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_121BoundMimePartMetadataIN4curl6fuzzer5proto8MimePartEEEvPT_:
  125|  1.55k|void BoundMimePartMetadata(Part* part) {
  126|  1.55k|  TrimMetadata(part->mutable_name());
  127|  1.55k|  TrimMetadata(part->mutable_filename());
  128|  1.55k|  TrimMetadata(part->mutable_content_type());
  129|  1.55k|  BoundHeaderValues(part->mutable_headers(), scenario_limits::kMaxMimeHeadersPerPart);
  130|  1.55k|}
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_112TrimRepeatedIN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto12MimeDataPartEEEEEvPT_m:
   38|    772|void TrimRepeated(RepeatedField* field, std::size_t limit) {
   39|    772|  const std::size_t size = static_cast<std::size_t>(field->size());
   40|    772|  if (size > limit) {
  ------------------
  |  Branch (40:7): [True: 0, False: 772]
  ------------------
   41|      0|    field->DeleteSubrange(static_cast<int>(limit), static_cast<int>(size - limit));
   42|      0|  }
   43|    772|}
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_113BoundMimeLeafEPN4curl6fuzzer5proto12MimeDataPartE:
  132|  1.80k|void BoundMimeLeaf(curl::fuzzer::proto::MimeDataPart* part) {
  133|  1.80k|  BoundMimePartMetadata(part);
  134|  1.80k|  if (part->data().size() > scenario_limits::kMaxMimeDataBytes) {
  ------------------
  |  Branch (134:7): [True: 0, False: 1.80k]
  ------------------
  135|      0|    part->mutable_data()->resize(scenario_limits::kMaxMimeDataBytes);
  136|      0|  }
  137|  1.80k|}
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_121BoundMimePartMetadataIN4curl6fuzzer5proto12MimeDataPartEEEvPT_:
  125|  1.80k|void BoundMimePartMetadata(Part* part) {
  126|  1.80k|  TrimMetadata(part->mutable_name());
  127|  1.80k|  TrimMetadata(part->mutable_filename());
  128|  1.80k|  TrimMetadata(part->mutable_content_type());
  129|  1.80k|  BoundHeaderValues(part->mutable_headers(), scenario_limits::kMaxMimeHeadersPerPart);
  130|  1.80k|}
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_116BoundUploadShapeEPN4curl6fuzzer5proto12UploadScriptEmmm:
  178|    381|                      std::size_t read_size_limit) {
  179|    381|  if (upload->data().size() > data_limit) {
  ------------------
  |  Branch (179:7): [True: 0, False: 381]
  ------------------
  180|      0|    upload->mutable_data()->resize(data_limit);
  181|      0|  }
  182|       |  // RepeatedField<uint32_t> lacks RepeatedPtrField's DeleteSubrange helper;
  183|       |  // removing the ignored suffix from the end is constant-time per element and
  184|       |  // preserves the mutation-significant prefix exactly.
  185|    381|  while (static_cast<std::size_t>(upload->read_sizes_size()) > read_step_limit) {
  ------------------
  |  Branch (185:10): [True: 0, False: 381]
  ------------------
  186|      0|    upload->mutable_read_sizes()->RemoveLast();
  187|      0|  }
  188|    878|  for (int i = 0; i < upload->read_sizes_size(); ++i) {
  ------------------
  |  Branch (188:19): [True: 497, False: 381]
  ------------------
  189|    497|    if (upload->read_sizes(i) > read_size_limit) {
  ------------------
  |  Branch (189:9): [True: 0, False: 497]
  ------------------
  190|      0|      upload->set_read_sizes(i, static_cast<std::uint32_t>(read_size_limit));
  191|      0|    }
  192|    497|  }
  193|    381|}
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_120BoundConnectionShapeEPN4curl6fuzzer5proto10ConnectionE:
  117|  4.07k|void BoundConnectionShape(curl::fuzzer::proto::Connection* connection) {
  118|  4.07k|  TrimRepeated(connection->mutable_on_readable(), scenario_limits::kMaxResponseChunks);
  119|  4.07k|  const std::size_t raw_count = static_cast<std::size_t>(connection->on_readable_size());
  120|  4.07k|  TrimRepeated(connection->mutable_server_frames(), scenario_limits::kMaxResponseChunks - raw_count);
  121|  4.07k|}
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_112TrimRepeatedIN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto14WebSocketFrameEEEEEvPT_m:
   38|  4.07k|void TrimRepeated(RepeatedField* field, std::size_t limit) {
   39|  4.07k|  const std::size_t size = static_cast<std::size_t>(field->size());
   40|  4.07k|  if (size > limit) {
  ------------------
  |  Branch (40:7): [True: 0, False: 4.07k]
  ------------------
   41|      0|    field->DeleteSubrange(static_cast<int>(limit), static_cast<int>(size - limit));
   42|      0|  }
   43|  4.07k|}
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_112TrimRepeatedIN6google8protobuf16RepeatedPtrFieldIN4curl6fuzzer5proto10ConnectionEEEEEvPT_m:
   38|  3.73k|void TrimRepeated(RepeatedField* field, std::size_t limit) {
   39|  3.73k|  const std::size_t size = static_cast<std::size_t>(field->size());
   40|  3.73k|  if (size > limit) {
  ------------------
  |  Branch (40:7): [True: 0, False: 3.73k]
  ------------------
   41|      0|    field->DeleteSubrange(static_cast<int>(limit), static_cast<int>(size - limit));
   42|      0|  }
   43|  3.73k|}
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_121RemoveTelnetOnlyShapeEPN4curl6fuzzer5proto8ScenarioE:
  547|  3.73k|void RemoveTelnetOnlyShape(curl::fuzzer::proto::Scenario* scenario) {
  548|  3.73k|  scenario->clear_telnet_options();
  549|  3.73k|  if (scenario->has_upload() && scenario->upload().terminal() == curl::fuzzer::proto::UPLOAD_TERMINAL_PAUSE) {
  ------------------
  |  Branch (549:7): [True: 381, False: 3.35k]
  |  Branch (549:33): [True: 0, False: 381]
  ------------------
  550|      0|    scenario->mutable_upload()->set_terminal(curl::fuzzer::proto::UPLOAD_TERMINAL_EOF);
  551|      0|  }
  552|  3.73k|}
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_129RemoveFileTransferOnlyOptionsEPN4curl6fuzzer5proto8ScenarioE:
  497|  3.73k|void RemoveFileTransferOnlyOptions(curl::fuzzer::proto::Scenario* scenario) {
  498|  3.73k|  RetainMatchingOptions(
  499|  3.73k|      scenario, [](curl::fuzzer::proto::CurlOptionId option_id) { return !IsFileTransferOnlyOption(option_id); });
  500|  3.73k|}
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_121RetainMatchingOptionsIZNS0_29RemoveFileTransferOnlyOptionsEPN4curl6fuzzer5proto8ScenarioEE3$_0EEvS6_T_:
  302|  3.73k|void RetainMatchingOptions(curl::fuzzer::proto::Scenario* scenario, Predicate predicate) {
  303|  3.73k|  auto* options = scenario->mutable_options();
  304|  3.73k|  int retained = 0;
  305|  16.4k|  for (int index = 0; index < options->size(); ++index) {
  ------------------
  |  Branch (305:23): [True: 12.7k, False: 3.73k]
  ------------------
  306|  12.7k|    if (!predicate(options->Get(index).option_id())) {
  ------------------
  |  Branch (306:9): [True: 0, False: 12.7k]
  ------------------
  307|      0|      continue;
  308|      0|    }
  309|  12.7k|    if (retained != index) {
  ------------------
  |  Branch (309:9): [True: 0, False: 12.7k]
  ------------------
  310|      0|      options->SwapElements(retained, index);
  311|      0|    }
  312|  12.7k|    ++retained;
  313|  12.7k|  }
  314|  3.73k|  options->DeleteSubrange(retained, options->size() - retained);
  315|  3.73k|}
target_policy.cc:_ZZN12proto_fuzzer12_GLOBAL__N_129RemoveFileTransferOnlyOptionsEPN4curl6fuzzer5proto8ScenarioEENK3$_0clENS3_12CurlOptionIdE:
  499|  12.7k|      scenario, [](curl::fuzzer::proto::CurlOptionId option_id) { return !IsFileTransferOnlyOption(option_id); });
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_124IsFileTransferOnlyOptionEN4curl6fuzzer5proto12CurlOptionIdE:
  472|  12.7k|bool IsFileTransferOnlyOption(curl::fuzzer::proto::CurlOptionId option_id) {
  473|  12.7k|  switch (option_id) {
  474|      0|    case curl::fuzzer::proto::CURLOPT_APPEND:
  ------------------
  |  Branch (474:5): [True: 0, False: 12.7k]
  ------------------
  475|      0|    case curl::fuzzer::proto::CURLOPT_DIRLISTONLY:
  ------------------
  |  Branch (475:5): [True: 0, False: 12.7k]
  ------------------
  476|      0|    case curl::fuzzer::proto::CURLOPT_FTP_ACCOUNT:
  ------------------
  |  Branch (476:5): [True: 0, False: 12.7k]
  ------------------
  477|      0|    case curl::fuzzer::proto::CURLOPT_FTP_ALTERNATIVE_TO_USER:
  ------------------
  |  Branch (477:5): [True: 0, False: 12.7k]
  ------------------
  478|      0|    case curl::fuzzer::proto::CURLOPT_FTP_CREATE_MISSING_DIRS:
  ------------------
  |  Branch (478:5): [True: 0, False: 12.7k]
  ------------------
  479|      0|    case curl::fuzzer::proto::CURLOPT_FTP_FILEMETHOD:
  ------------------
  |  Branch (479:5): [True: 0, False: 12.7k]
  ------------------
  480|      0|    case curl::fuzzer::proto::CURLOPT_FTP_SKIP_PASV_IP:
  ------------------
  |  Branch (480:5): [True: 0, False: 12.7k]
  ------------------
  481|      0|    case curl::fuzzer::proto::CURLOPT_FTP_USE_EPSV:
  ------------------
  |  Branch (481:5): [True: 0, False: 12.7k]
  ------------------
  482|      0|    case curl::fuzzer::proto::CURLOPT_FTP_USE_PRET:
  ------------------
  |  Branch (482:5): [True: 0, False: 12.7k]
  ------------------
  483|      0|    case curl::fuzzer::proto::CURLOPT_TFTP_BLKSIZE:
  ------------------
  |  Branch (483:5): [True: 0, False: 12.7k]
  ------------------
  484|      0|    case curl::fuzzer::proto::CURLOPT_TFTP_NO_OPTIONS:
  ------------------
  |  Branch (484:5): [True: 0, False: 12.7k]
  ------------------
  485|      0|    case curl::fuzzer::proto::CURLOPT_TRANSFERTEXT:
  ------------------
  |  Branch (485:5): [True: 0, False: 12.7k]
  ------------------
  486|      0|    case curl::fuzzer::proto::CURLOPT_WILDCARDMATCH:
  ------------------
  |  Branch (486:5): [True: 0, False: 12.7k]
  ------------------
  487|      0|      return true;
  488|       |
  489|    628|    case curl::fuzzer::proto::CURL_OPTION_UNSPECIFIED:
  ------------------
  |  Branch (489:5): [True: 628, False: 12.1k]
  ------------------
  490|  12.7k|    default:
  ------------------
  |  Branch (490:5): [True: 12.1k, False: 628]
  ------------------
  491|  12.7k|      return false;
  492|  12.7k|  }
  493|  12.7k|}
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_120ClearAllBackpressureEPN4curl6fuzzer5proto8ScenarioE:
  630|  3.73k|void ClearAllBackpressure(curl::fuzzer::proto::Scenario* scenario) {
  631|  3.73k|  if (scenario->has_connection()) {
  ------------------
  |  Branch (631:7): [True: 3.73k, False: 0]
  ------------------
  632|  3.73k|    scenario->mutable_connection()->clear_backpressure();
  633|  3.73k|  }
  634|  3.73k|  for (auto& connection : *scenario->mutable_subsequent_connections()) {
  ------------------
  |  Branch (634:25): [True: 338, False: 3.73k]
  ------------------
  635|    338|    connection.clear_backpressure();
  636|    338|  }
  637|  3.73k|}
target_policy.cc:_ZN12proto_fuzzer12_GLOBAL__N_124CanonicalizeTlsAuthorityEPN4curl6fuzzer5proto8ScenarioE:
   59|  3.73k|void CanonicalizeTlsAuthority(curl::fuzzer::proto::Scenario* scenario) {
   60|  3.73k|  const std::string& host_path = scenario->host_path();
   61|  3.73k|  const std::size_t suffix_start = host_path.find_first_of("/?#");
   62|  3.73k|  if (suffix_start == std::string::npos) {
  ------------------
  |  Branch (62:7): [True: 2.93k, False: 798]
  ------------------
   63|  2.93k|    scenario->set_host_path("tls.test/");
   64|  2.93k|    return;
   65|  2.93k|  }
   66|    798|  scenario->set_host_path("tls.test" + host_path.substr(suffix_start));
   67|    798|}

_ZN12proto_fuzzer10RunModeForENS_13TargetProfileE:
   65|  3.73k|constexpr ScenarioRunMode RunModeFor(TargetProfile profile) {
   66|  3.73k|  switch (profile) {
  ------------------
  |  Branch (66:11): [True: 3.73k, False: 0]
  ------------------
   67|      0|    case TargetProfile::kFastHttp:
  ------------------
  |  Branch (67:5): [True: 0, False: 3.73k]
  ------------------
   68|      0|    case TargetProfile::kFastTelnet:
  ------------------
  |  Branch (68:5): [True: 0, False: 3.73k]
  ------------------
   69|      0|      return ScenarioRunMode::kFastProtocol;
   70|       |
   71|      0|    case TargetProfile::kApi:
  ------------------
  |  Branch (71:5): [True: 0, False: 3.73k]
  ------------------
   72|      0|      return ScenarioRunMode::kApiLifecycle;
   73|       |
   74|  3.73k|    case TargetProfile::kFastHttps:
  ------------------
  |  Branch (74:5): [True: 3.73k, False: 0]
  ------------------
   75|  3.73k|      return ScenarioRunMode::kTlsCoverage;
   76|       |
   77|      0|    case TargetProfile::kFastFtp:
  ------------------
  |  Branch (77:5): [True: 0, False: 3.73k]
  ------------------
   78|      0|      return ScenarioRunMode::kFtpCoverage;
   79|       |
   80|      0|    case TargetProfile::kFastTftp:
  ------------------
  |  Branch (80:5): [True: 0, False: 3.73k]
  ------------------
   81|      0|      return ScenarioRunMode::kTftpCoverage;
   82|       |
   83|      0|    case TargetProfile::kCompatibility:
  ------------------
  |  Branch (83:5): [True: 0, False: 3.73k]
  ------------------
   84|      0|    case TargetProfile::kDeepHttp:
  ------------------
  |  Branch (84:5): [True: 0, False: 3.73k]
  ------------------
   85|      0|    case TargetProfile::kFastWebSocket:
  ------------------
  |  Branch (85:5): [True: 0, False: 3.73k]
  ------------------
   86|      0|    case TargetProfile::kFastSecureWebSocket:
  ------------------
  |  Branch (86:5): [True: 0, False: 3.73k]
  ------------------
   87|      0|    case TargetProfile::kTiming:
  ------------------
  |  Branch (87:5): [True: 0, False: 3.73k]
  ------------------
   88|      0|      return ScenarioRunMode::kProtocolCoverage;
   89|  3.73k|  }
   90|      0|  return ScenarioRunMode::kProtocolCoverage;
   91|  3.73k|}

_ZN12proto_fuzzer13TlsMockServerC2Ev:
  363|  3.73k|TlsMockServer::TlsMockServer() : context_(std::make_unique<TlsServerContext>()), saw_live_tls_session_(false) {}
_ZN12proto_fuzzer13TlsMockServerD2Ev:
  368|  3.73k|TlsMockServer::~TlsMockServer() { ResetConnections(); }
_ZN12proto_fuzzer13TlsMockServer7InstallEPv:
  373|  3.73k|void TlsMockServer::Install(CURL* easy) {
  374|  3.73k|  MockServer::Install(easy);
  375|  3.73k|  struct curl_blob trust_anchor = {const_cast<char*>(tls_test_credentials::kCertificatePem),
  376|  3.73k|                                   sizeof(tls_test_credentials::kCertificatePem) - 1, CURL_BLOB_NOCOPY};
  ------------------
  |  |   32|  3.73k|#define CURL_BLOB_NOCOPY 0 /* tell libcurl to NOT copy the data */
  ------------------
  377|  3.73k|  (void)curl_easy_setopt(easy, CURLOPT_CAINFO_BLOB, &trust_anchor);
  ------------------
  |  | 3363|  3.73k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  378|  3.73k|  (void)curl_easy_setopt(easy, CURLOPT_SSL_VERIFYPEER, 1L);
  ------------------
  |  | 3363|  3.73k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  379|  3.73k|  (void)curl_easy_setopt(easy, CURLOPT_SSL_VERIFYHOST, 2L);
  ------------------
  |  | 3363|  3.73k|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3361|  3.73k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  380|  3.73k|}
_ZN12proto_fuzzer13TlsMockServer16CreateConnectionEv:
  404|  3.62k|std::unique_ptr<MockConnection> TlsMockServer::CreateConnection() {
  405|  3.62k|  return std::make_unique<TlsMockConnection>(context_.get());
  406|  3.62k|}
_ZN12proto_fuzzer13TlsMockServer21ObserveActiveTransferEPv:
  412|  10.9k|void TlsMockServer::ObserveActiveTransfer(CURL* easy) {
  413|  10.9k|  if (saw_live_tls_session_) {
  ------------------
  |  Branch (413:7): [True: 3.63k, False: 7.36k]
  ------------------
  414|  3.63k|    return;
  415|  3.63k|  }
  416|  7.36k|  long verify_result = 0;
  417|  7.36k|  curl_off_t appconnect_time = 0;
  418|  7.36k|  struct curl_certinfo* certificate_info = nullptr;
  419|  7.36k|  struct curl_tlssessioninfo* tls_session = nullptr;
  420|  7.36k|  (void)curl_easy_getinfo(easy, CURLINFO_SSL_VERIFYRESULT, &verify_result);
  ------------------
  |  | 3365|  7.36k|  curl_easy_getinfo curl_exactly_three_arguments(handle, info, arg)
  |  |  ------------------
  |  |  |  | 3361|  7.36k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  421|  7.36k|  (void)curl_easy_getinfo(easy, CURLINFO_APPCONNECT_TIME_T, &appconnect_time);
  ------------------
  |  | 3365|  7.36k|  curl_easy_getinfo curl_exactly_three_arguments(handle, info, arg)
  |  |  ------------------
  |  |  |  | 3361|  7.36k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  422|  7.36k|  (void)curl_easy_getinfo(easy, CURLINFO_CERTINFO, &certificate_info);
  ------------------
  |  | 3365|  7.36k|  curl_easy_getinfo curl_exactly_three_arguments(handle, info, arg)
  |  |  ------------------
  |  |  |  | 3361|  7.36k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  423|  7.36k|  if (curl_easy_getinfo(easy, CURLINFO_TLS_SSL_PTR, &tls_session) == CURLE_OK && tls_session != nullptr &&
  ------------------
  |  | 3365|  7.36k|  curl_easy_getinfo curl_exactly_three_arguments(handle, info, arg)
  |  |  ------------------
  |  |  |  | 3361|  7.36k|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
  |  Branch (423:7): [True: 7.36k, False: 0]
  |  Branch (423:82): [True: 7.36k, False: 0]
  ------------------
  424|  7.36k|      tls_session->internals != nullptr) {
  ------------------
  |  Branch (424:7): [True: 3.58k, False: 3.77k]
  ------------------
  425|  3.58k|    saw_live_tls_session_ = true;
  426|  3.58k|  }
  427|  7.36k|}
_ZN12proto_fuzzer16TlsServerContextC2Ev:
   70|  3.73k|      : context_(nullptr),
   71|  3.73k|        negotiated_tls_version_(0),
   72|  3.73k|        completed_handshake_count_(0),
   73|  3.73k|        reused_session_count_(0),
   74|  3.73k|        write_retry_count_(0) {
   75|  3.73k|    OpenSslErrorQueueGuard error_guard;
   76|  3.73k|    context_ = SSL_CTX_new(TLS_server_method());
   77|  3.73k|    if (context_ == nullptr || !LoadCredentials()) {
  ------------------
  |  Branch (77:9): [True: 0, False: 3.73k]
  |  Branch (77:32): [True: 0, False: 3.73k]
  ------------------
   78|      0|      SSL_CTX_free(context_);
   79|      0|      context_ = nullptr;
   80|      0|      return;
   81|      0|    }
   82|       |
   83|  3.73k|    (void)SSL_CTX_set_min_proto_version(context_, TLS1_2_VERSION);
  ------------------
  |  | 1583|  3.73k|    SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MIN_PROTO_VERSION, version, NULL)
  |  |  ------------------
  |  |  |  | 1403|  3.73k|#define SSL_CTRL_SET_MIN_PROTO_VERSION 123
  |  |  ------------------
  ------------------
   84|  3.73k|    (void)SSL_CTX_set_options(context_, SSL_OP_NO_COMPRESSION);
  ------------------
  |  |  395|  3.73k|#define SSL_OP_NO_COMPRESSION SSL_OP_BIT(17)
  |  |  ------------------
  |  |  |  |  351|  3.73k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
   85|       |    (void)SSL_CTX_set_session_cache_mode(context_, SSL_SESS_CACHE_SERVER);
  ------------------
  |  | 2229|  3.73k|    SSL_CTX_ctrl(ctx, SSL_CTRL_SET_SESS_CACHE_MODE, m, NULL)
  |  |  ------------------
  |  |  |  | 1333|  3.73k|#define SSL_CTRL_SET_SESS_CACHE_MODE 44
  |  |  ------------------
  ------------------
   86|  3.73k|    constexpr unsigned char session_id_context[] = "curl-fuzzer";
   87|  3.73k|    (void)SSL_CTX_set_session_id_context(context_, session_id_context, sizeof(session_id_context) - 1);
   88|  3.73k|    SSL_CTX_set_alpn_select_cb(context_, &SelectAlpn, nullptr);
   89|  3.73k|  }
tls_mock_server.cc:_ZN12proto_fuzzer12_GLOBAL__N_122OpenSslErrorQueueGuardC2Ev:
   32|  26.2k|  OpenSslErrorQueueGuard() { ERR_clear_error(); }
_ZN12proto_fuzzer16TlsServerContext15LoadCredentialsEv:
  129|  3.73k|  bool LoadCredentials() {
  130|  3.73k|    BIO* certificate_bio = BIO_new_mem_buf(tls_test_credentials::kCertificatePem, -1);
  131|  3.73k|    BIO* key_bio = BIO_new_mem_buf(tls_test_credentials::kPrivateKeyPem, -1);
  132|  3.73k|    if (certificate_bio == nullptr || key_bio == nullptr) {
  ------------------
  |  Branch (132:9): [True: 0, False: 3.73k]
  |  Branch (132:39): [True: 0, False: 3.73k]
  ------------------
  133|      0|      BIO_free(certificate_bio);
  134|      0|      BIO_free(key_bio);
  135|      0|      return false;
  136|      0|    }
  137|       |
  138|  3.73k|    X509* certificate = PEM_read_bio_X509(certificate_bio, nullptr, nullptr, nullptr);
  139|  3.73k|    EVP_PKEY* key = PEM_read_bio_PrivateKey(key_bio, nullptr, nullptr, nullptr);
  140|  3.73k|    BIO_free(certificate_bio);
  141|  3.73k|    BIO_free(key_bio);
  142|  3.73k|    if (certificate == nullptr || key == nullptr) {
  ------------------
  |  Branch (142:9): [True: 0, False: 3.73k]
  |  Branch (142:35): [True: 0, False: 3.73k]
  ------------------
  143|      0|      X509_free(certificate);
  144|      0|      EVP_PKEY_free(key);
  145|      0|      return false;
  146|      0|    }
  147|       |
  148|  3.73k|    const bool loaded = SSL_CTX_use_certificate(context_, certificate) == 1 &&
  ------------------
  |  Branch (148:25): [True: 3.73k, False: 0]
  ------------------
  149|  3.73k|                        SSL_CTX_use_PrivateKey(context_, key) == 1 && SSL_CTX_check_private_key(context_) == 1;
  ------------------
  |  Branch (149:25): [True: 3.73k, False: 0]
  |  Branch (149:71): [True: 3.73k, False: 0]
  ------------------
  150|  3.73k|    X509_free(certificate);
  151|  3.73k|    EVP_PKEY_free(key);
  152|  3.73k|    return loaded;
  153|  3.73k|  }
tls_mock_server.cc:_ZN12proto_fuzzer12_GLOBAL__N_110SelectAlpnEP6ssl_stPPKhPhS4_jPv:
   44|  3.62k|               const unsigned char* client_protocols, unsigned int client_protocols_length, void* /*userdata*/) {
   45|       |  // OpenSSL may return a pointer into the server preference list. Function-
   46|       |  // local static storage keeps that result valid for the rest of the
   47|       |  // handshake without reintroducing transport policy as a namespace global.
   48|  3.62k|  static constexpr unsigned char http11_alpn[] = {8, 'h', 't', 't', 'p', '/', '1', '.', '1'};
   49|  3.62k|  unsigned char* match = nullptr;
   50|  3.62k|  unsigned char match_length = 0;
   51|  3.62k|  const int result = SSL_select_next_proto(&match, &match_length, http11_alpn, sizeof(http11_alpn), client_protocols,
   52|  3.62k|                                           client_protocols_length);
   53|  3.62k|  if (result != OPENSSL_NPN_NEGOTIATED) {
  ------------------
  |  |  856|  3.62k|#define OPENSSL_NPN_NEGOTIATED 1
  ------------------
  |  Branch (53:7): [True: 2, False: 3.62k]
  ------------------
   54|      2|    return SSL_TLSEXT_ERR_NOACK;
  ------------------
  |  |  353|      2|#define SSL_TLSEXT_ERR_NOACK 3
  ------------------
   55|      2|  }
   56|  3.62k|  *selected = match;
   57|  3.62k|  *selected_length = match_length;
   58|  3.62k|  return SSL_TLSEXT_ERR_OK;
  ------------------
  |  |  350|  3.62k|#define SSL_TLSEXT_ERR_OK 0
  ------------------
   59|  3.62k|}
tls_mock_server.cc:_ZN12proto_fuzzer12_GLOBAL__N_122OpenSslErrorQueueGuardD2Ev:
   34|  26.2k|  ~OpenSslErrorQueueGuard() { ERR_clear_error(); }
_ZN12proto_fuzzer16TlsServerContextD2Ev:
   91|  3.73k|  ~TlsServerContext() {
   92|  3.73k|    OpenSslErrorQueueGuard error_guard;
   93|  3.73k|    SSL_CTX_free(context_);
   94|  3.73k|  }
tls_mock_server.cc:_ZN12proto_fuzzer12_GLOBAL__N_117TlsMockConnectionC2EPNS_16TlsServerContextE:
  171|  3.62k|      : ssl_(nullptr),
  172|  3.62k|        context_(context),
  173|  3.62k|        pending_offset_(0),
  174|  3.62k|        pending_write_end_(0),
  175|  3.62k|        handshake_complete_(false),
  176|  3.62k|        shutdown_requested_(false),
  177|  3.62k|        write_shutdown_(false),
  178|  3.62k|        failed_(false) {
  179|  3.62k|    OpenSslErrorQueueGuard error_guard;
  180|  3.62k|    SSL_CTX* ssl_context = context_ == nullptr ? nullptr : context_->get();
  ------------------
  |  Branch (180:28): [True: 0, False: 3.62k]
  ------------------
  181|  3.62k|    ssl_ = ssl_context == nullptr ? nullptr : SSL_new(ssl_context);
  ------------------
  |  Branch (181:12): [True: 0, False: 3.62k]
  ------------------
  182|  3.62k|    if (ssl_ != nullptr) {
  ------------------
  |  Branch (182:9): [True: 3.62k, False: 0]
  ------------------
  183|  3.62k|      SSL_set_mode(ssl_, SSL_MODE_ENABLE_PARTIAL_WRITE | SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
  ------------------
  |  |  664|  3.62k|    SSL_ctrl((ssl), SSL_CTRL_MODE, (op), NULL)
  |  |  ------------------
  |  |  |  | 1328|  3.62k|#define SSL_CTRL_MODE 33
  |  |  ------------------
  ------------------
  184|  3.62k|      if (SSL_set_fd(ssl_, server_fd()) != 1) {
  ------------------
  |  Branch (184:11): [True: 0, False: 3.62k]
  ------------------
  185|      0|        SSL_free(ssl_);
  186|      0|        ssl_ = nullptr;
  187|  3.62k|      } else {
  188|  3.62k|        SSL_set_accept_state(ssl_);
  189|  3.62k|      }
  190|  3.62k|    }
  191|  3.62k|  }
_ZNK12proto_fuzzer16TlsServerContext3getEv:
  100|  3.62k|  SSL_CTX* get() const { return context_; }
tls_mock_server.cc:_ZN12proto_fuzzer12_GLOBAL__N_117TlsMockConnectionD2Ev:
  193|  3.62k|  ~TlsMockConnection() override {
  194|  3.62k|    OpenSslErrorQueueGuard error_guard;
  195|  3.62k|    if (ssl_ != nullptr) {
  ------------------
  |  Branch (195:9): [True: 3.62k, False: 0]
  ------------------
  196|  3.62k|      SSL_free(ssl_);
  197|  3.62k|    }
  198|  3.62k|  }
tls_mock_server.cc:_ZNK12proto_fuzzer12_GLOBAL__N_117TlsMockConnection2okEv:
  201|  15.1k|  bool ok() const override { return MockConnection::ok() && ssl_ != nullptr; }
  ------------------
  |  Branch (201:37): [True: 15.1k, False: 0]
  |  Branch (201:61): [True: 15.1k, False: 0]
  ------------------
tls_mock_server.cc:_ZN12proto_fuzzer12_GLOBAL__N_117TlsMockConnection8WriteAllEPKhm:
  204|  1.05k|  bool WriteAll(const unsigned char* data, std::size_t size) override {
  205|  1.05k|    if (failed_ || (data == nullptr && size != 0) || size > pending_plaintext_.max_size() - pending_plaintext_.size()) {
  ------------------
  |  Branch (205:9): [True: 0, False: 1.05k]
  |  Branch (205:21): [True: 0, False: 1.05k]
  |  Branch (205:40): [True: 0, False: 0]
  |  Branch (205:54): [True: 0, False: 1.05k]
  ------------------
  206|      0|      return false;
  207|      0|    }
  208|  1.05k|    if (size != 0) {
  ------------------
  |  Branch (208:9): [True: 1.05k, False: 0]
  ------------------
  209|  1.05k|      pending_plaintext_.append(reinterpret_cast<const char*>(data), size);
  210|  1.05k|    }
  211|  1.05k|    return true;
  212|  1.05k|  }
tls_mock_server.cc:_ZN12proto_fuzzer12_GLOBAL__N_117TlsMockConnection13DrainIncomingEv:
  217|  11.5k|  std::size_t DrainIncoming() override {
  218|  11.5k|    if (!ok() || failed_) {
  ------------------
  |  Branch (218:9): [True: 0, False: 11.5k]
  |  Branch (218:18): [True: 0, False: 11.5k]
  ------------------
  219|      0|      return 0;
  220|      0|    }
  221|       |
  222|  11.5k|    OpenSslErrorQueueGuard error_guard;
  223|  11.5k|    std::size_t progress = 0;
  224|  11.5k|    if (!handshake_complete_) {
  ------------------
  |  Branch (224:9): [True: 11.1k, False: 449]
  ------------------
  225|  11.1k|      const int state_before = static_cast<int>(SSL_get_state(ssl_));
  226|  11.1k|      const int result = SSL_accept(ssl_);
  227|       |      // SSL_get_error must be the next OpenSSL call after failed I/O. Even a
  228|       |      // state query in between would make its use formally unreliable.
  229|  11.1k|      const int error = result == 1 ? SSL_ERROR_NONE : SSL_get_error(ssl_, result);
  ------------------
  |  | 1284|  3.58k|#define SSL_ERROR_NONE 0
  ------------------
  |  Branch (229:25): [True: 3.58k, False: 7.53k]
  ------------------
  230|  11.1k|      const int state_after = static_cast<int>(SSL_get_state(ssl_));
  231|  11.1k|      if (state_after != state_before) {
  ------------------
  |  Branch (231:11): [True: 7.21k, False: 3.90k]
  ------------------
  232|  7.21k|        ++progress;
  233|  7.21k|      }
  234|  11.1k|      if (result == 1) {
  ------------------
  |  Branch (234:11): [True: 3.58k, False: 7.53k]
  ------------------
  235|  3.58k|        handshake_complete_ = true;
  236|  3.58k|        if (context_ != nullptr) {
  ------------------
  |  Branch (236:13): [True: 3.58k, False: 0]
  ------------------
  237|  3.58k|          context_->RecordHandshake(ssl_);
  238|  3.58k|        }
  239|  3.58k|        ++progress;
  240|  7.53k|      } else {
  241|  7.53k|        if (error == SSL_ERROR_WANT_READ || error == SSL_ERROR_WANT_WRITE) {
  ------------------
  |  | 1286|  15.0k|#define SSL_ERROR_WANT_READ 2
  ------------------
                      if (error == SSL_ERROR_WANT_READ || error == SSL_ERROR_WANT_WRITE) {
  ------------------
  |  | 1287|      0|#define SSL_ERROR_WANT_WRITE 3
  ------------------
  |  Branch (241:13): [True: 7.53k, False: 0]
  |  Branch (241:45): [True: 0, False: 0]
  ------------------
  242|  7.53k|          return progress;
  243|  7.53k|        }
  244|      0|        failed_ = true;
  245|      0|        return progress;
  246|  7.53k|      }
  247|  11.1k|    }
  248|       |
  249|       |    // A WANT result leaves SSL_write_ex in flight. OpenSSL requires the next
  250|       |    // I/O operation to retry that exact write, so do not interpose SSL_read_ex
  251|       |    // merely because the outer driver has yielded back to us.
  252|  4.03k|    if (pending_write_end_ != 0) {
  ------------------
  |  Branch (252:9): [True: 0, False: 4.03k]
  ------------------
  253|      0|      progress += FlushPendingWrites();
  254|      0|      if (failed_ || pending_write_end_ != 0) {
  ------------------
  |  Branch (254:11): [True: 0, False: 0]
  |  Branch (254:22): [True: 0, False: 0]
  ------------------
  255|      0|        return progress;
  256|      0|      }
  257|      0|    }
  258|       |
  259|  4.03k|    unsigned char request[4096];
  260|  7.75k|    while (true) {
  ------------------
  |  Branch (260:12): [True: 7.75k, Folded]
  ------------------
  261|  7.75k|      std::size_t received = 0;
  262|  7.75k|      const int result = SSL_read_ex(ssl_, request, sizeof(request), &received);
  263|  7.75k|      if (result == 1 && received != 0) {
  ------------------
  |  Branch (263:11): [True: 3.72k, False: 4.03k]
  |  Branch (263:26): [True: 3.72k, False: 0]
  ------------------
  264|  3.72k|        progress += received;
  265|  3.72k|        continue;
  266|  3.72k|      }
  267|  4.03k|      if (result != 1) {
  ------------------
  |  Branch (267:11): [True: 4.03k, False: 0]
  ------------------
  268|  4.03k|        const int error = SSL_get_error(ssl_, result);
  269|  4.03k|        if (error != SSL_ERROR_WANT_READ && error != SSL_ERROR_WANT_WRITE && error != SSL_ERROR_ZERO_RETURN) {
  ------------------
  |  | 1286|  8.06k|#define SSL_ERROR_WANT_READ 2
  ------------------
                      if (error != SSL_ERROR_WANT_READ && error != SSL_ERROR_WANT_WRITE && error != SSL_ERROR_ZERO_RETURN) {
  ------------------
  |  | 1287|  4.03k|#define SSL_ERROR_WANT_WRITE 3
  ------------------
                      if (error != SSL_ERROR_WANT_READ && error != SSL_ERROR_WANT_WRITE && error != SSL_ERROR_ZERO_RETURN) {
  ------------------
  |  | 1291|      0|#define SSL_ERROR_ZERO_RETURN 6
  ------------------
  |  Branch (269:13): [True: 0, False: 4.03k]
  |  Branch (269:45): [True: 0, False: 0]
  |  Branch (269:78): [True: 0, False: 0]
  ------------------
  270|      0|          failed_ = true;
  271|      0|        }
  272|  4.03k|      }
  273|  4.03k|      break;
  274|  7.75k|    }
  275|       |
  276|  4.03k|    progress += FlushPendingWrites();
  277|       |
  278|  4.03k|    if (!failed_ && shutdown_requested_ && pending_plaintext_.empty() && !write_shutdown_) {
  ------------------
  |  Branch (278:9): [True: 4.03k, False: 0]
  |  Branch (278:21): [True: 3.45k, False: 574]
  |  Branch (278:44): [True: 3.45k, False: 0]
  |  Branch (278:74): [True: 3.45k, False: 0]
  ------------------
  279|  3.45k|      const int result = SSL_shutdown(ssl_);
  280|  3.45k|      if (result >= 0) {
  ------------------
  |  Branch (280:11): [True: 3.45k, False: 0]
  ------------------
  281|       |        // The first successful call sends close_notify. The fuzzer does not
  282|       |        // need to wait for the client's reciprocal alert before exposing EOF.
  283|  3.45k|        (void)::shutdown(server_fd(), SHUT_WR);
  284|  3.45k|        write_shutdown_ = true;
  285|  3.45k|        ++progress;
  286|  3.45k|      } else {
  287|      0|        const int error = SSL_get_error(ssl_, result);
  288|      0|        if (error != SSL_ERROR_WANT_READ && error != SSL_ERROR_WANT_WRITE) {
  ------------------
  |  | 1286|      0|#define SSL_ERROR_WANT_READ 2
  ------------------
                      if (error != SSL_ERROR_WANT_READ && error != SSL_ERROR_WANT_WRITE) {
  ------------------
  |  | 1287|      0|#define SSL_ERROR_WANT_WRITE 3
  ------------------
  |  Branch (288:13): [True: 0, False: 0]
  |  Branch (288:45): [True: 0, False: 0]
  ------------------
  289|      0|          failed_ = true;
  290|      0|        }
  291|      0|      }
  292|  3.45k|    }
  293|  4.03k|    return progress;
  294|  4.03k|  }
_ZN12proto_fuzzer16TlsServerContext15RecordHandshakeEP6ssl_st:
  104|  3.58k|  void RecordHandshake(SSL* ssl) {
  105|  3.58k|    if (ssl == nullptr) {
  ------------------
  |  Branch (105:9): [True: 0, False: 3.58k]
  ------------------
  106|      0|      return;
  107|      0|    }
  108|  3.58k|    negotiated_tls_version_ = SSL_version(ssl);
  109|  3.58k|    ++completed_handshake_count_;
  110|  3.58k|    if (SSL_session_reused(ssl) == 1) {
  ------------------
  |  Branch (110:9): [True: 0, False: 3.58k]
  ------------------
  111|      0|      ++reused_session_count_;
  112|      0|    }
  113|  3.58k|  }
tls_mock_server.cc:_ZN12proto_fuzzer12_GLOBAL__N_117TlsMockConnection18FlushPendingWritesEv:
  305|  4.03k|  std::size_t FlushPendingWrites() {
  306|  4.03k|    std::size_t progress = 0;
  307|  4.75k|    while (!failed_ && pending_offset_ < pending_plaintext_.size()) {
  ------------------
  |  Branch (307:12): [True: 4.75k, False: 0]
  |  Branch (307:24): [True: 720, False: 4.03k]
  ------------------
  308|    720|      if (pending_write_end_ == 0) {
  ------------------
  |  Branch (308:11): [True: 720, False: 0]
  ------------------
  309|       |        // Freeze one write boundary until OpenSSL accepts it. WriteAll may
  310|       |        // append the next scripted chunk after WANT_READ/WANT_WRITE, but the
  311|       |        // retry contract permits only pointer relocation—not changed bytes or
  312|       |        // length—for the outstanding SSL_write_ex call.
  313|    720|        pending_write_end_ = pending_plaintext_.size();
  314|    720|      }
  315|    720|      std::size_t written = 0;
  316|    720|      const int result = SSL_write_ex(ssl_, pending_plaintext_.data() + pending_offset_,
  317|    720|                                      pending_write_end_ - pending_offset_, &written);
  318|    720|      if (result == 1) {
  ------------------
  |  Branch (318:11): [True: 720, False: 0]
  ------------------
  319|    720|        if (written == 0) {
  ------------------
  |  Branch (319:13): [True: 0, False: 720]
  ------------------
  320|      0|          failed_ = true;
  321|      0|          break;
  322|      0|        }
  323|    720|        pending_offset_ += written;
  324|    720|        progress += written;
  325|    720|        if (pending_offset_ == pending_write_end_) {
  ------------------
  |  Branch (325:13): [True: 720, False: 0]
  ------------------
  326|    720|          pending_write_end_ = 0;
  327|    720|        }
  328|    720|        continue;
  329|    720|      }
  330|      0|      const int error = SSL_get_error(ssl_, result);
  331|      0|      if (error == SSL_ERROR_WANT_READ || error == SSL_ERROR_WANT_WRITE) {
  ------------------
  |  | 1286|      0|#define SSL_ERROR_WANT_READ 2
  ------------------
                    if (error == SSL_ERROR_WANT_READ || error == SSL_ERROR_WANT_WRITE) {
  ------------------
  |  | 1287|      0|#define SSL_ERROR_WANT_WRITE 3
  ------------------
  |  Branch (331:11): [True: 0, False: 0]
  |  Branch (331:43): [True: 0, False: 0]
  ------------------
  332|      0|        if (context_ != nullptr) {
  ------------------
  |  Branch (332:13): [True: 0, False: 0]
  ------------------
  333|      0|          context_->RecordWriteRetry();
  334|      0|        }
  335|      0|      } else {
  336|      0|        failed_ = true;
  337|      0|      }
  338|      0|      break;
  339|    720|    }
  340|  4.03k|    if (pending_offset_ == pending_plaintext_.size()) {
  ------------------
  |  Branch (340:9): [True: 4.03k, False: 0]
  ------------------
  341|  4.03k|      pending_plaintext_.clear();
  342|  4.03k|      pending_offset_ = 0;
  343|  4.03k|      pending_write_end_ = 0;
  344|  4.03k|    }
  345|  4.03k|    return progress;
  346|  4.03k|  }
tls_mock_server.cc:_ZN12proto_fuzzer12_GLOBAL__N_117TlsMockConnection13ShutdownWriteEv:
  297|  3.50k|  void ShutdownWrite() override {
  298|  3.50k|    shutdown_requested_ = true;
  299|  3.50k|    (void)DrainIncoming();
  300|  3.50k|  }

_ZN12proto_fuzzer23SerializeWebSocketFrameERKN4curl6fuzzer5proto14WebSocketFrameE:
   59|    289|std::string SerializeWebSocketFrame(const curl::fuzzer::proto::WebSocketFrame& frame) {
   60|    289|  std::string out;
   61|    289|  const std::string& payload = frame.payload();
   62|    289|  const std::size_t payload_len = payload.size();
   63|       |
   64|       |  // Byte 0: FIN | RSV1 | RSV2 | RSV3 | opcode(4 bits).
   65|    289|  std::uint8_t byte0 = 0;
   66|    289|  if (frame.fin()) byte0 |= 0x80;
  ------------------
  |  Branch (66:7): [True: 34, False: 255]
  ------------------
   67|    289|  if (frame.rsv1()) byte0 |= 0x40;
  ------------------
  |  Branch (67:7): [True: 41, False: 248]
  ------------------
   68|    289|  if (frame.rsv2()) byte0 |= 0x20;
  ------------------
  |  Branch (68:7): [True: 49, False: 240]
  ------------------
   69|    289|  if (frame.rsv3()) byte0 |= 0x10;
  ------------------
  |  Branch (69:7): [True: 39, False: 250]
  ------------------
   70|    289|  byte0 |= static_cast<std::uint8_t>(frame.opcode() & 0x0F);
   71|    289|  out.push_back(static_cast<char>(byte0));
   72|       |
   73|       |  // Byte 1: MASK bit | payload-length indicator (7 bits).
   74|    289|  const std::uint32_t length_form = ResolveLengthForm(frame.length_form(), payload_len);
   75|    289|  std::uint8_t byte1 = frame.masked() ? 0x80 : 0x00;
  ------------------
  |  Branch (75:24): [True: 42, False: 247]
  ------------------
   76|    289|  switch (length_form) {
   77|    272|    case kLenForm7:
  ------------------
  |  Branch (77:5): [True: 272, False: 17]
  ------------------
   78|       |      // Clamp the 7-bit length to the payload's actual size. If the payload
   79|       |      // is > 125 bytes and the caller forced 7-bit form, low 7 bits of size
   80|       |      // are what the decoder sees — which is exactly the malformed-frame
   81|       |      // path we want to reach.
   82|    272|      byte1 |= static_cast<std::uint8_t>(payload_len & 0x7F);
   83|    272|      out.push_back(static_cast<char>(byte1));
   84|    272|      break;
   85|     15|    case kLenForm16:
  ------------------
  |  Branch (85:5): [True: 15, False: 274]
  ------------------
   86|     15|      byte1 |= 126;
   87|     15|      out.push_back(static_cast<char>(byte1));
   88|     15|      AppendBigEndian(&out, static_cast<std::uint64_t>(payload_len & 0xFFFF), 2);
   89|     15|      break;
   90|      2|    case kLenForm64:
  ------------------
  |  Branch (90:5): [True: 2, False: 287]
  ------------------
   91|      2|    default:
  ------------------
  |  Branch (91:5): [True: 0, False: 289]
  ------------------
   92|      2|      byte1 |= 127;
   93|      2|      out.push_back(static_cast<char>(byte1));
   94|      2|      AppendBigEndian(&out, static_cast<std::uint64_t>(payload_len), 8);
   95|      2|      break;
   96|    289|  }
   97|       |
   98|       |  // Masking key (4 bytes) and XORed payload. Client-to-server frames must be
   99|       |  // masked per spec; server-to-client frames must NOT — but we emit whatever
  100|       |  // the scenario says, so the decoder's "masked server frame" error path is
  101|       |  // reachable.
  102|    289|  if (frame.masked()) {
  ------------------
  |  Branch (102:7): [True: 42, False: 247]
  ------------------
  103|     42|    const std::uint32_t key = frame.mask_key();
  104|     42|    std::uint8_t key_bytes[4] = {
  105|     42|        static_cast<std::uint8_t>((key >> 24) & 0xFF),
  106|     42|        static_cast<std::uint8_t>((key >> 16) & 0xFF),
  107|     42|        static_cast<std::uint8_t>((key >> 8) & 0xFF),
  108|     42|        static_cast<std::uint8_t>(key & 0xFF),
  109|     42|    };
  110|    168|    for (unsigned char b : key_bytes) {
  ------------------
  |  Branch (110:26): [True: 168, False: 42]
  ------------------
  111|    168|      out.push_back(static_cast<char>(b));
  112|    168|    }
  113|     42|    out.reserve(out.size() + payload_len);
  114|  8.75k|    for (std::size_t i = 0; i < payload_len; ++i) {
  ------------------
  |  Branch (114:29): [True: 8.71k, False: 42]
  ------------------
  115|  8.71k|      out.push_back(static_cast<char>(static_cast<std::uint8_t>(payload[i]) ^ key_bytes[i & 0x3]));
  116|  8.71k|    }
  117|    247|  } else {
  118|    247|    out.append(payload);
  119|    247|  }
  120|       |
  121|    289|  return out;
  122|    289|}
ws_frame.cc:_ZN12proto_fuzzer12_GLOBAL__N_117ResolveLengthFormEjm:
   30|    289|std::uint32_t ResolveLengthForm(std::uint32_t form, std::size_t payload_len) {
   31|    289|  if (form == kLenForm7 || form == kLenForm16 || form == kLenForm64) {
  ------------------
  |  Branch (31:7): [True: 9, False: 280]
  |  Branch (31:28): [True: 3, False: 277]
  |  Branch (31:50): [True: 2, False: 275]
  ------------------
   32|     14|    return form;
   33|     14|  }
   34|    275|  if (payload_len < 126) {
  ------------------
  |  Branch (34:7): [True: 263, False: 12]
  ------------------
   35|    263|    return kLenForm7;
   36|    263|  }
   37|     12|  if (payload_len <= 0xFFFF) {
  ------------------
  |  Branch (37:7): [True: 12, False: 0]
  ------------------
   38|     12|    return kLenForm16;
   39|     12|  }
   40|      0|  return kLenForm64;
   41|     12|}
ws_frame.cc:_ZN12proto_fuzzer12_GLOBAL__N_115AppendBigEndianEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEmm:
   44|     17|void AppendBigEndian(std::string* out, std::uint64_t value, std::size_t width) {
   45|     63|  for (std::size_t i = 0; i < width; ++i) {
  ------------------
  |  Branch (45:27): [True: 46, False: 17]
  ------------------
   46|     46|    std::size_t shift = (width - 1 - i) * 8;
   47|     46|    out->push_back(static_cast<char>((value >> shift) & 0xFF));
   48|     46|  }
   49|     17|}

